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

github.com/jgraph/drawio.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGaudenz Alder <gaudenz@jgraph.com>2019-01-10 18:20:07 +0300
committerGaudenz Alder <gaudenz@jgraph.com>2019-01-10 18:20:07 +0300
commitf5de2403cc6d2665c5160ed2e0094403ea6e6556 (patch)
tree45d6d2f6a2efe69e149e3a69c1f87d2c397ef2b5
parentdbb791a98f7b3073aa18f0dd1cc6df18670e34d2 (diff)
10.0.29 releasev10.0.29
Former-commit-id: bed4c31a32595bcc24acd778ea07882806ebf911
-rw-r--r--ChangeLog5
-rw-r--r--VERSION2
-rw-r--r--etc/mxgraph/mxClient.js2
-rw-r--r--src/main/webapp/cache.manifest2
-rw-r--r--src/main/webapp/js/app.min.js1411
-rw-r--r--src/main/webapp/js/atlas-viewer.min.js665
-rw-r--r--src/main/webapp/js/atlas.min.js267
-rw-r--r--src/main/webapp/js/diagramly/DrawioFile.js56
-rw-r--r--src/main/webapp/js/diagramly/DrawioFileSync.js2
-rw-r--r--src/main/webapp/js/diagramly/EditorUi.js8
-rw-r--r--src/main/webapp/js/embed-static.min.js4
-rw-r--r--src/main/webapp/js/reader.min.js4
-rw-r--r--src/main/webapp/js/viewer.min.js665
13 files changed, 1568 insertions, 1525 deletions
diff --git a/ChangeLog b/ChangeLog
index 3e5be580..7fade7a7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+10-JAN-2019: 10.0.29
+
+- Improved error handling for CSV import
+- Uses mxGraph 3.9.13 beta 5
+
10-JAN-2019: 10.0.28
- Uses mxGraph 3.9.13 beta 4
diff --git a/VERSION b/VERSION
index c2f5ac8a..7a583876 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-10.0.28 \ No newline at end of file
+10.0.29 \ No newline at end of file
diff --git a/etc/mxgraph/mxClient.js b/etc/mxgraph/mxClient.js
index 0e6459fd..6091f552 100644
--- a/etc/mxgraph/mxClient.js
+++ b/etc/mxgraph/mxClient.js
@@ -1037,7 +1037,7 @@ mxGraphView.prototype.getPerimeterPoint=function(a,b,c,d){var e=null;if(null!=a)
0)||g),b&&(e.x=2*d.getCenterX()-e.x),g&&(e.y=2*d.getCenterY()-e.y));e=f(d,a,e,c);null!=e&&(b&&(e.x=2*d.getCenterX()-e.x),g&&(e.y=2*d.getCenterY()-e.y))}null==e&&(e=this.getPoint(a))}return e};mxGraphView.prototype.getRoutingCenterX=function(a){var b=null!=a.style?parseFloat(a.style[mxConstants.STYLE_ROUTING_CENTER_X])||0:0;return a.getCenterX()+b*a.width};
mxGraphView.prototype.getRoutingCenterY=function(a){var b=null!=a.style?parseFloat(a.style[mxConstants.STYLE_ROUTING_CENTER_Y])||0:0;return a.getCenterY()+b*a.height};mxGraphView.prototype.getPerimeterBounds=function(a,b){b=null!=b?b:0;null!=a&&(b+=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]||0));return a.getPerimeterBounds(b*this.scale)};
mxGraphView.prototype.getPerimeterFunction=function(a){a=a.style[mxConstants.STYLE_PERIMETER];if("string"==typeof a){var b=mxStyleRegistry.getValue(a);null==b&&this.isAllowEval()&&(b=mxUtils.eval(a));a=b}return"function"==typeof a?a:null};mxGraphView.prototype.getNextPoint=function(a,b,c){a=a.absolutePoints;var d=null;null!=a&&2<=a.length&&(d=a.length,d=a[c?Math.min(1,d-1):Math.max(0,d-2)]);null==d&&null!=b&&(d=new mxPoint(b.getCenterX(),b.getCenterY()));return d};
-mxGraphView.prototype.getVisibleTerminal=function(a,b){for(var c=this.graph.getModel(),d=c.getTerminal(a,b),e=d;null!=d&&d!=this.currentRoot;){if(!this.graph.isCellVisible(e)||this.isCellCollapsed(d))e=d;d=c.getParent(d)}c.getParent(e)==c.getRoot()&&(e=null);return e};
+mxGraphView.prototype.getVisibleTerminal=function(a,b){for(var c=this.graph.getModel(),d=c.getTerminal(a,b),e=d;null!=d&&d!=this.currentRoot;){if(!this.graph.isCellVisible(e)||this.isCellCollapsed(d))e=d;d=c.getParent(d)}if(c.getParent(e)==c.getRoot()||e==this.currentRoot)e=null;return e};
mxGraphView.prototype.updateEdgeBounds=function(a){var b=a.absolutePoints,c=b[0],d=b[b.length-1];if(c.x!=d.x||c.y!=d.y){var e=d.x-c.x,f=d.y-c.y;a.terminalDistance=Math.sqrt(e*e+f*f)}else a.terminalDistance=0;var d=0,g=[],f=c;if(null!=f){for(var c=f.x,k=f.y,l=c,m=k,n=1;n<b.length;n++){var p=b[n];null!=p&&(e=f.x-p.x,f=f.y-p.y,e=Math.sqrt(e*e+f*f),g.push(e),d+=e,f=p,c=Math.min(f.x,c),k=Math.min(f.y,k),l=Math.max(f.x,l),m=Math.max(f.y,m))}a.length=d;a.segments=g;a.x=c;a.y=k;a.width=Math.max(1,l-c);a.height=
Math.max(1,m-k)}};
mxGraphView.prototype.getPoint=function(a,b){var c=a.getCenterX(),d=a.getCenterY();if(null==a.segments||null!=b&&!b.relative)null!=b&&(m=b.offset,null!=m&&(c+=m.x,d+=m.y));else{for(var e=a.absolutePoints.length,f=Math.round(((null!=b?b.x/2:0)+.5)*a.length),g=a.segments[0],k=0,l=1;f>=Math.round(k+g)&&l<e-1;)k+=g,g=a.segments[l++];e=0==g?0:(f-k)/g;f=a.absolutePoints[l-1];l=a.absolutePoints[l];if(null!=f&&null!=l){k=c=d=0;if(null!=b){var d=b.y,m=b.offset;null!=m&&(c=m.x,k=m.y)}m=l.x-f.x;l=l.y-f.y;c=
diff --git a/src/main/webapp/cache.manifest b/src/main/webapp/cache.manifest
index 3b0bf585..1bf879d5 100644
--- a/src/main/webapp/cache.manifest
+++ b/src/main/webapp/cache.manifest
@@ -1,7 +1,7 @@
CACHE MANIFEST
# THIS FILE WAS GENERATED. DO NOT MODIFY!
-# 01/10/2019 12:38 PM
+# 01/10/2019 04:12 PM
app.html
index.html?offline=1
diff --git a/src/main/webapp/js/app.min.js b/src/main/webapp/js/app.min.js
index 5a6037a9..a61462e8 100644
--- a/src/main/webapp/js/app.min.js
+++ b/src/main/webapp/js/app.min.js
@@ -1180,7 +1180,7 @@ mxGraphView.prototype.getPerimeterPoint=function(a,b,c,d){var e=null;if(null!=a)
0)||g),b&&(e.x=2*d.getCenterX()-e.x),g&&(e.y=2*d.getCenterY()-e.y));e=f(d,a,e,c);null!=e&&(b&&(e.x=2*d.getCenterX()-e.x),g&&(e.y=2*d.getCenterY()-e.y))}null==e&&(e=this.getPoint(a))}return e};mxGraphView.prototype.getRoutingCenterX=function(a){var b=null!=a.style?parseFloat(a.style[mxConstants.STYLE_ROUTING_CENTER_X])||0:0;return a.getCenterX()+b*a.width};
mxGraphView.prototype.getRoutingCenterY=function(a){var b=null!=a.style?parseFloat(a.style[mxConstants.STYLE_ROUTING_CENTER_Y])||0:0;return a.getCenterY()+b*a.height};mxGraphView.prototype.getPerimeterBounds=function(a,b){b=null!=b?b:0;null!=a&&(b+=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]||0));return a.getPerimeterBounds(b*this.scale)};
mxGraphView.prototype.getPerimeterFunction=function(a){a=a.style[mxConstants.STYLE_PERIMETER];if("string"==typeof a){var b=mxStyleRegistry.getValue(a);null==b&&this.isAllowEval()&&(b=mxUtils.eval(a));a=b}return"function"==typeof a?a:null};mxGraphView.prototype.getNextPoint=function(a,b,c){a=a.absolutePoints;var d=null;null!=a&&2<=a.length&&(d=a.length,d=a[c?Math.min(1,d-1):Math.max(0,d-2)]);null==d&&null!=b&&(d=new mxPoint(b.getCenterX(),b.getCenterY()));return d};
-mxGraphView.prototype.getVisibleTerminal=function(a,b){for(var c=this.graph.getModel(),d=c.getTerminal(a,b),e=d;null!=d&&d!=this.currentRoot;){if(!this.graph.isCellVisible(e)||this.isCellCollapsed(d))e=d;d=c.getParent(d)}c.getParent(e)==c.getRoot()&&(e=null);return e};
+mxGraphView.prototype.getVisibleTerminal=function(a,b){for(var c=this.graph.getModel(),d=c.getTerminal(a,b),e=d;null!=d&&d!=this.currentRoot;){if(!this.graph.isCellVisible(e)||this.isCellCollapsed(d))e=d;d=c.getParent(d)}if(c.getParent(e)==c.getRoot()||e==this.currentRoot)e=null;return e};
mxGraphView.prototype.updateEdgeBounds=function(a){var b=a.absolutePoints,c=b[0],d=b[b.length-1];if(c.x!=d.x||c.y!=d.y){var e=d.x-c.x,f=d.y-c.y;a.terminalDistance=Math.sqrt(e*e+f*f)}else a.terminalDistance=0;var d=0,g=[],f=c;if(null!=f){for(var c=f.x,k=f.y,l=c,m=k,n=1;n<b.length;n++){var p=b[n];null!=p&&(e=f.x-p.x,f=f.y-p.y,e=Math.sqrt(e*e+f*f),g.push(e),d+=e,f=p,c=Math.min(f.x,c),k=Math.min(f.y,k),l=Math.max(f.x,l),m=Math.max(f.y,m))}a.length=d;a.segments=g;a.x=c;a.y=k;a.width=Math.max(1,l-c);a.height=
Math.max(1,m-k)}};
mxGraphView.prototype.getPoint=function(a,b){var c=a.getCenterX(),d=a.getCenterY();if(null==a.segments||null!=b&&!b.relative)null!=b&&(m=b.offset,null!=m&&(c+=m.x,d+=m.y));else{for(var e=a.absolutePoints.length,f=Math.round(((null!=b?b.x/2:0)+.5)*a.length),g=a.segments[0],k=0,l=1;f>=Math.round(k+g)&&l<e-1;)k+=g,g=a.segments[l++];e=0==g?0:(f-k)/g;f=a.absolutePoints[l-1];l=a.absolutePoints[l];if(null!=f&&null!=l){k=c=d=0;if(null!=b){var d=b.y,m=b.offset;null!=m&&(c=m.x,k=m.y)}m=l.x-f.x;l=l.y-f.y;c=
@@ -7394,21 +7394,22 @@ DrawioFile=function(a,c){mxEventSource.call(this);this.ui=a;this.shadowData=this
DrawioFile.prototype.shadowData=null;DrawioFile.prototype.shadowPages=null;DrawioFile.prototype.changeListenerEnabled=!0;DrawioFile.prototype.lastAutosaveRevision=null;DrawioFile.prototype.maxAutosaveRevisionDelay=18E5;DrawioFile.prototype.inConflictState=!1;DrawioFile.prototype.invalidChecksum=!1;DrawioFile.prototype.reportEnabled=!0;
DrawioFile.prototype.stats={joined:0,merged:0,reload:0,checksumErrors:0,bytesSent:0,bytesReceived:0,msgSent:0,msgReceived:0,cacheHits:0,cacheMiss:0,cacheFail:0,conflicts:0,timeouts:0};DrawioFile.prototype.getSize=function(){return null!=this.data?this.data.length:0};DrawioFile.prototype.synchronizeFile=function(a,c){this.savingFile?null!=c&&c({message:mxResources.get("busy")}):null!=this.sync?this.sync.fileChanged(a,c):this.updateFile(a,c)};
DrawioFile.prototype.updateFile=function(a,c,b){this.getLatestVersion(mxUtils.bind(this,function(d){try{null!=b&&b()||(null!=d?this.mergeFile(d,a,c):this.reloadFile(a,c))}catch(e){null!=c&&c(e)}}),c)};
-DrawioFile.prototype.mergeFile=function(a,c,b){try{var d=null!=this.shadowPages?this.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.shadowData).documentElement);this.checkShadow(d);this.shadowPages=this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement);this.backupPatch=this.isModified()?this.ui.diffPages(d,this.ui.pages):null;var e=[this.ui.diffPages(d,this.shadowPages)];if(!this.ignorePatches(e)){var g=this.ui.patchPages(d,e[0]),d={},k=this.ui.getHashValueForPages(g,d),l={},
-n=this.ui.getHashValueForPages(this.shadowPages,l);"1"==urlParams.test&&EditorUi.debug("File.mergeFile",[this],"backup",this.backupPatch,"patches",e,"checksum",n==k,k);if(null!=k&&k!=n){var f=this.compressReportData(this.getAnonymizedXmlForPages(g));this.checksumError(b,e,"Checksum: "+k+(null!=d?"\nDetails: "+JSON.stringify(d):"")+"\nCurrent: "+n+(null!=l?"\nCurrent Details: "+JSON.stringify(l):"")+"\nPatched:\n"+f);return}this.patch(e,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null);this.checkPages()}this.inConflictState=
-this.invalidChecksum=!1;this.setDescriptor(a.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=c&&c()}catch(h){this.invalidChecksum=this.inConflictState=!0;null!=b&&b(h);try{this.sendErrorReport("Error in mergeFile",null,h)}catch(m){}}};
+DrawioFile.prototype.mergeFile=function(a,c,b){try{var d=null!=this.shadowPages?this.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.shadowData).documentElement);this.checkShadow(d);this.shadowPages=this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement);this.backupPatch=this.isModified()?this.ui.diffPages(d,this.ui.pages):null;var e=[this.ui.diffPages(d,this.shadowPages)];if(!this.ignorePatches(e)){var g=this.ui.patchPages(d,e[0]),d={},h=this.ui.getHashValueForPages(g,d),l={},
+m=this.ui.getHashValueForPages(this.shadowPages,l);"1"==urlParams.test&&EditorUi.debug("File.mergeFile",[this],"backup",this.backupPatch,"patches",e,"checksum",m==h,h);if(null!=h&&h!=m){var f=this.compressReportData(this.getAnonymizedXmlForPages(g));this.checksumError(b,e,"Checksum: "+h+(null!=d?"\nDetails: "+JSON.stringify(d):"")+"\nCurrent: "+m+(null!=l?"\nCurrent Details: "+JSON.stringify(l):"")+"\nPatched:\n"+f);return}this.patch(e,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null);this.checkPages()}this.inConflictState=
+this.invalidChecksum=!1;this.setDescriptor(a.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=c&&c()}catch(k){this.invalidChecksum=this.inConflictState=!0;null!=b&&b(k);try{this.sendErrorReport("Error in mergeFile",null,k)}catch(n){}}};
DrawioFile.prototype.getAnonymizedXmlForPages=function(a){var c=new mxCodec(mxUtils.createXmlDocument()),b=c.document.createElement("mxfile");if(null!=a)for(var d=0;d<a.length;d++){var e=this.ui.anonymizeNode(c.encode(new mxGraphModel(a[d].root)));e.setAttribute("id",a[d].getId());a[d].viewState&&this.ui.editor.graph.saveViewState(a[d].viewState,e,!0);b.appendChild(e)}return mxUtils.getPrettyXml(b)};
DrawioFile.prototype.checkPages=function(){this.ui.getCurrentFile()!=this||null!=this.ui.pages&&0!=this.ui.pages.length||this.sendErrorReport("Pages is null or empty","ShadowPages: "+(null!=this.shadowPages)+"\nShadowData: "+(null!=this.shadowData))};
DrawioFile.prototype.checkShadow=function(a){if(null==a||0==a.length){var c=null==this.shadowData?"null":this.compressReportData(this.ui.anonymizeString(this.shadowData),null,5E3);this.sendErrorReport("Shadow is null or empty","Shadow: "+(null!=a?a.length:"null")+"\nShadowPages: "+(null!=this.shadowPages?this.shadowPages.length:"null")+"\nShadowData: "+c)}};
DrawioFile.prototype.compressReportData=function(a,c,b){null!=a&&a.length>(null!=c?c:1E4)&&(a=this.ui.editor.graph.compress(a)+"\n");null!=b&&null!=a&&a.length>b&&(a=a.substring(0,b)+"[...]");return a};
-DrawioFile.prototype.checksumError=function(a,c,b){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=a&&a();try{if(null!=c)for(a=0;a<c.length;a++)this.ui.anonymizePatch(c[a]);var d=this.compressReportData(this.getAnonymizedXmlForPages(this.shadowPages),2E4),e=this.compressReportData(JSON.stringify(c,null,2));this.sendErrorReport("Checksum Error",(null!=b?b:"")+"\n\nPatches:\n"+e+"\n\nData:\n"+d)}catch(g){}};
-DrawioFile.prototype.sendErrorReport=function(a,c,b){try{var d=this.getCurrentUser(),e=null!=d?this.ui.hashValue(d.id):"unknown",g=null!=this.sync?this.sync.clientId:"no sync";null!=this.stats.start&&(this.stats.uptime=Math.round(((new Date).getTime()-(new Date(this.stats.start)).getTime())/1E3));var k=this.getTitle(),l=k.lastIndexOf("."),d="xml";0<l&&(d=k.substring(l));var n=null!=b?b.stack:Error().stack;EditorUi.sendReport(a+" "+(new Date).toISOString()+":\n\nBrowser="+navigator.userAgent+"\nFile="+
-this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+d+")\nUser="+e+" ("+g+")\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\nSync="+DrawioFile.SYNC+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=c?"\n\n"+c:"")+"\n\nStack:\n"+n)}catch(f){}};
+DrawioFile.prototype.checksumError=function(a,c,b,d){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=a&&a();try{if(null!=c)for(a=0;a<c.length;a++)this.ui.anonymizePatch(c[a]);var e=mxUtils.bind(this,function(a){var d=this.compressReportData(this.getAnonymizedXmlForPages(this.shadowPages),25E3),e=this.compressReportData(JSON.stringify(c,null,2));a=null!=a?this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement)),
+25E3):"n/a";this.sendErrorReport("Checksum Error",(null!=b?b:"")+"\n\nPatches:\n"+e+"\n\nLocal:\n"+d+(null!=a?"\nRemote:\n"+a:""),null,7E4)});null==d?e(null):this.getLatestVersion(mxUtils.bind(this,function(a){null!=a&&a.getCurrentEtag()==d?e(a):e(null)}),function(){})}catch(g){}};
+DrawioFile.prototype.sendErrorReport=function(a,c,b,d){try{var e=this.getCurrentUser(),g=null!=e?this.ui.hashValue(e.id):"unknown",h=null!=this.sync?this.sync.clientId:"no sync";null!=this.stats.start&&(this.stats.uptime=Math.round(((new Date).getTime()-(new Date(this.stats.start)).getTime())/1E3));var l=this.getTitle(),m=l.lastIndexOf("."),e="xml";0<m&&(e=l.substring(m));var f=null!=b?b.stack:Error().stack;EditorUi.sendReport(a+" "+(new Date).toISOString()+":\n\nBrowser="+navigator.userAgent+"\nFile="+
+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+e+")\nUser="+g+" ("+h+")\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\nSync="+DrawioFile.SYNC+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=c?"\n\n"+c:"")+"\n\nStack:\n"+f,d)}catch(k){}};
DrawioFile.prototype.reloadFile=function(a,c){try{this.ui.spinner.stop();var b=mxUtils.bind(this,function(){this.stats.reload++;this.reportEnabled=!1;var b=this.ui.editor.graph.getViewState(),c=this.ui.editor.graph.getSelectionCells(),g=this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(g,b,c);null!=this.backupPatch&&this.patch([this.backupPatch]);var d=this.ui.getCurrentFile();null!=d&&(d.stats=this.stats);
null!=a&&a()}}),!0)});this.isModified()&&null==this.backupPatch?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.handleFileSuccess("manual"==DrawioFile.SYNC)}),b,mxResources.get("cancel"),mxResources.get("discardChanges")):b()}catch(d){null!=c&&c(d)}};DrawioFile.prototype.copyFile=function(a,c){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};
DrawioFile.prototype.ignorePatches=function(a){for(var c=!0,b=0;b<a.length&&c;b++)c=c&&0==Object.keys(a[b]).length;return c};
-DrawioFile.prototype.patch=function(a,c){var b=this.ui.editor.undoManager,d=b.history.slice(),e=b.indexOfNextAdd,g=this.ui.editor.graph;g.container.style.visibility="hidden";var k=this.changeListenerEnabled;this.changeListenerEnabled=!1;var l=g.foldingEnabled,n=g.mathEnabled,f=g.cellRenderer.redraw;g.cellRenderer.redraw=function(a){a.view.graph.isEditing(a.cell)&&(a.view.graph.scrollCellToVisible(a.cell),a.view.graph.cellEditor.resize());f.apply(this,arguments)};g.model.beginUpdate();try{for(var h=
-0;h<a.length;h++)this.ui.pages=this.ui.patchPages(this.ui.pages,a[h],!0,c,this.isModified());0==this.ui.pages.length&&this.ui.pages.push(this.ui.createPage());0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{g.model.endUpdate();g.container.style.visibility="";g.cellRenderer.redraw=f;this.changeListenerEnabled=k;b.history=d;b.indexOfNextAdd=e;b.fireEvent(new mxEventObject(mxEvent.CLEAR));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)n!=
+DrawioFile.prototype.patch=function(a,c){var b=this.ui.editor.undoManager,d=b.history.slice(),e=b.indexOfNextAdd,g=this.ui.editor.graph;g.container.style.visibility="hidden";var h=this.changeListenerEnabled;this.changeListenerEnabled=!1;var l=g.foldingEnabled,m=g.mathEnabled,f=g.cellRenderer.redraw;g.cellRenderer.redraw=function(a){a.view.graph.isEditing(a.cell)&&(a.view.graph.scrollCellToVisible(a.cell),a.view.graph.cellEditor.resize());f.apply(this,arguments)};g.model.beginUpdate();try{for(var k=
+0;k<a.length;k++)this.ui.pages=this.ui.patchPages(this.ui.pages,a[k],!0,c,this.isModified());0==this.ui.pages.length&&this.ui.pages.push(this.ui.createPage());0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{g.model.endUpdate();g.container.style.visibility="";g.cellRenderer.redraw=f;this.changeListenerEnabled=h;b.history=d;b.indexOfNextAdd=e;b.fireEvent(new mxEventObject(mxEvent.CLEAR));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)m!=
g.mathEnabled?(this.ui.editor.updateGraphComponents(),g.refresh()):(l!=g.foldingEnabled?g.view.revalidate():g.view.validate(),g.sizeDidChange()),null!=this.ui.format&&g.isSelectionEmpty()&&this.ui.format.refresh();this.ui.updateTabContainer()}};
DrawioFile.prototype.save=function(a,c,b,d,e,g){if(this.isEditable())if(!e&&this.invalidChecksum)if(null!=b)b({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave();else if(null!=b)b({message:mxResources.get("readOnly")});else throw Error(mxResources.get("readOnly"));};DrawioFile.prototype.updateFileData=function(){this.setData(this.ui.getFileData(null,null,null,null,null,null,null,null,this))};
DrawioFile.prototype.saveAs=function(a,c,b){};DrawioFile.prototype.saveFile=function(a,c,b,d){};DrawioFile.prototype.getPublicUrl=function(a){a(null)};DrawioFile.prototype.isRestricted=function(){return!1};DrawioFile.prototype.isModified=function(){return this.modified};DrawioFile.prototype.setModified=function(a){this.modified=a};DrawioFile.prototype.isAutosaveOptional=function(){return!1};DrawioFile.prototype.isAutosave=function(){return!this.inConflictState&&this.ui.editor.autosave};
@@ -7457,280 +7458,280 @@ StorageFile.prototype.open=function(){DrawioFile.prototype.open.apply(this,argum
StorageLibrary.prototype.isRenamable=function(a,c,b){return".scratchpad"!=this.title};StorageLibrary.prototype.open=function(){};UrlLibrary=function(a,c,b){StorageFile.call(this,a,c,b);a=b;c=a.lastIndexOf("/");0<=c&&(a=a.substring(c+1));this.fname=a};mxUtils.extend(UrlLibrary,StorageFile);UrlLibrary.prototype.getHash=function(){return"U"+encodeURIComponent(this.title)};UrlLibrary.prototype.getTitle=function(){return this.fname};UrlLibrary.prototype.isAutosave=function(){return!1};UrlLibrary.prototype.isEditable=function(a,c,b){return!1};UrlLibrary.prototype.saveAs=function(a,c,b){};UrlLibrary.prototype.open=function(){};var StorageDialog=function(a,c,b){function d(d,e,t,g,p,q){function D(){mxEvent.addListener(v,"click",null!=q?q:function(){t!=App.MODE_GOOGLE||a.isDriveDomain()?t==App.MODE_GOOGLE&&a.spinner.spin(document.body,mxResources.get("authorizing"))?a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();a.setMode(t,f.checked);c()})):(a.setMode(t,f.checked),c()):window.location.hostname=DriveClient.prototype.newAppHostname})}var v=document.createElement("a");v.style.overflow="hidden";v.style.display=
mxClient.IS_QUIRKS?"inline":"inline-block";v.className="geBaseButton";v.style.boxSizing="border-box";v.style.fontSize="11px";v.style.position="relative";v.style.margin="4px";v.style.padding="8px 10px 12px 10px";v.style.width="88px";v.style.height="100px";v.style.whiteSpace="nowrap";v.setAttribute("title",e);mxClient.IS_QUIRKS&&(v.style.cssFloat="left",v.style.zoom="1");var u=document.createElement("div");u.style.textOverflow="ellipsis";u.style.overflow="hidden";if(null!=d){var w=document.createElement("img");
w.setAttribute("src",d);w.setAttribute("border","0");w.setAttribute("align","absmiddle");w.style.width="60px";w.style.height="60px";w.style.paddingBottom="6px";v.appendChild(w)}else u.style.paddingTop="5px",u.style.whiteSpace="normal",mxClient.IS_IOS?(v.style.padding="0px 10px 20px 10px",v.style.top="6px"):mxClient.IS_FF&&(u.style.paddingTop="0px",u.style.marginTop="-2px");v.appendChild(u);mxUtils.write(u,e);if(null!=p)for(d=0;d<p.length;d++)mxUtils.br(u),mxUtils.write(u,p[d]);if(null!=g&&null==a[g]){w.style.visibility=
-"hidden";mxUtils.setOpacity(u,10);var k=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"dark"==uiTheme?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});k.spin(v);var C=window.setTimeout(function(){null==a[g]&&(k.stop(),v.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[g]&&(window.clearTimeout(C),mxUtils.setOpacity(u,100),w.style.visibility="",k.stop(),D(),"drive"==g&&null!=m.parentNode&&m.parentNode.removeChild(m))}))}else D();
-n.appendChild(v);++h>=b&&(mxUtils.br(n),h=0)}b=null!=b?b:2;var e=document.createElement("div");e.style.textAlign="center";e.style.whiteSpace="nowrap";e.style.paddingTop="0px";e.style.paddingBottom="20px";var g=a.addLanguageMenu(e,!0);null!=g&&(g.style.bottom=parseInt("28px")-2+"px");if(!a.isOffline()&&1<a.getServiceCount()){g=document.createElement("a");g.setAttribute("href","https://about.draw.io/support/");g.setAttribute("title",mxResources.get("help"));g.setAttribute("target","_blank");g.style.position=
-"absolute";g.style.textDecoration="none";g.style.cursor="pointer";g.style.fontSize="12px";g.style.bottom="28px";g.style.left="26px";g.style.color="gray";var k=document.createElement("img");mxUtils.setOpacity(k,50);k.style.height="16px";k.style.width="16px";k.setAttribute("border","0");k.setAttribute("valign","bottom");k.setAttribute("src",Editor.helpImage);k.style.marginRight="2px";g.appendChild(k);mxUtils.write(g,mxResources.get("help"));e.appendChild(g)}var l=document.createElement("div");l.style.position=
+"hidden";mxUtils.setOpacity(u,10);var h=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"dark"==uiTheme?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});h.spin(v);var B=window.setTimeout(function(){null==a[g]&&(h.stop(),v.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[g]&&(window.clearTimeout(B),mxUtils.setOpacity(u,100),w.style.visibility="",h.stop(),D(),"drive"==g&&null!=n.parentNode&&n.parentNode.removeChild(n))}))}else D();
+m.appendChild(v);++k>=b&&(mxUtils.br(m),k=0)}b=null!=b?b:2;var e=document.createElement("div");e.style.textAlign="center";e.style.whiteSpace="nowrap";e.style.paddingTop="0px";e.style.paddingBottom="20px";var g=a.addLanguageMenu(e,!0);null!=g&&(g.style.bottom=parseInt("28px")-2+"px");if(!a.isOffline()&&1<a.getServiceCount()){g=document.createElement("a");g.setAttribute("href","https://about.draw.io/support/");g.setAttribute("title",mxResources.get("help"));g.setAttribute("target","_blank");g.style.position=
+"absolute";g.style.textDecoration="none";g.style.cursor="pointer";g.style.fontSize="12px";g.style.bottom="28px";g.style.left="26px";g.style.color="gray";var h=document.createElement("img");mxUtils.setOpacity(h,50);h.style.height="16px";h.style.width="16px";h.setAttribute("border","0");h.setAttribute("valign","bottom");h.setAttribute("src",Editor.helpImage);h.style.marginRight="2px";g.appendChild(h);mxUtils.write(g,mxResources.get("help"));e.appendChild(g)}var l=document.createElement("div");l.style.position=
"absolute";l.style.cursor="pointer";l.style.fontSize="12px";l.style.bottom="28px";l.style.color="gray";mxUtils.write(l,mxResources.get("decideLater"));a.isOfflineApp()?l.style.right="20px":(mxUtils.setPrefixedStyle(l.style,"transform","translate(-50%,0)"),l.style.left="50%");this.init=function(){if(mxClient.IS_QUIRKS||8==document.documentMode)l.style.marginLeft=-Math.round(l.clientWidth/2)+"px"};e.appendChild(l);mxEvent.addListener(l,"click",function(){a.hideDialog();var b=Editor.useLocalStorage;
-a.createFile(a.defaultFilename,null,null,null,null,null,null,!0);Editor.useLocalStorage=b});var n=document.createElement("div");mxClient.IS_QUIRKS&&(n.style.whiteSpace="nowrap",n.style.cssFloat="left");n.style.border="1px solid #d3d3d3";n.style.borderWidth="1px 0px 1px 0px";n.style.padding="12px 0px 12px 0px";var f=document.createElement("input");f.setAttribute("type","checkbox");f.setAttribute("checked","checked");f.defaultChecked=!0;var h=0,m=document.createElement("p"),g=document.createElement("p");
+a.createFile(a.defaultFilename,null,null,null,null,null,null,!0);Editor.useLocalStorage=b});var m=document.createElement("div");mxClient.IS_QUIRKS&&(m.style.whiteSpace="nowrap",m.style.cssFloat="left");m.style.border="1px solid #d3d3d3";m.style.borderWidth="1px 0px 1px 0px";m.style.padding="12px 0px 12px 0px";var f=document.createElement("input");f.setAttribute("type","checkbox");f.setAttribute("checked","checked");f.defaultChecked=!0;var k=0,n=document.createElement("p"),g=document.createElement("p");
g.style.fontSize="16pt";g.style.padding="0px";g.style.paddingTop="4px";g.style.paddingBottom="16px";g.style.margin="0px";g.style.color="gray";mxUtils.write(g,mxResources.get("saveDiagramsTo")+":");e.appendChild(g);"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");mxClient.IS_IOS&&"device"!=
-urlParams.storage||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);e.appendChild(n);g=document.createElement("p");g.style.marginTop="12px";g.style.marginBottom="6px";g.appendChild(f);k=document.createElement("span");k.style.color="gray";k.style.fontSize="12px";mxUtils.write(k," "+mxResources.get("rememberThisSetting"));g.appendChild(k);
+urlParams.storage||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);e.appendChild(m);g=document.createElement("p");g.style.marginTop="12px";g.style.marginBottom="6px";g.appendChild(f);h=document.createElement("span");h.style.color="gray";h.style.fontSize="12px";mxUtils.write(h," "+mxResources.get("rememberThisSetting"));g.appendChild(h);
mxUtils.br(g);var p=a.getRecent();if(null!=p&&0<p.length){var q=document.createElement("select");q.style.marginTop="8px";q.style.width="140px";var u=document.createElement("option");u.setAttribute("value","");u.setAttribute("selected","selected");u.style.textAlign="center";mxUtils.write(u,mxResources.get("openRecent")+"...");q.appendChild(u);for(u=0;u<p.length;u++)(function(a){var b=a.mode;b==App.MODE_GOOGLE?b="googleDrive":b==App.MODE_ONEDRIVE&&(b="oneDrive");var c=document.createElement("option");
-c.setAttribute("value",a.id);mxUtils.write(c,a.title+" ("+mxResources.get(b)+")");q.appendChild(c)})(p[u]);g.appendChild(q);mxEvent.addListener(q,"change",function(b){""!=q.value&&a.loadFile(q.value)})}else g.style.marginTop="20px",n.style.padding="30px 0px 26px 0px";!Graph.fileSupport||mxClient.IS_IE||mxClient.IS_IE11||(p=document.createElement("div"),p.style.cursor="pointer",p.style.padding="18px 0px 6px 0px",p.style.fontSize="12px",p.style.color="gray",mxUtils.write(p,mxResources.get("import")+
-": "+mxResources.get("gliffy")+", "+mxResources.get("formatVssx")+", "+mxResources.get("formatVsdx")+", "+mxResources.get("lucidchart")+"..."),mxEvent.addListener(p,"click",function(){var b=document.createElement("input");b.setAttribute("type","file");mxEvent.addListener(b,"change",function(){null!=b.files&&(a.hideDialog(),a.openFiles(b.files,!0))});b.click()}),g.appendChild(p),n.style.paddingBottom="4px");n.appendChild(g);mxEvent.addListener(k,"click",function(a){f.checked=!f.checked;mxEvent.consume(a)});
-mxClient.IS_SVG&&isLocalStorage&&"0"!=urlParams.gapi&&(null==document.documentMode||10<=document.documentMode)&&window.setTimeout(function(){null==a.drive&&(m.style.padding="8px",m.style.fontSize="9pt",m.style.marginTop="-14px",m.innerHTML='<a style="background-color:#dcdcdc;padding:5px;color:black;text-decoration:none;" href="https://plus.google.com/u/0/+DrawIo1/posts/1HTrfsb5wDN" target="_blank"><img border="0" src="'+mxGraph.prototype.warningImage.src+'" align="top"> '+mxResources.get("googleDriveMissingClickHere")+
-"</a>",e.appendChild(m))},5E3);this.container=e},SplashDialog=function(a){var c=document.createElement("div");c.style.textAlign="center";a.addLanguageMenu(c,!0);var b=null,b=a.getServiceCount();if(!a.isOffline()&&1<b){b=document.createElement("a");b.setAttribute("href","https://about.draw.io/support/");b.setAttribute("title",mxResources.get("help"));b.setAttribute("target","_blank");b.style.position="absolute";b.style.fontSize="12px";b.style.textDecoration="none";b.style.cursor="pointer";b.style.bottom=
+c.setAttribute("value",a.id);mxUtils.write(c,a.title+" ("+mxResources.get(b)+")");q.appendChild(c)})(p[u]);g.appendChild(q);mxEvent.addListener(q,"change",function(b){""!=q.value&&a.loadFile(q.value)})}else g.style.marginTop="20px",m.style.padding="30px 0px 26px 0px";!Graph.fileSupport||mxClient.IS_IE||mxClient.IS_IE11||(p=document.createElement("div"),p.style.cursor="pointer",p.style.padding="18px 0px 6px 0px",p.style.fontSize="12px",p.style.color="gray",mxUtils.write(p,mxResources.get("import")+
+": "+mxResources.get("gliffy")+", "+mxResources.get("formatVssx")+", "+mxResources.get("formatVsdx")+", "+mxResources.get("lucidchart")+"..."),mxEvent.addListener(p,"click",function(){var b=document.createElement("input");b.setAttribute("type","file");mxEvent.addListener(b,"change",function(){null!=b.files&&(a.hideDialog(),a.openFiles(b.files,!0))});b.click()}),g.appendChild(p),m.style.paddingBottom="4px");m.appendChild(g);mxEvent.addListener(h,"click",function(a){f.checked=!f.checked;mxEvent.consume(a)});
+mxClient.IS_SVG&&isLocalStorage&&"0"!=urlParams.gapi&&(null==document.documentMode||10<=document.documentMode)&&window.setTimeout(function(){null==a.drive&&(n.style.padding="8px",n.style.fontSize="9pt",n.style.marginTop="-14px",n.innerHTML='<a style="background-color:#dcdcdc;padding:5px;color:black;text-decoration:none;" href="https://plus.google.com/u/0/+DrawIo1/posts/1HTrfsb5wDN" target="_blank"><img border="0" src="'+mxGraph.prototype.warningImage.src+'" align="top"> '+mxResources.get("googleDriveMissingClickHere")+
+"</a>",e.appendChild(n))},5E3);this.container=e},SplashDialog=function(a){var c=document.createElement("div");c.style.textAlign="center";a.addLanguageMenu(c,!0);var b=null,b=a.getServiceCount();if(!a.isOffline()&&1<b){b=document.createElement("a");b.setAttribute("href","https://about.draw.io/support/");b.setAttribute("title",mxResources.get("help"));b.setAttribute("target","_blank");b.style.position="absolute";b.style.fontSize="12px";b.style.textDecoration="none";b.style.cursor="pointer";b.style.bottom=
"22px";b.style.left="26px";b.style.color="gray";var d=document.createElement("img");mxUtils.setOpacity(d,50);d.style.height="16px";d.style.width="16px";d.setAttribute("border","0");d.setAttribute("valign","bottom");d.setAttribute("src",Editor.helpImage);d.style.marginRight="2px";b.appendChild(d);mxUtils.write(b,mxResources.get("help"));c.appendChild(b)}b=document.createElement("p");b.style.fontSize="16pt";b.style.padding="0px";b.style.paddingTop="2px";b.style.margin="0px";b.style.color="gray";d=document.createElement("img");
d.setAttribute("border","0");d.setAttribute("align","absmiddle");d.style.width="40px";d.style.height="40px";d.style.marginRight="12px";d.style.paddingBottom="4px";var e="";a.mode==App.MODE_GOOGLE?(d.src=IMAGE_PATH+"/google-drive-logo.svg",e=mxResources.get("googleDrive")):a.mode==App.MODE_DROPBOX?(d.src=IMAGE_PATH+"/dropbox-logo.svg",e=mxResources.get("dropbox")):a.mode==App.MODE_ONEDRIVE?(d.src=IMAGE_PATH+"/onedrive-logo.svg",e=mxResources.get("oneDrive")):a.mode==App.MODE_GITHUB?(d.src=IMAGE_PATH+
-"/github-logo.svg",e=mxResources.get("github")):a.mode==App.MODE_TRELLO?(d.src=IMAGE_PATH+"/trello-logo.svg",e=mxResources.get("trello")):a.mode==App.MODE_BROWSER?(d.src=IMAGE_PATH+"/osa_database.png",e=mxResources.get("browser")):(d.src=IMAGE_PATH+"/osa_drive-harddisk.png",e=mxResources.get("device"));var g=document.createElement("div");g.style.margin="4px 0px 0px 0px";var k=document.createElement("button");k.className="geBigButton";k.style.overflow="hidden";k.style.width="340px";mxClient.IS_CHROMEAPP||
-EditorUi.isElectronApp?(g.style.padding="42px 0px 56px 0px",k.style.marginBottom="12px"):(b.appendChild(d),mxUtils.write(b,e),c.appendChild(b),g.style.border="1px solid #d3d3d3",g.style.borderWidth="1px 0px 1px 0px",g.style.padding="18px 0px 24px 0px",k.style.marginBottom="8px");mxClient.IS_QUIRKS&&(g.style.whiteSpace="nowrap",g.style.cssFloat="left");mxClient.IS_QUIRKS&&(k.style.width="340px");mxUtils.write(k,mxResources.get("createNewDiagram"));mxEvent.addListener(k,"click",function(){a.hideDialog();
-a.actions.get("new").funct()});g.appendChild(k);mxUtils.br(g);k=document.createElement("button");k.className="geBigButton";k.style.marginBottom="22px";k.style.overflow="hidden";k.style.width="340px";mxClient.IS_QUIRKS&&(k.style.width="340px");mxUtils.write(k,mxResources.get("openExistingDiagram"));mxEvent.addListener(k,"click",function(){a.actions.get("open").funct()});g.appendChild(k);b="undefined";a.mode==App.MODE_GOOGLE?b=mxResources.get("googleDrive"):a.mode==App.MODE_DROPBOX?b=mxResources.get("dropbox"):
-a.mode==App.MODE_ONEDRIVE?b=mxResources.get("oneDrive"):a.mode==App.MODE_GITHUB?b=mxResources.get("github"):a.mode==App.MODE_TRELLO?b=mxResources.get("trello"):a.mode==App.MODE_DEVICE?b=mxResources.get("device"):a.mode==App.MODE_BROWSER&&(b=mxResources.get("browser"));mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(e=function(b){k.style.marginBottom="24px";var c=document.createElement("a");c.setAttribute("href","javascript:void(0)");c.style.display="inline-block";c.style.marginTop="6px";mxUtils.write(c,
-mxResources.get("signOut"));k.style.marginBottom="16px";g.style.paddingBottom="18px";mxEvent.addListener(c,"click",function(){a.confirm(mxResources.get("areYouSure"),function(){b()})});g.appendChild(c)},d=null!=a.drive?a.drive.getUser():null,a.mode==App.MODE_GOOGLE&&null!=d?(k.style.marginBottom="24px",e=document.createElement("a"),e.setAttribute("href","javascript:void(0)"),e.style.display="inline-block",e.style.marginTop="6px",mxUtils.write(e,mxResources.get("changeUser")+" ("+d.displayName+")"),
-k.style.marginBottom="16px",g.style.paddingBottom="18px",mxEvent.addListener(e,"click",function(){a.hideDialog();a.drive.clearUserId();a.drive.setUser(null);gapi.auth.signOut();a.setMode(App.MODE_GOOGLE);a.hideDialog();a.showSplash();a.drive.authorize(!1,mxUtils.bind(this,mxUtils.bind(this,function(){a.hideDialog();a.showSplash()})),mxUtils.bind(this,function(b){a.handleError(b,null,function(){a.hideDialog();a.showSplash()})}))}),g.appendChild(e)):a.mode==App.MODE_ONEDRIVE&&null!=a.oneDrive?e(function(){a.oneDrive.logout()}):
+"/github-logo.svg",e=mxResources.get("github")):a.mode==App.MODE_TRELLO?(d.src=IMAGE_PATH+"/trello-logo.svg",e=mxResources.get("trello")):a.mode==App.MODE_BROWSER?(d.src=IMAGE_PATH+"/osa_database.png",e=mxResources.get("browser")):(d.src=IMAGE_PATH+"/osa_drive-harddisk.png",e=mxResources.get("device"));var g=document.createElement("div");g.style.margin="4px 0px 0px 0px";var h=document.createElement("button");h.className="geBigButton";h.style.overflow="hidden";h.style.width="340px";mxClient.IS_CHROMEAPP||
+EditorUi.isElectronApp?(g.style.padding="42px 0px 56px 0px",h.style.marginBottom="12px"):(b.appendChild(d),mxUtils.write(b,e),c.appendChild(b),g.style.border="1px solid #d3d3d3",g.style.borderWidth="1px 0px 1px 0px",g.style.padding="18px 0px 24px 0px",h.style.marginBottom="8px");mxClient.IS_QUIRKS&&(g.style.whiteSpace="nowrap",g.style.cssFloat="left");mxClient.IS_QUIRKS&&(h.style.width="340px");mxUtils.write(h,mxResources.get("createNewDiagram"));mxEvent.addListener(h,"click",function(){a.hideDialog();
+a.actions.get("new").funct()});g.appendChild(h);mxUtils.br(g);h=document.createElement("button");h.className="geBigButton";h.style.marginBottom="22px";h.style.overflow="hidden";h.style.width="340px";mxClient.IS_QUIRKS&&(h.style.width="340px");mxUtils.write(h,mxResources.get("openExistingDiagram"));mxEvent.addListener(h,"click",function(){a.actions.get("open").funct()});g.appendChild(h);b="undefined";a.mode==App.MODE_GOOGLE?b=mxResources.get("googleDrive"):a.mode==App.MODE_DROPBOX?b=mxResources.get("dropbox"):
+a.mode==App.MODE_ONEDRIVE?b=mxResources.get("oneDrive"):a.mode==App.MODE_GITHUB?b=mxResources.get("github"):a.mode==App.MODE_TRELLO?b=mxResources.get("trello"):a.mode==App.MODE_DEVICE?b=mxResources.get("device"):a.mode==App.MODE_BROWSER&&(b=mxResources.get("browser"));mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(e=function(b){h.style.marginBottom="24px";var c=document.createElement("a");c.setAttribute("href","javascript:void(0)");c.style.display="inline-block";c.style.marginTop="6px";mxUtils.write(c,
+mxResources.get("signOut"));h.style.marginBottom="16px";g.style.paddingBottom="18px";mxEvent.addListener(c,"click",function(){a.confirm(mxResources.get("areYouSure"),function(){b()})});g.appendChild(c)},d=null!=a.drive?a.drive.getUser():null,a.mode==App.MODE_GOOGLE&&null!=d?(h.style.marginBottom="24px",e=document.createElement("a"),e.setAttribute("href","javascript:void(0)"),e.style.display="inline-block",e.style.marginTop="6px",mxUtils.write(e,mxResources.get("changeUser")+" ("+d.displayName+")"),
+h.style.marginBottom="16px",g.style.paddingBottom="18px",mxEvent.addListener(e,"click",function(){a.hideDialog();a.drive.clearUserId();a.drive.setUser(null);gapi.auth.signOut();a.setMode(App.MODE_GOOGLE);a.hideDialog();a.showSplash();a.drive.authorize(!1,mxUtils.bind(this,mxUtils.bind(this,function(){a.hideDialog();a.showSplash()})),mxUtils.bind(this,function(b){a.handleError(b,null,function(){a.hideDialog();a.showSplash()})}))}),g.appendChild(e)):a.mode==App.MODE_ONEDRIVE&&null!=a.oneDrive?e(function(){a.oneDrive.logout()}):
a.mode==App.MODE_GITHUB&&null!=a.gitHub?e(function(){a.gitHub.logout();a.openLink("https://www.github.com/logout")}):a.mode==App.MODE_TRELLO&&null!=a.trello?a.trello.isAuthorized()&&e(function(){a.trello.logout()}):a.mode==App.MODE_DROPBOX&&null!=a.dropbox&&e(function(){a.dropbox.logout();a.openLink("https://www.dropbox.com/logout")}),mxUtils.br(g),e=document.createElement("a"),e.setAttribute("href","javascript:void(0)"),e.style.display="inline-block",e.style.marginTop="8px",mxUtils.write(e,mxResources.get("notUsingService",
-[b])),mxEvent.addListener(e,"click",function(){a.hideDialog(!1);a.setMode(null);a.clearMode();a.showSplash(!0)}),g.appendChild(e));c.appendChild(g);this.container=c},ConfirmDialog=function(a,c,b,d,e,g,k,l,n){var f=document.createElement("div");f.style.textAlign="center";var h=document.createElement("div");h.style.padding="6px";h.style.overflow="auto";h.style.maxHeight="44px";mxClient.IS_QUIRKS&&(h.style.height="60px");mxUtils.write(h,c);f.appendChild(h);h=document.createElement("div");h.style.textAlign=
-"center";h.style.whiteSpace="nowrap";var m=document.createElement("input");m.setAttribute("type","checkbox");g=mxUtils.button(g||mxResources.get("cancel"),function(){a.hideDialog();null!=d&&d(m.checked)});g.className="geBtn";null!=l&&(g.innerHTML=l+"<br>"+g.innerHTML,g.style.paddingBottom="8px",g.style.paddingTop="8px",g.style.height="auto",g.style.width="40%");a.editor.cancelFirst&&h.appendChild(g);var p=mxUtils.button(e||mxResources.get("ok"),function(){a.hideDialog();null!=b&&b(m.checked)});h.appendChild(p);
-null!=k?(p.innerHTML=k+"<br>"+p.innerHTML+"<br>",p.style.paddingBottom="8px",p.style.paddingTop="8px",p.style.height="auto",p.className="geBtn",p.style.width="40%"):p.className="geBtn gePrimaryBtn";a.editor.cancelFirst||h.appendChild(g);f.appendChild(h);n?(h.style.marginTop="10px",h=document.createElement("p"),h.style.marginTop="20px",h.appendChild(m),e=document.createElement("span"),mxUtils.write(e," "+mxResources.get("rememberThisSetting")),h.appendChild(e),f.appendChild(h),mxEvent.addListener(e,
-"click",function(a){m.checked=!m.checked;mxEvent.consume(a)})):h.style.marginTop="16px";this.init=function(){p.focus()};this.container=f},EmbedDialog=function(a,c,b,d,e,g){d=document.createElement("div");var k=/^https?:\/\//.test(c)||/^mailto:\/\//.test(c);null!=g?mxUtils.write(d,g):mxUtils.write(d,mxResources.get(5E5>c.length?k?"link":"mainEmbedNotice":"preview")+":");mxUtils.br(d);g=document.createElement("div");g.style.position="absolute";g.style.top="30px";g.style.right="30px";g.style.color="gray";
+[b])),mxEvent.addListener(e,"click",function(){a.hideDialog(!1);a.setMode(null);a.clearMode();a.showSplash(!0)}),g.appendChild(e));c.appendChild(g);this.container=c},ConfirmDialog=function(a,c,b,d,e,g,h,l,m){var f=document.createElement("div");f.style.textAlign="center";var k=document.createElement("div");k.style.padding="6px";k.style.overflow="auto";k.style.maxHeight="44px";mxClient.IS_QUIRKS&&(k.style.height="60px");mxUtils.write(k,c);f.appendChild(k);k=document.createElement("div");k.style.textAlign=
+"center";k.style.whiteSpace="nowrap";var n=document.createElement("input");n.setAttribute("type","checkbox");g=mxUtils.button(g||mxResources.get("cancel"),function(){a.hideDialog();null!=d&&d(n.checked)});g.className="geBtn";null!=l&&(g.innerHTML=l+"<br>"+g.innerHTML,g.style.paddingBottom="8px",g.style.paddingTop="8px",g.style.height="auto",g.style.width="40%");a.editor.cancelFirst&&k.appendChild(g);var p=mxUtils.button(e||mxResources.get("ok"),function(){a.hideDialog();null!=b&&b(n.checked)});k.appendChild(p);
+null!=h?(p.innerHTML=h+"<br>"+p.innerHTML+"<br>",p.style.paddingBottom="8px",p.style.paddingTop="8px",p.style.height="auto",p.className="geBtn",p.style.width="40%"):p.className="geBtn gePrimaryBtn";a.editor.cancelFirst||k.appendChild(g);f.appendChild(k);m?(k.style.marginTop="10px",k=document.createElement("p"),k.style.marginTop="20px",k.appendChild(n),e=document.createElement("span"),mxUtils.write(e," "+mxResources.get("rememberThisSetting")),k.appendChild(e),f.appendChild(k),mxEvent.addListener(e,
+"click",function(a){n.checked=!n.checked;mxEvent.consume(a)})):k.style.marginTop="16px";this.init=function(){p.focus()};this.container=f},EmbedDialog=function(a,c,b,d,e,g){d=document.createElement("div");var h=/^https?:\/\//.test(c)||/^mailto:\/\//.test(c);null!=g?mxUtils.write(d,g):mxUtils.write(d,mxResources.get(5E5>c.length?h?"link":"mainEmbedNotice":"preview")+":");mxUtils.br(d);g=document.createElement("div");g.style.position="absolute";g.style.top="30px";g.style.right="30px";g.style.color="gray";
mxUtils.write(g,a.formatFileSize(c.length));d.appendChild(g);var l=document.createElement("textarea");l.setAttribute("autocomplete","off");l.setAttribute("autocorrect","off");l.setAttribute("autocapitalize","off");l.setAttribute("spellcheck","false");l.style.marginTop="10px";l.style.resize="none";l.style.height="150px";l.style.width="440px";l.style.border="1px solid gray";l.value=mxResources.get("updatingDocument");d.appendChild(l);mxUtils.br(d);this.init=function(){window.setTimeout(function(){5E5>
-c.length?(l.value=c,l.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?l.select():document.execCommand("selectAll",!1,null)):(l.setAttribute("readonly","true"),l.value=c.substring(0,340)+"... ("+mxResources.get("drawingTooLarge")+")")},0)};g=document.createElement("div");g.style.position="absolute";g.style.bottom="36px";g.style.right="32px";var n=null;!EmbedDialog.showPreviewOption||mxClient.IS_CHROMEAPP&&!k||navigator.standalone||!(k||mxClient.IS_SVG&&(null==document.documentMode||
-9<document.documentMode))||(n=mxUtils.button(mxResources.get(5E5>c.length?"preview":"openInNewWindow"),function(){var f=5E5>c.length?l.value:c;if(null!=e)e(f);else if(k)try{var h=a.openLink(f);null!=h&&(null==b||0<b)&&window.setTimeout(mxUtils.bind(this,function(){null!=h&&null!=h.location.href&&h.location.href.substring(0,8)!=f.substring(0,8)&&(h.close(),a.handleError({message:mxResources.get("drawingTooLarge")}))}),b||500)}catch(u){a.handleError({message:u.message||mxResources.get("drawingTooLarge")})}else{var d=
-window.open().document;d.writeln("<html><head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head><body>'+c+"</body></html>");d.close()}}),n.className="geBtn",g.appendChild(n));if(!k||7500<c.length){var f=mxUtils.button(mxResources.get("download"),function(){a.hideDialog();a.saveData("embed.txt","txt",c,"text/plain")});f.className="geBtn";g.appendChild(f)}if(k&&(!a.isOffline()||mxClient.IS_CHROMEAPP)){if(51200>c.length){var h=mxUtils.button("",function(){try{var b=
-"https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(l.value);a.openLink(b)}catch(p){a.handleError({message:p.message||mxResources.get("drawingTooLarge")})}}),f=document.createElement("img");f.setAttribute("src",Editor.facebookImage);f.setAttribute("width","18");f.setAttribute("height","18");f.setAttribute("border","0");h.appendChild(f);h.setAttribute("title",mxResources.get("facebook")+" ("+a.formatFileSize(51200)+" max)");h.style.verticalAlign="bottom";h.style.paddingTop="4px";h.style.minWidth=
-"46px";h.className="geBtn";g.appendChild(h)}7168>c.length&&(h=mxUtils.button("",function(){try{var b="https://twitter.com/intent/tweet?text="+encodeURIComponent("Check out the diagram I made using @drawio")+"&url="+encodeURIComponent(l.value);a.openLink(b)}catch(p){a.handleError({message:p.message||mxResources.get("drawingTooLarge")})}}),f=document.createElement("img"),f.setAttribute("src",Editor.tweetImage),f.setAttribute("width","18"),f.setAttribute("height","18"),f.setAttribute("border","0"),f.style.marginBottom=
-"5px",h.appendChild(f),h.setAttribute("title",mxResources.get("twitter")+" ("+a.formatFileSize(7168)+" max)"),h.style.verticalAlign="bottom",h.style.paddingTop="4px",h.style.minWidth="46px",h.className="geBtn",g.appendChild(h))}f=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});g.appendChild(f);h=mxUtils.button(mxResources.get("copy"),function(){l.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?l.select():document.execCommand("selectAll",!1,
-null);document.execCommand("copy");a.alert(mxResources.get("copiedToClipboard"))});5E5>c.length?mxClient.IS_SF||null!=document.documentMode?f.className="geBtn gePrimaryBtn":(g.appendChild(h),h.className="geBtn gePrimaryBtn",f.className="geBtn"):(g.appendChild(n),f.className="geBtn",n.className="geBtn gePrimaryBtn");d.appendChild(g);this.container=d};EmbedDialog.showPreviewOption=!0;
-var GoogleSitesDialog=function(a,c){function b(){var a=null!=z&&null!=z.getTitle()?z.getTitle():this.defaultFilename;if(C.checked&&""!=p.value){var b="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(p.value));null!=a&&(b+="&title="+encodeURIComponent(a));0<y.length&&(b+="&s="+y);""!=q.value&&"0"!=q.value&&(b+="&border="+q.value);""!=m.value&&(b+="&height="+m.value);b+="&pan="+(u.checked?"1":"0");b+="&zoom="+(v.checked?"1":"0");b+="&fit="+(D.checked?"1":"0");
-b+="&resize="+(w.checked?"1":"0");b+="&x0="+Number(h.value);b+="&y0="+n;e.mathEnabled&&(b+="&math=1");t.checked?b+="&edit=_blank":x.checked&&(b+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));f.value=b}else z.constructor==DriveFile||z.constructor==DropboxFile?(b="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=p.value?b+=encodeURIComponent(mxUtils.htmlEntities(p.value))+"&type=3":(b+=z.getHash().substring(1),b=z.constructor==DropboxFile?b+"&type=2":b+"&type=1"),null!=
-a&&(b+="&title="+encodeURIComponent(a)),""!=m.value&&(a=parseInt(m.value)+parseInt(h.value),b+="&height="+a),f.value=b):f.value=""}var d=document.createElement("div"),e=a.editor.graph,g=e.getGraphBounds(),k=e.view.scale,l=Math.floor(g.x/k-e.view.translate.x),n=Math.floor(g.y/k-e.view.translate.y);mxUtils.write(d,mxResources.get("googleGadget")+":");mxUtils.br(d);var f=document.createElement("input");f.setAttribute("type","text");f.style.marginBottom="8px";f.style.marginTop="2px";f.style.width="410px";
-d.appendChild(f);mxUtils.br(d);this.init=function(){f.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?f.select():document.execCommand("selectAll",!1,null)};mxUtils.write(d,mxResources.get("top")+":");var h=document.createElement("input");h.setAttribute("type","text");h.setAttribute("size","4");h.style.marginRight="16px";h.style.marginLeft="4px";h.value=l;d.appendChild(h);mxUtils.write(d,mxResources.get("height")+":");var m=document.createElement("input");m.setAttribute("type",
-"text");m.setAttribute("size","4");m.style.marginLeft="4px";m.value=Math.ceil(g.height/k);d.appendChild(m);mxUtils.br(d);g=document.createElement("hr");g.setAttribute("size","1");g.style.marginBottom="16px";g.style.marginTop="16px";d.appendChild(g);mxUtils.write(d,mxResources.get("publicDiagramUrl")+":");mxUtils.br(d);var p=document.createElement("input");p.setAttribute("type","text");p.setAttribute("size","28");p.style.marginBottom="8px";p.style.marginTop="2px";p.style.width="410px";p.value=c||"";
+c.length?(l.value=c,l.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?l.select():document.execCommand("selectAll",!1,null)):(l.setAttribute("readonly","true"),l.value=c.substring(0,340)+"... ("+mxResources.get("drawingTooLarge")+")")},0)};g=document.createElement("div");g.style.position="absolute";g.style.bottom="36px";g.style.right="32px";var m=null;!EmbedDialog.showPreviewOption||mxClient.IS_CHROMEAPP&&!h||navigator.standalone||!(h||mxClient.IS_SVG&&(null==document.documentMode||
+9<document.documentMode))||(m=mxUtils.button(mxResources.get(5E5>c.length?"preview":"openInNewWindow"),function(){var f=5E5>c.length?l.value:c;if(null!=e)e(f);else if(h)try{var k=a.openLink(f);null!=k&&(null==b||0<b)&&window.setTimeout(mxUtils.bind(this,function(){null!=k&&null!=k.location.href&&k.location.href.substring(0,8)!=f.substring(0,8)&&(k.close(),a.handleError({message:mxResources.get("drawingTooLarge")}))}),b||500)}catch(u){a.handleError({message:u.message||mxResources.get("drawingTooLarge")})}else{var d=
+window.open().document;d.writeln("<html><head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head><body>'+c+"</body></html>");d.close()}}),m.className="geBtn",g.appendChild(m));if(!h||7500<c.length){var f=mxUtils.button(mxResources.get("download"),function(){a.hideDialog();a.saveData("embed.txt","txt",c,"text/plain")});f.className="geBtn";g.appendChild(f)}if(h&&(!a.isOffline()||mxClient.IS_CHROMEAPP)){if(51200>c.length){var k=mxUtils.button("",function(){try{var b=
+"https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(l.value);a.openLink(b)}catch(p){a.handleError({message:p.message||mxResources.get("drawingTooLarge")})}}),f=document.createElement("img");f.setAttribute("src",Editor.facebookImage);f.setAttribute("width","18");f.setAttribute("height","18");f.setAttribute("border","0");k.appendChild(f);k.setAttribute("title",mxResources.get("facebook")+" ("+a.formatFileSize(51200)+" max)");k.style.verticalAlign="bottom";k.style.paddingTop="4px";k.style.minWidth=
+"46px";k.className="geBtn";g.appendChild(k)}7168>c.length&&(k=mxUtils.button("",function(){try{var b="https://twitter.com/intent/tweet?text="+encodeURIComponent("Check out the diagram I made using @drawio")+"&url="+encodeURIComponent(l.value);a.openLink(b)}catch(p){a.handleError({message:p.message||mxResources.get("drawingTooLarge")})}}),f=document.createElement("img"),f.setAttribute("src",Editor.tweetImage),f.setAttribute("width","18"),f.setAttribute("height","18"),f.setAttribute("border","0"),f.style.marginBottom=
+"5px",k.appendChild(f),k.setAttribute("title",mxResources.get("twitter")+" ("+a.formatFileSize(7168)+" max)"),k.style.verticalAlign="bottom",k.style.paddingTop="4px",k.style.minWidth="46px",k.className="geBtn",g.appendChild(k))}f=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});g.appendChild(f);k=mxUtils.button(mxResources.get("copy"),function(){l.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?l.select():document.execCommand("selectAll",!1,
+null);document.execCommand("copy");a.alert(mxResources.get("copiedToClipboard"))});5E5>c.length?mxClient.IS_SF||null!=document.documentMode?f.className="geBtn gePrimaryBtn":(g.appendChild(k),k.className="geBtn gePrimaryBtn",f.className="geBtn"):(g.appendChild(m),f.className="geBtn",m.className="geBtn gePrimaryBtn");d.appendChild(g);this.container=d};EmbedDialog.showPreviewOption=!0;
+var GoogleSitesDialog=function(a,c){function b(){var a=null!=z&&null!=z.getTitle()?z.getTitle():this.defaultFilename;if(B.checked&&""!=p.value){var b="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(p.value));null!=a&&(b+="&title="+encodeURIComponent(a));0<y.length&&(b+="&s="+y);""!=q.value&&"0"!=q.value&&(b+="&border="+q.value);""!=n.value&&(b+="&height="+n.value);b+="&pan="+(u.checked?"1":"0");b+="&zoom="+(v.checked?"1":"0");b+="&fit="+(D.checked?"1":"0");
+b+="&resize="+(w.checked?"1":"0");b+="&x0="+Number(k.value);b+="&y0="+m;e.mathEnabled&&(b+="&math=1");t.checked?b+="&edit=_blank":x.checked&&(b+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));f.value=b}else z.constructor==DriveFile||z.constructor==DropboxFile?(b="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=p.value?b+=encodeURIComponent(mxUtils.htmlEntities(p.value))+"&type=3":(b+=z.getHash().substring(1),b=z.constructor==DropboxFile?b+"&type=2":b+"&type=1"),null!=
+a&&(b+="&title="+encodeURIComponent(a)),""!=n.value&&(a=parseInt(n.value)+parseInt(k.value),b+="&height="+a),f.value=b):f.value=""}var d=document.createElement("div"),e=a.editor.graph,g=e.getGraphBounds(),h=e.view.scale,l=Math.floor(g.x/h-e.view.translate.x),m=Math.floor(g.y/h-e.view.translate.y);mxUtils.write(d,mxResources.get("googleGadget")+":");mxUtils.br(d);var f=document.createElement("input");f.setAttribute("type","text");f.style.marginBottom="8px";f.style.marginTop="2px";f.style.width="410px";
+d.appendChild(f);mxUtils.br(d);this.init=function(){f.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?f.select():document.execCommand("selectAll",!1,null)};mxUtils.write(d,mxResources.get("top")+":");var k=document.createElement("input");k.setAttribute("type","text");k.setAttribute("size","4");k.style.marginRight="16px";k.style.marginLeft="4px";k.value=l;d.appendChild(k);mxUtils.write(d,mxResources.get("height")+":");var n=document.createElement("input");n.setAttribute("type",
+"text");n.setAttribute("size","4");n.style.marginLeft="4px";n.value=Math.ceil(g.height/h);d.appendChild(n);mxUtils.br(d);g=document.createElement("hr");g.setAttribute("size","1");g.style.marginBottom="16px";g.style.marginTop="16px";d.appendChild(g);mxUtils.write(d,mxResources.get("publicDiagramUrl")+":");mxUtils.br(d);var p=document.createElement("input");p.setAttribute("type","text");p.setAttribute("size","28");p.style.marginBottom="8px";p.style.marginTop="2px";p.style.width="410px";p.value=c||"";
d.appendChild(p);mxUtils.br(d);mxUtils.write(d,mxResources.get("borderWidth")+":");var q=document.createElement("input");q.setAttribute("type","text");q.setAttribute("size","3");q.style.marginBottom="8px";q.style.marginLeft="4px";q.value="0";d.appendChild(q);mxUtils.br(d);var u=document.createElement("input");u.setAttribute("type","checkbox");u.setAttribute("checked","checked");u.defaultChecked=!0;u.style.marginLeft="16px";d.appendChild(u);mxUtils.write(d,mxResources.get("pan")+" ");var v=document.createElement("input");
v.setAttribute("type","checkbox");v.setAttribute("checked","checked");v.defaultChecked=!0;v.style.marginLeft="8px";d.appendChild(v);mxUtils.write(d,mxResources.get("zoom")+" ");var x=document.createElement("input");x.setAttribute("type","checkbox");x.style.marginLeft="8px";x.setAttribute("title",window.location.href);d.appendChild(x);mxUtils.write(d,mxResources.get("edit")+" ");var t=document.createElement("input");t.setAttribute("type","checkbox");t.style.marginLeft="8px";d.appendChild(t);mxUtils.write(d,
-mxResources.get("asNew")+" ");mxUtils.br(d);var w=document.createElement("input");w.setAttribute("type","checkbox");w.setAttribute("checked","checked");w.defaultChecked=!0;w.style.marginLeft="16px";d.appendChild(w);mxUtils.write(d,mxResources.get("resize")+" ");var D=document.createElement("input");D.setAttribute("type","checkbox");D.style.marginLeft="8px";d.appendChild(D);mxUtils.write(d,mxResources.get("fit")+" ");var C=document.createElement("input");C.setAttribute("type","checkbox");C.style.marginLeft=
-"8px";d.appendChild(C);mxUtils.write(d,mxResources.get("embed")+" ");var y=a.getBasenames().join(";"),z=a.getCurrentFile();mxEvent.addListener(u,"change",b);mxEvent.addListener(v,"change",b);mxEvent.addListener(w,"change",b);mxEvent.addListener(D,"change",b);mxEvent.addListener(x,"change",b);mxEvent.addListener(t,"change",b);mxEvent.addListener(C,"change",b);mxEvent.addListener(m,"change",b);mxEvent.addListener(h,"change",b);mxEvent.addListener(q,"change",b);mxEvent.addListener(p,"change",b);b();
-mxEvent.addListener(f,"click",function(){f.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?f.select():document.execCommand("selectAll",!1,null)});g=document.createElement("div");g.style.paddingTop="12px";g.style.textAlign="right";k=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});k.className="geBtn gePrimaryBtn";g.appendChild(k);d.appendChild(g);this.container=d},CreateGraphDialog=function(a,c,b){var d=document.createElement("div");d.style.textAlign=
-"right";this.init=function(){var c=document.createElement("div");c.style.position="relative";c.style.border="1px solid gray";c.style.width="100%";c.style.height="360px";c.style.overflow="hidden";c.style.marginBottom="16px";mxEvent.disableContextMenu(c);d.appendChild(c);var g=new Graph(c);g.setCellsCloneable(!0);g.setPanning(!0);g.setAllowDanglingEdges(!1);g.connectionHandler.select=!1;g.view.setTranslate(20,20);g.border=20;g.panningHandler.useLeftButtonForPanning=!0;var k="curved=1;";g.cellRenderer.installCellOverlayListeners=
+mxResources.get("asNew")+" ");mxUtils.br(d);var w=document.createElement("input");w.setAttribute("type","checkbox");w.setAttribute("checked","checked");w.defaultChecked=!0;w.style.marginLeft="16px";d.appendChild(w);mxUtils.write(d,mxResources.get("resize")+" ");var D=document.createElement("input");D.setAttribute("type","checkbox");D.style.marginLeft="8px";d.appendChild(D);mxUtils.write(d,mxResources.get("fit")+" ");var B=document.createElement("input");B.setAttribute("type","checkbox");B.style.marginLeft=
+"8px";d.appendChild(B);mxUtils.write(d,mxResources.get("embed")+" ");var y=a.getBasenames().join(";"),z=a.getCurrentFile();mxEvent.addListener(u,"change",b);mxEvent.addListener(v,"change",b);mxEvent.addListener(w,"change",b);mxEvent.addListener(D,"change",b);mxEvent.addListener(x,"change",b);mxEvent.addListener(t,"change",b);mxEvent.addListener(B,"change",b);mxEvent.addListener(n,"change",b);mxEvent.addListener(k,"change",b);mxEvent.addListener(q,"change",b);mxEvent.addListener(p,"change",b);b();
+mxEvent.addListener(f,"click",function(){f.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?f.select():document.execCommand("selectAll",!1,null)});g=document.createElement("div");g.style.paddingTop="12px";g.style.textAlign="right";h=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});h.className="geBtn gePrimaryBtn";g.appendChild(h);d.appendChild(g);this.container=d},CreateGraphDialog=function(a,c,b){var d=document.createElement("div");d.style.textAlign=
+"right";this.init=function(){var c=document.createElement("div");c.style.position="relative";c.style.border="1px solid gray";c.style.width="100%";c.style.height="360px";c.style.overflow="hidden";c.style.marginBottom="16px";mxEvent.disableContextMenu(c);d.appendChild(c);var g=new Graph(c);g.setCellsCloneable(!0);g.setPanning(!0);g.setAllowDanglingEdges(!1);g.connectionHandler.select=!1;g.view.setTranslate(20,20);g.border=20;g.panningHandler.useLeftButtonForPanning=!0;var h="curved=1;";g.cellRenderer.installCellOverlayListeners=
function(a,b,c){mxCellRenderer.prototype.installCellOverlayListeners.apply(this,arguments);mxEvent.addListener(c.node,mxClient.IS_POINTER?"pointerdown":"mousedown",function(c){b.fireEvent(new mxEventObject("pointerdown","event",c,"state",a))});!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&mxEvent.addListener(c.node,"touchstart",function(c){b.fireEvent(new mxEventObject("pointerdown","event",c,"state",a))})};g.getAllConnectionConstraints=function(){return null};g.connectionHandler.marker.highlight.keepOnTop=
-!1;g.connectionHandler.createEdgeState=function(a){a=g.createEdge(null,null,null,null,null,k);return new mxCellState(this.graph.view,a,this.graph.getCellStyle(a))};var l=g.getDefaultParent(),n=mxUtils.bind(this,function(a){var b=new mxCellOverlay(this.connectImage,"Add outgoing");b.cursor="hand";b.addListener(mxEvent.CLICK,function(b,c){g.connectionHandler.reset();g.clearSelection();var f=g.getCellGeometry(a),h;m(function(){h=g.insertVertex(l,null,"Entry",f.x,f.y,80,30,"rounded=1;");n(h);g.view.refresh(h);
-g.insertEdge(l,null,"",a,h,k)},function(){g.scrollCellToVisible(h)})});b.addListener("pointerdown",function(a,b){var c=b.getProperty("event"),f=b.getProperty("state");g.popupMenuHandler.hideMenu();g.stopEditing(!1);var h=mxUtils.convertPoint(g.container,mxEvent.getClientX(c),mxEvent.getClientY(c));g.connectionHandler.start(f,h.x,h.y);g.isMouseDown=!0;g.isMouseTrigger=mxEvent.isMouseEvent(c);mxEvent.consume(c)});g.addCellOverlay(a,b)});g.getModel().beginUpdate();var f;try{f=g.insertVertex(l,null,"Start",
-0,0,80,30,"ellipse"),n(f)}finally{g.getModel().endUpdate()}var h;"horizontalTree"==b?(h=new mxCompactTreeLayout(g),h.edgeRouting=!1,h.levelDistance=30,k="edgeStyle=elbowEdgeStyle;elbow=horizontal;"):"verticalTree"==b?(h=new mxCompactTreeLayout(g,!1),h.edgeRouting=!1,h.levelDistance=30,k="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"radialTree"==b?(h=new mxRadialTreeLayout(g,!1),h.edgeRouting=!1,h.levelDistance=80):"verticalFlow"==b?h=new mxHierarchicalLayout(g,mxConstants.DIRECTION_NORTH):"horizontalFlow"==
-b?h=new mxHierarchicalLayout(g,mxConstants.DIRECTION_WEST):"organic"==b?(h=new mxFastOrganicLayout(g,!1),h.forceConstant=80):"circle"==b&&(h=new mxCircleLayout(g));if(null!=h){var m=function(a,b){g.getModel().beginUpdate();try{null!=a&&a(),h.execute(g.getDefaultParent(),f)}catch(w){throw w;}finally{var c=new mxMorphing(g);c.addListener(mxEvent.DONE,mxUtils.bind(this,function(){g.getModel().endUpdate();null!=b&&b()}));c.startAnimation()}},p=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=
-function(a,b,c,f,h){p.apply(this,arguments);m()};g.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);m()};g.connectionHandler.addListener(mxEvent.CONNECT,function(){m()})}var q=mxUtils.button(mxResources.get("close"),function(){a.confirm(mxResources.get("areYouSure"),function(){null!=c.parentNode&&(g.destroy(),c.parentNode.removeChild(c));a.hideDialog()})});q.className="geBtn";a.editor.cancelFirst&&d.appendChild(q);var u=mxUtils.button(mxResources.get("insert"),function(){g.clearCellOverlays();
-var b=a.editor.graph.getFreeInsertPoint(),b=a.editor.graph.importCells(g.getModel().getChildren(g.getDefaultParent()),b.x,b.y),f=a.editor.graph.view,h=f.getBounds(b);h.x-=f.translate.x;h.y-=f.translate.y;a.editor.graph.scrollRectToVisible(h);a.editor.graph.setSelectionCells(b);null!=c.parentNode&&(g.destroy(),c.parentNode.removeChild(c));a.hideDialog()});d.appendChild(u);u.className="geBtn gePrimaryBtn";a.editor.cancelFirst||d.appendChild(q)};this.container=d};
+!1;g.connectionHandler.createEdgeState=function(a){a=g.createEdge(null,null,null,null,null,h);return new mxCellState(this.graph.view,a,this.graph.getCellStyle(a))};var l=g.getDefaultParent(),m=mxUtils.bind(this,function(a){var b=new mxCellOverlay(this.connectImage,"Add outgoing");b.cursor="hand";b.addListener(mxEvent.CLICK,function(b,c){g.connectionHandler.reset();g.clearSelection();var f=g.getCellGeometry(a),k;n(function(){k=g.insertVertex(l,null,"Entry",f.x,f.y,80,30,"rounded=1;");m(k);g.view.refresh(k);
+g.insertEdge(l,null,"",a,k,h)},function(){g.scrollCellToVisible(k)})});b.addListener("pointerdown",function(a,b){var c=b.getProperty("event"),f=b.getProperty("state");g.popupMenuHandler.hideMenu();g.stopEditing(!1);var k=mxUtils.convertPoint(g.container,mxEvent.getClientX(c),mxEvent.getClientY(c));g.connectionHandler.start(f,k.x,k.y);g.isMouseDown=!0;g.isMouseTrigger=mxEvent.isMouseEvent(c);mxEvent.consume(c)});g.addCellOverlay(a,b)});g.getModel().beginUpdate();var f;try{f=g.insertVertex(l,null,"Start",
+0,0,80,30,"ellipse"),m(f)}finally{g.getModel().endUpdate()}var k;"horizontalTree"==b?(k=new mxCompactTreeLayout(g),k.edgeRouting=!1,k.levelDistance=30,h="edgeStyle=elbowEdgeStyle;elbow=horizontal;"):"verticalTree"==b?(k=new mxCompactTreeLayout(g,!1),k.edgeRouting=!1,k.levelDistance=30,h="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"radialTree"==b?(k=new mxRadialTreeLayout(g,!1),k.edgeRouting=!1,k.levelDistance=80):"verticalFlow"==b?k=new mxHierarchicalLayout(g,mxConstants.DIRECTION_NORTH):"horizontalFlow"==
+b?k=new mxHierarchicalLayout(g,mxConstants.DIRECTION_WEST):"organic"==b?(k=new mxFastOrganicLayout(g,!1),k.forceConstant=80):"circle"==b&&(k=new mxCircleLayout(g));if(null!=k){var n=function(a,b){g.getModel().beginUpdate();try{null!=a&&a(),k.execute(g.getDefaultParent(),f)}catch(w){throw w;}finally{var c=new mxMorphing(g);c.addListener(mxEvent.DONE,mxUtils.bind(this,function(){g.getModel().endUpdate();null!=b&&b()}));c.startAnimation()}},p=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=
+function(a,b,c,f,k){p.apply(this,arguments);n()};g.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);n()};g.connectionHandler.addListener(mxEvent.CONNECT,function(){n()})}var q=mxUtils.button(mxResources.get("close"),function(){a.confirm(mxResources.get("areYouSure"),function(){null!=c.parentNode&&(g.destroy(),c.parentNode.removeChild(c));a.hideDialog()})});q.className="geBtn";a.editor.cancelFirst&&d.appendChild(q);var u=mxUtils.button(mxResources.get("insert"),function(){g.clearCellOverlays();
+var b=a.editor.graph.getFreeInsertPoint(),b=a.editor.graph.importCells(g.getModel().getChildren(g.getDefaultParent()),b.x,b.y),f=a.editor.graph.view,k=f.getBounds(b);k.x-=f.translate.x;k.y-=f.translate.y;a.editor.graph.scrollRectToVisible(k);a.editor.graph.setSelectionCells(b);null!=c.parentNode&&(g.destroy(),c.parentNode.removeChild(c));a.hideDialog()});d.appendChild(u);u.className="geBtn gePrimaryBtn";a.editor.cancelFirst||d.appendChild(q)};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(a,c){var b=document.createElement("div");b.style.whiteSpace="nowrap";var d=document.createElement("h2");mxUtils.write(d,mxResources.get("backgroundImage"));d.style.marginTop="0px";b.appendChild(d);mxUtils.write(b,mxResources.get("image")+" "+mxResources.get("url")+":");mxUtils.br(b);var d=a.editor.graph.backgroundImage,e=document.createElement("input");e.setAttribute("type","text");e.style.marginTop="4px";e.style.marginBottom="4px";e.style.width="350px";e.value=
-null!=d?d.src:"";var g=!1,k=function(){g||""==e.value||a.isOffline()?(l.value="",n.value=""):a.loadImage(mxUtils.trim(e.value),function(a){l.value=a.width;n.value=a.height},function(){a.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));e.value="";l.value="";n.value=""})};this.init=function(){e.focus();if(Graph.fileSupport){e.setAttribute("placeholder",mxResources.get("dragImagesHere"));var c=b.parentNode,f=null;mxEvent.addListener(c,"dragleave",function(a){null!=
-f&&(f.parentNode.removeChild(f),f=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(b){null==f&&(!mxClient.IS_IE||10<document.documentMode)&&(f=a.highlightElement(c));b.stopPropagation();b.preventDefault()}));mxEvent.addListener(c,"drop",mxUtils.bind(this,function(b){null!=f&&(f.parentNode.removeChild(f),f=null);if(0<b.dataTransfer.files.length)a.importFiles(b.dataTransfer.files,0,0,a.maxBackgroundSize,function(a,b,c,f,h,d){e.value=a;k()},function(){},
-function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},!0,a.maxBackgroundBytes,a.maxBackgroundBytes);else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")){var c=b.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)&&(e.value=decodeURIComponent(c),k())}b.stopPropagation();b.preventDefault()}),!1)}};b.appendChild(e);mxUtils.br(b);mxUtils.br(b);mxUtils.write(b,mxResources.get("width")+":");var l=document.createElement("input");
-l.setAttribute("type","text");l.style.width="60px";l.style.marginLeft="4px";l.style.marginRight="16px";l.value=null!=d?d.width:"";b.appendChild(l);mxUtils.write(b,mxResources.get("height")+":");var n=document.createElement("input");n.setAttribute("type","text");n.style.width="60px";n.style.marginLeft="4px";n.style.marginRight="16px";n.value=null!=d?d.height:"";b.appendChild(n);d=mxUtils.button(mxResources.get("reset"),function(){e.value="";l.value="";n.value="";g=!1});mxEvent.addListener(d,"mousedown",
-function(){g=!0});mxEvent.addListener(d,"touchstart",function(){g=!0});d.className="geBtn";d.width="100";b.appendChild(d);mxUtils.br(b);mxEvent.addListener(e,"change",k);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&&(e.value=a.url,k()));e.focus()};d=document.createElement("div");d.style.marginTop="40px";d.style.textAlign="right";var f=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});
-f.className="geBtn";a.editor.cancelFirst&&d.appendChild(f);if(!a.isOffline()&&"undefined"!=typeof google&&"undefined"!=typeof google.picker&&window.self===window.top){var h=mxUtils.button(mxResources.get("search"),function(){if(null==a.imageSearchPicker){var b=(new google.picker.PickerBuilder).setLocale(mxLanguage).addView(google.picker.ViewId.IMAGE_SEARCH).enableFeature(google.picker.Feature.NAV_HIDDEN);a.imageSearchPicker=b.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.imageSearchPicker.setVisible(!0)});
-h.className="geBtn";d.appendChild(h);null!=a.drive&&"1"==urlParams.photos&&(h=mxUtils.button(mxResources.get("googlePlus"),function(){a.spinner.spin(document.body,mxResources.get("authorizing"))&&a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();if(null==a.photoPicker){var b=gapi.auth.getToken().access_token,b=(new google.picker.PickerBuilder).setAppId(a.drive.appId).setLocale(mxLanguage).setOAuthToken(b).addView(google.picker.ViewId.PHOTOS).addView(google.picker.ViewId.PHOTO_ALBUMS).addView(google.picker.ViewId.PHOTO_UPLOAD);
-a.photoPicker=b.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.photoPicker.setVisible(!0)}))}),h.className="geBtn",d.appendChild(h))}h=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();c(""!=e.value?new mxImage(mxUtils.trim(e.value),l.value,n.value):null)});h.className="geBtn gePrimaryBtn";d.appendChild(h);a.editor.cancelFirst||d.appendChild(f);b.appendChild(d);this.container=b},ParseDialog=function(a,c,b){function d(b,c){var f=b.split("\n");if("plantUmlPng"==c||"plantUmlSvg"==
-c||"plantUmlTxt"==c){var f="plantUmlTxt"==c?PLANT_URL+"/txt/":"plantUmlPng"==c?PLANT_URL+"/png/":PLANT_URL+"/svg/",h=a.editor.graph;if(a.spinner.spin(document.body,mxResources.get("inserting"))){var d=function(a){if(10>a)return String.fromCharCode(48+a);a-=10;if(26>a)return String.fromCharCode(65+a);a-=26;if(26>a)return String.fromCharCode(97+a);a-=26;return 0==a?"-":1==a?"_":"?"},m=function(a,b,c){c1=a>>2;c2=(a&3)<<4|b>>4;c3=(b&15)<<2|c>>6;c4=c&63;r="";r+=d(c1&63);r+=d(c2&63);r+=d(c3&63);return r+=
-d(c4&63)},e=new XMLHttpRequest;e.open("GET",f+function(a){r="";for(l=0;l<a.length;l+=3)r=l+2==a.length?r+m(a.charCodeAt(l),a.charCodeAt(l+1),0):l+1==a.length?r+m(a.charCodeAt(l),0,0):r+m(a.charCodeAt(l),a.charCodeAt(l+1),a.charCodeAt(l+2));return r}(h.bytesToString(pako.deflateRaw(unescape(encodeURIComponent(b))))),!0);"plantUmlTxt"!=c&&(e.responseType="blob");e.onload=function(f){if(200<=this.status&&300>this.status)if("plantUmlTxt"==c)a.spinner.stop(),h.setSelectionCell(a.insertAsPreText(this.response,
-g.x,g.y)),h.scrollCellToVisible(h.getSelectionCell());else{var d=new FileReader;d.readAsDataURL(this.response);d.onloadend=function(c){var f=new Image;f.onload=function(){a.spinner.stop();var c=f.width,m=f.height;if(0==c&&0==m){var e=d.result,t=e.indexOf(","),e=decodeURIComponent(escape(atob(e.substring(t+1)))),e=mxUtils.parseXml(e).getElementsByTagName("svg");0<e.length&&(c=parseFloat(e[0].getAttribute("width")),m=parseFloat(e[0].getAttribute("height")))}h.getModel().beginUpdate();try{cell=h.insertVertex(null,
-null,b,g.x,g.y,c,m,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a.convertDataUri(d.result)+";")}finally{h.getModel().endUpdate()}h.setSelectionCell(cell);h.scrollCellToVisible(h.getSelectionCell())};f.src=d.result};d.onerror=function(b){a.handleError(b)}}else a.spinner.stop(),a.handleError(f)};e.onerror=function(b){a.handleError(b)};e.send()}}else if("table"==c){for(var p=null,q=[],k=0,l=0;l<f.length;l++)if(e=mxUtils.trim(f[l]),"create table"==e.substring(0,12).toLowerCase())e=
-mxUtils.trim(e.substring(12)),"("==e.charAt(e.length-1)&&(e=e.substring(0,e.lastIndexOf(" "))),p=new mxCell(e,new mxGeometry(k,0,160,26),"swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=26;fillColor=#e0e0e0;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;marginBottom=0;swimlaneFillColor=#ffffff;align=center;"),p.vertex=!0,q.push(p),e=a.editor.graph.getPreferredSizeForCell(B),null!=e&&(p.geometry.width=e.width+10);else if(null!=p&&")"==e.charAt(0))k+=p.geometry.width+
-40,p=null;else if("("!=e&&null!=p&&(e=e.substring(0,","==e.charAt(e.length-1)?e.length-1:e.length),"primary key"!=e.substring(0,11).toLowerCase())){var n=e.toLowerCase().indexOf("primary key"),e=e.replace(/primary key/i,""),B=new mxCell(e,new mxGeometry(0,0,90,26),"shape=partialRectangle;top=0;left=0;right=0;bottom=0;align=left;verticalAlign=top;spacingTop=-2;fillColor=none;spacingLeft=34;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;dropTarget=0;");B.vertex=
-!0;e=sb.cloneCell(B,0<n?"PK":"");e.connectable=!1;e.style="shape=partialRectangle;top=0;left=0;bottom=0;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[];portConstraint=eastwest;part=1;";e.geometry.width=30;e.geometry.height=26;B.insert(e);e=a.editor.graph.getPreferredSizeForCell(B);null!=e&&p.geometry.width<e.width+10&&(p.geometry.width=Math.min(220,e.width+10));p.insert(B);p.geometry.height+=26}0<q.length&&(h=a.editor.graph,f=h.view,
-e=h.getGraphBounds(),h.setSelectionCells(h.importCells(q,Math.ceil(Math.max(0,e.x/f.scale-f.translate.x)+4*h.gridSize),Math.ceil(Math.max(0,(e.y+e.height)/f.scale-f.translate.y)+4*h.gridSize))),h.scrollCellToVisible(h.getSelectionCell()))}else if("list"==c){if(0<f.length){h=a.editor.graph;p=new mxCell(f[0],new mxGeometry(0,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;marginBottom=0;swimlaneFillColor=#ffffff;");
-p.vertex=!0;e=h.getPreferredSizeForCell(p);null!=e&&p.geometry.width<e.width+10&&(p.geometry.width=e.width+10);B=[p];if(1<f.length)for(l=1;l<f.length;l++)"--"==f[l]?(e=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;"),e.vertex=!0,p.geometry.height+=e.geometry.height,p.insert(e),B.push(e)):0<f[l].length&&";"!=f[l].charAt(0)&&(k=new mxCell(f[l],
-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;"),k.vertex=!0,e=h.getPreferredSizeForCell(k),null!=e&&k.geometry.width<e.width&&(k.geometry.width=e.width),p.geometry.width=Math.max(p.geometry.width,k.geometry.width),p.geometry.height+=k.geometry.height,p.insert(k),B.push(k));h.getModel().beginUpdate();try{p=h.importCells([p],g.x,g.y)[0],h.fireEvent(new mxEventObject("cellsInserted",
-"cells",[p].concat(p.children)))}finally{h.getModel().endUpdate()}h.setSelectionCell(p);h.scrollCellToVisible(h.getSelectionCell())}}else{for(var B=function(a){var b=F[a];null==b&&(b=new mxCell(a,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),b.vertex=!0,F[a]=b,q.push(b));return b},F={},q=[],l=0;l<f.length;l++)if(";"!=f[l].charAt(0)){var I=f[l].split("->");if(2<=I.length){var n=B(I[0]),A=B(I[I.length-1]),I=new mxCell(2<I.length?I[1]:"",new mxGeometry);I.edge=!0;n.insertEdge(I,!0);A.insertEdge(I,
-!1);q.push(I)}}if(0<q.length){f=document.createElement("div");f.style.visibility="hidden";document.body.appendChild(f);h=new Graph(f);h.getModel().beginUpdate();try{q=h.importCells(q);for(l=0;l<q.length;l++)h.getModel().isVertex(q[l])&&(e=h.getPreferredSizeForCell(q[l]),q[l].geometry.width=Math.max(q[l].geometry.width,e.width),q[l].geometry.height=Math.max(q[l].geometry.height,e.height));p=new mxFastOrganicLayout(h);p.disableEdgeStyle=!1;p.forceConstant=120;p.execute(h.getDefaultParent());k=new mxParallelEdgeLayout(h);
-k.spacing=20;k.execute(h.getDefaultParent())}finally{h.getModel().endUpdate()}h.clearCellOverlays();B=[];a.editor.graph.getModel().beginUpdate();try{B=a.editor.graph.importCells(h.getModel().getChildren(h.getDefaultParent()),g.x,g.y),a.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",B))}finally{a.editor.graph.getModel().endUpdate()}a.editor.graph.setSelectionCells(B);a.editor.graph.scrollCellToVisible(a.editor.graph.getSelectionCell());h.destroy();f.parentNode.removeChild(f)}}}function e(){return"list"==
+null!=d?d.src:"";var g=!1,h=function(){g||""==e.value||a.isOffline()?(l.value="",m.value=""):a.loadImage(mxUtils.trim(e.value),function(a){l.value=a.width;m.value=a.height},function(){a.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));e.value="";l.value="";m.value=""})};this.init=function(){e.focus();if(Graph.fileSupport){e.setAttribute("placeholder",mxResources.get("dragImagesHere"));var c=b.parentNode,f=null;mxEvent.addListener(c,"dragleave",function(a){null!=
+f&&(f.parentNode.removeChild(f),f=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(b){null==f&&(!mxClient.IS_IE||10<document.documentMode)&&(f=a.highlightElement(c));b.stopPropagation();b.preventDefault()}));mxEvent.addListener(c,"drop",mxUtils.bind(this,function(b){null!=f&&(f.parentNode.removeChild(f),f=null);if(0<b.dataTransfer.files.length)a.importFiles(b.dataTransfer.files,0,0,a.maxBackgroundSize,function(a,b,c,f,k,d){e.value=a;h()},function(){},
+function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},!0,a.maxBackgroundBytes,a.maxBackgroundBytes);else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")){var c=b.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)&&(e.value=decodeURIComponent(c),h())}b.stopPropagation();b.preventDefault()}),!1)}};b.appendChild(e);mxUtils.br(b);mxUtils.br(b);mxUtils.write(b,mxResources.get("width")+":");var l=document.createElement("input");
+l.setAttribute("type","text");l.style.width="60px";l.style.marginLeft="4px";l.style.marginRight="16px";l.value=null!=d?d.width:"";b.appendChild(l);mxUtils.write(b,mxResources.get("height")+":");var m=document.createElement("input");m.setAttribute("type","text");m.style.width="60px";m.style.marginLeft="4px";m.style.marginRight="16px";m.value=null!=d?d.height:"";b.appendChild(m);d=mxUtils.button(mxResources.get("reset"),function(){e.value="";l.value="";m.value="";g=!1});mxEvent.addListener(d,"mousedown",
+function(){g=!0});mxEvent.addListener(d,"touchstart",function(){g=!0});d.className="geBtn";d.width="100";b.appendChild(d);mxUtils.br(b);mxEvent.addListener(e,"change",h);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&&(e.value=a.url,h()));e.focus()};d=document.createElement("div");d.style.marginTop="40px";d.style.textAlign="right";var f=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});
+f.className="geBtn";a.editor.cancelFirst&&d.appendChild(f);if(!a.isOffline()&&"undefined"!=typeof google&&"undefined"!=typeof google.picker&&window.self===window.top){var k=mxUtils.button(mxResources.get("search"),function(){if(null==a.imageSearchPicker){var b=(new google.picker.PickerBuilder).setLocale(mxLanguage).addView(google.picker.ViewId.IMAGE_SEARCH).enableFeature(google.picker.Feature.NAV_HIDDEN);a.imageSearchPicker=b.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.imageSearchPicker.setVisible(!0)});
+k.className="geBtn";d.appendChild(k);null!=a.drive&&"1"==urlParams.photos&&(k=mxUtils.button(mxResources.get("googlePlus"),function(){a.spinner.spin(document.body,mxResources.get("authorizing"))&&a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();if(null==a.photoPicker){var b=gapi.auth.getToken().access_token,b=(new google.picker.PickerBuilder).setAppId(a.drive.appId).setLocale(mxLanguage).setOAuthToken(b).addView(google.picker.ViewId.PHOTOS).addView(google.picker.ViewId.PHOTO_ALBUMS).addView(google.picker.ViewId.PHOTO_UPLOAD);
+a.photoPicker=b.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.photoPicker.setVisible(!0)}))}),k.className="geBtn",d.appendChild(k))}k=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();c(""!=e.value?new mxImage(mxUtils.trim(e.value),l.value,m.value):null)});k.className="geBtn gePrimaryBtn";d.appendChild(k);a.editor.cancelFirst||d.appendChild(f);b.appendChild(d);this.container=b},ParseDialog=function(a,c,b){function d(b,c){var f=b.split("\n");if("plantUmlPng"==c||"plantUmlSvg"==
+c||"plantUmlTxt"==c){var f="plantUmlTxt"==c?PLANT_URL+"/txt/":"plantUmlPng"==c?PLANT_URL+"/png/":PLANT_URL+"/svg/",k=a.editor.graph;if(a.spinner.spin(document.body,mxResources.get("inserting"))){var d=function(a){if(10>a)return String.fromCharCode(48+a);a-=10;if(26>a)return String.fromCharCode(65+a);a-=26;if(26>a)return String.fromCharCode(97+a);a-=26;return 0==a?"-":1==a?"_":"?"},n=function(a,b,c){c1=a>>2;c2=(a&3)<<4|b>>4;c3=(b&15)<<2|c>>6;c4=c&63;r="";r+=d(c1&63);r+=d(c2&63);r+=d(c3&63);return r+=
+d(c4&63)},e=new XMLHttpRequest;e.open("GET",f+function(a){r="";for(l=0;l<a.length;l+=3)r=l+2==a.length?r+n(a.charCodeAt(l),a.charCodeAt(l+1),0):l+1==a.length?r+n(a.charCodeAt(l),0,0):r+n(a.charCodeAt(l),a.charCodeAt(l+1),a.charCodeAt(l+2));return r}(k.bytesToString(pako.deflateRaw(unescape(encodeURIComponent(b))))),!0);"plantUmlTxt"!=c&&(e.responseType="blob");e.onload=function(f){if(200<=this.status&&300>this.status)if("plantUmlTxt"==c)a.spinner.stop(),k.setSelectionCell(a.insertAsPreText(this.response,
+g.x,g.y)),k.scrollCellToVisible(k.getSelectionCell());else{var d=new FileReader;d.readAsDataURL(this.response);d.onloadend=function(c){var f=new Image;f.onload=function(){a.spinner.stop();var c=f.width,n=f.height;if(0==c&&0==n){var e=d.result,t=e.indexOf(","),e=decodeURIComponent(escape(atob(e.substring(t+1)))),e=mxUtils.parseXml(e).getElementsByTagName("svg");0<e.length&&(c=parseFloat(e[0].getAttribute("width")),n=parseFloat(e[0].getAttribute("height")))}k.getModel().beginUpdate();try{cell=k.insertVertex(null,
+null,b,g.x,g.y,c,n,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a.convertDataUri(d.result)+";")}finally{k.getModel().endUpdate()}k.setSelectionCell(cell);k.scrollCellToVisible(k.getSelectionCell())};f.src=d.result};d.onerror=function(b){a.handleError(b)}}else a.spinner.stop(),a.handleError(f)};e.onerror=function(b){a.handleError(b)};e.send()}}else if("table"==c){for(var p=null,q=[],h=0,l=0;l<f.length;l++)if(e=mxUtils.trim(f[l]),"create table"==e.substring(0,12).toLowerCase())e=
+mxUtils.trim(e.substring(12)),"("==e.charAt(e.length-1)&&(e=e.substring(0,e.lastIndexOf(" "))),p=new mxCell(e,new mxGeometry(h,0,160,26),"swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=26;fillColor=#e0e0e0;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;marginBottom=0;swimlaneFillColor=#ffffff;align=center;"),p.vertex=!0,q.push(p),e=a.editor.graph.getPreferredSizeForCell(C),null!=e&&(p.geometry.width=e.width+10);else if(null!=p&&")"==e.charAt(0))h+=p.geometry.width+
+40,p=null;else if("("!=e&&null!=p&&(e=e.substring(0,","==e.charAt(e.length-1)?e.length-1:e.length),"primary key"!=e.substring(0,11).toLowerCase())){var m=e.toLowerCase().indexOf("primary key"),e=e.replace(/primary key/i,""),C=new mxCell(e,new mxGeometry(0,0,90,26),"shape=partialRectangle;top=0;left=0;right=0;bottom=0;align=left;verticalAlign=top;spacingTop=-2;fillColor=none;spacingLeft=34;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;dropTarget=0;");C.vertex=
+!0;e=sb.cloneCell(C,0<m?"PK":"");e.connectable=!1;e.style="shape=partialRectangle;top=0;left=0;bottom=0;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[];portConstraint=eastwest;part=1;";e.geometry.width=30;e.geometry.height=26;C.insert(e);e=a.editor.graph.getPreferredSizeForCell(C);null!=e&&p.geometry.width<e.width+10&&(p.geometry.width=Math.min(220,e.width+10));p.insert(C);p.geometry.height+=26}0<q.length&&(k=a.editor.graph,f=k.view,
+e=k.getGraphBounds(),k.setSelectionCells(k.importCells(q,Math.ceil(Math.max(0,e.x/f.scale-f.translate.x)+4*k.gridSize),Math.ceil(Math.max(0,(e.y+e.height)/f.scale-f.translate.y)+4*k.gridSize))),k.scrollCellToVisible(k.getSelectionCell()))}else if("list"==c){if(0<f.length){k=a.editor.graph;p=new mxCell(f[0],new mxGeometry(0,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;marginBottom=0;swimlaneFillColor=#ffffff;");
+p.vertex=!0;e=k.getPreferredSizeForCell(p);null!=e&&p.geometry.width<e.width+10&&(p.geometry.width=e.width+10);C=[p];if(1<f.length)for(l=1;l<f.length;l++)"--"==f[l]?(e=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;"),e.vertex=!0,p.geometry.height+=e.geometry.height,p.insert(e),C.push(e)):0<f[l].length&&";"!=f[l].charAt(0)&&(h=new mxCell(f[l],
+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;"),h.vertex=!0,e=k.getPreferredSizeForCell(h),null!=e&&h.geometry.width<e.width&&(h.geometry.width=e.width),p.geometry.width=Math.max(p.geometry.width,h.geometry.width),p.geometry.height+=h.geometry.height,p.insert(h),C.push(h));k.getModel().beginUpdate();try{p=k.importCells([p],g.x,g.y)[0],k.fireEvent(new mxEventObject("cellsInserted",
+"cells",[p].concat(p.children)))}finally{k.getModel().endUpdate()}k.setSelectionCell(p);k.scrollCellToVisible(k.getSelectionCell())}}else{for(var C=function(a){var b=F[a];null==b&&(b=new mxCell(a,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),b.vertex=!0,F[a]=b,q.push(b));return b},F={},q=[],l=0;l<f.length;l++)if(";"!=f[l].charAt(0)){var I=f[l].split("->");if(2<=I.length){var m=C(I[0]),A=C(I[I.length-1]),I=new mxCell(2<I.length?I[1]:"",new mxGeometry);I.edge=!0;m.insertEdge(I,!0);A.insertEdge(I,
+!1);q.push(I)}}if(0<q.length){f=document.createElement("div");f.style.visibility="hidden";document.body.appendChild(f);k=new Graph(f);k.getModel().beginUpdate();try{q=k.importCells(q);for(l=0;l<q.length;l++)k.getModel().isVertex(q[l])&&(e=k.getPreferredSizeForCell(q[l]),q[l].geometry.width=Math.max(q[l].geometry.width,e.width),q[l].geometry.height=Math.max(q[l].geometry.height,e.height));p=new mxFastOrganicLayout(k);p.disableEdgeStyle=!1;p.forceConstant=120;p.execute(k.getDefaultParent());h=new mxParallelEdgeLayout(k);
+h.spacing=20;h.execute(k.getDefaultParent())}finally{k.getModel().endUpdate()}k.clearCellOverlays();C=[];a.editor.graph.getModel().beginUpdate();try{C=a.editor.graph.importCells(k.getModel().getChildren(k.getDefaultParent()),g.x,g.y),a.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",C))}finally{a.editor.graph.getModel().endUpdate()}a.editor.graph.setSelectionCells(C);a.editor.graph.scrollCellToVisible(a.editor.graph.getSelectionCell());k.destroy();f.parentNode.removeChild(f)}}}function e(){return"list"==
l.value?"Person\n-name: String\n-birthDate: Date\n--\n+getName(): String\n+setName(String): void\n+isBirthday(): boolean":"table"==l.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"==l.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"==l.value||"plantUmlTxt"==l.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 g=a.editor.graph.getFreeInsertPoint();c=document.createElement("div");c.style.textAlign="right";var k=document.createElement("textarea");k.style.resize="none";k.style.width="100%";k.style.height=
-"354px";k.style.marginBottom="16px";var l=document.createElement("select");"formatSql"==b&&(l.style.display="none");var n=document.createElement("option");n.setAttribute("value","list");mxUtils.write(n,mxResources.get("list"));"plantUml"!=b&&l.appendChild(n);null!=b&&"fromText"!=b||n.setAttribute("selected","selected");n=document.createElement("option");n.setAttribute("value","table");mxUtils.write(n,mxResources.get("formatSql"));"formatSql"==b&&(l.appendChild(n),n.setAttribute("selected","selected"));
-n=document.createElement("option");n.setAttribute("value","diagram");mxUtils.write(n,mxResources.get("diagram"));"plantUml"!=b&&l.appendChild(n);n=document.createElement("option");n.setAttribute("value","plantUmlSvg");mxUtils.write(n,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");"plantUml"==b&&n.setAttribute("selected","selected");var f=document.createElement("option");f.setAttribute("value","plantUmlPng");mxUtils.write(f,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+
-")");var h=document.createElement("option");h.setAttribute("value","plantUmlTxt");mxUtils.write(h,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!a.isOffline()&&"plantUml"==b&&(l.appendChild(n),l.appendChild(f),l.appendChild(h));var m=e();k.value=m;c.appendChild(k);this.init=function(){k.focus()};Graph.fileSupport&&(k.addEventListener("dragover",function(a){a.stopPropagation();a.preventDefault()},!1),k.addEventListener("drop",function(a){a.stopPropagation();
-a.preventDefault();if(0<a.dataTransfer.files.length){a=a.dataTransfer.files[0];var b=new FileReader;b.onload=function(a){k.value=a.target.result};b.readAsText(a)}},!1));c.appendChild(l);mxEvent.addListener(l,"change",function(){var a=e();if(0==k.value.length||k.value==m)m=a,k.value=m});b=mxUtils.button(mxResources.get("close"),function(){k.value==m?a.hideDialog():a.confirm(mxResources.get("areYouSure"),function(){a.hideDialog()})});b.className="geBtn";a.editor.cancelFirst&&c.appendChild(b);n=mxUtils.button(mxResources.get("insert"),
-function(){a.hideDialog();d(k.value,l.value)});c.appendChild(n);n.className="geBtn gePrimaryBtn";a.editor.cancelFirst||c.appendChild(b);this.container=c},NewDialog=function(a,c,b,d,e,g,k,l,n,f,h,m,p,q,u){function v(){var a=!0;if(null!=O)for(;B<O.length&&(a||0!=mxUtils.mod(B,30));)a=O[B++],w(a.url,a.libs,a.title,a.tooltip?a.tooltip:a.title,a.select,a.imgUrl,a.info,a.onClick,a.preview),a=!1}function x(){if(aa)b||a.hideDialog(),q(aa,Z,G.value);else if(d)b||a.hideDialog(),d(P,G.value);else{var c=G.value;
-null!=c&&0<c.length&&a.pickFolder(a.mode,function(b){a.createFile(c,P,null!=T&&0<T.length?T:null,null,function(){a.hideDialog()},null,b)},a.mode!=App.MODE_GOOGLE||null==a.stateArg||null==a.stateArg.folderId)}}function t(a,b,c,f,h){null!=S&&(S.style.backgroundColor="transparent",S.style.border="1px solid transparent");F.removeAttribute("disabled");P=b;T=c;S=a;aa=f;Z=h;S.style.backgroundColor=l;S.style.border=n}function w(b,c,f,h,d,m,e,g,p){var q=document.createElement("div");q.className="geTemplate";
-q.style.height=Q+"px";q.style.width=L+"px";null!=h&&0<h.length&&q.setAttribute("title",h);if(null!=m)q.style.backgroundImage="url("+m+")",q.style.backgroundSize="contain",q.style.backgroundPosition="center center",q.style.backgroundRepeat="no-repeat",mxEvent.addListener(q,"click",function(a){t(q,null,null,b,e)}),mxEvent.addListener(q,"dblclick",function(a){x()});else if(null!=b&&0<b.length){f=p||TEMPLATE_PATH+"/"+b.substring(0,b.length-4)+".png";q.style.backgroundImage="url("+f+")";q.style.backgroundPosition=
+"plantUmlSvg"==l.value||"plantUmlTxt"==l.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 g=a.editor.graph.getFreeInsertPoint();c=document.createElement("div");c.style.textAlign="right";var h=document.createElement("textarea");h.style.resize="none";h.style.width="100%";h.style.height=
+"354px";h.style.marginBottom="16px";var l=document.createElement("select");"formatSql"==b&&(l.style.display="none");var m=document.createElement("option");m.setAttribute("value","list");mxUtils.write(m,mxResources.get("list"));"plantUml"!=b&&l.appendChild(m);null!=b&&"fromText"!=b||m.setAttribute("selected","selected");m=document.createElement("option");m.setAttribute("value","table");mxUtils.write(m,mxResources.get("formatSql"));"formatSql"==b&&(l.appendChild(m),m.setAttribute("selected","selected"));
+m=document.createElement("option");m.setAttribute("value","diagram");mxUtils.write(m,mxResources.get("diagram"));"plantUml"!=b&&l.appendChild(m);m=document.createElement("option");m.setAttribute("value","plantUmlSvg");mxUtils.write(m,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");"plantUml"==b&&m.setAttribute("selected","selected");var f=document.createElement("option");f.setAttribute("value","plantUmlPng");mxUtils.write(f,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+
+")");var k=document.createElement("option");k.setAttribute("value","plantUmlTxt");mxUtils.write(k,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!a.isOffline()&&"plantUml"==b&&(l.appendChild(m),l.appendChild(f),l.appendChild(k));var n=e();h.value=n;c.appendChild(h);this.init=function(){h.focus()};Graph.fileSupport&&(h.addEventListener("dragover",function(a){a.stopPropagation();a.preventDefault()},!1),h.addEventListener("drop",function(a){a.stopPropagation();
+a.preventDefault();if(0<a.dataTransfer.files.length){a=a.dataTransfer.files[0];var b=new FileReader;b.onload=function(a){h.value=a.target.result};b.readAsText(a)}},!1));c.appendChild(l);mxEvent.addListener(l,"change",function(){var a=e();if(0==h.value.length||h.value==n)n=a,h.value=n});b=mxUtils.button(mxResources.get("close"),function(){h.value==n?a.hideDialog():a.confirm(mxResources.get("areYouSure"),function(){a.hideDialog()})});b.className="geBtn";a.editor.cancelFirst&&c.appendChild(b);m=mxUtils.button(mxResources.get("insert"),
+function(){a.hideDialog();d(h.value,l.value)});c.appendChild(m);m.className="geBtn gePrimaryBtn";a.editor.cancelFirst||c.appendChild(b);this.container=c},NewDialog=function(a,c,b,d,e,g,h,l,m,f,k,n,p,q,u){function v(){var a=!0;if(null!=P)for(;C<P.length&&(a||0!=mxUtils.mod(C,30));)a=P[C++],w(a.url,a.libs,a.title,a.tooltip?a.tooltip:a.title,a.select,a.imgUrl,a.info,a.onClick,a.preview),a=!1}function x(){if(Z)b||a.hideDialog(),q(Z,Y,G.value);else if(d)b||a.hideDialog(),d(Q,G.value);else{var c=G.value;
+null!=c&&0<c.length&&a.pickFolder(a.mode,function(b){a.createFile(c,Q,null!=T&&0<T.length?T:null,null,function(){a.hideDialog()},null,b)},a.mode!=App.MODE_GOOGLE||null==a.stateArg||null==a.stateArg.folderId)}}function t(a,b,c,f,k){null!=S&&(S.style.backgroundColor="transparent",S.style.border="1px solid transparent");F.removeAttribute("disabled");Q=b;T=c;S=a;Z=f;Y=k;S.style.backgroundColor=l;S.style.border=m}function w(b,c,f,k,d,n,e,g,p){var q=document.createElement("div");q.className="geTemplate";
+q.style.height=R+"px";q.style.width=L+"px";null!=k&&0<k.length&&q.setAttribute("title",k);if(null!=n)q.style.backgroundImage="url("+n+")",q.style.backgroundSize="contain",q.style.backgroundPosition="center center",q.style.backgroundRepeat="no-repeat",mxEvent.addListener(q,"click",function(a){t(q,null,null,b,e)}),mxEvent.addListener(q,"dblclick",function(a){x()});else if(null!=b&&0<b.length){f=p||TEMPLATE_PATH+"/"+b.substring(0,b.length-4)+".png";q.style.backgroundImage="url("+f+")";q.style.backgroundPosition=
"center center";q.style.backgroundRepeat="no-repeat";var D=!1;mxEvent.addListener(q,"click",function(f){F.setAttribute("disabled","disabled");q.style.backgroundColor="transparent";q.style.border="1px solid transparent";f=b;f=/^https?:\/\//.test(f)&&!a.isCorsEnabledForUrl(f)?PROXY_URL+"?url="+encodeURIComponent(f):TEMPLATE_PATH+"/"+f;mxUtils.get(f,mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()&&(t(q,a.getText(),c),D&&x())}))});mxEvent.addListener(q,"dblclick",function(a){D=!0})}else q.innerHTML=
-'<table width="100%" height="100%" style="line-height:1em;"><tr><td align="center" valign="middle">'+mxResources.get(f)+"</td></tr></table>",d&&t(q),null!=g?mxEvent.addListener(q,"click",g):(mxEvent.addListener(q,"click",function(a){t(q)}),mxEvent.addListener(q,"dblclick",function(a){x()}));N.appendChild(q)}function D(){mxEvent.addListener(N,"scroll",function(a){N.scrollTop+N.clientHeight>=N.scrollHeight&&(v(),mxEvent.consume(a))});var a=null,b;for(b in U){var c=document.createElement("div"),h=mxResources.get(b),
-d=U[b];null==h&&(h=b.substring(0,1).toUpperCase()+b.substring(1));18<h.length&&(h=h.substring(0,18)+"&hellip;");c.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;";c.setAttribute("title",h+" ("+d.length+")");mxUtils.write(c,c.getAttribute("title"));null!=f&&(c.style.padding=f);Y.appendChild(c);null==a&&(a=c,a.style.backgroundColor=k);(function(b,f){mxEvent.addListener(c,"click",function(){a!=f&&(a.style.backgroundColor=
-"",a=f,a.style.backgroundColor=k,N.scrollTop=0,N.innerHTML="",B=0,O=U[b],A=null,v())})})(b,c)}v()}b=null!=b?b:!0;e=null!=e?e:!1;k=null!=k?k:"#ebf2f9";l=null!=l?l:"#e6eff8";n=null!=n?n:"1px solid #ccd9ea";h=null!=h?h:EditorUi.templateFile;var C=document.createElement("div");C.style.height="100%";var y=document.createElement("div");y.style.whiteSpace="nowrap";y.style.height="46px";b&&C.appendChild(y);var z=document.createElement("img");z.setAttribute("border","0");z.setAttribute("align","absmiddle");
+'<table width="100%" height="100%" style="line-height:1em;"><tr><td align="center" valign="middle">'+mxResources.get(f)+"</td></tr></table>",d&&t(q),null!=g?mxEvent.addListener(q,"click",g):(mxEvent.addListener(q,"click",function(a){t(q)}),mxEvent.addListener(q,"dblclick",function(a){x()}));N.appendChild(q)}function D(){mxEvent.addListener(N,"scroll",function(a){N.scrollTop+N.clientHeight>=N.scrollHeight&&(v(),mxEvent.consume(a))});var a=null,b;for(b in U){var c=document.createElement("div"),k=mxResources.get(b),
+d=U[b];null==k&&(k=b.substring(0,1).toUpperCase()+b.substring(1));18<k.length&&(k=k.substring(0,18)+"&hellip;");c.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;";c.setAttribute("title",k+" ("+d.length+")");mxUtils.write(c,c.getAttribute("title"));null!=f&&(c.style.padding=f);X.appendChild(c);null==a&&(a=c,a.style.backgroundColor=h);(function(b,f){mxEvent.addListener(c,"click",function(){a!=f&&(a.style.backgroundColor=
+"",a=f,a.style.backgroundColor=h,N.scrollTop=0,N.innerHTML="",C=0,P=U[b],A=null,v())})})(b,c)}v()}b=null!=b?b:!0;e=null!=e?e:!1;h=null!=h?h:"#ebf2f9";l=null!=l?l:"#e6eff8";m=null!=m?m:"1px solid #ccd9ea";k=null!=k?k:EditorUi.templateFile;var B=document.createElement("div");B.style.height="100%";var y=document.createElement("div");y.style.whiteSpace="nowrap";y.style.height="46px";b&&B.appendChild(y);var z=document.createElement("img");z.setAttribute("border","0");z.setAttribute("align","absmiddle");
z.style.width="40px";z.style.height="40px";z.style.marginRight="10px";z.style.paddingBottom="4px";z.src=a.mode==App.MODE_GOOGLE?IMAGE_PATH+"/google-drive-logo.svg":a.mode==App.MODE_DROPBOX?IMAGE_PATH+"/dropbox-logo.svg":a.mode==App.MODE_ONEDRIVE?IMAGE_PATH+"/onedrive-logo.svg":a.mode==App.MODE_GITHUB?IMAGE_PATH+"/github-logo.svg":a.mode==App.MODE_TRELLO?IMAGE_PATH+"/trello-logo.svg":a.mode==App.MODE_BROWSER?IMAGE_PATH+"/osa_database.png":IMAGE_PATH+"/osa_drive-harddisk.png";!c&&b&&y.appendChild(z);
b&&mxUtils.write(y,(null==a.mode||a.mode==App.MODE_GOOGLE||a.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+":");z=".xml";a.mode==App.MODE_GOOGLE&&null!=a.drive?z=a.drive.extension:a.mode==App.MODE_DROPBOX&&null!=a.dropbox?z=a.dropbox.extension:a.mode==App.MODE_ONEDRIVE&&null!=a.oneDrive?z=a.oneDrive.extension:a.mode==App.MODE_GITHUB&&null!=a.gitHub?z=a.gitHub.extension:a.mode==App.MODE_TRELLO&&null!=a.trello&&(z=a.trello.extension);var G=document.createElement("input");
-G.setAttribute("value",a.defaultFilename+z);G.style.marginRight="20px";G.style.marginLeft="10px";G.style.width=c?"220px":"430px";this.init=function(){b&&(G.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?G.select():document.execCommand("selectAll",!1,null))};b&&y.appendChild(G);var y=!1,B=0,F=mxUtils.button(mxResources.get("create"),function(){F.setAttribute("disabled","disabled");x();F.removeAttribute("disabled")});F.className="geBtn gePrimaryBtn";if(m||p){var I=
-[],A=null,E=function(a){F.setAttribute("disabled","disabled");for(var b=0;b<I.length;b++)I[b].className=b==a?"geBtn gePrimaryBtn":"geBtn"},y=!0,z=document.createElement("div");z.style.whiteSpace="nowrap";z.style.height="30px";C.appendChild(z);var H=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){Y.style.display="";N.style.left="160px";E(0);N.scrollTop=0;N.innerHTML="";B=0;A!=O&&(O=A,v(),A=null)});I.push(H);z.appendChild(H);var M=function(a){Y.style.display="none";N.style.left=
-"30px";E(a?-1:1);null==A&&(A=O);N.scrollTop=0;N.innerHTML="";var b=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});b.spin(N);B=0;var c=function(a,c){b.stop();O=a;c?N.innerHTML=c:0==a.length?N.innerHTML=mxResources.get("noDiagrams",null,"No Diagrams Found"):(N.innerHTML="",v())};a?p(K.value,c):m(c)};m&&(H=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){M()}),z.appendChild(H),I.push(H));if(p){H=
-document.createElement("span");H.style.marginLeft="10px";H.innerHTML=mxResources.get("search")+":";z.appendChild(H);var K=document.createElement("input");K.style.marginRight="10px";K.style.marginLeft="10px";K.style.width="220px";mxEvent.addListener(K,"keypress",function(a){13==a.keyCode&&M(!0)});z.appendChild(K);H=mxUtils.button(mxResources.get("search"),function(){M(!0)});H.className="geBtn";z.appendChild(H)}E(0)}var T=null,P=null,S=null,aa=null,Z=null,N=document.createElement("div");N.style.border=
-"1px solid #d3d3d3";N.style.position="absolute";N.style.left="160px";N.style.right="34px";y=(b?72:40)+(y?30:0);N.style.top=y+"px";N.style.bottom="68px";N.style.margin="6px 0 0 -1px";N.style.padding="6px";N.style.overflow="auto";var Y=document.createElement("div");Y.style.cssText="position:absolute;left:30px;width:128px;top:"+y+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";var Q=140,L=140,U={},R=1;U.basic=[{title:"blankDiagram",select:!0}];var O=U.basic;if(!c){C.appendChild(Y);
-C.appendChild(N);var V=!1;/^https?:\/\//.test(h)&&!a.isCorsEnabledForUrl(h)&&(h=PROXY_URL+"?url="+encodeURIComponent(h));mxUtils.get(h,function(a){if(!V){V=!0;for(a=a.getXml().documentElement.firstChild;null!=a;){if("undefined"!==typeof a.getAttribute){var b=a.getAttribute("url");if(null!=b){var c=a.getAttribute("section");null==c&&(c=b.indexOf("/"),c=b.substring(0,c));b=U[c];null==b&&(R++,b=[],U[c]=b);b.push({url:a.getAttribute("url"),libs:a.getAttribute("libs"),title:a.getAttribute("title"),tooltip:a.getAttribute("url"),
-preview:a.getAttribute("preview")})}}a=a.nextSibling}D()}})}mxEvent.addListener(G,"keypress",function(b){a.dialog.container.firstChild==C&&13==b.keyCode&&x()});h=document.createElement("div");h.style.marginTop=c?"4px":"16px";h.style.textAlign="right";h.style.position="absolute";h.style.left="40px";h.style.bottom="24px";h.style.right="40px";y=mxUtils.button(mxResources.get("cancel"),function(){null!=g&&g();a.hideDialog(!0)});y.className="geBtn";!a.editor.cancelFirst||e&&null==g||h.appendChild(y);c||
-a.isOffline()||!b||null!=d||e||(z=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://support.draw.io/display/DO/Creating+and+Opening+Files")}),z.className="geBtn",h.appendChild(z));c||"1"==urlParams.embed||e||(c=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var b=new FilenameDialog(a,"",mxResources.get("create"),function(b){null!=b&&0<b.length&&(b=a.getUrl(window.location.pathname+"?mode="+a.mode+"&title="+encodeURIComponent(G.value)+"&create="+encodeURIComponent(b)),
-null==a.getCurrentFile()?window.location.href=b:window.openWindow(b))},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()}),c.className="geBtn",h.appendChild(c));Graph.fileSupport&&u&&(u=mxUtils.button(mxResources.get("import"),function(){var b=document.createElement("input");b.setAttribute("multiple","multiple");b.setAttribute("type","file");mxEvent.addListener(b,"change",function(c){a.openFiles(b.files,!0)});b.click()}),u.className="geBtn",h.appendChild(u));h.appendChild(F);
-a.editor.cancelFirst||null!=d||e&&null==g||h.appendChild(y);C.appendChild(h);this.container=C},CreateDialog=function(a,c,b,d,e,g,k,l,n,f,h,m,p,q,u){function v(b,f,h,d){function e(){mxEvent.addListener(t,"click",function(){var b=h;if(k){var f=D.value,d=f.lastIndexOf(".");if(0>c.lastIndexOf(".")&&0>d){var b=null!=b?b:z.value,m="";b==App.MODE_GOOGLE?m=a.drive.extension:b==App.MODE_GITHUB?m=a.gitHub.extension:b==App.MODE_TRELLO?m=a.trello.extension:b==App.MODE_DROPBOX?m=a.dropbox.extension:b==App.MODE_ONEDRIVE?
-m=a.oneDrive.extension:b==App.MODE_DEVICE&&(m=".xml");0<=d&&(f=f.substring(0,d));D.value=f+m}}x(h)})}var t=document.createElement("a");t.style.overflow="hidden";var g=document.createElement("img");g.src=b;g.setAttribute("border","0");g.setAttribute("align","absmiddle");g.style.width="60px";g.style.height="60px";g.style.paddingBottom="6px";t.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";t.className="geBaseButton";t.style.position="relative";t.style.margin="4px";t.style.padding="8px 8px 10px 8px";
+G.setAttribute("value",a.defaultFilename+z);G.style.marginRight="20px";G.style.marginLeft="10px";G.style.width=c?"220px":"430px";this.init=function(){b&&(G.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?G.select():document.execCommand("selectAll",!1,null))};b&&y.appendChild(G);var y=!1,C=0,F=mxUtils.button(mxResources.get("create"),function(){F.setAttribute("disabled","disabled");x();F.removeAttribute("disabled")});F.className="geBtn gePrimaryBtn";if(n||p){var I=
+[],A=null,E=function(a){F.setAttribute("disabled","disabled");for(var b=0;b<I.length;b++)I[b].className=b==a?"geBtn gePrimaryBtn":"geBtn"},y=!0,z=document.createElement("div");z.style.whiteSpace="nowrap";z.style.height="30px";B.appendChild(z);var H=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){X.style.display="";N.style.left="160px";E(0);N.scrollTop=0;N.innerHTML="";C=0;A!=P&&(P=A,v(),A=null)});I.push(H);z.appendChild(H);var M=function(a){X.style.display="none";N.style.left=
+"30px";E(a?-1:1);null==A&&(A=P);N.scrollTop=0;N.innerHTML="";var b=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});b.spin(N);C=0;var c=function(a,c){b.stop();P=a;c?N.innerHTML=c:0==a.length?N.innerHTML=mxResources.get("noDiagrams",null,"No Diagrams Found"):(N.innerHTML="",v())};a?p(K.value,c):n(c)};n&&(H=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){M()}),z.appendChild(H),I.push(H));if(p){H=
+document.createElement("span");H.style.marginLeft="10px";H.innerHTML=mxResources.get("search")+":";z.appendChild(H);var K=document.createElement("input");K.style.marginRight="10px";K.style.marginLeft="10px";K.style.width="220px";mxEvent.addListener(K,"keypress",function(a){13==a.keyCode&&M(!0)});z.appendChild(K);H=mxUtils.button(mxResources.get("search"),function(){M(!0)});H.className="geBtn";z.appendChild(H)}E(0)}var T=null,Q=null,S=null,Z=null,Y=null,N=document.createElement("div");N.style.border=
+"1px solid #d3d3d3";N.style.position="absolute";N.style.left="160px";N.style.right="34px";y=(b?72:40)+(y?30:0);N.style.top=y+"px";N.style.bottom="68px";N.style.margin="6px 0 0 -1px";N.style.padding="6px";N.style.overflow="auto";var X=document.createElement("div");X.style.cssText="position:absolute;left:30px;width:128px;top:"+y+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";var R=140,L=140,U={},O=1;U.basic=[{title:"blankDiagram",select:!0}];var P=U.basic;if(!c){B.appendChild(X);
+B.appendChild(N);var V=!1;/^https?:\/\//.test(k)&&!a.isCorsEnabledForUrl(k)&&(k=PROXY_URL+"?url="+encodeURIComponent(k));mxUtils.get(k,function(a){if(!V){V=!0;for(a=a.getXml().documentElement.firstChild;null!=a;){if("undefined"!==typeof a.getAttribute){var b=a.getAttribute("url");if(null!=b){var c=a.getAttribute("section");null==c&&(c=b.indexOf("/"),c=b.substring(0,c));b=U[c];null==b&&(O++,b=[],U[c]=b);b.push({url:a.getAttribute("url"),libs:a.getAttribute("libs"),title:a.getAttribute("title"),tooltip:a.getAttribute("url"),
+preview:a.getAttribute("preview")})}}a=a.nextSibling}D()}})}mxEvent.addListener(G,"keypress",function(b){a.dialog.container.firstChild==B&&13==b.keyCode&&x()});k=document.createElement("div");k.style.marginTop=c?"4px":"16px";k.style.textAlign="right";k.style.position="absolute";k.style.left="40px";k.style.bottom="24px";k.style.right="40px";y=mxUtils.button(mxResources.get("cancel"),function(){null!=g&&g();a.hideDialog(!0)});y.className="geBtn";!a.editor.cancelFirst||e&&null==g||k.appendChild(y);c||
+a.isOffline()||!b||null!=d||e||(z=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://support.draw.io/display/DO/Creating+and+Opening+Files")}),z.className="geBtn",k.appendChild(z));c||"1"==urlParams.embed||e||(c=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var b=new FilenameDialog(a,"",mxResources.get("create"),function(b){null!=b&&0<b.length&&(b=a.getUrl(window.location.pathname+"?mode="+a.mode+"&title="+encodeURIComponent(G.value)+"&create="+encodeURIComponent(b)),
+null==a.getCurrentFile()?window.location.href=b:window.openWindow(b))},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()}),c.className="geBtn",k.appendChild(c));Graph.fileSupport&&u&&(u=mxUtils.button(mxResources.get("import"),function(){var b=document.createElement("input");b.setAttribute("multiple","multiple");b.setAttribute("type","file");mxEvent.addListener(b,"change",function(c){a.openFiles(b.files,!0)});b.click()}),u.className="geBtn",k.appendChild(u));k.appendChild(F);
+a.editor.cancelFirst||null!=d||e&&null==g||k.appendChild(y);B.appendChild(k);this.container=B},CreateDialog=function(a,c,b,d,e,g,h,l,m,f,k,n,p,q,u){function v(b,f,k,d){function e(){mxEvent.addListener(t,"click",function(){var b=k;if(h){var f=D.value,d=f.lastIndexOf(".");if(0>c.lastIndexOf(".")&&0>d){var b=null!=b?b:z.value,n="";b==App.MODE_GOOGLE?n=a.drive.extension:b==App.MODE_GITHUB?n=a.gitHub.extension:b==App.MODE_TRELLO?n=a.trello.extension:b==App.MODE_DROPBOX?n=a.dropbox.extension:b==App.MODE_ONEDRIVE?
+n=a.oneDrive.extension:b==App.MODE_DEVICE&&(n=".xml");0<=d&&(f=f.substring(0,d));D.value=f+n}}x(k)})}var t=document.createElement("a");t.style.overflow="hidden";var g=document.createElement("img");g.src=b;g.setAttribute("border","0");g.setAttribute("align","absmiddle");g.style.width="60px";g.style.height="60px";g.style.paddingBottom="6px";t.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";t.className="geBaseButton";t.style.position="relative";t.style.margin="4px";t.style.padding="8px 8px 10px 8px";
t.style.whiteSpace="nowrap";t.appendChild(g);mxClient.IS_QUIRKS&&(t.style.cssFloat="left",t.style.zoom="1");t.style.color="gray";t.style.fontSize="11px";var p=document.createElement("div");t.appendChild(p);mxUtils.write(p,f);if(null!=d&&null==a[d]){g.style.visibility="hidden";mxUtils.setOpacity(p,10);var q=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});q.spin(t);var u=window.setTimeout(function(){null==a[d]&&(q.stop(),
-t.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[d]&&(window.clearTimeout(u),mxUtils.setOpacity(p,100),g.style.visibility="",q.stop(),e())}))}else e();C.appendChild(t);++y==m&&(mxUtils.br(C),y=0)}function x(c){var f=D.value;if(null==c||null!=f&&0<f.length)a.hideDialog(),b(f,c)}k=null!=k?k:!0;l=null!=l?l:!0;m=null!=m?m:4;var t=document.createElement("div");null==d&&a.addLanguageMenu(t);var w=document.createElement("h2");mxUtils.write(w,e||mxResources.get("create"));
+t.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[d]&&(window.clearTimeout(u),mxUtils.setOpacity(p,100),g.style.visibility="",q.stop(),e())}))}else e();B.appendChild(t);++y==n&&(mxUtils.br(B),y=0)}function x(c){var f=D.value;if(null==c||null!=f&&0<f.length)a.hideDialog(),b(f,c)}h=null!=h?h:!0;l=null!=l?l:!0;n=null!=n?n:4;var t=document.createElement("div");null==d&&a.addLanguageMenu(t);var w=document.createElement("h2");mxUtils.write(w,e||mxResources.get("create"));
w.style.marginTop="0px";w.style.marginBottom="24px";t.appendChild(w);mxUtils.write(t,mxResources.get("filename")+":");var D=document.createElement("input");D.setAttribute("value",c);D.style.width="280px";D.style.marginLeft="10px";D.style.marginBottom="20px";this.init=function(){D.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?D.select():document.execCommand("selectAll",!1,null)};t.appendChild(D);null!=p&&null!=q&&"image/"==q.substring(0,6)&&(D.style.width="160px",
e=null,"image/svg+xml"==q&&mxClient.IS_SVG?(e=document.createElement("div"),e.innerHTML=mxUtils.trim(p),p=e.getElementsByTagName("svg")[0],q=parseInt(p.getAttribute("width")),u=parseInt(p.getAttribute("height")),p.setAttribute("viewBox","0 0 "+q+" "+u),p.setAttribute("width","120px"),p.setAttribute("height","80px")):(e=document.createElement("img"),e.setAttribute("src","data:"+q+(u?";base64,":";utf8,")+p)),e.style.position="absolute",e.style.top="70px",e.style.right="100px",e.style.maxWidth="120px",
-e.style.maxHeight="80px",mxUtils.setPrefixedStyle(e.style,"transform","translate(50%,-50%)"),t.appendChild(e),n&&Editor.popupsAllowed&&(e.style.cursor="pointer",mxEvent.addListener(e,"click",function(){x("_blank")})));mxUtils.br(t);var C=document.createElement("div");C.style.textAlign="center";var y=0;C.style.marginTop="6px";t.appendChild(C);var z=document.createElement("select");z.style.marginLeft="10px";a.isOfflineApp()||a.isOffline()||("function"===typeof window.DriveClient&&(e=document.createElement("option"),
+e.style.maxHeight="80px",mxUtils.setPrefixedStyle(e.style,"transform","translate(50%,-50%)"),t.appendChild(e),m&&Editor.popupsAllowed&&(e.style.cursor="pointer",mxEvent.addListener(e,"click",function(){x("_blank")})));mxUtils.br(t);var B=document.createElement("div");B.style.textAlign="center";var y=0;B.style.marginTop="6px";t.appendChild(B);var z=document.createElement("select");z.style.marginLeft="10px";a.isOfflineApp()||a.isOffline()||("function"===typeof window.DriveClient&&(e=document.createElement("option"),
e.setAttribute("value",App.MODE_GOOGLE),mxUtils.write(e,mxResources.get("googleDrive")),z.appendChild(e),v(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(e=document.createElement("option"),e.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(e,mxResources.get("oneDrive")),z.appendChild(e),a.mode==App.MODE_ONEDRIVE&&e.setAttribute("selected","selected"),v(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),
App.MODE_ONEDRIVE,"oneDrive")),"function"===typeof window.DropboxClient&&(e=document.createElement("option"),e.setAttribute("value",App.MODE_DROPBOX),mxUtils.write(e,mxResources.get("dropbox")),z.appendChild(e),a.mode==App.MODE_DROPBOX&&e.setAttribute("selected","selected"),v(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),null!=a.gitHub&&(e=document.createElement("option"),e.setAttribute("value",App.MODE_GITHUB),mxUtils.write(e,mxResources.get("github")),z.appendChild(e),
v(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),null!=a.trello&&(e=document.createElement("option"),e.setAttribute("value",App.MODE_TRELLO),mxUtils.write(e,mxResources.get("trello")),z.appendChild(e),v(IMAGE_PATH+"/trello-logo.svg",mxResources.get("trello"),App.MODE_TRELLO,"trello")));if(!Editor.useLocalStorage||"device"==urlParams.storage||null!=a.getCurrentFile()&&!mxClient.IS_IOS)e=document.createElement("option"),e.setAttribute("value",App.MODE_DEVICE),mxUtils.write(e,
-mxResources.get("device")),z.appendChild(e),a.mode!=App.MODE_DEVICE&&l||e.setAttribute("selected","selected"),h&&v(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);l&&isLocalStorage&&"0"!=urlParams.browser&&(l=document.createElement("option"),l.setAttribute("value",App.MODE_BROWSER),mxUtils.write(l,mxResources.get("browser")),z.appendChild(l),a.mode==App.MODE_BROWSER&&l.setAttribute("selected","selected"),v(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));
+mxResources.get("device")),z.appendChild(e),a.mode!=App.MODE_DEVICE&&l||e.setAttribute("selected","selected"),k&&v(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);l&&isLocalStorage&&"0"!=urlParams.browser&&(l=document.createElement("option"),l.setAttribute("value",App.MODE_BROWSER),mxUtils.write(l,mxResources.get("browser")),z.appendChild(l),a.mode==App.MODE_BROWSER&&l.setAttribute("selected","selected"),v(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));
l=document.createElement("div");l.style.marginTop="26px";l.style.textAlign="center";null!=f&&(e=mxUtils.button(mxResources.get("help"),function(){a.openLink(f)}),e.className="geBtn",l.appendChild(e));e=mxUtils.button(mxResources.get("cancel"),function(){null!=d?d():(a.fileLoaded(null),a.hideDialog(),window.close(),window.location.href=a.getUrl())});e.className="geBtn";a.editor.cancelFirst&&l.appendChild(e);null==d&&(p=mxUtils.button(mxResources.get("decideLater"),function(){x(null)}),p.className=
-"geBtn",l.appendChild(p));n&&Editor.popupsAllowed&&(n=mxUtils.button(mxResources.get("openInNewWindow"),function(){x("_blank")}),n.className="geBtn",l.appendChild(n));mxClient.IS_IOS||(g=mxUtils.button(g||mxResources.get("create"),function(){x(h?"download":App.MODE_DEVICE)}),g.className="geBtn gePrimaryBtn",l.appendChild(g));a.editor.cancelFirst||l.appendChild(e);mxEvent.addListener(D,"keypress",function(b){13==b.keyCode?x(App.MODE_DEVICE):27==b.keyCode&&(a.fileLoaded(null),a.hideDialog(),window.close())});
-t.appendChild(l);this.container=t},PopupDialog=function(a,c,b,d,e){e=null!=e?e:!0;var g=document.createElement("div");g.style.textAlign="left";mxUtils.write(g,mxResources.get("fileOpenLocation"));mxUtils.br(g);mxUtils.br(g);var k=mxUtils.button(mxResources.get("openInThisWindow"),function(){e&&a.hideDialog();null!=d&&d()});k.className="geBtn";k.style.marginBottom="8px";k.style.width="280px";g.appendChild(k);mxUtils.br(g);var l=mxUtils.button(mxResources.get("openInNewWindow"),function(){e&&a.hideDialog();
-null!=b&&b();a.openLink(c,null,!0)});l.className="geBtn gePrimaryBtn";l.style.width=k.style.width;g.appendChild(l);mxUtils.br(g);mxUtils.br(g);mxUtils.write(g,mxResources.get("allowPopups"));this.container=g},ImageDialog=function(a,c,b,d,e,g){g=null!=g?g:!0;var k=a.editor.graph,l=document.createElement("div");mxUtils.write(l,c);c=document.createElement("div");c.className="geTitle";c.style.backgroundColor="transparent";c.style.borderColor="transparent";c.style.whiteSpace="nowrap";c.style.textOverflow=
-"clip";c.style.cursor="default";mxClient.IS_VML||(c.style.paddingRight="20px");var n=document.createElement("input");n.setAttribute("value",b);n.setAttribute("type","text");n.setAttribute("spellcheck","false");n.setAttribute("autocorrect","off");n.setAttribute("autocomplete","off");n.setAttribute("autocapitalize","off");n.style.marginTop="6px";n.style.width=(Graph.fileSupport?420:340)+(mxClient.IS_QUIRKS?20:-20)+"px";n.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";n.style.backgroundRepeat=
-"no-repeat";n.style.backgroundPosition="100% 50%";n.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=mxClient.IS_VML?"inline":"inline-block";b.style.top=(mxClient.IS_VML?0:3)+"px";b.style.background="url('"+a.editor.transparentImage+"')";mxEvent.addListener(b,"click",function(){n.value="";n.focus()});c.appendChild(n);
-c.appendChild(b);l.appendChild(c);var f=function(b,c,f,h){var m="data:"==b.substring(0,5);!a.isOffline()||m&&"undefined"===typeof chrome?0<b.length&&a.spinner.spin(document.body,mxResources.get("inserting"))?a.loadImage(b,function(m){a.spinner.stop();a.hideDialog();var e=!1===h?1:null!=c&&null!=f?Math.max(c/m.width,f/m.height):Math.min(1,Math.min(520/m.width,520/m.height));g&&(b=a.convertDataUri(b));d(b,Math.round(Number(m.width)*e),Math.round(Number(m.height)*e))},function(){a.spinner.stop();d(null);
-a.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(a.hideDialog(),d(b)):(b=a.convertDataUri(b),c=null==c?120:c,f=null==f?100:f,a.hideDialog(),d(b,c,f))},h=function(b,c){if(null!=b){var h=e?null:k.getModel().getGeometry(k.getSelectionCell());null!=h?f(b,h.width,h.height,c):f(b,null,null,c)}else a.hideDialog(),d(null)};this.init=function(){n.focus();if(Graph.fileSupport){n.setAttribute("placeholder",mxResources.get("dragImagesHere"));var b=l.parentNode,c=
+"geBtn",l.appendChild(p));m&&Editor.popupsAllowed&&(m=mxUtils.button(mxResources.get("openInNewWindow"),function(){x("_blank")}),m.className="geBtn",l.appendChild(m));mxClient.IS_IOS||(g=mxUtils.button(g||mxResources.get("create"),function(){x(k?"download":App.MODE_DEVICE)}),g.className="geBtn gePrimaryBtn",l.appendChild(g));a.editor.cancelFirst||l.appendChild(e);mxEvent.addListener(D,"keypress",function(b){13==b.keyCode?x(App.MODE_DEVICE):27==b.keyCode&&(a.fileLoaded(null),a.hideDialog(),window.close())});
+t.appendChild(l);this.container=t},PopupDialog=function(a,c,b,d,e){e=null!=e?e:!0;var g=document.createElement("div");g.style.textAlign="left";mxUtils.write(g,mxResources.get("fileOpenLocation"));mxUtils.br(g);mxUtils.br(g);var h=mxUtils.button(mxResources.get("openInThisWindow"),function(){e&&a.hideDialog();null!=d&&d()});h.className="geBtn";h.style.marginBottom="8px";h.style.width="280px";g.appendChild(h);mxUtils.br(g);var l=mxUtils.button(mxResources.get("openInNewWindow"),function(){e&&a.hideDialog();
+null!=b&&b();a.openLink(c,null,!0)});l.className="geBtn gePrimaryBtn";l.style.width=h.style.width;g.appendChild(l);mxUtils.br(g);mxUtils.br(g);mxUtils.write(g,mxResources.get("allowPopups"));this.container=g},ImageDialog=function(a,c,b,d,e,g){g=null!=g?g:!0;var h=a.editor.graph,l=document.createElement("div");mxUtils.write(l,c);c=document.createElement("div");c.className="geTitle";c.style.backgroundColor="transparent";c.style.borderColor="transparent";c.style.whiteSpace="nowrap";c.style.textOverflow=
+"clip";c.style.cursor="default";mxClient.IS_VML||(c.style.paddingRight="20px");var m=document.createElement("input");m.setAttribute("value",b);m.setAttribute("type","text");m.setAttribute("spellcheck","false");m.setAttribute("autocorrect","off");m.setAttribute("autocomplete","off");m.setAttribute("autocapitalize","off");m.style.marginTop="6px";m.style.width=(Graph.fileSupport?420:340)+(mxClient.IS_QUIRKS?20:-20)+"px";m.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";m.style.backgroundRepeat=
+"no-repeat";m.style.backgroundPosition="100% 50%";m.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=mxClient.IS_VML?"inline":"inline-block";b.style.top=(mxClient.IS_VML?0:3)+"px";b.style.background="url('"+a.editor.transparentImage+"')";mxEvent.addListener(b,"click",function(){m.value="";m.focus()});c.appendChild(m);
+c.appendChild(b);l.appendChild(c);var f=function(b,c,f,k){var n="data:"==b.substring(0,5);!a.isOffline()||n&&"undefined"===typeof chrome?0<b.length&&a.spinner.spin(document.body,mxResources.get("inserting"))?a.loadImage(b,function(n){a.spinner.stop();a.hideDialog();var e=!1===k?1:null!=c&&null!=f?Math.max(c/n.width,f/n.height):Math.min(1,Math.min(520/n.width,520/n.height));g&&(b=a.convertDataUri(b));d(b,Math.round(Number(n.width)*e),Math.round(Number(n.height)*e))},function(){a.spinner.stop();d(null);
+a.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(a.hideDialog(),d(b)):(b=a.convertDataUri(b),c=null==c?120:c,f=null==f?100:f,a.hideDialog(),d(b,c,f))},k=function(b,c){if(null!=b){var k=e?null:h.getModel().getGeometry(h.getSelectionCell());null!=k?f(b,k.width,k.height,c):f(b,null,null,c)}else a.hideDialog(),d(null)};this.init=function(){m.focus();if(Graph.fileSupport){m.setAttribute("placeholder",mxResources.get("dragImagesHere"));var b=l.parentNode,c=
null;mxEvent.addListener(b,"dragleave",function(a){null!=c&&(c.parentNode.removeChild(c),c=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(b,"dragover",mxUtils.bind(this,function(f){null==c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=a.highlightElement(b));f.stopPropagation();f.preventDefault()}));mxEvent.addListener(b,"drop",mxUtils.bind(this,function(b){null!=c&&(c.parentNode.removeChild(c),c=null);if(0<b.dataTransfer.files.length)a.importFiles(b.dataTransfer.files,0,0,a.maxImageSize,
-function(a,b,c,f,d,m,e,g){h(a,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},!mxEvent.isControlDown(b));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")){var f=b.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(f)&&h(decodeURIComponent(f))}b.stopPropagation();b.preventDefault()}),!1)}};b=document.createElement("div");b.style.marginTop=mxClient.IS_QUIRKS?"22px":"14px";b.style.textAlign=
-"right";c=mxUtils.button(mxResources.get("cancel"),function(){a.spinner.stop();a.hideDialog()});c.className="geBtn";a.editor.cancelFirst&&b.appendChild(c);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&&(n.value=a.url));n.focus()};if(Graph.fileSupport){var m=document.createElement("input");m.setAttribute("multiple","multiple");m.setAttribute("type","file");if(null==document.documentMode){mxEvent.addListener(m,
-"change",function(b){a.importFiles(m.files,0,0,a.maxImageSize,function(a,b,c,f,d,m){h(a)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},!0)});var p=mxUtils.button(mxResources.get("open"),function(){m.click()});p.className="geBtn";b.appendChild(p)}}document.createElement("canvas").getContext&&"data:image/"==n.value.substring(0,11)&&"data:image/svg"!=n.value.substring(0,14)&&(p=mxUtils.button(mxResources.get("crop"),function(){var b=new CropImageDialog(a,
-n.value,function(a){n.value=a});a.showDialog(b.container,200,185,!0,!0);b.init()}),p.className="geBtn",b.appendChild(p));"undefined"!=typeof google&&"undefined"!=typeof google.picker&&window.self===window.top&&(p=mxUtils.button(mxResources.get("search"),function(){if(null==a.imageSearchPicker){var b=(new google.picker.PickerBuilder).setLocale(mxLanguage).addView(google.picker.ViewId.IMAGE_SEARCH).enableFeature(google.picker.Feature.NAV_HIDDEN);a.imageSearchPicker=b.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.imageSearchPicker.setVisible(!0)}),
+function(a,b,c,f,d,n,e,g){k(a,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},!mxEvent.isControlDown(b));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")){var f=b.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(f)&&k(decodeURIComponent(f))}b.stopPropagation();b.preventDefault()}),!1)}};b=document.createElement("div");b.style.marginTop=mxClient.IS_QUIRKS?"22px":"14px";b.style.textAlign=
+"right";c=mxUtils.button(mxResources.get("cancel"),function(){a.spinner.stop();a.hideDialog()});c.className="geBtn";a.editor.cancelFirst&&b.appendChild(c);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&&(m.value=a.url));m.focus()};if(Graph.fileSupport){var n=document.createElement("input");n.setAttribute("multiple","multiple");n.setAttribute("type","file");if(null==document.documentMode){mxEvent.addListener(n,
+"change",function(b){a.importFiles(n.files,0,0,a.maxImageSize,function(a,b,c,f,d,n){k(a)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},!0)});var p=mxUtils.button(mxResources.get("open"),function(){n.click()});p.className="geBtn";b.appendChild(p)}}document.createElement("canvas").getContext&&"data:image/"==m.value.substring(0,11)&&"data:image/svg"!=m.value.substring(0,14)&&(p=mxUtils.button(mxResources.get("crop"),function(){var b=new CropImageDialog(a,
+m.value,function(a){m.value=a});a.showDialog(b.container,200,185,!0,!0);b.init()}),p.className="geBtn",b.appendChild(p));"undefined"!=typeof google&&"undefined"!=typeof google.picker&&window.self===window.top&&(p=mxUtils.button(mxResources.get("search"),function(){if(null==a.imageSearchPicker){var b=(new google.picker.PickerBuilder).setLocale(mxLanguage).addView(google.picker.ViewId.IMAGE_SEARCH).enableFeature(google.picker.Feature.NAV_HIDDEN);a.imageSearchPicker=b.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.imageSearchPicker.setVisible(!0)}),
p.className="geBtn",b.appendChild(p),null!=a.drive&&"1"==urlParams.photos&&(p=mxUtils.button(mxResources.get("googlePlus"),function(){a.spinner.spin(document.body,mxResources.get("authorizing"))&&a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();if(null==a.photoPicker){var b=gapi.auth.getToken().access_token,b=(new google.picker.PickerBuilder).setAppId(a.drive.appId).setLocale(mxLanguage).setOAuthToken(b).addView(google.picker.ViewId.PHOTOS).addView(google.picker.ViewId.PHOTO_ALBUMS).addView(google.picker.ViewId.PHOTO_UPLOAD);
-a.photoPicker=b.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.photoPicker.setVisible(!0)}))}),p.className="geBtn",b.appendChild(p)));mxEvent.addListener(n,"keypress",function(a){13==a.keyCode&&h(n.value)});p=mxUtils.button(mxResources.get("apply"),function(){h(n.value)});p.className="geBtn gePrimaryBtn";b.appendChild(p);a.editor.cancelFirst||b.appendChild(c);Graph.fileSupport&&(b.style.marginTop="120px",l.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",l.style.backgroundPosition=
+a.photoPicker=b.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.photoPicker.setVisible(!0)}))}),p.className="geBtn",b.appendChild(p)));mxEvent.addListener(m,"keypress",function(a){13==a.keyCode&&k(m.value)});p=mxUtils.button(mxResources.get("apply"),function(){k(m.value)});p.className="geBtn gePrimaryBtn";b.appendChild(p);a.editor.cancelFirst||b.appendChild(c);Graph.fileSupport&&(b.style.marginTop="120px",l.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",l.style.backgroundPosition=
"center 65%",l.style.backgroundRepeat="no-repeat",c=document.createElement("div"),c.style.position="absolute",c.style.width="420px",c.style.top="58%",c.style.textAlign="center",c.style.fontSize="18px",c.style.color="#a0c3ff",mxUtils.write(c,mxResources.get("dragImagesHere")),l.appendChild(c));l.appendChild(b);this.container=l},LinkDialog=function(a,c,b,d,e){function g(a,b,c){c=mxUtils.button("",c);c.className="geBtn";c.setAttribute("title",b);b=document.createElement("img");b.style.height="26px";
-b.style.width="26px";b.setAttribute("src",a);c.style.minWidth="42px";c.style.verticalAlign="middle";c.appendChild(b);x.appendChild(c)}var k=document.createElement("div");mxUtils.write(k,mxResources.get("editLink")+":");var l=document.createElement("div");l.className="geTitle";l.style.backgroundColor="transparent";l.style.borderColor="transparent";l.style.whiteSpace="nowrap";l.style.textOverflow="clip";l.style.cursor="default";mxClient.IS_VML||(l.style.paddingRight="20px");var n=document.createElement("input");
-n.setAttribute("placeholder",mxResources.get("dragUrlsHere"));n.setAttribute("type","text");n.style.marginTop="6px";n.style.width="440px";n.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";n.style.backgroundRepeat="no-repeat";n.style.backgroundPosition="100% 50%";n.style.paddingRight="14px";var 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=mxClient.IS_VML?"inline":"inline-block";f.style.top=(mxClient.IS_VML?0:3)+"px";f.style.background="url('"+a.editor.transparentImage+"')";mxEvent.addListener(f,"click",function(){n.value="";n.focus()});var h=document.createElement("input");h.style.cssText="margin-right:8px;margin-bottom:8px;";h.setAttribute("value","url");h.setAttribute("type","radio");h.setAttribute("name","current-linkdialog");var m=document.createElement("input");m.style.cssText="margin-right:8px;margin-bottom:8px;";
-m.setAttribute("value","url");m.setAttribute("type","radio");m.setAttribute("name","current-linkdialog");var p=document.createElement("select");p.style.width="420px";if(e&&null!=a.pages){null!=c&&"data:page/id,"==c.substring(0,13)?(m.setAttribute("checked","checked"),m.defaultChecked=!0):(n.setAttribute("value",c),h.setAttribute("checked","checked"),h.defaultChecked=!0);n.style.width="420px";l.appendChild(h);l.appendChild(n);l.appendChild(f);mxUtils.br(l);l.appendChild(m);e=!1;for(f=0;f<a.pages.length;f++){var q=
-document.createElement("option");mxUtils.write(q,a.pages[f].getName()||mxResources.get("pageWithNumber",[f+1]));q.setAttribute("value","data:page/id,"+a.pages[f].getId());c==q.getAttribute("value")&&(q.setAttribute("selected","selected"),e=!0);p.appendChild(q)}if(!e&&m.checked){var u=document.createElement("option");mxUtils.write(u,mxResources.get("pageNotFound"));u.setAttribute("disabled","disabled");u.setAttribute("selected","selected");u.setAttribute("value","pageNotFound");p.appendChild(u);mxEvent.addListener(p,
-"change",function(){null==u.parentNode||u.selected||u.parentNode.removeChild(u)})}l.appendChild(p)}else n.setAttribute("value",c),l.appendChild(n),l.appendChild(f);k.appendChild(l);var v=mxUtils.button(b,function(){a.hideDialog();d(m.checked?"pageNotFound"!==p.value?p.value:c:n.value,LinkDialog.selectedDocs)});v.style.verticalAlign="middle";v.className="geBtn gePrimaryBtn";this.init=function(){m.checked?p.focus():(n.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?
-n.select():document.execCommand("selectAll",!1,null));mxEvent.addListener(p,"focus",function(){h.removeAttribute("checked");m.setAttribute("checked","checked");m.checked=!0});mxEvent.addListener(n,"focus",function(){m.removeAttribute("checked");h.setAttribute("checked","checked");h.checked=!0});if(Graph.fileSupport){var b=k.parentNode,c=null;mxEvent.addListener(b,"dragleave",function(a){null!=c&&(c.parentNode.removeChild(c),c=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(b,"dragover",
-mxUtils.bind(this,function(f){null==c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=a.highlightElement(b));f.stopPropagation();f.preventDefault()}));mxEvent.addListener(b,"drop",mxUtils.bind(this,function(a){null!=c&&(c.parentNode.removeChild(c),c=null);0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")&&(n.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),h.setAttribute("checked","checked"),h.checked=!0,v.click());a.stopPropagation();a.preventDefault()}),!1)}};var x=document.createElement("div");
+b.style.width="26px";b.setAttribute("src",a);c.style.minWidth="42px";c.style.verticalAlign="middle";c.appendChild(b);x.appendChild(c)}var h=document.createElement("div");mxUtils.write(h,mxResources.get("editLink")+":");var l=document.createElement("div");l.className="geTitle";l.style.backgroundColor="transparent";l.style.borderColor="transparent";l.style.whiteSpace="nowrap";l.style.textOverflow="clip";l.style.cursor="default";mxClient.IS_VML||(l.style.paddingRight="20px");var m=document.createElement("input");
+m.setAttribute("placeholder",mxResources.get("dragUrlsHere"));m.setAttribute("type","text");m.style.marginTop="6px";m.style.width="440px";m.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";m.style.backgroundRepeat="no-repeat";m.style.backgroundPosition="100% 50%";m.style.paddingRight="14px";var 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=mxClient.IS_VML?"inline":"inline-block";f.style.top=(mxClient.IS_VML?0:3)+"px";f.style.background="url('"+a.editor.transparentImage+"')";mxEvent.addListener(f,"click",function(){m.value="";m.focus()});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","current-linkdialog");var n=document.createElement("input");n.style.cssText="margin-right:8px;margin-bottom:8px;";
+n.setAttribute("value","url");n.setAttribute("type","radio");n.setAttribute("name","current-linkdialog");var p=document.createElement("select");p.style.width="420px";if(e&&null!=a.pages){null!=c&&"data:page/id,"==c.substring(0,13)?(n.setAttribute("checked","checked"),n.defaultChecked=!0):(m.setAttribute("value",c),k.setAttribute("checked","checked"),k.defaultChecked=!0);m.style.width="420px";l.appendChild(k);l.appendChild(m);l.appendChild(f);mxUtils.br(l);l.appendChild(n);e=!1;for(f=0;f<a.pages.length;f++){var q=
+document.createElement("option");mxUtils.write(q,a.pages[f].getName()||mxResources.get("pageWithNumber",[f+1]));q.setAttribute("value","data:page/id,"+a.pages[f].getId());c==q.getAttribute("value")&&(q.setAttribute("selected","selected"),e=!0);p.appendChild(q)}if(!e&&n.checked){var u=document.createElement("option");mxUtils.write(u,mxResources.get("pageNotFound"));u.setAttribute("disabled","disabled");u.setAttribute("selected","selected");u.setAttribute("value","pageNotFound");p.appendChild(u);mxEvent.addListener(p,
+"change",function(){null==u.parentNode||u.selected||u.parentNode.removeChild(u)})}l.appendChild(p)}else m.setAttribute("value",c),l.appendChild(m),l.appendChild(f);h.appendChild(l);var v=mxUtils.button(b,function(){a.hideDialog();d(n.checked?"pageNotFound"!==p.value?p.value:c:m.value,LinkDialog.selectedDocs)});v.style.verticalAlign="middle";v.className="geBtn gePrimaryBtn";this.init=function(){n.checked?p.focus():(m.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?
+m.select():document.execCommand("selectAll",!1,null));mxEvent.addListener(p,"focus",function(){k.removeAttribute("checked");n.setAttribute("checked","checked");n.checked=!0});mxEvent.addListener(m,"focus",function(){n.removeAttribute("checked");k.setAttribute("checked","checked");k.checked=!0});if(Graph.fileSupport){var b=h.parentNode,c=null;mxEvent.addListener(b,"dragleave",function(a){null!=c&&(c.parentNode.removeChild(c),c=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(b,"dragover",
+mxUtils.bind(this,function(f){null==c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=a.highlightElement(b));f.stopPropagation();f.preventDefault()}));mxEvent.addListener(b,"drop",mxUtils.bind(this,function(a){null!=c&&(c.parentNode.removeChild(c),c=null);0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")&&(m.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),k.setAttribute("checked","checked"),k.checked=!0,v.click());a.stopPropagation();a.preventDefault()}),!1)}};var x=document.createElement("div");
x.style.marginTop="20px";x.style.textAlign="right";b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});b.style.verticalAlign="middle";b.className="geBtn";a.editor.cancelFirst&&x.appendChild(b);l=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/solution/articles/16000080137")});l.style.verticalAlign="middle";l.className="geBtn";x.appendChild(l);a.isOffline()&&!mxClient.IS_CHROMEAPP&&(l.style.display="none");LinkDialog.selectedDocs=null;LinkDialog.filePicked=
-function(a){if(a.action==google.picker.Action.PICKED){LinkDialog.selectedDocs=a.docs;var b=a.docs[0].url;"application/mxe"==a.docs[0].mimeType||null!=a.docs[0].mimeType&&"application/vnd.jgraph."==a.docs[0].mimeType.substring(0,23)?b="https://www.draw.io/#G"+a.docs[0].id:"application/vnd.google-apps.folder"==a.docs[0].mimeType&&(b="https://drive.google.com/#folders/"+a.docs[0].id);n.value=b;n.focus()}else LinkDialog.selectedDocs=null;n.focus()};"undefined"!=typeof google&&"undefined"!=typeof google.picker&&
-null!=a.drive&&g(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googlePlus"),function(){a.spinner.spin(document.body,mxResources.get("authorizing"))&&a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();if(null==a.linkPicker){var b=gapi.auth.getToken().access_token,c=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0),f=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0),h=(new google.picker.DocsView).setIncludeFolders(!0).setEnableTeamDrives(!0).setSelectFolderEnabled(!0),
-b=(new google.picker.PickerBuilder).setAppId(a.drive.appId).setLocale(mxLanguage).setOAuthToken(b).enableFeature(google.picker.Feature.SUPPORT_TEAM_DRIVES).addView(c).addView(f).addView(h).addView(google.picker.ViewId.RECENTLY_PICKED).addView(google.picker.ViewId.IMAGE_SEARCH).addView(google.picker.ViewId.VIDEO_SEARCH).addView(google.picker.ViewId.MAPS);"1"==urlParams.photos&&b.addView(google.picker.ViewId.PHOTOS).addView(google.picker.ViewId.PHOTO_ALBUMS).addView(google.picker.ViewId.PHOTO_UPLOAD);
-a.linkPicker=b.setCallback(function(a){LinkDialog.filePicked(a)}).build()}a.linkPicker.setVisible(!0)}))});"undefined"!=typeof Dropbox&&"undefined"!=typeof Dropbox.choose&&g(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),function(){Dropbox.choose({linkType:"direct",cancel:function(){},success:function(a){n.value=a[0].link;n.focus()}})});null!=a.oneDrive&&g(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),function(){a.oneDrive.pickFile(function(a,b){n.value=b.value[0].webUrl;
-n.focus()})});null!=a.gitHub&&g(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),function(){a.gitHub.pickFile(function(a){if(null!=a){a=a.split("/");var b=a[0],c=a[1],f=a[2];a=a.slice(3,a.length).join("/");n.value="https://github.com/"+b+"/"+c+"/blob/"+f+"/"+a;n.focus()}})});mxEvent.addListener(n,"keypress",function(b){13==b.keyCode&&(a.hideDialog(),d(m.checked?p.value:n.value,LinkDialog.selectedDocs))});x.appendChild(v);a.editor.cancelFirst||x.appendChild(b);k.appendChild(x);this.container=
-k},AboutDialog=function(a){var c=document.createElement("div");c.style.marginTop="6px";c.setAttribute("align","center");var b=document.createElement("img");b.style.border="0px";mxClient.IS_SVG?(b.setAttribute("width","164"),b.setAttribute("height","221"),b.style.width="164px",b.style.height="221px",b.setAttribute("src",IMAGE_PATH+"/drawlogo-text-bottom.svg")):(b.setAttribute("width","176"),b.setAttribute("height","219"),b.style.width="170px",b.style.height="219px",b.setAttribute("src",IMAGE_PATH+
+function(a){if(a.action==google.picker.Action.PICKED){LinkDialog.selectedDocs=a.docs;var b=a.docs[0].url;"application/mxe"==a.docs[0].mimeType||null!=a.docs[0].mimeType&&"application/vnd.jgraph."==a.docs[0].mimeType.substring(0,23)?b="https://www.draw.io/#G"+a.docs[0].id:"application/vnd.google-apps.folder"==a.docs[0].mimeType&&(b="https://drive.google.com/#folders/"+a.docs[0].id);m.value=b;m.focus()}else LinkDialog.selectedDocs=null;m.focus()};"undefined"!=typeof google&&"undefined"!=typeof google.picker&&
+null!=a.drive&&g(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googlePlus"),function(){a.spinner.spin(document.body,mxResources.get("authorizing"))&&a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();if(null==a.linkPicker){var b=gapi.auth.getToken().access_token,c=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0),f=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0),k=(new google.picker.DocsView).setIncludeFolders(!0).setEnableTeamDrives(!0).setSelectFolderEnabled(!0),
+b=(new google.picker.PickerBuilder).setAppId(a.drive.appId).setLocale(mxLanguage).setOAuthToken(b).enableFeature(google.picker.Feature.SUPPORT_TEAM_DRIVES).addView(c).addView(f).addView(k).addView(google.picker.ViewId.RECENTLY_PICKED).addView(google.picker.ViewId.IMAGE_SEARCH).addView(google.picker.ViewId.VIDEO_SEARCH).addView(google.picker.ViewId.MAPS);"1"==urlParams.photos&&b.addView(google.picker.ViewId.PHOTOS).addView(google.picker.ViewId.PHOTO_ALBUMS).addView(google.picker.ViewId.PHOTO_UPLOAD);
+a.linkPicker=b.setCallback(function(a){LinkDialog.filePicked(a)}).build()}a.linkPicker.setVisible(!0)}))});"undefined"!=typeof Dropbox&&"undefined"!=typeof Dropbox.choose&&g(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),function(){Dropbox.choose({linkType:"direct",cancel:function(){},success:function(a){m.value=a[0].link;m.focus()}})});null!=a.oneDrive&&g(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),function(){a.oneDrive.pickFile(function(a,b){m.value=b.value[0].webUrl;
+m.focus()})});null!=a.gitHub&&g(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),function(){a.gitHub.pickFile(function(a){if(null!=a){a=a.split("/");var b=a[0],c=a[1],f=a[2];a=a.slice(3,a.length).join("/");m.value="https://github.com/"+b+"/"+c+"/blob/"+f+"/"+a;m.focus()}})});mxEvent.addListener(m,"keypress",function(b){13==b.keyCode&&(a.hideDialog(),d(n.checked?p.value:m.value,LinkDialog.selectedDocs))});x.appendChild(v);a.editor.cancelFirst||x.appendChild(b);h.appendChild(x);this.container=
+h},AboutDialog=function(a){var c=document.createElement("div");c.style.marginTop="6px";c.setAttribute("align","center");var b=document.createElement("img");b.style.border="0px";mxClient.IS_SVG?(b.setAttribute("width","164"),b.setAttribute("height","221"),b.style.width="164px",b.style.height="221px",b.setAttribute("src",IMAGE_PATH+"/drawlogo-text-bottom.svg")):(b.setAttribute("width","176"),b.setAttribute("height","219"),b.style.width="170px",b.style.height="219px",b.setAttribute("src",IMAGE_PATH+
"/logo-flat.png"));"dark"==uiTheme&&(b.style.filter="grayscale(100%) invert(100%)");c.appendChild(b);mxUtils.br(c);var b="dark"==uiTheme?"#cccccc":"#505050",d=document.createElement("small");d.innerHTML="v "+EditorUi.VERSION;d.style.color=b;c.appendChild(d);mxUtils.br(c);mxUtils.br(c);d=document.createElement("small");d.style.color=b;d.innerHTML='&copy; 2005-2018 <a href="https://about.draw.io/" style="color:inherit;" target="_blank">JGraph Ltd</a>.<br>All Rights Reserved.';c.appendChild(d);mxEvent.addListener(c,
"click",function(b){"A"!=mxEvent.getSource(b).nodeName&&a.hideDialog()});this.container=c},FeedbackDialog=function(a){var c=document.createElement("div"),b=document.createElement("div");mxUtils.write(b,mxResources.get("sendYourFeedbackToDrawIo"));b.style.fontSize="18px";b.style.marginBottom="18px";c.appendChild(b);b=document.createElement("div");mxUtils.write(b,mxResources.get("yourEmailAddress")+" ("+mxResources.get("required")+")");c.appendChild(b);var d=document.createElement("input");d.setAttribute("type",
-"text");d.style.marginTop="6px";d.style.width="600px";var e=mxUtils.button(mxResources.get("sendMessage"),function(){var b=n.value+(k.checked?"\nDiagram:\n"+mxUtils.getXml(a.getXmlFileData()):"")+"\nBrowser:\n"+navigator.userAgent;b.length>FeedbackDialog.maxAttachmentSize?a.alert(mxResources.get("drawingTooLarge")):(a.hideDialog(),a.spinner.spin(document.body)&&mxUtils.post(null!=FeedbackDialog.feedbackUrl?FeedbackDialog.feedbackUrl:"/email","email="+encodeURIComponent(d.value)+"&version="+encodeURIComponent(EditorUi.VERSION)+
+"text");d.style.marginTop="6px";d.style.width="600px";var e=mxUtils.button(mxResources.get("sendMessage"),function(){var b=m.value+(h.checked?"\nDiagram:\n"+mxUtils.getXml(a.getXmlFileData()):"")+"\nBrowser:\n"+navigator.userAgent;b.length>FeedbackDialog.maxAttachmentSize?a.alert(mxResources.get("drawingTooLarge")):(a.hideDialog(),a.spinner.spin(document.body)&&mxUtils.post(null!=FeedbackDialog.feedbackUrl?FeedbackDialog.feedbackUrl:"/email","email="+encodeURIComponent(d.value)+"&version="+encodeURIComponent(EditorUi.VERSION)+
"&url="+encodeURIComponent(window.location.href)+"&body="+encodeURIComponent("Feedback:\n"+b),function(b){a.spinner.stop();200<=b.getStatus()&&299>=b.getStatus()?a.alert(mxResources.get("feedbackSent")):a.alert(mxResources.get("errorSendingFeedback"))},function(){a.spinner.stop();a.alert(mxResources.get("errorSendingFeedback"))}))});e.className="geBtn gePrimaryBtn";e.setAttribute("disabled","disabled");var g=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
-mxEvent.addListener(d,"change",function(){0<d.value.length&&0<g.test(d.value)?e.removeAttribute("disabled"):e.setAttribute("disabled","disabled")});mxEvent.addListener(d,"keyup",function(){0<d.value.length&&g.test(d.value)?e.removeAttribute("disabled"):e.setAttribute("disabled","disabled")});c.appendChild(d);this.init=function(){d.focus()};var k=document.createElement("input");k.setAttribute("type","checkbox");k.setAttribute("checked","checked");k.defaultChecked=!0;b=document.createElement("p");b.style.marginTop=
-"14px";b.appendChild(k);var l=document.createElement("span");mxUtils.write(l," "+mxResources.get("includeCopyOfMyDiagram"));b.appendChild(l);mxEvent.addListener(l,"click",function(a){k.checked=!k.checked;mxEvent.consume(a)});c.appendChild(b);b=document.createElement("div");mxUtils.write(b,mxResources.get("feedback"));c.appendChild(b);var n=document.createElement("textarea");n.style.resize="none";n.style.width="600px";n.style.height="140px";n.style.marginTop="6px";n.setAttribute("placeholder",mxResources.get("commentsNotes"));
-c.appendChild(n);b=document.createElement("div");b.style.marginTop="26px";b.style.textAlign="right";l=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});l.className="geBtn";a.editor.cancelFirst?(b.appendChild(l),b.appendChild(e)):(b.appendChild(e),b.appendChild(l));c.appendChild(b);this.container=c};FeedbackDialog.maxAttachmentSize=1E6;
-var RevisionDialog=function(a,c,b){var d=document.createElement("div"),e=document.createElement("h3");e.style.marginTop="0px";mxUtils.write(e,mxResources.get("revisionHistory"));d.appendChild(e);var g=document.createElement("div");g.style.position="absolute";g.style.overflow="auto";g.style.width="170px";g.style.height="378px";d.appendChild(g);var k=document.createElement("div");k.style.position="absolute";k.style.border="1px solid lightGray";k.style.left="199px";k.style.width="470px";k.style.height=
-"376px";k.style.overflow="hidden";mxEvent.disableContextMenu(k);d.appendChild(k);var l=new Graph(k);l.setTooltips(!1);l.setEnabled(!1);l.setPanning(!0);l.panningHandler.ignoreCell=!0;l.panningHandler.useLeftButtonForPanning=!0;l.minFitScale=null;l.maxFitScale=null;l.centerZoom=!0;var n=0,f=null,h=0,m=l.getGlobalVariable;l.getGlobalVariable=function(a){return"page"==a&&null!=f&&null!=f[h]?f[h].getAttribute("name"):"pagenumber"==a?h+1:m.apply(this,arguments)};l.getLinkForCell=function(){return null};
+mxEvent.addListener(d,"change",function(){0<d.value.length&&0<g.test(d.value)?e.removeAttribute("disabled"):e.setAttribute("disabled","disabled")});mxEvent.addListener(d,"keyup",function(){0<d.value.length&&g.test(d.value)?e.removeAttribute("disabled"):e.setAttribute("disabled","disabled")});c.appendChild(d);this.init=function(){d.focus()};var h=document.createElement("input");h.setAttribute("type","checkbox");h.setAttribute("checked","checked");h.defaultChecked=!0;b=document.createElement("p");b.style.marginTop=
+"14px";b.appendChild(h);var l=document.createElement("span");mxUtils.write(l," "+mxResources.get("includeCopyOfMyDiagram"));b.appendChild(l);mxEvent.addListener(l,"click",function(a){h.checked=!h.checked;mxEvent.consume(a)});c.appendChild(b);b=document.createElement("div");mxUtils.write(b,mxResources.get("feedback"));c.appendChild(b);var m=document.createElement("textarea");m.style.resize="none";m.style.width="600px";m.style.height="140px";m.style.marginTop="6px";m.setAttribute("placeholder",mxResources.get("commentsNotes"));
+c.appendChild(m);b=document.createElement("div");b.style.marginTop="26px";b.style.textAlign="right";l=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});l.className="geBtn";a.editor.cancelFirst?(b.appendChild(l),b.appendChild(e)):(b.appendChild(e),b.appendChild(l));c.appendChild(b);this.container=c};FeedbackDialog.maxAttachmentSize=1E6;
+var RevisionDialog=function(a,c,b){var d=document.createElement("div"),e=document.createElement("h3");e.style.marginTop="0px";mxUtils.write(e,mxResources.get("revisionHistory"));d.appendChild(e);var g=document.createElement("div");g.style.position="absolute";g.style.overflow="auto";g.style.width="170px";g.style.height="378px";d.appendChild(g);var h=document.createElement("div");h.style.position="absolute";h.style.border="1px solid lightGray";h.style.left="199px";h.style.width="470px";h.style.height=
+"376px";h.style.overflow="hidden";mxEvent.disableContextMenu(h);d.appendChild(h);var l=new Graph(h);l.setTooltips(!1);l.setEnabled(!1);l.setPanning(!0);l.panningHandler.ignoreCell=!0;l.panningHandler.useLeftButtonForPanning=!0;l.minFitScale=null;l.maxFitScale=null;l.centerZoom=!0;var m=0,f=null,k=0,n=l.getGlobalVariable;l.getGlobalVariable=function(a){return"page"==a&&null!=f&&null!=f[k]?f[k].getAttribute("name"):"pagenumber"==a?k+1:n.apply(this,arguments)};l.getLinkForCell=function(){return null};
Editor.MathJaxRender&&l.addListener(mxEvent.SIZE,mxUtils.bind(this,function(b,c){a.editor.graph.mathEnabled&&Editor.MathJaxRender(l.container)}));var p=new Spinner({lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:"#000",speed:1.4,trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",left:"50%"}),q=a.getCurrentFile(),u=null,v=null,x=null,t=null,w=mxUtils.button("",function(){null!=x&&l.zoomIn()});w.className="geSprite geSprite-zoomin";w.setAttribute("title",
-mxResources.get("zoomIn"));w.style.outline="none";w.style.border="none";w.style.margin="2px";w.setAttribute("disabled","disabled");mxUtils.setOpacity(w,20);var D=mxUtils.button("",function(){null!=x&&l.zoomOut()});D.className="geSprite geSprite-zoomout";D.setAttribute("title",mxResources.get("zoomOut"));D.style.outline="none";D.style.border="none";D.style.margin="2px";D.setAttribute("disabled","disabled");mxUtils.setOpacity(D,20);var C=mxUtils.button("",function(){null!=x&&(l.maxFitScale=8,l.fit(8),
-l.center())});C.className="geSprite geSprite-fit";C.setAttribute("title",mxResources.get("fit"));C.style.outline="none";C.style.border="none";C.style.margin="2px";C.setAttribute("disabled","disabled");mxUtils.setOpacity(C,20);var y=mxUtils.button("",function(){null!=x&&(l.zoomActual(),l.center())});y.className="geSprite geSprite-actualsize";y.setAttribute("title",mxResources.get("actualSize"));y.style.outline="none";y.style.border="none";y.style.margin="2px";y.setAttribute("disabled","disabled");
+mxResources.get("zoomIn"));w.style.outline="none";w.style.border="none";w.style.margin="2px";w.setAttribute("disabled","disabled");mxUtils.setOpacity(w,20);var D=mxUtils.button("",function(){null!=x&&l.zoomOut()});D.className="geSprite geSprite-zoomout";D.setAttribute("title",mxResources.get("zoomOut"));D.style.outline="none";D.style.border="none";D.style.margin="2px";D.setAttribute("disabled","disabled");mxUtils.setOpacity(D,20);var B=mxUtils.button("",function(){null!=x&&(l.maxFitScale=8,l.fit(8),
+l.center())});B.className="geSprite geSprite-fit";B.setAttribute("title",mxResources.get("fit"));B.style.outline="none";B.style.border="none";B.style.margin="2px";B.setAttribute("disabled","disabled");mxUtils.setOpacity(B,20);var y=mxUtils.button("",function(){null!=x&&(l.zoomActual(),l.center())});y.className="geSprite geSprite-actualsize";y.setAttribute("title",mxResources.get("actualSize"));y.style.outline="none";y.style.border="none";y.style.margin="2px";y.setAttribute("disabled","disabled");
mxUtils.setOpacity(y,20);var z=document.createElement("div");z.style.position="absolute";z.style.textAlign="right";z.style.color="gray";z.style.marginTop="10px";z.style.backgroundColor="transparent";z.style.top="440px";z.style.right="32px";z.style.maxWidth="380px";z.style.cursor="default";var G=mxUtils.button(mxResources.get("download"),function(){if(null!=x){var b=a.getCurrentFile(),b=null!=b&&null!=b.getTitle()?b.getTitle():a.defaultFilename,c=mxUtils.getXml(x.documentElement);a.isLocalFileSave()?
-a.saveLocalFile(c,b,"text/xml"):(c="undefined"===typeof pako?"&xml="+encodeURIComponent(c):"&data="+encodeURIComponent(a.editor.graph.compress(c)),(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(b)+"&format=xml"+c)).simulate(document,"_blank"))}});G.className="geBtn";G.setAttribute("disabled","disabled");var B=mxUtils.button(mxResources.get("restore"),function(){null!=x&&null!=t&&a.confirm(mxResources.get("areYouSure"),function(){null!=b?b(t):a.spinner.spin(document.body,mxResources.get("restoring"))&&
-q.save(!0,function(b){a.spinner.stop();a.replaceFileData(t);a.hideDialog()},function(b){a.spinner.stop();a.editor.setStatus("");a.handleError(b,null!=b?mxResources.get("errorSavingFile"):null)})})});B.className="geBtn";B.setAttribute("disabled","disabled");var F=document.createElement("select");F.setAttribute("disabled","disabled");F.style.maxWidth="80px";F.style.position="relative";F.style.top="-2px";F.style.verticalAlign="bottom";F.style.marginRight="6px";F.style.display="none";var I=null;mxEvent.addListener(F,
+a.saveLocalFile(c,b,"text/xml"):(c="undefined"===typeof pako?"&xml="+encodeURIComponent(c):"&data="+encodeURIComponent(a.editor.graph.compress(c)),(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(b)+"&format=xml"+c)).simulate(document,"_blank"))}});G.className="geBtn";G.setAttribute("disabled","disabled");var C=mxUtils.button(mxResources.get("restore"),function(){null!=x&&null!=t&&a.confirm(mxResources.get("areYouSure"),function(){null!=b?b(t):a.spinner.spin(document.body,mxResources.get("restoring"))&&
+q.save(!0,function(b){a.spinner.stop();a.replaceFileData(t);a.hideDialog()},function(b){a.spinner.stop();a.editor.setStatus("");a.handleError(b,null!=b?mxResources.get("errorSavingFile"):null)})})});C.className="geBtn";C.setAttribute("disabled","disabled");var F=document.createElement("select");F.setAttribute("disabled","disabled");F.style.maxWidth="80px";F.style.position="relative";F.style.top="-2px";F.style.verticalAlign="bottom";F.style.marginRight="6px";F.style.display="none";var I=null;mxEvent.addListener(F,
"change",function(a){null!=I&&(I(a),mxEvent.consume(a))});var A=mxUtils.button(mxResources.get("open"),function(){null!=x&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(x.documentElement)),a.openLink(a.getUrl(),null,!0))});A.className="geBtn";A.setAttribute("disabled","disabled");null!=b&&(A.style.display="none");var E=mxUtils.button(mxResources.get("show"),function(){null!=v&&a.openLink(v.getUrl(F.selectedIndex))});E.className="geBtn gePrimaryBtn";
-E.setAttribute("disabled","disabled");null!=b&&(E.style.display="none",B.className="geBtn gePrimaryBtn");e=document.createElement("div");e.style.position="absolute";e.style.top="482px";e.style.width="640px";e.style.textAlign="right";var H=document.createElement("div");H.className="geToolbarContainer";H.style.backgroundColor="transparent";H.style.padding="2px";H.style.border="none";H.style.left="199px";H.style.top="442px";var M=null;if(null!=c&&0<c.length){k.style.cursor="move";var K=document.createElement("table");
-K.style.border="1px solid lightGray";K.style.borderCollapse="collapse";K.style.borderSpacing="0px";K.style.width="100%";var T=document.createElement("tbody"),P=(new Date).toDateString();null!=a.currentPage&&null!=a.pages&&(n=mxUtils.indexOf(a.pages,a.currentPage));for(var S=c.length-1;0<=S;S--){var aa=function(b){var d=new Date(b.modifiedDate),m=null;if(0<=d.getTime()){var e=function(c){p.stop();var e=mxUtils.parseXml(c),g=a.editor.extractGraphModel(e.documentElement,!0);if(null!=g){var u=function(b){null!=
-b&&(b=v(mxUtils.parseXml(a.editor.graph.decompress(mxUtils.getTextContent(b))).documentElement));return b},v=function(a){var b=a.getAttribute("background");if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";k.style.backgroundColor=b;(new mxCodec(a.ownerDocument)).decode(a,l.getModel());l.maxFitScale=1;l.fit(8);l.center();return a};F.style.display="none";F.innerHTML="";x=e;t=c;f=parseSelectFunction=null;h=0;if("mxfile"==g.nodeName){e=g.getElementsByTagName("diagram");f=[];for(c=0;c<e.length;c++)f.push(e[c]);
-h=Math.min(n,f.length-1);0<f.length&&u(f[h]);if(1<f.length)for(F.removeAttribute("disabled"),F.style.display="",c=0;c<f.length;c++)e=document.createElement("option"),mxUtils.write(e,f[c].getAttribute("name")||mxResources.get("pageWithNumber",[c+1])),e.setAttribute("value",c),c==h&&e.setAttribute("selected","selected"),F.appendChild(e);I=function(){h=n=parseInt(F.value);u(f[n])}}else v(g);c=b.lastModifyingUserName;null!=c&&20<c.length&&(c=c.substring(0,20)+"...");z.innerHTML="";mxUtils.write(z,(null!=
-c?c+" ":"")+d.toLocaleDateString()+" "+d.toLocaleTimeString());z.setAttribute("title",m.getAttribute("title"));w.removeAttribute("disabled");D.removeAttribute("disabled");C.removeAttribute("disabled");y.removeAttribute("disabled");null!=q&&q.isRestricted()||(a.editor.graph.isEnabled()&&B.removeAttribute("disabled"),G.removeAttribute("disabled"),E.removeAttribute("disabled"),A.removeAttribute("disabled"));mxUtils.setOpacity(w,60);mxUtils.setOpacity(D,60);mxUtils.setOpacity(C,60);mxUtils.setOpacity(y,
-60)}else F.style.display="none",F.innerHTML="",z.innerHTML="",mxUtils.write(z,mxResources.get("errorLoadingFile"))},m=document.createElement("tr");m.style.borderBottom="1px solid lightGray";m.style.fontSize="12px";m.style.cursor="pointer";var g=document.createElement("td");g.style.padding="6px";g.style.whiteSpace="nowrap";b==c[c.length-1]?mxUtils.write(g,mxResources.get("current")):d.toDateString()===P?mxUtils.write(g,d.toLocaleTimeString()):mxUtils.write(g,d.toLocaleDateString()+" "+d.toLocaleTimeString());
-m.appendChild(g);m.setAttribute("title",d.toLocaleDateString()+" "+d.toLocaleTimeString()+" "+a.formatFileSize(parseInt(b.fileSize))+(null!=b.lastModifyingUserName?" "+b.lastModifyingUserName:""));mxEvent.addListener(m,"click",function(a){v!=b&&(p.stop(),null!=u&&(u.style.backgroundColor=""),v=b,u=m,u.style.backgroundColor="#ebf2f9",t=x=null,z.removeAttribute("title"),z.innerHTML=mxResources.get("loading")+"...",k.style.backgroundColor="#ffffff",l.getModel().clear(),B.setAttribute("disabled","disabled"),
-G.setAttribute("disabled","disabled"),w.setAttribute("disabled","disabled"),D.setAttribute("disabled","disabled"),y.setAttribute("disabled","disabled"),C.setAttribute("disabled","disabled"),A.setAttribute("disabled","disabled"),E.setAttribute("disabled","disabled"),F.setAttribute("disabled","disabled"),mxUtils.setOpacity(w,20),mxUtils.setOpacity(D,20),mxUtils.setOpacity(C,20),mxUtils.setOpacity(y,20),p.spin(k),b.getXml(function(a){v==b&&e(a)},function(a){p.stop();F.style.display="none";F.innerHTML=
-"";z.innerHTML="";mxUtils.write(z,mxResources.get("errorLoadingFile"))}),mxEvent.consume(a))});mxEvent.addListener(m,"dblclick",function(a){E.click();window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(a)},!1);T.appendChild(m)}return m}(c[S]);null!=aa&&S==c.length-1&&(M=aa)}K.appendChild(T);g.appendChild(K)}else null==q||null==a.drive&&q.constructor==window.DriveFile||null==a.dropbox&&q.constructor==window.DropboxFile?(k.style.display=
-"none",H.style.display="none",mxUtils.write(g,mxResources.get("notAvailable"))):(k.style.display="none",H.style.display="none",mxUtils.write(g,mxResources.get("noRevisions")));this.init=function(){null!=M&&M.click()};g=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});g.className="geBtn";H.appendChild(F);H.appendChild(w);H.appendChild(D);H.appendChild(y);H.appendChild(C);a.editor.cancelFirst?(e.appendChild(g),e.appendChild(G),e.appendChild(A),e.appendChild(B),e.appendChild(E)):(e.appendChild(G),
-e.appendChild(A),e.appendChild(B),e.appendChild(E),e.appendChild(g));d.appendChild(e);d.appendChild(H);d.appendChild(z);this.container=d},DraftDialog=function(a,c,b,d,e,g,k,l){var n=document.createElement("div"),f=document.createElement("div");f.style.marginTop="0px";f.style.whiteSpace="nowrap";f.style.overflow="auto";mxUtils.write(f,c);n.appendChild(f);var h=document.createElement("div");h.style.position="absolute";h.style.border="1px solid lightGray";h.style.marginTop="10px";h.style.width="640px";
-h.style.top="46px";h.style.bottom="74px";h.style.overflow="hidden";mxEvent.disableContextMenu(h);n.appendChild(h);var m=new Graph(h);m.setEnabled(!1);m.setPanning(!0);m.panningHandler.ignoreCell=!0;m.panningHandler.useLeftButtonForPanning=!0;m.minFitScale=null;m.maxFitScale=null;m.centerZoom=!0;c=mxUtils.parseXml(b);var p=a.editor.extractGraphModel(c.documentElement,!0),q=0,u=null,v=m.getGlobalVariable;m.getGlobalVariable=function(a){return"page"==a&&null!=u&&null!=u[q]?u[q].getAttribute("name"):
-"pagenumber"==a?q+1:v.apply(this,arguments)};m.getLinkForCell=function(){return null};c=mxUtils.button("",function(){m.zoomIn()});c.className="geSprite geSprite-zoomin";c.setAttribute("title",mxResources.get("zoomIn"));c.style.outline="none";c.style.border="none";c.style.margin="2px";mxUtils.setOpacity(c,60);b=mxUtils.button("",function(){m.zoomOut()});b.className="geSprite geSprite-zoomout";b.setAttribute("title",mxResources.get("zoomOut"));b.style.outline="none";b.style.border="none";b.style.margin=
-"2px";mxUtils.setOpacity(b,60);f=mxUtils.button("",function(){m.maxFitScale=8;m.fit(8);m.center()});f.className="geSprite geSprite-fit";f.setAttribute("title",mxResources.get("fit"));f.style.outline="none";f.style.border="none";f.style.margin="2px";mxUtils.setOpacity(f,60);var x=mxUtils.button("",function(){m.zoomActual();m.center()});x.className="geSprite geSprite-actualsize";x.setAttribute("title",mxResources.get("actualSize"));x.style.outline="none";x.style.border="none";x.style.margin="2px";mxUtils.setOpacity(x,
-60);e=mxUtils.button(k||mxResources.get("discard"),e);e.className="geBtn";var t=document.createElement("select");t.style.maxWidth="80px";t.style.position="relative";t.style.top="-2px";t.style.verticalAlign="bottom";t.style.marginRight="6px";t.style.display="none";d=mxUtils.button(g||mxResources.get("edit"),d);d.className="geBtn gePrimaryBtn";g=document.createElement("div");g.style.position="absolute";g.style.bottom="30px";g.style.width="640px";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 b(a){if(null!=a){var b=a.getAttribute("background");if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";h.style.backgroundColor=b;(new mxCodec(a.ownerDocument)).decode(a,m.getModel());m.maxFitScale=1;m.fit(8);m.center()}}function c(c){null!=c&&(c=b(mxUtils.parseXml(a.editor.graph.decompress(mxUtils.getTextContent(c))).documentElement));
+E.setAttribute("disabled","disabled");null!=b&&(E.style.display="none",C.className="geBtn gePrimaryBtn");e=document.createElement("div");e.style.position="absolute";e.style.top="482px";e.style.width="640px";e.style.textAlign="right";var H=document.createElement("div");H.className="geToolbarContainer";H.style.backgroundColor="transparent";H.style.padding="2px";H.style.border="none";H.style.left="199px";H.style.top="442px";var M=null;if(null!=c&&0<c.length){h.style.cursor="move";var K=document.createElement("table");
+K.style.border="1px solid lightGray";K.style.borderCollapse="collapse";K.style.borderSpacing="0px";K.style.width="100%";var T=document.createElement("tbody"),Q=(new Date).toDateString();null!=a.currentPage&&null!=a.pages&&(m=mxUtils.indexOf(a.pages,a.currentPage));for(var S=c.length-1;0<=S;S--){var Z=function(b){var d=new Date(b.modifiedDate),n=null;if(0<=d.getTime()){var e=function(c){p.stop();var e=mxUtils.parseXml(c),g=a.editor.extractGraphModel(e.documentElement,!0);if(null!=g){var u=function(b){null!=
+b&&(b=v(mxUtils.parseXml(a.editor.graph.decompress(mxUtils.getTextContent(b))).documentElement));return b},v=function(a){var b=a.getAttribute("background");if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";h.style.backgroundColor=b;(new mxCodec(a.ownerDocument)).decode(a,l.getModel());l.maxFitScale=1;l.fit(8);l.center();return a};F.style.display="none";F.innerHTML="";x=e;t=c;f=parseSelectFunction=null;k=0;if("mxfile"==g.nodeName){e=g.getElementsByTagName("diagram");f=[];for(c=0;c<e.length;c++)f.push(e[c]);
+k=Math.min(m,f.length-1);0<f.length&&u(f[k]);if(1<f.length)for(F.removeAttribute("disabled"),F.style.display="",c=0;c<f.length;c++)e=document.createElement("option"),mxUtils.write(e,f[c].getAttribute("name")||mxResources.get("pageWithNumber",[c+1])),e.setAttribute("value",c),c==k&&e.setAttribute("selected","selected"),F.appendChild(e);I=function(){k=m=parseInt(F.value);u(f[m])}}else v(g);c=b.lastModifyingUserName;null!=c&&20<c.length&&(c=c.substring(0,20)+"...");z.innerHTML="";mxUtils.write(z,(null!=
+c?c+" ":"")+d.toLocaleDateString()+" "+d.toLocaleTimeString());z.setAttribute("title",n.getAttribute("title"));w.removeAttribute("disabled");D.removeAttribute("disabled");B.removeAttribute("disabled");y.removeAttribute("disabled");null!=q&&q.isRestricted()||(a.editor.graph.isEnabled()&&C.removeAttribute("disabled"),G.removeAttribute("disabled"),E.removeAttribute("disabled"),A.removeAttribute("disabled"));mxUtils.setOpacity(w,60);mxUtils.setOpacity(D,60);mxUtils.setOpacity(B,60);mxUtils.setOpacity(y,
+60)}else F.style.display="none",F.innerHTML="",z.innerHTML="",mxUtils.write(z,mxResources.get("errorLoadingFile"))},n=document.createElement("tr");n.style.borderBottom="1px solid lightGray";n.style.fontSize="12px";n.style.cursor="pointer";var g=document.createElement("td");g.style.padding="6px";g.style.whiteSpace="nowrap";b==c[c.length-1]?mxUtils.write(g,mxResources.get("current")):d.toDateString()===Q?mxUtils.write(g,d.toLocaleTimeString()):mxUtils.write(g,d.toLocaleDateString()+" "+d.toLocaleTimeString());
+n.appendChild(g);n.setAttribute("title",d.toLocaleDateString()+" "+d.toLocaleTimeString()+" "+a.formatFileSize(parseInt(b.fileSize))+(null!=b.lastModifyingUserName?" "+b.lastModifyingUserName:""));mxEvent.addListener(n,"click",function(a){v!=b&&(p.stop(),null!=u&&(u.style.backgroundColor=""),v=b,u=n,u.style.backgroundColor="#ebf2f9",t=x=null,z.removeAttribute("title"),z.innerHTML=mxResources.get("loading")+"...",h.style.backgroundColor="#ffffff",l.getModel().clear(),C.setAttribute("disabled","disabled"),
+G.setAttribute("disabled","disabled"),w.setAttribute("disabled","disabled"),D.setAttribute("disabled","disabled"),y.setAttribute("disabled","disabled"),B.setAttribute("disabled","disabled"),A.setAttribute("disabled","disabled"),E.setAttribute("disabled","disabled"),F.setAttribute("disabled","disabled"),mxUtils.setOpacity(w,20),mxUtils.setOpacity(D,20),mxUtils.setOpacity(B,20),mxUtils.setOpacity(y,20),p.spin(h),b.getXml(function(a){v==b&&e(a)},function(a){p.stop();F.style.display="none";F.innerHTML=
+"";z.innerHTML="";mxUtils.write(z,mxResources.get("errorLoadingFile"))}),mxEvent.consume(a))});mxEvent.addListener(n,"dblclick",function(a){E.click();window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(a)},!1);T.appendChild(n)}return n}(c[S]);null!=Z&&S==c.length-1&&(M=Z)}K.appendChild(T);g.appendChild(K)}else null==q||null==a.drive&&q.constructor==window.DriveFile||null==a.dropbox&&q.constructor==window.DropboxFile?(h.style.display=
+"none",H.style.display="none",mxUtils.write(g,mxResources.get("notAvailable"))):(h.style.display="none",H.style.display="none",mxUtils.write(g,mxResources.get("noRevisions")));this.init=function(){null!=M&&M.click()};g=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});g.className="geBtn";H.appendChild(F);H.appendChild(w);H.appendChild(D);H.appendChild(y);H.appendChild(B);a.editor.cancelFirst?(e.appendChild(g),e.appendChild(G),e.appendChild(A),e.appendChild(C),e.appendChild(E)):(e.appendChild(G),
+e.appendChild(A),e.appendChild(C),e.appendChild(E),e.appendChild(g));d.appendChild(e);d.appendChild(H);d.appendChild(z);this.container=d},DraftDialog=function(a,c,b,d,e,g,h,l){var m=document.createElement("div"),f=document.createElement("div");f.style.marginTop="0px";f.style.whiteSpace="nowrap";f.style.overflow="auto";mxUtils.write(f,c);m.appendChild(f);var k=document.createElement("div");k.style.position="absolute";k.style.border="1px solid lightGray";k.style.marginTop="10px";k.style.width="640px";
+k.style.top="46px";k.style.bottom="74px";k.style.overflow="hidden";mxEvent.disableContextMenu(k);m.appendChild(k);var n=new Graph(k);n.setEnabled(!1);n.setPanning(!0);n.panningHandler.ignoreCell=!0;n.panningHandler.useLeftButtonForPanning=!0;n.minFitScale=null;n.maxFitScale=null;n.centerZoom=!0;c=mxUtils.parseXml(b);var p=a.editor.extractGraphModel(c.documentElement,!0),q=0,u=null,v=n.getGlobalVariable;n.getGlobalVariable=function(a){return"page"==a&&null!=u&&null!=u[q]?u[q].getAttribute("name"):
+"pagenumber"==a?q+1:v.apply(this,arguments)};n.getLinkForCell=function(){return null};c=mxUtils.button("",function(){n.zoomIn()});c.className="geSprite geSprite-zoomin";c.setAttribute("title",mxResources.get("zoomIn"));c.style.outline="none";c.style.border="none";c.style.margin="2px";mxUtils.setOpacity(c,60);b=mxUtils.button("",function(){n.zoomOut()});b.className="geSprite geSprite-zoomout";b.setAttribute("title",mxResources.get("zoomOut"));b.style.outline="none";b.style.border="none";b.style.margin=
+"2px";mxUtils.setOpacity(b,60);f=mxUtils.button("",function(){n.maxFitScale=8;n.fit(8);n.center()});f.className="geSprite geSprite-fit";f.setAttribute("title",mxResources.get("fit"));f.style.outline="none";f.style.border="none";f.style.margin="2px";mxUtils.setOpacity(f,60);var x=mxUtils.button("",function(){n.zoomActual();n.center()});x.className="geSprite geSprite-actualsize";x.setAttribute("title",mxResources.get("actualSize"));x.style.outline="none";x.style.border="none";x.style.margin="2px";mxUtils.setOpacity(x,
+60);e=mxUtils.button(h||mxResources.get("discard"),e);e.className="geBtn";var t=document.createElement("select");t.style.maxWidth="80px";t.style.position="relative";t.style.top="-2px";t.style.verticalAlign="bottom";t.style.marginRight="6px";t.style.display="none";d=mxUtils.button(g||mxResources.get("edit"),d);d.className="geBtn gePrimaryBtn";g=document.createElement("div");g.style.position="absolute";g.style.bottom="30px";g.style.width="640px";g.style.textAlign="right";h=document.createElement("div");
+h.className="geToolbarContainer";h.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";this.init=function(){function b(a){if(null!=a){var b=a.getAttribute("background");if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";k.style.backgroundColor=b;(new mxCodec(a.ownerDocument)).decode(a,n.getModel());n.maxFitScale=1;n.fit(8);n.center()}}function c(c){null!=c&&(c=b(mxUtils.parseXml(a.editor.graph.decompress(mxUtils.getTextContent(c))).documentElement));
return c}mxEvent.addListener(t,"change",function(a){q=parseInt(t.value);c(u[q]);mxEvent.consume(a)});if("mxfile"==p.nodeName){var f=p.getElementsByTagName("diagram");u=[];for(var d=0;d<f.length;d++)u.push(f[d]);0<u.length&&c(u[q]);if(1<u.length)for(t.style.display="",d=0;d<u.length;d++)f=document.createElement("option"),mxUtils.write(f,u[d].getAttribute("name")||mxResources.get("pageWithNumber",[d+1])),f.setAttribute("value",d),d==q&&f.setAttribute("selected","selected"),t.appendChild(f)}else b(p)};
-k.appendChild(t);k.appendChild(c);k.appendChild(b);k.appendChild(x);k.appendChild(f);c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});c.className="geBtn";l=null!=l?mxUtils.button(mxResources.get("ignore"),l):null;null!=l&&(l.className="geBtn");a.editor.cancelFirst?(g.appendChild(c),null!=l&&g.appendChild(l),g.appendChild(e),g.appendChild(d)):(g.appendChild(d),g.appendChild(e),null!=l&&g.appendChild(l),g.appendChild(c));n.appendChild(g);n.appendChild(k);this.container=n},FindWindow=
-function(a,c,b,d,e){function g(a,b,c){if("object"===typeof b.value&&null!=b.value.attributes){b=b.value.attributes;for(var f=0;f<b.length;f++)if("label"!=b[f].nodeName){var h=mxUtils.trim(b[f].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==a&&h.substring(0,c.length)===c||null!=a&&a.test(h))return!0}}return!1}function k(){var a=n.model.getDescendants(n.model.getRoot()),b=p.value.toLowerCase(),c=q.checked?new RegExp(b):null,d=null;f!=b&&(f=b,h=null);var m=null==h;if(0<b.length)for(var e=
-0;e<a.length;e++){var k=n.view.getState(a[e]);if(null!=k&&null!=k.cell.value&&(m||null==d)&&(n.model.isVertex(k.cell)||n.model.isEdge(k.cell))&&(n.isHtmlLabel(k.cell)?(v.innerHTML=n.getLabel(k.cell),label=mxUtils.extractTextWithWhitespace([v])):label=n.getLabel(k.cell),label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase(),null==c&&(label.substring(0,b.length)===b||g(c,k.cell,b))||null!=c&&(c.test(label)||g(c,k.cell,b))))if(m){d=k;break}else null==d&&(d=k);m=m||k==h}null!=
-d?(h=d,n.scrollCellToVisible(h.cell),n.isEnabled()?n.setSelectionCell(h.cell):n.highlightCell(h.cell)):n.isEnabled()&&n.clearSelection();return 0==b.length||null!=d}var l=a.actions.get("find"),n=a.editor.graph,f=null,h=null,m=document.createElement("div");m.style.userSelect="none";m.style.overflow="hidden";m.style.padding="10px";m.style.height="100%";var p=document.createElement("input");p.setAttribute("placeholder",mxResources.get("find"));p.setAttribute("type","text");p.style.marginTop="4px";p.style.marginBottom=
-"6px";p.style.width="200px";p.style.fontSize="12px";p.style.borderRadius="4px";p.style.padding="6px";m.appendChild(p);mxUtils.br(m);var q=document.createElement("input");q.setAttribute("type","checkbox");q.style.marginRight="4px";m.appendChild(q);mxUtils.write(m,mxResources.get("regularExpression"));var u=a.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000088250");u.style.position="relative";u.style.marginLeft="6px";u.style.top="-1px";m.appendChild(u);var v=document.createElement("div");
-mxUtils.br(m);u=mxUtils.button(mxResources.get("reset"),function(){p.value="";p.style.backgroundColor="";f=h=null;p.focus()});u.setAttribute("title",mxResources.get("reset"));u.style.marginTop="6px";u.style.marginRight="4px";u.className="geBtn";m.appendChild(u);u=mxUtils.button(mxResources.get("find"),function(){try{p.style.backgroundColor=k()?"":"#ffcfcf"}catch(x){a.handleError(x)}});u.setAttribute("title",mxResources.get("find")+" (Enter)");u.style.marginTop="6px";u.className="geBtn gePrimaryBtn";
-m.appendChild(u);mxEvent.addListener(p,"keyup",function(a){if(91==a.keyCode||17==a.keyCode)mxEvent.consume(a);else if(27==a.keyCode)l.funct();else if(f!=p.value.toLowerCase()||13==a.keyCode)try{p.style.backgroundColor=k()?"":"#ffcfcf"}catch(t){p.style.backgroundColor="#ffcfcf"}});mxEvent.addListener(m,"keydown",function(b){70==b.keyCode&&a.keyHandler.isControlDown(b)&&!mxEvent.isShiftDown(b)&&(l.funct(),mxEvent.consume(b))});this.window=new mxWindow(mxResources.get("find"),m,c,b,d,e,!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.isVisible()?(p.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?p.select():document.execCommand("selectAll",!1,null)):n.container.focus()}))},TagsWindow=function(a,c,b,d,e){var g=a.editor.graph,k="tags",l=document.createElement("div");l.style.userSelect="none";l.style.overflow="hidden";l.style.padding=
-"10px";l.style.height="100%";var n=document.createElement("input");n.setAttribute("placeholder",mxResources.get("allTags"));n.setAttribute("type","text");n.style.marginTop="4px";n.style.width="260px";n.style.fontSize="12px";n.style.borderRadius="4px";n.style.padding="6px";l.appendChild(n);if(!a.isOffline()||mxClient.IS_CHROMEAPP){n.style.width="240px";var f=a.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000046966");f.firstChild.style.marginBottom="6px";f.style.marginLeft=
-"6px";l.appendChild(f)}mxEvent.addListener(n,"dblclick",function(){var b=new FilenameDialog(a,k,mxResources.get("ok"),mxUtils.bind(this,function(a){null!=a&&0<a.length&&(k=a)}),mxResources.get("enterPropertyName"));a.showDialog(b.container,300,80,!0,!0);b.init()});n.setAttribute("title",mxResources.get("doubleClickChangeProperty"));mxUtils.br(l);f=mxUtils.button(mxResources.get("hide"),function(){var a=g.getCellsForTags(n.value.split(" "),void 0,k);g.setCellsVisible(a,!1)});f.setAttribute("title",
-mxResources.get("hide"));f.style.marginTop="8px";f.style.marginRight="4px";f.className="geBtn";l.appendChild(f);f=mxUtils.button(mxResources.get("show"),function(){var a=g.getCellsForTags(n.value.split(" "),void 0,k);g.setCellsVisible(a,!0);if(g.isEnabled())g.setSelectionCells(a);else for(var b=0;b<a.length;b++)g.highlightCell(a[b])});f.setAttribute("title",mxResources.get("show"));f.style.marginTop="8px";f.style.marginRight="4px";f.className="geBtn";l.appendChild(f);var h=a.actions.get("tags"),f=
-mxUtils.button(mxResources.get("close"),function(){h.funct()});f.setAttribute("title",mxResources.get("close")+" (Enter/Esc)");f.style.marginTop="8px";f.className="geBtn gePrimaryBtn";l.appendChild(f);mxEvent.addListener(n,"keyup",function(a){13!=a.keyCode&&27!=a.keyCode||h.funct()});this.window=new mxWindow(mxResources.get("tags"),l,c,b,d,e,!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.isVisible()?(n.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?n.select():document.execCommand("selectAll",!1,null)):g.container.focus()}))},AuthDialog=function(a,c,b,d){var e=document.createElement("div");e.style.textAlign="center";var g=document.createElement("p");g.style.fontSize="16pt";g.style.padding="0px";g.style.margin="0px";g.style.color="gray";mxUtils.write(g,mxResources.get("authorizationRequired"));var k="Unknown",l=document.createElement("img");
-l.setAttribute("border","0");l.setAttribute("align","absmiddle");l.style.marginRight="10px";c==a.drive?(k=mxResources.get("googleDrive"),l.src=IMAGE_PATH+"/google-drive-logo-white.svg"):c==a.dropbox?(k=mxResources.get("dropbox"),l.src=IMAGE_PATH+"/dropbox-logo-white.svg"):c==a.oneDrive?(k=mxResources.get("oneDrive"),l.src=IMAGE_PATH+"/onedrive-logo-white.svg"):c==a.gitHub?(k=mxResources.get("github"),l.src=IMAGE_PATH+"/github-logo-white.svg"):c==a.trello&&(k=mxResources.get("trello"),l.src=IMAGE_PATH+
-"/trello-logo-white.svg");a=document.createElement("p");mxUtils.write(a,mxResources.get("authorizeThisAppIn",[k]));var n=document.createElement("input");n.setAttribute("type","checkbox");k=mxUtils.button(mxResources.get("authorize"),function(){d(n.checked)});k.insertBefore(l,k.firstChild);k.style.marginTop="6px";k.className="geBigButton";e.appendChild(g);e.appendChild(a);e.appendChild(k);b&&(b=document.createElement("p"),b.style.marginTop="20px",b.appendChild(n),g=document.createElement("span"),mxUtils.write(g,
-" "+mxResources.get("rememberMe")),b.appendChild(g),e.appendChild(b),n.checked=!0,n.defaultChecked=!0,mxEvent.addListener(g,"click",function(a){n.checked=!n.checked;mxEvent.consume(a)}));this.container=e},MoreShapesDialog=function(a,c,b){b=null!=b?b:a.sidebar.entries;var d=document.createElement("div"),e=[];if(null!=a.sidebar.customEntries)for(var g=0;g<a.sidebar.customEntries.length;g++){for(var k=a.sidebar.customEntries[g],l={title:a.getResource(k.title),entries:[]},n=0;n<k.entries.length;n++){var f=
-k.entries[n];l.entries.push({id:f.id,title:a.getResource(f.title),desc:a.getResource(f.desc),image:f.preview})}e.push(l)}for(g=0;g<b.length;g++)if(null==a.sidebar.enabledLibraries)e.push(b[g]);else{l={title:b[g].title,entries:[]};for(n=0;n<b[g].entries.length;n++)0<=mxUtils.indexOf(a.sidebar.enabledLibraries,b[g].entries[n].id)&&l.entries.push(b[g].entries[n]);0<l.entries.length&&e.push(l)}b=e;if(c){n=document.createElement("div");n.className="geDialogTitle";mxUtils.write(n,mxResources.get("shapes"));
-n.style.position="absolute";n.style.top="0px";n.style.left="0px";n.style.lineHeight="40px";n.style.height="40px";n.style.right="0px";mxClient.IS_QUIRKS&&(n.style.width="718px");var h=document.createElement("div"),m=document.createElement("div");h.style.position="absolute";h.style.top="40px";h.style.left="0px";h.style.width="202px";h.style.bottom="60px";h.style.overflow="auto";mxClient.IS_QUIRKS&&(h.style.height="437px",h.style.marginTop="1px");m.style.position="absolute";m.style.left="202px";m.style.right=
-"0px";m.style.top="40px";m.style.bottom="60px";m.style.overflow="auto";m.style.borderLeft="1px solid rgb(211, 211, 211)";m.style.textAlign="center";mxClient.IS_QUIRKS&&(m.style.width=parseInt(n.style.width)-202+"px",m.style.height=h.style.height,m.style.marginTop=h.style.marginTop);var p=null,q=[],u=document.createElement("div");u.style.position="relative";u.style.left="0px";u.style.right="0px";for(g=0;g<b.length;g++)(function(b){var c=u.cloneNode(!1);c.style.fontWeight="bold";c.style.backgroundColor=
-"dark"==uiTheme?"#505759":"#e5e5e5";c.style.padding="6px 0px 6px 20px";mxUtils.write(c,b.title);h.appendChild(c);for(var f=0;f<b.entries.length;f++)(function(b){var c=u.cloneNode(!1);c.style.cursor="pointer";c.style.padding="4px 0px 4px 20px";var d=document.createElement("input");d.setAttribute("type","checkbox");d.checked=a.sidebar.isEntryVisible(b.id);d.defaultChecked=d.checked;c.appendChild(d);mxUtils.write(c," "+b.title);h.appendChild(c);var e=function(a){if(null==a||"INPUT"!=mxEvent.getSource(a).nodeName){m.style.textAlign=
-"center";m.style.padding="0px";m.style.color="";m.innerHTML="";if(null!=b.desc){var f=document.createElement("pre");f.style.boxSizing="border-box";f.style.fontFamily="inherit";f.style.margin="20px";f.style.right="0px";f.style.textAlign="left";mxUtils.write(f,b.desc);m.appendChild(f)}null!=b.imageCallback?b.imageCallback(m):null!=b.image?m.innerHTML+='<img border="0" src="'+b.image+'"/>':null==b.desc&&(m.style.padding="20px",m.style.color="rgb(179, 179, 179)",mxUtils.write(m,mxResources.get("noPreview")));
-null!=p&&(p.style.backgroundColor="");p=c;p.style.backgroundColor="dark"==uiTheme?"#505759":"#ebf2f9";null!=a&&mxEvent.consume(a)}};mxEvent.addListener(c,"click",e);mxEvent.addListener(c,"dblclick",function(a){d.checked=!d.checked;mxEvent.consume(a)});q.push(function(){return d.checked?b.id:null});0==g&&0==f&&e()})(b.entries[f])})(b[g]);d.style.padding="30px";d.appendChild(n);d.appendChild(h);d.appendChild(m);b=document.createElement("div");b.className="geDialogFooter";b.style.position="absolute";
-b.style.paddingRight="16px";b.style.color="gray";b.style.left="0px";b.style.right="0px";b.style.bottom="0px";b.style.height="60px";b.style.lineHeight="52px";mxClient.IS_QUIRKS&&(b.style.width=n.style.width,b.style.paddingTop="12px");var v=document.createElement("input");v.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)n=document.createElement("span"),n.style.paddingRight="20px",n.appendChild(v),mxUtils.write(n," "+mxResources.get("rememberThisSetting")),v.checked=!0,v.defaultChecked=
-!0,mxEvent.addListener(n,"click",function(a){mxEvent.getSource(a)!=v&&(v.checked=!v.checked,mxEvent.consume(a))}),mxClient.IS_QUIRKS&&(n.style.position="relative",n.style.top="-6px"),b.appendChild(n);n=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});n.className="geBtn";c=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();for(var b=[],c=0;c<q.length;c++){var f=q[c].apply(this,arguments);null!=f&&b.push(f)}a.sidebar.showEntries(b.join(";"),v.checked,!0)});c.className=
-"geBtn gePrimaryBtn"}else{var x=document.createElement("table"),n=document.createElement("tbody");d.style.height="100%";d.style.overflow="auto";l=document.createElement("tr");x.style.width="100%";c=document.createElement("td");var e=document.createElement("td"),k=document.createElement("td"),t=mxUtils.bind(this,function(b,c,f){var h=document.createElement("input");h.type="checkbox";x.appendChild(h);h.checked=a.sidebar.isEntryVisible(f);var d=document.createElement("span");mxUtils.write(d,c);c=document.createElement("div");
-c.style.display="block";c.appendChild(h);c.appendChild(d);mxEvent.addListener(d,"click",function(a){h.checked=!h.checked;mxEvent.consume(a)});b.appendChild(c);return function(){return h.checked?f:null}});l.appendChild(c);l.appendChild(e);l.appendChild(k);n.appendChild(l);x.appendChild(n);for(var q=[],w=0,g=0;g<b.length;g++)for(n=0;n<b[g].entries.length;n++)w++;for(var D=[c,e,k],C=0,g=0;g<b.length;g++)(function(a){for(var b=0;b<a.entries.length;b++){var c=a.entries[b];q.push(t(D[Math.floor(C/(w/3))],
-c.title,c.id));C++}})(b[g]);d.appendChild(x);b=document.createElement("div");b.style.marginTop="18px";b.style.textAlign="center";v=document.createElement("input");isLocalStorage&&(v.setAttribute("type","checkbox"),v.checked=!0,v.defaultChecked=!0,b.appendChild(v),n=document.createElement("span"),mxUtils.write(n," "+mxResources.get("rememberThisSetting")),b.appendChild(n),mxEvent.addListener(n,"click",function(a){v.checked=!v.checked;mxEvent.consume(a)}));d.appendChild(b);n=mxUtils.button(mxResources.get("cancel"),
-function(){a.hideDialog()});n.className="geBtn";c=mxUtils.button(mxResources.get("apply"),function(){for(var b=["search"],c=0;c<q.length;c++){var f=q[c].apply(this,arguments);null!=f&&b.push(f)}a.sidebar.showEntries(0<b.length?b.join(";"):"",v.checked);a.hideDialog()});c.className="geBtn gePrimaryBtn";b=document.createElement("div");b.style.marginTop="26px";b.style.textAlign="right"}a.editor.cancelFirst?(b.appendChild(n),b.appendChild(c)):(b.appendChild(c),b.appendChild(n));d.appendChild(b);this.container=
+h.appendChild(t);h.appendChild(c);h.appendChild(b);h.appendChild(x);h.appendChild(f);c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});c.className="geBtn";l=null!=l?mxUtils.button(mxResources.get("ignore"),l):null;null!=l&&(l.className="geBtn");a.editor.cancelFirst?(g.appendChild(c),null!=l&&g.appendChild(l),g.appendChild(e),g.appendChild(d)):(g.appendChild(d),g.appendChild(e),null!=l&&g.appendChild(l),g.appendChild(c));m.appendChild(g);m.appendChild(h);this.container=m},FindWindow=
+function(a,c,b,d,e){function g(a,b,c){if("object"===typeof b.value&&null!=b.value.attributes){b=b.value.attributes;for(var f=0;f<b.length;f++)if("label"!=b[f].nodeName){var k=mxUtils.trim(b[f].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==a&&k.substring(0,c.length)===c||null!=a&&a.test(k))return!0}}return!1}function h(){var a=m.model.getDescendants(m.model.getRoot()),b=p.value.toLowerCase(),c=q.checked?new RegExp(b):null,d=null;f!=b&&(f=b,k=null);var n=null==k;if(0<b.length)for(var e=
+0;e<a.length;e++){var h=m.view.getState(a[e]);if(null!=h&&null!=h.cell.value&&(n||null==d)&&(m.model.isVertex(h.cell)||m.model.isEdge(h.cell))&&(m.isHtmlLabel(h.cell)?(v.innerHTML=m.getLabel(h.cell),label=mxUtils.extractTextWithWhitespace([v])):label=m.getLabel(h.cell),label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase(),null==c&&(label.substring(0,b.length)===b||g(c,h.cell,b))||null!=c&&(c.test(label)||g(c,h.cell,b))))if(n){d=h;break}else null==d&&(d=h);n=n||h==k}null!=
+d?(k=d,m.scrollCellToVisible(k.cell),m.isEnabled()?m.setSelectionCell(k.cell):m.highlightCell(k.cell)):m.isEnabled()&&m.clearSelection();return 0==b.length||null!=d}var l=a.actions.get("find"),m=a.editor.graph,f=null,k=null,n=document.createElement("div");n.style.userSelect="none";n.style.overflow="hidden";n.style.padding="10px";n.style.height="100%";var p=document.createElement("input");p.setAttribute("placeholder",mxResources.get("find"));p.setAttribute("type","text");p.style.marginTop="4px";p.style.marginBottom=
+"6px";p.style.width="200px";p.style.fontSize="12px";p.style.borderRadius="4px";p.style.padding="6px";n.appendChild(p);mxUtils.br(n);var q=document.createElement("input");q.setAttribute("type","checkbox");q.style.marginRight="4px";n.appendChild(q);mxUtils.write(n,mxResources.get("regularExpression"));var u=a.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000088250");u.style.position="relative";u.style.marginLeft="6px";u.style.top="-1px";n.appendChild(u);var v=document.createElement("div");
+mxUtils.br(n);u=mxUtils.button(mxResources.get("reset"),function(){p.value="";p.style.backgroundColor="";f=k=null;p.focus()});u.setAttribute("title",mxResources.get("reset"));u.style.marginTop="6px";u.style.marginRight="4px";u.className="geBtn";n.appendChild(u);u=mxUtils.button(mxResources.get("find"),function(){try{p.style.backgroundColor=h()?"":"#ffcfcf"}catch(x){a.handleError(x)}});u.setAttribute("title",mxResources.get("find")+" (Enter)");u.style.marginTop="6px";u.className="geBtn gePrimaryBtn";
+n.appendChild(u);mxEvent.addListener(p,"keyup",function(a){if(91==a.keyCode||17==a.keyCode)mxEvent.consume(a);else if(27==a.keyCode)l.funct();else if(f!=p.value.toLowerCase()||13==a.keyCode)try{p.style.backgroundColor=h()?"":"#ffcfcf"}catch(t){p.style.backgroundColor="#ffcfcf"}});mxEvent.addListener(n,"keydown",function(b){70==b.keyCode&&a.keyHandler.isControlDown(b)&&!mxEvent.isShiftDown(b)&&(l.funct(),mxEvent.consume(b))});this.window=new mxWindow(mxResources.get("find"),n,c,b,d,e,!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.isVisible()?(p.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?p.select():document.execCommand("selectAll",!1,null)):m.container.focus()}))},TagsWindow=function(a,c,b,d,e){var g=a.editor.graph,h="tags",l=document.createElement("div");l.style.userSelect="none";l.style.overflow="hidden";l.style.padding=
+"10px";l.style.height="100%";var m=document.createElement("input");m.setAttribute("placeholder",mxResources.get("allTags"));m.setAttribute("type","text");m.style.marginTop="4px";m.style.width="260px";m.style.fontSize="12px";m.style.borderRadius="4px";m.style.padding="6px";l.appendChild(m);if(!a.isOffline()||mxClient.IS_CHROMEAPP){m.style.width="240px";var f=a.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000046966");f.firstChild.style.marginBottom="6px";f.style.marginLeft=
+"6px";l.appendChild(f)}mxEvent.addListener(m,"dblclick",function(){var b=new FilenameDialog(a,h,mxResources.get("ok"),mxUtils.bind(this,function(a){null!=a&&0<a.length&&(h=a)}),mxResources.get("enterPropertyName"));a.showDialog(b.container,300,80,!0,!0);b.init()});m.setAttribute("title",mxResources.get("doubleClickChangeProperty"));mxUtils.br(l);f=mxUtils.button(mxResources.get("hide"),function(){var a=g.getCellsForTags(m.value.split(" "),void 0,h);g.setCellsVisible(a,!1)});f.setAttribute("title",
+mxResources.get("hide"));f.style.marginTop="8px";f.style.marginRight="4px";f.className="geBtn";l.appendChild(f);f=mxUtils.button(mxResources.get("show"),function(){var a=g.getCellsForTags(m.value.split(" "),void 0,h);g.setCellsVisible(a,!0);if(g.isEnabled())g.setSelectionCells(a);else for(var b=0;b<a.length;b++)g.highlightCell(a[b])});f.setAttribute("title",mxResources.get("show"));f.style.marginTop="8px";f.style.marginRight="4px";f.className="geBtn";l.appendChild(f);var k=a.actions.get("tags"),f=
+mxUtils.button(mxResources.get("close"),function(){k.funct()});f.setAttribute("title",mxResources.get("close")+" (Enter/Esc)");f.style.marginTop="8px";f.className="geBtn gePrimaryBtn";l.appendChild(f);mxEvent.addListener(m,"keyup",function(a){13!=a.keyCode&&27!=a.keyCode||k.funct()});this.window=new mxWindow(mxResources.get("tags"),l,c,b,d,e,!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.isVisible()?(m.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?m.select():document.execCommand("selectAll",!1,null)):g.container.focus()}))},AuthDialog=function(a,c,b,d){var e=document.createElement("div");e.style.textAlign="center";var g=document.createElement("p");g.style.fontSize="16pt";g.style.padding="0px";g.style.margin="0px";g.style.color="gray";mxUtils.write(g,mxResources.get("authorizationRequired"));var h="Unknown",l=document.createElement("img");
+l.setAttribute("border","0");l.setAttribute("align","absmiddle");l.style.marginRight="10px";c==a.drive?(h=mxResources.get("googleDrive"),l.src=IMAGE_PATH+"/google-drive-logo-white.svg"):c==a.dropbox?(h=mxResources.get("dropbox"),l.src=IMAGE_PATH+"/dropbox-logo-white.svg"):c==a.oneDrive?(h=mxResources.get("oneDrive"),l.src=IMAGE_PATH+"/onedrive-logo-white.svg"):c==a.gitHub?(h=mxResources.get("github"),l.src=IMAGE_PATH+"/github-logo-white.svg"):c==a.trello&&(h=mxResources.get("trello"),l.src=IMAGE_PATH+
+"/trello-logo-white.svg");a=document.createElement("p");mxUtils.write(a,mxResources.get("authorizeThisAppIn",[h]));var m=document.createElement("input");m.setAttribute("type","checkbox");h=mxUtils.button(mxResources.get("authorize"),function(){d(m.checked)});h.insertBefore(l,h.firstChild);h.style.marginTop="6px";h.className="geBigButton";e.appendChild(g);e.appendChild(a);e.appendChild(h);b&&(b=document.createElement("p"),b.style.marginTop="20px",b.appendChild(m),g=document.createElement("span"),mxUtils.write(g,
+" "+mxResources.get("rememberMe")),b.appendChild(g),e.appendChild(b),m.checked=!0,m.defaultChecked=!0,mxEvent.addListener(g,"click",function(a){m.checked=!m.checked;mxEvent.consume(a)}));this.container=e},MoreShapesDialog=function(a,c,b){b=null!=b?b:a.sidebar.entries;var d=document.createElement("div"),e=[];if(null!=a.sidebar.customEntries)for(var g=0;g<a.sidebar.customEntries.length;g++){for(var h=a.sidebar.customEntries[g],l={title:a.getResource(h.title),entries:[]},m=0;m<h.entries.length;m++){var f=
+h.entries[m];l.entries.push({id:f.id,title:a.getResource(f.title),desc:a.getResource(f.desc),image:f.preview})}e.push(l)}for(g=0;g<b.length;g++)if(null==a.sidebar.enabledLibraries)e.push(b[g]);else{l={title:b[g].title,entries:[]};for(m=0;m<b[g].entries.length;m++)0<=mxUtils.indexOf(a.sidebar.enabledLibraries,b[g].entries[m].id)&&l.entries.push(b[g].entries[m]);0<l.entries.length&&e.push(l)}b=e;if(c){m=document.createElement("div");m.className="geDialogTitle";mxUtils.write(m,mxResources.get("shapes"));
+m.style.position="absolute";m.style.top="0px";m.style.left="0px";m.style.lineHeight="40px";m.style.height="40px";m.style.right="0px";mxClient.IS_QUIRKS&&(m.style.width="718px");var k=document.createElement("div"),n=document.createElement("div");k.style.position="absolute";k.style.top="40px";k.style.left="0px";k.style.width="202px";k.style.bottom="60px";k.style.overflow="auto";mxClient.IS_QUIRKS&&(k.style.height="437px",k.style.marginTop="1px");n.style.position="absolute";n.style.left="202px";n.style.right=
+"0px";n.style.top="40px";n.style.bottom="60px";n.style.overflow="auto";n.style.borderLeft="1px solid rgb(211, 211, 211)";n.style.textAlign="center";mxClient.IS_QUIRKS&&(n.style.width=parseInt(m.style.width)-202+"px",n.style.height=k.style.height,n.style.marginTop=k.style.marginTop);var p=null,q=[],u=document.createElement("div");u.style.position="relative";u.style.left="0px";u.style.right="0px";for(g=0;g<b.length;g++)(function(b){var c=u.cloneNode(!1);c.style.fontWeight="bold";c.style.backgroundColor=
+"dark"==uiTheme?"#505759":"#e5e5e5";c.style.padding="6px 0px 6px 20px";mxUtils.write(c,b.title);k.appendChild(c);for(var f=0;f<b.entries.length;f++)(function(b){var c=u.cloneNode(!1);c.style.cursor="pointer";c.style.padding="4px 0px 4px 20px";var d=document.createElement("input");d.setAttribute("type","checkbox");d.checked=a.sidebar.isEntryVisible(b.id);d.defaultChecked=d.checked;c.appendChild(d);mxUtils.write(c," "+b.title);k.appendChild(c);var e=function(a){if(null==a||"INPUT"!=mxEvent.getSource(a).nodeName){n.style.textAlign=
+"center";n.style.padding="0px";n.style.color="";n.innerHTML="";if(null!=b.desc){var f=document.createElement("pre");f.style.boxSizing="border-box";f.style.fontFamily="inherit";f.style.margin="20px";f.style.right="0px";f.style.textAlign="left";mxUtils.write(f,b.desc);n.appendChild(f)}null!=b.imageCallback?b.imageCallback(n):null!=b.image?n.innerHTML+='<img border="0" src="'+b.image+'"/>':null==b.desc&&(n.style.padding="20px",n.style.color="rgb(179, 179, 179)",mxUtils.write(n,mxResources.get("noPreview")));
+null!=p&&(p.style.backgroundColor="");p=c;p.style.backgroundColor="dark"==uiTheme?"#505759":"#ebf2f9";null!=a&&mxEvent.consume(a)}};mxEvent.addListener(c,"click",e);mxEvent.addListener(c,"dblclick",function(a){d.checked=!d.checked;mxEvent.consume(a)});q.push(function(){return d.checked?b.id:null});0==g&&0==f&&e()})(b.entries[f])})(b[g]);d.style.padding="30px";d.appendChild(m);d.appendChild(k);d.appendChild(n);b=document.createElement("div");b.className="geDialogFooter";b.style.position="absolute";
+b.style.paddingRight="16px";b.style.color="gray";b.style.left="0px";b.style.right="0px";b.style.bottom="0px";b.style.height="60px";b.style.lineHeight="52px";mxClient.IS_QUIRKS&&(b.style.width=m.style.width,b.style.paddingTop="12px");var v=document.createElement("input");v.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)m=document.createElement("span"),m.style.paddingRight="20px",m.appendChild(v),mxUtils.write(m," "+mxResources.get("rememberThisSetting")),v.checked=!0,v.defaultChecked=
+!0,mxEvent.addListener(m,"click",function(a){mxEvent.getSource(a)!=v&&(v.checked=!v.checked,mxEvent.consume(a))}),mxClient.IS_QUIRKS&&(m.style.position="relative",m.style.top="-6px"),b.appendChild(m);m=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});m.className="geBtn";c=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();for(var b=[],c=0;c<q.length;c++){var f=q[c].apply(this,arguments);null!=f&&b.push(f)}a.sidebar.showEntries(b.join(";"),v.checked,!0)});c.className=
+"geBtn gePrimaryBtn"}else{var x=document.createElement("table"),m=document.createElement("tbody");d.style.height="100%";d.style.overflow="auto";l=document.createElement("tr");x.style.width="100%";c=document.createElement("td");var e=document.createElement("td"),h=document.createElement("td"),t=mxUtils.bind(this,function(b,c,f){var k=document.createElement("input");k.type="checkbox";x.appendChild(k);k.checked=a.sidebar.isEntryVisible(f);var d=document.createElement("span");mxUtils.write(d,c);c=document.createElement("div");
+c.style.display="block";c.appendChild(k);c.appendChild(d);mxEvent.addListener(d,"click",function(a){k.checked=!k.checked;mxEvent.consume(a)});b.appendChild(c);return function(){return k.checked?f:null}});l.appendChild(c);l.appendChild(e);l.appendChild(h);m.appendChild(l);x.appendChild(m);for(var q=[],w=0,g=0;g<b.length;g++)for(m=0;m<b[g].entries.length;m++)w++;for(var D=[c,e,h],B=0,g=0;g<b.length;g++)(function(a){for(var b=0;b<a.entries.length;b++){var c=a.entries[b];q.push(t(D[Math.floor(B/(w/3))],
+c.title,c.id));B++}})(b[g]);d.appendChild(x);b=document.createElement("div");b.style.marginTop="18px";b.style.textAlign="center";v=document.createElement("input");isLocalStorage&&(v.setAttribute("type","checkbox"),v.checked=!0,v.defaultChecked=!0,b.appendChild(v),m=document.createElement("span"),mxUtils.write(m," "+mxResources.get("rememberThisSetting")),b.appendChild(m),mxEvent.addListener(m,"click",function(a){v.checked=!v.checked;mxEvent.consume(a)}));d.appendChild(b);m=mxUtils.button(mxResources.get("cancel"),
+function(){a.hideDialog()});m.className="geBtn";c=mxUtils.button(mxResources.get("apply"),function(){for(var b=["search"],c=0;c<q.length;c++){var f=q[c].apply(this,arguments);null!=f&&b.push(f)}a.sidebar.showEntries(0<b.length?b.join(";"):"",v.checked);a.hideDialog()});c.className="geBtn gePrimaryBtn";b=document.createElement("div");b.style.marginTop="26px";b.style.textAlign="right"}a.editor.cancelFirst?(b.appendChild(m),b.appendChild(c)):(b.appendChild(c),b.appendChild(m));d.appendChild(b);this.container=
d},PluginsDialog=function(a){function c(){if(0==e.length)d.innerHTML=mxResources.get("noPlugins");else{d.innerHTML="";for(var b=0;b<e.length;b++){var f=document.createElement("span");f.style.whiteSpace="nowrap";var g=document.createElement("span");g.className="geSprite geSprite-delete";g.style.position="relative";g.style.cursor="pointer";g.style.top="5px";g.style.marginRight="4px";g.style.display="inline-block";f.appendChild(g);mxUtils.write(f,e[b]);d.appendChild(f);mxUtils.br(d);mxEvent.addListener(g,
"click",function(b){return function(){a.confirm(window.parent.mxResources.get("delete")+' "'+e[b]+'"?',function(){e.splice(b,1);c()})}}(b))}}}var b=document.createElement("div"),d=document.createElement("div");d.style.height="120px";d.style.overflow="auto";var e=mxSettings.getPlugins().slice();b.appendChild(d);c();var g=mxUtils.button(mxResources.get("add"),function(){var b="",f=urlParams.p;if(null!=f&&0<f.length){for(var d=f.split(";"),f=0;f<d.length;f++){var g=App.pluginRegistry[d[f]];null!=g&&
-(b+=g+";")}";"==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1))}b=new FilenameDialog(a,b,mxResources.get("add"),function(a){if(null!=a&&0<a.length){d=a.split(";");for(a=0;a<d.length;a++){var b=d[a],f=App.pluginRegistry[b];null!=f&&(b=f);0<b.length&&0>mxUtils.indexOf(e,b)&&e.push(b)}c()}},mxResources.get("enterValue")+" ("+mxResources.get("url")+")");a.showDialog(b.container,300,80,!0,!0);b.init()});g.className="geBtn";var k=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});
-k.className="geBtn";var l=mxUtils.button(mxResources.get("apply"),function(){mxSettings.setPlugins(e);mxSettings.save();a.hideDialog();a.alert(mxResources.get("restartForChangeRequired"))});l.className="geBtn gePrimaryBtn";var n=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/support/solutions/articles/16000056430")});n.className="geBtn";a.isOffline()&&!mxClient.IS_CHROMEAPP&&(n.style.display="none");var f=document.createElement("div");f.style.marginTop="14px";f.style.textAlign=
-"right";a.editor.cancelFirst?(f.appendChild(k),f.appendChild(n),f.appendChild(g),f.appendChild(l)):(f.appendChild(n),f.appendChild(g),f.appendChild(l),f.appendChild(k));b.appendChild(f);this.container=b},CropImageDialog=function(a,c,b){var d=document.createElement("div"),e=document.createElement("table"),g=document.createElement("tbody"),k=document.createElement("tr"),l=document.createElement("td");l.style.whiteSpace="nowrap";l.setAttribute("colspan","2");mxUtils.write(l,mxResources.get("loading")+
-"...");k.appendChild(l);g.appendChild(k);var k=document.createElement("tr"),n=document.createElement("td"),f=document.createElement("td");e.style.paddingLeft="6px";mxUtils.write(n,mxResources.get("left")+":");var h=document.createElement("input");h.setAttribute("type","text");h.style.width="100px";h.value="0";this.init=function(){h.focus();h.select()};f.appendChild(h);k.appendChild(n);k.appendChild(f);g.appendChild(k);k=document.createElement("tr");n=document.createElement("td");f=document.createElement("td");
-mxUtils.write(n,mxResources.get("top")+":");var m=document.createElement("input");m.setAttribute("type","text");m.style.width="100px";m.value="0";f.appendChild(m);k.appendChild(n);k.appendChild(f);g.appendChild(k);k=document.createElement("tr");n=document.createElement("td");f=document.createElement("td");mxUtils.write(n,mxResources.get("right")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.width="100px";p.value="0";f.appendChild(p);k.appendChild(n);k.appendChild(f);
-g.appendChild(k);k=document.createElement("tr");n=document.createElement("td");f=document.createElement("td");mxUtils.write(n,mxResources.get("bottom")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.width="100px";q.value="0";f.appendChild(q);k.appendChild(n);k.appendChild(f);g.appendChild(k);k=document.createElement("tr");n=document.createElement("td");f=document.createElement("td");mxUtils.write(n,mxResources.get("circle")+":");k.appendChild(n);var u=document.createElement("input");
-u.setAttribute("type","checkbox");f.appendChild(u);k.appendChild(f);g.appendChild(k);e.appendChild(g);d.appendChild(e);var e=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()}),v=new Image,x=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var c=document.createElement("canvas"),f=c.getContext("2d"),d=v.width,e=v.height,g=parseInt(h.value),k=parseInt(m.value),d=Math.max(1,d-g-parseInt(p.value)),e=Math.max(1,e-k-parseInt(q.value));c.width=d;c.height=e;u.checked&&(f.fillStyle=
-"#000000",f.arc(d/2,e/2,Math.min(d/2,e/2),0,2*Math.PI),f.fill(),f.globalCompositeOperation="source-in");f.drawImage(v,g,k,d,e,0,0,d,e);b(c.toDataURL())});x.setAttribute("disabled","disabled");v.onload=function(){x.removeAttribute("disabled");l.innerHTML="";mxUtils.write(l,mxResources.get("width")+": "+v.width+" "+mxResources.get("height")+": "+v.height)};v.src=c;mxEvent.addListener(d,"keypress",function(a){13==a.keyCode&&x.click()});c=document.createElement("div");c.style.marginTop="20px";c.style.textAlign=
-"right";a.editor.cancelFirst?(c.appendChild(e),c.appendChild(x)):(c.appendChild(x),c.appendChild(e));d.appendChild(c);this.container=d},EditGeometryDialog=function(a,c){var b=a.editor.graph,d=1==c.length?b.getCellGeometry(c[0]):null,e=document.createElement("div"),g=document.createElement("table"),k=document.createElement("tbody"),l=document.createElement("tr"),n=document.createElement("td"),f=document.createElement("td");g.style.paddingLeft="6px";mxUtils.write(n,mxResources.get("relative")+":");
-var h=document.createElement("input");h.setAttribute("type","checkbox");null!=d&&d.relative&&(h.setAttribute("checked","checked"),h.defaultChecked=!0);this.init=function(){h.focus()};f.appendChild(h);l.appendChild(n);l.appendChild(f);k.appendChild(l);l=document.createElement("tr");n=document.createElement("td");f=document.createElement("td");mxUtils.write(n,mxResources.get("left")+":");var m=document.createElement("input");m.setAttribute("type","text");m.style.width="100px";m.value=null!=d?d.x:"";
-f.appendChild(m);l.appendChild(n);l.appendChild(f);k.appendChild(l);l=document.createElement("tr");n=document.createElement("td");f=document.createElement("td");mxUtils.write(n,mxResources.get("top")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.width="100px";p.value=null!=d?d.y:"";f.appendChild(p);l.appendChild(n);l.appendChild(f);k.appendChild(l);l=document.createElement("tr");n=document.createElement("td");f=document.createElement("td");mxUtils.write(n,mxResources.get("dx")+
-":");var q=document.createElement("input");q.setAttribute("type","text");q.style.width="100px";q.value=null!=d&&null!=d.offset?d.offset.x:"";f.appendChild(q);l.appendChild(n);l.appendChild(f);k.appendChild(l);l=document.createElement("tr");n=document.createElement("td");f=document.createElement("td");mxUtils.write(n,mxResources.get("dy")+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.width="100px";u.value=null!=d&&null!=d.offset?d.offset.y:"";f.appendChild(u);l.appendChild(n);
-l.appendChild(f);k.appendChild(l);l=document.createElement("tr");n=document.createElement("td");f=document.createElement("td");mxUtils.write(n,mxResources.get("width")+":");var v=document.createElement("input");v.setAttribute("type","text");v.style.width="100px";v.value=null!=d?d.width:"";f.appendChild(v);l.appendChild(n);l.appendChild(f);k.appendChild(l);l=document.createElement("tr");n=document.createElement("td");f=document.createElement("td");mxUtils.write(n,mxResources.get("height")+":");var x=
-document.createElement("input");x.setAttribute("type","text");x.style.width="100px";x.value=null!=d?d.height:"";f.appendChild(x);l.appendChild(n);l.appendChild(f);k.appendChild(l);l=document.createElement("tr");n=document.createElement("td");f=document.createElement("td");mxUtils.write(n,mxResources.get("rotation")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.width="100px";t.value=1==c.length?mxUtils.getValue(b.getCellStyle(c[0]),mxConstants.STYLE_ROTATION,0):"";
-f.appendChild(t);l.appendChild(n);l.appendChild(f);k.appendChild(l);g.appendChild(k);e.appendChild(g);d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});d.className="geBtn";var w=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();b.getModel().beginUpdate();try{for(var f=0;f<c.length;f++){var d=b.getCellGeometry(c[f]);null!=d&&(d=d.clone(),b.isCellMovable(c[f])&&(d.relative=h.checked,0<mxUtils.trim(m.value).length&&(d.x=Number(m.value)),0<mxUtils.trim(p.value).length&&
+(b+=g+";")}";"==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1))}b=new FilenameDialog(a,b,mxResources.get("add"),function(a){if(null!=a&&0<a.length){d=a.split(";");for(a=0;a<d.length;a++){var b=d[a],f=App.pluginRegistry[b];null!=f&&(b=f);0<b.length&&0>mxUtils.indexOf(e,b)&&e.push(b)}c()}},mxResources.get("enterValue")+" ("+mxResources.get("url")+")");a.showDialog(b.container,300,80,!0,!0);b.init()});g.className="geBtn";var h=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});
+h.className="geBtn";var l=mxUtils.button(mxResources.get("apply"),function(){mxSettings.setPlugins(e);mxSettings.save();a.hideDialog();a.alert(mxResources.get("restartForChangeRequired"))});l.className="geBtn gePrimaryBtn";var m=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/support/solutions/articles/16000056430")});m.className="geBtn";a.isOffline()&&!mxClient.IS_CHROMEAPP&&(m.style.display="none");var f=document.createElement("div");f.style.marginTop="14px";f.style.textAlign=
+"right";a.editor.cancelFirst?(f.appendChild(h),f.appendChild(m),f.appendChild(g),f.appendChild(l)):(f.appendChild(m),f.appendChild(g),f.appendChild(l),f.appendChild(h));b.appendChild(f);this.container=b},CropImageDialog=function(a,c,b){var d=document.createElement("div"),e=document.createElement("table"),g=document.createElement("tbody"),h=document.createElement("tr"),l=document.createElement("td");l.style.whiteSpace="nowrap";l.setAttribute("colspan","2");mxUtils.write(l,mxResources.get("loading")+
+"...");h.appendChild(l);g.appendChild(h);var h=document.createElement("tr"),m=document.createElement("td"),f=document.createElement("td");e.style.paddingLeft="6px";mxUtils.write(m,mxResources.get("left")+":");var k=document.createElement("input");k.setAttribute("type","text");k.style.width="100px";k.value="0";this.init=function(){k.focus();k.select()};f.appendChild(k);h.appendChild(m);h.appendChild(f);g.appendChild(h);h=document.createElement("tr");m=document.createElement("td");f=document.createElement("td");
+mxUtils.write(m,mxResources.get("top")+":");var n=document.createElement("input");n.setAttribute("type","text");n.style.width="100px";n.value="0";f.appendChild(n);h.appendChild(m);h.appendChild(f);g.appendChild(h);h=document.createElement("tr");m=document.createElement("td");f=document.createElement("td");mxUtils.write(m,mxResources.get("right")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.width="100px";p.value="0";f.appendChild(p);h.appendChild(m);h.appendChild(f);
+g.appendChild(h);h=document.createElement("tr");m=document.createElement("td");f=document.createElement("td");mxUtils.write(m,mxResources.get("bottom")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.width="100px";q.value="0";f.appendChild(q);h.appendChild(m);h.appendChild(f);g.appendChild(h);h=document.createElement("tr");m=document.createElement("td");f=document.createElement("td");mxUtils.write(m,mxResources.get("circle")+":");h.appendChild(m);var u=document.createElement("input");
+u.setAttribute("type","checkbox");f.appendChild(u);h.appendChild(f);g.appendChild(h);e.appendChild(g);d.appendChild(e);var e=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()}),v=new Image,x=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var c=document.createElement("canvas"),f=c.getContext("2d"),d=v.width,e=v.height,g=parseInt(k.value),h=parseInt(n.value),d=Math.max(1,d-g-parseInt(p.value)),e=Math.max(1,e-h-parseInt(q.value));c.width=d;c.height=e;u.checked&&(f.fillStyle=
+"#000000",f.arc(d/2,e/2,Math.min(d/2,e/2),0,2*Math.PI),f.fill(),f.globalCompositeOperation="source-in");f.drawImage(v,g,h,d,e,0,0,d,e);b(c.toDataURL())});x.setAttribute("disabled","disabled");v.onload=function(){x.removeAttribute("disabled");l.innerHTML="";mxUtils.write(l,mxResources.get("width")+": "+v.width+" "+mxResources.get("height")+": "+v.height)};v.src=c;mxEvent.addListener(d,"keypress",function(a){13==a.keyCode&&x.click()});c=document.createElement("div");c.style.marginTop="20px";c.style.textAlign=
+"right";a.editor.cancelFirst?(c.appendChild(e),c.appendChild(x)):(c.appendChild(x),c.appendChild(e));d.appendChild(c);this.container=d},EditGeometryDialog=function(a,c){var b=a.editor.graph,d=1==c.length?b.getCellGeometry(c[0]):null,e=document.createElement("div"),g=document.createElement("table"),h=document.createElement("tbody"),l=document.createElement("tr"),m=document.createElement("td"),f=document.createElement("td");g.style.paddingLeft="6px";mxUtils.write(m,mxResources.get("relative")+":");
+var k=document.createElement("input");k.setAttribute("type","checkbox");null!=d&&d.relative&&(k.setAttribute("checked","checked"),k.defaultChecked=!0);this.init=function(){k.focus()};f.appendChild(k);l.appendChild(m);l.appendChild(f);h.appendChild(l);l=document.createElement("tr");m=document.createElement("td");f=document.createElement("td");mxUtils.write(m,mxResources.get("left")+":");var n=document.createElement("input");n.setAttribute("type","text");n.style.width="100px";n.value=null!=d?d.x:"";
+f.appendChild(n);l.appendChild(m);l.appendChild(f);h.appendChild(l);l=document.createElement("tr");m=document.createElement("td");f=document.createElement("td");mxUtils.write(m,mxResources.get("top")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.width="100px";p.value=null!=d?d.y:"";f.appendChild(p);l.appendChild(m);l.appendChild(f);h.appendChild(l);l=document.createElement("tr");m=document.createElement("td");f=document.createElement("td");mxUtils.write(m,mxResources.get("dx")+
+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.width="100px";q.value=null!=d&&null!=d.offset?d.offset.x:"";f.appendChild(q);l.appendChild(m);l.appendChild(f);h.appendChild(l);l=document.createElement("tr");m=document.createElement("td");f=document.createElement("td");mxUtils.write(m,mxResources.get("dy")+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.width="100px";u.value=null!=d&&null!=d.offset?d.offset.y:"";f.appendChild(u);l.appendChild(m);
+l.appendChild(f);h.appendChild(l);l=document.createElement("tr");m=document.createElement("td");f=document.createElement("td");mxUtils.write(m,mxResources.get("width")+":");var v=document.createElement("input");v.setAttribute("type","text");v.style.width="100px";v.value=null!=d?d.width:"";f.appendChild(v);l.appendChild(m);l.appendChild(f);h.appendChild(l);l=document.createElement("tr");m=document.createElement("td");f=document.createElement("td");mxUtils.write(m,mxResources.get("height")+":");var x=
+document.createElement("input");x.setAttribute("type","text");x.style.width="100px";x.value=null!=d?d.height:"";f.appendChild(x);l.appendChild(m);l.appendChild(f);h.appendChild(l);l=document.createElement("tr");m=document.createElement("td");f=document.createElement("td");mxUtils.write(m,mxResources.get("rotation")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.width="100px";t.value=1==c.length?mxUtils.getValue(b.getCellStyle(c[0]),mxConstants.STYLE_ROTATION,0):"";
+f.appendChild(t);l.appendChild(m);l.appendChild(f);h.appendChild(l);g.appendChild(h);e.appendChild(g);d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});d.className="geBtn";var w=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();b.getModel().beginUpdate();try{for(var f=0;f<c.length;f++){var d=b.getCellGeometry(c[f]);null!=d&&(d=d.clone(),b.isCellMovable(c[f])&&(d.relative=k.checked,0<mxUtils.trim(n.value).length&&(d.x=Number(n.value)),0<mxUtils.trim(p.value).length&&
(d.y=Number(p.value)),0<mxUtils.trim(q.value).length&&(null==d.offset&&(d.offset=new mxPoint),d.offset.x=Number(q.value)),0<mxUtils.trim(u.value).length&&(null==d.offset&&(d.offset=new mxPoint),d.offset.y=Number(u.value))),b.isCellResizable(c[f])&&(0<mxUtils.trim(v.value).length&&(d.width=Number(v.value)),0<mxUtils.trim(x.value).length&&(d.height=Number(x.value))),b.getModel().setGeometry(c[f],d));0<mxUtils.trim(t.value).length&&b.setCellStyles(mxConstants.STYLE_ROTATION,Number(t.value),[c[f]])}}finally{b.getModel().endUpdate()}});
-w.className="geBtn gePrimaryBtn";mxEvent.addListener(e,"keypress",function(a){13==a.keyCode&&w.click()});g=document.createElement("div");g.style.marginTop="20px";g.style.textAlign="right";a.editor.cancelFirst?(g.appendChild(d),g.appendChild(w)):(g.appendChild(w),g.appendChild(d));e.appendChild(g);this.container=e},LibraryDialog=function(a,c,b,d,e,g){function k(a){for(a=document.elementFromPoint(a.clientX,a.clientY);null!=a&&a.parentNode!=q;)a=a.parentNode;var b=null;if(null!=a)for(var c=q.firstChild,
-b=0;null!=c&&c!=a;)c=c.nextSibling,b++;return b}function l(b,c,f,d,m,e,t,g,p){try{if(null==c||"image/"==c.substring(0,6))if(null==b&&null!=t||null==v[b]){var n=function(){H.innerHTML="";H.style.cursor="pointer";H.style.whiteSpace="nowrap";H.style.textOverflow="ellipsis";mxUtils.write(H,null!=K.title&&0<K.title.length?K.title:mxResources.get("untitled"));H.style.color=null==K.title||0==K.title.length?"#d0d0d0":""};q.style.backgroundImage="";u.style.display="none";var y=m,z=e;if(m>a.maxImageSize||e>
-a.maxImageSize){var A=Math.min(1,Math.min(a.maxImageSize/Math.max(1,m)),a.maxImageSize/Math.max(1,e));m*=A;e*=A}y>z?(z=Math.round(100*z/y),y=100):(y=Math.round(100*y/z),z=100);var G=document.createElement("div");G.setAttribute("draggable","true");G.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";G.style.position="relative";G.style.cursor="move";mxUtils.setPrefixedStyle(G.style,"transition","transform .1s ease-in-out");if(null!=b){var F=document.createElement("img");F.setAttribute("src",D.convert(b));
-F.style.width=y+"px";F.style.height=z+"px";F.style.margin="10px";F.style.paddingBottom=Math.floor((100-z)/2)+"px";F.style.paddingLeft=Math.floor((100-y)/2)+"px";G.appendChild(F)}else if(null!=t){var E=a.stringToCells(a.editor.graph.decompress(t.xml));0<E.length&&(a.sidebar.createThumb(E,100,100,G,null,!0,!1),G.firstChild.style.display=mxClient.IS_QUIRKS?"inline":"inline-block",G.firstChild.style.cursor="")}var B=document.createElement("img");B.setAttribute("src",Editor.closeImage);B.setAttribute("border",
-"0");B.setAttribute("title",mxResources.get("delete"));B.setAttribute("align","top");B.style.paddingTop="4px";B.style.position="absolute";B.style.marginLeft="-12px";B.style.zIndex="1";B.style.cursor="pointer";mxEvent.addListener(B,"dragstart",function(a){mxEvent.consume(a)});(function(a,b,c){mxEvent.addListener(B,"click",function(f){v[b]=null;for(var d=0;d<h.length;d++)if(null!=h[d].data&&h[d].data==b||null!=h[d].xml&&null!=c&&h[d].xml==c.xml){h.splice(d,1);break}G.parentNode.removeChild(a);0==h.length&&
-(q.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",u.style.display="");mxEvent.consume(f)});mxEvent.addListener(B,"dblclick",function(a){mxEvent.consume(a)})})(G,b,t);G.appendChild(B);G.style.marginBottom="30px";var H=document.createElement("div");H.style.position="absolute";H.style.boxSizing="border-box";H.style.bottom="-18px";H.style.left="10px";H.style.right="10px";H.style.backgroundColor="#ffffff";H.style.overflow="hidden";H.style.textAlign="center";var K=null;null!=b?(K={data:b,
-w:m,h:e,title:p},null!=g&&(K.aspect=g),v[b]=F,h.push(K)):null!=t&&(t.aspect="fixed",h.push(t),K=t);mxEvent.addListener(H,"keydown",function(a){13==a.keyCode&&null!=w&&(w(),w=null,mxEvent.consume(a))});n();G.appendChild(H);mxEvent.addListener(H,"mousedown",function(a){"true"!=H.getAttribute("contentEditable")&&mxEvent.consume(a)});E=function(b){if(mxClient.IS_IOS||mxClient.IS_QUIRKS||mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var c=new FilenameDialog(a,K.title||"",mxResources.get("ok"),
-function(a){null!=a&&(K.title=a,n())},mxResources.get("enterValue"));a.showDialog(c.container,300,80,!0,!0);c.init();mxEvent.consume(b)}else if("true"!=H.getAttribute("contentEditable")){null!=w&&(w(),w=null);if(null==K.title||0==K.title.length)H.innerHTML="";H.style.textOverflow="";H.style.whiteSpace="";H.style.cursor="text";H.style.color="";H.setAttribute("contentEditable","true");H.focus();document.execCommand("selectAll",!1,null);w=function(){H.removeAttribute("contentEditable");H.style.cursor=
-"pointer";K.title=H.innerHTML;n()};mxEvent.consume(b)}};mxEvent.addListener(H,"click",E);mxEvent.addListener(G,"dblclick",E);q.appendChild(G);mxEvent.addListener(G,"dragstart",function(a){null==b&&null!=t&&(B.style.visibility="hidden",H.style.visibility="hidden");mxClient.IS_FF&&null!=t.xml&&a.dataTransfer.setData("Text",t.xml);x=k(a);mxClient.IS_GC&&(G.style.opacity="0.9");window.setTimeout(function(){mxUtils.setPrefixedStyle(G.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(G,30);B.style.visibility=
-"";H.style.visibility=""},0)});mxEvent.addListener(G,"dragend",function(a){"hidden"==B.style.visibility&&(B.style.visibility="",H.style.visibility="");x=null;mxUtils.setOpacity(G,100);mxUtils.setPrefixedStyle(G.style,"transform",null)})}else C||(C=!0,a.handleError({message:mxResources.get("fileExists")}));else{m=!1;try{if(a.spinner.stop(),y=mxUtils.parseXml(b),"mxlibrary"==y.documentElement.nodeName){z=JSON.parse(mxUtils.getTextContent(y.documentElement));if(null!=z&&0<z.length)for(var M=0;M<z.length;M++)null!=
-z[M].xml?l(null,null,0,0,0,0,z[M]):l(z[M].data,null,0,0,z[M].w,z[M].h,null,"fixed",z[M].title);m=!0}else if("mxfile"==y.documentElement.nodeName){for(var I=y.documentElement.getElementsByTagName("diagram"),M=0;M<I.length;M++){var z=mxUtils.getTextContent(I[M]),E=a.stringToCells(a.editor.graph.decompress(z)),V=a.editor.graph.getBoundingBoxFromGeometry(E);l(null,null,0,0,0,0,{xml:z,w:V.width,h:V.height})}m=!0}}catch(J){}m||(a.spinner.stop(),a.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(J){}return null}
-function n(a){a.dataTransfer.dropEffect=null!=x?"move":"copy";a.stopPropagation();a.preventDefault()}function f(b){b.stopPropagation();b.preventDefault();C=!1;t=k(b);if(null!=x)null!=t&&t<q.children.length?(h.splice(t>x?t-1:t,0,h.splice(x,1)[0]),q.insertBefore(q.children[x],q.children[t])):(h.push(h.splice(x,1)[0]),q.appendChild(q.children[x]));else if(0<b.dataTransfer.files.length)a.importFiles(b.dataTransfer.files,0,0,a.maxImageSize,y(b));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")){var c=
-decodeURIComponent(b.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(c)||/(\.png)($|\?)/i.test(c)||/(\.gif)($|\?)/i.test(c)||/(\.svg)($|\?)/i.test(c))&&a.loadImage(c,function(a){l(c,null,0,0,a.width,a.height);q.scrollTop=q.scrollHeight})}b.stopPropagation();b.preventDefault()}var h=[];b=document.createElement("div");b.style.height="100%";var m=document.createElement("div");m.style.whiteSpace="nowrap";m.style.height="40px";b.appendChild(m);mxUtils.write(m,mxResources.get("filename")+
-":");null==c&&(c=a.defaultLibraryName+".xml");var p=document.createElement("input");p.setAttribute("value",c);p.style.marginRight="20px";p.style.marginLeft="10px";p.style.width="500px";null==e||e.isRenamable()||p.setAttribute("disabled","true");this.init=function(){if(null==e||e.isRenamable())p.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?p.select():document.execCommand("selectAll",!1,null)};m.appendChild(p);var q=document.createElement("div");q.style.borderWidth=
-"1px 0px 1px 0px";q.style.borderColor="#d3d3d3";q.style.borderStyle="solid";q.style.marginTop="6px";q.style.overflow="auto";q.style.height="340px";q.style.backgroundPosition="center center";q.style.backgroundRepeat="no-repeat";0==h.length&&Graph.fileSupport&&(q.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");var u=document.createElement("div");u.style.position="absolute";u.style.width="640px";u.style.top="260px";u.style.textAlign="center";u.style.fontSize="22px";u.style.color="#a0c3ff";
-mxUtils.write(u,mxResources.get("dragImagesHere"));b.appendChild(u);var v={},x=null,t=null,w=null;c=function(a){"true"!=mxEvent.getSource(a).getAttribute("contentEditable")&&null!=w&&(w(),w=null,mxEvent.consume(a))};mxEvent.addListener(q,"mousedown",c);mxEvent.addListener(q,"pointerdown",c);mxEvent.addListener(q,"touchstart",c);var D=new mxUrlConverter,C=!1;if(null!=d)for(c=0;c<d.length;c++)m=d[c],l(m.data,null,0,0,m.w,m.h,m,m.aspect,m.title);mxEvent.addListener(q,"dragleave",function(a){u.style.cursor=
-"";for(var b=mxEvent.getSource(a);null!=b;){if(b==q||b==u){a.stopPropagation();a.preventDefault();break}b=b.parentNode}});var y=function(b){return function(c,f,d,h,m,e,t,g,p){null!=p&&(/(\.vsdx)($|\?)/i.test(p.name)||/(\.vssx)($|\?)/i.test(p.name))?a.importVisio(p,mxUtils.bind(this,function(c){a.spinner.stop();l(c,f,d,h,m,e,t,"fixed",mxEvent.isAltDown(b)?null:t.substring(0,t.lastIndexOf(".")).replace(/_/g," "))})):null!=p&&!a.isOffline()&&(new XMLHttpRequest).upload&&a.isRemoteFileFormat(c,p.name)?
-a.parseFile(p,mxUtils.bind(this,function(c){4==c.readyState&&(a.spinner.stop(),200<=c.status&&299>=c.status&&(l(c.responseText,f,d,h,m,e,t,"fixed",mxEvent.isAltDown(b)?null:t.substring(0,t.lastIndexOf(".")).replace(/_/g," ")),q.scrollTop=q.scrollHeight))})):(l(c,f,d,h,m,e,t,"fixed",mxEvent.isAltDown(b)?null:t.substring(0,t.lastIndexOf(".")).replace(/_/g," ")),q.scrollTop=q.scrollHeight)}};mxEvent.addListener(q,"dragover",n);mxEvent.addListener(q,"drop",f);mxEvent.addListener(u,"dragover",n);mxEvent.addListener(u,
-"drop",f);b.appendChild(q);d=document.createElement("div");d.style.textAlign="right";d.style.marginTop="20px";c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});c.setAttribute("id","btnCancel");c.className="geBtn";a.editor.cancelFirst&&d.appendChild(c);m=mxUtils.button(mxResources.get("export"),function(){var b=a.createLibraryDataFromImages(h),c=p.value;/(\.xml)$/i.test(c)||(c+=".xml");a.isLocalFileSave()?a.saveLocalFile(b,c,"text/xml",null,null,!0):(new mxXmlRequest(SAVE_URL,
-"filename="+encodeURIComponent(c)+"&format=xml&xml="+encodeURIComponent(b))).simulate(document,"_blank")});m.setAttribute("id","btnDownload");m.className="geBtn";d.appendChild(m);var z=document.createElement("input");z.setAttribute("multiple","multiple");z.setAttribute("type","file");null==document.documentMode&&(mxEvent.addListener(z,"change",function(b){C=!1;a.importFiles(z.files,0,0,a.maxImageSize,function(a,c,f,d,h,m,e,t,g){y(b)(a,c,f,d,h,m,e,t,g);z.value=""});q.scrollTop=q.scrollHeight}),m=mxUtils.button(mxResources.get("import"),
-function(){null!=w&&(w(),w=null);z.click()}),m.setAttribute("id","btnAddImage"),m.className="geBtn",d.appendChild(m));m=mxUtils.button(mxResources.get("addImageUrl"),function(){null!=w&&(w(),w=null);a.showImageDialog(mxResources.get("addImageUrl"),"",function(a,b,c){C=!1;if(null!=a){if("data:image/"==a.substring(0,11)){var f=a.indexOf(",");0<f&&(a=a.substring(0,f)+";base64,"+a.substring(f+1))}l(a,null,0,0,b,c);q.scrollTop=q.scrollHeight}})});m.setAttribute("id","btnAddImageUrl");m.className="geBtn";
-d.appendChild(m);this.saveBtnClickHandler=function(b,c,f,d){a.saveLibrary(b,c,f,d)};m=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(){null!=w&&(w(),w=null);this.saveBtnClickHandler(p.value,h,e,g)}));m.setAttribute("id","btnSave");m.className="geBtn gePrimaryBtn";d.appendChild(m);a.editor.cancelFirst||d.appendChild(c);b.appendChild(d);this.container=b},EditShapeDialog=function(a,c,b,d,e){d=null!=d?d:300;e=null!=e?e:120;var g,k,l=document.createElement("table"),n=document.createElement("tbody");
-l.style.cellPadding="4px";g=document.createElement("tr");k=document.createElement("td");k.setAttribute("colspan","2");k.style.fontSize="10pt";mxUtils.write(k,b);g.appendChild(k);n.appendChild(g);g=document.createElement("tr");k=document.createElement("td");var f=document.createElement("textarea");f.style.outline="none";f.style.resize="none";f.style.width=d-200+"px";f.style.height=e+"px";this.textarea=f;this.init=function(){f.focus();f.scrollTop=0};k.appendChild(f);g.appendChild(k);k=document.createElement("td");
-b=document.createElement("div");b.style.position="relative";b.style.border="1px solid gray";b.style.top="6px";b.style.width="200px";b.style.height=e+4+"px";b.style.overflow="hidden";b.style.marginBottom="16px";mxEvent.disableContextMenu(b);k.appendChild(b);var h=new Graph(b);h.setEnabled(!1);var m=a.editor.graph.cloneCell(c);h.addCells([m]);b=h.view.getState(m);var p="";null!=b.shape&&null!=b.shape.stencil&&(p=mxUtils.getPrettyXml(b.shape.stencil.desc));mxUtils.write(f,p||"");b=h.getGraphBounds();
-e=Math.min(160/b.width,(e-40)/b.height);h.view.scaleAndTranslate(e,20/e-b.x,20/e-b.y);g.appendChild(k);n.appendChild(g);g=document.createElement("tr");k=document.createElement("td");k.setAttribute("colspan","2");k.style.paddingTop="2px";k.style.whiteSpace="nowrap";k.setAttribute("align","right");e=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});e.className="geBtn";a.editor.cancelFirst&&k.appendChild(e);a.isOffline()||(b=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/support/solutions/articles/16000052874")}),
-b.className="geBtn",k.appendChild(b));var q=function(b,c,d){var h=f.value,m=mxUtils.parseXml(h),h=mxUtils.getPrettyXml(m.documentElement),m=m.documentElement.getElementsByTagName("parsererror");if(null!=m&&0<m.length)a.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(d&&a.hideDialog(),m=!b.model.contains(c),!d||m||h!=p){h=a.editor.graph.compress(h);b.getModel().beginUpdate();try{if(m){var e=a.editor.graph.getInsertPoint();c.geometry.x=e.x;
-c.geometry.y=e.y;b.addCell(c)}b.setCellStyles(mxConstants.STYLE_SHAPE,"stencil("+h+")",[c])}catch(C){throw C;}finally{b.getModel().endUpdate()}m&&b.setSelectionCell(c)}};b=mxUtils.button(mxResources.get("preview"),function(){q(h,m,!1)});b.className="geBtn";k.appendChild(b);b=mxUtils.button(mxResources.get("apply"),function(){q(a.editor.graph,c,!0)});b.className="geBtn gePrimaryBtn";k.appendChild(b);a.editor.cancelFirst||k.appendChild(e);g.appendChild(k);n.appendChild(g);l.appendChild(n);this.container=
-l},CustomDialog=function(a,c,b,d,e,g,k,l){var n=document.createElement("div");n.appendChild(c);c=document.createElement("div");c.style.marginTop="16px";c.style.textAlign="center";null!=k&&c.appendChild(k);k=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=d&&d()});k.className="geBtn";l&&(k.style.display="none");a.editor.cancelFirst&&c.appendChild(k);a.isOffline()||null==g||(l=mxUtils.button(mxResources.get("help"),function(){a.openLink(g)}),l.className="geBtn",c.appendChild(l));
-e=mxUtils.button(e||mxResources.get("ok"),function(){a.hideDialog();null!=b&&b()});c.appendChild(e);e.className="geBtn gePrimaryBtn";a.editor.cancelFirst||c.appendChild(k);n.appendChild(c);this.cancelBtn=k;this.okButton=e;this.container=n},TemplatesDialog=function(){var a='<div class="geTempDlgHeader"><img src="/images/draw.io-logo.svg" class="geTempDlgHeaderLogo"><input type="search" class="geTempDlgSearchBox" placeholder="'+mxResources.get("search",null,"Search")+'"></div><div class="geTemplatesList"><div class="geTempDlgNewDiagramlbl">'+
+w.className="geBtn gePrimaryBtn";mxEvent.addListener(e,"keypress",function(a){13==a.keyCode&&w.click()});g=document.createElement("div");g.style.marginTop="20px";g.style.textAlign="right";a.editor.cancelFirst?(g.appendChild(d),g.appendChild(w)):(g.appendChild(w),g.appendChild(d));e.appendChild(g);this.container=e},LibraryDialog=function(a,c,b,d,e,g){function h(a){for(a=document.elementFromPoint(a.clientX,a.clientY);null!=a&&a.parentNode!=q;)a=a.parentNode;var b=null;if(null!=a)for(var c=q.firstChild,
+b=0;null!=c&&c!=a;)c=c.nextSibling,b++;return b}function l(b,c,f,d,e,n,t,g,p){try{if(null==c||"image/"==c.substring(0,6))if(null==b&&null!=t||null==v[b]){var m=function(){H.innerHTML="";H.style.cursor="pointer";H.style.whiteSpace="nowrap";H.style.textOverflow="ellipsis";mxUtils.write(H,null!=K.title&&0<K.title.length?K.title:mxResources.get("untitled"));H.style.color=null==K.title||0==K.title.length?"#d0d0d0":""};q.style.backgroundImage="";u.style.display="none";var y=e,z=n;if(e>a.maxImageSize||n>
+a.maxImageSize){var A=Math.min(1,Math.min(a.maxImageSize/Math.max(1,e)),a.maxImageSize/Math.max(1,n));e*=A;n*=A}y>z?(z=Math.round(100*z/y),y=100):(y=Math.round(100*y/z),z=100);var G=document.createElement("div");G.setAttribute("draggable","true");G.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";G.style.position="relative";G.style.cursor="move";mxUtils.setPrefixedStyle(G.style,"transition","transform .1s ease-in-out");if(null!=b){var F=document.createElement("img");F.setAttribute("src",D.convert(b));
+F.style.width=y+"px";F.style.height=z+"px";F.style.margin="10px";F.style.paddingBottom=Math.floor((100-z)/2)+"px";F.style.paddingLeft=Math.floor((100-y)/2)+"px";G.appendChild(F)}else if(null!=t){var E=a.stringToCells(a.editor.graph.decompress(t.xml));0<E.length&&(a.sidebar.createThumb(E,100,100,G,null,!0,!1),G.firstChild.style.display=mxClient.IS_QUIRKS?"inline":"inline-block",G.firstChild.style.cursor="")}var C=document.createElement("img");C.setAttribute("src",Editor.closeImage);C.setAttribute("border",
+"0");C.setAttribute("title",mxResources.get("delete"));C.setAttribute("align","top");C.style.paddingTop="4px";C.style.position="absolute";C.style.marginLeft="-12px";C.style.zIndex="1";C.style.cursor="pointer";mxEvent.addListener(C,"dragstart",function(a){mxEvent.consume(a)});(function(a,b,c){mxEvent.addListener(C,"click",function(f){v[b]=null;for(var d=0;d<k.length;d++)if(null!=k[d].data&&k[d].data==b||null!=k[d].xml&&null!=c&&k[d].xml==c.xml){k.splice(d,1);break}G.parentNode.removeChild(a);0==k.length&&
+(q.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",u.style.display="");mxEvent.consume(f)});mxEvent.addListener(C,"dblclick",function(a){mxEvent.consume(a)})})(G,b,t);G.appendChild(C);G.style.marginBottom="30px";var H=document.createElement("div");H.style.position="absolute";H.style.boxSizing="border-box";H.style.bottom="-18px";H.style.left="10px";H.style.right="10px";H.style.backgroundColor="#ffffff";H.style.overflow="hidden";H.style.textAlign="center";var K=null;null!=b?(K={data:b,
+w:e,h:n,title:p},null!=g&&(K.aspect=g),v[b]=F,k.push(K)):null!=t&&(t.aspect="fixed",k.push(t),K=t);mxEvent.addListener(H,"keydown",function(a){13==a.keyCode&&null!=w&&(w(),w=null,mxEvent.consume(a))});m();G.appendChild(H);mxEvent.addListener(H,"mousedown",function(a){"true"!=H.getAttribute("contentEditable")&&mxEvent.consume(a)});E=function(b){if(mxClient.IS_IOS||mxClient.IS_QUIRKS||mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var c=new FilenameDialog(a,K.title||"",mxResources.get("ok"),
+function(a){null!=a&&(K.title=a,m())},mxResources.get("enterValue"));a.showDialog(c.container,300,80,!0,!0);c.init();mxEvent.consume(b)}else if("true"!=H.getAttribute("contentEditable")){null!=w&&(w(),w=null);if(null==K.title||0==K.title.length)H.innerHTML="";H.style.textOverflow="";H.style.whiteSpace="";H.style.cursor="text";H.style.color="";H.setAttribute("contentEditable","true");H.focus();document.execCommand("selectAll",!1,null);w=function(){H.removeAttribute("contentEditable");H.style.cursor=
+"pointer";K.title=H.innerHTML;m()};mxEvent.consume(b)}};mxEvent.addListener(H,"click",E);mxEvent.addListener(G,"dblclick",E);q.appendChild(G);mxEvent.addListener(G,"dragstart",function(a){null==b&&null!=t&&(C.style.visibility="hidden",H.style.visibility="hidden");mxClient.IS_FF&&null!=t.xml&&a.dataTransfer.setData("Text",t.xml);x=h(a);mxClient.IS_GC&&(G.style.opacity="0.9");window.setTimeout(function(){mxUtils.setPrefixedStyle(G.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(G,30);C.style.visibility=
+"";H.style.visibility=""},0)});mxEvent.addListener(G,"dragend",function(a){"hidden"==C.style.visibility&&(C.style.visibility="",H.style.visibility="");x=null;mxUtils.setOpacity(G,100);mxUtils.setPrefixedStyle(G.style,"transform",null)})}else B||(B=!0,a.handleError({message:mxResources.get("fileExists")}));else{e=!1;try{if(a.spinner.stop(),y=mxUtils.parseXml(b),"mxlibrary"==y.documentElement.nodeName){z=JSON.parse(mxUtils.getTextContent(y.documentElement));if(null!=z&&0<z.length)for(var M=0;M<z.length;M++)null!=
+z[M].xml?l(null,null,0,0,0,0,z[M]):l(z[M].data,null,0,0,z[M].w,z[M].h,null,"fixed",z[M].title);e=!0}else if("mxfile"==y.documentElement.nodeName){for(var I=y.documentElement.getElementsByTagName("diagram"),M=0;M<I.length;M++){var z=mxUtils.getTextContent(I[M]),E=a.stringToCells(a.editor.graph.decompress(z)),V=a.editor.graph.getBoundingBoxFromGeometry(E);l(null,null,0,0,0,0,{xml:z,w:V.width,h:V.height})}e=!0}}catch(ba){}e||(a.spinner.stop(),a.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(ba){}return null}
+function m(a){a.dataTransfer.dropEffect=null!=x?"move":"copy";a.stopPropagation();a.preventDefault()}function f(b){b.stopPropagation();b.preventDefault();B=!1;t=h(b);if(null!=x)null!=t&&t<q.children.length?(k.splice(t>x?t-1:t,0,k.splice(x,1)[0]),q.insertBefore(q.children[x],q.children[t])):(k.push(k.splice(x,1)[0]),q.appendChild(q.children[x]));else if(0<b.dataTransfer.files.length)a.importFiles(b.dataTransfer.files,0,0,a.maxImageSize,y(b));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")){var c=
+decodeURIComponent(b.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(c)||/(\.png)($|\?)/i.test(c)||/(\.gif)($|\?)/i.test(c)||/(\.svg)($|\?)/i.test(c))&&a.loadImage(c,function(a){l(c,null,0,0,a.width,a.height);q.scrollTop=q.scrollHeight})}b.stopPropagation();b.preventDefault()}var k=[];b=document.createElement("div");b.style.height="100%";var n=document.createElement("div");n.style.whiteSpace="nowrap";n.style.height="40px";b.appendChild(n);mxUtils.write(n,mxResources.get("filename")+
+":");null==c&&(c=a.defaultLibraryName+".xml");var p=document.createElement("input");p.setAttribute("value",c);p.style.marginRight="20px";p.style.marginLeft="10px";p.style.width="500px";null==e||e.isRenamable()||p.setAttribute("disabled","true");this.init=function(){if(null==e||e.isRenamable())p.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?p.select():document.execCommand("selectAll",!1,null)};n.appendChild(p);var q=document.createElement("div");q.style.borderWidth=
+"1px 0px 1px 0px";q.style.borderColor="#d3d3d3";q.style.borderStyle="solid";q.style.marginTop="6px";q.style.overflow="auto";q.style.height="340px";q.style.backgroundPosition="center center";q.style.backgroundRepeat="no-repeat";0==k.length&&Graph.fileSupport&&(q.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");var u=document.createElement("div");u.style.position="absolute";u.style.width="640px";u.style.top="260px";u.style.textAlign="center";u.style.fontSize="22px";u.style.color="#a0c3ff";
+mxUtils.write(u,mxResources.get("dragImagesHere"));b.appendChild(u);var v={},x=null,t=null,w=null;c=function(a){"true"!=mxEvent.getSource(a).getAttribute("contentEditable")&&null!=w&&(w(),w=null,mxEvent.consume(a))};mxEvent.addListener(q,"mousedown",c);mxEvent.addListener(q,"pointerdown",c);mxEvent.addListener(q,"touchstart",c);var D=new mxUrlConverter,B=!1;if(null!=d)for(c=0;c<d.length;c++)n=d[c],l(n.data,null,0,0,n.w,n.h,n,n.aspect,n.title);mxEvent.addListener(q,"dragleave",function(a){u.style.cursor=
+"";for(var b=mxEvent.getSource(a);null!=b;){if(b==q||b==u){a.stopPropagation();a.preventDefault();break}b=b.parentNode}});var y=function(b){return function(c,f,d,k,e,n,t,g,p){null!=p&&(/(\.vsdx)($|\?)/i.test(p.name)||/(\.vssx)($|\?)/i.test(p.name))?a.importVisio(p,mxUtils.bind(this,function(c){a.spinner.stop();l(c,f,d,k,e,n,t,"fixed",mxEvent.isAltDown(b)?null:t.substring(0,t.lastIndexOf(".")).replace(/_/g," "))})):null!=p&&!a.isOffline()&&(new XMLHttpRequest).upload&&a.isRemoteFileFormat(c,p.name)?
+a.parseFile(p,mxUtils.bind(this,function(c){4==c.readyState&&(a.spinner.stop(),200<=c.status&&299>=c.status&&(l(c.responseText,f,d,k,e,n,t,"fixed",mxEvent.isAltDown(b)?null:t.substring(0,t.lastIndexOf(".")).replace(/_/g," ")),q.scrollTop=q.scrollHeight))})):(l(c,f,d,k,e,n,t,"fixed",mxEvent.isAltDown(b)?null:t.substring(0,t.lastIndexOf(".")).replace(/_/g," ")),q.scrollTop=q.scrollHeight)}};mxEvent.addListener(q,"dragover",m);mxEvent.addListener(q,"drop",f);mxEvent.addListener(u,"dragover",m);mxEvent.addListener(u,
+"drop",f);b.appendChild(q);d=document.createElement("div");d.style.textAlign="right";d.style.marginTop="20px";c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});c.setAttribute("id","btnCancel");c.className="geBtn";a.editor.cancelFirst&&d.appendChild(c);n=mxUtils.button(mxResources.get("export"),function(){var b=a.createLibraryDataFromImages(k),c=p.value;/(\.xml)$/i.test(c)||(c+=".xml");a.isLocalFileSave()?a.saveLocalFile(b,c,"text/xml",null,null,!0):(new mxXmlRequest(SAVE_URL,
+"filename="+encodeURIComponent(c)+"&format=xml&xml="+encodeURIComponent(b))).simulate(document,"_blank")});n.setAttribute("id","btnDownload");n.className="geBtn";d.appendChild(n);var z=document.createElement("input");z.setAttribute("multiple","multiple");z.setAttribute("type","file");null==document.documentMode&&(mxEvent.addListener(z,"change",function(b){B=!1;a.importFiles(z.files,0,0,a.maxImageSize,function(a,c,f,d,k,e,n,t,g){y(b)(a,c,f,d,k,e,n,t,g);z.value=""});q.scrollTop=q.scrollHeight}),n=mxUtils.button(mxResources.get("import"),
+function(){null!=w&&(w(),w=null);z.click()}),n.setAttribute("id","btnAddImage"),n.className="geBtn",d.appendChild(n));n=mxUtils.button(mxResources.get("addImageUrl"),function(){null!=w&&(w(),w=null);a.showImageDialog(mxResources.get("addImageUrl"),"",function(a,b,c){B=!1;if(null!=a){if("data:image/"==a.substring(0,11)){var f=a.indexOf(",");0<f&&(a=a.substring(0,f)+";base64,"+a.substring(f+1))}l(a,null,0,0,b,c);q.scrollTop=q.scrollHeight}})});n.setAttribute("id","btnAddImageUrl");n.className="geBtn";
+d.appendChild(n);this.saveBtnClickHandler=function(b,c,f,d){a.saveLibrary(b,c,f,d)};n=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(){null!=w&&(w(),w=null);this.saveBtnClickHandler(p.value,k,e,g)}));n.setAttribute("id","btnSave");n.className="geBtn gePrimaryBtn";d.appendChild(n);a.editor.cancelFirst||d.appendChild(c);b.appendChild(d);this.container=b},EditShapeDialog=function(a,c,b,d,e){d=null!=d?d:300;e=null!=e?e:120;var g,h,l=document.createElement("table"),m=document.createElement("tbody");
+l.style.cellPadding="4px";g=document.createElement("tr");h=document.createElement("td");h.setAttribute("colspan","2");h.style.fontSize="10pt";mxUtils.write(h,b);g.appendChild(h);m.appendChild(g);g=document.createElement("tr");h=document.createElement("td");var f=document.createElement("textarea");f.style.outline="none";f.style.resize="none";f.style.width=d-200+"px";f.style.height=e+"px";this.textarea=f;this.init=function(){f.focus();f.scrollTop=0};h.appendChild(f);g.appendChild(h);h=document.createElement("td");
+b=document.createElement("div");b.style.position="relative";b.style.border="1px solid gray";b.style.top="6px";b.style.width="200px";b.style.height=e+4+"px";b.style.overflow="hidden";b.style.marginBottom="16px";mxEvent.disableContextMenu(b);h.appendChild(b);var k=new Graph(b);k.setEnabled(!1);var n=a.editor.graph.cloneCell(c);k.addCells([n]);b=k.view.getState(n);var p="";null!=b.shape&&null!=b.shape.stencil&&(p=mxUtils.getPrettyXml(b.shape.stencil.desc));mxUtils.write(f,p||"");b=k.getGraphBounds();
+e=Math.min(160/b.width,(e-40)/b.height);k.view.scaleAndTranslate(e,20/e-b.x,20/e-b.y);g.appendChild(h);m.appendChild(g);g=document.createElement("tr");h=document.createElement("td");h.setAttribute("colspan","2");h.style.paddingTop="2px";h.style.whiteSpace="nowrap";h.setAttribute("align","right");e=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});e.className="geBtn";a.editor.cancelFirst&&h.appendChild(e);a.isOffline()||(b=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/support/solutions/articles/16000052874")}),
+b.className="geBtn",h.appendChild(b));var q=function(b,c,d){var k=f.value,e=mxUtils.parseXml(k),k=mxUtils.getPrettyXml(e.documentElement),e=e.documentElement.getElementsByTagName("parsererror");if(null!=e&&0<e.length)a.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(d&&a.hideDialog(),e=!b.model.contains(c),!d||e||k!=p){k=a.editor.graph.compress(k);b.getModel().beginUpdate();try{if(e){var n=a.editor.graph.getInsertPoint();c.geometry.x=n.x;
+c.geometry.y=n.y;b.addCell(c)}b.setCellStyles(mxConstants.STYLE_SHAPE,"stencil("+k+")",[c])}catch(B){throw B;}finally{b.getModel().endUpdate()}e&&b.setSelectionCell(c)}};b=mxUtils.button(mxResources.get("preview"),function(){q(k,n,!1)});b.className="geBtn";h.appendChild(b);b=mxUtils.button(mxResources.get("apply"),function(){q(a.editor.graph,c,!0)});b.className="geBtn gePrimaryBtn";h.appendChild(b);a.editor.cancelFirst||h.appendChild(e);g.appendChild(h);m.appendChild(g);l.appendChild(m);this.container=
+l},CustomDialog=function(a,c,b,d,e,g,h,l){var m=document.createElement("div");m.appendChild(c);c=document.createElement("div");c.style.marginTop="16px";c.style.textAlign="center";null!=h&&c.appendChild(h);h=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=d&&d()});h.className="geBtn";l&&(h.style.display="none");a.editor.cancelFirst&&c.appendChild(h);a.isOffline()||null==g||(l=mxUtils.button(mxResources.get("help"),function(){a.openLink(g)}),l.className="geBtn",c.appendChild(l));
+e=mxUtils.button(e||mxResources.get("ok"),function(){a.hideDialog();null!=b&&b()});c.appendChild(e);e.className="geBtn gePrimaryBtn";a.editor.cancelFirst||c.appendChild(h);m.appendChild(c);this.cancelBtn=h;this.okButton=e;this.container=m},TemplatesDialog=function(){var a='<div class="geTempDlgHeader"><img src="/images/draw.io-logo.svg" class="geTempDlgHeaderLogo"><input type="search" class="geTempDlgSearchBox" placeholder="'+mxResources.get("search",null,"Search")+'"></div><div class="geTemplatesList"><div class="geTempDlgNewDiagramlbl">'+
mxResources.get("newDiagram",null,"New Diagram")+'</div><div class="geTempDlgHLine"></div><div class="geTemplatesLbl">'+mxResources.get("templates",null,"Templates")+'</div></div><div class="geTempDlgContent"><div class="geTempDlgNewDiagramCat"><div class="geTempDlgNewDiagramCatLbl">'+mxResources.get("newDiagram",null,"New Diagram")+'</div><div class="geTempDlgNewDiagramCatList"></div><div class="geTempDlgNewDiagramCatFooter"><div class="geTempDlgShowAllBtn">'+mxResources.get("showAll",null,"+ Show all")+
'</div></div></div><div class="geTempDlgDiagramsList"><div class="geTempDlgDiagramsListHeader"><div class="geTempDlgDiagramsListTitle"></div><div class="geTempDlgDiagramsListBtns"><div class="geTempDlgRadioBtn geTempDlgRadioBtnLarge" data-id="myDiagramsBtn"><img src="/images/my-diagrams.svg" class="geTempDlgMyDiagramsBtnImg"> <span>'+mxResources.get("myDiagrams",null,"My diagrams")+'</span></div><div class="geTempDlgRadioBtn geTempDlgRadioBtnLarge geTempDlgRadioBtnActive" data-id="allDiagramsBtn"><img src="/images/all-diagrams-sel.svg" class="geTempDlgAllDiagramsBtnImg"> <span>'+
mxResources.get("allDiagrams",null,"All diagrams")+'</span></div><div class="geTempDlgSpacer"> </div><div class="geTempDlgRadioBtn geTempDlgRadioBtnSmall geTempDlgRadioBtnActive" data-id="tilesBtn"><img src="/images/tiles-sel.svg" class="geTempDlgTilesBtnImg"></div><div class="geTempDlgRadioBtn geTempDlgRadioBtnSmall" data-id="listBtn"><img src="/images/list.svg" class="geTempDlgListBtnImg"></div></div></div><div class="geTempDlgDiagramsTiles"></div></div></div><br style="clear:both;"/><div class="geTempDlgFooter"><span class="geTempDlgLinkToDiagram geTempDlgLinkToDiagramHint">&#x1F6C8; '+
mxResources.get("linkToDiagramHint",null,"Add a link to this diagram. The diagram can only be edited from the page that owns it.")+'</span><button class="geTempDlgLinkToDiagram geTempDlgLinkToDiagramBtn">'+mxResources.get("linkToDiagram",null,"Link to Diagram")+'</button><div class="geTempDlgCreateBtn">'+mxResources.get("create",null,"Create")+'</div><div class="geTempDlgCancelBtn">'+mxResources.get("cancel",null,"Cancel")+"</div></div>",c=document.createElement("div");c.innerHTML=a;c.className="geTemplateDlg";
var a=window.innerWidth,b=window.innerHeight,d=987,e=712;.9*a<d&&(d=Math.max(.9*a,600),c.style.width=d+"px");.9*b<e&&(e=Math.max(.9*b,300),c.style.height=e+"px");this.width=d;this.height=e;this.container=c};
-TemplatesDialog.prototype.init=function(a,c,b,d,e,g,k,l,n,f){function h(){null!=B&&(B.style.fontWeight="normal",B.style.textDecoration="none",B=null)}function m(a,b,c,f,d,h,m){if(-1<a.className.indexOf("geTempDlgRadioBtnActive"))return!1;a.className+=" geTempDlgRadioBtnActive";y.querySelector(".geTempDlgRadioBtn[data-id="+f+"]").className="geTempDlgRadioBtn "+(m?"geTempDlgRadioBtnLarge":"geTempDlgRadioBtnSmall");y.querySelector("."+b).src="/images/"+c+"-sel.svg";y.querySelector("."+d).src="/images/"+
-h+".svg";return!0}function p(a){function b(a){Z.removeChild(f);y.removeChild(c);Z.scrollTop=h}a=a.prevImgUrl||a.imgUrl||TEMPLATE_PATH+"/"+a.url.substring(0,a.url.length-4)+".png";var c=document.createElement("div");c.className="geTempDlgDialogMask";y.appendChild(c);var f=document.createElement("div");f.className="geTempDlgDiagramPreviewBox";var d=document.createElement("img");d.src=a;f.appendChild(d);a=document.createElement("img");a.src="/images/close.png";a.className="geTempDlgPreviewCloseBtn";
-a.setAttribute("title",mxResources.get("close"));f.appendChild(a);var h=Z.scrollTop;mxEvent.addListener(a,"click",b);mxEvent.addListener(c,"click",b);Z.appendChild(f);Z.scrollTop=0;f.style.lineHeight=f.clientHeight+"px"}function q(a,b,c){if(null!=F){for(var f=F.className.split(" "),d=0;d<f.length;d++)if(-1<f[d].indexOf("Active")){f.splice(d,1);break}F.className=f.join(" ")}null!=a?(F=a,F.className+=" "+b,I=c,L.className="geTempDlgCreateBtn"):(I=F=null,L.className="geTempDlgCreateBtn geTempDlgCreateBtnDisabled")}
-function u(b){if(null!=I){var d=I;I=null;L.className="geTempDlgCreateBtn geTempDlgCreateBtnDisabled geTempDlgCreateBtnBusy";d.isExternal?(1==b?f(d.url,d,"nameInput.value"):n(d.url,d,"nameInput.value"),a.hideDialog(!0)):mxUtils.get(TEMPLATE_PATH+"/"+d.url,mxUtils.bind(this,function(b){200<=b.getStatus()&&299>=b.getStatus()&&(c(b.getText(),"nameInput.value"),a.hideDialog(!0))}))}}function v(a){a=a?"":"none";for(var b=y.querySelectorAll(".geTempDlgLinkToDiagram"),c=0;c<b.length;c++)b[c].style.display=
-a}function x(a,b,c){function f(){L.innerHTML=b?mxResources.get("create"):mxResources.get("copy");v(!b)}P.innerHTML="";q();M=a;var d=null;if(c){d=document.createElement("table");d.className="geTempDlgDiagramsListGrid";var h=document.createElement("tr"),m=document.createElement("th");m.style.width="50%";m.innerHTML=mxResources.get("diagram",null,"Diagram");h.appendChild(m);m=document.createElement("th");m.style.width="25%";m.innerHTML=mxResources.get("changedBy",null,"Changed By");h.appendChild(m);
-m=document.createElement("th");m.style.width="25%";m.innerHTML=mxResources.get("lastModifiedOn",null,"Last modified on");h.appendChild(m);d.appendChild(h);P.appendChild(d)}for(h=0;h<a.length;h++){a[h].isExternal=!b;var e=a[h].url,m=mxUtils.htmlEntities(a[h].title),t=a[h].tooltip||a[h].title,g=a[h].imgUrl,k=mxUtils.htmlEntities(a[h].changedBy||""),D=mxUtils.htmlEntities(a[h].lastModifiedOn||"");g||(g=TEMPLATE_PATH+"/"+e.substring(0,e.length-4)+".png");e=c?50:15;null!=m&&m.length>e&&(m=m.substring(0,
-e)+"&hellip;");if(c){var l=document.createElement("tr"),g=document.createElement("td"),w=document.createElement("img");w.src="/images/icon-search.svg";w.className="geTempDlgDiagramListPreviewBtn";w.setAttribute("title",mxResources.get("preview"));g.appendChild(w);t=document.createElement("span");t.className="geTempDlgDiagramTitle";t.innerHTML=m;g.appendChild(t);l.appendChild(g);g=document.createElement("td");g.innerHTML=k;l.appendChild(g);g=document.createElement("td");g.innerHTML=D;l.appendChild(g);
-d.appendChild(l);null==F&&(f(),q(l,"geTempDlgDiagramsListGridActive",a[h]));(function(a,b){mxEvent.addListener(l,"click",function(){F!=b&&(f(),q(b,"geTempDlgDiagramsListGridActive",a))});mxEvent.addListener(l,"dblclick",u);mxEvent.addListener(w,"click",function(){p(a)})})(a[h],l)}else{var n=document.createElement("div");n.className="geTempDlgDiagramTile";n.setAttribute("title",t);null==F&&(f(),q(n,"geTempDlgDiagramTileActive",a[h]));k=document.createElement("div");k.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgLoading";
-var C=document.createElement("img");C.style.display="none";(function(a,b){C.onload=function(){b.className="geTempDlgDiagramTileImg";a.style.display=""};C.onerror=function(){b.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgError"}})(C,k);C.src=g;k.appendChild(C);n.appendChild(k);k=document.createElement("div");k.className="geTempDlgDiagramTileLbl";k.innerHTML=null!=m?m:"";n.appendChild(k);w=document.createElement("img");w.src="/images/icon-search.svg";w.className="geTempDlgDiagramPreviewBtn";
-w.setAttribute("title",mxResources.get("preview"));n.appendChild(w);(function(a,b){mxEvent.addListener(n,"click",function(){F!=b&&(f(),q(b,"geTempDlgDiagramTileActive",a))});mxEvent.addListener(n,"dblclick",u);mxEvent.addListener(w,"click",function(){p(a)})})(a[h],n);P.appendChild(n)}}}function t(a,b){Q.innerHTML="";q();for(var c=!b&&5<a.length?5:a.length,f=0;f<c;f++){var d=a[f];d.isCategory=!0;var h=document.createElement("div"),m=mxResources.get(d.title);null==m&&(m=d.title.substring(0,1).toUpperCase()+
-d.title.substring(1));h.className="geTempDlgNewDiagramCatItem";h.setAttribute("title",m);m=mxUtils.htmlEntities(m);15<m.length&&(m=m.substring(0,15)+"&hellip;");null==F&&(L.innerHTML=mxResources.get("create"),v(),q(h,"geTempDlgNewDiagramCatItemActive",d));var e=document.createElement("div");e.className="geTempDlgNewDiagramCatItemImg";var t=document.createElement("img");t.src=NEW_DIAGRAM_CATS_PATH+"/"+d.img;e.appendChild(t);h.appendChild(e);e=document.createElement("div");e.className="geTempDlgNewDiagramCatItemLbl";
-e.innerHTML=m;h.appendChild(e);Q.appendChild(h);(function(a,b){mxEvent.addListener(h,"click",function(){F!=b&&(L.innerHTML=mxResources.get("create"),v(),q(b,"geTempDlgNewDiagramCatItemActive",a))});mxEvent.addListener(h,"dblclick",u)})(d,h)}T.style.display=5>a.length?"none":""}function w(a){var b=y.querySelector(".geTemplatesList"),c;for(c in a){var f=document.createElement("div"),d=mxResources.get(c),h=a[c];null==d&&(d=c.substring(0,1).toUpperCase()+c.substring(1));f.className="geTemplateCatLink";
-f.setAttribute("title",d+" ("+h.length+")");d=mxUtils.htmlEntities(d);15<d.length&&(d=d.substring(0,15)+"&hellip;");f.innerHTML=d+" ("+h.length+")";b.appendChild(f);(function(b,c,d){mxEvent.addListener(f,"click",function(){B!=d&&(null!=B?(B.style.fontWeight="normal",B.style.textDecoration="none"):(Y.style.display="none",N.style.minHeight="100%"),B=d,B.style.fontWeight="bold",B.style.textDecoration="underline",Z.scrollTop=0,z&&(G=!0),S.innerHTML=c,aa.style.display="none",x(a[b],!0))})})(c,d,f)}}function D(a){k&&
-(Z.scrollTop=0,P.innerHTML="",U.spin(P),G=!1,z=!0,S.innerHTML=mxResources.get("recentDiag",null,"Recent Diagrams"),K=null,k(W,a?null:g))}function C(a){h();Z.scrollTop=0;P.innerHTML="";U.spin(P);G=!1;z=!0;da=null;S.innerHTML=mxResources.get("searchResults",null,"Search Results")+' "'+mxUtils.htmlEntities(a)+'"';l(a,W,E?null:g);K=a}d=null!=d?d:TEMPLATE_PATH+"/index.xml";e=null!=e?e:NEW_DIAGRAM_CATS_PATH+"/index.xml";var y=this.container,z=!1,G=!1,B=null,F=null,I=null,A=!1,E=!0,H=!1,M=[],K,T=y.querySelector(".geTempDlgShowAllBtn"),
-P=y.querySelector(".geTempDlgDiagramsTiles"),S=y.querySelector(".geTempDlgDiagramsListTitle"),aa=y.querySelector(".geTempDlgDiagramsListBtns"),Z=y.querySelector(".geTempDlgContent"),N=y.querySelector(".geTempDlgDiagramsList"),Y=y.querySelector(".geTempDlgNewDiagramCat"),Q=y.querySelector(".geTempDlgNewDiagramCatList"),L=y.querySelector(".geTempDlgCreateBtn"),U=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"50px",zIndex:2E9});mxEvent.addListener(y.querySelector(".geTempDlgNewDiagramlbl"),
-"click",function(){h();Y.style.display="";N.style.minHeight="calc(100% - 280px)";D(E)});mxEvent.addListener(y.querySelector(".geTempDlgRadioBtn[data-id=allDiagramsBtn]"),"click",function(){m(this,"geTempDlgAllDiagramsBtnImg","all-diagrams","myDiagramsBtn","geTempDlgMyDiagramsBtnImg","my-diagrams",!0)&&(E=!0,null==K?D(E):C(K))});mxEvent.addListener(y.querySelector(".geTempDlgRadioBtn[data-id=myDiagramsBtn]"),"click",function(){m(this,"geTempDlgMyDiagramsBtnImg","my-diagrams","allDiagramsBtn","geTempDlgAllDiagramsBtnImg",
-"all-diagrams",!0)&&(E=!1,null==K?D(E):C(K))});mxEvent.addListener(y.querySelector(".geTempDlgRadioBtn[data-id=listBtn]"),"click",function(){m(this,"geTempDlgListBtnImg","list","tilesBtn","geTempDlgTilesBtnImg","tiles",!1)&&(H=!0,x(M,!1,H))});mxEvent.addListener(y.querySelector(".geTempDlgRadioBtn[data-id=tilesBtn]"),"click",function(){m(this,"geTempDlgTilesBtnImg","tiles","listBtn","geTempDlgListBtnImg","list",!1)&&(H=!1,x(M,!1,H))});mxEvent.addListener(T,"click",function(){A?(Y.style.height="280px",
-Q.style.height="190px",T.innerHTML=mxResources.get("showAll",null,"+ Show all"),t(J)):(Y.style.height="440px",Q.style.height="355px",T.innerHTML=mxResources.get("showLess",null,"- Show less"),t(J,!0));A=!A});var R=!1,O=!1,V={},J=[],X=1;mxUtils.get(d,function(a){if(!R){R=!0;for(a=a.getXml().documentElement.firstChild;null!=a;){if("undefined"!==typeof a.getAttribute){var b=a.getAttribute("url");if(null!=b){var c=b.indexOf("/"),b=b.substring(0,c),c=V[b];null==c&&(X++,c=[],V[b]=c);c.push({url:a.getAttribute("url"),
-libs:a.getAttribute("libs"),title:a.getAttribute("title"),tooltip:a.getAttribute("url"),imgUrl:a.getAttribute("imgUrl")})}}a=a.nextSibling}w(V)}});mxUtils.get(e,function(a){if(!O){O=!0;for(a=a.getXml().documentElement.firstChild;null!=a;)"undefined"!==typeof a.getAttribute&&null!=a.getAttribute("title")&&J.push({img:a.getAttribute("img"),libs:a.getAttribute("libs"),title:a.getAttribute("title")}),a=a.nextSibling;t(J)}});var W=function(a,b){aa.style.display="";U.stop();z=!1;G?G=!1:b?P.innerHTML=b:
-0==a.length?P.innerHTML=mxResources.get("noDiagrams",null,"No Diagrams Found"):x(a,!1,H)};D(E);var da=null;l&&mxEvent.addListener(y.querySelector(".geTempDlgSearchBox"),"keyup",function(a){var b=this;null!=da&&clearTimeout(da);13==a.keyCode?C(b.value):da=setTimeout(function(){C(b.value)},500)});mxEvent.addListener(L,"click",u);mxEvent.addListener(y.querySelector(".geTempDlgLinkToDiagramBtn"),"click",function(a){u(!0)});mxEvent.addListener(y.querySelector(".geTempDlgCancelBtn"),"click",function(){null!=
+TemplatesDialog.prototype.init=function(a,c,b,d,e,g,h,l,m,f){function k(){null!=C&&(C.style.fontWeight="normal",C.style.textDecoration="none",C=null)}function n(a,b,c,f,d,k,e){if(-1<a.className.indexOf("geTempDlgRadioBtnActive"))return!1;a.className+=" geTempDlgRadioBtnActive";y.querySelector(".geTempDlgRadioBtn[data-id="+f+"]").className="geTempDlgRadioBtn "+(e?"geTempDlgRadioBtnLarge":"geTempDlgRadioBtnSmall");y.querySelector("."+b).src="/images/"+c+"-sel.svg";y.querySelector("."+d).src="/images/"+
+k+".svg";return!0}function p(a){function b(a){Y.removeChild(f);y.removeChild(c);Y.scrollTop=k}a=a.prevImgUrl||a.imgUrl||TEMPLATE_PATH+"/"+a.url.substring(0,a.url.length-4)+".png";var c=document.createElement("div");c.className="geTempDlgDialogMask";y.appendChild(c);var f=document.createElement("div");f.className="geTempDlgDiagramPreviewBox";var d=document.createElement("img");d.src=a;f.appendChild(d);a=document.createElement("img");a.src="/images/close.png";a.className="geTempDlgPreviewCloseBtn";
+a.setAttribute("title",mxResources.get("close"));f.appendChild(a);var k=Y.scrollTop;mxEvent.addListener(a,"click",b);mxEvent.addListener(c,"click",b);Y.appendChild(f);Y.scrollTop=0;f.style.lineHeight=f.clientHeight+"px"}function q(a,b,c){if(null!=F){for(var f=F.className.split(" "),d=0;d<f.length;d++)if(-1<f[d].indexOf("Active")){f.splice(d,1);break}F.className=f.join(" ")}null!=a?(F=a,F.className+=" "+b,I=c,L.className="geTempDlgCreateBtn"):(I=F=null,L.className="geTempDlgCreateBtn geTempDlgCreateBtnDisabled")}
+function u(b){if(null!=I){var d=I;I=null;L.className="geTempDlgCreateBtn geTempDlgCreateBtnDisabled geTempDlgCreateBtnBusy";d.isExternal?(1==b?f(d.url,d,"nameInput.value"):m(d.url,d,"nameInput.value"),a.hideDialog(!0)):mxUtils.get(TEMPLATE_PATH+"/"+d.url,mxUtils.bind(this,function(b){200<=b.getStatus()&&299>=b.getStatus()&&(c(b.getText(),"nameInput.value"),a.hideDialog(!0))}))}}function v(a){a=a?"":"none";for(var b=y.querySelectorAll(".geTempDlgLinkToDiagram"),c=0;c<b.length;c++)b[c].style.display=
+a}function x(a,b,c){function f(){L.innerHTML=b?mxResources.get("create"):mxResources.get("copy");v(!b)}Q.innerHTML="";q();M=a;var d=null;if(c){d=document.createElement("table");d.className="geTempDlgDiagramsListGrid";var k=document.createElement("tr"),e=document.createElement("th");e.style.width="50%";e.innerHTML=mxResources.get("diagram",null,"Diagram");k.appendChild(e);e=document.createElement("th");e.style.width="25%";e.innerHTML=mxResources.get("changedBy",null,"Changed By");k.appendChild(e);
+e=document.createElement("th");e.style.width="25%";e.innerHTML=mxResources.get("lastModifiedOn",null,"Last modified on");k.appendChild(e);d.appendChild(k);Q.appendChild(d)}for(k=0;k<a.length;k++){a[k].isExternal=!b;var n=a[k].url,e=mxUtils.htmlEntities(a[k].title),t=a[k].tooltip||a[k].title,g=a[k].imgUrl,h=mxUtils.htmlEntities(a[k].changedBy||""),D=mxUtils.htmlEntities(a[k].lastModifiedOn||"");g||(g=TEMPLATE_PATH+"/"+n.substring(0,n.length-4)+".png");n=c?50:15;null!=e&&e.length>n&&(e=e.substring(0,
+n)+"&hellip;");if(c){var l=document.createElement("tr"),g=document.createElement("td"),w=document.createElement("img");w.src="/images/icon-search.svg";w.className="geTempDlgDiagramListPreviewBtn";w.setAttribute("title",mxResources.get("preview"));g.appendChild(w);t=document.createElement("span");t.className="geTempDlgDiagramTitle";t.innerHTML=e;g.appendChild(t);l.appendChild(g);g=document.createElement("td");g.innerHTML=h;l.appendChild(g);g=document.createElement("td");g.innerHTML=D;l.appendChild(g);
+d.appendChild(l);null==F&&(f(),q(l,"geTempDlgDiagramsListGridActive",a[k]));(function(a,b){mxEvent.addListener(l,"click",function(){F!=b&&(f(),q(b,"geTempDlgDiagramsListGridActive",a))});mxEvent.addListener(l,"dblclick",u);mxEvent.addListener(w,"click",function(){p(a)})})(a[k],l)}else{var m=document.createElement("div");m.className="geTempDlgDiagramTile";m.setAttribute("title",t);null==F&&(f(),q(m,"geTempDlgDiagramTileActive",a[k]));h=document.createElement("div");h.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgLoading";
+var B=document.createElement("img");B.style.display="none";(function(a,b){B.onload=function(){b.className="geTempDlgDiagramTileImg";a.style.display=""};B.onerror=function(){b.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgError"}})(B,h);B.src=g;h.appendChild(B);m.appendChild(h);h=document.createElement("div");h.className="geTempDlgDiagramTileLbl";h.innerHTML=null!=e?e:"";m.appendChild(h);w=document.createElement("img");w.src="/images/icon-search.svg";w.className="geTempDlgDiagramPreviewBtn";
+w.setAttribute("title",mxResources.get("preview"));m.appendChild(w);(function(a,b){mxEvent.addListener(m,"click",function(){F!=b&&(f(),q(b,"geTempDlgDiagramTileActive",a))});mxEvent.addListener(m,"dblclick",u);mxEvent.addListener(w,"click",function(){p(a)})})(a[k],m);Q.appendChild(m)}}}function t(a,b){R.innerHTML="";q();for(var c=!b&&5<a.length?5:a.length,f=0;f<c;f++){var d=a[f];d.isCategory=!0;var k=document.createElement("div"),e=mxResources.get(d.title);null==e&&(e=d.title.substring(0,1).toUpperCase()+
+d.title.substring(1));k.className="geTempDlgNewDiagramCatItem";k.setAttribute("title",e);e=mxUtils.htmlEntities(e);15<e.length&&(e=e.substring(0,15)+"&hellip;");null==F&&(L.innerHTML=mxResources.get("create"),v(),q(k,"geTempDlgNewDiagramCatItemActive",d));var n=document.createElement("div");n.className="geTempDlgNewDiagramCatItemImg";var t=document.createElement("img");t.src=NEW_DIAGRAM_CATS_PATH+"/"+d.img;n.appendChild(t);k.appendChild(n);n=document.createElement("div");n.className="geTempDlgNewDiagramCatItemLbl";
+n.innerHTML=e;k.appendChild(n);R.appendChild(k);(function(a,b){mxEvent.addListener(k,"click",function(){F!=b&&(L.innerHTML=mxResources.get("create"),v(),q(b,"geTempDlgNewDiagramCatItemActive",a))});mxEvent.addListener(k,"dblclick",u)})(d,k)}T.style.display=5>a.length?"none":""}function w(a){var b=y.querySelector(".geTemplatesList"),c;for(c in a){var f=document.createElement("div"),d=mxResources.get(c),k=a[c];null==d&&(d=c.substring(0,1).toUpperCase()+c.substring(1));f.className="geTemplateCatLink";
+f.setAttribute("title",d+" ("+k.length+")");d=mxUtils.htmlEntities(d);15<d.length&&(d=d.substring(0,15)+"&hellip;");f.innerHTML=d+" ("+k.length+")";b.appendChild(f);(function(b,c,d){mxEvent.addListener(f,"click",function(){C!=d&&(null!=C?(C.style.fontWeight="normal",C.style.textDecoration="none"):(X.style.display="none",N.style.minHeight="100%"),C=d,C.style.fontWeight="bold",C.style.textDecoration="underline",Y.scrollTop=0,z&&(G=!0),S.innerHTML=c,Z.style.display="none",x(a[b],!0))})})(c,d,f)}}function D(a){h&&
+(Y.scrollTop=0,Q.innerHTML="",U.spin(Q),G=!1,z=!0,S.innerHTML=mxResources.get("recentDiag",null,"Recent Diagrams"),K=null,h(ca,a?null:g))}function B(a){k();Y.scrollTop=0;Q.innerHTML="";U.spin(Q);G=!1;z=!0;W=null;S.innerHTML=mxResources.get("searchResults",null,"Search Results")+' "'+mxUtils.htmlEntities(a)+'"';l(a,ca,E?null:g);K=a}d=null!=d?d:TEMPLATE_PATH+"/index.xml";e=null!=e?e:NEW_DIAGRAM_CATS_PATH+"/index.xml";var y=this.container,z=!1,G=!1,C=null,F=null,I=null,A=!1,E=!0,H=!1,M=[],K,T=y.querySelector(".geTempDlgShowAllBtn"),
+Q=y.querySelector(".geTempDlgDiagramsTiles"),S=y.querySelector(".geTempDlgDiagramsListTitle"),Z=y.querySelector(".geTempDlgDiagramsListBtns"),Y=y.querySelector(".geTempDlgContent"),N=y.querySelector(".geTempDlgDiagramsList"),X=y.querySelector(".geTempDlgNewDiagramCat"),R=y.querySelector(".geTempDlgNewDiagramCatList"),L=y.querySelector(".geTempDlgCreateBtn"),U=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"50px",zIndex:2E9});mxEvent.addListener(y.querySelector(".geTempDlgNewDiagramlbl"),
+"click",function(){k();X.style.display="";N.style.minHeight="calc(100% - 280px)";D(E)});mxEvent.addListener(y.querySelector(".geTempDlgRadioBtn[data-id=allDiagramsBtn]"),"click",function(){n(this,"geTempDlgAllDiagramsBtnImg","all-diagrams","myDiagramsBtn","geTempDlgMyDiagramsBtnImg","my-diagrams",!0)&&(E=!0,null==K?D(E):B(K))});mxEvent.addListener(y.querySelector(".geTempDlgRadioBtn[data-id=myDiagramsBtn]"),"click",function(){n(this,"geTempDlgMyDiagramsBtnImg","my-diagrams","allDiagramsBtn","geTempDlgAllDiagramsBtnImg",
+"all-diagrams",!0)&&(E=!1,null==K?D(E):B(K))});mxEvent.addListener(y.querySelector(".geTempDlgRadioBtn[data-id=listBtn]"),"click",function(){n(this,"geTempDlgListBtnImg","list","tilesBtn","geTempDlgTilesBtnImg","tiles",!1)&&(H=!0,x(M,!1,H))});mxEvent.addListener(y.querySelector(".geTempDlgRadioBtn[data-id=tilesBtn]"),"click",function(){n(this,"geTempDlgTilesBtnImg","tiles","listBtn","geTempDlgListBtnImg","list",!1)&&(H=!1,x(M,!1,H))});mxEvent.addListener(T,"click",function(){A?(X.style.height="280px",
+R.style.height="190px",T.innerHTML=mxResources.get("showAll",null,"+ Show all"),t(ba)):(X.style.height="440px",R.style.height="355px",T.innerHTML=mxResources.get("showLess",null,"- Show less"),t(ba,!0));A=!A});var O=!1,P=!1,V={},ba=[],J=1;mxUtils.get(d,function(a){if(!O){O=!0;for(a=a.getXml().documentElement.firstChild;null!=a;){if("undefined"!==typeof a.getAttribute){var b=a.getAttribute("url");if(null!=b){var c=b.indexOf("/"),b=b.substring(0,c),c=V[b];null==c&&(J++,c=[],V[b]=c);c.push({url:a.getAttribute("url"),
+libs:a.getAttribute("libs"),title:a.getAttribute("title"),tooltip:a.getAttribute("url"),imgUrl:a.getAttribute("imgUrl")})}}a=a.nextSibling}w(V)}});mxUtils.get(e,function(a){if(!P){P=!0;for(a=a.getXml().documentElement.firstChild;null!=a;)"undefined"!==typeof a.getAttribute&&null!=a.getAttribute("title")&&ba.push({img:a.getAttribute("img"),libs:a.getAttribute("libs"),title:a.getAttribute("title")}),a=a.nextSibling;t(ba)}});var ca=function(a,b){Z.style.display="";U.stop();z=!1;G?G=!1:b?Q.innerHTML=
+b:0==a.length?Q.innerHTML=mxResources.get("noDiagrams",null,"No Diagrams Found"):x(a,!1,H)};D(E);var W=null;l&&mxEvent.addListener(y.querySelector(".geTempDlgSearchBox"),"keyup",function(a){var b=this;null!=W&&clearTimeout(W);13==a.keyCode?B(b.value):W=setTimeout(function(){B(b.value)},500)});mxEvent.addListener(L,"click",u);mxEvent.addListener(y.querySelector(".geTempDlgLinkToDiagramBtn"),"click",function(a){u(!0)});mxEvent.addListener(y.querySelector(".geTempDlgCancelBtn"),"click",function(){null!=
b&&b();a.hideDialog(!0)})};(function(){Editor.prototype.appName="draw.io";Editor.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAMAAADzN3VRAAAApVBMVEUAAAD////k5OT///8AAAB1dXXMzMz9/f39/f37+/v5+fn+/v7///9iYmJaWlqFhYWnp6ejo6OHh4f////////////////7+/v5+fnx8fH///8AAAD///8bGxv7+/v5+fkoKCghISFDQ0MYGBjh4eHY2Njb29tQUFBvb29HR0c/Pz82NjYrKyu/v78SEhLu7u7s7OzV1dVVVVU7OzsVFRXAv78QEBBzqehMAAAAG3RSTlMAA/7p/vz5xZlrTiPL/v78+/v7+OXd2TYQDs8L70ZbAAABKUlEQVQoz3VS13LCMBBUXHChd8iukDslQChJ/v/TchaG4cXS+OSb1c7trU7V60OpdRz2ZtNZL4zXNlcN8BEtSG6+NxIXkeRPoBuQ1cjvZ31/VJFB10ISli6diYfH8iYO3WUNCcNlB0gTrXOtkxTo0O1aKKiBBMhhv2MNBQKoiA5wxlZo0JDzD3AYKbWacyj3fs01wxey0pyEP+R8pWKWXoqtIZ0DDg5pbki9krEKOa6LVDQsdoXEsi46Zqh69KFz7B1u7Hb2yDV8firXDKBlZ4UFiswKGRhXTS93/ECK7yxnJ3+S3y/ThpO+cfSD017nqa18aasabU0/t7d+tk0/1oMEJ1NaD67iwdF68OabFSLn+eHb0+vjy+uk8br9fdrftH0O2menfd7+AQfYM/lNjoDHAAAAAElFTkSuQmCC":
IMAGE_PATH+"/delete.png";Editor.plusImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MDdCMTdENjVCOEM4MTFFNDlCRjVBNDdCODU5NjNBNUMiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MDdCMTdENjZCOEM4MTFFNDlCRjVBNDdCODU5NjNBNUMiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowN0IxN0Q2M0I4QzgxMUU0OUJGNUE0N0I4NTk2M0E1QyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowN0IxN0Q2NEI4QzgxMUU0OUJGNUE0N0I4NTk2M0E1QyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PtjrjmgAAAAtSURBVHjaYvz//z8DMigvLwcLdHZ2MiKLMzEQCaivkLGsrOw/dU0cAr4GCDAARQsQbTFrv10AAAAASUVORK5CYII=":
IMAGE_PATH+"/plus.png";Editor.spinImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDAAMAPUxAEVriVp7lmCAmmGBm2OCnGmHn3OPpneSqYKbr4OcsIScsI2kto6kt46lt5KnuZmtvpquvpuvv56ywaCzwqK1xKu7yay9yq+/zLHAzbfF0bjG0bzJ1LzK1MDN18jT28nT3M3X3tHa4dTc49Xd5Njf5dng5t3k6d/l6uDm6uru8e7x8/Dz9fT29/b4+Pj5+fj5+vr6+v///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAkKADEAIf8LTkVUU0NBUEUyLjADAQAAACwAAAAADAAMAAAGR8CYcEgsOgYAIax4CCQuQldrCBEsiK8VS2hoFGOrlJDA+cZQwkLnqyoJFZKviSS0ICrE0ec0jDAwIiUeGyBFGhMPFBkhZo1BACH5BAkKAC4ALAAAAAAMAAwAhVB0kFR3k1V4k2CAmmWEnW6Lo3KOpXeSqH2XrIOcsISdsImhtIqhtJCmuJGnuZuwv52wwJ+ywZ+ywqm6yLHBzbLCzrXEz7fF0LnH0rrI0r7L1b/M1sXR2cfT28rV3czW3s/Z4Nfe5Nvi6ODm6uLn6+Ln7OLo7OXq7efs7+zw8u/y9PDy9PX3+Pr7+////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAZDQJdwSCxGDAIAoVFkFBwYSyIwGE4OkCJxIdG6WkJEx8sSKj7elfBB0a5SQg1EQ0SVVMPKhDM6iUIkRR4ZFxsgJl6JQQAh+QQJCgAxACwAAAAADAAMAIVGa4lcfZdjgpxkg51nhp5ui6N3kqh5lKqFnbGHn7KIoLOQp7iRp7mSqLmTqbqarr6br7+fssGitcOitcSuvsuuv8uwwMyzw861xNC5x9K6x9K/zNbDztjE0NnG0drJ1NzQ2eDS2+LT2+LV3ePZ4Oba4ebb4ufc4+jm6+7t8PLt8PPt8fPx8/Xx9PX09vf19/j3+Pn///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGQ8CYcEgsUhQFggFSjCQmnE1jcBhqGBXiIuAQSi7FGEIgfIzCFoCXFCZiPO0hKBMiwl7ET6eUYqlWLkUnISImKC1xbUEAIfkECQoAMgAsAAAAAAwADACFTnKPT3KPVHaTYoKcb4yjcY6leZSpf5mtgZuvh5+yiqG0i6K1jqW3kae5nrHBnrLBn7LCoLPCobTDqbrIqrvIs8LOtMPPtcPPtcTPuMbRucfSvcrUvsvVwMzWxdHaydTcytXdzNbezdff0drh2ODl2+Ln3eTp4Obq4ujs5Ont5uvu6O3w6u7w6u7x7/L09vj5+vr7+vv7////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABkdAmXBILHIcicOCUqxELKKPxKAYgiYd4oMAEWo8RVmjIMScwhmBcJMKXwLCECmMGAhPI1QRwBiaSixCMDFhLSorLi8wYYxCQQAh+QQJCgAxACwAAAAADAAMAIVZepVggJphgZtnhp5vjKN2kah3kqmBmq+KobSLorWNpLaRp7mWq7ybr7+gs8KitcSktsWnuManucexwM2ywc63xtG6yNO9ytS+ytW/zNbDz9jH0tvL1d3N197S2+LU3OPU3ePV3eTX3+Xa4efb4ufd5Onl6u7r7vHs7/Lt8PLw8/Xy9Pby9fb09ff2+Pn3+Pn6+vr///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGSMCYcEgseiwSR+RS7GA4JFGF8RiWNiEiJTERgkjFGAQh/KTCGoJwpApnBkITKrwoCFWnFlEhaAxXLC9CBwAGRS4wQgELYY1CQQAh+QQJCgAzACwAAAAADAAMAIVMcI5SdZFhgZtti6JwjaR4k6mAma6Cm6+KobSLorWLo7WNo7aPpredsMCescGitMOitcSmuMaqu8ixwc2zws63xdC4xtG5x9K9ytXAzdfCztjF0NnF0drK1d3M1t7P2N/P2eDT2+LX3+Xe5Onh5+vi5+vj6Ozk6e3n7O/o7O/q7vHs7/Lt8PPu8fPx8/X3+Pn6+vv7+/v8/Pz///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGRcCZcEgsmkIbTOZTLIlGqZNnchm2SCgiJ6IRqljFmQUiXIVnoITQde4chC9Y+LEQxmTFRkFSNFAqDAMIRQoCAAEEDmeLQQAh+QQJCgAwACwAAAAADAAMAIVXeZRefplff5lhgZtph59yjqV2kaeAmq6FnbGFnrGLorWNpLaQp7mRqLmYrb2essGgs8Klt8apusitvcquv8u2xNC7yNO8ydS8ytTAzdfBzdfM1t7N197Q2eDU3OPX3+XZ4ObZ4ebc4+jf5erg5erg5uvp7fDu8fPv8vTz9fb09vf19/j3+Pn4+fn5+vr6+/v///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGRUCYcEgspkwjEKhUVJ1QsBNp0xm2VixiSOMRvlxFGAcTJook5eEHIhQcwpWIkAFQECkNy9AQWFwyEAkPRQ4FAwQIE2llQQAh+QQJCgAvACwAAAAADAAMAIVNcY5SdZFigptph6BvjKN0kKd8lquAmq+EnbGGn7KHn7ONpLaOpbearr+csMCdscCescGhtMOnuMauvsuzws60w862xdC9ytW/y9a/zNbCztjG0drH0tvK1N3M1t7N19/U3ePb4uff5urj6Ozk6e3l6u7m6u7o7PDq7vDt8PPv8vTw8vTw8/X19vf6+vv///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGQ8CXcEgsvlytVUplJLJIpSEDUESFTELBwSgCCQEV42kjDFiMo4uQsDB2MkLHoEHUTD7DRAHC8VAiZ0QSCgYIDxhNiUEAOw==":
@@ -7771,12 +7772,12 @@ a.style.visibility&&MathJax.Hub.Queue(["Typeset",MathJax.Hub,a])},0)};window.Mat
MathJax.Hub.Register.StartupHook("Begin",function(){for(var a=0;a<Editor.mathJaxQueue.length;a++)Editor.doMathJaxRender(Editor.mathJaxQueue[a])})}};Editor.MathJaxRender=function(a){"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?Editor.doMathJaxRender(a):Editor.mathJaxQueue.push(a)};Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};var c=Editor.prototype.init;Editor.prototype.init=function(){c.apply(this,arguments);this.graph.addListener(mxEvent.SIZE,mxUtils.bind(this,function(a,
b){null!=this.graph.container&&this.graph.mathEnabled&&Editor.MathJaxRender(this.graph.container)}))};var f=document.getElementsByTagName("script");if(null!=f&&0<f.length){var d=document.createElement("script");d.type="text/javascript";d.src=a;f[0].parentNode.appendChild(d)}};Editor.prototype.csvToArray=function(a){if(!/^\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*(?:,\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*)*$/.test(a))return null;
var b=[];a.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\[\S\s][^"\\]*)*)"|([^,'"\s\\]*(?:\s+[^,'"\s\\]+)*))\s*(?:,|$)/g,function(a,c,f,d){void 0!==c?b.push(c.replace(/\\'/g,"'")):void 0!==f?b.push(f.replace(/\\"/g,'"')):void 0!==d&&b.push(d);return""});/,\s*$/.test(a)&&b.push("");return b};if(window.ColorDialog){var e=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(a,b){e.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};
-var g=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){g.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(a,b){var c=null;null!=a.editor.graph.getModel().getParent(b)?c=b.getId():null!=a.currentPage&&(c=a.currentPage.getId());return c});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.isShadowOptionVisible=function(){var a=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=a&&a.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(a){return!1};var n=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=
-function(a){a=n.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var b=this.editorUi,c=b.editor.graph,f=this.createOption(mxResources.get("shadow"),function(){return c.shadowVisible},function(a){var f=new ChangePageSetup(b);f.ignoreColor=!0;f.ignoreImage=!0;f.shadowVisible=a;c.model.execute(f)},{install:function(a){this.listener=function(){a(c.shadowVisible)};b.addListener("shadowVisibleChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}});
+var g=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){g.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(a,b){var c=null;null!=a.editor.graph.getModel().getParent(b)?c=b.getId():null!=a.currentPage&&(c=a.currentPage.getId());return c});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 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.isShadowOptionVisible=function(){var a=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=a&&a.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(a){return!1};var m=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=
+function(a){a=m.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var b=this.editorUi,c=b.editor.graph,f=this.createOption(mxResources.get("shadow"),function(){return c.shadowVisible},function(a){var f=new ChangePageSetup(b);f.ignoreColor=!0;f.ignoreImage=!0;f.shadowVisible=a;c.model.execute(f)},{install:function(a){this.listener=function(){a(c.shadowVisible)};b.addListener("shadowVisibleChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}});
Editor.shadowOptionEnabled||(f.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(f,60));a.appendChild(f)}return a};var f=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(a){a=f.apply(this,arguments);var b=this.editorUi,c=b.editor.graph;if(c.isEnabled()){var d=b.getCurrentFile();null!=d&&d.isAutosaveOptional()&&(d=this.createOption(mxResources.get("autosave"),function(){return b.editor.autosave},function(a){b.editor.setAutosave(a)},
{install:function(a){this.listener=function(){a(b.editor.autosave)};b.editor.addListener("autosaveChanged",this.listener)},destroy:function(){b.editor.removeListener(this.listener)}}),a.appendChild(d))}if(this.isMathOptionVisible()&&c.isEnabled()&&"undefined"!==typeof MathJax){d=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return c.mathEnabled},function(a){b.actions.get("mathematicalTypesetting").funct()},{install:function(a){this.listener=function(){a(c.mathEnabled)};b.addListener("mathEnabledChanged",
-this.listener)},destroy:function(){b.removeListener(this.listener)}});d.style.paddingTop="5px";a.appendChild(d);var h=b.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000032875");h.style.position="relative";h.style.marginLeft="6px";h.style.top="2px";d.appendChild(h)}return a};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(){b.removeListener(this.listener)}});d.style.paddingTop="5px";a.appendChild(d);var k=b.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000032875");k.style.position="relative";k.style.marginLeft="6px";k.style.top="2px";d.appendChild(k)}return a};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"absoluteArcSize",dispName:"Abs. Arc Size",
type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.link.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.flexArrow.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:10},{name:"startWidth",dispName:"Start Width",type:"float",min:0,defVal:20},{name:"endWidth",dispName:"End Width",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.process.prototype.customProperties=[{name:"size",dispName:"Indent",
type:"float",min:0,max:.5,defVal:.1}];mxCellRenderer.defaultShapes.rhombus.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,max:50,defVal:mxConstants.LINE_ARCSIZE},{name:"double",dispName:"Double",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties=[{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left Line",type:"bool",defVal:!0},
{name:"right",dispName:"Right Line",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.parallelogram.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.hexagon.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,
@@ -7797,33 +7798,33 @@ type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.offPageConnector.pro
{fill:"#a20025",stroke:"#6F0000",font:"#ffffff"}],[{fill:"#e51400",stroke:"#B20000",font:"#ffffff"},{fill:"#fa6800",stroke:"#C73500",font:"#ffffff"},{fill:"#f0a30a",stroke:"#BD7000",font:"#ffffff"},{fill:"#e3c800",stroke:"#B09500",font:"#ffffff"},{fill:"#6d8764",stroke:"#3A5431",font:"#ffffff"},{fill:"#647687",stroke:"#314354",font:"#ffffff"},{fill:"#76608a",stroke:"#432D57",font:"#ffffff"},{fill:"#a0522d",stroke:"#6D1F00",font:"#ffffff"}],[null,{fill:mxConstants.NONE,stroke:"#36393d"},{fill:"#fad7ac",
stroke:"#b46504"},{fill:"#fad9d5",stroke:"#ae4132"},{fill:"#b0e3e6",stroke:"#0e8088"},{fill:"#b1ddf0",stroke:"#10739e"},{fill:"#d0cee2",stroke:"#56517e"},{fill:"#bac8d3",stroke:"#23445d"}],[null,{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"}],[null,{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(a,b,c){if(null!=b){var f=function(a){if(null!=a)if(c)for(var f=0;f<a.length;f++)b[a[f].name]=
-a[f];else for(var d in b){for(var h=!1,f=0;f<a.length;f++)if(a[f].name==d&&a[f].type==b[d].type){h=!0;break}h||delete b[d]}},d=this.editorUi.editor.graph.view.getState(a);null!=d&&null!=d.shape&&(d.shape.commonCustomPropAdded||(d.shape.commonCustomPropAdded=!0,d.shape.customProperties=d.shape.customProperties||[],d.cell.vertex?Array.prototype.push.apply(d.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(d.shape.customProperties,Editor.commonEdgeProperties)),f(d.shape.customProperties));
-a=a.getAttribute("customProperties");if(null!=a)try{f(JSON.parse(a))}catch(B){}}};var h=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var a=this.format.createSelectionState();"image"!=a.style.shape&&this.container.appendChild(this.addStyles(this.createPanel()));h.apply(this,arguments);if(Editor.enableCustomProperties){for(var b={},c=a.vertices,f=a.edges,d=0;d<c.length;d++)this.findCommonProperties(c[d],b,0==d);for(d=0;d<f.length;d++)this.findCommonProperties(f[d],b,0==
-c.length&&0==d);0<Object.getOwnPropertyNames(b).length&&this.container.appendChild(this.addProperties(this.createPanel(),b,a))}};var m=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(a){var b=mxUtils.button(mxResources.get("copyStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("copyStyle").funct()}));b.setAttribute("title",mxResources.get("copyStyle")+" ("+this.editorUi.actions.get("copyStyle").shortcut+")");b.style.marginBottom="2px";b.style.width=
-"100px";b.style.marginRight="2px";a.appendChild(b);b=mxUtils.button(mxResources.get("pasteStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("pasteStyle").funct()}));b.setAttribute("title",mxResources.get("pasteStyle")+" ("+this.editorUi.actions.get("pasteStyle").shortcut+")");b.style.marginBottom="2px";b.style.width="100px";a.appendChild(b);mxUtils.br(a);return m.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=function(a,b,c){function f(a,
-b,c,f){q.getModel().beginUpdate();try{var d=[],h=[];if(null!=c.index){for(var m=[],e=c.parentRow.nextSibling;e&&e.getAttribute("data-pName")==a;)m.push(e.getAttribute("data-pValue")),e=e.nextSibling;c.index<m.length?null!=f?m.splice(f,1):m[c.index]=b:m.push(b);null!=c.size&&m.length>c.size&&(m=m.slice(0,c.size));b=m.join(",");null!=c.countProperty&&(q.setCellStyles(c.countProperty,m.length,q.getSelectionCells()),d.push(c.countProperty),h.push(m.length))}q.setCellStyles(a,b,q.getSelectionCells());
-d.push(a);h.push(b);if(null!=c.dependentProps)for(a=0;a<c.dependentProps.length;a++){var t=c.dependentPropsDefVal[a],g=c.dependentPropsVals[a];if(g.length>b)g=g.slice(0,b);else for(var k=g.length;k<b;k++)g.push(t);g=g.join(",");q.setCellStyles(c.dependentProps[a],g,q.getSelectionCells());d.push(c.dependentProps[a]);h.push(g)}p.editorUi.fireEvent(new mxEventObject("styleChanged","keys",d,"values",h,"cells",q.getSelectionCells()))}finally{q.getModel().endUpdate()}}function d(b,c,f){var d=mxUtils.getOffset(a,
-!0),h=mxUtils.getOffset(b,!0);c.style.position="absolute";c.style.left=h.x-d.x+"px";c.style.top=h.y-d.y+"px";c.style.width=b.offsetWidth+"px";c.style.height=b.offsetHeight-(f?4:0)+"px";c.style.zIndex=5}function h(a,b,c){var d=document.createElement("div");d.style.width="32px";d.style.height="4px";d.style.margin="2px";d.style.border="1px solid black";d.style.background=b&&"none"!=b?b:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(p,function(h){this.editorUi.pickColor(b,
-function(b){d.style.background="none"==b?"url('"+Dialog.prototype.noColorImage+"')":b;f(a,b,c)});mxEvent.consume(h)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(d);return btn}function m(a,b,c,d,h,m,e){null!=b&&(b=b.split(","),k.push({name:a,values:b,type:c,defVal:d,countProperty:h,parentRow:m,isDeletable:!0,flipBkg:e}));btn=mxUtils.button("+",mxUtils.bind(p,function(b){for(var t=m,p=0;null!=t.nextSibling;)if(t.nextSibling.getAttribute("data-pName")==
-a)t=t.nextSibling,p++;else break;var q={type:c,parentRow:m,index:p,isDeletable:!0,defVal:d,countProperty:h},p=g(a,"",q,0==p%2,e);f(a,d,q);t.parentNode.insertBefore(p,t.nextSibling);mxEvent.consume(b)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function e(a,b,c,f,d,h,m){if(0<d){var e=Array(d);b=null!=b?b.split(","):[];for(var t=0;t<d;t++)e[t]=null!=b[t]?b[t]:null!=f?f:"";k.push({name:a,values:e,type:c,defVal:f,parentRow:h,flipBkg:m,size:d})}return document.createElement("div")}
-function t(a,b,c){var d=document.createElement("input");d.type="checkbox";d.checked="1"==b;mxEvent.addListener(d,"change",function(){f(a,d.checked?"1":"0",c)});return d}function g(b,c,g,q,k){var v=g.dispName,u=g.type,l=document.createElement("tr");l.className="gePropRow"+(k?"Dark":"")+(q?"Alt":"")+" gePropNonHeaderRow";l.setAttribute("data-pName",b);l.setAttribute("data-pValue",c);q=!1;null!=g.index&&(l.setAttribute("data-index",g.index),v=(null!=v?v:"")+"["+g.index+"]",q=!0);var w=document.createElement("td");
-w.className="gePropRowCell";w.innerHTML=mxUtils.htmlEntities(mxResources.get(v,null,v));q&&(w.style.textAlign="right");l.appendChild(w);w=document.createElement("td");w.className="gePropRowCell";if("color"==u)w.appendChild(h(b,c,g));else if("bool"==u||"boolean"==u)w.appendChild(t(b,c,g));else if("enum"==u){var n=g.enumList;for(k=0;k<n.length;k++)if(v=n[k],v.val==c){w.innerHTML=mxUtils.htmlEntities(mxResources.get(v.dispName,null,v.dispName));break}mxEvent.addListener(w,"click",mxUtils.bind(p,function(){var h=
-document.createElement("select");d(w,h);for(var m=0;m<n.length;m++){var e=n[m],t=document.createElement("option");t.value=mxUtils.htmlEntities(e.val);t.innerHTML=mxUtils.htmlEntities(mxResources.get(e.dispName,null,e.dispName));h.appendChild(t)}h.value=c;a.appendChild(h);mxEvent.addListener(h,"change",function(){var a=mxUtils.htmlEntities(h.value);f(b,a,g)});h.focus();mxEvent.addListener(h,"blur",function(){a.removeChild(h)})}))}else"dynamicArr"==u?w.appendChild(m(b,c,g.subType,g.subDefVal,g.countProperty,
-l,k)):"staticArr"==u?w.appendChild(e(b,c,g.subType,g.subDefVal,g.size,l,k)):(w.innerHTML=c,mxEvent.addListener(w,"click",mxUtils.bind(p,function(){function h(){var a=m.value,a=0==a.length&&"string"!=u?0:a;g.allowAuto&&("auto"==a.trim().toLowerCase()?(a="auto",u="string"):(a=parseFloat(a),a=isNaN(a)?0:a));null!=g.min&&a<g.min?a=g.min:null!=g.max&&a>g.max&&(a=g.max);a=mxUtils.htmlEntities(("int"==u?parseInt(a):a)+"");f(b,a,g)}var m=document.createElement("input");d(w,m,!0);m.value=c;m.className="gePropEditor";
-"int"!=u&&"float"!=u||g.allowAuto||(m.type="number",m.step="int"==u?"1":"any",null!=g.min&&(m.min=parseFloat(g.min)),null!=g.max&&(m.max=parseFloat(g.max)));a.appendChild(m);mxEvent.addListener(m,"keypress",function(a){13==a.keyCode&&h()});m.focus();mxEvent.addListener(m,"blur",function(){h()})})));g.isDeletable&&(k=mxUtils.button("-",mxUtils.bind(p,function(a){f(b,"",g,g.index);mxEvent.consume(a)})),k.style.height="16px",k.style.width="25px",k.style["float"]="right",k.className="geColorBtn",w.appendChild(k));
-l.appendChild(w);return l}var p=this,q=this.editorUi.editor.graph,k=[];a.style.position="relative";a.style.padding="0";var u=document.createElement("table");u.style.whiteSpace="nowrap";u.style.width="100%";var v=document.createElement("tr");v.className="gePropHeader";var l=document.createElement("th");l.className="gePropHeaderCell";var w=document.createElement("img");w.src=Sidebar.prototype.expandedImage;l.appendChild(w);mxUtils.write(l,mxResources.get("property"));v.style.cursor="pointer";var n=
-function(){var b=u.querySelectorAll(".gePropNonHeaderRow"),c;if(p.editorUi.propertiesCollapsed){w.src=Sidebar.prototype.collapsedImage;c="none";for(var f=a.childNodes.length-1;0<=f;f--)try{var d=a.childNodes[f],h=d.nodeName.toUpperCase();"INPUT"!=h&&"SELECT"!=h||a.removeChild(d)}catch(ea){}}else w.src=Sidebar.prototype.expandedImage,c="";for(f=0;f<b.length;f++)b[f].style.display=c};mxEvent.addListener(v,"click",function(){p.editorUi.propertiesCollapsed=!p.editorUi.propertiesCollapsed;n()});v.appendChild(l);
-l=document.createElement("th");l.className="gePropHeaderCell";l.innerHTML=mxResources.get("value");v.appendChild(l);u.appendChild(v);var D=!1,x=!1,C;for(C in b)if(v=b[C],"function"!=typeof v.isVisible||v.isVisible(c)){var y=null!=c.style[C]?mxUtils.htmlEntities(c.style[C]+""):v.defVal;if("separator"==v.type)x=!x;else{if("staticArr"==v.type)v.size=parseInt(c.style[v.sizeProperty]||b[v.sizeProperty].defVal)||0;else if(null!=v.dependentProps){for(var U=v.dependentProps,R=[],O=[],l=0;l<U.length;l++){var V=
-c.style[U[l]];O.push(b[U[l]].subDefVal);R.push(null!=V?V.split(","):[])}v.dependentPropsDefVal=O;v.dependentPropsVals=R}u.appendChild(g(C,y,v,D,x));D=!D}}for(l=0;l<k.length;l++)for(v=k[l],b=v.parentRow,c=0;c<v.values.length;c++)C=g(v.name,v.values[c],{type:v.type,parentRow:v.parentRow,isDeletable:v.isDeletable,index:c,defVal:v.defVal,countProperty:v.countProperty,size:v.size},0==c%2,v.flipBkg),b.parentNode.insertBefore(C,b.nextSibling),b=C;a.appendChild(u);n();return a};StyleFormatPanel.prototype.addStyles=
-function(a){function b(a){function b(a){var b=mxUtils.button("",function(b){f.getModel().beginUpdate();try{var c=f.getSelectionCells();for(b=0;b<c.length;b++){for(var d=f.getModel().getStyle(c[b]),m=0;m<h.length;m++)d=mxUtils.removeStylename(d,h[m]);var e=f.getModel().isVertex(c[b])?f.defaultVertexStyle:f.defaultEdgeStyle;null!=a?(d=mxUtils.setStyle(d,mxConstants.STYLE_FILLCOLOR,a.fill||mxUtils.getValue(e,mxConstants.STYLE_FILLCOLOR,null)),d=mxUtils.setStyle(d,mxConstants.STYLE_STROKECOLOR,a.stroke||
-mxUtils.getValue(e,mxConstants.STYLE_STROKECOLOR,null)),d=mxUtils.setStyle(d,mxConstants.STYLE_GRADIENTCOLOR,a.gradient||mxUtils.getValue(e,mxConstants.STYLE_GRADIENTCOLOR,null)),f.getModel().isVertex(c[b])&&(d=mxUtils.setStyle(d,mxConstants.STYLE_FONTCOLOR,a.font||mxUtils.getValue(e,mxConstants.STYLE_FONTCOLOR,null)))):(d=mxUtils.setStyle(d,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(e,mxConstants.STYLE_FILLCOLOR,"#ffffff")),d=mxUtils.setStyle(d,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(e,
-mxConstants.STYLE_STROKECOLOR,"#000000")),d=mxUtils.setStyle(d,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(e,mxConstants.STYLE_GRADIENTCOLOR,null)),f.getModel().isVertex(c[b])&&(d=mxUtils.setStyle(d,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(e,mxConstants.STYLE_FONTCOLOR,null))));f.getModel().setStyle(c[b],d)}}finally{f.getModel().endUpdate()}});b.className="geStyleButton";b.style.width="36px";b.style.height="30px";b.style.margin="0px 6px 6px 0px";if(null!=a)null!=a.gradient?mxClient.IS_IE&&
+a[f];else for(var d in b){for(var k=!1,f=0;f<a.length;f++)if(a[f].name==d&&a[f].type==b[d].type){k=!0;break}k||delete b[d]}},d=this.editorUi.editor.graph.view.getState(a);null!=d&&null!=d.shape&&(d.shape.commonCustomPropAdded||(d.shape.commonCustomPropAdded=!0,d.shape.customProperties=d.shape.customProperties||[],d.cell.vertex?Array.prototype.push.apply(d.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(d.shape.customProperties,Editor.commonEdgeProperties)),f(d.shape.customProperties));
+a=a.getAttribute("customProperties");if(null!=a)try{f(JSON.parse(a))}catch(C){}}};var k=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var a=this.format.createSelectionState();"image"!=a.style.shape&&this.container.appendChild(this.addStyles(this.createPanel()));k.apply(this,arguments);if(Editor.enableCustomProperties){for(var b={},c=a.vertices,f=a.edges,d=0;d<c.length;d++)this.findCommonProperties(c[d],b,0==d);for(d=0;d<f.length;d++)this.findCommonProperties(f[d],b,0==
+c.length&&0==d);0<Object.getOwnPropertyNames(b).length&&this.container.appendChild(this.addProperties(this.createPanel(),b,a))}};var n=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(a){var b=mxUtils.button(mxResources.get("copyStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("copyStyle").funct()}));b.setAttribute("title",mxResources.get("copyStyle")+" ("+this.editorUi.actions.get("copyStyle").shortcut+")");b.style.marginBottom="2px";b.style.width=
+"100px";b.style.marginRight="2px";a.appendChild(b);b=mxUtils.button(mxResources.get("pasteStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("pasteStyle").funct()}));b.setAttribute("title",mxResources.get("pasteStyle")+" ("+this.editorUi.actions.get("pasteStyle").shortcut+")");b.style.marginBottom="2px";b.style.width="100px";a.appendChild(b);mxUtils.br(a);return n.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=function(a,b,c){function f(a,
+b,c,f){q.getModel().beginUpdate();try{var d=[],k=[];if(null!=c.index){for(var e=[],n=c.parentRow.nextSibling;n&&n.getAttribute("data-pName")==a;)e.push(n.getAttribute("data-pValue")),n=n.nextSibling;c.index<e.length?null!=f?e.splice(f,1):e[c.index]=b:e.push(b);null!=c.size&&e.length>c.size&&(e=e.slice(0,c.size));b=e.join(",");null!=c.countProperty&&(q.setCellStyles(c.countProperty,e.length,q.getSelectionCells()),d.push(c.countProperty),k.push(e.length))}q.setCellStyles(a,b,q.getSelectionCells());
+d.push(a);k.push(b);if(null!=c.dependentProps)for(a=0;a<c.dependentProps.length;a++){var t=c.dependentPropsDefVal[a],g=c.dependentPropsVals[a];if(g.length>b)g=g.slice(0,b);else for(var h=g.length;h<b;h++)g.push(t);g=g.join(",");q.setCellStyles(c.dependentProps[a],g,q.getSelectionCells());d.push(c.dependentProps[a]);k.push(g)}p.editorUi.fireEvent(new mxEventObject("styleChanged","keys",d,"values",k,"cells",q.getSelectionCells()))}finally{q.getModel().endUpdate()}}function d(b,c,f){var d=mxUtils.getOffset(a,
+!0),k=mxUtils.getOffset(b,!0);c.style.position="absolute";c.style.left=k.x-d.x+"px";c.style.top=k.y-d.y+"px";c.style.width=b.offsetWidth+"px";c.style.height=b.offsetHeight-(f?4:0)+"px";c.style.zIndex=5}function k(a,b,c){var d=document.createElement("div");d.style.width="32px";d.style.height="4px";d.style.margin="2px";d.style.border="1px solid black";d.style.background=b&&"none"!=b?b:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(p,function(k){this.editorUi.pickColor(b,
+function(b){d.style.background="none"==b?"url('"+Dialog.prototype.noColorImage+"')":b;f(a,b,c)});mxEvent.consume(k)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(d);return btn}function e(a,b,c,d,k,e,n){null!=b&&(b=b.split(","),h.push({name:a,values:b,type:c,defVal:d,countProperty:k,parentRow:e,isDeletable:!0,flipBkg:n}));btn=mxUtils.button("+",mxUtils.bind(p,function(b){for(var t=e,p=0;null!=t.nextSibling;)if(t.nextSibling.getAttribute("data-pName")==
+a)t=t.nextSibling,p++;else break;var q={type:c,parentRow:e,index:p,isDeletable:!0,defVal:d,countProperty:k},p=g(a,"",q,0==p%2,n);f(a,d,q);t.parentNode.insertBefore(p,t.nextSibling);mxEvent.consume(b)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function n(a,b,c,f,d,k,e){if(0<d){var n=Array(d);b=null!=b?b.split(","):[];for(var t=0;t<d;t++)n[t]=null!=b[t]?b[t]:null!=f?f:"";h.push({name:a,values:n,type:c,defVal:f,parentRow:k,flipBkg:e,size:d})}return document.createElement("div")}
+function t(a,b,c){var d=document.createElement("input");d.type="checkbox";d.checked="1"==b;mxEvent.addListener(d,"change",function(){f(a,d.checked?"1":"0",c)});return d}function g(b,c,g,q,h){var v=g.dispName,u=g.type,l=document.createElement("tr");l.className="gePropRow"+(h?"Dark":"")+(q?"Alt":"")+" gePropNonHeaderRow";l.setAttribute("data-pName",b);l.setAttribute("data-pValue",c);q=!1;null!=g.index&&(l.setAttribute("data-index",g.index),v=(null!=v?v:"")+"["+g.index+"]",q=!0);var w=document.createElement("td");
+w.className="gePropRowCell";w.innerHTML=mxUtils.htmlEntities(mxResources.get(v,null,v));q&&(w.style.textAlign="right");l.appendChild(w);w=document.createElement("td");w.className="gePropRowCell";if("color"==u)w.appendChild(k(b,c,g));else if("bool"==u||"boolean"==u)w.appendChild(t(b,c,g));else if("enum"==u){var m=g.enumList;for(h=0;h<m.length;h++)if(v=m[h],v.val==c){w.innerHTML=mxUtils.htmlEntities(mxResources.get(v.dispName,null,v.dispName));break}mxEvent.addListener(w,"click",mxUtils.bind(p,function(){var k=
+document.createElement("select");d(w,k);for(var e=0;e<m.length;e++){var n=m[e],t=document.createElement("option");t.value=mxUtils.htmlEntities(n.val);t.innerHTML=mxUtils.htmlEntities(mxResources.get(n.dispName,null,n.dispName));k.appendChild(t)}k.value=c;a.appendChild(k);mxEvent.addListener(k,"change",function(){var a=mxUtils.htmlEntities(k.value);f(b,a,g)});k.focus();mxEvent.addListener(k,"blur",function(){a.removeChild(k)})}))}else"dynamicArr"==u?w.appendChild(e(b,c,g.subType,g.subDefVal,g.countProperty,
+l,h)):"staticArr"==u?w.appendChild(n(b,c,g.subType,g.subDefVal,g.size,l,h)):(w.innerHTML=c,mxEvent.addListener(w,"click",mxUtils.bind(p,function(){function k(){var a=e.value,a=0==a.length&&"string"!=u?0:a;g.allowAuto&&("auto"==a.trim().toLowerCase()?(a="auto",u="string"):(a=parseFloat(a),a=isNaN(a)?0:a));null!=g.min&&a<g.min?a=g.min:null!=g.max&&a>g.max&&(a=g.max);a=mxUtils.htmlEntities(("int"==u?parseInt(a):a)+"");f(b,a,g)}var e=document.createElement("input");d(w,e,!0);e.value=c;e.className="gePropEditor";
+"int"!=u&&"float"!=u||g.allowAuto||(e.type="number",e.step="int"==u?"1":"any",null!=g.min&&(e.min=parseFloat(g.min)),null!=g.max&&(e.max=parseFloat(g.max)));a.appendChild(e);mxEvent.addListener(e,"keypress",function(a){13==a.keyCode&&k()});e.focus();mxEvent.addListener(e,"blur",function(){k()})})));g.isDeletable&&(h=mxUtils.button("-",mxUtils.bind(p,function(a){f(b,"",g,g.index);mxEvent.consume(a)})),h.style.height="16px",h.style.width="25px",h.style["float"]="right",h.className="geColorBtn",w.appendChild(h));
+l.appendChild(w);return l}var p=this,q=this.editorUi.editor.graph,h=[];a.style.position="relative";a.style.padding="0";var u=document.createElement("table");u.style.whiteSpace="nowrap";u.style.width="100%";var v=document.createElement("tr");v.className="gePropHeader";var l=document.createElement("th");l.className="gePropHeaderCell";var w=document.createElement("img");w.src=Sidebar.prototype.expandedImage;l.appendChild(w);mxUtils.write(l,mxResources.get("property"));v.style.cursor="pointer";var m=
+function(){var b=u.querySelectorAll(".gePropNonHeaderRow"),c;if(p.editorUi.propertiesCollapsed){w.src=Sidebar.prototype.collapsedImage;c="none";for(var f=a.childNodes.length-1;0<=f;f--)try{var d=a.childNodes[f],k=d.nodeName.toUpperCase();"INPUT"!=k&&"SELECT"!=k||a.removeChild(d)}catch(fa){}}else w.src=Sidebar.prototype.expandedImage,c="";for(f=0;f<b.length;f++)b[f].style.display=c};mxEvent.addListener(v,"click",function(){p.editorUi.propertiesCollapsed=!p.editorUi.propertiesCollapsed;m()});v.appendChild(l);
+l=document.createElement("th");l.className="gePropHeaderCell";l.innerHTML=mxResources.get("value");v.appendChild(l);u.appendChild(v);var D=!1,x=!1,B;for(B in b)if(v=b[B],"function"!=typeof v.isVisible||v.isVisible(c)){var y=null!=c.style[B]?mxUtils.htmlEntities(c.style[B]+""):v.defVal;if("separator"==v.type)x=!x;else{if("staticArr"==v.type)v.size=parseInt(c.style[v.sizeProperty]||b[v.sizeProperty].defVal)||0;else if(null!=v.dependentProps){for(var U=v.dependentProps,O=[],P=[],l=0;l<U.length;l++){var V=
+c.style[U[l]];P.push(b[U[l]].subDefVal);O.push(null!=V?V.split(","):[])}v.dependentPropsDefVal=P;v.dependentPropsVals=O}u.appendChild(g(B,y,v,D,x));D=!D}}for(l=0;l<h.length;l++)for(v=h[l],b=v.parentRow,c=0;c<v.values.length;c++)B=g(v.name,v.values[c],{type:v.type,parentRow:v.parentRow,isDeletable:v.isDeletable,index:c,defVal:v.defVal,countProperty:v.countProperty,size:v.size},0==c%2,v.flipBkg),b.parentNode.insertBefore(B,b.nextSibling),b=B;a.appendChild(u);m();return a};StyleFormatPanel.prototype.addStyles=
+function(a){function b(a){function b(a){var b=mxUtils.button("",function(b){f.getModel().beginUpdate();try{var c=f.getSelectionCells();for(b=0;b<c.length;b++){for(var d=f.getModel().getStyle(c[b]),e=0;e<k.length;e++)d=mxUtils.removeStylename(d,k[e]);var n=f.getModel().isVertex(c[b])?f.defaultVertexStyle:f.defaultEdgeStyle;null!=a?(d=mxUtils.setStyle(d,mxConstants.STYLE_FILLCOLOR,a.fill||mxUtils.getValue(n,mxConstants.STYLE_FILLCOLOR,null)),d=mxUtils.setStyle(d,mxConstants.STYLE_STROKECOLOR,a.stroke||
+mxUtils.getValue(n,mxConstants.STYLE_STROKECOLOR,null)),d=mxUtils.setStyle(d,mxConstants.STYLE_GRADIENTCOLOR,a.gradient||mxUtils.getValue(n,mxConstants.STYLE_GRADIENTCOLOR,null)),f.getModel().isVertex(c[b])&&(d=mxUtils.setStyle(d,mxConstants.STYLE_FONTCOLOR,a.font||mxUtils.getValue(n,mxConstants.STYLE_FONTCOLOR,null)))):(d=mxUtils.setStyle(d,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(n,mxConstants.STYLE_FILLCOLOR,"#ffffff")),d=mxUtils.setStyle(d,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(n,
+mxConstants.STYLE_STROKECOLOR,"#000000")),d=mxUtils.setStyle(d,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(n,mxConstants.STYLE_GRADIENTCOLOR,null)),f.getModel().isVertex(c[b])&&(d=mxUtils.setStyle(d,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(n,mxConstants.STYLE_FONTCOLOR,null))));f.getModel().setStyle(c[b],d)}}finally{f.getModel().endUpdate()}});b.className="geStyleButton";b.style.width="36px";b.style.height="30px";b.style.margin="0px 6px 6px 0px";if(null!=a)null!=a.gradient?mxClient.IS_IE&&
(mxClient.IS_QUIRKS||10>document.documentMode)?b.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+a.fill+"', EndColorStr='"+a.gradient+"', GradientType=0)":b.style.backgroundImage="linear-gradient("+a.fill+" 0px,"+a.gradient+" 100%)":a.fill==mxConstants.NONE?b.style.background="url('"+Dialog.prototype.noColorImage+"')":b.style.backgroundColor=a.fill||mxUtils.getValue(f.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff"),b.style.border="1px solid "+(a.stroke||mxUtils.getValue(f.defaultVertexStyle,
-mxConstants.STYLE_STROKECOLOR,"#000000"));else{var c=mxUtils.getValue(f.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff"),m=mxUtils.getValue(f.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");b.style.backgroundColor=c;b.style.border="1px solid "+m}d.appendChild(b)}d.innerHTML="";for(var c=0;c<a.length;c++)0<c&&0==mxUtils.mod(c,4)&&mxUtils.br(d),b(a[c])}function c(a){mxEvent.addListener(a,"mouseenter",function(){a.style.opacity="1"});mxEvent.addListener(a,"mouseleave",function(){a.style.opacity=
-"0.5"})}var f=this.editorUi.editor.graph,d=document.createElement("div");d.style.whiteSpace="nowrap";d.style.paddingLeft="24px";d.style.paddingRight="20px";a.style.paddingLeft="16px";a.style.paddingBottom="6px";a.style.position="relative";a.appendChild(d);var h="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" ");null==this.editorUi.currentScheme&&(this.editorUi.currentScheme=
-0);var m=document.createElement("div");m.style.cssText="position:absolute;left:10px;top:8px;bottom:8px;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(m,
-"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme-1,this.defaultColorSchemes.length);b(this.defaultColorSchemes[this.editorUi.currentScheme])}));var e=document.createElement("div");e.style.cssText="position:absolute;left:202px;top:8px;bottom:8px;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&&(a.appendChild(m),a.appendChild(e));mxEvent.addListener(e,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme+1,this.defaultColorSchemes.length);b(this.defaultColorSchemes[this.editorUi.currentScheme])}));c(m);c(e);b(this.defaultColorSchemes[this.editorUi.currentScheme]);return a};StyleFormatPanel.prototype.addEditOps=function(a){var b=this.format.getSelectionState(),c=null;1==this.editorUi.editor.graph.getSelectionCount()&&
+mxConstants.STYLE_STROKECOLOR,"#000000"));else{var c=mxUtils.getValue(f.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff"),e=mxUtils.getValue(f.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");b.style.backgroundColor=c;b.style.border="1px solid "+e}d.appendChild(b)}d.innerHTML="";for(var c=0;c<a.length;c++)0<c&&0==mxUtils.mod(c,4)&&mxUtils.br(d),b(a[c])}function c(a){mxEvent.addListener(a,"mouseenter",function(){a.style.opacity="1"});mxEvent.addListener(a,"mouseleave",function(){a.style.opacity=
+"0.5"})}var f=this.editorUi.editor.graph,d=document.createElement("div");d.style.whiteSpace="nowrap";d.style.paddingLeft="24px";d.style.paddingRight="20px";a.style.paddingLeft="16px";a.style.paddingBottom="6px";a.style.position="relative";a.appendChild(d);var k="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" ");null==this.editorUi.currentScheme&&(this.editorUi.currentScheme=
+0);var e=document.createElement("div");e.style.cssText="position:absolute;left:10px;top:8px;bottom:8px;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(e,
+"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme-1,this.defaultColorSchemes.length);b(this.defaultColorSchemes[this.editorUi.currentScheme])}));var n=document.createElement("div");n.style.cssText="position:absolute;left:202px;top:8px;bottom:8px;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&&(a.appendChild(e),a.appendChild(n));mxEvent.addListener(n,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme+1,this.defaultColorSchemes.length);b(this.defaultColorSchemes[this.editorUi.currentScheme])}));c(e);c(n);b(this.defaultColorSchemes[this.editorUi.currentScheme]);return a};StyleFormatPanel.prototype.addEditOps=function(a){var b=this.format.getSelectionState(),c=null;1==this.editorUi.editor.graph.getSelectionCount()&&
(c=mxUtils.button(mxResources.get("editStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("editStyle").funct()})),c.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),c.style.width="202px",c.style.marginBottom="2px",a.appendChild(c));var f=this.editorUi.editor.graph,d=f.view.getState(f.getSelectionCell());1==f.getSelectionCount()&&null!=d&&null!=d.shape&&null!=d.shape.stencil?(b=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,
function(a){this.editorUi.actions.get("editShape").funct()})),b.setAttribute("title",mxResources.get("editShape")),b.style.marginBottom="2px",null==c?b.style.width="202px":(c.style.width="100px",b.style.width="100px",b.style.marginLeft="2px"),a.appendChild(b)):b.image&&(b=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(a){this.editorUi.actions.get("image").funct()})),b.setAttribute("title",mxResources.get("editImage")),b.style.marginBottom="2px",null==c?b.style.width="202px":
(c.style.width="100px",b.style.width="100px",b.style.marginLeft="2px"),a.appendChild(b));return a}}Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize=
@@ -7837,13 +7838,13 @@ this.graph.container.firstChild==this.webKitForceRepaintNode)||(null!=this.webKi
function(){x.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(a){if("data:action/json,"==a.substring(0,17)&&(a=JSON.parse(a.substring(17)),null!=a.actions)){for(var b=0;b<a.actions.length;b++)if(null!=a.actions[b].open)if(this.isCustomLink(a.actions[b].open)){if(!this.customLinkClicked(a.actions[b].open))return}else this.openLink(a.actions[b].open);this.model.beginUpdate();try{for(b=0;b<a.actions.length;b++)this.handleLinkAction(a.actions[b])}finally{this.model.endUpdate()}}};
Graph.prototype.handleLinkAction=function(a){var b=[];null!=a.select&&this.isEnabled()&&(b=this.getCellsForAction(a.select),this.setSelectionCells(b));null!=a.highlight&&(b=this.getCellsForAction(a.highlight),this.highlightCells(b,a.highlight.color,a.highlight.duration,a.highlight.opacity));null!=a.toggle&&this.toggleCells(this.getCellsForAction(a.toggle));null!=a.show&&this.setCellsVisible(this.getCellsForAction(a.show),!0);null!=a.hide&&this.setCellsVisible(this.getCellsForAction(a.hide),!1);null!=
a.scroll&&(b=this.getCellsForAction(a.scroll));0<b.length&&this.scrollCellToVisible(b[0])};Graph.prototype.getCellsForAction=function(a){return this.getCellsById(a.cells).concat(this.getCellsForTags(a.tags))};Graph.prototype.getCellsById=function(a){var b=[];if(null!=a)for(var c=0;c<a.length;c++)if("*"==a[c])var f=this.getDefaultParent(),b=b.concat(this.model.filterDescendants(function(a){return a!=f},f));else{var d=this.model.getCell(a[c]);null!=d&&b.push(d)}return b};Graph.prototype.getCellsForTags=
-function(a,b,c){var f=[];if(null!=a){b=null!=b?b:this.model.getDescendants(this.model.getRoot());c=null!=c?c:"tags";for(var d=0;d<b.length;d++)if(this.model.isVertex(b[d])||this.model.isEdge(b[d])){var h=null!=b[d].value&&"object"==typeof b[d].value?mxUtils.trim(b[d].value.getAttribute(c)||""):"",m=!0;if(0<h.length)for(var h=h.toLowerCase().split(" "),e=0;e<a.length&&m;e++)var g=mxUtils.trim(a[e]).toLowerCase(),m=m&&(0==g.length||0<=mxUtils.indexOf(h,g));else m=0==a.length;m&&f.push(b[d])}}return f};
+function(a,b,c){var f=[];if(null!=a){b=null!=b?b:this.model.getDescendants(this.model.getRoot());c=null!=c?c:"tags";for(var d=0;d<b.length;d++)if(this.model.isVertex(b[d])||this.model.isEdge(b[d])){var k=null!=b[d].value&&"object"==typeof b[d].value?mxUtils.trim(b[d].value.getAttribute(c)||""):"",e=!0;if(0<k.length)for(var k=k.toLowerCase().split(" "),n=0;n<a.length&&e;n++)var g=mxUtils.trim(a[n]).toLowerCase(),e=e&&(0==g.length||0<=mxUtils.indexOf(k,g));else e=0==a.length;e&&f.push(b[d])}}return f};
Graph.prototype.toggleCells=function(a){this.model.beginUpdate();try{for(var b=0;b<a.length;b++)this.model.setVisible(a[b],!this.model.isVisible(a[b]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(a,b){this.model.beginUpdate();try{for(var c=0;c<a.length;c++)this.model.setVisible(a[c],b)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(a,b,c,f){for(var d=0;d<a.length;d++)this.highlightCell(a[d],b,c,f)};Graph.prototype.highlightCell=function(a,b,
-c,f){b=null!=b?b:mxConstants.DEFAULT_VALID_COLOR;c=null!=c?c:1E3;a=this.view.getState(a);if(null!=a){var d=Math.max(5,mxUtils.getValue(a.style,mxConstants.STYLE_STROKEWIDTH,1)+4),h=new mxCellHighlight(this,b,d,!1);null!=f&&(h.opacity=f);h.highlight(a);window.setTimeout(function(){null!=h.shape&&(mxUtils.setPrefixedStyle(h.shape.node.style,"transition","all 1200ms ease-in-out"),h.shape.node.style.opacity=0);window.setTimeout(function(){h.destroy()},1200)},c)}};Graph.prototype.addSvgShadow=function(a,
-b,c){c=null!=c?c:!1;var f=a.ownerDocument,d=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"filter"):f.createElement("filter");d.setAttribute("id",this.shadowId);var h=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):f.createElement("feGaussianBlur");h.setAttribute("in","SourceAlpha");h.setAttribute("stdDeviation",this.svgShadowBlur);h.setAttribute("result","blur");d.appendChild(h);h=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feOffset"):
-f.createElement("feOffset");h.setAttribute("in","blur");h.setAttribute("dx",this.svgShadowSize);h.setAttribute("dy",this.svgShadowSize);h.setAttribute("result","offsetBlur");d.appendChild(h);h=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feFlood"):f.createElement("feFlood");h.setAttribute("flood-color",this.svgShadowColor);h.setAttribute("flood-opacity",this.svgShadowOpacity);h.setAttribute("result","offsetColor");d.appendChild(h);h=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,
-"feComposite"):f.createElement("feComposite");h.setAttribute("in","offsetColor");h.setAttribute("in2","offsetBlur");h.setAttribute("operator","in");h.setAttribute("result","offsetBlur");d.appendChild(h);h=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feBlend"):f.createElement("feBlend");h.setAttribute("in","SourceGraphic");h.setAttribute("in2","offsetBlur");d.appendChild(h);h=a.getElementsByTagName("defs");0==h.length?(f=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,
-"defs"):f.createElement("defs"),null!=a.firstChild?a.insertBefore(f,a.firstChild):a.appendChild(f)):f=h[0];f.appendChild(d);c||((b||a.getElementsByTagName("g")[0]).setAttribute("filter","url(#"+this.shadowId+")"),isNaN(parseInt(a.getAttribute("width")))||(a.setAttribute("width",parseInt(a.getAttribute("width"))+6),a.setAttribute("height",parseInt(a.getAttribute("height"))+6)));return d};Graph.prototype.setShadowVisible=function(a,b){mxClient.IS_SVG&&(b=null!=b?b:!0,(this.shadowVisible=a)?this.view.getDrawPane().setAttribute("filter",
+c,f){b=null!=b?b:mxConstants.DEFAULT_VALID_COLOR;c=null!=c?c:1E3;a=this.view.getState(a);if(null!=a){var d=Math.max(5,mxUtils.getValue(a.style,mxConstants.STYLE_STROKEWIDTH,1)+4),k=new mxCellHighlight(this,b,d,!1);null!=f&&(k.opacity=f);k.highlight(a);window.setTimeout(function(){null!=k.shape&&(mxUtils.setPrefixedStyle(k.shape.node.style,"transition","all 1200ms ease-in-out"),k.shape.node.style.opacity=0);window.setTimeout(function(){k.destroy()},1200)},c)}};Graph.prototype.addSvgShadow=function(a,
+b,c){c=null!=c?c:!1;var f=a.ownerDocument,d=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"filter"):f.createElement("filter");d.setAttribute("id",this.shadowId);var k=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):f.createElement("feGaussianBlur");k.setAttribute("in","SourceAlpha");k.setAttribute("stdDeviation",this.svgShadowBlur);k.setAttribute("result","blur");d.appendChild(k);k=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feOffset"):
+f.createElement("feOffset");k.setAttribute("in","blur");k.setAttribute("dx",this.svgShadowSize);k.setAttribute("dy",this.svgShadowSize);k.setAttribute("result","offsetBlur");d.appendChild(k);k=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feFlood"):f.createElement("feFlood");k.setAttribute("flood-color",this.svgShadowColor);k.setAttribute("flood-opacity",this.svgShadowOpacity);k.setAttribute("result","offsetColor");d.appendChild(k);k=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,
+"feComposite"):f.createElement("feComposite");k.setAttribute("in","offsetColor");k.setAttribute("in2","offsetBlur");k.setAttribute("operator","in");k.setAttribute("result","offsetBlur");d.appendChild(k);k=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feBlend"):f.createElement("feBlend");k.setAttribute("in","SourceGraphic");k.setAttribute("in2","offsetBlur");d.appendChild(k);k=a.getElementsByTagName("defs");0==k.length?(f=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,
+"defs"):f.createElement("defs"),null!=a.firstChild?a.insertBefore(f,a.firstChild):a.appendChild(f)):f=k[0];f.appendChild(d);c||((b||a.getElementsByTagName("g")[0]).setAttribute("filter","url(#"+this.shadowId+")"),isNaN(parseInt(a.getAttribute("width")))||(a.setAttribute("width",parseInt(a.getAttribute("width"))+6),a.setAttribute("height",parseInt(a.getAttribute("height"))+6)));return d};Graph.prototype.setShadowVisible=function(a,b){mxClient.IS_SVG&&(b=null!=b?b:!0,(this.shadowVisible=a)?this.view.getDrawPane().setAttribute("filter",
"url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),b&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var a=this.model.getChildCount(this.model.root),b,c=0;do b=this.model.getChildAt(this.model.root,c);while(c++<a&&"1"==mxUtils.getValue(this.getCellStyle(b),"locked","0"));null!=b&&this.setDefaultParent(b)}};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+"/bpmn/mxBpmnShape2.js",STENCIL_PATH+"/bpmn.xml"];mxStencilRegistry.libraries.dfd=[SHAPES_PATH+"/mxDFD.js"];mxStencilRegistry.libraries.er=[SHAPES_PATH+"/er/mxER.js"];mxStencilRegistry.libraries.flowchart=[SHAPES_PATH+"/mxFlowchart.js",STENCIL_PATH+"/flowchart.xml"];mxStencilRegistry.libraries.ios=
[SHAPES_PATH+"/mockup/mxMockupiOS.js"];mxStencilRegistry.libraries.rackGeneral=[SHAPES_PATH+"/rack/mxRack.js",STENCIL_PATH+"/rack/general.xml"];mxStencilRegistry.libraries.rackF5=[STENCIL_PATH+"/rack/f5.xml"];mxStencilRegistry.libraries.lean_mapping=[SHAPES_PATH+"/mxLeanMap.js",STENCIL_PATH+"/lean_mapping.xml"];mxStencilRegistry.libraries.basic=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/basic.xml"];mxStencilRegistry.libraries.ios7icons=[STENCIL_PATH+"/ios7/icons.xml"];mxStencilRegistry.libraries.ios7ui=
@@ -7852,33 +7853,33 @@ mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegist
[SHAPES_PATH+"/mockup/mxMockupNavigation.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/text"]=[SHAPES_PATH+"/mockup/mxMockupText.js"];mxStencilRegistry.libraries.floorplan=[SHAPES_PATH+"/mxFloorplan.js",STENCIL_PATH+"/floorplan.xml"];mxStencilRegistry.libraries.bootstrap=[SHAPES_PATH+"/mxBootstrap.js",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.xml"];mxStencilRegistry.libraries.gcp2=[SHAPES_PATH+"/mxGCP2.js",
STENCIL_PATH+"/gcp2.xml"];mxStencilRegistry.libraries.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.veeam=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam.xml"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=
-[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(a){var b=null;null!=a&&0<a.length&&("ER"==a.substring(0,2)?b="mxgraph.er":"sysML"==a.substring(0,5)&&(b="mxgraph.sysml"));return b};var t=mxMarker.createMarker;mxMarker.createMarker=function(a,b,c,f,d,h,m,e,g,p){if(null!=c&&null==mxMarker.markers[c]){var q=this.getPackageForType(c);null!=q&&mxStencilRegistry.getStencil(q)}return t.apply(this,arguments)};
-PrintDialog.prototype.create=function(a,b){function c(){u.value=Math.max(1,Math.min(e,Math.max(parseInt(u.value),parseInt(k.value))));k.value=Math.max(1,Math.min(e,Math.min(parseInt(u.value),parseInt(k.value))))}function f(b){function c(b,c,d){var h=b.getGraphBounds(),m=0,e=0,t=da.get(),g=1/b.pageScale,p=n.checked;if(p)var g=parseInt(X.value),q=parseInt(W.value),g=Math.min(t.height*q/(h.height/b.view.scale),t.width*g/(h.width/b.view.scale));else g=parseInt(w.value)/(100*b.pageScale),isNaN(g)&&(f=
-1/b.pageScale,w.value="100 %");t=mxRectangle.fromRectangle(t);t.width=Math.ceil(t.width*f);t.height=Math.ceil(t.height*f);g*=f;!p&&b.pageVisible?(h=b.getPageLayout(),m-=h.x*t.width,e-=h.y*t.height):p=!0;if(null==c){c=PrintDialog.createPrintPreview(b,g,t,0,m,e,p);c.pageSelector=!1;c.mathEnabled=!1;b=a.getCurrentFile();null!=b&&(c.title=b.getTitle());var k=c.writeHead;c.writeHead=function(b){k.apply(this,arguments);null!=a.editor.fontCss&&(b.writeln('<style type="text/css">'),b.writeln(a.editor.fontCss),
-b.writeln("</style>"))};if("undefined"!==typeof MathJax){var v=c.renderPage;c.renderPage=function(a,b,c,f,d,h){var m=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;var e=v.apply(this,arguments);mxClient.NO_FO=m;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:e.className="geDisableMathJax";return e}}c.open(null,null,d,!0)}else{t=b.background;if(null==t||""==t||t==mxConstants.NONE)t="#ffffff";c.backgroundColor=t;c.autoOrigin=
-p;c.appendGraph(b,g,m,e,d,!0)}return c}var f=parseInt(ba.value)/100;isNaN(f)&&(f=1,ba.value="100 %");var f=.75*f,h=k.value,m=u.value,e=!p.checked,t=null;e&&(e=h==g&&m==g);if(!e&&null!=a.pages&&a.pages.length){var q=0,e=a.pages.length-1;p.checked||(q=parseInt(h)-1,e=parseInt(m)-1);for(var v=q;v<=e;v++){var l=a.pages[v],h=l==a.currentPage?d:null;if(null==h){var h=a.createTemporaryGraph(d.getStylesheet()),m=!0,q=!1,x=null,D=null;null==l.viewState&&null==l.root&&a.updatePageRoot(l);null!=l.viewState&&
-(m=l.viewState.pageVisible,q=l.viewState.mathEnabled,x=l.viewState.background,D=l.viewState.backgroundImage);h.background=x;h.backgroundImage=null!=D?new mxImage(D.src,D.width,D.height):null;h.pageVisible=m;h.mathEnabled=q;var y=h.getGlobalVariable;h.getGlobalVariable=function(a){return"page"==a?l.getName():"pagenumber"==a?v+1:y.apply(this,arguments)};document.body.appendChild(h.container);a.updatePageRoot(l);h.model.setRoot(l.root)}t=c(h,t,v!=e);h!=d&&h.container.parentNode.removeChild(h.container)}}else t=
-c(d);t.mathEnabled&&(e=t.wnd.document,e.writeln('<script type="text/x-mathjax-config">'),e.writeln("MathJax.Hub.Config({"),e.writeln("showMathMenu: false,"),e.writeln('messageStyle: "none",'),e.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],'),e.writeln('extensions: ["tex2jax.js", "mml2jax.js", "asciimath2jax.js"],'),e.writeln('"HTML-CSS": {'),e.writeln("imageFont: null"),e.writeln("},"),e.writeln("TeX: {"),e.writeln('extensions: ["AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js"]'),
-e.writeln("},"),e.writeln("tex2jax: {"),e.writeln('\tignoreClass: "geDisableMathJax"'),e.writeln("},"),e.writeln("asciimath2jax: {"),e.writeln('\tignoreClass: "geDisableMathJax"'),e.writeln("}"),e.writeln("});"),b&&(e.writeln("MathJax.Hub.Queue(function () {"),e.writeln("window.print();"),e.writeln("});")),e.writeln("\x3c/script>"),e.writeln('<script type="text/javascript" src="https://math.draw.io/current/MathJax.js">\x3c/script>'));t.closeDocument();!t.mathEnabled&&b&&PrintDialog.printPreview(t)}
-var d=a.editor.graph,h=document.createElement("div"),m=document.createElement("h3");m.style.width="100%";m.style.textAlign="center";m.style.marginTop="0px";mxUtils.write(m,b||mxResources.get("print"));h.appendChild(m);var e=1,g=1,t=document.createElement("div");t.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var p=document.createElement("input");p.style.cssText="margin-right:8px;margin-bottom:8px;";p.setAttribute("value","all");p.setAttribute("type","radio");
-p.setAttribute("name","pages-printdialog");t.appendChild(p);m=document.createElement("span");mxUtils.write(m,mxResources.get("printAllPages"));t.appendChild(m);mxUtils.br(t);var q=p.cloneNode(!0);p.setAttribute("checked","checked");q.setAttribute("value","range");t.appendChild(q);m=document.createElement("span");mxUtils.write(m,mxResources.get("pages")+":");t.appendChild(m);var k=document.createElement("input");k.style.cssText="margin:0 8px 0 8px;";k.setAttribute("value","1");k.setAttribute("type",
-"number");k.setAttribute("min","1");k.style.width="50px";t.appendChild(k);m=document.createElement("span");mxUtils.write(m,mxResources.get("to"));t.appendChild(m);var u=k.cloneNode(!0);t.appendChild(u);mxEvent.addListener(k,"focus",function(){q.checked=!0});mxEvent.addListener(u,"focus",function(){q.checked=!0});mxEvent.addListener(k,"change",c);mxEvent.addListener(u,"change",c);if(null!=a.pages&&(e=a.pages.length,null!=a.currentPage))for(m=0;m<a.pages.length;m++)if(a.currentPage==a.pages[m]){g=m+
-1;k.value=g;u.value=g;break}k.setAttribute("max",e);u.setAttribute("max",e);1<e&&h.appendChild(t);var v=document.createElement("div");v.style.marginBottom="10px";var l=document.createElement("input");l.style.marginRight="8px";l.setAttribute("value","adjust");l.setAttribute("type","radio");l.setAttribute("name","printZoom");v.appendChild(l);m=document.createElement("span");mxUtils.write(m,mxResources.get("adjustTo"));v.appendChild(m);var w=document.createElement("input");w.style.cssText="margin:0 8px 0 8px;";
-w.setAttribute("value","100 %");w.style.width="50px";v.appendChild(w);mxEvent.addListener(w,"focus",function(){l.checked=!0});h.appendChild(v);var t=t.cloneNode(!1),n=l.cloneNode(!0);n.setAttribute("value","fit");l.setAttribute("checked","checked");m=document.createElement("div");m.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";m.appendChild(n);t.appendChild(m);v=document.createElement("table");v.style.display="inline-block";var x=document.createElement("tbody"),
-D=document.createElement("tr"),C=D.cloneNode(!0),L=document.createElement("td"),U=L.cloneNode(!0),R=L.cloneNode(!0),O=L.cloneNode(!0),V=L.cloneNode(!0),J=L.cloneNode(!0);L.style.textAlign="right";O.style.textAlign="right";mxUtils.write(L,mxResources.get("fitTo"));var X=document.createElement("input");X.style.cssText="margin:0 8px 0 8px;";X.setAttribute("value","1");X.setAttribute("min","1");X.setAttribute("type","number");X.style.width="40px";U.appendChild(X);m=document.createElement("span");mxUtils.write(m,
-mxResources.get("fitToSheetsAcross"));R.appendChild(m);mxUtils.write(O,mxResources.get("fitToBy"));var W=X.cloneNode(!0);V.appendChild(W);mxEvent.addListener(X,"focus",function(){n.checked=!0});mxEvent.addListener(W,"focus",function(){n.checked=!0});m=document.createElement("span");mxUtils.write(m,mxResources.get("fitToSheetsDown"));J.appendChild(m);D.appendChild(L);D.appendChild(U);D.appendChild(R);C.appendChild(O);C.appendChild(V);C.appendChild(J);x.appendChild(D);x.appendChild(C);v.appendChild(x);
-t.appendChild(v);h.appendChild(t);t=document.createElement("div");m=document.createElement("div");m.style.fontWeight="bold";m.style.marginBottom="12px";mxUtils.write(m,mxResources.get("paperSize"));t.appendChild(m);m=document.createElement("div");m.style.marginBottom="12px";var da=PageSetupDialog.addPageFormatPanel(m,"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);t.appendChild(m);m=document.createElement("span");mxUtils.write(m,mxResources.get("pageScale"));t.appendChild(m);
-var ba=document.createElement("input");ba.style.cssText="margin:0 8px 0 8px;";ba.setAttribute("value","100 %");ba.style.width="60px";t.appendChild(ba);h.appendChild(t);m=document.createElement("div");m.style.cssText="text-align:right;margin:48px 0 0 0;";t=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});t.className="geBtn";a.editor.cancelFirst&&m.appendChild(t);a.isOffline()||(v=mxUtils.button(mxResources.get("help"),function(){d.openLink("https://desk.draw.io/support/solutions/articles/16000048947")}),
-v.className="geBtn",m.appendChild(v));PrintDialog.previewEnabled&&(v=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();f(!1)}),v.className="geBtn",m.appendChild(v));v=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();f(!0)});v.className="geBtn gePrimaryBtn";m.appendChild(v);a.editor.cancelFirst||m.appendChild(t);h.appendChild(m);this.container=h};var w=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==
+[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(a){var b=null;null!=a&&0<a.length&&("ER"==a.substring(0,2)?b="mxgraph.er":"sysML"==a.substring(0,5)&&(b="mxgraph.sysml"));return b};var t=mxMarker.createMarker;mxMarker.createMarker=function(a,b,c,f,d,k,e,n,g,p){if(null!=c&&null==mxMarker.markers[c]){var q=this.getPackageForType(c);null!=q&&mxStencilRegistry.getStencil(q)}return t.apply(this,arguments)};
+PrintDialog.prototype.create=function(a,b){function c(){u.value=Math.max(1,Math.min(n,Math.max(parseInt(u.value),parseInt(h.value))));h.value=Math.max(1,Math.min(n,Math.min(parseInt(u.value),parseInt(h.value))))}function f(b){function c(b,c,d){var k=b.getGraphBounds(),e=0,n=0,t=W.get(),g=1/b.pageScale,p=m.checked;if(p)var g=parseInt(J.value),q=parseInt(ca.value),g=Math.min(t.height*q/(k.height/b.view.scale),t.width*g/(k.width/b.view.scale));else g=parseInt(w.value)/(100*b.pageScale),isNaN(g)&&(f=
+1/b.pageScale,w.value="100 %");t=mxRectangle.fromRectangle(t);t.width=Math.ceil(t.width*f);t.height=Math.ceil(t.height*f);g*=f;!p&&b.pageVisible?(k=b.getPageLayout(),e-=k.x*t.width,n-=k.y*t.height):p=!0;if(null==c){c=PrintDialog.createPrintPreview(b,g,t,0,e,n,p);c.pageSelector=!1;c.mathEnabled=!1;b=a.getCurrentFile();null!=b&&(c.title=b.getTitle());var h=c.writeHead;c.writeHead=function(b){h.apply(this,arguments);null!=a.editor.fontCss&&(b.writeln('<style type="text/css">'),b.writeln(a.editor.fontCss),
+b.writeln("</style>"))};if("undefined"!==typeof MathJax){var v=c.renderPage;c.renderPage=function(a,b,c,f,d,k){var e=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;var n=v.apply(this,arguments);mxClient.NO_FO=e;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:n.className="geDisableMathJax";return n}}c.open(null,null,d,!0)}else{t=b.background;if(null==t||""==t||t==mxConstants.NONE)t="#ffffff";c.backgroundColor=t;c.autoOrigin=
+p;c.appendGraph(b,g,e,n,d,!0)}return c}var f=parseInt(da.value)/100;isNaN(f)&&(f=1,da.value="100 %");var f=.75*f,k=h.value,e=u.value,n=!p.checked,t=null;n&&(n=k==g&&e==g);if(!n&&null!=a.pages&&a.pages.length){var q=0,n=a.pages.length-1;p.checked||(q=parseInt(k)-1,n=parseInt(e)-1);for(var v=q;v<=n;v++){var l=a.pages[v],k=l==a.currentPage?d:null;if(null==k){var k=a.createTemporaryGraph(d.getStylesheet()),e=!0,q=!1,x=null,D=null;null==l.viewState&&null==l.root&&a.updatePageRoot(l);null!=l.viewState&&
+(e=l.viewState.pageVisible,q=l.viewState.mathEnabled,x=l.viewState.background,D=l.viewState.backgroundImage);k.background=x;k.backgroundImage=null!=D?new mxImage(D.src,D.width,D.height):null;k.pageVisible=e;k.mathEnabled=q;var y=k.getGlobalVariable;k.getGlobalVariable=function(a){return"page"==a?l.getName():"pagenumber"==a?v+1:y.apply(this,arguments)};document.body.appendChild(k.container);a.updatePageRoot(l);k.model.setRoot(l.root)}t=c(k,t,v!=n);k!=d&&k.container.parentNode.removeChild(k.container)}}else t=
+c(d);t.mathEnabled&&(n=t.wnd.document,n.writeln('<script type="text/x-mathjax-config">'),n.writeln("MathJax.Hub.Config({"),n.writeln("showMathMenu: false,"),n.writeln('messageStyle: "none",'),n.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],'),n.writeln('extensions: ["tex2jax.js", "mml2jax.js", "asciimath2jax.js"],'),n.writeln('"HTML-CSS": {'),n.writeln("imageFont: null"),n.writeln("},"),n.writeln("TeX: {"),n.writeln('extensions: ["AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js"]'),
+n.writeln("},"),n.writeln("tex2jax: {"),n.writeln('\tignoreClass: "geDisableMathJax"'),n.writeln("},"),n.writeln("asciimath2jax: {"),n.writeln('\tignoreClass: "geDisableMathJax"'),n.writeln("}"),n.writeln("});"),b&&(n.writeln("MathJax.Hub.Queue(function () {"),n.writeln("window.print();"),n.writeln("});")),n.writeln("\x3c/script>"),n.writeln('<script type="text/javascript" src="https://math.draw.io/current/MathJax.js">\x3c/script>'));t.closeDocument();!t.mathEnabled&&b&&PrintDialog.printPreview(t)}
+var d=a.editor.graph,k=document.createElement("div"),e=document.createElement("h3");e.style.width="100%";e.style.textAlign="center";e.style.marginTop="0px";mxUtils.write(e,b||mxResources.get("print"));k.appendChild(e);var n=1,g=1,t=document.createElement("div");t.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var p=document.createElement("input");p.style.cssText="margin-right:8px;margin-bottom:8px;";p.setAttribute("value","all");p.setAttribute("type","radio");
+p.setAttribute("name","pages-printdialog");t.appendChild(p);e=document.createElement("span");mxUtils.write(e,mxResources.get("printAllPages"));t.appendChild(e);mxUtils.br(t);var q=p.cloneNode(!0);p.setAttribute("checked","checked");q.setAttribute("value","range");t.appendChild(q);e=document.createElement("span");mxUtils.write(e,mxResources.get("pages")+":");t.appendChild(e);var h=document.createElement("input");h.style.cssText="margin:0 8px 0 8px;";h.setAttribute("value","1");h.setAttribute("type",
+"number");h.setAttribute("min","1");h.style.width="50px";t.appendChild(h);e=document.createElement("span");mxUtils.write(e,mxResources.get("to"));t.appendChild(e);var u=h.cloneNode(!0);t.appendChild(u);mxEvent.addListener(h,"focus",function(){q.checked=!0});mxEvent.addListener(u,"focus",function(){q.checked=!0});mxEvent.addListener(h,"change",c);mxEvent.addListener(u,"change",c);if(null!=a.pages&&(n=a.pages.length,null!=a.currentPage))for(e=0;e<a.pages.length;e++)if(a.currentPage==a.pages[e]){g=e+
+1;h.value=g;u.value=g;break}h.setAttribute("max",n);u.setAttribute("max",n);1<n&&k.appendChild(t);var v=document.createElement("div");v.style.marginBottom="10px";var l=document.createElement("input");l.style.marginRight="8px";l.setAttribute("value","adjust");l.setAttribute("type","radio");l.setAttribute("name","printZoom");v.appendChild(l);e=document.createElement("span");mxUtils.write(e,mxResources.get("adjustTo"));v.appendChild(e);var w=document.createElement("input");w.style.cssText="margin:0 8px 0 8px;";
+w.setAttribute("value","100 %");w.style.width="50px";v.appendChild(w);mxEvent.addListener(w,"focus",function(){l.checked=!0});k.appendChild(v);var t=t.cloneNode(!1),m=l.cloneNode(!0);m.setAttribute("value","fit");l.setAttribute("checked","checked");e=document.createElement("div");e.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";e.appendChild(m);t.appendChild(e);v=document.createElement("table");v.style.display="inline-block";var x=document.createElement("tbody"),
+D=document.createElement("tr"),B=D.cloneNode(!0),L=document.createElement("td"),U=L.cloneNode(!0),O=L.cloneNode(!0),P=L.cloneNode(!0),V=L.cloneNode(!0),ba=L.cloneNode(!0);L.style.textAlign="right";P.style.textAlign="right";mxUtils.write(L,mxResources.get("fitTo"));var J=document.createElement("input");J.style.cssText="margin:0 8px 0 8px;";J.setAttribute("value","1");J.setAttribute("min","1");J.setAttribute("type","number");J.style.width="40px";U.appendChild(J);e=document.createElement("span");mxUtils.write(e,
+mxResources.get("fitToSheetsAcross"));O.appendChild(e);mxUtils.write(P,mxResources.get("fitToBy"));var ca=J.cloneNode(!0);V.appendChild(ca);mxEvent.addListener(J,"focus",function(){m.checked=!0});mxEvent.addListener(ca,"focus",function(){m.checked=!0});e=document.createElement("span");mxUtils.write(e,mxResources.get("fitToSheetsDown"));ba.appendChild(e);D.appendChild(L);D.appendChild(U);D.appendChild(O);B.appendChild(P);B.appendChild(V);B.appendChild(ba);x.appendChild(D);x.appendChild(B);v.appendChild(x);
+t.appendChild(v);k.appendChild(t);t=document.createElement("div");e=document.createElement("div");e.style.fontWeight="bold";e.style.marginBottom="12px";mxUtils.write(e,mxResources.get("paperSize"));t.appendChild(e);e=document.createElement("div");e.style.marginBottom="12px";var W=PageSetupDialog.addPageFormatPanel(e,"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);t.appendChild(e);e=document.createElement("span");mxUtils.write(e,mxResources.get("pageScale"));t.appendChild(e);
+var da=document.createElement("input");da.style.cssText="margin:0 8px 0 8px;";da.setAttribute("value","100 %");da.style.width="60px";t.appendChild(da);k.appendChild(t);e=document.createElement("div");e.style.cssText="text-align:right;margin:48px 0 0 0;";t=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});t.className="geBtn";a.editor.cancelFirst&&e.appendChild(t);a.isOffline()||(v=mxUtils.button(mxResources.get("help"),function(){d.openLink("https://desk.draw.io/support/solutions/articles/16000048947")}),
+v.className="geBtn",e.appendChild(v));PrintDialog.previewEnabled&&(v=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();f(!1)}),v.className="geBtn",e.appendChild(v));v=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();f(!0)});v.className="geBtn gePrimaryBtn";e.appendChild(v);a.editor.cancelFirst||e.appendChild(t);k.appendChild(e);this.container=k};var w=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==
this.page&&(this.page=this.ui.currentPage);this.page!=this.ui.currentPage?null!=this.page.viewState&&(this.ignoreColor||(this.page.viewState.background=this.color),this.ignoreImage||(this.page.viewState.backgroundImage=this.image),null!=this.format&&(this.page.viewState.pageFormat=this.format),null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled),null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)):(w.apply(this,arguments),null!=this.mathEnabled&&
this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible))}})();
-var ErrorDialog=function(a,c,b,d,e,g,k,l,n,f,h){n=null!=n?n:!0;var m=document.createElement("div");m.style.textAlign="center";if(null!=c){var p=document.createElement("div");p.style.padding="0px";p.style.margin="0px";p.style.fontSize="18px";p.style.paddingBottom="16px";p.style.marginBottom="16px";p.style.borderBottom="1px solid #c0c0c0";p.style.color="gray";mxUtils.write(p,c);m.appendChild(p)}c=document.createElement("div");c.style.padding="6px";c.innerHTML=b;m.appendChild(c);b=document.createElement("div");
-b.style.marginTop="16px";b.style.textAlign="center";null!=g&&(c=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();g()}),c.className="geBtn",b.appendChild(c),b.style.textAlign="center");null!=f&&(f=mxUtils.button(f,function(){null!=h&&h()}),f.className="geBtn",b.appendChild(f));var q=mxUtils.button(d,function(){n&&a.hideDialog();null!=e&&e()});q.className="geBtn";b.appendChild(q);null!=k&&(d=mxUtils.button(k,function(){n&&a.hideDialog();null!=l&&l()}),d.className="geBtn gePrimaryBtn",
-b.appendChild(d));this.init=function(){q.focus()};m.appendChild(b);this.container=m};
-(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,b,d){d.ui=a.ui;return b};a.afterDecode=function(a,b,d){d.previousColor=d.color;d.previousImage=d.image;d.previousFormat=d.format;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(a)})();(function(){EditorUi.VERSION="10.0.28";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.enableLogging="1"!=urlParams.stealth&&/.*\.draw\.io$/.test(window.location.hostname)&&"support.draw.io"!=window.location.hostname;EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.logError=function(a,b,c,d,e){if("1"==urlParams.dev)EditorUi.debug("logError",a,b,c,d,e);else if(EditorUi.enableLogging)try{if(a!=EditorUi.lastErrorMessage&&(null==
-a||null==b||-1==a.indexOf("Script error")&&-1==a.indexOf("extension"))&&null!=a&&0>a.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=a;var f=0<=a.indexOf("NetworkError")||0<=a.indexOf("SecurityError")||0<=a.indexOf("NS_ERROR_FAILURE")||0<=a.indexOf("out of memory")?"CONFIG":"SEVERE",h=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=h+"/log?severity="+f+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(a)+":url:"+encodeURIComponent(window.location.href)+
-":lnum:"+encodeURIComponent(c)+(null!=d?":colno:"+encodeURIComponent(d):"")+(null!=e&&null!=e.stack?"&stack="+encodeURIComponent(e.stack):"")}}catch(x){}};EditorUi.logEvent=function(a){if("1"==urlParams.dev)EditorUi.debug("logEvent",a);else if(EditorUi.enableLogging)try{var b=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=b+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=a?"&data="+encodeURIComponent(JSON.stringify(a)):"")}catch(m){}};EditorUi.sendReport=function(a,
-b){if("1"==urlParams.dev)EditorUi.debug("sendReport",a);else if(EditorUi.enableLogging)try{b=null!=b?b:5E4,a.length>b&&(a=a.substring(0,b)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(a))}catch(m){}};EditorUi.debug=function(){if(null!=window.console&&"1"==urlParams.test){for(var a=[(new Date).toISOString()],b=0;b<arguments.length;b++)a.push(arguments[b]);console.log.apply(console,
+var ErrorDialog=function(a,c,b,d,e,g,h,l,m,f,k){m=null!=m?m:!0;var n=document.createElement("div");n.style.textAlign="center";if(null!=c){var p=document.createElement("div");p.style.padding="0px";p.style.margin="0px";p.style.fontSize="18px";p.style.paddingBottom="16px";p.style.marginBottom="16px";p.style.borderBottom="1px solid #c0c0c0";p.style.color="gray";mxUtils.write(p,c);n.appendChild(p)}c=document.createElement("div");c.style.padding="6px";c.innerHTML=b;n.appendChild(c);b=document.createElement("div");
+b.style.marginTop="16px";b.style.textAlign="center";null!=g&&(c=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();g()}),c.className="geBtn",b.appendChild(c),b.style.textAlign="center");null!=f&&(f=mxUtils.button(f,function(){null!=k&&k()}),f.className="geBtn",b.appendChild(f));var q=mxUtils.button(d,function(){m&&a.hideDialog();null!=e&&e()});q.className="geBtn";b.appendChild(q);null!=h&&(d=mxUtils.button(h,function(){m&&a.hideDialog();null!=l&&l()}),d.className="geBtn gePrimaryBtn",
+b.appendChild(d));this.init=function(){q.focus()};n.appendChild(b);this.container=n};
+(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,b,d){d.ui=a.ui;return b};a.afterDecode=function(a,b,d){d.previousColor=d.color;d.previousImage=d.image;d.previousFormat=d.format;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(a)})();(function(){EditorUi.VERSION="10.0.29";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.enableLogging="1"!=urlParams.stealth&&/.*\.draw\.io$/.test(window.location.hostname)&&"support.draw.io"!=window.location.hostname;EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.logError=function(a,b,c,d,e){if("1"==urlParams.dev)EditorUi.debug("logError",a,b,c,d,e);else if(EditorUi.enableLogging)try{if(a!=EditorUi.lastErrorMessage&&(null==
+a||null==b||-1==a.indexOf("Script error")&&-1==a.indexOf("extension"))&&null!=a&&0>a.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=a;var f=0<=a.indexOf("NetworkError")||0<=a.indexOf("SecurityError")||0<=a.indexOf("NS_ERROR_FAILURE")||0<=a.indexOf("out of memory")?"CONFIG":"SEVERE",k=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=k+"/log?severity="+f+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(a)+":url:"+encodeURIComponent(window.location.href)+
+":lnum:"+encodeURIComponent(c)+(null!=d?":colno:"+encodeURIComponent(d):"")+(null!=e&&null!=e.stack?"&stack="+encodeURIComponent(e.stack):"")}}catch(x){}};EditorUi.logEvent=function(a){if("1"==urlParams.dev)EditorUi.debug("logEvent",a);else if(EditorUi.enableLogging)try{var b=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=b+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=a?"&data="+encodeURIComponent(JSON.stringify(a)):"")}catch(n){}};EditorUi.sendReport=function(a,
+b){if("1"==urlParams.dev)EditorUi.debug("sendReport",a);else if(EditorUi.enableLogging)try{b=null!=b?b:5E4,a.length>b&&(a=a.substring(0,b)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(a))}catch(n){}};EditorUi.debug=function(){if(null!=window.console&&"1"==urlParams.test){for(var a=[(new Date).toISOString()],b=0;b<arguments.length;b++)a.push(arguments[b]);console.log.apply(console,
a)}};EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.scratchpadHelpLink="https://desk.draw.io/support/solutions/articles/16000042367";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.sidebarFooterHeight=36;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.svgBrokenImage=Graph.createSvgImage(10,
10,'<rect x="0" y="0" width="10" height="10" stroke="#000" fill="transparent"/><path d="m 0 0 L 10 10 L 0 10 L 10 0" stroke="#000" fill="transparent"/>');EditorUi.prototype.crossOriginImages=!mxClient.IS_IE;EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.printPdfExport=!1;EditorUi.prototype.pdfPageExport=
@@ -7886,17 +7887,17 @@ EditorUi.prototype.mode=null;EditorUi.prototype.sidebarFooterHeight=36;EditorUi.
a&&6<a.length}catch(u){}};c.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(q){}try{b=document.createElement("canvas");b.width=b.height=1;var d=b.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=null!==d.match("image/jpeg")}catch(q){}})();
EditorUi.prototype.openLink=function(a,b,c){return this.editor.graph.openLink(a,b,c)};EditorUi.prototype.showSplash=function(a){};EditorUi.prototype.getLocalData=function(a,b){b(localStorage.getItem(a))};EditorUi.prototype.setLocalData=function(a,b,c){localStorage.setItem(a,b);null!=c&&c()};EditorUi.prototype.removeLocalData=function(a,b){localStorage.removeItem(a);b()};EditorUi.prototype.setMathEnabled=function(a){this.editor.graph.mathEnabled=a;this.editor.updateGraphComponents();this.editor.graph.refresh();
this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(a){return this.editor.graph.mathEnabled};EditorUi.prototype.isAppCache=function(){return"1"==urlParams.appcache||this.isOfflineApp()};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(){return this.isOfflineApp()||!navigator.onLine||"1"==urlParams.stealth};EditorUi.prototype.createSpinner=function(a,b,c){c=null!=c?c:24;var f=new Spinner({lines:12,
-length:c,width:Math.round(c/3),radius:Math.round(c/2),rotate:0,color:"dark"==uiTheme?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),d=f.spin;f.spin=function(c,h){var m=!1;this.active||(d.call(this,c),this.active=!0,null!=h&&(m=document.createElement("div"),m.style.position="absolute",m.style.whiteSpace="nowrap",m.style.background="#4B4243",m.style.color="white",m.style.fontFamily="Helvetica, Arial",m.style.fontSize="9pt",m.style.padding="6px",m.style.paddingLeft="10px",m.style.paddingRight=
-"10px",m.style.zIndex=2E9,m.style.left=Math.max(0,a)+"px",m.style.top=Math.max(0,b+70)+"px",mxUtils.setPrefixedStyle(m.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(m.style,"transform","translate(-50%,-50%)"),"dark"!=uiTheme&&mxUtils.setPrefixedStyle(m.style,"boxShadow","2px 2px 3px 0px #ddd"),"..."!=h.substring(h.length-3,h.length)&&(h+="..."),m.innerHTML=h,c.appendChild(m),f.status=m,mxClient.IS_VML&&(null==document.documentMode||8>=document.documentMode)&&(m.style.left=Math.round(Math.max(0,
-a-m.offsetWidth/2))+"px",m.style.top=Math.round(Math.max(0,b+70-m.offsetHeight/2))+"px")),this.pause=mxUtils.bind(this,function(){var a=function(){};this.active&&(a=mxUtils.bind(this,function(){this.spin(c,h)}));this.stop();return a}),m=!0);return m};var h=f.stop;f.stop=function(){h.call(this);this.active=!1;null!=f.status&&(f.status.parentNode.removeChild(f.status),f.status=null)};f.pause=function(){return function(){}};return f};EditorUi.parsePng=function(a,b,c){function f(a,b){var c=h;h+=b;return a.substring(c,
-h)}function d(a){a=f(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}var h=0;if(f(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=c&&c();else if(f(a,4),"IHDR"!=f(a,4))null!=c&&c();else{f(a,17);do{c=d(a);var m=f(a,4);if(null!=b&&b(h-8,m,c))break;value=f(a,c);f(a,4);if("IEND"==m)break}while(c)}};EditorUi.prototype.isCompatibleString=function(a){try{var b=mxUtils.parseXml(a),c=this.editor.extractGraphModel(b.documentElement,!0);
+length:c,width:Math.round(c/3),radius:Math.round(c/2),rotate:0,color:"dark"==uiTheme?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),d=f.spin;f.spin=function(c,k){var e=!1;this.active||(d.call(this,c),this.active=!0,null!=k&&(e=document.createElement("div"),e.style.position="absolute",e.style.whiteSpace="nowrap",e.style.background="#4B4243",e.style.color="white",e.style.fontFamily="Helvetica, Arial",e.style.fontSize="9pt",e.style.padding="6px",e.style.paddingLeft="10px",e.style.paddingRight=
+"10px",e.style.zIndex=2E9,e.style.left=Math.max(0,a)+"px",e.style.top=Math.max(0,b+70)+"px",mxUtils.setPrefixedStyle(e.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(e.style,"transform","translate(-50%,-50%)"),"dark"!=uiTheme&&mxUtils.setPrefixedStyle(e.style,"boxShadow","2px 2px 3px 0px #ddd"),"..."!=k.substring(k.length-3,k.length)&&(k+="..."),e.innerHTML=k,c.appendChild(e),f.status=e,mxClient.IS_VML&&(null==document.documentMode||8>=document.documentMode)&&(e.style.left=Math.round(Math.max(0,
+a-e.offsetWidth/2))+"px",e.style.top=Math.round(Math.max(0,b+70-e.offsetHeight/2))+"px")),this.pause=mxUtils.bind(this,function(){var a=function(){};this.active&&(a=mxUtils.bind(this,function(){this.spin(c,k)}));this.stop();return a}),e=!0);return e};var k=f.stop;f.stop=function(){k.call(this);this.active=!1;null!=f.status&&(f.status.parentNode.removeChild(f.status),f.status=null)};f.pause=function(){return function(){}};return f};EditorUi.parsePng=function(a,b,c){function f(a,b){var c=k;k+=b;return a.substring(c,
+k)}function d(a){a=f(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}var k=0;if(f(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=c&&c();else if(f(a,4),"IHDR"!=f(a,4))null!=c&&c();else{f(a,17);do{c=d(a);var e=f(a,4);if(null!=b&&b(k-8,e,c))break;value=f(a,c);f(a,4);if("IEND"==e)break}while(c)}};EditorUi.prototype.isCompatibleString=function(a){try{var b=mxUtils.parseXml(a),c=this.editor.extractGraphModel(b.documentElement,!0);
return null!=c&&0==c.getElementsByTagName("parsererror").length}catch(p){}return!1};var a=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(b){var c=a.apply(this,arguments);if(null==c)try{var f=b.indexOf("&lt;mxfile ");if(0<=f){var d=b.lastIndexOf("&lt;/mxfile&gt;");d>f&&(c=b.substring(f,d+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var e=mxUtils.parseXml(b),g=this.editor.extractGraphModel(e.documentElement,
null!=this.pages||"hidden"==this.diagramContainer.style.visibility),c=null!=g?mxUtils.getXml(g):""}catch(v){}return c};EditorUi.prototype.validateFileData=function(a){if(null!=a&&0<a.length){var b=a.indexOf('<meta charset="utf-8">');0<=b&&(a=a.slice(0,b)+'<meta charset="utf-8"/>'+a.slice(b+23-1,a.length));a=this.editor.graph.zapGremlins(a)}return a};EditorUi.prototype.replaceFileData=function(a){a=this.validateFileData(a);a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var b=null!=
a?this.editor.extractGraphModel(a,!0):null;null!=b&&(a=b);if(null!=a){b=this.editor.graph;b.model.beginUpdate();try{var c=null!=this.pages?this.pages.slice():null,f=a.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<f.length||1==f.length&&f[0].hasAttribute("name")){this.fileNode=a;this.pages=null!=this.pages?this.pages:[];for(var d=f.length-1;0<=d;d--){var e=this.updatePageRoot(new DiagramPage(f[d]));null==e.getName()&&e.setName(mxResources.get("pageWithNumber",[d+1]));b.model.execute(new ChangePage(this,
e,0==d?e:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=a.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),b.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(a),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=c)for(d=0;d<c.length;d++)b.model.execute(new ChangePage(this,
-c[d],null))}finally{b.model.endUpdate()}}};EditorUi.prototype.createFileData=function(a,b,c,d,e,g,k,l,t,w){b=null!=b?b:this.editor.graph;e=null!=e?e:!1;t=null!=t?t:!0;var f,h=null;null==c||c.getMode()==App.MODE_DEVICE||c.getMode()==App.MODE_BROWSER?f="_blank":h=f=d;if(null==a)return"";var m=a;if("mxfile"!=m.nodeName.toLowerCase()){var p=b.zapGremlins(mxUtils.getXml(a)),m=b.compress(p);if(b.decompress(m)!=p)return p;p=a.ownerDocument.createElement("diagram");p.setAttribute("id",Editor.guid());mxUtils.setTextContent(p,
-m);m=a.ownerDocument.createElement("mxfile");m.appendChild(p)}w?(m=m.cloneNode(!0),m.removeAttribute("userAgent"),m.removeAttribute("version"),m.removeAttribute("editor"),m.removeAttribute("type")):(m.removeAttribute("userAgent"),m.removeAttribute("version"),m.removeAttribute("editor"),m.removeAttribute("type"),m.setAttribute("modified",(new Date).toISOString()),m.setAttribute("host",window.location.hostname),m.setAttribute("agent",navigator.userAgent),m.setAttribute("version",EditorUi.VERSION),m.setAttribute("etag",
-Editor.guid()),a=null!=c?c.getMode():this.mode,null!=a&&m.setAttribute("type",a));a=mxUtils.getXml(m);if(!g&&!e&&(k||null!=c&&/(\.html)$/i.test(c.getTitle())))a=this.getHtml2(mxUtils.getXml(m),b,null!=c?c.getTitle():null,f,h);else if(g||!e&&null!=c&&/(\.svg)$/i.test(c.getTitle()))null==c||c.getMode()!=App.MODE_DEVICE&&c.getMode()!=App.MODE_BROWSER||(d=null),a=this.getEmbeddedSvg(a,b,d,null,l,t,h);return a};EditorUi.prototype.getXmlFileData=function(a,b){a=null!=a?a:!0;b=null!=b?b:!1;var c=this.editor.getGraphXml(a);
+c[d],null))}finally{b.model.endUpdate()}}};EditorUi.prototype.createFileData=function(a,b,c,d,e,g,h,l,t,w){b=null!=b?b:this.editor.graph;e=null!=e?e:!1;t=null!=t?t:!0;var f,k=null;null==c||c.getMode()==App.MODE_DEVICE||c.getMode()==App.MODE_BROWSER?f="_blank":k=f=d;if(null==a)return"";var n=a;if("mxfile"!=n.nodeName.toLowerCase()){var p=b.zapGremlins(mxUtils.getXml(a)),n=b.compress(p);if(b.decompress(n)!=p)return p;p=a.ownerDocument.createElement("diagram");p.setAttribute("id",Editor.guid());mxUtils.setTextContent(p,
+n);n=a.ownerDocument.createElement("mxfile");n.appendChild(p)}w?(n=n.cloneNode(!0),n.removeAttribute("userAgent"),n.removeAttribute("version"),n.removeAttribute("editor"),n.removeAttribute("type")):(n.removeAttribute("userAgent"),n.removeAttribute("version"),n.removeAttribute("editor"),n.removeAttribute("type"),n.setAttribute("modified",(new Date).toISOString()),n.setAttribute("host",window.location.hostname),n.setAttribute("agent",navigator.userAgent),n.setAttribute("version",EditorUi.VERSION),n.setAttribute("etag",
+Editor.guid()),a=null!=c?c.getMode():this.mode,null!=a&&n.setAttribute("type",a));a=mxUtils.getXml(n);if(!g&&!e&&(h||null!=c&&/(\.html)$/i.test(c.getTitle())))a=this.getHtml2(mxUtils.getXml(n),b,null!=c?c.getTitle():null,f,k);else if(g||!e&&null!=c&&/(\.svg)$/i.test(c.getTitle()))null==c||c.getMode()!=App.MODE_DEVICE&&c.getMode()!=App.MODE_BROWSER||(d=null),a=this.getEmbeddedSvg(a,b,d,null,l,t,k);return a};EditorUi.prototype.getXmlFileData=function(a,b){a=null!=a?a:!0;b=null!=b?b:!1;var c=this.editor.getGraphXml(a);
if(a&&null!=this.fileNode&&null!=this.currentPage)if(c=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(c))),mxUtils.setTextContent(this.currentPage.node,c),c=this.fileNode.cloneNode(!1),b)c.appendChild(this.currentPage.node);else for(var f=0;f<this.pages.length;f++){if(this.currentPage!=this.pages[f]&&this.pages[f].needsUpdate){var d=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(this.pages[f].root));this.editor.graph.saveViewState(this.pages[f].viewState,
d);mxUtils.setTextContent(this.pages[f].node,this.editor.graph.compressNode(d));delete this.pages[f].needsUpdate}c.appendChild(this.pages[f].node)}return c};EditorUi.prototype.anonymizeString=function(a){for(var b=[],c=0;c<a.length;c++){var f=a.charAt(c);0<=EditorUi.ignoredAnonymizedChars.indexOf(f)?b.push(f):isNaN(parseInt(f))?f.toLowerCase()!=f?b.push(String.fromCharCode(65+Math.round(25*Math.random()))):f.toUpperCase()!=f?b.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(f)?
b.push(" "):b.push("?"):b.push(Math.round(9*Math.random()))}return b.join("")};EditorUi.prototype.anonymizePatch=function(a){if(null!=a[EditorUi.DIFF_INSERT])for(var b=0;b<a[EditorUi.DIFF_INSERT].length;b++)try{var c=mxUtils.parseXml(a[EditorUi.DIFF_INSERT][b].data).documentElement.cloneNode(!1);null!=c.getAttribute("name")&&c.setAttribute("name",this.anonymizeString(c.getAttribute("name")));a[EditorUi.DIFF_INSERT][b].data=mxUtils.getXml(c)}catch(u){a[EditorUi.DIFF_INSERT][b].data=u.message}if(null!=
@@ -7904,30 +7905,30 @@ a[EditorUi.DIFF_UPDATE]){for(var f in a[EditorUi.DIFF_UPDATE]){var d=a[EditorUi.
b(EditorUi.DIFF_INSERT),b(EditorUi.DIFF_UPDATE),0==Object.keys(d.cells).length&&delete d.cells);0==Object.keys(d).length&&delete a[EditorUi.DIFF_UPDATE][f]}0==Object.keys(a[EditorUi.DIFF_UPDATE]).length&&delete a[EditorUi.DIFF_UPDATE]}return a};EditorUi.prototype.anonymizeAttributes=function(a){if(null!=a.attributes)for(var b=0;b<a.attributes.length;b++)"as"!=a.attributes[b].name&&a.setAttribute(a.attributes[b].name,this.anonymizeString(a.attributes[b].value));if(null!=a.childNodes)for(b=0;b<a.childNodes.length;b++)this.anonymizeAttributes(a.childNodes[b])};
EditorUi.prototype.anonymizeNode=function(a){for(var b=a.getElementsByTagName("mxCell"),c=0;c<b.length;c++)null!=b[c].getAttribute("value")&&b[c].setAttribute("value","["+b[c].getAttribute("value").length+"]"),null!=b[c].getAttribute("style")&&b[c].setAttribute("style","["+b[c].getAttribute("style").length+"]"),null!=b[c].parentNode&&"root"!=b[c].parentNode.nodeName&&null!=b[c].parentNode.parentNode&&(b[c].setAttribute("id",b[c].parentNode.getAttribute("id")),b[c].parentNode.parentNode.replaceChild(b[c],
b[c].parentNode));b=a.getElementsByTagName("mxGeometry");for(c=0;c<b.length;c++)this.anonymizeAttributes(b[c]);return a};EditorUi.prototype.synchronizeCurrentFile=function(a){var b=this.getCurrentFile();null!=b&&(b.savingFile?this.handleError({message:mxResources.get("busy")}):!a&&b.invalidChecksum?b.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(b.clearAutosave(),this.editor.setStatus(""),a?b.reloadFile(mxUtils.bind(this,function(){b.handleFileSuccess("manual"==
-DrawioFile.SYNC)}),mxUtils.bind(this,function(a){b.handleFileError(a,!0)})):b.synchronizeFile(mxUtils.bind(this,function(){b.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){b.handleFileError(a,!0)}))))};EditorUi.prototype.getFileData=function(a,b,c,d,e,g,k,l,t){e=null!=e?e:!0;k=null!=k?k:this.getXmlFileData(e,null!=g?g:!1);t=null!=t?t:this.getCurrentFile();g=this.editor.graph;if(null!=this.pages&&this.currentPage!=this.pages[0]&&(b||!a&&null!=t&&/(\.svg)$/i.test(t.getTitle()))){g=
-this.createTemporaryGraph(g.getStylesheet());var f=g.getGlobalVariable,h=this.pages[0];g.getGlobalVariable=function(a){return"page"==a?h.getName():"pagenumber"==a?1:f.apply(this,arguments)};document.body.appendChild(g.container);g.model.setRoot(h.root)}a=this.createFileData(k,g,t,window.location.href,a,b,c,d,e,l);g!=this.editor.graph&&g.container.parentNode.removeChild(g.container);return a};EditorUi.prototype.getHtml=function(a,b,c,d,e,g){g=null!=g?g:!0;var f=null,h="https://www.draw.io/js/embed-static.min.js";
-if(null!=b){var f=g?b.getGraphBounds():b.getBoundingBox(b.getSelectionCells()),m=b.view.scale;g=Math.floor(f.x/m-b.view.translate.x);m=Math.floor(f.y/m-b.view.translate.y);f=b.background;null==e&&(b=this.getBasenames().join(";"),0<b.length&&(h="https://www.draw.io/embed.js?s="+b));a.setAttribute("x0",g);a.setAttribute("y0",m)}null!=a&&(a.setAttribute("pan","1"),a.setAttribute("zoom","1"),a.setAttribute("resize","0"),a.setAttribute("fit","0"),a.setAttribute("border","20"),a.setAttribute("links","1"),
+DrawioFile.SYNC)}),mxUtils.bind(this,function(a){b.handleFileError(a,!0)})):b.synchronizeFile(mxUtils.bind(this,function(){b.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){b.handleFileError(a,!0)}))))};EditorUi.prototype.getFileData=function(a,b,c,d,e,g,h,l,t){e=null!=e?e:!0;h=null!=h?h:this.getXmlFileData(e,null!=g?g:!1);t=null!=t?t:this.getCurrentFile();g=this.editor.graph;if(null!=this.pages&&this.currentPage!=this.pages[0]&&(b||!a&&null!=t&&/(\.svg)$/i.test(t.getTitle()))){g=
+this.createTemporaryGraph(g.getStylesheet());var f=g.getGlobalVariable,k=this.pages[0];g.getGlobalVariable=function(a){return"page"==a?k.getName():"pagenumber"==a?1:f.apply(this,arguments)};document.body.appendChild(g.container);g.model.setRoot(k.root)}a=this.createFileData(h,g,t,window.location.href,a,b,c,d,e,l);g!=this.editor.graph&&g.container.parentNode.removeChild(g.container);return a};EditorUi.prototype.getHtml=function(a,b,c,d,e,g){g=null!=g?g:!0;var f=null,k="https://www.draw.io/js/embed-static.min.js";
+if(null!=b){var f=g?b.getGraphBounds():b.getBoundingBox(b.getSelectionCells()),n=b.view.scale;g=Math.floor(f.x/n-b.view.translate.x);n=Math.floor(f.y/n-b.view.translate.y);f=b.background;null==e&&(b=this.getBasenames().join(";"),0<b.length&&(k="https://www.draw.io/embed.js?s="+b));a.setAttribute("x0",g);a.setAttribute("y0",n)}null!=a&&(a.setAttribute("pan","1"),a.setAttribute("zoom","1"),a.setAttribute("resize","0"),a.setAttribute("fit","0"),a.setAttribute("border","20"),a.setAttribute("links","1"),
null!=d&&a.setAttribute("edit",d));null!=e&&(e=e.replace(/&/g,"&amp;"));a=null!=a?this.editor.graph.zapGremlins(mxUtils.getXml(a)):"";d=this.editor.graph.compress(a);this.editor.graph.decompress(d)!=a&&(d=encodeURIComponent(a));return(null==e?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=e?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==e?null!=c?"<title>"+mxUtils.htmlEntities(c)+"</title>\n":"":"<title>Draw.io Diagram</title>\n")+
-(null!=e?'<meta http-equiv="refresh" content="0;URL=\''+e+"'\"/>\n":"")+"</head>\n<body"+(null==e&&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;">'+d+"</div>\n</div>\n"+(null==e?'<script type="text/javascript" src="'+h+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+e+'" target="_blank"><img border="0" src="https://www.draw.io/images/drawlogo128.png"/></a>')+
+(null!=e?'<meta http-equiv="refresh" content="0;URL=\''+e+"'\"/>\n":"")+"</head>\n<body"+(null==e&&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;">'+d+"</div>\n</div>\n"+(null==e?'<script type="text/javascript" src="'+k+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+e+'" target="_blank"><img border="0" src="https://www.draw.io/images/drawlogo128.png"/></a>')+
"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(a,b,c,d,e){null!=e&&(e=e.replace(/&/g,"&amp;"));a={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:this.editor.graph.zapGremlins(a),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(a.page=mxUtils.indexOf(this.pages,this.currentPage));return(null==e?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=e?' xmlns="http://www.w3.org/1999/xhtml">':
">")+"\n<head>\n"+(null==e?null!=c?"<title>"+mxUtils.htmlEntities(c)+"</title>\n":"":"<title>Draw.io Diagram</title>\n")+(null!=e?'<meta http-equiv="refresh" content="0;URL=\''+e+"'\"/>\n":"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(a))+'"></div>\n'+(null==e?'<script type="text/javascript" src="https://www.draw.io/js/viewer.min.js">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+
e+'" target="_blank"><img border="0" src="https://www.draw.io/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(a){a=this.validateFileData(a);this.pages=this.fileNode=this.currentPage=null;a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var b=null!=a?a.getElementsByTagName("parsererror"):null;if(null!=b&&0<b.length)throw a=mxResources.get("invalidOrMissingFile"),b=b[0].getElementsByTagName("div"),0<b.length&&(a=mxUtils.getTextContent(b[0])),
Error(a);b=null!=a?this.editor.extractGraphModel(a,!0):null;null!=b&&(a=b);if(null!=a&&"mxfile"==a.nodeName&&(b=a.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<b.length||1==b.length&&b[0].hasAttribute("name"))){this.fileNode=a;this.pages=[];for(a=0;a<b.length;a++){null==b[a].getAttribute("id")&&b[a].setAttribute("id",a);var c=new DiagramPage(b[a]);null==c.getName()&&c.setName(mxResources.get("pageWithNumber",[a+1]));this.pages.push(c)}this.currentPage=this.pages[Math.max(0,Math.min(this.pages.length-
1,urlParams.page||0))];a=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=a&&(this.fileNode=a.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(a);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root)};EditorUi.prototype.getBaseFilename=function(a){var b=this.getCurrentFile(),
-b=null!=b&&null!=b.getTitle()?b.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(b)||/(\.html)$/i.test(b)||/(\.svg)$/i.test(b)||/(\.png)$/i.test(b))b=b.substring(0,b.lastIndexOf("."));!a&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(b=b+"-"+this.currentPage.getName());return b};EditorUi.prototype.downloadFile=function(a,b,c,d,e,g,k){try{d=null!=d?d:this.editor.graph.isSelectionEmpty();var f=
-this.getBaseFilename(!e),h=f+"."+a;if("xml"==a){var m='<?xml version="1.0" encoding="UTF-8"?>\n'+(b?mxUtils.getXml(this.editor.getGraphXml(d)):this.getFileData(!0,null,null,null,d,e));this.saveData(h,a,m,"text/xml")}else if("html"==a)m=this.getHtml2(this.getFileData(!0),this.editor.graph,f),this.saveData(h,a,m,"text/html");else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==a?h=f+".png":"jpeg"==a&&(h=f+".jpg"),this.saveRequest(h,a,mxUtils.bind(this,
-function(b,c){try{var f=this.editor.graph.pageVisible;null!=g&&(this.editor.graph.pageVisible=g);var h=this.createDownloadRequest(b,a,d,c,k,e);this.editor.graph.pageVisible=f;return h}catch(A){this.handleError(A)}}));else{var p=null,q=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(h,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(p)}))});if("svg"==a){var v=this.editor.graph.background;
-if(k||v==mxConstants.NONE)v=null;var l=this.editor.graph.getSvg(v,null,null,null,null,d);c&&this.editor.graph.addSvgShadow(l);this.convertImages(l,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();q('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a))})))}else h=f+".svg",p=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();q(a)}),d)}}catch(G){this.handleError(G)}};
-EditorUi.prototype.createDownloadRequest=function(a,b,c,d,e,g){var f=this.editor.graph.getGraphBounds();c=this.getFileData(!0,null,null,null,c,0==g?!1:"xmlpng"!=b);var h="",m="";if(f.width*f.height>MAX_AREA||c.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};f="0";"pdf"==b&&0==g&&(m="&allPages=1");if("xmlpng"==b&&(f="1",b="png",null!=this.pages&&null!=this.currentPage))for(g=0;g<this.pages.length;g++)if(this.pages[g]==this.currentPage){h="&from="+g;break}g=this.editor.graph.background;
-"png"==b&&e&&(g=mxConstants.NONE);return new mxXmlRequest(EXPORT_URL,"format="+b+h+m+"&bg="+(null!=g?g:mxConstants.NONE)+"&base64="+d+"&embedXml="+f+"&xml="+encodeURIComponent(c)+(null!=a?"&filename="+encodeURIComponent(a):""))};EditorUi.prototype.setMode=function(a,b){this.mode=a};EditorUi.prototype.loadDescriptor=function(a,b,c){var f=window.location.hash,d=mxUtils.bind(this,function(c){var d=null!=a.data?a.data:"";null!=c&&0<c.length&&(0<d.length&&(d+="\n"),d+=c);c=new LocalFile(this,"csv"!=a.format&&
-0<d.length?d:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);c.getHash=function(){return f};this.fileLoaded(c);"csv"==a.format&&this.importCsv(d,mxUtils.bind(this,function(a){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=a.update){var h=null!=a.interval?parseInt(a.interval):6E4,e=null,m=mxUtils.bind(this,function(){var b=this.currentPage;mxUtils.post(a.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),
-mxUtils.bind(this,function(a){b===this.currentPage&&(200<=a.getStatus()&&300>=a.getStatus()?(this.updateDiagram(a.getText()),g()):this.handleError({message:mxResources.get("error")+" "+a.getStatus()}))}),mxUtils.bind(this,function(a){this.handleError(a)}))}),g=mxUtils.bind(this,function(){window.clearTimeout(e);e=window.setTimeout(m,h)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){g();m()}));g();m()}null!=b&&b()});if(null!=a.url&&0<a.url.length){var h=a.url;/^https?:\/\//.test(h)&&
-!this.isCorsEnabledForUrl(h)&&(h=PROXY_URL+"?url="+encodeURIComponent(h));this.loadUrl(h,mxUtils.bind(this,function(a){d(a)}),mxUtils.bind(this,function(a){null!=c&&c(a)}))}else d("")};EditorUi.prototype.updateDiagram=function(a){function b(a){var b=new mxCellOverlay(a.image||d.warningImage,a.tooltip,a.align,a.valign,a.offset);b.addListener(mxEvent.CLICK,function(b,c){f.alert(a.tooltip)});return b}var c=null,f=this;if(null!=a&&0<a.length&&(c=mxUtils.parseXml(a),a=null!=c?c.documentElement:null,null!=
-a&&"updates"==a.nodeName)){var d=this.editor.graph,e=d.getModel();e.beginUpdate();var g=null;try{for(a=a.firstChild;null!=a;){if("update"==a.nodeName){var k=e.getCell(a.getAttribute("id"));if(null!=k){try{var t=a.getAttribute("value");if(null!=t){var l=mxUtils.parseXml(t).documentElement;if(null!=l)if("1"==l.getAttribute("replace-value"))e.setValue(k,l);else for(var n=l.attributes,C=0;C<n.length;C++)d.setAttributeForCell(k,n[C].nodeName,0<n[C].nodeValue.length?n[C].nodeValue:null)}}catch(E){null!=
-window.console&&console.log("Error in value for "+k.id+": "+E)}try{var y=a.getAttribute("style");null!=y&&d.model.setStyle(k,y)}catch(E){null!=window.console&&console.log("Error in style for "+k.id+": "+E)}try{var z=a.getAttribute("icon");if(null!=z){var G=0<z.length?JSON.parse(z):null;null!=G&&G.append||d.removeCellOverlays(k);null!=G&&d.addCellOverlay(k,b(G))}}catch(E){null!=window.console&&console.log("Error in icon for "+k.id+": "+E)}try{var B=a.getAttribute("geometry");if(null!=B){var B=JSON.parse(B),
-F=d.getCellGeometry(k);if(null!=F){F=F.clone();for(key in B){var I=parseFloat(B[key]);"dx"==key?F.x+=I:"dy"==key?F.y+=I:"dw"==key?F.width+=I:"dh"==key?F.height+=I:F[key]=parseFloat(B[key])}d.model.setGeometry(k,F)}}}catch(E){null!=window.console&&console.log("Error in icon for "+k.id+": "+E)}}}else if("model"==a.nodeName){for(var A=a.firstChild;null!=A&&A.nodeType!=mxConstants.NODETYPE_ELEMENT;)A=A.nextSibling;null!=A&&(new mxCodec(a.firstChild)).decode(A,e)}else if("view"==a.nodeName){if(a.hasAttribute("scale")&&
+b=null!=b&&null!=b.getTitle()?b.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(b)||/(\.html)$/i.test(b)||/(\.svg)$/i.test(b)||/(\.png)$/i.test(b))b=b.substring(0,b.lastIndexOf("."));!a&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(b=b+"-"+this.currentPage.getName());return b};EditorUi.prototype.downloadFile=function(a,b,c,d,e,g,h){try{d=null!=d?d:this.editor.graph.isSelectionEmpty();var f=
+this.getBaseFilename(!e),k=f+"."+a;if("xml"==a){var n='<?xml version="1.0" encoding="UTF-8"?>\n'+(b?mxUtils.getXml(this.editor.getGraphXml(d)):this.getFileData(!0,null,null,null,d,e));this.saveData(k,a,n,"text/xml")}else if("html"==a)n=this.getHtml2(this.getFileData(!0),this.editor.graph,f),this.saveData(k,a,n,"text/html");else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==a?k=f+".png":"jpeg"==a&&(k=f+".jpg"),this.saveRequest(k,a,mxUtils.bind(this,
+function(b,c){try{var f=this.editor.graph.pageVisible;null!=g&&(this.editor.graph.pageVisible=g);var k=this.createDownloadRequest(b,a,d,c,h,e);this.editor.graph.pageVisible=f;return k}catch(A){this.handleError(A)}}));else{var p=null,q=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(k,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(p)}))});if("svg"==a){var v=this.editor.graph.background;
+if(h||v==mxConstants.NONE)v=null;var l=this.editor.graph.getSvg(v,null,null,null,null,d);c&&this.editor.graph.addSvgShadow(l);this.convertImages(l,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();q('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a))})))}else k=f+".svg",p=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();q(a)}),d)}}catch(G){this.handleError(G)}};
+EditorUi.prototype.createDownloadRequest=function(a,b,c,d,e,g){var f=this.editor.graph.getGraphBounds();c=this.getFileData(!0,null,null,null,c,0==g?!1:"xmlpng"!=b);var k="",n="";if(f.width*f.height>MAX_AREA||c.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};f="0";"pdf"==b&&0==g&&(n="&allPages=1");if("xmlpng"==b&&(f="1",b="png",null!=this.pages&&null!=this.currentPage))for(g=0;g<this.pages.length;g++)if(this.pages[g]==this.currentPage){k="&from="+g;break}g=this.editor.graph.background;
+"png"==b&&e&&(g=mxConstants.NONE);return new mxXmlRequest(EXPORT_URL,"format="+b+k+n+"&bg="+(null!=g?g:mxConstants.NONE)+"&base64="+d+"&embedXml="+f+"&xml="+encodeURIComponent(c)+(null!=a?"&filename="+encodeURIComponent(a):""))};EditorUi.prototype.setMode=function(a,b){this.mode=a};EditorUi.prototype.loadDescriptor=function(a,b,c){var f=window.location.hash,d=mxUtils.bind(this,function(c){var d=null!=a.data?a.data:"";null!=c&&0<c.length&&(0<d.length&&(d+="\n"),d+=c);c=new LocalFile(this,"csv"!=a.format&&
+0<d.length?d:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);c.getHash=function(){return f};this.fileLoaded(c);"csv"==a.format&&this.importCsv(d,mxUtils.bind(this,function(a){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=a.update){var e=null!=a.interval?parseInt(a.interval):6E4,k=null,n=mxUtils.bind(this,function(){var b=this.currentPage;mxUtils.post(a.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),
+mxUtils.bind(this,function(a){b===this.currentPage&&(200<=a.getStatus()&&300>=a.getStatus()?(this.updateDiagram(a.getText()),g()):this.handleError({message:mxResources.get("error")+" "+a.getStatus()}))}),mxUtils.bind(this,function(a){this.handleError(a)}))}),g=mxUtils.bind(this,function(){window.clearTimeout(k);k=window.setTimeout(n,e)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){g();n()}));g();n()}null!=b&&b()});if(null!=a.url&&0<a.url.length){var e=a.url;/^https?:\/\//.test(e)&&
+!this.isCorsEnabledForUrl(e)&&(e=PROXY_URL+"?url="+encodeURIComponent(e));this.loadUrl(e,mxUtils.bind(this,function(a){d(a)}),mxUtils.bind(this,function(a){null!=c&&c(a)}))}else d("")};EditorUi.prototype.updateDiagram=function(a){function b(a){var b=new mxCellOverlay(a.image||d.warningImage,a.tooltip,a.align,a.valign,a.offset);b.addListener(mxEvent.CLICK,function(b,c){f.alert(a.tooltip)});return b}var c=null,f=this;if(null!=a&&0<a.length&&(c=mxUtils.parseXml(a),a=null!=c?c.documentElement:null,null!=
+a&&"updates"==a.nodeName)){var d=this.editor.graph,e=d.getModel();e.beginUpdate();var g=null;try{for(a=a.firstChild;null!=a;){if("update"==a.nodeName){var h=e.getCell(a.getAttribute("id"));if(null!=h){try{var t=a.getAttribute("value");if(null!=t){var l=mxUtils.parseXml(t).documentElement;if(null!=l)if("1"==l.getAttribute("replace-value"))e.setValue(h,l);else for(var m=l.attributes,B=0;B<m.length;B++)d.setAttributeForCell(h,m[B].nodeName,0<m[B].nodeValue.length?m[B].nodeValue:null)}}catch(E){null!=
+window.console&&console.log("Error in value for "+h.id+": "+E)}try{var y=a.getAttribute("style");null!=y&&d.model.setStyle(h,y)}catch(E){null!=window.console&&console.log("Error in style for "+h.id+": "+E)}try{var z=a.getAttribute("icon");if(null!=z){var G=0<z.length?JSON.parse(z):null;null!=G&&G.append||d.removeCellOverlays(h);null!=G&&d.addCellOverlay(h,b(G))}}catch(E){null!=window.console&&console.log("Error in icon for "+h.id+": "+E)}try{var C=a.getAttribute("geometry");if(null!=C){var C=JSON.parse(C),
+F=d.getCellGeometry(h);if(null!=F){F=F.clone();for(key in C){var I=parseFloat(C[key]);"dx"==key?F.x+=I:"dy"==key?F.y+=I:"dw"==key?F.width+=I:"dh"==key?F.height+=I:F[key]=parseFloat(C[key])}d.model.setGeometry(h,F)}}}catch(E){null!=window.console&&console.log("Error in icon for "+h.id+": "+E)}}}else if("model"==a.nodeName){for(var A=a.firstChild;null!=A&&A.nodeType!=mxConstants.NODETYPE_ELEMENT;)A=A.nextSibling;null!=A&&(new mxCodec(a.firstChild)).decode(A,e)}else if("view"==a.nodeName){if(a.hasAttribute("scale")&&
(d.view.scale=parseFloat(a.getAttribute("scale"))),a.hasAttribute("dx")||a.hasAttribute("dy"))d.view.translate=new mxPoint(parseFloat(a.getAttribute("dx")||0),parseFloat(a.getAttribute("dy")||0))}else"fit"==a.nodeName&&(g=a.hasAttribute("max-scale")?parseFloat(a.getAttribute("max-scale")):1);a=a.nextSibling}}finally{e.endUpdate()}null!=g&&this.chromelessResize&&this.chromelessResize(!0,g)}return c};EditorUi.prototype.getCopyFilename=function(a,b){var c=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename,
-f="",d=c.lastIndexOf(".");0<=d&&(f=c.substring(d),c=c.substring(0,d));if(b)var h=new Date,d=h.getFullYear(),e=h.getMonth()+1,g=h.getDate(),t=h.getHours(),k=h.getMinutes(),h=h.getSeconds(),c=c+(" "+(d+"-"+e+"-"+g+"-"+t+"-"+k+"-"+h));return c=mxResources.get("copyOf",[c])+f};EditorUi.prototype.fileLoaded=function(a){var b=this.getCurrentFile();this.fileLoadedError=null;this.setCurrentFile(null);var c=!1;this.hideDialog();null!=b&&(b.removeListener(this.descriptorChangedListener),b.close());this.editor.graph.model.clear();
+f="",d=c.lastIndexOf(".");0<=d&&(f=c.substring(d),c=c.substring(0,d));if(b)var e=new Date,d=e.getFullYear(),k=e.getMonth()+1,g=e.getDate(),t=e.getHours(),h=e.getMinutes(),e=e.getSeconds(),c=c+(" "+(d+"-"+k+"-"+g+"-"+t+"-"+h+"-"+e));return c=mxResources.get("copyOf",[c])+f};EditorUi.prototype.fileLoaded=function(a){var b=this.getCurrentFile();this.fileLoadedError=null;this.setCurrentFile(null);var c=!1;this.hideDialog();null!=b&&(b.removeListener(this.descriptorChangedListener),b.close());this.editor.graph.model.clear();
this.editor.undoManager.clear();var d=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=b&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerHTML="",this.fname.setAttribute("title",mxResources.get("rename")));this.editor.setStatus("");
this.updateUi();this.showSplash()});if(null!=a)try{this.setCurrentFile(a);a.addListener("descriptorChanged",this.descriptorChangedListener);a.addListener("contentChanged",this.descriptorChangedListener);a.open();this.setGraphEnabled(!0);this.setMode(a.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();a.isEditable()?a.isModified()?(a.addUnsavedStatus(),null!=a.backupPatch&&a.patch([a.backupPatch])):this.editor.setStatus(""):
this.editor.setStatus('<span class="geStatusAlert" style="margin-left:8px;">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>");!this.editor.isChromelessView()||this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));c=!0;this.isOffline()||
@@ -7935,31 +7936,31 @@ null==a.getMode()||EditorUi.logEvent({category:"File",action:"open",label:a.getM
(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?v="+encodeURIComponent(EditorUi.VERSION)+"&msg=errorInFileLoaded:url:"+encodeURIComponent(window.location.href)+(null!=q&&null!=q.message?":err:"+encodeURIComponent(q.message):"")+(null!=q&&null!=q.stack?"&stack="+encodeURIComponent(q.stack):"")}catch(u){}this.handleError(q,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=
this.getSearch(["url"]):null!=b?this.fileLoaded(b):d()}),!0)}else d();return c};EditorUi.prototype.isActive=function(){return this.editor.graph.isEditing()||this.editor.graph.isMouseDown||null!=this.dialog};EditorUi.prototype.runWhenIdle=function(a){if(this.isActive()){var b=mxUtils.bind(this,function(){this.isActive()||(this.editor.graph.removeMouseListener(c),this.editor.removeListener("hideDialog",b),this.editor.graph.removeListener(b),null!=window.requestAnimationFrame?window.requestAnimationFrame(a):
a())}),c={mouseDown:function(){},mouseMove:function(){},mouseUp:b};this.editor.graph.addListener(mxEvent.EDITING_STOPPED,b);this.editor.graph.addListener(mxEvent.ESCAPE,b);this.editor.graph.addMouseListener(c);this.editor.addListener("hideDialog",b)}else null!=window.requestAnimationFrame?window.requestAnimationFrame(a):a()};EditorUi.prototype.getHashValueForPages=function(a,b){var c=0,d=new mxGraphModel,f=new mxCodec;null!=b&&(b.byteCount=0,b.attrCount=0,b.eltCount=0,b.nodeCount=0,b.cellCount=0);
-for(var h=0;h<a.length;h++){this.updatePageRoot(a[h]);var e=a[h].node.cloneNode(!1);e.removeAttribute("name");d.root=a[h].root;var g=f.encode(d);this.editor.graph.saveViewState(a[h].viewState,g,!0);e.appendChild(g);null!=b&&(b.eltCount+=e.getElementsByTagName("*").length,b.nodeCount+=e.getElementsByTagName("mxCell").length,b.cellCount+=d.getDescendants(d.root).length);c=(c<<5)-c+this.hashValue(e,function(a,b,c,d){return!d||"mxGeometry"!=a.nodeName&&"mxPoint"!=a.nodeName||"x"!=b&&"y"!=b&&"width"!=
-b&&"height"!=b?d&&"mxCell"==a.nodeName&&"previous"==b?null:c:Math.round(c)},b)<<0}return c};EditorUi.prototype.hashValue=function(a,b,c){var d=0;if("object"===typeof a&&"number"===typeof a.nodeType&&"string"===typeof a.nodeName&&"function"===typeof a.getAttribute){null!=a.nodeName&&(d^=this.hashValue(a.nodeName,b,c));if(null!=a.attributes){null!=c&&(c.attrCount+=a.attributes.length);for(var f=0;f<a.attributes.length;f++){var h=a.attributes[f].name,e=null!=b?b(a,h,a.attributes[f].value,!0):a.attributes[f].value;
-null!=e&&(d^=this.hashValue(h,b,c)+this.hashValue(e,b,c))}}if(null!=a.childNodes)for(f=0;f<a.childNodes.length;f++)d=(d<<5)-d+this.hashValue(a.childNodes[f],b,c)<<0}else if(null!=a&&"function"!==typeof a){a=String(a);b=0;null!=c&&(c.byteCount+=a.length);for(f=0;f<a.length;f++)b=(b<<5)-b+a.charCodeAt(f)<<0;d^=b}return d};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(a,b,c,d,e,g,k){};EditorUi.prototype.isScratchpadEnabled=
+for(var e=0;e<a.length;e++){this.updatePageRoot(a[e]);var k=a[e].node.cloneNode(!1);k.removeAttribute("name");d.root=a[e].root;var g=f.encode(d);this.editor.graph.saveViewState(a[e].viewState,g,!0);k.appendChild(g);null!=b&&(b.eltCount+=k.getElementsByTagName("*").length,b.nodeCount+=k.getElementsByTagName("mxCell").length,b.cellCount+=d.getDescendants(d.root).length);c=(c<<5)-c+this.hashValue(k,function(a,b,c,d){return!d||"mxGeometry"!=a.nodeName&&"mxPoint"!=a.nodeName||"x"!=b&&"y"!=b&&"width"!=
+b&&"height"!=b?d&&"mxCell"==a.nodeName&&"previous"==b?null:c:Math.round(c)},b)<<0}return c};EditorUi.prototype.hashValue=function(a,b,c){var d=0;if("object"===typeof a&&"number"===typeof a.nodeType&&"string"===typeof a.nodeName&&"function"===typeof a.getAttribute){null!=a.nodeName&&(d^=this.hashValue(a.nodeName,b,c));if(null!=a.attributes){null!=c&&(c.attrCount+=a.attributes.length);for(var f=0;f<a.attributes.length;f++){var e=a.attributes[f].name,k=null!=b?b(a,e,a.attributes[f].value,!0):a.attributes[f].value;
+null!=k&&(d^=this.hashValue(e,b,c)+this.hashValue(k,b,c))}}if(null!=a.childNodes)for(f=0;f<a.childNodes.length;f++)d=(d<<5)-d+this.hashValue(a.childNodes[f],b,c)<<0}else if(null!=a&&"function"!==typeof a){a=String(a);b=0;null!=c&&(c.byteCount+=a.length);for(f=0;f<a.length;f++)b=(b<<5)-b+a.charCodeAt(f)<<0;d^=b}return d};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(a,b,c,d,e,g,h){};EditorUi.prototype.isScratchpadEnabled=
function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?this.getLocalData(".scratchpad",mxUtils.bind(this,function(a){null==a&&(a=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,a,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(a){var b=mxUtils.createXmlDocument(),c=b.createElement("mxlibrary");mxUtils.setTextContent(c,JSON.stringify(a));
b.appendChild(c);return mxUtils.getXml(b)};EditorUi.prototype.closeLibrary=function(a){null!=a&&(this.removeLibrarySidebar(a.getHash()),a.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(a.getHash()),".scratchpad"==a.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(a){var b=this.sidebar.palettes[a];if(null!=b){for(var c=0;c<b.length;c++)b[c].parentNode.removeChild(b[c]);delete this.sidebar.palettes[a]}};EditorUi.prototype.repositionLibrary=function(a){var b=
this.sidebar.container;if(null==a){var c=this.sidebar.palettes["L.scratchpad"];null==c&&(c=this.sidebar.palettes.search);null!=c&&(a=c[c.length-1].nextSibling)}a=null!=a?a:b.firstChild.nextSibling.nextSibling;var c=b.lastChild,d=c.previousSibling;b.insertBefore(c,a);b.insertBefore(d,c)};EditorUi.prototype.loadLibrary=function(a){var b=mxUtils.parseXml(a.getData());if("mxlibrary"==b.documentElement.nodeName){var c=JSON.parse(mxUtils.getTextContent(b.documentElement));this.libraryLoaded(a,c,b.documentElement.getAttribute("title"))}else throw{message:mxResources.get("notALibraryFile")};
-};EditorUi.prototype.getLibraryStorageHint=function(a){return""};EditorUi.prototype.libraryLoaded=function(a,b,c){if(null!=this.sidebar){a.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(a.getHash());".scratchpad"==a.title&&(this.scratchpad=a);var d=this.sidebar.palettes[a.getHash()],d=null!=d?d[d.length-1].nextSibling:null;this.removeLibrarySidebar(a.getHash());var f=null,h=mxUtils.bind(this,function(b,c){0==b.length&&a.isEditable()?(null==f&&(f=document.createElement("div"),mxUtils.setPrefixedStyle(f.style,
-"borderRadius","6px"),f.style.border="3px dotted lightGray",f.style.textAlign="center",f.style.padding="8px",f.style.color="#B3B3B3",mxUtils.write(f,mxResources.get("dragElementsHere"))),c.appendChild(f)):this.addLibraryEntries(b,c)});if(null!=this.sidebar&&null!=b)for(var e=0;e<b.length;e++)mxUtils.bind(this,function(a){var b=a.data;null!=b&&null!=a.title?this.sidebar.addEntry(a.title,mxUtils.bind(this,function(){b=this.convertDataUri(b);var c="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";
-"fixed"==a.aspect&&(c+="aspect=fixed;");return this.sidebar.createVertexTemplate(c+"image="+b,a.w,a.h,"",a.title||"",!1,!1,!0)})):null!=a.xml&&null!=a.title&&this.sidebar.addEntry(a.title,mxUtils.bind(this,function(){var b=this.stringToCells(this.editor.graph.decompress(a.xml));return this.sidebar.createVertexTemplateFromCells(b,a.w,a.h,a.title||"",!0,!1,!0)}))})(b[e]);c=null!=c&&0<c.length?c:a.getTitle();var m=this.sidebar.addPalette(a.getHash(),c,!0,mxUtils.bind(this,function(a){h(b,a)}));this.repositionLibrary(d);
-var g=m.parentNode.previousSibling;c=g.getAttribute("title");null!=c&&0<c.length&&".scratchpad"!=a.title&&g.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+c);var k=document.createElement("div");k.style.position="absolute";k.style.right="0px";k.style.top="0px";k.style.padding="8px";mxClient.IS_QUIRKS||8==document.documentMode||(k.style.backgroundColor="inherit");g.style.position="relative";var l=document.createElement("img");l.setAttribute("src",Dialog.prototype.closeImage);l.setAttribute("title",
-mxResources.get("close"));l.setAttribute("valign","absmiddle");l.setAttribute("border","0");l.style.margin="0 3px";var n=null;if(".scratchpad"!=a.title||this.closableScratchpad)k.appendChild(l),mxEvent.addListener(l,"click",mxUtils.bind(this,function(b){if(!mxEvent.isConsumed(b)){var c=mxUtils.bind(this,function(){this.closeLibrary(a)});null!=n?this.confirm(mxResources.get("allChangesLost"),null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c();mxEvent.consume(b)}}));if(a.isEditable()){var y=
-this.editor.graph,z=null,G=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),m,b,a,a.getMode());mxEvent.consume(c)}),B=mxUtils.bind(this,function(c){a.setModified(!0);a.isAutosave()?(null!=z&&null!=z.parentNode&&z.parentNode.removeChild(z),z=l.cloneNode(!1),z.setAttribute("src",Editor.spinImage),z.setAttribute("title",mxResources.get("saving")),z.style.cursor="default",z.style.marginRight="2px",z.style.marginTop="-2px",k.insertBefore(z,k.firstChild),g.style.paddingRight=18*k.childNodes.length+
-"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=z&&null!=z.parentNode&&(z.parentNode.removeChild(z),g.style.paddingRight=18*k.childNodes.length+"px")})):null==n&&(n=l.cloneNode(!1),n.setAttribute("src",IMAGE_PATH+"/download.png"),n.setAttribute("title",mxResources.get("save")),k.insertBefore(n,k.firstChild),mxEvent.addListener(n,"click",mxUtils.bind(this,function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==n||a.isModified()||
-(g.style.paddingRight=18*k.childNodes.length+"px",n.parentNode.removeChild(n),n=null)});mxEvent.consume(c)})),g.style.paddingRight=18*k.childNodes.length+"px")}),F=mxUtils.bind(this,function(a,c,d,h){a=y.cloneCells(mxUtils.sortCells(y.model.getTopmostCells(a)));for(var e=0;e<a.length;e++){var g=y.getCellGeometry(a[e]);null!=g&&g.translate(-c.x,-c.y)}m.appendChild(this.sidebar.createVertexTemplateFromCells(a,c.width,c.height,h||"",!0,!1,!1));a={xml:this.editor.graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),
-w:c.width,h:c.height};null!=h&&(a.title=h);b.push(a);B(d);null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)}),I=mxUtils.bind(this,function(a){if(y.isSelectionEmpty())y.getRubberband().isActive()?(y.getRubberband().execute(a),y.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var b=y.getSelectionCells(),c=y.view.getBounds(b),d=y.view.scale;c.x/=d;c.y/=d;c.width/=d;c.height/=d;c.x-=y.view.translate.x;
-c.y-=y.view.translate.y;F(b,c)}mxEvent.consume(a)});m.style.border="3px solid transparent";mxEvent.addGestureListeners(m,function(){},mxUtils.bind(this,function(a){y.isMouseDown&&null!=y.panningManager&&null!=y.graphHandler.shape&&(y.graphHandler.shape.node.style.visibility="hidden",null!=f?f.style.border="3px dotted rgb(254, 137, 12)":m.style.border="3px dotted rgb(254, 137, 12)",m.style.cursor="copy",y.panningManager.stop(),y.autoScroll=!1,null!=y.graphHandler.guide&&y.graphHandler.guide.setVisible(!1),
-null!=y.graphHandler.hint&&(y.graphHandler.hint.style.visibility="hidden"),mxEvent.consume(a))}),mxUtils.bind(this,function(a){y.isMouseDown&&null!=y.panningManager&&null!=y.graphHandler&&(m.style.border="3px solid transparent",null!=f&&(f.style.border="3px dotted lightGray"),m.style.cursor="default",this.sidebar.showTooltips=!0,y.panningManager.stop(),y.graphHandler.reset(),y.isMouseDown=!1,y.autoScroll=!0,I(a),mxEvent.consume(a))}));mxEvent.addListener(m,"mouseleave",mxUtils.bind(this,function(a){y.isMouseDown&&
-null!=y.graphHandler.shape&&(y.graphHandler.shape.node.style.visibility="visible",m.style.border="3px solid transparent",m.style.cursor="",y.autoScroll=!0,null!=y.graphHandler.guide&&y.graphHandler.guide.setVisible(!0),null!=y.graphHandler.hint&&(y.graphHandler.hint.style.visibility="visible"),null!=f&&(f.style.border="3px dotted lightGray"))}));Graph.fileSupport&&(mxEvent.addListener(m,"dragover",mxUtils.bind(this,function(a){null!=f?f.style.border="3px dotted rgb(254, 137, 12)":m.style.border="3px dotted rgb(254, 137, 12)";
-a.dataTransfer.dropEffect="copy";m.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(m,"drop",mxUtils.bind(this,function(a){m.style.border="3px solid transparent";m.style.cursor="";null!=f&&(f.style.border="3px dotted lightGray");0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(c,d,e,g,t,k,p,l,q){if(null!=c&&"image/"==d.substring(0,6))c="shape=image;verticalLabelPosition=bottom;verticalAlign=top;aspect=fixed;image="+
-this.convertDataUri(c),c=[new mxCell("",new mxGeometry(0,0,t,k),c)],c[0].vertex=!0,F(c,new mxRectangle(0,0,t,k),a,mxEvent.isAltDown(a)?null:p.substring(0,p.lastIndexOf(".")).replace(/_/g," ")),null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null);else{var v=!1,n=mxUtils.bind(this,function(c,d){if(null!=c&&"text/xml"==d){var e=mxUtils.parseXml(c);if("mxlibrary"==e.documentElement.nodeName)try{var g=JSON.parse(mxUtils.getTextContent(e.documentElement));h(g,m);b=b.concat(g);B(a);
-this.spinner.stop();v=!0}catch(X){}else if("mxfile"==e.documentElement.nodeName)try{for(var t=e.documentElement.getElementsByTagName("diagram"),e=0;e<t.length;e++){var g=mxUtils.getTextContent(t[e]),k=this.stringToCells(this.editor.graph.decompress(g)),p=this.editor.graph.getBoundingBoxFromGeometry(k);F(k,new mxRectangle(0,0,p.width,p.height),a)}v=!0}catch(X){null!=window.console&&console.log("error in drop handler:",X)}}v||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));
-null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)});null!=q&&null!=p&&(/(\.v(dx|sdx?))($|\?)/i.test(p)||/(\.vs(x|sx?))($|\?)/i.test(p))?this.importVisio(q,function(a){n(a,"text/xml")},null,p):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,p)&&null!=q?this.parseFile(q,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?n(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?
-"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):n(c,d)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(m,"dragleave",function(a){null!=f?f.style.border="3px dotted lightGray":(m.style.border="3px solid transparent",m.style.cursor="");a.stopPropagation();a.preventDefault()}));l=l.cloneNode(!1);l.setAttribute("src",Editor.editImage);l.setAttribute("title",mxResources.get("edit"));k.insertBefore(l,k.firstChild);mxEvent.addListener(l,"click",G);mxEvent.addListener(m,
-"dblclick",function(a){mxEvent.getSource(a)==m&&G(a)});c=l.cloneNode(!1);c.setAttribute("src",Editor.plusImage);c.setAttribute("title",mxResources.get("add"));k.insertBefore(c,k.firstChild);mxEvent.addListener(c,"click",I);this.isOffline()||".scratchpad"!=a.title||null==EditorUi.scratchpadHelpLink||(c=document.createElement("span"),c.setAttribute("title",mxResources.get("help")),c.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;",mxUtils.write(c,"?"),mxEvent.addGestureListeners(c,
-mxUtils.bind(this,function(a){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(a)})),k.insertBefore(c,k.firstChild))}g.appendChild(k);g.style.paddingRight=18*k.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(a,b){for(var c=0;c<a.length;c++){var d=a[c],f=d.data;if(null!=f){var f=this.convertDataUri(f),e="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==d.aspect&&(e+="aspect=fixed;");b.appendChild(this.sidebar.createVertexTemplate(e+
+};EditorUi.prototype.getLibraryStorageHint=function(a){return""};EditorUi.prototype.libraryLoaded=function(a,b,c){if(null!=this.sidebar){a.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(a.getHash());".scratchpad"==a.title&&(this.scratchpad=a);var d=this.sidebar.palettes[a.getHash()],d=null!=d?d[d.length-1].nextSibling:null;this.removeLibrarySidebar(a.getHash());var f=null,e=mxUtils.bind(this,function(b,c){0==b.length&&a.isEditable()?(null==f&&(f=document.createElement("div"),mxUtils.setPrefixedStyle(f.style,
+"borderRadius","6px"),f.style.border="3px dotted lightGray",f.style.textAlign="center",f.style.padding="8px",f.style.color="#B3B3B3",mxUtils.write(f,mxResources.get("dragElementsHere"))),c.appendChild(f)):this.addLibraryEntries(b,c)});if(null!=this.sidebar&&null!=b)for(var k=0;k<b.length;k++)mxUtils.bind(this,function(a){var b=a.data;null!=b&&null!=a.title?this.sidebar.addEntry(a.title,mxUtils.bind(this,function(){b=this.convertDataUri(b);var c="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";
+"fixed"==a.aspect&&(c+="aspect=fixed;");return this.sidebar.createVertexTemplate(c+"image="+b,a.w,a.h,"",a.title||"",!1,!1,!0)})):null!=a.xml&&null!=a.title&&this.sidebar.addEntry(a.title,mxUtils.bind(this,function(){var b=this.stringToCells(this.editor.graph.decompress(a.xml));return this.sidebar.createVertexTemplateFromCells(b,a.w,a.h,a.title||"",!0,!1,!0)}))})(b[k]);c=null!=c&&0<c.length?c:a.getTitle();var g=this.sidebar.addPalette(a.getHash(),c,!0,mxUtils.bind(this,function(a){e(b,a)}));this.repositionLibrary(d);
+var n=g.parentNode.previousSibling;c=n.getAttribute("title");null!=c&&0<c.length&&".scratchpad"!=a.title&&n.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+c);var h=document.createElement("div");h.style.position="absolute";h.style.right="0px";h.style.top="0px";h.style.padding="8px";mxClient.IS_QUIRKS||8==document.documentMode||(h.style.backgroundColor="inherit");n.style.position="relative";var l=document.createElement("img");l.setAttribute("src",Dialog.prototype.closeImage);l.setAttribute("title",
+mxResources.get("close"));l.setAttribute("valign","absmiddle");l.setAttribute("border","0");l.style.margin="0 3px";var m=null;if(".scratchpad"!=a.title||this.closableScratchpad)h.appendChild(l),mxEvent.addListener(l,"click",mxUtils.bind(this,function(b){if(!mxEvent.isConsumed(b)){var c=mxUtils.bind(this,function(){this.closeLibrary(a)});null!=m?this.confirm(mxResources.get("allChangesLost"),null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c();mxEvent.consume(b)}}));if(a.isEditable()){var y=
+this.editor.graph,z=null,G=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),g,b,a,a.getMode());mxEvent.consume(c)}),C=mxUtils.bind(this,function(c){a.setModified(!0);a.isAutosave()?(null!=z&&null!=z.parentNode&&z.parentNode.removeChild(z),z=l.cloneNode(!1),z.setAttribute("src",Editor.spinImage),z.setAttribute("title",mxResources.get("saving")),z.style.cursor="default",z.style.marginRight="2px",z.style.marginTop="-2px",h.insertBefore(z,h.firstChild),n.style.paddingRight=18*h.childNodes.length+
+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=z&&null!=z.parentNode&&(z.parentNode.removeChild(z),n.style.paddingRight=18*h.childNodes.length+"px")})):null==m&&(m=l.cloneNode(!1),m.setAttribute("src",IMAGE_PATH+"/download.png"),m.setAttribute("title",mxResources.get("save")),h.insertBefore(m,h.firstChild),mxEvent.addListener(m,"click",mxUtils.bind(this,function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==m||a.isModified()||
+(n.style.paddingRight=18*h.childNodes.length+"px",m.parentNode.removeChild(m),m=null)});mxEvent.consume(c)})),n.style.paddingRight=18*h.childNodes.length+"px")}),F=mxUtils.bind(this,function(a,c,d,e){a=y.cloneCells(mxUtils.sortCells(y.model.getTopmostCells(a)));for(var k=0;k<a.length;k++){var n=y.getCellGeometry(a[k]);null!=n&&n.translate(-c.x,-c.y)}g.appendChild(this.sidebar.createVertexTemplateFromCells(a,c.width,c.height,e||"",!0,!1,!1));a={xml:this.editor.graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),
+w:c.width,h:c.height};null!=e&&(a.title=e);b.push(a);C(d);null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)}),I=mxUtils.bind(this,function(a){if(y.isSelectionEmpty())y.getRubberband().isActive()?(y.getRubberband().execute(a),y.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var b=y.getSelectionCells(),c=y.view.getBounds(b),d=y.view.scale;c.x/=d;c.y/=d;c.width/=d;c.height/=d;c.x-=y.view.translate.x;
+c.y-=y.view.translate.y;F(b,c)}mxEvent.consume(a)});g.style.border="3px solid transparent";mxEvent.addGestureListeners(g,function(){},mxUtils.bind(this,function(a){y.isMouseDown&&null!=y.panningManager&&null!=y.graphHandler.shape&&(y.graphHandler.shape.node.style.visibility="hidden",null!=f?f.style.border="3px dotted rgb(254, 137, 12)":g.style.border="3px dotted rgb(254, 137, 12)",g.style.cursor="copy",y.panningManager.stop(),y.autoScroll=!1,null!=y.graphHandler.guide&&y.graphHandler.guide.setVisible(!1),
+null!=y.graphHandler.hint&&(y.graphHandler.hint.style.visibility="hidden"),mxEvent.consume(a))}),mxUtils.bind(this,function(a){y.isMouseDown&&null!=y.panningManager&&null!=y.graphHandler&&(g.style.border="3px solid transparent",null!=f&&(f.style.border="3px dotted lightGray"),g.style.cursor="default",this.sidebar.showTooltips=!0,y.panningManager.stop(),y.graphHandler.reset(),y.isMouseDown=!1,y.autoScroll=!0,I(a),mxEvent.consume(a))}));mxEvent.addListener(g,"mouseleave",mxUtils.bind(this,function(a){y.isMouseDown&&
+null!=y.graphHandler.shape&&(y.graphHandler.shape.node.style.visibility="visible",g.style.border="3px solid transparent",g.style.cursor="",y.autoScroll=!0,null!=y.graphHandler.guide&&y.graphHandler.guide.setVisible(!0),null!=y.graphHandler.hint&&(y.graphHandler.hint.style.visibility="visible"),null!=f&&(f.style.border="3px dotted lightGray"))}));Graph.fileSupport&&(mxEvent.addListener(g,"dragover",mxUtils.bind(this,function(a){null!=f?f.style.border="3px dotted rgb(254, 137, 12)":g.style.border="3px dotted rgb(254, 137, 12)";
+a.dataTransfer.dropEffect="copy";g.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(g,"drop",mxUtils.bind(this,function(a){g.style.border="3px solid transparent";g.style.cursor="";null!=f&&(f.style.border="3px dotted lightGray");0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(c,d,k,n,t,h,p,l,q){if(null!=c&&"image/"==d.substring(0,6))c="shape=image;verticalLabelPosition=bottom;verticalAlign=top;aspect=fixed;image="+
+this.convertDataUri(c),c=[new mxCell("",new mxGeometry(0,0,t,h),c)],c[0].vertex=!0,F(c,new mxRectangle(0,0,t,h),a,mxEvent.isAltDown(a)?null:p.substring(0,p.lastIndexOf(".")).replace(/_/g," ")),null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null);else{var v=!1,m=mxUtils.bind(this,function(c,d){if(null!=c&&"text/xml"==d){var k=mxUtils.parseXml(c);if("mxlibrary"==k.documentElement.nodeName)try{var n=JSON.parse(mxUtils.getTextContent(k.documentElement));e(n,g);b=b.concat(n);C(a);
+this.spinner.stop();v=!0}catch(J){}else if("mxfile"==k.documentElement.nodeName)try{for(var t=k.documentElement.getElementsByTagName("diagram"),k=0;k<t.length;k++){var n=mxUtils.getTextContent(t[k]),h=this.stringToCells(this.editor.graph.decompress(n)),p=this.editor.graph.getBoundingBoxFromGeometry(h);F(h,new mxRectangle(0,0,p.width,p.height),a)}v=!0}catch(J){null!=window.console&&console.log("error in drop handler:",J)}}v||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));
+null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)});null!=q&&null!=p&&(/(\.v(dx|sdx?))($|\?)/i.test(p)||/(\.vs(x|sx?))($|\?)/i.test(p))?this.importVisio(q,function(a){m(a,"text/xml")},null,p):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,p)&&null!=q?this.parseFile(q,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?m(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?
+"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):m(c,d)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(g,"dragleave",function(a){null!=f?f.style.border="3px dotted lightGray":(g.style.border="3px solid transparent",g.style.cursor="");a.stopPropagation();a.preventDefault()}));l=l.cloneNode(!1);l.setAttribute("src",Editor.editImage);l.setAttribute("title",mxResources.get("edit"));h.insertBefore(l,h.firstChild);mxEvent.addListener(l,"click",G);mxEvent.addListener(g,
+"dblclick",function(a){mxEvent.getSource(a)==g&&G(a)});c=l.cloneNode(!1);c.setAttribute("src",Editor.plusImage);c.setAttribute("title",mxResources.get("add"));h.insertBefore(c,h.firstChild);mxEvent.addListener(c,"click",I);this.isOffline()||".scratchpad"!=a.title||null==EditorUi.scratchpadHelpLink||(c=document.createElement("span"),c.setAttribute("title",mxResources.get("help")),c.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;",mxUtils.write(c,"?"),mxEvent.addGestureListeners(c,
+mxUtils.bind(this,function(a){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(a)})),h.insertBefore(c,h.firstChild))}n.appendChild(h);n.style.paddingRight=18*h.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(a,b){for(var c=0;c<a.length;c++){var d=a[c],f=d.data;if(null!=f){var f=this.convertDataUri(f),e="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==d.aspect&&(e+="aspect=fixed;");b.appendChild(this.sidebar.createVertexTemplate(e+
"image="+f,d.w,d.h,"",d.title||"",!1,!1,!0))}else null!=d.xml&&(f=this.stringToCells(this.editor.graph.decompress(d.xml)),0<f.length&&b.appendChild(this.sidebar.createVertexTemplateFromCells(f,d.w,d.h,d.title||"",!0,!1,!0)))}};EditorUi.prototype.getResource=function(a){return null!=a?a[mxLanguage]||a.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.offline||EditorUi.isElectronApp||("1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64),EditorUi.prototype.createFooter=
function(){return document.getElementById("geFooter")});EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground=mxClient.IS_QUIRKS?"none":"linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38,EditorUi.prototype.hsplitPosition=
188,Sidebar.prototype.thumbWidth=46,Sidebar.prototype.thumbHeight=46,Sidebar.prototype.thumbPadding=5<=document.documentMode?0:1,Sidebar.prototype.thumbBorder=2):"dark"==uiTheme&&(mxClient.link("stylesheet",STYLE_PATH+"/dark.css"),Dialog.backdropColor="#2a2a2a",Graph.prototype.defaultThemeName="darkTheme",Graph.prototype.defaultPageBackgroundColor="#2a2a2a",Graph.prototype.defaultPageBorderColor="#505759",Graph.prototype.svgShadowColor="#e0e0e0",Graph.prototype.svgShadowOpacity="0.6",Graph.prototype.svgShadowSize=
@@ -7968,144 +7969,144 @@ Editor.checkmarkImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAM
"none",this.refresh())};EditorUi.prototype.showFooter=function(a){var b=document.getElementById("geFooter");null!=b&&(this.footerHeight=a,b.style.display="inline",this.refresh())};EditorUi.prototype.showImageDialog=function(a,b,c,d,e){a=new ImageDialog(this,a,b,c,d,e);this.showDialog(a.container,Graph.fileSupport?440:360,Graph.fileSupport?200:90,!0,!0);a.init()};EditorUi.prototype.showBackgroundImageDialog=function(a){a=null!=a?a:mxUtils.bind(this,function(a){a=new ChangePageSetup(this,null,a);a.ignoreColor=
!0;this.editor.graph.model.execute(a)});var b=new BackgroundImageDialog(this,mxUtils.bind(this,function(b){a(b)}));this.showDialog(b.container,360,200,!0,!0);b.init()};EditorUi.prototype.showLibraryDialog=function(a,b,c,d,e){a=new LibraryDialog(this,a,b,c,d,e);this.showDialog(a.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));a.init()};EditorUi.prototype.createSidebarFooterContainer=function(){var a=this.createDiv("geSidebarContainer");
a.style.position="absolute";a.style.overflow="hidden";a.style.borderWidth="3px";var b=document.createElement("a");b.className="geTitle";b.style.height="100%";b.style.paddingTop="9px";b.innerHTML='<span style="font-size:18px;margin-right:5px;">+</span>';mxUtils.write(b,mxResources.get("moreShapes")+"...");mxEvent.addListener(b,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(a){a.preventDefault()}));mxEvent.addListener(b,"click",mxUtils.bind(this,function(a){this.actions.get("shapes").funct();
-mxEvent.consume(a)}));a.appendChild(b);return a};EditorUi.prototype.handleError=function(a,b,c,d){var f=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},e=null!=a&&null!=a.error?a.error:a;if(null!=e||null!=b){a=mxUtils.htmlEntities(mxResources.get("unknownError"));var h=mxResources.get("ok"),m=null;b=null!=b?b:mxResources.get("error");if(null!=e)if(null!=e.retry&&(h=mxResources.get("cancel"),m=function(){f();e.retry()}),404==e.code||404==e.status||403==e.code){a=403==
-e.code?null!=e.message?mxUtils.htmlEntities(e.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied"));var g=window.location.hash;null!=g&&"#G"==g.substring(0,2)&&(g=g.substring(2),a+='<br><a href="https://drive.google.com/open?id='+g+'" target="_blank">'+mxUtils.htmlEntities(mxResources.get("tryOpeningViaThisPage"))+"</a>")}else null!=e.message?a=mxUtils.htmlEntities(e.message):null!=e.response&&null!=e.response.error?a=mxUtils.htmlEntities(e.response.error):
-"undefined"!==window.App&&(e.code==App.ERROR_TIMEOUT?a=mxUtils.htmlEntities(mxResources.get("timeout")):e.code==App.ERROR_BUSY&&(a=mxUtils.htmlEntities(mxResources.get("busy"))));this.showError(b,a,h,c,m,null,null,null,null,null,null,null,d?c:null)}else null!=c&&c()};EditorUi.prototype.showError=function(a,b,c,d,e,g,k,l,t,n,D,C,y){a=new ErrorDialog(this,a,b,c||mxResources.get("ok"),d,e,g,k,C,l,t);this.showDialog(a.container,n||340,D||(null!=b&&120<b.length?180:150),!0,!1,y);a.init()};EditorUi.prototype.alert=
+mxEvent.consume(a)}));a.appendChild(b);return a};EditorUi.prototype.handleError=function(a,b,c,d){var f=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},e=null!=a&&null!=a.error?a.error:a;if(null!=e||null!=b){a=mxUtils.htmlEntities(mxResources.get("unknownError"));var k=mxResources.get("ok"),g=null;b=null!=b?b:mxResources.get("error");if(null!=e)if(null!=e.retry&&(k=mxResources.get("cancel"),g=function(){f();e.retry()}),404==e.code||404==e.status||403==e.code){a=403==
+e.code?null!=e.message?mxUtils.htmlEntities(e.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied"));var n=window.location.hash;null!=n&&"#G"==n.substring(0,2)&&(n=n.substring(2),a+='<br><a href="https://drive.google.com/open?id='+n+'" target="_blank">'+mxUtils.htmlEntities(mxResources.get("tryOpeningViaThisPage"))+"</a>")}else null!=e.message?a=mxUtils.htmlEntities(e.message):null!=e.response&&null!=e.response.error?a=mxUtils.htmlEntities(e.response.error):
+"undefined"!==window.App&&(e.code==App.ERROR_TIMEOUT?a=mxUtils.htmlEntities(mxResources.get("timeout")):e.code==App.ERROR_BUSY&&(a=mxUtils.htmlEntities(mxResources.get("busy"))));this.showError(b,a,k,c,g,null,null,null,null,null,null,null,d?c:null)}else null!=c&&c()};EditorUi.prototype.showError=function(a,b,c,d,e,g,h,l,t,m,D,B,y){a=new ErrorDialog(this,a,b,c||mxResources.get("ok"),d,e,g,h,B,l,t);this.showDialog(a.container,m||340,D||(null!=b&&120<b.length?180:150),!0,!1,y);a.init()};EditorUi.prototype.alert=
function(a,b){var c=new ErrorDialog(this,null,a,mxResources.get("ok"),b);this.showDialog(c.container,340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(a,b,c,d,e){var f=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){};a=new ConfirmDialog(this,a,function(){f();null!=b&&b()},function(){f();null!=c&&c()},d,e);this.showDialog(a.container,340,90,!0,!1);a.init()};EditorUi.prototype.setCurrentFile=function(a){this.currentFile=a};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};
EditorUi.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||!this.editor.graph.mathEnabled&&this.useCanvasForExport};EditorUi.prototype.createSvgDataUri=function(a){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(a)))};EditorUi.prototype.createImageDataUri=function(a,b,c){var d=a.toDataURL("image/"+c);if(6>=d.length||d==a.cloneNode(!1).toDataURL("image/"+c))throw{message:"Invalid image"};null!=b&&(d=this.writeGraphModelToPng(d,"zTXt","mxGraphModel",atob(this.editor.graph.compress(b))));
return d};EditorUi.prototype.saveCanvas=function(a,b,c){var d="jpeg"==c?"jpg":c,f=this.getBaseFilename()+"."+d;a=this.createImageDataUri(a,b,c);this.saveData(f,d,a.substring(a.lastIndexOf(",")+1),"image/"+c,!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&&!mxClient.IS_QUIRKS||this.isOfflineApp()||mxClient.IS_IOS};
EditorUi.prototype.showTextDialog=function(a,b){var c=new TextareaDialog(this,a,b,null,null,mxResources.get("close"));c.textarea.style.width="600px";c.textarea.style.height="380px";this.showDialog(c.container,620,460,!0,!0);c.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(a,b,c,d,e){if(window.Blob&&navigator.msSaveOrOpenBlob)a=d?this.base64ToBlob(a,c):new Blob([a],{type:c}),navigator.msSaveOrOpenBlob(a,b);else if(mxClient.IS_IE)c=window.open("about:blank",
-"_blank"),null==c?mxUtils.popup(a,!0):(c.document.write(a),c.document.close(),c.document.execCommand("SaveAs",!0,b),c.close());else if(mxClient.IS_IOS)this.showTextDialog(b+":",a);else{var f=document.createElement("a"),h=!mxClient.IS_SF&&0>navigator.userAgent.indexOf("PaleMoon/")&&"undefined"!==typeof f.download;if(mxClient.IS_GC)var g=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./),h=65==(g?parseInt(g[2],10):!1)?!1:h;if(h||this.isOffline()){f.href=URL.createObjectURL(d?this.base64ToBlob(a,
-c):new Blob([a],{type:c}));h?f.download=b:f.setAttribute("target","_blank");document.body.appendChild(f);try{window.setTimeout(function(){URL.revokeObjectURL(f.href)},0),f.click(),f.parentNode.removeChild(f)}catch(t){}}else this.createEchoRequest(a,b,c,d,e).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,c,d,e,g){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=c?"&mime="+c:"")+(null!=e?"&format="+e:"")+(null!=g?"&base64="+g:"")+(null!=b?"&filename="+
-encodeURIComponent(b):"")+(d?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=b||"";for(var c=atob(a),d=c.length,f=Math.ceil(d/1024),e=Array(f),h=0;h<f;++h){for(var g=1024*h,t=Math.min(g+1024,d),k=Array(t-g),l=0;g<t;++l,++g)k[l]=c[g].charCodeAt(0);e[h]=new Uint8Array(k)}return new Blob(e,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,c,d,e,g,k){g=null!=g?g:!1;k=null!=k?k:"vsdx"!=e&&(!mxClient.IS_IOS||!navigator.standalone);e=this.getServiceCount(g);b=new CreateDialog(this,
-b,mxUtils.bind(this,function(b,f){try{if("_blank"==f)if(null==c||"image/"!=c.substring(0,6)||"image/svg"==c.substring(0,9)&&!mxClient.IS_SVG){var e=window.open("about:blank");null==e?mxUtils.popup(a,!0):(e.document.write(mxUtils.htmlEntities(a,!1)),e.document.close())}else this.openInNewWindow(a,c,d);else f==App.MODE_DEVICE||"download"==f?this.doSaveLocalFile(a,b,c,d):null!=b&&0<b.length&&this.pickFolder(f,mxUtils.bind(this,function(e){try{this.exportFile(a,b,c,d,f,e)}catch(C){this.handleError(C)}}))}catch(D){this.handleError(D)}}),
-mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,g,k,null,1<e,4<e&&(!g||6>e)?3:4,a,c,d);this.showDialog(b.container,420,e==(mxClient.IS_IOS?0:1)?160:4<e?390:270,!0,!0);b.init()};EditorUi.prototype.openInNewWindow=function(a,b,c){if(mxClient.IS_GC||mxClient.IS_EDGE||11==document.documentMode||10==document.documentMode){var d=window.open("about:blank");null==d?mxUtils.popup(a,!0):("image/svg+xml"==b?d.document.write("<html>"+a+"</html>"):d.document.write('<html><img src="data:'+
+"_blank"),null==c?mxUtils.popup(a,!0):(c.document.write(a),c.document.close(),c.document.execCommand("SaveAs",!0,b),c.close());else if(mxClient.IS_IOS)this.showTextDialog(b+":",a);else{var f=document.createElement("a"),k=!mxClient.IS_SF&&0>navigator.userAgent.indexOf("PaleMoon/")&&"undefined"!==typeof f.download;if(mxClient.IS_GC)var g=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./),k=65==(g?parseInt(g[2],10):!1)?!1:k;if(k||this.isOffline()){f.href=URL.createObjectURL(d?this.base64ToBlob(a,
+c):new Blob([a],{type:c}));k?f.download=b:f.setAttribute("target","_blank");document.body.appendChild(f);try{window.setTimeout(function(){URL.revokeObjectURL(f.href)},0),f.click(),f.parentNode.removeChild(f)}catch(t){}}else this.createEchoRequest(a,b,c,d,e).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,c,d,e,g){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=c?"&mime="+c:"")+(null!=e?"&format="+e:"")+(null!=g?"&base64="+g:"")+(null!=b?"&filename="+
+encodeURIComponent(b):"")+(d?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=b||"";for(var c=atob(a),d=c.length,f=Math.ceil(d/1024),e=Array(f),k=0;k<f;++k){for(var g=1024*k,t=Math.min(g+1024,d),h=Array(t-g),l=0;g<t;++l,++g)h[l]=c[g].charCodeAt(0);e[k]=new Uint8Array(h)}return new Blob(e,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,c,d,e,g,h){g=null!=g?g:!1;h=null!=h?h:"vsdx"!=e&&(!mxClient.IS_IOS||!navigator.standalone);e=this.getServiceCount(g);b=new CreateDialog(this,
+b,mxUtils.bind(this,function(b,f){try{if("_blank"==f)if(null==c||"image/"!=c.substring(0,6)||"image/svg"==c.substring(0,9)&&!mxClient.IS_SVG){var e=window.open("about:blank");null==e?mxUtils.popup(a,!0):(e.document.write(mxUtils.htmlEntities(a,!1)),e.document.close())}else this.openInNewWindow(a,c,d);else f==App.MODE_DEVICE||"download"==f?this.doSaveLocalFile(a,b,c,d):null!=b&&0<b.length&&this.pickFolder(f,mxUtils.bind(this,function(e){try{this.exportFile(a,b,c,d,f,e)}catch(B){this.handleError(B)}}))}catch(D){this.handleError(D)}}),
+mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,g,h,null,1<e,4<e&&(!g||6>e)?3:4,a,c,d);this.showDialog(b.container,420,e==(mxClient.IS_IOS?0:1)?160:4<e?390:270,!0,!0);b.init()};EditorUi.prototype.openInNewWindow=function(a,b,c){if(mxClient.IS_GC||mxClient.IS_EDGE||11==document.documentMode||10==document.documentMode){var d=window.open("about:blank");null==d?mxUtils.popup(a,!0):("image/svg+xml"==b?d.document.write("<html>"+a+"</html>"):d.document.write('<html><img src="data:'+
b+(c?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))+'"/></html>'),d.document.close())}else d=window.open("data:"+b+(c?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))),null==d&&mxUtils.popup(a,!0)};var c=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.addChromelessToolbarItems=function(a){if(this.isExportToCanvas()){this.exportDialog=null;var b=a(mxUtils.bind(this,function(a){var c=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",c);
null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)c.apply(this);else{this.exportDialog=document.createElement("div");var d=b.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily="Helvetica,Arial";this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width=
"50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left=d.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";d=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=d.zIndex;var f=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"#fff",
speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});f.spin(this.exportDialog);this.exportToCanvas(mxUtils.bind(this,function(a){f.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var b=this.createImageDataUri(a,null,"png");a=document.createElement("img");a.style.maxWidth="140px";a.style.maxHeight="140px";a.style.cursor="pointer";a.style.backgroundColor="white";a.setAttribute("title",mxResources.get("openInNewWindow"));
a.setAttribute("border","0");a.setAttribute("src",b);this.exportDialog.appendChild(a);mxEvent.addListener(a,"click",mxUtils.bind(this,function(){this.openInNewWindow(b.substring(b.indexOf(",")+1),"image/png",!0);c.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}));mxEvent.addListener(this.editor.graph.container,"click",c);document.body.appendChild(this.exportDialog)}mxEvent.consume(a)}),Editor.cameraLargeImage,mxResources.get("export"))}c.apply(this,
-arguments)};EditorUi.prototype.saveData=function(a,b,c,d,e){this.isLocalFileSave()?this.saveLocalFile(c,a,d,e,b):this.saveRequest(a,b,mxUtils.bind(this,function(a,f){return this.createEchoRequest(c,a,d,e,b,f)}),c,e,d)};EditorUi.prototype.saveRequest=function(a,b,c,d,e,g,k){k=null!=k?k:!mxClient.IS_IOS||!navigator.standalone;var f=this.getServiceCount(!1);a=new CreateDialog(this,a,mxUtils.bind(this,function(a,f){if("_blank"==f||null!=a&&0<a.length){var e=c("_blank"==f?null:a,f==App.MODE_DEVICE||"download"==
+arguments)};EditorUi.prototype.saveData=function(a,b,c,d,e){this.isLocalFileSave()?this.saveLocalFile(c,a,d,e,b):this.saveRequest(a,b,mxUtils.bind(this,function(a,f){return this.createEchoRequest(c,a,d,e,b,f)}),c,e,d)};EditorUi.prototype.saveRequest=function(a,b,c,d,e,g,h){h=null!=h?h:!mxClient.IS_IOS||!navigator.standalone;var f=this.getServiceCount(!1);a=new CreateDialog(this,a,mxUtils.bind(this,function(a,f){if("_blank"==f||null!=a&&0<a.length){var e=c("_blank"==f?null:a,f==App.MODE_DEVICE||"download"==
f||null==f||"_blank"==f?"0":"1");null!=e&&(f==App.MODE_DEVICE||"download"==f||"_blank"==f?e.simulate(document,"_blank"):this.pickFolder(f,mxUtils.bind(this,function(c){g=null!=g?g:"pdf"==b?"application/pdf":"image/"+b;if(null!=d)try{this.exportFile(d,a,g,!0,f,c)}catch(y){this.handleError(y)}else this.spinner.spin(document.body,mxResources.get("saving"))&&e.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=e.getStatus()&&299>=e.getStatus())try{this.exportFile(e.getText(),a,g,!0,f,c)}catch(y){this.handleError(y)}else this.handleError({message:mxResources.get("errorSavingFile")})}),
-function(a){this.spinner.stop();this.handleError(a)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,k,null,1<f,4<f?3:4,d,g,e);this.showDialog(a.container,380,f==(mxClient.IS_IOS?0:1)?160:4<f?390:270,!0,!0);a.init()};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(a,b,c,d,e,g){};EditorUi.prototype.pickFolder=function(a,b,c){b(null)};EditorUi.prototype.exportSvg=function(a,
-b,c,d,e,g,k,l,t,n){if(this.spinner.spin(document.body,mxResources.get("export"))){var f=this.editor.graph.isSelectionEmpty();c=null!=c?c:f;f=b?null:this.editor.graph.background;f==mxConstants.NONE&&(f=null);null==f&&0==b&&(f="#ffffff");var h=this.editor.graph.getSvg(f,a,k,l,null,c,null,null,"blank"==n?"_blank":"self"==n?"_top":null);d&&this.editor.graph.addSvgShadow(h,h);var m=this.getBaseFilename()+".svg",p=mxUtils.bind(this,function(a){this.spinner.stop();e&&a.setAttribute("content",this.getFileData(!0,
-null,null,null,c,t));if(null!=this.editor.fontCss){var b=a.ownerDocument,b=null!=b.createElementNS?b.createElementNS(mxConstants.NS_SVG,"style"):b.createElement("style");b.setAttribute("type","text/css");mxUtils.setTextContent(b,this.editor.fontCss);a.getElementsByTagName("defs")[0].appendChild(b)}var d='<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a);this.isLocalFileSave()||d.length<=MAX_REQUEST_SIZE?this.saveData(m,"svg",d,
-"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(d)}))});this.convertMath(this.editor.graph,h,!1,mxUtils.bind(this,function(){g?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.convertImages(h,p,this.thumbImageCache)):p(h)}))}};EditorUi.prototype.addRadiobox=function(a,b,c,d,e,g,k){return this.addCheckbox(a,c,d,e,g,k,!0,b)};EditorUi.prototype.addCheckbox=function(a,b,c,d,e,g,k,l){g=null!=g?
-g:!0;var f=document.createElement("input");f.style.marginRight="8px";f.style.marginTop="16px";f.setAttribute("type",k?"radio":"checkbox");k="geCheckbox-"+Editor.guid();f.id=k;null!=l&&f.setAttribute("name",l);c&&(f.setAttribute("checked","checked"),f.defaultChecked=!0);d&&f.setAttribute("disabled","disabled");g&&(a.appendChild(f),c=document.createElement("label"),mxUtils.write(c,b),c.setAttribute("for",k),a.appendChild(c),e||mxUtils.br(a));return f};EditorUi.prototype.addEditButton=function(a,b){var c=
+function(a){this.spinner.stop();this.handleError(a)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,h,null,1<f,4<f?3:4,d,g,e);this.showDialog(a.container,380,f==(mxClient.IS_IOS?0:1)?160:4<f?390:270,!0,!0);a.init()};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(a,b,c,d,e,g){};EditorUi.prototype.pickFolder=function(a,b,c){b(null)};EditorUi.prototype.exportSvg=function(a,
+b,c,d,e,g,h,l,t,m){if(this.spinner.spin(document.body,mxResources.get("export"))){var f=this.editor.graph.isSelectionEmpty();c=null!=c?c:f;f=b?null:this.editor.graph.background;f==mxConstants.NONE&&(f=null);null==f&&0==b&&(f="#ffffff");var k=this.editor.graph.getSvg(f,a,h,l,null,c,null,null,"blank"==m?"_blank":"self"==m?"_top":null);d&&this.editor.graph.addSvgShadow(k,k);var n=this.getBaseFilename()+".svg",p=mxUtils.bind(this,function(a){this.spinner.stop();e&&a.setAttribute("content",this.getFileData(!0,
+null,null,null,c,t));if(null!=this.editor.fontCss){var b=a.ownerDocument,b=null!=b.createElementNS?b.createElementNS(mxConstants.NS_SVG,"style"):b.createElement("style");b.setAttribute("type","text/css");mxUtils.setTextContent(b,this.editor.fontCss);a.getElementsByTagName("defs")[0].appendChild(b)}var d='<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a);this.isLocalFileSave()||d.length<=MAX_REQUEST_SIZE?this.saveData(n,"svg",d,
+"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(d)}))});this.convertMath(this.editor.graph,k,!1,mxUtils.bind(this,function(){g?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.convertImages(k,p,this.thumbImageCache)):p(k)}))}};EditorUi.prototype.addRadiobox=function(a,b,c,d,e,g,h){return this.addCheckbox(a,c,d,e,g,h,!0,b)};EditorUi.prototype.addCheckbox=function(a,b,c,d,e,g,h,l){g=null!=g?
+g:!0;var f=document.createElement("input");f.style.marginRight="8px";f.style.marginTop="16px";f.setAttribute("type",h?"radio":"checkbox");h="geCheckbox-"+Editor.guid();f.id=h;null!=l&&f.setAttribute("name",l);c&&(f.setAttribute("checked","checked"),f.defaultChecked=!0);d&&f.setAttribute("disabled","disabled");g&&(a.appendChild(f),c=document.createElement("label"),mxUtils.write(c,b),c.setAttribute("for",h),a.appendChild(c),e||mxUtils.br(a));return f};EditorUi.prototype.addEditButton=function(a,b){var c=
this.addCheckbox(a,mxResources.get("edit")+":",!0,null,!0);c.style.marginLeft="24px";var d=this.getCurrentFile(),f="";null!=d&&d.getMode()!=App.MODE_DEVICE&&d.getMode()!=App.MODE_BROWSER&&(f=window.location.href);var e=document.createElement("select");e.style.width="120px";e.style.marginLeft="8px";e.style.marginRight="10px";e.className="geBtn";d=document.createElement("option");d.setAttribute("value","blank");mxUtils.write(d,mxResources.get("makeCopy"));e.appendChild(d);d=document.createElement("option");
d.setAttribute("value","custom");mxUtils.write(d,mxResources.get("custom")+"...");e.appendChild(d);a.appendChild(e);mxEvent.addListener(e,"change",mxUtils.bind(this,function(){if("custom"==e.value){var a=new FilenameDialog(this,f,mxResources.get("ok"),function(a){null!=a?f=a:e.value="blank"},mxResources.get("url"),null,null,null,null,function(){e.value="blank"});this.showDialog(a.container,300,80,!0,!1);a.init()}}));mxEvent.addListener(c,"change",mxUtils.bind(this,function(){c.checked&&(null==b||
-b.checked)?e.removeAttribute("disabled"):e.setAttribute("disabled","disabled")}));mxUtils.br(a);return{getLink:function(){return c.checked?"blank"===e.value?"_blank":f:null},getEditInput:function(){return c},getEditSelect:function(){return e}}};EditorUi.prototype.addLinkSection=function(a,b){function c(){h.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=e&&e!=mxConstants.NONE?"border:1px solid black;background-color:"+e:"background-position:center center;background-repeat:no-repeat;background-image:url('"+
+b.checked)?e.removeAttribute("disabled"):e.setAttribute("disabled","disabled")}));mxUtils.br(a);return{getLink:function(){return c.checked?"blank"===e.value?"_blank":f:null},getEditInput:function(){return c},getEditSelect:function(){return e}}};EditorUi.prototype.addLinkSection=function(a,b){function c(){k.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=e&&e!=mxConstants.NONE?"border:1px solid black;background-color:"+e:"background-position:center center;background-repeat:no-repeat;background-image:url('"+
Dialog.prototype.closeImage+"')")+';"></div>'}mxUtils.write(a,mxResources.get("links")+":");var d=document.createElement("select");d.style.width="100px";d.style.marginLeft="8px";d.style.marginRight="10px";d.className="geBtn";var f=document.createElement("option");f.setAttribute("value","auto");mxUtils.write(f,mxResources.get("automatic"));d.appendChild(f);f=document.createElement("option");f.setAttribute("value","blank");mxUtils.write(f,mxResources.get("openInNewWindow"));d.appendChild(f);f=document.createElement("option");
-f.setAttribute("value","self");mxUtils.write(f,mxResources.get("openInThisWindow"));d.appendChild(f);b&&(f=document.createElement("option"),f.setAttribute("value","frame"),mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),d.appendChild(f));a.appendChild(d);mxUtils.write(a,mxResources.get("borderColor")+":");var e="#0000ff",h=null,h=mxUtils.button("",mxUtils.bind(this,function(a){this.pickColor(e||"none",function(a){e=a;c()});mxEvent.consume(a)}));c();h.style.padding=
-mxClient.IS_FF?"4px 2px 4px 2px":"4px";h.style.marginLeft="4px";h.style.height="22px";h.style.width="22px";h.style.position="relative";h.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";h.className="geColorBtn";a.appendChild(h);mxUtils.br(a);return{getColor:function(){return e},getTarget:function(){return d.value},focus:function(){d.focus()}}};EditorUi.prototype.createLink=function(a,b,c,d,e,g,k,l){var f=this.getCurrentFile(),h=[];d&&(h.push("lightbox=1"),"auto"!=a&&h.push("target="+
-a),null!=b&&b!=mxConstants.NONE&&h.push("highlight="+("#"==b.charAt(0)?b.substring(1):b)),null!=e&&0<e.length&&h.push("edit="+encodeURIComponent(e)),g&&h.push("layers=1"),this.editor.graph.foldingEnabled&&h.push("nav=1"));c&&(a=this.getSelectedPageIndex(),0<a&&h.push("page="+a));a=!0;null!=k?c="#U"+encodeURIComponent(k):(f=this.getCurrentFile(),l||null==f||f.constructor!=window.DriveFile?c="#R"+encodeURIComponent(c?this.getFileData(!0,null,null,null,null,null,null,!0):this.editor.graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):
-(c="#"+f.getHash(),a=!1));a&&null!=f&&null!=f.getTitle()&&f.getTitle()!=this.defaultFilename&&h.push("title="+encodeURIComponent(f.getTitle()));return(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?"https://www.draw.io/":"https://"+window.location.host+"/")+(0<h.length?"?"+h.join("&"):"")+c};EditorUi.prototype.createHtml=function(a,b,c,d,e,g,k,l,t,n,D){this.getBasenames();var f={};""!=e&&e!=mxConstants.NONE&&(f.highlight=e);"auto"!==d&&(f.target=d);
-t||(f.lightbox=!1);f.nav=this.editor.graph.foldingEnabled;c=parseInt(c);isNaN(c)||100==c||(f.zoom=c/100);c=[];k&&(c.push("pages"),f.resize=!0,null!=this.pages&&null!=this.currentPage&&(f.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(c.push("zoom"),f.resize=!0);l&&c.push("layers");0<c.length&&(t&&c.push("lightbox"),f.toolbar=c.join(" "));null!=n&&0<n.length&&(f.edit=n);null!=a?f.url=a:f.xml=this.getFileData(!0,null,null,null,null,!k);b='<div class="mxgraph" style="'+(g?"max-width:100%;":
+f.setAttribute("value","self");mxUtils.write(f,mxResources.get("openInThisWindow"));d.appendChild(f);b&&(f=document.createElement("option"),f.setAttribute("value","frame"),mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),d.appendChild(f));a.appendChild(d);mxUtils.write(a,mxResources.get("borderColor")+":");var e="#0000ff",k=null,k=mxUtils.button("",mxUtils.bind(this,function(a){this.pickColor(e||"none",function(a){e=a;c()});mxEvent.consume(a)}));c();k.style.padding=
+mxClient.IS_FF?"4px 2px 4px 2px":"4px";k.style.marginLeft="4px";k.style.height="22px";k.style.width="22px";k.style.position="relative";k.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";k.className="geColorBtn";a.appendChild(k);mxUtils.br(a);return{getColor:function(){return e},getTarget:function(){return d.value},focus:function(){d.focus()}}};EditorUi.prototype.createLink=function(a,b,c,d,e,g,h,l){var f=this.getCurrentFile(),k=[];d&&(k.push("lightbox=1"),"auto"!=a&&k.push("target="+
+a),null!=b&&b!=mxConstants.NONE&&k.push("highlight="+("#"==b.charAt(0)?b.substring(1):b)),null!=e&&0<e.length&&k.push("edit="+encodeURIComponent(e)),g&&k.push("layers=1"),this.editor.graph.foldingEnabled&&k.push("nav=1"));c&&(a=this.getSelectedPageIndex(),0<a&&k.push("page="+a));a=!0;null!=h?c="#U"+encodeURIComponent(h):(f=this.getCurrentFile(),l||null==f||f.constructor!=window.DriveFile?c="#R"+encodeURIComponent(c?this.getFileData(!0,null,null,null,null,null,null,!0):this.editor.graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):
+(c="#"+f.getHash(),a=!1));a&&null!=f&&null!=f.getTitle()&&f.getTitle()!=this.defaultFilename&&k.push("title="+encodeURIComponent(f.getTitle()));return(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?"https://www.draw.io/":"https://"+window.location.host+"/")+(0<k.length?"?"+k.join("&"):"")+c};EditorUi.prototype.createHtml=function(a,b,c,d,e,g,h,l,t,m,D){this.getBasenames();var f={};""!=e&&e!=mxConstants.NONE&&(f.highlight=e);"auto"!==d&&(f.target=d);
+t||(f.lightbox=!1);f.nav=this.editor.graph.foldingEnabled;c=parseInt(c);isNaN(c)||100==c||(f.zoom=c/100);c=[];h&&(c.push("pages"),f.resize=!0,null!=this.pages&&null!=this.currentPage&&(f.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(c.push("zoom"),f.resize=!0);l&&c.push("layers");0<c.length&&(t&&c.push("lightbox"),f.toolbar=c.join(" "));null!=m&&0<m.length&&(f.edit=m);null!=a?f.url=a:f.xml=this.getFileData(!0,null,null,null,null,!h);b='<div class="mxgraph" style="'+(g?"max-width:100%;":
"")+(""!=c?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(f))+'"></div>';a=null!=a?"&fetch="+encodeURIComponent(a):"";D(b,'<script type="text/javascript" src="'+(0<a.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":"https://www.draw.io/embed2.js?")+a:"1"==urlParams.dev?"https://test.draw.io/js/viewer.min.js":"https://www.draw.io/js/viewer.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(a,b,c,d){var f=document.createElement("div");
-f.style.whiteSpace="nowrap";var e=document.createElement("h3");mxUtils.write(e,mxResources.get("html"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";f.appendChild(e);var h=document.createElement("div");h.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var g=document.createElement("input");g.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";g.setAttribute("value","url");g.setAttribute("type","radio");g.setAttribute("name",
-"type-embedhtmldialog");e=g.cloneNode(!0);e.setAttribute("value","copy");h.appendChild(e);var m=document.createElement("span");mxUtils.write(m,mxResources.get("includeCopyOfMyDiagram"));h.appendChild(m);mxUtils.br(h);h.appendChild(g);m=document.createElement("span");mxUtils.write(m,mxResources.get("publicDiagramUrl"));h.appendChild(m);var k=this.getCurrentFile();null==c&&null!=k&&k.constructor==window.DriveFile&&(m=document.createElement("a"),m.style.paddingLeft="12px",m.style.color="gray",m.setAttribute("href",
-"javascript:void(0);"),mxUtils.write(m,mxResources.get("share")),h.appendChild(m),mxEvent.addListener(m,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(k.getId())})));e.setAttribute("checked","checked");null==c&&g.setAttribute("disabled","disabled");f.appendChild(h);var l=this.addLinkSection(f),p=this.addCheckbox(f,mxResources.get("zoom"),!0,null,!0);mxUtils.write(f,":");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%";f.appendChild(n);var z=this.addCheckbox(f,mxResources.get("fit"),!0),h=null!=this.pages&&1<this.pages.length,G=G=this.addCheckbox(f,mxResources.get("allPages"),h,!h),B=this.addCheckbox(f,mxResources.get("layers"),!0),F=this.addCheckbox(f,mxResources.get("lightbox"),!0),I=this.addEditButton(f,F),A=I.getEditInput();A.style.marginBottom="16px";mxEvent.addListener(F,"change",function(){F.checked?A.removeAttribute("disabled"):
-A.setAttribute("disabled","disabled");A.checked&&F.checked?I.getEditSelect().removeAttribute("disabled"):I.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,f,mxUtils.bind(this,function(){d(g.checked?c:null,p.checked,n.value,l.getTarget(),l.getColor(),z.checked,G.checked,B.checked,F.checked,I.getLink())}),null,a,b);this.showDialog(a.container,340,384,!0,!0);e.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,c,d,e,g){var f=document.createElement("div");f.style.whiteSpace=
-"nowrap";var h=document.createElement("h3");mxUtils.write(h,a||mxResources.get("link"));h.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";f.appendChild(h);var m=this.getCurrentFile(),h="https://desk.draw.io/support/solutions/articles/16000051941";a=0;if(null!=m&&m.constructor==window.DriveFile&&!b){a=80;var h="https://desk.draw.io/support/solutions/articles/16000039384",k=document.createElement("div");k.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";
-var l=document.createElement("div");l.style.whiteSpace="normal";mxUtils.write(l,mxResources.get("linkAccountRequired"));k.appendChild(l);l=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(m.getId())}));l.style.marginTop="12px";l.className="geBtn";k.appendChild(l);f.appendChild(k);l=document.createElement("a");l.style.paddingLeft="12px";l.style.color="gray";l.style.fontSize="11px";l.setAttribute("href","javascript:void(0);");mxUtils.write(l,mxResources.get("check"));
-k.appendChild(l);mxEvent.addListener(l,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(a){this.spinner.stop();a=new ErrorDialog(this,null,mxResources.get(null!=a?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(a.container,300,80,!0,!1);a.init()}))}))}var p=null,n=null;if(null!=c||null!=d)a+=30,mxUtils.write(f,mxResources.get("width")+":"),p=document.createElement("input"),
-p.setAttribute("type","text"),p.style.marginRight="16px",p.style.width="50px",p.style.marginLeft="6px",p.style.marginRight="16px",p.style.marginBottom="10px",p.value="100%",f.appendChild(p),mxUtils.write(f,mxResources.get("height")+":"),n=document.createElement("input"),n.setAttribute("type","text"),n.style.width="50px",n.style.marginLeft="6px",n.style.marginBottom="10px",n.value=d+"px",f.appendChild(n),mxUtils.br(f);var q=this.addLinkSection(f,g);c=null!=this.pages&&1<this.pages.length;var u=null;
-if(null==m||m.constructor!=window.DriveFile||b)u=this.addCheckbox(f,mxResources.get("allPages"),c,!c);var B=this.addCheckbox(f,mxResources.get("lightbox"),!0),F=this.addEditButton(f,B),I=F.getEditInput(),A=this.addCheckbox(f,mxResources.get("layers"),!0);A.style.marginLeft=I.style.marginLeft;A.style.marginBottom="16px";A.style.marginTop="8px";mxEvent.addListener(B,"change",function(){B.checked?(A.removeAttribute("disabled"),I.removeAttribute("disabled")):(A.setAttribute("disabled","disabled"),I.setAttribute("disabled",
-"disabled"));I.checked&&B.checked?F.getEditSelect().removeAttribute("disabled"):F.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,f,mxUtils.bind(this,function(){e(q.getTarget(),q.getColor(),null==u?!0:u.checked,B.checked,F.getLink(),A.checked,null!=p?p.value:null,null!=n?n.value:null)}),null,mxResources.get("create"),h);this.showDialog(b.container,340,254+a,!0,!0);null!=p?(p.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?p.select():
-document.execCommand("selectAll",!1,null)):q.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,c,d){var f=document.createElement("div");f.style.whiteSpace="nowrap";var e=document.createElement("h3");mxUtils.write(e,mxResources.get("image"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";f.appendChild(e);var h=this.addCheckbox(f,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),g=d?null:this.addCheckbox(f,mxResources.get("includeCopyOfMyDiagram"),
-!0),e=this.editor.graph,m=d?null:this.addCheckbox(f,mxResources.get("transparentBackground"),e.background==mxConstants.NONE||null==e.background);null!=m&&(m.style.marginBottom="16px");a=new CustomDialog(this,f,mxUtils.bind(this,function(){c(!h.checked,null!=g?g.checked:!1,null!=m?m.checked:!1)}),null,a,b);this.showDialog(a.container,300,d?100:186,!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,c,d,e,g,k,l){k=null!=k?k:!0;var f=document.createElement("div");f.style.whiteSpace="nowrap";var h=
-this.editor.graph,m="jpeg"==l?196:300,p=document.createElement("h3");mxUtils.write(p,a);p.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";f.appendChild(p);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 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";f.appendChild(q);mxUtils.br(f);var v=this.addCheckbox(f,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=l),u=this.addCheckbox(f,mxResources.get("selectionOnly"),!1,h.isSelectionEmpty()),x=document.createElement("input");x.style.marginTop="16px";x.style.marginRight="8px";x.style.marginLeft="24px";x.setAttribute("disabled",
-"disabled");x.setAttribute("type","checkbox");g&&(f.appendChild(x),mxUtils.write(f,mxResources.get("crop")),mxUtils.br(f),m+=26,mxEvent.addListener(u,"change",function(){u.checked?x.removeAttribute("disabled"):x.setAttribute("disabled","disabled")}));h.isSelectionEmpty()||(x.setAttribute("checked","checked"),x.defaultChecked=!0);var I=this.addCheckbox(f,mxResources.get("shadow"),h.shadowVisible),A=document.createElement("input");A.style.marginTop="16px";A.style.marginRight="8px";A.setAttribute("type",
-"checkbox");!this.isOffline()&&this.canvasSupported||A.setAttribute("disabled","disabled");b&&(f.appendChild(A),mxUtils.write(f,mxResources.get("embedImages")),mxUtils.br(f),m+=26);var E=this.addCheckbox(f,mxResources.get("includeCopyOfMyDiagram"),k,null,null,"jpeg"!=l),H=null!=this.pages&&1<this.pages.length,M=this.addCheckbox(f,H?mxResources.get("allPages"):"",H,!H,null,"jpeg"!=l);M.style.marginLeft="24px";M.style.marginBottom="16px";H||(M.style.display="none");mxEvent.addListener(E,"change",function(){E.checked&&
-H?M.removeAttribute("disabled"):M.setAttribute("disabled","disabled")});k&&H||M.setAttribute("disabled","disabled");var K=document.createElement("select");K.style.maxWidth="260px";K.style.marginLeft="8px";K.style.marginRight="10px";K.className="geBtn";a=document.createElement("option");a.setAttribute("value","auto");mxUtils.write(a,mxResources.get("automatic"));K.appendChild(a);a=document.createElement("option");a.setAttribute("value","blank");mxUtils.write(a,mxResources.get("openInNewWindow"));K.appendChild(a);
-a=document.createElement("option");a.setAttribute("value","self");mxUtils.write(a,mxResources.get("openInThisWindow"));K.appendChild(a);"svg"==l&&(mxUtils.write(f,mxResources.get("links")+":"),f.appendChild(K),mxUtils.br(f),mxUtils.br(f),m+=26);c=new CustomDialog(this,f,mxUtils.bind(this,function(){this.lastExportBorder=q.value;this.lastExportZoom=n.value;e(n.value,v.checked,!u.checked,I.checked,E.checked,A.checked,q.value,x.checked,!M.checked,K.value)}),null,c,d);this.showDialog(c.container,340,
-m,!0,!0);n.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?n.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,c,d,e){var f=document.createElement("div");f.style.whiteSpace="nowrap";var h=this.editor.graph;if(null!=b){var g=document.createElement("h3");mxUtils.write(g,b);g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";f.appendChild(g)}var m=this.addCheckbox(f,mxResources.get("fit"),
-!0),k=this.addCheckbox(f,mxResources.get("shadow"),h.shadowVisible&&d,!d),l=this.addCheckbox(f,c),p=this.addCheckbox(f,mxResources.get("lightbox"),!0),n=this.addEditButton(f,p),q=n.getEditInput(),G=1<h.model.getChildCount(h.model.getRoot()),B=this.addCheckbox(f,mxResources.get("layers"),G,!G);B.style.marginLeft=q.style.marginLeft;B.style.marginBottom="12px";B.style.marginTop="8px";mxEvent.addListener(p,"change",function(){p.checked?(G&&B.removeAttribute("disabled"),q.removeAttribute("disabled")):
-(B.setAttribute("disabled","disabled"),q.setAttribute("disabled","disabled"));q.checked&&p.checked?n.getEditSelect().removeAttribute("disabled"):n.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,f,mxUtils.bind(this,function(){a(m.checked,k.checked,l.checked,p.checked,n.getLink(),B.checked)}),null,mxResources.get("embed"),e);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,c,d,e,g,k,l){function f(b){var f=" ",m="";d&&(f=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+
-(e?"&edit=_blank":"")+(g?"&layers=1":"")+"');}})(this);\"",m+="cursor:pointer;");a&&(m+="max-width:100%;");var t="";c&&(t=' width="'+Math.round(h.width)+'" height="'+Math.round(h.height)+'"');k('<img src="'+b+'"'+t+(""!=m?' style="'+m+'"':"")+f+"/>")}var h=this.editor.graph.getGraphBounds();if(this.isExportToCanvas())this.exportToCanvas(mxUtils.bind(this,function(a){var b=d?this.getFileData(!0):null;a=this.createImageDataUri(a,b,"png");f(a)}),null,null,null,mxUtils.bind(this,function(a){l({message:mxResources.get("unknownError")})}),
-null,!0,c?2:1,null,b);else if(b=this.getFileData(!0),h.width*h.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){var m="";c&&(m="&w="+Math.round(2*h.width)+"&h="+Math.round(2*h.height));var p=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(d?"1":"0")+m+"&xml="+encodeURIComponent(b));p.send(mxUtils.bind(this,function(){200<=p.getStatus()&&299>=p.getStatus()?f("data:image/png;base64,"+p.getText()):l({message:mxResources.get("unknownError")})}))}else l({message:mxResources.get("drawingTooLarge")})};
-EditorUi.prototype.createEmbedSvg=function(a,b,c,d,e,g,k){var f=this.editor.graph.getSvg(),h=f.getElementsByTagName("a");if(null!=h)for(var m=0;m<h.length;m++){var l=h[m].getAttribute("href");null!=l&&"#"==l.charAt(0)&&"_blank"==h[m].getAttribute("target")&&h[m].removeAttribute("target")}d&&f.setAttribute("content",this.getFileData(!0));b&&this.editor.graph.addSvgShadow(f);if(c){var p=" ",n="";d&&(p="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+
-(e?"&edit=_blank":"")+(g?"&layers=1":"")+"');}})(this);\"",n+="cursor:pointer;");a&&(n+="max-width:100%;");this.convertImages(f,mxUtils.bind(this,function(a){k('<img src="'+this.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=n?' style="'+n+'"':"")+p+"/>")}))}else n="",d&&(f.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('https://www.draw.io/?client=1&lightbox=1"+
-(e?"&edit=_blank":"")+(g?"&layers=1":"")+"');}}})(this);"),n+="cursor:pointer;"),a&&(a=parseInt(f.getAttribute("width")),b=parseInt(f.getAttribute("height")),f.setAttribute("viewBox","0 0 "+a+" "+b),n+="max-width:100%;max-height:"+b+"px;",f.removeAttribute("height")),""!=n&&f.setAttribute("style",n),k(mxUtils.getXml(f))};EditorUi.prototype.timeSince=function(a){a=Math.floor((new Date-a)/1E3);var b=Math.floor(a/31536E3);if(1<b)return b+" "+mxResources.get("years");b=Math.floor(a/2592E3);if(1<b)return b+
+f.style.whiteSpace="nowrap";var e=document.createElement("h3");mxUtils.write(e,mxResources.get("html"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";f.appendChild(e);var k=document.createElement("div");k.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var g=document.createElement("input");g.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";g.setAttribute("value","url");g.setAttribute("type","radio");g.setAttribute("name",
+"type-embedhtmldialog");e=g.cloneNode(!0);e.setAttribute("value","copy");k.appendChild(e);var t=document.createElement("span");mxUtils.write(t,mxResources.get("includeCopyOfMyDiagram"));k.appendChild(t);mxUtils.br(k);k.appendChild(g);t=document.createElement("span");mxUtils.write(t,mxResources.get("publicDiagramUrl"));k.appendChild(t);var n=this.getCurrentFile();null==c&&null!=n&&n.constructor==window.DriveFile&&(t=document.createElement("a"),t.style.paddingLeft="12px",t.style.color="gray",t.setAttribute("href",
+"javascript:void(0);"),mxUtils.write(t,mxResources.get("share")),k.appendChild(t),mxEvent.addListener(t,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(n.getId())})));e.setAttribute("checked","checked");null==c&&g.setAttribute("disabled","disabled");f.appendChild(k);var h=this.addLinkSection(f),l=this.addCheckbox(f,mxResources.get("zoom"),!0,null,!0);mxUtils.write(f,":");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%";f.appendChild(p);var m=this.addCheckbox(f,mxResources.get("fit"),!0),k=null!=this.pages&&1<this.pages.length,G=G=this.addCheckbox(f,mxResources.get("allPages"),k,!k),C=this.addCheckbox(f,mxResources.get("layers"),!0),F=this.addCheckbox(f,mxResources.get("lightbox"),!0),I=this.addEditButton(f,F),A=I.getEditInput();A.style.marginBottom="16px";mxEvent.addListener(F,"change",function(){F.checked?A.removeAttribute("disabled"):
+A.setAttribute("disabled","disabled");A.checked&&F.checked?I.getEditSelect().removeAttribute("disabled"):I.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,f,mxUtils.bind(this,function(){d(g.checked?c:null,l.checked,p.value,h.getTarget(),h.getColor(),m.checked,G.checked,C.checked,F.checked,I.getLink())}),null,a,b);this.showDialog(a.container,340,384,!0,!0);e.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,c,d,e,g){var f=document.createElement("div");f.style.whiteSpace=
+"nowrap";var k=document.createElement("h3");mxUtils.write(k,a||mxResources.get("link"));k.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";f.appendChild(k);var t=this.getCurrentFile(),k="https://desk.draw.io/support/solutions/articles/16000051941";a=0;if(null!=t&&t.constructor==window.DriveFile&&!b){a=80;var k="https://desk.draw.io/support/solutions/articles/16000039384",n=document.createElement("div");n.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";
+var h=document.createElement("div");h.style.whiteSpace="normal";mxUtils.write(h,mxResources.get("linkAccountRequired"));n.appendChild(h);h=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(t.getId())}));h.style.marginTop="12px";h.className="geBtn";n.appendChild(h);f.appendChild(n);h=document.createElement("a");h.style.paddingLeft="12px";h.style.color="gray";h.style.fontSize="11px";h.setAttribute("href","javascript:void(0);");mxUtils.write(h,mxResources.get("check"));
+n.appendChild(h);mxEvent.addListener(h,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(a){this.spinner.stop();a=new ErrorDialog(this,null,mxResources.get(null!=a?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(a.container,300,80,!0,!1);a.init()}))}))}var l=null,p=null;if(null!=c||null!=d)a+=30,mxUtils.write(f,mxResources.get("width")+":"),l=document.createElement("input"),
+l.setAttribute("type","text"),l.style.marginRight="16px",l.style.width="50px",l.style.marginLeft="6px",l.style.marginRight="16px",l.style.marginBottom="10px",l.value="100%",f.appendChild(l),mxUtils.write(f,mxResources.get("height")+":"),p=document.createElement("input"),p.setAttribute("type","text"),p.style.width="50px",p.style.marginLeft="6px",p.style.marginBottom="10px",p.value=d+"px",f.appendChild(p),mxUtils.br(f);var m=this.addLinkSection(f,g);c=null!=this.pages&&1<this.pages.length;var q=null;
+if(null==t||t.constructor!=window.DriveFile||b)q=this.addCheckbox(f,mxResources.get("allPages"),c,!c);var u=this.addCheckbox(f,mxResources.get("lightbox"),!0),F=this.addEditButton(f,u),I=F.getEditInput(),A=this.addCheckbox(f,mxResources.get("layers"),!0);A.style.marginLeft=I.style.marginLeft;A.style.marginBottom="16px";A.style.marginTop="8px";mxEvent.addListener(u,"change",function(){u.checked?(A.removeAttribute("disabled"),I.removeAttribute("disabled")):(A.setAttribute("disabled","disabled"),I.setAttribute("disabled",
+"disabled"));I.checked&&u.checked?F.getEditSelect().removeAttribute("disabled"):F.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,f,mxUtils.bind(this,function(){e(m.getTarget(),m.getColor(),null==q?!0:q.checked,u.checked,F.getLink(),A.checked,null!=l?l.value:null,null!=p?p.value:null)}),null,mxResources.get("create"),k);this.showDialog(b.container,340,254+a,!0,!0);null!=l?(l.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?l.select():
+document.execCommand("selectAll",!1,null)):m.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,c,d){var f=document.createElement("div");f.style.whiteSpace="nowrap";var e=document.createElement("h3");mxUtils.write(e,mxResources.get("image"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";f.appendChild(e);var k=this.addCheckbox(f,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),g=d?null:this.addCheckbox(f,mxResources.get("includeCopyOfMyDiagram"),
+!0),e=this.editor.graph,t=d?null:this.addCheckbox(f,mxResources.get("transparentBackground"),e.background==mxConstants.NONE||null==e.background);null!=t&&(t.style.marginBottom="16px");a=new CustomDialog(this,f,mxUtils.bind(this,function(){c(!k.checked,null!=g?g.checked:!1,null!=t?t.checked:!1)}),null,a,b);this.showDialog(a.container,300,d?100:186,!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,c,d,e,g,h,l){h=null!=h?h:!0;var f=document.createElement("div");f.style.whiteSpace="nowrap";var k=
+this.editor.graph,n="jpeg"==l?196:300,p=document.createElement("h3");mxUtils.write(p,a);p.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";f.appendChild(p);mxUtils.write(f,mxResources.get("zoom")+":");var m=document.createElement("input");m.setAttribute("type","text");m.style.marginRight="16px";m.style.width="60px";m.style.marginLeft="4px";m.style.marginRight="12px";m.value=this.lastExportZoom||"100%";f.appendChild(m);mxUtils.write(f,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";f.appendChild(q);mxUtils.br(f);var v=this.addCheckbox(f,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=l),u=this.addCheckbox(f,mxResources.get("selectionOnly"),!1,k.isSelectionEmpty()),x=document.createElement("input");x.style.marginTop="16px";x.style.marginRight="8px";x.style.marginLeft="24px";x.setAttribute("disabled",
+"disabled");x.setAttribute("type","checkbox");g&&(f.appendChild(x),mxUtils.write(f,mxResources.get("crop")),mxUtils.br(f),n+=26,mxEvent.addListener(u,"change",function(){u.checked?x.removeAttribute("disabled"):x.setAttribute("disabled","disabled")}));k.isSelectionEmpty()||(x.setAttribute("checked","checked"),x.defaultChecked=!0);var I=this.addCheckbox(f,mxResources.get("shadow"),k.shadowVisible),A=document.createElement("input");A.style.marginTop="16px";A.style.marginRight="8px";A.setAttribute("type",
+"checkbox");!this.isOffline()&&this.canvasSupported||A.setAttribute("disabled","disabled");b&&(f.appendChild(A),mxUtils.write(f,mxResources.get("embedImages")),mxUtils.br(f),n+=26);var E=this.addCheckbox(f,mxResources.get("includeCopyOfMyDiagram"),h,null,null,"jpeg"!=l),H=null!=this.pages&&1<this.pages.length,M=this.addCheckbox(f,H?mxResources.get("allPages"):"",H,!H,null,"jpeg"!=l);M.style.marginLeft="24px";M.style.marginBottom="16px";H||(M.style.display="none");mxEvent.addListener(E,"change",function(){E.checked&&
+H?M.removeAttribute("disabled"):M.setAttribute("disabled","disabled")});h&&H||M.setAttribute("disabled","disabled");var K=document.createElement("select");K.style.maxWidth="260px";K.style.marginLeft="8px";K.style.marginRight="10px";K.className="geBtn";a=document.createElement("option");a.setAttribute("value","auto");mxUtils.write(a,mxResources.get("automatic"));K.appendChild(a);a=document.createElement("option");a.setAttribute("value","blank");mxUtils.write(a,mxResources.get("openInNewWindow"));K.appendChild(a);
+a=document.createElement("option");a.setAttribute("value","self");mxUtils.write(a,mxResources.get("openInThisWindow"));K.appendChild(a);"svg"==l&&(mxUtils.write(f,mxResources.get("links")+":"),f.appendChild(K),mxUtils.br(f),mxUtils.br(f),n+=26);c=new CustomDialog(this,f,mxUtils.bind(this,function(){this.lastExportBorder=q.value;this.lastExportZoom=m.value;e(m.value,v.checked,!u.checked,I.checked,E.checked,A.checked,q.value,x.checked,!M.checked,K.value)}),null,c,d);this.showDialog(c.container,340,
+n,!0,!0);m.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?m.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,c,d,e){var f=document.createElement("div");f.style.whiteSpace="nowrap";var k=this.editor.graph;if(null!=b){var g=document.createElement("h3");mxUtils.write(g,b);g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";f.appendChild(g)}var n=this.addCheckbox(f,mxResources.get("fit"),
+!0),h=this.addCheckbox(f,mxResources.get("shadow"),k.shadowVisible&&d,!d),l=this.addCheckbox(f,c),p=this.addCheckbox(f,mxResources.get("lightbox"),!0),m=this.addEditButton(f,p),q=m.getEditInput(),G=1<k.model.getChildCount(k.model.getRoot()),C=this.addCheckbox(f,mxResources.get("layers"),G,!G);C.style.marginLeft=q.style.marginLeft;C.style.marginBottom="12px";C.style.marginTop="8px";mxEvent.addListener(p,"change",function(){p.checked?(G&&C.removeAttribute("disabled"),q.removeAttribute("disabled")):
+(C.setAttribute("disabled","disabled"),q.setAttribute("disabled","disabled"));q.checked&&p.checked?m.getEditSelect().removeAttribute("disabled"):m.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,f,mxUtils.bind(this,function(){a(n.checked,h.checked,l.checked,p.checked,m.getLink(),C.checked)}),null,mxResources.get("embed"),e);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,c,d,e,g,h,l){function f(b){var f=" ",n="";d&&(f=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+
+(e?"&edit=_blank":"")+(g?"&layers=1":"")+"');}})(this);\"",n+="cursor:pointer;");a&&(n+="max-width:100%;");var t="";c&&(t=' width="'+Math.round(k.width)+'" height="'+Math.round(k.height)+'"');h('<img src="'+b+'"'+t+(""!=n?' style="'+n+'"':"")+f+"/>")}var k=this.editor.graph.getGraphBounds();if(this.isExportToCanvas())this.exportToCanvas(mxUtils.bind(this,function(a){var b=d?this.getFileData(!0):null;a=this.createImageDataUri(a,b,"png");f(a)}),null,null,null,mxUtils.bind(this,function(a){l({message:mxResources.get("unknownError")})}),
+null,!0,c?2:1,null,b);else if(b=this.getFileData(!0),k.width*k.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){var n="";c&&(n="&w="+Math.round(2*k.width)+"&h="+Math.round(2*k.height));var p=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(d?"1":"0")+n+"&xml="+encodeURIComponent(b));p.send(mxUtils.bind(this,function(){200<=p.getStatus()&&299>=p.getStatus()?f("data:image/png;base64,"+p.getText()):l({message:mxResources.get("unknownError")})}))}else l({message:mxResources.get("drawingTooLarge")})};
+EditorUi.prototype.createEmbedSvg=function(a,b,c,d,e,g,h){var f=this.editor.graph.getSvg(),k=f.getElementsByTagName("a");if(null!=k)for(var n=0;n<k.length;n++){var l=k[n].getAttribute("href");null!=l&&"#"==l.charAt(0)&&"_blank"==k[n].getAttribute("target")&&k[n].removeAttribute("target")}d&&f.setAttribute("content",this.getFileData(!0));b&&this.editor.graph.addSvgShadow(f);if(c){var p=" ",m="";d&&(p="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+
+(e?"&edit=_blank":"")+(g?"&layers=1":"")+"');}})(this);\"",m+="cursor:pointer;");a&&(m+="max-width:100%;");this.convertImages(f,mxUtils.bind(this,function(a){h('<img src="'+this.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=m?' style="'+m+'"':"")+p+"/>")}))}else m="",d&&(f.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('https://www.draw.io/?client=1&lightbox=1"+
+(e?"&edit=_blank":"")+(g?"&layers=1":"")+"');}}})(this);"),m+="cursor:pointer;"),a&&(a=parseInt(f.getAttribute("width")),b=parseInt(f.getAttribute("height")),f.setAttribute("viewBox","0 0 "+a+" "+b),m+="max-width:100%;max-height:"+b+"px;",f.removeAttribute("height")),""!=m&&f.setAttribute("style",m),h(mxUtils.getXml(f))};EditorUi.prototype.timeSince=function(a){a=Math.floor((new Date-a)/1E3);var b=Math.floor(a/31536E3);if(1<b)return b+" "+mxResources.get("years");b=Math.floor(a/2592E3);if(1<b)return b+
" "+mxResources.get("months");b=Math.floor(a/86400);if(1<b)return b+" "+mxResources.get("days");b=Math.floor(a/3600);if(1<b)return b+" "+mxResources.get("hours");b=Math.floor(a/60);return 1<b?b+" "+mxResources.get("minutes"):1==b?b+" "+mxResources.get("minute"):null};EditorUi.prototype.convertMath=function(a,b,c,d){a.mathEnabled&&"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?(Editor.MathJaxRender(b),window.setTimeout(mxUtils.bind(this,function(){MathJax.Hub.Queue(mxUtils.bind(this,
function(){d()}))}),0)):d()};EditorUi.prototype.decodeNodeIntoGraph=function(a,b){if(null!=a){var c=null;if("diagram"==a.nodeName)c=a;else if("mxfile"==a.nodeName){var d=a.getElementsByTagName("diagram");if(0<d.length){var c=d[0],f=b.getGlobalVariable;b.getGlobalVariable=function(a){return"page"==a?c.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==a?1:f.apply(this,arguments)}}}null!=c&&(d=b.decompress(mxUtils.getTextContent(c)),null!=d&&0<d.length&&(a=mxUtils.parseXml(d).documentElement))}d=
this.editor.graph;try{this.editor.graph=b,this.editor.setGraphXml(a)}catch(u){}finally{this.editor.graph=d}return a};EditorUi.prototype.getEmbeddedPng=function(a,b,c){var d=this.editor.graph,f=null;if(null!=c&&0<c.length)d=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(d.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(c).documentElement,!0),d),f=c;else if(null!=this.pages&&this.currentPage!=this.pages[0]){var d=this.createTemporaryGraph(d.getStylesheet()),
-e=d.getGlobalVariable,h=this.pages[0];d.getGlobalVariable=function(a){return"page"==a?h.getName():"pagenumber"==a?1:e.apply(this,arguments)};document.body.appendChild(d.container);d.model.setRoot(h.root)}this.exportToCanvas(mxUtils.bind(this,function(c){try{null==f&&(f=this.getFileData(!0));var e=c.toDataURL("image/png"),e=this.writeGraphModelToPng(e,"zTXt","mxGraphModel",atob(this.editor.graph.compress(f)));a(e.substring(e.lastIndexOf(",")+1));d!=this.editor.graph&&d.container.parentNode.removeChild(d.container)}catch(w){null!=
-b&&b(w)}}),null,null,null,mxUtils.bind(this,function(a){null!=b&&b(a)}),null,null,null,null,d.shadowVisible,null,d)};EditorUi.prototype.getEmbeddedSvg=function(a,b,c,d,e,g,k){k=b.background;k==mxConstants.NONE&&(k=null);b=b.getSvg(k,null,null,null,null,g);null!=a&&b.setAttribute("content",a);null!=c&&b.setAttribute("resource",c);if(null!=e)this.convertImages(b,mxUtils.bind(this,function(a){e((d?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+
-mxUtils.getXml(a))}));else return(d?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(b)};EditorUi.prototype.exportImage=function(a,b,c,d,e,g,k,l,t){t=null!=t?t:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var f=this.editor.graph.isSelectionEmpty();c=null!=c?c:f;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();
-try{this.saveCanvas(a,e?this.getFileData(!0,null,null,null,c,l):null,t)}catch(C){"Invalid image"==C.message?this.downloadFile(t):this.handleError(C)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,c,a||1,b,d,null,null,g,k)}catch(D){this.spinner.stop(),this.handleError(D)}}};EditorUi.prototype.loadFonts=function(a){if(null!=this.editor.fontCss&&null==this.editor.resolvedFontCss){var b=function(a){return a.replace(RegExp("^[\\s\"']+","g"),
-"").replace(RegExp("[\\s\"']+$","g"),"")},c=this.editor.fontCss.split("url("),d=0,f={},e=mxUtils.bind(this,function(){if(0==d){for(var e=[c[0]],g=1;g<c.length;g++){var h=c[g].indexOf(")");e.push('url("');e.push(f[b(c[g].substring(0,h))]);e.push('"'+c[g].substring(h))}this.editor.resolvedFontCss=e.join("");a()}});if(0<c.length)for(var g=1;g<c.length;g++){var k=c[g].indexOf(")"),t=null,l=c[g].indexOf("format(",k);0<l&&(t=b(c[g].substring(l+7,c[g].indexOf(")",l))));mxUtils.bind(this,function(a){if(null==
+e=d.getGlobalVariable,k=this.pages[0];d.getGlobalVariable=function(a){return"page"==a?k.getName():"pagenumber"==a?1:e.apply(this,arguments)};document.body.appendChild(d.container);d.model.setRoot(k.root)}this.exportToCanvas(mxUtils.bind(this,function(c){try{null==f&&(f=this.getFileData(!0));var e=c.toDataURL("image/png"),e=this.writeGraphModelToPng(e,"zTXt","mxGraphModel",atob(this.editor.graph.compress(f)));a(e.substring(e.lastIndexOf(",")+1));d!=this.editor.graph&&d.container.parentNode.removeChild(d.container)}catch(w){null!=
+b&&b(w)}}),null,null,null,mxUtils.bind(this,function(a){null!=b&&b(a)}),null,null,null,null,d.shadowVisible,null,d)};EditorUi.prototype.getEmbeddedSvg=function(a,b,c,d,e,g,h){h=b.background;h==mxConstants.NONE&&(h=null);b=b.getSvg(h,null,null,null,null,g);null!=a&&b.setAttribute("content",a);null!=c&&b.setAttribute("resource",c);if(null!=e)this.convertImages(b,mxUtils.bind(this,function(a){e((d?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+
+mxUtils.getXml(a))}));else return(d?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(b)};EditorUi.prototype.exportImage=function(a,b,c,d,e,g,h,l,t){t=null!=t?t:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var f=this.editor.graph.isSelectionEmpty();c=null!=c?c:f;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();
+try{this.saveCanvas(a,e?this.getFileData(!0,null,null,null,c,l):null,t)}catch(B){"Invalid image"==B.message?this.downloadFile(t):this.handleError(B)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,c,a||1,b,d,null,null,g,h)}catch(D){this.spinner.stop(),this.handleError(D)}}};EditorUi.prototype.loadFonts=function(a){if(null!=this.editor.fontCss&&null==this.editor.resolvedFontCss){var b=function(a){return a.replace(RegExp("^[\\s\"']+","g"),
+"").replace(RegExp("[\\s\"']+$","g"),"")},c=this.editor.fontCss.split("url("),d=0,f={},e=mxUtils.bind(this,function(){if(0==d){for(var e=[c[0]],g=1;g<c.length;g++){var k=c[g].indexOf(")");e.push('url("');e.push(f[b(c[g].substring(0,k))]);e.push('"'+c[g].substring(k))}this.editor.resolvedFontCss=e.join("");a()}});if(0<c.length)for(var g=1;g<c.length;g++){var h=c[g].indexOf(")"),t=null,l=c[g].indexOf("format(",h);0<l&&(t=b(c[g].substring(l+7,c[g].indexOf(")",l))));mxUtils.bind(this,function(a){if(null==
f[a]){f[a]=a;d++;var b="application/x-font-ttf";if("svg"==t||/(\.svg)($|\?)/i.test(a))b="image/svg+xml";else if("otf"==t||"embedded-opentype"==t||/(\.otf)($|\?)/i.test(a))b="application/x-font-opentype";else if("woff"==t||/(\.woff)($|\?)/i.test(a))b="application/font-woff";else if("woff2"==t||/(\.woff2)($|\?)/i.test(a))b="application/font-woff2";else if("eot"==t||/(\.eot)($|\?)/i.test(a))b="application/vnd.ms-fontobject";else if("sfnt"==t||/(\.sfnt)($|\?)/i.test(a))b="application/font-sfnt";var c=
-a;/^https?:\/\//.test(c)&&!this.isCorsEnabledForUrl(c)&&(c=PROXY_URL+"?url="+encodeURIComponent(a));this.loadUrl(c,mxUtils.bind(this,function(b){f[a]=b;d--;e()}),mxUtils.bind(this,function(a){d--;e()}),!0,null,"data:"+b+";charset=utf-8;base64,")}})(b(c[g].substring(0,k)),t)}}else a()};EditorUi.prototype.exportToCanvas=function(a,b,c,d,e,g,k,l,t,n,D,C,y,z){g=null!=g?g:!0;C=null!=C?C:this.editor.graph;y=null!=y?y:0;var f=t?null:C.background;f==mxConstants.NONE&&(f=null);null==f&&(f=d);null==f&&0==t&&
-(f=this.editor.graph.defaultPageBackgroundColor);this.convertImages(C.getSvg(f,null,null,z,null,null!=k?k:!0,null,null,null,n),mxUtils.bind(this,function(c){var d=new Image;d.onload=mxUtils.bind(this,function(){try{var h=document.createElement("canvas"),m=parseInt(c.getAttribute("width")),k=parseInt(c.getAttribute("height"));l=null!=l?l:1;null!=b&&(l=g?Math.min(1,Math.min(3*b/(4*k),b/m)):b/m);m=Math.ceil(l*m)+2*y;k=Math.ceil(l*k)+2*y;h.setAttribute("width",m);h.setAttribute("height",k);var t=h.getContext("2d");
-null!=f&&(t.beginPath(),t.rect(0,0,m,k),t.fillStyle=f,t.fill());t.scale(l,l);mxClient.IS_SF?window.setTimeout(function(){t.drawImage(d,y/l,y/l);a(h)},0):(t.drawImage(d,y/l,y/l),a(h))}catch(K){null!=e&&e(K)}});d.onerror=function(a){null!=e&&e(a)};try{n&&this.editor.graph.addSvgShadow(c,c);var h=mxUtils.bind(this,function(){if(null!=this.editor.resolvedFontCss){var a=document.createElement("style");a.setAttribute("type","text/css");a.innerHTML=this.editor.resolvedFontCss;c.getElementsByTagName("defs")[0].appendChild(a)}this.convertMath(C,
-c,!0,mxUtils.bind(this,function(){d.src=this.createSvgDataUri(mxUtils.getXml(c))}))});this.loadFonts(h)}catch(A){null!=e&&e(A)}}),c,D)};EditorUi.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var b=a.convert,c=this;a.convert=function(d){if(null!=d){var f="http://"==d.substring(0,7)||"https://"==d.substring(0,8);f&&!navigator.onLine?d=c.svgBrokenImage.src:!f||d.substring(0,a.baseUrl.length)==a.baseUrl||c.crossOriginImages&&c.isCorsEnabledForUrl(d)?"chrome-extension://"!=
-d.substring(0,19)&&(d=b.apply(this,arguments)):d=PROXY_URL+"?url="+encodeURIComponent(d)}return d};return a};EditorUi.prototype.convertImages=function(a,b,c,d){null==d&&(d=this.createImageUrlConverter());var f=0,e=c||{};c=mxUtils.bind(this,function(c,g){for(var h=a.getElementsByTagName(c),m=0;m<h.length;m++)mxUtils.bind(this,function(c){var h=d.convert(c.getAttribute(g));if(null!=h&&"data:"!=h.substring(0,5)){var m=e[h];null==m?(f++,this.convertImageToDataUri(h,function(d){null!=d&&(e[h]=d,c.setAttribute(g,
-d));f--;0==f&&b(a)})):c.setAttribute(g,m)}else null!=h&&c.setAttribute(g,h)})(h[m])});c("image","xlink:href");c("img","src");0==f&&b(a)};EditorUi.prototype.loadUrl=function(a,b,c,d,e,g){try{var f=d||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||/(\.gif)($|\?)/i.test(a);e=null!=e?e:!0;var h=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=b){var d=a.getText();if(f){if((9==document.documentMode||10==document.documentMode)&&
-"undefined"!==typeof window.mxUtilsBinaryToArray){a=mxUtilsBinaryToArray(a.request.responseBody).toArray();for(var d=Array(a.length),e=0;e<a.length;e++)d[e]=String.fromCharCode(a[e]);d=d.join("")}g=null!=g?g:"data:image/png;base64,";d=g+this.base64Encode(d)}b(d)}}else null!=c&&c({code:App.ERROR_UNKNOWN},a)}),function(){null!=c&&c({code:App.ERROR_UNKNOWN})},f,this.timeout,function(){e&&null!=c&&c({code:App.ERROR_TIMEOUT,retry:h})})});h()}catch(t){null!=c&&c(t)}};EditorUi.prototype.isCorsEnabledForUrl=
+a;/^https?:\/\//.test(c)&&!this.isCorsEnabledForUrl(c)&&(c=PROXY_URL+"?url="+encodeURIComponent(a));this.loadUrl(c,mxUtils.bind(this,function(b){f[a]=b;d--;e()}),mxUtils.bind(this,function(a){d--;e()}),!0,null,"data:"+b+";charset=utf-8;base64,")}})(b(c[g].substring(0,h)),t)}}else a()};EditorUi.prototype.exportToCanvas=function(a,b,c,d,e,g,h,l,t,m,D,B,y,z){g=null!=g?g:!0;B=null!=B?B:this.editor.graph;y=null!=y?y:0;var f=t?null:B.background;f==mxConstants.NONE&&(f=null);null==f&&(f=d);null==f&&0==t&&
+(f=this.editor.graph.defaultPageBackgroundColor);this.convertImages(B.getSvg(f,null,null,z,null,null!=h?h:!0,null,null,null,m),mxUtils.bind(this,function(c){var d=new Image;d.onload=mxUtils.bind(this,function(){try{var k=document.createElement("canvas"),h=parseInt(c.getAttribute("width")),t=parseInt(c.getAttribute("height"));l=null!=l?l:1;null!=b&&(l=g?Math.min(1,Math.min(3*b/(4*t),b/h)):b/h);h=Math.ceil(l*h)+2*y;t=Math.ceil(l*t)+2*y;k.setAttribute("width",h);k.setAttribute("height",t);var n=k.getContext("2d");
+null!=f&&(n.beginPath(),n.rect(0,0,h,t),n.fillStyle=f,n.fill());n.scale(l,l);mxClient.IS_SF?window.setTimeout(function(){n.drawImage(d,y/l,y/l);a(k)},0):(n.drawImage(d,y/l,y/l),a(k))}catch(K){null!=e&&e(K)}});d.onerror=function(a){null!=e&&e(a)};try{m&&this.editor.graph.addSvgShadow(c,c);var k=mxUtils.bind(this,function(){if(null!=this.editor.resolvedFontCss){var a=document.createElement("style");a.setAttribute("type","text/css");a.innerHTML=this.editor.resolvedFontCss;c.getElementsByTagName("defs")[0].appendChild(a)}this.convertMath(B,
+c,!0,mxUtils.bind(this,function(){d.src=this.createSvgDataUri(mxUtils.getXml(c))}))});this.loadFonts(k)}catch(A){null!=e&&e(A)}}),c,D)};EditorUi.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var b=a.convert,c=this;a.convert=function(d){if(null!=d){var f="http://"==d.substring(0,7)||"https://"==d.substring(0,8);f&&!navigator.onLine?d=c.svgBrokenImage.src:!f||d.substring(0,a.baseUrl.length)==a.baseUrl||c.crossOriginImages&&c.isCorsEnabledForUrl(d)?"chrome-extension://"!=
+d.substring(0,19)&&(d=b.apply(this,arguments)):d=PROXY_URL+"?url="+encodeURIComponent(d)}return d};return a};EditorUi.prototype.convertImages=function(a,b,c,d){null==d&&(d=this.createImageUrlConverter());var f=0,e=c||{};c=mxUtils.bind(this,function(c,g){for(var k=a.getElementsByTagName(c),h=0;h<k.length;h++)mxUtils.bind(this,function(c){var k=d.convert(c.getAttribute(g));if(null!=k&&"data:"!=k.substring(0,5)){var h=e[k];null==h?(f++,this.convertImageToDataUri(k,function(d){null!=d&&(e[k]=d,c.setAttribute(g,
+d));f--;0==f&&b(a)})):c.setAttribute(g,h)}else null!=k&&c.setAttribute(g,k)})(k[h])});c("image","xlink:href");c("img","src");0==f&&b(a)};EditorUi.prototype.loadUrl=function(a,b,c,d,e,g){try{var f=d||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||/(\.gif)($|\?)/i.test(a);e=null!=e?e:!0;var k=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=b){var d=a.getText();if(f){if((9==document.documentMode||10==document.documentMode)&&
+"undefined"!==typeof window.mxUtilsBinaryToArray){a=mxUtilsBinaryToArray(a.request.responseBody).toArray();for(var d=Array(a.length),e=0;e<a.length;e++)d[e]=String.fromCharCode(a[e]);d=d.join("")}g=null!=g?g:"data:image/png;base64,";d=g+this.base64Encode(d)}b(d)}}else null!=c&&c({code:App.ERROR_UNKNOWN},a)}),function(){null!=c&&c({code:App.ERROR_UNKNOWN})},f,this.timeout,function(){e&&null!=c&&c({code:App.ERROR_TIMEOUT,retry:k})})});k()}catch(t){null!=c&&c(t)}};EditorUi.prototype.isCorsEnabledForUrl=
function(a){null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(a)||"https://raw.githubusercontent.com/"===a.substring(0,34)||"https://cdn.rawgit.com/"===a.substring(0,23)||"https://rawgit.com/"===a.substring(0,19)||/^https?:\/\/[^\/]*\.iconfinder.com\//.test(a)||/^https?:\/\/[^\/]*\.draw\.io\/proxy/.test(a)||/^https?:\/\/[^\/]*\.github\.io\//.test(a)};EditorUi.prototype.convertImageToDataUri=
-function(a,b){if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){b(this.createSvgDataUri(a.getText()))}),function(){b(this.svgBrokenImage.src)});else{var c=new Image,d=this;this.crossOriginImages&&(c.crossOrigin="anonymous");c.onload=function(){var a=document.createElement("canvas"),f=a.getContext("2d");a.height=c.height;a.width=c.width;f.drawImage(c,0,0);try{b(a.toDataURL())}catch(v){b(d.svgBrokenImage.src)}};c.onerror=function(){b(d.svgBrokenImage.src)};c.src=a}};EditorUi.prototype.importXml=
-function(a,b,c,d,e){b=null!=b?b:0;c=null!=c?c:0;var f=[];try{var g=this.editor.graph;if(null!=a&&0<a.length){var h=mxUtils.parseXml(a),m=this.editor.extractGraphModel(h.documentElement,null!=this.pages);if(null!=m&&"mxfile"==m.nodeName&&null!=this.pages){var k=m.getElementsByTagName("diagram");if(1==k.length)m=mxUtils.parseXml(g.decompress(mxUtils.getTextContent(k[0]))).documentElement;else if(1<k.length){g.model.beginUpdate();try{for(a=0;a<k.length;a++){k[a].removeAttribute("id");var l=this.updatePageRoot(new DiagramPage(k[a])),
-n=this.pages.length;null==l.getName()&&l.setName(mxResources.get("pageWithNumber",[n+1]));g.model.execute(new ChangePage(this,l,l,n))}}finally{g.model.endUpdate()}}}null!=m&&"mxGraphModel"===m.nodeName&&(f=g.importGraphModel(m,b,c,d))}}catch(y){throw e||this.handleError(y,mxResources.get("invalidOrMissingFile")),y;}return f};EditorUi.prototype.isRemoteVisioFormat=function(a){return/(\.v(sd|dx))($|\?)/i.test(a)||/(\.vs(s|x))($|\?)/i.test(a)};EditorUi.prototype.importVisio=function(a,b,c,d){d=null!=
-d?d:a.name;c=null!=c?c:mxUtils.bind(this,function(a){this.handleError(a)});var f=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio)if(this.isRemoteVisioFormat(d)&&null!=VSD_CONVERT_URL){var f=new FormData;f.append("file1",a,d);var e=new XMLHttpRequest;e.open("POST",VSD_CONVERT_URL);e.responseType="blob";e.onreadystatechange=mxUtils.bind(this,function(){if(4==e.readyState)if(200<=e.status&&299>=e.status)try{e.response.name=d,this.doImportVisio(e.response,b,c)}catch(x){c(x)}else c({})});
-e.send(f)}else try{this.doImportVisio(a,b,c)}catch(x){c(x)}});this.doImportVisio||this.loadingExtensions||this.isOffline()?f():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",f))};EditorUi.prototype.importGraphML=function(a,b,c){c=null!=c?c:mxUtils.bind(this,function(a){this.handleError(a)});var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(a,b,c)}catch(q){c(q)}});this.doImportGraphML||this.loadingExtensions||this.isOffline()?
-d():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",d))};EditorUi.prototype.exportVisio=function(){var a=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams()}catch(h){this.handleError(h)}});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline()?a():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",a))};EditorUi.prototype.convertLucidChart=function(a,b,c){var d=mxUtils.bind(this,
+function(a,b){if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){b(this.createSvgDataUri(a.getText()))}),function(){b(this.svgBrokenImage.src)});else{var c=new Image,d=this;this.crossOriginImages&&(c.crossOrigin="anonymous");c.onload=function(){var a=document.createElement("canvas"),e=a.getContext("2d");a.height=c.height;a.width=c.width;e.drawImage(c,0,0);try{b(a.toDataURL())}catch(v){b(d.svgBrokenImage.src)}};c.onerror=function(){b(d.svgBrokenImage.src)};c.src=a}};EditorUi.prototype.importXml=
+function(a,b,c,d,e){b=null!=b?b:0;c=null!=c?c:0;var f=[];try{var g=this.editor.graph;if(null!=a&&0<a.length){var k=mxUtils.parseXml(a),h=this.editor.extractGraphModel(k.documentElement,null!=this.pages);if(null!=h&&"mxfile"==h.nodeName&&null!=this.pages){var n=h.getElementsByTagName("diagram");if(1==n.length)h=mxUtils.parseXml(g.decompress(mxUtils.getTextContent(n[0]))).documentElement;else if(1<n.length){g.model.beginUpdate();try{for(a=0;a<n.length;a++){n[a].removeAttribute("id");var l=this.updatePageRoot(new DiagramPage(n[a])),
+m=this.pages.length;null==l.getName()&&l.setName(mxResources.get("pageWithNumber",[m+1]));g.model.execute(new ChangePage(this,l,l,m))}}finally{g.model.endUpdate()}}}null!=h&&"mxGraphModel"===h.nodeName&&(f=g.importGraphModel(h,b,c,d))}}catch(y){throw e||this.handleError(y,mxResources.get("invalidOrMissingFile")),y;}return f};EditorUi.prototype.isRemoteVisioFormat=function(a){return/(\.v(sd|dx))($|\?)/i.test(a)||/(\.vs(s|x))($|\?)/i.test(a)};EditorUi.prototype.importVisio=function(a,b,c,d){d=null!=
+d?d:a.name;c=null!=c?c:mxUtils.bind(this,function(a){this.handleError(a)});var e=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio)if(this.isRemoteVisioFormat(d)&&null!=VSD_CONVERT_URL){var e=new FormData;e.append("file1",a,d);var f=new XMLHttpRequest;f.open("POST",VSD_CONVERT_URL);f.responseType="blob";f.onreadystatechange=mxUtils.bind(this,function(){if(4==f.readyState)if(200<=f.status&&299>=f.status)try{f.response.name=d,this.doImportVisio(f.response,b,c)}catch(x){c(x)}else c({})});
+f.send(e)}else try{this.doImportVisio(a,b,c)}catch(x){c(x)}});this.doImportVisio||this.loadingExtensions||this.isOffline()?e():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",e))};EditorUi.prototype.importGraphML=function(a,b,c){c=null!=c?c:mxUtils.bind(this,function(a){this.handleError(a)});var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(a,b,c)}catch(q){c(q)}});this.doImportGraphML||this.loadingExtensions||this.isOffline()?
+d():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",d))};EditorUi.prototype.exportVisio=function(){var a=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams()}catch(k){this.handleError(k)}});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline()?a():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",a))};EditorUi.prototype.convertLucidChart=function(a,b,c){var d=mxUtils.bind(this,
function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter)try{b(LucidImporter.importState(JSON.parse(a)))}catch(q){c(q)}else c({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline()?window.setTimeout(d,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",d):mxscript("js/extensions.min.js",d))};EditorUi.prototype.insertAsPreText=function(a,b,c){var d=this.editor.graph,
-f=null;d.getModel().beginUpdate();try{f=d.insertVertex(null,null,"<pre>"+a+"</pre>",b,c,1,1,"text;html=1;align=center;verticalAlign=middle;"),d.updateCellSize(f,!0)}finally{d.getModel().endUpdate()}return f};EditorUi.prototype.insertTextAt=function(a,b,c,d,e,g,k){g=null!=g?g:!0;k=null!=k?k:!0;if(null!=a)if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a))this.parseFile(new Blob([a.replace(/\s+/g," ")],{type:"application/octet-stream"}),mxUtils.bind(this,
-function(a){4==a.readyState&&200<=a.status&&299>=a.status&&this.editor.graph.setSelectionCells(this.insertTextAt(a.responseText,b,c,!0))}));else if("data:"==a.substring(0,5)||!this.isOffline()&&(e||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var f=this.editor.graph;if("data:image/png;base64,"==a.substring(0,22)){var h=this.extractGraphModelFromPng(a),m=this.importXml(h,b,c,g,!0);if(0<m.length)return m}if("data:image/svg+xml;"==a.substring(0,19))try{if(h=null,"data:image/svg+xml;base64,"==a.substring(0,
-26)?(h=a.substring(a.indexOf(",")+1),h=window.atob&&!mxClient.IS_SF?atob(h):Base64.decode(h,!0)):h=decodeURIComponent(a.substring(a.indexOf(",")+1)),m=this.importXml(h,b,c,g,!0),0<m.length)return m}catch(D){}this.loadImage(a,mxUtils.bind(this,function(d){if("data:"==a.substring(0,5))this.resizeImage(d,a,mxUtils.bind(this,function(a,d,e){f.setSelectionCell(f.insertVertex(null,null,"",f.snap(b),f.snap(c),d,e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
-this.convertDataUri(a)+";"))}),k,this.maxImageSize);else{var e=Math.min(1,Math.min(this.maxImageSize/d.width,this.maxImageSize/d.height)),g=Math.round(d.width*e);d=Math.round(d.height*e);f.setSelectionCell(f.insertVertex(null,null,"",f.snap(b),f.snap(c),g,d,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";"))}}),mxUtils.bind(this,function(){var e=null;f.getModel().beginUpdate();try{e=f.insertVertex(f.getDefaultParent(),
+e=null;d.getModel().beginUpdate();try{e=d.insertVertex(null,null,"<pre>"+a+"</pre>",b,c,1,1,"text;html=1;align=center;verticalAlign=middle;"),d.updateCellSize(e,!0)}finally{d.getModel().endUpdate()}return e};EditorUi.prototype.insertTextAt=function(a,b,c,d,e,g,h){g=null!=g?g:!0;h=null!=h?h:!0;if(null!=a)if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a))this.parseFile(new Blob([a.replace(/\s+/g," ")],{type:"application/octet-stream"}),mxUtils.bind(this,
+function(a){4==a.readyState&&200<=a.status&&299>=a.status&&this.editor.graph.setSelectionCells(this.insertTextAt(a.responseText,b,c,!0))}));else if("data:"==a.substring(0,5)||!this.isOffline()&&(e||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var f=this.editor.graph;if("data:image/png;base64,"==a.substring(0,22)){var k=this.extractGraphModelFromPng(a),n=this.importXml(k,b,c,g,!0);if(0<n.length)return n}if("data:image/svg+xml;"==a.substring(0,19))try{if(k=null,"data:image/svg+xml;base64,"==a.substring(0,
+26)?(k=a.substring(a.indexOf(",")+1),k=window.atob&&!mxClient.IS_SF?atob(k):Base64.decode(k,!0)):k=decodeURIComponent(a.substring(a.indexOf(",")+1)),n=this.importXml(k,b,c,g,!0),0<n.length)return n}catch(D){}this.loadImage(a,mxUtils.bind(this,function(d){if("data:"==a.substring(0,5))this.resizeImage(d,a,mxUtils.bind(this,function(a,d,e){f.setSelectionCell(f.insertVertex(null,null,"",f.snap(b),f.snap(c),d,e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+this.convertDataUri(a)+";"))}),h,this.maxImageSize);else{var e=Math.min(1,Math.min(this.maxImageSize/d.width,this.maxImageSize/d.height)),g=Math.round(d.width*e);d=Math.round(d.height*e);f.setSelectionCell(f.insertVertex(null,null,"",f.snap(b),f.snap(c),g,d,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";"))}}),mxUtils.bind(this,function(){var e=null;f.getModel().beginUpdate();try{e=f.insertVertex(f.getDefaultParent(),
null,a,f.snap(b),f.snap(c),1,1,"text;"+(d?"html=1;":"")),f.updateCellSize(e),f.fireEvent(new mxEventObject("textInserted","cells",[e]))}finally{f.getModel().endUpdate()}f.setSelectionCell(e)}))}else{a=this.editor.graph.zapGremlins(mxUtils.trim(a));if(this.isCompatibleString(a))return this.importXml(a,b,c,g);if(0<a.length)if(this.isLucidChartData(a))this.convertLucidChart(a,mxUtils.bind(this,function(a){this.editor.graph.setSelectionCells(this.importXml(a,b,c,g))}),mxUtils.bind(this,function(a){this.handleError(a)}));
else{f=this.editor.graph;e=null;f.getModel().beginUpdate();try{e=f.insertVertex(f.getDefaultParent(),null,"",f.snap(b),f.snap(c),1,1,"text;"+(d?"html=1;":"")),f.fireEvent(new mxEventObject("textInserted","cells",[e])),"<"==a.charAt(0)&&a.indexOf(">")==a.length-1&&(a=mxUtils.htmlEntities(a)),e.value=a,f.updateCellSize(e),/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/i.test(e.value)&&
f.setLinkForCell(e,e.value),e.geometry.width+=f.gridSize,e.geometry.height+=f.gridSize}finally{f.getModel().endUpdate()}return[e]}}return[]};EditorUi.prototype.formatFileSize=function(a){var b=-1;do a/=1024,b++;while(1024<a);return Math.max(a,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[b]};EditorUi.prototype.convertDataUri=function(a){if("data:"==a.substring(0,5)){var b=a.indexOf(";");0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1)))}return a};EditorUi.prototype.isRemoteFileFormat=
function(a,b){return/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(a)};EditorUi.prototype.isLucidChartData=function(a){return null!=a&&'{"state":"{\\"Properties\\":'==a.substring(0,26)};EditorUi.prototype.importLocalFile=function(a,b){if(a&&Graph.fileSupport&&(!mxClient.IS_IE&&!mxClient.IS_IE11||0>navigator.appVersion.indexOf("Windows NT 6.1"))){var c=document.createElement("input");c.setAttribute("type","file");mxEvent.addListener(c,"change",mxUtils.bind(this,function(){null!=c.files&&
this.importFiles(c.files,null,null,this.maxImageSize)}));c.click()}else{window.openNew=!1;window.openKey="import";if(!b){var d=Editor.useLocalStorage;Editor.useLocalStorage=!a}window.openFile=new OpenFile(mxUtils.bind(this,function(a){this.hideDialog(a)}));window.openFile.setConsumer(mxUtils.bind(this,function(a,b){if(null!=b&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(b)){var c=new Blob([a],{type:"application/octet-stream"});this.importVisio(c,mxUtils.bind(this,function(a){this.importXml(a)}),
-null,b)}else this.editor.graph.setSelectionCells(this.importXml(a))}));this.showDialog((new OpenDialog(this)).container,360,220,!0,!0,function(){window.openFile=null});if(!b){var f=this.dialog,e=f.close;this.dialog.close=mxUtils.bind(this,function(a){Editor.useLocalStorage=d;e.apply(f,arguments);a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importFile=function(a,b,c,d,e,g,k,l,t,n,D){n=null!=n?n:!0;var f=!1,h=null,m=mxUtils.bind(this,function(a){var b=
-null;null!=a&&"<mxlibrary"==a.substring(0,10)?this.loadLibrary(new LocalLibrary(this,a,k)):b=this.importXml(a,c,d,n);null!=l&&l(b)});"image"==b.substring(0,5)?(t=!1,"image/png"==b.substring(0,9)&&(b=D?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(h=this.importXml(b,c,d,n),t=!0)),t||(h=this.editor.graph,b=a.indexOf(";"),0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1))),n&&h.isGridEnabled()&&(c=h.snap(c),d=h.snap(d)),h=[h.insertVertex(null,null,"",c,d,e,g,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
-a+";")])):/(\.*<graphml )/.test(a)?(f=!0,this.importGraphML(a,m)):null!=t&&null!=k&&(/(\.v(dx|sdx?))($|\?)/i.test(k)||/(\.vs(x|sx?))($|\?)/i.test(k))?(f=!0,this.importVisio(t,m)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,k)?(f=!0,this.parseFile(null!=t?t:new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?m(a.responseText):null!=l&&l(null))}),k)):/(\.v(sd|dx))($|\?)/i.test(k)||/(\.vs(s|x))($|\?)/i.test(k)||
-(h=this.insertTextAt(this.validateFileData(a),c,d,!0,null,n));f||null==l||l(h);return h};EditorUi.prototype.base64Encode=function(a){for(var b="",c=0,d=a.length,f,e,g;c<d;){f=a.charCodeAt(c++)&255;if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&3)<<4);b+="==";break}e=a.charCodeAt(c++);if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f>>2);
-b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&3)<<4|(e&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&15)<<2);b+="=";break}g=a.charCodeAt(c++);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&3)<<4|(e&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&15)<<2|(g&192)>>6);b+=
-"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g&63)}return b};EditorUi.prototype.importFiles=function(a,b,c,d,e,g,k,l,t,n,D,C){b=null!=b?b:0;c=null!=c?c:0;d=null!=d?d:this.maxImageSize;n=null!=n?n:this.maxImageBytes;var f=null!=b&&null!=c,h=!0,m=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var p=D||this.resampleThreshold,q=0;q<a.length;q++)if("image/"==a[q].type.substring(0,6)&&a[q].size>p){m=!0;break}var w=mxUtils.bind(this,function(){var m=this.editor.graph,t=m.gridSize;
-e=null!=e?e:mxUtils.bind(this,function(a,b,c,d,e,g,h,m,k){return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,h)),null):this.importFile(a,b,c,d,e,g,h,m,k,f,C)});g=null!=g?g:mxUtils.bind(this,function(a){m.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var p=a.length,q=p,w=[],v=mxUtils.bind(this,function(a,b){w[a]=b;if(0==--q){this.spinner.stop();if(null!=l)l(w);else{var c=[];m.getModel().beginUpdate();
-try{for(var d=0;d<w.length;d++){var e=w[d]();null!=e&&(c=c.concat(e))}}finally{m.getModel().endUpdate()}}g(c)}}),u=0;u<p;u++)mxUtils.bind(this,function(f){var g=a[f],l=new FileReader;l.onload=mxUtils.bind(this,function(a){if(null==k||k(g))if("image/"==g.type.substring(0,6))if("image/svg"==g.type.substring(0,9)){var l=a.target.result,p=l.indexOf(","),q=decodeURIComponent(escape(atob(l.substring(p+1)))),w=mxUtils.parseXml(q),q=w.getElementsByTagName("svg");if(0<q.length){var q=q[0],u=C?null:q.getAttribute("content");
-null!=u&&"<"!=u.charAt(0)&&"%"!=u.charAt(0)&&(u=unescape(window.atob?atob(u):Base64.decode(u,!0)));null!=u&&"%"==u.charAt(0)&&(u=decodeURIComponent(u));null==u||"<mxfile "!==u.substring(0,8)&&"<mxGraphModel "!==u.substring(0,14)?v(f,mxUtils.bind(this,function(){try{if(l.substring(0,p+1),null!=w){var a=w.getElementsByTagName("svg");if(0<a.length){var h=a[0],k=parseFloat(h.getAttribute("width")),n=parseFloat(h.getAttribute("height")),q=h.getAttribute("viewBox");if(null==q||0==q.length)h.setAttribute("viewBox",
-"0 0 "+k+" "+n);else if(isNaN(k)||isNaN(n)){var v=q.split(" ");3<v.length&&(k=parseFloat(v[2]),n=parseFloat(v[3]))}l=this.createSvgDataUri(mxUtils.getXml(h));var u=Math.min(1,Math.min(d/Math.max(1,k)),d/Math.max(1,n)),y=e(l,g.type,b+f*t,c+f*t,Math.max(1,Math.round(k*u)),Math.max(1,Math.round(n*u)),g.name);if(isNaN(k)||isNaN(n)){var C=new Image;C.onload=mxUtils.bind(this,function(){k=Math.max(1,C.width);n=Math.max(1,C.height);y[0].geometry.width=k;y[0].geometry.height=n;h.setAttribute("viewBox","0 0 "+
-k+" "+n);l=this.createSvgDataUri(mxUtils.getXml(h));var a=l.indexOf(";");0<a&&(l=l.substring(0,a)+l.substring(l.indexOf(",",a+1)));m.setCellStyles("image",l,[y[0]])});C.src=this.createSvgDataUri(mxUtils.getXml(h))}return y}}}catch(fa){}return null})):v(f,mxUtils.bind(this,function(){return e(u,"text/xml",b+f*t,c+f*t,0,0,g.name)}))}else v(f,mxUtils.bind(this,function(){return null}))}else{q=!1;if("image/png"==g.type){var y=C?null:this.extractGraphModelFromPng(a.target.result);if(null!=y&&0<y.length){var A=
-new Image;A.src=a.target.result;v(f,mxUtils.bind(this,function(){return e(y,"text/xml",b+f*t,c+f*t,A.width,A.height,g.name)}));q=!0}}q||(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(a.target.result,mxUtils.bind(this,function(m){this.resizeImage(m,a.target.result,
-mxUtils.bind(this,function(m,k,l){v(f,mxUtils.bind(this,function(){if(null!=m&&m.length<n){var p=h&&this.isResampleImage(a.target.result,D)?Math.min(1,Math.min(d/k,d/l)):1;return e(m,g.type,b+f*t,c+f*t,Math.round(k*p),Math.round(l*p),g.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),h,d,D)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else e(a.target.result,g.type,b+f*t,c+f*t,240,160,g.name,function(a){v(f,
-function(){return a})})});/(\.v(dx|sdx?))($|\?)/i.test(g.name)||/(\.vs(x|sx?))($|\?)/i.test(g.name)?e(null,g.type,b+f*t,c+f*t,240,160,g.name,function(a){v(f,function(){return a})},g):"image"==g.type.substring(0,5)?l.readAsDataURL(g):l.readAsText(g)})(u)});m?this.confirmImageResize(function(a){h=a;w()},t):w()};EditorUi.prototype.confirmImageResize=function(a,b){b=null!=b?b:!1;var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},d=isLocalStorage||mxClient.IS_CHROMEAPP?
-mxSettings.getResizeImages():null,f=function(d,f){if(d||b)mxSettings.setResizeImages(d?f:null),mxSettings.save();c();a(f)};null==d||b?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(a){f(a,!0)},function(a){f(a,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||
-mxClient.IS_CHROMEAPP?220:200,!0,!0):f(!1,d)};EditorUi.prototype.parseFile=function(a,b,c){c=null!=c?c:a.name;var d=new FormData;d.append("format","xml");d.append("upfile",a,c);var f=new XMLHttpRequest;f.open("POST",OPEN_URL);f.onreadystatechange=function(){b(f)};f.send(d)};EditorUi.prototype.isResampleImage=function(a,b){b=null!=b?b:this.resampleThreshold;return a.length>b};EditorUi.prototype.resizeImage=function(a,b,c,d,e,g){e=null!=e?e:this.maxImageSize;var f=Math.max(1,a.width),h=Math.max(1,a.height);
-if(d&&this.isResampleImage(b,g))try{var m=Math.max(f/e,h/e);if(1<m){var k=Math.round(f/m),l=Math.round(h/m),n=document.createElement("canvas");n.width=k;n.height=l;n.getContext("2d").drawImage(a,0,0,k,l);var p=n.toDataURL();if(p.length<b.length){var q=document.createElement("canvas");q.width=k;q.height=l;var u=q.toDataURL();p!==u&&(b=p,f=k,h=l)}}}catch(B){}c(b,f,h)};EditorUi.prototype.crcTable=[];for(var b=0;256>b;b++)for(var d=b,e=0;8>e;e++)d=1==(d&1)?3988292384^d>>>1:d>>>1,EditorUi.prototype.crcTable[b]=
-d;EditorUi.prototype.updateCRC=function(a,b,c,d){for(var f=0;f<d;f++)a=EditorUi.prototype.crcTable[(a^b[c+f])&255]^a>>>8;return a};EditorUi.prototype.crc32=function(a){this.crcTable=this.crcTable||this.createCrcTable();for(var b=-1,c=0;c<a.length;c++)b=b>>>8^this.crcTable[(b^a.charCodeAt(c))&255];return(b^-1)>>>0};EditorUi.prototype.writeGraphModelToPng=function(a,b,c,d,e){function f(a,b){var c=k;k+=b;return a.substring(c,k)}function g(a){a=f(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<
-16)+(a.charCodeAt(0)<<24)}function h(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var k=0;if(f(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=e&&e();else if(f(a,4),"IHDR"!=f(a,4))null!=e&&e();else{f(a,17);e=a.substring(0,k);do{var m=g(a);if("IDAT"==f(a,4)){e=a.substring(0,k-8);c=c+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+d;d=4294967295;d=this.updateCRC(d,
-b,0,4);d=this.updateCRC(d,c,0,c.length);e+=h(c.length)+b+c+h(d^4294967295);e+=a.substring(k-8,a.length);break}e+=a.substring(k-8,k-4+m);f(a,m);f(a,4)}while(m);return"data:image/png;base64,"+(window.btoa?btoa(e):Base64.encode(e,!0))}};EditorUi.prototype.extractGraphModelFromPng=function(a){var b=null;try{var c=a.substring(a.indexOf(",")+1),d=window.atob&&!mxClient.IS_SF?atob(c):Base64.decode(c,!0);EditorUi.parsePng(d,mxUtils.bind(this,function(a,c,e){a=d.substring(a+8,a+8+e);"zTXt"==c?(e=a.indexOf(String.fromCharCode(0)),
+null,b)}else this.editor.graph.setSelectionCells(this.importXml(a))}));this.showDialog((new OpenDialog(this)).container,360,220,!0,!0,function(){window.openFile=null});if(!b){var e=this.dialog,f=e.close;this.dialog.close=mxUtils.bind(this,function(a){Editor.useLocalStorage=d;f.apply(e,arguments);a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importFile=function(a,b,c,d,e,g,h,l,t,m,D){m=null!=m?m:!0;var f=!1,k=null,n=mxUtils.bind(this,function(a){var b=
+null;null!=a&&"<mxlibrary"==a.substring(0,10)?this.loadLibrary(new LocalLibrary(this,a,h)):b=this.importXml(a,c,d,m);null!=l&&l(b)});"image"==b.substring(0,5)?(t=!1,"image/png"==b.substring(0,9)&&(b=D?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(k=this.importXml(b,c,d,m),t=!0)),t||(k=this.editor.graph,b=a.indexOf(";"),0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1))),m&&k.isGridEnabled()&&(c=k.snap(c),d=k.snap(d)),k=[k.insertVertex(null,null,"",c,d,e,g,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+a+";")])):/(\.*<graphml )/.test(a)?(f=!0,this.importGraphML(a,n)):null!=t&&null!=h&&(/(\.v(dx|sdx?))($|\?)/i.test(h)||/(\.vs(x|sx?))($|\?)/i.test(h))?(f=!0,this.importVisio(t,n)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,h)?(f=!0,this.parseFile(null!=t?t:new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?n(a.responseText):null!=l&&l(null))}),h)):/(\.v(sd|dx))($|\?)/i.test(h)||/(\.vs(s|x))($|\?)/i.test(h)||
+(k=this.insertTextAt(this.validateFileData(a),c,d,!0,null,m));f||null==l||l(k);return k};EditorUi.prototype.base64Encode=function(a){for(var b="",c=0,d=a.length,e,f,g;c<d;){e=a.charCodeAt(c++)&255;if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4);b+="==";break}f=a.charCodeAt(c++);if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);
+b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(f&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&15)<<2);b+="=";break}g=a.charCodeAt(c++);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(f&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&15)<<2|(g&192)>>6);b+=
+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g&63)}return b};EditorUi.prototype.importFiles=function(a,b,c,d,e,g,h,l,t,m,D,B){b=null!=b?b:0;c=null!=c?c:0;d=null!=d?d:this.maxImageSize;m=null!=m?m:this.maxImageBytes;var f=null!=b&&null!=c,k=!0,n=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var p=D||this.resampleThreshold,q=0;q<a.length;q++)if("image/"==a[q].type.substring(0,6)&&a[q].size>p){n=!0;break}var w=mxUtils.bind(this,function(){var t=this.editor.graph,n=t.gridSize;
+e=null!=e?e:mxUtils.bind(this,function(a,b,c,d,e,g,k,h,t){return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,k)),null):this.importFile(a,b,c,d,e,g,k,h,t,f,B)});g=null!=g?g:mxUtils.bind(this,function(a){t.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var p=a.length,q=p,w=[],v=mxUtils.bind(this,function(a,b){w[a]=b;if(0==--q){this.spinner.stop();if(null!=l)l(w);else{var c=[];t.getModel().beginUpdate();
+try{for(var d=0;d<w.length;d++){var e=w[d]();null!=e&&(c=c.concat(e))}}finally{t.getModel().endUpdate()}}g(c)}}),u=0;u<p;u++)mxUtils.bind(this,function(f){var g=a[f],l=new FileReader;l.onload=mxUtils.bind(this,function(a){if(null==h||h(g))if("image/"==g.type.substring(0,6))if("image/svg"==g.type.substring(0,9)){var l=a.target.result,p=l.indexOf(","),q=decodeURIComponent(escape(atob(l.substring(p+1)))),w=mxUtils.parseXml(q),q=w.getElementsByTagName("svg");if(0<q.length){var q=q[0],u=B?null:q.getAttribute("content");
+null!=u&&"<"!=u.charAt(0)&&"%"!=u.charAt(0)&&(u=unescape(window.atob?atob(u):Base64.decode(u,!0)));null!=u&&"%"==u.charAt(0)&&(u=decodeURIComponent(u));null==u||"<mxfile "!==u.substring(0,8)&&"<mxGraphModel "!==u.substring(0,14)?v(f,mxUtils.bind(this,function(){try{if(l.substring(0,p+1),null!=w){var a=w.getElementsByTagName("svg");if(0<a.length){var k=a[0],h=parseFloat(k.getAttribute("width")),m=parseFloat(k.getAttribute("height")),q=k.getAttribute("viewBox");if(null==q||0==q.length)k.setAttribute("viewBox",
+"0 0 "+h+" "+m);else if(isNaN(h)||isNaN(m)){var v=q.split(" ");3<v.length&&(h=parseFloat(v[2]),m=parseFloat(v[3]))}l=this.createSvgDataUri(mxUtils.getXml(k));var u=Math.min(1,Math.min(d/Math.max(1,h)),d/Math.max(1,m)),y=e(l,g.type,b+f*n,c+f*n,Math.max(1,Math.round(h*u)),Math.max(1,Math.round(m*u)),g.name);if(isNaN(h)||isNaN(m)){var B=new Image;B.onload=mxUtils.bind(this,function(){h=Math.max(1,B.width);m=Math.max(1,B.height);y[0].geometry.width=h;y[0].geometry.height=m;k.setAttribute("viewBox","0 0 "+
+h+" "+m);l=this.createSvgDataUri(mxUtils.getXml(k));var a=l.indexOf(";");0<a&&(l=l.substring(0,a)+l.substring(l.indexOf(",",a+1)));t.setCellStyles("image",l,[y[0]])});B.src=this.createSvgDataUri(mxUtils.getXml(k))}return y}}}catch(ma){}return null})):v(f,mxUtils.bind(this,function(){return e(u,"text/xml",b+f*n,c+f*n,0,0,g.name)}))}else v(f,mxUtils.bind(this,function(){return null}))}else{q=!1;if("image/png"==g.type){var y=B?null:this.extractGraphModelFromPng(a.target.result);if(null!=y&&0<y.length){var A=
+new Image;A.src=a.target.result;v(f,mxUtils.bind(this,function(){return e(y,"text/xml",b+f*n,c+f*n,A.width,A.height,g.name)}));q=!0}}q||(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(a.target.result,mxUtils.bind(this,function(h){this.resizeImage(h,a.target.result,
+mxUtils.bind(this,function(h,t,l){v(f,mxUtils.bind(this,function(){if(null!=h&&h.length<m){var p=k&&this.isResampleImage(a.target.result,D)?Math.min(1,Math.min(d/t,d/l)):1;return e(h,g.type,b+f*n,c+f*n,Math.round(t*p),Math.round(l*p),g.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),k,d,D)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else e(a.target.result,g.type,b+f*n,c+f*n,240,160,g.name,function(a){v(f,
+function(){return a})})});/(\.v(dx|sdx?))($|\?)/i.test(g.name)||/(\.vs(x|sx?))($|\?)/i.test(g.name)?e(null,g.type,b+f*n,c+f*n,240,160,g.name,function(a){v(f,function(){return a})},g):"image"==g.type.substring(0,5)?l.readAsDataURL(g):l.readAsText(g)})(u)});n?this.confirmImageResize(function(a){k=a;w()},t):w()};EditorUi.prototype.confirmImageResize=function(a,b){b=null!=b?b:!1;var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},d=isLocalStorage||mxClient.IS_CHROMEAPP?
+mxSettings.getResizeImages():null,e=function(d,e){if(d||b)mxSettings.setResizeImages(d?e:null),mxSettings.save();c();a(e)};null==d||b?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(a){e(a,!0)},function(a){e(a,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||
+mxClient.IS_CHROMEAPP?220:200,!0,!0):e(!1,d)};EditorUi.prototype.parseFile=function(a,b,c){c=null!=c?c:a.name;var d=new FormData;d.append("format","xml");d.append("upfile",a,c);var e=new XMLHttpRequest;e.open("POST",OPEN_URL);e.onreadystatechange=function(){b(e)};e.send(d)};EditorUi.prototype.isResampleImage=function(a,b){b=null!=b?b:this.resampleThreshold;return a.length>b};EditorUi.prototype.resizeImage=function(a,b,c,d,e,g){e=null!=e?e:this.maxImageSize;var f=Math.max(1,a.width),k=Math.max(1,a.height);
+if(d&&this.isResampleImage(b,g))try{var h=Math.max(f/e,k/e);if(1<h){var n=Math.round(f/h),l=Math.round(k/h),m=document.createElement("canvas");m.width=n;m.height=l;m.getContext("2d").drawImage(a,0,0,n,l);var p=m.toDataURL();if(p.length<b.length){var q=document.createElement("canvas");q.width=n;q.height=l;var u=q.toDataURL();p!==u&&(b=p,f=n,k=l)}}}catch(C){}c(b,f,k)};EditorUi.prototype.crcTable=[];for(var b=0;256>b;b++)for(var d=b,e=0;8>e;e++)d=1==(d&1)?3988292384^d>>>1:d>>>1,EditorUi.prototype.crcTable[b]=
+d;EditorUi.prototype.updateCRC=function(a,b,c,d){for(var e=0;e<d;e++)a=EditorUi.prototype.crcTable[(a^b[c+e])&255]^a>>>8;return a};EditorUi.prototype.crc32=function(a){this.crcTable=this.crcTable||this.createCrcTable();for(var b=-1,c=0;c<a.length;c++)b=b>>>8^this.crcTable[(b^a.charCodeAt(c))&255];return(b^-1)>>>0};EditorUi.prototype.writeGraphModelToPng=function(a,b,c,d,e){function f(a,b){var c=h;h+=b;return a.substring(c,h)}function g(a){a=f(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<
+16)+(a.charCodeAt(0)<<24)}function k(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var h=0;if(f(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=e&&e();else if(f(a,4),"IHDR"!=f(a,4))null!=e&&e();else{f(a,17);e=a.substring(0,h);do{var n=g(a);if("IDAT"==f(a,4)){e=a.substring(0,h-8);c=c+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+d;d=4294967295;d=this.updateCRC(d,
+b,0,4);d=this.updateCRC(d,c,0,c.length);e+=k(c.length)+b+c+k(d^4294967295);e+=a.substring(h-8,a.length);break}e+=a.substring(h-8,h-4+n);f(a,n);f(a,4)}while(n);return"data:image/png;base64,"+(window.btoa?btoa(e):Base64.encode(e,!0))}};EditorUi.prototype.extractGraphModelFromPng=function(a){var b=null;try{var c=a.substring(a.indexOf(",")+1),d=window.atob&&!mxClient.IS_SF?atob(c):Base64.decode(c,!0);EditorUi.parsePng(d,mxUtils.bind(this,function(a,c,e){a=d.substring(a+8,a+8+e);"zTXt"==c?(e=a.indexOf(String.fromCharCode(0)),
"mxGraphModel"==a.substring(0,e)&&(a=this.editor.graph.bytesToString(pako.inflateRaw(a.substring(e+2))).replace(/\+/g," "),null!=a&&0<a.length&&(b=a))):"tEXt"==c&&(a=a.split(String.fromCharCode(0)),1<a.length&&"mxGraphModel"==a[0]&&(b=a[1]));if(null!=b||"IDAT"==c)return!0}))}catch(q){}null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));return b};EditorUi.prototype.loadImage=function(a,b,c){var d=new Image;d.onload=function(){b(d)};null!=c&&(d.onerror=
c);d.src=a};var g=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();"undefined"!==typeof window.mxSettings&&(this.formatWidth=mxSettings.getFormatWidth());var a=this,b=this.editor.graph;b.getLinkTitle=function(b){return a.getLinkTitle(b)};b.customLinkClicked=function(b){var c=!1;try{a.handleCustomLink(b),c=!0}catch(A){a.handleError(A)}return c};var c=this.clearDefaultStyle;this.clearDefaultStyle=function(){c.apply(this,
arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://desk.draw.io/support/solutions/articles/16000051979");var d=a.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(b){b=null!=b?b:"";if(null!=a.pages&&null!=a.currentPage)for(var c=0;c<a.pages.length;c++)if(a.pages[c]==a.currentPage){0<c&&(b+=(0<b.length?"&":"?")+"page="+c);break}"1"==urlParams.dev&&(b+=(0<b.length?"&":"?")+"dev=1&drawdev=1");return d.apply(this,arguments)};
var e=b.addClickHandler;b.addClickHandler=function(a,c,d){var f=c;c=function(a,c){if(null==c){var d=mxEvent.getSource(a);"a"==d.nodeName.toLowerCase()&&(c=d.getAttribute("href"))}null!=c&&b.isCustomLink(c)&&(mxEvent.isTouchEvent(a)||!mxEvent.isPopupTrigger(a))&&b.customLinkClicked(c)&&mxEvent.consume(a);null!=f&&f(a,c)};e.call(this,a,c,d)};g.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(b.view.canvas.ownerSVGElement,null,!0);a.actions.get("print").funct=function(){a.showDialog((new PrintDialog(a)).container,
-360,null!=a.pages&&1<a.pages.length?420:360,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var k=b.getGlobalVariable;b.getGlobalVariable=function(b){return"page"==b&&null!=a.currentPage?a.currentPage.getName():"pagenumber"==b?null!=a.currentPage&&null!=a.pages?mxUtils.indexOf(a.pages,a.currentPage)+1:1:k.apply(this,arguments)};var l=b.labelLinkClicked;b.labelLinkClicked=function(a,c,d){var e=c.getAttribute("href");if(null==e||!b.isCustomLink(e)||!mxEvent.isTouchEvent(d)&&mxEvent.isPopupTrigger(d))l.apply(this,
-arguments);else{if(!b.isEnabled()||null!=a&&b.isCellLocked(a.cell))b.customLinkClicked(e),b.getRubberband().reset();mxEvent.consume(d)}};this.editor.getOrCreateFilename=function(){var b=a.defaultFilename,c=a.getCurrentFile();null!=c&&(b=null!=c.getTitle()?c.getTitle():b);return b};var n=this.actions.get("print");n.setEnabled(!mxClient.IS_IOS||!navigator.standalone);n.visible=n.isEnabled();if(!this.editor.chromeless||this.editor.editable){var t=function(){window.setTimeout(function(){w.innerHTML="&nbsp;";
+360,null!=a.pages&&1<a.pages.length?420:360,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var h=b.getGlobalVariable;b.getGlobalVariable=function(b){return"page"==b&&null!=a.currentPage?a.currentPage.getName():"pagenumber"==b?null!=a.currentPage&&null!=a.pages?mxUtils.indexOf(a.pages,a.currentPage)+1:1:h.apply(this,arguments)};var l=b.labelLinkClicked;b.labelLinkClicked=function(a,c,d){var e=c.getAttribute("href");if(null==e||!b.isCustomLink(e)||!mxEvent.isTouchEvent(d)&&mxEvent.isPopupTrigger(d))l.apply(this,
+arguments);else{if(!b.isEnabled()||null!=a&&b.isCellLocked(a.cell))b.customLinkClicked(e),b.getRubberband().reset();mxEvent.consume(d)}};this.editor.getOrCreateFilename=function(){var b=a.defaultFilename,c=a.getCurrentFile();null!=c&&(b=null!=c.getTitle()?c.getTitle():b);return b};var m=this.actions.get("print");m.setEnabled(!mxClient.IS_IOS||!navigator.standalone);m.visible=m.isEnabled();if(!this.editor.chromeless||this.editor.editable){var t=function(){window.setTimeout(function(){w.innerHTML="&nbsp;";
w.focus();document.execCommand("selectAll",!1,null)},0)};this.keyHandler.bindAction(70,!0,"find");this.keyHandler.bindAction(67,!0,"copyStyle",!0);this.keyHandler.bindAction(86,!0,"pasteStyle",!0);this.keyHandler.bindAction(77,!0,"editGeometry",!0);this.keyHandler.bindAction(88,!0,"insertText",!0);this.keyHandler.bindAction(75,!0,"insertRectangle");this.keyHandler.bindAction(75,!0,"insertEllipse",!0);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(this.altShiftActions[83]="synchronize");mxClient.IS_IE||
b.container.addEventListener("paste",mxUtils.bind(this,function(a){var b=this.editor.graph;if(!mxEvent.isConsumed(a))try{for(var c=a.clipboardData||a.originalEvent.clipboardData,d=!1,e=0;e<c.types.length;e++)if("text/"===c.types[e].substring(0,5)){d=!0;break}if(!d){var f=c.items;for(index in f){var g=f[index];if("file"===g.kind){if(b.isEditing())this.importFiles([g.getAsFile()],0,0,this.maxImageSize,function(a,c,d,e,f,g){b.insertImage(a,f,g)},function(){},function(a){return"image/"==a.type.substring(0,
-6)},function(a){for(var b=0;b<a.length;b++)a[b]()});else{var h=this.editor.graph.getInsertPoint();this.importFiles([g.getAsFile()],h.x,h.y,this.maxImageSize);mxEvent.consume(a)}break}}}}catch(P){}}),!1);var w=document.createElement("div");w.style.position="absolute";w.style.whiteSpace="nowrap";w.style.overflow="hidden";w.style.display="block";w.contentEditable=!0;mxUtils.setOpacity(w,0);w.style.width="1px";w.style.height="1px";w.innerHTML="&nbsp;";var D=!1;this.keyHandler.bindControlKey(88,null);
+6)},function(a){for(var b=0;b<a.length;b++)a[b]()});else{var k=this.editor.graph.getInsertPoint();this.importFiles([g.getAsFile()],k.x,k.y,this.maxImageSize);mxEvent.consume(a)}break}}}}catch(Q){}}),!1);var w=document.createElement("div");w.style.position="absolute";w.style.whiteSpace="nowrap";w.style.overflow="hidden";w.style.display="block";w.contentEditable=!0;mxUtils.setOpacity(w,0);w.style.width="1px";w.style.height="1px";w.innerHTML="&nbsp;";var D=!1;this.keyHandler.bindControlKey(88,null);
this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(a){var c=mxEvent.getSource(a);null==b.container||!b.isEnabled()||b.isMouseDown||b.isEditing()||null!=this.dialog||"INPUT"==c.nodeName||"TEXTAREA"==c.nodeName||!(224==a.keyCode||!mxClient.IS_MAC&&17==a.keyCode||mxClient.IS_MAC&&91==a.keyCode)||D||(w.style.left=b.container.scrollLeft+10+"px",w.style.top=b.container.scrollTop+10+"px",b.container.appendChild(w),
D=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){w.focus();document.execCommand("selectAll",!1,null)},0):(w.focus(),document.execCommand("selectAll",!1,null)))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(a){var c=a.keyCode;window.setTimeout(mxUtils.bind(this,function(){!D||224!=c&&17!=c&&91!=c||(D=!1,b.isEditing()||null!=this.dialog||null==b.container||b.container.focus(),w.parentNode.removeChild(w),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(w,
-"copy",mxUtils.bind(this,function(a){b.isEnabled()&&(mxClipboard.copy(b),this.copyCells(w),t())}));mxEvent.addListener(w,"cut",mxUtils.bind(this,function(a){b.isEnabled()&&(mxClipboard.copy(b),this.copyCells(w,!0),t())}));mxEvent.addListener(w,"paste",mxUtils.bind(this,function(a){b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(w.innerHTML="&nbsp;",w.focus(),window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,w);w.innerHTML="&nbsp;"}),0))}),!0);var C=this.isSelectionAllowed;this.isSelectionAllowed=
-function(a){return mxEvent.getSource(a)==w?!0:C.apply(this,arguments)}}this.spinner=this.createSpinner(document.body.clientWidth/2-2,Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,24);Graph.fileSupport&&this.editor.graph.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(a){var b=this.editor.graph,c=b.cellEditor.text2,d=null;null!=c&&(mxEvent.addListener(c,"dragleave",function(a){null!=d&&(d.parentNode.removeChild(d),d=null);a.stopPropagation();a.preventDefault()}),
+"copy",mxUtils.bind(this,function(a){b.isEnabled()&&(mxClipboard.copy(b),this.copyCells(w),t())}));mxEvent.addListener(w,"cut",mxUtils.bind(this,function(a){b.isEnabled()&&(mxClipboard.copy(b),this.copyCells(w,!0),t())}));mxEvent.addListener(w,"paste",mxUtils.bind(this,function(a){b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(w.innerHTML="&nbsp;",w.focus(),window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,w);w.innerHTML="&nbsp;"}),0))}),!0);var B=this.isSelectionAllowed;this.isSelectionAllowed=
+function(a){return mxEvent.getSource(a)==w?!0:B.apply(this,arguments)}}this.spinner=this.createSpinner(document.body.clientWidth/2-2,Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,24);Graph.fileSupport&&this.editor.graph.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(a){var b=this.editor.graph,c=b.cellEditor.text2,d=null;null!=c&&(mxEvent.addListener(c,"dragleave",function(a){null!=d&&(d.parentNode.removeChild(d),d=null);a.stopPropagation();a.preventDefault()}),
mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(a){null==d&&(!mxClient.IS_IE||10<document.documentMode)&&(d=this.highlightElement(c));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(c,"drop",mxUtils.bind(this,function(a){null!=d&&(d.parentNode.removeChild(d),d=null);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,function(a,c,d,e,f,g){b.insertImage(a,f,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=
0;b<a.length;b++)a[b]()},mxEvent.isControlDown(a));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")){var c=a.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)?this.loadImage(decodeURIComponent(c),mxUtils.bind(this,function(a){var d=Math.max(1,a.width);a=Math.max(1,a.height);var e=this.maxImageSize,e=Math.min(1,Math.min(e/Math.max(1,d)),e/Math.max(1,a));b.insertImage(decodeURIComponent(c),d*e,a*e)})):document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"))}else 0<=
-mxUtils.indexOf(a.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"));a.stopPropagation();a.preventDefault()})))}));if("1"==urlParams.ruler&&"undefined"!==typeof mxRuler){n=document.createElement("div");n.style.position="absolute";n.style.top="95px";n.style.left="250px";n.style.width="2000px";n.style.height="30px";n.style.background=
-"whiteSmoke";document.body.appendChild(n);var y=document.createElement("div");y.style.position="absolute";y.style.top="125px";y.style.left="220px";y.style.width="30px";y.style.height="1000px";y.style.background="whiteSmoke";document.body.appendChild(y);var z=document.createElement("div");z.style.position="absolute";z.style.top="95px";z.style.left="220px";z.style.width="30px";z.style.height="30px";z.style.background="whiteSmoke";document.body.appendChild(z);this.vRuler=new mxRuler(this.editor.graph,
-y,!0);this.hRuler=new mxRuler(this.editor.graph,n,!1)}if("1"==urlParams.styledev){n=document.getElementById("geFooter");null!=n&&(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)})),n.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){if(0<this.editor.graph.getSelectionCount()){var c=this.editor.graph.getSelectionCell(),c=this.editor.graph.getModel().getStyle(c);this.styleInput.value=c||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var G=this.isSelectionAllowed;
-this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:G.apply(this,arguments)}}n=document.getElementById("geInfo");null!=n&&n.parentNode.removeChild(n);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var B=null;mxEvent.addListener(b.container,"dragleave",function(a){b.isEnabled()&&(null!=B&&(B.parentNode.removeChild(B),B=null),a.stopPropagation(),a.preventDefault())});mxEvent.addListener(b.container,"dragover",mxUtils.bind(this,function(a){null==
-B&&(!mxClient.IS_IE||10<document.documentMode)&&(B=this.highlightElement(b.container));null!=this.sidebar&&this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()}));mxEvent.addListener(b.container,"drop",mxUtils.bind(this,function(a){null!=B&&(B.parentNode.removeChild(B),B=null);if(b.isEnabled()){var c=mxUtils.convertPoint(b.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),d=b.view.translate,e=b.view.scale,f=c.x/e-d.x,g=c.y/e-d.y;mxEvent.isAltDown(a)&&(g=f=0);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,
-f,g,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a));else{var h=0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):null,c=this.extractGraphModelFromEvent(a,null!=this.pages);if(null!=c)b.setSelectionCells(this.importXml(c,f,g,!0));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")){var k=a.dataTransfer.getData("text/html"),c=document.createElement("div");c.innerHTML=k;var m=null,d=c.getElementsByTagName("img");
-null!=d&&1==d.length?(k=d[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)||(m=!0)):(c=c.getElementsByTagName("a"),null!=c&&1==c.length&&(k=c[0].getAttribute("href")));var t=!0,l=mxUtils.bind(this,function(){b.setSelectionCells(this.insertTextAt(k,f,g,!0,m,null,t))});m&&k.length>this.resampleThreshold?this.confirmImageResize(function(a){t=a;l()},mxEvent.isControlDown(a)):l()}else null!=h&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(h)?this.loadImage(decodeURIComponent(h),mxUtils.bind(this,
-function(a){var c=Math.max(1,a.width);a=Math.max(1,a.height);var d=this.maxImageSize,d=Math.min(1,Math.min(d/Math.max(1,c)),d/Math.max(1,a));b.setSelectionCell(b.insertVertex(null,null,"",f,g,c*d,a*d,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+h+";"))}),mxUtils.bind(this,function(a){b.setSelectionCells(this.insertTextAt(h,f,g,!0))})):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&b.setSelectionCells(this.insertTextAt(a.dataTransfer.getData("text/plain"),
+mxUtils.indexOf(a.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"));a.stopPropagation();a.preventDefault()})))}));if("1"==urlParams.ruler&&"undefined"!==typeof mxRuler){m=document.createElement("div");m.style.position="absolute";m.style.top="95px";m.style.left="250px";m.style.width="2000px";m.style.height="30px";m.style.background=
+"whiteSmoke";document.body.appendChild(m);var y=document.createElement("div");y.style.position="absolute";y.style.top="125px";y.style.left="220px";y.style.width="30px";y.style.height="1000px";y.style.background="whiteSmoke";document.body.appendChild(y);var z=document.createElement("div");z.style.position="absolute";z.style.top="95px";z.style.left="220px";z.style.width="30px";z.style.height="30px";z.style.background="whiteSmoke";document.body.appendChild(z);this.vRuler=new mxRuler(this.editor.graph,
+y,!0);this.hRuler=new mxRuler(this.editor.graph,m,!1)}if("1"==urlParams.styledev){m=document.getElementById("geFooter");null!=m&&(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)})),m.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){if(0<this.editor.graph.getSelectionCount()){var c=this.editor.graph.getSelectionCell(),c=this.editor.graph.getModel().getStyle(c);this.styleInput.value=c||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var G=this.isSelectionAllowed;
+this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:G.apply(this,arguments)}}m=document.getElementById("geInfo");null!=m&&m.parentNode.removeChild(m);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var C=null;mxEvent.addListener(b.container,"dragleave",function(a){b.isEnabled()&&(null!=C&&(C.parentNode.removeChild(C),C=null),a.stopPropagation(),a.preventDefault())});mxEvent.addListener(b.container,"dragover",mxUtils.bind(this,function(a){null==
+C&&(!mxClient.IS_IE||10<document.documentMode)&&(C=this.highlightElement(b.container));null!=this.sidebar&&this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()}));mxEvent.addListener(b.container,"drop",mxUtils.bind(this,function(a){null!=C&&(C.parentNode.removeChild(C),C=null);if(b.isEnabled()){var c=mxUtils.convertPoint(b.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),d=b.view.translate,e=b.view.scale,f=c.x/e-d.x,g=c.y/e-d.y;mxEvent.isAltDown(a)&&(g=f=0);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,
+f,g,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a));else{var k=0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):null,c=this.extractGraphModelFromEvent(a,null!=this.pages);if(null!=c)b.setSelectionCells(this.importXml(c,f,g,!0));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")){var h=a.dataTransfer.getData("text/html"),c=document.createElement("div");c.innerHTML=h;var t=null,d=c.getElementsByTagName("img");
+null!=d&&1==d.length?(h=d[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(h)||(t=!0)):(c=c.getElementsByTagName("a"),null!=c&&1==c.length&&(h=c[0].getAttribute("href")));var n=!0,l=mxUtils.bind(this,function(){b.setSelectionCells(this.insertTextAt(h,f,g,!0,t,null,n))});t&&h.length>this.resampleThreshold?this.confirmImageResize(function(a){n=a;l()},mxEvent.isControlDown(a)):l()}else null!=k&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)?this.loadImage(decodeURIComponent(k),mxUtils.bind(this,
+function(a){var c=Math.max(1,a.width);a=Math.max(1,a.height);var d=this.maxImageSize,d=Math.min(1,Math.min(d/Math.max(1,c)),d/Math.max(1,a));b.setSelectionCell(b.insertVertex(null,null,"",f,g,c*d,a*d,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+k+";"))}),mxUtils.bind(this,function(a){b.setSelectionCells(this.insertTextAt(k,f,g,!0))})):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&b.setSelectionCells(this.insertTextAt(a.dataTransfer.getData("text/plain"),
f,g,!0))}}a.stopPropagation();a.preventDefault()}),!1)}this.initPages();this.editUpdateListener=mxUtils.bind(this,function(a,b){var c=b.getProperty("edit");null!=c&&this.updateEditReferences(c)});this.editor.undoManager.addListener(mxEvent.BEFORE_UNDO,this.editUpdateListener);this.editor.undoManager.addListener(mxEvent.BEFORE_REDO,this.editUpdateListener);"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.getLinkTitle=function(a){var b=Graph.prototype.getLinkTitle.apply(this,
arguments);if("data:page/id,"==a.substring(0,13)){var c=a.indexOf(",");0<c&&(b=this.getPageById(a.substring(c+1)),b=null!=b?b.getName():mxResources.get("pageNotFound"))}else"data:"==a.substring(0,5)&&(b=mxResources.get("action"));return b};EditorUi.prototype.handleCustomLink=function(a){if("data:page/id,"==a.substring(0,13)){var b=a.indexOf(",");if(a=this.getPageById(a.substring(b+1)))this.selectPage(a);else throw Error(mxResources.get("pageNotFound")||"Page not found");}else this.editor.graph.handleCustomLink(a)};
EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){ColorDialog.recentColors=mxSettings.getRecentColors();this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",
@@ -8113,7 +8114,7 @@ mxUtils.bind(this,function(a,b){mxSettings.setCreateTarget(this.editor.graph.con
mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(a,b){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&this.sidebar.showPalette("search",mxSettings.settings.search);this.editor.chromeless&&!this.editor.editable||null==this.sidebar||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),
mxSettings.save());this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyCells=function(a,b){var c=this.editor.graph;if(c.isSelectionEmpty())a.innerHTML="";else{var d=mxUtils.sortCells(c.model.getTopmostCells(c.getSelectionCells())),e=mxUtils.getXml(this.editor.graph.encodeCells(d));mxUtils.setTextContent(a,encodeURIComponent(e));b?(c.removeCells(d,!1),c.lastPasteXml=null):(c.lastPasteXml=e,c.pasteCounter=0);a.focus();
document.execCommand("selectAll",!1,null)}};EditorUi.prototype.pasteCells=function(a,b){if(!mxEvent.isConsumed(a)){var c=b.getElementsByTagName("span");if(null!=c&&0<c.length&&"application/vnd.lucid.chart.objects"===c[0].getAttribute("data-lucid-type")){var d=c[0].getAttribute("data-lucid-content");null!=d&&0<d.length&&(this.convertLucidChart(d,mxUtils.bind(this,function(a){this.editor.graph.setSelectionCells(this.importXml(a,0,0))}),mxUtils.bind(this,function(a){this.handleError(a)})),mxEvent.consume(a))}else{var d=
-this.editor.graph,e=mxUtils.trim(mxClient.IS_QUIRKS||8==document.documentMode?mxUtils.getTextContent(b):b.textContent),f=!1;try{var g=e.lastIndexOf("%3E");0<=g&&g<e.length-3&&(e=e.substring(0,g+3))}catch(t){}try{var c=b.getElementsByTagName("span"),h=null!=c&&0<c.length?mxUtils.trim(decodeURIComponent(c[0].textContent)):decodeURIComponent(e);this.isCompatibleString(h)&&(f=!0,e=h)}catch(t){}d.lastPasteXml==e?d.pasteCounter++:(d.lastPasteXml=e,d.pasteCounter=0);c=d.pasteCounter*d.gridSize;if(null!=
+this.editor.graph,e=mxUtils.trim(mxClient.IS_QUIRKS||8==document.documentMode?mxUtils.getTextContent(b):b.textContent),f=!1;try{var g=e.lastIndexOf("%3E");0<=g&&g<e.length-3&&(e=e.substring(0,g+3))}catch(t){}try{var c=b.getElementsByTagName("span"),k=null!=c&&0<c.length?mxUtils.trim(decodeURIComponent(c[0].textContent)):decodeURIComponent(e);this.isCompatibleString(k)&&(f=!0,e=k)}catch(t){}d.lastPasteXml==e?d.pasteCounter++:(d.lastPasteXml=e,d.pasteCounter=0);c=d.pasteCounter*d.gridSize;if(null!=
e&&0<e.length&&(f||this.isCompatibleString(e)?d.setSelectionCells(this.importXml(e,c,c)):(f=d.getInsertPoint(),d.isMouseInsertPoint()&&(c=0,d.lastPasteXml==e&&0<d.pasteCounter&&d.pasteCounter--),d.setSelectionCells(this.insertTextAt(e,f.x+c,f.y+c,!0))),!d.isSelectionEmpty())){d.scrollCellToVisible(d.getSelectionCell());null!=this.hoverIcons&&this.hoverIcons.update(d.view.getState(d.getSelectionCell()));try{mxEvent.consume(a)}catch(t){}}}}};EditorUi.prototype.addFileDropHandler=function(a){if(Graph.fileSupport)for(var b=
null,c=0;c<a.length;c++)mxEvent.addListener(a[c],"dragleave",function(a){null!=b&&(b.parentNode.removeChild(b),b=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(a[c],"dragover",mxUtils.bind(this,function(a){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==b&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(b=this.highlightElement());a.stopPropagation();a.preventDefault()})),mxEvent.addListener(a[c],"drop",mxUtils.bind(this,function(a){null!=b&&
(b.parentNode.removeChild(b),b=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<a.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(a)&&!mxEvent.isShiftDown(a)):this.openFiles(a.dataTransfer.files,!0);else{var c=this.extractGraphModelFromEvent(a);if(null==c){var d=null!=a.dataTransfer?a.dataTransfer:a.clipboardData;null!=d&&(10==document.documentMode||11==document.documentMode?
@@ -8136,20 +8137,20 @@ this.format&&this.format.refresh()}))};EditorUi.prototype.showLayersDialog=funct
bounds:b.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:b.view.scale,page:b.view.getBackgroundPageBounds()}};EditorUi.prototype.installMessageHandler=function(a){var b=null,c=!1,d=!1,e=null,f=mxUtils.bind(this,function(a,b){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,f);mxEvent.addListener(window,
"message",mxUtils.bind(this,function(f){if(f.source==(window.opener||window.parent)){var h=f.data,k=mxUtils.bind(this,function(a){if(null!=a&&"function"===typeof a.charAt&&"<"!=a.charAt(0))try{"data:image/png;base64,"==a.substring(0,22)?a=this.extractGraphModelFromPng(a):"data:image/svg+xml;base64,"==a.substring(0,26)?a=atob(a.substring(26)):"data:image/svg+xml;utf8,"==a.substring(0,24)&&(a=a.substring(24)),null!=a&&("%"==a.charAt(0)?a=decodeURIComponent(a):"<"!=a.charAt(0)&&(a=this.editor.graph.decompress(a)))}catch(M){}return a});
if("json"==urlParams.proto){try{h=JSON.parse(h)}catch(H){h=null}if(null==h)return;if("dialog"==h.action){this.showError(null!=h.titleKey?mxResources.get(h.titleKey):h.title,null!=h.messageKey?mxResources.get(h.messageKey):h.message,null!=h.buttonKey?mxResources.get(h.buttonKey):h.button);null!=h.modified&&(this.editor.modified=h.modified);return}if("prompt"==h.action){this.spinner.stop();k=new FilenameDialog(this,h.defaultValue||"",null!=h.okKey?mxResources.get(h.okKey):null,function(a){null!=a&&
-g.postMessage(JSON.stringify({event:"prompt",value:a,message:h}),"*")},null!=h.titleKey?mxResources.get(h.titleKey):h.title);this.showDialog(k.container,300,80,!0,!1);k.init();return}if("draft"==h.action){var m=k(h.xml);this.spinner.stop();k=new DraftDialog(this,mxResources.get("draftFound",[h.name||this.defaultFilename]),m,mxUtils.bind(this,function(){this.hideDialog();g.postMessage(JSON.stringify({event:"draft",result:"edit",message:h}),"*")}),mxUtils.bind(this,function(){this.hideDialog();g.postMessage(JSON.stringify({event:"draft",
+g.postMessage(JSON.stringify({event:"prompt",value:a,message:h}),"*")},null!=h.titleKey?mxResources.get(h.titleKey):h.title);this.showDialog(k.container,300,80,!0,!1);k.init();return}if("draft"==h.action){var l=k(h.xml);this.spinner.stop();k=new DraftDialog(this,mxResources.get("draftFound",[h.name||this.defaultFilename]),l,mxUtils.bind(this,function(){this.hideDialog();g.postMessage(JSON.stringify({event:"draft",result:"edit",message:h}),"*")}),mxUtils.bind(this,function(){this.hideDialog();g.postMessage(JSON.stringify({event:"draft",
result:"discard",message:h}),"*")}),h.editKey?mxResources.get(h.editKey):null,h.discardKey?mxResources.get(h.discardKey):null,h.ignore?mxUtils.bind(this,function(){this.hideDialog();g.postMessage(JSON.stringify({event:"draft",result:"ignore",message:h}),"*")}):null);this.showDialog(k.container,640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{k.init()}catch(H){g.postMessage(JSON.stringify({event:"draft",error:H.toString(),message:h}),"*")}return}if("template"==
-h.action){this.spinner.stop();k=1==h.enableRecent;m=1==h.enableSearch;k=new NewDialog(this,!1,null!=h.callback,mxUtils.bind(this,function(b,c){b=b||this.emptyDiagramXml;null!=h.callback?g.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,name:c}),"*"):(a(b,f,b!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,k?mxUtils.bind(this,function(a){this.recentReadyCallback=a;g.postMessage(JSON.stringify({event:"recentDocs"}),
-"*")}):null,m?mxUtils.bind(this,function(a,b){this.searchReadyCallback=b;g.postMessage(JSON.stringify({event:"searchDocs",searchStr:a}),"*")}):null,function(a,b,c){g.postMessage(JSON.stringify({event:"template",docUrl:a,info:b,name:c}),"*")});this.showDialog(k.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));k.init();return}if("searchDocsList"==h.action)this.searchReadyCallback(h.list,h.errorMsg);else if("recentDocsList"==h.action)this.recentReadyCallback(h.list,
-h.errorMsg);else{if("textContent"==h.action){this.editor.graph.setEnabled(!1);var l=this.editor.graph,k="";if(null!=this.pages)for(m=0;m<this.pages.length;m++){var n=l;this.currentPage!=this.pages[m]&&(n=this.createTemporaryGraph(l.getStylesheet()),n.model.setRoot(this.pages[m].root));k+=this.pages[m].getName()+" "+n.getIndexableText()+" "}else k=l.getIndexableText();this.editor.graph.setEnabled(!0);g.postMessage(JSON.stringify({event:"textContent",data:k,message:h}),"*");return}if("status"==h.action){null!=
+h.action){this.spinner.stop();k=1==h.enableRecent;l=1==h.enableSearch;k=new NewDialog(this,!1,null!=h.callback,mxUtils.bind(this,function(b,c){b=b||this.emptyDiagramXml;null!=h.callback?g.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,name:c}),"*"):(a(b,f,b!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,k?mxUtils.bind(this,function(a){this.recentReadyCallback=a;g.postMessage(JSON.stringify({event:"recentDocs"}),
+"*")}):null,l?mxUtils.bind(this,function(a,b){this.searchReadyCallback=b;g.postMessage(JSON.stringify({event:"searchDocs",searchStr:a}),"*")}):null,function(a,b,c){g.postMessage(JSON.stringify({event:"template",docUrl:a,info:b,name:c}),"*")});this.showDialog(k.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));k.init();return}if("searchDocsList"==h.action)this.searchReadyCallback(h.list,h.errorMsg);else if("recentDocsList"==h.action)this.recentReadyCallback(h.list,
+h.errorMsg);else{if("textContent"==h.action){this.editor.graph.setEnabled(!1);var n=this.editor.graph,k="";if(null!=this.pages)for(l=0;l<this.pages.length;l++){var m=n;this.currentPage!=this.pages[l]&&(m=this.createTemporaryGraph(n.getStylesheet()),m.model.setRoot(this.pages[l].root));k+=this.pages[l].getName()+" "+m.getIndexableText()+" "}else k=n.getIndexableText();this.editor.graph.setEnabled(!0);g.postMessage(JSON.stringify({event:"textContent",data:k,message:h}),"*");return}if("status"==h.action){null!=
h.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(h.messageKey))):null!=h.message&&this.editor.setStatus(mxUtils.htmlEntities(h.message));null!=h.modified&&(this.editor.modified=h.modified);return}if("spinner"==h.action){var p=null!=h.messageKey?mxResources.get(h.messageKey):h.message;null==h.show||h.show?this.spinner.spin(document.body,p):this.spinner.stop();return}if("export"==h.action){if("png"==h.format||"xmlpng"==h.format){if(null==h.spin&&null==h.spinKey||this.spinner.spin(document.body,
-null!=h.spinKey?mxResources.get(h.spinKey):h.spin)){var v=null!=h.xml?h.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var l=this.editor.graph,q=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();var b=this.createLoadMessage("export");b.format=h.format;b.message=h;b.data=a;b.xml=encodeURIComponent(v);g.postMessage(JSON.stringify(b),"*")}),u=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);"xmlpng"==h.format&&(a=this.writeGraphModelToPng(a,"zTXt",
-"mxGraphModel",atob(this.editor.graph.compress(v))));l!=this.editor.graph&&l.container.parentNode.removeChild(l.container);q(a)});if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage!=this.pages[0]){var l=this.createTemporaryGraph(l.getStylesheet()),x=l.getGlobalVariable,A=this.pages[0];l.getGlobalVariable=function(a){return"page"==a?A.getName():"pagenumber"==a?1:x.apply(this,arguments)};document.body.appendChild(l.container);l.model.setRoot(A.root)}this.exportToCanvas(mxUtils.bind(this,
-function(a){u(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,function(){u(null)}),null,null,null,null,null,null,l)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==h.format?"1":"0")+"&base64=1&xml="+encodeURIComponent(encodeURIComponent(v)))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?q("data:image/png;base64,"+a.getText()):u(null)}),mxUtils.bind(this,function(){u(null)}))}}else{null!=h.xml&&0<h.xml.length&&this.setFileData(h.xml);p=this.createLoadMessage("export");
+null!=h.spinKey?mxResources.get(h.spinKey):h.spin)){var v=null!=h.xml?h.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var n=this.editor.graph,q=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();var b=this.createLoadMessage("export");b.format=h.format;b.message=h;b.data=a;b.xml=encodeURIComponent(v);g.postMessage(JSON.stringify(b),"*")}),u=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);"xmlpng"==h.format&&(a=this.writeGraphModelToPng(a,"zTXt",
+"mxGraphModel",atob(this.editor.graph.compress(v))));n!=this.editor.graph&&n.container.parentNode.removeChild(n.container);q(a)});if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage!=this.pages[0]){var n=this.createTemporaryGraph(n.getStylesheet()),x=n.getGlobalVariable,A=this.pages[0];n.getGlobalVariable=function(a){return"page"==a?A.getName():"pagenumber"==a?1:x.apply(this,arguments)};document.body.appendChild(n.container);n.model.setRoot(A.root)}this.exportToCanvas(mxUtils.bind(this,
+function(a){u(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,function(){u(null)}),null,null,null,null,null,null,n)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==h.format?"1":"0")+"&base64=1&xml="+encodeURIComponent(encodeURIComponent(v)))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?q("data:image/png;base64,"+a.getText()):u(null)}),mxUtils.bind(this,function(){u(null)}))}}else{null!=h.xml&&0<h.xml.length&&this.setFileData(h.xml);p=this.createLoadMessage("export");
if("html2"==h.format||"html"==h.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length))k=this.getXmlFileData(),p.xml=mxUtils.getXml(k),p.data=this.getFileData(null,null,!0,null,null,null,k),p.format=h.format;else if("html"==h.format)v=this.editor.getGraphXml(),p.data=this.getHtml(v,this.editor.graph),p.xml=mxUtils.getXml(v),p.format=h.format;else{mxSvgCanvas2D.prototype.foAltText=null;k=this.editor.graph.background;k==mxConstants.NONE&&(k=null);p.xml=this.getFileData(!0);p.format="svg";
if(h.embedImages||null==h.embedImages){if(null==h.spin&&null==h.spinKey||this.spinner.spin(document.body,null!=h.spinKey?mxResources.get(h.spinKey):h.spin))this.editor.graph.setEnabled(!1),"xmlsvg"==h.format?this.getEmbeddedSvg(p.xml,this.editor.graph,null,!0,mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();p.data=this.createSvgDataUri(a);g.postMessage(JSON.stringify(p),"*")})):this.convertImages(this.editor.graph.getSvg(k),mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);
this.spinner.stop();p.data=this.createSvgDataUri(mxUtils.getXml(a));g.postMessage(JSON.stringify(p),"*")}));return}k="xmlsvg"==h.format?this.getEmbeddedSvg(this.getFileData(!0),this.editor.graph,null,!0):mxUtils.getXml(this.editor.graph.getSvg(k));p.data=this.createSvgDataUri(k)}g.postMessage(JSON.stringify(p),"*")}return}if("load"==h.action)d=1==h.autosave,this.hideDialog(),null!=h.modified&&null==urlParams.modified&&(urlParams.modified=h.modified),null!=h.saveAndExit&&null==urlParams.saveAndExit&&
-(urlParams.saveAndExit=h.saveAndExit),null!=h.title&&null!=this.buttonContainer&&(m=document.createElement("span"),mxUtils.write(m,h.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="12px"):"min"!=uiTheme&&(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(m),this.embedFilenameSpan=
-m),h=null!=h.xmlpng?this.extractGraphModelFromPng(h.xmlpng):h.xml;else{g.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(h)}),"*");return}}}var E=mxUtils.bind(this,function(f,h){c=!0;try{a(f,h)}catch(T){this.handleError(T)}c=!1;null!=urlParams.modified&&this.editor.setStatus("");var k=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});e=k();d&&null==b&&(b=mxUtils.bind(this,
+(urlParams.saveAndExit=h.saveAndExit),null!=h.title&&null!=this.buttonContainer&&(l=document.createElement("span"),mxUtils.write(l,h.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="12px"):"min"!=uiTheme&&(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(l),this.embedFilenameSpan=
+l),h=null!=h.xmlpng?this.extractGraphModelFromPng(h.xmlpng):h.xml;else{g.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(h)}),"*");return}}}var E=mxUtils.bind(this,function(f,h){c=!0;try{a(f,h)}catch(T){this.handleError(T)}c=!1;null!=urlParams.modified&&this.editor.setStatus("");var k=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});e=k();d&&null==b&&(b=mxUtils.bind(this,
function(a,b){var d=k();if(d!=e&&!c){var f=this.createLoadMessage("autosave");f.xml=d;d=JSON.stringify(f);(window.opener||window.parent).postMessage(d,"*")}e=d}),this.editor.graph.model.addListener(mxEvent.CHANGE,b),this.editor.graph.addListener("gridSizeChanged",b),this.editor.graph.addListener("shadowVisibleChanged",b),this.addListener("pageFormatChanged",b),this.addListener("pageScaleChanged",b),this.addListener("backgroundColorChanged",b),this.addListener("backgroundImageChanged",b),this.addListener("foldingEnabledChanged",
b),this.addListener("mathEnabledChanged",b),this.addListener("gridEnabledChanged",b),this.addListener("guidesEnabledChanged",b),this.addListener("pageViewChanged",b));"1"!=urlParams.returnbounds&&"json"!=urlParams.proto||g.postMessage(JSON.stringify(this.createLoadMessage("load")),"*")});null!=h&&"function"===typeof h.substring&&"data:application/vnd.visio;base64,"==h.substring(0,34)?(k="0M8R4KGxGuE"==h.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(h.substring(h.indexOf(",")+
1)),function(a){E(a,f)},mxUtils.bind(this,function(a){this.handleError(a)}),k)):null!=h&&"function"===typeof h.substring&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(h,"")?this.parseFile(new Blob([h],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&"<mxGraphModel"==a.responseText.substring(0,13)&&E(a.responseText,f)}),""):null!=h&&"function"===typeof h.substring&&this.isLucidChartData(h)?this.convertLucidChart(h,
@@ -8157,58 +8158,58 @@ mxUtils.bind(this,function(a){E(a)}),mxUtils.bind(this,function(a){this.handleEr
"2px";var b=document.createElement("button");mxUtils.write(b,mxResources.get("save"));b.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)");b.className="geBigButton";b.style.fontSize="12px";b.style.padding="4px 6px 4px 6px";b.style.borderRadius="3px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()}));a.appendChild(b);"1"==urlParams.saveAndExit&&(b=document.createElement("a"),mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",
mxResources.get("saveAndExit")),b.style.fontSize="12px",b.style.marginLeft="6px",b.style.padding="4px",b.style.cursor="pointer",mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b));b=document.createElement("a");mxUtils.write(b,mxResources.get("exit"));b.setAttribute("title",mxResources.get("exit"));b.style.fontSize="12px";b.style.marginLeft="6px";b.style.marginRight="20px";b.style.padding="4px";b.style.cursor="pointer";mxEvent.addListener(b,
"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()}));a.appendChild(b);this.toolbar.container.appendChild(a);this.toolbar.staticElements.push(a);a.style.right="atlas"!=uiTheme?"52px":"42px"}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(a){this.importCsv(a)}),null,null,620,430,null,!0,!0,mxResources.get("import")));this.showDialog(this.importCsvDialog.container,
-640,520,!0,!0);this.importCsvDialog.init()};EditorUi.prototype.importCsv=function(a,b){try{var c=a.split("\n"),d=[];if(0<c.length){var e={},f=null,g=null,h=null,k=null,l="",n="auto",C="auto",y=null,z=null,G=40,B=40,F=100,I=0,A=this.editor.graph;A.getGraphBounds();for(var E=function(){null!=b?b(ea):(A.setSelectionCells(ea),A.scrollCellToVisible(A.getSelectionCell()))},H=A.getFreeInsertPoint(),M=H.x,K=H.y,H=K,T=null,P="auto",k=null,S=[],aa=null,Z=null,N=0;N<c.length&&"#"==c[N].charAt(0);){a=c[N];for(N++;N<
-c.length&&"\\"==a.charAt(a.length-1)&&"#"==c[N].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(c[N].substring(1)),N++;if("#"!=a.charAt(1)){var Y=a.indexOf(":");if(0<Y){var Q=mxUtils.trim(a.substring(1,Y)),L=mxUtils.trim(a.substring(Y+1));"label"==Q?T=A.sanitizeHtml(L):"style"==Q?f=L:"parentstyle"==Q?g=L:"identity"==Q&&0<L.length&&"-"!=L?h=L:"parent"==Q&&0<L.length&&"-"!=L?k=L:"namespace"==Q&&0<L.length&&"-"!=L?l=L:"width"==Q?n=L:"height"==Q?C=L:"left"==Q&&0<L.length?y=L:"top"==Q&&0<L.length?
-z=L:"ignore"==Q?Z=L.split(","):"connect"==Q?S.push(JSON.parse(L)):"link"==Q?aa=L:"padding"==Q?I=parseFloat(L):"edgespacing"==Q?G=parseFloat(L):"nodespacing"==Q?B=parseFloat(L):"levelspacing"==Q?F=parseFloat(L):"layout"==Q&&(P=L)}}}var U=this.editor.csvToArray(c[N]),Q=Y=null;if(null!=h||null!=k)for(var R=0;R<U.length;R++)h==U[R]&&(Y=R),k==U[R]&&(Q=R);null==T&&(T="%"+U[0]+"%");if(null!=S)for(var O=0;O<S.length;O++)null==e[S[O].to]&&(e[S[O].to]={});A.model.beginUpdate();try{for(R=N+1;R<c.length;R++){var V=
-this.editor.csvToArray(c[R]);if(V.length==U.length){var J=null,X=null!=Y?l+V[Y]:null;null!=X&&(J=A.model.getCell(X));null==J&&(J=new mxCell(T,new mxGeometry(M,H,0,0),f||"whiteSpace=wrap;html=1;"),J.vertex=!0,J.id=X);for(var W=0;W<V.length;W++)A.setAttributeForCell(J,U[W],V[W]);A.setAttributeForCell(J,"placeholders","1");J.style=A.replacePlaceholders(J,J.style);for(O=0;O<S.length;O++)e[S[O].to][J.getAttribute(S[O].to)]=J;null!=aa&&"link"!=aa&&(A.setLinkForCell(J,J.getAttribute(aa)),A.setAttributeForCell(J,
-aa,null));A.fireEvent(new mxEventObject("cellsInserted","cells",[J]));var da=this.editor.graph.getPreferredSizeForCell(J);J.vertex&&(null!=y&&null!=J.getAttribute(y)&&(J.geometry.x=M+parseFloat(J.getAttribute(y))),null!=z&&null!=J.getAttribute(z)&&(J.geometry.y=K+parseFloat(J.getAttribute(z))),"@"==n.charAt(0)&&null!=J.getAttribute(n.substring(1))?J.geometry.width=parseFloat(J.getAttribute(n.substring(1))):J.geometry.width="auto"==n?da.width+I:parseFloat(n),"@"==C.charAt(0)&&null!=J.getAttribute(C.substring(1))?
-J.geometry.height=parseFloat(J.getAttribute(C.substring(1))):J.geometry.height="auto"==C?da.height+I:parseFloat(C),H+=J.geometry.height+B);k=null!=Q?A.model.getCell(l+V[Q]):null;null!=k?(k.style=A.replacePlaceholders(k,g),A.addCell(J,k)):d.push(A.addCell(J))}}for(var ba=d.slice(),ea=d.slice(),O=0;O<S.length;O++)for(var ca=S[O],R=0;R<d.length;R++){var J=d[R],la=J.getAttribute(ca.from);if(null!=la){A.setAttributeForCell(J,ca.from,null);for(var ma=la.split(","),W=0;W<ma.length;W++){var fa=e[ca.to][ma[W]];
-null!=fa&&(T=ca.label,null!=ca.fromlabel&&(T=(J.getAttribute(ca.fromlabel)||"")+(T||"")),null!=ca.tolabel&&(T=(T||"")+(fa.getAttribute(ca.tolabel)||"")),ea.push(A.insertEdge(null,null,T||"",ca.invert?fa:J,ca.invert?J:fa,ca.style||A.createCurrentEdgeStyle())),mxUtils.remove(ca.invert?J:fa,ba))}}}if(null!=Z)for(R=0;R<d.length;R++)for(J=d[R],W=0;W<Z.length;W++)A.setAttributeForCell(J,mxUtils.trim(Z[W]),null);var ia=new mxParallelEdgeLayout(A);ia.spacing=G;var na=function(){ia.execute(A.getDefaultParent());
-for(var a=0;a<d.length;a++){var b=A.getCellGeometry(d[a]);b.x=Math.round(A.snap(b.x));b.y=Math.round(A.snap(b.y));"auto"==n&&(b.width=Math.round(A.snap(b.width)));"auto"==C&&(b.height=Math.round(A.snap(b.height)))}};if("circle"==P){var ja=new mxCircleLayout(A);ja.resetEdges=!1;var oa=ja.isVertexIgnored;ja.isVertexIgnored=function(a){return oa.apply(this,arguments)||0>mxUtils.indexOf(d,a)};this.executeLayout(function(){ja.execute(A.getDefaultParent());na()},!0,E);E=null}else if("horizontaltree"==P||
-"verticaltree"==P||"auto"==P&&ea.length==2*d.length-1&&1==ba.length){A.view.validate();var ka=new mxCompactTreeLayout(A,"horizontaltree"==P);ka.levelDistance=B;ka.edgeRouting=!1;ka.resetEdges=!1;this.executeLayout(function(){ka.execute(A.getDefaultParent(),0<ba.length?ba[0]:null)},!0,E);E=null}else if("horizontalflow"==P||"verticalflow"==P||"auto"==P&&1==ba.length){A.view.validate();var ga=new mxHierarchicalLayout(A,"horizontalflow"==P?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);ga.intraCellSpacing=
-B;ga.parallelEdgeSpacing=G;ga.interRankCellSpacing=F;ga.disableEdgeStyle=!1;this.executeLayout(function(){ga.execute(A.getDefaultParent(),ea);A.moveCells(ea,M,K)},!0,E);E=null}else if("organic"==P||"auto"==P&&ea.length>d.length){A.view.validate();var ha=new mxFastOrganicLayout(A);ha.forceConstant=3*B;ha.resetEdges=!1;var pa=ha.isVertexIgnored;ha.isVertexIgnored=function(a){return pa.apply(this,arguments)||0>mxUtils.indexOf(d,a)};ia=new mxParallelEdgeLayout(A);ia.spacing=G;this.executeLayout(function(){ha.execute(A.getDefaultParent());
-na()},!0,E);E=null}this.hideDialog()}finally{A.model.endUpdate()}null!=E&&E()}}catch(qa){this.handleError(qa)}};EditorUi.prototype.getSearch=function(a){var b="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=a&&0<window.location.search.length){var c="?",d;for(d in urlParams)0>mxUtils.indexOf(a,d)&&null!=urlParams[d]&&(b+=c+d+"="+urlParams[d],c="&")}else b=window.location.search;return b};EditorUi.prototype.getUrl=function(a){a=null!=a?a:window.location.pathname;var b=0<a.indexOf("?")?1:0;
-if("1"==urlParams.offline)a+=window.location.search;else{var c="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),d;for(d in urlParams)0>mxUtils.indexOf(c,d)&&(a=0==b?a+"?":a+"&",null!=urlParams[d]&&(a+=d+"="+urlParams[d],b++))}return a};EditorUi.prototype.showLinkDialog=function(a,b,c){a=new LinkDialog(this,a,b,c,!0);this.showDialog(a.container,480,130,!0,!0);a.init()};var k=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=
-k.apply(this,arguments),c=this.editor.graph,d=b.getSourceGraphBounds;b.getSourceGraphBounds=function(){if(mxUtils.hasScrollbars(c.container)&&c.pageVisible&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width-2*a.x/b),Math.ceil(this.source.minimumGraphSize.height-2*a.y/b))}return d.apply(this,arguments)};var e=b.getSourceContainerSize;b.getSourceContainerSize=function(){if(mxUtils.hasScrollbars(c.container)&&
-null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width*b-2*a.x),Math.ceil(this.source.minimumGraphSize.height*b-2*a.y))}return e.apply(this,arguments)};b.getOutlineOffset=function(a){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var d=this.source.getPagePadding();return new mxPoint(Math.round(Math.max(0,(b.outline.container.clientWidth/a-(this.source.minimumGraphSize.width-
-2*d.x))/2)-d.x),Math.round(Math.max(0,(b.outline.container.clientHeight/a-(this.source.minimumGraphSize.height-2*d.y))/2)-d.y-5/a))}return new mxPoint(8/a,8/a)};var f=b.init;b.init=function(){f.apply(this,arguments);b.outline.view.getBackgroundPageBounds=function(){var a=c.getPageLayout(),b=c.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*b.width),this.scale*(this.translate.y+a.y*b.height),this.scale*a.width*b.width,this.scale*a.height*b.height)};b.outline.view.validateBackgroundPage()};
-this.editor.addListener("pageSelected",function(a,c){var d=c.getProperty("change"),e=b.source,f=b.outline;f.pageScale=e.pageScale;f.pageFormat=e.pageFormat;f.background=e.background;f.pageVisible=e.pageVisible;f.background=e.background;var g=mxUtils.getCurrentStyle(e.container);f.container.style.backgroundColor=g.backgroundColor;null!=e.view.backgroundPageShape&&null!=f.view.backgroundPageShape&&(f.view.backgroundPageShape.fill=e.view.backgroundPageShape.fill);b.outline.view.clear(d.previousPage.root,
-!0);b.outline.view.validate()});return b};EditorUi.prototype.getServiceCount=function(a,b){var c=0;null==this.drive&&"function"!==typeof window.DriveClient||c++;b||null==this.dropbox&&"function"!==typeof window.DropboxClient||c++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||c++;b||null==this.gitHub||c++;b||null==this.trello&&"function"!==typeof window.TrelloClient||c++;a&&isLocalStorage&&("1"==urlParams.browser||mxClient.IS_IOS)&&c++;mxClient.IS_IOS||c++;return c};EditorUi.prototype.updateUi=
-function(){this.updateButtonContainer();this.updateActionStates();var a=this.getCurrentFile(),b=null!=a||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(b);this.menus.get("viewZoom").setEnabled(b);var c=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==a||a.isRestricted());this.actions.get("makeCopy").setEnabled(!c);this.actions.get("print").setEnabled(!c);this.menus.get("exportAs").setEnabled(!c);this.menus.get("embed").setEnabled(!c);c="1"!=
-urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(c);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(c),this.menus.get("newLibrary").setEnabled(c));a="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=a&&a.isEditable();this.actions.get("image").setEnabled(b);this.actions.get("zoomIn").setEnabled(b);this.actions.get("zoomOut").setEnabled(b);this.actions.get("resetView").setEnabled(b);this.actions.get("undo").setEnabled(this.canUndo()&&
-a);this.actions.get("redo").setEnabled(this.canRedo()&&a);this.menus.get("edit").setEnabled(b);this.menus.get("view").setEnabled(b);this.menus.get("importFrom").setEnabled(a);this.menus.get("arrange").setEnabled(a);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(a),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(a));if(this.isAppCache()){var d=applicationCache;if(null!=d&&null==this.offlineStatus){this.offlineStatus=document.createElement("div");
-this.offlineStatus.className="geItem";this.offlineStatus.style.position="absolute";this.offlineStatus.style.fontSize="8pt";this.offlineStatus.style.top="2px";this.offlineStatus.style.right="12px";this.offlineStatus.style.color="#666";this.offlineStatus.style.margin="4px";this.offlineStatus.style.padding="2px";this.offlineStatus.style.verticalAlign="middle";this.offlineStatus.innerHTML="";this.menubarContainer.appendChild(this.offlineStatus);mxEvent.addListener(this.offlineStatus,"click",mxUtils.bind(this,
-function(){var a=this.offlineStatus.getElementsByTagName("img");null!=a&&0<a.length&&this.alert(a[0].getAttribute("title"))}));var d=window.applicationCache,e=null,b=mxUtils.bind(this,function(){var a=d.status,b;a==d.CHECKING&&(a=d.DOWNLOADING);switch(a){case d.UNCACHED:b="";break;case d.IDLE:b="min"==uiTheme?"":'<img title="draw.io is up to date." border="0" src="'+IMAGE_PATH+'/checkmark.gif"/>';break;case d.DOWNLOADING:b='<img title="Downloading new version..." border="0" src="'+IMAGE_PATH+'/spin.gif"/>';
-break;case d.UPDATEREADY:b='<img title="'+mxUtils.htmlEntities(mxResources.get("restartForChangeRequired"))+'" border="0" src="'+IMAGE_PATH+'/download.png"/>';break;case d.OBSOLETE:b='<img title="Obsolete" border="0" src="'+IMAGE_PATH+'/clear.gif"/>';break;default:b='<img title="Unknown" border="0" src="'+IMAGE_PATH+'/clear.gif"/>'}a!=e&&(this.offlineStatus.innerHTML=b,e=a)});mxEvent.addListener(d,"checking",b);mxEvent.addListener(d,"noupdate",b);mxEvent.addListener(d,"downloading",b);mxEvent.addListener(d,
-"progress",b);mxEvent.addListener(d,"cached",b);mxEvent.addListener(d,"updateready",b);mxEvent.addListener(d,"obsolete",b);mxEvent.addListener(d,"error",b);b()}}else this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.isDiagramActive=function(){var a=this.getCurrentFile();return null!=a&&a.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var l=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=
-function(){l.apply(this,arguments);var a=this.editor.graph,b=this.isDiagramActive(),c=this.getCurrentFile();this.actions.get("pageSetup").setEnabled(b);this.actions.get("autosave").setEnabled(null!=c&&c.isEditable()&&c.isAutosaveOptional());this.actions.get("guides").setEnabled(b);this.actions.get("editData").setEnabled(b);this.actions.get("shadowVisible").setEnabled(b);this.actions.get("connectionArrows").setEnabled(b);this.actions.get("connectionPoints").setEnabled(b);this.actions.get("copyStyle").setEnabled(b&&
-!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("editGeometry").setEnabled(a.getModel().isVertex(a.getSelectionCell()));this.actions.get("createShape").setEnabled(b);this.actions.get("createRevision").setEnabled(b);this.actions.get("moveToFolder").setEnabled(null!=c);this.actions.get("makeCopy").setEnabled(null!=c&&!c.isRestricted());this.actions.get("editDiagram").setEnabled(b&&(null==c||!c.isRestricted()));this.actions.get("publishLink").setEnabled(null!=
-c&&!c.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("find").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=c&&c.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=c);
-this.menus.get("publish").setEnabled(null!=c&&!c.isRestricted());a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(b&&null!=a&&null!=a.shape&&null!=a.shape.stencil)};var n=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){this.editUpdateListener&&(this.editor.undoManager.removeListener(this.editUpdateListener),this.editUpdateListener=null);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);n.apply(this,
-arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,b,c,d,e,g){var f=a.editor.graph;if("xml"==c)a.hideDialog(),a.saveData(b,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("svg"==c)a.hideDialog(),a.saveData(b,"svg",mxUtils.getXml(f.getSvg(d,e,g)),"image/svg+xml");else{var h=a.getFileData(!0,null,null,null,null,!0),k=f.getGraphBounds(),l=Math.floor(k.width*e/f.view.scale),m=Math.floor(k.height*e/f.view.scale);
-h.length<=MAX_REQUEST_SIZE&&l*m<MAX_AREA?(a.hideDialog(),a.saveRequest(b,c,function(a,b){return new mxXmlRequest(EXPORT_URL,"format="+c+"&base64="+(b||"0")+(null!=a?"&filename="+encodeURIComponent(a):"")+"&bg="+(null!=d?d:"none")+"&w="+l+"&h="+m+"&border="+g+"&xml="+encodeURIComponent(h))})):mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.updateEditReferences=function(a){for(var b=0;b<a.changes.length;b++){var c=a.changes[b];if(null!=c&&c.constructor==mxChildChange&&null!=
-c.child){var d=c.child;if(null!=d.source&&null!=d.source.id){var e=this.getFutureCellForEdit(c.model,a,d.source.id);e!=d.source&&(d.source=e)}null!=d.target&&null!=d.target.id&&(c=this.getFutureCellForEdit(c.model,a,d.target.id),c!=d.target&&(d.target=c))}}};EditorUi.prototype.getFutureCellForEdit=function(a,b,c){var d=a.getCell(c);if(null==d)for(var e=b.changes.length-1;0<=e;e--){var f=b.changes[e];if(f.constructor==mxChildChange&&null!=f.child&&f.child.id==c){a.contains(f.previous)&&(d=f.child);
-break}}return d}})();EditorUi.DIFF_INSERT="i";EditorUi.DIFF_REMOVE="r";EditorUi.DIFF_UPDATE="u";EditorUi.prototype.codec=new mxCodec;EditorUi.prototype.viewStateProperties={background:!0,backgroundImage:!0,shadowVisible:!0,foldingEnabled:!0,pageScale:!0,mathEnabled:!0,pageFormat:!0};EditorUi.prototype.cellProperties={id:!0,value:!0,xmlValue:!0,vertex:!0,edge:!0,visible:!0,collapsed:!0,connectable:!0,parent:!0,children:!0,previous:!0,source:!0,target:!0,edges:!0,geometry:!0,style:!0,mxObjectId:!0,mxTransient:!0};
-EditorUi.prototype.patchPages=function(a,c,b,d,e){var g={},k=[],l={},n={},f={},h={};if(null!=d&&null!=d[EditorUi.DIFF_UPDATE])for(var m in d[EditorUi.DIFF_UPDATE])g[m]=d[EditorUi.DIFF_UPDATE][m];if(null!=c[EditorUi.DIFF_REMOVE])for(d=0;d<c[EditorUi.DIFF_REMOVE].length;d++)n[c[EditorUi.DIFF_REMOVE][d]]=!0;if(null!=c[EditorUi.DIFF_INSERT])for(d=0;d<c[EditorUi.DIFF_INSERT].length;d++)l[c[EditorUi.DIFF_INSERT][d].previous]=c[EditorUi.DIFF_INSERT][d];if(null!=c[EditorUi.DIFF_UPDATE])for(m in c[EditorUi.DIFF_UPDATE])d=
-c[EditorUi.DIFF_UPDATE][m],null!=d.previous&&(h[d.previous]=m);if(null!=a){var p="";for(d=0;d<a.length;d++){var q=a[d].getId();f[q]=a[d];null!=h[p]||n[q]||null!=c[EditorUi.DIFF_UPDATE]&&null!=c[EditorUi.DIFF_UPDATE][q]&&null!=c[EditorUi.DIFF_UPDATE][q].previous||(h[p]=q);p=q}}var u={},v=mxUtils.bind(this,function(a){var d=null!=a?a.getId():"";if(null!=a&&!u[d]){u[d]=!0;k.push(a);var m=null!=c[EditorUi.DIFF_UPDATE]?c[EditorUi.DIFF_UPDATE][d]:null;null!=m&&(this.updatePageRoot(a),null!=m.name&&a.setName(m.name),
-null!=m.view&&this.patchViewState(a,m.view),null!=m.cells&&this.patchPage(a,m.cells,g[a.getId()],e),!b||null==m.cells&&null==m.view||(a.needsUpdate=!0))}a=h[d];null!=a&&(delete h[d],v(f[a]));a=l[d];null!=a&&(delete l[d],x(a))}),x=mxUtils.bind(this,function(a){a=mxUtils.parseXml(a.data).documentElement;a=new DiagramPage(a);this.updatePageRoot(a);var c=f[a.getId()];null==c?v(a):(c.root=a.root,this.currentPage==c?this.editor.graph.model.setRoot(c.root):b&&(c.needsUpdate=!0))});v();for(m in h)v(f[h[m]]),
-delete h[m];for(m in l)x(l[m]),delete l[m];return k};EditorUi.prototype.patchViewState=function(a,c){if(null!=a.viewState&&null!=c){a==this.currentPage&&(a.viewState=this.editor.graph.getViewState());for(var b in c)a.viewState[b]=JSON.parse(c[b]);a==this.currentPage&&this.editor.graph.setViewState(a.viewState)}};
-EditorUi.prototype.createParentLookup=function(a,c){function b(a){var b=d[a];null==b&&(b={inserted:[],moved:{}},d[a]=b);return b}var d={};if(null!=c[EditorUi.DIFF_INSERT])for(var e=0;e<c[EditorUi.DIFF_INSERT].length;e++){var g=c[EditorUi.DIFF_INSERT][e],k=null!=g.parent?g.parent:"",l=null!=g.previous?g.previous:"";b(k).inserted[l]=g}if(null!=c[EditorUi.DIFF_UPDATE])for(var n in c[EditorUi.DIFF_UPDATE])g=c[EditorUi.DIFF_UPDATE][n],null!=g.previous&&(k=g.parent,null==k&&(e=a.getCell(n),null!=e&&(e=
-a.getParent(e),null!=e&&(k=e.getId()))),null!=k&&(b(k).moved[g.previous]=n));return d};
-EditorUi.prototype.patchPage=function(a,c,b,d){var e=a==this.currentPage?this.editor.graph.model:new mxGraphModel(a.root),g=this.createParentLookup(e,c);e.beginUpdate();try{var k=e.updateEdgeParent,l=new mxDictionary,n=[];e.updateEdgeParent=function(a,b){!l.get(a)&&d&&(l.put(a,!0),n.push(a))};var f=g[""],h=null!=f&&null!=f.inserted?f.inserted[""]:null,m=null;null!=h&&(m=this.getCellForJson(h));if(null==m){var p=null!=f&&null!=f.moved?f.moved[""]:null;null!=p&&(m=e.getCell(p))}null!=m&&(e.setRoot(m),
-a.root=m);if(null!=c[EditorUi.DIFF_REMOVE])for(var q=0;q<c[EditorUi.DIFF_REMOVE].length;q++){var u=e.getCell(c[EditorUi.DIFF_REMOVE][q]);null!=u&&e.remove(u)}this.patchCellRecursive(a,e,e.root,g,c);if(null!=c[EditorUi.DIFF_UPDATE]){var v=null!=b&&null!=b.cells?b.cells[EditorUi.DIFF_UPDATE]:null;for(p in c[EditorUi.DIFF_UPDATE])this.patchCell(e,e.getCell(p),c[EditorUi.DIFF_UPDATE][p],null!=v?v[p]:null)}if(null!=c[EditorUi.DIFF_INSERT])for(q=0;q<c[EditorUi.DIFF_INSERT].length;q++)h=c[EditorUi.DIFF_INSERT][q],
-u=e.getCell(h.id),null!=u&&(e.setTerminal(u,e.getCell(h.source),!0),e.setTerminal(u,e.getCell(h.target),!1));e.updateEdgeParent=k;if(d&&0<n.length)for(q=0;q<n.length;q++)e.contains(n[q])&&e.updateEdgeParent(n[q])}finally{e.endUpdate()}};
-EditorUi.prototype.patchCellRecursive=function(a,c,b,d,e){for(var g=d[b.getId()],k=null!=g&&null!=g.inserted?g.inserted:{},l=null!=g&&null!=g.moved?g.moved:{},n=0,g=c.getChildCount(b),f="",h=0;h<g;h++){var m=c.getChildAt(b,h).getId();null==l[f]&&(null==e[EditorUi.DIFF_UPDATE]||null==e[EditorUi.DIFF_UPDATE][m]||null==e[EditorUi.DIFF_UPDATE][m].previous&&null==e[EditorUi.DIFF_UPDATE][m].parent)&&(l[f]=m);f=m}var p=mxUtils.bind(this,function(f){var g=null!=f?f.getId():"";null!=f&&(c.getChildAt(b,n)!=
-f&&c.add(b,f,n),this.patchCellRecursive(a,c,f,d,e),n++);f=l[g];null!=f&&(delete l[g],p(c.getCell(f)));f=k[g];null!=f&&(delete k[g],p(this.getCellForJson(f)))});p();for(var q in l)p(c.getCell(l[q])),delete l[q];for(q in k)p(this.getCellForJson(k[q])),delete k[q]};
+640,520,!0,!0);this.importCsvDialog.init()};EditorUi.prototype.importCsv=function(a,b){try{var c=a.split("\n"),d=[];if(0<c.length){var e={},f=null,g=null,h=null,k=null,l="",m="auto",B="auto",y=null,z=null,G=40,C=40,F=100,I=0,A=this.editor.graph;A.getGraphBounds();for(var E=function(){null!=b?b(ea):(A.setSelectionCells(ea),A.scrollCellToVisible(A.getSelectionCell()))},H=A.getFreeInsertPoint(),M=H.x,K=H.y,H=K,T=null,Q="auto",k=null,S=[],Z=null,Y=null,N=0;N<c.length&&"#"==c[N].charAt(0);){a=c[N];for(N++;N<
+c.length&&"\\"==a.charAt(a.length-1)&&"#"==c[N].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(c[N].substring(1)),N++;if("#"!=a.charAt(1)){var X=a.indexOf(":");if(0<X){var R=mxUtils.trim(a.substring(1,X)),L=mxUtils.trim(a.substring(X+1));"label"==R?T=A.sanitizeHtml(L):"style"==R?f=L:"parentstyle"==R?g=L:"identity"==R&&0<L.length&&"-"!=L?h=L:"parent"==R&&0<L.length&&"-"!=L?k=L:"namespace"==R&&0<L.length&&"-"!=L?l=L:"width"==R?m=L:"height"==R?B=L:"left"==R&&0<L.length?y=L:"top"==R&&0<L.length?
+z=L:"ignore"==R?Y=L.split(","):"connect"==R?S.push(JSON.parse(L)):"link"==R?Z=L:"padding"==R?I=parseFloat(L):"edgespacing"==R?G=parseFloat(L):"nodespacing"==R?C=parseFloat(L):"levelspacing"==R?F=parseFloat(L):"layout"==R&&(Q=L)}}}var U=this.editor.csvToArray(c[N]),R=X=null;if(null!=h||null!=k)for(var O=0;O<U.length;O++)h==U[O]&&(X=O),k==U[O]&&(R=O);null==T&&(T="%"+U[0]+"%");if(null!=S)for(var P=0;P<S.length;P++)null==e[S[P].to]&&(e[S[P].to]={});A.model.beginUpdate();try{for(O=N+1;O<c.length;O++){var V=
+this.editor.csvToArray(c[O]);if(null==V){var ba=40<c[O].length?c[O].substring(0,40)+"...":c[O];throw Error(O+" ("+ba+") "+mxResources.get("containsValidationErrors"));}if(V.length==U.length){var J=null,ca=null!=X?l+V[X]:null;null!=ca&&(J=A.model.getCell(ca));null==J&&(J=new mxCell(T,new mxGeometry(M,H,0,0),f||"whiteSpace=wrap;html=1;"),J.vertex=!0,J.id=ca);for(var W=0;W<V.length;W++)A.setAttributeForCell(J,U[W],V[W]);A.setAttributeForCell(J,"placeholders","1");J.style=A.replacePlaceholders(J,J.style);
+for(P=0;P<S.length;P++)e[S[P].to][J.getAttribute(S[P].to)]=J;null!=Z&&"link"!=Z&&(A.setLinkForCell(J,J.getAttribute(Z)),A.setAttributeForCell(J,Z,null));A.fireEvent(new mxEventObject("cellsInserted","cells",[J]));var da=this.editor.graph.getPreferredSizeForCell(J);J.vertex&&(null!=y&&null!=J.getAttribute(y)&&(J.geometry.x=M+parseFloat(J.getAttribute(y))),null!=z&&null!=J.getAttribute(z)&&(J.geometry.y=K+parseFloat(J.getAttribute(z))),"@"==m.charAt(0)&&null!=J.getAttribute(m.substring(1))?J.geometry.width=
+parseFloat(J.getAttribute(m.substring(1))):J.geometry.width="auto"==m?da.width+I:parseFloat(m),"@"==B.charAt(0)&&null!=J.getAttribute(B.substring(1))?J.geometry.height=parseFloat(J.getAttribute(B.substring(1))):J.geometry.height="auto"==B?da.height+I:parseFloat(B),H+=J.geometry.height+C);k=null!=R?A.model.getCell(l+V[R]):null;null!=k?(k.style=A.replacePlaceholders(k,g),A.addCell(J,k)):d.push(A.addCell(J))}}for(var fa=d.slice(),ea=d.slice(),P=0;P<S.length;P++)for(var aa=S[P],O=0;O<d.length;O++){var J=
+d[O],na=J.getAttribute(aa.from);if(null!=na){A.setAttributeForCell(J,aa.from,null);for(var ma=na.split(","),W=0;W<ma.length;W++){var ga=e[aa.to][ma[W]];null!=ga&&(T=aa.label,null!=aa.fromlabel&&(T=(J.getAttribute(aa.fromlabel)||"")+(T||"")),null!=aa.tolabel&&(T=(T||"")+(ga.getAttribute(aa.tolabel)||"")),ea.push(A.insertEdge(null,null,T||"",aa.invert?ga:J,aa.invert?J:ga,aa.style||A.createCurrentEdgeStyle())),mxUtils.remove(aa.invert?J:ga,fa))}}}if(null!=Y)for(O=0;O<d.length;O++)for(J=d[O],W=0;W<Y.length;W++)A.setAttributeForCell(J,
+mxUtils.trim(Y[W]),null);var ja=new mxParallelEdgeLayout(A);ja.spacing=G;var oa=function(){ja.execute(A.getDefaultParent());for(var a=0;a<d.length;a++){var b=A.getCellGeometry(d[a]);b.x=Math.round(A.snap(b.x));b.y=Math.round(A.snap(b.y));"auto"==m&&(b.width=Math.round(A.snap(b.width)));"auto"==B&&(b.height=Math.round(A.snap(b.height)))}};if("circle"==Q){var ka=new mxCircleLayout(A);ka.resetEdges=!1;var pa=ka.isVertexIgnored;ka.isVertexIgnored=function(a){return pa.apply(this,arguments)||0>mxUtils.indexOf(d,
+a)};this.executeLayout(function(){ka.execute(A.getDefaultParent());oa()},!0,E);E=null}else if("horizontaltree"==Q||"verticaltree"==Q||"auto"==Q&&ea.length==2*d.length-1&&1==fa.length){A.view.validate();var la=new mxCompactTreeLayout(A,"horizontaltree"==Q);la.levelDistance=C;la.edgeRouting=!1;la.resetEdges=!1;this.executeLayout(function(){la.execute(A.getDefaultParent(),0<fa.length?fa[0]:null)},!0,E);E=null}else if("horizontalflow"==Q||"verticalflow"==Q||"auto"==Q&&1==fa.length){A.view.validate();
+var ha=new mxHierarchicalLayout(A,"horizontalflow"==Q?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);ha.intraCellSpacing=C;ha.parallelEdgeSpacing=G;ha.interRankCellSpacing=F;ha.disableEdgeStyle=!1;this.executeLayout(function(){ha.execute(A.getDefaultParent(),ea);A.moveCells(ea,M,K)},!0,E);E=null}else if("organic"==Q||"auto"==Q&&ea.length>d.length){A.view.validate();var ia=new mxFastOrganicLayout(A);ia.forceConstant=3*C;ia.resetEdges=!1;var qa=ia.isVertexIgnored;ia.isVertexIgnored=function(a){return qa.apply(this,
+arguments)||0>mxUtils.indexOf(d,a)};ja=new mxParallelEdgeLayout(A);ja.spacing=G;this.executeLayout(function(){ia.execute(A.getDefaultParent());oa()},!0,E);E=null}this.hideDialog()}finally{A.model.endUpdate()}null!=E&&E()}}catch(ra){this.handleError(ra)}};EditorUi.prototype.getSearch=function(a){var b="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=a&&0<window.location.search.length){var c="?",d;for(d in urlParams)0>mxUtils.indexOf(a,d)&&null!=urlParams[d]&&(b+=c+d+"="+urlParams[d],c="&")}else b=
+window.location.search;return b};EditorUi.prototype.getUrl=function(a){a=null!=a?a:window.location.pathname;var b=0<a.indexOf("?")?1:0;if("1"==urlParams.offline)a+=window.location.search;else{var c="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),d;for(d in urlParams)0>mxUtils.indexOf(c,d)&&(a=0==b?a+"?":a+"&",null!=urlParams[d]&&(a+=d+"="+urlParams[d],b++))}return a};EditorUi.prototype.showLinkDialog=function(a,b,c){a=new LinkDialog(this,a,b,c,
+!0);this.showDialog(a.container,480,130,!0,!0);a.init()};var h=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=h.apply(this,arguments),c=this.editor.graph,d=b.getSourceGraphBounds;b.getSourceGraphBounds=function(){if(mxUtils.hasScrollbars(c.container)&&c.pageVisible&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width-2*a.x/b),Math.ceil(this.source.minimumGraphSize.height-
+2*a.y/b))}return d.apply(this,arguments)};var e=b.getSourceContainerSize;b.getSourceContainerSize=function(){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width*b-2*a.x),Math.ceil(this.source.minimumGraphSize.height*b-2*a.y))}return e.apply(this,arguments)};b.getOutlineOffset=function(a){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var d=
+this.source.getPagePadding();return new mxPoint(Math.round(Math.max(0,(b.outline.container.clientWidth/a-(this.source.minimumGraphSize.width-2*d.x))/2)-d.x),Math.round(Math.max(0,(b.outline.container.clientHeight/a-(this.source.minimumGraphSize.height-2*d.y))/2)-d.y-5/a))}return new mxPoint(8/a,8/a)};var f=b.init;b.init=function(){f.apply(this,arguments);b.outline.view.getBackgroundPageBounds=function(){var a=c.getPageLayout(),b=c.getPageSize();return new mxRectangle(this.scale*(this.translate.x+
+a.x*b.width),this.scale*(this.translate.y+a.y*b.height),this.scale*a.width*b.width,this.scale*a.height*b.height)};b.outline.view.validateBackgroundPage()};this.editor.addListener("pageSelected",function(a,c){var d=c.getProperty("change"),e=b.source,f=b.outline;f.pageScale=e.pageScale;f.pageFormat=e.pageFormat;f.background=e.background;f.pageVisible=e.pageVisible;f.background=e.background;var g=mxUtils.getCurrentStyle(e.container);f.container.style.backgroundColor=g.backgroundColor;null!=e.view.backgroundPageShape&&
+null!=f.view.backgroundPageShape&&(f.view.backgroundPageShape.fill=e.view.backgroundPageShape.fill);b.outline.view.clear(d.previousPage.root,!0);b.outline.view.validate()});return b};EditorUi.prototype.getServiceCount=function(a,b){var c=0;null==this.drive&&"function"!==typeof window.DriveClient||c++;b||null==this.dropbox&&"function"!==typeof window.DropboxClient||c++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||c++;b||null==this.gitHub||c++;b||null==this.trello&&"function"!==typeof window.TrelloClient||
+c++;a&&isLocalStorage&&("1"==urlParams.browser||mxClient.IS_IOS)&&c++;mxClient.IS_IOS||c++;return c};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var a=this.getCurrentFile(),b=null!=a||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(b);this.menus.get("viewZoom").setEnabled(b);var c=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==a||a.isRestricted());this.actions.get("makeCopy").setEnabled(!c);
+this.actions.get("print").setEnabled(!c);this.menus.get("exportAs").setEnabled(!c);this.menus.get("embed").setEnabled(!c);c="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(c);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(c),this.menus.get("newLibrary").setEnabled(c));a="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=a&&a.isEditable();this.actions.get("image").setEnabled(b);this.actions.get("zoomIn").setEnabled(b);this.actions.get("zoomOut").setEnabled(b);
+this.actions.get("resetView").setEnabled(b);this.actions.get("undo").setEnabled(this.canUndo()&&a);this.actions.get("redo").setEnabled(this.canRedo()&&a);this.menus.get("edit").setEnabled(b);this.menus.get("view").setEnabled(b);this.menus.get("importFrom").setEnabled(a);this.menus.get("arrange").setEnabled(a);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(a),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(a));if(this.isAppCache()){var d=
+applicationCache;if(null!=d&&null==this.offlineStatus){this.offlineStatus=document.createElement("div");this.offlineStatus.className="geItem";this.offlineStatus.style.position="absolute";this.offlineStatus.style.fontSize="8pt";this.offlineStatus.style.top="2px";this.offlineStatus.style.right="12px";this.offlineStatus.style.color="#666";this.offlineStatus.style.margin="4px";this.offlineStatus.style.padding="2px";this.offlineStatus.style.verticalAlign="middle";this.offlineStatus.innerHTML="";this.menubarContainer.appendChild(this.offlineStatus);
+mxEvent.addListener(this.offlineStatus,"click",mxUtils.bind(this,function(){var a=this.offlineStatus.getElementsByTagName("img");null!=a&&0<a.length&&this.alert(a[0].getAttribute("title"))}));var d=window.applicationCache,e=null,b=mxUtils.bind(this,function(){var a=d.status,b;a==d.CHECKING&&(a=d.DOWNLOADING);switch(a){case d.UNCACHED:b="";break;case d.IDLE:b="min"==uiTheme?"":'<img title="draw.io is up to date." border="0" src="'+IMAGE_PATH+'/checkmark.gif"/>';break;case d.DOWNLOADING:b='<img title="Downloading new version..." border="0" src="'+
+IMAGE_PATH+'/spin.gif"/>';break;case d.UPDATEREADY:b='<img title="'+mxUtils.htmlEntities(mxResources.get("restartForChangeRequired"))+'" border="0" src="'+IMAGE_PATH+'/download.png"/>';break;case d.OBSOLETE:b='<img title="Obsolete" border="0" src="'+IMAGE_PATH+'/clear.gif"/>';break;default:b='<img title="Unknown" border="0" src="'+IMAGE_PATH+'/clear.gif"/>'}a!=e&&(this.offlineStatus.innerHTML=b,e=a)});mxEvent.addListener(d,"checking",b);mxEvent.addListener(d,"noupdate",b);mxEvent.addListener(d,"downloading",
+b);mxEvent.addListener(d,"progress",b);mxEvent.addListener(d,"cached",b);mxEvent.addListener(d,"updateready",b);mxEvent.addListener(d,"obsolete",b);mxEvent.addListener(d,"error",b);b()}}else this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.isDiagramActive=function(){var a=this.getCurrentFile();return null!=a&&a.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var l=EditorUi.prototype.updateActionStates;
+EditorUi.prototype.updateActionStates=function(){l.apply(this,arguments);var a=this.editor.graph,b=this.isDiagramActive(),c=this.getCurrentFile();this.actions.get("pageSetup").setEnabled(b);this.actions.get("autosave").setEnabled(null!=c&&c.isEditable()&&c.isAutosaveOptional());this.actions.get("guides").setEnabled(b);this.actions.get("editData").setEnabled(b);this.actions.get("shadowVisible").setEnabled(b);this.actions.get("connectionArrows").setEnabled(b);this.actions.get("connectionPoints").setEnabled(b);
+this.actions.get("copyStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("editGeometry").setEnabled(a.getModel().isVertex(a.getSelectionCell()));this.actions.get("createShape").setEnabled(b);this.actions.get("createRevision").setEnabled(b);this.actions.get("moveToFolder").setEnabled(null!=c);this.actions.get("makeCopy").setEnabled(null!=c&&!c.isRestricted());this.actions.get("editDiagram").setEnabled(b&&(null==c||!c.isRestricted()));
+this.actions.get("publishLink").setEnabled(null!=c&&!c.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("find").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=c&&c.isRenamable()||"1"==urlParams.embed);
+this.actions.get("close").setEnabled(null!=c);this.menus.get("publish").setEnabled(null!=c&&!c.isRestricted());a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(b&&null!=a&&null!=a.shape&&null!=a.shape.stencil)};var m=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){this.editUpdateListener&&(this.editor.undoManager.removeListener(this.editUpdateListener),this.editUpdateListener=null);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),
+this.exportDialog=null);m.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,b,c,d,e,g){var f=a.editor.graph;if("xml"==c)a.hideDialog(),a.saveData(b,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("svg"==c)a.hideDialog(),a.saveData(b,"svg",mxUtils.getXml(f.getSvg(d,e,g)),"image/svg+xml");else{var h=a.getFileData(!0,null,null,null,null,!0),k=f.getGraphBounds(),l=Math.floor(k.width*e/f.view.scale),
+m=Math.floor(k.height*e/f.view.scale);h.length<=MAX_REQUEST_SIZE&&l*m<MAX_AREA?(a.hideDialog(),a.saveRequest(b,c,function(a,b){return new mxXmlRequest(EXPORT_URL,"format="+c+"&base64="+(b||"0")+(null!=a?"&filename="+encodeURIComponent(a):"")+"&bg="+(null!=d?d:"none")+"&w="+l+"&h="+m+"&border="+g+"&xml="+encodeURIComponent(h))})):mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.updateEditReferences=function(a){for(var b=0;b<a.changes.length;b++){var c=a.changes[b];if(null!=c&&
+c.constructor==mxChildChange&&null!=c.child){var d=c.child;if(null!=d.source&&null!=d.source.id){var e=this.getFutureCellForEdit(c.model,a,d.source.id);e!=d.source&&(d.source=e)}null!=d.target&&null!=d.target.id&&(c=this.getFutureCellForEdit(c.model,a,d.target.id),c!=d.target&&(d.target=c))}}};EditorUi.prototype.getFutureCellForEdit=function(a,b,c){var d=a.getCell(c);if(null==d)for(var e=b.changes.length-1;0<=e;e--){var f=b.changes[e];if(f.constructor==mxChildChange&&null!=f.child&&f.child.id==c){a.contains(f.previous)&&
+(d=f.child);break}}return d}})();EditorUi.DIFF_INSERT="i";EditorUi.DIFF_REMOVE="r";EditorUi.DIFF_UPDATE="u";EditorUi.prototype.codec=new mxCodec;EditorUi.prototype.viewStateProperties={background:!0,backgroundImage:!0,shadowVisible:!0,foldingEnabled:!0,pageScale:!0,mathEnabled:!0,pageFormat:!0};EditorUi.prototype.cellProperties={id:!0,value:!0,xmlValue:!0,vertex:!0,edge:!0,visible:!0,collapsed:!0,connectable:!0,parent:!0,children:!0,previous:!0,source:!0,target:!0,edges:!0,geometry:!0,style:!0,mxObjectId:!0,mxTransient:!0};
+EditorUi.prototype.patchPages=function(a,c,b,d,e){var g={},h=[],l={},m={},f={},k={};if(null!=d&&null!=d[EditorUi.DIFF_UPDATE])for(var n in d[EditorUi.DIFF_UPDATE])g[n]=d[EditorUi.DIFF_UPDATE][n];if(null!=c[EditorUi.DIFF_REMOVE])for(d=0;d<c[EditorUi.DIFF_REMOVE].length;d++)m[c[EditorUi.DIFF_REMOVE][d]]=!0;if(null!=c[EditorUi.DIFF_INSERT])for(d=0;d<c[EditorUi.DIFF_INSERT].length;d++)l[c[EditorUi.DIFF_INSERT][d].previous]=c[EditorUi.DIFF_INSERT][d];if(null!=c[EditorUi.DIFF_UPDATE])for(n in c[EditorUi.DIFF_UPDATE])d=
+c[EditorUi.DIFF_UPDATE][n],null!=d.previous&&(k[d.previous]=n);if(null!=a){var p="";for(d=0;d<a.length;d++){var q=a[d].getId();f[q]=a[d];null!=k[p]||m[q]||null!=c[EditorUi.DIFF_UPDATE]&&null!=c[EditorUi.DIFF_UPDATE][q]&&null!=c[EditorUi.DIFF_UPDATE][q].previous||(k[p]=q);p=q}}var u={},v=mxUtils.bind(this,function(a){var d=null!=a?a.getId():"";if(null!=a&&!u[d]){u[d]=!0;h.push(a);var m=null!=c[EditorUi.DIFF_UPDATE]?c[EditorUi.DIFF_UPDATE][d]:null;null!=m&&(this.updatePageRoot(a),null!=m.name&&a.setName(m.name),
+null!=m.view&&this.patchViewState(a,m.view),null!=m.cells&&this.patchPage(a,m.cells,g[a.getId()],e),!b||null==m.cells&&null==m.view||(a.needsUpdate=!0))}a=k[d];null!=a&&(delete k[d],v(f[a]));a=l[d];null!=a&&(delete l[d],x(a))}),x=mxUtils.bind(this,function(a){a=mxUtils.parseXml(a.data).documentElement;a=new DiagramPage(a);this.updatePageRoot(a);var c=f[a.getId()];null==c?v(a):(c.root=a.root,this.currentPage==c?this.editor.graph.model.setRoot(c.root):b&&(c.needsUpdate=!0))});v();for(n in k)v(f[k[n]]),
+delete k[n];for(n in l)x(l[n]),delete l[n];return h};EditorUi.prototype.patchViewState=function(a,c){if(null!=a.viewState&&null!=c){a==this.currentPage&&(a.viewState=this.editor.graph.getViewState());for(var b in c)a.viewState[b]=JSON.parse(c[b]);a==this.currentPage&&this.editor.graph.setViewState(a.viewState)}};
+EditorUi.prototype.createParentLookup=function(a,c){function b(a){var b=d[a];null==b&&(b={inserted:[],moved:{}},d[a]=b);return b}var d={};if(null!=c[EditorUi.DIFF_INSERT])for(var e=0;e<c[EditorUi.DIFF_INSERT].length;e++){var g=c[EditorUi.DIFF_INSERT][e],h=null!=g.parent?g.parent:"",l=null!=g.previous?g.previous:"";b(h).inserted[l]=g}if(null!=c[EditorUi.DIFF_UPDATE])for(var m in c[EditorUi.DIFF_UPDATE])g=c[EditorUi.DIFF_UPDATE][m],null!=g.previous&&(h=g.parent,null==h&&(e=a.getCell(m),null!=e&&(e=
+a.getParent(e),null!=e&&(h=e.getId()))),null!=h&&(b(h).moved[g.previous]=m));return d};
+EditorUi.prototype.patchPage=function(a,c,b,d){var e=a==this.currentPage?this.editor.graph.model:new mxGraphModel(a.root),g=this.createParentLookup(e,c);e.beginUpdate();try{var h=e.updateEdgeParent,l=new mxDictionary,m=[];e.updateEdgeParent=function(a,b){!l.get(a)&&d&&(l.put(a,!0),m.push(a))};var f=g[""],k=null!=f&&null!=f.inserted?f.inserted[""]:null,n=null;null!=k&&(n=this.getCellForJson(k));if(null==n){var p=null!=f&&null!=f.moved?f.moved[""]:null;null!=p&&(n=e.getCell(p))}null!=n&&(e.setRoot(n),
+a.root=n);if(null!=c[EditorUi.DIFF_REMOVE])for(var q=0;q<c[EditorUi.DIFF_REMOVE].length;q++){var u=e.getCell(c[EditorUi.DIFF_REMOVE][q]);null!=u&&e.remove(u)}this.patchCellRecursive(a,e,e.root,g,c);if(null!=c[EditorUi.DIFF_UPDATE]){var v=null!=b&&null!=b.cells?b.cells[EditorUi.DIFF_UPDATE]:null;for(p in c[EditorUi.DIFF_UPDATE])this.patchCell(e,e.getCell(p),c[EditorUi.DIFF_UPDATE][p],null!=v?v[p]:null)}if(null!=c[EditorUi.DIFF_INSERT])for(q=0;q<c[EditorUi.DIFF_INSERT].length;q++)k=c[EditorUi.DIFF_INSERT][q],
+u=e.getCell(k.id),null!=u&&(e.setTerminal(u,e.getCell(k.source),!0),e.setTerminal(u,e.getCell(k.target),!1));e.updateEdgeParent=h;if(d&&0<m.length)for(q=0;q<m.length;q++)e.contains(m[q])&&e.updateEdgeParent(m[q])}finally{e.endUpdate()}};
+EditorUi.prototype.patchCellRecursive=function(a,c,b,d,e){for(var g=d[b.getId()],h=null!=g&&null!=g.inserted?g.inserted:{},l=null!=g&&null!=g.moved?g.moved:{},m=0,g=c.getChildCount(b),f="",k=0;k<g;k++){var n=c.getChildAt(b,k).getId();null==l[f]&&(null==e[EditorUi.DIFF_UPDATE]||null==e[EditorUi.DIFF_UPDATE][n]||null==e[EditorUi.DIFF_UPDATE][n].previous&&null==e[EditorUi.DIFF_UPDATE][n].parent)&&(l[f]=n);f=n}var p=mxUtils.bind(this,function(f){var g=null!=f?f.getId():"";null!=f&&(c.getChildAt(b,m)!=
+f&&c.add(b,f,m),this.patchCellRecursive(a,c,f,d,e),m++);f=l[g];null!=f&&(delete l[g],p(c.getCell(f)));f=h[g];null!=f&&(delete h[g],p(this.getCellForJson(f)))});p();for(var q in l)p(c.getCell(l[q])),delete l[q];for(q in h)p(this.getCellForJson(h[q])),delete h[q]};
EditorUi.prototype.patchCell=function(a,c,b,d){if(null!=c&&null!=b){if(null==d||null==d.xmlValue&&(null==d.value||""==d.value))null!=b.value?a.setValue(c,b.value):null!=b.xmlValue&&a.setValue(c,mxUtils.parseXml(b.xmlValue).documentElement);null!=d&&null!=d.style||null==b.style||a.setStyle(c,b.style);null!=b.visible&&a.setVisible(c,1==b.visible);null!=b.collapsed&&a.setCollapsed(c,1==b.collapsed);null!=b.vertex&&(c.vertex=1==b.vertex);null!=b.edge&&(c.edge=1==b.edge);null!=b.connectable&&(c.connectable=
1==b.connectable);null!=b.geometry&&a.setGeometry(c,this.codec.decode(mxUtils.parseXml(b.geometry).documentElement));null!=b.source&&a.setTerminal(c,a.getCell(b.source),!0);null!=b.target&&a.setTerminal(c,a.getCell(b.target),!1);for(var e in b)this.cellProperties[e]||(c[e]=b[e])}};
EditorUi.prototype.getPagesForNode=function(a){var c=this.editor.extractGraphModel(a,!0);null!=c&&(a=c);a=a.getElementsByTagName("diagram");for(var c=[],b=0;b<a.length;b++){var d=new DiagramPage(a[b]);this.updatePageRoot(d);c.push(d)}return c};
-EditorUi.prototype.diffPages=function(a,c){for(var b=[],d=[],e={},g={},k={},l=null,n=0;n<c.length;n++)g[c[n].getId()]={page:c[n],prev:l},l=c[n];l=null;for(n=0;n<a.length;n++){var f=a[n].getId(),h=g[f];if(null==h)d.push(f);else{var m=this.diffPage(a[n],h.page),p={};0<Object.keys(m).length&&(p.cells=m);m=this.diffViewState(a[n],h.page);0<Object.keys(m).length&&(p.view=m);if((null!=h.prev?null==l:null!=l)||null!=l&&null!=h.prev&&l.getId()!=h.prev.getId())p.previous=null!=h.prev?h.prev.getId():"";null!=
-h.page.getName()&&a[n].getName()!=h.page.getName()&&(p.name=h.page.getName());0<Object.keys(p).length&&(k[f]=p)}delete g[a[n].getId()];l=a[n]}for(f in g)h=g[f],b.push({data:mxUtils.getXml(h.page.node),previous:null!=h.prev?h.prev.getId():""});0<Object.keys(k).length&&(e[EditorUi.DIFF_UPDATE]=k);0<d.length&&(e[EditorUi.DIFF_REMOVE]=d);0<b.length&&(e[EditorUi.DIFF_INSERT]=b);return e};
+EditorUi.prototype.diffPages=function(a,c){for(var b=[],d=[],e={},g={},h={},l=null,m=0;m<c.length;m++)g[c[m].getId()]={page:c[m],prev:l},l=c[m];l=null;for(m=0;m<a.length;m++){var f=a[m].getId(),k=g[f];if(null==k)d.push(f);else{var n=this.diffPage(a[m],k.page),p={};0<Object.keys(n).length&&(p.cells=n);n=this.diffViewState(a[m],k.page);0<Object.keys(n).length&&(p.view=n);if((null!=k.prev?null==l:null!=l)||null!=l&&null!=k.prev&&l.getId()!=k.prev.getId())p.previous=null!=k.prev?k.prev.getId():"";null!=
+k.page.getName()&&a[m].getName()!=k.page.getName()&&(p.name=k.page.getName());0<Object.keys(p).length&&(h[f]=p)}delete g[a[m].getId()];l=a[m]}for(f in g)k=g[f],b.push({data:mxUtils.getXml(k.page.node),previous:null!=k.prev?k.prev.getId():""});0<Object.keys(h).length&&(e[EditorUi.DIFF_UPDATE]=h);0<d.length&&(e[EditorUi.DIFF_REMOVE]=d);0<b.length&&(e[EditorUi.DIFF_INSERT]=b);return e};
EditorUi.prototype.createCellLookup=function(a,c,b){b=null!=b?b:{};b[a.getId()]={cell:a,prev:c};var d=a.getChildCount();c=null;for(var e=0;e<d;e++){var g=a.getChildAt(e);this.createCellLookup(g,c,b);c=g}return b};
-EditorUi.prototype.diffCellRecursive=function(a,c,b,d,e){d=null!=d?d:{};var g=b[a.getId()];delete b[a.getId()];if(null==g)e.push(a.getId());else{var k=this.diffCell(a,g.cell);if(null!=k.parent||(null!=g.prev?null==c:null!=c)||null!=c&&null!=g.prev&&c.getId()!=g.prev.getId())k.previous=null!=g.prev?g.prev.getId():"";0<Object.keys(k).length&&(d[a.getId()]=k)}g=a.getChildCount();c=null;for(k=0;k<g;k++){var l=a.getChildAt(k);this.diffCellRecursive(l,c,b,d,e);c=l}return d};
-EditorUi.prototype.diffPage=function(a,c){var b=[],d=[],e={};this.updatePageRoot(a);this.updatePageRoot(c);var g=this.createCellLookup(c.root),k=this.diffCellRecursive(a.root,null,g,k,d),l;for(l in g){var n=g[l];b.push(this.getJsonForCell(n.cell,n.prev))}0<Object.keys(k).length&&(e[EditorUi.DIFF_UPDATE]=k);0<d.length&&(e[EditorUi.DIFF_REMOVE]=d);0<b.length&&(e[EditorUi.DIFF_INSERT]=b);return e};
-EditorUi.prototype.diffViewState=function(a,c){var b=a.viewState,d=c.viewState,e={};c==this.currentPage&&(d=this.editor.graph.getViewState());if(null!=b&&null!=d)for(var g in this.viewStateProperties){var k=JSON.stringify(b[g]),l=JSON.stringify(d[g]);k!=l&&(e[g]=l)}return e};
+EditorUi.prototype.diffCellRecursive=function(a,c,b,d,e){d=null!=d?d:{};var g=b[a.getId()];delete b[a.getId()];if(null==g)e.push(a.getId());else{var h=this.diffCell(a,g.cell);if(null!=h.parent||(null!=g.prev?null==c:null!=c)||null!=c&&null!=g.prev&&c.getId()!=g.prev.getId())h.previous=null!=g.prev?g.prev.getId():"";0<Object.keys(h).length&&(d[a.getId()]=h)}g=a.getChildCount();c=null;for(h=0;h<g;h++){var l=a.getChildAt(h);this.diffCellRecursive(l,c,b,d,e);c=l}return d};
+EditorUi.prototype.diffPage=function(a,c){var b=[],d=[],e={};this.updatePageRoot(a);this.updatePageRoot(c);var g=this.createCellLookup(c.root),h=this.diffCellRecursive(a.root,null,g,h,d),l;for(l in g){var m=g[l];b.push(this.getJsonForCell(m.cell,m.prev))}0<Object.keys(h).length&&(e[EditorUi.DIFF_UPDATE]=h);0<d.length&&(e[EditorUi.DIFF_REMOVE]=d);0<b.length&&(e[EditorUi.DIFF_INSERT]=b);return e};
+EditorUi.prototype.diffViewState=function(a,c){var b=a.viewState,d=c.viewState,e={};c==this.currentPage&&(d=this.editor.graph.getViewState());if(null!=b&&null!=d)for(var g in this.viewStateProperties){var h=JSON.stringify(b[g]),l=JSON.stringify(d[g]);h!=l&&(e[g]=l)}return e};
EditorUi.prototype.getCellForJson=function(a){var c=null!=a.geometry?this.codec.decode(mxUtils.parseXml(a.geometry).documentElement):null,b=a.value;null!=a.xmlValue&&(b=mxUtils.parseXml(a.xmlValue).documentElement);c=new mxCell(b,c,a.style);c.connectable=0!=a.connectable;c.collapsed=1==a.collapsed;c.visible=0!=a.visible;c.vertex=1==a.vertex;c.edge=1==a.edge;c.id=a.id;for(var d in a)this.cellProperties[d]||(c[d]=a[d]);return c};
EditorUi.prototype.getJsonForCell=function(a,c){var b={id:a.getId()};a.vertex&&(b.vertex=1);a.edge&&(b.edge=1);a.connectable||(b.connectable=0);null!=a.parent&&(b.parent=a.parent.getId());null!=c&&(b.previous=c.getId());null!=a.source&&(b.source=a.source.getId());null!=a.target&&(b.target=a.target.getId());null!=a.style&&(b.style=a.style);null!=a.geometry&&(b.geometry=mxUtils.getXml(this.codec.encode(a.geometry)));a.collapsed&&(b.collapsed=1);a.visible||(b.visible=0);null!=a.value&&("object"===typeof a.value&&
"number"===typeof a.value.nodeType&&"string"===typeof a.value.nodeName&&"function"===typeof a.value.getAttribute?b.xmlValue=mxUtils.getXml(a.value):b.value=a.value);for(var d in a)this.cellProperties[d]||"function"===typeof a[d]||(b[d]=a[d]);return b};
@@ -8247,18 +8248,18 @@ DrawioFileSync.prototype.handleMessageData=function(a){"desc"==a.a?this.file.sav
DrawioFileSync.prototype.fileChangedNotify=function(){if(this.file.savingFile)this.remoteFileChanged=!0;else var a=this.fileChanged(mxUtils.bind(this,function(a){this.updateStatus()}),mxUtils.bind(this,function(a){this.file.handleFileError(a)}),mxUtils.bind(this,function(){return!this.file.savingFile&&this.notifyThread!=a}))};
DrawioFileSync.prototype.fileChanged=function(a,c,b){var d=window.setTimeout(mxUtils.bind(this,function(){null!=b&&b()||this.file.loadPatchDescriptor(mxUtils.bind(this,function(d){null!=b&&b()||this.catchup(this.file.getDescriptorEtag(d),this.file.getDescriptorSecret(d),a,c,b)}),c)}),0);return this.notifyThread=d};
DrawioFileSync.prototype.reloadDescriptor=function(){this.file.loadDescriptor(mxUtils.bind(this,function(a){null!=a?(this.file.setDescriptorEtag(a,this.file.getCurrentEtag()),this.updateDescriptor(a),this.fileChangedNotify()):(this.file.inConflictState=!0,this.file.handleFileError())}),mxUtils.bind(this,function(a){this.file.inConflictState=!0;this.file.handleFileError(a)}))};DrawioFileSync.prototype.updateDescriptor=function(a){this.file.setDescriptor(a);this.file.descriptorChanged();this.start()};
-DrawioFileSync.prototype.catchup=function(a,c,b,d,e){var g=this.file.getCurrentEtag();if(g==a)null!=b&&b();else{var k=0,l=!1,n=mxUtils.bind(this,function(){g!=this.file.getCurrentEtag()?null!=b&&b():null!=e&&e()||mxUtils.get(this.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&from="+encodeURIComponent(g)+"&to="+encodeURIComponent(a)+(null!=c?"&secret="+encodeURIComponent(c):""),mxUtils.bind(this,function(c){this.file.stats.bytesReceived+=c.getText().length;if(g!=this.file.getCurrentEtag())null!=
-b&&b();else if(null==e||!e()){var f=null,m=[],p=[];if(200<=c.getStatus()&&299>=c.getStatus()&&0<c.getText().length)try{var q=JSON.parse(c.getText());if(null!=q&&0<q.length)for(var u=0;u<q.length;u++){var v=this.stringToObject(q[u]);if(v.v>DrawioFileSync.PROTOCOL){l=!0;p=[];break}else if(v.v===DrawioFileSync.PROTOCOL&&null!=v.d)f=v.d.checksum,p.push(v.d.patch),null!=v.d.details&&(v.d.details.checksum=f,m.push(JSON.stringify(v.d.details)));else{l=!0;p=[];break}}}catch(x){p=[],null!=window.console&&
-"1"==urlParams.test&&console.log(x)}try{0<p.length?(this.file.stats.cacheHits++,this.merge(p,f,a,b,d,m)):k<=this.maxCacheReadyRetries&&!l&&401!=c.getStatus()?(k++,this.file.stats.cacheMiss++,window.setTimeout(n,(k+1)*this.cacheReadyDelay)):(this.file.stats.cacheFail++,this.reload(b,d,e))}catch(x){null!=d&&d(x)}}}))});window.setTimeout(n,this.cacheReadyDelay)}};
+DrawioFileSync.prototype.catchup=function(a,c,b,d,e){var g=this.file.getCurrentEtag();if(g==a)null!=b&&b();else{var h=0,l=!1,m=mxUtils.bind(this,function(){g!=this.file.getCurrentEtag()?null!=b&&b():null!=e&&e()||mxUtils.get(this.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&from="+encodeURIComponent(g)+"&to="+encodeURIComponent(a)+(null!=c?"&secret="+encodeURIComponent(c):""),mxUtils.bind(this,function(c){this.file.stats.bytesReceived+=c.getText().length;if(g!=this.file.getCurrentEtag())null!=
+b&&b();else if(null==e||!e()){var f=null,n=[],p=[];if(200<=c.getStatus()&&299>=c.getStatus()&&0<c.getText().length)try{var q=JSON.parse(c.getText());if(null!=q&&0<q.length)for(var u=0;u<q.length;u++){var v=this.stringToObject(q[u]);if(v.v>DrawioFileSync.PROTOCOL){l=!0;p=[];break}else if(v.v===DrawioFileSync.PROTOCOL&&null!=v.d)f=v.d.checksum,p.push(v.d.patch),null!=v.d.details&&(v.d.details.checksum=f,n.push(JSON.stringify(v.d.details)));else{l=!0;p=[];break}}}catch(x){p=[],null!=window.console&&
+"1"==urlParams.test&&console.log(x)}try{0<p.length?(this.file.stats.cacheHits++,this.merge(p,f,a,b,d,n)):h<=this.maxCacheReadyRetries&&!l&&401!=c.getStatus()?(h++,this.file.stats.cacheMiss++,window.setTimeout(m,(h+1)*this.cacheReadyDelay)):(this.file.stats.cacheFail++,this.reload(b,d,e))}catch(x){null!=d&&d(x)}}}))});window.setTimeout(m,this.cacheReadyDelay)}};
DrawioFileSync.prototype.reload=function(a,c,b){this.file.updateFile(mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.updateStatus();this.start();null!=a&&a()}),mxUtils.bind(this,function(a){null!=c&&c(a)}),b)};
-DrawioFileSync.prototype.merge=function(a,c,b,d,e,g){try{this.lastModified=new Date;this.file.shadowPages=null!=this.file.shadowPages?this.file.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.file.shadowData).documentElement);this.file.checkShadow(this.file.shadowPages);this.file.backupPatch=this.file.isModified()?this.ui.diffPages(this.file.shadowPages,this.ui.pages):null;if(!this.file.ignorePatches(a)){this.file.stats.merged++;for(var k=0;k<a.length;k++)this.file.shadowPages=this.ui.patchPages(this.file.shadowPages,
-a[k]);var k={},l=null!=c?this.ui.getHashValueForPages(this.file.shadowPages,k):null;"1"==urlParams.test&&EditorUi.debug("Sync.merge",[this],"from",this.file.getCurrentEtag(),"to",b,"backup",this.file.backupPatch,"attempt",this.catchupRetryCount,"details",g,k,"patches",a,"checksum",c==l,c);if(null!=c&&c!=l){var n=this.ui.hashValue(this.file.getCurrentEtag()),f=this.ui.hashValue(b);this.file.checksumError(e,a,"Checksum: "+c+"\nFrom: "+n+"\nTo: "+f+(null!=g&&0<g.length?"\nDetails: "+g.join(", "):"")+
-"\nCurrent: "+l+(null!=k?"\nCurrent Details: "+JSON.stringify(k):""));return}this.file.patch(a,DrawioFile.LAST_WRITE_WINS?this.file.backupPatch:null)}this.file.invalidChecksum=!1;this.file.inConflictState=!1;this.file.setCurrentEtag(b);this.file.backupPatch=null;this.file.checkPages();null!=d&&d()}catch(h){this.file.inConflictState=!0;this.file.invalidChecksum=!0;null!=e&&e(h);try{this.file.sendErrorReport("Error in merge",null,h)}catch(m){}}};
+DrawioFileSync.prototype.merge=function(a,c,b,d,e,g){try{this.lastModified=new Date;this.file.shadowPages=null!=this.file.shadowPages?this.file.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.file.shadowData).documentElement);this.file.checkShadow(this.file.shadowPages);this.file.backupPatch=this.file.isModified()?this.ui.diffPages(this.file.shadowPages,this.ui.pages):null;if(!this.file.ignorePatches(a)){this.file.stats.merged++;for(var h=0;h<a.length;h++)this.file.shadowPages=this.ui.patchPages(this.file.shadowPages,
+a[h]);var h={},l=null!=c?this.ui.getHashValueForPages(this.file.shadowPages,h):null;"1"==urlParams.test&&EditorUi.debug("Sync.merge",[this],"from",this.file.getCurrentEtag(),"to",b,"backup",this.file.backupPatch,"attempt",this.catchupRetryCount,"details",g,h,"patches",a,"checksum",c==l,c);if(null!=c&&c!=l){var m=this.ui.hashValue(this.file.getCurrentEtag()),f=this.ui.hashValue(b);this.file.checksumError(e,a,"Checksum: "+c+"\nFrom: "+m+"\nTo: "+f+(null!=g&&0<g.length?"\nDetails: "+g.join(", "):"")+
+"\nCurrent: "+l+(null!=h?"\nCurrent Details: "+JSON.stringify(h):""),b);return}this.file.patch(a,DrawioFile.LAST_WRITE_WINS?this.file.backupPatch:null)}this.file.invalidChecksum=!1;this.file.inConflictState=!1;this.file.setCurrentEtag(b);this.file.backupPatch=null;this.file.checkPages();null!=d&&d()}catch(k){this.file.inConflictState=!0;this.file.invalidChecksum=!0;null!=e&&e(k);try{this.file.sendErrorReport("Error in merge",null,k)}catch(n){}}};
DrawioFileSync.prototype.descriptorChanged=function(a){this.lastModified=this.file.getLastModifiedDate();if(null!=this.channelId){var c=this.objectToString(this.createMessage({a:"desc",m:this.lastModified.getTime()})),b=this.file.getCurrentEtag(),d=this.objectToString({});mxUtils.post(this.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(a)+"&to="+encodeURIComponent(b)+"&msg="+encodeURIComponent(c)+"&data="+encodeURIComponent(d));this.file.stats.bytesSent+=d.length;this.file.stats.msgSent++}this.updateStatus()};
DrawioFileSync.prototype.objectToString=function(a){a=this.ui.editor.graph.compress(JSON.stringify(a));null!=this.key&&"undefined"!==typeof CryptoJS&&(a=CryptoJS.AES.encrypt(a,this.key).toString());return a};DrawioFileSync.prototype.stringToObject=function(a){null!=this.key&&"undefined"!==typeof CryptoJS&&(a=CryptoJS.AES.decrypt(a,this.key).toString(CryptoJS.enc.Utf8));return JSON.parse(this.ui.editor.graph.decompress(a))};
DrawioFileSync.prototype.fileSaved=function(a,c,b,d){this.lastModified=this.file.getLastModifiedDate();this.resetUpdateStatusThread();this.catchupRetryCount=0;if(!this.ui.isOffline()&&!this.file.inConflictState&&!this.redirectDialogShowing&&(this.start(),null!=this.channelId)){var e=null!=this.file.shadowPages?this.file.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.file.shadowData).documentElement),g={v:EditorUi.VERSION,t:(new Date).toISOString(),ua:navigator.userAgent};d=this.ui.getHashValueForPages(a,
-g);e=this.ui.diffPages(e,a);c=this.file.getDescriptorEtag(c);var k=this.file.getCurrentEtag();g.from=this.ui.hashValue(c);g.to=this.ui.hashValue(k);var g=this.objectToString(this.createMessage({patch:e,checksum:d,details:g})),l=this.objectToString(this.createMessage({m:this.lastModified.getTime()})),n=this.file.getDescriptorSecret(this.file.getDescriptor());this.file.stats.bytesSent+=g.length;this.file.stats.msgSent++;mxUtils.post(this.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(c)+
-"&to="+encodeURIComponent(k)+"&msg="+encodeURIComponent(l)+(null!=n?"&secret="+encodeURIComponent(n):"")+(g.length<this.maxCacheEntrySize?"&data="+encodeURIComponent(g):""),mxUtils.bind(this,function(a){}));"1"==urlParams.test&&EditorUi.debug("Sync.fileSaved",[this],"from",c,"to",k,g.length,"bytes","diff",e,"checksum",d)}this.file.shadowPages=a;null!=b&&b()};
+g);e=this.ui.diffPages(e,a);c=this.file.getDescriptorEtag(c);var h=this.file.getCurrentEtag();g.from=this.ui.hashValue(c);g.to=this.ui.hashValue(h);var g=this.objectToString(this.createMessage({patch:e,checksum:d,details:g})),l=this.objectToString(this.createMessage({m:this.lastModified.getTime()})),m=this.file.getDescriptorSecret(this.file.getDescriptor());this.file.stats.bytesSent+=g.length;this.file.stats.msgSent++;mxUtils.post(this.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(c)+
+"&to="+encodeURIComponent(h)+"&msg="+encodeURIComponent(l)+(null!=m?"&secret="+encodeURIComponent(m):"")+(g.length<this.maxCacheEntrySize?"&data="+encodeURIComponent(g):""),mxUtils.bind(this,function(a){}));"1"==urlParams.test&&EditorUi.debug("Sync.fileSaved",[this],"from",c,"to",h,g.length,"bytes","diff",e,"checksum",d)}this.file.shadowPages=a;null!=b&&b()};
DrawioFileSync.prototype.getIdParameters=function(){var a="id="+this.channelId;null!=this.pusher&&null!=this.pusher.connection&&(a+="&sid="+this.pusher.connection.socket_id);return a};DrawioFileSync.prototype.createMessage=function(a){return{v:DrawioFileSync.PROTOCOL,d:a,c:this.clientId}};
DrawioFileSync.prototype.fileConflict=function(a,c,b){this.catchupRetryCount++;if(this.catchupRetryCount<this.maxCatchupRetries)if(this.file.stats.conflicts++,null!=a){var d=this.file.getDescriptorEtag(a);a=this.file.getDescriptorSecret(a);this.catchup(d,a,c,b)}else this.fileChanged(c,b);else this.catchupRetryCount=0,this.file.stats.timeouts++,null!=b&&b({message:mxResources.get("timeout")})};
DrawioFileSync.prototype.stop=function(){null!=this.pusher&&(EditorUi.debug("Sync.stop",[this]),null!=this.changeListener&&null!=this.channel&&(this.channel.unbind("changed",this.changeListener),this.changeListener=null),null!=this.connectionListener&&(null!=this.pusher.connection&&this.pusher.connection.unbind("state_change",this.connectionListener),this.connectionListener=null),null!=this.pusherErrorListener&&(null!=this.pusher.connection&&this.pusher.connection.unbind("error",this.pusherErrorListener),
@@ -8270,29 +8271,29 @@ Graph.prototype.defaultThemes.darkTheme=mxUtils.parseXml('<mxStylesheet><add as=
mxAsyncCanvas.prototype.decWaitCounter=function(){this.waitCounter--;0==this.waitCounter&&null!=this.onComplete&&(this.onComplete(),this.onComplete=null)};mxAsyncCanvas.prototype.updateFont=function(){var a="";(this.state.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(a+="bold ");(this.state.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(a+="italic ");this.ctx.font=a+this.state.fontSize+"px "+this.state.fontFamily};mxAsyncCanvas.prototype.rotate=function(a,c,b,d,e){};
mxAsyncCanvas.prototype.setAlpha=function(a){this.state.alpha=a};mxAsyncCanvas.prototype.setFontColor=function(a){this.state.fontColor=a};mxAsyncCanvas.prototype.setFontBackgroundColor=function(a){a==mxConstants.NONE&&(a=null);this.state.fontBackgroundColor=a};mxAsyncCanvas.prototype.setFontBorderColor=function(a){a==mxConstants.NONE&&(a=null);this.state.fontBorderColor=a};mxAsyncCanvas.prototype.setFontSize=function(a){this.state.fontSize=a};
mxAsyncCanvas.prototype.setFontFamily=function(a){this.state.fontFamily=a};mxAsyncCanvas.prototype.setFontStyle=function(a){this.state.fontStyle=a};mxAsyncCanvas.prototype.rect=function(a,c,b,d){};mxAsyncCanvas.prototype.roundrect=function(a,c,b,d,e,g){};mxAsyncCanvas.prototype.ellipse=function(a,c,b,d){};mxAsyncCanvas.prototype.rewriteImageSource=function(a){if("http://"==a.substring(0,7)||"https://"==a.substring(0,8))a="/proxy?url="+encodeURIComponent(a);return a};
-mxAsyncCanvas.prototype.image=function(a,c,b,d,e,g,k,l){e=this.rewriteImageSource(e);a=this.htmlCanvas.images[e];null==a&&(a=new Image,a.onload=mxUtils.bind(this,function(){this.decWaitCounter()}),a.onerror=mxUtils.bind(this,function(){this.decWaitCounter()}),this.incWaitCounter(),this.htmlCanvas.images[e]=a,a.src=e)};mxAsyncCanvas.prototype.fill=function(){};mxAsyncCanvas.prototype.stroke=function(){};mxAsyncCanvas.prototype.fillAndStroke=function(){};
-mxAsyncCanvas.prototype.text=function(a,c,b,d,e,g,k,l,n,f,h,m){if(null!=e&&0!=e.length&&(a=this.state.scale,"html"==n&&"function"===typeof html2canvas)){this.incWaitCounter();var p=this.canvasIndex++;html2canvas(e,{onrendered:mxUtils.bind(this,function(a){this.htmlCanvas.subCanvas[p]=a;this.decWaitCounter()}),scale:a,logging:!0})}};mxAsyncCanvas.prototype.finish=function(a){0==this.waitCounter?a():this.onComplete=a};function mxJsCanvas(a){mxAbstractCanvas2D.call(this);this.ctx=a.getContext("2d");this.ctx.textBaseline="top";this.ctx.fillStyle="rgba(255,255,255,0)";this.ctx.strokeStyle="rgba(0, 0, 0, 0)";this.M_RAD_PER_DEG=Math.PI/180;this.images=null==this.images?[]:this.images;this.subCanvas=null==this.subCanvas?[]:this.subCanvas}mxUtils.extend(mxJsCanvas,mxAbstractCanvas2D);mxJsCanvas.prototype.ctx=null;mxJsCanvas.prototype.waitCounter=0;mxJsCanvas.prototype.onComplete=null;mxJsCanvas.prototype.images=null;
+mxAsyncCanvas.prototype.image=function(a,c,b,d,e,g,h,l){e=this.rewriteImageSource(e);a=this.htmlCanvas.images[e];null==a&&(a=new Image,a.onload=mxUtils.bind(this,function(){this.decWaitCounter()}),a.onerror=mxUtils.bind(this,function(){this.decWaitCounter()}),this.incWaitCounter(),this.htmlCanvas.images[e]=a,a.src=e)};mxAsyncCanvas.prototype.fill=function(){};mxAsyncCanvas.prototype.stroke=function(){};mxAsyncCanvas.prototype.fillAndStroke=function(){};
+mxAsyncCanvas.prototype.text=function(a,c,b,d,e,g,h,l,m,f,k,n){if(null!=e&&0!=e.length&&(a=this.state.scale,"html"==m&&"function"===typeof html2canvas)){this.incWaitCounter();var p=this.canvasIndex++;html2canvas(e,{onrendered:mxUtils.bind(this,function(a){this.htmlCanvas.subCanvas[p]=a;this.decWaitCounter()}),scale:a,logging:!0})}};mxAsyncCanvas.prototype.finish=function(a){0==this.waitCounter?a():this.onComplete=a};function mxJsCanvas(a){mxAbstractCanvas2D.call(this);this.ctx=a.getContext("2d");this.ctx.textBaseline="top";this.ctx.fillStyle="rgba(255,255,255,0)";this.ctx.strokeStyle="rgba(0, 0, 0, 0)";this.M_RAD_PER_DEG=Math.PI/180;this.images=null==this.images?[]:this.images;this.subCanvas=null==this.subCanvas?[]:this.subCanvas}mxUtils.extend(mxJsCanvas,mxAbstractCanvas2D);mxJsCanvas.prototype.ctx=null;mxJsCanvas.prototype.waitCounter=0;mxJsCanvas.prototype.onComplete=null;mxJsCanvas.prototype.images=null;
mxJsCanvas.prototype.subCanvas=null;mxJsCanvas.prototype.canvasIndex=0;mxJsCanvas.prototype.hexToRgb=function(a){a=a.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,function(a,b,d,e){return b+b+d+d+e+e});return(a=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(a))?{r:parseInt(a[1],16),g:parseInt(a[2],16),b:parseInt(a[3],16)}:null};mxJsCanvas.prototype.incWaitCounter=function(){this.waitCounter++};
mxJsCanvas.prototype.decWaitCounter=function(){this.waitCounter--;0==this.waitCounter&&null!=this.onComplete&&(this.onComplete(),this.onComplete=null)};mxJsCanvas.prototype.updateFont=function(){var a="";(this.state.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(a+="bold ");(this.state.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(a+="italic ");this.ctx.font=a+this.state.fontSize+"px "+this.state.fontFamily};
mxJsCanvas.prototype.save=function(){this.states.push(this.state);this.state=mxUtils.clone(this.state);this.ctx.save()};mxJsCanvas.prototype.restore=function(){this.state=this.states.pop();this.ctx.restore()};mxJsCanvas.prototype.scale=function(a){this.state.scale*=a;this.state.strokeWidth*=a;this.ctx.scale(a,a)};mxJsCanvas.prototype.translate=function(a,c){this.state.dx+=a;this.state.dy+=c;this.ctx.translate(a,c)};
mxJsCanvas.prototype.rotate=function(a,c,b,d,e){d-=this.state.dx;e-=this.state.dy;this.ctx.translate(d,e);(c||b)&&this.ctx.scale(c?-1:1,b?-1:1);this.ctx.rotate(a*this.M_RAD_PER_DEG);this.ctx.translate(-d,-e)};mxJsCanvas.prototype.setAlpha=function(a){this.state.alpha=a;this.ctx.globalAlpha=a};mxJsCanvas.prototype.setFillColor=function(a){a==mxConstants.NONE&&(a=null);this.state.fillColor=a;this.state.gradientColor=null;this.ctx.fillStyle=a};
-mxJsCanvas.prototype.setGradient=function(a,c,b,d,e,g,k,l,n){b=this.ctx.createLinearGradient(0,d,0,d+g);d=this.state;d.fillColor=a;d.fillAlpha=null!=l?l:1;d.gradientColor=c;d.gradientAlpha=null!=n?n:1;d.gradientDirection=k;a=this.hexToRgb(a);c=this.hexToRgb(c);null!=a&&b.addColorStop(0,"rgba("+a.r+","+a.g+","+a.b+","+d.fillAlpha+")");null!=c&&b.addColorStop(1,"rgba("+c.r+","+c.g+","+c.b+","+d.gradientAlpha+")");this.ctx.fillStyle=b};
+mxJsCanvas.prototype.setGradient=function(a,c,b,d,e,g,h,l,m){b=this.ctx.createLinearGradient(0,d,0,d+g);d=this.state;d.fillColor=a;d.fillAlpha=null!=l?l:1;d.gradientColor=c;d.gradientAlpha=null!=m?m:1;d.gradientDirection=h;a=this.hexToRgb(a);c=this.hexToRgb(c);null!=a&&b.addColorStop(0,"rgba("+a.r+","+a.g+","+a.b+","+d.fillAlpha+")");null!=c&&b.addColorStop(1,"rgba("+c.r+","+c.g+","+c.b+","+d.gradientAlpha+")");this.ctx.fillStyle=b};
mxJsCanvas.prototype.setStrokeColor=function(a){null!=a&&(a==mxConstants.NONE?(this.state.strokeColor=null,this.ctx.strokeStyle="rgba(0, 0, 0, 0)"):(this.ctx.strokeStyle=a,this.state.strokeColor=a))};mxJsCanvas.prototype.setStrokeWidth=function(a){this.ctx.lineWidth=a};mxJsCanvas.prototype.setDashed=function(a){if(this.state.dashed=a){a=this.state.dashPattern.split(" ");for(var c=0;c<a.length;c++)a[c]=parseInt(a[c],10);this.setLineDash(a)}else this.setLineDash([0])};
mxJsCanvas.prototype.setLineDash=function(a){try{"function"===typeof this.ctx.setLineDash&&this.ctx.setLineDash(a)}catch(c){}};mxJsCanvas.prototype.setDashPattern=function(a){this.state.dashPattern=a;if(this.state.dashed){a=a.split(" ");for(var c=0;c<a.length;c++)a[c]=parseInt(a[c],10);this.ctx.setLineDash(a)}};mxJsCanvas.prototype.setLineCap=function(a){this.ctx.lineCap=a};mxJsCanvas.prototype.setLineJoin=function(a){this.ctx.lineJoin=a};
mxJsCanvas.prototype.setMiterLimit=function(a){this.ctx.lineJoin=a};mxJsCanvas.prototype.setFontColor=function(a){this.ctx.fillStyle=a};mxJsCanvas.prototype.setFontBackgroundColor=function(a){a==mxConstants.NONE&&(a=null);this.state.fontBackgroundColor=a};mxJsCanvas.prototype.setFontBorderColor=function(a){a==mxConstants.NONE&&(a=null);this.state.fontBorderColor=a};mxJsCanvas.prototype.setFontSize=function(a){this.state.fontSize=a};
mxJsCanvas.prototype.setFontFamily=function(a){this.state.fontFamily=a};mxJsCanvas.prototype.setFontStyle=function(a){this.state.fontStyle=a};mxJsCanvas.prototype.setShadow=function(a){(this.state.shadow=a)?(this.setShadowOffset(this.state.shadowDx,this.state.shadowDy),this.setShadowAlpha(this.state.shadowAlpha)):(this.ctx.shadowColor="transparent",this.ctx.shadowBlur=0,this.ctx.shadowOffsetX=0,this.ctx.shadowOffsetY=0)};
mxJsCanvas.prototype.setShadowColor=function(a){if(null==a||a==mxConstants.NONE)a=null,this.ctx.shadowColor="transparent";this.state.shadowColor=a;if(this.state.shadow&&null!=a){var c=null!=this.state.shadowAlpha?this.state.shadowAlpha:1;a=this.hexToRgb(a);this.ctx.shadowColor="rgba("+a.r+","+a.g+","+a.b+","+c+")"}};mxJsCanvas.prototype.setShadowAlpha=function(a){this.state.shadowAlpha=a;this.setShadowColor(this.state.shadowColor)};
mxJsCanvas.prototype.setShadowOffset=function(a,c){this.state.shadowDx=a;this.state.shadowDy=c;this.state.shadow&&(this.ctx.shadowOffsetX=a,this.ctx.shadowOffsetY=c)};mxJsCanvas.prototype.moveTo=function(a,c){this.ctx.moveTo(a,c);this.lastMoveX=a;this.lastMoveY=c};mxJsCanvas.prototype.lineTo=function(a,c){this.ctx.lineTo(a,c);this.lastMoveX=a;this.lastMoveY=c};mxJsCanvas.prototype.quadTo=function(a,c,b,d){this.ctx.quadraticCurveTo(a,c,b,d);this.lastMoveX=b;this.lastMoveY=d};
-mxJsCanvas.prototype.arcTo=function(a,c,b,d,e,g,k){a=mxUtils.arcToCurves(this.lastMoveX,this.lastMoveY,a,c,b,d,e,g,k);if(null!=a)for(c=0;c<a.length;c+=6)this.curveTo(a[c],a[c+1],a[c+2],a[c+3],a[c+4],a[c+5])};mxJsCanvas.prototype.curveTo=function(a,c,b,d,e,g){this.ctx.bezierCurveTo(a,c,b,d,e,g);this.lastMoveX=e;this.lastMoveY=g};mxJsCanvas.prototype.rect=function(a,c,b,d){this.begin();this.moveTo(a,c);this.lineTo(a+b,c);this.lineTo(a+b,c+d);this.lineTo(a,c+d);this.close()};
+mxJsCanvas.prototype.arcTo=function(a,c,b,d,e,g,h){a=mxUtils.arcToCurves(this.lastMoveX,this.lastMoveY,a,c,b,d,e,g,h);if(null!=a)for(c=0;c<a.length;c+=6)this.curveTo(a[c],a[c+1],a[c+2],a[c+3],a[c+4],a[c+5])};mxJsCanvas.prototype.curveTo=function(a,c,b,d,e,g){this.ctx.bezierCurveTo(a,c,b,d,e,g);this.lastMoveX=e;this.lastMoveY=g};mxJsCanvas.prototype.rect=function(a,c,b,d){this.begin();this.moveTo(a,c);this.lineTo(a+b,c);this.lineTo(a+b,c+d);this.lineTo(a,c+d);this.close()};
mxJsCanvas.prototype.roundrect=function(a,c,b,d,e,g){this.begin();this.moveTo(a+e,c);this.lineTo(a+b-e,c);this.quadTo(a+b,c,a+b,c+g);this.lineTo(a+b,c+d-g);this.quadTo(a+b,c+d,a+b-e,c+d);this.lineTo(a+e,c+d);this.quadTo(a,c+d,a,c+d-g);this.lineTo(a,c+g);this.quadTo(a,c,a+e,c)};mxJsCanvas.prototype.ellipse=function(a,c,b,d){this.ctx.save();this.ctx.translate(a+b/2,c+d/2);this.ctx.scale(b/2,d/2);this.ctx.beginPath();this.ctx.arc(0,0,1,0,2*Math.PI,!1);this.ctx.restore()};
mxJsCanvas.prototype.rewriteImageSource=function(a){if("http://"==a.substring(0,7)||"https://"==a.substring(0,8))a="/proxy?url="+encodeURIComponent(a);return a};
-mxJsCanvas.prototype.image=function(a,c,b,d,e,g,k,l){e=this.rewriteImageSource(e);e=this.images[e];if(null!=e&&0<e.height&&0<e.width){var n=this.ctx;n.save();if(g){g=e.width;var f=e.height,h=Math.min(b/g,d/f);a+=(b-g*h)/2;c+=(d-f*h)/2;b=g*h;d=f*h}k&&(n.translate(2*a+b,0),n.scale(-1,1));l&&(n.translate(0,2*c+d),n.scale(1,-1));n.drawImage(e,a,c,b,d);n.restore()}};mxJsCanvas.prototype.begin=function(){this.ctx.beginPath()};mxJsCanvas.prototype.close=function(){this.ctx.closePath()};
+mxJsCanvas.prototype.image=function(a,c,b,d,e,g,h,l){e=this.rewriteImageSource(e);e=this.images[e];if(null!=e&&0<e.height&&0<e.width){var m=this.ctx;m.save();if(g){g=e.width;var f=e.height,k=Math.min(b/g,d/f);a+=(b-g*k)/2;c+=(d-f*k)/2;b=g*k;d=f*k}h&&(m.translate(2*a+b,0),m.scale(-1,1));l&&(m.translate(0,2*c+d),m.scale(1,-1));m.drawImage(e,a,c,b,d);m.restore()}};mxJsCanvas.prototype.begin=function(){this.ctx.beginPath()};mxJsCanvas.prototype.close=function(){this.ctx.closePath()};
mxJsCanvas.prototype.fill=function(){this.ctx.fill()};mxJsCanvas.prototype.stroke=function(){this.ctx.stroke()};mxJsCanvas.prototype.fillAndStroke=function(){if(this.state.shadow){this.ctx.stroke();this.ctx.fill();var a=this.ctx.shadowColor,c=this.ctx.shadowOffsetX,b=this.ctx.shadowOffsetY;this.ctx.shadowColor="transparent";this.ctx.shadowOffsetX=0;this.ctx.shadowOffsetY=0;this.ctx.stroke();this.ctx.shadowColor=a;this.ctx.shadowOffsetX=c;this.ctx.shadowOffsetY=b}else this.ctx.fill(),this.ctx.stroke()};
-mxJsCanvas.prototype.text=function(a,c,b,d,e,g,k,l,n,f,h,m){if(null!=e&&0!=e.length){b=this.state.scale;0!=m&&(this.ctx.translate(Math.round(a),Math.round(c)),this.ctx.rotate(m*Math.PI/180),this.ctx.translate(Math.round(-a),Math.round(-c)));if("html"==n){e=this.subCanvas[this.canvasIndex++];n=e.height;m=e.width;switch(k){case mxConstants.ALIGN_MIDDLE:c-=n/2/b;break;case mxConstants.ALIGN_BOTTOM:c-=n/b}switch(g){case mxConstants.ALIGN_CENTER:a-=m/2/b;break;case mxConstants.ALIGN_RIGHT:a-=m/b}this.ctx.save();
+mxJsCanvas.prototype.text=function(a,c,b,d,e,g,h,l,m,f,k,n){if(null!=e&&0!=e.length){b=this.state.scale;0!=n&&(this.ctx.translate(Math.round(a),Math.round(c)),this.ctx.rotate(n*Math.PI/180),this.ctx.translate(Math.round(-a),Math.round(-c)));if("html"==m){e=this.subCanvas[this.canvasIndex++];m=e.height;n=e.width;switch(h){case mxConstants.ALIGN_MIDDLE:c-=m/2/b;break;case mxConstants.ALIGN_BOTTOM:c-=m/b}switch(g){case mxConstants.ALIGN_CENTER:a-=n/2/b;break;case mxConstants.ALIGN_RIGHT:a-=n/b}this.ctx.save();
if(null!=this.state.fontBackgroundColor||null!=this.state.fontBorderColor)null!=this.state.fontBackgroundColor&&(this.ctx.fillStyle=this.state.fontBackgroundColor,this.ctx.fillRect(Math.round(a)-.5,Math.round(c)-.5,Math.round(e.width/b),Math.round(e.height/b))),null!=this.state.fontBorderColor&&(this.ctx.strokeStyle=this.state.fontBorderColor,this.ctx.lineWidth=1,this.ctx.strokeRect(Math.round(a)-.5,Math.round(c)-.5,Math.round(e.width/b),Math.round(e.height/b)));this.ctx.scale(1/b,1/b);this.ctx.drawImage(e,
-Math.round(a*b),Math.round(c*b))}else{this.ctx.save();this.updateFont();m=document.createElement("div");m.innerHTML=e;m.style.position="absolute";m.style.top="-9999px";m.style.left="-9999px";m.style.fontFamily=this.state.fontFamily;m.style.fontWeight="bold";m.style.fontSize=this.state.fontSize+"pt";document.body.appendChild(m);n=[m.offsetWidth,m.offsetHeight];document.body.removeChild(m);e=e.split("\n");m=n[1];this.ctx.textBaseline="top";n=c;switch(k){case mxConstants.ALIGN_MIDDLE:this.ctx.textBaseline=
-"middle";c-=(e.length-1)*m/2;n=c-this.state.fontSize/2;break;case mxConstants.ALIGN_BOTTOM:this.ctx.textBaseline="alphabetic",c-=m*(e.length-1),n=c-this.state.fontSize}k=[];m=[];for(b=0;b<e.length;b++)m[b]=a,k[b]=this.ctx.measureText(e[b]).width,null!=g&&g!=mxConstants.ALIGN_LEFT&&(m[b]-=k[b],g==mxConstants.ALIGN_CENTER&&(m[b]+=k[b]/2));if(null!=this.state.fontBackgroundColor||null!=this.state.fontBorderColor){a=m[0];g=k[0];for(b=1;b<e.length;b++)a=Math.min(a,m[b]),g=Math.max(g,k[b]);this.ctx.save();
-a=Math.round(a)-.5;n=Math.round(n)-.5;null!=this.state.fontBackgroundColor&&(this.ctx.fillStyle=this.state.fontBackgroundColor,this.ctx.fillRect(a,n,g,this.state.fontSize*mxConstants.LINE_HEIGHT*e.length));null!=this.state.fontBorderColor&&(this.ctx.strokeStyle=this.state.fontBorderColor,this.ctx.lineWidth=1,this.ctx.strokeRect(a,n,g,this.state.fontSize*mxConstants.LINE_HEIGHT*e.length));this.ctx.restore()}for(b=0;b<e.length;b++)this.ctx.fillText(e[b],m[b],c),c+=this.state.fontSize*mxConstants.LINE_HEIGHT}this.ctx.restore()}};
+Math.round(a*b),Math.round(c*b))}else{this.ctx.save();this.updateFont();n=document.createElement("div");n.innerHTML=e;n.style.position="absolute";n.style.top="-9999px";n.style.left="-9999px";n.style.fontFamily=this.state.fontFamily;n.style.fontWeight="bold";n.style.fontSize=this.state.fontSize+"pt";document.body.appendChild(n);m=[n.offsetWidth,n.offsetHeight];document.body.removeChild(n);e=e.split("\n");n=m[1];this.ctx.textBaseline="top";m=c;switch(h){case mxConstants.ALIGN_MIDDLE:this.ctx.textBaseline=
+"middle";c-=(e.length-1)*n/2;m=c-this.state.fontSize/2;break;case mxConstants.ALIGN_BOTTOM:this.ctx.textBaseline="alphabetic",c-=n*(e.length-1),m=c-this.state.fontSize}h=[];n=[];for(b=0;b<e.length;b++)n[b]=a,h[b]=this.ctx.measureText(e[b]).width,null!=g&&g!=mxConstants.ALIGN_LEFT&&(n[b]-=h[b],g==mxConstants.ALIGN_CENTER&&(n[b]+=h[b]/2));if(null!=this.state.fontBackgroundColor||null!=this.state.fontBorderColor){a=n[0];g=h[0];for(b=1;b<e.length;b++)a=Math.min(a,n[b]),g=Math.max(g,h[b]);this.ctx.save();
+a=Math.round(a)-.5;m=Math.round(m)-.5;null!=this.state.fontBackgroundColor&&(this.ctx.fillStyle=this.state.fontBackgroundColor,this.ctx.fillRect(a,m,g,this.state.fontSize*mxConstants.LINE_HEIGHT*e.length));null!=this.state.fontBorderColor&&(this.ctx.strokeStyle=this.state.fontBorderColor,this.ctx.lineWidth=1,this.ctx.strokeRect(a,m,g,this.state.fontSize*mxConstants.LINE_HEIGHT*e.length));this.ctx.restore()}for(b=0;b<e.length;b++)this.ctx.fillText(e[b],n[b],c),c+=this.state.fontSize*mxConstants.LINE_HEIGHT}this.ctx.restore()}};
mxJsCanvas.prototype.getCanvas=function(){return canvas};mxJsCanvas.prototype.finish=function(a){0==this.waitCounter?a():this.onComplete=a};DrawioClient=function(a,c){mxEventSource.call(this);this.ui=a;this.cookieName=c;this.token=this.getPersistentToken()};mxUtils.extend(DrawioClient,mxEventSource);DrawioClient.prototype.token=null;DrawioClient.prototype.user=null;DrawioClient.prototype.setUser=function(a){this.user=a;this.fireEvent(new mxEventObject("userChanged"))};DrawioClient.prototype.getUser=function(){return this.user};
DrawioClient.prototype.clearPersistentToken=function(){if(isLocalStorage)localStorage.removeItem("."+this.cookieName);else if("undefined"!=typeof Storage){var a=new Date;a.setYear(a.getFullYear()-1);document.cookie=this.cookieName+"=; expires="+a.toUTCString()}};
DrawioClient.prototype.getPersistentToken=function(){var a=null;isLocalStorage&&(a=localStorage.getItem("."+this.cookieName));if(null==a&&"undefined"!=typeof Storage){var c=document.cookie,b=this.cookieName+"=",d=c.indexOf(b);0<=d&&(d+=b.length,a=c.indexOf(";",d),0>a?a=c.length:postCookie=c.substring(a),a=c.substring(d,a),a=0<a.length?a:null,null!=a&&isLocalStorage&&(c=new Date,c.setYear(c.getFullYear()-1),document.cookie=b+"; expires="+c.toUTCString(),localStorage.setItem("."+this.cookieName,a)))}return a};
@@ -8300,9 +8301,9 @@ DrawioClient.prototype.setPersistentToken=function(a){if(null!=a)if(isLocalStora
DriveFile.prototype.isConflict=function(a){return null!=a&&null!=a.error&&412==a.error.code};DriveFile.prototype.getCurrentUser=function(){return null!=this.ui.drive?this.ui.drive.user:null};DriveFile.prototype.getMode=function(){return App.MODE_GOOGLE};
DriveFile.prototype.getPublicUrl=function(a){gapi.client.drive.permissions.list({fileId:this.desc.id}).execute(mxUtils.bind(this,function(c){if(null!=c&&null!=c.items)for(var b=0;b<c.items.length;b++)if("anyoneWithLink"===c.items[b].id||"anyone"===c.items[b].id){a(this.desc.webContentLink);return}a(null)}))};DriveFile.prototype.isAutosaveOptional=function(){return!0};DriveFile.prototype.isRenamable=function(){return this.isEditable()&&DrawioFile.prototype.isEditable.apply(this,arguments)};
DriveFile.prototype.isMovable=function(){return this.isEditable()};DriveFile.prototype.save=function(a,c,b,d,e){DrawioFile.prototype.save.apply(this,arguments);this.saveFile(null,a,c,b,d,e)};
-DriveFile.prototype.saveFile=function(a,c,b,d,e,g){if(!this.isEditable())null!=b&&b();else if(!this.savingFile){var k=mxUtils.bind(this,function(a,g){var f=this.data,h=this.desc,l=this.isModified();this.setModified(!1);this.savingFile=!0;var n=this.isModified;this.isModified=function(){return!0};this.ui.drive.saveFile(this,g,mxUtils.bind(this,function(a){this.isModified=n;this.savingFile=!1;0!=a?(c&&(this.lastAutosaveRevision=(new Date).getTime()),this.autosaveDelay=Math.min(6E3,Math.max(this.saveDelay+
-500,DrawioFile.prototype.autosaveDelay)),this.desc=a,this.fileSaved(f,h,mxUtils.bind(this,function(){this.contentChanged();null!=b&&b(a)}),d)):(this.setModified(l||this.isModified()),null!=d&&d(a))}),mxUtils.bind(this,function(b,c){this.savingFile=!1;this.isModified=n;this.setModified(l||this.isModified());this.isConflict(b)?(this.inConflictState=!0,null!=this.sync?(this.savingFile=!0,this.sync.fileConflict(c,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){this.updateFileData();
-k(a,!0)}),100+500*Math.random())}),mxUtils.bind(this,function(){this.savingFile=!1;null!=d&&d()}))):null!=d&&d()):null!=d&&d(b)}),e,e,a)});k(g,c)}};DriveFile.prototype.copyFile=function(a,c){this.isRestricted()?DrawioFile.prototype.copyFile.apply(this,arguments):this.makeCopy(mxUtils.bind(this,function(){if(this.ui.spinner.spin(document.body,mxResources.get("saving")))try{this.save(!0,a,c)}catch(b){c(b)}}),c,!0)};
+DriveFile.prototype.saveFile=function(a,c,b,d,e,g){if(!this.isEditable())null!=b&&b();else if(!this.savingFile){var h=mxUtils.bind(this,function(a,g){var f=this.data,k=this.desc,l=this.isModified();this.setModified(!1);this.savingFile=!0;var m=this.isModified;this.isModified=function(){return!0};this.ui.drive.saveFile(this,g,mxUtils.bind(this,function(a){this.isModified=m;this.savingFile=!1;0!=a?(c&&(this.lastAutosaveRevision=(new Date).getTime()),this.autosaveDelay=Math.min(6E3,Math.max(this.saveDelay+
+500,DrawioFile.prototype.autosaveDelay)),this.desc=a,this.fileSaved(f,k,mxUtils.bind(this,function(){this.contentChanged();null!=b&&b(a)}),d)):(this.setModified(l||this.isModified()),null!=d&&d(a))}),mxUtils.bind(this,function(b,c){this.savingFile=!1;this.isModified=m;this.setModified(l||this.isModified());this.isConflict(b)?(this.inConflictState=!0,null!=this.sync?(this.savingFile=!0,this.sync.fileConflict(c,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){this.updateFileData();
+h(a,!0)}),100+500*Math.random())}),mxUtils.bind(this,function(){this.savingFile=!1;null!=d&&d()}))):null!=d&&d()):null!=d&&d(b)}),e,e,a)});h(g,c)}};DriveFile.prototype.copyFile=function(a,c){this.isRestricted()?DrawioFile.prototype.copyFile.apply(this,arguments):this.makeCopy(mxUtils.bind(this,function(){if(this.ui.spinner.spin(document.body,mxResources.get("saving")))try{this.save(!0,a,c)}catch(b){c(b)}}),c,!0)};
DriveFile.prototype.makeCopy=function(a,c,b){this.ui.spinner.spin(document.body,mxResources.get("saving"))&&this.saveAs(this.ui.getCopyFilename(this,b),mxUtils.bind(this,function(b){this.desc=b;this.ui.spinner.stop();this.setModified(!1);this.backupPatch=null;this.inConflictState=this.invalidChecksum=!1;this.descriptorChanged();a()}),mxUtils.bind(this,function(){this.ui.spinner.stop();null!=c&&c()}))};DriveFile.prototype.saveAs=function(a,c,b){this.ui.drive.copyFile(this.getId(),a,c,b)};
DriveFile.prototype.rename=function(a,c,b){var d=this.getCurrentEtag();this.ui.drive.renameFile(this.getId(),a,mxUtils.bind(this,function(e){this.hasSameExtension(a,this.getTitle())?(this.desc=e,this.descriptorChanged(),null!=this.sync&&this.sync.descriptorChanged(d),null!=c&&c(e)):(this.desc=e,null!=this.sync&&this.sync.descriptorChanged(d),this.save(!0,c,b))}),b)};
DriveFile.prototype.move=function(a,c,b){this.ui.drive.moveFile(this.getId(),a,mxUtils.bind(this,function(a){this.desc=a;this.descriptorChanged();null!=c&&c(a)}),b)};DriveFile.prototype.getTitle=function(){return this.desc.title};DriveFile.prototype.getHash=function(){return"G"+this.getId()};DriveFile.prototype.getId=function(){return this.desc.id};DriveFile.prototype.isEditable=function(){return DrawioFile.prototype.isEditable.apply(this,arguments)&&this.desc.editable};
@@ -8320,9 +8321,9 @@ DriveClient.prototype.setUserId=function(a,c){if(c)if(isLocalStorage)localStorag
DriveClient.prototype.getUserId=function(){var a=null;null!=this.user&&(a=this.user.id);null==a&&isLocalStorage&&(a=localStorage.getItem(".guid"));if(null==a&&"undefined"!=typeof Storage){for(var c=document.cookie.split(";"),b=0;b<c.length;b++){var d=mxUtils.trim(c[b]);if("GUID="==d.substring(0,5)){a=d.substring(5);break}}null!=a&&isLocalStorage&&(c=new Date,c.setYear(c.getFullYear()-1),document.cookie="GUID=; expires="+c.toUTCString(),localStorage.setItem(".guid",a))}return a};
DriveClient.prototype.execute=function(a){var c=mxUtils.bind(this,function(b){this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(b,c){this.authorize(!1,mxUtils.bind(this,function(){null!=c&&c();a()}),mxUtils.bind(this,function(a){var b=mxResources.get("cannotLogin");null!=a&&null!=a.error&&403==a.error.code&&null!=a.error.data&&0<a.error.data.length&&"domainPolicy"==a.error.data[0].reason&&(b=a.error.message);this.ui.drive.clearUserId();this.ui.drive.setUser(null);gapi.auth.signOut();this.ui.showError(mxResources.get("error"),
b,mxResources.get("help"),mxUtils.bind(this,function(){this.ui.openLink("https://desk.draw.io/support/solutions/articles/16000074659")}),null,mxResources.get("ok"))}),b)}))});this.authorize(!0,a,c)};
-DriveClient.prototype.executeRequest=function(a,c,b){var d=!0,e=null,g=0;null!=this.requestThread&&window.clearTimeout(this.requestThread);var k=mxUtils.bind(this,function(){this.requestThread=null;this.currentRequest=a;null!=e&&window.clearTimeout(e);e=window.setTimeout(mxUtils.bind(this,function(){d=!1;null!=b&&b({code:App.ERROR_TIMEOUT,retry:k})}),this.ui.timeout);a.execute(mxUtils.bind(this,function(l){window.clearTimeout(e);if(d)if(null!=l&&null==l.error)null!=c&&c(l);else{var n=null!=l&&null!=
-l.error?null!=l.error.data?l.error.data:l.error.errors:null,n=null!=n&&0<n.length?n[0].reason:null;null==b||null==l||null==l.error||-1!=l.error.code&&(403!=l.error.code||"domainPolicy"!=n&&"The requested mime type change is forbidden."!=l.error.message)?null!=l&&null!=l.error&&(401==l.error.code||403==l.error.code&&"rateLimitExceeded"!=n)?403==l.error.code&&null!=this.user||401==l.error.code&&null!=this.user&&"authError"==n?null!=b&&b(l):this.execute(k):null!=l&&null!=l.error&&412!=l.error.code&&
-404!=l.error.code&&400!=l.error.code&&this.currentRequest==a&&g<this.maxRetries?(g++,this.requestThread=window.setTimeout(k,Math.round(Math.pow(2,g)*(1+.1*(Math.random()-.5))*this.coolOff))):null!=b&&b(l):b(l)}}))});null==gapi.auth.getToken()?this.execute(k):k()};
+DriveClient.prototype.executeRequest=function(a,c,b){var d=!0,e=null,g=0;null!=this.requestThread&&window.clearTimeout(this.requestThread);var h=mxUtils.bind(this,function(){this.requestThread=null;this.currentRequest=a;null!=e&&window.clearTimeout(e);e=window.setTimeout(mxUtils.bind(this,function(){d=!1;null!=b&&b({code:App.ERROR_TIMEOUT,retry:h})}),this.ui.timeout);a.execute(mxUtils.bind(this,function(l){window.clearTimeout(e);if(d)if(null!=l&&null==l.error)null!=c&&c(l);else{var m=null!=l&&null!=
+l.error?null!=l.error.data?l.error.data:l.error.errors:null,m=null!=m&&0<m.length?m[0].reason:null;null==b||null==l||null==l.error||-1!=l.error.code&&(403!=l.error.code||"domainPolicy"!=m&&"The requested mime type change is forbidden."!=l.error.message)?null!=l&&null!=l.error&&(401==l.error.code||403==l.error.code&&"rateLimitExceeded"!=m)?403==l.error.code&&null!=this.user||401==l.error.code&&null!=this.user&&"authError"==m?null!=b&&b(l):this.execute(h):null!=l&&null!=l.error&&412!=l.error.code&&
+404!=l.error.code&&400!=l.error.code&&this.currentRequest==a&&g<this.maxRetries?(g++,this.requestThread=window.setTimeout(h,Math.round(Math.pow(2,g)*(1+.1*(Math.random()-.5))*this.coolOff))):null!=b&&b(l):b(l)}}))});null==gapi.auth.getToken()?this.execute(h):h()};
DriveClient.prototype.authorize=function(a,c,b,d){var e=this.getUserId();null!=this.ui.stateArg&&null!=this.ui.stateArg.userId&&(e=this.ui.stateArg.userId);if(a&&null==e)null!=b&&b();else{var g={scope:this.scopes,client_id:this.clientId};a&&null!=e?(g.immediate=!0,g.user_id=e):(g.immediate=!1,g.authuser=-1);gapi.auth.authorize(g,mxUtils.bind(this,function(g){null!=g&&null==g.error?null!=this.user&&a&&this.user.id==e?null!=c&&c():this.updateUser(c,b,d):null!=b&&b(g);this.resetTokenRefresh(g)}))}};
DriveClient.prototype.resetTokenRefresh=function(a){null!=this.tokenRefreshThread&&(window.clearTimeout(this.tokenRefreshThread),this.tokenRefreshThread=null);null!=a&&null==a.error&&0<a.expires_in&&(this.tokenRefreshInterval=1E3*parseInt(a.expires_in),this.lastTokenRefresh=(new Date).getTime(),this.tokenRefreshThread=window.setTimeout(mxUtils.bind(this,function(){this.authorize(!0,mxUtils.bind(this,function(){}),mxUtils.bind(this,function(){}))}),900*a.expires_in))};
DriveClient.prototype.checkToken=function(a){var c=0<this.lastTokenRefresh;(new Date).getTime()-this.lastTokenRefresh>this.tokenRefreshInterval||null==this.tokenRefreshThread?this.execute(mxUtils.bind(this,function(){a();c&&this.fireEvent(new mxEventObject("disconnected"))})):a()};
@@ -8335,22 +8336,22 @@ this.ui.convertFile(g,a.title,a.mimeType,this.extension,c,b)):d||e||a.mimeType==
DriveClient.prototype.getRealtimeData=function(a,c,b,d){this.executeRequest(gapi.client.drive.realtime.get({fileId:a,supportsTeamDrives:!0}),mxUtils.bind(this,function(d){d=null!=d.result?d.result.data:null;null!=d&&null!=d.value&&null!=d.value.diagrams?c(d):null!=b&&b({message:"realtime.get returned invalid data for "+a})}),mxUtils.bind(this,function(e){null==d&&(d=0);3>d?window.setTimeout(mxUtils.bind(this,function(){this.getRealtimeData(a,c,b,d+1)}),100*(d+1)):null!=b&&b({message:"realtime.get failed for "+
a})}))};DriveClient.prototype.loadRealtime=function(a,c,b){"1"==urlParams.ignoremime||"420247213240"!=this.appId||"application/vnd.jgraph.mxfile.realtime"!=a.mimeType&&"application/mxr"!=a.mimeType?c():this.redirectToNewApp(b,a.id)};
DriveClient.prototype.getXmlFile=function(a,c,b,d,e){d=gapi.auth.getToken().access_token;this.ui.loadUrl(a.downloadUrl+"&access_token="+d,mxUtils.bind(this,function(d){if(null==d)b({message:mxResources.get("invalidOrMissingFile")});else if(a.mimeType==this.libraryMimeType||e)a.mimeType!=this.libraryMimeType||e?c(new DriveLibrary(this.ui,d,a)):b({message:mxResources.get("notADiagramFile")});else{if(/\.png$/i.test(a.title)){var g=d.lastIndexOf(",");if(0<g){var l=this.ui.extractGraphModelFromPng(d.substring(g+
-1));if(null!=l&&0<l.length)d=l;else try{var n=atob(d.substring(g+1));null==n||"<mxfile "!==n.substring(0,8)&&"<mxGraphModel "!==n.substring(0,14)&&"<mxGraphModel>"!==n.substring(0,14)||(d=n)}catch(f){}}}else"data:image/png;base64,PG14ZmlsZS"==d.substring(0,32)&&(n=d.substring(22),d=window.atob&&!mxClient.IS_SF?atob(n):Base64.decode(n));c(new DriveFile(this.ui,d,a))}}),b,null!=a.mimeType&&"image/"==a.mimeType.substring(0,6)&&"image/svg"!=a.mimeType.substring(0,9)||/\.png$/i.test(a.title)||/\.jpe?g$/i.test(a.title))};
-DriveClient.prototype.saveFile=function(a,c,b,d,e,g,k,l){if(a.isEditable()){var n=(new Date).getTime();e=null!=e?e:!this.ui.isLegacyDriveDomain()||"1"==urlParams.ignoremime;g=null!=g?g:!1;var f=mxUtils.bind(this,function(e,f,h){var m=null,p=!1,q={mimeType:a.desc.mimeType,title:a.getTitle()};this.isGoogleRealtimeMimeType(a.desc.mimeType)&&(q.mimeType=this.xmlMimeType,m=a.desc,p=c=!0);a.constructor==DriveFile&&(null==l&&(l=[]),null==a.getChannelId()&&l.push({key:"channel",value:Editor.guid(32)}),null==
-a.getChannelKey()&&l.push({key:"key",value:Editor.guid(32)}),l.push({key:"secret",value:Editor.guid(32)}));h||(null!=e||g||(e=this.placeholderThumbnail,f=this.placeholderMimeType),null!=e&&null!=f&&(q.thumbnail={image:e,mimeType:f}));var t=mxUtils.bind(this,function(){a.saveDelay=(new Date).getTime()-n;b.apply(this,arguments);null!=m&&(this.executeRequest(gapi.client.drive.revisions.get({fileId:m.id,revisionId:m.headRevisionId,supportsTeamDrives:!0}),mxUtils.bind(this,mxUtils.bind(this,function(a){a.pinned=
-!0;this.executeRequest(gapi.client.drive.revisions.update({fileId:m.id,revisionId:m.headRevisionId,resource:a}))}))),EditorUi.logEvent({category:"RT-CONVERT-"+a.convertedFrom,action:"from-"+m.id+"."+m.headRevisionId+"-to-"+a.desc.id+"."+a.desc.headRevisionId+"-",label:null!=this.user?this.user.id:"unknown-user"}))}),w=mxUtils.bind(this,function(b,e){null!=l&&(q.properties=l);var f=k||a.constructor!=DriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?null:a.getCurrentEtag(),g=0,h=mxUtils.bind(this,
-function(k){var l=a.desc.mimeType!=this.xmlMimeType&&a.desc.mimeType!=this.mimeType&&a.desc.mimeType!=this.libraryMimeType;this.executeRequest(this.createUploadRequest(a.getId(),q,b,c||k||l,e,k?null:f,p),t,mxUtils.bind(this,function(b){a.isConflict(b)?this.executeRequest(gapi.client.drive.files.get({fileId:a.getId(),fields:this.catchupFields,supportsTeamDrives:!0}),mxUtils.bind(this,function(c){null!=c&&c.etag==f?g<this.maxRetries?(g++,window.setTimeout(h,2*g*this.coolOff*(1+.1*(Math.random()-.5)))):
-(h(!0),EditorUi.logError("Warning: Stale Etag Overwrite",null,a.desc.id+"."+a.desc.headRevisionId,null!=this.user?this.user.id:"unknown")):null!=d&&d(b,c)}),mxUtils.bind(this,function(){null!=d&&d(b)})):d(b)}))});h(!1)});this.ui.useCanvasForExport&&/(\.png)$/i.test(a.getTitle())?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){w(a,!0)}),d,this.ui.getCurrentFile()!=a?a.getData():null):w(a.getData(),!1)}),h=mxUtils.bind(this,function(){!g&&a.constructor!=DriveLibrary&&this.enableThumbnails&&"0"!=
-urlParams.thumb&&this.ui.getThumbnail(this.thumbnailWidth,mxUtils.bind(this,function(a){var b=null;if(null!=a)try{b=a.toDataURL("image/png")}catch(q){}b=null==b||b.length>this.maxThumbnailSize?null:b.substring(b.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_");f(b,"image/png")}))||f(null,null,a.constructor!=DriveLibrary)});e||!c?h():this.verifyMimeType(a.getId(),h,!0)}else this.ui.editor.graph.reset(),null!=d&&d({message:mxResources.get("readOnly")})};
+1));if(null!=l&&0<l.length)d=l;else try{var m=atob(d.substring(g+1));null==m||"<mxfile "!==m.substring(0,8)&&"<mxGraphModel "!==m.substring(0,14)&&"<mxGraphModel>"!==m.substring(0,14)||(d=m)}catch(f){}}}else"data:image/png;base64,PG14ZmlsZS"==d.substring(0,32)&&(m=d.substring(22),d=window.atob&&!mxClient.IS_SF?atob(m):Base64.decode(m));c(new DriveFile(this.ui,d,a))}}),b,null!=a.mimeType&&"image/"==a.mimeType.substring(0,6)&&"image/svg"!=a.mimeType.substring(0,9)||/\.png$/i.test(a.title)||/\.jpe?g$/i.test(a.title))};
+DriveClient.prototype.saveFile=function(a,c,b,d,e,g,h,l){if(a.isEditable()){var m=(new Date).getTime();e=null!=e?e:!this.ui.isLegacyDriveDomain()||"1"==urlParams.ignoremime;g=null!=g?g:!1;var f=mxUtils.bind(this,function(e,f,k){var n=null,p=!1,q={mimeType:a.desc.mimeType,title:a.getTitle()};this.isGoogleRealtimeMimeType(a.desc.mimeType)&&(q.mimeType=this.xmlMimeType,n=a.desc,p=c=!0);a.constructor==DriveFile&&(null==l&&(l=[]),null==a.getChannelId()&&l.push({key:"channel",value:Editor.guid(32)}),null==
+a.getChannelKey()&&l.push({key:"key",value:Editor.guid(32)}),l.push({key:"secret",value:Editor.guid(32)}));k||(null!=e||g||(e=this.placeholderThumbnail,f=this.placeholderMimeType),null!=e&&null!=f&&(q.thumbnail={image:e,mimeType:f}));var t=mxUtils.bind(this,function(){a.saveDelay=(new Date).getTime()-m;b.apply(this,arguments);null!=n&&(this.executeRequest(gapi.client.drive.revisions.get({fileId:n.id,revisionId:n.headRevisionId,supportsTeamDrives:!0}),mxUtils.bind(this,mxUtils.bind(this,function(a){a.pinned=
+!0;this.executeRequest(gapi.client.drive.revisions.update({fileId:n.id,revisionId:n.headRevisionId,resource:a}))}))),EditorUi.logEvent({category:"RT-CONVERT-"+a.convertedFrom,action:"from-"+n.id+"."+n.headRevisionId+"-to-"+a.desc.id+"."+a.desc.headRevisionId+"-",label:null!=this.user?this.user.id:"unknown-user"}))}),w=mxUtils.bind(this,function(b,e){null!=l&&(q.properties=l);var f=h||a.constructor!=DriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?null:a.getCurrentEtag(),g=0,k=mxUtils.bind(this,
+function(h){var l=a.desc.mimeType!=this.xmlMimeType&&a.desc.mimeType!=this.mimeType&&a.desc.mimeType!=this.libraryMimeType;this.executeRequest(this.createUploadRequest(a.getId(),q,b,c||h||l,e,h?null:f,p),t,mxUtils.bind(this,function(b){a.isConflict(b)?this.executeRequest(gapi.client.drive.files.get({fileId:a.getId(),fields:this.catchupFields,supportsTeamDrives:!0}),mxUtils.bind(this,function(c){null!=c&&c.etag==f?g<this.maxRetries?(g++,window.setTimeout(k,2*g*this.coolOff*(1+.1*(Math.random()-.5)))):
+(k(!0),EditorUi.logError("Warning: Stale Etag Overwrite",null,a.desc.id+"."+a.desc.headRevisionId,null!=this.user?this.user.id:"unknown")):null!=d&&d(b,c)}),mxUtils.bind(this,function(){null!=d&&d(b)})):d(b)}))});k(!1)});this.ui.useCanvasForExport&&/(\.png)$/i.test(a.getTitle())?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){w(a,!0)}),d,this.ui.getCurrentFile()!=a?a.getData():null):w(a.getData(),!1)}),k=mxUtils.bind(this,function(){!g&&a.constructor!=DriveLibrary&&this.enableThumbnails&&"0"!=
+urlParams.thumb&&this.ui.getThumbnail(this.thumbnailWidth,mxUtils.bind(this,function(a){var b=null;if(null!=a)try{b=a.toDataURL("image/png")}catch(q){}b=null==b||b.length>this.maxThumbnailSize?null:b.substring(b.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_");f(b,"image/png")}))||f(null,null,a.constructor!=DriveLibrary)});e||!c?k():this.verifyMimeType(a.getId(),k,!0)}else this.ui.editor.graph.reset(),null!=d&&d({message:mxResources.get("readOnly")})};
DriveClient.prototype.verifyMimeType=function(a,c,b,d){null==this.lastMimeCheck&&(this.lastMimeCheck=0);var e=(new Date).getTime();if(b||e-this.lastMimeCheck>this.mimeTypeCheckCoolOff)this.lastMimeCheck=e,this.checkingMimeType||(this.checkingMimeType=!0,this.executeRequest(gapi.client.drive.files.get({fileId:a,fields:"mimeType",supportsTeamDrives:!0}),mxUtils.bind(this,function(b){this.checkingMimeType=!1;null!=b&&"application/vnd.jgraph.mxfile.realtime"==b.mimeType?this.redirectToNewApp(d,a):null!=
c&&c()})))};
DriveClient.prototype.redirectToNewApp=function(a,c){this.ui.spinner.stop();if(!this.redirectDialogShowing){this.redirectDialogShowing=!0;var b=window.location.protocol+"//"+this.newAppHostname+"/"+this.ui.getSearch("create title mode url drive splash state".split(" "))+"#G"+c,d=mxUtils.bind(this,function(){this.redirectDialogShowing=!1;window.location.href==b?window.location.reload():window.location.href=b});null!=a?this.ui.confirm(mxResources.get("redirectToNewApp"),d,mxUtils.bind(this,function(){this.redirectDialogShowing=
-!1;null!=a&&a()})):this.ui.alert(mxResources.get("redirectToNewApp"),d)}};DriveClient.prototype.insertFile=function(a,c,b,d,e,g,k){g=null!=g?g:this.xmlMimeType;a={mimeType:g,title:a};null!=b&&(a.parents=[{kind:"drive#fileLink",id:b}]);this.executeRequest(this.createUploadRequest(null,a,c,!1,k),mxUtils.bind(this,function(a){g==this.libraryMimeType?d(new DriveLibrary(this.ui,c,a)):0==a?null!=e&&e({message:mxResources.get("errorSavingFile")}):d(new DriveFile(this.ui,c,a))}),e)};
-DriveClient.prototype.createUploadRequest=function(a,c,b,d,e,g,k){e=null!=e?e:!1;var l={"Content-Type":'multipart/mixed; boundary="-------314159265358979323846"'};null!=g&&(l["If-Match"]=g);a={path:"/upload/drive/v2/files"+(null!=a?"/"+a:""),method:null!=a?"PUT":"POST",params:{uploadType:"multipart"},headers:l,body:"\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!=b?e?b:Base64.encode(b):"")+"\r\n---------314159265358979323846--"};d||(a.params.newRevision=!1);k&&(a.params.pinned=!0);a.params.supportsTeamDrives=!0;a.params.fields=this.allFields;return gapi.client.request(a)};
+!1;null!=a&&a()})):this.ui.alert(mxResources.get("redirectToNewApp"),d)}};DriveClient.prototype.insertFile=function(a,c,b,d,e,g,h){g=null!=g?g:this.xmlMimeType;a={mimeType:g,title:a};null!=b&&(a.parents=[{kind:"drive#fileLink",id:b}]);this.executeRequest(this.createUploadRequest(null,a,c,!1,h),mxUtils.bind(this,function(a){g==this.libraryMimeType?d(new DriveLibrary(this.ui,c,a)):0==a?null!=e&&e({message:mxResources.get("errorSavingFile")}):d(new DriveFile(this.ui,c,a))}),e)};
+DriveClient.prototype.createUploadRequest=function(a,c,b,d,e,g,h){e=null!=e?e:!1;var l={"Content-Type":'multipart/mixed; boundary="-------314159265358979323846"'};null!=g&&(l["If-Match"]=g);a={path:"/upload/drive/v2/files"+(null!=a?"/"+a:""),method:null!=a?"PUT":"POST",params:{uploadType:"multipart"},headers:l,body:"\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!=b?e?b:Base64.encode(b):"")+"\r\n---------314159265358979323846--"};d||(a.params.newRevision=!1);h&&(a.params.pinned=!0);a.params.supportsTeamDrives=!0;a.params.fields=this.allFields;return gapi.client.request(a)};
DriveClient.prototype.pickFile=function(a,c){this.filePickerCallback=null!=a?a:mxUtils.bind(this,function(a){this.ui.loadFile("G"+a)});this.filePicked=mxUtils.bind(this,function(a){a.action==google.picker.Action.PICKED&&this.filePickerCallback(a.docs[0].id)});this.ui.spinner.spin(document.body,mxResources.get("authorizing"))&&this.execute(mxUtils.bind(this,function(){this.ui.spinner.stop();var a=gapi.auth.getToken().access_token,d=c?"genericPicker":"filePicker",e=mxUtils.bind(this,function(a){"picker modal-dialog-bg picker-dialog-bg"==
-mxEvent.getSource(a).className&&(mxEvent.removeListener(document,"click",e),this[d].setVisible(!1))});if(null==this[d]||this[d+"Token"]!=a){this[d+"Token"]=a;var a=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0),g=(new google.picker.DocsView).setIncludeFolders(!0),k=(new google.picker.DocsView).setEnableTeamDrives(!0).setIncludeFolders(!0),l=(new google.picker.DocsUploadView).setIncludeFolders(!0);c?(a.setMimeTypes("*/*"),g.setMimeTypes("*/*"),k.setMimeTypes("*/*")):
-(a.setMimeTypes(this.mimeTypes),g.setMimeTypes(this.mimeTypes),k.setMimeTypes(this.mimeTypes));this[d]=(new google.picker.PickerBuilder).setOAuthToken(this[d+"Token"]).setLocale(mxLanguage).setAppId(this.appId).enableFeature(google.picker.Feature.SUPPORT_TEAM_DRIVES).addView(a).addView(g).addView(k).addView(google.picker.ViewId.RECENTLY_PICKED).addView(l).setCallback(mxUtils.bind(this,function(a){a.action!=google.picker.Action.PICKED&&a.action!=google.picker.Action.CANCEL||mxEvent.removeListener(document,
+mxEvent.getSource(a).className&&(mxEvent.removeListener(document,"click",e),this[d].setVisible(!1))});if(null==this[d]||this[d+"Token"]!=a){this[d+"Token"]=a;var a=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0),g=(new google.picker.DocsView).setIncludeFolders(!0),h=(new google.picker.DocsView).setEnableTeamDrives(!0).setIncludeFolders(!0),l=(new google.picker.DocsUploadView).setIncludeFolders(!0);c?(a.setMimeTypes("*/*"),g.setMimeTypes("*/*"),h.setMimeTypes("*/*")):
+(a.setMimeTypes(this.mimeTypes),g.setMimeTypes(this.mimeTypes),h.setMimeTypes(this.mimeTypes));this[d]=(new google.picker.PickerBuilder).setOAuthToken(this[d+"Token"]).setLocale(mxLanguage).setAppId(this.appId).enableFeature(google.picker.Feature.SUPPORT_TEAM_DRIVES).addView(a).addView(g).addView(h).addView(google.picker.ViewId.RECENTLY_PICKED).addView(l).setCallback(mxUtils.bind(this,function(a){a.action!=google.picker.Action.PICKED&&a.action!=google.picker.Action.CANCEL||mxEvent.removeListener(document,
"click",e);a.action==google.picker.Action.PICKED&&this.filePicked(a)})).build()}mxEvent.addListener(document,"click",e);this[d].setVisible(!0)}))};
DriveClient.prototype.pickFolder=function(a){this.folderPickerCallback=a;var c=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("authorizing"))&&this.execute(mxUtils.bind(this,function(){this.ui.spinner.stop();var a=gapi.auth.getToken().access_token,c=mxUtils.bind(this,function(a){"picker modal-dialog-bg picker-dialog-bg"==mxEvent.getSource(a).className&&(mxEvent.removeListener(document,"click",c),this.folderPicker.setVisible(!1))});if(null==this.folderPicker||this.folderPickerToken!=
a){this.folderPickerToken=a;var a=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0).setMimeTypes("application/vnd.google-apps.folder"),e=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0).setMimeTypes("application/vnd.google-apps.folder"),g=(new google.picker.DocsView).setIncludeFolders(!0).setEnableTeamDrives(!0).setSelectFolderEnabled(!0).setMimeTypes("application/vnd.google-apps.folder");this.folderPicker=
@@ -8361,8 +8362,8 @@ DriveClient.prototype.pickLibrary=function(a){this.filePickerCallback=a;this.fil
e=(new google.picker.DocsView).setEnableTeamDrives(!0).setIncludeFolders(!0).setMimeTypes(this.libraryMimeType+",application/xml,text/plain,application/octet-stream"),g=(new google.picker.DocsUploadView).setIncludeFolders(!0);this.libraryPicker=(new google.picker.PickerBuilder).setOAuthToken(this.libraryPickerToken).setLocale(mxLanguage).setAppId(this.appId).enableFeature(google.picker.Feature.SUPPORT_TEAM_DRIVES).addView(b).addView(d).addView(e).addView(google.picker.ViewId.RECENTLY_PICKED).addView(g).setCallback(mxUtils.bind(this,
function(b){b.action!=google.picker.Action.PICKED&&b.action!=google.picker.Action.CANCEL||mxEvent.removeListener(document,"click",a);b.action==google.picker.Action.PICKED&&this.filePicked(b)})).build()}mxEvent.addListener(document,"click",a);this.libraryPicker.setVisible(!0)}))};DriveClient.prototype.showPermissions=function(a){this.checkToken(mxUtils.bind(this,function(){var c=new gapi.drive.share.ShareClient(this.appId);c.setOAuthToken(gapi.auth.getToken().access_token);c.setItemIds([a]);c.showSettingsDialog()}))};
DriveClient.prototype.getRealtimeAge=function(a,c){var b=null!=c&&null!=c.value&&null!=c.value.modifiedDate?c.value.modifiedDate.json:null,d=0;null!=b&&0<b&&(b=new Date(b),d=(new Date(a.modifiedDate)).getTime()-b.getTime());return d};
-DriveClient.prototype.convertRealtimeFile=function(a,c,b){var d=mxUtils.bind(this,function(a){a.convertedFrom="xml";c(a)}),e=mxUtils.bind(this,function(a){a.convertedFrom="json";c(a)});this.getRealtimeData(a.id,mxUtils.bind(this,function(c){try{3E5>this.getRealtimeAge(a,c)?e(new DriveFile(this.ui,mxUtils.getXml(this.convertJsonToXml(c)),a)):this.getXmlFile(a,d,mxUtils.bind(this,function(){try{e(new DriveFile(this.ui,mxUtils.getXml(this.convertJsonToXml(c)),a))}catch(k){this.getXmlFile(a,d,b)}}))}catch(k){this.getXmlFile(a,
-d,b)}}),mxUtils.bind(this,function(){this.getXmlFile(a,d,b)}))};DriveClient.prototype.convertJsonToXml=function(a,c){if(null==a.value||null==a.value.diagrams)throw Error("Invalid JSON: no diagrams in root map");for(var b=mxUtils.createXmlDocument().createElement("mxfile"),d=a.value.diagrams.value,e=0;e<d.length;e++)try{var g=this.decodeJsonPage(d[e].value,b.ownerDocument.createElement("diagram"),c);b.appendChild(g)}catch(k){throw Error("Error on page "+e+": "+k.stack);}return b};
+DriveClient.prototype.convertRealtimeFile=function(a,c,b){var d=mxUtils.bind(this,function(a){a.convertedFrom="xml";c(a)}),e=mxUtils.bind(this,function(a){a.convertedFrom="json";c(a)});this.getRealtimeData(a.id,mxUtils.bind(this,function(c){try{3E5>this.getRealtimeAge(a,c)?e(new DriveFile(this.ui,mxUtils.getXml(this.convertJsonToXml(c)),a)):this.getXmlFile(a,d,mxUtils.bind(this,function(){try{e(new DriveFile(this.ui,mxUtils.getXml(this.convertJsonToXml(c)),a))}catch(h){this.getXmlFile(a,d,b)}}))}catch(h){this.getXmlFile(a,
+d,b)}}),mxUtils.bind(this,function(){this.getXmlFile(a,d,b)}))};DriveClient.prototype.convertJsonToXml=function(a,c){if(null==a.value||null==a.value.diagrams)throw Error("Invalid JSON: no diagrams in root map");for(var b=mxUtils.createXmlDocument().createElement("mxfile"),d=a.value.diagrams.value,e=0;e<d.length;e++)try{var g=this.decodeJsonPage(d[e].value,b.ownerDocument.createElement("diagram"),c);b.appendChild(g)}catch(h){throw Error("Error on page "+e+": "+h.stack);}return b};
DriveClient.prototype.decodeJsonPage=function(a,c,b){if(null==a)throw Error("Invalid JSON: json for page is null");var d=new mxCodec,e=this.createJsonCell(a.root,d);if(null==e)throw Error("Invalid JSON: no root cell for page");d=d.encode(new mxGraphModel(e));this.decodeJsonViewState(a,d);b?c.appendChild(d):mxUtils.setTextContent(c,this.ui.editor.graph.compressNode(d));null!=a.id?c.setAttribute("id",a.id.json):c.setAttribute("id",Editor.guid());null!=a.name&&c.setAttribute("name",a.name.json);return c};
DriveClient.prototype.decodeJsonViewState=function(a,c){var b=null!=a.pageFormat?a.pageFormat.json:null;null!=b&&0<b.length&&(b=b.split(","),1<b.length&&(c.setAttribute("pageWidth",b[0]),c.setAttribute("pageHeight",b[1])));b=null!=a.backgroundColor?a.backgroundColor.json:null;null!=b&&0<b.length&&c.setAttribute("background",b);b=null!=a.backgroundImage?a.backgroundImage.json:null;null!=b&&0<b.length&&c.setAttribute("backgroundImage",b);c.setAttribute("fold",null!=a.foldingEnabled?a.foldingEnabled.json:
"0");c.setAttribute("pageScale",null!=a.pageScale?a.pageScale.json:mxGraph.prototype.pageScale);c.setAttribute("math",null!=a.mathEnabled?a.mathEnabled.json:"0");c.setAttribute("shadow",null!=a.shadowVisible?a.shadowVisible.json:"0");return c};
@@ -8371,34 +8372,34 @@ c.objects[a.ref]:null};
DriveClient.prototype.jsonToCell=function(a,c){var b=new mxCell;b.id=a.cellId.json;b.vertex="vertex"==a.type.json;b.edge="edge"==a.type.json;b.connectable="0"!=a.connectable.json;b.collapsed="1"==a.collapsed.json;b.visible="0"!=a.visible.json;b.style=null!=a.style?a.style.json:null;b.value=null!=a.xmlValue?mxUtils.parseXml(a.xmlValue.json).documentElement:null!=a.value?a.value.json:null;b.geometry=null!=a.geometry?c.decode(mxUtils.parseXml(a.geometry.json).documentElement):null;return b};DropboxFile=function(a,c,b){DrawioFile.call(this,a,c);this.stat=b};mxUtils.extend(DropboxFile,DrawioFile);DropboxFile.prototype.getId=function(){return this.stat.path_display.substring(1)};DropboxFile.prototype.getHash=function(){return"D"+encodeURIComponent(this.getId())};DropboxFile.prototype.getMode=function(){return App.MODE_DROPBOX};DropboxFile.prototype.isAutosaveOptional=function(){return!0};DropboxFile.prototype.getTitle=function(){return this.stat.name};
DropboxFile.prototype.isRenamable=function(){return!0};DropboxFile.prototype.getSize=function(){return this.stat.size};DropboxFile.prototype.isRevisionHistorySupported=function(){return!0};
DropboxFile.prototype.getRevisions=function(a,c){var b=this.ui.dropbox.client.filesListRevisions({path:this.stat.path_lower,limit:100});b.then(mxUtils.bind(this,function(b){try{for(var d=[],g=b.entries.length-1;0<=g;g--)mxUtils.bind(this,function(a){d.push({modifiedDate:a.client_modified,fileSize:a.size,getXml:mxUtils.bind(this,function(b,c){this.ui.dropbox.readFile({path:this.stat.path_lower,rev:a.rev},b,c)}),getUrl:mxUtils.bind(this,function(b){return this.ui.getUrl(window.location.pathname+"?rev="+
-a.rev+"&chrome=0&nav=1&layers=1&edit=_blank"+(null!=b?"&page="+b:""))+window.location.hash})})})(b.entries[g]);a(d)}catch(k){c(k)}}));b["catch"](function(a){c(a)})};DropboxFile.prototype.getLatestVersion=function(a,c){this.ui.dropbox.getFile(this.getId(),a,c)};DropboxFile.prototype.updateDescriptor=function(a){this.stat=a.stat};DropboxFile.prototype.save=function(a,c,b){this.doSave(this.getTitle(),c,b)};DropboxFile.prototype.saveAs=function(a,c,b){this.doSave(a,c,b)};
+a.rev+"&chrome=0&nav=1&layers=1&edit=_blank"+(null!=b?"&page="+b:""))+window.location.hash})})})(b.entries[g]);a(d)}catch(h){c(h)}}));b["catch"](function(a){c(a)})};DropboxFile.prototype.getLatestVersion=function(a,c){this.ui.dropbox.getFile(this.getId(),a,c)};DropboxFile.prototype.updateDescriptor=function(a){this.stat=a.stat};DropboxFile.prototype.save=function(a,c,b){this.doSave(this.getTitle(),c,b)};DropboxFile.prototype.saveAs=function(a,c,b){this.doSave(a,c,b)};
DropboxFile.prototype.doSave=function(a,c,b){var d=this.stat.name;this.stat.name=a;DrawioFile.prototype.save.apply(this,arguments);this.stat.name=d;this.saveFile(a,!1,c,b)};
-DropboxFile.prototype.saveFile=function(a,c,b,d){this.isEditable()?this.savingFile?null!=d&&d({code:App.ERROR_BUSY}):(c=mxUtils.bind(this,function(c){if(c){this.savingFile=!0;var e=this.isModified,k=this.isModified(),l=mxUtils.bind(this,function(){this.setModified(!1);this.isModified=function(){return k}});l();var n=mxUtils.bind(this,function(c){var f=this.stat.path_display.lastIndexOf("/"),f=1<f?this.stat.path_display.substring(1,f+1):null;this.ui.dropbox.saveFile(a,c,mxUtils.bind(this,function(a){this.savingFile=
-!1;this.isModified=e;this.stat=a;this.contentChanged();null!=b&&b()}),mxUtils.bind(this,function(a){this.savingFile=!1;this.isModified=e;this.setModified(k||this.isModified());if(null!=d){if(null!=a&&null!=a.retry){var b=a.retry;a.retry=function(){l();b()}}d(a)}}),f)});this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle())?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){n(this.ui.base64ToBlob(a,"image/png"))}),d,this.ui.getCurrentFile()!=this?this.getData():null):n(this.getData())}else null!=
+DropboxFile.prototype.saveFile=function(a,c,b,d){this.isEditable()?this.savingFile?null!=d&&d({code:App.ERROR_BUSY}):(c=mxUtils.bind(this,function(c){if(c){this.savingFile=!0;var e=this.isModified,h=this.isModified(),l=mxUtils.bind(this,function(){this.setModified(!1);this.isModified=function(){return h}});l();var m=mxUtils.bind(this,function(c){var f=this.stat.path_display.lastIndexOf("/"),f=1<f?this.stat.path_display.substring(1,f+1):null;this.ui.dropbox.saveFile(a,c,mxUtils.bind(this,function(a){this.savingFile=
+!1;this.isModified=e;this.stat=a;this.contentChanged();null!=b&&b()}),mxUtils.bind(this,function(a){this.savingFile=!1;this.isModified=e;this.setModified(h||this.isModified());if(null!=d){if(null!=a&&null!=a.retry){var b=a.retry;a.retry=function(){l();b()}}d(a)}}),f)});this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle())?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){m(this.ui.base64ToBlob(a,"image/png"))}),d,this.ui.getCurrentFile()!=this?this.getData():null):m(this.getData())}else null!=
d&&d()}),this.getTitle()==a?c(!0):this.ui.dropbox.checkExists(a,c)):null!=b&&b()};DropboxFile.prototype.rename=function(a,c,b){this.ui.dropbox.renameFile(this,a,mxUtils.bind(this,function(d){this.hasSameExtension(a,this.getTitle())?(this.stat=d,this.descriptorChanged(),null!=c&&c()):(this.stat=d,this.descriptorChanged(),this.save(!0,c,b))}),b)};DropboxLibrary=function(a,c,b){DropboxFile.call(this,a,c,b)};mxUtils.extend(DropboxLibrary,DropboxFile);DropboxLibrary.prototype.isAutosave=function(){return!0};DropboxLibrary.prototype.doSave=function(a,c,b){this.saveFile(a,!1,c,b)};DropboxLibrary.prototype.open=function(){};DropboxClient=function(a){DrawioClient.call(this,a,"dbauth");this.client=new Dropbox({clientId:App.DROPBOX_APPKEY});this.client.setAccessToken(this.token)};mxUtils.extend(DropboxClient,DrawioClient);DropboxClient.prototype.appPath="/drawio/";DropboxClient.prototype.extension=".html";DropboxClient.prototype.writingFile=!1;DropboxClient.prototype.maxRetries=4;
DropboxClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);this.token=null;this.client.authTokenRevoke().then(mxUtils.bind(this,function(){this.client.setAccessToken(null)}))};
DropboxClient.prototype.updateUser=function(a,c,b){var d=!0,e=window.setTimeout(mxUtils.bind(this,function(){d=!1;c({code:App.ERROR_TIMEOUT})}),this.ui.timeout),g=this.client.usersGetCurrentAccount();g.then(mxUtils.bind(this,function(b){window.clearTimeout(e);d&&(this.setUser(new DrawioUser(b.account_id,b.email,b.name.display_name)),a())}));g["catch"](mxUtils.bind(this,function(g){window.clearTimeout(e);d&&(null==g||401!==g.status||b?c({message:mxResources.get("accessDenied")}):(this.setUser(null),
this.client.setAccessToken(null),this.authenticate(mxUtils.bind(this,function(){this.updateUser(a,c,!0)}),c)))}))};
-DropboxClient.prototype.authenticate=function(a,c){if(null==window.onDropboxCallback){var b=mxUtils.bind(this,function(){var d=!0;this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(e,g){null!=window.open(this.client.getAuthenticationUrl("https://"+window.location.host+"/dropbox.html"),"dbauth")?window.onDropboxCallback=mxUtils.bind(this,function(k,l){if(d){window.onDropboxCallback=null;d=!1;try{null==k?c({message:mxResources.get("accessDenied"),retry:b}):(null!=g&&g(),this.client.setAccessToken(k),
-this.setUser(null),e&&this.setPersistentToken(k),a())}catch(n){c(n)}finally{null!=l&&l.close()}}else null!=l&&l.close()}):c({message:mxResources.get("serviceUnavailableOrBlocked"),retry:b})}),mxUtils.bind(this,function(){d&&(window.onDropboxCallback=null,d=!1,c({message:mxResources.get("accessDenied"),retry:b}))}))});b()}else c({code:App.ERROR_BUSY})};
-DropboxClient.prototype.executePromise=function(a,c,b){var d=mxUtils.bind(this,function(g){var k=!0,l=window.setTimeout(mxUtils.bind(this,function(){k=!1;b({code:App.ERROR_TIMEOUT,retry:e})}),this.ui.timeout);a.then(mxUtils.bind(this,function(a){window.clearTimeout(l);k&&null!=c&&c(a)}));a["catch"](mxUtils.bind(this,function(a){window.clearTimeout(l);k&&(null==a||500!=a.status&&400!=a.status&&401!=a.status?b({message:mxResources.get("error")+" "+a.status}):(this.setUser(null),this.client.setAccessToken(null),
+DropboxClient.prototype.authenticate=function(a,c){if(null==window.onDropboxCallback){var b=mxUtils.bind(this,function(){var d=!0;this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(e,g){null!=window.open(this.client.getAuthenticationUrl("https://"+window.location.host+"/dropbox.html"),"dbauth")?window.onDropboxCallback=mxUtils.bind(this,function(h,l){if(d){window.onDropboxCallback=null;d=!1;try{null==h?c({message:mxResources.get("accessDenied"),retry:b}):(null!=g&&g(),this.client.setAccessToken(h),
+this.setUser(null),e&&this.setPersistentToken(h),a())}catch(m){c(m)}finally{null!=l&&l.close()}}else null!=l&&l.close()}):c({message:mxResources.get("serviceUnavailableOrBlocked"),retry:b})}),mxUtils.bind(this,function(){d&&(window.onDropboxCallback=null,d=!1,c({message:mxResources.get("accessDenied"),retry:b}))}))});b()}else c({code:App.ERROR_BUSY})};
+DropboxClient.prototype.executePromise=function(a,c,b){var d=mxUtils.bind(this,function(g){var h=!0,l=window.setTimeout(mxUtils.bind(this,function(){h=!1;b({code:App.ERROR_TIMEOUT,retry:e})}),this.ui.timeout);a.then(mxUtils.bind(this,function(a){window.clearTimeout(l);h&&null!=c&&c(a)}));a["catch"](mxUtils.bind(this,function(a){window.clearTimeout(l);h&&(null==a||500!=a.status&&400!=a.status&&401!=a.status?b({message:mxResources.get("error")+" "+a.status}):(this.setUser(null),this.client.setAccessToken(null),
g?b({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){e(!0)},b)})}):this.authenticate(function(){d(!0)},b)))}))}),e=mxUtils.bind(this,function(a){null==this.user?this.updateUser(function(){e(!0)},b,a):d(a)});null===this.client.getAccessToken()?this.authenticate(function(){e(!0)},b):e(!1)};DropboxClient.prototype.getLibrary=function(a,c,b){this.getFile(a,c,b,!0)};
-DropboxClient.prototype.getFile=function(a,c,b,d){d=null!=d?d:!1;var e=/\.png$/i.test(a);if(/^https:\/\//i.test(a)||/\.v(dx|sdx?)$/i.test(a)||/\.gliffy$/i.test(a)||!this.ui.useCanvasForExport&&e){var g=mxUtils.bind(this,function(){var d=a.split("/");this.ui.convertFile(a,0<d.length?d[d.length-1]:a,null,this.extension,c,b)});null!=this.token?g():this.authenticate(g,b)}else g={path:"/"+a},null!=urlParams.rev&&(g.rev=urlParams.rev),this.readFile(g,mxUtils.bind(this,function(b,g){var k=e?b.lastIndexOf(","):
--1,f=null;0<k&&(k=this.ui.extractGraphModelFromPng(b.substring(k+1)),null!=k&&0<k.length?b=k:f=new LocalFile(this,b,a,!0));c(null!=f?f:d?new DropboxLibrary(this.ui,b,g):new DropboxFile(this.ui,b,g))}),b,e)};
-DropboxClient.prototype.readFile=function(a,c,b,d){var e=mxUtils.bind(this,function(k){var l=!0,n=window.setTimeout(mxUtils.bind(this,function(){l=!1;b({code:App.ERROR_TIMEOUT})}),this.ui.timeout),f=this.client.filesGetMetadata({path:"/"+a.path.substring(1),include_deleted:!1});f.then(mxUtils.bind(this,function(a){}));f["catch"](function(a){window.clearTimeout(n);l&&null!=a&&409==a.status&&(l=!1,b({message:mxResources.get("fileNotFound")}))});f=this.client.filesDownload(a);f.then(mxUtils.bind(this,
-function(a){window.clearTimeout(n);if(l){l=!1;try{var e=new FileReader;e.onload=mxUtils.bind(this,function(b){c(e.result,a)});d?e.readAsDataURL(a.fileBlob):e.readAsText(a.fileBlob)}catch(p){b(p)}}}));f["catch"](mxUtils.bind(this,function(a){window.clearTimeout(n);l&&(l=!1,null==a||500!=a.status&&400!=a.status&&401!=a.status?b({message:mxResources.get("error")+" "+a.status}):(this.client.setAccessToken(null),this.setUser(null),k?b({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){g(!0)},
+DropboxClient.prototype.getFile=function(a,c,b,d){d=null!=d?d:!1;var e=/\.png$/i.test(a);if(/^https:\/\//i.test(a)||/\.v(dx|sdx?)$/i.test(a)||/\.gliffy$/i.test(a)||!this.ui.useCanvasForExport&&e){var g=mxUtils.bind(this,function(){var d=a.split("/");this.ui.convertFile(a,0<d.length?d[d.length-1]:a,null,this.extension,c,b)});null!=this.token?g():this.authenticate(g,b)}else g={path:"/"+a},null!=urlParams.rev&&(g.rev=urlParams.rev),this.readFile(g,mxUtils.bind(this,function(b,g){var h=e?b.lastIndexOf(","):
+-1,f=null;0<h&&(h=this.ui.extractGraphModelFromPng(b.substring(h+1)),null!=h&&0<h.length?b=h:f=new LocalFile(this,b,a,!0));c(null!=f?f:d?new DropboxLibrary(this.ui,b,g):new DropboxFile(this.ui,b,g))}),b,e)};
+DropboxClient.prototype.readFile=function(a,c,b,d){var e=mxUtils.bind(this,function(h){var l=!0,m=window.setTimeout(mxUtils.bind(this,function(){l=!1;b({code:App.ERROR_TIMEOUT})}),this.ui.timeout),f=this.client.filesGetMetadata({path:"/"+a.path.substring(1),include_deleted:!1});f.then(mxUtils.bind(this,function(a){}));f["catch"](function(a){window.clearTimeout(m);l&&null!=a&&409==a.status&&(l=!1,b({message:mxResources.get("fileNotFound")}))});f=this.client.filesDownload(a);f.then(mxUtils.bind(this,
+function(a){window.clearTimeout(m);if(l){l=!1;try{var e=new FileReader;e.onload=mxUtils.bind(this,function(b){c(e.result,a)});d?e.readAsDataURL(a.fileBlob):e.readAsText(a.fileBlob)}catch(p){b(p)}}}));f["catch"](mxUtils.bind(this,function(a){window.clearTimeout(m);l&&(l=!1,null==a||500!=a.status&&400!=a.status&&401!=a.status?b({message:mxResources.get("error")+" "+a.status}):(this.client.setAccessToken(null),this.setUser(null),h?b({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){g(!0)},
b)})}):this.authenticate(function(){e(!0)},b)))}))}),g=mxUtils.bind(this,function(a){null==this.user?this.updateUser(function(){g(!0)},b,a):e(a)});null===this.client.getAccessToken()?this.authenticate(function(){g(!0)},b):g(!1)};
DropboxClient.prototype.checkExists=function(a,c,b){var d=this.client.filesGetMetadata({path:"/"+a.toLowerCase(),include_deleted:!1});this.executePromise(d,mxUtils.bind(this,function(d){b?c(!1,!0,d):this.ui.confirm(mxResources.get("replaceIt",[a]),function(){c(!0,!0,d)},function(){c(!1,!0,d)})}),function(a){c(!0,!1)})};
-DropboxClient.prototype.renameFile=function(a,c,b,d){if(/[\\\/:\?\*"\|]/.test(c))d({message:mxResources.get("dropboxCharsNotAllowed")});else{if(null!=a&&null!=c){var e=a.stat.path_display.substring(1),g=e.lastIndexOf("/");0<g&&(c=e.substring(0,g+1)+c)}null!=a&&null!=c&&a.stat.path_lower.substring(1)!==c.toLowerCase()?this.checkExists(c,mxUtils.bind(this,function(e,g,n){e?(e=mxUtils.bind(this,function(e){e=this.client.filesMove({from_path:a.stat.path_display,to_path:"/"+c,autorename:!1});this.executePromise(e,
-b,d)}),g&&n.path_lower.substring(1)!==c.toLowerCase()?(g=this.client.filesDelete({path:"/"+c.toLowerCase()}),this.executePromise(g,e,d)):e()):d()})):d({message:mxResources.get("invalidName")})}};DropboxClient.prototype.insertLibrary=function(a,c,b,d){this.insertFile(a,c,b,d,!0)};
+DropboxClient.prototype.renameFile=function(a,c,b,d){if(/[\\\/:\?\*"\|]/.test(c))d({message:mxResources.get("dropboxCharsNotAllowed")});else{if(null!=a&&null!=c){var e=a.stat.path_display.substring(1),g=e.lastIndexOf("/");0<g&&(c=e.substring(0,g+1)+c)}null!=a&&null!=c&&a.stat.path_lower.substring(1)!==c.toLowerCase()?this.checkExists(c,mxUtils.bind(this,function(e,g,m){e?(e=mxUtils.bind(this,function(e){e=this.client.filesMove({from_path:a.stat.path_display,to_path:"/"+c,autorename:!1});this.executePromise(e,
+b,d)}),g&&m.path_lower.substring(1)!==c.toLowerCase()?(g=this.client.filesDelete({path:"/"+c.toLowerCase()}),this.executePromise(g,e,d)):e()):d()})):d({message:mxResources.get("invalidName")})}};DropboxClient.prototype.insertLibrary=function(a,c,b,d){this.insertFile(a,c,b,d,!0)};
DropboxClient.prototype.insertFile=function(a,c,b,d,e){e=null!=e?e:!1;this.checkExists(a,mxUtils.bind(this,function(g){g?this.saveFile(a,c,mxUtils.bind(this,function(a){e?b(new DropboxLibrary(this.ui,c,a)):b(new DropboxFile(this.ui,c,a))}),d):d()}))};
DropboxClient.prototype.saveFile=function(a,c,b,d,e){/[\\\/:\?\*"\|]/.test(a)?d({message:mxResources.get("dropboxCharsNotAllowed")}):15E7<=c.length?d({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(c.length)+" / 150 MB)"}):(a=this.client.filesUpload({path:"/"+(null!=e?e:"")+a,mode:{".tag":"overwrite"},mute:!0,contents:new Blob([c],{type:"text/plain"})}),this.executePromise(a,b,d))};
-DropboxClient.prototype.pickLibrary=function(a){Dropbox.choose({linkType:"direct",cancel:mxUtils.bind(this,function(){}),success:mxUtils.bind(this,function(c){if(this.ui.spinner.spin(document.body,mxResources.get("loading"))){var b=mxUtils.bind(this,function(a){this.ui.spinner.stop();this.ui.handleError(a)}),d=c[0].link.indexOf(this.appPath);if(0<d){var e=decodeURIComponent(c[0].link.substring(d+this.appPath.length-1));this.readFile({path:e},mxUtils.bind(this,function(d,k){if(null!=k&&k.id==c[0].id)try{this.ui.spinner.stop(),
-a(e.substring(1),new DropboxLibrary(this.ui,d,k))}catch(l){this.ui.handleError(l)}else this.createLibrary(c[0],a,b)}),b)}else this.createLibrary(c[0],a,b)}})})};
+DropboxClient.prototype.pickLibrary=function(a){Dropbox.choose({linkType:"direct",cancel:mxUtils.bind(this,function(){}),success:mxUtils.bind(this,function(c){if(this.ui.spinner.spin(document.body,mxResources.get("loading"))){var b=mxUtils.bind(this,function(a){this.ui.spinner.stop();this.ui.handleError(a)}),d=c[0].link.indexOf(this.appPath);if(0<d){var e=decodeURIComponent(c[0].link.substring(d+this.appPath.length-1));this.readFile({path:e},mxUtils.bind(this,function(d,h){if(null!=h&&h.id==c[0].id)try{this.ui.spinner.stop(),
+a(e.substring(1),new DropboxLibrary(this.ui,d,h))}catch(l){this.ui.handleError(l)}else this.createLibrary(c[0],a,b)}),b)}else this.createLibrary(c[0],a,b)}})})};
DropboxClient.prototype.createLibrary=function(a,c,b){this.ui.confirm(mxResources.get("note")+": "+mxResources.get("fileWillBeSavedInAppFolder",[a.name]),mxUtils.bind(this,function(){this.ui.loadUrl(a.link,mxUtils.bind(this,function(d){this.insertFile(a.name,d,mxUtils.bind(this,function(a){try{this.ui.spinner.stop(),c(a.getHash().substring(1),a)}catch(g){b(g)}}),b,!0)}),b)}),mxUtils.bind(this,function(){this.ui.spinner.stop()}))};
DropboxClient.prototype.pickFile=function(a,c){null!=Dropbox.choose?(a=null!=a?a:mxUtils.bind(this,function(a,c){this.ui.loadFile(null!=a?"D"+encodeURIComponent(a):c.getHash(),null,c)}),Dropbox.choose({linkType:"direct",cancel:mxUtils.bind(this,function(){}),success:mxUtils.bind(this,function(b){if(this.ui.spinner.spin(document.body,mxResources.get("loading")))if(c)this.ui.spinner.stop(),a(b[0].link);else{var d=mxUtils.bind(this,function(a){this.ui.spinner.stop();this.ui.handleError(a)}),e=mxUtils.bind(this,
-function(b,c){this.ui.spinner.stop();a(b,c)}),g=/\.png$/i.test(b[0].name);if(/\.vsdx$/i.test(b[0].name)||/\.gliffy$/i.test(b[0].name)||!this.ui.useCanvasForExport&&g)e(b[0].link);else{var k=b[0].link.indexOf(this.appPath);if(0<k){var l=decodeURIComponent(b[0].link.substring(k+this.appPath.length-1));this.readFile({path:l},mxUtils.bind(this,function(c,f){if(null!=f&&f.id==b[0].id){var h=g?c.lastIndexOf(","):-1;this.ui.spinner.stop();var k=null;0<h&&(h=this.ui.extractGraphModelFromPng(c.substring(h+
-1)),null!=h&&0<h.length?c=h:k=new LocalFile(this,c,l,!0));a(l.substring(1),null!=k?k:new DropboxFile(this.ui,c,f))}else this.createFile(b[0],e,d)}),d,g)}else this.createFile(b[0],e,d)}}})})):this.ui.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})};
+function(b,c){this.ui.spinner.stop();a(b,c)}),g=/\.png$/i.test(b[0].name);if(/\.vsdx$/i.test(b[0].name)||/\.gliffy$/i.test(b[0].name)||!this.ui.useCanvasForExport&&g)e(b[0].link);else{var h=b[0].link.indexOf(this.appPath);if(0<h){var l=decodeURIComponent(b[0].link.substring(h+this.appPath.length-1));this.readFile({path:l},mxUtils.bind(this,function(c,f){if(null!=f&&f.id==b[0].id){var h=g?c.lastIndexOf(","):-1;this.ui.spinner.stop();var m=null;0<h&&(h=this.ui.extractGraphModelFromPng(c.substring(h+
+1)),null!=h&&0<h.length?c=h:m=new LocalFile(this,c,l,!0));a(l.substring(1),null!=m?m:new DropboxFile(this.ui,c,f))}else this.createFile(b[0],e,d)}),d,g)}else this.createFile(b[0],e,d)}}})})):this.ui.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})};
DropboxClient.prototype.createFile=function(a,c,b){var d=/(\.png)$/i.test(a.name);this.ui.loadUrl(a.link,mxUtils.bind(this,function(e){null!=e&&0<e.length?this.ui.confirm(mxResources.get("note")+": "+mxResources.get("fileWillBeSavedInAppFolder",[a.name]),mxUtils.bind(this,function(){var g=d?e.lastIndexOf(","):-1;0<g&&(g=this.ui.extractGraphModelFromPng(e.substring(g+1)),null!=g&&0<g.length&&(e=g));this.insertFile(a.name,e,mxUtils.bind(this,function(b){c(a.name,b)}),b)}),mxUtils.bind(this,function(){this.ui.spinner.stop()})):
(this.ui.spinner.stop(),b({message:mxResources.get("errorLoadingFile")}))}),b,d)};OneDriveFile=function(a,c,b){DrawioFile.call(this,a,c);this.meta=b};mxUtils.extend(OneDriveFile,DrawioFile);OneDriveFile.prototype.getId=function(){return this.getIdOf(this.meta)};OneDriveFile.prototype.getParentId=function(){return this.getIdOf(this.meta,!0)};OneDriveFile.prototype.getIdOf=function(a,c){return(a.parentReference.driveId?a.parentReference.driveId+"/":"")+(c?a.parentReference.id:a.id)};
OneDriveFile.prototype.getChannelId=function(){return"W-"+DrawioFile.prototype.getChannelId.apply(this,arguments)};OneDriveFile.prototype.getHash=function(){return"W"+encodeURIComponent(this.getId())};OneDriveFile.prototype.getMode=function(){return App.MODE_ONEDRIVE};OneDriveFile.prototype.isAutosaveOptional=function(){return!0};OneDriveFile.prototype.getTitle=function(){return this.meta.name};OneDriveFile.prototype.isRenamable=function(){return!0};OneDriveFile.prototype.isSyncSupported=function(){return!0};
@@ -8408,90 +8409,90 @@ OneDriveFile.prototype.getDescriptorSecret=function(a){return null!=a.file&&null
OneDriveFile.prototype.loadPatchDescriptor=function(a,c){var b=this.ui.oneDrive.getItemURL(this.getId());this.ui.oneDrive.executeRequest(b+"?select=etag,file",mxUtils.bind(this,function(b){200<=b.getStatus()&&299>=b.getStatus()?a(JSON.parse(b.getText())):c(this.ui.oneDrive.parseRequestText(b))}),c)};
OneDriveFile.prototype.getChannelKey=function(){return"undefined"!==typeof CryptoJS?CryptoJS.MD5(this.meta.createdDateTime+(null!=this.meta.createdBy&&null!=this.meta.createdBy.user?this.meta.createdBy.user.id:"")).toString():null};OneDriveFile.prototype.getLastModifiedDate=function(){return new Date(this.meta.lastModifiedDateTime)};OneDriveFile.prototype.save=function(a,c,b,d,e){DrawioFile.prototype.save.apply(this,arguments);this.saveFile(this.getTitle(),!1,c,b,d,e)};
OneDriveFile.prototype.saveAs=function(a,c,b){var d=this.meta.name;this.meta.name=a;DrawioFile.prototype.save.apply(this,arguments);this.meta.name=d;this.saveFile(a,!1,c,b)};OneDriveFile.prototype.doSave=function(a,c,b,d,e){this.saveFile(a,!1,c,b,d,e)};
-OneDriveFile.prototype.saveFile=function(a,c,b,d,e,g){if(!this.isEditable())null!=b&&b();else if(!this.savingFile)if(this.getTitle()==a){var k=mxUtils.bind(this,function(){var a=g||this.constructor!=OneDriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?null:this.getCurrentEtag(),c=this.data,e=this.meta,h=this.isModified,m=this.isModified();this.savingFile=!0;var p=mxUtils.bind(this,function(){this.setModified(!1);this.isModified=function(){return m}});p();this.ui.oneDrive.saveFile(this,
-mxUtils.bind(this,function(a){this.isModified=h;this.savingFile=!1;this.meta=a;this.fileSaved(c,e,mxUtils.bind(this,function(){this.contentChanged();null!=b&&b()}),d)}),mxUtils.bind(this,function(a,b){this.savingFile=!1;this.isModified=h;this.setModified(m||this.isModified());if(this.isConflict(b))this.inConflictState=!0,null!=this.sync?(this.savingFile=!0,this.sync.fileConflict(null,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){this.updateFileData();k()}),100+500*Math.random())}),
-mxUtils.bind(this,function(){this.savingFile=!1;null!=d&&d()}))):null!=d&&d();else if(null!=d){if(null!=a&&null!=a.retry){var c=a.retry;a.retry=function(){p();c()}}d(a)}}),a)});k()}else this.savingFile=!0,this.ui.oneDrive.insertFile(a,this.getData(),mxUtils.bind(this,function(a){this.savingFile=!1;null!=b&&b();this.ui.fileLoaded(a)}),mxUtils.bind(this,function(){this.savingFile=!1;null!=d&&d()}))};
+OneDriveFile.prototype.saveFile=function(a,c,b,d,e,g){if(!this.isEditable())null!=b&&b();else if(!this.savingFile)if(this.getTitle()==a){var h=mxUtils.bind(this,function(){var a=g||this.constructor!=OneDriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?null:this.getCurrentEtag(),c=this.data,e=this.meta,k=this.isModified,n=this.isModified();this.savingFile=!0;var p=mxUtils.bind(this,function(){this.setModified(!1);this.isModified=function(){return n}});p();this.ui.oneDrive.saveFile(this,
+mxUtils.bind(this,function(a){this.isModified=k;this.savingFile=!1;this.meta=a;this.fileSaved(c,e,mxUtils.bind(this,function(){this.contentChanged();null!=b&&b()}),d)}),mxUtils.bind(this,function(a,b){this.savingFile=!1;this.isModified=k;this.setModified(n||this.isModified());if(this.isConflict(b))this.inConflictState=!0,null!=this.sync?(this.savingFile=!0,this.sync.fileConflict(null,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){this.updateFileData();h()}),100+500*Math.random())}),
+mxUtils.bind(this,function(){this.savingFile=!1;null!=d&&d()}))):null!=d&&d();else if(null!=d){if(null!=a&&null!=a.retry){var c=a.retry;a.retry=function(){p();c()}}d(a)}}),a)});h()}else this.savingFile=!0,this.ui.oneDrive.insertFile(a,this.getData(),mxUtils.bind(this,function(a){this.savingFile=!1;null!=b&&b();this.ui.fileLoaded(a)}),mxUtils.bind(this,function(){this.savingFile=!1;null!=d&&d()}))};
OneDriveFile.prototype.rename=function(a,c,b){var d=this.getCurrentEtag();this.ui.oneDrive.renameFile(this,a,mxUtils.bind(this,function(e){this.hasSameExtension(a,this.getTitle())?(this.meta=e,this.descriptorChanged(),null!=this.sync&&this.sync.descriptorChanged(d),null!=c&&c(e)):(this.meta=e,null!=this.sync&&this.sync.descriptorChanged(d),this.save(!0,c,b))}),b)};
OneDriveFile.prototype.move=function(a,c,b){this.ui.oneDrive.moveFile(this.getId(),a,mxUtils.bind(this,function(a){this.meta=a;this.descriptorChanged();null!=c&&c(a)}),b)};OneDriveLibrary=function(a,c,b){OneDriveFile.call(this,a,c,b)};mxUtils.extend(OneDriveLibrary,OneDriveFile);OneDriveLibrary.prototype.isAutosave=function(){return!0};OneDriveLibrary.prototype.doSave=function(a,c,b){this.saveFile(a,!1,c,b)};OneDriveLibrary.prototype.open=function(){};OneDriveClient=function(a){DrawioClient.call(this,a,"odauth");this.token=this.token};mxUtils.extend(OneDriveClient,DrawioClient);OneDriveClient.prototype.clientId="test.draw.io"==window.location.hostname?"2e598409-107f-4b59-89ca-d7723c8e00a4":"45c10911-200f-4e27-a666-9e9fca147395";OneDriveClient.prototype.scopes="user.read files.readwrite.all";OneDriveClient.prototype.redirectUri="https://"+window.location.hostname+"/onedrive3.html";OneDriveClient.prototype.extension=".html";
OneDriveClient.prototype.baseUrl="https://graph.microsoft.com/v1.0";OneDriveClient.prototype.get=function(a,c,b){a=new mxXmlRequest(a,null,"GET");a.setRequestHeaders=mxUtils.bind(this,function(a,b){a.setRequestHeader("Authorization","Bearer "+this.token)});a.send(c,b);return a};
OneDriveClient.prototype.updateUser=function(a,c,b){var d=!0,e=window.setTimeout(mxUtils.bind(this,function(){d=!1;c({code:App.ERROR_TIMEOUT})}),this.ui.timeout);this.get(this.baseUrl+"/me",mxUtils.bind(this,function(g){window.clearTimeout(e);d&&(200>g.getStatus()||300<=g.getStatus()?b?c({message:mxResources.get("accessDenied")}):(this.logout(),this.authenticate(mxUtils.bind(this,function(){this.updateUser(a,c,!0)}),c)):(g=JSON.parse(g.getText()),this.setUser(new DrawioUser(g.id,null,g.displayName)),
a()))}),c)};
-OneDriveClient.prototype.authenticate=function(a,c){if(null==window.onOneDriveCallback){var b=mxUtils.bind(this,function(){var d=!0;this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(e,g){var k="https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id="+this.clientId+"&response_type=token&redirect_uri="+encodeURIComponent(this.redirectUri)+"&scope="+encodeURIComponent(this.scopes)+"&response_mode=fragment",k=window.open(k,"odauth",["width=525,height=525","top="+(window.screenY+
-Math.max(window.outerHeight-525,0)/2),"left="+(window.screenX+Math.max(window.outerWidth-525,0)/2),"status=no,resizable=yes,toolbar=no,menubar=no,scrollbars=yes"].join());null!=k&&(window.onOneDriveCallback=mxUtils.bind(this,function(k,n){if(d){window.onOneDriveCallback=null;d=!1;try{null==k?c({message:mxResources.get("accessDenied"),retry:b}):(null!=g&&g(),this.setUser(null),this.token=k,e&&this.setPersistentToken(k),a())}catch(f){c(f)}finally{null!=n&&n.close()}}else null!=n&&n.close()}),k.focus())}),
+OneDriveClient.prototype.authenticate=function(a,c){if(null==window.onOneDriveCallback){var b=mxUtils.bind(this,function(){var d=!0;this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(e,g){var h="https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id="+this.clientId+"&response_type=token&redirect_uri="+encodeURIComponent(this.redirectUri)+"&scope="+encodeURIComponent(this.scopes)+"&response_mode=fragment",h=window.open(h,"odauth",["width=525,height=525","top="+(window.screenY+
+Math.max(window.outerHeight-525,0)/2),"left="+(window.screenX+Math.max(window.outerWidth-525,0)/2),"status=no,resizable=yes,toolbar=no,menubar=no,scrollbars=yes"].join());null!=h&&(window.onOneDriveCallback=mxUtils.bind(this,function(h,m){if(d){window.onOneDriveCallback=null;d=!1;try{null==h?c({message:mxResources.get("accessDenied"),retry:b}):(null!=g&&g(),this.setUser(null),this.token=h,e&&this.setPersistentToken(h),a())}catch(f){c(f)}finally{null!=m&&m.close()}}else null!=m&&m.close()}),h.focus())}),
mxUtils.bind(this,function(){d&&(window.onOneDriveCallback=null,d=!1,c({message:mxResources.get("accessDenied"),retry:b}))}))});b()}else c({code:App.ERROR_BUSY})};
-OneDriveClient.prototype.executeRequest=function(a,c,b){var d=mxUtils.bind(this,function(g){var k=!0,l=window.setTimeout(mxUtils.bind(this,function(){k=!1;b({code:App.ERROR_TIMEOUT,retry:e})}),this.ui.timeout);this.get(a,mxUtils.bind(this,function(a){window.clearTimeout(l);k&&(200<=a.getStatus()&&299>=a.getStatus()||404==a.getStatus()?c(a):401===a.getStatus()||400===a.getStatus()?(this.clearPersistentToken(),this.setUser(null),this.token=null,g?b({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,
+OneDriveClient.prototype.executeRequest=function(a,c,b){var d=mxUtils.bind(this,function(g){var h=!0,l=window.setTimeout(mxUtils.bind(this,function(){h=!1;b({code:App.ERROR_TIMEOUT,retry:e})}),this.ui.timeout);this.get(a,mxUtils.bind(this,function(a){window.clearTimeout(l);h&&(200<=a.getStatus()&&299>=a.getStatus()||404==a.getStatus()?c(a):401===a.getStatus()||400===a.getStatus()?(this.clearPersistentToken(),this.setUser(null),this.token=null,g?b({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,
function(){this.authenticate(function(){e(!0)},b)})}):this.authenticate(function(){d(!0)},b)):b(this.parseRequestText(a)))}),b)}),e=mxUtils.bind(this,function(a){null==this.user?this.updateUser(function(){e(!0)},b,a):d(a)});null==this.token?this.authenticate(function(){e(!0)},b):e(!1)};OneDriveClient.prototype.getItemRef=function(a){var c=a.split("/");return 1<c.length?{driveId:c[0],id:c[1]}:{id:a}};
OneDriveClient.prototype.getItemURL=function(a,c){var b=a.split("/");return 1<b.length?(c?"":this.baseUrl)+"/drives/"+b[0]+"/items/"+b[1]:(c?"":this.baseUrl)+"/me/drive/items/"+a};OneDriveClient.prototype.getLibrary=function(a,c,b){this.getFile(a,c,b,!1,!0)};
-OneDriveClient.prototype.getFile=function(a,c,b,d,e){e=null!=e?e:!1;this.executeRequest(this.getItemURL(a),mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){var d=JSON.parse(a.getText()),g=/\.png$/i.test(d.name);if(/\.v(dx|sdx?)$/i.test(d.name)||/\.gliffy$/i.test(d.name)||!this.ui.useCanvasForExport&&g)this.ui.convertFile(d["@microsoft.graph.downloadUrl"],d.name,null!=d.file?d.file.mimeType:null,this.extension,c,b);else{var n=!0,f=window.setTimeout(mxUtils.bind(this,function(){n=
-!1;b({code:App.ERROR_TIMEOUT})}),this.ui.timeout);this.ui.loadUrl(d["@microsoft.graph.downloadUrl"],mxUtils.bind(this,function(a){window.clearTimeout(f);if(n){var b=g?a.lastIndexOf(","):-1,h=null;0<b?(b=this.ui.extractGraphModelFromPng(a.substring(b+1)),null!=b&&0<b.length?a=b:h=new LocalFile(this.ui,a,d.name,!0)):"data:image/png;base64,PG14ZmlsZS"==a.substring(0,32)&&(a=a.substring(22),a=window.atob&&!mxClient.IS_SF?atob(a):Base64.decode(a));null!=h?c(h):e?c(new OneDriveLibrary(this.ui,a,d)):c(new OneDriveFile(this.ui,
-a,d))}}),mxUtils.bind(this,function(a){window.clearTimeout(f);n&&b(this.parseRequestText(a))}),g||null!=d.file&&null!=d.file.mimeType&&"image/"==d.file.mimeType.substring(0,6))}}else b(this.parseRequestText(a))}),b)};OneDriveClient.prototype.renameFile=function(a,c,b,d){null!=a&&null!=c&&this.checkExists(a.getParentId(),c,!1,mxUtils.bind(this,function(e){e?this.writeFile(this.getItemURL(a.getId()),JSON.stringify({name:c}),"PATCH","application/json",b,d):d()}))};
+OneDriveClient.prototype.getFile=function(a,c,b,d,e){e=null!=e?e:!1;this.executeRequest(this.getItemURL(a),mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){var d=JSON.parse(a.getText()),g=/\.png$/i.test(d.name);if(/\.v(dx|sdx?)$/i.test(d.name)||/\.gliffy$/i.test(d.name)||!this.ui.useCanvasForExport&&g)this.ui.convertFile(d["@microsoft.graph.downloadUrl"],d.name,null!=d.file?d.file.mimeType:null,this.extension,c,b);else{var m=!0,f=window.setTimeout(mxUtils.bind(this,function(){m=
+!1;b({code:App.ERROR_TIMEOUT})}),this.ui.timeout);this.ui.loadUrl(d["@microsoft.graph.downloadUrl"],mxUtils.bind(this,function(a){window.clearTimeout(f);if(m){var b=g?a.lastIndexOf(","):-1,h=null;0<b?(b=this.ui.extractGraphModelFromPng(a.substring(b+1)),null!=b&&0<b.length?a=b:h=new LocalFile(this.ui,a,d.name,!0)):"data:image/png;base64,PG14ZmlsZS"==a.substring(0,32)&&(a=a.substring(22),a=window.atob&&!mxClient.IS_SF?atob(a):Base64.decode(a));null!=h?c(h):e?c(new OneDriveLibrary(this.ui,a,d)):c(new OneDriveFile(this.ui,
+a,d))}}),mxUtils.bind(this,function(a){window.clearTimeout(f);m&&b(this.parseRequestText(a))}),g||null!=d.file&&null!=d.file.mimeType&&"image/"==d.file.mimeType.substring(0,6))}}else b(this.parseRequestText(a))}),b)};OneDriveClient.prototype.renameFile=function(a,c,b,d){null!=a&&null!=c&&this.checkExists(a.getParentId(),c,!1,mxUtils.bind(this,function(e){e?this.writeFile(this.getItemURL(a.getId()),JSON.stringify({name:c}),"PATCH","application/json",b,d):d()}))};
OneDriveClient.prototype.moveFile=function(a,c,b,d){c=this.getItemRef(c);var e=this.getItemRef(a);c.driveId!=e.driveId?d({message:mxResources.get("cannotMoveOneDrive",null,"Moving a file between accounts is not supported yet.")}):this.writeFile(this.getItemURL(a),JSON.stringify({parentReference:c}),"PATCH","application/json",b,d)};OneDriveClient.prototype.insertLibrary=function(a,c,b,d,e){this.insertFile(a,c,b,d,!0,e)};
-OneDriveClient.prototype.insertFile=function(a,c,b,d,e,g){e=null!=e?e:!1;this.checkExists(g,a,!0,mxUtils.bind(this,function(k){k?(k="/me/drive/root",null!=g&&(k=this.getItemURL(g,!0)),this.writeFile(this.baseUrl+k+"/children/"+a+"/content",c,"PUT",null,mxUtils.bind(this,function(a){e?b(new OneDriveLibrary(this.ui,c,a)):b(new OneDriveFile(this.ui,c,a))}),d)):d()}))};
+OneDriveClient.prototype.insertFile=function(a,c,b,d,e,g){e=null!=e?e:!1;this.checkExists(g,a,!0,mxUtils.bind(this,function(h){h?(h="/me/drive/root",null!=g&&(h=this.getItemURL(g,!0)),this.writeFile(this.baseUrl+h+"/children/"+a+"/content",c,"PUT",null,mxUtils.bind(this,function(a){e?b(new OneDriveLibrary(this.ui,c,a)):b(new OneDriveFile(this.ui,c,a))}),d)):d()}))};
OneDriveClient.prototype.checkExists=function(a,c,b,d){var e="/me/drive/root";null!=a&&(e=this.getItemURL(a,!0));this.executeRequest(this.baseUrl+e+"/children/"+c,mxUtils.bind(this,function(a){404==a.getStatus()?d(!0):b?(this.ui.spinner.stop(),this.ui.confirm(mxResources.get("replaceIt",[c]),function(){d(!0)},function(){d(!1)})):(this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){d(!1)}))}),function(a){d(!1)},!0)};
OneDriveClient.prototype.saveFile=function(a,c,b,d){var e=mxUtils.bind(this,function(e){var g=this.getItemURL(a.getId())+"/content/";this.writeFile(g,e,"PUT",null,c,b,d)});this.ui.useCanvasForExport&&/(\.png)$/i.test(a.meta.name)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){e(this.ui.base64ToBlob(a,"image/png"))}),b,this.ui.getCurrentFile()!=a?a.getData():null):e(a.getData())};
-OneDriveClient.prototype.writeFile=function(a,c,b,d,e,g,k){if(null!=a&&null!=c){var l=mxUtils.bind(this,function(f){var h=!0,m=window.setTimeout(mxUtils.bind(this,function(){h=!1;g({code:App.ERROR_TIMEOUT,retry:n})}),this.ui.timeout),p=new mxXmlRequest(a,c,b);p.setRequestHeaders=mxUtils.bind(this,function(a,b){a.setRequestHeader("Content-Type",d||" ");a.setRequestHeader("Authorization","Bearer "+this.token);null!=k&&a.setRequestHeader("If-Match",k)});p.send(mxUtils.bind(this,function(a){window.clearTimeout(m);
-h&&(200<=a.getStatus()&&299>=a.getStatus()?e(JSON.parse(a.getText())):401===a.getStatus()?(this.clearPersistentToken(),this.setUser(null),this.token=null,f?g({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){n(!0)},g)})}):this.authenticate(function(){l(!0)},g)):g(this.parseRequestText(a),a))}),mxUtils.bind(this,function(a){window.clearTimeout(m);h&&g(this.parseRequestText(a))}))}),n=mxUtils.bind(this,function(a){null==this.user?this.updateUser(function(){n(!0)},
-g,a):l(a)});null==this.token?this.authenticate(function(){n(!0)},g):n(!1)}else g({message:mxResources.get("unknownError")})};OneDriveClient.prototype.parseRequestText=function(a){var c={message:mxResources.get("unknownError")};try{c=JSON.parse(a.getText())}catch(b){}return c};OneDriveClient.prototype.pickLibrary=function(a){this.pickFile(function(c){a(c)})};
+OneDriveClient.prototype.writeFile=function(a,c,b,d,e,g,h){if(null!=a&&null!=c){var l=mxUtils.bind(this,function(f){var k=!0,n=window.setTimeout(mxUtils.bind(this,function(){k=!1;g({code:App.ERROR_TIMEOUT,retry:m})}),this.ui.timeout),p=new mxXmlRequest(a,c,b);p.setRequestHeaders=mxUtils.bind(this,function(a,b){a.setRequestHeader("Content-Type",d||" ");a.setRequestHeader("Authorization","Bearer "+this.token);null!=h&&a.setRequestHeader("If-Match",h)});p.send(mxUtils.bind(this,function(a){window.clearTimeout(n);
+k&&(200<=a.getStatus()&&299>=a.getStatus()?e(JSON.parse(a.getText())):401===a.getStatus()?(this.clearPersistentToken(),this.setUser(null),this.token=null,f?g({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){m(!0)},g)})}):this.authenticate(function(){l(!0)},g)):g(this.parseRequestText(a),a))}),mxUtils.bind(this,function(a){window.clearTimeout(n);k&&g(this.parseRequestText(a))}))}),m=mxUtils.bind(this,function(a){null==this.user?this.updateUser(function(){m(!0)},
+g,a):l(a)});null==this.token?this.authenticate(function(){m(!0)},g):m(!1)}else g({message:mxResources.get("unknownError")})};OneDriveClient.prototype.parseRequestText=function(a){var c={message:mxResources.get("unknownError")};try{c=JSON.parse(a.getText())}catch(b){}return c};OneDriveClient.prototype.pickLibrary=function(a){this.pickFile(function(c){a(c)})};
OneDriveClient.prototype.pickFolder=function(a){OneDrive.save({clientId:this.clientId,action:"query",openInNewWindow:!0,advanced:{redirectUri:this.redirectUri,queryParameters:"select=id,name,parentReference"},success:mxUtils.bind(this,function(c){this.token=c.accessToken;a(c)}),cancel:function(){},error:mxUtils.bind(this,function(a){this.ui.showError(mxResources.get("error"),a)})})};
OneDriveClient.prototype.pickFile=function(a){a=null!=a?a:mxUtils.bind(this,function(a){this.ui.loadFile("W"+encodeURIComponent(a))});OneDrive.open({clientId:this.clientId,action:"query",multiSelect:!1,advanced:{redirectUri:this.redirectUri,queryParameters:"select=id,name,parentReference"},success:mxUtils.bind(this,function(c){null!=c&&null!=c.value&&0<c.value.length&&(this.token=c.accessToken,a(OneDriveFile.prototype.getIdOf(c.value[0]),c))}),cancel:function(){},error:mxUtils.bind(this,function(a){this.ui.showError(mxResources.get("error"),
a)})})};OneDriveClient.prototype.logout=function(){if(isLocalStorage){var a=localStorage.getItem("odpickerv7cache");null!=a&&'{"odsdkLoginHint":{'==a.substring(0,19)&&localStorage.removeItem("odpickerv7cache")}this.clearPersistentToken();this.setUser(null);this.token=null};GitHubFile=function(a,c,b){DrawioFile.call(this,a,c);this.meta=b};mxUtils.extend(GitHubFile,DrawioFile);GitHubFile.prototype.getId=function(){return encodeURIComponent(this.meta.org)+"/"+(null!=this.meta.repo?encodeURIComponent(this.meta.repo)+"/"+(null!=this.meta.ref?this.meta.ref+(null!=this.meta.path?"/"+this.meta.path:""):""):"")};GitHubFile.prototype.getHash=function(){return encodeURIComponent("H"+this.getId())};
GitHubFile.prototype.getPublicUrl=function(a){null!=this.meta.download_url?mxUtils.get(this.meta.download_url,mxUtils.bind(this,function(c){a(200<=c.getStatus()&&299>=c.getStatus()?this.meta.download_url:null)}),mxUtils.bind(this,function(){a(null)})):a(null)};GitHubFile.prototype.isConflict=function(a){return null!=a&&409==a.status};GitHubFile.prototype.getMode=function(){return App.MODE_GITHUB};GitHubFile.prototype.isAutosave=function(){return!1};GitHubFile.prototype.getTitle=function(){return this.meta.name};
GitHubFile.prototype.isRenamable=function(){return!1};GitHubFile.prototype.getLatestVersion=function(a,c){this.ui.gitHub.getFile(this.getId(),a,c)};GitHubFile.prototype.getDescriptor=function(){return this.meta};GitHubFile.prototype.setDescriptor=function(a){this.meta=a};GitHubFile.prototype.getDescriptorEtag=function(a){return a.sha};GitHubFile.prototype.setDescriptorEtag=function(a,c){a.sha=c};GitHubFile.prototype.save=function(a,c,b,d,e,g){this.doSave(this.getTitle(),c,b,d,e,g)};
-GitHubFile.prototype.saveAs=function(a,c,b){this.doSave(a,c,b)};GitHubFile.prototype.doSave=function(a,c,b,d,e,g){var k=this.meta.name;this.meta.name=a;DrawioFile.prototype.save.apply(this,arguments);this.meta.name=k;this.saveFile(a,!1,c,b,d,e,g)};
-GitHubFile.prototype.saveFile=function(a,c,b,d,e,g,k){if(this.isEditable())if(this.savingFile)null!=d&&d({code:App.ERROR_BUSY});else{var l=mxUtils.bind(this,function(c){if(this.getTitle()==a){var e=this.getCurrentEtag(),h=this.data,k=this.isModified,l=this.isModified();this.savingFile=!0;var n=mxUtils.bind(this,function(){this.setModified(!1);this.isModified=function(){return l}});n();this.ui.gitHub.saveFile(this,mxUtils.bind(this,function(a){this.isModified=k;this.savingFile=!1;this.meta.sha=a.content.sha;
-this.meta.html_url=a.content.html_url;this.meta.download_url=a.content.download_url;this.fileSaved(h,e,mxUtils.bind(this,function(){this.contentChanged();null!=b&&b()}),d)}),mxUtils.bind(this,function(a){this.savingFile=!1;this.isModified=k;this.setModified(l||this.isModified());if(this.isConflict(a))this.inConflictState=!0,null!=d&&d({commitMessage:c});else if(null!=d){if(null!=a&&null!=a.retry){var b=a.retry;a.retry=function(){n();b()}}d(a)}}),g,c)}else this.savingFile=!0,this.ui.pickFolder(App.MODE_GITHUB,
-mxUtils.bind(this,function(e){this.ui.gitHub.insertFile(a,this.getData(),mxUtils.bind(this,function(a){this.savingFile=!1;null!=b&&b();this.ui.fileLoaded(a)}),mxUtils.bind(this,function(){this.savingFile=!1;null!=d&&d()}),!1,e,c)}))});null!=k?l(k):this.ui.gitHub.showCommitDialog(this.meta.name,null==this.meta.sha||this.meta.isNew,mxUtils.bind(this,function(a){l(a)}),d)}else null!=b&&b()};GitHubLibrary=function(a,c,b){GitHubFile.call(this,a,c,b)};mxUtils.extend(GitHubLibrary,GitHubFile);GitHubLibrary.prototype.doSave=function(a,c,b){this.saveFile(a,!1,c,b)};GitHubLibrary.prototype.open=function(){};GitHubClient=function(a){DrawioClient.call(this,a,"ghauth")};mxUtils.extend(GitHubClient,DrawioClient);GitHubClient.prototype.clientId="test.draw.io"==window.location.hostname?"23bc97120b9035515661":"89c9e4624ca416554489";GitHubClient.prototype.scope="repo";GitHubClient.prototype.extension=".xml";GitHubClient.prototype.baseUrl="https://api.github.com";GitHubClient.prototype.maxFileSize=1E6;
+GitHubFile.prototype.saveAs=function(a,c,b){this.doSave(a,c,b)};GitHubFile.prototype.doSave=function(a,c,b,d,e,g){var h=this.meta.name;this.meta.name=a;DrawioFile.prototype.save.apply(this,arguments);this.meta.name=h;this.saveFile(a,!1,c,b,d,e,g)};
+GitHubFile.prototype.saveFile=function(a,c,b,d,e,g,h){if(this.isEditable())if(this.savingFile)null!=d&&d({code:App.ERROR_BUSY});else{var l=mxUtils.bind(this,function(c){if(this.getTitle()==a){var e=this.getCurrentEtag(),h=this.data,l=this.isModified,m=this.isModified();this.savingFile=!0;var q=mxUtils.bind(this,function(){this.setModified(!1);this.isModified=function(){return m}});q();this.ui.gitHub.saveFile(this,mxUtils.bind(this,function(a){this.isModified=l;this.savingFile=!1;this.meta.sha=a.content.sha;
+this.meta.html_url=a.content.html_url;this.meta.download_url=a.content.download_url;this.fileSaved(h,e,mxUtils.bind(this,function(){this.contentChanged();null!=b&&b()}),d)}),mxUtils.bind(this,function(a){this.savingFile=!1;this.isModified=l;this.setModified(m||this.isModified());if(this.isConflict(a))this.inConflictState=!0,null!=d&&d({commitMessage:c});else if(null!=d){if(null!=a&&null!=a.retry){var b=a.retry;a.retry=function(){q();b()}}d(a)}}),g,c)}else this.savingFile=!0,this.ui.pickFolder(App.MODE_GITHUB,
+mxUtils.bind(this,function(e){this.ui.gitHub.insertFile(a,this.getData(),mxUtils.bind(this,function(a){this.savingFile=!1;null!=b&&b();this.ui.fileLoaded(a)}),mxUtils.bind(this,function(){this.savingFile=!1;null!=d&&d()}),!1,e,c)}))});null!=h?l(h):this.ui.gitHub.showCommitDialog(this.meta.name,null==this.meta.sha||this.meta.isNew,mxUtils.bind(this,function(a){l(a)}),d)}else null!=b&&b()};GitHubLibrary=function(a,c,b){GitHubFile.call(this,a,c,b)};mxUtils.extend(GitHubLibrary,GitHubFile);GitHubLibrary.prototype.doSave=function(a,c,b){this.saveFile(a,!1,c,b)};GitHubLibrary.prototype.open=function(){};GitHubClient=function(a){DrawioClient.call(this,a,"ghauth")};mxUtils.extend(GitHubClient,DrawioClient);GitHubClient.prototype.clientId="test.draw.io"==window.location.hostname?"23bc97120b9035515661":"89c9e4624ca416554489";GitHubClient.prototype.scope="repo";GitHubClient.prototype.extension=".xml";GitHubClient.prototype.baseUrl="https://api.github.com";GitHubClient.prototype.maxFileSize=1E6;
GitHubClient.prototype.updateUser=function(a,c,b){var d=!0,e=window.setTimeout(mxUtils.bind(this,function(){d=!1;c({code:App.ERROR_TIMEOUT})}),this.ui.timeout);mxUtils.get(this.baseUrl+"/user?access_token="+this.token,mxUtils.bind(this,function(g){window.clearTimeout(e);d&&(401===g.getStatus()?b?c({message:mxResources.get("accessDenied")}):(this.logout(),this.authenticate(mxUtils.bind(this,function(){this.updateUser(a,c,!0)}),c)):200>g.getStatus()||300<=g.getStatus()?c({message:mxResources.get("accessDenied")}):
(g=JSON.parse(g.getText()),this.setUser(new DrawioUser(g.id,g.email,g.name)),a()))}))};
-GitHubClient.prototype.authenticate=function(a,c){if(null==window.onGitHubCallback){var b=mxUtils.bind(this,function(){var d=!0;this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(e,g){null!=window.open("https://github.com/login/oauth/authorize?client_id="+this.clientId+"&scope="+this.scope,"ghauth")?window.onGitHubCallback=mxUtils.bind(this,function(k,l){if(d)if(window.onGitHubCallback=null,d=!1,null==k)c({message:mxResources.get("accessDenied"),retry:b});else{var n=mxUtils.bind(this,function(){var b=
-!0,d=window.setTimeout(mxUtils.bind(this,function(){b=!1;c({code:App.ERROR_TIMEOUT,retry:n})}),this.ui.timeout);mxUtils.get("/github?client_id="+this.clientId+"&code="+k,mxUtils.bind(this,function(f){window.clearTimeout(d);if(b)try{if(200>f.getStatus()||300<=f.getStatus())c({message:mxResources.get("cannotLogin")});else{null!=g&&g();var h=f.getText();this.token=h.substring(h.indexOf("=")+1,h.indexOf("&"));this.setUser(null);e&&this.setPersistentToken(this.token);a()}}catch(q){c(q)}finally{null!=l&&
-l.close()}}))});n()}else null!=l&&l.close()}):c({message:mxResources.get("serviceUnavailableOrBlocked"),retry:b})}),mxUtils.bind(this,function(){d&&(window.onGitHubCallback=null,d=!1,c({message:mxResources.get("accessDenied"),retry:b}))}))});b()}else c({code:App.ERROR_BUSY})};
-GitHubClient.prototype.executeRequest=function(a,c,b){var d=mxUtils.bind(this,function(g){var k=!0,l=window.setTimeout(mxUtils.bind(this,function(){k=!1;b({code:App.ERROR_TIMEOUT,retry:e})}),this.ui.timeout),n=this.token;a.setRequestHeaders=function(a,b){a.setRequestHeader("Authorization","token "+n)};a.send(mxUtils.bind(this,function(){window.clearTimeout(l);if(k)if(200<=a.getStatus()&&299>=a.getStatus())c(a);else if(401===a.getStatus())g?b({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,
-function(){this.authenticate(function(){e(!0)},b)})}):this.authenticate(function(){d(!0)},b);else if(403===a.getStatus()){var f=!1;try{var h=JSON.parse(a.getText());null!=h&&null!=h.errors&&0<h.errors.length&&(f="too_large"==h.errors[0].code)}catch(m){}b({message:mxResources.get(f?"drawingTooLarge":"forbidden")})}else 404===a.getStatus()?b({message:mxResources.get("fileNotFound")}):409===a.getStatus()?b({status:409}):b({message:mxResources.get("error")+" "+a.getStatus()})}),b)}),e=mxUtils.bind(this,
+GitHubClient.prototype.authenticate=function(a,c){if(null==window.onGitHubCallback){var b=mxUtils.bind(this,function(){var d=!0;this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(e,g){null!=window.open("https://github.com/login/oauth/authorize?client_id="+this.clientId+"&scope="+this.scope,"ghauth")?window.onGitHubCallback=mxUtils.bind(this,function(h,l){if(d)if(window.onGitHubCallback=null,d=!1,null==h)c({message:mxResources.get("accessDenied"),retry:b});else{var m=mxUtils.bind(this,function(){var b=
+!0,d=window.setTimeout(mxUtils.bind(this,function(){b=!1;c({code:App.ERROR_TIMEOUT,retry:m})}),this.ui.timeout);mxUtils.get("/github?client_id="+this.clientId+"&code="+h,mxUtils.bind(this,function(f){window.clearTimeout(d);if(b)try{if(200>f.getStatus()||300<=f.getStatus())c({message:mxResources.get("cannotLogin")});else{null!=g&&g();var h=f.getText();this.token=h.substring(h.indexOf("=")+1,h.indexOf("&"));this.setUser(null);e&&this.setPersistentToken(this.token);a()}}catch(q){c(q)}finally{null!=l&&
+l.close()}}))});m()}else null!=l&&l.close()}):c({message:mxResources.get("serviceUnavailableOrBlocked"),retry:b})}),mxUtils.bind(this,function(){d&&(window.onGitHubCallback=null,d=!1,c({message:mxResources.get("accessDenied"),retry:b}))}))});b()}else c({code:App.ERROR_BUSY})};
+GitHubClient.prototype.executeRequest=function(a,c,b){var d=mxUtils.bind(this,function(g){var h=!0,l=window.setTimeout(mxUtils.bind(this,function(){h=!1;b({code:App.ERROR_TIMEOUT,retry:e})}),this.ui.timeout),m=this.token;a.setRequestHeaders=function(a,b){a.setRequestHeader("Authorization","token "+m)};a.send(mxUtils.bind(this,function(){window.clearTimeout(l);if(h)if(200<=a.getStatus()&&299>=a.getStatus())c(a);else if(401===a.getStatus())g?b({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,
+function(){this.authenticate(function(){e(!0)},b)})}):this.authenticate(function(){d(!0)},b);else if(403===a.getStatus()){var f=!1;try{var k=JSON.parse(a.getText());null!=k&&null!=k.errors&&0<k.errors.length&&(f="too_large"==k.errors[0].code)}catch(n){}b({message:mxResources.get(f?"drawingTooLarge":"forbidden")})}else 404===a.getStatus()?b({message:mxResources.get("fileNotFound")}):409===a.getStatus()?b({status:409}):b({message:mxResources.get("error")+" "+a.getStatus()})}),b)}),e=mxUtils.bind(this,
function(a){null==this.user?this.updateUser(function(){e(!0)},b,a):d(a)});null==this.token?this.authenticate(function(){e(!0)},b):e(!1)};GitHubClient.prototype.getLibrary=function(a,c,b){this.getFile(a,c,b,!0)};
-GitHubClient.prototype.getFile=function(a,c,b,d,e){d=null!=d?d:!1;var g=a.split("/"),k=g[0],l=g[1],n=g[2];a=g.slice(3,g.length).join("/");g=/\.png$/i.test(a);!e&&(/\.v(dx|sdx?)$/i.test(a)||/\.gliffy$/i.test(a)||!this.ui.useCanvasForExport&&g)?null!=this.token?(e=this.baseUrl+"/repos/"+k+"/"+l+"/contents/"+a+"?ref="+n+"&token="+this.token,g=a.split("/"),this.ui.convertFile(e,0<g.length?g[g.length-1]:a,null,this.extension,c,b)):b({message:mxResources.get("accessDenied")}):(e="&t="+(new Date).getTime(),
-a=new mxXmlRequest(this.baseUrl+"/repos/"+k+"/"+l+"/contents/"+a+"?ref="+n+e,null,"GET"),this.executeRequest(a,mxUtils.bind(this,function(a){try{c(this.createGitHubFile(k,l,n,JSON.parse(a.getText()),d))}catch(h){b(h)}}),b))};
+GitHubClient.prototype.getFile=function(a,c,b,d,e){d=null!=d?d:!1;var g=a.split("/"),h=g[0],l=g[1],m=g[2];a=g.slice(3,g.length).join("/");g=/\.png$/i.test(a);!e&&(/\.v(dx|sdx?)$/i.test(a)||/\.gliffy$/i.test(a)||!this.ui.useCanvasForExport&&g)?null!=this.token?(e=this.baseUrl+"/repos/"+h+"/"+l+"/contents/"+a+"?ref="+m+"&token="+this.token,g=a.split("/"),this.ui.convertFile(e,0<g.length?g[g.length-1]:a,null,this.extension,c,b)):b({message:mxResources.get("accessDenied")}):(e="&t="+(new Date).getTime(),
+a=new mxXmlRequest(this.baseUrl+"/repos/"+h+"/"+l+"/contents/"+a+"?ref="+m+e,null,"GET"),this.executeRequest(a,mxUtils.bind(this,function(a){try{c(this.createGitHubFile(h,l,m,JSON.parse(a.getText()),d))}catch(k){b(k)}}),b))};
GitHubClient.prototype.createGitHubFile=function(a,c,b,d,e){a={org:a,repo:c,ref:b,name:d.name,path:d.path,sha:d.sha,html_url:d.html_url,download_url:d.download_url};c=d.content;"base64"===d.encoding&&("PG14ZmlsZS"==c.substring(0,10)?c=window.atob&&!mxClient.IS_SF?atob(c):Base64.decode(c):/\.jpe?g$/i.test(d.name)?c="data:image/jpeg;base64,"+c:/\.gif$/i.test(d.name)?c="data:image/gif;base64,"+c:/\.png$/i.test(d.name)?(d=this.ui.extractGraphModelFromPng(c),c=null!=d&&0<d.length?d:"data:image/png;base64,"+
c):c=Base64.decode(c));return e?new GitHubLibrary(this.ui,c,a):new GitHubFile(this.ui,c,a)};GitHubClient.prototype.insertLibrary=function(a,c,b,d,e){this.insertFile(a,c,b,d,!0,e,!1)};
-GitHubClient.prototype.insertFile=function(a,c,b,d,e,g,k){e=null!=e?e:!1;g=g.split("/");var l=g[0],n=g[1],f=g[2],h=g.slice(3,g.length).join("/");0<h.length&&(h+="/");h+=a;this.checkExists(l+"/"+n+"/"+f+"/"+h,!0,mxUtils.bind(this,function(g,p){g?e?(k||(c=Base64.encode(c)),this.showCommitDialog(a,!0,mxUtils.bind(this,function(a){this.writeFile(l,n,f,h,a,c,p,mxUtils.bind(this,function(a){try{var c=JSON.parse(a.getText());b(this.createGitHubFile(l,n,f,c.content,e))}catch(x){d(x)}}),d)}),d)):b(new GitHubFile(this.ui,
-c,{org:l,repo:n,ref:f,name:a,path:h,sha:p,isNew:!0})):d()}))};GitHubClient.prototype.showCommitDialog=function(a,c,b,d){var e=this.ui.spinner.pause();a=new FilenameDialog(this.ui,mxResources.get(c?"addedFile":"updateFile",[a]),mxResources.get("ok"),mxUtils.bind(this,function(a){e();b(a)}),mxResources.get("commitMessage"),null,null,null,null,mxUtils.bind(this,function(){d()}));this.ui.showDialog(a.container,300,80,!0,!1);a.init()};
-GitHubClient.prototype.writeFile=function(a,c,b,d,e,g,k,l,n){g.length>=this.maxFileSize?n({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(g.length)+" / 1 MB)"}):(b={path:d,branch:decodeURIComponent(b),message:e,content:g},null!=k&&(b.sha=k),a=new mxXmlRequest(this.baseUrl+"/repos/"+a+"/"+c+"/contents/"+d,JSON.stringify(b),"PUT"),this.executeRequest(a,mxUtils.bind(this,function(a){l(a)}),n))};
+GitHubClient.prototype.insertFile=function(a,c,b,d,e,g,h){e=null!=e?e:!1;g=g.split("/");var l=g[0],m=g[1],f=g[2],k=g.slice(3,g.length).join("/");0<k.length&&(k+="/");k+=a;this.checkExists(l+"/"+m+"/"+f+"/"+k,!0,mxUtils.bind(this,function(g,p){g?e?(h||(c=Base64.encode(c)),this.showCommitDialog(a,!0,mxUtils.bind(this,function(a){this.writeFile(l,m,f,k,a,c,p,mxUtils.bind(this,function(a){try{var c=JSON.parse(a.getText());b(this.createGitHubFile(l,m,f,c.content,e))}catch(x){d(x)}}),d)}),d)):b(new GitHubFile(this.ui,
+c,{org:l,repo:m,ref:f,name:a,path:k,sha:p,isNew:!0})):d()}))};GitHubClient.prototype.showCommitDialog=function(a,c,b,d){var e=this.ui.spinner.pause();a=new FilenameDialog(this.ui,mxResources.get(c?"addedFile":"updateFile",[a]),mxResources.get("ok"),mxUtils.bind(this,function(a){e();b(a)}),mxResources.get("commitMessage"),null,null,null,null,mxUtils.bind(this,function(){d()}));this.ui.showDialog(a.container,300,80,!0,!1);a.init()};
+GitHubClient.prototype.writeFile=function(a,c,b,d,e,g,h,l,m){g.length>=this.maxFileSize?m({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(g.length)+" / 1 MB)"}):(b={path:d,branch:decodeURIComponent(b),message:e,content:g},null!=h&&(b.sha=h),a=new mxXmlRequest(this.baseUrl+"/repos/"+a+"/"+c+"/contents/"+d,JSON.stringify(b),"PUT"),this.executeRequest(a,mxUtils.bind(this,function(a){l(a)}),m))};
GitHubClient.prototype.checkExists=function(a,c,b){this.getFile(a,mxUtils.bind(this,function(d){if(c&&null!=d.meta){var e=this.ui.spinner.pause();this.ui.confirm(mxResources.get("replaceIt",[a]),function(){e();b(!0,d.meta.sha)},function(){e();b(!1)})}else this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){b(!1)})}),mxUtils.bind(this,function(a){b(!0)}),null,!0)};
-GitHubClient.prototype.saveFile=function(a,c,b,d,e){var g=a.meta.org,k=a.meta.repo,l=a.meta.ref,n=a.meta.path,f=mxUtils.bind(this,function(d,f){this.writeFile(g,k,l,n,e,f,d,mxUtils.bind(this,function(b){delete a.meta.isNew;c(JSON.parse(b.getText()))}),mxUtils.bind(this,function(a){b(a)}))}),h=mxUtils.bind(this,function(){this.ui.useCanvasForExport&&/(\.png)$/i.test(n)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(b){f(a.meta.sha,b)}),b,this.ui.getCurrentFile()!=a?a.getData():null):f(a.meta.sha,
-Base64.encode(a.getData()))});d?this.getFile(g+"/"+k+"/"+encodeURIComponent(l)+"/"+n,mxUtils.bind(this,function(b){a.meta.sha=b.meta.sha;h()}),b):h()};GitHubClient.prototype.pickLibrary=function(a){this.pickFile(a)};GitHubClient.prototype.pickFolder=function(a){this.showGitHubDialog(!1,a)};GitHubClient.prototype.pickFile=function(a){a=null!=a?a:mxUtils.bind(this,function(a){this.ui.loadFile("H"+encodeURIComponent(a))});this.showGitHubDialog(!0,a)};
-GitHubClient.prototype.showGitHubDialog=function(a,c){var b=null,d=null,e=null,g=null,k=document.createElement("div");k.style.whiteSpace="nowrap";k.style.overflow="hidden";k.style.height="224px";var l=document.createElement("h3");mxUtils.write(l,mxResources.get(a?"selectFile":"selectFolder"));l.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";k.appendChild(l);var n=document.createElement("div");n.style.whiteSpace="nowrap";n.style.overflow="auto";n.style.height="194px";
-k.appendChild(n);var f=new CustomDialog(this.ui,k,mxUtils.bind(this,function(){c(b+"/"+d+"/"+encodeURIComponent(e)+"/"+g)}));this.ui.showDialog(f.container,340,270,!0,!0);a&&f.okButton.parentNode.removeChild(f.okButton);var h=mxUtils.bind(this,function(a,b){var c=document.createElement("a");c.setAttribute("href","javascript:void(0);");mxUtils.write(c,a);mxEvent.addListener(c,"click",b);return c}),m=mxUtils.bind(this,function(a){var c=document.createElement("div");c.style.marginBottom="8px";c.appendChild(h(b+
-"/"+d,mxUtils.bind(this,function(){g=null;t()})));a||(mxUtils.write(c," / "),c.appendChild(h(decodeURIComponent(e),mxUtils.bind(this,function(){g=null;x()}))));if(null!=g&&0<g.length){var f=g.split("/");for(a=0;a<f.length;a++)(function(a){mxUtils.write(c," / ");c.appendChild(h(f[a],mxUtils.bind(this,function(){g=f.slice(0,a+1).join("/");q()})))})(a)}n.appendChild(c)}),p=mxUtils.bind(this,function(a){this.ui.handleError(a,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?
-(g=e=d=b=null,t()):this.ui.hideDialog()}))}),q=mxUtils.bind(this,function(){var k=new mxXmlRequest(this.baseUrl+"/repos/"+b+"/"+d+"/contents/"+g+"?ref="+encodeURIComponent(e),null,"GET");f.okButton.removeAttribute("disabled");n.innerHTML="";this.ui.spinner.spin(n,mxResources.get("loading"));this.executeRequest(k,mxUtils.bind(this,function(f){m();this.ui.spinner.stop();var k=JSON.parse(f.getText());n.appendChild(h("../ [Up]",mxUtils.bind(this,function(){if(""==g)g=null,t();else{var a=g.split("/");
-g=a.slice(0,a.length-1).join("/");q()}})));mxUtils.br(n);null==k||0==k.length?mxUtils.write(n,mxResources.get("noFiles")):(f=mxUtils.bind(this,function(f){for(var l=0;l<k.length;l++)mxUtils.bind(this,function(k){f==("dir"==k.type)&&(n.appendChild(h(k.name+("dir"==k.type?"/":""),mxUtils.bind(this,function(){"dir"==k.type?(g=k.path,q()):a&&"file"==k.type&&(this.ui.hideDialog(),c(b+"/"+d+"/"+encodeURIComponent(e)+"/"+k.path))}))),mxUtils.br(n))})(k[l])}),f(!0),a&&f(!1))}),p)}),u=null,v=null,x=mxUtils.bind(this,
-function(a){null==a&&(n.innerHTML="",a=1);var c=new mxXmlRequest(this.baseUrl+"/repos/"+b+"/"+d+"/branches?per_page=100&page="+a,null,"GET");f.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(n,mxResources.get("loading"));null!=u&&null!=u.parentNode&&u.parentNode.removeChild(u);u=document.createElement("a");u.style.display="block";u.setAttribute("href","javascript:void(0);");mxUtils.write(u,mxResources.get("more")+"...");var k=mxUtils.bind(this,function(){mxEvent.removeListener(n,
-"scroll",v);x(a+1)});mxEvent.addListener(u,"click",k);this.executeRequest(c,mxUtils.bind(this,function(b){this.ui.spinner.stop();1==a&&(m(!0),n.appendChild(h("../ [Up]",mxUtils.bind(this,function(){g=null;t()}))),mxUtils.br(n));b=JSON.parse(b.getText());if(null==b||0==b.length)mxUtils.write(n,mxResources.get("noFiles"));else{for(var c=0;c<b.length;c++)mxUtils.bind(this,function(a){n.appendChild(h(a.name,mxUtils.bind(this,function(){e=a.name;g="";q()})));mxUtils.br(n)})(b[c]);100==b.length&&(n.appendChild(u),
-v=function(){n.scrollTop>=n.scrollHeight-n.offsetHeight&&k()},mxEvent.addListener(n,"scroll",v))}}),p)}),t=mxUtils.bind(this,function(a){null==a&&(n.innerHTML="",a=1);var c=new mxXmlRequest(this.baseUrl+"/user/repos?per_page=100&page="+a,null,"GET");f.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(n,mxResources.get("loading"));null!=u&&null!=u.parentNode&&u.parentNode.removeChild(u);u=document.createElement("a");u.style.display="block";u.setAttribute("href","javascript:void(0);");
-mxUtils.write(u,mxResources.get("more")+"...");var k=mxUtils.bind(this,function(){mxEvent.removeListener(n,"scroll",v);t(a+1)});mxEvent.addListener(u,"click",k);this.executeRequest(c,mxUtils.bind(this,function(c){this.ui.spinner.stop();c=JSON.parse(c.getText());if(null==c||0==c.length)mxUtils.write(n,mxResources.get("noFiles"));else{1==a&&(n.appendChild(h(mxResources.get("enterValue")+"...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.ui,"org/repo/ref",mxResources.get("ok"),mxUtils.bind(this,
-function(a){if(null!=a){var c=a.split("/");if(1<c.length){a=c[0];var f=c[1];3>c.length?(b=a,d=f,g=e=null,x()):this.ui.spinner.spin(n,mxResources.get("loading"))&&(c=encodeURIComponent(c.slice(2,c.length).join("/")),this.getFile(a+"/"+f+"/"+c,mxUtils.bind(this,function(a){this.ui.spinner.stop();b=a.meta.org;d=a.meta.repo;e=decodeURIComponent(a.meta.ref);g="";q()}),mxUtils.bind(this,function(a){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(a.container,300,80,!0,!1);a.init()}))),mxUtils.br(n),mxUtils.br(n));for(var f=0;f<c.length;f++)mxUtils.bind(this,function(a){n.appendChild(h(a.full_name,mxUtils.bind(this,function(){b=a.owner.login;d=a.name;e=a.default_branch;g="";q()})));mxUtils.br(n)})(c[f])}100==c.length&&(n.appendChild(u),v=function(){n.scrollTop>=n.scrollHeight-n.offsetHeight&&k()},mxEvent.addListener(n,"scroll",
+GitHubClient.prototype.saveFile=function(a,c,b,d,e){var g=a.meta.org,h=a.meta.repo,l=a.meta.ref,m=a.meta.path,f=mxUtils.bind(this,function(d,f){this.writeFile(g,h,l,m,e,f,d,mxUtils.bind(this,function(b){delete a.meta.isNew;c(JSON.parse(b.getText()))}),mxUtils.bind(this,function(a){b(a)}))}),k=mxUtils.bind(this,function(){this.ui.useCanvasForExport&&/(\.png)$/i.test(m)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(b){f(a.meta.sha,b)}),b,this.ui.getCurrentFile()!=a?a.getData():null):f(a.meta.sha,
+Base64.encode(a.getData()))});d?this.getFile(g+"/"+h+"/"+encodeURIComponent(l)+"/"+m,mxUtils.bind(this,function(b){a.meta.sha=b.meta.sha;k()}),b):k()};GitHubClient.prototype.pickLibrary=function(a){this.pickFile(a)};GitHubClient.prototype.pickFolder=function(a){this.showGitHubDialog(!1,a)};GitHubClient.prototype.pickFile=function(a){a=null!=a?a:mxUtils.bind(this,function(a){this.ui.loadFile("H"+encodeURIComponent(a))});this.showGitHubDialog(!0,a)};
+GitHubClient.prototype.showGitHubDialog=function(a,c){var b=null,d=null,e=null,g=null,h=document.createElement("div");h.style.whiteSpace="nowrap";h.style.overflow="hidden";h.style.height="224px";var l=document.createElement("h3");mxUtils.write(l,mxResources.get(a?"selectFile":"selectFolder"));l.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";h.appendChild(l);var m=document.createElement("div");m.style.whiteSpace="nowrap";m.style.overflow="auto";m.style.height="194px";
+h.appendChild(m);var f=new CustomDialog(this.ui,h,mxUtils.bind(this,function(){c(b+"/"+d+"/"+encodeURIComponent(e)+"/"+g)}));this.ui.showDialog(f.container,340,270,!0,!0);a&&f.okButton.parentNode.removeChild(f.okButton);var k=mxUtils.bind(this,function(a,b){var c=document.createElement("a");c.setAttribute("href","javascript:void(0);");mxUtils.write(c,a);mxEvent.addListener(c,"click",b);return c}),n=mxUtils.bind(this,function(a){var c=document.createElement("div");c.style.marginBottom="8px";c.appendChild(k(b+
+"/"+d,mxUtils.bind(this,function(){g=null;t()})));a||(mxUtils.write(c," / "),c.appendChild(k(decodeURIComponent(e),mxUtils.bind(this,function(){g=null;x()}))));if(null!=g&&0<g.length){var f=g.split("/");for(a=0;a<f.length;a++)(function(a){mxUtils.write(c," / ");c.appendChild(k(f[a],mxUtils.bind(this,function(){g=f.slice(0,a+1).join("/");q()})))})(a)}m.appendChild(c)}),p=mxUtils.bind(this,function(a){this.ui.handleError(a,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?
+(g=e=d=b=null,t()):this.ui.hideDialog()}))}),q=mxUtils.bind(this,function(){var h=new mxXmlRequest(this.baseUrl+"/repos/"+b+"/"+d+"/contents/"+g+"?ref="+encodeURIComponent(e),null,"GET");f.okButton.removeAttribute("disabled");m.innerHTML="";this.ui.spinner.spin(m,mxResources.get("loading"));this.executeRequest(h,mxUtils.bind(this,function(f){n();this.ui.spinner.stop();var h=JSON.parse(f.getText());m.appendChild(k("../ [Up]",mxUtils.bind(this,function(){if(""==g)g=null,t();else{var a=g.split("/");
+g=a.slice(0,a.length-1).join("/");q()}})));mxUtils.br(m);null==h||0==h.length?mxUtils.write(m,mxResources.get("noFiles")):(f=mxUtils.bind(this,function(f){for(var l=0;l<h.length;l++)mxUtils.bind(this,function(h){f==("dir"==h.type)&&(m.appendChild(k(h.name+("dir"==h.type?"/":""),mxUtils.bind(this,function(){"dir"==h.type?(g=h.path,q()):a&&"file"==h.type&&(this.ui.hideDialog(),c(b+"/"+d+"/"+encodeURIComponent(e)+"/"+h.path))}))),mxUtils.br(m))})(h[l])}),f(!0),a&&f(!1))}),p)}),u=null,v=null,x=mxUtils.bind(this,
+function(a){null==a&&(m.innerHTML="",a=1);var c=new mxXmlRequest(this.baseUrl+"/repos/"+b+"/"+d+"/branches?per_page=100&page="+a,null,"GET");f.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(m,mxResources.get("loading"));null!=u&&null!=u.parentNode&&u.parentNode.removeChild(u);u=document.createElement("a");u.style.display="block";u.setAttribute("href","javascript:void(0);");mxUtils.write(u,mxResources.get("more")+"...");var h=mxUtils.bind(this,function(){mxEvent.removeListener(m,
+"scroll",v);x(a+1)});mxEvent.addListener(u,"click",h);this.executeRequest(c,mxUtils.bind(this,function(b){this.ui.spinner.stop();1==a&&(n(!0),m.appendChild(k("../ [Up]",mxUtils.bind(this,function(){g=null;t()}))),mxUtils.br(m));b=JSON.parse(b.getText());if(null==b||0==b.length)mxUtils.write(m,mxResources.get("noFiles"));else{for(var c=0;c<b.length;c++)mxUtils.bind(this,function(a){m.appendChild(k(a.name,mxUtils.bind(this,function(){e=a.name;g="";q()})));mxUtils.br(m)})(b[c]);100==b.length&&(m.appendChild(u),
+v=function(){m.scrollTop>=m.scrollHeight-m.offsetHeight&&h()},mxEvent.addListener(m,"scroll",v))}}),p)}),t=mxUtils.bind(this,function(a){null==a&&(m.innerHTML="",a=1);var c=new mxXmlRequest(this.baseUrl+"/user/repos?per_page=100&page="+a,null,"GET");f.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(m,mxResources.get("loading"));null!=u&&null!=u.parentNode&&u.parentNode.removeChild(u);u=document.createElement("a");u.style.display="block";u.setAttribute("href","javascript:void(0);");
+mxUtils.write(u,mxResources.get("more")+"...");var h=mxUtils.bind(this,function(){mxEvent.removeListener(m,"scroll",v);t(a+1)});mxEvent.addListener(u,"click",h);this.executeRequest(c,mxUtils.bind(this,function(c){this.ui.spinner.stop();c=JSON.parse(c.getText());if(null==c||0==c.length)mxUtils.write(m,mxResources.get("noFiles"));else{1==a&&(m.appendChild(k(mxResources.get("enterValue")+"...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.ui,"org/repo/ref",mxResources.get("ok"),mxUtils.bind(this,
+function(a){if(null!=a){var c=a.split("/");if(1<c.length){a=c[0];var f=c[1];3>c.length?(b=a,d=f,g=e=null,x()):this.ui.spinner.spin(m,mxResources.get("loading"))&&(c=encodeURIComponent(c.slice(2,c.length).join("/")),this.getFile(a+"/"+f+"/"+c,mxUtils.bind(this,function(a){this.ui.spinner.stop();b=a.meta.org;d=a.meta.repo;e=decodeURIComponent(a.meta.ref);g="";q()}),mxUtils.bind(this,function(a){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(a.container,300,80,!0,!1);a.init()}))),mxUtils.br(m),mxUtils.br(m));for(var f=0;f<c.length;f++)mxUtils.bind(this,function(a){m.appendChild(k(a.full_name,mxUtils.bind(this,function(){b=a.owner.login;d=a.name;e=a.default_branch;g="";q()})));mxUtils.br(m)})(c[f])}100==c.length&&(m.appendChild(u),v=function(){m.scrollTop>=m.scrollHeight-m.offsetHeight&&h()},mxEvent.addListener(m,"scroll",
v))}),p)});t()};GitHubClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);this.token=null};TrelloFile=function(a,c,b){DrawioFile.call(this,a,c);this.meta=b;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(a,c,b){this.doSave(this.getTitle(),c,b)};TrelloFile.prototype.saveAs=function(a,c,b){this.doSave(a,c,b)};TrelloFile.prototype.doSave=function(a,c,b){var d=this.meta.name;this.meta.name=a;DrawioFile.prototype.save.apply(this,arguments);this.meta.name=d;this.saveFile(a,!1,c,b)};
-TrelloFile.prototype.saveFile=function(a,c,b,d){if(this.isEditable())if(this.savingFile)null!=d&&(this.saveNeededCounter++,d({code:App.ERROR_BUSY}));else if(this.savingFile=!0,this.getTitle()==a){var e=this.isModified,g=this.isModified(),k=mxUtils.bind(this,function(){this.setModified(!1);this.isModified=function(){return g}});k();this.ui.trello.saveFile(this,mxUtils.bind(this,function(g){this.savingFile=!1;this.isModified=e;this.meta=g;this.contentChanged();null!=b&&b();0<this.saveNeededCounter&&
-(this.saveNeededCounter--,this.saveFile(a,c,b,d))}),mxUtils.bind(this,function(a){this.savingFile=!1;this.isModified=e;this.setModified(g||this.isModified());if(null!=d){if(null!=a&&null!=a.retry){var b=a.retry;a.retry=function(){k();b()}}d(a)}}))}else this.ui.pickFolder(App.MODE_TRELLO,mxUtils.bind(this,function(e){this.ui.trello.insertFile(a,this.getData(),mxUtils.bind(this,function(e){this.savingFile=!1;null!=b&&b();this.ui.fileLoaded(e);0<this.saveNeededCounter&&(this.saveNeededCounter--,this.saveFile(a,
+TrelloFile.prototype.saveFile=function(a,c,b,d){if(this.isEditable())if(this.savingFile)null!=d&&(this.saveNeededCounter++,d({code:App.ERROR_BUSY}));else if(this.savingFile=!0,this.getTitle()==a){var e=this.isModified,g=this.isModified(),h=mxUtils.bind(this,function(){this.setModified(!1);this.isModified=function(){return g}});h();this.ui.trello.saveFile(this,mxUtils.bind(this,function(g){this.savingFile=!1;this.isModified=e;this.meta=g;this.contentChanged();null!=b&&b();0<this.saveNeededCounter&&
+(this.saveNeededCounter--,this.saveFile(a,c,b,d))}),mxUtils.bind(this,function(a){this.savingFile=!1;this.isModified=e;this.setModified(g||this.isModified());if(null!=d){if(null!=a&&null!=a.retry){var b=a.retry;a.retry=function(){h();b()}}d(a)}}))}else this.ui.pickFolder(App.MODE_TRELLO,mxUtils.bind(this,function(e){this.ui.trello.insertFile(a,this.getData(),mxUtils.bind(this,function(e){this.savingFile=!1;null!=b&&b();this.ui.fileLoaded(e);0<this.saveNeededCounter&&(this.saveNeededCounter--,this.saveFile(a,
c,b,d))}),mxUtils.bind(this,function(){this.savingFile=!1;null!=d&&d()}),!1,e)}));else null!=b&&b()};TrelloLibrary=function(a,c,b){TrelloFile.call(this,a,c,b)};mxUtils.extend(TrelloLibrary,TrelloFile);TrelloLibrary.prototype.doSave=function(a,c,b){this.saveFile(a,!1,c,b)};TrelloLibrary.prototype.open=function(){};TrelloClient=function(a){DrawioClient.call(this,a,"tauth");Trello.setKey(this.key)};mxUtils.extend(TrelloClient,DrawioClient);TrelloClient.prototype.key="e73615c79cf7e381aef91c85936e9553";TrelloClient.prototype.baseUrl="https://api.trello.com/1/";TrelloClient.prototype.SEPARATOR="|$|";TrelloClient.prototype.maxFileSize=1E7;TrelloClient.prototype.extension=".xml";
TrelloClient.prototype.authenticate=function(a,c,b){b&&this.logout();b=mxUtils.bind(this,function(b,e){Trello.authorize({type:"popup",name:"draw.io",scope:{read:"true",write:"true"},expiration:b?"never":"1hour",success:function(){null!=e&&e();a()},error:function(){null!=e&&e();null!=c&&c(mxResources.get("loggedOut"))}})});this.isAuthorized()?b(!0):this.ui.showAuthDialog(this,!0,b)};TrelloClient.prototype.getLibrary=function(a,c,b){this.getFile(a,c,b,!1,!0)};
-TrelloClient.prototype.getFile=function(a,c,b,d,e){e=null!=e?e:!1;var g=mxUtils.bind(this,function(){var d=a.split(this.SEPARATOR),l=!0,n=window.setTimeout(mxUtils.bind(this,function(){l=!1;b({code:App.ERROR_TIMEOUT,retry:g})}),this.ui.timeout);Trello.cards.get(d[0]+"/attachments/"+d[1],mxUtils.bind(this,function(d){window.clearTimeout(n);if(l){var f=/\.png$/i.test(d.name);/\.v(dx|sdx?)$/i.test(d.name)||/\.gliffy$/i.test(d.name)||!this.ui.useCanvasForExport&&f?this.ui.convertFile(PROXY_URL+"?url="+
-encodeURIComponent(d.url),d.name,d.mimeType,this.extension,c,b):(l=!0,n=window.setTimeout(mxUtils.bind(this,function(){l=!1;b({code:App.ERROR_TIMEOUT})}),this.ui.timeout),this.ui.loadUrl(PROXY_URL+"?url="+encodeURIComponent(d.url),mxUtils.bind(this,function(b){window.clearTimeout(n);if(l){d.compoundId=a;var g=f?b.lastIndexOf(","):-1;0<g&&(g=this.ui.extractGraphModelFromPng(b.substring(g+1)),null!=g&&0<g.length&&(b=g));e?c(new TrelloLibrary(this.ui,b,d)):c(new TrelloFile(this.ui,b,d))}}),mxUtils.bind(this,
-function(a,c){window.clearTimeout(n);l&&(401==c.status?this.authenticate(g,b,!0):b())}),f||null!=d.mimeType&&"image/"==d.mimeType.substring(0,6)))}}),mxUtils.bind(this,function(a){window.clearTimeout(n);l&&(401==a.status?this.authenticate(g,b,!0):b())}))});this.authenticate(g,b)};TrelloClient.prototype.insertLibrary=function(a,c,b,d,e){this.insertFile(a,c,b,d,!0,e)};
-TrelloClient.prototype.insertFile=function(a,c,b,d,e,g){e=null!=e?e:!1;var k=mxUtils.bind(this,function(){var k=mxUtils.bind(this,function(k){this.writeFile(a,k,g,mxUtils.bind(this,function(a){e?b(new TrelloLibrary(this.ui,c,a)):b(new TrelloFile(this.ui,c,a))}),d)});this.ui.useCanvasForExport&&/(\.png)$/i.test(a)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){k(this.ui.base64ToBlob(a,"image/png"))}),d,c):k(c)});this.authenticate(k,d)};
+TrelloClient.prototype.getFile=function(a,c,b,d,e){e=null!=e?e:!1;var g=mxUtils.bind(this,function(){var d=a.split(this.SEPARATOR),l=!0,m=window.setTimeout(mxUtils.bind(this,function(){l=!1;b({code:App.ERROR_TIMEOUT,retry:g})}),this.ui.timeout);Trello.cards.get(d[0]+"/attachments/"+d[1],mxUtils.bind(this,function(d){window.clearTimeout(m);if(l){var f=/\.png$/i.test(d.name);/\.v(dx|sdx?)$/i.test(d.name)||/\.gliffy$/i.test(d.name)||!this.ui.useCanvasForExport&&f?this.ui.convertFile(PROXY_URL+"?url="+
+encodeURIComponent(d.url),d.name,d.mimeType,this.extension,c,b):(l=!0,m=window.setTimeout(mxUtils.bind(this,function(){l=!1;b({code:App.ERROR_TIMEOUT})}),this.ui.timeout),this.ui.loadUrl(PROXY_URL+"?url="+encodeURIComponent(d.url),mxUtils.bind(this,function(b){window.clearTimeout(m);if(l){d.compoundId=a;var g=f?b.lastIndexOf(","):-1;0<g&&(g=this.ui.extractGraphModelFromPng(b.substring(g+1)),null!=g&&0<g.length&&(b=g));e?c(new TrelloLibrary(this.ui,b,d)):c(new TrelloFile(this.ui,b,d))}}),mxUtils.bind(this,
+function(a,c){window.clearTimeout(m);l&&(401==c.status?this.authenticate(g,b,!0):b())}),f||null!=d.mimeType&&"image/"==d.mimeType.substring(0,6)))}}),mxUtils.bind(this,function(a){window.clearTimeout(m);l&&(401==a.status?this.authenticate(g,b,!0):b())}))});this.authenticate(g,b)};TrelloClient.prototype.insertLibrary=function(a,c,b,d,e){this.insertFile(a,c,b,d,!0,e)};
+TrelloClient.prototype.insertFile=function(a,c,b,d,e,g){e=null!=e?e:!1;var h=mxUtils.bind(this,function(){var h=mxUtils.bind(this,function(h){this.writeFile(a,h,g,mxUtils.bind(this,function(a){e?b(new TrelloLibrary(this.ui,c,a)):b(new TrelloFile(this.ui,c,a))}),d)});this.ui.useCanvasForExport&&/(\.png)$/i.test(a)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){h(this.ui.base64ToBlob(a,"image/png"))}),d,c):h(c)});this.authenticate(h,d)};
TrelloClient.prototype.saveFile=function(a,c,b){var d=a.meta.compoundId.split(this.SEPARATOR),e=mxUtils.bind(this,function(e){this.writeFile(a.meta.name,e,d[0],function(a){Trello.del("cards/"+d[0]+"/attachments/"+d[1],mxUtils.bind(this,function(){c(a)}),mxUtils.bind(this,function(a){401==a.status?this.authenticate(g,b,!0):b()}))},b)}),g=mxUtils.bind(this,function(){this.ui.useCanvasForExport&&/(\.png)$/i.test(a.meta.name)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){e(this.ui.base64ToBlob(a,
"image/png"))}),b,this.ui.getCurrentFile()!=a?a.getData():null):e(a.getData())});this.authenticate(g,b)};
-TrelloClient.prototype.writeFile=function(a,c,b,d,e){if(null!=a&&null!=c)if(c.length>=this.maxFileSize)e({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(c.length)+" / 10 MB)"});else{var g=mxUtils.bind(this,function(){var k=!0,l=window.setTimeout(mxUtils.bind(this,function(){k=!1;e({code:App.ERROR_TIMEOUT,retry:g})}),this.ui.timeout),n=new FormData;n.append("key",Trello.key());n.append("token",Trello.token());n.append("file","string"===typeof c?new Blob([c]):c,a);n.append("name",
-a);var f=new XMLHttpRequest;f.responseType="json";f.onreadystatechange=mxUtils.bind(this,function(){if(4===f.readyState&&(window.clearTimeout(l),k))if(200==f.status){var a=f.response;a.compoundId=b+this.SEPARATOR+a.id;d(a)}else 401==f.status?this.authenticate(g,e,!0):e()});f.open("POST",this.baseUrl+"cards/"+b+"/attachments");f.send(n)});this.authenticate(g,e)}else e({message:mxResources.get("unknownError")})};TrelloClient.prototype.pickLibrary=function(a){this.pickFile(a)};
+TrelloClient.prototype.writeFile=function(a,c,b,d,e){if(null!=a&&null!=c)if(c.length>=this.maxFileSize)e({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(c.length)+" / 10 MB)"});else{var g=mxUtils.bind(this,function(){var h=!0,l=window.setTimeout(mxUtils.bind(this,function(){h=!1;e({code:App.ERROR_TIMEOUT,retry:g})}),this.ui.timeout),m=new FormData;m.append("key",Trello.key());m.append("token",Trello.token());m.append("file","string"===typeof c?new Blob([c]):c,a);m.append("name",
+a);var f=new XMLHttpRequest;f.responseType="json";f.onreadystatechange=mxUtils.bind(this,function(){if(4===f.readyState&&(window.clearTimeout(l),h))if(200==f.status){var a=f.response;a.compoundId=b+this.SEPARATOR+a.id;d(a)}else 401==f.status?this.authenticate(g,e,!0):e()});f.open("POST",this.baseUrl+"cards/"+b+"/attachments");f.send(m)});this.authenticate(g,e)}else e({message:mxResources.get("unknownError")})};TrelloClient.prototype.pickLibrary=function(a){this.pickFile(a)};
TrelloClient.prototype.pickFolder=function(a){this.authenticate(mxUtils.bind(this,function(){this.showTrelloDialog(!1,a)}),mxUtils.bind(this,function(a){this.ui.showError(mxResources.get("error"),a)}))};TrelloClient.prototype.pickFile=function(a,c){a=null!=a?a:mxUtils.bind(this,function(a){this.ui.loadFile("T"+encodeURIComponent(a))});this.authenticate(mxUtils.bind(this,function(){this.showTrelloDialog(!0,a)}),mxUtils.bind(this,function(a){this.ui.showError(mxResources.get("error"),a,mxResources.get("ok"))}))};
-TrelloClient.prototype.showTrelloDialog=function(a,c){var b=null,d="@me",e=0,g=document.createElement("div");g.style.whiteSpace="nowrap";g.style.overflow="hidden";g.style.height="224px";var k=document.createElement("h3");mxUtils.write(k,a?mxResources.get("selectFile"):mxResources.get("selectCard"));k.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";g.appendChild(k);var l=document.createElement("div");l.style.whiteSpace="nowrap";l.style.overflow="auto";l.style.height=
-"194px";g.appendChild(l);g=new CustomDialog(this.ui,g);this.ui.showDialog(g.container,340,270,!0,!0);g.okButton.parentNode.removeChild(g.okButton);var n=mxUtils.bind(this,function(a,b,c){e++;var d=document.createElement("div");d.style="width:100%;text-overflow:ellipsis;overflow:hidden;vertical-align:middle;background:"+(0==e%2?"#eee":"#fff");var f=document.createElement("a");f.setAttribute("href","javascript:void(0);");if(null!=c){var g=document.createElement("img");g.src=c.url;g.width=c.width;g.height=
-c.height;g.style="border: 1px solid black;margin:5px;vertical-align:middle";f.appendChild(g)}mxUtils.write(f,a);mxEvent.addListener(f,"click",b);d.appendChild(f);return d}),f=mxUtils.bind(this,function(a){this.ui.handleError(a,null,mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.hideDialog()}))}),h=mxUtils.bind(this,function(){e=0;l.innerHTML="";this.ui.spinner.spin(l,mxResources.get("loading"));var a=mxUtils.bind(this,function(){Trello.cards.get(b+"/attachments",{fields:"id,name,previews"},
-mxUtils.bind(this,function(a){this.ui.spinner.stop();l.appendChild(n("../ [Up]",mxUtils.bind(this,function(){q()})));mxUtils.br(l);null==a||0==a.length?mxUtils.write(l,mxResources.get("noFiles")):mxUtils.bind(this,function(){for(var d=0;d<a.length;d++)mxUtils.bind(this,function(a){l.appendChild(n(a.name,mxUtils.bind(this,function(){this.ui.hideDialog();c(b+this.SEPARATOR+a.id)}),null!=a.previews?a.previews[0]:null))})(a[d])})()}),mxUtils.bind(this,function(b){401==b.status?this.authenticate(a,f,!0):
-null!=f&&f(b)}))});a()}),m=null,p=null,q=mxUtils.bind(this,function(g){null==g&&(e=0,l.innerHTML="",g=1);this.ui.spinner.spin(l,mxResources.get("loading"));null!=m&&null!=m.parentNode&&m.parentNode.removeChild(m);m=document.createElement("a");m.style.display="block";m.setAttribute("href","javascript:void(0);");mxUtils.write(m,mxResources.get("more")+"...");var k=mxUtils.bind(this,function(){mxEvent.removeListener(l,"scroll",p);q(g+1)});mxEvent.addListener(m,"click",k);var u=mxUtils.bind(this,function(){Trello.get("search",
-{query:""==mxUtils.trim(d)?"is:open":d,cards_limit:100,cards_page:g-1},mxUtils.bind(this,function(e){this.ui.spinner.stop();e=null!=e?e.cards:null;if(null==e||0==e.length)mxUtils.write(l,mxResources.get("noFiles"));else{1==g&&(l.appendChild(n(mxResources.get("filterCards")+"...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.ui,d,mxResources.get("ok"),mxUtils.bind(this,function(a){null!=a&&(d=a,q())}),mxResources.get("filterCards"),null,null,"http://help.trello.com/article/808-searching-for-cards-all-boards");
-this.ui.showDialog(a.container,300,80,!0,!1);a.init()}))),mxUtils.br(l));for(var f=0;f<e.length;f++)mxUtils.bind(this,function(d){l.appendChild(n(d.name,mxUtils.bind(this,function(){a?(b=d.id,h()):(this.ui.hideDialog(),c(d.id))})))})(e[f]);100==e.length&&(l.appendChild(m),p=function(){l.scrollTop>=l.scrollHeight-l.offsetHeight&&k()},mxEvent.addListener(l,"scroll",p))}}),mxUtils.bind(this,function(a){401==a.status?this.authenticate(u,f,!0):null!=f&&f({message:a.responseText})}))});u()});q()};
+TrelloClient.prototype.showTrelloDialog=function(a,c){var b=null,d="@me",e=0,g=document.createElement("div");g.style.whiteSpace="nowrap";g.style.overflow="hidden";g.style.height="224px";var h=document.createElement("h3");mxUtils.write(h,a?mxResources.get("selectFile"):mxResources.get("selectCard"));h.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";g.appendChild(h);var l=document.createElement("div");l.style.whiteSpace="nowrap";l.style.overflow="auto";l.style.height=
+"194px";g.appendChild(l);g=new CustomDialog(this.ui,g);this.ui.showDialog(g.container,340,270,!0,!0);g.okButton.parentNode.removeChild(g.okButton);var m=mxUtils.bind(this,function(a,b,c){e++;var d=document.createElement("div");d.style="width:100%;text-overflow:ellipsis;overflow:hidden;vertical-align:middle;background:"+(0==e%2?"#eee":"#fff");var f=document.createElement("a");f.setAttribute("href","javascript:void(0);");if(null!=c){var g=document.createElement("img");g.src=c.url;g.width=c.width;g.height=
+c.height;g.style="border: 1px solid black;margin:5px;vertical-align:middle";f.appendChild(g)}mxUtils.write(f,a);mxEvent.addListener(f,"click",b);d.appendChild(f);return d}),f=mxUtils.bind(this,function(a){this.ui.handleError(a,null,mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.hideDialog()}))}),k=mxUtils.bind(this,function(){e=0;l.innerHTML="";this.ui.spinner.spin(l,mxResources.get("loading"));var a=mxUtils.bind(this,function(){Trello.cards.get(b+"/attachments",{fields:"id,name,previews"},
+mxUtils.bind(this,function(a){this.ui.spinner.stop();l.appendChild(m("../ [Up]",mxUtils.bind(this,function(){q()})));mxUtils.br(l);null==a||0==a.length?mxUtils.write(l,mxResources.get("noFiles")):mxUtils.bind(this,function(){for(var d=0;d<a.length;d++)mxUtils.bind(this,function(a){l.appendChild(m(a.name,mxUtils.bind(this,function(){this.ui.hideDialog();c(b+this.SEPARATOR+a.id)}),null!=a.previews?a.previews[0]:null))})(a[d])})()}),mxUtils.bind(this,function(b){401==b.status?this.authenticate(a,f,!0):
+null!=f&&f(b)}))});a()}),n=null,p=null,q=mxUtils.bind(this,function(g){null==g&&(e=0,l.innerHTML="",g=1);this.ui.spinner.spin(l,mxResources.get("loading"));null!=n&&null!=n.parentNode&&n.parentNode.removeChild(n);n=document.createElement("a");n.style.display="block";n.setAttribute("href","javascript:void(0);");mxUtils.write(n,mxResources.get("more")+"...");var h=mxUtils.bind(this,function(){mxEvent.removeListener(l,"scroll",p);q(g+1)});mxEvent.addListener(n,"click",h);var u=mxUtils.bind(this,function(){Trello.get("search",
+{query:""==mxUtils.trim(d)?"is:open":d,cards_limit:100,cards_page:g-1},mxUtils.bind(this,function(e){this.ui.spinner.stop();e=null!=e?e.cards:null;if(null==e||0==e.length)mxUtils.write(l,mxResources.get("noFiles"));else{1==g&&(l.appendChild(m(mxResources.get("filterCards")+"...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.ui,d,mxResources.get("ok"),mxUtils.bind(this,function(a){null!=a&&(d=a,q())}),mxResources.get("filterCards"),null,null,"http://help.trello.com/article/808-searching-for-cards-all-boards");
+this.ui.showDialog(a.container,300,80,!0,!1);a.init()}))),mxUtils.br(l));for(var f=0;f<e.length;f++)mxUtils.bind(this,function(d){l.appendChild(m(d.name,mxUtils.bind(this,function(){a?(b=d.id,k()):(this.ui.hideDialog(),c(d.id))})))})(e[f]);100==e.length&&(l.appendChild(n),p=function(){l.scrollTop>=l.scrollHeight-l.offsetHeight&&h()},mxEvent.addListener(l,"scroll",p))}}),mxUtils.bind(this,function(a){401==a.status?this.authenticate(u,f,!0):null!=f&&f({message:a.responseText})}))});u()});q()};
TrelloClient.prototype.isAuthorized=function(){try{return null!=localStorage.trello_token}catch(a){}return!1};TrelloClient.prototype.logout=function(){localStorage.removeItem("trello_token");Trello.deauthorize()};App=function(a,c,b){EditorUi.call(this,a,c,null!=b?b:"1"==urlParams.lightbox||"min"==uiTheme&&"0"!=urlParams.chrome);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.openWindow=mxUtils.bind(this,function(a,b,c){var d=null;try{d=window.open(a)}catch(l){}null==d||void 0===d?this.showDialog((new PopupDialog(this,a,b,c)).container,320,140,!0,!0):null!=b&&b()});this.updateDocumentTitle();this.updateUi();window.showOpenAlert=mxUtils.bind(this,function(a){null!=window.openFile&&window.openFile.cancel(!0);this.handleError(a)});this.editor.chromeless&&!this.editor.editable||this.addFileDropHandler([document]);if(null!=
App.DrawPlugins){for(a=0;a<App.DrawPlugins.length;a++)try{App.DrawPlugins[a](this)}catch(d){null!=window.console&&console.log("Plugin Error:",d,App.DrawPlugins[a])}window.Draw.loadPlugin=mxUtils.bind(this,function(a){a(this)})}this.load()};App.ERROR_TIMEOUT="timeout";App.ERROR_BUSY="busy";App.ERROR_UNKNOWN="unknown";App.MODE_GOOGLE="google";App.MODE_DROPBOX="dropbox";App.MODE_ONEDRIVE="onedrive";App.MODE_GITHUB="github";App.MODE_DEVICE="device";App.MODE_BROWSER="browser";App.MODE_TRELLO="trello";
@@ -8510,10 +8511,10 @@ null!=window.DrawOneDriveClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.o
urlParams.tr)&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?mxscript(App.TRELLO_JQUERY_URL,function(){mxscript(App.TRELLO_URL,function(){DrawTrelloClientCallback()})}):"undefined"===typeof window.Trello&&(window.TrelloClient=null)}null!=a&&a(b);"0"!=urlParams.chrome&&"1"==urlParams.test&&(EditorUi.debug("Started in "+((new Date).getTime()-t0.getTime())+"ms"),null!=urlParams["export"]&&EditorUi.debug("Export:",EXPORT_URL))},function(a){document.getElementById("geStatus").innerHTML=
"Error loading page. <a>Please try refreshing.</a>";document.getElementById("geStatus").getElementsByTagName("a")[0].onclick=function(){mxLanguage="en";b(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))}})}function d(){mxResources.loadDefaultBundle=!1;b(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))}window.onerror=function(a,b,c,d,e){EditorUi.logError(a,b,c,d,e)};if("1"==
urlParams.embed||"1"==urlParams.lightbox){var e=document.getElementById("geInfo");null!=e&&e.parentNode.removeChild(e)}if(null!=window.mxscript){if("1"==urlParams.offline||"1"==urlParams.appcache)mxscript("js/shapes.min.js"),mxscript("js/stencils.min.js"),mxscript("js/extensions.min.js"),e=document.createElement("iframe"),e.setAttribute("width","0"),e.setAttribute("height","0"),e.setAttribute("src","offline.html"),document.body.appendChild(e);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"auto"!=
-DrawioFile.SYNC||mxscript(App.PUSHER_URL);if("0"!=urlParams.plugins&&"1"!=urlParams.offline){var e=null!=mxSettings.settings?mxSettings.getPlugins():null,g={},k=urlParams.p;App.initPluginCallback();if(null!=k){var l="";"1"==urlParams.drawdev&&(l=document.location.protocol+"//drawhost.jgraph.com/");for(var n=k.split(";"),k=0;k<n.length;k++){var f=App.pluginRegistry[n[k]];null!=f&&null==g[f]?(g[f]=!0,mxscript(l+f)):null!=window.console&&console.log("Unknown plugin:",n[k])}}else"0"==urlParams.chrome||
-EditorUi.isElectronApp||mxscript(App.FOOTER_PLUGIN_URL,null,null,null,mxClient.IS_SVG);if(null!=e&&0<e.length&&"0"!=urlParams.plugins){l=window.location.protocol+"//"+window.location.host;n=!0;for(k=0;k<e.length&&n;k++)"/"!=e[k].charAt(0)&&e[k].substring(0,l.length)!=l&&(n=!1);if(n||mxUtils.confirm(mxResources.replacePlaceholders("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",
-[e.join("\n")]).replace(/\\n/g,"\n")))for(k=0;k<e.length;k++)try{null==g[e[k]]&&(g[f]=!0,mxscript(e[k]))}catch(p){}}}"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 h=window.opener||window.parent,m=function(a){if(a.source==h)try{var b=JSON.parse(a.data);null!=b&&"configure"==b.action&&(mxEvent.removeListener(window,"message",m),Editor.configure(b.config,!0),mxSettings.load(),d())}catch(u){null!=window.console&&console.log("Error in configuration: "+u)}};mxEvent.addListener(window,"message",m);h.postMessage(JSON.stringify({event:"load"}),"*")}else d()};mxUtils.extend(App,EditorUi);
+DrawioFile.SYNC||mxscript(App.PUSHER_URL);if("0"!=urlParams.plugins&&"1"!=urlParams.offline){var e=null!=mxSettings.settings?mxSettings.getPlugins():null,g={},h=urlParams.p;App.initPluginCallback();if(null!=h){var l="";"1"==urlParams.drawdev&&(l=document.location.protocol+"//drawhost.jgraph.com/");for(var m=h.split(";"),h=0;h<m.length;h++){var f=App.pluginRegistry[m[h]];null!=f&&null==g[f]?(g[f]=!0,mxscript(l+f)):null!=window.console&&console.log("Unknown plugin:",m[h])}}else"0"==urlParams.chrome||
+EditorUi.isElectronApp||mxscript(App.FOOTER_PLUGIN_URL,null,null,null,mxClient.IS_SVG);if(null!=e&&0<e.length&&"0"!=urlParams.plugins){l=window.location.protocol+"//"+window.location.host;m=!0;for(h=0;h<e.length&&m;h++)"/"!=e[h].charAt(0)&&e[h].substring(0,l.length)!=l&&(m=!1);if(m||mxUtils.confirm(mxResources.replacePlaceholders("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",
+[e.join("\n")]).replace(/\\n/g,"\n")))for(h=0;h<e.length;h++)try{null==g[e[h]]&&(g[f]=!0,mxscript(e[h]))}catch(p){}}}"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 k=window.opener||window.parent,n=function(a){if(a.source==k)try{var b=JSON.parse(a.data);null!=b&&"configure"==b.action&&(mxEvent.removeListener(window,"message",n),Editor.configure(b.config,!0),mxSettings.load(),d())}catch(u){null!=window.console&&console.log("Error in configuration: "+u)}};mxEvent.addListener(window,"message",n);k.postMessage(JSON.stringify({event:"load"}),"*")}else d()};mxUtils.extend(App,EditorUi);
App.prototype.defaultUserPicture="https://lh3.googleusercontent.com/-HIzvXUy6QUY/AAAAAAAAAAI/AAAAAAAAAAA/giuR7PQyjEk/photo.jpg?sz=30";App.prototype.shareImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2RpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDowOTgwMTE3NDA3MjA2ODExODhDNkFGMDBEQkQ0RTgwOSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDoxMjU2NzdEMTcwRDIxMUUxQjc0MDkxRDhCNUQzOEFGRCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDoxMjU2NzdEMDcwRDIxMUUxQjc0MDkxRDhCNUQzOEFGRCIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowNjgwMTE3NDA3MjA2ODExODcxRkM4MUY1OTFDMjQ5OCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowNzgwMTE3NDA3MjA2ODExODhDNkFGMDBEQkQ0RTgwOSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PrM/fs0AAADgSURBVHjaYmDAA/7//88MwgzkAKDGFiD+BsQ/QWxSNaf9RwN37twpI8WAS+gGfP78+RpQSoRYA36iG/D379+vQClNdLVMOMz4gi7w79+/n0CKg1gD9qELvH379hzIHGK9oA508ieY8//8+fO5rq4uFCilRKwL1JmYmNhhHEZGRiZ+fn6Q2meEbDYG4u3/cYCfP38uA7kOm0ZOIJ7zn0jw48ePPiDFhmzArv8kgi9fvuwB+w5qwH9ykjswbFSZyM4sEMDPBDTlL5BxkFSd7969OwZ2BZKYGhDzkmjOJ4AAAwBhpRqGnEFb8QAAAABJRU5ErkJggg==";
App.prototype.chevronUpImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NDg2NEE3NUY1MUVBMTFFM0I3MUVEMTc0N0YyOUI4QzEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NDg2NEE3NjA1MUVBMTFFM0I3MUVEMTc0N0YyOUI4QzEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo0ODY0QTc1RDUxRUExMUUzQjcxRUQxNzQ3RjI5QjhDMSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo0ODY0QTc1RTUxRUExMUUzQjcxRUQxNzQ3RjI5QjhDMSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pg+qUokAAAAMUExURQAAANnZ2b+/v////5bgre4AAAAEdFJOU////wBAKqn0AAAAL0lEQVR42mJgRgMMRAswMKAKMDDARBjg8lARBoR6KImkH0wTbygT6YaS4DmAAAMAYPkClOEDDD0AAAAASUVORK5CYII=":
IMAGE_PATH+"/chevron-up.png";
@@ -8535,18 +8536,18 @@ this.icon.setAttribute("title",mxResources.get("draw.io")),this.icon.style.paddi
App.prototype.isDriveDomain=function(){return"0"!=urlParams.drive&&("test.draw.io"==window.location.hostname||"cdn.draw.io"==window.location.hostname||"www.draw.io"==window.location.hostname||"drive.draw.io"==window.location.hostname||"jgraph.github.io"==window.location.hostname)};App.prototype.isLegacyDriveDomain=function(){return 0==urlParams.drive||"legacy.draw.io"==window.location.hostname};
App.prototype.getPusher=function(){null==this.pusher&&"function"===typeof window.Pusher&&(this.pusher=new Pusher(App.PUSHER_KEY,{cluster:App.PUSHER_CLUSTER,encrypted:!0}));return this.pusher};
App.prototype.checkLicense=function(){var a=this.drive.getUser(),c=("1"==urlParams.dev?urlParams.lic:null)||(null!=a?a.email:null);if(!this.isOffline()&&!this.editor.chromeless&&null!=c){var b=c.lastIndexOf("@"),d=c;0<=b&&(d=c.substring(b+1),c=this.crc32(c.substring(0,b))+"@"+d);mxUtils.post("/license","domain="+encodeURIComponent(d)+"&email="+encodeURIComponent(c)+"&ds="+encodeURIComponent(a.displayName)+"&lc="+encodeURIComponent(a.locale)+"&ts="+(new Date).getTime(),mxUtils.bind(this,function(a){}))}};
-App.prototype.handleLicense=function(a,c){var b=document.getElementById("geFooter"),d=null;if(null!=b&&null!=a)if(d=a.expiry,null!=a.footer)b.innerHTML=decodeURIComponent(a.footer);else if(this.hideFooter(),null!=d&&"never"!=d){var e=new Date(Date.parse(d)),g=Math.round((e-Date.now())/864E5);if(90>g){var k="https://support.draw.io/display/DKB/draw.io+footer+state+that+license+is+expiring+on+Google+For+Work+account?domain="+encodeURIComponent(c);b.style.height="100%";b.style.margin="0px";b.style.display=
-"";0>g?(this.footerHeight=80,b.innerHTML='<table height="100%"><tr><td valign="middle" align="center" class="geStatusAlert geBlink"><a href="'+k+'" style="padding-top:16px;" target="_blank"><img border="0" src="'+mxGraph.prototype.warningImage.src+'" align="top" style="margin-right:6px">'+mxResources.get("licenseHasExpired",[c,e.toLocaleDateString()])+"</a></td></tr></table>"):(this.footerHeight=46,b.innerHTML='<table height="100%"><tr><td valign="middle" align="center" class="geStatusAlert"><a href="'+
-k+'" target="_blank"><img border="0" src="'+mxGraph.prototype.warningImage.src+'" align="top" style="margin-right:6px">'+mxResources.get("licenseWillExpire",[c,e.toLocaleDateString()])+"</a></td></tr></table>");this.refresh()}}return d};App.prototype.getEditBlankXml=function(){var a=this.getCurrentFile();return null!=a&&this.editor.isChromelessView()&&this.editor.graph.isLightboxView()?a.getData():this.getFileData(!0)};
+App.prototype.handleLicense=function(a,c){var b=document.getElementById("geFooter"),d=null;if(null!=b&&null!=a)if(d=a.expiry,null!=a.footer)b.innerHTML=decodeURIComponent(a.footer);else if(this.hideFooter(),null!=d&&"never"!=d){var e=new Date(Date.parse(d)),g=Math.round((e-Date.now())/864E5);if(90>g){var h="https://support.draw.io/display/DKB/draw.io+footer+state+that+license+is+expiring+on+Google+For+Work+account?domain="+encodeURIComponent(c);b.style.height="100%";b.style.margin="0px";b.style.display=
+"";0>g?(this.footerHeight=80,b.innerHTML='<table height="100%"><tr><td valign="middle" align="center" class="geStatusAlert geBlink"><a href="'+h+'" style="padding-top:16px;" target="_blank"><img border="0" src="'+mxGraph.prototype.warningImage.src+'" align="top" style="margin-right:6px">'+mxResources.get("licenseHasExpired",[c,e.toLocaleDateString()])+"</a></td></tr></table>"):(this.footerHeight=46,b.innerHTML='<table height="100%"><tr><td valign="middle" align="center" class="geStatusAlert"><a href="'+
+h+'" target="_blank"><img border="0" src="'+mxGraph.prototype.warningImage.src+'" align="top" style="margin-right:6px">'+mxResources.get("licenseWillExpire",[c,e.toLocaleDateString()])+"</a></td></tr></table>");this.refresh()}}return d};App.prototype.getEditBlankXml=function(){var a=this.getCurrentFile();return null!=a&&this.editor.isChromelessView()&&this.editor.graph.isLightboxView()?a.getData():this.getFileData(!0)};
App.prototype.updateActionStates=function(){EditorUi.prototype.updateActionStates.apply(this,arguments);var a=this.getCurrentFile();this.actions.get("revisionHistory").setEnabled(null!=a&&(a.constructor==DriveFile&&a.isEditable()||a.constructor==DropboxFile))};App.prototype.updateDraft=function(){isLocalStorage&&null!=localStorage&&localStorage.setItem(".draft",JSON.stringify({modified:(new Date).getTime(),data:this.getFileData()}))};App.prototype.getDraft=function(){return null};
App.prototype.addRecent=function(a){if(isLocalStorage&&null!=localStorage){var c=this.getRecent();if(null==c)c=[];else for(var b=0;b<c.length;b++)c[b].id==a.id&&c.splice(b,1);null!=c&&(c.unshift(a),c=c.slice(0,10),localStorage.setItem(".recent",JSON.stringify(c)))}};App.prototype.getRecent=function(){if(isLocalStorage&&null!=localStorage){try{var a=localStorage.getItem(".recent");if(null!=a)return JSON.parse(a)}catch(c){}return null}};
App.prototype.resetRecent=function(a){if(isLocalStorage&&null!=localStorage)try{localStorage.removeItem(".recent")}catch(c){}};App.prototype.removeDraft=function(){if(isLocalStorage&&null!=localStorage&&"0"==urlParams.splash)try{localStorage.removeItem(".draft")}catch(a){}};
App.prototype.onBeforeUnload=function(){if("1"==urlParams.embed&&this.editor.modified)return mxResources.get("allChangesLost");var a=this.getCurrentFile();if(null!=a)if(a.constructor!=LocalFile||""!=a.getHash()||a.isModified()||"1"==urlParams.nowarn||this.isDiagramEmpty()||null!=urlParams.url||this.editor.isChromelessView()){if(a.isModified())return mxResources.get("allChangesLost");a.close(!0)}else return mxResources.get("ensureDataSaved")};
App.prototype.updateDocumentTitle=function(){if(!this.editor.graph.isLightboxView()){var a=this.editor.appName,c=this.getCurrentFile();this.isOfflineApp()&&(a+=" app");null!=c&&(a=(null!=c.getTitle()?c.getTitle():this.defaultFilename)+" - "+a);document.title=a}};App.prototype.createCrcTable=function(){for(var a=[],c,b=0;256>b;b++){c=b;for(var d=0;8>d;d++)c=c&1?3988292384^c>>>1:c>>>1;a[b]=c}return a};
App.prototype.getThumbnail=function(a,c){var b=!1;try{null==this.thumbImageCache&&(this.thumbImageCache={});var d=this.editor.graph;if(null!=this.pages&&this.currentPage!=this.pages[0]){var d=this.createTemporaryGraph(d.getStylesheet()),e=d.getGlobalVariable,g=this.pages[0];d.getGlobalVariable=function(a){return"page"==a?g.getName():"pagenumber"==a?1:e.apply(this,arguments)};document.body.appendChild(d.container);d.model.setRoot(g.root)}if(mxClient.IS_CHROMEAPP||!d.mathEnabled&&this.useCanvasForExport)this.exportToCanvas(mxUtils.bind(this,
-function(a){d!=this.editor.graph&&d.container.parentNode.removeChild(d.container);c(a)}),a,this.thumbImageCache,"#ffffff",function(){c()},null,null,null,null,null,null,d),b=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var k=document.createElement("canvas"),l=d.getGraphBounds(),n=a/l.width,n=Math.min(1,Math.min(3*a/(4*l.height),n)),f=Math.floor(l.x),h=Math.floor(l.y);k.setAttribute("width",Math.ceil(n*(l.width+4)));k.setAttribute("height",Math.ceil(n*(l.height+4)));var m=k.getContext("2d");
-m.scale(n,n);m.translate(-f,-h);var p=d.background;if(null==p||""==p||p==mxConstants.NONE)p="#ffffff";m.save();m.fillStyle=p;m.fillRect(f,h,Math.ceil(l.width+4),Math.ceil(l.height+4));m.restore();var q=new mxJsCanvas(k),u=new mxAsyncCanvas(this.thumbImageCache);q.images=this.thumbImageCache.images;var v=new mxImageExport;v.drawShape=function(a,b){a.shape instanceof mxShape&&a.shape.checkBounds()&&(b.save(),b.translate(.5,.5),a.shape.paint(b),b.translate(-.5,-.5),b.restore())};v.drawText=function(a,
-b){};v.drawState(d.getView().getState(d.model.root),u);u.finish(mxUtils.bind(this,function(){v.drawState(d.getView().getState(d.model.root),q);d!=this.editor.graph&&d.container.parentNode.removeChild(d.container);c(k)}));b=!0}}catch(x){d!=this.editor.graph&&d.container.parentNode.removeChild(d.container)}return b};
+function(a){d!=this.editor.graph&&d.container.parentNode.removeChild(d.container);c(a)}),a,this.thumbImageCache,"#ffffff",function(){c()},null,null,null,null,null,null,d),b=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var h=document.createElement("canvas"),l=d.getGraphBounds(),m=a/l.width,m=Math.min(1,Math.min(3*a/(4*l.height),m)),f=Math.floor(l.x),k=Math.floor(l.y);h.setAttribute("width",Math.ceil(m*(l.width+4)));h.setAttribute("height",Math.ceil(m*(l.height+4)));var n=h.getContext("2d");
+n.scale(m,m);n.translate(-f,-k);var p=d.background;if(null==p||""==p||p==mxConstants.NONE)p="#ffffff";n.save();n.fillStyle=p;n.fillRect(f,k,Math.ceil(l.width+4),Math.ceil(l.height+4));n.restore();var q=new mxJsCanvas(h),u=new mxAsyncCanvas(this.thumbImageCache);q.images=this.thumbImageCache.images;var v=new mxImageExport;v.drawShape=function(a,b){a.shape instanceof mxShape&&a.shape.checkBounds()&&(b.save(),b.translate(.5,.5),a.shape.paint(b),b.translate(-.5,-.5),b.restore())};v.drawText=function(a,
+b){};v.drawState(d.getView().getState(d.model.root),u);u.finish(mxUtils.bind(this,function(){v.drawState(d.getView().getState(d.model.root),q);d!=this.editor.graph&&d.container.parentNode.removeChild(d.container);c(h)}));b=!0}}catch(x){d!=this.editor.graph&&d.container.parentNode.removeChild(d.container)}return b};
App.prototype.createBackground=function(){var a=this.createDiv("background");a.style.position="absolute";a.style.background="white";a.style.left="0px";a.style.top="0px";a.style.bottom="0px";a.style.right="0px";mxUtils.setOpacity(a,100);mxClient.IS_QUIRKS&&new mxDivResizer(a);return a};
(function(){var a=EditorUi.prototype.setMode;App.prototype.setMode=function(c,b){a.apply(this,arguments);null!=this.mode&&(Editor.useLocalStorage=this.mode==App.MODE_BROWSER);if(b)if(isLocalStorage)localStorage.setItem(".mode",c);else if("undefined"!=typeof Storage){var d=new Date;d.setYear(d.getFullYear()+1);document.cookie="MODE="+c+"; expires="+d.toUTCString()}null!=this.appIcon&&(d=this.getCurrentFile(),c=null!=d?d.getMode():null,c==App.MODE_GOOGLE?(this.appIcon.setAttribute("title",mxResources.get("openIt",
[mxResources.get("googleDrive")])),this.appIcon.style.cursor="pointer"):c==App.MODE_DROPBOX?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("dropbox")])),this.appIcon.style.cursor="pointer"):c==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="default"))}})();
@@ -8565,8 +8566,8 @@ mxResources.get("close");c.appendChild(a);mxEvent.addListener(a,"click",function
App.prototype.start=function(){this.bg.parentNode.removeChild(this.bg);this.restoreLibraries();this.spinner.stop();try{if("1"!=urlParams.client&&"1"!=urlParams.embed&&mxEvent.addListener(window,"hashchange",mxUtils.bind(this,function(a){try{var b=this.getDiagramId(),c=this.getCurrentFile();null!=c&&c.getHash()==b||this.loadFile(b,!0)}catch(l){null!=document.body&&this.handleError(l,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=
a?a.getHash():""}))}})),(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.url)this.loadFile("U"+urlParams.url,!0);else if(null==this.getCurrentFile()){var a=mxUtils.bind(this,function(){if("1"==urlParams.client&&(null==window.location.hash||0==window.location.hash.length||"#P"==window.location.hash.substring(0,2))){var a=mxUtils.bind(this,function(a){"data:image/png;base64,"==a.substring(0,22)&&(a=this.extractGraphModelFromPng(a));var b=urlParams.title,b=null!=b?decodeURIComponent(b):
this.defaultFilename;a=new LocalFile(this,a,b,!0);null!=window.location.hash&&"#P"==window.location.hash.substring(0,2)&&(a.getHash=function(){return window.location.hash.substring(1)});this.fileLoaded(a);this.getCurrentFile().setModified(!this.editor.chromeless)}),b=window.opener||window.parent;if(b!=window){var c=urlParams.create;null!=c?a(b[decodeURIComponent(c)]):(c=urlParams.data,null!=c?a(decodeURIComponent(c)):this.installMessageHandler(mxUtils.bind(this,function(c,d){d.source==b&&a(c)})))}}else if(null==
-this.dialog)if("1"==urlParams.demo)c=Editor.useLocalStorage,this.createFile(this.defaultFilename,null,null,null,null,null,null,!0),Editor.useLocalStorage=c;else{c=!1;try{c=null!=window.opener&&null!=window.opener.openFile}catch(f){}if(c)this.spinner.spin(document.body,mxResources.get("loading"));else if(c=this.getDiagramId(),"0"!=urlParams.splash||null!=c&&0!=c.length)this.loadFile(c);else if(!mxClient.IS_CHROMEAPP){var d=this.getDraft(),n=null!=d?d.data:this.getFileData(),c=Editor.useLocalStorage;
-this.createFile(this.defaultFilename,n,null,null,null,null,null,!0);Editor.useLocalStorage=c;null!=d&&(c=this.getCurrentFile(),null!=c&&c.addUnsavedStatus())}}}),c=decodeURIComponent(urlParams.create||"");if((null==window.location.hash||1>=window.location.hash.length)&&null!=c&&0<c.length&&this.spinner.spin(document.body,mxResources.get("loading"))){var b=mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("reconnecting"))&&(window.location.search=this.getSearch(["create",
+this.dialog)if("1"==urlParams.demo)c=Editor.useLocalStorage,this.createFile(this.defaultFilename,null,null,null,null,null,null,!0),Editor.useLocalStorage=c;else{c=!1;try{c=null!=window.opener&&null!=window.opener.openFile}catch(f){}if(c)this.spinner.spin(document.body,mxResources.get("loading"));else if(c=this.getDiagramId(),"0"!=urlParams.splash||null!=c&&0!=c.length)this.loadFile(c);else if(!mxClient.IS_CHROMEAPP){var d=this.getDraft(),m=null!=d?d.data:this.getFileData(),c=Editor.useLocalStorage;
+this.createFile(this.defaultFilename,m,null,null,null,null,null,!0);Editor.useLocalStorage=c;null!=d&&(c=this.getCurrentFile(),null!=c&&c.addUnsavedStatus())}}}),c=decodeURIComponent(urlParams.create||"");if((null==window.location.hash||1>=window.location.hash.length)&&null!=c&&0<c.length&&this.spinner.spin(document.body,mxResources.get("loading"))){var b=mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("reconnecting"))&&(window.location.search=this.getSearch(["create",
"title"]))}),d=mxUtils.bind(this,function(a){this.spinner.stop();if("0"!=urlParams.splash){this.fileLoaded(new LocalFile(this,a,null));this.editor.graph.setEnabled(!1);this.mode=urlParams.mode;var b=urlParams.title,b=null!=b?decodeURIComponent(b):this.defaultFilename;a=this.getServiceCount(!0);var c=4>=a?4:3,b=new CreateDialog(this,b,mxUtils.bind(this,function(a,b){if(null==b){this.hideDialog();var c=Editor.useLocalStorage;this.createFile(0<a.length?a:this.defaultFilename,this.getFileData(),null,
null,null,!0,null,!0);Editor.useLocalStorage=c}else this.pickFolder(b,mxUtils.bind(this,function(c){this.createFile(a,this.getFileData(!0),null,b,null,!0,c)}))}),null,null,null,null,"1"==urlParams.browser,null,null,!0,c);this.showDialog(b.container,380,a>c?390:270,!0,!1,mxUtils.bind(this,function(a){a&&null==this.getCurrentFile()&&this.showSplash()}));b.init()}}),c=decodeURIComponent(c);if("http://"!=c.substring(0,7)&&"https://"!=c.substring(0,8))try{null!=window.opener&&null!=window.opener[c]?d(window.opener[c]):
this.handleError(null,mxResources.get("errorLoadingFile"))}catch(e){this.handleError(e,mxResources.get("errorLoadingFile"))}else this.loadTemplate(c,function(a){d(a)},mxUtils.bind(this,function(){this.handleError(null,mxResources.get("errorLoadingFile"),b)}))}else(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.state&&null!=this.stateArg&&"open"==this.stateArg.action&&null!=this.stateArg.ids&&(window.location.hash="G"+this.stateArg.ids[0]),(null==window.location.hash||
@@ -8579,43 +8580,43 @@ c.popup(d.x,d.y+b.offsetHeight,null,a);this.setCurrentMenu(c)}));a.appendChild(b
App.prototype.pickFile=function(a){a=null!=a?a:this.mode;if(a==App.MODE_GOOGLE)null!=this.drive&&"undefined"!=typeof google&&"undefined"!=typeof google.picker?this.drive.pickFile():this.openLink("https://drive.google.com");else{var c=this.getPeerForMode(a);if(null!=c)c.pickFile();else if(a==App.MODE_DEVICE&&Graph.fileSupport&&(!mxClient.IS_IE&&!mxClient.IS_IE11||0>navigator.appVersion.indexOf("Windows NT 6.1"))){var b=document.createElement("input");b.setAttribute("type","file");mxEvent.addListener(b,
"change",mxUtils.bind(this,function(){null!=b.files&&this.openFiles(b.files)}));b.click()}else{this.hideDialog();window.openNew=null!=this.getCurrentFile()&&!this.isDiagramEmpty();window.baseUrl=this.getUrl();window.openKey="open";var d=Editor.useLocalStorage;Editor.useLocalStorage=a==App.MODE_BROWSER;this.openFile();window.openFile.setConsumer(mxUtils.bind(this,function(b,c){this.useCanvasForExport||".png"!=c.substring(c.length-4)||(c=c.substring(0,c.length-4)+".xml");this.fileLoaded(a==App.MODE_BROWSER?
new StorageFile(this,b,c):new LocalFile(this,b,c))}));var e=this.dialog,g=e.close;this.dialog.close=mxUtils.bind(this,function(a){Editor.useLocalStorage=d;g.apply(e,arguments);null==this.getCurrentFile()&&this.showSplash()})}}};
-App.prototype.pickLibrary=function(a){a=null!=a?a:this.mode;if(a==App.MODE_GOOGLE||a==App.MODE_DROPBOX||a==App.MODE_ONEDRIVE||a==App.MODE_GITHUB||a==App.MODE_TRELLO){var c=a==App.MODE_GOOGLE?this.drive:a==App.MODE_ONEDRIVE?this.oneDrive:a==App.MODE_GITHUB?this.gitHub:a==App.MODE_TRELLO?this.trello:this.dropbox;null!=c&&c.pickLibrary(mxUtils.bind(this,function(a,b){if(null!=b)try{this.loadLibrary(b)}catch(k){this.handleError(k,mxResources.get("errorLoadingFile"))}else this.spinner.spin(document.body,
+App.prototype.pickLibrary=function(a){a=null!=a?a:this.mode;if(a==App.MODE_GOOGLE||a==App.MODE_DROPBOX||a==App.MODE_ONEDRIVE||a==App.MODE_GITHUB||a==App.MODE_TRELLO){var c=a==App.MODE_GOOGLE?this.drive:a==App.MODE_ONEDRIVE?this.oneDrive:a==App.MODE_GITHUB?this.gitHub:a==App.MODE_TRELLO?this.trello:this.dropbox;null!=c&&c.pickLibrary(mxUtils.bind(this,function(a,b){if(null!=b)try{this.loadLibrary(b)}catch(h){this.handleError(h,mxResources.get("errorLoadingFile"))}else this.spinner.spin(document.body,
mxResources.get("loading"))&&c.getLibrary(a,mxUtils.bind(this,function(a){this.spinner.stop();try{this.loadLibrary(a)}catch(l){this.handleError(l,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(a){this.handleError(a,null!=a?mxResources.get("errorLoadingFile"):null)}))}))}else if(a!=App.MODE_DEVICE||!Graph.fileSupport||mxClient.IS_IE||mxClient.IS_IE11){window.openNew=!1;window.openKey="open";var b=Editor.useLocalStorage;Editor.useLocalStorage=a==App.MODE_BROWSER;window.openFile=
-new OpenFile(mxUtils.bind(this,function(a){this.hideDialog(a)}));window.openFile.setConsumer(mxUtils.bind(this,function(b,c){try{this.loadLibrary(a==App.MODE_BROWSER?new StorageLibrary(this,b,c):new LocalLibrary(this,b,c))}catch(k){this.handleError(k,mxResources.get("errorLoadingFile"))}}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){Editor.useLocalStorage=b;window.openFile=null})}else{var d=document.createElement("input");
-d.setAttribute("type","file");mxEvent.addListener(d,"change",mxUtils.bind(this,function(){if(null!=d.files)for(var a=0;a<d.files.length;a++)mxUtils.bind(this,function(a){var b=new FileReader;b.onload=mxUtils.bind(this,function(b){try{this.loadLibrary(new LocalLibrary(this,b.target.result,a.name))}catch(n){this.handleError(n,mxResources.get("errorLoadingFile"))}});b.readAsText(a)})(d.files[a])}));d.click()}};
-App.prototype.saveLibrary=function(a,c,b,d,e,g,k){d=null!=d?d:this.mode;e=null!=e?e:!1;g=null!=g?g:!1;var l=this.createLibraryDataFromImages(c),n=mxUtils.bind(this,function(a){this.spinner.stop();null!=k&&k();this.handleError(a,null!=a?mxResources.get("errorSavingFile"):null)});null==b&&d==App.MODE_DEVICE&&(b=new LocalLibrary(this,l,a));if(null==b)this.pickFolder(d,mxUtils.bind(this,function(b){d==App.MODE_GOOGLE&&null!=this.drive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.drive.insertFile(a,
-l,b,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,c)}),n,this.drive.libraryMimeType):d==App.MODE_GITHUB&&null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitHub.insertLibrary(a,l,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,c)}),n,b):d==App.MODE_TRELLO&&null!=this.trello&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.trello.insertLibrary(a,l,mxUtils.bind(this,
-function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,c)}),n,b):d==App.MODE_DROPBOX&&null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.dropbox.insertLibrary(a,l,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,c)}),n,b):d==App.MODE_ONEDRIVE&&null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.oneDrive.insertLibrary(a,l,mxUtils.bind(this,function(a){this.spinner.stop();
-this.hideDialog(!0);this.libraryLoaded(a,c)}),n,b):d==App.MODE_BROWSER?(b=mxUtils.bind(this,function(){var b=new StorageLibrary(this,l,a);b.saveFile(a,!1,mxUtils.bind(this,function(){this.hideDialog(!0);this.libraryLoaded(b,c)}),n)}),null==localStorage.getItem(a)?b():this.confirm(mxResources.get("replaceIt",[a]),b)):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})}));else if(e||this.spinner.spin(document.body,mxResources.get("saving"))){b.setData(l);var f=mxUtils.bind(this,
-function(){b.save(!0,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);g||this.libraryLoaded(b,c);null!=k&&k()}),n)});if(a!=b.getTitle()){var h=b.getHash();b.rename(a,mxUtils.bind(this,function(a){b.constructor!=LocalLibrary&&h!=b.getHash()&&(mxSettings.removeCustomLibrary(h),mxSettings.addCustomLibrary(b.getHash()));this.removeLibrarySidebar(h);f()}),n)}else f()}};
-App.prototype.saveFile=function(a,c){var b=this.getCurrentFile();if(null!=b){var d=mxUtils.bind(this,function(){this.removeDraft();this.getCurrentFile()==b||b.isModified()||(b.getMode()!=App.MODE_DEVICE?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved"))):this.editor.setStatus(""));null!=c&&c()});if(a||null==b.getTitle()||null==this.mode){var e=null!=b.getTitle()?b.getTitle():this.defaultFilename,g=!mxClient.IS_IOS||!navigator.standalone,k=this.mode,l=this.getServiceCount(!0);
-isLocalStorage&&l++;var n=4>=l?2:6<l?4:3,e=new CreateDialog(this,e,mxUtils.bind(this,function(a,b){null!=a&&0<a.length&&(null==k&&b==App.MODE_DEVICE?(this.setMode(App.MODE_DEVICE),this.save(a,d)):"download"==b?(new LocalFile(this,null,a)).save():"_blank"==b?(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(this.getFileData(!0)),this.openLink(this.getUrl(window.location.pathname),null,!0)):k!=b?this.pickFolder(b,mxUtils.bind(this,function(c){this.createFile(a,
-this.getFileData(/(\.xml)$/i.test(a)||0>a.indexOf("."),/(\.svg)$/i.test(a),/(\.html)$/i.test(a)),null,b,d,null==this.mode,c)})):null!=b&&this.save(a,d))}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),null,null,g,this.isOffline()?null:"https://desk.draw.io/support/solutions/articles/16000042485",!0,n);this.showDialog(e.container,460,l>n?390:270,!0,!0);e.init()}else this.save(b.getTitle(),d)}};
+new OpenFile(mxUtils.bind(this,function(a){this.hideDialog(a)}));window.openFile.setConsumer(mxUtils.bind(this,function(b,c){try{this.loadLibrary(a==App.MODE_BROWSER?new StorageLibrary(this,b,c):new LocalLibrary(this,b,c))}catch(h){this.handleError(h,mxResources.get("errorLoadingFile"))}}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){Editor.useLocalStorage=b;window.openFile=null})}else{var d=document.createElement("input");
+d.setAttribute("type","file");mxEvent.addListener(d,"change",mxUtils.bind(this,function(){if(null!=d.files)for(var a=0;a<d.files.length;a++)mxUtils.bind(this,function(a){var b=new FileReader;b.onload=mxUtils.bind(this,function(b){try{this.loadLibrary(new LocalLibrary(this,b.target.result,a.name))}catch(m){this.handleError(m,mxResources.get("errorLoadingFile"))}});b.readAsText(a)})(d.files[a])}));d.click()}};
+App.prototype.saveLibrary=function(a,c,b,d,e,g,h){d=null!=d?d:this.mode;e=null!=e?e:!1;g=null!=g?g:!1;var l=this.createLibraryDataFromImages(c),m=mxUtils.bind(this,function(a){this.spinner.stop();null!=h&&h();this.handleError(a,null!=a?mxResources.get("errorSavingFile"):null)});null==b&&d==App.MODE_DEVICE&&(b=new LocalLibrary(this,l,a));if(null==b)this.pickFolder(d,mxUtils.bind(this,function(b){d==App.MODE_GOOGLE&&null!=this.drive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.drive.insertFile(a,
+l,b,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,c)}),m,this.drive.libraryMimeType):d==App.MODE_GITHUB&&null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitHub.insertLibrary(a,l,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,c)}),m,b):d==App.MODE_TRELLO&&null!=this.trello&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.trello.insertLibrary(a,l,mxUtils.bind(this,
+function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,c)}),m,b):d==App.MODE_DROPBOX&&null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.dropbox.insertLibrary(a,l,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,c)}),m,b):d==App.MODE_ONEDRIVE&&null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.oneDrive.insertLibrary(a,l,mxUtils.bind(this,function(a){this.spinner.stop();
+this.hideDialog(!0);this.libraryLoaded(a,c)}),m,b):d==App.MODE_BROWSER?(b=mxUtils.bind(this,function(){var b=new StorageLibrary(this,l,a);b.saveFile(a,!1,mxUtils.bind(this,function(){this.hideDialog(!0);this.libraryLoaded(b,c)}),m)}),null==localStorage.getItem(a)?b():this.confirm(mxResources.get("replaceIt",[a]),b)):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})}));else if(e||this.spinner.spin(document.body,mxResources.get("saving"))){b.setData(l);var f=mxUtils.bind(this,
+function(){b.save(!0,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);g||this.libraryLoaded(b,c);null!=h&&h()}),m)});if(a!=b.getTitle()){var k=b.getHash();b.rename(a,mxUtils.bind(this,function(a){b.constructor!=LocalLibrary&&k!=b.getHash()&&(mxSettings.removeCustomLibrary(k),mxSettings.addCustomLibrary(b.getHash()));this.removeLibrarySidebar(k);f()}),m)}else f()}};
+App.prototype.saveFile=function(a,c){var b=this.getCurrentFile();if(null!=b){var d=mxUtils.bind(this,function(){this.removeDraft();this.getCurrentFile()==b||b.isModified()||(b.getMode()!=App.MODE_DEVICE?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved"))):this.editor.setStatus(""));null!=c&&c()});if(a||null==b.getTitle()||null==this.mode){var e=null!=b.getTitle()?b.getTitle():this.defaultFilename,g=!mxClient.IS_IOS||!navigator.standalone,h=this.mode,l=this.getServiceCount(!0);
+isLocalStorage&&l++;var m=4>=l?2:6<l?4:3,e=new CreateDialog(this,e,mxUtils.bind(this,function(a,b){null!=a&&0<a.length&&(null==h&&b==App.MODE_DEVICE?(this.setMode(App.MODE_DEVICE),this.save(a,d)):"download"==b?(new LocalFile(this,null,a)).save():"_blank"==b?(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(this.getFileData(!0)),this.openLink(this.getUrl(window.location.pathname),null,!0)):h!=b?this.pickFolder(b,mxUtils.bind(this,function(c){this.createFile(a,
+this.getFileData(/(\.xml)$/i.test(a)||0>a.indexOf("."),/(\.svg)$/i.test(a),/(\.html)$/i.test(a)),null,b,d,null==this.mode,c)})):null!=b&&this.save(a,d))}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),null,null,g,this.isOffline()?null:"https://desk.draw.io/support/solutions/articles/16000042485",!0,m);this.showDialog(e.container,460,l>m?390:270,!0,!0);e.init()}else this.save(b.getTitle(),d)}};
App.prototype.loadTemplate=function(a,c,b){var d=a;this.isCorsEnabledForUrl(d)||(d="t="+(new Date).getTime(),d=PROXY_URL+"?url="+encodeURIComponent(a)+"&"+d);this.loadUrl(d,mxUtils.bind(this,function(d){/(\.vsdx)($|\?)/i.test(a)?this.importVisio(this.base64ToBlob(d.substring(d.indexOf(",")+1)),function(a){c(a)},b,a):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,a)?this.parseFile(new Blob([d],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&
200<=a.status&&299>=a.status&&"<mxGraphModel"==a.responseText.substring(0,13)&&c(a.responseText)}),a):this.isLucidChartData(d)?this.convertLucidChart(d,mxUtils.bind(this,function(a){c(a)}),mxUtils.bind(this,function(a){b(a)})):(/(\.png)($|\?)/i.test(a)&&(d=this.extractGraphModelFromPng(d)),c(d))}),b,/(\.png)($|\?)/i.test(a)||/(\.vsdx)($|\?)/i.test(a))};
App.prototype.getPeerForMode=function(a){return a==App.MODE_GOOGLE?this.drive:a==App.MODE_GITHUB?this.gitHub:a==App.MODE_DROPBOX?this.dropbox:a==App.MODE_ONEDRIVE?this.oneDrive:a==App.MODE_TRELLO?this.trello:null};
-App.prototype.createFile=function(a,c,b,d,e,g,k,l){d=l?null:null!=d?d:this.mode;if(null!=a&&this.spinner.spin(document.body,mxResources.get("inserting"))){c=null!=c?c:this.emptyDiagramXml;var n=mxUtils.bind(this,function(){this.spinner.stop()}),f=mxUtils.bind(this,function(a){n();null==a&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():null!=a&&this.handleError(a)});try{if(d==App.MODE_GOOGLE&&null!=this.drive)null==k&&null!=this.stateArg&&null!=this.stateArg.folderId&&(k=this.stateArg.folderId),
-this.drive.insertFile(a,c,k,mxUtils.bind(this,function(a){n();this.fileCreated(a,b,g,e)}),f);else if(d==App.MODE_GITHUB&&null!=this.gitHub)this.gitHub.insertFile(a,c,mxUtils.bind(this,function(a){n();this.fileCreated(a,b,g,e)}),f,!1,k);else if(d==App.MODE_TRELLO&&null!=this.trello)this.trello.insertFile(a,c,mxUtils.bind(this,function(a){n();this.fileCreated(a,b,g,e)}),f,!1,k);else if(d==App.MODE_DROPBOX&&null!=this.dropbox)this.dropbox.insertFile(a,c,mxUtils.bind(this,function(a){n();this.fileCreated(a,
-b,g,e)}),f);else if(d==App.MODE_ONEDRIVE&&null!=this.oneDrive)this.oneDrive.insertFile(a,c,mxUtils.bind(this,function(a){n();this.fileCreated(a,b,g,e)}),f,!1,k);else if(d==App.MODE_BROWSER){n();var h=mxUtils.bind(this,function(){var d=new StorageFile(this,c,a);d.saveFile(a,!1,mxUtils.bind(this,function(){this.fileCreated(d,b,g,e)}),f)});null==localStorage.getItem(a)?h():this.confirm(mxResources.get("replaceIt",[a]),h,mxUtils.bind(this,function(){null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))}else n(),
-this.fileCreated(new LocalFile(this,c,a,null==d),b,g,e)}catch(m){n(),this.handleError(m)}}};
-App.prototype.fileCreated=function(a,c,b,d){var e=window.location.pathname;null!=c&&0<c.length&&(e+="?libs="+c);e=this.getUrl(e);a.getMode()!=App.MODE_DEVICE&&(e+="#"+a.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var g=a.getData(),g=0<g.length?this.editor.extractGraphModel(mxUtils.parseXml(g).documentElement,!0):null,k=window.location.protocol+"//"+window.location.hostname+e,l=g,n=null;null!=g&&/\.svg$/i.test(a.getTitle())&&(n=this.createTemporaryGraph(this.editor.graph.getStylesheet()),
-document.body.appendChild(n.container),l=this.decodeNodeIntoGraph(l,n));a.setData(this.createFileData(g,n,a,k));null!=n&&n.container.parentNode.removeChild(n.container);var f=mxUtils.bind(this,function(){this.spinner.stop()}),h=mxUtils.bind(this,function(){f();var g=this.getCurrentFile();null==b&&null!=g&&(b=!g.isModified()&&null==g.getMode());var h=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(a);b&&a.addAllSavedStatus();null!=c&&this.sidebar.showEntries(c)}),k=mxUtils.bind(this,
-function(){b||null==g||!g.isModified()?h():this.confirm(mxResources.get("allChangesLost"),null,h,mxResources.get("cancel"),mxResources.get("discardChanges"))});null!=d&&d();null==b||b?k():(a.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(a.getData(),a.getTitle(),null==a.getMode())),null!=d&&d(),window.openWindow(e,null,k))});a.constructor==LocalFile?h():a.saveFile(a.getTitle(),!1,mxUtils.bind(this,function(){h()}),mxUtils.bind(this,
+App.prototype.createFile=function(a,c,b,d,e,g,h,l){d=l?null:null!=d?d:this.mode;if(null!=a&&this.spinner.spin(document.body,mxResources.get("inserting"))){c=null!=c?c:this.emptyDiagramXml;var m=mxUtils.bind(this,function(){this.spinner.stop()}),f=mxUtils.bind(this,function(a){m();null==a&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():null!=a&&this.handleError(a)});try{if(d==App.MODE_GOOGLE&&null!=this.drive)null==h&&null!=this.stateArg&&null!=this.stateArg.folderId&&(h=this.stateArg.folderId),
+this.drive.insertFile(a,c,h,mxUtils.bind(this,function(a){m();this.fileCreated(a,b,g,e)}),f);else if(d==App.MODE_GITHUB&&null!=this.gitHub)this.gitHub.insertFile(a,c,mxUtils.bind(this,function(a){m();this.fileCreated(a,b,g,e)}),f,!1,h);else if(d==App.MODE_TRELLO&&null!=this.trello)this.trello.insertFile(a,c,mxUtils.bind(this,function(a){m();this.fileCreated(a,b,g,e)}),f,!1,h);else if(d==App.MODE_DROPBOX&&null!=this.dropbox)this.dropbox.insertFile(a,c,mxUtils.bind(this,function(a){m();this.fileCreated(a,
+b,g,e)}),f);else if(d==App.MODE_ONEDRIVE&&null!=this.oneDrive)this.oneDrive.insertFile(a,c,mxUtils.bind(this,function(a){m();this.fileCreated(a,b,g,e)}),f,!1,h);else if(d==App.MODE_BROWSER){m();var k=mxUtils.bind(this,function(){var d=new StorageFile(this,c,a);d.saveFile(a,!1,mxUtils.bind(this,function(){this.fileCreated(d,b,g,e)}),f)});null==localStorage.getItem(a)?k():this.confirm(mxResources.get("replaceIt",[a]),k,mxUtils.bind(this,function(){null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))}else m(),
+this.fileCreated(new LocalFile(this,c,a,null==d),b,g,e)}catch(n){m(),this.handleError(n)}}};
+App.prototype.fileCreated=function(a,c,b,d){var e=window.location.pathname;null!=c&&0<c.length&&(e+="?libs="+c);e=this.getUrl(e);a.getMode()!=App.MODE_DEVICE&&(e+="#"+a.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var g=a.getData(),g=0<g.length?this.editor.extractGraphModel(mxUtils.parseXml(g).documentElement,!0):null,h=window.location.protocol+"//"+window.location.hostname+e,l=g,m=null;null!=g&&/\.svg$/i.test(a.getTitle())&&(m=this.createTemporaryGraph(this.editor.graph.getStylesheet()),
+document.body.appendChild(m.container),l=this.decodeNodeIntoGraph(l,m));a.setData(this.createFileData(g,m,a,h));null!=m&&m.container.parentNode.removeChild(m.container);var f=mxUtils.bind(this,function(){this.spinner.stop()}),k=mxUtils.bind(this,function(){f();var g=this.getCurrentFile();null==b&&null!=g&&(b=!g.isModified()&&null==g.getMode());var h=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(a);b&&a.addAllSavedStatus();null!=c&&this.sidebar.showEntries(c)}),k=mxUtils.bind(this,
+function(){b||null==g||!g.isModified()?h():this.confirm(mxResources.get("allChangesLost"),null,h,mxResources.get("cancel"),mxResources.get("discardChanges"))});null!=d&&d();null==b||b?k():(a.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(a.getData(),a.getTitle(),null==a.getMode())),null!=d&&d(),window.openWindow(e,null,k))});a.constructor==LocalFile?k():a.saveFile(a.getTitle(),!1,mxUtils.bind(this,function(){k()}),mxUtils.bind(this,
function(a){f();this.handleError(a)}))}};
-App.prototype.loadFile=function(a,c,b,d,e){this.hideDialog();var g=mxUtils.bind(this,function(){if(null==a||0==a.length)this.editor.setStatus(""),this.fileLoaded(null);else if(this.spinner.spin(document.body,mxResources.get("loading")))if("L"==a.charAt(0))if(this.spinner.stop(),isLocalStorage)try{a=decodeURIComponent(a.substring(1));var e=localStorage.getItem(a);if(null!=e)this.fileLoaded(new StorageFile(this,e,a)),null!=d&&d();else throw{message:mxResources.get("fileNotFound")};}catch(m){this.handleError(m,
+App.prototype.loadFile=function(a,c,b,d,e){this.hideDialog();var g=mxUtils.bind(this,function(){if(null==a||0==a.length)this.editor.setStatus(""),this.fileLoaded(null);else if(this.spinner.spin(document.body,mxResources.get("loading")))if("L"==a.charAt(0))if(this.spinner.stop(),isLocalStorage)try{a=decodeURIComponent(a.substring(1));var e=localStorage.getItem(a);if(null!=e)this.fileLoaded(new StorageFile(this,e,a)),null!=d&&d();else throw{message:mxResources.get("fileNotFound")};}catch(n){this.handleError(n,
mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=a?a.getHash():""}))}else this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=a?a.getHash():""}));else if(null!=b)this.spinner.stop(),this.fileLoaded(b),null!=d&&d();else if("S"==a.charAt(0)){this.spinner.stop();try{this.loadDescriptor(JSON.parse(this.editor.graph.decompress(a.substring(1))),
-d,mxUtils.bind(this,function(a){this.handleError(a,mxResources.get("errorLoadingFile"))}))}catch(m){this.handleError(m,mxResources.get("errorLoadingFile"))}}else if("R"==a.charAt(0))this.spinner.stop(),e=decodeURIComponent(a.substring(1)),"<"!=e.charAt(0)&&(e=this.editor.graph.decompress(e)),e=new LocalFile(this,e,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0),e.getHash=function(){return a},this.fileLoaded(e),null!=d&&d();else if("U"==a.charAt(0)){var f=decodeURIComponent(a.substring(1)),
+d,mxUtils.bind(this,function(a){this.handleError(a,mxResources.get("errorLoadingFile"))}))}catch(n){this.handleError(n,mxResources.get("errorLoadingFile"))}}else if("R"==a.charAt(0))this.spinner.stop(),e=decodeURIComponent(a.substring(1)),"<"!=e.charAt(0)&&(e=this.editor.graph.decompress(e)),e=new LocalFile(this,e,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0),e.getHash=function(){return a},this.fileLoaded(e),null!=d&&d();else if("U"==a.charAt(0)){var f=decodeURIComponent(a.substring(1)),
g=mxUtils.bind(this,function(){if("https://drive.google.com/uc?id="!=f.substring(0,31)||null==this.drive&&"function"!==typeof window.DriveClient)return!1;this.hideDialog();var a=mxUtils.bind(this,function(){this.spinner.stop();return null!=this.drive?(this.loadFile("G"+f.substring(31,f.lastIndexOf("&ex")),c,d),!0):!1});!a()&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.addListener("clientLoaded",a);return!0});this.loadTemplate(f,mxUtils.bind(this,function(b){this.spinner.stop();
if(null!=b&&0<b.length){var c=this.defaultFilename;if(null==urlParams.title&&"1"!=urlParams.notitle){var d=f,e=f.lastIndexOf("."),h=d.lastIndexOf("/");e>h&&0<h&&(d=d.substring(h+1,e),e=f.substring(e),this.useCanvasForExport||".png"!=e||(e=".xml"),".svg"===e||".xml"===e||".html"===e||".png"===e)&&(c=d+e)}b=new LocalFile(this,b,null!=urlParams.title?decodeURIComponent(urlParams.title):c,!0);b.getHash=function(){return a};this.fileLoaded(b)||g()}}),mxUtils.bind(this,function(){g()||(this.spinner.stop(),
this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile")))}))}else e=null,"G"==a.charAt(0)?e=this.drive:"D"==a.charAt(0)?e=this.dropbox:"W"==a.charAt(0)?e=this.oneDrive:"H"==a.charAt(0)?e=this.gitHub:"T"==a.charAt(0)&&(e=this.trello),null==e?this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=a?a.getHash():""})):(a=decodeURIComponent(a.substring(1)),
-e.getFile(a,mxUtils.bind(this,function(a){this.spinner.stop();this.fileLoaded(a);null!=d&&d()}),mxUtils.bind(this,function(b){null!=window.console&&null!=b&&console.log("error in loadFile:",a,b);this.handleError(b,null!=b?mxResources.get("errorLoadingFile"):null,mxUtils.bind(this,function(){var a=this.getCurrentFile();null==a?(window.location.hash="",this.showSplash()):window.location.hash=a.getHash()}))})))}),k=this.getCurrentFile(),l=mxUtils.bind(this,function(){e||null==k||!k.isModified()?g():
-this.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){null!=k&&(window.location.hash=k.getHash())}),g,mxResources.get("cancel"),mxResources.get("discardChanges"))});null==a||0==a.length?l():null!=k&&k.isModified()&&!c?window.openWindow(this.getUrl()+"#"+a,null,l):l()};
+e.getFile(a,mxUtils.bind(this,function(a){this.spinner.stop();this.fileLoaded(a);null!=d&&d()}),mxUtils.bind(this,function(b){null!=window.console&&null!=b&&console.log("error in loadFile:",a,b);this.handleError(b,null!=b?mxResources.get("errorLoadingFile"):null,mxUtils.bind(this,function(){var a=this.getCurrentFile();null==a?(window.location.hash="",this.showSplash()):window.location.hash=a.getHash()}))})))}),h=this.getCurrentFile(),l=mxUtils.bind(this,function(){e||null==h||!h.isModified()?g():
+this.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){null!=h&&(window.location.hash=h.getHash())}),g,mxResources.get("cancel"),mxResources.get("discardChanges"))});null==a||0==a.length?l():null!=h&&h.isModified()&&!c?window.openWindow(this.getUrl()+"#"+a,null,l):l()};
App.prototype.getLibraryStorageHint=function(a){var c=a.getTitle();a.constructor!=LocalLibrary&&(c+="\n"+a.getHash());a.constructor==DriveLibrary?c+=" ("+mxResources.get("googleDrive")+")":a.constructor==GitHubLibrary?c+=" ("+mxResources.get("github")+")":a.constructor==TrelloLibrary?c+=" ("+mxResources.get("trello")+")":a.constructor==DropboxLibrary?c+=" ("+mxResources.get("dropbox")+")":a.constructor==OneDriveLibrary?c+=" ("+mxResources.get("oneDrive")+")":a.constructor==StorageLibrary?c+=" ("+
mxResources.get("browser")+")":a.constructor==LocalLibrary&&(c+=" ("+mxResources.get("device")+")");return c};
-App.prototype.restoreLibraries=function(){if(null!=this.sidebar){null==this.pendingLibraries&&(this.pendingLibraries={});var a=mxUtils.bind(this,function(a,c){c||mxSettings.removeCustomLibrary(a);delete this.pendingLibraries[a]}),c=mxUtils.bind(this,function(b,c){var d=0,g=[],k=mxUtils.bind(this,function(){if(0==d){if(null!=b)for(var a=b.length-1;0<=a;a--)null!=g[a]&&this.loadLibrary(g[a]);null!=c&&c()}});if(null!=b)for(var l=0;l<b.length;l++){var n=encodeURIComponent(decodeURIComponent(b[l]));mxUtils.bind(this,
-function(b,c){if(null!=b&&0<b.length&&null==this.pendingLibraries[b]&&null==this.sidebar.palettes[b]){d++;var e=mxUtils.bind(this,function(a){delete this.pendingLibraries[b];g[c]=a;d--;k()}),f=mxUtils.bind(this,function(c){a(b,c);d--;k()});this.pendingLibraries[b]=!0;var h=b.substring(0,1);if("L"==h)(isLocalStorage||mxClient.IS_CHROMEAPP)&&window.setTimeout(mxUtils.bind(this,function(){try{var a=decodeURIComponent(b.substring(1));this.getLocalData(a,mxUtils.bind(this,function(b){".scratchpad"==a&&
-null==b&&(b=this.emptyLibraryXml);null!=b?e(new StorageLibrary(this,b,a)):f()}))}catch(t){f()}}),0);else if("U"==h){var l=decodeURIComponent(b.substring(1));if(!this.isOffline()){h=l;this.isCorsEnabledForUrl(h)||(h="t="+(new Date).getTime(),h=PROXY_URL+"?url="+encodeURIComponent(l)+"&"+h);try{mxUtils.get(h,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus())try{e(new UrlLibrary(this,a.getText(),l))}catch(t){f()}else f()}),function(){f()})}catch(x){f()}}}else{var n=null;"G"==h?
-null!=this.drive&&null!=this.drive.user&&(n=this.drive):"H"==h?null!=this.gitHub&&null!=this.gitHub.getUser()&&(n=this.gitHub):"T"==h?null!=this.trello&&this.trello.isAuthorized()&&(n=this.trello):"D"==h?null!=this.dropbox&&null!=this.dropbox.getUser()&&(n=this.dropbox):"W"==h&&null!=this.oneDrive&&null!=this.oneDrive.getUser()&&(n=this.oneDrive);null!=n?n.getLibrary(decodeURIComponent(b.substring(1)),mxUtils.bind(this,function(a){try{e(a)}catch(t){f()}}),function(a){f()}):f(!0)}}})(n,l)}k()});c(mxSettings.getCustomLibraries(),
+App.prototype.restoreLibraries=function(){if(null!=this.sidebar){null==this.pendingLibraries&&(this.pendingLibraries={});var a=mxUtils.bind(this,function(a,c){c||mxSettings.removeCustomLibrary(a);delete this.pendingLibraries[a]}),c=mxUtils.bind(this,function(b,c){var d=0,g=[],h=mxUtils.bind(this,function(){if(0==d){if(null!=b)for(var a=b.length-1;0<=a;a--)null!=g[a]&&this.loadLibrary(g[a]);null!=c&&c()}});if(null!=b)for(var l=0;l<b.length;l++){var m=encodeURIComponent(decodeURIComponent(b[l]));mxUtils.bind(this,
+function(b,c){if(null!=b&&0<b.length&&null==this.pendingLibraries[b]&&null==this.sidebar.palettes[b]){d++;var e=mxUtils.bind(this,function(a){delete this.pendingLibraries[b];g[c]=a;d--;h()}),f=mxUtils.bind(this,function(c){a(b,c);d--;h()});this.pendingLibraries[b]=!0;var k=b.substring(0,1);if("L"==k)(isLocalStorage||mxClient.IS_CHROMEAPP)&&window.setTimeout(mxUtils.bind(this,function(){try{var a=decodeURIComponent(b.substring(1));this.getLocalData(a,mxUtils.bind(this,function(b){".scratchpad"==a&&
+null==b&&(b=this.emptyLibraryXml);null!=b?e(new StorageLibrary(this,b,a)):f()}))}catch(t){f()}}),0);else if("U"==k){var l=decodeURIComponent(b.substring(1));if(!this.isOffline()){k=l;this.isCorsEnabledForUrl(k)||(k="t="+(new Date).getTime(),k=PROXY_URL+"?url="+encodeURIComponent(l)+"&"+k);try{mxUtils.get(k,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus())try{e(new UrlLibrary(this,a.getText(),l))}catch(t){f()}else f()}),function(){f()})}catch(x){f()}}}else{var m=null;"G"==k?
+null!=this.drive&&null!=this.drive.user&&(m=this.drive):"H"==k?null!=this.gitHub&&null!=this.gitHub.getUser()&&(m=this.gitHub):"T"==k?null!=this.trello&&this.trello.isAuthorized()&&(m=this.trello):"D"==k?null!=this.dropbox&&null!=this.dropbox.getUser()&&(m=this.dropbox):"W"==k&&null!=this.oneDrive&&null!=this.oneDrive.getUser()&&(m=this.oneDrive);null!=m?m.getLibrary(decodeURIComponent(b.substring(1)),mxUtils.bind(this,function(a){try{e(a)}catch(t){f()}}),function(a){f()}):f(!0)}}})(m,l)}h()});c(mxSettings.getCustomLibraries(),
function(){c((urlParams.clibs||"").split(";"))})}};
App.prototype.updateButtonContainer=function(){if(null!=this.buttonContainer){var a=this.getCurrentFile();if(null!=a&&("manual"==DrawioFile.SYNC||"auto"==DrawioFile.SYNC)){var c=("manual"==DrawioFile.SYNC||null!=a.sync&&!a.sync.enabled&&"min"!=uiTheme)&&(a.constructor==DriveFile||a.constructor==OneDriveFile)||a.constructor==GitHubFile||EditorUi.isElectronApp;null==this.syncButton&&c?(this.syncButton=document.createElement("div"),this.syncButton.className="geBtn gePrimaryBtn",this.syncButton.style.display=
"inline-block",this.syncButton.style.padding="0 10px 0 10px",this.syncButton.style.marginTop="-4px",this.syncButton.style.height="28px",this.syncButton.style.lineHeight="28px",this.syncButton.style.minWidth="0px",this.syncButton.style.cssFloat="left",this.syncButton.setAttribute("title",mxResources.get("synchronize")+" (Alt+Shift+S)"),mxUtils.write(this.syncButton,mxResources.get("synchronize")),mxEvent.addListener(this.syncButton,"click",mxUtils.bind(this,function(){this.actions.get("synchronize").funct()})),
@@ -8631,10 +8632,10 @@ function(){this.spinner.stop()}),mxUtils.bind(this,function(a){this.spinner.stop
b():this.confirm(mxResources.get("replaceIt",[c]),b))};
App.prototype.descriptorChanged=function(){var a=this.getCurrentFile();if(null!=a){if(null!=this.fname){this.fnameWrapper.style.display="block";this.fname.innerHTML="";var c=null!=a.getTitle()?a.getTitle():this.defaultFilename;mxUtils.write(this.fname,c);this.fname.setAttribute("title",c+" - "+mxResources.get("rename"))}var c=this.editor.graph,b=a.isEditable()&&!a.invalidChecksum;c.isEnabled()&&!b&&c.reset();c.setEnabled(b);null==urlParams.rev&&(this.updateDocumentTitle(),a=a.getHash(),0<a.length?
window.location.hash=a:0<window.location.hash.length&&(window.location.hash=""))}this.updateUi();null!=this.format&&this.format.refresh()};
-App.prototype.showAuthDialog=function(a,c,b,d){var e=this.spinner.pause();this.showDialog((new AuthDialog(this,a,c,mxUtils.bind(this,function(a){try{null!=b&&b(a,mxUtils.bind(this,function(){this.hideDialog();e()}))}catch(k){this.editor.setStatus(mxUtils.htmlEntities(k.message))}}))).container,300,c?180:140,!0,!0,mxUtils.bind(this,function(a){null!=d&&d();a&&null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))};
-App.prototype.convertFile=function(a,c,b,d,e,g){var k=c;/\.svg$/i.test(k)||(k=k.substring(0,c.lastIndexOf("."))+d);var l=!1;null!=this.gitHub&&a.substring(0,this.gitHub.baseUrl.length)==this.gitHub.baseUrl&&(l=!0);if(/\.v(dx|sdx?)$/i.test(c)&&Graph.fileSupport&&(new XMLHttpRequest).upload&&"string"===typeof(new XMLHttpRequest).responseType){var n=new XMLHttpRequest;n.open("GET",a,!0);l||(n.responseType="blob");n.onload=mxUtils.bind(this,function(){var a=null;l?(a=JSON.parse(n.responseText),a=this.base64ToBlob(a.content,
-"application/octet-stream")):a=new Blob([n.response],{type:"application/octet-stream"});this.importVisio(a,mxUtils.bind(this,function(a){e(new LocalFile(this,a,k,!0))}),g,c)});n.send()}else{var f=mxUtils.bind(this,function(b){try{/\.png$/i.test(c)?(temp=this.extractGraphModelFromPng(b),null!=temp?e(new LocalFile(this,temp,k,!0)):e(new LocalFile(this,b,c,!0))):Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b,a)?this.parseFile(new Blob([b],{type:"application/octet-stream"}),
-mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?e(new LocalFile(this,a.responseText,k,!0)):null!=g&&g({message:mxResources.get("errorLoadingFile")}))}),c):e(new LocalFile(this,b,k,!0))}catch(m){null!=g&&g(m)}});b=/\.png$/i.test(c)||/\.jpe?g$/i.test(c)||null!=b&&"image/"==b.substring(0,6);l?mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=e){a=JSON.parse(a.getText());var b=a.content;"base64"===a.encoding&&(b=/\.png$/i.test(c)?
+App.prototype.showAuthDialog=function(a,c,b,d){var e=this.spinner.pause();this.showDialog((new AuthDialog(this,a,c,mxUtils.bind(this,function(a){try{null!=b&&b(a,mxUtils.bind(this,function(){this.hideDialog();e()}))}catch(h){this.editor.setStatus(mxUtils.htmlEntities(h.message))}}))).container,300,c?180:140,!0,!0,mxUtils.bind(this,function(a){null!=d&&d();a&&null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))};
+App.prototype.convertFile=function(a,c,b,d,e,g){var h=c;/\.svg$/i.test(h)||(h=h.substring(0,c.lastIndexOf("."))+d);var l=!1;null!=this.gitHub&&a.substring(0,this.gitHub.baseUrl.length)==this.gitHub.baseUrl&&(l=!0);if(/\.v(dx|sdx?)$/i.test(c)&&Graph.fileSupport&&(new XMLHttpRequest).upload&&"string"===typeof(new XMLHttpRequest).responseType){var m=new XMLHttpRequest;m.open("GET",a,!0);l||(m.responseType="blob");m.onload=mxUtils.bind(this,function(){var a=null;l?(a=JSON.parse(m.responseText),a=this.base64ToBlob(a.content,
+"application/octet-stream")):a=new Blob([m.response],{type:"application/octet-stream"});this.importVisio(a,mxUtils.bind(this,function(a){e(new LocalFile(this,a,h,!0))}),g,c)});m.send()}else{var f=mxUtils.bind(this,function(b){try{/\.png$/i.test(c)?(temp=this.extractGraphModelFromPng(b),null!=temp?e(new LocalFile(this,temp,h,!0)):e(new LocalFile(this,b,c,!0))):Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b,a)?this.parseFile(new Blob([b],{type:"application/octet-stream"}),
+mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?e(new LocalFile(this,a.responseText,h,!0)):null!=g&&g({message:mxResources.get("errorLoadingFile")}))}),c):e(new LocalFile(this,b,h,!0))}catch(n){null!=g&&g(n)}});b=/\.png$/i.test(c)||/\.jpe?g$/i.test(c)||null!=b&&"image/"==b.substring(0,6);l?mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=e){a=JSON.parse(a.getText());var b=a.content;"base64"===a.encoding&&(b=/\.png$/i.test(c)?
"data:image/png;base64,"+b:!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(b):atob(b));f(b)}}else null!=g&&g({code:App.ERROR_UNKNOWN})}),function(){null!=g&&g({code:App.ERROR_UNKNOWN})},!1,this.timeout,function(){null!=g&&g({code:App.ERROR_TIMEOUT,retry:fn})}):this.loadUrl(a,f,g,b)}};
App.prototype.updateHeader=function(){if(null!=this.menubar){this.appIcon=document.createElement("a");this.appIcon.style.display="block";this.appIcon.style.position="absolute";this.appIcon.style.width="40px";this.appIcon.style.backgroundColor="#f18808";this.appIcon.style.height=this.menubarHeight+"px";mxEvent.disableContextMenu(this.appIcon);mxEvent.addListener(this.appIcon,"click",mxUtils.bind(this,function(a){this.appIconClicked(a)}));var a=mxClient.IS_SVG?"url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIKICAgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMzA2LjE4NSAxMjAuMjk2IgogICB2aWV3Qm94PSIyNCAyNiA2OCA2OCIKICAgeT0iMHB4IgogICB4PSIwcHgiCiAgIHZlcnNpb249IjEuMSI+CiAgIAkgPGc+PGxpbmUKICAgICAgIHkyPSI3Mi4zOTQiCiAgICAgICB4Mj0iNDEuMDYxIgogICAgICAgeTE9IjQzLjM4NCIKICAgICAgIHgxPSI1OC4wNjkiCiAgICAgICBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiCiAgICAgICBzdHJva2Utd2lkdGg9IjMuNTUyOCIKICAgICAgIHN0cm9rZT0iI0ZGRkZGRiIKICAgICAgIGZpbGw9Im5vbmUiIC8+PGxpbmUKICAgICAgIHkyPSI3Mi4zOTQiCiAgICAgICB4Mj0iNzUuMDc2IgogICAgICAgeTE9IjQzLjM4NCIKICAgICAgIHgxPSI1OC4wNjgiCiAgICAgICBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiCiAgICAgICBzdHJva2Utd2lkdGg9IjMuNTAwOCIKICAgICAgIHN0cm9rZT0iI0ZGRkZGRiIKICAgICAgIGZpbGw9Im5vbmUiIC8+PGc+PHBhdGgKICAgICAgICAgZD0iTTUyLjc3Myw3Ny4wODRjMCwxLjk1NC0xLjU5OSwzLjU1My0zLjU1MywzLjU1M0gzNi45OTljLTEuOTU0LDAtMy41NTMtMS41OTktMy41NTMtMy41NTN2LTkuMzc5ICAgIGMwLTEuOTU0LDEuNTk5LTMuNTUzLDMuNTUzLTMuNTUzaDEyLjIyMmMxLjk1NCwwLDMuNTUzLDEuNTk5LDMuNTUzLDMuNTUzVjc3LjA4NHoiCiAgICAgICAgIGZpbGw9IiNGRkZGRkYiIC8+PC9nPjxnCiAgICAgICBpZD0iZzM0MTkiPjxwYXRoCiAgICAgICAgIGQ9Ik02Ny43NjIsNDguMDc0YzAsMS45NTQtMS41OTksMy41NTMtMy41NTMsMy41NTNINTEuOTg4Yy0xLjk1NCwwLTMuNTUzLTEuNTk5LTMuNTUzLTMuNTUzdi05LjM3OSAgICBjMC0xLjk1NCwxLjU5OS0zLjU1MywzLjU1My0zLjU1M0g2NC4yMWMxLjk1NCwwLDMuNTUzLDEuNTk5LDMuNTUzLDMuNTUzVjQ4LjA3NHoiCiAgICAgICAgIGZpbGw9IiNGRkZGRkYiIC8+PC9nPjxnPjxwYXRoCiAgICAgICAgIGQ9Ik04Mi43NTIsNzcuMDg0YzAsMS45NTQtMS41OTksMy41NTMtMy41NTMsMy41NTNINjYuOTc3Yy0xLjk1NCwwLTMuNTUzLTEuNTk5LTMuNTUzLTMuNTUzdi05LjM3OSAgICBjMC0xLjk1NCwxLjU5OS0zLjU1MywzLjU1My0zLjU1M2gxMi4yMjJjMS45NTQsMCwzLjU1MywxLjU5OSwzLjU1MywzLjU1M1Y3Ny4wODR6IgogICAgICAgICBmaWxsPSIjRkZGRkZGIiAvPjwvZz48L2c+PC9zdmc+)":
"url('"+IMAGE_PATH+"/logo-white.png')";this.appIcon.style.backgroundImage=a;this.appIcon.style.backgroundPosition="center center";this.appIcon.style.backgroundRepeat="no-repeat";mxUtils.setPrefixedStyle(this.appIcon.style,"transition","all 125ms linear");mxEvent.addListener(this.appIcon,"mouseover",mxUtils.bind(this,function(){var a=this.getCurrentFile();null!=a&&(a=a.getMode(),a==App.MODE_GOOGLE?this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/google-drive-logo-white.svg)":a==App.MODE_DROPBOX?
@@ -8670,8 +8671,8 @@ mxUtils.bind(this,function(){this.gitHub.logout();window.location.hash=""});a.is
null==this.userPanel||null==this.userPanel.parentNode||this.userPanel.parentNode.removeChild(this.userPanel)})));var a=null;null!=this.drive&&null!=this.drive.getUser()?a=this.drive.getUser():null!=this.oneDrive&&null!=this.oneDrive.getUser()?a=this.oneDrive.getUser():null!=this.dropbox&&null!=this.dropbox.getUser()?a=this.dropbox.getUser():null!=this.gitHub&&null!=this.gitHub.getUser()&&(a=this.gitHub.getUser());null!=a?(this.userElement.innerHTML="",560<screen.width&&(mxUtils.write(this.userElement,
a.displayName),this.userElement.style.display="block")):this.userElement.style.display="none"}else null!=this.userElement&&(this.userElement.parentNode.removeChild(this.userElement),this.userElement=null)};var editorResetGraph=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){editorResetGraph.apply(this,arguments);this.graph.pageFormat=mxSettings.getPageFormat()};(function(){var a=mxPopupMenu.prototype.showMenu;mxPopupMenu.prototype.showMenu=function(){a.apply(this,arguments);this.div.style.overflowY="auto";this.div.style.overflowX="hidden";this.div.style.maxHeight=Math.max(document.body.clientHeight,document.documentElement.clientHeight)-10+"px"};Menus.prototype.createHelpLink=function(a){var b=document.createElement("span");b.setAttribute("title",mxResources.get("help"));b.style.cssText="color:blue;text-decoration:underline;margin-left:8px;cursor:help;";
var c=document.createElement("img");mxUtils.setOpacity(c,50);c.style.height="16px";c.style.width="16px";c.setAttribute("border","0");c.setAttribute("valign","bottom");c.setAttribute("src",Editor.helpImage);b.appendChild(c);mxEvent.addGestureListeners(b,mxUtils.bind(this,function(b){null!=this.editorUi.menubar&&this.editorUi.menubar.hideMenu();this.editorUi.openLink(a);mxEvent.consume(b)}));return b};Menus.prototype.addLinkToItem=function(a,c){null!=a&&a.firstChild.nextSibling.appendChild(this.createHelpLink(c))};
-var c=Menus.prototype.init;Menus.prototype.init=function(){c.apply(this,arguments);var a=this.editorUi,d=a.editor.graph,e=mxUtils.bind(d,d.isEnabled),g=("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&mxClient.IS_SVG&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode),k=("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode),l=("www.draw.io"==
-window.location.hostname||"test.draw.io"==window.location.hostname||"drive.draw.io"==window.location.hostname||"legacy.draw.io"==window.location.hostname)&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&!navigator.userAgent.match(/(iPad|iPhone|iPod)/g)&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode),n=("1"!=urlParams.embed&&"0"!=urlParams.tr||"1"==urlParams.embed&&"1"==urlParams.tr)&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode);
+var c=Menus.prototype.init;Menus.prototype.init=function(){c.apply(this,arguments);var a=this.editorUi,d=a.editor.graph,e=mxUtils.bind(d,d.isEnabled),g=("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&mxClient.IS_SVG&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode),h=("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode),l=("www.draw.io"==
+window.location.hostname||"test.draw.io"==window.location.hostname||"drive.draw.io"==window.location.hostname||"legacy.draw.io"==window.location.hostname)&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&!navigator.userAgent.match(/(iPad|iPhone|iPod)/g)&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode),m=("1"!=urlParams.embed&&"0"!=urlParams.tr||"1"==urlParams.embed&&"1"==urlParams.tr)&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode);
mxClient.IS_SVG||a.isOffline()||((new Image).src=IMAGE_PATH+"/help.png");a.actions.addAction("new...",function(){var b=a.isOffline(),c=new NewDialog(a,b);a.showDialog(c.container,b?350:620,b?70:440,!0,!0,function(b){b&&null==a.getCurrentFile()&&a.showSplash()});c.init()});a.actions.put("exportSvg",new Action(mxResources.get("formatSvg")+"...",function(){a.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,
function(b,c,d,e,f,g,h,k,l,m){b=parseInt(b);!isNaN(b)&&0<b&&a.exportSvg(b/100,c,d,e,f,g,h,!k,l,m)}),!0,null,"svg")}));a.actions.put("exportXml",new Action(mxResources.get("formatXml")+"...",function(){var b=document.createElement("div");b.style.whiteSpace="nowrap";var c=null==a.pages||1>=a.pages.length,e=document.createElement("h3");mxUtils.write(e,mxResources.get("formatXml"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";b.appendChild(e);var f=a.addCheckbox(b,mxResources.get("selectionOnly"),
!1,d.isSelectionEmpty()),g=a.addCheckbox(b,mxResources.get(c?"compressed":"allPages"),!0);g.style.marginBottom="16px";mxEvent.addListener(f,"change",function(){f.checked?g.setAttribute("disabled","disabled"):g.removeAttribute("disabled")});b=new CustomDialog(a,b,mxUtils.bind(this,function(){a.downloadFile("xml",c?!g.checked:null,null,!f.checked,c?null:!g.checked)}),null,mxResources.get("export"));a.showDialog(b.container,300,146,!0,!0)}));a.actions.put("exportUrl",new Action(mxResources.get("url")+
@@ -8683,10 +8684,10 @@ mxResources.get("crop"),!d.pageVisible||!a.pdfPageExport,!a.pdfPageExport),a.pdf
null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b()});a.actions.addAction("editShape...",mxUtils.bind(this,function(){d.getSelectionCells();if(1==d.getSelectionCount()){var b=d.getSelectionCell(),c=d.view.getState(b);null!=c&&null!=c.shape&&null!=c.shape.stencil&&(b=new EditShapeDialog(a,b,mxResources.get("editShape")+":",630,400),a.showDialog(b.container,640,480,!0,!1),b.init())}}));a.actions.addAction("revisionHistory...",function(){var b=a.getCurrentFile();null!=b&&b.isRevisionHistorySupported()?
a.spinner.spin(document.body,mxResources.get("loading"))&&b.getRevisions(mxUtils.bind(this,function(b){a.spinner.stop();b=new RevisionDialog(a,b);a.showDialog(b.container,640,480,!0,!0);b.init()}),mxUtils.bind(this,function(b){a.handleError(b)})):a.showError(mxResources.get("error"),mxResources.get("notAvailable"),mxResources.get("ok"))});a.actions.addAction("createRevision",function(){a.actions.get("save").funct()},null,null,Editor.ctrlKey+"+S");var f=a.actions.addAction("synchronize",function(){a.synchronizeCurrentFile("none"==
DrawioFile.SYNC)},null,null,"Alt+Shift+S");"none"==DrawioFile.SYNC&&(f.label=mxResources.get("refresh"));a.actions.addAction("upload...",function(){var b=a.getCurrentFile();null!=b&&(window.drawdata=a.getFileData(),b=null!=b.getTitle()?b.getTitle():a.defaultFilename,a.openLink(window.location.protocol+"//"+window.location.host+"/?create=drawdata&"+(a.mode==App.MODE_DROPBOX?"mode=dropbox&":"")+"title="+encodeURIComponent(b),null,!0))});"undefined"!==typeof MathJax&&(f=a.actions.addAction("mathematicalTypesetting",
-function(){var b=new ChangePageSetup(a);b.ignoreColor=!0;b.ignoreImage=!0;b.mathEnabled=!a.isMathEnabled();d.model.execute(b)}),f.setToggleAction(!0),f.setSelectedCallback(function(){return a.isMathEnabled()}),f.isEnabled=e);if(isLocalStorage||mxClient.IS_CHROMEAPP)f=a.actions.addAction("showStartScreen",function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen());mxSettings.save()}),f.setToggleAction(!0),f.setSelectedCallback(function(){return mxSettings.getShowStartScreen()});var h=
-a.actions.addAction("autosave",function(){a.editor.setAutosave(!a.editor.autosave)});h.setToggleAction(!0);h.setSelectedCallback(function(){return h.isEnabled()&&a.editor.autosave});a.actions.addAction("editGeometry...",function(){for(var b=d.getSelectionCells(),c=[],e=0;e<b.length;e++)d.getModel().isVertex(b[e])&&c.push(b[e]);0<c.length&&(b=new EditGeometryDialog(a,c),a.showDialog(b.container,200,250,!0,!0),b.init())},null,null,Editor.ctrlKey+"+Shift+M");var m="rounded shadow dashed dashPattern fontFamily fontSize fontColor fontStyle align verticalAlign strokeColor strokeWidth fillColor gradientColor swimlaneFillColor textOpacity gradientDirection glass labelBackgroundColor labelBorderColor opacity spacing spacingTop spacingLeft spacingBottom spacingRight endFill endArrow endSize targetPerimeterSpacing startFill startArrow startSize sourcePerimeterSpacing arcSize".split(" ");
+function(){var b=new ChangePageSetup(a);b.ignoreColor=!0;b.ignoreImage=!0;b.mathEnabled=!a.isMathEnabled();d.model.execute(b)}),f.setToggleAction(!0),f.setSelectedCallback(function(){return a.isMathEnabled()}),f.isEnabled=e);if(isLocalStorage||mxClient.IS_CHROMEAPP)f=a.actions.addAction("showStartScreen",function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen());mxSettings.save()}),f.setToggleAction(!0),f.setSelectedCallback(function(){return mxSettings.getShowStartScreen()});var k=
+a.actions.addAction("autosave",function(){a.editor.setAutosave(!a.editor.autosave)});k.setToggleAction(!0);k.setSelectedCallback(function(){return k.isEnabled()&&a.editor.autosave});a.actions.addAction("editGeometry...",function(){for(var b=d.getSelectionCells(),c=[],e=0;e<b.length;e++)d.getModel().isVertex(b[e])&&c.push(b[e]);0<c.length&&(b=new EditGeometryDialog(a,c),a.showDialog(b.container,200,250,!0,!0),b.init())},null,null,Editor.ctrlKey+"+Shift+M");var n="rounded shadow dashed dashPattern fontFamily fontSize fontColor fontStyle align verticalAlign strokeColor strokeWidth fillColor gradientColor swimlaneFillColor textOpacity gradientDirection glass labelBackgroundColor labelBorderColor opacity spacing spacingTop spacingLeft spacingBottom spacingRight endFill endArrow endSize targetPerimeterSpacing startFill startArrow startSize sourcePerimeterSpacing arcSize".split(" ");
a.actions.addAction("copyStyle",function(){var b=d.view.getState(d.getSelectionCell());if(d.isEnabled()&&null!=b){a.copiedStyle=mxUtils.clone(b.style);for(var b=d.getModel().getStyle(b.cell),b=null!=b?b.split(";"):[],c=0;c<b.length;c++){var e=b[c],f=e.indexOf("=");if(0<=f){var g=e.substring(0,f),e=e.substring(f+1);null==a.copiedStyle[g]&&"none"==e&&(a.copiedStyle[g]="none")}}}},null,null,Editor.ctrlKey+"+Shift+C");a.actions.addAction("pasteStyle",function(){if(d.isEnabled()&&!d.isSelectionEmpty()&&
-null!=a.copiedStyle){d.getModel().beginUpdate();try{for(var b=d.getSelectionCells(),c=0;c<b.length;c++)for(var e=d.view.getState(b[c]),f=0;f<m.length;f++){var g=m[f],h=a.copiedStyle[g];e.style[g]!=h&&d.setCellStyles(g,h,[b[c]])}}finally{d.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+V");a.actions.put("pageBackgroundImage",new Action(mxResources.get("backgroundImage")+"...",function(){if(!a.isOffline()){var b=new BackgroundImageDialog(a,function(b){a.setBackgroundImage(b)});a.showDialog(b.container,
+null!=a.copiedStyle){d.getModel().beginUpdate();try{for(var b=d.getSelectionCells(),c=0;c<b.length;c++)for(var e=d.view.getState(b[c]),f=0;f<n.length;f++){var g=n[f],h=a.copiedStyle[g];e.style[g]!=h&&d.setCellStyles(g,h,[b[c]])}}finally{d.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+V");a.actions.put("pageBackgroundImage",new Action(mxResources.get("backgroundImage")+"...",function(){if(!a.isOffline()){var b=new BackgroundImageDialog(a,function(b){a.setBackgroundImage(b)});a.showDialog(b.container,
320,170,!0,!0);b.init()}}));a.actions.put("exportPng",new Action(mxResources.get("formatPng")+"...",function(){a.isExportToCanvas()?a.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(b,c,d,e,f,g,h,k,l){b=parseInt(b);!isNaN(b)&&0<b&&a.exportImage(b/100,c,d,e,f,h,!k,l)}),!0,!1,"png"):a.isOffline()||mxClient.IS_IOS&&navigator.standalone||a.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,
function(b,c,d){a.downloadFile(c?"xmlpng":"png",null,null,b,null,null,d)}))}));a.actions.put("exportJpg",new Action(mxResources.get("formatJpg")+"...",function(){a.isExportToCanvas()?a.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(b,c,d,e,f,g,h,k,l){b=parseInt(b);!isNaN(b)&&0<b&&a.exportImage(b/100,!1,d,e,!1,h,!k,!1,"jpeg")}),!0,!1,"jpeg"):a.isOffline()||mxClient.IS_IOS&&navigator.standalone||
a.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(b,c){a.downloadFile("jpeg",null,null,b)}),!0)}));f=a.actions.put("shadowVisible",new Action(mxResources.get("shadow"),function(){d.setShadowVisible(!d.shadowVisible)}));f.setToggleAction(!0);f.setSelectedCallback(function(){return d.shadowVisible});var p=!1;a.actions.put("about",new Action(mxResources.get("aboutDrawio")+"...",function(){p||(a.showDialog((new AboutDialog(a)).container,220,300,!0,!0,function(){p=!1}),
@@ -8709,7 +8710,7 @@ null,2))}catch(G){a.handleError(G),console.error(G)}});b.textarea.style.width="6
e.translate(Math.floor((1-b.x)/c),Math.floor((1-b.y)/c));e.scale(1/c);var g=0,h=e.save;e.save=function(){g++;h.apply(this,arguments)};var k=e.restore;e.restore=function(){g--;k.apply(this,arguments)};var l=a.drawShape;a.drawShape=function(a){mxLog.debug("entering shape",a,g);l.apply(this,arguments);mxLog.debug("leaving shape",a,g)};a.drawState(d.getView().getState(d.model.root),e);mxLog.show();mxLog.debug(mxUtils.getXml(f));mxLog.debug("stateCounter",g)})),this.addMenuItems(b,["testXmlImageExport"],
c),mxResources.parse("testDownloadRtModel=Export RT model"),mxResources.parse("testImportRtModel=Import RT model"),this.editorUi.actions.addAction("testDownloadRtModel...",mxUtils.bind(this,function(){null==a.drive?a.handleError({message:mxResources.get("serviceUnavailableOrBlocked")}):a.drive.execute(mxUtils.bind(this,function(){var b=prompt("File ID","");if(null!=b&&0<b.length&&a.spinner.spin(document.body,mxResources.get("export"))){var c=new mxXmlRequest("https://www.googleapis.com/drive/v2/files/"+
b+"/realtime?supportsTeamDrives=true",null,"GET");c.setRequestHeaders=function(a){mxXmlRequest.prototype.setRequestHeaders.apply(this,arguments);var b=gapi.auth.getToken().access_token;a.setRequestHeader("authorization","Bearer "+b)};c.send(function(c){a.spinner.stop();200<=c.getStatus()&&299>=c.getStatus()?a.saveLocalFile(c.getText(),"json-"+b+".txt","text/plain"):a.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))})}}))})),this.addMenuItems(b,["-","testDownloadRtModel"],
-c),b.addItem(mxResources.get("testImportRtModel")+"...",null,function(){var b=document.createElement("input");b.setAttribute("type","file");mxEvent.addListener(b,"change",mxUtils.bind(this,function(){if(null!=b.files){var c=new FileReader;c.onload=mxUtils.bind(this,function(c){try{a.openLocalFile(mxUtils.getXml(a.drive.convertJsonToXml(JSON.parse(c.target.result).data)),b.files[0].name,!0)}catch(B){a.handleError(B,mxResources.get("errorLoadingFile"))}});c.readAsText(b.files[0])}}));b.click()}),mxResources.parse("testShowConsole=Show Console"),
+c),b.addItem(mxResources.get("testImportRtModel")+"...",null,function(){var b=document.createElement("input");b.setAttribute("type","file");mxEvent.addListener(b,"change",mxUtils.bind(this,function(){if(null!=b.files){var c=new FileReader;c.onload=mxUtils.bind(this,function(c){try{a.openLocalFile(mxUtils.getXml(a.drive.convertJsonToXml(JSON.parse(c.target.result).data)),b.files[0].name,!0)}catch(C){a.handleError(C,mxResources.get("errorLoadingFile"))}});c.readAsText(b.files[0])}}));b.click()}),mxResources.parse("testShowConsole=Show Console"),
this.editorUi.actions.addAction("testShowConsole",function(){mxLog.isVisible()?mxLog.window.fit():mxLog.show();mxLog.window.div.style.zIndex=mxPopupMenu.prototype.zIndex-1}),this.addMenuItems(b,["-","testShowConsole"]))})));a.actions.addAction("shapes...",function(){mxClient.IS_CHROMEAPP||!a.isOffline()?a.showDialog((new MoreShapesDialog(a,!0)).container,640,isLocalStorage?mxClient.IS_IOS?480:460:440,!0,!0):a.showDialog((new MoreShapesDialog(a,!1)).container,360,isLocalStorage?mxClient.IS_IOS?300:
280:260,!0,!0)});a.actions.addAction("createShape...",function(){a.getCurrentFile();if(d.isEnabled()){var b=new mxCell("",new mxGeometry(0,0,120,120),a.defaultCustomShapeStyle);b.vertex=!0;b=new EditShapeDialog(a,b,mxResources.get("editShape")+":",630,400);a.showDialog(b.container,640,480,!0,!1);b.init()}});a.actions.put("embedHtml",new Action(mxResources.get("html")+"...",function(){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(b){a.spinner.stop();
a.showHtmlDialog(mxResources.get("create"),"https://desk.draw.io/support/solutions/articles/16000042542",b,function(b,c,d,e,f,g,h,k,l,m){a.createHtml(b,c,d,e,f,g,h,k,l,m,mxUtils.bind(this,function(b,c){var d=new EmbedDialog(a,b+"\n"+c,null,null,function(){var a=window.open(),d=a.document;"CSS1Compat"===document.compatMode&&d.writeln("<!DOCTYPE html>");d.writeln("<html>");d.writeln("<head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head>');d.writeln("<body>");
@@ -8724,11 +8725,11 @@ a.scratchpad}),a.actions.addAction("plugins...",function(){a.showDialog((new Plu
var c="0"!=urlParams.pages||null!=a.pages&&1<a.pages.length?a.getFileData(!0):mxUtils.getXml(a.editor.getGraphXml());if("json"==urlParams.proto){var e=a.createLoadMessage("save");e.xml=c;b&&(e.exit=!0);c=JSON.stringify(e)}(window.opener||window.parent).postMessage(c,"*");"0"!=urlParams.modified&&"1"!=urlParams.keepmodified&&(a.editor.modified=!1,a.editor.setStatus(""));null!=a.getCurrentFile()&&a.saveFile()},a.actions.addAction("saveAndExit",function(){a.actions.get("save").funct(!0)}),a.actions.addAction("exit",
function(){var b=function(){a.editor.modified=!1;var b="json"==urlParams.proto?JSON.stringify({event:"exit",modified:a.editor.modified}):"";(window.opener||window.parent).postMessage(b,"*")};a.editor.modified?a.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b()}));this.put("exportAs",new Menu(mxUtils.bind(this,function(b,c){a.isExportToCanvas()?(this.addMenuItems(b,["exportPng"],c),a.jpgSupported&&this.addMenuItems(b,["exportJpg"],c)):
a.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(b,["exportPng","exportJpg"],c);this.addMenuItems(b,["exportSvg","-"],c);a.isOffline()||a.printPdfExport?this.addMenuItems(b,["exportPdf"],c):a.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(b,["exportPdf"],c);mxClient.IS_IE||"undefined"===typeof VsdxExport&&a.isOffline()||this.addMenuItems(b,["exportVsdx"],c);this.addMenuItems(b,["-","exportHtml","exportXml","exportUrl"],c);a.isOffline()||(b.addSeparator(c),
-this.addMenuItem(b,"export",c).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...")})));this.put("importFrom",new Menu(function(b,c){function e(b){b.pickFile(function(c){a.spinner.spin(document.body,mxResources.get("loading"))&&b.getFile(c,function(b){var c=h(b.getTitle());/\.svg$/i.test(b.getTitle())&&!a.editor.isDataSvg(b.getData())&&(b.setData(a.createSvgDataUri(b.getData())),c="image/svg+xml");f(b.getData(),c,b.getTitle())},function(b){a.handleError(b,null!=b?mxResources.get("errorLoadingFile"):
+this.addMenuItem(b,"export",c).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...")})));this.put("importFrom",new Menu(function(b,c){function e(b){b.pickFile(function(c){a.spinner.spin(document.body,mxResources.get("loading"))&&b.getFile(c,function(b){var c=k(b.getTitle());/\.svg$/i.test(b.getTitle())&&!a.editor.isDataSvg(b.getData())&&(b.setData(a.createSvgDataUri(b.getData())),c="image/svg+xml");f(b.getData(),c,b.getTitle())},function(b){a.handleError(b,null!=b?mxResources.get("errorLoadingFile"):
null)},b==a.drive)},!0)}var f=mxUtils.bind(this,function(b,c,e){var f=d.view,g=d.getGraphBounds(),h=d.snap(Math.ceil(Math.max(0,g.x/f.scale-f.translate.x)+4*d.gridSize)),k=d.snap(Math.ceil(Math.max(0,(g.y+g.height)/f.scale-f.translate.y)+4*d.gridSize));"data:image/"==b.substring(0,11)?a.loadImage(b,mxUtils.bind(this,function(f){var g=!0,l=mxUtils.bind(this,function(){a.resizeImage(f,b,mxUtils.bind(this,function(f,l,m){f=g?Math.min(1,Math.min(a.maxImageSize/l,a.maxImageSize/m)):1;a.importFile(b,c,
-h,k,Math.round(l*f),Math.round(m*f),e,function(b){a.spinner.stop();d.setSelectionCells(b);d.scrollCellToVisible(d.getSelectionCell())})}),g)});b.length>a.resampleThreshold?a.confirmImageResize(function(a){g=a;l()}):l()}),mxUtils.bind(this,function(){a.handleError({message:mxResources.get("cannotOpenFile")})})):a.importFile(b,c,h,k,0,0,e,function(b){a.spinner.stop();d.setSelectionCells(b);d.scrollCellToVisible(d.getSelectionCell())})}),h=mxUtils.bind(this,function(a){var b="text/xml";/\.png$/i.test(a)?
+h,k,Math.round(l*f),Math.round(m*f),e,function(b){a.spinner.stop();d.setSelectionCells(b);d.scrollCellToVisible(d.getSelectionCell())})}),g)});b.length>a.resampleThreshold?a.confirmImageResize(function(a){g=a;l()}):l()}),mxUtils.bind(this,function(){a.handleError({message:mxResources.get("cannotOpenFile")})})):a.importFile(b,c,h,k,0,0,e,function(b){a.spinner.stop();d.setSelectionCells(b);d.scrollCellToVisible(d.getSelectionCell())})}),k=mxUtils.bind(this,function(a){var b="text/xml";/\.png$/i.test(a)?
b="image/png":/\.jpe?g$/i.test(a)?b="image/jpg":/\.gif$/i.test(a)&&(b="image/gif");return b});"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){e(a.drive)},c):g&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1));null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){e(a.oneDrive)},c):l&&b.addItem(mxResources.get("oneDrive")+" ("+
-mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){e(a.dropbox)},c):k&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){e(a.gitHub)},c);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){e(a.trello)},c):n&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+
+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){e(a.dropbox)},c):h&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){e(a.gitHub)},c);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){e(a.trello)},c):m&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+
"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.importLocalFile(!1)},c);b.addItem(mxResources.get("device")+"...",null,function(){a.importLocalFile(!0)},c);a.isOffline()||(b.addSeparator(c),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(a,"",mxResources.get("import"),function(b){if(null!=b&&0<b.length&&a.spinner.spin(document.body,mxResources.get("loading"))){var c=
/(\.png)($|\?)/i.test(b)?"image/png":"text/xml";a.loadUrl(PROXY_URL+"?url="+encodeURIComponent(b),function(a){f(a,c,b)},function(){a.spinner.stop();a.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==c)}},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},c))})).isEnabled=e;this.put("theme",new Menu(mxUtils.bind(this,function(b,c){var d=mxSettings.getUi(),e=b.addItem(mxResources.get("automatic"),null,function(){mxSettings.setUi("");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},
c);"kennedy"!=d&&"atlas"!=d&&"dark"!=d&&"min"!=d&&b.addCheckmark(e,Editor.checkmarkImage);b.addSeparator(c);e=b.addItem(mxResources.get("kennedy"),null,function(){mxSettings.setUi("kennedy");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"kennedy"==d&&b.addCheckmark(e,Editor.checkmarkImage);e=b.addItem(mxResources.get("minimal"),null,function(){mxSettings.setUi("min");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"min"==d&&b.addCheckmark(e,
@@ -8745,14 +8746,14 @@ try{a=d.addCell(a),d.fireEvent(new mxEventObject("cellsInserted","cells",[a]))}f
v("",80,80,"rhombus;whiteSpace=wrap;html=1;")}).isEnabled=e;var x=mxUtils.bind(this,function(a,b,c){for(var d=0;d<c.length;d++)"-"==c[d]?a.addSeparator(b):u(a,b,mxResources.get(c[d])+"...",c[d])});this.put("insert",new Menu(mxUtils.bind(this,function(b,c){this.addMenuItems(b,"insertText insertRectangle - insertEllipse insertRhombus - insertLink insertImage".split(" "),c);b.addSeparator(c);this.addSubmenu("insertLayout",b,c,mxResources.get("layout"));b.addSeparator(c);x(b,c,["fromText","plantUml",
"-","formatSql"]);b.addItem(mxResources.get("csv")+"...",null,function(){a.showImportCsvDialog()},c)})));this.put("insertLayout",new Menu(mxUtils.bind(this,function(a,b){x(a,b,"horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "))})));this.put("openRecent",new Menu(function(b,c){var d=a.getRecent();if(null!=d){for(var e=0;e<d.length;e++)(function(d){var e=d.mode;e==App.MODE_GOOGLE?e="googleDrive":e==App.MODE_ONEDRIVE&&(e="oneDrive");b.addItem(d.title+" ("+
mxResources.get(e)+")",null,function(){a.loadFile(d.id)},c)})(d[e]);b.addSeparator(c)}b.addItem(mxResources.get("reset"),null,function(){a.resetRecent()},c)}));this.put("openFrom",new Menu(function(b,c){null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.pickFile(App.MODE_GOOGLE)},c):g&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.pickFile(App.MODE_ONEDRIVE)},
-c):l&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.pickFile(App.MODE_DROPBOX)},c):k&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){a.pickFile(App.MODE_GITHUB)},c);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){a.pickFile(App.MODE_TRELLO)},
-c):n&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.pickFile(App.MODE_BROWSER)},c);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){a.pickFile(App.MODE_DEVICE)},c);a.isOffline()||(b.addSeparator(c),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(a,"",mxResources.get("open"),
+c):l&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.pickFile(App.MODE_DROPBOX)},c):h&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){a.pickFile(App.MODE_GITHUB)},c);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){a.pickFile(App.MODE_TRELLO)},
+c):m&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.pickFile(App.MODE_BROWSER)},c);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){a.pickFile(App.MODE_DEVICE)},c);a.isOffline()||(b.addSeparator(c),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(a,"",mxResources.get("open"),
function(b){null!=b&&0<b.length&&(null==a.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(b):window.openWindow((mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(b)))},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},c))}));Editor.enableCustomLibraries&&(this.put("newLibrary",new Menu(function(b,c){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=a.drive?b.addItem(mxResources.get("googleDrive")+
"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_GOOGLE)},c):g&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1));null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_ONEDRIVE)},c):l&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",
-null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_DROPBOX)},c):k&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_GITHUB)},c);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_TRELLO)},c):n&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+
+null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_DROPBOX)},c):h&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_GITHUB)},c);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_TRELLO)},c):m&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+
"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_BROWSER)},c);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_DEVICE)},c)})),this.put("openLibraryFrom",new Menu(function(b,c){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=a.drive?b.addItem(mxResources.get("googleDrive")+
"...",null,function(){a.pickLibrary(App.MODE_GOOGLE)},c):g&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1));null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.pickLibrary(App.MODE_ONEDRIVE)},c):l&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.pickLibrary(App.MODE_DROPBOX)},
-c):k&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){a.pickLibrary(App.MODE_GITHUB)},c);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){a.pickLibrary(App.MODE_TRELLO)},c):n&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+
+c):h&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){a.pickLibrary(App.MODE_GITHUB)},c);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){a.pickLibrary(App.MODE_TRELLO)},c):m&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+
"...",null,function(){a.pickLibrary(App.MODE_BROWSER)},c);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){a.pickLibrary(App.MODE_DEVICE)},c);a.isOffline()||(b.addSeparator(c),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(a,"",mxResources.get("open"),function(b){if(null!=b&&0<b.length&&a.spinner.spin(document.body,mxResources.get("loading"))){var c=b;a.isCorsEnabledForUrl(b)||(c=PROXY_URL+"?url="+encodeURIComponent(b));mxUtils.get(c,function(c){if(200<=
c.getStatus()&&299>=c.getStatus()){a.spinner.stop();try{a.loadLibrary(new UrlLibrary(this,c.getText(),b))}catch(G){a.handleError(G,mxResources.get("errorLoadingFile"))}}else a.spinner.stop(),a.handleError(null,mxResources.get("errorLoadingFile"))},function(){a.spinner.stop();a.handleError(null,mxResources.get("errorLoadingFile"))})}},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},c))})));this.put("edit",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,"undo redo - cut copy paste delete - duplicate - find - editData editTooltip - editStyle editGeometry - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));
this.put("view",new Menu(mxUtils.bind(this,function(b,c){this.addMenuItems(b,(null!=this.editorUi.format?["formatPanel"]:[]).concat(["outline","layers","-"]));this.addMenuItems(b,["-","search"],c);if(isLocalStorage||mxClient.IS_CHROMEAPP){var d=this.addMenuItem(b,"scratchpad",c);a.isOffline()&&!mxClient.IS_CHROMEAPP||this.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000042367")}this.addMenuItems(b,"shapes - pageView pageScale - scrollbars tooltips - grid guides".split(" "),c);
@@ -8778,8 +8779,8 @@ null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.page
a.view.translate.x*a.view.scale+c.viewState.scrollLeft,a.container.scrollTop=a.view.translate.y*a.view.scale+c.viewState.scrollTop),b=c);null!=this.actions.layersWindow&&this.actions.layersWindow.refreshLayers();"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?1!=MathJax.Hub.queue.pending||null==this.editor||this.editor.graph.mathEnabled||MathJax.Hub.Queue(mxUtils.bind(this,function(){null!=this.editor&&this.editor.graph.refresh()})):"undefined"===typeof Editor.MathJaxClear||null!=this.editor&&
this.editor.graph.mathEnabled||Editor.MathJaxClear()});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){for(var c=b.getProperty("edit").changes,e=0;e<c.length;e++)if(c[e]instanceof SelectPage||c[e]instanceof RenamePage||c[e]instanceof MovePage||c[e]instanceof mxRootChange){d();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)};
EditorUi.prototype.restoreViewState=function(a,c,b){a=null!=a?this.getPageById(a.getId()):null;var d=this.editor.graph;null!=a&&null!=this.currentPage&&null!=this.pages&&(a!=this.currentPage?this.selectPage(a,!0,c):(d.setViewState(c),this.editor.updateGraphComponents(),d.view.revalidate(),d.sizeDidChange()),d.container.scrollLeft=d.view.translate.x*d.view.scale+c.scrollLeft,d.container.scrollTop=d.view.translate.y*d.view.scale+c.scrollTop,d.restoreSelection(b))};
-Graph.prototype.createViewState=function(a){var c=a.getAttribute("page"),b=parseFloat(a.getAttribute("pageScale")),d=parseFloat(a.getAttribute("pageWidth")),e=parseFloat(a.getAttribute("pageHeight")),g=a.getAttribute("background"),k=a.getAttribute("backgroundImage"),k=null!=k&&0<k.length?JSON.parse(k):null;return{gridEnabled:"0"!=a.getAttribute("grid"),gridSize:parseFloat(a.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=a.getAttribute("guides"),foldingEnabled:"0"!=a.getAttribute("fold"),
-shadowVisible:"1"==a.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=c?"0"!=c:this.defaultPageVisible,background:null!=g&&0<g.length?g:null,backgroundImage:null!=k?new mxImage(k.src,k.width,k.height):null,pageScale:isNaN(b)?mxGraph.prototype.pageScale:b,pageFormat:isNaN(d)||isNaN(e)?mxSettings.getPageFormat():new mxRectangle(0,0,d,e),tooltips:"0"!=a.getAttribute("tooltips"),connect:"0"!=a.getAttribute("connect"),arrows:"0"!=a.getAttribute("arrows"),mathEnabled:"1"==a.getAttribute("math"),
+Graph.prototype.createViewState=function(a){var c=a.getAttribute("page"),b=parseFloat(a.getAttribute("pageScale")),d=parseFloat(a.getAttribute("pageWidth")),e=parseFloat(a.getAttribute("pageHeight")),g=a.getAttribute("background"),h=a.getAttribute("backgroundImage"),h=null!=h&&0<h.length?JSON.parse(h):null;return{gridEnabled:"0"!=a.getAttribute("grid"),gridSize:parseFloat(a.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=a.getAttribute("guides"),foldingEnabled:"0"!=a.getAttribute("fold"),
+shadowVisible:"1"==a.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=c?"0"!=c:this.defaultPageVisible,background:null!=g&&0<g.length?g:null,backgroundImage:null!=h?new mxImage(h.src,h.width,h.height):null,pageScale:isNaN(b)?mxGraph.prototype.pageScale:b,pageFormat:isNaN(d)||isNaN(e)?mxSettings.getPageFormat():new mxRectangle(0,0,d,e),tooltips:"0"!=a.getAttribute("tooltips"),connect:"0"!=a.getAttribute("connect"),arrows:"0"!=a.getAttribute("arrows"),mathEnabled:"1"==a.getAttribute("math"),
selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1}};
Graph.prototype.saveViewState=function(a,c,b){b||(c.setAttribute("grid",null==a||a.gridEnabled?"1":"0"),c.setAttribute("gridSize",null!=a?a.gridSize:mxGraph.prototype.gridSize),c.setAttribute("guides",null==a||a.guidesEnabled?"1":"0"),c.setAttribute("tooltips",null==a||a.tooltips?"1":"0"),c.setAttribute("connect",null==a||a.connect?"1":"0"),c.setAttribute("arrows",null==a||a.arrows?"1":"0"),c.setAttribute("page",null==a&&this.defaultPageVisible||null!=a&&a.pageVisible?"1":"0"),c.setAttribute("fold",
null==a||a.foldingEnabled?"1":"0"));c.setAttribute("pageScale",null!=a&&null!=a.pageScale?a.pageScale:mxGraph.prototype.pageScale);b=null!=a?a.pageFormat:mxSettings.getPageFormat();null!=b&&(c.setAttribute("pageWidth",b.width),c.setAttribute("pageHeight",b.height));null!=a&&null!=a.background&&c.setAttribute("background",a.background);null!=a&&null!=a.backgroundImage&&c.setAttribute("backgroundImage",JSON.stringify(a.backgroundImage));c.setAttribute("math",null!=a&&a.mathEnabled?"1":"0");c.setAttribute("shadow",
@@ -8801,9 +8802,9 @@ EditorUi.prototype.createTabContainer=function(){var a=document.createElement("d
EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var a=this.editor.graph,c=document.createElement("div");c.style.position="relative";c.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";c.style.verticalAlign="top";c.style.height=this.tabContainer.style.height;c.style.whiteSpace="nowrap";c.style.overflow="hidden";c.style.fontSize="12px";c.style.marginLeft="30px";for(var b=this.editor.isChromelessView()?29:59,d=Math.min(140,Math.max(20,(this.tabContainer.clientWidth-
b)/this.pages.length)+1),e=null,g=0;g<this.pages.length;g++)mxUtils.bind(this,function(b,d){this.pages[b]==this.currentPage?(d.className="geActivePage",d.style.backgroundColor="dark"==uiTheme?"#2a2a2a":"#eeeeee",d.style.fontWeight="bold",d.style.borderTopStyle="none"):d.className="geInactivePage";d.setAttribute("draggable","true");mxEvent.addListener(d,"dragstart",mxUtils.bind(this,function(c){a.isEnabled()?(mxClient.IS_FF&&c.dataTransfer.setData("Text","<diagram/>"),e=b):mxEvent.consume(c)}));mxEvent.addListener(d,
"dragend",mxUtils.bind(this,function(a){e=null;a.stopPropagation();a.preventDefault()}));mxEvent.addListener(d,"dragover",mxUtils.bind(this,function(a){null!=e&&(a.dataTransfer.dropEffect="move");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(d,"drop",mxUtils.bind(this,function(a){null!=e&&b!=e&&this.movePage(e,b);a.stopPropagation();a.preventDefault()}));c.appendChild(d)})(g,this.createTabForPage(this.pages[g],d,this.pages[g]!=this.currentPage));this.tabContainer.innerHTML="";this.tabContainer.appendChild(c);
-d=this.createPageMenuTab();this.tabContainer.appendChild(d);d=null;this.isPageInsertTabVisible()&&(d=this.createPageInsertTab(),this.tabContainer.appendChild(d));if(c.clientWidth>this.tabContainer.clientWidth-b){null!=d&&(d.style.position="absolute",d.style.right="0px",c.style.marginRight="30px");var k=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");k.style.position="absolute";k.style.right=this.editor.chromeless?"29px":"55px";k.style.fontSize="13pt";this.tabContainer.appendChild(k);var l=this.createControlTab(4,
-"&nbsp;&#10095;");l.style.position="absolute";l.style.right=this.editor.chromeless?"0px":"29px";l.style.fontSize="13pt";this.tabContainer.appendChild(l);var n=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));c.style.width=n+"px";mxEvent.addListener(k,"click",mxUtils.bind(this,function(a){c.scrollLeft-=Math.max(20,n-20);mxUtils.setOpacity(k,0<c.scrollLeft?100:50);mxUtils.setOpacity(l,c.scrollLeft<c.scrollWidth-c.clientWidth?100:50);mxEvent.consume(a)}));mxUtils.setOpacity(k,
-0<c.scrollLeft?100:50);mxUtils.setOpacity(l,c.scrollLeft<c.scrollWidth-c.clientWidth?100:50);mxEvent.addListener(l,"click",mxUtils.bind(this,function(a){c.scrollLeft+=Math.max(20,n-20);mxUtils.setOpacity(k,0<c.scrollLeft?100:50);mxUtils.setOpacity(l,c.scrollLeft<c.scrollWidth-c.clientWidth?100:50);mxEvent.consume(a)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};
+d=this.createPageMenuTab();this.tabContainer.appendChild(d);d=null;this.isPageInsertTabVisible()&&(d=this.createPageInsertTab(),this.tabContainer.appendChild(d));if(c.clientWidth>this.tabContainer.clientWidth-b){null!=d&&(d.style.position="absolute",d.style.right="0px",c.style.marginRight="30px");var h=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");h.style.position="absolute";h.style.right=this.editor.chromeless?"29px":"55px";h.style.fontSize="13pt";this.tabContainer.appendChild(h);var l=this.createControlTab(4,
+"&nbsp;&#10095;");l.style.position="absolute";l.style.right=this.editor.chromeless?"0px":"29px";l.style.fontSize="13pt";this.tabContainer.appendChild(l);var m=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));c.style.width=m+"px";mxEvent.addListener(h,"click",mxUtils.bind(this,function(a){c.scrollLeft-=Math.max(20,m-20);mxUtils.setOpacity(h,0<c.scrollLeft?100:50);mxUtils.setOpacity(l,c.scrollLeft<c.scrollWidth-c.clientWidth?100:50);mxEvent.consume(a)}));mxUtils.setOpacity(h,
+0<c.scrollLeft?100:50);mxUtils.setOpacity(l,c.scrollLeft<c.scrollWidth-c.clientWidth?100:50);mxEvent.addListener(l,"click",mxUtils.bind(this,function(a){c.scrollLeft+=Math.max(20,m-20);mxUtils.setOpacity(h,0<c.scrollLeft?100:50);mxUtils.setOpacity(l,c.scrollLeft<c.scrollWidth-c.clientWidth?100:50);mxEvent.consume(a)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};
EditorUi.prototype.createTab=function(a){var c=document.createElement("div");c.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";c.style.whiteSpace="nowrap";c.style.boxSizing="border-box";c.style.position="relative";c.style.overflow="hidden";c.style.marginLeft="-1px";c.style.height=this.tabContainer.clientHeight+"px";c.style.padding="8px 4px 8px 4px";c.style.border="dark"==uiTheme?"1px solid #505759":"1px solid #c0c0c0";c.style.borderBottomStyle="solid";c.style.backgroundColor=this.tabContainer.style.backgroundColor;
c.style.cursor="move";c.style.color="gray";a&&(mxEvent.addListener(c,"mouseenter",mxUtils.bind(this,function(a){this.editor.graph.isMouseDown||(c.style.backgroundColor="dark"==uiTheme?"black":"#d3d3d3",mxEvent.consume(a))})),mxEvent.addListener(c,"mouseleave",mxUtils.bind(this,function(a){c.style.backgroundColor=this.tabContainer.style.backgroundColor;mxEvent.consume(a)})));return c};
EditorUi.prototype.createControlTab=function(a,c){var b=this.createTab(!0);b.style.paddingTop=a+"px";b.style.cursor="pointer";b.style.width="30px";b.style.lineHeight="30px";b.innerHTML=c;null!=b.firstChild&&null!=b.firstChild.style&&mxUtils.setOpacity(b.firstChild,40);return b};
@@ -8813,38 +8814,38 @@ null,mxUtils.bind(this,function(){this.renamePage(d,d.getName())}),b),a.addSepar
mxEvent.consume(a)}));return a};EditorUi.prototype.createPageInsertTab=function(){var a=this.createControlTab(4,'<div class="geSprite geSprite-plus" style="display:inline-block;width:21px;height:21px;"></div>');a.setAttribute("title",mxResources.get("insertPage"));mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){this.insertPage();mxEvent.consume(a)}));return a};
EditorUi.prototype.createTabForPage=function(a,c,b){b=this.createTab(b);var d=a.getName()||mxResources.get("untitled"),e=a.getId();b.setAttribute("title",d+(null!=e?" ("+e+")":""));mxUtils.write(b,d);b.style.maxWidth=c+"px";b.style.width=c+"px";this.addTabListeners(a,b);42<c&&(b.style.textOverflow="ellipsis");return b};
EditorUi.prototype.addTabListeners=function(a,c){mxEvent.disableContextMenu(c);var b=this.editor.graph;mxEvent.addListener(c,"dblclick",mxUtils.bind(this,function(b){this.renamePage(a);mxEvent.consume(b)}));var d=!1,e=!1;mxEvent.addGestureListeners(c,mxUtils.bind(this,function(c){d=null!=this.currentMenu;e=a==this.currentPage;b.isMouseDown||e||this.selectPage(a)}),null,mxUtils.bind(this,function(g){if(b.isEnabled()&&!b.isMouseDown&&(mxEvent.isTouchEvent(g)&&e||mxEvent.isPopupTrigger(g))){b.popupMenuHandler.hideMenu();
-this.hideCurrentMenu();if(!mxEvent.isTouchEvent(g)||!d){var k=new mxPopupMenu(this.createPageMenu(a));k.div.className+=" geMenubarMenu";k.smartSeparators=!0;k.showDisabled=!0;k.autoExpand=!0;k.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(k,arguments);this.resetCurrentMenu();k.destroy()});var l=mxEvent.getClientX(g),n=mxEvent.getClientY(g);k.popup(l,n,null,g);this.setCurrentMenu(k,c)}mxEvent.consume(g)}}))};
+this.hideCurrentMenu();if(!mxEvent.isTouchEvent(g)||!d){var h=new mxPopupMenu(this.createPageMenu(a));h.div.className+=" geMenubarMenu";h.smartSeparators=!0;h.showDisabled=!0;h.autoExpand=!0;h.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(h,arguments);this.resetCurrentMenu();h.destroy()});var l=mxEvent.getClientX(g),m=mxEvent.getClientY(g);h.popup(l,m,null,g);this.setCurrentMenu(h,c)}mxEvent.consume(g)}}))};
EditorUi.prototype.createPageMenu=function(a,c){return mxUtils.bind(this,function(b,d){b.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,a)+1)}),d);b.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(a)}),d);b.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(a,c)}),d);b.addSeparator(d);b.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(a,
mxResources.get("copyOf",[a.getName()]))}),d)})};(function(){var a=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(c){a.apply(this,arguments);this.updateTabContainer()}})();(function(){mxCodecRegistry.getCodec(ChangePageSetup).exclude.push("page")})();(function(){var a=new mxObjectCodec(new MovePage,["ui"]);a.beforeDecode=function(a,b,d){d.ui=a.ui;return b};a.afterDecode=function(a,b,d){a=d.oldIndex;d.oldIndex=d.newIndex;d.newIndex=a;return d};mxCodecRegistry.register(a)})();
(function(){var a=new mxObjectCodec(new RenamePage,["ui","page"]);a.beforeDecode=function(a,b,d){d.ui=a.ui;return b};a.afterDecode=function(a,b,d){a=d.previous;d.previous=d.name;d.name=a;return d};mxCodecRegistry.register(a)})();
(function(){var a=new mxObjectCodec(new ChangePage,"ui relatedPage index neverShown page previousPage".split(" ")),c="defaultParent currentRoot scrollLeft scrollTop scale translate lastPasteXml pasteCounter".split(" ");a.afterEncode=function(a,d,e){e.setAttribute("relatedPage",d.relatedPage.getId());null==d.index&&(e.setAttribute("name",d.relatedPage.getName()),null!=d.relatedPage.viewState&&e.setAttribute("viewState",JSON.stringify(d.relatedPage.viewState,function(a,b){return 0>mxUtils.indexOf(c,
a)?b:void 0})),null!=d.relatedPage.root&&a.encodeCell(d.relatedPage.root,e));return e};a.beforeDecode=function(a,c,e){e.ui=a.ui;e.relatedPage=e.ui.getPageById(c.getAttribute("relatedPage"));if(null==e.relatedPage){var b=c.ownerDocument.createElement("diagram");b.setAttribute("id",c.getAttribute("relatedPage"));b.setAttribute("name",c.getAttribute("name"));e.relatedPage=new DiagramPage(b);b=c.getAttribute("viewState");null!=b&&(e.relatedPage.viewState=JSON.parse(b),c.removeAttribute("viewState"));
c=c.cloneNode(!0);b=c.firstChild;if(null!=b)for(e.relatedPage.root=a.decodeCell(b,!1),e=b.nextSibling,b.parentNode.removeChild(b),b=e;null!=b;){e=b.nextSibling;if(b.nodeType==mxConstants.NODETYPE_ELEMENT){var d=b.getAttribute("id");null==a.lookup(d)&&a.decodeCell(b)}b.parentNode.removeChild(b);b=e}}return c};a.afterDecode=function(a,c,e){e.index=e.previousIndex;return e};mxCodecRegistry.register(a)})();(function(){var a=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAASFBMVEUAAAAAAAB/f3/9/f319fUfHx/7+/s+Pj69vb0AAAAAAAAAAAAAAAAAAAAAAAAAAAB2dnZ1dXUAAAAAAAAVFRX///8ZGRkGBgbOcI1hAAAAE3RSTlMA+vr9/f38+fb1893Bo00u+/tFvPJUBQAAAIRJREFUGNM0jEcSxCAQAxlydGqD///TNWxZBx1aXVIrWysplbapL3sFxgDq/idXBnHgBPK1nIxwc55vCXl6dRFtrV6svs/A/UjsPcpzA5tqyByD92HqQlMFh45BG6ND1DiKSoPDdm96N77bg5F+wyaEqRGb8ZiOwHQqdg9hehszcLAEIQB2lQ4p/sEpnAAAAABJRU5ErkJggg==":IMAGE_PATH+"/move.png";EditorUi.prototype.altShiftActions[68]=
-"selectDescendants";var c=Graph.prototype.foldCells;Graph.prototype.foldCells=function(a,b,d,l,n){b=null!=b?b:!1;null==d&&(d=this.getFoldableCells(this.getSelectionCells(),a));this.stopEditing();this.model.beginUpdate();try{for(var e=d.slice(),g=[],k=0;k<d.length;k++){var p=this.view.getState(d[k]),q=null!=p?p.style:this.getCellStyle(d[k]);"1"==mxUtils.getValue(q,"treeFolding","0")&&(this.traverse(d[k],!0,mxUtils.bind(this,function(a,b){null!=b&&g.push(b);a!=d[k]&&g.push(a);return a==d[k]||!this.model.isCollapsed(a)})),
-this.model.setCollapsed(d[k],a))}for(k=0;k<g.length;k++)this.model.setVisible(g[k],!a);d=e;d=c.apply(this,arguments)}finally{this.model.endUpdate()}return d};var b=EditorUi.prototype.init;EditorUi.prototype.init=function(){b.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function b(a){return v.isVertex(a)&&c(a)}function c(a){var b=!1;null!=a&&(a=v.getParent(a),b=u.view.getState(a),u.view.getState(a),b="tree"==(null!=
+"selectDescendants";var c=Graph.prototype.foldCells;Graph.prototype.foldCells=function(a,b,d,l,m){b=null!=b?b:!1;null==d&&(d=this.getFoldableCells(this.getSelectionCells(),a));this.stopEditing();this.model.beginUpdate();try{for(var e=d.slice(),g=[],h=0;h<d.length;h++){var p=this.view.getState(d[h]),q=null!=p?p.style:this.getCellStyle(d[h]);"1"==mxUtils.getValue(q,"treeFolding","0")&&(this.traverse(d[h],!0,mxUtils.bind(this,function(a,b){null!=b&&g.push(b);a!=d[h]&&g.push(a);return a==d[h]||!this.model.isCollapsed(a)})),
+this.model.setCollapsed(d[h],a))}for(h=0;h<g.length;h++)this.model.setVisible(g[h],!a);d=e;d=c.apply(this,arguments)}finally{this.model.endUpdate()}return d};var b=EditorUi.prototype.init;EditorUi.prototype.init=function(){b.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function b(a){return v.isVertex(a)&&c(a)}function c(a){var b=!1;null!=a&&(a=v.getParent(a),b=u.view.getState(a),u.view.getState(a),b="tree"==(null!=
b?b.style:u.getCellStyle(a)).containerType);return b}function d(a){var b=!1;null!=a&&(a=v.getParent(a),b=u.view.getState(a),u.view.getState(a),b=null!=(null!=b?b.style:u.getCellStyle(a)).childLayout);return b}function l(a){a=u.view.getState(a);if(null!=a){var b=u.getIncomingEdges(a.cell);if(0<b.length&&(b=u.view.getState(b[0]),null!=b&&(b=b.absolutePoints,null!=b&&0<b.length&&(b=b[b.length-1],null!=b)))){if(b.y==a.y&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_SOUTH;if(b.y==
-a.y+a.height&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_NORTH;if(b.x>a.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function n(a,b){b=null!=b?b:!0;u.model.beginUpdate();try{var c=u.model.getParent(a),d=u.getIncomingEdges(a),e=u.cloneCells([d[0],a]);u.model.setTerminal(e[0],u.model.getTerminal(d[0],!0),!0);var f=l(a),g=c.geometry;f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?e[1].geometry.x+=b?a.geometry.width+10:-e[1].geometry.width-
+a.y+a.height&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_NORTH;if(b.x>a.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function m(a,b){b=null!=b?b:!0;u.model.beginUpdate();try{var c=u.model.getParent(a),d=u.getIncomingEdges(a),e=u.cloneCells([d[0],a]);u.model.setTerminal(e[0],u.model.getTerminal(d[0],!0),!0);var f=l(a),g=c.geometry;f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?e[1].geometry.x+=b?a.geometry.width+10:-e[1].geometry.width-
10:e[1].geometry.y+=b?a.geometry.height+10:-e[1].geometry.height-10;u.view.currentRoot!=c&&(e[1].geometry.x-=g.x,e[1].geometry.y-=g.y);var h=u.view.getState(a),k=u.view.scale;if(null!=h){var m=mxRectangle.fromRectangle(h);f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?m.x+=(b?a.geometry.width+10:-e[1].geometry.width-10)*k:m.y+=(b?a.geometry.height+10:-e[1].geometry.height-10)*k;var n=u.getOutgoingEdges(u.model.getTerminal(d[0],!0));if(null!=n){for(var p=f==mxConstants.DIRECTION_SOUTH||
f==mxConstants.DIRECTION_NORTH,v=g=d=0;v<n.length;v++){var q=u.model.getTerminal(n[v],!1);if(f==l(q)){var t=u.view.getState(q);q!=a&&null!=t&&(p&&b!=t.getCenterX()<h.getCenterX()||!p&&b!=t.getCenterY()<h.getCenterY())&&mxUtils.intersects(m,t)&&(d=10+Math.max(d,(Math.min(m.x+m.width,t.x+t.width)-Math.max(m.x,t.x))/k),g=10+Math.max(g,(Math.min(m.y+m.height,t.y+t.height)-Math.max(m.y,t.y))/k))}}p?g=0:d=0;for(v=0;v<n.length;v++)if(q=u.model.getTerminal(n[v],!1),f==l(q)&&(t=u.view.getState(q),q!=a&&null!=
t&&(p&&b!=t.getCenterX()<h.getCenterX()||!p&&b!=t.getCenterY()<h.getCenterY()))){var A=[];u.traverse(t.cell,!0,function(a,b){null!=b&&A.push(b);A.push(a);return!0});u.moveCells(A,(b?1:-1)*d,(b?1:-1)*g)}}}return u.addCells(e,c)}finally{u.model.endUpdate()}}function f(a){u.model.beginUpdate();try{var b=l(a),c=u.getIncomingEdges(a),d=u.cloneCells([c[0],a]);u.model.setTerminal(c[0],d[1],!1);u.model.setTerminal(d[0],d[1],!0);u.model.setTerminal(d[0],a,!1);var e=u.model.getParent(a),f=e.geometry,g=[];u.view.currentRoot!=
-e&&(d[1].geometry.x-=f.x,d[1].geometry.y-=f.y);u.traverse(a,!0,function(a,b){null!=b&&g.push(b);g.push(a);return!0});var h=a.geometry.width+40,k=a.geometry.height+40;b==mxConstants.DIRECTION_SOUTH?h=0:b==mxConstants.DIRECTION_NORTH?(h=0,k=-40):b==mxConstants.DIRECTION_WEST?(h=-40,k=0):b==mxConstants.DIRECTION_EAST&&(k=0);u.moveCells(g,h,k);return u.addCells(d,e)}finally{u.model.endUpdate()}}function h(a){u.model.beginUpdate();try{var b=u.model.getParent(a),c=u.getIncomingEdges(a),d=u.cloneCells([c[0],
+e&&(d[1].geometry.x-=f.x,d[1].geometry.y-=f.y);u.traverse(a,!0,function(a,b){null!=b&&g.push(b);g.push(a);return!0});var h=a.geometry.width+40,k=a.geometry.height+40;b==mxConstants.DIRECTION_SOUTH?h=0:b==mxConstants.DIRECTION_NORTH?(h=0,k=-40):b==mxConstants.DIRECTION_WEST?(h=-40,k=0):b==mxConstants.DIRECTION_EAST&&(k=0);u.moveCells(g,h,k);return u.addCells(d,e)}finally{u.model.endUpdate()}}function k(a){u.model.beginUpdate();try{var b=u.model.getParent(a),c=u.getIncomingEdges(a),d=u.cloneCells([c[0],
a]);u.model.setTerminal(d[0],a,!0);var c=u.getOutgoingEdges(a),e=b.geometry,f=[];u.view.currentRoot==b&&(e=new mxRectangle);for(var g=0;g<c.length;g++){var h=u.model.getTerminal(c[g],!1);null!=h&&f.push(h)}var k=u.view.getBounds(f),m=l(a),n=u.view.translate,p=u.view.scale;m==mxConstants.DIRECTION_SOUTH?(d[1].geometry.x=null==k?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(k.x+k.width)/p-n.x-e.x+10,d[1].geometry.y+=a.geometry.height-e.y+40):m==mxConstants.DIRECTION_NORTH?(d[1].geometry.x=
-null==k?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(k.x+k.width)/p-n.x+-e.x+10,d[1].geometry.y-=d[1].geometry.height-e.y+40):(d[1].geometry.x=m==mxConstants.DIRECTION_WEST?d[1].geometry.x-(d[1].geometry.width-e.x+40):d[1].geometry.x+(a.geometry.width-e.x+40),d[1].geometry.y=null==k?a.geometry.y+(a.geometry.height-d[1].geometry.height)/2:(k.y+k.height)/p-n.y+-e.y+10);return u.addCells(d,b)}finally{u.model.endUpdate()}}function m(a,b,c){a=u.getOutgoingEdges(a);c=u.view.getState(c);var d=
+null==k?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(k.x+k.width)/p-n.x+-e.x+10,d[1].geometry.y-=d[1].geometry.height-e.y+40):(d[1].geometry.x=m==mxConstants.DIRECTION_WEST?d[1].geometry.x-(d[1].geometry.width-e.x+40):d[1].geometry.x+(a.geometry.width-e.x+40),d[1].geometry.y=null==k?a.geometry.y+(a.geometry.height-d[1].geometry.height)/2:(k.y+k.height)/p-n.y+-e.y+10);return u.addCells(d,b)}finally{u.model.endUpdate()}}function n(a,b,c){a=u.getOutgoingEdges(a);c=u.view.getState(c);var d=
[];if(null!=c&&null!=a){for(var e=0;e<a.length;e++){var f=u.view.getState(u.model.getTerminal(a[e],!1));null!=f&&(!b&&Math.min(f.x+f.width,c.x+c.width)>=Math.max(f.x,c.x)||b&&Math.min(f.y+f.height,c.y+c.height)>=Math.max(f.y,c.y))&&d.push(f)}d.sort(function(a,c){return b?a.x+a.width-c.x-c.width:a.y+a.height-c.y-c.height})}return d}function p(a,b){var c=l(a),d=b==mxConstants.DIRECTION_EAST||b==mxConstants.DIRECTION_WEST;(c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST)==d&&c!=b?q.actions.get("selectParent").funct():
-c==b?(d=u.getOutgoingEdges(a),null!=d&&0<d.length&&u.setSelectionCell(u.model.getTerminal(d[0],!1))):(c=u.getIncomingEdges(a),null!=c&&0<c.length&&(d=m(u.model.getTerminal(c[0],!0),d,a),c=u.view.getState(a),null!=c&&(c=mxUtils.indexOf(d,c),0<=c&&(c+=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_WEST?-1:1,0<=c&&c<=d.length-1&&u.setSelectionCell(d[c].cell)))))}var q=this,u=q.editor.graph,v=u.getModel();mxResources.parse("selectChildren=Select Children");mxResources.parse("selectSiblings=Select Siblings");
+c==b?(d=u.getOutgoingEdges(a),null!=d&&0<d.length&&u.setSelectionCell(u.model.getTerminal(d[0],!1))):(c=u.getIncomingEdges(a),null!=c&&0<c.length&&(d=n(u.model.getTerminal(c[0],!0),d,a),c=u.view.getState(a),null!=c&&(c=mxUtils.indexOf(d,c),0<=c&&(c+=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_WEST?-1:1,0<=c&&c<=d.length-1&&u.setSelectionCell(d[c].cell)))))}var q=this,u=q.editor.graph,v=u.getModel();mxResources.parse("selectChildren=Select Children");mxResources.parse("selectSiblings=Select Siblings");
mxResources.parse("selectDescendants=Select Descendants");mxResources.parse("selectParent=Select Parent");var x=q.menus.createPopupMenu;q.menus.createPopupMenu=function(a,c,d){x.apply(this,arguments);if(1==u.getSelectionCount()){c=u.getSelectionCell();var e=u.getOutgoingEdges(c);a.addSeparator();null!=e&&0<e.length&&(b(u.getSelectionCell())&&this.addMenuItems(a,["selectChildren"],null,d),this.addMenuItems(a,["selectDescendants"],null,d));b(u.getSelectionCell())&&(a.addSeparator(),0<u.getIncomingEdges(c).length&&
this.addMenuItems(a,["selectSiblings","selectParent"],null,d))}};q.actions.addAction("selectChildren",function(){if(u.isEnabled()&&1==u.getSelectionCount()){var a=u.getSelectionCell(),a=u.getOutgoingEdges(a);if(null!=a){for(var b=[],c=0;c<a.length;c++)b.push(u.model.getTerminal(a[c],!1));u.setSelectionCells(b)}}},null,null,"Alt+Shift+X");q.actions.addAction("selectSiblings",function(){if(u.isEnabled()&&1==u.getSelectionCount()){var a=u.getSelectionCell(),a=u.getIncomingEdges(a);if(null!=a&&0<a.length&&
(a=u.getOutgoingEdges(u.model.getTerminal(a[0],!0)),null!=a)){for(var b=[],c=0;c<a.length;c++)b.push(u.model.getTerminal(a[c],!1));u.setSelectionCells(b)}}},null,null,"Alt+Shift+S");q.actions.addAction("selectParent",function(){if(u.isEnabled()&&1==u.getSelectionCount()){var a=u.getSelectionCell(),a=u.getIncomingEdges(a);null!=a&&0<a.length&&u.setSelectionCell(u.model.getTerminal(a[0],!0))}},null,null,"Alt+Shift+P");q.actions.addAction("selectDescendants",function(){if(u.isEnabled()&&1==u.getSelectionCount()){var a=
u.getSelectionCell(),b=[];u.traverse(a,!0,function(a,c){null!=c&&b.push(c);b.push(a);return!0});u.setSelectionCells(b)}},null,null,"Alt+Shift+D");var t=u.removeCells;u.removeCells=function(a,d){d=null!=d?d:!0;null==a&&(a=this.getDeletableCells(this.getSelectionCells()));d&&(a=this.getDeletableCells(this.addAllEdges(a)));for(var e=[],f=0;f<a.length;f++){var g=a[f];v.isEdge(g)&&c(g)&&(e.push(g),g=v.getTerminal(g,!1));b(g)?(u.traverse(g,!0,function(a,b){null!=b&&e.push(b);e.push(a);return!0}),g=u.getIncomingEdges(a[f]),
a=a.concat(g)):e.push(a[f])}a=e;return t.apply(this,arguments)};q.hoverIcons.getStateAt=function(a,c,d){return b(a.cell)?null:this.graph.view.getState(this.graph.getCellAt(c,d))};var w=u.duplicateCells;u.duplicateCells=function(a,c){a=null!=a?a:this.getSelectionCells();for(var d=a.slice(0),e=0;e<d.length;e++){var f=u.view.getState(d[e]);if(null!=f&&b(f.cell))for(var g=u.getIncomingEdges(f.cell),f=0;f<g.length;f++)mxUtils.remove(g[f],a)}this.model.beginUpdate();try{var h=w.call(this,a,c);if(h.length==
a.length)for(e=0;e<a.length;e++)if(b(a[e])){var k=u.getIncomingEdges(h[e]),g=u.getIncomingEdges(a[e]);if(0==k.length&&0<g.length){var l=this.cloneCell(g[0]);this.addEdge(l,u.getDefaultParent(),this.model.getTerminal(g[0],!0),h[e])}}}finally{this.model.endUpdate()}return h};var D=u.moveCells;u.moveCells=function(a,c,d,e,f,g,h){var k=null;this.model.beginUpdate();try{var l=f,m=this.view.getState(f),n=null!=m?m.style:this.getCellStyle(f);if(null!=a&&b(f)&&"1"==mxUtils.getValue(n,"treeFolding","0")){for(var p=
-0;p<a.length;p++)if(b(a[p])||u.model.isEdge(a[p])&&null==u.model.getTerminal(a[p],!0)){f=u.model.getParent(a[p]);break}if(null!=l&&f!=l&&null!=this.view.getState(a[0])){var v=u.getIncomingEdges(a[0]);if(0<v.length){var q=u.view.getState(u.model.getTerminal(v[0],!0));if(null!=q){var t=u.view.getState(l);null!=t&&(c=(t.getCenterX()-q.getCenterX())/u.view.scale,d=(t.getCenterY()-q.getCenterY())/u.view.scale)}}}}k=D.apply(this,arguments);if(null!=k&&null!=a&&k.length==a.length)for(p=0;p<k.length;p++)if(this.model.isEdge(k[p]))b(l)&&
-0>mxUtils.indexOf(k,this.model.getTerminal(k[p],!0))&&this.model.setTerminal(k[p],l,!0);else if(b(a[p])&&(v=u.getIncomingEdges(a[p]),0<v.length))if(!e)b(l)&&0>mxUtils.indexOf(a,this.model.getTerminal(v[0],!0))&&this.model.setTerminal(v[0],l,!0);else if(0==u.getIncomingEdges(k[p]).length){m=l;if(null==m||m==u.model.getParent(a[p]))m=u.model.getTerminal(v[0],!0);e=this.cloneCell(v[0]);this.addEdge(e,u.getDefaultParent(),m,k[p])}}finally{this.model.endUpdate()}return k};if(null!=q.sidebar){var C=q.sidebar.dropAndConnect;
-q.sidebar.dropAndConnect=function(a,c,d,e){var f=u.model,g=null;f.beginUpdate();try{if(g=C.apply(this,arguments),b(a))for(var h=0;h<g.length;h++)if(f.isEdge(g[h])&&null==f.getTerminal(g[h],!0)){f.setTerminal(g[h],a,!0);var k=u.getCellGeometry(g[h]);k.points=null;null!=k.getTerminalPoint(!0)&&k.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return g}}var y={88:q.actions.get("selectChildren"),84:q.actions.get("selectSubtree"),80:q.actions.get("selectParent"),83:q.actions.get("selectSiblings")},z=
-q.onKeyDown;q.onKeyDown=function(a){try{if(u.isEnabled()&&!u.isEditing()&&b(u.getSelectionCell())&&1==u.getSelectionCount()){var c=null;0<u.getIncomingEdges(u.getSelectionCell()).length&&(9==a.which?c=mxEvent.isShiftDown(a)?f(u.getSelectionCell()):h(u.getSelectionCell()):13==a.which&&(c=n(u.getSelectionCell(),!mxEvent.isShiftDown(a))));if(null!=c&&0<c.length)1==c.length&&u.model.isEdge(c[0])?u.setSelectionCell(u.model.getTerminal(c[0],!1)):u.setSelectionCell(c[c.length-1]),null!=q.hoverIcons&&q.hoverIcons.update(u.view.getState(u.getSelectionCell())),
+0;p<a.length;p++)if(b(a[p])||u.model.isEdge(a[p])&&null==u.model.getTerminal(a[p],!0)){f=u.model.getParent(a[p]);break}if(null!=l&&f!=l&&null!=this.view.getState(a[0])){var v=u.getIncomingEdges(a[0]);if(0<v.length){var t=u.view.getState(u.model.getTerminal(v[0],!0));if(null!=t){var q=u.view.getState(l);null!=q&&(c=(q.getCenterX()-t.getCenterX())/u.view.scale,d=(q.getCenterY()-t.getCenterY())/u.view.scale)}}}}k=D.apply(this,arguments);if(null!=k&&null!=a&&k.length==a.length)for(p=0;p<k.length;p++)if(this.model.isEdge(k[p]))b(l)&&
+0>mxUtils.indexOf(k,this.model.getTerminal(k[p],!0))&&this.model.setTerminal(k[p],l,!0);else if(b(a[p])&&(v=u.getIncomingEdges(a[p]),0<v.length))if(!e)b(l)&&0>mxUtils.indexOf(a,this.model.getTerminal(v[0],!0))&&this.model.setTerminal(v[0],l,!0);else if(0==u.getIncomingEdges(k[p]).length){m=l;if(null==m||m==u.model.getParent(a[p]))m=u.model.getTerminal(v[0],!0);e=this.cloneCell(v[0]);this.addEdge(e,u.getDefaultParent(),m,k[p])}}finally{this.model.endUpdate()}return k};if(null!=q.sidebar){var B=q.sidebar.dropAndConnect;
+q.sidebar.dropAndConnect=function(a,c,d,e){var f=u.model,g=null;f.beginUpdate();try{if(g=B.apply(this,arguments),b(a))for(var h=0;h<g.length;h++)if(f.isEdge(g[h])&&null==f.getTerminal(g[h],!0)){f.setTerminal(g[h],a,!0);var k=u.getCellGeometry(g[h]);k.points=null;null!=k.getTerminalPoint(!0)&&k.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return g}}var y={88:q.actions.get("selectChildren"),84:q.actions.get("selectSubtree"),80:q.actions.get("selectParent"),83:q.actions.get("selectSiblings")},z=
+q.onKeyDown;q.onKeyDown=function(a){try{if(u.isEnabled()&&!u.isEditing()&&b(u.getSelectionCell())&&1==u.getSelectionCount()){var c=null;0<u.getIncomingEdges(u.getSelectionCell()).length&&(9==a.which?c=mxEvent.isShiftDown(a)?f(u.getSelectionCell()):k(u.getSelectionCell()):13==a.which&&(c=m(u.getSelectionCell(),!mxEvent.isShiftDown(a))));if(null!=c&&0<c.length)1==c.length&&u.model.isEdge(c[0])?u.setSelectionCell(u.model.getTerminal(c[0],!1)):u.setSelectionCell(c[c.length-1]),null!=q.hoverIcons&&q.hoverIcons.update(u.view.getState(u.getSelectionCell())),
u.startEditingAtCell(u.getSelectionCell()),mxEvent.consume(a);else if(mxEvent.isAltDown(a)&&mxEvent.isShiftDown(a)){var d=y[a.keyCode];null!=d&&(d.funct(a),mxEvent.consume(a))}else 37==a.keyCode?(p(u.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(a)):38==a.keyCode?(p(u.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(a)):39==a.keyCode?(p(u.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(a)):40==a.keyCode&&(p(u.getSelectionCell(),mxConstants.DIRECTION_SOUTH),
-mxEvent.consume(a))}}catch(M){console.log("error",M)}mxEvent.isConsumed(a)||z.apply(this,arguments)};var G=u.connectVertex;u.connectVertex=function(a,c,d,e,g,k){var m=u.getIncomingEdges(a);return b(a)&&0<m.length?(d=l(a),e=d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST,g=c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST,d==c?h(a):e==g?f(a):n(a,c!=mxConstants.DIRECTION_NORTH&&c!=mxConstants.DIRECTION_WEST)):G.call(this,a,c,d,e,g,k)};u.getSubtree=function(a){var c=[a];b(a)&&
-!d(a)&&u.traverse(a,!0,function(a,b){null!=b&&0>mxUtils.indexOf(c,b)&&c.push(b);0>mxUtils.indexOf(c,a)&&c.push(a);return!0});return c};var B=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){B.apply(this,arguments);b(this.state.cell)&&0<this.graph.getOutgoingEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(a),this.moveHandle.setAttribute("title","Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width=
+mxEvent.consume(a))}}catch(M){console.log("error",M)}mxEvent.isConsumed(a)||z.apply(this,arguments)};var G=u.connectVertex;u.connectVertex=function(a,c,d,e,g,h){var n=u.getIncomingEdges(a);return b(a)&&0<n.length?(d=l(a),e=d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST,g=c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST,d==c?k(a):e==g?f(a):m(a,c!=mxConstants.DIRECTION_NORTH&&c!=mxConstants.DIRECTION_WEST)):G.call(this,a,c,d,e,g,h)};u.getSubtree=function(a){var c=[a];b(a)&&
+!d(a)&&u.traverse(a,!0,function(a,b){null!=b&&0>mxUtils.indexOf(c,b)&&c.push(b);0>mxUtils.indexOf(c,a)&&c.push(a);return!0});return c};var C=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){C.apply(this,arguments);b(this.state.cell)&&0<this.graph.getOutgoingEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(a),this.moveHandle.setAttribute("title","Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width=
"18px",this.moveHandle.style.height="18px",this.graph.container.appendChild(this.moveHandle),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(a){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(a),mxEvent.getClientY(a));this.graph.graphHandler.cells=this.graph.getSubtree(this.state.cell);this.graph.graphHandler.bounds=this.state.view.getBounds(this.graph.graphHandler.cells);this.graph.graphHandler.pBounds=this.graph.graphHandler.getPreviewBounds(this.graph.graphHandler.cells);
this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(a);this.graph.isMouseDown=!0;mxEvent.consume(a)})))};var F=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){F.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var I=mxVertexHandler.prototype.destroy;
mxVertexHandler.prototype.destroy=function(a,b){I.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var d=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var a=d.apply(this,arguments),b=this.graph;return a.concat([this.addEntry("tree container",function(){var a=new mxCell("Tree Container",new mxGeometry(0,0,220,160),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");
@@ -8857,7 +8858,7 @@ a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap branch
b.geometry.setTerminalPoint(new mxPoint(-40,40),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);return sb.createVertexTemplateFromCells([a,b],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap sub topic",function(){var a=new mxCell("Sub Topic",new mxGeometry(0,0,72,26),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;");a.vertex=!0;var b=new mxCell("",new mxGeometry(0,
0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");b.geometry.setTerminalPoint(new mxPoint(-40,40),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);return sb.createVertexTemplateFromCells([a,b],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree orgchart organization division",function(){var a=new mxCell("Orgchart",new mxGeometry(0,0,280,220),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");a.vertex=!0;var c=new mxCell("Organization",
new mxGeometry(80,40,120,60),"whiteSpace=wrap;html=1;align=center;treeFolding=1;container=1;recursiveResize=0;");b.setAttributeForCell(c,"treeRoot","1");c.vertex=!0;var d=new mxCell("Division",new mxGeometry(20,140,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;");d.vertex=!0;var e=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");e.geometry.relative=!0;e.edge=!0;
-c.insertEdge(e,!0);d.insertEdge(e,!1);var g=new mxCell("Division",new mxGeometry(160,140,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;");g.vertex=!0;var m=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");m.geometry.relative=!0;m.edge=!0;c.insertEdge(m,!0);g.insertEdge(m,!1);a.insert(e);a.insert(m);a.insert(c);a.insert(d);a.insert(g);return sb.createVertexTemplateFromCells([a],
+c.insertEdge(e,!0);d.insertEdge(e,!1);var g=new mxCell("Division",new mxGeometry(160,140,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;");g.vertex=!0;var n=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");n.geometry.relative=!0;n.edge=!0;c.insertEdge(n,!0);g.insertEdge(n,!1);a.insert(e);a.insert(n);a.insert(c);a.insert(d);a.insert(g);return sb.createVertexTemplateFromCells([a],
a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree root",function(){var a=new mxCell("Organization",new mxGeometry(0,0,120,60),"whiteSpace=wrap;html=1;align=center;treeFolding=1;container=1;recursiveResize=0;");b.setAttributeForCell(a,"treeRoot","1");a.vertex=!0;return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree division",function(){var a=new mxCell("Division",new mxGeometry(20,40,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;");
a.vertex=!0;var b=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");b.geometry.setTerminalPoint(new mxPoint(0,0),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);return sb.createVertexTemplateFromCells([a,b],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree sub sections",function(){var a=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;");
a.vertex=!0;var b=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");b.geometry.setTerminalPoint(new mxPoint(110,-40),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);var c=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;");c.vertex=!0;var d=new mxCell("",new mxGeometry(0,
@@ -8874,18 +8875,18 @@ Graph.createSvgImage(22,18,'<path transform="translate(4 0)" d="M7.181,15.007a1,
mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,10,'<path d="M 3 3 L 7 7 L 11 3" stroke="#C0C0C0" stroke-width="2" fill="#ffffff"/>').src;mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="#29b6f2"/>');mxOutline.prototype.sizerImage=null;mxConstants.VERTEX_SELECTION_COLOR="#C0C0C0";mxConstants.EDGE_SELECTION_COLOR="#C0C0C0";mxConstants.CONNECT_HANDLE_FILLCOLOR="#cee7ff";mxConstants.DEFAULT_VALID_COLOR="#29b6f2";mxConstants.GUIDE_COLOR=
"#C0C0C0";mxConstants.HIGHLIGHT_STROKEWIDTH=5;mxConstants.HIGHLIGHT_OPACITY=35;mxConstants.OUTLINE_COLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_FILLCOLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_STROKECOLOR="#fff";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowSize="0.6";Graph.prototype.svgShadowBlur="1.2";Format.prototype.inactiveTabBackgroundColor="#f0f0f0";mxGraphHandler.prototype.previewColor="#C0C0C0";mxRubberband.prototype.defaultOpacity=50;
HoverIcons.prototype.inactiveOpacity=25;Format.prototype.showCloseButton=!1;EditorUi.prototype.closableScratchpad=!1;EditorUi.prototype.toolbarHeight=46;EditorUi.prototype.footerHeight=0;Graph.prototype.editAfterInsert=!0;Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var g=EditorUi.prototype.updateTabContainer;EditorUi.prototype.updateTabContainer=function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom=
-"30px");g.apply(this,arguments)};var k=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){k.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var l=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(a,c){null!=c.shortcut&&900>b&&!mxClient.IS_IOS?a.firstChild.nextSibling.setAttribute("title",c.shortcut):l.apply(this,arguments)};var n=App.prototype.updateUserElement;App.prototype.updateUserElement=
-function(){n.apply(this,arguments);if(null!=this.userElement){var a=this.userElement;a.style.cssText="display:inline-block;position:relative;margin-right:4px;cursor:pointer;";a.className="geToolbarButton";a.innerHTML="";a.style.backgroundImage="url("+Editor.userImage+")";a.style.backgroundPosition="center center";a.style.backgroundRepeat="no-repeat";a.style.backgroundSize="24px 24px";a.style.height="24px";a.style.width="24px";a.style.cssFloat="right";a.setAttribute("title",mxResources.get("changeUser"))}};
+"30px");g.apply(this,arguments)};var h=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){h.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var l=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(a,c){null!=c.shortcut&&900>b&&!mxClient.IS_IOS?a.firstChild.nextSibling.setAttribute("title",c.shortcut):l.apply(this,arguments)};var m=App.prototype.updateUserElement;App.prototype.updateUserElement=
+function(){m.apply(this,arguments);if(null!=this.userElement){var a=this.userElement;a.style.cssText="display:inline-block;position:relative;margin-right:4px;cursor:pointer;";a.className="geToolbarButton";a.innerHTML="";a.style.backgroundImage="url("+Editor.userImage+")";a.style.backgroundPosition="center center";a.style.backgroundRepeat="no-repeat";a.style.backgroundSize="24px 24px";a.style.height="24px";a.style.width="24px";a.style.cssFloat="right";a.setAttribute("title",mxResources.get("changeUser"))}};
var f=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){f.apply(this,arguments);if(null!=this.shareButton){var a=this.shareButton;a.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;";a.className="geToolbarButton";a.innerHTML="";a.style.backgroundImage="url("+Editor.shareImage+")";a.style.backgroundPosition="center center";a.style.backgroundRepeat="no-repeat";a.style.backgroundSize="24px 24px";a.style.height=
"24px";a.style.width="24px"}null!=this.syncButton&&(a=this.syncButton,a.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;",a.className="geToolbarButton",a.innerHTML="",a.style.backgroundImage="url("+Editor.syncImage+")",a.style.backgroundPosition="center center",a.style.backgroundRepeat="no-repeat",a.style.backgroundSize="24px 24px",a.style.height="24px",a.style.width="24px")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.buttonContainer){var a=
document.createElement("div");a.style.display="inline-block";a.style.position="relative";a.style.marginTop="2px";var b=document.createElement("button");mxUtils.write(b,mxResources.get("save"));b.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)");b.className="1"==urlParams.saveAndExit?"geMenuItem":"geMenuItem gePrimaryBtn";b.style.fontSize="14px";b.style.padding="6px";b.style.borderRadius="3px";b.style.marginLeft="8px";b.style.cursor="pointer";mxEvent.addListener(b,"click",mxUtils.bind(this,
function(){this.actions.get("save").funct()}));a.appendChild(b);"1"==urlParams.saveAndExit&&(b=document.createElement("a"),mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",mxResources.get("saveAndExit")),b.className="geMenuItem gePrimaryBtn",b.style.fontSize="14px",b.style.marginLeft="6px",b.style.padding="6px",b.style.cursor="pointer",mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b));b=document.createElement("a");
mxUtils.write(b,mxResources.get("exit"));b.setAttribute("title",mxResources.get("exit"));b.className="geMenuItem";b.style.fontSize="14px";b.style.marginLeft="6px";b.style.padding="6px";b.style.cursor="pointer";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()}));a.appendChild(b);this.buttonContainer.appendChild(a);this.buttonContainer.style.top="6px"}};Sidebar.prototype.getTooltipOffset=function(){var a=mxUtils.getOffset(this.editorUi.sidebarWindow.window.div);
-a.y+=40;return a};var h=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(a,b,c){var d=this.editorUi.editor.graph;a.smartSeparators=!0;h.apply(this,arguments);mxUtils.bind(this,function(a,b){var c=new FilenameDialog(this.editorUi,a,mxResources.get("apply"),function(a){b(parseFloat(a))},mxResources.get("spacing"));this.editorUi.showDialog(c.container,300,80,!0,!0);c.init()});1==d.getSelectionCount()?(this.addMenuItems(a,["editTooltip","-","editStyle","editGeometry","-"],null,
+a.y+=40;return a};var k=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(a,b,c){var d=this.editorUi.editor.graph;a.smartSeparators=!0;k.apply(this,arguments);mxUtils.bind(this,function(a,b){var c=new FilenameDialog(this.editorUi,a,mxResources.get("apply"),function(a){b(parseFloat(a))},mxResources.get("spacing"));this.editorUi.showDialog(c.container,300,80,!0,!0);c.init()});1==d.getSelectionCount()?(this.addMenuItems(a,["editTooltip","-","editStyle","editGeometry","-"],null,
c),d.isCellFoldable(d.getSelectionCell())&&this.addMenuItems(a,d.isCellCollapsed(b)?["expand"]:["collapse"],null,c),this.addMenuItems(a,["collapsible","-","lockUnlock","enterGroup"],null,c),a.addSeparator(),this.addSubmenu("layout",a)):d.isSelectionEmpty()&&d.isEnabled()?(a.addSeparator(),this.addMenuItems(a,["editData"],null,c),a.addSeparator(),this.addSubmenu("insert",a),this.addSubmenu("layout",a),a.addSeparator(),this.addSubmenu("view",a,null,mxResources.get("options")),this.addMenuItems(a,["-",
-"exitGroup"],null,c)):d.isEnabled()&&this.addMenuItems(a,["-","lockUnlock"],null,c)};EditorUi.prototype.toggleFormatPanel=function(b){null!=this.formatWindow?this.formatWindow.window.setVisible(b?!1:!this.formatWindow.window.isVisible()):a(this)};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};var m=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.sidebarWindow&&(this.sidebarWindow.window.setVisible(!1),this.sidebarWindow.window.destroy(),this.sidebarWindow=
+"exitGroup"],null,c)):d.isEnabled()&&this.addMenuItems(a,["-","lockUnlock"],null,c)};EditorUi.prototype.toggleFormatPanel=function(b){null!=this.formatWindow?this.formatWindow.window.setVisible(b?!1:!this.formatWindow.window.isVisible()):a(this)};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};var n=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.sidebarWindow&&(this.sidebarWindow.window.setVisible(!1),this.sidebarWindow.window.destroy(),this.sidebarWindow=
null);null!=this.formatWindow&&(this.formatWindow.window.setVisible(!1),this.formatWindow.window.destroy(),this.formatWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.window.setVisible(!1),this.actions.outlineWindow.window.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&(this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.window.destroy(),this.actions.layersWindow=null);null!=this.menus.tagsWindow&&(this.menus.tagsWindow.window.setVisible(!1),
-this.menus.tagsWindow.window.destroy(),this.menus.tagsWindow=null);null!=this.menus.findWindow&&(this.menus.findWindow.window.setVisible(!1),this.menus.findWindow.window.destroy(),this.menus.findWindow=null);m.apply(this,arguments)};var p=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(a){p.apply(this,arguments);a||(null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1))};EditorUi.prototype.chromelessWindowResize=
+this.menus.tagsWindow.window.destroy(),this.menus.tagsWindow=null);null!=this.menus.findWindow&&(this.menus.findWindow.window.setVisible(!1),this.menus.findWindow.window.destroy(),this.menus.findWindow=null);n.apply(this,arguments)};var p=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(a){p.apply(this,arguments);a||(null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1))};EditorUi.prototype.chromelessWindowResize=
function(){};var q=Menus.prototype.init;Menus.prototype.init=function(){q.apply(this,arguments);var b=this.editorUi,d=b.editor.graph;b.actions.get("insertText").label=mxResources.get("text");b.actions.get("insertText").label=mxResources.get("text");b.actions.get("editDiagram").label=mxResources.get("formatXml")+"...";b.actions.get("insertRectangle").label=mxResources.get("rectangle");b.actions.get("insertEllipse").label=mxResources.get("ellipse");b.actions.get("insertRhombus").label=mxResources.get("rhombus");
b.actions.get("insertImage").label=mxResources.get("image")+"...";b.actions.get("insertLink").label=mxResources.get("link")+"...";b.actions.get("createShape").label=mxResources.get("shape")+"...";b.actions.get("outline").label=mxResources.get("outline")+"...";b.actions.get("layers").label=mxResources.get("layers")+"...";b.actions.put("importFile",new Action("File...",function(){d.popupMenuHandler.hideMenu();var a=document.createElement("input");a.setAttribute("type","file");mxEvent.addListener(a,
"change",function(){null!=a.files&&b.importFiles(a.files,null,null,b.maxImageSize)});a.click()}));b.actions.put("importCsv",new Action(mxResources.get("csv")+"...",function(){d.popupMenuHandler.hideMenu();b.showImportCsvDialog()}));b.actions.put("importText",new Action(mxResources.get("text")+"...",function(){var a=new ParseDialog(b,"Insert from Text");b.showDialog(a.container,620,420,!0,!1);a.init()}));b.actions.put("formatSql",new Action(mxResources.get("formatSql")+"...",function(){var a=new ParseDialog(b,
@@ -8920,13 +8921,13 @@ var f=g.diagramContainer.parentNode,p=document.createElement("div");p.style.cssT
E.style.backgroundRepeat="no-repeat";E.style.backgroundColor="#ffffff";E.style.paddingRight="10px";E.style.display="block";E.style.position="absolute";E.style.textDecoration="none";E.style.textDecoration="none";E.style.right="0px";E.style.bottom="0px";E.style.overflow="hidden";E.style.visibility="hidden";E.style.textAlign="center";E.style.color="#000";E.style.fontSize="12px";E.style.color="#707070";E.style.width="59px";E.style.borderTop="1px solid lightgray";E.style.borderLeft="1px solid lightgray";
E.style.height=parseInt(g.tabContainer.style.height)-1+"px";E.style.lineHeight=parseInt(g.tabContainer.style.height)+1+"px";p.appendChild(E);q=mxUtils.bind(this,function(){E.innerHTML=Math.round(100*g.editor.graph.view.scale)+"%"});g.editor.graph.view.addListener(mxEvent.EVENT_SCALE,q);g.editor.addListener("resetGraphView",q);g.editor.addListener("pageSelected",q);var H=g.setGraphEnabled;g.setGraphEnabled=function(){H.apply(this,arguments);null!=this.tabContainer&&(E.style.visibility=this.tabContainer.style.visibility,
this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility?"30px":"0px")}}p.appendChild(g.tabContainer);p.appendChild(k);p.appendChild(g.diagramContainer);f.appendChild(p);g.updateTabContainer();var M=null;e();mxEvent.addListener(window,"resize",function(){e();null!=g.sidebarWindow&&g.sidebarWindow.window.fit();null!=g.formatWindow&&g.formatWindow.window.fit();null!=g.actions.outlineWindow&&g.actions.outlineWindow.window.fit();null!=g.actions.layersWindow&&g.actions.layersWindow.window.fit();
-null!=g.menus.tagsWindow&&g.menus.tagsWindow.window.fit();null!=g.menus.findWindow&&g.menus.findWindow.window.fit()})}}};(function(){var a=!1;"min"!=uiTheme||a||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),a=!0);var c=EditorUi.initTheme;EditorUi.initTheme=function(){c.apply(this,arguments);"min"!=uiTheme||a||(this.initMinimalTheme(),a=!0)}})();(function(){var a=mxGuide.prototype.move;mxGuide.prototype.move=function(b,c,g,k){var d=c.y,e=c.x,f=!1,h=!1;if(null!=this.states&&null!=b&&null!=c){var m=this,p=new mxCellState,q=this.graph.getView().scale,u=Math.max(2,this.getGuideTolerance()/2);p.x=b.x+e;p.y=b.y+d;p.width=b.width;p.height=b.height;for(var v=[],x=[],t=0;t<this.states.length;t++){var w=this.states[t];w instanceof mxCellState&&(k||!this.graph.isCellSelected(w.cell))&&((p.x>=w.x&&p.x<=w.x+w.width||w.x>=p.x&&w.x<=p.x+p.width)&&(p.y>
-w.y+w.height+4||p.y+p.height+4<w.y)?v.push(w):(p.y>=w.y&&p.y<=w.y+w.height||w.y>=p.y&&w.y<=p.y+p.height)&&(p.x>w.x+w.width+4||p.x+p.width+4<w.x)&&x.push(w))}var D=0,C=0,y=w=0,z=0,G=0,B=0,F=0,I=5*q;if(1<v.length){v.push(p);v.sort(function(a,b){return a.y-b.y});var A=!1,t=p==v[0],q=p==v[v.length-1];if(!t&&!q)for(t=1;t<v.length-1;t++)if(p==v[t]){q=v[t-1];t=v[t+1];w=C=y=(t.y-q.y-q.height-p.height)/2;break}for(t=0;t<v.length-1;t++){var q=v[t],E=v[t+1],H=p==q||p==E,E=E.y-q.y-q.height,A=A|p==q;if(0==C&&
-0==D)C=E,D=1;else if(Math.abs(C-E)<=(H||1==t&&A?u:0))D+=1;else if(1<D&&A){v=v.slice(0,t+1);break}else if(3<=v.length-t&&!A)D=0,w=C=0!=y?y:0,v.splice(0,0==t?1:t),t=-1;else break;0!=w||H||(C=w=E)}3==v.length&&v[1]==p&&(w=0)}if(1<x.length){x.push(p);x.sort(function(a,b){return a.x-b.x});A=!1;t=p==x[0];q=p==x[x.length-1];if(!t&&!q)for(t=1;t<x.length-1;t++)if(p==x[t]){q=x[t-1];t=x[t+1];B=G=F=(t.x-q.x-q.width-p.width)/2;break}for(t=0;t<x.length-1;t++){q=x[t];E=x[t+1];H=p==q||p==E;E=E.x-q.x-q.width;A|=p==
-q;if(0==G&&0==z)G=E,z=1;else if(Math.abs(G-E)<=(H||1==t&&A?u:0))z+=1;else if(1<z&&A){x=x.slice(0,t+1);break}else if(3<=x.length-t&&!A)z=0,B=G=0!=F?F:0,x.splice(0,0==t?1:t),t=-1;else break;0!=B||H||(G=B=E)}3==x.length&&x[1]==p&&(B=0)}u=function(a,b,c,d){var e=[],f;d?(d=I,f=0):(d=0,f=I);e.push(new mxPoint(a.x-d,a.y-f));e.push(new mxPoint(a.x+d,a.y+f));e.push(a);e.push(b);e.push(new mxPoint(b.x-d,b.y-f));e.push(new mxPoint(b.x+d,b.y+f));if(null!=c)return c.points=e,c;a=new mxPolyline(e,mxConstants.GUIDE_COLOR,
-mxConstants.GUIDE_STROKEWIDTH);a.dialect=mxConstants.DIALECT_SVG;a.pointerEvents=!1;a.init(m.graph.getView().getOverlayPane());return a};G=function(a,b){if(a&&null!=m.guidesArrHor)for(var c=0;c<m.guidesArrHor.length;c++)m.guidesArrHor[c].node.style.visibility="hidden";if(b&&null!=m.guidesArrVer)for(c=0;c<m.guidesArrVer.length;c++)m.guidesArrVer[c].node.style.visibility="hidden"};if(1<z&&z==x.length-1){z=[];F=m.guidesArrHor;f=[];e=0;t=x[0]==p?1:0;A=x[t].y+x[t].height;if(0<B)for(t=0;t<x.length-1;t++)q=
-x[t],E=x[t+1],p==q?(e=E.x-q.width-B,f.push(new mxPoint(e+q.width+I,A)),f.push(new mxPoint(E.x-I,A))):p==E?(f.push(new mxPoint(q.x+q.width+I,A)),e=q.x+q.width+B,f.push(new mxPoint(e-I,A))):(f.push(new mxPoint(q.x+q.width+I,A)),f.push(new mxPoint(E.x-I,A)));else q=x[0],t=x[2],e=q.x+q.width+(t.x-q.x-q.width-p.width)/2,f.push(new mxPoint(q.x+q.width+I,A)),f.push(new mxPoint(e-I,A)),f.push(new mxPoint(e+p.width+I,A)),f.push(new mxPoint(t.x-I,A));for(t=0;t<f.length;t+=2)x=f[t],B=f[t+1],x=u(x,B,null!=F?
-F[t/2]:null),x.node.style.visibility="visible",x.redraw(),z.push(x);for(t=f.length/2;null!=F&&t<F.length;t++)F[t].destroy();m.guidesArrHor=z;e-=b.x;f=!0}else G(!0);if(1<D&&D==v.length-1){z=[];F=m.guidesArrVer;h=[];d=0;t=v[0]==p?1:0;D=v[t].x+v[t].width;if(0<w)for(t=0;t<v.length-1;t++)q=v[t],E=v[t+1],p==q?(d=E.y-q.height-w,h.push(new mxPoint(D,d+q.height+I)),h.push(new mxPoint(D,E.y-I))):p==E?(h.push(new mxPoint(D,q.y+q.height+I)),d=q.y+q.height+w,h.push(new mxPoint(D,d-I))):(h.push(new mxPoint(D,q.y+
-q.height+I)),h.push(new mxPoint(D,E.y-I)));else q=v[0],t=v[2],d=q.y+q.height+(t.y-q.y-q.height-p.height)/2,h.push(new mxPoint(D,q.y+q.height+I)),h.push(new mxPoint(D,d-I)),h.push(new mxPoint(D,d+p.height+I)),h.push(new mxPoint(D,t.y-I));for(t=0;t<h.length;t+=2)x=h[t],B=h[t+1],x=u(x,B,null!=F?F[t/2]:null,!0),x.node.style.visibility="visible",x.redraw(),z.push(x);for(t=h.length/2;null!=F&&t<F.length;t++)F[t].destroy();m.guidesArrVer=z;d-=b.y;h=!0}else G(!1,!0)}if(f||h)return p=new mxPoint(e,d),v=a.call(this,
-b,p,g,k),f&&!h?p.y=v.y:h&&!f&&(p.x=v.x),v.y!=p.y&&null!=this.guideY&&null!=this.guideY.node&&(this.guideY.node.style.visibility="hidden"),v.x!=p.x&&null!=this.guideX&&null!=this.guideX.node&&(this.guideX.node.style.visibility="hidden"),p;G(!0,!0);return a.apply(this,arguments)};var c=mxGuide.prototype.setVisible;mxGuide.prototype.setVisible=function(a){c.call(this,a);var b=this.guidesArrVer,d=this.guidesArrHor;if(null!=b)for(var k=0;k<b.length;k++)b[k].node.style.visibility=a?"visible":"hidden";if(null!=
-d)for(k=0;k<d.length;k++)d[k].node.style.visibility=a?"visible":"hidden"};var b=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){b.call(this);var a=this.guidesArrVer,c=this.guidesArrHor;if(null!=a){for(var g=0;g<a.length;g++)a[g].destroy();this.guidesArrVer=null}if(null!=c){for(g=0;g<c.length;g++)c[g].destroy();this.guidesArrHor=null}}})();
+null!=g.menus.tagsWindow&&g.menus.tagsWindow.window.fit();null!=g.menus.findWindow&&g.menus.findWindow.window.fit()})}}};(function(){var a=!1;"min"!=uiTheme||a||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),a=!0);var c=EditorUi.initTheme;EditorUi.initTheme=function(){c.apply(this,arguments);"min"!=uiTheme||a||(this.initMinimalTheme(),a=!0)}})();(function(){var a=mxGuide.prototype.move;mxGuide.prototype.move=function(b,c,g,h){var d=c.y,e=c.x,f=!1,k=!1;if(null!=this.states&&null!=b&&null!=c){var n=this,p=new mxCellState,q=this.graph.getView().scale,u=Math.max(2,this.getGuideTolerance()/2);p.x=b.x+e;p.y=b.y+d;p.width=b.width;p.height=b.height;for(var v=[],x=[],t=0;t<this.states.length;t++){var w=this.states[t];w instanceof mxCellState&&(h||!this.graph.isCellSelected(w.cell))&&((p.x>=w.x&&p.x<=w.x+w.width||w.x>=p.x&&w.x<=p.x+p.width)&&(p.y>
+w.y+w.height+4||p.y+p.height+4<w.y)?v.push(w):(p.y>=w.y&&p.y<=w.y+w.height||w.y>=p.y&&w.y<=p.y+p.height)&&(p.x>w.x+w.width+4||p.x+p.width+4<w.x)&&x.push(w))}var D=0,B=0,y=w=0,z=0,G=0,C=0,F=0,I=5*q;if(1<v.length){v.push(p);v.sort(function(a,b){return a.y-b.y});var A=!1,t=p==v[0],q=p==v[v.length-1];if(!t&&!q)for(t=1;t<v.length-1;t++)if(p==v[t]){q=v[t-1];t=v[t+1];w=B=y=(t.y-q.y-q.height-p.height)/2;break}for(t=0;t<v.length-1;t++){var q=v[t],E=v[t+1],H=p==q||p==E,E=E.y-q.y-q.height,A=A|p==q;if(0==B&&
+0==D)B=E,D=1;else if(Math.abs(B-E)<=(H||1==t&&A?u:0))D+=1;else if(1<D&&A){v=v.slice(0,t+1);break}else if(3<=v.length-t&&!A)D=0,w=B=0!=y?y:0,v.splice(0,0==t?1:t),t=-1;else break;0!=w||H||(B=w=E)}3==v.length&&v[1]==p&&(w=0)}if(1<x.length){x.push(p);x.sort(function(a,b){return a.x-b.x});A=!1;t=p==x[0];q=p==x[x.length-1];if(!t&&!q)for(t=1;t<x.length-1;t++)if(p==x[t]){q=x[t-1];t=x[t+1];C=G=F=(t.x-q.x-q.width-p.width)/2;break}for(t=0;t<x.length-1;t++){q=x[t];E=x[t+1];H=p==q||p==E;E=E.x-q.x-q.width;A|=p==
+q;if(0==G&&0==z)G=E,z=1;else if(Math.abs(G-E)<=(H||1==t&&A?u:0))z+=1;else if(1<z&&A){x=x.slice(0,t+1);break}else if(3<=x.length-t&&!A)z=0,C=G=0!=F?F:0,x.splice(0,0==t?1:t),t=-1;else break;0!=C||H||(G=C=E)}3==x.length&&x[1]==p&&(C=0)}u=function(a,b,c,d){var e=[],f;d?(d=I,f=0):(d=0,f=I);e.push(new mxPoint(a.x-d,a.y-f));e.push(new mxPoint(a.x+d,a.y+f));e.push(a);e.push(b);e.push(new mxPoint(b.x-d,b.y-f));e.push(new mxPoint(b.x+d,b.y+f));if(null!=c)return c.points=e,c;a=new mxPolyline(e,mxConstants.GUIDE_COLOR,
+mxConstants.GUIDE_STROKEWIDTH);a.dialect=mxConstants.DIALECT_SVG;a.pointerEvents=!1;a.init(n.graph.getView().getOverlayPane());return a};G=function(a,b){if(a&&null!=n.guidesArrHor)for(var c=0;c<n.guidesArrHor.length;c++)n.guidesArrHor[c].node.style.visibility="hidden";if(b&&null!=n.guidesArrVer)for(c=0;c<n.guidesArrVer.length;c++)n.guidesArrVer[c].node.style.visibility="hidden"};if(1<z&&z==x.length-1){z=[];F=n.guidesArrHor;f=[];e=0;t=x[0]==p?1:0;A=x[t].y+x[t].height;if(0<C)for(t=0;t<x.length-1;t++)q=
+x[t],E=x[t+1],p==q?(e=E.x-q.width-C,f.push(new mxPoint(e+q.width+I,A)),f.push(new mxPoint(E.x-I,A))):p==E?(f.push(new mxPoint(q.x+q.width+I,A)),e=q.x+q.width+C,f.push(new mxPoint(e-I,A))):(f.push(new mxPoint(q.x+q.width+I,A)),f.push(new mxPoint(E.x-I,A)));else q=x[0],t=x[2],e=q.x+q.width+(t.x-q.x-q.width-p.width)/2,f.push(new mxPoint(q.x+q.width+I,A)),f.push(new mxPoint(e-I,A)),f.push(new mxPoint(e+p.width+I,A)),f.push(new mxPoint(t.x-I,A));for(t=0;t<f.length;t+=2)x=f[t],C=f[t+1],x=u(x,C,null!=F?
+F[t/2]:null),x.node.style.visibility="visible",x.redraw(),z.push(x);for(t=f.length/2;null!=F&&t<F.length;t++)F[t].destroy();n.guidesArrHor=z;e-=b.x;f=!0}else G(!0);if(1<D&&D==v.length-1){z=[];F=n.guidesArrVer;k=[];d=0;t=v[0]==p?1:0;D=v[t].x+v[t].width;if(0<w)for(t=0;t<v.length-1;t++)q=v[t],E=v[t+1],p==q?(d=E.y-q.height-w,k.push(new mxPoint(D,d+q.height+I)),k.push(new mxPoint(D,E.y-I))):p==E?(k.push(new mxPoint(D,q.y+q.height+I)),d=q.y+q.height+w,k.push(new mxPoint(D,d-I))):(k.push(new mxPoint(D,q.y+
+q.height+I)),k.push(new mxPoint(D,E.y-I)));else q=v[0],t=v[2],d=q.y+q.height+(t.y-q.y-q.height-p.height)/2,k.push(new mxPoint(D,q.y+q.height+I)),k.push(new mxPoint(D,d-I)),k.push(new mxPoint(D,d+p.height+I)),k.push(new mxPoint(D,t.y-I));for(t=0;t<k.length;t+=2)x=k[t],C=k[t+1],x=u(x,C,null!=F?F[t/2]:null,!0),x.node.style.visibility="visible",x.redraw(),z.push(x);for(t=k.length/2;null!=F&&t<F.length;t++)F[t].destroy();n.guidesArrVer=z;d-=b.y;k=!0}else G(!1,!0)}if(f||k)return p=new mxPoint(e,d),v=a.call(this,
+b,p,g,h),f&&!k?p.y=v.y:k&&!f&&(p.x=v.x),v.y!=p.y&&null!=this.guideY&&null!=this.guideY.node&&(this.guideY.node.style.visibility="hidden"),v.x!=p.x&&null!=this.guideX&&null!=this.guideX.node&&(this.guideX.node.style.visibility="hidden"),p;G(!0,!0);return a.apply(this,arguments)};var c=mxGuide.prototype.setVisible;mxGuide.prototype.setVisible=function(a){c.call(this,a);var b=this.guidesArrVer,d=this.guidesArrHor;if(null!=b)for(var h=0;h<b.length;h++)b[h].node.style.visibility=a?"visible":"hidden";if(null!=
+d)for(h=0;h<d.length;h++)d[h].node.style.visibility=a?"visible":"hidden"};var b=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){b.call(this);var a=this.guidesArrVer,c=this.guidesArrHor;if(null!=a){for(var g=0;g<a.length;g++)a[g].destroy();this.guidesArrVer=null}if(null!=c){for(g=0;g<c.length;g++)c[g].destroy();this.guidesArrHor=null}}})();
diff --git a/src/main/webapp/js/atlas-viewer.min.js b/src/main/webapp/js/atlas-viewer.min.js
index 2135f251..2478c50f 100644
--- a/src/main/webapp/js/atlas-viewer.min.js
+++ b/src/main/webapp/js/atlas-viewer.min.js
@@ -1146,7 +1146,7 @@ mxGraphView.prototype.getPerimeterPoint=function(a,b,c,d){var e=null;if(null!=a)
0)||g),b&&(e.x=2*d.getCenterX()-e.x),g&&(e.y=2*d.getCenterY()-e.y));e=f(d,a,e,c);null!=e&&(b&&(e.x=2*d.getCenterX()-e.x),g&&(e.y=2*d.getCenterY()-e.y))}null==e&&(e=this.getPoint(a))}return e};mxGraphView.prototype.getRoutingCenterX=function(a){var b=null!=a.style?parseFloat(a.style[mxConstants.STYLE_ROUTING_CENTER_X])||0:0;return a.getCenterX()+b*a.width};
mxGraphView.prototype.getRoutingCenterY=function(a){var b=null!=a.style?parseFloat(a.style[mxConstants.STYLE_ROUTING_CENTER_Y])||0:0;return a.getCenterY()+b*a.height};mxGraphView.prototype.getPerimeterBounds=function(a,b){b=null!=b?b:0;null!=a&&(b+=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]||0));return a.getPerimeterBounds(b*this.scale)};
mxGraphView.prototype.getPerimeterFunction=function(a){a=a.style[mxConstants.STYLE_PERIMETER];if("string"==typeof a){var b=mxStyleRegistry.getValue(a);null==b&&this.isAllowEval()&&(b=mxUtils.eval(a));a=b}return"function"==typeof a?a:null};mxGraphView.prototype.getNextPoint=function(a,b,c){a=a.absolutePoints;var d=null;null!=a&&2<=a.length&&(d=a.length,d=a[c?Math.min(1,d-1):Math.max(0,d-2)]);null==d&&null!=b&&(d=new mxPoint(b.getCenterX(),b.getCenterY()));return d};
-mxGraphView.prototype.getVisibleTerminal=function(a,b){for(var c=this.graph.getModel(),d=c.getTerminal(a,b),e=d;null!=d&&d!=this.currentRoot;){if(!this.graph.isCellVisible(e)||this.isCellCollapsed(d))e=d;d=c.getParent(d)}c.getParent(e)==c.getRoot()&&(e=null);return e};
+mxGraphView.prototype.getVisibleTerminal=function(a,b){for(var c=this.graph.getModel(),d=c.getTerminal(a,b),e=d;null!=d&&d!=this.currentRoot;){if(!this.graph.isCellVisible(e)||this.isCellCollapsed(d))e=d;d=c.getParent(d)}if(c.getParent(e)==c.getRoot()||e==this.currentRoot)e=null;return e};
mxGraphView.prototype.updateEdgeBounds=function(a){var b=a.absolutePoints,c=b[0],d=b[b.length-1];if(c.x!=d.x||c.y!=d.y){var e=d.x-c.x,f=d.y-c.y;a.terminalDistance=Math.sqrt(e*e+f*f)}else a.terminalDistance=0;var d=0,g=[],f=c;if(null!=f){for(var c=f.x,k=f.y,l=c,m=k,n=1;n<b.length;n++){var p=b[n];null!=p&&(e=f.x-p.x,f=f.y-p.y,e=Math.sqrt(e*e+f*f),g.push(e),d+=e,f=p,c=Math.min(f.x,c),k=Math.min(f.y,k),l=Math.max(f.x,l),m=Math.max(f.y,m))}a.length=d;a.segments=g;a.x=c;a.y=k;a.width=Math.max(1,l-c);a.height=
Math.max(1,m-k)}};
mxGraphView.prototype.getPoint=function(a,b){var c=a.getCenterX(),d=a.getCenterY();if(null==a.segments||null!=b&&!b.relative)null!=b&&(m=b.offset,null!=m&&(c+=m.x,d+=m.y));else{for(var e=a.absolutePoints.length,f=Math.round(((null!=b?b.x/2:0)+.5)*a.length),g=a.segments[0],k=0,l=1;f>=Math.round(k+g)&&l<e-1;)k+=g,g=a.segments[l++];e=0==g?0:(f-k)/g;f=a.absolutePoints[l-1];l=a.absolutePoints[l];if(null!=f&&null!=l){k=c=d=0;if(null!=b){var d=b.y,m=b.offset;null!=m&&(c=m.x,k=m.y)}m=l.x-f.x;l=l.y-f.y;c=
@@ -1992,9 +1992,9 @@ a.setAttribute("pageHeight",this.graph.pageFormat.height);null!=this.graph.backg
Editor.prototype.createUndoManager=function(){var a=this.graph,b=new mxUndoManager;this.undoListener=function(a,e){b.undoableEditHappened(e.getProperty("edit"))};var e=mxUtils.bind(this,function(a,b){this.undoListener.apply(this,arguments)});a.getModel().addListener(mxEvent.UNDO,e);a.getView().addListener(mxEvent.UNDO,e);e=function(d,b){var e=a.getSelectionCellsForChanges(b.getProperty("edit").changes);a.getModel();for(var k=[],q=0;q<e.length;q++)null!=a.view.getState(e[q])&&k.push(e[q]);a.setSelectionCells(k)};
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,d,k,l,p,q,u,c){var f=0;mxClient.IS_VML&&(null==document.documentMode||8>document.documentMode)&&(f=80);e+=f;d+=f;var g=e,n=d,r=0<document.documentElement.clientHeight?document.documentElement.clientHeight:Math.max(document.body.clientHeight||0,document.documentElement.clientHeight),h=Math.max(1,Math.round((document.body.clientWidth-e-64)/2)),m=Math.max(1,Math.round((r-d-a.footerHeight)/3));mxClient.IS_QUIRKS||(b.style.maxHeight="100%");e=Math.min(e,document.body.scrollWidth-
+function Dialog(a,b,e,d,k,l,p,q,t,c){var f=0;mxClient.IS_VML&&(null==document.documentMode||8>document.documentMode)&&(f=80);e+=f;d+=f;var g=e,n=d,r=0<document.documentElement.clientHeight?document.documentElement.clientHeight:Math.max(document.body.clientHeight||0,document.documentElement.clientHeight),h=Math.max(1,Math.round((document.body.clientWidth-e-64)/2)),m=Math.max(1,Math.round((r-d-a.footerHeight)/3));mxClient.IS_QUIRKS||(b.style.maxHeight="100%");e=Math.min(e,document.body.scrollWidth-
64);d=Math.min(d,r-64);0<a.dialogs.length&&(this.zIndex+=2*a.dialogs.length);null==this.bg&&(this.bg=a.createDiv("background"),this.bg.style.position="absolute",this.bg.style.background=Dialog.backdropColor,this.bg.style.height=r+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity),mxClient.IS_QUIRKS&&new mxDivResizer(this.bg));var w=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=w.x+"px";this.bg.style.top=w.y+"px";h+=w.x;m+=w.y;
-k&&document.body.appendChild(this.bg);var v=a.createDiv(u?"geTransDialog":"geDialog");k=this.getPosition(h,m,e,d);h=k.x;m=k.y;v.style.width=e+"px";v.style.height=d+"px";v.style.left=h+"px";v.style.top=m+"px";v.style.zIndex=this.zIndex;v.appendChild(b);document.body.appendChild(v);!q&&b.clientHeight>v.clientHeight-64&&(b.style.overflowY="auto");l&&(l=document.createElement("img"),l.setAttribute("src",Dialog.prototype.closeImage),l.setAttribute("title",mxResources.get("close")),l.className="geDialogClose",
+k&&document.body.appendChild(this.bg);var v=a.createDiv(t?"geTransDialog":"geDialog");k=this.getPosition(h,m,e,d);h=k.x;m=k.y;v.style.width=e+"px";v.style.height=d+"px";v.style.left=h+"px";v.style.top=m+"px";v.style.zIndex=this.zIndex;v.appendChild(b);document.body.appendChild(v);!q&&b.clientHeight>v.clientHeight-64&&(b.style.overflowY="auto");l&&(l=document.createElement("img"),l.setAttribute("src",Dialog.prototype.closeImage),l.setAttribute("title",mxResources.get("close")),l.className="geDialogClose",
l.style.top=m+14+"px",l.style.left=h+e+38-f+"px",l.style.zIndex=this.zIndex,mxEvent.addListener(l,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(l),this.dialogImg=l,mxEvent.addGestureListeners(this.bg,null,null,mxUtils.bind(this,function(c){a.hideDialog(!0)})));this.resizeListener=mxUtils.bind(this,function(){if(null!=c){var w=c();null!=w&&(g=e=w.w,n=d=w.h)}r=Math.max(document.body.clientHeight,document.documentElement.clientHeight);this.bg.style.height=r+"px";
h=Math.max(1,Math.round((document.body.clientWidth-e-64)/2));m=Math.max(1,Math.round((r-d-a.footerHeight)/3));e=Math.min(g,document.body.scrollWidth-64);d=Math.min(n,r-64);w=this.getPosition(h,m,e,d);h=w.x;m=w.y;v.style.left=h+"px";v.style.top=m+"px";v.style.width=e+"px";v.style.height=d+"px";!q&&b.clientHeight>v.clientHeight-64&&(b.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=m+14+"px",this.dialogImg.style.left=h+e+38-f+"px")});mxEvent.addListener(window,"resize",this.resizeListener);
this.onDialogClose=p;this.container=v;a.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-1;
@@ -2008,29 +2008,29 @@ Dialog.prototype.unlockedImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGg
"/unlocked.png";Dialog.prototype.bgOpacity=80;Dialog.prototype.getPosition=function(a,b){return new mxPoint(a,b)};Dialog.prototype.close=function(a,b){if(null!=this.onDialogClose){if(0==this.onDialogClose(a,b))return!1;this.onDialogClose=null}null!=this.dialogImg&&(this.dialogImg.parentNode.removeChild(this.dialogImg),this.dialogImg=null);null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);mxEvent.removeListener(window,"resize",this.resizeListener);this.container.parentNode.removeChild(this.container)};
var PrintDialog=function(a,b){this.create(a,b)};
PrintDialog.prototype.create=function(a){function b(a){var d=q.checked||c.checked,b=parseInt(g.value)/100;isNaN(b)&&(b=1,g.value="100%");var b=.75*b,n=e.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,r=1/e.pageScale;if(d){var k=q.checked?1:parseInt(f.value);isNaN(k)||(r=mxUtils.getScaleForPageCount(k,e,n))}e.getGraphBounds();var x=k=0,n=mxRectangle.fromRectangle(n);n.width=Math.ceil(n.width*b);n.height=Math.ceil(n.height*b);r*=b;!d&&e.pageVisible?(b=e.getPageLayout(),k-=b.x*n.width,x-=b.y*n.height):
-d=!0;d=PrintDialog.createPrintPreview(e,r,n,0,k,x,d);d.open();a&&PrintDialog.printPreview(d)}var e=a.editor.graph,d,k,l=document.createElement("table");l.style.width="100%";l.style.height="100%";var p=document.createElement("tbody");d=document.createElement("tr");var q=document.createElement("input");q.setAttribute("type","checkbox");k=document.createElement("td");k.setAttribute("colspan","2");k.style.fontSize="10pt";k.appendChild(q);var u=document.createElement("span");mxUtils.write(u," "+mxResources.get("fitPage"));
-k.appendChild(u);mxEvent.addListener(u,"click",function(a){q.checked=!q.checked;c.checked=!q.checked;mxEvent.consume(a)});mxEvent.addListener(q,"change",function(){c.checked=!q.checked});d.appendChild(k);p.appendChild(d);d=d.cloneNode(!1);var c=document.createElement("input");c.setAttribute("type","checkbox");k=document.createElement("td");k.style.fontSize="10pt";k.appendChild(c);u=document.createElement("span");mxUtils.write(u," "+mxResources.get("posterPrint")+":");k.appendChild(u);mxEvent.addListener(u,
+d=!0;d=PrintDialog.createPrintPreview(e,r,n,0,k,x,d);d.open();a&&PrintDialog.printPreview(d)}var e=a.editor.graph,d,k,l=document.createElement("table");l.style.width="100%";l.style.height="100%";var p=document.createElement("tbody");d=document.createElement("tr");var q=document.createElement("input");q.setAttribute("type","checkbox");k=document.createElement("td");k.setAttribute("colspan","2");k.style.fontSize="10pt";k.appendChild(q);var t=document.createElement("span");mxUtils.write(t," "+mxResources.get("fitPage"));
+k.appendChild(t);mxEvent.addListener(t,"click",function(a){q.checked=!q.checked;c.checked=!q.checked;mxEvent.consume(a)});mxEvent.addListener(q,"change",function(){c.checked=!q.checked});d.appendChild(k);p.appendChild(d);d=d.cloneNode(!1);var c=document.createElement("input");c.setAttribute("type","checkbox");k=document.createElement("td");k.style.fontSize="10pt";k.appendChild(c);t=document.createElement("span");mxUtils.write(t," "+mxResources.get("posterPrint")+":");k.appendChild(t);mxEvent.addListener(t,
"click",function(a){c.checked=!c.checked;q.checked=!c.checked;mxEvent.consume(a)});d.appendChild(k);var f=document.createElement("input");f.setAttribute("value","1");f.setAttribute("type","number");f.setAttribute("min","1");f.setAttribute("size","4");f.setAttribute("disabled","disabled");f.style.width="50px";k=document.createElement("td");k.style.fontSize="10pt";k.appendChild(f);mxUtils.write(k," "+mxResources.get("pages")+" (max)");d.appendChild(k);p.appendChild(d);mxEvent.addListener(c,"change",
function(){c.checked?f.removeAttribute("disabled"):f.setAttribute("disabled","disabled");q.checked=!c.checked});d=d.cloneNode(!1);k=document.createElement("td");mxUtils.write(k,mxResources.get("pageScale")+":");d.appendChild(k);k=document.createElement("td");var g=document.createElement("input");g.setAttribute("value","100 %");g.setAttribute("size","5");g.style.width="50px";k.appendChild(g);d.appendChild(k);p.appendChild(d);d=document.createElement("tr");k=document.createElement("td");k.colSpan=2;
-k.style.paddingTop="20px";k.setAttribute("align","right");u=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});u.className="geBtn";a.editor.cancelFirst&&k.appendChild(u);if(PrintDialog.previewEnabled){var n=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();b(!1)});n.className="geBtn";k.appendChild(n)}n=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();b(!0)});n.className="geBtn gePrimaryBtn";k.appendChild(n);a.editor.cancelFirst||
-k.appendChild(u);d.appendChild(k);p.appendChild(d);l.appendChild(p);this.container=l};PrintDialog.printPreview=function(a){if(null!=a.wnd){var b=function(){a.wnd.focus();a.wnd.print();a.wnd.close()};mxClient.IS_GC?window.setTimeout(b,500):b()}};
+k.style.paddingTop="20px";k.setAttribute("align","right");t=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});t.className="geBtn";a.editor.cancelFirst&&k.appendChild(t);if(PrintDialog.previewEnabled){var n=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();b(!1)});n.className="geBtn";k.appendChild(n)}n=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();b(!0)});n.className="geBtn gePrimaryBtn";k.appendChild(n);a.editor.cancelFirst||
+k.appendChild(t);d.appendChild(k);p.appendChild(d);l.appendChild(p);this.container=l};PrintDialog.printPreview=function(a){if(null!=a.wnd){var b=function(){a.wnd.focus();a.wnd.print();a.wnd.close()};mxClient.IS_GC?window.setTimeout(b,500):b()}};
PrintDialog.createPrintPreview=function(a,b,e,d,k,l,p){b=new mxPrintPreview(a,b,e,d,k,l);b.title=mxResources.get("preview");b.printBackgroundImage=!0;b.autoOrigin=p;a=a.background;if(null==a||""==a||a==mxConstants.NONE)a="#ffffff";b.backgroundColor=a;var q=b.writeHead;b.writeHead=function(a){q.apply(this,arguments);a.writeln('<style type="text/css">');a.writeln("@media screen {");a.writeln(" body > div { padding:30px;box-sizing:content-box; }");a.writeln("}");a.writeln("</style>")};return b};
PrintDialog.previewEnabled=!0;
var PageSetupDialog=function(a){function b(){null==f||f==mxConstants.NONE?(c.style.backgroundColor="",c.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(c.style.backgroundColor=f,c.style.backgroundImage="")}function e(){null==r?(n.removeAttribute("title"),n.style.fontSize="",n.innerHTML=mxResources.get("change")+"..."):(n.setAttribute("title",r.src),n.style.fontSize="11px",n.innerHTML=r.src.substring(0,42)+"...")}var d=a.editor.graph,k,l,p=document.createElement("table");p.style.width=
-"100%";p.style.height="100%";var q=document.createElement("tbody");k=document.createElement("tr");l=document.createElement("td");l.style.verticalAlign="top";l.style.fontSize="10pt";mxUtils.write(l,mxResources.get("paperSize")+":");k.appendChild(l);l=document.createElement("td");l.style.verticalAlign="top";l.style.fontSize="10pt";var u=PageSetupDialog.addPageFormatPanel(l,"pagesetupdialog",d.pageFormat);k.appendChild(l);q.appendChild(k);k=document.createElement("tr");l=document.createElement("td");
+"100%";p.style.height="100%";var q=document.createElement("tbody");k=document.createElement("tr");l=document.createElement("td");l.style.verticalAlign="top";l.style.fontSize="10pt";mxUtils.write(l,mxResources.get("paperSize")+":");k.appendChild(l);l=document.createElement("td");l.style.verticalAlign="top";l.style.fontSize="10pt";var t=PageSetupDialog.addPageFormatPanel(l,"pagesetupdialog",d.pageFormat);k.appendChild(l);q.appendChild(k);k=document.createElement("tr");l=document.createElement("td");
mxUtils.write(l,mxResources.get("background")+":");k.appendChild(l);l=document.createElement("td");l.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var c=document.createElement("button");c.style.width="18px";c.style.height="18px";c.style.marginRight="20px";c.style.backgroundPosition="center center";c.style.backgroundRepeat="no-repeat";var f=d.background;b();mxEvent.addListener(c,"click",function(c){a.pickColor(f||"none",function(a){f=a;b()});mxEvent.consume(c)});
l.appendChild(c);mxUtils.write(l,mxResources.get("gridSize")+":");var g=document.createElement("input");g.setAttribute("type","number");g.setAttribute("min","0");g.style.width="40px";g.style.marginLeft="6px";g.value=d.getGridSize();l.appendChild(g);mxEvent.addListener(g,"change",function(){var a=parseInt(g.value);g.value=Math.max(1,isNaN(a)?d.getGridSize():a)});k.appendChild(l);q.appendChild(k);k=document.createElement("tr");l=document.createElement("td");mxUtils.write(l,mxResources.get("image")+
":");k.appendChild(l);l=document.createElement("td");var n=document.createElement("a");n.style.textDecoration="underline";n.style.cursor="pointer";n.style.color="#a0a0a0";var r=d.backgroundImage;mxEvent.addListener(n,"click",function(c){a.showBackgroundImageDialog(function(a){r=a;e()});mxEvent.consume(c)});e();l.appendChild(n);k.appendChild(l);q.appendChild(k);k=document.createElement("tr");l=document.createElement("td");l.colSpan=2;l.style.paddingTop="16px";l.setAttribute("align","right");var h=
-mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});h.className="geBtn";a.editor.cancelFirst&&l.appendChild(h);var m=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();d.gridSize!==g.value&&d.setGridSize(parseInt(g.value));var c=new ChangePageSetup(a,f,r,u.get());c.ignoreColor=d.background==f;c.ignoreImage=(null!=d.backgroundImage?d.backgroundImage.src:null)===(null!=r?r.src:null);d.pageFormat.width==c.previousFormat.width&&d.pageFormat.height==c.previousFormat.height&&
+mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});h.className="geBtn";a.editor.cancelFirst&&l.appendChild(h);var m=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();d.gridSize!==g.value&&d.setGridSize(parseInt(g.value));var c=new ChangePageSetup(a,f,r,t.get());c.ignoreColor=d.background==f;c.ignoreImage=(null!=d.backgroundImage?d.backgroundImage.src:null)===(null!=r?r.src:null);d.pageFormat.width==c.previousFormat.width&&d.pageFormat.height==c.previousFormat.height&&
c.ignoreColor&&c.ignoreImage||d.model.execute(c)});m.className="geBtn gePrimaryBtn";l.appendChild(m);a.editor.cancelFirst||l.appendChild(h);k.appendChild(l);q.appendChild(k);p.appendChild(q);this.container=p};
-PageSetupDialog.addPageFormatPanel=function(a,b,e,d){function k(a,c,d){if(d||g!=document.activeElement&&n!=document.activeElement){a=!1;for(c=0;c<h.length;c++)d=h[c],D?"custom"==d.key&&(q.value=d.key,D=!1):null!=d.format&&("a4"==d.key?826==e.width?(e=mxRectangle.fromRectangle(e),e.width=827):826==e.height&&(e=mxRectangle.fromRectangle(e),e.height=827):"a5"==d.key&&(584==e.width?(e=mxRectangle.fromRectangle(e),e.width=583):584==e.height&&(e=mxRectangle.fromRectangle(e),e.height=583)),e.width==d.format.width&&
-e.height==d.format.height?(q.value=d.key,l.setAttribute("checked","checked"),l.defaultChecked=!0,l.checked=!0,p.removeAttribute("checked"),p.defaultChecked=!1,p.checked=!1,a=!0):e.width==d.format.height&&e.height==d.format.width&&(q.value=d.key,l.removeAttribute("checked"),l.defaultChecked=!1,l.checked=!1,p.setAttribute("checked","checked"),p.defaultChecked=!0,a=p.checked=!0));a?(u.style.display="",f.style.display="none"):(g.value=e.width/100,n.value=e.height/100,l.setAttribute("checked","checked"),
-q.value="custom",u.style.display="none",f.style.display="")}}b="format-"+b;var l=document.createElement("input");l.setAttribute("name",b);l.setAttribute("type","radio");l.setAttribute("value","portrait");var p=document.createElement("input");p.setAttribute("name",b);p.setAttribute("type","radio");p.setAttribute("value","landscape");var q=document.createElement("select");q.style.marginBottom="8px";q.style.width="202px";var u=document.createElement("div");u.style.marginLeft="4px";u.style.width="210px";
-u.style.height="24px";l.style.marginRight="6px";u.appendChild(l);b=document.createElement("span");b.style.maxWidth="100px";mxUtils.write(b,mxResources.get("portrait"));u.appendChild(b);p.style.marginLeft="10px";p.style.marginRight="6px";u.appendChild(p);var c=document.createElement("span");c.style.width="100px";mxUtils.write(c,mxResources.get("landscape"));u.appendChild(c);var f=document.createElement("div");f.style.marginLeft="4px";f.style.width="210px";f.style.height="24px";var g=document.createElement("input");
-g.setAttribute("size","7");g.style.textAlign="right";f.appendChild(g);mxUtils.write(f," in x ");var n=document.createElement("input");n.setAttribute("size","7");n.style.textAlign="right";f.appendChild(n);mxUtils.write(f," in");u.style.display="none";f.style.display="none";for(var r={},h=PageSetupDialog.getFormats(),m=0;m<h.length;m++){var w=h[m];r[w.key]=w;var v=document.createElement("option");v.setAttribute("value",w.key);mxUtils.write(v,w.title);q.appendChild(v)}var D=!1;k();a.appendChild(q);mxUtils.br(a);
-a.appendChild(u);a.appendChild(f);var x=e,t=function(a,c){var b=r[q.value];null!=b.format?(g.value=b.format.width/100,n.value=b.format.height/100,f.style.display="none",u.style.display=""):(u.style.display="none",f.style.display="");b=parseFloat(g.value);if(isNaN(b)||0>=b)g.value=e.width/100;b=parseFloat(n.value);if(isNaN(b)||0>=b)n.value=e.height/100;b=new mxRectangle(0,0,Math.floor(100*parseFloat(g.value)),Math.floor(100*parseFloat(n.value)));"custom"!=q.value&&p.checked&&(b=new mxRectangle(0,0,
-b.height,b.width));c&&D||b.width==x.width&&b.height==x.height||(x=b,null!=d&&d(x))};mxEvent.addListener(b,"click",function(a){l.checked=!0;t(a);mxEvent.consume(a)});mxEvent.addListener(c,"click",function(a){p.checked=!0;t(a);mxEvent.consume(a)});mxEvent.addListener(g,"blur",t);mxEvent.addListener(g,"click",t);mxEvent.addListener(n,"blur",t);mxEvent.addListener(n,"click",t);mxEvent.addListener(p,"change",t);mxEvent.addListener(l,"change",t);mxEvent.addListener(q,"change",function(a){D="custom"==q.value;
-t(a,!0)});t();return{set:function(a){e=a;k(null,null,!0)},get:function(){return x},widthInput:g,heightInput:n}};
+PageSetupDialog.addPageFormatPanel=function(a,b,e,d){function k(a,c,d){if(d||g!=document.activeElement&&n!=document.activeElement){a=!1;for(c=0;c<h.length;c++)d=h[c],E?"custom"==d.key&&(q.value=d.key,E=!1):null!=d.format&&("a4"==d.key?826==e.width?(e=mxRectangle.fromRectangle(e),e.width=827):826==e.height&&(e=mxRectangle.fromRectangle(e),e.height=827):"a5"==d.key&&(584==e.width?(e=mxRectangle.fromRectangle(e),e.width=583):584==e.height&&(e=mxRectangle.fromRectangle(e),e.height=583)),e.width==d.format.width&&
+e.height==d.format.height?(q.value=d.key,l.setAttribute("checked","checked"),l.defaultChecked=!0,l.checked=!0,p.removeAttribute("checked"),p.defaultChecked=!1,p.checked=!1,a=!0):e.width==d.format.height&&e.height==d.format.width&&(q.value=d.key,l.removeAttribute("checked"),l.defaultChecked=!1,l.checked=!1,p.setAttribute("checked","checked"),p.defaultChecked=!0,a=p.checked=!0));a?(t.style.display="",f.style.display="none"):(g.value=e.width/100,n.value=e.height/100,l.setAttribute("checked","checked"),
+q.value="custom",t.style.display="none",f.style.display="")}}b="format-"+b;var l=document.createElement("input");l.setAttribute("name",b);l.setAttribute("type","radio");l.setAttribute("value","portrait");var p=document.createElement("input");p.setAttribute("name",b);p.setAttribute("type","radio");p.setAttribute("value","landscape");var q=document.createElement("select");q.style.marginBottom="8px";q.style.width="202px";var t=document.createElement("div");t.style.marginLeft="4px";t.style.width="210px";
+t.style.height="24px";l.style.marginRight="6px";t.appendChild(l);b=document.createElement("span");b.style.maxWidth="100px";mxUtils.write(b,mxResources.get("portrait"));t.appendChild(b);p.style.marginLeft="10px";p.style.marginRight="6px";t.appendChild(p);var c=document.createElement("span");c.style.width="100px";mxUtils.write(c,mxResources.get("landscape"));t.appendChild(c);var f=document.createElement("div");f.style.marginLeft="4px";f.style.width="210px";f.style.height="24px";var g=document.createElement("input");
+g.setAttribute("size","7");g.style.textAlign="right";f.appendChild(g);mxUtils.write(f," in x ");var n=document.createElement("input");n.setAttribute("size","7");n.style.textAlign="right";f.appendChild(n);mxUtils.write(f," in");t.style.display="none";f.style.display="none";for(var r={},h=PageSetupDialog.getFormats(),m=0;m<h.length;m++){var w=h[m];r[w.key]=w;var v=document.createElement("option");v.setAttribute("value",w.key);mxUtils.write(v,w.title);q.appendChild(v)}var E=!1;k();a.appendChild(q);mxUtils.br(a);
+a.appendChild(t);a.appendChild(f);var x=e,u=function(a,c){var b=r[q.value];null!=b.format?(g.value=b.format.width/100,n.value=b.format.height/100,f.style.display="none",t.style.display=""):(t.style.display="none",f.style.display="");b=parseFloat(g.value);if(isNaN(b)||0>=b)g.value=e.width/100;b=parseFloat(n.value);if(isNaN(b)||0>=b)n.value=e.height/100;b=new mxRectangle(0,0,Math.floor(100*parseFloat(g.value)),Math.floor(100*parseFloat(n.value)));"custom"!=q.value&&p.checked&&(b=new mxRectangle(0,0,
+b.height,b.width));c&&E||b.width==x.width&&b.height==x.height||(x=b,null!=d&&d(x))};mxEvent.addListener(b,"click",function(a){l.checked=!0;u(a);mxEvent.consume(a)});mxEvent.addListener(c,"click",function(a){p.checked=!0;u(a);mxEvent.consume(a)});mxEvent.addListener(g,"blur",u);mxEvent.addListener(g,"click",u);mxEvent.addListener(n,"blur",u);mxEvent.addListener(n,"click",u);mxEvent.addListener(p,"change",u);mxEvent.addListener(l,"change",u);mxEvent.addListener(q,"change",function(a){E="custom"==q.value;
+u(a,!0)});u();return{set:function(a){e=a;k(null,null,!0)},get:function(){return x},widthInput:g,heightInput:n}};
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 (279 mm x 432 mm)",format:new mxRectangle(0,0,1100,1700)},{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:"custom",title:mxResources.get("custom"),format:null}]};
(function(){mxGraphView.prototype.validateBackgroundPage=function(){var a=this.graph;if(null!=a.container&&!a.transparentBackground){if(a.pageVisible){var d=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var c=a.container.firstChild;null!=c&&c.nodeType!=mxConstants.NODETYPE_ELEMENT;)c=c.nextSibling;null!=c&&(this.backgroundPageShape=this.createBackgroundPageShape(d),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!mxClient.IS_QUIRKS,this.backgroundPageShape.dialect=
@@ -2055,18 +2055,18 @@ k,this.toolbarContainer.onselectstart=k,this.toolbarContainer.onmousedown=k,this
if("A"==c.nodeName)for(;null!=c;){if("geHint"==c.className)return!0;c=c.parentNode}return k(a)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",b):this.diagramContainer.oncontextmenu=b):d.panningHandler.usePopupTrigger=!1;d.init(this.diagramContainer);mxClient.IS_SVG&&null!=d.view.getDrawPane()&&(b=d.view.getDrawPane().ownerSVGElement,null!=b&&(b.style.position="absolute"));this.hoverIcons=this.createHoverIcons();
mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(a){var c=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(a)-c.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(a)-c.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var l=!1,p=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(a,c){return l||p.apply(this,arguments)};this.keydownHandler=
mxUtils.bind(this,function(a){32==a.which?(l=!0,this.hoverIcons.reset(),d.container.style.cursor="move",d.isEditing()||mxEvent.getSource(a)!=d.container||mxEvent.consume(a)):mxEvent.isConsumed(a)||27!=a.keyCode||this.hideDialog(null,!0)});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(a){d.container.style.cursor="";l=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var q=d.panningHandler.isForcePanningEvent;d.panningHandler.isForcePanningEvent=
-function(a){return q.apply(this,arguments)||l||mxEvent.isMouseEvent(a.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(a.getEvent()))&&(!mxEvent.isControlDown(a.getEvent())&&mxEvent.isRightMouseButton(a.getEvent())||mxEvent.isMiddleMouseButton(a.getEvent()))};var u=d.cellEditor.isStopEditingEvent;d.cellEditor.isStopEditingEvent=function(a){return u.apply(this,arguments)||13==a.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxClient.IS_SF&&mxEvent.isShiftDown(a))};
+function(a){return q.apply(this,arguments)||l||mxEvent.isMouseEvent(a.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(a.getEvent()))&&(!mxEvent.isControlDown(a.getEvent())&&mxEvent.isRightMouseButton(a.getEvent())||mxEvent.isMiddleMouseButton(a.getEvent()))};var t=d.cellEditor.isStopEditingEvent;d.cellEditor.isStopEditingEvent=function(a){return t.apply(this,arguments)||13==a.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxClient.IS_SF&&mxEvent.isShiftDown(a))};
var c=!1,f=null,g=null,n=null,r=mxUtils.bind(this,function(){if(null!=this.toolbar&&c!=d.cellEditor.isContentEditing()){for(var a=this.toolbar.container.firstChild,b=[];null!=a;){var e=a.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,a)&&(a.parentNode.removeChild(a),b.push(a));a=e}a=this.toolbar.fontMenu;e=this.toolbar.sizeMenu;if(null==n)this.toolbar.createTextToolbar();else{for(var h=0;h<n.length;h++)this.toolbar.container.appendChild(n[h]);this.toolbar.fontMenu=f;this.toolbar.sizeMenu=
g}c=d.cellEditor.isContentEditing();f=a;g=e;n=b}}),h=this,m=d.cellEditor.startEditing;d.cellEditor.startEditing=function(){m.apply(this,arguments);r();if(d.cellEditor.isContentEditing()){var a=!1,c=function(){a||(a=!0,window.setTimeout(function(){for(var c=d.getSelectedElement();null!=c&&c.nodeType!=mxConstants.NODETYPE_ELEMENT;)c=c.parentNode;if(null!=c&&(c=mxUtils.getCurrentStyle(c),null!=c&&null!=h.toolbar)){var b=c.fontFamily;"'"==b.charAt(0)&&(b=b.substring(1));"'"==b.charAt(b.length-1)&&(b=
b.substring(0,b.length-1));h.toolbar.setFontName(b);h.toolbar.setFontSize(parseInt(c.fontSize))}a=!1},0))};mxEvent.addListener(d.cellEditor.textarea,"input",c);mxEvent.addListener(d.cellEditor.textarea,"touchend",c);mxEvent.addListener(d.cellEditor.textarea,"mouseup",c);mxEvent.addListener(d.cellEditor.textarea,"keyup",c);c()}};var w=d.cellEditor.stopEditing;d.cellEditor.stopEditing=function(a,c){w.apply(this,arguments);r()};d.container.setAttribute("tabindex","0");d.container.style.cursor="default";
-if(window.self===window.top&&null!=d.container.parentNode)try{d.container.focus()}catch(C){}var v=d.fireMouseEvent;d.fireMouseEvent=function(a,c,b){a==mxEvent.MOUSE_DOWN&&this.container.focus();v.apply(this,arguments)};d.popupMenuHandler.autoExpand=!0;null!=this.menus&&(d.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(a,c,b){this.menus.createPopupMenu(a,c,b)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(a){d.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);
-this.getKeyHandler=function(){return keyHandler};var D="rounded shadow glass dashed dashPattern comic labelBackgroundColor".split(" "),x="shape edgeStyle curved rounded elbow comic jumpStyle jumpSize".split(" ");this.setDefaultStyle=function(a){var c=d.view.getState(a);if(null!=c){a=a.clone();a.style="";a=d.getCellStyle(a);var b=[],f=[],g;for(g in c.style)a[g]!=c.style[g]&&(b.push(c.style[g]),f.push(g));g=d.getModel().getStyle(c.cell);for(var e=null!=g?g.split(";"):[],h=0;h<e.length;h++){var n=e[h],
-m=n.indexOf("=");0<=m&&(g=n.substring(0,m),n=n.substring(m+1),null!=a[g]&&"none"==n&&(b.push(n),f.push(g)))}d.getModel().isEdge(c.cell)?d.currentEdgeStyle={}:d.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",f,"values",b,"cells",[c.cell]))}};this.clearDefaultStyle=function(){d.currentEdgeStyle=mxUtils.clone(d.defaultEdgeStyle);d.currentVertexStyle=mxUtils.clone(d.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var t=
-["fontFamily","fontSize","fontColor"],z="edgeStyle startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),B=["startArrow startFill startSize sourcePerimeterSpacing endArrow endFill endSize targetPerimeterSpacing jettySize orthogonalLoop".split(" "),["strokeColor","strokeWidth"],["fillColor","gradientColor"],t,["opacity"],["align"],["html"]];for(a=0;a<B.length;a++)for(b=0;b<B[a].length;b++)D.push(B[a][b]);for(a=0;a<x.length;a++)0>mxUtils.indexOf(D,x[a])&&D.push(x[a]);
-var N=function(a,c){var b=d.getModel();b.beginUpdate();try{if(c)for(var f=b.isEdge(n),g=f?d.currentEdgeStyle:d.currentVertexStyle,f=["fontSize","fontFamily","fontColor"],e=0;e<f.length;e++){var h=g[f[e]];null!=h&&d.setCellStyles(f[e],h,a)}else for(h=0;h<a.length;h++){for(var n=a[h],m=b.getStyle(n),r=null!=m?m.split(";"):[],H=D.slice(),e=0;e<r.length;e++){var t=r[e],v=t.indexOf("=");if(0<=v){var k=t.substring(0,v),z=mxUtils.indexOf(H,k);0<=z&&H.splice(z,1);for(var w=0;w<B.length;w++){var q=B[w];if(0<=
-mxUtils.indexOf(q,k))for(var l=0;l<q.length;l++){var p=mxUtils.indexOf(H,q[l]);0<=p&&H.splice(p,1)}}}}for(var g=(f=b.isEdge(n))?d.currentEdgeStyle:d.currentVertexStyle,G=b.getStyle(n),e=0;e<H.length;e++){var k=H[e],C=g[k];null==C||"shape"==k&&!f||f&&!(0>mxUtils.indexOf(x,k))||(G=mxUtils.setStyle(G,k,C))}b.setStyle(n,G)}}finally{b.endUpdate()}};d.addListener("cellsInserted",function(a,c){N(c.getProperty("cells"))});d.addListener("textInserted",function(a,c){N(c.getProperty("cells"),!0)});d.connectionHandler.addListener(mxEvent.CONNECT,
-function(a,c){var b=[c.getProperty("cell")];c.getProperty("terminalInserted")&&b.push(c.getProperty("terminal"));N(b)});this.addListener("styleChanged",mxUtils.bind(this,function(a,c){var b=c.getProperty("cells"),f=!1,g=!1;if(0<b.length)for(var e=0;e<b.length&&(f=d.getModel().isVertex(b[e])||f,!(g=d.getModel().isEdge(b[e])||g)||!f);e++);else g=f=!0;for(var b=c.getProperty("keys"),h=c.getProperty("values"),e=0;e<b.length;e++){var n=0<=mxUtils.indexOf(t,b[e]);if("strokeColor"!=b[e]||null!=h[e]&&"none"!=
-h[e])if(0<=mxUtils.indexOf(x,b[e]))g||0<=mxUtils.indexOf(z,b[e])?null==h[e]?delete d.currentEdgeStyle[b[e]]:d.currentEdgeStyle[b[e]]=h[e]:f&&0<=mxUtils.indexOf(D,b[e])&&(null==h[e]?delete d.currentVertexStyle[b[e]]:d.currentVertexStyle[b[e]]=h[e]);else if(0<=mxUtils.indexOf(D,b[e])){if(f||n)null==h[e]?delete d.currentVertexStyle[b[e]]:d.currentVertexStyle[b[e]]=h[e];if(g||n||0<=mxUtils.indexOf(z,b[e]))null==h[e]?delete d.currentEdgeStyle[b[e]]:d.currentEdgeStyle[b[e]]=h[e]}}null!=this.toolbar&&(this.toolbar.setFontName(d.currentVertexStyle.fontFamily||
+if(window.self===window.top&&null!=d.container.parentNode)try{d.container.focus()}catch(D){}var v=d.fireMouseEvent;d.fireMouseEvent=function(a,c,b){a==mxEvent.MOUSE_DOWN&&this.container.focus();v.apply(this,arguments)};d.popupMenuHandler.autoExpand=!0;null!=this.menus&&(d.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(a,c,b){this.menus.createPopupMenu(a,c,b)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(a){d.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);
+this.getKeyHandler=function(){return keyHandler};var E="rounded shadow glass dashed dashPattern comic labelBackgroundColor".split(" "),x="shape edgeStyle curved rounded elbow comic jumpStyle jumpSize".split(" ");this.setDefaultStyle=function(a){var c=d.view.getState(a);if(null!=c){a=a.clone();a.style="";a=d.getCellStyle(a);var b=[],f=[],g;for(g in c.style)a[g]!=c.style[g]&&(b.push(c.style[g]),f.push(g));g=d.getModel().getStyle(c.cell);for(var e=null!=g?g.split(";"):[],h=0;h<e.length;h++){var n=e[h],
+m=n.indexOf("=");0<=m&&(g=n.substring(0,m),n=n.substring(m+1),null!=a[g]&&"none"==n&&(b.push(n),f.push(g)))}d.getModel().isEdge(c.cell)?d.currentEdgeStyle={}:d.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",f,"values",b,"cells",[c.cell]))}};this.clearDefaultStyle=function(){d.currentEdgeStyle=mxUtils.clone(d.defaultEdgeStyle);d.currentVertexStyle=mxUtils.clone(d.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var u=
+["fontFamily","fontSize","fontColor"],z="edgeStyle startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),C=["startArrow startFill startSize sourcePerimeterSpacing endArrow endFill endSize targetPerimeterSpacing jettySize orthogonalLoop".split(" "),["strokeColor","strokeWidth"],["fillColor","gradientColor"],u,["opacity"],["align"],["html"]];for(a=0;a<C.length;a++)for(b=0;b<C[a].length;b++)E.push(C[a][b]);for(a=0;a<x.length;a++)0>mxUtils.indexOf(E,x[a])&&E.push(x[a]);
+var N=function(a,c){var b=d.getModel();b.beginUpdate();try{if(c)for(var f=b.isEdge(n),g=f?d.currentEdgeStyle:d.currentVertexStyle,f=["fontSize","fontFamily","fontColor"],e=0;e<f.length;e++){var h=g[f[e]];null!=h&&d.setCellStyles(f[e],h,a)}else for(h=0;h<a.length;h++){for(var n=a[h],m=b.getStyle(n),r=null!=m?m.split(";"):[],H=E.slice(),e=0;e<r.length;e++){var u=r[e],v=u.indexOf("=");if(0<=v){var k=u.substring(0,v),z=mxUtils.indexOf(H,k);0<=z&&H.splice(z,1);for(var w=0;w<C.length;w++){var q=C[w];if(0<=
+mxUtils.indexOf(q,k))for(var l=0;l<q.length;l++){var p=mxUtils.indexOf(H,q[l]);0<=p&&H.splice(p,1)}}}}for(var g=(f=b.isEdge(n))?d.currentEdgeStyle:d.currentVertexStyle,G=b.getStyle(n),e=0;e<H.length;e++){var k=H[e],D=g[k];null==D||"shape"==k&&!f||f&&!(0>mxUtils.indexOf(x,k))||(G=mxUtils.setStyle(G,k,D))}b.setStyle(n,G)}}finally{b.endUpdate()}};d.addListener("cellsInserted",function(a,c){N(c.getProperty("cells"))});d.addListener("textInserted",function(a,c){N(c.getProperty("cells"),!0)});d.connectionHandler.addListener(mxEvent.CONNECT,
+function(a,c){var b=[c.getProperty("cell")];c.getProperty("terminalInserted")&&b.push(c.getProperty("terminal"));N(b)});this.addListener("styleChanged",mxUtils.bind(this,function(a,c){var b=c.getProperty("cells"),f=!1,g=!1;if(0<b.length)for(var e=0;e<b.length&&(f=d.getModel().isVertex(b[e])||f,!(g=d.getModel().isEdge(b[e])||g)||!f);e++);else g=f=!0;for(var b=c.getProperty("keys"),h=c.getProperty("values"),e=0;e<b.length;e++){var n=0<=mxUtils.indexOf(u,b[e]);if("strokeColor"!=b[e]||null!=h[e]&&"none"!=
+h[e])if(0<=mxUtils.indexOf(x,b[e]))g||0<=mxUtils.indexOf(z,b[e])?null==h[e]?delete d.currentEdgeStyle[b[e]]:d.currentEdgeStyle[b[e]]=h[e]:f&&0<=mxUtils.indexOf(E,b[e])&&(null==h[e]?delete d.currentVertexStyle[b[e]]:d.currentVertexStyle[b[e]]=h[e]);else if(0<=mxUtils.indexOf(E,b[e])){if(f||n)null==h[e]?delete d.currentVertexStyle[b[e]]:d.currentVertexStyle[b[e]]=h[e];if(g||n||0<=mxUtils.indexOf(z,b[e]))null==h[e]?delete d.currentEdgeStyle[b[e]]:d.currentEdgeStyle[b[e]]=h[e]}}null!=this.toolbar&&(this.toolbar.setFontName(d.currentVertexStyle.fontFamily||
Menus.prototype.defaultFont),this.toolbar.setFontSize(d.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==d.currentEdgeStyle.edgeStyle&&"1"==d.currentEdgeStyle.curved?"geSprite geSprite-curved":"straight"==d.currentEdgeStyle.edgeStyle||"none"==d.currentEdgeStyle.edgeStyle||null==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-straight":"entityRelationEdgeStyle"==
d.currentEdgeStyle.edgeStyle?"geSprite geSprite-entity":"elbowEdgeStyle"==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==d.currentEdgeStyle.elbow?"verticalelbow":"horizontalelbow"):"isometricEdgeStyle"==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==d.currentEdgeStyle.elbow?"verticalisometric":"horizontalisometric"):"geSprite geSprite-orthogonal"),null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==d.currentEdgeStyle.shape?
"geSprite geSprite-linkedge":"flexArrow"==d.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==d.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"),null!=this.toolbar.lineStartMenu&&(this.toolbar.lineStartMenu.getElementsByTagName("div")[0].className=this.getCssClassForMarker("start",d.currentEdgeStyle.shape,d.currentEdgeStyle[mxConstants.STYLE_STARTARROW],mxUtils.getValue(d.currentEdgeStyle,"startFill","1"))),null!=this.toolbar.lineEndMenu&&(this.toolbar.lineEndMenu.getElementsByTagName("div")[0].className=
@@ -2089,14 +2089,14 @@ EditorUi.prototype.initClipboard=function(){var a=this,b=mxClipboard.cut;mxClipb
!1,null):e=d.apply(this,arguments);a.updatePasteActionStates();return e};var k=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){k.apply(this,arguments);a.updatePasteActionStates()};var l=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(b,d){l.apply(this,arguments);a.updatePasteActionStates()};this.updatePasteActionStates()};EditorUi.prototype.lazyZoomDelay=20;
EditorUi.prototype.initCanvas=function(){var a=this.editor.graph;a.timerAutoScroll=!0;a.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((a.container.offsetWidth-34)/a.view.scale)),Math.max(0,Math.round((a.container.offsetHeight-34)/a.view.scale)))};a.view.getBackgroundPageBounds=function(){var a=this.graph.getPageLayout(),c=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*c.width),this.scale*(this.translate.y+a.y*c.height),this.scale*a.width*c.width,
this.scale*a.height*c.height)};a.getPreferredPageSize=function(a,c,b){a=this.getPageLayout();c=this.getPageSize();return new mxRectangle(0,0,a.width*c.width,a.height*c.height)};var b=null,e=this;if(this.editor.isChromelessView()){this.chromelessResize=b=mxUtils.bind(this,function(c,b,d,f){if(null!=a.container){d=null!=d?d:0;f=null!=f?f:0;var g=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),e=mxUtils.hasScrollbars(a.container),h=a.view.translate,n=a.view.scale,m=mxRectangle.fromRectangle(g);
-m.x=m.x/n-h.x;m.y=m.y/n-h.y;m.width/=n;m.height/=n;var h=a.container.scrollTop,r=a.container.scrollLeft,t=mxClient.IS_QUIRKS||8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)t+=3;var x=a.container.offsetWidth-t,t=a.container.offsetHeight-t;c=c?Math.max(.3,Math.min(b||1,x/m.width)):n;b=(x-c*m.width)/2/c;var H=0==this.lightboxVerticalDivider?0:(t-c*m.height)/this.lightboxVerticalDivider/c;e&&(b=Math.max(b,0),H=Math.max(H,0));if(e||g.width<x||g.height<t)a.view.scaleAndTranslate(c,
+m.x=m.x/n-h.x;m.y=m.y/n-h.y;m.width/=n;m.height/=n;var h=a.container.scrollTop,r=a.container.scrollLeft,u=mxClient.IS_QUIRKS||8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)u+=3;var x=a.container.offsetWidth-u,u=a.container.offsetHeight-u;c=c?Math.max(.3,Math.min(b||1,x/m.width)):n;b=(x-c*m.width)/2/c;var H=0==this.lightboxVerticalDivider?0:(u-c*m.height)/this.lightboxVerticalDivider/c;e&&(b=Math.max(b,0),H=Math.max(H,0));if(e||g.width<x||g.height<u)a.view.scaleAndTranslate(c,
Math.floor(b-m.x),Math.floor(H-m.y)),a.container.scrollTop=h*c/n,a.container.scrollLeft=r*c/n;else if(0!=d||0!=f)g=a.view.translate,a.view.setTranslate(Math.floor(g.x+d/n),Math.floor(g.y+f/n))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var d=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",d);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",d)});this.editor.addListener("resetGraphView",
mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(c){a.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(c){a.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){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.backgroundColor="#000000";this.chromelessToolbar.style.padding="10px 10px 8px 10px";this.chromelessToolbar.style.left="50%";mxClient.IS_VML||(mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"borderRadius","20px"),mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out"));var k=mxUtils.bind(this,function(){var c=mxUtils.getCurrentStyle(a.container);this.chromelessToolbar.style.bottom=(null!=c?parseInt(c["margin-bottom"]||
0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",k);k();var l=0,k=mxUtils.bind(this,function(a,c,b){l++;var d=document.createElement("span");d.style.paddingLeft="8px";d.style.paddingRight="8px";d.style.cursor="pointer";mxEvent.addListener(d,"click",a);null!=b&&d.setAttribute("title",b);a=document.createElement("img");a.setAttribute("border","0");a.setAttribute("src",c);d.appendChild(a);this.chromelessToolbar.appendChild(d);
-return d}),p=k(mxUtils.bind(this,function(a){this.actions.get("previousPage").funct();mxEvent.consume(a)}),Editor.previousLargeImage,mxResources.get("previousPage")),q=document.createElement("div");q.style.display="inline-block";q.style.verticalAlign="top";q.style.fontFamily="Helvetica,Arial";q.style.marginTop="8px";q.style.fontSize="14px";q.style.color="#ffffff";this.chromelessToolbar.appendChild(q);var u=k(mxUtils.bind(this,function(a){this.actions.get("nextPage").funct();mxEvent.consume(a)}),Editor.nextLargeImage,
-mxResources.get("nextPage")),c=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(q.innerHTML="",mxUtils.write(q,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});p.style.paddingLeft="0px";p.style.paddingRight="4px";u.style.paddingLeft="4px";u.style.paddingRight="0px";var f=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(u.style.display="",p.style.display="",q.style.display="inline-block"):
-(u.style.display="none",p.style.display="none",q.style.display="none");c()});this.editor.addListener("resetGraphView",f);this.editor.addListener("pageSelected",c);k(mxUtils.bind(this,function(a){this.actions.get("zoomOut").funct();mxEvent.consume(a)}),Editor.zoomOutLargeImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");k(mxUtils.bind(this,function(a){this.actions.get("zoomIn").funct();mxEvent.consume(a)}),Editor.zoomInLargeImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");k(mxUtils.bind(this,
+return d}),p=k(mxUtils.bind(this,function(a){this.actions.get("previousPage").funct();mxEvent.consume(a)}),Editor.previousLargeImage,mxResources.get("previousPage")),q=document.createElement("div");q.style.display="inline-block";q.style.verticalAlign="top";q.style.fontFamily="Helvetica,Arial";q.style.marginTop="8px";q.style.fontSize="14px";q.style.color="#ffffff";this.chromelessToolbar.appendChild(q);var t=k(mxUtils.bind(this,function(a){this.actions.get("nextPage").funct();mxEvent.consume(a)}),Editor.nextLargeImage,
+mxResources.get("nextPage")),c=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(q.innerHTML="",mxUtils.write(q,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});p.style.paddingLeft="0px";p.style.paddingRight="4px";t.style.paddingLeft="4px";t.style.paddingRight="0px";var f=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(t.style.display="",p.style.display="",q.style.display="inline-block"):
+(t.style.display="none",p.style.display="none",q.style.display="none");c()});this.editor.addListener("resetGraphView",f);this.editor.addListener("pageSelected",c);k(mxUtils.bind(this,function(a){this.actions.get("zoomOut").funct();mxEvent.consume(a)}),Editor.zoomOutLargeImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");k(mxUtils.bind(this,function(a){this.actions.get("zoomIn").funct();mxEvent.consume(a)}),Editor.zoomInLargeImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");k(mxUtils.bind(this,
function(c){a.isLightboxView()?(1==a.view.scale?this.lightboxFit():a.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(c)}),Editor.actualSizeLargeImage,mxResources.get("fit"));var g=null,n=null,r=mxUtils.bind(this,function(a){null!=g&&(window.clearTimeout(g),fadeThead=null);null!=n&&(window.clearTimeout(n),fadeThead2=null);g=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);g=null;n=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display=
"none";n=null}),600)}),a||200)}),h=mxUtils.bind(this,function(a){null!=g&&(window.clearTimeout(g),fadeThead=null);null!=n&&(window.clearTimeout(n),fadeThead2=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,a||30)});if("1"==urlParams.layers){this.layersDialog=null;var m=k(mxUtils.bind(this,function(c){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=a.createLayersDialog();mxEvent.addListener(this.layersDialog,
"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var b=m.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily="Helvetica,Arial";this.layersDialog.style.backgroundColor="#000000";this.layersDialog.style.width="160px";this.layersDialog.style.padding="4px 2px 4px 2px";this.layersDialog.style.color="#ffffff";
@@ -2104,10 +2104,10 @@ mxUtils.setOpacity(this.layersDialog,70);this.layersDialog.style.left=b.left+"px
"":"none"})}this.addChromelessToolbarItems(k);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||k(mxUtils.bind(this,function(c){null!=this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):a.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(c)}),Editor.editLargeImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(f=0;f<this.lightboxToolbarActions.length;f++){var v=
this.lightboxToolbarActions[f];k(v.fn,v.icon,v.tooltip)}!a.lightbox||"1"!=urlParams.close&&this.container==document.body||k(mxUtils.bind(this,function(a){"1"==urlParams.close?window.close():(this.destroy(),mxEvent.consume(a))}),Editor.closeLargeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";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(a){mxEvent.isTouchEvent(a)||(mxEvent.isShiftDown(a)||h(30),r())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(a){mxEvent.consume(a)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?r():h(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?r():h(100);mxEvent.consume(a)}));
-mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||h(30)}));var D=a.getTolerance();a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(c,b){this.startX=b.getGraphX();this.startY=b.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(a,c){},mouseUp:function(c,b){mxEvent.isTouchEvent(b.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<D&&Math.abs(this.scrollTop-
-a.container.scrollTop)<D&&Math.abs(this.startX-b.getGraphX())<D&&Math.abs(this.startY-b.getGraphY())<D&&(0<parseFloat(e.chromelessToolbar.style.opacity||0)?r():h(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var x=a.view.validate;a.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var a=this.graph.getPagePadding(),c=this.graph.getPageSize();this.translate.x=a.x-(this.x0||0)*c.width;this.translate.y=
-a.y-(this.y0||0)*c.height}x.apply(this,arguments)};var t=a.sizeDidChange;a.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var c=this.getPageLayout(),b=this.getPagePadding(),d=this.getPageSize(),f=Math.ceil(2*b.x+c.width*d.width),g=Math.ceil(2*b.y+c.height*d.height),e=a.minimumGraphSize;if(null==e||e.width!=f||e.height!=g)a.minimumGraphSize=new mxRectangle(0,0,f,g);f=b.x-c.x*d.width;b=b.y-c.y*d.height;this.autoTranslate||this.view.translate.x==f&&this.view.translate.y==
-b?t.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=c.x,this.view.y0=c.y,c=a.view.translate.x,d=a.view.translate.y,a.view.setTranslate(f,b),a.container.scrollLeft+=Math.round((f-c)*a.view.scale),a.container.scrollTop+=Math.round((b-d)*a.view.scale),this.autoTranslate=!1)}}}a.updateZoomTimeout=null;a.cumulativeZoomFactor=1;var z=null;a.lazyZoom=function(c){null!=this.updateZoomTimeout&&window.clearTimeout(this.updateZoomTimeout);c?.15>this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor=
+mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||h(30)}));var E=a.getTolerance();a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(c,b){this.startX=b.getGraphX();this.startY=b.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(a,c){},mouseUp:function(c,b){mxEvent.isTouchEvent(b.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<E&&Math.abs(this.scrollTop-
+a.container.scrollTop)<E&&Math.abs(this.startX-b.getGraphX())<E&&Math.abs(this.startY-b.getGraphY())<E&&(0<parseFloat(e.chromelessToolbar.style.opacity||0)?r():h(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var x=a.view.validate;a.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var a=this.graph.getPagePadding(),c=this.graph.getPageSize();this.translate.x=a.x-(this.x0||0)*c.width;this.translate.y=
+a.y-(this.y0||0)*c.height}x.apply(this,arguments)};var u=a.sizeDidChange;a.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var c=this.getPageLayout(),b=this.getPagePadding(),d=this.getPageSize(),f=Math.ceil(2*b.x+c.width*d.width),g=Math.ceil(2*b.y+c.height*d.height),e=a.minimumGraphSize;if(null==e||e.width!=f||e.height!=g)a.minimumGraphSize=new mxRectangle(0,0,f,g);f=b.x-c.x*d.width;b=b.y-c.y*d.height;this.autoTranslate||this.view.translate.x==f&&this.view.translate.y==
+b?u.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=c.x,this.view.y0=c.y,c=a.view.translate.x,d=a.view.translate.y,a.view.setTranslate(f,b),a.container.scrollLeft+=Math.round((f-c)*a.view.scale),a.container.scrollTop+=Math.round((b-d)*a.view.scale),this.autoTranslate=!1)}}}a.updateZoomTimeout=null;a.cumulativeZoomFactor=1;var z=null;a.lazyZoom=function(c){null!=this.updateZoomTimeout&&window.clearTimeout(this.updateZoomTimeout);c?.15>this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor=
(this.view.scale+.01)/this.view.scale:(this.cumulativeZoomFactor*=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor=(this.view.scale-.01)/this.view.scale:(this.cumulativeZoomFactor/=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale);this.cumulativeZoomFactor=Math.max(.01,Math.min(this.view.scale*
this.cumulativeZoomFactor,160)/this.view.scale);this.updateZoomTimeout=window.setTimeout(mxUtils.bind(this,function(){var c=mxUtils.getOffset(a.container),d=0,f=0;null!=z&&(d=a.container.offsetWidth/2-z.x+c.x,f=a.container.offsetHeight/2-z.y+c.y);c=this.view.scale;this.zoom(this.cumulativeZoomFactor);this.view.scale!=c&&(null!=b&&e.chromelessResize(!1,null,d*(this.cumulativeZoomFactor-1),f*(this.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(a.container)||0==d&&0==f||(a.container.scrollLeft-=d*(this.cumulativeZoomFactor-
1),a.container.scrollTop-=f*(this.cumulativeZoomFactor-1)));this.cumulativeZoomFactor=1;this.updateZoomTimeout=null}),this.lazyZoomDelay)};mxEvent.addMouseWheelListener(mxUtils.bind(this,function(c,b){if((null==this.dialogs||0==this.dialogs.length)&&a.isZoomWheelEvent(c))for(var d=mxEvent.getSource(c);null!=d;){if(d==a.container){z=new mxPoint(mxEvent.getClientX(c),mxEvent.getClientY(c));a.lazyZoom(b);mxEvent.consume(c);break}d=d.parentNode}}))};
@@ -2143,11 +2143,11 @@ this.actions.get("collapsible").setEnabled(e&&(a.isContainer(a.getSelectionCell(
this.actions.get("editLink").setEnabled(1==a.getSelectionCount());this.actions.get("openLink").setEnabled(1==a.getSelectionCount()&&null!=a.getLinkForCell(a.getSelectionCell()));this.actions.get("guides").setEnabled(a.isEnabled());this.actions.get("grid").setEnabled(!this.editor.chromeless||this.editor.editable);b=a.isEnabled()&&!a.isCellLocked(a.getDefaultParent());this.menus.get("layout").setEnabled(b);this.menus.get("insert").setEnabled(b);this.menus.get("direction").setEnabled(b&&e);this.menus.get("align").setEnabled(b&&
e&&1<a.getSelectionCount());this.menus.get("distribute").setEnabled(b&&e&&1<a.getSelectionCount());this.actions.get("selectVertices").setEnabled(b);this.actions.get("selectEdges").setEnabled(b);this.actions.get("selectAll").setEnabled(b);this.actions.get("selectNone").setEnabled(b);this.updatePasteActionStates()};
EditorUi.prototype.refresh=function(a){a=null!=a?a:!0;var b=mxClient.IS_IE&&(null==document.documentMode||5==document.documentMode),e=this.container.clientWidth,d=this.container.clientHeight;this.container==document.body&&(e=document.body.clientWidth||document.documentElement.clientWidth,d=b?document.body.clientHeight||document.documentElement.clientHeight:document.documentElement.clientHeight);var k=0;mxClient.IS_IOS&&!window.navigator.standalone&&window.innerHeight!=document.documentElement.clientHeight&&
-(k=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var l=Math.max(0,Math.min(this.hsplitPosition,e-this.splitSize-20)),p=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",p+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",p+=this.toolbarHeight);0<p&&!mxClient.IS_QUIRKS&&(p+=1);var q=0;if(null!=this.sidebarFooterContainer){var u=
-this.footerHeight+k,q=Math.max(0,Math.min(d-p-u,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=l+"px";this.sidebarFooterContainer.style.height=q+"px";this.sidebarFooterContainer.style.bottom=u+"px"}u=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=p+"px";this.sidebarContainer.style.width=l+"px";this.formatContainer.style.top=p+"px";this.formatContainer.style.width=u+"px";this.formatContainer.style.display=null!=this.format?"":"none";this.diagramContainer.style.left=
+(k=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var l=Math.max(0,Math.min(this.hsplitPosition,e-this.splitSize-20)),p=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",p+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",p+=this.toolbarHeight);0<p&&!mxClient.IS_QUIRKS&&(p+=1);var q=0;if(null!=this.sidebarFooterContainer){var t=
+this.footerHeight+k,q=Math.max(0,Math.min(d-p-t,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=l+"px";this.sidebarFooterContainer.style.height=q+"px";this.sidebarFooterContainer.style.bottom=t+"px"}t=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=p+"px";this.sidebarContainer.style.width=l+"px";this.formatContainer.style.top=p+"px";this.formatContainer.style.width=t+"px";this.formatContainer.style.display=null!=this.format?"":"none";this.diagramContainer.style.left=
null!=this.hsplit.parentNode?l+this.splitSize+"px":"0px";this.diagramContainer.style.top=this.sidebarContainer.style.top;this.footerContainer.style.height=this.footerHeight+"px";this.hsplit.style.top=this.sidebarContainer.style.top;this.hsplit.style.bottom=this.footerHeight+k+"px";this.hsplit.style.left=l+"px";this.footerContainer.style.display=0==this.footerHeight?"none":"";null!=this.tabContainer&&(this.tabContainer.style.left=this.diagramContainer.style.left);b?(this.menubarContainer.style.width=
-e+"px",this.toolbarContainer.style.width=this.menubarContainer.style.width,b=Math.max(0,d-this.footerHeight-this.menubarHeight-this.toolbarHeight),this.sidebarContainer.style.height=b-q+"px",this.formatContainer.style.height=b+"px",this.diagramContainer.style.width=null!=this.hsplit.parentNode?Math.max(0,e-l-this.splitSize-u)+"px":e+"px",this.footerContainer.style.width=this.menubarContainer.style.width,q=Math.max(0,d-this.footerHeight-this.menubarHeight-this.toolbarHeight),null!=this.tabContainer&&
-(this.tabContainer.style.width=this.diagramContainer.style.width,this.tabContainer.style.bottom=this.footerHeight+k+"px",q-=this.tabContainer.clientHeight),this.diagramContainer.style.height=q+"px",this.hsplit.style.height=q+"px"):(0<this.footerHeight&&(this.footerContainer.style.bottom=k+"px"),this.diagramContainer.style.right=u+"px",e=0,null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+k+"px",this.tabContainer.style.right=this.diagramContainer.style.right,e=this.tabContainer.clientHeight),
+e+"px",this.toolbarContainer.style.width=this.menubarContainer.style.width,b=Math.max(0,d-this.footerHeight-this.menubarHeight-this.toolbarHeight),this.sidebarContainer.style.height=b-q+"px",this.formatContainer.style.height=b+"px",this.diagramContainer.style.width=null!=this.hsplit.parentNode?Math.max(0,e-l-this.splitSize-t)+"px":e+"px",this.footerContainer.style.width=this.menubarContainer.style.width,q=Math.max(0,d-this.footerHeight-this.menubarHeight-this.toolbarHeight),null!=this.tabContainer&&
+(this.tabContainer.style.width=this.diagramContainer.style.width,this.tabContainer.style.bottom=this.footerHeight+k+"px",q-=this.tabContainer.clientHeight),this.diagramContainer.style.height=q+"px",this.hsplit.style.height=q+"px"):(0<this.footerHeight&&(this.footerContainer.style.bottom=k+"px"),this.diagramContainer.style.right=t+"px",e=0,null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+k+"px",this.tabContainer.style.right=this.diagramContainer.style.right,e=this.tabContainer.clientHeight),
this.sidebarContainer.style.bottom=this.footerHeight+q+k+"px",this.formatContainer.style.bottom=this.footerHeight+k+"px",this.diagramContainer.style.bottom=this.footerHeight+k+e+"px");a&&this.editor.graph.sizeDidChange()};EditorUi.prototype.createTabContainer=function(){return null};
EditorUi.prototype.createDivs=function(){this.menubarContainer=this.createDiv("geMenubarContainer");this.toolbarContainer=this.createDiv("geToolbarContainer");this.sidebarContainer=this.createDiv("geSidebarContainer");this.formatContainer=this.createDiv("geSidebarContainer geFormatContainer");this.diagramContainer=this.createDiv("geDiagramContainer");this.footerContainer=this.createDiv("geFooterContainer");this.hsplit=this.createDiv("geHsplit");this.hsplit.setAttribute("title",mxResources.get("collapseExpand"));
this.menubarContainer.style.top="0px";this.menubarContainer.style.left="0px";this.menubarContainer.style.right="0px";this.toolbarContainer.style.left="0px";this.toolbarContainer.style.right="0px";this.sidebarContainer.style.left="0px";this.formatContainer.style.right="0px";this.formatContainer.style.zIndex="1";this.diagramContainer.style.right=(null!=this.format?this.formatWidth:0)+"px";this.footerContainer.style.left="0px";this.footerContainer.style.right="0px";this.footerContainer.style.bottom=
@@ -2157,9 +2157,9 @@ this.sidebar=this.editor.chromeless?null:this.createSidebar(this.sidebarContaine
this.container.appendChild(this.sidebarFooterContainer);this.container.appendChild(this.diagramContainer);null!=this.container&&null!=this.tabContainer&&this.container.appendChild(this.tabContainer);this.toolbar=this.editor.chromeless?null:this.createToolbar(this.createDiv("geToolbar"));null!=this.toolbar&&(this.toolbarContainer.appendChild(this.toolbar.container),this.container.appendChild(this.toolbarContainer));null!=this.sidebar&&(this.container.appendChild(this.hsplit),this.addSplitHandler(this.hsplit,
!0,0,mxUtils.bind(this,function(a){this.hsplitPosition=a;this.refresh()})))};EditorUi.prototype.createStatusContainer=function(){var a=document.createElement("a");a.className="geItem geStatus";420>screen.width&&(a.style.maxWidth=Math.max(20,screen.width-320)+"px",a.style.overflow="hidden");return a};EditorUi.prototype.setStatusText=function(a){this.statusContainer.innerHTML=a};EditorUi.prototype.createToolbar=function(a){return new Toolbar(this,a)};
EditorUi.prototype.createSidebar=function(a){return new Sidebar(this,a)};EditorUi.prototype.createFormat=function(a){return new Format(this,a)};EditorUi.prototype.createFooter=function(){return this.createDiv("geFooter")};EditorUi.prototype.createDiv=function(a){var b=document.createElement("div");b.className=a;return b};
-EditorUi.prototype.addSplitHandler=function(a,b,e,d){function k(a){if(null!=p){var g=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a));d(Math.max(0,q+(b?g.x-p.x:p.y-g.y)-e));mxEvent.consume(a);q!=f()&&(u=!0,c=null)}}function l(a){k(a);p=q=null}var p=null,q=null,u=!0,c=null;mxClient.IS_POINTER&&(a.style.touchAction="none");var f=mxUtils.bind(this,function(){var c=parseInt(b?a.style.left:a.style.bottom);b||(c=c+e-this.footerHeight);return c});mxEvent.addGestureListeners(a,function(a){p=new mxPoint(mxEvent.getClientX(a),
-mxEvent.getClientY(a));q=f();u=!1;mxEvent.consume(a)});mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){if(!u&&this.hsplitClickEnabled){var b=null!=c?c-e:0;c=f();d(b);mxEvent.consume(a)}}));mxEvent.addGestureListeners(document,null,k,l);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,k,l)})};
-EditorUi.prototype.showDialog=function(a,b,e,d,k,l,p,q,u){this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,a,b,e,d,k,l,p,q,u);this.dialogs.push(this.dialog)};
+EditorUi.prototype.addSplitHandler=function(a,b,e,d){function k(a){if(null!=p){var g=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a));d(Math.max(0,q+(b?g.x-p.x:p.y-g.y)-e));mxEvent.consume(a);q!=f()&&(t=!0,c=null)}}function l(a){k(a);p=q=null}var p=null,q=null,t=!0,c=null;mxClient.IS_POINTER&&(a.style.touchAction="none");var f=mxUtils.bind(this,function(){var c=parseInt(b?a.style.left:a.style.bottom);b||(c=c+e-this.footerHeight);return c});mxEvent.addGestureListeners(a,function(a){p=new mxPoint(mxEvent.getClientX(a),
+mxEvent.getClientY(a));q=f();t=!1;mxEvent.consume(a)});mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){if(!t&&this.hsplitClickEnabled){var b=null!=c?c-e:0;c=f();d(b);mxEvent.consume(a)}}));mxEvent.addGestureListeners(document,null,k,l);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,k,l)})};
+EditorUi.prototype.showDialog=function(a,b,e,d,k,l,p,q,t){this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,a,b,e,d,k,l,p,q,t);this.dialogs.push(this.dialog)};
EditorUi.prototype.hideDialog=function(a,b){if(null!=this.dialogs&&0<this.dialogs.length){var e=this.dialogs.pop();0==e.close(a,b)?this.dialogs.push(e):(this.dialog=0<this.dialogs.length?this.dialogs[this.dialogs.length-1]:null,null==this.dialog&&"hidden"!=this.editor.graph.container.style.visibility&&this.editor.graph.container.focus(),mxUtils.clearSelection(),this.editor.fireEvent(new mxEventObject("hideDialog")))}};
EditorUi.prototype.pickColor=function(a,b){var e=this.editor.graph,d=e.cellEditor.saveSelection(),k=226+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12)),l=new ColorDialog(this,a||"none",function(a){e.cellEditor.restoreSelection(d);b(a)},function(){e.cellEditor.restoreSelection(d)});this.showDialog(l.container,230,k,!0,!1);l.init()};
EditorUi.prototype.openFile=function(){window.openFile=new OpenFile(mxUtils.bind(this,function(a){this.hideDialog(a)}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:320,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null})};
@@ -2177,8 +2177,8 @@ EditorUi.prototype.createOutline=function(a){var b=new mxOutline(this.editor.gra
EditorUi.prototype.createKeyHandler=function(a){function b(a,c,b){p.push(function(){if(!d.isSelectionEmpty()&&d.isEnabled())if(c=null!=c?c:1,b){d.getModel().beginUpdate();try{for(var f=d.getSelectionCells(),g=0;g<f.length;g++)if(d.getModel().isVertex(f[g])&&d.isCellResizable(f[g])){var e=d.getCellGeometry(f[g]);null!=e&&(e=e.clone(),37==a?e.width=Math.max(0,e.width-c):38==a?e.height=Math.max(0,e.height-c):39==a?e.width+=c:40==a&&(e.height+=c),d.getModel().setGeometry(f[g],e))}}finally{d.getModel().endUpdate()}}else f=
d.getSelectionCell(),g=d.model.getParent(f),e=null,1==d.getSelectionCount()&&d.model.isVertex(f)&&null!=d.layoutManager&&!d.isCellLocked(f)&&(e=d.layoutManager.getLayout(g)),null!=e&&e.constructor==mxStackLayout?(e=g.getIndex(f),37==a||38==a?d.model.add(g,f,Math.max(0,e-1)):39!=a&&40!=a||d.model.add(g,f,Math.min(d.model.getChildCount(g),e+1))):(g=f=0,37==a?f=-c:38==a?g=-c:39==a?f=c:40==a&&(g=c),d.moveCells(d.getMovableCells(d.getSelectionCells()),f,g))});null!=q&&window.clearTimeout(q);q=window.setTimeout(function(){if(0<
p.length){d.getModel().beginUpdate();try{for(var a=0;a<p.length;a++)p[a]();p=[]}finally{d.getModel().endUpdate()}d.scrollCellToVisible(d.getSelectionCell())}},200)}var e=this,d=this.editor.graph,k=new mxKeyHandler(d),l=k.isEventIgnored;k.isEventIgnored=function(a){return(!this.isControlDown(a)||mxEvent.isShiftDown(a)||90!=a.keyCode&&89!=a.keyCode&&188!=a.keyCode&&190!=a.keyCode&&85!=a.keyCode)&&(66!=a.keyCode&&73!=a.keyCode||!this.isControlDown(a)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&
-!mxClient.IS_SF)&&l.apply(this,arguments)};k.isEnabledForEvent=function(a){return!mxEvent.isConsumed(a)&&this.isGraphEvent(a)&&this.isEnabled()&&(null==e.dialogs||0==e.dialogs.length)};k.isControlDown=function(a){return mxEvent.isControlDown(a)||mxClient.IS_MAC&&a.metaKey};var p=[],q=null,u={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},c=k.getFunction;mxKeyHandler.prototype.getFunction=function(a){if(d.isEnabled()){if(mxEvent.isShiftDown(a)&&
-mxEvent.isAltDown(a)){var f=e.actions.get(e.altShiftActions[a.keyCode]);if(null!=f)return f.funct}if(9==a.keyCode&&mxEvent.isAltDown(a))return mxEvent.isShiftDown(a)?function(){d.selectParentCell()}:function(){d.selectChildCell()};if(null!=u[a.keyCode]&&!d.isSelectionEmpty())if(mxEvent.isShiftDown(a)&&mxEvent.isAltDown(a)){if(d.model.isVertex(d.getSelectionCell()))return function(){var c=d.connectVertex(d.getSelectionCell(),u[a.keyCode],d.defaultEdgeLength,a,!0);null!=c&&0<c.length&&(1==c.length&&
+!mxClient.IS_SF)&&l.apply(this,arguments)};k.isEnabledForEvent=function(a){return!mxEvent.isConsumed(a)&&this.isGraphEvent(a)&&this.isEnabled()&&(null==e.dialogs||0==e.dialogs.length)};k.isControlDown=function(a){return mxEvent.isControlDown(a)||mxClient.IS_MAC&&a.metaKey};var p=[],q=null,t={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},c=k.getFunction;mxKeyHandler.prototype.getFunction=function(a){if(d.isEnabled()){if(mxEvent.isShiftDown(a)&&
+mxEvent.isAltDown(a)){var f=e.actions.get(e.altShiftActions[a.keyCode]);if(null!=f)return f.funct}if(9==a.keyCode&&mxEvent.isAltDown(a))return mxEvent.isShiftDown(a)?function(){d.selectParentCell()}:function(){d.selectChildCell()};if(null!=t[a.keyCode]&&!d.isSelectionEmpty())if(mxEvent.isShiftDown(a)&&mxEvent.isAltDown(a)){if(d.model.isVertex(d.getSelectionCell()))return function(){var c=d.connectVertex(d.getSelectionCell(),t[a.keyCode],d.defaultEdgeLength,a,!0);null!=c&&0<c.length&&(1==c.length&&
d.model.isEdge(c[0])?d.setSelectionCell(d.model.getTerminal(c[0],!1)):d.setSelectionCell(c[c.length-1]),d.scrollCellToVisible(d.getSelectionCell()),null!=e.hoverIcons&&e.hoverIcons.update(d.view.getState(d.getSelectionCell())))}}else return this.isControlDown(a)?function(){b(a.keyCode,mxEvent.isShiftDown(a)?d.gridSize:null,!0)}:function(){b(a.keyCode,mxEvent.isShiftDown(a)?d.gridSize:null)}}return c.apply(this,arguments)};k.bindAction=mxUtils.bind(this,function(a,c,b,d){var f=this.actions.get(b);
null!=f&&(b=function(){f.isEnabled()&&f.funct()},c?d?k.bindControlShiftKey(a,b):k.bindControlKey(a,b):d?k.bindShiftKey(a,b):k.bindKey(a,b))});var f=k.escape;k.escape=function(a){f.apply(this,arguments)};k.enter=function(){};k.bindControlShiftKey(36,function(){d.exitGroup()});k.bindControlShiftKey(35,function(){d.enterGroup()});k.bindKey(36,function(){d.home()});k.bindKey(35,function(){d.refresh()});k.bindAction(107,!0,"zoomIn");k.bindAction(109,!0,"zoomOut");k.bindAction(80,!0,"print");k.bindAction(79,
!0,"outline",!0);k.bindAction(112,!1,"about");if(!this.editor.chromeless||this.editor.editable)k.bindControlKey(36,function(){d.isEnabled()&&d.foldCells(!0)}),k.bindControlKey(35,function(){d.isEnabled()&&d.foldCells(!1)}),k.bindControlKey(13,function(){d.isEnabled()&&d.setSelectionCells(d.duplicateCells(d.getSelectionCells(),!1))}),k.bindAction(8,!1,"delete"),k.bindAction(8,!0,"deleteAll"),k.bindAction(46,!1,"delete"),k.bindAction(46,!0,"deleteAll"),k.bindAction(72,!0,"resetView"),k.bindAction(72,
@@ -2191,40 +2191,40 @@ EditorUi.prototype.destroy=function(){null!=this.editor&&(this.editor.destroy(),
(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.gridColor="#e0e0e0";mxSvgCanvas2D.prototype.foAltText="[Not supported by viewer]";mxShape.prototype.getConstraints=function(a){return null};
Graph=function(a,b,e,d,k){mxGraph.call(this,a,b,e,d);this.themes=k||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);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(a){var c=this.view.getState(a);a=null!=c?c.style:this.getCellStyle(a);
-return"1"==a.html||"wrap"==a[mxConstants.STYLE_WHITE_SPACE]};if(this.edgeMode){var l=null,p=null,q=null,u=null,c=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,b){if("mouseDown"==b.getProperty("eventName")&&this.isEnabled()){var d=b.getProperty("event");if(!mxEvent.isControlDown(d.getEvent())&&!mxEvent.isShiftDown(d.getEvent())){var f=d.getState();null!=f&&this.model.isEdge(f.cell)&&(l=new mxPoint(d.getGraphX(),d.getGraphY()),c=this.isCellSelected(f.cell),q=f,p=d,null!=
-f.text&&null!=f.text.boundingBox&&mxUtils.contains(f.text.boundingBox,d.getGraphX(),d.getGraphY())?u=mxEvent.LABEL_HANDLE:(f=this.selectionCellsHandler.getHandler(f.cell),null!=f&&null!=f.bends&&0<f.bends.length&&(u=f.getHandleForEvent(d))))}}}));this.addMouseListener({mouseDown:function(a,c){},mouseMove:mxUtils.bind(this,function(a,b){var d=this.selectionCellsHandler.handlers.map,f;for(f in d)if(null!=d[f].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isControlDown(b.getEvent())&&
-!mxEvent.isShiftDown(b.getEvent())&&!mxEvent.isAltDown(b.getEvent()))if(f=this.tolerance,null!=l&&null!=q&&null!=p){if(d=q,Math.abs(l.x-b.getGraphX())>f||Math.abs(l.y-b.getGraphY())>f){this.isCellSelected(d.cell)||this.setSelectionCell(d.cell);var g=this.selectionCellsHandler.getHandler(d.cell);if(null!=g&&null!=g.bends&&0<g.bends.length){var e=g.getHandleForEvent(p),h=this.view.getEdgeStyle(d);f=h==mxEdgeStyle.EntityRelation;c||u!=mxEvent.LABEL_HANDLE||(e=u);if(f&&0!=e&&e!=g.bends.length-1&&e!=mxEvent.LABEL_HANDLE)!f||
-null==d.visibleSourceState&&null==d.visibleTargetState||(this.graphHandler.reset(),b.consume());else if(e==mxEvent.LABEL_HANDLE||0==e||null!=d.visibleSourceState||e==g.bends.length-1||null!=d.visibleTargetState)f||e==mxEvent.LABEL_HANDLE||(f=d.absolutePoints,null!=f&&(null==h&&null==e||h==mxEdgeStyle.OrthConnector)&&(e=u,null==e&&(e=new mxRectangle(l.x,l.y),e.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(e,f[0].x,f[0].y)?e=0:mxUtils.contains(e,f[f.length-1].x,f[f.length-1].y)?
-e=g.bends.length-1:null!=h&&(2==f.length||3==f.length&&(0==Math.round(f[0].x-f[1].x)&&0==Math.round(f[1].x-f[2].x)||0==Math.round(f[0].y-f[1].y)&&0==Math.round(f[1].y-f[2].y)))?e=2:(e=mxUtils.findNearestSegment(d,l.x,l.y),e=null==h?mxEvent.VIRTUAL_HANDLE-e:e+1))),null==e&&(e=mxEvent.VIRTUAL_HANDLE)),g.start(b.getGraphX(),b.getGraphX(),e),u=l=p=q=null,c=!1,b.consume(),this.graphHandler.reset()}}}else if(d=b.getState(),null!=d&&this.model.isEdge(d.cell)){g=null;f=d.absolutePoints;if(null!=f)if(e=new mxRectangle(b.getGraphX(),
+return"1"==a.html||"wrap"==a[mxConstants.STYLE_WHITE_SPACE]};if(this.edgeMode){var l=null,p=null,q=null,t=null,c=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,b){if("mouseDown"==b.getProperty("eventName")&&this.isEnabled()){var d=b.getProperty("event");if(!mxEvent.isControlDown(d.getEvent())&&!mxEvent.isShiftDown(d.getEvent())){var f=d.getState();null!=f&&this.model.isEdge(f.cell)&&(l=new mxPoint(d.getGraphX(),d.getGraphY()),c=this.isCellSelected(f.cell),q=f,p=d,null!=
+f.text&&null!=f.text.boundingBox&&mxUtils.contains(f.text.boundingBox,d.getGraphX(),d.getGraphY())?t=mxEvent.LABEL_HANDLE:(f=this.selectionCellsHandler.getHandler(f.cell),null!=f&&null!=f.bends&&0<f.bends.length&&(t=f.getHandleForEvent(d))))}}}));this.addMouseListener({mouseDown:function(a,c){},mouseMove:mxUtils.bind(this,function(a,b){var d=this.selectionCellsHandler.handlers.map,f;for(f in d)if(null!=d[f].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isControlDown(b.getEvent())&&
+!mxEvent.isShiftDown(b.getEvent())&&!mxEvent.isAltDown(b.getEvent()))if(f=this.tolerance,null!=l&&null!=q&&null!=p){if(d=q,Math.abs(l.x-b.getGraphX())>f||Math.abs(l.y-b.getGraphY())>f){this.isCellSelected(d.cell)||this.setSelectionCell(d.cell);var g=this.selectionCellsHandler.getHandler(d.cell);if(null!=g&&null!=g.bends&&0<g.bends.length){var e=g.getHandleForEvent(p),h=this.view.getEdgeStyle(d);f=h==mxEdgeStyle.EntityRelation;c||t!=mxEvent.LABEL_HANDLE||(e=t);if(f&&0!=e&&e!=g.bends.length-1&&e!=mxEvent.LABEL_HANDLE)!f||
+null==d.visibleSourceState&&null==d.visibleTargetState||(this.graphHandler.reset(),b.consume());else if(e==mxEvent.LABEL_HANDLE||0==e||null!=d.visibleSourceState||e==g.bends.length-1||null!=d.visibleTargetState)f||e==mxEvent.LABEL_HANDLE||(f=d.absolutePoints,null!=f&&(null==h&&null==e||h==mxEdgeStyle.OrthConnector)&&(e=t,null==e&&(e=new mxRectangle(l.x,l.y),e.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(e,f[0].x,f[0].y)?e=0:mxUtils.contains(e,f[f.length-1].x,f[f.length-1].y)?
+e=g.bends.length-1:null!=h&&(2==f.length||3==f.length&&(0==Math.round(f[0].x-f[1].x)&&0==Math.round(f[1].x-f[2].x)||0==Math.round(f[0].y-f[1].y)&&0==Math.round(f[1].y-f[2].y)))?e=2:(e=mxUtils.findNearestSegment(d,l.x,l.y),e=null==h?mxEvent.VIRTUAL_HANDLE-e:e+1))),null==e&&(e=mxEvent.VIRTUAL_HANDLE)),g.start(b.getGraphX(),b.getGraphX(),e),t=l=p=q=null,c=!1,b.consume(),this.graphHandler.reset()}}}else if(d=b.getState(),null!=d&&this.model.isEdge(d.cell)){g=null;f=d.absolutePoints;if(null!=f)if(e=new mxRectangle(b.getGraphX(),
b.getGraphY()),e.grow(mxEdgeHandler.prototype.handleImage.width/2),null!=d.text&&null!=d.text.boundingBox&&mxUtils.contains(d.text.boundingBox,b.getGraphX(),b.getGraphY()))g="move";else if(mxUtils.contains(e,f[0].x,f[0].y)||mxUtils.contains(e,f[f.length-1].x,f[f.length-1].y))g="pointer";else if(null!=d.visibleSourceState||null!=d.visibleTargetState)h=this.view.getEdgeStyle(d),g="crosshair",h!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(d)&&(h=mxUtils.findNearestSegment(d,b.getGraphX(),b.getGraphY()),
-h<f.length-1&&0<=h&&(g=0==Math.round(f[h].x-f[h+1].x)?"col-resize":"row-resize"));null!=g&&d.setCursor(g)}}),mouseUp:mxUtils.bind(this,function(a,c){u=l=p=q=null})})}this.cellRenderer.getLabelValue=function(a){var c=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);a.view.graph.isHtmlLabel(a.cell)&&(c=1!=a.style.html?mxUtils.htmlEntities(c,!1):a.view.graph.sanitizeHtml(c));return c};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0);this.setDropEnabled(!0);this.setPanning(!0);
+h<f.length-1&&0<=h&&(g=0==Math.round(f[h].x-f[h+1].x)?"col-resize":"row-resize"));null!=g&&d.setCursor(g)}}),mouseUp:mxUtils.bind(this,function(a,c){t=l=p=q=null})})}this.cellRenderer.getLabelValue=function(a){var c=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);a.view.graph.isHtmlLabel(a.cell)&&(c=1!=a.style.html?mxUtils.htmlEntities(c,!1):a.view.graph.sanitizeHtml(c));return c};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(a,c){return!1};this.alternateEdgeStyle="vertical";null==d&&this.loadStylesheet();var f=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=
function(){var a=f.apply(this,arguments);if(this.graph.pageVisible){for(var c=[],b=this.graph.pageFormat,d=this.graph.pageScale,g=b.width*d,b=b.height*d,d=this.graph.view.translate,e=this.graph.view.scale,h=this.graph.getPageLayout(),n=0;n<h.width;n++)c.push(new mxRectangle(((h.x+n)*g+d.x)*e,(h.y*b+d.y)*e,g*e,b*e));for(n=0;n<h.height;n++)c.push(new mxRectangle((h.x*g+d.x)*e,((h.y+n)*b+d.y)*e,g*e,b*e));a=c.concat(a)}return a};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=
function(a,c){return null==a.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(a){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};this.graphHandler.getCells=function(a){for(var c=mxGraphHandler.prototype.getCells.apply(this,arguments),b=[],d=0;d<c.length;d++){var f=this.graph.view.getState(c[d]),f=null!=f?f.style:this.graph.getCellStyle(c[d]);
"1"==mxUtils.getValue(f,"part","0")?(f=this.graph.model.getParent(c[d]),this.graph.model.isVertex(f)&&0>mxUtils.indexOf(c,f)&&b.push(f)):b.push(c[d])}return b};this.connectionHandler.createTargetVertex=function(a,c){var b=this.graph.view.getState(c),b=null!=b?b.style:this.graph.getCellStyle(c);mxUtils.getValue(b,"part",!1)&&(b=this.graph.model.getParent(c),this.graph.model.isVertex(b)&&(c=b));return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var g=new mxRubberband(this);
this.getRubberband=function(){return g};var n=(new Date).getTime(),r=0,h=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var a=this.currentState;h.apply(this,arguments);a!=this.currentState?(n=(new Date).getTime(),r=0):r=(new Date).getTime()-n};var m=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=this.currentState&&a.getState()==this.currentState&&2E3<r||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,
-"outlineConnect","1"))&&m.apply(this,arguments)};var w=this.isToggleEvent;this.isToggleEvent=function(a){return w.apply(this,arguments)||mxEvent.isShiftDown(a)};var v=g.isForceRubberbandEvent;g.isForceRubberbandEvent=function(a){return v.apply(this,arguments)||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==a.getState()&&mxEvent.isTouchEvent(a.getEvent())};var D=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&
-(D=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=D)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(a){return mxEvent.isMouseEvent(a.getEvent())};var x=this.click;this.click=function(a){var c=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);if(this.isEnabled()&&!c||a.isConsumed())return x.apply(this,
-arguments);c=c?a.sourceState.cell:a.getCell();null!=c&&(c=this.getLinkForCell(c),null!=c&&(this.isCustomLink(c)?this.customLinkClicked(c):this.openLink(c)))};this.tooltipHandler.getStateForEvent=function(a){return a.sourceState};this.getCursorForMouseEvent=function(a){var c=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);return this.getCursorForCell(c?a.sourceState.cell:a.getCell())};var t=this.getCursorForCell;this.getCursorForCell=function(a){if(!this.isEnabled()||this.isCellLocked(a)){if(null!=
-this.getLinkForCell(a))return"pointer";if(this.isCellLocked(a))return"default"}return t.apply(this,arguments)};this.selectRegion=function(a,c){var b=this.getAllCells(a.x,a.y,a.width,a.height);this.selectCellsForEvent(b,c);return b};this.getAllCells=function(a,c,b,d,f,g){g=null!=g?g:[];if(0<b||0<d){var e=this.getModel(),h=a+b,n=c+d;null==f&&(f=this.getCurrentRoot(),null==f&&(f=e.getRoot()));if(null!=f)for(var m=e.getChildCount(f),H=0;H<m;H++){var r=e.getChildAt(f,H),t=this.view.getState(r);if(null!=
-t&&this.isCellVisible(r)&&"1"!=mxUtils.getValue(t.style,"locked","0")){var x=mxUtils.getValue(t.style,mxConstants.STYLE_ROTATION)||0;0!=x&&(t=mxUtils.getBoundingBox(t,x));(e.isEdge(r)||e.isVertex(r))&&t.x>=a&&t.y+t.height<=n&&t.y>=c&&t.x+t.width<=h&&g.push(r);this.getAllCells(a,c,b,d,r,g)}}}return g};var z=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,c,b){return this.graph.isCellSelected(a)?!1:z.apply(this,arguments)};this.isCellLocked=function(a){for(a=
-this.view.getState(a);null!=a;){if("1"==mxUtils.getValue(a.style,"locked","0"))return!0;a=this.view.getState(this.model.getParent(a.cell))}return!1};var B=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,c){if("mouseDown"==c.getProperty("eventName")){var b=c.getProperty("event").getState();B=null==b||this.isSelectionEmpty()||this.isCellSelected(b.cell)?null:this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(a,c){if(!mxEvent.isMultiTouchEvent(c)){var b=
-c.getProperty("event"),d=c.getProperty("cell");null==d?(b=mxUtils.convertPoint(this.container,mxEvent.getClientX(b),mxEvent.getClientY(b)),g.start(b.x,b.y)):null!=B?this.addSelectionCells(B):1<this.getSelectionCount()&&this.isCellSelected(d)&&this.removeSelectionCell(d);B=null;c.consume()}}));this.connectionHandler.selectCells=function(a,c){this.graph.setSelectionCell(c||a)};this.connectionHandler.constraintHandler.isStateIgnored=function(a,c){return c&&a.view.graph.isCellSelected(a.cell)};this.selectionModel.addListener(mxEvent.CHANGE,
+"outlineConnect","1"))&&m.apply(this,arguments)};var w=this.isToggleEvent;this.isToggleEvent=function(a){return w.apply(this,arguments)||mxEvent.isShiftDown(a)};var v=g.isForceRubberbandEvent;g.isForceRubberbandEvent=function(a){return v.apply(this,arguments)||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==a.getState()&&mxEvent.isTouchEvent(a.getEvent())};var E=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&
+(E=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=E)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(a){return mxEvent.isMouseEvent(a.getEvent())};var x=this.click;this.click=function(a){var c=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);if(this.isEnabled()&&!c||a.isConsumed())return x.apply(this,
+arguments);c=c?a.sourceState.cell:a.getCell();null!=c&&(c=this.getLinkForCell(c),null!=c&&(this.isCustomLink(c)?this.customLinkClicked(c):this.openLink(c)))};this.tooltipHandler.getStateForEvent=function(a){return a.sourceState};this.getCursorForMouseEvent=function(a){var c=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);return this.getCursorForCell(c?a.sourceState.cell:a.getCell())};var u=this.getCursorForCell;this.getCursorForCell=function(a){if(!this.isEnabled()||this.isCellLocked(a)){if(null!=
+this.getLinkForCell(a))return"pointer";if(this.isCellLocked(a))return"default"}return u.apply(this,arguments)};this.selectRegion=function(a,c){var b=this.getAllCells(a.x,a.y,a.width,a.height);this.selectCellsForEvent(b,c);return b};this.getAllCells=function(a,c,b,d,f,g){g=null!=g?g:[];if(0<b||0<d){var e=this.getModel(),h=a+b,n=c+d;null==f&&(f=this.getCurrentRoot(),null==f&&(f=e.getRoot()));if(null!=f)for(var m=e.getChildCount(f),H=0;H<m;H++){var r=e.getChildAt(f,H),u=this.view.getState(r);if(null!=
+u&&this.isCellVisible(r)&&"1"!=mxUtils.getValue(u.style,"locked","0")){var x=mxUtils.getValue(u.style,mxConstants.STYLE_ROTATION)||0;0!=x&&(u=mxUtils.getBoundingBox(u,x));(e.isEdge(r)||e.isVertex(r))&&u.x>=a&&u.y+u.height<=n&&u.y>=c&&u.x+u.width<=h&&g.push(r);this.getAllCells(a,c,b,d,r,g)}}}return g};var z=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,c,b){return this.graph.isCellSelected(a)?!1:z.apply(this,arguments)};this.isCellLocked=function(a){for(a=
+this.view.getState(a);null!=a;){if("1"==mxUtils.getValue(a.style,"locked","0"))return!0;a=this.view.getState(this.model.getParent(a.cell))}return!1};var C=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,c){if("mouseDown"==c.getProperty("eventName")){var b=c.getProperty("event").getState();C=null==b||this.isSelectionEmpty()||this.isCellSelected(b.cell)?null:this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(a,c){if(!mxEvent.isMultiTouchEvent(c)){var b=
+c.getProperty("event"),d=c.getProperty("cell");null==d?(b=mxUtils.convertPoint(this.container,mxEvent.getClientX(b),mxEvent.getClientY(b)),g.start(b.x,b.y)):null!=C?this.addSelectionCells(C):1<this.getSelectionCount()&&this.isCellSelected(d)&&this.removeSelectionCell(d);C=null;c.consume()}}));this.connectionHandler.selectCells=function(a,c){this.graph.setSelectionCell(c||a)};this.connectionHandler.constraintHandler.isStateIgnored=function(a,c){return c&&a.view.graph.isCellSelected(a.cell)};this.selectionModel.addListener(mxEvent.CHANGE,
mxUtils.bind(this,function(){var a=this.connectionHandler.constraintHandler;null!=a.currentFocus&&a.isStateIgnored(a.currentFocus,!0)&&(a.currentFocus=null,a.constraints=null,a.destroyIcons());a.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var N=this.updateMouseEvent;this.updateMouseEvent=function(a){a=N.apply(this,arguments);null!=a.state&&this.isCellLocked(a.getCell())&&(a.state=null);return a}}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.lineJumpsEnabled=!0;Graph.defaultJumpSize=6;
Graph.createSvgImage=function(a,b,e){e=unescape(encodeURIComponent('<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+a+'px" height="'+b+'px" version="1.1">'+e+"</svg>"));return new mxImage("data:image/svg+xml;base64,"+(window.btoa?btoa(e):Base64.encode(e,!0)),a,b)};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=!mxClient.IS_IOS;Graph.prototype.defaultPageVisible=!0;Graph.prototype.lightbox=!1;Graph.prototype.defaultPageBackgroundColor="#ffffff";Graph.prototype.defaultPageBorderColor="#ffffff";Graph.prototype.scrollTileSize=new mxRectangle(0,0,400,400);
Graph.prototype.transparentBackground=!0;Graph.prototype.defaultEdgeLength=80;Graph.prototype.edgeMode=!1;Graph.prototype.connectionArrowsEnabled=!0;Graph.prototype.placeholderPattern=RegExp("%(date{.*}|[^%^{^}]+)%","g");Graph.prototype.absoluteUrlPattern=/^(?:[a-z]+:)?\/\//i;Graph.prototype.defaultThemeName="default";Graph.prototype.defaultThemes={};Graph.prototype.baseUrl=null!=urlParams.base?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.init=function(a){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(a,e){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var b=a.view.graph.tolerance,k=!0,l=null,p=mxUtils.bind(this,function(a){k=!0;l=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a))}),q=mxUtils.bind(this,function(a){k=k&&null!=l&&Math.abs(l.x-mxEvent.getClientX(a))<b&&Math.abs(l.y-mxEvent.getClientY(a))<b}),u=mxUtils.bind(this,function(c){if(k)for(var b=mxEvent.getSource(c);null!=
-b&&b!=e.node;){if("a"==b.nodeName.toLowerCase()){a.view.graph.labelLinkClicked(a,b,c);break}b=b.parentNode}});mxEvent.addGestureListeners(e.node,p,q,u);mxEvent.addListener(e.node,"click",function(a){mxEvent.consume(a)})};this.initLayoutManager()};
-(function(){Graph.prototype.useCssTransforms=!1;Graph.prototype.currentScale=1;Graph.prototype.currentTranslate=new mxPoint(0,0);Graph.prototype.isCssTransformsSupported=function(){return this.dialect==mxConstants.DIALECT_SVG&&!mxClient.NO_FO};Graph.prototype.getCellAt=function(a,b,e,p,q,u){this.useCssTransforms&&(a=a/this.currentScale-this.currentTranslate.x,b=b/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(a,
-b,e,p,q,u){p=null!=p?p:!0;q=null!=q?q:!0;null==e&&(e=this.getCurrentRoot(),null==e&&(e=this.getModel().getRoot()));if(null!=e)for(var c=this.model.getChildCount(e)-1;0<=c;c--){var d=this.model.getChildAt(e,c),g=this.getScaledCellAt(a,b,d,p,q,u);if(null!=g)return g;if(this.isCellVisible(d)&&(q&&this.model.isEdge(d)||p&&this.model.isVertex(d))&&(g=this.view.getState(d),null!=g&&(null==u||!u(g,a,b))&&this.intersects(g,a,b)))return d}return null};mxCellHighlight.prototype.getStrokeWidth=function(a){a=
+Graph.prototype.init=function(a){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(a,e){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var b=a.view.graph.tolerance,k=!0,l=null,p=mxUtils.bind(this,function(a){k=!0;l=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a))}),q=mxUtils.bind(this,function(a){k=k&&null!=l&&Math.abs(l.x-mxEvent.getClientX(a))<b&&Math.abs(l.y-mxEvent.getClientY(a))<b}),t=mxUtils.bind(this,function(c){if(k)for(var b=mxEvent.getSource(c);null!=
+b&&b!=e.node;){if("a"==b.nodeName.toLowerCase()){a.view.graph.labelLinkClicked(a,b,c);break}b=b.parentNode}});mxEvent.addGestureListeners(e.node,p,q,t);mxEvent.addListener(e.node,"click",function(a){mxEvent.consume(a)})};this.initLayoutManager()};
+(function(){Graph.prototype.useCssTransforms=!1;Graph.prototype.currentScale=1;Graph.prototype.currentTranslate=new mxPoint(0,0);Graph.prototype.isCssTransformsSupported=function(){return this.dialect==mxConstants.DIALECT_SVG&&!mxClient.NO_FO};Graph.prototype.getCellAt=function(a,b,e,p,q,t){this.useCssTransforms&&(a=a/this.currentScale-this.currentTranslate.x,b=b/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(a,
+b,e,p,q,t){p=null!=p?p:!0;q=null!=q?q:!0;null==e&&(e=this.getCurrentRoot(),null==e&&(e=this.getModel().getRoot()));if(null!=e)for(var c=this.model.getChildCount(e)-1;0<=c;c--){var d=this.model.getChildAt(e,c),g=this.getScaledCellAt(a,b,d,p,q,t);if(null!=g)return g;if(this.isCellVisible(d)&&(q&&this.model.isEdge(d)||p&&this.model.isVertex(d))&&(g=this.view.getState(d),null!=g&&(null==t||!t(g,a,b))&&this.intersects(g,a,b)))return d}return null};mxCellHighlight.prototype.getStrokeWidth=function(a){a=
this.strokeWidth;this.graph.useCssTransforms&&(a/=this.graph.currentScale);return a};mxGraphView.prototype.getGraphBounds=function(){var a=this.graphBounds;if(this.graph.useCssTransforms)var b=this.graph.currentTranslate,e=this.graph.currentScale,a=new mxRectangle((a.x+b.x)*e,(a.y+b.y)*e,a.width*e,a.height*e);return a};mxGraphView.prototype.viewStateChanged=function(){this.graph.useCssTransforms?this.validate():this.revalidate();this.graph.sizeDidChange()};var a=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);a.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)};Graph.prototype.updateCssTransform=function(){var a=this.view.getDrawPane();
if(null!=a)if(a=a.parentNode,this.useCssTransforms){var b=a.getAttribute("transform");a.setAttribute("transformOrigin","0 0");a.setAttribute("transform","scale("+this.currentScale+","+this.currentScale+")translate("+this.currentTranslate.x+","+this.currentTranslate.y+")");if(b!=a.getAttribute("transform"))try{if(mxClient.IS_EDGE){var e=a.style.display;a.style.display="none";a.getBBox();a.style.display=e}}catch(p){}}else a.removeAttribute("transformOrigin"),a.removeAttribute("transform")};var b=mxGraphView.prototype.validateBackgroundPage;
-mxGraphView.prototype.validateBackgroundPage=function(){var a=this.graph.useCssTransforms,e=this.scale,l=this.translate;a&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);b.apply(this,arguments);a&&(this.scale=e,this.translate=l)};var e=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(a,b,l){var d=this.useCssTransforms,k=this.view.scale,u=this.view.translate;d&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=
-!1);e.apply(this,arguments);d&&(this.view.scale=k,this.view.translate=u,this.useCssTransforms=!0)}})();Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.labelLinkClicked=function(a,b,e){b=b.getAttribute("href");if(null!=b&&!this.isCustomLink(b)&&mxEvent.isLeftMouseButton(e)&&!mxEvent.isPopupTrigger(e)||mxEvent.isTouchEvent(e)){if(!this.isEnabled()||this.isCellLocked(a.cell))a=this.isBlankLink(b)?this.linkTarget:"_top",this.openLink(this.getAbsoluteUrl(b),a);mxEvent.consume(e)}};
+mxGraphView.prototype.validateBackgroundPage=function(){var a=this.graph.useCssTransforms,e=this.scale,l=this.translate;a&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);b.apply(this,arguments);a&&(this.scale=e,this.translate=l)};var e=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(a,b,l){var d=this.useCssTransforms,k=this.view.scale,t=this.view.translate;d&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=
+!1);e.apply(this,arguments);d&&(this.view.scale=k,this.view.translate=t,this.useCssTransforms=!0)}})();Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.labelLinkClicked=function(a,b,e){b=b.getAttribute("href");if(null!=b&&!this.isCustomLink(b)&&mxEvent.isLeftMouseButton(e)&&!mxEvent.isPopupTrigger(e)||mxEvent.isTouchEvent(e)){if(!this.isEnabled()||this.isCellLocked(a.cell))a=this.isBlankLink(b)?this.linkTarget:"_top",this.openLink(this.getAbsoluteUrl(b),a);mxEvent.consume(e)}};
Graph.prototype.openLink=function(a,b,e){var d=window;"_self"==b&&window!=window.top?window.location.href=a:a.substring(0,this.baseUrl.length)==this.baseUrl&&"#"==a.charAt(this.baseUrl.length)&&"_top"==b&&window==window.top?(a=a.split("#")[1],window.location.hash=="#"+a&&(window.location.hash=""),window.location.hash=a):(d=window.open(a,b),null==d||e||(d.opener=null));return d};Graph.prototype.getLinkTitle=function(a){return a.substring(a.lastIndexOf("/")+1)};
Graph.prototype.isCustomLink=function(a){return"data:"==a.substring(0,5)};Graph.prototype.customLinkClicked=function(a){return!1};Graph.prototype.isExternalProtocol=function(a){return"mailto:"===a.substring(0,7)};Graph.prototype.isBlankLink=function(a){return!this.isExternalProtocol(a)&&("blank"===this.linkPolicy||"self"!==this.linkPolicy&&!this.isRelativeUrl(a)&&a.substring(0,this.domainUrl.length)!==this.domainUrl)};
Graph.prototype.isRelativeUrl=function(a){return null!=a&&!this.absoluteUrlPattern.test(a)&&"data:"!==a.substring(0,5)&&!this.isExternalProtocol(a)};
@@ -2240,8 +2240,8 @@ Graph.prototype.isLabelMovable=function(a){var b=this.view.getState(a),b=null!=b
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 d=this.dateFormatCache,k=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,l=/[^-+\dA-Z]/g,p=function(a,c){a=String(a);for(c=c||2;a.length<c;)a="0"+a;return a};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(d.masks[b]||b||d.masks["default"]);"UTC:"==b.slice(0,4)&&(b=b.slice(4),e=!0);var q=e?"getUTC":"get",u=a[q+"Date"](),c=a[q+"Day"](),f=a[q+"Month"](),g=a[q+"FullYear"](),n=a[q+"Hours"](),r=a[q+"Minutes"](),h=a[q+"Seconds"](),q=a[q+"Milliseconds"](),m=e?0:a.getTimezoneOffset(),w={d:u,dd:p(u),ddd:d.i18n.dayNames[c],dddd:d.i18n.dayNames[c+7],m:f+1,mm:p(f+1),mmm:d.i18n.monthNames[f],mmmm:d.i18n.monthNames[f+
-12],yy:String(g).slice(2),yyyy:g,h:n%12||12,hh:p(n%12||12),H:n,HH:p(n),M:r,MM:p(r),s:h,ss:p(h),l:p(q,3),L:p(99<q?Math.round(q/10):q),t:12>n?"a":"p",tt:12>n?"am":"pm",T:12>n?"A":"P",TT:12>n?"AM":"PM",Z:e?"UTC":(String(a).match(k)||[""]).pop().replace(l,""),o:(0<m?"-":"+")+p(100*Math.floor(Math.abs(m)/60)+Math.abs(m)%60,4),S:["th","st","nd","rd"][3<u%10?0:(10!=u%100-u%10)*u%10]};return b.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(a){return a in w?w[a]:a.slice(1,
+/\d/.test(a)||(b=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");b=String(d.masks[b]||b||d.masks["default"]);"UTC:"==b.slice(0,4)&&(b=b.slice(4),e=!0);var q=e?"getUTC":"get",t=a[q+"Date"](),c=a[q+"Day"](),f=a[q+"Month"](),g=a[q+"FullYear"](),n=a[q+"Hours"](),r=a[q+"Minutes"](),h=a[q+"Seconds"](),q=a[q+"Milliseconds"](),m=e?0:a.getTimezoneOffset(),w={d:t,dd:p(t),ddd:d.i18n.dayNames[c],dddd:d.i18n.dayNames[c+7],m:f+1,mm:p(f+1),mmm:d.i18n.monthNames[f],mmmm:d.i18n.monthNames[f+
+12],yy:String(g).slice(2),yyyy:g,h:n%12||12,hh:p(n%12||12),H:n,HH:p(n),M:r,MM:p(r),s:h,ss:p(h),l:p(q,3),L:p(99<q?Math.round(q/10):q),t:12>n?"a":"p",tt:12>n?"am":"pm",T:12>n?"A":"P",TT:12>n?"AM":"PM",Z:e?"UTC":(String(a).match(k)||[""]).pop().replace(l,""),o:(0<m?"-":"+")+p(100*Math.floor(Math.abs(m)/60)+Math.abs(m)%60,4),S:["th","st","nd","rd"][3<t%10?0:(10!=t%100-t%10)*t%10]};return b.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(a){return a in w?w[a]:a.slice(1,
a.length-1)})};
Graph.prototype.createLayersDialog=function(){var a=document.createElement("div");a.style.position="absolute";for(var b=this.getModel(),e=b.getChildCount(b.root),d=0;d<e;d++)mxUtils.bind(this,function(d){var e=document.createElement("div");e.style.overflow="hidden";e.style.textOverflow="ellipsis";e.style.padding="2px";e.style.whiteSpace="nowrap";var k=document.createElement("input");k.style.display="inline-block";k.setAttribute("type","checkbox");b.isVisible(d)&&(k.setAttribute("checked","checked"),
k.defaultChecked=!0);e.appendChild(k);var q=this.convertValueToString(d)||mxResources.get("background")||"Background";e.setAttribute("title",q);mxUtils.write(e,q);a.appendChild(e);mxEvent.addListener(k,"click",function(){null!=k.getAttribute("checked")?k.removeAttribute("checked"):k.setAttribute("checked","checked");b.setVisible(d,k.checked)})})(b.getChildAt(b.root,d));return a};
@@ -2249,7 +2249,7 @@ Graph.prototype.replacePlaceholders=function(a,b){var e=[];if(null!=b){for(var d
match.index)+(null!=l?l:k));d=match.index+k.length}}e.push(b.substring(d))}return e.join("")};Graph.prototype.restoreSelection=function(a){if(null!=a&&0<a.length){for(var b=[],e=0;e<a.length;e++){var d=this.model.getCell(a[e].id);null!=d&&b.push(d)}this.setSelectionCells(b)}else this.clearSelection()};
Graph.prototype.selectCellsForConnectVertex=function(a,b,e){2==a.length&&this.model.isVertex(a[1])?(this.setSelectionCell(a[1]),null!=e&&(mxEvent.isTouchEvent(b)?e.update(e.getState(this.view.getState(a[1]))):e.reset()),this.scrollCellToVisible(a[1])):this.setSelectionCells(a)};
Graph.prototype.connectVertex=function(a,b,e,d,k,l){l=l?l:!1;var p=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(a.geometry.x,a.geometry.y);b==mxConstants.DIRECTION_NORTH?(p.x+=a.geometry.width/2,p.y-=e):b==mxConstants.DIRECTION_SOUTH?(p.x+=a.geometry.width/2,p.y+=a.geometry.height+e):(p.x=b==mxConstants.DIRECTION_WEST?p.x-e:p.x+(a.geometry.width+e),p.y+=a.geometry.height/2);e=this.view.getState(this.model.getParent(a));
-var q=this.view.scale,u=this.view.translate,c=u.x*q,u=u.y*q;this.model.isVertex(e.cell)&&(c=e.x,u=e.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(p.x+=a.parent.geometry.x,p.y+=a.parent.geometry.y);l=l||mxEvent.isControlDown(d)&&!k?null:this.getCellAt(c+p.x*q,u+p.y*q);this.model.isAncestor(l,a)&&(l=null);for(e=l;null!=e;){if(this.isCellLocked(e)){l=null;break}e=this.model.getParent(e)}null!=l&&(e=this.view.getState(a),q=this.view.getState(l),null!=e&&null!=q&&mxUtils.intersects(e,q)&&(l=
+var q=this.view.scale,t=this.view.translate,c=t.x*q,t=t.y*q;this.model.isVertex(e.cell)&&(c=e.x,t=e.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(p.x+=a.parent.geometry.x,p.y+=a.parent.geometry.y);l=l||mxEvent.isControlDown(d)&&!k?null:this.getCellAt(c+p.x*q,t+p.y*q);this.model.isAncestor(l,a)&&(l=null);for(e=l;null!=e;){if(this.isCellLocked(e)){l=null;break}e=this.model.getParent(e)}null!=l&&(e=this.view.getState(a),q=this.view.getState(l),null!=e&&null!=q&&mxUtils.intersects(e,q)&&(l=
null));if(k=!mxEvent.isShiftDown(d)||k)b==mxConstants.DIRECTION_NORTH?p.y-=a.geometry.height/2:b==mxConstants.DIRECTION_SOUTH?p.y+=a.geometry.height/2:p.x=b==mxConstants.DIRECTION_WEST?p.x-a.geometry.width/2:p.x+a.geometry.width/2;null==l||this.isCellConnectable(l)||(e=this.getModel().getParent(l),this.getModel().isVertex(e)&&this.isCellConnectable(e)&&(l=e));if(l==a||this.model.isEdge(l)||!this.isCellConnectable(l))l=null;e=[];this.model.beginUpdate();try{q=l;if(null==q&&k){for(var c=a,f=this.getCellGeometry(a);null!=
f&&f.relative;)c=this.getModel().getParent(c),f=this.getCellGeometry(c);var g=this.view.getState(c),n=null!=g?g.style:this.getCellStyle(c);if(mxUtils.getValue(n,"part",!1)){var r=this.model.getParent(c);this.model.isVertex(r)&&(c=r)}q=this.duplicateCells([c],!1)[0];f=this.getCellGeometry(q);null!=f&&(f.x=p.x-f.width/2,f.y=p.y-f.height/2)}f=null;null!=this.layoutManager&&(f=this.layoutManager.getLayout(this.model.getParent(a)));var h=mxEvent.isControlDown(d)&&k||null==l&&null!=f&&f.constructor==mxStackLayout?
null:this.insertEdge(this.model.getParent(a),null,"",a,q,this.createCurrentEdgeStyle());if(null!=h&&this.connectionHandler.insertBeforeSource){var m=null;for(d=a;null!=d.parent&&null!=d.geometry&&d.geometry.relative&&d.parent!=h.parent;)d=this.model.getParent(d);null!=d&&null!=d.parent&&d.parent==h.parent&&(m=d.parent.getIndex(d),this.model.add(d.parent,h,m))}null==l&&null!=q&&null!=f&&null!=a.parent&&f.constructor==mxStackLayout&&b==mxConstants.DIRECTION_WEST&&(m=a.parent.getIndex(a),this.model.add(a.parent,
@@ -2259,8 +2259,8 @@ Graph.prototype.convertValueToString=function(a){if(null!=a.value&&"object"==typ
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){return null!=a.value&&"object"==typeof a.value?(a=a.value.getAttribute("link"),null!=a&&"javascript:"===a.toLowerCase().substring(0,11)&&(a=a.substring(11)),a):null};
Graph.prototype.getCellStyle=function(a){var b=mxGraph.prototype.getCellStyle.apply(this,arguments);if(null!=a&&null!=this.layoutManager){var e=this.model.getParent(a);this.model.isVertex(e)&&this.isCellCollapsed(a)&&(e=this.layoutManager.getLayout(e),null!=e&&e.constructor==mxStackLayout&&(b[mxConstants.STYLE_HORIZONTAL]=!e.horizontal))}return b};
Graph.prototype.updateAlternateBounds=function(a,b,e){if(null!=a&&null!=b&&null!=this.layoutManager&&null!=b.alternateBounds){var d=this.layoutManager.getLayout(this.model.getParent(a));null!=d&&d.constructor==mxStackLayout&&(d.horizontal?b.alternateBounds.height=0:b.alternateBounds.width=0)}mxGraph.prototype.updateAlternateBounds.apply(this,arguments)};Graph.prototype.isMoveCellsEvent=function(a){return mxEvent.isShiftDown(a)};
-Graph.prototype.foldCells=function(a,b,e,d,k){b=null!=b?b:!1;null==e&&(e=this.getFoldableCells(this.getSelectionCells(),a));if(null!=e){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var l=0;l<e.length;l++){var p=this.view.getState(e[l]),q=this.getCellGeometry(e[l]);if(null!=p&&null!=q){var u=Math.round(q.width-p.width/this.view.scale),c=Math.round(q.height-p.height/this.view.scale);if(0!=c||0!=u){var f=this.model.getParent(e[l]),g=this.layoutManager.getLayout(f);
-null==g?null!=k&&this.isMoveCellsEvent(k)&&this.moveSiblings(p,f,u,c):null!=k&&mxEvent.isAltDown(k)||g.constructor!=mxStackLayout||g.resizeLast||this.resizeParentStacks(f,g,u,c)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(e)}};
+Graph.prototype.foldCells=function(a,b,e,d,k){b=null!=b?b:!1;null==e&&(e=this.getFoldableCells(this.getSelectionCells(),a));if(null!=e){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var l=0;l<e.length;l++){var p=this.view.getState(e[l]),q=this.getCellGeometry(e[l]);if(null!=p&&null!=q){var t=Math.round(q.width-p.width/this.view.scale),c=Math.round(q.height-p.height/this.view.scale);if(0!=c||0!=t){var f=this.model.getParent(e[l]),g=this.layoutManager.getLayout(f);
+null==g?null!=k&&this.isMoveCellsEvent(k)&&this.moveSiblings(p,f,t,c):null!=k&&mxEvent.isAltDown(k)||g.constructor!=mxStackLayout||g.resizeLast||this.resizeParentStacks(f,g,t,c)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(e)}};
Graph.prototype.moveSiblings=function(a,b,e,d){this.model.beginUpdate();try{var k=this.getCellsBeyond(a.x,a.y,b,!0,!0);for(b=0;b<k.length;b++)if(k[b]!=a.cell){var l=this.view.getState(k[b]),p=this.getCellGeometry(k[b]);null!=l&&null!=p&&(p=p.clone(),p.translate(Math.round(e*Math.max(0,Math.min(1,(l.x-a.x)/a.width))),Math.round(d*Math.max(0,Math.min(1,(l.y-a.y)/a.height)))),this.model.setGeometry(k[b],p))}}finally{this.model.endUpdate()}};
Graph.prototype.resizeParentStacks=function(a,b,e,d){if(null!=this.layoutManager&&null!=b&&b.constructor==mxStackLayout&&!b.resizeLast){this.model.beginUpdate();try{for(var k=b.horizontal;null!=a&&null!=b&&b.constructor==mxStackLayout&&b.horizontal==k&&!b.resizeLast;){var l=this.getCellGeometry(a),p=this.view.getState(a);null!=p&&null!=l&&(l=l.clone(),b.horizontal?l.width+=e+Math.min(0,p.width/this.view.scale-l.width):l.height+=d+Math.min(0,p.height/this.view.scale-l.height),this.model.setGeometry(a,
l));a=this.model.getParent(a);b=this.layoutManager.getLayout(a)}}finally{this.model.endUpdate()}}};Graph.prototype.isContainer=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return this.isSwimlane(a)?"0"!=b.container:"1"==b.container};Graph.prototype.isCellConnectable=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return null!=b.connectable?"0"!=b.connectable:mxGraph.prototype.isCellConnectable.apply(this,arguments)};
@@ -2307,11 +2307,11 @@ this.reset())}else this.reset()};HoverIcons.prototype.setCurrentState=function(a
(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(a,c){var d=this.getState(a);null!=d&&this.graph.model.isEdge(d.cell)&&null!=d.style&&1!=d.style[mxConstants.STYLE_CURVED]&&!d.invalid&&this.updateLineJumps(d)&&this.graph.cellRenderer.redraw(d,!1,this.isRendering());d=b.apply(this,arguments);null!=
d&&this.graph.model.isEdge(d.cell)&&1!=d.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(d);return d};var e=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(a,c){return e.apply(this,arguments)||null!=a.routedPoints&&null!=c.routedPoints&&!mxUtils.equalPoints(c.routedPoints,a.routedPoints)};var d=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=function(a){d.apply(this,arguments);this.graph.model.isEdge(a.cell)&&1!=a.style[mxConstants.STYLE_CURVED]&&
this.updateLineJumps(a)};mxGraphView.prototype.updateLineJumps=function(a){var c=a.absolutePoints;if(Graph.lineJumpsEnabled){var b=null!=a.routedPoints,d=null;if(null!=c&&null!=this.validEdges&&"none"!==mxUtils.getValue(a.style,"jumpStyle","none")){for(var e=function(c,b,f){var e=new mxPoint(b,f);e.type=c;d.push(e);e=null!=a.routedPoints?a.routedPoints[d.length-1]:null;return null==e||e.type!=c||e.x!=b||e.y!=f},r=.5*this.scale,b=!1,d=[],h=0;h<c.length-1;h++){for(var m=c[h+1],k=c[h],v=[],q=c[h+2];h<
-c.length-2&&mxUtils.ptSegDistSq(k.x,k.y,q.x,q.y,m.x,m.y)<1*this.scale*this.scale;)m=q,h++,q=c[h+2];for(var b=e(0,k.x,k.y)||b,x=0;x<this.validEdges.length;x++){var t=this.validEdges[x],z=t.absolutePoints;if(null!=z&&mxUtils.intersects(a,t)&&"1"!=t.style.noJump)for(t=0;t<z.length-1;t++){for(var l=z[t+1],p=z[t],q=z[t+2];t<z.length-2&&mxUtils.ptSegDistSq(p.x,p.y,q.x,q.y,l.x,l.y)<1*this.scale*this.scale;)l=q,t++,q=z[t+2];q=mxUtils.intersection(k.x,k.y,m.x,m.y,p.x,p.y,l.x,l.y);if(null!=q&&(Math.abs(q.x-
-p.x)>r||Math.abs(q.y-p.y)>r)&&(Math.abs(q.x-l.x)>r||Math.abs(q.y-l.y)>r)){l=q.x-k.x;p=q.y-k.y;q={distSq:l*l+p*p,x:q.x,y:q.y};for(l=0;l<v.length;l++)if(v[l].distSq>q.distSq){v.splice(l,0,q);q=null;break}null==q||0!=v.length&&v[v.length-1].x===q.x&&v[v.length-1].y===q.y||v.push(q)}}}for(t=0;t<v.length;t++)b=e(1,v[t].x,v[t].y)||b}q=c[c.length-1];b=e(0,q.x,q.y)||b}a.routedPoints=d;return b}return!1};var k=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(a,c,b){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)k.apply(this,arguments);else{var d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,f=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,e=mxUtils.getValue(this.style,"jumpStyle","none"),h,m=!0,q=null,v=null;h=[];var l=null;a.begin();for(var x=0;x<this.state.routedPoints.length;x++){var t=
-this.state.routedPoints[x],z=new mxPoint(t.x/this.scale,t.y/this.scale);0==x?z=c[0]:x==this.state.routedPoints.length-1&&(z=c[c.length-1]);var p=!1;if(null!=q&&1==t.type){var u=this.state.routedPoints[x+1],t=u.x/this.scale-z.x,u=u.y/this.scale-z.y,t=t*t+u*u;null==l&&(l=new mxPoint(z.x-q.x,z.y-q.y),v=Math.sqrt(l.x*l.x+l.y*l.y),l.x=l.x*f/v,l.y=l.y*f/v);t>f*f&&0<v&&(t=q.x-z.x,u=q.y-z.y,t=t*t+u*u,t>f*f&&(p=new mxPoint(z.x-l.x,z.y-l.y),t=new mxPoint(z.x+l.x,z.y+l.y),h.push(p),this.addPoints(a,h,b,d,!1,
-null,m),h=0>Math.round(l.x)||0==Math.round(l.x)&&0>=Math.round(l.y)?1:-1,m=!1,"sharp"==e?(a.lineTo(p.x-l.y*h,p.y+l.x*h),a.lineTo(t.x-l.y*h,t.y+l.x*h),a.lineTo(t.x,t.y)):"arc"==e?(h*=1.3,a.curveTo(p.x-l.y*h,p.y+l.x*h,t.x-l.y*h,t.y+l.x*h,t.x,t.y)):(a.moveTo(t.x,t.y),m=!0),h=[t],p=!0))}else l=null;p||(h.push(z),q=z)}this.addPoints(a,h,b,d,!1,null,m);a.stroke()}};var l=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(a,c,b,d){if(null==c||null==
+c.length-2&&mxUtils.ptSegDistSq(k.x,k.y,q.x,q.y,m.x,m.y)<1*this.scale*this.scale;)m=q,h++,q=c[h+2];for(var b=e(0,k.x,k.y)||b,x=0;x<this.validEdges.length;x++){var u=this.validEdges[x],z=u.absolutePoints;if(null!=z&&mxUtils.intersects(a,u)&&"1"!=u.style.noJump)for(u=0;u<z.length-1;u++){for(var l=z[u+1],p=z[u],q=z[u+2];u<z.length-2&&mxUtils.ptSegDistSq(p.x,p.y,q.x,q.y,l.x,l.y)<1*this.scale*this.scale;)l=q,u++,q=z[u+2];q=mxUtils.intersection(k.x,k.y,m.x,m.y,p.x,p.y,l.x,l.y);if(null!=q&&(Math.abs(q.x-
+p.x)>r||Math.abs(q.y-p.y)>r)&&(Math.abs(q.x-l.x)>r||Math.abs(q.y-l.y)>r)){l=q.x-k.x;p=q.y-k.y;q={distSq:l*l+p*p,x:q.x,y:q.y};for(l=0;l<v.length;l++)if(v[l].distSq>q.distSq){v.splice(l,0,q);q=null;break}null==q||0!=v.length&&v[v.length-1].x===q.x&&v[v.length-1].y===q.y||v.push(q)}}}for(u=0;u<v.length;u++)b=e(1,v[u].x,v[u].y)||b}q=c[c.length-1];b=e(0,q.x,q.y)||b}a.routedPoints=d;return b}return!1};var k=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(a,c,b){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)k.apply(this,arguments);else{var d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,f=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,e=mxUtils.getValue(this.style,"jumpStyle","none"),h,m=!0,q=null,v=null;h=[];var l=null;a.begin();for(var x=0;x<this.state.routedPoints.length;x++){var u=
+this.state.routedPoints[x],z=new mxPoint(u.x/this.scale,u.y/this.scale);0==x?z=c[0]:x==this.state.routedPoints.length-1&&(z=c[c.length-1]);var p=!1;if(null!=q&&1==u.type){var t=this.state.routedPoints[x+1],u=t.x/this.scale-z.x,t=t.y/this.scale-z.y,u=u*u+t*t;null==l&&(l=new mxPoint(z.x-q.x,z.y-q.y),v=Math.sqrt(l.x*l.x+l.y*l.y),l.x=l.x*f/v,l.y=l.y*f/v);u>f*f&&0<v&&(u=q.x-z.x,t=q.y-z.y,u=u*u+t*t,u>f*f&&(p=new mxPoint(z.x-l.x,z.y-l.y),u=new mxPoint(z.x+l.x,z.y+l.y),h.push(p),this.addPoints(a,h,b,d,!1,
+null,m),h=0>Math.round(l.x)||0==Math.round(l.x)&&0>=Math.round(l.y)?1:-1,m=!1,"sharp"==e?(a.lineTo(p.x-l.y*h,p.y+l.x*h),a.lineTo(u.x-l.y*h,u.y+l.x*h),a.lineTo(u.x,u.y)):"arc"==e?(h*=1.3,a.curveTo(p.x-l.y*h,p.y+l.x*h,u.x-l.y*h,u.y+l.x*h,u.x,u.y)):(a.moveTo(u.x,u.y),m=!0),h=[u],p=!0))}else l=null;p||(h.push(z),q=z)}this.addPoints(a,h,b,d,!1,null,m);a.stroke()}};var l=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(a,c,b,d){if(null==c||null==
a||"1"!=c.style.snapToPoint&&"1"!=a.style.snapToPoint)l.apply(this,arguments);else{c=this.getTerminalPort(a,c,d);var f=this.getNextPoint(a,b,d),e=this.graph.isOrthogonal(a),g=mxUtils.toRadians(Number(c.style[mxConstants.STYLE_ROTATION]||"0")),m=new mxPoint(c.getCenterX(),c.getCenterY());if(0!=g)var k=Math.cos(-g),v=Math.sin(-g),f=mxUtils.getRotatedPoint(f,k,v,m);k=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]||0);k+=parseFloat(a.style[d?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||
0);f=this.getPerimeterPoint(c,f,0==g&&e,k);0!=g&&(k=Math.cos(g),v=Math.sin(g),f=mxUtils.getRotatedPoint(f,k,v,m));a.setAbsoluteTerminalPoint(this.snapToAnchorPoint(a,c,b,d,f),d)}};mxGraphView.prototype.snapToAnchorPoint=function(a,c,b,d,e){if(null!=c&&null!=a){a=this.graph.getAllConnectionConstraints(c);d=b=null;if(null!=a)for(var f=0;f<a.length;f++){var g=this.graph.getConnectionPoint(c,a[f]);if(null!=g){var n=(g.x-e.x)*(g.x-e.x)+(g.y-e.y)*(g.y-e.y);if(null==d||n<d)b=g,d=n}}null!=b&&(e=b)}return e};
var p=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(a,c,b){var d=p.apply(this,arguments);"1"==a.getAttribute("placeholders")&&null!=b.state&&(d=b.state.view.graph.replacePlaceholders(b.state.cell,d));return d};var q=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(a){if(null!=a.style&&"undefined"!==typeof pako){var c=mxUtils.getValue(a.style,mxConstants.STYLE_SHAPE,null);if(null!=c&&"stencil("==c.substring(0,8))try{var b=
@@ -2336,7 +2336,7 @@ e[1]),2<e.length?"0"!=e[2]:!0))}}catch(F){}return d}if(null!=a.shape)if(null!=a.
this.setCellStyles(mxConstants.STYLE_ELBOW,c,[a]))}};Graph.prototype.isValidRoot=function(a){for(var c=this.model.getChildCount(a),b=0,d=0;d<c;d++){var f=this.model.getChildAt(a,d);this.model.isVertex(f)&&(f=this.getCellGeometry(f),null==f||f.relative||b++)}return 0<b||this.isContainer(a)};Graph.prototype.isValidDropTarget=function(a){var c=this.view.getState(a),c=null!=c?c.style:this.getCellStyle(a);return"1"!=mxUtils.getValue(c,"part","0")&&(this.isContainer(a)||mxGraph.prototype.isValidDropTarget.apply(this,
arguments)&&"0"!=mxUtils.getValue(c,"dropTarget","1"))};Graph.prototype.createGroupCell=function(){var a=mxGraph.prototype.createGroupCell.apply(this,arguments);a.setStyle("group");return a};Graph.prototype.isExtendParentsOnAdd=function(a){var c=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(c&&null!=a&&null!=this.layoutManager){var b=this.model.getParent(a);null!=b&&(b=this.layoutManager.getLayout(b),null!=b&&b.constructor==mxStackLayout&&(c=!1))}return c};Graph.prototype.getPreferredSizeForCell=
function(a){var c=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=c&&(c.width+=10,c.height+=4,this.gridEnabled&&(c.width=this.snap(c.width),c.height=this.snap(c.height)));return c};Graph.prototype.turnShapes=function(a){var c=this.getModel(),b=[];c.beginUpdate();try{for(var d=0;d<a.length;d++){var f=a[d];if(c.isEdge(f)){var e=c.getTerminal(f,!0),g=c.getTerminal(f,!1);c.setTerminal(f,g,!0);c.setTerminal(f,e,!1);var h=c.getGeometry(f);if(null!=h){h=h.clone();null!=h.points&&h.points.reverse();
-var n=h.getTerminalPoint(!0),m=h.getTerminalPoint(!1);h.setTerminalPoint(n,!1);h.setTerminalPoint(m,!0);c.setGeometry(f,h);var r=this.view.getState(f),t=this.view.getState(e),x=this.view.getState(g);if(null!=r){var H=null!=t?this.getConnectionConstraint(r,t,!0):null,v=null!=x?this.getConnectionConstraint(r,x,!1):null;this.setConnectionConstraint(f,e,!0,v);this.setConnectionConstraint(f,g,!1,H)}b.push(f)}}else if(c.isVertex(f)&&(h=this.getCellGeometry(f),null!=h)){h=h.clone();h.x+=h.width/2-h.height/
+var n=h.getTerminalPoint(!0),m=h.getTerminalPoint(!1);h.setTerminalPoint(n,!1);h.setTerminalPoint(m,!0);c.setGeometry(f,h);var r=this.view.getState(f),u=this.view.getState(e),x=this.view.getState(g);if(null!=r){var H=null!=u?this.getConnectionConstraint(r,u,!0):null,v=null!=x?this.getConnectionConstraint(r,x,!1):null;this.setConnectionConstraint(f,e,!0,v);this.setConnectionConstraint(f,g,!1,H)}b.push(f)}}else if(c.isVertex(f)&&(h=this.getCellGeometry(f),null!=h)){h=h.clone();h.x+=h.width/2-h.height/
2;h.y+=h.height/2-h.width/2;var k=h.width;h.width=h.height;h.height=k;c.setGeometry(f,h);var z=this.view.getState(f);if(null!=z){var q=z.style[mxConstants.STYLE_DIRECTION]||"east";"east"==q?q="south":"south"==q?q="west":"west"==q?q="north":"north"==q&&(q="east");this.setCellStyles(mxConstants.STYLE_DIRECTION,q,[f])}b.push(f)}}}finally{c.endUpdate()}return b};Graph.prototype.stencilHasPlaceholders=function(a){if(null!=a&&null!=a.fgNode)for(a=a.fgNode.firstChild;null!=a;){if("text"==a.nodeName&&"1"==
a.getAttribute("placeholders"))return!0;a=a.nextSibling}return!1};Graph.prototype.processChange=function(a){mxGraph.prototype.processChange.apply(this,arguments);if(a instanceof mxValueChange&&null!=a.cell&&null!=a.cell.value&&"object"==typeof a.cell.value){var c=this.model.getDescendants(a.cell);if(0<c.length)for(var b=0;b<c.length;b++){var d=this.view.getState(c[b]);null!=d&&null!=d.shape&&null!=d.shape.stencil&&this.stencilHasPlaceholders(d.shape.stencil)?this.removeStateForCell(c[b]):this.isReplacePlaceholders(c[b])&&
this.view.invalidate(c[b],!1,!1)}}};Graph.prototype.replaceElement=function(a,c){for(var b=a.ownerDocument.createElement(null!=c?c:"span"),d=Array.prototype.slice.call(a.attributes);attr=d.pop();)b.setAttribute(attr.nodeName,attr.nodeValue);b.innerHTML=a.innerHTML;a.parentNode.replaceChild(b,a)};Graph.prototype.updateLabelElements=function(a,c,b){a=null!=a?a:this.getSelectionCells();for(var d=document.createElement("div"),f=0;f<a.length;f++)if(this.isHtmlLabel(a[f])){var e=this.convertValueToString(a[f]);
@@ -2364,11 +2364,11 @@ this.getCellStyle(a);return c||"0"!=mxUtils.getValue(b,mxConstants.STYLE_RESIZAB
c.x-b.x:c.y-b.y});g=this.view.translate;h=this.view.scale;f=f/h-(a?g.x:g.y);d=d/h-(a?g.x:g.y);this.getModel().beginUpdate();try{for(var n=(d-f)/(b.length-1),d=f,e=1;e<b.length-1;e++){var m=this.view.getState(this.model.getParent(b[e].cell)),r=this.getCellGeometry(b[e].cell),d=d+n;null!=r&&null!=m&&(r=r.clone(),a?r.x=Math.round(d-r.width/2)-m.origin.x:r.y=Math.round(d-r.height/2)-m.origin.y,this.getModel().setGeometry(b[e].cell,r))}}finally{this.getModel().endUpdate()}}}return c};Graph.prototype.isCloneEvent=
function(a){return mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxEvent.isControlDown(a)};Graph.prototype.encodeCells=function(a){for(var c=this.cloneCells(a),b=new mxDictionary,d=0;d<a.length;d++)b.put(a[d],!0);for(d=0;d<c.length;d++){var f=this.view.getState(a[d]);if(null!=f){var e=this.getCellGeometry(c[d]);null==e||!e.relative||this.model.isEdge(a[d])||b.get(this.model.getParent(a[d]))||(e.relative=!1,e.x=f.x/f.view.scale-f.view.translate.x,e.y=f.y/f.view.scale-f.view.translate.y)}}b=new mxCodec;f=
new mxGraphModel;e=f.getChildAt(f.getRoot(),0);for(d=0;d<a.length;d++)f.add(e,c[d]);return b.encode(f)};Graph.prototype.createSvgImageExport=function(){var a=new mxImageExport;a.getLinkForCellState=mxUtils.bind(this,function(a,c){return this.getLinkForCell(a.cell)});return a};Graph.prototype.getSvg=function(a,c,b,d,f,e,g,h,n,m){var r=this.useCssTransforms;r&&(this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange());try{c=null!=c?c:1;b=null!=b?b:0;f=null!=f?f:!0;e=null!=e?e:!0;g=null!=
-g?g:!0;var t=e||d?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==t)throw Error(mxResources.get("drawingEmpty"));var x=this.view.scale,v=mxUtils.createXmlDocument(),k=null!=v.createElementNS?v.createElementNS(mxConstants.NS_SVG,"svg"):v.createElement("svg");null!=a&&(null!=k.style?k.style.backgroundColor=a:k.setAttribute("style","background-color:"+a));null==v.createElementNS?(k.setAttribute("xmlns",mxConstants.NS_SVG),k.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):
-k.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=c/x;var z=Math.max(1,Math.ceil(t.width*a)+2*b)+(m?5:0),q=Math.max(1,Math.ceil(t.height*a)+2*b)+(m?5:0);k.setAttribute("version","1.1");k.setAttribute("width",z+"px");k.setAttribute("height",q+"px");k.setAttribute("viewBox",(f?"-0.5 -0.5":"0 0")+" "+z+" "+q);v.appendChild(k);var w=this.createSvgCanvas(k);w.foOffset=f?-.5:0;w.textOffset=f?-.5:0;w.imageOffset=f?-.5:0;w.translate(Math.floor((b/c-t.x)/x),Math.floor((b/
-c-t.y)/x));var l=document.createElement("textarea"),y=w.createAlternateContent;w.createAlternateContent=function(a,c,b,d,f,e,g,h,n,m,r,t,x){var k=this.state;if(null!=this.foAltText&&(0==d||0!=k.fontSize&&e.length<5*d/k.fontSize)){var v=this.createElement("text");v.setAttribute("x",Math.round(d/2));v.setAttribute("y",Math.round((f+k.fontSize)/2));v.setAttribute("fill",k.fontColor||"black");v.setAttribute("text-anchor","middle");v.setAttribute("font-size",Math.round(k.fontSize)+"px");v.setAttribute("font-family",
+g?g:!0;var u=e||d?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==u)throw Error(mxResources.get("drawingEmpty"));var x=this.view.scale,v=mxUtils.createXmlDocument(),k=null!=v.createElementNS?v.createElementNS(mxConstants.NS_SVG,"svg"):v.createElement("svg");null!=a&&(null!=k.style?k.style.backgroundColor=a:k.setAttribute("style","background-color:"+a));null==v.createElementNS?(k.setAttribute("xmlns",mxConstants.NS_SVG),k.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):
+k.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=c/x;var z=Math.max(1,Math.ceil(u.width*a)+2*b)+(m?5:0),q=Math.max(1,Math.ceil(u.height*a)+2*b)+(m?5:0);k.setAttribute("version","1.1");k.setAttribute("width",z+"px");k.setAttribute("height",q+"px");k.setAttribute("viewBox",(f?"-0.5 -0.5":"0 0")+" "+z+" "+q);v.appendChild(k);var w=this.createSvgCanvas(k);w.foOffset=f?-.5:0;w.textOffset=f?-.5:0;w.imageOffset=f?-.5:0;w.translate(Math.floor((b/c-u.x)/x),Math.floor((b/
+c-u.y)/x));var l=document.createElement("textarea"),y=w.createAlternateContent;w.createAlternateContent=function(a,c,b,d,f,e,g,h,n,m,r,u,x){var k=this.state;if(null!=this.foAltText&&(0==d||0!=k.fontSize&&e.length<5*d/k.fontSize)){var v=this.createElement("text");v.setAttribute("x",Math.round(d/2));v.setAttribute("y",Math.round((f+k.fontSize)/2));v.setAttribute("fill",k.fontColor||"black");v.setAttribute("text-anchor","middle");v.setAttribute("font-size",Math.round(k.fontSize)+"px");v.setAttribute("font-family",
k.fontFamily);(k.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&v.setAttribute("font-weight","bold");(k.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&v.setAttribute("font-style","italic");(k.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&v.setAttribute("text-decoration","underline");try{return l.innerHTML=e,v.textContent=l.value,v}catch(ta){return y.apply(this,arguments)}}else return y.apply(this,arguments)};var H=this.backgroundImage;if(null!=H){c=x/c;
-var p=this.view.translate,B=new mxRectangle(p.x*c,p.y*c,H.width*c,H.height*c);mxUtils.intersects(t,B)&&w.image(p.x,p.y,H.width,H.height,H.src,!0)}w.scale(a);w.textEnabled=g;h=null!=h?h:this.createSvgImageExport();var D=h.drawCellState;h.drawCellState=function(a,c){for(var b=a.view.graph,d=b.isCellSelected(a.cell),f=b.model.getParent(a.cell);!e&&!d&&null!=f;)d=b.isCellSelected(f),f=b.model.getParent(f);(e||d)&&D.apply(this,arguments)};h.drawState(this.getView().getState(this.model.root),w);this.updateSvgLinks(k,
+var p=this.view.translate,C=new mxRectangle(p.x*c,p.y*c,H.width*c,H.height*c);mxUtils.intersects(u,C)&&w.image(p.x,p.y,H.width,H.height,H.src,!0)}w.scale(a);w.textEnabled=g;h=null!=h?h:this.createSvgImageExport();var E=h.drawCellState;h.drawCellState=function(a,c){for(var b=a.view.graph,d=b.isCellSelected(a.cell),f=b.model.getParent(a.cell);!e&&!d&&null!=f;)d=b.isCellSelected(f),f=b.model.getParent(f);(e||d)&&E.apply(this,arguments)};h.drawState(this.getView().getState(this.model.root),w);this.updateSvgLinks(k,
n,!0);return k}finally{r&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.updateSvgLinks=function(a,c,b){a=a.getElementsByTagName("a");for(var d=0;d<a.length;d++){var f=a[d].getAttribute("href");null==f&&(f=a[d].getAttribute("xlink:href"));null!=f&&(null!=c&&/^https?:\/\//.test(f)?a[d].setAttribute("target",c):b&&this.isCustomLink(f)&&a[d].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(a){return new mxSvgCanvas2D(a)};
Graph.prototype.getSelectedElement=function(){var a=null;if(window.getSelection){var c=window.getSelection();c.getRangeAt&&c.rangeCount&&(a=c.getRangeAt(0).commonAncestorContainer)}else document.selection&&(a=document.selection.createRange().parentElement());return a};Graph.prototype.getParentByName=function(a,c,b){for(;null!=a&&a.nodeName!=c;){if(a==b)return null;a=a.parentNode}return a};Graph.prototype.selectNode=function(a){var c=null;if(window.getSelection){if(c=window.getSelection(),c.getRangeAt&&
c.rangeCount){var b=document.createRange();b.selectNode(a);c.removeAllRanges();c.addRange(b)}}else(c=document.selection)&&"Control"!=c.type&&(a=c.createRange(),a.collapse(!0),b=c.createRange(),b.setEndPoint("StartToStart",a),b.select())};Graph.prototype.insertRow=function(a,c){for(var b=a.tBodies[0],d=b.rows[0].cells,f=0,e=0;e<d.length;e++)var g=d[e].getAttribute("colspan"),f=f+(null!=g?parseInt(g):1);b=b.insertRow(c);for(e=0;e<f;e++)mxUtils.br(b.insertCell(-1));return b.cells[0]};Graph.prototype.deleteRow=
@@ -2379,7 +2379,7 @@ mxEvent.consume(c)}));return d};Graph.prototype.initTouch=function(){this.connec
c.graphY)||(c.state=this.view.getState(b),null!=c.state&&null!=c.state.shape&&(this.container.style.cursor=c.state.shape.node.style.cursor))}null==c.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return c};var c=!1,b=!1,d=!1,f=this.fireMouseEvent;this.fireMouseEvent=function(a,e,g){a==mxEvent.MOUSE_DOWN&&(e=this.updateMouseEvent(e),c=this.isCellSelected(e.getCell()),b=this.isSelectionEmpty(),d=this.popupMenuHandler.isMenuShowing());f.apply(this,arguments)};this.popupMenuHandler.mouseUp=
mxUtils.bind(this,function(a,f){this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==f.getState()||!f.isSource(f.getState().control))&&(this.popupMenuHandler.popupTrigger||!d&&!mxEvent.isMouseEvent(f.getEvent())&&(b&&null==f.getCell()&&this.isSelectionEmpty()||c&&this.isCellSelected(f.getCell())));mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,arguments)})};mxCellEditor.prototype.isContentEditing=function(){var a=this.graph.view.getState(this.editingCell);
return null!=a&&1==a.style.html};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var a=window.getSelection();if(a.getRangeAt&&a.rangeCount){for(var c=[],b=0,d=a.rangeCount;b<d;++b)c.push(a.getRangeAt(b));return c}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(a){try{if(a)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var c=0,b=a.length;c<
-b;++c)sel.addRange(a[c])}else document.selection&&a.select&&a.select()}catch(Y){}};var k=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br","1"));k.apply(this,arguments)};var l=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(a,c){this.isKeepFocusEvent(a)||!mxEvent.isAltDown(a.getEvent())?l.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=
+b;++c)sel.addRange(a[c])}else document.selection&&a.select&&a.select()}catch(W){}};var k=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br","1"));k.apply(this,arguments)};var l=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(a,c){this.isKeepFocusEvent(a)||!mxEvent.isAltDown(a.getEvent())?l.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=
function(a){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var p=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(a,c){p.apply(this,arguments);var b=this.graph.view.getState(a);this.textarea.className=null!=b&&1==b.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(a);var b=this.graph.getModel().getParent(a),
d=this.graph.getCellGeometry(a);this.graph.getModel().isEdge(b)&&null!=d&&d.relative||this.graph.getModel().isEdge(a)?mxClient.IS_QUIRKS?this.textarea.style.border="gray dotted 1px":this.textarea.style.outline=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":"":mxClient.IS_QUIRKS&&(this.textarea.style.outline="none",this.textarea.style.border="")};var q=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(a){function c(a,b){b.originalNode=
a;a=a.firstChild;for(var d=b.firstChild;null!=a&&null!=d;)c(a,d),a=a.nextSibling,d=d.nextSibling;return b}function b(a,c){if(null!=a)if(c.originalNode!=a)d(a);else for(a=a.firstChild,c=c.firstChild;null!=a;){var f=a.nextSibling;null==c?d(a):(b(a,c),c=c.nextSibling);a=f}}function d(a){for(var c=a.firstChild;null!=c;){var b=c.nextSibling;d(c);c=b}1==a.nodeType&&("BR"===a.nodeName||null!=a.firstChild)||3==a.nodeType&&0!=mxUtils.trim(mxUtils.getTextContent(a)).length?(3==a.nodeType&&mxUtils.setTextContent(a,
@@ -2389,10 +2389,10 @@ mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE),c=mxUtils.getValue(a.st
mxConstants.FONT_UNDERLINE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(d*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(d)+"px";this.textarea.style.textDecoration=a?"underline":"";this.textarea.style.fontWeight=e?"bold":"normal";this.textarea.style.fontStyle=g?"italic":"";this.textarea.style.fontFamily=c;this.textarea.style.textAlign=f;this.textarea.style.padding="0px";this.textarea.innerHTML!=h&&(this.textarea.innerHTML=
h,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length));this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerHTML="");var h=mxUtils.htmlEntities(this.textarea.innerHTML);mxClient.IS_QUIRKS||8==document.documentMode||(h=mxUtils.replaceTrailingNewlines(h,"<div><br></div>"));h=this.graph.sanitizeHtml(c?h.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,
"<br>"):h,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var d=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(d*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(d)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.padding=
-"2px";this.textarea.innerHTML!=h&&(this.textarea.innerHTML=h);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=b;this.resize()};var u=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(a,c){if(null!=this.textarea)if(a=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=a){var b=a.view.scale;this.bounds=mxRectangle.fromRectangle(a);if(0==this.bounds.width&&0==
+"2px";this.textarea.innerHTML!=h&&(this.textarea.innerHTML=h);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=b;this.resize()};var t=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(a,c){if(null!=this.textarea)if(a=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=a){var b=a.view.scale;this.bounds=mxRectangle.fromRectangle(a);if(0==this.bounds.width&&0==
this.bounds.height){this.bounds.width=160*b;this.bounds.height=60*b;var d=null!=a.text?a.text.margin:null;null==d&&(d=mxUtils.getAlignmentAsPoint(mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(a.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=d.x*this.bounds.width;this.bounds.y+=d.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/b)+"px";this.textarea.style.height=Math.round((this.bounds.height-
4)/b)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/b)+(this.textarea.offsetHeight-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*b);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/b)+(this.textarea.offsetWidth-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*
-b);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=Math.round(this.bounds.y)+"px";mxClient.IS_VML?this.textarea.style.zoom=b:mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+b+","+b+")")}else this.textarea.style.height="",this.textarea.style.overflow="",u.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(a,c){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,
+b);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=Math.round(this.bounds.y)+"px";mxClient.IS_VML?this.textarea.style.zoom=b:mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+b+","+b+")")}else this.textarea.style.height="",this.textarea.style.overflow="",t.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(a,c){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,
arguments);var b=this.graph.getEditingValue(a.cell,c);"1"==mxUtils.getValue(a.style,"nl2Br","1")&&(b=b.replace(/\n/g,"<br/>"));return b=this.graph.sanitizeHtml(b,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(a){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var c=this.graph.sanitizeHtml(this.textarea.innerHTML,!0);return c="1"==mxUtils.getValue(a.style,"nl2Br","1")?c.replace(/\r\n/g,
"<br/>").replace(/\n/g,"<br/>"):c.replace(/\r\n/g,"").replace(/\n/g,"")};var c=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(a){this.codeViewMode&&this.toggleViewMode();c.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(H){}};var f=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(a,c){this.graph.getModel().beginUpdate();try{if(f.apply(this,arguments),this.graph.isCellDeletable(a.cell)&&
0==this.graph.model.getChildCount(a.cell)){var b=mxUtils.getValue(a.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),d=mxUtils.getValue(a.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);""==c&&b==mxConstants.NONE&&d==mxConstants.NONE&&this.graph.removeCells([a.cell],!1)}}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(a){var c=null;if(this.graph.getModel().isEdge(a.cell)||this.graph.getModel().isEdge(this.graph.getModel().getParent(a.cell)))c=
@@ -2420,43 +2420,43 @@ new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(e,
this.update(d,b),this.isSpaceEvent(c)?(d=this.x+this.width,b=this.y+this.height,f=this.graph.view.scale,mxEvent.isAltDown(c.getEvent())||(this.width=this.graph.snap(this.width/f)*f,this.height=this.graph.snap(this.height/f)*f,this.graph.isGridEnabled()||(this.width<this.graph.tolerance&&(this.width=0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=d-this.width),this.y<this.first.y&&(this.y=b-this.height)),this.div.style.borderStyle="dashed",this.div.style.backgroundColor=
"white",this.div.style.left=this.x+"px",this.div.style.top=this.y+"px",this.div.style.width=Math.max(0,this.width)+"px",this.div.style.height=this.graph.container.clientHeight+"px",this.div.style.borderWidth=0>=this.width?"0px 1px 0px 0px":"0px 1px 0px 1px",null==this.secondDiv&&(this.secondDiv=this.div.cloneNode(!0),this.div.parentNode.appendChild(this.secondDiv)),this.secondDiv.style.left=this.x+"px",this.secondDiv.style.top=this.y+"px",this.secondDiv.style.width=this.graph.container.clientWidth+
"px",this.secondDiv.style.height=Math.max(0,this.height)+"px",this.secondDiv.style.borderWidth=0>=this.height?"1px 0px 0px 0px":"1px 0px 1px 0px"):(this.div.style.backgroundColor="",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),c.consume()}};var h=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),
-this.secondDiv=null);h.apply(this,arguments)};var m=(new Date).getTime(),w=0,v=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,c,b,d){v.apply(this,arguments);b!=this.currentTerminalState?(m=(new Date).getTime(),w=0):w=(new Date).getTime()-m;this.currentTerminalState=b};var D=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&&
-2E3<w||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&D.apply(this,arguments)};mxVertexHandler.prototype.isCustomHandleEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.createHandleShape=function(a,c){var b=null!=a&&0==a,d=this.state.getVisibleTerminalState(b),f=null!=a&&(0==a||a>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==a)?this.graph.getConnectionConstraint(this.state,
+this.secondDiv=null);h.apply(this,arguments)};var m=(new Date).getTime(),w=0,v=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,c,b,d){v.apply(this,arguments);b!=this.currentTerminalState?(m=(new Date).getTime(),w=0):w=(new Date).getTime()-m;this.currentTerminalState=b};var E=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&&
+2E3<w||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&E.apply(this,arguments)};mxVertexHandler.prototype.isCustomHandleEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.createHandleShape=function(a,c){var b=null!=a&&0==a,d=this.state.getVisibleTerminalState(b),f=null!=a&&(0==a||a>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==a)?this.graph.getConnectionConstraint(this.state,
d,b):null,b=null!=(null!=f?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(b),f):null)?this.fixedHandleImage:null!=f&&null!=d?this.terminalHandleImage:this.handleImage;if(null!=b)return b=new mxImageShape(new mxRectangle(0,0,b.width,b.height),b.src),b.preserveImageAspect=!1,b;b=mxConstants.HANDLE_SIZE;this.preferHtml&&--b;return new mxRectangleShape(new mxRectangle(0,0,b,b),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var x=mxVertexHandler.prototype.createSizerShape;
-mxVertexHandler.prototype.createSizerShape=function(a,c,b){this.handleImage=c==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:c==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return x.apply(this,arguments)};var t=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(a){if(null!=a&&1==a.length){var c=this.graph.getModel(),b=c.getParent(a[0]),d=this.graph.getCellGeometry(a[0]);if(c.isEdge(b)&&null!=d&&d.relative&&(c=this.graph.view.getState(a[0]),
-null!=c&&2>c.width&&2>c.height&&null!=c.text&&null!=c.text.boundingBox))return mxRectangle.fromRectangle(c.text.boundingBox)}return t.apply(this,arguments)};var z=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(a){var c=this.graph.getModel(),b=c.getParent(a.cell),d=this.graph.getCellGeometry(a.cell);return c.isEdge(b)&&null!=d&&d.relative&&2>a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox?(c=a.text.unrotatedBoundingBox||a.text.boundingBox,
-new mxRectangle(Math.round(c.x),Math.round(c.y),Math.round(c.width),Math.round(c.height))):z.apply(this,arguments)};var B=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(a,c){var b=this.graph.getModel(),d=b.getParent(this.state.cell),f=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(c)==mxEvent.ROTATION_HANDLE||!b.isEdge(d)||null==f||!f.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&B.apply(this,arguments)};mxVertexHandler.prototype.isRotationHandleVisible=
+mxVertexHandler.prototype.createSizerShape=function(a,c,b){this.handleImage=c==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:c==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return x.apply(this,arguments)};var u=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(a){if(null!=a&&1==a.length){var c=this.graph.getModel(),b=c.getParent(a[0]),d=this.graph.getCellGeometry(a[0]);if(c.isEdge(b)&&null!=d&&d.relative&&(c=this.graph.view.getState(a[0]),
+null!=c&&2>c.width&&2>c.height&&null!=c.text&&null!=c.text.boundingBox))return mxRectangle.fromRectangle(c.text.boundingBox)}return u.apply(this,arguments)};var z=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(a){var c=this.graph.getModel(),b=c.getParent(a.cell),d=this.graph.getCellGeometry(a.cell);return c.isEdge(b)&&null!=d&&d.relative&&2>a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox?(c=a.text.unrotatedBoundingBox||a.text.boundingBox,
+new mxRectangle(Math.round(c.x),Math.round(c.y),Math.round(c.width),Math.round(c.height))):z.apply(this,arguments)};var C=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(a,c){var b=this.graph.getModel(),d=b.getParent(this.state.cell),f=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(c)==mxEvent.ROTATION_HANDLE||!b.isEdge(d)||null==f||!f.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&C.apply(this,arguments)};mxVertexHandler.prototype.isRotationHandleVisible=
function(){return this.graph.isEnabled()&&this.rotationEnabled&&this.graph.isCellRotatable(this.state.cell)&&(0>=mxGraphHandler.prototype.maxCells||this.graph.getSelectionCount()<mxGraphHandler.prototype.maxCells)};mxVertexHandler.prototype.rotateClick=function(){this.state.view.graph.turnShapes([this.state.cell])};var N=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(a,c){N.apply(this,arguments);null!=this.graph.graphHandler.first&&null!=this.rotationShape&&null!=
-this.rotationShape.node&&(this.rotationShape.node.style.display="none")};var C=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(a,c){C.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none")};var G=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){G.apply(this,arguments);var a=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",
+this.rotationShape.node&&(this.rotationShape.node.style.display="none")};var D=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(a,c){D.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none")};var G=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){G.apply(this,arguments);var a=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",
mxResources.get("rotateTooltip"));var c=mxUtils.bind(this,function(){null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.specialHandle&&(this.specialHandle.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none");this.redrawHandles()});this.selectionHandler=mxUtils.bind(this,function(a,b){c()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,
this.selectionHandler);this.changeHandler=mxUtils.bind(this,function(a,b){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));c()});this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.editingHandler=mxUtils.bind(this,function(a,c){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,this.editingHandler);var b=this.graph.getLinkForCell(this.state.cell),d=this.graph.getLinksForState(this.state);this.updateLinkHint(b,
d);if(null!=b||null!=d&&0<d.length)a=!0;a&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(c,b){if(null==c&&(null==b||0==b.length)||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);else if(null!=c||null!=b&&0<b.length){null==this.linkHint&&(this.linkHint=a(),this.linkHint.style.padding="6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint));
this.linkHint.innerHTML="";if(null!=c&&(this.linkHint.appendChild(this.graph.createLinkForHint(c)),this.graph.isEnabled()&&"function"===typeof this.graph.editLink)){var d=document.createElement("img");d.setAttribute("src",Editor.editImage);d.setAttribute("title",mxResources.get("editLink"));d.setAttribute("width","11");d.setAttribute("height","11");d.style.marginLeft="10px";d.style.marginBottom="-1px";d.style.cursor="pointer";this.linkHint.appendChild(d);mxEvent.addListener(d,"click",mxUtils.bind(this,
function(a){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(a)}));d=document.createElement("img");d.setAttribute("src",Dialog.prototype.clearImage);d.setAttribute("title",mxResources.get("removeIt",[mxResources.get("link")]));d.setAttribute("width","13");d.setAttribute("height","10");d.style.marginLeft="4px";d.style.marginBottom="-1px";d.style.cursor="pointer";this.linkHint.appendChild(d);mxEvent.addListener(d,"click",mxUtils.bind(this,function(a){this.graph.setLinkForCell(this.state.cell,
-null);mxEvent.consume(a)}))}if(null!=b)for(d=0;d<b.length;d++){var f=document.createElement("div");f.style.marginTop=null!=c||0<d?"6px":"0px";f.appendChild(this.graph.createLinkForHint(b[d].getAttribute("href"),mxUtils.getTextContent(b[d])));this.linkHint.appendChild(f)}}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var J=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){J.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,
+null);mxEvent.consume(a)}))}if(null!=b)for(d=0;d<b.length;d++){var f=document.createElement("div");f.style.marginTop=null!=c||0<d?"6px":"0px";f.appendChild(this.graph.createLinkForHint(b[d].getAttribute("href"),mxUtils.getTextContent(b[d])));this.linkHint.appendChild(f)}}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var K=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){K.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,
function(){return this.state.view.graph.connectionHandler.isEnabled()});var a=mxUtils.bind(this,function(){null!=this.linkHint&&(this.linkHint.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.labelShape&&(this.labelShape.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none")});this.selectionHandler=mxUtils.bind(this,function(c,b){a()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionHandler);
this.changeHandler=mxUtils.bind(this,function(c,b){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));a();this.redrawHandles()});this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var c=this.graph.getLinkForCell(this.state.cell),b=this.graph.getLinksForState(this.state);if(null!=c||null!=b&&0<b.length)this.updateLinkHint(c,b),this.redrawHandles()};var y=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){y.apply(this,
arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var A=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){A.apply(this);if(null!=this.state&&null!=this.linkHint){var a=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),c=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),b=mxUtils.getBoundingBox(c,this.state.style[mxConstants.STYLE_ROTATION]||
"0",a),a=null!=b?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,c=null!=this.state.text?this.state.text.boundingBox:null;null==b&&(b=this.state);b=b.y+b.height;null!=c&&(b=Math.max(b,c.y+c.height));this.linkHint.style.left=Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(b+this.verticalOffset/2+6+this.state.view.graph.tolerance)+"px"}};var I=mxVertexHandler.prototype.reset;mxVertexHandler.prototype.reset=
function(){I.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none")};var O=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){O.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.selectionHandler&&(this.graph.getSelectionModel().removeListener(this.selectionHandler),this.selectionHandler=
null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var Q=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(Q.apply(this),null!=this.state&&null!=this.linkHint)){var a=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(a=new mxRectangle(a.x,a.y,a.width,a.height),
-a.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(a.y+a.height+6+this.state.view.graph.tolerance)+"px"}};var X=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){X.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var U=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){U.apply(this,arguments);null!=this.linkHint&&
-(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.selectionHandler&&(this.graph.getSelectionModel().removeListener(this.selectionHandler),this.selectionHandler=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function a(){mxCylinder.call(this)}function b(){mxActor.call(this)}function e(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function k(){mxCylinder.call(this)}function l(){mxActor.call(this)}function p(){mxCylinder.call(this)}function q(){mxActor.call(this)}function u(){mxActor.call(this)}function c(){mxActor.call(this)}function f(){mxActor.call(this)}function g(){mxActor.call(this)}function n(){mxActor.call(this)}function r(){mxActor.call(this)}function h(a,c){this.canvas=
+a.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(a.y+a.height+6+this.state.view.graph.tolerance)+"px"}};var U=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){U.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var T=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){T.apply(this,arguments);null!=this.linkHint&&
+(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.selectionHandler&&(this.graph.getSelectionModel().removeListener(this.selectionHandler),this.selectionHandler=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function a(){mxCylinder.call(this)}function b(){mxActor.call(this)}function e(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function k(){mxCylinder.call(this)}function l(){mxActor.call(this)}function p(){mxCylinder.call(this)}function q(){mxActor.call(this)}function t(){mxActor.call(this)}function c(){mxActor.call(this)}function f(){mxActor.call(this)}function g(){mxActor.call(this)}function n(){mxActor.call(this)}function r(){mxActor.call(this)}function h(a,c){this.canvas=
a;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=c;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,h.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,h.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,h.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,h.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;
-this.canvas.curveTo=mxUtils.bind(this,h.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,h.prototype.arcTo)}function m(){mxRectangleShape.call(this)}function w(){mxRectangleShape.call(this)}function v(){mxActor.call(this)}function D(){mxActor.call(this)}function x(){mxActor.call(this)}function t(){mxRectangleShape.call(this)}function z(){mxRectangleShape.call(this)}function B(){mxCylinder.call(this)}function N(){mxShape.call(this)}function C(){mxShape.call(this)}
-function G(){mxEllipse.call(this)}function J(){mxShape.call(this)}function y(){mxShape.call(this)}function A(){mxRectangleShape.call(this)}function I(){mxShape.call(this)}function O(){mxShape.call(this)}function Q(){mxShape.call(this)}function X(){mxShape.call(this)}function U(){mxShape.call(this)}function H(){mxCylinder.call(this)}function ea(){mxDoubleEllipse.call(this)}function ka(){mxDoubleEllipse.call(this)}function Y(){mxArrowConnector.call(this);this.spacing=0}function ba(){mxArrowConnector.call(this);
-this.spacing=0}function K(){mxActor.call(this)}function F(){mxRectangleShape.call(this)}function S(){mxActor.call(this)}function L(){mxActor.call(this)}function M(){mxActor.call(this)}function T(){mxActor.call(this)}function E(){mxActor.call(this)}function R(){mxActor.call(this)}function V(){mxActor.call(this)}function ga(){mxActor.call(this)}function W(){mxActor.call(this)}function aa(){mxActor.call(this)}function Z(){mxEllipse.call(this)}function pa(){mxEllipse.call(this)}function qa(){mxEllipse.call(this)}
-function fa(){mxRhombus.call(this)}function la(){mxEllipse.call(this)}function ua(){mxEllipse.call(this)}function ma(){mxEllipse.call(this)}function sa(){mxEllipse.call(this)}function ha(){mxActor.call(this)}function ca(){mxActor.call(this)}function da(){mxActor.call(this)}function ia(){mxConnector.call(this)}function wa(a,c,b,d,f,e,g,h,n,m){g+=n;var na=d.clone();d.x-=f*(2*g+n);d.y-=e*(2*g+n);f*=g+n;e*=g+n;return function(){a.ellipse(na.x-f-g,na.y-e-g,2*g,2*g);m?a.fillAndStroke():a.stroke()}}mxUtils.extend(a,
+this.canvas.curveTo=mxUtils.bind(this,h.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,h.prototype.arcTo)}function m(){mxRectangleShape.call(this)}function w(){mxRectangleShape.call(this)}function v(){mxActor.call(this)}function E(){mxActor.call(this)}function x(){mxActor.call(this)}function u(){mxRectangleShape.call(this)}function z(){mxRectangleShape.call(this)}function C(){mxCylinder.call(this)}function N(){mxShape.call(this)}function D(){mxShape.call(this)}
+function G(){mxEllipse.call(this)}function K(){mxShape.call(this)}function y(){mxShape.call(this)}function A(){mxRectangleShape.call(this)}function I(){mxShape.call(this)}function O(){mxShape.call(this)}function Q(){mxShape.call(this)}function U(){mxShape.call(this)}function T(){mxShape.call(this)}function H(){mxCylinder.call(this)}function fa(){mxDoubleEllipse.call(this)}function la(){mxDoubleEllipse.call(this)}function W(){mxArrowConnector.call(this);this.spacing=0}function Z(){mxArrowConnector.call(this);
+this.spacing=0}function L(){mxActor.call(this)}function F(){mxRectangleShape.call(this)}function S(){mxActor.call(this)}function J(){mxActor.call(this)}function M(){mxActor.call(this)}function R(){mxActor.call(this)}function ha(){mxActor.call(this)}function B(){mxActor.call(this)}function ca(){mxActor.call(this)}function V(){mxActor.call(this)}function X(){mxActor.call(this)}function aa(){mxActor.call(this)}function da(){mxEllipse.call(this)}function Y(){mxEllipse.call(this)}function pa(){mxEllipse.call(this)}
+function ra(){mxRhombus.call(this)}function ja(){mxEllipse.call(this)}function ma(){mxEllipse.call(this)}function ua(){mxEllipse.call(this)}function ia(){mxEllipse.call(this)}function sa(){mxActor.call(this)}function ga(){mxActor.call(this)}function ea(){mxActor.call(this)}function ba(){mxConnector.call(this)}function xa(a,c,b,d,f,e,g,h,n,m){g+=n;var na=d.clone();d.x-=f*(2*g+n);d.y-=e*(2*g+n);f*=g+n;e*=g+n;return function(){a.ellipse(na.x-f-g,na.y-e-g,2*g,2*g);m?a.fillAndStroke():a.stroke()}}mxUtils.extend(a,
mxCylinder);a.prototype.size=20;a.prototype.redrawPath=function(a,c,b,d,f,e){c=Math.max(0,Math.min(d,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));e?(a.moveTo(c,f),a.lineTo(c,c),a.lineTo(0,0),a.moveTo(c,c),a.lineTo(d,c)):(a.moveTo(0,0),a.lineTo(d-c,0),a.lineTo(d,c),a.lineTo(d,f),a.lineTo(c,f),a.lineTo(0,f-c),a.lineTo(0,0),a.close());a.end()};a.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?(a=parseFloat(mxUtils.getValue(this.style,
-"size",this.size))*this.scale,new mxRectangle(a,a,0,0)):null};mxCellRenderer.registerShape("cube",a);var Ba=Math.tan(mxUtils.toRadians(30)),ra=(.5-Ba)/2;mxUtils.extend(b,mxActor);b.prototype.size=20;b.prototype.redrawPath=function(a,c,b,d,f){c=Math.min(d,f/Ba);a.translate((d-c)/2,(f-c)/2+c/4);a.moveTo(0,.25*c);a.lineTo(.5*c,c*ra);a.lineTo(c,.25*c);a.lineTo(.5*c,(.5-ra)*c);a.lineTo(0,.25*c);a.close();a.end()};mxCellRenderer.registerShape("isoRectangle",b);mxUtils.extend(e,mxCylinder);e.prototype.size=
-20;e.prototype.redrawPath=function(a,c,b,d,f,e){c=Math.min(d,f/(.5+Ba));e?(a.moveTo(0,.25*c),a.lineTo(.5*c,(.5-ra)*c),a.lineTo(c,.25*c),a.moveTo(.5*c,(.5-ra)*c),a.lineTo(.5*c,(1-ra)*c)):(a.translate((d-c)/2,(f-c)/2),a.moveTo(0,.25*c),a.lineTo(.5*c,c*ra),a.lineTo(c,.25*c),a.lineTo(c,.75*c),a.lineTo(.5*c,(1-ra)*c),a.lineTo(0,.75*c),a.close());a.end()};mxCellRenderer.registerShape("isoCube",e);mxUtils.extend(d,mxCylinder);d.prototype.redrawPath=function(a,c,b,d,f,e){c=Math.min(f/2,Math.round(f/8)+this.strokewidth-
+"size",this.size))*this.scale,new mxRectangle(a,a,0,0)):null};mxCellRenderer.registerShape("cube",a);var va=Math.tan(mxUtils.toRadians(30)),qa=(.5-va)/2;mxUtils.extend(b,mxActor);b.prototype.size=20;b.prototype.redrawPath=function(a,c,b,d,f){c=Math.min(d,f/va);a.translate((d-c)/2,(f-c)/2+c/4);a.moveTo(0,.25*c);a.lineTo(.5*c,c*qa);a.lineTo(c,.25*c);a.lineTo(.5*c,(.5-qa)*c);a.lineTo(0,.25*c);a.close();a.end()};mxCellRenderer.registerShape("isoRectangle",b);mxUtils.extend(e,mxCylinder);e.prototype.size=
+20;e.prototype.redrawPath=function(a,c,b,d,f,e){c=Math.min(d,f/(.5+va));e?(a.moveTo(0,.25*c),a.lineTo(.5*c,(.5-qa)*c),a.lineTo(c,.25*c),a.moveTo(.5*c,(.5-qa)*c),a.lineTo(.5*c,(1-qa)*c)):(a.translate((d-c)/2,(f-c)/2),a.moveTo(0,.25*c),a.lineTo(.5*c,c*qa),a.lineTo(c,.25*c),a.lineTo(c,.75*c),a.lineTo(.5*c,(1-qa)*c),a.lineTo(0,.75*c),a.close());a.end()};mxCellRenderer.registerShape("isoCube",e);mxUtils.extend(d,mxCylinder);d.prototype.redrawPath=function(a,c,b,d,f,e){c=Math.min(f/2,Math.round(f/8)+this.strokewidth-
1);if(e&&null!=this.fill||!e&&null==this.fill)a.moveTo(0,c),a.curveTo(0,2*c,d,2*c,d,c),e||(a.stroke(),a.begin()),a.translate(0,c/2),a.moveTo(0,c),a.curveTo(0,2*c,d,2*c,d,c),e||(a.stroke(),a.begin()),a.translate(0,c/2),a.moveTo(0,c),a.curveTo(0,2*c,d,2*c,d,c),e||(a.stroke(),a.begin()),a.translate(0,-c);e||(a.moveTo(0,c),a.curveTo(0,-c/3,d,-c/3,d,c),a.lineTo(d,f-c),a.curveTo(d,f+c/3,0,f+c/3,0,f-c),a.close())};d.prototype.getLabelMargins=function(a){return new mxRectangle(0,2.5*Math.min(a.height/2,Math.round(a.height/
8)+this.strokewidth-1)*this.scale,0,0)};mxCellRenderer.registerShape("datastore",d);mxUtils.extend(k,mxCylinder);k.prototype.size=30;k.prototype.redrawPath=function(a,c,b,d,f,e){c=Math.max(0,Math.min(d,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));e?(a.moveTo(d-c,0),a.lineTo(d-c,c),a.lineTo(d,c)):(a.moveTo(0,0),a.lineTo(d-c,0),a.lineTo(d,c),a.lineTo(d,f),a.lineTo(0,f),a.lineTo(0,0),a.close());a.end()};mxCellRenderer.registerShape("note",k);mxUtils.extend(l,mxActor);l.prototype.redrawPath=
function(a,c,b,d,f){a.moveTo(0,0);a.quadTo(d/2,.5*f,d,0);a.quadTo(.5*d,f/2,d,f);a.quadTo(d/2,.5*f,0,f);a.quadTo(.5*d,f/2,0,0);a.end()};mxCellRenderer.registerShape("switch",l);mxUtils.extend(p,mxCylinder);p.prototype.tabWidth=60;p.prototype.tabHeight=20;p.prototype.tabPosition="right";p.prototype.redrawPath=function(a,c,b,d,f,e){c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));b=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));
var g=mxUtils.getValue(this.style,"tabPosition",this.tabPosition);e?"left"==g?(a.moveTo(0,b),a.lineTo(c,b)):(a.moveTo(d-c,b),a.lineTo(d,b)):("left"==g?(a.moveTo(0,0),a.lineTo(c,0),a.lineTo(c,b),a.lineTo(d,b)):(a.moveTo(0,b),a.lineTo(d-c,b),a.lineTo(d-c,0),a.lineTo(d,0)),a.lineTo(d,f),a.lineTo(0,f),a.lineTo(0,b),a.close());a.end()};mxCellRenderer.registerShape("folder",p);mxUtils.extend(q,mxActor);q.prototype.size=30;q.prototype.isRoundable=function(){return!0};q.prototype.redrawPath=function(a,c,
-b,d,f){c=Math.max(0,Math.min(d,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(c,0),new mxPoint(d,0),new mxPoint(d,f),new mxPoint(0,f),new mxPoint(0,c)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("card",q);mxUtils.extend(u,mxActor);u.prototype.size=.4;u.prototype.redrawPath=function(a,c,b,d,f){c=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
-"size",this.size))));a.moveTo(0,c/2);a.quadTo(d/4,1.4*c,d/2,c/2);a.quadTo(3*d/4,c*(1-1.4),d,c/2);a.lineTo(d,f-c/2);a.quadTo(3*d/4,f-1.4*c,d/2,f-c/2);a.quadTo(d/4,f-c*(1-1.4),0,f-c/2);a.lineTo(0,c/2);a.close();a.end()};u.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var c=mxUtils.getValue(this.style,"size",this.size),b=a.width,d=a.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return c*=
-d,new mxRectangle(a.x,a.y+c,b,d-2*c);c*=b;return new mxRectangle(a.x+c,a.y,b-2*c,d)}return a};mxCellRenderer.registerShape("tape",u);mxUtils.extend(c,mxActor);c.prototype.size=.3;c.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*a.height):null};c.prototype.redrawPath=function(a,c,b,d,f){c=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,
+b,d,f){c=Math.max(0,Math.min(d,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(c,0),new mxPoint(d,0),new mxPoint(d,f),new mxPoint(0,f),new mxPoint(0,c)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("card",q);mxUtils.extend(t,mxActor);t.prototype.size=.4;t.prototype.redrawPath=function(a,c,b,d,f){c=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+"size",this.size))));a.moveTo(0,c/2);a.quadTo(d/4,1.4*c,d/2,c/2);a.quadTo(3*d/4,c*(1-1.4),d,c/2);a.lineTo(d,f-c/2);a.quadTo(3*d/4,f-1.4*c,d/2,f-c/2);a.quadTo(d/4,f-c*(1-1.4),0,f-c/2);a.lineTo(0,c/2);a.close();a.end()};t.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var c=mxUtils.getValue(this.style,"size",this.size),b=a.width,d=a.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return c*=
+d,new mxRectangle(a.x,a.y+c,b,d-2*c);c*=b;return new mxRectangle(a.x+c,a.y,b-2*c,d)}return a};mxCellRenderer.registerShape("tape",t);mxUtils.extend(c,mxActor);c.prototype.size=.3;c.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*a.height):null};c.prototype.redrawPath=function(a,c,b,d,f){c=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,
0);a.lineTo(d,0);a.lineTo(d,f-c/2);a.quadTo(3*d/4,f-1.4*c,d/2,f-c/2);a.quadTo(d/4,f-c*(1-1.4),0,f-c/2);a.lineTo(0,c/2);a.close();a.end()};mxCellRenderer.registerShape("document",c);var Ga=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(a,c,b,d){var f=mxUtils.getValue(this.style,"size");return null!=f?d*Math.max(0,Math.min(1,f)):Ga.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var c=2*mxUtils.getValue(this.style,
"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,a.height*c),0,0)}return null};mxUtils.extend(f,mxActor);f.prototype.size=.2;f.prototype.isRoundable=function(){return!0};f.prototype.redrawPath=function(a,c,b,d,f){c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,f),new mxPoint(c,0),new mxPoint(d,0),new mxPoint(d-c,f)],this.isRounded,
b,!0);a.end()};mxCellRenderer.registerShape("parallelogram",f);mxUtils.extend(g,mxActor);g.prototype.size=.2;g.prototype.isRoundable=function(){return!0};g.prototype.redrawPath=function(a,c,b,d,f){c=d*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,f),new mxPoint(c,0),new mxPoint(d-c,0),new mxPoint(d,f)],this.isRounded,b,!0)};mxCellRenderer.registerShape("trapezoid",
@@ -2473,17 +2473,17 @@ a=new mxRectangle(a.x,a.y,c,b);var d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.
mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,e=Math.max(e,Math.min(d*g,f*g));e=Math.round(e);a.begin();a.moveTo(c+e,b);a.lineTo(c+e,b+f);a.moveTo(c+d-e,b);a.lineTo(c+d-e,b+f);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("process",m);mxUtils.extend(w,mxRectangleShape);w.prototype.paintBackground=function(a,c,b,d,f){a.setFillColor(mxConstants.NONE);a.rect(c,b,d,f);a.fill()};w.prototype.paintForeground=function(a,
c,b,d,f){};mxCellRenderer.registerShape("transparent",w);mxUtils.extend(v,mxHexagon);v.prototype.size=30;v.prototype.position=.5;v.prototype.position2=.5;v.prototype.base=20;v.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};v.prototype.isRoundable=function(){return!0};v.prototype.redrawPath=function(a,c,b,d,f){c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;b=Math.max(0,Math.min(f,
parseFloat(mxUtils.getValue(this.style,"size",this.size))));var e=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),g=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),h=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,f-b),new mxPoint(Math.min(d,e+h),f-b),new mxPoint(g,f),new mxPoint(Math.max(0,e),f-b),new mxPoint(0,
-f-b)],this.isRounded,c,!0,[4])};mxCellRenderer.registerShape("callout",v);mxUtils.extend(D,mxActor);D.prototype.size=.2;D.prototype.fixedSize=20;D.prototype.isRoundable=function(){return!0};D.prototype.redrawPath=function(a,c,b,d,f){c="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,
-mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d-c,0),new mxPoint(d,f/2),new mxPoint(d-c,f),new mxPoint(0,f),new mxPoint(c,f/2)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("step",D);mxUtils.extend(x,mxHexagon);x.prototype.size=.25;x.prototype.isRoundable=function(){return!0};x.prototype.redrawPath=function(a,c,b,d,f){c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,
-mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(c,0),new mxPoint(d-c,0),new mxPoint(d,.5*f),new mxPoint(d-c,f),new mxPoint(c,f),new mxPoint(0,.5*f)],this.isRounded,b,!0)};mxCellRenderer.registerShape("hexagon",x);mxUtils.extend(t,mxRectangleShape);t.prototype.isHtmlAllowed=function(){return!1};t.prototype.paintForeground=function(a,c,b,d,f){var e=Math.min(d/5,f/5)+1;a.begin();a.moveTo(c+d/2,b+e);a.lineTo(c+d/2,b+f-e);a.moveTo(c+e,b+f/2);a.lineTo(c+d-e,b+f/2);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,
-arguments)};mxCellRenderer.registerShape("plus",t);var Da=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var c=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+c,a.y+c,a.width-2*c,a.height-2*c)}return a};mxRhombus.prototype.paintVertexShape=function(a,c,b,d,f){Da.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var e=2*Math.max(2,this.strokewidth+
+f-b)],this.isRounded,c,!0,[4])};mxCellRenderer.registerShape("callout",v);mxUtils.extend(E,mxActor);E.prototype.size=.2;E.prototype.fixedSize=20;E.prototype.isRoundable=function(){return!0};E.prototype.redrawPath=function(a,c,b,d,f){c="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,
+mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d-c,0),new mxPoint(d,f/2),new mxPoint(d-c,f),new mxPoint(0,f),new mxPoint(c,f/2)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("step",E);mxUtils.extend(x,mxHexagon);x.prototype.size=.25;x.prototype.isRoundable=function(){return!0};x.prototype.redrawPath=function(a,c,b,d,f){c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,
+mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(c,0),new mxPoint(d-c,0),new mxPoint(d,.5*f),new mxPoint(d-c,f),new mxPoint(c,f),new mxPoint(0,.5*f)],this.isRounded,b,!0)};mxCellRenderer.registerShape("hexagon",x);mxUtils.extend(u,mxRectangleShape);u.prototype.isHtmlAllowed=function(){return!1};u.prototype.paintForeground=function(a,c,b,d,f){var e=Math.min(d/5,f/5)+1;a.begin();a.moveTo(c+d/2,b+e);a.lineTo(c+d/2,b+f-e);a.moveTo(c+e,b+f/2);a.lineTo(c+d-e,b+f/2);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,
+arguments)};mxCellRenderer.registerShape("plus",u);var Da=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var c=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+c,a.y+c,a.width-2*c,a.height-2*c)}return a};mxRhombus.prototype.paintVertexShape=function(a,c,b,d,f){Da.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var e=2*Math.max(2,this.strokewidth+
1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);c+=e;b+=e;d-=2*e;f-=2*e;0<d&&0<f&&(a.setShadow(!1),Da.apply(this,[a,c,b,d,f]))}};mxUtils.extend(z,mxRectangleShape);z.prototype.isHtmlAllowed=function(){return!1};z.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var c=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+c,a.y+c,a.width-2*c,a.height-2*c)}return a};z.prototype.paintForeground=function(a,c,b,
d,f){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var e=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);c+=e;b+=e;d-=2*e;f-=2*e;0<d&&0<f&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}a.setDashed(!1);var e=0,g;do{g=mxCellRenderer.defaultShapes[this.style["symbol"+e]];if(null!=g){var h=this.style["symbol"+e+"Align"],n=this.style["symbol"+e+"VerticalAlign"],na=this.style["symbol"+e+"Width"],m=this.style["symbol"+e+"Height"],r=
-this.style["symbol"+e+"Spacing"]||0,t=this.style["symbol"+e+"VSpacing"]||r,x=this.style["symbol"+e+"ArcSpacing"];null!=x&&(x*=this.getArcSize(d+this.strokewidth,f+this.strokewidth),r+=x,t+=x);var x=c,v=b,x=h==mxConstants.ALIGN_CENTER?x+(d-na)/2:h==mxConstants.ALIGN_RIGHT?x+(d-na-r):x+r,v=n==mxConstants.ALIGN_MIDDLE?v+(f-m)/2:n==mxConstants.ALIGN_BOTTOM?v+(f-m-t):v+t;a.save();h=new g;h.style=this.style;g.prototype.paintVertexShape.call(h,a,x,v,na,m);a.restore()}e++}while(null!=g)}mxRectangleShape.prototype.paintForeground.apply(this,
-arguments)};mxCellRenderer.registerShape("ext",z);mxUtils.extend(B,mxCylinder);B.prototype.redrawPath=function(a,c,b,d,f,e){e?(a.moveTo(0,0),a.lineTo(d/2,f/2),a.lineTo(d,0),a.end()):(a.moveTo(0,0),a.lineTo(d,0),a.lineTo(d,f),a.lineTo(0,f),a.close())};mxCellRenderer.registerShape("message",B);mxUtils.extend(N,mxShape);N.prototype.paintBackground=function(a,c,b,d,f){a.translate(c,b);a.ellipse(d/4,0,d/2,f/4);a.fillAndStroke();a.begin();a.moveTo(d/2,f/4);a.lineTo(d/2,2*f/3);a.moveTo(d/2,f/3);a.lineTo(0,
-f/3);a.moveTo(d/2,f/3);a.lineTo(d,f/3);a.moveTo(d/2,2*f/3);a.lineTo(0,f);a.moveTo(d/2,2*f/3);a.lineTo(d,f);a.end();a.stroke()};mxCellRenderer.registerShape("umlActor",N);mxUtils.extend(C,mxShape);C.prototype.getLabelMargins=function(a){return new mxRectangle(a.width/6,0,0,0)};C.prototype.paintBackground=function(a,c,b,d,f){a.translate(c,b);a.begin();a.moveTo(0,f/4);a.lineTo(0,3*f/4);a.end();a.stroke();a.begin();a.moveTo(0,f/2);a.lineTo(d/6,f/2);a.end();a.stroke();a.ellipse(d/6,0,5*d/6,f);a.fillAndStroke()};
-mxCellRenderer.registerShape("umlBoundary",C);mxUtils.extend(G,mxEllipse);G.prototype.paintVertexShape=function(a,c,b,d,f){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(c+d/8,b+f);a.lineTo(c+7*d/8,b+f);a.end();a.stroke()};mxCellRenderer.registerShape("umlEntity",G);mxUtils.extend(J,mxShape);J.prototype.paintVertexShape=function(a,c,b,d,f){a.translate(c,b);a.begin();a.moveTo(d,0);a.lineTo(0,f);a.moveTo(0,0);a.lineTo(d,f);a.end();a.stroke()};mxCellRenderer.registerShape("umlDestroy",
-J);mxUtils.extend(y,mxShape);y.prototype.getLabelBounds=function(a){return new mxRectangle(a.x,a.y+a.height/8,a.width,7*a.height/8)};y.prototype.paintBackground=function(a,c,b,d,f){a.translate(c,b);a.begin();a.moveTo(3*d/8,f/8*1.1);a.lineTo(5*d/8,0);a.end();a.stroke();a.ellipse(0,f/8,d,7*f/8);a.fillAndStroke()};y.prototype.paintForeground=function(a,c,b,d,f){a.begin();a.moveTo(3*d/8,f/8*1.1);a.lineTo(5*d/8,f/4);a.end();a.stroke()};mxCellRenderer.registerShape("umlControl",y);mxUtils.extend(A,mxRectangleShape);
+this.style["symbol"+e+"Spacing"]||0,u=this.style["symbol"+e+"VSpacing"]||r,x=this.style["symbol"+e+"ArcSpacing"];null!=x&&(x*=this.getArcSize(d+this.strokewidth,f+this.strokewidth),r+=x,u+=x);var x=c,k=b,x=h==mxConstants.ALIGN_CENTER?x+(d-na)/2:h==mxConstants.ALIGN_RIGHT?x+(d-na-r):x+r,k=n==mxConstants.ALIGN_MIDDLE?k+(f-m)/2:n==mxConstants.ALIGN_BOTTOM?k+(f-m-u):k+u;a.save();h=new g;h.style=this.style;g.prototype.paintVertexShape.call(h,a,x,k,na,m);a.restore()}e++}while(null!=g)}mxRectangleShape.prototype.paintForeground.apply(this,
+arguments)};mxCellRenderer.registerShape("ext",z);mxUtils.extend(C,mxCylinder);C.prototype.redrawPath=function(a,c,b,d,f,e){e?(a.moveTo(0,0),a.lineTo(d/2,f/2),a.lineTo(d,0),a.end()):(a.moveTo(0,0),a.lineTo(d,0),a.lineTo(d,f),a.lineTo(0,f),a.close())};mxCellRenderer.registerShape("message",C);mxUtils.extend(N,mxShape);N.prototype.paintBackground=function(a,c,b,d,f){a.translate(c,b);a.ellipse(d/4,0,d/2,f/4);a.fillAndStroke();a.begin();a.moveTo(d/2,f/4);a.lineTo(d/2,2*f/3);a.moveTo(d/2,f/3);a.lineTo(0,
+f/3);a.moveTo(d/2,f/3);a.lineTo(d,f/3);a.moveTo(d/2,2*f/3);a.lineTo(0,f);a.moveTo(d/2,2*f/3);a.lineTo(d,f);a.end();a.stroke()};mxCellRenderer.registerShape("umlActor",N);mxUtils.extend(D,mxShape);D.prototype.getLabelMargins=function(a){return new mxRectangle(a.width/6,0,0,0)};D.prototype.paintBackground=function(a,c,b,d,f){a.translate(c,b);a.begin();a.moveTo(0,f/4);a.lineTo(0,3*f/4);a.end();a.stroke();a.begin();a.moveTo(0,f/2);a.lineTo(d/6,f/2);a.end();a.stroke();a.ellipse(d/6,0,5*d/6,f);a.fillAndStroke()};
+mxCellRenderer.registerShape("umlBoundary",D);mxUtils.extend(G,mxEllipse);G.prototype.paintVertexShape=function(a,c,b,d,f){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(c+d/8,b+f);a.lineTo(c+7*d/8,b+f);a.end();a.stroke()};mxCellRenderer.registerShape("umlEntity",G);mxUtils.extend(K,mxShape);K.prototype.paintVertexShape=function(a,c,b,d,f){a.translate(c,b);a.begin();a.moveTo(d,0);a.lineTo(0,f);a.moveTo(0,0);a.lineTo(d,f);a.end();a.stroke()};mxCellRenderer.registerShape("umlDestroy",
+K);mxUtils.extend(y,mxShape);y.prototype.getLabelBounds=function(a){return new mxRectangle(a.x,a.y+a.height/8,a.width,7*a.height/8)};y.prototype.paintBackground=function(a,c,b,d,f){a.translate(c,b);a.begin();a.moveTo(3*d/8,f/8*1.1);a.lineTo(5*d/8,0);a.end();a.stroke();a.ellipse(0,f/8,d,7*f/8);a.fillAndStroke()};y.prototype.paintForeground=function(a,c,b,d,f){a.begin();a.moveTo(3*d/8,f/8*1.1);a.lineTo(5*d/8,f/4);a.end();a.stroke()};mxCellRenderer.registerShape("umlControl",y);mxUtils.extend(A,mxRectangleShape);
A.prototype.size=40;A.prototype.isHtmlAllowed=function(){return!1};A.prototype.getLabelBounds=function(a){var c=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(a.x,a.y,a.width,c)};A.prototype.paintBackground=function(a,c,b,d,f){var e=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),g=mxUtils.getValue(this.style,"participant");null==g||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,
a,c,b,d,e):(g=this.state.view.graph.cellRenderer.getShape(g),null!=g&&g!=A&&(g=new g,g.apply(this.state),a.save(),g.paintVertexShape(a,c,b,d,e),a.restore()));e<f&&(a.setDashed(!0),a.begin(),a.moveTo(c+d/2,b+e),a.lineTo(c+d/2,b+f),a.end(),a.stroke())};A.prototype.paintForeground=function(a,c,b,d,f){var e=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,a,c,b,d,Math.min(f,e))};mxCellRenderer.registerShape("umlLifeline",
A);mxUtils.extend(I,mxShape);I.prototype.width=60;I.prototype.height=30;I.prototype.corner=10;I.prototype.getLabelMargins=function(a){return new mxRectangle(0,0,a.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),a.height-parseFloat(mxUtils.getValue(this.style,"height",this.height)*this.scale))};I.prototype.paintBackground=function(a,c,b,d,f){var e=this.corner,g=Math.min(d,Math.max(e,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),h=Math.min(f,Math.max(1.5*
@@ -2495,50 +2495,50 @@ new mxRectangle(0,0,0,Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(c
mxConstants.DIRECTION_NORTH||c==mxConstants.DIRECTION_SOUTH?(e=m*Math.max(0,Math.min(1,e)),h=[new mxPoint(g,h),new mxPoint(g+n,h+e),new mxPoint(g+n,h+m),new mxPoint(g,h+m-e),new mxPoint(g,h)]):(e=n*Math.max(0,Math.min(1,e)),h=[new mxPoint(g+e,h),new mxPoint(g+n,h),new mxPoint(g+n-e,h+m),new mxPoint(g,h+m),new mxPoint(g+e,h)]);m=a.getCenterX();a=a.getCenterY();a=new mxPoint(m,a);d&&(b.x<g||b.x>g+n?a.y=b.y:a.x=b.x);return mxUtils.getPerimeterPoint(h,a,b)};mxStyleRegistry.putValue("parallelogramPerimeter",
mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(a,c,b,d){var f=g.prototype.size;null!=c&&(f=mxUtils.getValue(c.style,"size",f));var e=a.x,h=a.y,n=a.width,m=a.height;c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_EAST?(f=n*Math.max(0,Math.min(1,f)),h=[new mxPoint(e+f,h),new mxPoint(e+n-f,h),new mxPoint(e+n,h+m),new mxPoint(e,h+m),new mxPoint(e+f,h)]):c==mxConstants.DIRECTION_WEST?
(f=n*Math.max(0,Math.min(1,f)),h=[new mxPoint(e,h),new mxPoint(e+n,h),new mxPoint(e+n-f,h+m),new mxPoint(e+f,h+m),new mxPoint(e,h)]):c==mxConstants.DIRECTION_NORTH?(f=m*Math.max(0,Math.min(1,f)),h=[new mxPoint(e,h+f),new mxPoint(e+n,h),new mxPoint(e+n,h+m),new mxPoint(e,h+m-f),new mxPoint(e,h+f)]):(f=m*Math.max(0,Math.min(1,f)),h=[new mxPoint(e,h),new mxPoint(e+n,h+f),new mxPoint(e+n,h+m-f),new mxPoint(e,h+m),new mxPoint(e,h)]);m=a.getCenterX();a=a.getCenterY();a=new mxPoint(m,a);d&&(b.x<e||b.x>e+
-n?a.y=b.y:a.x=b.x);return mxUtils.getPerimeterPoint(h,a,b)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(a,c,b,d){var f="0"!=mxUtils.getValue(c.style,"fixedSize","0"),e=f?D.prototype.fixedSize:D.prototype.size;null!=c&&(e=mxUtils.getValue(c.style,"size",e));var g=a.x,h=a.y,n=a.width,m=a.height,r=a.getCenterX();a=a.getCenterY();c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;
+n?a.y=b.y:a.x=b.x);return mxUtils.getPerimeterPoint(h,a,b)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(a,c,b,d){var f="0"!=mxUtils.getValue(c.style,"fixedSize","0"),e=f?E.prototype.fixedSize:E.prototype.size;null!=c&&(e=mxUtils.getValue(c.style,"size",e));var g=a.x,h=a.y,n=a.width,m=a.height,r=a.getCenterX();a=a.getCenterY();c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;
c==mxConstants.DIRECTION_EAST?(f=f?Math.max(0,Math.min(n,e)):n*Math.max(0,Math.min(1,e)),h=[new mxPoint(g,h),new mxPoint(g+n-f,h),new mxPoint(g+n,a),new mxPoint(g+n-f,h+m),new mxPoint(g,h+m),new mxPoint(g+f,a),new mxPoint(g,h)]):c==mxConstants.DIRECTION_WEST?(f=f?Math.max(0,Math.min(n,e)):n*Math.max(0,Math.min(1,e)),h=[new mxPoint(g+f,h),new mxPoint(g+n,h),new mxPoint(g+n-f,a),new mxPoint(g+n,h+m),new mxPoint(g+f,h+m),new mxPoint(g,a),new mxPoint(g+f,h)]):c==mxConstants.DIRECTION_NORTH?(f=f?Math.max(0,
Math.min(m,e)):m*Math.max(0,Math.min(1,e)),h=[new mxPoint(g,h+f),new mxPoint(r,h),new mxPoint(g+n,h+f),new mxPoint(g+n,h+m),new mxPoint(r,h+m-f),new mxPoint(g,h+m),new mxPoint(g,h+f)]):(f=f?Math.max(0,Math.min(m,e)):m*Math.max(0,Math.min(1,e)),h=[new mxPoint(g,h),new mxPoint(r,h+f),new mxPoint(g+n,h),new mxPoint(g+n,h+m-f),new mxPoint(r,h+m),new mxPoint(g,h+m-f),new mxPoint(g,h)]);r=new mxPoint(r,a);d&&(b.x<g||b.x>g+n?r.y=b.y:r.x=b.x);return mxUtils.getPerimeterPoint(h,r,b)};mxStyleRegistry.putValue("stepPerimeter",
mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(a,c,b,d){var f=x.prototype.size;null!=c&&(f=mxUtils.getValue(c.style,"size",f));var e=a.x,g=a.y,h=a.width,n=a.height,m=a.getCenterX();a=a.getCenterY();c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_NORTH||c==mxConstants.DIRECTION_SOUTH?(f=n*Math.max(0,Math.min(1,f)),g=[new mxPoint(m,g),new mxPoint(e+h,g+f),new mxPoint(e+h,g+n-f),new mxPoint(m,
g+n),new mxPoint(e,g+n-f),new mxPoint(e,g+f),new mxPoint(m,g)]):(f=h*Math.max(0,Math.min(1,f)),g=[new mxPoint(e+f,g),new mxPoint(e+h-f,g),new mxPoint(e+h,a),new mxPoint(e+h-f,g+n),new mxPoint(e+f,g+n),new mxPoint(e,a),new mxPoint(e+f,g)]);m=new mxPoint(m,a);d&&(b.x<e||b.x>e+h?m.y=b.y:m.x=b.x);return mxUtils.getPerimeterPoint(g,m,b)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(O,mxShape);O.prototype.size=10;O.prototype.paintBackground=function(a,c,b,d,
f){var e=parseFloat(mxUtils.getValue(this.style,"size",this.size));a.translate(c,b);a.ellipse((d-e)/2,0,e,e);a.fillAndStroke();a.begin();a.moveTo(d/2,e);a.lineTo(d/2,f);a.end();a.stroke()};mxCellRenderer.registerShape("lollipop",O);mxUtils.extend(Q,mxShape);Q.prototype.size=10;Q.prototype.inset=2;Q.prototype.paintBackground=function(a,c,b,d,f){var e=parseFloat(mxUtils.getValue(this.style,"size",this.size)),g=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(c,
-b);a.begin();a.moveTo(d/2,e+g);a.lineTo(d/2,f);a.end();a.stroke();a.begin();a.moveTo((d-e)/2-g,e/2);a.quadTo((d-e)/2-g,e+g,d/2,e+g);a.quadTo((d+e)/2+g,e+g,(d+e)/2+g,e/2);a.end();a.stroke()};mxCellRenderer.registerShape("requires",Q);mxUtils.extend(X,mxShape);X.prototype.paintBackground=function(a,c,b,d,f){a.translate(c,b);a.begin();a.moveTo(0,0);a.quadTo(d,0,d,f/2);a.quadTo(d,f,0,f);a.end();a.stroke()};mxCellRenderer.registerShape("requiredInterface",X);mxUtils.extend(U,mxShape);U.prototype.inset=
-2;U.prototype.paintBackground=function(a,c,b,d,f){var e=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(c,b);a.ellipse(0,e,d-2*e,f-2*e);a.fillAndStroke();a.begin();a.moveTo(d/2,0);a.quadTo(d,0,d,f/2);a.quadTo(d,f,d/2,f);a.end();a.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",U);mxUtils.extend(H,mxCylinder);H.prototype.jettyWidth=32;H.prototype.jettyHeight=12;H.prototype.redrawPath=function(a,c,b,d,f,e){var g=parseFloat(mxUtils.getValue(this.style,
+b);a.begin();a.moveTo(d/2,e+g);a.lineTo(d/2,f);a.end();a.stroke();a.begin();a.moveTo((d-e)/2-g,e/2);a.quadTo((d-e)/2-g,e+g,d/2,e+g);a.quadTo((d+e)/2+g,e+g,(d+e)/2+g,e/2);a.end();a.stroke()};mxCellRenderer.registerShape("requires",Q);mxUtils.extend(U,mxShape);U.prototype.paintBackground=function(a,c,b,d,f){a.translate(c,b);a.begin();a.moveTo(0,0);a.quadTo(d,0,d,f/2);a.quadTo(d,f,0,f);a.end();a.stroke()};mxCellRenderer.registerShape("requiredInterface",U);mxUtils.extend(T,mxShape);T.prototype.inset=
+2;T.prototype.paintBackground=function(a,c,b,d,f){var e=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(c,b);a.ellipse(0,e,d-2*e,f-2*e);a.fillAndStroke();a.begin();a.moveTo(d/2,0);a.quadTo(d,0,d,f/2);a.quadTo(d,f,d/2,f);a.end();a.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",T);mxUtils.extend(H,mxCylinder);H.prototype.jettyWidth=32;H.prototype.jettyHeight=12;H.prototype.redrawPath=function(a,c,b,d,f,e){var g=parseFloat(mxUtils.getValue(this.style,
"jettyWidth",this.jettyWidth));c=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));b=g/2;var g=b+g/2,h=.3*f-c/2,n=.7*f-c/2;e?(a.moveTo(b,h),a.lineTo(g,h),a.lineTo(g,h+c),a.lineTo(b,h+c),a.moveTo(b,n),a.lineTo(g,n),a.lineTo(g,n+c),a.lineTo(b,n+c)):(a.moveTo(b,0),a.lineTo(d,0),a.lineTo(d,f),a.lineTo(b,f),a.lineTo(b,n+c),a.lineTo(0,n+c),a.lineTo(0,n),a.lineTo(b,n),a.lineTo(b,h+c),a.lineTo(0,h+c),a.lineTo(0,h),a.lineTo(b,h),a.close());a.end()};mxCellRenderer.registerShape("component",
-H);mxUtils.extend(ea,mxDoubleEllipse);ea.prototype.outerStroke=!0;ea.prototype.paintVertexShape=function(a,c,b,d,f){var e=Math.min(4,Math.min(d/5,f/5));0<d&&0<f&&(a.ellipse(c+e,b+e,d-2*e,f-2*e),a.fillAndStroke());a.setShadow(!1);this.outerStroke&&(a.ellipse(c,b,d,f),a.stroke())};mxCellRenderer.registerShape("endState",ea);mxUtils.extend(ka,ea);ka.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",ka);mxUtils.extend(Y,mxArrowConnector);Y.prototype.defaultWidth=4;Y.prototype.isOpenEnded=
-function(){return!0};Y.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};Y.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",Y);mxUtils.extend(ba,mxArrowConnector);ba.prototype.defaultWidth=10;ba.prototype.defaultArrowWidth=20;ba.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};ba.prototype.getEndArrowWidth=
-function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};ba.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",ba);mxUtils.extend(K,mxActor);K.prototype.size=30;K.prototype.isRoundable=function(){return!0};K.prototype.redrawPath=function(a,c,b,d,f){c=Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)));b=mxUtils.getValue(this.style,
-mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,f),new mxPoint(0,c),new mxPoint(d,0),new mxPoint(d,f)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("manualInput",K);mxUtils.extend(F,mxRectangleShape);F.prototype.dx=20;F.prototype.dy=20;F.prototype.isHtmlAllowed=function(){return!1};F.prototype.paintForeground=function(a,c,b,d,f){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var e=0;if(this.isRounded)var g=mxUtils.getValue(this.style,
+H);mxUtils.extend(fa,mxDoubleEllipse);fa.prototype.outerStroke=!0;fa.prototype.paintVertexShape=function(a,c,b,d,f){var e=Math.min(4,Math.min(d/5,f/5));0<d&&0<f&&(a.ellipse(c+e,b+e,d-2*e,f-2*e),a.fillAndStroke());a.setShadow(!1);this.outerStroke&&(a.ellipse(c,b,d,f),a.stroke())};mxCellRenderer.registerShape("endState",fa);mxUtils.extend(la,fa);la.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",la);mxUtils.extend(W,mxArrowConnector);W.prototype.defaultWidth=4;W.prototype.isOpenEnded=
+function(){return!0};W.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};W.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",W);mxUtils.extend(Z,mxArrowConnector);Z.prototype.defaultWidth=10;Z.prototype.defaultArrowWidth=20;Z.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};Z.prototype.getEndArrowWidth=
+function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};Z.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",Z);mxUtils.extend(L,mxActor);L.prototype.size=30;L.prototype.isRoundable=function(){return!0};L.prototype.redrawPath=function(a,c,b,d,f){c=Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)));b=mxUtils.getValue(this.style,
+mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,f),new mxPoint(0,c),new mxPoint(d,0),new mxPoint(d,f)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("manualInput",L);mxUtils.extend(F,mxRectangleShape);F.prototype.dx=20;F.prototype.dy=20;F.prototype.isHtmlAllowed=function(){return!1};F.prototype.paintForeground=function(a,c,b,d,f){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var e=0;if(this.isRounded)var g=mxUtils.getValue(this.style,
mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,e=Math.max(e,Math.min(d*g,f*g));g=Math.max(e,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));e=Math.max(e,Math.min(f,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.begin();a.moveTo(c,b+e);a.lineTo(c+d,b+e);a.end();a.stroke();a.begin();a.moveTo(c+g,b);a.lineTo(c+g,b+f);a.end();a.stroke()};mxCellRenderer.registerShape("internalStorage",F);mxUtils.extend(S,mxActor);S.prototype.dx=20;S.prototype.dy=
20;S.prototype.redrawPath=function(a,c,b,d,f){c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));b=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,b),new mxPoint(c,b),new mxPoint(c,f),new mxPoint(0,f)],this.isRounded,e,!0);a.end()};
-mxCellRenderer.registerShape("corner",S);mxUtils.extend(L,mxActor);L.prototype.redrawPath=function(a,c,b,d,f){a.moveTo(0,0);a.lineTo(0,f);a.end();a.moveTo(d,0);a.lineTo(d,f);a.end();a.moveTo(0,f/2);a.lineTo(d,f/2);a.end()};mxCellRenderer.registerShape("crossbar",L);mxUtils.extend(M,mxActor);M.prototype.dx=20;M.prototype.dy=20;M.prototype.redrawPath=function(a,c,b,d,f){c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));b=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,
-"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,b),new mxPoint((d+c)/2,b),new mxPoint((d+c)/2,f),new mxPoint((d-c)/2,f),new mxPoint((d-c)/2,b),new mxPoint(0,b)],this.isRounded,e,!0);a.end()};mxCellRenderer.registerShape("tee",M);mxUtils.extend(T,mxActor);T.prototype.arrowWidth=.3;T.prototype.arrowSize=.2;T.prototype.redrawPath=
+mxCellRenderer.registerShape("corner",S);mxUtils.extend(J,mxActor);J.prototype.redrawPath=function(a,c,b,d,f){a.moveTo(0,0);a.lineTo(0,f);a.end();a.moveTo(d,0);a.lineTo(d,f);a.end();a.moveTo(0,f/2);a.lineTo(d,f/2);a.end()};mxCellRenderer.registerShape("crossbar",J);mxUtils.extend(M,mxActor);M.prototype.dx=20;M.prototype.dy=20;M.prototype.redrawPath=function(a,c,b,d,f){c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));b=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,
+"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,b),new mxPoint((d+c)/2,b),new mxPoint((d+c)/2,f),new mxPoint((d-c)/2,f),new mxPoint((d-c)/2,b),new mxPoint(0,b)],this.isRounded,e,!0);a.end()};mxCellRenderer.registerShape("tee",M);mxUtils.extend(R,mxActor);R.prototype.arrowWidth=.3;R.prototype.arrowSize=.2;R.prototype.redrawPath=
function(a,c,b,d,f){var e=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));b=(f-e)/2;var e=b+e,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,b),new mxPoint(d-c,b),new mxPoint(d-c,0),new mxPoint(d,f/2),new mxPoint(d-c,f),new mxPoint(d-c,e),new mxPoint(0,e)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("singleArrow",
-T);mxUtils.extend(E,mxActor);E.prototype.redrawPath=function(a,c,b,d,f){var e=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",T.prototype.arrowWidth))));c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",T.prototype.arrowSize))));b=(f-e)/2;var e=b+e,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,f/2),new mxPoint(c,0),new mxPoint(c,b),new mxPoint(d-c,b),new mxPoint(d-c,0),new mxPoint(d,
-f/2),new mxPoint(d-c,f),new mxPoint(d-c,e),new mxPoint(c,e),new mxPoint(c,f)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("doubleArrow",E);mxUtils.extend(R,mxActor);R.prototype.size=.1;R.prototype.redrawPath=function(a,c,b,d,f){c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(c,0);a.lineTo(d,0);a.quadTo(d-2*c,f/2,d,f);a.lineTo(c,f);a.quadTo(c-2*c,f/2,c,0);a.close();a.end()};mxCellRenderer.registerShape("dataStorage",R);mxUtils.extend(V,
-mxActor);V.prototype.redrawPath=function(a,c,b,d,f){a.moveTo(0,0);a.quadTo(d,0,d,f/2);a.quadTo(d,f,0,f);a.close();a.end()};mxCellRenderer.registerShape("or",V);mxUtils.extend(ga,mxActor);ga.prototype.redrawPath=function(a,c,b,d,f){a.moveTo(0,0);a.quadTo(d,0,d,f/2);a.quadTo(d,f,0,f);a.quadTo(d/2,f/2,0,0);a.close();a.end()};mxCellRenderer.registerShape("xor",ga);mxUtils.extend(W,mxActor);W.prototype.size=20;W.prototype.isRoundable=function(){return!0};W.prototype.redrawPath=function(a,c,b,d,f){c=Math.min(d/
-2,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(c,0),new mxPoint(d-c,0),new mxPoint(d,.8*c),new mxPoint(d,f),new mxPoint(0,f),new mxPoint(0,.8*c)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("loopLimit",W);mxUtils.extend(aa,mxActor);aa.prototype.size=.375;aa.prototype.isRoundable=function(){return!0};aa.prototype.redrawPath=function(a,c,b,d,f){c=
-f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,f-c),new mxPoint(d/2,f),new mxPoint(0,f-c)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("offPageConnector",aa);mxUtils.extend(Z,mxEllipse);Z.prototype.paintVertexShape=function(a,c,b,d,f){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();
-a.moveTo(c+d/2,b+f);a.lineTo(c+d,b+f);a.end();a.stroke()};mxCellRenderer.registerShape("tapeData",Z);mxUtils.extend(pa,mxEllipse);pa.prototype.paintVertexShape=function(a,c,b,d,f){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(c,b+f/2);a.lineTo(c+d,b+f/2);a.end();a.stroke();a.begin();a.moveTo(c+d/2,b);a.lineTo(c+d/2,b+f);a.end();a.stroke()};mxCellRenderer.registerShape("orEllipse",pa);mxUtils.extend(qa,mxEllipse);qa.prototype.paintVertexShape=function(a,
-c,b,d,f){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(c+.145*d,b+.145*f);a.lineTo(c+.855*d,b+.855*f);a.end();a.stroke();a.begin();a.moveTo(c+.855*d,b+.145*f);a.lineTo(c+.145*d,b+.855*f);a.end();a.stroke()};mxCellRenderer.registerShape("sumEllipse",qa);mxUtils.extend(fa,mxRhombus);fa.prototype.paintVertexShape=function(a,c,b,d,f){mxRhombus.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(c,b+f/2);a.lineTo(c+d,b+f/2);
-a.end();a.stroke()};mxCellRenderer.registerShape("sortShape",fa);mxUtils.extend(la,mxEllipse);la.prototype.paintVertexShape=function(a,c,b,d,f){a.begin();a.moveTo(c,b);a.lineTo(c+d,b);a.lineTo(c+d/2,b+f/2);a.close();a.fillAndStroke();a.begin();a.moveTo(c,b+f);a.lineTo(c+d,b+f);a.lineTo(c+d/2,b+f/2);a.close();a.fillAndStroke()};mxCellRenderer.registerShape("collate",la);mxUtils.extend(ua,mxEllipse);ua.prototype.paintVertexShape=function(a,c,b,d,f){var e=b+f-5;a.begin();a.moveTo(c,b);a.lineTo(c,b+f);
-a.moveTo(c,e);a.lineTo(c+10,e-5);a.moveTo(c,e);a.lineTo(c+10,e+5);a.moveTo(c,e);a.lineTo(c+d,e);a.moveTo(c+d,b);a.lineTo(c+d,b+f);a.moveTo(c+d,e);a.lineTo(c+d-10,e-5);a.moveTo(c+d,e);a.lineTo(c+d-10,e+5);a.end();a.stroke()};mxCellRenderer.registerShape("dimension",ua);mxUtils.extend(ma,mxEllipse);ma.prototype.paintVertexShape=function(a,c,b,d,f){this.outline||a.setStrokeColor(null);mxRectangleShape.prototype.paintBackground.apply(this,arguments);null!=this.style&&(a.setStrokeColor(this.stroke),a.rect(c,
-b,d,f),a.fill(),a.begin(),a.moveTo(c,b),"1"==mxUtils.getValue(this.style,"top","1")?a.lineTo(c+d,b):a.moveTo(c+d,b),"1"==mxUtils.getValue(this.style,"right","1")?a.lineTo(c+d,b+f):a.moveTo(c+d,b+f),"1"==mxUtils.getValue(this.style,"bottom","1")?a.lineTo(c,b+f):a.moveTo(c,b+f),"1"==mxUtils.getValue(this.style,"left","1")&&a.lineTo(c,b-this.strokewidth/2),a.end(),a.stroke())};mxCellRenderer.registerShape("partialRectangle",ma);mxUtils.extend(sa,mxEllipse);sa.prototype.paintVertexShape=function(a,c,
-b,d,f){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();"vertical"==mxUtils.getValue(this.style,"line")?(a.moveTo(c+d/2,b),a.lineTo(c+d/2,b+f)):(a.moveTo(c,b+f/2),a.lineTo(c+d,b+f/2));a.end();a.stroke()};mxCellRenderer.registerShape("lineEllipse",sa);mxUtils.extend(ha,mxActor);ha.prototype.redrawPath=function(a,c,b,d,f){c=Math.min(d,f/2);a.moveTo(0,0);a.lineTo(d-c,0);a.quadTo(d,0,d,f/2);a.quadTo(d,f,d-c,f);a.lineTo(0,f);a.close();a.end()};mxCellRenderer.registerShape("delay",
-ha);mxUtils.extend(ca,mxActor);ca.prototype.size=.2;ca.prototype.redrawPath=function(a,c,b,d,f){c=Math.min(f,d);var e=Math.max(0,Math.min(c,c*parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=(f-e)/2;b=c+e;var g=(d-e)/2,e=g+e;a.moveTo(0,c);a.lineTo(g,c);a.lineTo(g,0);a.lineTo(e,0);a.lineTo(e,c);a.lineTo(d,c);a.lineTo(d,b);a.lineTo(e,b);a.lineTo(e,f);a.lineTo(g,f);a.lineTo(g,b);a.lineTo(0,b);a.close();a.end()};mxCellRenderer.registerShape("cross",ca);mxUtils.extend(da,mxActor);da.prototype.size=
-.25;da.prototype.redrawPath=function(a,c,b,d,f){c=Math.min(d,f/2);b=Math.min(d-c,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*d);a.moveTo(0,f/2);a.lineTo(b,0);a.lineTo(d-c,0);a.quadTo(d,0,d,f/2);a.quadTo(d,f,d-c,f);a.lineTo(b,f);a.close();a.end()};mxCellRenderer.registerShape("display",da);mxUtils.extend(ia,mxConnector);ia.prototype.origPaintEdgeShape=ia.prototype.paintEdgeShape;ia.prototype.paintEdgeShape=function(a,c,b){for(var d=[],f=0;f<c.length;f++)d.push(mxUtils.clone(c[f]));
-var f=a.state.dashed,e=a.state.fixDash;ia.prototype.origPaintEdgeShape.apply(this,[a,d,b]);3<=a.state.strokeWidth&&(d=mxUtils.getValue(this.style,"fillColor",null),null!=d&&(a.setStrokeColor(d),a.setStrokeWidth(a.state.strokeWidth-2),a.setDashed(f,e),ia.prototype.origPaintEdgeShape.apply(this,[a,c,b])))};mxCellRenderer.registerShape("filledEdge",ia);"undefined"!==typeof StyleFormatPanel&&function(){var a=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var c=
-this.format.getSelectionState(),b=a.apply(this,arguments);"umlFrame"==c.style.shape&&b.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"#ffffff"});return b}}();mxMarker.addMarker("dash",function(a,c,b,d,f,e,g,h,n,m){var r=f*(g+n+1),t=e*(g+n+1);return function(){a.begin();a.moveTo(d.x-r/2-t/2,d.y-t/2+r/2);a.lineTo(d.x+t/2-3*r/2,d.y-3*t/2-r/2);a.stroke()}});mxMarker.addMarker("cross",function(a,c,b,d,f,e,g,h,n,m){var r=f*(g+n+1),t=e*(g+n+1);return function(){a.begin();
-a.moveTo(d.x-r/2-t/2,d.y-t/2+r/2);a.lineTo(d.x+t/2-3*r/2,d.y-3*t/2-r/2);a.moveTo(d.x-r/2+t/2,d.y-t/2-r/2);a.lineTo(d.x-t/2-3*r/2,d.y-3*t/2+r/2);a.stroke()}});mxMarker.addMarker("circle",wa);mxMarker.addMarker("circlePlus",function(a,c,b,d,f,e,g,h,n,m){var r=d.clone(),t=wa.apply(this,arguments),x=f*(g+2*n),v=e*(g+2*n);return function(){t.apply(this,arguments);a.begin();a.moveTo(r.x-f*n,r.y-e*n);a.lineTo(r.x-2*x+f*n,r.y-2*v+e*n);a.moveTo(r.x-x-v+e*n,r.y-v+x-f*n);a.lineTo(r.x+v-x-e*n,r.y-v-x+f*n);a.stroke()}});
-mxMarker.addMarker("async",function(a,c,b,d,f,e,g,h,n,m){c=f*n*1.118;b=e*n*1.118;f*=g+n;e*=g+n;var r=d.clone();r.x-=c;r.y-=b;d.x+=1*-f-c;d.y+=1*-e-b;return function(){a.begin();a.moveTo(r.x,r.y);h?a.lineTo(r.x-f-e/2,r.y-e+f/2):a.lineTo(r.x+e/2-f,r.y-e-f/2);a.lineTo(r.x-f,r.y-e);a.close();m?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync",function(a){a=null!=a?a:2;return function(c,b,d,f,e,g,h,n,m,r){e*=h+m;g*=h+m;var t=f.clone();return function(){c.begin();c.moveTo(t.x,t.y);n?c.lineTo(t.x-
-e-g/a,t.y-g+e/a):c.lineTo(t.x+g/a-e,t.y-g-e/a);c.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Ea=function(a,c,b){return ta(a,["width"],c,function(c,d,f,e,g){g=a.shape.getEdgeWidth()*a.view.scale+b;return new mxPoint(e.x+d*c/4+f*g/2,e.y+f*c/4-d*g/2)},function(c,d,f,e,g,h){c=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,h.x,h.y));a.style.width=Math.round(2*c)/a.view.scale-b})},ta=function(a,c,b,d,f){return P(a,c,function(c){var f=a.absolutePoints,e=f.length-1;c=a.view.translate;var g=
-a.view.scale,h=b?f[0]:f[e],f=b?f[1]:f[e-1],e=f.x-h.x,n=f.y-h.y,m=Math.sqrt(e*e+n*n),h=d.call(this,m,e/m,n/m,h,f);return new mxPoint(h.x/g-c.x,h.y/g-c.y)},function(c,d,e){var g=a.absolutePoints,h=g.length-1;c=a.view.translate;var n=a.view.scale,m=b?g[0]:g[h],g=b?g[1]:g[h-1],h=g.x-m.x,r=g.y-m.y,t=Math.sqrt(h*h+r*r);d.x=(d.x+c.x)*n;d.y=(d.y+c.y)*n;f.call(this,t,h/t,r/t,m,g,d,e)})},oa=function(a){return function(c){return[P(c,["arrowWidth","arrowSize"],function(c){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
-"arrowWidth",T.prototype.arrowWidth))),d=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",T.prototype.arrowSize)));return new mxPoint(c.x+(1-d)*c.width,c.y+(1-b)*c.height/2)},function(c,b){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(c.y+c.height/2-b.y)/c.height*2));this.state.style.arrowSize=Math.max(0,Math.min(a,(c.x+c.width-b.x)/c.width))})]}},Ca=function(a,c,b){return function(d){var f=[P(d,["size"],function(b){var d=Math.max(0,Math.min(b.width,Math.min(b.height,
-parseFloat(mxUtils.getValue(this.state.style,"size",c)))))*a;return new mxPoint(b.x+d,b.y+d)},function(c,b){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(c.width,b.x-c.x),Math.min(c.height,b.y-c.y)))/a)})];b&&mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&f.push(ja(d));return f}},xa=function(a,c,b,d,f){b=null!=b?b:1;return function(e){var g=[P(e,["size"],function(c){var b=null!=f?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,d=parseFloat(mxUtils.getValue(this.state.style,
-"size",b?f:a));return new mxPoint(c.x+Math.max(0,Math.min(c.width,d*(b?1:c.width))),c.getCenterY())},function(a,c,d){var g=null!=f?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null;a=g?c.x-a.x:Math.max(0,Math.min(b,(c.x-a.x)/a.width));g&&!mxEvent.isAltDown(d.getEvent())&&(a=e.view.graph.snap(a));this.state.style.size=a},null,d)];c&&mxUtils.getValue(e.style,mxConstants.STYLE_ROUNDED,!1)&&g.push(ja(e));return g}},Fa=function(a){return function(c){var b=[P(c,["size"],function(c){var b=Math.max(0,
-Math.min(a,parseFloat(mxUtils.getValue(this.state.style,"size",g.prototype.size))));return new mxPoint(c.x+b*c.width*.75,c.y+c.height/4)},function(c,b){this.state.style.size=Math.max(0,Math.min(a,(b.x-c.x)/(.75*c.width)))},null,!0)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ja(c));return b}},va=function(){return function(a){var c=[];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(ja(a));return c}},ja=function(a,c){return P(a,[mxConstants.STYLE_ARCSIZE],function(b){var d=
+R);mxUtils.extend(ha,mxActor);ha.prototype.redrawPath=function(a,c,b,d,f){var e=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",R.prototype.arrowWidth))));c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",R.prototype.arrowSize))));b=(f-e)/2;var e=b+e,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,f/2),new mxPoint(c,0),new mxPoint(c,b),new mxPoint(d-c,b),new mxPoint(d-c,0),new mxPoint(d,
+f/2),new mxPoint(d-c,f),new mxPoint(d-c,e),new mxPoint(c,e),new mxPoint(c,f)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("doubleArrow",ha);mxUtils.extend(B,mxActor);B.prototype.size=.1;B.prototype.redrawPath=function(a,c,b,d,f){c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(c,0);a.lineTo(d,0);a.quadTo(d-2*c,f/2,d,f);a.lineTo(c,f);a.quadTo(c-2*c,f/2,c,0);a.close();a.end()};mxCellRenderer.registerShape("dataStorage",B);mxUtils.extend(ca,
+mxActor);ca.prototype.redrawPath=function(a,c,b,d,f){a.moveTo(0,0);a.quadTo(d,0,d,f/2);a.quadTo(d,f,0,f);a.close();a.end()};mxCellRenderer.registerShape("or",ca);mxUtils.extend(V,mxActor);V.prototype.redrawPath=function(a,c,b,d,f){a.moveTo(0,0);a.quadTo(d,0,d,f/2);a.quadTo(d,f,0,f);a.quadTo(d/2,f/2,0,0);a.close();a.end()};mxCellRenderer.registerShape("xor",V);mxUtils.extend(X,mxActor);X.prototype.size=20;X.prototype.isRoundable=function(){return!0};X.prototype.redrawPath=function(a,c,b,d,f){c=Math.min(d/
+2,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(c,0),new mxPoint(d-c,0),new mxPoint(d,.8*c),new mxPoint(d,f),new mxPoint(0,f),new mxPoint(0,.8*c)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("loopLimit",X);mxUtils.extend(aa,mxActor);aa.prototype.size=.375;aa.prototype.isRoundable=function(){return!0};aa.prototype.redrawPath=function(a,c,b,d,f){c=
+f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,f-c),new mxPoint(d/2,f),new mxPoint(0,f-c)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("offPageConnector",aa);mxUtils.extend(da,mxEllipse);da.prototype.paintVertexShape=function(a,c,b,d,f){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();
+a.moveTo(c+d/2,b+f);a.lineTo(c+d,b+f);a.end();a.stroke()};mxCellRenderer.registerShape("tapeData",da);mxUtils.extend(Y,mxEllipse);Y.prototype.paintVertexShape=function(a,c,b,d,f){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(c,b+f/2);a.lineTo(c+d,b+f/2);a.end();a.stroke();a.begin();a.moveTo(c+d/2,b);a.lineTo(c+d/2,b+f);a.end();a.stroke()};mxCellRenderer.registerShape("orEllipse",Y);mxUtils.extend(pa,mxEllipse);pa.prototype.paintVertexShape=function(a,
+c,b,d,f){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(c+.145*d,b+.145*f);a.lineTo(c+.855*d,b+.855*f);a.end();a.stroke();a.begin();a.moveTo(c+.855*d,b+.145*f);a.lineTo(c+.145*d,b+.855*f);a.end();a.stroke()};mxCellRenderer.registerShape("sumEllipse",pa);mxUtils.extend(ra,mxRhombus);ra.prototype.paintVertexShape=function(a,c,b,d,f){mxRhombus.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(c,b+f/2);a.lineTo(c+d,b+f/2);
+a.end();a.stroke()};mxCellRenderer.registerShape("sortShape",ra);mxUtils.extend(ja,mxEllipse);ja.prototype.paintVertexShape=function(a,c,b,d,f){a.begin();a.moveTo(c,b);a.lineTo(c+d,b);a.lineTo(c+d/2,b+f/2);a.close();a.fillAndStroke();a.begin();a.moveTo(c,b+f);a.lineTo(c+d,b+f);a.lineTo(c+d/2,b+f/2);a.close();a.fillAndStroke()};mxCellRenderer.registerShape("collate",ja);mxUtils.extend(ma,mxEllipse);ma.prototype.paintVertexShape=function(a,c,b,d,f){var e=b+f-5;a.begin();a.moveTo(c,b);a.lineTo(c,b+f);
+a.moveTo(c,e);a.lineTo(c+10,e-5);a.moveTo(c,e);a.lineTo(c+10,e+5);a.moveTo(c,e);a.lineTo(c+d,e);a.moveTo(c+d,b);a.lineTo(c+d,b+f);a.moveTo(c+d,e);a.lineTo(c+d-10,e-5);a.moveTo(c+d,e);a.lineTo(c+d-10,e+5);a.end();a.stroke()};mxCellRenderer.registerShape("dimension",ma);mxUtils.extend(ua,mxEllipse);ua.prototype.paintVertexShape=function(a,c,b,d,f){this.outline||a.setStrokeColor(null);mxRectangleShape.prototype.paintBackground.apply(this,arguments);null!=this.style&&(a.setStrokeColor(this.stroke),a.rect(c,
+b,d,f),a.fill(),a.begin(),a.moveTo(c,b),"1"==mxUtils.getValue(this.style,"top","1")?a.lineTo(c+d,b):a.moveTo(c+d,b),"1"==mxUtils.getValue(this.style,"right","1")?a.lineTo(c+d,b+f):a.moveTo(c+d,b+f),"1"==mxUtils.getValue(this.style,"bottom","1")?a.lineTo(c,b+f):a.moveTo(c,b+f),"1"==mxUtils.getValue(this.style,"left","1")&&a.lineTo(c,b-this.strokewidth/2),a.end(),a.stroke())};mxCellRenderer.registerShape("partialRectangle",ua);mxUtils.extend(ia,mxEllipse);ia.prototype.paintVertexShape=function(a,c,
+b,d,f){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();"vertical"==mxUtils.getValue(this.style,"line")?(a.moveTo(c+d/2,b),a.lineTo(c+d/2,b+f)):(a.moveTo(c,b+f/2),a.lineTo(c+d,b+f/2));a.end();a.stroke()};mxCellRenderer.registerShape("lineEllipse",ia);mxUtils.extend(sa,mxActor);sa.prototype.redrawPath=function(a,c,b,d,f){c=Math.min(d,f/2);a.moveTo(0,0);a.lineTo(d-c,0);a.quadTo(d,0,d,f/2);a.quadTo(d,f,d-c,f);a.lineTo(0,f);a.close();a.end()};mxCellRenderer.registerShape("delay",
+sa);mxUtils.extend(ga,mxActor);ga.prototype.size=.2;ga.prototype.redrawPath=function(a,c,b,d,f){c=Math.min(f,d);var e=Math.max(0,Math.min(c,c*parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=(f-e)/2;b=c+e;var g=(d-e)/2,e=g+e;a.moveTo(0,c);a.lineTo(g,c);a.lineTo(g,0);a.lineTo(e,0);a.lineTo(e,c);a.lineTo(d,c);a.lineTo(d,b);a.lineTo(e,b);a.lineTo(e,f);a.lineTo(g,f);a.lineTo(g,b);a.lineTo(0,b);a.close();a.end()};mxCellRenderer.registerShape("cross",ga);mxUtils.extend(ea,mxActor);ea.prototype.size=
+.25;ea.prototype.redrawPath=function(a,c,b,d,f){c=Math.min(d,f/2);b=Math.min(d-c,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*d);a.moveTo(0,f/2);a.lineTo(b,0);a.lineTo(d-c,0);a.quadTo(d,0,d,f/2);a.quadTo(d,f,d-c,f);a.lineTo(b,f);a.close();a.end()};mxCellRenderer.registerShape("display",ea);mxUtils.extend(ba,mxConnector);ba.prototype.origPaintEdgeShape=ba.prototype.paintEdgeShape;ba.prototype.paintEdgeShape=function(a,c,b){for(var d=[],f=0;f<c.length;f++)d.push(mxUtils.clone(c[f]));
+var f=a.state.dashed,e=a.state.fixDash;ba.prototype.origPaintEdgeShape.apply(this,[a,d,b]);3<=a.state.strokeWidth&&(d=mxUtils.getValue(this.style,"fillColor",null),null!=d&&(a.setStrokeColor(d),a.setStrokeWidth(a.state.strokeWidth-2),a.setDashed(f,e),ba.prototype.origPaintEdgeShape.apply(this,[a,c,b])))};mxCellRenderer.registerShape("filledEdge",ba);"undefined"!==typeof StyleFormatPanel&&function(){var a=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var c=
+this.format.getSelectionState(),b=a.apply(this,arguments);"umlFrame"==c.style.shape&&b.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"#ffffff"});return b}}();mxMarker.addMarker("dash",function(a,c,b,d,f,e,g,h,n,m){var r=f*(g+n+1),u=e*(g+n+1);return function(){a.begin();a.moveTo(d.x-r/2-u/2,d.y-u/2+r/2);a.lineTo(d.x+u/2-3*r/2,d.y-3*u/2-r/2);a.stroke()}});mxMarker.addMarker("cross",function(a,c,b,d,f,e,g,h,n,m){var r=f*(g+n+1),u=e*(g+n+1);return function(){a.begin();
+a.moveTo(d.x-r/2-u/2,d.y-u/2+r/2);a.lineTo(d.x+u/2-3*r/2,d.y-3*u/2-r/2);a.moveTo(d.x-r/2+u/2,d.y-u/2-r/2);a.lineTo(d.x-u/2-3*r/2,d.y-3*u/2+r/2);a.stroke()}});mxMarker.addMarker("circle",xa);mxMarker.addMarker("circlePlus",function(a,c,b,d,f,e,g,h,n,m){var r=d.clone(),u=xa.apply(this,arguments),x=f*(g+2*n),k=e*(g+2*n);return function(){u.apply(this,arguments);a.begin();a.moveTo(r.x-f*n,r.y-e*n);a.lineTo(r.x-2*x+f*n,r.y-2*k+e*n);a.moveTo(r.x-x-k+e*n,r.y-k+x-f*n);a.lineTo(r.x+k-x-e*n,r.y-k-x+f*n);a.stroke()}});
+mxMarker.addMarker("async",function(a,c,b,d,f,e,g,h,n,m){c=f*n*1.118;b=e*n*1.118;f*=g+n;e*=g+n;var r=d.clone();r.x-=c;r.y-=b;d.x+=1*-f-c;d.y+=1*-e-b;return function(){a.begin();a.moveTo(r.x,r.y);h?a.lineTo(r.x-f-e/2,r.y-e+f/2):a.lineTo(r.x+e/2-f,r.y-e-f/2);a.lineTo(r.x-f,r.y-e);a.close();m?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync",function(a){a=null!=a?a:2;return function(c,b,d,f,e,g,h,n,m,r){e*=h+m;g*=h+m;var u=f.clone();return function(){c.begin();c.moveTo(u.x,u.y);n?c.lineTo(u.x-
+e-g/a,u.y-g+e/a):c.lineTo(u.x+g/a-e,u.y-g-e/a);c.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Ea=function(a,c,b){return ta(a,["width"],c,function(c,d,f,e,g){g=a.shape.getEdgeWidth()*a.view.scale+b;return new mxPoint(e.x+d*c/4+f*g/2,e.y+f*c/4-d*g/2)},function(c,d,f,e,g,h){c=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,h.x,h.y));a.style.width=Math.round(2*c)/a.view.scale-b})},ta=function(a,c,b,d,f){return P(a,c,function(c){var f=a.absolutePoints,e=f.length-1;c=a.view.translate;var g=
+a.view.scale,h=b?f[0]:f[e],f=b?f[1]:f[e-1],e=f.x-h.x,n=f.y-h.y,m=Math.sqrt(e*e+n*n),h=d.call(this,m,e/m,n/m,h,f);return new mxPoint(h.x/g-c.x,h.y/g-c.y)},function(c,d,e){var g=a.absolutePoints,h=g.length-1;c=a.view.translate;var n=a.view.scale,m=b?g[0]:g[h],g=b?g[1]:g[h-1],h=g.x-m.x,r=g.y-m.y,u=Math.sqrt(h*h+r*r);d.x=(d.x+c.x)*n;d.y=(d.y+c.y)*n;f.call(this,u,h/u,r/u,m,g,d,e)})},oa=function(a){return function(c){return[P(c,["arrowWidth","arrowSize"],function(c){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
+"arrowWidth",R.prototype.arrowWidth))),d=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",R.prototype.arrowSize)));return new mxPoint(c.x+(1-d)*c.width,c.y+(1-b)*c.height/2)},function(c,b){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(c.y+c.height/2-b.y)/c.height*2));this.state.style.arrowSize=Math.max(0,Math.min(a,(c.x+c.width-b.x)/c.width))})]}},Ca=function(a,c,b){return function(d){var f=[P(d,["size"],function(b){var d=Math.max(0,Math.min(b.width,Math.min(b.height,
+parseFloat(mxUtils.getValue(this.state.style,"size",c)))))*a;return new mxPoint(b.x+d,b.y+d)},function(c,b){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(c.width,b.x-c.x),Math.min(c.height,b.y-c.y)))/a)})];b&&mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&f.push(ka(d));return f}},ya=function(a,c,b,d,f){b=null!=b?b:1;return function(e){var g=[P(e,["size"],function(c){var b=null!=f?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,d=parseFloat(mxUtils.getValue(this.state.style,
+"size",b?f:a));return new mxPoint(c.x+Math.max(0,Math.min(c.width,d*(b?1:c.width))),c.getCenterY())},function(a,c,d){var g=null!=f?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null;a=g?c.x-a.x:Math.max(0,Math.min(b,(c.x-a.x)/a.width));g&&!mxEvent.isAltDown(d.getEvent())&&(a=e.view.graph.snap(a));this.state.style.size=a},null,d)];c&&mxUtils.getValue(e.style,mxConstants.STYLE_ROUNDED,!1)&&g.push(ka(e));return g}},Fa=function(a){return function(c){var b=[P(c,["size"],function(c){var b=Math.max(0,
+Math.min(a,parseFloat(mxUtils.getValue(this.state.style,"size",g.prototype.size))));return new mxPoint(c.x+b*c.width*.75,c.y+c.height/4)},function(c,b){this.state.style.size=Math.max(0,Math.min(a,(b.x-c.x)/(.75*c.width)))},null,!0)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ka(c));return b}},wa=function(){return function(a){var c=[];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(ka(a));return c}},ka=function(a,c){return P(a,[mxConstants.STYLE_ARCSIZE],function(b){var d=
null!=c?c:b.height/8;if("1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var f=mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(b.x+b.width-Math.min(b.width/2,f),b.y+d)}f=Math.max(0,parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(b.x+b.width-Math.min(Math.max(b.width/2,b.height/2),Math.min(b.width,b.height)*f),b.y+d)},function(c,b,d){"1"==mxUtils.getValue(a.style,
mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(c.width,2*(c.x+c.width-b.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(c.width-b.x+c.x)/Math.min(c.width,c.height))))})},P=function(a,c,b,d,f,e){var g=new mxHandle(a,null,mxVertexHandler.prototype.secondaryHandleImage);g.execute=function(){for(var a=0;a<c.length;a++)this.copyStyle(c[a])};g.getPosition=b;g.setPosition=d;g.ignoreGrid=null!=f?f:!0;
-if(e){var h=g.positionChanged;g.positionChanged=function(){h.apply(this,arguments);a.view.invalidate(this.state.cell);a.view.validate()}}return g},ya={link:function(a){return[Ea(a,!0,10),Ea(a,!1,10)]},flexArrow:function(a){var c=a.view.graph.gridSize/a.view.scale,b=[];mxUtils.getValue(a.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(b.push(ta(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(c,b,d,f,e){c=(a.shape.getEdgeWidth()-a.shape.strokewidth)*
+if(e){var h=g.positionChanged;g.positionChanged=function(){h.apply(this,arguments);a.view.invalidate(this.state.cell);a.view.validate()}}return g},za={link:function(a){return[Ea(a,!0,10),Ea(a,!1,10)]},flexArrow:function(a){var c=a.view.graph.gridSize/a.view.scale,b=[];mxUtils.getValue(a.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(b.push(ta(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(c,b,d,f,e){c=(a.shape.getEdgeWidth()-a.shape.strokewidth)*
a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(f.x+b*(e+a.shape.strokewidth*a.view.scale)+d*c/2,f.y+d*(e+a.shape.strokewidth*a.view.scale)-b*c/2)},function(b,d,f,e,g,h,n){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,h.x,h.y));d=mxUtils.ptLineDist(e.x,e.y,e.x+f,e.y-d,h.x,h.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*b)/a.view.scale;mxEvent.isControlDown(n.getEvent())&&
(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]);mxEvent.isAltDown(n.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<c/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE])})),b.push(ta(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(c,b,d,f,e){c=(a.shape.getStartArrowWidth()-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,
mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(f.x+b*(e+a.shape.strokewidth*a.view.scale)+d*c/2,f.y+d*(e+a.shape.strokewidth*a.view.scale)-b*c/2)},function(b,d,f,e,g,h,n){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,h.x,h.y));d=mxUtils.ptLineDist(e.x,e.y,e.x+f,e.y-d,h.x,h.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.startWidth=Math.max(0,Math.round(2*b)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(n.getEvent())&&
@@ -2548,47 +2548,47 @@ e.x+f,e.y-d,h.x,h.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(d-a.shap
["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(c,b,d,f,e){c=(a.shape.getEndArrowWidth()-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(f.x+b*(e+a.shape.strokewidth*a.view.scale)-d*c/2,f.y+d*(e+a.shape.strokewidth*a.view.scale)+b*c/2)},function(b,d,f,e,g,h,n){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,h.x,h.y));d=mxUtils.ptLineDist(e.x,e.y,e.x+f,e.y-
d,h.x,h.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.endWidth=Math.max(0,Math.round(2*b)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(n.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE],a.style.startWidth=a.style.endWidth);mxEvent.isAltDown(n.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<c/6&&(a.style[mxConstants.STYLE_ENDSIZE]=
a.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(a.style.endWidth)-parseFloat(a.style.startWidth))<c&&(a.style.endWidth=a.style.startWidth))})));return b},swimlane:function(a){var c=[P(a,[mxConstants.STYLE_STARTSIZE],function(c){var b=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(a.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(c.getCenterX(),c.y+Math.max(0,Math.min(c.height,b))):new mxPoint(c.x+Math.max(0,Math.min(c.width,
-b)),c.getCenterY())},function(c,b){a.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(c.height,b.y-c.y))):Math.round(Math.max(0,Math.min(c.width,b.x-c.x)))})];if(mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED)){var b=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));c.push(ja(a,b/2))}return c},label:va(),ext:va(),rectangle:va(),triangle:va(),rhombus:va(),umlLifeline:function(a){return[P(a,
+b)),c.getCenterY())},function(c,b){a.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(c.height,b.y-c.y))):Math.round(Math.max(0,Math.min(c.width,b.x-c.x)))})];if(mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED)){var b=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));c.push(ka(a,b/2))}return c},label:wa(),ext:wa(),rectangle:wa(),triangle:wa(),rhombus:wa(),umlLifeline:function(a){return[P(a,
["size"],function(a){var c=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",A.prototype.size))));return new mxPoint(a.getCenterX(),a.y+c)},function(a,c){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))},!1)]},umlFrame:function(a){return[P(a,["width","height"],function(a){var c=Math.max(I.prototype.corner,Math.min(a.width,mxUtils.getValue(this.state.style,"width",I.prototype.width))),b=Math.max(1.5*I.prototype.corner,Math.min(a.height,mxUtils.getValue(this.state.style,
"height",I.prototype.height)));return new mxPoint(a.x+c,a.y+b)},function(a,c){this.state.style.width=Math.round(Math.max(I.prototype.corner,Math.min(a.width,c.x-a.x)));this.state.style.height=Math.round(Math.max(1.5*I.prototype.corner,Math.min(a.height,c.y-a.y)))},!1)]},process:function(a){var c=[P(a,["size"],function(a){var c=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style,"size",m.prototype.size))));return new mxPoint(a.x+a.width*c,a.y+a.height/4)},function(a,c){this.state.style.size=
-Math.max(0,Math.min(.5,(c.x-a.x)/a.width))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(ja(a));return c},cross:function(a){return[P(a,["size"],function(a){var c=Math.min(a.width,a.height),c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",ca.prototype.size)))*c/2;return new mxPoint(a.getCenterX()-c,a.getCenterY()-c)},function(a,c){var b=Math.min(a.width,a.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,a.getCenterY()-c.y)/b*2,Math.max(0,a.getCenterX()-
-c.x)/b*2)))})]},note:function(a){return[P(a,["size"],function(a){var c=Math.max(0,Math.min(a.width,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",k.prototype.size)))));return new mxPoint(a.x+a.width-c,a.y+c)},function(a,c){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(a.width,a.x+a.width-c.x),Math.min(a.height,c.y-a.y))))})]},manualInput:function(a){var c=[P(a,["size"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",K.prototype.size)));
-return new mxPoint(a.x+a.width/4,a.y+3*c/4)},function(a,c){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,4*(c.y-a.y)/3)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(ja(a));return c},dataStorage:function(a){return[P(a,["size"],function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",R.prototype.size))));return new mxPoint(a.x+(1-c)*a.width,a.getCenterY())},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(a.x+a.width-
+Math.max(0,Math.min(.5,(c.x-a.x)/a.width))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(ka(a));return c},cross:function(a){return[P(a,["size"],function(a){var c=Math.min(a.width,a.height),c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",ga.prototype.size)))*c/2;return new mxPoint(a.getCenterX()-c,a.getCenterY()-c)},function(a,c){var b=Math.min(a.width,a.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,a.getCenterY()-c.y)/b*2,Math.max(0,a.getCenterX()-
+c.x)/b*2)))})]},note:function(a){return[P(a,["size"],function(a){var c=Math.max(0,Math.min(a.width,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",k.prototype.size)))));return new mxPoint(a.x+a.width-c,a.y+c)},function(a,c){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(a.width,a.x+a.width-c.x),Math.min(a.height,c.y-a.y))))})]},manualInput:function(a){var c=[P(a,["size"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",L.prototype.size)));
+return new mxPoint(a.x+a.width/4,a.y+3*c/4)},function(a,c){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,4*(c.y-a.y)/3)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(ka(a));return c},dataStorage:function(a){return[P(a,["size"],function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",B.prototype.size))));return new mxPoint(a.x+(1-c)*a.width,a.getCenterY())},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(a.x+a.width-
c.x)/a.width))})]},callout:function(a){var c=[P(a,["size","position"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",v.prototype.size))),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",v.prototype.position)));mxUtils.getValue(this.state.style,"base",v.prototype.base);return new mxPoint(a.x+b*a.width,a.y+a.height-c)},function(a,c){mxUtils.getValue(this.state.style,"base",v.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(a.height,
a.y+a.height-c.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(c.x-a.x)/a.width)))/100}),P(a,["position2"],function(a){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",v.prototype.position2)));return new mxPoint(a.x+c*a.width,a.y+a.height)},function(a,c){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(c.x-a.x)/a.width)))/100}),P(a,["base"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",v.prototype.size))),
b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",v.prototype.position))),d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"base",v.prototype.base)));return new mxPoint(a.x+Math.min(a.width,b*a.width+d),a.y+a.height-c)},function(a,c){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",v.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(a.width,c.x-a.x-b*a.width)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,
-!1)&&c.push(ja(a));return c},internalStorage:function(a){var c=[P(a,["dx","dy"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",F.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",F.prototype.dy)));return new mxPoint(a.x+c,a.y+b)},function(a,c){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,c.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,
-!1)&&c.push(ja(a));return c},corner:function(a){return[P(a,["dx","dy"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",S.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",S.prototype.dy)));return new mxPoint(a.x+c,a.y+b)},function(a,c){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,c.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))})]},tee:function(a){return[P(a,["dx","dy"],function(a){var c=
+!1)&&c.push(ka(a));return c},internalStorage:function(a){var c=[P(a,["dx","dy"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",F.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",F.prototype.dy)));return new mxPoint(a.x+c,a.y+b)},function(a,c){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,c.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,
+!1)&&c.push(ka(a));return c},corner:function(a){return[P(a,["dx","dy"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",S.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",S.prototype.dy)));return new mxPoint(a.x+c,a.y+b)},function(a,c){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,c.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))})]},tee:function(a){return[P(a,["dx","dy"],function(a){var c=
Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",M.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",M.prototype.dy)));return new mxPoint(a.x+(a.width+c)/2,a.y+b)},function(a,c){this.state.style.dx=Math.round(Math.max(0,2*Math.min(a.width/2,c.x-a.x-a.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))})]},singleArrow:oa(1),doubleArrow:oa(.5),folder:function(a){return[P(a,["tabWidth","tabHeight"],function(a){var c=
Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"tabWidth",p.prototype.tabWidth))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"tabHeight",p.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",p.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(c=a.width-c);return new mxPoint(a.x+c,a.y+b)},function(a,c){var b=Math.max(0,Math.min(a.width,c.x-a.x));mxUtils.getValue(this.state.style,"tabPosition",p.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&
(b=a.width-b);this.state.style.tabWidth=Math.round(b);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))})]},document:function(a){return[P(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",c.prototype.size))));return new mxPoint(a.x+3*a.width/4,a.y+(1-b)*a.height)},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-c.y)/a.height))})]},tape:function(a){return[P(a,["size"],function(a){var c=Math.max(0,
-Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",u.prototype.size))));return new mxPoint(a.getCenterX(),a.y+c*a.height/2)},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(c.y-a.y)/a.height*2))})]},offPageConnector:function(a){return[P(a,["size"],function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",aa.prototype.size))));return new mxPoint(a.getCenterX(),a.y+(1-c)*a.height)},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(a.y+
-a.height-c.y)/a.height))})]},step:xa(D.prototype.size,!0,null,!0,D.prototype.fixedSize),hexagon:xa(x.prototype.size,!0,.5,!0),curlyBracket:xa(n.prototype.size,!1),display:xa(da.prototype.size,!1),cube:Ca(1,a.prototype.size,!1),card:Ca(.5,q.prototype.size,!0),loopLimit:Ca(.5,W.prototype.size,!0),trapezoid:Fa(.5),parallelogram:Fa(1)};Graph.createHandle=P;Graph.handleFactory=ya;mxVertexHandler.prototype.createCustomHandles=function(){if(1==this.state.view.graph.getSelectionCount()&&this.graph.isCellRotatable(this.state.cell)){var a=
-this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_RECTANGLE);a=ya[a];null==a&&null!=this.state.shape&&this.state.shape.isRoundable()&&(a=ya[mxConstants.SHAPE_RECTANGLE]);if(null!=a)return a(this.state)}return null};mxEdgeHandler.prototype.createCustomHandles=function(){if(1==this.state.view.graph.getSelectionCount()){var a=this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=
-mxConstants.SHAPE_CONNECTOR);a=ya[a];if(null!=a)return a(this.state)}return null}}else Graph.createHandle=function(){},Graph.handleFactory={};var za=new mxPoint(1,0),Aa=new mxPoint(1,0),oa=mxUtils.toRadians(-30),za=mxUtils.getRotatedPoint(za,Math.cos(oa),Math.sin(oa)),oa=mxUtils.toRadians(-150),Aa=mxUtils.getRotatedPoint(Aa,Math.cos(oa),Math.sin(oa));mxEdgeStyle.IsometricConnector=function(a,c,b,d,f){var e=a.view;d=null!=d&&0<d.length?d[0]:null;var g=a.absolutePoints,h=g[0],g=g[g.length-1];null!=
-d&&(d=e.transformControlPoint(a,d));null==h&&null!=c&&(h=new mxPoint(c.getCenterX(),c.getCenterY()));null==g&&null!=b&&(g=new mxPoint(b.getCenterX(),b.getCenterY()));var n=za.x,m=za.y,r=Aa.x,t=Aa.y,x="horizontal"==mxUtils.getValue(a.style,"elbow","horizontal");if(null!=g&&null!=h){a=function(a,c,b){a-=v.x;var d=c-v.y;c=(t*a-r*d)/(n*t-m*r);a=(m*a-n*d)/(m*r-n*t);x?(b&&(v=new mxPoint(v.x+n*c,v.y+m*c),f.push(v)),v=new mxPoint(v.x+r*a,v.y+t*a)):(b&&(v=new mxPoint(v.x+r*a,v.y+t*a),f.push(v)),v=new mxPoint(v.x+
-n*c,v.y+m*c));f.push(v)};var v=h;null==d&&(d=new mxPoint(h.x+(g.x-h.x)/2,h.y+(g.y-h.y)/2));a(d.x,d.y,!0);a(g.x,g.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var La=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(a,c){if(c==mxEdgeStyle.IsometricConnector){var b=new mxElbowEdgeHandler(a);b.snapToTerminals=!1;return b}return La.apply(this,arguments)};b.prototype.constraints=[];e.prototype.constraints=[];v.prototype.constraints=[];
+Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",t.prototype.size))));return new mxPoint(a.getCenterX(),a.y+c*a.height/2)},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(c.y-a.y)/a.height*2))})]},offPageConnector:function(a){return[P(a,["size"],function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",aa.prototype.size))));return new mxPoint(a.getCenterX(),a.y+(1-c)*a.height)},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(a.y+
+a.height-c.y)/a.height))})]},step:ya(E.prototype.size,!0,null,!0,E.prototype.fixedSize),hexagon:ya(x.prototype.size,!0,.5,!0),curlyBracket:ya(n.prototype.size,!1),display:ya(ea.prototype.size,!1),cube:Ca(1,a.prototype.size,!1),card:Ca(.5,q.prototype.size,!0),loopLimit:Ca(.5,X.prototype.size,!0),trapezoid:Fa(.5),parallelogram:Fa(1)};Graph.createHandle=P;Graph.handleFactory=za;mxVertexHandler.prototype.createCustomHandles=function(){if(1==this.state.view.graph.getSelectionCount()&&this.graph.isCellRotatable(this.state.cell)){var a=
+this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_RECTANGLE);a=za[a];null==a&&null!=this.state.shape&&this.state.shape.isRoundable()&&(a=za[mxConstants.SHAPE_RECTANGLE]);if(null!=a)return a(this.state)}return null};mxEdgeHandler.prototype.createCustomHandles=function(){if(1==this.state.view.graph.getSelectionCount()){var a=this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=
+mxConstants.SHAPE_CONNECTOR);a=za[a];if(null!=a)return a(this.state)}return null}}else Graph.createHandle=function(){},Graph.handleFactory={};var Aa=new mxPoint(1,0),Ba=new mxPoint(1,0),oa=mxUtils.toRadians(-30),Aa=mxUtils.getRotatedPoint(Aa,Math.cos(oa),Math.sin(oa)),oa=mxUtils.toRadians(-150),Ba=mxUtils.getRotatedPoint(Ba,Math.cos(oa),Math.sin(oa));mxEdgeStyle.IsometricConnector=function(a,c,b,d,f){var e=a.view;d=null!=d&&0<d.length?d[0]:null;var g=a.absolutePoints,h=g[0],g=g[g.length-1];null!=
+d&&(d=e.transformControlPoint(a,d));null==h&&null!=c&&(h=new mxPoint(c.getCenterX(),c.getCenterY()));null==g&&null!=b&&(g=new mxPoint(b.getCenterX(),b.getCenterY()));var n=Aa.x,m=Aa.y,r=Ba.x,u=Ba.y,x="horizontal"==mxUtils.getValue(a.style,"elbow","horizontal");if(null!=g&&null!=h){a=function(a,c,b){a-=k.x;var d=c-k.y;c=(u*a-r*d)/(n*u-m*r);a=(m*a-n*d)/(m*r-n*u);x?(b&&(k=new mxPoint(k.x+n*c,k.y+m*c),f.push(k)),k=new mxPoint(k.x+r*a,k.y+u*a)):(b&&(k=new mxPoint(k.x+r*a,k.y+u*a),f.push(k)),k=new mxPoint(k.x+
+n*c,k.y+m*c));f.push(k)};var k=h;null==d&&(d=new mxPoint(h.x+(g.x-h.x)/2,h.y+(g.y-h.y)/2));a(d.x,d.y,!0);a(g.x,g.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var La=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(a,c){if(c==mxEdgeStyle.IsometricConnector){var b=new mxElbowEdgeHandler(a);b.snapToTerminals=!1;return b}return La.apply(this,arguments)};b.prototype.constraints=[];e.prototype.constraints=[];v.prototype.constraints=[];
mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,
1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,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))];mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;t.prototype.constraints=mxRectangleShape.prototype.constraints;k.prototype.constraints=mxRectangleShape.prototype.constraints;q.prototype.constraints=mxRectangleShape.prototype.constraints;a.prototype.constraints=mxRectangleShape.prototype.constraints;p.prototype.constraints=mxRectangleShape.prototype.constraints;
-F.prototype.constraints=mxRectangleShape.prototype.constraints;R.prototype.constraints=mxRectangleShape.prototype.constraints;Z.prototype.constraints=mxEllipse.prototype.constraints;pa.prototype.constraints=mxEllipse.prototype.constraints;qa.prototype.constraints=mxEllipse.prototype.constraints;sa.prototype.constraints=mxEllipse.prototype.constraints;K.prototype.constraints=mxRectangleShape.prototype.constraints;ha.prototype.constraints=mxRectangleShape.prototype.constraints;da.prototype.constraints=
-mxRectangleShape.prototype.constraints;W.prototype.constraints=mxRectangleShape.prototype.constraints;aa.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,
+.5))];mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;u.prototype.constraints=mxRectangleShape.prototype.constraints;k.prototype.constraints=mxRectangleShape.prototype.constraints;q.prototype.constraints=mxRectangleShape.prototype.constraints;a.prototype.constraints=mxRectangleShape.prototype.constraints;p.prototype.constraints=mxRectangleShape.prototype.constraints;
+F.prototype.constraints=mxRectangleShape.prototype.constraints;B.prototype.constraints=mxRectangleShape.prototype.constraints;da.prototype.constraints=mxEllipse.prototype.constraints;Y.prototype.constraints=mxEllipse.prototype.constraints;pa.prototype.constraints=mxEllipse.prototype.constraints;ia.prototype.constraints=mxEllipse.prototype.constraints;L.prototype.constraints=mxRectangleShape.prototype.constraints;sa.prototype.constraints=mxRectangleShape.prototype.constraints;ea.prototype.constraints=
+mxRectangleShape.prototype.constraints;X.prototype.constraints=mxRectangleShape.prototype.constraints;aa.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,
.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];N.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75,.1),!1),new mxConnectionConstraint(new mxPoint(0,1/3),!1),new mxConnectionConstraint(new mxPoint(0,
1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1,1),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1)];H.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)];u.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)];D.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,
+1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];t.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)];E.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)];O.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];mxDoubleEllipse.prototype.constraints=
mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0)];mxHexagon.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.375,
0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.625,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.375,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),
!0),new mxConnectionConstraint(new mxPoint(.625,1),!0)];mxCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.25),!1),new mxConnectionConstraint(new mxPoint(.4,.1),!1),new mxConnectionConstraint(new mxPoint(.16,.55),!1),new mxConnectionConstraint(new mxPoint(.07,.4),!1),new mxConnectionConstraint(new mxPoint(.31,.8),!1),new mxConnectionConstraint(new mxPoint(.13,.77),!1),new mxConnectionConstraint(new mxPoint(.8,.8),!1),new mxConnectionConstraint(new mxPoint(.55,.95),!1),new mxConnectionConstraint(new mxPoint(.875,
.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];f.prototype.constraints=mxRectangleShape.prototype.constraints;g.prototype.constraints=mxRectangleShape.prototype.constraints;c.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,
-.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;M.prototype.constraints=null;S.prototype.constraints=null;L.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,
-1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];T.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];E.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),
-new mxConnectionConstraint(new mxPoint(1,.5),!1)];ca.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];A.prototype.constraints=null;V.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)];ga.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)];X.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
-.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];U.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})();function Actions(a){this.editorUi=a;this.actions={};this.init()}
+.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;M.prototype.constraints=null;S.prototype.constraints=null;J.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,
+1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];R.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];ha.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),
+new mxConnectionConstraint(new mxPoint(1,.5),!1)];ga.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];A.prototype.constraints=null;ca.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)];V.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)];U.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
+.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];T.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})();function Actions(a){this.editorUi=a;this.actions={};this.init()}
Actions.prototype.init=function(){function a(a){d.escape();var b=d.getDeletableCells(d.getSelectionCells());if(null!=b&&0<b.length){var c=d.model.getParents(b);d.removeCells(b,a);if(null!=c){a=[];for(b=0;b<c.length;b++)d.model.contains(c[b])&&(d.model.isVertex(c[b])||d.model.isEdge(c[b]))&&a.push(c[b]);d.setSelectionCells(a)}}}var b=this.editorUi,e=b.editor,d=e.graph,k=function(){return Action.prototype.isEnabled.apply(this,arguments)&&d.isEnabled()};this.addAction("new...",function(){d.openLink(b.getUrl())});
this.addAction("open...",function(){window.openNew=!0;window.openKey="open";b.openFile()});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){b.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(a,b){try{var c=mxUtils.parseXml(a);e.graph.setSelectionCells(e.graph.importGraphModel(c.documentElement))}catch(f){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+f.message)}}));b.showDialog((new OpenDialog(this)).container,
320,220,!0,!0,function(){window.openFile=null})}).isEnabled=k;this.addAction("save",function(){b.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=k;this.addAction("saveAs...",function(){b.saveFile(!0)},null,null,Editor.ctrlKey+"+Shift+S").isEnabled=k;this.addAction("export...",function(){b.showDialog((new ExportDialog(b)).container,300,230,!0,!0)});this.addAction("editDiagram...",function(){var a=new EditDiagramDialog(b);b.showDialog(a.container,620,420,!0,!1);a.init()});this.addAction("pageSetup...",
@@ -2635,7 +2635,7 @@ d.getCellGeometry(a);g=Math.round(d.snap(d.popupMenuHandler.triggerX/f-g));f=Mat
d.getCellGeometry(c);null!=f&&(f=f.clone(),f.points=null,d.getModel().setGeometry(c,f))}}}finally{d.getModel().endUpdate()}}},null,null,"Alt+Shift+C");l=this.addAction("subscript",mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");l=this.addAction("superscript",mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");this.addAction("image...",
function(){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){var a=mxResources.get("image")+" ("+mxResources.get("url")+"):",e=d.getView().getState(d.getSelectionCell()),c="";null!=e&&(c=e.style[mxConstants.STYLE_IMAGE]||c);var f=d.cellEditor.saveSelection();b.showImageDialog(a,c,function(a,c,b){if(d.cellEditor.isContentEditing())d.cellEditor.restoreSelection(f),d.insertImage(a,c,b);else{var e=d.getSelectionCells();if(null!=a&&(0<a.length||0<e.length)){var g=null;d.getModel().beginUpdate();
try{if(0==e.length){var n=d.getFreeInsertPoint(),g=e=[d.insertVertex(d.getDefaultParent(),null,"",n.x,n.y,c,b,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];d.fireEvent(new mxEventObject("cellsInserted","cells",g))}d.setCellStyles(mxConstants.STYLE_IMAGE,0<a.length?a:null,e);var r=d.view.getState(e[0]),k=null!=r?r.style:d.getCellStyle(e[0]);"image"!=k[mxConstants.STYLE_SHAPE]&&"label"!=k[mxConstants.STYLE_SHAPE]?d.setCellStyles(mxConstants.STYLE_SHAPE,"image",
-e):0==a.length&&d.setCellStyles(mxConstants.STYLE_SHAPE,null,e);if(1==d.getSelectionCount()&&null!=c&&null!=b){var x=e[0],t=d.getModel().getGeometry(x);null!=t&&(t=t.clone(),t.width=c,t.height=b,d.getModel().setGeometry(x,t))}}finally{d.getModel().endUpdate()}null!=g&&(d.setSelectionCells(g),d.scrollCellToVisible(g[0]))}}},d.cellEditor.isContentEditing(),!d.cellEditor.isContentEditing())}}).isEnabled=k;this.addAction("insertImage...",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&
+e):0==a.length&&d.setCellStyles(mxConstants.STYLE_SHAPE,null,e);if(1==d.getSelectionCount()&&null!=c&&null!=b){var x=e[0],u=d.getModel().getGeometry(x);null!=u&&(u=u.clone(),u.width=c,u.height=b,d.getModel().setGeometry(x,u))}}finally{d.getModel().endUpdate()}null!=g&&(d.setSelectionCells(g),d.scrollCellToVisible(g[0]))}}},d.cellEditor.isContentEditing(),!d.cellEditor.isContentEditing())}}).isEnabled=k;this.addAction("insertImage...",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&
(d.clearSelection(),b.actions.get("image").funct())}).isEnabled=k;l=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(b,document.body.offsetWidth-280,120,220,180),this.layersWindow.window.addListener("show",function(){b.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.addListener("hide",function(){b.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),b.fireEvent(new mxEventObject("layers"))):
this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+L");l.setToggleAction(!0);l.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));l=this.addAction("formatPanel",mxUtils.bind(this,function(){b.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");l.setToggleAction(!0);l.setSelectedCallback(mxUtils.bind(this,function(){return 0<b.formatWidth}));l=this.addAction("outline",
mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(b,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",function(){b.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.addListener("hide",function(){b.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.setVisible(!0),b.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),null,
@@ -2646,20 +2646,21 @@ DrawioFile.prototype.shadowData=null;DrawioFile.prototype.shadowPages=null;Drawi
DrawioFile.prototype.stats={joined:0,merged:0,reload:0,checksumErrors:0,bytesSent:0,bytesReceived:0,msgSent:0,msgReceived:0,cacheHits:0,cacheMiss:0,cacheFail:0,conflicts:0,timeouts:0};DrawioFile.prototype.getSize=function(){return null!=this.data?this.data.length:0};DrawioFile.prototype.synchronizeFile=function(a,b){this.savingFile?null!=b&&b({message:mxResources.get("busy")}):null!=this.sync?this.sync.fileChanged(a,b):this.updateFile(a,b)};
DrawioFile.prototype.updateFile=function(a,b,e){this.getLatestVersion(mxUtils.bind(this,function(d){try{null!=e&&e()||(null!=d?this.mergeFile(d,a,b):this.reloadFile(a,b))}catch(k){null!=b&&b(k)}}),b)};
DrawioFile.prototype.mergeFile=function(a,b,e){try{var d=null!=this.shadowPages?this.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.shadowData).documentElement);this.checkShadow(d);this.shadowPages=this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement);this.backupPatch=this.isModified()?this.ui.diffPages(d,this.ui.pages):null;var k=[this.ui.diffPages(d,this.shadowPages)];if(!this.ignorePatches(k)){var l=this.ui.patchPages(d,k[0]),d={},p=this.ui.getHashValueForPages(l,d),q={},
-u=this.ui.getHashValueForPages(this.shadowPages,q);"1"==urlParams.test&&EditorUi.debug("File.mergeFile",[this],"backup",this.backupPatch,"patches",k,"checksum",u==p,p);if(null!=p&&p!=u){var c=this.compressReportData(this.getAnonymizedXmlForPages(l));this.checksumError(e,k,"Checksum: "+p+(null!=d?"\nDetails: "+JSON.stringify(d):"")+"\nCurrent: "+u+(null!=q?"\nCurrent Details: "+JSON.stringify(q):"")+"\nPatched:\n"+c);return}this.patch(k,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null);this.checkPages()}this.inConflictState=
+t=this.ui.getHashValueForPages(this.shadowPages,q);"1"==urlParams.test&&EditorUi.debug("File.mergeFile",[this],"backup",this.backupPatch,"patches",k,"checksum",t==p,p);if(null!=p&&p!=t){var c=this.compressReportData(this.getAnonymizedXmlForPages(l));this.checksumError(e,k,"Checksum: "+p+(null!=d?"\nDetails: "+JSON.stringify(d):"")+"\nCurrent: "+t+(null!=q?"\nCurrent Details: "+JSON.stringify(q):"")+"\nPatched:\n"+c);return}this.patch(k,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null);this.checkPages()}this.inConflictState=
this.invalidChecksum=!1;this.setDescriptor(a.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=b&&b()}catch(f){this.invalidChecksum=this.inConflictState=!0;null!=e&&e(f);try{this.sendErrorReport("Error in mergeFile",null,f)}catch(g){}}};
DrawioFile.prototype.getAnonymizedXmlForPages=function(a){var b=new mxCodec(mxUtils.createXmlDocument()),e=b.document.createElement("mxfile");if(null!=a)for(var d=0;d<a.length;d++){var k=this.ui.anonymizeNode(b.encode(new mxGraphModel(a[d].root)));k.setAttribute("id",a[d].getId());a[d].viewState&&this.ui.editor.graph.saveViewState(a[d].viewState,k,!0);e.appendChild(k)}return mxUtils.getPrettyXml(e)};
DrawioFile.prototype.checkPages=function(){this.ui.getCurrentFile()!=this||null!=this.ui.pages&&0!=this.ui.pages.length||this.sendErrorReport("Pages is null or empty","ShadowPages: "+(null!=this.shadowPages)+"\nShadowData: "+(null!=this.shadowData))};
DrawioFile.prototype.checkShadow=function(a){if(null==a||0==a.length){var b=null==this.shadowData?"null":this.compressReportData(this.ui.anonymizeString(this.shadowData),null,5E3);this.sendErrorReport("Shadow is null or empty","Shadow: "+(null!=a?a.length:"null")+"\nShadowPages: "+(null!=this.shadowPages?this.shadowPages.length:"null")+"\nShadowData: "+b)}};
DrawioFile.prototype.compressReportData=function(a,b,e){null!=a&&a.length>(null!=b?b:1E4)&&(a=this.ui.editor.graph.compress(a)+"\n");null!=e&&null!=a&&a.length>e&&(a=a.substring(0,e)+"[...]");return a};
-DrawioFile.prototype.checksumError=function(a,b,e){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=a&&a();try{if(null!=b)for(a=0;a<b.length;a++)this.ui.anonymizePatch(b[a]);var d=this.compressReportData(this.getAnonymizedXmlForPages(this.shadowPages),2E4),k=this.compressReportData(JSON.stringify(b,null,2));this.sendErrorReport("Checksum Error",(null!=e?e:"")+"\n\nPatches:\n"+k+"\n\nData:\n"+d)}catch(l){}};
-DrawioFile.prototype.sendErrorReport=function(a,b,e){try{var d=this.getCurrentUser(),k=null!=d?this.ui.hashValue(d.id):"unknown",l=null!=this.sync?this.sync.clientId:"no sync";null!=this.stats.start&&(this.stats.uptime=Math.round(((new Date).getTime()-(new Date(this.stats.start)).getTime())/1E3));var p=this.getTitle(),q=p.lastIndexOf("."),d="xml";0<q&&(d=p.substring(q));var u=null!=e?e.stack:Error().stack;EditorUi.sendReport(a+" "+(new Date).toISOString()+":\n\nBrowser="+navigator.userAgent+"\nFile="+
-this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+d+")\nUser="+k+" ("+l+")\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\nSync="+DrawioFile.SYNC+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=b?"\n\n"+b:"")+"\n\nStack:\n"+u)}catch(c){}};
+DrawioFile.prototype.checksumError=function(a,b,e,d){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=a&&a();try{if(null!=b)for(a=0;a<b.length;a++)this.ui.anonymizePatch(b[a]);var k=mxUtils.bind(this,function(a){var d=this.compressReportData(this.getAnonymizedXmlForPages(this.shadowPages),25E3),k=this.compressReportData(JSON.stringify(b,null,2));a=null!=a?this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement)),
+25E3):"n/a";this.sendErrorReport("Checksum Error",(null!=e?e:"")+"\n\nPatches:\n"+k+"\n\nLocal:\n"+d+(null!=a?"\nRemote:\n"+a:""),null,7E4)});null==d?k(null):this.getLatestVersion(mxUtils.bind(this,function(a){null!=a&&a.getCurrentEtag()==d?k(a):k(null)}),function(){})}catch(l){}};
+DrawioFile.prototype.sendErrorReport=function(a,b,e,d){try{var k=this.getCurrentUser(),l=null!=k?this.ui.hashValue(k.id):"unknown",p=null!=this.sync?this.sync.clientId:"no sync";null!=this.stats.start&&(this.stats.uptime=Math.round(((new Date).getTime()-(new Date(this.stats.start)).getTime())/1E3));var q=this.getTitle(),t=q.lastIndexOf("."),k="xml";0<t&&(k=q.substring(t));var c=null!=e?e.stack:Error().stack;EditorUi.sendReport(a+" "+(new Date).toISOString()+":\n\nBrowser="+navigator.userAgent+"\nFile="+
+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+k+")\nUser="+l+" ("+p+")\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\nSync="+DrawioFile.SYNC+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=b?"\n\n"+b:"")+"\n\nStack:\n"+c,d)}catch(f){}};
DrawioFile.prototype.reloadFile=function(a,b){try{this.ui.spinner.stop();var e=mxUtils.bind(this,function(){this.stats.reload++;this.reportEnabled=!1;var b=this.ui.editor.graph.getViewState(),e=this.ui.editor.graph.getSelectionCells(),l=this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(l,b,e);null!=this.backupPatch&&this.patch([this.backupPatch]);var d=this.ui.getCurrentFile();null!=d&&(d.stats=this.stats);
null!=a&&a()}}),!0)});this.isModified()&&null==this.backupPatch?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.handleFileSuccess("manual"==DrawioFile.SYNC)}),e,mxResources.get("cancel"),mxResources.get("discardChanges")):e()}catch(d){null!=b&&b(d)}};DrawioFile.prototype.copyFile=function(a,b){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};
DrawioFile.prototype.ignorePatches=function(a){for(var b=!0,e=0;e<a.length&&b;e++)b=b&&0==Object.keys(a[e]).length;return b};
-DrawioFile.prototype.patch=function(a,b){var e=this.ui.editor.undoManager,d=e.history.slice(),k=e.indexOfNextAdd,l=this.ui.editor.graph;l.container.style.visibility="hidden";var p=this.changeListenerEnabled;this.changeListenerEnabled=!1;var q=l.foldingEnabled,u=l.mathEnabled,c=l.cellRenderer.redraw;l.cellRenderer.redraw=function(a){a.view.graph.isEditing(a.cell)&&(a.view.graph.scrollCellToVisible(a.cell),a.view.graph.cellEditor.resize());c.apply(this,arguments)};l.model.beginUpdate();try{for(var f=
-0;f<a.length;f++)this.ui.pages=this.ui.patchPages(this.ui.pages,a[f],!0,b,this.isModified());0==this.ui.pages.length&&this.ui.pages.push(this.ui.createPage());0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{l.model.endUpdate();l.container.style.visibility="";l.cellRenderer.redraw=c;this.changeListenerEnabled=p;e.history=d;e.indexOfNextAdd=k;e.fireEvent(new mxEventObject(mxEvent.CLEAR));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)u!=
+DrawioFile.prototype.patch=function(a,b){var e=this.ui.editor.undoManager,d=e.history.slice(),k=e.indexOfNextAdd,l=this.ui.editor.graph;l.container.style.visibility="hidden";var p=this.changeListenerEnabled;this.changeListenerEnabled=!1;var q=l.foldingEnabled,t=l.mathEnabled,c=l.cellRenderer.redraw;l.cellRenderer.redraw=function(a){a.view.graph.isEditing(a.cell)&&(a.view.graph.scrollCellToVisible(a.cell),a.view.graph.cellEditor.resize());c.apply(this,arguments)};l.model.beginUpdate();try{for(var f=
+0;f<a.length;f++)this.ui.pages=this.ui.patchPages(this.ui.pages,a[f],!0,b,this.isModified());0==this.ui.pages.length&&this.ui.pages.push(this.ui.createPage());0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{l.model.endUpdate();l.container.style.visibility="";l.cellRenderer.redraw=c;this.changeListenerEnabled=p;e.history=d;e.indexOfNextAdd=k;e.fireEvent(new mxEventObject(mxEvent.CLEAR));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)t!=
l.mathEnabled?(this.ui.editor.updateGraphComponents(),l.refresh()):(q!=l.foldingEnabled?l.view.revalidate():l.view.validate(),l.sizeDidChange()),null!=this.ui.format&&l.isSelectionEmpty()&&this.ui.format.refresh();this.ui.updateTabContainer()}};
DrawioFile.prototype.save=function(a,b,e,d,k,l){if(this.isEditable())if(!k&&this.invalidChecksum)if(null!=e)e({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave();else if(null!=e)e({message:mxResources.get("readOnly")});else throw Error(mxResources.get("readOnly"));};DrawioFile.prototype.updateFileData=function(){this.setData(this.ui.getFileData(null,null,null,null,null,null,null,null,this))};
DrawioFile.prototype.saveAs=function(a,b,e){};DrawioFile.prototype.saveFile=function(a,b,e,d){};DrawioFile.prototype.getPublicUrl=function(a){a(null)};DrawioFile.prototype.isRestricted=function(){return!1};DrawioFile.prototype.isModified=function(){return this.modified};DrawioFile.prototype.setModified=function(a){this.modified=a};DrawioFile.prototype.isAutosaveOptional=function(){return!1};DrawioFile.prototype.isAutosave=function(){return!this.inConflictState&&this.ui.editor.autosave};
@@ -2731,7 +2732,7 @@ c.getElementsByTagName("parsererror");if(null!=b&&0<b.length){var b=b[0],d=b.get
else if(d=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement(),null!=d){var f=new mxCodec(d.ownerDocument);f.decode(d,this.graph.getStylesheet())}this.graph.currentStyle=b;this.graph.mathEnabled="1"==urlParams.math||"1"==c.getAttribute("math");b=c.getAttribute("backgroundImage");null!=b?(b=JSON.parse(b),this.graph.setBackgroundImage(new mxImage(b.src,b.width,b.height))):this.graph.setBackgroundImage(null);mxClient.NO_FO=this.graph.mathEnabled&&
!this.useForeignObjectForMath?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==c.getAttribute("shadow"),!1)}a.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var b=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(a){a=null!=a?a:!0;var c=b.apply(this,
arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&c.setAttribute("style",this.graph.currentStyle);null!=this.graph.backgroundImage&&c.setAttribute("backgroundImage",JSON.stringify(this.graph.backgroundImage));c.setAttribute("math",this.graph.mathEnabled?"1":"0");c.setAttribute("shadow",this.graph.shadowVisible?"1":"0");return c};Editor.prototype.isDataSvg=function(a){try{var c=mxUtils.parseXml(a).documentElement.getAttribute("content");if(null!=c&&(null!=c&&"<"!=
-c.charAt(0)&&"%"!=c.charAt(0)&&(c=unescape(window.atob?atob(c):Base64.decode(cont,c))),null!=c&&"%"==c.charAt(0)&&(c=decodeURIComponent(c)),null!=c&&0<c.length)){var b=mxUtils.parseXml(c).documentElement;return"mxfile"==b.nodeName||"mxGraphModel"==b.nodeName}}catch(B){}return!1};Editor.prototype.extractGraphModel=function(a,c){if(null!=a&&"undefined"!==typeof pako){var b=a.ownerDocument.getElementsByTagName("div"),d=[];if(null!=b&&0<b.length)for(var f=0;f<b.length;f++)if("mxgraph"==b[f].getAttribute("class")){d.push(b[f]);
+c.charAt(0)&&"%"!=c.charAt(0)&&(c=unescape(window.atob?atob(c):Base64.decode(cont,c))),null!=c&&"%"==c.charAt(0)&&(c=decodeURIComponent(c)),null!=c&&0<c.length)){var b=mxUtils.parseXml(c).documentElement;return"mxfile"==b.nodeName||"mxGraphModel"==b.nodeName}}catch(C){}return!1};Editor.prototype.extractGraphModel=function(a,c){if(null!=a&&"undefined"!==typeof pako){var b=a.ownerDocument.getElementsByTagName("div"),d=[];if(null!=b&&0<b.length)for(var f=0;f<b.length;f++)if("mxgraph"==b[f].getAttribute("class")){d.push(b[f]);
break}0<d.length&&(b=d[0].getAttribute("data-mxgraph"),null!=b?(d=JSON.parse(b),null!=d&&null!=d.xml&&(d=mxUtils.parseXml(d.xml),a=d.documentElement)):(d=d[0].getElementsByTagName("div"),0<d.length&&(b=mxUtils.getTextContent(d[0]),b=this.graph.decompress(b),0<b.length&&(d=mxUtils.parseXml(b),a=d.documentElement))))}if(null!=a&&"svg"==a.nodeName)if(b=a.getAttribute("content"),null!=b&&"<"!=b.charAt(0)&&"%"!=b.charAt(0)&&(b=unescape(window.atob?atob(b):Base64.decode(cont,b))),null!=b&&"%"==b.charAt(0)&&
(b=decodeURIComponent(b)),null!=b&&0<b.length)a=mxUtils.parseXml(b).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==a||c||(d=null,"diagram"==a.nodeName?d=a:"mxfile"==a.nodeName&&(b=a.getElementsByTagName("diagram"),0<b.length&&(d=b[Math.max(0,Math.min(b.length-1,urlParams.page||0))])),null!=d&&(b=this.graph.decompress(mxUtils.getTextContent(d)),null!=b&&0<b.length&&(a=mxUtils.parseXml(b).documentElement)));null==a||"mxGraphModel"==a.nodeName||c&&"mxfile"==a.nodeName||
(a=null);return a};var e=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=null;this.graph.view.y0=null;mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();e.apply(this,arguments)};var d=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=
@@ -2741,8 +2742,8 @@ MathJax.Hub.Register.StartupHook("Begin",function(){for(var a=0;a<Editor.mathJax
c){null!=this.graph.container&&this.graph.mathEnabled&&Editor.MathJaxRender(this.graph.container)}))};var d=document.getElementsByTagName("script");if(null!=d&&0<d.length){var f=document.createElement("script");f.type="text/javascript";f.src=a;d[0].parentNode.appendChild(f)}};Editor.prototype.csvToArray=function(a){if(!/^\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*(?:,\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*)*$/.test(a))return null;
var c=[];a.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\[\S\s][^"\\]*)*)"|([^,'"\s\\]*(?:\s+[^,'"\s\\]+)*))\s*(?:,|$)/g,function(a,b,d,f){void 0!==b?c.push(b.replace(/\\'/g,"'")):void 0!==d?c.push(d.replace(/\\"/g,'"')):void 0!==f&&c.push(f);return""});/,\s*$/.test(a)&&c.push("");return c};if(window.ColorDialog){var k=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(a,c){k.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};
var l=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){l.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(a,c){var b=null;null!=a.editor.graph.getModel().getParent(c)?b=c.getId():null!=a.currentPage&&(b=a.currentPage.getId());return b});if(null!=window.StyleFormatPanel){var p=Format.prototype.init;Format.prototype.init=function(){p.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",
-this.update)};var q=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?q.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var a=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=a&&a.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(a){return!1};var u=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=
-function(a){a=u.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var c=this.editorUi,b=c.editor.graph,d=this.createOption(mxResources.get("shadow"),function(){return b.shadowVisible},function(a){var d=new ChangePageSetup(c);d.ignoreColor=!0;d.ignoreImage=!0;d.shadowVisible=a;b.model.execute(d)},{install:function(a){this.listener=function(){a(b.shadowVisible)};c.addListener("shadowVisibleChanged",this.listener)},destroy:function(){c.removeListener(this.listener)}});
+this.update)};var q=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?q.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var a=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=a&&a.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(a){return!1};var t=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=
+function(a){a=t.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var c=this.editorUi,b=c.editor.graph,d=this.createOption(mxResources.get("shadow"),function(){return b.shadowVisible},function(a){var d=new ChangePageSetup(c);d.ignoreColor=!0;d.ignoreImage=!0;d.shadowVisible=a;b.model.execute(d)},{install:function(a){this.listener=function(){a(b.shadowVisible)};c.addListener("shadowVisibleChanged",this.listener)},destroy:function(){c.removeListener(this.listener)}});
Editor.shadowOptionEnabled||(d.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(d,60));a.appendChild(d)}return a};var c=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(a){a=c.apply(this,arguments);var b=this.editorUi,d=b.editor.graph;if(d.isEnabled()){var f=b.getCurrentFile();null!=f&&f.isAutosaveOptional()&&(f=this.createOption(mxResources.get("autosave"),function(){return b.editor.autosave},function(a){b.editor.setAutosave(a)},
{install:function(a){this.listener=function(){a(b.editor.autosave)};b.editor.addListener("autosaveChanged",this.listener)},destroy:function(){b.editor.removeListener(this.listener)}}),a.appendChild(f))}if(this.isMathOptionVisible()&&d.isEnabled()&&"undefined"!==typeof MathJax){f=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return d.mathEnabled},function(a){b.actions.get("mathematicalTypesetting").funct()},{install:function(a){this.listener=function(){a(d.mathEnabled)};b.addListener("mathEnabledChanged",
this.listener)},destroy:function(){b.removeListener(this.listener)}});f.style.paddingTop="5px";a.appendChild(f);var e=b.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000032875");e.style.position="relative";e.style.marginLeft="6px";e.style.top="2px";f.appendChild(e)}return a};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"absoluteArcSize",dispName:"Abs. Arc Size",
@@ -2767,23 +2768,23 @@ type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.offPageConnector.pro
stroke:"#b46504"},{fill:"#fad9d5",stroke:"#ae4132"},{fill:"#b0e3e6",stroke:"#0e8088"},{fill:"#b1ddf0",stroke:"#10739e"},{fill:"#d0cee2",stroke:"#56517e"},{fill:"#bac8d3",stroke:"#23445d"}],[null,{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"}],[null,{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(a,c,b){if(null!=c){var d=function(a){if(null!=a)if(b)for(var d=0;d<a.length;d++)c[a[d].name]=
a[d];else for(var f in c){for(var e=!1,d=0;d<a.length;d++)if(a[d].name==f&&a[d].type==c[f].type){e=!0;break}e||delete c[f]}},f=this.editorUi.editor.graph.view.getState(a);null!=f&&null!=f.shape&&(f.shape.commonCustomPropAdded||(f.shape.commonCustomPropAdded=!0,f.shape.customProperties=f.shape.customProperties||[],f.cell.vertex?Array.prototype.push.apply(f.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(f.shape.customProperties,Editor.commonEdgeProperties)),d(f.shape.customProperties));
-a=a.getAttribute("customProperties");if(null!=a)try{d(JSON.parse(a))}catch(C){}}};var f=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var a=this.format.createSelectionState();"image"!=a.style.shape&&this.container.appendChild(this.addStyles(this.createPanel()));f.apply(this,arguments);if(Editor.enableCustomProperties){for(var c={},b=a.vertices,d=a.edges,e=0;e<b.length;e++)this.findCommonProperties(b[e],c,0==e);for(e=0;e<d.length;e++)this.findCommonProperties(d[e],c,0==
+a=a.getAttribute("customProperties");if(null!=a)try{d(JSON.parse(a))}catch(D){}}};var f=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var a=this.format.createSelectionState();"image"!=a.style.shape&&this.container.appendChild(this.addStyles(this.createPanel()));f.apply(this,arguments);if(Editor.enableCustomProperties){for(var c={},b=a.vertices,d=a.edges,e=0;e<b.length;e++)this.findCommonProperties(b[e],c,0==e);for(e=0;e<d.length;e++)this.findCommonProperties(d[e],c,0==
b.length&&0==e);0<Object.getOwnPropertyNames(c).length&&this.container.appendChild(this.addProperties(this.createPanel(),c,a))}};var g=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(a){var c=mxUtils.button(mxResources.get("copyStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("copyStyle").funct()}));c.setAttribute("title",mxResources.get("copyStyle")+" ("+this.editorUi.actions.get("copyStyle").shortcut+")");c.style.marginBottom="2px";c.style.width=
"100px";c.style.marginRight="2px";a.appendChild(c);c=mxUtils.button(mxResources.get("pasteStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("pasteStyle").funct()}));c.setAttribute("title",mxResources.get("pasteStyle")+" ("+this.editorUi.actions.get("pasteStyle").shortcut+")");c.style.marginBottom="2px";c.style.width="100px";a.appendChild(c);mxUtils.br(a);return g.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=function(a,c,b){function d(a,
-c,b,d){v.getModel().beginUpdate();try{var f=[],e=[];if(null!=b.index){for(var g=[],h=b.parentRow.nextSibling;h&&h.getAttribute("data-pName")==a;)g.push(h.getAttribute("data-pValue")),h=h.nextSibling;b.index<g.length?null!=d?g.splice(d,1):g[b.index]=c:g.push(c);null!=b.size&&g.length>b.size&&(g=g.slice(0,b.size));c=g.join(",");null!=b.countProperty&&(v.setCellStyles(b.countProperty,g.length,v.getSelectionCells()),f.push(b.countProperty),e.push(g.length))}v.setCellStyles(a,c,v.getSelectionCells());
-f.push(a);e.push(c);if(null!=b.dependentProps)for(a=0;a<b.dependentProps.length;a++){var n=b.dependentPropsDefVal[a],m=b.dependentPropsVals[a];if(m.length>c)m=m.slice(0,c);else for(var t=m.length;t<c;t++)m.push(n);m=m.join(",");v.setCellStyles(b.dependentProps[a],m,v.getSelectionCells());f.push(b.dependentProps[a]);e.push(m)}r.editorUi.fireEvent(new mxEventObject("styleChanged","keys",f,"values",e,"cells",v.getSelectionCells()))}finally{v.getModel().endUpdate()}}function f(c,b,d){var f=mxUtils.getOffset(a,
+c,b,d){k.getModel().beginUpdate();try{var f=[],e=[];if(null!=b.index){for(var g=[],h=b.parentRow.nextSibling;h&&h.getAttribute("data-pName")==a;)g.push(h.getAttribute("data-pValue")),h=h.nextSibling;b.index<g.length?null!=d?g.splice(d,1):g[b.index]=c:g.push(c);null!=b.size&&g.length>b.size&&(g=g.slice(0,b.size));c=g.join(",");null!=b.countProperty&&(k.setCellStyles(b.countProperty,g.length,k.getSelectionCells()),f.push(b.countProperty),e.push(g.length))}k.setCellStyles(a,c,k.getSelectionCells());
+f.push(a);e.push(c);if(null!=b.dependentProps)for(a=0;a<b.dependentProps.length;a++){var n=b.dependentPropsDefVal[a],m=b.dependentPropsVals[a];if(m.length>c)m=m.slice(0,c);else for(var u=m.length;u<c;u++)m.push(n);m=m.join(",");k.setCellStyles(b.dependentProps[a],m,k.getSelectionCells());f.push(b.dependentProps[a]);e.push(m)}r.editorUi.fireEvent(new mxEventObject("styleChanged","keys",f,"values",e,"cells",k.getSelectionCells()))}finally{k.getModel().endUpdate()}}function f(c,b,d){var f=mxUtils.getOffset(a,
!0),e=mxUtils.getOffset(c,!0);b.style.position="absolute";b.style.left=e.x-f.x+"px";b.style.top=e.y-f.y+"px";b.style.width=c.offsetWidth+"px";b.style.height=c.offsetHeight-(d?4:0)+"px";b.style.zIndex=5}function e(a,c,b){var f=document.createElement("div");f.style.width="32px";f.style.height="4px";f.style.margin="2px";f.style.border="1px solid black";f.style.background=c&&"none"!=c?c:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(r,function(e){this.editorUi.pickColor(c,
-function(c){f.style.background="none"==c?"url('"+Dialog.prototype.noColorImage+"')":c;d(a,c,b)});mxEvent.consume(e)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(f);return btn}function g(a,c,b,f,e,g,h){null!=c&&(c=c.split(","),t.push({name:a,values:c,type:b,defVal:f,countProperty:e,parentRow:g,isDeletable:!0,flipBkg:h}));btn=mxUtils.button("+",mxUtils.bind(r,function(c){for(var n=g,r=0;null!=n.nextSibling;)if(n.nextSibling.getAttribute("data-pName")==
-a)n=n.nextSibling,r++;else break;var v={type:b,parentRow:g,index:r,isDeletable:!0,defVal:f,countProperty:e},r=m(a,"",v,0==r%2,h);d(a,f,v);n.parentNode.insertBefore(r,n.nextSibling);mxEvent.consume(c)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function h(a,c,b,d,f,e,g){if(0<f){var h=Array(f);c=null!=c?c.split(","):[];for(var n=0;n<f;n++)h[n]=null!=c[n]?c[n]:null!=d?d:"";t.push({name:a,values:h,type:b,defVal:d,parentRow:e,flipBkg:g,size:f})}return document.createElement("div")}
-function n(a,c,b){var f=document.createElement("input");f.type="checkbox";f.checked="1"==c;mxEvent.addListener(f,"change",function(){d(a,f.checked?"1":"0",b)});return f}function m(c,b,m,v,t){var k=m.dispName,w=m.type,x=document.createElement("tr");x.className="gePropRow"+(t?"Dark":"")+(v?"Alt":"")+" gePropNonHeaderRow";x.setAttribute("data-pName",c);x.setAttribute("data-pValue",b);v=!1;null!=m.index&&(x.setAttribute("data-index",m.index),k=(null!=k?k:"")+"["+m.index+"]",v=!0);var l=document.createElement("td");
-l.className="gePropRowCell";l.innerHTML=mxUtils.htmlEntities(mxResources.get(k,null,k));v&&(l.style.textAlign="right");x.appendChild(l);l=document.createElement("td");l.className="gePropRowCell";if("color"==w)l.appendChild(e(c,b,m));else if("bool"==w||"boolean"==w)l.appendChild(n(c,b,m));else if("enum"==w){var y=m.enumList;for(t=0;t<y.length;t++)if(k=y[t],k.val==b){l.innerHTML=mxUtils.htmlEntities(mxResources.get(k.dispName,null,k.dispName));break}mxEvent.addListener(l,"click",mxUtils.bind(r,function(){var e=
+function(c){f.style.background="none"==c?"url('"+Dialog.prototype.noColorImage+"')":c;d(a,c,b)});mxEvent.consume(e)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(f);return btn}function g(a,c,b,f,e,g,h){null!=c&&(c=c.split(","),u.push({name:a,values:c,type:b,defVal:f,countProperty:e,parentRow:g,isDeletable:!0,flipBkg:h}));btn=mxUtils.button("+",mxUtils.bind(r,function(c){for(var n=g,r=0;null!=n.nextSibling;)if(n.nextSibling.getAttribute("data-pName")==
+a)n=n.nextSibling,r++;else break;var k={type:b,parentRow:g,index:r,isDeletable:!0,defVal:f,countProperty:e},r=m(a,"",k,0==r%2,h);d(a,f,k);n.parentNode.insertBefore(r,n.nextSibling);mxEvent.consume(c)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function h(a,c,b,d,f,e,g){if(0<f){var h=Array(f);c=null!=c?c.split(","):[];for(var n=0;n<f;n++)h[n]=null!=c[n]?c[n]:null!=d?d:"";u.push({name:a,values:h,type:b,defVal:d,parentRow:e,flipBkg:g,size:f})}return document.createElement("div")}
+function n(a,c,b){var f=document.createElement("input");f.type="checkbox";f.checked="1"==c;mxEvent.addListener(f,"change",function(){d(a,f.checked?"1":"0",b)});return f}function m(c,b,m,k,u){var v=m.dispName,w=m.type,x=document.createElement("tr");x.className="gePropRow"+(u?"Dark":"")+(k?"Alt":"")+" gePropNonHeaderRow";x.setAttribute("data-pName",c);x.setAttribute("data-pValue",b);k=!1;null!=m.index&&(x.setAttribute("data-index",m.index),v=(null!=v?v:"")+"["+m.index+"]",k=!0);var l=document.createElement("td");
+l.className="gePropRowCell";l.innerHTML=mxUtils.htmlEntities(mxResources.get(v,null,v));k&&(l.style.textAlign="right");x.appendChild(l);l=document.createElement("td");l.className="gePropRowCell";if("color"==w)l.appendChild(e(c,b,m));else if("bool"==w||"boolean"==w)l.appendChild(n(c,b,m));else if("enum"==w){var y=m.enumList;for(u=0;u<y.length;u++)if(v=y[u],v.val==b){l.innerHTML=mxUtils.htmlEntities(mxResources.get(v.dispName,null,v.dispName));break}mxEvent.addListener(l,"click",mxUtils.bind(r,function(){var e=
document.createElement("select");f(l,e);for(var g=0;g<y.length;g++){var h=y[g],n=document.createElement("option");n.value=mxUtils.htmlEntities(h.val);n.innerHTML=mxUtils.htmlEntities(mxResources.get(h.dispName,null,h.dispName));e.appendChild(n)}e.value=b;a.appendChild(e);mxEvent.addListener(e,"change",function(){var a=mxUtils.htmlEntities(e.value);d(c,a,m)});e.focus();mxEvent.addListener(e,"blur",function(){a.removeChild(e)})}))}else"dynamicArr"==w?l.appendChild(g(c,b,m.subType,m.subDefVal,m.countProperty,
-x,t)):"staticArr"==w?l.appendChild(h(c,b,m.subType,m.subDefVal,m.size,x,t)):(l.innerHTML=b,mxEvent.addListener(l,"click",mxUtils.bind(r,function(){function e(){var a=g.value,a=0==a.length&&"string"!=w?0:a;m.allowAuto&&("auto"==a.trim().toLowerCase()?(a="auto",w="string"):(a=parseFloat(a),a=isNaN(a)?0:a));null!=m.min&&a<m.min?a=m.min:null!=m.max&&a>m.max&&(a=m.max);a=mxUtils.htmlEntities(("int"==w?parseInt(a):a)+"");d(c,a,m)}var g=document.createElement("input");f(l,g,!0);g.value=b;g.className="gePropEditor";
-"int"!=w&&"float"!=w||m.allowAuto||(g.type="number",g.step="int"==w?"1":"any",null!=m.min&&(g.min=parseFloat(m.min)),null!=m.max&&(g.max=parseFloat(m.max)));a.appendChild(g);mxEvent.addListener(g,"keypress",function(a){13==a.keyCode&&e()});g.focus();mxEvent.addListener(g,"blur",function(){e()})})));m.isDeletable&&(t=mxUtils.button("-",mxUtils.bind(r,function(a){d(c,"",m,m.index);mxEvent.consume(a)})),t.style.height="16px",t.style.width="25px",t.style["float"]="right",t.className="geColorBtn",l.appendChild(t));
-x.appendChild(l);return x}var r=this,v=this.editorUi.editor.graph,t=[];a.style.position="relative";a.style.padding="0";var k=document.createElement("table");k.style.whiteSpace="nowrap";k.style.width="100%";var w=document.createElement("tr");w.className="gePropHeader";var x=document.createElement("th");x.className="gePropHeaderCell";var l=document.createElement("img");l.src=Sidebar.prototype.expandedImage;x.appendChild(l);mxUtils.write(x,mxResources.get("property"));w.style.cursor="pointer";var z=
-function(){var c=k.querySelectorAll(".gePropNonHeaderRow"),b;if(r.editorUi.propertiesCollapsed){l.src=Sidebar.prototype.collapsedImage;b="none";for(var d=a.childNodes.length-1;0<=d;d--)try{var f=a.childNodes[d],e=f.nodeName.toUpperCase();"INPUT"!=e&&"SELECT"!=e||a.removeChild(f)}catch(aa){}}else l.src=Sidebar.prototype.expandedImage,b="";for(d=0;d<c.length;d++)c[d].style.display=b};mxEvent.addListener(w,"click",function(){r.editorUi.propertiesCollapsed=!r.editorUi.propertiesCollapsed;z()});w.appendChild(x);
-x=document.createElement("th");x.className="gePropHeaderCell";x.innerHTML=mxResources.get("value");w.appendChild(x);k.appendChild(w);var p=!1,D=!1,q;for(q in c)if(w=c[q],"function"!=typeof w.isVisible||w.isVisible(b)){var u=null!=b.style[q]?mxUtils.htmlEntities(b.style[q]+""):w.defVal;if("separator"==w.type)D=!D;else{if("staticArr"==w.type)w.size=parseInt(b.style[w.sizeProperty]||c[w.sizeProperty].defVal)||0;else if(null!=w.dependentProps){for(var S=w.dependentProps,L=[],M=[],x=0;x<S.length;x++){var T=
-b.style[S[x]];M.push(c[S[x]].subDefVal);L.push(null!=T?T.split(","):[])}w.dependentPropsDefVal=M;w.dependentPropsVals=L}k.appendChild(m(q,u,w,p,D));p=!p}}for(x=0;x<t.length;x++)for(w=t[x],c=w.parentRow,b=0;b<w.values.length;b++)q=m(w.name,w.values[b],{type:w.type,parentRow:w.parentRow,isDeletable:w.isDeletable,index:b,defVal:w.defVal,countProperty:w.countProperty,size:w.size},0==b%2,w.flipBkg),c.parentNode.insertBefore(q,c.nextSibling),c=q;a.appendChild(k);z();return a};StyleFormatPanel.prototype.addStyles=
+x,u)):"staticArr"==w?l.appendChild(h(c,b,m.subType,m.subDefVal,m.size,x,u)):(l.innerHTML=b,mxEvent.addListener(l,"click",mxUtils.bind(r,function(){function e(){var a=g.value,a=0==a.length&&"string"!=w?0:a;m.allowAuto&&("auto"==a.trim().toLowerCase()?(a="auto",w="string"):(a=parseFloat(a),a=isNaN(a)?0:a));null!=m.min&&a<m.min?a=m.min:null!=m.max&&a>m.max&&(a=m.max);a=mxUtils.htmlEntities(("int"==w?parseInt(a):a)+"");d(c,a,m)}var g=document.createElement("input");f(l,g,!0);g.value=b;g.className="gePropEditor";
+"int"!=w&&"float"!=w||m.allowAuto||(g.type="number",g.step="int"==w?"1":"any",null!=m.min&&(g.min=parseFloat(m.min)),null!=m.max&&(g.max=parseFloat(m.max)));a.appendChild(g);mxEvent.addListener(g,"keypress",function(a){13==a.keyCode&&e()});g.focus();mxEvent.addListener(g,"blur",function(){e()})})));m.isDeletable&&(u=mxUtils.button("-",mxUtils.bind(r,function(a){d(c,"",m,m.index);mxEvent.consume(a)})),u.style.height="16px",u.style.width="25px",u.style["float"]="right",u.className="geColorBtn",l.appendChild(u));
+x.appendChild(l);return x}var r=this,k=this.editorUi.editor.graph,u=[];a.style.position="relative";a.style.padding="0";var v=document.createElement("table");v.style.whiteSpace="nowrap";v.style.width="100%";var w=document.createElement("tr");w.className="gePropHeader";var x=document.createElement("th");x.className="gePropHeaderCell";var l=document.createElement("img");l.src=Sidebar.prototype.expandedImage;x.appendChild(l);mxUtils.write(x,mxResources.get("property"));w.style.cursor="pointer";var z=
+function(){var c=v.querySelectorAll(".gePropNonHeaderRow"),b;if(r.editorUi.propertiesCollapsed){l.src=Sidebar.prototype.collapsedImage;b="none";for(var d=a.childNodes.length-1;0<=d;d--)try{var f=a.childNodes[d],e=f.nodeName.toUpperCase();"INPUT"!=e&&"SELECT"!=e||a.removeChild(f)}catch(aa){}}else l.src=Sidebar.prototype.expandedImage,b="";for(d=0;d<c.length;d++)c[d].style.display=b};mxEvent.addListener(w,"click",function(){r.editorUi.propertiesCollapsed=!r.editorUi.propertiesCollapsed;z()});w.appendChild(x);
+x=document.createElement("th");x.className="gePropHeaderCell";x.innerHTML=mxResources.get("value");w.appendChild(x);v.appendChild(w);var p=!1,E=!1,q;for(q in c)if(w=c[q],"function"!=typeof w.isVisible||w.isVisible(b)){var t=null!=b.style[q]?mxUtils.htmlEntities(b.style[q]+""):w.defVal;if("separator"==w.type)E=!E;else{if("staticArr"==w.type)w.size=parseInt(b.style[w.sizeProperty]||c[w.sizeProperty].defVal)||0;else if(null!=w.dependentProps){for(var S=w.dependentProps,J=[],M=[],x=0;x<S.length;x++){var R=
+b.style[S[x]];M.push(c[S[x]].subDefVal);J.push(null!=R?R.split(","):[])}w.dependentPropsDefVal=M;w.dependentPropsVals=J}v.appendChild(m(q,t,w,p,E));p=!p}}for(x=0;x<u.length;x++)for(w=u[x],c=w.parentRow,b=0;b<w.values.length;b++)q=m(w.name,w.values[b],{type:w.type,parentRow:w.parentRow,isDeletable:w.isDeletable,index:b,defVal:w.defVal,countProperty:w.countProperty,size:w.size},0==b%2,w.flipBkg),c.parentNode.insertBefore(q,c.nextSibling),c=q;a.appendChild(v);z();return a};StyleFormatPanel.prototype.addStyles=
function(a){function c(a){function c(a){var c=mxUtils.button("",function(c){d.getModel().beginUpdate();try{var b=d.getSelectionCells();for(c=0;c<b.length;c++){for(var f=d.getModel().getStyle(b[c]),g=0;g<e.length;g++)f=mxUtils.removeStylename(f,e[g]);var h=d.getModel().isVertex(b[c])?d.defaultVertexStyle:d.defaultEdgeStyle;null!=a?(f=mxUtils.setStyle(f,mxConstants.STYLE_FILLCOLOR,a.fill||mxUtils.getValue(h,mxConstants.STYLE_FILLCOLOR,null)),f=mxUtils.setStyle(f,mxConstants.STYLE_STROKECOLOR,a.stroke||
mxUtils.getValue(h,mxConstants.STYLE_STROKECOLOR,null)),f=mxUtils.setStyle(f,mxConstants.STYLE_GRADIENTCOLOR,a.gradient||mxUtils.getValue(h,mxConstants.STYLE_GRADIENTCOLOR,null)),d.getModel().isVertex(b[c])&&(f=mxUtils.setStyle(f,mxConstants.STYLE_FONTCOLOR,a.font||mxUtils.getValue(h,mxConstants.STYLE_FONTCOLOR,null)))):(f=mxUtils.setStyle(f,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(h,mxConstants.STYLE_FILLCOLOR,"#ffffff")),f=mxUtils.setStyle(f,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(h,
mxConstants.STYLE_STROKECOLOR,"#000000")),f=mxUtils.setStyle(f,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(h,mxConstants.STYLE_GRADIENTCOLOR,null)),d.getModel().isVertex(b[c])&&(f=mxUtils.setStyle(f,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(h,mxConstants.STYLE_FONTCOLOR,null))));d.getModel().setStyle(b[c],f)}}finally{d.getModel().endUpdate()}});c.className="geStyleButton";c.style.width="36px";c.style.height="30px";c.style.margin="0px 6px 6px 0px";if(null!=a)null!=a.gradient?mxClient.IS_IE&&
@@ -2822,27 +2823,27 @@ mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegist
STENCIL_PATH+"/gcp2.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.veeam=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam.xml"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=
[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(a){var c=null;null!=a&&0<a.length&&("ER"==a.substring(0,2)?c="mxgraph.er":"sysML"==a.substring(0,5)&&(c="mxgraph.sysml"));return c};var v=mxMarker.createMarker;mxMarker.createMarker=function(a,c,b,d,f,e,g,h,n,m){if(null!=b&&null==mxMarker.markers[b]){var r=this.getPackageForType(b);null!=r&&mxStencilRegistry.getStencil(r)}return v.apply(this,arguments)};
-PrintDialog.prototype.create=function(a,c){function b(){w.value=Math.max(1,Math.min(h,Math.max(parseInt(w.value),parseInt(k.value))));k.value=Math.max(1,Math.min(h,Math.min(parseInt(w.value),parseInt(k.value))))}function d(c){function b(c,b,f){var e=c.getGraphBounds(),g=0,h=0,n=ga.get(),m=1/c.pageScale,r=x.checked;if(r)var m=parseInt(R.value),v=parseInt(V.value),m=Math.min(n.height*v/(e.height/c.view.scale),n.width*m/(e.width/c.view.scale));else m=parseInt(p.value)/(100*c.pageScale),isNaN(m)&&(d=
-1/c.pageScale,p.value="100 %");n=mxRectangle.fromRectangle(n);n.width=Math.ceil(n.width*d);n.height=Math.ceil(n.height*d);m*=d;!r&&c.pageVisible?(e=c.getPageLayout(),g-=e.x*n.width,h-=e.y*n.height):r=!0;if(null==b){b=PrintDialog.createPrintPreview(c,m,n,0,g,h,r);b.pageSelector=!1;b.mathEnabled=!1;c=a.getCurrentFile();null!=c&&(b.title=c.getTitle());var k=b.writeHead;b.writeHead=function(c){k.apply(this,arguments);null!=a.editor.fontCss&&(c.writeln('<style type="text/css">'),c.writeln(a.editor.fontCss),
+PrintDialog.prototype.create=function(a,c){function b(){w.value=Math.max(1,Math.min(h,Math.max(parseInt(w.value),parseInt(v.value))));v.value=Math.max(1,Math.min(h,Math.min(parseInt(w.value),parseInt(v.value))))}function d(c){function b(c,b,f){var e=c.getGraphBounds(),g=0,h=0,n=V.get(),m=1/c.pageScale,r=x.checked;if(r)var m=parseInt(B.value),k=parseInt(ca.value),m=Math.min(n.height*k/(e.height/c.view.scale),n.width*m/(e.width/c.view.scale));else m=parseInt(p.value)/(100*c.pageScale),isNaN(m)&&(d=
+1/c.pageScale,p.value="100 %");n=mxRectangle.fromRectangle(n);n.width=Math.ceil(n.width*d);n.height=Math.ceil(n.height*d);m*=d;!r&&c.pageVisible?(e=c.getPageLayout(),g-=e.x*n.width,h-=e.y*n.height):r=!0;if(null==b){b=PrintDialog.createPrintPreview(c,m,n,0,g,h,r);b.pageSelector=!1;b.mathEnabled=!1;c=a.getCurrentFile();null!=c&&(b.title=c.getTitle());var v=b.writeHead;b.writeHead=function(c){v.apply(this,arguments);null!=a.editor.fontCss&&(c.writeln('<style type="text/css">'),c.writeln(a.editor.fontCss),
c.writeln("</style>"))};if("undefined"!==typeof MathJax){var w=b.renderPage;b.renderPage=function(a,c,b,d,f,e){var g=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;var h=w.apply(this,arguments);mxClient.NO_FO=g;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:h.className="geDisableMathJax";return h}}b.open(null,null,f,!0)}else{n=c.background;if(null==n||""==n||n==mxConstants.NONE)n="#ffffff";b.backgroundColor=n;b.autoOrigin=
-r;b.appendGraph(c,m,g,h,f,!0)}return b}var d=parseInt(W.value)/100;isNaN(d)&&(d=1,W.value="100 %");var d=.75*d,e=k.value,g=w.value,h=!r.checked,m=null;h&&(h=e==n&&g==n);if(!h&&null!=a.pages&&a.pages.length){var v=0,h=a.pages.length-1;r.checked||(v=parseInt(e)-1,h=parseInt(g)-1);for(var t=v;t<=h;t++){var l=a.pages[t],e=l==a.currentPage?f:null;if(null==e){var e=a.createTemporaryGraph(f.getStylesheet()),g=!0,v=!1,y=null,z=null;null==l.viewState&&null==l.root&&a.updatePageRoot(l);null!=l.viewState&&(g=
-l.viewState.pageVisible,v=l.viewState.mathEnabled,y=l.viewState.background,z=l.viewState.backgroundImage);e.background=y;e.backgroundImage=null!=z?new mxImage(z.src,z.width,z.height):null;e.pageVisible=g;e.mathEnabled=v;var D=e.getGlobalVariable;e.getGlobalVariable=function(a){return"page"==a?l.getName():"pagenumber"==a?t+1:D.apply(this,arguments)};document.body.appendChild(e.container);a.updatePageRoot(l);e.model.setRoot(l.root)}m=b(e,m,t!=h);e!=f&&e.container.parentNode.removeChild(e.container)}}else m=
+r;b.appendGraph(c,m,g,h,f,!0)}return b}var d=parseInt(X.value)/100;isNaN(d)&&(d=1,X.value="100 %");var d=.75*d,e=v.value,g=w.value,h=!r.checked,m=null;h&&(h=e==n&&g==n);if(!h&&null!=a.pages&&a.pages.length){var k=0,h=a.pages.length-1;r.checked||(k=parseInt(e)-1,h=parseInt(g)-1);for(var u=k;u<=h;u++){var l=a.pages[u],e=l==a.currentPage?f:null;if(null==e){var e=a.createTemporaryGraph(f.getStylesheet()),g=!0,k=!1,y=null,z=null;null==l.viewState&&null==l.root&&a.updatePageRoot(l);null!=l.viewState&&(g=
+l.viewState.pageVisible,k=l.viewState.mathEnabled,y=l.viewState.background,z=l.viewState.backgroundImage);e.background=y;e.backgroundImage=null!=z?new mxImage(z.src,z.width,z.height):null;e.pageVisible=g;e.mathEnabled=k;var E=e.getGlobalVariable;e.getGlobalVariable=function(a){return"page"==a?l.getName():"pagenumber"==a?u+1:E.apply(this,arguments)};document.body.appendChild(e.container);a.updatePageRoot(l);e.model.setRoot(l.root)}m=b(e,m,u!=h);e!=f&&e.container.parentNode.removeChild(e.container)}}else m=
b(f);m.mathEnabled&&(h=m.wnd.document,h.writeln('<script type="text/x-mathjax-config">'),h.writeln("MathJax.Hub.Config({"),h.writeln("showMathMenu: false,"),h.writeln('messageStyle: "none",'),h.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],'),h.writeln('extensions: ["tex2jax.js", "mml2jax.js", "asciimath2jax.js"],'),h.writeln('"HTML-CSS": {'),h.writeln("imageFont: null"),h.writeln("},"),h.writeln("TeX: {"),h.writeln('extensions: ["AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js"]'),
h.writeln("},"),h.writeln("tex2jax: {"),h.writeln('\tignoreClass: "geDisableMathJax"'),h.writeln("},"),h.writeln("asciimath2jax: {"),h.writeln('\tignoreClass: "geDisableMathJax"'),h.writeln("}"),h.writeln("});"),c&&(h.writeln("MathJax.Hub.Queue(function () {"),h.writeln("window.print();"),h.writeln("});")),h.writeln("\x3c/script>"),h.writeln('<script type="text/javascript" src="https://math.draw.io/current/MathJax.js">\x3c/script>'));m.closeDocument();!m.mathEnabled&&c&&PrintDialog.printPreview(m)}
var f=a.editor.graph,e=document.createElement("div"),g=document.createElement("h3");g.style.width="100%";g.style.textAlign="center";g.style.marginTop="0px";mxUtils.write(g,c||mxResources.get("print"));e.appendChild(g);var h=1,n=1,m=document.createElement("div");m.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var r=document.createElement("input");r.style.cssText="margin-right:8px;margin-bottom:8px;";r.setAttribute("value","all");r.setAttribute("type","radio");
-r.setAttribute("name","pages-printdialog");m.appendChild(r);g=document.createElement("span");mxUtils.write(g,mxResources.get("printAllPages"));m.appendChild(g);mxUtils.br(m);var v=r.cloneNode(!0);r.setAttribute("checked","checked");v.setAttribute("value","range");m.appendChild(v);g=document.createElement("span");mxUtils.write(g,mxResources.get("pages")+":");m.appendChild(g);var k=document.createElement("input");k.style.cssText="margin:0 8px 0 8px;";k.setAttribute("value","1");k.setAttribute("type",
-"number");k.setAttribute("min","1");k.style.width="50px";m.appendChild(k);g=document.createElement("span");mxUtils.write(g,mxResources.get("to"));m.appendChild(g);var w=k.cloneNode(!0);m.appendChild(w);mxEvent.addListener(k,"focus",function(){v.checked=!0});mxEvent.addListener(w,"focus",function(){v.checked=!0});mxEvent.addListener(k,"change",b);mxEvent.addListener(w,"change",b);if(null!=a.pages&&(h=a.pages.length,null!=a.currentPage))for(g=0;g<a.pages.length;g++)if(a.currentPage==a.pages[g]){n=g+
-1;k.value=n;w.value=n;break}k.setAttribute("max",h);w.setAttribute("max",h);1<h&&e.appendChild(m);var t=document.createElement("div");t.style.marginBottom="10px";var l=document.createElement("input");l.style.marginRight="8px";l.setAttribute("value","adjust");l.setAttribute("type","radio");l.setAttribute("name","printZoom");t.appendChild(l);g=document.createElement("span");mxUtils.write(g,mxResources.get("adjustTo"));t.appendChild(g);var p=document.createElement("input");p.style.cssText="margin:0 8px 0 8px;";
-p.setAttribute("value","100 %");p.style.width="50px";t.appendChild(p);mxEvent.addListener(p,"focus",function(){l.checked=!0});e.appendChild(t);var m=m.cloneNode(!1),x=l.cloneNode(!0);x.setAttribute("value","fit");l.setAttribute("checked","checked");g=document.createElement("div");g.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";g.appendChild(x);m.appendChild(g);t=document.createElement("table");t.style.display="inline-block";var D=document.createElement("tbody"),
-q=document.createElement("tr"),u=q.cloneNode(!0),F=document.createElement("td"),S=F.cloneNode(!0),L=F.cloneNode(!0),M=F.cloneNode(!0),T=F.cloneNode(!0),E=F.cloneNode(!0);F.style.textAlign="right";M.style.textAlign="right";mxUtils.write(F,mxResources.get("fitTo"));var R=document.createElement("input");R.style.cssText="margin:0 8px 0 8px;";R.setAttribute("value","1");R.setAttribute("min","1");R.setAttribute("type","number");R.style.width="40px";S.appendChild(R);g=document.createElement("span");mxUtils.write(g,
-mxResources.get("fitToSheetsAcross"));L.appendChild(g);mxUtils.write(M,mxResources.get("fitToBy"));var V=R.cloneNode(!0);T.appendChild(V);mxEvent.addListener(R,"focus",function(){x.checked=!0});mxEvent.addListener(V,"focus",function(){x.checked=!0});g=document.createElement("span");mxUtils.write(g,mxResources.get("fitToSheetsDown"));E.appendChild(g);q.appendChild(F);q.appendChild(S);q.appendChild(L);u.appendChild(M);u.appendChild(T);u.appendChild(E);D.appendChild(q);D.appendChild(u);t.appendChild(D);
-m.appendChild(t);e.appendChild(m);m=document.createElement("div");g=document.createElement("div");g.style.fontWeight="bold";g.style.marginBottom="12px";mxUtils.write(g,mxResources.get("paperSize"));m.appendChild(g);g=document.createElement("div");g.style.marginBottom="12px";var ga=PageSetupDialog.addPageFormatPanel(g,"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);m.appendChild(g);g=document.createElement("span");mxUtils.write(g,mxResources.get("pageScale"));m.appendChild(g);
-var W=document.createElement("input");W.style.cssText="margin:0 8px 0 8px;";W.setAttribute("value","100 %");W.style.width="60px";m.appendChild(W);e.appendChild(m);g=document.createElement("div");g.style.cssText="text-align:right;margin:48px 0 0 0;";m=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});m.className="geBtn";a.editor.cancelFirst&&g.appendChild(m);a.isOffline()||(t=mxUtils.button(mxResources.get("help"),function(){f.openLink("https://desk.draw.io/support/solutions/articles/16000048947")}),
-t.className="geBtn",g.appendChild(t));PrintDialog.previewEnabled&&(t=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();d(!1)}),t.className="geBtn",g.appendChild(t));t=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();d(!0)});t.className="geBtn gePrimaryBtn";g.appendChild(t);a.editor.cancelFirst||g.appendChild(m);e.appendChild(g);this.container=e};var D=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==
-this.page&&(this.page=this.ui.currentPage);this.page!=this.ui.currentPage?null!=this.page.viewState&&(this.ignoreColor||(this.page.viewState.background=this.color),this.ignoreImage||(this.page.viewState.backgroundImage=this.image),null!=this.format&&(this.page.viewState.pageFormat=this.format),null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled),null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)):(D.apply(this,arguments),null!=this.mathEnabled&&
+r.setAttribute("name","pages-printdialog");m.appendChild(r);g=document.createElement("span");mxUtils.write(g,mxResources.get("printAllPages"));m.appendChild(g);mxUtils.br(m);var k=r.cloneNode(!0);r.setAttribute("checked","checked");k.setAttribute("value","range");m.appendChild(k);g=document.createElement("span");mxUtils.write(g,mxResources.get("pages")+":");m.appendChild(g);var v=document.createElement("input");v.style.cssText="margin:0 8px 0 8px;";v.setAttribute("value","1");v.setAttribute("type",
+"number");v.setAttribute("min","1");v.style.width="50px";m.appendChild(v);g=document.createElement("span");mxUtils.write(g,mxResources.get("to"));m.appendChild(g);var w=v.cloneNode(!0);m.appendChild(w);mxEvent.addListener(v,"focus",function(){k.checked=!0});mxEvent.addListener(w,"focus",function(){k.checked=!0});mxEvent.addListener(v,"change",b);mxEvent.addListener(w,"change",b);if(null!=a.pages&&(h=a.pages.length,null!=a.currentPage))for(g=0;g<a.pages.length;g++)if(a.currentPage==a.pages[g]){n=g+
+1;v.value=n;w.value=n;break}v.setAttribute("max",h);w.setAttribute("max",h);1<h&&e.appendChild(m);var u=document.createElement("div");u.style.marginBottom="10px";var l=document.createElement("input");l.style.marginRight="8px";l.setAttribute("value","adjust");l.setAttribute("type","radio");l.setAttribute("name","printZoom");u.appendChild(l);g=document.createElement("span");mxUtils.write(g,mxResources.get("adjustTo"));u.appendChild(g);var p=document.createElement("input");p.style.cssText="margin:0 8px 0 8px;";
+p.setAttribute("value","100 %");p.style.width="50px";u.appendChild(p);mxEvent.addListener(p,"focus",function(){l.checked=!0});e.appendChild(u);var m=m.cloneNode(!1),x=l.cloneNode(!0);x.setAttribute("value","fit");l.setAttribute("checked","checked");g=document.createElement("div");g.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";g.appendChild(x);m.appendChild(g);u=document.createElement("table");u.style.display="inline-block";var E=document.createElement("tbody"),
+q=document.createElement("tr"),t=q.cloneNode(!0),F=document.createElement("td"),S=F.cloneNode(!0),J=F.cloneNode(!0),M=F.cloneNode(!0),R=F.cloneNode(!0),ha=F.cloneNode(!0);F.style.textAlign="right";M.style.textAlign="right";mxUtils.write(F,mxResources.get("fitTo"));var B=document.createElement("input");B.style.cssText="margin:0 8px 0 8px;";B.setAttribute("value","1");B.setAttribute("min","1");B.setAttribute("type","number");B.style.width="40px";S.appendChild(B);g=document.createElement("span");mxUtils.write(g,
+mxResources.get("fitToSheetsAcross"));J.appendChild(g);mxUtils.write(M,mxResources.get("fitToBy"));var ca=B.cloneNode(!0);R.appendChild(ca);mxEvent.addListener(B,"focus",function(){x.checked=!0});mxEvent.addListener(ca,"focus",function(){x.checked=!0});g=document.createElement("span");mxUtils.write(g,mxResources.get("fitToSheetsDown"));ha.appendChild(g);q.appendChild(F);q.appendChild(S);q.appendChild(J);t.appendChild(M);t.appendChild(R);t.appendChild(ha);E.appendChild(q);E.appendChild(t);u.appendChild(E);
+m.appendChild(u);e.appendChild(m);m=document.createElement("div");g=document.createElement("div");g.style.fontWeight="bold";g.style.marginBottom="12px";mxUtils.write(g,mxResources.get("paperSize"));m.appendChild(g);g=document.createElement("div");g.style.marginBottom="12px";var V=PageSetupDialog.addPageFormatPanel(g,"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);m.appendChild(g);g=document.createElement("span");mxUtils.write(g,mxResources.get("pageScale"));m.appendChild(g);
+var X=document.createElement("input");X.style.cssText="margin:0 8px 0 8px;";X.setAttribute("value","100 %");X.style.width="60px";m.appendChild(X);e.appendChild(m);g=document.createElement("div");g.style.cssText="text-align:right;margin:48px 0 0 0;";m=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});m.className="geBtn";a.editor.cancelFirst&&g.appendChild(m);a.isOffline()||(u=mxUtils.button(mxResources.get("help"),function(){f.openLink("https://desk.draw.io/support/solutions/articles/16000048947")}),
+u.className="geBtn",g.appendChild(u));PrintDialog.previewEnabled&&(u=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();d(!1)}),u.className="geBtn",g.appendChild(u));u=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();d(!0)});u.className="geBtn gePrimaryBtn";g.appendChild(u);a.editor.cancelFirst||g.appendChild(m);e.appendChild(g);this.container=e};var E=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==
+this.page&&(this.page=this.ui.currentPage);this.page!=this.ui.currentPage?null!=this.page.viewState&&(this.ignoreColor||(this.page.viewState.background=this.color),this.ignoreImage||(this.page.viewState.backgroundImage=this.image),null!=this.format&&(this.page.viewState.pageFormat=this.format),null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled),null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)):(E.apply(this,arguments),null!=this.mathEnabled&&
this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible))}})();
-var ErrorDialog=function(a,b,e,d,k,l,p,q,u,c,f){u=null!=u?u:!0;var g=document.createElement("div");g.style.textAlign="center";if(null!=b){var n=document.createElement("div");n.style.padding="0px";n.style.margin="0px";n.style.fontSize="18px";n.style.paddingBottom="16px";n.style.marginBottom="16px";n.style.borderBottom="1px solid #c0c0c0";n.style.color="gray";mxUtils.write(n,b);g.appendChild(n)}b=document.createElement("div");b.style.padding="6px";b.innerHTML=e;g.appendChild(b);e=document.createElement("div");
-e.style.marginTop="16px";e.style.textAlign="center";null!=l&&(b=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();l()}),b.className="geBtn",e.appendChild(b),e.style.textAlign="center");null!=c&&(c=mxUtils.button(c,function(){null!=f&&f()}),c.className="geBtn",e.appendChild(c));var r=mxUtils.button(d,function(){u&&a.hideDialog();null!=k&&k()});r.className="geBtn";e.appendChild(r);null!=p&&(d=mxUtils.button(p,function(){u&&a.hideDialog();null!=q&&q()}),d.className="geBtn gePrimaryBtn",
+var ErrorDialog=function(a,b,e,d,k,l,p,q,t,c,f){t=null!=t?t:!0;var g=document.createElement("div");g.style.textAlign="center";if(null!=b){var n=document.createElement("div");n.style.padding="0px";n.style.margin="0px";n.style.fontSize="18px";n.style.paddingBottom="16px";n.style.marginBottom="16px";n.style.borderBottom="1px solid #c0c0c0";n.style.color="gray";mxUtils.write(n,b);g.appendChild(n)}b=document.createElement("div");b.style.padding="6px";b.innerHTML=e;g.appendChild(b);e=document.createElement("div");
+e.style.marginTop="16px";e.style.textAlign="center";null!=l&&(b=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();l()}),b.className="geBtn",e.appendChild(b),e.style.textAlign="center");null!=c&&(c=mxUtils.button(c,function(){null!=f&&f()}),c.className="geBtn",e.appendChild(c));var r=mxUtils.button(d,function(){t&&a.hideDialog();null!=k&&k()});r.className="geBtn";e.appendChild(r);null!=p&&(d=mxUtils.button(p,function(){t&&a.hideDialog();null!=q&&q()}),d.className="geBtn gePrimaryBtn",
e.appendChild(d));this.init=function(){r.focus()};g.appendChild(e);this.container=g};
(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,e,d){d.ui=a.ui;return e};a.afterDecode=function(a,e,d){d.previousColor=d.color;d.previousImage=d.image;d.previousFormat=d.format;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(a)})();(function(){EditorUi.VERSION="@DRAWIO-VERSION@";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.enableLogging="1"!=urlParams.stealth&&/.*\.draw\.io$/.test(window.location.hostname)&&"support.draw.io"!=window.location.hostname;EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.logError=function(a,b,d,e,r){if("1"==urlParams.dev)EditorUi.debug("logError",a,b,d,e,r);else if(EditorUi.enableLogging)try{if(a!=EditorUi.lastErrorMessage&&(null==
a||null==b||-1==a.indexOf("Script error")&&-1==a.indexOf("extension"))&&null!=a&&0>a.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=a;var c=0<=a.indexOf("NetworkError")||0<=a.indexOf("SecurityError")||0<=a.indexOf("NS_ERROR_FAILURE")||0<=a.indexOf("out of memory")?"CONFIG":"SEVERE",f=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=f+"/log?severity="+c+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(a)+":url:"+encodeURIComponent(window.location.href)+
@@ -2892,9 +2893,9 @@ EditorUi.prototype.createDownloadRequest=function(a,b,d,e,r,h){var c=this.editor
0<f.length?f:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);d.getHash=function(){return c};this.fileLoaded(d);"csv"==a.format&&this.importCsv(f,mxUtils.bind(this,function(a){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=a.update){var e=null!=a.interval?parseInt(a.interval):6E4,g=null,h=mxUtils.bind(this,function(){var c=this.currentPage;mxUtils.post(a.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),
mxUtils.bind(this,function(a){c===this.currentPage&&(200<=a.getStatus()&&300>=a.getStatus()?(this.updateDiagram(a.getText()),n()):this.handleError({message:mxResources.get("error")+" "+a.getStatus()}))}),mxUtils.bind(this,function(a){this.handleError(a)}))}),n=mxUtils.bind(this,function(){window.clearTimeout(g);g=window.setTimeout(h,e)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){n();h()}));n();h()}null!=b&&b()});if(null!=a.url&&0<a.url.length){var e=a.url;/^https?:\/\//.test(e)&&
!this.isCorsEnabledForUrl(e)&&(e=PROXY_URL+"?url="+encodeURIComponent(e));this.loadUrl(e,mxUtils.bind(this,function(a){f(a)}),mxUtils.bind(this,function(a){null!=d&&d(a)}))}else f("")};EditorUi.prototype.updateDiagram=function(a){function c(a){var c=new mxCellOverlay(a.image||e.warningImage,a.tooltip,a.align,a.valign,a.offset);c.addListener(mxEvent.CLICK,function(c,b){d.alert(a.tooltip)});return c}var b=null,d=this;if(null!=a&&0<a.length&&(b=mxUtils.parseXml(a),a=null!=b?b.documentElement:null,null!=
-a&&"updates"==a.nodeName)){var e=this.editor.graph,h=e.getModel();h.beginUpdate();var m=null;try{for(a=a.firstChild;null!=a;){if("update"==a.nodeName){var k=h.getCell(a.getAttribute("id"));if(null!=k){try{var v=a.getAttribute("value");if(null!=v){var l=mxUtils.parseXml(v).documentElement;if(null!=l)if("1"==l.getAttribute("replace-value"))h.setValue(k,l);else for(var p=l.attributes,t=0;t<p.length;t++)e.setAttributeForCell(k,p[t].nodeName,0<p[t].nodeValue.length?p[t].nodeValue:null)}}catch(A){null!=
-window.console&&console.log("Error in value for "+k.id+": "+A)}try{var q=a.getAttribute("style");null!=q&&e.model.setStyle(k,q)}catch(A){null!=window.console&&console.log("Error in style for "+k.id+": "+A)}try{var B=a.getAttribute("icon");if(null!=B){var u=0<B.length?JSON.parse(B):null;null!=u&&u.append||e.removeCellOverlays(k);null!=u&&e.addCellOverlay(k,c(u))}}catch(A){null!=window.console&&console.log("Error in icon for "+k.id+": "+A)}try{var C=a.getAttribute("geometry");if(null!=C){var C=JSON.parse(C),
-G=e.getCellGeometry(k);if(null!=G){G=G.clone();for(key in C){var J=parseFloat(C[key]);"dx"==key?G.x+=J:"dy"==key?G.y+=J:"dw"==key?G.width+=J:"dh"==key?G.height+=J:G[key]=parseFloat(C[key])}e.model.setGeometry(k,G)}}}catch(A){null!=window.console&&console.log("Error in icon for "+k.id+": "+A)}}}else if("model"==a.nodeName){for(var y=a.firstChild;null!=y&&y.nodeType!=mxConstants.NODETYPE_ELEMENT;)y=y.nextSibling;null!=y&&(new mxCodec(a.firstChild)).decode(y,h)}else if("view"==a.nodeName){if(a.hasAttribute("scale")&&
+a&&"updates"==a.nodeName)){var e=this.editor.graph,h=e.getModel();h.beginUpdate();var m=null;try{for(a=a.firstChild;null!=a;){if("update"==a.nodeName){var k=h.getCell(a.getAttribute("id"));if(null!=k){try{var v=a.getAttribute("value");if(null!=v){var l=mxUtils.parseXml(v).documentElement;if(null!=l)if("1"==l.getAttribute("replace-value"))h.setValue(k,l);else for(var p=l.attributes,u=0;u<p.length;u++)e.setAttributeForCell(k,p[u].nodeName,0<p[u].nodeValue.length?p[u].nodeValue:null)}}catch(A){null!=
+window.console&&console.log("Error in value for "+k.id+": "+A)}try{var q=a.getAttribute("style");null!=q&&e.model.setStyle(k,q)}catch(A){null!=window.console&&console.log("Error in style for "+k.id+": "+A)}try{var C=a.getAttribute("icon");if(null!=C){var t=0<C.length?JSON.parse(C):null;null!=t&&t.append||e.removeCellOverlays(k);null!=t&&e.addCellOverlay(k,c(t))}}catch(A){null!=window.console&&console.log("Error in icon for "+k.id+": "+A)}try{var D=a.getAttribute("geometry");if(null!=D){var D=JSON.parse(D),
+G=e.getCellGeometry(k);if(null!=G){G=G.clone();for(key in D){var K=parseFloat(D[key]);"dx"==key?G.x+=K:"dy"==key?G.y+=K:"dw"==key?G.width+=K:"dh"==key?G.height+=K:G[key]=parseFloat(D[key])}e.model.setGeometry(k,G)}}}catch(A){null!=window.console&&console.log("Error in icon for "+k.id+": "+A)}}}else if("model"==a.nodeName){for(var y=a.firstChild;null!=y&&y.nodeType!=mxConstants.NODETYPE_ELEMENT;)y=y.nextSibling;null!=y&&(new mxCodec(a.firstChild)).decode(y,h)}else if("view"==a.nodeName){if(a.hasAttribute("scale")&&
(e.view.scale=parseFloat(a.getAttribute("scale"))),a.hasAttribute("dx")||a.hasAttribute("dy"))e.view.translate=new mxPoint(parseFloat(a.getAttribute("dx")||0),parseFloat(a.getAttribute("dy")||0))}else"fit"==a.nodeName&&(m=a.hasAttribute("max-scale")?parseFloat(a.getAttribute("max-scale")):1);a=a.nextSibling}}finally{h.endUpdate()}null!=m&&this.chromelessResize&&this.chromelessResize(!0,m)}return b};EditorUi.prototype.getCopyFilename=function(a,b){var c=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename,
d="",f=c.lastIndexOf(".");0<=f&&(d=c.substring(f),c=c.substring(0,f));if(b)var e=new Date,f=e.getFullYear(),m=e.getMonth()+1,k=e.getDate(),v=e.getHours(),l=e.getMinutes(),e=e.getSeconds(),c=c+(" "+(f+"-"+m+"-"+k+"-"+v+"-"+l+"-"+e));return c=mxResources.get("copyOf",[c])+d};EditorUi.prototype.fileLoaded=function(a){var c=this.getCurrentFile();this.fileLoadedError=null;this.setCurrentFile(null);var b=!1;this.hideDialog();null!=c&&(c.removeListener(this.descriptorChangedListener),c.close());this.editor.graph.model.clear();
this.editor.undoManager.clear();var d=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=c&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerHTML="",this.fname.setAttribute("title",mxResources.get("rename")));this.editor.setStatus("");
@@ -2914,40 +2915,40 @@ this.sidebar.container;if(null==a){var b=this.sidebar.palettes["L.scratchpad"];n
"borderRadius","6px"),f.style.border="3px dotted lightGray",f.style.textAlign="center",f.style.padding="8px",f.style.color="#B3B3B3",mxUtils.write(f,mxResources.get("dragElementsHere"))),b.appendChild(f)):this.addLibraryEntries(c,b)});if(null!=this.sidebar&&null!=b)for(var g=0;g<b.length;g++)mxUtils.bind(this,function(a){var c=a.data;null!=c&&null!=a.title?this.sidebar.addEntry(a.title,mxUtils.bind(this,function(){c=this.convertDataUri(c);var b="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";
"fixed"==a.aspect&&(b+="aspect=fixed;");return this.sidebar.createVertexTemplate(b+"image="+c,a.w,a.h,"",a.title||"",!1,!1,!0)})):null!=a.xml&&null!=a.title&&this.sidebar.addEntry(a.title,mxUtils.bind(this,function(){var c=this.stringToCells(this.editor.graph.decompress(a.xml));return this.sidebar.createVertexTemplateFromCells(c,a.w,a.h,a.title||"",!0,!1,!0)}))})(b[g]);d=null!=d&&0<d.length?d:a.getTitle();var k=this.sidebar.addPalette(a.getHash(),d,!0,mxUtils.bind(this,function(a){e(b,a)}));this.repositionLibrary(c);
var v=k.parentNode.previousSibling;d=v.getAttribute("title");null!=d&&0<d.length&&".scratchpad"!=a.title&&v.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+d);var l=document.createElement("div");l.style.position="absolute";l.style.right="0px";l.style.top="0px";l.style.padding="8px";mxClient.IS_QUIRKS||8==document.documentMode||(l.style.backgroundColor="inherit");v.style.position="relative";var p=document.createElement("img");p.setAttribute("src",Dialog.prototype.closeImage);p.setAttribute("title",
-mxResources.get("close"));p.setAttribute("valign","absmiddle");p.setAttribute("border","0");p.style.margin="0 3px";var t=null;if(".scratchpad"!=a.title||this.closableScratchpad)l.appendChild(p),mxEvent.addListener(p,"click",mxUtils.bind(this,function(c){if(!mxEvent.isConsumed(c)){var b=mxUtils.bind(this,function(){this.closeLibrary(a)});null!=t?this.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b();mxEvent.consume(c)}}));if(a.isEditable()){var q=
-this.editor.graph,B=null,u=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),k,b,a,a.getMode());mxEvent.consume(c)}),C=mxUtils.bind(this,function(c){a.setModified(!0);a.isAutosave()?(null!=B&&null!=B.parentNode&&B.parentNode.removeChild(B),B=p.cloneNode(!1),B.setAttribute("src",Editor.spinImage),B.setAttribute("title",mxResources.get("saving")),B.style.cursor="default",B.style.marginRight="2px",B.style.marginTop="-2px",l.insertBefore(B,l.firstChild),v.style.paddingRight=18*l.childNodes.length+
-"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=B&&null!=B.parentNode&&(B.parentNode.removeChild(B),v.style.paddingRight=18*l.childNodes.length+"px")})):null==t&&(t=p.cloneNode(!1),t.setAttribute("src",IMAGE_PATH+"/download.png"),t.setAttribute("title",mxResources.get("save")),l.insertBefore(t,l.firstChild),mxEvent.addListener(t,"click",mxUtils.bind(this,function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==t||a.isModified()||
-(v.style.paddingRight=18*l.childNodes.length+"px",t.parentNode.removeChild(t),t=null)});mxEvent.consume(c)})),v.style.paddingRight=18*l.childNodes.length+"px")}),G=mxUtils.bind(this,function(a,c,d,e){a=q.cloneCells(mxUtils.sortCells(q.model.getTopmostCells(a)));for(var g=0;g<a.length;g++){var h=q.getCellGeometry(a[g]);null!=h&&h.translate(-c.x,-c.y)}k.appendChild(this.sidebar.createVertexTemplateFromCells(a,c.width,c.height,e||"",!0,!1,!1));a={xml:this.editor.graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),
-w:c.width,h:c.height};null!=e&&(a.title=e);b.push(a);C(d);null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)}),J=mxUtils.bind(this,function(a){if(q.isSelectionEmpty())q.getRubberband().isActive()?(q.getRubberband().execute(a),q.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var c=q.getSelectionCells(),b=q.view.getBounds(c),d=q.view.scale;b.x/=d;b.y/=d;b.width/=d;b.height/=d;b.x-=q.view.translate.x;
+mxResources.get("close"));p.setAttribute("valign","absmiddle");p.setAttribute("border","0");p.style.margin="0 3px";var u=null;if(".scratchpad"!=a.title||this.closableScratchpad)l.appendChild(p),mxEvent.addListener(p,"click",mxUtils.bind(this,function(c){if(!mxEvent.isConsumed(c)){var b=mxUtils.bind(this,function(){this.closeLibrary(a)});null!=u?this.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b();mxEvent.consume(c)}}));if(a.isEditable()){var q=
+this.editor.graph,C=null,t=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),k,b,a,a.getMode());mxEvent.consume(c)}),D=mxUtils.bind(this,function(c){a.setModified(!0);a.isAutosave()?(null!=C&&null!=C.parentNode&&C.parentNode.removeChild(C),C=p.cloneNode(!1),C.setAttribute("src",Editor.spinImage),C.setAttribute("title",mxResources.get("saving")),C.style.cursor="default",C.style.marginRight="2px",C.style.marginTop="-2px",l.insertBefore(C,l.firstChild),v.style.paddingRight=18*l.childNodes.length+
+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=C&&null!=C.parentNode&&(C.parentNode.removeChild(C),v.style.paddingRight=18*l.childNodes.length+"px")})):null==u&&(u=p.cloneNode(!1),u.setAttribute("src",IMAGE_PATH+"/download.png"),u.setAttribute("title",mxResources.get("save")),l.insertBefore(u,l.firstChild),mxEvent.addListener(u,"click",mxUtils.bind(this,function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==u||a.isModified()||
+(v.style.paddingRight=18*l.childNodes.length+"px",u.parentNode.removeChild(u),u=null)});mxEvent.consume(c)})),v.style.paddingRight=18*l.childNodes.length+"px")}),G=mxUtils.bind(this,function(a,c,d,e){a=q.cloneCells(mxUtils.sortCells(q.model.getTopmostCells(a)));for(var g=0;g<a.length;g++){var h=q.getCellGeometry(a[g]);null!=h&&h.translate(-c.x,-c.y)}k.appendChild(this.sidebar.createVertexTemplateFromCells(a,c.width,c.height,e||"",!0,!1,!1));a={xml:this.editor.graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),
+w:c.width,h:c.height};null!=e&&(a.title=e);b.push(a);D(d);null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)}),K=mxUtils.bind(this,function(a){if(q.isSelectionEmpty())q.getRubberband().isActive()?(q.getRubberband().execute(a),q.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var c=q.getSelectionCells(),b=q.view.getBounds(c),d=q.view.scale;b.x/=d;b.y/=d;b.width/=d;b.height/=d;b.x-=q.view.translate.x;
b.y-=q.view.translate.y;G(c,b)}mxEvent.consume(a)});k.style.border="3px solid transparent";mxEvent.addGestureListeners(k,function(){},mxUtils.bind(this,function(a){q.isMouseDown&&null!=q.panningManager&&null!=q.graphHandler.shape&&(q.graphHandler.shape.node.style.visibility="hidden",null!=f?f.style.border="3px dotted rgb(254, 137, 12)":k.style.border="3px dotted rgb(254, 137, 12)",k.style.cursor="copy",q.panningManager.stop(),q.autoScroll=!1,null!=q.graphHandler.guide&&q.graphHandler.guide.setVisible(!1),
-null!=q.graphHandler.hint&&(q.graphHandler.hint.style.visibility="hidden"),mxEvent.consume(a))}),mxUtils.bind(this,function(a){q.isMouseDown&&null!=q.panningManager&&null!=q.graphHandler&&(k.style.border="3px solid transparent",null!=f&&(f.style.border="3px dotted lightGray"),k.style.cursor="default",this.sidebar.showTooltips=!0,q.panningManager.stop(),q.graphHandler.reset(),q.isMouseDown=!1,q.autoScroll=!0,J(a),mxEvent.consume(a))}));mxEvent.addListener(k,"mouseleave",mxUtils.bind(this,function(a){q.isMouseDown&&
+null!=q.graphHandler.hint&&(q.graphHandler.hint.style.visibility="hidden"),mxEvent.consume(a))}),mxUtils.bind(this,function(a){q.isMouseDown&&null!=q.panningManager&&null!=q.graphHandler&&(k.style.border="3px solid transparent",null!=f&&(f.style.border="3px dotted lightGray"),k.style.cursor="default",this.sidebar.showTooltips=!0,q.panningManager.stop(),q.graphHandler.reset(),q.isMouseDown=!1,q.autoScroll=!0,K(a),mxEvent.consume(a))}));mxEvent.addListener(k,"mouseleave",mxUtils.bind(this,function(a){q.isMouseDown&&
null!=q.graphHandler.shape&&(q.graphHandler.shape.node.style.visibility="visible",k.style.border="3px solid transparent",k.style.cursor="",q.autoScroll=!0,null!=q.graphHandler.guide&&q.graphHandler.guide.setVisible(!0),null!=q.graphHandler.hint&&(q.graphHandler.hint.style.visibility="visible"),null!=f&&(f.style.border="3px dotted lightGray"))}));Graph.fileSupport&&(mxEvent.addListener(k,"dragover",mxUtils.bind(this,function(a){null!=f?f.style.border="3px dotted rgb(254, 137, 12)":k.style.border="3px dotted rgb(254, 137, 12)";
a.dataTransfer.dropEffect="copy";k.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(k,"drop",mxUtils.bind(this,function(a){k.style.border="3px solid transparent";k.style.cursor="";null!=f&&(f.style.border="3px dotted lightGray");0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(c,d,g,h,m,n,r,v,l){if(null!=c&&"image/"==d.substring(0,6))c="shape=image;verticalLabelPosition=bottom;verticalAlign=top;aspect=fixed;image="+
-this.convertDataUri(c),c=[new mxCell("",new mxGeometry(0,0,m,n),c)],c[0].vertex=!0,G(c,new mxRectangle(0,0,m,n),a,mxEvent.isAltDown(a)?null:r.substring(0,r.lastIndexOf(".")).replace(/_/g," ")),null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null);else{var t=!1,w=mxUtils.bind(this,function(c,d){if(null!=c&&"text/xml"==d){var g=mxUtils.parseXml(c);if("mxlibrary"==g.documentElement.nodeName)try{var h=JSON.parse(mxUtils.getTextContent(g.documentElement));e(h,k);b=b.concat(h);C(a);
-this.spinner.stop();t=!0}catch(R){}else if("mxfile"==g.documentElement.nodeName)try{for(var m=g.documentElement.getElementsByTagName("diagram"),g=0;g<m.length;g++){var h=mxUtils.getTextContent(m[g]),n=this.stringToCells(this.editor.graph.decompress(h)),r=this.editor.graph.getBoundingBoxFromGeometry(n);G(n,new mxRectangle(0,0,r.width,r.height),a)}t=!0}catch(R){null!=window.console&&console.log("error in drop handler:",R)}}t||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));
+this.convertDataUri(c),c=[new mxCell("",new mxGeometry(0,0,m,n),c)],c[0].vertex=!0,G(c,new mxRectangle(0,0,m,n),a,mxEvent.isAltDown(a)?null:r.substring(0,r.lastIndexOf(".")).replace(/_/g," ")),null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null);else{var u=!1,w=mxUtils.bind(this,function(c,d){if(null!=c&&"text/xml"==d){var g=mxUtils.parseXml(c);if("mxlibrary"==g.documentElement.nodeName)try{var h=JSON.parse(mxUtils.getTextContent(g.documentElement));e(h,k);b=b.concat(h);D(a);
+this.spinner.stop();u=!0}catch(B){}else if("mxfile"==g.documentElement.nodeName)try{for(var m=g.documentElement.getElementsByTagName("diagram"),g=0;g<m.length;g++){var h=mxUtils.getTextContent(m[g]),n=this.stringToCells(this.editor.graph.decompress(h)),r=this.editor.graph.getBoundingBoxFromGeometry(n);G(n,new mxRectangle(0,0,r.width,r.height),a)}u=!0}catch(B){null!=window.console&&console.log("error in drop handler:",B)}}u||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));
null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)});null!=l&&null!=r&&(/(\.v(dx|sdx?))($|\?)/i.test(r)||/(\.vs(x|sx?))($|\?)/i.test(r))?this.importVisio(l,function(a){w(a,"text/xml")},null,r):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,r)&&null!=l?this.parseFile(l,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?w(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?
-"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):w(c,d)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(k,"dragleave",function(a){null!=f?f.style.border="3px dotted lightGray":(k.style.border="3px solid transparent",k.style.cursor="");a.stopPropagation();a.preventDefault()}));p=p.cloneNode(!1);p.setAttribute("src",Editor.editImage);p.setAttribute("title",mxResources.get("edit"));l.insertBefore(p,l.firstChild);mxEvent.addListener(p,"click",u);mxEvent.addListener(k,
-"dblclick",function(a){mxEvent.getSource(a)==k&&u(a)});d=p.cloneNode(!1);d.setAttribute("src",Editor.plusImage);d.setAttribute("title",mxResources.get("add"));l.insertBefore(d,l.firstChild);mxEvent.addListener(d,"click",J);this.isOffline()||".scratchpad"!=a.title||null==EditorUi.scratchpadHelpLink||(d=document.createElement("span"),d.setAttribute("title",mxResources.get("help")),d.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;",mxUtils.write(d,"?"),mxEvent.addGestureListeners(d,
+"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):w(c,d)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(k,"dragleave",function(a){null!=f?f.style.border="3px dotted lightGray":(k.style.border="3px solid transparent",k.style.cursor="");a.stopPropagation();a.preventDefault()}));p=p.cloneNode(!1);p.setAttribute("src",Editor.editImage);p.setAttribute("title",mxResources.get("edit"));l.insertBefore(p,l.firstChild);mxEvent.addListener(p,"click",t);mxEvent.addListener(k,
+"dblclick",function(a){mxEvent.getSource(a)==k&&t(a)});d=p.cloneNode(!1);d.setAttribute("src",Editor.plusImage);d.setAttribute("title",mxResources.get("add"));l.insertBefore(d,l.firstChild);mxEvent.addListener(d,"click",K);this.isOffline()||".scratchpad"!=a.title||null==EditorUi.scratchpadHelpLink||(d=document.createElement("span"),d.setAttribute("title",mxResources.get("help")),d.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;",mxUtils.write(d,"?"),mxEvent.addGestureListeners(d,
mxUtils.bind(this,function(a){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(a)})),l.insertBefore(d,l.firstChild))}v.appendChild(l);v.style.paddingRight=18*l.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(a,b){for(var c=0;c<a.length;c++){var d=a[c],f=d.data;if(null!=f){var f=this.convertDataUri(f),e="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==d.aspect&&(e+="aspect=fixed;");b.appendChild(this.sidebar.createVertexTemplate(e+
"image="+f,d.w,d.h,"",d.title||"",!1,!1,!0))}else null!=d.xml&&(f=this.stringToCells(this.editor.graph.decompress(d.xml)),0<f.length&&b.appendChild(this.sidebar.createVertexTemplateFromCells(f,d.w,d.h,d.title||"",!0,!1,!0)))}};EditorUi.prototype.getResource=function(a){return null!=a?a[mxLanguage]||a.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.offline||EditorUi.isElectronApp||("1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64),EditorUi.prototype.createFooter=
function(){return document.getElementById("geFooter")});EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground=mxClient.IS_QUIRKS?"none":"linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38,EditorUi.prototype.hsplitPosition=
188,Sidebar.prototype.thumbWidth=46,Sidebar.prototype.thumbHeight=46,Sidebar.prototype.thumbPadding=5<=document.documentMode?0:1,Sidebar.prototype.thumbBorder=2):"dark"==uiTheme&&(mxClient.link("stylesheet",STYLE_PATH+"/dark.css"),Dialog.backdropColor="#2a2a2a",Graph.prototype.defaultThemeName="darkTheme",Graph.prototype.defaultPageBackgroundColor="#2a2a2a",Graph.prototype.defaultPageBorderColor="#505759",Graph.prototype.svgShadowColor="#e0e0e0",Graph.prototype.svgShadowOpacity="0.6",Graph.prototype.svgShadowSize=
"0.8",Graph.prototype.svgShadowBlur="1.4",Format.prototype.inactiveTabBackgroundColor="black",BaseFormatPanel.prototype.buttonBackgroundColor="#2a2a2a",Sidebar.prototype.dragPreviewBorder="1px dashed #cccccc",mxGraphHandler.prototype.previewColor="#cccccc",StyleFormatPanel.prototype.defaultStrokeColor="#cccccc",mxClient.IS_SVG&&(Editor.helpImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAP1BMVEUAAAD///////////////////////////////////////////////////////////////////////////////9Du/pqAAAAFXRSTlMAT30qCJRBboyDZyCgRzUUdF46MJlgXETgAAAAeklEQVQY022O2w4DIQhEQUURda/9/28tUO2+7CQS5sgQ4F1RapX78YUwRqQjTU8ILqQfKerTKTvACJ4nLX3krt+8aS82oI8aQC4KavRgtvEW/mDvsICgA03PSGRr79MqX1YPNIxzjyqtw8ZnnRo4t5a5undtJYRywau+ds4Cyza3E6YAAAAASUVORK5CYII=",
Editor.checkmarkImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAMAAACeyVWkAAAARVBMVEUAAACZmZkICAgEBASNjY2Dg4MYGBiTk5N5eXl1dXVmZmZQUFBCQkI3NzceHh4MDAykpKSJiYl+fn5sbGxaWlo/Pz8SEhK96uPlAAAAAXRSTlMAQObYZgAAAE5JREFUGNPFzTcSgDAQQ1HJGUfy/Y9K7V1qeOUfzQifCQZai1XHaz11LFysbDbzgDSSWMZiETz3+b8yNUc/MMsktxuC8XQBSncdLwz+8gCCggGXzBcozAAAAABJRU5ErkJggg=="))};EditorUi.initTheme();EditorUi.prototype.hideFooter=function(){var a=document.getElementById("geFooter");null!=a&&(this.footerHeight=0,a.style.display=
-"none",this.refresh())};EditorUi.prototype.showFooter=function(a){var c=document.getElementById("geFooter");null!=c&&(this.footerHeight=a,c.style.display="inline",this.refresh())};EditorUi.prototype.showImageDialog=function(a,b,d,e,r){a=new ImageDialog(this,a,b,d,e,r);this.showDialog(a.container,Graph.fileSupport?440:360,Graph.fileSupport?200:90,!0,!0);a.init()};EditorUi.prototype.showBackgroundImageDialog=function(a){a=null!=a?a:mxUtils.bind(this,function(a){a=new ChangePageSetup(this,null,a);a.ignoreColor=
-!0;this.editor.graph.model.execute(a)});var c=new BackgroundImageDialog(this,mxUtils.bind(this,function(c){a(c)}));this.showDialog(c.container,360,200,!0,!0);c.init()};EditorUi.prototype.showLibraryDialog=function(a,b,d,e,r){a=new LibraryDialog(this,a,b,d,e,r);this.showDialog(a.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));a.init()};EditorUi.prototype.createSidebarFooterContainer=function(){var a=this.createDiv("geSidebarContainer");
+"none",this.refresh())};EditorUi.prototype.showFooter=function(a){var c=document.getElementById("geFooter");null!=c&&(this.footerHeight=a,c.style.display="inline",this.refresh())};EditorUi.prototype.showImageDialog=function(a,b,d,e,k){a=new ImageDialog(this,a,b,d,e,k);this.showDialog(a.container,Graph.fileSupport?440:360,Graph.fileSupport?200:90,!0,!0);a.init()};EditorUi.prototype.showBackgroundImageDialog=function(a){a=null!=a?a:mxUtils.bind(this,function(a){a=new ChangePageSetup(this,null,a);a.ignoreColor=
+!0;this.editor.graph.model.execute(a)});var c=new BackgroundImageDialog(this,mxUtils.bind(this,function(c){a(c)}));this.showDialog(c.container,360,200,!0,!0);c.init()};EditorUi.prototype.showLibraryDialog=function(a,b,d,e,k){a=new LibraryDialog(this,a,b,d,e,k);this.showDialog(a.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));a.init()};EditorUi.prototype.createSidebarFooterContainer=function(){var a=this.createDiv("geSidebarContainer");
a.style.position="absolute";a.style.overflow="hidden";a.style.borderWidth="3px";var b=document.createElement("a");b.className="geTitle";b.style.height="100%";b.style.paddingTop="9px";b.innerHTML='<span style="font-size:18px;margin-right:5px;">+</span>';mxUtils.write(b,mxResources.get("moreShapes")+"...");mxEvent.addListener(b,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(a){a.preventDefault()}));mxEvent.addListener(b,"click",mxUtils.bind(this,function(a){this.actions.get("shapes").funct();
mxEvent.consume(a)}));a.appendChild(b);return a};EditorUi.prototype.handleError=function(a,b,d,e){var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},f=null!=a&&null!=a.error?a.error:a;if(null!=f||null!=b){a=mxUtils.htmlEntities(mxResources.get("unknownError"));var g=mxResources.get("ok"),n=null;b=null!=b?b:mxResources.get("error");if(null!=f)if(null!=f.retry&&(g=mxResources.get("cancel"),n=function(){c();f.retry()}),404==f.code||404==f.status||403==f.code){a=403==
f.code?null!=f.message?mxUtils.htmlEntities(f.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied"));var k=window.location.hash;null!=k&&"#G"==k.substring(0,2)&&(k=k.substring(2),a+='<br><a href="https://drive.google.com/open?id='+k+'" target="_blank">'+mxUtils.htmlEntities(mxResources.get("tryOpeningViaThisPage"))+"</a>")}else null!=f.message?a=mxUtils.htmlEntities(f.message):null!=f.response&&null!=f.response.error?a=mxUtils.htmlEntities(f.response.error):
-"undefined"!==window.App&&(f.code==App.ERROR_TIMEOUT?a=mxUtils.htmlEntities(mxResources.get("timeout")):f.code==App.ERROR_BUSY&&(a=mxUtils.htmlEntities(mxResources.get("busy"))));this.showError(b,a,g,d,n,null,null,null,null,null,null,null,e?d:null)}else null!=d&&d()};EditorUi.prototype.showError=function(a,b,d,e,r,h,m,k,v,l,p,t,q){a=new ErrorDialog(this,a,b,d||mxResources.get("ok"),e,r,h,m,t,k,v);this.showDialog(a.container,l||340,p||(null!=b&&120<b.length?180:150),!0,!1,q);a.init()};EditorUi.prototype.alert=
-function(a,b){var c=new ErrorDialog(this,null,a,mxResources.get("ok"),b);this.showDialog(c.container,340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(a,b,d,e,r){var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){};a=new ConfirmDialog(this,a,function(){c();null!=b&&b()},function(){c();null!=d&&d()},e,r);this.showDialog(a.container,340,90,!0,!1);a.init()};EditorUi.prototype.setCurrentFile=function(a){this.currentFile=a};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};
+"undefined"!==window.App&&(f.code==App.ERROR_TIMEOUT?a=mxUtils.htmlEntities(mxResources.get("timeout")):f.code==App.ERROR_BUSY&&(a=mxUtils.htmlEntities(mxResources.get("busy"))));this.showError(b,a,g,d,n,null,null,null,null,null,null,null,e?d:null)}else null!=d&&d()};EditorUi.prototype.showError=function(a,b,d,e,k,h,m,l,v,p,q,u,z){a=new ErrorDialog(this,a,b,d||mxResources.get("ok"),e,k,h,m,u,l,v);this.showDialog(a.container,p||340,q||(null!=b&&120<b.length?180:150),!0,!1,z);a.init()};EditorUi.prototype.alert=
+function(a,b){var c=new ErrorDialog(this,null,a,mxResources.get("ok"),b);this.showDialog(c.container,340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(a,b,d,e,k){var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){};a=new ConfirmDialog(this,a,function(){c();null!=b&&b()},function(){c();null!=d&&d()},e,k);this.showDialog(a.container,340,90,!0,!1);a.init()};EditorUi.prototype.setCurrentFile=function(a){this.currentFile=a};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};
EditorUi.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||!this.editor.graph.mathEnabled&&this.useCanvasForExport};EditorUi.prototype.createSvgDataUri=function(a){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(a)))};EditorUi.prototype.createImageDataUri=function(a,b,d){var c=a.toDataURL("image/"+d);if(6>=c.length||c==a.cloneNode(!1).toDataURL("image/"+d))throw{message:"Invalid image"};null!=b&&(c=this.writeGraphModelToPng(c,"zTXt","mxGraphModel",atob(this.editor.graph.compress(b))));
return c};EditorUi.prototype.saveCanvas=function(a,b,d){var c="jpeg"==d?"jpg":d,f=this.getBaseFilename()+"."+c;a=this.createImageDataUri(a,b,d);this.saveData(f,c,a.substring(a.lastIndexOf(",")+1),"image/"+d,!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&&!mxClient.IS_QUIRKS||this.isOfflineApp()||mxClient.IS_IOS};
-EditorUi.prototype.showTextDialog=function(a,b){var c=new TextareaDialog(this,a,b,null,null,mxResources.get("close"));c.textarea.style.width="600px";c.textarea.style.height="380px";this.showDialog(c.container,620,460,!0,!0);c.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(a,b,d,e,r){if(window.Blob&&navigator.msSaveOrOpenBlob)a=e?this.base64ToBlob(a,d):new Blob([a],{type:d}),navigator.msSaveOrOpenBlob(a,b);else if(mxClient.IS_IE)d=window.open("about:blank",
+EditorUi.prototype.showTextDialog=function(a,b){var c=new TextareaDialog(this,a,b,null,null,mxResources.get("close"));c.textarea.style.width="600px";c.textarea.style.height="380px";this.showDialog(c.container,620,460,!0,!0);c.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(a,b,d,e,k){if(window.Blob&&navigator.msSaveOrOpenBlob)a=e?this.base64ToBlob(a,d):new Blob([a],{type:d}),navigator.msSaveOrOpenBlob(a,b);else if(mxClient.IS_IE)d=window.open("about:blank",
"_blank"),null==d?mxUtils.popup(a,!0):(d.document.write(a),d.document.close(),d.document.execCommand("SaveAs",!0,b),d.close());else if(mxClient.IS_IOS)this.showTextDialog(b+":",a);else{var c=document.createElement("a"),f=!mxClient.IS_SF&&0>navigator.userAgent.indexOf("PaleMoon/")&&"undefined"!==typeof c.download;if(mxClient.IS_GC)var g=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./),f=65==(g?parseInt(g[2],10):!1)?!1:f;if(f||this.isOffline()){c.href=URL.createObjectURL(e?this.base64ToBlob(a,
-d):new Blob([a],{type:d}));f?c.download=b:c.setAttribute("target","_blank");document.body.appendChild(c);try{window.setTimeout(function(){URL.revokeObjectURL(c.href)},0),c.click(),c.parentNode.removeChild(c)}catch(v){}}else this.createEchoRequest(a,b,d,e,r).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,d,e,r,h){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=d?"&mime="+d:"")+(null!=r?"&format="+r:"")+(null!=h?"&base64="+h:"")+(null!=b?"&filename="+
-encodeURIComponent(b):"")+(e?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=b||"";for(var c=atob(a),d=c.length,e=Math.ceil(d/1024),f=Array(e),m=0;m<e;++m){for(var k=1024*m,v=Math.min(k+1024,d),l=Array(v-k),p=0;k<v;++p,++k)l[p]=c[k].charCodeAt(0);f[m]=new Uint8Array(l)}return new Blob(f,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,d,e,k,h,m){h=null!=h?h:!1;m=null!=m?m:"vsdx"!=k&&(!mxClient.IS_IOS||!navigator.standalone);k=this.getServiceCount(h);b=new CreateDialog(this,
-b,mxUtils.bind(this,function(c,b){try{if("_blank"==b)if(null==d||"image/"!=d.substring(0,6)||"image/svg"==d.substring(0,9)&&!mxClient.IS_SVG){var f=window.open("about:blank");null==f?mxUtils.popup(a,!0):(f.document.write(mxUtils.htmlEntities(a,!1)),f.document.close())}else this.openInNewWindow(a,d,e);else b==App.MODE_DEVICE||"download"==b?this.doSaveLocalFile(a,c,d,e):null!=c&&0<c.length&&this.pickFolder(b,mxUtils.bind(this,function(f){try{this.exportFile(a,c,d,e,b,f)}catch(t){this.handleError(t)}}))}catch(x){this.handleError(x)}}),
+d):new Blob([a],{type:d}));f?c.download=b:c.setAttribute("target","_blank");document.body.appendChild(c);try{window.setTimeout(function(){URL.revokeObjectURL(c.href)},0),c.click(),c.parentNode.removeChild(c)}catch(v){}}else this.createEchoRequest(a,b,d,e,k).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,d,e,k,h){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=d?"&mime="+d:"")+(null!=k?"&format="+k:"")+(null!=h?"&base64="+h:"")+(null!=b?"&filename="+
+encodeURIComponent(b):"")+(e?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=b||"";for(var c=atob(a),d=c.length,e=Math.ceil(d/1024),f=Array(e),m=0;m<e;++m){for(var k=1024*m,l=Math.min(k+1024,d),p=Array(l-k),q=0;k<l;++q,++k)p[q]=c[k].charCodeAt(0);f[m]=new Uint8Array(p)}return new Blob(f,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,d,e,k,h,m){h=null!=h?h:!1;m=null!=m?m:"vsdx"!=k&&(!mxClient.IS_IOS||!navigator.standalone);k=this.getServiceCount(h);b=new CreateDialog(this,
+b,mxUtils.bind(this,function(c,b){try{if("_blank"==b)if(null==d||"image/"!=d.substring(0,6)||"image/svg"==d.substring(0,9)&&!mxClient.IS_SVG){var f=window.open("about:blank");null==f?mxUtils.popup(a,!0):(f.document.write(mxUtils.htmlEntities(a,!1)),f.document.close())}else this.openInNewWindow(a,d,e);else b==App.MODE_DEVICE||"download"==b?this.doSaveLocalFile(a,c,d,e):null!=c&&0<c.length&&this.pickFolder(b,mxUtils.bind(this,function(f){try{this.exportFile(a,c,d,e,b,f)}catch(u){this.handleError(u)}}))}catch(x){this.handleError(x)}}),
mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,h,m,null,1<k,4<k&&(!h||6>k)?3:4,a,d,e);this.showDialog(b.container,420,k==(mxClient.IS_IOS?0:1)?160:4<k?390:270,!0,!0);b.init()};EditorUi.prototype.openInNewWindow=function(a,b,d){if(mxClient.IS_GC||mxClient.IS_EDGE||11==document.documentMode||10==document.documentMode){var c=window.open("about:blank");null==c?mxUtils.popup(a,!0):("image/svg+xml"==b?c.document.write("<html>"+a+"</html>"):c.document.write('<html><img src="data:'+
b+(d?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))+'"/></html>'),c.document.close())}else c=window.open("data:"+b+(d?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))),null==c&&mxUtils.popup(a,!0)};var b=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.addChromelessToolbarItems=function(a){if(this.isExportToCanvas()){this.exportDialog=null;var c=a(mxUtils.bind(this,function(a){var b=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",b);
null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)b.apply(this);else{this.exportDialog=document.createElement("div");var d=c.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily="Helvetica,Arial";this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width=
@@ -2971,48 +2972,48 @@ a),null!=b&&b!=mxConstants.NONE&&f.push("highlight="+("#"==b.charAt(0)?b.substri
(d="#"+c.getHash(),a=!1));a&&null!=c&&null!=c.getTitle()&&c.getTitle()!=this.defaultFilename&&f.push("title="+encodeURIComponent(c.getTitle()));return(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?"https://www.draw.io/":"https://"+window.location.host+"/")+(0<f.length?"?"+f.join("&"):"")+d};EditorUi.prototype.createHtml=function(a,b,d,e,k,h,m,l,v,p,q){this.getBasenames();var c={};""!=k&&k!=mxConstants.NONE&&(c.highlight=k);"auto"!==e&&(c.target=e);
v||(c.lightbox=!1);c.nav=this.editor.graph.foldingEnabled;d=parseInt(d);isNaN(d)||100==d||(c.zoom=d/100);d=[];m&&(d.push("pages"),c.resize=!0,null!=this.pages&&null!=this.currentPage&&(c.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(d.push("zoom"),c.resize=!0);l&&d.push("layers");0<d.length&&(v&&d.push("lightbox"),c.toolbar=d.join(" "));null!=p&&0<p.length&&(c.edit=p);null!=a?c.url=a:c.xml=this.getFileData(!0,null,null,null,null,!m);b='<div class="mxgraph" style="'+(h?"max-width:100%;":
"")+(""!=d?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(c))+'"></div>';a=null!=a?"&fetch="+encodeURIComponent(a):"";q(b,'<script type="text/javascript" src="'+(0<a.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":"https://www.draw.io/embed2.js?")+a:"1"==urlParams.dev?"https://test.draw.io/js/viewer.min.js":"https://www.draw.io/js/viewer.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(a,b,d,e){var c=document.createElement("div");
-c.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("html"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(f);var g=document.createElement("div");g.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");f=n.cloneNode(!0);f.setAttribute("value","copy");g.appendChild(f);var k=document.createElement("span");mxUtils.write(k,mxResources.get("includeCopyOfMyDiagram"));g.appendChild(k);mxUtils.br(g);g.appendChild(n);k=document.createElement("span");mxUtils.write(k,mxResources.get("publicDiagramUrl"));g.appendChild(k);var l=this.getCurrentFile();null==d&&null!=l&&l.constructor==window.DriveFile&&(k=document.createElement("a"),k.style.paddingLeft="12px",k.style.color="gray",k.setAttribute("href",
-"javascript:void(0);"),mxUtils.write(k,mxResources.get("share")),g.appendChild(k),mxEvent.addListener(k,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(l.getId())})));f.setAttribute("checked","checked");null==d&&n.setAttribute("disabled","disabled");c.appendChild(g);var p=this.addLinkSection(c),t=this.addCheckbox(c,mxResources.get("zoom"),!0,null,!0);mxUtils.write(c,":");var q=document.createElement("input");q.setAttribute("type","text");q.style.marginRight="16px";
-q.style.width="60px";q.style.marginLeft="4px";q.style.marginRight="12px";q.value="100%";c.appendChild(q);var B=this.addCheckbox(c,mxResources.get("fit"),!0),g=null!=this.pages&&1<this.pages.length,u=u=this.addCheckbox(c,mxResources.get("allPages"),g,!g),C=this.addCheckbox(c,mxResources.get("layers"),!0),G=this.addCheckbox(c,mxResources.get("lightbox"),!0),J=this.addEditButton(c,G),y=J.getEditInput();y.style.marginBottom="16px";mxEvent.addListener(G,"change",function(){G.checked?y.removeAttribute("disabled"):
-y.setAttribute("disabled","disabled");y.checked&&G.checked?J.getEditSelect().removeAttribute("disabled"):J.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,c,mxUtils.bind(this,function(){e(n.checked?d:null,t.checked,q.value,p.getTarget(),p.getColor(),B.checked,u.checked,C.checked,G.checked,J.getLink())}),null,a,b);this.showDialog(a.container,340,384,!0,!0);f.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,d,e,k,h){var c=document.createElement("div");c.style.whiteSpace=
+c.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("html"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(f);var g=document.createElement("div");g.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var k=document.createElement("input");k.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";k.setAttribute("value","url");k.setAttribute("type","radio");k.setAttribute("name",
+"type-embedhtmldialog");f=k.cloneNode(!0);f.setAttribute("value","copy");g.appendChild(f);var n=document.createElement("span");mxUtils.write(n,mxResources.get("includeCopyOfMyDiagram"));g.appendChild(n);mxUtils.br(g);g.appendChild(k);n=document.createElement("span");mxUtils.write(n,mxResources.get("publicDiagramUrl"));g.appendChild(n);var l=this.getCurrentFile();null==d&&null!=l&&l.constructor==window.DriveFile&&(n=document.createElement("a"),n.style.paddingLeft="12px",n.style.color="gray",n.setAttribute("href",
+"javascript:void(0);"),mxUtils.write(n,mxResources.get("share")),g.appendChild(n),mxEvent.addListener(n,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(l.getId())})));f.setAttribute("checked","checked");null==d&&k.setAttribute("disabled","disabled");c.appendChild(g);var p=this.addLinkSection(c),u=this.addCheckbox(c,mxResources.get("zoom"),!0,null,!0);mxUtils.write(c,":");var q=document.createElement("input");q.setAttribute("type","text");q.style.marginRight="16px";
+q.style.width="60px";q.style.marginLeft="4px";q.style.marginRight="12px";q.value="100%";c.appendChild(q);var C=this.addCheckbox(c,mxResources.get("fit"),!0),g=null!=this.pages&&1<this.pages.length,t=t=this.addCheckbox(c,mxResources.get("allPages"),g,!g),D=this.addCheckbox(c,mxResources.get("layers"),!0),G=this.addCheckbox(c,mxResources.get("lightbox"),!0),K=this.addEditButton(c,G),y=K.getEditInput();y.style.marginBottom="16px";mxEvent.addListener(G,"change",function(){G.checked?y.removeAttribute("disabled"):
+y.setAttribute("disabled","disabled");y.checked&&G.checked?K.getEditSelect().removeAttribute("disabled"):K.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,c,mxUtils.bind(this,function(){e(k.checked?d:null,u.checked,q.value,p.getTarget(),p.getColor(),C.checked,t.checked,D.checked,G.checked,K.getLink())}),null,a,b);this.showDialog(a.container,340,384,!0,!0);f.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,d,e,k,h){var c=document.createElement("div");c.style.whiteSpace=
"nowrap";var f=document.createElement("h3");mxUtils.write(f,a||mxResources.get("link"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(f);var g=this.getCurrentFile(),f="https://desk.draw.io/support/solutions/articles/16000051941";a=0;if(null!=g&&g.constructor==window.DriveFile&&!b){a=80;var f="https://desk.draw.io/support/solutions/articles/16000039384",n=document.createElement("div");n.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";
var r=document.createElement("div");r.style.whiteSpace="normal";mxUtils.write(r,mxResources.get("linkAccountRequired"));n.appendChild(r);r=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(g.getId())}));r.style.marginTop="12px";r.className="geBtn";n.appendChild(r);c.appendChild(n);r=document.createElement("a");r.style.paddingLeft="12px";r.style.color="gray";r.style.fontSize="11px";r.setAttribute("href","javascript:void(0);");mxUtils.write(r,mxResources.get("check"));
n.appendChild(r);mxEvent.addListener(r,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(a){this.spinner.stop();a=new ErrorDialog(this,null,mxResources.get(null!=a?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(a.container,300,80,!0,!1);a.init()}))}))}var l=null,p=null;if(null!=d||null!=e)a+=30,mxUtils.write(c,mxResources.get("width")+":"),l=document.createElement("input"),
-l.setAttribute("type","text"),l.style.marginRight="16px",l.style.width="50px",l.style.marginLeft="6px",l.style.marginRight="16px",l.style.marginBottom="10px",l.value="100%",c.appendChild(l),mxUtils.write(c,mxResources.get("height")+":"),p=document.createElement("input"),p.setAttribute("type","text"),p.style.width="50px",p.style.marginLeft="6px",p.style.marginBottom="10px",p.value=e+"px",c.appendChild(p),mxUtils.br(c);var q=this.addLinkSection(c,h);d=null!=this.pages&&1<this.pages.length;var u=null;
-if(null==g||g.constructor!=window.DriveFile||b)u=this.addCheckbox(c,mxResources.get("allPages"),d,!d);var C=this.addCheckbox(c,mxResources.get("lightbox"),!0),G=this.addEditButton(c,C),J=G.getEditInput(),y=this.addCheckbox(c,mxResources.get("layers"),!0);y.style.marginLeft=J.style.marginLeft;y.style.marginBottom="16px";y.style.marginTop="8px";mxEvent.addListener(C,"change",function(){C.checked?(y.removeAttribute("disabled"),J.removeAttribute("disabled")):(y.setAttribute("disabled","disabled"),J.setAttribute("disabled",
-"disabled"));J.checked&&C.checked?G.getEditSelect().removeAttribute("disabled"):G.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,c,mxUtils.bind(this,function(){k(q.getTarget(),q.getColor(),null==u?!0:u.checked,C.checked,G.getLink(),y.checked,null!=l?l.value:null,null!=p?p.value:null)}),null,mxResources.get("create"),f);this.showDialog(b.container,340,254+a,!0,!0);null!=l?(l.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?l.select():
+l.setAttribute("type","text"),l.style.marginRight="16px",l.style.width="50px",l.style.marginLeft="6px",l.style.marginRight="16px",l.style.marginBottom="10px",l.value="100%",c.appendChild(l),mxUtils.write(c,mxResources.get("height")+":"),p=document.createElement("input"),p.setAttribute("type","text"),p.style.width="50px",p.style.marginLeft="6px",p.style.marginBottom="10px",p.value=e+"px",c.appendChild(p),mxUtils.br(c);var q=this.addLinkSection(c,h);d=null!=this.pages&&1<this.pages.length;var t=null;
+if(null==g||g.constructor!=window.DriveFile||b)t=this.addCheckbox(c,mxResources.get("allPages"),d,!d);var D=this.addCheckbox(c,mxResources.get("lightbox"),!0),G=this.addEditButton(c,D),K=G.getEditInput(),y=this.addCheckbox(c,mxResources.get("layers"),!0);y.style.marginLeft=K.style.marginLeft;y.style.marginBottom="16px";y.style.marginTop="8px";mxEvent.addListener(D,"change",function(){D.checked?(y.removeAttribute("disabled"),K.removeAttribute("disabled")):(y.setAttribute("disabled","disabled"),K.setAttribute("disabled",
+"disabled"));K.checked&&D.checked?G.getEditSelect().removeAttribute("disabled"):G.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,c,mxUtils.bind(this,function(){k(q.getTarget(),q.getColor(),null==t?!0:t.checked,D.checked,G.getLink(),y.checked,null!=l?l.value:null,null!=p?p.value:null)}),null,mxResources.get("create"),f);this.showDialog(b.container,340,254+a,!0,!0);null!=l?(l.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?l.select():
document.execCommand("selectAll",!1,null)):q.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,d,e){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:4px";c.appendChild(f);var g=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),k=e?null:this.addCheckbox(c,mxResources.get("includeCopyOfMyDiagram"),
!0),f=this.editor.graph,n=e?null:this.addCheckbox(c,mxResources.get("transparentBackground"),f.background==mxConstants.NONE||null==f.background);null!=n&&(n.style.marginBottom="16px");a=new CustomDialog(this,c,mxUtils.bind(this,function(){d(!g.checked,null!=k?k.checked:!1,null!=n?n.checked:!1)}),null,a,b);this.showDialog(a.container,300,e?100:186,!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,d,e,k,h,m,l){m=null!=m?m:!0;var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=
this.editor.graph,g="jpeg"==l?196:300,n=document.createElement("h3");mxUtils.write(n,a);n.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";c.appendChild(n);mxUtils.write(c,mxResources.get("zoom")+":");var r=document.createElement("input");r.setAttribute("type","text");r.style.marginRight="16px";r.style.width="60px";r.style.marginLeft="4px";r.style.marginRight="12px";r.value=this.lastExportZoom||"100%";c.appendChild(r);mxUtils.write(c,mxResources.get("borderWidth")+":");
-var p=document.createElement("input");p.setAttribute("type","text");p.style.marginRight="16px";p.style.width="60px";p.style.marginLeft="4px";p.value=this.lastExportBorder||"0";c.appendChild(p);mxUtils.br(c);var q=this.addCheckbox(c,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=l),w=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,f.isSelectionEmpty()),u=document.createElement("input");u.style.marginTop="16px";u.style.marginRight="8px";u.style.marginLeft="24px";u.setAttribute("disabled",
-"disabled");u.setAttribute("type","checkbox");h&&(c.appendChild(u),mxUtils.write(c,mxResources.get("crop")),mxUtils.br(c),g+=26,mxEvent.addListener(w,"change",function(){w.checked?u.removeAttribute("disabled"):u.setAttribute("disabled","disabled")}));f.isSelectionEmpty()||(u.setAttribute("checked","checked"),u.defaultChecked=!0);var J=this.addCheckbox(c,mxResources.get("shadow"),f.shadowVisible),y=document.createElement("input");y.style.marginTop="16px";y.style.marginRight="8px";y.setAttribute("type",
+var p=document.createElement("input");p.setAttribute("type","text");p.style.marginRight="16px";p.style.width="60px";p.style.marginLeft="4px";p.value=this.lastExportBorder||"0";c.appendChild(p);mxUtils.br(c);var q=this.addCheckbox(c,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=l),w=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,f.isSelectionEmpty()),t=document.createElement("input");t.style.marginTop="16px";t.style.marginRight="8px";t.style.marginLeft="24px";t.setAttribute("disabled",
+"disabled");t.setAttribute("type","checkbox");h&&(c.appendChild(t),mxUtils.write(c,mxResources.get("crop")),mxUtils.br(c),g+=26,mxEvent.addListener(w,"change",function(){w.checked?t.removeAttribute("disabled"):t.setAttribute("disabled","disabled")}));f.isSelectionEmpty()||(t.setAttribute("checked","checked"),t.defaultChecked=!0);var K=this.addCheckbox(c,mxResources.get("shadow"),f.shadowVisible),y=document.createElement("input");y.style.marginTop="16px";y.style.marginRight="8px";y.setAttribute("type",
"checkbox");!this.isOffline()&&this.canvasSupported||y.setAttribute("disabled","disabled");b&&(c.appendChild(y),mxUtils.write(c,mxResources.get("embedImages")),mxUtils.br(c),g+=26);var A=this.addCheckbox(c,mxResources.get("includeCopyOfMyDiagram"),m,null,null,"jpeg"!=l),I=null!=this.pages&&1<this.pages.length,O=this.addCheckbox(c,I?mxResources.get("allPages"):"",I,!I,null,"jpeg"!=l);O.style.marginLeft="24px";O.style.marginBottom="16px";I||(O.style.display="none");mxEvent.addListener(A,"change",function(){A.checked&&
I?O.removeAttribute("disabled"):O.setAttribute("disabled","disabled")});m&&I||O.setAttribute("disabled","disabled");var Q=document.createElement("select");Q.style.maxWidth="260px";Q.style.marginLeft="8px";Q.style.marginRight="10px";Q.className="geBtn";a=document.createElement("option");a.setAttribute("value","auto");mxUtils.write(a,mxResources.get("automatic"));Q.appendChild(a);a=document.createElement("option");a.setAttribute("value","blank");mxUtils.write(a,mxResources.get("openInNewWindow"));Q.appendChild(a);
-a=document.createElement("option");a.setAttribute("value","self");mxUtils.write(a,mxResources.get("openInThisWindow"));Q.appendChild(a);"svg"==l&&(mxUtils.write(c,mxResources.get("links")+":"),c.appendChild(Q),mxUtils.br(c),mxUtils.br(c),g+=26);d=new CustomDialog(this,c,mxUtils.bind(this,function(){this.lastExportBorder=p.value;this.lastExportZoom=r.value;k(r.value,q.checked,!w.checked,J.checked,A.checked,y.checked,p.value,u.checked,!O.checked,Q.value)}),null,d,e);this.showDialog(d.container,340,
+a=document.createElement("option");a.setAttribute("value","self");mxUtils.write(a,mxResources.get("openInThisWindow"));Q.appendChild(a);"svg"==l&&(mxUtils.write(c,mxResources.get("links")+":"),c.appendChild(Q),mxUtils.br(c),mxUtils.br(c),g+=26);d=new CustomDialog(this,c,mxUtils.bind(this,function(){this.lastExportBorder=p.value;this.lastExportZoom=r.value;k(r.value,q.checked,!w.checked,K.checked,A.checked,y.checked,p.value,t.checked,!O.checked,Q.value)}),null,d,e);this.showDialog(d.container,340,
g,!0,!0);r.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?r.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,d,e,k){var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=this.editor.graph;if(null!=b){var g=document.createElement("h3");mxUtils.write(g,b);g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";c.appendChild(g)}var n=this.addCheckbox(c,mxResources.get("fit"),
-!0),r=this.addCheckbox(c,mxResources.get("shadow"),f.shadowVisible&&e,!e),l=this.addCheckbox(c,d),t=this.addCheckbox(c,mxResources.get("lightbox"),!0),p=this.addEditButton(c,t),q=p.getEditInput(),u=1<f.model.getChildCount(f.model.getRoot()),C=this.addCheckbox(c,mxResources.get("layers"),u,!u);C.style.marginLeft=q.style.marginLeft;C.style.marginBottom="12px";C.style.marginTop="8px";mxEvent.addListener(t,"change",function(){t.checked?(u&&C.removeAttribute("disabled"),q.removeAttribute("disabled")):
-(C.setAttribute("disabled","disabled"),q.setAttribute("disabled","disabled"));q.checked&&t.checked?p.getEditSelect().removeAttribute("disabled"):p.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,c,mxUtils.bind(this,function(){a(n.checked,r.checked,l.checked,t.checked,p.getLink(),C.checked)}),null,mxResources.get("embed"),k);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,d,e,k,h,m,l){function c(c){var b=" ",g="";e&&(b=" 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('https://www.draw.io/?client=1&lightbox=1"+
+!0),r=this.addCheckbox(c,mxResources.get("shadow"),f.shadowVisible&&e,!e),l=this.addCheckbox(c,d),u=this.addCheckbox(c,mxResources.get("lightbox"),!0),p=this.addEditButton(c,u),q=p.getEditInput(),t=1<f.model.getChildCount(f.model.getRoot()),D=this.addCheckbox(c,mxResources.get("layers"),t,!t);D.style.marginLeft=q.style.marginLeft;D.style.marginBottom="12px";D.style.marginTop="8px";mxEvent.addListener(u,"change",function(){u.checked?(t&&D.removeAttribute("disabled"),q.removeAttribute("disabled")):
+(D.setAttribute("disabled","disabled"),q.setAttribute("disabled","disabled"));q.checked&&u.checked?p.getEditSelect().removeAttribute("disabled"):p.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,c,mxUtils.bind(this,function(){a(n.checked,r.checked,l.checked,u.checked,p.getLink(),D.checked)}),null,mxResources.get("embed"),k);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,d,e,k,h,m,l){function c(c){var b=" ",g="";e&&(b=" 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('https://www.draw.io/?client=1&lightbox=1"+
(k?"&edit=_blank":"")+(h?"&layers=1":"")+"');}})(this);\"",g+="cursor:pointer;");a&&(g+="max-width:100%;");var n="";d&&(n=' width="'+Math.round(f.width)+'" height="'+Math.round(f.height)+'"');m('<img src="'+c+'"'+n+(""!=g?' style="'+g+'"':"")+b+"/>")}var f=this.editor.graph.getGraphBounds();if(this.isExportToCanvas())this.exportToCanvas(mxUtils.bind(this,function(a){var b=e?this.getFileData(!0):null;a=this.createImageDataUri(a,b,"png");c(a)}),null,null,null,mxUtils.bind(this,function(a){l({message:mxResources.get("unknownError")})}),
null,!0,d?2:1,null,b);else if(b=this.getFileData(!0),f.width*f.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){var g="";d&&(g="&w="+Math.round(2*f.width)+"&h="+Math.round(2*f.height));var n=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(e?"1":"0")+g+"&xml="+encodeURIComponent(b));n.send(mxUtils.bind(this,function(){200<=n.getStatus()&&299>=n.getStatus()?c("data:image/png;base64,"+n.getText()):l({message:mxResources.get("unknownError")})}))}else l({message:mxResources.get("drawingTooLarge")})};
-EditorUi.prototype.createEmbedSvg=function(a,b,d,e,k,h,m){var c=this.editor.graph.getSvg(),f=c.getElementsByTagName("a");if(null!=f)for(var g=0;g<f.length;g++){var n=f[g].getAttribute("href");null!=n&&"#"==n.charAt(0)&&"_blank"==f[g].getAttribute("target")&&f[g].removeAttribute("target")}e&&c.setAttribute("content",this.getFileData(!0));b&&this.editor.graph.addSvgShadow(c);if(d){var r=" ",l="";e&&(r="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('https://www.draw.io/?client=1&lightbox=1"+
-(k?"&edit=_blank":"")+(h?"&layers=1":"")+"');}})(this);\"",l+="cursor:pointer;");a&&(l+="max-width:100%;");this.convertImages(c,mxUtils.bind(this,function(a){m('<img src="'+this.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=l?' style="'+l+'"':"")+r+"/>")}))}else l="",e&&(c.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+
-(k?"&edit=_blank":"")+(h?"&layers=1":"")+"');}}})(this);"),l+="cursor:pointer;"),a&&(a=parseInt(c.getAttribute("width")),b=parseInt(c.getAttribute("height")),c.setAttribute("viewBox","0 0 "+a+" "+b),l+="max-width:100%;max-height:"+b+"px;",c.removeAttribute("height")),""!=l&&c.setAttribute("style",l),m(mxUtils.getXml(c))};EditorUi.prototype.timeSince=function(a){a=Math.floor((new Date-a)/1E3);var c=Math.floor(a/31536E3);if(1<c)return c+" "+mxResources.get("years");c=Math.floor(a/2592E3);if(1<c)return c+
+EditorUi.prototype.createEmbedSvg=function(a,b,d,e,k,h,m){var c=this.editor.graph.getSvg(),f=c.getElementsByTagName("a");if(null!=f)for(var g=0;g<f.length;g++){var n=f[g].getAttribute("href");null!=n&&"#"==n.charAt(0)&&"_blank"==f[g].getAttribute("target")&&f[g].removeAttribute("target")}e&&c.setAttribute("content",this.getFileData(!0));b&&this.editor.graph.addSvgShadow(c);if(d){var l=" ",r="";e&&(l="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('https://www.draw.io/?client=1&lightbox=1"+
+(k?"&edit=_blank":"")+(h?"&layers=1":"")+"');}})(this);\"",r+="cursor:pointer;");a&&(r+="max-width:100%;");this.convertImages(c,mxUtils.bind(this,function(a){m('<img src="'+this.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=r?' style="'+r+'"':"")+l+"/>")}))}else r="",e&&(c.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+
+(k?"&edit=_blank":"")+(h?"&layers=1":"")+"');}}})(this);"),r+="cursor:pointer;"),a&&(a=parseInt(c.getAttribute("width")),b=parseInt(c.getAttribute("height")),c.setAttribute("viewBox","0 0 "+a+" "+b),r+="max-width:100%;max-height:"+b+"px;",c.removeAttribute("height")),""!=r&&c.setAttribute("style",r),m(mxUtils.getXml(c))};EditorUi.prototype.timeSince=function(a){a=Math.floor((new Date-a)/1E3);var c=Math.floor(a/31536E3);if(1<c)return c+" "+mxResources.get("years");c=Math.floor(a/2592E3);if(1<c)return c+
" "+mxResources.get("months");c=Math.floor(a/86400);if(1<c)return c+" "+mxResources.get("days");c=Math.floor(a/3600);if(1<c)return c+" "+mxResources.get("hours");c=Math.floor(a/60);return 1<c?c+" "+mxResources.get("minutes"):1==c?c+" "+mxResources.get("minute"):null};EditorUi.prototype.convertMath=function(a,b,d,e){a.mathEnabled&&"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?(Editor.MathJaxRender(b),window.setTimeout(mxUtils.bind(this,function(){MathJax.Hub.Queue(mxUtils.bind(this,
function(){e()}))}),0)):e()};EditorUi.prototype.decodeNodeIntoGraph=function(a,b){if(null!=a){var c=null;if("diagram"==a.nodeName)c=a;else if("mxfile"==a.nodeName){var d=a.getElementsByTagName("diagram");if(0<d.length){var c=d[0],e=b.getGlobalVariable;b.getGlobalVariable=function(a){return"page"==a?c.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==a?1:e.apply(this,arguments)}}}null!=c&&(d=b.decompress(mxUtils.getTextContent(c)),null!=d&&0<d.length&&(a=mxUtils.parseXml(d).documentElement))}d=
this.editor.graph;try{this.editor.graph=b,this.editor.setGraphXml(a)}catch(h){}finally{this.editor.graph=d}return a};EditorUi.prototype.getEmbeddedPng=function(a,b,d){var c=this.editor.graph,e=null;if(null!=d&&0<d.length)c=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(c.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(d).documentElement,!0),c),e=d;else if(null!=this.pages&&this.currentPage!=this.pages[0]){var c=this.createTemporaryGraph(c.getStylesheet()),
-f=c.getGlobalVariable,g=this.pages[0];c.getGlobalVariable=function(a){return"page"==a?g.getName():"pagenumber"==a?1:f.apply(this,arguments)};document.body.appendChild(c.container);c.model.setRoot(g.root)}this.exportToCanvas(mxUtils.bind(this,function(d){try{null==e&&(e=this.getFileData(!0));var f=d.toDataURL("image/png"),f=this.writeGraphModelToPng(f,"zTXt","mxGraphModel",atob(this.editor.graph.compress(e)));a(f.substring(f.lastIndexOf(",")+1));c!=this.editor.graph&&c.container.parentNode.removeChild(c.container)}catch(D){null!=
-b&&b(D)}}),null,null,null,mxUtils.bind(this,function(a){null!=b&&b(a)}),null,null,null,null,c.shadowVisible,null,c)};EditorUi.prototype.getEmbeddedSvg=function(a,b,d,e,k,h,m){m=b.background;m==mxConstants.NONE&&(m=null);b=b.getSvg(m,null,null,null,null,h);null!=a&&b.setAttribute("content",a);null!=d&&b.setAttribute("resource",d);if(null!=k)this.convertImages(b,mxUtils.bind(this,function(a){k((e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+
+f=c.getGlobalVariable,g=this.pages[0];c.getGlobalVariable=function(a){return"page"==a?g.getName():"pagenumber"==a?1:f.apply(this,arguments)};document.body.appendChild(c.container);c.model.setRoot(g.root)}this.exportToCanvas(mxUtils.bind(this,function(d){try{null==e&&(e=this.getFileData(!0));var f=d.toDataURL("image/png"),f=this.writeGraphModelToPng(f,"zTXt","mxGraphModel",atob(this.editor.graph.compress(e)));a(f.substring(f.lastIndexOf(",")+1));c!=this.editor.graph&&c.container.parentNode.removeChild(c.container)}catch(E){null!=
+b&&b(E)}}),null,null,null,mxUtils.bind(this,function(a){null!=b&&b(a)}),null,null,null,null,c.shadowVisible,null,c)};EditorUi.prototype.getEmbeddedSvg=function(a,b,d,e,k,h,m){m=b.background;m==mxConstants.NONE&&(m=null);b=b.getSvg(m,null,null,null,null,h);null!=a&&b.setAttribute("content",a);null!=d&&b.setAttribute("resource",d);if(null!=k)this.convertImages(b,mxUtils.bind(this,function(a){k((e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+
mxUtils.getXml(a))}));else return(e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(b)};EditorUi.prototype.exportImage=function(a,b,d,e,k,h,m,l,p){p=null!=p?p:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var c=this.editor.graph.isSelectionEmpty();d=null!=d?d:c;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();
-try{this.saveCanvas(a,k?this.getFileData(!0,null,null,null,d,l):null,p)}catch(t){"Invalid image"==t.message?this.downloadFile(p):this.handleError(t)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,d,a||1,b,e,null,null,h,m)}catch(x){this.spinner.stop(),this.handleError(x)}}};EditorUi.prototype.loadFonts=function(a){if(null!=this.editor.fontCss&&null==this.editor.resolvedFontCss){var c=function(a){return a.replace(RegExp("^[\\s\"']+","g"),
-"").replace(RegExp("[\\s\"']+$","g"),"")},b=this.editor.fontCss.split("url("),d=0,e={},h=mxUtils.bind(this,function(){if(0==d){for(var f=[b[0]],g=1;g<b.length;g++){var h=b[g].indexOf(")");f.push('url("');f.push(e[c(b[g].substring(0,h))]);f.push('"'+b[g].substring(h))}this.editor.resolvedFontCss=f.join("");a()}});if(0<b.length)for(var m=1;m<b.length;m++){var k=b[m].indexOf(")"),l=null,p=b[m].indexOf("format(",k);0<p&&(l=c(b[m].substring(p+7,b[m].indexOf(")",p))));mxUtils.bind(this,function(a){if(null==
-e[a]){e[a]=a;d++;var c="application/x-font-ttf";if("svg"==l||/(\.svg)($|\?)/i.test(a))c="image/svg+xml";else if("otf"==l||"embedded-opentype"==l||/(\.otf)($|\?)/i.test(a))c="application/x-font-opentype";else if("woff"==l||/(\.woff)($|\?)/i.test(a))c="application/font-woff";else if("woff2"==l||/(\.woff2)($|\?)/i.test(a))c="application/font-woff2";else if("eot"==l||/(\.eot)($|\?)/i.test(a))c="application/vnd.ms-fontobject";else if("sfnt"==l||/(\.sfnt)($|\?)/i.test(a))c="application/font-sfnt";var b=
-a;/^https?:\/\//.test(b)&&!this.isCorsEnabledForUrl(b)&&(b=PROXY_URL+"?url="+encodeURIComponent(a));this.loadUrl(b,mxUtils.bind(this,function(c){e[a]=c;d--;h()}),mxUtils.bind(this,function(a){d--;h()}),!0,null,"data:"+c+";charset=utf-8;base64,")}})(c(b[m].substring(0,k)),l)}}else a()};EditorUi.prototype.exportToCanvas=function(a,b,d,e,k,h,m,l,p,q,x,t,z,u){h=null!=h?h:!0;t=null!=t?t:this.editor.graph;z=null!=z?z:0;var c=p?null:t.background;c==mxConstants.NONE&&(c=null);null==c&&(c=e);null==c&&0==p&&
-(c=this.editor.graph.defaultPageBackgroundColor);this.convertImages(t.getSvg(c,null,null,u,null,null!=m?m:!0,null,null,null,q),mxUtils.bind(this,function(d){var e=new Image;e.onload=mxUtils.bind(this,function(){try{var f=document.createElement("canvas"),g=parseInt(d.getAttribute("width")),m=parseInt(d.getAttribute("height"));l=null!=l?l:1;null!=b&&(l=h?Math.min(1,Math.min(3*b/(4*m),b/g)):b/g);g=Math.ceil(l*g)+2*z;m=Math.ceil(l*m)+2*z;f.setAttribute("width",g);f.setAttribute("height",m);var n=f.getContext("2d");
-null!=c&&(n.beginPath(),n.rect(0,0,g,m),n.fillStyle=c,n.fill());n.scale(l,l);mxClient.IS_SF?window.setTimeout(function(){n.drawImage(e,z/l,z/l);a(f)},0):(n.drawImage(e,z/l,z/l),a(f))}catch(Q){null!=k&&k(Q)}});e.onerror=function(a){null!=k&&k(a)};try{q&&this.editor.graph.addSvgShadow(d,d);var f=mxUtils.bind(this,function(){if(null!=this.editor.resolvedFontCss){var a=document.createElement("style");a.setAttribute("type","text/css");a.innerHTML=this.editor.resolvedFontCss;d.getElementsByTagName("defs")[0].appendChild(a)}this.convertMath(t,
+try{this.saveCanvas(a,k?this.getFileData(!0,null,null,null,d,l):null,p)}catch(u){"Invalid image"==u.message?this.downloadFile(p):this.handleError(u)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,d,a||1,b,e,null,null,h,m)}catch(x){this.spinner.stop(),this.handleError(x)}}};EditorUi.prototype.loadFonts=function(a){if(null!=this.editor.fontCss&&null==this.editor.resolvedFontCss){var c=function(a){return a.replace(RegExp("^[\\s\"']+","g"),
+"").replace(RegExp("[\\s\"']+$","g"),"")},b=this.editor.fontCss.split("url("),d=0,e={},h=mxUtils.bind(this,function(){if(0==d){for(var f=[b[0]],g=1;g<b.length;g++){var h=b[g].indexOf(")");f.push('url("');f.push(e[c(b[g].substring(0,h))]);f.push('"'+b[g].substring(h))}this.editor.resolvedFontCss=f.join("");a()}});if(0<b.length)for(var k=1;k<b.length;k++){var l=b[k].indexOf(")"),p=null,q=b[k].indexOf("format(",l);0<q&&(p=c(b[k].substring(q+7,b[k].indexOf(")",q))));mxUtils.bind(this,function(a){if(null==
+e[a]){e[a]=a;d++;var c="application/x-font-ttf";if("svg"==p||/(\.svg)($|\?)/i.test(a))c="image/svg+xml";else if("otf"==p||"embedded-opentype"==p||/(\.otf)($|\?)/i.test(a))c="application/x-font-opentype";else if("woff"==p||/(\.woff)($|\?)/i.test(a))c="application/font-woff";else if("woff2"==p||/(\.woff2)($|\?)/i.test(a))c="application/font-woff2";else if("eot"==p||/(\.eot)($|\?)/i.test(a))c="application/vnd.ms-fontobject";else if("sfnt"==p||/(\.sfnt)($|\?)/i.test(a))c="application/font-sfnt";var b=
+a;/^https?:\/\//.test(b)&&!this.isCorsEnabledForUrl(b)&&(b=PROXY_URL+"?url="+encodeURIComponent(a));this.loadUrl(b,mxUtils.bind(this,function(c){e[a]=c;d--;h()}),mxUtils.bind(this,function(a){d--;h()}),!0,null,"data:"+c+";charset=utf-8;base64,")}})(c(b[k].substring(0,l)),p)}}else a()};EditorUi.prototype.exportToCanvas=function(a,b,d,e,k,h,m,l,p,q,x,u,z,t){h=null!=h?h:!0;u=null!=u?u:this.editor.graph;z=null!=z?z:0;var c=p?null:u.background;c==mxConstants.NONE&&(c=null);null==c&&(c=e);null==c&&0==p&&
+(c=this.editor.graph.defaultPageBackgroundColor);this.convertImages(u.getSvg(c,null,null,t,null,null!=m?m:!0,null,null,null,q),mxUtils.bind(this,function(d){var e=new Image;e.onload=mxUtils.bind(this,function(){try{var f=document.createElement("canvas"),g=parseInt(d.getAttribute("width")),m=parseInt(d.getAttribute("height"));l=null!=l?l:1;null!=b&&(l=h?Math.min(1,Math.min(3*b/(4*m),b/g)):b/g);g=Math.ceil(l*g)+2*z;m=Math.ceil(l*m)+2*z;f.setAttribute("width",g);f.setAttribute("height",m);var n=f.getContext("2d");
+null!=c&&(n.beginPath(),n.rect(0,0,g,m),n.fillStyle=c,n.fill());n.scale(l,l);mxClient.IS_SF?window.setTimeout(function(){n.drawImage(e,z/l,z/l);a(f)},0):(n.drawImage(e,z/l,z/l),a(f))}catch(Q){null!=k&&k(Q)}});e.onerror=function(a){null!=k&&k(a)};try{q&&this.editor.graph.addSvgShadow(d,d);var f=mxUtils.bind(this,function(){if(null!=this.editor.resolvedFontCss){var a=document.createElement("style");a.setAttribute("type","text/css");a.innerHTML=this.editor.resolvedFontCss;d.getElementsByTagName("defs")[0].appendChild(a)}this.convertMath(u,
d,!0,mxUtils.bind(this,function(){e.src=this.createSvgDataUri(mxUtils.getXml(d))}))});this.loadFonts(f)}catch(y){null!=k&&k(y)}}),d,x)};EditorUi.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var b=a.convert,d=this;a.convert=function(c){if(null!=c){var e="http://"==c.substring(0,7)||"https://"==c.substring(0,8);e&&!navigator.onLine?c=d.svgBrokenImage.src:!e||c.substring(0,a.baseUrl.length)==a.baseUrl||d.crossOriginImages&&d.isCorsEnabledForUrl(c)?"chrome-extension://"!=
-c.substring(0,19)&&(c=b.apply(this,arguments)):c=PROXY_URL+"?url="+encodeURIComponent(c)}return c};return a};EditorUi.prototype.convertImages=function(a,b,d,e){null==e&&(e=this.createImageUrlConverter());var c=0,f=d||{};d=mxUtils.bind(this,function(d,g){for(var h=a.getElementsByTagName(d),m=0;m<h.length;m++)mxUtils.bind(this,function(d){var h=e.convert(d.getAttribute(g));if(null!=h&&"data:"!=h.substring(0,5)){var m=f[h];null==m?(c++,this.convertImageToDataUri(h,function(e){null!=e&&(f[h]=e,d.setAttribute(g,
-e));c--;0==c&&b(a)})):d.setAttribute(g,m)}else null!=h&&d.setAttribute(g,h)})(h[m])});d("image","xlink:href");d("img","src");0==c&&b(a)};EditorUi.prototype.loadUrl=function(a,b,d,e,k,h){try{var c=e||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||/(\.gif)($|\?)/i.test(a);k=null!=k?k:!0;var f=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=b){var e=a.getText();if(c){if((9==document.documentMode||10==document.documentMode)&&
+c.substring(0,19)&&(c=b.apply(this,arguments)):c=PROXY_URL+"?url="+encodeURIComponent(c)}return c};return a};EditorUi.prototype.convertImages=function(a,b,d,e){null==e&&(e=this.createImageUrlConverter());var c=0,f=d||{};d=mxUtils.bind(this,function(d,g){for(var h=a.getElementsByTagName(d),k=0;k<h.length;k++)mxUtils.bind(this,function(d){var h=e.convert(d.getAttribute(g));if(null!=h&&"data:"!=h.substring(0,5)){var k=f[h];null==k?(c++,this.convertImageToDataUri(h,function(e){null!=e&&(f[h]=e,d.setAttribute(g,
+e));c--;0==c&&b(a)})):d.setAttribute(g,k)}else null!=h&&d.setAttribute(g,h)})(h[k])});d("image","xlink:href");d("img","src");0==c&&b(a)};EditorUi.prototype.loadUrl=function(a,b,d,e,k,h){try{var c=e||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||/(\.gif)($|\?)/i.test(a);k=null!=k?k:!0;var f=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=b){var e=a.getText();if(c){if((9==document.documentMode||10==document.documentMode)&&
"undefined"!==typeof window.mxUtilsBinaryToArray){a=mxUtilsBinaryToArray(a.request.responseBody).toArray();for(var e=Array(a.length),f=0;f<a.length;f++)e[f]=String.fromCharCode(a[f]);e=e.join("")}h=null!=h?h:"data:image/png;base64,";e=h+this.base64Encode(e)}b(e)}}else null!=d&&d({code:App.ERROR_UNKNOWN},a)}),function(){null!=d&&d({code:App.ERROR_UNKNOWN})},c,this.timeout,function(){k&&null!=d&&d({code:App.ERROR_TIMEOUT,retry:f})})});f()}catch(v){null!=d&&d(v)}};EditorUi.prototype.isCorsEnabledForUrl=
function(a){null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(a)||"https://raw.githubusercontent.com/"===a.substring(0,34)||"https://cdn.rawgit.com/"===a.substring(0,23)||"https://rawgit.com/"===a.substring(0,19)||/^https?:\/\/[^\/]*\.iconfinder.com\//.test(a)||/^https?:\/\/[^\/]*\.draw\.io\/proxy/.test(a)||/^https?:\/\/[^\/]*\.github\.io\//.test(a)};EditorUi.prototype.convertImageToDataUri=
function(a,b){if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){b(this.createSvgDataUri(a.getText()))}),function(){b(this.svgBrokenImage.src)});else{var c=new Image,d=this;this.crossOriginImages&&(c.crossOrigin="anonymous");c.onload=function(){var a=document.createElement("canvas"),e=a.getContext("2d");a.height=c.height;a.width=c.width;e.drawImage(c,0,0);try{b(a.toDataURL())}catch(m){b(d.svgBrokenImage.src)}};c.onerror=function(){b(d.svgBrokenImage.src)};c.src=a}};EditorUi.prototype.importXml=
@@ -3031,23 +3032,23 @@ else{c=this.editor.graph;k=null;c.getModel().beginUpdate();try{k=c.insertVertex(
c.setLinkForCell(k,k.value),k.geometry.width+=c.gridSize,k.geometry.height+=c.gridSize}finally{c.getModel().endUpdate()}return[k]}}return[]};EditorUi.prototype.formatFileSize=function(a){var c=-1;do a/=1024,c++;while(1024<a);return Math.max(a,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[c]};EditorUi.prototype.convertDataUri=function(a){if("data:"==a.substring(0,5)){var c=a.indexOf(";");0<c&&(a=a.substring(0,c)+a.substring(a.indexOf(",",c+1)))}return a};EditorUi.prototype.isRemoteFileFormat=
function(a,b){return/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(a)};EditorUi.prototype.isLucidChartData=function(a){return null!=a&&'{"state":"{\\"Properties\\":'==a.substring(0,26)};EditorUi.prototype.importLocalFile=function(a,b){if(a&&Graph.fileSupport&&(!mxClient.IS_IE&&!mxClient.IS_IE11||0>navigator.appVersion.indexOf("Windows NT 6.1"))){var c=document.createElement("input");c.setAttribute("type","file");mxEvent.addListener(c,"change",mxUtils.bind(this,function(){null!=c.files&&
this.importFiles(c.files,null,null,this.maxImageSize)}));c.click()}else{window.openNew=!1;window.openKey="import";if(!b){var d=Editor.useLocalStorage;Editor.useLocalStorage=!a}window.openFile=new OpenFile(mxUtils.bind(this,function(a){this.hideDialog(a)}));window.openFile.setConsumer(mxUtils.bind(this,function(a,c){if(null!=c&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(c)){var b=new Blob([a],{type:"application/octet-stream"});this.importVisio(b,mxUtils.bind(this,function(a){this.importXml(a)}),
-null,c)}else this.editor.graph.setSelectionCells(this.importXml(a))}));this.showDialog((new OpenDialog(this)).container,360,220,!0,!0,function(){window.openFile=null});if(!b){var e=this.dialog,f=e.close;this.dialog.close=mxUtils.bind(this,function(a){Editor.useLocalStorage=d;f.apply(e,arguments);a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importFile=function(a,b,d,e,k,h,m,l,p,q,u){q=null!=q?q:!0;var c=!1,f=null,g=mxUtils.bind(this,function(a){var c=
-null;null!=a&&"<mxlibrary"==a.substring(0,10)?this.loadLibrary(new LocalLibrary(this,a,m)):c=this.importXml(a,d,e,q);null!=l&&l(c)});"image"==b.substring(0,5)?(p=!1,"image/png"==b.substring(0,9)&&(b=u?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(f=this.importXml(b,d,e,q),p=!0)),p||(f=this.editor.graph,b=a.indexOf(";"),0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1))),q&&f.isGridEnabled()&&(d=f.snap(d),e=f.snap(e)),f=[f.insertVertex(null,null,"",d,e,k,h,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+null,c)}else this.editor.graph.setSelectionCells(this.importXml(a))}));this.showDialog((new OpenDialog(this)).container,360,220,!0,!0,function(){window.openFile=null});if(!b){var e=this.dialog,f=e.close;this.dialog.close=mxUtils.bind(this,function(a){Editor.useLocalStorage=d;f.apply(e,arguments);a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importFile=function(a,b,d,e,k,h,m,l,p,q,t){q=null!=q?q:!0;var c=!1,f=null,g=mxUtils.bind(this,function(a){var c=
+null;null!=a&&"<mxlibrary"==a.substring(0,10)?this.loadLibrary(new LocalLibrary(this,a,m)):c=this.importXml(a,d,e,q);null!=l&&l(c)});"image"==b.substring(0,5)?(p=!1,"image/png"==b.substring(0,9)&&(b=t?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(f=this.importXml(b,d,e,q),p=!0)),p||(f=this.editor.graph,b=a.indexOf(";"),0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1))),q&&f.isGridEnabled()&&(d=f.snap(d),e=f.snap(e)),f=[f.insertVertex(null,null,"",d,e,k,h,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
a+";")])):/(\.*<graphml )/.test(a)?(c=!0,this.importGraphML(a,g)):null!=p&&null!=m&&(/(\.v(dx|sdx?))($|\?)/i.test(m)||/(\.vs(x|sx?))($|\?)/i.test(m))?(c=!0,this.importVisio(p,g)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,m)?(c=!0,this.parseFile(null!=p?p:new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?g(a.responseText):null!=l&&l(null))}),m)):/(\.v(sd|dx))($|\?)/i.test(m)||/(\.vs(s|x))($|\?)/i.test(m)||
(f=this.insertTextAt(this.validateFileData(a),d,e,!0,null,q));c||null==l||l(f);return f};EditorUi.prototype.base64Encode=function(a){for(var c="",b=0,d=a.length,e,h,k;b<d;){e=a.charCodeAt(b++)&255;if(b==d){c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4);c+="==";break}h=a.charCodeAt(b++);if(b==d){c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);
c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(h&240)>>4);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((h&15)<<2);c+="=";break}k=a.charCodeAt(b++);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(h&240)>>4);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((h&15)<<2|(k&192)>>6);c+=
-"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(k&63)}return c};EditorUi.prototype.importFiles=function(a,b,d,e,k,h,m,l,p,q,u,t){b=null!=b?b:0;d=null!=d?d:0;e=null!=e?e:this.maxImageSize;q=null!=q?q:this.maxImageBytes;var c=null!=b&&null!=d,f=!0,g=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var n=u||this.resampleThreshold,r=0;r<a.length;r++)if("image/"==a[r].type.substring(0,6)&&a[r].size>n){g=!0;break}var v=mxUtils.bind(this,function(){var g=this.editor.graph,n=g.gridSize;
-k=null!=k?k:mxUtils.bind(this,function(a,b,d,e,f,g,h,k,m){return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,h)),null):this.importFile(a,b,d,e,f,g,h,k,m,c,t)});h=null!=h?h:mxUtils.bind(this,function(a){g.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var r=a.length,p=r,v=[],w=mxUtils.bind(this,function(a,c){v[a]=c;if(0==--p){this.spinner.stop();if(null!=l)l(v);else{var b=[];g.getModel().beginUpdate();
-try{for(var d=0;d<v.length;d++){var e=v[d]();null!=e&&(b=b.concat(e))}}finally{g.getModel().endUpdate()}}h(b)}}),z=0;z<r;z++)mxUtils.bind(this,function(c){var h=a[c],l=new FileReader;l.onload=mxUtils.bind(this,function(a){if(null==m||m(h))if("image/"==h.type.substring(0,6))if("image/svg"==h.type.substring(0,9)){var l=a.target.result,r=l.indexOf(","),p=decodeURIComponent(escape(atob(l.substring(r+1)))),v=mxUtils.parseXml(p),p=v.getElementsByTagName("svg");if(0<p.length){var p=p[0],y=t?null:p.getAttribute("content");
+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(k&63)}return c};EditorUi.prototype.importFiles=function(a,b,d,e,k,h,m,l,p,q,t,u){b=null!=b?b:0;d=null!=d?d:0;e=null!=e?e:this.maxImageSize;q=null!=q?q:this.maxImageBytes;var c=null!=b&&null!=d,f=!0,g=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var n=t||this.resampleThreshold,r=0;r<a.length;r++)if("image/"==a[r].type.substring(0,6)&&a[r].size>n){g=!0;break}var v=mxUtils.bind(this,function(){var g=this.editor.graph,n=g.gridSize;
+k=null!=k?k:mxUtils.bind(this,function(a,b,d,e,f,g,h,k,m){return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,h)),null):this.importFile(a,b,d,e,f,g,h,k,m,c,u)});h=null!=h?h:mxUtils.bind(this,function(a){g.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var r=a.length,p=r,v=[],w=mxUtils.bind(this,function(a,c){v[a]=c;if(0==--p){this.spinner.stop();if(null!=l)l(v);else{var b=[];g.getModel().beginUpdate();
+try{for(var d=0;d<v.length;d++){var e=v[d]();null!=e&&(b=b.concat(e))}}finally{g.getModel().endUpdate()}}h(b)}}),z=0;z<r;z++)mxUtils.bind(this,function(c){var h=a[c],l=new FileReader;l.onload=mxUtils.bind(this,function(a){if(null==m||m(h))if("image/"==h.type.substring(0,6))if("image/svg"==h.type.substring(0,9)){var l=a.target.result,r=l.indexOf(","),p=decodeURIComponent(escape(atob(l.substring(r+1)))),v=mxUtils.parseXml(p),p=v.getElementsByTagName("svg");if(0<p.length){var p=p[0],y=u?null:p.getAttribute("content");
null!=y&&"<"!=y.charAt(0)&&"%"!=y.charAt(0)&&(y=unescape(window.atob?atob(y):Base64.decode(y,!0)));null!=y&&"%"==y.charAt(0)&&(y=decodeURIComponent(y));null==y||"<mxfile "!==y.substring(0,8)&&"<mxGraphModel "!==y.substring(0,14)?w(c,mxUtils.bind(this,function(){try{if(l.substring(0,r+1),null!=v){var a=v.getElementsByTagName("svg");if(0<a.length){var f=a[0],m=parseFloat(f.getAttribute("width")),p=parseFloat(f.getAttribute("height")),q=f.getAttribute("viewBox");if(null==q||0==q.length)f.setAttribute("viewBox",
-"0 0 "+m+" "+p);else if(isNaN(m)||isNaN(p)){var t=q.split(" ");3<t.length&&(m=parseFloat(t[2]),p=parseFloat(t[3]))}l=this.createSvgDataUri(mxUtils.getXml(f));var y=Math.min(1,Math.min(e/Math.max(1,m)),e/Math.max(1,p)),w=k(l,h.type,b+c*n,d+c*n,Math.max(1,Math.round(m*y)),Math.max(1,Math.round(p*y)),h.name);if(isNaN(m)||isNaN(p)){var u=new Image;u.onload=mxUtils.bind(this,function(){m=Math.max(1,u.width);p=Math.max(1,u.height);w[0].geometry.width=m;w[0].geometry.height=p;f.setAttribute("viewBox","0 0 "+
-m+" "+p);l=this.createSvgDataUri(mxUtils.getXml(f));var a=l.indexOf(";");0<a&&(l=l.substring(0,a)+l.substring(l.indexOf(",",a+1)));g.setCellStyles("image",l,[w[0]])});u.src=this.createSvgDataUri(mxUtils.getXml(f))}return w}}}catch(fa){}return null})):w(c,mxUtils.bind(this,function(){return k(y,"text/xml",b+c*n,d+c*n,0,0,h.name)}))}else w(c,mxUtils.bind(this,function(){return null}))}else{p=!1;if("image/png"==h.type){var I=t?null:this.extractGraphModelFromPng(a.target.result);if(null!=I&&0<I.length){var z=
-new Image;z.src=a.target.result;w(c,mxUtils.bind(this,function(){return k(I,"text/xml",b+c*n,d+c*n,z.width,z.height,h.name)}));p=!0}}p||(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(a.target.result,mxUtils.bind(this,function(g){this.resizeImage(g,a.target.result,
-mxUtils.bind(this,function(g,m,l){w(c,mxUtils.bind(this,function(){if(null!=g&&g.length<q){var r=f&&this.isResampleImage(a.target.result,u)?Math.min(1,Math.min(e/m,e/l)):1;return k(g,h.type,b+c*n,d+c*n,Math.round(m*r),Math.round(l*r),h.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),f,e,u)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else k(a.target.result,h.type,b+c*n,d+c*n,240,160,h.name,function(a){w(c,
+"0 0 "+m+" "+p);else if(isNaN(m)||isNaN(p)){var u=q.split(" ");3<u.length&&(m=parseFloat(u[2]),p=parseFloat(u[3]))}l=this.createSvgDataUri(mxUtils.getXml(f));var y=Math.min(1,Math.min(e/Math.max(1,m)),e/Math.max(1,p)),w=k(l,h.type,b+c*n,d+c*n,Math.max(1,Math.round(m*y)),Math.max(1,Math.round(p*y)),h.name);if(isNaN(m)||isNaN(p)){var t=new Image;t.onload=mxUtils.bind(this,function(){m=Math.max(1,t.width);p=Math.max(1,t.height);w[0].geometry.width=m;w[0].geometry.height=p;f.setAttribute("viewBox","0 0 "+
+m+" "+p);l=this.createSvgDataUri(mxUtils.getXml(f));var a=l.indexOf(";");0<a&&(l=l.substring(0,a)+l.substring(l.indexOf(",",a+1)));g.setCellStyles("image",l,[w[0]])});t.src=this.createSvgDataUri(mxUtils.getXml(f))}return w}}}catch(ra){}return null})):w(c,mxUtils.bind(this,function(){return k(y,"text/xml",b+c*n,d+c*n,0,0,h.name)}))}else w(c,mxUtils.bind(this,function(){return null}))}else{p=!1;if("image/png"==h.type){var z=u?null:this.extractGraphModelFromPng(a.target.result);if(null!=z&&0<z.length){var I=
+new Image;I.src=a.target.result;w(c,mxUtils.bind(this,function(){return k(z,"text/xml",b+c*n,d+c*n,I.width,I.height,h.name)}));p=!0}}p||(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(a.target.result,mxUtils.bind(this,function(g){this.resizeImage(g,a.target.result,
+mxUtils.bind(this,function(g,m,l){w(c,mxUtils.bind(this,function(){if(null!=g&&g.length<q){var p=f&&this.isResampleImage(a.target.result,t)?Math.min(1,Math.min(e/m,e/l)):1;return k(g,h.type,b+c*n,d+c*n,Math.round(m*p),Math.round(l*p),h.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),f,e,t)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else k(a.target.result,h.type,b+c*n,d+c*n,240,160,h.name,function(a){w(c,
function(){return a})})});/(\.v(dx|sdx?))($|\?)/i.test(h.name)||/(\.vs(x|sx?))($|\?)/i.test(h.name)?k(null,h.type,b+c*n,d+c*n,240,160,h.name,function(a){w(c,function(){return a})},h):"image"==h.type.substring(0,5)?l.readAsDataURL(h):l.readAsText(h)})(z)});g?this.confirmImageResize(function(a){f=a;v()},p):v()};EditorUi.prototype.confirmImageResize=function(a,b){b=null!=b?b:!1;var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},d=isLocalStorage||mxClient.IS_CHROMEAPP?
mxSettings.getResizeImages():null,e=function(d,e){if(d||b)mxSettings.setResizeImages(d?e:null),mxSettings.save();c();a(e)};null==d||b?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(a){e(a,!0)},function(a){e(a,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||
mxClient.IS_CHROMEAPP?220:200,!0,!0):e(!1,d)};EditorUi.prototype.parseFile=function(a,b,d){d=null!=d?d:a.name;var c=new FormData;c.append("format","xml");c.append("upfile",a,d);var e=new XMLHttpRequest;e.open("POST",OPEN_URL);e.onreadystatechange=function(){b(e)};e.send(c)};EditorUi.prototype.isResampleImage=function(a,b){b=null!=b?b:this.resampleThreshold;return a.length>b};EditorUi.prototype.resizeImage=function(a,b,d,e,k,h){k=null!=k?k:this.maxImageSize;var c=Math.max(1,a.width),f=Math.max(1,a.height);
-if(e&&this.isResampleImage(b,h))try{var g=Math.max(c/k,f/k);if(1<g){var l=Math.round(c/g),n=Math.round(f/g),p=document.createElement("canvas");p.width=l;p.height=n;p.getContext("2d").drawImage(a,0,0,l,n);var r=p.toDataURL();if(r.length<b.length){var q=document.createElement("canvas");q.width=l;q.height=n;var u=q.toDataURL();r!==u&&(b=r,c=l,f=n)}}}catch(C){}d(b,c,f)};EditorUi.prototype.crcTable=[];for(var e=0;256>e;e++)for(var d=e,k=0;8>k;k++)d=1==(d&1)?3988292384^d>>>1:d>>>1,EditorUi.prototype.crcTable[e]=
+if(e&&this.isResampleImage(b,h))try{var g=Math.max(c/k,f/k);if(1<g){var l=Math.round(c/g),n=Math.round(f/g),p=document.createElement("canvas");p.width=l;p.height=n;p.getContext("2d").drawImage(a,0,0,l,n);var r=p.toDataURL();if(r.length<b.length){var q=document.createElement("canvas");q.width=l;q.height=n;var t=q.toDataURL();r!==t&&(b=r,c=l,f=n)}}}catch(D){}d(b,c,f)};EditorUi.prototype.crcTable=[];for(var e=0;256>e;e++)for(var d=e,k=0;8>k;k++)d=1==(d&1)?3988292384^d>>>1:d>>>1,EditorUi.prototype.crcTable[e]=
d;EditorUi.prototype.updateCRC=function(a,b,d,e){for(var c=0;c<e;c++)a=EditorUi.prototype.crcTable[(a^b[d+c])&255]^a>>>8;return a};EditorUi.prototype.crc32=function(a){this.crcTable=this.crcTable||this.createCrcTable();for(var c=-1,b=0;b<a.length;b++)c=c>>>8^this.crcTable[(c^a.charCodeAt(b))&255];return(c^-1)>>>0};EditorUi.prototype.writeGraphModelToPng=function(a,b,d,e,k){function c(a,b){var c=l;l+=b;return a.substring(c,l)}function f(a){a=c(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<
16)+(a.charCodeAt(0)<<24)}function g(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var l=0;if(c(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=k&&k();else if(c(a,4),"IHDR"!=c(a,4))null!=k&&k();else{c(a,17);k=a.substring(0,l);do{var n=f(a);if("IDAT"==c(a,4)){k=a.substring(0,l-8);d=d+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+e;e=4294967295;e=this.updateCRC(e,
b,0,4);e=this.updateCRC(e,d,0,d.length);k+=g(d.length)+b+d+g(e^4294967295);k+=a.substring(l-8,a.length);break}k+=a.substring(l-8,l-4+n);c(a,n);c(a,4)}while(n);return"data:image/png;base64,"+(window.btoa?btoa(k):Base64.encode(k,!0))}};EditorUi.prototype.extractGraphModelFromPng=function(a){var b=null;try{var c=a.substring(a.indexOf(",")+1),d=window.atob&&!mxClient.IS_SF?atob(c):Base64.decode(c,!0);EditorUi.parsePng(d,mxUtils.bind(this,function(a,c,e){a=d.substring(a+8,a+8+e);"zTXt"==c?(e=a.indexOf(String.fromCharCode(0)),
@@ -3056,22 +3057,22 @@ d);c.src=a};var l=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxS
arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://desk.draw.io/support/solutions/articles/16000051979");var e=a.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(b){b=null!=b?b:"";if(null!=a.pages&&null!=a.currentPage)for(var c=0;c<a.pages.length;c++)if(a.pages[c]==a.currentPage){0<c&&(b+=(0<b.length?"&":"?")+"page="+c);break}"1"==urlParams.dev&&(b+=(0<b.length?"&":"?")+"dev=1&drawdev=1");return e.apply(this,arguments)};
var k=b.addClickHandler;b.addClickHandler=function(a,c,d){var e=c;c=function(a,c){if(null==c){var d=mxEvent.getSource(a);"a"==d.nodeName.toLowerCase()&&(c=d.getAttribute("href"))}null!=c&&b.isCustomLink(c)&&(mxEvent.isTouchEvent(a)||!mxEvent.isPopupTrigger(a))&&b.customLinkClicked(c)&&mxEvent.consume(a);null!=e&&e(a,c)};k.call(this,a,c,d)};l.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(b.view.canvas.ownerSVGElement,null,!0);a.actions.get("print").funct=function(){a.showDialog((new PrintDialog(a)).container,
360,null!=a.pages&&1<a.pages.length?420:360,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var h=b.getGlobalVariable;b.getGlobalVariable=function(b){return"page"==b&&null!=a.currentPage?a.currentPage.getName():"pagenumber"==b?null!=a.currentPage&&null!=a.pages?mxUtils.indexOf(a.pages,a.currentPage)+1:1:h.apply(this,arguments)};var m=b.labelLinkClicked;b.labelLinkClicked=function(a,c,d){var e=c.getAttribute("href");if(null==e||!b.isCustomLink(e)||!mxEvent.isTouchEvent(d)&&mxEvent.isPopupTrigger(d))m.apply(this,
-arguments);else{if(!b.isEnabled()||null!=a&&b.isCellLocked(a.cell))b.customLinkClicked(e),b.getRubberband().reset();mxEvent.consume(d)}};this.editor.getOrCreateFilename=function(){var b=a.defaultFilename,c=a.getCurrentFile();null!=c&&(b=null!=c.getTitle()?c.getTitle():b);return b};var p=this.actions.get("print");p.setEnabled(!mxClient.IS_IOS||!navigator.standalone);p.visible=p.isEnabled();if(!this.editor.chromeless||this.editor.editable){var q=function(){window.setTimeout(function(){u.innerHTML="&nbsp;";
-u.focus();document.execCommand("selectAll",!1,null)},0)};this.keyHandler.bindAction(70,!0,"find");this.keyHandler.bindAction(67,!0,"copyStyle",!0);this.keyHandler.bindAction(86,!0,"pasteStyle",!0);this.keyHandler.bindAction(77,!0,"editGeometry",!0);this.keyHandler.bindAction(88,!0,"insertText",!0);this.keyHandler.bindAction(75,!0,"insertRectangle");this.keyHandler.bindAction(75,!0,"insertEllipse",!0);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(this.altShiftActions[83]="synchronize");mxClient.IS_IE||
+arguments);else{if(!b.isEnabled()||null!=a&&b.isCellLocked(a.cell))b.customLinkClicked(e),b.getRubberband().reset();mxEvent.consume(d)}};this.editor.getOrCreateFilename=function(){var b=a.defaultFilename,c=a.getCurrentFile();null!=c&&(b=null!=c.getTitle()?c.getTitle():b);return b};var p=this.actions.get("print");p.setEnabled(!mxClient.IS_IOS||!navigator.standalone);p.visible=p.isEnabled();if(!this.editor.chromeless||this.editor.editable){var q=function(){window.setTimeout(function(){t.innerHTML="&nbsp;";
+t.focus();document.execCommand("selectAll",!1,null)},0)};this.keyHandler.bindAction(70,!0,"find");this.keyHandler.bindAction(67,!0,"copyStyle",!0);this.keyHandler.bindAction(86,!0,"pasteStyle",!0);this.keyHandler.bindAction(77,!0,"editGeometry",!0);this.keyHandler.bindAction(88,!0,"insertText",!0);this.keyHandler.bindAction(75,!0,"insertRectangle");this.keyHandler.bindAction(75,!0,"insertEllipse",!0);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(this.altShiftActions[83]="synchronize");mxClient.IS_IE||
b.container.addEventListener("paste",mxUtils.bind(this,function(a){var b=this.editor.graph;if(!mxEvent.isConsumed(a))try{for(var c=a.clipboardData||a.originalEvent.clipboardData,d=!1,e=0;e<c.types.length;e++)if("text/"===c.types[e].substring(0,5)){d=!0;break}if(!d){var f=c.items;for(index in f){var g=f[index];if("file"===g.kind){if(b.isEditing())this.importFiles([g.getAsFile()],0,0,this.maxImageSize,function(a,c,d,e,f,g){b.insertImage(a,f,g)},function(){},function(a){return"image/"==a.type.substring(0,
-6)},function(a){for(var b=0;b<a.length;b++)a[b]()});else{var h=this.editor.graph.getInsertPoint();this.importFiles([g.getAsFile()],h.x,h.y,this.maxImageSize);mxEvent.consume(a)}break}}}}catch(U){}}),!1);var u=document.createElement("div");u.style.position="absolute";u.style.whiteSpace="nowrap";u.style.overflow="hidden";u.style.display="block";u.contentEditable=!0;mxUtils.setOpacity(u,0);u.style.width="1px";u.style.height="1px";u.innerHTML="&nbsp;";var x=!1;this.keyHandler.bindControlKey(88,null);
-this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(a){var c=mxEvent.getSource(a);null==b.container||!b.isEnabled()||b.isMouseDown||b.isEditing()||null!=this.dialog||"INPUT"==c.nodeName||"TEXTAREA"==c.nodeName||!(224==a.keyCode||!mxClient.IS_MAC&&17==a.keyCode||mxClient.IS_MAC&&91==a.keyCode)||x||(u.style.left=b.container.scrollLeft+10+"px",u.style.top=b.container.scrollTop+10+"px",b.container.appendChild(u),
-x=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){u.focus();document.execCommand("selectAll",!1,null)},0):(u.focus(),document.execCommand("selectAll",!1,null)))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(a){var c=a.keyCode;window.setTimeout(mxUtils.bind(this,function(){!x||224!=c&&17!=c&&91!=c||(x=!1,b.isEditing()||null!=this.dialog||null==b.container||b.container.focus(),u.parentNode.removeChild(u),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(u,
-"copy",mxUtils.bind(this,function(a){b.isEnabled()&&(mxClipboard.copy(b),this.copyCells(u),q())}));mxEvent.addListener(u,"cut",mxUtils.bind(this,function(a){b.isEnabled()&&(mxClipboard.copy(b),this.copyCells(u,!0),q())}));mxEvent.addListener(u,"paste",mxUtils.bind(this,function(a){b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(u.innerHTML="&nbsp;",u.focus(),window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,u);u.innerHTML="&nbsp;"}),0))}),!0);var t=this.isSelectionAllowed;this.isSelectionAllowed=
-function(a){return mxEvent.getSource(a)==u?!0:t.apply(this,arguments)}}this.spinner=this.createSpinner(document.body.clientWidth/2-2,Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,24);Graph.fileSupport&&this.editor.graph.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(a){var b=this.editor.graph,c=b.cellEditor.text2,d=null;null!=c&&(mxEvent.addListener(c,"dragleave",function(a){null!=d&&(d.parentNode.removeChild(d),d=null);a.stopPropagation();a.preventDefault()}),
+6)},function(a){for(var b=0;b<a.length;b++)a[b]()});else{var h=this.editor.graph.getInsertPoint();this.importFiles([g.getAsFile()],h.x,h.y,this.maxImageSize);mxEvent.consume(a)}break}}}}catch(T){}}),!1);var t=document.createElement("div");t.style.position="absolute";t.style.whiteSpace="nowrap";t.style.overflow="hidden";t.style.display="block";t.contentEditable=!0;mxUtils.setOpacity(t,0);t.style.width="1px";t.style.height="1px";t.innerHTML="&nbsp;";var x=!1;this.keyHandler.bindControlKey(88,null);
+this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(a){var c=mxEvent.getSource(a);null==b.container||!b.isEnabled()||b.isMouseDown||b.isEditing()||null!=this.dialog||"INPUT"==c.nodeName||"TEXTAREA"==c.nodeName||!(224==a.keyCode||!mxClient.IS_MAC&&17==a.keyCode||mxClient.IS_MAC&&91==a.keyCode)||x||(t.style.left=b.container.scrollLeft+10+"px",t.style.top=b.container.scrollTop+10+"px",b.container.appendChild(t),
+x=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){t.focus();document.execCommand("selectAll",!1,null)},0):(t.focus(),document.execCommand("selectAll",!1,null)))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(a){var c=a.keyCode;window.setTimeout(mxUtils.bind(this,function(){!x||224!=c&&17!=c&&91!=c||(x=!1,b.isEditing()||null!=this.dialog||null==b.container||b.container.focus(),t.parentNode.removeChild(t),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(t,
+"copy",mxUtils.bind(this,function(a){b.isEnabled()&&(mxClipboard.copy(b),this.copyCells(t),q())}));mxEvent.addListener(t,"cut",mxUtils.bind(this,function(a){b.isEnabled()&&(mxClipboard.copy(b),this.copyCells(t,!0),q())}));mxEvent.addListener(t,"paste",mxUtils.bind(this,function(a){b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(t.innerHTML="&nbsp;",t.focus(),window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,t);t.innerHTML="&nbsp;"}),0))}),!0);var u=this.isSelectionAllowed;this.isSelectionAllowed=
+function(a){return mxEvent.getSource(a)==t?!0:u.apply(this,arguments)}}this.spinner=this.createSpinner(document.body.clientWidth/2-2,Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,24);Graph.fileSupport&&this.editor.graph.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(a){var b=this.editor.graph,c=b.cellEditor.text2,d=null;null!=c&&(mxEvent.addListener(c,"dragleave",function(a){null!=d&&(d.parentNode.removeChild(d),d=null);a.stopPropagation();a.preventDefault()}),
mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(a){null==d&&(!mxClient.IS_IE||10<document.documentMode)&&(d=this.highlightElement(c));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(c,"drop",mxUtils.bind(this,function(a){null!=d&&(d.parentNode.removeChild(d),d=null);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,function(a,c,d,e,f,g){b.insertImage(a,f,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=
0;b<a.length;b++)a[b]()},mxEvent.isControlDown(a));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")){var c=a.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)?this.loadImage(decodeURIComponent(c),mxUtils.bind(this,function(a){var d=Math.max(1,a.width);a=Math.max(1,a.height);var e=this.maxImageSize,e=Math.min(1,Math.min(e/Math.max(1,d)),e/Math.max(1,a));b.insertImage(decodeURIComponent(c),d*e,a*e)})):document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"))}else 0<=
mxUtils.indexOf(a.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"));a.stopPropagation();a.preventDefault()})))}));if("1"==urlParams.ruler&&"undefined"!==typeof mxRuler){p=document.createElement("div");p.style.position="absolute";p.style.top="95px";p.style.left="250px";p.style.width="2000px";p.style.height="30px";p.style.background=
-"whiteSmoke";document.body.appendChild(p);var z=document.createElement("div");z.style.position="absolute";z.style.top="125px";z.style.left="220px";z.style.width="30px";z.style.height="1000px";z.style.background="whiteSmoke";document.body.appendChild(z);var B=document.createElement("div");B.style.position="absolute";B.style.top="95px";B.style.left="220px";B.style.width="30px";B.style.height="30px";B.style.background="whiteSmoke";document.body.appendChild(B);this.vRuler=new mxRuler(this.editor.graph,
+"whiteSmoke";document.body.appendChild(p);var z=document.createElement("div");z.style.position="absolute";z.style.top="125px";z.style.left="220px";z.style.width="30px";z.style.height="1000px";z.style.background="whiteSmoke";document.body.appendChild(z);var C=document.createElement("div");C.style.position="absolute";C.style.top="95px";C.style.left="220px";C.style.width="30px";C.style.height="30px";C.style.background="whiteSmoke";document.body.appendChild(C);this.vRuler=new mxRuler(this.editor.graph,
z,!0);this.hRuler=new mxRuler(this.editor.graph,p,!1)}if("1"==urlParams.styledev){p=document.getElementById("geFooter");null!=p&&(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)})),p.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){if(0<this.editor.graph.getSelectionCount()){var c=this.editor.graph.getSelectionCell(),c=this.editor.graph.getModel().getStyle(c);this.styleInput.value=c||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var N=this.isSelectionAllowed;
-this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:N.apply(this,arguments)}}p=document.getElementById("geInfo");null!=p&&p.parentNode.removeChild(p);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var C=null;mxEvent.addListener(b.container,"dragleave",function(a){b.isEnabled()&&(null!=C&&(C.parentNode.removeChild(C),C=null),a.stopPropagation(),a.preventDefault())});mxEvent.addListener(b.container,"dragover",mxUtils.bind(this,function(a){null==
-C&&(!mxClient.IS_IE||10<document.documentMode)&&(C=this.highlightElement(b.container));null!=this.sidebar&&this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()}));mxEvent.addListener(b.container,"drop",mxUtils.bind(this,function(a){null!=C&&(C.parentNode.removeChild(C),C=null);if(b.isEnabled()){var c=mxUtils.convertPoint(b.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),d=b.view.translate,e=b.view.scale,f=c.x/e-d.x,g=c.y/e-d.y;mxEvent.isAltDown(a)&&(g=f=0);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,
+this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:N.apply(this,arguments)}}p=document.getElementById("geInfo");null!=p&&p.parentNode.removeChild(p);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var D=null;mxEvent.addListener(b.container,"dragleave",function(a){b.isEnabled()&&(null!=D&&(D.parentNode.removeChild(D),D=null),a.stopPropagation(),a.preventDefault())});mxEvent.addListener(b.container,"dragover",mxUtils.bind(this,function(a){null==
+D&&(!mxClient.IS_IE||10<document.documentMode)&&(D=this.highlightElement(b.container));null!=this.sidebar&&this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()}));mxEvent.addListener(b.container,"drop",mxUtils.bind(this,function(a){null!=D&&(D.parentNode.removeChild(D),D=null);if(b.isEnabled()){var c=mxUtils.convertPoint(b.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),d=b.view.translate,e=b.view.scale,f=c.x/e-d.x,g=c.y/e-d.y;mxEvent.isAltDown(a)&&(g=f=0);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,
f,g,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a));else{var h=0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):null,c=this.extractGraphModelFromEvent(a,null!=this.pages);if(null!=c)b.setSelectionCells(this.importXml(c,f,g,!0));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")){var k=a.dataTransfer.getData("text/html"),c=document.createElement("div");c.innerHTML=k;var m=null,d=c.getElementsByTagName("img");
null!=d&&1==d.length?(k=d[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)||(m=!0)):(c=c.getElementsByTagName("a"),null!=c&&1==c.length&&(k=c[0].getAttribute("href")));var l=!0,n=mxUtils.bind(this,function(){b.setSelectionCells(this.insertTextAt(k,f,g,!0,m,null,l))});m&&k.length>this.resampleThreshold?this.confirmImageResize(function(a){l=a;n()},mxEvent.isControlDown(a)):n()}else null!=h&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(h)?this.loadImage(decodeURIComponent(h),mxUtils.bind(this,
function(a){var c=Math.max(1,a.width);a=Math.max(1,a.height);var d=this.maxImageSize,d=Math.min(1,Math.min(d/Math.max(1,c)),d/Math.max(1,a));b.setSelectionCell(b.insertVertex(null,null,"",f,g,c*d,a*d,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+h+";"))}),mxUtils.bind(this,function(a){b.setSelectionCells(this.insertTextAt(h,f,g,!0))})):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&b.setSelectionCells(this.insertTextAt(a.dataTransfer.getData("text/plain"),
@@ -3093,7 +3094,7 @@ h.style.top=b+"px";h.style.left=c+"px";h.style.width=Math.max(0,d-3)+"px";h.styl
c))}return a};EditorUi.prototype.openFiles=function(a,b){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var c=0;c<a.length;c++)mxUtils.bind(this,function(a){var c=new FileReader;c.onload=mxUtils.bind(this,function(c){var d=c.target.result,e=a.name;if(null!=e&&0<e.length){!this.useCanvasForExport&&/(\.png)$/i.test(e)&&(e=e.substring(0,e.length-4)+".xml");var f=mxUtils.bind(this,function(a){e=0<=e.lastIndexOf(".")?e.substring(0,e.lastIndexOf("."))+".xml":e+".xml";if("<mxlibrary"==
a.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,b);try{this.loadLibrary(new LocalLibrary(this,a,e))}catch(x){this.handleError(x,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(a,e,b)});if(/(\.v(dx|sdx?))($|\?)/i.test(e)||/(\.vs(x|sx?))($|\?)/i.test(e))this.importVisio(a,mxUtils.bind(this,function(a){this.spinner.stop();f(a)}));else if(/(\.*<graphml )/.test(d))this.importGraphML(d,mxUtils.bind(this,function(a){this.spinner.stop();
f(a)}));else if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,e))this.parseFile(a,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?f(a.responseText):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(d))/(\.json)$/i.test(e)&&(e=e.substring(0,e.length-5)+".xml"),this.convertLucidChart(d,
-mxUtils.bind(this,function(a){this.spinner.stop();this.openLocalFile(a,e,b)}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}));else if("<mxlibrary"==c.target.result.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,b);try{this.loadLibrary(new LocalLibrary(this,c.target.result,a.name))}catch(D){this.handleError(D,mxResources.get("errorLoadingFile"))}}else"image/png"==a.type.substring(0,
+mxUtils.bind(this,function(a){this.spinner.stop();this.openLocalFile(a,e,b)}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}));else if("<mxlibrary"==c.target.result.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,b);try{this.loadLibrary(new LocalLibrary(this,c.target.result,a.name))}catch(E){this.handleError(E,mxResources.get("errorLoadingFile"))}}else"image/png"==a.type.substring(0,
9)&&(d=this.extractGraphModelFromPng(d)),this.spinner.stop(),this.openLocalFile(d,e,b)}});c.onerror=mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a);window.openFile=null});"image"===a.type.substring(0,5)&&"image/svg"!==a.type.substring(0,9)?c.readAsDataURL(a):c.readAsText(a)})(a[c])};EditorUi.prototype.openLocalFile=function(a,b,d){var c=this.getCurrentFile(),e=mxUtils.bind(this,function(){window.openFile=null;if(null==b&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var c=
mxUtils.parseXml(a);null!=c&&(this.editor.setGraphXml(c.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,a,b||this.defaultFilename,d))});null!=a&&0<a.length&&(null==c||!c.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)?e():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&null!=c&&c.isModified()?this.confirm(mxResources.get("allChangesLost"),null,e,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=
null}),window.openFile.setData(a,b),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=c&&c.isModified()?this.confirm(mxResources.get("allChangesLost"),null,e,mxResources.get("cancel"),mxResources.get("discardChanges")):e()}))))};EditorUi.prototype.getBasenames=function(){var a={};if(null!=this.pages)for(var b=0;b<this.pages.length;b++)this.updatePageRoot(this.pages[b]),this.addBasenamesForCell(this.pages[b].root,a);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),
@@ -3111,14 +3112,14 @@ g.action){this.spinner.stop();h=1==g.enableRecent;l=1==g.enableSearch;h=new NewD
"*")}):null,l?mxUtils.bind(this,function(a,b){this.searchReadyCallback=b;k.postMessage(JSON.stringify({event:"searchDocs",searchStr:a}),"*")}):null,function(a,b,c){k.postMessage(JSON.stringify({event:"template",docUrl:a,info:b,name:c}),"*")});this.showDialog(h.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));h.init();return}if("searchDocsList"==g.action)this.searchReadyCallback(g.list,g.errorMsg);else if("recentDocsList"==g.action)this.recentReadyCallback(g.list,
g.errorMsg);else{if("textContent"==g.action){this.editor.graph.setEnabled(!1);var m=this.editor.graph,h="";if(null!=this.pages)for(l=0;l<this.pages.length;l++){var p=m;this.currentPage!=this.pages[l]&&(p=this.createTemporaryGraph(m.getStylesheet()),p.model.setRoot(this.pages[l].root));h+=this.pages[l].getName()+" "+p.getIndexableText()+" "}else h=m.getIndexableText();this.editor.graph.setEnabled(!0);k.postMessage(JSON.stringify({event:"textContent",data:h,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 n=null!=g.messageKey?mxResources.get(g.messageKey):g.message;null==g.show||g.show?this.spinner.spin(document.body,n):this.spinner.stop();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 q=null!=g.xml?g.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var m=this.editor.graph,r=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();var b=this.createLoadMessage("export");b.format=g.format;b.message=g;b.data=a;b.xml=encodeURIComponent(q);k.postMessage(JSON.stringify(b),"*")}),u=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);"xmlpng"==g.format&&(a=this.writeGraphModelToPng(a,"zTXt",
+null!=g.spinKey?mxResources.get(g.spinKey):g.spin)){var q=null!=g.xml?g.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var m=this.editor.graph,r=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();var b=this.createLoadMessage("export");b.format=g.format;b.message=g;b.data=a;b.xml=encodeURIComponent(q);k.postMessage(JSON.stringify(b),"*")}),t=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);"xmlpng"==g.format&&(a=this.writeGraphModelToPng(a,"zTXt",
"mxGraphModel",atob(this.editor.graph.compress(q))));m!=this.editor.graph&&m.container.parentNode.removeChild(m.container);r(a)});if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage!=this.pages[0]){var m=this.createTemporaryGraph(m.getStylesheet()),w=m.getGlobalVariable,y=this.pages[0];m.getGlobalVariable=function(a){return"page"==a?y.getName():"pagenumber"==a?1:w.apply(this,arguments)};document.body.appendChild(m.container);m.model.setRoot(y.root)}this.exportToCanvas(mxUtils.bind(this,
-function(a){u(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,function(){u(null)}),null,null,null,null,null,null,m)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==g.format?"1":"0")+"&base64=1&xml="+encodeURIComponent(encodeURIComponent(q)))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?r("data:image/png;base64,"+a.getText()):u(null)}),mxUtils.bind(this,function(){u(null)}))}}else{null!=g.xml&&0<g.xml.length&&this.setFileData(g.xml);n=this.createLoadMessage("export");
+function(a){t(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,function(){t(null)}),null,null,null,null,null,null,m)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==g.format?"1":"0")+"&base64=1&xml="+encodeURIComponent(encodeURIComponent(q)))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?r("data:image/png;base64,"+a.getText()):t(null)}),mxUtils.bind(this,function(){t(null)}))}}else{null!=g.xml&&0<g.xml.length&&this.setFileData(g.xml);n=this.createLoadMessage("export");
if("html2"==g.format||"html"==g.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length))h=this.getXmlFileData(),n.xml=mxUtils.getXml(h),n.data=this.getFileData(null,null,!0,null,null,null,h),n.format=g.format;else if("html"==g.format)q=this.editor.getGraphXml(),n.data=this.getHtml(q,this.editor.graph),n.xml=mxUtils.getXml(q),n.format=g.format;else{mxSvgCanvas2D.prototype.foAltText=null;h=this.editor.graph.background;h==mxConstants.NONE&&(h=null);n.xml=this.getFileData(!0);n.format="svg";
if(g.embedImages||null==g.embedImages){if(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin))this.editor.graph.setEnabled(!1),"xmlsvg"==g.format?this.getEmbeddedSvg(n.xml,this.editor.graph,null,!0,mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();n.data=this.createSvgDataUri(a);k.postMessage(JSON.stringify(n),"*")})):this.convertImages(this.editor.graph.getSvg(h),mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);
this.spinner.stop();n.data=this.createSvgDataUri(mxUtils.getXml(a));k.postMessage(JSON.stringify(n),"*")}));return}h="xmlsvg"==g.format?this.getEmbeddedSvg(this.getFileData(!0),this.editor.graph,null,!0):mxUtils.getXml(this.editor.graph.getSvg(h));n.data=this.createSvgDataUri(h)}k.postMessage(JSON.stringify(n),"*")}return}if("load"==g.action)d=1==g.autosave,this.hideDialog(),null!=g.modified&&null==urlParams.modified&&(urlParams.modified=g.modified),null!=g.saveAndExit&&null==urlParams.saveAndExit&&
(urlParams.saveAndExit=g.saveAndExit),null!=g.title&&null!=this.buttonContainer&&(l=document.createElement("span"),mxUtils.write(l,g.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="12px"):"min"!=uiTheme&&(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(l),this.embedFilenameSpan=
-l),g=null!=g.xmlpng?this.extractGraphModelFromPng(g.xmlpng):g.xml;else{k.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(g)}),"*");return}}}var A=mxUtils.bind(this,function(f,g){c=!0;try{a(f,g)}catch(X){this.handleError(X)}c=!1;null!=urlParams.modified&&this.editor.setStatus("");var h=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});e=h();d&&null==b&&(b=mxUtils.bind(this,
+l),g=null!=g.xmlpng?this.extractGraphModelFromPng(g.xmlpng):g.xml;else{k.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(g)}),"*");return}}}var A=mxUtils.bind(this,function(f,g){c=!0;try{a(f,g)}catch(U){this.handleError(U)}c=!1;null!=urlParams.modified&&this.editor.setStatus("");var h=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});e=h();d&&null==b&&(b=mxUtils.bind(this,
function(a,b){var d=h();if(d!=e&&!c){var f=this.createLoadMessage("autosave");f.xml=d;d=JSON.stringify(f);(window.opener||window.parent).postMessage(d,"*")}e=d}),this.editor.graph.model.addListener(mxEvent.CHANGE,b),this.editor.graph.addListener("gridSizeChanged",b),this.editor.graph.addListener("shadowVisibleChanged",b),this.addListener("pageFormatChanged",b),this.addListener("pageScaleChanged",b),this.addListener("backgroundColorChanged",b),this.addListener("backgroundImageChanged",b),this.addListener("foldingEnabledChanged",
b),this.addListener("mathEnabledChanged",b),this.addListener("gridEnabledChanged",b),this.addListener("guidesEnabledChanged",b),this.addListener("pageViewChanged",b));"1"!=urlParams.returnbounds&&"json"!=urlParams.proto||k.postMessage(JSON.stringify(this.createLoadMessage("load")),"*")});null!=g&&"function"===typeof g.substring&&"data:application/vnd.visio;base64,"==g.substring(0,34)?(h="0M8R4KGxGuE"==g.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(g.substring(g.indexOf(",")+
1)),function(a){A(a,f)},mxUtils.bind(this,function(a){this.handleError(a)}),h)):null!=g&&"function"===typeof g.substring&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(g,"")?this.parseFile(new Blob([g],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&"<mxGraphModel"==a.responseText.substring(0,13)&&A(a.responseText,f)}),""):null!=g&&"function"===typeof g.substring&&this.isLucidChartData(g)?this.convertLucidChart(g,
@@ -3126,38 +3127,38 @@ mxUtils.bind(this,function(a){A(a)}),mxUtils.bind(this,function(a){this.handleEr
"2px";var b=document.createElement("button");mxUtils.write(b,mxResources.get("save"));b.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)");b.className="geBigButton";b.style.fontSize="12px";b.style.padding="4px 6px 4px 6px";b.style.borderRadius="3px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()}));a.appendChild(b);"1"==urlParams.saveAndExit&&(b=document.createElement("a"),mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",
mxResources.get("saveAndExit")),b.style.fontSize="12px",b.style.marginLeft="6px",b.style.padding="4px",b.style.cursor="pointer",mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b));b=document.createElement("a");mxUtils.write(b,mxResources.get("exit"));b.setAttribute("title",mxResources.get("exit"));b.style.fontSize="12px";b.style.marginLeft="6px";b.style.marginRight="20px";b.style.padding="4px";b.style.cursor="pointer";mxEvent.addListener(b,
"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()}));a.appendChild(b);this.toolbar.container.appendChild(a);this.toolbar.staticElements.push(a);a.style.right="atlas"!=uiTheme?"52px":"42px"}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(a){this.importCsv(a)}),null,null,620,430,null,!0,!0,mxResources.get("import")));this.showDialog(this.importCsvDialog.container,
-640,520,!0,!0);this.importCsvDialog.init()};EditorUi.prototype.importCsv=function(a,b){try{var c=a.split("\n"),d=[];if(0<c.length){var e={},f=null,k=null,l=null,p=null,q="",u="auto",t="auto",z=null,B=null,N=40,C=40,G=100,J=0,y=this.editor.graph;y.getGraphBounds();for(var A=function(){null!=b?b(aa):(y.setSelectionCells(aa),y.scrollCellToVisible(y.getSelectionCell()))},I=y.getFreeInsertPoint(),O=I.x,Q=I.y,I=Q,X=null,U="auto",p=null,H=[],ea=null,ka=null,Y=0;Y<c.length&&"#"==c[Y].charAt(0);){a=c[Y];for(Y++;Y<
-c.length&&"\\"==a.charAt(a.length-1)&&"#"==c[Y].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(c[Y].substring(1)),Y++;if("#"!=a.charAt(1)){var ba=a.indexOf(":");if(0<ba){var K=mxUtils.trim(a.substring(1,ba)),F=mxUtils.trim(a.substring(ba+1));"label"==K?X=y.sanitizeHtml(F):"style"==K?f=F:"parentstyle"==K?k=F:"identity"==K&&0<F.length&&"-"!=F?l=F:"parent"==K&&0<F.length&&"-"!=F?p=F:"namespace"==K&&0<F.length&&"-"!=F?q=F:"width"==K?u=F:"height"==K?t=F:"left"==K&&0<F.length?z=F:"top"==K&&0<F.length?
-B=F:"ignore"==K?ka=F.split(","):"connect"==K?H.push(JSON.parse(F)):"link"==K?ea=F:"padding"==K?J=parseFloat(F):"edgespacing"==K?N=parseFloat(F):"nodespacing"==K?C=parseFloat(F):"levelspacing"==K?G=parseFloat(F):"layout"==K&&(U=F)}}}var S=this.editor.csvToArray(c[Y]),K=ba=null;if(null!=l||null!=p)for(var L=0;L<S.length;L++)l==S[L]&&(ba=L),p==S[L]&&(K=L);null==X&&(X="%"+S[0]+"%");if(null!=H)for(var M=0;M<H.length;M++)null==e[H[M].to]&&(e[H[M].to]={});y.model.beginUpdate();try{for(L=Y+1;L<c.length;L++){var T=
-this.editor.csvToArray(c[L]);if(T.length==S.length){var E=null,R=null!=ba?q+T[ba]:null;null!=R&&(E=y.model.getCell(R));null==E&&(E=new mxCell(X,new mxGeometry(O,I,0,0),f||"whiteSpace=wrap;html=1;"),E.vertex=!0,E.id=R);for(var V=0;V<T.length;V++)y.setAttributeForCell(E,S[V],T[V]);y.setAttributeForCell(E,"placeholders","1");E.style=y.replacePlaceholders(E,E.style);for(M=0;M<H.length;M++)e[H[M].to][E.getAttribute(H[M].to)]=E;null!=ea&&"link"!=ea&&(y.setLinkForCell(E,E.getAttribute(ea)),y.setAttributeForCell(E,
-ea,null));y.fireEvent(new mxEventObject("cellsInserted","cells",[E]));var ga=this.editor.graph.getPreferredSizeForCell(E);E.vertex&&(null!=z&&null!=E.getAttribute(z)&&(E.geometry.x=O+parseFloat(E.getAttribute(z))),null!=B&&null!=E.getAttribute(B)&&(E.geometry.y=Q+parseFloat(E.getAttribute(B))),"@"==u.charAt(0)&&null!=E.getAttribute(u.substring(1))?E.geometry.width=parseFloat(E.getAttribute(u.substring(1))):E.geometry.width="auto"==u?ga.width+J:parseFloat(u),"@"==t.charAt(0)&&null!=E.getAttribute(t.substring(1))?
-E.geometry.height=parseFloat(E.getAttribute(t.substring(1))):E.geometry.height="auto"==t?ga.height+J:parseFloat(t),I+=E.geometry.height+C);p=null!=K?y.model.getCell(q+T[K]):null;null!=p?(p.style=y.replacePlaceholders(p,k),y.addCell(E,p)):d.push(y.addCell(E))}}for(var W=d.slice(),aa=d.slice(),M=0;M<H.length;M++)for(var Z=H[M],L=0;L<d.length;L++){var E=d[L],pa=E.getAttribute(Z.from);if(null!=pa){y.setAttributeForCell(E,Z.from,null);for(var qa=pa.split(","),V=0;V<qa.length;V++){var fa=e[Z.to][qa[V]];
-null!=fa&&(X=Z.label,null!=Z.fromlabel&&(X=(E.getAttribute(Z.fromlabel)||"")+(X||"")),null!=Z.tolabel&&(X=(X||"")+(fa.getAttribute(Z.tolabel)||"")),aa.push(y.insertEdge(null,null,X||"",Z.invert?fa:E,Z.invert?E:fa,Z.style||y.createCurrentEdgeStyle())),mxUtils.remove(Z.invert?E:fa,W))}}}if(null!=ka)for(L=0;L<d.length;L++)for(E=d[L],V=0;V<ka.length;V++)y.setAttributeForCell(E,mxUtils.trim(ka[V]),null);var la=new mxParallelEdgeLayout(y);la.spacing=N;var ua=function(){la.execute(y.getDefaultParent());
-for(var a=0;a<d.length;a++){var b=y.getCellGeometry(d[a]);b.x=Math.round(y.snap(b.x));b.y=Math.round(y.snap(b.y));"auto"==u&&(b.width=Math.round(y.snap(b.width)));"auto"==t&&(b.height=Math.round(y.snap(b.height)))}};if("circle"==U){var ma=new mxCircleLayout(y);ma.resetEdges=!1;var sa=ma.isVertexIgnored;ma.isVertexIgnored=function(a){return sa.apply(this,arguments)||0>mxUtils.indexOf(d,a)};this.executeLayout(function(){ma.execute(y.getDefaultParent());ua()},!0,A);A=null}else if("horizontaltree"==U||
-"verticaltree"==U||"auto"==U&&aa.length==2*d.length-1&&1==W.length){y.view.validate();var ha=new mxCompactTreeLayout(y,"horizontaltree"==U);ha.levelDistance=C;ha.edgeRouting=!1;ha.resetEdges=!1;this.executeLayout(function(){ha.execute(y.getDefaultParent(),0<W.length?W[0]:null)},!0,A);A=null}else if("horizontalflow"==U||"verticalflow"==U||"auto"==U&&1==W.length){y.view.validate();var ca=new mxHierarchicalLayout(y,"horizontalflow"==U?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);ca.intraCellSpacing=
-C;ca.parallelEdgeSpacing=N;ca.interRankCellSpacing=G;ca.disableEdgeStyle=!1;this.executeLayout(function(){ca.execute(y.getDefaultParent(),aa);y.moveCells(aa,O,Q)},!0,A);A=null}else if("organic"==U||"auto"==U&&aa.length>d.length){y.view.validate();var da=new mxFastOrganicLayout(y);da.forceConstant=3*C;da.resetEdges=!1;var ia=da.isVertexIgnored;da.isVertexIgnored=function(a){return ia.apply(this,arguments)||0>mxUtils.indexOf(d,a)};la=new mxParallelEdgeLayout(y);la.spacing=N;this.executeLayout(function(){da.execute(y.getDefaultParent());
-ua()},!0,A);A=null}this.hideDialog()}finally{y.model.endUpdate()}null!=A&&A()}}catch(wa){this.handleError(wa)}};EditorUi.prototype.getSearch=function(a){var b="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=a&&0<window.location.search.length){var c="?",d;for(d in urlParams)0>mxUtils.indexOf(a,d)&&null!=urlParams[d]&&(b+=c+d+"="+urlParams[d],c="&")}else b=window.location.search;return b};EditorUi.prototype.getUrl=function(a){a=null!=a?a:window.location.pathname;var b=0<a.indexOf("?")?1:0;
-if("1"==urlParams.offline)a+=window.location.search;else{var c="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),d;for(d in urlParams)0>mxUtils.indexOf(c,d)&&(a=0==b?a+"?":a+"&",null!=urlParams[d]&&(a+=d+"="+urlParams[d],b++))}return a};EditorUi.prototype.showLinkDialog=function(a,b,d){a=new LinkDialog(this,a,b,d,!0);this.showDialog(a.container,480,130,!0,!0);a.init()};var p=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=
-p.apply(this,arguments),c=this.editor.graph,d=b.getSourceGraphBounds;b.getSourceGraphBounds=function(){if(mxUtils.hasScrollbars(c.container)&&c.pageVisible&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width-2*a.x/b),Math.ceil(this.source.minimumGraphSize.height-2*a.y/b))}return d.apply(this,arguments)};var e=b.getSourceContainerSize;b.getSourceContainerSize=function(){if(mxUtils.hasScrollbars(c.container)&&
-null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width*b-2*a.x),Math.ceil(this.source.minimumGraphSize.height*b-2*a.y))}return e.apply(this,arguments)};b.getOutlineOffset=function(a){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var d=this.source.getPagePadding();return new mxPoint(Math.round(Math.max(0,(b.outline.container.clientWidth/a-(this.source.minimumGraphSize.width-
-2*d.x))/2)-d.x),Math.round(Math.max(0,(b.outline.container.clientHeight/a-(this.source.minimumGraphSize.height-2*d.y))/2)-d.y-5/a))}return new mxPoint(8/a,8/a)};var h=b.init;b.init=function(){h.apply(this,arguments);b.outline.view.getBackgroundPageBounds=function(){var a=c.getPageLayout(),b=c.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*b.width),this.scale*(this.translate.y+a.y*b.height),this.scale*a.width*b.width,this.scale*a.height*b.height)};b.outline.view.validateBackgroundPage()};
-this.editor.addListener("pageSelected",function(a,c){var d=c.getProperty("change"),e=b.source,f=b.outline;f.pageScale=e.pageScale;f.pageFormat=e.pageFormat;f.background=e.background;f.pageVisible=e.pageVisible;f.background=e.background;var g=mxUtils.getCurrentStyle(e.container);f.container.style.backgroundColor=g.backgroundColor;null!=e.view.backgroundPageShape&&null!=f.view.backgroundPageShape&&(f.view.backgroundPageShape.fill=e.view.backgroundPageShape.fill);b.outline.view.clear(d.previousPage.root,
-!0);b.outline.view.validate()});return b};EditorUi.prototype.getServiceCount=function(a,b){var c=0;null==this.drive&&"function"!==typeof window.DriveClient||c++;b||null==this.dropbox&&"function"!==typeof window.DropboxClient||c++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||c++;b||null==this.gitHub||c++;b||null==this.trello&&"function"!==typeof window.TrelloClient||c++;a&&isLocalStorage&&("1"==urlParams.browser||mxClient.IS_IOS)&&c++;mxClient.IS_IOS||c++;return c};EditorUi.prototype.updateUi=
-function(){this.updateButtonContainer();this.updateActionStates();var a=this.getCurrentFile(),b=null!=a||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(b);this.menus.get("viewZoom").setEnabled(b);var d=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==a||a.isRestricted());this.actions.get("makeCopy").setEnabled(!d);this.actions.get("print").setEnabled(!d);this.menus.get("exportAs").setEnabled(!d);this.menus.get("embed").setEnabled(!d);d="1"!=
-urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(d);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(d),this.menus.get("newLibrary").setEnabled(d));a="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=a&&a.isEditable();this.actions.get("image").setEnabled(b);this.actions.get("zoomIn").setEnabled(b);this.actions.get("zoomOut").setEnabled(b);this.actions.get("resetView").setEnabled(b);this.actions.get("undo").setEnabled(this.canUndo()&&
-a);this.actions.get("redo").setEnabled(this.canRedo()&&a);this.menus.get("edit").setEnabled(b);this.menus.get("view").setEnabled(b);this.menus.get("importFrom").setEnabled(a);this.menus.get("arrange").setEnabled(a);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(a),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(a));if(this.isAppCache()){var e=applicationCache;if(null!=e&&null==this.offlineStatus){this.offlineStatus=document.createElement("div");
-this.offlineStatus.className="geItem";this.offlineStatus.style.position="absolute";this.offlineStatus.style.fontSize="8pt";this.offlineStatus.style.top="2px";this.offlineStatus.style.right="12px";this.offlineStatus.style.color="#666";this.offlineStatus.style.margin="4px";this.offlineStatus.style.padding="2px";this.offlineStatus.style.verticalAlign="middle";this.offlineStatus.innerHTML="";this.menubarContainer.appendChild(this.offlineStatus);mxEvent.addListener(this.offlineStatus,"click",mxUtils.bind(this,
-function(){var a=this.offlineStatus.getElementsByTagName("img");null!=a&&0<a.length&&this.alert(a[0].getAttribute("title"))}));var e=window.applicationCache,k=null,b=mxUtils.bind(this,function(){var a=e.status,b;a==e.CHECKING&&(a=e.DOWNLOADING);switch(a){case e.UNCACHED:b="";break;case e.IDLE:b="min"==uiTheme?"":'<img title="draw.io is up to date." border="0" src="'+IMAGE_PATH+'/checkmark.gif"/>';break;case e.DOWNLOADING:b='<img title="Downloading new version..." border="0" src="'+IMAGE_PATH+'/spin.gif"/>';
-break;case e.UPDATEREADY:b='<img title="'+mxUtils.htmlEntities(mxResources.get("restartForChangeRequired"))+'" border="0" src="'+IMAGE_PATH+'/download.png"/>';break;case e.OBSOLETE:b='<img title="Obsolete" border="0" src="'+IMAGE_PATH+'/clear.gif"/>';break;default:b='<img title="Unknown" border="0" src="'+IMAGE_PATH+'/clear.gif"/>'}a!=k&&(this.offlineStatus.innerHTML=b,k=a)});mxEvent.addListener(e,"checking",b);mxEvent.addListener(e,"noupdate",b);mxEvent.addListener(e,"downloading",b);mxEvent.addListener(e,
-"progress",b);mxEvent.addListener(e,"cached",b);mxEvent.addListener(e,"updateready",b);mxEvent.addListener(e,"obsolete",b);mxEvent.addListener(e,"error",b);b()}}else this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.isDiagramActive=function(){var a=this.getCurrentFile();return null!=a&&a.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var q=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=
-function(){q.apply(this,arguments);var a=this.editor.graph,b=this.isDiagramActive(),d=this.getCurrentFile();this.actions.get("pageSetup").setEnabled(b);this.actions.get("autosave").setEnabled(null!=d&&d.isEditable()&&d.isAutosaveOptional());this.actions.get("guides").setEnabled(b);this.actions.get("editData").setEnabled(b);this.actions.get("shadowVisible").setEnabled(b);this.actions.get("connectionArrows").setEnabled(b);this.actions.get("connectionPoints").setEnabled(b);this.actions.get("copyStyle").setEnabled(b&&
-!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("editGeometry").setEnabled(a.getModel().isVertex(a.getSelectionCell()));this.actions.get("createShape").setEnabled(b);this.actions.get("createRevision").setEnabled(b);this.actions.get("moveToFolder").setEnabled(null!=d);this.actions.get("makeCopy").setEnabled(null!=d&&!d.isRestricted());this.actions.get("editDiagram").setEnabled(b&&(null==d||!d.isRestricted()));this.actions.get("publishLink").setEnabled(null!=
-d&&!d.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("find").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!=d&&d.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=d);
-this.menus.get("publish").setEnabled(null!=d&&!d.isRestricted());a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(b&&null!=a&&null!=a.shape&&null!=a.shape.stencil)};var u=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){this.editUpdateListener&&(this.editor.undoManager.removeListener(this.editUpdateListener),this.editUpdateListener=null);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);u.apply(this,
-arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,b,d,e,k,h){var c=a.editor.graph;if("xml"==d)a.hideDialog(),a.saveData(b,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("svg"==d)a.hideDialog(),a.saveData(b,"svg",mxUtils.getXml(c.getSvg(e,k,h)),"image/svg+xml");else{var f=a.getFileData(!0,null,null,null,null,!0),g=c.getGraphBounds(),l=Math.floor(g.width*k/c.view.scale),p=Math.floor(g.height*k/c.view.scale);
-f.length<=MAX_REQUEST_SIZE&&l*p<MAX_AREA?(a.hideDialog(),a.saveRequest(b,d,function(a,b){return new mxXmlRequest(EXPORT_URL,"format="+d+"&base64="+(b||"0")+(null!=a?"&filename="+encodeURIComponent(a):"")+"&bg="+(null!=e?e:"none")+"&w="+l+"&h="+p+"&border="+h+"&xml="+encodeURIComponent(f))})):mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.updateEditReferences=function(a){for(var b=0;b<a.changes.length;b++){var c=a.changes[b];if(null!=c&&c.constructor==mxChildChange&&null!=
-c.child){var d=c.child;if(null!=d.source&&null!=d.source.id){var e=this.getFutureCellForEdit(c.model,a,d.source.id);e!=d.source&&(d.source=e)}null!=d.target&&null!=d.target.id&&(c=this.getFutureCellForEdit(c.model,a,d.target.id),c!=d.target&&(d.target=c))}}};EditorUi.prototype.getFutureCellForEdit=function(a,b,d){var c=a.getCell(d);if(null==c)for(var e=b.changes.length-1;0<=e;e--){var f=b.changes[e];if(f.constructor==mxChildChange&&null!=f.child&&f.child.id==d){a.contains(f.previous)&&(c=f.child);
-break}}return c}})();function DiagramPage(a){this.node=a;null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};DiagramPage.prototype.setName=function(a){null==a?this.node.removeAttribute("name"):this.node.setAttribute("name",a)};
+640,520,!0,!0);this.importCsvDialog.init()};EditorUi.prototype.importCsv=function(a,b){try{var c=a.split("\n"),d=[];if(0<c.length){var e={},f=null,k=null,l=null,p=null,q="",t="auto",u="auto",z=null,C=null,N=40,D=40,G=100,K=0,y=this.editor.graph;y.getGraphBounds();for(var A=function(){null!=b?b(da):(y.setSelectionCells(da),y.scrollCellToVisible(y.getSelectionCell()))},I=y.getFreeInsertPoint(),O=I.x,Q=I.y,I=Q,U=null,T="auto",p=null,H=[],fa=null,la=null,W=0;W<c.length&&"#"==c[W].charAt(0);){a=c[W];for(W++;W<
+c.length&&"\\"==a.charAt(a.length-1)&&"#"==c[W].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(c[W].substring(1)),W++;if("#"!=a.charAt(1)){var Z=a.indexOf(":");if(0<Z){var L=mxUtils.trim(a.substring(1,Z)),F=mxUtils.trim(a.substring(Z+1));"label"==L?U=y.sanitizeHtml(F):"style"==L?f=F:"parentstyle"==L?k=F:"identity"==L&&0<F.length&&"-"!=F?l=F:"parent"==L&&0<F.length&&"-"!=F?p=F:"namespace"==L&&0<F.length&&"-"!=F?q=F:"width"==L?t=F:"height"==L?u=F:"left"==L&&0<F.length?z=F:"top"==L&&0<F.length?
+C=F:"ignore"==L?la=F.split(","):"connect"==L?H.push(JSON.parse(F)):"link"==L?fa=F:"padding"==L?K=parseFloat(F):"edgespacing"==L?N=parseFloat(F):"nodespacing"==L?D=parseFloat(F):"levelspacing"==L?G=parseFloat(F):"layout"==L&&(T=F)}}}var S=this.editor.csvToArray(c[W]),L=Z=null;if(null!=l||null!=p)for(var J=0;J<S.length;J++)l==S[J]&&(Z=J),p==S[J]&&(L=J);null==U&&(U="%"+S[0]+"%");if(null!=H)for(var M=0;M<H.length;M++)null==e[H[M].to]&&(e[H[M].to]={});y.model.beginUpdate();try{for(J=W+1;J<c.length;J++){var R=
+this.editor.csvToArray(c[J]);if(null==R){var ha=40<c[J].length?c[J].substring(0,40)+"...":c[J];throw Error(J+" ("+ha+") "+mxResources.get("containsValidationErrors"));}if(R.length==S.length){var B=null,ca=null!=Z?q+R[Z]:null;null!=ca&&(B=y.model.getCell(ca));null==B&&(B=new mxCell(U,new mxGeometry(O,I,0,0),f||"whiteSpace=wrap;html=1;"),B.vertex=!0,B.id=ca);for(var V=0;V<R.length;V++)y.setAttributeForCell(B,S[V],R[V]);y.setAttributeForCell(B,"placeholders","1");B.style=y.replacePlaceholders(B,B.style);
+for(M=0;M<H.length;M++)e[H[M].to][B.getAttribute(H[M].to)]=B;null!=fa&&"link"!=fa&&(y.setLinkForCell(B,B.getAttribute(fa)),y.setAttributeForCell(B,fa,null));y.fireEvent(new mxEventObject("cellsInserted","cells",[B]));var X=this.editor.graph.getPreferredSizeForCell(B);B.vertex&&(null!=z&&null!=B.getAttribute(z)&&(B.geometry.x=O+parseFloat(B.getAttribute(z))),null!=C&&null!=B.getAttribute(C)&&(B.geometry.y=Q+parseFloat(B.getAttribute(C))),"@"==t.charAt(0)&&null!=B.getAttribute(t.substring(1))?B.geometry.width=
+parseFloat(B.getAttribute(t.substring(1))):B.geometry.width="auto"==t?X.width+K:parseFloat(t),"@"==u.charAt(0)&&null!=B.getAttribute(u.substring(1))?B.geometry.height=parseFloat(B.getAttribute(u.substring(1))):B.geometry.height="auto"==u?X.height+K:parseFloat(u),I+=B.geometry.height+D);p=null!=L?y.model.getCell(q+R[L]):null;null!=p?(p.style=y.replacePlaceholders(p,k),y.addCell(B,p)):d.push(y.addCell(B))}}for(var aa=d.slice(),da=d.slice(),M=0;M<H.length;M++)for(var Y=H[M],J=0;J<d.length;J++){var B=
+d[J],pa=B.getAttribute(Y.from);if(null!=pa){y.setAttributeForCell(B,Y.from,null);for(var ra=pa.split(","),V=0;V<ra.length;V++){var ja=e[Y.to][ra[V]];null!=ja&&(U=Y.label,null!=Y.fromlabel&&(U=(B.getAttribute(Y.fromlabel)||"")+(U||"")),null!=Y.tolabel&&(U=(U||"")+(ja.getAttribute(Y.tolabel)||"")),da.push(y.insertEdge(null,null,U||"",Y.invert?ja:B,Y.invert?B:ja,Y.style||y.createCurrentEdgeStyle())),mxUtils.remove(Y.invert?B:ja,aa))}}}if(null!=la)for(J=0;J<d.length;J++)for(B=d[J],V=0;V<la.length;V++)y.setAttributeForCell(B,
+mxUtils.trim(la[V]),null);var ma=new mxParallelEdgeLayout(y);ma.spacing=N;var ua=function(){ma.execute(y.getDefaultParent());for(var a=0;a<d.length;a++){var b=y.getCellGeometry(d[a]);b.x=Math.round(y.snap(b.x));b.y=Math.round(y.snap(b.y));"auto"==t&&(b.width=Math.round(y.snap(b.width)));"auto"==u&&(b.height=Math.round(y.snap(b.height)))}};if("circle"==T){var ia=new mxCircleLayout(y);ia.resetEdges=!1;var sa=ia.isVertexIgnored;ia.isVertexIgnored=function(a){return sa.apply(this,arguments)||0>mxUtils.indexOf(d,
+a)};this.executeLayout(function(){ia.execute(y.getDefaultParent());ua()},!0,A);A=null}else if("horizontaltree"==T||"verticaltree"==T||"auto"==T&&da.length==2*d.length-1&&1==aa.length){y.view.validate();var ga=new mxCompactTreeLayout(y,"horizontaltree"==T);ga.levelDistance=D;ga.edgeRouting=!1;ga.resetEdges=!1;this.executeLayout(function(){ga.execute(y.getDefaultParent(),0<aa.length?aa[0]:null)},!0,A);A=null}else if("horizontalflow"==T||"verticalflow"==T||"auto"==T&&1==aa.length){y.view.validate();
+var ea=new mxHierarchicalLayout(y,"horizontalflow"==T?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);ea.intraCellSpacing=D;ea.parallelEdgeSpacing=N;ea.interRankCellSpacing=G;ea.disableEdgeStyle=!1;this.executeLayout(function(){ea.execute(y.getDefaultParent(),da);y.moveCells(da,O,Q)},!0,A);A=null}else if("organic"==T||"auto"==T&&da.length>d.length){y.view.validate();var ba=new mxFastOrganicLayout(y);ba.forceConstant=3*D;ba.resetEdges=!1;var xa=ba.isVertexIgnored;ba.isVertexIgnored=function(a){return xa.apply(this,
+arguments)||0>mxUtils.indexOf(d,a)};ma=new mxParallelEdgeLayout(y);ma.spacing=N;this.executeLayout(function(){ba.execute(y.getDefaultParent());ua()},!0,A);A=null}this.hideDialog()}finally{y.model.endUpdate()}null!=A&&A()}}catch(va){this.handleError(va)}};EditorUi.prototype.getSearch=function(a){var b="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=a&&0<window.location.search.length){var c="?",d;for(d in urlParams)0>mxUtils.indexOf(a,d)&&null!=urlParams[d]&&(b+=c+d+"="+urlParams[d],c="&")}else b=
+window.location.search;return b};EditorUi.prototype.getUrl=function(a){a=null!=a?a:window.location.pathname;var b=0<a.indexOf("?")?1:0;if("1"==urlParams.offline)a+=window.location.search;else{var c="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),d;for(d in urlParams)0>mxUtils.indexOf(c,d)&&(a=0==b?a+"?":a+"&",null!=urlParams[d]&&(a+=d+"="+urlParams[d],b++))}return a};EditorUi.prototype.showLinkDialog=function(a,b,d){a=new LinkDialog(this,a,b,d,
+!0);this.showDialog(a.container,480,130,!0,!0);a.init()};var p=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=p.apply(this,arguments),c=this.editor.graph,d=b.getSourceGraphBounds;b.getSourceGraphBounds=function(){if(mxUtils.hasScrollbars(c.container)&&c.pageVisible&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width-2*a.x/b),Math.ceil(this.source.minimumGraphSize.height-
+2*a.y/b))}return d.apply(this,arguments)};var e=b.getSourceContainerSize;b.getSourceContainerSize=function(){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width*b-2*a.x),Math.ceil(this.source.minimumGraphSize.height*b-2*a.y))}return e.apply(this,arguments)};b.getOutlineOffset=function(a){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var d=
+this.source.getPagePadding();return new mxPoint(Math.round(Math.max(0,(b.outline.container.clientWidth/a-(this.source.minimumGraphSize.width-2*d.x))/2)-d.x),Math.round(Math.max(0,(b.outline.container.clientHeight/a-(this.source.minimumGraphSize.height-2*d.y))/2)-d.y-5/a))}return new mxPoint(8/a,8/a)};var h=b.init;b.init=function(){h.apply(this,arguments);b.outline.view.getBackgroundPageBounds=function(){var a=c.getPageLayout(),b=c.getPageSize();return new mxRectangle(this.scale*(this.translate.x+
+a.x*b.width),this.scale*(this.translate.y+a.y*b.height),this.scale*a.width*b.width,this.scale*a.height*b.height)};b.outline.view.validateBackgroundPage()};this.editor.addListener("pageSelected",function(a,c){var d=c.getProperty("change"),e=b.source,f=b.outline;f.pageScale=e.pageScale;f.pageFormat=e.pageFormat;f.background=e.background;f.pageVisible=e.pageVisible;f.background=e.background;var g=mxUtils.getCurrentStyle(e.container);f.container.style.backgroundColor=g.backgroundColor;null!=e.view.backgroundPageShape&&
+null!=f.view.backgroundPageShape&&(f.view.backgroundPageShape.fill=e.view.backgroundPageShape.fill);b.outline.view.clear(d.previousPage.root,!0);b.outline.view.validate()});return b};EditorUi.prototype.getServiceCount=function(a,b){var c=0;null==this.drive&&"function"!==typeof window.DriveClient||c++;b||null==this.dropbox&&"function"!==typeof window.DropboxClient||c++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||c++;b||null==this.gitHub||c++;b||null==this.trello&&"function"!==typeof window.TrelloClient||
+c++;a&&isLocalStorage&&("1"==urlParams.browser||mxClient.IS_IOS)&&c++;mxClient.IS_IOS||c++;return c};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var a=this.getCurrentFile(),b=null!=a||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(b);this.menus.get("viewZoom").setEnabled(b);var d=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==a||a.isRestricted());this.actions.get("makeCopy").setEnabled(!d);
+this.actions.get("print").setEnabled(!d);this.menus.get("exportAs").setEnabled(!d);this.menus.get("embed").setEnabled(!d);d="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(d);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(d),this.menus.get("newLibrary").setEnabled(d));a="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=a&&a.isEditable();this.actions.get("image").setEnabled(b);this.actions.get("zoomIn").setEnabled(b);this.actions.get("zoomOut").setEnabled(b);
+this.actions.get("resetView").setEnabled(b);this.actions.get("undo").setEnabled(this.canUndo()&&a);this.actions.get("redo").setEnabled(this.canRedo()&&a);this.menus.get("edit").setEnabled(b);this.menus.get("view").setEnabled(b);this.menus.get("importFrom").setEnabled(a);this.menus.get("arrange").setEnabled(a);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(a),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(a));if(this.isAppCache()){var e=
+applicationCache;if(null!=e&&null==this.offlineStatus){this.offlineStatus=document.createElement("div");this.offlineStatus.className="geItem";this.offlineStatus.style.position="absolute";this.offlineStatus.style.fontSize="8pt";this.offlineStatus.style.top="2px";this.offlineStatus.style.right="12px";this.offlineStatus.style.color="#666";this.offlineStatus.style.margin="4px";this.offlineStatus.style.padding="2px";this.offlineStatus.style.verticalAlign="middle";this.offlineStatus.innerHTML="";this.menubarContainer.appendChild(this.offlineStatus);
+mxEvent.addListener(this.offlineStatus,"click",mxUtils.bind(this,function(){var a=this.offlineStatus.getElementsByTagName("img");null!=a&&0<a.length&&this.alert(a[0].getAttribute("title"))}));var e=window.applicationCache,k=null,b=mxUtils.bind(this,function(){var a=e.status,b;a==e.CHECKING&&(a=e.DOWNLOADING);switch(a){case e.UNCACHED:b="";break;case e.IDLE:b="min"==uiTheme?"":'<img title="draw.io is up to date." border="0" src="'+IMAGE_PATH+'/checkmark.gif"/>';break;case e.DOWNLOADING:b='<img title="Downloading new version..." border="0" src="'+
+IMAGE_PATH+'/spin.gif"/>';break;case e.UPDATEREADY:b='<img title="'+mxUtils.htmlEntities(mxResources.get("restartForChangeRequired"))+'" border="0" src="'+IMAGE_PATH+'/download.png"/>';break;case e.OBSOLETE:b='<img title="Obsolete" border="0" src="'+IMAGE_PATH+'/clear.gif"/>';break;default:b='<img title="Unknown" border="0" src="'+IMAGE_PATH+'/clear.gif"/>'}a!=k&&(this.offlineStatus.innerHTML=b,k=a)});mxEvent.addListener(e,"checking",b);mxEvent.addListener(e,"noupdate",b);mxEvent.addListener(e,"downloading",
+b);mxEvent.addListener(e,"progress",b);mxEvent.addListener(e,"cached",b);mxEvent.addListener(e,"updateready",b);mxEvent.addListener(e,"obsolete",b);mxEvent.addListener(e,"error",b);b()}}else this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.isDiagramActive=function(){var a=this.getCurrentFile();return null!=a&&a.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var q=EditorUi.prototype.updateActionStates;
+EditorUi.prototype.updateActionStates=function(){q.apply(this,arguments);var a=this.editor.graph,b=this.isDiagramActive(),d=this.getCurrentFile();this.actions.get("pageSetup").setEnabled(b);this.actions.get("autosave").setEnabled(null!=d&&d.isEditable()&&d.isAutosaveOptional());this.actions.get("guides").setEnabled(b);this.actions.get("editData").setEnabled(b);this.actions.get("shadowVisible").setEnabled(b);this.actions.get("connectionArrows").setEnabled(b);this.actions.get("connectionPoints").setEnabled(b);
+this.actions.get("copyStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("editGeometry").setEnabled(a.getModel().isVertex(a.getSelectionCell()));this.actions.get("createShape").setEnabled(b);this.actions.get("createRevision").setEnabled(b);this.actions.get("moveToFolder").setEnabled(null!=d);this.actions.get("makeCopy").setEnabled(null!=d&&!d.isRestricted());this.actions.get("editDiagram").setEnabled(b&&(null==d||!d.isRestricted()));
+this.actions.get("publishLink").setEnabled(null!=d&&!d.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("find").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!=d&&d.isRenamable()||"1"==urlParams.embed);
+this.actions.get("close").setEnabled(null!=d);this.menus.get("publish").setEnabled(null!=d&&!d.isRestricted());a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(b&&null!=a&&null!=a.shape&&null!=a.shape.stencil)};var t=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){this.editUpdateListener&&(this.editor.undoManager.removeListener(this.editUpdateListener),this.editUpdateListener=null);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),
+this.exportDialog=null);t.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,b,d,e,k,h){var c=a.editor.graph;if("xml"==d)a.hideDialog(),a.saveData(b,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("svg"==d)a.hideDialog(),a.saveData(b,"svg",mxUtils.getXml(c.getSvg(e,k,h)),"image/svg+xml");else{var f=a.getFileData(!0,null,null,null,null,!0),g=c.getGraphBounds(),l=Math.floor(g.width*k/c.view.scale),
+p=Math.floor(g.height*k/c.view.scale);f.length<=MAX_REQUEST_SIZE&&l*p<MAX_AREA?(a.hideDialog(),a.saveRequest(b,d,function(a,b){return new mxXmlRequest(EXPORT_URL,"format="+d+"&base64="+(b||"0")+(null!=a?"&filename="+encodeURIComponent(a):"")+"&bg="+(null!=e?e:"none")+"&w="+l+"&h="+p+"&border="+h+"&xml="+encodeURIComponent(f))})):mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.updateEditReferences=function(a){for(var b=0;b<a.changes.length;b++){var c=a.changes[b];if(null!=c&&
+c.constructor==mxChildChange&&null!=c.child){var d=c.child;if(null!=d.source&&null!=d.source.id){var e=this.getFutureCellForEdit(c.model,a,d.source.id);e!=d.source&&(d.source=e)}null!=d.target&&null!=d.target.id&&(c=this.getFutureCellForEdit(c.model,a,d.target.id),c!=d.target&&(d.target=c))}}};EditorUi.prototype.getFutureCellForEdit=function(a,b,d){var c=a.getCell(d);if(null==c)for(var e=b.changes.length-1;0<=e;e--){var f=b.changes[e];if(f.constructor==mxChildChange&&null!=f.child&&f.child.id==d){a.contains(f.previous)&&
+(c=f.child);break}}return c}})();function DiagramPage(a){this.node=a;null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};DiagramPage.prototype.setName=function(a){null==a?this.node.removeAttribute("name"):this.node.setAttribute("name",a)};
function RenamePage(a,b,e){this.ui=a;this.page=b;this.previous=this.name=e}RenamePage.prototype.execute=function(){var a=this.page.getName();this.page.setName(this.previous);this.name=this.previous;this.previous=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};function MovePage(a,b,e){this.ui=a;this.oldIndex=b;this.newIndex=e}
MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var a=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))};function SelectPage(a,b,e){this.ui=a;this.previousPage=this.page=b;this.neverShown=!0;null!=b&&(this.neverShown=null==b.viewState,this.ui.updatePageRoot(b),null!=e&&(b.viewState=e,this.neverShown=!1))}
SelectPage.prototype.execute=function(){var a=mxUtils.indexOf(this.ui.pages,this.previousPage);if(null!=this.page&&0<=a){var a=this.ui.currentPage,b=this.ui.editor,e=b.graph,d=b.graph.compress(e.zapGremlins(mxUtils.getXml(b.getGraphXml(!0))));mxUtils.setTextContent(a.node,d);a.viewState=e.getViewState();a.root=e.model.root;null!=a.model&&a.model.rootChanged(a.root);e.view.clear(a.root,!0);e.clearSelection();this.ui.currentPage=this.previousPage;this.previousPage=a;a=this.ui.currentPage;e.model.rootChanged(a.root);
@@ -3194,8 +3195,8 @@ EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&nul
e)/this.pages.length)+1),k=null,l=0;l<this.pages.length;l++)mxUtils.bind(this,function(c,d){this.pages[c]==this.currentPage?(d.className="geActivePage",d.style.backgroundColor="dark"==uiTheme?"#2a2a2a":"#eeeeee",d.style.fontWeight="bold",d.style.borderTopStyle="none"):d.className="geInactivePage";d.setAttribute("draggable","true");mxEvent.addListener(d,"dragstart",mxUtils.bind(this,function(b){a.isEnabled()?(mxClient.IS_FF&&b.dataTransfer.setData("Text","<diagram/>"),k=c):mxEvent.consume(b)}));mxEvent.addListener(d,
"dragend",mxUtils.bind(this,function(a){k=null;a.stopPropagation();a.preventDefault()}));mxEvent.addListener(d,"dragover",mxUtils.bind(this,function(a){null!=k&&(a.dataTransfer.dropEffect="move");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(d,"drop",mxUtils.bind(this,function(a){null!=k&&c!=k&&this.movePage(k,c);a.stopPropagation();a.preventDefault()}));b.appendChild(d)})(l,this.createTabForPage(this.pages[l],d,this.pages[l]!=this.currentPage));this.tabContainer.innerHTML="";this.tabContainer.appendChild(b);
d=this.createPageMenuTab();this.tabContainer.appendChild(d);d=null;this.isPageInsertTabVisible()&&(d=this.createPageInsertTab(),this.tabContainer.appendChild(d));if(b.clientWidth>this.tabContainer.clientWidth-e){null!=d&&(d.style.position="absolute",d.style.right="0px",b.style.marginRight="30px");var p=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");p.style.position="absolute";p.style.right=this.editor.chromeless?"29px":"55px";p.style.fontSize="13pt";this.tabContainer.appendChild(p);var q=this.createControlTab(4,
-"&nbsp;&#10095;");q.style.position="absolute";q.style.right=this.editor.chromeless?"0px":"29px";q.style.fontSize="13pt";this.tabContainer.appendChild(q);var u=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));b.style.width=u+"px";mxEvent.addListener(p,"click",mxUtils.bind(this,function(a){b.scrollLeft-=Math.max(20,u-20);mxUtils.setOpacity(p,0<b.scrollLeft?100:50);mxUtils.setOpacity(q,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.consume(a)}));mxUtils.setOpacity(p,
-0<b.scrollLeft?100:50);mxUtils.setOpacity(q,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.addListener(q,"click",mxUtils.bind(this,function(a){b.scrollLeft+=Math.max(20,u-20);mxUtils.setOpacity(p,0<b.scrollLeft?100:50);mxUtils.setOpacity(q,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.consume(a)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};
+"&nbsp;&#10095;");q.style.position="absolute";q.style.right=this.editor.chromeless?"0px":"29px";q.style.fontSize="13pt";this.tabContainer.appendChild(q);var t=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));b.style.width=t+"px";mxEvent.addListener(p,"click",mxUtils.bind(this,function(a){b.scrollLeft-=Math.max(20,t-20);mxUtils.setOpacity(p,0<b.scrollLeft?100:50);mxUtils.setOpacity(q,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.consume(a)}));mxUtils.setOpacity(p,
+0<b.scrollLeft?100:50);mxUtils.setOpacity(q,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.addListener(q,"click",mxUtils.bind(this,function(a){b.scrollLeft+=Math.max(20,t-20);mxUtils.setOpacity(p,0<b.scrollLeft?100:50);mxUtils.setOpacity(q,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.consume(a)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};
EditorUi.prototype.createTab=function(a){var b=document.createElement("div");b.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";b.style.whiteSpace="nowrap";b.style.boxSizing="border-box";b.style.position="relative";b.style.overflow="hidden";b.style.marginLeft="-1px";b.style.height=this.tabContainer.clientHeight+"px";b.style.padding="8px 4px 8px 4px";b.style.border="dark"==uiTheme?"1px solid #505759":"1px solid #c0c0c0";b.style.borderBottomStyle="solid";b.style.backgroundColor=this.tabContainer.style.backgroundColor;
b.style.cursor="move";b.style.color="gray";a&&(mxEvent.addListener(b,"mouseenter",mxUtils.bind(this,function(a){this.editor.graph.isMouseDown||(b.style.backgroundColor="dark"==uiTheme?"black":"#d3d3d3",mxEvent.consume(a))})),mxEvent.addListener(b,"mouseleave",mxUtils.bind(this,function(a){b.style.backgroundColor=this.tabContainer.style.backgroundColor;mxEvent.consume(a)})));return b};
EditorUi.prototype.createControlTab=function(a,b){var e=this.createTab(!0);e.style.paddingTop=a+"px";e.style.cursor="pointer";e.style.width="30px";e.style.lineHeight="30px";e.innerHTML=b;null!=e.firstChild&&null!=e.firstChild.style&&mxUtils.setOpacity(e.firstChild,40);return e};
@@ -3205,20 +3206,20 @@ null,mxUtils.bind(this,function(){this.renamePage(e,e.getName())}),b),a.addSepar
mxEvent.consume(a)}));return a};EditorUi.prototype.createPageInsertTab=function(){var a=this.createControlTab(4,'<div class="geSprite geSprite-plus" style="display:inline-block;width:21px;height:21px;"></div>');a.setAttribute("title",mxResources.get("insertPage"));mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){this.insertPage();mxEvent.consume(a)}));return a};
EditorUi.prototype.createTabForPage=function(a,b,e){e=this.createTab(e);var d=a.getName()||mxResources.get("untitled"),k=a.getId();e.setAttribute("title",d+(null!=k?" ("+k+")":""));mxUtils.write(e,d);e.style.maxWidth=b+"px";e.style.width=b+"px";this.addTabListeners(a,e);42<b&&(e.style.textOverflow="ellipsis");return e};
EditorUi.prototype.addTabListeners=function(a,b){mxEvent.disableContextMenu(b);var e=this.editor.graph;mxEvent.addListener(b,"dblclick",mxUtils.bind(this,function(b){this.renamePage(a);mxEvent.consume(b)}));var d=!1,k=!1;mxEvent.addGestureListeners(b,mxUtils.bind(this,function(b){d=null!=this.currentMenu;k=a==this.currentPage;e.isMouseDown||k||this.selectPage(a)}),null,mxUtils.bind(this,function(l){if(e.isEnabled()&&!e.isMouseDown&&(mxEvent.isTouchEvent(l)&&k||mxEvent.isPopupTrigger(l))){e.popupMenuHandler.hideMenu();
-this.hideCurrentMenu();if(!mxEvent.isTouchEvent(l)||!d){var p=new mxPopupMenu(this.createPageMenu(a));p.div.className+=" geMenubarMenu";p.smartSeparators=!0;p.showDisabled=!0;p.autoExpand=!0;p.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(p,arguments);this.resetCurrentMenu();p.destroy()});var q=mxEvent.getClientX(l),u=mxEvent.getClientY(l);p.popup(q,u,null,l);this.setCurrentMenu(p,b)}mxEvent.consume(l)}}))};
+this.hideCurrentMenu();if(!mxEvent.isTouchEvent(l)||!d){var p=new mxPopupMenu(this.createPageMenu(a));p.div.className+=" geMenubarMenu";p.smartSeparators=!0;p.showDisabled=!0;p.autoExpand=!0;p.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(p,arguments);this.resetCurrentMenu();p.destroy()});var q=mxEvent.getClientX(l),t=mxEvent.getClientY(l);p.popup(q,t,null,l);this.setCurrentMenu(p,b)}mxEvent.consume(l)}}))};
EditorUi.prototype.createPageMenu=function(a,b){return mxUtils.bind(this,function(e,d){e.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,a)+1)}),d);e.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(a)}),d);e.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(a,b)}),d);e.addSeparator(d);e.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(a,
mxResources.get("copyOf",[a.getName()]))}),d)})};(function(){var a=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(b){a.apply(this,arguments);this.updateTabContainer()}})();(function(){mxCodecRegistry.getCodec(ChangePageSetup).exclude.push("page")})();(function(){var a=new mxObjectCodec(new MovePage,["ui"]);a.beforeDecode=function(a,e,d){d.ui=a.ui;return e};a.afterDecode=function(a,e,d){a=d.oldIndex;d.oldIndex=d.newIndex;d.newIndex=a;return d};mxCodecRegistry.register(a)})();
(function(){var a=new mxObjectCodec(new RenamePage,["ui","page"]);a.beforeDecode=function(a,e,d){d.ui=a.ui;return e};a.afterDecode=function(a,e,d){a=d.previous;d.previous=d.name;d.name=a;return d};mxCodecRegistry.register(a)})();
(function(){var a=new mxObjectCodec(new ChangePage,"ui relatedPage index neverShown page previousPage".split(" ")),b="defaultParent currentRoot scrollLeft scrollTop scale translate lastPasteXml pasteCounter".split(" ");a.afterEncode=function(a,d,k){k.setAttribute("relatedPage",d.relatedPage.getId());null==d.index&&(k.setAttribute("name",d.relatedPage.getName()),null!=d.relatedPage.viewState&&k.setAttribute("viewState",JSON.stringify(d.relatedPage.viewState,function(a,d){return 0>mxUtils.indexOf(b,
a)?d:void 0})),null!=d.relatedPage.root&&a.encodeCell(d.relatedPage.root,k));return k};a.beforeDecode=function(a,b,k){k.ui=a.ui;k.relatedPage=k.ui.getPageById(b.getAttribute("relatedPage"));if(null==k.relatedPage){var d=b.ownerDocument.createElement("diagram");d.setAttribute("id",b.getAttribute("relatedPage"));d.setAttribute("name",b.getAttribute("name"));k.relatedPage=new DiagramPage(d);d=b.getAttribute("viewState");null!=d&&(k.relatedPage.viewState=JSON.parse(d),b.removeAttribute("viewState"));
b=b.cloneNode(!0);d=b.firstChild;if(null!=d)for(k.relatedPage.root=a.decodeCell(d,!1),k=d.nextSibling,d.parentNode.removeChild(d),d=k;null!=d;){k=d.nextSibling;if(d.nodeType==mxConstants.NODETYPE_ELEMENT){var e=d.getAttribute("id");null==a.lookup(e)&&a.decodeCell(d)}d.parentNode.removeChild(d);d=k}}return b};a.afterDecode=function(a,b,k){k.index=k.previousIndex;return k};mxCodecRegistry.register(a)})();(function(){var a=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAASFBMVEUAAAAAAAB/f3/9/f319fUfHx/7+/s+Pj69vb0AAAAAAAAAAAAAAAAAAAAAAAAAAAB2dnZ1dXUAAAAAAAAVFRX///8ZGRkGBgbOcI1hAAAAE3RSTlMA+vr9/f38+fb1893Bo00u+/tFvPJUBQAAAIRJREFUGNM0jEcSxCAQAxlydGqD///TNWxZBx1aXVIrWysplbapL3sFxgDq/idXBnHgBPK1nIxwc55vCXl6dRFtrV6svs/A/UjsPcpzA5tqyByD92HqQlMFh45BG6ND1DiKSoPDdm96N77bg5F+wyaEqRGb8ZiOwHQqdg9hehszcLAEIQB2lQ4p/sEpnAAAAABJRU5ErkJggg==":IMAGE_PATH+"/move.png";EditorUi.prototype.altShiftActions[68]=
-"selectDescendants";var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(a,d,e,q,u){d=null!=d?d:!1;null==e&&(e=this.getFoldableCells(this.getSelectionCells(),a));this.stopEditing();this.model.beginUpdate();try{for(var c=e.slice(),f=[],g=0;g<e.length;g++){var k=this.view.getState(e[g]),l=null!=k?k.style:this.getCellStyle(e[g]);"1"==mxUtils.getValue(l,"treeFolding","0")&&(this.traverse(e[g],!0,mxUtils.bind(this,function(a,b){null!=b&&f.push(b);a!=e[g]&&f.push(a);return a==e[g]||!this.model.isCollapsed(a)})),
+"selectDescendants";var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(a,d,e,q,t){d=null!=d?d:!1;null==e&&(e=this.getFoldableCells(this.getSelectionCells(),a));this.stopEditing();this.model.beginUpdate();try{for(var c=e.slice(),f=[],g=0;g<e.length;g++){var k=this.view.getState(e[g]),l=null!=k?k.style:this.getCellStyle(e[g]);"1"==mxUtils.getValue(l,"treeFolding","0")&&(this.traverse(e[g],!0,mxUtils.bind(this,function(a,b){null!=b&&f.push(b);a!=e[g]&&f.push(a);return a==e[g]||!this.model.isCollapsed(a)})),
this.model.setCollapsed(e[g],a))}for(g=0;g<f.length;g++)this.model.setVisible(f[g],!a);e=c;e=b.apply(this,arguments)}finally{this.model.endUpdate()}return e};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 b(a){return m.isVertex(a)&&d(a)}function d(a){var b=!1;null!=a&&(a=m.getParent(a),b=h.view.getState(a),h.view.getState(a),b="tree"==(null!=
b?b.style:h.getCellStyle(a)).containerType);return b}function e(a){var b=!1;null!=a&&(a=m.getParent(a),b=h.view.getState(a),h.view.getState(a),b=null!=(null!=b?b.style:h.getCellStyle(a)).childLayout);return b}function q(a){a=h.view.getState(a);if(null!=a){var b=h.getIncomingEdges(a.cell);if(0<b.length&&(b=h.view.getState(b[0]),null!=b&&(b=b.absolutePoints,null!=b&&0<b.length&&(b=b[b.length-1],null!=b)))){if(b.y==a.y&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_SOUTH;if(b.y==
-a.y+a.height&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_NORTH;if(b.x>a.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function u(a,b){b=null!=b?b:!0;h.model.beginUpdate();try{var c=h.model.getParent(a),d=h.getIncomingEdges(a),e=h.cloneCells([d[0],a]);h.model.setTerminal(e[0],h.model.getTerminal(d[0],!0),!0);var f=q(a),g=c.geometry;f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?e[1].geometry.x+=b?a.geometry.width+10:-e[1].geometry.width-
+a.y+a.height&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_NORTH;if(b.x>a.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function t(a,b){b=null!=b?b:!0;h.model.beginUpdate();try{var c=h.model.getParent(a),d=h.getIncomingEdges(a),e=h.cloneCells([d[0],a]);h.model.setTerminal(e[0],h.model.getTerminal(d[0],!0),!0);var f=q(a),g=c.geometry;f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?e[1].geometry.x+=b?a.geometry.width+10:-e[1].geometry.width-
10:e[1].geometry.y+=b?a.geometry.height+10:-e[1].geometry.height-10;h.view.currentRoot!=c&&(e[1].geometry.x-=g.x,e[1].geometry.y-=g.y);var k=h.view.getState(a),l=h.view.scale;if(null!=k){var m=mxRectangle.fromRectangle(k);f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?m.x+=(b?a.geometry.width+10:-e[1].geometry.width-10)*l:m.y+=(b?a.geometry.height+10:-e[1].geometry.height-10)*l;var p=h.getOutgoingEdges(h.model.getTerminal(d[0],!0));if(null!=p){for(var n=f==mxConstants.DIRECTION_SOUTH||
-f==mxConstants.DIRECTION_NORTH,t=g=d=0;t<p.length;t++){var r=h.model.getTerminal(p[t],!1);if(f==q(r)){var u=h.view.getState(r);r!=a&&null!=u&&(n&&b!=u.getCenterX()<k.getCenterX()||!n&&b!=u.getCenterY()<k.getCenterY())&&mxUtils.intersects(m,u)&&(d=10+Math.max(d,(Math.min(m.x+m.width,u.x+u.width)-Math.max(m.x,u.x))/l),g=10+Math.max(g,(Math.min(m.y+m.height,u.y+u.height)-Math.max(m.y,u.y))/l))}}n?g=0:d=0;for(t=0;t<p.length;t++)if(r=h.model.getTerminal(p[t],!1),f==q(r)&&(u=h.view.getState(r),r!=a&&null!=
-u&&(n&&b!=u.getCenterX()<k.getCenterX()||!n&&b!=u.getCenterY()<k.getCenterY()))){var y=[];h.traverse(u.cell,!0,function(a,b){null!=b&&y.push(b);y.push(a);return!0});h.moveCells(y,(b?1:-1)*d,(b?1:-1)*g)}}}return h.addCells(e,c)}finally{h.model.endUpdate()}}function c(a){h.model.beginUpdate();try{var b=q(a),c=h.getIncomingEdges(a),d=h.cloneCells([c[0],a]);h.model.setTerminal(c[0],d[1],!1);h.model.setTerminal(d[0],d[1],!0);h.model.setTerminal(d[0],a,!1);var e=h.model.getParent(a),f=e.geometry,g=[];h.view.currentRoot!=
+f==mxConstants.DIRECTION_NORTH,u=g=d=0;u<p.length;u++){var r=h.model.getTerminal(p[u],!1);if(f==q(r)){var t=h.view.getState(r);r!=a&&null!=t&&(n&&b!=t.getCenterX()<k.getCenterX()||!n&&b!=t.getCenterY()<k.getCenterY())&&mxUtils.intersects(m,t)&&(d=10+Math.max(d,(Math.min(m.x+m.width,t.x+t.width)-Math.max(m.x,t.x))/l),g=10+Math.max(g,(Math.min(m.y+m.height,t.y+t.height)-Math.max(m.y,t.y))/l))}}n?g=0:d=0;for(u=0;u<p.length;u++)if(r=h.model.getTerminal(p[u],!1),f==q(r)&&(t=h.view.getState(r),r!=a&&null!=
+t&&(n&&b!=t.getCenterX()<k.getCenterX()||!n&&b!=t.getCenterY()<k.getCenterY()))){var y=[];h.traverse(t.cell,!0,function(a,b){null!=b&&y.push(b);y.push(a);return!0});h.moveCells(y,(b?1:-1)*d,(b?1:-1)*g)}}}return h.addCells(e,c)}finally{h.model.endUpdate()}}function c(a){h.model.beginUpdate();try{var b=q(a),c=h.getIncomingEdges(a),d=h.cloneCells([c[0],a]);h.model.setTerminal(c[0],d[1],!1);h.model.setTerminal(d[0],d[1],!0);h.model.setTerminal(d[0],a,!1);var e=h.model.getParent(a),f=e.geometry,g=[];h.view.currentRoot!=
e&&(d[1].geometry.x-=f.x,d[1].geometry.y-=f.y);h.traverse(a,!0,function(a,b){null!=b&&g.push(b);g.push(a);return!0});var k=a.geometry.width+40,m=a.geometry.height+40;b==mxConstants.DIRECTION_SOUTH?k=0:b==mxConstants.DIRECTION_NORTH?(k=0,m=-40):b==mxConstants.DIRECTION_WEST?(k=-40,m=0):b==mxConstants.DIRECTION_EAST&&(m=0);h.moveCells(g,k,m);return h.addCells(d,e)}finally{h.model.endUpdate()}}function f(a){h.model.beginUpdate();try{var b=h.model.getParent(a),c=h.getIncomingEdges(a),d=h.cloneCells([c[0],
a]);h.model.setTerminal(d[0],a,!0);var c=h.getOutgoingEdges(a),e=b.geometry,f=[];h.view.currentRoot==b&&(e=new mxRectangle);for(var g=0;g<c.length;g++){var k=h.model.getTerminal(c[g],!1);null!=k&&f.push(k)}var m=h.view.getBounds(f),l=q(a),p=h.view.translate,n=h.view.scale;l==mxConstants.DIRECTION_SOUTH?(d[1].geometry.x=null==m?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(m.x+m.width)/n-p.x-e.x+10,d[1].geometry.y+=a.geometry.height-e.y+40):l==mxConstants.DIRECTION_NORTH?(d[1].geometry.x=
null==m?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(m.x+m.width)/n-p.x+-e.x+10,d[1].geometry.y-=d[1].geometry.height-e.y+40):(d[1].geometry.x=l==mxConstants.DIRECTION_WEST?d[1].geometry.x-(d[1].geometry.width-e.x+40):d[1].geometry.x+(a.geometry.width-e.x+40),d[1].geometry.y=null==m?a.geometry.y+(a.geometry.height-d[1].geometry.height)/2:(m.y+m.height)/n-p.y+-e.y+10);return h.addCells(d,b)}finally{h.model.endUpdate()}}function g(a,b,c){a=h.getOutgoingEdges(a);c=h.view.getState(c);var d=
@@ -3228,18 +3229,18 @@ mxResources.parse("selectDescendants=Select Descendants");mxResources.parse("sel
this.addMenuItems(a,["selectSiblings","selectParent"],null,d))}};r.actions.addAction("selectChildren",function(){if(h.isEnabled()&&1==h.getSelectionCount()){var a=h.getSelectionCell(),a=h.getOutgoingEdges(a);if(null!=a){for(var b=[],c=0;c<a.length;c++)b.push(h.model.getTerminal(a[c],!1));h.setSelectionCells(b)}}},null,null,"Alt+Shift+X");r.actions.addAction("selectSiblings",function(){if(h.isEnabled()&&1==h.getSelectionCount()){var a=h.getSelectionCell(),a=h.getIncomingEdges(a);if(null!=a&&0<a.length&&
(a=h.getOutgoingEdges(h.model.getTerminal(a[0],!0)),null!=a)){for(var b=[],c=0;c<a.length;c++)b.push(h.model.getTerminal(a[c],!1));h.setSelectionCells(b)}}},null,null,"Alt+Shift+S");r.actions.addAction("selectParent",function(){if(h.isEnabled()&&1==h.getSelectionCount()){var a=h.getSelectionCell(),a=h.getIncomingEdges(a);null!=a&&0<a.length&&h.setSelectionCell(h.model.getTerminal(a[0],!0))}},null,null,"Alt+Shift+P");r.actions.addAction("selectDescendants",function(){if(h.isEnabled()&&1==h.getSelectionCount()){var a=
h.getSelectionCell(),b=[];h.traverse(a,!0,function(a,c){null!=c&&b.push(c);b.push(a);return!0});h.setSelectionCells(b)}},null,null,"Alt+Shift+D");var v=h.removeCells;h.removeCells=function(a,c){c=null!=c?c:!0;null==a&&(a=this.getDeletableCells(this.getSelectionCells()));c&&(a=this.getDeletableCells(this.addAllEdges(a)));for(var e=[],f=0;f<a.length;f++){var g=a[f];m.isEdge(g)&&d(g)&&(e.push(g),g=m.getTerminal(g,!1));b(g)?(h.traverse(g,!0,function(a,b){null!=b&&e.push(b);e.push(a);return!0}),g=h.getIncomingEdges(a[f]),
-a=a.concat(g)):e.push(a[f])}a=e;return v.apply(this,arguments)};r.hoverIcons.getStateAt=function(a,c,d){return b(a.cell)?null:this.graph.view.getState(this.graph.getCellAt(c,d))};var D=h.duplicateCells;h.duplicateCells=function(a,c){a=null!=a?a:this.getSelectionCells();for(var d=a.slice(0),e=0;e<d.length;e++){var f=h.view.getState(d[e]);if(null!=f&&b(f.cell))for(var g=h.getIncomingEdges(f.cell),f=0;f<g.length;f++)mxUtils.remove(g[f],a)}this.model.beginUpdate();try{var k=D.call(this,a,c);if(k.length==
+a=a.concat(g)):e.push(a[f])}a=e;return v.apply(this,arguments)};r.hoverIcons.getStateAt=function(a,c,d){return b(a.cell)?null:this.graph.view.getState(this.graph.getCellAt(c,d))};var E=h.duplicateCells;h.duplicateCells=function(a,c){a=null!=a?a:this.getSelectionCells();for(var d=a.slice(0),e=0;e<d.length;e++){var f=h.view.getState(d[e]);if(null!=f&&b(f.cell))for(var g=h.getIncomingEdges(f.cell),f=0;f<g.length;f++)mxUtils.remove(g[f],a)}this.model.beginUpdate();try{var k=E.call(this,a,c);if(k.length==
a.length)for(e=0;e<a.length;e++)if(b(a[e])){var m=h.getIncomingEdges(k[e]),g=h.getIncomingEdges(a[e]);if(0==m.length&&0<g.length){var l=this.cloneCell(g[0]);this.addEdge(l,h.getDefaultParent(),this.model.getTerminal(g[0],!0),k[e])}}}finally{this.model.endUpdate()}return k};var x=h.moveCells;h.moveCells=function(a,c,d,e,f,g,k){var m=null;this.model.beginUpdate();try{var l=f,p=this.view.getState(f),n=null!=p?p.style:this.getCellStyle(f);if(null!=a&&b(f)&&"1"==mxUtils.getValue(n,"treeFolding","0")){for(var q=
-0;q<a.length;q++)if(b(a[q])||h.model.isEdge(a[q])&&null==h.model.getTerminal(a[q],!0)){f=h.model.getParent(a[q]);break}if(null!=l&&f!=l&&null!=this.view.getState(a[0])){var t=h.getIncomingEdges(a[0]);if(0<t.length){var r=h.view.getState(h.model.getTerminal(t[0],!0));if(null!=r){var u=h.view.getState(l);null!=u&&(c=(u.getCenterX()-r.getCenterX())/h.view.scale,d=(u.getCenterY()-r.getCenterY())/h.view.scale)}}}}m=x.apply(this,arguments);if(null!=m&&null!=a&&m.length==a.length)for(q=0;q<m.length;q++)if(this.model.isEdge(m[q]))b(l)&&
-0>mxUtils.indexOf(m,this.model.getTerminal(m[q],!0))&&this.model.setTerminal(m[q],l,!0);else if(b(a[q])&&(t=h.getIncomingEdges(a[q]),0<t.length))if(!e)b(l)&&0>mxUtils.indexOf(a,this.model.getTerminal(t[0],!0))&&this.model.setTerminal(t[0],l,!0);else if(0==h.getIncomingEdges(m[q]).length){p=l;if(null==p||p==h.model.getParent(a[q]))p=h.model.getTerminal(t[0],!0);e=this.cloneCell(t[0]);this.addEdge(e,h.getDefaultParent(),p,m[q])}}finally{this.model.endUpdate()}return m};if(null!=r.sidebar){var t=r.sidebar.dropAndConnect;
-r.sidebar.dropAndConnect=function(a,c,d,e){var f=h.model,g=null;f.beginUpdate();try{if(g=t.apply(this,arguments),b(a))for(var k=0;k<g.length;k++)if(f.isEdge(g[k])&&null==f.getTerminal(g[k],!0)){f.setTerminal(g[k],a,!0);var m=h.getCellGeometry(g[k]);m.points=null;null!=m.getTerminalPoint(!0)&&m.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return g}}var z={88:r.actions.get("selectChildren"),84:r.actions.get("selectSubtree"),80:r.actions.get("selectParent"),83:r.actions.get("selectSiblings")},B=
-r.onKeyDown;r.onKeyDown=function(a){try{if(h.isEnabled()&&!h.isEditing()&&b(h.getSelectionCell())&&1==h.getSelectionCount()){var d=null;0<h.getIncomingEdges(h.getSelectionCell()).length&&(9==a.which?d=mxEvent.isShiftDown(a)?c(h.getSelectionCell()):f(h.getSelectionCell()):13==a.which&&(d=u(h.getSelectionCell(),!mxEvent.isShiftDown(a))));if(null!=d&&0<d.length)1==d.length&&h.model.isEdge(d[0])?h.setSelectionCell(h.model.getTerminal(d[0],!1)):h.setSelectionCell(d[d.length-1]),null!=r.hoverIcons&&r.hoverIcons.update(h.view.getState(h.getSelectionCell())),
+0;q<a.length;q++)if(b(a[q])||h.model.isEdge(a[q])&&null==h.model.getTerminal(a[q],!0)){f=h.model.getParent(a[q]);break}if(null!=l&&f!=l&&null!=this.view.getState(a[0])){var u=h.getIncomingEdges(a[0]);if(0<u.length){var r=h.view.getState(h.model.getTerminal(u[0],!0));if(null!=r){var t=h.view.getState(l);null!=t&&(c=(t.getCenterX()-r.getCenterX())/h.view.scale,d=(t.getCenterY()-r.getCenterY())/h.view.scale)}}}}m=x.apply(this,arguments);if(null!=m&&null!=a&&m.length==a.length)for(q=0;q<m.length;q++)if(this.model.isEdge(m[q]))b(l)&&
+0>mxUtils.indexOf(m,this.model.getTerminal(m[q],!0))&&this.model.setTerminal(m[q],l,!0);else if(b(a[q])&&(u=h.getIncomingEdges(a[q]),0<u.length))if(!e)b(l)&&0>mxUtils.indexOf(a,this.model.getTerminal(u[0],!0))&&this.model.setTerminal(u[0],l,!0);else if(0==h.getIncomingEdges(m[q]).length){p=l;if(null==p||p==h.model.getParent(a[q]))p=h.model.getTerminal(u[0],!0);e=this.cloneCell(u[0]);this.addEdge(e,h.getDefaultParent(),p,m[q])}}finally{this.model.endUpdate()}return m};if(null!=r.sidebar){var u=r.sidebar.dropAndConnect;
+r.sidebar.dropAndConnect=function(a,c,d,e){var f=h.model,g=null;f.beginUpdate();try{if(g=u.apply(this,arguments),b(a))for(var k=0;k<g.length;k++)if(f.isEdge(g[k])&&null==f.getTerminal(g[k],!0)){f.setTerminal(g[k],a,!0);var m=h.getCellGeometry(g[k]);m.points=null;null!=m.getTerminalPoint(!0)&&m.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return g}}var z={88:r.actions.get("selectChildren"),84:r.actions.get("selectSubtree"),80:r.actions.get("selectParent"),83:r.actions.get("selectSiblings")},C=
+r.onKeyDown;r.onKeyDown=function(a){try{if(h.isEnabled()&&!h.isEditing()&&b(h.getSelectionCell())&&1==h.getSelectionCount()){var d=null;0<h.getIncomingEdges(h.getSelectionCell()).length&&(9==a.which?d=mxEvent.isShiftDown(a)?c(h.getSelectionCell()):f(h.getSelectionCell()):13==a.which&&(d=t(h.getSelectionCell(),!mxEvent.isShiftDown(a))));if(null!=d&&0<d.length)1==d.length&&h.model.isEdge(d[0])?h.setSelectionCell(h.model.getTerminal(d[0],!1)):h.setSelectionCell(d[d.length-1]),null!=r.hoverIcons&&r.hoverIcons.update(h.view.getState(h.getSelectionCell())),
h.startEditingAtCell(h.getSelectionCell()),mxEvent.consume(a);else if(mxEvent.isAltDown(a)&&mxEvent.isShiftDown(a)){var e=z[a.keyCode];null!=e&&(e.funct(a),mxEvent.consume(a))}else 37==a.keyCode?(n(h.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(a)):38==a.keyCode?(n(h.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(a)):39==a.keyCode?(n(h.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(a)):40==a.keyCode&&(n(h.getSelectionCell(),mxConstants.DIRECTION_SOUTH),
-mxEvent.consume(a))}}catch(O){console.log("error",O)}mxEvent.isConsumed(a)||B.apply(this,arguments)};var N=h.connectVertex;h.connectVertex=function(a,d,e,g,k,m){var l=h.getIncomingEdges(a);return b(a)&&0<l.length?(e=q(a),g=e==mxConstants.DIRECTION_EAST||e==mxConstants.DIRECTION_WEST,k=d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST,e==d?f(a):g==k?c(a):u(a,d!=mxConstants.DIRECTION_NORTH&&d!=mxConstants.DIRECTION_WEST)):N.call(this,a,d,e,g,k,m)};h.getSubtree=function(a){var c=[a];b(a)&&
-!e(a)&&h.traverse(a,!0,function(a,b){null!=b&&0>mxUtils.indexOf(c,b)&&c.push(b);0>mxUtils.indexOf(c,a)&&c.push(a);return!0});return c};var C=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){C.apply(this,arguments);b(this.state.cell)&&0<this.graph.getOutgoingEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(a),this.moveHandle.setAttribute("title","Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width=
+mxEvent.consume(a))}}catch(O){console.log("error",O)}mxEvent.isConsumed(a)||C.apply(this,arguments)};var N=h.connectVertex;h.connectVertex=function(a,d,e,g,k,m){var l=h.getIncomingEdges(a);return b(a)&&0<l.length?(e=q(a),g=e==mxConstants.DIRECTION_EAST||e==mxConstants.DIRECTION_WEST,k=d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST,e==d?f(a):g==k?c(a):t(a,d!=mxConstants.DIRECTION_NORTH&&d!=mxConstants.DIRECTION_WEST)):N.call(this,a,d,e,g,k,m)};h.getSubtree=function(a){var c=[a];b(a)&&
+!e(a)&&h.traverse(a,!0,function(a,b){null!=b&&0>mxUtils.indexOf(c,b)&&c.push(b);0>mxUtils.indexOf(c,a)&&c.push(a);return!0});return c};var D=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){D.apply(this,arguments);b(this.state.cell)&&0<this.graph.getOutgoingEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(a),this.moveHandle.setAttribute("title","Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width=
"18px",this.moveHandle.style.height="18px",this.graph.container.appendChild(this.moveHandle),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(a){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(a),mxEvent.getClientY(a));this.graph.graphHandler.cells=this.graph.getSubtree(this.state.cell);this.graph.graphHandler.bounds=this.state.view.getBounds(this.graph.graphHandler.cells);this.graph.graphHandler.pBounds=this.graph.graphHandler.getPreviewBounds(this.graph.graphHandler.cells);
-this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(a);this.graph.isMouseDown=!0;mxEvent.consume(a)})))};var G=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){G.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var J=mxVertexHandler.prototype.destroy;
-mxVertexHandler.prototype.destroy=function(a,b){J.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var d=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var a=d.apply(this,arguments),b=this.graph;return a.concat([this.addEntry("tree container",function(){var a=new mxCell("Tree Container",new mxGeometry(0,0,220,160),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");
+this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(a);this.graph.isMouseDown=!0;mxEvent.consume(a)})))};var G=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){G.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var K=mxVertexHandler.prototype.destroy;
+mxVertexHandler.prototype.destroy=function(a,b){K.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var d=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var a=d.apply(this,arguments),b=this.graph;return a.concat([this.addEntry("tree container",function(){var a=new mxCell("Tree Container",new mxGeometry(0,0,220,160),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");
a.vertex=!0;return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap central idea branch topic",function(){var a=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");a.vertex=!0;var b=new mxCell("Central Idea",new mxGeometry(160,60,100,40),"ellipse;whiteSpace=wrap;html=1;align=center;container=1;recursiveResize=0;treeFolding=1;");b.vertex=!0;var d=new mxCell("Topic",new mxGeometry(320,
40,80,20),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;");d.vertex=!0;var c=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");c.geometry.relative=!0;c.edge=!0;b.insertEdge(c,!0);d.insertEdge(c,!1);var e=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]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;");
e.vertex=!0;var g=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");g.geometry.relative=!0;g.edge=!0;b.insertEdge(g,!0);e.insertEdge(g,!1);var k=new mxCell("Topic",new mxGeometry(20,40,80,20),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;");k.vertex=!0;var l=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
@@ -3266,8 +3267,8 @@ Graph.createSvgImage(22,18,'<path transform="translate(4 0)" d="M7.181,15.007a1,
mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,10,'<path d="M 3 3 L 7 7 L 11 3" stroke="#C0C0C0" stroke-width="2" fill="#ffffff"/>').src;mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="#29b6f2"/>');mxOutline.prototype.sizerImage=null;mxConstants.VERTEX_SELECTION_COLOR="#C0C0C0";mxConstants.EDGE_SELECTION_COLOR="#C0C0C0";mxConstants.CONNECT_HANDLE_FILLCOLOR="#cee7ff";mxConstants.DEFAULT_VALID_COLOR="#29b6f2";mxConstants.GUIDE_COLOR=
"#C0C0C0";mxConstants.HIGHLIGHT_STROKEWIDTH=5;mxConstants.HIGHLIGHT_OPACITY=35;mxConstants.OUTLINE_COLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_FILLCOLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_STROKECOLOR="#fff";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowSize="0.6";Graph.prototype.svgShadowBlur="1.2";Format.prototype.inactiveTabBackgroundColor="#f0f0f0";mxGraphHandler.prototype.previewColor="#C0C0C0";mxRubberband.prototype.defaultOpacity=50;
HoverIcons.prototype.inactiveOpacity=25;Format.prototype.showCloseButton=!1;EditorUi.prototype.closableScratchpad=!1;EditorUi.prototype.toolbarHeight=46;EditorUi.prototype.footerHeight=0;Graph.prototype.editAfterInsert=!0;Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var l=EditorUi.prototype.updateTabContainer;EditorUi.prototype.updateTabContainer=function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom=
-"30px");l.apply(this,arguments)};var p=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){p.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var q=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(a,b){null!=b.shortcut&&900>e&&!mxClient.IS_IOS?a.firstChild.nextSibling.setAttribute("title",b.shortcut):q.apply(this,arguments)};var u=App.prototype.updateUserElement;App.prototype.updateUserElement=
-function(){u.apply(this,arguments);if(null!=this.userElement){var a=this.userElement;a.style.cssText="display:inline-block;position:relative;margin-right:4px;cursor:pointer;";a.className="geToolbarButton";a.innerHTML="";a.style.backgroundImage="url("+Editor.userImage+")";a.style.backgroundPosition="center center";a.style.backgroundRepeat="no-repeat";a.style.backgroundSize="24px 24px";a.style.height="24px";a.style.width="24px";a.style.cssFloat="right";a.setAttribute("title",mxResources.get("changeUser"))}};
+"30px");l.apply(this,arguments)};var p=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){p.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var q=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(a,b){null!=b.shortcut&&900>e&&!mxClient.IS_IOS?a.firstChild.nextSibling.setAttribute("title",b.shortcut):q.apply(this,arguments)};var t=App.prototype.updateUserElement;App.prototype.updateUserElement=
+function(){t.apply(this,arguments);if(null!=this.userElement){var a=this.userElement;a.style.cssText="display:inline-block;position:relative;margin-right:4px;cursor:pointer;";a.className="geToolbarButton";a.innerHTML="";a.style.backgroundImage="url("+Editor.userImage+")";a.style.backgroundPosition="center center";a.style.backgroundRepeat="no-repeat";a.style.backgroundSize="24px 24px";a.style.height="24px";a.style.width="24px";a.style.cssFloat="right";a.setAttribute("title",mxResources.get("changeUser"))}};
var c=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){c.apply(this,arguments);if(null!=this.shareButton){var a=this.shareButton;a.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;";a.className="geToolbarButton";a.innerHTML="";a.style.backgroundImage="url("+Editor.shareImage+")";a.style.backgroundPosition="center center";a.style.backgroundRepeat="no-repeat";a.style.backgroundSize="24px 24px";a.style.height=
"24px";a.style.width="24px"}null!=this.syncButton&&(a=this.syncButton,a.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;",a.className="geToolbarButton",a.innerHTML="",a.style.backgroundImage="url("+Editor.syncImage+")",a.style.backgroundPosition="center center",a.style.backgroundRepeat="no-repeat",a.style.backgroundSize="24px 24px",a.style.height="24px",a.style.width="24px")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.buttonContainer){var a=
document.createElement("div");a.style.display="inline-block";a.style.position="relative";a.style.marginTop="2px";var b=document.createElement("button");mxUtils.write(b,mxResources.get("save"));b.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)");b.className="1"==urlParams.saveAndExit?"geMenuItem":"geMenuItem gePrimaryBtn";b.style.fontSize="14px";b.style.padding="6px";b.style.borderRadius="3px";b.style.marginLeft="8px";b.style.cursor="pointer";mxEvent.addListener(b,"click",mxUtils.bind(this,
@@ -3308,9 +3309,9 @@ null],60)}d=g.menus.get("language");null!=d&&!mxClient.IS_CHROMEAPP&&!EditorUi.i
mxResources.get("untitledLibrary");var l=document.createElement("div");l.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;border-bottom:1px solid lightgray;background-color:#ffffff;text-align:left;white-space:nowrap;";var n=null,p=new Menubar(g,l);g.statusContainer=g.createStatusContainer();g.statusContainer.style.position="relative";g.statusContainer.style.maxWidth="";g.statusContainer.style.marginTop="7px";g.statusContainer.style.marginLeft="6px";g.statusContainer.style.color=
"gray";g.statusContainer.style.cursor="default";g.editor.addListener("statusChanged",mxUtils.bind(this,function(){g.setStatusText(g.editor.getStatus())}));var q=g.descriptorChanged;g.descriptorChanged=function(){q.apply(this,arguments);var a=g.getCurrentFile();if(null!=a&&null!=a.getTitle()){var b=a.getMode();"google"==b?b="googleDrive":"github"==b?b="gitHub":"onedrive"==b&&(b="oneDrive");b=mxResources.get(b);l.setAttribute("title",a.getTitle()+(null!=b?" ("+b+")":""))}else l.removeAttribute("title")};
g.setStatusText(g.editor.getStatus());l.appendChild(g.statusContainer);g.buttonContainer=document.createElement("div");g.buttonContainer.style.cssText="position:absolute;right:40px;top:12px;white-space:nowrap;";l.appendChild(g.buttonContainer);g.menubarContainer=g.buttonContainer;g.tabContainer=document.createElement("div");g.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;border-bottom:1px solid lightgray;background-color:#ffffff;border-top:1px solid lightgray;margin-bottom:-2px;visibility:hidden;";
-var f=g.diagramContainer.parentNode,r=document.createElement("div");r.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";g.diagramContainer.style.top="47px";var u=g.menus.get("viewZoom");if(null!=u){this.tabContainer.style.right="70px";var A=p.addMenu("100%",u.funct);A.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");A.style.whiteSpace="nowrap";A.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";A.style.backgroundPosition="right 6px center";
+var f=g.diagramContainer.parentNode,r=document.createElement("div");r.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";g.diagramContainer.style.top="47px";var t=g.menus.get("viewZoom");if(null!=t){this.tabContainer.style.right="70px";var A=p.addMenu("100%",t.funct);A.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");A.style.whiteSpace="nowrap";A.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";A.style.backgroundPosition="right 6px center";
A.style.backgroundRepeat="no-repeat";A.style.backgroundColor="#ffffff";A.style.paddingRight="10px";A.style.display="block";A.style.position="absolute";A.style.textDecoration="none";A.style.textDecoration="none";A.style.right="0px";A.style.bottom="0px";A.style.overflow="hidden";A.style.visibility="hidden";A.style.textAlign="center";A.style.color="#000";A.style.fontSize="12px";A.style.color="#707070";A.style.width="59px";A.style.borderTop="1px solid lightgray";A.style.borderLeft="1px solid lightgray";
-A.style.height=parseInt(g.tabContainer.style.height)-1+"px";A.style.lineHeight=parseInt(g.tabContainer.style.height)+1+"px";r.appendChild(A);u=mxUtils.bind(this,function(){A.innerHTML=Math.round(100*g.editor.graph.view.scale)+"%"});g.editor.graph.view.addListener(mxEvent.EVENT_SCALE,u);g.editor.addListener("resetGraphView",u);g.editor.addListener("pageSelected",u);var I=g.setGraphEnabled;g.setGraphEnabled=function(){I.apply(this,arguments);null!=this.tabContainer&&(A.style.visibility=this.tabContainer.style.visibility,
+A.style.height=parseInt(g.tabContainer.style.height)-1+"px";A.style.lineHeight=parseInt(g.tabContainer.style.height)+1+"px";r.appendChild(A);t=mxUtils.bind(this,function(){A.innerHTML=Math.round(100*g.editor.graph.view.scale)+"%"});g.editor.graph.view.addListener(mxEvent.EVENT_SCALE,t);g.editor.addListener("resetGraphView",t);g.editor.addListener("pageSelected",t);var I=g.setGraphEnabled;g.setGraphEnabled=function(){I.apply(this,arguments);null!=this.tabContainer&&(A.style.visibility=this.tabContainer.style.visibility,
this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility?"30px":"0px")}}r.appendChild(g.tabContainer);r.appendChild(l);r.appendChild(g.diagramContainer);f.appendChild(r);g.updateTabContainer();var O=null;d();mxEvent.addListener(window,"resize",function(){d();null!=g.sidebarWindow&&g.sidebarWindow.window.fit();null!=g.formatWindow&&g.formatWindow.window.fit();null!=g.actions.outlineWindow&&g.actions.outlineWindow.window.fit();null!=g.actions.layersWindow&&g.actions.layersWindow.window.fit();
null!=g.menus.tagsWindow&&g.menus.tagsWindow.window.fit();null!=g.menus.findWindow&&g.menus.findWindow.window.fit()})}}};(function(){var a=!1;"min"!=uiTheme||a||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),a=!0);var b=EditorUi.initTheme;EditorUi.initTheme=function(){b.apply(this,arguments);"min"!=uiTheme||a||(this.initMinimalTheme(),a=!0)}})();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\naboutDrawio=About draw.io\naccessDenied=Access Denied\naction=Action\nactualSize=Actual Size\nadd=Add\naddedFile=Added {1}\naddImages=Add Images\naddImageUrl=Add Image URL\naddLayer=Add Layer\naddProperty=Add Property\naddress=Address\naddToExistingDrawing=Add to Existing Drawing\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nalign=Align\nalignment=Alignment\nallChangesLost=All changes will be lost!\nallPages=All Pages\nallProjects=All Projects\nallSpaces=All Spaces\nallTags=All Tags\nanchor=Anchor\nandroid=Android\nangle=Angle\narc=Arc\nareYouSure=Are you sure?\nensureDataSaved=Please ensure your data is saved before closing.\nallChangesSaved=All changes saved\nallChangesSavedInDrive=All changes saved in Drive\nallowPopups=Allow pop-ups to avoid this dialog.\nallowRelativeUrl=Allow relative URL\nalreadyConnected=Nodes already connected\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\nasNew=As New\natlas=Atlas\nauthor=Author\nauthorizationRequired=Authorization required\nauthorizeThisAppIn=Authorize this app in {1}:\nauthorize=Authorize\nauthorizing=Authorizing\nautomatic=Automatic\nautosave=Autosave\nautosize=Autosize\nattachments=Attachments\naws=AWS\naws3d=AWS 3D\nazure=Azure\nbackground=Background\nbackgroundColor=Background Color\nbackgroundImage=Background Image\nbasic=Basic\nblankDrawing=Blank Drawing\nblankDiagram=Blank Diagram\nblock=Block\nblockquote=Blockquote\nblog=Blog\nbold=Bold\nbootstrap=Bootstrap\nborder=Border\nborderColor=Border Color\nborderWidth=Borderwidth\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\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\nchangesNotSaved=Changes have not been saved\nuserJoined={1} has joined\nuserLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\ncollaborativeEditingNotice=Important Notice for Collaborative Editing\ncompressed=Compressed\ncommitMessage=Commit Message\ncsv=CSV\ndark=Dark\ndraftFound=A draft for '{1}' has been found. Load it into the editor or discard it to continue.\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\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\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\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopySize=Copy Size\ncopyStyle=Copy Style\ncreate=Create\ncreateNewDiagram=Create New Diagram\ncreateRevision=Create Revision\ncreateShape=Create Shape\ncrop=Crop\ncurved=Curved\ncustom=Custom\ncurrent=Current\ncut=Cut\ndashed=Dashed\ndecideLater=Decide later\ndefault=Default\ndelete=Delete\ndeleteColumn=Delete Column\ndeleteLibrary401=Insufficient permissions to delete this library\ndeleteLibrary404=Selected library could not be found\ndeleteLibrary500=Error deleting library\ndeleteLibraryConfirm=You are about to permanently delete this library. Are you sure you want to do this?\ndeleteRow=Delete Row\ndescription=Description\ndevice=Device\ndiagram=Diagram\ndiagramContent=Diagram Content\ndiagramLocked=Diagram has been locked to prevent further data loss.\ndiagramLockedBySince=The diagram is locked by {1} since {2} ago\ndiagramName=Diagram Name\ndiagramIsPublic=Diagram is public\ndiagramIsNotPublic=Diagram is not public\ndiamond=Diamond\ndiamondThin=Diamond (thin)\ndidYouKnow=Did you know...\ndirection=Direction\ndiscard=Discard\ndiscardChangesAndReconnect=Discard Changes and Reconnect\ngoogleDriveMissingClickHere=Google Drive missing? Click here!\ndiscardChanges=Discard Changes\ndisconnected=Disconnected\ndistribute=Distribute\ndone=Done\ndotted=Dotted\ndoubleClickOrientation=Doubleclick to change orientation\ndoubleClickTooltip=Doubleclick to insert text\ndoubleClickChangeProperty=Doubleclick to change property name\ndownload=Download\ndownloadDesktop=Download draw.io Desktop\ndownloadAs=Download as\nclickHereToSave=Click here to save.\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\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\nerror=Error\nerrorDeletingFile=Error deleting file\nerrorLoadingFile=Error loading file\nerrorRenamingFile=Error renaming file\nerrorRenamingFileNotFound=Error renaming file. File was not found.\nerrorRenamingFileForbidden=Error renaming file. Insufficient access rights.\nerrorSavingDraft=Error saving draft\nerrorSavingFile=Error saving file\nerrorSavingFileUnknown=Error authorizing with Google's servers. Please refresh the page to re-attempt.\nerrorSavingFileForbidden=Error saving file. Insufficient access rights.\nerrorSavingFileNameConflict=Could not save diagram. Current page already contains file named '{1}'.\nerrorSavingFileNotFound=Error saving file. File was not found.\nerrorSavingFileReadOnlyMode=Could not save diagram while read-only mode is active.\nerrorSavingFileSessionTimeout=Your session has ended. Please <a target='_blank' href='{1}'>{2}</a> and return to this tab to try to save again.\nerrorSendingFeedback=Error sending feedback.\nerrorUpdatingPreview=Error updating preview.\nexit=Exit\nexitGroup=Exit Group\nexpand=Expand\nexport=Export\nexporting=Exporting\nexportAs=Export as\nexportOptionsDisabled=Export options disabled\nexportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.\nexternalChanges=External Changes\nextras=Extras\nfacebook=Facebook\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwriteDialog=The file has been modified. Do you want to save the file and overwrite those changes?\nfileChangedSyncDialog=The file has been modified. Do you want to synchronize those changes?\nfileChangedSync=The file has been modified. Click here to synchronize.\noverwrite=Overwrite\nsynchronize=Synchronize\nfilename=Filename\nfileExists=File already exists\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 read access.\nfileNotLoaded=File not loaded\nfileNotSaved=File not saved\nfileOpenLocation=How would you like to open these file(s)?\nfileWillBeSavedInAppFolder={1} will be saved in the app folder.\nfill=Fill\nfillColor=Fill Color\nfilterCards=Filter Cards\nfind=Find\nfit=Fit\nfitContainer=Resize Container\nfitIntoContainer=Fit into Container\nfitPage=Fit Page\nfitPageWidth=Fit Page Width\nfitTo=Fit to\nfitToSheetsAcross=sheet(s) across\nfitToBy=by\nfitToSheetsDown=sheet(s) down\nfitTwoPages=Two Pages\nfitWindow=Fit Window\nflip=Flip\nflipH=Flip Horizontal\nflipV=Flip Vertical\nflowchart=Flowchart\nfolder=Folder\nfont=Font\nfontColor=Font Color\nfontFamily=Font Family\nfontSize=Font Size\nforbidden=You are not authorized to access this file\nformat=Format\nformatPanel=Format Panel\nformatted=Formatted\nformattedText=Formatted Text\nformatPng=PNG\nformatGif=GIF\nformatJpg=JPEG\nformatPdf=PDF\nformatSql=SQL\nformatSvg=SVG\nformatHtmlEmbedded=HTML\nformatSvgEmbedded=SVG (with XML)\nformatVsdx=VSDX\nformatVssx=VSSX\nformatXmlPlain=XML (Plain)\nformatXml=XML\nforum=Discussion/Help Forums\nfromTemplate=From Template\nfromTemplateUrl=From Template URL\nfromText=From Text\nfromUrl=From URL\nfromThisPage=From this page\nfullscreen=Fullscreen\ngap=Gap\ngcp=GCP\ngeneral=General\ngithub=GitHub\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\ngooglePlus=Google+\ngoogleSlides=Google Slides\ngoogleSites=Google Sites\ngradient=Gradient\ngradientColor=Color\ngrid=Grid\ngridColor=Grid Color\ngridSize=Grid Size\ngroup=Group\nguides=Guides\nhateApp=I hate draw.io\nheading=Heading\nheight=Height\nhelp=Help\nhelpTranslate=Help us translate this application\nhide=Hide\nhideIt=Hide {1}\nhidden=Hidden\nhome=Home\nhorizontal=Horizontal\nhorizontalFlow=Horizontal Flow\nhorizontalTree=Horizontal Tree\nhowTranslate=How good is the translation in your language?\nhtml=HTML\nhtmlText=HTML Text\nid=ID\niframe=IFrame\nignore=Ignore\nimage=Image\nimageUrl=Image URL\nimages=Images\nimagePreviewError=This image couldn't be loaded for preview. Please check the URL.\nimageTooBig=Image too big\nimgur=Imgur\nimport=Import\nimportFrom=Import from\nincludeCopyOfMyDiagram=Include a copy of my diagram\nincreaseIndent=Increase Indent\ndecreaseIndent=Decrease Indent\ninsert=Insert\ninsertColumnBefore=Insert Column Left\ninsertColumnAfter=Insert Column Right\ninsertEllipse=Insert Ellipse\ninsertImage=Insert Image\ninsertHorizontalRule=Insert Horizontal Rule\ninsertLink=Insert Link\ninsertPage=Insert Page\ninsertRectangle=Insert Rectangle\ninsertRhombus=Insert Rhombus\ninsertRowBefore=Insert Row Above\ninsertRowAfter=Insert Row After\ninsertText=Insert Text\ninserting=Inserting\ninvalidFilename=Diagram names must not contain the following characters: / | : ; { } < > & + ? = \"\ninvalidLicenseSeeThisPage=Your license is invalid, please see this <a target=\"_blank\" href=\"https://support.draw.io/display/DFCS/Licensing+your+draw.io+plugin\">page</a>.\ninvalidName=Invalid name\ninvalidOrMissingFile=Invalid or missing file\ninvalidPublicUrl=Invalid public URL\nisometric=Isometric\nios=iOS\nitalic=Italic\nkennedy=Kennedy\nkeyboardShortcuts=Keyboard Shortcuts\nlayers=Layers\nlandscape=Landscape\nlanguage=Language\nleanMapping=Lean Mapping\nlastChange=Last change {1} ago\nlessThanAMinute=less than a minute\nlicensingError=Licensing Error\nlicenseHasExpired=The license for {1} has expired on {2}. Click here.\nlicenseWillExpire=The license for {1} will expire on {2}. Click here.\nlineJumps=Line jumps\nlinkAccountRequired=If the diagram is not public a Google account is required to view the link.\nlinkText=Link Text\nlist=List\nminute=minute\nminutes=minutes\nhours=hours\ndays=days\nmonths=months\nyears=years\nrestartForChangeRequired=Changes will take effect after page refresh.\nlaneColor=Lanecolor\nlastModified=Last modified\nlayout=Layout\nleft=Left\nleftAlign=Left Align\nleftToRight=Left to right\nlibraryTooltip=Drag and drop shapes here or click + to insert. Double click to edit.\nlightbox=Lightbox\nline=Line\nlineend=Line end\nlineheight=Line Height\nlinestart=Line start\nlinewidth=Linewidth\nlink=Link\nlinks=Links\nloading=Loading\nlockUnlock=Lock/Unlock\nloggedOut=Logged Out\nlogIn=log in\nloveIt=I love {1}\nlucidchart=Lucidchart\nmaps=Maps\nmathematicalTypesetting=Mathematical Typesetting\nmakeCopy=Make a Copy\nmanual=Manual\nmiddle=Middle\nminimal=Minimal\nmisc=Misc\nmockups=Mockups\nmodificationDate=Modification date\nmodifiedBy=Modified by\nmore=More\nmoreResults=More Results\nmoreShapes=More Shapes\nmove=Move\nmoveToFolder=Move to Folder\nmoving=Moving\nmoveSelectionTo=Move selection to {1}\nname=Name\nnavigation=Navigation\nnetwork=Network\nnetworking=Networking\nnew=New\nnewLibrary=New Library\nnextPage=Next Page\nno=No\nnoPickFolder=No, pick folder\nnoAttachments=No attachments found\nnoColor=No Color\nnoFiles=No Files\nnoFileSelected=No file selected\nnoLibraries=No libraries found\nnoMoreResults=No more results\nnone=None\nnoOtherViewers=No other viewers\nnoPlugins=No plugins\nnoPreview=No preview\nnoResponse=No response from server\nnoResultsFor=No results for '{1}'\nnoRevisions=No revisions\nnoSearchResults=No search results found\nnoPageContentOrNotSaved=No anchors found on this page or it hasn't been saved yet\nnormal=Normal\nnorth=North\nnotADiagramFile=Not a diagram file\nnotALibraryFile=Not a library file\nnotAvailable=Not available\nnotAUtf8File=Not a UTF-8 file\nnotConnected=Not connected\nnote=Note\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\northogonal=Orthogonal\notherViewer=other viewer\notherViewers=other viewers\noutline=Outline\noval=Oval\npage=Page\npageContent=Page Content\npageNotFound=Page not found\npageWithNumber=Page-{1}\npages=Pages\npageView=Page View\npageSetup=Page Setup\npageScale=Page Scale\npan=Pan\npanTooltip=Space+Drag to pan\npaperSize=Paper Size\npattern=Pattern\npaste=Paste\npasteHere=Paste here\npasteSize=Paste Size\npasteStyle=Paste Style\nperimeter=Perimeter\npermissionAnyone=Anyone can edit\npermissionAuthor=Owner and admins can edit\npickFolder=Pick a folder\npickLibraryDialogTitle=Select Library\npublicDiagramUrl=Public URL of the diagram\nplaceholders=Placeholders\nplantUml=PlantUML\nplugins=Plugins\npluginUrl=Plugin URL\npluginWarning=The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n\nplusTooltip=Click to connect and clone (ctrl+click to clone, shift+click to connect). Drag to connect (ctrl+drag to clone).\nportrait=Portrait\nposition=Position\nposterPrint=Poster Print\npreferences=Preferences\npreview=Preview\npreviousPage=Previous Page\nprint=Print\nprintAllPages=Print All Pages\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nproperties=Properties\npublish=Publish\nquickStart=Quick Start Video\nrack=Rack\nradialTree=Radial Tree\nreadOnly=Read-only\nreconnecting=Reconnecting\nrecentlyUpdated=Recently Updated\nrecentlyViewed=Recently Viewed\nrectangle=Rectangle\nredirectToNewApp=This file was created or modified in a newer version of this app. You will be redirected now.\nrealtimeTimeout=It looks like you've made a few changes while offline. We're sorry, these changes cannot be saved.\nredo=Redo\nrefresh=Refresh\nregularExpression=Regular Expression\nrelative=Relative\nrelativeUrlNotAllowed=Relative URL not allowed\nrememberMe=Remember me\nrememberThisSetting=Remember this setting\nremoveFormat=Clear Formatting\nremoveFromGroup=Remove from Group\nremoveIt=Remove {1}\nremoveWaypoint=Remove Waypoint\nrename=Rename\nrenamed=Renamed\nrenameIt=Rename {1}\nrenaming=Renaming\nreplace=Replace\nreplaceIt={1} already exists. Do you want to replace it?\nreplaceExistingDrawing=Replace existing drawing\nrequired=required\nreset=Reset\nresetView=Reset View\nresize=Resize\nresizeLargeImages=Do you want to resize large images to make the application run faster?\nretina=Retina\nresponsive=Responsive\nrestore=Restore\nrestoring=Restoring\nretryingIn=Retrying in {1} second(s)\nretryingLoad=Load failed. Retrying...\nretryingLogin=Login time out. Retrying...\nreverse=Reverse\nrevision=Revision\nrevisionHistory=Revision History\nrhombus=Rhombus\nright=Right\nrightAlign=Right Align\nrightToLeft=Right to left\nrotate=Rotate\nrotateTooltip=Click and drag to rotate, click to turn shape only by 90 degrees\nrotation=Rotation\nrounded=Rounded\nsave=Save\nsaveAndExit=Save & Exit\nsaveAs=Save as\nsaveAsXmlFile=Save as XML file?\nsaved=Saved\nsaveDiagramsTo=Save diagrams to\nsaveLibrary403=Insufficient permissions to edit this library\nsaveLibrary500=There was an error while saving the library\nsaving=Saving\nscratchpad=Scratchpad\nscrollbars=Scrollbars\nsearch=Search\nsearchShapes=Search Shapes\nselectAll=Select All\nselectionOnly=Selection Only\nselectCard=Select Card\nselectEdges=Select Edges\nselectFile=Select File\nselectFolder=Select Folder\nselectFont=Select Font\nselectNone=Select None\nselectTemplate=Select Template\nselectVertices=Select Vertices\nsendMessage=Send\nsendYourFeedbackToDrawIo=Send your feedback to draw.io\nserviceUnavailableOrBlocked=Service unavailable or blocked\nsessionExpired=Your session has expired. Please refresh the browser window.\nsessionTimeoutOnSave=Your session has timed out and you have been disconnected from the Google Drive. Press OK to login and save. \nsetAsDefaultStyle=Set as Default Style\nshadow=Shadow\nshape=Shape\nshapes=Shapes\nshare=Share\nshareLink=Link for shared editing\nsharp=Sharp\nshow=Show\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click to expand. Drag and drop shapes into the diagram. Shift+click to change selection. Alt+click to insert and connect.\nsigns=Signs\nsignOut=Sign out\nsimple=Simple\nsimpleArrow=Simple Arrow\nsize=Size\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstandard=Standard\nstarting=Starting\nstraight=Straight\nstrokeColor=Line Color\nstyle=Style\nsubscript=Subscript\nsummary=Summary\nsuperscript=Superscript\nsupport=Support\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\ntooltips=Tooltips\ntop=Top\ntopAlign=Top Align\ntopLeft=Top Left\ntopRight=Top Right\ntransparent=Transparent\ntransparentBackground=Transparent Background\ntrello=Trello\ntryAgain=Try again\ntryOpeningViaThisPage=Try opening via this page.\nturn=Rotate shape only by 90°\ntype=Type\ntwitter=Twitter\numl=UML\nunderline=Underline\nundo=Undo\nungroup=Ungroup\nunsavedChanges=Unsaved changes\nunsavedChangesClickHereToSave=Unsaved changes. Click here to save.\nuntitled=Untitled\nuntitledDiagram=Untitled Diagram\nuntitledLayer=Untitled Layer\nuntitledLibrary=Untitled Library\nunknownError=Unknown error\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuseOffline=Use Offline\nuseRootFolder=Use root folder?\nuserManual=User Manual\nvertical=Vertical\nverticalFlow=Vertical Flow\nverticalTree=Vertical Tree\nview=View\nviewUrl=Link to view: {1}\nvoiceAssistant=Voice Assistant (beta)\nwarning=Warning\nwaypoints=Waypoints\nwest=West\nwidth=Width\nwiki=Wiki\nwordWrap=Word Wrap\nwritingDirection=Writing Direction\nyes=Yes\nyourEmailAddress=Your email address\nzoom=Zoom\nzoomIn=Zoom In\nzoomOut=Zoom Out\nbasic=Basic\nbusinessprocess=Business Processes\ncharts=Charts\nengineering=Engineering\nflowcharts=Flowcharts\ngmdl=Material Design\nmindmaps=Mindmaps\nmockups=Mockups\nnetworkdiagrams=Network Diagrams\nnothingIsSelected=Nothing is selected\nother=Other\nsoftwaredesign=Software Design\nvenndiagrams=Venn Diagrams\nwebEmailOrOther=Web, email or any other internet address\nwebLink=Web Link\nwireframes=Wireframes\nproperty=Property\nvalue=Value\nshowMore=Show More\nshowLess=Show Less\nmyDiagrams=My Diagrams\nallDiagrams=All Diagrams\nrecentlyUsed=Recently used\nlistView=List view\ngridView=Grid view\nresultsFor=Results for '{1}'\n");Graph.prototype.defaultThemes[Graph.prototype.defaultThemeName]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#ffffff"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#ffffff"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="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><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="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="white"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#ffffff"/></add></mxStylesheet>').documentElement;
Graph.prototype.defaultThemes.darkTheme=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#2a2a2a"/><add as="strokeColor" value="#f0f0f0"/><add as="fontColor" value="#f0f0f0"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#f0f0f0"/><add as="fontColor" value="#f0f0f0"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#2a2a2a"/></add></mxStylesheet>').documentElement;GraphViewer=function(a,b,e){this.init(a,b,e)};mxUtils.extend(GraphViewer,mxEventSource);GraphViewer.prototype.editBlankUrl="https://www.draw.io/";GraphViewer.prototype.imageBaseUrl="https://www.draw.io/";GraphViewer.prototype.toolbarHeight="BackCompat"==document.compatMode?28:30;GraphViewer.prototype.lightboxChrome=!0;GraphViewer.prototype.lightboxZIndex=999;GraphViewer.prototype.toolbarZIndex=999;GraphViewer.prototype.autoFit=!0;GraphViewer.prototype.allowZoomIn=!1;
@@ -3339,13 +3340,13 @@ GraphViewer.prototype.addToolbar=function(){function a(a,b,c,d){var g=document.c
function(){g.style.backgroundColor="#eee"}),mxUtils.setOpacity(a,60),g.style.cursor="pointer"):mxUtils.setOpacity(g,30);g.appendChild(a);e.appendChild(g);f++;return g}var b=this.graph.container;"bottom"==this.graphConfig["toolbar-position"]?b.style.marginBottom=this.toolbarHeight+"px":"inline"!=this.graphConfig["toolbar-position"]&&(b.style.marginTop=this.toolbarHeight+"px");var e=b.ownerDocument.createElement("div");e.style.position="absolute";e.style.overflow="hidden";e.style.boxSizing="border-box";
e.style.whiteSpace="nowrap";e.style.zIndex=this.toolbarZIndex;e.style.backgroundColor="#eee";e.style.height=this.toolbarHeight+"px";this.toolbar=e;if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(e.style,"transition","opacity 100ms ease-in-out");mxUtils.setOpacity(e,30);var d=null,k=null,l=mxUtils.bind(this,function(a){null!=d&&(window.clearTimeout(d),fadeThead=null);null!=k&&(window.clearTimeout(k),fadeThead2=null);d=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(e,
0);d=null;k=window.setTimeout(mxUtils.bind(this,function(){e.style.display="none";k=null}),100)}),a||200)}),p=mxUtils.bind(this,function(a){null!=d&&(window.clearTimeout(d),fadeThead=null);null!=k&&(window.clearTimeout(k),fadeThead2=null);e.style.display="";mxUtils.setOpacity(e,a||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(p(30),l())}));mxEvent.addListener(e,mxClient.IS_POINTER?"pointermove":
-"mousemove",function(a){mxEvent.consume(a)});mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(a){p(100)}));mxEvent.addListener(e,"mousemove",mxUtils.bind(this,function(a){p(100);mxEvent.consume(a)}));mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||p(30)}));var q=this.graph,u=q.getTolerance();q.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(a,b){this.startX=b.getGraphX();this.startY=b.getGraphY();this.scrollLeft=
-q.container.scrollLeft;this.scrollTop=q.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(a,b){mxEvent.isTouchEvent(b.getEvent())&&Math.abs(this.scrollLeft-q.container.scrollLeft)<u&&Math.abs(this.scrollTop-q.container.scrollTop)<u&&Math.abs(this.startX-b.getGraphX())<u&&Math.abs(this.startY-b.getGraphY())<u&&(0<parseFloat(e.style.opacity||0)?l():p(30))}})}for(var c=this.toolbarItems,f=0,g=null,n=null,r=0;r<c.length;r++){var h=c[r];if("pages"==h){n=b.ownerDocument.createElement("div");
+"mousemove",function(a){mxEvent.consume(a)});mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(a){p(100)}));mxEvent.addListener(e,"mousemove",mxUtils.bind(this,function(a){p(100);mxEvent.consume(a)}));mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||p(30)}));var q=this.graph,t=q.getTolerance();q.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(a,b){this.startX=b.getGraphX();this.startY=b.getGraphY();this.scrollLeft=
+q.container.scrollLeft;this.scrollTop=q.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(a,b){mxEvent.isTouchEvent(b.getEvent())&&Math.abs(this.scrollLeft-q.container.scrollLeft)<t&&Math.abs(this.scrollTop-q.container.scrollTop)<t&&Math.abs(this.startX-b.getGraphX())<t&&Math.abs(this.startY-b.getGraphY())<t&&(0<parseFloat(e.style.opacity||0)?l():p(30))}})}for(var c=this.toolbarItems,f=0,g=null,n=null,r=0;r<c.length;r++){var h=c[r];if("pages"==h){n=b.ownerDocument.createElement("div");
n.style.cssText="display:inline-block;position:relative;padding:3px 4px 0 4px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;";mxUtils.setOpacity(n,70);var m=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");m.style.borderRightStyle="none";m.style.paddingLeft="0px";m.style.paddingRight="0px";e.appendChild(n);var w=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage+
1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");w.style.paddingLeft="0px";w.style.paddingRight="0px";h=mxUtils.bind(this,function(){n.innerHTML="";mxUtils.write(n,this.currentPage+1+" / "+this.diagrams.length);n.style.display=1<this.diagrams.length?"inline-block":"none";m.style.display=n.style.display;w.style.display=n.style.display});this.addListener("graphChanged",h);h()}else if("zoom"==h)this.zoomEnabled&&(a(mxUtils.bind(this,function(){this.graph.zoomOut()}),Editor.zoomOutImage,
-mxResources.get("zoomOut")||"Zoom Out"),a(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),a(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"==h){if(this.layersEnabled){var v=this.graph.getModel(),D=a(mxUtils.bind(this,function(a){if(null!=g)g.parentNode.removeChild(g),
-g=null;else{g=this.graph.createLayersDialog();mxEvent.addListener(g,"mouseleave",function(){g.parentNode.removeChild(g);g=null});a=D.getBoundingClientRect();g.style.width="140px";g.style.padding="2px 0px 2px 0px";g.style.border="1px solid #d0d0d0";g.style.backgroundColor="#eee";g.style.fontFamily="Helvetica Neue,Helvetica,Arial Unicode MS,Arial";g.style.fontSize="11px";g.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(g,80);var b=mxUtils.getDocumentScrollOrigin(document);g.style.left=b.x+a.left+
-"px";g.style.top=b.y+a.bottom+"px";document.body.appendChild(g)}}),Editor.layersImage,mxResources.get("layers")||"Layers");v.addListener(mxEvent.CHANGE,function(){D.style.display=1<v.getChildCount(v.root)?"inline-block":"none"});D.style.display=1<v.getChildCount(v.root)?"inline-block":"none"}}else"lightbox"==h?this.lightboxEnabled&&a(mxUtils.bind(this,function(){this.showLightbox()}),Editor.maximizeImage,mxResources.get("show")||"Show"):null!=this.graphConfig["toolbar-buttons"]&&(h=this.graphConfig["toolbar-buttons"][h],
+mxResources.get("zoomOut")||"Zoom Out"),a(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),a(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"==h){if(this.layersEnabled){var v=this.graph.getModel(),E=a(mxUtils.bind(this,function(a){if(null!=g)g.parentNode.removeChild(g),
+g=null;else{g=this.graph.createLayersDialog();mxEvent.addListener(g,"mouseleave",function(){g.parentNode.removeChild(g);g=null});a=E.getBoundingClientRect();g.style.width="140px";g.style.padding="2px 0px 2px 0px";g.style.border="1px solid #d0d0d0";g.style.backgroundColor="#eee";g.style.fontFamily="Helvetica Neue,Helvetica,Arial Unicode MS,Arial";g.style.fontSize="11px";g.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(g,80);var b=mxUtils.getDocumentScrollOrigin(document);g.style.left=b.x+a.left+
+"px";g.style.top=b.y+a.bottom+"px";document.body.appendChild(g)}}),Editor.layersImage,mxResources.get("layers")||"Layers");v.addListener(mxEvent.CHANGE,function(){E.style.display=1<v.getChildCount(v.root)?"inline-block":"none"});E.style.display=1<v.getChildCount(v.root)?"inline-block":"none"}}else"lightbox"==h?this.lightboxEnabled&&a(mxUtils.bind(this,function(){this.showLightbox()}),Editor.maximizeImage,mxResources.get("show")||"Show"):null!=this.graphConfig["toolbar-buttons"]&&(h=this.graphConfig["toolbar-buttons"][h],
null!=h&&a(null==h.enabled||h.enabled?h.handler:function(){},h.image,h.title,h.enabled))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*f);null!=this.graphConfig.title&&(c=b.ownerDocument.createElement("div"),c.style.cssText="display:inline-block;position:relative;padding:3px 6px 0 6px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;",c.setAttribute("title",this.graphConfig.title),mxUtils.write(c,this.graphConfig.title),mxUtils.setOpacity(c,
70),e.appendChild(c));this.minToolbarWidth=34*f;var x=b.style.border,c=mxUtils.bind(this,function(){var a=b.getBoundingClientRect(),c=mxUtils.getScrollOrigin(document.body),c="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-c.x,top:-c.y},a={left:a.left-c.left,top:a.top-c.top,bottom:a.bottom-c.top,right:a.right-c.left};e.style.left=a.left+"px";e.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,b.offsetWidth)+"px";
e.style.border="1px solid #d0d0d0";"bottom"==this.graphConfig["toolbar-position"]?e.style.top=a.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(e.style.marginTop=-this.toolbarHeight+"px",e.style.top=a.top+1+"px"):e.style.top=a.top+"px";"1px solid transparent"==x&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(e);var d=mxUtils.bind(this,function(){1!=this.graphConfig["toolbar-nohide"]&&(null!=e.parentNode&&e.parentNode.removeChild(e),null!=g&&(g.parentNode.removeChild(g),
@@ -3359,7 +3360,7 @@ GraphViewer.prototype.showLocalLightbox=function(){var a=mxUtils.getDocumentScro
var e=document.createElement("img");e.setAttribute("border","0");e.setAttribute("src",Editor.closeImage);mxClient.IS_QUIRKS?(e.style.position="absolute",e.style.right="32px",e.style.top=a.y+32+"px"):e.style.cssText="position:fixed;top:32px;right:32px;";e.style.cursor="pointer";mxEvent.addListener(e,"click",function(){d.destroy()});urlParams.pages="1";urlParams.page=this.currentPage;urlParams.nav=0!=this.graphConfig.nav?"1":"0";urlParams.layers=this.layersEnabled?"1":"0";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(){};Graph.prototype.shadowId="lightboxDropShadow";var d=new EditorUi(new Editor(!0),document.createElement("div"),!0);d.editor.editBlankUrl=this.editBlankUrl;Graph.prototype.shadowId="dropShadow";d.refresh=
function(){};var k=mxUtils.bind(this,function(a){27==a.keyCode&&d.destroy()}),l=d.destroy;d.destroy=function(){mxEvent.removeListener(document.documentElement,"keydown",k);document.body.removeChild(b);document.body.removeChild(e);document.body.style.overflow="auto";GraphViewer.resizeSensorEnabled=!0;l.apply(this,arguments)};var p=d.editor.graph,q=p.container;q.style.overflow="hidden";this.lightboxChrome?(q.style.border="1px solid #c0c0c0",q.style.margin="40px",mxEvent.addListener(document.documentElement,
-"keydown",k)):(b.style.display="none",e.style.display="none");var u=this;p.getImageFromBundles=function(a){return u.getImageUrl(a)};var c=d.createTemporaryGraph;d.createTemporaryGraph=function(){var a=c.apply(this,arguments);a.getImageFromBundles=function(a){return u.getImageUrl(a)};return a};this.graphConfig.move&&(p.isMoveCellsEvent=function(a){return!0});mxClient.IS_QUIRKS||(mxUtils.setPrefixedStyle(q.style,"border-radius","4px"),q.style.position="fixed");GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow=
+"keydown",k)):(b.style.display="none",e.style.display="none");var t=this;p.getImageFromBundles=function(a){return t.getImageUrl(a)};var c=d.createTemporaryGraph;d.createTemporaryGraph=function(){var a=c.apply(this,arguments);a.getImageFromBundles=function(a){return t.getImageUrl(a)};return a};this.graphConfig.move&&(p.isMoveCellsEvent=function(a){return!0});mxClient.IS_QUIRKS||(mxUtils.setPrefixedStyle(q.style,"border-radius","4px"),q.style.position="fixed");GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow=
"hidden";mxClient.IS_SF||mxClient.IS_EDGE||(mxUtils.setPrefixedStyle(q.style,"transform","rotateY(90deg)"),mxUtils.setPrefixedStyle(q.style,"transition","all .25s ease-in-out"));this.addClickHandler(p,d);window.setTimeout(mxUtils.bind(this,function(){q.style.outline="none";q.style.zIndex=this.lightboxZIndex;e.style.zIndex=this.lightboxZIndex;document.body.appendChild(q);document.body.appendChild(e);d.setFileData(this.xml);mxUtils.setPrefixedStyle(q.style,"transform","rotateY(0deg)");d.chromelessToolbar.style.bottom=
"60px";d.chromelessToolbar.style.zIndex=this.lightboxZIndex;document.body.appendChild(d.chromelessToolbar);d.getEditBlankXml=mxUtils.bind(this,function(){return this.xml});mxClient.IS_QUIRKS&&(q.style.position="absolute",q.style.display="block",q.style.left=a.x+"px",q.style.top=a.y+"px",q.style.width=document.body.clientWidth-80+"px",q.style.height=document.body.clientHeight-80+"px",q.style.backgroundColor="white",d.chromelessToolbar.style.display="block",d.chromelessToolbar.style.position="absolute",
d.chromelessToolbar.style.bottom="",d.chromelessToolbar.style.top=a.y+document.body.clientHeight-100+"px");d.lightboxFit();d.chromelessResize();this.showLayers(p,this.graph);mxEvent.addListener(b,"click",function(){d.destroy()})}),0);return d};GraphViewer.processElements=function(a){mxUtils.forEach(GraphViewer.getElementsByClassName(a||"mxgraph"),function(a){try{a.innerHTML="",GraphViewer.createViewerForElement(a)}catch(e){throw a.innerHTML=e.message,e;}})};
@@ -3369,6 +3370,6 @@ GraphViewer.initCss=function(){try{var a=document.createElement("style");a.type=
GraphViewer.cachedUrls={};GraphViewer.getUrl=function(a,b,e){if(null!=GraphViewer.cachedUrls[a])b(GraphViewer.cachedUrls[a]);else{var d=0<navigator.userAgent.indexOf("MSIE 9")?new XDomainRequest:new XMLHttpRequest;d.open("GET",a);d.onload=function(){b(null!=d.getText?d.getText():d.responseText)};d.onerror=e;d.send()}};GraphViewer.resizeSensorEnabled=!0;GraphViewer.useResizeSensor=!0;
(function(){var a=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(a){return window.setTimeout(a,20)},b=function(e,d){function k(){this.q=[];this.add=function(a){this.q.push(a)};var a,b;this.call=function(){a=0;for(b=this.q.length;a<b;a++)this.q[a].call()}}function l(a,b){return a.currentStyle?a.currentStyle[b]:window.getComputedStyle?window.getComputedStyle(a,null).getPropertyValue(b):a.style[b]}function p(b,c){if(!b.resizedAttached)b.resizedAttached=
new k,b.resizedAttached.add(c);else if(b.resizedAttached){b.resizedAttached.add(c);return}b.resizeSensor=document.createElement("div");b.resizeSensor.className="resize-sensor";b.resizeSensor.style.cssText="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;";b.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>';
-b.appendChild(b.resizeSensor);"static"==l(b,"position")&&(b.style.position="relative");var d=b.resizeSensor.childNodes[0],e=d.childNodes[0],f=b.resizeSensor.childNodes[1],g=function(){e.style.width="100000px";e.style.height="100000px";d.scrollLeft=1E5;d.scrollTop=1E5;f.scrollLeft=1E5;f.scrollTop=1E5};g();var n=!1,p=function(){b.resizedAttached&&(n&&(b.resizedAttached.call(),n=!1),a(p))};a(p);var q,t,u,B,N=function(){if((u=b.offsetWidth)!=q||(B=b.offsetHeight)!=t)n=!0,q=u,t=B;g()},C=function(a,b,c){a.attachEvent?
-a.attachEvent("on"+b,c):a.addEventListener(b,c)};C(d,"scroll",N);C(f,"scroll",N)}var q=function(){GraphViewer.resizeSensorEnabled&&d()},u=Object.prototype.toString.call(e),c="[object Array]"===u||"[object NodeList]"===u||"[object HTMLCollection]"===u||"undefined"!==typeof jQuery&&e instanceof jQuery||"undefined"!==typeof Elements&&e instanceof Elements;if(c)for(var u=0,f=e.length;u<f;u++)p(e[u],q);else p(e,q);this.detach=function(){if(c)for(var a=0,d=e.length;a<d;a++)b.detach(e[a]);else b.detach(e)}};
+b.appendChild(b.resizeSensor);"static"==l(b,"position")&&(b.style.position="relative");var d=b.resizeSensor.childNodes[0],e=d.childNodes[0],f=b.resizeSensor.childNodes[1],g=function(){e.style.width="100000px";e.style.height="100000px";d.scrollLeft=1E5;d.scrollTop=1E5;f.scrollLeft=1E5;f.scrollTop=1E5};g();var n=!1,p=function(){b.resizedAttached&&(n&&(b.resizedAttached.call(),n=!1),a(p))};a(p);var q,u,t,C,N=function(){if((t=b.offsetWidth)!=q||(C=b.offsetHeight)!=u)n=!0,q=t,u=C;g()},D=function(a,b,c){a.attachEvent?
+a.attachEvent("on"+b,c):a.addEventListener(b,c)};D(d,"scroll",N);D(f,"scroll",N)}var q=function(){GraphViewer.resizeSensorEnabled&&d()},t=Object.prototype.toString.call(e),c="[object Array]"===t||"[object NodeList]"===t||"[object HTMLCollection]"===t||"undefined"!==typeof jQuery&&e instanceof jQuery||"undefined"!==typeof Elements&&e instanceof Elements;if(c)for(var t=0,f=e.length;t<f;t++)p(e[t],q);else p(e,q);this.detach=function(){if(c)for(var a=0,d=e.length;a<d;a++)b.detach(e[a]);else b.detach(e)}};
b.detach=function(a){a.resizeSensor&&(a.removeChild(a.resizeSensor),delete a.resizeSensor,delete a.resizedAttached)};window.ResizeSensor=b})();
diff --git a/src/main/webapp/js/atlas.min.js b/src/main/webapp/js/atlas.min.js
index 4ea2a76b..ca6a63ee 100644
--- a/src/main/webapp/js/atlas.min.js
+++ b/src/main/webapp/js/atlas.min.js
@@ -1180,7 +1180,7 @@ mxGraphView.prototype.getPerimeterPoint=function(a,b,c,d){var e=null;if(null!=a)
0)||g),b&&(e.x=2*d.getCenterX()-e.x),g&&(e.y=2*d.getCenterY()-e.y));e=f(d,a,e,c);null!=e&&(b&&(e.x=2*d.getCenterX()-e.x),g&&(e.y=2*d.getCenterY()-e.y))}null==e&&(e=this.getPoint(a))}return e};mxGraphView.prototype.getRoutingCenterX=function(a){var b=null!=a.style?parseFloat(a.style[mxConstants.STYLE_ROUTING_CENTER_X])||0:0;return a.getCenterX()+b*a.width};
mxGraphView.prototype.getRoutingCenterY=function(a){var b=null!=a.style?parseFloat(a.style[mxConstants.STYLE_ROUTING_CENTER_Y])||0:0;return a.getCenterY()+b*a.height};mxGraphView.prototype.getPerimeterBounds=function(a,b){b=null!=b?b:0;null!=a&&(b+=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]||0));return a.getPerimeterBounds(b*this.scale)};
mxGraphView.prototype.getPerimeterFunction=function(a){a=a.style[mxConstants.STYLE_PERIMETER];if("string"==typeof a){var b=mxStyleRegistry.getValue(a);null==b&&this.isAllowEval()&&(b=mxUtils.eval(a));a=b}return"function"==typeof a?a:null};mxGraphView.prototype.getNextPoint=function(a,b,c){a=a.absolutePoints;var d=null;null!=a&&2<=a.length&&(d=a.length,d=a[c?Math.min(1,d-1):Math.max(0,d-2)]);null==d&&null!=b&&(d=new mxPoint(b.getCenterX(),b.getCenterY()));return d};
-mxGraphView.prototype.getVisibleTerminal=function(a,b){for(var c=this.graph.getModel(),d=c.getTerminal(a,b),e=d;null!=d&&d!=this.currentRoot;){if(!this.graph.isCellVisible(e)||this.isCellCollapsed(d))e=d;d=c.getParent(d)}c.getParent(e)==c.getRoot()&&(e=null);return e};
+mxGraphView.prototype.getVisibleTerminal=function(a,b){for(var c=this.graph.getModel(),d=c.getTerminal(a,b),e=d;null!=d&&d!=this.currentRoot;){if(!this.graph.isCellVisible(e)||this.isCellCollapsed(d))e=d;d=c.getParent(d)}if(c.getParent(e)==c.getRoot()||e==this.currentRoot)e=null;return e};
mxGraphView.prototype.updateEdgeBounds=function(a){var b=a.absolutePoints,c=b[0],d=b[b.length-1];if(c.x!=d.x||c.y!=d.y){var e=d.x-c.x,f=d.y-c.y;a.terminalDistance=Math.sqrt(e*e+f*f)}else a.terminalDistance=0;var d=0,g=[],f=c;if(null!=f){for(var c=f.x,k=f.y,l=c,m=k,n=1;n<b.length;n++){var p=b[n];null!=p&&(e=f.x-p.x,f=f.y-p.y,e=Math.sqrt(e*e+f*f),g.push(e),d+=e,f=p,c=Math.min(f.x,c),k=Math.min(f.y,k),l=Math.max(f.x,l),m=Math.max(f.y,m))}a.length=d;a.segments=g;a.x=c;a.y=k;a.width=Math.max(1,l-c);a.height=
Math.max(1,m-k)}};
mxGraphView.prototype.getPoint=function(a,b){var c=a.getCenterX(),d=a.getCenterY();if(null==a.segments||null!=b&&!b.relative)null!=b&&(m=b.offset,null!=m&&(c+=m.x,d+=m.y));else{for(var e=a.absolutePoints.length,f=Math.round(((null!=b?b.x/2:0)+.5)*a.length),g=a.segments[0],k=0,l=1;f>=Math.round(k+g)&&l<e-1;)k+=g,g=a.segments[l++];e=0==g?0:(f-k)/g;f=a.absolutePoints[l-1];l=a.absolutePoints[l];if(null!=f&&null!=l){k=c=d=0;if(null!=b){var d=b.y,m=b.offset;null!=m&&(c=m.x,k=m.y)}m=l.x-f.x;l=l.y-f.y;c=
@@ -7401,9 +7401,10 @@ DrawioFile.prototype.getAnonymizedXmlForPages=function(a){var c=new mxCodec(mxUt
DrawioFile.prototype.checkPages=function(){this.ui.getCurrentFile()!=this||null!=this.ui.pages&&0!=this.ui.pages.length||this.sendErrorReport("Pages is null or empty","ShadowPages: "+(null!=this.shadowPages)+"\nShadowData: "+(null!=this.shadowData))};
DrawioFile.prototype.checkShadow=function(a){if(null==a||0==a.length){var c=null==this.shadowData?"null":this.compressReportData(this.ui.anonymizeString(this.shadowData),null,5E3);this.sendErrorReport("Shadow is null or empty","Shadow: "+(null!=a?a.length:"null")+"\nShadowPages: "+(null!=this.shadowPages?this.shadowPages.length:"null")+"\nShadowData: "+c)}};
DrawioFile.prototype.compressReportData=function(a,c,b){null!=a&&a.length>(null!=c?c:1E4)&&(a=this.ui.editor.graph.compress(a)+"\n");null!=b&&null!=a&&a.length>b&&(a=a.substring(0,b)+"[...]");return a};
-DrawioFile.prototype.checksumError=function(a,c,b){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=a&&a();try{if(null!=c)for(a=0;a<c.length;a++)this.ui.anonymizePatch(c[a]);var e=this.compressReportData(this.getAnonymizedXmlForPages(this.shadowPages),2E4),g=this.compressReportData(JSON.stringify(c,null,2));this.sendErrorReport("Checksum Error",(null!=b?b:"")+"\n\nPatches:\n"+g+"\n\nData:\n"+e)}catch(h){}};
-DrawioFile.prototype.sendErrorReport=function(a,c,b){try{var e=this.getCurrentUser(),g=null!=e?this.ui.hashValue(e.id):"unknown",h=null!=this.sync?this.sync.clientId:"no sync";null!=this.stats.start&&(this.stats.uptime=Math.round(((new Date).getTime()-(new Date(this.stats.start)).getTime())/1E3));var l=this.getTitle(),p=l.lastIndexOf("."),e="xml";0<p&&(e=l.substring(p));var n=null!=b?b.stack:Error().stack;EditorUi.sendReport(a+" "+(new Date).toISOString()+":\n\nBrowser="+navigator.userAgent+"\nFile="+
-this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+e+")\nUser="+g+" ("+h+")\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\nSync="+DrawioFile.SYNC+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=c?"\n\n"+c:"")+"\n\nStack:\n"+n)}catch(d){}};
+DrawioFile.prototype.checksumError=function(a,c,b,e){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=a&&a();try{if(null!=c)for(a=0;a<c.length;a++)this.ui.anonymizePatch(c[a]);var g=mxUtils.bind(this,function(a){var e=this.compressReportData(this.getAnonymizedXmlForPages(this.shadowPages),25E3),g=this.compressReportData(JSON.stringify(c,null,2));a=null!=a?this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement)),
+25E3):"n/a";this.sendErrorReport("Checksum Error",(null!=b?b:"")+"\n\nPatches:\n"+g+"\n\nLocal:\n"+e+(null!=a?"\nRemote:\n"+a:""),null,7E4)});null==e?g(null):this.getLatestVersion(mxUtils.bind(this,function(a){null!=a&&a.getCurrentEtag()==e?g(a):g(null)}),function(){})}catch(h){}};
+DrawioFile.prototype.sendErrorReport=function(a,c,b,e){try{var g=this.getCurrentUser(),h=null!=g?this.ui.hashValue(g.id):"unknown",l=null!=this.sync?this.sync.clientId:"no sync";null!=this.stats.start&&(this.stats.uptime=Math.round(((new Date).getTime()-(new Date(this.stats.start)).getTime())/1E3));var p=this.getTitle(),n=p.lastIndexOf("."),g="xml";0<n&&(g=p.substring(n));var d=null!=b?b.stack:Error().stack;EditorUi.sendReport(a+" "+(new Date).toISOString()+":\n\nBrowser="+navigator.userAgent+"\nFile="+
+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+g+")\nUser="+h+" ("+l+")\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\nSync="+DrawioFile.SYNC+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=c?"\n\n"+c:"")+"\n\nStack:\n"+d,e)}catch(f){}};
DrawioFile.prototype.reloadFile=function(a,c){try{this.ui.spinner.stop();var b=mxUtils.bind(this,function(){this.stats.reload++;this.reportEnabled=!1;var b=this.ui.editor.graph.getViewState(),c=this.ui.editor.graph.getSelectionCells(),h=this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(h,b,c);null!=this.backupPatch&&this.patch([this.backupPatch]);var e=this.ui.getCurrentFile();null!=e&&(e.stats=this.stats);
null!=a&&a()}}),!0)});this.isModified()&&null==this.backupPatch?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.handleFileSuccess("manual"==DrawioFile.SYNC)}),b,mxResources.get("cancel"),mxResources.get("discardChanges")):b()}catch(e){null!=c&&c(e)}};DrawioFile.prototype.copyFile=function(a,c){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};
DrawioFile.prototype.ignorePatches=function(a){for(var c=!0,b=0;b<a.length&&c;b++)c=c&&0==Object.keys(a[b]).length;return c};
@@ -7538,21 +7539,21 @@ p.value?"Person\n-name: String\n-birthDate: Date\n--\n+getName(): String\n+setNa
n=document.createElement("option");n.setAttribute("value","diagram");mxUtils.write(n,mxResources.get("diagram"));"plantUml"!=b&&p.appendChild(n);n=document.createElement("option");n.setAttribute("value","plantUmlSvg");mxUtils.write(n,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");"plantUml"==b&&n.setAttribute("selected","selected");var d=document.createElement("option");d.setAttribute("value","plantUmlPng");mxUtils.write(d,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+
")");var f=document.createElement("option");f.setAttribute("value","plantUmlTxt");mxUtils.write(f,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!a.isOffline()&&"plantUml"==b&&(p.appendChild(n),p.appendChild(d),p.appendChild(f));var m=g();l.value=m;c.appendChild(l);this.init=function(){l.focus()};Graph.fileSupport&&(l.addEventListener("dragover",function(a){a.stopPropagation();a.preventDefault()},!1),l.addEventListener("drop",function(a){a.stopPropagation();
a.preventDefault();if(0<a.dataTransfer.files.length){a=a.dataTransfer.files[0];var b=new FileReader;b.onload=function(a){l.value=a.target.result};b.readAsText(a)}},!1));c.appendChild(p);mxEvent.addListener(p,"change",function(){var a=g();if(0==l.value.length||l.value==m)m=a,l.value=m});b=mxUtils.button(mxResources.get("close"),function(){l.value==m?a.hideDialog():a.confirm(mxResources.get("areYouSure"),function(){a.hideDialog()})});b.className="geBtn";a.editor.cancelFirst&&c.appendChild(b);n=mxUtils.button(mxResources.get("insert"),
-function(){a.hideDialog();e(l.value,p.value)});c.appendChild(n);n.className="geBtn gePrimaryBtn";a.editor.cancelFirst||c.appendChild(b);this.container=c},NewDialog=function(a,c,b,e,g,h,l,p,n,d,f,m,q,t,u){function w(){var a=!0;if(null!=O)for(;C<O.length&&(a||0!=mxUtils.mod(C,30));)a=O[C++],v(a.url,a.libs,a.title,a.tooltip?a.tooltip:a.title,a.select,a.imgUrl,a.info,a.onClick,a.preview),a=!1}function y(){if(aa)b||a.hideDialog(),t(aa,Z,G.value);else if(e)b||a.hideDialog(),e(P,G.value);else{var d=G.value;
-null!=d&&0<d.length&&a.pickFolder(a.mode,function(b){a.createFile(d,P,null!=T&&0<T.length?T:null,null,function(){a.hideDialog()},null,b)},a.mode!=App.MODE_GOOGLE||null==a.stateArg||null==a.stateArg.folderId)}}function k(a,b,d,f,k){null!=S&&(S.style.backgroundColor="transparent",S.style.border="1px solid transparent");F.removeAttribute("disabled");P=b;T=d;S=a;aa=f;Z=k;S.style.backgroundColor=p;S.style.border=n}function v(b,d,f,c,m,e,q,t,z){var u=document.createElement("div");u.className="geTemplate";
-u.style.height=Q+"px";u.style.width=L+"px";null!=c&&0<c.length&&u.setAttribute("title",c);if(null!=e)u.style.backgroundImage="url("+e+")",u.style.backgroundSize="contain",u.style.backgroundPosition="center center",u.style.backgroundRepeat="no-repeat",mxEvent.addListener(u,"click",function(a){k(u,null,null,b,q)}),mxEvent.addListener(u,"dblclick",function(a){y()});else if(null!=b&&0<b.length){f=z||TEMPLATE_PATH+"/"+b.substring(0,b.length-4)+".png";u.style.backgroundImage="url("+f+")";u.style.backgroundPosition=
+function(){a.hideDialog();e(l.value,p.value)});c.appendChild(n);n.className="geBtn gePrimaryBtn";a.editor.cancelFirst||c.appendChild(b);this.container=c},NewDialog=function(a,c,b,e,g,h,l,p,n,d,f,m,q,t,u){function w(){var a=!0;if(null!=P)for(;C<P.length&&(a||0!=mxUtils.mod(C,30));)a=P[C++],v(a.url,a.libs,a.title,a.tooltip?a.tooltip:a.title,a.select,a.imgUrl,a.info,a.onClick,a.preview),a=!1}function y(){if(Z)b||a.hideDialog(),t(Z,Y,G.value);else if(e)b||a.hideDialog(),e(Q,G.value);else{var d=G.value;
+null!=d&&0<d.length&&a.pickFolder(a.mode,function(b){a.createFile(d,Q,null!=T&&0<T.length?T:null,null,function(){a.hideDialog()},null,b)},a.mode!=App.MODE_GOOGLE||null==a.stateArg||null==a.stateArg.folderId)}}function k(a,b,d,f,k){null!=S&&(S.style.backgroundColor="transparent",S.style.border="1px solid transparent");F.removeAttribute("disabled");Q=b;T=d;S=a;Z=f;Y=k;S.style.backgroundColor=p;S.style.border=n}function v(b,d,f,c,m,e,q,t,z){var u=document.createElement("div");u.className="geTemplate";
+u.style.height=R+"px";u.style.width=L+"px";null!=c&&0<c.length&&u.setAttribute("title",c);if(null!=e)u.style.backgroundImage="url("+e+")",u.style.backgroundSize="contain",u.style.backgroundPosition="center center",u.style.backgroundRepeat="no-repeat",mxEvent.addListener(u,"click",function(a){k(u,null,null,b,q)}),mxEvent.addListener(u,"dblclick",function(a){y()});else if(null!=b&&0<b.length){f=z||TEMPLATE_PATH+"/"+b.substring(0,b.length-4)+".png";u.style.backgroundImage="url("+f+")";u.style.backgroundPosition=
"center center";u.style.backgroundRepeat="no-repeat";var v=!1;mxEvent.addListener(u,"click",function(f){F.setAttribute("disabled","disabled");u.style.backgroundColor="transparent";u.style.border="1px solid transparent";f=b;f=/^https?:\/\//.test(f)&&!a.isCorsEnabledForUrl(f)?PROXY_URL+"?url="+encodeURIComponent(f):TEMPLATE_PATH+"/"+f;mxUtils.get(f,mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()&&(k(u,a.getText(),d),v&&y())}))});mxEvent.addListener(u,"dblclick",function(a){v=!0})}else u.innerHTML=
'<table width="100%" height="100%" style="line-height:1em;"><tr><td align="center" valign="middle">'+mxResources.get(f)+"</td></tr></table>",m&&k(u),null!=t?mxEvent.addListener(u,"click",t):(mxEvent.addListener(u,"click",function(a){k(u)}),mxEvent.addListener(u,"dblclick",function(a){y()}));N.appendChild(u)}function z(){mxEvent.addListener(N,"scroll",function(a){N.scrollTop+N.clientHeight>=N.scrollHeight&&(w(),mxEvent.consume(a))});var a=null,b;for(b in U){var f=document.createElement("div"),k=mxResources.get(b),
-c=U[b];null==k&&(k=b.substring(0,1).toUpperCase()+b.substring(1));18<k.length&&(k=k.substring(0,18)+"&hellip;");f.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;";f.setAttribute("title",k+" ("+c.length+")");mxUtils.write(f,f.getAttribute("title"));null!=d&&(f.style.padding=d);Y.appendChild(f);null==a&&(a=f,a.style.backgroundColor=l);(function(b,d){mxEvent.addListener(f,"click",function(){a!=d&&(a.style.backgroundColor=
-"",a=d,a.style.backgroundColor=l,N.scrollTop=0,N.innerHTML="",C=0,O=U[b],A=null,w())})})(b,f)}w()}b=null!=b?b:!0;g=null!=g?g:!1;l=null!=l?l:"#ebf2f9";p=null!=p?p:"#e6eff8";n=null!=n?n:"1px solid #ccd9ea";f=null!=f?f:EditorUi.templateFile;var D=document.createElement("div");D.style.height="100%";var B=document.createElement("div");B.style.whiteSpace="nowrap";B.style.height="46px";b&&D.appendChild(B);var x=document.createElement("img");x.setAttribute("border","0");x.setAttribute("align","absmiddle");
+c=U[b];null==k&&(k=b.substring(0,1).toUpperCase()+b.substring(1));18<k.length&&(k=k.substring(0,18)+"&hellip;");f.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;";f.setAttribute("title",k+" ("+c.length+")");mxUtils.write(f,f.getAttribute("title"));null!=d&&(f.style.padding=d);X.appendChild(f);null==a&&(a=f,a.style.backgroundColor=l);(function(b,d){mxEvent.addListener(f,"click",function(){a!=d&&(a.style.backgroundColor=
+"",a=d,a.style.backgroundColor=l,N.scrollTop=0,N.innerHTML="",C=0,P=U[b],A=null,w())})})(b,f)}w()}b=null!=b?b:!0;g=null!=g?g:!1;l=null!=l?l:"#ebf2f9";p=null!=p?p:"#e6eff8";n=null!=n?n:"1px solid #ccd9ea";f=null!=f?f:EditorUi.templateFile;var D=document.createElement("div");D.style.height="100%";var B=document.createElement("div");B.style.whiteSpace="nowrap";B.style.height="46px";b&&D.appendChild(B);var x=document.createElement("img");x.setAttribute("border","0");x.setAttribute("align","absmiddle");
x.style.width="40px";x.style.height="40px";x.style.marginRight="10px";x.style.paddingBottom="4px";x.src=a.mode==App.MODE_GOOGLE?IMAGE_PATH+"/google-drive-logo.svg":a.mode==App.MODE_DROPBOX?IMAGE_PATH+"/dropbox-logo.svg":a.mode==App.MODE_ONEDRIVE?IMAGE_PATH+"/onedrive-logo.svg":a.mode==App.MODE_GITHUB?IMAGE_PATH+"/github-logo.svg":a.mode==App.MODE_TRELLO?IMAGE_PATH+"/trello-logo.svg":a.mode==App.MODE_BROWSER?IMAGE_PATH+"/osa_database.png":IMAGE_PATH+"/osa_drive-harddisk.png";!c&&b&&B.appendChild(x);
b&&mxUtils.write(B,(null==a.mode||a.mode==App.MODE_GOOGLE||a.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+":");x=".xml";a.mode==App.MODE_GOOGLE&&null!=a.drive?x=a.drive.extension:a.mode==App.MODE_DROPBOX&&null!=a.dropbox?x=a.dropbox.extension:a.mode==App.MODE_ONEDRIVE&&null!=a.oneDrive?x=a.oneDrive.extension:a.mode==App.MODE_GITHUB&&null!=a.gitHub?x=a.gitHub.extension:a.mode==App.MODE_TRELLO&&null!=a.trello&&(x=a.trello.extension);var G=document.createElement("input");
G.setAttribute("value",a.defaultFilename+x);G.style.marginRight="20px";G.style.marginLeft="10px";G.style.width=c?"220px":"430px";this.init=function(){b&&(G.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?G.select():document.execCommand("selectAll",!1,null))};b&&B.appendChild(G);var B=!1,C=0,F=mxUtils.button(mxResources.get("create"),function(){F.setAttribute("disabled","disabled");y();F.removeAttribute("disabled")});F.className="geBtn gePrimaryBtn";if(m||q){var H=
-[],A=null,E=function(a){F.setAttribute("disabled","disabled");for(var b=0;b<H.length;b++)H[b].className=b==a?"geBtn gePrimaryBtn":"geBtn"},B=!0,x=document.createElement("div");x.style.whiteSpace="nowrap";x.style.height="30px";D.appendChild(x);var I=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){Y.style.display="";N.style.left="160px";E(0);N.scrollTop=0;N.innerHTML="";C=0;A!=O&&(O=A,w(),A=null)});H.push(I);x.appendChild(I);var M=function(a){Y.style.display="none";N.style.left=
-"30px";E(a?-1:1);null==A&&(A=O);N.scrollTop=0;N.innerHTML="";var b=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});b.spin(N);C=0;var d=function(a,d){b.stop();O=a;d?N.innerHTML=d:0==a.length?N.innerHTML=mxResources.get("noDiagrams",null,"No Diagrams Found"):(N.innerHTML="",w())};a?q(K.value,d):m(d)};m&&(I=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){M()}),x.appendChild(I),H.push(I));if(q){I=
-document.createElement("span");I.style.marginLeft="10px";I.innerHTML=mxResources.get("search")+":";x.appendChild(I);var K=document.createElement("input");K.style.marginRight="10px";K.style.marginLeft="10px";K.style.width="220px";mxEvent.addListener(K,"keypress",function(a){13==a.keyCode&&M(!0)});x.appendChild(K);I=mxUtils.button(mxResources.get("search"),function(){M(!0)});I.className="geBtn";x.appendChild(I)}E(0)}var T=null,P=null,S=null,aa=null,Z=null,N=document.createElement("div");N.style.border=
-"1px solid #d3d3d3";N.style.position="absolute";N.style.left="160px";N.style.right="34px";B=(b?72:40)+(B?30:0);N.style.top=B+"px";N.style.bottom="68px";N.style.margin="6px 0 0 -1px";N.style.padding="6px";N.style.overflow="auto";var Y=document.createElement("div");Y.style.cssText="position:absolute;left:30px;width:128px;top:"+B+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";var Q=140,L=140,U={},R=1;U.basic=[{title:"blankDiagram",select:!0}];var O=U.basic;if(!c){D.appendChild(Y);
-D.appendChild(N);var V=!1;/^https?:\/\//.test(f)&&!a.isCorsEnabledForUrl(f)&&(f=PROXY_URL+"?url="+encodeURIComponent(f));mxUtils.get(f,function(a){if(!V){V=!0;for(a=a.getXml().documentElement.firstChild;null!=a;){if("undefined"!==typeof a.getAttribute){var b=a.getAttribute("url");if(null!=b){var d=a.getAttribute("section");null==d&&(d=b.indexOf("/"),d=b.substring(0,d));b=U[d];null==b&&(R++,b=[],U[d]=b);b.push({url:a.getAttribute("url"),libs:a.getAttribute("libs"),title:a.getAttribute("title"),tooltip:a.getAttribute("url"),
+[],A=null,E=function(a){F.setAttribute("disabled","disabled");for(var b=0;b<H.length;b++)H[b].className=b==a?"geBtn gePrimaryBtn":"geBtn"},B=!0,x=document.createElement("div");x.style.whiteSpace="nowrap";x.style.height="30px";D.appendChild(x);var I=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){X.style.display="";N.style.left="160px";E(0);N.scrollTop=0;N.innerHTML="";C=0;A!=P&&(P=A,w(),A=null)});H.push(I);x.appendChild(I);var M=function(a){X.style.display="none";N.style.left=
+"30px";E(a?-1:1);null==A&&(A=P);N.scrollTop=0;N.innerHTML="";var b=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});b.spin(N);C=0;var d=function(a,d){b.stop();P=a;d?N.innerHTML=d:0==a.length?N.innerHTML=mxResources.get("noDiagrams",null,"No Diagrams Found"):(N.innerHTML="",w())};a?q(K.value,d):m(d)};m&&(I=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){M()}),x.appendChild(I),H.push(I));if(q){I=
+document.createElement("span");I.style.marginLeft="10px";I.innerHTML=mxResources.get("search")+":";x.appendChild(I);var K=document.createElement("input");K.style.marginRight="10px";K.style.marginLeft="10px";K.style.width="220px";mxEvent.addListener(K,"keypress",function(a){13==a.keyCode&&M(!0)});x.appendChild(K);I=mxUtils.button(mxResources.get("search"),function(){M(!0)});I.className="geBtn";x.appendChild(I)}E(0)}var T=null,Q=null,S=null,Z=null,Y=null,N=document.createElement("div");N.style.border=
+"1px solid #d3d3d3";N.style.position="absolute";N.style.left="160px";N.style.right="34px";B=(b?72:40)+(B?30:0);N.style.top=B+"px";N.style.bottom="68px";N.style.margin="6px 0 0 -1px";N.style.padding="6px";N.style.overflow="auto";var X=document.createElement("div");X.style.cssText="position:absolute;left:30px;width:128px;top:"+B+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";var R=140,L=140,U={},O=1;U.basic=[{title:"blankDiagram",select:!0}];var P=U.basic;if(!c){D.appendChild(X);
+D.appendChild(N);var V=!1;/^https?:\/\//.test(f)&&!a.isCorsEnabledForUrl(f)&&(f=PROXY_URL+"?url="+encodeURIComponent(f));mxUtils.get(f,function(a){if(!V){V=!0;for(a=a.getXml().documentElement.firstChild;null!=a;){if("undefined"!==typeof a.getAttribute){var b=a.getAttribute("url");if(null!=b){var d=a.getAttribute("section");null==d&&(d=b.indexOf("/"),d=b.substring(0,d));b=U[d];null==b&&(O++,b=[],U[d]=b);b.push({url:a.getAttribute("url"),libs:a.getAttribute("libs"),title:a.getAttribute("title"),tooltip:a.getAttribute("url"),
preview:a.getAttribute("preview")})}}a=a.nextSibling}z()}})}mxEvent.addListener(G,"keypress",function(b){a.dialog.container.firstChild==D&&13==b.keyCode&&y()});f=document.createElement("div");f.style.marginTop=c?"4px":"16px";f.style.textAlign="right";f.style.position="absolute";f.style.left="40px";f.style.bottom="24px";f.style.right="40px";B=mxUtils.button(mxResources.get("cancel"),function(){null!=h&&h();a.hideDialog(!0)});B.className="geBtn";!a.editor.cancelFirst||g&&null==h||f.appendChild(B);c||
a.isOffline()||!b||null!=e||g||(x=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://support.draw.io/display/DO/Creating+and+Opening+Files")}),x.className="geBtn",f.appendChild(x));c||"1"==urlParams.embed||g||(c=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var b=new FilenameDialog(a,"",mxResources.get("create"),function(b){null!=b&&0<b.length&&(b=a.getUrl(window.location.pathname+"?mode="+a.mode+"&title="+encodeURIComponent(G.value)+"&create="+encodeURIComponent(b)),
null==a.getCurrentFile()?window.location.href=b:window.openWindow(b))},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()}),c.className="geBtn",f.appendChild(c));Graph.fileSupport&&u&&(u=mxUtils.button(mxResources.get("import"),function(){var b=document.createElement("input");b.setAttribute("multiple","multiple");b.setAttribute("type","file");mxEvent.addListener(b,"change",function(d){a.openFiles(b.files,!0)});b.click()}),u.className="geBtn",f.appendChild(u));f.appendChild(F);
@@ -7615,14 +7616,14 @@ a.saveLocalFile(d,b,"text/xml"):(d="undefined"===typeof pako?"&xml="+encodeURICo
t.save(!0,function(b){a.spinner.stop();a.replaceFileData(k);a.hideDialog()},function(b){a.spinner.stop();a.editor.setStatus("");a.handleError(b,null!=b?mxResources.get("errorSavingFile"):null)})})});C.className="geBtn";C.setAttribute("disabled","disabled");var F=document.createElement("select");F.setAttribute("disabled","disabled");F.style.maxWidth="80px";F.style.position="relative";F.style.top="-2px";F.style.verticalAlign="bottom";F.style.marginRight="6px";F.style.display="none";var H=null;mxEvent.addListener(F,
"change",function(a){null!=H&&(H(a),mxEvent.consume(a))});var A=mxUtils.button(mxResources.get("open"),function(){null!=y&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(y.documentElement)),a.openLink(a.getUrl(),null,!0))});A.className="geBtn";A.setAttribute("disabled","disabled");null!=b&&(A.style.display="none");var E=mxUtils.button(mxResources.get("show"),function(){null!=w&&a.openLink(w.getUrl(F.selectedIndex))});E.className="geBtn gePrimaryBtn";
E.setAttribute("disabled","disabled");null!=b&&(E.style.display="none",C.className="geBtn gePrimaryBtn");g=document.createElement("div");g.style.position="absolute";g.style.top="482px";g.style.width="640px";g.style.textAlign="right";var I=document.createElement("div");I.className="geToolbarContainer";I.style.backgroundColor="transparent";I.style.padding="2px";I.style.border="none";I.style.left="199px";I.style.top="442px";var M=null;if(null!=c&&0<c.length){l.style.cursor="move";var K=document.createElement("table");
-K.style.border="1px solid lightGray";K.style.borderCollapse="collapse";K.style.borderSpacing="0px";K.style.width="100%";var T=document.createElement("tbody"),P=(new Date).toDateString();null!=a.currentPage&&null!=a.pages&&(n=mxUtils.indexOf(a.pages,a.currentPage));for(var S=c.length-1;0<=S;S--){var aa=function(b){var m=new Date(b.modifiedDate),e=null;if(0<=m.getTime()){var g=function(c){q.stop();var u=mxUtils.parseXml(c),g=a.editor.extractGraphModel(u.documentElement,!0);if(null!=g){var w=function(b){null!=
+K.style.border="1px solid lightGray";K.style.borderCollapse="collapse";K.style.borderSpacing="0px";K.style.width="100%";var T=document.createElement("tbody"),Q=(new Date).toDateString();null!=a.currentPage&&null!=a.pages&&(n=mxUtils.indexOf(a.pages,a.currentPage));for(var S=c.length-1;0<=S;S--){var Z=function(b){var m=new Date(b.modifiedDate),e=null;if(0<=m.getTime()){var g=function(c){q.stop();var u=mxUtils.parseXml(c),g=a.editor.extractGraphModel(u.documentElement,!0);if(null!=g){var w=function(b){null!=
b&&(b=h(mxUtils.parseXml(a.editor.graph.decompress(mxUtils.getTextContent(b))).documentElement));return b},h=function(a){var b=a.getAttribute("background");if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";l.style.backgroundColor=b;(new mxCodec(a.ownerDocument)).decode(a,p.getModel());p.maxFitScale=1;p.fit(8);p.center();return a};F.style.display="none";F.innerHTML="";y=u;k=c;d=parseSelectFunction=null;f=0;if("mxfile"==g.nodeName){u=g.getElementsByTagName("diagram");d=[];for(c=0;c<u.length;c++)d.push(u[c]);
f=Math.min(n,d.length-1);0<d.length&&w(d[f]);if(1<d.length)for(F.removeAttribute("disabled"),F.style.display="",c=0;c<d.length;c++)u=document.createElement("option"),mxUtils.write(u,d[c].getAttribute("name")||mxResources.get("pageWithNumber",[c+1])),u.setAttribute("value",c),c==f&&u.setAttribute("selected","selected"),F.appendChild(u);H=function(){f=n=parseInt(F.value);w(d[n])}}else h(g);c=b.lastModifyingUserName;null!=c&&20<c.length&&(c=c.substring(0,20)+"...");x.innerHTML="";mxUtils.write(x,(null!=
c?c+" ":"")+m.toLocaleDateString()+" "+m.toLocaleTimeString());x.setAttribute("title",e.getAttribute("title"));v.removeAttribute("disabled");z.removeAttribute("disabled");D.removeAttribute("disabled");B.removeAttribute("disabled");null!=t&&t.isRestricted()||(a.editor.graph.isEnabled()&&C.removeAttribute("disabled"),G.removeAttribute("disabled"),E.removeAttribute("disabled"),A.removeAttribute("disabled"));mxUtils.setOpacity(v,60);mxUtils.setOpacity(z,60);mxUtils.setOpacity(D,60);mxUtils.setOpacity(B,
-60)}else F.style.display="none",F.innerHTML="",x.innerHTML="",mxUtils.write(x,mxResources.get("errorLoadingFile"))},e=document.createElement("tr");e.style.borderBottom="1px solid lightGray";e.style.fontSize="12px";e.style.cursor="pointer";var h=document.createElement("td");h.style.padding="6px";h.style.whiteSpace="nowrap";b==c[c.length-1]?mxUtils.write(h,mxResources.get("current")):m.toDateString()===P?mxUtils.write(h,m.toLocaleTimeString()):mxUtils.write(h,m.toLocaleDateString()+" "+m.toLocaleTimeString());
+60)}else F.style.display="none",F.innerHTML="",x.innerHTML="",mxUtils.write(x,mxResources.get("errorLoadingFile"))},e=document.createElement("tr");e.style.borderBottom="1px solid lightGray";e.style.fontSize="12px";e.style.cursor="pointer";var h=document.createElement("td");h.style.padding="6px";h.style.whiteSpace="nowrap";b==c[c.length-1]?mxUtils.write(h,mxResources.get("current")):m.toDateString()===Q?mxUtils.write(h,m.toLocaleTimeString()):mxUtils.write(h,m.toLocaleDateString()+" "+m.toLocaleTimeString());
e.appendChild(h);e.setAttribute("title",m.toLocaleDateString()+" "+m.toLocaleTimeString()+" "+a.formatFileSize(parseInt(b.fileSize))+(null!=b.lastModifyingUserName?" "+b.lastModifyingUserName:""));mxEvent.addListener(e,"click",function(a){w!=b&&(q.stop(),null!=u&&(u.style.backgroundColor=""),w=b,u=e,u.style.backgroundColor="#ebf2f9",k=y=null,x.removeAttribute("title"),x.innerHTML=mxResources.get("loading")+"...",l.style.backgroundColor="#ffffff",p.getModel().clear(),C.setAttribute("disabled","disabled"),
G.setAttribute("disabled","disabled"),v.setAttribute("disabled","disabled"),z.setAttribute("disabled","disabled"),B.setAttribute("disabled","disabled"),D.setAttribute("disabled","disabled"),A.setAttribute("disabled","disabled"),E.setAttribute("disabled","disabled"),F.setAttribute("disabled","disabled"),mxUtils.setOpacity(v,20),mxUtils.setOpacity(z,20),mxUtils.setOpacity(D,20),mxUtils.setOpacity(B,20),q.spin(l),b.getXml(function(a){w==b&&g(a)},function(a){q.stop();F.style.display="none";F.innerHTML=
-"";x.innerHTML="";mxUtils.write(x,mxResources.get("errorLoadingFile"))}),mxEvent.consume(a))});mxEvent.addListener(e,"dblclick",function(a){E.click();window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(a)},!1);T.appendChild(e)}return e}(c[S]);null!=aa&&S==c.length-1&&(M=aa)}K.appendChild(T);h.appendChild(K)}else null==t||null==a.drive&&t.constructor==window.DriveFile||null==a.dropbox&&t.constructor==window.DropboxFile?(l.style.display=
+"";x.innerHTML="";mxUtils.write(x,mxResources.get("errorLoadingFile"))}),mxEvent.consume(a))});mxEvent.addListener(e,"dblclick",function(a){E.click();window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(a)},!1);T.appendChild(e)}return e}(c[S]);null!=Z&&S==c.length-1&&(M=Z)}K.appendChild(T);h.appendChild(K)}else null==t||null==a.drive&&t.constructor==window.DriveFile||null==a.dropbox&&t.constructor==window.DropboxFile?(l.style.display=
"none",I.style.display="none",mxUtils.write(h,mxResources.get("notAvailable"))):(l.style.display="none",I.style.display="none",mxUtils.write(h,mxResources.get("noRevisions")));this.init=function(){null!=M&&M.click()};h=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});h.className="geBtn";I.appendChild(F);I.appendChild(v);I.appendChild(z);I.appendChild(B);I.appendChild(D);a.editor.cancelFirst?(g.appendChild(h),g.appendChild(G),g.appendChild(A),g.appendChild(C),g.appendChild(E)):(g.appendChild(G),
g.appendChild(A),g.appendChild(C),g.appendChild(E),g.appendChild(h));e.appendChild(g);e.appendChild(I);e.appendChild(x);this.container=e},DraftDialog=function(a,c,b,e,g,h,l,p){var n=document.createElement("div"),d=document.createElement("div");d.style.marginTop="0px";d.style.whiteSpace="nowrap";d.style.overflow="auto";mxUtils.write(d,c);n.appendChild(d);var f=document.createElement("div");f.style.position="absolute";f.style.border="1px solid lightGray";f.style.marginTop="10px";f.style.width="640px";
f.style.top="46px";f.style.bottom="74px";f.style.overflow="hidden";mxEvent.disableContextMenu(f);n.appendChild(f);var m=new Graph(f);m.setEnabled(!1);m.setPanning(!0);m.panningHandler.ignoreCell=!0;m.panningHandler.useLeftButtonForPanning=!0;m.minFitScale=null;m.maxFitScale=null;m.centerZoom=!0;c=mxUtils.parseXml(b);var q=a.editor.extractGraphModel(c.documentElement,!0),t=0,u=null,w=m.getGlobalVariable;m.getGlobalVariable=function(a){return"page"==a&&null!=u&&null!=u[t]?u[t].getAttribute("name"):
@@ -7681,29 +7682,29 @@ v.className="geBtn gePrimaryBtn";mxEvent.addListener(g,"keypress",function(a){13
b=0;null!=d&&d!=a;)d=d.nextSibling,b++;return b}function p(b,d,c,m,k,e,q,g,h){try{if(null==d||"image/"==d.substring(0,6))if(null==b&&null!=q||null==w[b]){var B=function(){C.innerHTML="";C.style.cursor="pointer";C.style.whiteSpace="nowrap";C.style.textOverflow="ellipsis";mxUtils.write(C,null!=K.title&&0<K.title.length?K.title:mxResources.get("untitled"));C.style.color=null==K.title||0==K.title.length?"#d0d0d0":""};t.style.backgroundImage="";u.style.display="none";var x=k,n=e;if(k>a.maxImageSize||e>
a.maxImageSize){var A=Math.min(1,Math.min(a.maxImageSize/Math.max(1,k)),a.maxImageSize/Math.max(1,e));k*=A;e*=A}x>n?(n=Math.round(100*n/x),x=100):(x=Math.round(100*x/n),n=100);var G=document.createElement("div");G.setAttribute("draggable","true");G.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";G.style.position="relative";G.style.cursor="move";mxUtils.setPrefixedStyle(G.style,"transition","transform .1s ease-in-out");if(null!=b){var E=document.createElement("img");E.setAttribute("src",z.convert(b));
E.style.width=x+"px";E.style.height=n+"px";E.style.margin="10px";E.style.paddingBottom=Math.floor((100-n)/2)+"px";E.style.paddingLeft=Math.floor((100-x)/2)+"px";G.appendChild(E)}else if(null!=q){var F=a.stringToCells(a.editor.graph.decompress(q.xml));0<F.length&&(a.sidebar.createThumb(F,100,100,G,null,!0,!1),G.firstChild.style.display=mxClient.IS_QUIRKS?"inline":"inline-block",G.firstChild.style.cursor="")}var I=document.createElement("img");I.setAttribute("src",Editor.closeImage);I.setAttribute("border",
-"0");I.setAttribute("title",mxResources.get("delete"));I.setAttribute("align","top");I.style.paddingTop="4px";I.style.position="absolute";I.style.marginLeft="-12px";I.style.zIndex="1";I.style.cursor="pointer";mxEvent.addListener(I,"dragstart",function(a){mxEvent.consume(a)});(function(a,b,d){mxEvent.addListener(I,"click",function(c){w[b]=null;for(var k=0;k<f.length;k++)if(null!=f[k].data&&f[k].data==b||null!=f[k].xml&&null!=d&&f[k].xml==d.xml){f.splice(k,1);break}G.parentNode.removeChild(a);0==f.length&&
+"0");I.setAttribute("title",mxResources.get("delete"));I.setAttribute("align","top");I.style.paddingTop="4px";I.style.position="absolute";I.style.marginLeft="-12px";I.style.zIndex="1";I.style.cursor="pointer";mxEvent.addListener(I,"dragstart",function(a){mxEvent.consume(a)});(function(a,b,d){mxEvent.addListener(I,"click",function(c){w[b]=null;for(var m=0;m<f.length;m++)if(null!=f[m].data&&f[m].data==b||null!=f[m].xml&&null!=d&&f[m].xml==d.xml){f.splice(m,1);break}G.parentNode.removeChild(a);0==f.length&&
(t.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",u.style.display="");mxEvent.consume(c)});mxEvent.addListener(I,"dblclick",function(a){mxEvent.consume(a)})})(G,b,q);G.appendChild(I);G.style.marginBottom="30px";var C=document.createElement("div");C.style.position="absolute";C.style.boxSizing="border-box";C.style.bottom="-18px";C.style.left="10px";C.style.right="10px";C.style.backgroundColor="#ffffff";C.style.overflow="hidden";C.style.textAlign="center";var K=null;null!=b?(K={data:b,
w:k,h:e,title:h},null!=g&&(K.aspect=g),w[b]=E,f.push(K)):null!=q&&(q.aspect="fixed",f.push(q),K=q);mxEvent.addListener(C,"keydown",function(a){13==a.keyCode&&null!=v&&(v(),v=null,mxEvent.consume(a))});B();G.appendChild(C);mxEvent.addListener(C,"mousedown",function(a){"true"!=C.getAttribute("contentEditable")&&mxEvent.consume(a)});F=function(b){if(mxClient.IS_IOS||mxClient.IS_QUIRKS||mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var d=new FilenameDialog(a,K.title||"",mxResources.get("ok"),
function(a){null!=a&&(K.title=a,B())},mxResources.get("enterValue"));a.showDialog(d.container,300,80,!0,!0);d.init();mxEvent.consume(b)}else if("true"!=C.getAttribute("contentEditable")){null!=v&&(v(),v=null);if(null==K.title||0==K.title.length)C.innerHTML="";C.style.textOverflow="";C.style.whiteSpace="";C.style.cursor="text";C.style.color="";C.setAttribute("contentEditable","true");C.focus();document.execCommand("selectAll",!1,null);v=function(){C.removeAttribute("contentEditable");C.style.cursor=
"pointer";K.title=C.innerHTML;B()};mxEvent.consume(b)}};mxEvent.addListener(C,"click",F);mxEvent.addListener(G,"dblclick",F);t.appendChild(G);mxEvent.addListener(G,"dragstart",function(a){null==b&&null!=q&&(I.style.visibility="hidden",C.style.visibility="hidden");mxClient.IS_FF&&null!=q.xml&&a.dataTransfer.setData("Text",q.xml);y=l(a);mxClient.IS_GC&&(G.style.opacity="0.9");window.setTimeout(function(){mxUtils.setPrefixedStyle(G.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(G,30);I.style.visibility=
"";C.style.visibility=""},0)});mxEvent.addListener(G,"dragend",function(a){"hidden"==I.style.visibility&&(I.style.visibility="",C.style.visibility="");y=null;mxUtils.setOpacity(G,100);mxUtils.setPrefixedStyle(G.style,"transform",null)})}else D||(D=!0,a.handleError({message:mxResources.get("fileExists")}));else{k=!1;try{if(a.spinner.stop(),x=mxUtils.parseXml(b),"mxlibrary"==x.documentElement.nodeName){n=JSON.parse(mxUtils.getTextContent(x.documentElement));if(null!=n&&0<n.length)for(var M=0;M<n.length;M++)null!=
-n[M].xml?p(null,null,0,0,0,0,n[M]):p(n[M].data,null,0,0,n[M].w,n[M].h,null,"fixed",n[M].title);k=!0}else if("mxfile"==x.documentElement.nodeName){for(var H=x.documentElement.getElementsByTagName("diagram"),M=0;M<H.length;M++){var n=mxUtils.getTextContent(H[M]),F=a.stringToCells(a.editor.graph.decompress(n)),V=a.editor.graph.getBoundingBoxFromGeometry(F);p(null,null,0,0,0,0,{xml:n,w:V.width,h:V.height})}k=!0}}catch(J){}k||(a.spinner.stop(),a.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(J){}return null}
+n[M].xml?p(null,null,0,0,0,0,n[M]):p(n[M].data,null,0,0,n[M].w,n[M].h,null,"fixed",n[M].title);k=!0}else if("mxfile"==x.documentElement.nodeName){for(var H=x.documentElement.getElementsByTagName("diagram"),M=0;M<H.length;M++){var n=mxUtils.getTextContent(H[M]),F=a.stringToCells(a.editor.graph.decompress(n)),V=a.editor.graph.getBoundingBoxFromGeometry(F);p(null,null,0,0,0,0,{xml:n,w:V.width,h:V.height})}k=!0}}catch(ba){}k||(a.spinner.stop(),a.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(ba){}return null}
function n(a){a.dataTransfer.dropEffect=null!=y?"move":"copy";a.stopPropagation();a.preventDefault()}function d(b){b.stopPropagation();b.preventDefault();D=!1;k=l(b);if(null!=y)null!=k&&k<t.children.length?(f.splice(k>y?k-1:k,0,f.splice(y,1)[0]),t.insertBefore(t.children[y],t.children[k])):(f.push(f.splice(y,1)[0]),t.appendChild(t.children[y]));else if(0<b.dataTransfer.files.length)a.importFiles(b.dataTransfer.files,0,0,a.maxImageSize,B(b));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")){var d=
decodeURIComponent(b.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(d)||/(\.png)($|\?)/i.test(d)||/(\.gif)($|\?)/i.test(d)||/(\.svg)($|\?)/i.test(d))&&a.loadImage(d,function(a){p(d,null,0,0,a.width,a.height);t.scrollTop=t.scrollHeight})}b.stopPropagation();b.preventDefault()}var f=[];b=document.createElement("div");b.style.height="100%";var m=document.createElement("div");m.style.whiteSpace="nowrap";m.style.height="40px";b.appendChild(m);mxUtils.write(m,mxResources.get("filename")+
":");null==c&&(c=a.defaultLibraryName+".xml");var q=document.createElement("input");q.setAttribute("value",c);q.style.marginRight="20px";q.style.marginLeft="10px";q.style.width="500px";null==g||g.isRenamable()||q.setAttribute("disabled","true");this.init=function(){if(null==g||g.isRenamable())q.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?q.select():document.execCommand("selectAll",!1,null)};m.appendChild(q);var t=document.createElement("div");t.style.borderWidth=
"1px 0px 1px 0px";t.style.borderColor="#d3d3d3";t.style.borderStyle="solid";t.style.marginTop="6px";t.style.overflow="auto";t.style.height="340px";t.style.backgroundPosition="center center";t.style.backgroundRepeat="no-repeat";0==f.length&&Graph.fileSupport&&(t.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");var u=document.createElement("div");u.style.position="absolute";u.style.width="640px";u.style.top="260px";u.style.textAlign="center";u.style.fontSize="22px";u.style.color="#a0c3ff";
mxUtils.write(u,mxResources.get("dragImagesHere"));b.appendChild(u);var w={},y=null,k=null,v=null;c=function(a){"true"!=mxEvent.getSource(a).getAttribute("contentEditable")&&null!=v&&(v(),v=null,mxEvent.consume(a))};mxEvent.addListener(t,"mousedown",c);mxEvent.addListener(t,"pointerdown",c);mxEvent.addListener(t,"touchstart",c);var z=new mxUrlConverter,D=!1;if(null!=e)for(c=0;c<e.length;c++)m=e[c],p(m.data,null,0,0,m.w,m.h,m,m.aspect,m.title);mxEvent.addListener(t,"dragleave",function(a){u.style.cursor=
-"";for(var b=mxEvent.getSource(a);null!=b;){if(b==t||b==u){a.stopPropagation();a.preventDefault();break}b=b.parentNode}});var B=function(b){return function(d,f,c,k,m,e,q,u,g){null!=g&&(/(\.vsdx)($|\?)/i.test(g.name)||/(\.vssx)($|\?)/i.test(g.name))?a.importVisio(g,mxUtils.bind(this,function(d){a.spinner.stop();p(d,f,c,k,m,e,q,"fixed",mxEvent.isAltDown(b)?null:q.substring(0,q.lastIndexOf(".")).replace(/_/g," "))})):null!=g&&!a.isOffline()&&(new XMLHttpRequest).upload&&a.isRemoteFileFormat(d,g.name)?
-a.parseFile(g,mxUtils.bind(this,function(d){4==d.readyState&&(a.spinner.stop(),200<=d.status&&299>=d.status&&(p(d.responseText,f,c,k,m,e,q,"fixed",mxEvent.isAltDown(b)?null:q.substring(0,q.lastIndexOf(".")).replace(/_/g," ")),t.scrollTop=t.scrollHeight))})):(p(d,f,c,k,m,e,q,"fixed",mxEvent.isAltDown(b)?null:q.substring(0,q.lastIndexOf(".")).replace(/_/g," ")),t.scrollTop=t.scrollHeight)}};mxEvent.addListener(t,"dragover",n);mxEvent.addListener(t,"drop",d);mxEvent.addListener(u,"dragover",n);mxEvent.addListener(u,
+"";for(var b=mxEvent.getSource(a);null!=b;){if(b==t||b==u){a.stopPropagation();a.preventDefault();break}b=b.parentNode}});var B=function(b){return function(d,f,c,m,k,e,q,g,u){null!=u&&(/(\.vsdx)($|\?)/i.test(u.name)||/(\.vssx)($|\?)/i.test(u.name))?a.importVisio(u,mxUtils.bind(this,function(d){a.spinner.stop();p(d,f,c,m,k,e,q,"fixed",mxEvent.isAltDown(b)?null:q.substring(0,q.lastIndexOf(".")).replace(/_/g," "))})):null!=u&&!a.isOffline()&&(new XMLHttpRequest).upload&&a.isRemoteFileFormat(d,u.name)?
+a.parseFile(u,mxUtils.bind(this,function(d){4==d.readyState&&(a.spinner.stop(),200<=d.status&&299>=d.status&&(p(d.responseText,f,c,m,k,e,q,"fixed",mxEvent.isAltDown(b)?null:q.substring(0,q.lastIndexOf(".")).replace(/_/g," ")),t.scrollTop=t.scrollHeight))})):(p(d,f,c,m,k,e,q,"fixed",mxEvent.isAltDown(b)?null:q.substring(0,q.lastIndexOf(".")).replace(/_/g," ")),t.scrollTop=t.scrollHeight)}};mxEvent.addListener(t,"dragover",n);mxEvent.addListener(t,"drop",d);mxEvent.addListener(u,"dragover",n);mxEvent.addListener(u,
"drop",d);b.appendChild(t);e=document.createElement("div");e.style.textAlign="right";e.style.marginTop="20px";c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});c.setAttribute("id","btnCancel");c.className="geBtn";a.editor.cancelFirst&&e.appendChild(c);m=mxUtils.button(mxResources.get("export"),function(){var b=a.createLibraryDataFromImages(f),d=q.value;/(\.xml)$/i.test(d)||(d+=".xml");a.isLocalFileSave()?a.saveLocalFile(b,d,"text/xml",null,null,!0):(new mxXmlRequest(SAVE_URL,
-"filename="+encodeURIComponent(d)+"&format=xml&xml="+encodeURIComponent(b))).simulate(document,"_blank")});m.setAttribute("id","btnDownload");m.className="geBtn";e.appendChild(m);var x=document.createElement("input");x.setAttribute("multiple","multiple");x.setAttribute("type","file");null==document.documentMode&&(mxEvent.addListener(x,"change",function(b){D=!1;a.importFiles(x.files,0,0,a.maxImageSize,function(a,d,f,c,k,m,e,q,t){B(b)(a,d,f,c,k,m,e,q,t);x.value=""});t.scrollTop=t.scrollHeight}),m=mxUtils.button(mxResources.get("import"),
+"filename="+encodeURIComponent(d)+"&format=xml&xml="+encodeURIComponent(b))).simulate(document,"_blank")});m.setAttribute("id","btnDownload");m.className="geBtn";e.appendChild(m);var x=document.createElement("input");x.setAttribute("multiple","multiple");x.setAttribute("type","file");null==document.documentMode&&(mxEvent.addListener(x,"change",function(b){D=!1;a.importFiles(x.files,0,0,a.maxImageSize,function(a,d,f,c,m,k,e,q,t){B(b)(a,d,f,c,m,k,e,q,t);x.value=""});t.scrollTop=t.scrollHeight}),m=mxUtils.button(mxResources.get("import"),
function(){null!=v&&(v(),v=null);x.click()}),m.setAttribute("id","btnAddImage"),m.className="geBtn",e.appendChild(m));m=mxUtils.button(mxResources.get("addImageUrl"),function(){null!=v&&(v(),v=null);a.showImageDialog(mxResources.get("addImageUrl"),"",function(a,b,d){D=!1;if(null!=a){if("data:image/"==a.substring(0,11)){var f=a.indexOf(",");0<f&&(a=a.substring(0,f)+";base64,"+a.substring(f+1))}p(a,null,0,0,b,d);t.scrollTop=t.scrollHeight}})});m.setAttribute("id","btnAddImageUrl");m.className="geBtn";
e.appendChild(m);this.saveBtnClickHandler=function(b,d,f,c){a.saveLibrary(b,d,f,c)};m=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(){null!=v&&(v(),v=null);this.saveBtnClickHandler(q.value,f,g,h)}));m.setAttribute("id","btnSave");m.className="geBtn gePrimaryBtn";e.appendChild(m);a.editor.cancelFirst||e.appendChild(c);b.appendChild(e);this.container=b},EditShapeDialog=function(a,c,b,e,g){e=null!=e?e:300;g=null!=g?g:120;var h,l,p=document.createElement("table"),n=document.createElement("tbody");
p.style.cellPadding="4px";h=document.createElement("tr");l=document.createElement("td");l.setAttribute("colspan","2");l.style.fontSize="10pt";mxUtils.write(l,b);h.appendChild(l);n.appendChild(h);h=document.createElement("tr");l=document.createElement("td");var d=document.createElement("textarea");d.style.outline="none";d.style.resize="none";d.style.width=e-200+"px";d.style.height=g+"px";this.textarea=d;this.init=function(){d.focus();d.scrollTop=0};l.appendChild(d);h.appendChild(l);l=document.createElement("td");
b=document.createElement("div");b.style.position="relative";b.style.border="1px solid gray";b.style.top="6px";b.style.width="200px";b.style.height=g+4+"px";b.style.overflow="hidden";b.style.marginBottom="16px";mxEvent.disableContextMenu(b);l.appendChild(b);var f=new Graph(b);f.setEnabled(!1);var m=a.editor.graph.cloneCell(c);f.addCells([m]);b=f.view.getState(m);var q="";null!=b.shape&&null!=b.shape.stencil&&(q=mxUtils.getPrettyXml(b.shape.stencil.desc));mxUtils.write(d,q||"");b=f.getGraphBounds();
g=Math.min(160/b.width,(g-40)/b.height);f.view.scaleAndTranslate(g,20/g-b.x,20/g-b.y);h.appendChild(l);n.appendChild(h);h=document.createElement("tr");l=document.createElement("td");l.setAttribute("colspan","2");l.style.paddingTop="2px";l.style.whiteSpace="nowrap";l.setAttribute("align","right");g=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});g.className="geBtn";a.editor.cancelFirst&&l.appendChild(g);a.isOffline()||(b=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/support/solutions/articles/16000052874")}),
-b.className="geBtn",l.appendChild(b));var t=function(b,f,c){var k=d.value,m=mxUtils.parseXml(k),k=mxUtils.getPrettyXml(m.documentElement),m=m.documentElement.getElementsByTagName("parsererror");if(null!=m&&0<m.length)a.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(c&&a.hideDialog(),m=!b.model.contains(f),!c||m||k!=q){k=a.editor.graph.compress(k);b.getModel().beginUpdate();try{if(m){var e=a.editor.graph.getInsertPoint();f.geometry.x=e.x;
-f.geometry.y=e.y;b.addCell(f)}b.setCellStyles(mxConstants.STYLE_SHAPE,"stencil("+k+")",[f])}catch(D){throw D;}finally{b.getModel().endUpdate()}m&&b.setSelectionCell(f)}};b=mxUtils.button(mxResources.get("preview"),function(){t(f,m,!1)});b.className="geBtn";l.appendChild(b);b=mxUtils.button(mxResources.get("apply"),function(){t(a.editor.graph,c,!0)});b.className="geBtn gePrimaryBtn";l.appendChild(b);a.editor.cancelFirst||l.appendChild(g);h.appendChild(l);n.appendChild(h);p.appendChild(n);this.container=
+b.className="geBtn",l.appendChild(b));var t=function(b,f,c){var m=d.value,e=mxUtils.parseXml(m),m=mxUtils.getPrettyXml(e.documentElement),e=e.documentElement.getElementsByTagName("parsererror");if(null!=e&&0<e.length)a.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(c&&a.hideDialog(),e=!b.model.contains(f),!c||e||m!=q){m=a.editor.graph.compress(m);b.getModel().beginUpdate();try{if(e){var t=a.editor.graph.getInsertPoint();f.geometry.x=t.x;
+f.geometry.y=t.y;b.addCell(f)}b.setCellStyles(mxConstants.STYLE_SHAPE,"stencil("+m+")",[f])}catch(D){throw D;}finally{b.getModel().endUpdate()}e&&b.setSelectionCell(f)}};b=mxUtils.button(mxResources.get("preview"),function(){t(f,m,!1)});b.className="geBtn";l.appendChild(b);b=mxUtils.button(mxResources.get("apply"),function(){t(a.editor.graph,c,!0)});b.className="geBtn gePrimaryBtn";l.appendChild(b);a.editor.cancelFirst||l.appendChild(g);h.appendChild(l);n.appendChild(h);p.appendChild(n);this.container=
p},CustomDialog=function(a,c,b,e,g,h,l,p){var n=document.createElement("div");n.appendChild(c);c=document.createElement("div");c.style.marginTop="16px";c.style.textAlign="center";null!=l&&c.appendChild(l);l=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=e&&e()});l.className="geBtn";p&&(l.style.display="none");a.editor.cancelFirst&&c.appendChild(l);a.isOffline()||null==h||(p=mxUtils.button(mxResources.get("help"),function(){a.openLink(h)}),p.className="geBtn",c.appendChild(p));
g=mxUtils.button(g||mxResources.get("ok"),function(){a.hideDialog();null!=b&&b()});c.appendChild(g);g.className="geBtn gePrimaryBtn";a.editor.cancelFirst||c.appendChild(l);n.appendChild(c);this.cancelBtn=l;this.okButton=g;this.container=n},TemplatesDialog=function(){var a='<div class="geTempDlgHeader"><img src="/images/draw.io-logo.svg" class="geTempDlgHeaderLogo"><input type="search" class="geTempDlgSearchBox" placeholder="'+mxResources.get("search",null,"Search")+'"></div><div class="geTemplatesList"><div class="geTempDlgNewDiagramlbl">'+
mxResources.get("newDiagram",null,"New Diagram")+'</div><div class="geTempDlgHLine"></div><div class="geTemplatesLbl">'+mxResources.get("templates",null,"Templates")+'</div></div><div class="geTempDlgContent"><div class="geTempDlgNewDiagramCat"><div class="geTempDlgNewDiagramCatLbl">'+mxResources.get("newDiagram",null,"New Diagram")+'</div><div class="geTempDlgNewDiagramCatList"></div><div class="geTempDlgNewDiagramCatFooter"><div class="geTempDlgShowAllBtn">'+mxResources.get("showAll",null,"+ Show all")+
@@ -7711,26 +7712,26 @@ mxResources.get("newDiagram",null,"New Diagram")+'</div><div class="geTempDlgHLi
mxResources.get("allDiagrams",null,"All diagrams")+'</span></div><div class="geTempDlgSpacer"> </div><div class="geTempDlgRadioBtn geTempDlgRadioBtnSmall geTempDlgRadioBtnActive" data-id="tilesBtn"><img src="/images/tiles-sel.svg" class="geTempDlgTilesBtnImg"></div><div class="geTempDlgRadioBtn geTempDlgRadioBtnSmall" data-id="listBtn"><img src="/images/list.svg" class="geTempDlgListBtnImg"></div></div></div><div class="geTempDlgDiagramsTiles"></div></div></div><br style="clear:both;"/><div class="geTempDlgFooter"><span class="geTempDlgLinkToDiagram geTempDlgLinkToDiagramHint">&#x1F6C8; '+
mxResources.get("linkToDiagramHint",null,"Add a link to this diagram. The diagram can only be edited from the page that owns it.")+'</span><button class="geTempDlgLinkToDiagram geTempDlgLinkToDiagramBtn">'+mxResources.get("linkToDiagram",null,"Link to Diagram")+'</button><div class="geTempDlgCreateBtn">'+mxResources.get("create",null,"Create")+'</div><div class="geTempDlgCancelBtn">'+mxResources.get("cancel",null,"Cancel")+"</div></div>",c=document.createElement("div");c.innerHTML=a;c.className="geTemplateDlg";
var a=window.innerWidth,b=window.innerHeight,e=987,g=712;.9*a<e&&(e=Math.max(.9*a,600),c.style.width=e+"px");.9*b<g&&(g=Math.max(.9*b,300),c.style.height=g+"px");this.width=e;this.height=g;this.container=c};
-TemplatesDialog.prototype.init=function(a,c,b,e,g,h,l,p,n,d){function f(){null!=C&&(C.style.fontWeight="normal",C.style.textDecoration="none",C=null)}function m(a,b,d,f,c,k,m){if(-1<a.className.indexOf("geTempDlgRadioBtnActive"))return!1;a.className+=" geTempDlgRadioBtnActive";B.querySelector(".geTempDlgRadioBtn[data-id="+f+"]").className="geTempDlgRadioBtn "+(m?"geTempDlgRadioBtnLarge":"geTempDlgRadioBtnSmall");B.querySelector("."+b).src="/images/"+d+"-sel.svg";B.querySelector("."+c).src="/images/"+
-k+".svg";return!0}function q(a){function b(a){Z.removeChild(f);B.removeChild(d);Z.scrollTop=k}a=a.prevImgUrl||a.imgUrl||TEMPLATE_PATH+"/"+a.url.substring(0,a.url.length-4)+".png";var d=document.createElement("div");d.className="geTempDlgDialogMask";B.appendChild(d);var f=document.createElement("div");f.className="geTempDlgDiagramPreviewBox";var c=document.createElement("img");c.src=a;f.appendChild(c);a=document.createElement("img");a.src="/images/close.png";a.className="geTempDlgPreviewCloseBtn";
-a.setAttribute("title",mxResources.get("close"));f.appendChild(a);var k=Z.scrollTop;mxEvent.addListener(a,"click",b);mxEvent.addListener(d,"click",b);Z.appendChild(f);Z.scrollTop=0;f.style.lineHeight=f.clientHeight+"px"}function t(a,b,d){if(null!=F){for(var f=F.className.split(" "),c=0;c<f.length;c++)if(-1<f[c].indexOf("Active")){f.splice(c,1);break}F.className=f.join(" ")}null!=a?(F=a,F.className+=" "+b,H=d,L.className="geTempDlgCreateBtn"):(H=F=null,L.className="geTempDlgCreateBtn geTempDlgCreateBtnDisabled")}
+TemplatesDialog.prototype.init=function(a,c,b,e,g,h,l,p,n,d){function f(){null!=C&&(C.style.fontWeight="normal",C.style.textDecoration="none",C=null)}function m(a,b,d,f,c,m,k){if(-1<a.className.indexOf("geTempDlgRadioBtnActive"))return!1;a.className+=" geTempDlgRadioBtnActive";B.querySelector(".geTempDlgRadioBtn[data-id="+f+"]").className="geTempDlgRadioBtn "+(k?"geTempDlgRadioBtnLarge":"geTempDlgRadioBtnSmall");B.querySelector("."+b).src="/images/"+d+"-sel.svg";B.querySelector("."+c).src="/images/"+
+m+".svg";return!0}function q(a){function b(a){Y.removeChild(f);B.removeChild(d);Y.scrollTop=m}a=a.prevImgUrl||a.imgUrl||TEMPLATE_PATH+"/"+a.url.substring(0,a.url.length-4)+".png";var d=document.createElement("div");d.className="geTempDlgDialogMask";B.appendChild(d);var f=document.createElement("div");f.className="geTempDlgDiagramPreviewBox";var c=document.createElement("img");c.src=a;f.appendChild(c);a=document.createElement("img");a.src="/images/close.png";a.className="geTempDlgPreviewCloseBtn";
+a.setAttribute("title",mxResources.get("close"));f.appendChild(a);var m=Y.scrollTop;mxEvent.addListener(a,"click",b);mxEvent.addListener(d,"click",b);Y.appendChild(f);Y.scrollTop=0;f.style.lineHeight=f.clientHeight+"px"}function t(a,b,d){if(null!=F){for(var f=F.className.split(" "),c=0;c<f.length;c++)if(-1<f[c].indexOf("Active")){f.splice(c,1);break}F.className=f.join(" ")}null!=a?(F=a,F.className+=" "+b,H=d,L.className="geTempDlgCreateBtn"):(H=F=null,L.className="geTempDlgCreateBtn geTempDlgCreateBtnDisabled")}
function u(b){if(null!=H){var f=H;H=null;L.className="geTempDlgCreateBtn geTempDlgCreateBtnDisabled geTempDlgCreateBtnBusy";f.isExternal?(1==b?d(f.url,f,"nameInput.value"):n(f.url,f,"nameInput.value"),a.hideDialog(!0)):mxUtils.get(TEMPLATE_PATH+"/"+f.url,mxUtils.bind(this,function(b){200<=b.getStatus()&&299>=b.getStatus()&&(c(b.getText(),"nameInput.value"),a.hideDialog(!0))}))}}function w(a){a=a?"":"none";for(var b=B.querySelectorAll(".geTempDlgLinkToDiagram"),d=0;d<b.length;d++)b[d].style.display=
-a}function y(a,b,d){function f(){L.innerHTML=b?mxResources.get("create"):mxResources.get("copy");w(!b)}P.innerHTML="";t();M=a;var c=null;if(d){c=document.createElement("table");c.className="geTempDlgDiagramsListGrid";var k=document.createElement("tr"),m=document.createElement("th");m.style.width="50%";m.innerHTML=mxResources.get("diagram",null,"Diagram");k.appendChild(m);m=document.createElement("th");m.style.width="25%";m.innerHTML=mxResources.get("changedBy",null,"Changed By");k.appendChild(m);
-m=document.createElement("th");m.style.width="25%";m.innerHTML=mxResources.get("lastModifiedOn",null,"Last modified on");k.appendChild(m);c.appendChild(k);P.appendChild(c)}for(k=0;k<a.length;k++){a[k].isExternal=!b;var e=a[k].url,m=mxUtils.htmlEntities(a[k].title),g=a[k].tooltip||a[k].title,z=a[k].imgUrl,v=mxUtils.htmlEntities(a[k].changedBy||""),h=mxUtils.htmlEntities(a[k].lastModifiedOn||"");z||(z=TEMPLATE_PATH+"/"+e.substring(0,e.length-4)+".png");e=d?50:15;null!=m&&m.length>e&&(m=m.substring(0,
-e)+"&hellip;");if(d){var D=document.createElement("tr"),z=document.createElement("td"),B=document.createElement("img");B.src="/images/icon-search.svg";B.className="geTempDlgDiagramListPreviewBtn";B.setAttribute("title",mxResources.get("preview"));z.appendChild(B);g=document.createElement("span");g.className="geTempDlgDiagramTitle";g.innerHTML=m;z.appendChild(g);D.appendChild(z);z=document.createElement("td");z.innerHTML=v;D.appendChild(z);z=document.createElement("td");z.innerHTML=h;D.appendChild(z);
-c.appendChild(D);null==F&&(f(),t(D,"geTempDlgDiagramsListGridActive",a[k]));(function(a,b){mxEvent.addListener(D,"click",function(){F!=b&&(f(),t(b,"geTempDlgDiagramsListGridActive",a))});mxEvent.addListener(D,"dblclick",u);mxEvent.addListener(B,"click",function(){q(a)})})(a[k],D)}else{var l=document.createElement("div");l.className="geTempDlgDiagramTile";l.setAttribute("title",g);null==F&&(f(),t(l,"geTempDlgDiagramTileActive",a[k]));v=document.createElement("div");v.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgLoading";
-var y=document.createElement("img");y.style.display="none";(function(a,b){y.onload=function(){b.className="geTempDlgDiagramTileImg";a.style.display=""};y.onerror=function(){b.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgError"}})(y,v);y.src=z;v.appendChild(y);l.appendChild(v);v=document.createElement("div");v.className="geTempDlgDiagramTileLbl";v.innerHTML=null!=m?m:"";l.appendChild(v);B=document.createElement("img");B.src="/images/icon-search.svg";B.className="geTempDlgDiagramPreviewBtn";
-B.setAttribute("title",mxResources.get("preview"));l.appendChild(B);(function(a,b){mxEvent.addListener(l,"click",function(){F!=b&&(f(),t(b,"geTempDlgDiagramTileActive",a))});mxEvent.addListener(l,"dblclick",u);mxEvent.addListener(B,"click",function(){q(a)})})(a[k],l);P.appendChild(l)}}}function k(a,b){Q.innerHTML="";t();for(var d=!b&&5<a.length?5:a.length,f=0;f<d;f++){var c=a[f];c.isCategory=!0;var k=document.createElement("div"),m=mxResources.get(c.title);null==m&&(m=c.title.substring(0,1).toUpperCase()+
-c.title.substring(1));k.className="geTempDlgNewDiagramCatItem";k.setAttribute("title",m);m=mxUtils.htmlEntities(m);15<m.length&&(m=m.substring(0,15)+"&hellip;");null==F&&(L.innerHTML=mxResources.get("create"),w(),t(k,"geTempDlgNewDiagramCatItemActive",c));var e=document.createElement("div");e.className="geTempDlgNewDiagramCatItemImg";var q=document.createElement("img");q.src=NEW_DIAGRAM_CATS_PATH+"/"+c.img;e.appendChild(q);k.appendChild(e);e=document.createElement("div");e.className="geTempDlgNewDiagramCatItemLbl";
-e.innerHTML=m;k.appendChild(e);Q.appendChild(k);(function(a,b){mxEvent.addListener(k,"click",function(){F!=b&&(L.innerHTML=mxResources.get("create"),w(),t(b,"geTempDlgNewDiagramCatItemActive",a))});mxEvent.addListener(k,"dblclick",u)})(c,k)}T.style.display=5>a.length?"none":""}function v(a){var b=B.querySelector(".geTemplatesList"),d;for(d in a){var f=document.createElement("div"),c=mxResources.get(d),k=a[d];null==c&&(c=d.substring(0,1).toUpperCase()+d.substring(1));f.className="geTemplateCatLink";
-f.setAttribute("title",c+" ("+k.length+")");c=mxUtils.htmlEntities(c);15<c.length&&(c=c.substring(0,15)+"&hellip;");f.innerHTML=c+" ("+k.length+")";b.appendChild(f);(function(b,d,c){mxEvent.addListener(f,"click",function(){C!=c&&(null!=C?(C.style.fontWeight="normal",C.style.textDecoration="none"):(Y.style.display="none",N.style.minHeight="100%"),C=c,C.style.fontWeight="bold",C.style.textDecoration="underline",Z.scrollTop=0,x&&(G=!0),S.innerHTML=d,aa.style.display="none",y(a[b],!0))})})(d,c,f)}}function z(a){l&&
-(Z.scrollTop=0,P.innerHTML="",U.spin(P),G=!1,x=!0,S.innerHTML=mxResources.get("recentDiag",null,"Recent Diagrams"),K=null,l(W,a?null:h))}function D(a){f();Z.scrollTop=0;P.innerHTML="";U.spin(P);G=!1;x=!0;da=null;S.innerHTML=mxResources.get("searchResults",null,"Search Results")+' "'+mxUtils.htmlEntities(a)+'"';p(a,W,E?null:h);K=a}e=null!=e?e:TEMPLATE_PATH+"/index.xml";g=null!=g?g:NEW_DIAGRAM_CATS_PATH+"/index.xml";var B=this.container,x=!1,G=!1,C=null,F=null,H=null,A=!1,E=!0,I=!1,M=[],K,T=B.querySelector(".geTempDlgShowAllBtn"),
-P=B.querySelector(".geTempDlgDiagramsTiles"),S=B.querySelector(".geTempDlgDiagramsListTitle"),aa=B.querySelector(".geTempDlgDiagramsListBtns"),Z=B.querySelector(".geTempDlgContent"),N=B.querySelector(".geTempDlgDiagramsList"),Y=B.querySelector(".geTempDlgNewDiagramCat"),Q=B.querySelector(".geTempDlgNewDiagramCatList"),L=B.querySelector(".geTempDlgCreateBtn"),U=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"50px",zIndex:2E9});mxEvent.addListener(B.querySelector(".geTempDlgNewDiagramlbl"),
-"click",function(){f();Y.style.display="";N.style.minHeight="calc(100% - 280px)";z(E)});mxEvent.addListener(B.querySelector(".geTempDlgRadioBtn[data-id=allDiagramsBtn]"),"click",function(){m(this,"geTempDlgAllDiagramsBtnImg","all-diagrams","myDiagramsBtn","geTempDlgMyDiagramsBtnImg","my-diagrams",!0)&&(E=!0,null==K?z(E):D(K))});mxEvent.addListener(B.querySelector(".geTempDlgRadioBtn[data-id=myDiagramsBtn]"),"click",function(){m(this,"geTempDlgMyDiagramsBtnImg","my-diagrams","allDiagramsBtn","geTempDlgAllDiagramsBtnImg",
-"all-diagrams",!0)&&(E=!1,null==K?z(E):D(K))});mxEvent.addListener(B.querySelector(".geTempDlgRadioBtn[data-id=listBtn]"),"click",function(){m(this,"geTempDlgListBtnImg","list","tilesBtn","geTempDlgTilesBtnImg","tiles",!1)&&(I=!0,y(M,!1,I))});mxEvent.addListener(B.querySelector(".geTempDlgRadioBtn[data-id=tilesBtn]"),"click",function(){m(this,"geTempDlgTilesBtnImg","tiles","listBtn","geTempDlgListBtnImg","list",!1)&&(I=!1,y(M,!1,I))});mxEvent.addListener(T,"click",function(){A?(Y.style.height="280px",
-Q.style.height="190px",T.innerHTML=mxResources.get("showAll",null,"+ Show all"),k(J)):(Y.style.height="440px",Q.style.height="355px",T.innerHTML=mxResources.get("showLess",null,"- Show less"),k(J,!0));A=!A});var R=!1,O=!1,V={},J=[],X=1;mxUtils.get(e,function(a){if(!R){R=!0;for(a=a.getXml().documentElement.firstChild;null!=a;){if("undefined"!==typeof a.getAttribute){var b=a.getAttribute("url");if(null!=b){var d=b.indexOf("/"),b=b.substring(0,d),d=V[b];null==d&&(X++,d=[],V[b]=d);d.push({url:a.getAttribute("url"),
-libs:a.getAttribute("libs"),title:a.getAttribute("title"),tooltip:a.getAttribute("url"),imgUrl:a.getAttribute("imgUrl")})}}a=a.nextSibling}v(V)}});mxUtils.get(g,function(a){if(!O){O=!0;for(a=a.getXml().documentElement.firstChild;null!=a;)"undefined"!==typeof a.getAttribute&&null!=a.getAttribute("title")&&J.push({img:a.getAttribute("img"),libs:a.getAttribute("libs"),title:a.getAttribute("title")}),a=a.nextSibling;k(J)}});var W=function(a,b){aa.style.display="";U.stop();x=!1;G?G=!1:b?P.innerHTML=b:
-0==a.length?P.innerHTML=mxResources.get("noDiagrams",null,"No Diagrams Found"):y(a,!1,I)};z(E);var da=null;p&&mxEvent.addListener(B.querySelector(".geTempDlgSearchBox"),"keyup",function(a){var b=this;null!=da&&clearTimeout(da);13==a.keyCode?D(b.value):da=setTimeout(function(){D(b.value)},500)});mxEvent.addListener(L,"click",u);mxEvent.addListener(B.querySelector(".geTempDlgLinkToDiagramBtn"),"click",function(a){u(!0)});mxEvent.addListener(B.querySelector(".geTempDlgCancelBtn"),"click",function(){null!=
+a}function y(a,b,d){function f(){L.innerHTML=b?mxResources.get("create"):mxResources.get("copy");w(!b)}Q.innerHTML="";t();M=a;var c=null;if(d){c=document.createElement("table");c.className="geTempDlgDiagramsListGrid";var m=document.createElement("tr"),k=document.createElement("th");k.style.width="50%";k.innerHTML=mxResources.get("diagram",null,"Diagram");m.appendChild(k);k=document.createElement("th");k.style.width="25%";k.innerHTML=mxResources.get("changedBy",null,"Changed By");m.appendChild(k);
+k=document.createElement("th");k.style.width="25%";k.innerHTML=mxResources.get("lastModifiedOn",null,"Last modified on");m.appendChild(k);c.appendChild(m);Q.appendChild(c)}for(m=0;m<a.length;m++){a[m].isExternal=!b;var e=a[m].url,k=mxUtils.htmlEntities(a[m].title),g=a[m].tooltip||a[m].title,z=a[m].imgUrl,v=mxUtils.htmlEntities(a[m].changedBy||""),h=mxUtils.htmlEntities(a[m].lastModifiedOn||"");z||(z=TEMPLATE_PATH+"/"+e.substring(0,e.length-4)+".png");e=d?50:15;null!=k&&k.length>e&&(k=k.substring(0,
+e)+"&hellip;");if(d){var D=document.createElement("tr"),z=document.createElement("td"),B=document.createElement("img");B.src="/images/icon-search.svg";B.className="geTempDlgDiagramListPreviewBtn";B.setAttribute("title",mxResources.get("preview"));z.appendChild(B);g=document.createElement("span");g.className="geTempDlgDiagramTitle";g.innerHTML=k;z.appendChild(g);D.appendChild(z);z=document.createElement("td");z.innerHTML=v;D.appendChild(z);z=document.createElement("td");z.innerHTML=h;D.appendChild(z);
+c.appendChild(D);null==F&&(f(),t(D,"geTempDlgDiagramsListGridActive",a[m]));(function(a,b){mxEvent.addListener(D,"click",function(){F!=b&&(f(),t(b,"geTempDlgDiagramsListGridActive",a))});mxEvent.addListener(D,"dblclick",u);mxEvent.addListener(B,"click",function(){q(a)})})(a[m],D)}else{var l=document.createElement("div");l.className="geTempDlgDiagramTile";l.setAttribute("title",g);null==F&&(f(),t(l,"geTempDlgDiagramTileActive",a[m]));v=document.createElement("div");v.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgLoading";
+var y=document.createElement("img");y.style.display="none";(function(a,b){y.onload=function(){b.className="geTempDlgDiagramTileImg";a.style.display=""};y.onerror=function(){b.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgError"}})(y,v);y.src=z;v.appendChild(y);l.appendChild(v);v=document.createElement("div");v.className="geTempDlgDiagramTileLbl";v.innerHTML=null!=k?k:"";l.appendChild(v);B=document.createElement("img");B.src="/images/icon-search.svg";B.className="geTempDlgDiagramPreviewBtn";
+B.setAttribute("title",mxResources.get("preview"));l.appendChild(B);(function(a,b){mxEvent.addListener(l,"click",function(){F!=b&&(f(),t(b,"geTempDlgDiagramTileActive",a))});mxEvent.addListener(l,"dblclick",u);mxEvent.addListener(B,"click",function(){q(a)})})(a[m],l);Q.appendChild(l)}}}function k(a,b){R.innerHTML="";t();for(var d=!b&&5<a.length?5:a.length,f=0;f<d;f++){var c=a[f];c.isCategory=!0;var m=document.createElement("div"),k=mxResources.get(c.title);null==k&&(k=c.title.substring(0,1).toUpperCase()+
+c.title.substring(1));m.className="geTempDlgNewDiagramCatItem";m.setAttribute("title",k);k=mxUtils.htmlEntities(k);15<k.length&&(k=k.substring(0,15)+"&hellip;");null==F&&(L.innerHTML=mxResources.get("create"),w(),t(m,"geTempDlgNewDiagramCatItemActive",c));var e=document.createElement("div");e.className="geTempDlgNewDiagramCatItemImg";var q=document.createElement("img");q.src=NEW_DIAGRAM_CATS_PATH+"/"+c.img;e.appendChild(q);m.appendChild(e);e=document.createElement("div");e.className="geTempDlgNewDiagramCatItemLbl";
+e.innerHTML=k;m.appendChild(e);R.appendChild(m);(function(a,b){mxEvent.addListener(m,"click",function(){F!=b&&(L.innerHTML=mxResources.get("create"),w(),t(b,"geTempDlgNewDiagramCatItemActive",a))});mxEvent.addListener(m,"dblclick",u)})(c,m)}T.style.display=5>a.length?"none":""}function v(a){var b=B.querySelector(".geTemplatesList"),d;for(d in a){var f=document.createElement("div"),c=mxResources.get(d),m=a[d];null==c&&(c=d.substring(0,1).toUpperCase()+d.substring(1));f.className="geTemplateCatLink";
+f.setAttribute("title",c+" ("+m.length+")");c=mxUtils.htmlEntities(c);15<c.length&&(c=c.substring(0,15)+"&hellip;");f.innerHTML=c+" ("+m.length+")";b.appendChild(f);(function(b,d,c){mxEvent.addListener(f,"click",function(){C!=c&&(null!=C?(C.style.fontWeight="normal",C.style.textDecoration="none"):(X.style.display="none",N.style.minHeight="100%"),C=c,C.style.fontWeight="bold",C.style.textDecoration="underline",Y.scrollTop=0,x&&(G=!0),S.innerHTML=d,Z.style.display="none",y(a[b],!0))})})(d,c,f)}}function z(a){l&&
+(Y.scrollTop=0,Q.innerHTML="",U.spin(Q),G=!1,x=!0,S.innerHTML=mxResources.get("recentDiag",null,"Recent Diagrams"),K=null,l(ca,a?null:h))}function D(a){f();Y.scrollTop=0;Q.innerHTML="";U.spin(Q);G=!1;x=!0;W=null;S.innerHTML=mxResources.get("searchResults",null,"Search Results")+' "'+mxUtils.htmlEntities(a)+'"';p(a,ca,E?null:h);K=a}e=null!=e?e:TEMPLATE_PATH+"/index.xml";g=null!=g?g:NEW_DIAGRAM_CATS_PATH+"/index.xml";var B=this.container,x=!1,G=!1,C=null,F=null,H=null,A=!1,E=!0,I=!1,M=[],K,T=B.querySelector(".geTempDlgShowAllBtn"),
+Q=B.querySelector(".geTempDlgDiagramsTiles"),S=B.querySelector(".geTempDlgDiagramsListTitle"),Z=B.querySelector(".geTempDlgDiagramsListBtns"),Y=B.querySelector(".geTempDlgContent"),N=B.querySelector(".geTempDlgDiagramsList"),X=B.querySelector(".geTempDlgNewDiagramCat"),R=B.querySelector(".geTempDlgNewDiagramCatList"),L=B.querySelector(".geTempDlgCreateBtn"),U=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"50px",zIndex:2E9});mxEvent.addListener(B.querySelector(".geTempDlgNewDiagramlbl"),
+"click",function(){f();X.style.display="";N.style.minHeight="calc(100% - 280px)";z(E)});mxEvent.addListener(B.querySelector(".geTempDlgRadioBtn[data-id=allDiagramsBtn]"),"click",function(){m(this,"geTempDlgAllDiagramsBtnImg","all-diagrams","myDiagramsBtn","geTempDlgMyDiagramsBtnImg","my-diagrams",!0)&&(E=!0,null==K?z(E):D(K))});mxEvent.addListener(B.querySelector(".geTempDlgRadioBtn[data-id=myDiagramsBtn]"),"click",function(){m(this,"geTempDlgMyDiagramsBtnImg","my-diagrams","allDiagramsBtn","geTempDlgAllDiagramsBtnImg",
+"all-diagrams",!0)&&(E=!1,null==K?z(E):D(K))});mxEvent.addListener(B.querySelector(".geTempDlgRadioBtn[data-id=listBtn]"),"click",function(){m(this,"geTempDlgListBtnImg","list","tilesBtn","geTempDlgTilesBtnImg","tiles",!1)&&(I=!0,y(M,!1,I))});mxEvent.addListener(B.querySelector(".geTempDlgRadioBtn[data-id=tilesBtn]"),"click",function(){m(this,"geTempDlgTilesBtnImg","tiles","listBtn","geTempDlgListBtnImg","list",!1)&&(I=!1,y(M,!1,I))});mxEvent.addListener(T,"click",function(){A?(X.style.height="280px",
+R.style.height="190px",T.innerHTML=mxResources.get("showAll",null,"+ Show all"),k(ba)):(X.style.height="440px",R.style.height="355px",T.innerHTML=mxResources.get("showLess",null,"- Show less"),k(ba,!0));A=!A});var O=!1,P=!1,V={},ba=[],J=1;mxUtils.get(e,function(a){if(!O){O=!0;for(a=a.getXml().documentElement.firstChild;null!=a;){if("undefined"!==typeof a.getAttribute){var b=a.getAttribute("url");if(null!=b){var d=b.indexOf("/"),b=b.substring(0,d),d=V[b];null==d&&(J++,d=[],V[b]=d);d.push({url:a.getAttribute("url"),
+libs:a.getAttribute("libs"),title:a.getAttribute("title"),tooltip:a.getAttribute("url"),imgUrl:a.getAttribute("imgUrl")})}}a=a.nextSibling}v(V)}});mxUtils.get(g,function(a){if(!P){P=!0;for(a=a.getXml().documentElement.firstChild;null!=a;)"undefined"!==typeof a.getAttribute&&null!=a.getAttribute("title")&&ba.push({img:a.getAttribute("img"),libs:a.getAttribute("libs"),title:a.getAttribute("title")}),a=a.nextSibling;k(ba)}});var ca=function(a,b){Z.style.display="";U.stop();x=!1;G?G=!1:b?Q.innerHTML=
+b:0==a.length?Q.innerHTML=mxResources.get("noDiagrams",null,"No Diagrams Found"):y(a,!1,I)};z(E);var W=null;p&&mxEvent.addListener(B.querySelector(".geTempDlgSearchBox"),"keyup",function(a){var b=this;null!=W&&clearTimeout(W);13==a.keyCode?D(b.value):W=setTimeout(function(){D(b.value)},500)});mxEvent.addListener(L,"click",u);mxEvent.addListener(B.querySelector(".geTempDlgLinkToDiagramBtn"),"click",function(a){u(!0)});mxEvent.addListener(B.querySelector(".geTempDlgCancelBtn"),"click",function(){null!=
b&&b();a.hideDialog(!0)})};(function(){Editor.prototype.appName="draw.io";Editor.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAMAAADzN3VRAAAApVBMVEUAAAD////k5OT///8AAAB1dXXMzMz9/f39/f37+/v5+fn+/v7///9iYmJaWlqFhYWnp6ejo6OHh4f////////////////7+/v5+fnx8fH///8AAAD///8bGxv7+/v5+fkoKCghISFDQ0MYGBjh4eHY2Njb29tQUFBvb29HR0c/Pz82NjYrKyu/v78SEhLu7u7s7OzV1dVVVVU7OzsVFRXAv78QEBBzqehMAAAAG3RSTlMAA/7p/vz5xZlrTiPL/v78+/v7+OXd2TYQDs8L70ZbAAABKUlEQVQoz3VS13LCMBBUXHChd8iukDslQChJ/v/TchaG4cXS+OSb1c7trU7V60OpdRz2ZtNZL4zXNlcN8BEtSG6+NxIXkeRPoBuQ1cjvZ31/VJFB10ISli6diYfH8iYO3WUNCcNlB0gTrXOtkxTo0O1aKKiBBMhhv2MNBQKoiA5wxlZo0JDzD3AYKbWacyj3fs01wxey0pyEP+R8pWKWXoqtIZ0DDg5pbki9krEKOa6LVDQsdoXEsi46Zqh69KFz7B1u7Hb2yDV8firXDKBlZ4UFiswKGRhXTS93/ECK7yxnJ3+S3y/ThpO+cfSD017nqa18aasabU0/t7d+tk0/1oMEJ1NaD67iwdF68OabFSLn+eHb0+vjy+uk8br9fdrftH0O2menfd7+AQfYM/lNjoDHAAAAAElFTkSuQmCC":
IMAGE_PATH+"/delete.png";Editor.plusImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MDdCMTdENjVCOEM4MTFFNDlCRjVBNDdCODU5NjNBNUMiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MDdCMTdENjZCOEM4MTFFNDlCRjVBNDdCODU5NjNBNUMiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowN0IxN0Q2M0I4QzgxMUU0OUJGNUE0N0I4NTk2M0E1QyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowN0IxN0Q2NEI4QzgxMUU0OUJGNUE0N0I4NTk2M0E1QyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PtjrjmgAAAAtSURBVHjaYvz//z8DMigvLwcLdHZ2MiKLMzEQCaivkLGsrOw/dU0cAr4GCDAARQsQbTFrv10AAAAASUVORK5CYII=":
IMAGE_PATH+"/plus.png";Editor.spinImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDAAMAPUxAEVriVp7lmCAmmGBm2OCnGmHn3OPpneSqYKbr4OcsIScsI2kto6kt46lt5KnuZmtvpquvpuvv56ywaCzwqK1xKu7yay9yq+/zLHAzbfF0bjG0bzJ1LzK1MDN18jT28nT3M3X3tHa4dTc49Xd5Njf5dng5t3k6d/l6uDm6uru8e7x8/Dz9fT29/b4+Pj5+fj5+vr6+v///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAkKADEAIf8LTkVUU0NBUEUyLjADAQAAACwAAAAADAAMAAAGR8CYcEgsOgYAIax4CCQuQldrCBEsiK8VS2hoFGOrlJDA+cZQwkLnqyoJFZKviSS0ICrE0ec0jDAwIiUeGyBFGhMPFBkhZo1BACH5BAkKAC4ALAAAAAAMAAwAhVB0kFR3k1V4k2CAmmWEnW6Lo3KOpXeSqH2XrIOcsISdsImhtIqhtJCmuJGnuZuwv52wwJ+ywZ+ywqm6yLHBzbLCzrXEz7fF0LnH0rrI0r7L1b/M1sXR2cfT28rV3czW3s/Z4Nfe5Nvi6ODm6uLn6+Ln7OLo7OXq7efs7+zw8u/y9PDy9PX3+Pr7+////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAZDQJdwSCxGDAIAoVFkFBwYSyIwGE4OkCJxIdG6WkJEx8sSKj7elfBB0a5SQg1EQ0SVVMPKhDM6iUIkRR4ZFxsgJl6JQQAh+QQJCgAxACwAAAAADAAMAIVGa4lcfZdjgpxkg51nhp5ui6N3kqh5lKqFnbGHn7KIoLOQp7iRp7mSqLmTqbqarr6br7+fssGitcOitcSuvsuuv8uwwMyzw861xNC5x9K6x9K/zNbDztjE0NnG0drJ1NzQ2eDS2+LT2+LV3ePZ4Oba4ebb4ufc4+jm6+7t8PLt8PPt8fPx8/Xx9PX09vf19/j3+Pn///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGQ8CYcEgsUhQFggFSjCQmnE1jcBhqGBXiIuAQSi7FGEIgfIzCFoCXFCZiPO0hKBMiwl7ET6eUYqlWLkUnISImKC1xbUEAIfkECQoAMgAsAAAAAAwADACFTnKPT3KPVHaTYoKcb4yjcY6leZSpf5mtgZuvh5+yiqG0i6K1jqW3kae5nrHBnrLBn7LCoLPCobTDqbrIqrvIs8LOtMPPtcPPtcTPuMbRucfSvcrUvsvVwMzWxdHaydTcytXdzNbezdff0drh2ODl2+Ln3eTp4Obq4ujs5Ont5uvu6O3w6u7w6u7x7/L09vj5+vr7+vv7////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABkdAmXBILHIcicOCUqxELKKPxKAYgiYd4oMAEWo8RVmjIMScwhmBcJMKXwLCECmMGAhPI1QRwBiaSixCMDFhLSorLi8wYYxCQQAh+QQJCgAxACwAAAAADAAMAIVZepVggJphgZtnhp5vjKN2kah3kqmBmq+KobSLorWNpLaRp7mWq7ybr7+gs8KitcSktsWnuManucexwM2ywc63xtG6yNO9ytS+ytW/zNbDz9jH0tvL1d3N197S2+LU3OPU3ePV3eTX3+Xa4efb4ufd5Onl6u7r7vHs7/Lt8PLw8/Xy9Pby9fb09ff2+Pn3+Pn6+vr///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGSMCYcEgseiwSR+RS7GA4JFGF8RiWNiEiJTERgkjFGAQh/KTCGoJwpApnBkITKrwoCFWnFlEhaAxXLC9CBwAGRS4wQgELYY1CQQAh+QQJCgAzACwAAAAADAAMAIVMcI5SdZFhgZtti6JwjaR4k6mAma6Cm6+KobSLorWLo7WNo7aPpredsMCescGitMOitcSmuMaqu8ixwc2zws63xdC4xtG5x9K9ytXAzdfCztjF0NnF0drK1d3M1t7P2N/P2eDT2+LX3+Xe5Onh5+vi5+vj6Ozk6e3n7O/o7O/q7vHs7/Lt8PPu8fPx8/X3+Pn6+vv7+/v8/Pz///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGRcCZcEgsmkIbTOZTLIlGqZNnchm2SCgiJ6IRqljFmQUiXIVnoITQde4chC9Y+LEQxmTFRkFSNFAqDAMIRQoCAAEEDmeLQQAh+QQJCgAwACwAAAAADAAMAIVXeZRefplff5lhgZtph59yjqV2kaeAmq6FnbGFnrGLorWNpLaQp7mRqLmYrb2essGgs8Klt8apusitvcquv8u2xNC7yNO8ydS8ytTAzdfBzdfM1t7N197Q2eDU3OPX3+XZ4ObZ4ebc4+jf5erg5erg5uvp7fDu8fPv8vTz9fb09vf19/j3+Pn4+fn5+vr6+/v///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGRUCYcEgspkwjEKhUVJ1QsBNp0xm2VixiSOMRvlxFGAcTJook5eEHIhQcwpWIkAFQECkNy9AQWFwyEAkPRQ4FAwQIE2llQQAh+QQJCgAvACwAAAAADAAMAIVNcY5SdZFigptph6BvjKN0kKd8lquAmq+EnbGGn7KHn7ONpLaOpbearr+csMCdscCescGhtMOnuMauvsuzws60w862xdC9ytW/y9a/zNbCztjG0drH0tvK1N3M1t7N19/U3ePb4uff5urj6Ozk6e3l6u7m6u7o7PDq7vDt8PPv8vTw8vTw8/X19vf6+vv///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGQ8CXcEgsvlytVUplJLJIpSEDUESFTELBwSgCCQEV42kjDFiMo4uQsDB2MkLHoEHUTD7DRAHC8VAiZ0QSCgYIDxhNiUEAOw==":
@@ -7776,7 +7777,7 @@ this.update)};var p=Format.prototype.refresh;Format.prototype.refresh=function()
function(a){a=n.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var b=this.editorUi,d=b.editor.graph,f=this.createOption(mxResources.get("shadow"),function(){return d.shadowVisible},function(a){var f=new ChangePageSetup(b);f.ignoreColor=!0;f.ignoreImage=!0;f.shadowVisible=a;d.model.execute(f)},{install:function(a){this.listener=function(){a(d.shadowVisible)};b.addListener("shadowVisibleChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}});
Editor.shadowOptionEnabled||(f.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(f,60));a.appendChild(f)}return a};var d=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(a){a=d.apply(this,arguments);var b=this.editorUi,f=b.editor.graph;if(f.isEnabled()){var c=b.getCurrentFile();null!=c&&c.isAutosaveOptional()&&(c=this.createOption(mxResources.get("autosave"),function(){return b.editor.autosave},function(a){b.editor.setAutosave(a)},
{install:function(a){this.listener=function(){a(b.editor.autosave)};b.editor.addListener("autosaveChanged",this.listener)},destroy:function(){b.editor.removeListener(this.listener)}}),a.appendChild(c))}if(this.isMathOptionVisible()&&f.isEnabled()&&"undefined"!==typeof MathJax){c=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return f.mathEnabled},function(a){b.actions.get("mathematicalTypesetting").funct()},{install:function(a){this.listener=function(){a(f.mathEnabled)};b.addListener("mathEnabledChanged",
-this.listener)},destroy:function(){b.removeListener(this.listener)}});c.style.paddingTop="5px";a.appendChild(c);var k=b.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000032875");k.style.position="relative";k.style.marginLeft="6px";k.style.top="2px";c.appendChild(k)}return a};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(){b.removeListener(this.listener)}});c.style.paddingTop="5px";a.appendChild(c);var m=b.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000032875");m.style.position="relative";m.style.marginLeft="6px";m.style.top="2px";c.appendChild(m)}return a};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"absoluteArcSize",dispName:"Abs. Arc Size",
type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.link.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.flexArrow.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:10},{name:"startWidth",dispName:"Start Width",type:"float",min:0,defVal:20},{name:"endWidth",dispName:"End Width",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.process.prototype.customProperties=[{name:"size",dispName:"Indent",
type:"float",min:0,max:.5,defVal:.1}];mxCellRenderer.defaultShapes.rhombus.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,max:50,defVal:mxConstants.LINE_ARCSIZE},{name:"double",dispName:"Double",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties=[{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left Line",type:"bool",defVal:!0},
{name:"right",dispName:"Right Line",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.parallelogram.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.hexagon.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,
@@ -7797,33 +7798,33 @@ type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.offPageConnector.pro
{fill:"#a20025",stroke:"#6F0000",font:"#ffffff"}],[{fill:"#e51400",stroke:"#B20000",font:"#ffffff"},{fill:"#fa6800",stroke:"#C73500",font:"#ffffff"},{fill:"#f0a30a",stroke:"#BD7000",font:"#ffffff"},{fill:"#e3c800",stroke:"#B09500",font:"#ffffff"},{fill:"#6d8764",stroke:"#3A5431",font:"#ffffff"},{fill:"#647687",stroke:"#314354",font:"#ffffff"},{fill:"#76608a",stroke:"#432D57",font:"#ffffff"},{fill:"#a0522d",stroke:"#6D1F00",font:"#ffffff"}],[null,{fill:mxConstants.NONE,stroke:"#36393d"},{fill:"#fad7ac",
stroke:"#b46504"},{fill:"#fad9d5",stroke:"#ae4132"},{fill:"#b0e3e6",stroke:"#0e8088"},{fill:"#b1ddf0",stroke:"#10739e"},{fill:"#d0cee2",stroke:"#56517e"},{fill:"#bac8d3",stroke:"#23445d"}],[null,{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"}],[null,{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(a,b,d){if(null!=b){var f=function(a){if(null!=a)if(d)for(var f=0;f<a.length;f++)b[a[f].name]=
-a[f];else for(var c in b){for(var k=!1,f=0;f<a.length;f++)if(a[f].name==c&&a[f].type==b[c].type){k=!0;break}k||delete b[c]}},c=this.editorUi.editor.graph.view.getState(a);null!=c&&null!=c.shape&&(c.shape.commonCustomPropAdded||(c.shape.commonCustomPropAdded=!0,c.shape.customProperties=c.shape.customProperties||[],c.cell.vertex?Array.prototype.push.apply(c.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(c.shape.customProperties,Editor.commonEdgeProperties)),f(c.shape.customProperties));
-a=a.getAttribute("customProperties");if(null!=a)try{f(JSON.parse(a))}catch(C){}}};var f=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var a=this.format.createSelectionState();"image"!=a.style.shape&&this.container.appendChild(this.addStyles(this.createPanel()));f.apply(this,arguments);if(Editor.enableCustomProperties){for(var b={},d=a.vertices,c=a.edges,k=0;k<d.length;k++)this.findCommonProperties(d[k],b,0==k);for(k=0;k<c.length;k++)this.findCommonProperties(c[k],b,0==
-d.length&&0==k);0<Object.getOwnPropertyNames(b).length&&this.container.appendChild(this.addProperties(this.createPanel(),b,a))}};var m=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(a){var b=mxUtils.button(mxResources.get("copyStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("copyStyle").funct()}));b.setAttribute("title",mxResources.get("copyStyle")+" ("+this.editorUi.actions.get("copyStyle").shortcut+")");b.style.marginBottom="2px";b.style.width=
+a[f];else for(var c in b){for(var m=!1,f=0;f<a.length;f++)if(a[f].name==c&&a[f].type==b[c].type){m=!0;break}m||delete b[c]}},c=this.editorUi.editor.graph.view.getState(a);null!=c&&null!=c.shape&&(c.shape.commonCustomPropAdded||(c.shape.commonCustomPropAdded=!0,c.shape.customProperties=c.shape.customProperties||[],c.cell.vertex?Array.prototype.push.apply(c.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(c.shape.customProperties,Editor.commonEdgeProperties)),f(c.shape.customProperties));
+a=a.getAttribute("customProperties");if(null!=a)try{f(JSON.parse(a))}catch(C){}}};var f=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var a=this.format.createSelectionState();"image"!=a.style.shape&&this.container.appendChild(this.addStyles(this.createPanel()));f.apply(this,arguments);if(Editor.enableCustomProperties){for(var b={},d=a.vertices,c=a.edges,m=0;m<d.length;m++)this.findCommonProperties(d[m],b,0==m);for(m=0;m<c.length;m++)this.findCommonProperties(c[m],b,0==
+d.length&&0==m);0<Object.getOwnPropertyNames(b).length&&this.container.appendChild(this.addProperties(this.createPanel(),b,a))}};var m=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(a){var b=mxUtils.button(mxResources.get("copyStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("copyStyle").funct()}));b.setAttribute("title",mxResources.get("copyStyle")+" ("+this.editorUi.actions.get("copyStyle").shortcut+")");b.style.marginBottom="2px";b.style.width=
"100px";b.style.marginRight="2px";a.appendChild(b);b=mxUtils.button(mxResources.get("pasteStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("pasteStyle").funct()}));b.setAttribute("title",mxResources.get("pasteStyle")+" ("+this.editorUi.actions.get("pasteStyle").shortcut+")");b.style.marginBottom="2px";b.style.width="100px";a.appendChild(b);mxUtils.br(a);return m.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=function(a,b,d){function f(a,
-b,d,f){u.getModel().beginUpdate();try{var c=[],k=[];if(null!=d.index){for(var m=[],e=d.parentRow.nextSibling;e&&e.getAttribute("data-pName")==a;)m.push(e.getAttribute("data-pValue")),e=e.nextSibling;d.index<m.length?null!=f?m.splice(f,1):m[d.index]=b:m.push(b);null!=d.size&&m.length>d.size&&(m=m.slice(0,d.size));b=m.join(",");null!=d.countProperty&&(u.setCellStyles(d.countProperty,m.length,u.getSelectionCells()),c.push(d.countProperty),k.push(m.length))}u.setCellStyles(a,b,u.getSelectionCells());
-c.push(a);k.push(b);if(null!=d.dependentProps)for(a=0;a<d.dependentProps.length;a++){var q=d.dependentPropsDefVal[a],t=d.dependentPropsVals[a];if(t.length>b)t=t.slice(0,b);else for(var w=t.length;w<b;w++)t.push(q);t=t.join(",");u.setCellStyles(d.dependentProps[a],t,u.getSelectionCells());c.push(d.dependentProps[a]);k.push(t)}g.editorUi.fireEvent(new mxEventObject("styleChanged","keys",c,"values",k,"cells",u.getSelectionCells()))}finally{u.getModel().endUpdate()}}function c(b,d,f){var c=mxUtils.getOffset(a,
-!0),k=mxUtils.getOffset(b,!0);d.style.position="absolute";d.style.left=k.x-c.x+"px";d.style.top=k.y-c.y+"px";d.style.width=b.offsetWidth+"px";d.style.height=b.offsetHeight-(f?4:0)+"px";d.style.zIndex=5}function k(a,b,d){var c=document.createElement("div");c.style.width="32px";c.style.height="4px";c.style.margin="2px";c.style.border="1px solid black";c.style.background=b&&"none"!=b?b:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(g,function(k){this.editorUi.pickColor(b,
-function(b){c.style.background="none"==b?"url('"+Dialog.prototype.noColorImage+"')":b;f(a,b,d)});mxEvent.consume(k)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(c);return btn}function m(a,b,d,c,k,m,e){null!=b&&(b=b.split(","),w.push({name:a,values:b,type:d,defVal:c,countProperty:k,parentRow:m,isDeletable:!0,flipBkg:e}));btn=mxUtils.button("+",mxUtils.bind(g,function(b){for(var q=m,g=0;null!=q.nextSibling;)if(q.nextSibling.getAttribute("data-pName")==
-a)q=q.nextSibling,g++;else break;var u={type:d,parentRow:m,index:g,isDeletable:!0,defVal:c,countProperty:k},g=t(a,"",u,0==g%2,e);f(a,c,u);q.parentNode.insertBefore(g,q.nextSibling);mxEvent.consume(b)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function e(a,b,d,f,c,k,m){if(0<c){var e=Array(c);b=null!=b?b.split(","):[];for(var q=0;q<c;q++)e[q]=null!=b[q]?b[q]:null!=f?f:"";w.push({name:a,values:e,type:d,defVal:f,parentRow:k,flipBkg:m,size:c})}return document.createElement("div")}
-function q(a,b,d){var c=document.createElement("input");c.type="checkbox";c.checked="1"==b;mxEvent.addListener(c,"change",function(){f(a,c.checked?"1":"0",d)});return c}function t(b,d,t,u,w){var h=t.dispName,v=t.type,l=document.createElement("tr");l.className="gePropRow"+(w?"Dark":"")+(u?"Alt":"")+" gePropNonHeaderRow";l.setAttribute("data-pName",b);l.setAttribute("data-pValue",d);u=!1;null!=t.index&&(l.setAttribute("data-index",t.index),h=(null!=h?h:"")+"["+t.index+"]",u=!0);var z=document.createElement("td");
-z.className="gePropRowCell";z.innerHTML=mxUtils.htmlEntities(mxResources.get(h,null,h));u&&(z.style.textAlign="right");l.appendChild(z);z=document.createElement("td");z.className="gePropRowCell";if("color"==v)z.appendChild(k(b,d,t));else if("bool"==v||"boolean"==v)z.appendChild(q(b,d,t));else if("enum"==v){var y=t.enumList;for(w=0;w<y.length;w++)if(h=y[w],h.val==d){z.innerHTML=mxUtils.htmlEntities(mxResources.get(h.dispName,null,h.dispName));break}mxEvent.addListener(z,"click",mxUtils.bind(g,function(){var k=
-document.createElement("select");c(z,k);for(var m=0;m<y.length;m++){var e=y[m],q=document.createElement("option");q.value=mxUtils.htmlEntities(e.val);q.innerHTML=mxUtils.htmlEntities(mxResources.get(e.dispName,null,e.dispName));k.appendChild(q)}k.value=d;a.appendChild(k);mxEvent.addListener(k,"change",function(){var a=mxUtils.htmlEntities(k.value);f(b,a,t)});k.focus();mxEvent.addListener(k,"blur",function(){a.removeChild(k)})}))}else"dynamicArr"==v?z.appendChild(m(b,d,t.subType,t.subDefVal,t.countProperty,
-l,w)):"staticArr"==v?z.appendChild(e(b,d,t.subType,t.subDefVal,t.size,l,w)):(z.innerHTML=d,mxEvent.addListener(z,"click",mxUtils.bind(g,function(){function k(){var a=m.value,a=0==a.length&&"string"!=v?0:a;t.allowAuto&&("auto"==a.trim().toLowerCase()?(a="auto",v="string"):(a=parseFloat(a),a=isNaN(a)?0:a));null!=t.min&&a<t.min?a=t.min:null!=t.max&&a>t.max&&(a=t.max);a=mxUtils.htmlEntities(("int"==v?parseInt(a):a)+"");f(b,a,t)}var m=document.createElement("input");c(z,m,!0);m.value=d;m.className="gePropEditor";
-"int"!=v&&"float"!=v||t.allowAuto||(m.type="number",m.step="int"==v?"1":"any",null!=t.min&&(m.min=parseFloat(t.min)),null!=t.max&&(m.max=parseFloat(t.max)));a.appendChild(m);mxEvent.addListener(m,"keypress",function(a){13==a.keyCode&&k()});m.focus();mxEvent.addListener(m,"blur",function(){k()})})));t.isDeletable&&(w=mxUtils.button("-",mxUtils.bind(g,function(a){f(b,"",t,t.index);mxEvent.consume(a)})),w.style.height="16px",w.style.width="25px",w.style["float"]="right",w.className="geColorBtn",z.appendChild(w));
-l.appendChild(z);return l}var g=this,u=this.editorUi.editor.graph,w=[];a.style.position="relative";a.style.padding="0";var v=document.createElement("table");v.style.whiteSpace="nowrap";v.style.width="100%";var h=document.createElement("tr");h.className="gePropHeader";var l=document.createElement("th");l.className="gePropHeaderCell";var z=document.createElement("img");z.src=Sidebar.prototype.expandedImage;l.appendChild(z);mxUtils.write(l,mxResources.get("property"));h.style.cursor="pointer";var y=
-function(){var b=v.querySelectorAll(".gePropNonHeaderRow"),d;if(g.editorUi.propertiesCollapsed){z.src=Sidebar.prototype.collapsedImage;d="none";for(var f=a.childNodes.length-1;0<=f;f--)try{var c=a.childNodes[f],k=c.nodeName.toUpperCase();"INPUT"!=k&&"SELECT"!=k||a.removeChild(c)}catch(ea){}}else z.src=Sidebar.prototype.expandedImage,d="";for(f=0;f<b.length;f++)b[f].style.display=d};mxEvent.addListener(h,"click",function(){g.editorUi.propertiesCollapsed=!g.editorUi.propertiesCollapsed;y()});h.appendChild(l);
-l=document.createElement("th");l.className="gePropHeaderCell";l.innerHTML=mxResources.get("value");h.appendChild(l);v.appendChild(h);var D=!1,B=!1,p;for(p in b)if(h=b[p],"function"!=typeof h.isVisible||h.isVisible(d)){var n=null!=d.style[p]?mxUtils.htmlEntities(d.style[p]+""):h.defVal;if("separator"==h.type)B=!B;else{if("staticArr"==h.type)h.size=parseInt(d.style[h.sizeProperty]||b[h.sizeProperty].defVal)||0;else if(null!=h.dependentProps){for(var U=h.dependentProps,R=[],O=[],l=0;l<U.length;l++){var V=
-d.style[U[l]];O.push(b[U[l]].subDefVal);R.push(null!=V?V.split(","):[])}h.dependentPropsDefVal=O;h.dependentPropsVals=R}v.appendChild(t(p,n,h,D,B));D=!D}}for(l=0;l<w.length;l++)for(h=w[l],b=h.parentRow,d=0;d<h.values.length;d++)p=t(h.name,h.values[d],{type:h.type,parentRow:h.parentRow,isDeletable:h.isDeletable,index:d,defVal:h.defVal,countProperty:h.countProperty,size:h.size},0==d%2,h.flipBkg),b.parentNode.insertBefore(p,b.nextSibling),b=p;a.appendChild(v);y();return a};StyleFormatPanel.prototype.addStyles=
-function(a){function b(a){function b(a){var b=mxUtils.button("",function(b){f.getModel().beginUpdate();try{var d=f.getSelectionCells();for(b=0;b<d.length;b++){for(var c=f.getModel().getStyle(d[b]),m=0;m<k.length;m++)c=mxUtils.removeStylename(c,k[m]);var e=f.getModel().isVertex(d[b])?f.defaultVertexStyle:f.defaultEdgeStyle;null!=a?(c=mxUtils.setStyle(c,mxConstants.STYLE_FILLCOLOR,a.fill||mxUtils.getValue(e,mxConstants.STYLE_FILLCOLOR,null)),c=mxUtils.setStyle(c,mxConstants.STYLE_STROKECOLOR,a.stroke||
+b,d,f){u.getModel().beginUpdate();try{var c=[],m=[];if(null!=d.index){for(var k=[],e=d.parentRow.nextSibling;e&&e.getAttribute("data-pName")==a;)k.push(e.getAttribute("data-pValue")),e=e.nextSibling;d.index<k.length?null!=f?k.splice(f,1):k[d.index]=b:k.push(b);null!=d.size&&k.length>d.size&&(k=k.slice(0,d.size));b=k.join(",");null!=d.countProperty&&(u.setCellStyles(d.countProperty,k.length,u.getSelectionCells()),c.push(d.countProperty),m.push(k.length))}u.setCellStyles(a,b,u.getSelectionCells());
+c.push(a);m.push(b);if(null!=d.dependentProps)for(a=0;a<d.dependentProps.length;a++){var q=d.dependentPropsDefVal[a],t=d.dependentPropsVals[a];if(t.length>b)t=t.slice(0,b);else for(var w=t.length;w<b;w++)t.push(q);t=t.join(",");u.setCellStyles(d.dependentProps[a],t,u.getSelectionCells());c.push(d.dependentProps[a]);m.push(t)}g.editorUi.fireEvent(new mxEventObject("styleChanged","keys",c,"values",m,"cells",u.getSelectionCells()))}finally{u.getModel().endUpdate()}}function c(b,d,f){var c=mxUtils.getOffset(a,
+!0),m=mxUtils.getOffset(b,!0);d.style.position="absolute";d.style.left=m.x-c.x+"px";d.style.top=m.y-c.y+"px";d.style.width=b.offsetWidth+"px";d.style.height=b.offsetHeight-(f?4:0)+"px";d.style.zIndex=5}function m(a,b,d){var c=document.createElement("div");c.style.width="32px";c.style.height="4px";c.style.margin="2px";c.style.border="1px solid black";c.style.background=b&&"none"!=b?b:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(g,function(m){this.editorUi.pickColor(b,
+function(b){c.style.background="none"==b?"url('"+Dialog.prototype.noColorImage+"')":b;f(a,b,d)});mxEvent.consume(m)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(c);return btn}function k(a,b,d,c,m,k,e){null!=b&&(b=b.split(","),w.push({name:a,values:b,type:d,defVal:c,countProperty:m,parentRow:k,isDeletable:!0,flipBkg:e}));btn=mxUtils.button("+",mxUtils.bind(g,function(b){for(var q=k,g=0;null!=q.nextSibling;)if(q.nextSibling.getAttribute("data-pName")==
+a)q=q.nextSibling,g++;else break;var u={type:d,parentRow:k,index:g,isDeletable:!0,defVal:c,countProperty:m},g=t(a,"",u,0==g%2,e);f(a,c,u);q.parentNode.insertBefore(g,q.nextSibling);mxEvent.consume(b)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function e(a,b,d,f,c,m,k){if(0<c){var e=Array(c);b=null!=b?b.split(","):[];for(var q=0;q<c;q++)e[q]=null!=b[q]?b[q]:null!=f?f:"";w.push({name:a,values:e,type:d,defVal:f,parentRow:m,flipBkg:k,size:c})}return document.createElement("div")}
+function q(a,b,d){var c=document.createElement("input");c.type="checkbox";c.checked="1"==b;mxEvent.addListener(c,"change",function(){f(a,c.checked?"1":"0",d)});return c}function t(b,d,t,u,w){var h=t.dispName,v=t.type,z=document.createElement("tr");z.className="gePropRow"+(w?"Dark":"")+(u?"Alt":"")+" gePropNonHeaderRow";z.setAttribute("data-pName",b);z.setAttribute("data-pValue",d);u=!1;null!=t.index&&(z.setAttribute("data-index",t.index),h=(null!=h?h:"")+"["+t.index+"]",u=!0);var l=document.createElement("td");
+l.className="gePropRowCell";l.innerHTML=mxUtils.htmlEntities(mxResources.get(h,null,h));u&&(l.style.textAlign="right");z.appendChild(l);l=document.createElement("td");l.className="gePropRowCell";if("color"==v)l.appendChild(m(b,d,t));else if("bool"==v||"boolean"==v)l.appendChild(q(b,d,t));else if("enum"==v){var y=t.enumList;for(w=0;w<y.length;w++)if(h=y[w],h.val==d){l.innerHTML=mxUtils.htmlEntities(mxResources.get(h.dispName,null,h.dispName));break}mxEvent.addListener(l,"click",mxUtils.bind(g,function(){var m=
+document.createElement("select");c(l,m);for(var k=0;k<y.length;k++){var e=y[k],q=document.createElement("option");q.value=mxUtils.htmlEntities(e.val);q.innerHTML=mxUtils.htmlEntities(mxResources.get(e.dispName,null,e.dispName));m.appendChild(q)}m.value=d;a.appendChild(m);mxEvent.addListener(m,"change",function(){var a=mxUtils.htmlEntities(m.value);f(b,a,t)});m.focus();mxEvent.addListener(m,"blur",function(){a.removeChild(m)})}))}else"dynamicArr"==v?l.appendChild(k(b,d,t.subType,t.subDefVal,t.countProperty,
+z,w)):"staticArr"==v?l.appendChild(e(b,d,t.subType,t.subDefVal,t.size,z,w)):(l.innerHTML=d,mxEvent.addListener(l,"click",mxUtils.bind(g,function(){function m(){var a=k.value,a=0==a.length&&"string"!=v?0:a;t.allowAuto&&("auto"==a.trim().toLowerCase()?(a="auto",v="string"):(a=parseFloat(a),a=isNaN(a)?0:a));null!=t.min&&a<t.min?a=t.min:null!=t.max&&a>t.max&&(a=t.max);a=mxUtils.htmlEntities(("int"==v?parseInt(a):a)+"");f(b,a,t)}var k=document.createElement("input");c(l,k,!0);k.value=d;k.className="gePropEditor";
+"int"!=v&&"float"!=v||t.allowAuto||(k.type="number",k.step="int"==v?"1":"any",null!=t.min&&(k.min=parseFloat(t.min)),null!=t.max&&(k.max=parseFloat(t.max)));a.appendChild(k);mxEvent.addListener(k,"keypress",function(a){13==a.keyCode&&m()});k.focus();mxEvent.addListener(k,"blur",function(){m()})})));t.isDeletable&&(w=mxUtils.button("-",mxUtils.bind(g,function(a){f(b,"",t,t.index);mxEvent.consume(a)})),w.style.height="16px",w.style.width="25px",w.style["float"]="right",w.className="geColorBtn",l.appendChild(w));
+z.appendChild(l);return z}var g=this,u=this.editorUi.editor.graph,w=[];a.style.position="relative";a.style.padding="0";var v=document.createElement("table");v.style.whiteSpace="nowrap";v.style.width="100%";var h=document.createElement("tr");h.className="gePropHeader";var z=document.createElement("th");z.className="gePropHeaderCell";var l=document.createElement("img");l.src=Sidebar.prototype.expandedImage;z.appendChild(l);mxUtils.write(z,mxResources.get("property"));h.style.cursor="pointer";var y=
+function(){var b=v.querySelectorAll(".gePropNonHeaderRow"),d;if(g.editorUi.propertiesCollapsed){l.src=Sidebar.prototype.collapsedImage;d="none";for(var f=a.childNodes.length-1;0<=f;f--)try{var c=a.childNodes[f],m=c.nodeName.toUpperCase();"INPUT"!=m&&"SELECT"!=m||a.removeChild(c)}catch(fa){}}else l.src=Sidebar.prototype.expandedImage,d="";for(f=0;f<b.length;f++)b[f].style.display=d};mxEvent.addListener(h,"click",function(){g.editorUi.propertiesCollapsed=!g.editorUi.propertiesCollapsed;y()});h.appendChild(z);
+z=document.createElement("th");z.className="gePropHeaderCell";z.innerHTML=mxResources.get("value");h.appendChild(z);v.appendChild(h);var D=!1,B=!1,p;for(p in b)if(h=b[p],"function"!=typeof h.isVisible||h.isVisible(d)){var n=null!=d.style[p]?mxUtils.htmlEntities(d.style[p]+""):h.defVal;if("separator"==h.type)B=!B;else{if("staticArr"==h.type)h.size=parseInt(d.style[h.sizeProperty]||b[h.sizeProperty].defVal)||0;else if(null!=h.dependentProps){for(var U=h.dependentProps,O=[],P=[],z=0;z<U.length;z++){var V=
+d.style[U[z]];P.push(b[U[z]].subDefVal);O.push(null!=V?V.split(","):[])}h.dependentPropsDefVal=P;h.dependentPropsVals=O}v.appendChild(t(p,n,h,D,B));D=!D}}for(z=0;z<w.length;z++)for(h=w[z],b=h.parentRow,d=0;d<h.values.length;d++)p=t(h.name,h.values[d],{type:h.type,parentRow:h.parentRow,isDeletable:h.isDeletable,index:d,defVal:h.defVal,countProperty:h.countProperty,size:h.size},0==d%2,h.flipBkg),b.parentNode.insertBefore(p,b.nextSibling),b=p;a.appendChild(v);y();return a};StyleFormatPanel.prototype.addStyles=
+function(a){function b(a){function b(a){var b=mxUtils.button("",function(b){f.getModel().beginUpdate();try{var d=f.getSelectionCells();for(b=0;b<d.length;b++){for(var c=f.getModel().getStyle(d[b]),k=0;k<m.length;k++)c=mxUtils.removeStylename(c,m[k]);var e=f.getModel().isVertex(d[b])?f.defaultVertexStyle:f.defaultEdgeStyle;null!=a?(c=mxUtils.setStyle(c,mxConstants.STYLE_FILLCOLOR,a.fill||mxUtils.getValue(e,mxConstants.STYLE_FILLCOLOR,null)),c=mxUtils.setStyle(c,mxConstants.STYLE_STROKECOLOR,a.stroke||
mxUtils.getValue(e,mxConstants.STYLE_STROKECOLOR,null)),c=mxUtils.setStyle(c,mxConstants.STYLE_GRADIENTCOLOR,a.gradient||mxUtils.getValue(e,mxConstants.STYLE_GRADIENTCOLOR,null)),f.getModel().isVertex(d[b])&&(c=mxUtils.setStyle(c,mxConstants.STYLE_FONTCOLOR,a.font||mxUtils.getValue(e,mxConstants.STYLE_FONTCOLOR,null)))):(c=mxUtils.setStyle(c,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(e,mxConstants.STYLE_FILLCOLOR,"#ffffff")),c=mxUtils.setStyle(c,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(e,
mxConstants.STYLE_STROKECOLOR,"#000000")),c=mxUtils.setStyle(c,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(e,mxConstants.STYLE_GRADIENTCOLOR,null)),f.getModel().isVertex(d[b])&&(c=mxUtils.setStyle(c,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(e,mxConstants.STYLE_FONTCOLOR,null))));f.getModel().setStyle(d[b],c)}}finally{f.getModel().endUpdate()}});b.className="geStyleButton";b.style.width="36px";b.style.height="30px";b.style.margin="0px 6px 6px 0px";if(null!=a)null!=a.gradient?mxClient.IS_IE&&
(mxClient.IS_QUIRKS||10>document.documentMode)?b.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+a.fill+"', EndColorStr='"+a.gradient+"', GradientType=0)":b.style.backgroundImage="linear-gradient("+a.fill+" 0px,"+a.gradient+" 100%)":a.fill==mxConstants.NONE?b.style.background="url('"+Dialog.prototype.noColorImage+"')":b.style.backgroundColor=a.fill||mxUtils.getValue(f.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff"),b.style.border="1px solid "+(a.stroke||mxUtils.getValue(f.defaultVertexStyle,
-mxConstants.STYLE_STROKECOLOR,"#000000"));else{var d=mxUtils.getValue(f.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff"),m=mxUtils.getValue(f.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");b.style.backgroundColor=d;b.style.border="1px solid "+m}c.appendChild(b)}c.innerHTML="";for(var d=0;d<a.length;d++)0<d&&0==mxUtils.mod(d,4)&&mxUtils.br(c),b(a[d])}function d(a){mxEvent.addListener(a,"mouseenter",function(){a.style.opacity="1"});mxEvent.addListener(a,"mouseleave",function(){a.style.opacity=
-"0.5"})}var f=this.editorUi.editor.graph,c=document.createElement("div");c.style.whiteSpace="nowrap";c.style.paddingLeft="24px";c.style.paddingRight="20px";a.style.paddingLeft="16px";a.style.paddingBottom="6px";a.style.position="relative";a.appendChild(c);var k="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" ");null==this.editorUi.currentScheme&&(this.editorUi.currentScheme=
-0);var m=document.createElement("div");m.style.cssText="position:absolute;left:10px;top:8px;bottom:8px;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(m,
+mxConstants.STYLE_STROKECOLOR,"#000000"));else{var d=mxUtils.getValue(f.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff"),k=mxUtils.getValue(f.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");b.style.backgroundColor=d;b.style.border="1px solid "+k}c.appendChild(b)}c.innerHTML="";for(var d=0;d<a.length;d++)0<d&&0==mxUtils.mod(d,4)&&mxUtils.br(c),b(a[d])}function d(a){mxEvent.addListener(a,"mouseenter",function(){a.style.opacity="1"});mxEvent.addListener(a,"mouseleave",function(){a.style.opacity=
+"0.5"})}var f=this.editorUi.editor.graph,c=document.createElement("div");c.style.whiteSpace="nowrap";c.style.paddingLeft="24px";c.style.paddingRight="20px";a.style.paddingLeft="16px";a.style.paddingBottom="6px";a.style.position="relative";a.appendChild(c);var m="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" ");null==this.editorUi.currentScheme&&(this.editorUi.currentScheme=
+0);var k=document.createElement("div");k.style.cssText="position:absolute;left:10px;top:8px;bottom:8px;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(k,
"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme-1,this.defaultColorSchemes.length);b(this.defaultColorSchemes[this.editorUi.currentScheme])}));var e=document.createElement("div");e.style.cssText="position:absolute;left:202px;top:8px;bottom:8px;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&&(a.appendChild(m),a.appendChild(e));mxEvent.addListener(e,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme+1,this.defaultColorSchemes.length);b(this.defaultColorSchemes[this.editorUi.currentScheme])}));d(m);d(e);b(this.defaultColorSchemes[this.editorUi.currentScheme]);return a};StyleFormatPanel.prototype.addEditOps=function(a){var b=this.format.getSelectionState(),d=null;1==this.editorUi.editor.graph.getSelectionCount()&&
+1<this.defaultColorSchemes.length&&(a.appendChild(k),a.appendChild(e));mxEvent.addListener(e,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme+1,this.defaultColorSchemes.length);b(this.defaultColorSchemes[this.editorUi.currentScheme])}));d(k);d(e);b(this.defaultColorSchemes[this.editorUi.currentScheme]);return a};StyleFormatPanel.prototype.addEditOps=function(a){var b=this.format.getSelectionState(),d=null;1==this.editorUi.editor.graph.getSelectionCount()&&
(d=mxUtils.button(mxResources.get("editStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("editStyle").funct()})),d.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),d.style.width="202px",d.style.marginBottom="2px",a.appendChild(d));var f=this.editorUi.editor.graph,c=f.view.getState(f.getSelectionCell());1==f.getSelectionCount()&&null!=c&&null!=c.shape&&null!=c.shape.stencil?(b=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,
function(a){this.editorUi.actions.get("editShape").funct()})),b.setAttribute("title",mxResources.get("editShape")),b.style.marginBottom="2px",null==d?b.style.width="202px":(d.style.width="100px",b.style.width="100px",b.style.marginLeft="2px"),a.appendChild(b)):b.image&&(b=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(a){this.editorUi.actions.get("image").funct()})),b.setAttribute("title",mxResources.get("editImage")),b.style.marginBottom="2px",null==d?b.style.width="202px":
(d.style.width="100px",b.style.width="100px",b.style.marginLeft="2px"),a.appendChild(b));return a}}Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize=
@@ -7837,13 +7838,13 @@ this.graph.container.firstChild==this.webKitForceRepaintNode)||(null!=this.webKi
function(){y.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(a){if("data:action/json,"==a.substring(0,17)&&(a=JSON.parse(a.substring(17)),null!=a.actions)){for(var b=0;b<a.actions.length;b++)if(null!=a.actions[b].open)if(this.isCustomLink(a.actions[b].open)){if(!this.customLinkClicked(a.actions[b].open))return}else this.openLink(a.actions[b].open);this.model.beginUpdate();try{for(b=0;b<a.actions.length;b++)this.handleLinkAction(a.actions[b])}finally{this.model.endUpdate()}}};
Graph.prototype.handleLinkAction=function(a){var b=[];null!=a.select&&this.isEnabled()&&(b=this.getCellsForAction(a.select),this.setSelectionCells(b));null!=a.highlight&&(b=this.getCellsForAction(a.highlight),this.highlightCells(b,a.highlight.color,a.highlight.duration,a.highlight.opacity));null!=a.toggle&&this.toggleCells(this.getCellsForAction(a.toggle));null!=a.show&&this.setCellsVisible(this.getCellsForAction(a.show),!0);null!=a.hide&&this.setCellsVisible(this.getCellsForAction(a.hide),!1);null!=
a.scroll&&(b=this.getCellsForAction(a.scroll));0<b.length&&this.scrollCellToVisible(b[0])};Graph.prototype.getCellsForAction=function(a){return this.getCellsById(a.cells).concat(this.getCellsForTags(a.tags))};Graph.prototype.getCellsById=function(a){var b=[];if(null!=a)for(var d=0;d<a.length;d++)if("*"==a[d])var f=this.getDefaultParent(),b=b.concat(this.model.filterDescendants(function(a){return a!=f},f));else{var c=this.model.getCell(a[d]);null!=c&&b.push(c)}return b};Graph.prototype.getCellsForTags=
-function(a,b,d){var f=[];if(null!=a){b=null!=b?b:this.model.getDescendants(this.model.getRoot());d=null!=d?d:"tags";for(var c=0;c<b.length;c++)if(this.model.isVertex(b[c])||this.model.isEdge(b[c])){var k=null!=b[c].value&&"object"==typeof b[c].value?mxUtils.trim(b[c].value.getAttribute(d)||""):"",m=!0;if(0<k.length)for(var k=k.toLowerCase().split(" "),e=0;e<a.length&&m;e++)var q=mxUtils.trim(a[e]).toLowerCase(),m=m&&(0==q.length||0<=mxUtils.indexOf(k,q));else m=0==a.length;m&&f.push(b[c])}}return f};
+function(a,b,d){var f=[];if(null!=a){b=null!=b?b:this.model.getDescendants(this.model.getRoot());d=null!=d?d:"tags";for(var c=0;c<b.length;c++)if(this.model.isVertex(b[c])||this.model.isEdge(b[c])){var m=null!=b[c].value&&"object"==typeof b[c].value?mxUtils.trim(b[c].value.getAttribute(d)||""):"",k=!0;if(0<m.length)for(var m=m.toLowerCase().split(" "),e=0;e<a.length&&k;e++)var q=mxUtils.trim(a[e]).toLowerCase(),k=k&&(0==q.length||0<=mxUtils.indexOf(m,q));else k=0==a.length;k&&f.push(b[c])}}return f};
Graph.prototype.toggleCells=function(a){this.model.beginUpdate();try{for(var b=0;b<a.length;b++)this.model.setVisible(a[b],!this.model.isVisible(a[b]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(a,b){this.model.beginUpdate();try{for(var d=0;d<a.length;d++)this.model.setVisible(a[d],b)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(a,b,d,f){for(var c=0;c<a.length;c++)this.highlightCell(a[c],b,d,f)};Graph.prototype.highlightCell=function(a,b,
-d,f){b=null!=b?b:mxConstants.DEFAULT_VALID_COLOR;d=null!=d?d:1E3;a=this.view.getState(a);if(null!=a){var c=Math.max(5,mxUtils.getValue(a.style,mxConstants.STYLE_STROKEWIDTH,1)+4),k=new mxCellHighlight(this,b,c,!1);null!=f&&(k.opacity=f);k.highlight(a);window.setTimeout(function(){null!=k.shape&&(mxUtils.setPrefixedStyle(k.shape.node.style,"transition","all 1200ms ease-in-out"),k.shape.node.style.opacity=0);window.setTimeout(function(){k.destroy()},1200)},d)}};Graph.prototype.addSvgShadow=function(a,
-b,d){d=null!=d?d:!1;var f=a.ownerDocument,c=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"filter"):f.createElement("filter");c.setAttribute("id",this.shadowId);var k=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):f.createElement("feGaussianBlur");k.setAttribute("in","SourceAlpha");k.setAttribute("stdDeviation",this.svgShadowBlur);k.setAttribute("result","blur");c.appendChild(k);k=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feOffset"):
-f.createElement("feOffset");k.setAttribute("in","blur");k.setAttribute("dx",this.svgShadowSize);k.setAttribute("dy",this.svgShadowSize);k.setAttribute("result","offsetBlur");c.appendChild(k);k=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feFlood"):f.createElement("feFlood");k.setAttribute("flood-color",this.svgShadowColor);k.setAttribute("flood-opacity",this.svgShadowOpacity);k.setAttribute("result","offsetColor");c.appendChild(k);k=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,
-"feComposite"):f.createElement("feComposite");k.setAttribute("in","offsetColor");k.setAttribute("in2","offsetBlur");k.setAttribute("operator","in");k.setAttribute("result","offsetBlur");c.appendChild(k);k=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feBlend"):f.createElement("feBlend");k.setAttribute("in","SourceGraphic");k.setAttribute("in2","offsetBlur");c.appendChild(k);k=a.getElementsByTagName("defs");0==k.length?(f=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,
-"defs"):f.createElement("defs"),null!=a.firstChild?a.insertBefore(f,a.firstChild):a.appendChild(f)):f=k[0];f.appendChild(c);d||((b||a.getElementsByTagName("g")[0]).setAttribute("filter","url(#"+this.shadowId+")"),isNaN(parseInt(a.getAttribute("width")))||(a.setAttribute("width",parseInt(a.getAttribute("width"))+6),a.setAttribute("height",parseInt(a.getAttribute("height"))+6)));return c};Graph.prototype.setShadowVisible=function(a,b){mxClient.IS_SVG&&(b=null!=b?b:!0,(this.shadowVisible=a)?this.view.getDrawPane().setAttribute("filter",
+d,f){b=null!=b?b:mxConstants.DEFAULT_VALID_COLOR;d=null!=d?d:1E3;a=this.view.getState(a);if(null!=a){var c=Math.max(5,mxUtils.getValue(a.style,mxConstants.STYLE_STROKEWIDTH,1)+4),m=new mxCellHighlight(this,b,c,!1);null!=f&&(m.opacity=f);m.highlight(a);window.setTimeout(function(){null!=m.shape&&(mxUtils.setPrefixedStyle(m.shape.node.style,"transition","all 1200ms ease-in-out"),m.shape.node.style.opacity=0);window.setTimeout(function(){m.destroy()},1200)},d)}};Graph.prototype.addSvgShadow=function(a,
+b,d){d=null!=d?d:!1;var f=a.ownerDocument,c=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"filter"):f.createElement("filter");c.setAttribute("id",this.shadowId);var m=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):f.createElement("feGaussianBlur");m.setAttribute("in","SourceAlpha");m.setAttribute("stdDeviation",this.svgShadowBlur);m.setAttribute("result","blur");c.appendChild(m);m=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feOffset"):
+f.createElement("feOffset");m.setAttribute("in","blur");m.setAttribute("dx",this.svgShadowSize);m.setAttribute("dy",this.svgShadowSize);m.setAttribute("result","offsetBlur");c.appendChild(m);m=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feFlood"):f.createElement("feFlood");m.setAttribute("flood-color",this.svgShadowColor);m.setAttribute("flood-opacity",this.svgShadowOpacity);m.setAttribute("result","offsetColor");c.appendChild(m);m=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,
+"feComposite"):f.createElement("feComposite");m.setAttribute("in","offsetColor");m.setAttribute("in2","offsetBlur");m.setAttribute("operator","in");m.setAttribute("result","offsetBlur");c.appendChild(m);m=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feBlend"):f.createElement("feBlend");m.setAttribute("in","SourceGraphic");m.setAttribute("in2","offsetBlur");c.appendChild(m);m=a.getElementsByTagName("defs");0==m.length?(f=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,
+"defs"):f.createElement("defs"),null!=a.firstChild?a.insertBefore(f,a.firstChild):a.appendChild(f)):f=m[0];f.appendChild(c);d||((b||a.getElementsByTagName("g")[0]).setAttribute("filter","url(#"+this.shadowId+")"),isNaN(parseInt(a.getAttribute("width")))||(a.setAttribute("width",parseInt(a.getAttribute("width"))+6),a.setAttribute("height",parseInt(a.getAttribute("height"))+6)));return c};Graph.prototype.setShadowVisible=function(a,b){mxClient.IS_SVG&&(b=null!=b?b:!0,(this.shadowVisible=a)?this.view.getDrawPane().setAttribute("filter",
"url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),b&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var a=this.model.getChildCount(this.model.root),b,d=0;do b=this.model.getChildAt(this.model.root,d);while(d++<a&&"1"==mxUtils.getValue(this.getCellStyle(b),"locked","0"));null!=b&&this.setDefaultParent(b)}};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+"/bpmn/mxBpmnShape2.js",STENCIL_PATH+"/bpmn.xml"];mxStencilRegistry.libraries.dfd=[SHAPES_PATH+"/mxDFD.js"];mxStencilRegistry.libraries.er=[SHAPES_PATH+"/er/mxER.js"];mxStencilRegistry.libraries.flowchart=[SHAPES_PATH+"/mxFlowchart.js",STENCIL_PATH+"/flowchart.xml"];mxStencilRegistry.libraries.ios=
[SHAPES_PATH+"/mockup/mxMockupiOS.js"];mxStencilRegistry.libraries.rackGeneral=[SHAPES_PATH+"/rack/mxRack.js",STENCIL_PATH+"/rack/general.xml"];mxStencilRegistry.libraries.rackF5=[STENCIL_PATH+"/rack/f5.xml"];mxStencilRegistry.libraries.lean_mapping=[SHAPES_PATH+"/mxLeanMap.js",STENCIL_PATH+"/lean_mapping.xml"];mxStencilRegistry.libraries.basic=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/basic.xml"];mxStencilRegistry.libraries.ios7icons=[STENCIL_PATH+"/ios7/icons.xml"];mxStencilRegistry.libraries.ios7ui=
@@ -7853,29 +7854,29 @@ mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegist
STENCIL_PATH+"/gcp2.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.veeam=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam.xml"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=
[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(a){var b=null;null!=a&&0<a.length&&("ER"==a.substring(0,2)?b="mxgraph.er":"sysML"==a.substring(0,5)&&(b="mxgraph.sysml"));return b};var k=mxMarker.createMarker;mxMarker.createMarker=function(a,b,d,f,c,m,e,q,t,g){if(null!=d&&null==mxMarker.markers[d]){var u=this.getPackageForType(d);null!=u&&mxStencilRegistry.getStencil(u)}return k.apply(this,arguments)};
-PrintDialog.prototype.create=function(a,b){function d(){h.value=Math.max(1,Math.min(e,Math.max(parseInt(h.value),parseInt(w.value))));w.value=Math.max(1,Math.min(e,Math.min(parseInt(h.value),parseInt(w.value))))}function f(b){function d(b,d,c){var k=b.getGraphBounds(),m=0,e=0,q=da.get(),t=1/b.pageScale,g=p.checked;if(g)var t=parseInt(X.value),u=parseInt(W.value),t=Math.min(q.height*u/(k.height/b.view.scale),q.width*t/(k.width/b.view.scale));else t=parseInt(y.value)/(100*b.pageScale),isNaN(t)&&(f=
-1/b.pageScale,y.value="100 %");q=mxRectangle.fromRectangle(q);q.width=Math.ceil(q.width*f);q.height=Math.ceil(q.height*f);t*=f;!g&&b.pageVisible?(k=b.getPageLayout(),m-=k.x*q.width,e-=k.y*q.height):g=!0;if(null==d){d=PrintDialog.createPrintPreview(b,t,q,0,m,e,g);d.pageSelector=!1;d.mathEnabled=!1;b=a.getCurrentFile();null!=b&&(d.title=b.getTitle());var w=d.writeHead;d.writeHead=function(b){w.apply(this,arguments);null!=a.editor.fontCss&&(b.writeln('<style type="text/css">'),b.writeln(a.editor.fontCss),
-b.writeln("</style>"))};if("undefined"!==typeof MathJax){var v=d.renderPage;d.renderPage=function(a,b,d,f,c,k){var m=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;var e=v.apply(this,arguments);mxClient.NO_FO=m;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:e.className="geDisableMathJax";return e}}d.open(null,null,c,!0)}else{q=b.background;if(null==q||""==q||q==mxConstants.NONE)q="#ffffff";d.backgroundColor=q;d.autoOrigin=
-g;d.appendGraph(b,t,m,e,c,!0)}return d}var f=parseInt(ba.value)/100;isNaN(f)&&(f=1,ba.value="100 %");var f=.75*f,k=w.value,m=h.value,e=!g.checked,t=null;e&&(e=k==q&&m==q);if(!e&&null!=a.pages&&a.pages.length){var u=0,e=a.pages.length-1;g.checked||(u=parseInt(k)-1,e=parseInt(m)-1);for(var v=u;v<=e;v++){var l=a.pages[v],k=l==a.currentPage?c:null;if(null==k){var k=a.createTemporaryGraph(c.getStylesheet()),m=!0,u=!1,z=null,n=null;null==l.viewState&&null==l.root&&a.updatePageRoot(l);null!=l.viewState&&
-(m=l.viewState.pageVisible,u=l.viewState.mathEnabled,z=l.viewState.background,n=l.viewState.backgroundImage);k.background=z;k.backgroundImage=null!=n?new mxImage(n.src,n.width,n.height):null;k.pageVisible=m;k.mathEnabled=u;var D=k.getGlobalVariable;k.getGlobalVariable=function(a){return"page"==a?l.getName():"pagenumber"==a?v+1:D.apply(this,arguments)};document.body.appendChild(k.container);a.updatePageRoot(l);k.model.setRoot(l.root)}t=d(k,t,v!=e);k!=c&&k.container.parentNode.removeChild(k.container)}}else t=
+PrintDialog.prototype.create=function(a,b){function d(){h.value=Math.max(1,Math.min(e,Math.max(parseInt(h.value),parseInt(w.value))));w.value=Math.max(1,Math.min(e,Math.min(parseInt(h.value),parseInt(w.value))))}function f(b){function d(b,d,c){var m=b.getGraphBounds(),k=0,e=0,q=W.get(),t=1/b.pageScale,g=p.checked;if(g)var t=parseInt(J.value),u=parseInt(ca.value),t=Math.min(q.height*u/(m.height/b.view.scale),q.width*t/(m.width/b.view.scale));else t=parseInt(y.value)/(100*b.pageScale),isNaN(t)&&(f=
+1/b.pageScale,y.value="100 %");q=mxRectangle.fromRectangle(q);q.width=Math.ceil(q.width*f);q.height=Math.ceil(q.height*f);t*=f;!g&&b.pageVisible?(m=b.getPageLayout(),k-=m.x*q.width,e-=m.y*q.height):g=!0;if(null==d){d=PrintDialog.createPrintPreview(b,t,q,0,k,e,g);d.pageSelector=!1;d.mathEnabled=!1;b=a.getCurrentFile();null!=b&&(d.title=b.getTitle());var w=d.writeHead;d.writeHead=function(b){w.apply(this,arguments);null!=a.editor.fontCss&&(b.writeln('<style type="text/css">'),b.writeln(a.editor.fontCss),
+b.writeln("</style>"))};if("undefined"!==typeof MathJax){var v=d.renderPage;d.renderPage=function(a,b,d,f,c,m){var k=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;var e=v.apply(this,arguments);mxClient.NO_FO=k;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:e.className="geDisableMathJax";return e}}d.open(null,null,c,!0)}else{q=b.background;if(null==q||""==q||q==mxConstants.NONE)q="#ffffff";d.backgroundColor=q;d.autoOrigin=
+g;d.appendGraph(b,t,k,e,c,!0)}return d}var f=parseInt(da.value)/100;isNaN(f)&&(f=1,da.value="100 %");var f=.75*f,m=w.value,k=h.value,e=!g.checked,t=null;e&&(e=m==q&&k==q);if(!e&&null!=a.pages&&a.pages.length){var u=0,e=a.pages.length-1;g.checked||(u=parseInt(m)-1,e=parseInt(k)-1);for(var v=u;v<=e;v++){var l=a.pages[v],m=l==a.currentPage?c:null;if(null==m){var m=a.createTemporaryGraph(c.getStylesheet()),k=!0,u=!1,z=null,n=null;null==l.viewState&&null==l.root&&a.updatePageRoot(l);null!=l.viewState&&
+(k=l.viewState.pageVisible,u=l.viewState.mathEnabled,z=l.viewState.background,n=l.viewState.backgroundImage);m.background=z;m.backgroundImage=null!=n?new mxImage(n.src,n.width,n.height):null;m.pageVisible=k;m.mathEnabled=u;var D=m.getGlobalVariable;m.getGlobalVariable=function(a){return"page"==a?l.getName():"pagenumber"==a?v+1:D.apply(this,arguments)};document.body.appendChild(m.container);a.updatePageRoot(l);m.model.setRoot(l.root)}t=d(m,t,v!=e);m!=c&&m.container.parentNode.removeChild(m.container)}}else t=
d(c);t.mathEnabled&&(e=t.wnd.document,e.writeln('<script type="text/x-mathjax-config">'),e.writeln("MathJax.Hub.Config({"),e.writeln("showMathMenu: false,"),e.writeln('messageStyle: "none",'),e.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],'),e.writeln('extensions: ["tex2jax.js", "mml2jax.js", "asciimath2jax.js"],'),e.writeln('"HTML-CSS": {'),e.writeln("imageFont: null"),e.writeln("},"),e.writeln("TeX: {"),e.writeln('extensions: ["AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js"]'),
e.writeln("},"),e.writeln("tex2jax: {"),e.writeln('\tignoreClass: "geDisableMathJax"'),e.writeln("},"),e.writeln("asciimath2jax: {"),e.writeln('\tignoreClass: "geDisableMathJax"'),e.writeln("}"),e.writeln("});"),b&&(e.writeln("MathJax.Hub.Queue(function () {"),e.writeln("window.print();"),e.writeln("});")),e.writeln("\x3c/script>"),e.writeln('<script type="text/javascript" src="https://math.draw.io/current/MathJax.js">\x3c/script>'));t.closeDocument();!t.mathEnabled&&b&&PrintDialog.printPreview(t)}
-var c=a.editor.graph,k=document.createElement("div"),m=document.createElement("h3");m.style.width="100%";m.style.textAlign="center";m.style.marginTop="0px";mxUtils.write(m,b||mxResources.get("print"));k.appendChild(m);var e=1,q=1,t=document.createElement("div");t.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var g=document.createElement("input");g.style.cssText="margin-right:8px;margin-bottom:8px;";g.setAttribute("value","all");g.setAttribute("type","radio");
-g.setAttribute("name","pages-printdialog");t.appendChild(g);m=document.createElement("span");mxUtils.write(m,mxResources.get("printAllPages"));t.appendChild(m);mxUtils.br(t);var u=g.cloneNode(!0);g.setAttribute("checked","checked");u.setAttribute("value","range");t.appendChild(u);m=document.createElement("span");mxUtils.write(m,mxResources.get("pages")+":");t.appendChild(m);var w=document.createElement("input");w.style.cssText="margin:0 8px 0 8px;";w.setAttribute("value","1");w.setAttribute("type",
-"number");w.setAttribute("min","1");w.style.width="50px";t.appendChild(w);m=document.createElement("span");mxUtils.write(m,mxResources.get("to"));t.appendChild(m);var h=w.cloneNode(!0);t.appendChild(h);mxEvent.addListener(w,"focus",function(){u.checked=!0});mxEvent.addListener(h,"focus",function(){u.checked=!0});mxEvent.addListener(w,"change",d);mxEvent.addListener(h,"change",d);if(null!=a.pages&&(e=a.pages.length,null!=a.currentPage))for(m=0;m<a.pages.length;m++)if(a.currentPage==a.pages[m]){q=m+
-1;w.value=q;h.value=q;break}w.setAttribute("max",e);h.setAttribute("max",e);1<e&&k.appendChild(t);var v=document.createElement("div");v.style.marginBottom="10px";var l=document.createElement("input");l.style.marginRight="8px";l.setAttribute("value","adjust");l.setAttribute("type","radio");l.setAttribute("name","printZoom");v.appendChild(l);m=document.createElement("span");mxUtils.write(m,mxResources.get("adjustTo"));v.appendChild(m);var y=document.createElement("input");y.style.cssText="margin:0 8px 0 8px;";
-y.setAttribute("value","100 %");y.style.width="50px";v.appendChild(y);mxEvent.addListener(y,"focus",function(){l.checked=!0});k.appendChild(v);var t=t.cloneNode(!1),p=l.cloneNode(!0);p.setAttribute("value","fit");l.setAttribute("checked","checked");m=document.createElement("div");m.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";m.appendChild(p);t.appendChild(m);v=document.createElement("table");v.style.display="inline-block";var n=document.createElement("tbody"),
-z=document.createElement("tr"),D=z.cloneNode(!0),L=document.createElement("td"),U=L.cloneNode(!0),R=L.cloneNode(!0),O=L.cloneNode(!0),V=L.cloneNode(!0),J=L.cloneNode(!0);L.style.textAlign="right";O.style.textAlign="right";mxUtils.write(L,mxResources.get("fitTo"));var X=document.createElement("input");X.style.cssText="margin:0 8px 0 8px;";X.setAttribute("value","1");X.setAttribute("min","1");X.setAttribute("type","number");X.style.width="40px";U.appendChild(X);m=document.createElement("span");mxUtils.write(m,
-mxResources.get("fitToSheetsAcross"));R.appendChild(m);mxUtils.write(O,mxResources.get("fitToBy"));var W=X.cloneNode(!0);V.appendChild(W);mxEvent.addListener(X,"focus",function(){p.checked=!0});mxEvent.addListener(W,"focus",function(){p.checked=!0});m=document.createElement("span");mxUtils.write(m,mxResources.get("fitToSheetsDown"));J.appendChild(m);z.appendChild(L);z.appendChild(U);z.appendChild(R);D.appendChild(O);D.appendChild(V);D.appendChild(J);n.appendChild(z);n.appendChild(D);v.appendChild(n);
-t.appendChild(v);k.appendChild(t);t=document.createElement("div");m=document.createElement("div");m.style.fontWeight="bold";m.style.marginBottom="12px";mxUtils.write(m,mxResources.get("paperSize"));t.appendChild(m);m=document.createElement("div");m.style.marginBottom="12px";var da=PageSetupDialog.addPageFormatPanel(m,"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);t.appendChild(m);m=document.createElement("span");mxUtils.write(m,mxResources.get("pageScale"));t.appendChild(m);
-var ba=document.createElement("input");ba.style.cssText="margin:0 8px 0 8px;";ba.setAttribute("value","100 %");ba.style.width="60px";t.appendChild(ba);k.appendChild(t);m=document.createElement("div");m.style.cssText="text-align:right;margin:48px 0 0 0;";t=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});t.className="geBtn";a.editor.cancelFirst&&m.appendChild(t);a.isOffline()||(v=mxUtils.button(mxResources.get("help"),function(){c.openLink("https://desk.draw.io/support/solutions/articles/16000048947")}),
-v.className="geBtn",m.appendChild(v));PrintDialog.previewEnabled&&(v=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();f(!1)}),v.className="geBtn",m.appendChild(v));v=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();f(!0)});v.className="geBtn gePrimaryBtn";m.appendChild(v);a.editor.cancelFirst||m.appendChild(t);k.appendChild(m);this.container=k};var v=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==
+var c=a.editor.graph,m=document.createElement("div"),k=document.createElement("h3");k.style.width="100%";k.style.textAlign="center";k.style.marginTop="0px";mxUtils.write(k,b||mxResources.get("print"));m.appendChild(k);var e=1,q=1,t=document.createElement("div");t.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var g=document.createElement("input");g.style.cssText="margin-right:8px;margin-bottom:8px;";g.setAttribute("value","all");g.setAttribute("type","radio");
+g.setAttribute("name","pages-printdialog");t.appendChild(g);k=document.createElement("span");mxUtils.write(k,mxResources.get("printAllPages"));t.appendChild(k);mxUtils.br(t);var u=g.cloneNode(!0);g.setAttribute("checked","checked");u.setAttribute("value","range");t.appendChild(u);k=document.createElement("span");mxUtils.write(k,mxResources.get("pages")+":");t.appendChild(k);var w=document.createElement("input");w.style.cssText="margin:0 8px 0 8px;";w.setAttribute("value","1");w.setAttribute("type",
+"number");w.setAttribute("min","1");w.style.width="50px";t.appendChild(w);k=document.createElement("span");mxUtils.write(k,mxResources.get("to"));t.appendChild(k);var h=w.cloneNode(!0);t.appendChild(h);mxEvent.addListener(w,"focus",function(){u.checked=!0});mxEvent.addListener(h,"focus",function(){u.checked=!0});mxEvent.addListener(w,"change",d);mxEvent.addListener(h,"change",d);if(null!=a.pages&&(e=a.pages.length,null!=a.currentPage))for(k=0;k<a.pages.length;k++)if(a.currentPage==a.pages[k]){q=k+
+1;w.value=q;h.value=q;break}w.setAttribute("max",e);h.setAttribute("max",e);1<e&&m.appendChild(t);var v=document.createElement("div");v.style.marginBottom="10px";var l=document.createElement("input");l.style.marginRight="8px";l.setAttribute("value","adjust");l.setAttribute("type","radio");l.setAttribute("name","printZoom");v.appendChild(l);k=document.createElement("span");mxUtils.write(k,mxResources.get("adjustTo"));v.appendChild(k);var y=document.createElement("input");y.style.cssText="margin:0 8px 0 8px;";
+y.setAttribute("value","100 %");y.style.width="50px";v.appendChild(y);mxEvent.addListener(y,"focus",function(){l.checked=!0});m.appendChild(v);var t=t.cloneNode(!1),p=l.cloneNode(!0);p.setAttribute("value","fit");l.setAttribute("checked","checked");k=document.createElement("div");k.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";k.appendChild(p);t.appendChild(k);v=document.createElement("table");v.style.display="inline-block";var z=document.createElement("tbody"),
+n=document.createElement("tr"),D=n.cloneNode(!0),L=document.createElement("td"),U=L.cloneNode(!0),O=L.cloneNode(!0),P=L.cloneNode(!0),V=L.cloneNode(!0),ba=L.cloneNode(!0);L.style.textAlign="right";P.style.textAlign="right";mxUtils.write(L,mxResources.get("fitTo"));var J=document.createElement("input");J.style.cssText="margin:0 8px 0 8px;";J.setAttribute("value","1");J.setAttribute("min","1");J.setAttribute("type","number");J.style.width="40px";U.appendChild(J);k=document.createElement("span");mxUtils.write(k,
+mxResources.get("fitToSheetsAcross"));O.appendChild(k);mxUtils.write(P,mxResources.get("fitToBy"));var ca=J.cloneNode(!0);V.appendChild(ca);mxEvent.addListener(J,"focus",function(){p.checked=!0});mxEvent.addListener(ca,"focus",function(){p.checked=!0});k=document.createElement("span");mxUtils.write(k,mxResources.get("fitToSheetsDown"));ba.appendChild(k);n.appendChild(L);n.appendChild(U);n.appendChild(O);D.appendChild(P);D.appendChild(V);D.appendChild(ba);z.appendChild(n);z.appendChild(D);v.appendChild(z);
+t.appendChild(v);m.appendChild(t);t=document.createElement("div");k=document.createElement("div");k.style.fontWeight="bold";k.style.marginBottom="12px";mxUtils.write(k,mxResources.get("paperSize"));t.appendChild(k);k=document.createElement("div");k.style.marginBottom="12px";var W=PageSetupDialog.addPageFormatPanel(k,"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);t.appendChild(k);k=document.createElement("span");mxUtils.write(k,mxResources.get("pageScale"));t.appendChild(k);
+var da=document.createElement("input");da.style.cssText="margin:0 8px 0 8px;";da.setAttribute("value","100 %");da.style.width="60px";t.appendChild(da);m.appendChild(t);k=document.createElement("div");k.style.cssText="text-align:right;margin:48px 0 0 0;";t=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});t.className="geBtn";a.editor.cancelFirst&&k.appendChild(t);a.isOffline()||(v=mxUtils.button(mxResources.get("help"),function(){c.openLink("https://desk.draw.io/support/solutions/articles/16000048947")}),
+v.className="geBtn",k.appendChild(v));PrintDialog.previewEnabled&&(v=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();f(!1)}),v.className="geBtn",k.appendChild(v));v=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();f(!0)});v.className="geBtn gePrimaryBtn";k.appendChild(v);a.editor.cancelFirst||k.appendChild(t);m.appendChild(k);this.container=m};var v=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==
this.page&&(this.page=this.ui.currentPage);this.page!=this.ui.currentPage?null!=this.page.viewState&&(this.ignoreColor||(this.page.viewState.background=this.color),this.ignoreImage||(this.page.viewState.backgroundImage=this.image),null!=this.format&&(this.page.viewState.pageFormat=this.format),null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled),null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)):(v.apply(this,arguments),null!=this.mathEnabled&&
this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible))}})();
var ErrorDialog=function(a,c,b,e,g,h,l,p,n,d,f){n=null!=n?n:!0;var m=document.createElement("div");m.style.textAlign="center";if(null!=c){var q=document.createElement("div");q.style.padding="0px";q.style.margin="0px";q.style.fontSize="18px";q.style.paddingBottom="16px";q.style.marginBottom="16px";q.style.borderBottom="1px solid #c0c0c0";q.style.color="gray";mxUtils.write(q,c);m.appendChild(q)}c=document.createElement("div");c.style.padding="6px";c.innerHTML=b;m.appendChild(c);b=document.createElement("div");
b.style.marginTop="16px";b.style.textAlign="center";null!=h&&(c=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();h()}),c.className="geBtn",b.appendChild(c),b.style.textAlign="center");null!=d&&(d=mxUtils.button(d,function(){null!=f&&f()}),d.className="geBtn",b.appendChild(d));var t=mxUtils.button(e,function(){n&&a.hideDialog();null!=g&&g()});t.className="geBtn";b.appendChild(t);null!=l&&(e=mxUtils.button(l,function(){n&&a.hideDialog();null!=p&&p()}),e.className="geBtn gePrimaryBtn",
b.appendChild(e));this.init=function(){t.focus()};m.appendChild(b);this.container=m};
-(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,b,e){e.ui=a.ui;return b};a.afterDecode=function(a,b,e){e.previousColor=e.color;e.previousImage=e.image;e.previousFormat=e.format;null!=e.foldingEnabled&&(e.foldingEnabled=!e.foldingEnabled);null!=e.mathEnabled&&(e.mathEnabled=!e.mathEnabled);null!=e.shadowVisible&&(e.shadowVisible=!e.shadowVisible);return e};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="10.0.28";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.enableLogging="1"!=urlParams.stealth&&/.*\.draw\.io$/.test(window.location.hostname)&&"support.draw.io"!=window.location.hostname;EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.logError=function(a,b,c,e,t){if("1"==urlParams.dev)EditorUi.debug("logError",a,b,c,e,t);else if(EditorUi.enableLogging)try{if(a!=EditorUi.lastErrorMessage&&(null==
+(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,b,e){e.ui=a.ui;return b};a.afterDecode=function(a,b,e){e.previousColor=e.color;e.previousImage=e.image;e.previousFormat=e.format;null!=e.foldingEnabled&&(e.foldingEnabled=!e.foldingEnabled);null!=e.mathEnabled&&(e.mathEnabled=!e.mathEnabled);null!=e.shadowVisible&&(e.shadowVisible=!e.shadowVisible);return e};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="10.0.29";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.enableLogging="1"!=urlParams.stealth&&/.*\.draw\.io$/.test(window.location.hostname)&&"support.draw.io"!=window.location.hostname;EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.logError=function(a,b,c,e,t){if("1"==urlParams.dev)EditorUi.debug("logError",a,b,c,e,t);else if(EditorUi.enableLogging)try{if(a!=EditorUi.lastErrorMessage&&(null==
a||null==b||-1==a.indexOf("Script error")&&-1==a.indexOf("extension"))&&null!=a&&0>a.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=a;var d=0<=a.indexOf("NetworkError")||0<=a.indexOf("SecurityError")||0<=a.indexOf("NS_ERROR_FAILURE")||0<=a.indexOf("out of memory")?"CONFIG":"SEVERE",f=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=f+"/log?severity="+d+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(a)+":url:"+encodeURIComponent(window.location.href)+
":lnum:"+encodeURIComponent(c)+(null!=e?":colno:"+encodeURIComponent(e):"")+(null!=t&&null!=t.stack?"&stack="+encodeURIComponent(t.stack):"")}}catch(y){}};EditorUi.logEvent=function(a){if("1"==urlParams.dev)EditorUi.debug("logEvent",a);else if(EditorUi.enableLogging)try{var b=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=b+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=a?"&data="+encodeURIComponent(JSON.stringify(a)):"")}catch(m){}};EditorUi.sendReport=function(a,
b){if("1"==urlParams.dev)EditorUi.debug("sendReport",a);else if(EditorUi.enableLogging)try{b=null!=b?b:5E4,a.length>b&&(a=a.substring(0,b)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(a))}catch(m){}};EditorUi.debug=function(){if(null!=window.console&&"1"==urlParams.test){for(var a=[(new Date).toISOString()],b=0;b<arguments.length;b++)a.push(arguments[b]);console.log.apply(console,
@@ -7953,10 +7954,10 @@ w:d.width,h:d.height};null!=e&&(a.title=e);b.push(a);C(c);null!=f&&null!=f.paren
d.y-=n.view.translate.y;F(b,d)}mxEvent.consume(a)});g.style.border="3px solid transparent";mxEvent.addGestureListeners(g,function(){},mxUtils.bind(this,function(a){n.isMouseDown&&null!=n.panningManager&&null!=n.graphHandler.shape&&(n.graphHandler.shape.node.style.visibility="hidden",null!=f?f.style.border="3px dotted rgb(254, 137, 12)":g.style.border="3px dotted rgb(254, 137, 12)",g.style.cursor="copy",n.panningManager.stop(),n.autoScroll=!1,null!=n.graphHandler.guide&&n.graphHandler.guide.setVisible(!1),
null!=n.graphHandler.hint&&(n.graphHandler.hint.style.visibility="hidden"),mxEvent.consume(a))}),mxUtils.bind(this,function(a){n.isMouseDown&&null!=n.panningManager&&null!=n.graphHandler&&(g.style.border="3px solid transparent",null!=f&&(f.style.border="3px dotted lightGray"),g.style.cursor="default",this.sidebar.showTooltips=!0,n.panningManager.stop(),n.graphHandler.reset(),n.isMouseDown=!1,n.autoScroll=!0,H(a),mxEvent.consume(a))}));mxEvent.addListener(g,"mouseleave",mxUtils.bind(this,function(a){n.isMouseDown&&
null!=n.graphHandler.shape&&(n.graphHandler.shape.node.style.visibility="visible",g.style.border="3px solid transparent",g.style.cursor="",n.autoScroll=!0,null!=n.graphHandler.guide&&n.graphHandler.guide.setVisible(!0),null!=n.graphHandler.hint&&(n.graphHandler.hint.style.visibility="visible"),null!=f&&(f.style.border="3px dotted lightGray"))}));Graph.fileSupport&&(mxEvent.addListener(g,"dragover",mxUtils.bind(this,function(a){null!=f?f.style.border="3px dotted rgb(254, 137, 12)":g.style.border="3px dotted rgb(254, 137, 12)";
-a.dataTransfer.dropEffect="copy";g.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(g,"drop",mxUtils.bind(this,function(a){g.style.border="3px solid transparent";g.style.cursor="";null!=f&&(f.style.border="3px dotted lightGray");0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(d,c,k,m,q,t,h,v,u){if(null!=d&&"image/"==c.substring(0,6))d="shape=image;verticalLabelPosition=bottom;verticalAlign=top;aspect=fixed;image="+
+a.dataTransfer.dropEffect="copy";g.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(g,"drop",mxUtils.bind(this,function(a){g.style.border="3px solid transparent";g.style.cursor="";null!=f&&(f.style.border="3px dotted lightGray");0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(d,c,k,m,q,t,h,u,v){if(null!=d&&"image/"==c.substring(0,6))d="shape=image;verticalLabelPosition=bottom;verticalAlign=top;aspect=fixed;image="+
this.convertDataUri(d),d=[new mxCell("",new mxGeometry(0,0,q,t),d)],d[0].vertex=!0,F(d,new mxRectangle(0,0,q,t),a,mxEvent.isAltDown(a)?null:h.substring(0,h.lastIndexOf(".")).replace(/_/g," ")),null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null);else{var w=!1,l=mxUtils.bind(this,function(d,c){if(null!=d&&"text/xml"==c){var k=mxUtils.parseXml(d);if("mxlibrary"==k.documentElement.nodeName)try{var m=JSON.parse(mxUtils.getTextContent(k.documentElement));e(m,g);b=b.concat(m);C(a);
-this.spinner.stop();w=!0}catch(X){}else if("mxfile"==k.documentElement.nodeName)try{for(var q=k.documentElement.getElementsByTagName("diagram"),k=0;k<q.length;k++){var m=mxUtils.getTextContent(q[k]),t=this.stringToCells(this.editor.graph.decompress(m)),h=this.editor.graph.getBoundingBoxFromGeometry(t);F(t,new mxRectangle(0,0,h.width,h.height),a)}w=!0}catch(X){null!=window.console&&console.log("error in drop handler:",X)}}w||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));
-null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)});null!=u&&null!=h&&(/(\.v(dx|sdx?))($|\?)/i.test(h)||/(\.vs(x|sx?))($|\?)/i.test(h))?this.importVisio(u,function(a){l(a,"text/xml")},null,h):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,h)&&null!=u?this.parseFile(u,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?l(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?
+this.spinner.stop();w=!0}catch(J){}else if("mxfile"==k.documentElement.nodeName)try{for(var q=k.documentElement.getElementsByTagName("diagram"),k=0;k<q.length;k++){var m=mxUtils.getTextContent(q[k]),t=this.stringToCells(this.editor.graph.decompress(m)),h=this.editor.graph.getBoundingBoxFromGeometry(t);F(t,new mxRectangle(0,0,h.width,h.height),a)}w=!0}catch(J){null!=window.console&&console.log("error in drop handler:",J)}}w||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));
+null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)});null!=v&&null!=h&&(/(\.v(dx|sdx?))($|\?)/i.test(h)||/(\.vs(x|sx?))($|\?)/i.test(h))?this.importVisio(v,function(a){l(a,"text/xml")},null,h):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,h)&&null!=v?this.parseFile(v,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?l(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?
"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):l(d,c)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(g,"dragleave",function(a){null!=f?f.style.border="3px dotted lightGray":(g.style.border="3px solid transparent",g.style.cursor="");a.stopPropagation();a.preventDefault()}));l=l.cloneNode(!1);l.setAttribute("src",Editor.editImage);l.setAttribute("title",mxResources.get("edit"));h.insertBefore(l,h.firstChild);mxEvent.addListener(l,"click",G);mxEvent.addListener(g,
"dblclick",function(a){mxEvent.getSource(a)==g&&G(a)});c=l.cloneNode(!1);c.setAttribute("src",Editor.plusImage);c.setAttribute("title",mxResources.get("add"));h.insertBefore(c,h.firstChild);mxEvent.addListener(c,"click",H);this.isOffline()||".scratchpad"!=a.title||null==EditorUi.scratchpadHelpLink||(c=document.createElement("span"),c.setAttribute("title",mxResources.get("help")),c.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;",mxUtils.write(c,"?"),mxEvent.addGestureListeners(c,
mxUtils.bind(this,function(a){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(a)})),h.insertBefore(c,h.firstChild))}k.appendChild(h);k.style.paddingRight=18*h.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(a,b){for(var d=0;d<a.length;d++){var c=a[d],f=c.data;if(null!=f){var f=this.convertDataUri(f),e="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==c.aspect&&(e+="aspect=fixed;");b.appendChild(this.sidebar.createVertexTemplate(e+
@@ -8032,19 +8033,19 @@ EditorUi.prototype.createEmbedSvg=function(a,b,c,e,g,h,l){var d=this.editor.grap
" "+mxResources.get("months");b=Math.floor(a/86400);if(1<b)return b+" "+mxResources.get("days");b=Math.floor(a/3600);if(1<b)return b+" "+mxResources.get("hours");b=Math.floor(a/60);return 1<b?b+" "+mxResources.get("minutes"):1==b?b+" "+mxResources.get("minute"):null};EditorUi.prototype.convertMath=function(a,b,c,e){a.mathEnabled&&"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?(Editor.MathJaxRender(b),window.setTimeout(mxUtils.bind(this,function(){MathJax.Hub.Queue(mxUtils.bind(this,
function(){e()}))}),0)):e()};EditorUi.prototype.decodeNodeIntoGraph=function(a,b){if(null!=a){var d=null;if("diagram"==a.nodeName)d=a;else if("mxfile"==a.nodeName){var c=a.getElementsByTagName("diagram");if(0<c.length){var d=c[0],f=b.getGlobalVariable;b.getGlobalVariable=function(a){return"page"==a?d.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==a?1:f.apply(this,arguments)}}}null!=d&&(c=b.decompress(mxUtils.getTextContent(d)),null!=c&&0<c.length&&(a=mxUtils.parseXml(c).documentElement))}c=
this.editor.graph;try{this.editor.graph=b,this.editor.setGraphXml(a)}catch(u){}finally{this.editor.graph=c}return a};EditorUi.prototype.getEmbeddedPng=function(a,b,c){var d=this.editor.graph,f=null;if(null!=c&&0<c.length)d=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(d.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(c).documentElement,!0),d),f=c;else if(null!=this.pages&&this.currentPage!=this.pages[0]){var d=this.createTemporaryGraph(d.getStylesheet()),
-e=d.getGlobalVariable,g=this.pages[0];d.getGlobalVariable=function(a){return"page"==a?g.getName():"pagenumber"==a?1:e.apply(this,arguments)};document.body.appendChild(d.container);d.model.setRoot(g.root)}this.exportToCanvas(mxUtils.bind(this,function(c){try{null==f&&(f=this.getFileData(!0));var e=c.toDataURL("image/png"),e=this.writeGraphModelToPng(e,"zTXt","mxGraphModel",atob(this.editor.graph.compress(f)));a(e.substring(e.lastIndexOf(",")+1));d!=this.editor.graph&&d.container.parentNode.removeChild(d.container)}catch(v){null!=
+e=d.getGlobalVariable,m=this.pages[0];d.getGlobalVariable=function(a){return"page"==a?m.getName():"pagenumber"==a?1:e.apply(this,arguments)};document.body.appendChild(d.container);d.model.setRoot(m.root)}this.exportToCanvas(mxUtils.bind(this,function(c){try{null==f&&(f=this.getFileData(!0));var e=c.toDataURL("image/png"),e=this.writeGraphModelToPng(e,"zTXt","mxGraphModel",atob(this.editor.graph.compress(f)));a(e.substring(e.lastIndexOf(",")+1));d!=this.editor.graph&&d.container.parentNode.removeChild(d.container)}catch(v){null!=
b&&b(v)}}),null,null,null,mxUtils.bind(this,function(a){null!=b&&b(a)}),null,null,null,null,d.shadowVisible,null,d)};EditorUi.prototype.getEmbeddedSvg=function(a,b,c,e,g,h,l){l=b.background;l==mxConstants.NONE&&(l=null);b=b.getSvg(l,null,null,null,null,h);null!=a&&b.setAttribute("content",a);null!=c&&b.setAttribute("resource",c);if(null!=g)this.convertImages(b,mxUtils.bind(this,function(a){g((e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+
mxUtils.getXml(a))}));else return(e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(b)};EditorUi.prototype.exportImage=function(a,b,c,e,g,h,l,n,k){k=null!=k?k:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var d=this.editor.graph.isSelectionEmpty();c=null!=c?c:d;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();
try{this.saveCanvas(a,g?this.getFileData(!0,null,null,null,c,n):null,k)}catch(D){"Invalid image"==D.message?this.downloadFile(k):this.handleError(D)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,c,a||1,b,e,null,null,h,l)}catch(z){this.spinner.stop(),this.handleError(z)}}};EditorUi.prototype.loadFonts=function(a){if(null!=this.editor.fontCss&&null==this.editor.resolvedFontCss){var b=function(a){return a.replace(RegExp("^[\\s\"']+","g"),
"").replace(RegExp("[\\s\"']+$","g"),"")},d=this.editor.fontCss.split("url("),c=0,e={},g=mxUtils.bind(this,function(){if(0==c){for(var f=[d[0]],k=1;k<d.length;k++){var g=d[k].indexOf(")");f.push('url("');f.push(e[b(d[k].substring(0,g))]);f.push('"'+d[k].substring(g))}this.editor.resolvedFontCss=f.join("");a()}});if(0<d.length)for(var h=1;h<d.length;h++){var l=d[h].indexOf(")"),k=null,v=d[h].indexOf("format(",l);0<v&&(k=b(d[h].substring(v+7,d[h].indexOf(")",v))));mxUtils.bind(this,function(a){if(null==
e[a]){e[a]=a;c++;var b="application/x-font-ttf";if("svg"==k||/(\.svg)($|\?)/i.test(a))b="image/svg+xml";else if("otf"==k||"embedded-opentype"==k||/(\.otf)($|\?)/i.test(a))b="application/x-font-opentype";else if("woff"==k||/(\.woff)($|\?)/i.test(a))b="application/font-woff";else if("woff2"==k||/(\.woff2)($|\?)/i.test(a))b="application/font-woff2";else if("eot"==k||/(\.eot)($|\?)/i.test(a))b="application/vnd.ms-fontobject";else if("sfnt"==k||/(\.sfnt)($|\?)/i.test(a))b="application/font-sfnt";var d=
a;/^https?:\/\//.test(d)&&!this.isCorsEnabledForUrl(d)&&(d=PROXY_URL+"?url="+encodeURIComponent(a));this.loadUrl(d,mxUtils.bind(this,function(b){e[a]=b;c--;g()}),mxUtils.bind(this,function(a){c--;g()}),!0,null,"data:"+b+";charset=utf-8;base64,")}})(b(d[h].substring(0,l)),k)}}else a()};EditorUi.prototype.exportToCanvas=function(a,b,c,e,g,h,l,n,k,v,p,D,B,x){h=null!=h?h:!0;D=null!=D?D:this.editor.graph;B=null!=B?B:0;var d=k?null:D.background;d==mxConstants.NONE&&(d=null);null==d&&(d=e);null==d&&0==k&&
-(d=this.editor.graph.defaultPageBackgroundColor);this.convertImages(D.getSvg(d,null,null,x,null,null!=l?l:!0,null,null,null,v),mxUtils.bind(this,function(c){var f=new Image;f.onload=mxUtils.bind(this,function(){try{var e=document.createElement("canvas"),k=parseInt(c.getAttribute("width")),m=parseInt(c.getAttribute("height"));n=null!=n?n:1;null!=b&&(n=h?Math.min(1,Math.min(3*b/(4*m),b/k)):b/k);k=Math.ceil(n*k)+2*B;m=Math.ceil(n*m)+2*B;e.setAttribute("width",k);e.setAttribute("height",m);var l=e.getContext("2d");
-null!=d&&(l.beginPath(),l.rect(0,0,k,m),l.fillStyle=d,l.fill());l.scale(n,n);mxClient.IS_SF?window.setTimeout(function(){l.drawImage(f,B/n,B/n);a(e)},0):(l.drawImage(f,B/n,B/n),a(e))}catch(K){null!=g&&g(K)}});f.onerror=function(a){null!=g&&g(a)};try{v&&this.editor.graph.addSvgShadow(c,c);var e=mxUtils.bind(this,function(){if(null!=this.editor.resolvedFontCss){var a=document.createElement("style");a.setAttribute("type","text/css");a.innerHTML=this.editor.resolvedFontCss;c.getElementsByTagName("defs")[0].appendChild(a)}this.convertMath(D,
+(d=this.editor.graph.defaultPageBackgroundColor);this.convertImages(D.getSvg(d,null,null,x,null,null!=l?l:!0,null,null,null,v),mxUtils.bind(this,function(c){var f=new Image;f.onload=mxUtils.bind(this,function(){try{var e=document.createElement("canvas"),k=parseInt(c.getAttribute("width")),m=parseInt(c.getAttribute("height"));n=null!=n?n:1;null!=b&&(n=h?Math.min(1,Math.min(3*b/(4*m),b/k)):b/k);k=Math.ceil(n*k)+2*B;m=Math.ceil(n*m)+2*B;e.setAttribute("width",k);e.setAttribute("height",m);var q=e.getContext("2d");
+null!=d&&(q.beginPath(),q.rect(0,0,k,m),q.fillStyle=d,q.fill());q.scale(n,n);mxClient.IS_SF?window.setTimeout(function(){q.drawImage(f,B/n,B/n);a(e)},0):(q.drawImage(f,B/n,B/n),a(e))}catch(K){null!=g&&g(K)}});f.onerror=function(a){null!=g&&g(a)};try{v&&this.editor.graph.addSvgShadow(c,c);var e=mxUtils.bind(this,function(){if(null!=this.editor.resolvedFontCss){var a=document.createElement("style");a.setAttribute("type","text/css");a.innerHTML=this.editor.resolvedFontCss;c.getElementsByTagName("defs")[0].appendChild(a)}this.convertMath(D,
c,!0,mxUtils.bind(this,function(){f.src=this.createSvgDataUri(mxUtils.getXml(c))}))});this.loadFonts(e)}catch(A){null!=g&&g(A)}}),c,p)};EditorUi.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var b=a.convert,c=this;a.convert=function(d){if(null!=d){var f="http://"==d.substring(0,7)||"https://"==d.substring(0,8);f&&!navigator.onLine?d=c.svgBrokenImage.src:!f||d.substring(0,a.baseUrl.length)==a.baseUrl||c.crossOriginImages&&c.isCorsEnabledForUrl(d)?"chrome-extension://"!=
d.substring(0,19)&&(d=b.apply(this,arguments)):d=PROXY_URL+"?url="+encodeURIComponent(d)}return d};return a};EditorUi.prototype.convertImages=function(a,b,c,e){null==e&&(e=this.createImageUrlConverter());var d=0,f=c||{};c=mxUtils.bind(this,function(c,g){for(var k=a.getElementsByTagName(c),m=0;m<k.length;m++)mxUtils.bind(this,function(c){var k=e.convert(c.getAttribute(g));if(null!=k&&"data:"!=k.substring(0,5)){var m=f[k];null==m?(d++,this.convertImageToDataUri(k,function(e){null!=e&&(f[k]=e,c.setAttribute(g,
-e));d--;0==d&&b(a)})):c.setAttribute(g,m)}else null!=k&&c.setAttribute(g,k)})(k[m])});c("image","xlink:href");c("img","src");0==d&&b(a)};EditorUi.prototype.loadUrl=function(a,b,c,e,g,h){try{var d=e||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||/(\.gif)($|\?)/i.test(a);g=null!=g?g:!0;var f=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=b){var f=a.getText();if(d){if((9==document.documentMode||10==document.documentMode)&&
-"undefined"!==typeof window.mxUtilsBinaryToArray){a=mxUtilsBinaryToArray(a.request.responseBody).toArray();for(var f=Array(a.length),e=0;e<a.length;e++)f[e]=String.fromCharCode(a[e]);f=f.join("")}h=null!=h?h:"data:image/png;base64,";f=h+this.base64Encode(f)}b(f)}}else null!=c&&c({code:App.ERROR_UNKNOWN},a)}),function(){null!=c&&c({code:App.ERROR_UNKNOWN})},d,this.timeout,function(){g&&null!=c&&c({code:App.ERROR_TIMEOUT,retry:f})})});f()}catch(k){null!=c&&c(k)}};EditorUi.prototype.isCorsEnabledForUrl=
+e));d--;0==d&&b(a)})):c.setAttribute(g,m)}else null!=k&&c.setAttribute(g,k)})(k[m])});c("image","xlink:href");c("img","src");0==d&&b(a)};EditorUi.prototype.loadUrl=function(a,b,c,e,g,h){try{var d=e||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||/(\.gif)($|\?)/i.test(a);g=null!=g?g:!0;var f=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=b){var e=a.getText();if(d){if((9==document.documentMode||10==document.documentMode)&&
+"undefined"!==typeof window.mxUtilsBinaryToArray){a=mxUtilsBinaryToArray(a.request.responseBody).toArray();for(var e=Array(a.length),f=0;f<a.length;f++)e[f]=String.fromCharCode(a[f]);e=e.join("")}h=null!=h?h:"data:image/png;base64,";e=h+this.base64Encode(e)}b(e)}}else null!=c&&c({code:App.ERROR_UNKNOWN},a)}),function(){null!=c&&c({code:App.ERROR_UNKNOWN})},d,this.timeout,function(){g&&null!=c&&c({code:App.ERROR_TIMEOUT,retry:f})})});f()}catch(k){null!=c&&c(k)}};EditorUi.prototype.isCorsEnabledForUrl=
function(a){null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(a)||"https://raw.githubusercontent.com/"===a.substring(0,34)||"https://cdn.rawgit.com/"===a.substring(0,23)||"https://rawgit.com/"===a.substring(0,19)||/^https?:\/\/[^\/]*\.iconfinder.com\//.test(a)||/^https?:\/\/[^\/]*\.draw\.io\/proxy/.test(a)||/^https?:\/\/[^\/]*\.github\.io\//.test(a)};EditorUi.prototype.convertImageToDataUri=
function(a,b){if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){b(this.createSvgDataUri(a.getText()))}),function(){b(this.svgBrokenImage.src)});else{var d=new Image,c=this;this.crossOriginImages&&(d.crossOrigin="anonymous");d.onload=function(){var a=document.createElement("canvas"),e=a.getContext("2d");a.height=d.height;a.width=d.width;e.drawImage(d,0,0);try{b(a.toDataURL())}catch(w){b(c.svgBrokenImage.src)}};d.onerror=function(){b(c.svgBrokenImage.src)};d.src=a}};EditorUi.prototype.importXml=
function(a,b,c,e,g){b=null!=b?b:0;c=null!=c?c:0;var d=[];try{var f=this.editor.graph;if(null!=a&&0<a.length){var m=mxUtils.parseXml(a),k=this.editor.extractGraphModel(m.documentElement,null!=this.pages);if(null!=k&&"mxfile"==k.nodeName&&null!=this.pages){var h=k.getElementsByTagName("diagram");if(1==h.length)k=mxUtils.parseXml(f.decompress(mxUtils.getTextContent(h[0]))).documentElement;else if(1<h.length){f.model.beginUpdate();try{for(a=0;a<h.length;a++){h[a].removeAttribute("id");var l=this.updatePageRoot(new DiagramPage(h[a])),
@@ -8072,7 +8073,7 @@ g=null!=g?g:mxUtils.bind(this,function(a,b,c,e,f,k,g,m,h){return null!=a&&"<mxli
try{for(var c=0;c<u.length;c++){var e=u[c]();null!=e&&(d=d.concat(e))}}finally{k.getModel().endUpdate()}}h(d)}}),x=0;x<q;x++)mxUtils.bind(this,function(d){var h=a[d],q=new FileReader;q.onload=mxUtils.bind(this,function(a){if(null==l||l(h))if("image/"==h.type.substring(0,6))if("image/svg"==h.type.substring(0,9)){var q=a.target.result,t=q.indexOf(","),n=decodeURIComponent(escape(atob(q.substring(t+1)))),u=mxUtils.parseXml(n),n=u.getElementsByTagName("svg");if(0<n.length){var n=n[0],x=D?null:n.getAttribute("content");
null!=x&&"<"!=x.charAt(0)&&"%"!=x.charAt(0)&&(x=unescape(window.atob?atob(x):Base64.decode(x,!0)));null!=x&&"%"==x.charAt(0)&&(x=decodeURIComponent(x));null==x||"<mxfile "!==x.substring(0,8)&&"<mxGraphModel "!==x.substring(0,14)?w(d,mxUtils.bind(this,function(){try{if(q.substring(0,t+1),null!=u){var a=u.getElementsByTagName("svg");if(0<a.length){var f=a[0],l=parseFloat(f.getAttribute("width")),n=parseFloat(f.getAttribute("height")),v=f.getAttribute("viewBox");if(null==v||0==v.length)f.setAttribute("viewBox",
"0 0 "+l+" "+n);else if(isNaN(l)||isNaN(n)){var p=v.split(" ");3<p.length&&(l=parseFloat(p[2]),n=parseFloat(p[3]))}q=this.createSvgDataUri(mxUtils.getXml(f));var w=Math.min(1,Math.min(e/Math.max(1,l)),e/Math.max(1,n)),x=g(q,h.type,b+d*m,c+d*m,Math.max(1,Math.round(l*w)),Math.max(1,Math.round(n*w)),h.name);if(isNaN(l)||isNaN(n)){var D=new Image;D.onload=mxUtils.bind(this,function(){l=Math.max(1,D.width);n=Math.max(1,D.height);x[0].geometry.width=l;x[0].geometry.height=n;f.setAttribute("viewBox","0 0 "+
-l+" "+n);q=this.createSvgDataUri(mxUtils.getXml(f));var a=q.indexOf(";");0<a&&(q=q.substring(0,a)+q.substring(q.indexOf(",",a+1)));k.setCellStyles("image",q,[x[0]])});D.src=this.createSvgDataUri(mxUtils.getXml(f))}return x}}}catch(fa){}return null})):w(d,mxUtils.bind(this,function(){return g(x,"text/xml",b+d*m,c+d*m,0,0,h.name)}))}else w(d,mxUtils.bind(this,function(){return null}))}else{n=!1;if("image/png"==h.type){var A=D?null:this.extractGraphModelFromPng(a.target.result);if(null!=A&&0<A.length){var y=
+l+" "+n);q=this.createSvgDataUri(mxUtils.getXml(f));var a=q.indexOf(";");0<a&&(q=q.substring(0,a)+q.substring(q.indexOf(",",a+1)));k.setCellStyles("image",q,[x[0]])});D.src=this.createSvgDataUri(mxUtils.getXml(f))}return x}}}catch(ma){}return null})):w(d,mxUtils.bind(this,function(){return g(x,"text/xml",b+d*m,c+d*m,0,0,h.name)}))}else w(d,mxUtils.bind(this,function(){return null}))}else{n=!1;if("image/png"==h.type){var A=D?null:this.extractGraphModelFromPng(a.target.result);if(null!=A&&0<A.length){var y=
new Image;y.src=a.target.result;w(d,mxUtils.bind(this,function(){return g(A,"text/xml",b+d*m,c+d*m,y.width,y.height,h.name)}));n=!0}}n||(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(a.target.result,mxUtils.bind(this,function(k){this.resizeImage(k,a.target.result,
mxUtils.bind(this,function(k,l,q){w(d,mxUtils.bind(this,function(){if(null!=k&&k.length<v){var t=f&&this.isResampleImage(a.target.result,p)?Math.min(1,Math.min(e/l,e/q)):1;return g(k,h.type,b+d*m,c+d*m,Math.round(l*t),Math.round(q*t),h.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),f,e,p)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else g(a.target.result,h.type,b+d*m,c+d*m,240,160,h.name,function(a){w(d,
function(){return a})})});/(\.v(dx|sdx?))($|\?)/i.test(h.name)||/(\.vs(x|sx?))($|\?)/i.test(h.name)?g(null,h.type,b+d*m,c+d*m,240,160,h.name,function(a){w(d,function(){return a})},h):"image"==h.type.substring(0,5)?q.readAsDataURL(h):q.readAsText(h)})(x)});m?this.confirmImageResize(function(a){f=a;u()},k):u()};EditorUi.prototype.confirmImageResize=function(a,b){b=null!=b?b:!1;var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},c=isLocalStorage||mxClient.IS_CHROMEAPP?
@@ -8090,7 +8091,7 @@ var g=b.addClickHandler;b.addClickHandler=function(a,c,d){var e=c;c=function(a,c
arguments);else{if(!b.isEnabled()||null!=a&&b.isCellLocked(a.cell))b.customLinkClicked(e),b.getRubberband().reset();mxEvent.consume(d)}};this.editor.getOrCreateFilename=function(){var b=a.defaultFilename,c=a.getCurrentFile();null!=c&&(b=null!=c.getTitle()?c.getTitle():b);return b};var p=this.actions.get("print");p.setEnabled(!mxClient.IS_IOS||!navigator.standalone);p.visible=p.isEnabled();if(!this.editor.chromeless||this.editor.editable){var k=function(){window.setTimeout(function(){v.innerHTML="&nbsp;";
v.focus();document.execCommand("selectAll",!1,null)},0)};this.keyHandler.bindAction(70,!0,"find");this.keyHandler.bindAction(67,!0,"copyStyle",!0);this.keyHandler.bindAction(86,!0,"pasteStyle",!0);this.keyHandler.bindAction(77,!0,"editGeometry",!0);this.keyHandler.bindAction(88,!0,"insertText",!0);this.keyHandler.bindAction(75,!0,"insertRectangle");this.keyHandler.bindAction(75,!0,"insertEllipse",!0);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(this.altShiftActions[83]="synchronize");mxClient.IS_IE||
b.container.addEventListener("paste",mxUtils.bind(this,function(a){var b=this.editor.graph;if(!mxEvent.isConsumed(a))try{for(var c=a.clipboardData||a.originalEvent.clipboardData,d=!1,e=0;e<c.types.length;e++)if("text/"===c.types[e].substring(0,5)){d=!0;break}if(!d){var f=c.items;for(index in f){var k=f[index];if("file"===k.kind){if(b.isEditing())this.importFiles([k.getAsFile()],0,0,this.maxImageSize,function(a,c,d,e,f,k){b.insertImage(a,f,k)},function(){},function(a){return"image/"==a.type.substring(0,
-6)},function(a){for(var b=0;b<a.length;b++)a[b]()});else{var g=this.editor.graph.getInsertPoint();this.importFiles([k.getAsFile()],g.x,g.y,this.maxImageSize);mxEvent.consume(a)}break}}}}catch(P){}}),!1);var v=document.createElement("div");v.style.position="absolute";v.style.whiteSpace="nowrap";v.style.overflow="hidden";v.style.display="block";v.contentEditable=!0;mxUtils.setOpacity(v,0);v.style.width="1px";v.style.height="1px";v.innerHTML="&nbsp;";var z=!1;this.keyHandler.bindControlKey(88,null);
+6)},function(a){for(var b=0;b<a.length;b++)a[b]()});else{var g=this.editor.graph.getInsertPoint();this.importFiles([k.getAsFile()],g.x,g.y,this.maxImageSize);mxEvent.consume(a)}break}}}}catch(Q){}}),!1);var v=document.createElement("div");v.style.position="absolute";v.style.whiteSpace="nowrap";v.style.overflow="hidden";v.style.display="block";v.contentEditable=!0;mxUtils.setOpacity(v,0);v.style.width="1px";v.style.height="1px";v.innerHTML="&nbsp;";var z=!1;this.keyHandler.bindControlKey(88,null);
this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(a){var c=mxEvent.getSource(a);null==b.container||!b.isEnabled()||b.isMouseDown||b.isEditing()||null!=this.dialog||"INPUT"==c.nodeName||"TEXTAREA"==c.nodeName||!(224==a.keyCode||!mxClient.IS_MAC&&17==a.keyCode||mxClient.IS_MAC&&91==a.keyCode)||z||(v.style.left=b.container.scrollLeft+10+"px",v.style.top=b.container.scrollTop+10+"px",b.container.appendChild(v),
z=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){v.focus();document.execCommand("selectAll",!1,null)},0):(v.focus(),document.execCommand("selectAll",!1,null)))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(a){var c=a.keyCode;window.setTimeout(mxUtils.bind(this,function(){!z||224!=c&&17!=c&&91!=c||(z=!1,b.isEditing()||null!=this.dialog||null==b.container||b.container.focus(),v.parentNode.removeChild(v),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(v,
"copy",mxUtils.bind(this,function(a){b.isEnabled()&&(mxClipboard.copy(b),this.copyCells(v),k())}));mxEvent.addListener(v,"cut",mxUtils.bind(this,function(a){b.isEnabled()&&(mxClipboard.copy(b),this.copyCells(v,!0),k())}));mxEvent.addListener(v,"paste",mxUtils.bind(this,function(a){b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(v.innerHTML="&nbsp;",v.focus(),window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,v);v.innerHTML="&nbsp;"}),0))}),!0);var D=this.isSelectionAllowed;this.isSelectionAllowed=
@@ -8157,38 +8158,38 @@ mxUtils.bind(this,function(a){y(a)}),mxUtils.bind(this,function(a){this.handleEr
"2px";var b=document.createElement("button");mxUtils.write(b,mxResources.get("save"));b.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)");b.className="geBigButton";b.style.fontSize="12px";b.style.padding="4px 6px 4px 6px";b.style.borderRadius="3px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()}));a.appendChild(b);"1"==urlParams.saveAndExit&&(b=document.createElement("a"),mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",
mxResources.get("saveAndExit")),b.style.fontSize="12px",b.style.marginLeft="6px",b.style.padding="4px",b.style.cursor="pointer",mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b));b=document.createElement("a");mxUtils.write(b,mxResources.get("exit"));b.setAttribute("title",mxResources.get("exit"));b.style.fontSize="12px";b.style.marginLeft="6px";b.style.marginRight="20px";b.style.padding="4px";b.style.cursor="pointer";mxEvent.addListener(b,
"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()}));a.appendChild(b);this.toolbar.container.appendChild(a);this.toolbar.staticElements.push(a);a.style.right="atlas"!=uiTheme?"52px":"42px"}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(a){this.importCsv(a)}),null,null,620,430,null,!0,!0,mxResources.get("import")));this.showDialog(this.importCsvDialog.container,
-640,520,!0,!0);this.importCsvDialog.init()};EditorUi.prototype.importCsv=function(a,b){try{var c=a.split("\n"),d=[];if(0<c.length){var e={},f=null,g=null,h=null,k=null,l="",n="auto",p="auto",B=null,x=null,G=40,C=40,F=100,H=0,A=this.editor.graph;A.getGraphBounds();for(var E=function(){null!=b?b(ea):(A.setSelectionCells(ea),A.scrollCellToVisible(A.getSelectionCell()))},I=A.getFreeInsertPoint(),M=I.x,K=I.y,I=K,T=null,P="auto",k=null,S=[],aa=null,Z=null,N=0;N<c.length&&"#"==c[N].charAt(0);){a=c[N];for(N++;N<
-c.length&&"\\"==a.charAt(a.length-1)&&"#"==c[N].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(c[N].substring(1)),N++;if("#"!=a.charAt(1)){var Y=a.indexOf(":");if(0<Y){var Q=mxUtils.trim(a.substring(1,Y)),L=mxUtils.trim(a.substring(Y+1));"label"==Q?T=A.sanitizeHtml(L):"style"==Q?f=L:"parentstyle"==Q?g=L:"identity"==Q&&0<L.length&&"-"!=L?h=L:"parent"==Q&&0<L.length&&"-"!=L?k=L:"namespace"==Q&&0<L.length&&"-"!=L?l=L:"width"==Q?n=L:"height"==Q?p=L:"left"==Q&&0<L.length?B=L:"top"==Q&&0<L.length?
-x=L:"ignore"==Q?Z=L.split(","):"connect"==Q?S.push(JSON.parse(L)):"link"==Q?aa=L:"padding"==Q?H=parseFloat(L):"edgespacing"==Q?G=parseFloat(L):"nodespacing"==Q?C=parseFloat(L):"levelspacing"==Q?F=parseFloat(L):"layout"==Q&&(P=L)}}}var U=this.editor.csvToArray(c[N]),Q=Y=null;if(null!=h||null!=k)for(var R=0;R<U.length;R++)h==U[R]&&(Y=R),k==U[R]&&(Q=R);null==T&&(T="%"+U[0]+"%");if(null!=S)for(var O=0;O<S.length;O++)null==e[S[O].to]&&(e[S[O].to]={});A.model.beginUpdate();try{for(R=N+1;R<c.length;R++){var V=
-this.editor.csvToArray(c[R]);if(V.length==U.length){var J=null,X=null!=Y?l+V[Y]:null;null!=X&&(J=A.model.getCell(X));null==J&&(J=new mxCell(T,new mxGeometry(M,I,0,0),f||"whiteSpace=wrap;html=1;"),J.vertex=!0,J.id=X);for(var W=0;W<V.length;W++)A.setAttributeForCell(J,U[W],V[W]);A.setAttributeForCell(J,"placeholders","1");J.style=A.replacePlaceholders(J,J.style);for(O=0;O<S.length;O++)e[S[O].to][J.getAttribute(S[O].to)]=J;null!=aa&&"link"!=aa&&(A.setLinkForCell(J,J.getAttribute(aa)),A.setAttributeForCell(J,
-aa,null));A.fireEvent(new mxEventObject("cellsInserted","cells",[J]));var da=this.editor.graph.getPreferredSizeForCell(J);J.vertex&&(null!=B&&null!=J.getAttribute(B)&&(J.geometry.x=M+parseFloat(J.getAttribute(B))),null!=x&&null!=J.getAttribute(x)&&(J.geometry.y=K+parseFloat(J.getAttribute(x))),"@"==n.charAt(0)&&null!=J.getAttribute(n.substring(1))?J.geometry.width=parseFloat(J.getAttribute(n.substring(1))):J.geometry.width="auto"==n?da.width+H:parseFloat(n),"@"==p.charAt(0)&&null!=J.getAttribute(p.substring(1))?
-J.geometry.height=parseFloat(J.getAttribute(p.substring(1))):J.geometry.height="auto"==p?da.height+H:parseFloat(p),I+=J.geometry.height+C);k=null!=Q?A.model.getCell(l+V[Q]):null;null!=k?(k.style=A.replacePlaceholders(k,g),A.addCell(J,k)):d.push(A.addCell(J))}}for(var ba=d.slice(),ea=d.slice(),O=0;O<S.length;O++)for(var ca=S[O],R=0;R<d.length;R++){var J=d[R],la=J.getAttribute(ca.from);if(null!=la){A.setAttributeForCell(J,ca.from,null);for(var ma=la.split(","),W=0;W<ma.length;W++){var fa=e[ca.to][ma[W]];
-null!=fa&&(T=ca.label,null!=ca.fromlabel&&(T=(J.getAttribute(ca.fromlabel)||"")+(T||"")),null!=ca.tolabel&&(T=(T||"")+(fa.getAttribute(ca.tolabel)||"")),ea.push(A.insertEdge(null,null,T||"",ca.invert?fa:J,ca.invert?J:fa,ca.style||A.createCurrentEdgeStyle())),mxUtils.remove(ca.invert?J:fa,ba))}}}if(null!=Z)for(R=0;R<d.length;R++)for(J=d[R],W=0;W<Z.length;W++)A.setAttributeForCell(J,mxUtils.trim(Z[W]),null);var ia=new mxParallelEdgeLayout(A);ia.spacing=G;var na=function(){ia.execute(A.getDefaultParent());
-for(var a=0;a<d.length;a++){var b=A.getCellGeometry(d[a]);b.x=Math.round(A.snap(b.x));b.y=Math.round(A.snap(b.y));"auto"==n&&(b.width=Math.round(A.snap(b.width)));"auto"==p&&(b.height=Math.round(A.snap(b.height)))}};if("circle"==P){var ja=new mxCircleLayout(A);ja.resetEdges=!1;var oa=ja.isVertexIgnored;ja.isVertexIgnored=function(a){return oa.apply(this,arguments)||0>mxUtils.indexOf(d,a)};this.executeLayout(function(){ja.execute(A.getDefaultParent());na()},!0,E);E=null}else if("horizontaltree"==P||
-"verticaltree"==P||"auto"==P&&ea.length==2*d.length-1&&1==ba.length){A.view.validate();var ka=new mxCompactTreeLayout(A,"horizontaltree"==P);ka.levelDistance=C;ka.edgeRouting=!1;ka.resetEdges=!1;this.executeLayout(function(){ka.execute(A.getDefaultParent(),0<ba.length?ba[0]:null)},!0,E);E=null}else if("horizontalflow"==P||"verticalflow"==P||"auto"==P&&1==ba.length){A.view.validate();var ga=new mxHierarchicalLayout(A,"horizontalflow"==P?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);ga.intraCellSpacing=
-C;ga.parallelEdgeSpacing=G;ga.interRankCellSpacing=F;ga.disableEdgeStyle=!1;this.executeLayout(function(){ga.execute(A.getDefaultParent(),ea);A.moveCells(ea,M,K)},!0,E);E=null}else if("organic"==P||"auto"==P&&ea.length>d.length){A.view.validate();var ha=new mxFastOrganicLayout(A);ha.forceConstant=3*C;ha.resetEdges=!1;var pa=ha.isVertexIgnored;ha.isVertexIgnored=function(a){return pa.apply(this,arguments)||0>mxUtils.indexOf(d,a)};ia=new mxParallelEdgeLayout(A);ia.spacing=G;this.executeLayout(function(){ha.execute(A.getDefaultParent());
-na()},!0,E);E=null}this.hideDialog()}finally{A.model.endUpdate()}null!=E&&E()}}catch(qa){this.handleError(qa)}};EditorUi.prototype.getSearch=function(a){var b="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=a&&0<window.location.search.length){var c="?",d;for(d in urlParams)0>mxUtils.indexOf(a,d)&&null!=urlParams[d]&&(b+=c+d+"="+urlParams[d],c="&")}else b=window.location.search;return b};EditorUi.prototype.getUrl=function(a){a=null!=a?a:window.location.pathname;var b=0<a.indexOf("?")?1:0;
-if("1"==urlParams.offline)a+=window.location.search;else{var c="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),d;for(d in urlParams)0>mxUtils.indexOf(c,d)&&(a=0==b?a+"?":a+"&",null!=urlParams[d]&&(a+=d+"="+urlParams[d],b++))}return a};EditorUi.prototype.showLinkDialog=function(a,b,c){a=new LinkDialog(this,a,b,c,!0);this.showDialog(a.container,480,130,!0,!0);a.init()};var l=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=
-l.apply(this,arguments),c=this.editor.graph,d=b.getSourceGraphBounds;b.getSourceGraphBounds=function(){if(mxUtils.hasScrollbars(c.container)&&c.pageVisible&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width-2*a.x/b),Math.ceil(this.source.minimumGraphSize.height-2*a.y/b))}return d.apply(this,arguments)};var e=b.getSourceContainerSize;b.getSourceContainerSize=function(){if(mxUtils.hasScrollbars(c.container)&&
-null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width*b-2*a.x),Math.ceil(this.source.minimumGraphSize.height*b-2*a.y))}return e.apply(this,arguments)};b.getOutlineOffset=function(a){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var d=this.source.getPagePadding();return new mxPoint(Math.round(Math.max(0,(b.outline.container.clientWidth/a-(this.source.minimumGraphSize.width-
-2*d.x))/2)-d.x),Math.round(Math.max(0,(b.outline.container.clientHeight/a-(this.source.minimumGraphSize.height-2*d.y))/2)-d.y-5/a))}return new mxPoint(8/a,8/a)};var g=b.init;b.init=function(){g.apply(this,arguments);b.outline.view.getBackgroundPageBounds=function(){var a=c.getPageLayout(),b=c.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*b.width),this.scale*(this.translate.y+a.y*b.height),this.scale*a.width*b.width,this.scale*a.height*b.height)};b.outline.view.validateBackgroundPage()};
-this.editor.addListener("pageSelected",function(a,c){var d=c.getProperty("change"),e=b.source,f=b.outline;f.pageScale=e.pageScale;f.pageFormat=e.pageFormat;f.background=e.background;f.pageVisible=e.pageVisible;f.background=e.background;var g=mxUtils.getCurrentStyle(e.container);f.container.style.backgroundColor=g.backgroundColor;null!=e.view.backgroundPageShape&&null!=f.view.backgroundPageShape&&(f.view.backgroundPageShape.fill=e.view.backgroundPageShape.fill);b.outline.view.clear(d.previousPage.root,
-!0);b.outline.view.validate()});return b};EditorUi.prototype.getServiceCount=function(a,b){var c=0;null==this.drive&&"function"!==typeof window.DriveClient||c++;b||null==this.dropbox&&"function"!==typeof window.DropboxClient||c++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||c++;b||null==this.gitHub||c++;b||null==this.trello&&"function"!==typeof window.TrelloClient||c++;a&&isLocalStorage&&("1"==urlParams.browser||mxClient.IS_IOS)&&c++;mxClient.IS_IOS||c++;return c};EditorUi.prototype.updateUi=
-function(){this.updateButtonContainer();this.updateActionStates();var a=this.getCurrentFile(),b=null!=a||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(b);this.menus.get("viewZoom").setEnabled(b);var c=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==a||a.isRestricted());this.actions.get("makeCopy").setEnabled(!c);this.actions.get("print").setEnabled(!c);this.menus.get("exportAs").setEnabled(!c);this.menus.get("embed").setEnabled(!c);c="1"!=
-urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(c);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(c),this.menus.get("newLibrary").setEnabled(c));a="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=a&&a.isEditable();this.actions.get("image").setEnabled(b);this.actions.get("zoomIn").setEnabled(b);this.actions.get("zoomOut").setEnabled(b);this.actions.get("resetView").setEnabled(b);this.actions.get("undo").setEnabled(this.canUndo()&&
-a);this.actions.get("redo").setEnabled(this.canRedo()&&a);this.menus.get("edit").setEnabled(b);this.menus.get("view").setEnabled(b);this.menus.get("importFrom").setEnabled(a);this.menus.get("arrange").setEnabled(a);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(a),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(a));if(this.isAppCache()){var e=applicationCache;if(null!=e&&null==this.offlineStatus){this.offlineStatus=document.createElement("div");
-this.offlineStatus.className="geItem";this.offlineStatus.style.position="absolute";this.offlineStatus.style.fontSize="8pt";this.offlineStatus.style.top="2px";this.offlineStatus.style.right="12px";this.offlineStatus.style.color="#666";this.offlineStatus.style.margin="4px";this.offlineStatus.style.padding="2px";this.offlineStatus.style.verticalAlign="middle";this.offlineStatus.innerHTML="";this.menubarContainer.appendChild(this.offlineStatus);mxEvent.addListener(this.offlineStatus,"click",mxUtils.bind(this,
-function(){var a=this.offlineStatus.getElementsByTagName("img");null!=a&&0<a.length&&this.alert(a[0].getAttribute("title"))}));var e=window.applicationCache,g=null,b=mxUtils.bind(this,function(){var a=e.status,b;a==e.CHECKING&&(a=e.DOWNLOADING);switch(a){case e.UNCACHED:b="";break;case e.IDLE:b="min"==uiTheme?"":'<img title="draw.io is up to date." border="0" src="'+IMAGE_PATH+'/checkmark.gif"/>';break;case e.DOWNLOADING:b='<img title="Downloading new version..." border="0" src="'+IMAGE_PATH+'/spin.gif"/>';
-break;case e.UPDATEREADY:b='<img title="'+mxUtils.htmlEntities(mxResources.get("restartForChangeRequired"))+'" border="0" src="'+IMAGE_PATH+'/download.png"/>';break;case e.OBSOLETE:b='<img title="Obsolete" border="0" src="'+IMAGE_PATH+'/clear.gif"/>';break;default:b='<img title="Unknown" border="0" src="'+IMAGE_PATH+'/clear.gif"/>'}a!=g&&(this.offlineStatus.innerHTML=b,g=a)});mxEvent.addListener(e,"checking",b);mxEvent.addListener(e,"noupdate",b);mxEvent.addListener(e,"downloading",b);mxEvent.addListener(e,
-"progress",b);mxEvent.addListener(e,"cached",b);mxEvent.addListener(e,"updateready",b);mxEvent.addListener(e,"obsolete",b);mxEvent.addListener(e,"error",b);b()}}else this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.isDiagramActive=function(){var a=this.getCurrentFile();return null!=a&&a.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var p=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=
-function(){p.apply(this,arguments);var a=this.editor.graph,b=this.isDiagramActive(),c=this.getCurrentFile();this.actions.get("pageSetup").setEnabled(b);this.actions.get("autosave").setEnabled(null!=c&&c.isEditable()&&c.isAutosaveOptional());this.actions.get("guides").setEnabled(b);this.actions.get("editData").setEnabled(b);this.actions.get("shadowVisible").setEnabled(b);this.actions.get("connectionArrows").setEnabled(b);this.actions.get("connectionPoints").setEnabled(b);this.actions.get("copyStyle").setEnabled(b&&
-!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("editGeometry").setEnabled(a.getModel().isVertex(a.getSelectionCell()));this.actions.get("createShape").setEnabled(b);this.actions.get("createRevision").setEnabled(b);this.actions.get("moveToFolder").setEnabled(null!=c);this.actions.get("makeCopy").setEnabled(null!=c&&!c.isRestricted());this.actions.get("editDiagram").setEnabled(b&&(null==c||!c.isRestricted()));this.actions.get("publishLink").setEnabled(null!=
-c&&!c.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("find").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=c&&c.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=c);
-this.menus.get("publish").setEnabled(null!=c&&!c.isRestricted());a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(b&&null!=a&&null!=a.shape&&null!=a.shape.stencil)};var n=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){this.editUpdateListener&&(this.editor.undoManager.removeListener(this.editUpdateListener),this.editUpdateListener=null);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);n.apply(this,
-arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,b,c,e,g,h){var d=a.editor.graph;if("xml"==c)a.hideDialog(),a.saveData(b,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("svg"==c)a.hideDialog(),a.saveData(b,"svg",mxUtils.getXml(d.getSvg(e,g,h)),"image/svg+xml");else{var f=a.getFileData(!0,null,null,null,null,!0),k=d.getGraphBounds(),l=Math.floor(k.width*g/d.view.scale),m=Math.floor(k.height*g/d.view.scale);
-f.length<=MAX_REQUEST_SIZE&&l*m<MAX_AREA?(a.hideDialog(),a.saveRequest(b,c,function(a,b){return new mxXmlRequest(EXPORT_URL,"format="+c+"&base64="+(b||"0")+(null!=a?"&filename="+encodeURIComponent(a):"")+"&bg="+(null!=e?e:"none")+"&w="+l+"&h="+m+"&border="+h+"&xml="+encodeURIComponent(f))})):mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.updateEditReferences=function(a){for(var b=0;b<a.changes.length;b++){var c=a.changes[b];if(null!=c&&c.constructor==mxChildChange&&null!=
-c.child){var d=c.child;if(null!=d.source&&null!=d.source.id){var e=this.getFutureCellForEdit(c.model,a,d.source.id);e!=d.source&&(d.source=e)}null!=d.target&&null!=d.target.id&&(c=this.getFutureCellForEdit(c.model,a,d.target.id),c!=d.target&&(d.target=c))}}};EditorUi.prototype.getFutureCellForEdit=function(a,b,c){var d=a.getCell(c);if(null==d)for(var e=b.changes.length-1;0<=e;e--){var g=b.changes[e];if(g.constructor==mxChildChange&&null!=g.child&&g.child.id==c){a.contains(g.previous)&&(d=g.child);
-break}}return d}})();EditorUi.DIFF_INSERT="i";EditorUi.DIFF_REMOVE="r";EditorUi.DIFF_UPDATE="u";EditorUi.prototype.codec=new mxCodec;EditorUi.prototype.viewStateProperties={background:!0,backgroundImage:!0,shadowVisible:!0,foldingEnabled:!0,pageScale:!0,mathEnabled:!0,pageFormat:!0};EditorUi.prototype.cellProperties={id:!0,value:!0,xmlValue:!0,vertex:!0,edge:!0,visible:!0,collapsed:!0,connectable:!0,parent:!0,children:!0,previous:!0,source:!0,target:!0,edges:!0,geometry:!0,style:!0,mxObjectId:!0,mxTransient:!0};
+640,520,!0,!0);this.importCsvDialog.init()};EditorUi.prototype.importCsv=function(a,b){try{var c=a.split("\n"),d=[];if(0<c.length){var e={},f=null,g=null,h=null,k=null,l="",n="auto",p="auto",B=null,x=null,G=40,C=40,F=100,H=0,A=this.editor.graph;A.getGraphBounds();for(var E=function(){null!=b?b(ea):(A.setSelectionCells(ea),A.scrollCellToVisible(A.getSelectionCell()))},I=A.getFreeInsertPoint(),M=I.x,K=I.y,I=K,T=null,Q="auto",k=null,S=[],Z=null,Y=null,N=0;N<c.length&&"#"==c[N].charAt(0);){a=c[N];for(N++;N<
+c.length&&"\\"==a.charAt(a.length-1)&&"#"==c[N].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(c[N].substring(1)),N++;if("#"!=a.charAt(1)){var X=a.indexOf(":");if(0<X){var R=mxUtils.trim(a.substring(1,X)),L=mxUtils.trim(a.substring(X+1));"label"==R?T=A.sanitizeHtml(L):"style"==R?f=L:"parentstyle"==R?g=L:"identity"==R&&0<L.length&&"-"!=L?h=L:"parent"==R&&0<L.length&&"-"!=L?k=L:"namespace"==R&&0<L.length&&"-"!=L?l=L:"width"==R?n=L:"height"==R?p=L:"left"==R&&0<L.length?B=L:"top"==R&&0<L.length?
+x=L:"ignore"==R?Y=L.split(","):"connect"==R?S.push(JSON.parse(L)):"link"==R?Z=L:"padding"==R?H=parseFloat(L):"edgespacing"==R?G=parseFloat(L):"nodespacing"==R?C=parseFloat(L):"levelspacing"==R?F=parseFloat(L):"layout"==R&&(Q=L)}}}var U=this.editor.csvToArray(c[N]),R=X=null;if(null!=h||null!=k)for(var O=0;O<U.length;O++)h==U[O]&&(X=O),k==U[O]&&(R=O);null==T&&(T="%"+U[0]+"%");if(null!=S)for(var P=0;P<S.length;P++)null==e[S[P].to]&&(e[S[P].to]={});A.model.beginUpdate();try{for(O=N+1;O<c.length;O++){var V=
+this.editor.csvToArray(c[O]);if(null==V){var ba=40<c[O].length?c[O].substring(0,40)+"...":c[O];throw Error(O+" ("+ba+") "+mxResources.get("containsValidationErrors"));}if(V.length==U.length){var J=null,ca=null!=X?l+V[X]:null;null!=ca&&(J=A.model.getCell(ca));null==J&&(J=new mxCell(T,new mxGeometry(M,I,0,0),f||"whiteSpace=wrap;html=1;"),J.vertex=!0,J.id=ca);for(var W=0;W<V.length;W++)A.setAttributeForCell(J,U[W],V[W]);A.setAttributeForCell(J,"placeholders","1");J.style=A.replacePlaceholders(J,J.style);
+for(P=0;P<S.length;P++)e[S[P].to][J.getAttribute(S[P].to)]=J;null!=Z&&"link"!=Z&&(A.setLinkForCell(J,J.getAttribute(Z)),A.setAttributeForCell(J,Z,null));A.fireEvent(new mxEventObject("cellsInserted","cells",[J]));var da=this.editor.graph.getPreferredSizeForCell(J);J.vertex&&(null!=B&&null!=J.getAttribute(B)&&(J.geometry.x=M+parseFloat(J.getAttribute(B))),null!=x&&null!=J.getAttribute(x)&&(J.geometry.y=K+parseFloat(J.getAttribute(x))),"@"==n.charAt(0)&&null!=J.getAttribute(n.substring(1))?J.geometry.width=
+parseFloat(J.getAttribute(n.substring(1))):J.geometry.width="auto"==n?da.width+H:parseFloat(n),"@"==p.charAt(0)&&null!=J.getAttribute(p.substring(1))?J.geometry.height=parseFloat(J.getAttribute(p.substring(1))):J.geometry.height="auto"==p?da.height+H:parseFloat(p),I+=J.geometry.height+C);k=null!=R?A.model.getCell(l+V[R]):null;null!=k?(k.style=A.replacePlaceholders(k,g),A.addCell(J,k)):d.push(A.addCell(J))}}for(var fa=d.slice(),ea=d.slice(),P=0;P<S.length;P++)for(var aa=S[P],O=0;O<d.length;O++){var J=
+d[O],na=J.getAttribute(aa.from);if(null!=na){A.setAttributeForCell(J,aa.from,null);for(var ma=na.split(","),W=0;W<ma.length;W++){var ga=e[aa.to][ma[W]];null!=ga&&(T=aa.label,null!=aa.fromlabel&&(T=(J.getAttribute(aa.fromlabel)||"")+(T||"")),null!=aa.tolabel&&(T=(T||"")+(ga.getAttribute(aa.tolabel)||"")),ea.push(A.insertEdge(null,null,T||"",aa.invert?ga:J,aa.invert?J:ga,aa.style||A.createCurrentEdgeStyle())),mxUtils.remove(aa.invert?J:ga,fa))}}}if(null!=Y)for(O=0;O<d.length;O++)for(J=d[O],W=0;W<Y.length;W++)A.setAttributeForCell(J,
+mxUtils.trim(Y[W]),null);var ja=new mxParallelEdgeLayout(A);ja.spacing=G;var oa=function(){ja.execute(A.getDefaultParent());for(var a=0;a<d.length;a++){var b=A.getCellGeometry(d[a]);b.x=Math.round(A.snap(b.x));b.y=Math.round(A.snap(b.y));"auto"==n&&(b.width=Math.round(A.snap(b.width)));"auto"==p&&(b.height=Math.round(A.snap(b.height)))}};if("circle"==Q){var ka=new mxCircleLayout(A);ka.resetEdges=!1;var pa=ka.isVertexIgnored;ka.isVertexIgnored=function(a){return pa.apply(this,arguments)||0>mxUtils.indexOf(d,
+a)};this.executeLayout(function(){ka.execute(A.getDefaultParent());oa()},!0,E);E=null}else if("horizontaltree"==Q||"verticaltree"==Q||"auto"==Q&&ea.length==2*d.length-1&&1==fa.length){A.view.validate();var la=new mxCompactTreeLayout(A,"horizontaltree"==Q);la.levelDistance=C;la.edgeRouting=!1;la.resetEdges=!1;this.executeLayout(function(){la.execute(A.getDefaultParent(),0<fa.length?fa[0]:null)},!0,E);E=null}else if("horizontalflow"==Q||"verticalflow"==Q||"auto"==Q&&1==fa.length){A.view.validate();
+var ha=new mxHierarchicalLayout(A,"horizontalflow"==Q?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);ha.intraCellSpacing=C;ha.parallelEdgeSpacing=G;ha.interRankCellSpacing=F;ha.disableEdgeStyle=!1;this.executeLayout(function(){ha.execute(A.getDefaultParent(),ea);A.moveCells(ea,M,K)},!0,E);E=null}else if("organic"==Q||"auto"==Q&&ea.length>d.length){A.view.validate();var ia=new mxFastOrganicLayout(A);ia.forceConstant=3*C;ia.resetEdges=!1;var qa=ia.isVertexIgnored;ia.isVertexIgnored=function(a){return qa.apply(this,
+arguments)||0>mxUtils.indexOf(d,a)};ja=new mxParallelEdgeLayout(A);ja.spacing=G;this.executeLayout(function(){ia.execute(A.getDefaultParent());oa()},!0,E);E=null}this.hideDialog()}finally{A.model.endUpdate()}null!=E&&E()}}catch(ra){this.handleError(ra)}};EditorUi.prototype.getSearch=function(a){var b="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=a&&0<window.location.search.length){var c="?",d;for(d in urlParams)0>mxUtils.indexOf(a,d)&&null!=urlParams[d]&&(b+=c+d+"="+urlParams[d],c="&")}else b=
+window.location.search;return b};EditorUi.prototype.getUrl=function(a){a=null!=a?a:window.location.pathname;var b=0<a.indexOf("?")?1:0;if("1"==urlParams.offline)a+=window.location.search;else{var c="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),d;for(d in urlParams)0>mxUtils.indexOf(c,d)&&(a=0==b?a+"?":a+"&",null!=urlParams[d]&&(a+=d+"="+urlParams[d],b++))}return a};EditorUi.prototype.showLinkDialog=function(a,b,c){a=new LinkDialog(this,a,b,c,
+!0);this.showDialog(a.container,480,130,!0,!0);a.init()};var l=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=l.apply(this,arguments),c=this.editor.graph,d=b.getSourceGraphBounds;b.getSourceGraphBounds=function(){if(mxUtils.hasScrollbars(c.container)&&c.pageVisible&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width-2*a.x/b),Math.ceil(this.source.minimumGraphSize.height-
+2*a.y/b))}return d.apply(this,arguments)};var e=b.getSourceContainerSize;b.getSourceContainerSize=function(){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width*b-2*a.x),Math.ceil(this.source.minimumGraphSize.height*b-2*a.y))}return e.apply(this,arguments)};b.getOutlineOffset=function(a){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var d=
+this.source.getPagePadding();return new mxPoint(Math.round(Math.max(0,(b.outline.container.clientWidth/a-(this.source.minimumGraphSize.width-2*d.x))/2)-d.x),Math.round(Math.max(0,(b.outline.container.clientHeight/a-(this.source.minimumGraphSize.height-2*d.y))/2)-d.y-5/a))}return new mxPoint(8/a,8/a)};var g=b.init;b.init=function(){g.apply(this,arguments);b.outline.view.getBackgroundPageBounds=function(){var a=c.getPageLayout(),b=c.getPageSize();return new mxRectangle(this.scale*(this.translate.x+
+a.x*b.width),this.scale*(this.translate.y+a.y*b.height),this.scale*a.width*b.width,this.scale*a.height*b.height)};b.outline.view.validateBackgroundPage()};this.editor.addListener("pageSelected",function(a,c){var d=c.getProperty("change"),e=b.source,f=b.outline;f.pageScale=e.pageScale;f.pageFormat=e.pageFormat;f.background=e.background;f.pageVisible=e.pageVisible;f.background=e.background;var g=mxUtils.getCurrentStyle(e.container);f.container.style.backgroundColor=g.backgroundColor;null!=e.view.backgroundPageShape&&
+null!=f.view.backgroundPageShape&&(f.view.backgroundPageShape.fill=e.view.backgroundPageShape.fill);b.outline.view.clear(d.previousPage.root,!0);b.outline.view.validate()});return b};EditorUi.prototype.getServiceCount=function(a,b){var c=0;null==this.drive&&"function"!==typeof window.DriveClient||c++;b||null==this.dropbox&&"function"!==typeof window.DropboxClient||c++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||c++;b||null==this.gitHub||c++;b||null==this.trello&&"function"!==typeof window.TrelloClient||
+c++;a&&isLocalStorage&&("1"==urlParams.browser||mxClient.IS_IOS)&&c++;mxClient.IS_IOS||c++;return c};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var a=this.getCurrentFile(),b=null!=a||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(b);this.menus.get("viewZoom").setEnabled(b);var c=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==a||a.isRestricted());this.actions.get("makeCopy").setEnabled(!c);
+this.actions.get("print").setEnabled(!c);this.menus.get("exportAs").setEnabled(!c);this.menus.get("embed").setEnabled(!c);c="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(c);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(c),this.menus.get("newLibrary").setEnabled(c));a="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=a&&a.isEditable();this.actions.get("image").setEnabled(b);this.actions.get("zoomIn").setEnabled(b);this.actions.get("zoomOut").setEnabled(b);
+this.actions.get("resetView").setEnabled(b);this.actions.get("undo").setEnabled(this.canUndo()&&a);this.actions.get("redo").setEnabled(this.canRedo()&&a);this.menus.get("edit").setEnabled(b);this.menus.get("view").setEnabled(b);this.menus.get("importFrom").setEnabled(a);this.menus.get("arrange").setEnabled(a);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(a),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(a));if(this.isAppCache()){var e=
+applicationCache;if(null!=e&&null==this.offlineStatus){this.offlineStatus=document.createElement("div");this.offlineStatus.className="geItem";this.offlineStatus.style.position="absolute";this.offlineStatus.style.fontSize="8pt";this.offlineStatus.style.top="2px";this.offlineStatus.style.right="12px";this.offlineStatus.style.color="#666";this.offlineStatus.style.margin="4px";this.offlineStatus.style.padding="2px";this.offlineStatus.style.verticalAlign="middle";this.offlineStatus.innerHTML="";this.menubarContainer.appendChild(this.offlineStatus);
+mxEvent.addListener(this.offlineStatus,"click",mxUtils.bind(this,function(){var a=this.offlineStatus.getElementsByTagName("img");null!=a&&0<a.length&&this.alert(a[0].getAttribute("title"))}));var e=window.applicationCache,g=null,b=mxUtils.bind(this,function(){var a=e.status,b;a==e.CHECKING&&(a=e.DOWNLOADING);switch(a){case e.UNCACHED:b="";break;case e.IDLE:b="min"==uiTheme?"":'<img title="draw.io is up to date." border="0" src="'+IMAGE_PATH+'/checkmark.gif"/>';break;case e.DOWNLOADING:b='<img title="Downloading new version..." border="0" src="'+
+IMAGE_PATH+'/spin.gif"/>';break;case e.UPDATEREADY:b='<img title="'+mxUtils.htmlEntities(mxResources.get("restartForChangeRequired"))+'" border="0" src="'+IMAGE_PATH+'/download.png"/>';break;case e.OBSOLETE:b='<img title="Obsolete" border="0" src="'+IMAGE_PATH+'/clear.gif"/>';break;default:b='<img title="Unknown" border="0" src="'+IMAGE_PATH+'/clear.gif"/>'}a!=g&&(this.offlineStatus.innerHTML=b,g=a)});mxEvent.addListener(e,"checking",b);mxEvent.addListener(e,"noupdate",b);mxEvent.addListener(e,"downloading",
+b);mxEvent.addListener(e,"progress",b);mxEvent.addListener(e,"cached",b);mxEvent.addListener(e,"updateready",b);mxEvent.addListener(e,"obsolete",b);mxEvent.addListener(e,"error",b);b()}}else this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.isDiagramActive=function(){var a=this.getCurrentFile();return null!=a&&a.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var p=EditorUi.prototype.updateActionStates;
+EditorUi.prototype.updateActionStates=function(){p.apply(this,arguments);var a=this.editor.graph,b=this.isDiagramActive(),c=this.getCurrentFile();this.actions.get("pageSetup").setEnabled(b);this.actions.get("autosave").setEnabled(null!=c&&c.isEditable()&&c.isAutosaveOptional());this.actions.get("guides").setEnabled(b);this.actions.get("editData").setEnabled(b);this.actions.get("shadowVisible").setEnabled(b);this.actions.get("connectionArrows").setEnabled(b);this.actions.get("connectionPoints").setEnabled(b);
+this.actions.get("copyStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("editGeometry").setEnabled(a.getModel().isVertex(a.getSelectionCell()));this.actions.get("createShape").setEnabled(b);this.actions.get("createRevision").setEnabled(b);this.actions.get("moveToFolder").setEnabled(null!=c);this.actions.get("makeCopy").setEnabled(null!=c&&!c.isRestricted());this.actions.get("editDiagram").setEnabled(b&&(null==c||!c.isRestricted()));
+this.actions.get("publishLink").setEnabled(null!=c&&!c.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("find").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=c&&c.isRenamable()||"1"==urlParams.embed);
+this.actions.get("close").setEnabled(null!=c);this.menus.get("publish").setEnabled(null!=c&&!c.isRestricted());a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(b&&null!=a&&null!=a.shape&&null!=a.shape.stencil)};var n=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){this.editUpdateListener&&(this.editor.undoManager.removeListener(this.editUpdateListener),this.editUpdateListener=null);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),
+this.exportDialog=null);n.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,b,c,e,g,h){var d=a.editor.graph;if("xml"==c)a.hideDialog(),a.saveData(b,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("svg"==c)a.hideDialog(),a.saveData(b,"svg",mxUtils.getXml(d.getSvg(e,g,h)),"image/svg+xml");else{var f=a.getFileData(!0,null,null,null,null,!0),k=d.getGraphBounds(),l=Math.floor(k.width*g/d.view.scale),
+m=Math.floor(k.height*g/d.view.scale);f.length<=MAX_REQUEST_SIZE&&l*m<MAX_AREA?(a.hideDialog(),a.saveRequest(b,c,function(a,b){return new mxXmlRequest(EXPORT_URL,"format="+c+"&base64="+(b||"0")+(null!=a?"&filename="+encodeURIComponent(a):"")+"&bg="+(null!=e?e:"none")+"&w="+l+"&h="+m+"&border="+h+"&xml="+encodeURIComponent(f))})):mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.updateEditReferences=function(a){for(var b=0;b<a.changes.length;b++){var c=a.changes[b];if(null!=c&&
+c.constructor==mxChildChange&&null!=c.child){var d=c.child;if(null!=d.source&&null!=d.source.id){var e=this.getFutureCellForEdit(c.model,a,d.source.id);e!=d.source&&(d.source=e)}null!=d.target&&null!=d.target.id&&(c=this.getFutureCellForEdit(c.model,a,d.target.id),c!=d.target&&(d.target=c))}}};EditorUi.prototype.getFutureCellForEdit=function(a,b,c){var d=a.getCell(c);if(null==d)for(var e=b.changes.length-1;0<=e;e--){var g=b.changes[e];if(g.constructor==mxChildChange&&null!=g.child&&g.child.id==c){a.contains(g.previous)&&
+(d=g.child);break}}return d}})();EditorUi.DIFF_INSERT="i";EditorUi.DIFF_REMOVE="r";EditorUi.DIFF_UPDATE="u";EditorUi.prototype.codec=new mxCodec;EditorUi.prototype.viewStateProperties={background:!0,backgroundImage:!0,shadowVisible:!0,foldingEnabled:!0,pageScale:!0,mathEnabled:!0,pageFormat:!0};EditorUi.prototype.cellProperties={id:!0,value:!0,xmlValue:!0,vertex:!0,edge:!0,visible:!0,collapsed:!0,connectable:!0,parent:!0,children:!0,previous:!0,source:!0,target:!0,edges:!0,geometry:!0,style:!0,mxObjectId:!0,mxTransient:!0};
EditorUi.prototype.patchPages=function(a,c,b,e,g){var h={},l=[],p={},n={},d={},f={};if(null!=e&&null!=e[EditorUi.DIFF_UPDATE])for(var m in e[EditorUi.DIFF_UPDATE])h[m]=e[EditorUi.DIFF_UPDATE][m];if(null!=c[EditorUi.DIFF_REMOVE])for(e=0;e<c[EditorUi.DIFF_REMOVE].length;e++)n[c[EditorUi.DIFF_REMOVE][e]]=!0;if(null!=c[EditorUi.DIFF_INSERT])for(e=0;e<c[EditorUi.DIFF_INSERT].length;e++)p[c[EditorUi.DIFF_INSERT][e].previous]=c[EditorUi.DIFF_INSERT][e];if(null!=c[EditorUi.DIFF_UPDATE])for(m in c[EditorUi.DIFF_UPDATE])e=
c[EditorUi.DIFF_UPDATE][m],null!=e.previous&&(f[e.previous]=m);if(null!=a){var q="";for(e=0;e<a.length;e++){var t=a[e].getId();d[t]=a[e];null!=f[q]||n[t]||null!=c[EditorUi.DIFF_UPDATE]&&null!=c[EditorUi.DIFF_UPDATE][t]&&null!=c[EditorUi.DIFF_UPDATE][t].previous||(f[q]=t);q=t}}var u={},w=mxUtils.bind(this,function(a){var e=null!=a?a.getId():"";if(null!=a&&!u[e]){u[e]=!0;l.push(a);var k=null!=c[EditorUi.DIFF_UPDATE]?c[EditorUi.DIFF_UPDATE][e]:null;null!=k&&(this.updatePageRoot(a),null!=k.name&&a.setName(k.name),
null!=k.view&&this.patchViewState(a,k.view),null!=k.cells&&this.patchPage(a,k.cells,h[a.getId()],g),!b||null==k.cells&&null==k.view||(a.needsUpdate=!0))}a=f[e];null!=a&&(delete f[e],w(d[a]));a=p[e];null!=a&&(delete p[e],y(a))}),y=mxUtils.bind(this,function(a){a=mxUtils.parseXml(a.data).documentElement;a=new DiagramPage(a);this.updatePageRoot(a);var c=d[a.getId()];null==c?w(a):(c.root=a.root,this.currentPage==c?this.editor.graph.model.setRoot(c.root):b&&(c.needsUpdate=!0))});w();for(m in f)w(d[f[m]]),
@@ -8253,7 +8254,7 @@ b&&b();else if(null==g||!g()){var d=null,m=[],q=[];if(200<=c.getStatus()&&299>=c
DrawioFileSync.prototype.reload=function(a,c,b){this.file.updateFile(mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.updateStatus();this.start();null!=a&&a()}),mxUtils.bind(this,function(a){null!=c&&c(a)}),b)};
DrawioFileSync.prototype.merge=function(a,c,b,e,g,h){try{this.lastModified=new Date;this.file.shadowPages=null!=this.file.shadowPages?this.file.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.file.shadowData).documentElement);this.file.checkShadow(this.file.shadowPages);this.file.backupPatch=this.file.isModified()?this.ui.diffPages(this.file.shadowPages,this.ui.pages):null;if(!this.file.ignorePatches(a)){this.file.stats.merged++;for(var l=0;l<a.length;l++)this.file.shadowPages=this.ui.patchPages(this.file.shadowPages,
a[l]);var l={},p=null!=c?this.ui.getHashValueForPages(this.file.shadowPages,l):null;"1"==urlParams.test&&EditorUi.debug("Sync.merge",[this],"from",this.file.getCurrentEtag(),"to",b,"backup",this.file.backupPatch,"attempt",this.catchupRetryCount,"details",h,l,"patches",a,"checksum",c==p,c);if(null!=c&&c!=p){var n=this.ui.hashValue(this.file.getCurrentEtag()),d=this.ui.hashValue(b);this.file.checksumError(g,a,"Checksum: "+c+"\nFrom: "+n+"\nTo: "+d+(null!=h&&0<h.length?"\nDetails: "+h.join(", "):"")+
-"\nCurrent: "+p+(null!=l?"\nCurrent Details: "+JSON.stringify(l):""));return}this.file.patch(a,DrawioFile.LAST_WRITE_WINS?this.file.backupPatch:null)}this.file.invalidChecksum=!1;this.file.inConflictState=!1;this.file.setCurrentEtag(b);this.file.backupPatch=null;this.file.checkPages();null!=e&&e()}catch(f){this.file.inConflictState=!0;this.file.invalidChecksum=!0;null!=g&&g(f);try{this.file.sendErrorReport("Error in merge",null,f)}catch(m){}}};
+"\nCurrent: "+p+(null!=l?"\nCurrent Details: "+JSON.stringify(l):""),b);return}this.file.patch(a,DrawioFile.LAST_WRITE_WINS?this.file.backupPatch:null)}this.file.invalidChecksum=!1;this.file.inConflictState=!1;this.file.setCurrentEtag(b);this.file.backupPatch=null;this.file.checkPages();null!=e&&e()}catch(f){this.file.inConflictState=!0;this.file.invalidChecksum=!0;null!=g&&g(f);try{this.file.sendErrorReport("Error in merge",null,f)}catch(m){}}};
DrawioFileSync.prototype.descriptorChanged=function(a){this.lastModified=this.file.getLastModifiedDate();if(null!=this.channelId){var c=this.objectToString(this.createMessage({a:"desc",m:this.lastModified.getTime()})),b=this.file.getCurrentEtag(),e=this.objectToString({});mxUtils.post(this.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(a)+"&to="+encodeURIComponent(b)+"&msg="+encodeURIComponent(c)+"&data="+encodeURIComponent(e));this.file.stats.bytesSent+=e.length;this.file.stats.msgSent++}this.updateStatus()};
DrawioFileSync.prototype.objectToString=function(a){a=this.ui.editor.graph.compress(JSON.stringify(a));null!=this.key&&"undefined"!==typeof CryptoJS&&(a=CryptoJS.AES.encrypt(a,this.key).toString());return a};DrawioFileSync.prototype.stringToObject=function(a){null!=this.key&&"undefined"!==typeof CryptoJS&&(a=CryptoJS.AES.decrypt(a,this.key).toString(CryptoJS.enc.Utf8));return JSON.parse(this.ui.editor.graph.decompress(a))};
DrawioFileSync.prototype.fileSaved=function(a,c,b,e){this.lastModified=this.file.getLastModifiedDate();this.resetUpdateStatusThread();this.catchupRetryCount=0;if(!this.ui.isOffline()&&!this.file.inConflictState&&!this.redirectDialogShowing&&(this.start(),null!=this.channelId)){var g=null!=this.file.shadowPages?this.file.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.file.shadowData).documentElement),h={v:EditorUi.VERSION,t:(new Date).toISOString(),ua:navigator.userAgent};e=this.ui.getHashValueForPages(a,
@@ -8448,8 +8449,8 @@ window.location.hostname||"test.draw.io"==window.location.hostname||"drive.draw.
mxClient.IS_SVG||a.isOffline()||((new Image).src=IMAGE_PATH+"/help.png");a.actions.addAction("new...",function(){var b=a.isOffline(),c=new NewDialog(a,b);a.showDialog(c.container,b?350:620,b?70:440,!0,!0,function(b){b&&null==a.getCurrentFile()&&a.showSplash()});c.init()});a.actions.put("exportSvg",new Action(mxResources.get("formatSvg")+"...",function(){a.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,
function(b,c,d,e,f,g,h,l,m,n){b=parseInt(b);!isNaN(b)&&0<b&&a.exportSvg(b/100,c,d,e,f,g,h,!l,m,n)}),!0,null,"svg")}));a.actions.put("exportXml",new Action(mxResources.get("formatXml")+"...",function(){var b=document.createElement("div");b.style.whiteSpace="nowrap";var c=null==a.pages||1>=a.pages.length,d=document.createElement("h3");mxUtils.write(d,mxResources.get("formatXml"));d.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";b.appendChild(d);var f=a.addCheckbox(b,mxResources.get("selectionOnly"),
!1,e.isSelectionEmpty()),g=a.addCheckbox(b,mxResources.get(c?"compressed":"allPages"),!0);g.style.marginBottom="16px";mxEvent.addListener(f,"change",function(){f.checked?g.setAttribute("disabled","disabled"):g.removeAttribute("disabled")});b=new CustomDialog(a,b,mxUtils.bind(this,function(){a.downloadFile("xml",c?!g.checked:null,null,!f.checked,c?null:!g.checked)}),null,mxResources.get("export"));a.showDialog(b.container,300,146,!0,!0)}));a.actions.put("exportUrl",new Action(mxResources.get("url")+
-"...",function(){a.showPublishLinkDialog(mxResources.get("url"),!0,null,null,function(b,c,d,e,f,g){b=new EmbedDialog(a,a.createLink(b,c,d,e,f,g,null,!0));a.showDialog(b.container,440,240,!0,!0);b.init()})}));a.actions.put("exportHtml",new Action(mxResources.get("formatHtmlEmbedded")+"...",function(){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(b){a.spinner.stop();a.showHtmlDialog(mxResources.get("export"),null,b,function(b,c,d,e,k,f,g,h,l,m){a.createHtml(b,
-c,d,e,k,f,g,h,l,m,mxUtils.bind(this,function(b,c){var d=a.getBaseFilename(g),e='\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(d)+'</title>\n<meta charset="utf-8"/>\n</head>\n<body>'+b+"\n"+c+"\n</body>\n</html>";a.saveData(d+".html","html",e,"text/html")}))})})}));a.actions.put("exportPdf",new Action(mxResources.get("formatPdf")+"...",function(){if(a.isOffline()||a.printPdfExport)a.showDialog((new PrintDialog(a,
+"...",function(){a.showPublishLinkDialog(mxResources.get("url"),!0,null,null,function(b,c,d,e,f,g){b=new EmbedDialog(a,a.createLink(b,c,d,e,f,g,null,!0));a.showDialog(b.container,440,240,!0,!0);b.init()})}));a.actions.put("exportHtml",new Action(mxResources.get("formatHtmlEmbedded")+"...",function(){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(b){a.spinner.stop();a.showHtmlDialog(mxResources.get("export"),null,b,function(b,c,d,e,f,k,g,h,l,m){a.createHtml(b,
+c,d,e,f,k,g,h,l,m,mxUtils.bind(this,function(b,c){var d=a.getBaseFilename(g),e='\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(d)+'</title>\n<meta charset="utf-8"/>\n</head>\n<body>'+b+"\n"+c+"\n</body>\n</html>";a.saveData(d+".html","html",e,"text/html")}))})})}));a.actions.put("exportPdf",new Action(mxResources.get("formatPdf")+"...",function(){if(a.isOffline()||a.printPdfExport)a.showDialog((new PrintDialog(a,
mxResources.get("formatPdf"))).container,360,null!=a.pages&&1<a.pages.length?420:360,!0,!0);else{var b=null==a.pages||1>=a.pages.length,c=document.createElement("div");c.style.whiteSpace="nowrap";var d=document.createElement("h3");mxUtils.write(d,mxResources.get("formatPdf"));d.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";c.appendChild(d);var d=function(){g!=this&&this.checked?l.removeAttribute("disabled"):(l.setAttribute("disabled","disabled"),l.checked=!1)},f=146;
if(a.pdfPageExport&&!b){var g=a.addRadiobox(c,"pages",mxResources.get("allPages"),!0),f=a.addRadiobox(c,"pages",mxResources.get("currentPage",null,"Current Page"),!1),h=a.addRadiobox(c,"pages",mxResources.get("selectionOnly"),!1,e.isSelectionEmpty()),l=a.addCheckbox(c,mxResources.get("crop"),!1,!0);mxEvent.addListener(g,"change",d);mxEvent.addListener(f,"change",d);mxEvent.addListener(h,"change",d);f=205}else h=a.addCheckbox(c,mxResources.get("selectionOnly"),!1,e.isSelectionEmpty()),l=a.addCheckbox(c,
mxResources.get("crop"),!e.pageVisible||!a.pdfPageExport,!a.pdfPageExport),a.pdfPageExport||mxEvent.addListener(h,"change",d);c=new CustomDialog(a,c,mxUtils.bind(this,function(){a.downloadFile("pdf",null,null,!h.checked,b?!0:!g.checked,!l.checked)}),null,mxResources.get("export"));a.showDialog(c.container,300,f,!0,!0)}}));a.actions.addAction("open...",function(){a.pickFile()});a.actions.addAction("close",function(){function b(){a.fileLoaded(null)}var c=a.getCurrentFile();null!=c&&c.isModified()?a.confirm(mxResources.get("allChangesLost"),
diff --git a/src/main/webapp/js/diagramly/DrawioFile.js b/src/main/webapp/js/diagramly/DrawioFile.js
index 5b7805fd..0b46ee30 100644
--- a/src/main/webapp/js/diagramly/DrawioFile.js
+++ b/src/main/webapp/js/diagramly/DrawioFile.js
@@ -387,7 +387,7 @@ DrawioFile.prototype.compressReportData = function(data, limit, max)
/**
* Adds the listener for automatically saving the diagram for local changes.
*/
-DrawioFile.prototype.checksumError = function(error, patches, details)
+DrawioFile.prototype.checksumError = function(error, patches, details, etag)
{
this.stats.checksumErrors++;
this.inConflictState = true;
@@ -413,18 +413,46 @@ DrawioFile.prototype.checksumError = function(error, patches, details)
this.ui.anonymizePatch(patches[i]);
}
}
-
- var data = this.compressReportData(
- this.getAnonymizedXmlForPages(
- this.shadowPages), 20000);
- var json = this.compressReportData(
- JSON.stringify(patches, null, 2));
- this.sendErrorReport(
- 'Checksum Error',
- ((details != null) ? (details) : '') +
- '\n\nPatches:\n' + json +
- '\n\nData:\n' + data);
+ var fn = mxUtils.bind(this, function(file)
+ {
+ var data = this.compressReportData(
+ this.getAnonymizedXmlForPages(
+ this.shadowPages), 25000);
+ var json = this.compressReportData(
+ JSON.stringify(patches, null, 2));
+ var remote = (file != null) ? this.compressReportData(
+ this.getAnonymizedXmlForPages(
+ this.ui.getPagesForNode(
+ mxUtils.parseXml(file.data).documentElement)), 25000) : 'n/a';
+
+ this.sendErrorReport(
+ 'Checksum Error',
+ ((details != null) ? (details) : '') +
+ '\n\nPatches:\n' + json +
+ '\n\nLocal:\n' + data +
+ ((remote != null) ? ('\nRemote:\n' + remote) : ''),
+ null, 70000);
+ });
+
+ if (etag == null)
+ {
+ fn(null);
+ }
+ else
+ {
+ this.getLatestVersion(mxUtils.bind(this, function(file)
+ {
+ if (file != null && file.getCurrentEtag() == etag)
+ {
+ fn(file);
+ }
+ else
+ {
+ fn(null);
+ }
+ }), function() {});
+ }
}
catch (e)
{
@@ -435,7 +463,7 @@ DrawioFile.prototype.checksumError = function(error, patches, details)
/**
* Adds the listener for automatically saving the diagram for local changes.
*/
-DrawioFile.prototype.sendErrorReport = function(title, details, error)
+DrawioFile.prototype.sendErrorReport = function(title, details, error, max)
{
try
{
@@ -470,7 +498,7 @@ DrawioFile.prototype.sendErrorReport = function(title, details, error)
'\nSync=' + DrawioFile.SYNC +
'\n\nStats:\n' + JSON.stringify(this.stats, null, 2) +
((details != null) ? ('\n\n' + details) : '') +
- '\n\nStack:\n' + stack);
+ '\n\nStack:\n' + stack, max);
}
catch (e)
{
diff --git a/src/main/webapp/js/diagramly/DrawioFileSync.js b/src/main/webapp/js/diagramly/DrawioFileSync.js
index 3325827a..bce02ec0 100644
--- a/src/main/webapp/js/diagramly/DrawioFileSync.js
+++ b/src/main/webapp/js/diagramly/DrawioFileSync.js
@@ -897,7 +897,7 @@ DrawioFileSync.prototype.merge = function(patches, checksum, etag, success, erro
details.join(', ')) : '') +
'\nCurrent: ' + current +
((currentDetails != null) ? ('\nCurrent Details: ' +
- JSON.stringify(currentDetails)) : ''));
+ JSON.stringify(currentDetails)) : ''), etag);
// Abnormal termination
return;
diff --git a/src/main/webapp/js/diagramly/EditorUi.js b/src/main/webapp/js/diagramly/EditorUi.js
index f9482ea4..2a40b221 100644
--- a/src/main/webapp/js/diagramly/EditorUi.js
+++ b/src/main/webapp/js/diagramly/EditorUi.js
@@ -10810,7 +10810,13 @@
{
var values = this.editor.csvToArray(lines[i]);
- if (values.length == keys.length)
+ if (values == null)
+ {
+ var short = (lines[i].length > 40) ? lines[i].substring(0, 40) + '...' : lines[i];
+
+ throw new Error(i + ' (' + short + ') ' + mxResources.get('containsValidationErrors'));
+ }
+ else if (values.length == keys.length)
{
var cell = null;
var id = (identityIndex != null) ? namespace + values[identityIndex] : null;
diff --git a/src/main/webapp/js/embed-static.min.js b/src/main/webapp/js/embed-static.min.js
index 5c26bd46..afadd110 100644
--- a/src/main/webapp/js/embed-static.min.js
+++ b/src/main/webapp/js/embed-static.min.js
@@ -184,7 +184,7 @@ f)+"\n"+t+"}":"{"+z.join(",")+"}";f=t;return l}}"function"!==typeof Date.prototy
e=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,f,g,h={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},k;"function"!==typeof JSON.stringify&&(JSON.stringify=function(a,b,d){var e;g=f="";if("number"===typeof d)for(e=0;e<d;e+=1)g+=" ";else"string"===typeof d&&(g=d);if((k=b)&&"function"!==typeof b&&("object"!==typeof b||"number"!==typeof b.length))throw Error("JSON.stringify");return c("",{"":a})});
"function"!==typeof JSON.parse&&(JSON.parse=function(a,b){function c(a,d){var e,f,g=a[d];if(g&&"object"===typeof g)for(e in g)Object.prototype.hasOwnProperty.call(g,e)&&(f=c(g,e),void 0!==f?g[e]=f:delete g[e]);return b.call(a,d,g)}var e;a=""+a;d.lastIndex=0;d.test(a)&&(a=a.replace(d,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)}));if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return e=eval("("+a+")"),"function"===typeof b?c({"":e},""):e;throw new SyntaxError("JSON.parse");})})();"undefined"===typeof window.mxBasePath&&(window.mxBasePath="https://www.draw.io/mxgraph/");window.mxLoadStylesheets=window.mxLoadStylesheets||!1;window.mxLoadResources=window.mxLoadResources||!1;window.mxLanguage=window.mxLanguage||"en";window.urlParams=window.urlParams||{};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";
-window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"../../../src";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de"];var mxClient={VERSION:"10.0.28",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&
+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||"../../../src";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de"];var mxClient={VERSION:"10.0.29",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&
0>navigator.userAgent.indexOf("Edge/"),IS_OP:0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/"),IS_OT: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:0<=navigator.userAgent.indexOf("AppleWebKit/")&&
0>navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_IOS:navigator.userAgent.match(/(iPad|iPhone|iPod)/g)?!0:!1,IS_GC:0<=navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:0<=navigator.userAgent.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:0<=navigator.userAgent.indexOf("Firefox/")||0<=navigator.userAgent.indexOf("Iceweasel/")||0<=navigator.userAgent.indexOf("Seamonkey/")||0<=navigator.userAgent.indexOf("Iceape/")||0<=navigator.userAgent.indexOf("Galeon/")||
@@ -1070,7 +1070,7 @@ mxGraphView.prototype.getPerimeterPoint=function(a,b,c,d){var e=null;if(null!=a)
0)||g),b&&(e.x=2*d.getCenterX()-e.x),g&&(e.y=2*d.getCenterY()-e.y));e=f(d,a,e,c);null!=e&&(b&&(e.x=2*d.getCenterX()-e.x),g&&(e.y=2*d.getCenterY()-e.y))}null==e&&(e=this.getPoint(a))}return e};mxGraphView.prototype.getRoutingCenterX=function(a){var b=null!=a.style?parseFloat(a.style[mxConstants.STYLE_ROUTING_CENTER_X])||0:0;return a.getCenterX()+b*a.width};
mxGraphView.prototype.getRoutingCenterY=function(a){var b=null!=a.style?parseFloat(a.style[mxConstants.STYLE_ROUTING_CENTER_Y])||0:0;return a.getCenterY()+b*a.height};mxGraphView.prototype.getPerimeterBounds=function(a,b){b=null!=b?b:0;null!=a&&(b+=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]||0));return a.getPerimeterBounds(b*this.scale)};
mxGraphView.prototype.getPerimeterFunction=function(a){a=a.style[mxConstants.STYLE_PERIMETER];if("string"==typeof a){var b=mxStyleRegistry.getValue(a);null==b&&this.isAllowEval()&&(b=mxUtils.eval(a));a=b}return"function"==typeof a?a:null};mxGraphView.prototype.getNextPoint=function(a,b,c){a=a.absolutePoints;var d=null;null!=a&&2<=a.length&&(d=a.length,d=a[c?Math.min(1,d-1):Math.max(0,d-2)]);null==d&&null!=b&&(d=new mxPoint(b.getCenterX(),b.getCenterY()));return d};
-mxGraphView.prototype.getVisibleTerminal=function(a,b){for(var c=this.graph.getModel(),d=c.getTerminal(a,b),e=d;null!=d&&d!=this.currentRoot;){if(!this.graph.isCellVisible(e)||this.isCellCollapsed(d))e=d;d=c.getParent(d)}c.getParent(e)==c.getRoot()&&(e=null);return e};
+mxGraphView.prototype.getVisibleTerminal=function(a,b){for(var c=this.graph.getModel(),d=c.getTerminal(a,b),e=d;null!=d&&d!=this.currentRoot;){if(!this.graph.isCellVisible(e)||this.isCellCollapsed(d))e=d;d=c.getParent(d)}if(c.getParent(e)==c.getRoot()||e==this.currentRoot)e=null;return e};
mxGraphView.prototype.updateEdgeBounds=function(a){var b=a.absolutePoints,c=b[0],d=b[b.length-1];if(c.x!=d.x||c.y!=d.y){var e=d.x-c.x,f=d.y-c.y;a.terminalDistance=Math.sqrt(e*e+f*f)}else a.terminalDistance=0;var d=0,g=[],f=c;if(null!=f){for(var c=f.x,h=f.y,k=c,l=h,m=1;m<b.length;m++){var n=b[m];null!=n&&(e=f.x-n.x,f=f.y-n.y,e=Math.sqrt(e*e+f*f),g.push(e),d+=e,f=n,c=Math.min(f.x,c),h=Math.min(f.y,h),k=Math.max(f.x,k),l=Math.max(f.y,l))}a.length=d;a.segments=g;a.x=c;a.y=h;a.width=Math.max(1,k-c);a.height=
Math.max(1,l-h)}};
mxGraphView.prototype.getPoint=function(a,b){var c=a.getCenterX(),d=a.getCenterY();if(null==a.segments||null!=b&&!b.relative)null!=b&&(l=b.offset,null!=l&&(c+=l.x,d+=l.y));else{for(var e=a.absolutePoints.length,f=Math.round(((null!=b?b.x/2:0)+.5)*a.length),g=a.segments[0],h=0,k=1;f>=Math.round(h+g)&&k<e-1;)h+=g,g=a.segments[k++];e=0==g?0:(f-h)/g;f=a.absolutePoints[k-1];k=a.absolutePoints[k];if(null!=f&&null!=k){h=c=d=0;if(null!=b){var d=b.y,l=b.offset;null!=l&&(c=l.x,h=l.y)}l=k.x-f.x;k=k.y-f.y;c=
diff --git a/src/main/webapp/js/reader.min.js b/src/main/webapp/js/reader.min.js
index 49e63a3e..3cffeb00 100644
--- a/src/main/webapp/js/reader.min.js
+++ b/src/main/webapp/js/reader.min.js
@@ -184,7 +184,7 @@ f)+"\n"+t+"}":"{"+z.join(",")+"}";f=t;return l}}"function"!==typeof Date.prototy
e=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,f,g,h={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},k;"function"!==typeof JSON.stringify&&(JSON.stringify=function(a,b,d){var e;g=f="";if("number"===typeof d)for(e=0;e<d;e+=1)g+=" ";else"string"===typeof d&&(g=d);if((k=b)&&"function"!==typeof b&&("object"!==typeof b||"number"!==typeof b.length))throw Error("JSON.stringify");return c("",{"":a})});
"function"!==typeof JSON.parse&&(JSON.parse=function(a,b){function c(a,d){var e,f,g=a[d];if(g&&"object"===typeof g)for(e in g)Object.prototype.hasOwnProperty.call(g,e)&&(f=c(g,e),void 0!==f?g[e]=f:delete g[e]);return b.call(a,d,g)}var e;a=""+a;d.lastIndex=0;d.test(a)&&(a=a.replace(d,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)}));if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return e=eval("("+a+")"),"function"===typeof b?c({"":e},""):e;throw new SyntaxError("JSON.parse");})})();"undefined"===typeof window.mxBasePath&&(window.mxBasePath="https://www.draw.io/mxgraph/");window.mxLoadStylesheets=window.mxLoadStylesheets||!1;window.mxLoadResources=window.mxLoadResources||!1;window.mxLanguage=window.mxLanguage||"en";window.urlParams=window.urlParams||{};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";
-window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"../../../src";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de"];var mxClient={VERSION:"10.0.28",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&
+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||"../../../src";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de"];var mxClient={VERSION:"10.0.29",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&
0>navigator.userAgent.indexOf("Edge/"),IS_OP:0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/"),IS_OT: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:0<=navigator.userAgent.indexOf("AppleWebKit/")&&
0>navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_IOS:navigator.userAgent.match(/(iPad|iPhone|iPod)/g)?!0:!1,IS_GC:0<=navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:0<=navigator.userAgent.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:0<=navigator.userAgent.indexOf("Firefox/")||0<=navigator.userAgent.indexOf("Iceweasel/")||0<=navigator.userAgent.indexOf("Seamonkey/")||0<=navigator.userAgent.indexOf("Iceape/")||0<=navigator.userAgent.indexOf("Galeon/")||
@@ -1070,7 +1070,7 @@ mxGraphView.prototype.getPerimeterPoint=function(a,b,c,d){var e=null;if(null!=a)
0)||g),b&&(e.x=2*d.getCenterX()-e.x),g&&(e.y=2*d.getCenterY()-e.y));e=f(d,a,e,c);null!=e&&(b&&(e.x=2*d.getCenterX()-e.x),g&&(e.y=2*d.getCenterY()-e.y))}null==e&&(e=this.getPoint(a))}return e};mxGraphView.prototype.getRoutingCenterX=function(a){var b=null!=a.style?parseFloat(a.style[mxConstants.STYLE_ROUTING_CENTER_X])||0:0;return a.getCenterX()+b*a.width};
mxGraphView.prototype.getRoutingCenterY=function(a){var b=null!=a.style?parseFloat(a.style[mxConstants.STYLE_ROUTING_CENTER_Y])||0:0;return a.getCenterY()+b*a.height};mxGraphView.prototype.getPerimeterBounds=function(a,b){b=null!=b?b:0;null!=a&&(b+=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]||0));return a.getPerimeterBounds(b*this.scale)};
mxGraphView.prototype.getPerimeterFunction=function(a){a=a.style[mxConstants.STYLE_PERIMETER];if("string"==typeof a){var b=mxStyleRegistry.getValue(a);null==b&&this.isAllowEval()&&(b=mxUtils.eval(a));a=b}return"function"==typeof a?a:null};mxGraphView.prototype.getNextPoint=function(a,b,c){a=a.absolutePoints;var d=null;null!=a&&2<=a.length&&(d=a.length,d=a[c?Math.min(1,d-1):Math.max(0,d-2)]);null==d&&null!=b&&(d=new mxPoint(b.getCenterX(),b.getCenterY()));return d};
-mxGraphView.prototype.getVisibleTerminal=function(a,b){for(var c=this.graph.getModel(),d=c.getTerminal(a,b),e=d;null!=d&&d!=this.currentRoot;){if(!this.graph.isCellVisible(e)||this.isCellCollapsed(d))e=d;d=c.getParent(d)}c.getParent(e)==c.getRoot()&&(e=null);return e};
+mxGraphView.prototype.getVisibleTerminal=function(a,b){for(var c=this.graph.getModel(),d=c.getTerminal(a,b),e=d;null!=d&&d!=this.currentRoot;){if(!this.graph.isCellVisible(e)||this.isCellCollapsed(d))e=d;d=c.getParent(d)}if(c.getParent(e)==c.getRoot()||e==this.currentRoot)e=null;return e};
mxGraphView.prototype.updateEdgeBounds=function(a){var b=a.absolutePoints,c=b[0],d=b[b.length-1];if(c.x!=d.x||c.y!=d.y){var e=d.x-c.x,f=d.y-c.y;a.terminalDistance=Math.sqrt(e*e+f*f)}else a.terminalDistance=0;var d=0,g=[],f=c;if(null!=f){for(var c=f.x,h=f.y,k=c,l=h,m=1;m<b.length;m++){var n=b[m];null!=n&&(e=f.x-n.x,f=f.y-n.y,e=Math.sqrt(e*e+f*f),g.push(e),d+=e,f=n,c=Math.min(f.x,c),h=Math.min(f.y,h),k=Math.max(f.x,k),l=Math.max(f.y,l))}a.length=d;a.segments=g;a.x=c;a.y=h;a.width=Math.max(1,k-c);a.height=
Math.max(1,l-h)}};
mxGraphView.prototype.getPoint=function(a,b){var c=a.getCenterX(),d=a.getCenterY();if(null==a.segments||null!=b&&!b.relative)null!=b&&(l=b.offset,null!=l&&(c+=l.x,d+=l.y));else{for(var e=a.absolutePoints.length,f=Math.round(((null!=b?b.x/2:0)+.5)*a.length),g=a.segments[0],h=0,k=1;f>=Math.round(h+g)&&k<e-1;)h+=g,g=a.segments[k++];e=0==g?0:(f-h)/g;f=a.absolutePoints[k-1];k=a.absolutePoints[k];if(null!=f&&null!=k){h=c=d=0;if(null!=b){var d=b.y,l=b.offset;null!=l&&(c=l.x,h=l.y)}l=k.x-f.x;k=k.y-f.y;c=
diff --git a/src/main/webapp/js/viewer.min.js b/src/main/webapp/js/viewer.min.js
index ea11b444..24e82dae 100644
--- a/src/main/webapp/js/viewer.min.js
+++ b/src/main/webapp/js/viewer.min.js
@@ -1146,7 +1146,7 @@ mxGraphView.prototype.getPerimeterPoint=function(a,b,c,d){var e=null;if(null!=a)
0)||g),b&&(e.x=2*d.getCenterX()-e.x),g&&(e.y=2*d.getCenterY()-e.y));e=f(d,a,e,c);null!=e&&(b&&(e.x=2*d.getCenterX()-e.x),g&&(e.y=2*d.getCenterY()-e.y))}null==e&&(e=this.getPoint(a))}return e};mxGraphView.prototype.getRoutingCenterX=function(a){var b=null!=a.style?parseFloat(a.style[mxConstants.STYLE_ROUTING_CENTER_X])||0:0;return a.getCenterX()+b*a.width};
mxGraphView.prototype.getRoutingCenterY=function(a){var b=null!=a.style?parseFloat(a.style[mxConstants.STYLE_ROUTING_CENTER_Y])||0:0;return a.getCenterY()+b*a.height};mxGraphView.prototype.getPerimeterBounds=function(a,b){b=null!=b?b:0;null!=a&&(b+=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]||0));return a.getPerimeterBounds(b*this.scale)};
mxGraphView.prototype.getPerimeterFunction=function(a){a=a.style[mxConstants.STYLE_PERIMETER];if("string"==typeof a){var b=mxStyleRegistry.getValue(a);null==b&&this.isAllowEval()&&(b=mxUtils.eval(a));a=b}return"function"==typeof a?a:null};mxGraphView.prototype.getNextPoint=function(a,b,c){a=a.absolutePoints;var d=null;null!=a&&2<=a.length&&(d=a.length,d=a[c?Math.min(1,d-1):Math.max(0,d-2)]);null==d&&null!=b&&(d=new mxPoint(b.getCenterX(),b.getCenterY()));return d};
-mxGraphView.prototype.getVisibleTerminal=function(a,b){for(var c=this.graph.getModel(),d=c.getTerminal(a,b),e=d;null!=d&&d!=this.currentRoot;){if(!this.graph.isCellVisible(e)||this.isCellCollapsed(d))e=d;d=c.getParent(d)}c.getParent(e)==c.getRoot()&&(e=null);return e};
+mxGraphView.prototype.getVisibleTerminal=function(a,b){for(var c=this.graph.getModel(),d=c.getTerminal(a,b),e=d;null!=d&&d!=this.currentRoot;){if(!this.graph.isCellVisible(e)||this.isCellCollapsed(d))e=d;d=c.getParent(d)}if(c.getParent(e)==c.getRoot()||e==this.currentRoot)e=null;return e};
mxGraphView.prototype.updateEdgeBounds=function(a){var b=a.absolutePoints,c=b[0],d=b[b.length-1];if(c.x!=d.x||c.y!=d.y){var e=d.x-c.x,f=d.y-c.y;a.terminalDistance=Math.sqrt(e*e+f*f)}else a.terminalDistance=0;var d=0,g=[],f=c;if(null!=f){for(var c=f.x,k=f.y,l=c,m=k,n=1;n<b.length;n++){var p=b[n];null!=p&&(e=f.x-p.x,f=f.y-p.y,e=Math.sqrt(e*e+f*f),g.push(e),d+=e,f=p,c=Math.min(f.x,c),k=Math.min(f.y,k),l=Math.max(f.x,l),m=Math.max(f.y,m))}a.length=d;a.segments=g;a.x=c;a.y=k;a.width=Math.max(1,l-c);a.height=
Math.max(1,m-k)}};
mxGraphView.prototype.getPoint=function(a,b){var c=a.getCenterX(),d=a.getCenterY();if(null==a.segments||null!=b&&!b.relative)null!=b&&(m=b.offset,null!=m&&(c+=m.x,d+=m.y));else{for(var e=a.absolutePoints.length,f=Math.round(((null!=b?b.x/2:0)+.5)*a.length),g=a.segments[0],k=0,l=1;f>=Math.round(k+g)&&l<e-1;)k+=g,g=a.segments[l++];e=0==g?0:(f-k)/g;f=a.absolutePoints[l-1];l=a.absolutePoints[l];if(null!=f&&null!=l){k=c=d=0;if(null!=b){var d=b.y,m=b.offset;null!=m&&(c=m.x,k=m.y)}m=l.x-f.x;l=l.y-f.y;c=
@@ -1992,9 +1992,9 @@ a.setAttribute("pageHeight",this.graph.pageFormat.height);null!=this.graph.backg
Editor.prototype.createUndoManager=function(){var a=this.graph,b=new mxUndoManager;this.undoListener=function(a,e){b.undoableEditHappened(e.getProperty("edit"))};var e=mxUtils.bind(this,function(a,b){this.undoListener.apply(this,arguments)});a.getModel().addListener(mxEvent.UNDO,e);a.getView().addListener(mxEvent.UNDO,e);e=function(d,b){var e=a.getSelectionCellsForChanges(b.getProperty("edit").changes);a.getModel();for(var k=[],q=0;q<e.length;q++)null!=a.view.getState(e[q])&&k.push(e[q]);a.setSelectionCells(k)};
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,d,k,l,p,q,u,c){var f=0;mxClient.IS_VML&&(null==document.documentMode||8>document.documentMode)&&(f=80);e+=f;d+=f;var g=e,n=d,r=0<document.documentElement.clientHeight?document.documentElement.clientHeight:Math.max(document.body.clientHeight||0,document.documentElement.clientHeight),h=Math.max(1,Math.round((document.body.clientWidth-e-64)/2)),m=Math.max(1,Math.round((r-d-a.footerHeight)/3));mxClient.IS_QUIRKS||(b.style.maxHeight="100%");e=Math.min(e,document.body.scrollWidth-
+function Dialog(a,b,e,d,k,l,p,q,t,c){var f=0;mxClient.IS_VML&&(null==document.documentMode||8>document.documentMode)&&(f=80);e+=f;d+=f;var g=e,n=d,r=0<document.documentElement.clientHeight?document.documentElement.clientHeight:Math.max(document.body.clientHeight||0,document.documentElement.clientHeight),h=Math.max(1,Math.round((document.body.clientWidth-e-64)/2)),m=Math.max(1,Math.round((r-d-a.footerHeight)/3));mxClient.IS_QUIRKS||(b.style.maxHeight="100%");e=Math.min(e,document.body.scrollWidth-
64);d=Math.min(d,r-64);0<a.dialogs.length&&(this.zIndex+=2*a.dialogs.length);null==this.bg&&(this.bg=a.createDiv("background"),this.bg.style.position="absolute",this.bg.style.background=Dialog.backdropColor,this.bg.style.height=r+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity),mxClient.IS_QUIRKS&&new mxDivResizer(this.bg));var w=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=w.x+"px";this.bg.style.top=w.y+"px";h+=w.x;m+=w.y;
-k&&document.body.appendChild(this.bg);var v=a.createDiv(u?"geTransDialog":"geDialog");k=this.getPosition(h,m,e,d);h=k.x;m=k.y;v.style.width=e+"px";v.style.height=d+"px";v.style.left=h+"px";v.style.top=m+"px";v.style.zIndex=this.zIndex;v.appendChild(b);document.body.appendChild(v);!q&&b.clientHeight>v.clientHeight-64&&(b.style.overflowY="auto");l&&(l=document.createElement("img"),l.setAttribute("src",Dialog.prototype.closeImage),l.setAttribute("title",mxResources.get("close")),l.className="geDialogClose",
+k&&document.body.appendChild(this.bg);var v=a.createDiv(t?"geTransDialog":"geDialog");k=this.getPosition(h,m,e,d);h=k.x;m=k.y;v.style.width=e+"px";v.style.height=d+"px";v.style.left=h+"px";v.style.top=m+"px";v.style.zIndex=this.zIndex;v.appendChild(b);document.body.appendChild(v);!q&&b.clientHeight>v.clientHeight-64&&(b.style.overflowY="auto");l&&(l=document.createElement("img"),l.setAttribute("src",Dialog.prototype.closeImage),l.setAttribute("title",mxResources.get("close")),l.className="geDialogClose",
l.style.top=m+14+"px",l.style.left=h+e+38-f+"px",l.style.zIndex=this.zIndex,mxEvent.addListener(l,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(l),this.dialogImg=l,mxEvent.addGestureListeners(this.bg,null,null,mxUtils.bind(this,function(c){a.hideDialog(!0)})));this.resizeListener=mxUtils.bind(this,function(){if(null!=c){var w=c();null!=w&&(g=e=w.w,n=d=w.h)}r=Math.max(document.body.clientHeight,document.documentElement.clientHeight);this.bg.style.height=r+"px";
h=Math.max(1,Math.round((document.body.clientWidth-e-64)/2));m=Math.max(1,Math.round((r-d-a.footerHeight)/3));e=Math.min(g,document.body.scrollWidth-64);d=Math.min(n,r-64);w=this.getPosition(h,m,e,d);h=w.x;m=w.y;v.style.left=h+"px";v.style.top=m+"px";v.style.width=e+"px";v.style.height=d+"px";!q&&b.clientHeight>v.clientHeight-64&&(b.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=m+14+"px",this.dialogImg.style.left=h+e+38-f+"px")});mxEvent.addListener(window,"resize",this.resizeListener);
this.onDialogClose=p;this.container=v;a.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-1;
@@ -2008,29 +2008,29 @@ Dialog.prototype.unlockedImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGg
"/unlocked.png";Dialog.prototype.bgOpacity=80;Dialog.prototype.getPosition=function(a,b){return new mxPoint(a,b)};Dialog.prototype.close=function(a,b){if(null!=this.onDialogClose){if(0==this.onDialogClose(a,b))return!1;this.onDialogClose=null}null!=this.dialogImg&&(this.dialogImg.parentNode.removeChild(this.dialogImg),this.dialogImg=null);null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);mxEvent.removeListener(window,"resize",this.resizeListener);this.container.parentNode.removeChild(this.container)};
var PrintDialog=function(a,b){this.create(a,b)};
PrintDialog.prototype.create=function(a){function b(a){var d=q.checked||c.checked,b=parseInt(g.value)/100;isNaN(b)&&(b=1,g.value="100%");var b=.75*b,n=e.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,r=1/e.pageScale;if(d){var k=q.checked?1:parseInt(f.value);isNaN(k)||(r=mxUtils.getScaleForPageCount(k,e,n))}e.getGraphBounds();var x=k=0,n=mxRectangle.fromRectangle(n);n.width=Math.ceil(n.width*b);n.height=Math.ceil(n.height*b);r*=b;!d&&e.pageVisible?(b=e.getPageLayout(),k-=b.x*n.width,x-=b.y*n.height):
-d=!0;d=PrintDialog.createPrintPreview(e,r,n,0,k,x,d);d.open();a&&PrintDialog.printPreview(d)}var e=a.editor.graph,d,k,l=document.createElement("table");l.style.width="100%";l.style.height="100%";var p=document.createElement("tbody");d=document.createElement("tr");var q=document.createElement("input");q.setAttribute("type","checkbox");k=document.createElement("td");k.setAttribute("colspan","2");k.style.fontSize="10pt";k.appendChild(q);var u=document.createElement("span");mxUtils.write(u," "+mxResources.get("fitPage"));
-k.appendChild(u);mxEvent.addListener(u,"click",function(a){q.checked=!q.checked;c.checked=!q.checked;mxEvent.consume(a)});mxEvent.addListener(q,"change",function(){c.checked=!q.checked});d.appendChild(k);p.appendChild(d);d=d.cloneNode(!1);var c=document.createElement("input");c.setAttribute("type","checkbox");k=document.createElement("td");k.style.fontSize="10pt";k.appendChild(c);u=document.createElement("span");mxUtils.write(u," "+mxResources.get("posterPrint")+":");k.appendChild(u);mxEvent.addListener(u,
+d=!0;d=PrintDialog.createPrintPreview(e,r,n,0,k,x,d);d.open();a&&PrintDialog.printPreview(d)}var e=a.editor.graph,d,k,l=document.createElement("table");l.style.width="100%";l.style.height="100%";var p=document.createElement("tbody");d=document.createElement("tr");var q=document.createElement("input");q.setAttribute("type","checkbox");k=document.createElement("td");k.setAttribute("colspan","2");k.style.fontSize="10pt";k.appendChild(q);var t=document.createElement("span");mxUtils.write(t," "+mxResources.get("fitPage"));
+k.appendChild(t);mxEvent.addListener(t,"click",function(a){q.checked=!q.checked;c.checked=!q.checked;mxEvent.consume(a)});mxEvent.addListener(q,"change",function(){c.checked=!q.checked});d.appendChild(k);p.appendChild(d);d=d.cloneNode(!1);var c=document.createElement("input");c.setAttribute("type","checkbox");k=document.createElement("td");k.style.fontSize="10pt";k.appendChild(c);t=document.createElement("span");mxUtils.write(t," "+mxResources.get("posterPrint")+":");k.appendChild(t);mxEvent.addListener(t,
"click",function(a){c.checked=!c.checked;q.checked=!c.checked;mxEvent.consume(a)});d.appendChild(k);var f=document.createElement("input");f.setAttribute("value","1");f.setAttribute("type","number");f.setAttribute("min","1");f.setAttribute("size","4");f.setAttribute("disabled","disabled");f.style.width="50px";k=document.createElement("td");k.style.fontSize="10pt";k.appendChild(f);mxUtils.write(k," "+mxResources.get("pages")+" (max)");d.appendChild(k);p.appendChild(d);mxEvent.addListener(c,"change",
function(){c.checked?f.removeAttribute("disabled"):f.setAttribute("disabled","disabled");q.checked=!c.checked});d=d.cloneNode(!1);k=document.createElement("td");mxUtils.write(k,mxResources.get("pageScale")+":");d.appendChild(k);k=document.createElement("td");var g=document.createElement("input");g.setAttribute("value","100 %");g.setAttribute("size","5");g.style.width="50px";k.appendChild(g);d.appendChild(k);p.appendChild(d);d=document.createElement("tr");k=document.createElement("td");k.colSpan=2;
-k.style.paddingTop="20px";k.setAttribute("align","right");u=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});u.className="geBtn";a.editor.cancelFirst&&k.appendChild(u);if(PrintDialog.previewEnabled){var n=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();b(!1)});n.className="geBtn";k.appendChild(n)}n=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();b(!0)});n.className="geBtn gePrimaryBtn";k.appendChild(n);a.editor.cancelFirst||
-k.appendChild(u);d.appendChild(k);p.appendChild(d);l.appendChild(p);this.container=l};PrintDialog.printPreview=function(a){if(null!=a.wnd){var b=function(){a.wnd.focus();a.wnd.print();a.wnd.close()};mxClient.IS_GC?window.setTimeout(b,500):b()}};
+k.style.paddingTop="20px";k.setAttribute("align","right");t=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});t.className="geBtn";a.editor.cancelFirst&&k.appendChild(t);if(PrintDialog.previewEnabled){var n=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();b(!1)});n.className="geBtn";k.appendChild(n)}n=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();b(!0)});n.className="geBtn gePrimaryBtn";k.appendChild(n);a.editor.cancelFirst||
+k.appendChild(t);d.appendChild(k);p.appendChild(d);l.appendChild(p);this.container=l};PrintDialog.printPreview=function(a){if(null!=a.wnd){var b=function(){a.wnd.focus();a.wnd.print();a.wnd.close()};mxClient.IS_GC?window.setTimeout(b,500):b()}};
PrintDialog.createPrintPreview=function(a,b,e,d,k,l,p){b=new mxPrintPreview(a,b,e,d,k,l);b.title=mxResources.get("preview");b.printBackgroundImage=!0;b.autoOrigin=p;a=a.background;if(null==a||""==a||a==mxConstants.NONE)a="#ffffff";b.backgroundColor=a;var q=b.writeHead;b.writeHead=function(a){q.apply(this,arguments);a.writeln('<style type="text/css">');a.writeln("@media screen {");a.writeln(" body > div { padding:30px;box-sizing:content-box; }");a.writeln("}");a.writeln("</style>")};return b};
PrintDialog.previewEnabled=!0;
var PageSetupDialog=function(a){function b(){null==f||f==mxConstants.NONE?(c.style.backgroundColor="",c.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(c.style.backgroundColor=f,c.style.backgroundImage="")}function e(){null==r?(n.removeAttribute("title"),n.style.fontSize="",n.innerHTML=mxResources.get("change")+"..."):(n.setAttribute("title",r.src),n.style.fontSize="11px",n.innerHTML=r.src.substring(0,42)+"...")}var d=a.editor.graph,k,l,p=document.createElement("table");p.style.width=
-"100%";p.style.height="100%";var q=document.createElement("tbody");k=document.createElement("tr");l=document.createElement("td");l.style.verticalAlign="top";l.style.fontSize="10pt";mxUtils.write(l,mxResources.get("paperSize")+":");k.appendChild(l);l=document.createElement("td");l.style.verticalAlign="top";l.style.fontSize="10pt";var u=PageSetupDialog.addPageFormatPanel(l,"pagesetupdialog",d.pageFormat);k.appendChild(l);q.appendChild(k);k=document.createElement("tr");l=document.createElement("td");
+"100%";p.style.height="100%";var q=document.createElement("tbody");k=document.createElement("tr");l=document.createElement("td");l.style.verticalAlign="top";l.style.fontSize="10pt";mxUtils.write(l,mxResources.get("paperSize")+":");k.appendChild(l);l=document.createElement("td");l.style.verticalAlign="top";l.style.fontSize="10pt";var t=PageSetupDialog.addPageFormatPanel(l,"pagesetupdialog",d.pageFormat);k.appendChild(l);q.appendChild(k);k=document.createElement("tr");l=document.createElement("td");
mxUtils.write(l,mxResources.get("background")+":");k.appendChild(l);l=document.createElement("td");l.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var c=document.createElement("button");c.style.width="18px";c.style.height="18px";c.style.marginRight="20px";c.style.backgroundPosition="center center";c.style.backgroundRepeat="no-repeat";var f=d.background;b();mxEvent.addListener(c,"click",function(c){a.pickColor(f||"none",function(a){f=a;b()});mxEvent.consume(c)});
l.appendChild(c);mxUtils.write(l,mxResources.get("gridSize")+":");var g=document.createElement("input");g.setAttribute("type","number");g.setAttribute("min","0");g.style.width="40px";g.style.marginLeft="6px";g.value=d.getGridSize();l.appendChild(g);mxEvent.addListener(g,"change",function(){var a=parseInt(g.value);g.value=Math.max(1,isNaN(a)?d.getGridSize():a)});k.appendChild(l);q.appendChild(k);k=document.createElement("tr");l=document.createElement("td");mxUtils.write(l,mxResources.get("image")+
":");k.appendChild(l);l=document.createElement("td");var n=document.createElement("a");n.style.textDecoration="underline";n.style.cursor="pointer";n.style.color="#a0a0a0";var r=d.backgroundImage;mxEvent.addListener(n,"click",function(c){a.showBackgroundImageDialog(function(a){r=a;e()});mxEvent.consume(c)});e();l.appendChild(n);k.appendChild(l);q.appendChild(k);k=document.createElement("tr");l=document.createElement("td");l.colSpan=2;l.style.paddingTop="16px";l.setAttribute("align","right");var h=
-mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});h.className="geBtn";a.editor.cancelFirst&&l.appendChild(h);var m=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();d.gridSize!==g.value&&d.setGridSize(parseInt(g.value));var c=new ChangePageSetup(a,f,r,u.get());c.ignoreColor=d.background==f;c.ignoreImage=(null!=d.backgroundImage?d.backgroundImage.src:null)===(null!=r?r.src:null);d.pageFormat.width==c.previousFormat.width&&d.pageFormat.height==c.previousFormat.height&&
+mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});h.className="geBtn";a.editor.cancelFirst&&l.appendChild(h);var m=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();d.gridSize!==g.value&&d.setGridSize(parseInt(g.value));var c=new ChangePageSetup(a,f,r,t.get());c.ignoreColor=d.background==f;c.ignoreImage=(null!=d.backgroundImage?d.backgroundImage.src:null)===(null!=r?r.src:null);d.pageFormat.width==c.previousFormat.width&&d.pageFormat.height==c.previousFormat.height&&
c.ignoreColor&&c.ignoreImage||d.model.execute(c)});m.className="geBtn gePrimaryBtn";l.appendChild(m);a.editor.cancelFirst||l.appendChild(h);k.appendChild(l);q.appendChild(k);p.appendChild(q);this.container=p};
-PageSetupDialog.addPageFormatPanel=function(a,b,e,d){function k(a,c,d){if(d||g!=document.activeElement&&n!=document.activeElement){a=!1;for(c=0;c<h.length;c++)d=h[c],D?"custom"==d.key&&(q.value=d.key,D=!1):null!=d.format&&("a4"==d.key?826==e.width?(e=mxRectangle.fromRectangle(e),e.width=827):826==e.height&&(e=mxRectangle.fromRectangle(e),e.height=827):"a5"==d.key&&(584==e.width?(e=mxRectangle.fromRectangle(e),e.width=583):584==e.height&&(e=mxRectangle.fromRectangle(e),e.height=583)),e.width==d.format.width&&
-e.height==d.format.height?(q.value=d.key,l.setAttribute("checked","checked"),l.defaultChecked=!0,l.checked=!0,p.removeAttribute("checked"),p.defaultChecked=!1,p.checked=!1,a=!0):e.width==d.format.height&&e.height==d.format.width&&(q.value=d.key,l.removeAttribute("checked"),l.defaultChecked=!1,l.checked=!1,p.setAttribute("checked","checked"),p.defaultChecked=!0,a=p.checked=!0));a?(u.style.display="",f.style.display="none"):(g.value=e.width/100,n.value=e.height/100,l.setAttribute("checked","checked"),
-q.value="custom",u.style.display="none",f.style.display="")}}b="format-"+b;var l=document.createElement("input");l.setAttribute("name",b);l.setAttribute("type","radio");l.setAttribute("value","portrait");var p=document.createElement("input");p.setAttribute("name",b);p.setAttribute("type","radio");p.setAttribute("value","landscape");var q=document.createElement("select");q.style.marginBottom="8px";q.style.width="202px";var u=document.createElement("div");u.style.marginLeft="4px";u.style.width="210px";
-u.style.height="24px";l.style.marginRight="6px";u.appendChild(l);b=document.createElement("span");b.style.maxWidth="100px";mxUtils.write(b,mxResources.get("portrait"));u.appendChild(b);p.style.marginLeft="10px";p.style.marginRight="6px";u.appendChild(p);var c=document.createElement("span");c.style.width="100px";mxUtils.write(c,mxResources.get("landscape"));u.appendChild(c);var f=document.createElement("div");f.style.marginLeft="4px";f.style.width="210px";f.style.height="24px";var g=document.createElement("input");
-g.setAttribute("size","7");g.style.textAlign="right";f.appendChild(g);mxUtils.write(f," in x ");var n=document.createElement("input");n.setAttribute("size","7");n.style.textAlign="right";f.appendChild(n);mxUtils.write(f," in");u.style.display="none";f.style.display="none";for(var r={},h=PageSetupDialog.getFormats(),m=0;m<h.length;m++){var w=h[m];r[w.key]=w;var v=document.createElement("option");v.setAttribute("value",w.key);mxUtils.write(v,w.title);q.appendChild(v)}var D=!1;k();a.appendChild(q);mxUtils.br(a);
-a.appendChild(u);a.appendChild(f);var x=e,t=function(a,c){var b=r[q.value];null!=b.format?(g.value=b.format.width/100,n.value=b.format.height/100,f.style.display="none",u.style.display=""):(u.style.display="none",f.style.display="");b=parseFloat(g.value);if(isNaN(b)||0>=b)g.value=e.width/100;b=parseFloat(n.value);if(isNaN(b)||0>=b)n.value=e.height/100;b=new mxRectangle(0,0,Math.floor(100*parseFloat(g.value)),Math.floor(100*parseFloat(n.value)));"custom"!=q.value&&p.checked&&(b=new mxRectangle(0,0,
-b.height,b.width));c&&D||b.width==x.width&&b.height==x.height||(x=b,null!=d&&d(x))};mxEvent.addListener(b,"click",function(a){l.checked=!0;t(a);mxEvent.consume(a)});mxEvent.addListener(c,"click",function(a){p.checked=!0;t(a);mxEvent.consume(a)});mxEvent.addListener(g,"blur",t);mxEvent.addListener(g,"click",t);mxEvent.addListener(n,"blur",t);mxEvent.addListener(n,"click",t);mxEvent.addListener(p,"change",t);mxEvent.addListener(l,"change",t);mxEvent.addListener(q,"change",function(a){D="custom"==q.value;
-t(a,!0)});t();return{set:function(a){e=a;k(null,null,!0)},get:function(){return x},widthInput:g,heightInput:n}};
+PageSetupDialog.addPageFormatPanel=function(a,b,e,d){function k(a,c,d){if(d||g!=document.activeElement&&n!=document.activeElement){a=!1;for(c=0;c<h.length;c++)d=h[c],E?"custom"==d.key&&(q.value=d.key,E=!1):null!=d.format&&("a4"==d.key?826==e.width?(e=mxRectangle.fromRectangle(e),e.width=827):826==e.height&&(e=mxRectangle.fromRectangle(e),e.height=827):"a5"==d.key&&(584==e.width?(e=mxRectangle.fromRectangle(e),e.width=583):584==e.height&&(e=mxRectangle.fromRectangle(e),e.height=583)),e.width==d.format.width&&
+e.height==d.format.height?(q.value=d.key,l.setAttribute("checked","checked"),l.defaultChecked=!0,l.checked=!0,p.removeAttribute("checked"),p.defaultChecked=!1,p.checked=!1,a=!0):e.width==d.format.height&&e.height==d.format.width&&(q.value=d.key,l.removeAttribute("checked"),l.defaultChecked=!1,l.checked=!1,p.setAttribute("checked","checked"),p.defaultChecked=!0,a=p.checked=!0));a?(t.style.display="",f.style.display="none"):(g.value=e.width/100,n.value=e.height/100,l.setAttribute("checked","checked"),
+q.value="custom",t.style.display="none",f.style.display="")}}b="format-"+b;var l=document.createElement("input");l.setAttribute("name",b);l.setAttribute("type","radio");l.setAttribute("value","portrait");var p=document.createElement("input");p.setAttribute("name",b);p.setAttribute("type","radio");p.setAttribute("value","landscape");var q=document.createElement("select");q.style.marginBottom="8px";q.style.width="202px";var t=document.createElement("div");t.style.marginLeft="4px";t.style.width="210px";
+t.style.height="24px";l.style.marginRight="6px";t.appendChild(l);b=document.createElement("span");b.style.maxWidth="100px";mxUtils.write(b,mxResources.get("portrait"));t.appendChild(b);p.style.marginLeft="10px";p.style.marginRight="6px";t.appendChild(p);var c=document.createElement("span");c.style.width="100px";mxUtils.write(c,mxResources.get("landscape"));t.appendChild(c);var f=document.createElement("div");f.style.marginLeft="4px";f.style.width="210px";f.style.height="24px";var g=document.createElement("input");
+g.setAttribute("size","7");g.style.textAlign="right";f.appendChild(g);mxUtils.write(f," in x ");var n=document.createElement("input");n.setAttribute("size","7");n.style.textAlign="right";f.appendChild(n);mxUtils.write(f," in");t.style.display="none";f.style.display="none";for(var r={},h=PageSetupDialog.getFormats(),m=0;m<h.length;m++){var w=h[m];r[w.key]=w;var v=document.createElement("option");v.setAttribute("value",w.key);mxUtils.write(v,w.title);q.appendChild(v)}var E=!1;k();a.appendChild(q);mxUtils.br(a);
+a.appendChild(t);a.appendChild(f);var x=e,u=function(a,c){var b=r[q.value];null!=b.format?(g.value=b.format.width/100,n.value=b.format.height/100,f.style.display="none",t.style.display=""):(t.style.display="none",f.style.display="");b=parseFloat(g.value);if(isNaN(b)||0>=b)g.value=e.width/100;b=parseFloat(n.value);if(isNaN(b)||0>=b)n.value=e.height/100;b=new mxRectangle(0,0,Math.floor(100*parseFloat(g.value)),Math.floor(100*parseFloat(n.value)));"custom"!=q.value&&p.checked&&(b=new mxRectangle(0,0,
+b.height,b.width));c&&E||b.width==x.width&&b.height==x.height||(x=b,null!=d&&d(x))};mxEvent.addListener(b,"click",function(a){l.checked=!0;u(a);mxEvent.consume(a)});mxEvent.addListener(c,"click",function(a){p.checked=!0;u(a);mxEvent.consume(a)});mxEvent.addListener(g,"blur",u);mxEvent.addListener(g,"click",u);mxEvent.addListener(n,"blur",u);mxEvent.addListener(n,"click",u);mxEvent.addListener(p,"change",u);mxEvent.addListener(l,"change",u);mxEvent.addListener(q,"change",function(a){E="custom"==q.value;
+u(a,!0)});u();return{set:function(a){e=a;k(null,null,!0)},get:function(){return x},widthInput:g,heightInput:n}};
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 (279 mm x 432 mm)",format:new mxRectangle(0,0,1100,1700)},{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:"custom",title:mxResources.get("custom"),format:null}]};
(function(){mxGraphView.prototype.validateBackgroundPage=function(){var a=this.graph;if(null!=a.container&&!a.transparentBackground){if(a.pageVisible){var d=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var c=a.container.firstChild;null!=c&&c.nodeType!=mxConstants.NODETYPE_ELEMENT;)c=c.nextSibling;null!=c&&(this.backgroundPageShape=this.createBackgroundPageShape(d),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!mxClient.IS_QUIRKS,this.backgroundPageShape.dialect=
@@ -2055,18 +2055,18 @@ k,this.toolbarContainer.onselectstart=k,this.toolbarContainer.onmousedown=k,this
if("A"==c.nodeName)for(;null!=c;){if("geHint"==c.className)return!0;c=c.parentNode}return k(a)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",b):this.diagramContainer.oncontextmenu=b):d.panningHandler.usePopupTrigger=!1;d.init(this.diagramContainer);mxClient.IS_SVG&&null!=d.view.getDrawPane()&&(b=d.view.getDrawPane().ownerSVGElement,null!=b&&(b.style.position="absolute"));this.hoverIcons=this.createHoverIcons();
mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(a){var c=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(a)-c.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(a)-c.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var l=!1,p=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(a,c){return l||p.apply(this,arguments)};this.keydownHandler=
mxUtils.bind(this,function(a){32==a.which?(l=!0,this.hoverIcons.reset(),d.container.style.cursor="move",d.isEditing()||mxEvent.getSource(a)!=d.container||mxEvent.consume(a)):mxEvent.isConsumed(a)||27!=a.keyCode||this.hideDialog(null,!0)});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(a){d.container.style.cursor="";l=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var q=d.panningHandler.isForcePanningEvent;d.panningHandler.isForcePanningEvent=
-function(a){return q.apply(this,arguments)||l||mxEvent.isMouseEvent(a.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(a.getEvent()))&&(!mxEvent.isControlDown(a.getEvent())&&mxEvent.isRightMouseButton(a.getEvent())||mxEvent.isMiddleMouseButton(a.getEvent()))};var u=d.cellEditor.isStopEditingEvent;d.cellEditor.isStopEditingEvent=function(a){return u.apply(this,arguments)||13==a.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxClient.IS_SF&&mxEvent.isShiftDown(a))};
+function(a){return q.apply(this,arguments)||l||mxEvent.isMouseEvent(a.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(a.getEvent()))&&(!mxEvent.isControlDown(a.getEvent())&&mxEvent.isRightMouseButton(a.getEvent())||mxEvent.isMiddleMouseButton(a.getEvent()))};var t=d.cellEditor.isStopEditingEvent;d.cellEditor.isStopEditingEvent=function(a){return t.apply(this,arguments)||13==a.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxClient.IS_SF&&mxEvent.isShiftDown(a))};
var c=!1,f=null,g=null,n=null,r=mxUtils.bind(this,function(){if(null!=this.toolbar&&c!=d.cellEditor.isContentEditing()){for(var a=this.toolbar.container.firstChild,b=[];null!=a;){var e=a.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,a)&&(a.parentNode.removeChild(a),b.push(a));a=e}a=this.toolbar.fontMenu;e=this.toolbar.sizeMenu;if(null==n)this.toolbar.createTextToolbar();else{for(var h=0;h<n.length;h++)this.toolbar.container.appendChild(n[h]);this.toolbar.fontMenu=f;this.toolbar.sizeMenu=
g}c=d.cellEditor.isContentEditing();f=a;g=e;n=b}}),h=this,m=d.cellEditor.startEditing;d.cellEditor.startEditing=function(){m.apply(this,arguments);r();if(d.cellEditor.isContentEditing()){var a=!1,c=function(){a||(a=!0,window.setTimeout(function(){for(var c=d.getSelectedElement();null!=c&&c.nodeType!=mxConstants.NODETYPE_ELEMENT;)c=c.parentNode;if(null!=c&&(c=mxUtils.getCurrentStyle(c),null!=c&&null!=h.toolbar)){var b=c.fontFamily;"'"==b.charAt(0)&&(b=b.substring(1));"'"==b.charAt(b.length-1)&&(b=
b.substring(0,b.length-1));h.toolbar.setFontName(b);h.toolbar.setFontSize(parseInt(c.fontSize))}a=!1},0))};mxEvent.addListener(d.cellEditor.textarea,"input",c);mxEvent.addListener(d.cellEditor.textarea,"touchend",c);mxEvent.addListener(d.cellEditor.textarea,"mouseup",c);mxEvent.addListener(d.cellEditor.textarea,"keyup",c);c()}};var w=d.cellEditor.stopEditing;d.cellEditor.stopEditing=function(a,c){w.apply(this,arguments);r()};d.container.setAttribute("tabindex","0");d.container.style.cursor="default";
-if(window.self===window.top&&null!=d.container.parentNode)try{d.container.focus()}catch(C){}var v=d.fireMouseEvent;d.fireMouseEvent=function(a,c,b){a==mxEvent.MOUSE_DOWN&&this.container.focus();v.apply(this,arguments)};d.popupMenuHandler.autoExpand=!0;null!=this.menus&&(d.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(a,c,b){this.menus.createPopupMenu(a,c,b)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(a){d.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);
-this.getKeyHandler=function(){return keyHandler};var D="rounded shadow glass dashed dashPattern comic labelBackgroundColor".split(" "),x="shape edgeStyle curved rounded elbow comic jumpStyle jumpSize".split(" ");this.setDefaultStyle=function(a){var c=d.view.getState(a);if(null!=c){a=a.clone();a.style="";a=d.getCellStyle(a);var b=[],f=[],g;for(g in c.style)a[g]!=c.style[g]&&(b.push(c.style[g]),f.push(g));g=d.getModel().getStyle(c.cell);for(var e=null!=g?g.split(";"):[],h=0;h<e.length;h++){var n=e[h],
-m=n.indexOf("=");0<=m&&(g=n.substring(0,m),n=n.substring(m+1),null!=a[g]&&"none"==n&&(b.push(n),f.push(g)))}d.getModel().isEdge(c.cell)?d.currentEdgeStyle={}:d.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",f,"values",b,"cells",[c.cell]))}};this.clearDefaultStyle=function(){d.currentEdgeStyle=mxUtils.clone(d.defaultEdgeStyle);d.currentVertexStyle=mxUtils.clone(d.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var t=
-["fontFamily","fontSize","fontColor"],z="edgeStyle startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),B=["startArrow startFill startSize sourcePerimeterSpacing endArrow endFill endSize targetPerimeterSpacing jettySize orthogonalLoop".split(" "),["strokeColor","strokeWidth"],["fillColor","gradientColor"],t,["opacity"],["align"],["html"]];for(a=0;a<B.length;a++)for(b=0;b<B[a].length;b++)D.push(B[a][b]);for(a=0;a<x.length;a++)0>mxUtils.indexOf(D,x[a])&&D.push(x[a]);
-var N=function(a,c){var b=d.getModel();b.beginUpdate();try{if(c)for(var f=b.isEdge(n),g=f?d.currentEdgeStyle:d.currentVertexStyle,f=["fontSize","fontFamily","fontColor"],e=0;e<f.length;e++){var h=g[f[e]];null!=h&&d.setCellStyles(f[e],h,a)}else for(h=0;h<a.length;h++){for(var n=a[h],m=b.getStyle(n),r=null!=m?m.split(";"):[],H=D.slice(),e=0;e<r.length;e++){var t=r[e],v=t.indexOf("=");if(0<=v){var k=t.substring(0,v),z=mxUtils.indexOf(H,k);0<=z&&H.splice(z,1);for(var w=0;w<B.length;w++){var q=B[w];if(0<=
-mxUtils.indexOf(q,k))for(var l=0;l<q.length;l++){var p=mxUtils.indexOf(H,q[l]);0<=p&&H.splice(p,1)}}}}for(var g=(f=b.isEdge(n))?d.currentEdgeStyle:d.currentVertexStyle,G=b.getStyle(n),e=0;e<H.length;e++){var k=H[e],C=g[k];null==C||"shape"==k&&!f||f&&!(0>mxUtils.indexOf(x,k))||(G=mxUtils.setStyle(G,k,C))}b.setStyle(n,G)}}finally{b.endUpdate()}};d.addListener("cellsInserted",function(a,c){N(c.getProperty("cells"))});d.addListener("textInserted",function(a,c){N(c.getProperty("cells"),!0)});d.connectionHandler.addListener(mxEvent.CONNECT,
-function(a,c){var b=[c.getProperty("cell")];c.getProperty("terminalInserted")&&b.push(c.getProperty("terminal"));N(b)});this.addListener("styleChanged",mxUtils.bind(this,function(a,c){var b=c.getProperty("cells"),f=!1,g=!1;if(0<b.length)for(var e=0;e<b.length&&(f=d.getModel().isVertex(b[e])||f,!(g=d.getModel().isEdge(b[e])||g)||!f);e++);else g=f=!0;for(var b=c.getProperty("keys"),h=c.getProperty("values"),e=0;e<b.length;e++){var n=0<=mxUtils.indexOf(t,b[e]);if("strokeColor"!=b[e]||null!=h[e]&&"none"!=
-h[e])if(0<=mxUtils.indexOf(x,b[e]))g||0<=mxUtils.indexOf(z,b[e])?null==h[e]?delete d.currentEdgeStyle[b[e]]:d.currentEdgeStyle[b[e]]=h[e]:f&&0<=mxUtils.indexOf(D,b[e])&&(null==h[e]?delete d.currentVertexStyle[b[e]]:d.currentVertexStyle[b[e]]=h[e]);else if(0<=mxUtils.indexOf(D,b[e])){if(f||n)null==h[e]?delete d.currentVertexStyle[b[e]]:d.currentVertexStyle[b[e]]=h[e];if(g||n||0<=mxUtils.indexOf(z,b[e]))null==h[e]?delete d.currentEdgeStyle[b[e]]:d.currentEdgeStyle[b[e]]=h[e]}}null!=this.toolbar&&(this.toolbar.setFontName(d.currentVertexStyle.fontFamily||
+if(window.self===window.top&&null!=d.container.parentNode)try{d.container.focus()}catch(D){}var v=d.fireMouseEvent;d.fireMouseEvent=function(a,c,b){a==mxEvent.MOUSE_DOWN&&this.container.focus();v.apply(this,arguments)};d.popupMenuHandler.autoExpand=!0;null!=this.menus&&(d.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(a,c,b){this.menus.createPopupMenu(a,c,b)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(a){d.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);
+this.getKeyHandler=function(){return keyHandler};var E="rounded shadow glass dashed dashPattern comic labelBackgroundColor".split(" "),x="shape edgeStyle curved rounded elbow comic jumpStyle jumpSize".split(" ");this.setDefaultStyle=function(a){var c=d.view.getState(a);if(null!=c){a=a.clone();a.style="";a=d.getCellStyle(a);var b=[],f=[],g;for(g in c.style)a[g]!=c.style[g]&&(b.push(c.style[g]),f.push(g));g=d.getModel().getStyle(c.cell);for(var e=null!=g?g.split(";"):[],h=0;h<e.length;h++){var n=e[h],
+m=n.indexOf("=");0<=m&&(g=n.substring(0,m),n=n.substring(m+1),null!=a[g]&&"none"==n&&(b.push(n),f.push(g)))}d.getModel().isEdge(c.cell)?d.currentEdgeStyle={}:d.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",f,"values",b,"cells",[c.cell]))}};this.clearDefaultStyle=function(){d.currentEdgeStyle=mxUtils.clone(d.defaultEdgeStyle);d.currentVertexStyle=mxUtils.clone(d.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var u=
+["fontFamily","fontSize","fontColor"],z="edgeStyle startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),C=["startArrow startFill startSize sourcePerimeterSpacing endArrow endFill endSize targetPerimeterSpacing jettySize orthogonalLoop".split(" "),["strokeColor","strokeWidth"],["fillColor","gradientColor"],u,["opacity"],["align"],["html"]];for(a=0;a<C.length;a++)for(b=0;b<C[a].length;b++)E.push(C[a][b]);for(a=0;a<x.length;a++)0>mxUtils.indexOf(E,x[a])&&E.push(x[a]);
+var N=function(a,c){var b=d.getModel();b.beginUpdate();try{if(c)for(var f=b.isEdge(n),g=f?d.currentEdgeStyle:d.currentVertexStyle,f=["fontSize","fontFamily","fontColor"],e=0;e<f.length;e++){var h=g[f[e]];null!=h&&d.setCellStyles(f[e],h,a)}else for(h=0;h<a.length;h++){for(var n=a[h],m=b.getStyle(n),r=null!=m?m.split(";"):[],H=E.slice(),e=0;e<r.length;e++){var u=r[e],v=u.indexOf("=");if(0<=v){var k=u.substring(0,v),z=mxUtils.indexOf(H,k);0<=z&&H.splice(z,1);for(var w=0;w<C.length;w++){var q=C[w];if(0<=
+mxUtils.indexOf(q,k))for(var l=0;l<q.length;l++){var p=mxUtils.indexOf(H,q[l]);0<=p&&H.splice(p,1)}}}}for(var g=(f=b.isEdge(n))?d.currentEdgeStyle:d.currentVertexStyle,G=b.getStyle(n),e=0;e<H.length;e++){var k=H[e],D=g[k];null==D||"shape"==k&&!f||f&&!(0>mxUtils.indexOf(x,k))||(G=mxUtils.setStyle(G,k,D))}b.setStyle(n,G)}}finally{b.endUpdate()}};d.addListener("cellsInserted",function(a,c){N(c.getProperty("cells"))});d.addListener("textInserted",function(a,c){N(c.getProperty("cells"),!0)});d.connectionHandler.addListener(mxEvent.CONNECT,
+function(a,c){var b=[c.getProperty("cell")];c.getProperty("terminalInserted")&&b.push(c.getProperty("terminal"));N(b)});this.addListener("styleChanged",mxUtils.bind(this,function(a,c){var b=c.getProperty("cells"),f=!1,g=!1;if(0<b.length)for(var e=0;e<b.length&&(f=d.getModel().isVertex(b[e])||f,!(g=d.getModel().isEdge(b[e])||g)||!f);e++);else g=f=!0;for(var b=c.getProperty("keys"),h=c.getProperty("values"),e=0;e<b.length;e++){var n=0<=mxUtils.indexOf(u,b[e]);if("strokeColor"!=b[e]||null!=h[e]&&"none"!=
+h[e])if(0<=mxUtils.indexOf(x,b[e]))g||0<=mxUtils.indexOf(z,b[e])?null==h[e]?delete d.currentEdgeStyle[b[e]]:d.currentEdgeStyle[b[e]]=h[e]:f&&0<=mxUtils.indexOf(E,b[e])&&(null==h[e]?delete d.currentVertexStyle[b[e]]:d.currentVertexStyle[b[e]]=h[e]);else if(0<=mxUtils.indexOf(E,b[e])){if(f||n)null==h[e]?delete d.currentVertexStyle[b[e]]:d.currentVertexStyle[b[e]]=h[e];if(g||n||0<=mxUtils.indexOf(z,b[e]))null==h[e]?delete d.currentEdgeStyle[b[e]]:d.currentEdgeStyle[b[e]]=h[e]}}null!=this.toolbar&&(this.toolbar.setFontName(d.currentVertexStyle.fontFamily||
Menus.prototype.defaultFont),this.toolbar.setFontSize(d.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==d.currentEdgeStyle.edgeStyle&&"1"==d.currentEdgeStyle.curved?"geSprite geSprite-curved":"straight"==d.currentEdgeStyle.edgeStyle||"none"==d.currentEdgeStyle.edgeStyle||null==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-straight":"entityRelationEdgeStyle"==
d.currentEdgeStyle.edgeStyle?"geSprite geSprite-entity":"elbowEdgeStyle"==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==d.currentEdgeStyle.elbow?"verticalelbow":"horizontalelbow"):"isometricEdgeStyle"==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==d.currentEdgeStyle.elbow?"verticalisometric":"horizontalisometric"):"geSprite geSprite-orthogonal"),null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==d.currentEdgeStyle.shape?
"geSprite geSprite-linkedge":"flexArrow"==d.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==d.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"),null!=this.toolbar.lineStartMenu&&(this.toolbar.lineStartMenu.getElementsByTagName("div")[0].className=this.getCssClassForMarker("start",d.currentEdgeStyle.shape,d.currentEdgeStyle[mxConstants.STYLE_STARTARROW],mxUtils.getValue(d.currentEdgeStyle,"startFill","1"))),null!=this.toolbar.lineEndMenu&&(this.toolbar.lineEndMenu.getElementsByTagName("div")[0].className=
@@ -2089,14 +2089,14 @@ EditorUi.prototype.initClipboard=function(){var a=this,b=mxClipboard.cut;mxClipb
!1,null):e=d.apply(this,arguments);a.updatePasteActionStates();return e};var k=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){k.apply(this,arguments);a.updatePasteActionStates()};var l=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(b,d){l.apply(this,arguments);a.updatePasteActionStates()};this.updatePasteActionStates()};EditorUi.prototype.lazyZoomDelay=20;
EditorUi.prototype.initCanvas=function(){var a=this.editor.graph;a.timerAutoScroll=!0;a.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((a.container.offsetWidth-34)/a.view.scale)),Math.max(0,Math.round((a.container.offsetHeight-34)/a.view.scale)))};a.view.getBackgroundPageBounds=function(){var a=this.graph.getPageLayout(),c=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*c.width),this.scale*(this.translate.y+a.y*c.height),this.scale*a.width*c.width,
this.scale*a.height*c.height)};a.getPreferredPageSize=function(a,c,b){a=this.getPageLayout();c=this.getPageSize();return new mxRectangle(0,0,a.width*c.width,a.height*c.height)};var b=null,e=this;if(this.editor.isChromelessView()){this.chromelessResize=b=mxUtils.bind(this,function(c,b,d,f){if(null!=a.container){d=null!=d?d:0;f=null!=f?f:0;var g=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),e=mxUtils.hasScrollbars(a.container),h=a.view.translate,n=a.view.scale,m=mxRectangle.fromRectangle(g);
-m.x=m.x/n-h.x;m.y=m.y/n-h.y;m.width/=n;m.height/=n;var h=a.container.scrollTop,r=a.container.scrollLeft,t=mxClient.IS_QUIRKS||8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)t+=3;var x=a.container.offsetWidth-t,t=a.container.offsetHeight-t;c=c?Math.max(.3,Math.min(b||1,x/m.width)):n;b=(x-c*m.width)/2/c;var H=0==this.lightboxVerticalDivider?0:(t-c*m.height)/this.lightboxVerticalDivider/c;e&&(b=Math.max(b,0),H=Math.max(H,0));if(e||g.width<x||g.height<t)a.view.scaleAndTranslate(c,
+m.x=m.x/n-h.x;m.y=m.y/n-h.y;m.width/=n;m.height/=n;var h=a.container.scrollTop,r=a.container.scrollLeft,u=mxClient.IS_QUIRKS||8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)u+=3;var x=a.container.offsetWidth-u,u=a.container.offsetHeight-u;c=c?Math.max(.3,Math.min(b||1,x/m.width)):n;b=(x-c*m.width)/2/c;var H=0==this.lightboxVerticalDivider?0:(u-c*m.height)/this.lightboxVerticalDivider/c;e&&(b=Math.max(b,0),H=Math.max(H,0));if(e||g.width<x||g.height<u)a.view.scaleAndTranslate(c,
Math.floor(b-m.x),Math.floor(H-m.y)),a.container.scrollTop=h*c/n,a.container.scrollLeft=r*c/n;else if(0!=d||0!=f)g=a.view.translate,a.view.setTranslate(Math.floor(g.x+d/n),Math.floor(g.y+f/n))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var d=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",d);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",d)});this.editor.addListener("resetGraphView",
mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(c){a.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(c){a.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){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.backgroundColor="#000000";this.chromelessToolbar.style.padding="10px 10px 8px 10px";this.chromelessToolbar.style.left="50%";mxClient.IS_VML||(mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"borderRadius","20px"),mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out"));var k=mxUtils.bind(this,function(){var c=mxUtils.getCurrentStyle(a.container);this.chromelessToolbar.style.bottom=(null!=c?parseInt(c["margin-bottom"]||
0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",k);k();var l=0,k=mxUtils.bind(this,function(a,c,b){l++;var d=document.createElement("span");d.style.paddingLeft="8px";d.style.paddingRight="8px";d.style.cursor="pointer";mxEvent.addListener(d,"click",a);null!=b&&d.setAttribute("title",b);a=document.createElement("img");a.setAttribute("border","0");a.setAttribute("src",c);d.appendChild(a);this.chromelessToolbar.appendChild(d);
-return d}),p=k(mxUtils.bind(this,function(a){this.actions.get("previousPage").funct();mxEvent.consume(a)}),Editor.previousLargeImage,mxResources.get("previousPage")),q=document.createElement("div");q.style.display="inline-block";q.style.verticalAlign="top";q.style.fontFamily="Helvetica,Arial";q.style.marginTop="8px";q.style.fontSize="14px";q.style.color="#ffffff";this.chromelessToolbar.appendChild(q);var u=k(mxUtils.bind(this,function(a){this.actions.get("nextPage").funct();mxEvent.consume(a)}),Editor.nextLargeImage,
-mxResources.get("nextPage")),c=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(q.innerHTML="",mxUtils.write(q,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});p.style.paddingLeft="0px";p.style.paddingRight="4px";u.style.paddingLeft="4px";u.style.paddingRight="0px";var f=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(u.style.display="",p.style.display="",q.style.display="inline-block"):
-(u.style.display="none",p.style.display="none",q.style.display="none");c()});this.editor.addListener("resetGraphView",f);this.editor.addListener("pageSelected",c);k(mxUtils.bind(this,function(a){this.actions.get("zoomOut").funct();mxEvent.consume(a)}),Editor.zoomOutLargeImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");k(mxUtils.bind(this,function(a){this.actions.get("zoomIn").funct();mxEvent.consume(a)}),Editor.zoomInLargeImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");k(mxUtils.bind(this,
+return d}),p=k(mxUtils.bind(this,function(a){this.actions.get("previousPage").funct();mxEvent.consume(a)}),Editor.previousLargeImage,mxResources.get("previousPage")),q=document.createElement("div");q.style.display="inline-block";q.style.verticalAlign="top";q.style.fontFamily="Helvetica,Arial";q.style.marginTop="8px";q.style.fontSize="14px";q.style.color="#ffffff";this.chromelessToolbar.appendChild(q);var t=k(mxUtils.bind(this,function(a){this.actions.get("nextPage").funct();mxEvent.consume(a)}),Editor.nextLargeImage,
+mxResources.get("nextPage")),c=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(q.innerHTML="",mxUtils.write(q,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});p.style.paddingLeft="0px";p.style.paddingRight="4px";t.style.paddingLeft="4px";t.style.paddingRight="0px";var f=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(t.style.display="",p.style.display="",q.style.display="inline-block"):
+(t.style.display="none",p.style.display="none",q.style.display="none");c()});this.editor.addListener("resetGraphView",f);this.editor.addListener("pageSelected",c);k(mxUtils.bind(this,function(a){this.actions.get("zoomOut").funct();mxEvent.consume(a)}),Editor.zoomOutLargeImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");k(mxUtils.bind(this,function(a){this.actions.get("zoomIn").funct();mxEvent.consume(a)}),Editor.zoomInLargeImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");k(mxUtils.bind(this,
function(c){a.isLightboxView()?(1==a.view.scale?this.lightboxFit():a.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(c)}),Editor.actualSizeLargeImage,mxResources.get("fit"));var g=null,n=null,r=mxUtils.bind(this,function(a){null!=g&&(window.clearTimeout(g),fadeThead=null);null!=n&&(window.clearTimeout(n),fadeThead2=null);g=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);g=null;n=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display=
"none";n=null}),600)}),a||200)}),h=mxUtils.bind(this,function(a){null!=g&&(window.clearTimeout(g),fadeThead=null);null!=n&&(window.clearTimeout(n),fadeThead2=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,a||30)});if("1"==urlParams.layers){this.layersDialog=null;var m=k(mxUtils.bind(this,function(c){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=a.createLayersDialog();mxEvent.addListener(this.layersDialog,
"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var b=m.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily="Helvetica,Arial";this.layersDialog.style.backgroundColor="#000000";this.layersDialog.style.width="160px";this.layersDialog.style.padding="4px 2px 4px 2px";this.layersDialog.style.color="#ffffff";
@@ -2104,10 +2104,10 @@ mxUtils.setOpacity(this.layersDialog,70);this.layersDialog.style.left=b.left+"px
"":"none"})}this.addChromelessToolbarItems(k);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||k(mxUtils.bind(this,function(c){null!=this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):a.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(c)}),Editor.editLargeImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(f=0;f<this.lightboxToolbarActions.length;f++){var v=
this.lightboxToolbarActions[f];k(v.fn,v.icon,v.tooltip)}!a.lightbox||"1"!=urlParams.close&&this.container==document.body||k(mxUtils.bind(this,function(a){"1"==urlParams.close?window.close():(this.destroy(),mxEvent.consume(a))}),Editor.closeLargeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";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(a){mxEvent.isTouchEvent(a)||(mxEvent.isShiftDown(a)||h(30),r())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(a){mxEvent.consume(a)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?r():h(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?r():h(100);mxEvent.consume(a)}));
-mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||h(30)}));var D=a.getTolerance();a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(c,b){this.startX=b.getGraphX();this.startY=b.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(a,c){},mouseUp:function(c,b){mxEvent.isTouchEvent(b.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<D&&Math.abs(this.scrollTop-
-a.container.scrollTop)<D&&Math.abs(this.startX-b.getGraphX())<D&&Math.abs(this.startY-b.getGraphY())<D&&(0<parseFloat(e.chromelessToolbar.style.opacity||0)?r():h(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var x=a.view.validate;a.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var a=this.graph.getPagePadding(),c=this.graph.getPageSize();this.translate.x=a.x-(this.x0||0)*c.width;this.translate.y=
-a.y-(this.y0||0)*c.height}x.apply(this,arguments)};var t=a.sizeDidChange;a.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var c=this.getPageLayout(),b=this.getPagePadding(),d=this.getPageSize(),f=Math.ceil(2*b.x+c.width*d.width),g=Math.ceil(2*b.y+c.height*d.height),e=a.minimumGraphSize;if(null==e||e.width!=f||e.height!=g)a.minimumGraphSize=new mxRectangle(0,0,f,g);f=b.x-c.x*d.width;b=b.y-c.y*d.height;this.autoTranslate||this.view.translate.x==f&&this.view.translate.y==
-b?t.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=c.x,this.view.y0=c.y,c=a.view.translate.x,d=a.view.translate.y,a.view.setTranslate(f,b),a.container.scrollLeft+=Math.round((f-c)*a.view.scale),a.container.scrollTop+=Math.round((b-d)*a.view.scale),this.autoTranslate=!1)}}}a.updateZoomTimeout=null;a.cumulativeZoomFactor=1;var z=null;a.lazyZoom=function(c){null!=this.updateZoomTimeout&&window.clearTimeout(this.updateZoomTimeout);c?.15>this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor=
+mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||h(30)}));var E=a.getTolerance();a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(c,b){this.startX=b.getGraphX();this.startY=b.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(a,c){},mouseUp:function(c,b){mxEvent.isTouchEvent(b.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<E&&Math.abs(this.scrollTop-
+a.container.scrollTop)<E&&Math.abs(this.startX-b.getGraphX())<E&&Math.abs(this.startY-b.getGraphY())<E&&(0<parseFloat(e.chromelessToolbar.style.opacity||0)?r():h(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var x=a.view.validate;a.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var a=this.graph.getPagePadding(),c=this.graph.getPageSize();this.translate.x=a.x-(this.x0||0)*c.width;this.translate.y=
+a.y-(this.y0||0)*c.height}x.apply(this,arguments)};var u=a.sizeDidChange;a.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var c=this.getPageLayout(),b=this.getPagePadding(),d=this.getPageSize(),f=Math.ceil(2*b.x+c.width*d.width),g=Math.ceil(2*b.y+c.height*d.height),e=a.minimumGraphSize;if(null==e||e.width!=f||e.height!=g)a.minimumGraphSize=new mxRectangle(0,0,f,g);f=b.x-c.x*d.width;b=b.y-c.y*d.height;this.autoTranslate||this.view.translate.x==f&&this.view.translate.y==
+b?u.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=c.x,this.view.y0=c.y,c=a.view.translate.x,d=a.view.translate.y,a.view.setTranslate(f,b),a.container.scrollLeft+=Math.round((f-c)*a.view.scale),a.container.scrollTop+=Math.round((b-d)*a.view.scale),this.autoTranslate=!1)}}}a.updateZoomTimeout=null;a.cumulativeZoomFactor=1;var z=null;a.lazyZoom=function(c){null!=this.updateZoomTimeout&&window.clearTimeout(this.updateZoomTimeout);c?.15>this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor=
(this.view.scale+.01)/this.view.scale:(this.cumulativeZoomFactor*=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor=(this.view.scale-.01)/this.view.scale:(this.cumulativeZoomFactor/=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale);this.cumulativeZoomFactor=Math.max(.01,Math.min(this.view.scale*
this.cumulativeZoomFactor,160)/this.view.scale);this.updateZoomTimeout=window.setTimeout(mxUtils.bind(this,function(){var c=mxUtils.getOffset(a.container),d=0,f=0;null!=z&&(d=a.container.offsetWidth/2-z.x+c.x,f=a.container.offsetHeight/2-z.y+c.y);c=this.view.scale;this.zoom(this.cumulativeZoomFactor);this.view.scale!=c&&(null!=b&&e.chromelessResize(!1,null,d*(this.cumulativeZoomFactor-1),f*(this.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(a.container)||0==d&&0==f||(a.container.scrollLeft-=d*(this.cumulativeZoomFactor-
1),a.container.scrollTop-=f*(this.cumulativeZoomFactor-1)));this.cumulativeZoomFactor=1;this.updateZoomTimeout=null}),this.lazyZoomDelay)};mxEvent.addMouseWheelListener(mxUtils.bind(this,function(c,b){if((null==this.dialogs||0==this.dialogs.length)&&a.isZoomWheelEvent(c))for(var d=mxEvent.getSource(c);null!=d;){if(d==a.container){z=new mxPoint(mxEvent.getClientX(c),mxEvent.getClientY(c));a.lazyZoom(b);mxEvent.consume(c);break}d=d.parentNode}}))};
@@ -2143,11 +2143,11 @@ this.actions.get("collapsible").setEnabled(e&&(a.isContainer(a.getSelectionCell(
this.actions.get("editLink").setEnabled(1==a.getSelectionCount());this.actions.get("openLink").setEnabled(1==a.getSelectionCount()&&null!=a.getLinkForCell(a.getSelectionCell()));this.actions.get("guides").setEnabled(a.isEnabled());this.actions.get("grid").setEnabled(!this.editor.chromeless||this.editor.editable);b=a.isEnabled()&&!a.isCellLocked(a.getDefaultParent());this.menus.get("layout").setEnabled(b);this.menus.get("insert").setEnabled(b);this.menus.get("direction").setEnabled(b&&e);this.menus.get("align").setEnabled(b&&
e&&1<a.getSelectionCount());this.menus.get("distribute").setEnabled(b&&e&&1<a.getSelectionCount());this.actions.get("selectVertices").setEnabled(b);this.actions.get("selectEdges").setEnabled(b);this.actions.get("selectAll").setEnabled(b);this.actions.get("selectNone").setEnabled(b);this.updatePasteActionStates()};
EditorUi.prototype.refresh=function(a){a=null!=a?a:!0;var b=mxClient.IS_IE&&(null==document.documentMode||5==document.documentMode),e=this.container.clientWidth,d=this.container.clientHeight;this.container==document.body&&(e=document.body.clientWidth||document.documentElement.clientWidth,d=b?document.body.clientHeight||document.documentElement.clientHeight:document.documentElement.clientHeight);var k=0;mxClient.IS_IOS&&!window.navigator.standalone&&window.innerHeight!=document.documentElement.clientHeight&&
-(k=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var l=Math.max(0,Math.min(this.hsplitPosition,e-this.splitSize-20)),p=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",p+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",p+=this.toolbarHeight);0<p&&!mxClient.IS_QUIRKS&&(p+=1);var q=0;if(null!=this.sidebarFooterContainer){var u=
-this.footerHeight+k,q=Math.max(0,Math.min(d-p-u,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=l+"px";this.sidebarFooterContainer.style.height=q+"px";this.sidebarFooterContainer.style.bottom=u+"px"}u=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=p+"px";this.sidebarContainer.style.width=l+"px";this.formatContainer.style.top=p+"px";this.formatContainer.style.width=u+"px";this.formatContainer.style.display=null!=this.format?"":"none";this.diagramContainer.style.left=
+(k=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var l=Math.max(0,Math.min(this.hsplitPosition,e-this.splitSize-20)),p=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",p+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",p+=this.toolbarHeight);0<p&&!mxClient.IS_QUIRKS&&(p+=1);var q=0;if(null!=this.sidebarFooterContainer){var t=
+this.footerHeight+k,q=Math.max(0,Math.min(d-p-t,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=l+"px";this.sidebarFooterContainer.style.height=q+"px";this.sidebarFooterContainer.style.bottom=t+"px"}t=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=p+"px";this.sidebarContainer.style.width=l+"px";this.formatContainer.style.top=p+"px";this.formatContainer.style.width=t+"px";this.formatContainer.style.display=null!=this.format?"":"none";this.diagramContainer.style.left=
null!=this.hsplit.parentNode?l+this.splitSize+"px":"0px";this.diagramContainer.style.top=this.sidebarContainer.style.top;this.footerContainer.style.height=this.footerHeight+"px";this.hsplit.style.top=this.sidebarContainer.style.top;this.hsplit.style.bottom=this.footerHeight+k+"px";this.hsplit.style.left=l+"px";this.footerContainer.style.display=0==this.footerHeight?"none":"";null!=this.tabContainer&&(this.tabContainer.style.left=this.diagramContainer.style.left);b?(this.menubarContainer.style.width=
-e+"px",this.toolbarContainer.style.width=this.menubarContainer.style.width,b=Math.max(0,d-this.footerHeight-this.menubarHeight-this.toolbarHeight),this.sidebarContainer.style.height=b-q+"px",this.formatContainer.style.height=b+"px",this.diagramContainer.style.width=null!=this.hsplit.parentNode?Math.max(0,e-l-this.splitSize-u)+"px":e+"px",this.footerContainer.style.width=this.menubarContainer.style.width,q=Math.max(0,d-this.footerHeight-this.menubarHeight-this.toolbarHeight),null!=this.tabContainer&&
-(this.tabContainer.style.width=this.diagramContainer.style.width,this.tabContainer.style.bottom=this.footerHeight+k+"px",q-=this.tabContainer.clientHeight),this.diagramContainer.style.height=q+"px",this.hsplit.style.height=q+"px"):(0<this.footerHeight&&(this.footerContainer.style.bottom=k+"px"),this.diagramContainer.style.right=u+"px",e=0,null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+k+"px",this.tabContainer.style.right=this.diagramContainer.style.right,e=this.tabContainer.clientHeight),
+e+"px",this.toolbarContainer.style.width=this.menubarContainer.style.width,b=Math.max(0,d-this.footerHeight-this.menubarHeight-this.toolbarHeight),this.sidebarContainer.style.height=b-q+"px",this.formatContainer.style.height=b+"px",this.diagramContainer.style.width=null!=this.hsplit.parentNode?Math.max(0,e-l-this.splitSize-t)+"px":e+"px",this.footerContainer.style.width=this.menubarContainer.style.width,q=Math.max(0,d-this.footerHeight-this.menubarHeight-this.toolbarHeight),null!=this.tabContainer&&
+(this.tabContainer.style.width=this.diagramContainer.style.width,this.tabContainer.style.bottom=this.footerHeight+k+"px",q-=this.tabContainer.clientHeight),this.diagramContainer.style.height=q+"px",this.hsplit.style.height=q+"px"):(0<this.footerHeight&&(this.footerContainer.style.bottom=k+"px"),this.diagramContainer.style.right=t+"px",e=0,null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+k+"px",this.tabContainer.style.right=this.diagramContainer.style.right,e=this.tabContainer.clientHeight),
this.sidebarContainer.style.bottom=this.footerHeight+q+k+"px",this.formatContainer.style.bottom=this.footerHeight+k+"px",this.diagramContainer.style.bottom=this.footerHeight+k+e+"px");a&&this.editor.graph.sizeDidChange()};EditorUi.prototype.createTabContainer=function(){return null};
EditorUi.prototype.createDivs=function(){this.menubarContainer=this.createDiv("geMenubarContainer");this.toolbarContainer=this.createDiv("geToolbarContainer");this.sidebarContainer=this.createDiv("geSidebarContainer");this.formatContainer=this.createDiv("geSidebarContainer geFormatContainer");this.diagramContainer=this.createDiv("geDiagramContainer");this.footerContainer=this.createDiv("geFooterContainer");this.hsplit=this.createDiv("geHsplit");this.hsplit.setAttribute("title",mxResources.get("collapseExpand"));
this.menubarContainer.style.top="0px";this.menubarContainer.style.left="0px";this.menubarContainer.style.right="0px";this.toolbarContainer.style.left="0px";this.toolbarContainer.style.right="0px";this.sidebarContainer.style.left="0px";this.formatContainer.style.right="0px";this.formatContainer.style.zIndex="1";this.diagramContainer.style.right=(null!=this.format?this.formatWidth:0)+"px";this.footerContainer.style.left="0px";this.footerContainer.style.right="0px";this.footerContainer.style.bottom=
@@ -2157,9 +2157,9 @@ this.sidebar=this.editor.chromeless?null:this.createSidebar(this.sidebarContaine
this.container.appendChild(this.sidebarFooterContainer);this.container.appendChild(this.diagramContainer);null!=this.container&&null!=this.tabContainer&&this.container.appendChild(this.tabContainer);this.toolbar=this.editor.chromeless?null:this.createToolbar(this.createDiv("geToolbar"));null!=this.toolbar&&(this.toolbarContainer.appendChild(this.toolbar.container),this.container.appendChild(this.toolbarContainer));null!=this.sidebar&&(this.container.appendChild(this.hsplit),this.addSplitHandler(this.hsplit,
!0,0,mxUtils.bind(this,function(a){this.hsplitPosition=a;this.refresh()})))};EditorUi.prototype.createStatusContainer=function(){var a=document.createElement("a");a.className="geItem geStatus";420>screen.width&&(a.style.maxWidth=Math.max(20,screen.width-320)+"px",a.style.overflow="hidden");return a};EditorUi.prototype.setStatusText=function(a){this.statusContainer.innerHTML=a};EditorUi.prototype.createToolbar=function(a){return new Toolbar(this,a)};
EditorUi.prototype.createSidebar=function(a){return new Sidebar(this,a)};EditorUi.prototype.createFormat=function(a){return new Format(this,a)};EditorUi.prototype.createFooter=function(){return this.createDiv("geFooter")};EditorUi.prototype.createDiv=function(a){var b=document.createElement("div");b.className=a;return b};
-EditorUi.prototype.addSplitHandler=function(a,b,e,d){function k(a){if(null!=p){var g=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a));d(Math.max(0,q+(b?g.x-p.x:p.y-g.y)-e));mxEvent.consume(a);q!=f()&&(u=!0,c=null)}}function l(a){k(a);p=q=null}var p=null,q=null,u=!0,c=null;mxClient.IS_POINTER&&(a.style.touchAction="none");var f=mxUtils.bind(this,function(){var c=parseInt(b?a.style.left:a.style.bottom);b||(c=c+e-this.footerHeight);return c});mxEvent.addGestureListeners(a,function(a){p=new mxPoint(mxEvent.getClientX(a),
-mxEvent.getClientY(a));q=f();u=!1;mxEvent.consume(a)});mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){if(!u&&this.hsplitClickEnabled){var b=null!=c?c-e:0;c=f();d(b);mxEvent.consume(a)}}));mxEvent.addGestureListeners(document,null,k,l);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,k,l)})};
-EditorUi.prototype.showDialog=function(a,b,e,d,k,l,p,q,u){this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,a,b,e,d,k,l,p,q,u);this.dialogs.push(this.dialog)};
+EditorUi.prototype.addSplitHandler=function(a,b,e,d){function k(a){if(null!=p){var g=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a));d(Math.max(0,q+(b?g.x-p.x:p.y-g.y)-e));mxEvent.consume(a);q!=f()&&(t=!0,c=null)}}function l(a){k(a);p=q=null}var p=null,q=null,t=!0,c=null;mxClient.IS_POINTER&&(a.style.touchAction="none");var f=mxUtils.bind(this,function(){var c=parseInt(b?a.style.left:a.style.bottom);b||(c=c+e-this.footerHeight);return c});mxEvent.addGestureListeners(a,function(a){p=new mxPoint(mxEvent.getClientX(a),
+mxEvent.getClientY(a));q=f();t=!1;mxEvent.consume(a)});mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){if(!t&&this.hsplitClickEnabled){var b=null!=c?c-e:0;c=f();d(b);mxEvent.consume(a)}}));mxEvent.addGestureListeners(document,null,k,l);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,k,l)})};
+EditorUi.prototype.showDialog=function(a,b,e,d,k,l,p,q,t){this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,a,b,e,d,k,l,p,q,t);this.dialogs.push(this.dialog)};
EditorUi.prototype.hideDialog=function(a,b){if(null!=this.dialogs&&0<this.dialogs.length){var e=this.dialogs.pop();0==e.close(a,b)?this.dialogs.push(e):(this.dialog=0<this.dialogs.length?this.dialogs[this.dialogs.length-1]:null,null==this.dialog&&"hidden"!=this.editor.graph.container.style.visibility&&this.editor.graph.container.focus(),mxUtils.clearSelection(),this.editor.fireEvent(new mxEventObject("hideDialog")))}};
EditorUi.prototype.pickColor=function(a,b){var e=this.editor.graph,d=e.cellEditor.saveSelection(),k=226+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12)),l=new ColorDialog(this,a||"none",function(a){e.cellEditor.restoreSelection(d);b(a)},function(){e.cellEditor.restoreSelection(d)});this.showDialog(l.container,230,k,!0,!1);l.init()};
EditorUi.prototype.openFile=function(){window.openFile=new OpenFile(mxUtils.bind(this,function(a){this.hideDialog(a)}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:320,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null})};
@@ -2177,8 +2177,8 @@ EditorUi.prototype.createOutline=function(a){var b=new mxOutline(this.editor.gra
EditorUi.prototype.createKeyHandler=function(a){function b(a,c,b){p.push(function(){if(!d.isSelectionEmpty()&&d.isEnabled())if(c=null!=c?c:1,b){d.getModel().beginUpdate();try{for(var f=d.getSelectionCells(),g=0;g<f.length;g++)if(d.getModel().isVertex(f[g])&&d.isCellResizable(f[g])){var e=d.getCellGeometry(f[g]);null!=e&&(e=e.clone(),37==a?e.width=Math.max(0,e.width-c):38==a?e.height=Math.max(0,e.height-c):39==a?e.width+=c:40==a&&(e.height+=c),d.getModel().setGeometry(f[g],e))}}finally{d.getModel().endUpdate()}}else f=
d.getSelectionCell(),g=d.model.getParent(f),e=null,1==d.getSelectionCount()&&d.model.isVertex(f)&&null!=d.layoutManager&&!d.isCellLocked(f)&&(e=d.layoutManager.getLayout(g)),null!=e&&e.constructor==mxStackLayout?(e=g.getIndex(f),37==a||38==a?d.model.add(g,f,Math.max(0,e-1)):39!=a&&40!=a||d.model.add(g,f,Math.min(d.model.getChildCount(g),e+1))):(g=f=0,37==a?f=-c:38==a?g=-c:39==a?f=c:40==a&&(g=c),d.moveCells(d.getMovableCells(d.getSelectionCells()),f,g))});null!=q&&window.clearTimeout(q);q=window.setTimeout(function(){if(0<
p.length){d.getModel().beginUpdate();try{for(var a=0;a<p.length;a++)p[a]();p=[]}finally{d.getModel().endUpdate()}d.scrollCellToVisible(d.getSelectionCell())}},200)}var e=this,d=this.editor.graph,k=new mxKeyHandler(d),l=k.isEventIgnored;k.isEventIgnored=function(a){return(!this.isControlDown(a)||mxEvent.isShiftDown(a)||90!=a.keyCode&&89!=a.keyCode&&188!=a.keyCode&&190!=a.keyCode&&85!=a.keyCode)&&(66!=a.keyCode&&73!=a.keyCode||!this.isControlDown(a)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&
-!mxClient.IS_SF)&&l.apply(this,arguments)};k.isEnabledForEvent=function(a){return!mxEvent.isConsumed(a)&&this.isGraphEvent(a)&&this.isEnabled()&&(null==e.dialogs||0==e.dialogs.length)};k.isControlDown=function(a){return mxEvent.isControlDown(a)||mxClient.IS_MAC&&a.metaKey};var p=[],q=null,u={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},c=k.getFunction;mxKeyHandler.prototype.getFunction=function(a){if(d.isEnabled()){if(mxEvent.isShiftDown(a)&&
-mxEvent.isAltDown(a)){var f=e.actions.get(e.altShiftActions[a.keyCode]);if(null!=f)return f.funct}if(9==a.keyCode&&mxEvent.isAltDown(a))return mxEvent.isShiftDown(a)?function(){d.selectParentCell()}:function(){d.selectChildCell()};if(null!=u[a.keyCode]&&!d.isSelectionEmpty())if(mxEvent.isShiftDown(a)&&mxEvent.isAltDown(a)){if(d.model.isVertex(d.getSelectionCell()))return function(){var c=d.connectVertex(d.getSelectionCell(),u[a.keyCode],d.defaultEdgeLength,a,!0);null!=c&&0<c.length&&(1==c.length&&
+!mxClient.IS_SF)&&l.apply(this,arguments)};k.isEnabledForEvent=function(a){return!mxEvent.isConsumed(a)&&this.isGraphEvent(a)&&this.isEnabled()&&(null==e.dialogs||0==e.dialogs.length)};k.isControlDown=function(a){return mxEvent.isControlDown(a)||mxClient.IS_MAC&&a.metaKey};var p=[],q=null,t={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},c=k.getFunction;mxKeyHandler.prototype.getFunction=function(a){if(d.isEnabled()){if(mxEvent.isShiftDown(a)&&
+mxEvent.isAltDown(a)){var f=e.actions.get(e.altShiftActions[a.keyCode]);if(null!=f)return f.funct}if(9==a.keyCode&&mxEvent.isAltDown(a))return mxEvent.isShiftDown(a)?function(){d.selectParentCell()}:function(){d.selectChildCell()};if(null!=t[a.keyCode]&&!d.isSelectionEmpty())if(mxEvent.isShiftDown(a)&&mxEvent.isAltDown(a)){if(d.model.isVertex(d.getSelectionCell()))return function(){var c=d.connectVertex(d.getSelectionCell(),t[a.keyCode],d.defaultEdgeLength,a,!0);null!=c&&0<c.length&&(1==c.length&&
d.model.isEdge(c[0])?d.setSelectionCell(d.model.getTerminal(c[0],!1)):d.setSelectionCell(c[c.length-1]),d.scrollCellToVisible(d.getSelectionCell()),null!=e.hoverIcons&&e.hoverIcons.update(d.view.getState(d.getSelectionCell())))}}else return this.isControlDown(a)?function(){b(a.keyCode,mxEvent.isShiftDown(a)?d.gridSize:null,!0)}:function(){b(a.keyCode,mxEvent.isShiftDown(a)?d.gridSize:null)}}return c.apply(this,arguments)};k.bindAction=mxUtils.bind(this,function(a,c,b,d){var f=this.actions.get(b);
null!=f&&(b=function(){f.isEnabled()&&f.funct()},c?d?k.bindControlShiftKey(a,b):k.bindControlKey(a,b):d?k.bindShiftKey(a,b):k.bindKey(a,b))});var f=k.escape;k.escape=function(a){f.apply(this,arguments)};k.enter=function(){};k.bindControlShiftKey(36,function(){d.exitGroup()});k.bindControlShiftKey(35,function(){d.enterGroup()});k.bindKey(36,function(){d.home()});k.bindKey(35,function(){d.refresh()});k.bindAction(107,!0,"zoomIn");k.bindAction(109,!0,"zoomOut");k.bindAction(80,!0,"print");k.bindAction(79,
!0,"outline",!0);k.bindAction(112,!1,"about");if(!this.editor.chromeless||this.editor.editable)k.bindControlKey(36,function(){d.isEnabled()&&d.foldCells(!0)}),k.bindControlKey(35,function(){d.isEnabled()&&d.foldCells(!1)}),k.bindControlKey(13,function(){d.isEnabled()&&d.setSelectionCells(d.duplicateCells(d.getSelectionCells(),!1))}),k.bindAction(8,!1,"delete"),k.bindAction(8,!0,"deleteAll"),k.bindAction(46,!1,"delete"),k.bindAction(46,!0,"deleteAll"),k.bindAction(72,!0,"resetView"),k.bindAction(72,
@@ -2191,40 +2191,40 @@ EditorUi.prototype.destroy=function(){null!=this.editor&&(this.editor.destroy(),
(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.gridColor="#e0e0e0";mxSvgCanvas2D.prototype.foAltText="[Not supported by viewer]";mxShape.prototype.getConstraints=function(a){return null};
Graph=function(a,b,e,d,k){mxGraph.call(this,a,b,e,d);this.themes=k||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);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(a){var c=this.view.getState(a);a=null!=c?c.style:this.getCellStyle(a);
-return"1"==a.html||"wrap"==a[mxConstants.STYLE_WHITE_SPACE]};if(this.edgeMode){var l=null,p=null,q=null,u=null,c=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,b){if("mouseDown"==b.getProperty("eventName")&&this.isEnabled()){var d=b.getProperty("event");if(!mxEvent.isControlDown(d.getEvent())&&!mxEvent.isShiftDown(d.getEvent())){var f=d.getState();null!=f&&this.model.isEdge(f.cell)&&(l=new mxPoint(d.getGraphX(),d.getGraphY()),c=this.isCellSelected(f.cell),q=f,p=d,null!=
-f.text&&null!=f.text.boundingBox&&mxUtils.contains(f.text.boundingBox,d.getGraphX(),d.getGraphY())?u=mxEvent.LABEL_HANDLE:(f=this.selectionCellsHandler.getHandler(f.cell),null!=f&&null!=f.bends&&0<f.bends.length&&(u=f.getHandleForEvent(d))))}}}));this.addMouseListener({mouseDown:function(a,c){},mouseMove:mxUtils.bind(this,function(a,b){var d=this.selectionCellsHandler.handlers.map,f;for(f in d)if(null!=d[f].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isControlDown(b.getEvent())&&
-!mxEvent.isShiftDown(b.getEvent())&&!mxEvent.isAltDown(b.getEvent()))if(f=this.tolerance,null!=l&&null!=q&&null!=p){if(d=q,Math.abs(l.x-b.getGraphX())>f||Math.abs(l.y-b.getGraphY())>f){this.isCellSelected(d.cell)||this.setSelectionCell(d.cell);var g=this.selectionCellsHandler.getHandler(d.cell);if(null!=g&&null!=g.bends&&0<g.bends.length){var e=g.getHandleForEvent(p),h=this.view.getEdgeStyle(d);f=h==mxEdgeStyle.EntityRelation;c||u!=mxEvent.LABEL_HANDLE||(e=u);if(f&&0!=e&&e!=g.bends.length-1&&e!=mxEvent.LABEL_HANDLE)!f||
-null==d.visibleSourceState&&null==d.visibleTargetState||(this.graphHandler.reset(),b.consume());else if(e==mxEvent.LABEL_HANDLE||0==e||null!=d.visibleSourceState||e==g.bends.length-1||null!=d.visibleTargetState)f||e==mxEvent.LABEL_HANDLE||(f=d.absolutePoints,null!=f&&(null==h&&null==e||h==mxEdgeStyle.OrthConnector)&&(e=u,null==e&&(e=new mxRectangle(l.x,l.y),e.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(e,f[0].x,f[0].y)?e=0:mxUtils.contains(e,f[f.length-1].x,f[f.length-1].y)?
-e=g.bends.length-1:null!=h&&(2==f.length||3==f.length&&(0==Math.round(f[0].x-f[1].x)&&0==Math.round(f[1].x-f[2].x)||0==Math.round(f[0].y-f[1].y)&&0==Math.round(f[1].y-f[2].y)))?e=2:(e=mxUtils.findNearestSegment(d,l.x,l.y),e=null==h?mxEvent.VIRTUAL_HANDLE-e:e+1))),null==e&&(e=mxEvent.VIRTUAL_HANDLE)),g.start(b.getGraphX(),b.getGraphX(),e),u=l=p=q=null,c=!1,b.consume(),this.graphHandler.reset()}}}else if(d=b.getState(),null!=d&&this.model.isEdge(d.cell)){g=null;f=d.absolutePoints;if(null!=f)if(e=new mxRectangle(b.getGraphX(),
+return"1"==a.html||"wrap"==a[mxConstants.STYLE_WHITE_SPACE]};if(this.edgeMode){var l=null,p=null,q=null,t=null,c=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,b){if("mouseDown"==b.getProperty("eventName")&&this.isEnabled()){var d=b.getProperty("event");if(!mxEvent.isControlDown(d.getEvent())&&!mxEvent.isShiftDown(d.getEvent())){var f=d.getState();null!=f&&this.model.isEdge(f.cell)&&(l=new mxPoint(d.getGraphX(),d.getGraphY()),c=this.isCellSelected(f.cell),q=f,p=d,null!=
+f.text&&null!=f.text.boundingBox&&mxUtils.contains(f.text.boundingBox,d.getGraphX(),d.getGraphY())?t=mxEvent.LABEL_HANDLE:(f=this.selectionCellsHandler.getHandler(f.cell),null!=f&&null!=f.bends&&0<f.bends.length&&(t=f.getHandleForEvent(d))))}}}));this.addMouseListener({mouseDown:function(a,c){},mouseMove:mxUtils.bind(this,function(a,b){var d=this.selectionCellsHandler.handlers.map,f;for(f in d)if(null!=d[f].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isControlDown(b.getEvent())&&
+!mxEvent.isShiftDown(b.getEvent())&&!mxEvent.isAltDown(b.getEvent()))if(f=this.tolerance,null!=l&&null!=q&&null!=p){if(d=q,Math.abs(l.x-b.getGraphX())>f||Math.abs(l.y-b.getGraphY())>f){this.isCellSelected(d.cell)||this.setSelectionCell(d.cell);var g=this.selectionCellsHandler.getHandler(d.cell);if(null!=g&&null!=g.bends&&0<g.bends.length){var e=g.getHandleForEvent(p),h=this.view.getEdgeStyle(d);f=h==mxEdgeStyle.EntityRelation;c||t!=mxEvent.LABEL_HANDLE||(e=t);if(f&&0!=e&&e!=g.bends.length-1&&e!=mxEvent.LABEL_HANDLE)!f||
+null==d.visibleSourceState&&null==d.visibleTargetState||(this.graphHandler.reset(),b.consume());else if(e==mxEvent.LABEL_HANDLE||0==e||null!=d.visibleSourceState||e==g.bends.length-1||null!=d.visibleTargetState)f||e==mxEvent.LABEL_HANDLE||(f=d.absolutePoints,null!=f&&(null==h&&null==e||h==mxEdgeStyle.OrthConnector)&&(e=t,null==e&&(e=new mxRectangle(l.x,l.y),e.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(e,f[0].x,f[0].y)?e=0:mxUtils.contains(e,f[f.length-1].x,f[f.length-1].y)?
+e=g.bends.length-1:null!=h&&(2==f.length||3==f.length&&(0==Math.round(f[0].x-f[1].x)&&0==Math.round(f[1].x-f[2].x)||0==Math.round(f[0].y-f[1].y)&&0==Math.round(f[1].y-f[2].y)))?e=2:(e=mxUtils.findNearestSegment(d,l.x,l.y),e=null==h?mxEvent.VIRTUAL_HANDLE-e:e+1))),null==e&&(e=mxEvent.VIRTUAL_HANDLE)),g.start(b.getGraphX(),b.getGraphX(),e),t=l=p=q=null,c=!1,b.consume(),this.graphHandler.reset()}}}else if(d=b.getState(),null!=d&&this.model.isEdge(d.cell)){g=null;f=d.absolutePoints;if(null!=f)if(e=new mxRectangle(b.getGraphX(),
b.getGraphY()),e.grow(mxEdgeHandler.prototype.handleImage.width/2),null!=d.text&&null!=d.text.boundingBox&&mxUtils.contains(d.text.boundingBox,b.getGraphX(),b.getGraphY()))g="move";else if(mxUtils.contains(e,f[0].x,f[0].y)||mxUtils.contains(e,f[f.length-1].x,f[f.length-1].y))g="pointer";else if(null!=d.visibleSourceState||null!=d.visibleTargetState)h=this.view.getEdgeStyle(d),g="crosshair",h!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(d)&&(h=mxUtils.findNearestSegment(d,b.getGraphX(),b.getGraphY()),
-h<f.length-1&&0<=h&&(g=0==Math.round(f[h].x-f[h+1].x)?"col-resize":"row-resize"));null!=g&&d.setCursor(g)}}),mouseUp:mxUtils.bind(this,function(a,c){u=l=p=q=null})})}this.cellRenderer.getLabelValue=function(a){var c=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);a.view.graph.isHtmlLabel(a.cell)&&(c=1!=a.style.html?mxUtils.htmlEntities(c,!1):a.view.graph.sanitizeHtml(c));return c};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0);this.setDropEnabled(!0);this.setPanning(!0);
+h<f.length-1&&0<=h&&(g=0==Math.round(f[h].x-f[h+1].x)?"col-resize":"row-resize"));null!=g&&d.setCursor(g)}}),mouseUp:mxUtils.bind(this,function(a,c){t=l=p=q=null})})}this.cellRenderer.getLabelValue=function(a){var c=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);a.view.graph.isHtmlLabel(a.cell)&&(c=1!=a.style.html?mxUtils.htmlEntities(c,!1):a.view.graph.sanitizeHtml(c));return c};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(a,c){return!1};this.alternateEdgeStyle="vertical";null==d&&this.loadStylesheet();var f=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=
function(){var a=f.apply(this,arguments);if(this.graph.pageVisible){for(var c=[],b=this.graph.pageFormat,d=this.graph.pageScale,g=b.width*d,b=b.height*d,d=this.graph.view.translate,e=this.graph.view.scale,h=this.graph.getPageLayout(),n=0;n<h.width;n++)c.push(new mxRectangle(((h.x+n)*g+d.x)*e,(h.y*b+d.y)*e,g*e,b*e));for(n=0;n<h.height;n++)c.push(new mxRectangle((h.x*g+d.x)*e,((h.y+n)*b+d.y)*e,g*e,b*e));a=c.concat(a)}return a};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=
function(a,c){return null==a.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(a){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};this.graphHandler.getCells=function(a){for(var c=mxGraphHandler.prototype.getCells.apply(this,arguments),b=[],d=0;d<c.length;d++){var f=this.graph.view.getState(c[d]),f=null!=f?f.style:this.graph.getCellStyle(c[d]);
"1"==mxUtils.getValue(f,"part","0")?(f=this.graph.model.getParent(c[d]),this.graph.model.isVertex(f)&&0>mxUtils.indexOf(c,f)&&b.push(f)):b.push(c[d])}return b};this.connectionHandler.createTargetVertex=function(a,c){var b=this.graph.view.getState(c),b=null!=b?b.style:this.graph.getCellStyle(c);mxUtils.getValue(b,"part",!1)&&(b=this.graph.model.getParent(c),this.graph.model.isVertex(b)&&(c=b));return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var g=new mxRubberband(this);
this.getRubberband=function(){return g};var n=(new Date).getTime(),r=0,h=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var a=this.currentState;h.apply(this,arguments);a!=this.currentState?(n=(new Date).getTime(),r=0):r=(new Date).getTime()-n};var m=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=this.currentState&&a.getState()==this.currentState&&2E3<r||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,
-"outlineConnect","1"))&&m.apply(this,arguments)};var w=this.isToggleEvent;this.isToggleEvent=function(a){return w.apply(this,arguments)||mxEvent.isShiftDown(a)};var v=g.isForceRubberbandEvent;g.isForceRubberbandEvent=function(a){return v.apply(this,arguments)||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==a.getState()&&mxEvent.isTouchEvent(a.getEvent())};var D=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&
-(D=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=D)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(a){return mxEvent.isMouseEvent(a.getEvent())};var x=this.click;this.click=function(a){var c=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);if(this.isEnabled()&&!c||a.isConsumed())return x.apply(this,
-arguments);c=c?a.sourceState.cell:a.getCell();null!=c&&(c=this.getLinkForCell(c),null!=c&&(this.isCustomLink(c)?this.customLinkClicked(c):this.openLink(c)))};this.tooltipHandler.getStateForEvent=function(a){return a.sourceState};this.getCursorForMouseEvent=function(a){var c=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);return this.getCursorForCell(c?a.sourceState.cell:a.getCell())};var t=this.getCursorForCell;this.getCursorForCell=function(a){if(!this.isEnabled()||this.isCellLocked(a)){if(null!=
-this.getLinkForCell(a))return"pointer";if(this.isCellLocked(a))return"default"}return t.apply(this,arguments)};this.selectRegion=function(a,c){var b=this.getAllCells(a.x,a.y,a.width,a.height);this.selectCellsForEvent(b,c);return b};this.getAllCells=function(a,c,b,d,f,g){g=null!=g?g:[];if(0<b||0<d){var e=this.getModel(),h=a+b,n=c+d;null==f&&(f=this.getCurrentRoot(),null==f&&(f=e.getRoot()));if(null!=f)for(var m=e.getChildCount(f),H=0;H<m;H++){var r=e.getChildAt(f,H),t=this.view.getState(r);if(null!=
-t&&this.isCellVisible(r)&&"1"!=mxUtils.getValue(t.style,"locked","0")){var x=mxUtils.getValue(t.style,mxConstants.STYLE_ROTATION)||0;0!=x&&(t=mxUtils.getBoundingBox(t,x));(e.isEdge(r)||e.isVertex(r))&&t.x>=a&&t.y+t.height<=n&&t.y>=c&&t.x+t.width<=h&&g.push(r);this.getAllCells(a,c,b,d,r,g)}}}return g};var z=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,c,b){return this.graph.isCellSelected(a)?!1:z.apply(this,arguments)};this.isCellLocked=function(a){for(a=
-this.view.getState(a);null!=a;){if("1"==mxUtils.getValue(a.style,"locked","0"))return!0;a=this.view.getState(this.model.getParent(a.cell))}return!1};var B=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,c){if("mouseDown"==c.getProperty("eventName")){var b=c.getProperty("event").getState();B=null==b||this.isSelectionEmpty()||this.isCellSelected(b.cell)?null:this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(a,c){if(!mxEvent.isMultiTouchEvent(c)){var b=
-c.getProperty("event"),d=c.getProperty("cell");null==d?(b=mxUtils.convertPoint(this.container,mxEvent.getClientX(b),mxEvent.getClientY(b)),g.start(b.x,b.y)):null!=B?this.addSelectionCells(B):1<this.getSelectionCount()&&this.isCellSelected(d)&&this.removeSelectionCell(d);B=null;c.consume()}}));this.connectionHandler.selectCells=function(a,c){this.graph.setSelectionCell(c||a)};this.connectionHandler.constraintHandler.isStateIgnored=function(a,c){return c&&a.view.graph.isCellSelected(a.cell)};this.selectionModel.addListener(mxEvent.CHANGE,
+"outlineConnect","1"))&&m.apply(this,arguments)};var w=this.isToggleEvent;this.isToggleEvent=function(a){return w.apply(this,arguments)||mxEvent.isShiftDown(a)};var v=g.isForceRubberbandEvent;g.isForceRubberbandEvent=function(a){return v.apply(this,arguments)||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==a.getState()&&mxEvent.isTouchEvent(a.getEvent())};var E=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&
+(E=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=E)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(a){return mxEvent.isMouseEvent(a.getEvent())};var x=this.click;this.click=function(a){var c=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);if(this.isEnabled()&&!c||a.isConsumed())return x.apply(this,
+arguments);c=c?a.sourceState.cell:a.getCell();null!=c&&(c=this.getLinkForCell(c),null!=c&&(this.isCustomLink(c)?this.customLinkClicked(c):this.openLink(c)))};this.tooltipHandler.getStateForEvent=function(a){return a.sourceState};this.getCursorForMouseEvent=function(a){var c=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);return this.getCursorForCell(c?a.sourceState.cell:a.getCell())};var u=this.getCursorForCell;this.getCursorForCell=function(a){if(!this.isEnabled()||this.isCellLocked(a)){if(null!=
+this.getLinkForCell(a))return"pointer";if(this.isCellLocked(a))return"default"}return u.apply(this,arguments)};this.selectRegion=function(a,c){var b=this.getAllCells(a.x,a.y,a.width,a.height);this.selectCellsForEvent(b,c);return b};this.getAllCells=function(a,c,b,d,f,g){g=null!=g?g:[];if(0<b||0<d){var e=this.getModel(),h=a+b,n=c+d;null==f&&(f=this.getCurrentRoot(),null==f&&(f=e.getRoot()));if(null!=f)for(var m=e.getChildCount(f),H=0;H<m;H++){var r=e.getChildAt(f,H),u=this.view.getState(r);if(null!=
+u&&this.isCellVisible(r)&&"1"!=mxUtils.getValue(u.style,"locked","0")){var x=mxUtils.getValue(u.style,mxConstants.STYLE_ROTATION)||0;0!=x&&(u=mxUtils.getBoundingBox(u,x));(e.isEdge(r)||e.isVertex(r))&&u.x>=a&&u.y+u.height<=n&&u.y>=c&&u.x+u.width<=h&&g.push(r);this.getAllCells(a,c,b,d,r,g)}}}return g};var z=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,c,b){return this.graph.isCellSelected(a)?!1:z.apply(this,arguments)};this.isCellLocked=function(a){for(a=
+this.view.getState(a);null!=a;){if("1"==mxUtils.getValue(a.style,"locked","0"))return!0;a=this.view.getState(this.model.getParent(a.cell))}return!1};var C=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,c){if("mouseDown"==c.getProperty("eventName")){var b=c.getProperty("event").getState();C=null==b||this.isSelectionEmpty()||this.isCellSelected(b.cell)?null:this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(a,c){if(!mxEvent.isMultiTouchEvent(c)){var b=
+c.getProperty("event"),d=c.getProperty("cell");null==d?(b=mxUtils.convertPoint(this.container,mxEvent.getClientX(b),mxEvent.getClientY(b)),g.start(b.x,b.y)):null!=C?this.addSelectionCells(C):1<this.getSelectionCount()&&this.isCellSelected(d)&&this.removeSelectionCell(d);C=null;c.consume()}}));this.connectionHandler.selectCells=function(a,c){this.graph.setSelectionCell(c||a)};this.connectionHandler.constraintHandler.isStateIgnored=function(a,c){return c&&a.view.graph.isCellSelected(a.cell)};this.selectionModel.addListener(mxEvent.CHANGE,
mxUtils.bind(this,function(){var a=this.connectionHandler.constraintHandler;null!=a.currentFocus&&a.isStateIgnored(a.currentFocus,!0)&&(a.currentFocus=null,a.constraints=null,a.destroyIcons());a.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var N=this.updateMouseEvent;this.updateMouseEvent=function(a){a=N.apply(this,arguments);null!=a.state&&this.isCellLocked(a.getCell())&&(a.state=null);return a}}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.lineJumpsEnabled=!0;Graph.defaultJumpSize=6;
Graph.createSvgImage=function(a,b,e){e=unescape(encodeURIComponent('<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+a+'px" height="'+b+'px" version="1.1">'+e+"</svg>"));return new mxImage("data:image/svg+xml;base64,"+(window.btoa?btoa(e):Base64.encode(e,!0)),a,b)};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=!mxClient.IS_IOS;Graph.prototype.defaultPageVisible=!0;Graph.prototype.lightbox=!1;Graph.prototype.defaultPageBackgroundColor="#ffffff";Graph.prototype.defaultPageBorderColor="#ffffff";Graph.prototype.scrollTileSize=new mxRectangle(0,0,400,400);
Graph.prototype.transparentBackground=!0;Graph.prototype.defaultEdgeLength=80;Graph.prototype.edgeMode=!1;Graph.prototype.connectionArrowsEnabled=!0;Graph.prototype.placeholderPattern=RegExp("%(date{.*}|[^%^{^}]+)%","g");Graph.prototype.absoluteUrlPattern=/^(?:[a-z]+:)?\/\//i;Graph.prototype.defaultThemeName="default";Graph.prototype.defaultThemes={};Graph.prototype.baseUrl=null!=urlParams.base?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.init=function(a){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(a,e){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var b=a.view.graph.tolerance,k=!0,l=null,p=mxUtils.bind(this,function(a){k=!0;l=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a))}),q=mxUtils.bind(this,function(a){k=k&&null!=l&&Math.abs(l.x-mxEvent.getClientX(a))<b&&Math.abs(l.y-mxEvent.getClientY(a))<b}),u=mxUtils.bind(this,function(c){if(k)for(var b=mxEvent.getSource(c);null!=
-b&&b!=e.node;){if("a"==b.nodeName.toLowerCase()){a.view.graph.labelLinkClicked(a,b,c);break}b=b.parentNode}});mxEvent.addGestureListeners(e.node,p,q,u);mxEvent.addListener(e.node,"click",function(a){mxEvent.consume(a)})};this.initLayoutManager()};
-(function(){Graph.prototype.useCssTransforms=!1;Graph.prototype.currentScale=1;Graph.prototype.currentTranslate=new mxPoint(0,0);Graph.prototype.isCssTransformsSupported=function(){return this.dialect==mxConstants.DIALECT_SVG&&!mxClient.NO_FO};Graph.prototype.getCellAt=function(a,b,e,p,q,u){this.useCssTransforms&&(a=a/this.currentScale-this.currentTranslate.x,b=b/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(a,
-b,e,p,q,u){p=null!=p?p:!0;q=null!=q?q:!0;null==e&&(e=this.getCurrentRoot(),null==e&&(e=this.getModel().getRoot()));if(null!=e)for(var c=this.model.getChildCount(e)-1;0<=c;c--){var d=this.model.getChildAt(e,c),g=this.getScaledCellAt(a,b,d,p,q,u);if(null!=g)return g;if(this.isCellVisible(d)&&(q&&this.model.isEdge(d)||p&&this.model.isVertex(d))&&(g=this.view.getState(d),null!=g&&(null==u||!u(g,a,b))&&this.intersects(g,a,b)))return d}return null};mxCellHighlight.prototype.getStrokeWidth=function(a){a=
+Graph.prototype.init=function(a){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(a,e){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var b=a.view.graph.tolerance,k=!0,l=null,p=mxUtils.bind(this,function(a){k=!0;l=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a))}),q=mxUtils.bind(this,function(a){k=k&&null!=l&&Math.abs(l.x-mxEvent.getClientX(a))<b&&Math.abs(l.y-mxEvent.getClientY(a))<b}),t=mxUtils.bind(this,function(c){if(k)for(var b=mxEvent.getSource(c);null!=
+b&&b!=e.node;){if("a"==b.nodeName.toLowerCase()){a.view.graph.labelLinkClicked(a,b,c);break}b=b.parentNode}});mxEvent.addGestureListeners(e.node,p,q,t);mxEvent.addListener(e.node,"click",function(a){mxEvent.consume(a)})};this.initLayoutManager()};
+(function(){Graph.prototype.useCssTransforms=!1;Graph.prototype.currentScale=1;Graph.prototype.currentTranslate=new mxPoint(0,0);Graph.prototype.isCssTransformsSupported=function(){return this.dialect==mxConstants.DIALECT_SVG&&!mxClient.NO_FO};Graph.prototype.getCellAt=function(a,b,e,p,q,t){this.useCssTransforms&&(a=a/this.currentScale-this.currentTranslate.x,b=b/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(a,
+b,e,p,q,t){p=null!=p?p:!0;q=null!=q?q:!0;null==e&&(e=this.getCurrentRoot(),null==e&&(e=this.getModel().getRoot()));if(null!=e)for(var c=this.model.getChildCount(e)-1;0<=c;c--){var d=this.model.getChildAt(e,c),g=this.getScaledCellAt(a,b,d,p,q,t);if(null!=g)return g;if(this.isCellVisible(d)&&(q&&this.model.isEdge(d)||p&&this.model.isVertex(d))&&(g=this.view.getState(d),null!=g&&(null==t||!t(g,a,b))&&this.intersects(g,a,b)))return d}return null};mxCellHighlight.prototype.getStrokeWidth=function(a){a=
this.strokeWidth;this.graph.useCssTransforms&&(a/=this.graph.currentScale);return a};mxGraphView.prototype.getGraphBounds=function(){var a=this.graphBounds;if(this.graph.useCssTransforms)var b=this.graph.currentTranslate,e=this.graph.currentScale,a=new mxRectangle((a.x+b.x)*e,(a.y+b.y)*e,a.width*e,a.height*e);return a};mxGraphView.prototype.viewStateChanged=function(){this.graph.useCssTransforms?this.validate():this.revalidate();this.graph.sizeDidChange()};var a=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);a.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)};Graph.prototype.updateCssTransform=function(){var a=this.view.getDrawPane();
if(null!=a)if(a=a.parentNode,this.useCssTransforms){var b=a.getAttribute("transform");a.setAttribute("transformOrigin","0 0");a.setAttribute("transform","scale("+this.currentScale+","+this.currentScale+")translate("+this.currentTranslate.x+","+this.currentTranslate.y+")");if(b!=a.getAttribute("transform"))try{if(mxClient.IS_EDGE){var e=a.style.display;a.style.display="none";a.getBBox();a.style.display=e}}catch(p){}}else a.removeAttribute("transformOrigin"),a.removeAttribute("transform")};var b=mxGraphView.prototype.validateBackgroundPage;
-mxGraphView.prototype.validateBackgroundPage=function(){var a=this.graph.useCssTransforms,e=this.scale,l=this.translate;a&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);b.apply(this,arguments);a&&(this.scale=e,this.translate=l)};var e=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(a,b,l){var d=this.useCssTransforms,k=this.view.scale,u=this.view.translate;d&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=
-!1);e.apply(this,arguments);d&&(this.view.scale=k,this.view.translate=u,this.useCssTransforms=!0)}})();Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.labelLinkClicked=function(a,b,e){b=b.getAttribute("href");if(null!=b&&!this.isCustomLink(b)&&mxEvent.isLeftMouseButton(e)&&!mxEvent.isPopupTrigger(e)||mxEvent.isTouchEvent(e)){if(!this.isEnabled()||this.isCellLocked(a.cell))a=this.isBlankLink(b)?this.linkTarget:"_top",this.openLink(this.getAbsoluteUrl(b),a);mxEvent.consume(e)}};
+mxGraphView.prototype.validateBackgroundPage=function(){var a=this.graph.useCssTransforms,e=this.scale,l=this.translate;a&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);b.apply(this,arguments);a&&(this.scale=e,this.translate=l)};var e=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(a,b,l){var d=this.useCssTransforms,k=this.view.scale,t=this.view.translate;d&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=
+!1);e.apply(this,arguments);d&&(this.view.scale=k,this.view.translate=t,this.useCssTransforms=!0)}})();Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.labelLinkClicked=function(a,b,e){b=b.getAttribute("href");if(null!=b&&!this.isCustomLink(b)&&mxEvent.isLeftMouseButton(e)&&!mxEvent.isPopupTrigger(e)||mxEvent.isTouchEvent(e)){if(!this.isEnabled()||this.isCellLocked(a.cell))a=this.isBlankLink(b)?this.linkTarget:"_top",this.openLink(this.getAbsoluteUrl(b),a);mxEvent.consume(e)}};
Graph.prototype.openLink=function(a,b,e){var d=window;"_self"==b&&window!=window.top?window.location.href=a:a.substring(0,this.baseUrl.length)==this.baseUrl&&"#"==a.charAt(this.baseUrl.length)&&"_top"==b&&window==window.top?(a=a.split("#")[1],window.location.hash=="#"+a&&(window.location.hash=""),window.location.hash=a):(d=window.open(a,b),null==d||e||(d.opener=null));return d};Graph.prototype.getLinkTitle=function(a){return a.substring(a.lastIndexOf("/")+1)};
Graph.prototype.isCustomLink=function(a){return"data:"==a.substring(0,5)};Graph.prototype.customLinkClicked=function(a){return!1};Graph.prototype.isExternalProtocol=function(a){return"mailto:"===a.substring(0,7)};Graph.prototype.isBlankLink=function(a){return!this.isExternalProtocol(a)&&("blank"===this.linkPolicy||"self"!==this.linkPolicy&&!this.isRelativeUrl(a)&&a.substring(0,this.domainUrl.length)!==this.domainUrl)};
Graph.prototype.isRelativeUrl=function(a){return null!=a&&!this.absoluteUrlPattern.test(a)&&"data:"!==a.substring(0,5)&&!this.isExternalProtocol(a)};
@@ -2240,8 +2240,8 @@ Graph.prototype.isLabelMovable=function(a){var b=this.view.getState(a),b=null!=b
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 d=this.dateFormatCache,k=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,l=/[^-+\dA-Z]/g,p=function(a,c){a=String(a);for(c=c||2;a.length<c;)a="0"+a;return a};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(d.masks[b]||b||d.masks["default"]);"UTC:"==b.slice(0,4)&&(b=b.slice(4),e=!0);var q=e?"getUTC":"get",u=a[q+"Date"](),c=a[q+"Day"](),f=a[q+"Month"](),g=a[q+"FullYear"](),n=a[q+"Hours"](),r=a[q+"Minutes"](),h=a[q+"Seconds"](),q=a[q+"Milliseconds"](),m=e?0:a.getTimezoneOffset(),w={d:u,dd:p(u),ddd:d.i18n.dayNames[c],dddd:d.i18n.dayNames[c+7],m:f+1,mm:p(f+1),mmm:d.i18n.monthNames[f],mmmm:d.i18n.monthNames[f+
-12],yy:String(g).slice(2),yyyy:g,h:n%12||12,hh:p(n%12||12),H:n,HH:p(n),M:r,MM:p(r),s:h,ss:p(h),l:p(q,3),L:p(99<q?Math.round(q/10):q),t:12>n?"a":"p",tt:12>n?"am":"pm",T:12>n?"A":"P",TT:12>n?"AM":"PM",Z:e?"UTC":(String(a).match(k)||[""]).pop().replace(l,""),o:(0<m?"-":"+")+p(100*Math.floor(Math.abs(m)/60)+Math.abs(m)%60,4),S:["th","st","nd","rd"][3<u%10?0:(10!=u%100-u%10)*u%10]};return b.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(a){return a in w?w[a]:a.slice(1,
+/\d/.test(a)||(b=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");b=String(d.masks[b]||b||d.masks["default"]);"UTC:"==b.slice(0,4)&&(b=b.slice(4),e=!0);var q=e?"getUTC":"get",t=a[q+"Date"](),c=a[q+"Day"](),f=a[q+"Month"](),g=a[q+"FullYear"](),n=a[q+"Hours"](),r=a[q+"Minutes"](),h=a[q+"Seconds"](),q=a[q+"Milliseconds"](),m=e?0:a.getTimezoneOffset(),w={d:t,dd:p(t),ddd:d.i18n.dayNames[c],dddd:d.i18n.dayNames[c+7],m:f+1,mm:p(f+1),mmm:d.i18n.monthNames[f],mmmm:d.i18n.monthNames[f+
+12],yy:String(g).slice(2),yyyy:g,h:n%12||12,hh:p(n%12||12),H:n,HH:p(n),M:r,MM:p(r),s:h,ss:p(h),l:p(q,3),L:p(99<q?Math.round(q/10):q),t:12>n?"a":"p",tt:12>n?"am":"pm",T:12>n?"A":"P",TT:12>n?"AM":"PM",Z:e?"UTC":(String(a).match(k)||[""]).pop().replace(l,""),o:(0<m?"-":"+")+p(100*Math.floor(Math.abs(m)/60)+Math.abs(m)%60,4),S:["th","st","nd","rd"][3<t%10?0:(10!=t%100-t%10)*t%10]};return b.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(a){return a in w?w[a]:a.slice(1,
a.length-1)})};
Graph.prototype.createLayersDialog=function(){var a=document.createElement("div");a.style.position="absolute";for(var b=this.getModel(),e=b.getChildCount(b.root),d=0;d<e;d++)mxUtils.bind(this,function(d){var e=document.createElement("div");e.style.overflow="hidden";e.style.textOverflow="ellipsis";e.style.padding="2px";e.style.whiteSpace="nowrap";var k=document.createElement("input");k.style.display="inline-block";k.setAttribute("type","checkbox");b.isVisible(d)&&(k.setAttribute("checked","checked"),
k.defaultChecked=!0);e.appendChild(k);var q=this.convertValueToString(d)||mxResources.get("background")||"Background";e.setAttribute("title",q);mxUtils.write(e,q);a.appendChild(e);mxEvent.addListener(k,"click",function(){null!=k.getAttribute("checked")?k.removeAttribute("checked"):k.setAttribute("checked","checked");b.setVisible(d,k.checked)})})(b.getChildAt(b.root,d));return a};
@@ -2249,7 +2249,7 @@ Graph.prototype.replacePlaceholders=function(a,b){var e=[];if(null!=b){for(var d
match.index)+(null!=l?l:k));d=match.index+k.length}}e.push(b.substring(d))}return e.join("")};Graph.prototype.restoreSelection=function(a){if(null!=a&&0<a.length){for(var b=[],e=0;e<a.length;e++){var d=this.model.getCell(a[e].id);null!=d&&b.push(d)}this.setSelectionCells(b)}else this.clearSelection()};
Graph.prototype.selectCellsForConnectVertex=function(a,b,e){2==a.length&&this.model.isVertex(a[1])?(this.setSelectionCell(a[1]),null!=e&&(mxEvent.isTouchEvent(b)?e.update(e.getState(this.view.getState(a[1]))):e.reset()),this.scrollCellToVisible(a[1])):this.setSelectionCells(a)};
Graph.prototype.connectVertex=function(a,b,e,d,k,l){l=l?l:!1;var p=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(a.geometry.x,a.geometry.y);b==mxConstants.DIRECTION_NORTH?(p.x+=a.geometry.width/2,p.y-=e):b==mxConstants.DIRECTION_SOUTH?(p.x+=a.geometry.width/2,p.y+=a.geometry.height+e):(p.x=b==mxConstants.DIRECTION_WEST?p.x-e:p.x+(a.geometry.width+e),p.y+=a.geometry.height/2);e=this.view.getState(this.model.getParent(a));
-var q=this.view.scale,u=this.view.translate,c=u.x*q,u=u.y*q;this.model.isVertex(e.cell)&&(c=e.x,u=e.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(p.x+=a.parent.geometry.x,p.y+=a.parent.geometry.y);l=l||mxEvent.isControlDown(d)&&!k?null:this.getCellAt(c+p.x*q,u+p.y*q);this.model.isAncestor(l,a)&&(l=null);for(e=l;null!=e;){if(this.isCellLocked(e)){l=null;break}e=this.model.getParent(e)}null!=l&&(e=this.view.getState(a),q=this.view.getState(l),null!=e&&null!=q&&mxUtils.intersects(e,q)&&(l=
+var q=this.view.scale,t=this.view.translate,c=t.x*q,t=t.y*q;this.model.isVertex(e.cell)&&(c=e.x,t=e.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(p.x+=a.parent.geometry.x,p.y+=a.parent.geometry.y);l=l||mxEvent.isControlDown(d)&&!k?null:this.getCellAt(c+p.x*q,t+p.y*q);this.model.isAncestor(l,a)&&(l=null);for(e=l;null!=e;){if(this.isCellLocked(e)){l=null;break}e=this.model.getParent(e)}null!=l&&(e=this.view.getState(a),q=this.view.getState(l),null!=e&&null!=q&&mxUtils.intersects(e,q)&&(l=
null));if(k=!mxEvent.isShiftDown(d)||k)b==mxConstants.DIRECTION_NORTH?p.y-=a.geometry.height/2:b==mxConstants.DIRECTION_SOUTH?p.y+=a.geometry.height/2:p.x=b==mxConstants.DIRECTION_WEST?p.x-a.geometry.width/2:p.x+a.geometry.width/2;null==l||this.isCellConnectable(l)||(e=this.getModel().getParent(l),this.getModel().isVertex(e)&&this.isCellConnectable(e)&&(l=e));if(l==a||this.model.isEdge(l)||!this.isCellConnectable(l))l=null;e=[];this.model.beginUpdate();try{q=l;if(null==q&&k){for(var c=a,f=this.getCellGeometry(a);null!=
f&&f.relative;)c=this.getModel().getParent(c),f=this.getCellGeometry(c);var g=this.view.getState(c),n=null!=g?g.style:this.getCellStyle(c);if(mxUtils.getValue(n,"part",!1)){var r=this.model.getParent(c);this.model.isVertex(r)&&(c=r)}q=this.duplicateCells([c],!1)[0];f=this.getCellGeometry(q);null!=f&&(f.x=p.x-f.width/2,f.y=p.y-f.height/2)}f=null;null!=this.layoutManager&&(f=this.layoutManager.getLayout(this.model.getParent(a)));var h=mxEvent.isControlDown(d)&&k||null==l&&null!=f&&f.constructor==mxStackLayout?
null:this.insertEdge(this.model.getParent(a),null,"",a,q,this.createCurrentEdgeStyle());if(null!=h&&this.connectionHandler.insertBeforeSource){var m=null;for(d=a;null!=d.parent&&null!=d.geometry&&d.geometry.relative&&d.parent!=h.parent;)d=this.model.getParent(d);null!=d&&null!=d.parent&&d.parent==h.parent&&(m=d.parent.getIndex(d),this.model.add(d.parent,h,m))}null==l&&null!=q&&null!=f&&null!=a.parent&&f.constructor==mxStackLayout&&b==mxConstants.DIRECTION_WEST&&(m=a.parent.getIndex(a),this.model.add(a.parent,
@@ -2259,8 +2259,8 @@ Graph.prototype.convertValueToString=function(a){if(null!=a.value&&"object"==typ
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){return null!=a.value&&"object"==typeof a.value?(a=a.value.getAttribute("link"),null!=a&&"javascript:"===a.toLowerCase().substring(0,11)&&(a=a.substring(11)),a):null};
Graph.prototype.getCellStyle=function(a){var b=mxGraph.prototype.getCellStyle.apply(this,arguments);if(null!=a&&null!=this.layoutManager){var e=this.model.getParent(a);this.model.isVertex(e)&&this.isCellCollapsed(a)&&(e=this.layoutManager.getLayout(e),null!=e&&e.constructor==mxStackLayout&&(b[mxConstants.STYLE_HORIZONTAL]=!e.horizontal))}return b};
Graph.prototype.updateAlternateBounds=function(a,b,e){if(null!=a&&null!=b&&null!=this.layoutManager&&null!=b.alternateBounds){var d=this.layoutManager.getLayout(this.model.getParent(a));null!=d&&d.constructor==mxStackLayout&&(d.horizontal?b.alternateBounds.height=0:b.alternateBounds.width=0)}mxGraph.prototype.updateAlternateBounds.apply(this,arguments)};Graph.prototype.isMoveCellsEvent=function(a){return mxEvent.isShiftDown(a)};
-Graph.prototype.foldCells=function(a,b,e,d,k){b=null!=b?b:!1;null==e&&(e=this.getFoldableCells(this.getSelectionCells(),a));if(null!=e){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var l=0;l<e.length;l++){var p=this.view.getState(e[l]),q=this.getCellGeometry(e[l]);if(null!=p&&null!=q){var u=Math.round(q.width-p.width/this.view.scale),c=Math.round(q.height-p.height/this.view.scale);if(0!=c||0!=u){var f=this.model.getParent(e[l]),g=this.layoutManager.getLayout(f);
-null==g?null!=k&&this.isMoveCellsEvent(k)&&this.moveSiblings(p,f,u,c):null!=k&&mxEvent.isAltDown(k)||g.constructor!=mxStackLayout||g.resizeLast||this.resizeParentStacks(f,g,u,c)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(e)}};
+Graph.prototype.foldCells=function(a,b,e,d,k){b=null!=b?b:!1;null==e&&(e=this.getFoldableCells(this.getSelectionCells(),a));if(null!=e){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var l=0;l<e.length;l++){var p=this.view.getState(e[l]),q=this.getCellGeometry(e[l]);if(null!=p&&null!=q){var t=Math.round(q.width-p.width/this.view.scale),c=Math.round(q.height-p.height/this.view.scale);if(0!=c||0!=t){var f=this.model.getParent(e[l]),g=this.layoutManager.getLayout(f);
+null==g?null!=k&&this.isMoveCellsEvent(k)&&this.moveSiblings(p,f,t,c):null!=k&&mxEvent.isAltDown(k)||g.constructor!=mxStackLayout||g.resizeLast||this.resizeParentStacks(f,g,t,c)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(e)}};
Graph.prototype.moveSiblings=function(a,b,e,d){this.model.beginUpdate();try{var k=this.getCellsBeyond(a.x,a.y,b,!0,!0);for(b=0;b<k.length;b++)if(k[b]!=a.cell){var l=this.view.getState(k[b]),p=this.getCellGeometry(k[b]);null!=l&&null!=p&&(p=p.clone(),p.translate(Math.round(e*Math.max(0,Math.min(1,(l.x-a.x)/a.width))),Math.round(d*Math.max(0,Math.min(1,(l.y-a.y)/a.height)))),this.model.setGeometry(k[b],p))}}finally{this.model.endUpdate()}};
Graph.prototype.resizeParentStacks=function(a,b,e,d){if(null!=this.layoutManager&&null!=b&&b.constructor==mxStackLayout&&!b.resizeLast){this.model.beginUpdate();try{for(var k=b.horizontal;null!=a&&null!=b&&b.constructor==mxStackLayout&&b.horizontal==k&&!b.resizeLast;){var l=this.getCellGeometry(a),p=this.view.getState(a);null!=p&&null!=l&&(l=l.clone(),b.horizontal?l.width+=e+Math.min(0,p.width/this.view.scale-l.width):l.height+=d+Math.min(0,p.height/this.view.scale-l.height),this.model.setGeometry(a,
l));a=this.model.getParent(a);b=this.layoutManager.getLayout(a)}}finally{this.model.endUpdate()}}};Graph.prototype.isContainer=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return this.isSwimlane(a)?"0"!=b.container:"1"==b.container};Graph.prototype.isCellConnectable=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return null!=b.connectable?"0"!=b.connectable:mxGraph.prototype.isCellConnectable.apply(this,arguments)};
@@ -2307,11 +2307,11 @@ this.reset())}else this.reset()};HoverIcons.prototype.setCurrentState=function(a
(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(a,c){var d=this.getState(a);null!=d&&this.graph.model.isEdge(d.cell)&&null!=d.style&&1!=d.style[mxConstants.STYLE_CURVED]&&!d.invalid&&this.updateLineJumps(d)&&this.graph.cellRenderer.redraw(d,!1,this.isRendering());d=b.apply(this,arguments);null!=
d&&this.graph.model.isEdge(d.cell)&&1!=d.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(d);return d};var e=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(a,c){return e.apply(this,arguments)||null!=a.routedPoints&&null!=c.routedPoints&&!mxUtils.equalPoints(c.routedPoints,a.routedPoints)};var d=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=function(a){d.apply(this,arguments);this.graph.model.isEdge(a.cell)&&1!=a.style[mxConstants.STYLE_CURVED]&&
this.updateLineJumps(a)};mxGraphView.prototype.updateLineJumps=function(a){var c=a.absolutePoints;if(Graph.lineJumpsEnabled){var b=null!=a.routedPoints,d=null;if(null!=c&&null!=this.validEdges&&"none"!==mxUtils.getValue(a.style,"jumpStyle","none")){for(var e=function(c,b,f){var e=new mxPoint(b,f);e.type=c;d.push(e);e=null!=a.routedPoints?a.routedPoints[d.length-1]:null;return null==e||e.type!=c||e.x!=b||e.y!=f},r=.5*this.scale,b=!1,d=[],h=0;h<c.length-1;h++){for(var m=c[h+1],k=c[h],v=[],q=c[h+2];h<
-c.length-2&&mxUtils.ptSegDistSq(k.x,k.y,q.x,q.y,m.x,m.y)<1*this.scale*this.scale;)m=q,h++,q=c[h+2];for(var b=e(0,k.x,k.y)||b,x=0;x<this.validEdges.length;x++){var t=this.validEdges[x],z=t.absolutePoints;if(null!=z&&mxUtils.intersects(a,t)&&"1"!=t.style.noJump)for(t=0;t<z.length-1;t++){for(var l=z[t+1],p=z[t],q=z[t+2];t<z.length-2&&mxUtils.ptSegDistSq(p.x,p.y,q.x,q.y,l.x,l.y)<1*this.scale*this.scale;)l=q,t++,q=z[t+2];q=mxUtils.intersection(k.x,k.y,m.x,m.y,p.x,p.y,l.x,l.y);if(null!=q&&(Math.abs(q.x-
-p.x)>r||Math.abs(q.y-p.y)>r)&&(Math.abs(q.x-l.x)>r||Math.abs(q.y-l.y)>r)){l=q.x-k.x;p=q.y-k.y;q={distSq:l*l+p*p,x:q.x,y:q.y};for(l=0;l<v.length;l++)if(v[l].distSq>q.distSq){v.splice(l,0,q);q=null;break}null==q||0!=v.length&&v[v.length-1].x===q.x&&v[v.length-1].y===q.y||v.push(q)}}}for(t=0;t<v.length;t++)b=e(1,v[t].x,v[t].y)||b}q=c[c.length-1];b=e(0,q.x,q.y)||b}a.routedPoints=d;return b}return!1};var k=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(a,c,b){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)k.apply(this,arguments);else{var d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,f=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,e=mxUtils.getValue(this.style,"jumpStyle","none"),h,m=!0,q=null,v=null;h=[];var l=null;a.begin();for(var x=0;x<this.state.routedPoints.length;x++){var t=
-this.state.routedPoints[x],z=new mxPoint(t.x/this.scale,t.y/this.scale);0==x?z=c[0]:x==this.state.routedPoints.length-1&&(z=c[c.length-1]);var p=!1;if(null!=q&&1==t.type){var u=this.state.routedPoints[x+1],t=u.x/this.scale-z.x,u=u.y/this.scale-z.y,t=t*t+u*u;null==l&&(l=new mxPoint(z.x-q.x,z.y-q.y),v=Math.sqrt(l.x*l.x+l.y*l.y),l.x=l.x*f/v,l.y=l.y*f/v);t>f*f&&0<v&&(t=q.x-z.x,u=q.y-z.y,t=t*t+u*u,t>f*f&&(p=new mxPoint(z.x-l.x,z.y-l.y),t=new mxPoint(z.x+l.x,z.y+l.y),h.push(p),this.addPoints(a,h,b,d,!1,
-null,m),h=0>Math.round(l.x)||0==Math.round(l.x)&&0>=Math.round(l.y)?1:-1,m=!1,"sharp"==e?(a.lineTo(p.x-l.y*h,p.y+l.x*h),a.lineTo(t.x-l.y*h,t.y+l.x*h),a.lineTo(t.x,t.y)):"arc"==e?(h*=1.3,a.curveTo(p.x-l.y*h,p.y+l.x*h,t.x-l.y*h,t.y+l.x*h,t.x,t.y)):(a.moveTo(t.x,t.y),m=!0),h=[t],p=!0))}else l=null;p||(h.push(z),q=z)}this.addPoints(a,h,b,d,!1,null,m);a.stroke()}};var l=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(a,c,b,d){if(null==c||null==
+c.length-2&&mxUtils.ptSegDistSq(k.x,k.y,q.x,q.y,m.x,m.y)<1*this.scale*this.scale;)m=q,h++,q=c[h+2];for(var b=e(0,k.x,k.y)||b,x=0;x<this.validEdges.length;x++){var u=this.validEdges[x],z=u.absolutePoints;if(null!=z&&mxUtils.intersects(a,u)&&"1"!=u.style.noJump)for(u=0;u<z.length-1;u++){for(var l=z[u+1],p=z[u],q=z[u+2];u<z.length-2&&mxUtils.ptSegDistSq(p.x,p.y,q.x,q.y,l.x,l.y)<1*this.scale*this.scale;)l=q,u++,q=z[u+2];q=mxUtils.intersection(k.x,k.y,m.x,m.y,p.x,p.y,l.x,l.y);if(null!=q&&(Math.abs(q.x-
+p.x)>r||Math.abs(q.y-p.y)>r)&&(Math.abs(q.x-l.x)>r||Math.abs(q.y-l.y)>r)){l=q.x-k.x;p=q.y-k.y;q={distSq:l*l+p*p,x:q.x,y:q.y};for(l=0;l<v.length;l++)if(v[l].distSq>q.distSq){v.splice(l,0,q);q=null;break}null==q||0!=v.length&&v[v.length-1].x===q.x&&v[v.length-1].y===q.y||v.push(q)}}}for(u=0;u<v.length;u++)b=e(1,v[u].x,v[u].y)||b}q=c[c.length-1];b=e(0,q.x,q.y)||b}a.routedPoints=d;return b}return!1};var k=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(a,c,b){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)k.apply(this,arguments);else{var d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,f=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,e=mxUtils.getValue(this.style,"jumpStyle","none"),h,m=!0,q=null,v=null;h=[];var l=null;a.begin();for(var x=0;x<this.state.routedPoints.length;x++){var u=
+this.state.routedPoints[x],z=new mxPoint(u.x/this.scale,u.y/this.scale);0==x?z=c[0]:x==this.state.routedPoints.length-1&&(z=c[c.length-1]);var p=!1;if(null!=q&&1==u.type){var t=this.state.routedPoints[x+1],u=t.x/this.scale-z.x,t=t.y/this.scale-z.y,u=u*u+t*t;null==l&&(l=new mxPoint(z.x-q.x,z.y-q.y),v=Math.sqrt(l.x*l.x+l.y*l.y),l.x=l.x*f/v,l.y=l.y*f/v);u>f*f&&0<v&&(u=q.x-z.x,t=q.y-z.y,u=u*u+t*t,u>f*f&&(p=new mxPoint(z.x-l.x,z.y-l.y),u=new mxPoint(z.x+l.x,z.y+l.y),h.push(p),this.addPoints(a,h,b,d,!1,
+null,m),h=0>Math.round(l.x)||0==Math.round(l.x)&&0>=Math.round(l.y)?1:-1,m=!1,"sharp"==e?(a.lineTo(p.x-l.y*h,p.y+l.x*h),a.lineTo(u.x-l.y*h,u.y+l.x*h),a.lineTo(u.x,u.y)):"arc"==e?(h*=1.3,a.curveTo(p.x-l.y*h,p.y+l.x*h,u.x-l.y*h,u.y+l.x*h,u.x,u.y)):(a.moveTo(u.x,u.y),m=!0),h=[u],p=!0))}else l=null;p||(h.push(z),q=z)}this.addPoints(a,h,b,d,!1,null,m);a.stroke()}};var l=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(a,c,b,d){if(null==c||null==
a||"1"!=c.style.snapToPoint&&"1"!=a.style.snapToPoint)l.apply(this,arguments);else{c=this.getTerminalPort(a,c,d);var f=this.getNextPoint(a,b,d),e=this.graph.isOrthogonal(a),g=mxUtils.toRadians(Number(c.style[mxConstants.STYLE_ROTATION]||"0")),m=new mxPoint(c.getCenterX(),c.getCenterY());if(0!=g)var k=Math.cos(-g),v=Math.sin(-g),f=mxUtils.getRotatedPoint(f,k,v,m);k=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]||0);k+=parseFloat(a.style[d?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||
0);f=this.getPerimeterPoint(c,f,0==g&&e,k);0!=g&&(k=Math.cos(g),v=Math.sin(g),f=mxUtils.getRotatedPoint(f,k,v,m));a.setAbsoluteTerminalPoint(this.snapToAnchorPoint(a,c,b,d,f),d)}};mxGraphView.prototype.snapToAnchorPoint=function(a,c,b,d,e){if(null!=c&&null!=a){a=this.graph.getAllConnectionConstraints(c);d=b=null;if(null!=a)for(var f=0;f<a.length;f++){var g=this.graph.getConnectionPoint(c,a[f]);if(null!=g){var n=(g.x-e.x)*(g.x-e.x)+(g.y-e.y)*(g.y-e.y);if(null==d||n<d)b=g,d=n}}null!=b&&(e=b)}return e};
var p=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(a,c,b){var d=p.apply(this,arguments);"1"==a.getAttribute("placeholders")&&null!=b.state&&(d=b.state.view.graph.replacePlaceholders(b.state.cell,d));return d};var q=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(a){if(null!=a.style&&"undefined"!==typeof pako){var c=mxUtils.getValue(a.style,mxConstants.STYLE_SHAPE,null);if(null!=c&&"stencil("==c.substring(0,8))try{var b=
@@ -2336,7 +2336,7 @@ e[1]),2<e.length?"0"!=e[2]:!0))}}catch(F){}return d}if(null!=a.shape)if(null!=a.
this.setCellStyles(mxConstants.STYLE_ELBOW,c,[a]))}};Graph.prototype.isValidRoot=function(a){for(var c=this.model.getChildCount(a),b=0,d=0;d<c;d++){var f=this.model.getChildAt(a,d);this.model.isVertex(f)&&(f=this.getCellGeometry(f),null==f||f.relative||b++)}return 0<b||this.isContainer(a)};Graph.prototype.isValidDropTarget=function(a){var c=this.view.getState(a),c=null!=c?c.style:this.getCellStyle(a);return"1"!=mxUtils.getValue(c,"part","0")&&(this.isContainer(a)||mxGraph.prototype.isValidDropTarget.apply(this,
arguments)&&"0"!=mxUtils.getValue(c,"dropTarget","1"))};Graph.prototype.createGroupCell=function(){var a=mxGraph.prototype.createGroupCell.apply(this,arguments);a.setStyle("group");return a};Graph.prototype.isExtendParentsOnAdd=function(a){var c=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(c&&null!=a&&null!=this.layoutManager){var b=this.model.getParent(a);null!=b&&(b=this.layoutManager.getLayout(b),null!=b&&b.constructor==mxStackLayout&&(c=!1))}return c};Graph.prototype.getPreferredSizeForCell=
function(a){var c=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=c&&(c.width+=10,c.height+=4,this.gridEnabled&&(c.width=this.snap(c.width),c.height=this.snap(c.height)));return c};Graph.prototype.turnShapes=function(a){var c=this.getModel(),b=[];c.beginUpdate();try{for(var d=0;d<a.length;d++){var f=a[d];if(c.isEdge(f)){var e=c.getTerminal(f,!0),g=c.getTerminal(f,!1);c.setTerminal(f,g,!0);c.setTerminal(f,e,!1);var h=c.getGeometry(f);if(null!=h){h=h.clone();null!=h.points&&h.points.reverse();
-var n=h.getTerminalPoint(!0),m=h.getTerminalPoint(!1);h.setTerminalPoint(n,!1);h.setTerminalPoint(m,!0);c.setGeometry(f,h);var r=this.view.getState(f),t=this.view.getState(e),x=this.view.getState(g);if(null!=r){var H=null!=t?this.getConnectionConstraint(r,t,!0):null,v=null!=x?this.getConnectionConstraint(r,x,!1):null;this.setConnectionConstraint(f,e,!0,v);this.setConnectionConstraint(f,g,!1,H)}b.push(f)}}else if(c.isVertex(f)&&(h=this.getCellGeometry(f),null!=h)){h=h.clone();h.x+=h.width/2-h.height/
+var n=h.getTerminalPoint(!0),m=h.getTerminalPoint(!1);h.setTerminalPoint(n,!1);h.setTerminalPoint(m,!0);c.setGeometry(f,h);var r=this.view.getState(f),u=this.view.getState(e),x=this.view.getState(g);if(null!=r){var H=null!=u?this.getConnectionConstraint(r,u,!0):null,v=null!=x?this.getConnectionConstraint(r,x,!1):null;this.setConnectionConstraint(f,e,!0,v);this.setConnectionConstraint(f,g,!1,H)}b.push(f)}}else if(c.isVertex(f)&&(h=this.getCellGeometry(f),null!=h)){h=h.clone();h.x+=h.width/2-h.height/
2;h.y+=h.height/2-h.width/2;var k=h.width;h.width=h.height;h.height=k;c.setGeometry(f,h);var z=this.view.getState(f);if(null!=z){var q=z.style[mxConstants.STYLE_DIRECTION]||"east";"east"==q?q="south":"south"==q?q="west":"west"==q?q="north":"north"==q&&(q="east");this.setCellStyles(mxConstants.STYLE_DIRECTION,q,[f])}b.push(f)}}}finally{c.endUpdate()}return b};Graph.prototype.stencilHasPlaceholders=function(a){if(null!=a&&null!=a.fgNode)for(a=a.fgNode.firstChild;null!=a;){if("text"==a.nodeName&&"1"==
a.getAttribute("placeholders"))return!0;a=a.nextSibling}return!1};Graph.prototype.processChange=function(a){mxGraph.prototype.processChange.apply(this,arguments);if(a instanceof mxValueChange&&null!=a.cell&&null!=a.cell.value&&"object"==typeof a.cell.value){var c=this.model.getDescendants(a.cell);if(0<c.length)for(var b=0;b<c.length;b++){var d=this.view.getState(c[b]);null!=d&&null!=d.shape&&null!=d.shape.stencil&&this.stencilHasPlaceholders(d.shape.stencil)?this.removeStateForCell(c[b]):this.isReplacePlaceholders(c[b])&&
this.view.invalidate(c[b],!1,!1)}}};Graph.prototype.replaceElement=function(a,c){for(var b=a.ownerDocument.createElement(null!=c?c:"span"),d=Array.prototype.slice.call(a.attributes);attr=d.pop();)b.setAttribute(attr.nodeName,attr.nodeValue);b.innerHTML=a.innerHTML;a.parentNode.replaceChild(b,a)};Graph.prototype.updateLabelElements=function(a,c,b){a=null!=a?a:this.getSelectionCells();for(var d=document.createElement("div"),f=0;f<a.length;f++)if(this.isHtmlLabel(a[f])){var e=this.convertValueToString(a[f]);
@@ -2364,11 +2364,11 @@ this.getCellStyle(a);return c||"0"!=mxUtils.getValue(b,mxConstants.STYLE_RESIZAB
c.x-b.x:c.y-b.y});g=this.view.translate;h=this.view.scale;f=f/h-(a?g.x:g.y);d=d/h-(a?g.x:g.y);this.getModel().beginUpdate();try{for(var n=(d-f)/(b.length-1),d=f,e=1;e<b.length-1;e++){var m=this.view.getState(this.model.getParent(b[e].cell)),r=this.getCellGeometry(b[e].cell),d=d+n;null!=r&&null!=m&&(r=r.clone(),a?r.x=Math.round(d-r.width/2)-m.origin.x:r.y=Math.round(d-r.height/2)-m.origin.y,this.getModel().setGeometry(b[e].cell,r))}}finally{this.getModel().endUpdate()}}}return c};Graph.prototype.isCloneEvent=
function(a){return mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxEvent.isControlDown(a)};Graph.prototype.encodeCells=function(a){for(var c=this.cloneCells(a),b=new mxDictionary,d=0;d<a.length;d++)b.put(a[d],!0);for(d=0;d<c.length;d++){var f=this.view.getState(a[d]);if(null!=f){var e=this.getCellGeometry(c[d]);null==e||!e.relative||this.model.isEdge(a[d])||b.get(this.model.getParent(a[d]))||(e.relative=!1,e.x=f.x/f.view.scale-f.view.translate.x,e.y=f.y/f.view.scale-f.view.translate.y)}}b=new mxCodec;f=
new mxGraphModel;e=f.getChildAt(f.getRoot(),0);for(d=0;d<a.length;d++)f.add(e,c[d]);return b.encode(f)};Graph.prototype.createSvgImageExport=function(){var a=new mxImageExport;a.getLinkForCellState=mxUtils.bind(this,function(a,c){return this.getLinkForCell(a.cell)});return a};Graph.prototype.getSvg=function(a,c,b,d,f,e,g,h,n,m){var r=this.useCssTransforms;r&&(this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange());try{c=null!=c?c:1;b=null!=b?b:0;f=null!=f?f:!0;e=null!=e?e:!0;g=null!=
-g?g:!0;var t=e||d?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==t)throw Error(mxResources.get("drawingEmpty"));var x=this.view.scale,v=mxUtils.createXmlDocument(),k=null!=v.createElementNS?v.createElementNS(mxConstants.NS_SVG,"svg"):v.createElement("svg");null!=a&&(null!=k.style?k.style.backgroundColor=a:k.setAttribute("style","background-color:"+a));null==v.createElementNS?(k.setAttribute("xmlns",mxConstants.NS_SVG),k.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):
-k.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=c/x;var z=Math.max(1,Math.ceil(t.width*a)+2*b)+(m?5:0),q=Math.max(1,Math.ceil(t.height*a)+2*b)+(m?5:0);k.setAttribute("version","1.1");k.setAttribute("width",z+"px");k.setAttribute("height",q+"px");k.setAttribute("viewBox",(f?"-0.5 -0.5":"0 0")+" "+z+" "+q);v.appendChild(k);var w=this.createSvgCanvas(k);w.foOffset=f?-.5:0;w.textOffset=f?-.5:0;w.imageOffset=f?-.5:0;w.translate(Math.floor((b/c-t.x)/x),Math.floor((b/
-c-t.y)/x));var l=document.createElement("textarea"),y=w.createAlternateContent;w.createAlternateContent=function(a,c,b,d,f,e,g,h,n,m,r,t,x){var k=this.state;if(null!=this.foAltText&&(0==d||0!=k.fontSize&&e.length<5*d/k.fontSize)){var v=this.createElement("text");v.setAttribute("x",Math.round(d/2));v.setAttribute("y",Math.round((f+k.fontSize)/2));v.setAttribute("fill",k.fontColor||"black");v.setAttribute("text-anchor","middle");v.setAttribute("font-size",Math.round(k.fontSize)+"px");v.setAttribute("font-family",
+g?g:!0;var u=e||d?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==u)throw Error(mxResources.get("drawingEmpty"));var x=this.view.scale,v=mxUtils.createXmlDocument(),k=null!=v.createElementNS?v.createElementNS(mxConstants.NS_SVG,"svg"):v.createElement("svg");null!=a&&(null!=k.style?k.style.backgroundColor=a:k.setAttribute("style","background-color:"+a));null==v.createElementNS?(k.setAttribute("xmlns",mxConstants.NS_SVG),k.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):
+k.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=c/x;var z=Math.max(1,Math.ceil(u.width*a)+2*b)+(m?5:0),q=Math.max(1,Math.ceil(u.height*a)+2*b)+(m?5:0);k.setAttribute("version","1.1");k.setAttribute("width",z+"px");k.setAttribute("height",q+"px");k.setAttribute("viewBox",(f?"-0.5 -0.5":"0 0")+" "+z+" "+q);v.appendChild(k);var w=this.createSvgCanvas(k);w.foOffset=f?-.5:0;w.textOffset=f?-.5:0;w.imageOffset=f?-.5:0;w.translate(Math.floor((b/c-u.x)/x),Math.floor((b/
+c-u.y)/x));var l=document.createElement("textarea"),y=w.createAlternateContent;w.createAlternateContent=function(a,c,b,d,f,e,g,h,n,m,r,u,x){var k=this.state;if(null!=this.foAltText&&(0==d||0!=k.fontSize&&e.length<5*d/k.fontSize)){var v=this.createElement("text");v.setAttribute("x",Math.round(d/2));v.setAttribute("y",Math.round((f+k.fontSize)/2));v.setAttribute("fill",k.fontColor||"black");v.setAttribute("text-anchor","middle");v.setAttribute("font-size",Math.round(k.fontSize)+"px");v.setAttribute("font-family",
k.fontFamily);(k.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&v.setAttribute("font-weight","bold");(k.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&v.setAttribute("font-style","italic");(k.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&v.setAttribute("text-decoration","underline");try{return l.innerHTML=e,v.textContent=l.value,v}catch(ta){return y.apply(this,arguments)}}else return y.apply(this,arguments)};var H=this.backgroundImage;if(null!=H){c=x/c;
-var p=this.view.translate,B=new mxRectangle(p.x*c,p.y*c,H.width*c,H.height*c);mxUtils.intersects(t,B)&&w.image(p.x,p.y,H.width,H.height,H.src,!0)}w.scale(a);w.textEnabled=g;h=null!=h?h:this.createSvgImageExport();var D=h.drawCellState;h.drawCellState=function(a,c){for(var b=a.view.graph,d=b.isCellSelected(a.cell),f=b.model.getParent(a.cell);!e&&!d&&null!=f;)d=b.isCellSelected(f),f=b.model.getParent(f);(e||d)&&D.apply(this,arguments)};h.drawState(this.getView().getState(this.model.root),w);this.updateSvgLinks(k,
+var p=this.view.translate,C=new mxRectangle(p.x*c,p.y*c,H.width*c,H.height*c);mxUtils.intersects(u,C)&&w.image(p.x,p.y,H.width,H.height,H.src,!0)}w.scale(a);w.textEnabled=g;h=null!=h?h:this.createSvgImageExport();var E=h.drawCellState;h.drawCellState=function(a,c){for(var b=a.view.graph,d=b.isCellSelected(a.cell),f=b.model.getParent(a.cell);!e&&!d&&null!=f;)d=b.isCellSelected(f),f=b.model.getParent(f);(e||d)&&E.apply(this,arguments)};h.drawState(this.getView().getState(this.model.root),w);this.updateSvgLinks(k,
n,!0);return k}finally{r&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.updateSvgLinks=function(a,c,b){a=a.getElementsByTagName("a");for(var d=0;d<a.length;d++){var f=a[d].getAttribute("href");null==f&&(f=a[d].getAttribute("xlink:href"));null!=f&&(null!=c&&/^https?:\/\//.test(f)?a[d].setAttribute("target",c):b&&this.isCustomLink(f)&&a[d].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(a){return new mxSvgCanvas2D(a)};
Graph.prototype.getSelectedElement=function(){var a=null;if(window.getSelection){var c=window.getSelection();c.getRangeAt&&c.rangeCount&&(a=c.getRangeAt(0).commonAncestorContainer)}else document.selection&&(a=document.selection.createRange().parentElement());return a};Graph.prototype.getParentByName=function(a,c,b){for(;null!=a&&a.nodeName!=c;){if(a==b)return null;a=a.parentNode}return a};Graph.prototype.selectNode=function(a){var c=null;if(window.getSelection){if(c=window.getSelection(),c.getRangeAt&&
c.rangeCount){var b=document.createRange();b.selectNode(a);c.removeAllRanges();c.addRange(b)}}else(c=document.selection)&&"Control"!=c.type&&(a=c.createRange(),a.collapse(!0),b=c.createRange(),b.setEndPoint("StartToStart",a),b.select())};Graph.prototype.insertRow=function(a,c){for(var b=a.tBodies[0],d=b.rows[0].cells,f=0,e=0;e<d.length;e++)var g=d[e].getAttribute("colspan"),f=f+(null!=g?parseInt(g):1);b=b.insertRow(c);for(e=0;e<f;e++)mxUtils.br(b.insertCell(-1));return b.cells[0]};Graph.prototype.deleteRow=
@@ -2379,7 +2379,7 @@ mxEvent.consume(c)}));return d};Graph.prototype.initTouch=function(){this.connec
c.graphY)||(c.state=this.view.getState(b),null!=c.state&&null!=c.state.shape&&(this.container.style.cursor=c.state.shape.node.style.cursor))}null==c.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return c};var c=!1,b=!1,d=!1,f=this.fireMouseEvent;this.fireMouseEvent=function(a,e,g){a==mxEvent.MOUSE_DOWN&&(e=this.updateMouseEvent(e),c=this.isCellSelected(e.getCell()),b=this.isSelectionEmpty(),d=this.popupMenuHandler.isMenuShowing());f.apply(this,arguments)};this.popupMenuHandler.mouseUp=
mxUtils.bind(this,function(a,f){this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==f.getState()||!f.isSource(f.getState().control))&&(this.popupMenuHandler.popupTrigger||!d&&!mxEvent.isMouseEvent(f.getEvent())&&(b&&null==f.getCell()&&this.isSelectionEmpty()||c&&this.isCellSelected(f.getCell())));mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,arguments)})};mxCellEditor.prototype.isContentEditing=function(){var a=this.graph.view.getState(this.editingCell);
return null!=a&&1==a.style.html};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var a=window.getSelection();if(a.getRangeAt&&a.rangeCount){for(var c=[],b=0,d=a.rangeCount;b<d;++b)c.push(a.getRangeAt(b));return c}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(a){try{if(a)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var c=0,b=a.length;c<
-b;++c)sel.addRange(a[c])}else document.selection&&a.select&&a.select()}catch(Y){}};var k=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br","1"));k.apply(this,arguments)};var l=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(a,c){this.isKeepFocusEvent(a)||!mxEvent.isAltDown(a.getEvent())?l.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=
+b;++c)sel.addRange(a[c])}else document.selection&&a.select&&a.select()}catch(W){}};var k=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br","1"));k.apply(this,arguments)};var l=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(a,c){this.isKeepFocusEvent(a)||!mxEvent.isAltDown(a.getEvent())?l.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=
function(a){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var p=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(a,c){p.apply(this,arguments);var b=this.graph.view.getState(a);this.textarea.className=null!=b&&1==b.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(a);var b=this.graph.getModel().getParent(a),
d=this.graph.getCellGeometry(a);this.graph.getModel().isEdge(b)&&null!=d&&d.relative||this.graph.getModel().isEdge(a)?mxClient.IS_QUIRKS?this.textarea.style.border="gray dotted 1px":this.textarea.style.outline=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":"":mxClient.IS_QUIRKS&&(this.textarea.style.outline="none",this.textarea.style.border="")};var q=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(a){function c(a,b){b.originalNode=
a;a=a.firstChild;for(var d=b.firstChild;null!=a&&null!=d;)c(a,d),a=a.nextSibling,d=d.nextSibling;return b}function b(a,c){if(null!=a)if(c.originalNode!=a)d(a);else for(a=a.firstChild,c=c.firstChild;null!=a;){var f=a.nextSibling;null==c?d(a):(b(a,c),c=c.nextSibling);a=f}}function d(a){for(var c=a.firstChild;null!=c;){var b=c.nextSibling;d(c);c=b}1==a.nodeType&&("BR"===a.nodeName||null!=a.firstChild)||3==a.nodeType&&0!=mxUtils.trim(mxUtils.getTextContent(a)).length?(3==a.nodeType&&mxUtils.setTextContent(a,
@@ -2389,10 +2389,10 @@ mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE),c=mxUtils.getValue(a.st
mxConstants.FONT_UNDERLINE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(d*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(d)+"px";this.textarea.style.textDecoration=a?"underline":"";this.textarea.style.fontWeight=e?"bold":"normal";this.textarea.style.fontStyle=g?"italic":"";this.textarea.style.fontFamily=c;this.textarea.style.textAlign=f;this.textarea.style.padding="0px";this.textarea.innerHTML!=h&&(this.textarea.innerHTML=
h,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length));this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerHTML="");var h=mxUtils.htmlEntities(this.textarea.innerHTML);mxClient.IS_QUIRKS||8==document.documentMode||(h=mxUtils.replaceTrailingNewlines(h,"<div><br></div>"));h=this.graph.sanitizeHtml(c?h.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,
"<br>"):h,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var d=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(d*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(d)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.padding=
-"2px";this.textarea.innerHTML!=h&&(this.textarea.innerHTML=h);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=b;this.resize()};var u=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(a,c){if(null!=this.textarea)if(a=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=a){var b=a.view.scale;this.bounds=mxRectangle.fromRectangle(a);if(0==this.bounds.width&&0==
+"2px";this.textarea.innerHTML!=h&&(this.textarea.innerHTML=h);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=b;this.resize()};var t=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(a,c){if(null!=this.textarea)if(a=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=a){var b=a.view.scale;this.bounds=mxRectangle.fromRectangle(a);if(0==this.bounds.width&&0==
this.bounds.height){this.bounds.width=160*b;this.bounds.height=60*b;var d=null!=a.text?a.text.margin:null;null==d&&(d=mxUtils.getAlignmentAsPoint(mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(a.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=d.x*this.bounds.width;this.bounds.y+=d.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/b)+"px";this.textarea.style.height=Math.round((this.bounds.height-
4)/b)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/b)+(this.textarea.offsetHeight-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*b);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/b)+(this.textarea.offsetWidth-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*
-b);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=Math.round(this.bounds.y)+"px";mxClient.IS_VML?this.textarea.style.zoom=b:mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+b+","+b+")")}else this.textarea.style.height="",this.textarea.style.overflow="",u.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(a,c){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,
+b);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=Math.round(this.bounds.y)+"px";mxClient.IS_VML?this.textarea.style.zoom=b:mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+b+","+b+")")}else this.textarea.style.height="",this.textarea.style.overflow="",t.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(a,c){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,
arguments);var b=this.graph.getEditingValue(a.cell,c);"1"==mxUtils.getValue(a.style,"nl2Br","1")&&(b=b.replace(/\n/g,"<br/>"));return b=this.graph.sanitizeHtml(b,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(a){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var c=this.graph.sanitizeHtml(this.textarea.innerHTML,!0);return c="1"==mxUtils.getValue(a.style,"nl2Br","1")?c.replace(/\r\n/g,
"<br/>").replace(/\n/g,"<br/>"):c.replace(/\r\n/g,"").replace(/\n/g,"")};var c=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(a){this.codeViewMode&&this.toggleViewMode();c.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(H){}};var f=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(a,c){this.graph.getModel().beginUpdate();try{if(f.apply(this,arguments),this.graph.isCellDeletable(a.cell)&&
0==this.graph.model.getChildCount(a.cell)){var b=mxUtils.getValue(a.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),d=mxUtils.getValue(a.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);""==c&&b==mxConstants.NONE&&d==mxConstants.NONE&&this.graph.removeCells([a.cell],!1)}}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(a){var c=null;if(this.graph.getModel().isEdge(a.cell)||this.graph.getModel().isEdge(this.graph.getModel().getParent(a.cell)))c=
@@ -2420,43 +2420,43 @@ new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(e,
this.update(d,b),this.isSpaceEvent(c)?(d=this.x+this.width,b=this.y+this.height,f=this.graph.view.scale,mxEvent.isAltDown(c.getEvent())||(this.width=this.graph.snap(this.width/f)*f,this.height=this.graph.snap(this.height/f)*f,this.graph.isGridEnabled()||(this.width<this.graph.tolerance&&(this.width=0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=d-this.width),this.y<this.first.y&&(this.y=b-this.height)),this.div.style.borderStyle="dashed",this.div.style.backgroundColor=
"white",this.div.style.left=this.x+"px",this.div.style.top=this.y+"px",this.div.style.width=Math.max(0,this.width)+"px",this.div.style.height=this.graph.container.clientHeight+"px",this.div.style.borderWidth=0>=this.width?"0px 1px 0px 0px":"0px 1px 0px 1px",null==this.secondDiv&&(this.secondDiv=this.div.cloneNode(!0),this.div.parentNode.appendChild(this.secondDiv)),this.secondDiv.style.left=this.x+"px",this.secondDiv.style.top=this.y+"px",this.secondDiv.style.width=this.graph.container.clientWidth+
"px",this.secondDiv.style.height=Math.max(0,this.height)+"px",this.secondDiv.style.borderWidth=0>=this.height?"1px 0px 0px 0px":"1px 0px 1px 0px"):(this.div.style.backgroundColor="",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),c.consume()}};var h=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),
-this.secondDiv=null);h.apply(this,arguments)};var m=(new Date).getTime(),w=0,v=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,c,b,d){v.apply(this,arguments);b!=this.currentTerminalState?(m=(new Date).getTime(),w=0):w=(new Date).getTime()-m;this.currentTerminalState=b};var D=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&&
-2E3<w||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&D.apply(this,arguments)};mxVertexHandler.prototype.isCustomHandleEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.createHandleShape=function(a,c){var b=null!=a&&0==a,d=this.state.getVisibleTerminalState(b),f=null!=a&&(0==a||a>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==a)?this.graph.getConnectionConstraint(this.state,
+this.secondDiv=null);h.apply(this,arguments)};var m=(new Date).getTime(),w=0,v=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,c,b,d){v.apply(this,arguments);b!=this.currentTerminalState?(m=(new Date).getTime(),w=0):w=(new Date).getTime()-m;this.currentTerminalState=b};var E=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&&
+2E3<w||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&E.apply(this,arguments)};mxVertexHandler.prototype.isCustomHandleEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.createHandleShape=function(a,c){var b=null!=a&&0==a,d=this.state.getVisibleTerminalState(b),f=null!=a&&(0==a||a>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==a)?this.graph.getConnectionConstraint(this.state,
d,b):null,b=null!=(null!=f?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(b),f):null)?this.fixedHandleImage:null!=f&&null!=d?this.terminalHandleImage:this.handleImage;if(null!=b)return b=new mxImageShape(new mxRectangle(0,0,b.width,b.height),b.src),b.preserveImageAspect=!1,b;b=mxConstants.HANDLE_SIZE;this.preferHtml&&--b;return new mxRectangleShape(new mxRectangle(0,0,b,b),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var x=mxVertexHandler.prototype.createSizerShape;
-mxVertexHandler.prototype.createSizerShape=function(a,c,b){this.handleImage=c==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:c==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return x.apply(this,arguments)};var t=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(a){if(null!=a&&1==a.length){var c=this.graph.getModel(),b=c.getParent(a[0]),d=this.graph.getCellGeometry(a[0]);if(c.isEdge(b)&&null!=d&&d.relative&&(c=this.graph.view.getState(a[0]),
-null!=c&&2>c.width&&2>c.height&&null!=c.text&&null!=c.text.boundingBox))return mxRectangle.fromRectangle(c.text.boundingBox)}return t.apply(this,arguments)};var z=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(a){var c=this.graph.getModel(),b=c.getParent(a.cell),d=this.graph.getCellGeometry(a.cell);return c.isEdge(b)&&null!=d&&d.relative&&2>a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox?(c=a.text.unrotatedBoundingBox||a.text.boundingBox,
-new mxRectangle(Math.round(c.x),Math.round(c.y),Math.round(c.width),Math.round(c.height))):z.apply(this,arguments)};var B=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(a,c){var b=this.graph.getModel(),d=b.getParent(this.state.cell),f=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(c)==mxEvent.ROTATION_HANDLE||!b.isEdge(d)||null==f||!f.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&B.apply(this,arguments)};mxVertexHandler.prototype.isRotationHandleVisible=
+mxVertexHandler.prototype.createSizerShape=function(a,c,b){this.handleImage=c==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:c==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return x.apply(this,arguments)};var u=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(a){if(null!=a&&1==a.length){var c=this.graph.getModel(),b=c.getParent(a[0]),d=this.graph.getCellGeometry(a[0]);if(c.isEdge(b)&&null!=d&&d.relative&&(c=this.graph.view.getState(a[0]),
+null!=c&&2>c.width&&2>c.height&&null!=c.text&&null!=c.text.boundingBox))return mxRectangle.fromRectangle(c.text.boundingBox)}return u.apply(this,arguments)};var z=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(a){var c=this.graph.getModel(),b=c.getParent(a.cell),d=this.graph.getCellGeometry(a.cell);return c.isEdge(b)&&null!=d&&d.relative&&2>a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox?(c=a.text.unrotatedBoundingBox||a.text.boundingBox,
+new mxRectangle(Math.round(c.x),Math.round(c.y),Math.round(c.width),Math.round(c.height))):z.apply(this,arguments)};var C=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(a,c){var b=this.graph.getModel(),d=b.getParent(this.state.cell),f=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(c)==mxEvent.ROTATION_HANDLE||!b.isEdge(d)||null==f||!f.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&C.apply(this,arguments)};mxVertexHandler.prototype.isRotationHandleVisible=
function(){return this.graph.isEnabled()&&this.rotationEnabled&&this.graph.isCellRotatable(this.state.cell)&&(0>=mxGraphHandler.prototype.maxCells||this.graph.getSelectionCount()<mxGraphHandler.prototype.maxCells)};mxVertexHandler.prototype.rotateClick=function(){this.state.view.graph.turnShapes([this.state.cell])};var N=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(a,c){N.apply(this,arguments);null!=this.graph.graphHandler.first&&null!=this.rotationShape&&null!=
-this.rotationShape.node&&(this.rotationShape.node.style.display="none")};var C=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(a,c){C.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none")};var G=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){G.apply(this,arguments);var a=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",
+this.rotationShape.node&&(this.rotationShape.node.style.display="none")};var D=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(a,c){D.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none")};var G=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){G.apply(this,arguments);var a=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",
mxResources.get("rotateTooltip"));var c=mxUtils.bind(this,function(){null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.specialHandle&&(this.specialHandle.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none");this.redrawHandles()});this.selectionHandler=mxUtils.bind(this,function(a,b){c()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,
this.selectionHandler);this.changeHandler=mxUtils.bind(this,function(a,b){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));c()});this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.editingHandler=mxUtils.bind(this,function(a,c){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,this.editingHandler);var b=this.graph.getLinkForCell(this.state.cell),d=this.graph.getLinksForState(this.state);this.updateLinkHint(b,
d);if(null!=b||null!=d&&0<d.length)a=!0;a&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(c,b){if(null==c&&(null==b||0==b.length)||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);else if(null!=c||null!=b&&0<b.length){null==this.linkHint&&(this.linkHint=a(),this.linkHint.style.padding="6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint));
this.linkHint.innerHTML="";if(null!=c&&(this.linkHint.appendChild(this.graph.createLinkForHint(c)),this.graph.isEnabled()&&"function"===typeof this.graph.editLink)){var d=document.createElement("img");d.setAttribute("src",Editor.editImage);d.setAttribute("title",mxResources.get("editLink"));d.setAttribute("width","11");d.setAttribute("height","11");d.style.marginLeft="10px";d.style.marginBottom="-1px";d.style.cursor="pointer";this.linkHint.appendChild(d);mxEvent.addListener(d,"click",mxUtils.bind(this,
function(a){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(a)}));d=document.createElement("img");d.setAttribute("src",Dialog.prototype.clearImage);d.setAttribute("title",mxResources.get("removeIt",[mxResources.get("link")]));d.setAttribute("width","13");d.setAttribute("height","10");d.style.marginLeft="4px";d.style.marginBottom="-1px";d.style.cursor="pointer";this.linkHint.appendChild(d);mxEvent.addListener(d,"click",mxUtils.bind(this,function(a){this.graph.setLinkForCell(this.state.cell,
-null);mxEvent.consume(a)}))}if(null!=b)for(d=0;d<b.length;d++){var f=document.createElement("div");f.style.marginTop=null!=c||0<d?"6px":"0px";f.appendChild(this.graph.createLinkForHint(b[d].getAttribute("href"),mxUtils.getTextContent(b[d])));this.linkHint.appendChild(f)}}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var J=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){J.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,
+null);mxEvent.consume(a)}))}if(null!=b)for(d=0;d<b.length;d++){var f=document.createElement("div");f.style.marginTop=null!=c||0<d?"6px":"0px";f.appendChild(this.graph.createLinkForHint(b[d].getAttribute("href"),mxUtils.getTextContent(b[d])));this.linkHint.appendChild(f)}}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var K=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){K.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,
function(){return this.state.view.graph.connectionHandler.isEnabled()});var a=mxUtils.bind(this,function(){null!=this.linkHint&&(this.linkHint.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.labelShape&&(this.labelShape.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none")});this.selectionHandler=mxUtils.bind(this,function(c,b){a()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionHandler);
this.changeHandler=mxUtils.bind(this,function(c,b){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));a();this.redrawHandles()});this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var c=this.graph.getLinkForCell(this.state.cell),b=this.graph.getLinksForState(this.state);if(null!=c||null!=b&&0<b.length)this.updateLinkHint(c,b),this.redrawHandles()};var y=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){y.apply(this,
arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var A=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){A.apply(this);if(null!=this.state&&null!=this.linkHint){var a=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),c=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),b=mxUtils.getBoundingBox(c,this.state.style[mxConstants.STYLE_ROTATION]||
"0",a),a=null!=b?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,c=null!=this.state.text?this.state.text.boundingBox:null;null==b&&(b=this.state);b=b.y+b.height;null!=c&&(b=Math.max(b,c.y+c.height));this.linkHint.style.left=Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(b+this.verticalOffset/2+6+this.state.view.graph.tolerance)+"px"}};var I=mxVertexHandler.prototype.reset;mxVertexHandler.prototype.reset=
function(){I.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none")};var O=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){O.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.selectionHandler&&(this.graph.getSelectionModel().removeListener(this.selectionHandler),this.selectionHandler=
null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var Q=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(Q.apply(this),null!=this.state&&null!=this.linkHint)){var a=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(a=new mxRectangle(a.x,a.y,a.width,a.height),
-a.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(a.y+a.height+6+this.state.view.graph.tolerance)+"px"}};var X=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){X.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var U=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){U.apply(this,arguments);null!=this.linkHint&&
-(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.selectionHandler&&(this.graph.getSelectionModel().removeListener(this.selectionHandler),this.selectionHandler=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function a(){mxCylinder.call(this)}function b(){mxActor.call(this)}function e(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function k(){mxCylinder.call(this)}function l(){mxActor.call(this)}function p(){mxCylinder.call(this)}function q(){mxActor.call(this)}function u(){mxActor.call(this)}function c(){mxActor.call(this)}function f(){mxActor.call(this)}function g(){mxActor.call(this)}function n(){mxActor.call(this)}function r(){mxActor.call(this)}function h(a,c){this.canvas=
+a.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(a.y+a.height+6+this.state.view.graph.tolerance)+"px"}};var U=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){U.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var T=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){T.apply(this,arguments);null!=this.linkHint&&
+(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.selectionHandler&&(this.graph.getSelectionModel().removeListener(this.selectionHandler),this.selectionHandler=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function a(){mxCylinder.call(this)}function b(){mxActor.call(this)}function e(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function k(){mxCylinder.call(this)}function l(){mxActor.call(this)}function p(){mxCylinder.call(this)}function q(){mxActor.call(this)}function t(){mxActor.call(this)}function c(){mxActor.call(this)}function f(){mxActor.call(this)}function g(){mxActor.call(this)}function n(){mxActor.call(this)}function r(){mxActor.call(this)}function h(a,c){this.canvas=
a;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=c;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,h.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,h.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,h.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,h.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;
-this.canvas.curveTo=mxUtils.bind(this,h.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,h.prototype.arcTo)}function m(){mxRectangleShape.call(this)}function w(){mxRectangleShape.call(this)}function v(){mxActor.call(this)}function D(){mxActor.call(this)}function x(){mxActor.call(this)}function t(){mxRectangleShape.call(this)}function z(){mxRectangleShape.call(this)}function B(){mxCylinder.call(this)}function N(){mxShape.call(this)}function C(){mxShape.call(this)}
-function G(){mxEllipse.call(this)}function J(){mxShape.call(this)}function y(){mxShape.call(this)}function A(){mxRectangleShape.call(this)}function I(){mxShape.call(this)}function O(){mxShape.call(this)}function Q(){mxShape.call(this)}function X(){mxShape.call(this)}function U(){mxShape.call(this)}function H(){mxCylinder.call(this)}function ea(){mxDoubleEllipse.call(this)}function ka(){mxDoubleEllipse.call(this)}function Y(){mxArrowConnector.call(this);this.spacing=0}function ba(){mxArrowConnector.call(this);
-this.spacing=0}function K(){mxActor.call(this)}function F(){mxRectangleShape.call(this)}function S(){mxActor.call(this)}function L(){mxActor.call(this)}function M(){mxActor.call(this)}function T(){mxActor.call(this)}function E(){mxActor.call(this)}function R(){mxActor.call(this)}function V(){mxActor.call(this)}function ga(){mxActor.call(this)}function W(){mxActor.call(this)}function aa(){mxActor.call(this)}function Z(){mxEllipse.call(this)}function pa(){mxEllipse.call(this)}function qa(){mxEllipse.call(this)}
-function fa(){mxRhombus.call(this)}function la(){mxEllipse.call(this)}function ua(){mxEllipse.call(this)}function ma(){mxEllipse.call(this)}function sa(){mxEllipse.call(this)}function ha(){mxActor.call(this)}function ca(){mxActor.call(this)}function da(){mxActor.call(this)}function ia(){mxConnector.call(this)}function wa(a,c,b,d,f,e,g,h,n,m){g+=n;var na=d.clone();d.x-=f*(2*g+n);d.y-=e*(2*g+n);f*=g+n;e*=g+n;return function(){a.ellipse(na.x-f-g,na.y-e-g,2*g,2*g);m?a.fillAndStroke():a.stroke()}}mxUtils.extend(a,
+this.canvas.curveTo=mxUtils.bind(this,h.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,h.prototype.arcTo)}function m(){mxRectangleShape.call(this)}function w(){mxRectangleShape.call(this)}function v(){mxActor.call(this)}function E(){mxActor.call(this)}function x(){mxActor.call(this)}function u(){mxRectangleShape.call(this)}function z(){mxRectangleShape.call(this)}function C(){mxCylinder.call(this)}function N(){mxShape.call(this)}function D(){mxShape.call(this)}
+function G(){mxEllipse.call(this)}function K(){mxShape.call(this)}function y(){mxShape.call(this)}function A(){mxRectangleShape.call(this)}function I(){mxShape.call(this)}function O(){mxShape.call(this)}function Q(){mxShape.call(this)}function U(){mxShape.call(this)}function T(){mxShape.call(this)}function H(){mxCylinder.call(this)}function fa(){mxDoubleEllipse.call(this)}function la(){mxDoubleEllipse.call(this)}function W(){mxArrowConnector.call(this);this.spacing=0}function Z(){mxArrowConnector.call(this);
+this.spacing=0}function L(){mxActor.call(this)}function F(){mxRectangleShape.call(this)}function S(){mxActor.call(this)}function J(){mxActor.call(this)}function M(){mxActor.call(this)}function R(){mxActor.call(this)}function ha(){mxActor.call(this)}function B(){mxActor.call(this)}function ca(){mxActor.call(this)}function V(){mxActor.call(this)}function X(){mxActor.call(this)}function aa(){mxActor.call(this)}function da(){mxEllipse.call(this)}function Y(){mxEllipse.call(this)}function pa(){mxEllipse.call(this)}
+function ra(){mxRhombus.call(this)}function ja(){mxEllipse.call(this)}function ma(){mxEllipse.call(this)}function ua(){mxEllipse.call(this)}function ia(){mxEllipse.call(this)}function sa(){mxActor.call(this)}function ga(){mxActor.call(this)}function ea(){mxActor.call(this)}function ba(){mxConnector.call(this)}function xa(a,c,b,d,f,e,g,h,n,m){g+=n;var na=d.clone();d.x-=f*(2*g+n);d.y-=e*(2*g+n);f*=g+n;e*=g+n;return function(){a.ellipse(na.x-f-g,na.y-e-g,2*g,2*g);m?a.fillAndStroke():a.stroke()}}mxUtils.extend(a,
mxCylinder);a.prototype.size=20;a.prototype.redrawPath=function(a,c,b,d,f,e){c=Math.max(0,Math.min(d,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));e?(a.moveTo(c,f),a.lineTo(c,c),a.lineTo(0,0),a.moveTo(c,c),a.lineTo(d,c)):(a.moveTo(0,0),a.lineTo(d-c,0),a.lineTo(d,c),a.lineTo(d,f),a.lineTo(c,f),a.lineTo(0,f-c),a.lineTo(0,0),a.close());a.end()};a.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?(a=parseFloat(mxUtils.getValue(this.style,
-"size",this.size))*this.scale,new mxRectangle(a,a,0,0)):null};mxCellRenderer.registerShape("cube",a);var Ba=Math.tan(mxUtils.toRadians(30)),ra=(.5-Ba)/2;mxUtils.extend(b,mxActor);b.prototype.size=20;b.prototype.redrawPath=function(a,c,b,d,f){c=Math.min(d,f/Ba);a.translate((d-c)/2,(f-c)/2+c/4);a.moveTo(0,.25*c);a.lineTo(.5*c,c*ra);a.lineTo(c,.25*c);a.lineTo(.5*c,(.5-ra)*c);a.lineTo(0,.25*c);a.close();a.end()};mxCellRenderer.registerShape("isoRectangle",b);mxUtils.extend(e,mxCylinder);e.prototype.size=
-20;e.prototype.redrawPath=function(a,c,b,d,f,e){c=Math.min(d,f/(.5+Ba));e?(a.moveTo(0,.25*c),a.lineTo(.5*c,(.5-ra)*c),a.lineTo(c,.25*c),a.moveTo(.5*c,(.5-ra)*c),a.lineTo(.5*c,(1-ra)*c)):(a.translate((d-c)/2,(f-c)/2),a.moveTo(0,.25*c),a.lineTo(.5*c,c*ra),a.lineTo(c,.25*c),a.lineTo(c,.75*c),a.lineTo(.5*c,(1-ra)*c),a.lineTo(0,.75*c),a.close());a.end()};mxCellRenderer.registerShape("isoCube",e);mxUtils.extend(d,mxCylinder);d.prototype.redrawPath=function(a,c,b,d,f,e){c=Math.min(f/2,Math.round(f/8)+this.strokewidth-
+"size",this.size))*this.scale,new mxRectangle(a,a,0,0)):null};mxCellRenderer.registerShape("cube",a);var va=Math.tan(mxUtils.toRadians(30)),qa=(.5-va)/2;mxUtils.extend(b,mxActor);b.prototype.size=20;b.prototype.redrawPath=function(a,c,b,d,f){c=Math.min(d,f/va);a.translate((d-c)/2,(f-c)/2+c/4);a.moveTo(0,.25*c);a.lineTo(.5*c,c*qa);a.lineTo(c,.25*c);a.lineTo(.5*c,(.5-qa)*c);a.lineTo(0,.25*c);a.close();a.end()};mxCellRenderer.registerShape("isoRectangle",b);mxUtils.extend(e,mxCylinder);e.prototype.size=
+20;e.prototype.redrawPath=function(a,c,b,d,f,e){c=Math.min(d,f/(.5+va));e?(a.moveTo(0,.25*c),a.lineTo(.5*c,(.5-qa)*c),a.lineTo(c,.25*c),a.moveTo(.5*c,(.5-qa)*c),a.lineTo(.5*c,(1-qa)*c)):(a.translate((d-c)/2,(f-c)/2),a.moveTo(0,.25*c),a.lineTo(.5*c,c*qa),a.lineTo(c,.25*c),a.lineTo(c,.75*c),a.lineTo(.5*c,(1-qa)*c),a.lineTo(0,.75*c),a.close());a.end()};mxCellRenderer.registerShape("isoCube",e);mxUtils.extend(d,mxCylinder);d.prototype.redrawPath=function(a,c,b,d,f,e){c=Math.min(f/2,Math.round(f/8)+this.strokewidth-
1);if(e&&null!=this.fill||!e&&null==this.fill)a.moveTo(0,c),a.curveTo(0,2*c,d,2*c,d,c),e||(a.stroke(),a.begin()),a.translate(0,c/2),a.moveTo(0,c),a.curveTo(0,2*c,d,2*c,d,c),e||(a.stroke(),a.begin()),a.translate(0,c/2),a.moveTo(0,c),a.curveTo(0,2*c,d,2*c,d,c),e||(a.stroke(),a.begin()),a.translate(0,-c);e||(a.moveTo(0,c),a.curveTo(0,-c/3,d,-c/3,d,c),a.lineTo(d,f-c),a.curveTo(d,f+c/3,0,f+c/3,0,f-c),a.close())};d.prototype.getLabelMargins=function(a){return new mxRectangle(0,2.5*Math.min(a.height/2,Math.round(a.height/
8)+this.strokewidth-1)*this.scale,0,0)};mxCellRenderer.registerShape("datastore",d);mxUtils.extend(k,mxCylinder);k.prototype.size=30;k.prototype.redrawPath=function(a,c,b,d,f,e){c=Math.max(0,Math.min(d,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));e?(a.moveTo(d-c,0),a.lineTo(d-c,c),a.lineTo(d,c)):(a.moveTo(0,0),a.lineTo(d-c,0),a.lineTo(d,c),a.lineTo(d,f),a.lineTo(0,f),a.lineTo(0,0),a.close());a.end()};mxCellRenderer.registerShape("note",k);mxUtils.extend(l,mxActor);l.prototype.redrawPath=
function(a,c,b,d,f){a.moveTo(0,0);a.quadTo(d/2,.5*f,d,0);a.quadTo(.5*d,f/2,d,f);a.quadTo(d/2,.5*f,0,f);a.quadTo(.5*d,f/2,0,0);a.end()};mxCellRenderer.registerShape("switch",l);mxUtils.extend(p,mxCylinder);p.prototype.tabWidth=60;p.prototype.tabHeight=20;p.prototype.tabPosition="right";p.prototype.redrawPath=function(a,c,b,d,f,e){c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));b=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));
var g=mxUtils.getValue(this.style,"tabPosition",this.tabPosition);e?"left"==g?(a.moveTo(0,b),a.lineTo(c,b)):(a.moveTo(d-c,b),a.lineTo(d,b)):("left"==g?(a.moveTo(0,0),a.lineTo(c,0),a.lineTo(c,b),a.lineTo(d,b)):(a.moveTo(0,b),a.lineTo(d-c,b),a.lineTo(d-c,0),a.lineTo(d,0)),a.lineTo(d,f),a.lineTo(0,f),a.lineTo(0,b),a.close());a.end()};mxCellRenderer.registerShape("folder",p);mxUtils.extend(q,mxActor);q.prototype.size=30;q.prototype.isRoundable=function(){return!0};q.prototype.redrawPath=function(a,c,
-b,d,f){c=Math.max(0,Math.min(d,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(c,0),new mxPoint(d,0),new mxPoint(d,f),new mxPoint(0,f),new mxPoint(0,c)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("card",q);mxUtils.extend(u,mxActor);u.prototype.size=.4;u.prototype.redrawPath=function(a,c,b,d,f){c=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
-"size",this.size))));a.moveTo(0,c/2);a.quadTo(d/4,1.4*c,d/2,c/2);a.quadTo(3*d/4,c*(1-1.4),d,c/2);a.lineTo(d,f-c/2);a.quadTo(3*d/4,f-1.4*c,d/2,f-c/2);a.quadTo(d/4,f-c*(1-1.4),0,f-c/2);a.lineTo(0,c/2);a.close();a.end()};u.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var c=mxUtils.getValue(this.style,"size",this.size),b=a.width,d=a.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return c*=
-d,new mxRectangle(a.x,a.y+c,b,d-2*c);c*=b;return new mxRectangle(a.x+c,a.y,b-2*c,d)}return a};mxCellRenderer.registerShape("tape",u);mxUtils.extend(c,mxActor);c.prototype.size=.3;c.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*a.height):null};c.prototype.redrawPath=function(a,c,b,d,f){c=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,
+b,d,f){c=Math.max(0,Math.min(d,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(c,0),new mxPoint(d,0),new mxPoint(d,f),new mxPoint(0,f),new mxPoint(0,c)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("card",q);mxUtils.extend(t,mxActor);t.prototype.size=.4;t.prototype.redrawPath=function(a,c,b,d,f){c=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+"size",this.size))));a.moveTo(0,c/2);a.quadTo(d/4,1.4*c,d/2,c/2);a.quadTo(3*d/4,c*(1-1.4),d,c/2);a.lineTo(d,f-c/2);a.quadTo(3*d/4,f-1.4*c,d/2,f-c/2);a.quadTo(d/4,f-c*(1-1.4),0,f-c/2);a.lineTo(0,c/2);a.close();a.end()};t.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var c=mxUtils.getValue(this.style,"size",this.size),b=a.width,d=a.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return c*=
+d,new mxRectangle(a.x,a.y+c,b,d-2*c);c*=b;return new mxRectangle(a.x+c,a.y,b-2*c,d)}return a};mxCellRenderer.registerShape("tape",t);mxUtils.extend(c,mxActor);c.prototype.size=.3;c.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*a.height):null};c.prototype.redrawPath=function(a,c,b,d,f){c=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,
0);a.lineTo(d,0);a.lineTo(d,f-c/2);a.quadTo(3*d/4,f-1.4*c,d/2,f-c/2);a.quadTo(d/4,f-c*(1-1.4),0,f-c/2);a.lineTo(0,c/2);a.close();a.end()};mxCellRenderer.registerShape("document",c);var Ga=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(a,c,b,d){var f=mxUtils.getValue(this.style,"size");return null!=f?d*Math.max(0,Math.min(1,f)):Ga.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var c=2*mxUtils.getValue(this.style,
"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,a.height*c),0,0)}return null};mxUtils.extend(f,mxActor);f.prototype.size=.2;f.prototype.isRoundable=function(){return!0};f.prototype.redrawPath=function(a,c,b,d,f){c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,f),new mxPoint(c,0),new mxPoint(d,0),new mxPoint(d-c,f)],this.isRounded,
b,!0);a.end()};mxCellRenderer.registerShape("parallelogram",f);mxUtils.extend(g,mxActor);g.prototype.size=.2;g.prototype.isRoundable=function(){return!0};g.prototype.redrawPath=function(a,c,b,d,f){c=d*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,f),new mxPoint(c,0),new mxPoint(d-c,0),new mxPoint(d,f)],this.isRounded,b,!0)};mxCellRenderer.registerShape("trapezoid",
@@ -2473,17 +2473,17 @@ a=new mxRectangle(a.x,a.y,c,b);var d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.
mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,e=Math.max(e,Math.min(d*g,f*g));e=Math.round(e);a.begin();a.moveTo(c+e,b);a.lineTo(c+e,b+f);a.moveTo(c+d-e,b);a.lineTo(c+d-e,b+f);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("process",m);mxUtils.extend(w,mxRectangleShape);w.prototype.paintBackground=function(a,c,b,d,f){a.setFillColor(mxConstants.NONE);a.rect(c,b,d,f);a.fill()};w.prototype.paintForeground=function(a,
c,b,d,f){};mxCellRenderer.registerShape("transparent",w);mxUtils.extend(v,mxHexagon);v.prototype.size=30;v.prototype.position=.5;v.prototype.position2=.5;v.prototype.base=20;v.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};v.prototype.isRoundable=function(){return!0};v.prototype.redrawPath=function(a,c,b,d,f){c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;b=Math.max(0,Math.min(f,
parseFloat(mxUtils.getValue(this.style,"size",this.size))));var e=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),g=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),h=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,f-b),new mxPoint(Math.min(d,e+h),f-b),new mxPoint(g,f),new mxPoint(Math.max(0,e),f-b),new mxPoint(0,
-f-b)],this.isRounded,c,!0,[4])};mxCellRenderer.registerShape("callout",v);mxUtils.extend(D,mxActor);D.prototype.size=.2;D.prototype.fixedSize=20;D.prototype.isRoundable=function(){return!0};D.prototype.redrawPath=function(a,c,b,d,f){c="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,
-mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d-c,0),new mxPoint(d,f/2),new mxPoint(d-c,f),new mxPoint(0,f),new mxPoint(c,f/2)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("step",D);mxUtils.extend(x,mxHexagon);x.prototype.size=.25;x.prototype.isRoundable=function(){return!0};x.prototype.redrawPath=function(a,c,b,d,f){c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,
-mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(c,0),new mxPoint(d-c,0),new mxPoint(d,.5*f),new mxPoint(d-c,f),new mxPoint(c,f),new mxPoint(0,.5*f)],this.isRounded,b,!0)};mxCellRenderer.registerShape("hexagon",x);mxUtils.extend(t,mxRectangleShape);t.prototype.isHtmlAllowed=function(){return!1};t.prototype.paintForeground=function(a,c,b,d,f){var e=Math.min(d/5,f/5)+1;a.begin();a.moveTo(c+d/2,b+e);a.lineTo(c+d/2,b+f-e);a.moveTo(c+e,b+f/2);a.lineTo(c+d-e,b+f/2);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,
-arguments)};mxCellRenderer.registerShape("plus",t);var Da=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var c=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+c,a.y+c,a.width-2*c,a.height-2*c)}return a};mxRhombus.prototype.paintVertexShape=function(a,c,b,d,f){Da.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var e=2*Math.max(2,this.strokewidth+
+f-b)],this.isRounded,c,!0,[4])};mxCellRenderer.registerShape("callout",v);mxUtils.extend(E,mxActor);E.prototype.size=.2;E.prototype.fixedSize=20;E.prototype.isRoundable=function(){return!0};E.prototype.redrawPath=function(a,c,b,d,f){c="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,
+mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d-c,0),new mxPoint(d,f/2),new mxPoint(d-c,f),new mxPoint(0,f),new mxPoint(c,f/2)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("step",E);mxUtils.extend(x,mxHexagon);x.prototype.size=.25;x.prototype.isRoundable=function(){return!0};x.prototype.redrawPath=function(a,c,b,d,f){c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,
+mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(c,0),new mxPoint(d-c,0),new mxPoint(d,.5*f),new mxPoint(d-c,f),new mxPoint(c,f),new mxPoint(0,.5*f)],this.isRounded,b,!0)};mxCellRenderer.registerShape("hexagon",x);mxUtils.extend(u,mxRectangleShape);u.prototype.isHtmlAllowed=function(){return!1};u.prototype.paintForeground=function(a,c,b,d,f){var e=Math.min(d/5,f/5)+1;a.begin();a.moveTo(c+d/2,b+e);a.lineTo(c+d/2,b+f-e);a.moveTo(c+e,b+f/2);a.lineTo(c+d-e,b+f/2);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,
+arguments)};mxCellRenderer.registerShape("plus",u);var Da=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var c=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+c,a.y+c,a.width-2*c,a.height-2*c)}return a};mxRhombus.prototype.paintVertexShape=function(a,c,b,d,f){Da.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var e=2*Math.max(2,this.strokewidth+
1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);c+=e;b+=e;d-=2*e;f-=2*e;0<d&&0<f&&(a.setShadow(!1),Da.apply(this,[a,c,b,d,f]))}};mxUtils.extend(z,mxRectangleShape);z.prototype.isHtmlAllowed=function(){return!1};z.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var c=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+c,a.y+c,a.width-2*c,a.height-2*c)}return a};z.prototype.paintForeground=function(a,c,b,
d,f){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var e=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);c+=e;b+=e;d-=2*e;f-=2*e;0<d&&0<f&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}a.setDashed(!1);var e=0,g;do{g=mxCellRenderer.defaultShapes[this.style["symbol"+e]];if(null!=g){var h=this.style["symbol"+e+"Align"],n=this.style["symbol"+e+"VerticalAlign"],na=this.style["symbol"+e+"Width"],m=this.style["symbol"+e+"Height"],r=
-this.style["symbol"+e+"Spacing"]||0,t=this.style["symbol"+e+"VSpacing"]||r,x=this.style["symbol"+e+"ArcSpacing"];null!=x&&(x*=this.getArcSize(d+this.strokewidth,f+this.strokewidth),r+=x,t+=x);var x=c,v=b,x=h==mxConstants.ALIGN_CENTER?x+(d-na)/2:h==mxConstants.ALIGN_RIGHT?x+(d-na-r):x+r,v=n==mxConstants.ALIGN_MIDDLE?v+(f-m)/2:n==mxConstants.ALIGN_BOTTOM?v+(f-m-t):v+t;a.save();h=new g;h.style=this.style;g.prototype.paintVertexShape.call(h,a,x,v,na,m);a.restore()}e++}while(null!=g)}mxRectangleShape.prototype.paintForeground.apply(this,
-arguments)};mxCellRenderer.registerShape("ext",z);mxUtils.extend(B,mxCylinder);B.prototype.redrawPath=function(a,c,b,d,f,e){e?(a.moveTo(0,0),a.lineTo(d/2,f/2),a.lineTo(d,0),a.end()):(a.moveTo(0,0),a.lineTo(d,0),a.lineTo(d,f),a.lineTo(0,f),a.close())};mxCellRenderer.registerShape("message",B);mxUtils.extend(N,mxShape);N.prototype.paintBackground=function(a,c,b,d,f){a.translate(c,b);a.ellipse(d/4,0,d/2,f/4);a.fillAndStroke();a.begin();a.moveTo(d/2,f/4);a.lineTo(d/2,2*f/3);a.moveTo(d/2,f/3);a.lineTo(0,
-f/3);a.moveTo(d/2,f/3);a.lineTo(d,f/3);a.moveTo(d/2,2*f/3);a.lineTo(0,f);a.moveTo(d/2,2*f/3);a.lineTo(d,f);a.end();a.stroke()};mxCellRenderer.registerShape("umlActor",N);mxUtils.extend(C,mxShape);C.prototype.getLabelMargins=function(a){return new mxRectangle(a.width/6,0,0,0)};C.prototype.paintBackground=function(a,c,b,d,f){a.translate(c,b);a.begin();a.moveTo(0,f/4);a.lineTo(0,3*f/4);a.end();a.stroke();a.begin();a.moveTo(0,f/2);a.lineTo(d/6,f/2);a.end();a.stroke();a.ellipse(d/6,0,5*d/6,f);a.fillAndStroke()};
-mxCellRenderer.registerShape("umlBoundary",C);mxUtils.extend(G,mxEllipse);G.prototype.paintVertexShape=function(a,c,b,d,f){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(c+d/8,b+f);a.lineTo(c+7*d/8,b+f);a.end();a.stroke()};mxCellRenderer.registerShape("umlEntity",G);mxUtils.extend(J,mxShape);J.prototype.paintVertexShape=function(a,c,b,d,f){a.translate(c,b);a.begin();a.moveTo(d,0);a.lineTo(0,f);a.moveTo(0,0);a.lineTo(d,f);a.end();a.stroke()};mxCellRenderer.registerShape("umlDestroy",
-J);mxUtils.extend(y,mxShape);y.prototype.getLabelBounds=function(a){return new mxRectangle(a.x,a.y+a.height/8,a.width,7*a.height/8)};y.prototype.paintBackground=function(a,c,b,d,f){a.translate(c,b);a.begin();a.moveTo(3*d/8,f/8*1.1);a.lineTo(5*d/8,0);a.end();a.stroke();a.ellipse(0,f/8,d,7*f/8);a.fillAndStroke()};y.prototype.paintForeground=function(a,c,b,d,f){a.begin();a.moveTo(3*d/8,f/8*1.1);a.lineTo(5*d/8,f/4);a.end();a.stroke()};mxCellRenderer.registerShape("umlControl",y);mxUtils.extend(A,mxRectangleShape);
+this.style["symbol"+e+"Spacing"]||0,u=this.style["symbol"+e+"VSpacing"]||r,x=this.style["symbol"+e+"ArcSpacing"];null!=x&&(x*=this.getArcSize(d+this.strokewidth,f+this.strokewidth),r+=x,u+=x);var x=c,k=b,x=h==mxConstants.ALIGN_CENTER?x+(d-na)/2:h==mxConstants.ALIGN_RIGHT?x+(d-na-r):x+r,k=n==mxConstants.ALIGN_MIDDLE?k+(f-m)/2:n==mxConstants.ALIGN_BOTTOM?k+(f-m-u):k+u;a.save();h=new g;h.style=this.style;g.prototype.paintVertexShape.call(h,a,x,k,na,m);a.restore()}e++}while(null!=g)}mxRectangleShape.prototype.paintForeground.apply(this,
+arguments)};mxCellRenderer.registerShape("ext",z);mxUtils.extend(C,mxCylinder);C.prototype.redrawPath=function(a,c,b,d,f,e){e?(a.moveTo(0,0),a.lineTo(d/2,f/2),a.lineTo(d,0),a.end()):(a.moveTo(0,0),a.lineTo(d,0),a.lineTo(d,f),a.lineTo(0,f),a.close())};mxCellRenderer.registerShape("message",C);mxUtils.extend(N,mxShape);N.prototype.paintBackground=function(a,c,b,d,f){a.translate(c,b);a.ellipse(d/4,0,d/2,f/4);a.fillAndStroke();a.begin();a.moveTo(d/2,f/4);a.lineTo(d/2,2*f/3);a.moveTo(d/2,f/3);a.lineTo(0,
+f/3);a.moveTo(d/2,f/3);a.lineTo(d,f/3);a.moveTo(d/2,2*f/3);a.lineTo(0,f);a.moveTo(d/2,2*f/3);a.lineTo(d,f);a.end();a.stroke()};mxCellRenderer.registerShape("umlActor",N);mxUtils.extend(D,mxShape);D.prototype.getLabelMargins=function(a){return new mxRectangle(a.width/6,0,0,0)};D.prototype.paintBackground=function(a,c,b,d,f){a.translate(c,b);a.begin();a.moveTo(0,f/4);a.lineTo(0,3*f/4);a.end();a.stroke();a.begin();a.moveTo(0,f/2);a.lineTo(d/6,f/2);a.end();a.stroke();a.ellipse(d/6,0,5*d/6,f);a.fillAndStroke()};
+mxCellRenderer.registerShape("umlBoundary",D);mxUtils.extend(G,mxEllipse);G.prototype.paintVertexShape=function(a,c,b,d,f){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(c+d/8,b+f);a.lineTo(c+7*d/8,b+f);a.end();a.stroke()};mxCellRenderer.registerShape("umlEntity",G);mxUtils.extend(K,mxShape);K.prototype.paintVertexShape=function(a,c,b,d,f){a.translate(c,b);a.begin();a.moveTo(d,0);a.lineTo(0,f);a.moveTo(0,0);a.lineTo(d,f);a.end();a.stroke()};mxCellRenderer.registerShape("umlDestroy",
+K);mxUtils.extend(y,mxShape);y.prototype.getLabelBounds=function(a){return new mxRectangle(a.x,a.y+a.height/8,a.width,7*a.height/8)};y.prototype.paintBackground=function(a,c,b,d,f){a.translate(c,b);a.begin();a.moveTo(3*d/8,f/8*1.1);a.lineTo(5*d/8,0);a.end();a.stroke();a.ellipse(0,f/8,d,7*f/8);a.fillAndStroke()};y.prototype.paintForeground=function(a,c,b,d,f){a.begin();a.moveTo(3*d/8,f/8*1.1);a.lineTo(5*d/8,f/4);a.end();a.stroke()};mxCellRenderer.registerShape("umlControl",y);mxUtils.extend(A,mxRectangleShape);
A.prototype.size=40;A.prototype.isHtmlAllowed=function(){return!1};A.prototype.getLabelBounds=function(a){var c=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(a.x,a.y,a.width,c)};A.prototype.paintBackground=function(a,c,b,d,f){var e=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),g=mxUtils.getValue(this.style,"participant");null==g||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,
a,c,b,d,e):(g=this.state.view.graph.cellRenderer.getShape(g),null!=g&&g!=A&&(g=new g,g.apply(this.state),a.save(),g.paintVertexShape(a,c,b,d,e),a.restore()));e<f&&(a.setDashed(!0),a.begin(),a.moveTo(c+d/2,b+e),a.lineTo(c+d/2,b+f),a.end(),a.stroke())};A.prototype.paintForeground=function(a,c,b,d,f){var e=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,a,c,b,d,Math.min(f,e))};mxCellRenderer.registerShape("umlLifeline",
A);mxUtils.extend(I,mxShape);I.prototype.width=60;I.prototype.height=30;I.prototype.corner=10;I.prototype.getLabelMargins=function(a){return new mxRectangle(0,0,a.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),a.height-parseFloat(mxUtils.getValue(this.style,"height",this.height)*this.scale))};I.prototype.paintBackground=function(a,c,b,d,f){var e=this.corner,g=Math.min(d,Math.max(e,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),h=Math.min(f,Math.max(1.5*
@@ -2495,50 +2495,50 @@ new mxRectangle(0,0,0,Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(c
mxConstants.DIRECTION_NORTH||c==mxConstants.DIRECTION_SOUTH?(e=m*Math.max(0,Math.min(1,e)),h=[new mxPoint(g,h),new mxPoint(g+n,h+e),new mxPoint(g+n,h+m),new mxPoint(g,h+m-e),new mxPoint(g,h)]):(e=n*Math.max(0,Math.min(1,e)),h=[new mxPoint(g+e,h),new mxPoint(g+n,h),new mxPoint(g+n-e,h+m),new mxPoint(g,h+m),new mxPoint(g+e,h)]);m=a.getCenterX();a=a.getCenterY();a=new mxPoint(m,a);d&&(b.x<g||b.x>g+n?a.y=b.y:a.x=b.x);return mxUtils.getPerimeterPoint(h,a,b)};mxStyleRegistry.putValue("parallelogramPerimeter",
mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(a,c,b,d){var f=g.prototype.size;null!=c&&(f=mxUtils.getValue(c.style,"size",f));var e=a.x,h=a.y,n=a.width,m=a.height;c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_EAST?(f=n*Math.max(0,Math.min(1,f)),h=[new mxPoint(e+f,h),new mxPoint(e+n-f,h),new mxPoint(e+n,h+m),new mxPoint(e,h+m),new mxPoint(e+f,h)]):c==mxConstants.DIRECTION_WEST?
(f=n*Math.max(0,Math.min(1,f)),h=[new mxPoint(e,h),new mxPoint(e+n,h),new mxPoint(e+n-f,h+m),new mxPoint(e+f,h+m),new mxPoint(e,h)]):c==mxConstants.DIRECTION_NORTH?(f=m*Math.max(0,Math.min(1,f)),h=[new mxPoint(e,h+f),new mxPoint(e+n,h),new mxPoint(e+n,h+m),new mxPoint(e,h+m-f),new mxPoint(e,h+f)]):(f=m*Math.max(0,Math.min(1,f)),h=[new mxPoint(e,h),new mxPoint(e+n,h+f),new mxPoint(e+n,h+m-f),new mxPoint(e,h+m),new mxPoint(e,h)]);m=a.getCenterX();a=a.getCenterY();a=new mxPoint(m,a);d&&(b.x<e||b.x>e+
-n?a.y=b.y:a.x=b.x);return mxUtils.getPerimeterPoint(h,a,b)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(a,c,b,d){var f="0"!=mxUtils.getValue(c.style,"fixedSize","0"),e=f?D.prototype.fixedSize:D.prototype.size;null!=c&&(e=mxUtils.getValue(c.style,"size",e));var g=a.x,h=a.y,n=a.width,m=a.height,r=a.getCenterX();a=a.getCenterY();c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;
+n?a.y=b.y:a.x=b.x);return mxUtils.getPerimeterPoint(h,a,b)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(a,c,b,d){var f="0"!=mxUtils.getValue(c.style,"fixedSize","0"),e=f?E.prototype.fixedSize:E.prototype.size;null!=c&&(e=mxUtils.getValue(c.style,"size",e));var g=a.x,h=a.y,n=a.width,m=a.height,r=a.getCenterX();a=a.getCenterY();c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;
c==mxConstants.DIRECTION_EAST?(f=f?Math.max(0,Math.min(n,e)):n*Math.max(0,Math.min(1,e)),h=[new mxPoint(g,h),new mxPoint(g+n-f,h),new mxPoint(g+n,a),new mxPoint(g+n-f,h+m),new mxPoint(g,h+m),new mxPoint(g+f,a),new mxPoint(g,h)]):c==mxConstants.DIRECTION_WEST?(f=f?Math.max(0,Math.min(n,e)):n*Math.max(0,Math.min(1,e)),h=[new mxPoint(g+f,h),new mxPoint(g+n,h),new mxPoint(g+n-f,a),new mxPoint(g+n,h+m),new mxPoint(g+f,h+m),new mxPoint(g,a),new mxPoint(g+f,h)]):c==mxConstants.DIRECTION_NORTH?(f=f?Math.max(0,
Math.min(m,e)):m*Math.max(0,Math.min(1,e)),h=[new mxPoint(g,h+f),new mxPoint(r,h),new mxPoint(g+n,h+f),new mxPoint(g+n,h+m),new mxPoint(r,h+m-f),new mxPoint(g,h+m),new mxPoint(g,h+f)]):(f=f?Math.max(0,Math.min(m,e)):m*Math.max(0,Math.min(1,e)),h=[new mxPoint(g,h),new mxPoint(r,h+f),new mxPoint(g+n,h),new mxPoint(g+n,h+m-f),new mxPoint(r,h+m),new mxPoint(g,h+m-f),new mxPoint(g,h)]);r=new mxPoint(r,a);d&&(b.x<g||b.x>g+n?r.y=b.y:r.x=b.x);return mxUtils.getPerimeterPoint(h,r,b)};mxStyleRegistry.putValue("stepPerimeter",
mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(a,c,b,d){var f=x.prototype.size;null!=c&&(f=mxUtils.getValue(c.style,"size",f));var e=a.x,g=a.y,h=a.width,n=a.height,m=a.getCenterX();a=a.getCenterY();c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_NORTH||c==mxConstants.DIRECTION_SOUTH?(f=n*Math.max(0,Math.min(1,f)),g=[new mxPoint(m,g),new mxPoint(e+h,g+f),new mxPoint(e+h,g+n-f),new mxPoint(m,
g+n),new mxPoint(e,g+n-f),new mxPoint(e,g+f),new mxPoint(m,g)]):(f=h*Math.max(0,Math.min(1,f)),g=[new mxPoint(e+f,g),new mxPoint(e+h-f,g),new mxPoint(e+h,a),new mxPoint(e+h-f,g+n),new mxPoint(e+f,g+n),new mxPoint(e,a),new mxPoint(e+f,g)]);m=new mxPoint(m,a);d&&(b.x<e||b.x>e+h?m.y=b.y:m.x=b.x);return mxUtils.getPerimeterPoint(g,m,b)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(O,mxShape);O.prototype.size=10;O.prototype.paintBackground=function(a,c,b,d,
f){var e=parseFloat(mxUtils.getValue(this.style,"size",this.size));a.translate(c,b);a.ellipse((d-e)/2,0,e,e);a.fillAndStroke();a.begin();a.moveTo(d/2,e);a.lineTo(d/2,f);a.end();a.stroke()};mxCellRenderer.registerShape("lollipop",O);mxUtils.extend(Q,mxShape);Q.prototype.size=10;Q.prototype.inset=2;Q.prototype.paintBackground=function(a,c,b,d,f){var e=parseFloat(mxUtils.getValue(this.style,"size",this.size)),g=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(c,
-b);a.begin();a.moveTo(d/2,e+g);a.lineTo(d/2,f);a.end();a.stroke();a.begin();a.moveTo((d-e)/2-g,e/2);a.quadTo((d-e)/2-g,e+g,d/2,e+g);a.quadTo((d+e)/2+g,e+g,(d+e)/2+g,e/2);a.end();a.stroke()};mxCellRenderer.registerShape("requires",Q);mxUtils.extend(X,mxShape);X.prototype.paintBackground=function(a,c,b,d,f){a.translate(c,b);a.begin();a.moveTo(0,0);a.quadTo(d,0,d,f/2);a.quadTo(d,f,0,f);a.end();a.stroke()};mxCellRenderer.registerShape("requiredInterface",X);mxUtils.extend(U,mxShape);U.prototype.inset=
-2;U.prototype.paintBackground=function(a,c,b,d,f){var e=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(c,b);a.ellipse(0,e,d-2*e,f-2*e);a.fillAndStroke();a.begin();a.moveTo(d/2,0);a.quadTo(d,0,d,f/2);a.quadTo(d,f,d/2,f);a.end();a.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",U);mxUtils.extend(H,mxCylinder);H.prototype.jettyWidth=32;H.prototype.jettyHeight=12;H.prototype.redrawPath=function(a,c,b,d,f,e){var g=parseFloat(mxUtils.getValue(this.style,
+b);a.begin();a.moveTo(d/2,e+g);a.lineTo(d/2,f);a.end();a.stroke();a.begin();a.moveTo((d-e)/2-g,e/2);a.quadTo((d-e)/2-g,e+g,d/2,e+g);a.quadTo((d+e)/2+g,e+g,(d+e)/2+g,e/2);a.end();a.stroke()};mxCellRenderer.registerShape("requires",Q);mxUtils.extend(U,mxShape);U.prototype.paintBackground=function(a,c,b,d,f){a.translate(c,b);a.begin();a.moveTo(0,0);a.quadTo(d,0,d,f/2);a.quadTo(d,f,0,f);a.end();a.stroke()};mxCellRenderer.registerShape("requiredInterface",U);mxUtils.extend(T,mxShape);T.prototype.inset=
+2;T.prototype.paintBackground=function(a,c,b,d,f){var e=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(c,b);a.ellipse(0,e,d-2*e,f-2*e);a.fillAndStroke();a.begin();a.moveTo(d/2,0);a.quadTo(d,0,d,f/2);a.quadTo(d,f,d/2,f);a.end();a.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",T);mxUtils.extend(H,mxCylinder);H.prototype.jettyWidth=32;H.prototype.jettyHeight=12;H.prototype.redrawPath=function(a,c,b,d,f,e){var g=parseFloat(mxUtils.getValue(this.style,
"jettyWidth",this.jettyWidth));c=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));b=g/2;var g=b+g/2,h=.3*f-c/2,n=.7*f-c/2;e?(a.moveTo(b,h),a.lineTo(g,h),a.lineTo(g,h+c),a.lineTo(b,h+c),a.moveTo(b,n),a.lineTo(g,n),a.lineTo(g,n+c),a.lineTo(b,n+c)):(a.moveTo(b,0),a.lineTo(d,0),a.lineTo(d,f),a.lineTo(b,f),a.lineTo(b,n+c),a.lineTo(0,n+c),a.lineTo(0,n),a.lineTo(b,n),a.lineTo(b,h+c),a.lineTo(0,h+c),a.lineTo(0,h),a.lineTo(b,h),a.close());a.end()};mxCellRenderer.registerShape("component",
-H);mxUtils.extend(ea,mxDoubleEllipse);ea.prototype.outerStroke=!0;ea.prototype.paintVertexShape=function(a,c,b,d,f){var e=Math.min(4,Math.min(d/5,f/5));0<d&&0<f&&(a.ellipse(c+e,b+e,d-2*e,f-2*e),a.fillAndStroke());a.setShadow(!1);this.outerStroke&&(a.ellipse(c,b,d,f),a.stroke())};mxCellRenderer.registerShape("endState",ea);mxUtils.extend(ka,ea);ka.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",ka);mxUtils.extend(Y,mxArrowConnector);Y.prototype.defaultWidth=4;Y.prototype.isOpenEnded=
-function(){return!0};Y.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};Y.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",Y);mxUtils.extend(ba,mxArrowConnector);ba.prototype.defaultWidth=10;ba.prototype.defaultArrowWidth=20;ba.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};ba.prototype.getEndArrowWidth=
-function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};ba.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",ba);mxUtils.extend(K,mxActor);K.prototype.size=30;K.prototype.isRoundable=function(){return!0};K.prototype.redrawPath=function(a,c,b,d,f){c=Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)));b=mxUtils.getValue(this.style,
-mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,f),new mxPoint(0,c),new mxPoint(d,0),new mxPoint(d,f)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("manualInput",K);mxUtils.extend(F,mxRectangleShape);F.prototype.dx=20;F.prototype.dy=20;F.prototype.isHtmlAllowed=function(){return!1};F.prototype.paintForeground=function(a,c,b,d,f){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var e=0;if(this.isRounded)var g=mxUtils.getValue(this.style,
+H);mxUtils.extend(fa,mxDoubleEllipse);fa.prototype.outerStroke=!0;fa.prototype.paintVertexShape=function(a,c,b,d,f){var e=Math.min(4,Math.min(d/5,f/5));0<d&&0<f&&(a.ellipse(c+e,b+e,d-2*e,f-2*e),a.fillAndStroke());a.setShadow(!1);this.outerStroke&&(a.ellipse(c,b,d,f),a.stroke())};mxCellRenderer.registerShape("endState",fa);mxUtils.extend(la,fa);la.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",la);mxUtils.extend(W,mxArrowConnector);W.prototype.defaultWidth=4;W.prototype.isOpenEnded=
+function(){return!0};W.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};W.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",W);mxUtils.extend(Z,mxArrowConnector);Z.prototype.defaultWidth=10;Z.prototype.defaultArrowWidth=20;Z.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};Z.prototype.getEndArrowWidth=
+function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};Z.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",Z);mxUtils.extend(L,mxActor);L.prototype.size=30;L.prototype.isRoundable=function(){return!0};L.prototype.redrawPath=function(a,c,b,d,f){c=Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)));b=mxUtils.getValue(this.style,
+mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,f),new mxPoint(0,c),new mxPoint(d,0),new mxPoint(d,f)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("manualInput",L);mxUtils.extend(F,mxRectangleShape);F.prototype.dx=20;F.prototype.dy=20;F.prototype.isHtmlAllowed=function(){return!1};F.prototype.paintForeground=function(a,c,b,d,f){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var e=0;if(this.isRounded)var g=mxUtils.getValue(this.style,
mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,e=Math.max(e,Math.min(d*g,f*g));g=Math.max(e,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));e=Math.max(e,Math.min(f,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.begin();a.moveTo(c,b+e);a.lineTo(c+d,b+e);a.end();a.stroke();a.begin();a.moveTo(c+g,b);a.lineTo(c+g,b+f);a.end();a.stroke()};mxCellRenderer.registerShape("internalStorage",F);mxUtils.extend(S,mxActor);S.prototype.dx=20;S.prototype.dy=
20;S.prototype.redrawPath=function(a,c,b,d,f){c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));b=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,b),new mxPoint(c,b),new mxPoint(c,f),new mxPoint(0,f)],this.isRounded,e,!0);a.end()};
-mxCellRenderer.registerShape("corner",S);mxUtils.extend(L,mxActor);L.prototype.redrawPath=function(a,c,b,d,f){a.moveTo(0,0);a.lineTo(0,f);a.end();a.moveTo(d,0);a.lineTo(d,f);a.end();a.moveTo(0,f/2);a.lineTo(d,f/2);a.end()};mxCellRenderer.registerShape("crossbar",L);mxUtils.extend(M,mxActor);M.prototype.dx=20;M.prototype.dy=20;M.prototype.redrawPath=function(a,c,b,d,f){c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));b=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,
-"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,b),new mxPoint((d+c)/2,b),new mxPoint((d+c)/2,f),new mxPoint((d-c)/2,f),new mxPoint((d-c)/2,b),new mxPoint(0,b)],this.isRounded,e,!0);a.end()};mxCellRenderer.registerShape("tee",M);mxUtils.extend(T,mxActor);T.prototype.arrowWidth=.3;T.prototype.arrowSize=.2;T.prototype.redrawPath=
+mxCellRenderer.registerShape("corner",S);mxUtils.extend(J,mxActor);J.prototype.redrawPath=function(a,c,b,d,f){a.moveTo(0,0);a.lineTo(0,f);a.end();a.moveTo(d,0);a.lineTo(d,f);a.end();a.moveTo(0,f/2);a.lineTo(d,f/2);a.end()};mxCellRenderer.registerShape("crossbar",J);mxUtils.extend(M,mxActor);M.prototype.dx=20;M.prototype.dy=20;M.prototype.redrawPath=function(a,c,b,d,f){c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));b=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,
+"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,b),new mxPoint((d+c)/2,b),new mxPoint((d+c)/2,f),new mxPoint((d-c)/2,f),new mxPoint((d-c)/2,b),new mxPoint(0,b)],this.isRounded,e,!0);a.end()};mxCellRenderer.registerShape("tee",M);mxUtils.extend(R,mxActor);R.prototype.arrowWidth=.3;R.prototype.arrowSize=.2;R.prototype.redrawPath=
function(a,c,b,d,f){var e=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));b=(f-e)/2;var e=b+e,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,b),new mxPoint(d-c,b),new mxPoint(d-c,0),new mxPoint(d,f/2),new mxPoint(d-c,f),new mxPoint(d-c,e),new mxPoint(0,e)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("singleArrow",
-T);mxUtils.extend(E,mxActor);E.prototype.redrawPath=function(a,c,b,d,f){var e=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",T.prototype.arrowWidth))));c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",T.prototype.arrowSize))));b=(f-e)/2;var e=b+e,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,f/2),new mxPoint(c,0),new mxPoint(c,b),new mxPoint(d-c,b),new mxPoint(d-c,0),new mxPoint(d,
-f/2),new mxPoint(d-c,f),new mxPoint(d-c,e),new mxPoint(c,e),new mxPoint(c,f)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("doubleArrow",E);mxUtils.extend(R,mxActor);R.prototype.size=.1;R.prototype.redrawPath=function(a,c,b,d,f){c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(c,0);a.lineTo(d,0);a.quadTo(d-2*c,f/2,d,f);a.lineTo(c,f);a.quadTo(c-2*c,f/2,c,0);a.close();a.end()};mxCellRenderer.registerShape("dataStorage",R);mxUtils.extend(V,
-mxActor);V.prototype.redrawPath=function(a,c,b,d,f){a.moveTo(0,0);a.quadTo(d,0,d,f/2);a.quadTo(d,f,0,f);a.close();a.end()};mxCellRenderer.registerShape("or",V);mxUtils.extend(ga,mxActor);ga.prototype.redrawPath=function(a,c,b,d,f){a.moveTo(0,0);a.quadTo(d,0,d,f/2);a.quadTo(d,f,0,f);a.quadTo(d/2,f/2,0,0);a.close();a.end()};mxCellRenderer.registerShape("xor",ga);mxUtils.extend(W,mxActor);W.prototype.size=20;W.prototype.isRoundable=function(){return!0};W.prototype.redrawPath=function(a,c,b,d,f){c=Math.min(d/
-2,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(c,0),new mxPoint(d-c,0),new mxPoint(d,.8*c),new mxPoint(d,f),new mxPoint(0,f),new mxPoint(0,.8*c)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("loopLimit",W);mxUtils.extend(aa,mxActor);aa.prototype.size=.375;aa.prototype.isRoundable=function(){return!0};aa.prototype.redrawPath=function(a,c,b,d,f){c=
-f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,f-c),new mxPoint(d/2,f),new mxPoint(0,f-c)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("offPageConnector",aa);mxUtils.extend(Z,mxEllipse);Z.prototype.paintVertexShape=function(a,c,b,d,f){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();
-a.moveTo(c+d/2,b+f);a.lineTo(c+d,b+f);a.end();a.stroke()};mxCellRenderer.registerShape("tapeData",Z);mxUtils.extend(pa,mxEllipse);pa.prototype.paintVertexShape=function(a,c,b,d,f){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(c,b+f/2);a.lineTo(c+d,b+f/2);a.end();a.stroke();a.begin();a.moveTo(c+d/2,b);a.lineTo(c+d/2,b+f);a.end();a.stroke()};mxCellRenderer.registerShape("orEllipse",pa);mxUtils.extend(qa,mxEllipse);qa.prototype.paintVertexShape=function(a,
-c,b,d,f){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(c+.145*d,b+.145*f);a.lineTo(c+.855*d,b+.855*f);a.end();a.stroke();a.begin();a.moveTo(c+.855*d,b+.145*f);a.lineTo(c+.145*d,b+.855*f);a.end();a.stroke()};mxCellRenderer.registerShape("sumEllipse",qa);mxUtils.extend(fa,mxRhombus);fa.prototype.paintVertexShape=function(a,c,b,d,f){mxRhombus.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(c,b+f/2);a.lineTo(c+d,b+f/2);
-a.end();a.stroke()};mxCellRenderer.registerShape("sortShape",fa);mxUtils.extend(la,mxEllipse);la.prototype.paintVertexShape=function(a,c,b,d,f){a.begin();a.moveTo(c,b);a.lineTo(c+d,b);a.lineTo(c+d/2,b+f/2);a.close();a.fillAndStroke();a.begin();a.moveTo(c,b+f);a.lineTo(c+d,b+f);a.lineTo(c+d/2,b+f/2);a.close();a.fillAndStroke()};mxCellRenderer.registerShape("collate",la);mxUtils.extend(ua,mxEllipse);ua.prototype.paintVertexShape=function(a,c,b,d,f){var e=b+f-5;a.begin();a.moveTo(c,b);a.lineTo(c,b+f);
-a.moveTo(c,e);a.lineTo(c+10,e-5);a.moveTo(c,e);a.lineTo(c+10,e+5);a.moveTo(c,e);a.lineTo(c+d,e);a.moveTo(c+d,b);a.lineTo(c+d,b+f);a.moveTo(c+d,e);a.lineTo(c+d-10,e-5);a.moveTo(c+d,e);a.lineTo(c+d-10,e+5);a.end();a.stroke()};mxCellRenderer.registerShape("dimension",ua);mxUtils.extend(ma,mxEllipse);ma.prototype.paintVertexShape=function(a,c,b,d,f){this.outline||a.setStrokeColor(null);mxRectangleShape.prototype.paintBackground.apply(this,arguments);null!=this.style&&(a.setStrokeColor(this.stroke),a.rect(c,
-b,d,f),a.fill(),a.begin(),a.moveTo(c,b),"1"==mxUtils.getValue(this.style,"top","1")?a.lineTo(c+d,b):a.moveTo(c+d,b),"1"==mxUtils.getValue(this.style,"right","1")?a.lineTo(c+d,b+f):a.moveTo(c+d,b+f),"1"==mxUtils.getValue(this.style,"bottom","1")?a.lineTo(c,b+f):a.moveTo(c,b+f),"1"==mxUtils.getValue(this.style,"left","1")&&a.lineTo(c,b-this.strokewidth/2),a.end(),a.stroke())};mxCellRenderer.registerShape("partialRectangle",ma);mxUtils.extend(sa,mxEllipse);sa.prototype.paintVertexShape=function(a,c,
-b,d,f){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();"vertical"==mxUtils.getValue(this.style,"line")?(a.moveTo(c+d/2,b),a.lineTo(c+d/2,b+f)):(a.moveTo(c,b+f/2),a.lineTo(c+d,b+f/2));a.end();a.stroke()};mxCellRenderer.registerShape("lineEllipse",sa);mxUtils.extend(ha,mxActor);ha.prototype.redrawPath=function(a,c,b,d,f){c=Math.min(d,f/2);a.moveTo(0,0);a.lineTo(d-c,0);a.quadTo(d,0,d,f/2);a.quadTo(d,f,d-c,f);a.lineTo(0,f);a.close();a.end()};mxCellRenderer.registerShape("delay",
-ha);mxUtils.extend(ca,mxActor);ca.prototype.size=.2;ca.prototype.redrawPath=function(a,c,b,d,f){c=Math.min(f,d);var e=Math.max(0,Math.min(c,c*parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=(f-e)/2;b=c+e;var g=(d-e)/2,e=g+e;a.moveTo(0,c);a.lineTo(g,c);a.lineTo(g,0);a.lineTo(e,0);a.lineTo(e,c);a.lineTo(d,c);a.lineTo(d,b);a.lineTo(e,b);a.lineTo(e,f);a.lineTo(g,f);a.lineTo(g,b);a.lineTo(0,b);a.close();a.end()};mxCellRenderer.registerShape("cross",ca);mxUtils.extend(da,mxActor);da.prototype.size=
-.25;da.prototype.redrawPath=function(a,c,b,d,f){c=Math.min(d,f/2);b=Math.min(d-c,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*d);a.moveTo(0,f/2);a.lineTo(b,0);a.lineTo(d-c,0);a.quadTo(d,0,d,f/2);a.quadTo(d,f,d-c,f);a.lineTo(b,f);a.close();a.end()};mxCellRenderer.registerShape("display",da);mxUtils.extend(ia,mxConnector);ia.prototype.origPaintEdgeShape=ia.prototype.paintEdgeShape;ia.prototype.paintEdgeShape=function(a,c,b){for(var d=[],f=0;f<c.length;f++)d.push(mxUtils.clone(c[f]));
-var f=a.state.dashed,e=a.state.fixDash;ia.prototype.origPaintEdgeShape.apply(this,[a,d,b]);3<=a.state.strokeWidth&&(d=mxUtils.getValue(this.style,"fillColor",null),null!=d&&(a.setStrokeColor(d),a.setStrokeWidth(a.state.strokeWidth-2),a.setDashed(f,e),ia.prototype.origPaintEdgeShape.apply(this,[a,c,b])))};mxCellRenderer.registerShape("filledEdge",ia);"undefined"!==typeof StyleFormatPanel&&function(){var a=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var c=
-this.format.getSelectionState(),b=a.apply(this,arguments);"umlFrame"==c.style.shape&&b.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"#ffffff"});return b}}();mxMarker.addMarker("dash",function(a,c,b,d,f,e,g,h,n,m){var r=f*(g+n+1),t=e*(g+n+1);return function(){a.begin();a.moveTo(d.x-r/2-t/2,d.y-t/2+r/2);a.lineTo(d.x+t/2-3*r/2,d.y-3*t/2-r/2);a.stroke()}});mxMarker.addMarker("cross",function(a,c,b,d,f,e,g,h,n,m){var r=f*(g+n+1),t=e*(g+n+1);return function(){a.begin();
-a.moveTo(d.x-r/2-t/2,d.y-t/2+r/2);a.lineTo(d.x+t/2-3*r/2,d.y-3*t/2-r/2);a.moveTo(d.x-r/2+t/2,d.y-t/2-r/2);a.lineTo(d.x-t/2-3*r/2,d.y-3*t/2+r/2);a.stroke()}});mxMarker.addMarker("circle",wa);mxMarker.addMarker("circlePlus",function(a,c,b,d,f,e,g,h,n,m){var r=d.clone(),t=wa.apply(this,arguments),x=f*(g+2*n),v=e*(g+2*n);return function(){t.apply(this,arguments);a.begin();a.moveTo(r.x-f*n,r.y-e*n);a.lineTo(r.x-2*x+f*n,r.y-2*v+e*n);a.moveTo(r.x-x-v+e*n,r.y-v+x-f*n);a.lineTo(r.x+v-x-e*n,r.y-v-x+f*n);a.stroke()}});
-mxMarker.addMarker("async",function(a,c,b,d,f,e,g,h,n,m){c=f*n*1.118;b=e*n*1.118;f*=g+n;e*=g+n;var r=d.clone();r.x-=c;r.y-=b;d.x+=1*-f-c;d.y+=1*-e-b;return function(){a.begin();a.moveTo(r.x,r.y);h?a.lineTo(r.x-f-e/2,r.y-e+f/2):a.lineTo(r.x+e/2-f,r.y-e-f/2);a.lineTo(r.x-f,r.y-e);a.close();m?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync",function(a){a=null!=a?a:2;return function(c,b,d,f,e,g,h,n,m,r){e*=h+m;g*=h+m;var t=f.clone();return function(){c.begin();c.moveTo(t.x,t.y);n?c.lineTo(t.x-
-e-g/a,t.y-g+e/a):c.lineTo(t.x+g/a-e,t.y-g-e/a);c.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Ea=function(a,c,b){return ta(a,["width"],c,function(c,d,f,e,g){g=a.shape.getEdgeWidth()*a.view.scale+b;return new mxPoint(e.x+d*c/4+f*g/2,e.y+f*c/4-d*g/2)},function(c,d,f,e,g,h){c=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,h.x,h.y));a.style.width=Math.round(2*c)/a.view.scale-b})},ta=function(a,c,b,d,f){return P(a,c,function(c){var f=a.absolutePoints,e=f.length-1;c=a.view.translate;var g=
-a.view.scale,h=b?f[0]:f[e],f=b?f[1]:f[e-1],e=f.x-h.x,n=f.y-h.y,m=Math.sqrt(e*e+n*n),h=d.call(this,m,e/m,n/m,h,f);return new mxPoint(h.x/g-c.x,h.y/g-c.y)},function(c,d,e){var g=a.absolutePoints,h=g.length-1;c=a.view.translate;var n=a.view.scale,m=b?g[0]:g[h],g=b?g[1]:g[h-1],h=g.x-m.x,r=g.y-m.y,t=Math.sqrt(h*h+r*r);d.x=(d.x+c.x)*n;d.y=(d.y+c.y)*n;f.call(this,t,h/t,r/t,m,g,d,e)})},oa=function(a){return function(c){return[P(c,["arrowWidth","arrowSize"],function(c){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
-"arrowWidth",T.prototype.arrowWidth))),d=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",T.prototype.arrowSize)));return new mxPoint(c.x+(1-d)*c.width,c.y+(1-b)*c.height/2)},function(c,b){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(c.y+c.height/2-b.y)/c.height*2));this.state.style.arrowSize=Math.max(0,Math.min(a,(c.x+c.width-b.x)/c.width))})]}},Ca=function(a,c,b){return function(d){var f=[P(d,["size"],function(b){var d=Math.max(0,Math.min(b.width,Math.min(b.height,
-parseFloat(mxUtils.getValue(this.state.style,"size",c)))))*a;return new mxPoint(b.x+d,b.y+d)},function(c,b){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(c.width,b.x-c.x),Math.min(c.height,b.y-c.y)))/a)})];b&&mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&f.push(ja(d));return f}},xa=function(a,c,b,d,f){b=null!=b?b:1;return function(e){var g=[P(e,["size"],function(c){var b=null!=f?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,d=parseFloat(mxUtils.getValue(this.state.style,
-"size",b?f:a));return new mxPoint(c.x+Math.max(0,Math.min(c.width,d*(b?1:c.width))),c.getCenterY())},function(a,c,d){var g=null!=f?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null;a=g?c.x-a.x:Math.max(0,Math.min(b,(c.x-a.x)/a.width));g&&!mxEvent.isAltDown(d.getEvent())&&(a=e.view.graph.snap(a));this.state.style.size=a},null,d)];c&&mxUtils.getValue(e.style,mxConstants.STYLE_ROUNDED,!1)&&g.push(ja(e));return g}},Fa=function(a){return function(c){var b=[P(c,["size"],function(c){var b=Math.max(0,
-Math.min(a,parseFloat(mxUtils.getValue(this.state.style,"size",g.prototype.size))));return new mxPoint(c.x+b*c.width*.75,c.y+c.height/4)},function(c,b){this.state.style.size=Math.max(0,Math.min(a,(b.x-c.x)/(.75*c.width)))},null,!0)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ja(c));return b}},va=function(){return function(a){var c=[];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(ja(a));return c}},ja=function(a,c){return P(a,[mxConstants.STYLE_ARCSIZE],function(b){var d=
+R);mxUtils.extend(ha,mxActor);ha.prototype.redrawPath=function(a,c,b,d,f){var e=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",R.prototype.arrowWidth))));c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",R.prototype.arrowSize))));b=(f-e)/2;var e=b+e,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,f/2),new mxPoint(c,0),new mxPoint(c,b),new mxPoint(d-c,b),new mxPoint(d-c,0),new mxPoint(d,
+f/2),new mxPoint(d-c,f),new mxPoint(d-c,e),new mxPoint(c,e),new mxPoint(c,f)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("doubleArrow",ha);mxUtils.extend(B,mxActor);B.prototype.size=.1;B.prototype.redrawPath=function(a,c,b,d,f){c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(c,0);a.lineTo(d,0);a.quadTo(d-2*c,f/2,d,f);a.lineTo(c,f);a.quadTo(c-2*c,f/2,c,0);a.close();a.end()};mxCellRenderer.registerShape("dataStorage",B);mxUtils.extend(ca,
+mxActor);ca.prototype.redrawPath=function(a,c,b,d,f){a.moveTo(0,0);a.quadTo(d,0,d,f/2);a.quadTo(d,f,0,f);a.close();a.end()};mxCellRenderer.registerShape("or",ca);mxUtils.extend(V,mxActor);V.prototype.redrawPath=function(a,c,b,d,f){a.moveTo(0,0);a.quadTo(d,0,d,f/2);a.quadTo(d,f,0,f);a.quadTo(d/2,f/2,0,0);a.close();a.end()};mxCellRenderer.registerShape("xor",V);mxUtils.extend(X,mxActor);X.prototype.size=20;X.prototype.isRoundable=function(){return!0};X.prototype.redrawPath=function(a,c,b,d,f){c=Math.min(d/
+2,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(c,0),new mxPoint(d-c,0),new mxPoint(d,.8*c),new mxPoint(d,f),new mxPoint(0,f),new mxPoint(0,.8*c)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("loopLimit",X);mxUtils.extend(aa,mxActor);aa.prototype.size=.375;aa.prototype.isRoundable=function(){return!0};aa.prototype.redrawPath=function(a,c,b,d,f){c=
+f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,f-c),new mxPoint(d/2,f),new mxPoint(0,f-c)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("offPageConnector",aa);mxUtils.extend(da,mxEllipse);da.prototype.paintVertexShape=function(a,c,b,d,f){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();
+a.moveTo(c+d/2,b+f);a.lineTo(c+d,b+f);a.end();a.stroke()};mxCellRenderer.registerShape("tapeData",da);mxUtils.extend(Y,mxEllipse);Y.prototype.paintVertexShape=function(a,c,b,d,f){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(c,b+f/2);a.lineTo(c+d,b+f/2);a.end();a.stroke();a.begin();a.moveTo(c+d/2,b);a.lineTo(c+d/2,b+f);a.end();a.stroke()};mxCellRenderer.registerShape("orEllipse",Y);mxUtils.extend(pa,mxEllipse);pa.prototype.paintVertexShape=function(a,
+c,b,d,f){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(c+.145*d,b+.145*f);a.lineTo(c+.855*d,b+.855*f);a.end();a.stroke();a.begin();a.moveTo(c+.855*d,b+.145*f);a.lineTo(c+.145*d,b+.855*f);a.end();a.stroke()};mxCellRenderer.registerShape("sumEllipse",pa);mxUtils.extend(ra,mxRhombus);ra.prototype.paintVertexShape=function(a,c,b,d,f){mxRhombus.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(c,b+f/2);a.lineTo(c+d,b+f/2);
+a.end();a.stroke()};mxCellRenderer.registerShape("sortShape",ra);mxUtils.extend(ja,mxEllipse);ja.prototype.paintVertexShape=function(a,c,b,d,f){a.begin();a.moveTo(c,b);a.lineTo(c+d,b);a.lineTo(c+d/2,b+f/2);a.close();a.fillAndStroke();a.begin();a.moveTo(c,b+f);a.lineTo(c+d,b+f);a.lineTo(c+d/2,b+f/2);a.close();a.fillAndStroke()};mxCellRenderer.registerShape("collate",ja);mxUtils.extend(ma,mxEllipse);ma.prototype.paintVertexShape=function(a,c,b,d,f){var e=b+f-5;a.begin();a.moveTo(c,b);a.lineTo(c,b+f);
+a.moveTo(c,e);a.lineTo(c+10,e-5);a.moveTo(c,e);a.lineTo(c+10,e+5);a.moveTo(c,e);a.lineTo(c+d,e);a.moveTo(c+d,b);a.lineTo(c+d,b+f);a.moveTo(c+d,e);a.lineTo(c+d-10,e-5);a.moveTo(c+d,e);a.lineTo(c+d-10,e+5);a.end();a.stroke()};mxCellRenderer.registerShape("dimension",ma);mxUtils.extend(ua,mxEllipse);ua.prototype.paintVertexShape=function(a,c,b,d,f){this.outline||a.setStrokeColor(null);mxRectangleShape.prototype.paintBackground.apply(this,arguments);null!=this.style&&(a.setStrokeColor(this.stroke),a.rect(c,
+b,d,f),a.fill(),a.begin(),a.moveTo(c,b),"1"==mxUtils.getValue(this.style,"top","1")?a.lineTo(c+d,b):a.moveTo(c+d,b),"1"==mxUtils.getValue(this.style,"right","1")?a.lineTo(c+d,b+f):a.moveTo(c+d,b+f),"1"==mxUtils.getValue(this.style,"bottom","1")?a.lineTo(c,b+f):a.moveTo(c,b+f),"1"==mxUtils.getValue(this.style,"left","1")&&a.lineTo(c,b-this.strokewidth/2),a.end(),a.stroke())};mxCellRenderer.registerShape("partialRectangle",ua);mxUtils.extend(ia,mxEllipse);ia.prototype.paintVertexShape=function(a,c,
+b,d,f){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();"vertical"==mxUtils.getValue(this.style,"line")?(a.moveTo(c+d/2,b),a.lineTo(c+d/2,b+f)):(a.moveTo(c,b+f/2),a.lineTo(c+d,b+f/2));a.end();a.stroke()};mxCellRenderer.registerShape("lineEllipse",ia);mxUtils.extend(sa,mxActor);sa.prototype.redrawPath=function(a,c,b,d,f){c=Math.min(d,f/2);a.moveTo(0,0);a.lineTo(d-c,0);a.quadTo(d,0,d,f/2);a.quadTo(d,f,d-c,f);a.lineTo(0,f);a.close();a.end()};mxCellRenderer.registerShape("delay",
+sa);mxUtils.extend(ga,mxActor);ga.prototype.size=.2;ga.prototype.redrawPath=function(a,c,b,d,f){c=Math.min(f,d);var e=Math.max(0,Math.min(c,c*parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=(f-e)/2;b=c+e;var g=(d-e)/2,e=g+e;a.moveTo(0,c);a.lineTo(g,c);a.lineTo(g,0);a.lineTo(e,0);a.lineTo(e,c);a.lineTo(d,c);a.lineTo(d,b);a.lineTo(e,b);a.lineTo(e,f);a.lineTo(g,f);a.lineTo(g,b);a.lineTo(0,b);a.close();a.end()};mxCellRenderer.registerShape("cross",ga);mxUtils.extend(ea,mxActor);ea.prototype.size=
+.25;ea.prototype.redrawPath=function(a,c,b,d,f){c=Math.min(d,f/2);b=Math.min(d-c,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*d);a.moveTo(0,f/2);a.lineTo(b,0);a.lineTo(d-c,0);a.quadTo(d,0,d,f/2);a.quadTo(d,f,d-c,f);a.lineTo(b,f);a.close();a.end()};mxCellRenderer.registerShape("display",ea);mxUtils.extend(ba,mxConnector);ba.prototype.origPaintEdgeShape=ba.prototype.paintEdgeShape;ba.prototype.paintEdgeShape=function(a,c,b){for(var d=[],f=0;f<c.length;f++)d.push(mxUtils.clone(c[f]));
+var f=a.state.dashed,e=a.state.fixDash;ba.prototype.origPaintEdgeShape.apply(this,[a,d,b]);3<=a.state.strokeWidth&&(d=mxUtils.getValue(this.style,"fillColor",null),null!=d&&(a.setStrokeColor(d),a.setStrokeWidth(a.state.strokeWidth-2),a.setDashed(f,e),ba.prototype.origPaintEdgeShape.apply(this,[a,c,b])))};mxCellRenderer.registerShape("filledEdge",ba);"undefined"!==typeof StyleFormatPanel&&function(){var a=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var c=
+this.format.getSelectionState(),b=a.apply(this,arguments);"umlFrame"==c.style.shape&&b.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"#ffffff"});return b}}();mxMarker.addMarker("dash",function(a,c,b,d,f,e,g,h,n,m){var r=f*(g+n+1),u=e*(g+n+1);return function(){a.begin();a.moveTo(d.x-r/2-u/2,d.y-u/2+r/2);a.lineTo(d.x+u/2-3*r/2,d.y-3*u/2-r/2);a.stroke()}});mxMarker.addMarker("cross",function(a,c,b,d,f,e,g,h,n,m){var r=f*(g+n+1),u=e*(g+n+1);return function(){a.begin();
+a.moveTo(d.x-r/2-u/2,d.y-u/2+r/2);a.lineTo(d.x+u/2-3*r/2,d.y-3*u/2-r/2);a.moveTo(d.x-r/2+u/2,d.y-u/2-r/2);a.lineTo(d.x-u/2-3*r/2,d.y-3*u/2+r/2);a.stroke()}});mxMarker.addMarker("circle",xa);mxMarker.addMarker("circlePlus",function(a,c,b,d,f,e,g,h,n,m){var r=d.clone(),u=xa.apply(this,arguments),x=f*(g+2*n),k=e*(g+2*n);return function(){u.apply(this,arguments);a.begin();a.moveTo(r.x-f*n,r.y-e*n);a.lineTo(r.x-2*x+f*n,r.y-2*k+e*n);a.moveTo(r.x-x-k+e*n,r.y-k+x-f*n);a.lineTo(r.x+k-x-e*n,r.y-k-x+f*n);a.stroke()}});
+mxMarker.addMarker("async",function(a,c,b,d,f,e,g,h,n,m){c=f*n*1.118;b=e*n*1.118;f*=g+n;e*=g+n;var r=d.clone();r.x-=c;r.y-=b;d.x+=1*-f-c;d.y+=1*-e-b;return function(){a.begin();a.moveTo(r.x,r.y);h?a.lineTo(r.x-f-e/2,r.y-e+f/2):a.lineTo(r.x+e/2-f,r.y-e-f/2);a.lineTo(r.x-f,r.y-e);a.close();m?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync",function(a){a=null!=a?a:2;return function(c,b,d,f,e,g,h,n,m,r){e*=h+m;g*=h+m;var u=f.clone();return function(){c.begin();c.moveTo(u.x,u.y);n?c.lineTo(u.x-
+e-g/a,u.y-g+e/a):c.lineTo(u.x+g/a-e,u.y-g-e/a);c.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Ea=function(a,c,b){return ta(a,["width"],c,function(c,d,f,e,g){g=a.shape.getEdgeWidth()*a.view.scale+b;return new mxPoint(e.x+d*c/4+f*g/2,e.y+f*c/4-d*g/2)},function(c,d,f,e,g,h){c=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,h.x,h.y));a.style.width=Math.round(2*c)/a.view.scale-b})},ta=function(a,c,b,d,f){return P(a,c,function(c){var f=a.absolutePoints,e=f.length-1;c=a.view.translate;var g=
+a.view.scale,h=b?f[0]:f[e],f=b?f[1]:f[e-1],e=f.x-h.x,n=f.y-h.y,m=Math.sqrt(e*e+n*n),h=d.call(this,m,e/m,n/m,h,f);return new mxPoint(h.x/g-c.x,h.y/g-c.y)},function(c,d,e){var g=a.absolutePoints,h=g.length-1;c=a.view.translate;var n=a.view.scale,m=b?g[0]:g[h],g=b?g[1]:g[h-1],h=g.x-m.x,r=g.y-m.y,u=Math.sqrt(h*h+r*r);d.x=(d.x+c.x)*n;d.y=(d.y+c.y)*n;f.call(this,u,h/u,r/u,m,g,d,e)})},oa=function(a){return function(c){return[P(c,["arrowWidth","arrowSize"],function(c){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
+"arrowWidth",R.prototype.arrowWidth))),d=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",R.prototype.arrowSize)));return new mxPoint(c.x+(1-d)*c.width,c.y+(1-b)*c.height/2)},function(c,b){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(c.y+c.height/2-b.y)/c.height*2));this.state.style.arrowSize=Math.max(0,Math.min(a,(c.x+c.width-b.x)/c.width))})]}},Ca=function(a,c,b){return function(d){var f=[P(d,["size"],function(b){var d=Math.max(0,Math.min(b.width,Math.min(b.height,
+parseFloat(mxUtils.getValue(this.state.style,"size",c)))))*a;return new mxPoint(b.x+d,b.y+d)},function(c,b){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(c.width,b.x-c.x),Math.min(c.height,b.y-c.y)))/a)})];b&&mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&f.push(ka(d));return f}},ya=function(a,c,b,d,f){b=null!=b?b:1;return function(e){var g=[P(e,["size"],function(c){var b=null!=f?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,d=parseFloat(mxUtils.getValue(this.state.style,
+"size",b?f:a));return new mxPoint(c.x+Math.max(0,Math.min(c.width,d*(b?1:c.width))),c.getCenterY())},function(a,c,d){var g=null!=f?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null;a=g?c.x-a.x:Math.max(0,Math.min(b,(c.x-a.x)/a.width));g&&!mxEvent.isAltDown(d.getEvent())&&(a=e.view.graph.snap(a));this.state.style.size=a},null,d)];c&&mxUtils.getValue(e.style,mxConstants.STYLE_ROUNDED,!1)&&g.push(ka(e));return g}},Fa=function(a){return function(c){var b=[P(c,["size"],function(c){var b=Math.max(0,
+Math.min(a,parseFloat(mxUtils.getValue(this.state.style,"size",g.prototype.size))));return new mxPoint(c.x+b*c.width*.75,c.y+c.height/4)},function(c,b){this.state.style.size=Math.max(0,Math.min(a,(b.x-c.x)/(.75*c.width)))},null,!0)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ka(c));return b}},wa=function(){return function(a){var c=[];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(ka(a));return c}},ka=function(a,c){return P(a,[mxConstants.STYLE_ARCSIZE],function(b){var d=
null!=c?c:b.height/8;if("1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var f=mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(b.x+b.width-Math.min(b.width/2,f),b.y+d)}f=Math.max(0,parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(b.x+b.width-Math.min(Math.max(b.width/2,b.height/2),Math.min(b.width,b.height)*f),b.y+d)},function(c,b,d){"1"==mxUtils.getValue(a.style,
mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(c.width,2*(c.x+c.width-b.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(c.width-b.x+c.x)/Math.min(c.width,c.height))))})},P=function(a,c,b,d,f,e){var g=new mxHandle(a,null,mxVertexHandler.prototype.secondaryHandleImage);g.execute=function(){for(var a=0;a<c.length;a++)this.copyStyle(c[a])};g.getPosition=b;g.setPosition=d;g.ignoreGrid=null!=f?f:!0;
-if(e){var h=g.positionChanged;g.positionChanged=function(){h.apply(this,arguments);a.view.invalidate(this.state.cell);a.view.validate()}}return g},ya={link:function(a){return[Ea(a,!0,10),Ea(a,!1,10)]},flexArrow:function(a){var c=a.view.graph.gridSize/a.view.scale,b=[];mxUtils.getValue(a.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(b.push(ta(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(c,b,d,f,e){c=(a.shape.getEdgeWidth()-a.shape.strokewidth)*
+if(e){var h=g.positionChanged;g.positionChanged=function(){h.apply(this,arguments);a.view.invalidate(this.state.cell);a.view.validate()}}return g},za={link:function(a){return[Ea(a,!0,10),Ea(a,!1,10)]},flexArrow:function(a){var c=a.view.graph.gridSize/a.view.scale,b=[];mxUtils.getValue(a.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(b.push(ta(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(c,b,d,f,e){c=(a.shape.getEdgeWidth()-a.shape.strokewidth)*
a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(f.x+b*(e+a.shape.strokewidth*a.view.scale)+d*c/2,f.y+d*(e+a.shape.strokewidth*a.view.scale)-b*c/2)},function(b,d,f,e,g,h,n){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,h.x,h.y));d=mxUtils.ptLineDist(e.x,e.y,e.x+f,e.y-d,h.x,h.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*b)/a.view.scale;mxEvent.isControlDown(n.getEvent())&&
(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]);mxEvent.isAltDown(n.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<c/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE])})),b.push(ta(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(c,b,d,f,e){c=(a.shape.getStartArrowWidth()-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,
mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(f.x+b*(e+a.shape.strokewidth*a.view.scale)+d*c/2,f.y+d*(e+a.shape.strokewidth*a.view.scale)-b*c/2)},function(b,d,f,e,g,h,n){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,h.x,h.y));d=mxUtils.ptLineDist(e.x,e.y,e.x+f,e.y-d,h.x,h.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.startWidth=Math.max(0,Math.round(2*b)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(n.getEvent())&&
@@ -2548,47 +2548,47 @@ e.x+f,e.y-d,h.x,h.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(d-a.shap
["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(c,b,d,f,e){c=(a.shape.getEndArrowWidth()-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(f.x+b*(e+a.shape.strokewidth*a.view.scale)-d*c/2,f.y+d*(e+a.shape.strokewidth*a.view.scale)+b*c/2)},function(b,d,f,e,g,h,n){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,h.x,h.y));d=mxUtils.ptLineDist(e.x,e.y,e.x+f,e.y-
d,h.x,h.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.endWidth=Math.max(0,Math.round(2*b)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(n.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE],a.style.startWidth=a.style.endWidth);mxEvent.isAltDown(n.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<c/6&&(a.style[mxConstants.STYLE_ENDSIZE]=
a.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(a.style.endWidth)-parseFloat(a.style.startWidth))<c&&(a.style.endWidth=a.style.startWidth))})));return b},swimlane:function(a){var c=[P(a,[mxConstants.STYLE_STARTSIZE],function(c){var b=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(a.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(c.getCenterX(),c.y+Math.max(0,Math.min(c.height,b))):new mxPoint(c.x+Math.max(0,Math.min(c.width,
-b)),c.getCenterY())},function(c,b){a.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(c.height,b.y-c.y))):Math.round(Math.max(0,Math.min(c.width,b.x-c.x)))})];if(mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED)){var b=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));c.push(ja(a,b/2))}return c},label:va(),ext:va(),rectangle:va(),triangle:va(),rhombus:va(),umlLifeline:function(a){return[P(a,
+b)),c.getCenterY())},function(c,b){a.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(c.height,b.y-c.y))):Math.round(Math.max(0,Math.min(c.width,b.x-c.x)))})];if(mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED)){var b=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));c.push(ka(a,b/2))}return c},label:wa(),ext:wa(),rectangle:wa(),triangle:wa(),rhombus:wa(),umlLifeline:function(a){return[P(a,
["size"],function(a){var c=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",A.prototype.size))));return new mxPoint(a.getCenterX(),a.y+c)},function(a,c){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))},!1)]},umlFrame:function(a){return[P(a,["width","height"],function(a){var c=Math.max(I.prototype.corner,Math.min(a.width,mxUtils.getValue(this.state.style,"width",I.prototype.width))),b=Math.max(1.5*I.prototype.corner,Math.min(a.height,mxUtils.getValue(this.state.style,
"height",I.prototype.height)));return new mxPoint(a.x+c,a.y+b)},function(a,c){this.state.style.width=Math.round(Math.max(I.prototype.corner,Math.min(a.width,c.x-a.x)));this.state.style.height=Math.round(Math.max(1.5*I.prototype.corner,Math.min(a.height,c.y-a.y)))},!1)]},process:function(a){var c=[P(a,["size"],function(a){var c=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style,"size",m.prototype.size))));return new mxPoint(a.x+a.width*c,a.y+a.height/4)},function(a,c){this.state.style.size=
-Math.max(0,Math.min(.5,(c.x-a.x)/a.width))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(ja(a));return c},cross:function(a){return[P(a,["size"],function(a){var c=Math.min(a.width,a.height),c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",ca.prototype.size)))*c/2;return new mxPoint(a.getCenterX()-c,a.getCenterY()-c)},function(a,c){var b=Math.min(a.width,a.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,a.getCenterY()-c.y)/b*2,Math.max(0,a.getCenterX()-
-c.x)/b*2)))})]},note:function(a){return[P(a,["size"],function(a){var c=Math.max(0,Math.min(a.width,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",k.prototype.size)))));return new mxPoint(a.x+a.width-c,a.y+c)},function(a,c){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(a.width,a.x+a.width-c.x),Math.min(a.height,c.y-a.y))))})]},manualInput:function(a){var c=[P(a,["size"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",K.prototype.size)));
-return new mxPoint(a.x+a.width/4,a.y+3*c/4)},function(a,c){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,4*(c.y-a.y)/3)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(ja(a));return c},dataStorage:function(a){return[P(a,["size"],function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",R.prototype.size))));return new mxPoint(a.x+(1-c)*a.width,a.getCenterY())},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(a.x+a.width-
+Math.max(0,Math.min(.5,(c.x-a.x)/a.width))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(ka(a));return c},cross:function(a){return[P(a,["size"],function(a){var c=Math.min(a.width,a.height),c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",ga.prototype.size)))*c/2;return new mxPoint(a.getCenterX()-c,a.getCenterY()-c)},function(a,c){var b=Math.min(a.width,a.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,a.getCenterY()-c.y)/b*2,Math.max(0,a.getCenterX()-
+c.x)/b*2)))})]},note:function(a){return[P(a,["size"],function(a){var c=Math.max(0,Math.min(a.width,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",k.prototype.size)))));return new mxPoint(a.x+a.width-c,a.y+c)},function(a,c){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(a.width,a.x+a.width-c.x),Math.min(a.height,c.y-a.y))))})]},manualInput:function(a){var c=[P(a,["size"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",L.prototype.size)));
+return new mxPoint(a.x+a.width/4,a.y+3*c/4)},function(a,c){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,4*(c.y-a.y)/3)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(ka(a));return c},dataStorage:function(a){return[P(a,["size"],function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",B.prototype.size))));return new mxPoint(a.x+(1-c)*a.width,a.getCenterY())},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(a.x+a.width-
c.x)/a.width))})]},callout:function(a){var c=[P(a,["size","position"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",v.prototype.size))),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",v.prototype.position)));mxUtils.getValue(this.state.style,"base",v.prototype.base);return new mxPoint(a.x+b*a.width,a.y+a.height-c)},function(a,c){mxUtils.getValue(this.state.style,"base",v.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(a.height,
a.y+a.height-c.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(c.x-a.x)/a.width)))/100}),P(a,["position2"],function(a){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",v.prototype.position2)));return new mxPoint(a.x+c*a.width,a.y+a.height)},function(a,c){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(c.x-a.x)/a.width)))/100}),P(a,["base"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",v.prototype.size))),
b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",v.prototype.position))),d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"base",v.prototype.base)));return new mxPoint(a.x+Math.min(a.width,b*a.width+d),a.y+a.height-c)},function(a,c){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",v.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(a.width,c.x-a.x-b*a.width)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,
-!1)&&c.push(ja(a));return c},internalStorage:function(a){var c=[P(a,["dx","dy"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",F.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",F.prototype.dy)));return new mxPoint(a.x+c,a.y+b)},function(a,c){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,c.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,
-!1)&&c.push(ja(a));return c},corner:function(a){return[P(a,["dx","dy"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",S.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",S.prototype.dy)));return new mxPoint(a.x+c,a.y+b)},function(a,c){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,c.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))})]},tee:function(a){return[P(a,["dx","dy"],function(a){var c=
+!1)&&c.push(ka(a));return c},internalStorage:function(a){var c=[P(a,["dx","dy"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",F.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",F.prototype.dy)));return new mxPoint(a.x+c,a.y+b)},function(a,c){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,c.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,
+!1)&&c.push(ka(a));return c},corner:function(a){return[P(a,["dx","dy"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",S.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",S.prototype.dy)));return new mxPoint(a.x+c,a.y+b)},function(a,c){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,c.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))})]},tee:function(a){return[P(a,["dx","dy"],function(a){var c=
Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",M.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",M.prototype.dy)));return new mxPoint(a.x+(a.width+c)/2,a.y+b)},function(a,c){this.state.style.dx=Math.round(Math.max(0,2*Math.min(a.width/2,c.x-a.x-a.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))})]},singleArrow:oa(1),doubleArrow:oa(.5),folder:function(a){return[P(a,["tabWidth","tabHeight"],function(a){var c=
Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"tabWidth",p.prototype.tabWidth))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"tabHeight",p.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",p.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(c=a.width-c);return new mxPoint(a.x+c,a.y+b)},function(a,c){var b=Math.max(0,Math.min(a.width,c.x-a.x));mxUtils.getValue(this.state.style,"tabPosition",p.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&
(b=a.width-b);this.state.style.tabWidth=Math.round(b);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))})]},document:function(a){return[P(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",c.prototype.size))));return new mxPoint(a.x+3*a.width/4,a.y+(1-b)*a.height)},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-c.y)/a.height))})]},tape:function(a){return[P(a,["size"],function(a){var c=Math.max(0,
-Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",u.prototype.size))));return new mxPoint(a.getCenterX(),a.y+c*a.height/2)},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(c.y-a.y)/a.height*2))})]},offPageConnector:function(a){return[P(a,["size"],function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",aa.prototype.size))));return new mxPoint(a.getCenterX(),a.y+(1-c)*a.height)},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(a.y+
-a.height-c.y)/a.height))})]},step:xa(D.prototype.size,!0,null,!0,D.prototype.fixedSize),hexagon:xa(x.prototype.size,!0,.5,!0),curlyBracket:xa(n.prototype.size,!1),display:xa(da.prototype.size,!1),cube:Ca(1,a.prototype.size,!1),card:Ca(.5,q.prototype.size,!0),loopLimit:Ca(.5,W.prototype.size,!0),trapezoid:Fa(.5),parallelogram:Fa(1)};Graph.createHandle=P;Graph.handleFactory=ya;mxVertexHandler.prototype.createCustomHandles=function(){if(1==this.state.view.graph.getSelectionCount()&&this.graph.isCellRotatable(this.state.cell)){var a=
-this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_RECTANGLE);a=ya[a];null==a&&null!=this.state.shape&&this.state.shape.isRoundable()&&(a=ya[mxConstants.SHAPE_RECTANGLE]);if(null!=a)return a(this.state)}return null};mxEdgeHandler.prototype.createCustomHandles=function(){if(1==this.state.view.graph.getSelectionCount()){var a=this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=
-mxConstants.SHAPE_CONNECTOR);a=ya[a];if(null!=a)return a(this.state)}return null}}else Graph.createHandle=function(){},Graph.handleFactory={};var za=new mxPoint(1,0),Aa=new mxPoint(1,0),oa=mxUtils.toRadians(-30),za=mxUtils.getRotatedPoint(za,Math.cos(oa),Math.sin(oa)),oa=mxUtils.toRadians(-150),Aa=mxUtils.getRotatedPoint(Aa,Math.cos(oa),Math.sin(oa));mxEdgeStyle.IsometricConnector=function(a,c,b,d,f){var e=a.view;d=null!=d&&0<d.length?d[0]:null;var g=a.absolutePoints,h=g[0],g=g[g.length-1];null!=
-d&&(d=e.transformControlPoint(a,d));null==h&&null!=c&&(h=new mxPoint(c.getCenterX(),c.getCenterY()));null==g&&null!=b&&(g=new mxPoint(b.getCenterX(),b.getCenterY()));var n=za.x,m=za.y,r=Aa.x,t=Aa.y,x="horizontal"==mxUtils.getValue(a.style,"elbow","horizontal");if(null!=g&&null!=h){a=function(a,c,b){a-=v.x;var d=c-v.y;c=(t*a-r*d)/(n*t-m*r);a=(m*a-n*d)/(m*r-n*t);x?(b&&(v=new mxPoint(v.x+n*c,v.y+m*c),f.push(v)),v=new mxPoint(v.x+r*a,v.y+t*a)):(b&&(v=new mxPoint(v.x+r*a,v.y+t*a),f.push(v)),v=new mxPoint(v.x+
-n*c,v.y+m*c));f.push(v)};var v=h;null==d&&(d=new mxPoint(h.x+(g.x-h.x)/2,h.y+(g.y-h.y)/2));a(d.x,d.y,!0);a(g.x,g.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var La=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(a,c){if(c==mxEdgeStyle.IsometricConnector){var b=new mxElbowEdgeHandler(a);b.snapToTerminals=!1;return b}return La.apply(this,arguments)};b.prototype.constraints=[];e.prototype.constraints=[];v.prototype.constraints=[];
+Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",t.prototype.size))));return new mxPoint(a.getCenterX(),a.y+c*a.height/2)},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(c.y-a.y)/a.height*2))})]},offPageConnector:function(a){return[P(a,["size"],function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",aa.prototype.size))));return new mxPoint(a.getCenterX(),a.y+(1-c)*a.height)},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(a.y+
+a.height-c.y)/a.height))})]},step:ya(E.prototype.size,!0,null,!0,E.prototype.fixedSize),hexagon:ya(x.prototype.size,!0,.5,!0),curlyBracket:ya(n.prototype.size,!1),display:ya(ea.prototype.size,!1),cube:Ca(1,a.prototype.size,!1),card:Ca(.5,q.prototype.size,!0),loopLimit:Ca(.5,X.prototype.size,!0),trapezoid:Fa(.5),parallelogram:Fa(1)};Graph.createHandle=P;Graph.handleFactory=za;mxVertexHandler.prototype.createCustomHandles=function(){if(1==this.state.view.graph.getSelectionCount()&&this.graph.isCellRotatable(this.state.cell)){var a=
+this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_RECTANGLE);a=za[a];null==a&&null!=this.state.shape&&this.state.shape.isRoundable()&&(a=za[mxConstants.SHAPE_RECTANGLE]);if(null!=a)return a(this.state)}return null};mxEdgeHandler.prototype.createCustomHandles=function(){if(1==this.state.view.graph.getSelectionCount()){var a=this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=
+mxConstants.SHAPE_CONNECTOR);a=za[a];if(null!=a)return a(this.state)}return null}}else Graph.createHandle=function(){},Graph.handleFactory={};var Aa=new mxPoint(1,0),Ba=new mxPoint(1,0),oa=mxUtils.toRadians(-30),Aa=mxUtils.getRotatedPoint(Aa,Math.cos(oa),Math.sin(oa)),oa=mxUtils.toRadians(-150),Ba=mxUtils.getRotatedPoint(Ba,Math.cos(oa),Math.sin(oa));mxEdgeStyle.IsometricConnector=function(a,c,b,d,f){var e=a.view;d=null!=d&&0<d.length?d[0]:null;var g=a.absolutePoints,h=g[0],g=g[g.length-1];null!=
+d&&(d=e.transformControlPoint(a,d));null==h&&null!=c&&(h=new mxPoint(c.getCenterX(),c.getCenterY()));null==g&&null!=b&&(g=new mxPoint(b.getCenterX(),b.getCenterY()));var n=Aa.x,m=Aa.y,r=Ba.x,u=Ba.y,x="horizontal"==mxUtils.getValue(a.style,"elbow","horizontal");if(null!=g&&null!=h){a=function(a,c,b){a-=k.x;var d=c-k.y;c=(u*a-r*d)/(n*u-m*r);a=(m*a-n*d)/(m*r-n*u);x?(b&&(k=new mxPoint(k.x+n*c,k.y+m*c),f.push(k)),k=new mxPoint(k.x+r*a,k.y+u*a)):(b&&(k=new mxPoint(k.x+r*a,k.y+u*a),f.push(k)),k=new mxPoint(k.x+
+n*c,k.y+m*c));f.push(k)};var k=h;null==d&&(d=new mxPoint(h.x+(g.x-h.x)/2,h.y+(g.y-h.y)/2));a(d.x,d.y,!0);a(g.x,g.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var La=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(a,c){if(c==mxEdgeStyle.IsometricConnector){var b=new mxElbowEdgeHandler(a);b.snapToTerminals=!1;return b}return La.apply(this,arguments)};b.prototype.constraints=[];e.prototype.constraints=[];v.prototype.constraints=[];
mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,
1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,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))];mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;t.prototype.constraints=mxRectangleShape.prototype.constraints;k.prototype.constraints=mxRectangleShape.prototype.constraints;q.prototype.constraints=mxRectangleShape.prototype.constraints;a.prototype.constraints=mxRectangleShape.prototype.constraints;p.prototype.constraints=mxRectangleShape.prototype.constraints;
-F.prototype.constraints=mxRectangleShape.prototype.constraints;R.prototype.constraints=mxRectangleShape.prototype.constraints;Z.prototype.constraints=mxEllipse.prototype.constraints;pa.prototype.constraints=mxEllipse.prototype.constraints;qa.prototype.constraints=mxEllipse.prototype.constraints;sa.prototype.constraints=mxEllipse.prototype.constraints;K.prototype.constraints=mxRectangleShape.prototype.constraints;ha.prototype.constraints=mxRectangleShape.prototype.constraints;da.prototype.constraints=
-mxRectangleShape.prototype.constraints;W.prototype.constraints=mxRectangleShape.prototype.constraints;aa.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,
+.5))];mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;u.prototype.constraints=mxRectangleShape.prototype.constraints;k.prototype.constraints=mxRectangleShape.prototype.constraints;q.prototype.constraints=mxRectangleShape.prototype.constraints;a.prototype.constraints=mxRectangleShape.prototype.constraints;p.prototype.constraints=mxRectangleShape.prototype.constraints;
+F.prototype.constraints=mxRectangleShape.prototype.constraints;B.prototype.constraints=mxRectangleShape.prototype.constraints;da.prototype.constraints=mxEllipse.prototype.constraints;Y.prototype.constraints=mxEllipse.prototype.constraints;pa.prototype.constraints=mxEllipse.prototype.constraints;ia.prototype.constraints=mxEllipse.prototype.constraints;L.prototype.constraints=mxRectangleShape.prototype.constraints;sa.prototype.constraints=mxRectangleShape.prototype.constraints;ea.prototype.constraints=
+mxRectangleShape.prototype.constraints;X.prototype.constraints=mxRectangleShape.prototype.constraints;aa.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,
.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];N.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75,.1),!1),new mxConnectionConstraint(new mxPoint(0,1/3),!1),new mxConnectionConstraint(new mxPoint(0,
1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1,1),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1)];H.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)];u.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)];D.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,
+1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];t.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)];E.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)];O.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];mxDoubleEllipse.prototype.constraints=
mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0)];mxHexagon.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.375,
0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.625,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.375,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),
!0),new mxConnectionConstraint(new mxPoint(.625,1),!0)];mxCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.25),!1),new mxConnectionConstraint(new mxPoint(.4,.1),!1),new mxConnectionConstraint(new mxPoint(.16,.55),!1),new mxConnectionConstraint(new mxPoint(.07,.4),!1),new mxConnectionConstraint(new mxPoint(.31,.8),!1),new mxConnectionConstraint(new mxPoint(.13,.77),!1),new mxConnectionConstraint(new mxPoint(.8,.8),!1),new mxConnectionConstraint(new mxPoint(.55,.95),!1),new mxConnectionConstraint(new mxPoint(.875,
.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];f.prototype.constraints=mxRectangleShape.prototype.constraints;g.prototype.constraints=mxRectangleShape.prototype.constraints;c.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,
-.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;M.prototype.constraints=null;S.prototype.constraints=null;L.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,
-1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];T.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];E.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),
-new mxConnectionConstraint(new mxPoint(1,.5),!1)];ca.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];A.prototype.constraints=null;V.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)];ga.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)];X.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
-.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];U.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})();function Actions(a){this.editorUi=a;this.actions={};this.init()}
+.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;M.prototype.constraints=null;S.prototype.constraints=null;J.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,
+1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];R.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];ha.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),
+new mxConnectionConstraint(new mxPoint(1,.5),!1)];ga.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];A.prototype.constraints=null;ca.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)];V.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)];U.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
+.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];T.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})();function Actions(a){this.editorUi=a;this.actions={};this.init()}
Actions.prototype.init=function(){function a(a){d.escape();var b=d.getDeletableCells(d.getSelectionCells());if(null!=b&&0<b.length){var c=d.model.getParents(b);d.removeCells(b,a);if(null!=c){a=[];for(b=0;b<c.length;b++)d.model.contains(c[b])&&(d.model.isVertex(c[b])||d.model.isEdge(c[b]))&&a.push(c[b]);d.setSelectionCells(a)}}}var b=this.editorUi,e=b.editor,d=e.graph,k=function(){return Action.prototype.isEnabled.apply(this,arguments)&&d.isEnabled()};this.addAction("new...",function(){d.openLink(b.getUrl())});
this.addAction("open...",function(){window.openNew=!0;window.openKey="open";b.openFile()});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){b.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(a,b){try{var c=mxUtils.parseXml(a);e.graph.setSelectionCells(e.graph.importGraphModel(c.documentElement))}catch(f){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+f.message)}}));b.showDialog((new OpenDialog(this)).container,
320,220,!0,!0,function(){window.openFile=null})}).isEnabled=k;this.addAction("save",function(){b.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=k;this.addAction("saveAs...",function(){b.saveFile(!0)},null,null,Editor.ctrlKey+"+Shift+S").isEnabled=k;this.addAction("export...",function(){b.showDialog((new ExportDialog(b)).container,300,230,!0,!0)});this.addAction("editDiagram...",function(){var a=new EditDiagramDialog(b);b.showDialog(a.container,620,420,!0,!1);a.init()});this.addAction("pageSetup...",
@@ -2635,7 +2635,7 @@ d.getCellGeometry(a);g=Math.round(d.snap(d.popupMenuHandler.triggerX/f-g));f=Mat
d.getCellGeometry(c);null!=f&&(f=f.clone(),f.points=null,d.getModel().setGeometry(c,f))}}}finally{d.getModel().endUpdate()}}},null,null,"Alt+Shift+C");l=this.addAction("subscript",mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");l=this.addAction("superscript",mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");this.addAction("image...",
function(){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){var a=mxResources.get("image")+" ("+mxResources.get("url")+"):",e=d.getView().getState(d.getSelectionCell()),c="";null!=e&&(c=e.style[mxConstants.STYLE_IMAGE]||c);var f=d.cellEditor.saveSelection();b.showImageDialog(a,c,function(a,c,b){if(d.cellEditor.isContentEditing())d.cellEditor.restoreSelection(f),d.insertImage(a,c,b);else{var e=d.getSelectionCells();if(null!=a&&(0<a.length||0<e.length)){var g=null;d.getModel().beginUpdate();
try{if(0==e.length){var n=d.getFreeInsertPoint(),g=e=[d.insertVertex(d.getDefaultParent(),null,"",n.x,n.y,c,b,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];d.fireEvent(new mxEventObject("cellsInserted","cells",g))}d.setCellStyles(mxConstants.STYLE_IMAGE,0<a.length?a:null,e);var r=d.view.getState(e[0]),k=null!=r?r.style:d.getCellStyle(e[0]);"image"!=k[mxConstants.STYLE_SHAPE]&&"label"!=k[mxConstants.STYLE_SHAPE]?d.setCellStyles(mxConstants.STYLE_SHAPE,"image",
-e):0==a.length&&d.setCellStyles(mxConstants.STYLE_SHAPE,null,e);if(1==d.getSelectionCount()&&null!=c&&null!=b){var x=e[0],t=d.getModel().getGeometry(x);null!=t&&(t=t.clone(),t.width=c,t.height=b,d.getModel().setGeometry(x,t))}}finally{d.getModel().endUpdate()}null!=g&&(d.setSelectionCells(g),d.scrollCellToVisible(g[0]))}}},d.cellEditor.isContentEditing(),!d.cellEditor.isContentEditing())}}).isEnabled=k;this.addAction("insertImage...",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&
+e):0==a.length&&d.setCellStyles(mxConstants.STYLE_SHAPE,null,e);if(1==d.getSelectionCount()&&null!=c&&null!=b){var x=e[0],u=d.getModel().getGeometry(x);null!=u&&(u=u.clone(),u.width=c,u.height=b,d.getModel().setGeometry(x,u))}}finally{d.getModel().endUpdate()}null!=g&&(d.setSelectionCells(g),d.scrollCellToVisible(g[0]))}}},d.cellEditor.isContentEditing(),!d.cellEditor.isContentEditing())}}).isEnabled=k;this.addAction("insertImage...",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&
(d.clearSelection(),b.actions.get("image").funct())}).isEnabled=k;l=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(b,document.body.offsetWidth-280,120,220,180),this.layersWindow.window.addListener("show",function(){b.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.addListener("hide",function(){b.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),b.fireEvent(new mxEventObject("layers"))):
this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+L");l.setToggleAction(!0);l.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));l=this.addAction("formatPanel",mxUtils.bind(this,function(){b.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");l.setToggleAction(!0);l.setSelectedCallback(mxUtils.bind(this,function(){return 0<b.formatWidth}));l=this.addAction("outline",
mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(b,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",function(){b.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.addListener("hide",function(){b.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.setVisible(!0),b.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),null,
@@ -2646,20 +2646,21 @@ DrawioFile.prototype.shadowData=null;DrawioFile.prototype.shadowPages=null;Drawi
DrawioFile.prototype.stats={joined:0,merged:0,reload:0,checksumErrors:0,bytesSent:0,bytesReceived:0,msgSent:0,msgReceived:0,cacheHits:0,cacheMiss:0,cacheFail:0,conflicts:0,timeouts:0};DrawioFile.prototype.getSize=function(){return null!=this.data?this.data.length:0};DrawioFile.prototype.synchronizeFile=function(a,b){this.savingFile?null!=b&&b({message:mxResources.get("busy")}):null!=this.sync?this.sync.fileChanged(a,b):this.updateFile(a,b)};
DrawioFile.prototype.updateFile=function(a,b,e){this.getLatestVersion(mxUtils.bind(this,function(d){try{null!=e&&e()||(null!=d?this.mergeFile(d,a,b):this.reloadFile(a,b))}catch(k){null!=b&&b(k)}}),b)};
DrawioFile.prototype.mergeFile=function(a,b,e){try{var d=null!=this.shadowPages?this.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.shadowData).documentElement);this.checkShadow(d);this.shadowPages=this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement);this.backupPatch=this.isModified()?this.ui.diffPages(d,this.ui.pages):null;var k=[this.ui.diffPages(d,this.shadowPages)];if(!this.ignorePatches(k)){var l=this.ui.patchPages(d,k[0]),d={},p=this.ui.getHashValueForPages(l,d),q={},
-u=this.ui.getHashValueForPages(this.shadowPages,q);"1"==urlParams.test&&EditorUi.debug("File.mergeFile",[this],"backup",this.backupPatch,"patches",k,"checksum",u==p,p);if(null!=p&&p!=u){var c=this.compressReportData(this.getAnonymizedXmlForPages(l));this.checksumError(e,k,"Checksum: "+p+(null!=d?"\nDetails: "+JSON.stringify(d):"")+"\nCurrent: "+u+(null!=q?"\nCurrent Details: "+JSON.stringify(q):"")+"\nPatched:\n"+c);return}this.patch(k,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null);this.checkPages()}this.inConflictState=
+t=this.ui.getHashValueForPages(this.shadowPages,q);"1"==urlParams.test&&EditorUi.debug("File.mergeFile",[this],"backup",this.backupPatch,"patches",k,"checksum",t==p,p);if(null!=p&&p!=t){var c=this.compressReportData(this.getAnonymizedXmlForPages(l));this.checksumError(e,k,"Checksum: "+p+(null!=d?"\nDetails: "+JSON.stringify(d):"")+"\nCurrent: "+t+(null!=q?"\nCurrent Details: "+JSON.stringify(q):"")+"\nPatched:\n"+c);return}this.patch(k,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null);this.checkPages()}this.inConflictState=
this.invalidChecksum=!1;this.setDescriptor(a.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=b&&b()}catch(f){this.invalidChecksum=this.inConflictState=!0;null!=e&&e(f);try{this.sendErrorReport("Error in mergeFile",null,f)}catch(g){}}};
DrawioFile.prototype.getAnonymizedXmlForPages=function(a){var b=new mxCodec(mxUtils.createXmlDocument()),e=b.document.createElement("mxfile");if(null!=a)for(var d=0;d<a.length;d++){var k=this.ui.anonymizeNode(b.encode(new mxGraphModel(a[d].root)));k.setAttribute("id",a[d].getId());a[d].viewState&&this.ui.editor.graph.saveViewState(a[d].viewState,k,!0);e.appendChild(k)}return mxUtils.getPrettyXml(e)};
DrawioFile.prototype.checkPages=function(){this.ui.getCurrentFile()!=this||null!=this.ui.pages&&0!=this.ui.pages.length||this.sendErrorReport("Pages is null or empty","ShadowPages: "+(null!=this.shadowPages)+"\nShadowData: "+(null!=this.shadowData))};
DrawioFile.prototype.checkShadow=function(a){if(null==a||0==a.length){var b=null==this.shadowData?"null":this.compressReportData(this.ui.anonymizeString(this.shadowData),null,5E3);this.sendErrorReport("Shadow is null or empty","Shadow: "+(null!=a?a.length:"null")+"\nShadowPages: "+(null!=this.shadowPages?this.shadowPages.length:"null")+"\nShadowData: "+b)}};
DrawioFile.prototype.compressReportData=function(a,b,e){null!=a&&a.length>(null!=b?b:1E4)&&(a=this.ui.editor.graph.compress(a)+"\n");null!=e&&null!=a&&a.length>e&&(a=a.substring(0,e)+"[...]");return a};
-DrawioFile.prototype.checksumError=function(a,b,e){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=a&&a();try{if(null!=b)for(a=0;a<b.length;a++)this.ui.anonymizePatch(b[a]);var d=this.compressReportData(this.getAnonymizedXmlForPages(this.shadowPages),2E4),k=this.compressReportData(JSON.stringify(b,null,2));this.sendErrorReport("Checksum Error",(null!=e?e:"")+"\n\nPatches:\n"+k+"\n\nData:\n"+d)}catch(l){}};
-DrawioFile.prototype.sendErrorReport=function(a,b,e){try{var d=this.getCurrentUser(),k=null!=d?this.ui.hashValue(d.id):"unknown",l=null!=this.sync?this.sync.clientId:"no sync";null!=this.stats.start&&(this.stats.uptime=Math.round(((new Date).getTime()-(new Date(this.stats.start)).getTime())/1E3));var p=this.getTitle(),q=p.lastIndexOf("."),d="xml";0<q&&(d=p.substring(q));var u=null!=e?e.stack:Error().stack;EditorUi.sendReport(a+" "+(new Date).toISOString()+":\n\nBrowser="+navigator.userAgent+"\nFile="+
-this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+d+")\nUser="+k+" ("+l+")\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\nSync="+DrawioFile.SYNC+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=b?"\n\n"+b:"")+"\n\nStack:\n"+u)}catch(c){}};
+DrawioFile.prototype.checksumError=function(a,b,e,d){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=a&&a();try{if(null!=b)for(a=0;a<b.length;a++)this.ui.anonymizePatch(b[a]);var k=mxUtils.bind(this,function(a){var d=this.compressReportData(this.getAnonymizedXmlForPages(this.shadowPages),25E3),k=this.compressReportData(JSON.stringify(b,null,2));a=null!=a?this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement)),
+25E3):"n/a";this.sendErrorReport("Checksum Error",(null!=e?e:"")+"\n\nPatches:\n"+k+"\n\nLocal:\n"+d+(null!=a?"\nRemote:\n"+a:""),null,7E4)});null==d?k(null):this.getLatestVersion(mxUtils.bind(this,function(a){null!=a&&a.getCurrentEtag()==d?k(a):k(null)}),function(){})}catch(l){}};
+DrawioFile.prototype.sendErrorReport=function(a,b,e,d){try{var k=this.getCurrentUser(),l=null!=k?this.ui.hashValue(k.id):"unknown",p=null!=this.sync?this.sync.clientId:"no sync";null!=this.stats.start&&(this.stats.uptime=Math.round(((new Date).getTime()-(new Date(this.stats.start)).getTime())/1E3));var q=this.getTitle(),t=q.lastIndexOf("."),k="xml";0<t&&(k=q.substring(t));var c=null!=e?e.stack:Error().stack;EditorUi.sendReport(a+" "+(new Date).toISOString()+":\n\nBrowser="+navigator.userAgent+"\nFile="+
+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+k+")\nUser="+l+" ("+p+")\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\nSync="+DrawioFile.SYNC+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=b?"\n\n"+b:"")+"\n\nStack:\n"+c,d)}catch(f){}};
DrawioFile.prototype.reloadFile=function(a,b){try{this.ui.spinner.stop();var e=mxUtils.bind(this,function(){this.stats.reload++;this.reportEnabled=!1;var b=this.ui.editor.graph.getViewState(),e=this.ui.editor.graph.getSelectionCells(),l=this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(l,b,e);null!=this.backupPatch&&this.patch([this.backupPatch]);var d=this.ui.getCurrentFile();null!=d&&(d.stats=this.stats);
null!=a&&a()}}),!0)});this.isModified()&&null==this.backupPatch?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.handleFileSuccess("manual"==DrawioFile.SYNC)}),e,mxResources.get("cancel"),mxResources.get("discardChanges")):e()}catch(d){null!=b&&b(d)}};DrawioFile.prototype.copyFile=function(a,b){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};
DrawioFile.prototype.ignorePatches=function(a){for(var b=!0,e=0;e<a.length&&b;e++)b=b&&0==Object.keys(a[e]).length;return b};
-DrawioFile.prototype.patch=function(a,b){var e=this.ui.editor.undoManager,d=e.history.slice(),k=e.indexOfNextAdd,l=this.ui.editor.graph;l.container.style.visibility="hidden";var p=this.changeListenerEnabled;this.changeListenerEnabled=!1;var q=l.foldingEnabled,u=l.mathEnabled,c=l.cellRenderer.redraw;l.cellRenderer.redraw=function(a){a.view.graph.isEditing(a.cell)&&(a.view.graph.scrollCellToVisible(a.cell),a.view.graph.cellEditor.resize());c.apply(this,arguments)};l.model.beginUpdate();try{for(var f=
-0;f<a.length;f++)this.ui.pages=this.ui.patchPages(this.ui.pages,a[f],!0,b,this.isModified());0==this.ui.pages.length&&this.ui.pages.push(this.ui.createPage());0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{l.model.endUpdate();l.container.style.visibility="";l.cellRenderer.redraw=c;this.changeListenerEnabled=p;e.history=d;e.indexOfNextAdd=k;e.fireEvent(new mxEventObject(mxEvent.CLEAR));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)u!=
+DrawioFile.prototype.patch=function(a,b){var e=this.ui.editor.undoManager,d=e.history.slice(),k=e.indexOfNextAdd,l=this.ui.editor.graph;l.container.style.visibility="hidden";var p=this.changeListenerEnabled;this.changeListenerEnabled=!1;var q=l.foldingEnabled,t=l.mathEnabled,c=l.cellRenderer.redraw;l.cellRenderer.redraw=function(a){a.view.graph.isEditing(a.cell)&&(a.view.graph.scrollCellToVisible(a.cell),a.view.graph.cellEditor.resize());c.apply(this,arguments)};l.model.beginUpdate();try{for(var f=
+0;f<a.length;f++)this.ui.pages=this.ui.patchPages(this.ui.pages,a[f],!0,b,this.isModified());0==this.ui.pages.length&&this.ui.pages.push(this.ui.createPage());0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{l.model.endUpdate();l.container.style.visibility="";l.cellRenderer.redraw=c;this.changeListenerEnabled=p;e.history=d;e.indexOfNextAdd=k;e.fireEvent(new mxEventObject(mxEvent.CLEAR));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)t!=
l.mathEnabled?(this.ui.editor.updateGraphComponents(),l.refresh()):(q!=l.foldingEnabled?l.view.revalidate():l.view.validate(),l.sizeDidChange()),null!=this.ui.format&&l.isSelectionEmpty()&&this.ui.format.refresh();this.ui.updateTabContainer()}};
DrawioFile.prototype.save=function(a,b,e,d,k,l){if(this.isEditable())if(!k&&this.invalidChecksum)if(null!=e)e({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave();else if(null!=e)e({message:mxResources.get("readOnly")});else throw Error(mxResources.get("readOnly"));};DrawioFile.prototype.updateFileData=function(){this.setData(this.ui.getFileData(null,null,null,null,null,null,null,null,this))};
DrawioFile.prototype.saveAs=function(a,b,e){};DrawioFile.prototype.saveFile=function(a,b,e,d){};DrawioFile.prototype.getPublicUrl=function(a){a(null)};DrawioFile.prototype.isRestricted=function(){return!1};DrawioFile.prototype.isModified=function(){return this.modified};DrawioFile.prototype.setModified=function(a){this.modified=a};DrawioFile.prototype.isAutosaveOptional=function(){return!1};DrawioFile.prototype.isAutosave=function(){return!this.inConflictState&&this.ui.editor.autosave};
@@ -2731,7 +2732,7 @@ c.getElementsByTagName("parsererror");if(null!=b&&0<b.length){var b=b[0],d=b.get
else if(d=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement(),null!=d){var f=new mxCodec(d.ownerDocument);f.decode(d,this.graph.getStylesheet())}this.graph.currentStyle=b;this.graph.mathEnabled="1"==urlParams.math||"1"==c.getAttribute("math");b=c.getAttribute("backgroundImage");null!=b?(b=JSON.parse(b),this.graph.setBackgroundImage(new mxImage(b.src,b.width,b.height))):this.graph.setBackgroundImage(null);mxClient.NO_FO=this.graph.mathEnabled&&
!this.useForeignObjectForMath?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==c.getAttribute("shadow"),!1)}a.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var b=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(a){a=null!=a?a:!0;var c=b.apply(this,
arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&c.setAttribute("style",this.graph.currentStyle);null!=this.graph.backgroundImage&&c.setAttribute("backgroundImage",JSON.stringify(this.graph.backgroundImage));c.setAttribute("math",this.graph.mathEnabled?"1":"0");c.setAttribute("shadow",this.graph.shadowVisible?"1":"0");return c};Editor.prototype.isDataSvg=function(a){try{var c=mxUtils.parseXml(a).documentElement.getAttribute("content");if(null!=c&&(null!=c&&"<"!=
-c.charAt(0)&&"%"!=c.charAt(0)&&(c=unescape(window.atob?atob(c):Base64.decode(cont,c))),null!=c&&"%"==c.charAt(0)&&(c=decodeURIComponent(c)),null!=c&&0<c.length)){var b=mxUtils.parseXml(c).documentElement;return"mxfile"==b.nodeName||"mxGraphModel"==b.nodeName}}catch(B){}return!1};Editor.prototype.extractGraphModel=function(a,c){if(null!=a&&"undefined"!==typeof pako){var b=a.ownerDocument.getElementsByTagName("div"),d=[];if(null!=b&&0<b.length)for(var f=0;f<b.length;f++)if("mxgraph"==b[f].getAttribute("class")){d.push(b[f]);
+c.charAt(0)&&"%"!=c.charAt(0)&&(c=unescape(window.atob?atob(c):Base64.decode(cont,c))),null!=c&&"%"==c.charAt(0)&&(c=decodeURIComponent(c)),null!=c&&0<c.length)){var b=mxUtils.parseXml(c).documentElement;return"mxfile"==b.nodeName||"mxGraphModel"==b.nodeName}}catch(C){}return!1};Editor.prototype.extractGraphModel=function(a,c){if(null!=a&&"undefined"!==typeof pako){var b=a.ownerDocument.getElementsByTagName("div"),d=[];if(null!=b&&0<b.length)for(var f=0;f<b.length;f++)if("mxgraph"==b[f].getAttribute("class")){d.push(b[f]);
break}0<d.length&&(b=d[0].getAttribute("data-mxgraph"),null!=b?(d=JSON.parse(b),null!=d&&null!=d.xml&&(d=mxUtils.parseXml(d.xml),a=d.documentElement)):(d=d[0].getElementsByTagName("div"),0<d.length&&(b=mxUtils.getTextContent(d[0]),b=this.graph.decompress(b),0<b.length&&(d=mxUtils.parseXml(b),a=d.documentElement))))}if(null!=a&&"svg"==a.nodeName)if(b=a.getAttribute("content"),null!=b&&"<"!=b.charAt(0)&&"%"!=b.charAt(0)&&(b=unescape(window.atob?atob(b):Base64.decode(cont,b))),null!=b&&"%"==b.charAt(0)&&
(b=decodeURIComponent(b)),null!=b&&0<b.length)a=mxUtils.parseXml(b).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==a||c||(d=null,"diagram"==a.nodeName?d=a:"mxfile"==a.nodeName&&(b=a.getElementsByTagName("diagram"),0<b.length&&(d=b[Math.max(0,Math.min(b.length-1,urlParams.page||0))])),null!=d&&(b=this.graph.decompress(mxUtils.getTextContent(d)),null!=b&&0<b.length&&(a=mxUtils.parseXml(b).documentElement)));null==a||"mxGraphModel"==a.nodeName||c&&"mxfile"==a.nodeName||
(a=null);return a};var e=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=null;this.graph.view.y0=null;mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();e.apply(this,arguments)};var d=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=
@@ -2741,8 +2742,8 @@ MathJax.Hub.Register.StartupHook("Begin",function(){for(var a=0;a<Editor.mathJax
c){null!=this.graph.container&&this.graph.mathEnabled&&Editor.MathJaxRender(this.graph.container)}))};var d=document.getElementsByTagName("script");if(null!=d&&0<d.length){var f=document.createElement("script");f.type="text/javascript";f.src=a;d[0].parentNode.appendChild(f)}};Editor.prototype.csvToArray=function(a){if(!/^\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*(?:,\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*)*$/.test(a))return null;
var c=[];a.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\[\S\s][^"\\]*)*)"|([^,'"\s\\]*(?:\s+[^,'"\s\\]+)*))\s*(?:,|$)/g,function(a,b,d,f){void 0!==b?c.push(b.replace(/\\'/g,"'")):void 0!==d?c.push(d.replace(/\\"/g,'"')):void 0!==f&&c.push(f);return""});/,\s*$/.test(a)&&c.push("");return c};if(window.ColorDialog){var k=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(a,c){k.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};
var l=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){l.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(a,c){var b=null;null!=a.editor.graph.getModel().getParent(c)?b=c.getId():null!=a.currentPage&&(b=a.currentPage.getId());return b});if(null!=window.StyleFormatPanel){var p=Format.prototype.init;Format.prototype.init=function(){p.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",
-this.update)};var q=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?q.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var a=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=a&&a.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(a){return!1};var u=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=
-function(a){a=u.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var c=this.editorUi,b=c.editor.graph,d=this.createOption(mxResources.get("shadow"),function(){return b.shadowVisible},function(a){var d=new ChangePageSetup(c);d.ignoreColor=!0;d.ignoreImage=!0;d.shadowVisible=a;b.model.execute(d)},{install:function(a){this.listener=function(){a(b.shadowVisible)};c.addListener("shadowVisibleChanged",this.listener)},destroy:function(){c.removeListener(this.listener)}});
+this.update)};var q=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?q.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var a=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=a&&a.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(a){return!1};var t=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=
+function(a){a=t.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var c=this.editorUi,b=c.editor.graph,d=this.createOption(mxResources.get("shadow"),function(){return b.shadowVisible},function(a){var d=new ChangePageSetup(c);d.ignoreColor=!0;d.ignoreImage=!0;d.shadowVisible=a;b.model.execute(d)},{install:function(a){this.listener=function(){a(b.shadowVisible)};c.addListener("shadowVisibleChanged",this.listener)},destroy:function(){c.removeListener(this.listener)}});
Editor.shadowOptionEnabled||(d.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(d,60));a.appendChild(d)}return a};var c=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(a){a=c.apply(this,arguments);var b=this.editorUi,d=b.editor.graph;if(d.isEnabled()){var f=b.getCurrentFile();null!=f&&f.isAutosaveOptional()&&(f=this.createOption(mxResources.get("autosave"),function(){return b.editor.autosave},function(a){b.editor.setAutosave(a)},
{install:function(a){this.listener=function(){a(b.editor.autosave)};b.editor.addListener("autosaveChanged",this.listener)},destroy:function(){b.editor.removeListener(this.listener)}}),a.appendChild(f))}if(this.isMathOptionVisible()&&d.isEnabled()&&"undefined"!==typeof MathJax){f=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return d.mathEnabled},function(a){b.actions.get("mathematicalTypesetting").funct()},{install:function(a){this.listener=function(){a(d.mathEnabled)};b.addListener("mathEnabledChanged",
this.listener)},destroy:function(){b.removeListener(this.listener)}});f.style.paddingTop="5px";a.appendChild(f);var e=b.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000032875");e.style.position="relative";e.style.marginLeft="6px";e.style.top="2px";f.appendChild(e)}return a};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"absoluteArcSize",dispName:"Abs. Arc Size",
@@ -2767,23 +2768,23 @@ type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.offPageConnector.pro
stroke:"#b46504"},{fill:"#fad9d5",stroke:"#ae4132"},{fill:"#b0e3e6",stroke:"#0e8088"},{fill:"#b1ddf0",stroke:"#10739e"},{fill:"#d0cee2",stroke:"#56517e"},{fill:"#bac8d3",stroke:"#23445d"}],[null,{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"}],[null,{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(a,c,b){if(null!=c){var d=function(a){if(null!=a)if(b)for(var d=0;d<a.length;d++)c[a[d].name]=
a[d];else for(var f in c){for(var e=!1,d=0;d<a.length;d++)if(a[d].name==f&&a[d].type==c[f].type){e=!0;break}e||delete c[f]}},f=this.editorUi.editor.graph.view.getState(a);null!=f&&null!=f.shape&&(f.shape.commonCustomPropAdded||(f.shape.commonCustomPropAdded=!0,f.shape.customProperties=f.shape.customProperties||[],f.cell.vertex?Array.prototype.push.apply(f.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(f.shape.customProperties,Editor.commonEdgeProperties)),d(f.shape.customProperties));
-a=a.getAttribute("customProperties");if(null!=a)try{d(JSON.parse(a))}catch(C){}}};var f=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var a=this.format.createSelectionState();"image"!=a.style.shape&&this.container.appendChild(this.addStyles(this.createPanel()));f.apply(this,arguments);if(Editor.enableCustomProperties){for(var c={},b=a.vertices,d=a.edges,e=0;e<b.length;e++)this.findCommonProperties(b[e],c,0==e);for(e=0;e<d.length;e++)this.findCommonProperties(d[e],c,0==
+a=a.getAttribute("customProperties");if(null!=a)try{d(JSON.parse(a))}catch(D){}}};var f=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var a=this.format.createSelectionState();"image"!=a.style.shape&&this.container.appendChild(this.addStyles(this.createPanel()));f.apply(this,arguments);if(Editor.enableCustomProperties){for(var c={},b=a.vertices,d=a.edges,e=0;e<b.length;e++)this.findCommonProperties(b[e],c,0==e);for(e=0;e<d.length;e++)this.findCommonProperties(d[e],c,0==
b.length&&0==e);0<Object.getOwnPropertyNames(c).length&&this.container.appendChild(this.addProperties(this.createPanel(),c,a))}};var g=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(a){var c=mxUtils.button(mxResources.get("copyStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("copyStyle").funct()}));c.setAttribute("title",mxResources.get("copyStyle")+" ("+this.editorUi.actions.get("copyStyle").shortcut+")");c.style.marginBottom="2px";c.style.width=
"100px";c.style.marginRight="2px";a.appendChild(c);c=mxUtils.button(mxResources.get("pasteStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("pasteStyle").funct()}));c.setAttribute("title",mxResources.get("pasteStyle")+" ("+this.editorUi.actions.get("pasteStyle").shortcut+")");c.style.marginBottom="2px";c.style.width="100px";a.appendChild(c);mxUtils.br(a);return g.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=function(a,c,b){function d(a,
-c,b,d){v.getModel().beginUpdate();try{var f=[],e=[];if(null!=b.index){for(var g=[],h=b.parentRow.nextSibling;h&&h.getAttribute("data-pName")==a;)g.push(h.getAttribute("data-pValue")),h=h.nextSibling;b.index<g.length?null!=d?g.splice(d,1):g[b.index]=c:g.push(c);null!=b.size&&g.length>b.size&&(g=g.slice(0,b.size));c=g.join(",");null!=b.countProperty&&(v.setCellStyles(b.countProperty,g.length,v.getSelectionCells()),f.push(b.countProperty),e.push(g.length))}v.setCellStyles(a,c,v.getSelectionCells());
-f.push(a);e.push(c);if(null!=b.dependentProps)for(a=0;a<b.dependentProps.length;a++){var n=b.dependentPropsDefVal[a],m=b.dependentPropsVals[a];if(m.length>c)m=m.slice(0,c);else for(var t=m.length;t<c;t++)m.push(n);m=m.join(",");v.setCellStyles(b.dependentProps[a],m,v.getSelectionCells());f.push(b.dependentProps[a]);e.push(m)}r.editorUi.fireEvent(new mxEventObject("styleChanged","keys",f,"values",e,"cells",v.getSelectionCells()))}finally{v.getModel().endUpdate()}}function f(c,b,d){var f=mxUtils.getOffset(a,
+c,b,d){k.getModel().beginUpdate();try{var f=[],e=[];if(null!=b.index){for(var g=[],h=b.parentRow.nextSibling;h&&h.getAttribute("data-pName")==a;)g.push(h.getAttribute("data-pValue")),h=h.nextSibling;b.index<g.length?null!=d?g.splice(d,1):g[b.index]=c:g.push(c);null!=b.size&&g.length>b.size&&(g=g.slice(0,b.size));c=g.join(",");null!=b.countProperty&&(k.setCellStyles(b.countProperty,g.length,k.getSelectionCells()),f.push(b.countProperty),e.push(g.length))}k.setCellStyles(a,c,k.getSelectionCells());
+f.push(a);e.push(c);if(null!=b.dependentProps)for(a=0;a<b.dependentProps.length;a++){var n=b.dependentPropsDefVal[a],m=b.dependentPropsVals[a];if(m.length>c)m=m.slice(0,c);else for(var u=m.length;u<c;u++)m.push(n);m=m.join(",");k.setCellStyles(b.dependentProps[a],m,k.getSelectionCells());f.push(b.dependentProps[a]);e.push(m)}r.editorUi.fireEvent(new mxEventObject("styleChanged","keys",f,"values",e,"cells",k.getSelectionCells()))}finally{k.getModel().endUpdate()}}function f(c,b,d){var f=mxUtils.getOffset(a,
!0),e=mxUtils.getOffset(c,!0);b.style.position="absolute";b.style.left=e.x-f.x+"px";b.style.top=e.y-f.y+"px";b.style.width=c.offsetWidth+"px";b.style.height=c.offsetHeight-(d?4:0)+"px";b.style.zIndex=5}function e(a,c,b){var f=document.createElement("div");f.style.width="32px";f.style.height="4px";f.style.margin="2px";f.style.border="1px solid black";f.style.background=c&&"none"!=c?c:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(r,function(e){this.editorUi.pickColor(c,
-function(c){f.style.background="none"==c?"url('"+Dialog.prototype.noColorImage+"')":c;d(a,c,b)});mxEvent.consume(e)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(f);return btn}function g(a,c,b,f,e,g,h){null!=c&&(c=c.split(","),t.push({name:a,values:c,type:b,defVal:f,countProperty:e,parentRow:g,isDeletable:!0,flipBkg:h}));btn=mxUtils.button("+",mxUtils.bind(r,function(c){for(var n=g,r=0;null!=n.nextSibling;)if(n.nextSibling.getAttribute("data-pName")==
-a)n=n.nextSibling,r++;else break;var v={type:b,parentRow:g,index:r,isDeletable:!0,defVal:f,countProperty:e},r=m(a,"",v,0==r%2,h);d(a,f,v);n.parentNode.insertBefore(r,n.nextSibling);mxEvent.consume(c)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function h(a,c,b,d,f,e,g){if(0<f){var h=Array(f);c=null!=c?c.split(","):[];for(var n=0;n<f;n++)h[n]=null!=c[n]?c[n]:null!=d?d:"";t.push({name:a,values:h,type:b,defVal:d,parentRow:e,flipBkg:g,size:f})}return document.createElement("div")}
-function n(a,c,b){var f=document.createElement("input");f.type="checkbox";f.checked="1"==c;mxEvent.addListener(f,"change",function(){d(a,f.checked?"1":"0",b)});return f}function m(c,b,m,v,t){var k=m.dispName,w=m.type,x=document.createElement("tr");x.className="gePropRow"+(t?"Dark":"")+(v?"Alt":"")+" gePropNonHeaderRow";x.setAttribute("data-pName",c);x.setAttribute("data-pValue",b);v=!1;null!=m.index&&(x.setAttribute("data-index",m.index),k=(null!=k?k:"")+"["+m.index+"]",v=!0);var l=document.createElement("td");
-l.className="gePropRowCell";l.innerHTML=mxUtils.htmlEntities(mxResources.get(k,null,k));v&&(l.style.textAlign="right");x.appendChild(l);l=document.createElement("td");l.className="gePropRowCell";if("color"==w)l.appendChild(e(c,b,m));else if("bool"==w||"boolean"==w)l.appendChild(n(c,b,m));else if("enum"==w){var y=m.enumList;for(t=0;t<y.length;t++)if(k=y[t],k.val==b){l.innerHTML=mxUtils.htmlEntities(mxResources.get(k.dispName,null,k.dispName));break}mxEvent.addListener(l,"click",mxUtils.bind(r,function(){var e=
+function(c){f.style.background="none"==c?"url('"+Dialog.prototype.noColorImage+"')":c;d(a,c,b)});mxEvent.consume(e)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(f);return btn}function g(a,c,b,f,e,g,h){null!=c&&(c=c.split(","),u.push({name:a,values:c,type:b,defVal:f,countProperty:e,parentRow:g,isDeletable:!0,flipBkg:h}));btn=mxUtils.button("+",mxUtils.bind(r,function(c){for(var n=g,r=0;null!=n.nextSibling;)if(n.nextSibling.getAttribute("data-pName")==
+a)n=n.nextSibling,r++;else break;var k={type:b,parentRow:g,index:r,isDeletable:!0,defVal:f,countProperty:e},r=m(a,"",k,0==r%2,h);d(a,f,k);n.parentNode.insertBefore(r,n.nextSibling);mxEvent.consume(c)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function h(a,c,b,d,f,e,g){if(0<f){var h=Array(f);c=null!=c?c.split(","):[];for(var n=0;n<f;n++)h[n]=null!=c[n]?c[n]:null!=d?d:"";u.push({name:a,values:h,type:b,defVal:d,parentRow:e,flipBkg:g,size:f})}return document.createElement("div")}
+function n(a,c,b){var f=document.createElement("input");f.type="checkbox";f.checked="1"==c;mxEvent.addListener(f,"change",function(){d(a,f.checked?"1":"0",b)});return f}function m(c,b,m,k,u){var v=m.dispName,w=m.type,x=document.createElement("tr");x.className="gePropRow"+(u?"Dark":"")+(k?"Alt":"")+" gePropNonHeaderRow";x.setAttribute("data-pName",c);x.setAttribute("data-pValue",b);k=!1;null!=m.index&&(x.setAttribute("data-index",m.index),v=(null!=v?v:"")+"["+m.index+"]",k=!0);var l=document.createElement("td");
+l.className="gePropRowCell";l.innerHTML=mxUtils.htmlEntities(mxResources.get(v,null,v));k&&(l.style.textAlign="right");x.appendChild(l);l=document.createElement("td");l.className="gePropRowCell";if("color"==w)l.appendChild(e(c,b,m));else if("bool"==w||"boolean"==w)l.appendChild(n(c,b,m));else if("enum"==w){var y=m.enumList;for(u=0;u<y.length;u++)if(v=y[u],v.val==b){l.innerHTML=mxUtils.htmlEntities(mxResources.get(v.dispName,null,v.dispName));break}mxEvent.addListener(l,"click",mxUtils.bind(r,function(){var e=
document.createElement("select");f(l,e);for(var g=0;g<y.length;g++){var h=y[g],n=document.createElement("option");n.value=mxUtils.htmlEntities(h.val);n.innerHTML=mxUtils.htmlEntities(mxResources.get(h.dispName,null,h.dispName));e.appendChild(n)}e.value=b;a.appendChild(e);mxEvent.addListener(e,"change",function(){var a=mxUtils.htmlEntities(e.value);d(c,a,m)});e.focus();mxEvent.addListener(e,"blur",function(){a.removeChild(e)})}))}else"dynamicArr"==w?l.appendChild(g(c,b,m.subType,m.subDefVal,m.countProperty,
-x,t)):"staticArr"==w?l.appendChild(h(c,b,m.subType,m.subDefVal,m.size,x,t)):(l.innerHTML=b,mxEvent.addListener(l,"click",mxUtils.bind(r,function(){function e(){var a=g.value,a=0==a.length&&"string"!=w?0:a;m.allowAuto&&("auto"==a.trim().toLowerCase()?(a="auto",w="string"):(a=parseFloat(a),a=isNaN(a)?0:a));null!=m.min&&a<m.min?a=m.min:null!=m.max&&a>m.max&&(a=m.max);a=mxUtils.htmlEntities(("int"==w?parseInt(a):a)+"");d(c,a,m)}var g=document.createElement("input");f(l,g,!0);g.value=b;g.className="gePropEditor";
-"int"!=w&&"float"!=w||m.allowAuto||(g.type="number",g.step="int"==w?"1":"any",null!=m.min&&(g.min=parseFloat(m.min)),null!=m.max&&(g.max=parseFloat(m.max)));a.appendChild(g);mxEvent.addListener(g,"keypress",function(a){13==a.keyCode&&e()});g.focus();mxEvent.addListener(g,"blur",function(){e()})})));m.isDeletable&&(t=mxUtils.button("-",mxUtils.bind(r,function(a){d(c,"",m,m.index);mxEvent.consume(a)})),t.style.height="16px",t.style.width="25px",t.style["float"]="right",t.className="geColorBtn",l.appendChild(t));
-x.appendChild(l);return x}var r=this,v=this.editorUi.editor.graph,t=[];a.style.position="relative";a.style.padding="0";var k=document.createElement("table");k.style.whiteSpace="nowrap";k.style.width="100%";var w=document.createElement("tr");w.className="gePropHeader";var x=document.createElement("th");x.className="gePropHeaderCell";var l=document.createElement("img");l.src=Sidebar.prototype.expandedImage;x.appendChild(l);mxUtils.write(x,mxResources.get("property"));w.style.cursor="pointer";var z=
-function(){var c=k.querySelectorAll(".gePropNonHeaderRow"),b;if(r.editorUi.propertiesCollapsed){l.src=Sidebar.prototype.collapsedImage;b="none";for(var d=a.childNodes.length-1;0<=d;d--)try{var f=a.childNodes[d],e=f.nodeName.toUpperCase();"INPUT"!=e&&"SELECT"!=e||a.removeChild(f)}catch(aa){}}else l.src=Sidebar.prototype.expandedImage,b="";for(d=0;d<c.length;d++)c[d].style.display=b};mxEvent.addListener(w,"click",function(){r.editorUi.propertiesCollapsed=!r.editorUi.propertiesCollapsed;z()});w.appendChild(x);
-x=document.createElement("th");x.className="gePropHeaderCell";x.innerHTML=mxResources.get("value");w.appendChild(x);k.appendChild(w);var p=!1,D=!1,q;for(q in c)if(w=c[q],"function"!=typeof w.isVisible||w.isVisible(b)){var u=null!=b.style[q]?mxUtils.htmlEntities(b.style[q]+""):w.defVal;if("separator"==w.type)D=!D;else{if("staticArr"==w.type)w.size=parseInt(b.style[w.sizeProperty]||c[w.sizeProperty].defVal)||0;else if(null!=w.dependentProps){for(var S=w.dependentProps,L=[],M=[],x=0;x<S.length;x++){var T=
-b.style[S[x]];M.push(c[S[x]].subDefVal);L.push(null!=T?T.split(","):[])}w.dependentPropsDefVal=M;w.dependentPropsVals=L}k.appendChild(m(q,u,w,p,D));p=!p}}for(x=0;x<t.length;x++)for(w=t[x],c=w.parentRow,b=0;b<w.values.length;b++)q=m(w.name,w.values[b],{type:w.type,parentRow:w.parentRow,isDeletable:w.isDeletable,index:b,defVal:w.defVal,countProperty:w.countProperty,size:w.size},0==b%2,w.flipBkg),c.parentNode.insertBefore(q,c.nextSibling),c=q;a.appendChild(k);z();return a};StyleFormatPanel.prototype.addStyles=
+x,u)):"staticArr"==w?l.appendChild(h(c,b,m.subType,m.subDefVal,m.size,x,u)):(l.innerHTML=b,mxEvent.addListener(l,"click",mxUtils.bind(r,function(){function e(){var a=g.value,a=0==a.length&&"string"!=w?0:a;m.allowAuto&&("auto"==a.trim().toLowerCase()?(a="auto",w="string"):(a=parseFloat(a),a=isNaN(a)?0:a));null!=m.min&&a<m.min?a=m.min:null!=m.max&&a>m.max&&(a=m.max);a=mxUtils.htmlEntities(("int"==w?parseInt(a):a)+"");d(c,a,m)}var g=document.createElement("input");f(l,g,!0);g.value=b;g.className="gePropEditor";
+"int"!=w&&"float"!=w||m.allowAuto||(g.type="number",g.step="int"==w?"1":"any",null!=m.min&&(g.min=parseFloat(m.min)),null!=m.max&&(g.max=parseFloat(m.max)));a.appendChild(g);mxEvent.addListener(g,"keypress",function(a){13==a.keyCode&&e()});g.focus();mxEvent.addListener(g,"blur",function(){e()})})));m.isDeletable&&(u=mxUtils.button("-",mxUtils.bind(r,function(a){d(c,"",m,m.index);mxEvent.consume(a)})),u.style.height="16px",u.style.width="25px",u.style["float"]="right",u.className="geColorBtn",l.appendChild(u));
+x.appendChild(l);return x}var r=this,k=this.editorUi.editor.graph,u=[];a.style.position="relative";a.style.padding="0";var v=document.createElement("table");v.style.whiteSpace="nowrap";v.style.width="100%";var w=document.createElement("tr");w.className="gePropHeader";var x=document.createElement("th");x.className="gePropHeaderCell";var l=document.createElement("img");l.src=Sidebar.prototype.expandedImage;x.appendChild(l);mxUtils.write(x,mxResources.get("property"));w.style.cursor="pointer";var z=
+function(){var c=v.querySelectorAll(".gePropNonHeaderRow"),b;if(r.editorUi.propertiesCollapsed){l.src=Sidebar.prototype.collapsedImage;b="none";for(var d=a.childNodes.length-1;0<=d;d--)try{var f=a.childNodes[d],e=f.nodeName.toUpperCase();"INPUT"!=e&&"SELECT"!=e||a.removeChild(f)}catch(aa){}}else l.src=Sidebar.prototype.expandedImage,b="";for(d=0;d<c.length;d++)c[d].style.display=b};mxEvent.addListener(w,"click",function(){r.editorUi.propertiesCollapsed=!r.editorUi.propertiesCollapsed;z()});w.appendChild(x);
+x=document.createElement("th");x.className="gePropHeaderCell";x.innerHTML=mxResources.get("value");w.appendChild(x);v.appendChild(w);var p=!1,E=!1,q;for(q in c)if(w=c[q],"function"!=typeof w.isVisible||w.isVisible(b)){var t=null!=b.style[q]?mxUtils.htmlEntities(b.style[q]+""):w.defVal;if("separator"==w.type)E=!E;else{if("staticArr"==w.type)w.size=parseInt(b.style[w.sizeProperty]||c[w.sizeProperty].defVal)||0;else if(null!=w.dependentProps){for(var S=w.dependentProps,J=[],M=[],x=0;x<S.length;x++){var R=
+b.style[S[x]];M.push(c[S[x]].subDefVal);J.push(null!=R?R.split(","):[])}w.dependentPropsDefVal=M;w.dependentPropsVals=J}v.appendChild(m(q,t,w,p,E));p=!p}}for(x=0;x<u.length;x++)for(w=u[x],c=w.parentRow,b=0;b<w.values.length;b++)q=m(w.name,w.values[b],{type:w.type,parentRow:w.parentRow,isDeletable:w.isDeletable,index:b,defVal:w.defVal,countProperty:w.countProperty,size:w.size},0==b%2,w.flipBkg),c.parentNode.insertBefore(q,c.nextSibling),c=q;a.appendChild(v);z();return a};StyleFormatPanel.prototype.addStyles=
function(a){function c(a){function c(a){var c=mxUtils.button("",function(c){d.getModel().beginUpdate();try{var b=d.getSelectionCells();for(c=0;c<b.length;c++){for(var f=d.getModel().getStyle(b[c]),g=0;g<e.length;g++)f=mxUtils.removeStylename(f,e[g]);var h=d.getModel().isVertex(b[c])?d.defaultVertexStyle:d.defaultEdgeStyle;null!=a?(f=mxUtils.setStyle(f,mxConstants.STYLE_FILLCOLOR,a.fill||mxUtils.getValue(h,mxConstants.STYLE_FILLCOLOR,null)),f=mxUtils.setStyle(f,mxConstants.STYLE_STROKECOLOR,a.stroke||
mxUtils.getValue(h,mxConstants.STYLE_STROKECOLOR,null)),f=mxUtils.setStyle(f,mxConstants.STYLE_GRADIENTCOLOR,a.gradient||mxUtils.getValue(h,mxConstants.STYLE_GRADIENTCOLOR,null)),d.getModel().isVertex(b[c])&&(f=mxUtils.setStyle(f,mxConstants.STYLE_FONTCOLOR,a.font||mxUtils.getValue(h,mxConstants.STYLE_FONTCOLOR,null)))):(f=mxUtils.setStyle(f,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(h,mxConstants.STYLE_FILLCOLOR,"#ffffff")),f=mxUtils.setStyle(f,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(h,
mxConstants.STYLE_STROKECOLOR,"#000000")),f=mxUtils.setStyle(f,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(h,mxConstants.STYLE_GRADIENTCOLOR,null)),d.getModel().isVertex(b[c])&&(f=mxUtils.setStyle(f,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(h,mxConstants.STYLE_FONTCOLOR,null))));d.getModel().setStyle(b[c],f)}}finally{d.getModel().endUpdate()}});c.className="geStyleButton";c.style.width="36px";c.style.height="30px";c.style.margin="0px 6px 6px 0px";if(null!=a)null!=a.gradient?mxClient.IS_IE&&
@@ -2822,27 +2823,27 @@ mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegist
STENCIL_PATH+"/gcp2.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.veeam=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam.xml"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=
[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(a){var c=null;null!=a&&0<a.length&&("ER"==a.substring(0,2)?c="mxgraph.er":"sysML"==a.substring(0,5)&&(c="mxgraph.sysml"));return c};var v=mxMarker.createMarker;mxMarker.createMarker=function(a,c,b,d,f,e,g,h,n,m){if(null!=b&&null==mxMarker.markers[b]){var r=this.getPackageForType(b);null!=r&&mxStencilRegistry.getStencil(r)}return v.apply(this,arguments)};
-PrintDialog.prototype.create=function(a,c){function b(){w.value=Math.max(1,Math.min(h,Math.max(parseInt(w.value),parseInt(k.value))));k.value=Math.max(1,Math.min(h,Math.min(parseInt(w.value),parseInt(k.value))))}function d(c){function b(c,b,f){var e=c.getGraphBounds(),g=0,h=0,n=ga.get(),m=1/c.pageScale,r=x.checked;if(r)var m=parseInt(R.value),v=parseInt(V.value),m=Math.min(n.height*v/(e.height/c.view.scale),n.width*m/(e.width/c.view.scale));else m=parseInt(p.value)/(100*c.pageScale),isNaN(m)&&(d=
-1/c.pageScale,p.value="100 %");n=mxRectangle.fromRectangle(n);n.width=Math.ceil(n.width*d);n.height=Math.ceil(n.height*d);m*=d;!r&&c.pageVisible?(e=c.getPageLayout(),g-=e.x*n.width,h-=e.y*n.height):r=!0;if(null==b){b=PrintDialog.createPrintPreview(c,m,n,0,g,h,r);b.pageSelector=!1;b.mathEnabled=!1;c=a.getCurrentFile();null!=c&&(b.title=c.getTitle());var k=b.writeHead;b.writeHead=function(c){k.apply(this,arguments);null!=a.editor.fontCss&&(c.writeln('<style type="text/css">'),c.writeln(a.editor.fontCss),
+PrintDialog.prototype.create=function(a,c){function b(){w.value=Math.max(1,Math.min(h,Math.max(parseInt(w.value),parseInt(v.value))));v.value=Math.max(1,Math.min(h,Math.min(parseInt(w.value),parseInt(v.value))))}function d(c){function b(c,b,f){var e=c.getGraphBounds(),g=0,h=0,n=V.get(),m=1/c.pageScale,r=x.checked;if(r)var m=parseInt(B.value),k=parseInt(ca.value),m=Math.min(n.height*k/(e.height/c.view.scale),n.width*m/(e.width/c.view.scale));else m=parseInt(p.value)/(100*c.pageScale),isNaN(m)&&(d=
+1/c.pageScale,p.value="100 %");n=mxRectangle.fromRectangle(n);n.width=Math.ceil(n.width*d);n.height=Math.ceil(n.height*d);m*=d;!r&&c.pageVisible?(e=c.getPageLayout(),g-=e.x*n.width,h-=e.y*n.height):r=!0;if(null==b){b=PrintDialog.createPrintPreview(c,m,n,0,g,h,r);b.pageSelector=!1;b.mathEnabled=!1;c=a.getCurrentFile();null!=c&&(b.title=c.getTitle());var v=b.writeHead;b.writeHead=function(c){v.apply(this,arguments);null!=a.editor.fontCss&&(c.writeln('<style type="text/css">'),c.writeln(a.editor.fontCss),
c.writeln("</style>"))};if("undefined"!==typeof MathJax){var w=b.renderPage;b.renderPage=function(a,c,b,d,f,e){var g=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;var h=w.apply(this,arguments);mxClient.NO_FO=g;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:h.className="geDisableMathJax";return h}}b.open(null,null,f,!0)}else{n=c.background;if(null==n||""==n||n==mxConstants.NONE)n="#ffffff";b.backgroundColor=n;b.autoOrigin=
-r;b.appendGraph(c,m,g,h,f,!0)}return b}var d=parseInt(W.value)/100;isNaN(d)&&(d=1,W.value="100 %");var d=.75*d,e=k.value,g=w.value,h=!r.checked,m=null;h&&(h=e==n&&g==n);if(!h&&null!=a.pages&&a.pages.length){var v=0,h=a.pages.length-1;r.checked||(v=parseInt(e)-1,h=parseInt(g)-1);for(var t=v;t<=h;t++){var l=a.pages[t],e=l==a.currentPage?f:null;if(null==e){var e=a.createTemporaryGraph(f.getStylesheet()),g=!0,v=!1,y=null,z=null;null==l.viewState&&null==l.root&&a.updatePageRoot(l);null!=l.viewState&&(g=
-l.viewState.pageVisible,v=l.viewState.mathEnabled,y=l.viewState.background,z=l.viewState.backgroundImage);e.background=y;e.backgroundImage=null!=z?new mxImage(z.src,z.width,z.height):null;e.pageVisible=g;e.mathEnabled=v;var D=e.getGlobalVariable;e.getGlobalVariable=function(a){return"page"==a?l.getName():"pagenumber"==a?t+1:D.apply(this,arguments)};document.body.appendChild(e.container);a.updatePageRoot(l);e.model.setRoot(l.root)}m=b(e,m,t!=h);e!=f&&e.container.parentNode.removeChild(e.container)}}else m=
+r;b.appendGraph(c,m,g,h,f,!0)}return b}var d=parseInt(X.value)/100;isNaN(d)&&(d=1,X.value="100 %");var d=.75*d,e=v.value,g=w.value,h=!r.checked,m=null;h&&(h=e==n&&g==n);if(!h&&null!=a.pages&&a.pages.length){var k=0,h=a.pages.length-1;r.checked||(k=parseInt(e)-1,h=parseInt(g)-1);for(var u=k;u<=h;u++){var l=a.pages[u],e=l==a.currentPage?f:null;if(null==e){var e=a.createTemporaryGraph(f.getStylesheet()),g=!0,k=!1,y=null,z=null;null==l.viewState&&null==l.root&&a.updatePageRoot(l);null!=l.viewState&&(g=
+l.viewState.pageVisible,k=l.viewState.mathEnabled,y=l.viewState.background,z=l.viewState.backgroundImage);e.background=y;e.backgroundImage=null!=z?new mxImage(z.src,z.width,z.height):null;e.pageVisible=g;e.mathEnabled=k;var E=e.getGlobalVariable;e.getGlobalVariable=function(a){return"page"==a?l.getName():"pagenumber"==a?u+1:E.apply(this,arguments)};document.body.appendChild(e.container);a.updatePageRoot(l);e.model.setRoot(l.root)}m=b(e,m,u!=h);e!=f&&e.container.parentNode.removeChild(e.container)}}else m=
b(f);m.mathEnabled&&(h=m.wnd.document,h.writeln('<script type="text/x-mathjax-config">'),h.writeln("MathJax.Hub.Config({"),h.writeln("showMathMenu: false,"),h.writeln('messageStyle: "none",'),h.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],'),h.writeln('extensions: ["tex2jax.js", "mml2jax.js", "asciimath2jax.js"],'),h.writeln('"HTML-CSS": {'),h.writeln("imageFont: null"),h.writeln("},"),h.writeln("TeX: {"),h.writeln('extensions: ["AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js"]'),
h.writeln("},"),h.writeln("tex2jax: {"),h.writeln('\tignoreClass: "geDisableMathJax"'),h.writeln("},"),h.writeln("asciimath2jax: {"),h.writeln('\tignoreClass: "geDisableMathJax"'),h.writeln("}"),h.writeln("});"),c&&(h.writeln("MathJax.Hub.Queue(function () {"),h.writeln("window.print();"),h.writeln("});")),h.writeln("\x3c/script>"),h.writeln('<script type="text/javascript" src="https://math.draw.io/current/MathJax.js">\x3c/script>'));m.closeDocument();!m.mathEnabled&&c&&PrintDialog.printPreview(m)}
var f=a.editor.graph,e=document.createElement("div"),g=document.createElement("h3");g.style.width="100%";g.style.textAlign="center";g.style.marginTop="0px";mxUtils.write(g,c||mxResources.get("print"));e.appendChild(g);var h=1,n=1,m=document.createElement("div");m.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var r=document.createElement("input");r.style.cssText="margin-right:8px;margin-bottom:8px;";r.setAttribute("value","all");r.setAttribute("type","radio");
-r.setAttribute("name","pages-printdialog");m.appendChild(r);g=document.createElement("span");mxUtils.write(g,mxResources.get("printAllPages"));m.appendChild(g);mxUtils.br(m);var v=r.cloneNode(!0);r.setAttribute("checked","checked");v.setAttribute("value","range");m.appendChild(v);g=document.createElement("span");mxUtils.write(g,mxResources.get("pages")+":");m.appendChild(g);var k=document.createElement("input");k.style.cssText="margin:0 8px 0 8px;";k.setAttribute("value","1");k.setAttribute("type",
-"number");k.setAttribute("min","1");k.style.width="50px";m.appendChild(k);g=document.createElement("span");mxUtils.write(g,mxResources.get("to"));m.appendChild(g);var w=k.cloneNode(!0);m.appendChild(w);mxEvent.addListener(k,"focus",function(){v.checked=!0});mxEvent.addListener(w,"focus",function(){v.checked=!0});mxEvent.addListener(k,"change",b);mxEvent.addListener(w,"change",b);if(null!=a.pages&&(h=a.pages.length,null!=a.currentPage))for(g=0;g<a.pages.length;g++)if(a.currentPage==a.pages[g]){n=g+
-1;k.value=n;w.value=n;break}k.setAttribute("max",h);w.setAttribute("max",h);1<h&&e.appendChild(m);var t=document.createElement("div");t.style.marginBottom="10px";var l=document.createElement("input");l.style.marginRight="8px";l.setAttribute("value","adjust");l.setAttribute("type","radio");l.setAttribute("name","printZoom");t.appendChild(l);g=document.createElement("span");mxUtils.write(g,mxResources.get("adjustTo"));t.appendChild(g);var p=document.createElement("input");p.style.cssText="margin:0 8px 0 8px;";
-p.setAttribute("value","100 %");p.style.width="50px";t.appendChild(p);mxEvent.addListener(p,"focus",function(){l.checked=!0});e.appendChild(t);var m=m.cloneNode(!1),x=l.cloneNode(!0);x.setAttribute("value","fit");l.setAttribute("checked","checked");g=document.createElement("div");g.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";g.appendChild(x);m.appendChild(g);t=document.createElement("table");t.style.display="inline-block";var D=document.createElement("tbody"),
-q=document.createElement("tr"),u=q.cloneNode(!0),F=document.createElement("td"),S=F.cloneNode(!0),L=F.cloneNode(!0),M=F.cloneNode(!0),T=F.cloneNode(!0),E=F.cloneNode(!0);F.style.textAlign="right";M.style.textAlign="right";mxUtils.write(F,mxResources.get("fitTo"));var R=document.createElement("input");R.style.cssText="margin:0 8px 0 8px;";R.setAttribute("value","1");R.setAttribute("min","1");R.setAttribute("type","number");R.style.width="40px";S.appendChild(R);g=document.createElement("span");mxUtils.write(g,
-mxResources.get("fitToSheetsAcross"));L.appendChild(g);mxUtils.write(M,mxResources.get("fitToBy"));var V=R.cloneNode(!0);T.appendChild(V);mxEvent.addListener(R,"focus",function(){x.checked=!0});mxEvent.addListener(V,"focus",function(){x.checked=!0});g=document.createElement("span");mxUtils.write(g,mxResources.get("fitToSheetsDown"));E.appendChild(g);q.appendChild(F);q.appendChild(S);q.appendChild(L);u.appendChild(M);u.appendChild(T);u.appendChild(E);D.appendChild(q);D.appendChild(u);t.appendChild(D);
-m.appendChild(t);e.appendChild(m);m=document.createElement("div");g=document.createElement("div");g.style.fontWeight="bold";g.style.marginBottom="12px";mxUtils.write(g,mxResources.get("paperSize"));m.appendChild(g);g=document.createElement("div");g.style.marginBottom="12px";var ga=PageSetupDialog.addPageFormatPanel(g,"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);m.appendChild(g);g=document.createElement("span");mxUtils.write(g,mxResources.get("pageScale"));m.appendChild(g);
-var W=document.createElement("input");W.style.cssText="margin:0 8px 0 8px;";W.setAttribute("value","100 %");W.style.width="60px";m.appendChild(W);e.appendChild(m);g=document.createElement("div");g.style.cssText="text-align:right;margin:48px 0 0 0;";m=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});m.className="geBtn";a.editor.cancelFirst&&g.appendChild(m);a.isOffline()||(t=mxUtils.button(mxResources.get("help"),function(){f.openLink("https://desk.draw.io/support/solutions/articles/16000048947")}),
-t.className="geBtn",g.appendChild(t));PrintDialog.previewEnabled&&(t=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();d(!1)}),t.className="geBtn",g.appendChild(t));t=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();d(!0)});t.className="geBtn gePrimaryBtn";g.appendChild(t);a.editor.cancelFirst||g.appendChild(m);e.appendChild(g);this.container=e};var D=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==
-this.page&&(this.page=this.ui.currentPage);this.page!=this.ui.currentPage?null!=this.page.viewState&&(this.ignoreColor||(this.page.viewState.background=this.color),this.ignoreImage||(this.page.viewState.backgroundImage=this.image),null!=this.format&&(this.page.viewState.pageFormat=this.format),null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled),null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)):(D.apply(this,arguments),null!=this.mathEnabled&&
+r.setAttribute("name","pages-printdialog");m.appendChild(r);g=document.createElement("span");mxUtils.write(g,mxResources.get("printAllPages"));m.appendChild(g);mxUtils.br(m);var k=r.cloneNode(!0);r.setAttribute("checked","checked");k.setAttribute("value","range");m.appendChild(k);g=document.createElement("span");mxUtils.write(g,mxResources.get("pages")+":");m.appendChild(g);var v=document.createElement("input");v.style.cssText="margin:0 8px 0 8px;";v.setAttribute("value","1");v.setAttribute("type",
+"number");v.setAttribute("min","1");v.style.width="50px";m.appendChild(v);g=document.createElement("span");mxUtils.write(g,mxResources.get("to"));m.appendChild(g);var w=v.cloneNode(!0);m.appendChild(w);mxEvent.addListener(v,"focus",function(){k.checked=!0});mxEvent.addListener(w,"focus",function(){k.checked=!0});mxEvent.addListener(v,"change",b);mxEvent.addListener(w,"change",b);if(null!=a.pages&&(h=a.pages.length,null!=a.currentPage))for(g=0;g<a.pages.length;g++)if(a.currentPage==a.pages[g]){n=g+
+1;v.value=n;w.value=n;break}v.setAttribute("max",h);w.setAttribute("max",h);1<h&&e.appendChild(m);var u=document.createElement("div");u.style.marginBottom="10px";var l=document.createElement("input");l.style.marginRight="8px";l.setAttribute("value","adjust");l.setAttribute("type","radio");l.setAttribute("name","printZoom");u.appendChild(l);g=document.createElement("span");mxUtils.write(g,mxResources.get("adjustTo"));u.appendChild(g);var p=document.createElement("input");p.style.cssText="margin:0 8px 0 8px;";
+p.setAttribute("value","100 %");p.style.width="50px";u.appendChild(p);mxEvent.addListener(p,"focus",function(){l.checked=!0});e.appendChild(u);var m=m.cloneNode(!1),x=l.cloneNode(!0);x.setAttribute("value","fit");l.setAttribute("checked","checked");g=document.createElement("div");g.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";g.appendChild(x);m.appendChild(g);u=document.createElement("table");u.style.display="inline-block";var E=document.createElement("tbody"),
+q=document.createElement("tr"),t=q.cloneNode(!0),F=document.createElement("td"),S=F.cloneNode(!0),J=F.cloneNode(!0),M=F.cloneNode(!0),R=F.cloneNode(!0),ha=F.cloneNode(!0);F.style.textAlign="right";M.style.textAlign="right";mxUtils.write(F,mxResources.get("fitTo"));var B=document.createElement("input");B.style.cssText="margin:0 8px 0 8px;";B.setAttribute("value","1");B.setAttribute("min","1");B.setAttribute("type","number");B.style.width="40px";S.appendChild(B);g=document.createElement("span");mxUtils.write(g,
+mxResources.get("fitToSheetsAcross"));J.appendChild(g);mxUtils.write(M,mxResources.get("fitToBy"));var ca=B.cloneNode(!0);R.appendChild(ca);mxEvent.addListener(B,"focus",function(){x.checked=!0});mxEvent.addListener(ca,"focus",function(){x.checked=!0});g=document.createElement("span");mxUtils.write(g,mxResources.get("fitToSheetsDown"));ha.appendChild(g);q.appendChild(F);q.appendChild(S);q.appendChild(J);t.appendChild(M);t.appendChild(R);t.appendChild(ha);E.appendChild(q);E.appendChild(t);u.appendChild(E);
+m.appendChild(u);e.appendChild(m);m=document.createElement("div");g=document.createElement("div");g.style.fontWeight="bold";g.style.marginBottom="12px";mxUtils.write(g,mxResources.get("paperSize"));m.appendChild(g);g=document.createElement("div");g.style.marginBottom="12px";var V=PageSetupDialog.addPageFormatPanel(g,"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);m.appendChild(g);g=document.createElement("span");mxUtils.write(g,mxResources.get("pageScale"));m.appendChild(g);
+var X=document.createElement("input");X.style.cssText="margin:0 8px 0 8px;";X.setAttribute("value","100 %");X.style.width="60px";m.appendChild(X);e.appendChild(m);g=document.createElement("div");g.style.cssText="text-align:right;margin:48px 0 0 0;";m=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});m.className="geBtn";a.editor.cancelFirst&&g.appendChild(m);a.isOffline()||(u=mxUtils.button(mxResources.get("help"),function(){f.openLink("https://desk.draw.io/support/solutions/articles/16000048947")}),
+u.className="geBtn",g.appendChild(u));PrintDialog.previewEnabled&&(u=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();d(!1)}),u.className="geBtn",g.appendChild(u));u=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();d(!0)});u.className="geBtn gePrimaryBtn";g.appendChild(u);a.editor.cancelFirst||g.appendChild(m);e.appendChild(g);this.container=e};var E=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==
+this.page&&(this.page=this.ui.currentPage);this.page!=this.ui.currentPage?null!=this.page.viewState&&(this.ignoreColor||(this.page.viewState.background=this.color),this.ignoreImage||(this.page.viewState.backgroundImage=this.image),null!=this.format&&(this.page.viewState.pageFormat=this.format),null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled),null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)):(E.apply(this,arguments),null!=this.mathEnabled&&
this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible))}})();
-var ErrorDialog=function(a,b,e,d,k,l,p,q,u,c,f){u=null!=u?u:!0;var g=document.createElement("div");g.style.textAlign="center";if(null!=b){var n=document.createElement("div");n.style.padding="0px";n.style.margin="0px";n.style.fontSize="18px";n.style.paddingBottom="16px";n.style.marginBottom="16px";n.style.borderBottom="1px solid #c0c0c0";n.style.color="gray";mxUtils.write(n,b);g.appendChild(n)}b=document.createElement("div");b.style.padding="6px";b.innerHTML=e;g.appendChild(b);e=document.createElement("div");
-e.style.marginTop="16px";e.style.textAlign="center";null!=l&&(b=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();l()}),b.className="geBtn",e.appendChild(b),e.style.textAlign="center");null!=c&&(c=mxUtils.button(c,function(){null!=f&&f()}),c.className="geBtn",e.appendChild(c));var r=mxUtils.button(d,function(){u&&a.hideDialog();null!=k&&k()});r.className="geBtn";e.appendChild(r);null!=p&&(d=mxUtils.button(p,function(){u&&a.hideDialog();null!=q&&q()}),d.className="geBtn gePrimaryBtn",
+var ErrorDialog=function(a,b,e,d,k,l,p,q,t,c,f){t=null!=t?t:!0;var g=document.createElement("div");g.style.textAlign="center";if(null!=b){var n=document.createElement("div");n.style.padding="0px";n.style.margin="0px";n.style.fontSize="18px";n.style.paddingBottom="16px";n.style.marginBottom="16px";n.style.borderBottom="1px solid #c0c0c0";n.style.color="gray";mxUtils.write(n,b);g.appendChild(n)}b=document.createElement("div");b.style.padding="6px";b.innerHTML=e;g.appendChild(b);e=document.createElement("div");
+e.style.marginTop="16px";e.style.textAlign="center";null!=l&&(b=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();l()}),b.className="geBtn",e.appendChild(b),e.style.textAlign="center");null!=c&&(c=mxUtils.button(c,function(){null!=f&&f()}),c.className="geBtn",e.appendChild(c));var r=mxUtils.button(d,function(){t&&a.hideDialog();null!=k&&k()});r.className="geBtn";e.appendChild(r);null!=p&&(d=mxUtils.button(p,function(){t&&a.hideDialog();null!=q&&q()}),d.className="geBtn gePrimaryBtn",
e.appendChild(d));this.init=function(){r.focus()};g.appendChild(e);this.container=g};
(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,e,d){d.ui=a.ui;return e};a.afterDecode=function(a,e,d){d.previousColor=d.color;d.previousImage=d.image;d.previousFormat=d.format;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(a)})();(function(){EditorUi.VERSION="@DRAWIO-VERSION@";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.enableLogging="1"!=urlParams.stealth&&/.*\.draw\.io$/.test(window.location.hostname)&&"support.draw.io"!=window.location.hostname;EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.logError=function(a,b,d,e,r){if("1"==urlParams.dev)EditorUi.debug("logError",a,b,d,e,r);else if(EditorUi.enableLogging)try{if(a!=EditorUi.lastErrorMessage&&(null==
a||null==b||-1==a.indexOf("Script error")&&-1==a.indexOf("extension"))&&null!=a&&0>a.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=a;var c=0<=a.indexOf("NetworkError")||0<=a.indexOf("SecurityError")||0<=a.indexOf("NS_ERROR_FAILURE")||0<=a.indexOf("out of memory")?"CONFIG":"SEVERE",f=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=f+"/log?severity="+c+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(a)+":url:"+encodeURIComponent(window.location.href)+
@@ -2892,9 +2893,9 @@ EditorUi.prototype.createDownloadRequest=function(a,b,d,e,r,h){var c=this.editor
0<f.length?f:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);d.getHash=function(){return c};this.fileLoaded(d);"csv"==a.format&&this.importCsv(f,mxUtils.bind(this,function(a){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=a.update){var e=null!=a.interval?parseInt(a.interval):6E4,g=null,h=mxUtils.bind(this,function(){var c=this.currentPage;mxUtils.post(a.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),
mxUtils.bind(this,function(a){c===this.currentPage&&(200<=a.getStatus()&&300>=a.getStatus()?(this.updateDiagram(a.getText()),n()):this.handleError({message:mxResources.get("error")+" "+a.getStatus()}))}),mxUtils.bind(this,function(a){this.handleError(a)}))}),n=mxUtils.bind(this,function(){window.clearTimeout(g);g=window.setTimeout(h,e)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){n();h()}));n();h()}null!=b&&b()});if(null!=a.url&&0<a.url.length){var e=a.url;/^https?:\/\//.test(e)&&
!this.isCorsEnabledForUrl(e)&&(e=PROXY_URL+"?url="+encodeURIComponent(e));this.loadUrl(e,mxUtils.bind(this,function(a){f(a)}),mxUtils.bind(this,function(a){null!=d&&d(a)}))}else f("")};EditorUi.prototype.updateDiagram=function(a){function c(a){var c=new mxCellOverlay(a.image||e.warningImage,a.tooltip,a.align,a.valign,a.offset);c.addListener(mxEvent.CLICK,function(c,b){d.alert(a.tooltip)});return c}var b=null,d=this;if(null!=a&&0<a.length&&(b=mxUtils.parseXml(a),a=null!=b?b.documentElement:null,null!=
-a&&"updates"==a.nodeName)){var e=this.editor.graph,h=e.getModel();h.beginUpdate();var m=null;try{for(a=a.firstChild;null!=a;){if("update"==a.nodeName){var k=h.getCell(a.getAttribute("id"));if(null!=k){try{var v=a.getAttribute("value");if(null!=v){var l=mxUtils.parseXml(v).documentElement;if(null!=l)if("1"==l.getAttribute("replace-value"))h.setValue(k,l);else for(var p=l.attributes,t=0;t<p.length;t++)e.setAttributeForCell(k,p[t].nodeName,0<p[t].nodeValue.length?p[t].nodeValue:null)}}catch(A){null!=
-window.console&&console.log("Error in value for "+k.id+": "+A)}try{var q=a.getAttribute("style");null!=q&&e.model.setStyle(k,q)}catch(A){null!=window.console&&console.log("Error in style for "+k.id+": "+A)}try{var B=a.getAttribute("icon");if(null!=B){var u=0<B.length?JSON.parse(B):null;null!=u&&u.append||e.removeCellOverlays(k);null!=u&&e.addCellOverlay(k,c(u))}}catch(A){null!=window.console&&console.log("Error in icon for "+k.id+": "+A)}try{var C=a.getAttribute("geometry");if(null!=C){var C=JSON.parse(C),
-G=e.getCellGeometry(k);if(null!=G){G=G.clone();for(key in C){var J=parseFloat(C[key]);"dx"==key?G.x+=J:"dy"==key?G.y+=J:"dw"==key?G.width+=J:"dh"==key?G.height+=J:G[key]=parseFloat(C[key])}e.model.setGeometry(k,G)}}}catch(A){null!=window.console&&console.log("Error in icon for "+k.id+": "+A)}}}else if("model"==a.nodeName){for(var y=a.firstChild;null!=y&&y.nodeType!=mxConstants.NODETYPE_ELEMENT;)y=y.nextSibling;null!=y&&(new mxCodec(a.firstChild)).decode(y,h)}else if("view"==a.nodeName){if(a.hasAttribute("scale")&&
+a&&"updates"==a.nodeName)){var e=this.editor.graph,h=e.getModel();h.beginUpdate();var m=null;try{for(a=a.firstChild;null!=a;){if("update"==a.nodeName){var k=h.getCell(a.getAttribute("id"));if(null!=k){try{var v=a.getAttribute("value");if(null!=v){var l=mxUtils.parseXml(v).documentElement;if(null!=l)if("1"==l.getAttribute("replace-value"))h.setValue(k,l);else for(var p=l.attributes,u=0;u<p.length;u++)e.setAttributeForCell(k,p[u].nodeName,0<p[u].nodeValue.length?p[u].nodeValue:null)}}catch(A){null!=
+window.console&&console.log("Error in value for "+k.id+": "+A)}try{var q=a.getAttribute("style");null!=q&&e.model.setStyle(k,q)}catch(A){null!=window.console&&console.log("Error in style for "+k.id+": "+A)}try{var C=a.getAttribute("icon");if(null!=C){var t=0<C.length?JSON.parse(C):null;null!=t&&t.append||e.removeCellOverlays(k);null!=t&&e.addCellOverlay(k,c(t))}}catch(A){null!=window.console&&console.log("Error in icon for "+k.id+": "+A)}try{var D=a.getAttribute("geometry");if(null!=D){var D=JSON.parse(D),
+G=e.getCellGeometry(k);if(null!=G){G=G.clone();for(key in D){var K=parseFloat(D[key]);"dx"==key?G.x+=K:"dy"==key?G.y+=K:"dw"==key?G.width+=K:"dh"==key?G.height+=K:G[key]=parseFloat(D[key])}e.model.setGeometry(k,G)}}}catch(A){null!=window.console&&console.log("Error in icon for "+k.id+": "+A)}}}else if("model"==a.nodeName){for(var y=a.firstChild;null!=y&&y.nodeType!=mxConstants.NODETYPE_ELEMENT;)y=y.nextSibling;null!=y&&(new mxCodec(a.firstChild)).decode(y,h)}else if("view"==a.nodeName){if(a.hasAttribute("scale")&&
(e.view.scale=parseFloat(a.getAttribute("scale"))),a.hasAttribute("dx")||a.hasAttribute("dy"))e.view.translate=new mxPoint(parseFloat(a.getAttribute("dx")||0),parseFloat(a.getAttribute("dy")||0))}else"fit"==a.nodeName&&(m=a.hasAttribute("max-scale")?parseFloat(a.getAttribute("max-scale")):1);a=a.nextSibling}}finally{h.endUpdate()}null!=m&&this.chromelessResize&&this.chromelessResize(!0,m)}return b};EditorUi.prototype.getCopyFilename=function(a,b){var c=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename,
d="",f=c.lastIndexOf(".");0<=f&&(d=c.substring(f),c=c.substring(0,f));if(b)var e=new Date,f=e.getFullYear(),m=e.getMonth()+1,k=e.getDate(),v=e.getHours(),l=e.getMinutes(),e=e.getSeconds(),c=c+(" "+(f+"-"+m+"-"+k+"-"+v+"-"+l+"-"+e));return c=mxResources.get("copyOf",[c])+d};EditorUi.prototype.fileLoaded=function(a){var c=this.getCurrentFile();this.fileLoadedError=null;this.setCurrentFile(null);var b=!1;this.hideDialog();null!=c&&(c.removeListener(this.descriptorChangedListener),c.close());this.editor.graph.model.clear();
this.editor.undoManager.clear();var d=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=c&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerHTML="",this.fname.setAttribute("title",mxResources.get("rename")));this.editor.setStatus("");
@@ -2914,40 +2915,40 @@ this.sidebar.container;if(null==a){var b=this.sidebar.palettes["L.scratchpad"];n
"borderRadius","6px"),f.style.border="3px dotted lightGray",f.style.textAlign="center",f.style.padding="8px",f.style.color="#B3B3B3",mxUtils.write(f,mxResources.get("dragElementsHere"))),b.appendChild(f)):this.addLibraryEntries(c,b)});if(null!=this.sidebar&&null!=b)for(var g=0;g<b.length;g++)mxUtils.bind(this,function(a){var c=a.data;null!=c&&null!=a.title?this.sidebar.addEntry(a.title,mxUtils.bind(this,function(){c=this.convertDataUri(c);var b="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";
"fixed"==a.aspect&&(b+="aspect=fixed;");return this.sidebar.createVertexTemplate(b+"image="+c,a.w,a.h,"",a.title||"",!1,!1,!0)})):null!=a.xml&&null!=a.title&&this.sidebar.addEntry(a.title,mxUtils.bind(this,function(){var c=this.stringToCells(this.editor.graph.decompress(a.xml));return this.sidebar.createVertexTemplateFromCells(c,a.w,a.h,a.title||"",!0,!1,!0)}))})(b[g]);d=null!=d&&0<d.length?d:a.getTitle();var k=this.sidebar.addPalette(a.getHash(),d,!0,mxUtils.bind(this,function(a){e(b,a)}));this.repositionLibrary(c);
var v=k.parentNode.previousSibling;d=v.getAttribute("title");null!=d&&0<d.length&&".scratchpad"!=a.title&&v.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+d);var l=document.createElement("div");l.style.position="absolute";l.style.right="0px";l.style.top="0px";l.style.padding="8px";mxClient.IS_QUIRKS||8==document.documentMode||(l.style.backgroundColor="inherit");v.style.position="relative";var p=document.createElement("img");p.setAttribute("src",Dialog.prototype.closeImage);p.setAttribute("title",
-mxResources.get("close"));p.setAttribute("valign","absmiddle");p.setAttribute("border","0");p.style.margin="0 3px";var t=null;if(".scratchpad"!=a.title||this.closableScratchpad)l.appendChild(p),mxEvent.addListener(p,"click",mxUtils.bind(this,function(c){if(!mxEvent.isConsumed(c)){var b=mxUtils.bind(this,function(){this.closeLibrary(a)});null!=t?this.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b();mxEvent.consume(c)}}));if(a.isEditable()){var q=
-this.editor.graph,B=null,u=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),k,b,a,a.getMode());mxEvent.consume(c)}),C=mxUtils.bind(this,function(c){a.setModified(!0);a.isAutosave()?(null!=B&&null!=B.parentNode&&B.parentNode.removeChild(B),B=p.cloneNode(!1),B.setAttribute("src",Editor.spinImage),B.setAttribute("title",mxResources.get("saving")),B.style.cursor="default",B.style.marginRight="2px",B.style.marginTop="-2px",l.insertBefore(B,l.firstChild),v.style.paddingRight=18*l.childNodes.length+
-"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=B&&null!=B.parentNode&&(B.parentNode.removeChild(B),v.style.paddingRight=18*l.childNodes.length+"px")})):null==t&&(t=p.cloneNode(!1),t.setAttribute("src",IMAGE_PATH+"/download.png"),t.setAttribute("title",mxResources.get("save")),l.insertBefore(t,l.firstChild),mxEvent.addListener(t,"click",mxUtils.bind(this,function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==t||a.isModified()||
-(v.style.paddingRight=18*l.childNodes.length+"px",t.parentNode.removeChild(t),t=null)});mxEvent.consume(c)})),v.style.paddingRight=18*l.childNodes.length+"px")}),G=mxUtils.bind(this,function(a,c,d,e){a=q.cloneCells(mxUtils.sortCells(q.model.getTopmostCells(a)));for(var g=0;g<a.length;g++){var h=q.getCellGeometry(a[g]);null!=h&&h.translate(-c.x,-c.y)}k.appendChild(this.sidebar.createVertexTemplateFromCells(a,c.width,c.height,e||"",!0,!1,!1));a={xml:this.editor.graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),
-w:c.width,h:c.height};null!=e&&(a.title=e);b.push(a);C(d);null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)}),J=mxUtils.bind(this,function(a){if(q.isSelectionEmpty())q.getRubberband().isActive()?(q.getRubberband().execute(a),q.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var c=q.getSelectionCells(),b=q.view.getBounds(c),d=q.view.scale;b.x/=d;b.y/=d;b.width/=d;b.height/=d;b.x-=q.view.translate.x;
+mxResources.get("close"));p.setAttribute("valign","absmiddle");p.setAttribute("border","0");p.style.margin="0 3px";var u=null;if(".scratchpad"!=a.title||this.closableScratchpad)l.appendChild(p),mxEvent.addListener(p,"click",mxUtils.bind(this,function(c){if(!mxEvent.isConsumed(c)){var b=mxUtils.bind(this,function(){this.closeLibrary(a)});null!=u?this.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b();mxEvent.consume(c)}}));if(a.isEditable()){var q=
+this.editor.graph,C=null,t=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),k,b,a,a.getMode());mxEvent.consume(c)}),D=mxUtils.bind(this,function(c){a.setModified(!0);a.isAutosave()?(null!=C&&null!=C.parentNode&&C.parentNode.removeChild(C),C=p.cloneNode(!1),C.setAttribute("src",Editor.spinImage),C.setAttribute("title",mxResources.get("saving")),C.style.cursor="default",C.style.marginRight="2px",C.style.marginTop="-2px",l.insertBefore(C,l.firstChild),v.style.paddingRight=18*l.childNodes.length+
+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=C&&null!=C.parentNode&&(C.parentNode.removeChild(C),v.style.paddingRight=18*l.childNodes.length+"px")})):null==u&&(u=p.cloneNode(!1),u.setAttribute("src",IMAGE_PATH+"/download.png"),u.setAttribute("title",mxResources.get("save")),l.insertBefore(u,l.firstChild),mxEvent.addListener(u,"click",mxUtils.bind(this,function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==u||a.isModified()||
+(v.style.paddingRight=18*l.childNodes.length+"px",u.parentNode.removeChild(u),u=null)});mxEvent.consume(c)})),v.style.paddingRight=18*l.childNodes.length+"px")}),G=mxUtils.bind(this,function(a,c,d,e){a=q.cloneCells(mxUtils.sortCells(q.model.getTopmostCells(a)));for(var g=0;g<a.length;g++){var h=q.getCellGeometry(a[g]);null!=h&&h.translate(-c.x,-c.y)}k.appendChild(this.sidebar.createVertexTemplateFromCells(a,c.width,c.height,e||"",!0,!1,!1));a={xml:this.editor.graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),
+w:c.width,h:c.height};null!=e&&(a.title=e);b.push(a);D(d);null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)}),K=mxUtils.bind(this,function(a){if(q.isSelectionEmpty())q.getRubberband().isActive()?(q.getRubberband().execute(a),q.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var c=q.getSelectionCells(),b=q.view.getBounds(c),d=q.view.scale;b.x/=d;b.y/=d;b.width/=d;b.height/=d;b.x-=q.view.translate.x;
b.y-=q.view.translate.y;G(c,b)}mxEvent.consume(a)});k.style.border="3px solid transparent";mxEvent.addGestureListeners(k,function(){},mxUtils.bind(this,function(a){q.isMouseDown&&null!=q.panningManager&&null!=q.graphHandler.shape&&(q.graphHandler.shape.node.style.visibility="hidden",null!=f?f.style.border="3px dotted rgb(254, 137, 12)":k.style.border="3px dotted rgb(254, 137, 12)",k.style.cursor="copy",q.panningManager.stop(),q.autoScroll=!1,null!=q.graphHandler.guide&&q.graphHandler.guide.setVisible(!1),
-null!=q.graphHandler.hint&&(q.graphHandler.hint.style.visibility="hidden"),mxEvent.consume(a))}),mxUtils.bind(this,function(a){q.isMouseDown&&null!=q.panningManager&&null!=q.graphHandler&&(k.style.border="3px solid transparent",null!=f&&(f.style.border="3px dotted lightGray"),k.style.cursor="default",this.sidebar.showTooltips=!0,q.panningManager.stop(),q.graphHandler.reset(),q.isMouseDown=!1,q.autoScroll=!0,J(a),mxEvent.consume(a))}));mxEvent.addListener(k,"mouseleave",mxUtils.bind(this,function(a){q.isMouseDown&&
+null!=q.graphHandler.hint&&(q.graphHandler.hint.style.visibility="hidden"),mxEvent.consume(a))}),mxUtils.bind(this,function(a){q.isMouseDown&&null!=q.panningManager&&null!=q.graphHandler&&(k.style.border="3px solid transparent",null!=f&&(f.style.border="3px dotted lightGray"),k.style.cursor="default",this.sidebar.showTooltips=!0,q.panningManager.stop(),q.graphHandler.reset(),q.isMouseDown=!1,q.autoScroll=!0,K(a),mxEvent.consume(a))}));mxEvent.addListener(k,"mouseleave",mxUtils.bind(this,function(a){q.isMouseDown&&
null!=q.graphHandler.shape&&(q.graphHandler.shape.node.style.visibility="visible",k.style.border="3px solid transparent",k.style.cursor="",q.autoScroll=!0,null!=q.graphHandler.guide&&q.graphHandler.guide.setVisible(!0),null!=q.graphHandler.hint&&(q.graphHandler.hint.style.visibility="visible"),null!=f&&(f.style.border="3px dotted lightGray"))}));Graph.fileSupport&&(mxEvent.addListener(k,"dragover",mxUtils.bind(this,function(a){null!=f?f.style.border="3px dotted rgb(254, 137, 12)":k.style.border="3px dotted rgb(254, 137, 12)";
a.dataTransfer.dropEffect="copy";k.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(k,"drop",mxUtils.bind(this,function(a){k.style.border="3px solid transparent";k.style.cursor="";null!=f&&(f.style.border="3px dotted lightGray");0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(c,d,g,h,m,n,r,v,l){if(null!=c&&"image/"==d.substring(0,6))c="shape=image;verticalLabelPosition=bottom;verticalAlign=top;aspect=fixed;image="+
-this.convertDataUri(c),c=[new mxCell("",new mxGeometry(0,0,m,n),c)],c[0].vertex=!0,G(c,new mxRectangle(0,0,m,n),a,mxEvent.isAltDown(a)?null:r.substring(0,r.lastIndexOf(".")).replace(/_/g," ")),null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null);else{var t=!1,w=mxUtils.bind(this,function(c,d){if(null!=c&&"text/xml"==d){var g=mxUtils.parseXml(c);if("mxlibrary"==g.documentElement.nodeName)try{var h=JSON.parse(mxUtils.getTextContent(g.documentElement));e(h,k);b=b.concat(h);C(a);
-this.spinner.stop();t=!0}catch(R){}else if("mxfile"==g.documentElement.nodeName)try{for(var m=g.documentElement.getElementsByTagName("diagram"),g=0;g<m.length;g++){var h=mxUtils.getTextContent(m[g]),n=this.stringToCells(this.editor.graph.decompress(h)),r=this.editor.graph.getBoundingBoxFromGeometry(n);G(n,new mxRectangle(0,0,r.width,r.height),a)}t=!0}catch(R){null!=window.console&&console.log("error in drop handler:",R)}}t||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));
+this.convertDataUri(c),c=[new mxCell("",new mxGeometry(0,0,m,n),c)],c[0].vertex=!0,G(c,new mxRectangle(0,0,m,n),a,mxEvent.isAltDown(a)?null:r.substring(0,r.lastIndexOf(".")).replace(/_/g," ")),null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null);else{var u=!1,w=mxUtils.bind(this,function(c,d){if(null!=c&&"text/xml"==d){var g=mxUtils.parseXml(c);if("mxlibrary"==g.documentElement.nodeName)try{var h=JSON.parse(mxUtils.getTextContent(g.documentElement));e(h,k);b=b.concat(h);D(a);
+this.spinner.stop();u=!0}catch(B){}else if("mxfile"==g.documentElement.nodeName)try{for(var m=g.documentElement.getElementsByTagName("diagram"),g=0;g<m.length;g++){var h=mxUtils.getTextContent(m[g]),n=this.stringToCells(this.editor.graph.decompress(h)),r=this.editor.graph.getBoundingBoxFromGeometry(n);G(n,new mxRectangle(0,0,r.width,r.height),a)}u=!0}catch(B){null!=window.console&&console.log("error in drop handler:",B)}}u||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));
null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)});null!=l&&null!=r&&(/(\.v(dx|sdx?))($|\?)/i.test(r)||/(\.vs(x|sx?))($|\?)/i.test(r))?this.importVisio(l,function(a){w(a,"text/xml")},null,r):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,r)&&null!=l?this.parseFile(l,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?w(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?
-"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):w(c,d)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(k,"dragleave",function(a){null!=f?f.style.border="3px dotted lightGray":(k.style.border="3px solid transparent",k.style.cursor="");a.stopPropagation();a.preventDefault()}));p=p.cloneNode(!1);p.setAttribute("src",Editor.editImage);p.setAttribute("title",mxResources.get("edit"));l.insertBefore(p,l.firstChild);mxEvent.addListener(p,"click",u);mxEvent.addListener(k,
-"dblclick",function(a){mxEvent.getSource(a)==k&&u(a)});d=p.cloneNode(!1);d.setAttribute("src",Editor.plusImage);d.setAttribute("title",mxResources.get("add"));l.insertBefore(d,l.firstChild);mxEvent.addListener(d,"click",J);this.isOffline()||".scratchpad"!=a.title||null==EditorUi.scratchpadHelpLink||(d=document.createElement("span"),d.setAttribute("title",mxResources.get("help")),d.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;",mxUtils.write(d,"?"),mxEvent.addGestureListeners(d,
+"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):w(c,d)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(k,"dragleave",function(a){null!=f?f.style.border="3px dotted lightGray":(k.style.border="3px solid transparent",k.style.cursor="");a.stopPropagation();a.preventDefault()}));p=p.cloneNode(!1);p.setAttribute("src",Editor.editImage);p.setAttribute("title",mxResources.get("edit"));l.insertBefore(p,l.firstChild);mxEvent.addListener(p,"click",t);mxEvent.addListener(k,
+"dblclick",function(a){mxEvent.getSource(a)==k&&t(a)});d=p.cloneNode(!1);d.setAttribute("src",Editor.plusImage);d.setAttribute("title",mxResources.get("add"));l.insertBefore(d,l.firstChild);mxEvent.addListener(d,"click",K);this.isOffline()||".scratchpad"!=a.title||null==EditorUi.scratchpadHelpLink||(d=document.createElement("span"),d.setAttribute("title",mxResources.get("help")),d.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;",mxUtils.write(d,"?"),mxEvent.addGestureListeners(d,
mxUtils.bind(this,function(a){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(a)})),l.insertBefore(d,l.firstChild))}v.appendChild(l);v.style.paddingRight=18*l.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(a,b){for(var c=0;c<a.length;c++){var d=a[c],f=d.data;if(null!=f){var f=this.convertDataUri(f),e="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==d.aspect&&(e+="aspect=fixed;");b.appendChild(this.sidebar.createVertexTemplate(e+
"image="+f,d.w,d.h,"",d.title||"",!1,!1,!0))}else null!=d.xml&&(f=this.stringToCells(this.editor.graph.decompress(d.xml)),0<f.length&&b.appendChild(this.sidebar.createVertexTemplateFromCells(f,d.w,d.h,d.title||"",!0,!1,!0)))}};EditorUi.prototype.getResource=function(a){return null!=a?a[mxLanguage]||a.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.offline||EditorUi.isElectronApp||("1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64),EditorUi.prototype.createFooter=
function(){return document.getElementById("geFooter")});EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground=mxClient.IS_QUIRKS?"none":"linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38,EditorUi.prototype.hsplitPosition=
188,Sidebar.prototype.thumbWidth=46,Sidebar.prototype.thumbHeight=46,Sidebar.prototype.thumbPadding=5<=document.documentMode?0:1,Sidebar.prototype.thumbBorder=2):"dark"==uiTheme&&(mxClient.link("stylesheet",STYLE_PATH+"/dark.css"),Dialog.backdropColor="#2a2a2a",Graph.prototype.defaultThemeName="darkTheme",Graph.prototype.defaultPageBackgroundColor="#2a2a2a",Graph.prototype.defaultPageBorderColor="#505759",Graph.prototype.svgShadowColor="#e0e0e0",Graph.prototype.svgShadowOpacity="0.6",Graph.prototype.svgShadowSize=
"0.8",Graph.prototype.svgShadowBlur="1.4",Format.prototype.inactiveTabBackgroundColor="black",BaseFormatPanel.prototype.buttonBackgroundColor="#2a2a2a",Sidebar.prototype.dragPreviewBorder="1px dashed #cccccc",mxGraphHandler.prototype.previewColor="#cccccc",StyleFormatPanel.prototype.defaultStrokeColor="#cccccc",mxClient.IS_SVG&&(Editor.helpImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAP1BMVEUAAAD///////////////////////////////////////////////////////////////////////////////9Du/pqAAAAFXRSTlMAT30qCJRBboyDZyCgRzUUdF46MJlgXETgAAAAeklEQVQY022O2w4DIQhEQUURda/9/28tUO2+7CQS5sgQ4F1RapX78YUwRqQjTU8ILqQfKerTKTvACJ4nLX3krt+8aS82oI8aQC4KavRgtvEW/mDvsICgA03PSGRr79MqX1YPNIxzjyqtw8ZnnRo4t5a5undtJYRywau+ds4Cyza3E6YAAAAASUVORK5CYII=",
Editor.checkmarkImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAMAAACeyVWkAAAARVBMVEUAAACZmZkICAgEBASNjY2Dg4MYGBiTk5N5eXl1dXVmZmZQUFBCQkI3NzceHh4MDAykpKSJiYl+fn5sbGxaWlo/Pz8SEhK96uPlAAAAAXRSTlMAQObYZgAAAE5JREFUGNPFzTcSgDAQQ1HJGUfy/Y9K7V1qeOUfzQifCQZai1XHaz11LFysbDbzgDSSWMZiETz3+b8yNUc/MMsktxuC8XQBSncdLwz+8gCCggGXzBcozAAAAABJRU5ErkJggg=="))};EditorUi.initTheme();EditorUi.prototype.hideFooter=function(){var a=document.getElementById("geFooter");null!=a&&(this.footerHeight=0,a.style.display=
-"none",this.refresh())};EditorUi.prototype.showFooter=function(a){var c=document.getElementById("geFooter");null!=c&&(this.footerHeight=a,c.style.display="inline",this.refresh())};EditorUi.prototype.showImageDialog=function(a,b,d,e,r){a=new ImageDialog(this,a,b,d,e,r);this.showDialog(a.container,Graph.fileSupport?440:360,Graph.fileSupport?200:90,!0,!0);a.init()};EditorUi.prototype.showBackgroundImageDialog=function(a){a=null!=a?a:mxUtils.bind(this,function(a){a=new ChangePageSetup(this,null,a);a.ignoreColor=
-!0;this.editor.graph.model.execute(a)});var c=new BackgroundImageDialog(this,mxUtils.bind(this,function(c){a(c)}));this.showDialog(c.container,360,200,!0,!0);c.init()};EditorUi.prototype.showLibraryDialog=function(a,b,d,e,r){a=new LibraryDialog(this,a,b,d,e,r);this.showDialog(a.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));a.init()};EditorUi.prototype.createSidebarFooterContainer=function(){var a=this.createDiv("geSidebarContainer");
+"none",this.refresh())};EditorUi.prototype.showFooter=function(a){var c=document.getElementById("geFooter");null!=c&&(this.footerHeight=a,c.style.display="inline",this.refresh())};EditorUi.prototype.showImageDialog=function(a,b,d,e,k){a=new ImageDialog(this,a,b,d,e,k);this.showDialog(a.container,Graph.fileSupport?440:360,Graph.fileSupport?200:90,!0,!0);a.init()};EditorUi.prototype.showBackgroundImageDialog=function(a){a=null!=a?a:mxUtils.bind(this,function(a){a=new ChangePageSetup(this,null,a);a.ignoreColor=
+!0;this.editor.graph.model.execute(a)});var c=new BackgroundImageDialog(this,mxUtils.bind(this,function(c){a(c)}));this.showDialog(c.container,360,200,!0,!0);c.init()};EditorUi.prototype.showLibraryDialog=function(a,b,d,e,k){a=new LibraryDialog(this,a,b,d,e,k);this.showDialog(a.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));a.init()};EditorUi.prototype.createSidebarFooterContainer=function(){var a=this.createDiv("geSidebarContainer");
a.style.position="absolute";a.style.overflow="hidden";a.style.borderWidth="3px";var b=document.createElement("a");b.className="geTitle";b.style.height="100%";b.style.paddingTop="9px";b.innerHTML='<span style="font-size:18px;margin-right:5px;">+</span>';mxUtils.write(b,mxResources.get("moreShapes")+"...");mxEvent.addListener(b,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(a){a.preventDefault()}));mxEvent.addListener(b,"click",mxUtils.bind(this,function(a){this.actions.get("shapes").funct();
mxEvent.consume(a)}));a.appendChild(b);return a};EditorUi.prototype.handleError=function(a,b,d,e){var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},f=null!=a&&null!=a.error?a.error:a;if(null!=f||null!=b){a=mxUtils.htmlEntities(mxResources.get("unknownError"));var g=mxResources.get("ok"),n=null;b=null!=b?b:mxResources.get("error");if(null!=f)if(null!=f.retry&&(g=mxResources.get("cancel"),n=function(){c();f.retry()}),404==f.code||404==f.status||403==f.code){a=403==
f.code?null!=f.message?mxUtils.htmlEntities(f.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied"));var k=window.location.hash;null!=k&&"#G"==k.substring(0,2)&&(k=k.substring(2),a+='<br><a href="https://drive.google.com/open?id='+k+'" target="_blank">'+mxUtils.htmlEntities(mxResources.get("tryOpeningViaThisPage"))+"</a>")}else null!=f.message?a=mxUtils.htmlEntities(f.message):null!=f.response&&null!=f.response.error?a=mxUtils.htmlEntities(f.response.error):
-"undefined"!==window.App&&(f.code==App.ERROR_TIMEOUT?a=mxUtils.htmlEntities(mxResources.get("timeout")):f.code==App.ERROR_BUSY&&(a=mxUtils.htmlEntities(mxResources.get("busy"))));this.showError(b,a,g,d,n,null,null,null,null,null,null,null,e?d:null)}else null!=d&&d()};EditorUi.prototype.showError=function(a,b,d,e,r,h,m,k,v,l,p,t,q){a=new ErrorDialog(this,a,b,d||mxResources.get("ok"),e,r,h,m,t,k,v);this.showDialog(a.container,l||340,p||(null!=b&&120<b.length?180:150),!0,!1,q);a.init()};EditorUi.prototype.alert=
-function(a,b){var c=new ErrorDialog(this,null,a,mxResources.get("ok"),b);this.showDialog(c.container,340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(a,b,d,e,r){var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){};a=new ConfirmDialog(this,a,function(){c();null!=b&&b()},function(){c();null!=d&&d()},e,r);this.showDialog(a.container,340,90,!0,!1);a.init()};EditorUi.prototype.setCurrentFile=function(a){this.currentFile=a};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};
+"undefined"!==window.App&&(f.code==App.ERROR_TIMEOUT?a=mxUtils.htmlEntities(mxResources.get("timeout")):f.code==App.ERROR_BUSY&&(a=mxUtils.htmlEntities(mxResources.get("busy"))));this.showError(b,a,g,d,n,null,null,null,null,null,null,null,e?d:null)}else null!=d&&d()};EditorUi.prototype.showError=function(a,b,d,e,k,h,m,l,v,p,q,u,z){a=new ErrorDialog(this,a,b,d||mxResources.get("ok"),e,k,h,m,u,l,v);this.showDialog(a.container,p||340,q||(null!=b&&120<b.length?180:150),!0,!1,z);a.init()};EditorUi.prototype.alert=
+function(a,b){var c=new ErrorDialog(this,null,a,mxResources.get("ok"),b);this.showDialog(c.container,340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(a,b,d,e,k){var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){};a=new ConfirmDialog(this,a,function(){c();null!=b&&b()},function(){c();null!=d&&d()},e,k);this.showDialog(a.container,340,90,!0,!1);a.init()};EditorUi.prototype.setCurrentFile=function(a){this.currentFile=a};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};
EditorUi.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||!this.editor.graph.mathEnabled&&this.useCanvasForExport};EditorUi.prototype.createSvgDataUri=function(a){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(a)))};EditorUi.prototype.createImageDataUri=function(a,b,d){var c=a.toDataURL("image/"+d);if(6>=c.length||c==a.cloneNode(!1).toDataURL("image/"+d))throw{message:"Invalid image"};null!=b&&(c=this.writeGraphModelToPng(c,"zTXt","mxGraphModel",atob(this.editor.graph.compress(b))));
return c};EditorUi.prototype.saveCanvas=function(a,b,d){var c="jpeg"==d?"jpg":d,f=this.getBaseFilename()+"."+c;a=this.createImageDataUri(a,b,d);this.saveData(f,c,a.substring(a.lastIndexOf(",")+1),"image/"+d,!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&&!mxClient.IS_QUIRKS||this.isOfflineApp()||mxClient.IS_IOS};
-EditorUi.prototype.showTextDialog=function(a,b){var c=new TextareaDialog(this,a,b,null,null,mxResources.get("close"));c.textarea.style.width="600px";c.textarea.style.height="380px";this.showDialog(c.container,620,460,!0,!0);c.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(a,b,d,e,r){if(window.Blob&&navigator.msSaveOrOpenBlob)a=e?this.base64ToBlob(a,d):new Blob([a],{type:d}),navigator.msSaveOrOpenBlob(a,b);else if(mxClient.IS_IE)d=window.open("about:blank",
+EditorUi.prototype.showTextDialog=function(a,b){var c=new TextareaDialog(this,a,b,null,null,mxResources.get("close"));c.textarea.style.width="600px";c.textarea.style.height="380px";this.showDialog(c.container,620,460,!0,!0);c.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(a,b,d,e,k){if(window.Blob&&navigator.msSaveOrOpenBlob)a=e?this.base64ToBlob(a,d):new Blob([a],{type:d}),navigator.msSaveOrOpenBlob(a,b);else if(mxClient.IS_IE)d=window.open("about:blank",
"_blank"),null==d?mxUtils.popup(a,!0):(d.document.write(a),d.document.close(),d.document.execCommand("SaveAs",!0,b),d.close());else if(mxClient.IS_IOS)this.showTextDialog(b+":",a);else{var c=document.createElement("a"),f=!mxClient.IS_SF&&0>navigator.userAgent.indexOf("PaleMoon/")&&"undefined"!==typeof c.download;if(mxClient.IS_GC)var g=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./),f=65==(g?parseInt(g[2],10):!1)?!1:f;if(f||this.isOffline()){c.href=URL.createObjectURL(e?this.base64ToBlob(a,
-d):new Blob([a],{type:d}));f?c.download=b:c.setAttribute("target","_blank");document.body.appendChild(c);try{window.setTimeout(function(){URL.revokeObjectURL(c.href)},0),c.click(),c.parentNode.removeChild(c)}catch(v){}}else this.createEchoRequest(a,b,d,e,r).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,d,e,r,h){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=d?"&mime="+d:"")+(null!=r?"&format="+r:"")+(null!=h?"&base64="+h:"")+(null!=b?"&filename="+
-encodeURIComponent(b):"")+(e?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=b||"";for(var c=atob(a),d=c.length,e=Math.ceil(d/1024),f=Array(e),m=0;m<e;++m){for(var k=1024*m,v=Math.min(k+1024,d),l=Array(v-k),p=0;k<v;++p,++k)l[p]=c[k].charCodeAt(0);f[m]=new Uint8Array(l)}return new Blob(f,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,d,e,k,h,m){h=null!=h?h:!1;m=null!=m?m:"vsdx"!=k&&(!mxClient.IS_IOS||!navigator.standalone);k=this.getServiceCount(h);b=new CreateDialog(this,
-b,mxUtils.bind(this,function(c,b){try{if("_blank"==b)if(null==d||"image/"!=d.substring(0,6)||"image/svg"==d.substring(0,9)&&!mxClient.IS_SVG){var f=window.open("about:blank");null==f?mxUtils.popup(a,!0):(f.document.write(mxUtils.htmlEntities(a,!1)),f.document.close())}else this.openInNewWindow(a,d,e);else b==App.MODE_DEVICE||"download"==b?this.doSaveLocalFile(a,c,d,e):null!=c&&0<c.length&&this.pickFolder(b,mxUtils.bind(this,function(f){try{this.exportFile(a,c,d,e,b,f)}catch(t){this.handleError(t)}}))}catch(x){this.handleError(x)}}),
+d):new Blob([a],{type:d}));f?c.download=b:c.setAttribute("target","_blank");document.body.appendChild(c);try{window.setTimeout(function(){URL.revokeObjectURL(c.href)},0),c.click(),c.parentNode.removeChild(c)}catch(v){}}else this.createEchoRequest(a,b,d,e,k).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,d,e,k,h){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=d?"&mime="+d:"")+(null!=k?"&format="+k:"")+(null!=h?"&base64="+h:"")+(null!=b?"&filename="+
+encodeURIComponent(b):"")+(e?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=b||"";for(var c=atob(a),d=c.length,e=Math.ceil(d/1024),f=Array(e),m=0;m<e;++m){for(var k=1024*m,l=Math.min(k+1024,d),p=Array(l-k),q=0;k<l;++q,++k)p[q]=c[k].charCodeAt(0);f[m]=new Uint8Array(p)}return new Blob(f,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,d,e,k,h,m){h=null!=h?h:!1;m=null!=m?m:"vsdx"!=k&&(!mxClient.IS_IOS||!navigator.standalone);k=this.getServiceCount(h);b=new CreateDialog(this,
+b,mxUtils.bind(this,function(c,b){try{if("_blank"==b)if(null==d||"image/"!=d.substring(0,6)||"image/svg"==d.substring(0,9)&&!mxClient.IS_SVG){var f=window.open("about:blank");null==f?mxUtils.popup(a,!0):(f.document.write(mxUtils.htmlEntities(a,!1)),f.document.close())}else this.openInNewWindow(a,d,e);else b==App.MODE_DEVICE||"download"==b?this.doSaveLocalFile(a,c,d,e):null!=c&&0<c.length&&this.pickFolder(b,mxUtils.bind(this,function(f){try{this.exportFile(a,c,d,e,b,f)}catch(u){this.handleError(u)}}))}catch(x){this.handleError(x)}}),
mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,h,m,null,1<k,4<k&&(!h||6>k)?3:4,a,d,e);this.showDialog(b.container,420,k==(mxClient.IS_IOS?0:1)?160:4<k?390:270,!0,!0);b.init()};EditorUi.prototype.openInNewWindow=function(a,b,d){if(mxClient.IS_GC||mxClient.IS_EDGE||11==document.documentMode||10==document.documentMode){var c=window.open("about:blank");null==c?mxUtils.popup(a,!0):("image/svg+xml"==b?c.document.write("<html>"+a+"</html>"):c.document.write('<html><img src="data:'+
b+(d?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))+'"/></html>'),c.document.close())}else c=window.open("data:"+b+(d?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))),null==c&&mxUtils.popup(a,!0)};var b=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.addChromelessToolbarItems=function(a){if(this.isExportToCanvas()){this.exportDialog=null;var c=a(mxUtils.bind(this,function(a){var b=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",b);
null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)b.apply(this);else{this.exportDialog=document.createElement("div");var d=c.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily="Helvetica,Arial";this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width=
@@ -2971,48 +2972,48 @@ a),null!=b&&b!=mxConstants.NONE&&f.push("highlight="+("#"==b.charAt(0)?b.substri
(d="#"+c.getHash(),a=!1));a&&null!=c&&null!=c.getTitle()&&c.getTitle()!=this.defaultFilename&&f.push("title="+encodeURIComponent(c.getTitle()));return(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?"https://www.draw.io/":"https://"+window.location.host+"/")+(0<f.length?"?"+f.join("&"):"")+d};EditorUi.prototype.createHtml=function(a,b,d,e,k,h,m,l,v,p,q){this.getBasenames();var c={};""!=k&&k!=mxConstants.NONE&&(c.highlight=k);"auto"!==e&&(c.target=e);
v||(c.lightbox=!1);c.nav=this.editor.graph.foldingEnabled;d=parseInt(d);isNaN(d)||100==d||(c.zoom=d/100);d=[];m&&(d.push("pages"),c.resize=!0,null!=this.pages&&null!=this.currentPage&&(c.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(d.push("zoom"),c.resize=!0);l&&d.push("layers");0<d.length&&(v&&d.push("lightbox"),c.toolbar=d.join(" "));null!=p&&0<p.length&&(c.edit=p);null!=a?c.url=a:c.xml=this.getFileData(!0,null,null,null,null,!m);b='<div class="mxgraph" style="'+(h?"max-width:100%;":
"")+(""!=d?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(c))+'"></div>';a=null!=a?"&fetch="+encodeURIComponent(a):"";q(b,'<script type="text/javascript" src="'+(0<a.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":"https://www.draw.io/embed2.js?")+a:"1"==urlParams.dev?"https://test.draw.io/js/viewer.min.js":"https://www.draw.io/js/viewer.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(a,b,d,e){var c=document.createElement("div");
-c.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("html"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(f);var g=document.createElement("div");g.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");f=n.cloneNode(!0);f.setAttribute("value","copy");g.appendChild(f);var k=document.createElement("span");mxUtils.write(k,mxResources.get("includeCopyOfMyDiagram"));g.appendChild(k);mxUtils.br(g);g.appendChild(n);k=document.createElement("span");mxUtils.write(k,mxResources.get("publicDiagramUrl"));g.appendChild(k);var l=this.getCurrentFile();null==d&&null!=l&&l.constructor==window.DriveFile&&(k=document.createElement("a"),k.style.paddingLeft="12px",k.style.color="gray",k.setAttribute("href",
-"javascript:void(0);"),mxUtils.write(k,mxResources.get("share")),g.appendChild(k),mxEvent.addListener(k,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(l.getId())})));f.setAttribute("checked","checked");null==d&&n.setAttribute("disabled","disabled");c.appendChild(g);var p=this.addLinkSection(c),t=this.addCheckbox(c,mxResources.get("zoom"),!0,null,!0);mxUtils.write(c,":");var q=document.createElement("input");q.setAttribute("type","text");q.style.marginRight="16px";
-q.style.width="60px";q.style.marginLeft="4px";q.style.marginRight="12px";q.value="100%";c.appendChild(q);var B=this.addCheckbox(c,mxResources.get("fit"),!0),g=null!=this.pages&&1<this.pages.length,u=u=this.addCheckbox(c,mxResources.get("allPages"),g,!g),C=this.addCheckbox(c,mxResources.get("layers"),!0),G=this.addCheckbox(c,mxResources.get("lightbox"),!0),J=this.addEditButton(c,G),y=J.getEditInput();y.style.marginBottom="16px";mxEvent.addListener(G,"change",function(){G.checked?y.removeAttribute("disabled"):
-y.setAttribute("disabled","disabled");y.checked&&G.checked?J.getEditSelect().removeAttribute("disabled"):J.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,c,mxUtils.bind(this,function(){e(n.checked?d:null,t.checked,q.value,p.getTarget(),p.getColor(),B.checked,u.checked,C.checked,G.checked,J.getLink())}),null,a,b);this.showDialog(a.container,340,384,!0,!0);f.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,d,e,k,h){var c=document.createElement("div");c.style.whiteSpace=
+c.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("html"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(f);var g=document.createElement("div");g.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var k=document.createElement("input");k.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";k.setAttribute("value","url");k.setAttribute("type","radio");k.setAttribute("name",
+"type-embedhtmldialog");f=k.cloneNode(!0);f.setAttribute("value","copy");g.appendChild(f);var n=document.createElement("span");mxUtils.write(n,mxResources.get("includeCopyOfMyDiagram"));g.appendChild(n);mxUtils.br(g);g.appendChild(k);n=document.createElement("span");mxUtils.write(n,mxResources.get("publicDiagramUrl"));g.appendChild(n);var l=this.getCurrentFile();null==d&&null!=l&&l.constructor==window.DriveFile&&(n=document.createElement("a"),n.style.paddingLeft="12px",n.style.color="gray",n.setAttribute("href",
+"javascript:void(0);"),mxUtils.write(n,mxResources.get("share")),g.appendChild(n),mxEvent.addListener(n,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(l.getId())})));f.setAttribute("checked","checked");null==d&&k.setAttribute("disabled","disabled");c.appendChild(g);var p=this.addLinkSection(c),u=this.addCheckbox(c,mxResources.get("zoom"),!0,null,!0);mxUtils.write(c,":");var q=document.createElement("input");q.setAttribute("type","text");q.style.marginRight="16px";
+q.style.width="60px";q.style.marginLeft="4px";q.style.marginRight="12px";q.value="100%";c.appendChild(q);var C=this.addCheckbox(c,mxResources.get("fit"),!0),g=null!=this.pages&&1<this.pages.length,t=t=this.addCheckbox(c,mxResources.get("allPages"),g,!g),D=this.addCheckbox(c,mxResources.get("layers"),!0),G=this.addCheckbox(c,mxResources.get("lightbox"),!0),K=this.addEditButton(c,G),y=K.getEditInput();y.style.marginBottom="16px";mxEvent.addListener(G,"change",function(){G.checked?y.removeAttribute("disabled"):
+y.setAttribute("disabled","disabled");y.checked&&G.checked?K.getEditSelect().removeAttribute("disabled"):K.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,c,mxUtils.bind(this,function(){e(k.checked?d:null,u.checked,q.value,p.getTarget(),p.getColor(),C.checked,t.checked,D.checked,G.checked,K.getLink())}),null,a,b);this.showDialog(a.container,340,384,!0,!0);f.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,d,e,k,h){var c=document.createElement("div");c.style.whiteSpace=
"nowrap";var f=document.createElement("h3");mxUtils.write(f,a||mxResources.get("link"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(f);var g=this.getCurrentFile(),f="https://desk.draw.io/support/solutions/articles/16000051941";a=0;if(null!=g&&g.constructor==window.DriveFile&&!b){a=80;var f="https://desk.draw.io/support/solutions/articles/16000039384",n=document.createElement("div");n.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";
var r=document.createElement("div");r.style.whiteSpace="normal";mxUtils.write(r,mxResources.get("linkAccountRequired"));n.appendChild(r);r=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(g.getId())}));r.style.marginTop="12px";r.className="geBtn";n.appendChild(r);c.appendChild(n);r=document.createElement("a");r.style.paddingLeft="12px";r.style.color="gray";r.style.fontSize="11px";r.setAttribute("href","javascript:void(0);");mxUtils.write(r,mxResources.get("check"));
n.appendChild(r);mxEvent.addListener(r,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(a){this.spinner.stop();a=new ErrorDialog(this,null,mxResources.get(null!=a?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(a.container,300,80,!0,!1);a.init()}))}))}var l=null,p=null;if(null!=d||null!=e)a+=30,mxUtils.write(c,mxResources.get("width")+":"),l=document.createElement("input"),
-l.setAttribute("type","text"),l.style.marginRight="16px",l.style.width="50px",l.style.marginLeft="6px",l.style.marginRight="16px",l.style.marginBottom="10px",l.value="100%",c.appendChild(l),mxUtils.write(c,mxResources.get("height")+":"),p=document.createElement("input"),p.setAttribute("type","text"),p.style.width="50px",p.style.marginLeft="6px",p.style.marginBottom="10px",p.value=e+"px",c.appendChild(p),mxUtils.br(c);var q=this.addLinkSection(c,h);d=null!=this.pages&&1<this.pages.length;var u=null;
-if(null==g||g.constructor!=window.DriveFile||b)u=this.addCheckbox(c,mxResources.get("allPages"),d,!d);var C=this.addCheckbox(c,mxResources.get("lightbox"),!0),G=this.addEditButton(c,C),J=G.getEditInput(),y=this.addCheckbox(c,mxResources.get("layers"),!0);y.style.marginLeft=J.style.marginLeft;y.style.marginBottom="16px";y.style.marginTop="8px";mxEvent.addListener(C,"change",function(){C.checked?(y.removeAttribute("disabled"),J.removeAttribute("disabled")):(y.setAttribute("disabled","disabled"),J.setAttribute("disabled",
-"disabled"));J.checked&&C.checked?G.getEditSelect().removeAttribute("disabled"):G.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,c,mxUtils.bind(this,function(){k(q.getTarget(),q.getColor(),null==u?!0:u.checked,C.checked,G.getLink(),y.checked,null!=l?l.value:null,null!=p?p.value:null)}),null,mxResources.get("create"),f);this.showDialog(b.container,340,254+a,!0,!0);null!=l?(l.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?l.select():
+l.setAttribute("type","text"),l.style.marginRight="16px",l.style.width="50px",l.style.marginLeft="6px",l.style.marginRight="16px",l.style.marginBottom="10px",l.value="100%",c.appendChild(l),mxUtils.write(c,mxResources.get("height")+":"),p=document.createElement("input"),p.setAttribute("type","text"),p.style.width="50px",p.style.marginLeft="6px",p.style.marginBottom="10px",p.value=e+"px",c.appendChild(p),mxUtils.br(c);var q=this.addLinkSection(c,h);d=null!=this.pages&&1<this.pages.length;var t=null;
+if(null==g||g.constructor!=window.DriveFile||b)t=this.addCheckbox(c,mxResources.get("allPages"),d,!d);var D=this.addCheckbox(c,mxResources.get("lightbox"),!0),G=this.addEditButton(c,D),K=G.getEditInput(),y=this.addCheckbox(c,mxResources.get("layers"),!0);y.style.marginLeft=K.style.marginLeft;y.style.marginBottom="16px";y.style.marginTop="8px";mxEvent.addListener(D,"change",function(){D.checked?(y.removeAttribute("disabled"),K.removeAttribute("disabled")):(y.setAttribute("disabled","disabled"),K.setAttribute("disabled",
+"disabled"));K.checked&&D.checked?G.getEditSelect().removeAttribute("disabled"):G.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,c,mxUtils.bind(this,function(){k(q.getTarget(),q.getColor(),null==t?!0:t.checked,D.checked,G.getLink(),y.checked,null!=l?l.value:null,null!=p?p.value:null)}),null,mxResources.get("create"),f);this.showDialog(b.container,340,254+a,!0,!0);null!=l?(l.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?l.select():
document.execCommand("selectAll",!1,null)):q.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,d,e){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:4px";c.appendChild(f);var g=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),k=e?null:this.addCheckbox(c,mxResources.get("includeCopyOfMyDiagram"),
!0),f=this.editor.graph,n=e?null:this.addCheckbox(c,mxResources.get("transparentBackground"),f.background==mxConstants.NONE||null==f.background);null!=n&&(n.style.marginBottom="16px");a=new CustomDialog(this,c,mxUtils.bind(this,function(){d(!g.checked,null!=k?k.checked:!1,null!=n?n.checked:!1)}),null,a,b);this.showDialog(a.container,300,e?100:186,!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,d,e,k,h,m,l){m=null!=m?m:!0;var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=
this.editor.graph,g="jpeg"==l?196:300,n=document.createElement("h3");mxUtils.write(n,a);n.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";c.appendChild(n);mxUtils.write(c,mxResources.get("zoom")+":");var r=document.createElement("input");r.setAttribute("type","text");r.style.marginRight="16px";r.style.width="60px";r.style.marginLeft="4px";r.style.marginRight="12px";r.value=this.lastExportZoom||"100%";c.appendChild(r);mxUtils.write(c,mxResources.get("borderWidth")+":");
-var p=document.createElement("input");p.setAttribute("type","text");p.style.marginRight="16px";p.style.width="60px";p.style.marginLeft="4px";p.value=this.lastExportBorder||"0";c.appendChild(p);mxUtils.br(c);var q=this.addCheckbox(c,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=l),w=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,f.isSelectionEmpty()),u=document.createElement("input");u.style.marginTop="16px";u.style.marginRight="8px";u.style.marginLeft="24px";u.setAttribute("disabled",
-"disabled");u.setAttribute("type","checkbox");h&&(c.appendChild(u),mxUtils.write(c,mxResources.get("crop")),mxUtils.br(c),g+=26,mxEvent.addListener(w,"change",function(){w.checked?u.removeAttribute("disabled"):u.setAttribute("disabled","disabled")}));f.isSelectionEmpty()||(u.setAttribute("checked","checked"),u.defaultChecked=!0);var J=this.addCheckbox(c,mxResources.get("shadow"),f.shadowVisible),y=document.createElement("input");y.style.marginTop="16px";y.style.marginRight="8px";y.setAttribute("type",
+var p=document.createElement("input");p.setAttribute("type","text");p.style.marginRight="16px";p.style.width="60px";p.style.marginLeft="4px";p.value=this.lastExportBorder||"0";c.appendChild(p);mxUtils.br(c);var q=this.addCheckbox(c,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=l),w=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,f.isSelectionEmpty()),t=document.createElement("input");t.style.marginTop="16px";t.style.marginRight="8px";t.style.marginLeft="24px";t.setAttribute("disabled",
+"disabled");t.setAttribute("type","checkbox");h&&(c.appendChild(t),mxUtils.write(c,mxResources.get("crop")),mxUtils.br(c),g+=26,mxEvent.addListener(w,"change",function(){w.checked?t.removeAttribute("disabled"):t.setAttribute("disabled","disabled")}));f.isSelectionEmpty()||(t.setAttribute("checked","checked"),t.defaultChecked=!0);var K=this.addCheckbox(c,mxResources.get("shadow"),f.shadowVisible),y=document.createElement("input");y.style.marginTop="16px";y.style.marginRight="8px";y.setAttribute("type",
"checkbox");!this.isOffline()&&this.canvasSupported||y.setAttribute("disabled","disabled");b&&(c.appendChild(y),mxUtils.write(c,mxResources.get("embedImages")),mxUtils.br(c),g+=26);var A=this.addCheckbox(c,mxResources.get("includeCopyOfMyDiagram"),m,null,null,"jpeg"!=l),I=null!=this.pages&&1<this.pages.length,O=this.addCheckbox(c,I?mxResources.get("allPages"):"",I,!I,null,"jpeg"!=l);O.style.marginLeft="24px";O.style.marginBottom="16px";I||(O.style.display="none");mxEvent.addListener(A,"change",function(){A.checked&&
I?O.removeAttribute("disabled"):O.setAttribute("disabled","disabled")});m&&I||O.setAttribute("disabled","disabled");var Q=document.createElement("select");Q.style.maxWidth="260px";Q.style.marginLeft="8px";Q.style.marginRight="10px";Q.className="geBtn";a=document.createElement("option");a.setAttribute("value","auto");mxUtils.write(a,mxResources.get("automatic"));Q.appendChild(a);a=document.createElement("option");a.setAttribute("value","blank");mxUtils.write(a,mxResources.get("openInNewWindow"));Q.appendChild(a);
-a=document.createElement("option");a.setAttribute("value","self");mxUtils.write(a,mxResources.get("openInThisWindow"));Q.appendChild(a);"svg"==l&&(mxUtils.write(c,mxResources.get("links")+":"),c.appendChild(Q),mxUtils.br(c),mxUtils.br(c),g+=26);d=new CustomDialog(this,c,mxUtils.bind(this,function(){this.lastExportBorder=p.value;this.lastExportZoom=r.value;k(r.value,q.checked,!w.checked,J.checked,A.checked,y.checked,p.value,u.checked,!O.checked,Q.value)}),null,d,e);this.showDialog(d.container,340,
+a=document.createElement("option");a.setAttribute("value","self");mxUtils.write(a,mxResources.get("openInThisWindow"));Q.appendChild(a);"svg"==l&&(mxUtils.write(c,mxResources.get("links")+":"),c.appendChild(Q),mxUtils.br(c),mxUtils.br(c),g+=26);d=new CustomDialog(this,c,mxUtils.bind(this,function(){this.lastExportBorder=p.value;this.lastExportZoom=r.value;k(r.value,q.checked,!w.checked,K.checked,A.checked,y.checked,p.value,t.checked,!O.checked,Q.value)}),null,d,e);this.showDialog(d.container,340,
g,!0,!0);r.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?r.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,d,e,k){var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=this.editor.graph;if(null!=b){var g=document.createElement("h3");mxUtils.write(g,b);g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";c.appendChild(g)}var n=this.addCheckbox(c,mxResources.get("fit"),
-!0),r=this.addCheckbox(c,mxResources.get("shadow"),f.shadowVisible&&e,!e),l=this.addCheckbox(c,d),t=this.addCheckbox(c,mxResources.get("lightbox"),!0),p=this.addEditButton(c,t),q=p.getEditInput(),u=1<f.model.getChildCount(f.model.getRoot()),C=this.addCheckbox(c,mxResources.get("layers"),u,!u);C.style.marginLeft=q.style.marginLeft;C.style.marginBottom="12px";C.style.marginTop="8px";mxEvent.addListener(t,"change",function(){t.checked?(u&&C.removeAttribute("disabled"),q.removeAttribute("disabled")):
-(C.setAttribute("disabled","disabled"),q.setAttribute("disabled","disabled"));q.checked&&t.checked?p.getEditSelect().removeAttribute("disabled"):p.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,c,mxUtils.bind(this,function(){a(n.checked,r.checked,l.checked,t.checked,p.getLink(),C.checked)}),null,mxResources.get("embed"),k);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,d,e,k,h,m,l){function c(c){var b=" ",g="";e&&(b=" 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('https://www.draw.io/?client=1&lightbox=1"+
+!0),r=this.addCheckbox(c,mxResources.get("shadow"),f.shadowVisible&&e,!e),l=this.addCheckbox(c,d),u=this.addCheckbox(c,mxResources.get("lightbox"),!0),p=this.addEditButton(c,u),q=p.getEditInput(),t=1<f.model.getChildCount(f.model.getRoot()),D=this.addCheckbox(c,mxResources.get("layers"),t,!t);D.style.marginLeft=q.style.marginLeft;D.style.marginBottom="12px";D.style.marginTop="8px";mxEvent.addListener(u,"change",function(){u.checked?(t&&D.removeAttribute("disabled"),q.removeAttribute("disabled")):
+(D.setAttribute("disabled","disabled"),q.setAttribute("disabled","disabled"));q.checked&&u.checked?p.getEditSelect().removeAttribute("disabled"):p.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,c,mxUtils.bind(this,function(){a(n.checked,r.checked,l.checked,u.checked,p.getLink(),D.checked)}),null,mxResources.get("embed"),k);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,d,e,k,h,m,l){function c(c){var b=" ",g="";e&&(b=" 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('https://www.draw.io/?client=1&lightbox=1"+
(k?"&edit=_blank":"")+(h?"&layers=1":"")+"');}})(this);\"",g+="cursor:pointer;");a&&(g+="max-width:100%;");var n="";d&&(n=' width="'+Math.round(f.width)+'" height="'+Math.round(f.height)+'"');m('<img src="'+c+'"'+n+(""!=g?' style="'+g+'"':"")+b+"/>")}var f=this.editor.graph.getGraphBounds();if(this.isExportToCanvas())this.exportToCanvas(mxUtils.bind(this,function(a){var b=e?this.getFileData(!0):null;a=this.createImageDataUri(a,b,"png");c(a)}),null,null,null,mxUtils.bind(this,function(a){l({message:mxResources.get("unknownError")})}),
null,!0,d?2:1,null,b);else if(b=this.getFileData(!0),f.width*f.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){var g="";d&&(g="&w="+Math.round(2*f.width)+"&h="+Math.round(2*f.height));var n=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(e?"1":"0")+g+"&xml="+encodeURIComponent(b));n.send(mxUtils.bind(this,function(){200<=n.getStatus()&&299>=n.getStatus()?c("data:image/png;base64,"+n.getText()):l({message:mxResources.get("unknownError")})}))}else l({message:mxResources.get("drawingTooLarge")})};
-EditorUi.prototype.createEmbedSvg=function(a,b,d,e,k,h,m){var c=this.editor.graph.getSvg(),f=c.getElementsByTagName("a");if(null!=f)for(var g=0;g<f.length;g++){var n=f[g].getAttribute("href");null!=n&&"#"==n.charAt(0)&&"_blank"==f[g].getAttribute("target")&&f[g].removeAttribute("target")}e&&c.setAttribute("content",this.getFileData(!0));b&&this.editor.graph.addSvgShadow(c);if(d){var r=" ",l="";e&&(r="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('https://www.draw.io/?client=1&lightbox=1"+
-(k?"&edit=_blank":"")+(h?"&layers=1":"")+"');}})(this);\"",l+="cursor:pointer;");a&&(l+="max-width:100%;");this.convertImages(c,mxUtils.bind(this,function(a){m('<img src="'+this.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=l?' style="'+l+'"':"")+r+"/>")}))}else l="",e&&(c.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+
-(k?"&edit=_blank":"")+(h?"&layers=1":"")+"');}}})(this);"),l+="cursor:pointer;"),a&&(a=parseInt(c.getAttribute("width")),b=parseInt(c.getAttribute("height")),c.setAttribute("viewBox","0 0 "+a+" "+b),l+="max-width:100%;max-height:"+b+"px;",c.removeAttribute("height")),""!=l&&c.setAttribute("style",l),m(mxUtils.getXml(c))};EditorUi.prototype.timeSince=function(a){a=Math.floor((new Date-a)/1E3);var c=Math.floor(a/31536E3);if(1<c)return c+" "+mxResources.get("years");c=Math.floor(a/2592E3);if(1<c)return c+
+EditorUi.prototype.createEmbedSvg=function(a,b,d,e,k,h,m){var c=this.editor.graph.getSvg(),f=c.getElementsByTagName("a");if(null!=f)for(var g=0;g<f.length;g++){var n=f[g].getAttribute("href");null!=n&&"#"==n.charAt(0)&&"_blank"==f[g].getAttribute("target")&&f[g].removeAttribute("target")}e&&c.setAttribute("content",this.getFileData(!0));b&&this.editor.graph.addSvgShadow(c);if(d){var l=" ",r="";e&&(l="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('https://www.draw.io/?client=1&lightbox=1"+
+(k?"&edit=_blank":"")+(h?"&layers=1":"")+"');}})(this);\"",r+="cursor:pointer;");a&&(r+="max-width:100%;");this.convertImages(c,mxUtils.bind(this,function(a){m('<img src="'+this.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=r?' style="'+r+'"':"")+l+"/>")}))}else r="",e&&(c.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+
+(k?"&edit=_blank":"")+(h?"&layers=1":"")+"');}}})(this);"),r+="cursor:pointer;"),a&&(a=parseInt(c.getAttribute("width")),b=parseInt(c.getAttribute("height")),c.setAttribute("viewBox","0 0 "+a+" "+b),r+="max-width:100%;max-height:"+b+"px;",c.removeAttribute("height")),""!=r&&c.setAttribute("style",r),m(mxUtils.getXml(c))};EditorUi.prototype.timeSince=function(a){a=Math.floor((new Date-a)/1E3);var c=Math.floor(a/31536E3);if(1<c)return c+" "+mxResources.get("years");c=Math.floor(a/2592E3);if(1<c)return c+
" "+mxResources.get("months");c=Math.floor(a/86400);if(1<c)return c+" "+mxResources.get("days");c=Math.floor(a/3600);if(1<c)return c+" "+mxResources.get("hours");c=Math.floor(a/60);return 1<c?c+" "+mxResources.get("minutes"):1==c?c+" "+mxResources.get("minute"):null};EditorUi.prototype.convertMath=function(a,b,d,e){a.mathEnabled&&"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?(Editor.MathJaxRender(b),window.setTimeout(mxUtils.bind(this,function(){MathJax.Hub.Queue(mxUtils.bind(this,
function(){e()}))}),0)):e()};EditorUi.prototype.decodeNodeIntoGraph=function(a,b){if(null!=a){var c=null;if("diagram"==a.nodeName)c=a;else if("mxfile"==a.nodeName){var d=a.getElementsByTagName("diagram");if(0<d.length){var c=d[0],e=b.getGlobalVariable;b.getGlobalVariable=function(a){return"page"==a?c.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==a?1:e.apply(this,arguments)}}}null!=c&&(d=b.decompress(mxUtils.getTextContent(c)),null!=d&&0<d.length&&(a=mxUtils.parseXml(d).documentElement))}d=
this.editor.graph;try{this.editor.graph=b,this.editor.setGraphXml(a)}catch(h){}finally{this.editor.graph=d}return a};EditorUi.prototype.getEmbeddedPng=function(a,b,d){var c=this.editor.graph,e=null;if(null!=d&&0<d.length)c=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(c.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(d).documentElement,!0),c),e=d;else if(null!=this.pages&&this.currentPage!=this.pages[0]){var c=this.createTemporaryGraph(c.getStylesheet()),
-f=c.getGlobalVariable,g=this.pages[0];c.getGlobalVariable=function(a){return"page"==a?g.getName():"pagenumber"==a?1:f.apply(this,arguments)};document.body.appendChild(c.container);c.model.setRoot(g.root)}this.exportToCanvas(mxUtils.bind(this,function(d){try{null==e&&(e=this.getFileData(!0));var f=d.toDataURL("image/png"),f=this.writeGraphModelToPng(f,"zTXt","mxGraphModel",atob(this.editor.graph.compress(e)));a(f.substring(f.lastIndexOf(",")+1));c!=this.editor.graph&&c.container.parentNode.removeChild(c.container)}catch(D){null!=
-b&&b(D)}}),null,null,null,mxUtils.bind(this,function(a){null!=b&&b(a)}),null,null,null,null,c.shadowVisible,null,c)};EditorUi.prototype.getEmbeddedSvg=function(a,b,d,e,k,h,m){m=b.background;m==mxConstants.NONE&&(m=null);b=b.getSvg(m,null,null,null,null,h);null!=a&&b.setAttribute("content",a);null!=d&&b.setAttribute("resource",d);if(null!=k)this.convertImages(b,mxUtils.bind(this,function(a){k((e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+
+f=c.getGlobalVariable,g=this.pages[0];c.getGlobalVariable=function(a){return"page"==a?g.getName():"pagenumber"==a?1:f.apply(this,arguments)};document.body.appendChild(c.container);c.model.setRoot(g.root)}this.exportToCanvas(mxUtils.bind(this,function(d){try{null==e&&(e=this.getFileData(!0));var f=d.toDataURL("image/png"),f=this.writeGraphModelToPng(f,"zTXt","mxGraphModel",atob(this.editor.graph.compress(e)));a(f.substring(f.lastIndexOf(",")+1));c!=this.editor.graph&&c.container.parentNode.removeChild(c.container)}catch(E){null!=
+b&&b(E)}}),null,null,null,mxUtils.bind(this,function(a){null!=b&&b(a)}),null,null,null,null,c.shadowVisible,null,c)};EditorUi.prototype.getEmbeddedSvg=function(a,b,d,e,k,h,m){m=b.background;m==mxConstants.NONE&&(m=null);b=b.getSvg(m,null,null,null,null,h);null!=a&&b.setAttribute("content",a);null!=d&&b.setAttribute("resource",d);if(null!=k)this.convertImages(b,mxUtils.bind(this,function(a){k((e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+
mxUtils.getXml(a))}));else return(e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(b)};EditorUi.prototype.exportImage=function(a,b,d,e,k,h,m,l,p){p=null!=p?p:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var c=this.editor.graph.isSelectionEmpty();d=null!=d?d:c;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();
-try{this.saveCanvas(a,k?this.getFileData(!0,null,null,null,d,l):null,p)}catch(t){"Invalid image"==t.message?this.downloadFile(p):this.handleError(t)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,d,a||1,b,e,null,null,h,m)}catch(x){this.spinner.stop(),this.handleError(x)}}};EditorUi.prototype.loadFonts=function(a){if(null!=this.editor.fontCss&&null==this.editor.resolvedFontCss){var c=function(a){return a.replace(RegExp("^[\\s\"']+","g"),
-"").replace(RegExp("[\\s\"']+$","g"),"")},b=this.editor.fontCss.split("url("),d=0,e={},h=mxUtils.bind(this,function(){if(0==d){for(var f=[b[0]],g=1;g<b.length;g++){var h=b[g].indexOf(")");f.push('url("');f.push(e[c(b[g].substring(0,h))]);f.push('"'+b[g].substring(h))}this.editor.resolvedFontCss=f.join("");a()}});if(0<b.length)for(var m=1;m<b.length;m++){var k=b[m].indexOf(")"),l=null,p=b[m].indexOf("format(",k);0<p&&(l=c(b[m].substring(p+7,b[m].indexOf(")",p))));mxUtils.bind(this,function(a){if(null==
-e[a]){e[a]=a;d++;var c="application/x-font-ttf";if("svg"==l||/(\.svg)($|\?)/i.test(a))c="image/svg+xml";else if("otf"==l||"embedded-opentype"==l||/(\.otf)($|\?)/i.test(a))c="application/x-font-opentype";else if("woff"==l||/(\.woff)($|\?)/i.test(a))c="application/font-woff";else if("woff2"==l||/(\.woff2)($|\?)/i.test(a))c="application/font-woff2";else if("eot"==l||/(\.eot)($|\?)/i.test(a))c="application/vnd.ms-fontobject";else if("sfnt"==l||/(\.sfnt)($|\?)/i.test(a))c="application/font-sfnt";var b=
-a;/^https?:\/\//.test(b)&&!this.isCorsEnabledForUrl(b)&&(b=PROXY_URL+"?url="+encodeURIComponent(a));this.loadUrl(b,mxUtils.bind(this,function(c){e[a]=c;d--;h()}),mxUtils.bind(this,function(a){d--;h()}),!0,null,"data:"+c+";charset=utf-8;base64,")}})(c(b[m].substring(0,k)),l)}}else a()};EditorUi.prototype.exportToCanvas=function(a,b,d,e,k,h,m,l,p,q,x,t,z,u){h=null!=h?h:!0;t=null!=t?t:this.editor.graph;z=null!=z?z:0;var c=p?null:t.background;c==mxConstants.NONE&&(c=null);null==c&&(c=e);null==c&&0==p&&
-(c=this.editor.graph.defaultPageBackgroundColor);this.convertImages(t.getSvg(c,null,null,u,null,null!=m?m:!0,null,null,null,q),mxUtils.bind(this,function(d){var e=new Image;e.onload=mxUtils.bind(this,function(){try{var f=document.createElement("canvas"),g=parseInt(d.getAttribute("width")),m=parseInt(d.getAttribute("height"));l=null!=l?l:1;null!=b&&(l=h?Math.min(1,Math.min(3*b/(4*m),b/g)):b/g);g=Math.ceil(l*g)+2*z;m=Math.ceil(l*m)+2*z;f.setAttribute("width",g);f.setAttribute("height",m);var n=f.getContext("2d");
-null!=c&&(n.beginPath(),n.rect(0,0,g,m),n.fillStyle=c,n.fill());n.scale(l,l);mxClient.IS_SF?window.setTimeout(function(){n.drawImage(e,z/l,z/l);a(f)},0):(n.drawImage(e,z/l,z/l),a(f))}catch(Q){null!=k&&k(Q)}});e.onerror=function(a){null!=k&&k(a)};try{q&&this.editor.graph.addSvgShadow(d,d);var f=mxUtils.bind(this,function(){if(null!=this.editor.resolvedFontCss){var a=document.createElement("style");a.setAttribute("type","text/css");a.innerHTML=this.editor.resolvedFontCss;d.getElementsByTagName("defs")[0].appendChild(a)}this.convertMath(t,
+try{this.saveCanvas(a,k?this.getFileData(!0,null,null,null,d,l):null,p)}catch(u){"Invalid image"==u.message?this.downloadFile(p):this.handleError(u)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,d,a||1,b,e,null,null,h,m)}catch(x){this.spinner.stop(),this.handleError(x)}}};EditorUi.prototype.loadFonts=function(a){if(null!=this.editor.fontCss&&null==this.editor.resolvedFontCss){var c=function(a){return a.replace(RegExp("^[\\s\"']+","g"),
+"").replace(RegExp("[\\s\"']+$","g"),"")},b=this.editor.fontCss.split("url("),d=0,e={},h=mxUtils.bind(this,function(){if(0==d){for(var f=[b[0]],g=1;g<b.length;g++){var h=b[g].indexOf(")");f.push('url("');f.push(e[c(b[g].substring(0,h))]);f.push('"'+b[g].substring(h))}this.editor.resolvedFontCss=f.join("");a()}});if(0<b.length)for(var k=1;k<b.length;k++){var l=b[k].indexOf(")"),p=null,q=b[k].indexOf("format(",l);0<q&&(p=c(b[k].substring(q+7,b[k].indexOf(")",q))));mxUtils.bind(this,function(a){if(null==
+e[a]){e[a]=a;d++;var c="application/x-font-ttf";if("svg"==p||/(\.svg)($|\?)/i.test(a))c="image/svg+xml";else if("otf"==p||"embedded-opentype"==p||/(\.otf)($|\?)/i.test(a))c="application/x-font-opentype";else if("woff"==p||/(\.woff)($|\?)/i.test(a))c="application/font-woff";else if("woff2"==p||/(\.woff2)($|\?)/i.test(a))c="application/font-woff2";else if("eot"==p||/(\.eot)($|\?)/i.test(a))c="application/vnd.ms-fontobject";else if("sfnt"==p||/(\.sfnt)($|\?)/i.test(a))c="application/font-sfnt";var b=
+a;/^https?:\/\//.test(b)&&!this.isCorsEnabledForUrl(b)&&(b=PROXY_URL+"?url="+encodeURIComponent(a));this.loadUrl(b,mxUtils.bind(this,function(c){e[a]=c;d--;h()}),mxUtils.bind(this,function(a){d--;h()}),!0,null,"data:"+c+";charset=utf-8;base64,")}})(c(b[k].substring(0,l)),p)}}else a()};EditorUi.prototype.exportToCanvas=function(a,b,d,e,k,h,m,l,p,q,x,u,z,t){h=null!=h?h:!0;u=null!=u?u:this.editor.graph;z=null!=z?z:0;var c=p?null:u.background;c==mxConstants.NONE&&(c=null);null==c&&(c=e);null==c&&0==p&&
+(c=this.editor.graph.defaultPageBackgroundColor);this.convertImages(u.getSvg(c,null,null,t,null,null!=m?m:!0,null,null,null,q),mxUtils.bind(this,function(d){var e=new Image;e.onload=mxUtils.bind(this,function(){try{var f=document.createElement("canvas"),g=parseInt(d.getAttribute("width")),m=parseInt(d.getAttribute("height"));l=null!=l?l:1;null!=b&&(l=h?Math.min(1,Math.min(3*b/(4*m),b/g)):b/g);g=Math.ceil(l*g)+2*z;m=Math.ceil(l*m)+2*z;f.setAttribute("width",g);f.setAttribute("height",m);var n=f.getContext("2d");
+null!=c&&(n.beginPath(),n.rect(0,0,g,m),n.fillStyle=c,n.fill());n.scale(l,l);mxClient.IS_SF?window.setTimeout(function(){n.drawImage(e,z/l,z/l);a(f)},0):(n.drawImage(e,z/l,z/l),a(f))}catch(Q){null!=k&&k(Q)}});e.onerror=function(a){null!=k&&k(a)};try{q&&this.editor.graph.addSvgShadow(d,d);var f=mxUtils.bind(this,function(){if(null!=this.editor.resolvedFontCss){var a=document.createElement("style");a.setAttribute("type","text/css");a.innerHTML=this.editor.resolvedFontCss;d.getElementsByTagName("defs")[0].appendChild(a)}this.convertMath(u,
d,!0,mxUtils.bind(this,function(){e.src=this.createSvgDataUri(mxUtils.getXml(d))}))});this.loadFonts(f)}catch(y){null!=k&&k(y)}}),d,x)};EditorUi.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var b=a.convert,d=this;a.convert=function(c){if(null!=c){var e="http://"==c.substring(0,7)||"https://"==c.substring(0,8);e&&!navigator.onLine?c=d.svgBrokenImage.src:!e||c.substring(0,a.baseUrl.length)==a.baseUrl||d.crossOriginImages&&d.isCorsEnabledForUrl(c)?"chrome-extension://"!=
-c.substring(0,19)&&(c=b.apply(this,arguments)):c=PROXY_URL+"?url="+encodeURIComponent(c)}return c};return a};EditorUi.prototype.convertImages=function(a,b,d,e){null==e&&(e=this.createImageUrlConverter());var c=0,f=d||{};d=mxUtils.bind(this,function(d,g){for(var h=a.getElementsByTagName(d),m=0;m<h.length;m++)mxUtils.bind(this,function(d){var h=e.convert(d.getAttribute(g));if(null!=h&&"data:"!=h.substring(0,5)){var m=f[h];null==m?(c++,this.convertImageToDataUri(h,function(e){null!=e&&(f[h]=e,d.setAttribute(g,
-e));c--;0==c&&b(a)})):d.setAttribute(g,m)}else null!=h&&d.setAttribute(g,h)})(h[m])});d("image","xlink:href");d("img","src");0==c&&b(a)};EditorUi.prototype.loadUrl=function(a,b,d,e,k,h){try{var c=e||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||/(\.gif)($|\?)/i.test(a);k=null!=k?k:!0;var f=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=b){var e=a.getText();if(c){if((9==document.documentMode||10==document.documentMode)&&
+c.substring(0,19)&&(c=b.apply(this,arguments)):c=PROXY_URL+"?url="+encodeURIComponent(c)}return c};return a};EditorUi.prototype.convertImages=function(a,b,d,e){null==e&&(e=this.createImageUrlConverter());var c=0,f=d||{};d=mxUtils.bind(this,function(d,g){for(var h=a.getElementsByTagName(d),k=0;k<h.length;k++)mxUtils.bind(this,function(d){var h=e.convert(d.getAttribute(g));if(null!=h&&"data:"!=h.substring(0,5)){var k=f[h];null==k?(c++,this.convertImageToDataUri(h,function(e){null!=e&&(f[h]=e,d.setAttribute(g,
+e));c--;0==c&&b(a)})):d.setAttribute(g,k)}else null!=h&&d.setAttribute(g,h)})(h[k])});d("image","xlink:href");d("img","src");0==c&&b(a)};EditorUi.prototype.loadUrl=function(a,b,d,e,k,h){try{var c=e||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||/(\.gif)($|\?)/i.test(a);k=null!=k?k:!0;var f=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=b){var e=a.getText();if(c){if((9==document.documentMode||10==document.documentMode)&&
"undefined"!==typeof window.mxUtilsBinaryToArray){a=mxUtilsBinaryToArray(a.request.responseBody).toArray();for(var e=Array(a.length),f=0;f<a.length;f++)e[f]=String.fromCharCode(a[f]);e=e.join("")}h=null!=h?h:"data:image/png;base64,";e=h+this.base64Encode(e)}b(e)}}else null!=d&&d({code:App.ERROR_UNKNOWN},a)}),function(){null!=d&&d({code:App.ERROR_UNKNOWN})},c,this.timeout,function(){k&&null!=d&&d({code:App.ERROR_TIMEOUT,retry:f})})});f()}catch(v){null!=d&&d(v)}};EditorUi.prototype.isCorsEnabledForUrl=
function(a){null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(a)||"https://raw.githubusercontent.com/"===a.substring(0,34)||"https://cdn.rawgit.com/"===a.substring(0,23)||"https://rawgit.com/"===a.substring(0,19)||/^https?:\/\/[^\/]*\.iconfinder.com\//.test(a)||/^https?:\/\/[^\/]*\.draw\.io\/proxy/.test(a)||/^https?:\/\/[^\/]*\.github\.io\//.test(a)};EditorUi.prototype.convertImageToDataUri=
function(a,b){if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){b(this.createSvgDataUri(a.getText()))}),function(){b(this.svgBrokenImage.src)});else{var c=new Image,d=this;this.crossOriginImages&&(c.crossOrigin="anonymous");c.onload=function(){var a=document.createElement("canvas"),e=a.getContext("2d");a.height=c.height;a.width=c.width;e.drawImage(c,0,0);try{b(a.toDataURL())}catch(m){b(d.svgBrokenImage.src)}};c.onerror=function(){b(d.svgBrokenImage.src)};c.src=a}};EditorUi.prototype.importXml=
@@ -3031,23 +3032,23 @@ else{c=this.editor.graph;k=null;c.getModel().beginUpdate();try{k=c.insertVertex(
c.setLinkForCell(k,k.value),k.geometry.width+=c.gridSize,k.geometry.height+=c.gridSize}finally{c.getModel().endUpdate()}return[k]}}return[]};EditorUi.prototype.formatFileSize=function(a){var c=-1;do a/=1024,c++;while(1024<a);return Math.max(a,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[c]};EditorUi.prototype.convertDataUri=function(a){if("data:"==a.substring(0,5)){var c=a.indexOf(";");0<c&&(a=a.substring(0,c)+a.substring(a.indexOf(",",c+1)))}return a};EditorUi.prototype.isRemoteFileFormat=
function(a,b){return/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(a)};EditorUi.prototype.isLucidChartData=function(a){return null!=a&&'{"state":"{\\"Properties\\":'==a.substring(0,26)};EditorUi.prototype.importLocalFile=function(a,b){if(a&&Graph.fileSupport&&(!mxClient.IS_IE&&!mxClient.IS_IE11||0>navigator.appVersion.indexOf("Windows NT 6.1"))){var c=document.createElement("input");c.setAttribute("type","file");mxEvent.addListener(c,"change",mxUtils.bind(this,function(){null!=c.files&&
this.importFiles(c.files,null,null,this.maxImageSize)}));c.click()}else{window.openNew=!1;window.openKey="import";if(!b){var d=Editor.useLocalStorage;Editor.useLocalStorage=!a}window.openFile=new OpenFile(mxUtils.bind(this,function(a){this.hideDialog(a)}));window.openFile.setConsumer(mxUtils.bind(this,function(a,c){if(null!=c&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(c)){var b=new Blob([a],{type:"application/octet-stream"});this.importVisio(b,mxUtils.bind(this,function(a){this.importXml(a)}),
-null,c)}else this.editor.graph.setSelectionCells(this.importXml(a))}));this.showDialog((new OpenDialog(this)).container,360,220,!0,!0,function(){window.openFile=null});if(!b){var e=this.dialog,f=e.close;this.dialog.close=mxUtils.bind(this,function(a){Editor.useLocalStorage=d;f.apply(e,arguments);a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importFile=function(a,b,d,e,k,h,m,l,p,q,u){q=null!=q?q:!0;var c=!1,f=null,g=mxUtils.bind(this,function(a){var c=
-null;null!=a&&"<mxlibrary"==a.substring(0,10)?this.loadLibrary(new LocalLibrary(this,a,m)):c=this.importXml(a,d,e,q);null!=l&&l(c)});"image"==b.substring(0,5)?(p=!1,"image/png"==b.substring(0,9)&&(b=u?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(f=this.importXml(b,d,e,q),p=!0)),p||(f=this.editor.graph,b=a.indexOf(";"),0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1))),q&&f.isGridEnabled()&&(d=f.snap(d),e=f.snap(e)),f=[f.insertVertex(null,null,"",d,e,k,h,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+null,c)}else this.editor.graph.setSelectionCells(this.importXml(a))}));this.showDialog((new OpenDialog(this)).container,360,220,!0,!0,function(){window.openFile=null});if(!b){var e=this.dialog,f=e.close;this.dialog.close=mxUtils.bind(this,function(a){Editor.useLocalStorage=d;f.apply(e,arguments);a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importFile=function(a,b,d,e,k,h,m,l,p,q,t){q=null!=q?q:!0;var c=!1,f=null,g=mxUtils.bind(this,function(a){var c=
+null;null!=a&&"<mxlibrary"==a.substring(0,10)?this.loadLibrary(new LocalLibrary(this,a,m)):c=this.importXml(a,d,e,q);null!=l&&l(c)});"image"==b.substring(0,5)?(p=!1,"image/png"==b.substring(0,9)&&(b=t?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(f=this.importXml(b,d,e,q),p=!0)),p||(f=this.editor.graph,b=a.indexOf(";"),0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1))),q&&f.isGridEnabled()&&(d=f.snap(d),e=f.snap(e)),f=[f.insertVertex(null,null,"",d,e,k,h,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
a+";")])):/(\.*<graphml )/.test(a)?(c=!0,this.importGraphML(a,g)):null!=p&&null!=m&&(/(\.v(dx|sdx?))($|\?)/i.test(m)||/(\.vs(x|sx?))($|\?)/i.test(m))?(c=!0,this.importVisio(p,g)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,m)?(c=!0,this.parseFile(null!=p?p:new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?g(a.responseText):null!=l&&l(null))}),m)):/(\.v(sd|dx))($|\?)/i.test(m)||/(\.vs(s|x))($|\?)/i.test(m)||
(f=this.insertTextAt(this.validateFileData(a),d,e,!0,null,q));c||null==l||l(f);return f};EditorUi.prototype.base64Encode=function(a){for(var c="",b=0,d=a.length,e,h,k;b<d;){e=a.charCodeAt(b++)&255;if(b==d){c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4);c+="==";break}h=a.charCodeAt(b++);if(b==d){c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);
c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(h&240)>>4);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((h&15)<<2);c+="=";break}k=a.charCodeAt(b++);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(h&240)>>4);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((h&15)<<2|(k&192)>>6);c+=
-"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(k&63)}return c};EditorUi.prototype.importFiles=function(a,b,d,e,k,h,m,l,p,q,u,t){b=null!=b?b:0;d=null!=d?d:0;e=null!=e?e:this.maxImageSize;q=null!=q?q:this.maxImageBytes;var c=null!=b&&null!=d,f=!0,g=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var n=u||this.resampleThreshold,r=0;r<a.length;r++)if("image/"==a[r].type.substring(0,6)&&a[r].size>n){g=!0;break}var v=mxUtils.bind(this,function(){var g=this.editor.graph,n=g.gridSize;
-k=null!=k?k:mxUtils.bind(this,function(a,b,d,e,f,g,h,k,m){return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,h)),null):this.importFile(a,b,d,e,f,g,h,k,m,c,t)});h=null!=h?h:mxUtils.bind(this,function(a){g.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var r=a.length,p=r,v=[],w=mxUtils.bind(this,function(a,c){v[a]=c;if(0==--p){this.spinner.stop();if(null!=l)l(v);else{var b=[];g.getModel().beginUpdate();
-try{for(var d=0;d<v.length;d++){var e=v[d]();null!=e&&(b=b.concat(e))}}finally{g.getModel().endUpdate()}}h(b)}}),z=0;z<r;z++)mxUtils.bind(this,function(c){var h=a[c],l=new FileReader;l.onload=mxUtils.bind(this,function(a){if(null==m||m(h))if("image/"==h.type.substring(0,6))if("image/svg"==h.type.substring(0,9)){var l=a.target.result,r=l.indexOf(","),p=decodeURIComponent(escape(atob(l.substring(r+1)))),v=mxUtils.parseXml(p),p=v.getElementsByTagName("svg");if(0<p.length){var p=p[0],y=t?null:p.getAttribute("content");
+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(k&63)}return c};EditorUi.prototype.importFiles=function(a,b,d,e,k,h,m,l,p,q,t,u){b=null!=b?b:0;d=null!=d?d:0;e=null!=e?e:this.maxImageSize;q=null!=q?q:this.maxImageBytes;var c=null!=b&&null!=d,f=!0,g=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var n=t||this.resampleThreshold,r=0;r<a.length;r++)if("image/"==a[r].type.substring(0,6)&&a[r].size>n){g=!0;break}var v=mxUtils.bind(this,function(){var g=this.editor.graph,n=g.gridSize;
+k=null!=k?k:mxUtils.bind(this,function(a,b,d,e,f,g,h,k,m){return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,h)),null):this.importFile(a,b,d,e,f,g,h,k,m,c,u)});h=null!=h?h:mxUtils.bind(this,function(a){g.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var r=a.length,p=r,v=[],w=mxUtils.bind(this,function(a,c){v[a]=c;if(0==--p){this.spinner.stop();if(null!=l)l(v);else{var b=[];g.getModel().beginUpdate();
+try{for(var d=0;d<v.length;d++){var e=v[d]();null!=e&&(b=b.concat(e))}}finally{g.getModel().endUpdate()}}h(b)}}),z=0;z<r;z++)mxUtils.bind(this,function(c){var h=a[c],l=new FileReader;l.onload=mxUtils.bind(this,function(a){if(null==m||m(h))if("image/"==h.type.substring(0,6))if("image/svg"==h.type.substring(0,9)){var l=a.target.result,r=l.indexOf(","),p=decodeURIComponent(escape(atob(l.substring(r+1)))),v=mxUtils.parseXml(p),p=v.getElementsByTagName("svg");if(0<p.length){var p=p[0],y=u?null:p.getAttribute("content");
null!=y&&"<"!=y.charAt(0)&&"%"!=y.charAt(0)&&(y=unescape(window.atob?atob(y):Base64.decode(y,!0)));null!=y&&"%"==y.charAt(0)&&(y=decodeURIComponent(y));null==y||"<mxfile "!==y.substring(0,8)&&"<mxGraphModel "!==y.substring(0,14)?w(c,mxUtils.bind(this,function(){try{if(l.substring(0,r+1),null!=v){var a=v.getElementsByTagName("svg");if(0<a.length){var f=a[0],m=parseFloat(f.getAttribute("width")),p=parseFloat(f.getAttribute("height")),q=f.getAttribute("viewBox");if(null==q||0==q.length)f.setAttribute("viewBox",
-"0 0 "+m+" "+p);else if(isNaN(m)||isNaN(p)){var t=q.split(" ");3<t.length&&(m=parseFloat(t[2]),p=parseFloat(t[3]))}l=this.createSvgDataUri(mxUtils.getXml(f));var y=Math.min(1,Math.min(e/Math.max(1,m)),e/Math.max(1,p)),w=k(l,h.type,b+c*n,d+c*n,Math.max(1,Math.round(m*y)),Math.max(1,Math.round(p*y)),h.name);if(isNaN(m)||isNaN(p)){var u=new Image;u.onload=mxUtils.bind(this,function(){m=Math.max(1,u.width);p=Math.max(1,u.height);w[0].geometry.width=m;w[0].geometry.height=p;f.setAttribute("viewBox","0 0 "+
-m+" "+p);l=this.createSvgDataUri(mxUtils.getXml(f));var a=l.indexOf(";");0<a&&(l=l.substring(0,a)+l.substring(l.indexOf(",",a+1)));g.setCellStyles("image",l,[w[0]])});u.src=this.createSvgDataUri(mxUtils.getXml(f))}return w}}}catch(fa){}return null})):w(c,mxUtils.bind(this,function(){return k(y,"text/xml",b+c*n,d+c*n,0,0,h.name)}))}else w(c,mxUtils.bind(this,function(){return null}))}else{p=!1;if("image/png"==h.type){var I=t?null:this.extractGraphModelFromPng(a.target.result);if(null!=I&&0<I.length){var z=
-new Image;z.src=a.target.result;w(c,mxUtils.bind(this,function(){return k(I,"text/xml",b+c*n,d+c*n,z.width,z.height,h.name)}));p=!0}}p||(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(a.target.result,mxUtils.bind(this,function(g){this.resizeImage(g,a.target.result,
-mxUtils.bind(this,function(g,m,l){w(c,mxUtils.bind(this,function(){if(null!=g&&g.length<q){var r=f&&this.isResampleImage(a.target.result,u)?Math.min(1,Math.min(e/m,e/l)):1;return k(g,h.type,b+c*n,d+c*n,Math.round(m*r),Math.round(l*r),h.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),f,e,u)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else k(a.target.result,h.type,b+c*n,d+c*n,240,160,h.name,function(a){w(c,
+"0 0 "+m+" "+p);else if(isNaN(m)||isNaN(p)){var u=q.split(" ");3<u.length&&(m=parseFloat(u[2]),p=parseFloat(u[3]))}l=this.createSvgDataUri(mxUtils.getXml(f));var y=Math.min(1,Math.min(e/Math.max(1,m)),e/Math.max(1,p)),w=k(l,h.type,b+c*n,d+c*n,Math.max(1,Math.round(m*y)),Math.max(1,Math.round(p*y)),h.name);if(isNaN(m)||isNaN(p)){var t=new Image;t.onload=mxUtils.bind(this,function(){m=Math.max(1,t.width);p=Math.max(1,t.height);w[0].geometry.width=m;w[0].geometry.height=p;f.setAttribute("viewBox","0 0 "+
+m+" "+p);l=this.createSvgDataUri(mxUtils.getXml(f));var a=l.indexOf(";");0<a&&(l=l.substring(0,a)+l.substring(l.indexOf(",",a+1)));g.setCellStyles("image",l,[w[0]])});t.src=this.createSvgDataUri(mxUtils.getXml(f))}return w}}}catch(ra){}return null})):w(c,mxUtils.bind(this,function(){return k(y,"text/xml",b+c*n,d+c*n,0,0,h.name)}))}else w(c,mxUtils.bind(this,function(){return null}))}else{p=!1;if("image/png"==h.type){var z=u?null:this.extractGraphModelFromPng(a.target.result);if(null!=z&&0<z.length){var I=
+new Image;I.src=a.target.result;w(c,mxUtils.bind(this,function(){return k(z,"text/xml",b+c*n,d+c*n,I.width,I.height,h.name)}));p=!0}}p||(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(a.target.result,mxUtils.bind(this,function(g){this.resizeImage(g,a.target.result,
+mxUtils.bind(this,function(g,m,l){w(c,mxUtils.bind(this,function(){if(null!=g&&g.length<q){var p=f&&this.isResampleImage(a.target.result,t)?Math.min(1,Math.min(e/m,e/l)):1;return k(g,h.type,b+c*n,d+c*n,Math.round(m*p),Math.round(l*p),h.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),f,e,t)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else k(a.target.result,h.type,b+c*n,d+c*n,240,160,h.name,function(a){w(c,
function(){return a})})});/(\.v(dx|sdx?))($|\?)/i.test(h.name)||/(\.vs(x|sx?))($|\?)/i.test(h.name)?k(null,h.type,b+c*n,d+c*n,240,160,h.name,function(a){w(c,function(){return a})},h):"image"==h.type.substring(0,5)?l.readAsDataURL(h):l.readAsText(h)})(z)});g?this.confirmImageResize(function(a){f=a;v()},p):v()};EditorUi.prototype.confirmImageResize=function(a,b){b=null!=b?b:!1;var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},d=isLocalStorage||mxClient.IS_CHROMEAPP?
mxSettings.getResizeImages():null,e=function(d,e){if(d||b)mxSettings.setResizeImages(d?e:null),mxSettings.save();c();a(e)};null==d||b?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(a){e(a,!0)},function(a){e(a,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||
mxClient.IS_CHROMEAPP?220:200,!0,!0):e(!1,d)};EditorUi.prototype.parseFile=function(a,b,d){d=null!=d?d:a.name;var c=new FormData;c.append("format","xml");c.append("upfile",a,d);var e=new XMLHttpRequest;e.open("POST",OPEN_URL);e.onreadystatechange=function(){b(e)};e.send(c)};EditorUi.prototype.isResampleImage=function(a,b){b=null!=b?b:this.resampleThreshold;return a.length>b};EditorUi.prototype.resizeImage=function(a,b,d,e,k,h){k=null!=k?k:this.maxImageSize;var c=Math.max(1,a.width),f=Math.max(1,a.height);
-if(e&&this.isResampleImage(b,h))try{var g=Math.max(c/k,f/k);if(1<g){var l=Math.round(c/g),n=Math.round(f/g),p=document.createElement("canvas");p.width=l;p.height=n;p.getContext("2d").drawImage(a,0,0,l,n);var r=p.toDataURL();if(r.length<b.length){var q=document.createElement("canvas");q.width=l;q.height=n;var u=q.toDataURL();r!==u&&(b=r,c=l,f=n)}}}catch(C){}d(b,c,f)};EditorUi.prototype.crcTable=[];for(var e=0;256>e;e++)for(var d=e,k=0;8>k;k++)d=1==(d&1)?3988292384^d>>>1:d>>>1,EditorUi.prototype.crcTable[e]=
+if(e&&this.isResampleImage(b,h))try{var g=Math.max(c/k,f/k);if(1<g){var l=Math.round(c/g),n=Math.round(f/g),p=document.createElement("canvas");p.width=l;p.height=n;p.getContext("2d").drawImage(a,0,0,l,n);var r=p.toDataURL();if(r.length<b.length){var q=document.createElement("canvas");q.width=l;q.height=n;var t=q.toDataURL();r!==t&&(b=r,c=l,f=n)}}}catch(D){}d(b,c,f)};EditorUi.prototype.crcTable=[];for(var e=0;256>e;e++)for(var d=e,k=0;8>k;k++)d=1==(d&1)?3988292384^d>>>1:d>>>1,EditorUi.prototype.crcTable[e]=
d;EditorUi.prototype.updateCRC=function(a,b,d,e){for(var c=0;c<e;c++)a=EditorUi.prototype.crcTable[(a^b[d+c])&255]^a>>>8;return a};EditorUi.prototype.crc32=function(a){this.crcTable=this.crcTable||this.createCrcTable();for(var c=-1,b=0;b<a.length;b++)c=c>>>8^this.crcTable[(c^a.charCodeAt(b))&255];return(c^-1)>>>0};EditorUi.prototype.writeGraphModelToPng=function(a,b,d,e,k){function c(a,b){var c=l;l+=b;return a.substring(c,l)}function f(a){a=c(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<
16)+(a.charCodeAt(0)<<24)}function g(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var l=0;if(c(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=k&&k();else if(c(a,4),"IHDR"!=c(a,4))null!=k&&k();else{c(a,17);k=a.substring(0,l);do{var n=f(a);if("IDAT"==c(a,4)){k=a.substring(0,l-8);d=d+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+e;e=4294967295;e=this.updateCRC(e,
b,0,4);e=this.updateCRC(e,d,0,d.length);k+=g(d.length)+b+d+g(e^4294967295);k+=a.substring(l-8,a.length);break}k+=a.substring(l-8,l-4+n);c(a,n);c(a,4)}while(n);return"data:image/png;base64,"+(window.btoa?btoa(k):Base64.encode(k,!0))}};EditorUi.prototype.extractGraphModelFromPng=function(a){var b=null;try{var c=a.substring(a.indexOf(",")+1),d=window.atob&&!mxClient.IS_SF?atob(c):Base64.decode(c,!0);EditorUi.parsePng(d,mxUtils.bind(this,function(a,c,e){a=d.substring(a+8,a+8+e);"zTXt"==c?(e=a.indexOf(String.fromCharCode(0)),
@@ -3056,22 +3057,22 @@ d);c.src=a};var l=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxS
arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://desk.draw.io/support/solutions/articles/16000051979");var e=a.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(b){b=null!=b?b:"";if(null!=a.pages&&null!=a.currentPage)for(var c=0;c<a.pages.length;c++)if(a.pages[c]==a.currentPage){0<c&&(b+=(0<b.length?"&":"?")+"page="+c);break}"1"==urlParams.dev&&(b+=(0<b.length?"&":"?")+"dev=1&drawdev=1");return e.apply(this,arguments)};
var k=b.addClickHandler;b.addClickHandler=function(a,c,d){var e=c;c=function(a,c){if(null==c){var d=mxEvent.getSource(a);"a"==d.nodeName.toLowerCase()&&(c=d.getAttribute("href"))}null!=c&&b.isCustomLink(c)&&(mxEvent.isTouchEvent(a)||!mxEvent.isPopupTrigger(a))&&b.customLinkClicked(c)&&mxEvent.consume(a);null!=e&&e(a,c)};k.call(this,a,c,d)};l.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(b.view.canvas.ownerSVGElement,null,!0);a.actions.get("print").funct=function(){a.showDialog((new PrintDialog(a)).container,
360,null!=a.pages&&1<a.pages.length?420:360,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var h=b.getGlobalVariable;b.getGlobalVariable=function(b){return"page"==b&&null!=a.currentPage?a.currentPage.getName():"pagenumber"==b?null!=a.currentPage&&null!=a.pages?mxUtils.indexOf(a.pages,a.currentPage)+1:1:h.apply(this,arguments)};var m=b.labelLinkClicked;b.labelLinkClicked=function(a,c,d){var e=c.getAttribute("href");if(null==e||!b.isCustomLink(e)||!mxEvent.isTouchEvent(d)&&mxEvent.isPopupTrigger(d))m.apply(this,
-arguments);else{if(!b.isEnabled()||null!=a&&b.isCellLocked(a.cell))b.customLinkClicked(e),b.getRubberband().reset();mxEvent.consume(d)}};this.editor.getOrCreateFilename=function(){var b=a.defaultFilename,c=a.getCurrentFile();null!=c&&(b=null!=c.getTitle()?c.getTitle():b);return b};var p=this.actions.get("print");p.setEnabled(!mxClient.IS_IOS||!navigator.standalone);p.visible=p.isEnabled();if(!this.editor.chromeless||this.editor.editable){var q=function(){window.setTimeout(function(){u.innerHTML="&nbsp;";
-u.focus();document.execCommand("selectAll",!1,null)},0)};this.keyHandler.bindAction(70,!0,"find");this.keyHandler.bindAction(67,!0,"copyStyle",!0);this.keyHandler.bindAction(86,!0,"pasteStyle",!0);this.keyHandler.bindAction(77,!0,"editGeometry",!0);this.keyHandler.bindAction(88,!0,"insertText",!0);this.keyHandler.bindAction(75,!0,"insertRectangle");this.keyHandler.bindAction(75,!0,"insertEllipse",!0);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(this.altShiftActions[83]="synchronize");mxClient.IS_IE||
+arguments);else{if(!b.isEnabled()||null!=a&&b.isCellLocked(a.cell))b.customLinkClicked(e),b.getRubberband().reset();mxEvent.consume(d)}};this.editor.getOrCreateFilename=function(){var b=a.defaultFilename,c=a.getCurrentFile();null!=c&&(b=null!=c.getTitle()?c.getTitle():b);return b};var p=this.actions.get("print");p.setEnabled(!mxClient.IS_IOS||!navigator.standalone);p.visible=p.isEnabled();if(!this.editor.chromeless||this.editor.editable){var q=function(){window.setTimeout(function(){t.innerHTML="&nbsp;";
+t.focus();document.execCommand("selectAll",!1,null)},0)};this.keyHandler.bindAction(70,!0,"find");this.keyHandler.bindAction(67,!0,"copyStyle",!0);this.keyHandler.bindAction(86,!0,"pasteStyle",!0);this.keyHandler.bindAction(77,!0,"editGeometry",!0);this.keyHandler.bindAction(88,!0,"insertText",!0);this.keyHandler.bindAction(75,!0,"insertRectangle");this.keyHandler.bindAction(75,!0,"insertEllipse",!0);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(this.altShiftActions[83]="synchronize");mxClient.IS_IE||
b.container.addEventListener("paste",mxUtils.bind(this,function(a){var b=this.editor.graph;if(!mxEvent.isConsumed(a))try{for(var c=a.clipboardData||a.originalEvent.clipboardData,d=!1,e=0;e<c.types.length;e++)if("text/"===c.types[e].substring(0,5)){d=!0;break}if(!d){var f=c.items;for(index in f){var g=f[index];if("file"===g.kind){if(b.isEditing())this.importFiles([g.getAsFile()],0,0,this.maxImageSize,function(a,c,d,e,f,g){b.insertImage(a,f,g)},function(){},function(a){return"image/"==a.type.substring(0,
-6)},function(a){for(var b=0;b<a.length;b++)a[b]()});else{var h=this.editor.graph.getInsertPoint();this.importFiles([g.getAsFile()],h.x,h.y,this.maxImageSize);mxEvent.consume(a)}break}}}}catch(U){}}),!1);var u=document.createElement("div");u.style.position="absolute";u.style.whiteSpace="nowrap";u.style.overflow="hidden";u.style.display="block";u.contentEditable=!0;mxUtils.setOpacity(u,0);u.style.width="1px";u.style.height="1px";u.innerHTML="&nbsp;";var x=!1;this.keyHandler.bindControlKey(88,null);
-this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(a){var c=mxEvent.getSource(a);null==b.container||!b.isEnabled()||b.isMouseDown||b.isEditing()||null!=this.dialog||"INPUT"==c.nodeName||"TEXTAREA"==c.nodeName||!(224==a.keyCode||!mxClient.IS_MAC&&17==a.keyCode||mxClient.IS_MAC&&91==a.keyCode)||x||(u.style.left=b.container.scrollLeft+10+"px",u.style.top=b.container.scrollTop+10+"px",b.container.appendChild(u),
-x=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){u.focus();document.execCommand("selectAll",!1,null)},0):(u.focus(),document.execCommand("selectAll",!1,null)))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(a){var c=a.keyCode;window.setTimeout(mxUtils.bind(this,function(){!x||224!=c&&17!=c&&91!=c||(x=!1,b.isEditing()||null!=this.dialog||null==b.container||b.container.focus(),u.parentNode.removeChild(u),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(u,
-"copy",mxUtils.bind(this,function(a){b.isEnabled()&&(mxClipboard.copy(b),this.copyCells(u),q())}));mxEvent.addListener(u,"cut",mxUtils.bind(this,function(a){b.isEnabled()&&(mxClipboard.copy(b),this.copyCells(u,!0),q())}));mxEvent.addListener(u,"paste",mxUtils.bind(this,function(a){b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(u.innerHTML="&nbsp;",u.focus(),window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,u);u.innerHTML="&nbsp;"}),0))}),!0);var t=this.isSelectionAllowed;this.isSelectionAllowed=
-function(a){return mxEvent.getSource(a)==u?!0:t.apply(this,arguments)}}this.spinner=this.createSpinner(document.body.clientWidth/2-2,Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,24);Graph.fileSupport&&this.editor.graph.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(a){var b=this.editor.graph,c=b.cellEditor.text2,d=null;null!=c&&(mxEvent.addListener(c,"dragleave",function(a){null!=d&&(d.parentNode.removeChild(d),d=null);a.stopPropagation();a.preventDefault()}),
+6)},function(a){for(var b=0;b<a.length;b++)a[b]()});else{var h=this.editor.graph.getInsertPoint();this.importFiles([g.getAsFile()],h.x,h.y,this.maxImageSize);mxEvent.consume(a)}break}}}}catch(T){}}),!1);var t=document.createElement("div");t.style.position="absolute";t.style.whiteSpace="nowrap";t.style.overflow="hidden";t.style.display="block";t.contentEditable=!0;mxUtils.setOpacity(t,0);t.style.width="1px";t.style.height="1px";t.innerHTML="&nbsp;";var x=!1;this.keyHandler.bindControlKey(88,null);
+this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(a){var c=mxEvent.getSource(a);null==b.container||!b.isEnabled()||b.isMouseDown||b.isEditing()||null!=this.dialog||"INPUT"==c.nodeName||"TEXTAREA"==c.nodeName||!(224==a.keyCode||!mxClient.IS_MAC&&17==a.keyCode||mxClient.IS_MAC&&91==a.keyCode)||x||(t.style.left=b.container.scrollLeft+10+"px",t.style.top=b.container.scrollTop+10+"px",b.container.appendChild(t),
+x=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){t.focus();document.execCommand("selectAll",!1,null)},0):(t.focus(),document.execCommand("selectAll",!1,null)))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(a){var c=a.keyCode;window.setTimeout(mxUtils.bind(this,function(){!x||224!=c&&17!=c&&91!=c||(x=!1,b.isEditing()||null!=this.dialog||null==b.container||b.container.focus(),t.parentNode.removeChild(t),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(t,
+"copy",mxUtils.bind(this,function(a){b.isEnabled()&&(mxClipboard.copy(b),this.copyCells(t),q())}));mxEvent.addListener(t,"cut",mxUtils.bind(this,function(a){b.isEnabled()&&(mxClipboard.copy(b),this.copyCells(t,!0),q())}));mxEvent.addListener(t,"paste",mxUtils.bind(this,function(a){b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(t.innerHTML="&nbsp;",t.focus(),window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,t);t.innerHTML="&nbsp;"}),0))}),!0);var u=this.isSelectionAllowed;this.isSelectionAllowed=
+function(a){return mxEvent.getSource(a)==t?!0:u.apply(this,arguments)}}this.spinner=this.createSpinner(document.body.clientWidth/2-2,Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,24);Graph.fileSupport&&this.editor.graph.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(a){var b=this.editor.graph,c=b.cellEditor.text2,d=null;null!=c&&(mxEvent.addListener(c,"dragleave",function(a){null!=d&&(d.parentNode.removeChild(d),d=null);a.stopPropagation();a.preventDefault()}),
mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(a){null==d&&(!mxClient.IS_IE||10<document.documentMode)&&(d=this.highlightElement(c));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(c,"drop",mxUtils.bind(this,function(a){null!=d&&(d.parentNode.removeChild(d),d=null);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,function(a,c,d,e,f,g){b.insertImage(a,f,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=
0;b<a.length;b++)a[b]()},mxEvent.isControlDown(a));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")){var c=a.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)?this.loadImage(decodeURIComponent(c),mxUtils.bind(this,function(a){var d=Math.max(1,a.width);a=Math.max(1,a.height);var e=this.maxImageSize,e=Math.min(1,Math.min(e/Math.max(1,d)),e/Math.max(1,a));b.insertImage(decodeURIComponent(c),d*e,a*e)})):document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"))}else 0<=
mxUtils.indexOf(a.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"));a.stopPropagation();a.preventDefault()})))}));if("1"==urlParams.ruler&&"undefined"!==typeof mxRuler){p=document.createElement("div");p.style.position="absolute";p.style.top="95px";p.style.left="250px";p.style.width="2000px";p.style.height="30px";p.style.background=
-"whiteSmoke";document.body.appendChild(p);var z=document.createElement("div");z.style.position="absolute";z.style.top="125px";z.style.left="220px";z.style.width="30px";z.style.height="1000px";z.style.background="whiteSmoke";document.body.appendChild(z);var B=document.createElement("div");B.style.position="absolute";B.style.top="95px";B.style.left="220px";B.style.width="30px";B.style.height="30px";B.style.background="whiteSmoke";document.body.appendChild(B);this.vRuler=new mxRuler(this.editor.graph,
+"whiteSmoke";document.body.appendChild(p);var z=document.createElement("div");z.style.position="absolute";z.style.top="125px";z.style.left="220px";z.style.width="30px";z.style.height="1000px";z.style.background="whiteSmoke";document.body.appendChild(z);var C=document.createElement("div");C.style.position="absolute";C.style.top="95px";C.style.left="220px";C.style.width="30px";C.style.height="30px";C.style.background="whiteSmoke";document.body.appendChild(C);this.vRuler=new mxRuler(this.editor.graph,
z,!0);this.hRuler=new mxRuler(this.editor.graph,p,!1)}if("1"==urlParams.styledev){p=document.getElementById("geFooter");null!=p&&(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)})),p.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){if(0<this.editor.graph.getSelectionCount()){var c=this.editor.graph.getSelectionCell(),c=this.editor.graph.getModel().getStyle(c);this.styleInput.value=c||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var N=this.isSelectionAllowed;
-this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:N.apply(this,arguments)}}p=document.getElementById("geInfo");null!=p&&p.parentNode.removeChild(p);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var C=null;mxEvent.addListener(b.container,"dragleave",function(a){b.isEnabled()&&(null!=C&&(C.parentNode.removeChild(C),C=null),a.stopPropagation(),a.preventDefault())});mxEvent.addListener(b.container,"dragover",mxUtils.bind(this,function(a){null==
-C&&(!mxClient.IS_IE||10<document.documentMode)&&(C=this.highlightElement(b.container));null!=this.sidebar&&this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()}));mxEvent.addListener(b.container,"drop",mxUtils.bind(this,function(a){null!=C&&(C.parentNode.removeChild(C),C=null);if(b.isEnabled()){var c=mxUtils.convertPoint(b.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),d=b.view.translate,e=b.view.scale,f=c.x/e-d.x,g=c.y/e-d.y;mxEvent.isAltDown(a)&&(g=f=0);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,
+this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:N.apply(this,arguments)}}p=document.getElementById("geInfo");null!=p&&p.parentNode.removeChild(p);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var D=null;mxEvent.addListener(b.container,"dragleave",function(a){b.isEnabled()&&(null!=D&&(D.parentNode.removeChild(D),D=null),a.stopPropagation(),a.preventDefault())});mxEvent.addListener(b.container,"dragover",mxUtils.bind(this,function(a){null==
+D&&(!mxClient.IS_IE||10<document.documentMode)&&(D=this.highlightElement(b.container));null!=this.sidebar&&this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()}));mxEvent.addListener(b.container,"drop",mxUtils.bind(this,function(a){null!=D&&(D.parentNode.removeChild(D),D=null);if(b.isEnabled()){var c=mxUtils.convertPoint(b.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),d=b.view.translate,e=b.view.scale,f=c.x/e-d.x,g=c.y/e-d.y;mxEvent.isAltDown(a)&&(g=f=0);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,
f,g,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a));else{var h=0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):null,c=this.extractGraphModelFromEvent(a,null!=this.pages);if(null!=c)b.setSelectionCells(this.importXml(c,f,g,!0));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")){var k=a.dataTransfer.getData("text/html"),c=document.createElement("div");c.innerHTML=k;var m=null,d=c.getElementsByTagName("img");
null!=d&&1==d.length?(k=d[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)||(m=!0)):(c=c.getElementsByTagName("a"),null!=c&&1==c.length&&(k=c[0].getAttribute("href")));var l=!0,n=mxUtils.bind(this,function(){b.setSelectionCells(this.insertTextAt(k,f,g,!0,m,null,l))});m&&k.length>this.resampleThreshold?this.confirmImageResize(function(a){l=a;n()},mxEvent.isControlDown(a)):n()}else null!=h&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(h)?this.loadImage(decodeURIComponent(h),mxUtils.bind(this,
function(a){var c=Math.max(1,a.width);a=Math.max(1,a.height);var d=this.maxImageSize,d=Math.min(1,Math.min(d/Math.max(1,c)),d/Math.max(1,a));b.setSelectionCell(b.insertVertex(null,null,"",f,g,c*d,a*d,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+h+";"))}),mxUtils.bind(this,function(a){b.setSelectionCells(this.insertTextAt(h,f,g,!0))})):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&b.setSelectionCells(this.insertTextAt(a.dataTransfer.getData("text/plain"),
@@ -3093,7 +3094,7 @@ h.style.top=b+"px";h.style.left=c+"px";h.style.width=Math.max(0,d-3)+"px";h.styl
c))}return a};EditorUi.prototype.openFiles=function(a,b){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var c=0;c<a.length;c++)mxUtils.bind(this,function(a){var c=new FileReader;c.onload=mxUtils.bind(this,function(c){var d=c.target.result,e=a.name;if(null!=e&&0<e.length){!this.useCanvasForExport&&/(\.png)$/i.test(e)&&(e=e.substring(0,e.length-4)+".xml");var f=mxUtils.bind(this,function(a){e=0<=e.lastIndexOf(".")?e.substring(0,e.lastIndexOf("."))+".xml":e+".xml";if("<mxlibrary"==
a.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,b);try{this.loadLibrary(new LocalLibrary(this,a,e))}catch(x){this.handleError(x,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(a,e,b)});if(/(\.v(dx|sdx?))($|\?)/i.test(e)||/(\.vs(x|sx?))($|\?)/i.test(e))this.importVisio(a,mxUtils.bind(this,function(a){this.spinner.stop();f(a)}));else if(/(\.*<graphml )/.test(d))this.importGraphML(d,mxUtils.bind(this,function(a){this.spinner.stop();
f(a)}));else if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,e))this.parseFile(a,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?f(a.responseText):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(d))/(\.json)$/i.test(e)&&(e=e.substring(0,e.length-5)+".xml"),this.convertLucidChart(d,
-mxUtils.bind(this,function(a){this.spinner.stop();this.openLocalFile(a,e,b)}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}));else if("<mxlibrary"==c.target.result.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,b);try{this.loadLibrary(new LocalLibrary(this,c.target.result,a.name))}catch(D){this.handleError(D,mxResources.get("errorLoadingFile"))}}else"image/png"==a.type.substring(0,
+mxUtils.bind(this,function(a){this.spinner.stop();this.openLocalFile(a,e,b)}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}));else if("<mxlibrary"==c.target.result.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,b);try{this.loadLibrary(new LocalLibrary(this,c.target.result,a.name))}catch(E){this.handleError(E,mxResources.get("errorLoadingFile"))}}else"image/png"==a.type.substring(0,
9)&&(d=this.extractGraphModelFromPng(d)),this.spinner.stop(),this.openLocalFile(d,e,b)}});c.onerror=mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a);window.openFile=null});"image"===a.type.substring(0,5)&&"image/svg"!==a.type.substring(0,9)?c.readAsDataURL(a):c.readAsText(a)})(a[c])};EditorUi.prototype.openLocalFile=function(a,b,d){var c=this.getCurrentFile(),e=mxUtils.bind(this,function(){window.openFile=null;if(null==b&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var c=
mxUtils.parseXml(a);null!=c&&(this.editor.setGraphXml(c.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,a,b||this.defaultFilename,d))});null!=a&&0<a.length&&(null==c||!c.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)?e():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&null!=c&&c.isModified()?this.confirm(mxResources.get("allChangesLost"),null,e,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=
null}),window.openFile.setData(a,b),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=c&&c.isModified()?this.confirm(mxResources.get("allChangesLost"),null,e,mxResources.get("cancel"),mxResources.get("discardChanges")):e()}))))};EditorUi.prototype.getBasenames=function(){var a={};if(null!=this.pages)for(var b=0;b<this.pages.length;b++)this.updatePageRoot(this.pages[b]),this.addBasenamesForCell(this.pages[b].root,a);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),
@@ -3111,14 +3112,14 @@ g.action){this.spinner.stop();h=1==g.enableRecent;l=1==g.enableSearch;h=new NewD
"*")}):null,l?mxUtils.bind(this,function(a,b){this.searchReadyCallback=b;k.postMessage(JSON.stringify({event:"searchDocs",searchStr:a}),"*")}):null,function(a,b,c){k.postMessage(JSON.stringify({event:"template",docUrl:a,info:b,name:c}),"*")});this.showDialog(h.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));h.init();return}if("searchDocsList"==g.action)this.searchReadyCallback(g.list,g.errorMsg);else if("recentDocsList"==g.action)this.recentReadyCallback(g.list,
g.errorMsg);else{if("textContent"==g.action){this.editor.graph.setEnabled(!1);var m=this.editor.graph,h="";if(null!=this.pages)for(l=0;l<this.pages.length;l++){var p=m;this.currentPage!=this.pages[l]&&(p=this.createTemporaryGraph(m.getStylesheet()),p.model.setRoot(this.pages[l].root));h+=this.pages[l].getName()+" "+p.getIndexableText()+" "}else h=m.getIndexableText();this.editor.graph.setEnabled(!0);k.postMessage(JSON.stringify({event:"textContent",data:h,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 n=null!=g.messageKey?mxResources.get(g.messageKey):g.message;null==g.show||g.show?this.spinner.spin(document.body,n):this.spinner.stop();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 q=null!=g.xml?g.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var m=this.editor.graph,r=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();var b=this.createLoadMessage("export");b.format=g.format;b.message=g;b.data=a;b.xml=encodeURIComponent(q);k.postMessage(JSON.stringify(b),"*")}),u=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);"xmlpng"==g.format&&(a=this.writeGraphModelToPng(a,"zTXt",
+null!=g.spinKey?mxResources.get(g.spinKey):g.spin)){var q=null!=g.xml?g.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var m=this.editor.graph,r=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();var b=this.createLoadMessage("export");b.format=g.format;b.message=g;b.data=a;b.xml=encodeURIComponent(q);k.postMessage(JSON.stringify(b),"*")}),t=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);"xmlpng"==g.format&&(a=this.writeGraphModelToPng(a,"zTXt",
"mxGraphModel",atob(this.editor.graph.compress(q))));m!=this.editor.graph&&m.container.parentNode.removeChild(m.container);r(a)});if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage!=this.pages[0]){var m=this.createTemporaryGraph(m.getStylesheet()),w=m.getGlobalVariable,y=this.pages[0];m.getGlobalVariable=function(a){return"page"==a?y.getName():"pagenumber"==a?1:w.apply(this,arguments)};document.body.appendChild(m.container);m.model.setRoot(y.root)}this.exportToCanvas(mxUtils.bind(this,
-function(a){u(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,function(){u(null)}),null,null,null,null,null,null,m)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==g.format?"1":"0")+"&base64=1&xml="+encodeURIComponent(encodeURIComponent(q)))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?r("data:image/png;base64,"+a.getText()):u(null)}),mxUtils.bind(this,function(){u(null)}))}}else{null!=g.xml&&0<g.xml.length&&this.setFileData(g.xml);n=this.createLoadMessage("export");
+function(a){t(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,function(){t(null)}),null,null,null,null,null,null,m)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==g.format?"1":"0")+"&base64=1&xml="+encodeURIComponent(encodeURIComponent(q)))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?r("data:image/png;base64,"+a.getText()):t(null)}),mxUtils.bind(this,function(){t(null)}))}}else{null!=g.xml&&0<g.xml.length&&this.setFileData(g.xml);n=this.createLoadMessage("export");
if("html2"==g.format||"html"==g.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length))h=this.getXmlFileData(),n.xml=mxUtils.getXml(h),n.data=this.getFileData(null,null,!0,null,null,null,h),n.format=g.format;else if("html"==g.format)q=this.editor.getGraphXml(),n.data=this.getHtml(q,this.editor.graph),n.xml=mxUtils.getXml(q),n.format=g.format;else{mxSvgCanvas2D.prototype.foAltText=null;h=this.editor.graph.background;h==mxConstants.NONE&&(h=null);n.xml=this.getFileData(!0);n.format="svg";
if(g.embedImages||null==g.embedImages){if(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin))this.editor.graph.setEnabled(!1),"xmlsvg"==g.format?this.getEmbeddedSvg(n.xml,this.editor.graph,null,!0,mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();n.data=this.createSvgDataUri(a);k.postMessage(JSON.stringify(n),"*")})):this.convertImages(this.editor.graph.getSvg(h),mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);
this.spinner.stop();n.data=this.createSvgDataUri(mxUtils.getXml(a));k.postMessage(JSON.stringify(n),"*")}));return}h="xmlsvg"==g.format?this.getEmbeddedSvg(this.getFileData(!0),this.editor.graph,null,!0):mxUtils.getXml(this.editor.graph.getSvg(h));n.data=this.createSvgDataUri(h)}k.postMessage(JSON.stringify(n),"*")}return}if("load"==g.action)d=1==g.autosave,this.hideDialog(),null!=g.modified&&null==urlParams.modified&&(urlParams.modified=g.modified),null!=g.saveAndExit&&null==urlParams.saveAndExit&&
(urlParams.saveAndExit=g.saveAndExit),null!=g.title&&null!=this.buttonContainer&&(l=document.createElement("span"),mxUtils.write(l,g.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="12px"):"min"!=uiTheme&&(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(l),this.embedFilenameSpan=
-l),g=null!=g.xmlpng?this.extractGraphModelFromPng(g.xmlpng):g.xml;else{k.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(g)}),"*");return}}}var A=mxUtils.bind(this,function(f,g){c=!0;try{a(f,g)}catch(X){this.handleError(X)}c=!1;null!=urlParams.modified&&this.editor.setStatus("");var h=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});e=h();d&&null==b&&(b=mxUtils.bind(this,
+l),g=null!=g.xmlpng?this.extractGraphModelFromPng(g.xmlpng):g.xml;else{k.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(g)}),"*");return}}}var A=mxUtils.bind(this,function(f,g){c=!0;try{a(f,g)}catch(U){this.handleError(U)}c=!1;null!=urlParams.modified&&this.editor.setStatus("");var h=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});e=h();d&&null==b&&(b=mxUtils.bind(this,
function(a,b){var d=h();if(d!=e&&!c){var f=this.createLoadMessage("autosave");f.xml=d;d=JSON.stringify(f);(window.opener||window.parent).postMessage(d,"*")}e=d}),this.editor.graph.model.addListener(mxEvent.CHANGE,b),this.editor.graph.addListener("gridSizeChanged",b),this.editor.graph.addListener("shadowVisibleChanged",b),this.addListener("pageFormatChanged",b),this.addListener("pageScaleChanged",b),this.addListener("backgroundColorChanged",b),this.addListener("backgroundImageChanged",b),this.addListener("foldingEnabledChanged",
b),this.addListener("mathEnabledChanged",b),this.addListener("gridEnabledChanged",b),this.addListener("guidesEnabledChanged",b),this.addListener("pageViewChanged",b));"1"!=urlParams.returnbounds&&"json"!=urlParams.proto||k.postMessage(JSON.stringify(this.createLoadMessage("load")),"*")});null!=g&&"function"===typeof g.substring&&"data:application/vnd.visio;base64,"==g.substring(0,34)?(h="0M8R4KGxGuE"==g.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(g.substring(g.indexOf(",")+
1)),function(a){A(a,f)},mxUtils.bind(this,function(a){this.handleError(a)}),h)):null!=g&&"function"===typeof g.substring&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(g,"")?this.parseFile(new Blob([g],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&"<mxGraphModel"==a.responseText.substring(0,13)&&A(a.responseText,f)}),""):null!=g&&"function"===typeof g.substring&&this.isLucidChartData(g)?this.convertLucidChart(g,
@@ -3126,38 +3127,38 @@ mxUtils.bind(this,function(a){A(a)}),mxUtils.bind(this,function(a){this.handleEr
"2px";var b=document.createElement("button");mxUtils.write(b,mxResources.get("save"));b.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)");b.className="geBigButton";b.style.fontSize="12px";b.style.padding="4px 6px 4px 6px";b.style.borderRadius="3px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()}));a.appendChild(b);"1"==urlParams.saveAndExit&&(b=document.createElement("a"),mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",
mxResources.get("saveAndExit")),b.style.fontSize="12px",b.style.marginLeft="6px",b.style.padding="4px",b.style.cursor="pointer",mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b));b=document.createElement("a");mxUtils.write(b,mxResources.get("exit"));b.setAttribute("title",mxResources.get("exit"));b.style.fontSize="12px";b.style.marginLeft="6px";b.style.marginRight="20px";b.style.padding="4px";b.style.cursor="pointer";mxEvent.addListener(b,
"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()}));a.appendChild(b);this.toolbar.container.appendChild(a);this.toolbar.staticElements.push(a);a.style.right="atlas"!=uiTheme?"52px":"42px"}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(a){this.importCsv(a)}),null,null,620,430,null,!0,!0,mxResources.get("import")));this.showDialog(this.importCsvDialog.container,
-640,520,!0,!0);this.importCsvDialog.init()};EditorUi.prototype.importCsv=function(a,b){try{var c=a.split("\n"),d=[];if(0<c.length){var e={},f=null,k=null,l=null,p=null,q="",u="auto",t="auto",z=null,B=null,N=40,C=40,G=100,J=0,y=this.editor.graph;y.getGraphBounds();for(var A=function(){null!=b?b(aa):(y.setSelectionCells(aa),y.scrollCellToVisible(y.getSelectionCell()))},I=y.getFreeInsertPoint(),O=I.x,Q=I.y,I=Q,X=null,U="auto",p=null,H=[],ea=null,ka=null,Y=0;Y<c.length&&"#"==c[Y].charAt(0);){a=c[Y];for(Y++;Y<
-c.length&&"\\"==a.charAt(a.length-1)&&"#"==c[Y].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(c[Y].substring(1)),Y++;if("#"!=a.charAt(1)){var ba=a.indexOf(":");if(0<ba){var K=mxUtils.trim(a.substring(1,ba)),F=mxUtils.trim(a.substring(ba+1));"label"==K?X=y.sanitizeHtml(F):"style"==K?f=F:"parentstyle"==K?k=F:"identity"==K&&0<F.length&&"-"!=F?l=F:"parent"==K&&0<F.length&&"-"!=F?p=F:"namespace"==K&&0<F.length&&"-"!=F?q=F:"width"==K?u=F:"height"==K?t=F:"left"==K&&0<F.length?z=F:"top"==K&&0<F.length?
-B=F:"ignore"==K?ka=F.split(","):"connect"==K?H.push(JSON.parse(F)):"link"==K?ea=F:"padding"==K?J=parseFloat(F):"edgespacing"==K?N=parseFloat(F):"nodespacing"==K?C=parseFloat(F):"levelspacing"==K?G=parseFloat(F):"layout"==K&&(U=F)}}}var S=this.editor.csvToArray(c[Y]),K=ba=null;if(null!=l||null!=p)for(var L=0;L<S.length;L++)l==S[L]&&(ba=L),p==S[L]&&(K=L);null==X&&(X="%"+S[0]+"%");if(null!=H)for(var M=0;M<H.length;M++)null==e[H[M].to]&&(e[H[M].to]={});y.model.beginUpdate();try{for(L=Y+1;L<c.length;L++){var T=
-this.editor.csvToArray(c[L]);if(T.length==S.length){var E=null,R=null!=ba?q+T[ba]:null;null!=R&&(E=y.model.getCell(R));null==E&&(E=new mxCell(X,new mxGeometry(O,I,0,0),f||"whiteSpace=wrap;html=1;"),E.vertex=!0,E.id=R);for(var V=0;V<T.length;V++)y.setAttributeForCell(E,S[V],T[V]);y.setAttributeForCell(E,"placeholders","1");E.style=y.replacePlaceholders(E,E.style);for(M=0;M<H.length;M++)e[H[M].to][E.getAttribute(H[M].to)]=E;null!=ea&&"link"!=ea&&(y.setLinkForCell(E,E.getAttribute(ea)),y.setAttributeForCell(E,
-ea,null));y.fireEvent(new mxEventObject("cellsInserted","cells",[E]));var ga=this.editor.graph.getPreferredSizeForCell(E);E.vertex&&(null!=z&&null!=E.getAttribute(z)&&(E.geometry.x=O+parseFloat(E.getAttribute(z))),null!=B&&null!=E.getAttribute(B)&&(E.geometry.y=Q+parseFloat(E.getAttribute(B))),"@"==u.charAt(0)&&null!=E.getAttribute(u.substring(1))?E.geometry.width=parseFloat(E.getAttribute(u.substring(1))):E.geometry.width="auto"==u?ga.width+J:parseFloat(u),"@"==t.charAt(0)&&null!=E.getAttribute(t.substring(1))?
-E.geometry.height=parseFloat(E.getAttribute(t.substring(1))):E.geometry.height="auto"==t?ga.height+J:parseFloat(t),I+=E.geometry.height+C);p=null!=K?y.model.getCell(q+T[K]):null;null!=p?(p.style=y.replacePlaceholders(p,k),y.addCell(E,p)):d.push(y.addCell(E))}}for(var W=d.slice(),aa=d.slice(),M=0;M<H.length;M++)for(var Z=H[M],L=0;L<d.length;L++){var E=d[L],pa=E.getAttribute(Z.from);if(null!=pa){y.setAttributeForCell(E,Z.from,null);for(var qa=pa.split(","),V=0;V<qa.length;V++){var fa=e[Z.to][qa[V]];
-null!=fa&&(X=Z.label,null!=Z.fromlabel&&(X=(E.getAttribute(Z.fromlabel)||"")+(X||"")),null!=Z.tolabel&&(X=(X||"")+(fa.getAttribute(Z.tolabel)||"")),aa.push(y.insertEdge(null,null,X||"",Z.invert?fa:E,Z.invert?E:fa,Z.style||y.createCurrentEdgeStyle())),mxUtils.remove(Z.invert?E:fa,W))}}}if(null!=ka)for(L=0;L<d.length;L++)for(E=d[L],V=0;V<ka.length;V++)y.setAttributeForCell(E,mxUtils.trim(ka[V]),null);var la=new mxParallelEdgeLayout(y);la.spacing=N;var ua=function(){la.execute(y.getDefaultParent());
-for(var a=0;a<d.length;a++){var b=y.getCellGeometry(d[a]);b.x=Math.round(y.snap(b.x));b.y=Math.round(y.snap(b.y));"auto"==u&&(b.width=Math.round(y.snap(b.width)));"auto"==t&&(b.height=Math.round(y.snap(b.height)))}};if("circle"==U){var ma=new mxCircleLayout(y);ma.resetEdges=!1;var sa=ma.isVertexIgnored;ma.isVertexIgnored=function(a){return sa.apply(this,arguments)||0>mxUtils.indexOf(d,a)};this.executeLayout(function(){ma.execute(y.getDefaultParent());ua()},!0,A);A=null}else if("horizontaltree"==U||
-"verticaltree"==U||"auto"==U&&aa.length==2*d.length-1&&1==W.length){y.view.validate();var ha=new mxCompactTreeLayout(y,"horizontaltree"==U);ha.levelDistance=C;ha.edgeRouting=!1;ha.resetEdges=!1;this.executeLayout(function(){ha.execute(y.getDefaultParent(),0<W.length?W[0]:null)},!0,A);A=null}else if("horizontalflow"==U||"verticalflow"==U||"auto"==U&&1==W.length){y.view.validate();var ca=new mxHierarchicalLayout(y,"horizontalflow"==U?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);ca.intraCellSpacing=
-C;ca.parallelEdgeSpacing=N;ca.interRankCellSpacing=G;ca.disableEdgeStyle=!1;this.executeLayout(function(){ca.execute(y.getDefaultParent(),aa);y.moveCells(aa,O,Q)},!0,A);A=null}else if("organic"==U||"auto"==U&&aa.length>d.length){y.view.validate();var da=new mxFastOrganicLayout(y);da.forceConstant=3*C;da.resetEdges=!1;var ia=da.isVertexIgnored;da.isVertexIgnored=function(a){return ia.apply(this,arguments)||0>mxUtils.indexOf(d,a)};la=new mxParallelEdgeLayout(y);la.spacing=N;this.executeLayout(function(){da.execute(y.getDefaultParent());
-ua()},!0,A);A=null}this.hideDialog()}finally{y.model.endUpdate()}null!=A&&A()}}catch(wa){this.handleError(wa)}};EditorUi.prototype.getSearch=function(a){var b="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=a&&0<window.location.search.length){var c="?",d;for(d in urlParams)0>mxUtils.indexOf(a,d)&&null!=urlParams[d]&&(b+=c+d+"="+urlParams[d],c="&")}else b=window.location.search;return b};EditorUi.prototype.getUrl=function(a){a=null!=a?a:window.location.pathname;var b=0<a.indexOf("?")?1:0;
-if("1"==urlParams.offline)a+=window.location.search;else{var c="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),d;for(d in urlParams)0>mxUtils.indexOf(c,d)&&(a=0==b?a+"?":a+"&",null!=urlParams[d]&&(a+=d+"="+urlParams[d],b++))}return a};EditorUi.prototype.showLinkDialog=function(a,b,d){a=new LinkDialog(this,a,b,d,!0);this.showDialog(a.container,480,130,!0,!0);a.init()};var p=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=
-p.apply(this,arguments),c=this.editor.graph,d=b.getSourceGraphBounds;b.getSourceGraphBounds=function(){if(mxUtils.hasScrollbars(c.container)&&c.pageVisible&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width-2*a.x/b),Math.ceil(this.source.minimumGraphSize.height-2*a.y/b))}return d.apply(this,arguments)};var e=b.getSourceContainerSize;b.getSourceContainerSize=function(){if(mxUtils.hasScrollbars(c.container)&&
-null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width*b-2*a.x),Math.ceil(this.source.minimumGraphSize.height*b-2*a.y))}return e.apply(this,arguments)};b.getOutlineOffset=function(a){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var d=this.source.getPagePadding();return new mxPoint(Math.round(Math.max(0,(b.outline.container.clientWidth/a-(this.source.minimumGraphSize.width-
-2*d.x))/2)-d.x),Math.round(Math.max(0,(b.outline.container.clientHeight/a-(this.source.minimumGraphSize.height-2*d.y))/2)-d.y-5/a))}return new mxPoint(8/a,8/a)};var h=b.init;b.init=function(){h.apply(this,arguments);b.outline.view.getBackgroundPageBounds=function(){var a=c.getPageLayout(),b=c.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*b.width),this.scale*(this.translate.y+a.y*b.height),this.scale*a.width*b.width,this.scale*a.height*b.height)};b.outline.view.validateBackgroundPage()};
-this.editor.addListener("pageSelected",function(a,c){var d=c.getProperty("change"),e=b.source,f=b.outline;f.pageScale=e.pageScale;f.pageFormat=e.pageFormat;f.background=e.background;f.pageVisible=e.pageVisible;f.background=e.background;var g=mxUtils.getCurrentStyle(e.container);f.container.style.backgroundColor=g.backgroundColor;null!=e.view.backgroundPageShape&&null!=f.view.backgroundPageShape&&(f.view.backgroundPageShape.fill=e.view.backgroundPageShape.fill);b.outline.view.clear(d.previousPage.root,
-!0);b.outline.view.validate()});return b};EditorUi.prototype.getServiceCount=function(a,b){var c=0;null==this.drive&&"function"!==typeof window.DriveClient||c++;b||null==this.dropbox&&"function"!==typeof window.DropboxClient||c++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||c++;b||null==this.gitHub||c++;b||null==this.trello&&"function"!==typeof window.TrelloClient||c++;a&&isLocalStorage&&("1"==urlParams.browser||mxClient.IS_IOS)&&c++;mxClient.IS_IOS||c++;return c};EditorUi.prototype.updateUi=
-function(){this.updateButtonContainer();this.updateActionStates();var a=this.getCurrentFile(),b=null!=a||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(b);this.menus.get("viewZoom").setEnabled(b);var d=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==a||a.isRestricted());this.actions.get("makeCopy").setEnabled(!d);this.actions.get("print").setEnabled(!d);this.menus.get("exportAs").setEnabled(!d);this.menus.get("embed").setEnabled(!d);d="1"!=
-urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(d);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(d),this.menus.get("newLibrary").setEnabled(d));a="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=a&&a.isEditable();this.actions.get("image").setEnabled(b);this.actions.get("zoomIn").setEnabled(b);this.actions.get("zoomOut").setEnabled(b);this.actions.get("resetView").setEnabled(b);this.actions.get("undo").setEnabled(this.canUndo()&&
-a);this.actions.get("redo").setEnabled(this.canRedo()&&a);this.menus.get("edit").setEnabled(b);this.menus.get("view").setEnabled(b);this.menus.get("importFrom").setEnabled(a);this.menus.get("arrange").setEnabled(a);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(a),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(a));if(this.isAppCache()){var e=applicationCache;if(null!=e&&null==this.offlineStatus){this.offlineStatus=document.createElement("div");
-this.offlineStatus.className="geItem";this.offlineStatus.style.position="absolute";this.offlineStatus.style.fontSize="8pt";this.offlineStatus.style.top="2px";this.offlineStatus.style.right="12px";this.offlineStatus.style.color="#666";this.offlineStatus.style.margin="4px";this.offlineStatus.style.padding="2px";this.offlineStatus.style.verticalAlign="middle";this.offlineStatus.innerHTML="";this.menubarContainer.appendChild(this.offlineStatus);mxEvent.addListener(this.offlineStatus,"click",mxUtils.bind(this,
-function(){var a=this.offlineStatus.getElementsByTagName("img");null!=a&&0<a.length&&this.alert(a[0].getAttribute("title"))}));var e=window.applicationCache,k=null,b=mxUtils.bind(this,function(){var a=e.status,b;a==e.CHECKING&&(a=e.DOWNLOADING);switch(a){case e.UNCACHED:b="";break;case e.IDLE:b="min"==uiTheme?"":'<img title="draw.io is up to date." border="0" src="'+IMAGE_PATH+'/checkmark.gif"/>';break;case e.DOWNLOADING:b='<img title="Downloading new version..." border="0" src="'+IMAGE_PATH+'/spin.gif"/>';
-break;case e.UPDATEREADY:b='<img title="'+mxUtils.htmlEntities(mxResources.get("restartForChangeRequired"))+'" border="0" src="'+IMAGE_PATH+'/download.png"/>';break;case e.OBSOLETE:b='<img title="Obsolete" border="0" src="'+IMAGE_PATH+'/clear.gif"/>';break;default:b='<img title="Unknown" border="0" src="'+IMAGE_PATH+'/clear.gif"/>'}a!=k&&(this.offlineStatus.innerHTML=b,k=a)});mxEvent.addListener(e,"checking",b);mxEvent.addListener(e,"noupdate",b);mxEvent.addListener(e,"downloading",b);mxEvent.addListener(e,
-"progress",b);mxEvent.addListener(e,"cached",b);mxEvent.addListener(e,"updateready",b);mxEvent.addListener(e,"obsolete",b);mxEvent.addListener(e,"error",b);b()}}else this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.isDiagramActive=function(){var a=this.getCurrentFile();return null!=a&&a.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var q=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=
-function(){q.apply(this,arguments);var a=this.editor.graph,b=this.isDiagramActive(),d=this.getCurrentFile();this.actions.get("pageSetup").setEnabled(b);this.actions.get("autosave").setEnabled(null!=d&&d.isEditable()&&d.isAutosaveOptional());this.actions.get("guides").setEnabled(b);this.actions.get("editData").setEnabled(b);this.actions.get("shadowVisible").setEnabled(b);this.actions.get("connectionArrows").setEnabled(b);this.actions.get("connectionPoints").setEnabled(b);this.actions.get("copyStyle").setEnabled(b&&
-!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("editGeometry").setEnabled(a.getModel().isVertex(a.getSelectionCell()));this.actions.get("createShape").setEnabled(b);this.actions.get("createRevision").setEnabled(b);this.actions.get("moveToFolder").setEnabled(null!=d);this.actions.get("makeCopy").setEnabled(null!=d&&!d.isRestricted());this.actions.get("editDiagram").setEnabled(b&&(null==d||!d.isRestricted()));this.actions.get("publishLink").setEnabled(null!=
-d&&!d.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("find").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!=d&&d.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=d);
-this.menus.get("publish").setEnabled(null!=d&&!d.isRestricted());a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(b&&null!=a&&null!=a.shape&&null!=a.shape.stencil)};var u=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){this.editUpdateListener&&(this.editor.undoManager.removeListener(this.editUpdateListener),this.editUpdateListener=null);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);u.apply(this,
-arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,b,d,e,k,h){var c=a.editor.graph;if("xml"==d)a.hideDialog(),a.saveData(b,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("svg"==d)a.hideDialog(),a.saveData(b,"svg",mxUtils.getXml(c.getSvg(e,k,h)),"image/svg+xml");else{var f=a.getFileData(!0,null,null,null,null,!0),g=c.getGraphBounds(),l=Math.floor(g.width*k/c.view.scale),p=Math.floor(g.height*k/c.view.scale);
-f.length<=MAX_REQUEST_SIZE&&l*p<MAX_AREA?(a.hideDialog(),a.saveRequest(b,d,function(a,b){return new mxXmlRequest(EXPORT_URL,"format="+d+"&base64="+(b||"0")+(null!=a?"&filename="+encodeURIComponent(a):"")+"&bg="+(null!=e?e:"none")+"&w="+l+"&h="+p+"&border="+h+"&xml="+encodeURIComponent(f))})):mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.updateEditReferences=function(a){for(var b=0;b<a.changes.length;b++){var c=a.changes[b];if(null!=c&&c.constructor==mxChildChange&&null!=
-c.child){var d=c.child;if(null!=d.source&&null!=d.source.id){var e=this.getFutureCellForEdit(c.model,a,d.source.id);e!=d.source&&(d.source=e)}null!=d.target&&null!=d.target.id&&(c=this.getFutureCellForEdit(c.model,a,d.target.id),c!=d.target&&(d.target=c))}}};EditorUi.prototype.getFutureCellForEdit=function(a,b,d){var c=a.getCell(d);if(null==c)for(var e=b.changes.length-1;0<=e;e--){var f=b.changes[e];if(f.constructor==mxChildChange&&null!=f.child&&f.child.id==d){a.contains(f.previous)&&(c=f.child);
-break}}return c}})();function DiagramPage(a){this.node=a;null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};DiagramPage.prototype.setName=function(a){null==a?this.node.removeAttribute("name"):this.node.setAttribute("name",a)};
+640,520,!0,!0);this.importCsvDialog.init()};EditorUi.prototype.importCsv=function(a,b){try{var c=a.split("\n"),d=[];if(0<c.length){var e={},f=null,k=null,l=null,p=null,q="",t="auto",u="auto",z=null,C=null,N=40,D=40,G=100,K=0,y=this.editor.graph;y.getGraphBounds();for(var A=function(){null!=b?b(da):(y.setSelectionCells(da),y.scrollCellToVisible(y.getSelectionCell()))},I=y.getFreeInsertPoint(),O=I.x,Q=I.y,I=Q,U=null,T="auto",p=null,H=[],fa=null,la=null,W=0;W<c.length&&"#"==c[W].charAt(0);){a=c[W];for(W++;W<
+c.length&&"\\"==a.charAt(a.length-1)&&"#"==c[W].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(c[W].substring(1)),W++;if("#"!=a.charAt(1)){var Z=a.indexOf(":");if(0<Z){var L=mxUtils.trim(a.substring(1,Z)),F=mxUtils.trim(a.substring(Z+1));"label"==L?U=y.sanitizeHtml(F):"style"==L?f=F:"parentstyle"==L?k=F:"identity"==L&&0<F.length&&"-"!=F?l=F:"parent"==L&&0<F.length&&"-"!=F?p=F:"namespace"==L&&0<F.length&&"-"!=F?q=F:"width"==L?t=F:"height"==L?u=F:"left"==L&&0<F.length?z=F:"top"==L&&0<F.length?
+C=F:"ignore"==L?la=F.split(","):"connect"==L?H.push(JSON.parse(F)):"link"==L?fa=F:"padding"==L?K=parseFloat(F):"edgespacing"==L?N=parseFloat(F):"nodespacing"==L?D=parseFloat(F):"levelspacing"==L?G=parseFloat(F):"layout"==L&&(T=F)}}}var S=this.editor.csvToArray(c[W]),L=Z=null;if(null!=l||null!=p)for(var J=0;J<S.length;J++)l==S[J]&&(Z=J),p==S[J]&&(L=J);null==U&&(U="%"+S[0]+"%");if(null!=H)for(var M=0;M<H.length;M++)null==e[H[M].to]&&(e[H[M].to]={});y.model.beginUpdate();try{for(J=W+1;J<c.length;J++){var R=
+this.editor.csvToArray(c[J]);if(null==R){var ha=40<c[J].length?c[J].substring(0,40)+"...":c[J];throw Error(J+" ("+ha+") "+mxResources.get("containsValidationErrors"));}if(R.length==S.length){var B=null,ca=null!=Z?q+R[Z]:null;null!=ca&&(B=y.model.getCell(ca));null==B&&(B=new mxCell(U,new mxGeometry(O,I,0,0),f||"whiteSpace=wrap;html=1;"),B.vertex=!0,B.id=ca);for(var V=0;V<R.length;V++)y.setAttributeForCell(B,S[V],R[V]);y.setAttributeForCell(B,"placeholders","1");B.style=y.replacePlaceholders(B,B.style);
+for(M=0;M<H.length;M++)e[H[M].to][B.getAttribute(H[M].to)]=B;null!=fa&&"link"!=fa&&(y.setLinkForCell(B,B.getAttribute(fa)),y.setAttributeForCell(B,fa,null));y.fireEvent(new mxEventObject("cellsInserted","cells",[B]));var X=this.editor.graph.getPreferredSizeForCell(B);B.vertex&&(null!=z&&null!=B.getAttribute(z)&&(B.geometry.x=O+parseFloat(B.getAttribute(z))),null!=C&&null!=B.getAttribute(C)&&(B.geometry.y=Q+parseFloat(B.getAttribute(C))),"@"==t.charAt(0)&&null!=B.getAttribute(t.substring(1))?B.geometry.width=
+parseFloat(B.getAttribute(t.substring(1))):B.geometry.width="auto"==t?X.width+K:parseFloat(t),"@"==u.charAt(0)&&null!=B.getAttribute(u.substring(1))?B.geometry.height=parseFloat(B.getAttribute(u.substring(1))):B.geometry.height="auto"==u?X.height+K:parseFloat(u),I+=B.geometry.height+D);p=null!=L?y.model.getCell(q+R[L]):null;null!=p?(p.style=y.replacePlaceholders(p,k),y.addCell(B,p)):d.push(y.addCell(B))}}for(var aa=d.slice(),da=d.slice(),M=0;M<H.length;M++)for(var Y=H[M],J=0;J<d.length;J++){var B=
+d[J],pa=B.getAttribute(Y.from);if(null!=pa){y.setAttributeForCell(B,Y.from,null);for(var ra=pa.split(","),V=0;V<ra.length;V++){var ja=e[Y.to][ra[V]];null!=ja&&(U=Y.label,null!=Y.fromlabel&&(U=(B.getAttribute(Y.fromlabel)||"")+(U||"")),null!=Y.tolabel&&(U=(U||"")+(ja.getAttribute(Y.tolabel)||"")),da.push(y.insertEdge(null,null,U||"",Y.invert?ja:B,Y.invert?B:ja,Y.style||y.createCurrentEdgeStyle())),mxUtils.remove(Y.invert?B:ja,aa))}}}if(null!=la)for(J=0;J<d.length;J++)for(B=d[J],V=0;V<la.length;V++)y.setAttributeForCell(B,
+mxUtils.trim(la[V]),null);var ma=new mxParallelEdgeLayout(y);ma.spacing=N;var ua=function(){ma.execute(y.getDefaultParent());for(var a=0;a<d.length;a++){var b=y.getCellGeometry(d[a]);b.x=Math.round(y.snap(b.x));b.y=Math.round(y.snap(b.y));"auto"==t&&(b.width=Math.round(y.snap(b.width)));"auto"==u&&(b.height=Math.round(y.snap(b.height)))}};if("circle"==T){var ia=new mxCircleLayout(y);ia.resetEdges=!1;var sa=ia.isVertexIgnored;ia.isVertexIgnored=function(a){return sa.apply(this,arguments)||0>mxUtils.indexOf(d,
+a)};this.executeLayout(function(){ia.execute(y.getDefaultParent());ua()},!0,A);A=null}else if("horizontaltree"==T||"verticaltree"==T||"auto"==T&&da.length==2*d.length-1&&1==aa.length){y.view.validate();var ga=new mxCompactTreeLayout(y,"horizontaltree"==T);ga.levelDistance=D;ga.edgeRouting=!1;ga.resetEdges=!1;this.executeLayout(function(){ga.execute(y.getDefaultParent(),0<aa.length?aa[0]:null)},!0,A);A=null}else if("horizontalflow"==T||"verticalflow"==T||"auto"==T&&1==aa.length){y.view.validate();
+var ea=new mxHierarchicalLayout(y,"horizontalflow"==T?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);ea.intraCellSpacing=D;ea.parallelEdgeSpacing=N;ea.interRankCellSpacing=G;ea.disableEdgeStyle=!1;this.executeLayout(function(){ea.execute(y.getDefaultParent(),da);y.moveCells(da,O,Q)},!0,A);A=null}else if("organic"==T||"auto"==T&&da.length>d.length){y.view.validate();var ba=new mxFastOrganicLayout(y);ba.forceConstant=3*D;ba.resetEdges=!1;var xa=ba.isVertexIgnored;ba.isVertexIgnored=function(a){return xa.apply(this,
+arguments)||0>mxUtils.indexOf(d,a)};ma=new mxParallelEdgeLayout(y);ma.spacing=N;this.executeLayout(function(){ba.execute(y.getDefaultParent());ua()},!0,A);A=null}this.hideDialog()}finally{y.model.endUpdate()}null!=A&&A()}}catch(va){this.handleError(va)}};EditorUi.prototype.getSearch=function(a){var b="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=a&&0<window.location.search.length){var c="?",d;for(d in urlParams)0>mxUtils.indexOf(a,d)&&null!=urlParams[d]&&(b+=c+d+"="+urlParams[d],c="&")}else b=
+window.location.search;return b};EditorUi.prototype.getUrl=function(a){a=null!=a?a:window.location.pathname;var b=0<a.indexOf("?")?1:0;if("1"==urlParams.offline)a+=window.location.search;else{var c="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),d;for(d in urlParams)0>mxUtils.indexOf(c,d)&&(a=0==b?a+"?":a+"&",null!=urlParams[d]&&(a+=d+"="+urlParams[d],b++))}return a};EditorUi.prototype.showLinkDialog=function(a,b,d){a=new LinkDialog(this,a,b,d,
+!0);this.showDialog(a.container,480,130,!0,!0);a.init()};var p=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=p.apply(this,arguments),c=this.editor.graph,d=b.getSourceGraphBounds;b.getSourceGraphBounds=function(){if(mxUtils.hasScrollbars(c.container)&&c.pageVisible&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width-2*a.x/b),Math.ceil(this.source.minimumGraphSize.height-
+2*a.y/b))}return d.apply(this,arguments)};var e=b.getSourceContainerSize;b.getSourceContainerSize=function(){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width*b-2*a.x),Math.ceil(this.source.minimumGraphSize.height*b-2*a.y))}return e.apply(this,arguments)};b.getOutlineOffset=function(a){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var d=
+this.source.getPagePadding();return new mxPoint(Math.round(Math.max(0,(b.outline.container.clientWidth/a-(this.source.minimumGraphSize.width-2*d.x))/2)-d.x),Math.round(Math.max(0,(b.outline.container.clientHeight/a-(this.source.minimumGraphSize.height-2*d.y))/2)-d.y-5/a))}return new mxPoint(8/a,8/a)};var h=b.init;b.init=function(){h.apply(this,arguments);b.outline.view.getBackgroundPageBounds=function(){var a=c.getPageLayout(),b=c.getPageSize();return new mxRectangle(this.scale*(this.translate.x+
+a.x*b.width),this.scale*(this.translate.y+a.y*b.height),this.scale*a.width*b.width,this.scale*a.height*b.height)};b.outline.view.validateBackgroundPage()};this.editor.addListener("pageSelected",function(a,c){var d=c.getProperty("change"),e=b.source,f=b.outline;f.pageScale=e.pageScale;f.pageFormat=e.pageFormat;f.background=e.background;f.pageVisible=e.pageVisible;f.background=e.background;var g=mxUtils.getCurrentStyle(e.container);f.container.style.backgroundColor=g.backgroundColor;null!=e.view.backgroundPageShape&&
+null!=f.view.backgroundPageShape&&(f.view.backgroundPageShape.fill=e.view.backgroundPageShape.fill);b.outline.view.clear(d.previousPage.root,!0);b.outline.view.validate()});return b};EditorUi.prototype.getServiceCount=function(a,b){var c=0;null==this.drive&&"function"!==typeof window.DriveClient||c++;b||null==this.dropbox&&"function"!==typeof window.DropboxClient||c++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||c++;b||null==this.gitHub||c++;b||null==this.trello&&"function"!==typeof window.TrelloClient||
+c++;a&&isLocalStorage&&("1"==urlParams.browser||mxClient.IS_IOS)&&c++;mxClient.IS_IOS||c++;return c};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var a=this.getCurrentFile(),b=null!=a||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(b);this.menus.get("viewZoom").setEnabled(b);var d=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==a||a.isRestricted());this.actions.get("makeCopy").setEnabled(!d);
+this.actions.get("print").setEnabled(!d);this.menus.get("exportAs").setEnabled(!d);this.menus.get("embed").setEnabled(!d);d="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(d);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(d),this.menus.get("newLibrary").setEnabled(d));a="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=a&&a.isEditable();this.actions.get("image").setEnabled(b);this.actions.get("zoomIn").setEnabled(b);this.actions.get("zoomOut").setEnabled(b);
+this.actions.get("resetView").setEnabled(b);this.actions.get("undo").setEnabled(this.canUndo()&&a);this.actions.get("redo").setEnabled(this.canRedo()&&a);this.menus.get("edit").setEnabled(b);this.menus.get("view").setEnabled(b);this.menus.get("importFrom").setEnabled(a);this.menus.get("arrange").setEnabled(a);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(a),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(a));if(this.isAppCache()){var e=
+applicationCache;if(null!=e&&null==this.offlineStatus){this.offlineStatus=document.createElement("div");this.offlineStatus.className="geItem";this.offlineStatus.style.position="absolute";this.offlineStatus.style.fontSize="8pt";this.offlineStatus.style.top="2px";this.offlineStatus.style.right="12px";this.offlineStatus.style.color="#666";this.offlineStatus.style.margin="4px";this.offlineStatus.style.padding="2px";this.offlineStatus.style.verticalAlign="middle";this.offlineStatus.innerHTML="";this.menubarContainer.appendChild(this.offlineStatus);
+mxEvent.addListener(this.offlineStatus,"click",mxUtils.bind(this,function(){var a=this.offlineStatus.getElementsByTagName("img");null!=a&&0<a.length&&this.alert(a[0].getAttribute("title"))}));var e=window.applicationCache,k=null,b=mxUtils.bind(this,function(){var a=e.status,b;a==e.CHECKING&&(a=e.DOWNLOADING);switch(a){case e.UNCACHED:b="";break;case e.IDLE:b="min"==uiTheme?"":'<img title="draw.io is up to date." border="0" src="'+IMAGE_PATH+'/checkmark.gif"/>';break;case e.DOWNLOADING:b='<img title="Downloading new version..." border="0" src="'+
+IMAGE_PATH+'/spin.gif"/>';break;case e.UPDATEREADY:b='<img title="'+mxUtils.htmlEntities(mxResources.get("restartForChangeRequired"))+'" border="0" src="'+IMAGE_PATH+'/download.png"/>';break;case e.OBSOLETE:b='<img title="Obsolete" border="0" src="'+IMAGE_PATH+'/clear.gif"/>';break;default:b='<img title="Unknown" border="0" src="'+IMAGE_PATH+'/clear.gif"/>'}a!=k&&(this.offlineStatus.innerHTML=b,k=a)});mxEvent.addListener(e,"checking",b);mxEvent.addListener(e,"noupdate",b);mxEvent.addListener(e,"downloading",
+b);mxEvent.addListener(e,"progress",b);mxEvent.addListener(e,"cached",b);mxEvent.addListener(e,"updateready",b);mxEvent.addListener(e,"obsolete",b);mxEvent.addListener(e,"error",b);b()}}else this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.isDiagramActive=function(){var a=this.getCurrentFile();return null!=a&&a.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var q=EditorUi.prototype.updateActionStates;
+EditorUi.prototype.updateActionStates=function(){q.apply(this,arguments);var a=this.editor.graph,b=this.isDiagramActive(),d=this.getCurrentFile();this.actions.get("pageSetup").setEnabled(b);this.actions.get("autosave").setEnabled(null!=d&&d.isEditable()&&d.isAutosaveOptional());this.actions.get("guides").setEnabled(b);this.actions.get("editData").setEnabled(b);this.actions.get("shadowVisible").setEnabled(b);this.actions.get("connectionArrows").setEnabled(b);this.actions.get("connectionPoints").setEnabled(b);
+this.actions.get("copyStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("editGeometry").setEnabled(a.getModel().isVertex(a.getSelectionCell()));this.actions.get("createShape").setEnabled(b);this.actions.get("createRevision").setEnabled(b);this.actions.get("moveToFolder").setEnabled(null!=d);this.actions.get("makeCopy").setEnabled(null!=d&&!d.isRestricted());this.actions.get("editDiagram").setEnabled(b&&(null==d||!d.isRestricted()));
+this.actions.get("publishLink").setEnabled(null!=d&&!d.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("find").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!=d&&d.isRenamable()||"1"==urlParams.embed);
+this.actions.get("close").setEnabled(null!=d);this.menus.get("publish").setEnabled(null!=d&&!d.isRestricted());a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(b&&null!=a&&null!=a.shape&&null!=a.shape.stencil)};var t=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){this.editUpdateListener&&(this.editor.undoManager.removeListener(this.editUpdateListener),this.editUpdateListener=null);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),
+this.exportDialog=null);t.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,b,d,e,k,h){var c=a.editor.graph;if("xml"==d)a.hideDialog(),a.saveData(b,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("svg"==d)a.hideDialog(),a.saveData(b,"svg",mxUtils.getXml(c.getSvg(e,k,h)),"image/svg+xml");else{var f=a.getFileData(!0,null,null,null,null,!0),g=c.getGraphBounds(),l=Math.floor(g.width*k/c.view.scale),
+p=Math.floor(g.height*k/c.view.scale);f.length<=MAX_REQUEST_SIZE&&l*p<MAX_AREA?(a.hideDialog(),a.saveRequest(b,d,function(a,b){return new mxXmlRequest(EXPORT_URL,"format="+d+"&base64="+(b||"0")+(null!=a?"&filename="+encodeURIComponent(a):"")+"&bg="+(null!=e?e:"none")+"&w="+l+"&h="+p+"&border="+h+"&xml="+encodeURIComponent(f))})):mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.updateEditReferences=function(a){for(var b=0;b<a.changes.length;b++){var c=a.changes[b];if(null!=c&&
+c.constructor==mxChildChange&&null!=c.child){var d=c.child;if(null!=d.source&&null!=d.source.id){var e=this.getFutureCellForEdit(c.model,a,d.source.id);e!=d.source&&(d.source=e)}null!=d.target&&null!=d.target.id&&(c=this.getFutureCellForEdit(c.model,a,d.target.id),c!=d.target&&(d.target=c))}}};EditorUi.prototype.getFutureCellForEdit=function(a,b,d){var c=a.getCell(d);if(null==c)for(var e=b.changes.length-1;0<=e;e--){var f=b.changes[e];if(f.constructor==mxChildChange&&null!=f.child&&f.child.id==d){a.contains(f.previous)&&
+(c=f.child);break}}return c}})();function DiagramPage(a){this.node=a;null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};DiagramPage.prototype.setName=function(a){null==a?this.node.removeAttribute("name"):this.node.setAttribute("name",a)};
function RenamePage(a,b,e){this.ui=a;this.page=b;this.previous=this.name=e}RenamePage.prototype.execute=function(){var a=this.page.getName();this.page.setName(this.previous);this.name=this.previous;this.previous=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};function MovePage(a,b,e){this.ui=a;this.oldIndex=b;this.newIndex=e}
MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var a=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))};function SelectPage(a,b,e){this.ui=a;this.previousPage=this.page=b;this.neverShown=!0;null!=b&&(this.neverShown=null==b.viewState,this.ui.updatePageRoot(b),null!=e&&(b.viewState=e,this.neverShown=!1))}
SelectPage.prototype.execute=function(){var a=mxUtils.indexOf(this.ui.pages,this.previousPage);if(null!=this.page&&0<=a){var a=this.ui.currentPage,b=this.ui.editor,e=b.graph,d=b.graph.compress(e.zapGremlins(mxUtils.getXml(b.getGraphXml(!0))));mxUtils.setTextContent(a.node,d);a.viewState=e.getViewState();a.root=e.model.root;null!=a.model&&a.model.rootChanged(a.root);e.view.clear(a.root,!0);e.clearSelection();this.ui.currentPage=this.previousPage;this.previousPage=a;a=this.ui.currentPage;e.model.rootChanged(a.root);
@@ -3194,8 +3195,8 @@ EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&nul
e)/this.pages.length)+1),k=null,l=0;l<this.pages.length;l++)mxUtils.bind(this,function(c,d){this.pages[c]==this.currentPage?(d.className="geActivePage",d.style.backgroundColor="dark"==uiTheme?"#2a2a2a":"#eeeeee",d.style.fontWeight="bold",d.style.borderTopStyle="none"):d.className="geInactivePage";d.setAttribute("draggable","true");mxEvent.addListener(d,"dragstart",mxUtils.bind(this,function(b){a.isEnabled()?(mxClient.IS_FF&&b.dataTransfer.setData("Text","<diagram/>"),k=c):mxEvent.consume(b)}));mxEvent.addListener(d,
"dragend",mxUtils.bind(this,function(a){k=null;a.stopPropagation();a.preventDefault()}));mxEvent.addListener(d,"dragover",mxUtils.bind(this,function(a){null!=k&&(a.dataTransfer.dropEffect="move");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(d,"drop",mxUtils.bind(this,function(a){null!=k&&c!=k&&this.movePage(k,c);a.stopPropagation();a.preventDefault()}));b.appendChild(d)})(l,this.createTabForPage(this.pages[l],d,this.pages[l]!=this.currentPage));this.tabContainer.innerHTML="";this.tabContainer.appendChild(b);
d=this.createPageMenuTab();this.tabContainer.appendChild(d);d=null;this.isPageInsertTabVisible()&&(d=this.createPageInsertTab(),this.tabContainer.appendChild(d));if(b.clientWidth>this.tabContainer.clientWidth-e){null!=d&&(d.style.position="absolute",d.style.right="0px",b.style.marginRight="30px");var p=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");p.style.position="absolute";p.style.right=this.editor.chromeless?"29px":"55px";p.style.fontSize="13pt";this.tabContainer.appendChild(p);var q=this.createControlTab(4,
-"&nbsp;&#10095;");q.style.position="absolute";q.style.right=this.editor.chromeless?"0px":"29px";q.style.fontSize="13pt";this.tabContainer.appendChild(q);var u=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));b.style.width=u+"px";mxEvent.addListener(p,"click",mxUtils.bind(this,function(a){b.scrollLeft-=Math.max(20,u-20);mxUtils.setOpacity(p,0<b.scrollLeft?100:50);mxUtils.setOpacity(q,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.consume(a)}));mxUtils.setOpacity(p,
-0<b.scrollLeft?100:50);mxUtils.setOpacity(q,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.addListener(q,"click",mxUtils.bind(this,function(a){b.scrollLeft+=Math.max(20,u-20);mxUtils.setOpacity(p,0<b.scrollLeft?100:50);mxUtils.setOpacity(q,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.consume(a)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};
+"&nbsp;&#10095;");q.style.position="absolute";q.style.right=this.editor.chromeless?"0px":"29px";q.style.fontSize="13pt";this.tabContainer.appendChild(q);var t=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));b.style.width=t+"px";mxEvent.addListener(p,"click",mxUtils.bind(this,function(a){b.scrollLeft-=Math.max(20,t-20);mxUtils.setOpacity(p,0<b.scrollLeft?100:50);mxUtils.setOpacity(q,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.consume(a)}));mxUtils.setOpacity(p,
+0<b.scrollLeft?100:50);mxUtils.setOpacity(q,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.addListener(q,"click",mxUtils.bind(this,function(a){b.scrollLeft+=Math.max(20,t-20);mxUtils.setOpacity(p,0<b.scrollLeft?100:50);mxUtils.setOpacity(q,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.consume(a)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};
EditorUi.prototype.createTab=function(a){var b=document.createElement("div");b.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";b.style.whiteSpace="nowrap";b.style.boxSizing="border-box";b.style.position="relative";b.style.overflow="hidden";b.style.marginLeft="-1px";b.style.height=this.tabContainer.clientHeight+"px";b.style.padding="8px 4px 8px 4px";b.style.border="dark"==uiTheme?"1px solid #505759":"1px solid #c0c0c0";b.style.borderBottomStyle="solid";b.style.backgroundColor=this.tabContainer.style.backgroundColor;
b.style.cursor="move";b.style.color="gray";a&&(mxEvent.addListener(b,"mouseenter",mxUtils.bind(this,function(a){this.editor.graph.isMouseDown||(b.style.backgroundColor="dark"==uiTheme?"black":"#d3d3d3",mxEvent.consume(a))})),mxEvent.addListener(b,"mouseleave",mxUtils.bind(this,function(a){b.style.backgroundColor=this.tabContainer.style.backgroundColor;mxEvent.consume(a)})));return b};
EditorUi.prototype.createControlTab=function(a,b){var e=this.createTab(!0);e.style.paddingTop=a+"px";e.style.cursor="pointer";e.style.width="30px";e.style.lineHeight="30px";e.innerHTML=b;null!=e.firstChild&&null!=e.firstChild.style&&mxUtils.setOpacity(e.firstChild,40);return e};
@@ -3205,20 +3206,20 @@ null,mxUtils.bind(this,function(){this.renamePage(e,e.getName())}),b),a.addSepar
mxEvent.consume(a)}));return a};EditorUi.prototype.createPageInsertTab=function(){var a=this.createControlTab(4,'<div class="geSprite geSprite-plus" style="display:inline-block;width:21px;height:21px;"></div>');a.setAttribute("title",mxResources.get("insertPage"));mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){this.insertPage();mxEvent.consume(a)}));return a};
EditorUi.prototype.createTabForPage=function(a,b,e){e=this.createTab(e);var d=a.getName()||mxResources.get("untitled"),k=a.getId();e.setAttribute("title",d+(null!=k?" ("+k+")":""));mxUtils.write(e,d);e.style.maxWidth=b+"px";e.style.width=b+"px";this.addTabListeners(a,e);42<b&&(e.style.textOverflow="ellipsis");return e};
EditorUi.prototype.addTabListeners=function(a,b){mxEvent.disableContextMenu(b);var e=this.editor.graph;mxEvent.addListener(b,"dblclick",mxUtils.bind(this,function(b){this.renamePage(a);mxEvent.consume(b)}));var d=!1,k=!1;mxEvent.addGestureListeners(b,mxUtils.bind(this,function(b){d=null!=this.currentMenu;k=a==this.currentPage;e.isMouseDown||k||this.selectPage(a)}),null,mxUtils.bind(this,function(l){if(e.isEnabled()&&!e.isMouseDown&&(mxEvent.isTouchEvent(l)&&k||mxEvent.isPopupTrigger(l))){e.popupMenuHandler.hideMenu();
-this.hideCurrentMenu();if(!mxEvent.isTouchEvent(l)||!d){var p=new mxPopupMenu(this.createPageMenu(a));p.div.className+=" geMenubarMenu";p.smartSeparators=!0;p.showDisabled=!0;p.autoExpand=!0;p.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(p,arguments);this.resetCurrentMenu();p.destroy()});var q=mxEvent.getClientX(l),u=mxEvent.getClientY(l);p.popup(q,u,null,l);this.setCurrentMenu(p,b)}mxEvent.consume(l)}}))};
+this.hideCurrentMenu();if(!mxEvent.isTouchEvent(l)||!d){var p=new mxPopupMenu(this.createPageMenu(a));p.div.className+=" geMenubarMenu";p.smartSeparators=!0;p.showDisabled=!0;p.autoExpand=!0;p.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(p,arguments);this.resetCurrentMenu();p.destroy()});var q=mxEvent.getClientX(l),t=mxEvent.getClientY(l);p.popup(q,t,null,l);this.setCurrentMenu(p,b)}mxEvent.consume(l)}}))};
EditorUi.prototype.createPageMenu=function(a,b){return mxUtils.bind(this,function(e,d){e.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,a)+1)}),d);e.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(a)}),d);e.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(a,b)}),d);e.addSeparator(d);e.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(a,
mxResources.get("copyOf",[a.getName()]))}),d)})};(function(){var a=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(b){a.apply(this,arguments);this.updateTabContainer()}})();(function(){mxCodecRegistry.getCodec(ChangePageSetup).exclude.push("page")})();(function(){var a=new mxObjectCodec(new MovePage,["ui"]);a.beforeDecode=function(a,e,d){d.ui=a.ui;return e};a.afterDecode=function(a,e,d){a=d.oldIndex;d.oldIndex=d.newIndex;d.newIndex=a;return d};mxCodecRegistry.register(a)})();
(function(){var a=new mxObjectCodec(new RenamePage,["ui","page"]);a.beforeDecode=function(a,e,d){d.ui=a.ui;return e};a.afterDecode=function(a,e,d){a=d.previous;d.previous=d.name;d.name=a;return d};mxCodecRegistry.register(a)})();
(function(){var a=new mxObjectCodec(new ChangePage,"ui relatedPage index neverShown page previousPage".split(" ")),b="defaultParent currentRoot scrollLeft scrollTop scale translate lastPasteXml pasteCounter".split(" ");a.afterEncode=function(a,d,k){k.setAttribute("relatedPage",d.relatedPage.getId());null==d.index&&(k.setAttribute("name",d.relatedPage.getName()),null!=d.relatedPage.viewState&&k.setAttribute("viewState",JSON.stringify(d.relatedPage.viewState,function(a,d){return 0>mxUtils.indexOf(b,
a)?d:void 0})),null!=d.relatedPage.root&&a.encodeCell(d.relatedPage.root,k));return k};a.beforeDecode=function(a,b,k){k.ui=a.ui;k.relatedPage=k.ui.getPageById(b.getAttribute("relatedPage"));if(null==k.relatedPage){var d=b.ownerDocument.createElement("diagram");d.setAttribute("id",b.getAttribute("relatedPage"));d.setAttribute("name",b.getAttribute("name"));k.relatedPage=new DiagramPage(d);d=b.getAttribute("viewState");null!=d&&(k.relatedPage.viewState=JSON.parse(d),b.removeAttribute("viewState"));
b=b.cloneNode(!0);d=b.firstChild;if(null!=d)for(k.relatedPage.root=a.decodeCell(d,!1),k=d.nextSibling,d.parentNode.removeChild(d),d=k;null!=d;){k=d.nextSibling;if(d.nodeType==mxConstants.NODETYPE_ELEMENT){var e=d.getAttribute("id");null==a.lookup(e)&&a.decodeCell(d)}d.parentNode.removeChild(d);d=k}}return b};a.afterDecode=function(a,b,k){k.index=k.previousIndex;return k};mxCodecRegistry.register(a)})();(function(){var a=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAASFBMVEUAAAAAAAB/f3/9/f319fUfHx/7+/s+Pj69vb0AAAAAAAAAAAAAAAAAAAAAAAAAAAB2dnZ1dXUAAAAAAAAVFRX///8ZGRkGBgbOcI1hAAAAE3RSTlMA+vr9/f38+fb1893Bo00u+/tFvPJUBQAAAIRJREFUGNM0jEcSxCAQAxlydGqD///TNWxZBx1aXVIrWysplbapL3sFxgDq/idXBnHgBPK1nIxwc55vCXl6dRFtrV6svs/A/UjsPcpzA5tqyByD92HqQlMFh45BG6ND1DiKSoPDdm96N77bg5F+wyaEqRGb8ZiOwHQqdg9hehszcLAEIQB2lQ4p/sEpnAAAAABJRU5ErkJggg==":IMAGE_PATH+"/move.png";EditorUi.prototype.altShiftActions[68]=
-"selectDescendants";var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(a,d,e,q,u){d=null!=d?d:!1;null==e&&(e=this.getFoldableCells(this.getSelectionCells(),a));this.stopEditing();this.model.beginUpdate();try{for(var c=e.slice(),f=[],g=0;g<e.length;g++){var k=this.view.getState(e[g]),l=null!=k?k.style:this.getCellStyle(e[g]);"1"==mxUtils.getValue(l,"treeFolding","0")&&(this.traverse(e[g],!0,mxUtils.bind(this,function(a,b){null!=b&&f.push(b);a!=e[g]&&f.push(a);return a==e[g]||!this.model.isCollapsed(a)})),
+"selectDescendants";var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(a,d,e,q,t){d=null!=d?d:!1;null==e&&(e=this.getFoldableCells(this.getSelectionCells(),a));this.stopEditing();this.model.beginUpdate();try{for(var c=e.slice(),f=[],g=0;g<e.length;g++){var k=this.view.getState(e[g]),l=null!=k?k.style:this.getCellStyle(e[g]);"1"==mxUtils.getValue(l,"treeFolding","0")&&(this.traverse(e[g],!0,mxUtils.bind(this,function(a,b){null!=b&&f.push(b);a!=e[g]&&f.push(a);return a==e[g]||!this.model.isCollapsed(a)})),
this.model.setCollapsed(e[g],a))}for(g=0;g<f.length;g++)this.model.setVisible(f[g],!a);e=c;e=b.apply(this,arguments)}finally{this.model.endUpdate()}return e};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 b(a){return m.isVertex(a)&&d(a)}function d(a){var b=!1;null!=a&&(a=m.getParent(a),b=h.view.getState(a),h.view.getState(a),b="tree"==(null!=
b?b.style:h.getCellStyle(a)).containerType);return b}function e(a){var b=!1;null!=a&&(a=m.getParent(a),b=h.view.getState(a),h.view.getState(a),b=null!=(null!=b?b.style:h.getCellStyle(a)).childLayout);return b}function q(a){a=h.view.getState(a);if(null!=a){var b=h.getIncomingEdges(a.cell);if(0<b.length&&(b=h.view.getState(b[0]),null!=b&&(b=b.absolutePoints,null!=b&&0<b.length&&(b=b[b.length-1],null!=b)))){if(b.y==a.y&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_SOUTH;if(b.y==
-a.y+a.height&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_NORTH;if(b.x>a.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function u(a,b){b=null!=b?b:!0;h.model.beginUpdate();try{var c=h.model.getParent(a),d=h.getIncomingEdges(a),e=h.cloneCells([d[0],a]);h.model.setTerminal(e[0],h.model.getTerminal(d[0],!0),!0);var f=q(a),g=c.geometry;f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?e[1].geometry.x+=b?a.geometry.width+10:-e[1].geometry.width-
+a.y+a.height&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_NORTH;if(b.x>a.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function t(a,b){b=null!=b?b:!0;h.model.beginUpdate();try{var c=h.model.getParent(a),d=h.getIncomingEdges(a),e=h.cloneCells([d[0],a]);h.model.setTerminal(e[0],h.model.getTerminal(d[0],!0),!0);var f=q(a),g=c.geometry;f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?e[1].geometry.x+=b?a.geometry.width+10:-e[1].geometry.width-
10:e[1].geometry.y+=b?a.geometry.height+10:-e[1].geometry.height-10;h.view.currentRoot!=c&&(e[1].geometry.x-=g.x,e[1].geometry.y-=g.y);var k=h.view.getState(a),l=h.view.scale;if(null!=k){var m=mxRectangle.fromRectangle(k);f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?m.x+=(b?a.geometry.width+10:-e[1].geometry.width-10)*l:m.y+=(b?a.geometry.height+10:-e[1].geometry.height-10)*l;var p=h.getOutgoingEdges(h.model.getTerminal(d[0],!0));if(null!=p){for(var n=f==mxConstants.DIRECTION_SOUTH||
-f==mxConstants.DIRECTION_NORTH,t=g=d=0;t<p.length;t++){var r=h.model.getTerminal(p[t],!1);if(f==q(r)){var u=h.view.getState(r);r!=a&&null!=u&&(n&&b!=u.getCenterX()<k.getCenterX()||!n&&b!=u.getCenterY()<k.getCenterY())&&mxUtils.intersects(m,u)&&(d=10+Math.max(d,(Math.min(m.x+m.width,u.x+u.width)-Math.max(m.x,u.x))/l),g=10+Math.max(g,(Math.min(m.y+m.height,u.y+u.height)-Math.max(m.y,u.y))/l))}}n?g=0:d=0;for(t=0;t<p.length;t++)if(r=h.model.getTerminal(p[t],!1),f==q(r)&&(u=h.view.getState(r),r!=a&&null!=
-u&&(n&&b!=u.getCenterX()<k.getCenterX()||!n&&b!=u.getCenterY()<k.getCenterY()))){var y=[];h.traverse(u.cell,!0,function(a,b){null!=b&&y.push(b);y.push(a);return!0});h.moveCells(y,(b?1:-1)*d,(b?1:-1)*g)}}}return h.addCells(e,c)}finally{h.model.endUpdate()}}function c(a){h.model.beginUpdate();try{var b=q(a),c=h.getIncomingEdges(a),d=h.cloneCells([c[0],a]);h.model.setTerminal(c[0],d[1],!1);h.model.setTerminal(d[0],d[1],!0);h.model.setTerminal(d[0],a,!1);var e=h.model.getParent(a),f=e.geometry,g=[];h.view.currentRoot!=
+f==mxConstants.DIRECTION_NORTH,u=g=d=0;u<p.length;u++){var r=h.model.getTerminal(p[u],!1);if(f==q(r)){var t=h.view.getState(r);r!=a&&null!=t&&(n&&b!=t.getCenterX()<k.getCenterX()||!n&&b!=t.getCenterY()<k.getCenterY())&&mxUtils.intersects(m,t)&&(d=10+Math.max(d,(Math.min(m.x+m.width,t.x+t.width)-Math.max(m.x,t.x))/l),g=10+Math.max(g,(Math.min(m.y+m.height,t.y+t.height)-Math.max(m.y,t.y))/l))}}n?g=0:d=0;for(u=0;u<p.length;u++)if(r=h.model.getTerminal(p[u],!1),f==q(r)&&(t=h.view.getState(r),r!=a&&null!=
+t&&(n&&b!=t.getCenterX()<k.getCenterX()||!n&&b!=t.getCenterY()<k.getCenterY()))){var y=[];h.traverse(t.cell,!0,function(a,b){null!=b&&y.push(b);y.push(a);return!0});h.moveCells(y,(b?1:-1)*d,(b?1:-1)*g)}}}return h.addCells(e,c)}finally{h.model.endUpdate()}}function c(a){h.model.beginUpdate();try{var b=q(a),c=h.getIncomingEdges(a),d=h.cloneCells([c[0],a]);h.model.setTerminal(c[0],d[1],!1);h.model.setTerminal(d[0],d[1],!0);h.model.setTerminal(d[0],a,!1);var e=h.model.getParent(a),f=e.geometry,g=[];h.view.currentRoot!=
e&&(d[1].geometry.x-=f.x,d[1].geometry.y-=f.y);h.traverse(a,!0,function(a,b){null!=b&&g.push(b);g.push(a);return!0});var k=a.geometry.width+40,m=a.geometry.height+40;b==mxConstants.DIRECTION_SOUTH?k=0:b==mxConstants.DIRECTION_NORTH?(k=0,m=-40):b==mxConstants.DIRECTION_WEST?(k=-40,m=0):b==mxConstants.DIRECTION_EAST&&(m=0);h.moveCells(g,k,m);return h.addCells(d,e)}finally{h.model.endUpdate()}}function f(a){h.model.beginUpdate();try{var b=h.model.getParent(a),c=h.getIncomingEdges(a),d=h.cloneCells([c[0],
a]);h.model.setTerminal(d[0],a,!0);var c=h.getOutgoingEdges(a),e=b.geometry,f=[];h.view.currentRoot==b&&(e=new mxRectangle);for(var g=0;g<c.length;g++){var k=h.model.getTerminal(c[g],!1);null!=k&&f.push(k)}var m=h.view.getBounds(f),l=q(a),p=h.view.translate,n=h.view.scale;l==mxConstants.DIRECTION_SOUTH?(d[1].geometry.x=null==m?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(m.x+m.width)/n-p.x-e.x+10,d[1].geometry.y+=a.geometry.height-e.y+40):l==mxConstants.DIRECTION_NORTH?(d[1].geometry.x=
null==m?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(m.x+m.width)/n-p.x+-e.x+10,d[1].geometry.y-=d[1].geometry.height-e.y+40):(d[1].geometry.x=l==mxConstants.DIRECTION_WEST?d[1].geometry.x-(d[1].geometry.width-e.x+40):d[1].geometry.x+(a.geometry.width-e.x+40),d[1].geometry.y=null==m?a.geometry.y+(a.geometry.height-d[1].geometry.height)/2:(m.y+m.height)/n-p.y+-e.y+10);return h.addCells(d,b)}finally{h.model.endUpdate()}}function g(a,b,c){a=h.getOutgoingEdges(a);c=h.view.getState(c);var d=
@@ -3228,18 +3229,18 @@ mxResources.parse("selectDescendants=Select Descendants");mxResources.parse("sel
this.addMenuItems(a,["selectSiblings","selectParent"],null,d))}};r.actions.addAction("selectChildren",function(){if(h.isEnabled()&&1==h.getSelectionCount()){var a=h.getSelectionCell(),a=h.getOutgoingEdges(a);if(null!=a){for(var b=[],c=0;c<a.length;c++)b.push(h.model.getTerminal(a[c],!1));h.setSelectionCells(b)}}},null,null,"Alt+Shift+X");r.actions.addAction("selectSiblings",function(){if(h.isEnabled()&&1==h.getSelectionCount()){var a=h.getSelectionCell(),a=h.getIncomingEdges(a);if(null!=a&&0<a.length&&
(a=h.getOutgoingEdges(h.model.getTerminal(a[0],!0)),null!=a)){for(var b=[],c=0;c<a.length;c++)b.push(h.model.getTerminal(a[c],!1));h.setSelectionCells(b)}}},null,null,"Alt+Shift+S");r.actions.addAction("selectParent",function(){if(h.isEnabled()&&1==h.getSelectionCount()){var a=h.getSelectionCell(),a=h.getIncomingEdges(a);null!=a&&0<a.length&&h.setSelectionCell(h.model.getTerminal(a[0],!0))}},null,null,"Alt+Shift+P");r.actions.addAction("selectDescendants",function(){if(h.isEnabled()&&1==h.getSelectionCount()){var a=
h.getSelectionCell(),b=[];h.traverse(a,!0,function(a,c){null!=c&&b.push(c);b.push(a);return!0});h.setSelectionCells(b)}},null,null,"Alt+Shift+D");var v=h.removeCells;h.removeCells=function(a,c){c=null!=c?c:!0;null==a&&(a=this.getDeletableCells(this.getSelectionCells()));c&&(a=this.getDeletableCells(this.addAllEdges(a)));for(var e=[],f=0;f<a.length;f++){var g=a[f];m.isEdge(g)&&d(g)&&(e.push(g),g=m.getTerminal(g,!1));b(g)?(h.traverse(g,!0,function(a,b){null!=b&&e.push(b);e.push(a);return!0}),g=h.getIncomingEdges(a[f]),
-a=a.concat(g)):e.push(a[f])}a=e;return v.apply(this,arguments)};r.hoverIcons.getStateAt=function(a,c,d){return b(a.cell)?null:this.graph.view.getState(this.graph.getCellAt(c,d))};var D=h.duplicateCells;h.duplicateCells=function(a,c){a=null!=a?a:this.getSelectionCells();for(var d=a.slice(0),e=0;e<d.length;e++){var f=h.view.getState(d[e]);if(null!=f&&b(f.cell))for(var g=h.getIncomingEdges(f.cell),f=0;f<g.length;f++)mxUtils.remove(g[f],a)}this.model.beginUpdate();try{var k=D.call(this,a,c);if(k.length==
+a=a.concat(g)):e.push(a[f])}a=e;return v.apply(this,arguments)};r.hoverIcons.getStateAt=function(a,c,d){return b(a.cell)?null:this.graph.view.getState(this.graph.getCellAt(c,d))};var E=h.duplicateCells;h.duplicateCells=function(a,c){a=null!=a?a:this.getSelectionCells();for(var d=a.slice(0),e=0;e<d.length;e++){var f=h.view.getState(d[e]);if(null!=f&&b(f.cell))for(var g=h.getIncomingEdges(f.cell),f=0;f<g.length;f++)mxUtils.remove(g[f],a)}this.model.beginUpdate();try{var k=E.call(this,a,c);if(k.length==
a.length)for(e=0;e<a.length;e++)if(b(a[e])){var m=h.getIncomingEdges(k[e]),g=h.getIncomingEdges(a[e]);if(0==m.length&&0<g.length){var l=this.cloneCell(g[0]);this.addEdge(l,h.getDefaultParent(),this.model.getTerminal(g[0],!0),k[e])}}}finally{this.model.endUpdate()}return k};var x=h.moveCells;h.moveCells=function(a,c,d,e,f,g,k){var m=null;this.model.beginUpdate();try{var l=f,p=this.view.getState(f),n=null!=p?p.style:this.getCellStyle(f);if(null!=a&&b(f)&&"1"==mxUtils.getValue(n,"treeFolding","0")){for(var q=
-0;q<a.length;q++)if(b(a[q])||h.model.isEdge(a[q])&&null==h.model.getTerminal(a[q],!0)){f=h.model.getParent(a[q]);break}if(null!=l&&f!=l&&null!=this.view.getState(a[0])){var t=h.getIncomingEdges(a[0]);if(0<t.length){var r=h.view.getState(h.model.getTerminal(t[0],!0));if(null!=r){var u=h.view.getState(l);null!=u&&(c=(u.getCenterX()-r.getCenterX())/h.view.scale,d=(u.getCenterY()-r.getCenterY())/h.view.scale)}}}}m=x.apply(this,arguments);if(null!=m&&null!=a&&m.length==a.length)for(q=0;q<m.length;q++)if(this.model.isEdge(m[q]))b(l)&&
-0>mxUtils.indexOf(m,this.model.getTerminal(m[q],!0))&&this.model.setTerminal(m[q],l,!0);else if(b(a[q])&&(t=h.getIncomingEdges(a[q]),0<t.length))if(!e)b(l)&&0>mxUtils.indexOf(a,this.model.getTerminal(t[0],!0))&&this.model.setTerminal(t[0],l,!0);else if(0==h.getIncomingEdges(m[q]).length){p=l;if(null==p||p==h.model.getParent(a[q]))p=h.model.getTerminal(t[0],!0);e=this.cloneCell(t[0]);this.addEdge(e,h.getDefaultParent(),p,m[q])}}finally{this.model.endUpdate()}return m};if(null!=r.sidebar){var t=r.sidebar.dropAndConnect;
-r.sidebar.dropAndConnect=function(a,c,d,e){var f=h.model,g=null;f.beginUpdate();try{if(g=t.apply(this,arguments),b(a))for(var k=0;k<g.length;k++)if(f.isEdge(g[k])&&null==f.getTerminal(g[k],!0)){f.setTerminal(g[k],a,!0);var m=h.getCellGeometry(g[k]);m.points=null;null!=m.getTerminalPoint(!0)&&m.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return g}}var z={88:r.actions.get("selectChildren"),84:r.actions.get("selectSubtree"),80:r.actions.get("selectParent"),83:r.actions.get("selectSiblings")},B=
-r.onKeyDown;r.onKeyDown=function(a){try{if(h.isEnabled()&&!h.isEditing()&&b(h.getSelectionCell())&&1==h.getSelectionCount()){var d=null;0<h.getIncomingEdges(h.getSelectionCell()).length&&(9==a.which?d=mxEvent.isShiftDown(a)?c(h.getSelectionCell()):f(h.getSelectionCell()):13==a.which&&(d=u(h.getSelectionCell(),!mxEvent.isShiftDown(a))));if(null!=d&&0<d.length)1==d.length&&h.model.isEdge(d[0])?h.setSelectionCell(h.model.getTerminal(d[0],!1)):h.setSelectionCell(d[d.length-1]),null!=r.hoverIcons&&r.hoverIcons.update(h.view.getState(h.getSelectionCell())),
+0;q<a.length;q++)if(b(a[q])||h.model.isEdge(a[q])&&null==h.model.getTerminal(a[q],!0)){f=h.model.getParent(a[q]);break}if(null!=l&&f!=l&&null!=this.view.getState(a[0])){var u=h.getIncomingEdges(a[0]);if(0<u.length){var r=h.view.getState(h.model.getTerminal(u[0],!0));if(null!=r){var t=h.view.getState(l);null!=t&&(c=(t.getCenterX()-r.getCenterX())/h.view.scale,d=(t.getCenterY()-r.getCenterY())/h.view.scale)}}}}m=x.apply(this,arguments);if(null!=m&&null!=a&&m.length==a.length)for(q=0;q<m.length;q++)if(this.model.isEdge(m[q]))b(l)&&
+0>mxUtils.indexOf(m,this.model.getTerminal(m[q],!0))&&this.model.setTerminal(m[q],l,!0);else if(b(a[q])&&(u=h.getIncomingEdges(a[q]),0<u.length))if(!e)b(l)&&0>mxUtils.indexOf(a,this.model.getTerminal(u[0],!0))&&this.model.setTerminal(u[0],l,!0);else if(0==h.getIncomingEdges(m[q]).length){p=l;if(null==p||p==h.model.getParent(a[q]))p=h.model.getTerminal(u[0],!0);e=this.cloneCell(u[0]);this.addEdge(e,h.getDefaultParent(),p,m[q])}}finally{this.model.endUpdate()}return m};if(null!=r.sidebar){var u=r.sidebar.dropAndConnect;
+r.sidebar.dropAndConnect=function(a,c,d,e){var f=h.model,g=null;f.beginUpdate();try{if(g=u.apply(this,arguments),b(a))for(var k=0;k<g.length;k++)if(f.isEdge(g[k])&&null==f.getTerminal(g[k],!0)){f.setTerminal(g[k],a,!0);var m=h.getCellGeometry(g[k]);m.points=null;null!=m.getTerminalPoint(!0)&&m.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return g}}var z={88:r.actions.get("selectChildren"),84:r.actions.get("selectSubtree"),80:r.actions.get("selectParent"),83:r.actions.get("selectSiblings")},C=
+r.onKeyDown;r.onKeyDown=function(a){try{if(h.isEnabled()&&!h.isEditing()&&b(h.getSelectionCell())&&1==h.getSelectionCount()){var d=null;0<h.getIncomingEdges(h.getSelectionCell()).length&&(9==a.which?d=mxEvent.isShiftDown(a)?c(h.getSelectionCell()):f(h.getSelectionCell()):13==a.which&&(d=t(h.getSelectionCell(),!mxEvent.isShiftDown(a))));if(null!=d&&0<d.length)1==d.length&&h.model.isEdge(d[0])?h.setSelectionCell(h.model.getTerminal(d[0],!1)):h.setSelectionCell(d[d.length-1]),null!=r.hoverIcons&&r.hoverIcons.update(h.view.getState(h.getSelectionCell())),
h.startEditingAtCell(h.getSelectionCell()),mxEvent.consume(a);else if(mxEvent.isAltDown(a)&&mxEvent.isShiftDown(a)){var e=z[a.keyCode];null!=e&&(e.funct(a),mxEvent.consume(a))}else 37==a.keyCode?(n(h.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(a)):38==a.keyCode?(n(h.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(a)):39==a.keyCode?(n(h.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(a)):40==a.keyCode&&(n(h.getSelectionCell(),mxConstants.DIRECTION_SOUTH),
-mxEvent.consume(a))}}catch(O){console.log("error",O)}mxEvent.isConsumed(a)||B.apply(this,arguments)};var N=h.connectVertex;h.connectVertex=function(a,d,e,g,k,m){var l=h.getIncomingEdges(a);return b(a)&&0<l.length?(e=q(a),g=e==mxConstants.DIRECTION_EAST||e==mxConstants.DIRECTION_WEST,k=d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST,e==d?f(a):g==k?c(a):u(a,d!=mxConstants.DIRECTION_NORTH&&d!=mxConstants.DIRECTION_WEST)):N.call(this,a,d,e,g,k,m)};h.getSubtree=function(a){var c=[a];b(a)&&
-!e(a)&&h.traverse(a,!0,function(a,b){null!=b&&0>mxUtils.indexOf(c,b)&&c.push(b);0>mxUtils.indexOf(c,a)&&c.push(a);return!0});return c};var C=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){C.apply(this,arguments);b(this.state.cell)&&0<this.graph.getOutgoingEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(a),this.moveHandle.setAttribute("title","Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width=
+mxEvent.consume(a))}}catch(O){console.log("error",O)}mxEvent.isConsumed(a)||C.apply(this,arguments)};var N=h.connectVertex;h.connectVertex=function(a,d,e,g,k,m){var l=h.getIncomingEdges(a);return b(a)&&0<l.length?(e=q(a),g=e==mxConstants.DIRECTION_EAST||e==mxConstants.DIRECTION_WEST,k=d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST,e==d?f(a):g==k?c(a):t(a,d!=mxConstants.DIRECTION_NORTH&&d!=mxConstants.DIRECTION_WEST)):N.call(this,a,d,e,g,k,m)};h.getSubtree=function(a){var c=[a];b(a)&&
+!e(a)&&h.traverse(a,!0,function(a,b){null!=b&&0>mxUtils.indexOf(c,b)&&c.push(b);0>mxUtils.indexOf(c,a)&&c.push(a);return!0});return c};var D=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){D.apply(this,arguments);b(this.state.cell)&&0<this.graph.getOutgoingEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(a),this.moveHandle.setAttribute("title","Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width=
"18px",this.moveHandle.style.height="18px",this.graph.container.appendChild(this.moveHandle),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(a){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(a),mxEvent.getClientY(a));this.graph.graphHandler.cells=this.graph.getSubtree(this.state.cell);this.graph.graphHandler.bounds=this.state.view.getBounds(this.graph.graphHandler.cells);this.graph.graphHandler.pBounds=this.graph.graphHandler.getPreviewBounds(this.graph.graphHandler.cells);
-this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(a);this.graph.isMouseDown=!0;mxEvent.consume(a)})))};var G=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){G.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var J=mxVertexHandler.prototype.destroy;
-mxVertexHandler.prototype.destroy=function(a,b){J.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var d=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var a=d.apply(this,arguments),b=this.graph;return a.concat([this.addEntry("tree container",function(){var a=new mxCell("Tree Container",new mxGeometry(0,0,220,160),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");
+this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(a);this.graph.isMouseDown=!0;mxEvent.consume(a)})))};var G=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){G.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var K=mxVertexHandler.prototype.destroy;
+mxVertexHandler.prototype.destroy=function(a,b){K.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var d=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var a=d.apply(this,arguments),b=this.graph;return a.concat([this.addEntry("tree container",function(){var a=new mxCell("Tree Container",new mxGeometry(0,0,220,160),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");
a.vertex=!0;return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap central idea branch topic",function(){var a=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");a.vertex=!0;var b=new mxCell("Central Idea",new mxGeometry(160,60,100,40),"ellipse;whiteSpace=wrap;html=1;align=center;container=1;recursiveResize=0;treeFolding=1;");b.vertex=!0;var d=new mxCell("Topic",new mxGeometry(320,
40,80,20),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;");d.vertex=!0;var c=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");c.geometry.relative=!0;c.edge=!0;b.insertEdge(c,!0);d.insertEdge(c,!1);var e=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]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;");
e.vertex=!0;var g=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");g.geometry.relative=!0;g.edge=!0;b.insertEdge(g,!0);e.insertEdge(g,!1);var k=new mxCell("Topic",new mxGeometry(20,40,80,20),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;");k.vertex=!0;var l=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
@@ -3266,8 +3267,8 @@ Graph.createSvgImage(22,18,'<path transform="translate(4 0)" d="M7.181,15.007a1,
mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,10,'<path d="M 3 3 L 7 7 L 11 3" stroke="#C0C0C0" stroke-width="2" fill="#ffffff"/>').src;mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="#29b6f2"/>');mxOutline.prototype.sizerImage=null;mxConstants.VERTEX_SELECTION_COLOR="#C0C0C0";mxConstants.EDGE_SELECTION_COLOR="#C0C0C0";mxConstants.CONNECT_HANDLE_FILLCOLOR="#cee7ff";mxConstants.DEFAULT_VALID_COLOR="#29b6f2";mxConstants.GUIDE_COLOR=
"#C0C0C0";mxConstants.HIGHLIGHT_STROKEWIDTH=5;mxConstants.HIGHLIGHT_OPACITY=35;mxConstants.OUTLINE_COLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_FILLCOLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_STROKECOLOR="#fff";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowSize="0.6";Graph.prototype.svgShadowBlur="1.2";Format.prototype.inactiveTabBackgroundColor="#f0f0f0";mxGraphHandler.prototype.previewColor="#C0C0C0";mxRubberband.prototype.defaultOpacity=50;
HoverIcons.prototype.inactiveOpacity=25;Format.prototype.showCloseButton=!1;EditorUi.prototype.closableScratchpad=!1;EditorUi.prototype.toolbarHeight=46;EditorUi.prototype.footerHeight=0;Graph.prototype.editAfterInsert=!0;Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var l=EditorUi.prototype.updateTabContainer;EditorUi.prototype.updateTabContainer=function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom=
-"30px");l.apply(this,arguments)};var p=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){p.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var q=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(a,b){null!=b.shortcut&&900>e&&!mxClient.IS_IOS?a.firstChild.nextSibling.setAttribute("title",b.shortcut):q.apply(this,arguments)};var u=App.prototype.updateUserElement;App.prototype.updateUserElement=
-function(){u.apply(this,arguments);if(null!=this.userElement){var a=this.userElement;a.style.cssText="display:inline-block;position:relative;margin-right:4px;cursor:pointer;";a.className="geToolbarButton";a.innerHTML="";a.style.backgroundImage="url("+Editor.userImage+")";a.style.backgroundPosition="center center";a.style.backgroundRepeat="no-repeat";a.style.backgroundSize="24px 24px";a.style.height="24px";a.style.width="24px";a.style.cssFloat="right";a.setAttribute("title",mxResources.get("changeUser"))}};
+"30px");l.apply(this,arguments)};var p=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){p.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var q=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(a,b){null!=b.shortcut&&900>e&&!mxClient.IS_IOS?a.firstChild.nextSibling.setAttribute("title",b.shortcut):q.apply(this,arguments)};var t=App.prototype.updateUserElement;App.prototype.updateUserElement=
+function(){t.apply(this,arguments);if(null!=this.userElement){var a=this.userElement;a.style.cssText="display:inline-block;position:relative;margin-right:4px;cursor:pointer;";a.className="geToolbarButton";a.innerHTML="";a.style.backgroundImage="url("+Editor.userImage+")";a.style.backgroundPosition="center center";a.style.backgroundRepeat="no-repeat";a.style.backgroundSize="24px 24px";a.style.height="24px";a.style.width="24px";a.style.cssFloat="right";a.setAttribute("title",mxResources.get("changeUser"))}};
var c=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){c.apply(this,arguments);if(null!=this.shareButton){var a=this.shareButton;a.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;";a.className="geToolbarButton";a.innerHTML="";a.style.backgroundImage="url("+Editor.shareImage+")";a.style.backgroundPosition="center center";a.style.backgroundRepeat="no-repeat";a.style.backgroundSize="24px 24px";a.style.height=
"24px";a.style.width="24px"}null!=this.syncButton&&(a=this.syncButton,a.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;",a.className="geToolbarButton",a.innerHTML="",a.style.backgroundImage="url("+Editor.syncImage+")",a.style.backgroundPosition="center center",a.style.backgroundRepeat="no-repeat",a.style.backgroundSize="24px 24px",a.style.height="24px",a.style.width="24px")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.buttonContainer){var a=
document.createElement("div");a.style.display="inline-block";a.style.position="relative";a.style.marginTop="2px";var b=document.createElement("button");mxUtils.write(b,mxResources.get("save"));b.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)");b.className="1"==urlParams.saveAndExit?"geMenuItem":"geMenuItem gePrimaryBtn";b.style.fontSize="14px";b.style.padding="6px";b.style.borderRadius="3px";b.style.marginLeft="8px";b.style.cursor="pointer";mxEvent.addListener(b,"click",mxUtils.bind(this,
@@ -3308,9 +3309,9 @@ null],60)}d=g.menus.get("language");null!=d&&!mxClient.IS_CHROMEAPP&&!EditorUi.i
mxResources.get("untitledLibrary");var l=document.createElement("div");l.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;border-bottom:1px solid lightgray;background-color:#ffffff;text-align:left;white-space:nowrap;";var n=null,p=new Menubar(g,l);g.statusContainer=g.createStatusContainer();g.statusContainer.style.position="relative";g.statusContainer.style.maxWidth="";g.statusContainer.style.marginTop="7px";g.statusContainer.style.marginLeft="6px";g.statusContainer.style.color=
"gray";g.statusContainer.style.cursor="default";g.editor.addListener("statusChanged",mxUtils.bind(this,function(){g.setStatusText(g.editor.getStatus())}));var q=g.descriptorChanged;g.descriptorChanged=function(){q.apply(this,arguments);var a=g.getCurrentFile();if(null!=a&&null!=a.getTitle()){var b=a.getMode();"google"==b?b="googleDrive":"github"==b?b="gitHub":"onedrive"==b&&(b="oneDrive");b=mxResources.get(b);l.setAttribute("title",a.getTitle()+(null!=b?" ("+b+")":""))}else l.removeAttribute("title")};
g.setStatusText(g.editor.getStatus());l.appendChild(g.statusContainer);g.buttonContainer=document.createElement("div");g.buttonContainer.style.cssText="position:absolute;right:40px;top:12px;white-space:nowrap;";l.appendChild(g.buttonContainer);g.menubarContainer=g.buttonContainer;g.tabContainer=document.createElement("div");g.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;border-bottom:1px solid lightgray;background-color:#ffffff;border-top:1px solid lightgray;margin-bottom:-2px;visibility:hidden;";
-var f=g.diagramContainer.parentNode,r=document.createElement("div");r.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";g.diagramContainer.style.top="47px";var u=g.menus.get("viewZoom");if(null!=u){this.tabContainer.style.right="70px";var A=p.addMenu("100%",u.funct);A.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");A.style.whiteSpace="nowrap";A.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";A.style.backgroundPosition="right 6px center";
+var f=g.diagramContainer.parentNode,r=document.createElement("div");r.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";g.diagramContainer.style.top="47px";var t=g.menus.get("viewZoom");if(null!=t){this.tabContainer.style.right="70px";var A=p.addMenu("100%",t.funct);A.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");A.style.whiteSpace="nowrap";A.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";A.style.backgroundPosition="right 6px center";
A.style.backgroundRepeat="no-repeat";A.style.backgroundColor="#ffffff";A.style.paddingRight="10px";A.style.display="block";A.style.position="absolute";A.style.textDecoration="none";A.style.textDecoration="none";A.style.right="0px";A.style.bottom="0px";A.style.overflow="hidden";A.style.visibility="hidden";A.style.textAlign="center";A.style.color="#000";A.style.fontSize="12px";A.style.color="#707070";A.style.width="59px";A.style.borderTop="1px solid lightgray";A.style.borderLeft="1px solid lightgray";
-A.style.height=parseInt(g.tabContainer.style.height)-1+"px";A.style.lineHeight=parseInt(g.tabContainer.style.height)+1+"px";r.appendChild(A);u=mxUtils.bind(this,function(){A.innerHTML=Math.round(100*g.editor.graph.view.scale)+"%"});g.editor.graph.view.addListener(mxEvent.EVENT_SCALE,u);g.editor.addListener("resetGraphView",u);g.editor.addListener("pageSelected",u);var I=g.setGraphEnabled;g.setGraphEnabled=function(){I.apply(this,arguments);null!=this.tabContainer&&(A.style.visibility=this.tabContainer.style.visibility,
+A.style.height=parseInt(g.tabContainer.style.height)-1+"px";A.style.lineHeight=parseInt(g.tabContainer.style.height)+1+"px";r.appendChild(A);t=mxUtils.bind(this,function(){A.innerHTML=Math.round(100*g.editor.graph.view.scale)+"%"});g.editor.graph.view.addListener(mxEvent.EVENT_SCALE,t);g.editor.addListener("resetGraphView",t);g.editor.addListener("pageSelected",t);var I=g.setGraphEnabled;g.setGraphEnabled=function(){I.apply(this,arguments);null!=this.tabContainer&&(A.style.visibility=this.tabContainer.style.visibility,
this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility?"30px":"0px")}}r.appendChild(g.tabContainer);r.appendChild(l);r.appendChild(g.diagramContainer);f.appendChild(r);g.updateTabContainer();var O=null;d();mxEvent.addListener(window,"resize",function(){d();null!=g.sidebarWindow&&g.sidebarWindow.window.fit();null!=g.formatWindow&&g.formatWindow.window.fit();null!=g.actions.outlineWindow&&g.actions.outlineWindow.window.fit();null!=g.actions.layersWindow&&g.actions.layersWindow.window.fit();
null!=g.menus.tagsWindow&&g.menus.tagsWindow.window.fit();null!=g.menus.findWindow&&g.menus.findWindow.window.fit()})}}};(function(){var a=!1;"min"!=uiTheme||a||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),a=!0);var b=EditorUi.initTheme;EditorUi.initTheme=function(){b.apply(this,arguments);"min"!=uiTheme||a||(this.initMinimalTheme(),a=!0)}})();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\naboutDrawio=About draw.io\naccessDenied=Access Denied\naction=Action\nactualSize=Actual Size\nadd=Add\naddedFile=Added {1}\naddImages=Add Images\naddImageUrl=Add Image URL\naddLayer=Add Layer\naddProperty=Add Property\naddress=Address\naddToExistingDrawing=Add to Existing Drawing\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nalign=Align\nalignment=Alignment\nallChangesLost=All changes will be lost!\nallPages=All Pages\nallProjects=All Projects\nallSpaces=All Spaces\nallTags=All Tags\nanchor=Anchor\nandroid=Android\nangle=Angle\narc=Arc\nareYouSure=Are you sure?\nensureDataSaved=Please ensure your data is saved before closing.\nallChangesSaved=All changes saved\nallChangesSavedInDrive=All changes saved in Drive\nallowPopups=Allow pop-ups to avoid this dialog.\nallowRelativeUrl=Allow relative URL\nalreadyConnected=Nodes already connected\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\nasNew=As New\natlas=Atlas\nauthor=Author\nauthorizationRequired=Authorization required\nauthorizeThisAppIn=Authorize this app in {1}:\nauthorize=Authorize\nauthorizing=Authorizing\nautomatic=Automatic\nautosave=Autosave\nautosize=Autosize\nattachments=Attachments\naws=AWS\naws3d=AWS 3D\nazure=Azure\nbackground=Background\nbackgroundColor=Background Color\nbackgroundImage=Background Image\nbasic=Basic\nblankDrawing=Blank Drawing\nblankDiagram=Blank Diagram\nblock=Block\nblockquote=Blockquote\nblog=Blog\nbold=Bold\nbootstrap=Bootstrap\nborder=Border\nborderColor=Border Color\nborderWidth=Borderwidth\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\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\nchangesNotSaved=Changes have not been saved\nuserJoined={1} has joined\nuserLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\ncollaborativeEditingNotice=Important Notice for Collaborative Editing\ncompressed=Compressed\ncommitMessage=Commit Message\ncsv=CSV\ndark=Dark\ndraftFound=A draft for '{1}' has been found. Load it into the editor or discard it to continue.\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\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\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\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopySize=Copy Size\ncopyStyle=Copy Style\ncreate=Create\ncreateNewDiagram=Create New Diagram\ncreateRevision=Create Revision\ncreateShape=Create Shape\ncrop=Crop\ncurved=Curved\ncustom=Custom\ncurrent=Current\ncut=Cut\ndashed=Dashed\ndecideLater=Decide later\ndefault=Default\ndelete=Delete\ndeleteColumn=Delete Column\ndeleteLibrary401=Insufficient permissions to delete this library\ndeleteLibrary404=Selected library could not be found\ndeleteLibrary500=Error deleting library\ndeleteLibraryConfirm=You are about to permanently delete this library. Are you sure you want to do this?\ndeleteRow=Delete Row\ndescription=Description\ndevice=Device\ndiagram=Diagram\ndiagramContent=Diagram Content\ndiagramLocked=Diagram has been locked to prevent further data loss.\ndiagramLockedBySince=The diagram is locked by {1} since {2} ago\ndiagramName=Diagram Name\ndiagramIsPublic=Diagram is public\ndiagramIsNotPublic=Diagram is not public\ndiamond=Diamond\ndiamondThin=Diamond (thin)\ndidYouKnow=Did you know...\ndirection=Direction\ndiscard=Discard\ndiscardChangesAndReconnect=Discard Changes and Reconnect\ngoogleDriveMissingClickHere=Google Drive missing? Click here!\ndiscardChanges=Discard Changes\ndisconnected=Disconnected\ndistribute=Distribute\ndone=Done\ndotted=Dotted\ndoubleClickOrientation=Doubleclick to change orientation\ndoubleClickTooltip=Doubleclick to insert text\ndoubleClickChangeProperty=Doubleclick to change property name\ndownload=Download\ndownloadDesktop=Download draw.io Desktop\ndownloadAs=Download as\nclickHereToSave=Click here to save.\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\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\nerror=Error\nerrorDeletingFile=Error deleting file\nerrorLoadingFile=Error loading file\nerrorRenamingFile=Error renaming file\nerrorRenamingFileNotFound=Error renaming file. File was not found.\nerrorRenamingFileForbidden=Error renaming file. Insufficient access rights.\nerrorSavingDraft=Error saving draft\nerrorSavingFile=Error saving file\nerrorSavingFileUnknown=Error authorizing with Google's servers. Please refresh the page to re-attempt.\nerrorSavingFileForbidden=Error saving file. Insufficient access rights.\nerrorSavingFileNameConflict=Could not save diagram. Current page already contains file named '{1}'.\nerrorSavingFileNotFound=Error saving file. File was not found.\nerrorSavingFileReadOnlyMode=Could not save diagram while read-only mode is active.\nerrorSavingFileSessionTimeout=Your session has ended. Please <a target='_blank' href='{1}'>{2}</a> and return to this tab to try to save again.\nerrorSendingFeedback=Error sending feedback.\nerrorUpdatingPreview=Error updating preview.\nexit=Exit\nexitGroup=Exit Group\nexpand=Expand\nexport=Export\nexporting=Exporting\nexportAs=Export as\nexportOptionsDisabled=Export options disabled\nexportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.\nexternalChanges=External Changes\nextras=Extras\nfacebook=Facebook\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwriteDialog=The file has been modified. Do you want to save the file and overwrite those changes?\nfileChangedSyncDialog=The file has been modified. Do you want to synchronize those changes?\nfileChangedSync=The file has been modified. Click here to synchronize.\noverwrite=Overwrite\nsynchronize=Synchronize\nfilename=Filename\nfileExists=File already exists\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 read access.\nfileNotLoaded=File not loaded\nfileNotSaved=File not saved\nfileOpenLocation=How would you like to open these file(s)?\nfileWillBeSavedInAppFolder={1} will be saved in the app folder.\nfill=Fill\nfillColor=Fill Color\nfilterCards=Filter Cards\nfind=Find\nfit=Fit\nfitContainer=Resize Container\nfitIntoContainer=Fit into Container\nfitPage=Fit Page\nfitPageWidth=Fit Page Width\nfitTo=Fit to\nfitToSheetsAcross=sheet(s) across\nfitToBy=by\nfitToSheetsDown=sheet(s) down\nfitTwoPages=Two Pages\nfitWindow=Fit Window\nflip=Flip\nflipH=Flip Horizontal\nflipV=Flip Vertical\nflowchart=Flowchart\nfolder=Folder\nfont=Font\nfontColor=Font Color\nfontFamily=Font Family\nfontSize=Font Size\nforbidden=You are not authorized to access this file\nformat=Format\nformatPanel=Format Panel\nformatted=Formatted\nformattedText=Formatted Text\nformatPng=PNG\nformatGif=GIF\nformatJpg=JPEG\nformatPdf=PDF\nformatSql=SQL\nformatSvg=SVG\nformatHtmlEmbedded=HTML\nformatSvgEmbedded=SVG (with XML)\nformatVsdx=VSDX\nformatVssx=VSSX\nformatXmlPlain=XML (Plain)\nformatXml=XML\nforum=Discussion/Help Forums\nfromTemplate=From Template\nfromTemplateUrl=From Template URL\nfromText=From Text\nfromUrl=From URL\nfromThisPage=From this page\nfullscreen=Fullscreen\ngap=Gap\ngcp=GCP\ngeneral=General\ngithub=GitHub\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\ngooglePlus=Google+\ngoogleSlides=Google Slides\ngoogleSites=Google Sites\ngradient=Gradient\ngradientColor=Color\ngrid=Grid\ngridColor=Grid Color\ngridSize=Grid Size\ngroup=Group\nguides=Guides\nhateApp=I hate draw.io\nheading=Heading\nheight=Height\nhelp=Help\nhelpTranslate=Help us translate this application\nhide=Hide\nhideIt=Hide {1}\nhidden=Hidden\nhome=Home\nhorizontal=Horizontal\nhorizontalFlow=Horizontal Flow\nhorizontalTree=Horizontal Tree\nhowTranslate=How good is the translation in your language?\nhtml=HTML\nhtmlText=HTML Text\nid=ID\niframe=IFrame\nignore=Ignore\nimage=Image\nimageUrl=Image URL\nimages=Images\nimagePreviewError=This image couldn't be loaded for preview. Please check the URL.\nimageTooBig=Image too big\nimgur=Imgur\nimport=Import\nimportFrom=Import from\nincludeCopyOfMyDiagram=Include a copy of my diagram\nincreaseIndent=Increase Indent\ndecreaseIndent=Decrease Indent\ninsert=Insert\ninsertColumnBefore=Insert Column Left\ninsertColumnAfter=Insert Column Right\ninsertEllipse=Insert Ellipse\ninsertImage=Insert Image\ninsertHorizontalRule=Insert Horizontal Rule\ninsertLink=Insert Link\ninsertPage=Insert Page\ninsertRectangle=Insert Rectangle\ninsertRhombus=Insert Rhombus\ninsertRowBefore=Insert Row Above\ninsertRowAfter=Insert Row After\ninsertText=Insert Text\ninserting=Inserting\ninvalidFilename=Diagram names must not contain the following characters: / | : ; { } < > & + ? = \"\ninvalidLicenseSeeThisPage=Your license is invalid, please see this <a target=\"_blank\" href=\"https://support.draw.io/display/DFCS/Licensing+your+draw.io+plugin\">page</a>.\ninvalidName=Invalid name\ninvalidOrMissingFile=Invalid or missing file\ninvalidPublicUrl=Invalid public URL\nisometric=Isometric\nios=iOS\nitalic=Italic\nkennedy=Kennedy\nkeyboardShortcuts=Keyboard Shortcuts\nlayers=Layers\nlandscape=Landscape\nlanguage=Language\nleanMapping=Lean Mapping\nlastChange=Last change {1} ago\nlessThanAMinute=less than a minute\nlicensingError=Licensing Error\nlicenseHasExpired=The license for {1} has expired on {2}. Click here.\nlicenseWillExpire=The license for {1} will expire on {2}. Click here.\nlineJumps=Line jumps\nlinkAccountRequired=If the diagram is not public a Google account is required to view the link.\nlinkText=Link Text\nlist=List\nminute=minute\nminutes=minutes\nhours=hours\ndays=days\nmonths=months\nyears=years\nrestartForChangeRequired=Changes will take effect after page refresh.\nlaneColor=Lanecolor\nlastModified=Last modified\nlayout=Layout\nleft=Left\nleftAlign=Left Align\nleftToRight=Left to right\nlibraryTooltip=Drag and drop shapes here or click + to insert. Double click to edit.\nlightbox=Lightbox\nline=Line\nlineend=Line end\nlineheight=Line Height\nlinestart=Line start\nlinewidth=Linewidth\nlink=Link\nlinks=Links\nloading=Loading\nlockUnlock=Lock/Unlock\nloggedOut=Logged Out\nlogIn=log in\nloveIt=I love {1}\nlucidchart=Lucidchart\nmaps=Maps\nmathematicalTypesetting=Mathematical Typesetting\nmakeCopy=Make a Copy\nmanual=Manual\nmiddle=Middle\nminimal=Minimal\nmisc=Misc\nmockups=Mockups\nmodificationDate=Modification date\nmodifiedBy=Modified by\nmore=More\nmoreResults=More Results\nmoreShapes=More Shapes\nmove=Move\nmoveToFolder=Move to Folder\nmoving=Moving\nmoveSelectionTo=Move selection to {1}\nname=Name\nnavigation=Navigation\nnetwork=Network\nnetworking=Networking\nnew=New\nnewLibrary=New Library\nnextPage=Next Page\nno=No\nnoPickFolder=No, pick folder\nnoAttachments=No attachments found\nnoColor=No Color\nnoFiles=No Files\nnoFileSelected=No file selected\nnoLibraries=No libraries found\nnoMoreResults=No more results\nnone=None\nnoOtherViewers=No other viewers\nnoPlugins=No plugins\nnoPreview=No preview\nnoResponse=No response from server\nnoResultsFor=No results for '{1}'\nnoRevisions=No revisions\nnoSearchResults=No search results found\nnoPageContentOrNotSaved=No anchors found on this page or it hasn't been saved yet\nnormal=Normal\nnorth=North\nnotADiagramFile=Not a diagram file\nnotALibraryFile=Not a library file\nnotAvailable=Not available\nnotAUtf8File=Not a UTF-8 file\nnotConnected=Not connected\nnote=Note\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\northogonal=Orthogonal\notherViewer=other viewer\notherViewers=other viewers\noutline=Outline\noval=Oval\npage=Page\npageContent=Page Content\npageNotFound=Page not found\npageWithNumber=Page-{1}\npages=Pages\npageView=Page View\npageSetup=Page Setup\npageScale=Page Scale\npan=Pan\npanTooltip=Space+Drag to pan\npaperSize=Paper Size\npattern=Pattern\npaste=Paste\npasteHere=Paste here\npasteSize=Paste Size\npasteStyle=Paste Style\nperimeter=Perimeter\npermissionAnyone=Anyone can edit\npermissionAuthor=Owner and admins can edit\npickFolder=Pick a folder\npickLibraryDialogTitle=Select Library\npublicDiagramUrl=Public URL of the diagram\nplaceholders=Placeholders\nplantUml=PlantUML\nplugins=Plugins\npluginUrl=Plugin URL\npluginWarning=The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n\nplusTooltip=Click to connect and clone (ctrl+click to clone, shift+click to connect). Drag to connect (ctrl+drag to clone).\nportrait=Portrait\nposition=Position\nposterPrint=Poster Print\npreferences=Preferences\npreview=Preview\npreviousPage=Previous Page\nprint=Print\nprintAllPages=Print All Pages\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nproperties=Properties\npublish=Publish\nquickStart=Quick Start Video\nrack=Rack\nradialTree=Radial Tree\nreadOnly=Read-only\nreconnecting=Reconnecting\nrecentlyUpdated=Recently Updated\nrecentlyViewed=Recently Viewed\nrectangle=Rectangle\nredirectToNewApp=This file was created or modified in a newer version of this app. You will be redirected now.\nrealtimeTimeout=It looks like you've made a few changes while offline. We're sorry, these changes cannot be saved.\nredo=Redo\nrefresh=Refresh\nregularExpression=Regular Expression\nrelative=Relative\nrelativeUrlNotAllowed=Relative URL not allowed\nrememberMe=Remember me\nrememberThisSetting=Remember this setting\nremoveFormat=Clear Formatting\nremoveFromGroup=Remove from Group\nremoveIt=Remove {1}\nremoveWaypoint=Remove Waypoint\nrename=Rename\nrenamed=Renamed\nrenameIt=Rename {1}\nrenaming=Renaming\nreplace=Replace\nreplaceIt={1} already exists. Do you want to replace it?\nreplaceExistingDrawing=Replace existing drawing\nrequired=required\nreset=Reset\nresetView=Reset View\nresize=Resize\nresizeLargeImages=Do you want to resize large images to make the application run faster?\nretina=Retina\nresponsive=Responsive\nrestore=Restore\nrestoring=Restoring\nretryingIn=Retrying in {1} second(s)\nretryingLoad=Load failed. Retrying...\nretryingLogin=Login time out. Retrying...\nreverse=Reverse\nrevision=Revision\nrevisionHistory=Revision History\nrhombus=Rhombus\nright=Right\nrightAlign=Right Align\nrightToLeft=Right to left\nrotate=Rotate\nrotateTooltip=Click and drag to rotate, click to turn shape only by 90 degrees\nrotation=Rotation\nrounded=Rounded\nsave=Save\nsaveAndExit=Save & Exit\nsaveAs=Save as\nsaveAsXmlFile=Save as XML file?\nsaved=Saved\nsaveDiagramsTo=Save diagrams to\nsaveLibrary403=Insufficient permissions to edit this library\nsaveLibrary500=There was an error while saving the library\nsaving=Saving\nscratchpad=Scratchpad\nscrollbars=Scrollbars\nsearch=Search\nsearchShapes=Search Shapes\nselectAll=Select All\nselectionOnly=Selection Only\nselectCard=Select Card\nselectEdges=Select Edges\nselectFile=Select File\nselectFolder=Select Folder\nselectFont=Select Font\nselectNone=Select None\nselectTemplate=Select Template\nselectVertices=Select Vertices\nsendMessage=Send\nsendYourFeedbackToDrawIo=Send your feedback to draw.io\nserviceUnavailableOrBlocked=Service unavailable or blocked\nsessionExpired=Your session has expired. Please refresh the browser window.\nsessionTimeoutOnSave=Your session has timed out and you have been disconnected from the Google Drive. Press OK to login and save. \nsetAsDefaultStyle=Set as Default Style\nshadow=Shadow\nshape=Shape\nshapes=Shapes\nshare=Share\nshareLink=Link for shared editing\nsharp=Sharp\nshow=Show\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click to expand. Drag and drop shapes into the diagram. Shift+click to change selection. Alt+click to insert and connect.\nsigns=Signs\nsignOut=Sign out\nsimple=Simple\nsimpleArrow=Simple Arrow\nsize=Size\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstandard=Standard\nstarting=Starting\nstraight=Straight\nstrokeColor=Line Color\nstyle=Style\nsubscript=Subscript\nsummary=Summary\nsuperscript=Superscript\nsupport=Support\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\ntooltips=Tooltips\ntop=Top\ntopAlign=Top Align\ntopLeft=Top Left\ntopRight=Top Right\ntransparent=Transparent\ntransparentBackground=Transparent Background\ntrello=Trello\ntryAgain=Try again\ntryOpeningViaThisPage=Try opening via this page.\nturn=Rotate shape only by 90°\ntype=Type\ntwitter=Twitter\numl=UML\nunderline=Underline\nundo=Undo\nungroup=Ungroup\nunsavedChanges=Unsaved changes\nunsavedChangesClickHereToSave=Unsaved changes. Click here to save.\nuntitled=Untitled\nuntitledDiagram=Untitled Diagram\nuntitledLayer=Untitled Layer\nuntitledLibrary=Untitled Library\nunknownError=Unknown error\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuseOffline=Use Offline\nuseRootFolder=Use root folder?\nuserManual=User Manual\nvertical=Vertical\nverticalFlow=Vertical Flow\nverticalTree=Vertical Tree\nview=View\nviewUrl=Link to view: {1}\nvoiceAssistant=Voice Assistant (beta)\nwarning=Warning\nwaypoints=Waypoints\nwest=West\nwidth=Width\nwiki=Wiki\nwordWrap=Word Wrap\nwritingDirection=Writing Direction\nyes=Yes\nyourEmailAddress=Your email address\nzoom=Zoom\nzoomIn=Zoom In\nzoomOut=Zoom Out\nbasic=Basic\nbusinessprocess=Business Processes\ncharts=Charts\nengineering=Engineering\nflowcharts=Flowcharts\ngmdl=Material Design\nmindmaps=Mindmaps\nmockups=Mockups\nnetworkdiagrams=Network Diagrams\nnothingIsSelected=Nothing is selected\nother=Other\nsoftwaredesign=Software Design\nvenndiagrams=Venn Diagrams\nwebEmailOrOther=Web, email or any other internet address\nwebLink=Web Link\nwireframes=Wireframes\nproperty=Property\nvalue=Value\nshowMore=Show More\nshowLess=Show Less\nmyDiagrams=My Diagrams\nallDiagrams=All Diagrams\nrecentlyUsed=Recently used\nlistView=List view\ngridView=Grid view\nresultsFor=Results for '{1}'\n");Graph.prototype.defaultThemes[Graph.prototype.defaultThemeName]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#ffffff"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#ffffff"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="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><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="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="white"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#ffffff"/></add></mxStylesheet>').documentElement;
Graph.prototype.defaultThemes.darkTheme=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#2a2a2a"/><add as="strokeColor" value="#f0f0f0"/><add as="fontColor" value="#f0f0f0"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#f0f0f0"/><add as="fontColor" value="#f0f0f0"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#2a2a2a"/></add></mxStylesheet>').documentElement;GraphViewer=function(a,b,e){this.init(a,b,e)};mxUtils.extend(GraphViewer,mxEventSource);GraphViewer.prototype.editBlankUrl="https://www.draw.io/";GraphViewer.prototype.imageBaseUrl="https://www.draw.io/";GraphViewer.prototype.toolbarHeight="BackCompat"==document.compatMode?28:30;GraphViewer.prototype.lightboxChrome=!0;GraphViewer.prototype.lightboxZIndex=999;GraphViewer.prototype.toolbarZIndex=999;GraphViewer.prototype.autoFit=!0;GraphViewer.prototype.allowZoomIn=!1;
@@ -3339,13 +3340,13 @@ GraphViewer.prototype.addToolbar=function(){function a(a,b,c,d){var g=document.c
function(){g.style.backgroundColor="#eee"}),mxUtils.setOpacity(a,60),g.style.cursor="pointer"):mxUtils.setOpacity(g,30);g.appendChild(a);e.appendChild(g);f++;return g}var b=this.graph.container;"bottom"==this.graphConfig["toolbar-position"]?b.style.marginBottom=this.toolbarHeight+"px":"inline"!=this.graphConfig["toolbar-position"]&&(b.style.marginTop=this.toolbarHeight+"px");var e=b.ownerDocument.createElement("div");e.style.position="absolute";e.style.overflow="hidden";e.style.boxSizing="border-box";
e.style.whiteSpace="nowrap";e.style.zIndex=this.toolbarZIndex;e.style.backgroundColor="#eee";e.style.height=this.toolbarHeight+"px";this.toolbar=e;if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(e.style,"transition","opacity 100ms ease-in-out");mxUtils.setOpacity(e,30);var d=null,k=null,l=mxUtils.bind(this,function(a){null!=d&&(window.clearTimeout(d),fadeThead=null);null!=k&&(window.clearTimeout(k),fadeThead2=null);d=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(e,
0);d=null;k=window.setTimeout(mxUtils.bind(this,function(){e.style.display="none";k=null}),100)}),a||200)}),p=mxUtils.bind(this,function(a){null!=d&&(window.clearTimeout(d),fadeThead=null);null!=k&&(window.clearTimeout(k),fadeThead2=null);e.style.display="";mxUtils.setOpacity(e,a||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(p(30),l())}));mxEvent.addListener(e,mxClient.IS_POINTER?"pointermove":
-"mousemove",function(a){mxEvent.consume(a)});mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(a){p(100)}));mxEvent.addListener(e,"mousemove",mxUtils.bind(this,function(a){p(100);mxEvent.consume(a)}));mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||p(30)}));var q=this.graph,u=q.getTolerance();q.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(a,b){this.startX=b.getGraphX();this.startY=b.getGraphY();this.scrollLeft=
-q.container.scrollLeft;this.scrollTop=q.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(a,b){mxEvent.isTouchEvent(b.getEvent())&&Math.abs(this.scrollLeft-q.container.scrollLeft)<u&&Math.abs(this.scrollTop-q.container.scrollTop)<u&&Math.abs(this.startX-b.getGraphX())<u&&Math.abs(this.startY-b.getGraphY())<u&&(0<parseFloat(e.style.opacity||0)?l():p(30))}})}for(var c=this.toolbarItems,f=0,g=null,n=null,r=0;r<c.length;r++){var h=c[r];if("pages"==h){n=b.ownerDocument.createElement("div");
+"mousemove",function(a){mxEvent.consume(a)});mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(a){p(100)}));mxEvent.addListener(e,"mousemove",mxUtils.bind(this,function(a){p(100);mxEvent.consume(a)}));mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||p(30)}));var q=this.graph,t=q.getTolerance();q.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(a,b){this.startX=b.getGraphX();this.startY=b.getGraphY();this.scrollLeft=
+q.container.scrollLeft;this.scrollTop=q.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(a,b){mxEvent.isTouchEvent(b.getEvent())&&Math.abs(this.scrollLeft-q.container.scrollLeft)<t&&Math.abs(this.scrollTop-q.container.scrollTop)<t&&Math.abs(this.startX-b.getGraphX())<t&&Math.abs(this.startY-b.getGraphY())<t&&(0<parseFloat(e.style.opacity||0)?l():p(30))}})}for(var c=this.toolbarItems,f=0,g=null,n=null,r=0;r<c.length;r++){var h=c[r];if("pages"==h){n=b.ownerDocument.createElement("div");
n.style.cssText="display:inline-block;position:relative;padding:3px 4px 0 4px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;";mxUtils.setOpacity(n,70);var m=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");m.style.borderRightStyle="none";m.style.paddingLeft="0px";m.style.paddingRight="0px";e.appendChild(n);var w=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage+
1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");w.style.paddingLeft="0px";w.style.paddingRight="0px";h=mxUtils.bind(this,function(){n.innerHTML="";mxUtils.write(n,this.currentPage+1+" / "+this.diagrams.length);n.style.display=1<this.diagrams.length?"inline-block":"none";m.style.display=n.style.display;w.style.display=n.style.display});this.addListener("graphChanged",h);h()}else if("zoom"==h)this.zoomEnabled&&(a(mxUtils.bind(this,function(){this.graph.zoomOut()}),Editor.zoomOutImage,
-mxResources.get("zoomOut")||"Zoom Out"),a(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),a(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"==h){if(this.layersEnabled){var v=this.graph.getModel(),D=a(mxUtils.bind(this,function(a){if(null!=g)g.parentNode.removeChild(g),
-g=null;else{g=this.graph.createLayersDialog();mxEvent.addListener(g,"mouseleave",function(){g.parentNode.removeChild(g);g=null});a=D.getBoundingClientRect();g.style.width="140px";g.style.padding="2px 0px 2px 0px";g.style.border="1px solid #d0d0d0";g.style.backgroundColor="#eee";g.style.fontFamily="Helvetica Neue,Helvetica,Arial Unicode MS,Arial";g.style.fontSize="11px";g.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(g,80);var b=mxUtils.getDocumentScrollOrigin(document);g.style.left=b.x+a.left+
-"px";g.style.top=b.y+a.bottom+"px";document.body.appendChild(g)}}),Editor.layersImage,mxResources.get("layers")||"Layers");v.addListener(mxEvent.CHANGE,function(){D.style.display=1<v.getChildCount(v.root)?"inline-block":"none"});D.style.display=1<v.getChildCount(v.root)?"inline-block":"none"}}else"lightbox"==h?this.lightboxEnabled&&a(mxUtils.bind(this,function(){this.showLightbox()}),Editor.maximizeImage,mxResources.get("show")||"Show"):null!=this.graphConfig["toolbar-buttons"]&&(h=this.graphConfig["toolbar-buttons"][h],
+mxResources.get("zoomOut")||"Zoom Out"),a(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),a(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"==h){if(this.layersEnabled){var v=this.graph.getModel(),E=a(mxUtils.bind(this,function(a){if(null!=g)g.parentNode.removeChild(g),
+g=null;else{g=this.graph.createLayersDialog();mxEvent.addListener(g,"mouseleave",function(){g.parentNode.removeChild(g);g=null});a=E.getBoundingClientRect();g.style.width="140px";g.style.padding="2px 0px 2px 0px";g.style.border="1px solid #d0d0d0";g.style.backgroundColor="#eee";g.style.fontFamily="Helvetica Neue,Helvetica,Arial Unicode MS,Arial";g.style.fontSize="11px";g.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(g,80);var b=mxUtils.getDocumentScrollOrigin(document);g.style.left=b.x+a.left+
+"px";g.style.top=b.y+a.bottom+"px";document.body.appendChild(g)}}),Editor.layersImage,mxResources.get("layers")||"Layers");v.addListener(mxEvent.CHANGE,function(){E.style.display=1<v.getChildCount(v.root)?"inline-block":"none"});E.style.display=1<v.getChildCount(v.root)?"inline-block":"none"}}else"lightbox"==h?this.lightboxEnabled&&a(mxUtils.bind(this,function(){this.showLightbox()}),Editor.maximizeImage,mxResources.get("show")||"Show"):null!=this.graphConfig["toolbar-buttons"]&&(h=this.graphConfig["toolbar-buttons"][h],
null!=h&&a(null==h.enabled||h.enabled?h.handler:function(){},h.image,h.title,h.enabled))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*f);null!=this.graphConfig.title&&(c=b.ownerDocument.createElement("div"),c.style.cssText="display:inline-block;position:relative;padding:3px 6px 0 6px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;",c.setAttribute("title",this.graphConfig.title),mxUtils.write(c,this.graphConfig.title),mxUtils.setOpacity(c,
70),e.appendChild(c));this.minToolbarWidth=34*f;var x=b.style.border,c=mxUtils.bind(this,function(){var a=b.getBoundingClientRect(),c=mxUtils.getScrollOrigin(document.body),c="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-c.x,top:-c.y},a={left:a.left-c.left,top:a.top-c.top,bottom:a.bottom-c.top,right:a.right-c.left};e.style.left=a.left+"px";e.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,b.offsetWidth)+"px";
e.style.border="1px solid #d0d0d0";"bottom"==this.graphConfig["toolbar-position"]?e.style.top=a.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(e.style.marginTop=-this.toolbarHeight+"px",e.style.top=a.top+1+"px"):e.style.top=a.top+"px";"1px solid transparent"==x&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(e);var d=mxUtils.bind(this,function(){1!=this.graphConfig["toolbar-nohide"]&&(null!=e.parentNode&&e.parentNode.removeChild(e),null!=g&&(g.parentNode.removeChild(g),
@@ -3359,7 +3360,7 @@ GraphViewer.prototype.showLocalLightbox=function(){var a=mxUtils.getDocumentScro
var e=document.createElement("img");e.setAttribute("border","0");e.setAttribute("src",Editor.closeImage);mxClient.IS_QUIRKS?(e.style.position="absolute",e.style.right="32px",e.style.top=a.y+32+"px"):e.style.cssText="position:fixed;top:32px;right:32px;";e.style.cursor="pointer";mxEvent.addListener(e,"click",function(){d.destroy()});urlParams.pages="1";urlParams.page=this.currentPage;urlParams.nav=0!=this.graphConfig.nav?"1":"0";urlParams.layers=this.layersEnabled?"1":"0";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(){};Graph.prototype.shadowId="lightboxDropShadow";var d=new EditorUi(new Editor(!0),document.createElement("div"),!0);d.editor.editBlankUrl=this.editBlankUrl;Graph.prototype.shadowId="dropShadow";d.refresh=
function(){};var k=mxUtils.bind(this,function(a){27==a.keyCode&&d.destroy()}),l=d.destroy;d.destroy=function(){mxEvent.removeListener(document.documentElement,"keydown",k);document.body.removeChild(b);document.body.removeChild(e);document.body.style.overflow="auto";GraphViewer.resizeSensorEnabled=!0;l.apply(this,arguments)};var p=d.editor.graph,q=p.container;q.style.overflow="hidden";this.lightboxChrome?(q.style.border="1px solid #c0c0c0",q.style.margin="40px",mxEvent.addListener(document.documentElement,
-"keydown",k)):(b.style.display="none",e.style.display="none");var u=this;p.getImageFromBundles=function(a){return u.getImageUrl(a)};var c=d.createTemporaryGraph;d.createTemporaryGraph=function(){var a=c.apply(this,arguments);a.getImageFromBundles=function(a){return u.getImageUrl(a)};return a};this.graphConfig.move&&(p.isMoveCellsEvent=function(a){return!0});mxClient.IS_QUIRKS||(mxUtils.setPrefixedStyle(q.style,"border-radius","4px"),q.style.position="fixed");GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow=
+"keydown",k)):(b.style.display="none",e.style.display="none");var t=this;p.getImageFromBundles=function(a){return t.getImageUrl(a)};var c=d.createTemporaryGraph;d.createTemporaryGraph=function(){var a=c.apply(this,arguments);a.getImageFromBundles=function(a){return t.getImageUrl(a)};return a};this.graphConfig.move&&(p.isMoveCellsEvent=function(a){return!0});mxClient.IS_QUIRKS||(mxUtils.setPrefixedStyle(q.style,"border-radius","4px"),q.style.position="fixed");GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow=
"hidden";mxClient.IS_SF||mxClient.IS_EDGE||(mxUtils.setPrefixedStyle(q.style,"transform","rotateY(90deg)"),mxUtils.setPrefixedStyle(q.style,"transition","all .25s ease-in-out"));this.addClickHandler(p,d);window.setTimeout(mxUtils.bind(this,function(){q.style.outline="none";q.style.zIndex=this.lightboxZIndex;e.style.zIndex=this.lightboxZIndex;document.body.appendChild(q);document.body.appendChild(e);d.setFileData(this.xml);mxUtils.setPrefixedStyle(q.style,"transform","rotateY(0deg)");d.chromelessToolbar.style.bottom=
"60px";d.chromelessToolbar.style.zIndex=this.lightboxZIndex;document.body.appendChild(d.chromelessToolbar);d.getEditBlankXml=mxUtils.bind(this,function(){return this.xml});mxClient.IS_QUIRKS&&(q.style.position="absolute",q.style.display="block",q.style.left=a.x+"px",q.style.top=a.y+"px",q.style.width=document.body.clientWidth-80+"px",q.style.height=document.body.clientHeight-80+"px",q.style.backgroundColor="white",d.chromelessToolbar.style.display="block",d.chromelessToolbar.style.position="absolute",
d.chromelessToolbar.style.bottom="",d.chromelessToolbar.style.top=a.y+document.body.clientHeight-100+"px");d.lightboxFit();d.chromelessResize();this.showLayers(p,this.graph);mxEvent.addListener(b,"click",function(){d.destroy()})}),0);return d};GraphViewer.processElements=function(a){mxUtils.forEach(GraphViewer.getElementsByClassName(a||"mxgraph"),function(a){try{a.innerHTML="",GraphViewer.createViewerForElement(a)}catch(e){throw a.innerHTML=e.message,e;}})};
@@ -3369,7 +3370,7 @@ GraphViewer.initCss=function(){try{var a=document.createElement("style");a.type=
GraphViewer.cachedUrls={};GraphViewer.getUrl=function(a,b,e){if(null!=GraphViewer.cachedUrls[a])b(GraphViewer.cachedUrls[a]);else{var d=0<navigator.userAgent.indexOf("MSIE 9")?new XDomainRequest:new XMLHttpRequest;d.open("GET",a);d.onload=function(){b(null!=d.getText?d.getText():d.responseText)};d.onerror=e;d.send()}};GraphViewer.resizeSensorEnabled=!0;GraphViewer.useResizeSensor=!0;
(function(){var a=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(a){return window.setTimeout(a,20)},b=function(e,d){function k(){this.q=[];this.add=function(a){this.q.push(a)};var a,b;this.call=function(){a=0;for(b=this.q.length;a<b;a++)this.q[a].call()}}function l(a,b){return a.currentStyle?a.currentStyle[b]:window.getComputedStyle?window.getComputedStyle(a,null).getPropertyValue(b):a.style[b]}function p(b,c){if(!b.resizedAttached)b.resizedAttached=
new k,b.resizedAttached.add(c);else if(b.resizedAttached){b.resizedAttached.add(c);return}b.resizeSensor=document.createElement("div");b.resizeSensor.className="resize-sensor";b.resizeSensor.style.cssText="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;";b.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>';
-b.appendChild(b.resizeSensor);"static"==l(b,"position")&&(b.style.position="relative");var d=b.resizeSensor.childNodes[0],e=d.childNodes[0],f=b.resizeSensor.childNodes[1],g=function(){e.style.width="100000px";e.style.height="100000px";d.scrollLeft=1E5;d.scrollTop=1E5;f.scrollLeft=1E5;f.scrollTop=1E5};g();var n=!1,p=function(){b.resizedAttached&&(n&&(b.resizedAttached.call(),n=!1),a(p))};a(p);var q,t,u,B,N=function(){if((u=b.offsetWidth)!=q||(B=b.offsetHeight)!=t)n=!0,q=u,t=B;g()},C=function(a,b,c){a.attachEvent?
-a.attachEvent("on"+b,c):a.addEventListener(b,c)};C(d,"scroll",N);C(f,"scroll",N)}var q=function(){GraphViewer.resizeSensorEnabled&&d()},u=Object.prototype.toString.call(e),c="[object Array]"===u||"[object NodeList]"===u||"[object HTMLCollection]"===u||"undefined"!==typeof jQuery&&e instanceof jQuery||"undefined"!==typeof Elements&&e instanceof Elements;if(c)for(var u=0,f=e.length;u<f;u++)p(e[u],q);else p(e,q);this.detach=function(){if(c)for(var a=0,d=e.length;a<d;a++)b.detach(e[a]);else b.detach(e)}};
+b.appendChild(b.resizeSensor);"static"==l(b,"position")&&(b.style.position="relative");var d=b.resizeSensor.childNodes[0],e=d.childNodes[0],f=b.resizeSensor.childNodes[1],g=function(){e.style.width="100000px";e.style.height="100000px";d.scrollLeft=1E5;d.scrollTop=1E5;f.scrollLeft=1E5;f.scrollTop=1E5};g();var n=!1,p=function(){b.resizedAttached&&(n&&(b.resizedAttached.call(),n=!1),a(p))};a(p);var q,u,t,C,N=function(){if((t=b.offsetWidth)!=q||(C=b.offsetHeight)!=u)n=!0,q=t,u=C;g()},D=function(a,b,c){a.attachEvent?
+a.attachEvent("on"+b,c):a.addEventListener(b,c)};D(d,"scroll",N);D(f,"scroll",N)}var q=function(){GraphViewer.resizeSensorEnabled&&d()},t=Object.prototype.toString.call(e),c="[object Array]"===t||"[object NodeList]"===t||"[object HTMLCollection]"===t||"undefined"!==typeof jQuery&&e instanceof jQuery||"undefined"!==typeof Elements&&e instanceof Elements;if(c)for(var t=0,f=e.length;t<f;t++)p(e[t],q);else p(e,q);this.detach=function(){if(c)for(var a=0,d=e.length;a<d;a++)b.detach(e[a]);else b.detach(e)}};
b.detach=function(a){a.resizeSensor&&(a.removeChild(a.resizeSensor),delete a.resizeSensor,delete a.resizedAttached)};window.ResizeSensor=b})();
(function(){Editor.initMath();GraphViewer.initCss();if(null!=window.onDrawioViewerLoad)window.onDrawioViewerLoad();else GraphViewer.processElements()})();