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-05 16:29:19 +0300
committerGaudenz Alder <gaudenz@jgraph.com>2019-01-05 16:29:19 +0300
commit62c97c7a554f382242da6ae54e20db9f555acb9a (patch)
tree6d0cd238535a22955616e576f13ce95147b07360
parentd94582731a400f21f7f092c38996405c417f97fd (diff)
10.0.22 releasev10.0.22
Former-commit-id: dda53dda284c738bd28c304d5011fedee76500da
-rw-r--r--ChangeLog6
-rw-r--r--VERSION2
-rw-r--r--src/main/webapp/cache.manifest2
-rw-r--r--src/main/webapp/js/app.min.js1139
-rw-r--r--src/main/webapp/js/atlas-viewer.min.js591
-rw-r--r--src/main/webapp/js/atlas.min.js1213
-rw-r--r--src/main/webapp/js/diagramly/DrawioFile.js72
-rw-r--r--src/main/webapp/js/diagramly/DrawioFileSync.js357
-rw-r--r--src/main/webapp/js/diagramly/EditorUi.js27
-rw-r--r--src/main/webapp/js/embed-static.min.js2
-rw-r--r--src/main/webapp/js/reader.min.js2
-rw-r--r--src/main/webapp/js/viewer.min.js591
12 files changed, 2015 insertions, 1989 deletions
diff --git a/ChangeLog b/ChangeLog
index e893a8c0..1cb58ddc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+05-JAN-2019: 10.0.22
+
+- Adds initial change check in sync protocol
+- Ignores numeric JS errors in checksum
+- Fixes pending sync on inactive window
+
04-JAN-2019: 10.0.21
- Adds debug output for checksum errors
diff --git a/VERSION b/VERSION
index 3b55558c..5a13090b 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-10.0.21 \ No newline at end of file
+10.0.22 \ No newline at end of file
diff --git a/src/main/webapp/cache.manifest b/src/main/webapp/cache.manifest
index 199971ee..512aa78b 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/04/2019 06:00 PM
+# 01/05/2019 02:00 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 c3f4b46b..b801d443 100644
--- a/src/main/webapp/js/app.min.js
+++ b/src/main/webapp/js/app.min.js
@@ -7393,21 +7393,21 @@ this.getTagsForStencil("mxgraph.weblogos","xanga","web logos logo").join(" ")),t
DrawioFile=function(a,c){mxEventSource.call(this);this.ui=a;this.shadowData=this.data=c||""};DrawioFile.SYNC=urlParams.sync||"auto";DrawioFile.LAST_WRITE_WINS=!0;mxUtils.extend(DrawioFile,mxEventSource);DrawioFile.prototype.allChangesSavedKey="allChangesSaved";DrawioFile.prototype.autosaveDelay=1500;DrawioFile.prototype.maxAutosaveDelay=3E4;DrawioFile.prototype.autosaveThread=null;DrawioFile.prototype.lastAutosave=null;DrawioFile.prototype.modified=!1;DrawioFile.prototype.data=null;
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,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]),k=this.ui.getHashValueForPages(g),n=this.ui.getHashValueForPages(this.shadowPages);
-"1"==urlParams.test&&EditorUi.debug("File.mergeFile",[this],"backup",this.backupPatch,"patches",e,"checksum",n==k,k);if(null!=k&&k!=n){var l=this.compressReportData(this.getAnonymizedXmlForPages(g));this.checksumError(b,e,"Checksum: "+k+"\nCurrent: "+n+"\nPatched:\n"+l);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(f){this.invalidChecksum=
+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]),k=this.ui.getHashValueForPages(g),l=this.ui.getHashValueForPages(this.shadowPages);
+"1"==urlParams.test&&EditorUi.debug("File.mergeFile",[this],"backup",this.backupPatch,"patches",e,"checksum",l==k,k);if(null!=k&&k!=l){var n=this.compressReportData(this.getAnonymizedXmlForPages(g));this.checksumError(b,e,"Checksum: "+k+"\nCurrent: "+l+"\nPatched:\n"+n);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(f){this.invalidChecksum=
this.inConflictState=!0;null!=b&&b(f);try{this.sendErrorReport("Error in mergeFile",null,f)}catch(h){}}};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,1E3);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";null!=this.stats.start&&(this.stats.uptime=Math.round(((new Date).getTime()-(new Date(this.stats.start)).getTime())/1E3));var g=this.getTitle(),k=g.lastIndexOf("."),d="none";0<k&&(d=g.substring(k));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()+
-")"+(null!=this.sync?"\nClient="+this.sync.clientId:"")+"\nUser="+e+"\nExt="+d+"\nSize="+this.getSize()+"\nSync="+DrawioFile.SYNC+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=c?"\n\n"+c:"")+"\n\nStack:\n"+n)}catch(l){}};
+DrawioFile.prototype.sendErrorReport=function(a,c,b){try{var d=this.getCurrentUser(),e=null!=d?this.ui.hashValue(d.id):"unknown";null!=this.stats.start&&(this.stats.uptime=Math.round(((new Date).getTime()-(new Date(this.stats.start)).getTime())/1E3));var g=this.getTitle(),k=g.lastIndexOf("."),d="none";0<k&&(d=g.substring(k));var l=null!=b?b.stack:Error().stack;EditorUi.sendReport(a+" "+(new Date).toISOString()+":\n\nBrowser="+navigator.userAgent+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+
+")"+(null!=this.sync?"\nClient="+this.sync.clientId:"")+"\nUser="+e+"\nExt="+d+"\nSize="+this.getSize()+"\nSync="+DrawioFile.SYNC+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=c?"\n\n"+c:"")+"\n\nStack:\n"+l)}catch(n){}};
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.constructor!=DriveFile||this.isRestricted()?this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this)):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)};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 n=g.foldingEnabled,l=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)l!=
-g.mathEnabled?(this.ui.editor.updateGraphComponents(),g.refresh()):(n!=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.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!=
+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};
DrawioFile.prototype.isRenamable=function(){return!1};DrawioFile.prototype.rename=function(a,c,b){};DrawioFile.prototype.isMovable=function(){return!1};DrawioFile.prototype.move=function(a,c,b){};DrawioFile.prototype.getHash=function(){return""};DrawioFile.prototype.getId=function(){return""};DrawioFile.prototype.isEditable=function(){return!this.ui.editor.isChromelessView()||this.ui.editor.editable};DrawioFile.prototype.getUi=function(){return this.ui};DrawioFile.prototype.getTitle=function(){return""};
@@ -7430,15 +7430,16 @@ mxResources.get("synchronize"),mxUtils.bind(this,function(){this.reloadFile(a,c)
DrawioFile.prototype.showCopyDialog=function(a,c,b){this.invalidChecksum=this.inConflictState=!1;this.addUnsavedStatus();this.ui.showError(mxResources.get("externalChanges"),mxResources.get("fileChangedOverwriteDialog"),mxResources.get("makeCopy"),mxUtils.bind(this,function(){this.copyFile(a,c)}),null,mxResources.get("overwrite"),b,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog()}),360,this.constructor==DriveFile?180:150);null!=this.ui.dialog&&null!=this.ui.dialog.container&&
this.constructor==DriveFile&&(b=this.ui.createRealtimeNotice(),b.style.left="0",b.style.right="0",b.style.borderRadius="0",b.style.borderLeftStyle="none",b.style.borderRightStyle="none",b.style.marginBottom="26px",b.style.padding="8px 0 8px 0",this.ui.dialog.container.appendChild(b))};
DrawioFile.prototype.showConflictDialog=function(a,c){this.ui.showError(mxResources.get("externalChanges"),mxResources.get("fileChangedSyncDialog"),mxResources.get("overwrite"),a,null,mxResources.get("synchronize"),c,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog();this.handleFileError(null,!1)}),340,150)};
-DrawioFile.prototype.redirectToNewApp=function(a){this.ui.spinner.stop();if(!this.redirectDialogShowing){this.redirectDialogShowing=!0;var c=window.location.protocol+"//"+window.location.host+"/"+this.ui.getSearch("create title mode url drive splash state".split(" "))+"#"+this.getHash(),b=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("loading"));this.redirectDialogShowing=!1;window.location.href==c?window.location.reload():window.location.href=c});null!=a?this.ui.confirm(mxResources.get("redirectToNewApp"),
-b,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;null!=a&&a()})):this.ui.alert(mxResources.get("redirectToNewApp"),b)}};DrawioFile.prototype.handleFileSuccess=function(a){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(this.isModified()?this.fileChanged():a?(this.addAllSavedStatus(),null!=this.sync&&(this.sync.resetUpdateStatusThread(),this.sync.remoteFileChanged&&(this.sync.remoteFileChanged=!1,this.sync.fileChangedNotify()))):this.ui.editor.setStatus(""))};
+DrawioFile.prototype.redirectToNewApp=function(a){this.ui.spinner.stop();if(!this.redirectDialogShowing){this.redirectDialogShowing=!0;var c=window.location.protocol+"//"+window.location.host+"/"+this.ui.getSearch("create title mode url drive splash state".split(" "))+"#"+this.getHash(),b=mxUtils.bind(this,function(){var a=mxUtils.bind(this,function(){this.redirectDialogShowing=!1;window.location.href==c?window.location.reload():window.location.href=c});this.isModified()?this.ui.confirm(mxResources.get("allChangesLost"),
+mxUtils.bind(this,function(){this.redirectDialogShowing=!1}),a,mxResources.get("cancel"),mxResources.get("discardChanges")):a()});null!=a?this.ui.confirm(mxResources.get("redirectToNewApp"),b,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;null!=a&&a()})):this.ui.alert(mxResources.get("redirectToNewApp"),b)}};
+DrawioFile.prototype.handleFileSuccess=function(a){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(this.isModified()?this.fileChanged():a?(this.addAllSavedStatus(),null!=this.sync&&(this.sync.resetUpdateStatusThread(),this.sync.remoteFileChanged&&(this.sync.remoteFileChanged=!1,this.sync.fileChangedNotify()))):this.ui.editor.setStatus(""))};
DrawioFile.prototype.handleFileError=function(a,c){this.ui.spinner.stop();if(this.ui.getCurrentFile()==this)if(this.inConflictState)this.handleConflictError(a,c);else if(this.isModified()&&this.addUnsavedStatus(a),c)this.ui.handleError(a,null!=a?mxResources.get("errorSavingFile"):null);else if(!this.isModified()){var b=null!=a?null!=a.error?a.error.message:a.message:null;null!=b&&60<b.length&&(b=b.substring(0,60)+"...");this.ui.editor.setStatus('<div class="geStatusAlert" style="cursor:pointer;overflow:hidden;">'+
mxUtils.htmlEntities(mxResources.get("error"))+(null!=b?" ("+mxUtils.htmlEntities(b)+")":"")+"</div>")}};
DrawioFile.prototype.handleConflictError=function(a,c){var b=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),d=mxUtils.bind(this,function(a){this.handleFileError(a,!0)}),e=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("saving"))&&(this.ui.editor.setStatus(""),this.save(!0,b,d,null,!0,this.constructor==GitHubFile&&null!=a?a.commitMessage:null))}),g=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("updatingDocument"))&&this.synchronizeFile(mxUtils.bind(this,
function(){this.ui.spinner.stop();this.ui.spinner.spin(document.body,mxResources.get("saving"))&&this.save(!0,b,d,null,null,this.constructor==GitHubFile&&null!=a?a.commitMessage:null)}),d)});"none"==DrawioFile.SYNC?this.showCopyDialog(b,d,e):this.invalidChecksum?this.showRefreshDialog(b,d):c?this.showConflictDialog(e,g):this.addConflictStatus(mxUtils.bind(this,function(){this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("updatingDocument")));this.synchronizeFile(b,d)}),this.getErrorMessage(a))};
DrawioFile.prototype.getErrorMessage=function(a){return null!=a?null!=a.error?a.error.message:a.message:null};
DrawioFile.prototype.fileChanged=function(){this.setModified(!0);this.isAutosave()?(this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get("saving"))+"..."),this.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(a){null==this.autosaveThread&&this.handleFileSuccess(!0)}),mxUtils.bind(this,function(a){this.handleFileError(a)}))):this.isAutosaveOptional()&&this.ui.editor.autosave||this.inConflictState||this.addUnsavedStatus()};
-DrawioFile.prototype.fileSaved=function(a,c,b,d){this.invalidChecksum=this.inConflictState=!1;this.checkPages();null==this.sync?(this.shadowData=a,this.shadowPages=null,null!=b&&b()):this.sync.fileSaved(this.ui.getPagesForNode(mxUtils.parseXml(a).documentElement),c,b,d)};
+DrawioFile.prototype.fileSaved=function(a,c,b,d){try{this.invalidChecksum=this.inConflictState=!1,this.checkPages(),null==this.sync?(this.shadowData=a,this.shadowPages=null,null!=b&&b()):this.sync.fileSaved(this.ui.getPagesForNode(mxUtils.parseXml(a).documentElement),c,b,d)}catch(e){this.invalidChecksum=this.inConflictState=!0;null!=d&&d(e);try{this.sendErrorReport("Error in fileSaved",null,e)}catch(g){}}};
DrawioFile.prototype.autosave=function(a,c,b,d){null==this.lastAutosave&&(this.lastAutosave=(new Date).getTime());a=(new Date).getTime()-this.lastAutosave<c?a:0;this.clearAutosave();var e=window.setTimeout(mxUtils.bind(this,function(){this.lastAutosave=null;this.autosaveThread==e&&(this.autosaveThread=null);if(this.isModified()&&this.isAutosaveNow()){var a=this.isAutosaveRevision();a&&(this.lastAutosaveRevision=(new Date).getTime());this.save(a,mxUtils.bind(this,function(a){this.autosaveCompleted();
null!=b&&b(a)}),mxUtils.bind(this,function(a){null!=d&&d(a)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=b&&b(null)}),a);this.autosaveThread=e};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){};DrawioFile.prototype.clearAutosave=function(){null!=this.autosaveThread&&(window.clearTimeout(this.autosaveThread),this.autosaveThread=null)};
DrawioFile.prototype.isAutosaveRevision=function(){var a=(new Date).getTime();return null==this.lastAutosaveRevision||a-this.lastAutosaveRevision>this.maxAutosaveRevisionDelay};DrawioFile.prototype.descriptorChanged=function(){this.fireEvent(new mxEventObject("descriptorChanged"))};DrawioFile.prototype.contentChanged=function(){this.fireEvent(new mxEventObject("contentChanged"))};
@@ -7453,19 +7454,19 @@ StorageFile.prototype.isRenamable=function(){return!0};StorageFile.prototype.sav
StorageFile.prototype.saveFile=function(a,c,b,d){if(this.isEditable()){var e=mxUtils.bind(this,function(){this.isRenamable()&&(this.title=a);try{this.ui.setLocalData(this.title,this.getData(),mxUtils.bind(this,function(){this.setModified(!1);this.contentChanged();null!=b&&b()}))}catch(g){null!=d&&d(g)}});this.isRenamable()&&"."==a.charAt(0)&&null!=d?d({message:mxResources.get("invalidName")}):this.ui.getLocalData(a,mxUtils.bind(this,function(b){this.isRenamable()&&this.getTitle()!=a&&null!=b?this.ui.confirm(mxResources.get("replaceIt",
[a]),e,d):e()}))}else null!=b&&b()};StorageFile.prototype.rename=function(a,c,b){var d=this.getTitle();d!=a?this.ui.getLocalData(a,mxUtils.bind(this,function(e){var g=mxUtils.bind(this,function(){this.title=a;this.hasSameExtension(d,a)||this.setData(this.ui.getFileData());this.saveFile(a,!1,mxUtils.bind(this,function(){this.ui.removeLocalData(d,c)}),b)});null!=e?this.ui.confirm(mxResources.get("replaceIt",[a]),g,b):g()})):c()};
StorageFile.prototype.open=function(){DrawioFile.prototype.open.apply(this,arguments);this.saveFile(this.getTitle())};StorageFile.prototype.getLatestVersion=function(a,c){this.ui.getLocalData(this.title,mxUtils.bind(this,function(b){a(new StorageFile(this.ui,b,this.title))}))};StorageFile.prototype.destroy=function(){DrawioFile.prototype.destroy.apply(this,arguments);null!=this.storageListener&&(mxEvent.removeListener(window,"storage",this.storageListener),this.storageListener=null)};StorageLibrary=function(a,c,b){StorageFile.call(this,a,c,b)};mxUtils.extend(StorageLibrary,StorageFile);StorageLibrary.prototype.isAutosave=function(){return!0};StorageLibrary.prototype.saveAs=function(a,c,b){this.saveFile(a,!1,c,b)};StorageLibrary.prototype.getHash=function(){return"L"+encodeURIComponent(this.title)};StorageLibrary.prototype.getTitle=function(){return".scratchpad"==this.title?mxResources.get("scratchpad"):this.title};
-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,u,g,p,q){function F(){mxEvent.addListener(v,"click",null!=q?q:function(){u!=App.MODE_GOOGLE||a.isDriveDomain()?u==App.MODE_GOOGLE&&a.spinner.spin(document.body,mxResources.get("authorizing"))?a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();a.setMode(u,f.checked);c()})):(a.setMode(u,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 t=document.createElement("div");t.style.textOverflow="ellipsis";t.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 t.style.paddingTop="5px",t.style.whiteSpace="normal",mxClient.IS_IOS?(v.style.padding="0px 10px 20px 10px",v.style.top="6px"):mxClient.IS_FF&&(t.style.paddingTop="0px",t.style.marginTop="-2px");v.appendChild(t);mxUtils.write(t,e);if(null!=p)for(d=0;d<p.length;d++)mxUtils.br(t),mxUtils.write(t,p[d]);if(null!=g&&null==a[g]){w.style.visibility=
-"hidden";mxUtils.setOpacity(t,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 B=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(B),mxUtils.setOpacity(t,100),w.style.visibility="",k.stop(),F(),"drive"==g&&null!=m.parentNode&&m.parentNode.removeChild(m))}))}else F();
-l.appendChild(v);++h>=b&&(mxUtils.br(l),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 n=document.createElement("div");n.style.position=
-"absolute";n.style.cursor="pointer";n.style.fontSize="12px";n.style.bottom="28px";n.style.color="gray";mxUtils.write(n,mxResources.get("decideLater"));a.isOfflineApp()?n.style.right="20px":(mxUtils.setPrefixedStyle(n.style,"transform","translate(-50%,0)"),n.style.left="50%");this.init=function(){if(mxClient.IS_QUIRKS||8==document.documentMode)n.style.marginLeft=-Math.round(n.clientWidth/2)+"px"};e.appendChild(n);mxEvent.addListener(n,"click",function(){a.hideDialog();var b=Editor.useLocalStorage;
-a.createFile(a.defaultFilename,null,null,null,null,null,null,!0);Editor.useLocalStorage=b});var l=document.createElement("div");mxClient.IS_QUIRKS&&(l.style.whiteSpace="nowrap",l.style.cssFloat="left");l.style.border="1px solid #d3d3d3";l.style.borderWidth="1px 0px 1px 0px";l.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");
+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 B=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(B),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=
+"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");
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(l);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);
-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 t=document.createElement("option");t.setAttribute("value","");t.setAttribute("selected","selected");t.style.textAlign="center";mxUtils.write(t,mxResources.get("openRecent")+"...");q.appendChild(t);for(t=0;t<p.length;t++)(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[t]);g.appendChild(q);mxEvent.addListener(q,"change",function(b){""!=q.value&&a.loadFile(q.value)})}else g.style.marginTop="20px",l.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),l.style.paddingBottom="4px");l.appendChild(g);mxEvent.addListener(k,"click",function(a){f.checked=!f.checked;mxEvent.consume(a)});
+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);
+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=
"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");
@@ -7477,50 +7478,50 @@ a.mode==App.MODE_ONEDRIVE?b=mxResources.get("oneDrive"):a.mode==App.MODE_GITHUB?
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()}):
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,n,l){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!=n&&(g.innerHTML=n+"<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);l?(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,
+[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";
-mxUtils.write(g,a.formatFileSize(c.length));d.appendChild(g);var n=document.createElement("textarea");n.setAttribute("autocomplete","off");n.setAttribute("autocorrect","off");n.setAttribute("autocapitalize","off");n.setAttribute("spellcheck","false");n.style.marginTop="10px";n.style.resize="none";n.style.height="150px";n.style.width="440px";n.style.border="1px solid gray";n.value=mxResources.get("updatingDocument");d.appendChild(n);mxUtils.br(d);this.init=function(){window.setTimeout(function(){5E5>
-c.length?(n.value=c,n.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?n.select():document.execCommand("selectAll",!1,null)):(n.setAttribute("readonly","true"),n.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 l=null;!EmbedDialog.showPreviewOption||mxClient.IS_CHROMEAPP&&!k||navigator.standalone||!(k||mxClient.IS_SVG&&(null==document.documentMode||
-9<document.documentMode))||(l=mxUtils.button(mxResources.get(5E5>c.length?"preview":"openInNewWindow"),function(){var f=5E5>c.length?n.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(t){a.handleError({message:t.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()}}),l.className="geBtn",g.appendChild(l));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(n.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(n.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(){n.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?n.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(l),f.className="geBtn",l.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);""!=m.value&&(b+="&height="+m.value);b+="&pan="+(t.checked?"1":"0");b+="&zoom="+(v.checked?"1":"0");b+="&fit="+(F.checked?"1":"0");
-b+="&resize="+(w.checked?"1":"0");b+="&x0="+Number(h.value);b+="&y0="+l;e.mathEnabled&&(b+="&math=1");u.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,n=Math.floor(g.x/k-e.view.translate.x),l=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=n;d.appendChild(h);mxUtils.write(d,mxResources.get("height")+":");var m=document.createElement("input");m.setAttribute("type",
+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(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);""!=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||"";
-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 t=document.createElement("input");t.setAttribute("type","checkbox");t.setAttribute("checked","checked");t.defaultChecked=!0;t.style.marginLeft="16px";d.appendChild(t);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 u=document.createElement("input");u.setAttribute("type","checkbox");u.style.marginLeft="8px";d.appendChild(u);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 F=document.createElement("input");F.setAttribute("type","checkbox");F.style.marginLeft="8px";d.appendChild(F);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(t,"change",b);mxEvent.addListener(v,"change",b);mxEvent.addListener(w,"change",b);mxEvent.addListener(F,"change",b);mxEvent.addListener(x,"change",b);mxEvent.addListener(u,"change",b);mxEvent.addListener(B,"change",b);mxEvent.addListener(m,"change",b);mxEvent.addListener(h,"change",b);mxEvent.addListener(q,"change",b);mxEvent.addListener(p,"change",b);b();
+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 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(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=
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 n=g.getDefaultParent(),l=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(n,null,"Entry",f.x,f.y,80,30,"rounded=1;");l(h);g.view.refresh(h);
-g.insertEdge(n,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(n,null,"Start",
-0,0,80,30,"ellipse"),l(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"==
+!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 t=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(t);t.className="geBtn gePrimaryBtn";a.editor.cancelFirst||d.appendChild(q)};this.container=d};
+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};
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()?(n.value="",l.value=""):a.loadImage(mxUtils.trim(e.value),function(a){n.value=a.width;l.value=a.height},function(){a.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));e.value="";n.value="";l.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!=
+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 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.width:"";b.appendChild(n);mxUtils.write(b,mxResources.get("height")+":");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.height:"";b.appendChild(l);d=mxUtils.button(mxResources.get("reset"),function(){e.value="";n.value="";l.value="";g=!1});mxEvent.addListener(d,"mousedown",
+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),n.value,l.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"==
+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,u=e.indexOf(","),e=decodeURIComponent(escape(atob(e.substring(u+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,
+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(C),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,""),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=
@@ -7528,208 +7529,208 @@ mxUtils.trim(e.substring(12)),"("==e.charAt(e.length-1)&&(e=e.substring(0,e.last
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);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)&&(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),C.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 C=function(a){var b=E[a];null==b&&(b=new mxCell(a,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),b.vertex=!0,E[a]=b,q.push(b));return b},E={},q=[],l=0;l<f.length;l++)if(";"!=f[l].charAt(0)){var I=f[l].split("->");if(2<=I.length){var n=C(I[0]),A=C(I[I.length-1]),I=new mxCell(2<I.length?I[1]:"",new mxGeometry);I.edge=!0;n.insertEdge(I,!0);A.insertEdge(I,
+"cells",[p].concat(p.children)))}finally{h.getModel().endUpdate()}h.setSelectionCell(p);h.scrollCellToVisible(h.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 n=C(I[0]),A=C(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();C=[];a.editor.graph.getModel().beginUpdate();try{C=a.editor.graph.importCells(h.getModel().getChildren(h.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());h.destroy();f.parentNode.removeChild(f)}}}function e(){return"list"==
-n.value?"Person\n-name: String\n-birthDate: Date\n--\n+getName(): String\n+setName(String): void\n+isBirthday(): boolean":"table"==n.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"==n.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"==n.value||"plantUmlTxt"==n.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 n=document.createElement("select");"formatSql"==b&&(n.style.display="none");var l=document.createElement("option");l.setAttribute("value","list");mxUtils.write(l,mxResources.get("list"));"plantUml"!=b&&n.appendChild(l);null!=b&&"fromText"!=b||l.setAttribute("selected","selected");l=document.createElement("option");l.setAttribute("value","table");mxUtils.write(l,mxResources.get("formatSql"));"formatSql"==b&&(n.appendChild(l),l.setAttribute("selected","selected"));
-l=document.createElement("option");l.setAttribute("value","diagram");mxUtils.write(l,mxResources.get("diagram"));"plantUml"!=b&&n.appendChild(l);l=document.createElement("option");l.setAttribute("value","plantUmlSvg");mxUtils.write(l,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");"plantUml"==b&&l.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&&(n.appendChild(l),n.appendChild(f),n.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(n);mxEvent.addListener(n,"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);l=mxUtils.button(mxResources.get("insert"),
-function(){a.hideDialog();d(k.value,n.value)});c.appendChild(l);l.className="geBtn gePrimaryBtn";a.editor.cancelFirst||c.appendChild(b);this.container=c},NewDialog=function(a,c,b,d,e,g,k,n,l,f,h,m,p,q,t){function v(){var a=!0;if(null!=O)for(;C<O.length&&(a||0!=mxUtils.mod(C,30));)a=O[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(aa)b||a.hideDialog(),q(aa,Z,H.value);else if(d)b||a.hideDialog(),d(P,H.value);else{var c=H.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 u(a,b,c,f,h){null!=S&&(S.style.backgroundColor="transparent",S.style.border="1px solid transparent");E.removeAttribute("disabled");P=b;T=c;S=a;aa=f;Z=h;S.style.backgroundColor=n;S.style.border=l}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){u(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 t=!1;mxEvent.addListener(q,"click",function(f){E.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()&&(u(q,a.getText(),c),t&&x())}))});mxEvent.addListener(q,"dblclick",function(a){t=!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&&u(q),null!=g?mxEvent.addListener(q,"click",g):(mxEvent.addListener(q,"click",function(a){u(q)}),mxEvent.addListener(q,"dblclick",function(a){x()}));N.appendChild(q)}function F(){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),
+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(;C<O.length&&(a||0!=mxUtils.mod(C,30));)a=O[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(aa)b||a.hideDialog(),q(aa,Z,H.value);else if(d)b||a.hideDialog(),d(P,H.value);else{var c=H.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=
+"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="",C=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";n=null!=n?n:"#e6eff8";l=null!=l?l:"1px solid #ccd9ea";h=null!=h?h: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");
+"",a=f,a.style.backgroundColor=k,N.scrollTop=0,N.innerHTML="",C=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 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 H=document.createElement("input");
-H.setAttribute("value",a.defaultFilename+z);H.style.marginRight="20px";H.style.marginLeft="10px";H.style.width=c?"220px":"430px";this.init=function(){b&&(H.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?H.select():document.execCommand("selectAll",!1,null))};b&&y.appendChild(H);var y=!1,C=0,E=mxUtils.button(mxResources.get("create"),function(){E.setAttribute("disabled","disabled");x();E.removeAttribute("disabled")});E.className="geBtn gePrimaryBtn";if(m||p){var I=
-[],A=null,D=function(a){E.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 G=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){Y.style.display="";N.style.left="160px";D(0);N.scrollTop=0;N.innerHTML="";C=0;A!=O&&(O=A,v(),A=null)});I.push(G);z.appendChild(G);var M=function(a){Y.style.display="none";N.style.left=
-"30px";D(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 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&&(G=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){M()}),z.appendChild(G),I.push(G));if(p){G=
-document.createElement("span");G.style.marginLeft="10px";G.innerHTML=mxResources.get("search")+":";z.appendChild(G);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);G=mxUtils.button(mxResources.get("search"),function(){M(!0)});G.className="geBtn";z.appendChild(G)}D(0)}var T=null,P=null,S=null,aa=null,Z=null,N=document.createElement("div");N.style.border=
+H.setAttribute("value",a.defaultFilename+z);H.style.marginRight="20px";H.style.marginLeft="10px";H.style.width=c?"220px":"430px";this.init=function(){b&&(H.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?H.select():document.execCommand("selectAll",!1,null))};b&&y.appendChild(H);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(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";B.appendChild(z);var G=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,v(),A=null)});I.push(G);z.appendChild(G);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 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&&(G=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){M()}),z.appendChild(G),I.push(G));if(p){G=
+document.createElement("span");G.style.marginLeft="10px";G.innerHTML=mxResources.get("search")+":";z.appendChild(G);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);G=mxUtils.button(mxResources.get("search"),function(){M(!0)});G.className="geBtn";z.appendChild(G)}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){B.appendChild(Y);
B.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}F()}})}mxEvent.addListener(H,"keypress",function(b){a.dialog.container.firstChild==B&&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||
+preview:a.getAttribute("preview")})}}a=a.nextSibling}D()}})}mxEvent.addListener(H,"keypress",function(b){a.dialog.container.firstChild==B&&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(H.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&&t&&(t=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()}),t.className="geBtn",h.appendChild(t));h.appendChild(E);
-a.editor.cancelFirst||null!=d||e&&null==g||h.appendChild(y);B.appendChild(h);this.container=B},CreateDialog=function(a,c,b,d,e,g,k,n,l,f,h,m,p,q,t){function v(b,f,h,d){function e(){mxEvent.addListener(u,"click",function(){var b=h;if(k){var f=F.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));F.value=f+m}}x(h)})}var u=document.createElement("a");u.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";u.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";u.className="geBaseButton";u.style.position="relative";u.style.margin="4px";u.style.padding="8px 8px 10px 8px";
-u.style.whiteSpace="nowrap";u.appendChild(g);mxClient.IS_QUIRKS&&(u.style.cssFloat="left",u.style.zoom="1");u.style.color="gray";u.style.fontSize="11px";var p=document.createElement("div");u.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(u);var t=window.setTimeout(function(){null==a[d]&&(q.stop(),
-u.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[d]&&(window.clearTimeout(t),mxUtils.setOpacity(p,100),g.style.visibility="",q.stop(),e())}))}else e();B.appendChild(u);++y==m&&(mxUtils.br(B),y=0)}function x(c){var f=F.value;if(null==c||null!=f&&0<f.length)a.hideDialog(),b(f,c)}k=null!=k?k:!0;n=null!=n?n:!0;m=null!=m?m:4;var u=document.createElement("div");null==d&&a.addLanguageMenu(u);var w=document.createElement("h2");mxUtils.write(w,e||mxResources.get("create"));
-w.style.marginTop="0px";w.style.marginBottom="24px";u.appendChild(w);mxUtils.write(u,mxResources.get("filename")+":");var F=document.createElement("input");F.setAttribute("value",c);F.style.width="280px";F.style.marginLeft="10px";F.style.marginBottom="20px";this.init=function(){F.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?F.select():document.execCommand("selectAll",!1,null)};u.appendChild(F);null!=p&&null!=q&&"image/"==q.substring(0,6)&&(F.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")),t=parseInt(p.getAttribute("height")),p.setAttribute("viewBox","0 0 "+q+" "+t),p.setAttribute("width","120px"),p.setAttribute("height","80px")):(e=document.createElement("img"),e.setAttribute("src","data:"+q+(t?";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%)"),u.appendChild(e),l&&Editor.popupsAllowed&&(e.style.cursor="pointer",mxEvent.addListener(e,"click",function(){x("_blank")})));mxUtils.br(u);var B=document.createElement("div");B.style.textAlign="center";var y=0;B.style.marginTop="6px";u.appendChild(B);var z=document.createElement("select");z.style.marginLeft="10px";a.isOfflineApp()||a.isOffline()||("function"===typeof window.DriveClient&&(e=document.createElement("option"),
+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);B.appendChild(h);this.container=B},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";
+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();B.appendChild(t);++y==m&&(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)}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"));
+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 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&&n||e.setAttribute("selected","selected"),h&&v(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);n&&isLocalStorage&&"0"!=urlParams.browser&&(n=document.createElement("option"),n.setAttribute("value",App.MODE_BROWSER),mxUtils.write(n,mxResources.get("browser")),z.appendChild(n),a.mode==App.MODE_BROWSER&&n.setAttribute("selected","selected"),v(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));
-n=document.createElement("div");n.style.marginTop="26px";n.style.textAlign="center";null!=f&&(e=mxUtils.button(mxResources.get("help"),function(){a.openLink(f)}),e.className="geBtn",n.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&&n.appendChild(e);null==d&&(p=mxUtils.button(mxResources.get("decideLater"),function(){x(null)}),p.className=
-"geBtn",n.appendChild(p));l&&Editor.popupsAllowed&&(l=mxUtils.button(mxResources.get("openInNewWindow"),function(){x("_blank")}),l.className="geBtn",n.appendChild(l));mxClient.IS_IOS||(g=mxUtils.button(g||mxResources.get("create"),function(){x(h?"download":App.MODE_DEVICE)}),g.className="geBtn gePrimaryBtn",n.appendChild(g));a.editor.cancelFirst||n.appendChild(e);mxEvent.addListener(F,"keypress",function(b){13==b.keyCode?x(App.MODE_DEVICE):27==b.keyCode&&(a.fileLoaded(null),a.hideDialog(),window.close())});
-u.appendChild(n);this.container=u},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 n=mxUtils.button(mxResources.get("openInNewWindow"),function(){e&&a.hideDialog();
-null!=b&&b();a.openLink(c,null,!0)});n.className="geBtn gePrimaryBtn";n.style.width=k.style.width;g.appendChild(n);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,n=document.createElement("div");mxUtils.write(n,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 l=document.createElement("input");l.setAttribute("value",b);l.setAttribute("type","text");l.setAttribute("spellcheck","false");l.setAttribute("autocorrect","off");l.setAttribute("autocomplete","off");l.setAttribute("autocapitalize","off");l.style.marginTop="6px";l.style.width=(Graph.fileSupport?420:340)+(mxClient.IS_QUIRKS?20:-20)+"px";l.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";l.style.backgroundRepeat=
-"no-repeat";l.style.backgroundPosition="100% 50%";l.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(){l.value="";l.focus()});c.appendChild(l);
-c.appendChild(b);n.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(){l.focus();if(Graph.fileSupport){l.setAttribute("placeholder",mxResources.get("dragImagesHere"));var b=n.parentNode,c=
+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));
+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=
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&&(l.value=a.url));l.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/"==l.value.substring(0,11)&&"data:image/svg"!=l.value.substring(0,14)&&(p=mxUtils.button(mxResources.get("crop"),function(){var b=new CropImageDialog(a,
-l.value,function(a){l.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)}),
+"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)}),
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(l,"keypress",function(a){13==a.keyCode&&h(l.value)});p=mxUtils.button(mxResources.get("apply"),function(){h(l.value)});p.className="geBtn gePrimaryBtn";b.appendChild(p);a.editor.cancelFirst||b.appendChild(c);Graph.fileSupport&&(b.style.marginTop="120px",n.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",n.style.backgroundPosition=
-"center 65%",n.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")),n.appendChild(c));n.appendChild(b);this.container=n},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 n=document.createElement("div");n.className="geTitle";n.style.backgroundColor="transparent";n.style.borderColor="transparent";n.style.whiteSpace="nowrap";n.style.textOverflow="clip";n.style.cursor="default";mxClient.IS_VML||(n.style.paddingRight="20px");var l=document.createElement("input");
-l.setAttribute("placeholder",mxResources.get("dragUrlsHere"));l.setAttribute("type","text");l.style.marginTop="6px";l.style.width="440px";l.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";l.style.backgroundRepeat="no-repeat";l.style.backgroundPosition="100% 50%";l.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(){l.value="";l.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):(l.setAttribute("value",c),h.setAttribute("checked","checked"),h.defaultChecked=!0);l.style.width="420px";n.appendChild(h);n.appendChild(l);n.appendChild(f);mxUtils.br(n);n.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 t=document.createElement("option");mxUtils.write(t,mxResources.get("pageNotFound"));t.setAttribute("disabled","disabled");t.setAttribute("selected","selected");t.setAttribute("value","pageNotFound");p.appendChild(t);mxEvent.addListener(p,
-"change",function(){null==t.parentNode||t.selected||t.parentNode.removeChild(t)})}n.appendChild(p)}else l.setAttribute("value",c),n.appendChild(l),n.appendChild(f);k.appendChild(n);var v=mxUtils.button(b,function(){a.hideDialog();d(m.checked?"pageNotFound"!==p.value?p.value:c:l.value,LinkDialog.selectedDocs)});v.style.verticalAlign="middle";v.className="geBtn gePrimaryBtn";this.init=function(){m.checked?p.focus():(l.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?
-l.select():document.execCommand("selectAll",!1,null));mxEvent.addListener(p,"focus",function(){h.removeAttribute("checked");m.setAttribute("checked","checked");m.checked=!0});mxEvent.addListener(l,"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")&&(l.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");
-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);n=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/solution/articles/16000080137")});n.style.verticalAlign="middle";n.className="geBtn";x.appendChild(n);a.isOffline()&&!mxClient.IS_CHROMEAPP&&(n.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);l.value=b;l.focus()}else LinkDialog.selectedDocs=null;l.focus()};"undefined"!=typeof google&&"undefined"!=typeof google.picker&&
+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=
+"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");
+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){l.value=a[0].link;l.focus()}})});null!=a.oneDrive&&g(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),function(){a.oneDrive.pickFile(function(a,b){l.value=b.value[0].webUrl;
-l.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("/");l.value="https://github.com/"+b+"/"+c+"/blob/"+f+"/"+a;l.focus()}})});mxEvent.addListener(l,"keypress",function(b){13==b.keyCode&&(a.hideDialog(),d(m.checked?p.value:l.value,LinkDialog.selectedDocs))});x.appendChild(v);a.editor.cancelFirst||x.appendChild(b);k.appendChild(x);this.container=
+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+
"/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=l.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=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)+
"&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 n=document.createElement("span");mxUtils.write(n," "+mxResources.get("includeCopyOfMyDiagram"));b.appendChild(n);mxEvent.addListener(n,"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 l=document.createElement("textarea");l.style.resize="none";l.style.width="600px";l.style.height="140px";l.style.marginTop="6px";l.setAttribute("placeholder",mxResources.get("commentsNotes"));
-c.appendChild(l);b=document.createElement("div");b.style.marginTop="26px";b.style.textAlign="right";n=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});n.className="geBtn";a.editor.cancelFirst?(b.appendChild(n),b.appendChild(e)):(b.appendChild(e),b.appendChild(n));c.appendChild(b);this.container=c};FeedbackDialog.maxAttachmentSize=1E6;
+"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 n=new Graph(k);n.setTooltips(!1);n.setEnabled(!1);n.setPanning(!0);n.panningHandler.ignoreCell=!0;n.panningHandler.useLeftButtonForPanning=!0;n.minFitScale=null;n.maxFitScale=null;n.centerZoom=!0;var l=0,f=null,h=0,m=n.getGlobalVariable;n.getGlobalVariable=function(a){return"page"==a&&null!=f&&null!=f[h]?f[h].getAttribute("name"):"pagenumber"==a?h+1:m.apply(this,arguments)};n.getLinkForCell=function(){return null};
-Editor.MathJaxRender&&n.addListener(mxEvent.SIZE,mxUtils.bind(this,function(b,c){a.editor.graph.mathEnabled&&Editor.MathJaxRender(n.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(),t=null,v=null,x=null,u=null,w=mxUtils.button("",function(){null!=x&&n.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 F=mxUtils.button("",function(){null!=x&&n.zoomOut()});F.className="geSprite geSprite-zoomout";F.setAttribute("title",mxResources.get("zoomOut"));F.style.outline="none";F.style.border="none";F.style.margin="2px";F.setAttribute("disabled","disabled");mxUtils.setOpacity(F,20);var B=mxUtils.button("",function(){null!=x&&(n.maxFitScale=8,n.fit(8),
-n.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&&(n.zoomActual(),n.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");
+"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};
+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 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 H=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"))}});H.className="geBtn";H.setAttribute("disabled","disabled");var C=mxUtils.button(mxResources.get("restore"),function(){null!=x&&null!=u&&a.confirm(mxResources.get("areYouSure"),function(){null!=b?b(u):a.spinner.spin(document.body,mxResources.get("restoring"))&&
-q.save(!0,function(b){a.spinner.stop();a.replaceFileData(u);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 E=document.createElement("select");E.setAttribute("disabled","disabled");E.style.maxWidth="80px";E.style.position="relative";E.style.top="-2px";E.style.verticalAlign="bottom";E.style.marginRight="6px";E.style.display="none";var I=null;mxEvent.addListener(E,
-"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 D=mxUtils.button(mxResources.get("show"),function(){null!=v&&a.openLink(v.getUrl(E.selectedIndex))});D.className="geBtn gePrimaryBtn";
-D.setAttribute("disabled","disabled");null!=b&&(D.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 G=document.createElement("div");G.className="geToolbarContainer";G.style.backgroundColor="transparent";G.style.padding="2px";G.style.border="none";G.style.left="199px";G.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&&(l=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 t=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,n.getModel());n.maxFitScale=1;n.fit(8);n.center();return a};E.style.display="none";E.innerHTML="";x=e;u=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(l,f.length-1);0<f.length&&t(f[h]);if(1<f.length)for(E.removeAttribute("disabled"),E.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"),E.appendChild(e);I=function(){h=l=parseInt(E.value);t(f[l])}}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");F.removeAttribute("disabled");B.removeAttribute("disabled");y.removeAttribute("disabled");null!=q&&q.isRestricted()||(a.editor.graph.isEnabled()&&C.removeAttribute("disabled"),H.removeAttribute("disabled"),D.removeAttribute("disabled"),A.removeAttribute("disabled"));mxUtils.setOpacity(w,60);mxUtils.setOpacity(F,60);mxUtils.setOpacity(B,60);mxUtils.setOpacity(y,
-60)}else E.style.display="none",E.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!=t&&(t.style.backgroundColor=""),v=b,t=m,t.style.backgroundColor="#ebf2f9",u=x=null,z.removeAttribute("title"),z.innerHTML=mxResources.get("loading")+"...",k.style.backgroundColor="#ffffff",n.getModel().clear(),C.setAttribute("disabled","disabled"),
-H.setAttribute("disabled","disabled"),w.setAttribute("disabled","disabled"),F.setAttribute("disabled","disabled"),y.setAttribute("disabled","disabled"),B.setAttribute("disabled","disabled"),A.setAttribute("disabled","disabled"),D.setAttribute("disabled","disabled"),E.setAttribute("disabled","disabled"),mxUtils.setOpacity(w,20),mxUtils.setOpacity(F,20),mxUtils.setOpacity(B,20),mxUtils.setOpacity(y,20),p.spin(k),b.getXml(function(a){v==b&&e(a)},function(a){p.stop();E.style.display="none";E.innerHTML=
-"";z.innerHTML="";mxUtils.write(z,mxResources.get("errorLoadingFile"))}),mxEvent.consume(a))});mxEvent.addListener(m,"dblclick",function(a){D.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",G.style.display="none",mxUtils.write(g,mxResources.get("notAvailable"))):(k.style.display="none",G.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";G.appendChild(E);G.appendChild(w);G.appendChild(F);G.appendChild(y);G.appendChild(B);a.editor.cancelFirst?(e.appendChild(g),e.appendChild(H),e.appendChild(A),e.appendChild(C),e.appendChild(D)):(e.appendChild(H),
-e.appendChild(A),e.appendChild(C),e.appendChild(D),e.appendChild(g));d.appendChild(e);d.appendChild(G);d.appendChild(z);this.container=d},DraftDialog=function(a,c,b,d,e,g,k,n){var l=document.createElement("div"),f=document.createElement("div");f.style.marginTop="0px";f.style.whiteSpace="nowrap";f.style.overflow="auto";mxUtils.write(f,c);l.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);l.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,t=null,v=m.getGlobalVariable;m.getGlobalVariable=function(a){return"page"==a&&null!=t&&null!=t[q]?t[q].getAttribute("name"):
+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"))}});H.className="geBtn";H.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",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 G=document.createElement("div");G.className="geToolbarContainer";G.style.backgroundColor="transparent";G.style.padding="2px";G.style.border="none";G.style.left="199px";G.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");B.removeAttribute("disabled");y.removeAttribute("disabled");null!=q&&q.isRestricted()||(a.editor.graph.isEnabled()&&C.removeAttribute("disabled"),H.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"))},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(),C.setAttribute("disabled","disabled"),
+H.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(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",G.style.display="none",mxUtils.write(g,mxResources.get("notAvailable"))):(k.style.display="none",G.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";G.appendChild(F);G.appendChild(w);G.appendChild(D);G.appendChild(y);G.appendChild(B);a.editor.cancelFirst?(e.appendChild(g),e.appendChild(H),e.appendChild(A),e.appendChild(C),e.appendChild(E)):(e.appendChild(H),
+e.appendChild(A),e.appendChild(C),e.appendChild(E),e.appendChild(g));d.appendChild(e);d.appendChild(G);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 u=document.createElement("select");u.style.maxWidth="80px";u.style.position="relative";u.style.top="-2px";u.style.verticalAlign="bottom";u.style.marginRight="6px";u.style.display="none";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");
+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));
-return c}mxEvent.addListener(u,"change",function(a){q=parseInt(u.value);c(t[q]);mxEvent.consume(a)});if("mxfile"==p.nodeName){var f=p.getElementsByTagName("diagram");t=[];for(var d=0;d<f.length;d++)t.push(f[d]);0<t.length&&c(t[q]);if(1<t.length)for(u.style.display="",d=0;d<t.length;d++)f=document.createElement("option"),mxUtils.write(f,t[d].getAttribute("name")||mxResources.get("pageWithNumber",[d+1])),f.setAttribute("value",d),d==q&&f.setAttribute("selected","selected"),u.appendChild(f)}else b(p)};
-k.appendChild(u);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";n=null!=n?mxUtils.button(mxResources.get("ignore"),n):null;null!=n&&(n.className="geBtn");a.editor.cancelFirst?(g.appendChild(c),null!=n&&g.appendChild(n),g.appendChild(e),g.appendChild(d)):(g.appendChild(d),g.appendChild(e),null!=n&&g.appendChild(n),g.appendChild(c));l.appendChild(g);l.appendChild(k);this.container=l},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=l.model.getDescendants(l.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=l.view.getState(a[e]);if(null!=k&&null!=k.cell.value&&(m||null==d)&&(l.model.isVertex(k.cell)||l.model.isEdge(k.cell))&&(l.isHtmlLabel(k.cell)?(v.innerHTML=l.getLabel(k.cell),label=mxUtils.extractTextWithWhitespace([v])):label=l.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,l.scrollCellToVisible(h.cell),l.isEnabled()?l.setSelectionCell(h.cell):l.highlightCell(h.cell)):l.isEnabled()&&l.clearSelection();return 0==b.length||null!=d}var n=a.actions.get("find"),l=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 t=a.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000088250");t.style.position="relative";t.style.marginLeft="6px";t.style.top="-1px";m.appendChild(t);var v=document.createElement("div");
-mxUtils.br(m);t=mxUtils.button(mxResources.get("reset"),function(){p.value="";p.style.backgroundColor="";f=h=null;p.focus()});t.setAttribute("title",mxResources.get("reset"));t.style.marginTop="6px";t.style.marginRight="4px";t.className="geBtn";m.appendChild(t);t=mxUtils.button(mxResources.get("find"),function(){try{p.style.backgroundColor=k()?"":"#ffcfcf"}catch(x){a.handleError(x)}});t.setAttribute("title",mxResources.get("find")+" (Enter)");t.style.marginTop="6px";t.className="geBtn gePrimaryBtn";
-m.appendChild(t);mxEvent.addListener(p,"keyup",function(a){if(91==a.keyCode||17==a.keyCode)mxEvent.consume(a);else if(27==a.keyCode)n.funct();else if(f!=p.value.toLowerCase()||13==a.keyCode)try{p.style.backgroundColor=k()?"":"#ffcfcf"}catch(u){p.style.backgroundColor="#ffcfcf"}});mxEvent.addListener(m,"keydown",function(b){70==b.keyCode&&a.keyHandler.isControlDown(b)&&!mxEvent.isShiftDown(b)&&(n.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)):l.container.focus()}))},TagsWindow=function(a,c,b,d,e){var g=a.editor.graph,k="tags",n=document.createElement("div");n.style.userSelect="none";n.style.overflow="hidden";n.style.padding=
-"10px";n.style.height="100%";var l=document.createElement("input");l.setAttribute("placeholder",mxResources.get("allTags"));l.setAttribute("type","text");l.style.marginTop="4px";l.style.width="260px";l.style.fontSize="12px";l.style.borderRadius="4px";l.style.padding="6px";n.appendChild(l);if(!a.isOffline()||mxClient.IS_CHROMEAPP){l.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";n.appendChild(f)}mxEvent.addListener(l,"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()});l.setAttribute("title",mxResources.get("doubleClickChangeProperty"));mxUtils.br(n);f=mxUtils.button(mxResources.get("hide"),function(){var a=g.getCellsForTags(l.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";n.appendChild(f);f=mxUtils.button(mxResources.get("show"),function(){var a=g.getCellsForTags(l.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";n.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";n.appendChild(f);mxEvent.addListener(l,"keyup",function(a){13!=a.keyCode&&27!=a.keyCode||h.funct()});this.window=new mxWindow(mxResources.get("tags"),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()?(l.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?l.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",n=document.createElement("img");
-n.setAttribute("border","0");n.setAttribute("align","absmiddle");n.style.marginRight="10px";c==a.drive?(k=mxResources.get("googleDrive"),n.src=IMAGE_PATH+"/google-drive-logo-white.svg"):c==a.dropbox?(k=mxResources.get("dropbox"),n.src=IMAGE_PATH+"/dropbox-logo-white.svg"):c==a.oneDrive?(k=mxResources.get("oneDrive"),n.src=IMAGE_PATH+"/onedrive-logo-white.svg"):c==a.gitHub?(k=mxResources.get("github"),n.src=IMAGE_PATH+"/github-logo-white.svg"):c==a.trello&&(k=mxResources.get("trello"),n.src=IMAGE_PATH+
-"/trello-logo-white.svg");a=document.createElement("p");mxUtils.write(a,mxResources.get("authorizeThisAppIn",[k]));var l=document.createElement("input");l.setAttribute("type","checkbox");k=mxUtils.button(mxResources.get("authorize"),function(){d(l.checked)});k.insertBefore(n,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(l),g=document.createElement("span"),mxUtils.write(g,
-" "+mxResources.get("rememberMe")),b.appendChild(g),e.appendChild(b),l.checked=!0,l.defaultChecked=!0,mxEvent.addListener(g,"click",function(a){l.checked=!l.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],n={title:a.getResource(k.title),entries:[]},l=0;l<k.entries.length;l++){var f=
-k.entries[l];n.entries.push({id:f.id,title:a.getResource(f.title),desc:a.getResource(f.desc),image:f.preview})}e.push(n)}for(g=0;g<b.length;g++)if(null==a.sidebar.enabledLibraries)e.push(b[g]);else{n={title:b[g].title,entries:[]};for(l=0;l<b[g].entries.length;l++)0<=mxUtils.indexOf(a.sidebar.enabledLibraries,b[g].entries[l].id)&&n.entries.push(b[g].entries[l]);0<n.entries.length&&e.push(n)}b=e;if(c){l=document.createElement("div");l.className="geDialogTitle";mxUtils.write(l,mxResources.get("shapes"));
-l.style.position="absolute";l.style.top="0px";l.style.left="0px";l.style.lineHeight="40px";l.style.height="40px";l.style.right="0px";mxClient.IS_QUIRKS&&(l.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(l.style.width)-202+"px",m.style.height=h.style.height,m.style.marginTop=h.style.marginTop);var p=null,q=[],t=document.createElement("div");t.style.position="relative";t.style.left="0px";t.style.right="0px";for(g=0;g<b.length;g++)(function(b){var c=t.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=t.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=
+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(l);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=l.style.width,b.style.paddingTop="12px");var v=document.createElement("input");v.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)l=document.createElement("span"),l.style.paddingRight="20px",l.appendChild(v),mxUtils.write(l," "+mxResources.get("rememberThisSetting")),v.checked=!0,v.defaultChecked=
-!0,mxEvent.addListener(l,"click",function(a){mxEvent.getSource(a)!=v&&(v.checked=!v.checked,mxEvent.consume(a))}),mxClient.IS_QUIRKS&&(l.style.position="relative",l.style.top="-6px"),b.appendChild(l);l=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});l.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"),l=document.createElement("tbody");d.style.height="100%";d.style.overflow="auto";n=document.createElement("tr");x.style.width="100%";c=document.createElement("td");var e=document.createElement("td"),k=document.createElement("td"),u=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}});n.appendChild(c);n.appendChild(e);n.appendChild(k);l.appendChild(n);x.appendChild(l);for(var q=[],w=0,g=0;g<b.length;g++)for(l=0;l<b[g].entries.length;l++)w++;for(var F=[c,e,k],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(u(F[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),l=document.createElement("span"),mxUtils.write(l," "+mxResources.get("rememberThisSetting")),b.appendChild(l),mxEvent.addListener(l,"click",function(a){v.checked=!v.checked;mxEvent.consume(a)}));d.appendChild(b);l=mxUtils.button(mxResources.get("cancel"),
-function(){a.hideDialog()});l.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(l),b.appendChild(c)):(b.appendChild(c),b.appendChild(l));d.appendChild(b);this.container=
+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],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),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=
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 n=mxUtils.button(mxResources.get("apply"),function(){mxSettings.setPlugins(e);mxSettings.save();a.hideDialog();a.alert(mxResources.get("restartForChangeRequired"))});n.className="geBtn gePrimaryBtn";var l=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/support/solutions/articles/16000056430")});l.className="geBtn";a.isOffline()&&!mxClient.IS_CHROMEAPP&&(l.style.display="none");var f=document.createElement("div");f.style.marginTop="14px";f.style.textAlign=
-"right";a.editor.cancelFirst?(f.appendChild(k),f.appendChild(l),f.appendChild(g),f.appendChild(n)):(f.appendChild(l),f.appendChild(g),f.appendChild(n),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"),n=document.createElement("td");n.style.whiteSpace="nowrap";n.setAttribute("colspan","2");mxUtils.write(n,mxResources.get("loading")+
-"...");k.appendChild(n);g.appendChild(k);var k=document.createElement("tr"),l=document.createElement("td"),f=document.createElement("td");e.style.paddingLeft="6px";mxUtils.write(l,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(l);k.appendChild(f);g.appendChild(k);k=document.createElement("tr");l=document.createElement("td");f=document.createElement("td");
-mxUtils.write(l,mxResources.get("top")+":");var m=document.createElement("input");m.setAttribute("type","text");m.style.width="100px";m.value="0";f.appendChild(m);k.appendChild(l);k.appendChild(f);g.appendChild(k);k=document.createElement("tr");l=document.createElement("td");f=document.createElement("td");mxUtils.write(l,mxResources.get("right")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.width="100px";p.value="0";f.appendChild(p);k.appendChild(l);k.appendChild(f);
-g.appendChild(k);k=document.createElement("tr");l=document.createElement("td");f=document.createElement("td");mxUtils.write(l,mxResources.get("bottom")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.width="100px";q.value="0";f.appendChild(q);k.appendChild(l);k.appendChild(f);g.appendChild(k);k=document.createElement("tr");l=document.createElement("td");f=document.createElement("td");mxUtils.write(l,mxResources.get("circle")+":");k.appendChild(l);var t=document.createElement("input");
-t.setAttribute("type","checkbox");f.appendChild(t);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;t.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");n.innerHTML="";mxUtils.write(n,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"),n=document.createElement("tr"),l=document.createElement("td"),f=document.createElement("td");g.style.paddingLeft="6px";mxUtils.write(l,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);n.appendChild(l);n.appendChild(f);k.appendChild(n);n=document.createElement("tr");l=document.createElement("td");f=document.createElement("td");mxUtils.write(l,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);n.appendChild(l);n.appendChild(f);k.appendChild(n);n=document.createElement("tr");l=document.createElement("td");f=document.createElement("td");mxUtils.write(l,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);n.appendChild(l);n.appendChild(f);k.appendChild(n);n=document.createElement("tr");l=document.createElement("td");f=document.createElement("td");mxUtils.write(l,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);n.appendChild(l);n.appendChild(f);k.appendChild(n);n=document.createElement("tr");l=document.createElement("td");f=document.createElement("td");mxUtils.write(l,mxResources.get("dy")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.width="100px";t.value=null!=d&&null!=d.offset?d.offset.y:"";f.appendChild(t);n.appendChild(l);
-n.appendChild(f);k.appendChild(n);n=document.createElement("tr");l=document.createElement("td");f=document.createElement("td");mxUtils.write(l,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);n.appendChild(l);n.appendChild(f);k.appendChild(n);n=document.createElement("tr");l=document.createElement("td");f=document.createElement("td");mxUtils.write(l,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);n.appendChild(l);n.appendChild(f);k.appendChild(n);n=document.createElement("tr");l=document.createElement("td");f=document.createElement("td");mxUtils.write(l,mxResources.get("rotation")+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.width="100px";u.value=1==c.length?mxUtils.getValue(b.getCellStyle(c[0]),mxConstants.STYLE_ROTATION,0):"";
-f.appendChild(u);n.appendChild(l);n.appendChild(f);k.appendChild(n);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&&
-(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(t.value).length&&(null==d.offset&&(d.offset=new mxPoint),d.offset.y=Number(t.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(u.value).length&&b.setCellStyles(mxConstants.STYLE_ROTATION,Number(u.value),[c[f]])}}finally{b.getModel().endUpdate()}});
+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&&
+(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 n(b,c,f,d,m,e,u,g,p){try{if(null==c||"image/"==c.substring(0,6))if(null==b&&null!=u||null==v[b]){var l=function(){G.innerHTML="";G.style.cursor="pointer";G.style.whiteSpace="nowrap";G.style.textOverflow="ellipsis";mxUtils.write(G,null!=K.title&&0<K.title.length?K.title:mxResources.get("untitled"));G.style.color=null==K.title||0==K.title.length?"#d0d0d0":""};q.style.backgroundImage="";t.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 H=document.createElement("div");H.setAttribute("draggable","true");H.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";H.style.position="relative";H.style.cursor="move";mxUtils.setPrefixedStyle(H.style,"transition","transform .1s ease-in-out");if(null!=b){var E=document.createElement("img");E.setAttribute("src",F.convert(b));
-E.style.width=y+"px";E.style.height=z+"px";E.style.margin="10px";E.style.paddingBottom=Math.floor((100-z)/2)+"px";E.style.paddingLeft=Math.floor((100-y)/2)+"px";H.appendChild(E)}else if(null!=u){var D=a.stringToCells(a.editor.graph.decompress(u.xml));0<D.length&&(a.sidebar.createThumb(D,100,100,H,null,!0,!1),H.firstChild.style.display=mxClient.IS_QUIRKS?"inline":"inline-block",H.firstChild.style.cursor="")}var C=document.createElement("img");C.setAttribute("src",Editor.closeImage);C.setAttribute("border",
+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(){G.innerHTML="";G.style.cursor="pointer";G.style.whiteSpace="nowrap";G.style.textOverflow="ellipsis";mxUtils.write(G,null!=K.title&&0<K.title.length?K.title:mxResources.get("untitled"));G.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 H=document.createElement("div");H.setAttribute("draggable","true");H.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";H.style.position="relative";H.style.cursor="move";mxUtils.setPrefixedStyle(H.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";H.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,H,null,!0,!1),H.firstChild.style.display=mxClient.IS_QUIRKS?"inline":"inline-block",H.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<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}H.parentNode.removeChild(a);0==h.length&&
-(q.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",t.style.display="");mxEvent.consume(f)});mxEvent.addListener(C,"dblclick",function(a){mxEvent.consume(a)})})(H,b,u);H.appendChild(C);H.style.marginBottom="30px";var G=document.createElement("div");G.style.position="absolute";G.style.boxSizing="border-box";G.style.bottom="-18px";G.style.left="10px";G.style.right="10px";G.style.backgroundColor="#ffffff";G.style.overflow="hidden";G.style.textAlign="center";var K=null;null!=b?(K={data:b,
-w:m,h:e,title:p},null!=g&&(K.aspect=g),v[b]=E,h.push(K)):null!=u&&(u.aspect="fixed",h.push(u),K=u);mxEvent.addListener(G,"keydown",function(a){13==a.keyCode&&null!=w&&(w(),w=null,mxEvent.consume(a))});l();H.appendChild(G);mxEvent.addListener(G,"mousedown",function(a){"true"!=G.getAttribute("contentEditable")&&mxEvent.consume(a)});D=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,l())},mxResources.get("enterValue"));a.showDialog(c.container,300,80,!0,!0);c.init();mxEvent.consume(b)}else if("true"!=G.getAttribute("contentEditable")){null!=w&&(w(),w=null);if(null==K.title||0==K.title.length)G.innerHTML="";G.style.textOverflow="";G.style.whiteSpace="";G.style.cursor="text";G.style.color="";G.setAttribute("contentEditable","true");G.focus();document.execCommand("selectAll",!1,null);w=function(){G.removeAttribute("contentEditable");G.style.cursor=
-"pointer";K.title=G.innerHTML;l()};mxEvent.consume(b)}};mxEvent.addListener(G,"click",D);mxEvent.addListener(H,"dblclick",D);q.appendChild(H);mxEvent.addListener(H,"dragstart",function(a){null==b&&null!=u&&(C.style.visibility="hidden",G.style.visibility="hidden");mxClient.IS_FF&&null!=u.xml&&a.dataTransfer.setData("Text",u.xml);x=k(a);mxClient.IS_GC&&(H.style.opacity="0.9");window.setTimeout(function(){mxUtils.setPrefixedStyle(H.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(H,30);C.style.visibility=
+(q.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",u.style.display="");mxEvent.consume(f)});mxEvent.addListener(C,"dblclick",function(a){mxEvent.consume(a)})})(H,b,t);H.appendChild(C);H.style.marginBottom="30px";var G=document.createElement("div");G.style.position="absolute";G.style.boxSizing="border-box";G.style.bottom="-18px";G.style.left="10px";G.style.right="10px";G.style.backgroundColor="#ffffff";G.style.overflow="hidden";G.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(G,"keydown",function(a){13==a.keyCode&&null!=w&&(w(),w=null,mxEvent.consume(a))});n();H.appendChild(G);mxEvent.addListener(G,"mousedown",function(a){"true"!=G.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"!=G.getAttribute("contentEditable")){null!=w&&(w(),w=null);if(null==K.title||0==K.title.length)G.innerHTML="";G.style.textOverflow="";G.style.whiteSpace="";G.style.cursor="text";G.style.color="";G.setAttribute("contentEditable","true");G.focus();document.execCommand("selectAll",!1,null);w=function(){G.removeAttribute("contentEditable");G.style.cursor=
+"pointer";K.title=G.innerHTML;n()};mxEvent.consume(b)}};mxEvent.addListener(G,"click",E);mxEvent.addListener(H,"dblclick",E);q.appendChild(H);mxEvent.addListener(H,"dragstart",function(a){null==b&&null!=t&&(C.style.visibility="hidden",G.style.visibility="hidden");mxClient.IS_FF&&null!=t.xml&&a.dataTransfer.setData("Text",t.xml);x=k(a);mxClient.IS_GC&&(H.style.opacity="0.9");window.setTimeout(function(){mxUtils.setPrefixedStyle(H.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(H,30);C.style.visibility=
"";G.style.visibility=""},0)});mxEvent.addListener(H,"dragend",function(a){"hidden"==C.style.visibility&&(C.style.visibility="",G.style.visibility="");x=null;mxUtils.setOpacity(H,100);mxUtils.setPrefixedStyle(H.style,"transform",null)})}else B||(B=!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?n(null,null,0,0,0,0,z[M]):n(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]),D=a.stringToCells(a.editor.graph.decompress(z)),V=a.editor.graph.getBoundingBoxFromGeometry(D);n(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 l(a){a.dataTransfer.dropEffect=null!=x?"move":"copy";a.stopPropagation();a.preventDefault()}function f(b){b.stopPropagation();b.preventDefault();B=!1;u=k(b);if(null!=x)null!=u&&u<q.children.length?(h.splice(u>x?u-1:u,0,h.splice(x,1)[0]),q.insertBefore(q.children[x],q.children[u])):(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){n(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")+
+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();B=!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 t=document.createElement("div");t.style.position="absolute";t.style.width="640px";t.style.top="260px";t.style.textAlign="center";t.style.fontSize="22px";t.style.color="#a0c3ff";
-mxUtils.write(t,mxResources.get("dragImagesHere"));b.appendChild(t);var v={},x=null,u=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 F=new mxUrlConverter,B=!1;if(null!=d)for(c=0;c<d.length;c++)m=d[c],n(m.data,null,0,0,m.w,m.h,m,m.aspect,m.title);mxEvent.addListener(q,"dragleave",function(a){t.style.cursor=
-"";for(var b=mxEvent.getSource(a);null!=b;){if(b==q||b==t){a.stopPropagation();a.preventDefault();break}b=b.parentNode}});var y=function(b){return function(c,f,d,h,m,e,u,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();n(c,f,d,h,m,e,u,"fixed",mxEvent.isAltDown(b)?null:u.substring(0,u.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&&(n(c.responseText,f,d,h,m,e,u,"fixed",mxEvent.isAltDown(b)?null:u.substring(0,u.lastIndexOf(".")).replace(/_/g," ")),q.scrollTop=q.scrollHeight))})):(n(c,f,d,h,m,e,u,"fixed",mxEvent.isAltDown(b)?null:u.substring(0,u.lastIndexOf(".")).replace(/_/g," ")),q.scrollTop=q.scrollHeight)}};mxEvent.addListener(q,"dragover",l);mxEvent.addListener(q,"drop",f);mxEvent.addListener(t,"dragover",l);mxEvent.addListener(t,
+"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,B=!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){B=!1;a.importFiles(z.files,0,0,a.maxImageSize,function(a,c,f,d,h,m,e,u,g){y(b)(a,c,f,d,h,m,e,u,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){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))}n(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,n=document.createElement("table"),l=document.createElement("tbody");
-n.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);l.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");
+"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){B=!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){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}})});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);l.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")}),
+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(B){throw B;}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);l.appendChild(g);n.appendChild(l);this.container=
-n},CustomDialog=function(a,c,b,d,e,g,k,n){var l=document.createElement("div");l.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";n&&(k.style.display="none");a.editor.cancelFirst&&c.appendChild(k);a.isOffline()||null==g||(n=mxUtils.button(mxResources.get("help"),function(){a.openLink(g)}),n.className="geBtn",c.appendChild(n));
-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);l.appendChild(c);this.cancelBtn=k;this.okButton=e;this.container=l},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">'+
+c.geometry.y=e.y;b.addCell(c)}b.setCellStyles(mxConstants.STYLE_SHAPE,"stencil("+h+")",[c])}catch(B){throw B;}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">'+
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,n,l,f){function h(){null!=C&&(C.style.fontWeight="normal",C.style.textDecoration="none",C=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/"+
+TemplatesDialog.prototype.init=function(a,c,b,d,e,g,k,l,n,f){function h(){null!=C&&(C.style.fontWeight="normal",C.style.textDecoration="none",C=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!=E){for(var f=E.className.split(" "),d=0;d<f.length;d++)if(-1<f[d].indexOf("Active")){f.splice(d,1);break}E.className=f.join(" ")}null!=a?(E=a,E.className+=" "+b,I=c,L.className="geTempDlgCreateBtn"):(I=E=null,L.className="geTempDlgCreateBtn geTempDlgCreateBtnDisabled")}
-function t(b){if(null!=I){var d=I;I=null;L.className="geTempDlgCreateBtn geTempDlgCreateBtnDisabled geTempDlgCreateBtnBusy";d.isExternal?(1==b?f(d.url,d,"nameInput.value"):l(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.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),u=a[h].tooltip||a[h].title,g=a[h].imgUrl,k=mxUtils.htmlEntities(a[h].changedBy||""),F=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);u=document.createElement("span");u.className="geTempDlgDiagramTitle";u.innerHTML=m;g.appendChild(u);l.appendChild(g);g=document.createElement("td");g.innerHTML=k;l.appendChild(g);g=document.createElement("td");g.innerHTML=F;l.appendChild(g);
-d.appendChild(l);null==E&&(f(),q(l,"geTempDlgDiagramsListGridActive",a[h]));(function(a,b){mxEvent.addListener(l,"click",function(){E!=b&&(f(),q(b,"geTempDlgDiagramsListGridActive",a))});mxEvent.addListener(l,"dblclick",t);mxEvent.addListener(w,"click",function(){p(a)})})(a[h],l)}else{var n=document.createElement("div");n.className="geTempDlgDiagramTile";n.setAttribute("title",u);null==E&&(f(),q(n,"geTempDlgDiagramTileActive",a[h]));k=document.createElement("div");k.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgLoading";
+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 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,k);B.src=g;k.appendChild(B);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(){E!=b&&(f(),q(b,"geTempDlgDiagramTileActive",a))});mxEvent.addListener(n,"dblclick",t);mxEvent.addListener(w,"click",function(){p(a)})})(a[h],n);P.appendChild(n)}}}function u(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==E&&(L.innerHTML=mxResources.get("create"),v(),q(h,"geTempDlgNewDiagramCatItemActive",d));var e=document.createElement("div");e.className="geTempDlgNewDiagramCatItemImg";var u=document.createElement("img");u.src=NEW_DIAGRAM_CATS_PATH+"/"+d.img;e.appendChild(u);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(){E!=b&&(L.innerHTML=mxResources.get("create"),v(),q(b,"geTempDlgNewDiagramCatItemActive",a))});mxEvent.addListener(h,"dblclick",t)})(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(){C!=d&&(null!=C?(C.style.fontWeight="normal",C.style.textDecoration="none"):(Y.style.display="none",N.style.minHeight="100%"),C=d,C.style.fontWeight="bold",C.style.textDecoration="underline",Z.scrollTop=0,z&&(H=!0),S.innerHTML=c,aa.style.display="none",x(a[b],!0))})})(c,d,f)}}function F(a){k&&
-(Z.scrollTop=0,P.innerHTML="",U.spin(P),H=!1,z=!0,S.innerHTML=mxResources.get("recentDiag",null,"Recent Diagrams"),K=null,k(W,a?null:g))}function B(a){h();Z.scrollTop=0;P.innerHTML="";U.spin(P);H=!1;z=!0;da=null;S.innerHTML=mxResources.get("searchResults",null,"Search Results")+' "'+mxUtils.htmlEntities(a)+'"';n(a,W,D?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,H=!1,C=null,E=null,I=null,A=!1,D=!0,G=!1,M=[],K,T=y.querySelector(".geTempDlgShowAllBtn"),
+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(){C!=d&&(null!=C?(C.style.fontWeight="normal",C.style.textDecoration="none"):(Y.style.display="none",N.style.minHeight="100%"),C=d,C.style.fontWeight="bold",C.style.textDecoration="underline",Z.scrollTop=0,z&&(H=!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),H=!1,z=!0,S.innerHTML=mxResources.get("recentDiag",null,"Recent Diagrams"),K=null,k(W,a?null:g))}function B(a){h();Z.scrollTop=0;P.innerHTML="";U.spin(P);H=!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,H=!1,C=null,F=null,I=null,A=!1,E=!0,G=!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)";F(D)});mxEvent.addListener(y.querySelector(".geTempDlgRadioBtn[data-id=allDiagramsBtn]"),"click",function(){m(this,"geTempDlgAllDiagramsBtnImg","all-diagrams","myDiagramsBtn","geTempDlgMyDiagramsBtnImg","my-diagrams",!0)&&(D=!0,null==K?F(D):B(K))});mxEvent.addListener(y.querySelector(".geTempDlgRadioBtn[data-id=myDiagramsBtn]"),"click",function(){m(this,"geTempDlgMyDiagramsBtnImg","my-diagrams","allDiagramsBtn","geTempDlgAllDiagramsBtnImg",
-"all-diagrams",!0)&&(D=!1,null==K?F(D):B(K))});mxEvent.addListener(y.querySelector(".geTempDlgRadioBtn[data-id=listBtn]"),"click",function(){m(this,"geTempDlgListBtnImg","list","tilesBtn","geTempDlgTilesBtnImg","tiles",!1)&&(G=!0,x(M,!1,G))});mxEvent.addListener(y.querySelector(".geTempDlgRadioBtn[data-id=tilesBtn]"),"click",function(){m(this,"geTempDlgTilesBtnImg","tiles","listBtn","geTempDlgListBtnImg","list",!1)&&(G=!1,x(M,!1,G))});mxEvent.addListener(T,"click",function(){A?(Y.style.height="280px",
-Q.style.height="190px",T.innerHTML=mxResources.get("showAll",null,"+ Show all"),u(J)):(Y.style.height="440px",Q.style.height="355px",T.innerHTML=mxResources.get("showLess",null,"- Show less"),u(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;u(J)}});var W=function(a,b){aa.style.display="";U.stop();z=!1;H?H=!1:b?P.innerHTML=b:
-0==a.length?P.innerHTML=mxResources.get("noDiagrams",null,"No Diagrams Found"):x(a,!1,G)};F(D);var da=null;n&&mxEvent.addListener(y.querySelector(".geTempDlgSearchBox"),"keyup",function(a){var b=this;null!=da&&clearTimeout(da);13==a.keyCode?B(b.value):da=setTimeout(function(){B(b.value)},500)});mxEvent.addListener(L,"click",t);mxEvent.addListener(y.querySelector(".geTempDlgLinkToDiagramBtn"),"click",function(a){t(!0)});mxEvent.addListener(y.querySelector(".geTempDlgCancelBtn"),"click",function(){null!=
+"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):B(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):B(K))});mxEvent.addListener(y.querySelector(".geTempDlgRadioBtn[data-id=listBtn]"),"click",function(){m(this,"geTempDlgListBtnImg","list","tilesBtn","geTempDlgTilesBtnImg","tiles",!1)&&(G=!0,x(M,!1,G))});mxEvent.addListener(y.querySelector(".geTempDlgRadioBtn[data-id=tilesBtn]"),"click",function(){m(this,"geTempDlgTilesBtnImg","tiles","listBtn","geTempDlgListBtnImg","list",!1)&&(G=!1,x(M,!1,G))});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;H?H=!1:b?P.innerHTML=b:
+0==a.length?P.innerHTML=mxResources.get("noDiagrams",null,"No Diagrams Found"):x(a,!1,G)};D(E);var da=null;l&&mxEvent.addListener(y.querySelector(".geTempDlgSearchBox"),"keyup",function(a){var b=this;null!=da&&clearTimeout(da);13==a.keyCode?B(b.value):da=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,8 +7772,8 @@ MathJax.Hub.Register.StartupHook("Begin",function(){for(var a=0;a<Editor.mathJax
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 n=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?n.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 l=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=
-function(a){a=l.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)}});
+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)}});
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",
@@ -7801,19 +7802,19 @@ a=a.getAttribute("customProperties");if(null!=a)try{f(JSON.parse(a))}catch(C){}}
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 u=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(u);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,
+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 u=m,p=0;null!=u.nextSibling;)if(u.nextSibling.getAttribute("data-pName")==
-a)u=u.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);u.parentNode.insertBefore(p,u.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 u=0;u<d;u++)e[u]=null!=b[u]?b[u]:null!=f?f:"";k.push({name:a,values:e,type:c,defVal:f,parentRow:h,flipBkg:m,size:d})}return document.createElement("div")}
-function u(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 t=g.dispName,v=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),t=(null!=t?t:"")+"["+g.index+"]",q=!0);var w=document.createElement("td");
-w.className="gePropRowCell";w.innerHTML=mxUtils.htmlEntities(mxResources.get(t,null,t));q&&(w.style.textAlign="right");l.appendChild(w);w=document.createElement("td");w.className="gePropRowCell";if("color"==v)w.appendChild(h(b,c,g));else if("bool"==v||"boolean"==v)w.appendChild(u(b,c,g));else if("enum"==v){var n=g.enumList;for(k=0;k<n.length;k++)if(t=n[k],t.val==c){w.innerHTML=mxUtils.htmlEntities(mxResources.get(t.dispName,null,t.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],u=document.createElement("option");u.value=mxUtils.htmlEntities(e.val);u.innerHTML=mxUtils.htmlEntities(mxResources.get(e.dispName,null,e.dispName));h.appendChild(u)}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"==v?w.appendChild(m(b,c,g.subType,g.subDefVal,g.countProperty,
-l,k)):"staticArr"==v?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"!=v?0:a;g.allowAuto&&("auto"==a.trim().toLowerCase()?(a="auto",v="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"==v?parseInt(a):a)+"");f(b,a,g)}var m=document.createElement("input");d(w,m,!0);m.value=c;m.className="gePropEditor";
-"int"!=v&&"float"!=v||g.allowAuto||(m.type="number",m.step="int"==v?"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 t=document.createElement("table");t.style.whiteSpace="nowrap";t.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=t.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);t.appendChild(v);var F=!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,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}t.appendChild(g(B,y,v,F,x));F=!F}}for(l=0;l<k.length;l++)for(v=k[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(t);n();return a};StyleFormatPanel.prototype.addStyles=
+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,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,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(B,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++)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);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&&
@@ -7830,7 +7831,7 @@ function(a){this.editorUi.actions.get("editShape").funct()})),b.setAttribute("ti
this.getInsertPoint=function(){return null!=b?this.getPointForEvent(b):c.apply(this,arguments)};var f=this.layoutManager.getLayout;this.layoutManager.getLayout=function(a){var b=this.graph.view.getState(a),b=null!=b?b.style:this.graph.getCellStyle(a);if(null!=b){if("undefined"!=typeof mxRackContainer&&"rack"==b.childLayout){var c=new mxStackLayout(this.graph,!1);c.setChildGeometry=function(a,b){b.height=Math.max(b.height,20);if(1<b.height/20){var c=b.height%20;b.height+=10<c?20-c:-c}this.graph.getModel().setGeometry(a,
b)};c.fill=!0;c.unitSize=mxRackContainer.unitSize|20;c.marginLeft=b.marginLeft||0;c.marginRight=b.marginRight||0;c.marginTop=b.marginTop||0;c.marginBottom=b.marginBottom||0;c.resizeParent=!1;return c}if("undefined"!=typeof mxTableLayout&&"tableLayout"==b.childLayout)return c=new mxTableLayout(this.graph),c.rows=b.tableRows||2,c.columns=b.tableColumns||2,c.colPercentages=b.colPercentages,c.rowPercentages=b.rowPercentages,c.equalColumns="1"==mxUtils.getValue(b,"equalColumns",c.colPercentages?"0":"1"),
c.equalRows="1"==mxUtils.getValue(b,"equalRows",c.rowPercentages?"0":"1"),c.resizeParent="1"==mxUtils.getValue(b,"resizeParent","1"),c.border=b.tableBorder||c.border,c.marginLeft=b.marginLeft||0,c.marginRight=b.marginRight||0,c.marginTop=b.marginTop||0,c.marginBottom=b.marginBottom||0,c.autoAddCol="1"==mxUtils.getValue(b,"autoAddCol","0"),c.autoAddRow="1"==mxUtils.getValue(b,"autoAddRow",c.autoAddCol?"0":"1"),c.colWidths=b.colWidths||"100",c.rowHeights=b.rowHeights||"50",c}return f.apply(this,arguments)}};
-var q=Graph.prototype.isCssTransformsSupported;Graph.prototype.isCssTransformsSupported=function(){return q.apply(this,arguments)&&!mxClient.IS_SF};var t=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(a){var b=t.apply(this,arguments);if(null==b){if(null==this.globalUrlVars&&null!=urlParams.vars)try{this.globalUrlVars=JSON.parse(decodeURIComponent(urlParams.vars))}catch(y){null!=window.console&&console.log("Error in vars URL parameter: "+y)}null!=this.globalUrlVars&&(b=
+var q=Graph.prototype.isCssTransformsSupported;Graph.prototype.isCssTransformsSupported=function(){return q.apply(this,arguments)&&!mxClient.IS_SF};var u=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(a){var b=u.apply(this,arguments);if(null==b){if(null==this.globalUrlVars&&null!=urlParams.vars)try{this.globalUrlVars=JSON.parse(decodeURIComponent(urlParams.vars))}catch(y){null!=window.console&&console.log("Error in vars URL parameter: "+y)}null!=this.globalUrlVars&&(b=
this.globalUrlVars[a])}return b};var v=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){v.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var a=this.getDrawPane().parentNode;!this.graph.mathEnabled||mxClient.NO_FO||null!=this.webKitForceRepaintNode&&null!=this.webKitForceRepaintNode.parentNode||"svg"!=this.graph.container.firstChild.nodeName?null==this.webKitForceRepaintNode||this.graph.mathEnabled&&("svg"==this.graph.container.firstChild.nodeName||
this.graph.container.firstChild==this.webKitForceRepaintNode)||(null!=this.webKitForceRepaintNode.parentNode&&this.webKitForceRepaintNode.parentNode.removeChild(this.webKitForceRepaintNode),this.webKitForceRepaintNode=null):(this.webKitForceRepaintNode=document.createElement("div"),this.webKitForceRepaintNode.style.cssText="position:absolute;",a.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,a.ownerSVGElement))}};var x=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=
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()}}};
@@ -7851,30 +7852,30 @@ 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 u=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 u.apply(this,arguments)};
-PrintDialog.prototype.create=function(a,b){function c(){t.value=Math.max(1,Math.min(e,Math.max(parseInt(t.value),parseInt(k.value))));k.value=Math.max(1,Math.min(e,Math.min(parseInt(t.value),parseInt(k.value))))}function f(b){function c(b,c,d){var h=b.getGraphBounds(),m=0,e=0,u=da.get(),g=1/b.pageScale,p=n.checked;if(p)var g=parseInt(X.value),q=parseInt(W.value),g=Math.min(u.height*q/(h.height/b.view.scale),u.width*g/(h.width/b.view.scale));else g=parseInt(w.value)/(100*b.pageScale),isNaN(g)&&(f=
-1/b.pageScale,w.value="100 %");u=mxRectangle.fromRectangle(u);u.width=Math.ceil(u.width*f);u.height=Math.ceil(u.height*f);g*=f;!p&&b.pageVisible?(h=b.getPageLayout(),m-=h.x*u.width,e-=h.y*u.height):p=!0;if(null==c){c=PrintDialog.createPrintPreview(b,g,u,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{u=b.background;if(null==u||""==u||u==mxConstants.NONE)u="#ffffff";c.backgroundColor=u;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=t.value,e=!p.checked,u=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,B=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,B=l.viewState.backgroundImage);h.background=x;h.backgroundImage=null!=B?new mxImage(B.src,B.width,B.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)}u=c(h,u,v!=e);h!=d&&h.container.parentNode.removeChild(h.container)}}else u=
-c(d);u.mathEnabled&&(e=u.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>'));u.closeDocument();!u.mathEnabled&&b&&PrintDialog.printPreview(u)}
-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,u=document.createElement("div");u.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");u.appendChild(p);m=document.createElement("span");mxUtils.write(m,mxResources.get("printAllPages"));u.appendChild(m);mxUtils.br(u);var q=p.cloneNode(!0);p.setAttribute("checked","checked");q.setAttribute("value","range");u.appendChild(q);m=document.createElement("span");mxUtils.write(m,mxResources.get("pages")+":");u.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";u.appendChild(k);m=document.createElement("span");mxUtils.write(m,mxResources.get("to"));u.appendChild(m);var t=k.cloneNode(!0);u.appendChild(t);mxEvent.addListener(k,"focus",function(){q.checked=!0});mxEvent.addListener(t,"focus",function(){q.checked=!0});mxEvent.addListener(k,"change",c);mxEvent.addListener(t,"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;t.value=g;break}k.setAttribute("max",e);t.setAttribute("max",e);1<e&&h.appendChild(u);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 u=u.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);u.appendChild(m);v=document.createElement("table");v.style.display="inline-block";var x=document.createElement("tbody"),
-B=document.createElement("tr"),F=B.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);B.appendChild(L);B.appendChild(U);B.appendChild(R);F.appendChild(O);F.appendChild(V);F.appendChild(J);x.appendChild(B);x.appendChild(F);v.appendChild(x);
-u.appendChild(v);h.appendChild(u);u=document.createElement("div");m=document.createElement("div");m.style.fontWeight="bold";m.style.marginBottom="12px";mxUtils.write(m,mxResources.get("paperSize"));u.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);u.appendChild(m);m=document.createElement("span");mxUtils.write(m,mxResources.get("pageScale"));u.appendChild(m);
-var ba=document.createElement("input");ba.style.cssText="margin:0 8px 0 8px;";ba.setAttribute("value","100 %");ba.style.width="60px";u.appendChild(ba);h.appendChild(u);m=document.createElement("div");m.style.cssText="text-align:right;margin:48px 0 0 0;";u=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});u.className="geBtn";a.editor.cancelFirst&&m.appendChild(u);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(u);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,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 B=h.getGlobalVariable;h.getGlobalVariable=function(a){return"page"==a?l.getName():"pagenumber"==a?v+1:B.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"),B=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);B.appendChild(O);B.appendChild(V);B.appendChild(J);x.appendChild(D);x.appendChild(B);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==
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,n,l,f,h){l=null!=l?l:!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(){l&&a.hideDialog();null!=e&&e()});q.className="geBtn";b.appendChild(q);null!=k&&(d=mxUtils.button(k,function(){l&&a.hideDialog();null!=n&&n()}),d.className="geBtn gePrimaryBtn",
+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.21";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==
+(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.22";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,
@@ -7882,7 +7883,7 @@ a)}};EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.enablePlantUml=Ed
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=
!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;EditorUi.prototype.closableScratchpad=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var a=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!a.getContext||!a.getContext("2d"))}catch(q){}try{var b=document.createElement("canvas"),c=new Image;c.onload=function(){try{b.getContext("2d").drawImage(c,0,0);var a=b.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=
-a&&6<a.length}catch(t){}};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){}})();
+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=
@@ -7893,18 +7894,18 @@ return null!=c&&0==c.getElementsByTagName("parsererror").length}catch(p){}return
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,u,w){b=null!=b?b:this.editor.graph;e=null!=e?e:!1;u=null!=u?u:!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,
+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,u,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);
+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);
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(t){a[EditorUi.DIFF_INSERT][b].data=t.message}if(null!=
-a[EditorUi.DIFF_UPDATE]){for(var f in a[EditorUi.DIFF_UPDATE]){var d=a[EditorUi.DIFF_UPDATE][f];null!=d.name&&(d.name=this.anonymizeString(d.name));null!=d.cells&&(b=mxUtils.bind(this,function(a){var b=d.cells[a];if(null!=b){for(var c in b)null!=b[c].value&&(b[c].value="["+b[c].value.length+"]"),null!=b[c].style&&(b[c].style="["+b[c].style.length+"]"),null!=b[c].geometry&&(b[c].geometry=this.anonymizeString(b[c].geometry)),0==Object.keys(b[c]).length&&delete b[c];0==Object.keys(b).length&&delete d.cells[a]}}),
+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!=
+a[EditorUi.DIFF_UPDATE]){for(var f in a[EditorUi.DIFF_UPDATE]){var d=a[EditorUi.DIFF_UPDATE][f];null!=d.name&&(d.name=this.anonymizeString(d.name));null!=d.cells&&(b=mxUtils.bind(this,function(a){var b=d.cells[a];if(null!=b){for(var c in b)null!=b[c].value&&(b[c].value="["+b[c].value.length+"]"),null!=b[c].style&&(b[c].style="["+b[c].style.length+"]"),null!=b[c].geometry&&(b[c].geometry="["+b[c].geometry.length+"]"),0==Object.keys(b[c]).length&&delete b[c];0==Object.keys(b).length&&delete d.cells[a]}}),
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,u){e=null!=e?e:!0;k=null!=k?k:this.getXmlFileData(e,null!=g?g:!1);u=null!=u?u:this.getCurrentFile();g=this.editor.graph;if(null!=this.pages&&this.currentPage!=this.pages[0]&&(b||!a&&null!=u&&/(\.svg)$/i.test(u.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,u,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";
+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"),
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>')+
@@ -7915,50 +7916,50 @@ Error(a);b=null!=a?this.editor.extractGraphModel(a,!0):null;null!=b&&(a=b);if(nu
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 l=this.editor.graph.background;
-if(k||l==mxConstants.NONE)l=null;var v=this.editor.graph.getSvg(l,null,null,null,null,d);c&&this.editor.graph.addSvgShadow(v);this.convertImages(v,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(H){this.handleError(H)}};
+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(H){this.handleError(H)}};
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 u=a.getAttribute("value");if(null!=u){var l=mxUtils.parseXml(u).documentElement;if(null!=l)if("1"==l.getAttribute("replace-value"))e.setValue(k,l);else for(var n=l.attributes,B=0;B<n.length;B++)d.setAttributeForCell(k,n[B].nodeName,0<n[B].nodeValue.length?n[B].nodeValue:null)}}catch(D){null!=
-window.console&&console.log("Error in value for "+k.id+": "+D)}try{var y=a.getAttribute("style");null!=y&&d.model.setStyle(k,y)}catch(D){null!=window.console&&console.log("Error in style for "+k.id+": "+D)}try{var z=a.getAttribute("icon");if(null!=z){var H=0<z.length?JSON.parse(z):null;null!=H&&H.append||d.removeCellOverlays(k);null!=H&&d.addCellOverlay(k,b(H))}}catch(D){null!=window.console&&console.log("Error in icon for "+k.id+": "+D)}try{var C=a.getAttribute("geometry");if(null!=C){var C=JSON.parse(C),
-E=d.getCellGeometry(k);if(null!=E){E=E.clone();for(key in C){var I=parseFloat(C[key]);"dx"==key?E.x+=I:"dy"==key?E.y+=I:"dw"==key?E.width+=I:"dh"==key?E.height+=I:E[key]=parseFloat(C[key])}d.model.setGeometry(k,E)}}}catch(D){null!=window.console&&console.log("Error in icon for "+k.id+": "+D)}}}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")&&
+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,B=0;B<n.length;B++)d.setAttributeForCell(k,n[B].nodeName,0<n[B].nodeValue.length?n[B].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 H=0<z.length?JSON.parse(z):null;null!=H&&H.append||d.removeCellOverlays(k);null!=H&&d.addCellOverlay(k,b(H))}}catch(E){null!=window.console&&console.log("Error in icon for "+k.id+": "+E)}try{var C=a.getAttribute("geometry");if(null!=C){var C=JSON.parse(C),
+F=d.getCellGeometry(k);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(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")&&
(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(),u=h.getHours(),k=h.getMinutes(),h=h.getSeconds(),c=c+(" "+(d+"-"+e+"-"+g+"-"+u+"-"+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 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();
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()||
null==a.getMode()||EditorUi.logEvent({category:"File",action:"open",label:a.getMode()+"."+a.getSize()});if(this.editor.editable&&this.mode==a.getMode()&&a.getMode()!=App.MODE_DEVICE&&null!=a.getMode())try{this.addRecent({id:a.getHash(),title:a.getTitle(),mode:a.getMode()})}catch(q){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(q){}}catch(q){this.fileLoadedError=q;null!=window.console&&console.log("error in fileLoaded:",a,q);if(EditorUi.enableLogging&&!this.isOffline())try{(new Image).src=
-(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(t){}this.handleError(q,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=
+(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,null,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));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,!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=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,H=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),
-m,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",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")}),E=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);
-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;E(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,u,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,u,k),c)],c[0].vertex=!0,E(c,new mxRectangle(0,0,u,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);C(a);this.spinner.stop();
-v=!0}catch(X){}else if("mxfile"==e.documentElement.nodeName)try{for(var u=e.documentElement.getElementsByTagName("diagram"),e=0;e<u.length;e++){var g=mxUtils.getTextContent(u[e]),k=this.stringToCells(this.editor.graph.decompress(g)),p=this.editor.graph.getBoundingBoxFromGeometry(k);E(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",H);mxEvent.addListener(m,
+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?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=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,H=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),m,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",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);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)});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);C(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",H);mxEvent.addListener(m,
"dblclick",function(a){mxEvent.getSource(a)==m&&H(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),h="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==d.aspect&&(h+="aspect=fixed;");b.appendChild(this.sidebar.createVertexTemplate(h+
+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+
"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=
@@ -7969,15 +7970,15 @@ Editor.checkmarkImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAM
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,u,n,F,B,y){a=new ErrorDialog(this,a,b,c||mxResources.get("ok"),d,e,g,k,B,l,u);this.showDialog(a.container,n||340,F||(null!=b&&120<b.length?180:150),!0,!1,y);a.init()};EditorUi.prototype.alert=
+"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,B,y){a=new ErrorDialog(this,a,b,c||mxResources.get("ok"),d,e,g,k,B,l,t);this.showDialog(a.container,n||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(u){}}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,u=Math.min(g+1024,d),k=Array(u-g),l=0;g<u;++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(B){this.handleError(B)}}))}catch(F){this.handleError(F)}}),
+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(B){this.handleError(B)}}))}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:'+
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=
@@ -7987,8 +7988,8 @@ a.setAttribute("border","0");a.setAttribute("src",b);this.exportDialog.appendChi
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"==
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,u,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,u));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,
+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=
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");
@@ -7998,52 +7999,52 @@ Dialog.prototype.closeImage+"')")+';"></div>'}mxUtils.write(a,mxResources.get("l
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,u,n,F){this.getBasenames();var f={};""!=e&&e!=mxConstants.NONE&&(f.highlight=e);"auto"!==d&&(f.target=d);
-u||(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&&(u&&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%;":
-"")+(""!=c?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(f))+'"></div>';a=null!=a?"&fetch="+encodeURIComponent(a):"";F(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");
+(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%;":
+"")+(""!=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,H=H=this.addCheckbox(f,mxResources.get("allPages"),h,!h),C=this.addCheckbox(f,mxResources.get("layers"),!0),E=this.addCheckbox(f,mxResources.get("lightbox"),!0),I=this.addEditButton(f,E),A=I.getEditInput();A.style.marginBottom="16px";mxEvent.addListener(E,"change",function(){E.checked?A.removeAttribute("disabled"):
-A.setAttribute("disabled","disabled");A.checked&&E.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,H.checked,C.checked,E.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=
+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,H=H=this.addCheckbox(f,mxResources.get("allPages"),h,!h),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,p.checked,n.value,l.getTarget(),l.getColor(),z.checked,H.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 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 t=null;
-if(null==m||m.constructor!=window.DriveFile||b)t=this.addCheckbox(f,mxResources.get("allPages"),c,!c);var C=this.addCheckbox(f,mxResources.get("lightbox"),!0),E=this.addEditButton(f,C),I=E.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(C,"change",function(){C.checked?(A.removeAttribute("disabled"),I.removeAttribute("disabled")):(A.setAttribute("disabled","disabled"),I.setAttribute("disabled",
-"disabled"));I.checked&&C.checked?E.getEditSelect().removeAttribute("disabled"):E.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,f,mxUtils.bind(this,function(){e(q.getTarget(),q.getColor(),null==t?!0:t.checked,C.checked,E.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():
+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 C=this.addCheckbox(f,mxResources.get("lightbox"),!0),F=this.addEditButton(f,C),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(C,"change",function(){C.checked?(A.removeAttribute("disabled"),I.removeAttribute("disabled")):(A.setAttribute("disabled","disabled"),I.setAttribute("disabled",
+"disabled"));I.checked&&C.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,C.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),t=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(t,"change",function(){t.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 D=this.addCheckbox(f,mxResources.get("includeCopyOfMyDiagram"),k,null,null,"jpeg"!=l),G=null!=this.pages&&1<this.pages.length,M=this.addCheckbox(f,G?mxResources.get("allPages"):"",G,!G,null,"jpeg"!=l);M.style.marginLeft="24px";M.style.marginBottom="16px";G||(M.style.display="none");mxEvent.addListener(D,"change",function(){D.checked&&
+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),G=null!=this.pages&&1<this.pages.length,M=this.addCheckbox(f,G?mxResources.get("allPages"):"",G,!G,null,"jpeg"!=l);M.style.marginLeft="24px";M.style.marginBottom="16px";G||(M.style.display="none");mxEvent.addListener(E,"change",function(){E.checked&&
G?M.removeAttribute("disabled"):M.setAttribute("disabled","disabled")});k&&G||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,!t.checked,I.checked,D.checked,A.checked,q.value,x.checked,!M.checked,K.value)}),null,c,d);this.showDialog(c.container,340,
+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(),H=1<h.model.getChildCount(h.model.getRoot()),C=this.addCheckbox(f,mxResources.get("layers"),H,!H);C.style.marginLeft=q.style.marginLeft;C.style.marginBottom="12px";C.style.marginTop="8px";mxEvent.addListener(p,"change",function(){p.checked?(H&&C.removeAttribute("disabled"),q.removeAttribute("disabled")):
(C.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(),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,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 u="";c&&(u=' width="'+Math.round(h.width)+'" height="'+Math.round(h.height)+'"');k('<img src="'+b+'"'+u+(""!=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")})}),
+(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+
" "+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(t){}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()),
+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,u){u=null!=u?u:"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,u)}catch(B){"Invalid image"==B.message?this.downloadFile(u):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,k)}catch(F){this.spinner.stop(),this.handleError(F)}}};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]],h=1;h<c.length;h++){var g=c[h].indexOf(")");e.push('url("');e.push(f[b(c[h].substring(0,g))]);e.push('"'+c[h].substring(g))}this.editor.resolvedFontCss=e.join("");a()}});if(0<c.length)for(var g=1;g<c.length;g++){var k=c[g].indexOf(")"),u=null,l=c[g].indexOf("format(",k);0<l&&(u=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"==u||/(\.svg)($|\?)/i.test(a))b="image/svg+xml";else if("otf"==u||"embedded-opentype"==u||/(\.otf)($|\?)/i.test(a))b="application/x-font-opentype";else if("woff"==u||/(\.woff)($|\?)/i.test(a))b="application/font-woff";else if("woff2"==u||/(\.woff2)($|\?)/i.test(a))b="application/font-woff2";else if("eot"==u||/(\.eot)($|\?)/i.test(a))b="application/vnd.ms-fontobject";else if("sfnt"==u||/(\.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)),u)}}else a()};EditorUi.prototype.exportToCanvas=function(a,b,c,d,e,g,k,l,u,n,F,B,y,z){g=null!=g?g:!0;B=null!=B?B:this.editor.graph;y=null!=y?y:0;var f=u?null:B.background;f==mxConstants.NONE&&(f=null);null==f&&(f=d);null==f&&0==u&&
-(f=this.editor.graph.defaultPageBackgroundColor);this.convertImages(B.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 u=h.getContext("2d");
-null!=f&&(u.beginPath(),u.rect(0,0,m,k),u.fillStyle=f,u.fill());u.scale(l,l);mxClient.IS_SF?window.setTimeout(function(){u.drawImage(d,y/l,y/l);a(h)},0):(u.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(B,
-c,!0,mxUtils.bind(this,function(){d.src=this.createSvgDataUri(mxUtils.getXml(c))}))});this.loadFonts(h)}catch(A){null!=e&&e(A)}}),c,F)};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,h){for(var g=a.getElementsByTagName(c),m=0;m<g.length;m++)mxUtils.bind(this,function(c){var g=d.convert(c.getAttribute(h));if(null!=g&&"data:"!=g.substring(0,5)){var m=e[g];null==m?(f++,this.convertImageToDataUri(g,function(d){null!=d&&(e[g]=d,c.setAttribute(h,
-d));f--;0==f&&b(a)})):c.setAttribute(h,m)}else null!=g&&c.setAttribute(h,g)})(g[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(u){null!=c&&c(u)}};EditorUi.prototype.isCorsEnabledForUrl=
+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(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,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]],h=1;h<c.length;h++){var g=c[h].indexOf(")");e.push('url("');e.push(f[b(c[h].substring(0,g))]);e.push('"'+c[h].substring(g))}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==
+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,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!=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(B,
+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=
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])),
@@ -8054,30 +8055,30 @@ d():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",d))};EditorUi.pro
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(F){}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="+
+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(),
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,u,n,F){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)?(u=!1,"image/png"==b.substring(0,9)&&(b=F?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(h=this.importXml(b,c,d,n),u=!0)),u||(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!=u&&null!=k&&(/(\.v(dx|sdx?))($|\?)/i.test(k)||/(\.vs(x|sx?))($|\?)/i.test(k))?(f=!0,this.importVisio(u,m)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,k)?(f=!0,this.parseFile(null!=u?u: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)||
+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,u,n,F,B){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=F||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,u=m.gridSize;
+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g&63)}return b};EditorUi.prototype.importFiles=function(a,b,c,d,e,g,k,l,t,n,D,B){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,B)});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 f=w[d]();null!=f&&(c=c.concat(f))}}finally{m.getModel().endUpdate()}}g(c)}}),t=0;t<p;t++)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],t=B?null:q.getAttribute("content");
-null!=t&&"<"!=t.charAt(0)&&"%"!=t.charAt(0)&&(t=unescape(window.atob?atob(t):Base64.decode(t,!0)));null!=t&&"%"==t.charAt(0)&&(t=decodeURIComponent(t));null==t||"<mxfile "!==t.substring(0,8)&&"<mxGraphModel "!==t.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 t=Math.min(1,Math.min(d/Math.max(1,k)),d/Math.max(1,n)),y=e(l,g.type,b+f*u,c+f*u,Math.max(1,Math.round(k*t)),Math.max(1,Math.round(n*t)),g.name);if(isNaN(k)||isNaN(n)){var B=new Image;B.onload=mxUtils.bind(this,function(){k=Math.max(1,B.width);n=Math.max(1,B.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]])});B.src=this.createSvgDataUri(mxUtils.getXml(h))}return y}}}catch(fa){}return null})):v(f,mxUtils.bind(this,function(){return e(t,"text/xml",b+f*u,c+f*u,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*u,c+f*u,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,F)?Math.min(1,Math.min(d/k,d/l)):1;return e(m,g.type,b+f*u,c+f*u,Math.round(k*p),Math.round(l*p),g.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),h,d,F)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else e(a.target.result,g.type,b+f*u,c+f*u,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*u,c+f*u,240,160,g.name,function(a){v(f,function(){return a})},g):"image"==g.type.substring(0,5)?l.readAsDataURL(g):l.readAsText(g)})(t)});m?this.confirmImageResize(function(a){h=a;w()},u):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?
+try{for(var d=0;d<w.length;d++){var f=w[d]();null!=f&&(c=c.concat(f))}}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=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 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 B=new Image;B.onload=mxUtils.bind(this,function(){k=Math.max(1,B.width);n=Math.max(1,B.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]])});B.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=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*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 t=q.toDataURL();p!==t&&(b=p,f=k,h=l)}}}catch(C){}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]=
+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(C){}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,f){a=d.substring(a+8,a+8+f);"zTXt"==c?(f=a.indexOf(String.fromCharCode(0)),
@@ -8086,13 +8087,13 @@ c);d.src=a};var g=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 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 u=function(){window.setTimeout(function(){w.innerHTML="&nbsp;";
+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;";
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 F=!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)||F||(w.style.left=b.container.scrollLeft+10+"px",w.style.top=b.container.scrollTop+10+"px",b.container.appendChild(w),
-F=!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(){!F||224!=c&&17!=c&&91!=c||(F=!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),u())}));mxEvent.addListener(w,"cut",mxUtils.bind(this,function(a){b.isEnabled()&&(mxClipboard.copy(b),this.copyCells(w,!0),u())}));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=
+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);
+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 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<=
@@ -8103,7 +8104,7 @@ function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionC
this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:H.apply(this,arguments)}}n=document.getElementById("geInfo");null!=n&&n.parentNode.removeChild(n);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 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 u=!0,l=mxUtils.bind(this,function(){b.setSelectionCells(this.insertTextAt(k,f,g,!0,m,null,u))});m&&k.length>this.resampleThreshold?this.confirmImageResize(function(a){u=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,
+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"),
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)};
@@ -8112,8 +8113,8 @@ 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(u){}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(u){}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(u){}}}}};EditorUi.prototype.addFileDropHandler=function(a){if(Graph.fileSupport)for(var b=
+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!=
+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?
c=d.getData("Text"):(c=null,c=0<=mxUtils.indexOf(d.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(d.types,"text/html")?d.getData("text/html"):null,null!=c&&0<c.length?(d=document.createElement("div"),d.innerHTML=c,d=d.getElementsByTagName("img"),0<d.length&&(c=d[0].getAttribute("src"))):0<=mxUtils.indexOf(d.types,"text/plain")&&(c=d.getData("text/plain"))),null!=c&&("data:image/png;base64,"==c.substring(0,22)?(c=this.extractGraphModelFromPng(c),null!=c&&0<c.length&&
@@ -8121,7 +8122,7 @@ this.openLocalFile(c,null,!0)):!this.isOffline()&&this.isRemoteFileFormat(c)?(ne
null,!0)}a.stopPropagation();a.preventDefault()}))};EditorUi.prototype.highlightElement=function(a){var b=0,c=0,d,e;if(null==a){e=document.body;var f=document.documentElement;d=(e.clientWidth||f.clientWidth)-3;e=Math.max(e.clientHeight||0,f.clientHeight)-3}else b=a.offsetTop,c=a.offsetLeft,d=a.clientWidth,e=a.clientHeight;f=document.createElement("div");f.style.zIndex=mxPopupMenu.prototype.zIndex+2;f.style.border="3px dotted rgb(254, 137, 12)";f.style.pointerEvents="none";f.style.position="absolute";
f.style.top=b+"px";f.style.left=c+"px";f.style.width=Math.max(0,d-3)+"px";f.style.height=Math.max(0,e-3)+"px";null!=a&&a.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(f):document.body.appendChild(f);return f};EditorUi.prototype.stringToCells=function(a){a=mxUtils.parseXml(a);var b=this.editor.extractGraphModel(a.documentElement);a=[];if(null!=b){var c=new mxCodec(b.ownerDocument),d=new mxGraphModel;c.decode(b,d);b=d.getChildAt(d.getRoot(),0);for(c=0;c<d.getChildCount(b);c++)a.push(d.getChildAt(b,
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(F){this.handleError(F,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();
+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(D){this.handleError(D,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(w){this.handleError(w,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,c){var d=this.getCurrentFile(),e=mxUtils.bind(this,function(){window.openFile=null;if(null==b&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var d=
@@ -8141,32 +8142,32 @@ h.action){this.spinner.stop();k=1==h.enableRecent;m=1==h.enableSearch;k=new NewD
"*")}):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.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),"*")}),t=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);"xmlpng"==h.format&&(a=this.writeGraphModelToPng(a,"zTXt",
+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){t(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,function(){t(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()):t(null)}),mxUtils.bind(this,function(){t(null)}))}}else{null!=h.xml&&0<h.xml.length&&this.setFileData(h.xml);p=this.createLoadMessage("export");
+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");
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 D=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,
+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,
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){D(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)&&D(a.responseText,f)}),""):null!=h&&"function"===typeof h.substring&&this.isLucidChartData(h)?this.convertLucidChart(h,
-mxUtils.bind(this,function(a){D(a)}),mxUtils.bind(this,function(a){this.handleError(a)})):(h=k(h),D(h,f))}}));var g=window.opener||window.parent,f="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";g.postMessage(f,"*")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar){var a=document.createElement("div");a.style.display="inline-block";a.style.position="absolute";a.style.paddingTop="atlas"==uiTheme?"2px":"3px";a.style.paddingLeft="8px";a.style.paddingBottom=
+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,
+mxUtils.bind(this,function(a){E(a)}),mxUtils.bind(this,function(a){this.handleError(a)})):(h=k(h),E(h,f))}}));var g=window.opener||window.parent,f="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";g.postMessage(f,"*")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar){var a=document.createElement("div");a.style.display="inline-block";a.style.position="absolute";a.style.paddingTop="atlas"==uiTheme?"2px":"3px";a.style.paddingLeft="8px";a.style.paddingBottom=
"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",B="auto",y=null,z=null,H=40,C=40,E=100,I=0,A=this.editor.graph;A.getGraphBounds();for(var D=function(){null!=b?b(ea):(A.setSelectionCells(ea),A.scrollCellToVisible(A.getSelectionCell()))},G=A.getFreeInsertPoint(),M=G.x,K=G.y,G=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<
+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",B="auto",y=null,z=null,H=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()))},G=A.getFreeInsertPoint(),M=G.x,K=G.y,G=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?B=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?H=parseFloat(L):"nodespacing"==Q?C=parseFloat(L):"levelspacing"==Q?E=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=
+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?H=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,G,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),"@"==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),G+=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=H;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"==B&&(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,D);D=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,D);D=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=H;ga.interRankCellSpacing=E;ga.disableEdgeStyle=!1;this.executeLayout(function(){ga.execute(A.getDefaultParent(),ea);A.moveCells(ea,M,K)},!0,D);D=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=H;this.executeLayout(function(){ha.execute(A.getDefaultParent());
-na()},!0,D);D=null}this.hideDialog()}finally{A.model.endUpdate()}null!=D&&D()}}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;
+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"==B&&(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=H;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=H;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-
@@ -8179,34 +8180,34 @@ a);this.actions.get("redo").setEnabled(this.canRedo()&&a);this.menus.get("edit")
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 n=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=
-function(){n.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&&
+"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 l=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);l.apply(this,
+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.viewStateWhitelist="background backgroundImage foldingEnabled pageScale mathEnabled shadowVisible pageFormat".split(" ");
-EditorUi.prototype.patchPages=function(a,c,b,d,e){var g={},k=[],n={},l={},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++)l[c[EditorUi.DIFF_REMOVE][d]]=!0;if(null!=c[EditorUi.DIFF_INSERT])for(d=0;d<c[EditorUi.DIFF_INSERT].length;d++)n[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]||l[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 t={},v=mxUtils.bind(this,function(a){var d=null!=a?a.getId():"";if(null!=a&&!t[d]){t[d]=!0;k.push(a);var l=null!=c[EditorUi.DIFF_UPDATE]?c[EditorUi.DIFF_UPDATE][d]:null;null!=l&&(this.updatePageRoot(a),null!=l.name&&a.setName(l.name),
-null!=l.view&&this.patchViewState(a,l.view),null!=l.cells&&this.patchPage(a,l.cells,g[a.getId()],e),!b||null==l.cells&&null==l.view||(a.needsUpdate=!0))}a=h[d];null!=a&&(delete h[d],v(f[a]));a=n[d];null!=a&&(delete n[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 n)x(n[m]),delete n[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:"",n=null!=g.previous?g.previous:"";b(k).inserted[n]=g}if(null!=c[EditorUi.DIFF_UPDATE])for(var l in c[EditorUi.DIFF_UPDATE])g=c[EditorUi.DIFF_UPDATE][l],null!=g.previous&&(k=g.parent,null==k&&(e=a.getCell(l),null!=e&&(e=
-a.getParent(e),null!=e&&(k=e.getId()))),null!=k&&(b(k).moved[g.previous]=l));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,n=new mxDictionary,l=[];e.updateEdgeParent=function(a,b){!n.get(a)&&d&&(n.put(a,!0),l.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 t=e.getCell(c[EditorUi.DIFF_REMOVE][q]);null!=t&&e.remove(t)}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],
-t=e.getCell(h.id),null!=t&&(e.setTerminal(t,e.getCell(h.source),!0),e.setTerminal(t,e.getCell(h.target),!1));e.updateEdgeParent=k;if(d&&0<l.length)for(q=0;q<l.length;q++)e.contains(l[q])&&e.updateEdgeParent(l[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:{},n=null!=g&&null!=g.moved?g.moved:{},l=0,g=c.getChildCount(b),f="",h=0;h<g;h++){var m=c.getChildAt(b,h).getId();null==n[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)&&(n[f]=m);f=m}var p=mxUtils.bind(this,function(f){var g=null!=f?f.getId():"";null!=f&&(c.getChildAt(b,l)!=
-f&&c.add(b,f,l),this.patchCellRecursive(a,c,f,d,e),l++);f=n[g];null!=f&&(delete n[g],p(c.getCell(f)));f=k[g];null!=f&&(delete k[g],p(this.getCellForJson(f)))});p();for(var q in n)p(c.getCell(n[q])),delete n[q];for(q in k)p(this.getCellForJson(k[q])),delete k[q]};
+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]};
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)}};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={},n=null,l=0;l<c.length;l++)g[c[l].getId()]={page:c[l],prev:n},n=c[l];n=null;for(l=0;l<a.length;l++){var f=a[l].getId(),h=g[f];if(null==h)d.push(f);else{var m=this.diffPage(a[l],h.page),p={};0<Object.keys(m).length&&(p.cells=m);m=this.diffViewState(a[l],h.page);0<Object.keys(m).length&&(p.view=m);if((null!=h.prev?null==n:null!=n)||null!=n&&null!=h.prev&&n.getId()!=h.prev.getId())p.previous=null!=h.prev?h.prev.getId():"";null!=
-h.page.getName()&&a[l].getName()!=h.page.getName()&&(p.name=h.page.getName());0<Object.keys(p).length&&(k[f]=p)}delete g[a[l].getId()];n=a[l]}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={},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.createCellLookup=function(a,c,b,d){d=null!=d?d:{};d[a.getId()]={cell:a,prev:c};b=a.getChildCount();c=null;for(var e=0;e<b;e++){var g=a.getChildAt(e);this.createCellLookup(g,c,e,d);c=g}return d};
-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 n=a.getChildAt(k);this.diffCellRecursive(n,c,b,d,e);c=n}return d};
-EditorUi.prototype.diffPage=function(a,c){var b=[],d=[],e={};this.updatePageRoot(a);this.updatePageRoot(c);var g=this.createCellLookup(c.root,null,0),k=this.diffCellRecursive(a.root,null,g,k,d),n;for(n in g){var l=g[n];b.push(this.getJsonForCell(l.cell,l.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=0;g<this.viewStateWhitelist.length;g++){var k=this.viewStateWhitelist[g],n=JSON.stringify(b[k]),l=JSON.stringify(d[k]);n!=l&&(e[k]=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 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,null,0),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=0;g<this.viewStateWhitelist.length;g++){var k=this.viewStateWhitelist[g],l=JSON.stringify(b[k]),n=JSON.stringify(d[k]);l!=n&&(e[k]=n)}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;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);return b};
@@ -8221,61 +8222,59 @@ a},init:function(){mxSettings.settings={language:"",configVersion:Editor.configV
"undefined"!==typeof JSON)try{delete mxSettings.settings.isNew,mxSettings.settings.version=mxSettings.currentVersion,localStorage.setItem(mxSettings.key,JSON.stringify(mxSettings.settings))}catch(a){}},load:function(){isLocalStorage&&"undefined"!==typeof JSON&&mxSettings.parse(localStorage.getItem(mxSettings.key));null==mxSettings.settings&&mxSettings.init()},parse:function(a){null!=a&&(a=JSON.parse(a),null!=Editor.config&&Editor.config.override||a.configVersion!=Editor.configVersion?mxSettings.settings=
null:(mxSettings.settings=a,null==mxSettings.settings.plugins&&(mxSettings.settings.plugins=[]),null==mxSettings.settings.recentColors&&(mxSettings.settings.recentColors=[]),null==mxSettings.settings.libraries&&(mxSettings.settings.libraries=Sidebar.prototype.defaultEntries),null==mxSettings.settings.customLibraries&&(mxSettings.settings.customLibraries=Editor.defaultCustomLibraries),null==mxSettings.settings.ui&&(mxSettings.settings.ui=""),null==mxSettings.settings.formatWidth&&(mxSettings.settings.formatWidth=
mxSettings.defaultFormatWidth),null!=mxSettings.settings.lastAlert&&delete mxSettings.settings.lastAlert,null==mxSettings.settings.createTarget&&(mxSettings.settings.createTarget=!1),null==mxSettings.settings.pageFormat&&(mxSettings.settings.pageFormat=mxGraph.prototype.pageFormat),null==mxSettings.settings.search&&(mxSettings.settings.search=!0),null==mxSettings.settings.showStartScreen&&(mxSettings.settings.showStartScreen=!0),null==mxSettings.settings.gridColor&&(mxSettings.settings.gridColor=
-mxGraphView.prototype.gridColor),null==mxSettings.settings.autosave&&(mxSettings.settings.autosave=!0),null!=mxSettings.settings.scratchpadSeen&&delete mxSettings.settings.scratchpadSeen))},clear:function(){isLocalStorage&&localStorage.removeItem(mxSettings.key)}};("undefined"==typeof mxLoadSettings||mxLoadSettings)&&mxSettings.load();DrawioFileSync=function(a){mxEventSource.call(this);this.lastActivity=new Date;this.clientId=Editor.guid();this.ui=a.ui;this.file=a;this.onlineListener=mxUtils.bind(this,function(){this.updateOnlineState();null!=this.channelId&&this.isConnected()&&this.fileChangedNotify()});mxEvent.addListener(window,"online",this.onlineListener);this.visibleListener=mxUtils.bind(this,function(){"hidden"==document.visibilityState?this.isConnected()&&!this.paused&&this.stop():null==this.channelId&&this.start(this.paused)});
-mxEvent.addListener(document,"visibilitychange",this.visibleListener);this.activityListener=mxUtils.bind(this,function(a){this.lastActivity=new Date;null==this.channelId&&this.start(this.paused)});mxEvent.addListener(document,mxClient.IS_POINTER?"pointermove":"mousemove",this.activityListener);mxEvent.addListener(document,"keypress",this.activityListener);mxEvent.addListener(window,"focus",this.activityListener);!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&(mxEvent.addListener(document,"touchstart",this.activityListener),
-mxEvent.addListener(document,"touchmove",this.activityListener))};DrawioFileSync.PROTOCOL=2;mxUtils.extend(DrawioFileSync,mxEventSource);DrawioFileSync.prototype.maxCacheEntrySize=1E6;DrawioFileSync.prototype.enabled=!0;DrawioFileSync.prototype.updateStatusInterval=1E4;DrawioFileSync.prototype.cacheUrl="1"==urlParams.dev?"/cache":"https://rt.draw.io/cache";DrawioFileSync.prototype.channelId=null;DrawioFileSync.prototype.channel=null;DrawioFileSync.prototype.catchupRetryCount=0;
-DrawioFileSync.prototype.maxCatchupRetries=15;DrawioFileSync.prototype.maxCacheReadyRetries=2;DrawioFileSync.prototype.cacheReadyDelay=600;DrawioFileSync.prototype.paused=!1;DrawioFileSync.prototype.inactivityTimeoutSeconds=3600;DrawioFileSync.prototype.lastActivity=null;
-DrawioFileSync.prototype.start=function(a){if("hidden"!=document.visibilityState&&(this.lastModified=this.file.getLastModifiedDate(),this.channelId=this.file.getChannelId(),null!=this.channelId)){this.pusher=this.ui.getPusher();if(null!=this.pusher){try{this.pusherErrorListener=mxUtils.bind(this,function(a){null!=a.error&&null!=a.error.data&&4004===a.error.data.code&&EditorUi.logError("Error: Pusher Limit",null,this.file.getId())}),this.pusher.connection.bind("error",this.pusherErrorListener)}catch(d){}try{if(this.pusher.connect(),
-this.channel=this.pusher.subscribe(this.channelId),this.key=this.file.getChannelKey(),this.lastActivity=new Date,this.paused=!1,a&&this.fileChangedNotify(),null==this.file.stats.start&&(this.file.stats.start=(new Date).toISOString()),EditorUi.debug("Sync.start",[this],a),!this.ui.isOffline()&&!a){var c=this.file.getCurrentUser(),b=null!=c?this.ui.hashValue(c.id):"unknown";EditorUi.logEvent({category:"RT-START-"+DrawioFile.SYNC,action:"file-"+this.file.getId()+"-mode-"+this.file.getMode()+"-size-"+
-this.file.getSize()+"-user-"+b+"-client-"+this.clientId,label:this.file.stats.start})}}catch(d){}}this.installListeners();window.setTimeout(mxUtils.bind(this,function(){this.resetUpdateStatusThread();this.updateOnlineState();this.updateStatus()},0))}};DrawioFileSync.prototype.isConnected=function(){return null!=this.pusher&&null!=this.pusher.connection?"connected"==this.pusher.connection.state:!1};
+mxGraphView.prototype.gridColor),null==mxSettings.settings.autosave&&(mxSettings.settings.autosave=!0),null!=mxSettings.settings.scratchpadSeen&&delete mxSettings.settings.scratchpadSeen))},clear:function(){isLocalStorage&&localStorage.removeItem(mxSettings.key)}};("undefined"==typeof mxLoadSettings||mxLoadSettings)&&mxSettings.load();DrawioFileSync=function(a){mxEventSource.call(this);this.lastActivity=new Date;this.clientId=Editor.guid();this.ui=a.ui;this.file=a;this.onlineListener=mxUtils.bind(this,function(){this.updateOnlineState();this.isConnected()&&this.fileChangedNotify()});mxEvent.addListener(window,"online",this.onlineListener);this.visibleListener=mxUtils.bind(this,function(){"hidden"==document.visibilityState?this.isConnected()&&this.stop():this.start()});mxEvent.addListener(document,"visibilitychange",this.visibleListener);
+this.activityListener=mxUtils.bind(this,function(a){this.lastActivity=new Date;this.start()});mxEvent.addListener(document,mxClient.IS_POINTER?"pointermove":"mousemove",this.activityListener);mxEvent.addListener(document,"keypress",this.activityListener);mxEvent.addListener(window,"focus",this.activityListener);!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&(mxEvent.addListener(document,"touchstart",this.activityListener),mxEvent.addListener(document,"touchmove",this.activityListener))};
+DrawioFileSync.PROTOCOL=3;mxUtils.extend(DrawioFileSync,mxEventSource);DrawioFileSync.prototype.maxCacheEntrySize=1E6;DrawioFileSync.prototype.enabled=!0;DrawioFileSync.prototype.updateStatusInterval=1E4;DrawioFileSync.prototype.cacheUrl="1"==urlParams.dev?"/cache":"https://rt.draw.io/cache";DrawioFileSync.prototype.channelId=null;DrawioFileSync.prototype.channel=null;DrawioFileSync.prototype.catchupRetryCount=0;DrawioFileSync.prototype.maxCatchupRetries=15;
+DrawioFileSync.prototype.maxCacheReadyRetries=2;DrawioFileSync.prototype.cacheReadyDelay=500;DrawioFileSync.prototype.inactivityTimeoutSeconds=3600;DrawioFileSync.prototype.lastActivity=null;
+DrawioFileSync.prototype.start=function(){null==this.channelId&&(this.channelId=this.file.getChannelId());null==this.key&&(this.key=this.file.getChannelKey());if(null==this.pusher&&null!=this.channelId&&"hidden"!=document.visibilityState){this.pusher=this.ui.getPusher();if(null!=this.pusher){try{this.pusherErrorListener=mxUtils.bind(this,function(a){null!=a.error&&null!=a.error.data&&4004===a.error.data.code&&EditorUi.logError("Error: Pusher Limit",null,this.file.getId())}),this.pusher.connection.bind("error",
+this.pusherErrorListener)}catch(b){}try{if(this.pusher.connect(),this.channel=this.pusher.subscribe(this.channelId),EditorUi.debug("Sync.start",[this]),null==this.file.stats.start&&(this.file.stats.start=(new Date).toISOString(),!this.ui.isOffline())){var a=this.file.getCurrentUser(),c=null!=a?this.ui.hashValue(a.id):"unknown";EditorUi.logEvent({category:"RT-START-"+DrawioFile.SYNC,action:"file-"+this.file.getId()+"-mode-"+this.file.getMode()+"-size-"+this.file.getSize()+"-user-"+c+"-client-"+this.clientId,
+label:this.file.stats.start})}}catch(b){}this.installListeners()}window.setTimeout(mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.lastActivity=new Date;this.resetUpdateStatusThread();this.updateOnlineState();this.updateStatus()},0))}};DrawioFileSync.prototype.isConnected=function(){return null!=this.pusher&&null!=this.pusher.connection?"connected"==this.pusher.connection.state:!1};
DrawioFileSync.prototype.updateOnlineState=function(){var a=mxUtils.bind(this,function(a){mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){this.enabled=!this.enabled;this.ui.updateButtonContainer();this.resetUpdateStatusThread();this.updateOnlineState();this.updateStatus();!this.file.inConflictState&&this.enabled&&this.fileChangedNotify()}))});if("min"==uiTheme&&null!=this.ui.buttonContainer){if(null==this.collaboratorsElement){var c=document.createElement("a");c.className="geToolbarButton";
c.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;float:left;";c.style.backgroundPosition="center center";c.style.backgroundRepeat="no-repeat";c.style.backgroundSize="24px 24px";c.style.height="24px";c.style.width="24px";a(c);this.ui.buttonContainer.appendChild(c);this.collaboratorsElement=c}}else null!=this.ui.toolbarContainer&&null==this.collaboratorsElement&&(c=document.createElement("a"),c.className="geButton",c.style.position="absolute",
c.style.display="inline-block",c.style.verticalAlign="bottom",c.style.color="#666",c.style.top="5px",c.style.right="atlas"==uiTheme?"42px":"60px",c.style.padding="2px",c.style.fontSize="8pt",c.style.verticalAlign="middle",c.style.textDecoration="none",c.style.backgroundPosition="center center",c.style.backgroundRepeat="no-repeat",c.style.backgroundSize="16px 16px",c.style.width="16px",c.style.height="16px",mxUtils.setOpacity(c,60),"dark"==uiTheme&&(c.style.filter="invert(100%)"),mxEvent.addListener(c,
mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(a){a.preventDefault()})),a(c),this.ui.toolbarContainer.appendChild(c),this.collaboratorsElement=c);null!=this.collaboratorsElement&&(a="",a=this.enabled?this.file.invalidChecksum?mxResources.get("error")+": "+mxResources.get("checksum"):this.ui.isOffline()||!this.isConnected()?mxResources.get("offline"):mxResources.get("online"):mxResources.get("disconnected"),this.collaboratorsElement.setAttribute("title",a),this.collaboratorsElement.style.backgroundImage=
"url("+(this.enabled?this.ui.isOffline()||!this.isConnected()||this.file.invalidChecksum?Editor.syncProblemImage:Editor.syncImage:Editor.syncDisabledImage)+")")};
-DrawioFileSync.prototype.updateStatus=function(){!this.paused&&this.isConnected()&&null!=this.lastActivity&&((new Date).getTime()-this.lastActivity.getTime())/1E3>this.inactivityTimeoutSeconds&&this.stop();if(!(this.file.isModified()||this.file.inConflictState||null!=this.file.autosaveThread||this.file.savingFile||this.redirectDialogShowing))if(this.enabled&&null!=this.ui.statusContainer){var a=this.ui.timeSince(new Date(this.lastModified));null==a&&(a=mxResources.get("lessThanAMinute"));var c=this.file.isRevisionHistorySupported(),
+DrawioFileSync.prototype.updateStatus=function(){this.isConnected()&&null!=this.lastActivity&&((new Date).getTime()-this.lastActivity.getTime())/1E3>this.inactivityTimeoutSeconds&&this.stop();if(!(this.file.isModified()||this.file.inConflictState||null!=this.file.autosaveThread||this.file.savingFile||this.redirectDialogShowing))if(this.enabled&&null!=this.ui.statusContainer){var a=this.ui.timeSince(new Date(this.lastModified));null==a&&(a=mxResources.get("lessThanAMinute"));var c=this.file.isRevisionHistorySupported(),
b=this.lastMessage;this.lastMessage=null;null!=b&&40<b.length&&(b=b.substring(0,40)+"...");a=mxResources.get("lastChange",[a]);this.ui.editor.setStatus('<div style="display:inline-block;">'+mxUtils.htmlEntities(a)+"</div>"+(null!=b?' <span style="opacity:0;">('+b+")</span>":"")+(this.file.isEditable()?"":'<div class="geStatusAlert" style="margin-left:8px;display:inline-block;">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</div>")+(this.isConnected()?"":'<div class="geStatusAlert geBlink" style="margin-left:8px;display:inline-block;">'+
mxUtils.htmlEntities(mxResources.get("disconnected"))+"</div>"));b=this.ui.statusContainer.getElementsByTagName("div");0<b.length&&(c?(b[0].style.cursor="pointer",b[0].style.textDecoration="underline",b[0].setAttribute("title",mxResources.get("revisionHistory")),mxEvent.addListener(b[0],"click",mxUtils.bind(this,function(){this.ui.actions.get("revisionHistory").funct()}))):b[0].setAttribute("title",a));c=this.ui.statusContainer.getElementsByTagName("span");if(0<c.length){var d=c[0];mxUtils.setPrefixedStyle(d.style,
"transition","all 0.2s ease");window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(d,100);mxUtils.setPrefixedStyle(d.style,"transition","all 1s ease");window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(d,0)}),this.updateStatusInterval/2)}),0)}this.resetUpdateStatusThread()}else this.file.addAllSavedStatus()};
DrawioFileSync.prototype.resetUpdateStatusThread=function(){null!=this.updateStatusThread&&window.clearInterval(this.updateStatusThread);null!=this.channel&&(this.updateStatusThread=window.setInterval(mxUtils.bind(this,function(){this.updateStatus()}),this.updateStatusInterval))};
-DrawioFileSync.prototype.installListeners=function(){null!=this.pusher&&(this.connectionListener=mxUtils.bind(this,function(){this.updateOnlineState();this.updateStatus();if(this.isConnected()&&!this.announced){var a=this.file.getCurrentUser(),c={a:"join"};null!=a&&(c.name=a.displayName,c.uid=a.id);mxUtils.post(this.cacheUrl,this.getIdParameters()+"&msg="+encodeURIComponent(this.objectToString(this.createMessage(c))));this.announced=!0;this.file.stats.msgSent++}}),this.pusher.connection.bind("state_change",
-this.connectionListener));null!=this.channel&&(this.changeListener=mxUtils.bind(this,function(a){this.file.stats.msgReceived++;this.lastActivity=new Date;if(this.enabled&&!this.file.inConflictState&&!this.redirectDialogShowing)try{var c=this.stringToObject(a);null!=c&&(EditorUi.debug("Sync.message",[this],c,a.length,"bytes"),c.v>DrawioFileSync.PROTOCOL?this.file.redirectToNewApp():c.v===DrawioFileSync.PROTOCOL&&null!=c.d&&this.handleMessageData(c.d))}catch(b){null!=window.console&&"1"==urlParams.test&&
-console.log(b)}}),this.channel.bind("changed",this.changeListener))};
+DrawioFileSync.prototype.installListeners=function(){null!=this.pusher&&(this.connectionListener=mxUtils.bind(this,function(){this.updateOnlineState();this.updateStatus();if(this.isConnected()){if(!this.announced){var a=this.file.getCurrentUser(),c={a:"join"};null!=a&&(c.name=a.displayName,c.uid=a.id);mxUtils.post(this.cacheUrl,this.getIdParameters()+"&msg="+encodeURIComponent(this.objectToString(this.createMessage(c))));this.file.stats.msgSent++;this.announced=!0}this.fileChangedNotify()}}),this.pusher.connection.bind("state_change",
+this.connectionListener));null!=this.channel&&(this.changeListener=mxUtils.bind(this,function(a){this.file.stats.msgReceived++;this.lastActivity=new Date;if(this.enabled&&!this.file.inConflictState&&!this.redirectDialogShowing)try{var c=this.stringToObject(a);null!=c&&(EditorUi.debug("Sync.message",[this],c,a.length,"bytes"),c.v>DrawioFileSync.PROTOCOL?this.file.redirectToNewApp(mxUtils.bind(this,function(){})):c.v===DrawioFileSync.PROTOCOL&&null!=c.d&&this.handleMessageData(c.d))}catch(b){null!=
+window.console&&"1"==urlParams.test&&console.log(b)}}),this.channel.bind("changed",this.changeListener))};
DrawioFileSync.prototype.handleMessageData=function(a){"desc"==a.a?this.file.savingFile||this.reloadDescriptor():"join"==a.a||"leave"==a.a?("join"==a.a&&this.file.stats.joined++,null!=a.name&&(this.lastMessage=mxResources.get("join"==a.a?"userJoined":"userLeft",[a.name]),this.resetUpdateStatusThread(),this.updateStatus())):null!=a.m&&(a=new Date(a.m),null==this.lastMessageModified||this.lastMessageModified<a)&&(this.lastMessageModified=a,this.fileChangedNotify())};
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();null==this.channelId&&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,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,h=[],l=[];if(200<=c.getStatus()&&299>=c.getStatus()&&0<c.getText().length)try{var p=JSON.parse(c.getText());if(null!=p&&0<p.length)for(var q=0;q<p.length;q++){var t=this.stringToObject(p[q]);if(t.v>DrawioFileSync.PROTOCOL){this.file.redirectToNewApp(d);l=[];break}else if(t.v===DrawioFileSync.PROTOCOL&&null!=t.d)f=t.d.checksum,l.push(t.d.patch),null!=t.d.details&&(t.d.details.checksum=f,h.push(JSON.stringify(t.d.details)));else{l=[];break}}}catch(v){l=[],null!=
-window.console&&"1"==urlParams.test&&console.log(v)}try{0<l.length?(this.file.stats.cacheHits++,this.merge(l,f,a,b,d,h)):k<=this.maxCacheReadyRetries&&401!=c.getStatus()?(k++,window.setTimeout(n,this.cacheReadyDelay)):(this.file.stats.cacheMiss++,this.reload(b,d,e))}catch(v){null!=d&&d(v)}}}))});window.setTimeout(n,this.cacheReadyDelay)}};
-DrawioFileSync.prototype.reload=function(a,c,b){this.file.updateFile(mxUtils.bind(this,function(){null==this.channelId&&this.start();this.lastModified=this.file.getLastModifiedDate();this.updateStatus();null!=a&&a()}),mxUtils.bind(this,function(a){null!=c&&c(a)}),b)};
+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++,window.setTimeout(n,(k+1)*this.cacheReadyDelay)):(this.file.stats.cacheMiss++,this.reload(b,d,e))}catch(x){null!=d&&d(x)}}}))});window.setTimeout(n,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={},n=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,"patches",a,"checksum",c==n,c);if(null!=c&&c!=n){this.file.checksumError(e,a,"Checksum: "+c+(null!=g&&0<g.length?"\nDetails: "+g.join(", "):"")+"\nCurrent: "+n+(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(l){this.file.inConflictState=!0;this.file.invalidChecksum=!0;null!=e&&e(l);try{this.file.sendErrorReport("Error in merge",null,l)}catch(f){}}};
-DrawioFileSync.prototype.descriptorChanged=function(a){this.lastModified=this.file.getLastModifiedDate();if(this.isConnected()){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()};
+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){this.file.checksumError(e,a,"Checksum: "+c+(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(n){this.file.inConflictState=!0;this.file.invalidChecksum=!0;null!=e&&e(n);try{this.file.sendErrorReport("Error in merge",null,n)}catch(f){}}};
+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.isConnected()||this.file.inConflictState||this.redirectDialogShowing)this.file.shadowPages=a,null==this.channelId&&this.start(),null!=b&&b();else{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},
-k=this.ui.getHashValueForPages(a,g),e=this.ui.diffPages(e,a),g=this.objectToString(this.createMessage({patch:e,checksum:k,details:g})),n=this.objectToString(this.createMessage({m:this.lastModified.getTime()})),l=this.file.getDescriptorSecret(this.file.getDescriptor());c=this.file.getDescriptorEtag(c);var f=this.file.getCurrentEtag();this.file.shadowPages=a;mxUtils.post(this.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(c)+"&to="+encodeURIComponent(f)+"&msg="+encodeURIComponent(n)+(null!=
-l?"&secret="+encodeURIComponent(l):"")+(g.length<this.maxCacheEntrySize?"&data="+encodeURIComponent(g):""),mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?null!=b&&b():null!=d&&d({message:a.getStatus()})}));"1"==urlParams.test&&EditorUi.debug("Sync.fileSaved",[this],"from",c,"to",f,g.length,"bytes","diff",e,"checksum",k);this.file.stats.bytesSent+=g.length;this.file.stats.msgSent++}};
-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(){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&&null!=this.pusher.connection&&this.pusher.connection.unbind("state_change",this.connectionListener),this.connectionListener=null);null!=this.pusherErrorListener&&(null!=this.pusher&&null!=this.pusher.connection&&this.pusher.connection.unbind("error",
-this.pusherErrorListener),this.pusherErrorListener=null);null!=this.pusher&&null!=this.channel&&null!=this.channelId&&(this.channel=null);null!=this.pusher&&this.pusher.disconnect();this.pusher=this.channelId=null;this.paused=!0;this.updateOnlineState();this.updateStatus()};
-DrawioFileSync.prototype.destroy=function(){if(this.isConnected()){var a=this.file.getCurrentUser(),c={a:"leave"};null!=a&&(c.name=a.displayName,c.uid=a.id);mxUtils.post(this.cacheUrl,this.getIdParameters()+"&msg="+encodeURIComponent(this.objectToString(this.createMessage(c))));this.file.stats.msgSent++}this.stop();null!=this.updateStatusThread&&(window.clearInterval(this.updateStatusThread),this.updateStatusThread=null);null!=this.onlineListener&&(mxEvent.removeListener(window,"online",this.onlineListener),
+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);var e=this.ui.diffPages(e,a),g=this.objectToString(this.createMessage({patch:e,checksum:d,details:g})),k=this.objectToString(this.createMessage({m:this.lastModified.getTime()})),l=this.file.getDescriptorSecret(this.file.getDescriptor());c=this.file.getDescriptorEtag(c);var n=this.file.getCurrentEtag();this.file.stats.bytesSent+=g.length;this.file.stats.msgSent++;mxUtils.post(this.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(c)+"&to="+encodeURIComponent(n)+"&msg="+encodeURIComponent(k)+
+(null!=l?"&secret="+encodeURIComponent(l):"")+(g.length<this.maxCacheEntrySize?"&data="+encodeURIComponent(g):""),mxUtils.bind(this,function(a){}));"1"==urlParams.test&&EditorUi.debug("Sync.fileSaved",[this],"from",c,"to",n,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),
+this.pusherErrorListener=null),null!=this.channel&&(this.channel=null),this.pusher.disconnect(),this.pusher=null);this.updateOnlineState();this.updateStatus()};
+DrawioFileSync.prototype.destroy=function(){if(null!=this.channelId){var a=this.file.getCurrentUser(),c={a:"leave"};null!=a&&(c.name=a.displayName,c.uid=a.id);mxUtils.post(this.cacheUrl,this.getIdParameters()+"&msg="+encodeURIComponent(this.objectToString(this.createMessage(c))));this.file.stats.msgSent++}this.stop();null!=this.updateStatusThread&&(window.clearInterval(this.updateStatusThread),this.updateStatusThread=null);null!=this.onlineListener&&(mxEvent.removeListener(window,"online",this.onlineListener),
this.onlineListener=null);null!=this.visibleListener&&(mxEvent.removeListener(document,"visibilitychange",this.visibleListener),this.visibleListener=null);null!=this.activityListener&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointermove":"mousemove",this.activityListener),mxEvent.removeListener(document,"keypress",this.activityListener),mxEvent.removeListener(window,"focus",this.activityListener),!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&(mxEvent.removeListener(document,"touchstart",this.activityListener),
mxEvent.removeListener(document,"touchmove",this.activityListener)),this.activityListener=null);null!=this.collaboratorsElement&&(this.collaboratorsElement.parentNode.removeChild(this.collaboratorsElement),this.collaboratorsElement=null)};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;function mxAsyncCanvas(a){mxAbstractCanvas2D.call(this);this.htmlCanvas=a;a.images=a.images||[];a.subCanvas=a.subCanvas||[]}mxUtils.extend(mxAsyncCanvas,mxAbstractCanvas2D);mxAsyncCanvas.prototype.htmlCanvas=null;mxAsyncCanvas.prototype.canvasIndex=0;mxAsyncCanvas.prototype.waitCounter=0;mxAsyncCanvas.prototype.onComplete=null;mxAsyncCanvas.prototype.incWaitCounter=function(){this.waitCounter++};
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,n){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,n,l,f,h,m){if(null!=e&&0!=e.length&&(a=this.state.scale,"html"==l&&"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,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;
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,n,l){b=this.ctx.createLinearGradient(0,d,0,d+g);d=this.state;d.fillColor=a;d.fillAlpha=null!=n?n:1;d.gradientColor=c;d.gradientAlpha=null!=l?l: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,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.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};
@@ -8285,13 +8284,13 @@ mxJsCanvas.prototype.setShadowOffset=function(a,c){this.state.shadowDx=a;this.st
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.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,n){e=this.rewriteImageSource(e);e=this.images[e];if(null!=e&&0<e.height&&0<e.width){var l=this.ctx;l.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&&(l.translate(2*a+b,0),l.scale(-1,1));n&&(l.translate(0,2*c+d),l.scale(1,-1));l.drawImage(e,a,c,b,d);l.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,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.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,n,l,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"==l){e=this.subCanvas[this.canvasIndex++];l=e.height;m=e.width;switch(k){case mxConstants.ALIGN_MIDDLE:c-=l/2/b;break;case mxConstants.ALIGN_BOTTOM:c-=l/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,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();
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);l=[m.offsetWidth,m.offsetHeight];document.body.removeChild(m);e=e.split("\n");m=l[1];this.ctx.textBaseline="top";l=c;switch(k){case mxConstants.ALIGN_MIDDLE:this.ctx.textBaseline=
-"middle";c-=(e.length-1)*m/2;l=c-this.state.fontSize/2;break;case mxConstants.ALIGN_BOTTOM:this.ctx.textBaseline="alphabetic",c-=m*(e.length-1),l=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;l=Math.round(l)-.5;null!=this.state.fontBackgroundColor&&(this.ctx.fillStyle=this.state.fontBackgroundColor,this.ctx.fillRect(a,l,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,l,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();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()}};
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};
@@ -8319,9 +8318,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(n){window.clearTimeout(e);if(d)if(null!=n&&null==n.error)null!=c&&c(n);else{var l=null!=n&&null!=
-n.error?null!=n.error.data?n.error.data:n.error.errors:null,l=null!=l&&0<l.length?l[0].reason:null;null==b||null==n||null==n.error||-1!=n.error.code&&(403!=n.error.code||"domainPolicy"!=l&&"The requested mime type change is forbidden."!=n.error.message)?null!=n&&null!=n.error&&(401==n.error.code||403==n.error.code&&"rateLimitExceeded"!=l)?403==n.error.code&&null!=this.user||401==n.error.code&&null!=this.user&&"authError"==l?null!=b&&b(n):this.execute(k):null!=n&&null!=n.error&&412!=n.error.code&&
-404!=n.error.code&&400!=n.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(n):b(n)}}))});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 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.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()};
@@ -8333,23 +8332,23 @@ DriveClient.prototype.getFile=function(a,c,b,d,e){d=null!=d?d:!1;e=null!=e?e:!1;
this.ui.convertFile(g,a.title,a.mimeType,this.extension,c,b)):d||e||a.mimeType==this.libraryMimeType||a.mimeType==this.xmlMimeType?this.getXmlFile(a,c,b,!0,e):this.isGoogleRealtimeMimeType(a.mimeType)?this.convertRealtimeFile(a,c,b):this.getXmlFile(a,c,b)}else b({message:mxResources.get("loggedOut")})}),b)};DriveClient.prototype.isGoogleRealtimeMimeType=function(a){return null!=a&&"application/vnd.jgraph.mxfile."==a.substring(0,30)};
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 n=this.ui.extractGraphModelFromPng(d.substring(g+
-1));if(null!=n&&0<n.length)d=n;else try{var l=atob(d.substring(g+1));null==l||"<mxfile "!==l.substring(0,8)&&"<mxGraphModel "!==l.substring(0,14)&&"<mxGraphModel>"!==l.substring(0,14)||(d=l)}catch(f){}}}else"data:image/png;base64,PG14ZmlsZS"==d.substring(0,32)&&(l=d.substring(22),d=window.atob&&!mxClient.IS_SF?atob(l):Base64.decode(l));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,n){if(a.isEditable()){var l=(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==n&&(n=[]),null==a.getChannelId()&&n.push({key:"channel",value:Editor.guid(32)}),null==
-a.getChannelKey()&&n.push({key:"key",value:Editor.guid(32)}),n.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 u=mxUtils.bind(this,function(){a.saveDelay=(new Date).getTime()-l;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!=n&&(q.properties=n);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),u,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)))):
+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")})};
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 n={"Content-Type":'multipart/mixed; boundary="-------314159265358979323846"'};null!=g&&(n["If-Match"]=g);a={path:"/upload/drive/v2/files"+(null!=a?"/"+a:""),method:null!=a?"PUT":"POST",params:{uploadType:"multipart"},headers:n,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"+
+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)};
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),n=(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(n).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),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,
"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=
@@ -8372,32 +8371,32 @@ DropboxFile.prototype.isRenamable=function(){return!0};DropboxFile.prototype.get
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)};
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(),n=mxUtils.bind(this,function(){this.setModified(!1);this.isModified=function(){return k}});n();var l=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(){n();b()}}d(a)}}),f)});this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle())?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){l(this.ui.base64ToBlob(a,"image/png"))}),d,this.ui.getCurrentFile()!=this?this.getData():null):l(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,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!=
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,n){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(l){c(l)}finally{null!=n&&n.close()}}else null!=n&&n.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,n=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(n);k&&null!=c&&c(a)}));a["catch"](mxUtils.bind(this,function(a){window.clearTimeout(n);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(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),
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 n=!0,l=window.setTimeout(mxUtils.bind(this,function(){n=!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(l);n&&null!=a&&409==a.status&&(n=!1,b({message:mxResources.get("fileNotFound")}))});f=this.client.filesDownload(a);f.then(mxUtils.bind(this,
-function(a){window.clearTimeout(l);if(n){n=!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(l);n&&(n=!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.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)},
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,l){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&&l.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,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.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(n){this.ui.handleError(n)}else this.createLibrary(c[0],a,b)}),b)}else this.createLibrary(c[0],a,b)}})})};
+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.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 n=decodeURIComponent(b[0].link.substring(k+this.appPath.length-1));this.readFile({path:n},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,n,!0));a(n.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 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")})};
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};
@@ -8416,83 +8415,83 @@ OneDriveClient.prototype.baseUrl="https://graph.microsoft.com/v1.0";OneDriveClie
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,l){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!=l&&l.close()}}else null!=l&&l.close()}),k.focus())}),
+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())}),
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,n=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(n);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 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,
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 l=!0,f=window.setTimeout(mxUtils.bind(this,function(){l=
-!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(l){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);l&&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 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.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.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 n=mxUtils.bind(this,function(f){var h=!0,m=window.setTimeout(mxUtils.bind(this,function(){h=!1;g({code:App.ERROR_TIMEOUT,retry:l})}),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(){l(!0)},g)})}):this.authenticate(function(){n(!0)},g)):g(this.parseRequestText(a),a))}),mxUtils.bind(this,function(a){window.clearTimeout(m);h&&g(this.parseRequestText(a))}))}),l=mxUtils.bind(this,function(a){null==this.user?this.updateUser(function(){l(!0)},
-g,a):n(a)});null==this.token?this.authenticate(function(){l(!0)},g):l(!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,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.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 n=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;
+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?n(k):this.ui.gitHub.showCommitDialog(this.meta.name,null==this.meta.sha||this.meta.isNew,mxUtils.bind(this,function(a){n(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;
+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;
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,n){if(d)if(window.onGitHubCallback=null,d=!1,null==k)c({message:mxResources.get("accessDenied"),retry:b});else{var l=mxUtils.bind(this,function(){var b=
-!0,d=window.setTimeout(mxUtils.bind(this,function(){b=!1;c({code:App.ERROR_TIMEOUT,retry:l})}),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!=n&&
-n.close()}}))});l()}else null!=n&&n.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,n=window.setTimeout(mxUtils.bind(this,function(){k=!1;b({code:App.ERROR_TIMEOUT,retry:e})}),this.ui.timeout),l=this.token;a.setRequestHeaders=function(a,b){a.setRequestHeader("Authorization","token "+l)};a.send(mxUtils.bind(this,function(){window.clearTimeout(n);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,
+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,
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],n=g[1],l=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+"/"+n+"/contents/"+a+"?ref="+l+"&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+"/"+n+"/contents/"+a+"?ref="+l+e,null,"GET"),this.executeRequest(a,mxUtils.bind(this,function(a){try{c(this.createGitHubFile(k,n,l,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("/"),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.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 n=g[0],l=g[1],f=g[2],h=g.slice(3,g.length).join("/");0<h.length&&(h+="/");h+=a;this.checkExists(n+"/"+l+"/"+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(n,l,f,h,a,c,p,mxUtils.bind(this,function(a){try{var c=JSON.parse(a.getText());b(this.createGitHubFile(n,l,f,c.content,e))}catch(x){d(x)}}),d)}),d)):b(new GitHubFile(this.ui,
-c,{org:n,repo:l,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,n,l){g.length>=this.maxFileSize?l({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){n(a)}),l))};
+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.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,n=a.meta.ref,l=a.meta.path,f=mxUtils.bind(this,function(d,f){this.writeFile(g,k,n,l,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(l)?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(n)+"/"+l,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 n=document.createElement("h3");mxUtils.write(n,mxResources.get(a?"selectFile":"selectFolder"));n.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";k.appendChild(n);var l=document.createElement("div");l.style.whiteSpace="nowrap";l.style.overflow="auto";l.style.height="194px";
-k.appendChild(l);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;u()})));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)}l.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,u()):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");l.innerHTML="";this.ui.spinner.spin(l,mxResources.get("loading"));this.executeRequest(k,mxUtils.bind(this,function(f){m();this.ui.spinner.stop();var k=JSON.parse(f.getText());l.appendChild(h("../ [Up]",mxUtils.bind(this,function(){if(""==g)g=null,u();else{var a=g.split("/");
-g=a.slice(0,a.length-1).join("/");q()}})));mxUtils.br(l);null==k||0==k.length?mxUtils.write(l,mxResources.get("noFiles")):(f=mxUtils.bind(this,function(f){for(var m=0;m<k.length;m++)mxUtils.bind(this,function(k){f==("dir"==k.type)&&(l.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(l))})(k[m])}),f(!0),a&&f(!1))}),p)}),t=null,v=null,x=mxUtils.bind(this,
-function(a){null==a&&(l.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(l,mxResources.get("loading"));null!=t&&null!=t.parentNode&&t.parentNode.removeChild(t);t=document.createElement("a");t.style.display="block";t.setAttribute("href","javascript:void(0);");mxUtils.write(t,mxResources.get("more")+"...");var k=mxUtils.bind(this,function(){mxEvent.removeListener(l,
-"scroll",v);x(a+1)});mxEvent.addListener(t,"click",k);this.executeRequest(c,mxUtils.bind(this,function(b){this.ui.spinner.stop();1==a&&(m(!0),l.appendChild(h("../ [Up]",mxUtils.bind(this,function(){g=null;u()}))),mxUtils.br(l));b=JSON.parse(b.getText());if(null==b||0==b.length)mxUtils.write(l,mxResources.get("noFiles"));else{for(var c=0;c<b.length;c++)mxUtils.bind(this,function(a){l.appendChild(h(a.name,mxUtils.bind(this,function(){e=a.name;g="";q()})));mxUtils.br(l)})(b[c]);100==b.length&&(l.appendChild(t),
-v=function(){l.scrollTop>=l.scrollHeight-l.offsetHeight&&k()},mxEvent.addListener(l,"scroll",v))}}),p)}),u=mxUtils.bind(this,function(a){null==a&&(l.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(l,mxResources.get("loading"));null!=t&&null!=t.parentNode&&t.parentNode.removeChild(t);t=document.createElement("a");t.style.display="block";t.setAttribute("href","javascript:void(0);");
-mxUtils.write(t,mxResources.get("more")+"...");var k=mxUtils.bind(this,function(){mxEvent.removeListener(l,"scroll",v);u(a+1)});mxEvent.addListener(t,"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(l,mxResources.get("noFiles"));else{1==a&&(l.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(l,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(l),mxUtils.br(l));for(var f=0;f<c.length;f++)mxUtils.bind(this,function(a){l.appendChild(h(a.full_name,mxUtils.bind(this,function(){b=a.owner.login;d=a.name;e=a.default_branch;g="";q()})));mxUtils.br(l)})(c[f])}100==c.length&&(l.appendChild(t),v=function(){l.scrollTop>=l.scrollHeight-l.offsetHeight&&k()},mxEvent.addListener(l,"scroll",
-v))}),p)});u()};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};
+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",
+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,
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),n=!0,l=window.setTimeout(mxUtils.bind(this,function(){n=!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(l);if(n){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):(n=!0,l=window.setTimeout(mxUtils.bind(this,function(){n=!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(l);if(n){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(l);n&&(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(l);n&&(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.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.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,n=window.setTimeout(mxUtils.bind(this,function(){k=!1;e({code:App.ERROR_TIMEOUT,retry:g})}),this.ui.timeout),l=new FormData;l.append("key",Trello.key());l.append("token",Trello.token());l.append("file","string"===typeof c?new Blob([c]):c,a);l.append("name",
-a);var f=new XMLHttpRequest;f.responseType="json";f.onreadystatechange=mxUtils.bind(this,function(){if(4===f.readyState&&(window.clearTimeout(n),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(l)});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 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.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 n=document.createElement("div");n.style.whiteSpace="nowrap";n.style.overflow="auto";n.style.height=
-"194px";g.appendChild(n);g=new CustomDialog(this.ui,g);this.ui.showDialog(g.container,340,270,!0,!0);g.okButton.parentNode.removeChild(g.okButton);var l=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;n.innerHTML="";this.ui.spinner.spin(n,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();n.appendChild(l("../ [Up]",mxUtils.bind(this,function(){q()})));mxUtils.br(n);null==a||0==a.length?mxUtils.write(n,mxResources.get("noFiles")):mxUtils.bind(this,function(){for(var d=0;d<a.length;d++)mxUtils.bind(this,function(a){n.appendChild(l(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,n.innerHTML="",g=1);this.ui.spinner.spin(n,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(n,"scroll",p);q(g+1)});mxEvent.addListener(m,"click",k);var t=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(n,mxResources.get("noFiles"));else{1==g&&(n.appendChild(l(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(n));for(var f=0;f<e.length;f++)mxUtils.bind(this,function(d){n.appendChild(l(d.name,mxUtils.bind(this,function(){a?(b=d.id,h()):(this.ui.hideDialog(),c(d.id))})))})(e[f]);100==e.length&&(n.appendChild(m),p=function(){n.scrollTop>=n.scrollHeight-n.offsetHeight&&k()},mxEvent.addListener(n,"scroll",p))}}),mxUtils.bind(this,function(a){401==a.status?this.authenticate(t,f,!0):null!=f&&f({message:a.responseText})}))});t()});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 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.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(n){}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!=
+(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";
App.DROPBOX_APPKEY="libwls2fa9szdji";App.DROPBOX_URL="js/dropbox/Dropbox-sdk.min.js";App.DROPINS_URL="https://www.dropbox.com/static/api/2/dropins.js";App.ONEDRIVE_URL="https://js.live.net/v7.2/OneDrive.js";App.TRELLO_URL="https://api.trello.com/1/client.js";App.TRELLO_JQUERY_URL="https://code.jquery.com/jquery-1.7.1.min.js";App.FOOTER_PLUGIN_URL="https://www.jgraph.com/drawio-footer.js";App.PUSHER_KEY="1e756b07a690c5bdb054";App.PUSHER_CLUSTER="eu";App.PUSHER_URL="https://js.pusher.com/4.3/pusher.min.js";
App.GOOGLE_APIS="client,drive-share";
@@ -8509,10 +8508,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 n="";"1"==urlParams.drawdev&&(n=document.location.protocol+"//drawhost.jgraph.com/");for(var l=k.split(";"),k=0;k<l.length;k++){var f=App.pluginRegistry[l[k]];null!=f&&null==g[f]?(g[f]=!0,mxscript(n+f)):null!=window.console&&console.log("Unknown plugin:",l[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){n=window.location.protocol+"//"+window.location.host;l=!0;for(k=0;k<e.length&&l;k++)"/"!=e[k].charAt(0)&&e[k].substring(0,n.length)!=n&&(l=!1);if(l||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",
+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(t){null!=window.console&&console.log("Error in configuration: "+t)}};mxEvent.addListener(window,"message",m);h.postMessage(JSON.stringify({event:"load"}),"*")}else d()};mxUtils.extend(App,EditorUi);
+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);
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";
@@ -8543,9 +8542,9 @@ App.prototype.resetRecent=function(a){if(isLocalStorage&&null!=localStorage)try{
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"),n=d.getGraphBounds(),l=a/n.width,l=Math.min(1,Math.min(3*a/(4*n.height),l)),f=Math.floor(n.x),h=Math.floor(n.y);k.setAttribute("width",Math.ceil(l*(n.width+4)));k.setAttribute("height",Math.ceil(l*(n.height+4)));var m=k.getContext("2d");
-m.scale(l,l);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(n.width+4),Math.ceil(n.height+4));m.restore();var q=new mxJsCanvas(k),t=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),t);t.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 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};
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"))}})();
@@ -8561,11 +8560,11 @@ App.prototype.showRefreshDialog=function(a,c){if(!this.showingRefreshDialog&&(th
this.createRealtimeNotice();b.style.left="0";b.style.right="0";b.style.borderRadius="0";b.style.borderLeftStyle="none";b.style.borderRightStyle="none";b.style.marginBottom="26px";b.style.padding="8px 0 8px 0";this.dialog.container.appendChild(b)}};
App.prototype.showAlert=function(a){if(null!=a&&0<a.length){var c=document.createElement("div");c.className="geAlert";c.style.zIndex=2E9;c.style.left="50%";c.style.top="-100%";mxUtils.setPrefixedStyle(c.style,"transform","translate(-50%,0%)");mxUtils.setPrefixedStyle(c.style,"transition","all 1s ease");c.innerHTML=a;a=document.createElement("a");a.className="geAlertLink";a.style.textAlign="right";a.style.marginTop="20px";a.style.display="block";a.setAttribute("title",mxResources.get("close"));a.innerHTML=
mxResources.get("close");c.appendChild(a);mxEvent.addListener(a,"click",function(a){null!=c.parentNode&&(c.parentNode.removeChild(c),mxEvent.consume(a))});document.body.appendChild(c);window.setTimeout(function(){c.style.top="30px"},10);window.setTimeout(function(){mxUtils.setPrefixedStyle(c.style,"transition","all 2s ease");c.style.opacity="0";window.setTimeout(function(){null!=c.parentNode&&c.parentNode.removeChild(c)},2E3)},15E3)}};
-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(n){null!=document.body&&this.handleError(n,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=
+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(),l=null!=d?d.data:this.getFileData(),c=Editor.useLocalStorage;
-this.createFile(this.defaultFilename,l,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(),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",
"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,26 +8578,26 @@ App.prototype.pickFile=function(a){a=null!=a?a:this.mode;if(a==App.MODE_GOOGLE)n
"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,
-mxResources.get("loading"))&&c.getLibrary(a,mxUtils.bind(this,function(a){this.spinner.stop();try{this.loadLibrary(a)}catch(n){this.handleError(n,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=
+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(l){this.handleError(l,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 n=this.createLibraryDataFromImages(c),l=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,n,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,
-n,b,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,c)}),l,this.drive.libraryMimeType):d==App.MODE_GITHUB&&null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitHub.insertLibrary(a,n,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,c)}),l,b):d==App.MODE_TRELLO&&null!=this.trello&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.trello.insertLibrary(a,n,mxUtils.bind(this,
-function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,c)}),l,b):d==App.MODE_DROPBOX&&null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.dropbox.insertLibrary(a,n,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,c)}),l,b):d==App.MODE_ONEDRIVE&&null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.oneDrive.insertLibrary(a,n,mxUtils.bind(this,function(a){this.spinner.stop();
-this.hideDialog(!0);this.libraryLoaded(a,c)}),l,b):d==App.MODE_BROWSER?(b=mxUtils.bind(this,function(){var b=new StorageLibrary(this,n,a);b.saveFile(a,!1,mxUtils.bind(this,function(){this.hideDialog(!0);this.libraryLoaded(b,c)}),l)}),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(n);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()}),l)});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()}),l)}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,n=this.getServiceCount(!0);
-isLocalStorage&&n++;var l=4>=n?2:6<n?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,l);this.showDialog(e.container,460,n>l?390:270,!0,!0);e.init()}else this.save(b.getTitle(),d)}};
+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)}};
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,n){d=n?null:null!=d?d:this.mode;if(null!=a&&this.spinner.spin(document.body,mxResources.get("inserting"))){c=null!=c?c:this.emptyDiagramXml;var l=mxUtils.bind(this,function(){this.spinner.stop()}),f=mxUtils.bind(this,function(a){l();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){l();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){l();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){l();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){l();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){l();this.fileCreated(a,b,g,e)}),f,!1,k);else if(d==App.MODE_BROWSER){l();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 l(),
-this.fileCreated(new LocalFile(this,c,a,null==d),b,g,e)}catch(m){l(),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,n=g,l=null;null!=g&&/\.svg$/i.test(a.getTitle())&&(l=this.createTemporaryGraph(this.editor.graph.getStylesheet()),
-document.body.appendChild(l.container),n=this.decodeNodeIntoGraph(n,l));a.setData(this.createFileData(g,l,a,k));null!=l&&l.container.parentNode.removeChild(l.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,
+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,
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,
@@ -8607,14 +8606,14 @@ d,mxUtils.bind(this,function(a){this.handleError(a,mxResources.get("errorLoading
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(),n=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?n():null!=k&&k.isModified()&&!c?window.openWindow(this.getUrl()+"#"+a,null,n):n()};
+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()};
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 n=0;n<b.length;n++){var l=encodeURIComponent(decodeURIComponent(b[n]));mxUtils.bind(this,
+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(u){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(u){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(u){f()}}),function(a){f()}):f(!0)}}})(l,n)}k()});c(mxSettings.getCustomLibraries(),
+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(),
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,9 +8630,9 @@ 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 n=!1;null!=this.gitHub&&a.substring(0,this.gitHub.baseUrl.length)==this.gitHub.baseUrl&&(n=!0);if(/\.v(dx|sdx?)$/i.test(c)&&Graph.fileSupport&&(new XMLHttpRequest).upload&&"string"===typeof(new XMLHttpRequest).responseType){var l=new XMLHttpRequest;l.open("GET",a,!0);n||(l.responseType="blob");l.onload=mxUtils.bind(this,function(){var a=null;n?(a=JSON.parse(l.responseText),a=this.base64ToBlob(a.content,
-"application/octet-stream")):a=new Blob([l.response],{type:"application/octet-stream"});this.importVisio(a,mxUtils.bind(this,function(a){e(new LocalFile(this,a,k,!0))}),g,c)});l.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);n?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.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)?
"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?
@@ -8660,8 +8659,8 @@ else{var c=!1;this.userPanel.innerHTML="";b=document.createElement("img");b.setA
'<table title="User ID: '+b.id+'" style="font-size:10pt;padding:20px 20px 10px 10px;"><tr><td valign="top">'+(null!=b.pictureUrl?'<img width="80" height="80" style="margin-right:10px;border-radius:50%;" src="'+b.pictureUrl+'"/>':'<img width="80" height="80" style="margin-right:4px;margin-top:2px;" src="'+this.defaultUserPicture+'"/>')+'</td><td valign="top" style="white-space:nowrap;'+(null!=b.pictureUrl?"padding-top:14px;":"")+'"><b>'+mxUtils.htmlEntities(b.displayName)+"</b><br><small>"+mxUtils.htmlEntities(b.email)+
"</small><br><br><small>"+mxResources.get("googleDrive")+"</small></tr></table>",b=document.createElement("div"),b.style.textAlign="center",b.style.padding="12px",b.style.background="whiteSmoke",b.style.borderTop="1px solid #e0e0e0",b.style.whiteSpace="nowrap",b.appendChild(mxUtils.button(mxResources.get("signOut"),mxUtils.bind(this,function(){var a=this.getCurrentFile();null!=a&&a.constructor==DriveFile?this.confirm(mxResources.get("areYouSure"),mxUtils.bind(this,function(){this.spinner.spin(document.body,
mxResources.get("signOut"));this.diagramContainer.style.display="none";this.formatContainer.style.display="none";this.hsplit.style.display="none";this.sidebarContainer.style.display="none";this.sidebarFooterContainer.style.display="none";null!=this.tabContainer&&(this.tabContainer.style.display="none");a.close();window.setTimeout(mxUtils.bind(this,function(){this.showDialog=function(){};window.location.hash="";this.drive.clearUserId();gapi.auth.signOut();window.location.reload()}),null!=a&&a.constructor==
-DriveFile?2E3:0)})):(this.drive.clearUserId(),this.drive.setUser(null),gapi.auth.signOut())}))),this.userPanel.appendChild(b)));b=mxUtils.bind(this,function(a,b,d,n){null!=a&&(c&&this.userPanel.appendChild(document.createElement("hr")),c=!0,this.userPanel.innerHTML+='<table style="font-size:10pt;padding:20px 20px 10px 10px;"><tr><td valign="top">'+(null!=b?'<img style="margin-right:10px;" src="'+b+'" width="40" height="40"/></td>':"")+'<td valign="middle" style="white-space:nowrap;"><b>'+mxUtils.htmlEntities(a.displayName)+
-"</b>"+(null!=a.email?'<br><font color="gray">'+mxUtils.htmlEntities(a.email)+"</font>":"")+(null!=n?"<br><br><small>"+mxUtils.htmlEntities(n)+"</small>":"")+"</td></tr></table>",a=document.createElement("div"),a.style.textAlign="center",a.style.padding="12px",a.style.background="whiteSmoke",a.style.borderTop="1px solid #e0e0e0",a.style.whiteSpace="nowrap",null!=d&&a.appendChild(mxUtils.button(mxResources.get("signOut"),d)),this.userPanel.appendChild(a))});null!=this.dropbox&&b(this.dropbox.getUser(),
+DriveFile?2E3:0)})):(this.drive.clearUserId(),this.drive.setUser(null),gapi.auth.signOut())}))),this.userPanel.appendChild(b)));b=mxUtils.bind(this,function(a,b,d,l){null!=a&&(c&&this.userPanel.appendChild(document.createElement("hr")),c=!0,this.userPanel.innerHTML+='<table style="font-size:10pt;padding:20px 20px 10px 10px;"><tr><td valign="top">'+(null!=b?'<img style="margin-right:10px;" src="'+b+'" width="40" height="40"/></td>':"")+'<td valign="middle" style="white-space:nowrap;"><b>'+mxUtils.htmlEntities(a.displayName)+
+"</b>"+(null!=a.email?'<br><font color="gray">'+mxUtils.htmlEntities(a.email)+"</font>":"")+(null!=l?"<br><br><small>"+mxUtils.htmlEntities(l)+"</small>":"")+"</td></tr></table>",a=document.createElement("div"),a.style.textAlign="center",a.style.padding="12px",a.style.background="whiteSmoke",a.style.borderTop="1px solid #e0e0e0",a.style.whiteSpace="nowrap",null!=d&&a.appendChild(mxUtils.button(mxResources.get("signOut"),d)),this.userPanel.appendChild(a))});null!=this.dropbox&&b(this.dropbox.getUser(),
IMAGE_PATH+"/dropbox-logo.svg",mxUtils.bind(this,function(){var a=this.getCurrentFile();if(null!=a&&a.constructor==DropboxFile){var b=mxUtils.bind(this,function(){this.dropbox.logout();window.location.hash=""});a.isModified()?this.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b()}else this.dropbox.logout()}),mxResources.get("dropbox"));null!=this.oneDrive&&b(this.oneDrive.getUser(),IMAGE_PATH+"/onedrive-logo.svg",mxUtils.bind(this,function(){var a=
this.getCurrentFile();if(null!=a&&a.constructor==OneDriveFile){var b=mxUtils.bind(this,function(){this.oneDrive.logout();window.location.hash=""});a.isModified()?this.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b()}else this.oneDrive.logout()}),mxResources.get("oneDrive"));null!=this.gitHub&&b(this.gitHub.getUser(),IMAGE_PATH+"/github-logo.svg",mxUtils.bind(this,function(){var a=this.getCurrentFile();if(null!=a&&a.constructor==GitHubFile){var b=
mxUtils.bind(this,function(){this.gitHub.logout();window.location.hash=""});a.isModified()?this.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b()}else this.gitHub.logout()}),mxResources.get("github"));null!=this.trello&&b(this.trello.getUser(),IMAGE_PATH+"/trello-logo.svg",mxUtils.bind(this,function(){var a=this.getCurrentFile();if(null!=a&&a.constructor==TrelloFile){var b=mxUtils.bind(this,function(){this.trello.logout();window.location.hash=
@@ -8669,13 +8668,13 @@ 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),n=("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),l=("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),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);
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,n){b=parseInt(b);!isNaN(b)&&0<b&&a.exportSvg(b/100,c,d,e,f,g,h,!k,l,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,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"),
+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")+
-"...",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,g,h,k,l,n){a.createHtml(b,
-c,d,e,f,g,h,k,l,n,mxUtils.bind(this,function(b,c){var d=a.getBaseFilename(h),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,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=a.getBaseFilename(h),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 e=document.createElement("h3");mxUtils.write(e,mxResources.get("formatPdf"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";c.appendChild(e);var e=function(){g!=this&&this.checked?k.removeAttribute("disabled"):(k.setAttribute("disabled","disabled"),k.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,d.isSelectionEmpty()),k=a.addCheckbox(c,mxResources.get("crop"),!1,!0);mxEvent.addListener(g,"change",e);mxEvent.addListener(f,"change",e);mxEvent.addListener(h,"change",e);f=205}else h=a.addCheckbox(c,mxResources.get("selectionOnly"),!1,d.isSelectionEmpty()),k=a.addCheckbox(c,
mxResources.get("crop"),!d.pageVisible||!a.pdfPageExport,!a.pdfPageExport),a.pdfPageExport||mxEvent.addListener(h,"change",e);c=new CustomDialog(a,c,mxUtils.bind(this,function(){a.downloadFile("pdf",null,null,!h.checked,b?!0:!g.checked,!k.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"),
@@ -8710,7 +8709,7 @@ b+"/realtime?supportsTeamDrives=true",null,"GET");c.setRequestHeaders=function(a
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,n){a.createHtml(b,c,d,e,f,g,h,k,l,n,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>");
+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>");
d.writeln(b);var e=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;e&&d.writeln(c);d.writeln("</body>");d.writeln("</html>");d.close();if(!e){var f=a.document.createElement("div");f.marginLeft="26px";f.marginTop="26px";mxUtils.write(f,mxResources.get("updatingDocument"));e=a.document.createElement("img");e.setAttribute("src",window.location.protocol+"//"+window.location.hostname+"/"+IMAGE_PATH+"/spin.gif");e.style.marginLeft="6px";f.appendChild(e);a.document.body.insertBefore(f,a.document.body.firstChild);
window.setTimeout(function(){var a=document.createElement("script");a.type="text/javascript";a.src=/<script.*?src="(.*?)"/.exec(c)[1];d.body.appendChild(a);f.parentNode.removeChild(f)},20)}});a.showDialog(d.container,440,240,!0,!0);d.init()}))})})}));a.actions.put("liveImage",new Action("Live image...",function(){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(b){a.spinner.stop();null!=b?(b=encodeURIComponent(b),b=new EmbedDialog(a,EXPORT_URL+"?format=png&url="+
b,0),a.showDialog(b.container,440,240,!0,!0),b.init()):a.handleError({message:mxResources.get("invalidPublicUrl")})})}));a.actions.put("embedImage",new Action(mxResources.get("image")+"...",function(){a.showEmbedImageDialog(function(b,c,d,e,f,g){a.spinner.spin(document.body,mxResources.get("loading"))&&a.createEmbedImage(b,c,d,e,f,g,function(b){a.spinner.stop();b=new EmbedDialog(a,b);a.showDialog(b.container,440,240,!0,!0);b.init()},function(b){a.spinner.stop();a.handleError(b)})},mxResources.get("image"),
@@ -8723,10 +8722,10 @@ var c="0"!=urlParams.pages||null!=a.pages&&1<a.pages.length?a.getFileData(!0):mx
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"):
-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,n){f=g?Math.min(1,Math.min(a.maxImageSize/l,a.maxImageSize/n)):1;a.importFile(b,c,
-h,k,Math.round(l*f),Math.round(n*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)?
-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):n&&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):l&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+
+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)?
+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")+
"...)",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,
@@ -8736,21 +8735,21 @@ DriveFile||b.constructor==StorageFile?mxResources.get("diagramName"):null,functi
b.constructor==DriveFile?(c=new CreateDialog(a,c,mxUtils.bind(this,function(c,d){"download"==d&&(d=App.MODE_GOOGLE);null!=c&&0<c.length&&(d==App.MODE_GOOGLE?a.spinner.spin(document.body,mxResources.get("saving"))&&b.saveAs(c,mxUtils.bind(this,function(c){b.desc=c;b.save(!1,mxUtils.bind(this,function(){a.spinner.stop();b.setModified(!1);b.addAllSavedStatus()}),mxUtils.bind(this,function(b){a.handleError(b)}))}),mxUtils.bind(this,function(b){a.handleError(b)})):a.createFile(c,a.getFileData(!0),null,
d))}),mxUtils.bind(this,function(){a.hideDialog()}),mxResources.get("makeCopy"),mxResources.get("create"),null,null,null,null,!0),a.showDialog(c.container,420,380,!0,!0),c.init()):a.editor.editAsNew(this.editorUi.getFileData(!0),c)}}));a.actions.addAction("moveToFolder...",mxUtils.bind(this,function(){var b=a.getCurrentFile();b.getMode()!=App.MODE_GOOGLE&&b.getMode()!=App.MODE_ONEDRIVE||a.pickFolder(b.getMode(),mxUtils.bind(this,function(c){a.spinner.spin(document.body,mxResources.get("moving"))&&
b.move(c,mxUtils.bind(this,function(b){a.spinner.stop()}),mxUtils.bind(this,function(b){a.handleError(b)}))}))}));this.put("publish",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,["publishLink"],b)})));a.actions.put("useOffline",new Action(mxResources.get("useOffline")+"...",function(){a.openLink("https://app.draw.io/")}));a.actions.put("downloadDesktop",new Action(mxResources.get("downloadDesktop")+"...",function(){a.openLink("https://get.draw.io/")}));this.editorUi.actions.addAction("share...",
-mxUtils.bind(this,function(){var a=this.editorUi.getCurrentFile();null!=a&&this.editorUi.drive.showPermissions(a.getId())}));this.put("embed",new Menu(mxUtils.bind(this,function(b,c){"1"==urlParams.test&&this.addMenuItems(b,["liveImage","-"],c);this.addMenuItems(b,["embedImage","embedSvg","-","embedHtml"],c);navigator.standalone||a.isOffline()||this.addMenuItems(b,["embedIframe"],c);a.isOffline()||this.addMenuItems(b,["-","googleDocs","googleSlides","googleSites"],c)})));var t=function(b,c,d,e){("plantUml"!=
+mxUtils.bind(this,function(){var a=this.editorUi.getCurrentFile();null!=a&&this.editorUi.drive.showPermissions(a.getId())}));this.put("embed",new Menu(mxUtils.bind(this,function(b,c){"1"==urlParams.test&&this.addMenuItems(b,["liveImage","-"],c);this.addMenuItems(b,["embedImage","embedSvg","-","embedHtml"],c);navigator.standalone||a.isOffline()||this.addMenuItems(b,["embedIframe"],c);a.isOffline()||this.addMenuItems(b,["-","googleDocs","googleSlides","googleSites"],c)})));var u=function(b,c,d,e){("plantUml"!=
e||EditorUi.enablePlantUml&&!a.isOffline())&&b.addItem(d,null,mxUtils.bind(this,function(){if("fromText"==e||"formatSql"==e||"plantUml"==e){var b=new ParseDialog(a,d,e);a.showDialog(b.container,620,420,!0,!1);a.dialog.container.style.overflow="auto"}else b=new CreateGraphDialog(a,d,e),a.showDialog(b.container,620,420,!0,!1);b.init()}),c)},v=function(a,b,c,e){var f=d.isMouseInsertPoint()?d.getInsertPoint():d.getFreeInsertPoint();a=new mxCell(a,new mxGeometry(f.x,f.y,b,c),e);a.vertex=!0;d.getModel().beginUpdate();
try{a=d.addCell(a),d.fireEvent(new mxEventObject("cellsInserted","cells",[a]))}finally{d.getModel().endUpdate()}d.scrollCellToVisible(a);d.setSelectionCell(a);d.container.focus();d.editAfterInsert&&d.startEditing(a);return a};a.actions.addAction("insertText",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&d.startEditingAtCell(v("Text",40,20,"text;html=1;resizable=0;autosize=1;align=center;verticalAlign=middle;points=[];fillColor=none;strokeColor=none;rounded=0;"))},null,null,Editor.ctrlKey+
"+Shift+X").isEnabled=e;a.actions.addAction("insertRectangle",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&v("",120,60,"whiteSpace=wrap;html=1;")},null,null,Editor.ctrlKey+"+K").isEnabled=e;a.actions.addAction("insertEllipse",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&v("",80,80,"ellipse;whiteSpace=wrap;html=1;")},null,null,Editor.ctrlKey+"+Shift+K").isEnabled=e;a.actions.addAction("insertRhombus",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&
-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):t(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",
+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):n&&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):l&&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):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"),
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):n&&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):l&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+
+"...",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(){},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):n&&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):l&&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_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")+
"...",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(H){a.handleError(H,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);
@@ -8799,9 +8798,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 n=this.createControlTab(4,
-"&nbsp;&#10095;");n.style.position="absolute";n.style.right=this.editor.chromeless?"0px":"29px";n.style.fontSize="13pt";this.tabContainer.appendChild(n);var l=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));c.style.width=l+"px";mxEvent.addListener(k,"click",mxUtils.bind(this,function(a){c.scrollLeft-=Math.max(20,l-20);mxUtils.setOpacity(k,0<c.scrollLeft?100:50);mxUtils.setOpacity(n,c.scrollLeft<c.scrollWidth-c.clientWidth?100:50);mxEvent.consume(a)}));mxUtils.setOpacity(k,
-0<c.scrollLeft?100:50);mxUtils.setOpacity(n,c.scrollLeft<c.scrollWidth-c.clientWidth?100:50);mxEvent.addListener(n,"click",mxUtils.bind(this,function(a){c.scrollLeft+=Math.max(20,l-20);mxUtils.setOpacity(k,0<c.scrollLeft?100:50);mxUtils.setOpacity(n,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 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()};
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};
@@ -8811,46 +8810,46 @@ 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 n=mxEvent.getClientX(g),l=mxEvent.getClientY(g);k.popup(n,l,null,g);this.setCurrentMenu(k,c)}mxEvent.consume(g)}}))};
+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)}}))};
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,n,l){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=t.view.getState(a),t.view.getState(a),b="tree"==(null!=
-b?b.style:t.getCellStyle(a)).containerType);return b}function d(a){var b=!1;null!=a&&(a=v.getParent(a),b=t.view.getState(a),t.view.getState(a),b=null!=(null!=b?b.style:t.getCellStyle(a)).childLayout);return b}function n(a){a=t.view.getState(a);if(null!=a){var b=t.getIncomingEdges(a.cell);if(0<b.length&&(b=t.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 l(a,b){b=null!=b?b:!0;t.model.beginUpdate();try{var c=t.model.getParent(a),d=t.getIncomingEdges(a),e=t.cloneCells([d[0],a]);t.model.setTerminal(e[0],t.model.getTerminal(d[0],!0),!0);var f=n(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;t.view.currentRoot!=c&&(e[1].geometry.x-=g.x,e[1].geometry.y-=g.y);var h=t.view.getState(a),k=t.view.scale;if(null!=h){var l=mxRectangle.fromRectangle(h);f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?l.x+=(b?a.geometry.width+10:-e[1].geometry.width-10)*k:l.y+=(b?a.geometry.height+10:-e[1].geometry.height-10)*k;var m=t.getOutgoingEdges(t.model.getTerminal(d[0],!0));if(null!=m){for(var p=f==mxConstants.DIRECTION_SOUTH||
-f==mxConstants.DIRECTION_NORTH,v=g=d=0;v<m.length;v++){var q=t.model.getTerminal(m[v],!1);if(f==n(q)){var u=t.view.getState(q);q!=a&&null!=u&&(p&&b!=u.getCenterX()<h.getCenterX()||!p&&b!=u.getCenterY()<h.getCenterY())&&mxUtils.intersects(l,u)&&(d=10+Math.max(d,(Math.min(l.x+l.width,u.x+u.width)-Math.max(l.x,u.x))/k),g=10+Math.max(g,(Math.min(l.y+l.height,u.y+u.height)-Math.max(l.y,u.y))/k))}}p?g=0:d=0;for(v=0;v<m.length;v++)if(q=t.model.getTerminal(m[v],!1),f==n(q)&&(u=t.view.getState(q),q!=a&&null!=
-u&&(p&&b!=u.getCenterX()<h.getCenterX()||!p&&b!=u.getCenterY()<h.getCenterY()))){var A=[];t.traverse(u.cell,!0,function(a,b){null!=b&&A.push(b);A.push(a);return!0});t.moveCells(A,(b?1:-1)*d,(b?1:-1)*g)}}}return t.addCells(e,c)}finally{t.model.endUpdate()}}function f(a){t.model.beginUpdate();try{var b=n(a),c=t.getIncomingEdges(a),d=t.cloneCells([c[0],a]);t.model.setTerminal(c[0],d[1],!1);t.model.setTerminal(d[0],d[1],!0);t.model.setTerminal(d[0],a,!1);var e=t.model.getParent(a),f=e.geometry,g=[];t.view.currentRoot!=
-e&&(d[1].geometry.x-=f.x,d[1].geometry.y-=f.y);t.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);t.moveCells(g,h,k);return t.addCells(d,e)}finally{t.model.endUpdate()}}function h(a){t.model.beginUpdate();try{var b=t.model.getParent(a),c=t.getIncomingEdges(a),d=t.cloneCells([c[0],
-a]);t.model.setTerminal(d[0],a,!0);var c=t.getOutgoingEdges(a),e=b.geometry,f=[];t.view.currentRoot==b&&(e=new mxRectangle);for(var g=0;g<c.length;g++){var h=t.model.getTerminal(c[g],!1);null!=h&&f.push(h)}var k=t.view.getBounds(f),l=n(a),m=t.view.translate,p=t.view.scale;l==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-m.x-e.x+10,d[1].geometry.y+=a.geometry.height-e.y+40):l==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-m.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==k?a.geometry.y+(a.geometry.height-d[1].geometry.height)/2:(k.y+k.height)/p-m.y+-e.y+10);return t.addCells(d,b)}finally{t.model.endUpdate()}}function m(a,b,c){a=t.getOutgoingEdges(a);c=t.view.getState(c);var d=
-[];if(null!=c&&null!=a){for(var e=0;e<a.length;e++){var f=t.view.getState(t.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=n(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=t.getOutgoingEdges(a),null!=d&&0<d.length&&t.setSelectionCell(t.model.getTerminal(d[0],!1))):(c=t.getIncomingEdges(a),null!=c&&0<c.length&&(d=m(t.model.getTerminal(c[0],!0),d,a),c=t.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&&t.setSelectionCell(d[c].cell)))))}var q=this,t=q.editor.graph,v=t.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==t.getSelectionCount()){c=t.getSelectionCell();var e=t.getOutgoingEdges(c);a.addSeparator();null!=e&&0<e.length&&(b(t.getSelectionCell())&&this.addMenuItems(a,["selectChildren"],null,d),this.addMenuItems(a,["selectDescendants"],null,d));b(t.getSelectionCell())&&(a.addSeparator(),0<t.getIncomingEdges(c).length&&
-this.addMenuItems(a,["selectSiblings","selectParent"],null,d))}};q.actions.addAction("selectChildren",function(){if(t.isEnabled()&&1==t.getSelectionCount()){var a=t.getSelectionCell(),a=t.getOutgoingEdges(a);if(null!=a){for(var b=[],c=0;c<a.length;c++)b.push(t.model.getTerminal(a[c],!1));t.setSelectionCells(b)}}},null,null,"Alt+Shift+X");q.actions.addAction("selectSiblings",function(){if(t.isEnabled()&&1==t.getSelectionCount()){var a=t.getSelectionCell(),a=t.getIncomingEdges(a);if(null!=a&&0<a.length&&
-(a=t.getOutgoingEdges(t.model.getTerminal(a[0],!0)),null!=a)){for(var b=[],c=0;c<a.length;c++)b.push(t.model.getTerminal(a[c],!1));t.setSelectionCells(b)}}},null,null,"Alt+Shift+S");q.actions.addAction("selectParent",function(){if(t.isEnabled()&&1==t.getSelectionCount()){var a=t.getSelectionCell(),a=t.getIncomingEdges(a);null!=a&&0<a.length&&t.setSelectionCell(t.model.getTerminal(a[0],!0))}},null,null,"Alt+Shift+P");q.actions.addAction("selectDescendants",function(){if(t.isEnabled()&&1==t.getSelectionCount()){var a=
-t.getSelectionCell(),b=[];t.traverse(a,!0,function(a,c){null!=c&&b.push(c);b.push(a);return!0});t.setSelectionCells(b)}},null,null,"Alt+Shift+D");var u=t.removeCells;t.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)?(t.traverse(g,!0,function(a,b){null!=b&&e.push(b);e.push(a);return!0}),g=t.getIncomingEdges(a[f]),
-a=a.concat(g)):e.push(a[f])}a=e;return u.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=t.duplicateCells;t.duplicateCells=function(a,c){a=null!=a?a:this.getSelectionCells();for(var d=a.slice(0),e=0;e<d.length;e++){var f=t.view.getState(d[e]);if(null!=f&&b(f.cell))for(var g=t.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=t.getIncomingEdges(h[e]),g=t.getIncomingEdges(a[e]);if(0==k.length&&0<g.length){var l=this.cloneCell(g[0]);this.addEdge(l,t.getDefaultParent(),this.model.getTerminal(g[0],!0),h[e])}}}finally{this.model.endUpdate()}return h};var F=t.moveCells;t.moveCells=function(a,c,d,e,f,g,h){var k=null;this.model.beginUpdate();try{var l=f,n=this.view.getState(f),m=null!=n?n.style:this.getCellStyle(f);if(null!=a&&b(f)&&"1"==mxUtils.getValue(m,"treeFolding","0")){for(var p=
-0;p<a.length;p++)if(b(a[p])||t.model.isEdge(a[p])&&null==t.model.getTerminal(a[p],!0)){f=t.model.getParent(a[p]);break}if(null!=l&&f!=l&&null!=this.view.getState(a[0])){var v=t.getIncomingEdges(a[0]);if(0<v.length){var q=t.view.getState(t.model.getTerminal(v[0],!0));if(null!=q){var u=t.view.getState(l);null!=u&&(c=(u.getCenterX()-q.getCenterX())/t.view.scale,d=(u.getCenterY()-q.getCenterY())/t.view.scale)}}}}k=F.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=t.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==t.getIncomingEdges(k[p]).length){n=l;if(null==n||n==t.model.getParent(a[p]))n=t.model.getTerminal(v[0],!0);e=this.cloneCell(v[0]);this.addEdge(e,t.getDefaultParent(),n,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=t.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=t.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(t.isEnabled()&&!t.isEditing()&&b(t.getSelectionCell())&&1==t.getSelectionCount()){var c=null;0<t.getIncomingEdges(t.getSelectionCell()).length&&(9==a.which?c=mxEvent.isShiftDown(a)?f(t.getSelectionCell()):h(t.getSelectionCell()):13==a.which&&(c=l(t.getSelectionCell(),!mxEvent.isShiftDown(a))));if(null!=c&&0<c.length)1==c.length&&t.model.isEdge(c[0])?t.setSelectionCell(t.model.getTerminal(c[0],!1)):t.setSelectionCell(c[c.length-1]),null!=q.hoverIcons&&q.hoverIcons.update(t.view.getState(t.getSelectionCell())),
-t.startEditingAtCell(t.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(t.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(a)):38==a.keyCode?(p(t.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(a)):39==a.keyCode?(p(t.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(a)):40==a.keyCode&&(p(t.getSelectionCell(),mxConstants.DIRECTION_SOUTH),
-mxEvent.consume(a))}}catch(M){console.log("error",M)}mxEvent.isConsumed(a)||z.apply(this,arguments)};var H=t.connectVertex;t.connectVertex=function(a,c,d,e,g,k){var m=t.getIncomingEdges(a);return b(a)&&0<m.length?(d=n(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):l(a,c!=mxConstants.DIRECTION_NORTH&&c!=mxConstants.DIRECTION_WEST)):H.call(this,a,c,d,e,g,k)};t.getSubtree=function(a){var c=[a];b(a)&&
-!d(a)&&t.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=
+"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!=
+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-
+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],
+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=
+[];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");
+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 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()):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())),
+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 H=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)):H.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 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 E=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){E.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;
+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;");
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 c=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;");c.vertex=!0;var d=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");d.geometry.relative=!0;d.edge=!0;b.insertEdge(d,!0);c.insertEdge(d,!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 p=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;");p.vertex=!0;var q=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
-q.geometry.relative=!0;q.edge=!0;b.insertEdge(q,!0);p.insertEdge(q,!1);var t=new mxCell("Branch",new mxGeometry(20,80,72,26),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;");t.vertex=!0;var v=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
-v.geometry.relative=!0;v.edge=!0;b.insertEdge(v,!0);t.insertEdge(v,!1);a.insert(d);a.insert(g);a.insert(q);a.insert(v);a.insert(b);a.insert(c);a.insert(e);a.insert(p);a.insert(t);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap central idea",function(){var a=new mxCell("Central Idea",new mxGeometry(0,0,100,40),"ellipse;whiteSpace=wrap;html=1;align=center;container=1;recursiveResize=0;treeFolding=1;");a.vertex=!0;return sb.createVertexTemplateFromCells([a],
+q.geometry.relative=!0;q.edge=!0;b.insertEdge(q,!0);p.insertEdge(q,!1);var u=new mxCell("Branch",new mxGeometry(20,80,72,26),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;");u.vertex=!0;var v=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
+v.geometry.relative=!0;v.edge=!0;b.insertEdge(v,!0);u.insertEdge(v,!1);a.insert(d);a.insert(g);a.insert(q);a.insert(v);a.insert(b);a.insert(c);a.insert(e);a.insert(p);a.insert(u);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap central idea",function(){var a=new mxCell("Central Idea",new mxGeometry(0,0,100,40),"ellipse;whiteSpace=wrap;html=1;align=center;container=1;recursiveResize=0;treeFolding=1;");a.vertex=!0;return sb.createVertexTemplateFromCells([a],
a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap branch",function(){var a=new mxCell("Branch",new mxGeometry(0,0,80,20),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;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 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",
@@ -8872,8 +8871,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 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 n=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(a,c){null!=c.shortcut&&900>b&&!mxClient.IS_IOS?a.firstChild.nextSibling.setAttribute("title",c.shortcut):n.apply(this,arguments)};var l=App.prototype.updateUserElement;App.prototype.updateUserElement=
-function(){l.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 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"))}};
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,
@@ -8895,7 +8894,7 @@ this.addMenuItems(a,["upload"],c):b.menus.addMenuItems(a,["makeCopy"],c));b.menu
new Menu(mxUtils.bind(this,function(a,c){"1"!=urlParams.embed&&b.menus.addSubmenu("theme",a,c);null!=f&&b.menus.addSubmenu("language",a,c);a.addSeparator(c);b.menus.addMenuItems(a,["scrollbars","tooltips"],c);"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&b.menus.addMenuItems(a,["-","search","scratchpad","-","showStartScreen"],c);!b.isOfflineApp()&&isLocalStorage&&(a.addSeparator(c),b.menus.addMenuItem(a,"plugins",c));a.addSeparator(c)})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,
function(a,c){b.menus.addMenuItems(a,"importText plantUml - formatSql importCsv - createShape editDiagram".split(" "),c)})));mxResources.parse("insertLayout="+mxResources.get("layout"));mxResources.parse("insertAdvanced="+mxResources.get("advanced"));this.put("insert",new Menu(mxUtils.bind(this,function(a,c){b.menus.addMenuItems(a,"insertRectangle insertEllipse insertRhombus - insertText insertLink - insertImage".split(" "),c);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?b.menus.addMenuItems(a,["import"],
c):b.menus.addSubmenu("importFrom",a,c);a.addSeparator(c);b.menus.addSubmenu("insertLayout",a,c);b.menus.addSubmenu("insertAdvanced",a,c)})));var g="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),h=function(a,c,d,e){a.addItem(d,null,mxUtils.bind(this,function(){var a=new CreateGraphDialog(b,d,e);b.showDialog(a.container,620,420,!0,!1);a.init()}),c)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(a,b){for(var c=0;c<g.length;c++)"-"==g[c]?
-a.addSeparator(b):h(a,b,mxResources.get(g[c])+"...",g[c])})));this.put("view",new Menu(mxUtils.bind(this,function(a,c){b.menus.addMenuItems(a,"grid guides - connectionArrows connectionPoints -".split(" "),c);if("undefined"!==typeof MathJax){var d=b.menus.addMenuItem(a,"mathematicalTypesetting",c);b.menus.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000032875")}b.menus.addMenuItems(a,["copyConnect","collapseExpand","-","pageScale"],c)})))};var t=EditorUi.prototype.init;EditorUi.prototype.init=
+a.addSeparator(b):h(a,b,mxResources.get(g[c])+"...",g[c])})));this.put("view",new Menu(mxUtils.bind(this,function(a,c){b.menus.addMenuItems(a,"grid guides - connectionArrows connectionPoints -".split(" "),c);if("undefined"!==typeof MathJax){var d=b.menus.addMenuItem(a,"mathematicalTypesetting",c);b.menus.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000032875")}b.menus.addMenuItems(a,["copyConnect","collapseExpand","-","pageScale"],c)})))};var u=EditorUi.prototype.init;EditorUi.prototype.init=
function(){function a(a,b,c){var d=g.menus.get(a),e=m.addMenu(mxResources.get(a),mxUtils.bind(this,function(){d.funct.apply(this,arguments)}),l);e.className="geMenuItem";e.style.display="inline-block";e.style.boxSizing="border-box";e.style.top="6px";e.style.marginRight="6px";e.style.height="30px";e.style.paddingTop="6px";e.style.paddingBottom="6px";e.style.cursor="pointer";e.setAttribute("title",mxResources.get(a));g.menus.menuCreated(d,e,"geMenuItem");null!=c?(e.style.backgroundImage="url("+c+")",
e.style.backgroundPosition="center center",e.style.backgroundRepeat="no-repeat",e.style.backgroundSize="24px 24px",e.style.width="34px",e.innerHTML=""):b||(e.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",e.style.backgroundPosition="right 6px center",e.style.backgroundRepeat="no-repeat",e.style.paddingRight="22px");return e}function c(a,b,c,d,e,f){var h=document.createElement("a");h.className="geMenuItem";h.style.display="inline-block";h.style.boxSizing="border-box";h.style.height=
"30px";h.style.padding="6px";h.style.position="relative";h.style.verticalAlign="top";h.style.top="0px";null!=g.statusContainer?k.insertBefore(h,g.statusContainer):k.appendChild(h);null!=f?(h.style.backgroundImage="url("+f+")",h.style.backgroundPosition="center center",h.style.backgroundRepeat="no-repeat",h.style.backgroundSize="24px 24px",h.style.width="34px"):mxUtils.write(h,a);mxEvent.addListener(h,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(a){a.preventDefault()}));
@@ -8910,21 +8909,21 @@ d([c("",function(){h.popupMenuHandler.hideMenu();var a=h.view.scale,b=h.view.tra
640<=b?c("",e.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",e,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHptMi41LTRoLTJ2Mkg5di0ySDdWOWgyVjdoMXYyaDJ2MXoiLz48L3N2Zz4="):
null,640<=b?c("",f.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",f,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHpNNyA5aDV2MUg3eiIvPjwvc3ZnPg=="):
null],60)}e=g.menus.get("language");null!=e&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&540<=b?(null==M&&(f=m.addMenu("",e.funct),f.setAttribute("title",mxResources.get("language")),f.className="geToolbarButton",f.style.backgroundImage="url("+Editor.globeImage+")",f.style.backgroundPosition="center center",f.style.backgroundRepeat="no-repeat",f.style.backgroundSize="24px 24px",f.style.position="absolute",f.style.height="24px",f.style.width="24px",f.style.zIndex="1",f.style.top="11px",f.style.right=
-"14px",f.style.cursor="pointer",k.appendChild(f),M=f),g.buttonContainer.style.right="40px"):g.buttonContainer.style.right="14px"}t.apply(this,arguments);var f=document.createElement("div");f.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";f.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(f);var g=this,h=g.editor.graph;g.toolbar=this.createToolbar(g.createDiv("geToolbar"));g.defaultLibraryName=
+"14px",f.style.cursor="pointer",k.appendChild(f),M=f),g.buttonContainer.style.right="40px"):g.buttonContainer.style.right="14px"}u.apply(this,arguments);var f=document.createElement("div");f.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";f.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(f);var g=this,h=g.editor.graph;g.toolbar=this.createToolbar(g.createDiv("geToolbar"));g.defaultLibraryName=
mxResources.get("untitledLibrary");var k=document.createElement("div");k.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 l=null,m=new Menubar(g,k);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 n=g.descriptorChanged;g.descriptorChanged=function(){n.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);k.setAttribute("title",a.getTitle()+(null!=b?" ("+b+")":""))}else k.removeAttribute("title")};
g.setStatusText(g.editor.getStatus());k.appendChild(g.statusContainer);g.buttonContainer=document.createElement("div");g.buttonContainer.style.cssText="position:absolute;right:40px;top:12px;white-space:nowrap;";k.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,p=document.createElement("div");p.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";g.diagramContainer.style.top="47px";var q=g.menus.get("viewZoom");if(null!=q){this.tabContainer.style.right="70px";var D=m.addMenu("100%",q.funct);D.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");D.style.whiteSpace="nowrap";D.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";D.style.backgroundPosition="right 6px center";
-D.style.backgroundRepeat="no-repeat";D.style.backgroundColor="#ffffff";D.style.paddingRight="10px";D.style.display="block";D.style.position="absolute";D.style.textDecoration="none";D.style.textDecoration="none";D.style.right="0px";D.style.bottom="0px";D.style.overflow="hidden";D.style.visibility="hidden";D.style.textAlign="center";D.style.color="#000";D.style.fontSize="12px";D.style.color="#707070";D.style.width="59px";D.style.borderTop="1px solid lightgray";D.style.borderLeft="1px solid lightgray";
-D.style.height=parseInt(g.tabContainer.style.height)-1+"px";D.style.lineHeight=parseInt(g.tabContainer.style.height)+1+"px";p.appendChild(D);q=mxUtils.bind(this,function(){D.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 G=g.setGraphEnabled;g.setGraphEnabled=function(){G.apply(this,arguments);null!=this.tabContainer&&(D.style.visibility=this.tabContainer.style.visibility,
+var f=g.diagramContainer.parentNode,p=document.createElement("div");p.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";g.diagramContainer.style.top="47px";var q=g.menus.get("viewZoom");if(null!=q){this.tabContainer.style.right="70px";var E=m.addMenu("100%",q.funct);E.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");E.style.whiteSpace="nowrap";E.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";E.style.backgroundPosition="right 6px center";
+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 G=g.setGraphEnabled;g.setGraphEnabled=function(){G.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,t=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=[],u=0;u<this.states.length;u++){var w=this.states[u];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 F=0,B=0,y=w=0,z=0,H=0,C=0,E=0,I=5*q;if(1<v.length){v.push(p);v.sort(function(a,b){return a.y-b.y});var A=!1,u=p==v[0],q=p==v[v.length-1];if(!u&&!q)for(u=1;u<v.length-1;u++)if(p==v[u]){q=v[u-1];u=v[u+1];w=B=y=(u.y-q.y-q.height-p.height)/2;break}for(u=0;u<v.length-1;u++){var q=v[u],D=v[u+1],G=p==q||p==D,D=D.y-q.y-q.height,A=A|p==q;if(0==B&&
-0==F)B=D,F=1;else if(Math.abs(B-D)<=(G||1==u&&A?t:0))F+=1;else if(1<F&&A){v=v.slice(0,u+1);break}else if(3<=v.length-u&&!A)F=0,w=B=0!=y?y:0,v.splice(0,0==u?1:u),u=-1;else break;0!=w||G||(B=w=D)}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;u=p==x[0];q=p==x[x.length-1];if(!u&&!q)for(u=1;u<x.length-1;u++)if(p==x[u]){q=x[u-1];u=x[u+1];C=H=E=(u.x-q.x-q.width-p.width)/2;break}for(u=0;u<x.length-1;u++){q=x[u];D=x[u+1];G=p==q||p==D;D=D.x-q.x-q.width;A|=p==
-q;if(0==H&&0==z)H=D,z=1;else if(Math.abs(H-D)<=(G||1==u&&A?t:0))z+=1;else if(1<z&&A){x=x.slice(0,u+1);break}else if(3<=x.length-u&&!A)z=0,C=H=0!=E?E:0,x.splice(0,0==u?1:u),u=-1;else break;0!=C||G||(H=C=D)}3==x.length&&x[1]==p&&(C=0)}t=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};H=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=[];E=m.guidesArrHor;f=[];e=0;u=x[0]==p?1:0;A=x[u].y+x[u].height;if(0<C)for(u=0;u<x.length-1;u++)q=
-x[u],D=x[u+1],p==q?(e=D.x-q.width-C,f.push(new mxPoint(e+q.width+I,A)),f.push(new mxPoint(D.x-I,A))):p==D?(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(D.x-I,A)));else q=x[0],u=x[2],e=q.x+q.width+(u.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(u.x-I,A));for(u=0;u<f.length;u+=2)x=f[u],C=f[u+1],x=t(x,C,null!=E?
-E[u/2]:null),x.node.style.visibility="visible",x.redraw(),z.push(x);for(u=f.length/2;null!=E&&u<E.length;u++)E[u].destroy();m.guidesArrHor=z;e-=b.x;f=!0}else H(!0);if(1<F&&F==v.length-1){z=[];E=m.guidesArrVer;h=[];d=0;u=v[0]==p?1:0;F=v[u].x+v[u].width;if(0<w)for(u=0;u<v.length-1;u++)q=v[u],D=v[u+1],p==q?(d=D.y-q.height-w,h.push(new mxPoint(F,d+q.height+I)),h.push(new mxPoint(F,D.y-I))):p==D?(h.push(new mxPoint(F,q.y+q.height+I)),d=q.y+q.height+w,h.push(new mxPoint(F,d-I))):(h.push(new mxPoint(F,q.y+
-q.height+I)),h.push(new mxPoint(F,D.y-I)));else q=v[0],u=v[2],d=q.y+q.height+(u.y-q.y-q.height-p.height)/2,h.push(new mxPoint(F,q.y+q.height+I)),h.push(new mxPoint(F,d-I)),h.push(new mxPoint(F,d+p.height+I)),h.push(new mxPoint(F,u.y-I));for(u=0;u<h.length;u+=2)x=h[u],C=h[u+1],x=t(x,C,null!=E?E[u/2]:null,!0),x.node.style.visibility="visible",x.redraw(),z.push(x);for(u=h.length/2;null!=E&&u<E.length;u++)E[u].destroy();m.guidesArrVer=z;d-=b.y;h=!0}else H(!1,!0)}if(f||h)return p=new mxPoint(e,d),v=a.call(this,
+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,B=0,y=w=0,z=0,H=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],G=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)<=(G||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||G||(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=H=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];G=p==q||p==E;E=E.x-q.x-q.width;A|=p==
+q;if(0==H&&0==z)H=E,z=1;else if(Math.abs(H-E)<=(G||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=H=0!=F?F:0,x.splice(0,0==t?1:t),t=-1;else break;0!=C||G||(H=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(m.graph.getView().getOverlayPane());return a};H=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<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();m.guidesArrHor=z;e-=b.x;f=!0}else H(!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],C=h[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=h.length/2;null!=F&&t<F.length;t++)F[t].destroy();m.guidesArrVer=z;d-=b.y;h=!0}else H(!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;H(!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}}})();
diff --git a/src/main/webapp/js/atlas-viewer.min.js b/src/main/webapp/js/atlas-viewer.min.js
index fdaee5be..50bf5d38 100644
--- a/src/main/webapp/js/atlas-viewer.min.js
+++ b/src/main/webapp/js/atlas-viewer.min.js
@@ -2023,8 +2023,8 @@ l.appendChild(c);mxUtils.write(l,mxResources.get("gridSize")+":");var g=document
":");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&&
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,b){if(b||g!=document.activeElement&&n!=document.activeElement){a=!1;for(c=0;c<h.length;c++)b=h[c],C?"custom"==b.key&&(q.value=b.key,C=!1):null!=b.format&&("a4"==b.key?826==e.width?(e=mxRectangle.fromRectangle(e),e.width=827):826==e.height&&(e=mxRectangle.fromRectangle(e),e.height=827):"a5"==b.key&&(584==e.width?(e=mxRectangle.fromRectangle(e),e.width=583):584==e.height&&(e=mxRectangle.fromRectangle(e),e.height=583)),e.width==b.format.width&&
-e.height==b.format.height?(q.value=b.key,l.setAttribute("checked","checked"),l.defaultChecked=!0,l.checked=!0,p.removeAttribute("checked"),p.defaultChecked=!1,p.checked=!1,a=!0):e.width==b.format.height&&e.height==b.format.width&&(q.value=b.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"),
+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],C?"custom"==d.key&&(q.value=d.key,C=!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 C=!1;k();a.appendChild(q);mxUtils.br(a);
@@ -2036,20 +2036,20 @@ format:new mxRectangle(0,0,1654,2336)},{key:"a3",title:"A3 (297 mm x 420 mm)",fo
(function(){mxGraphView.prototype.validateBackgroundPage=function(){var a=this.graph;if(null!=a.container&&!a.transparentBackground){if(a.pageVisible){var b=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(b),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!mxClient.IS_QUIRKS,this.backgroundPageShape.dialect=
mxConstants.DIALECT_STRICTHTML,this.backgroundPageShape.init(a.container),c.style.position="absolute",a.container.insertBefore(this.backgroundPageShape.node,c),this.backgroundPageShape.redraw(),this.backgroundPageShape.node.className="geBackgroundPage",mxEvent.addListener(this.backgroundPageShape.node,"dblclick",mxUtils.bind(this,function(c){a.dblClick(c)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(c){a.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(c))}),
mxUtils.bind(this,function(c){null!=a.tooltipHandler&&a.tooltipHandler.isHideOnHover()&&a.tooltipHandler.hide();a.isMouseDown&&!mxEvent.isConsumed(c)&&a.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(c))}),mxUtils.bind(this,function(c){a.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(c))})))}else this.backgroundPageShape.scale=1,this.backgroundPageShape.bounds=b,this.backgroundPageShape.redraw()}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape=
-null);this.validateBackgroundStyles()}};mxGraphView.prototype.validateBackgroundStyles=function(){var a=this.graph,b=null==a.background||a.background==mxConstants.NONE?a.defaultPageBackgroundColor:a.background,c=null!=b&&this.gridColor!=b.toLowerCase()?this.gridColor:"#ffffff",f="none",d="";if(a.isGridEnabled()){d=10;mxClient.IS_SVG?(f=unescape(encodeURIComponent(this.createSvgGrid(c))),f=window.btoa?btoa(f):Base64.encode(f,!0),f="url(data:image/svg+xml;base64,"+f+")",d=a.gridSize*this.scale*this.gridSteps):
-f="url("+this.gridImage+")";var e=c=0;null!=a.view.backgroundPageShape&&(e=this.getBackgroundPageBounds(),c=1+e.x,e=1+e.y);d=-Math.round(d-mxUtils.mod(this.translate.x*this.scale-c,d))+"px "+-Math.round(d-mxUtils.mod(this.translate.y*this.scale-e,d))+"px"}c=a.view.canvas;null!=c.ownerSVGElement&&(c=c.ownerSVGElement);null!=a.view.backgroundPageShape?(a.view.backgroundPageShape.node.style.backgroundPosition=d,a.view.backgroundPageShape.node.style.backgroundImage=f,a.view.backgroundPageShape.node.style.backgroundColor=
-b,a.container.className="geDiagramContainer geDiagramBackdrop",c.style.backgroundImage="none",c.style.backgroundColor=""):(a.container.className="geDiagramContainer",c.style.backgroundPosition=d,c.style.backgroundColor=b,c.style.backgroundImage=f)};mxGraphView.prototype.createSvgGrid=function(a){for(var b=this.graph.gridSize*this.scale;b<this.minGridSize;)b*=2;for(var c=this.gridSteps*b,f=[],d=1;d<this.gridSteps;d++){var e=d*b;f.push("M 0 "+e+" L "+c+" "+e+" M "+e+" 0 L "+e+" "+c)}return'<svg width="'+
-c+'" height="'+c+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+c+'" height="'+c+'" patternUnits="userSpaceOnUse"><path d="'+f.join(" ")+'" fill="none" stroke="'+a+'" opacity="0.2" stroke-width="1"/><path d="M '+c+" 0 L 0 0 0 "+c+'" fill="none" stroke="'+a+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var a=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(b,d){a.apply(this,arguments);if(null!=this.shiftPreview1){var c=
-this.view.canvas;null!=c.ownerSVGElement&&(c=c.ownerSVGElement);var f=this.gridSize*this.view.scale*this.view.gridSteps,f=-Math.round(f-mxUtils.mod(this.view.translate.x*this.view.scale+b,f))+"px "+-Math.round(f-mxUtils.mod(this.view.translate.y*this.view.scale+d,f))+"px";c.style.backgroundPosition=f}};mxGraph.prototype.updatePageBreaks=function(a,b,c){var f=this.view.scale,d=this.view.translate,e=this.pageFormat,r=f*this.pageScale,h=this.view.getBackgroundPageBounds();b=h.width;c=h.height;var m=
-new mxRectangle(f*d.x,f*d.y,e.width*r,e.height*r),k=(a=a&&Math.min(m.width,m.height)>this.minPageBreakDist)?Math.ceil(c/m.height)-1:0,v=a?Math.ceil(b/m.width)-1:0,q=h.x+b,x=h.y+c;null==this.horizontalPageBreaks&&0<k&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<v&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var c=a==this.horizontalPageBreaks?k:v,b=0;b<=c;b++){var d=a==this.horizontalPageBreaks?[new mxPoint(Math.round(h.x),Math.round(h.y+(b+1)*m.height)),
-new mxPoint(Math.round(q),Math.round(h.y+(b+1)*m.height))]:[new mxPoint(Math.round(h.x+(b+1)*m.width),Math.round(h.y)),new mxPoint(Math.round(h.x+(b+1)*m.width),Math.round(x))];null!=a[b]?(a[b].points=d,a[b].redraw()):(d=new mxPolyline(d,this.pageBreakColor),d.dialect=this.dialect,d.isDashed=this.pageBreakDashed,d.pointerEvents=!1,d.init(this.view.backgroundPane),d.redraw(),a[b]=d)}for(b=c;b<a.length;b++)a[b].destroy();a.splice(c,a.length-c)}});a(this.horizontalPageBreaks);a(this.verticalPageBreaks)};
-var b=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(a,d,c){for(var f=0;f<d.length;f++)if(this.graph.getModel().isVertex(d[f])){var g=this.graph.getCellGeometry(d[f]);if(null!=g&&g.relative)return!1}return b.apply(this,arguments)};var e=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var a=e.apply(this,arguments);a.intersects=mxUtils.bind(this,function(b,c){return this.isConnecting()?
-!0:mxCellMarker.prototype.intersects.apply(a,arguments)});return a};mxGraphView.prototype.createBackgroundPageShape=function(a){return new mxRectangleShape(a,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var a=this.getGraphBounds(),b=0<a.width?a.x/this.scale-this.translate.x:0,c=0<a.height?a.y/this.scale-this.translate.y:0,d=this.graph.pageFormat,g=this.graph.pageScale,e=d.width*g,d=d.height*g,g=Math.floor(Math.min(0,b)/e),r=Math.floor(Math.min(0,
-c)/d);return new mxRectangle(this.scale*(this.translate.x+g*e),this.scale*(this.translate.y+r*d),this.scale*(Math.ceil(Math.max(1,b+a.width/this.scale)/e)-g)*e,this.scale*(Math.ceil(Math.max(1,c+a.height/this.scale)/d)-r)*d)};var d=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(a,b){d.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=
-a+"px",this.view.backgroundPageShape.node.style.marginTop=b+"px")};var k=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(a,b,c,d,g,e){var f=k.apply(this,arguments);null==e||e||mxEvent.addListener(f,"mousedown",function(a){mxEvent.consume(a)});return f};var l=mxGraphHandler.prototype.getInitialCellForEvent;mxGraphHandler.prototype.getInitialCellForEvent=function(a){var b=this.graph.getModel(),c=b.getParent(this.graph.getSelectionCell()),d=l.apply(this,arguments),g=b.getParent(d);
-if(null==c||c!=d&&c!=g)for(;!this.graph.isCellSelected(d)&&!this.graph.isCellSelected(g)&&b.isVertex(g)&&!this.graph.isContainer(g);)d=g,g=this.graph.getModel().getParent(d);return d};var p=mxGraphHandler.prototype.isDelayedSelection;mxGraphHandler.prototype.isDelayedSelection=function(a,b){var c=p.apply(this,arguments);if(!c)for(var d=this.graph.getModel(),g=d.getParent(a);null!=g;){if(this.graph.isCellSelected(g)&&d.isVertex(g)){c=!0;break}g=d.getParent(g)}return c};mxGraphHandler.prototype.selectDelayed=
-function(a){if(!this.graph.popupMenuHandler.isPopupTrigger(a)){var b=a.getCell();null==b&&(b=this.cell);var c=this.graph.view.getState(b);if(null==c||!a.isSource(c.control))for(var c=this.graph.getModel(),d=c.getParent(b);!this.graph.isCellSelected(d)&&c.isVertex(d);)b=d,d=c.getParent(b);this.graph.selectCellForEvent(b,a.getEvent())}};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(a){a=a.getCell();for(var b=this.graph.getModel(),c=b.getParent(a);b.isVertex(c)&&!this.graph.isContainer(c);)this.graph.isCellSelected(c)&&
-(a=c),c=b.getParent(c);return a}})();EditorUi=function(a,b,e){mxEventSource.call(this);this.destroyFunctions=[];this.editor=a||new Editor;this.container=b||document.body;var d=this.editor.graph;d.lightbox=e;d.useCssTransforms&&(this.lazyZoomDelay=0);mxClient.IS_SVG?mxPopupMenu.prototype.submenuImage="data:image/gif;base64,R0lGODlhCQAJAIAAAP///zMzMyH5BAEAAAAALAAAAAAJAAkAAAIPhI8WebHsHopSOVgb26AAADs=":(new Image).src=mxPopupMenu.prototype.submenuImage;mxClient.IS_SVG||null==mxConnectionHandler.prototype.connectImage||((new Image).src=mxConnectionHandler.prototype.connectImage.src);
+null);this.validateBackgroundStyles()}};mxGraphView.prototype.validateBackgroundStyles=function(){var a=this.graph,b=null==a.background||a.background==mxConstants.NONE?a.defaultPageBackgroundColor:a.background,c=null!=b&&this.gridColor!=b.toLowerCase()?this.gridColor:"#ffffff",d="none",g="";if(a.isGridEnabled()){g=10;mxClient.IS_SVG?(d=unescape(encodeURIComponent(this.createSvgGrid(c))),d=window.btoa?btoa(d):Base64.encode(d,!0),d="url(data:image/svg+xml;base64,"+d+")",g=a.gridSize*this.scale*this.gridSteps):
+d="url("+this.gridImage+")";var e=c=0;null!=a.view.backgroundPageShape&&(e=this.getBackgroundPageBounds(),c=1+e.x,e=1+e.y);g=-Math.round(g-mxUtils.mod(this.translate.x*this.scale-c,g))+"px "+-Math.round(g-mxUtils.mod(this.translate.y*this.scale-e,g))+"px"}c=a.view.canvas;null!=c.ownerSVGElement&&(c=c.ownerSVGElement);null!=a.view.backgroundPageShape?(a.view.backgroundPageShape.node.style.backgroundPosition=g,a.view.backgroundPageShape.node.style.backgroundImage=d,a.view.backgroundPageShape.node.style.backgroundColor=
+b,a.container.className="geDiagramContainer geDiagramBackdrop",c.style.backgroundImage="none",c.style.backgroundColor=""):(a.container.className="geDiagramContainer",c.style.backgroundPosition=g,c.style.backgroundColor=b,c.style.backgroundImage=d)};mxGraphView.prototype.createSvgGrid=function(a){for(var d=this.graph.gridSize*this.scale;d<this.minGridSize;)d*=2;for(var c=this.gridSteps*d,b=[],g=1;g<this.gridSteps;g++){var e=g*d;b.push("M 0 "+e+" L "+c+" "+e+" M "+e+" 0 L "+e+" "+c)}return'<svg width="'+
+c+'" height="'+c+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+c+'" height="'+c+'" patternUnits="userSpaceOnUse"><path d="'+b.join(" ")+'" fill="none" stroke="'+a+'" opacity="0.2" stroke-width="1"/><path d="M '+c+" 0 L 0 0 0 "+c+'" fill="none" stroke="'+a+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var a=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(d,b){a.apply(this,arguments);if(null!=this.shiftPreview1){var c=
+this.view.canvas;null!=c.ownerSVGElement&&(c=c.ownerSVGElement);var f=this.gridSize*this.view.scale*this.view.gridSteps,f=-Math.round(f-mxUtils.mod(this.view.translate.x*this.view.scale+d,f))+"px "+-Math.round(f-mxUtils.mod(this.view.translate.y*this.view.scale+b,f))+"px";c.style.backgroundPosition=f}};mxGraph.prototype.updatePageBreaks=function(a,d,c){var b=this.view.scale,g=this.view.translate,e=this.pageFormat,r=b*this.pageScale,h=this.view.getBackgroundPageBounds();d=h.width;c=h.height;var m=
+new mxRectangle(b*g.x,b*g.y,e.width*r,e.height*r),k=(a=a&&Math.min(m.width,m.height)>this.minPageBreakDist)?Math.ceil(c/m.height)-1:0,v=a?Math.ceil(d/m.width)-1:0,q=h.x+d,x=h.y+c;null==this.horizontalPageBreaks&&0<k&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<v&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var c=a==this.horizontalPageBreaks?k:v,d=0;d<=c;d++){var b=a==this.horizontalPageBreaks?[new mxPoint(Math.round(h.x),Math.round(h.y+(d+1)*m.height)),
+new mxPoint(Math.round(q),Math.round(h.y+(d+1)*m.height))]:[new mxPoint(Math.round(h.x+(d+1)*m.width),Math.round(h.y)),new mxPoint(Math.round(h.x+(d+1)*m.width),Math.round(x))];null!=a[d]?(a[d].points=b,a[d].redraw()):(b=new mxPolyline(b,this.pageBreakColor),b.dialect=this.dialect,b.isDashed=this.pageBreakDashed,b.pointerEvents=!1,b.init(this.view.backgroundPane),b.redraw(),a[d]=b)}for(d=c;d<a.length;d++)a[d].destroy();a.splice(c,a.length-c)}});a(this.horizontalPageBreaks);a(this.verticalPageBreaks)};
+var b=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(a,d,c){for(var f=0;f<d.length;f++)if(this.graph.getModel().isVertex(d[f])){var g=this.graph.getCellGeometry(d[f]);if(null!=g&&g.relative)return!1}return b.apply(this,arguments)};var e=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var a=e.apply(this,arguments);a.intersects=mxUtils.bind(this,function(d,c){return this.isConnecting()?
+!0:mxCellMarker.prototype.intersects.apply(a,arguments)});return a};mxGraphView.prototype.createBackgroundPageShape=function(a){return new mxRectangleShape(a,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var a=this.getGraphBounds(),d=0<a.width?a.x/this.scale-this.translate.x:0,c=0<a.height?a.y/this.scale-this.translate.y:0,b=this.graph.pageFormat,g=this.graph.pageScale,e=b.width*g,b=b.height*g,g=Math.floor(Math.min(0,d)/e),r=Math.floor(Math.min(0,
+c)/b);return new mxRectangle(this.scale*(this.translate.x+g*e),this.scale*(this.translate.y+r*b),this.scale*(Math.ceil(Math.max(1,d+a.width/this.scale)/e)-g)*e,this.scale*(Math.ceil(Math.max(1,c+a.height/this.scale)/b)-r)*b)};var d=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(a,b){d.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=
+a+"px",this.view.backgroundPageShape.node.style.marginTop=b+"px")};var k=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(a,d,c,b,g,e){var f=k.apply(this,arguments);null==e||e||mxEvent.addListener(f,"mousedown",function(a){mxEvent.consume(a)});return f};var l=mxGraphHandler.prototype.getInitialCellForEvent;mxGraphHandler.prototype.getInitialCellForEvent=function(a){var d=this.graph.getModel(),c=d.getParent(this.graph.getSelectionCell()),b=l.apply(this,arguments),g=d.getParent(b);
+if(null==c||c!=b&&c!=g)for(;!this.graph.isCellSelected(b)&&!this.graph.isCellSelected(g)&&d.isVertex(g)&&!this.graph.isContainer(g);)b=g,g=this.graph.getModel().getParent(b);return b};var p=mxGraphHandler.prototype.isDelayedSelection;mxGraphHandler.prototype.isDelayedSelection=function(a,d){var c=p.apply(this,arguments);if(!c)for(var b=this.graph.getModel(),g=b.getParent(a);null!=g;){if(this.graph.isCellSelected(g)&&b.isVertex(g)){c=!0;break}g=b.getParent(g)}return c};mxGraphHandler.prototype.selectDelayed=
+function(a){if(!this.graph.popupMenuHandler.isPopupTrigger(a)){var d=a.getCell();null==d&&(d=this.cell);var c=this.graph.view.getState(d);if(null==c||!a.isSource(c.control))for(var c=this.graph.getModel(),b=c.getParent(d);!this.graph.isCellSelected(b)&&c.isVertex(b);)d=b,b=c.getParent(d);this.graph.selectCellForEvent(d,a.getEvent())}};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(a){a=a.getCell();for(var d=this.graph.getModel(),c=d.getParent(a);d.isVertex(c)&&!this.graph.isContainer(c);)this.graph.isCellSelected(c)&&
+(a=c),c=d.getParent(c);return a}})();EditorUi=function(a,b,e){mxEventSource.call(this);this.destroyFunctions=[];this.editor=a||new Editor;this.container=b||document.body;var d=this.editor.graph;d.lightbox=e;d.useCssTransforms&&(this.lazyZoomDelay=0);mxClient.IS_SVG?mxPopupMenu.prototype.submenuImage="data:image/gif;base64,R0lGODlhCQAJAIAAAP///zMzMyH5BAEAAAAALAAAAAAJAAkAAAIPhI8WebHsHopSOVgb26AAADs=":(new Image).src=mxPopupMenu.prototype.submenuImage;mxClient.IS_SVG||null==mxConnectionHandler.prototype.connectImage||((new Image).src=mxConnectionHandler.prototype.connectImage.src);
this.editor.chromeless&&!this.editor.editable&&(this.footerHeight=0,d.isEnabled=function(){return!1},d.panningHandler.isForcePanningEvent=function(a){return!mxEvent.isPopupTrigger(a.getEvent())});this.actions=new Actions(this);this.menus=this.createMenus();this.createDivs();this.createUi();this.refresh();var k=mxUtils.bind(this,function(a){null==a&&(a=window.event);return this.isSelectionAllowed(a)||d.isEditing()});this.container==document.body&&(this.menubarContainer.onselectstart=k,this.menubarContainer.onmousedown=
k,this.toolbarContainer.onselectstart=k,this.toolbarContainer.onmousedown=k,this.diagramContainer.onselectstart=k,this.diagramContainer.onmousedown=k,this.sidebarContainer.onselectstart=k,this.sidebarContainer.onmousedown=k,this.formatContainer.onselectstart=k,this.formatContainer.onmousedown=k,this.footerContainer.onselectstart=k,this.footerContainer.onmousedown=k,null!=this.tabContainer&&(this.tabContainer.onselectstart=k));!this.editor.chromeless||this.editor.editable?(b=function(a){var c=mxEvent.getSource(a);
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();
@@ -2206,8 +2206,8 @@ this.getRubberband=function(){return g};var n=(new Date).getTime(),r=0,h=this.co
"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 C=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&
(C=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=C)}));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,e){e=null!=e?e:[];if(0<b||0<d){var g=this.getModel(),h=a+b,n=c+d;null==f&&(f=this.getCurrentRoot(),null==f&&(f=g.getRoot()));if(null!=f)for(var m=g.getChildCount(f),H=0;H<m;H++){var r=g.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));(g.isEdge(r)||g.isVertex(r))&&t.x>=a&&t.y+t.height<=n&&t.y>=c&&t.x+t.width<=h&&e.push(r);this.getAllCells(a,c,b,d,r,e)}}}return e};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.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 D=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,c){if("mouseDown"==c.getProperty("eventName")){var b=c.getProperty("event").getState();D=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!=D?this.addSelectionCells(D):1<this.getSelectionCount()&&this.isCellSelected(d)&&this.removeSelectionCell(d);D=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)};
@@ -2304,8 +2304,8 @@ HoverIcons.prototype.getState=function(a){if(null!=a){a=a.cell;if(!this.graph.ge
HoverIcons.prototype.update=function(a,b,e){if(this.graph.connectionArrowsEnabled){var d=null;this.prev!=a||this.isActive()?(this.startTime=(new Date).getTime(),this.prev=a,d=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=a&&(this.updateThread=window.setTimeout(mxUtils.bind(this,function(){this.isActive()||this.graph.isMouseDown||this.graph.panningHandler.isActive()||(this.prev=a,this.update(a,b,e))}),this.updateDelay+10))):null!=this.startTime&&(d=(new Date).getTime()-this.startTime);
this.setDisplay("");null!=this.currentState&&this.currentState!=a&&d<this.activationDelay&&null!=this.bbox&&!mxUtils.contains(this.bbox,b,e)?this.reset(!1):(null!=this.currentState||d>this.activationDelay)&&this.currentState!=a&&(d>this.updateDelay&&null!=a||null==this.bbox||null==b||null==e||!mxUtils.contains(this.bbox,b,e))&&(null!=a&&this.graph.isEnabled()?(this.removeNodes(),this.setCurrentState(a),this.repaint(),this.graph.connectionHandler.constraintHandler.currentFocus!=a&&this.graph.connectionHandler.constraintHandler.reset()):
this.reset())}else this.reset()};HoverIcons.prototype.setCurrentState=function(a){"eastwest"!=a.style.portConstraint&&(this.graph.container.appendChild(this.arrowUp),this.graph.container.appendChild(this.arrowDown));this.graph.container.appendChild(this.arrowRight);this.graph.container.appendChild(this.arrowLeft);this.currentState=a};
-(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 f=this.getState(a);null!=f&&this.graph.model.isEdge(f.cell)&&null!=f.style&&1!=f.style[mxConstants.STYLE_CURVED]&&!f.invalid&&this.updateLineJumps(f)&&this.graph.cellRenderer.redraw(f,!1,this.isRendering());f=b.apply(this,arguments);null!=
-f&&this.graph.model.isEdge(f.cell)&&1!=f.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(f);return f};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]&&
+(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=
@@ -2343,66 +2343,66 @@ this.view.invalidate(c[b],!1,!1)}}};Graph.prototype.replaceElement=function(a,c)
if(null!=e&&0<e.length){d.innerHTML=e;for(var g=d.getElementsByTagName(null!=b?b:"*"),h=0;h<g.length;h++)c(g[h]);d.innerHTML!=e&&this.cellLabelChanged(a[f],d.innerHTML)}}};Graph.prototype.cellLabelChanged=function(a,c,b){c=this.zapGremlins(c);this.model.beginUpdate();try{if(null!=a.value&&"object"==typeof a.value){if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder"))for(var d=a.getAttribute("placeholder"),f=a;null!=f;){if(f==this.model.getRoot()||null!=f.value&&"object"==typeof f.value&&
f.hasAttribute(d)){this.setAttributeForCell(f,d,c);break}f=this.model.getParent(f)}var e=a.value.cloneNode(!0);e.setAttribute("label",c);c=e}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(a){if(null!=a){for(var c=new mxDictionary,b=0;b<a.length;b++)c.put(a[b],!0);for(var d=[],b=0;b<a.length;b++){var f=this.model.getParent(a[b]);null==f||c.get(f)||(c.put(f,!0),d.push(f))}for(b=0;b<d.length;b++)if(f=this.view.getState(d[b]),
null!=f&&(this.model.isEdge(f.cell)||this.model.isVertex(f.cell))&&this.isCellDeletable(f.cell)){var e=mxUtils.getValue(f.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),g=mxUtils.getValue(f.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);if(e==mxConstants.NONE&&g==mxConstants.NONE){e=!0;for(g=0;g<this.model.getChildCount(f.cell)&&e;g++)c.get(this.model.getChildAt(f.cell,g))||(e=!1);e&&a.push(f.cell)}}}mxGraph.prototype.cellsRemoved.apply(this,arguments)};Graph.prototype.removeCellsAfterUngroup=
-function(a){for(var c=[],b=0;b<a.length;b++)if(this.isCellDeletable(a[b])){var f=this.view.getState(a[b]);if(null!=f){var d=mxUtils.getValue(f.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),f=mxUtils.getValue(f.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);d==mxConstants.NONE&&f==mxConstants.NONE&&c.push(a[b])}}a=c;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(a,c){this.setAttributeForCell(a,"link",c)};Graph.prototype.setTooltipForCell=
-function(a,c){this.setAttributeForCell(a,"tooltip",c)};Graph.prototype.setAttributeForCell=function(a,c,b){var f;null!=a.value&&"object"==typeof a.value?f=a.value.cloneNode(!0):(f=mxUtils.createXmlDocument().createElement("UserObject"),f.setAttribute("label",a.value||""));null!=b&&0<b.length?f.setAttribute(c,b):f.removeAttribute(c);this.model.setValue(a,f)};Graph.prototype.getDropTarget=function(a,c,b,f){this.getModel();if(mxEvent.isAltDown(c))return null;for(var d=0;d<a.length;d++)if(this.model.isEdge(this.model.getParent(a[d])))return null;
-return mxGraph.prototype.getDropTarget.apply(this,arguments)};Graph.prototype.click=function(a){mxGraph.prototype.click.call(this,a);this.firstClickState=a.getState();this.firstClickSource=a.getSource()};Graph.prototype.dblClick=function(a,c){if(this.isEnabled()){var b=mxUtils.convertPoint(this.container,mxEvent.getClientX(a),mxEvent.getClientY(a));if(null!=a&&!this.model.isVertex(c)){var f=this.model.isEdge(c)?this.view.getState(c):null,d=mxEvent.getSource(a);this.firstClickState!=f||this.firstClickSource!=
-d||null!=f&&null!=f.text&&null!=f.text.node&&(mxUtils.contains(f.text.boundingBox,b.x,b.y)||mxUtils.isAncestorNode(f.text.node,mxEvent.getSource(a)))||(null!=f||this.isCellLocked(this.getDefaultParent()))&&(null==f||this.isCellLocked(f.cell))||!(null!=f||mxClient.IS_VML&&d==this.view.getCanvas()||mxClient.IS_SVG&&d==this.view.getCanvas().ownerSVGElement)||(c=this.addText(b.x,b.y,f))}mxGraph.prototype.dblClick.call(this,a,c)}};Graph.prototype.getInsertPoint=function(){var a=this.getGridSize(),c=this.container.scrollLeft/
-this.view.scale-this.view.translate.x,b=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible)var f=this.getPageLayout(),d=this.getPageSize(),c=Math.max(c,f.x*d.width),b=Math.max(b,f.y*d.height);return new mxPoint(this.snap(c+a),this.snap(b+a))};Graph.prototype.getFreeInsertPoint=function(){var a=this.view,c=this.getGraphBounds(),b=this.getInsertPoint(),f=this.snap(Math.round(Math.max(b.x,c.x/a.scale-a.translate.x+(0==c.width?2*this.gridSize:0)))),a=this.snap(Math.round(Math.max(b.y,
-(c.y+c.height)/a.scale-a.translate.y+2*this.gridSize)));return new mxPoint(f,a)};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.addText=function(a,c,b){var f=new mxCell;f.value="Text";f.style="text;html=1;resizable=0;points=[];";f.geometry=new mxGeometry(0,0,0,0);f.vertex=!0;if(null!=b){f.style+="align=center;verticalAlign=middle;labelBackgroundColor=#ffffff;";f.geometry.relative=!0;f.connectable=!1;var d=this.view.getRelativePoint(b,a,c);f.geometry.x=Math.round(1E4*d.x)/
-1E4;f.geometry.y=Math.round(d.y);f.geometry.offset=new mxPoint(0,0);var d=this.view.getPoint(b,f.geometry),e=this.view.scale;f.geometry.offset=new mxPoint(Math.round((a-d.x)/e),Math.round((c-d.y)/e))}else f.style+="autosize=1;align=left;verticalAlign=top;spacingTop=-4;",d=this.view.translate,f.geometry.width=40,f.geometry.height=20,f.geometry.x=Math.round(a/this.view.scale)-d.x,f.geometry.y=Math.round(c/this.view.scale)-d.y;this.getModel().beginUpdate();try{this.addCells([f],null!=b?b.cell:null),
-this.fireEvent(new mxEventObject("textInserted","cells",[f])),this.autoSizeCell(f)}finally{this.getModel().endUpdate()}return f};Graph.prototype.getAbsoluteUrl=function(a){null!=a&&this.isRelativeUrl(a)&&(a="#"==a.charAt(0)?this.baseUrl+a:"/"==a.charAt(0)?this.domainUrl+a:this.domainPathUrl+a);return a};Graph.prototype.addClickHandler=function(a,c,b){var f=mxUtils.bind(this,function(){var a=this.container.getElementsByTagName("a");if(null!=a)for(var b=0;b<a.length;b++){var f=this.getAbsoluteUrl(a[b].getAttribute("href"));
-null!=f&&(a[b].setAttribute("rel",this.linkRelation),a[b].setAttribute("href",f),null!=c&&mxEvent.addGestureListeners(a[b],null,null,c))}});this.model.addListener(mxEvent.CHANGE,f);f();var d=this.container.style.cursor,e=this.getTolerance(),g=this,h={currentState:null,currentLink:null,highlight:null!=a&&""!=a&&a!=mxConstants.NONE?new mxCellHighlight(g,a,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(a){var c=a.sourceState;if(null==c||null==g.getLinkForCell(c.cell))a=
+function(a){for(var c=[],b=0;b<a.length;b++)if(this.isCellDeletable(a[b])){var d=this.view.getState(a[b]);if(null!=d){var f=mxUtils.getValue(d.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),d=mxUtils.getValue(d.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);f==mxConstants.NONE&&d==mxConstants.NONE&&c.push(a[b])}}a=c;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(a,c){this.setAttributeForCell(a,"link",c)};Graph.prototype.setTooltipForCell=
+function(a,c){this.setAttributeForCell(a,"tooltip",c)};Graph.prototype.setAttributeForCell=function(a,c,b){var d;null!=a.value&&"object"==typeof a.value?d=a.value.cloneNode(!0):(d=mxUtils.createXmlDocument().createElement("UserObject"),d.setAttribute("label",a.value||""));null!=b&&0<b.length?d.setAttribute(c,b):d.removeAttribute(c);this.model.setValue(a,d)};Graph.prototype.getDropTarget=function(a,c,b,d){this.getModel();if(mxEvent.isAltDown(c))return null;for(var f=0;f<a.length;f++)if(this.model.isEdge(this.model.getParent(a[f])))return null;
+return mxGraph.prototype.getDropTarget.apply(this,arguments)};Graph.prototype.click=function(a){mxGraph.prototype.click.call(this,a);this.firstClickState=a.getState();this.firstClickSource=a.getSource()};Graph.prototype.dblClick=function(a,c){if(this.isEnabled()){var b=mxUtils.convertPoint(this.container,mxEvent.getClientX(a),mxEvent.getClientY(a));if(null!=a&&!this.model.isVertex(c)){var d=this.model.isEdge(c)?this.view.getState(c):null,f=mxEvent.getSource(a);this.firstClickState!=d||this.firstClickSource!=
+f||null!=d&&null!=d.text&&null!=d.text.node&&(mxUtils.contains(d.text.boundingBox,b.x,b.y)||mxUtils.isAncestorNode(d.text.node,mxEvent.getSource(a)))||(null!=d||this.isCellLocked(this.getDefaultParent()))&&(null==d||this.isCellLocked(d.cell))||!(null!=d||mxClient.IS_VML&&f==this.view.getCanvas()||mxClient.IS_SVG&&f==this.view.getCanvas().ownerSVGElement)||(c=this.addText(b.x,b.y,d))}mxGraph.prototype.dblClick.call(this,a,c)}};Graph.prototype.getInsertPoint=function(){var a=this.getGridSize(),c=this.container.scrollLeft/
+this.view.scale-this.view.translate.x,b=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible)var d=this.getPageLayout(),f=this.getPageSize(),c=Math.max(c,d.x*f.width),b=Math.max(b,d.y*f.height);return new mxPoint(this.snap(c+a),this.snap(b+a))};Graph.prototype.getFreeInsertPoint=function(){var a=this.view,c=this.getGraphBounds(),b=this.getInsertPoint(),d=this.snap(Math.round(Math.max(b.x,c.x/a.scale-a.translate.x+(0==c.width?2*this.gridSize:0)))),a=this.snap(Math.round(Math.max(b.y,
+(c.y+c.height)/a.scale-a.translate.y+2*this.gridSize)));return new mxPoint(d,a)};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.addText=function(a,c,b){var d=new mxCell;d.value="Text";d.style="text;html=1;resizable=0;points=[];";d.geometry=new mxGeometry(0,0,0,0);d.vertex=!0;if(null!=b){d.style+="align=center;verticalAlign=middle;labelBackgroundColor=#ffffff;";d.geometry.relative=!0;d.connectable=!1;var f=this.view.getRelativePoint(b,a,c);d.geometry.x=Math.round(1E4*f.x)/
+1E4;d.geometry.y=Math.round(f.y);d.geometry.offset=new mxPoint(0,0);var f=this.view.getPoint(b,d.geometry),e=this.view.scale;d.geometry.offset=new mxPoint(Math.round((a-f.x)/e),Math.round((c-f.y)/e))}else d.style+="autosize=1;align=left;verticalAlign=top;spacingTop=-4;",f=this.view.translate,d.geometry.width=40,d.geometry.height=20,d.geometry.x=Math.round(a/this.view.scale)-f.x,d.geometry.y=Math.round(c/this.view.scale)-f.y;this.getModel().beginUpdate();try{this.addCells([d],null!=b?b.cell:null),
+this.fireEvent(new mxEventObject("textInserted","cells",[d])),this.autoSizeCell(d)}finally{this.getModel().endUpdate()}return d};Graph.prototype.getAbsoluteUrl=function(a){null!=a&&this.isRelativeUrl(a)&&(a="#"==a.charAt(0)?this.baseUrl+a:"/"==a.charAt(0)?this.domainUrl+a:this.domainPathUrl+a);return a};Graph.prototype.addClickHandler=function(a,c,b){var d=mxUtils.bind(this,function(){var a=this.container.getElementsByTagName("a");if(null!=a)for(var b=0;b<a.length;b++){var d=this.getAbsoluteUrl(a[b].getAttribute("href"));
+null!=d&&(a[b].setAttribute("rel",this.linkRelation),a[b].setAttribute("href",d),null!=c&&mxEvent.addGestureListeners(a[b],null,null,c))}});this.model.addListener(mxEvent.CHANGE,d);d();var f=this.container.style.cursor,e=this.getTolerance(),g=this,h={currentState:null,currentLink:null,highlight:null!=a&&""!=a&&a!=mxConstants.NONE?new mxCellHighlight(g,a,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(a){var c=a.sourceState;if(null==c||null==g.getLinkForCell(c.cell))a=
g.getCellAt(a.getGraphX(),a.getGraphY(),null,null,null,function(a,c,b){return null==g.getLinkForCell(a.cell)}),c=g.view.getState(a);c!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=c,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(a,c){this.startX=c.getGraphX();this.startY=c.getGraphY();this.scrollLeft=g.container.scrollLeft;this.scrollTop=g.container.scrollTop;null==this.currentLink&&"auto"==g.container.style.overflow&&(g.container.style.cursor=
-"move");this.updateCurrentState(c)},mouseMove:function(a,c){if(g.isMouseDown){if(null!=this.currentLink){var b=Math.abs(this.startX-c.getGraphX()),f=Math.abs(this.startY-c.getGraphY());(b>e||f>e)&&this.clear()}}else{for(b=c.getSource();null!=b&&"a"!=b.nodeName.toLowerCase();)b=b.parentNode;null!=b?this.clear():(null!=g.tooltipHandler&&null!=this.currentLink&&null!=this.currentState&&g.tooltipHandler.reset(c,!0,this.currentState),(null==this.currentState||c.getState()!=this.currentState&&null!=c.sourceState||
-!g.intersects(this.currentState,c.getGraphX(),c.getGraphY()))&&this.updateCurrentState(c))}},mouseUp:function(a,f){for(var d=f.getSource(),h=f.getEvent();null!=d&&"a"!=d.nodeName.toLowerCase();)d=d.parentNode;null==d&&Math.abs(this.scrollLeft-g.container.scrollLeft)<e&&Math.abs(this.scrollTop-g.container.scrollTop)<e&&(null==f.sourceState||!f.isSource(f.sourceState.control))&&((mxEvent.isLeftMouseButton(h)||mxEvent.isMiddleMouseButton(h))&&!mxEvent.isPopupTrigger(h)||mxEvent.isTouchEvent(h))&&(null!=
-this.currentLink?(d=g.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&d||null==c||c(h,this.currentLink),mxEvent.isConsumed(h)||(h=mxEvent.isMiddleMouseButton(h)?"_blank":d?g.linkTarget:"_top",g.openLink(this.currentLink,h),f.consume())):null!=b&&!f.isConsumed()&&Math.abs(this.scrollLeft-g.container.scrollLeft)<e&&Math.abs(this.scrollTop-g.container.scrollTop)<e&&Math.abs(this.startX-f.getGraphX())<e&&Math.abs(this.startY-f.getGraphY())<e&&b(f.getEvent()));this.clear()},activate:function(a){this.currentLink=
-g.getAbsoluteUrl(g.getLinkForCell(a.cell));null!=this.currentLink&&(g.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(a))},clear:function(){null!=g.container&&(g.container.style.cursor=d);this.currentLink=this.currentState=null;null!=this.highlight&&this.highlight.hide();null!=g.tooltipHandler&&g.tooltipHandler.hide()}};g.click=function(a){};g.addMouseListener(h);mxEvent.addListener(document,"mouseleave",function(a){h.clear()})};Graph.prototype.duplicateCells=function(a,
-c){a=null!=a?a:this.getSelectionCells();c=null!=c?c:!0;a=this.model.getTopmostCells(a);var b=this.getModel(),f=this.gridSize,d=[];b.beginUpdate();try{for(var e=this.cloneCells(a,!1,null,!0),g=0;g<a.length;g++){var h=b.getParent(a[g]),n=this.moveCells([e[g]],f,f,!1)[0];d.push(n);if(c)b.add(h,e[g]);else{var m=h.getIndex(a[g]);b.add(h,e[g],m+1)}}}finally{b.endUpdate()}return d};Graph.prototype.insertImage=function(a,c,b){if(null!=a){for(var f=this.cellEditor.textarea.getElementsByTagName("img"),d=[],
-e=0;e<f.length;e++)d.push(f[e]);document.execCommand("insertimage",!1,a);a=this.cellEditor.textarea.getElementsByTagName("img");if(a.length==d.length+1)for(e=a.length-1;0<=e;e--)if(0==e||a[e]!=d[e-1]){a[e].setAttribute("width",c);a[e].setAttribute("height",b);break}}};Graph.prototype.insertLink=function(a){if(0==a.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var c=this.cellEditor.textarea.getElementsByTagName("a"),b=[],f=0;f<c.length;f++)b.push(c[f]);document.execCommand("createlink",
-!1,mxUtils.trim(a));c=this.cellEditor.textarea.getElementsByTagName("a");if(c.length==b.length+1)for(f=c.length-1;0<=f;f--)if(c[f]!=b[f-1]){for(c=c[f].getElementsByTagName("a");0<c.length;){for(b=c[0].parentNode;null!=c[0].firstChild;)b.insertBefore(c[0].firstChild,c[0]);b.removeChild(c[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(a))};Graph.prototype.isCellResizable=function(a){var c=mxGraph.prototype.isCellResizable.apply(this,arguments),b=this.view.getState(a),b=null!=b?b.style:
-this.getCellStyle(a);return c||"0"!=mxUtils.getValue(b,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==b[mxConstants.STYLE_WHITE_SPACE]};Graph.prototype.distributeCells=function(a,c){null==c&&(c=this.getSelectionCells());if(null!=c&&1<c.length){for(var b=[],f=null,d=null,e=0;e<c.length;e++)if(this.getModel().isVertex(c[e])){var g=this.view.getState(c[e]);if(null!=g){var h=a?g.getCenterX():g.getCenterY(),f=null!=f?Math.max(f,h):h,d=null!=d?Math.min(d,h):h;b.push(g)}}if(2<b.length){b.sort(function(c,b){return a?
-c.x-b.x:c.y-b.y});g=this.view.translate;h=this.view.scale;d=d/h-(a?g.x:g.y);f=f/h-(a?g.x:g.y);this.getModel().beginUpdate();try{for(var n=(f-d)/(b.length-1),f=d,e=1;e<b.length-1;e++){var m=this.view.getState(this.model.getParent(b[e].cell)),r=this.getCellGeometry(b[e].cell),f=f+n;null!=r&&null!=m&&(r=r.clone(),a?r.x=Math.round(f-r.width/2)-m.origin.x:r.y=Math.round(f-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,f=0;f<a.length;f++)b.put(a[f],!0);for(f=0;f<c.length;f++){var d=this.view.getState(a[f]);if(null!=d){var e=this.getCellGeometry(c[f]);null==e||!e.relative||this.model.isEdge(a[f])||b.get(this.model.getParent(a[f]))||(e.relative=!1,e.x=d.x/d.view.scale-d.view.translate.x,e.y=d.y/d.view.scale-d.view.translate.y)}}b=new mxCodec;d=
-new mxGraphModel;e=d.getChildAt(d.getRoot(),0);for(f=0;f<a.length;f++)d.add(e,c[f]);return b.encode(d)};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,f,d,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;d=null!=d?d:!0;e=null!=e?e:!0;g=null!=
-g?g:!0;var t=e||f?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",(d?"-0.5 -0.5":"0 0")+" "+z+" "+q);v.appendChild(k);var w=this.createSvgCanvas(k);w.foOffset=d?-.5:0;w.textOffset=d?-.5:0;w.imageOffset=d?-.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,f,d,e,g,h,n,m,r,t,x){var k=this.state;if(null!=this.foAltText&&(0==f||0!=k.fontSize&&e.length<5*f/k.fontSize)){var v=this.createElement("text");v.setAttribute("x",Math.round(f/2));v.setAttribute("y",Math.round((d+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",
+"move");this.updateCurrentState(c)},mouseMove:function(a,c){if(g.isMouseDown){if(null!=this.currentLink){var b=Math.abs(this.startX-c.getGraphX()),d=Math.abs(this.startY-c.getGraphY());(b>e||d>e)&&this.clear()}}else{for(b=c.getSource();null!=b&&"a"!=b.nodeName.toLowerCase();)b=b.parentNode;null!=b?this.clear():(null!=g.tooltipHandler&&null!=this.currentLink&&null!=this.currentState&&g.tooltipHandler.reset(c,!0,this.currentState),(null==this.currentState||c.getState()!=this.currentState&&null!=c.sourceState||
+!g.intersects(this.currentState,c.getGraphX(),c.getGraphY()))&&this.updateCurrentState(c))}},mouseUp:function(a,d){for(var f=d.getSource(),h=d.getEvent();null!=f&&"a"!=f.nodeName.toLowerCase();)f=f.parentNode;null==f&&Math.abs(this.scrollLeft-g.container.scrollLeft)<e&&Math.abs(this.scrollTop-g.container.scrollTop)<e&&(null==d.sourceState||!d.isSource(d.sourceState.control))&&((mxEvent.isLeftMouseButton(h)||mxEvent.isMiddleMouseButton(h))&&!mxEvent.isPopupTrigger(h)||mxEvent.isTouchEvent(h))&&(null!=
+this.currentLink?(f=g.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&f||null==c||c(h,this.currentLink),mxEvent.isConsumed(h)||(h=mxEvent.isMiddleMouseButton(h)?"_blank":f?g.linkTarget:"_top",g.openLink(this.currentLink,h),d.consume())):null!=b&&!d.isConsumed()&&Math.abs(this.scrollLeft-g.container.scrollLeft)<e&&Math.abs(this.scrollTop-g.container.scrollTop)<e&&Math.abs(this.startX-d.getGraphX())<e&&Math.abs(this.startY-d.getGraphY())<e&&b(d.getEvent()));this.clear()},activate:function(a){this.currentLink=
+g.getAbsoluteUrl(g.getLinkForCell(a.cell));null!=this.currentLink&&(g.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(a))},clear:function(){null!=g.container&&(g.container.style.cursor=f);this.currentLink=this.currentState=null;null!=this.highlight&&this.highlight.hide();null!=g.tooltipHandler&&g.tooltipHandler.hide()}};g.click=function(a){};g.addMouseListener(h);mxEvent.addListener(document,"mouseleave",function(a){h.clear()})};Graph.prototype.duplicateCells=function(a,
+c){a=null!=a?a:this.getSelectionCells();c=null!=c?c:!0;a=this.model.getTopmostCells(a);var b=this.getModel(),d=this.gridSize,f=[];b.beginUpdate();try{for(var e=this.cloneCells(a,!1,null,!0),g=0;g<a.length;g++){var h=b.getParent(a[g]),n=this.moveCells([e[g]],d,d,!1)[0];f.push(n);if(c)b.add(h,e[g]);else{var m=h.getIndex(a[g]);b.add(h,e[g],m+1)}}}finally{b.endUpdate()}return f};Graph.prototype.insertImage=function(a,c,b){if(null!=a){for(var d=this.cellEditor.textarea.getElementsByTagName("img"),f=[],
+e=0;e<d.length;e++)f.push(d[e]);document.execCommand("insertimage",!1,a);a=this.cellEditor.textarea.getElementsByTagName("img");if(a.length==f.length+1)for(e=a.length-1;0<=e;e--)if(0==e||a[e]!=f[e-1]){a[e].setAttribute("width",c);a[e].setAttribute("height",b);break}}};Graph.prototype.insertLink=function(a){if(0==a.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var c=this.cellEditor.textarea.getElementsByTagName("a"),b=[],d=0;d<c.length;d++)b.push(c[d]);document.execCommand("createlink",
+!1,mxUtils.trim(a));c=this.cellEditor.textarea.getElementsByTagName("a");if(c.length==b.length+1)for(d=c.length-1;0<=d;d--)if(c[d]!=b[d-1]){for(c=c[d].getElementsByTagName("a");0<c.length;){for(b=c[0].parentNode;null!=c[0].firstChild;)b.insertBefore(c[0].firstChild,c[0]);b.removeChild(c[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(a))};Graph.prototype.isCellResizable=function(a){var c=mxGraph.prototype.isCellResizable.apply(this,arguments),b=this.view.getState(a),b=null!=b?b.style:
+this.getCellStyle(a);return c||"0"!=mxUtils.getValue(b,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==b[mxConstants.STYLE_WHITE_SPACE]};Graph.prototype.distributeCells=function(a,c){null==c&&(c=this.getSelectionCells());if(null!=c&&1<c.length){for(var b=[],d=null,f=null,e=0;e<c.length;e++)if(this.getModel().isVertex(c[e])){var g=this.view.getState(c[e]);if(null!=g){var h=a?g.getCenterX():g.getCenterY(),d=null!=d?Math.max(d,h):h,f=null!=f?Math.min(f,h):h;b.push(g)}}if(2<b.length){b.sort(function(c,b){return a?
+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",
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,D=new mxRectangle(p.x*c,p.y*c,H.width*c,H.height*c);mxUtils.intersects(t,D)&&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 C=h.drawCellState;h.drawCellState=function(a,c){for(var b=a.view.graph,f=b.isCellSelected(a.cell),d=b.model.getParent(a.cell);!e&&!f&&null!=d;)f=b.isCellSelected(d),d=b.model.getParent(d);(e||f)&&C.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 f=0;f<a.length;f++){var d=a[f].getAttribute("href");null==d&&(d=a[f].getAttribute("xlink:href"));null!=d&&(null!=c&&/^https?:\/\//.test(d)?a[f].setAttribute("target",c):b&&this.isCustomLink(d)&&a[f].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(a){return new mxSvgCanvas2D(a)};
+var p=this.view.translate,D=new mxRectangle(p.x*c,p.y*c,H.width*c,H.height*c);mxUtils.intersects(t,D)&&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 C=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)&&C.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],f=b.rows[0].cells,d=0,e=0;e<f.length;e++)var g=f[e].getAttribute("colspan"),d=d+(null!=g?parseInt(g):1);b=b.insertRow(c);for(e=0;e<d;e++)mxUtils.br(b.insertCell(-1));return b.cells[0]};Graph.prototype.deleteRow=
-function(a,c){a.tBodies[0].deleteRow(c)};Graph.prototype.insertColumn=function(a,c){var b=a.tHead;if(null!=b)for(var f=0;f<b.rows.length;f++){var d=document.createElement("th");b.rows[f].appendChild(d);mxUtils.br(d)}b=a.tBodies[0];for(f=0;f<b.rows.length;f++)d=b.rows[f].insertCell(c),mxUtils.br(d);return b.rows[0].cells[0<=c?c:b.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(a,c){if(0<=c)for(var b=a.tBodies[0].rows,f=0;f<b.length;f++)b[f].cells.length>c&&b[f].deleteCell(c)};Graph.prototype.pasteHtmlAtCaret=
-function(a){var c;if(window.getSelection){if(c=window.getSelection(),c.getRangeAt&&c.rangeCount){c=c.getRangeAt(0);c.deleteContents();var b=document.createElement("div");b.innerHTML=a;a=document.createDocumentFragment();for(var f;f=b.firstChild;)lastNode=a.appendChild(f);c.insertNode(a)}}else(c=document.selection)&&"Control"!=c.type&&c.createRange().pasteHTML(a)};Graph.prototype.createLinkForHint=function(a,c){function b(a,c){a.length>c&&(a=a.substring(0,Math.round(c/2))+"..."+a.substring(a.length-
-Math.round(c/4)));return a}a=null!=a?a:"javascript:void(0);";if(null==c||0==c.length)c=this.isCustomLink(a)?this.getLinkTitle(a):a;var f=document.createElement("a");f.setAttribute("rel",this.linkRelation);f.setAttribute("href",this.getAbsoluteUrl(a));f.setAttribute("title",b(this.isCustomLink(a)?this.getLinkTitle(a):a,80));null!=this.linkTarget&&f.setAttribute("target",this.linkTarget);mxUtils.write(f,b(c,40));this.isCustomLink(a)&&mxEvent.addListener(f,"click",mxUtils.bind(this,function(c){this.customLinkClicked(a);
-mxEvent.consume(c)}));return f};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(a,c){this.popupMenuHandler.hideMenu()});var a=this.updateMouseEvent;this.updateMouseEvent=function(c){c=a.apply(this,arguments);if(mxEvent.isTouchEvent(c.getEvent())&&null==c.getState()){var b=this.getCellAt(c.graphX,c.graphY);null!=b&&this.isSwimlane(b)&&this.hitsSwimlaneContent(b,c.graphX,
-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,f=!1,d=this.fireMouseEvent;this.fireMouseEvent=function(a,e,g){a==mxEvent.MOUSE_DOWN&&(e=this.updateMouseEvent(e),c=this.isCellSelected(e.getCell()),b=this.isSelectionEmpty(),f=this.popupMenuHandler.isMenuShowing());d.apply(this,arguments)};this.popupMenuHandler.mouseUp=
-mxUtils.bind(this,function(a,d){this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==d.getState()||!d.isSource(d.getState().control))&&(this.popupMenuHandler.popupTrigger||!f&&!mxEvent.isMouseEvent(d.getEvent())&&(b&&null==d.getCell()&&this.isSelectionEmpty()||c&&this.isCellSelected(d.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,f=a.rangeCount;b<f;++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<
+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=
+function(a,c){a.tBodies[0].deleteRow(c)};Graph.prototype.insertColumn=function(a,c){var b=a.tHead;if(null!=b)for(var d=0;d<b.rows.length;d++){var f=document.createElement("th");b.rows[d].appendChild(f);mxUtils.br(f)}b=a.tBodies[0];for(d=0;d<b.rows.length;d++)f=b.rows[d].insertCell(c),mxUtils.br(f);return b.rows[0].cells[0<=c?c:b.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(a,c){if(0<=c)for(var b=a.tBodies[0].rows,d=0;d<b.length;d++)b[d].cells.length>c&&b[d].deleteCell(c)};Graph.prototype.pasteHtmlAtCaret=
+function(a){var c;if(window.getSelection){if(c=window.getSelection(),c.getRangeAt&&c.rangeCount){c=c.getRangeAt(0);c.deleteContents();var b=document.createElement("div");b.innerHTML=a;a=document.createDocumentFragment();for(var d;d=b.firstChild;)lastNode=a.appendChild(d);c.insertNode(a)}}else(c=document.selection)&&"Control"!=c.type&&c.createRange().pasteHTML(a)};Graph.prototype.createLinkForHint=function(a,c){function b(a,c){a.length>c&&(a=a.substring(0,Math.round(c/2))+"..."+a.substring(a.length-
+Math.round(c/4)));return a}a=null!=a?a:"javascript:void(0);";if(null==c||0==c.length)c=this.isCustomLink(a)?this.getLinkTitle(a):a;var d=document.createElement("a");d.setAttribute("rel",this.linkRelation);d.setAttribute("href",this.getAbsoluteUrl(a));d.setAttribute("title",b(this.isCustomLink(a)?this.getLinkTitle(a):a,80));null!=this.linkTarget&&d.setAttribute("target",this.linkTarget);mxUtils.write(d,b(c,40));this.isCustomLink(a)&&mxEvent.addListener(d,"click",mxUtils.bind(this,function(c){this.customLinkClicked(a);
+mxEvent.consume(c)}));return d};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(a,c){this.popupMenuHandler.hideMenu()});var a=this.updateMouseEvent;this.updateMouseEvent=function(c){c=a.apply(this,arguments);if(mxEvent.isTouchEvent(c.getEvent())&&null==c.getState()){var b=this.getCellAt(c.graphX,c.graphY);null!=b&&this.isSwimlane(b)&&this.hitsSwimlaneContent(b,c.graphX,
+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=
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),
-f=this.graph.getCellGeometry(a);this.graph.getModel().isEdge(b)&&null!=f&&f.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 f=b.firstChild;null!=a&&null!=f;)c(a,f),a=a.nextSibling,f=f.nextSibling;return b}function b(a,c){if(null!=a)if(c.originalNode!=a)f(a);else for(a=a.firstChild,c=c.firstChild;null!=a;){var d=a.nextSibling;null==c?f(a):(b(a,c),c=c.nextSibling);a=d}}function f(a){for(var c=a.firstChild;null!=c;){var b=c.nextSibling;f(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,
-mxUtils.getTextContent(a).replace(/\n|\r/g,"")),1==a.nodeType&&(a.removeAttribute("style"),a.removeAttribute("class"),a.removeAttribute("width"),a.removeAttribute("cellpadding"),a.removeAttribute("cellspacing"),a.removeAttribute("border"))):a.parentNode.removeChild(a)}q.apply(this,arguments);mxClient.IS_QUIRKS||7===document.documentMode||8===document.documentMode||mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(a){var f=c(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,
-function(){b(this.textarea,f)}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var a=this.graph.view.getState(this.editingCell),c=null!=a&&"0"!=mxUtils.getValue(a.style,"nl2Br","1"),b=this.saveSelection();if(this.codeViewMode){h=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<h.length&&"\n"==h.charAt(h.length-1)&&(h=h.substring(0,h.length-1));h=this.graph.sanitizeHtml(c?h.replace(/\n/g,"<br/>"):h,!0);this.textarea.className="mxCellEditor geContentEditable";var f=mxUtils.getValue(a.style,
-mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE),c=mxUtils.getValue(a.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),d=mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),e=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,g=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,a=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==
-mxConstants.FONT_UNDERLINE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(f*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(f)+"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=d;this.textarea.style.padding="0px";this.textarea.innerHTML!=h&&(this.textarea.innerHTML=
+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,
+mxUtils.getTextContent(a).replace(/\n|\r/g,"")),1==a.nodeType&&(a.removeAttribute("style"),a.removeAttribute("class"),a.removeAttribute("width"),a.removeAttribute("cellpadding"),a.removeAttribute("cellspacing"),a.removeAttribute("border"))):a.parentNode.removeChild(a)}q.apply(this,arguments);mxClient.IS_QUIRKS||7===document.documentMode||8===document.documentMode||mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(a){var d=c(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,
+function(){b(this.textarea,d)}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var a=this.graph.view.getState(this.editingCell),c=null!=a&&"0"!=mxUtils.getValue(a.style,"nl2Br","1"),b=this.saveSelection();if(this.codeViewMode){h=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<h.length&&"\n"==h.charAt(h.length-1)&&(h=h.substring(0,h.length-1));h=this.graph.sanitizeHtml(c?h.replace(/\n/g,"<br/>"):h,!0);this.textarea.className="mxCellEditor geContentEditable";var d=mxUtils.getValue(a.style,
+mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE),c=mxUtils.getValue(a.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),f=mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),e=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,g=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,a=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==
+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 f=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(f*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(f)+"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=
+"<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==
-this.bounds.height){this.bounds.width=160*b;this.bounds.height=60*b;var f=null!=a.text?a.text.margin:null;null==f&&(f=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+=f.x*this.bounds.width;this.bounds.y+=f.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-
+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,
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=
-mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null),c==mxConstants.NONE&&(c=null);return c};mxCellEditor.prototype.getMinimumSize=function(a){var c=this.graph.getView().scale;return new mxRectangle(0,0,null==a.text?30:a.text.size*c+20,30)};var g=mxGraphHandler.prototype.moveCells;mxGraphHandler.prototype.moveCells=function(a,c,b,f,d,e){mxEvent.isAltDown(e)&&(d=null);g.apply(this,arguments)};mxGraphHandler.prototype.updateHint=function(c){if(null!=this.shape){null==this.hint&&(this.hint=
-a(),this.graph.container.appendChild(this.hint));var b=this.graph.view.translate,f=this.graph.view.scale;c=this.roundLength((this.bounds.x+this.currentDx)/f-b.x);b=this.roundLength((this.bounds.y+this.currentDy)/f-b.y);this.hint.innerHTML=c+", "+b;this.hint.style.left=this.shape.bounds.x+Math.round((this.shape.bounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.shape.bounds.y+this.shape.bounds.height+12+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(this.hint.parentNode.removeChild(this.hint),
+mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null),c==mxConstants.NONE&&(c=null);return c};mxCellEditor.prototype.getMinimumSize=function(a){var c=this.graph.getView().scale;return new mxRectangle(0,0,null==a.text?30:a.text.size*c+20,30)};var g=mxGraphHandler.prototype.moveCells;mxGraphHandler.prototype.moveCells=function(a,c,b,d,f,e){mxEvent.isAltDown(e)&&(f=null);g.apply(this,arguments)};mxGraphHandler.prototype.updateHint=function(c){if(null!=this.shape){null==this.hint&&(this.hint=
+a(),this.graph.container.appendChild(this.hint));var b=this.graph.view.translate,d=this.graph.view.scale;c=this.roundLength((this.bounds.x+this.currentDx)/d-b.x);b=this.roundLength((this.bounds.y+this.currentDy)/d-b.y);this.hint.innerHTML=c+", "+b;this.hint.style.left=this.shape.bounds.x+Math.round((this.shape.bounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.shape.bounds.y+this.shape.bounds.height+12+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(this.hint.parentNode.removeChild(this.hint),
this.hint=null)};mxVertexHandler.prototype.isRecursiveResize=function(a,c){return!this.graph.isSwimlane(a.cell)&&0<this.graph.model.getChildCount(a.cell)&&!mxEvent.isControlDown(c.getEvent())&&!this.graph.isCellCollapsed(a.cell)&&"1"==mxUtils.getValue(a.style,"recursiveResize","1")&&null==mxUtils.getValue(a.style,"childLayout",null)};mxVertexHandler.prototype.isCenteredEvent=function(a,c){return!(!this.graph.isSwimlane(a.cell)&&0<this.graph.model.getChildCount(a.cell)&&!this.graph.isCellCollapsed(a.cell)&&
"1"==mxUtils.getValue(a.style,"recursiveResize","1")&&null==mxUtils.getValue(a.style,"childLayout",null))&&mxEvent.isControlDown(c.getEvent())||mxEvent.isMetaDown(c.getEvent())};var n=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var a=new mxPoint(0,0),c=this.tolerance;this.graph.cellEditor.getEditingCell()==this.state.cell&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(c/=2,a.x=this.sizers[0].bounds.width+c,a.y=this.sizers[0].bounds.height+
c):a=n.apply(this,arguments);return a};mxVertexHandler.prototype.updateHint=function(c){this.index!=mxEvent.LABEL_HANDLE&&(null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint)),this.index==mxEvent.ROTATION_HANDLE?this.hint.innerHTML=this.currentAlpha+"&deg;":(c=this.state.view.scale,this.hint.innerHTML=this.roundLength(this.bounds.width/c)+" x "+this.roundLength(this.bounds.height/c)),c=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:
this.state.style[mxConstants.STYLE_ROTATION]||"0"),null==c&&(c=this.bounds),this.hint.style.left=c.x+Math.round((c.width-this.hint.clientWidth)/2)+"px",this.hint.style.top=c.y+c.height+12+"px",null!=this.linkHint&&(this.linkHint.style.display="none"))};mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(c,b){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));
-var f=this.graph.view.translate,d=this.graph.view.scale,e=this.roundLength(b.x/d-f.x),f=this.roundLength(b.y/d-f.y);this.hint.innerHTML=e+", "+f;this.hint.style.visibility="visible";if(this.isSource||this.isTarget)null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(e=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*e.x)+"%, "+Math.round(100*e.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=
+var d=this.graph.view.translate,f=this.graph.view.scale,e=this.roundLength(b.x/f-d.x),d=this.roundLength(b.y/f-d.y);this.hint.innerHTML=e+", "+d;this.hint.style.visibility="visible";if(this.isSource||this.isTarget)null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(e=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*e.x)+"%, "+Math.round(100*e.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=
Math.round(c.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(c.getGraphY(),b.y)+this.state.view.graph.gridSize+"px";null!=this.linkHint&&(this.linkHint.style.display="none")};mxEdgeHandler.prototype.removeHint=mxVertexHandler.prototype.removeHint;HoverIcons.prototype.mainHandle=mxClient.IS_SVG?Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'" stroke-width="1"/>'):new mxImage(IMAGE_PATH+"/handle-main.png",17,17);HoverIcons.prototype.secondaryHandle=
mxClient.IS_SVG?Graph.createSvgImage(16,16,'<path d="m 8 3 L 13 8 L 8 13 L 3 8 z" stroke="#fff" fill="#fca000"/>'):new mxImage(IMAGE_PATH+"/handle-secondary.png",17,17);HoverIcons.prototype.fixedHandle=mxClient.IS_SVG?Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'" stroke-width="1"/><path d="m 7 7 L 11 11 M 7 11 L 11 7" stroke="#fff"/>'):new mxImage(IMAGE_PATH+"/handle-fixed.png",17,17);HoverIcons.prototype.terminalHandle=mxClient.IS_SVG?
Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'" stroke-width="1"/><circle cx="9" cy="9" r="2" stroke="#fff" fill="transparent"/>'):new mxImage(IMAGE_PATH+"/handle-terminal.png",17,17);HoverIcons.prototype.rotationHandle=new mxImage(mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAAVCAYAAACkCdXRAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAAA6ZJREFUeNqM001IY1cUB/D/fYmm2sbR2lC1zYlgoRG6MpEyBlpxM9iFIGKFIm3s0lCKjOByhCLZCFqLBF1YFVJdSRbdFHRhBbULtRuFVBTzYRpJgo2mY5OX5N9Fo2TG+eiFA/dd3vvd8+65ByTxshARTdf1JySp6/oTEdFe9T5eg5lIcnBwkCSZyWS+exX40oyur68/KxaLf5Okw+H4X+A9JBaLfUySZ2dnnJqaosPhIAACeC34DJRKpb7IZrMcHx+nwWCgUopGo/EOKwf9fn/1CzERUevr6+9ls1mOjIwQAH0+H4PBIKPR6D2ofAQCgToRUeVYJUkuLy8TANfW1kiS8/PzCy84Mw4MDBAAZ2dnmc/nub+/X0MSEBF1cHDwMJVKsaGhgV6vl+l0mqOjo1+KyKfl1dze3l4NBoM/PZ+diFSLiIKIGBOJxA9bW1sEwNXVVSaTyQMRaRaRxrOzs+9J8ujoaE5EPhQRq67rcZ/PRwD0+/3Udf03EdEgIqZisZibnJykwWDg4eEhd3Z2xkXELCJvPpdBrYjUiEhL+Xo4HH4sIhUaAKNSqiIcDsNkMqG+vh6RSOQQQM7tdhsAQCkFAHC73UUATxcWFqypVApmsxnDw8OwWq2TADQNgAYAFosF+XweyWQSdru9BUBxcXFRB/4rEgDcPouIIx6P4+bmBi0tLSCpAzBqAIqnp6c/dnZ2IpfLYXNzE62traMADACKNputpr+/v8lms9UAKAAwiMjXe3t7KBQKqKurQy6Xi6K0i2l6evpROp1mbW0t29vbGY/Hb8/IVIqq2zlJXl1dsaOjg2azmefn5wwEAl+JSBVExCgi75PkzMwMlVJsbGxkIpFgPp8PX15ePopEIs3JZPITXdf/iEajbGpqolKKExMT1HWdHo/nIxGpgIgoEXnQ3d39kCTHxsYIgC6Xi3NzcwyHw8xkMozFYlxaWmJbWxuVUuzt7WUul6PX6/1cRN4WEe2uA0SkaWVl5XGpRVhdXU0A1DSNlZWVdz3qdDrZ09PDWCzG4+Pjn0XEWvp9KJKw2WwKwBsA3gHQHAqFfr24uMDGxgZ2d3cRiUQAAHa7HU6nE319fTg5Ofmlq6vrGwB/AngaCoWK6rbsNptNA1AJoA7Aux6Pp3NoaMhjsVg+QNmIRqO/u1yubwFEASRKUAEA7rASqABUAKgC8KAUb5XWCOAfAFcA/gJwDSB7C93DylCtdM8qABhLc5TumV6KQigUeubjfwcAHkQJ94ndWeYAAAAASUVORK5CYII=":
@@ -2414,26 +2414,26 @@ HoverIcons.prototype.triangleDown.src,(new Image).src=HoverIcons.prototype.trian
function(a){return!mxEvent.isShiftDown(a.getEvent())};if(Graph.touchStyle){if(mxClient.IS_TOUCH||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints)mxShape.prototype.svgStrokeTolerance=18,mxVertexHandler.prototype.tolerance=12,mxEdgeHandler.prototype.tolerance=12,Graph.prototype.tolerance=12,mxVertexHandler.prototype.rotationHandleVSpacing=-24,mxConstraintHandler.prototype.getTolerance=function(a){return mxEvent.isMouseEvent(a.getEvent())?4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=
function(a){var c=a.getEvent();return null==a.getState()&&!mxEvent.isMouseEvent(c)||mxEvent.isPopupTrigger(c)&&(null==a.getState()||mxEvent.isControlDown(c)||mxEvent.isShiftDown(c))};var r=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=function(a,c){r.apply(this,arguments);mxEvent.isTouchEvent(c.getEvent())&&this.graph.isCellSelected(c.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(a){var c=
a.getEvent();return mxEvent.isLeftMouseButton(c)&&(this.useLeftButtonForPanning&&null==a.getState()||mxEvent.isControlDown(c)&&!mxEvent.isShiftDown(c))||this.usePopupTrigger&&mxEvent.isPopupTrigger(c)};mxRubberband.prototype.isSpaceEvent=function(a){return this.graph.isEnabled()&&!this.graph.isCellLocked(this.graph.getDefaultParent())&&mxEvent.isControlDown(a.getEvent())&&mxEvent.isShiftDown(a.getEvent())};mxRubberband.prototype.mouseUp=function(a,c){var b=null!=this.div&&"none"!=this.div.style.display,
-f=null,d=null,e=null,g=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(f=this.first.x,d=this.first.y,e=(this.currentX-f)/this.graph.view.scale,g=(this.currentY-d)/this.graph.view.scale,mxEvent.isAltDown(c.getEvent())||(e=this.graph.snap(e),g=this.graph.snap(g),this.graph.isGridEnabled()||(Math.abs(e)<this.graph.tolerance&&(e=0),Math.abs(g)<this.graph.tolerance&&(g=0))));this.reset();if(b){if(mxEvent.isAltDown(c.getEvent())&&this.graph.isToggleEvent(c.getEvent())){var e=new mxRectangle(this.x,
-this.y,this.width,this.height),h=this.graph.getCells(e.x,e.y,e.width,e.height);this.graph.removeSelectionCells(h)}else if(this.isSpaceEvent(c)){this.graph.model.beginUpdate();try{for(h=this.graph.getCellsBeyond(f,d,this.graph.getDefaultParent(),!0,!0),b=0;b<h.length;b++)if(this.graph.isCellMovable(h[b])){var n=this.graph.view.getState(h[b]),m=this.graph.getCellGeometry(h[b]);null!=n&&null!=m&&(m=m.clone(),m.translate(e,g),this.graph.model.setGeometry(h[b],m))}}finally{this.graph.model.endUpdate()}}else e=
-new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(e,c.getEvent());c.consume()}};mxRubberband.prototype.mouseMove=function(a,c){if(!c.isConsumed()&&null!=this.first){var b=mxUtils.getScrollOrigin(this.graph.container),f=mxUtils.getOffset(this.graph.container);b.x-=f.x;b.y-=f.y;var f=c.getX()+b.x,b=c.getY()+b.y,d=this.first.x-f,e=this.first.y-b,g=this.graph.tolerance;if(null!=this.div||Math.abs(d)>g||Math.abs(e)>g)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),
-this.update(f,b),this.isSpaceEvent(c)?(f=this.x+this.width,b=this.y+this.height,d=this.graph.view.scale,mxEvent.isAltDown(c.getEvent())||(this.width=this.graph.snap(this.width/d)*d,this.height=this.graph.snap(this.height/d)*d,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=f-this.width),this.y<this.first.y&&(this.y=b-this.height)),this.div.style.borderStyle="dashed",this.div.style.backgroundColor=
+d=null,f=null,e=null,g=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(d=this.first.x,f=this.first.y,e=(this.currentX-d)/this.graph.view.scale,g=(this.currentY-f)/this.graph.view.scale,mxEvent.isAltDown(c.getEvent())||(e=this.graph.snap(e),g=this.graph.snap(g),this.graph.isGridEnabled()||(Math.abs(e)<this.graph.tolerance&&(e=0),Math.abs(g)<this.graph.tolerance&&(g=0))));this.reset();if(b){if(mxEvent.isAltDown(c.getEvent())&&this.graph.isToggleEvent(c.getEvent())){var e=new mxRectangle(this.x,
+this.y,this.width,this.height),h=this.graph.getCells(e.x,e.y,e.width,e.height);this.graph.removeSelectionCells(h)}else if(this.isSpaceEvent(c)){this.graph.model.beginUpdate();try{for(h=this.graph.getCellsBeyond(d,f,this.graph.getDefaultParent(),!0,!0),b=0;b<h.length;b++)if(this.graph.isCellMovable(h[b])){var n=this.graph.view.getState(h[b]),m=this.graph.getCellGeometry(h[b]);null!=n&&null!=m&&(m=m.clone(),m.translate(e,g),this.graph.model.setGeometry(h[b],m))}}finally{this.graph.model.endUpdate()}}else e=
+new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(e,c.getEvent());c.consume()}};mxRubberband.prototype.mouseMove=function(a,c){if(!c.isConsumed()&&null!=this.first){var b=mxUtils.getScrollOrigin(this.graph.container),d=mxUtils.getOffset(this.graph.container);b.x-=d.x;b.y-=d.y;var d=c.getX()+b.x,b=c.getY()+b.y,f=this.first.x-d,e=this.first.y-b,g=this.graph.tolerance;if(null!=this.div||Math.abs(f)>g||Math.abs(e)>g)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),
+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,f){v.apply(this,arguments);b!=this.currentTerminalState?(m=(new Date).getTime(),w=0):w=(new Date).getTime()-m;this.currentTerminalState=b};var C=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"))&&C.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,f=this.state.getVisibleTerminalState(b),d=null!=a&&(0==a||a>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==a)?this.graph.getConnectionConstraint(this.state,
-f,b):null,b=null!=(null!=d?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(b),d):null)?this.fixedHandleImage:null!=d&&null!=f?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]),f=this.graph.getCellGeometry(a[0]);if(c.isEdge(b)&&null!=f&&f.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),f=this.graph.getCellGeometry(a.cell);return c.isEdge(b)&&null!=f&&f.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 D=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(a,c){var b=this.graph.getModel(),f=b.getParent(this.state.cell),d=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(c)==mxEvent.ROTATION_HANDLE||!b.isEdge(f)||null==d||!d.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&D.apply(this,arguments)};mxVertexHandler.prototype.isRotationHandleVisible=
+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 C=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"))&&C.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 D=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)&&D.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 B=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(a,c){B.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),f=this.graph.getLinksForState(this.state);this.updateLinkHint(b,
-f);if(null!=b||null!=f&&0<f.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 f=document.createElement("img");f.setAttribute("src",Editor.editImage);f.setAttribute("title",mxResources.get("editLink"));f.setAttribute("width","11");f.setAttribute("height","11");f.style.marginLeft="10px";f.style.marginBottom="-1px";f.style.cursor="pointer";this.linkHint.appendChild(f);mxEvent.addListener(f,"click",mxUtils.bind(this,
-function(a){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(a)}));f=document.createElement("img");f.setAttribute("src",Dialog.prototype.clearImage);f.setAttribute("title",mxResources.get("removeIt",[mxResources.get("link")]));f.setAttribute("width","13");f.setAttribute("height","10");f.style.marginLeft="4px";f.style.marginBottom="-1px";f.style.cursor="pointer";this.linkHint.appendChild(f);mxEvent.addListener(f,"click",mxUtils.bind(this,function(a){this.graph.setLinkForCell(this.state.cell,
-null);mxEvent.consume(a)}))}if(null!=b)for(f=0;f<b.length;f++){var d=document.createElement("div");d.style.marginTop=null!=c||0<f?"6px":"0px";d.appendChild(this.graph.createLinkForHint(b[f].getAttribute("href"),mxUtils.getTextContent(b[f])));this.linkHint.appendChild(d)}}};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,
+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,
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]||
@@ -2446,107 +2446,107 @@ a;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultV
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 C(){mxActor.call(this)}function x(){mxActor.call(this)}function t(){mxRectangleShape.call(this)}function z(){mxRectangleShape.call(this)}function D(){mxCylinder.call(this)}function N(){mxShape.call(this)}function B(){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,f,d,e,g,h,n,m){g+=n;var na=f.clone();f.x-=d*(2*g+n);f.y-=e*(2*g+n);d*=g+n;e*=g+n;return function(){a.ellipse(na.x-d-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,f,d,e){c=Math.max(0,Math.min(f,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));e?(a.moveTo(c,d),a.lineTo(c,c),a.lineTo(0,0),a.moveTo(c,c),a.lineTo(f,c)):(a.moveTo(0,0),a.lineTo(f-c,0),a.lineTo(f,c),a.lineTo(f,d),a.lineTo(c,d),a.lineTo(0,d-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,f,d){c=Math.min(f,d/Ba);a.translate((f-c)/2,(d-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,f,d,e){c=Math.min(f,d/(.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((f-c)/2,(d-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,f,d,e){c=Math.min(d/2,Math.round(d/8)+this.strokewidth-
-1);if(e&&null!=this.fill||!e&&null==this.fill)a.moveTo(0,c),a.curveTo(0,2*c,f,2*c,f,c),e||(a.stroke(),a.begin()),a.translate(0,c/2),a.moveTo(0,c),a.curveTo(0,2*c,f,2*c,f,c),e||(a.stroke(),a.begin()),a.translate(0,c/2),a.moveTo(0,c),a.curveTo(0,2*c,f,2*c,f,c),e||(a.stroke(),a.begin()),a.translate(0,-c);e||(a.moveTo(0,c),a.curveTo(0,-c/3,f,-c/3,f,c),a.lineTo(f,d-c),a.curveTo(f,d+c/3,0,d+c/3,0,d-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,f,d,e){c=Math.max(0,Math.min(f,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));e?(a.moveTo(f-c,0),a.lineTo(f-c,c),a.lineTo(f,c)):(a.moveTo(0,0),a.lineTo(f-c,0),a.lineTo(f,c),a.lineTo(f,d),a.lineTo(0,d),a.lineTo(0,0),a.close());a.end()};mxCellRenderer.registerShape("note",k);mxUtils.extend(l,mxActor);l.prototype.redrawPath=
-function(a,c,b,f,d){a.moveTo(0,0);a.quadTo(f/2,.5*d,f,0);a.quadTo(.5*f,d/2,f,d);a.quadTo(f/2,.5*d,0,d);a.quadTo(.5*f,d/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,f,d,e){c=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));b=Math.max(0,Math.min(d,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(f-c,b),a.lineTo(f,b)):("left"==g?(a.moveTo(0,0),a.lineTo(c,0),a.lineTo(c,b),a.lineTo(f,b)):(a.moveTo(0,b),a.lineTo(f-c,b),a.lineTo(f-c,0),a.lineTo(f,0)),a.lineTo(f,d),a.lineTo(0,d),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,f,d){c=Math.max(0,Math.min(f,Math.min(d,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(f,0),new mxPoint(f,d),new mxPoint(0,d),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,f,d){c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
-"size",this.size))));a.moveTo(0,c/2);a.quadTo(f/4,1.4*c,f/2,c/2);a.quadTo(3*f/4,c*(1-1.4),f,c/2);a.lineTo(f,d-c/2);a.quadTo(3*f/4,d-1.4*c,f/2,d-c/2);a.quadTo(f/4,d-c*(1-1.4),0,d-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,f=a.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return c*=
-f,new mxRectangle(a.x,a.y+c,b,f-2*c);c*=b;return new mxRectangle(a.x+c,a.y,b-2*c,f)}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,f,d){c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,
-0);a.lineTo(f,0);a.lineTo(f,d-c/2);a.quadTo(3*f/4,d-1.4*c,f/2,d-c/2);a.quadTo(f/4,d-c*(1-1.4),0,d-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,f){var d=mxUtils.getValue(this.style,"size");return null!=d?f*Math.max(0,Math.min(1,d)):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,f,d){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,d),new mxPoint(c,0),new mxPoint(f,0),new mxPoint(f-c,d)],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,f,d){c=f*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,d),new mxPoint(c,0),new mxPoint(f-c,0),new mxPoint(f,d)],this.isRounded,b,!0)};mxCellRenderer.registerShape("trapezoid",
-g);mxUtils.extend(n,mxActor);n.prototype.size=.5;n.prototype.redrawPath=function(a,c,b,f,d){a.setFillColor(null);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(f,0),new mxPoint(c,0),new mxPoint(c,d/2),new mxPoint(0,d/2),new mxPoint(c,d/2),new mxPoint(c,d),new mxPoint(f,d)],this.isRounded,b,!1);a.end()};mxCellRenderer.registerShape("curlyBracket",
-n);mxUtils.extend(r,mxActor);r.prototype.redrawPath=function(a,c,b,f,d){a.setStrokeWidth(1);a.setFillColor(this.stroke);c=f/5;a.rect(0,0,c,d);a.fillAndStroke();a.rect(2*c,0,c,d);a.fillAndStroke();a.rect(4*c,0,c,d);a.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",r);h.prototype.moveTo=function(a,c){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=c;this.firstX=a;this.firstY=c};h.prototype.close=function(){null!=this.firstX&&null!=this.firstY&&(this.lineTo(this.firstX,
-this.firstY),this.originalClose.apply(this.canvas,arguments));this.originalClose.apply(this.canvas,arguments)};h.prototype.quadTo=function(a,c,b,f){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=b;this.lastY=f};h.prototype.curveTo=function(a,c,b,f,d,e){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=d;this.lastY=e};h.prototype.arcTo=function(a,c,b,f,d,e,g){this.originalArcTo.apply(this.canvas,arguments);this.lastX=e;this.lastY=g};h.prototype.lineTo=function(a,c){if(null!=
-this.lastX&&null!=this.lastY){var b=function(a){return"number"===typeof a?a?0>a?-1:1:a===a?0:NaN:NaN},f=Math.abs(a-this.lastX),d=Math.abs(c-this.lastY),e=Math.sqrt(f*f+d*d);if(2>e){this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=c;return}var g=Math.round(e/10),h=this.defaultVariation;5>g&&(g=5,h/=3);for(var na=b(a-this.lastX)*f/g,b=b(c-this.lastY)*d/g,f=f/e,d=d/e,e=0;e<g;e++){var n=(Math.random()-.5)*h;this.originalLineTo.call(this.canvas,na*e+this.lastX-n*d,b*e+this.lastY-
-n*f)}this.originalLineTo.call(this.canvas,a,c)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=c};h.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};var Ha=mxShape.prototype.paint;mxShape.prototype.defaultJiggle=1.5;mxShape.prototype.paint=function(a){null!=
+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,
+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-
+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,
+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",
+g);mxUtils.extend(n,mxActor);n.prototype.size=.5;n.prototype.redrawPath=function(a,c,b,d,f){a.setFillColor(null);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(d,0),new mxPoint(c,0),new mxPoint(c,f/2),new mxPoint(0,f/2),new mxPoint(c,f/2),new mxPoint(c,f),new mxPoint(d,f)],this.isRounded,b,!1);a.end()};mxCellRenderer.registerShape("curlyBracket",
+n);mxUtils.extend(r,mxActor);r.prototype.redrawPath=function(a,c,b,d,f){a.setStrokeWidth(1);a.setFillColor(this.stroke);c=d/5;a.rect(0,0,c,f);a.fillAndStroke();a.rect(2*c,0,c,f);a.fillAndStroke();a.rect(4*c,0,c,f);a.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",r);h.prototype.moveTo=function(a,c){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=c;this.firstX=a;this.firstY=c};h.prototype.close=function(){null!=this.firstX&&null!=this.firstY&&(this.lineTo(this.firstX,
+this.firstY),this.originalClose.apply(this.canvas,arguments));this.originalClose.apply(this.canvas,arguments)};h.prototype.quadTo=function(a,c,b,d){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=b;this.lastY=d};h.prototype.curveTo=function(a,c,b,d,f,e){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=f;this.lastY=e};h.prototype.arcTo=function(a,c,b,d,f,e,g){this.originalArcTo.apply(this.canvas,arguments);this.lastX=e;this.lastY=g};h.prototype.lineTo=function(a,c){if(null!=
+this.lastX&&null!=this.lastY){var b=function(a){return"number"===typeof a?a?0>a?-1:1:a===a?0:NaN:NaN},d=Math.abs(a-this.lastX),f=Math.abs(c-this.lastY),e=Math.sqrt(d*d+f*f);if(2>e){this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=c;return}var g=Math.round(e/10),h=this.defaultVariation;5>g&&(g=5,h/=3);for(var na=b(a-this.lastX)*d/g,b=b(c-this.lastY)*f/g,d=d/e,f=f/e,e=0;e<g;e++){var n=(Math.random()-.5)*h;this.originalLineTo.call(this.canvas,na*e+this.lastX-n*f,b*e+this.lastY-
+n*d)}this.originalLineTo.call(this.canvas,a,c)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=c};h.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};var Ha=mxShape.prototype.paint;mxShape.prototype.defaultJiggle=1.5;mxShape.prototype.paint=function(a){null!=
this.style&&"0"!=mxUtils.getValue(this.style,"comic","0")&&null==a.handHiggle&&(a.handJiggle=new h(a,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle)));Ha.apply(this,arguments);null!=a.handJiggle&&(a.handJiggle.destroy(),delete a.handJiggle)};mxRhombus.prototype.defaultJiggle=2;var Ia=mxRectangleShape.prototype.isHtmlAllowed;mxRectangleShape.prototype.isHtmlAllowed=function(){return(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0"))&&Ia.apply(this,arguments)};var Ja=mxRectangleShape.prototype.paintBackground;
-mxRectangleShape.prototype.paintBackground=function(a,c,b,f,d){if(null==a.handJiggle)Ja.apply(this,arguments);else{var e=!0;null!=this.style&&(e="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(e||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)e||null!=this.fill&&this.fill!=mxConstants.NONE||(a.pointerEvents=!1),a.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?e=Math.min(f/2,Math.min(d/
-2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,e=Math.min(f*e,d*e)),a.moveTo(c+e,b),a.lineTo(c+f-e,b),a.quadTo(c+f,b,c+f,b+e),a.lineTo(c+f,b+d-e),a.quadTo(c+f,b+d,c+f-e,b+d),a.lineTo(c+e,b+d),a.quadTo(c,b+d,c,b+d-e),a.lineTo(c,b+e),a.quadTo(c,b,c+e,b)):(a.moveTo(c,b),a.lineTo(c+f,b),a.lineTo(c+f,b+d),a.lineTo(c,b+d),a.lineTo(c,b)),a.close(),a.end(),a.fillAndStroke()}};
-var Ka=mxRectangleShape.prototype.paintForeground;mxRectangleShape.prototype.paintForeground=function(a,c,b,f,d){null==a.handJiggle&&Ka.apply(this,arguments)};mxUtils.extend(m,mxRectangleShape);m.prototype.size=.1;m.prototype.isHtmlAllowed=function(){return!1};m.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var c=a.width,b=a.height;
-a=new mxRectangle(a.x,a.y,c,b);var f=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.max(f,Math.min(c*d,b*d));a.x+=Math.round(f);a.width-=Math.round(2*f)}return a};m.prototype.paintForeground=function(a,c,b,f,d){var e=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var g=mxUtils.getValue(this.style,
-mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,e=Math.max(e,Math.min(f*g,d*g));e=Math.round(e);a.begin();a.moveTo(c+e,b);a.lineTo(c+e,b+d);a.moveTo(c+f-e,b);a.lineTo(c+f-e,b+d);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,f,d){a.setFillColor(mxConstants.NONE);a.rect(c,b,f,d);a.fill()};w.prototype.paintForeground=function(a,
-c,b,f,d){};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,f,d){c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;b=Math.max(0,Math.min(d,
-parseFloat(mxUtils.getValue(this.style,"size",this.size))));var e=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),g=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),h=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(a,[new mxPoint(0,0),new mxPoint(f,0),new mxPoint(f,d-b),new mxPoint(Math.min(f,e+h),d-b),new mxPoint(g,d),new mxPoint(Math.max(0,e),d-b),new mxPoint(0,
-d-b)],this.isRounded,c,!0,[4])};mxCellRenderer.registerShape("callout",v);mxUtils.extend(C,mxActor);C.prototype.size=.2;C.prototype.fixedSize=20;C.prototype.isRoundable=function(){return!0};C.prototype.redrawPath=function(a,c,b,f,d){c="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):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(f-c,0),new mxPoint(f,d/2),new mxPoint(f-c,d),new mxPoint(0,d),new mxPoint(c,d/2)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("step",C);mxUtils.extend(x,mxHexagon);x.prototype.size=.25;x.prototype.isRoundable=function(){return!0};x.prototype.redrawPath=function(a,c,b,f,d){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(c,0),new mxPoint(f-c,0),new mxPoint(f,.5*d),new mxPoint(f-c,d),new mxPoint(c,d),new mxPoint(0,.5*d)],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,f,d){var e=Math.min(f/5,d/5)+1;a.begin();a.moveTo(c+f/2,b+e);a.lineTo(c+f/2,b+d-e);a.moveTo(c+e,b+d/2);a.lineTo(c+f-e,b+d/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,f,d){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;f-=2*e;d-=2*e;0<f&&0<d&&(a.setShadow(!1),Da.apply(this,[a,c,b,f,d]))}};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,
-f,d){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;f-=2*e;d-=2*e;0<f&&0<d&&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(f+this.strokewidth,d+this.strokewidth),r+=x,t+=x);var x=c,v=b,x=h==mxConstants.ALIGN_CENTER?x+(f-na)/2:h==mxConstants.ALIGN_RIGHT?x+(f-na-r):x+r,v=n==mxConstants.ALIGN_MIDDLE?v+(d-m)/2:n==mxConstants.ALIGN_BOTTOM?v+(d-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(D,mxCylinder);D.prototype.redrawPath=function(a,c,b,f,d,e){e?(a.moveTo(0,0),a.lineTo(f/2,d/2),a.lineTo(f,0),a.end()):(a.moveTo(0,0),a.lineTo(f,0),a.lineTo(f,d),a.lineTo(0,d),a.close())};mxCellRenderer.registerShape("message",D);mxUtils.extend(N,mxShape);N.prototype.paintBackground=function(a,c,b,f,d){a.translate(c,b);a.ellipse(f/4,0,f/2,d/4);a.fillAndStroke();a.begin();a.moveTo(f/2,d/4);a.lineTo(f/2,2*d/3);a.moveTo(f/2,d/3);a.lineTo(0,
-d/3);a.moveTo(f/2,d/3);a.lineTo(f,d/3);a.moveTo(f/2,2*d/3);a.lineTo(0,d);a.moveTo(f/2,2*d/3);a.lineTo(f,d);a.end();a.stroke()};mxCellRenderer.registerShape("umlActor",N);mxUtils.extend(B,mxShape);B.prototype.getLabelMargins=function(a){return new mxRectangle(a.width/6,0,0,0)};B.prototype.paintBackground=function(a,c,b,f,d){a.translate(c,b);a.begin();a.moveTo(0,d/4);a.lineTo(0,3*d/4);a.end();a.stroke();a.begin();a.moveTo(0,d/2);a.lineTo(f/6,d/2);a.end();a.stroke();a.ellipse(f/6,0,5*f/6,d);a.fillAndStroke()};
-mxCellRenderer.registerShape("umlBoundary",B);mxUtils.extend(G,mxEllipse);G.prototype.paintVertexShape=function(a,c,b,f,d){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(c+f/8,b+d);a.lineTo(c+7*f/8,b+d);a.end();a.stroke()};mxCellRenderer.registerShape("umlEntity",G);mxUtils.extend(J,mxShape);J.prototype.paintVertexShape=function(a,c,b,f,d){a.translate(c,b);a.begin();a.moveTo(f,0);a.lineTo(0,d);a.moveTo(0,0);a.lineTo(f,d);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,f,d){a.translate(c,b);a.begin();a.moveTo(3*f/8,d/8*1.1);a.lineTo(5*f/8,0);a.end();a.stroke();a.ellipse(0,d/8,f,7*d/8);a.fillAndStroke()};y.prototype.paintForeground=function(a,c,b,f,d){a.begin();a.moveTo(3*f/8,d/8*1.1);a.lineTo(5*f/8,d/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,f,d){var e=Math.max(0,Math.min(d,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,f,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,f,e),a.restore()));e<d&&(a.setDashed(!0),a.begin(),a.moveTo(c+f/2,b+e),a.lineTo(c+f/2,b+d),a.end(),a.stroke())};A.prototype.paintForeground=function(a,c,b,f,d){var e=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,a,c,b,f,Math.min(d,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,f,d){var e=this.corner,g=Math.min(f,Math.max(e,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),h=Math.min(d,Math.max(1.5*
-e,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),n=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);n!=mxConstants.NONE&&(a.setFillColor(n),a.rect(c,b,f,d),a.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(a,c,b,f,d),a.setGradient(this.fill,this.gradient,c,b,f,d,this.gradientDirection)):a.setFillColor(this.fill);a.begin();a.moveTo(c,b);a.lineTo(c+g,b);a.lineTo(c+g,b+Math.max(0,
-h-1.5*e));a.lineTo(c+Math.max(0,g-e),b+h);a.lineTo(c,b+h);a.close();a.fillAndStroke();a.begin();a.moveTo(c+g,b);a.lineTo(c+f,b);a.lineTo(c+f,b+d);a.lineTo(c,b+d);a.lineTo(c,b+h);a.stroke()};mxCellRenderer.registerShape("umlFrame",I);mxPerimeter.LifelinePerimeter=function(a,c,b,f){f=A.prototype.size;null!=c&&(f=mxUtils.getValue(c.style,"size",f)*c.view.scale);c=parseFloat(c.style[mxConstants.STYLE_STROKEWIDTH]||1)*c.view.scale/2-1;b.x<a.getCenterX()&&(c=-1*(c+1));return new mxPoint(a.getCenterX()+
-c,Math.min(a.y+a.height,Math.max(a.y+f,b.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(a,c,b,f){f=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(a,c,b,f){f=parseFloat(c.style[mxConstants.STYLE_STROKEWIDTH]||1)*c.view.scale/2-1;null!=c.style.backboneSize&&(f+=parseFloat(c.style.backboneSize)*
-c.view.scale/2-1);if("south"==c.style[mxConstants.STYLE_DIRECTION]||"north"==c.style[mxConstants.STYLE_DIRECTION])return b.x<a.getCenterX()&&(f=-1*(f+1)),new mxPoint(a.getCenterX()+f,Math.min(a.y+a.height,Math.max(a.y,b.y)));b.y<a.getCenterY()&&(f=-1*(f+1));return new mxPoint(Math.min(a.x+a.width,Math.max(a.x,b.x)),a.getCenterY()+f)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(a,c,b,f){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(a,
-new mxRectangle(0,0,0,Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(c.style,"size",v.prototype.size))*c.view.scale))),c.style),c,b,f)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(a,c,b,d){var e=f.prototype.size;null!=c&&(e=mxUtils.getValue(c.style,"size",e));var g=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==
+mxRectangleShape.prototype.paintBackground=function(a,c,b,d,f){if(null==a.handJiggle)Ja.apply(this,arguments);else{var e=!0;null!=this.style&&(e="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(e||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)e||null!=this.fill&&this.fill!=mxConstants.NONE||(a.pointerEvents=!1),a.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?e=Math.min(d/2,Math.min(f/
+2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,e=Math.min(d*e,f*e)),a.moveTo(c+e,b),a.lineTo(c+d-e,b),a.quadTo(c+d,b,c+d,b+e),a.lineTo(c+d,b+f-e),a.quadTo(c+d,b+f,c+d-e,b+f),a.lineTo(c+e,b+f),a.quadTo(c,b+f,c,b+f-e),a.lineTo(c,b+e),a.quadTo(c,b,c+e,b)):(a.moveTo(c,b),a.lineTo(c+d,b),a.lineTo(c+d,b+f),a.lineTo(c,b+f),a.lineTo(c,b)),a.close(),a.end(),a.fillAndStroke()}};
+var Ka=mxRectangleShape.prototype.paintForeground;mxRectangleShape.prototype.paintForeground=function(a,c,b,d,f){null==a.handJiggle&&Ka.apply(this,arguments)};mxUtils.extend(m,mxRectangleShape);m.prototype.size=.1;m.prototype.isHtmlAllowed=function(){return!1};m.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var c=a.width,b=a.height;
+a=new mxRectangle(a.x,a.y,c,b);var d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,d=Math.max(d,Math.min(c*f,b*f));a.x+=Math.round(d);a.width-=Math.round(2*d)}return a};m.prototype.paintForeground=function(a,c,b,d,f){var e=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));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));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(C,mxActor);C.prototype.size=.2;C.prototype.fixedSize=20;C.prototype.isRoundable=function(){return!0};C.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",C);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+
+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(D,mxCylinder);D.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",D);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(B,mxShape);B.prototype.getLabelMargins=function(a){return new mxRectangle(a.width/6,0,0,0)};B.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",B);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);
+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*
+e,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),n=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);n!=mxConstants.NONE&&(a.setFillColor(n),a.rect(c,b,d,f),a.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(a,c,b,d,f),a.setGradient(this.fill,this.gradient,c,b,d,f,this.gradientDirection)):a.setFillColor(this.fill);a.begin();a.moveTo(c,b);a.lineTo(c+g,b);a.lineTo(c+g,b+Math.max(0,
+h-1.5*e));a.lineTo(c+Math.max(0,g-e),b+h);a.lineTo(c,b+h);a.close();a.fillAndStroke();a.begin();a.moveTo(c+g,b);a.lineTo(c+d,b);a.lineTo(c+d,b+f);a.lineTo(c,b+f);a.lineTo(c,b+h);a.stroke()};mxCellRenderer.registerShape("umlFrame",I);mxPerimeter.LifelinePerimeter=function(a,c,b,d){d=A.prototype.size;null!=c&&(d=mxUtils.getValue(c.style,"size",d)*c.view.scale);c=parseFloat(c.style[mxConstants.STYLE_STROKEWIDTH]||1)*c.view.scale/2-1;b.x<a.getCenterX()&&(c=-1*(c+1));return new mxPoint(a.getCenterX()+
+c,Math.min(a.y+a.height,Math.max(a.y+d,b.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(a,c,b,d){d=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(a,c,b,d){d=parseFloat(c.style[mxConstants.STYLE_STROKEWIDTH]||1)*c.view.scale/2-1;null!=c.style.backboneSize&&(d+=parseFloat(c.style.backboneSize)*
+c.view.scale/2-1);if("south"==c.style[mxConstants.STYLE_DIRECTION]||"north"==c.style[mxConstants.STYLE_DIRECTION])return b.x<a.getCenterX()&&(d=-1*(d+1)),new mxPoint(a.getCenterX()+d,Math.min(a.y+a.height,Math.max(a.y,b.y)));b.y<a.getCenterY()&&(d=-1*(d+1));return new mxPoint(Math.min(a.x+a.width,Math.max(a.x,b.x)),a.getCenterY()+d)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(a,c,b,d){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(a,
+new mxRectangle(0,0,0,Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(c.style,"size",v.prototype.size))*c.view.scale))),c.style),c,b,d)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(a,c,b,d){var e=f.prototype.size;null!=c&&(e=mxUtils.getValue(c.style,"size",e));var g=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_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,f){var d=g.prototype.size;null!=c&&(d=mxUtils.getValue(c.style,"size",d));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?(d=n*Math.max(0,Math.min(1,d)),h=[new mxPoint(e+d,h),new mxPoint(e+n-d,h),new mxPoint(e+n,h+m),new mxPoint(e,h+m),new mxPoint(e+d,h)]):c==mxConstants.DIRECTION_WEST?
-(d=n*Math.max(0,Math.min(1,d)),h=[new mxPoint(e,h),new mxPoint(e+n,h),new mxPoint(e+n-d,h+m),new mxPoint(e+d,h+m),new mxPoint(e,h)]):c==mxConstants.DIRECTION_NORTH?(d=m*Math.max(0,Math.min(1,d)),h=[new mxPoint(e,h+d),new mxPoint(e+n,h),new mxPoint(e+n,h+m),new mxPoint(e,h+m-d),new mxPoint(e,h+d)]):(d=m*Math.max(0,Math.min(1,d)),h=[new mxPoint(e,h),new mxPoint(e+n,h+d),new mxPoint(e+n,h+m-d),new mxPoint(e,h+m),new mxPoint(e,h)]);m=a.getCenterX();a=a.getCenterY();a=new mxPoint(m,a);f&&(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,f){var d="0"!=mxUtils.getValue(c.style,"fixedSize","0"),e=d?C.prototype.fixedSize:C.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?(d=d?Math.max(0,Math.min(n,e)):n*Math.max(0,Math.min(1,e)),h=[new mxPoint(g,h),new mxPoint(g+n-d,h),new mxPoint(g+n,a),new mxPoint(g+n-d,h+m),new mxPoint(g,h+m),new mxPoint(g+d,a),new mxPoint(g,h)]):c==mxConstants.DIRECTION_WEST?(d=d?Math.max(0,Math.min(n,e)):n*Math.max(0,Math.min(1,e)),h=[new mxPoint(g+d,h),new mxPoint(g+n,h),new mxPoint(g+n-d,a),new mxPoint(g+n,h+m),new mxPoint(g+d,h+m),new mxPoint(g,a),new mxPoint(g+d,h)]):c==mxConstants.DIRECTION_NORTH?(d=d?Math.max(0,
-Math.min(m,e)):m*Math.max(0,Math.min(1,e)),h=[new mxPoint(g,h+d),new mxPoint(r,h),new mxPoint(g+n,h+d),new mxPoint(g+n,h+m),new mxPoint(r,h+m-d),new mxPoint(g,h+m),new mxPoint(g,h+d)]):(d=d?Math.max(0,Math.min(m,e)):m*Math.max(0,Math.min(1,e)),h=[new mxPoint(g,h),new mxPoint(r,h+d),new mxPoint(g+n,h),new mxPoint(g+n,h+m-d),new mxPoint(r,h+m),new mxPoint(g,h+m-d),new mxPoint(g,h)]);r=new mxPoint(r,a);f&&(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,f){var d=x.prototype.size;null!=c&&(d=mxUtils.getValue(c.style,"size",d));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?(d=n*Math.max(0,Math.min(1,d)),g=[new mxPoint(m,g),new mxPoint(e+h,g+d),new mxPoint(e+h,g+n-d),new mxPoint(m,
-g+n),new mxPoint(e,g+n-d),new mxPoint(e,g+d),new mxPoint(m,g)]):(d=h*Math.max(0,Math.min(1,d)),g=[new mxPoint(e+d,g),new mxPoint(e+h-d,g),new mxPoint(e+h,a),new mxPoint(e+h-d,g+n),new mxPoint(e+d,g+n),new mxPoint(e,a),new mxPoint(e+d,g)]);m=new mxPoint(m,a);f&&(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,f,
-d){var e=parseFloat(mxUtils.getValue(this.style,"size",this.size));a.translate(c,b);a.ellipse((f-e)/2,0,e,e);a.fillAndStroke();a.begin();a.moveTo(f/2,e);a.lineTo(f/2,d);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,f,d){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(f/2,e+g);a.lineTo(f/2,d);a.end();a.stroke();a.begin();a.moveTo((f-e)/2-g,e/2);a.quadTo((f-e)/2-g,e+g,f/2,e+g);a.quadTo((f+e)/2+g,e+g,(f+e)/2+g,e/2);a.end();a.stroke()};mxCellRenderer.registerShape("requires",Q);mxUtils.extend(X,mxShape);X.prototype.paintBackground=function(a,c,b,f,d){a.translate(c,b);a.begin();a.moveTo(0,0);a.quadTo(f,0,f,d/2);a.quadTo(f,d,0,d);a.end();a.stroke()};mxCellRenderer.registerShape("requiredInterface",X);mxUtils.extend(U,mxShape);U.prototype.inset=
-2;U.prototype.paintBackground=function(a,c,b,f,d){var e=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(c,b);a.ellipse(0,e,f-2*e,d-2*e);a.fillAndStroke();a.begin();a.moveTo(f/2,0);a.quadTo(f,0,f,d/2);a.quadTo(f,d,f/2,d);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,f,d,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*d-c/2,n=.7*d-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(f,0),a.lineTo(f,d),a.lineTo(b,d),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,f,d){var e=Math.min(4,Math.min(f/5,d/5));0<f&&0<d&&(a.ellipse(c+e,b+e,f-2*e,d-2*e),a.fillAndStroke());a.setShadow(!1);this.outerStroke&&(a.ellipse(c,b,f,d),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=
+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?C.prototype.fixedSize:C.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,
+"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,f,d){c=Math.min(d,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,d),new mxPoint(0,c),new mxPoint(f,0),new mxPoint(f,d)],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,f,d){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(f*g,d*g));g=Math.max(e,Math.min(f,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));e=Math.max(e,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.begin();a.moveTo(c,b+e);a.lineTo(c+f,b+e);a.end();a.stroke();a.begin();a.moveTo(c+g,b);a.lineTo(c+g,b+d);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,f,d){c=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));b=Math.max(0,Math.min(d,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(f,0),new mxPoint(f,b),new mxPoint(c,b),new mxPoint(c,d),new mxPoint(0,d)],this.isRounded,e,!0);a.end()};
-mxCellRenderer.registerShape("corner",S);mxUtils.extend(L,mxActor);L.prototype.redrawPath=function(a,c,b,f,d){a.moveTo(0,0);a.lineTo(0,d);a.end();a.moveTo(f,0);a.lineTo(f,d);a.end();a.moveTo(0,d/2);a.lineTo(f,d/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,f,d){c=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));b=Math.max(0,Math.min(d,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(f,0),new mxPoint(f,b),new mxPoint((f+c)/2,b),new mxPoint((f+c)/2,d),new mxPoint((f-c)/2,d),new mxPoint((f-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=
-function(a,c,b,f,d){var e=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));c=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));b=(d-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(f-c,b),new mxPoint(f-c,0),new mxPoint(f,d/2),new mxPoint(f-c,d),new mxPoint(f-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,f,d){var e=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",T.prototype.arrowWidth))));c=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",T.prototype.arrowSize))));b=(d-e)/2;var e=b+e,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,d/2),new mxPoint(c,0),new mxPoint(c,b),new mxPoint(f-c,b),new mxPoint(f-c,0),new mxPoint(f,
-d/2),new mxPoint(f-c,d),new mxPoint(f-c,e),new mxPoint(c,e),new mxPoint(c,d)],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,f,d){c=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(c,0);a.lineTo(f,0);a.quadTo(f-2*c,d/2,f,d);a.lineTo(c,d);a.quadTo(c-2*c,d/2,c,0);a.close();a.end()};mxCellRenderer.registerShape("dataStorage",R);mxUtils.extend(V,
-mxActor);V.prototype.redrawPath=function(a,c,b,f,d){a.moveTo(0,0);a.quadTo(f,0,f,d/2);a.quadTo(f,d,0,d);a.close();a.end()};mxCellRenderer.registerShape("or",V);mxUtils.extend(ga,mxActor);ga.prototype.redrawPath=function(a,c,b,f,d){a.moveTo(0,0);a.quadTo(f,0,f,d/2);a.quadTo(f,d,0,d);a.quadTo(f/2,d/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,f,d){c=Math.min(f/
-2,Math.min(d,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(f-c,0),new mxPoint(f,.8*c),new mxPoint(f,d),new mxPoint(0,d),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,f,d){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,0),new mxPoint(f,0),new mxPoint(f,d-c),new mxPoint(f/2,d),new mxPoint(0,d-c)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("offPageConnector",aa);mxUtils.extend(Z,mxEllipse);Z.prototype.paintVertexShape=function(a,c,b,f,d){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();
-a.moveTo(c+f/2,b+d);a.lineTo(c+f,b+d);a.end();a.stroke()};mxCellRenderer.registerShape("tapeData",Z);mxUtils.extend(pa,mxEllipse);pa.prototype.paintVertexShape=function(a,c,b,f,d){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(c,b+d/2);a.lineTo(c+f,b+d/2);a.end();a.stroke();a.begin();a.moveTo(c+f/2,b);a.lineTo(c+f/2,b+d);a.end();a.stroke()};mxCellRenderer.registerShape("orEllipse",pa);mxUtils.extend(qa,mxEllipse);qa.prototype.paintVertexShape=function(a,
-c,b,f,d){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(c+.145*f,b+.145*d);a.lineTo(c+.855*f,b+.855*d);a.end();a.stroke();a.begin();a.moveTo(c+.855*f,b+.145*d);a.lineTo(c+.145*f,b+.855*d);a.end();a.stroke()};mxCellRenderer.registerShape("sumEllipse",qa);mxUtils.extend(fa,mxRhombus);fa.prototype.paintVertexShape=function(a,c,b,f,d){mxRhombus.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(c,b+d/2);a.lineTo(c+f,b+d/2);
-a.end();a.stroke()};mxCellRenderer.registerShape("sortShape",fa);mxUtils.extend(la,mxEllipse);la.prototype.paintVertexShape=function(a,c,b,f,d){a.begin();a.moveTo(c,b);a.lineTo(c+f,b);a.lineTo(c+f/2,b+d/2);a.close();a.fillAndStroke();a.begin();a.moveTo(c,b+d);a.lineTo(c+f,b+d);a.lineTo(c+f/2,b+d/2);a.close();a.fillAndStroke()};mxCellRenderer.registerShape("collate",la);mxUtils.extend(ua,mxEllipse);ua.prototype.paintVertexShape=function(a,c,b,f,d){var e=b+d-5;a.begin();a.moveTo(c,b);a.lineTo(c,b+d);
-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+f,e);a.moveTo(c+f,b);a.lineTo(c+f,b+d);a.moveTo(c+f,e);a.lineTo(c+f-10,e-5);a.moveTo(c+f,e);a.lineTo(c+f-10,e+5);a.end();a.stroke()};mxCellRenderer.registerShape("dimension",ua);mxUtils.extend(ma,mxEllipse);ma.prototype.paintVertexShape=function(a,c,b,f,d){this.outline||a.setStrokeColor(null);mxRectangleShape.prototype.paintBackground.apply(this,arguments);null!=this.style&&(a.setStrokeColor(this.stroke),a.rect(c,
-b,f,d),a.fill(),a.begin(),a.moveTo(c,b),"1"==mxUtils.getValue(this.style,"top","1")?a.lineTo(c+f,b):a.moveTo(c+f,b),"1"==mxUtils.getValue(this.style,"right","1")?a.lineTo(c+f,b+d):a.moveTo(c+f,b+d),"1"==mxUtils.getValue(this.style,"bottom","1")?a.lineTo(c,b+d):a.moveTo(c,b+d),"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,f,d){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();"vertical"==mxUtils.getValue(this.style,"line")?(a.moveTo(c+f/2,b),a.lineTo(c+f/2,b+d)):(a.moveTo(c,b+d/2),a.lineTo(c+f,b+d/2));a.end();a.stroke()};mxCellRenderer.registerShape("lineEllipse",sa);mxUtils.extend(ha,mxActor);ha.prototype.redrawPath=function(a,c,b,f,d){c=Math.min(f,d/2);a.moveTo(0,0);a.lineTo(f-c,0);a.quadTo(f,0,f,d/2);a.quadTo(f,d,f-c,d);a.lineTo(0,d);a.close();a.end()};mxCellRenderer.registerShape("delay",
-ha);mxUtils.extend(ca,mxActor);ca.prototype.size=.2;ca.prototype.redrawPath=function(a,c,b,f,d){c=Math.min(d,f);var e=Math.max(0,Math.min(c,c*parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=(d-e)/2;b=c+e;var g=(f-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(f,c);a.lineTo(f,b);a.lineTo(e,b);a.lineTo(e,d);a.lineTo(g,d);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,f,d){c=Math.min(f,d/2);b=Math.min(f-c,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*f);a.moveTo(0,d/2);a.lineTo(b,0);a.lineTo(f-c,0);a.quadTo(f,0,f,d/2);a.quadTo(f,d,f-c,d);a.lineTo(b,d);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 f=[],d=0;d<c.length;d++)f.push(mxUtils.clone(c[d]));
-var d=a.state.dashed,e=a.state.fixDash;ia.prototype.origPaintEdgeShape.apply(this,[a,f,b]);3<=a.state.strokeWidth&&(f=mxUtils.getValue(this.style,"fillColor",null),null!=f&&(a.setStrokeColor(f),a.setStrokeWidth(a.state.strokeWidth-2),a.setDashed(d,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,f,d,e,g,h,n,m){var r=d*(g+n+1),t=e*(g+n+1);return function(){a.begin();a.moveTo(f.x-r/2-t/2,f.y-t/2+r/2);a.lineTo(f.x+t/2-3*r/2,f.y-3*t/2-r/2);a.stroke()}});mxMarker.addMarker("cross",function(a,c,b,f,d,e,g,h,n,m){var r=d*(g+n+1),t=e*(g+n+1);return function(){a.begin();
-a.moveTo(f.x-r/2-t/2,f.y-t/2+r/2);a.lineTo(f.x+t/2-3*r/2,f.y-3*t/2-r/2);a.moveTo(f.x-r/2+t/2,f.y-t/2-r/2);a.lineTo(f.x-t/2-3*r/2,f.y-3*t/2+r/2);a.stroke()}});mxMarker.addMarker("circle",wa);mxMarker.addMarker("circlePlus",function(a,c,b,f,d,e,g,h,n,m){var r=f.clone(),t=wa.apply(this,arguments),x=d*(g+2*n),v=e*(g+2*n);return function(){t.apply(this,arguments);a.begin();a.moveTo(r.x-d*n,r.y-e*n);a.lineTo(r.x-2*x+d*n,r.y-2*v+e*n);a.moveTo(r.x-x-v+e*n,r.y-v+x-d*n);a.lineTo(r.x+v-x-e*n,r.y-v-x+d*n);a.stroke()}});
-mxMarker.addMarker("async",function(a,c,b,f,d,e,g,h,n,m){c=d*n*1.118;b=e*n*1.118;d*=g+n;e*=g+n;var r=f.clone();r.x-=c;r.y-=b;f.x+=1*-d-c;f.y+=1*-e-b;return function(){a.begin();a.moveTo(r.x,r.y);h?a.lineTo(r.x-d-e/2,r.y-e+d/2):a.lineTo(r.x+e/2-d,r.y-e-d/2);a.lineTo(r.x-d,r.y-e);a.close();m?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync",function(a){a=null!=a?a:2;return function(c,b,f,d,e,g,h,n,m,r){e*=h+m;g*=h+m;var t=d.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,f,d,e,g){g=a.shape.getEdgeWidth()*a.view.scale+b;return new mxPoint(e.x+f*c/4+d*g/2,e.y+d*c/4-f*g/2)},function(c,f,d,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,f,d){return P(a,c,function(c){var d=a.absolutePoints,e=d.length-1;c=a.view.translate;var g=
-a.view.scale,h=b?d[0]:d[e],d=b?d[1]:d[e-1],e=d.x-h.x,n=d.y-h.y,m=Math.sqrt(e*e+n*n),h=f.call(this,m,e/m,n/m,h,d);return new mxPoint(h.x/g-c.x,h.y/g-c.y)},function(c,f,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);f.x=(f.x+c.x)*n;f.y=(f.y+c.y)*n;d.call(this,t,h/t,r/t,m,g,f,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))),f=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",T.prototype.arrowSize)));return new mxPoint(c.x+(1-f)*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(f){var d=[P(f,["size"],function(b){var f=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+f,b.y+f)},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(f.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(ja(f));return d}},xa=function(a,c,b,f,d){b=null!=b?b:1;return function(e){var g=[P(e,["size"],function(c){var b=null!=d?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,f=parseFloat(mxUtils.getValue(this.state.style,
-"size",b?d:a));return new mxPoint(c.x+Math.max(0,Math.min(c.width,f*(b?1:c.width))),c.getCenterY())},function(a,c,f){var g=null!=d?"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(f.getEvent())&&(a=e.view.graph.snap(a));this.state.style.size=a},null,f)];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 f=
-null!=c?c:b.height/8;if("1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var d=mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(b.x+b.width-Math.min(b.width/2,d),b.y+f)}d=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)*d),b.y+f)},function(c,b,f){"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,f,d,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=f;g.ignoreGrid=null!=d?d:!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,f,d,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(d.x+b*(e+a.shape.strokewidth*a.view.scale)+f*c/2,d.y+f*(e+a.shape.strokewidth*a.view.scale)-b*c/2)},function(b,f,d,e,g,h,n){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,h.x,h.y));f=mxUtils.ptLineDist(e.x,e.y,e.x+d,e.y-f,h.x,h.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(f-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,f,d,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(d.x+b*(e+a.shape.strokewidth*a.view.scale)+f*c/2,d.y+f*(e+a.shape.strokewidth*a.view.scale)-b*c/2)},function(b,f,d,e,g,h,n){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,h.x,h.y));f=mxUtils.ptLineDist(e.x,e.y,e.x+d,e.y-f,h.x,h.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(f-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())&&
+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,
+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=
+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=
+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)*
+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())&&
(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE],a.style.endWidth=a.style.startWidth);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]),Math.abs(parseFloat(a.style.startWidth)-parseFloat(a.style.endWidth))<c&&(a.style.startWidth=a.style.endWidth))})));mxUtils.getValue(a.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=
-mxConstants.NONE&&(b.push(ta(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(c,b,f,d,e){c=(a.shape.getEdgeWidth()-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(d.x+b*(e+a.shape.strokewidth*a.view.scale)-f*c/2,d.y+f*(e+a.shape.strokewidth*a.view.scale)+b*c/2)},function(b,f,d,e,g,h,n){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,h.x,h.y));f=mxUtils.ptLineDist(e.x,e.y,
-e.x+d,e.y-f,h.x,h.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(f-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_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]);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])})),b.push(ta(a,
-["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(c,b,f,d,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(d.x+b*(e+a.shape.strokewidth*a.view.scale)-f*c/2,d.y+f*(e+a.shape.strokewidth*a.view.scale)+b*c/2)},function(b,f,d,e,g,h,n){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,h.x,h.y));f=mxUtils.ptLineDist(e.x,e.y,e.x+d,e.y-
-f,h.x,h.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(f-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]=
+mxConstants.NONE&&(b.push(ta(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(c,b,d,f,e){c=(a.shape.getEdgeWidth()-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.width=Math.round(2*b)/a.view.scale;mxEvent.isControlDown(n.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]);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])})),b.push(ta(a,
+["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,
["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,
@@ -2556,7 +2556,7 @@ c.x)/b*2)))})]},note:function(a){return[P(a,["size"],function(a){var c=Math.max(
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-
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))),f=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+f),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,
+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=
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=
@@ -2565,9 +2565,9 @@ Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"tabWidth",p.proto
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(C.prototype.size,!0,null,!0,C.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,f,d){var e=a.view;f=null!=f&&0<f.length?f[0]:null;var g=a.absolutePoints,h=g[0],g=g[g.length-1];null!=
-f&&(f=e.transformControlPoint(a,f));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 f=c-v.y;c=(t*a-r*f)/(n*t-m*r);a=(m*a-n*f)/(m*r-n*t);x?(b&&(v=new mxPoint(v.x+n*c,v.y+m*c),d.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),d.push(v)),v=new mxPoint(v.x+
-n*c,v.y+m*c));d.push(v)};var v=h;null==f&&(f=new mxPoint(h.x+(g.x-h.x)/2,h.y+(g.y-h.y)/2));a(f.x,f.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=[];
+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=[];
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;
@@ -2681,15 +2681,16 @@ mxResources.get("synchronize"),mxUtils.bind(this,function(){this.reloadFile(a,b)
DrawioFile.prototype.showCopyDialog=function(a,b,e){this.invalidChecksum=this.inConflictState=!1;this.addUnsavedStatus();this.ui.showError(mxResources.get("externalChanges"),mxResources.get("fileChangedOverwriteDialog"),mxResources.get("makeCopy"),mxUtils.bind(this,function(){this.copyFile(a,b)}),null,mxResources.get("overwrite"),e,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog()}),360,this.constructor==DriveFile?180:150);null!=this.ui.dialog&&null!=this.ui.dialog.container&&
this.constructor==DriveFile&&(e=this.ui.createRealtimeNotice(),e.style.left="0",e.style.right="0",e.style.borderRadius="0",e.style.borderLeftStyle="none",e.style.borderRightStyle="none",e.style.marginBottom="26px",e.style.padding="8px 0 8px 0",this.ui.dialog.container.appendChild(e))};
DrawioFile.prototype.showConflictDialog=function(a,b){this.ui.showError(mxResources.get("externalChanges"),mxResources.get("fileChangedSyncDialog"),mxResources.get("overwrite"),a,null,mxResources.get("synchronize"),b,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog();this.handleFileError(null,!1)}),340,150)};
-DrawioFile.prototype.redirectToNewApp=function(a){this.ui.spinner.stop();if(!this.redirectDialogShowing){this.redirectDialogShowing=!0;var b=window.location.protocol+"//"+window.location.host+"/"+this.ui.getSearch("create title mode url drive splash state".split(" "))+"#"+this.getHash(),e=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("loading"));this.redirectDialogShowing=!1;window.location.href==b?window.location.reload():window.location.href=b});null!=a?this.ui.confirm(mxResources.get("redirectToNewApp"),
-e,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;null!=a&&a()})):this.ui.alert(mxResources.get("redirectToNewApp"),e)}};DrawioFile.prototype.handleFileSuccess=function(a){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(this.isModified()?this.fileChanged():a?(this.addAllSavedStatus(),null!=this.sync&&(this.sync.resetUpdateStatusThread(),this.sync.remoteFileChanged&&(this.sync.remoteFileChanged=!1,this.sync.fileChangedNotify()))):this.ui.editor.setStatus(""))};
+DrawioFile.prototype.redirectToNewApp=function(a){this.ui.spinner.stop();if(!this.redirectDialogShowing){this.redirectDialogShowing=!0;var b=window.location.protocol+"//"+window.location.host+"/"+this.ui.getSearch("create title mode url drive splash state".split(" "))+"#"+this.getHash(),e=mxUtils.bind(this,function(){var a=mxUtils.bind(this,function(){this.redirectDialogShowing=!1;window.location.href==b?window.location.reload():window.location.href=b});this.isModified()?this.ui.confirm(mxResources.get("allChangesLost"),
+mxUtils.bind(this,function(){this.redirectDialogShowing=!1}),a,mxResources.get("cancel"),mxResources.get("discardChanges")):a()});null!=a?this.ui.confirm(mxResources.get("redirectToNewApp"),e,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;null!=a&&a()})):this.ui.alert(mxResources.get("redirectToNewApp"),e)}};
+DrawioFile.prototype.handleFileSuccess=function(a){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(this.isModified()?this.fileChanged():a?(this.addAllSavedStatus(),null!=this.sync&&(this.sync.resetUpdateStatusThread(),this.sync.remoteFileChanged&&(this.sync.remoteFileChanged=!1,this.sync.fileChangedNotify()))):this.ui.editor.setStatus(""))};
DrawioFile.prototype.handleFileError=function(a,b){this.ui.spinner.stop();if(this.ui.getCurrentFile()==this)if(this.inConflictState)this.handleConflictError(a,b);else if(this.isModified()&&this.addUnsavedStatus(a),b)this.ui.handleError(a,null!=a?mxResources.get("errorSavingFile"):null);else if(!this.isModified()){var e=null!=a?null!=a.error?a.error.message:a.message:null;null!=e&&60<e.length&&(e=e.substring(0,60)+"...");this.ui.editor.setStatus('<div class="geStatusAlert" style="cursor:pointer;overflow:hidden;">'+
mxUtils.htmlEntities(mxResources.get("error"))+(null!=e?" ("+mxUtils.htmlEntities(e)+")":"")+"</div>")}};
DrawioFile.prototype.handleConflictError=function(a,b){var e=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),d=mxUtils.bind(this,function(a){this.handleFileError(a,!0)}),k=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("saving"))&&(this.ui.editor.setStatus(""),this.save(!0,e,d,null,!0,this.constructor==GitHubFile&&null!=a?a.commitMessage:null))}),l=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("updatingDocument"))&&this.synchronizeFile(mxUtils.bind(this,
function(){this.ui.spinner.stop();this.ui.spinner.spin(document.body,mxResources.get("saving"))&&this.save(!0,e,d,null,null,this.constructor==GitHubFile&&null!=a?a.commitMessage:null)}),d)});"none"==DrawioFile.SYNC?this.showCopyDialog(e,d,k):this.invalidChecksum?this.showRefreshDialog(e,d):b?this.showConflictDialog(k,l):this.addConflictStatus(mxUtils.bind(this,function(){this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("updatingDocument")));this.synchronizeFile(e,d)}),this.getErrorMessage(a))};
DrawioFile.prototype.getErrorMessage=function(a){return null!=a?null!=a.error?a.error.message:a.message:null};
DrawioFile.prototype.fileChanged=function(){this.setModified(!0);this.isAutosave()?(this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get("saving"))+"..."),this.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(a){null==this.autosaveThread&&this.handleFileSuccess(!0)}),mxUtils.bind(this,function(a){this.handleFileError(a)}))):this.isAutosaveOptional()&&this.ui.editor.autosave||this.inConflictState||this.addUnsavedStatus()};
-DrawioFile.prototype.fileSaved=function(a,b,e,d){this.invalidChecksum=this.inConflictState=!1;this.checkPages();null==this.sync?(this.shadowData=a,this.shadowPages=null,null!=e&&e()):this.sync.fileSaved(this.ui.getPagesForNode(mxUtils.parseXml(a).documentElement),b,e,d)};
+DrawioFile.prototype.fileSaved=function(a,b,e,d){try{this.invalidChecksum=this.inConflictState=!1,this.checkPages(),null==this.sync?(this.shadowData=a,this.shadowPages=null,null!=e&&e()):this.sync.fileSaved(this.ui.getPagesForNode(mxUtils.parseXml(a).documentElement),b,e,d)}catch(k){this.invalidChecksum=this.inConflictState=!0;null!=d&&d(k);try{this.sendErrorReport("Error in fileSaved",null,k)}catch(l){}}};
DrawioFile.prototype.autosave=function(a,b,e,d){null==this.lastAutosave&&(this.lastAutosave=(new Date).getTime());a=(new Date).getTime()-this.lastAutosave<b?a:0;this.clearAutosave();var k=window.setTimeout(mxUtils.bind(this,function(){this.lastAutosave=null;this.autosaveThread==k&&(this.autosaveThread=null);if(this.isModified()&&this.isAutosaveNow()){var a=this.isAutosaveRevision();a&&(this.lastAutosaveRevision=(new Date).getTime());this.save(a,mxUtils.bind(this,function(a){this.autosaveCompleted();
null!=e&&e(a)}),mxUtils.bind(this,function(a){null!=d&&d(a)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=e&&e(null)}),a);this.autosaveThread=k};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){};DrawioFile.prototype.clearAutosave=function(){null!=this.autosaveThread&&(window.clearTimeout(this.autosaveThread),this.autosaveThread=null)};
DrawioFile.prototype.isAutosaveRevision=function(){var a=(new Date).getTime();return null==this.lastAutosaveRevision||a-this.lastAutosaveRevision>this.maxAutosaveRevisionDelay};DrawioFile.prototype.descriptorChanged=function(){this.fireEvent(new mxEventObject("descriptorChanged"))};DrawioFile.prototype.contentChanged=function(){this.fireEvent(new mxEventObject("contentChanged"))};
@@ -2722,29 +2723,29 @@ dispName:"Lifeline"},{val:"orthogonalPerimeter",dispName:"Orthogonal"},{val:"bac
{name:"resizable",dispName:"Resizable",type:"bool",defVal:!0},{name:"resizeWidth",dispName:"Resize Width",type:"bool",defVal:!1},{name:"resizeHeight",dispName:"Resize Height",type:"bool",defVal:!1},{name:"rotatable",dispName:"Rotatable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0}];Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## The label is concatenated in the form fromlabel + label + tolabel if all are defined.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40.\n#\n# edgespacing: 40\n#\n## Name of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle. Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nEvan Miller,CFO,emi,Office 1,,me@example.com,#dae8fc,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Evan Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nRon Donovan,System Admin,rdo,Office 3,Evan Miller,me@example.com,#d5e8d4,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nTessa Valet,HR Director,tva,Office 4,Evan Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\n';
Editor.shadowOptionEnabled=!0;Editor.config=null;Editor.configVersion=null;Editor.configure=function(a,c){if(null!=a){Editor.config=a;Editor.configVersion=a.version;Menus.prototype.defaultFonts=a.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors=a.presetColors||ColorDialog.prototype.presetColors;ColorDialog.prototype.defaultColors=a.defaultColors||ColorDialog.prototype.defaultColors;StyleFormatPanel.prototype.defaultColorSchemes=a.defaultColorSchemes||StyleFormatPanel.prototype.defaultColorSchemes;
Graph.prototype.defaultEdgeLength=a.defaultEdgeLength||Graph.prototype.defaultEdgeLength;null!=a.templateFile&&(EditorUi.templateFile=a.templateFile);a.customFonts&&(Menus.prototype.defaultFonts=a.customFonts.concat(Menus.prototype.defaultFonts));a.customPresetColors&&(ColorDialog.prototype.presetColors=a.customPresetColors.concat(ColorDialog.prototype.presetColors));null!=a.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=a.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));
-if(null!=a.css){var b=document.createElement("style");b.setAttribute("type","text/css");b.appendChild(document.createTextNode(a.css));var f=document.getElementsByTagName("script")[0];f.parentNode.insertBefore(b,f)}null!=a.libraries&&(Sidebar.prototype.customEntries=a.libraries);null!=a.enabledLibraries&&(Sidebar.prototype.enabledLibraries=a.enabledLibraries);null!=a.defaultLibraries&&(Sidebar.prototype.defaultEntries=a.defaultLibraries);null!=a.defaultCustomLibraries&&(Editor.defaultCustomLibraries=
+if(null!=a.css){var b=document.createElement("style");b.setAttribute("type","text/css");b.appendChild(document.createTextNode(a.css));var d=document.getElementsByTagName("script")[0];d.parentNode.insertBefore(b,d)}null!=a.libraries&&(Sidebar.prototype.customEntries=a.libraries);null!=a.enabledLibraries&&(Sidebar.prototype.enabledLibraries=a.enabledLibraries);null!=a.defaultLibraries&&(Sidebar.prototype.defaultEntries=a.defaultLibraries);null!=a.defaultCustomLibraries&&(Editor.defaultCustomLibraries=
a.defaultCustomLibraries);null!=a.enableCustomLibraries&&(Editor.enableCustomLibraries=a.enableCustomLibraries);null!=a.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=a.defaultVertexStyle);null!=a.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=a.defaultEdgeStyle);a.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=a.emptyDiagramXml);a.thumbWidth&&(Sidebar.prototype.thumbWidth=a.thumbWidth);a.thumbHeight&&(Sidebar.prototype.thumbHeight=a.thumbHeight);a.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=
-a.emptyLibraryXml);a.sidebarWidth&&(EditorUi.prototype.hsplitPosition=a.sidebarWidth);a.fontCss&&(b=document.createElement("style"),b.setAttribute("type","text/css"),b.appendChild(document.createTextNode(a.fontCss)),f=document.getElementsByTagName("script")[0],f.parentNode.insertBefore(b,f),Editor.prototype.fontCss=a.fontCss);if(null!=a.plugins&&!c)for(App.initPluginCallback(),b=0;b<a.plugins.length;b++)mxscript(a.plugins[b])}};Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";
+a.emptyLibraryXml);a.sidebarWidth&&(EditorUi.prototype.hsplitPosition=a.sidebarWidth);a.fontCss&&(b=document.createElement("style"),b.setAttribute("type","text/css"),b.appendChild(document.createTextNode(a.fontCss)),d=document.getElementsByTagName("script")[0],d.parentNode.insertBefore(b,d),Editor.prototype.fontCss=a.fontCss);if(null!=a.plugins&&!c)for(App.initPluginCallback(),b=0;b<a.plugins.length;b++)mxscript(a.plugins[b])}};Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";
Editor.GUID_LENGTH=20;Editor.guid=function(a){a=null!=a?a:Editor.GUID_LENGTH;for(var c=[],b=0;b<a;b++)c.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return c.join("")};Editor.prototype.useForeignObjectForMath=!1;Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;var a=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(c){c=null!=c&&"mxlibrary"!=c.nodeName?this.extractGraphModel(c):null;if(null!=c){var b=
-c.getElementsByTagName("parsererror");if(null!=b&&0<b.length){var b=b[0],f=b.getElementsByTagName("div");null!=f&&0<f.length&&(b=f[0]);throw{message:mxUtils.getTextContent(b)};}if("mxGraphModel"==c.nodeName){b=c.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=b&&""!=b)b!=this.graph.currentStyle&&(f=null!=this.graph.themes?this.graph.themes[b]:mxUtils.load(STYLE_PATH+"/"+b+".xml").getDocumentElement(),null!=f&&(d=new mxCodec(f.ownerDocument),d.decode(f,this.graph.getStylesheet())));
-else if(f=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement(),null!=f){var d=new mxCodec(f.ownerDocument);d.decode(f,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&&
+c.getElementsByTagName("parsererror");if(null!=b&&0<b.length){var b=b[0],d=b.getElementsByTagName("div");null!=d&&0<d.length&&(b=d[0]);throw{message:mxUtils.getTextContent(b)};}if("mxGraphModel"==c.nodeName){b=c.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=b&&""!=b)b!=this.graph.currentStyle&&(d=null!=this.graph.themes?this.graph.themes[b]:mxUtils.load(STYLE_PATH+"/"+b+".xml").getDocumentElement(),null!=d&&(f=new mxCodec(d.ownerDocument),f.decode(d,this.graph.getStylesheet())));
+else if(d=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement(),null!=d){var 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(D){}return!1};Editor.prototype.extractGraphModel=function(a,c){if(null!=a&&"undefined"!==typeof pako){var b=a.ownerDocument.getElementsByTagName("div"),f=[];if(null!=b&&0<b.length)for(var d=0;d<b.length;d++)if("mxgraph"==b[d].getAttribute("class")){f.push(b[d]);
-break}0<f.length&&(b=f[0].getAttribute("data-mxgraph"),null!=b?(f=JSON.parse(b),null!=f&&null!=f.xml&&(f=mxUtils.parseXml(f.xml),a=f.documentElement)):(f=f[0].getElementsByTagName("div"),0<f.length&&(b=mxUtils.getTextContent(f[0]),b=this.graph.decompress(b),0<b.length&&(f=mxUtils.parseXml(b),a=f.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||(f=null,"diagram"==a.nodeName?f=a:"mxfile"==a.nodeName&&(b=a.getElementsByTagName("diagram"),0<b.length&&(f=b[Math.max(0,Math.min(b.length-1,urlParams.page||0))])),null!=f&&(b=this.graph.decompress(mxUtils.getTextContent(f)),null!=b&&0<b.length&&(a=mxUtils.parseXml(b).documentElement)));null==a||"mxGraphModel"==a.nodeName||c&&"mxfile"==a.nodeName||
+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(D){}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=
function(){d.apply(this,arguments);mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath&&null!=Editor.MathJaxRender?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=function(a,c){a=null!=a?a:"https://math.draw.io/current/MathJax.js?config=TeX-MML-AM_HTMLorMML";Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(a){window.setTimeout(function(){"hidden"!=
a.style.visibility&&MathJax.Hub.Queue(["Typeset",MathJax.Hub,a])},0)};window.MathJax={skipStartupTypeset:!0,showMathMenu:!1,messageStyle:"none",AuthorInit:function(){MathJax.Hub.Config(c||{jax:["input/TeX","input/MathML","input/AsciiMath","output/HTML-CSS"],extensions:["tex2jax.js","mml2jax.js","asciimath2jax.js"],"HTML-CSS":{imageFont:null},TeX:{extensions:["AMSmath.js","AMSsymbols.js","noErrors.js","noUndefined.js"]},tex2jax:{ignoreClass:"mxCellEditor"},asciimath2jax:{ignoreClass:"mxCellEditor"}});
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 b=Editor.prototype.init;Editor.prototype.init=function(){b.apply(this,arguments);this.graph.addListener(mxEvent.SIZE,mxUtils.bind(this,function(a,
-c){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 c=[];a.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\[\S\s][^"\\]*)*)"|([^,'"\s\\]*(?:\s+[^,'"\s\\]+)*))\s*(?:,|$)/g,function(a,b,f,d){void 0!==b?c.push(b.replace(/\\'/g,"'")):void 0!==f?c.push(f.replace(/\\"/g,'"')):void 0!==d&&c.push(d);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()};
+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,f=this.createOption(mxResources.get("shadow"),function(){return b.shadowVisible},function(a){var f=new ChangePageSetup(c);f.ignoreColor=!0;f.ignoreImage=!0;f.shadowVisible=a;b.model.execute(f)},{install:function(a){this.listener=function(){a(b.shadowVisible)};c.addListener("shadowVisibleChanged",this.listener)},destroy:function(){c.removeListener(this.listener)}});
-Editor.shadowOptionEnabled||(f.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(f,60));a.appendChild(f)}return a};var c=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(a){a=c.apply(this,arguments);var b=this.editorUi,f=b.editor.graph;if(f.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()&&f.isEnabled()&&"undefined"!==typeof MathJax){d=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)}});d.style.paddingTop="5px";a.appendChild(d);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";d.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",
+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)}});
+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",
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,
@@ -2764,54 +2765,54 @@ type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.offPageConnector.pro
{fill:"#d5e8d4",stroke:"#82b366"},{fill:"#ffe6cc",stroke:"#d79b00"},{fill:"#fff2cc",stroke:"#d6b656"},{fill:"#f8cecc",stroke:"#b85450"},{fill:"#e1d5e7",stroke:"#9673a6"}],[{fill:"#60a917",stroke:"#2D7600",font:"#ffffff"},{fill:"#008a00",stroke:"#005700",font:"#ffffff"},{fill:"#1ba1e2",stroke:"#006EAF",font:"#ffffff"},{fill:"#0050ef",stroke:"#001DBC",font:"#ffffff"},{fill:"#6a00ff",stroke:"#3700CC",font:"#ffffff"},{fill:"#aa00ff",stroke:"#7700CC",font:"#ffffff"},{fill:"#d80073",stroke:"#A50040",font:"#ffffff"},
{fill:"#a20025",stroke:"#6F0000",font:"#ffffff"}],[{fill:"#e51400",stroke:"#B20000",font:"#ffffff"},{fill:"#fa6800",stroke:"#C73500",font:"#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,c,b){if(null!=c){var f=function(a){if(null!=a)if(b)for(var f=0;f<a.length;f++)c[a[f].name]=
-a[f];else for(var d in c){for(var e=!1,f=0;f<a.length;f++)if(a[f].name==d&&a[f].type==c[d].type){e=!0;break}e||delete c[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 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==
+{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(B){}}};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 f(a,
-c,b,f){v.getModel().beginUpdate();try{var d=[],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!=f?g.splice(f,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()),d.push(b.countProperty),e.push(g.length))}v.setCellStyles(a,c,v.getSelectionCells());
-d.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());d.push(b.dependentProps[a]);e.push(m)}r.editorUi.fireEvent(new mxEventObject("styleChanged","keys",d,"values",e,"cells",v.getSelectionCells()))}finally{v.getModel().endUpdate()}}function d(c,b,f){var d=mxUtils.getOffset(a,
-!0),e=mxUtils.getOffset(c,!0);b.style.position="absolute";b.style.left=e.x-d.x+"px";b.style.top=e.y-d.y+"px";b.style.width=c.offsetWidth+"px";b.style.height=c.offsetHeight-(f?4:0)+"px";b.style.zIndex=5}function e(a,c,b){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=c&&"none"!=c?c:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(r,function(e){this.editorUi.pickColor(c,
-function(c){d.style.background="none"==c?"url('"+Dialog.prototype.noColorImage+"')":c;f(a,c,b)});mxEvent.consume(e)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(d);return btn}function g(a,c,b,d,e,g,h){null!=c&&(c=c.split(","),t.push({name:a,values:c,type:b,defVal:d,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:d,countProperty:e},r=m(a,"",v,0==r%2,h);f(a,d,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,f,d,e,g){if(0<d){var h=Array(d);c=null!=c?c.split(","):[];for(var n=0;n<d;n++)h[n]=null!=c[n]?c[n]:null!=f?f:"";t.push({name:a,values:h,type:b,defVal:f,parentRow:e,flipBkg:g,size:d})}return document.createElement("div")}
-function n(a,c,b){var d=document.createElement("input");d.type="checkbox";d.checked="1"==c;mxEvent.addListener(d,"change",function(){f(a,d.checked?"1":"0",b)});return d}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");
+"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,
+!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=
-document.createElement("select");d(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);f(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)+"");f(c,a,m)}var g=document.createElement("input");d(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){f(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));
+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 f=a.childNodes.length-1;0<=f;f--)try{var d=a.childNodes[f],e=d.nodeName.toUpperCase();"INPUT"!=e&&"SELECT"!=e||a.removeChild(d)}catch(aa){}}else l.src=Sidebar.prototype.expandedImage,b="";for(f=0;f<c.length;f++)c[f].style.display=b};mxEvent.addListener(w,"click",function(){r.editorUi.propertiesCollapsed=!r.editorUi.propertiesCollapsed;z()});w.appendChild(x);
+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,C=!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)C=!C;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,C));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=
-function(a){function c(a){function c(a){var c=mxUtils.button("",function(c){f.getModel().beginUpdate();try{var b=f.getSelectionCells();for(c=0;c<b.length;c++){for(var d=f.getModel().getStyle(b[c]),g=0;g<e.length;g++)d=mxUtils.removeStylename(d,e[g]);var h=f.getModel().isVertex(b[c])?f.defaultVertexStyle:f.defaultEdgeStyle;null!=a?(d=mxUtils.setStyle(d,mxConstants.STYLE_FILLCOLOR,a.fill||mxUtils.getValue(h,mxConstants.STYLE_FILLCOLOR,null)),d=mxUtils.setStyle(d,mxConstants.STYLE_STROKECOLOR,a.stroke||
-mxUtils.getValue(h,mxConstants.STYLE_STROKECOLOR,null)),d=mxUtils.setStyle(d,mxConstants.STYLE_GRADIENTCOLOR,a.gradient||mxUtils.getValue(h,mxConstants.STYLE_GRADIENTCOLOR,null)),f.getModel().isVertex(b[c])&&(d=mxUtils.setStyle(d,mxConstants.STYLE_FONTCOLOR,a.font||mxUtils.getValue(h,mxConstants.STYLE_FONTCOLOR,null)))):(d=mxUtils.setStyle(d,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(h,mxConstants.STYLE_FILLCOLOR,"#ffffff")),d=mxUtils.setStyle(d,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(h,
-mxConstants.STYLE_STROKECOLOR,"#000000")),d=mxUtils.setStyle(d,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(h,mxConstants.STYLE_GRADIENTCOLOR,null)),f.getModel().isVertex(b[c])&&(d=mxUtils.setStyle(d,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(h,mxConstants.STYLE_FONTCOLOR,null))));f.getModel().setStyle(b[c],d)}}finally{f.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&&
-(mxClient.IS_QUIRKS||10>document.documentMode)?c.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+a.fill+"', EndColorStr='"+a.gradient+"', GradientType=0)":c.style.backgroundImage="linear-gradient("+a.fill+" 0px,"+a.gradient+" 100%)":a.fill==mxConstants.NONE?c.style.background="url('"+Dialog.prototype.noColorImage+"')":c.style.backgroundColor=a.fill||mxUtils.getValue(f.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff"),c.style.border="1px solid "+(a.stroke||mxUtils.getValue(f.defaultVertexStyle,
-mxConstants.STYLE_STROKECOLOR,"#000000"));else{var b=mxUtils.getValue(f.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff"),g=mxUtils.getValue(f.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");c.style.backgroundColor=b;c.style.border="1px solid "+g}d.appendChild(c)}d.innerHTML="";for(var b=0;b<a.length;b++)0<b&&0==mxUtils.mod(b,4)&&mxUtils.br(d),c(a[b])}function b(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 e="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=
+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&&
+(mxClient.IS_QUIRKS||10>document.documentMode)?c.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+a.fill+"', EndColorStr='"+a.gradient+"', GradientType=0)":c.style.backgroundImage="linear-gradient("+a.fill+" 0px,"+a.gradient+" 100%)":a.fill==mxConstants.NONE?c.style.background="url('"+Dialog.prototype.noColorImage+"')":c.style.backgroundColor=a.fill||mxUtils.getValue(d.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff"),c.style.border="1px solid "+(a.stroke||mxUtils.getValue(d.defaultVertexStyle,
+mxConstants.STYLE_STROKECOLOR,"#000000"));else{var b=mxUtils.getValue(d.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff"),g=mxUtils.getValue(d.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");c.style.backgroundColor=b;c.style.border="1px solid "+g}f.appendChild(c)}f.innerHTML="";for(var b=0;b<a.length;b++)0<b&&0==mxUtils.mod(b,4)&&mxUtils.br(f),c(a[b])}function b(a){mxEvent.addListener(a,"mouseenter",function(){a.style.opacity="1"});mxEvent.addListener(a,"mouseleave",function(){a.style.opacity=
+"0.5"})}var d=this.editorUi.editor.graph,f=document.createElement("div");f.style.whiteSpace="nowrap";f.style.paddingLeft="24px";f.style.paddingRight="20px";a.style.paddingLeft="16px";a.style.paddingBottom="6px";a.style.position="relative";a.appendChild(f);var e="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 g=document.createElement("div");g.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(g,
"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme-1,this.defaultColorSchemes.length);c(this.defaultColorSchemes[this.editorUi.currentScheme])}));var h=document.createElement("div");h.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(g),a.appendChild(h));mxEvent.addListener(h,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme+1,this.defaultColorSchemes.length);c(this.defaultColorSchemes[this.editorUi.currentScheme])}));b(g);b(h);c(this.defaultColorSchemes[this.editorUi.currentScheme]);return a};StyleFormatPanel.prototype.addEditOps=function(a){var c=this.format.getSelectionState(),b=null;1==this.editorUi.editor.graph.getSelectionCount()&&
-(b=mxUtils.button(mxResources.get("editStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("editStyle").funct()})),b.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),b.style.width="202px",b.style.marginBottom="2px",a.appendChild(b));var f=this.editorUi.editor.graph,d=f.view.getState(f.getSelectionCell());1==f.getSelectionCount()&&null!=d&&null!=d.shape&&null!=d.shape.stencil?(c=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,
+(b=mxUtils.button(mxResources.get("editStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("editStyle").funct()})),b.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),b.style.width="202px",b.style.marginBottom="2px",a.appendChild(b));var d=this.editorUi.editor.graph,f=d.view.getState(d.getSelectionCell());1==d.getSelectionCount()&&null!=f&&null!=f.shape&&null!=f.shape.stencil?(c=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,
function(a){this.editorUi.actions.get("editShape").funct()})),c.setAttribute("title",mxResources.get("editShape")),c.style.marginBottom="2px",null==b?c.style.width="202px":(b.style.width="100px",c.style.width="100px",c.style.marginLeft="2px"),a.appendChild(c)):c.image&&(c=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(a){this.editorUi.actions.get("image").funct()})),c.setAttribute("title",mxResources.get("editImage")),c.style.marginBottom="2px",null==b?c.style.width="202px":
(b.style.width="100px",c.style.width="100px",c.style.marginLeft="2px"),a.appendChild(c));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=
"3";Graph.prototype.edgeMode="move"!=urlParams.edge;var n=Graph.prototype.init;Graph.prototype.init=function(){function a(a){c=a;if(mxClient.IS_QUIRKS||7==document.documentMode||8==document.documentMode)c=mxUtils.clone(a)}n.apply(this,arguments);var c=null;mxEvent.addListener(this.container,"mouseenter",a);mxEvent.addListener(this.container,"mousemove",a);mxEvent.addListener(this.container,"mouseleave",function(a){c=null});this.isMouseInsertPoint=function(){return null!=c};var b=this.getInsertPoint;
-this.getInsertPoint=function(){return null!=c?this.getPointForEvent(c):b.apply(this,arguments)};var f=this.layoutManager.getLayout;this.layoutManager.getLayout=function(a){var c=this.graph.view.getState(a),c=null!=c?c.style:this.graph.getCellStyle(a);if(null!=c){if("undefined"!=typeof mxRackContainer&&"rack"==c.childLayout){var b=new mxStackLayout(this.graph,!1);b.setChildGeometry=function(a,c){c.height=Math.max(c.height,20);if(1<c.height/20){var b=c.height%20;c.height+=10<b?20-b:-b}this.graph.getModel().setGeometry(a,
+this.getInsertPoint=function(){return null!=c?this.getPointForEvent(c):b.apply(this,arguments)};var d=this.layoutManager.getLayout;this.layoutManager.getLayout=function(a){var c=this.graph.view.getState(a),c=null!=c?c.style:this.graph.getCellStyle(a);if(null!=c){if("undefined"!=typeof mxRackContainer&&"rack"==c.childLayout){var b=new mxStackLayout(this.graph,!1);b.setChildGeometry=function(a,c){c.height=Math.max(c.height,20);if(1<c.height/20){var b=c.height%20;c.height+=10<b?20-b:-b}this.graph.getModel().setGeometry(a,
c)};b.fill=!0;b.unitSize=mxRackContainer.unitSize|20;b.marginLeft=c.marginLeft||0;b.marginRight=c.marginRight||0;b.marginTop=c.marginTop||0;b.marginBottom=c.marginBottom||0;b.resizeParent=!1;return b}if("undefined"!=typeof mxTableLayout&&"tableLayout"==c.childLayout)return b=new mxTableLayout(this.graph),b.rows=c.tableRows||2,b.columns=c.tableColumns||2,b.colPercentages=c.colPercentages,b.rowPercentages=c.rowPercentages,b.equalColumns="1"==mxUtils.getValue(c,"equalColumns",b.colPercentages?"0":"1"),
-b.equalRows="1"==mxUtils.getValue(c,"equalRows",b.rowPercentages?"0":"1"),b.resizeParent="1"==mxUtils.getValue(c,"resizeParent","1"),b.border=c.tableBorder||b.border,b.marginLeft=c.marginLeft||0,b.marginRight=c.marginRight||0,b.marginTop=c.marginTop||0,b.marginBottom=c.marginBottom||0,b.autoAddCol="1"==mxUtils.getValue(c,"autoAddCol","0"),b.autoAddRow="1"==mxUtils.getValue(c,"autoAddRow",b.autoAddCol?"0":"1"),b.colWidths=c.colWidths||"100",b.rowHeights=c.rowHeights||"50",b}return f.apply(this,arguments)}};
+b.equalRows="1"==mxUtils.getValue(c,"equalRows",b.rowPercentages?"0":"1"),b.resizeParent="1"==mxUtils.getValue(c,"resizeParent","1"),b.border=c.tableBorder||b.border,b.marginLeft=c.marginLeft||0,b.marginRight=c.marginRight||0,b.marginTop=c.marginTop||0,b.marginBottom=c.marginBottom||0,b.autoAddCol="1"==mxUtils.getValue(c,"autoAddCol","0"),b.autoAddRow="1"==mxUtils.getValue(c,"autoAddRow",b.autoAddCol?"0":"1"),b.colWidths=c.colWidths||"100",b.rowHeights=c.rowHeights||"50",b}return d.apply(this,arguments)}};
var r=Graph.prototype.isCssTransformsSupported;Graph.prototype.isCssTransformsSupported=function(){return r.apply(this,arguments)&&!mxClient.IS_SF};var h=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(a){var c=h.apply(this,arguments);if(null==c){if(null==this.globalUrlVars&&null!=urlParams.vars)try{this.globalUrlVars=JSON.parse(decodeURIComponent(urlParams.vars))}catch(z){null!=window.console&&console.log("Error in vars URL parameter: "+z)}null!=this.globalUrlVars&&(c=
this.globalUrlVars[a])}return c};var m=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){m.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var a=this.getDrawPane().parentNode;!this.graph.mathEnabled||mxClient.NO_FO||null!=this.webKitForceRepaintNode&&null!=this.webKitForceRepaintNode.parentNode||"svg"!=this.graph.container.firstChild.nodeName?null==this.webKitForceRepaintNode||this.graph.mathEnabled&&("svg"==this.graph.container.firstChild.nodeName||
this.graph.container.firstChild==this.webKitForceRepaintNode)||(null!=this.webKitForceRepaintNode.parentNode&&this.webKitForceRepaintNode.parentNode.removeChild(this.webKitForceRepaintNode),this.webKitForceRepaintNode=null):(this.webKitForceRepaintNode=document.createElement("div"),this.webKitForceRepaintNode.style.cssText="position:absolute;",a.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,a.ownerSVGElement))}};var w=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=
function(){w.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 c=0;c<a.actions.length;c++)if(null!=a.actions[c].open)if(this.isCustomLink(a.actions[c].open)){if(!this.customLinkClicked(a.actions[c].open))return}else this.openLink(a.actions[c].open);this.model.beginUpdate();try{for(c=0;c<a.actions.length;c++)this.handleLinkAction(a.actions[c])}finally{this.model.endUpdate()}}};
Graph.prototype.handleLinkAction=function(a){var c=[];null!=a.select&&this.isEnabled()&&(c=this.getCellsForAction(a.select),this.setSelectionCells(c));null!=a.highlight&&(c=this.getCellsForAction(a.highlight),this.highlightCells(c,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&&(c=this.getCellsForAction(a.scroll));0<c.length&&this.scrollCellToVisible(c[0])};Graph.prototype.getCellsForAction=function(a){return this.getCellsById(a.cells).concat(this.getCellsForTags(a.tags))};Graph.prototype.getCellsById=function(a){var c=[];if(null!=a)for(var b=0;b<a.length;b++)if("*"==a[b])var f=this.getDefaultParent(),c=c.concat(this.model.filterDescendants(function(a){return a!=f},f));else{var d=this.model.getCell(a[b]);null!=d&&c.push(d)}return c};Graph.prototype.getCellsForTags=
-function(a,c,b){var f=[];if(null!=a){c=null!=c?c:this.model.getDescendants(this.model.getRoot());b=null!=b?b:"tags";for(var d=0;d<c.length;d++)if(this.model.isVertex(c[d])||this.model.isEdge(c[d])){var e=null!=c[d].value&&"object"==typeof c[d].value?mxUtils.trim(c[d].value.getAttribute(b)||""):"",g=!0;if(0<e.length)for(var e=e.toLowerCase().split(" "),h=0;h<a.length&&g;h++)var n=mxUtils.trim(a[h]).toLowerCase(),g=g&&(0==n.length||0<=mxUtils.indexOf(e,n));else g=0==a.length;g&&f.push(c[d])}}return f};
-Graph.prototype.toggleCells=function(a){this.model.beginUpdate();try{for(var c=0;c<a.length;c++)this.model.setVisible(a[c],!this.model.isVisible(a[c]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(a,c){this.model.beginUpdate();try{for(var b=0;b<a.length;b++)this.model.setVisible(a[b],c)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(a,c,b,f){for(var d=0;d<a.length;d++)this.highlightCell(a[d],c,b,f)};Graph.prototype.highlightCell=function(a,c,
-b,f){c=null!=c?c:mxConstants.DEFAULT_VALID_COLOR;b=null!=b?b:1E3;a=this.view.getState(a);if(null!=a){var d=Math.max(5,mxUtils.getValue(a.style,mxConstants.STYLE_STROKEWIDTH,1)+4),e=new mxCellHighlight(this,c,d,!1);null!=f&&(e.opacity=f);e.highlight(a);window.setTimeout(function(){null!=e.shape&&(mxUtils.setPrefixedStyle(e.shape.node.style,"transition","all 1200ms ease-in-out"),e.shape.node.style.opacity=0);window.setTimeout(function(){e.destroy()},1200)},b)}};Graph.prototype.addSvgShadow=function(a,
-c,b){b=null!=b?b:!1;var f=a.ownerDocument,d=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"filter"):f.createElement("filter");d.setAttribute("id",this.shadowId);var e=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):f.createElement("feGaussianBlur");e.setAttribute("in","SourceAlpha");e.setAttribute("stdDeviation",this.svgShadowBlur);e.setAttribute("result","blur");d.appendChild(e);e=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feOffset"):
-f.createElement("feOffset");e.setAttribute("in","blur");e.setAttribute("dx",this.svgShadowSize);e.setAttribute("dy",this.svgShadowSize);e.setAttribute("result","offsetBlur");d.appendChild(e);e=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feFlood"):f.createElement("feFlood");e.setAttribute("flood-color",this.svgShadowColor);e.setAttribute("flood-opacity",this.svgShadowOpacity);e.setAttribute("result","offsetColor");d.appendChild(e);e=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,
-"feComposite"):f.createElement("feComposite");e.setAttribute("in","offsetColor");e.setAttribute("in2","offsetBlur");e.setAttribute("operator","in");e.setAttribute("result","offsetBlur");d.appendChild(e);e=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feBlend"):f.createElement("feBlend");e.setAttribute("in","SourceGraphic");e.setAttribute("in2","offsetBlur");d.appendChild(e);e=a.getElementsByTagName("defs");0==e.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=e[0];f.appendChild(d);b||((c||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,c){mxClient.IS_SVG&&(c=null!=c?c:!0,(this.shadowVisible=a)?this.view.getDrawPane().setAttribute("filter",
+a.scroll&&(c=this.getCellsForAction(a.scroll));0<c.length&&this.scrollCellToVisible(c[0])};Graph.prototype.getCellsForAction=function(a){return this.getCellsById(a.cells).concat(this.getCellsForTags(a.tags))};Graph.prototype.getCellsById=function(a){var c=[];if(null!=a)for(var b=0;b<a.length;b++)if("*"==a[b])var d=this.getDefaultParent(),c=c.concat(this.model.filterDescendants(function(a){return a!=d},d));else{var f=this.model.getCell(a[b]);null!=f&&c.push(f)}return c};Graph.prototype.getCellsForTags=
+function(a,c,b){var d=[];if(null!=a){c=null!=c?c:this.model.getDescendants(this.model.getRoot());b=null!=b?b:"tags";for(var f=0;f<c.length;f++)if(this.model.isVertex(c[f])||this.model.isEdge(c[f])){var e=null!=c[f].value&&"object"==typeof c[f].value?mxUtils.trim(c[f].value.getAttribute(b)||""):"",g=!0;if(0<e.length)for(var e=e.toLowerCase().split(" "),h=0;h<a.length&&g;h++)var n=mxUtils.trim(a[h]).toLowerCase(),g=g&&(0==n.length||0<=mxUtils.indexOf(e,n));else g=0==a.length;g&&d.push(c[f])}}return d};
+Graph.prototype.toggleCells=function(a){this.model.beginUpdate();try{for(var c=0;c<a.length;c++)this.model.setVisible(a[c],!this.model.isVisible(a[c]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(a,c){this.model.beginUpdate();try{for(var b=0;b<a.length;b++)this.model.setVisible(a[b],c)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(a,c,b,d){for(var f=0;f<a.length;f++)this.highlightCell(a[f],c,b,d)};Graph.prototype.highlightCell=function(a,c,
+b,d){c=null!=c?c:mxConstants.DEFAULT_VALID_COLOR;b=null!=b?b:1E3;a=this.view.getState(a);if(null!=a){var f=Math.max(5,mxUtils.getValue(a.style,mxConstants.STYLE_STROKEWIDTH,1)+4),e=new mxCellHighlight(this,c,f,!1);null!=d&&(e.opacity=d);e.highlight(a);window.setTimeout(function(){null!=e.shape&&(mxUtils.setPrefixedStyle(e.shape.node.style,"transition","all 1200ms ease-in-out"),e.shape.node.style.opacity=0);window.setTimeout(function(){e.destroy()},1200)},b)}};Graph.prototype.addSvgShadow=function(a,
+c,b){b=null!=b?b:!1;var d=a.ownerDocument,f=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"filter"):d.createElement("filter");f.setAttribute("id",this.shadowId);var e=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):d.createElement("feGaussianBlur");e.setAttribute("in","SourceAlpha");e.setAttribute("stdDeviation",this.svgShadowBlur);e.setAttribute("result","blur");f.appendChild(e);e=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"feOffset"):
+d.createElement("feOffset");e.setAttribute("in","blur");e.setAttribute("dx",this.svgShadowSize);e.setAttribute("dy",this.svgShadowSize);e.setAttribute("result","offsetBlur");f.appendChild(e);e=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"feFlood"):d.createElement("feFlood");e.setAttribute("flood-color",this.svgShadowColor);e.setAttribute("flood-opacity",this.svgShadowOpacity);e.setAttribute("result","offsetColor");f.appendChild(e);e=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,
+"feComposite"):d.createElement("feComposite");e.setAttribute("in","offsetColor");e.setAttribute("in2","offsetBlur");e.setAttribute("operator","in");e.setAttribute("result","offsetBlur");f.appendChild(e);e=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"feBlend"):d.createElement("feBlend");e.setAttribute("in","SourceGraphic");e.setAttribute("in2","offsetBlur");f.appendChild(e);e=a.getElementsByTagName("defs");0==e.length?(d=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,
+"defs"):d.createElement("defs"),null!=a.firstChild?a.insertBefore(d,a.firstChild):a.appendChild(d)):d=e[0];d.appendChild(f);b||((c||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 f};Graph.prototype.setShadowVisible=function(a,c){mxClient.IS_SVG&&(c=null!=c?c:!0,(this.shadowVisible=a)?this.view.getDrawPane().setAttribute("filter",
"url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),c&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var a=this.model.getChildCount(this.model.root),c,b=0;do c=this.model.getChildAt(this.model.root,b);while(b++<a&&"1"==mxUtils.getValue(this.getCellStyle(c),"locked","0"));null!=c&&this.setDefaultParent(c)}};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=
@@ -2820,15 +2821,15 @@ 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 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,f,d,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 f(c){function b(c,b,d){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)&&(f=
-1/c.pageScale,p.value="100 %");n=mxRectangle.fromRectangle(n);n.width=Math.ceil(n.width*f);n.height=Math.ceil(n.height*f);m*=f;!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),
-c.writeln("</style>"))};if("undefined"!==typeof MathJax){var w=b.renderPage;b.renderPage=function(a,c,b,f,d,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,d,!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,d,!0)}return b}var f=parseInt(W.value)/100;isNaN(f)&&(f=1,W.value="100 %");var f=.75*f,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?d:null;if(null==e){var e=a.createTemporaryGraph(d.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 C=e.getGlobalVariable;e.getGlobalVariable=function(a){return"page"==a?l.getName():"pagenumber"==a?t+1:C.apply(this,arguments)};document.body.appendChild(e.container);a.updatePageRoot(l);e.model.setRoot(l.root)}m=b(e,m,t!=h);e!=d&&e.container.parentNode.removeChild(e.container)}}else m=
-b(d);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"]'),
+[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),
+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 C=e.getGlobalVariable;e.getGlobalVariable=function(a){return"page"==a?l.getName():"pagenumber"==a?t+1:C.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=
+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 d=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");
+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;";
@@ -2836,8 +2837,8 @@ p.setAttribute("value","100 %");p.style.width="50px";t.appendChild(p);mxEvent.ad
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);C.appendChild(q);C.appendChild(u);t.appendChild(C);
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(){d.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();f(!1)}),t.className="geBtn",g.appendChild(t));t=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();f(!0)});t.className="geBtn gePrimaryBtn";g.appendChild(t);a.editor.cancelFirst||g.appendChild(m);e.appendChild(g);this.container=e};var C=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==
+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 C=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)):(C.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");
@@ -2865,10 +2866,10 @@ h,0==e?h:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode
b[e],null))}finally{c.model.endUpdate()}}};EditorUi.prototype.createFileData=function(a,b,d,e,r,h,m,k,v,l){b=null!=b?b:this.editor.graph;r=null!=r?r:!1;v=null!=v?v:!0;var c,f=null;null==d||d.getMode()==App.MODE_DEVICE||d.getMode()==App.MODE_BROWSER?c="_blank":f=c=e;if(null==a)return"";var g=a;if("mxfile"!=g.nodeName.toLowerCase()){var n=b.zapGremlins(mxUtils.getXml(a)),g=b.compress(n);if(b.decompress(g)!=n)return n;n=a.ownerDocument.createElement("diagram");n.setAttribute("id",Editor.guid());mxUtils.setTextContent(n,
g);g=a.ownerDocument.createElement("mxfile");g.appendChild(n)}l?(g=g.cloneNode(!0),g.removeAttribute("userAgent"),g.removeAttribute("version"),g.removeAttribute("editor"),g.removeAttribute("type")):(g.removeAttribute("userAgent"),g.removeAttribute("version"),g.removeAttribute("editor"),g.removeAttribute("type"),g.setAttribute("modified",(new Date).toISOString()),g.setAttribute("host",window.location.hostname),g.setAttribute("agent",navigator.userAgent),g.setAttribute("version",EditorUi.VERSION),g.setAttribute("etag",
Editor.guid()),a=null!=d?d.getMode():this.mode,null!=a&&g.setAttribute("type",a));a=mxUtils.getXml(g);if(!h&&!r&&(m||null!=d&&/(\.html)$/i.test(d.getTitle())))a=this.getHtml2(mxUtils.getXml(g),b,null!=d?d.getTitle():null,c,f);else if(h||!r&&null!=d&&/(\.svg)$/i.test(d.getTitle()))null==d||d.getMode()!=App.MODE_DEVICE&&d.getMode()!=App.MODE_BROWSER||(e=null),a=this.getEmbeddedSvg(a,b,e,null,k,v,f);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 c=[],b=0;b<a.length;b++){var d=a.charAt(b);0<=EditorUi.ignoredAnonymizedChars.indexOf(d)?c.push(d):isNaN(parseInt(d))?d.toLowerCase()!=d?c.push(String.fromCharCode(65+Math.round(25*Math.random()))):d.toUpperCase()!=d?c.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(d)?
+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 d=0;d<this.pages.length;d++){if(this.currentPage!=this.pages[d]&&this.pages[d].needsUpdate){var f=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(this.pages[d].root));this.editor.graph.saveViewState(this.pages[d].viewState,
+f);mxUtils.setTextContent(this.pages[d].node,this.editor.graph.compressNode(f));delete this.pages[d].needsUpdate}c.appendChild(this.pages[d].node)}return c};EditorUi.prototype.anonymizeString=function(a){for(var c=[],b=0;b<a.length;b++){var d=a.charAt(b);0<=EditorUi.ignoredAnonymizedChars.indexOf(d)?c.push(d):isNaN(parseInt(d))?d.toLowerCase()!=d?c.push(String.fromCharCode(65+Math.round(25*Math.random()))):d.toUpperCase()!=d?c.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(d)?
c.push(" "):c.push("?"):c.push(Math.round(9*Math.random()))}return c.join("")};EditorUi.prototype.anonymizePatch=function(a){if(null!=a[EditorUi.DIFF_INSERT])for(var c=0;c<a[EditorUi.DIFF_INSERT].length;c++)try{var b=mxUtils.parseXml(a[EditorUi.DIFF_INSERT][c].data).documentElement.cloneNode(!1);null!=b.getAttribute("name")&&b.setAttribute("name",this.anonymizeString(b.getAttribute("name")));a[EditorUi.DIFF_INSERT][c].data=mxUtils.getXml(b)}catch(h){a[EditorUi.DIFF_INSERT][c].data=h.message}if(null!=
-a[EditorUi.DIFF_UPDATE]){for(var d in a[EditorUi.DIFF_UPDATE]){var e=a[EditorUi.DIFF_UPDATE][d];null!=e.name&&(e.name=this.anonymizeString(e.name));null!=e.cells&&(c=mxUtils.bind(this,function(a){var c=e.cells[a];if(null!=c){for(var b in c)null!=c[b].value&&(c[b].value="["+c[b].value.length+"]"),null!=c[b].style&&(c[b].style="["+c[b].style.length+"]"),null!=c[b].geometry&&(c[b].geometry=this.anonymizeString(c[b].geometry)),0==Object.keys(c[b]).length&&delete c[b];0==Object.keys(c).length&&delete e.cells[a]}}),
+a[EditorUi.DIFF_UPDATE]){for(var d in a[EditorUi.DIFF_UPDATE]){var e=a[EditorUi.DIFF_UPDATE][d];null!=e.name&&(e.name=this.anonymizeString(e.name));null!=e.cells&&(c=mxUtils.bind(this,function(a){var c=e.cells[a];if(null!=c){for(var b in c)null!=c[b].value&&(c[b].value="["+c[b].value.length+"]"),null!=c[b].style&&(c[b].style="["+c[b].style.length+"]"),null!=c[b].geometry&&(c[b].geometry="["+c[b].geometry.length+"]"),0==Object.keys(c[b]).length&&delete c[b];0==Object.keys(c).length&&delete e.cells[a]}}),
c(EditorUi.DIFF_INSERT),c(EditorUi.DIFF_UPDATE),0==Object.keys(e.cells).length&&delete e.cells);0==Object.keys(e).length&&delete a[EditorUi.DIFF_UPDATE][d]}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 c=0;c<a.attributes.length;c++)"as"!=a.attributes[c].name&&a.setAttribute(a.attributes[c].name,this.anonymizeString(a.attributes[c].value));if(null!=a.childNodes)for(c=0;c<a.childNodes.length;c++)this.anonymizeAttributes(a.childNodes[c])};
EditorUi.prototype.anonymizeNode=function(a){for(var c=a.getElementsByTagName("mxCell"),b=0;b<c.length;b++)null!=c[b].getAttribute("value")&&c[b].setAttribute("value","["+c[b].getAttribute("value").length+"]"),null!=c[b].getAttribute("style")&&c[b].setAttribute("style","["+c[b].getAttribute("style").length+"]"),null!=c[b].parentNode&&"root"!=c[b].parentNode.nodeName&&null!=c[b].parentNode.parentNode&&(c[b].setAttribute("id",c[b].parentNode.getAttribute("id")),c[b].parentNode.parentNode.replaceChild(c[b],
c[b].parentNode));c=a.getElementsByTagName("mxGeometry");for(b=0;b<c.length;b++)this.anonymizeAttributes(c[b]);return a};EditorUi.prototype.synchronizeCurrentFile=function(a){var c=this.getCurrentFile();null!=c&&(c.savingFile?this.handleError({message:mxResources.get("busy")}):!a&&c.invalidChecksum?c.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(c.clearAutosave(),this.editor.setStatus(""),a?c.reloadFile(mxUtils.bind(this,function(){c.handleFileSuccess("manual"==
@@ -2903,32 +2904,32 @@ 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!=r&&null!=r.message?":err:"+encodeURIComponent(r.message):"")+(null!=r&&null!=r.stack?"&stack="+encodeURIComponent(r.stack):"")}catch(h){}this.handleError(r,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!=c?this.fileLoaded(c):d()}),!0)}else d();return b};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 c=mxUtils.bind(this,function(){this.isActive()||(this.editor.graph.removeMouseListener(b),this.editor.removeListener("hideDialog",c),this.editor.graph.removeListener(c),null!=window.requestAnimationFrame?window.requestAnimationFrame(a):
a())}),b={mouseDown:function(){},mouseMove:function(){},mouseUp:c};this.editor.graph.addListener(mxEvent.EDITING_STOPPED,c);this.editor.graph.addListener(mxEvent.ESCAPE,c);this.editor.graph.addMouseListener(b);this.editor.addListener("hideDialog",c)}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 e=0;e<a.length;e++){this.updatePageRoot(a[e]);var m=a[e].node.cloneNode(!1);m.removeAttribute("name");d.root=a[e].root;var k=f.encode(d);this.editor.graph.saveViewState(a[e].viewState,k,!0);m.appendChild(k);null!=b&&(b.eltCount+=m.getElementsByTagName("*").length,b.nodeCount+=m.getElementsByTagName("mxCell").length,b.cellCount+=d.getDescendants(d.root).length);c=(c<<5)-c+this.hashValue(m,null,b)<<0}return c};EditorUi.prototype.hashValue=function(a,b,d){var c=0;if("object"===typeof a&&"number"===
-typeof a.nodeType&&"string"===typeof a.nodeName&&"function"===typeof a.getAttribute){null!=a.nodeName&&(c^=this.hashValue(a.nodeName,b));if(null!=a.attributes){null!=d&&(d.attrCount+=a.attributes.length);for(var f=0;f<a.attributes.length;f++){var e=a.attributes[f].name,g=null!=b?b(a,e,!0):a.attributes[f].value;null!=g&&(c^=this.hashValue(e,b,d)+this.hashValue(g,b,d))}}if(null!=a.childNodes)for(f=0;f<a.childNodes.length;f++)c=(c<<5)-c+this.hashValue(a.childNodes[f],b,d)<<0}else if(null!=a&&"function"!==
-typeof a){a=String(a);b=0;null!=d&&(d.byteCount+=a.length);for(f=0;f<a.length;f++)b=(b<<5)-b+a.charCodeAt(f)<<0;c^=b}return c};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(a,b,d,e,r,h,m){};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 c=mxUtils.createXmlDocument(),b=c.createElement("mxlibrary");mxUtils.setTextContent(b,JSON.stringify(a));c.appendChild(b);return mxUtils.getXml(c)};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 c=this.sidebar.palettes[a];if(null!=c){for(var b=0;b<c.length;b++)c[b].parentNode.removeChild(c[b]);delete this.sidebar.palettes[a]}};EditorUi.prototype.repositionLibrary=function(a){var c=this.sidebar.container;if(null==a){var b=this.sidebar.palettes["L.scratchpad"];null==b&&(b=this.sidebar.palettes.search);null!=b&&(a=b[b.length-1].nextSibling)}a=null!=a?a:c.firstChild.nextSibling.nextSibling;
-var b=c.lastChild,d=b.previousSibling;c.insertBefore(b,a);c.insertBefore(d,b)};EditorUi.prototype.loadLibrary=function(a){var c=mxUtils.parseXml(a.getData());if("mxlibrary"==c.documentElement.nodeName){var b=JSON.parse(mxUtils.getTextContent(c.documentElement));this.libraryLoaded(a,b,c.documentElement.getAttribute("title"))}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(a){return""};EditorUi.prototype.libraryLoaded=function(a,b,d){if(null!=
-this.sidebar){a.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(a.getHash());".scratchpad"==a.title&&(this.scratchpad=a);var c=this.sidebar.palettes[a.getHash()],c=null!=c?c[c.length-1].nextSibling:null;this.removeLibrarySidebar(a.getHash());var f=null,e=mxUtils.bind(this,function(c,b){0==c.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"))),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,D=null,u=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),
-k,b,a,a.getMode());mxEvent.consume(c)}),B=mxUtils.bind(this,function(c){a.setModified(!0);a.isAutosave()?(null!=D&&null!=D.parentNode&&D.parentNode.removeChild(D),D=p.cloneNode(!1),D.setAttribute("src",Editor.spinImage),D.setAttribute("title",mxResources.get("saving")),D.style.cursor="default",D.style.marginRight="2px",D.style.marginTop="-2px",l.insertBefore(D,l.firstChild),v.style.paddingRight=18*l.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=D&&null!=
-D.parentNode&&(D.parentNode.removeChild(D),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);
-B(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;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.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);B(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")}));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,
+for(var e=0;e<a.length;e++){this.updatePageRoot(a[e]);var m=a[e].node.cloneNode(!1);m.removeAttribute("name");d.root=a[e].root;var k=f.encode(d);this.editor.graph.saveViewState(a[e].viewState,k,!0);m.appendChild(k);null!=b&&(b.eltCount+=m.getElementsByTagName("*").length,b.nodeCount+=m.getElementsByTagName("mxCell").length,b.cellCount+=d.getDescendants(d.root).length);c=(c<<5)-c+this.hashValue(m,function(a,c,b,d){return!d||"mxGeometry"!=a.nodeName&&"mxPoint"!=a.nodeName||"x"!=c&&"y"!=c&&"width"!=
+c&&"height"!=c?b:Math.round(b)},b)<<0}return c};EditorUi.prototype.hashValue=function(a,b,d){var c=0;if("object"===typeof a&&"number"===typeof a.nodeType&&"string"===typeof a.nodeName&&"function"===typeof a.getAttribute){null!=a.nodeName&&(c^=this.hashValue(a.nodeName,b,d));if(null!=a.attributes){null!=d&&(d.attrCount+=a.attributes.length);for(var f=0;f<a.attributes.length;f++){var e=a.attributes[f].name,g=null!=b?b(a,e,a.attributes[f].value,!0):a.attributes[f].value;null!=g&&(c^=this.hashValue(e,
+b,d)+this.hashValue(g,b,d))}}if(null!=a.childNodes)for(f=0;f<a.childNodes.length;f++)c=(c<<5)-c+this.hashValue(a.childNodes[f],b,d)<<0}else if(null!=a&&"function"!==typeof a){a=String(a);b=0;null!=d&&(d.byteCount+=a.length);for(f=0;f<a.length;f++)b=(b<<5)-b+a.charCodeAt(f)<<0;c^=b}return c};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(a,b,d,e,r,h,m){};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 c=mxUtils.createXmlDocument(),b=c.createElement("mxlibrary");mxUtils.setTextContent(b,JSON.stringify(a));c.appendChild(b);
+return mxUtils.getXml(c)};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 c=this.sidebar.palettes[a];if(null!=c){for(var b=0;b<c.length;b++)c[b].parentNode.removeChild(c[b]);delete this.sidebar.palettes[a]}};EditorUi.prototype.repositionLibrary=function(a){var c=this.sidebar.container;
+if(null==a){var b=this.sidebar.palettes["L.scratchpad"];null==b&&(b=this.sidebar.palettes.search);null!=b&&(a=b[b.length-1].nextSibling)}a=null!=a?a:c.firstChild.nextSibling.nextSibling;var b=c.lastChild,d=b.previousSibling;c.insertBefore(b,a);c.insertBefore(d,b)};EditorUi.prototype.loadLibrary=function(a){var c=mxUtils.parseXml(a.getData());if("mxlibrary"==c.documentElement.nodeName){var b=JSON.parse(mxUtils.getTextContent(c.documentElement));this.libraryLoaded(a,b,c.documentElement.getAttribute("title"))}else throw{message:mxResources.get("notALibraryFile")};
+};EditorUi.prototype.getLibraryStorageHint=function(a){return""};EditorUi.prototype.libraryLoaded=function(a,b,d){if(null!=this.sidebar){a.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(a.getHash());".scratchpad"==a.title&&(this.scratchpad=a);var c=this.sidebar.palettes[a.getHash()],c=null!=c?c[c.length-1].nextSibling:null;this.removeLibrarySidebar(a.getHash());var e=null,f=mxUtils.bind(this,function(c,b){0==c.length&&a.isEditable()?(null==e&&(e=document.createElement("div"),mxUtils.setPrefixedStyle(e.style,
+"borderRadius","6px"),e.style.border="3px dotted lightGray",e.style.textAlign="center",e.style.padding="8px",e.style.color="#B3B3B3",mxUtils.write(e,mxResources.get("dragElementsHere"))),b.appendChild(e)):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){f(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,D=null,u=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),k,b,a,a.getMode());mxEvent.consume(c)}),B=mxUtils.bind(this,function(c){a.setModified(!0);a.isAutosave()?(null!=D&&null!=D.parentNode&&D.parentNode.removeChild(D),D=p.cloneNode(!1),D.setAttribute("src",Editor.spinImage),D.setAttribute("title",mxResources.get("saving")),D.style.cursor="default",D.style.marginRight="2px",D.style.marginTop="-2px",l.insertBefore(D,l.firstChild),v.style.paddingRight=18*l.childNodes.length+
+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=D&&null!=D.parentNode&&(D.parentNode.removeChild(D),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,f){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,f||"",!0,!1,!1));a={xml:this.editor.graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),
+w:c.width,h:c.height};null!=f&&(a.title=f);b.push(a);B(d);null!=e&&null!=e.parentNode&&0<b.length&&(e.parentNode.removeChild(e),e=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;
+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!=e?e.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!=e&&(e.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.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!=e&&(e.style.border="3px dotted lightGray"))}));Graph.fileSupport&&(mxEvent.addListener(k,"dragover",mxUtils.bind(this,function(a){null!=e?e.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!=e&&(e.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!=e&&null!=e.parentNode&&0<b.length&&(e.parentNode.removeChild(e),e=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));f(h,k);b=b.concat(h);B(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")}));
+null!=e&&null!=e.parentNode&&0<b.length&&(e.parentNode.removeChild(e),e=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!=e?e.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,
-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=
+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],e=d.data;if(null!=e){var e=this.convertDataUri(e),f="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==d.aspect&&(f+="aspect=fixed;");b.appendChild(this.sidebar.createVertexTemplate(f+
+"image="+e,d.w,d.h,"",d.title||"",!1,!1,!0))}else null!=d.xml&&(e=this.stringToCells(this.editor.graph.decompress(d.xml)),0<e.length&&b.appendChild(this.sidebar.createVertexTemplateFromCells(e,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=",
@@ -2941,17 +2942,17 @@ f.code?null!=f.message?mxUtils.htmlEntities(f.message):mxUtils.htmlEntities(mxRe
"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};
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};
+return c};EditorUi.prototype.saveCanvas=function(a,b,d){var c="jpeg"==d?"jpg":d,e=this.getBaseFilename()+"."+c;a=this.createImageDataUri(a,b,d);this.saveData(e,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",
"_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,f=Math.ceil(d/1024),e=Array(f),m=0;m<f;++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);e[m]=new Uint8Array(l)}return new Blob(e,{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,
+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)}}),
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=
-"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 c=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"));
+"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 e=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});e.spin(this.exportDialog);this.exportToCanvas(mxUtils.bind(this,function(a){e.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var c=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",c);this.exportDialog.appendChild(a);mxEvent.addListener(a,"click",mxUtils.bind(this,function(){this.openInNewWindow(c.substring(c.indexOf(",")+1),"image/png",!0);b.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",b);document.body.appendChild(this.exportDialog)}mxEvent.consume(a)}),Editor.cameraLargeImage,mxResources.get("export"))}b.apply(this,
arguments)};EditorUi.prototype.saveData=function(a,b,d,e,k){this.isLocalFileSave()?this.saveLocalFile(d,a,e,k,b):this.saveRequest(a,b,mxUtils.bind(this,function(a,c){return this.createEchoRequest(d,a,e,k,b,c)}),d,k,e)};EditorUi.prototype.saveRequest=function(a,b,d,e,k,h,m){m=null!=m?m:!mxClient.IS_IOS||!navigator.standalone;var c=this.getServiceCount(!1);a=new CreateDialog(this,a,mxUtils.bind(this,function(a,c){if("_blank"==c||null!=a&&0<a.length){var f=d("_blank"==c?null:a,c==App.MODE_DEVICE||"download"==
c||null==c||"_blank"==c?"0":"1");null!=f&&(c==App.MODE_DEVICE||"download"==c||"_blank"==c?f.simulate(document,"_blank"):this.pickFolder(c,mxUtils.bind(this,function(d){h=null!=h?h:"pdf"==b?"application/pdf":"image/"+b;if(null!=e)try{this.exportFile(e,a,h,!0,c,d)}catch(z){this.handleError(z)}else this.spinner.spin(document.body,mxResources.get("saving"))&&f.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=f.getStatus()&&299>=f.getStatus())try{this.exportFile(f.getText(),a,h,!0,c,d)}catch(z){this.handleError(z)}else this.handleError({message:mxResources.get("errorSavingFile")})}),
@@ -2960,12 +2961,12 @@ b,d,e,k,h,m,l,v,p){if(this.spinner.spin(document.body,mxResources.get("export"))
null,null,null,d,v));if(null!=this.editor.fontCss){var c=a.ownerDocument,c=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"style"):c.createElement("style");c.setAttribute("type","text/css");mxUtils.setTextContent(c,this.editor.fontCss);a.getElementsByTagName("defs")[0].appendChild(c)}var b='<!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()||b.length<=MAX_REQUEST_SIZE?this.saveData(g,"svg",b,
"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}))});this.convertMath(this.editor.graph,f,!1,mxUtils.bind(this,function(){h?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.convertImages(f,n,this.thumbImageCache)):n(f)}))}};EditorUi.prototype.addRadiobox=function(a,b,d,e,k,h,m){return this.addCheckbox(a,d,e,k,h,m,!0,b)};EditorUi.prototype.addCheckbox=function(a,b,d,e,k,h,m,l){h=null!=h?
h:!0;var c=document.createElement("input");c.style.marginRight="8px";c.style.marginTop="16px";c.setAttribute("type",m?"radio":"checkbox");m="geCheckbox-"+Editor.guid();c.id=m;null!=l&&c.setAttribute("name",l);d&&(c.setAttribute("checked","checked"),c.defaultChecked=!0);e&&c.setAttribute("disabled","disabled");h&&(a.appendChild(c),d=document.createElement("label"),mxUtils.write(d,b),d.setAttribute("for",m),a.appendChild(d),k||mxUtils.br(a));return c};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(){m.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",m=null,m=mxUtils.button("",mxUtils.bind(this,function(a){this.pickColor(e||"none",function(a){e=a;c()});mxEvent.consume(a)}));c();m.style.padding=
-mxClient.IS_FF?"4px 2px 4px 2px":"4px";m.style.marginLeft="4px";m.style.height="22px";m.style.width="22px";m.style.position="relative";m.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";m.className="geColorBtn";a.appendChild(m);mxUtils.br(a);return{getColor:function(){return e},getTarget:function(){return d.value},focus:function(){d.focus()}}};EditorUi.prototype.createLink=function(a,b,d,e,k,h,m,l){var c=this.getCurrentFile(),f=[];e&&(f.push("lightbox=1"),"auto"!=a&&f.push("target="+
+this.addCheckbox(a,mxResources.get("edit")+":",!0,null,!0);c.style.marginLeft="24px";var d=this.getCurrentFile(),e="";null!=d&&d.getMode()!=App.MODE_DEVICE&&d.getMode()!=App.MODE_BROWSER&&(e=window.location.href);var f=document.createElement("select");f.style.width="120px";f.style.marginLeft="8px";f.style.marginRight="10px";f.className="geBtn";d=document.createElement("option");d.setAttribute("value","blank");mxUtils.write(d,mxResources.get("makeCopy"));f.appendChild(d);d=document.createElement("option");
+d.setAttribute("value","custom");mxUtils.write(d,mxResources.get("custom")+"...");f.appendChild(d);a.appendChild(f);mxEvent.addListener(f,"change",mxUtils.bind(this,function(){if("custom"==f.value){var a=new FilenameDialog(this,e,mxResources.get("ok"),function(a){null!=a?e=a:f.value="blank"},mxResources.get("url"),null,null,null,null,function(){f.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)?f.removeAttribute("disabled"):f.setAttribute("disabled","disabled")}));mxUtils.br(a);return{getLink:function(){return c.checked?"blank"===f.value?"_blank":e:null},getEditInput:function(){return c},getEditSelect:function(){return f}}};EditorUi.prototype.addLinkSection=function(a,b){function c(){m.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=f&&f!=mxConstants.NONE?"border:1px solid black;background-color:"+f:"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 e=document.createElement("option");e.setAttribute("value","auto");mxUtils.write(e,mxResources.get("automatic"));d.appendChild(e);e=document.createElement("option");e.setAttribute("value","blank");mxUtils.write(e,mxResources.get("openInNewWindow"));d.appendChild(e);e=document.createElement("option");
+e.setAttribute("value","self");mxUtils.write(e,mxResources.get("openInThisWindow"));d.appendChild(e);b&&(e=document.createElement("option"),e.setAttribute("value","frame"),mxUtils.write(e,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),d.appendChild(e));a.appendChild(d);mxUtils.write(a,mxResources.get("borderColor")+":");var f="#0000ff",m=null,m=mxUtils.button("",mxUtils.bind(this,function(a){this.pickColor(f||"none",function(a){f=a;c()});mxEvent.consume(a)}));c();m.style.padding=
+mxClient.IS_FF?"4px 2px 4px 2px":"4px";m.style.marginLeft="4px";m.style.height="22px";m.style.width="22px";m.style.position="relative";m.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";m.className="geColorBtn";a.appendChild(m);mxUtils.br(a);return{getColor:function(){return f},getTarget:function(){return d.value},focus:function(){d.focus()}}};EditorUi.prototype.createLink=function(a,b,d,e,k,h,m,l){var c=this.getCurrentFile(),f=[];e&&(f.push("lightbox=1"),"auto"!=a&&f.push("target="+
a),null!=b&&b!=mxConstants.NONE&&f.push("highlight="+("#"==b.charAt(0)?b.substring(1):b)),null!=k&&0<k.length&&f.push("edit="+encodeURIComponent(k)),h&&f.push("layers=1"),this.editor.graph.foldingEnabled&&f.push("nav=1"));d&&(a=this.getSelectedPageIndex(),0<a&&f.push("page="+a));a=!0;null!=m?d="#U"+encodeURIComponent(m):(c=this.getCurrentFile(),l||null==c||c.constructor!=window.DriveFile?d="#R"+encodeURIComponent(d?this.getFileData(!0,null,null,null,null,null,null,!0):this.editor.graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):
(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%;":
@@ -2981,8 +2982,8 @@ n.appendChild(r);mxEvent.addListener(r,"click",mxUtils.bind(this,function(){this
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 B=this.addCheckbox(c,mxResources.get("lightbox"),!0),G=this.addEditButton(c,B),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(B,"change",function(){B.checked?(y.removeAttribute("disabled"),J.removeAttribute("disabled")):(y.setAttribute("disabled","disabled"),J.setAttribute("disabled",
"disabled"));J.checked&&B.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,B.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()),n=e?null:this.addCheckbox(c,mxResources.get("includeCopyOfMyDiagram"),
-!0),f=this.editor.graph,k=e?null:this.addCheckbox(c,mxResources.get("transparentBackground"),f.background==mxConstants.NONE||null==f.background);null!=k&&(k.style.marginBottom="16px");a=new CustomDialog(this,c,mxUtils.bind(this,function(){d(!g.checked,null!=n?n.checked:!1,null!=k?k.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=
+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",
@@ -2998,56 +2999,56 @@ EditorUi.prototype.createEmbedSvg=function(a,b,d,e,k,h,m){var c=this.editor.grap
(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+
" "+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],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(h){}finally{this.editor.graph=d}return a};EditorUi.prototype.getEmbeddedPng=function(a,b,d){var c=this.editor.graph,f=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),f=d;else if(null!=this.pages&&this.currentPage!=this.pages[0]){var c=this.createTemporaryGraph(c.getStylesheet()),
-e=c.getGlobalVariable,g=this.pages[0];c.getGlobalVariable=function(a){return"page"==a?g.getName():"pagenumber"==a?1:e.apply(this,arguments)};document.body.appendChild(c.container);c.model.setRoot(g.root)}this.exportToCanvas(mxUtils.bind(this,function(d){try{null==f&&(f=this.getFileData(!0));var e=d.toDataURL("image/png"),e=this.writeGraphModelToPng(e,"zTXt","mxGraphModel",atob(this.editor.graph.compress(f)));a(e.substring(e.lastIndexOf(",")+1));c!=this.editor.graph&&c.container.parentNode.removeChild(c.container)}catch(C){null!=
+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(C){null!=
b&&b(C)}}),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 f=new Image;f.onload=mxUtils.bind(this,function(){try{var e=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;e.setAttribute("width",g);e.setAttribute("height",m);var n=e.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(f,z/l,z/l);a(e)},0):(n.drawImage(f,z/l,z/l),a(e))}catch(Q){null!=k&&k(Q)}});f.onerror=function(a){null!=k&&k(a)};try{q&&this.editor.graph.addSvgShadow(d,d);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;d.getElementsByTagName("defs")[0].appendChild(a)}this.convertMath(t,
-d,!0,mxUtils.bind(this,function(){f.src=this.createSvgDataUri(mxUtils.getXml(d))}))});this.loadFonts(e)}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 f="http://"==c.substring(0,7)||"https://"==c.substring(0,8);f&&!navigator.onLine?c=d.svgBrokenImage.src:!f||c.substring(0,a.baseUrl.length)==a.baseUrl||d.crossOriginImages&&d.isCorsEnabledForUrl(c)?"chrome-extension://"!=
+(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,
+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 f=a.getText();if(c){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!=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=
+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)&&
+"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"),f=a.getContext("2d");a.height=c.height;a.width=c.width;f.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=
+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=
function(a,b,d,e,k){b=null!=b?b:0;d=null!=d?d:0;var c=[];try{var f=this.editor.graph;if(null!=a&&0<a.length){var g=mxUtils.parseXml(a),n=this.editor.extractGraphModel(g.documentElement,null!=this.pages);if(null!=n&&"mxfile"==n.nodeName&&null!=this.pages){var l=n.getElementsByTagName("diagram");if(1==l.length)n=mxUtils.parseXml(f.decompress(mxUtils.getTextContent(l[0]))).documentElement;else if(1<l.length){f.model.beginUpdate();try{for(a=0;a<l.length;a++){l[a].removeAttribute("id");var r=this.updatePageRoot(new DiagramPage(l[a])),
p=this.pages.length;null==r.getName()&&r.setName(mxResources.get("pageWithNumber",[p+1]));f.model.execute(new ChangePage(this,r,r,p))}}finally{f.model.endUpdate()}}}null!=n&&"mxGraphModel"===n.nodeName&&(c=f.importGraphModel(n,b,d,e))}}catch(z){throw k||this.handleError(z,mxResources.get("invalidOrMissingFile")),z;}return c};EditorUi.prototype.isRemoteVisioFormat=function(a){return/(\.v(sd|dx))($|\?)/i.test(a)||/(\.vs(s|x))($|\?)/i.test(a)};EditorUi.prototype.importVisio=function(a,b,d,e){e=null!=
e?e:a.name;d=null!=d?d:mxUtils.bind(this,function(a){this.handleError(a)});var c=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio)if(this.isRemoteVisioFormat(e)&&null!=VSD_CONVERT_URL){var c=new FormData;c.append("file1",a,e);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=e,this.doImportVisio(f.response,b,d)}catch(w){d(w)}else d({})});
f.send(c)}else try{this.doImportVisio(a,b,d)}catch(w){d(w)}});this.doImportVisio||this.loadingExtensions||this.isOffline()?c():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",c))};EditorUi.prototype.importGraphML=function(a,b,d){d=null!=d?d:mxUtils.bind(this,function(a){this.handleError(a)});var c=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(a,b,d)}catch(r){d(r)}});this.doImportGraphML||this.loadingExtensions||this.isOffline()?
c():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",c))};EditorUi.prototype.exportVisio=function(){var a=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams()}catch(f){this.handleError(f)}});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline()?a():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",a))};EditorUi.prototype.convertLucidChart=function(a,b,d){var c=mxUtils.bind(this,
function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter)try{b(LucidImporter.importState(JSON.parse(a)))}catch(r){d(r)}else d({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline()?window.setTimeout(c,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",c):mxscript("js/extensions.min.js",c))};EditorUi.prototype.insertAsPreText=function(a,b,d){var c=this.editor.graph,
-f=null;c.getModel().beginUpdate();try{f=c.insertVertex(null,null,"<pre>"+a+"</pre>",b,d,1,1,"text;html=1;align=center;verticalAlign=middle;"),c.updateCellSize(f,!0)}finally{c.getModel().endUpdate()}return f};EditorUi.prototype.insertTextAt=function(a,b,d,e,k,h,m){h=null!=h?h:!0;m=null!=m?m:!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,
+e=null;c.getModel().beginUpdate();try{e=c.insertVertex(null,null,"<pre>"+a+"</pre>",b,d,1,1,"text;html=1;align=center;verticalAlign=middle;"),c.updateCellSize(e,!0)}finally{c.getModel().endUpdate()}return e};EditorUi.prototype.insertTextAt=function(a,b,d,e,k,h,m){h=null!=h?h:!0;m=null!=m?m:!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,d,!0))}));else if("data:"==a.substring(0,5)||!this.isOffline()&&(k||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var c=this.editor.graph;if("data:image/png;base64,"==a.substring(0,22)){var f=this.extractGraphModelFromPng(a),g=this.importXml(f,b,d,h,!0);if(0<g.length)return g}if("data:image/svg+xml;"==a.substring(0,19))try{if(f=null,"data:image/svg+xml;base64,"==a.substring(0,
-26)?(f=a.substring(a.indexOf(",")+1),f=window.atob&&!mxClient.IS_SF?atob(f):Base64.decode(f,!0)):f=decodeURIComponent(a.substring(a.indexOf(",")+1)),g=this.importXml(f,b,d,h,!0),0<g.length)return g}catch(x){}this.loadImage(a,mxUtils.bind(this,function(f){if("data:"==a.substring(0,5))this.resizeImage(f,a,mxUtils.bind(this,function(a,f,e){c.setSelectionCell(c.insertVertex(null,null,"",c.snap(b),c.snap(d),f,e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
-this.convertDataUri(a)+";"))}),m,this.maxImageSize);else{var e=Math.min(1,Math.min(this.maxImageSize/f.width,this.maxImageSize/f.height)),g=Math.round(f.width*e);f=Math.round(f.height*e);c.setSelectionCell(c.insertVertex(null,null,"",c.snap(b),c.snap(d),g,f,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";"))}}),mxUtils.bind(this,function(){var f=null;c.getModel().beginUpdate();try{f=c.insertVertex(c.getDefaultParent(),
+26)?(f=a.substring(a.indexOf(",")+1),f=window.atob&&!mxClient.IS_SF?atob(f):Base64.decode(f,!0)):f=decodeURIComponent(a.substring(a.indexOf(",")+1)),g=this.importXml(f,b,d,h,!0),0<g.length)return g}catch(x){}this.loadImage(a,mxUtils.bind(this,function(e){if("data:"==a.substring(0,5))this.resizeImage(e,a,mxUtils.bind(this,function(a,e,f){c.setSelectionCell(c.insertVertex(null,null,"",c.snap(b),c.snap(d),e,f,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+this.convertDataUri(a)+";"))}),m,this.maxImageSize);else{var f=Math.min(1,Math.min(this.maxImageSize/e.width,this.maxImageSize/e.height)),g=Math.round(e.width*f);e=Math.round(e.height*f);c.setSelectionCell(c.insertVertex(null,null,"",c.snap(b),c.snap(d),g,e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";"))}}),mxUtils.bind(this,function(){var f=null;c.getModel().beginUpdate();try{f=c.insertVertex(c.getDefaultParent(),
null,a,c.snap(b),c.snap(d),1,1,"text;"+(e?"html=1;":"")),c.updateCellSize(f),c.fireEvent(new mxEventObject("textInserted","cells",[f]))}finally{c.getModel().endUpdate()}c.setSelectionCell(f)}))}else{a=this.editor.graph.zapGremlins(mxUtils.trim(a));if(this.isCompatibleString(a))return this.importXml(a,b,d,h);if(0<a.length)if(this.isLucidChartData(a))this.convertLucidChart(a,mxUtils.bind(this,function(a){this.editor.graph.setSelectionCells(this.importXml(a,b,d,h))}),mxUtils.bind(this,function(a){this.handleError(a)}));
else{c=this.editor.graph;k=null;c.getModel().beginUpdate();try{k=c.insertVertex(c.getDefaultParent(),null,"",c.snap(b),c.snap(d),1,1,"text;"+(e?"html=1;":"")),c.fireEvent(new mxEventObject("textInserted","cells",[k])),"<"==a.charAt(0)&&a.indexOf(">")==a.length-1&&(a=mxUtils.htmlEntities(a)),k.value=a,c.updateCellSize(k),/\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(k.value)&&
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 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,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,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="+
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,f,e,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,f,e,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,b){v[a]=b;if(0==--p){this.spinner.stop();if(null!=l)l(v);else{var c=[];g.getModel().beginUpdate();
-try{for(var d=0;d<v.length;d++){var f=v[d]();null!=f&&(c=c.concat(f))}}finally{g.getModel().endUpdate()}}h(c)}}),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");
+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");
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 z=t?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 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,
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,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,d){d=null!=d?d:a.name;var c=new FormData;c.append("format","xml");c.append("upfile",a,d);var f=new XMLHttpRequest;f.open("POST",OPEN_URL);f.onreadystatechange=function(){b(f)};f.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);
+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(B){}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 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,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)<<
+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)),
"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(r){}null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));return b};EditorUi.prototype.loadImage=function(a,b,d){var c=new Image;c.onload=function(){b(c)};null!=d&&(c.onerror=
diff --git a/src/main/webapp/js/atlas.min.js b/src/main/webapp/js/atlas.min.js
index 5f9bdda3..083d654c 100644
--- a/src/main/webapp/js/atlas.min.js
+++ b/src/main/webapp/js/atlas.min.js
@@ -7393,21 +7393,21 @@ this.getTagsForStencil("mxgraph.weblogos","xanga","web logos logo").join(" ")),t
DrawioFile=function(a,c){mxEventSource.call(this);this.ui=a;this.shadowData=this.data=c||""};DrawioFile.SYNC=urlParams.sync||"auto";DrawioFile.LAST_WRITE_WINS=!0;mxUtils.extend(DrawioFile,mxEventSource);DrawioFile.prototype.allChangesSavedKey="allChangesSaved";DrawioFile.prototype.autosaveDelay=1500;DrawioFile.prototype.maxAutosaveDelay=3E4;DrawioFile.prototype.autosaveThread=null;DrawioFile.prototype.lastAutosave=null;DrawioFile.prototype.modified=!1;DrawioFile.prototype.data=null;
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,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(e){try{null!=b&&b()||(null!=e?this.mergeFile(e,a,c):this.reloadFile(a,c))}catch(g){null!=c&&c(g)}}),c)};
-DrawioFile.prototype.mergeFile=function(a,c,b){try{var e=null!=this.shadowPages?this.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.shadowData).documentElement);this.checkShadow(e);this.shadowPages=this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement);this.backupPatch=this.isModified()?this.ui.diffPages(e,this.ui.pages):null;var g=[this.ui.diffPages(e,this.shadowPages)];if(!this.ignorePatches(g)){var h=this.ui.patchPages(e,g[0]),m=this.ui.getHashValueForPages(h),p=this.ui.getHashValueForPages(this.shadowPages);
-"1"==urlParams.test&&EditorUi.debug("File.mergeFile",[this],"backup",this.backupPatch,"patches",g,"checksum",p==m,m);if(null!=m&&m!=p){var n=this.compressReportData(this.getAnonymizedXmlForPages(h));this.checksumError(b,g,"Checksum: "+m+"\nCurrent: "+p+"\nPatched:\n"+n);return}this.patch(g,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(d){this.invalidChecksum=
+DrawioFile.prototype.mergeFile=function(a,c,b){try{var e=null!=this.shadowPages?this.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.shadowData).documentElement);this.checkShadow(e);this.shadowPages=this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement);this.backupPatch=this.isModified()?this.ui.diffPages(e,this.ui.pages):null;var g=[this.ui.diffPages(e,this.shadowPages)];if(!this.ignorePatches(g)){var h=this.ui.patchPages(e,g[0]),m=this.ui.getHashValueForPages(h),q=this.ui.getHashValueForPages(this.shadowPages);
+"1"==urlParams.test&&EditorUi.debug("File.mergeFile",[this],"backup",this.backupPatch,"patches",g,"checksum",q==m,m);if(null!=m&&m!=q){var n=this.compressReportData(this.getAnonymizedXmlForPages(h));this.checksumError(b,g,"Checksum: "+m+"\nCurrent: "+q+"\nPatched:\n"+n);return}this.patch(g,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(d){this.invalidChecksum=
this.inConflictState=!0;null!=b&&b(d);try{this.sendErrorReport("Error in mergeFile",null,d)}catch(f){}}};DrawioFile.prototype.getAnonymizedXmlForPages=function(a){var c=new mxCodec(mxUtils.createXmlDocument()),b=c.document.createElement("mxfile");if(null!=a)for(var e=0;e<a.length;e++){var g=this.ui.anonymizeNode(c.encode(new mxGraphModel(a[e].root)));g.setAttribute("id",a[e].getId());a[e].viewState&&this.ui.editor.graph.saveViewState(a[e].viewState,g,!0);b.appendChild(g)}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,1E3);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";null!=this.stats.start&&(this.stats.uptime=Math.round(((new Date).getTime()-(new Date(this.stats.start)).getTime())/1E3));var h=this.getTitle(),m=h.lastIndexOf("."),e="none";0<m&&(e=h.substring(m));var p=null!=b?b.stack:Error().stack;EditorUi.sendReport(a+" "+(new Date).toISOString()+":\n\nBrowser="+navigator.userAgent+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+
-")"+(null!=this.sync?"\nClient="+this.sync.clientId:"")+"\nUser="+g+"\nExt="+e+"\nSize="+this.getSize()+"\nSync="+DrawioFile.SYNC+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=c?"\n\n"+c:"")+"\n\nStack:\n"+p)}catch(n){}};
+DrawioFile.prototype.sendErrorReport=function(a,c,b){try{var e=this.getCurrentUser(),g=null!=e?this.ui.hashValue(e.id):"unknown";null!=this.stats.start&&(this.stats.uptime=Math.round(((new Date).getTime()-(new Date(this.stats.start)).getTime())/1E3));var h=this.getTitle(),m=h.lastIndexOf("."),e="none";0<m&&(e=h.substring(m));var q=null!=b?b.stack:Error().stack;EditorUi.sendReport(a+" "+(new Date).toISOString()+":\n\nBrowser="+navigator.userAgent+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+
+")"+(null!=this.sync?"\nClient="+this.sync.clientId:"")+"\nUser="+g+"\nExt="+e+"\nSize="+this.getSize()+"\nSync="+DrawioFile.SYNC+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=c?"\n\n"+c:"")+"\n\nStack:\n"+q)}catch(n){}};
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.constructor!=DriveFile||this.isRestricted()?this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this)):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)};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,e=b.history.slice(),g=b.indexOfNextAdd,h=this.ui.editor.graph;h.container.style.visibility="hidden";var m=this.changeListenerEnabled;this.changeListenerEnabled=!1;var p=h.foldingEnabled,n=h.mathEnabled,d=h.cellRenderer.redraw;h.cellRenderer.redraw=function(a){a.view.graph.isEditing(a.cell)&&(a.view.graph.scrollCellToVisible(a.cell),a.view.graph.cellEditor.resize());d.apply(this,arguments)};h.model.beginUpdate();try{for(var f=
+DrawioFile.prototype.patch=function(a,c){var b=this.ui.editor.undoManager,e=b.history.slice(),g=b.indexOfNextAdd,h=this.ui.editor.graph;h.container.style.visibility="hidden";var m=this.changeListenerEnabled;this.changeListenerEnabled=!1;var q=h.foldingEnabled,n=h.mathEnabled,d=h.cellRenderer.redraw;h.cellRenderer.redraw=function(a){a.view.graph.isEditing(a.cell)&&(a.view.graph.scrollCellToVisible(a.cell),a.view.graph.cellEditor.resize());d.apply(this,arguments)};h.model.beginUpdate();try{for(var f=
0;f<a.length;f++)this.ui.pages=this.ui.patchPages(this.ui.pages,a[f],!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{h.model.endUpdate();h.container.style.visibility="";h.cellRenderer.redraw=d;this.changeListenerEnabled=m;b.history=e;b.indexOfNextAdd=g;b.fireEvent(new mxEventObject(mxEvent.CLEAR));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)n!=
-h.mathEnabled?(this.ui.editor.updateGraphComponents(),h.refresh()):(p!=h.foldingEnabled?h.view.revalidate():h.view.validate(),h.sizeDidChange()),null!=this.ui.format&&h.isSelectionEmpty()&&this.ui.format.refresh();this.ui.updateTabContainer()}};
+h.mathEnabled?(this.ui.editor.updateGraphComponents(),h.refresh()):(q!=h.foldingEnabled?h.view.revalidate():h.view.validate(),h.sizeDidChange()),null!=this.ui.format&&h.isSelectionEmpty()&&this.ui.format.refresh();this.ui.updateTabContainer()}};
DrawioFile.prototype.save=function(a,c,b,e,g,h){if(this.isEditable())if(!g&&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,e){};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};
DrawioFile.prototype.isRenamable=function(){return!1};DrawioFile.prototype.rename=function(a,c,b){};DrawioFile.prototype.isMovable=function(){return!1};DrawioFile.prototype.move=function(a,c,b){};DrawioFile.prototype.getHash=function(){return""};DrawioFile.prototype.getId=function(){return""};DrawioFile.prototype.isEditable=function(){return!this.ui.editor.isChromelessView()||this.ui.editor.editable};DrawioFile.prototype.getUi=function(){return this.ui};DrawioFile.prototype.getTitle=function(){return""};
@@ -7430,15 +7430,16 @@ mxResources.get("synchronize"),mxUtils.bind(this,function(){this.reloadFile(a,c)
DrawioFile.prototype.showCopyDialog=function(a,c,b){this.invalidChecksum=this.inConflictState=!1;this.addUnsavedStatus();this.ui.showError(mxResources.get("externalChanges"),mxResources.get("fileChangedOverwriteDialog"),mxResources.get("makeCopy"),mxUtils.bind(this,function(){this.copyFile(a,c)}),null,mxResources.get("overwrite"),b,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog()}),360,this.constructor==DriveFile?180:150);null!=this.ui.dialog&&null!=this.ui.dialog.container&&
this.constructor==DriveFile&&(b=this.ui.createRealtimeNotice(),b.style.left="0",b.style.right="0",b.style.borderRadius="0",b.style.borderLeftStyle="none",b.style.borderRightStyle="none",b.style.marginBottom="26px",b.style.padding="8px 0 8px 0",this.ui.dialog.container.appendChild(b))};
DrawioFile.prototype.showConflictDialog=function(a,c){this.ui.showError(mxResources.get("externalChanges"),mxResources.get("fileChangedSyncDialog"),mxResources.get("overwrite"),a,null,mxResources.get("synchronize"),c,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog();this.handleFileError(null,!1)}),340,150)};
-DrawioFile.prototype.redirectToNewApp=function(a){this.ui.spinner.stop();if(!this.redirectDialogShowing){this.redirectDialogShowing=!0;var c=window.location.protocol+"//"+window.location.host+"/"+this.ui.getSearch("create title mode url drive splash state".split(" "))+"#"+this.getHash(),b=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("loading"));this.redirectDialogShowing=!1;window.location.href==c?window.location.reload():window.location.href=c});null!=a?this.ui.confirm(mxResources.get("redirectToNewApp"),
-b,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;null!=a&&a()})):this.ui.alert(mxResources.get("redirectToNewApp"),b)}};DrawioFile.prototype.handleFileSuccess=function(a){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(this.isModified()?this.fileChanged():a?(this.addAllSavedStatus(),null!=this.sync&&(this.sync.resetUpdateStatusThread(),this.sync.remoteFileChanged&&(this.sync.remoteFileChanged=!1,this.sync.fileChangedNotify()))):this.ui.editor.setStatus(""))};
+DrawioFile.prototype.redirectToNewApp=function(a){this.ui.spinner.stop();if(!this.redirectDialogShowing){this.redirectDialogShowing=!0;var c=window.location.protocol+"//"+window.location.host+"/"+this.ui.getSearch("create title mode url drive splash state".split(" "))+"#"+this.getHash(),b=mxUtils.bind(this,function(){var a=mxUtils.bind(this,function(){this.redirectDialogShowing=!1;window.location.href==c?window.location.reload():window.location.href=c});this.isModified()?this.ui.confirm(mxResources.get("allChangesLost"),
+mxUtils.bind(this,function(){this.redirectDialogShowing=!1}),a,mxResources.get("cancel"),mxResources.get("discardChanges")):a()});null!=a?this.ui.confirm(mxResources.get("redirectToNewApp"),b,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;null!=a&&a()})):this.ui.alert(mxResources.get("redirectToNewApp"),b)}};
+DrawioFile.prototype.handleFileSuccess=function(a){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(this.isModified()?this.fileChanged():a?(this.addAllSavedStatus(),null!=this.sync&&(this.sync.resetUpdateStatusThread(),this.sync.remoteFileChanged&&(this.sync.remoteFileChanged=!1,this.sync.fileChangedNotify()))):this.ui.editor.setStatus(""))};
DrawioFile.prototype.handleFileError=function(a,c){this.ui.spinner.stop();if(this.ui.getCurrentFile()==this)if(this.inConflictState)this.handleConflictError(a,c);else if(this.isModified()&&this.addUnsavedStatus(a),c)this.ui.handleError(a,null!=a?mxResources.get("errorSavingFile"):null);else if(!this.isModified()){var b=null!=a?null!=a.error?a.error.message:a.message:null;null!=b&&60<b.length&&(b=b.substring(0,60)+"...");this.ui.editor.setStatus('<div class="geStatusAlert" style="cursor:pointer;overflow:hidden;">'+
mxUtils.htmlEntities(mxResources.get("error"))+(null!=b?" ("+mxUtils.htmlEntities(b)+")":"")+"</div>")}};
DrawioFile.prototype.handleConflictError=function(a,c){var b=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),e=mxUtils.bind(this,function(a){this.handleFileError(a,!0)}),g=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("saving"))&&(this.ui.editor.setStatus(""),this.save(!0,b,e,null,!0,this.constructor==GitHubFile&&null!=a?a.commitMessage:null))}),h=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("updatingDocument"))&&this.synchronizeFile(mxUtils.bind(this,
function(){this.ui.spinner.stop();this.ui.spinner.spin(document.body,mxResources.get("saving"))&&this.save(!0,b,e,null,null,this.constructor==GitHubFile&&null!=a?a.commitMessage:null)}),e)});"none"==DrawioFile.SYNC?this.showCopyDialog(b,e,g):this.invalidChecksum?this.showRefreshDialog(b,e):c?this.showConflictDialog(g,h):this.addConflictStatus(mxUtils.bind(this,function(){this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("updatingDocument")));this.synchronizeFile(b,e)}),this.getErrorMessage(a))};
DrawioFile.prototype.getErrorMessage=function(a){return null!=a?null!=a.error?a.error.message:a.message:null};
DrawioFile.prototype.fileChanged=function(){this.setModified(!0);this.isAutosave()?(this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get("saving"))+"..."),this.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(a){null==this.autosaveThread&&this.handleFileSuccess(!0)}),mxUtils.bind(this,function(a){this.handleFileError(a)}))):this.isAutosaveOptional()&&this.ui.editor.autosave||this.inConflictState||this.addUnsavedStatus()};
-DrawioFile.prototype.fileSaved=function(a,c,b,e){this.invalidChecksum=this.inConflictState=!1;this.checkPages();null==this.sync?(this.shadowData=a,this.shadowPages=null,null!=b&&b()):this.sync.fileSaved(this.ui.getPagesForNode(mxUtils.parseXml(a).documentElement),c,b,e)};
+DrawioFile.prototype.fileSaved=function(a,c,b,e){try{this.invalidChecksum=this.inConflictState=!1,this.checkPages(),null==this.sync?(this.shadowData=a,this.shadowPages=null,null!=b&&b()):this.sync.fileSaved(this.ui.getPagesForNode(mxUtils.parseXml(a).documentElement),c,b,e)}catch(g){this.invalidChecksum=this.inConflictState=!0;null!=e&&e(g);try{this.sendErrorReport("Error in fileSaved",null,g)}catch(h){}}};
DrawioFile.prototype.autosave=function(a,c,b,e){null==this.lastAutosave&&(this.lastAutosave=(new Date).getTime());a=(new Date).getTime()-this.lastAutosave<c?a:0;this.clearAutosave();var g=window.setTimeout(mxUtils.bind(this,function(){this.lastAutosave=null;this.autosaveThread==g&&(this.autosaveThread=null);if(this.isModified()&&this.isAutosaveNow()){var a=this.isAutosaveRevision();a&&(this.lastAutosaveRevision=(new Date).getTime());this.save(a,mxUtils.bind(this,function(a){this.autosaveCompleted();
null!=b&&b(a)}),mxUtils.bind(this,function(a){null!=e&&e(a)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=b&&b(null)}),a);this.autosaveThread=g};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){};DrawioFile.prototype.clearAutosave=function(){null!=this.autosaveThread&&(window.clearTimeout(this.autosaveThread),this.autosaveThread=null)};
DrawioFile.prototype.isAutosaveRevision=function(){var a=(new Date).getTime();return null==this.lastAutosaveRevision||a-this.lastAutosaveRevision>this.maxAutosaveRevisionDelay};DrawioFile.prototype.descriptorChanged=function(){this.fireEvent(new mxEventObject("descriptorChanged"))};DrawioFile.prototype.contentChanged=function(){this.fireEvent(new mxEventObject("contentChanged"))};
@@ -7453,21 +7454,21 @@ StorageFile.prototype.isRenamable=function(){return!0};StorageFile.prototype.sav
StorageFile.prototype.saveFile=function(a,c,b,e){if(this.isEditable()){var g=mxUtils.bind(this,function(){this.isRenamable()&&(this.title=a);try{this.ui.setLocalData(this.title,this.getData(),mxUtils.bind(this,function(){this.setModified(!1);this.contentChanged();null!=b&&b()}))}catch(h){null!=e&&e(h)}});this.isRenamable()&&"."==a.charAt(0)&&null!=e?e({message:mxResources.get("invalidName")}):this.ui.getLocalData(a,mxUtils.bind(this,function(b){this.isRenamable()&&this.getTitle()!=a&&null!=b?this.ui.confirm(mxResources.get("replaceIt",
[a]),g,e):g()}))}else null!=b&&b()};StorageFile.prototype.rename=function(a,c,b){var e=this.getTitle();e!=a?this.ui.getLocalData(a,mxUtils.bind(this,function(g){var h=mxUtils.bind(this,function(){this.title=a;this.hasSameExtension(e,a)||this.setData(this.ui.getFileData());this.saveFile(a,!1,mxUtils.bind(this,function(){this.ui.removeLocalData(e,c)}),b)});null!=g?this.ui.confirm(mxResources.get("replaceIt",[a]),h,b):h()})):c()};
StorageFile.prototype.open=function(){DrawioFile.prototype.open.apply(this,arguments);this.saveFile(this.getTitle())};StorageFile.prototype.getLatestVersion=function(a,c){this.ui.getLocalData(this.title,mxUtils.bind(this,function(b){a(new StorageFile(this.ui,b,this.title))}))};StorageFile.prototype.destroy=function(){DrawioFile.prototype.destroy.apply(this,arguments);null!=this.storageListener&&(mxEvent.removeListener(window,"storage",this.storageListener),this.storageListener=null)};StorageLibrary=function(a,c,b){StorageFile.call(this,a,c,b)};mxUtils.extend(StorageLibrary,StorageFile);StorageLibrary.prototype.isAutosave=function(){return!0};StorageLibrary.prototype.saveAs=function(a,c,b){this.saveFile(a,!1,c,b)};StorageLibrary.prototype.getHash=function(){return"L"+encodeURIComponent(this.title)};StorageLibrary.prototype.getTitle=function(){return".scratchpad"==this.title?mxResources.get("scratchpad"):this.title};
-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 e(q,t,k,e,z,u){function w(){mxEvent.addListener(v,"click",null!=u?u:function(){k!=App.MODE_GOOGLE||a.isDriveDomain()?k==App.MODE_GOOGLE&&a.spinner.spin(document.body,mxResources.get("authorizing"))?a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();a.setMode(k,d.checked);c()})):(a.setMode(k,d.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",t);mxClient.IS_QUIRKS&&(v.style.cssFloat="left",v.style.zoom="1");var C=document.createElement("div");C.style.textOverflow="ellipsis";C.style.overflow="hidden";if(null!=q){var g=document.createElement("img");
-g.setAttribute("src",q);g.setAttribute("border","0");g.setAttribute("align","absmiddle");g.style.width="60px";g.style.height="60px";g.style.paddingBottom="6px";v.appendChild(g)}else C.style.paddingTop="5px",C.style.whiteSpace="normal",mxClient.IS_IOS?(v.style.padding="0px 10px 20px 10px",v.style.top="6px"):mxClient.IS_FF&&(C.style.paddingTop="0px",C.style.marginTop="-2px");v.appendChild(C);mxUtils.write(C,t);if(null!=z)for(q=0;q<z.length;q++)mxUtils.br(C),mxUtils.write(C,z[q]);if(null!=e&&null==a[e]){g.style.visibility=
-"hidden";mxUtils.setOpacity(C,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 y=window.setTimeout(function(){null==a[e]&&(h.stop(),v.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[e]&&(window.clearTimeout(y),mxUtils.setOpacity(C,100),g.style.visibility="",h.stop(),w(),"drive"==e&&null!=l.parentNode&&l.parentNode.removeChild(l))}))}else w();
+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 e(p,t,l,e,z,u){function w(){mxEvent.addListener(v,"click",null!=u?u:function(){l!=App.MODE_GOOGLE||a.isDriveDomain()?l==App.MODE_GOOGLE&&a.spinner.spin(document.body,mxResources.get("authorizing"))?a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();a.setMode(l,d.checked);c()})):(a.setMode(l,d.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",t);mxClient.IS_QUIRKS&&(v.style.cssFloat="left",v.style.zoom="1");var D=document.createElement("div");D.style.textOverflow="ellipsis";D.style.overflow="hidden";if(null!=p){var g=document.createElement("img");
+g.setAttribute("src",p);g.setAttribute("border","0");g.setAttribute("align","absmiddle");g.style.width="60px";g.style.height="60px";g.style.paddingBottom="6px";v.appendChild(g)}else D.style.paddingTop="5px",D.style.whiteSpace="normal",mxClient.IS_IOS?(v.style.padding="0px 10px 20px 10px",v.style.top="6px"):mxClient.IS_FF&&(D.style.paddingTop="0px",D.style.marginTop="-2px");v.appendChild(D);mxUtils.write(D,t);if(null!=z)for(p=0;p<z.length;p++)mxUtils.br(D),mxUtils.write(D,z[p]);if(null!=e&&null==a[e]){g.style.visibility=
+"hidden";mxUtils.setOpacity(D,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 y=window.setTimeout(function(){null==a[e]&&(h.stop(),v.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[e]&&(window.clearTimeout(y),mxUtils.setOpacity(D,100),g.style.visibility="",h.stop(),w(),"drive"==e&&null!=k.parentNode&&k.parentNode.removeChild(k))}))}else w();
n.appendChild(v);++f>=b&&(mxUtils.br(n),f=0)}b=null!=b?b:2;var g=document.createElement("div");g.style.textAlign="center";g.style.whiteSpace="nowrap";g.style.paddingTop="0px";g.style.paddingBottom="20px";var h=a.addLanguageMenu(g,!0);null!=h&&(h.style.bottom=parseInt("28px")-2+"px");if(!a.isOffline()&&1<a.getServiceCount()){h=document.createElement("a");h.setAttribute("href","https://about.draw.io/support/");h.setAttribute("title",mxResources.get("help"));h.setAttribute("target","_blank");h.style.position=
-"absolute";h.style.textDecoration="none";h.style.cursor="pointer";h.style.fontSize="12px";h.style.bottom="28px";h.style.left="26px";h.style.color="gray";var m=document.createElement("img");mxUtils.setOpacity(m,50);m.style.height="16px";m.style.width="16px";m.setAttribute("border","0");m.setAttribute("valign","bottom");m.setAttribute("src",Editor.helpImage);m.style.marginRight="2px";h.appendChild(m);mxUtils.write(h,mxResources.get("help"));g.appendChild(h)}var p=document.createElement("div");p.style.position=
-"absolute";p.style.cursor="pointer";p.style.fontSize="12px";p.style.bottom="28px";p.style.color="gray";mxUtils.write(p,mxResources.get("decideLater"));a.isOfflineApp()?p.style.right="20px":(mxUtils.setPrefixedStyle(p.style,"transform","translate(-50%,0)"),p.style.left="50%");this.init=function(){if(mxClient.IS_QUIRKS||8==document.documentMode)p.style.marginLeft=-Math.round(p.clientWidth/2)+"px"};g.appendChild(p);mxEvent.addListener(p,"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 d=document.createElement("input");d.setAttribute("type","checkbox");d.setAttribute("checked","checked");d.defaultChecked=!0;var f=0,l=document.createElement("p"),h=document.createElement("p");
+"absolute";h.style.textDecoration="none";h.style.cursor="pointer";h.style.fontSize="12px";h.style.bottom="28px";h.style.left="26px";h.style.color="gray";var m=document.createElement("img");mxUtils.setOpacity(m,50);m.style.height="16px";m.style.width="16px";m.setAttribute("border","0");m.setAttribute("valign","bottom");m.setAttribute("src",Editor.helpImage);m.style.marginRight="2px";h.appendChild(m);mxUtils.write(h,mxResources.get("help"));g.appendChild(h)}var q=document.createElement("div");q.style.position=
+"absolute";q.style.cursor="pointer";q.style.fontSize="12px";q.style.bottom="28px";q.style.color="gray";mxUtils.write(q,mxResources.get("decideLater"));a.isOfflineApp()?q.style.right="20px":(mxUtils.setPrefixedStyle(q.style,"transform","translate(-50%,0)"),q.style.left="50%");this.init=function(){if(mxClient.IS_QUIRKS||8==document.documentMode)q.style.marginLeft=-Math.round(q.clientWidth/2)+"px"};g.appendChild(q);mxEvent.addListener(q,"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 d=document.createElement("input");d.setAttribute("type","checkbox");d.setAttribute("checked","checked");d.defaultChecked=!0;var f=0,k=document.createElement("p"),h=document.createElement("p");
h.style.fontSize="16pt";h.style.padding="0px";h.style.paddingTop="4px";h.style.paddingBottom="16px";h.style.margin="0px";h.style.color="gray";mxUtils.write(h,mxResources.get("saveDiagramsTo")+":");g.appendChild(h);"function"===typeof window.DriveClient&&e(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive");"function"===typeof window.OneDriveClient&&e(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive");mxClient.IS_IOS&&"device"!=
urlParams.storage||e(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);!isLocalStorage||"1"!=urlParams.browser&&"1"!=urlParams.offline||e(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER);g.appendChild(n);h=document.createElement("p");h.style.marginTop="12px";h.style.marginBottom="6px";h.appendChild(d);m=document.createElement("span");m.style.color="gray";m.style.fontSize="12px";mxUtils.write(m," "+mxResources.get("rememberThisSetting"));h.appendChild(m);
-mxUtils.br(h);var q=a.getRecent();if(null!=q&&0<q.length){var t=document.createElement("select");t.style.marginTop="8px";t.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")+"...");t.appendChild(u);for(u=0;u<q.length;u++)(function(a){var b=a.mode;b==App.MODE_GOOGLE?b="googleDrive":b==App.MODE_ONEDRIVE&&(b="oneDrive");var d=document.createElement("option");
-d.setAttribute("value",a.id);mxUtils.write(d,a.title+" ("+mxResources.get(b)+")");t.appendChild(d)})(q[u]);h.appendChild(t);mxEvent.addListener(t,"change",function(b){""!=t.value&&a.loadFile(t.value)})}else h.style.marginTop="20px",n.style.padding="30px 0px 26px 0px";!Graph.fileSupport||mxClient.IS_IE||mxClient.IS_IE11||(q=document.createElement("div"),q.style.cursor="pointer",q.style.padding="18px 0px 6px 0px",q.style.fontSize="12px",q.style.color="gray",mxUtils.write(q,mxResources.get("import")+
-": "+mxResources.get("gliffy")+", "+mxResources.get("formatVssx")+", "+mxResources.get("formatVsdx")+", "+mxResources.get("lucidchart")+"..."),mxEvent.addListener(q,"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()}),h.appendChild(q),n.style.paddingBottom="4px");n.appendChild(h);mxEvent.addListener(m,"click",function(a){d.checked=!d.checked;mxEvent.consume(a)});
-mxClient.IS_SVG&&isLocalStorage&&"0"!=urlParams.gapi&&(null==document.documentMode||10<=document.documentMode)&&window.setTimeout(function(){null==a.drive&&(l.style.padding="8px",l.style.fontSize="9pt",l.style.marginTop="-14px",l.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>",g.appendChild(l))},5E3);this.container=g},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=
+mxUtils.br(h);var p=a.getRecent();if(null!=p&&0<p.length){var t=document.createElement("select");t.style.marginTop="8px";t.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")+"...");t.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 d=document.createElement("option");
+d.setAttribute("value",a.id);mxUtils.write(d,a.title+" ("+mxResources.get(b)+")");t.appendChild(d)})(p[u]);h.appendChild(t);mxEvent.addListener(t,"change",function(b){""!=t.value&&a.loadFile(t.value)})}else h.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()}),h.appendChild(p),n.style.paddingBottom="4px");n.appendChild(h);mxEvent.addListener(m,"click",function(a){d.checked=!d.checked;mxEvent.consume(a)});
+mxClient.IS_SVG&&isLocalStorage&&"0"!=urlParams.gapi&&(null==document.documentMode||10<=document.documentMode)&&window.setTimeout(function(){null==a.drive&&(k.style.padding="8px",k.style.fontSize="9pt",k.style.marginTop="-14px",k.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>",g.appendChild(k))},5E3);this.container=g},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 e=document.createElement("img");mxUtils.setOpacity(e,50);e.style.height="16px";e.style.width="16px";e.setAttribute("border","0");e.setAttribute("valign","bottom");e.setAttribute("src",Editor.helpImage);e.style.marginRight="2px";b.appendChild(e);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";e=document.createElement("img");
e.setAttribute("border","0");e.setAttribute("align","absmiddle");e.style.width="40px";e.style.height="40px";e.style.marginRight="12px";e.style.paddingBottom="4px";var g="";a.mode==App.MODE_GOOGLE?(e.src=IMAGE_PATH+"/google-drive-logo.svg",g=mxResources.get("googleDrive")):a.mode==App.MODE_DROPBOX?(e.src=IMAGE_PATH+"/dropbox-logo.svg",g=mxResources.get("dropbox")):a.mode==App.MODE_ONEDRIVE?(e.src=IMAGE_PATH+"/onedrive-logo.svg",g=mxResources.get("oneDrive")):a.mode==App.MODE_GITHUB?(e.src=IMAGE_PATH+
"/github-logo.svg",g=mxResources.get("github")):a.mode==App.MODE_TRELLO?(e.src=IMAGE_PATH+"/trello-logo.svg",g=mxResources.get("trello")):a.mode==App.MODE_BROWSER?(e.src=IMAGE_PATH+"/osa_database.png",g=mxResources.get("browser")):(e.src=IMAGE_PATH+"/osa_drive-harddisk.png",g=mxResources.get("device"));var h=document.createElement("div");h.style.margin="4px 0px 0px 0px";var m=document.createElement("button");m.className="geBigButton";m.style.overflow="hidden";m.style.width="340px";mxClient.IS_CHROMEAPP||
@@ -7477,259 +7478,259 @@ a.mode==App.MODE_ONEDRIVE?b=mxResources.get("oneDrive"):a.mode==App.MODE_GITHUB?
mxResources.get("signOut"));m.style.marginBottom="16px";h.style.paddingBottom="18px";mxEvent.addListener(c,"click",function(){a.confirm(mxResources.get("areYouSure"),function(){b()})});h.appendChild(c)},e=null!=a.drive?a.drive.getUser():null,a.mode==App.MODE_GOOGLE&&null!=e?(m.style.marginBottom="24px",g=document.createElement("a"),g.setAttribute("href","javascript:void(0)"),g.style.display="inline-block",g.style.marginTop="6px",mxUtils.write(g,mxResources.get("changeUser")+" ("+e.displayName+")"),
m.style.marginBottom="16px",h.style.paddingBottom="18px",mxEvent.addListener(g,"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()})}))}),h.appendChild(g)):a.mode==App.MODE_ONEDRIVE&&null!=a.oneDrive?g(function(){a.oneDrive.logout()}):
a.mode==App.MODE_GITHUB&&null!=a.gitHub?g(function(){a.gitHub.logout();a.openLink("https://www.github.com/logout")}):a.mode==App.MODE_TRELLO&&null!=a.trello?a.trello.isAuthorized()&&g(function(){a.trello.logout()}):a.mode==App.MODE_DROPBOX&&null!=a.dropbox&&g(function(){a.dropbox.logout();a.openLink("https://www.dropbox.com/logout")}),mxUtils.br(h),g=document.createElement("a"),g.setAttribute("href","javascript:void(0)"),g.style.display="inline-block",g.style.marginTop="8px",mxUtils.write(g,mxResources.get("notUsingService",
-[b])),mxEvent.addListener(g,"click",function(){a.hideDialog(!1);a.setMode(null);a.clearMode();a.showSplash(!0)}),h.appendChild(g));c.appendChild(h);this.container=c},ConfirmDialog=function(a,c,b,e,g,h,m,p,n){var d=document.createElement("div");d.style.textAlign="center";var f=document.createElement("div");f.style.padding="6px";f.style.overflow="auto";f.style.maxHeight="44px";mxClient.IS_QUIRKS&&(f.style.height="60px");mxUtils.write(f,c);d.appendChild(f);f=document.createElement("div");f.style.textAlign=
-"center";f.style.whiteSpace="nowrap";var l=document.createElement("input");l.setAttribute("type","checkbox");h=mxUtils.button(h||mxResources.get("cancel"),function(){a.hideDialog();null!=e&&e(l.checked)});h.className="geBtn";null!=p&&(h.innerHTML=p+"<br>"+h.innerHTML,h.style.paddingBottom="8px",h.style.paddingTop="8px",h.style.height="auto",h.style.width="40%");a.editor.cancelFirst&&f.appendChild(h);var q=mxUtils.button(g||mxResources.get("ok"),function(){a.hideDialog();null!=b&&b(l.checked)});f.appendChild(q);
-null!=m?(q.innerHTML=m+"<br>"+q.innerHTML+"<br>",q.style.paddingBottom="8px",q.style.paddingTop="8px",q.style.height="auto",q.className="geBtn",q.style.width="40%"):q.className="geBtn gePrimaryBtn";a.editor.cancelFirst||f.appendChild(h);d.appendChild(f);n?(f.style.marginTop="10px",f=document.createElement("p"),f.style.marginTop="20px",f.appendChild(l),g=document.createElement("span"),mxUtils.write(g," "+mxResources.get("rememberThisSetting")),f.appendChild(g),d.appendChild(f),mxEvent.addListener(g,
-"click",function(a){l.checked=!l.checked;mxEvent.consume(a)})):f.style.marginTop="16px";this.init=function(){q.focus()};this.container=d},EmbedDialog=function(a,c,b,e,g,h){e=document.createElement("div");var m=/^https?:\/\//.test(c)||/^mailto:\/\//.test(c);null!=h?mxUtils.write(e,h):mxUtils.write(e,mxResources.get(5E5>c.length?m?"link":"mainEmbedNotice":"preview")+":");mxUtils.br(e);h=document.createElement("div");h.style.position="absolute";h.style.top="30px";h.style.right="30px";h.style.color="gray";
-mxUtils.write(h,a.formatFileSize(c.length));e.appendChild(h);var p=document.createElement("textarea");p.setAttribute("autocomplete","off");p.setAttribute("autocorrect","off");p.setAttribute("autocapitalize","off");p.setAttribute("spellcheck","false");p.style.marginTop="10px";p.style.resize="none";p.style.height="150px";p.style.width="440px";p.style.border="1px solid gray";p.value=mxResources.get("updatingDocument");e.appendChild(p);mxUtils.br(e);this.init=function(){window.setTimeout(function(){5E5>
-c.length?(p.value=c,p.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?p.select():document.execCommand("selectAll",!1,null)):(p.setAttribute("readonly","true"),p.value=c.substring(0,340)+"... ("+mxResources.get("drawingTooLarge")+")")},0)};h=document.createElement("div");h.style.position="absolute";h.style.bottom="36px";h.style.right="32px";var n=null;!EmbedDialog.showPreviewOption||mxClient.IS_CHROMEAPP&&!m||navigator.standalone||!(m||mxClient.IS_SVG&&(null==document.documentMode||
-9<document.documentMode))||(n=mxUtils.button(mxResources.get(5E5>c.length?"preview":"openInNewWindow"),function(){var d=5E5>c.length?p.value:c;if(null!=g)g(d);else if(m)try{var f=a.openLink(d);null!=f&&(null==b||0<b)&&window.setTimeout(mxUtils.bind(this,function(){null!=f&&null!=f.location.href&&f.location.href.substring(0,8)!=d.substring(0,8)&&(f.close(),a.handleError({message:mxResources.get("drawingTooLarge")}))}),b||500)}catch(u){a.handleError({message:u.message||mxResources.get("drawingTooLarge")})}else{var t=
+[b])),mxEvent.addListener(g,"click",function(){a.hideDialog(!1);a.setMode(null);a.clearMode();a.showSplash(!0)}),h.appendChild(g));c.appendChild(h);this.container=c},ConfirmDialog=function(a,c,b,e,g,h,m,q,n){var d=document.createElement("div");d.style.textAlign="center";var f=document.createElement("div");f.style.padding="6px";f.style.overflow="auto";f.style.maxHeight="44px";mxClient.IS_QUIRKS&&(f.style.height="60px");mxUtils.write(f,c);d.appendChild(f);f=document.createElement("div");f.style.textAlign=
+"center";f.style.whiteSpace="nowrap";var k=document.createElement("input");k.setAttribute("type","checkbox");h=mxUtils.button(h||mxResources.get("cancel"),function(){a.hideDialog();null!=e&&e(k.checked)});h.className="geBtn";null!=q&&(h.innerHTML=q+"<br>"+h.innerHTML,h.style.paddingBottom="8px",h.style.paddingTop="8px",h.style.height="auto",h.style.width="40%");a.editor.cancelFirst&&f.appendChild(h);var p=mxUtils.button(g||mxResources.get("ok"),function(){a.hideDialog();null!=b&&b(k.checked)});f.appendChild(p);
+null!=m?(p.innerHTML=m+"<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||f.appendChild(h);d.appendChild(f);n?(f.style.marginTop="10px",f=document.createElement("p"),f.style.marginTop="20px",f.appendChild(k),g=document.createElement("span"),mxUtils.write(g," "+mxResources.get("rememberThisSetting")),f.appendChild(g),d.appendChild(f),mxEvent.addListener(g,
+"click",function(a){k.checked=!k.checked;mxEvent.consume(a)})):f.style.marginTop="16px";this.init=function(){p.focus()};this.container=d},EmbedDialog=function(a,c,b,e,g,h){e=document.createElement("div");var m=/^https?:\/\//.test(c)||/^mailto:\/\//.test(c);null!=h?mxUtils.write(e,h):mxUtils.write(e,mxResources.get(5E5>c.length?m?"link":"mainEmbedNotice":"preview")+":");mxUtils.br(e);h=document.createElement("div");h.style.position="absolute";h.style.top="30px";h.style.right="30px";h.style.color="gray";
+mxUtils.write(h,a.formatFileSize(c.length));e.appendChild(h);var q=document.createElement("textarea");q.setAttribute("autocomplete","off");q.setAttribute("autocorrect","off");q.setAttribute("autocapitalize","off");q.setAttribute("spellcheck","false");q.style.marginTop="10px";q.style.resize="none";q.style.height="150px";q.style.width="440px";q.style.border="1px solid gray";q.value=mxResources.get("updatingDocument");e.appendChild(q);mxUtils.br(e);this.init=function(){window.setTimeout(function(){5E5>
+c.length?(q.value=c,q.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?q.select():document.execCommand("selectAll",!1,null)):(q.setAttribute("readonly","true"),q.value=c.substring(0,340)+"... ("+mxResources.get("drawingTooLarge")+")")},0)};h=document.createElement("div");h.style.position="absolute";h.style.bottom="36px";h.style.right="32px";var n=null;!EmbedDialog.showPreviewOption||mxClient.IS_CHROMEAPP&&!m||navigator.standalone||!(m||mxClient.IS_SVG&&(null==document.documentMode||
+9<document.documentMode))||(n=mxUtils.button(mxResources.get(5E5>c.length?"preview":"openInNewWindow"),function(){var d=5E5>c.length?q.value:c;if(null!=g)g(d);else if(m)try{var f=a.openLink(d);null!=f&&(null==b||0<b)&&window.setTimeout(mxUtils.bind(this,function(){null!=f&&null!=f.location.href&&f.location.href.substring(0,8)!=d.substring(0,8)&&(f.close(),a.handleError({message:mxResources.get("drawingTooLarge")}))}),b||500)}catch(u){a.handleError({message:u.message||mxResources.get("drawingTooLarge")})}else{var t=
window.open().document;t.writeln("<html><head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head><body>'+c+"</body></html>");t.close()}}),n.className="geBtn",h.appendChild(n));if(!m||7500<c.length){var d=mxUtils.button(mxResources.get("download"),function(){a.hideDialog();a.saveData("embed.txt","txt",c,"text/plain")});d.className="geBtn";h.appendChild(d)}if(m&&(!a.isOffline()||mxClient.IS_CHROMEAPP)){if(51200>c.length){var f=mxUtils.button("",function(){try{var b=
-"https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(p.value);a.openLink(b)}catch(q){a.handleError({message:q.message||mxResources.get("drawingTooLarge")})}}),d=document.createElement("img");d.setAttribute("src",Editor.facebookImage);d.setAttribute("width","18");d.setAttribute("height","18");d.setAttribute("border","0");f.appendChild(d);f.setAttribute("title",mxResources.get("facebook")+" ("+a.formatFileSize(51200)+" max)");f.style.verticalAlign="bottom";f.style.paddingTop="4px";f.style.minWidth=
-"46px";f.className="geBtn";h.appendChild(f)}7168>c.length&&(f=mxUtils.button("",function(){try{var b="https://twitter.com/intent/tweet?text="+encodeURIComponent("Check out the diagram I made using @drawio")+"&url="+encodeURIComponent(p.value);a.openLink(b)}catch(q){a.handleError({message:q.message||mxResources.get("drawingTooLarge")})}}),d=document.createElement("img"),d.setAttribute("src",Editor.tweetImage),d.setAttribute("width","18"),d.setAttribute("height","18"),d.setAttribute("border","0"),d.style.marginBottom=
-"5px",f.appendChild(d),f.setAttribute("title",mxResources.get("twitter")+" ("+a.formatFileSize(7168)+" max)"),f.style.verticalAlign="bottom",f.style.paddingTop="4px",f.style.minWidth="46px",f.className="geBtn",h.appendChild(f))}d=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});h.appendChild(d);f=mxUtils.button(mxResources.get("copy"),function(){p.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?p.select():document.execCommand("selectAll",!1,
+"https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(q.value);a.openLink(b)}catch(p){a.handleError({message:p.message||mxResources.get("drawingTooLarge")})}}),d=document.createElement("img");d.setAttribute("src",Editor.facebookImage);d.setAttribute("width","18");d.setAttribute("height","18");d.setAttribute("border","0");f.appendChild(d);f.setAttribute("title",mxResources.get("facebook")+" ("+a.formatFileSize(51200)+" max)");f.style.verticalAlign="bottom";f.style.paddingTop="4px";f.style.minWidth=
+"46px";f.className="geBtn";h.appendChild(f)}7168>c.length&&(f=mxUtils.button("",function(){try{var b="https://twitter.com/intent/tweet?text="+encodeURIComponent("Check out the diagram I made using @drawio")+"&url="+encodeURIComponent(q.value);a.openLink(b)}catch(p){a.handleError({message:p.message||mxResources.get("drawingTooLarge")})}}),d=document.createElement("img"),d.setAttribute("src",Editor.tweetImage),d.setAttribute("width","18"),d.setAttribute("height","18"),d.setAttribute("border","0"),d.style.marginBottom=
+"5px",f.appendChild(d),f.setAttribute("title",mxResources.get("twitter")+" ("+a.formatFileSize(7168)+" max)"),f.style.verticalAlign="bottom",f.style.paddingTop="4px",f.style.minWidth="46px",f.className="geBtn",h.appendChild(f))}d=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});h.appendChild(d);f=mxUtils.button(mxResources.get("copy"),function(){q.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?q.select():document.execCommand("selectAll",!1,
null);document.execCommand("copy");a.alert(mxResources.get("copiedToClipboard"))});5E5>c.length?mxClient.IS_SF||null!=document.documentMode?d.className="geBtn gePrimaryBtn":(h.appendChild(f),f.className="geBtn gePrimaryBtn",d.className="geBtn"):(h.appendChild(n),d.className="geBtn",n.className="geBtn gePrimaryBtn");e.appendChild(h);this.container=e};EmbedDialog.showPreviewOption=!0;
-var GoogleSitesDialog=function(a,c){function b(){var a=null!=x&&null!=x.getTitle()?x.getTitle():this.defaultFilename;if(C.checked&&""!=q.value){var b="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(q.value));null!=a&&(b+="&title="+encodeURIComponent(a));0<B.length&&(b+="&s="+B);""!=t.value&&"0"!=t.value&&(b+="&border="+t.value);""!=l.value&&(b+="&height="+l.value);b+="&pan="+(u.checked?"1":"0");b+="&zoom="+(w.checked?"1":"0");b+="&fit="+(z.checked?"1":"0");
-b+="&resize="+(v.checked?"1":"0");b+="&x0="+Number(f.value);b+="&y0="+n;g.mathEnabled&&(b+="&math=1");k.checked?b+="&edit=_blank":y.checked&&(b+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));d.value=b}else x.constructor==DriveFile||x.constructor==DropboxFile?(b="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=q.value?b+=encodeURIComponent(mxUtils.htmlEntities(q.value))+"&type=3":(b+=x.getHash().substring(1),b=x.constructor==DropboxFile?b+"&type=2":b+"&type=1"),null!=
-a&&(b+="&title="+encodeURIComponent(a)),""!=l.value&&(a=parseInt(l.value)+parseInt(f.value),b+="&height="+a),d.value=b):d.value=""}var e=document.createElement("div"),g=a.editor.graph,h=g.getGraphBounds(),m=g.view.scale,p=Math.floor(h.x/m-g.view.translate.x),n=Math.floor(h.y/m-g.view.translate.y);mxUtils.write(e,mxResources.get("googleGadget")+":");mxUtils.br(e);var d=document.createElement("input");d.setAttribute("type","text");d.style.marginBottom="8px";d.style.marginTop="2px";d.style.width="410px";
-e.appendChild(d);mxUtils.br(e);this.init=function(){d.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?d.select():document.execCommand("selectAll",!1,null)};mxUtils.write(e,mxResources.get("top")+":");var f=document.createElement("input");f.setAttribute("type","text");f.setAttribute("size","4");f.style.marginRight="16px";f.style.marginLeft="4px";f.value=p;e.appendChild(f);mxUtils.write(e,mxResources.get("height")+":");var l=document.createElement("input");l.setAttribute("type",
-"text");l.setAttribute("size","4");l.style.marginLeft="4px";l.value=Math.ceil(h.height/m);e.appendChild(l);mxUtils.br(e);h=document.createElement("hr");h.setAttribute("size","1");h.style.marginBottom="16px";h.style.marginTop="16px";e.appendChild(h);mxUtils.write(e,mxResources.get("publicDiagramUrl")+":");mxUtils.br(e);var q=document.createElement("input");q.setAttribute("type","text");q.setAttribute("size","28");q.style.marginBottom="8px";q.style.marginTop="2px";q.style.width="410px";q.value=c||"";
-e.appendChild(q);mxUtils.br(e);mxUtils.write(e,mxResources.get("borderWidth")+":");var t=document.createElement("input");t.setAttribute("type","text");t.setAttribute("size","3");t.style.marginBottom="8px";t.style.marginLeft="4px";t.value="0";e.appendChild(t);mxUtils.br(e);var u=document.createElement("input");u.setAttribute("type","checkbox");u.setAttribute("checked","checked");u.defaultChecked=!0;u.style.marginLeft="16px";e.appendChild(u);mxUtils.write(e,mxResources.get("pan")+" ");var w=document.createElement("input");
-w.setAttribute("type","checkbox");w.setAttribute("checked","checked");w.defaultChecked=!0;w.style.marginLeft="8px";e.appendChild(w);mxUtils.write(e,mxResources.get("zoom")+" ");var y=document.createElement("input");y.setAttribute("type","checkbox");y.style.marginLeft="8px";y.setAttribute("title",window.location.href);e.appendChild(y);mxUtils.write(e,mxResources.get("edit")+" ");var k=document.createElement("input");k.setAttribute("type","checkbox");k.style.marginLeft="8px";e.appendChild(k);mxUtils.write(e,
-mxResources.get("asNew")+" ");mxUtils.br(e);var v=document.createElement("input");v.setAttribute("type","checkbox");v.setAttribute("checked","checked");v.defaultChecked=!0;v.style.marginLeft="16px";e.appendChild(v);mxUtils.write(e,mxResources.get("resize")+" ");var z=document.createElement("input");z.setAttribute("type","checkbox");z.style.marginLeft="8px";e.appendChild(z);mxUtils.write(e,mxResources.get("fit")+" ");var C=document.createElement("input");C.setAttribute("type","checkbox");C.style.marginLeft=
-"8px";e.appendChild(C);mxUtils.write(e,mxResources.get("embed")+" ");var B=a.getBasenames().join(";"),x=a.getCurrentFile();mxEvent.addListener(u,"change",b);mxEvent.addListener(w,"change",b);mxEvent.addListener(v,"change",b);mxEvent.addListener(z,"change",b);mxEvent.addListener(y,"change",b);mxEvent.addListener(k,"change",b);mxEvent.addListener(C,"change",b);mxEvent.addListener(l,"change",b);mxEvent.addListener(f,"change",b);mxEvent.addListener(t,"change",b);mxEvent.addListener(q,"change",b);b();
+var GoogleSitesDialog=function(a,c){function b(){var a=null!=x&&null!=x.getTitle()?x.getTitle():this.defaultFilename;if(D.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<B.length&&(b+="&s="+B);""!=t.value&&"0"!=t.value&&(b+="&border="+t.value);""!=k.value&&(b+="&height="+k.value);b+="&pan="+(u.checked?"1":"0");b+="&zoom="+(w.checked?"1":"0");b+="&fit="+(z.checked?"1":"0");
+b+="&resize="+(v.checked?"1":"0");b+="&x0="+Number(f.value);b+="&y0="+n;g.mathEnabled&&(b+="&math=1");l.checked?b+="&edit=_blank":y.checked&&(b+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));d.value=b}else x.constructor==DriveFile||x.constructor==DropboxFile?(b="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=p.value?b+=encodeURIComponent(mxUtils.htmlEntities(p.value))+"&type=3":(b+=x.getHash().substring(1),b=x.constructor==DropboxFile?b+"&type=2":b+"&type=1"),null!=
+a&&(b+="&title="+encodeURIComponent(a)),""!=k.value&&(a=parseInt(k.value)+parseInt(f.value),b+="&height="+a),d.value=b):d.value=""}var e=document.createElement("div"),g=a.editor.graph,h=g.getGraphBounds(),m=g.view.scale,q=Math.floor(h.x/m-g.view.translate.x),n=Math.floor(h.y/m-g.view.translate.y);mxUtils.write(e,mxResources.get("googleGadget")+":");mxUtils.br(e);var d=document.createElement("input");d.setAttribute("type","text");d.style.marginBottom="8px";d.style.marginTop="2px";d.style.width="410px";
+e.appendChild(d);mxUtils.br(e);this.init=function(){d.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?d.select():document.execCommand("selectAll",!1,null)};mxUtils.write(e,mxResources.get("top")+":");var f=document.createElement("input");f.setAttribute("type","text");f.setAttribute("size","4");f.style.marginRight="16px";f.style.marginLeft="4px";f.value=q;e.appendChild(f);mxUtils.write(e,mxResources.get("height")+":");var k=document.createElement("input");k.setAttribute("type",
+"text");k.setAttribute("size","4");k.style.marginLeft="4px";k.value=Math.ceil(h.height/m);e.appendChild(k);mxUtils.br(e);h=document.createElement("hr");h.setAttribute("size","1");h.style.marginBottom="16px";h.style.marginTop="16px";e.appendChild(h);mxUtils.write(e,mxResources.get("publicDiagramUrl")+":");mxUtils.br(e);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||"";
+e.appendChild(p);mxUtils.br(e);mxUtils.write(e,mxResources.get("borderWidth")+":");var t=document.createElement("input");t.setAttribute("type","text");t.setAttribute("size","3");t.style.marginBottom="8px";t.style.marginLeft="4px";t.value="0";e.appendChild(t);mxUtils.br(e);var u=document.createElement("input");u.setAttribute("type","checkbox");u.setAttribute("checked","checked");u.defaultChecked=!0;u.style.marginLeft="16px";e.appendChild(u);mxUtils.write(e,mxResources.get("pan")+" ");var w=document.createElement("input");
+w.setAttribute("type","checkbox");w.setAttribute("checked","checked");w.defaultChecked=!0;w.style.marginLeft="8px";e.appendChild(w);mxUtils.write(e,mxResources.get("zoom")+" ");var y=document.createElement("input");y.setAttribute("type","checkbox");y.style.marginLeft="8px";y.setAttribute("title",window.location.href);e.appendChild(y);mxUtils.write(e,mxResources.get("edit")+" ");var l=document.createElement("input");l.setAttribute("type","checkbox");l.style.marginLeft="8px";e.appendChild(l);mxUtils.write(e,
+mxResources.get("asNew")+" ");mxUtils.br(e);var v=document.createElement("input");v.setAttribute("type","checkbox");v.setAttribute("checked","checked");v.defaultChecked=!0;v.style.marginLeft="16px";e.appendChild(v);mxUtils.write(e,mxResources.get("resize")+" ");var z=document.createElement("input");z.setAttribute("type","checkbox");z.style.marginLeft="8px";e.appendChild(z);mxUtils.write(e,mxResources.get("fit")+" ");var D=document.createElement("input");D.setAttribute("type","checkbox");D.style.marginLeft=
+"8px";e.appendChild(D);mxUtils.write(e,mxResources.get("embed")+" ");var B=a.getBasenames().join(";"),x=a.getCurrentFile();mxEvent.addListener(u,"change",b);mxEvent.addListener(w,"change",b);mxEvent.addListener(v,"change",b);mxEvent.addListener(z,"change",b);mxEvent.addListener(y,"change",b);mxEvent.addListener(l,"change",b);mxEvent.addListener(D,"change",b);mxEvent.addListener(k,"change",b);mxEvent.addListener(f,"change",b);mxEvent.addListener(t,"change",b);mxEvent.addListener(p,"change",b);b();
mxEvent.addListener(d,"click",function(){d.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?d.select():document.execCommand("selectAll",!1,null)});h=document.createElement("div");h.style.paddingTop="12px";h.style.textAlign="right";m=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});m.className="geBtn gePrimaryBtn";h.appendChild(m);e.appendChild(h);this.container=e},CreateGraphDialog=function(a,c,b){var e=document.createElement("div");e.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);e.appendChild(c);var h=new Graph(c);h.setCellsCloneable(!0);h.setPanning(!0);h.setAllowDanglingEdges(!1);h.connectionHandler.select=!1;h.view.setTranslate(20,20);h.border=20;h.panningHandler.useLeftButtonForPanning=!0;var m="curved=1;";h.cellRenderer.installCellOverlayListeners=
function(a,b,d){mxCellRenderer.prototype.installCellOverlayListeners.apply(this,arguments);mxEvent.addListener(d.node,mxClient.IS_POINTER?"pointerdown":"mousedown",function(d){b.fireEvent(new mxEventObject("pointerdown","event",d,"state",a))});!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&mxEvent.addListener(d.node,"touchstart",function(d){b.fireEvent(new mxEventObject("pointerdown","event",d,"state",a))})};h.getAllConnectionConstraints=function(){return null};h.connectionHandler.marker.highlight.keepOnTop=
-!1;h.connectionHandler.createEdgeState=function(a){a=h.createEdge(null,null,null,null,null,m);return new mxCellState(this.graph.view,a,this.graph.getCellStyle(a))};var p=h.getDefaultParent(),n=mxUtils.bind(this,function(a){var b=new mxCellOverlay(this.connectImage,"Add outgoing");b.cursor="hand";b.addListener(mxEvent.CLICK,function(b,d){h.connectionHandler.reset();h.clearSelection();var f=h.getCellGeometry(a),k;l(function(){k=h.insertVertex(p,null,"Entry",f.x,f.y,80,30,"rounded=1;");n(k);h.view.refresh(k);
-h.insertEdge(p,null,"",a,k,m)},function(){h.scrollCellToVisible(k)})});b.addListener("pointerdown",function(a,b){var d=b.getProperty("event"),f=b.getProperty("state");h.popupMenuHandler.hideMenu();h.stopEditing(!1);var k=mxUtils.convertPoint(h.container,mxEvent.getClientX(d),mxEvent.getClientY(d));h.connectionHandler.start(f,k.x,k.y);h.isMouseDown=!0;h.isMouseTrigger=mxEvent.isMouseEvent(d);mxEvent.consume(d)});h.addCellOverlay(a,b)});h.getModel().beginUpdate();var d;try{d=h.insertVertex(p,null,"Start",
+!1;h.connectionHandler.createEdgeState=function(a){a=h.createEdge(null,null,null,null,null,m);return new mxCellState(this.graph.view,a,this.graph.getCellStyle(a))};var q=h.getDefaultParent(),n=mxUtils.bind(this,function(a){var b=new mxCellOverlay(this.connectImage,"Add outgoing");b.cursor="hand";b.addListener(mxEvent.CLICK,function(b,d){h.connectionHandler.reset();h.clearSelection();var f=h.getCellGeometry(a),l;k(function(){l=h.insertVertex(q,null,"Entry",f.x,f.y,80,30,"rounded=1;");n(l);h.view.refresh(l);
+h.insertEdge(q,null,"",a,l,m)},function(){h.scrollCellToVisible(l)})});b.addListener("pointerdown",function(a,b){var d=b.getProperty("event"),f=b.getProperty("state");h.popupMenuHandler.hideMenu();h.stopEditing(!1);var l=mxUtils.convertPoint(h.container,mxEvent.getClientX(d),mxEvent.getClientY(d));h.connectionHandler.start(f,l.x,l.y);h.isMouseDown=!0;h.isMouseTrigger=mxEvent.isMouseEvent(d);mxEvent.consume(d)});h.addCellOverlay(a,b)});h.getModel().beginUpdate();var d;try{d=h.insertVertex(q,null,"Start",
0,0,80,30,"ellipse"),n(d)}finally{h.getModel().endUpdate()}var f;"horizontalTree"==b?(f=new mxCompactTreeLayout(h),f.edgeRouting=!1,f.levelDistance=30,m="edgeStyle=elbowEdgeStyle;elbow=horizontal;"):"verticalTree"==b?(f=new mxCompactTreeLayout(h,!1),f.edgeRouting=!1,f.levelDistance=30,m="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"radialTree"==b?(f=new mxRadialTreeLayout(h,!1),f.edgeRouting=!1,f.levelDistance=80):"verticalFlow"==b?f=new mxHierarchicalLayout(h,mxConstants.DIRECTION_NORTH):"horizontalFlow"==
-b?f=new mxHierarchicalLayout(h,mxConstants.DIRECTION_WEST):"organic"==b?(f=new mxFastOrganicLayout(h,!1),f.forceConstant=80):"circle"==b&&(f=new mxCircleLayout(h));if(null!=f){var l=function(a,b){h.getModel().beginUpdate();try{null!=a&&a(),f.execute(h.getDefaultParent(),d)}catch(v){throw v;}finally{var k=new mxMorphing(h);k.addListener(mxEvent.DONE,mxUtils.bind(this,function(){h.getModel().endUpdate();null!=b&&b()}));k.startAnimation()}},q=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=
-function(a,b,d,f,c){q.apply(this,arguments);l()};h.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);l()};h.connectionHandler.addListener(mxEvent.CONNECT,function(){l()})}var t=mxUtils.button(mxResources.get("close"),function(){a.confirm(mxResources.get("areYouSure"),function(){null!=c.parentNode&&(h.destroy(),c.parentNode.removeChild(c));a.hideDialog()})});t.className="geBtn";a.editor.cancelFirst&&e.appendChild(t);var u=mxUtils.button(mxResources.get("insert"),function(){h.clearCellOverlays();
+b?f=new mxHierarchicalLayout(h,mxConstants.DIRECTION_WEST):"organic"==b?(f=new mxFastOrganicLayout(h,!1),f.forceConstant=80):"circle"==b&&(f=new mxCircleLayout(h));if(null!=f){var k=function(a,b){h.getModel().beginUpdate();try{null!=a&&a(),f.execute(h.getDefaultParent(),d)}catch(v){throw v;}finally{var l=new mxMorphing(h);l.addListener(mxEvent.DONE,mxUtils.bind(this,function(){h.getModel().endUpdate();null!=b&&b()}));l.startAnimation()}},p=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=
+function(a,b,d,f,c){p.apply(this,arguments);k()};h.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);k()};h.connectionHandler.addListener(mxEvent.CONNECT,function(){k()})}var t=mxUtils.button(mxResources.get("close"),function(){a.confirm(mxResources.get("areYouSure"),function(){null!=c.parentNode&&(h.destroy(),c.parentNode.removeChild(c));a.hideDialog()})});t.className="geBtn";a.editor.cancelFirst&&e.appendChild(t);var u=mxUtils.button(mxResources.get("insert"),function(){h.clearCellOverlays();
var b=a.editor.graph.getFreeInsertPoint(),b=a.editor.graph.importCells(h.getModel().getChildren(h.getDefaultParent()),b.x,b.y),d=a.editor.graph.view,f=d.getBounds(b);f.x-=d.translate.x;f.y-=d.translate.y;a.editor.graph.scrollRectToVisible(f);a.editor.graph.setSelectionCells(b);null!=c.parentNode&&(h.destroy(),c.parentNode.removeChild(c));a.hideDialog()});e.appendChild(u);u.className="geBtn gePrimaryBtn";a.editor.cancelFirst||e.appendChild(t)};this.container=e};
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 e=document.createElement("h2");mxUtils.write(e,mxResources.get("backgroundImage"));e.style.marginTop="0px";b.appendChild(e);mxUtils.write(b,mxResources.get("image")+" "+mxResources.get("url")+":");mxUtils.br(b);var e=a.editor.graph.backgroundImage,g=document.createElement("input");g.setAttribute("type","text");g.style.marginTop="4px";g.style.marginBottom="4px";g.style.width="350px";g.value=
-null!=e?e.src:"";var h=!1,m=function(){h||""==g.value||a.isOffline()?(p.value="",n.value=""):a.loadImage(mxUtils.trim(g.value),function(a){p.value=a.width;n.value=a.height},function(){a.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));g.value="";p.value="";n.value=""})};this.init=function(){g.focus();if(Graph.fileSupport){g.setAttribute("placeholder",mxResources.get("dragImagesHere"));var d=b.parentNode,f=null;mxEvent.addListener(d,"dragleave",function(a){null!=
-f&&(f.parentNode.removeChild(f),f=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(d,"dragover",mxUtils.bind(this,function(b){null==f&&(!mxClient.IS_IE||10<document.documentMode)&&(f=a.highlightElement(d));b.stopPropagation();b.preventDefault()}));mxEvent.addListener(d,"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,d,f,l,c){g.value=a;m()},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 d=b.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)&&(g.value=decodeURIComponent(d),m())}b.stopPropagation();b.preventDefault()}),!1)}};b.appendChild(g);mxUtils.br(b);mxUtils.br(b);mxUtils.write(b,mxResources.get("width")+":");var p=document.createElement("input");
-p.setAttribute("type","text");p.style.width="60px";p.style.marginLeft="4px";p.style.marginRight="16px";p.value=null!=e?e.width:"";b.appendChild(p);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!=e?e.height:"";b.appendChild(n);e=mxUtils.button(mxResources.get("reset"),function(){g.value="";p.value="";n.value="";h=!1});mxEvent.addListener(e,"mousedown",
+null!=e?e.src:"";var h=!1,m=function(){h||""==g.value||a.isOffline()?(q.value="",n.value=""):a.loadImage(mxUtils.trim(g.value),function(a){q.value=a.width;n.value=a.height},function(){a.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));g.value="";q.value="";n.value=""})};this.init=function(){g.focus();if(Graph.fileSupport){g.setAttribute("placeholder",mxResources.get("dragImagesHere"));var d=b.parentNode,f=null;mxEvent.addListener(d,"dragleave",function(a){null!=
+f&&(f.parentNode.removeChild(f),f=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(d,"dragover",mxUtils.bind(this,function(b){null==f&&(!mxClient.IS_IE||10<document.documentMode)&&(f=a.highlightElement(d));b.stopPropagation();b.preventDefault()}));mxEvent.addListener(d,"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,d,f,k,c){g.value=a;m()},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 d=b.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)&&(g.value=decodeURIComponent(d),m())}b.stopPropagation();b.preventDefault()}),!1)}};b.appendChild(g);mxUtils.br(b);mxUtils.br(b);mxUtils.write(b,mxResources.get("width")+":");var q=document.createElement("input");
+q.setAttribute("type","text");q.style.width="60px";q.style.marginLeft="4px";q.style.marginRight="16px";q.value=null!=e?e.width:"";b.appendChild(q);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!=e?e.height:"";b.appendChild(n);e=mxUtils.button(mxResources.get("reset"),function(){g.value="";q.value="";n.value="";h=!1});mxEvent.addListener(e,"mousedown",
function(){h=!0});mxEvent.addListener(e,"touchstart",function(){h=!0});e.className="geBtn";e.width="100";b.appendChild(e);mxUtils.br(b);mxEvent.addListener(g,"change",m);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&&(g.value=a.url,m()));g.focus()};e=document.createElement("div");e.style.marginTop="40px";e.style.textAlign="right";var d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});
d.className="geBtn";a.editor.cancelFirst&&e.appendChild(d);if(!a.isOffline()&&"undefined"!=typeof google&&"undefined"!=typeof google.picker&&window.self===window.top){var f=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)});
f.className="geBtn";e.appendChild(f);null!=a.drive&&"1"==urlParams.photos&&(f=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)}))}),f.className="geBtn",e.appendChild(f))}f=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();c(""!=g.value?new mxImage(mxUtils.trim(g.value),p.value,n.value):null)});f.className="geBtn gePrimaryBtn";e.appendChild(f);a.editor.cancelFirst||e.appendChild(d);b.appendChild(e);this.container=b},ParseDialog=function(a,c,b){function e(b,d){var f=b.split("\n");if("plantUmlPng"==d||"plantUmlSvg"==
-d||"plantUmlTxt"==d){var f="plantUmlTxt"==d?PLANT_URL+"/txt/":"plantUmlPng"==d?PLANT_URL+"/png/":PLANT_URL+"/svg/",l=a.editor.graph;if(a.spinner.spin(document.body,mxResources.get("inserting"))){var c=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?"_":"?"},k=function(a,b,d){c1=a>>2;c2=(a&3)<<4|b>>4;c3=(b&15)<<2|d>>6;c4=d&63;r="";r+=c(c1&63);r+=c(c2&63);r+=c(c3&63);return r+=
-c(c4&63)},e=new XMLHttpRequest;e.open("GET",f+function(a){r="";for(x=0;x<a.length;x+=3)r=x+2==a.length?r+k(a.charCodeAt(x),a.charCodeAt(x+1),0):x+1==a.length?r+k(a.charCodeAt(x),0,0):r+k(a.charCodeAt(x),a.charCodeAt(x+1),a.charCodeAt(x+2));return r}(l.bytesToString(pako.deflateRaw(unescape(encodeURIComponent(b))))),!0);"plantUmlTxt"!=d&&(e.responseType="blob");e.onload=function(f){if(200<=this.status&&300>this.status)if("plantUmlTxt"==d)a.spinner.stop(),l.setSelectionCell(a.insertAsPreText(this.response,
-h.x,h.y)),l.scrollCellToVisible(l.getSelectionCell());else{var k=new FileReader;k.readAsDataURL(this.response);k.onloadend=function(d){var f=new Image;f.onload=function(){a.spinner.stop();var d=f.width,c=f.height;if(0==d&&0==c){var e=k.result,q=e.indexOf(","),e=decodeURIComponent(escape(atob(e.substring(q+1)))),e=mxUtils.parseXml(e).getElementsByTagName("svg");0<e.length&&(d=parseFloat(e[0].getAttribute("width")),c=parseFloat(e[0].getAttribute("height")))}l.getModel().beginUpdate();try{cell=l.insertVertex(null,
-null,b,h.x,h.y,d,c,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a.convertDataUri(k.result)+";")}finally{l.getModel().endUpdate()}l.setSelectionCell(cell);l.scrollCellToVisible(l.getSelectionCell())};f.src=k.result};k.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"==d){for(var q=null,t=[],g=0,x=0;x<f.length;x++)if(e=mxUtils.trim(f[x]),"create table"==e.substring(0,12).toLowerCase())e=
-mxUtils.trim(e.substring(12)),"("==e.charAt(e.length-1)&&(e=e.substring(0,e.lastIndexOf(" "))),q=new mxCell(e,new mxGeometry(g,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;"),q.vertex=!0,t.push(q),e=a.editor.graph.getPreferredSizeForCell(p),null!=e&&(q.geometry.width=e.width+10);else if(null!=q&&")"==e.charAt(0))g+=q.geometry.width+
-40,q=null;else if("("!=e&&null!=q&&(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,""),p=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;");p.vertex=
-!0;e=sb.cloneCell(p,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;p.insert(e);e=a.editor.graph.getPreferredSizeForCell(p);null!=e&&q.geometry.width<e.width+10&&(q.geometry.width=Math.min(220,e.width+10));q.insert(p);q.geometry.height+=26}0<t.length&&(l=a.editor.graph,f=l.view,
-e=l.getGraphBounds(),l.setSelectionCells(l.importCells(t,Math.ceil(Math.max(0,e.x/f.scale-f.translate.x)+4*l.gridSize),Math.ceil(Math.max(0,(e.y+e.height)/f.scale-f.translate.y)+4*l.gridSize))),l.scrollCellToVisible(l.getSelectionCell()))}else if("list"==d){if(0<f.length){l=a.editor.graph;q=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;");
-q.vertex=!0;e=l.getPreferredSizeForCell(q);null!=e&&q.geometry.width<e.width+10&&(q.geometry.width=e.width+10);p=[q];if(1<f.length)for(x=1;x<f.length;x++)"--"==f[x]?(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,q.geometry.height+=e.geometry.height,q.insert(e),p.push(e)):0<f[x].length&&";"!=f[x].charAt(0)&&(g=new mxCell(f[x],
-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;"),g.vertex=!0,e=l.getPreferredSizeForCell(g),null!=e&&g.geometry.width<e.width&&(g.geometry.width=e.width),q.geometry.width=Math.max(q.geometry.width,g.geometry.width),q.geometry.height+=g.geometry.height,q.insert(g),p.push(g));l.getModel().beginUpdate();try{q=l.importCells([q],h.x,h.y)[0],l.fireEvent(new mxEventObject("cellsInserted",
-"cells",[q].concat(q.children)))}finally{l.getModel().endUpdate()}l.setSelectionCell(q);l.scrollCellToVisible(l.getSelectionCell())}}else{for(var p=function(a){var b=n[a];null==b&&(b=new mxCell(a,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),b.vertex=!0,n[a]=b,t.push(b));return b},n={},t=[],x=0;x<f.length;x++)if(";"!=f[x].charAt(0)){var H=f[x].split("->");if(2<=H.length){var m=p(H[0]),A=p(H[H.length-1]),H=new mxCell(2<H.length?H[1]:"",new mxGeometry);H.edge=!0;m.insertEdge(H,!0);A.insertEdge(H,
-!1);t.push(H)}}if(0<t.length){f=document.createElement("div");f.style.visibility="hidden";document.body.appendChild(f);l=new Graph(f);l.getModel().beginUpdate();try{t=l.importCells(t);for(x=0;x<t.length;x++)l.getModel().isVertex(t[x])&&(e=l.getPreferredSizeForCell(t[x]),t[x].geometry.width=Math.max(t[x].geometry.width,e.width),t[x].geometry.height=Math.max(t[x].geometry.height,e.height));q=new mxFastOrganicLayout(l);q.disableEdgeStyle=!1;q.forceConstant=120;q.execute(l.getDefaultParent());g=new mxParallelEdgeLayout(l);
-g.spacing=20;g.execute(l.getDefaultParent())}finally{l.getModel().endUpdate()}l.clearCellOverlays();p=[];a.editor.graph.getModel().beginUpdate();try{p=a.editor.graph.importCells(l.getModel().getChildren(l.getDefaultParent()),h.x,h.y),a.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",p))}finally{a.editor.graph.getModel().endUpdate()}a.editor.graph.setSelectionCells(p);a.editor.graph.scrollCellToVisible(a.editor.graph.getSelectionCell());l.destroy();f.parentNode.removeChild(f)}}}function g(){return"list"==
-p.value?"Person\n-name: String\n-birthDate: Date\n--\n+getName(): String\n+setName(String): void\n+isBirthday(): boolean":"table"==p.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"==p.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"==p.value||"plantUmlTxt"==p.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 h=a.editor.graph.getFreeInsertPoint();c=document.createElement("div");c.style.textAlign="right";var m=document.createElement("textarea");m.style.resize="none";m.style.width="100%";m.style.height=
-"354px";m.style.marginBottom="16px";var p=document.createElement("select");"formatSql"==b&&(p.style.display="none");var n=document.createElement("option");n.setAttribute("value","list");mxUtils.write(n,mxResources.get("list"));"plantUml"!=b&&p.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&&(p.appendChild(n),n.setAttribute("selected","selected"));
-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 l=g();m.value=l;c.appendChild(m);this.init=function(){m.focus()};Graph.fileSupport&&(m.addEventListener("dragover",function(a){a.stopPropagation();a.preventDefault()},!1),m.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){m.value=a.target.result};b.readAsText(a)}},!1));c.appendChild(p);mxEvent.addListener(p,"change",function(){var a=g();if(0==m.value.length||m.value==l)l=a,m.value=l});b=mxUtils.button(mxResources.get("close"),function(){m.value==l?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(m.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,m,p,n,d,f,l,q,t,u){function w(){var a=!0;if(null!=O)for(;D<O.length&&(a||0!=mxUtils.mod(D,30));)a=O[D++],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,l){null!=S&&(S.style.backgroundColor="transparent",S.style.border="1px solid transparent");F.removeAttribute("disabled");P=b;T=d;S=a;aa=f;Z=l;S.style.backgroundColor=p;S.style.border=n}function v(b,d,f,l,c,e,q,t,z){var u=document.createElement("div");u.className="geTemplate";
-u.style.height=Q+"px";u.style.width=L+"px";null!=l&&0<l.length&&u.setAttribute("title",l);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>",c&&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"),l=mxResources.get(b),
+a.photoPicker=b.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.photoPicker.setVisible(!0)}))}),f.className="geBtn",e.appendChild(f))}f=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();c(""!=g.value?new mxImage(mxUtils.trim(g.value),q.value,n.value):null)});f.className="geBtn gePrimaryBtn";e.appendChild(f);a.editor.cancelFirst||e.appendChild(d);b.appendChild(e);this.container=b},ParseDialog=function(a,c,b){function e(b,d){var f=b.split("\n");if("plantUmlPng"==d||"plantUmlSvg"==
+d||"plantUmlTxt"==d){var f="plantUmlTxt"==d?PLANT_URL+"/txt/":"plantUmlPng"==d?PLANT_URL+"/png/":PLANT_URL+"/svg/",k=a.editor.graph;if(a.spinner.spin(document.body,mxResources.get("inserting"))){var c=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?"_":"?"},l=function(a,b,d){c1=a>>2;c2=(a&3)<<4|b>>4;c3=(b&15)<<2|d>>6;c4=d&63;r="";r+=c(c1&63);r+=c(c2&63);r+=c(c3&63);return r+=
+c(c4&63)},e=new XMLHttpRequest;e.open("GET",f+function(a){r="";for(x=0;x<a.length;x+=3)r=x+2==a.length?r+l(a.charCodeAt(x),a.charCodeAt(x+1),0):x+1==a.length?r+l(a.charCodeAt(x),0,0):r+l(a.charCodeAt(x),a.charCodeAt(x+1),a.charCodeAt(x+2));return r}(k.bytesToString(pako.deflateRaw(unescape(encodeURIComponent(b))))),!0);"plantUmlTxt"!=d&&(e.responseType="blob");e.onload=function(f){if(200<=this.status&&300>this.status)if("plantUmlTxt"==d)a.spinner.stop(),k.setSelectionCell(a.insertAsPreText(this.response,
+h.x,h.y)),k.scrollCellToVisible(k.getSelectionCell());else{var l=new FileReader;l.readAsDataURL(this.response);l.onloadend=function(d){var f=new Image;f.onload=function(){a.spinner.stop();var d=f.width,c=f.height;if(0==d&&0==c){var e=l.result,p=e.indexOf(","),e=decodeURIComponent(escape(atob(e.substring(p+1)))),e=mxUtils.parseXml(e).getElementsByTagName("svg");0<e.length&&(d=parseFloat(e[0].getAttribute("width")),c=parseFloat(e[0].getAttribute("height")))}k.getModel().beginUpdate();try{cell=k.insertVertex(null,
+null,b,h.x,h.y,d,c,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a.convertDataUri(l.result)+";")}finally{k.getModel().endUpdate()}k.setSelectionCell(cell);k.scrollCellToVisible(k.getSelectionCell())};f.src=l.result};l.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"==d){for(var p=null,t=[],g=0,x=0;x<f.length;x++)if(e=mxUtils.trim(f[x]),"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(g,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,t.push(p),e=a.editor.graph.getPreferredSizeForCell(q),null!=e&&(p.geometry.width=e.width+10);else if(null!=p&&")"==e.charAt(0))g+=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,""),q=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;");q.vertex=
+!0;e=sb.cloneCell(q,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;q.insert(e);e=a.editor.graph.getPreferredSizeForCell(q);null!=e&&p.geometry.width<e.width+10&&(p.geometry.width=Math.min(220,e.width+10));p.insert(q);p.geometry.height+=26}0<t.length&&(k=a.editor.graph,f=k.view,
+e=k.getGraphBounds(),k.setSelectionCells(k.importCells(t,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"==d){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);q=[p];if(1<f.length)for(x=1;x<f.length;x++)"--"==f[x]?(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),q.push(e)):0<f[x].length&&";"!=f[x].charAt(0)&&(g=new mxCell(f[x],
+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;"),g.vertex=!0,e=k.getPreferredSizeForCell(g),null!=e&&g.geometry.width<e.width&&(g.geometry.width=e.width),p.geometry.width=Math.max(p.geometry.width,g.geometry.width),p.geometry.height+=g.geometry.height,p.insert(g),q.push(g));k.getModel().beginUpdate();try{p=k.importCells([p],h.x,h.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 q=function(a){var b=n[a];null==b&&(b=new mxCell(a,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),b.vertex=!0,n[a]=b,t.push(b));return b},n={},t=[],x=0;x<f.length;x++)if(";"!=f[x].charAt(0)){var H=f[x].split("->");if(2<=H.length){var m=q(H[0]),A=q(H[H.length-1]),H=new mxCell(2<H.length?H[1]:"",new mxGeometry);H.edge=!0;m.insertEdge(H,!0);A.insertEdge(H,
+!1);t.push(H)}}if(0<t.length){f=document.createElement("div");f.style.visibility="hidden";document.body.appendChild(f);k=new Graph(f);k.getModel().beginUpdate();try{t=k.importCells(t);for(x=0;x<t.length;x++)k.getModel().isVertex(t[x])&&(e=k.getPreferredSizeForCell(t[x]),t[x].geometry.width=Math.max(t[x].geometry.width,e.width),t[x].geometry.height=Math.max(t[x].geometry.height,e.height));p=new mxFastOrganicLayout(k);p.disableEdgeStyle=!1;p.forceConstant=120;p.execute(k.getDefaultParent());g=new mxParallelEdgeLayout(k);
+g.spacing=20;g.execute(k.getDefaultParent())}finally{k.getModel().endUpdate()}k.clearCellOverlays();q=[];a.editor.graph.getModel().beginUpdate();try{q=a.editor.graph.importCells(k.getModel().getChildren(k.getDefaultParent()),h.x,h.y),a.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",q))}finally{a.editor.graph.getModel().endUpdate()}a.editor.graph.setSelectionCells(q);a.editor.graph.scrollCellToVisible(a.editor.graph.getSelectionCell());k.destroy();f.parentNode.removeChild(f)}}}function g(){return"list"==
+q.value?"Person\n-name: String\n-birthDate: Date\n--\n+getName(): String\n+setName(String): void\n+isBirthday(): boolean":"table"==q.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"==q.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"==q.value||"plantUmlTxt"==q.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 h=a.editor.graph.getFreeInsertPoint();c=document.createElement("div");c.style.textAlign="right";var m=document.createElement("textarea");m.style.resize="none";m.style.width="100%";m.style.height=
+"354px";m.style.marginBottom="16px";var q=document.createElement("select");"formatSql"==b&&(q.style.display="none");var n=document.createElement("option");n.setAttribute("value","list");mxUtils.write(n,mxResources.get("list"));"plantUml"!=b&&q.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&&(q.appendChild(n),n.setAttribute("selected","selected"));
+n=document.createElement("option");n.setAttribute("value","diagram");mxUtils.write(n,mxResources.get("diagram"));"plantUml"!=b&&q.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&&(q.appendChild(n),q.appendChild(d),q.appendChild(f));var k=g();m.value=k;c.appendChild(m);this.init=function(){m.focus()};Graph.fileSupport&&(m.addEventListener("dragover",function(a){a.stopPropagation();a.preventDefault()},!1),m.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){m.value=a.target.result};b.readAsText(a)}},!1));c.appendChild(q);mxEvent.addListener(q,"change",function(){var a=g();if(0==m.value.length||m.value==k)k=a,m.value=k});b=mxUtils.button(mxResources.get("close"),function(){m.value==k?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(m.value,q.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,m,q,n,d,f,k,p,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 l(a,b,d,f,l){null!=S&&(S.style.backgroundColor="transparent",S.style.border="1px solid transparent");F.removeAttribute("disabled");P=b;T=d;S=a;aa=f;Z=l;S.style.backgroundColor=q;S.style.border=n}function v(b,d,f,k,c,e,p,t,z){var u=document.createElement("div");u.className="geTemplate";
+u.style.height=Q+"px";u.style.width=L+"px";null!=k&&0<k.length&&u.setAttribute("title",k);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){l(u,null,null,b,p)}),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()&&(l(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>",c&&l(u),null!=t?mxEvent.addListener(u,"click",t):(mxEvent.addListener(u,"click",function(a){l(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"),l=mxResources.get(b),
k=U[b];null==l&&(l=b.substring(0,1).toUpperCase()+b.substring(1));18<l.length&&(l=l.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",l+" ("+k.length+")");mxUtils.write(f,f.getAttribute("title"));null!=d&&(f.style.padding=d);Y.appendChild(f);null==a&&(a=f,a.style.backgroundColor=m);(function(b,d){mxEvent.addListener(f,"click",function(){a!=d&&(a.style.backgroundColor=
-"",a=d,a.style.backgroundColor=m,N.scrollTop=0,N.innerHTML="",D=0,O=U[b],A=null,w())})})(b,f)}w()}b=null!=b?b:!0;g=null!=g?g:!1;m=null!=m?m:"#ebf2f9";p=null!=p?p:"#e6eff8";n=null!=n?n:"1px solid #ccd9ea";f=null!=f?f:EditorUi.templateFile;var C=document.createElement("div");C.style.height="100%";var B=document.createElement("div");B.style.whiteSpace="nowrap";B.style.height="46px";b&&C.appendChild(B);var x=document.createElement("img");x.setAttribute("border","0");x.setAttribute("align","absmiddle");
+"",a=d,a.style.backgroundColor=m,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;m=null!=m?m:"#ebf2f9";q=null!=q?q:"#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,D=0,F=mxUtils.button(mxResources.get("create"),function(){F.setAttribute("disabled","disabled");y();F.removeAttribute("disabled")});F.className="geBtn gePrimaryBtn";if(l||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";C.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="";D=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);D=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):l(d)};l&&(I=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){M()}),x.appendChild(I),H.push(I));if(q){I=
+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(k||p){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?p(K.value,d):k(d)};k&&(I=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){M()}),x.appendChild(I),H.push(I));if(p){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){C.appendChild(Y);
-C.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"),
-preview:a.getAttribute("preview")})}}a=a.nextSibling}z()}})}mxEvent.addListener(G,"keypress",function(b){a.dialog.container.firstChild==C&&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||
+"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"),
+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);
-a.editor.cancelFirst||null!=e||g&&null==h||f.appendChild(B);C.appendChild(f);this.container=C},CreateDialog=function(a,c,b,e,g,h,m,p,n,d,f,l,q,t,u){function w(b,d,f,k){function e(){mxEvent.addListener(q,"click",function(){var b=f;if(m){var d=z.value,l=d.lastIndexOf(".");if(0>c.lastIndexOf(".")&&0>l){var b=null!=b?b:x.value,k="";b==App.MODE_GOOGLE?k=a.drive.extension:b==App.MODE_GITHUB?k=a.gitHub.extension:b==App.MODE_TRELLO?k=a.trello.extension:b==App.MODE_DROPBOX?k=a.dropbox.extension:b==App.MODE_ONEDRIVE?
-k=a.oneDrive.extension:b==App.MODE_DEVICE&&(k=".xml");0<=l&&(d=d.substring(0,l));z.value=d+k}}y(f)})}var q=document.createElement("a");q.style.overflow="hidden";var t=document.createElement("img");t.src=b;t.setAttribute("border","0");t.setAttribute("align","absmiddle");t.style.width="60px";t.style.height="60px";t.style.paddingBottom="6px";q.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";q.className="geBaseButton";q.style.position="relative";q.style.margin="4px";q.style.padding="8px 8px 10px 8px";
-q.style.whiteSpace="nowrap";q.appendChild(t);mxClient.IS_QUIRKS&&(q.style.cssFloat="left",q.style.zoom="1");q.style.color="gray";q.style.fontSize="11px";var u=document.createElement("div");q.appendChild(u);mxUtils.write(u,d);if(null!=k&&null==a[k]){t.style.visibility="hidden";mxUtils.setOpacity(u,10);var v=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});v.spin(q);var w=window.setTimeout(function(){null==a[k]&&(v.stop(),
-q.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[k]&&(window.clearTimeout(w),mxUtils.setOpacity(u,100),t.style.visibility="",v.stop(),e())}))}else e();C.appendChild(q);++B==l&&(mxUtils.br(C),B=0)}function y(d){var f=z.value;if(null==d||null!=f&&0<f.length)a.hideDialog(),b(f,d)}m=null!=m?m:!0;p=null!=p?p:!0;l=null!=l?l:4;var k=document.createElement("div");null==e&&a.addLanguageMenu(k);var v=document.createElement("h2");mxUtils.write(v,g||mxResources.get("create"));
-v.style.marginTop="0px";v.style.marginBottom="24px";k.appendChild(v);mxUtils.write(k,mxResources.get("filename")+":");var z=document.createElement("input");z.setAttribute("value",c);z.style.width="280px";z.style.marginLeft="10px";z.style.marginBottom="20px";this.init=function(){z.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?z.select():document.execCommand("selectAll",!1,null)};k.appendChild(z);null!=q&&null!=t&&"image/"==t.substring(0,6)&&(z.style.width="160px",
-g=null,"image/svg+xml"==t&&mxClient.IS_SVG?(g=document.createElement("div"),g.innerHTML=mxUtils.trim(q),q=g.getElementsByTagName("svg")[0],t=parseInt(q.getAttribute("width")),u=parseInt(q.getAttribute("height")),q.setAttribute("viewBox","0 0 "+t+" "+u),q.setAttribute("width","120px"),q.setAttribute("height","80px")):(g=document.createElement("img"),g.setAttribute("src","data:"+t+(u?";base64,":";utf8,")+q)),g.style.position="absolute",g.style.top="70px",g.style.right="100px",g.style.maxWidth="120px",
-g.style.maxHeight="80px",mxUtils.setPrefixedStyle(g.style,"transform","translate(50%,-50%)"),k.appendChild(g),n&&Editor.popupsAllowed&&(g.style.cursor="pointer",mxEvent.addListener(g,"click",function(){y("_blank")})));mxUtils.br(k);var C=document.createElement("div");C.style.textAlign="center";var B=0;C.style.marginTop="6px";k.appendChild(C);var x=document.createElement("select");x.style.marginLeft="10px";a.isOfflineApp()||a.isOffline()||("function"===typeof window.DriveClient&&(g=document.createElement("option"),
+a.editor.cancelFirst||null!=e||g&&null==h||f.appendChild(B);D.appendChild(f);this.container=D},CreateDialog=function(a,c,b,e,g,h,m,q,n,d,f,k,p,t,u){function w(b,d,f,l){function e(){mxEvent.addListener(p,"click",function(){var b=f;if(m){var d=z.value,l=d.lastIndexOf(".");if(0>c.lastIndexOf(".")&&0>l){var b=null!=b?b:x.value,k="";b==App.MODE_GOOGLE?k=a.drive.extension:b==App.MODE_GITHUB?k=a.gitHub.extension:b==App.MODE_TRELLO?k=a.trello.extension:b==App.MODE_DROPBOX?k=a.dropbox.extension:b==App.MODE_ONEDRIVE?
+k=a.oneDrive.extension:b==App.MODE_DEVICE&&(k=".xml");0<=l&&(d=d.substring(0,l));z.value=d+k}}y(f)})}var p=document.createElement("a");p.style.overflow="hidden";var t=document.createElement("img");t.src=b;t.setAttribute("border","0");t.setAttribute("align","absmiddle");t.style.width="60px";t.style.height="60px";t.style.paddingBottom="6px";p.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";p.className="geBaseButton";p.style.position="relative";p.style.margin="4px";p.style.padding="8px 8px 10px 8px";
+p.style.whiteSpace="nowrap";p.appendChild(t);mxClient.IS_QUIRKS&&(p.style.cssFloat="left",p.style.zoom="1");p.style.color="gray";p.style.fontSize="11px";var u=document.createElement("div");p.appendChild(u);mxUtils.write(u,d);if(null!=l&&null==a[l]){t.style.visibility="hidden";mxUtils.setOpacity(u,10);var v=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});v.spin(p);var w=window.setTimeout(function(){null==a[l]&&(v.stop(),
+p.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[l]&&(window.clearTimeout(w),mxUtils.setOpacity(u,100),t.style.visibility="",v.stop(),e())}))}else e();D.appendChild(p);++B==k&&(mxUtils.br(D),B=0)}function y(d){var f=z.value;if(null==d||null!=f&&0<f.length)a.hideDialog(),b(f,d)}m=null!=m?m:!0;q=null!=q?q:!0;k=null!=k?k:4;var l=document.createElement("div");null==e&&a.addLanguageMenu(l);var v=document.createElement("h2");mxUtils.write(v,g||mxResources.get("create"));
+v.style.marginTop="0px";v.style.marginBottom="24px";l.appendChild(v);mxUtils.write(l,mxResources.get("filename")+":");var z=document.createElement("input");z.setAttribute("value",c);z.style.width="280px";z.style.marginLeft="10px";z.style.marginBottom="20px";this.init=function(){z.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?z.select():document.execCommand("selectAll",!1,null)};l.appendChild(z);null!=p&&null!=t&&"image/"==t.substring(0,6)&&(z.style.width="160px",
+g=null,"image/svg+xml"==t&&mxClient.IS_SVG?(g=document.createElement("div"),g.innerHTML=mxUtils.trim(p),p=g.getElementsByTagName("svg")[0],t=parseInt(p.getAttribute("width")),u=parseInt(p.getAttribute("height")),p.setAttribute("viewBox","0 0 "+t+" "+u),p.setAttribute("width","120px"),p.setAttribute("height","80px")):(g=document.createElement("img"),g.setAttribute("src","data:"+t+(u?";base64,":";utf8,")+p)),g.style.position="absolute",g.style.top="70px",g.style.right="100px",g.style.maxWidth="120px",
+g.style.maxHeight="80px",mxUtils.setPrefixedStyle(g.style,"transform","translate(50%,-50%)"),l.appendChild(g),n&&Editor.popupsAllowed&&(g.style.cursor="pointer",mxEvent.addListener(g,"click",function(){y("_blank")})));mxUtils.br(l);var D=document.createElement("div");D.style.textAlign="center";var B=0;D.style.marginTop="6px";l.appendChild(D);var x=document.createElement("select");x.style.marginLeft="10px";a.isOfflineApp()||a.isOffline()||("function"===typeof window.DriveClient&&(g=document.createElement("option"),
g.setAttribute("value",App.MODE_GOOGLE),mxUtils.write(g,mxResources.get("googleDrive")),x.appendChild(g),w(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(g=document.createElement("option"),g.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(g,mxResources.get("oneDrive")),x.appendChild(g),a.mode==App.MODE_ONEDRIVE&&g.setAttribute("selected","selected"),w(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),
App.MODE_ONEDRIVE,"oneDrive")),"function"===typeof window.DropboxClient&&(g=document.createElement("option"),g.setAttribute("value",App.MODE_DROPBOX),mxUtils.write(g,mxResources.get("dropbox")),x.appendChild(g),a.mode==App.MODE_DROPBOX&&g.setAttribute("selected","selected"),w(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),null!=a.gitHub&&(g=document.createElement("option"),g.setAttribute("value",App.MODE_GITHUB),mxUtils.write(g,mxResources.get("github")),x.appendChild(g),
w(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),null!=a.trello&&(g=document.createElement("option"),g.setAttribute("value",App.MODE_TRELLO),mxUtils.write(g,mxResources.get("trello")),x.appendChild(g),w(IMAGE_PATH+"/trello-logo.svg",mxResources.get("trello"),App.MODE_TRELLO,"trello")));if(!Editor.useLocalStorage||"device"==urlParams.storage||null!=a.getCurrentFile()&&!mxClient.IS_IOS)g=document.createElement("option"),g.setAttribute("value",App.MODE_DEVICE),mxUtils.write(g,
-mxResources.get("device")),x.appendChild(g),a.mode!=App.MODE_DEVICE&&p||g.setAttribute("selected","selected"),f&&w(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);p&&isLocalStorage&&"0"!=urlParams.browser&&(p=document.createElement("option"),p.setAttribute("value",App.MODE_BROWSER),mxUtils.write(p,mxResources.get("browser")),x.appendChild(p),a.mode==App.MODE_BROWSER&&p.setAttribute("selected","selected"),w(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));
-p=document.createElement("div");p.style.marginTop="26px";p.style.textAlign="center";null!=d&&(g=mxUtils.button(mxResources.get("help"),function(){a.openLink(d)}),g.className="geBtn",p.appendChild(g));g=mxUtils.button(mxResources.get("cancel"),function(){null!=e?e():(a.fileLoaded(null),a.hideDialog(),window.close(),window.location.href=a.getUrl())});g.className="geBtn";a.editor.cancelFirst&&p.appendChild(g);null==e&&(q=mxUtils.button(mxResources.get("decideLater"),function(){y(null)}),q.className=
-"geBtn",p.appendChild(q));n&&Editor.popupsAllowed&&(n=mxUtils.button(mxResources.get("openInNewWindow"),function(){y("_blank")}),n.className="geBtn",p.appendChild(n));mxClient.IS_IOS||(h=mxUtils.button(h||mxResources.get("create"),function(){y(f?"download":App.MODE_DEVICE)}),h.className="geBtn gePrimaryBtn",p.appendChild(h));a.editor.cancelFirst||p.appendChild(g);mxEvent.addListener(z,"keypress",function(b){13==b.keyCode?y(App.MODE_DEVICE):27==b.keyCode&&(a.fileLoaded(null),a.hideDialog(),window.close())});
-k.appendChild(p);this.container=k},PopupDialog=function(a,c,b,e,g){g=null!=g?g:!0;var h=document.createElement("div");h.style.textAlign="left";mxUtils.write(h,mxResources.get("fileOpenLocation"));mxUtils.br(h);mxUtils.br(h);var m=mxUtils.button(mxResources.get("openInThisWindow"),function(){g&&a.hideDialog();null!=e&&e()});m.className="geBtn";m.style.marginBottom="8px";m.style.width="280px";h.appendChild(m);mxUtils.br(h);var p=mxUtils.button(mxResources.get("openInNewWindow"),function(){g&&a.hideDialog();
-null!=b&&b();a.openLink(c,null,!0)});p.className="geBtn gePrimaryBtn";p.style.width=m.style.width;h.appendChild(p);mxUtils.br(h);mxUtils.br(h);mxUtils.write(h,mxResources.get("allowPopups"));this.container=h},ImageDialog=function(a,c,b,e,g,h){h=null!=h?h:!0;var m=a.editor.graph,p=document.createElement("div");mxUtils.write(p,c);c=document.createElement("div");c.className="geTitle";c.style.backgroundColor="transparent";c.style.borderColor="transparent";c.style.whiteSpace="nowrap";c.style.textOverflow=
+mxResources.get("device")),x.appendChild(g),a.mode!=App.MODE_DEVICE&&q||g.setAttribute("selected","selected"),f&&w(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);q&&isLocalStorage&&"0"!=urlParams.browser&&(q=document.createElement("option"),q.setAttribute("value",App.MODE_BROWSER),mxUtils.write(q,mxResources.get("browser")),x.appendChild(q),a.mode==App.MODE_BROWSER&&q.setAttribute("selected","selected"),w(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));
+q=document.createElement("div");q.style.marginTop="26px";q.style.textAlign="center";null!=d&&(g=mxUtils.button(mxResources.get("help"),function(){a.openLink(d)}),g.className="geBtn",q.appendChild(g));g=mxUtils.button(mxResources.get("cancel"),function(){null!=e?e():(a.fileLoaded(null),a.hideDialog(),window.close(),window.location.href=a.getUrl())});g.className="geBtn";a.editor.cancelFirst&&q.appendChild(g);null==e&&(p=mxUtils.button(mxResources.get("decideLater"),function(){y(null)}),p.className=
+"geBtn",q.appendChild(p));n&&Editor.popupsAllowed&&(n=mxUtils.button(mxResources.get("openInNewWindow"),function(){y("_blank")}),n.className="geBtn",q.appendChild(n));mxClient.IS_IOS||(h=mxUtils.button(h||mxResources.get("create"),function(){y(f?"download":App.MODE_DEVICE)}),h.className="geBtn gePrimaryBtn",q.appendChild(h));a.editor.cancelFirst||q.appendChild(g);mxEvent.addListener(z,"keypress",function(b){13==b.keyCode?y(App.MODE_DEVICE):27==b.keyCode&&(a.fileLoaded(null),a.hideDialog(),window.close())});
+l.appendChild(q);this.container=l},PopupDialog=function(a,c,b,e,g){g=null!=g?g:!0;var h=document.createElement("div");h.style.textAlign="left";mxUtils.write(h,mxResources.get("fileOpenLocation"));mxUtils.br(h);mxUtils.br(h);var m=mxUtils.button(mxResources.get("openInThisWindow"),function(){g&&a.hideDialog();null!=e&&e()});m.className="geBtn";m.style.marginBottom="8px";m.style.width="280px";h.appendChild(m);mxUtils.br(h);var q=mxUtils.button(mxResources.get("openInNewWindow"),function(){g&&a.hideDialog();
+null!=b&&b();a.openLink(c,null,!0)});q.className="geBtn gePrimaryBtn";q.style.width=m.style.width;h.appendChild(q);mxUtils.br(h);mxUtils.br(h);mxUtils.write(h,mxResources.get("allowPopups"));this.container=h},ImageDialog=function(a,c,b,e,g,h){h=null!=h?h:!0;var m=a.editor.graph,q=document.createElement("div");mxUtils.write(q,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);p.appendChild(c);var d=function(b,d,f,l){var k="data:"==b.substring(0,5);!a.isOffline()||k&&"undefined"===typeof chrome?0<b.length&&a.spinner.spin(document.body,mxResources.get("inserting"))?a.loadImage(b,function(k){a.spinner.stop();a.hideDialog();var c=!1===l?1:null!=d&&null!=f?Math.max(d/k.width,f/k.height):Math.min(1,Math.min(520/k.width,520/k.height));h&&(b=a.convertDataUri(b));e(b,Math.round(Number(k.width)*c),Math.round(Number(k.height)*c))},function(){a.spinner.stop();e(null);
-a.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(a.hideDialog(),e(b)):(b=a.convertDataUri(b),d=null==d?120:d,f=null==f?100:f,a.hideDialog(),e(b,d,f))},f=function(b,f){if(null!=b){var l=g?null:m.getModel().getGeometry(m.getSelectionCell());null!=l?d(b,l.width,l.height,f):d(b,null,null,f)}else a.hideDialog(),e(null)};this.init=function(){n.focus();if(Graph.fileSupport){n.setAttribute("placeholder",mxResources.get("dragImagesHere"));var b=p.parentNode,d=
+c.appendChild(b);q.appendChild(c);var d=function(b,d,f,k){var l="data:"==b.substring(0,5);!a.isOffline()||l&&"undefined"===typeof chrome?0<b.length&&a.spinner.spin(document.body,mxResources.get("inserting"))?a.loadImage(b,function(l){a.spinner.stop();a.hideDialog();var c=!1===k?1:null!=d&&null!=f?Math.max(d/l.width,f/l.height):Math.min(1,Math.min(520/l.width,520/l.height));h&&(b=a.convertDataUri(b));e(b,Math.round(Number(l.width)*c),Math.round(Number(l.height)*c))},function(){a.spinner.stop();e(null);
+a.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(a.hideDialog(),e(b)):(b=a.convertDataUri(b),d=null==d?120:d,f=null==f?100:f,a.hideDialog(),e(b,d,f))},f=function(b,f){if(null!=b){var k=g?null:m.getModel().getGeometry(m.getSelectionCell());null!=k?d(b,k.width,k.height,f):d(b,null,null,f)}else a.hideDialog(),e(null)};this.init=function(){n.focus();if(Graph.fileSupport){n.setAttribute("placeholder",mxResources.get("dragImagesHere"));var b=q.parentNode,d=
null;mxEvent.addListener(b,"dragleave",function(a){null!=d&&(d.parentNode.removeChild(d),d=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(b,"dragover",mxUtils.bind(this,function(f){null==d&&(!mxClient.IS_IE||10<document.documentMode)&&(d=a.highlightElement(b));f.stopPropagation();f.preventDefault()}));mxEvent.addListener(b,"drop",mxUtils.bind(this,function(b){null!=d&&(d.parentNode.removeChild(d),d=null);if(0<b.dataTransfer.files.length)a.importFiles(b.dataTransfer.files,0,0,a.maxImageSize,
-function(a,b,d,l,c,e,q,t){f(a,t)},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 l=b.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(l)&&f(decodeURIComponent(l))}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 l=document.createElement("input");l.setAttribute("multiple","multiple");l.setAttribute("type","file");if(null==document.documentMode){mxEvent.addListener(l,
-"change",function(b){a.importFiles(l.files,0,0,a.maxImageSize,function(a,b,d,l,c,e){f(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 q=mxUtils.button(mxResources.get("open"),function(){l.click()});q.className="geBtn";b.appendChild(q)}}document.createElement("canvas").getContext&&"data:image/"==n.value.substring(0,11)&&"data:image/svg"!=n.value.substring(0,14)&&(q=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()}),q.className="geBtn",b.appendChild(q));"undefined"!=typeof google&&"undefined"!=typeof google.picker&&window.self===window.top&&(q=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)}),
-q.className="geBtn",b.appendChild(q),null!=a.drive&&"1"==urlParams.photos&&(q=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)}))}),q.className="geBtn",b.appendChild(q)));mxEvent.addListener(n,"keypress",function(a){13==a.keyCode&&f(n.value)});q=mxUtils.button(mxResources.get("apply"),function(){f(n.value)});q.className="geBtn gePrimaryBtn";b.appendChild(q);a.editor.cancelFirst||b.appendChild(c);Graph.fileSupport&&(b.style.marginTop="120px",p.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",p.style.backgroundPosition=
-"center 65%",p.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")),p.appendChild(c));p.appendChild(b);this.container=p},LinkDialog=function(a,c,b,e,g){function h(a,b,d){d=mxUtils.button("",d);d.className="geBtn";d.setAttribute("title",b);b=document.createElement("img");b.style.height="26px";
-b.style.width="26px";b.setAttribute("src",a);d.style.minWidth="42px";d.style.verticalAlign="middle";d.appendChild(b);y.appendChild(d)}var m=document.createElement("div");mxUtils.write(m,mxResources.get("editLink")+":");var p=document.createElement("div");p.className="geTitle";p.style.backgroundColor="transparent";p.style.borderColor="transparent";p.style.whiteSpace="nowrap";p.style.textOverflow="clip";p.style.cursor="default";mxClient.IS_VML||(p.style.paddingRight="20px");var n=document.createElement("input");
+function(a,b,d,k,c,e,p,t){f(a,t)},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 k=b.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(k)&&f(decodeURIComponent(k))}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 k=document.createElement("input");k.setAttribute("multiple","multiple");k.setAttribute("type","file");if(null==document.documentMode){mxEvent.addListener(k,
+"change",function(b){a.importFiles(k.files,0,0,a.maxImageSize,function(a,b,d,k,c,e){f(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(){k.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)}),
+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&&f(n.value)});p=mxUtils.button(mxResources.get("apply"),function(){f(n.value)});p.className="geBtn gePrimaryBtn";b.appendChild(p);a.editor.cancelFirst||b.appendChild(c);Graph.fileSupport&&(b.style.marginTop="120px",q.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",q.style.backgroundPosition=
+"center 65%",q.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")),q.appendChild(c));q.appendChild(b);this.container=q},LinkDialog=function(a,c,b,e,g){function h(a,b,d){d=mxUtils.button("",d);d.className="geBtn";d.setAttribute("title",b);b=document.createElement("img");b.style.height="26px";
+b.style.width="26px";b.setAttribute("src",a);d.style.minWidth="42px";d.style.verticalAlign="middle";d.appendChild(b);y.appendChild(d)}var m=document.createElement("div");mxUtils.write(m,mxResources.get("editLink")+":");var q=document.createElement("div");q.className="geTitle";q.style.backgroundColor="transparent";q.style.borderColor="transparent";q.style.whiteSpace="nowrap";q.style.textOverflow="clip";q.style.cursor="default";mxClient.IS_VML||(q.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 d=document.createElement("div");d.setAttribute("title",mxResources.get("reset"));d.style.position="relative";d.style.left="-16px";d.style.width="12px";d.style.height="14px";d.style.cursor="pointer";
-d.style.display=mxClient.IS_VML?"inline":"inline-block";d.style.top=(mxClient.IS_VML?0:3)+"px";d.style.background="url('"+a.editor.transparentImage+"')";mxEvent.addListener(d,"click",function(){n.value="";n.focus()});var f=document.createElement("input");f.style.cssText="margin-right:8px;margin-bottom:8px;";f.setAttribute("value","url");f.setAttribute("type","radio");f.setAttribute("name","current-linkdialog");var l=document.createElement("input");l.style.cssText="margin-right:8px;margin-bottom:8px;";
-l.setAttribute("value","url");l.setAttribute("type","radio");l.setAttribute("name","current-linkdialog");var q=document.createElement("select");q.style.width="420px";if(g&&null!=a.pages){null!=c&&"data:page/id,"==c.substring(0,13)?(l.setAttribute("checked","checked"),l.defaultChecked=!0):(n.setAttribute("value",c),f.setAttribute("checked","checked"),f.defaultChecked=!0);n.style.width="420px";p.appendChild(f);p.appendChild(n);p.appendChild(d);mxUtils.br(p);p.appendChild(l);g=!1;for(d=0;d<a.pages.length;d++){var t=
-document.createElement("option");mxUtils.write(t,a.pages[d].getName()||mxResources.get("pageWithNumber",[d+1]));t.setAttribute("value","data:page/id,"+a.pages[d].getId());c==t.getAttribute("value")&&(t.setAttribute("selected","selected"),g=!0);q.appendChild(t)}if(!g&&l.checked){var u=document.createElement("option");mxUtils.write(u,mxResources.get("pageNotFound"));u.setAttribute("disabled","disabled");u.setAttribute("selected","selected");u.setAttribute("value","pageNotFound");q.appendChild(u);mxEvent.addListener(q,
-"change",function(){null==u.parentNode||u.selected||u.parentNode.removeChild(u)})}p.appendChild(q)}else n.setAttribute("value",c),p.appendChild(n),p.appendChild(d);m.appendChild(p);var w=mxUtils.button(b,function(){a.hideDialog();e(l.checked?"pageNotFound"!==q.value?q.value:c:n.value,LinkDialog.selectedDocs)});w.style.verticalAlign="middle";w.className="geBtn gePrimaryBtn";this.init=function(){l.checked?q.focus():(n.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?
-n.select():document.execCommand("selectAll",!1,null));mxEvent.addListener(q,"focus",function(){f.removeAttribute("checked");l.setAttribute("checked","checked");l.checked=!0});mxEvent.addListener(n,"focus",function(){l.removeAttribute("checked");f.setAttribute("checked","checked");f.checked=!0});if(Graph.fileSupport){var b=m.parentNode,d=null;mxEvent.addListener(b,"dragleave",function(a){null!=d&&(d.parentNode.removeChild(d),d=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(b,"dragover",
+d.style.display=mxClient.IS_VML?"inline":"inline-block";d.style.top=(mxClient.IS_VML?0:3)+"px";d.style.background="url('"+a.editor.transparentImage+"')";mxEvent.addListener(d,"click",function(){n.value="";n.focus()});var f=document.createElement("input");f.style.cssText="margin-right:8px;margin-bottom:8px;";f.setAttribute("value","url");f.setAttribute("type","radio");f.setAttribute("name","current-linkdialog");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 p=document.createElement("select");p.style.width="420px";if(g&&null!=a.pages){null!=c&&"data:page/id,"==c.substring(0,13)?(k.setAttribute("checked","checked"),k.defaultChecked=!0):(n.setAttribute("value",c),f.setAttribute("checked","checked"),f.defaultChecked=!0);n.style.width="420px";q.appendChild(f);q.appendChild(n);q.appendChild(d);mxUtils.br(q);q.appendChild(k);g=!1;for(d=0;d<a.pages.length;d++){var t=
+document.createElement("option");mxUtils.write(t,a.pages[d].getName()||mxResources.get("pageWithNumber",[d+1]));t.setAttribute("value","data:page/id,"+a.pages[d].getId());c==t.getAttribute("value")&&(t.setAttribute("selected","selected"),g=!0);p.appendChild(t)}if(!g&&k.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)})}q.appendChild(p)}else n.setAttribute("value",c),q.appendChild(n),q.appendChild(d);m.appendChild(q);var w=mxUtils.button(b,function(){a.hideDialog();e(k.checked?"pageNotFound"!==p.value?p.value:c:n.value,LinkDialog.selectedDocs)});w.style.verticalAlign="middle";w.className="geBtn gePrimaryBtn";this.init=function(){k.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(){f.removeAttribute("checked");k.setAttribute("checked","checked");k.checked=!0});mxEvent.addListener(n,"focus",function(){k.removeAttribute("checked");f.setAttribute("checked","checked");f.checked=!0});if(Graph.fileSupport){var b=m.parentNode,d=null;mxEvent.addListener(b,"dragleave",function(a){null!=d&&(d.parentNode.removeChild(d),d=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(b,"dragover",
mxUtils.bind(this,function(f){null==d&&(!mxClient.IS_IE||10<document.documentMode)&&(d=a.highlightElement(b));f.stopPropagation();f.preventDefault()}));mxEvent.addListener(b,"drop",mxUtils.bind(this,function(a){null!=d&&(d.parentNode.removeChild(d),d=null);0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")&&(n.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),f.setAttribute("checked","checked"),f.checked=!0,w.click());a.stopPropagation();a.preventDefault()}),!1)}};var y=document.createElement("div");
-y.style.marginTop="20px";y.style.textAlign="right";b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});b.style.verticalAlign="middle";b.className="geBtn";a.editor.cancelFirst&&y.appendChild(b);p=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/solution/articles/16000080137")});p.style.verticalAlign="middle";p.className="geBtn";y.appendChild(p);a.isOffline()&&!mxClient.IS_CHROMEAPP&&(p.style.display="none");LinkDialog.selectedDocs=null;LinkDialog.filePicked=
+y.style.marginTop="20px";y.style.textAlign="right";b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});b.style.verticalAlign="middle";b.className="geBtn";a.editor.cancelFirst&&y.appendChild(b);q=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/solution/articles/16000080137")});q.style.verticalAlign="middle";q.className="geBtn";y.appendChild(q);a.isOffline()&&!mxClient.IS_CHROMEAPP&&(q.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&&h(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,d=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0),f=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0),l=(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(d).addView(f).addView(l).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);
+null!=a.drive&&h(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,d=(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(d).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&&h(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&&h(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&&h(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),function(){a.gitHub.pickFile(function(a){if(null!=a){a=a.split("/");var b=a[0],d=a[1],f=a[2];a=a.slice(3,a.length).join("/");n.value="https://github.com/"+b+"/"+d+"/blob/"+f+"/"+a;n.focus()}})});mxEvent.addListener(n,"keypress",function(b){13==b.keyCode&&(a.hideDialog(),e(l.checked?q.value:n.value,LinkDialog.selectedDocs))});y.appendChild(w);a.editor.cancelFirst||y.appendChild(b);m.appendChild(y);this.container=
+n.focus()})});null!=a.gitHub&&h(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),function(){a.gitHub.pickFile(function(a){if(null!=a){a=a.split("/");var b=a[0],d=a[1],f=a[2];a=a.slice(3,a.length).join("/");n.value="https://github.com/"+b+"/"+d+"/blob/"+f+"/"+a;n.focus()}})});mxEvent.addListener(n,"keypress",function(b){13==b.keyCode&&(a.hideDialog(),e(k.checked?p.value:n.value,LinkDialog.selectedDocs))});y.appendChild(w);a.editor.cancelFirst||y.appendChild(b);m.appendChild(y);this.container=
m},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",e=document.createElement("small");e.innerHTML="v "+EditorUi.VERSION;e.style.color=b;c.appendChild(e);mxUtils.br(c);mxUtils.br(c);e=document.createElement("small");e.style.color=b;e.innerHTML='&copy; 2005-2018 <a href="https://about.draw.io/" style="color:inherit;" target="_blank">JGraph Ltd</a>.<br>All Rights Reserved.';c.appendChild(e);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 e=document.createElement("input");e.setAttribute("type",
"text");e.style.marginTop="6px";e.style.width="600px";var g=mxUtils.button(mxResources.get("sendMessage"),function(){var b=n.value+(m.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(e.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"))}))});g.className="geBtn gePrimaryBtn";g.setAttribute("disabled","disabled");var h=/^(([^<>()[\]\\.,;:\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(e,"change",function(){0<e.value.length&&0<h.test(e.value)?g.removeAttribute("disabled"):g.setAttribute("disabled","disabled")});mxEvent.addListener(e,"keyup",function(){0<e.value.length&&h.test(e.value)?g.removeAttribute("disabled"):g.setAttribute("disabled","disabled")});c.appendChild(e);this.init=function(){e.focus()};var m=document.createElement("input");m.setAttribute("type","checkbox");m.setAttribute("checked","checked");m.defaultChecked=!0;b=document.createElement("p");b.style.marginTop=
-"14px";b.appendChild(m);var p=document.createElement("span");mxUtils.write(p," "+mxResources.get("includeCopyOfMyDiagram"));b.appendChild(p);mxEvent.addListener(p,"click",function(a){m.checked=!m.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";p=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});p.className="geBtn";a.editor.cancelFirst?(b.appendChild(p),b.appendChild(g)):(b.appendChild(g),b.appendChild(p));c.appendChild(b);this.container=c};FeedbackDialog.maxAttachmentSize=1E6;
+"14px";b.appendChild(m);var q=document.createElement("span");mxUtils.write(q," "+mxResources.get("includeCopyOfMyDiagram"));b.appendChild(q);mxEvent.addListener(q,"click",function(a){m.checked=!m.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";q=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});q.className="geBtn";a.editor.cancelFirst?(b.appendChild(q),b.appendChild(g)):(b.appendChild(g),b.appendChild(q));c.appendChild(b);this.container=c};FeedbackDialog.maxAttachmentSize=1E6;
var RevisionDialog=function(a,c,b){var e=document.createElement("div"),g=document.createElement("h3");g.style.marginTop="0px";mxUtils.write(g,mxResources.get("revisionHistory"));e.appendChild(g);var h=document.createElement("div");h.style.position="absolute";h.style.overflow="auto";h.style.width="170px";h.style.height="378px";e.appendChild(h);var m=document.createElement("div");m.style.position="absolute";m.style.border="1px solid lightGray";m.style.left="199px";m.style.width="470px";m.style.height=
-"376px";m.style.overflow="hidden";mxEvent.disableContextMenu(m);e.appendChild(m);var p=new Graph(m);p.setTooltips(!1);p.setEnabled(!1);p.setPanning(!0);p.panningHandler.ignoreCell=!0;p.panningHandler.useLeftButtonForPanning=!0;p.minFitScale=null;p.maxFitScale=null;p.centerZoom=!0;var n=0,d=null,f=0,l=p.getGlobalVariable;p.getGlobalVariable=function(a){return"page"==a&&null!=d&&null!=d[f]?d[f].getAttribute("name"):"pagenumber"==a?f+1:l.apply(this,arguments)};p.getLinkForCell=function(){return null};
-Editor.MathJaxRender&&p.addListener(mxEvent.SIZE,mxUtils.bind(this,function(b,d){a.editor.graph.mathEnabled&&Editor.MathJaxRender(p.container)}));var q=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%"}),t=a.getCurrentFile(),u=null,w=null,y=null,k=null,v=mxUtils.button("",function(){null!=y&&p.zoomIn()});v.className="geSprite geSprite-zoomin";v.setAttribute("title",
-mxResources.get("zoomIn"));v.style.outline="none";v.style.border="none";v.style.margin="2px";v.setAttribute("disabled","disabled");mxUtils.setOpacity(v,20);var z=mxUtils.button("",function(){null!=y&&p.zoomOut()});z.className="geSprite geSprite-zoomout";z.setAttribute("title",mxResources.get("zoomOut"));z.style.outline="none";z.style.border="none";z.style.margin="2px";z.setAttribute("disabled","disabled");mxUtils.setOpacity(z,20);var C=mxUtils.button("",function(){null!=y&&(p.maxFitScale=8,p.fit(8),
-p.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 B=mxUtils.button("",function(){null!=y&&(p.zoomActual(),p.center())});B.className="geSprite geSprite-actualsize";B.setAttribute("title",mxResources.get("actualSize"));B.style.outline="none";B.style.border="none";B.style.margin="2px";B.setAttribute("disabled","disabled");
+"376px";m.style.overflow="hidden";mxEvent.disableContextMenu(m);e.appendChild(m);var q=new Graph(m);q.setTooltips(!1);q.setEnabled(!1);q.setPanning(!0);q.panningHandler.ignoreCell=!0;q.panningHandler.useLeftButtonForPanning=!0;q.minFitScale=null;q.maxFitScale=null;q.centerZoom=!0;var n=0,d=null,f=0,k=q.getGlobalVariable;q.getGlobalVariable=function(a){return"page"==a&&null!=d&&null!=d[f]?d[f].getAttribute("name"):"pagenumber"==a?f+1:k.apply(this,arguments)};q.getLinkForCell=function(){return null};
+Editor.MathJaxRender&&q.addListener(mxEvent.SIZE,mxUtils.bind(this,function(b,d){a.editor.graph.mathEnabled&&Editor.MathJaxRender(q.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%"}),t=a.getCurrentFile(),u=null,w=null,y=null,l=null,v=mxUtils.button("",function(){null!=y&&q.zoomIn()});v.className="geSprite geSprite-zoomin";v.setAttribute("title",
+mxResources.get("zoomIn"));v.style.outline="none";v.style.border="none";v.style.margin="2px";v.setAttribute("disabled","disabled");mxUtils.setOpacity(v,20);var z=mxUtils.button("",function(){null!=y&&q.zoomOut()});z.className="geSprite geSprite-zoomout";z.setAttribute("title",mxResources.get("zoomOut"));z.style.outline="none";z.style.border="none";z.style.margin="2px";z.setAttribute("disabled","disabled");mxUtils.setOpacity(z,20);var D=mxUtils.button("",function(){null!=y&&(q.maxFitScale=8,q.fit(8),
+q.center())});D.className="geSprite geSprite-fit";D.setAttribute("title",mxResources.get("fit"));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!=y&&(q.zoomActual(),q.center())});B.className="geSprite geSprite-actualsize";B.setAttribute("title",mxResources.get("actualSize"));B.style.outline="none";B.style.border="none";B.style.margin="2px";B.setAttribute("disabled","disabled");
mxUtils.setOpacity(B,20);var x=document.createElement("div");x.style.position="absolute";x.style.textAlign="right";x.style.color="gray";x.style.marginTop="10px";x.style.backgroundColor="transparent";x.style.top="440px";x.style.right="32px";x.style.maxWidth="380px";x.style.cursor="default";var G=mxUtils.button(mxResources.get("download"),function(){if(null!=y){var b=a.getCurrentFile(),b=null!=b&&null!=b.getTitle()?b.getTitle():a.defaultFilename,d=mxUtils.getXml(y.documentElement);a.isLocalFileSave()?
-a.saveLocalFile(d,b,"text/xml"):(d="undefined"===typeof pako?"&xml="+encodeURIComponent(d):"&data="+encodeURIComponent(a.editor.graph.compress(d)),(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(b)+"&format=xml"+d)).simulate(document,"_blank"))}});G.className="geBtn";G.setAttribute("disabled","disabled");var D=mxUtils.button(mxResources.get("restore"),function(){null!=y&&null!=k&&a.confirm(mxResources.get("areYouSure"),function(){null!=b?b(k):a.spinner.spin(document.body,mxResources.get("restoring"))&&
-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)})})});D.className="geBtn";D.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,
+a.saveLocalFile(d,b,"text/xml"):(d="undefined"===typeof pako?"&xml="+encodeURIComponent(d):"&data="+encodeURIComponent(a.editor.graph.compress(d)),(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(b)+"&format=xml"+d)).simulate(document,"_blank"))}});G.className="geBtn";G.setAttribute("disabled","disabled");var C=mxUtils.button(mxResources.get("restore"),function(){null!=y&&null!=l&&a.confirm(mxResources.get("areYouSure"),function(){null!=b?b(l):a.spinner.spin(document.body,mxResources.get("restoring"))&&
+t.save(!0,function(b){a.spinner.stop();a.replaceFileData(l);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",D.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){m.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 l=new Date(b.modifiedDate),e=null;if(0<=l.getTime()){var g=function(c){q.stop();var u=mxUtils.parseXml(c),w=a.editor.extractGraphModel(u.documentElement,!0);if(null!=w){var g=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";m.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"==w.nodeName){u=w.getElementsByTagName("diagram");d=[];for(c=0;c<u.length;c++)d.push(u[c]);
+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){m.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 k=new Date(b.modifiedDate),e=null;if(0<=k.getTime()){var g=function(c){p.stop();var u=mxUtils.parseXml(c),w=a.editor.extractGraphModel(u.documentElement,!0);if(null!=w){var g=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";m.style.backgroundColor=b;(new mxCodec(a.ownerDocument)).decode(a,q.getModel());q.maxFitScale=1;q.fit(8);q.center();return a};F.style.display="none";F.innerHTML="";y=u;l=c;d=parseSelectFunction=null;f=0;if("mxfile"==w.nodeName){u=w.getElementsByTagName("diagram");d=[];for(c=0;c<u.length;c++)d.push(u[c]);
f=Math.min(n,d.length-1);0<d.length&&g(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);g(d[n])}}else h(w);c=b.lastModifyingUserName;null!=c&&20<c.length&&(c=c.substring(0,20)+"...");x.innerHTML="";mxUtils.write(x,(null!=
-c?c+" ":"")+l.toLocaleDateString()+" "+l.toLocaleTimeString());x.setAttribute("title",e.getAttribute("title"));v.removeAttribute("disabled");z.removeAttribute("disabled");C.removeAttribute("disabled");B.removeAttribute("disabled");null!=t&&t.isRestricted()||(a.editor.graph.isEnabled()&&D.removeAttribute("disabled"),G.removeAttribute("disabled"),E.removeAttribute("disabled"),A.removeAttribute("disabled"));mxUtils.setOpacity(v,60);mxUtils.setOpacity(z,60);mxUtils.setOpacity(C,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")):l.toDateString()===P?mxUtils.write(h,l.toLocaleTimeString()):mxUtils.write(h,l.toLocaleDateString()+" "+l.toLocaleTimeString());
-e.appendChild(h);e.setAttribute("title",l.toLocaleDateString()+" "+l.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")+"...",m.style.backgroundColor="#ffffff",p.getModel().clear(),D.setAttribute("disabled","disabled"),
-G.setAttribute("disabled","disabled"),v.setAttribute("disabled","disabled"),z.setAttribute("disabled","disabled"),B.setAttribute("disabled","disabled"),C.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(C,20),mxUtils.setOpacity(B,20),q.spin(m),b.getXml(function(a){w==b&&g(a)},function(a){q.stop();F.style.display="none";F.innerHTML=
+c?c+" ":"")+k.toLocaleDateString()+" "+k.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")):k.toDateString()===P?mxUtils.write(h,k.toLocaleTimeString()):mxUtils.write(h,k.toLocaleDateString()+" "+k.toLocaleTimeString());
+e.appendChild(h);e.setAttribute("title",k.toLocaleDateString()+" "+k.toLocaleTimeString()+" "+a.formatFileSize(parseInt(b.fileSize))+(null!=b.lastModifyingUserName?" "+b.lastModifyingUserName:""));mxEvent.addListener(e,"click",function(a){w!=b&&(p.stop(),null!=u&&(u.style.backgroundColor=""),w=b,u=e,u.style.backgroundColor="#ebf2f9",l=y=null,x.removeAttribute("title"),x.innerHTML=mxResources.get("loading")+"...",m.style.backgroundColor="#ffffff",q.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),p.spin(m),b.getXml(function(a){w==b&&g(a)},function(a){p.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?(m.style.display=
-"none",I.style.display="none",mxUtils.write(h,mxResources.get("notAvailable"))):(m.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(C);a.editor.cancelFirst?(g.appendChild(h),g.appendChild(G),g.appendChild(A),g.appendChild(D),g.appendChild(E)):(g.appendChild(G),
-g.appendChild(A),g.appendChild(D),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,m,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 l=new Graph(f);l.setEnabled(!1);l.setPanning(!0);l.panningHandler.ignoreCell=!0;l.panningHandler.useLeftButtonForPanning=!0;l.minFitScale=null;l.maxFitScale=null;l.centerZoom=!0;c=mxUtils.parseXml(b);var q=a.editor.extractGraphModel(c.documentElement,!0),t=0,u=null,w=l.getGlobalVariable;l.getGlobalVariable=function(a){return"page"==a&&null!=u&&null!=u[t]?u[t].getAttribute("name"):
-"pagenumber"==a?t+1:w.apply(this,arguments)};l.getLinkForCell=function(){return null};c=mxUtils.button("",function(){l.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(){l.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);d=mxUtils.button("",function(){l.maxFitScale=8;l.fit(8);l.center()});d.className="geSprite geSprite-fit";d.setAttribute("title",mxResources.get("fit"));d.style.outline="none";d.style.border="none";d.style.margin="2px";mxUtils.setOpacity(d,60);var y=mxUtils.button("",function(){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";mxUtils.setOpacity(y,
-60);g=mxUtils.button(m||mxResources.get("discard"),g);g.className="geBtn";var k=document.createElement("select");k.style.maxWidth="80px";k.style.position="relative";k.style.top="-2px";k.style.verticalAlign="bottom";k.style.marginRight="6px";k.style.display="none";e=mxUtils.button(h||mxResources.get("edit"),e);e.className="geBtn gePrimaryBtn";h=document.createElement("div");h.style.position="absolute";h.style.bottom="30px";h.style.width="640px";h.style.textAlign="right";m=document.createElement("div");
-m.className="geToolbarContainer";m.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";f.style.backgroundColor=b;(new mxCodec(a.ownerDocument)).decode(a,l.getModel());l.maxFitScale=1;l.fit(8);l.center()}}function d(d){null!=d&&(d=b(mxUtils.parseXml(a.editor.graph.decompress(mxUtils.getTextContent(d))).documentElement));
-return d}mxEvent.addListener(k,"change",function(a){t=parseInt(k.value);d(u[t]);mxEvent.consume(a)});if("mxfile"==q.nodeName){var c=q.getElementsByTagName("diagram");u=[];for(var e=0;e<c.length;e++)u.push(c[e]);0<u.length&&d(u[t]);if(1<u.length)for(k.style.display="",e=0;e<u.length;e++)c=document.createElement("option"),mxUtils.write(c,u[e].getAttribute("name")||mxResources.get("pageWithNumber",[e+1])),c.setAttribute("value",e),e==t&&c.setAttribute("selected","selected"),k.appendChild(c)}else b(q)};
-m.appendChild(k);m.appendChild(c);m.appendChild(b);m.appendChild(y);m.appendChild(d);c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});c.className="geBtn";p=null!=p?mxUtils.button(mxResources.get("ignore"),p):null;null!=p&&(p.className="geBtn");a.editor.cancelFirst?(h.appendChild(c),null!=p&&h.appendChild(p),h.appendChild(g),h.appendChild(e)):(h.appendChild(e),h.appendChild(g),null!=p&&h.appendChild(p),h.appendChild(c));n.appendChild(h);n.appendChild(m);this.container=n},FindWindow=
-function(a,c,b,e,g){function h(a,b,d){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 l=mxUtils.trim(b[f].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==a&&l.substring(0,d.length)===d||null!=a&&a.test(l))return!0}}return!1}function m(){var a=n.model.getDescendants(n.model.getRoot()),b=q.value.toLowerCase(),l=t.checked?new RegExp(b):null,c=null;d!=b&&(d=b,f=null);var e=null==f;if(0<b.length)for(var u=
-0;u<a.length;u++){var g=n.view.getState(a[u]);if(null!=g&&null!=g.cell.value&&(e||null==c)&&(n.model.isVertex(g.cell)||n.model.isEdge(g.cell))&&(n.isHtmlLabel(g.cell)?(w.innerHTML=n.getLabel(g.cell),label=mxUtils.extractTextWithWhitespace([w])):label=n.getLabel(g.cell),label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase(),null==l&&(label.substring(0,b.length)===b||h(l,g.cell,b))||null!=l&&(l.test(label)||h(l,g.cell,b))))if(e){c=g;break}else null==c&&(c=g);e=e||g==f}null!=
-c?(f=c,n.scrollCellToVisible(f.cell),n.isEnabled()?n.setSelectionCell(f.cell):n.highlightCell(f.cell)):n.isEnabled()&&n.clearSelection();return 0==b.length||null!=c}var p=a.actions.get("find"),n=a.editor.graph,d=null,f=null,l=document.createElement("div");l.style.userSelect="none";l.style.overflow="hidden";l.style.padding="10px";l.style.height="100%";var q=document.createElement("input");q.setAttribute("placeholder",mxResources.get("find"));q.setAttribute("type","text");q.style.marginTop="4px";q.style.marginBottom=
-"6px";q.style.width="200px";q.style.fontSize="12px";q.style.borderRadius="4px";q.style.padding="6px";l.appendChild(q);mxUtils.br(l);var t=document.createElement("input");t.setAttribute("type","checkbox");t.style.marginRight="4px";l.appendChild(t);mxUtils.write(l,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";l.appendChild(u);var w=document.createElement("div");
-mxUtils.br(l);u=mxUtils.button(mxResources.get("reset"),function(){q.value="";q.style.backgroundColor="";d=f=null;q.focus()});u.setAttribute("title",mxResources.get("reset"));u.style.marginTop="6px";u.style.marginRight="4px";u.className="geBtn";l.appendChild(u);u=mxUtils.button(mxResources.get("find"),function(){try{q.style.backgroundColor=m()?"":"#ffcfcf"}catch(y){a.handleError(y)}});u.setAttribute("title",mxResources.get("find")+" (Enter)");u.style.marginTop="6px";u.className="geBtn gePrimaryBtn";
-l.appendChild(u);mxEvent.addListener(q,"keyup",function(a){if(91==a.keyCode||17==a.keyCode)mxEvent.consume(a);else if(27==a.keyCode)p.funct();else if(d!=q.value.toLowerCase()||13==a.keyCode)try{q.style.backgroundColor=m()?"":"#ffcfcf"}catch(k){q.style.backgroundColor="#ffcfcf"}});mxEvent.addListener(l,"keydown",function(b){70==b.keyCode&&a.keyHandler.isControlDown(b)&&!mxEvent.isShiftDown(b)&&(p.funct(),mxEvent.consume(b))});this.window=new mxWindow(mxResources.get("find"),l,c,b,e,g,!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()?(q.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?q.select():document.execCommand("selectAll",!1,null)):n.container.focus()}))},TagsWindow=function(a,c,b,e,g){var h=a.editor.graph,m="tags",p=document.createElement("div");p.style.userSelect="none";p.style.overflow="hidden";p.style.padding=
-"10px";p.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";p.appendChild(n);if(!a.isOffline()||mxClient.IS_CHROMEAPP){n.style.width="240px";var d=a.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000046966");d.firstChild.style.marginBottom="6px";d.style.marginLeft=
-"6px";p.appendChild(d)}mxEvent.addListener(n,"dblclick",function(){var b=new FilenameDialog(a,m,mxResources.get("ok"),mxUtils.bind(this,function(a){null!=a&&0<a.length&&(m=a)}),mxResources.get("enterPropertyName"));a.showDialog(b.container,300,80,!0,!0);b.init()});n.setAttribute("title",mxResources.get("doubleClickChangeProperty"));mxUtils.br(p);d=mxUtils.button(mxResources.get("hide"),function(){var a=h.getCellsForTags(n.value.split(" "),void 0,m);h.setCellsVisible(a,!1)});d.setAttribute("title",
-mxResources.get("hide"));d.style.marginTop="8px";d.style.marginRight="4px";d.className="geBtn";p.appendChild(d);d=mxUtils.button(mxResources.get("show"),function(){var a=h.getCellsForTags(n.value.split(" "),void 0,m);h.setCellsVisible(a,!0);if(h.isEnabled())h.setSelectionCells(a);else for(var b=0;b<a.length;b++)h.highlightCell(a[b])});d.setAttribute("title",mxResources.get("show"));d.style.marginTop="8px";d.style.marginRight="4px";d.className="geBtn";p.appendChild(d);var f=a.actions.get("tags"),d=
-mxUtils.button(mxResources.get("close"),function(){f.funct()});d.setAttribute("title",mxResources.get("close")+" (Enter/Esc)");d.style.marginTop="8px";d.className="geBtn gePrimaryBtn";p.appendChild(d);mxEvent.addListener(n,"keyup",function(a){13!=a.keyCode&&27!=a.keyCode||f.funct()});this.window=new mxWindow(mxResources.get("tags"),p,c,b,e,g,!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)):h.container.focus()}))},AuthDialog=function(a,c,b,e){var g=document.createElement("div");g.style.textAlign="center";var h=document.createElement("p");h.style.fontSize="16pt";h.style.padding="0px";h.style.margin="0px";h.style.color="gray";mxUtils.write(h,mxResources.get("authorizationRequired"));var m="Unknown",p=document.createElement("img");
-p.setAttribute("border","0");p.setAttribute("align","absmiddle");p.style.marginRight="10px";c==a.drive?(m=mxResources.get("googleDrive"),p.src=IMAGE_PATH+"/google-drive-logo-white.svg"):c==a.dropbox?(m=mxResources.get("dropbox"),p.src=IMAGE_PATH+"/dropbox-logo-white.svg"):c==a.oneDrive?(m=mxResources.get("oneDrive"),p.src=IMAGE_PATH+"/onedrive-logo-white.svg"):c==a.gitHub?(m=mxResources.get("github"),p.src=IMAGE_PATH+"/github-logo-white.svg"):c==a.trello&&(m=mxResources.get("trello"),p.src=IMAGE_PATH+
-"/trello-logo-white.svg");a=document.createElement("p");mxUtils.write(a,mxResources.get("authorizeThisAppIn",[m]));var n=document.createElement("input");n.setAttribute("type","checkbox");m=mxUtils.button(mxResources.get("authorize"),function(){e(n.checked)});m.insertBefore(p,m.firstChild);m.style.marginTop="6px";m.className="geBigButton";g.appendChild(h);g.appendChild(a);g.appendChild(m);b&&(b=document.createElement("p"),b.style.marginTop="20px",b.appendChild(n),h=document.createElement("span"),mxUtils.write(h,
-" "+mxResources.get("rememberMe")),b.appendChild(h),g.appendChild(b),n.checked=!0,n.defaultChecked=!0,mxEvent.addListener(h,"click",function(a){n.checked=!n.checked;mxEvent.consume(a)}));this.container=g},MoreShapesDialog=function(a,c,b){b=null!=b?b:a.sidebar.entries;var e=document.createElement("div"),g=[];if(null!=a.sidebar.customEntries)for(var h=0;h<a.sidebar.customEntries.length;h++){for(var m=a.sidebar.customEntries[h],p={title:a.getResource(m.title),entries:[]},n=0;n<m.entries.length;n++){var d=
-m.entries[n];p.entries.push({id:d.id,title:a.getResource(d.title),desc:a.getResource(d.desc),image:d.preview})}g.push(p)}for(h=0;h<b.length;h++)if(null==a.sidebar.enabledLibraries)g.push(b[h]);else{p={title:b[h].title,entries:[]};for(n=0;n<b[h].entries.length;n++)0<=mxUtils.indexOf(a.sidebar.enabledLibraries,b[h].entries[n].id)&&p.entries.push(b[h].entries[n]);0<p.entries.length&&g.push(p)}b=g;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 f=document.createElement("div"),l=document.createElement("div");f.style.position="absolute";f.style.top="40px";f.style.left="0px";f.style.width="202px";f.style.bottom="60px";f.style.overflow="auto";mxClient.IS_QUIRKS&&(f.style.height="437px",f.style.marginTop="1px");l.style.position="absolute";l.style.left="202px";l.style.right=
-"0px";l.style.top="40px";l.style.bottom="60px";l.style.overflow="auto";l.style.borderLeft="1px solid rgb(211, 211, 211)";l.style.textAlign="center";mxClient.IS_QUIRKS&&(l.style.width=parseInt(n.style.width)-202+"px",l.style.height=f.style.height,l.style.marginTop=f.style.marginTop);var q=null,t=[],u=document.createElement("div");u.style.position="relative";u.style.left="0px";u.style.right="0px";for(h=0;h<b.length;h++)(function(b){var d=u.cloneNode(!1);d.style.fontWeight="bold";d.style.backgroundColor=
-"dark"==uiTheme?"#505759":"#e5e5e5";d.style.padding="6px 0px 6px 20px";mxUtils.write(d,b.title);f.appendChild(d);for(var c=0;c<b.entries.length;c++)(function(b){var d=u.cloneNode(!1);d.style.cursor="pointer";d.style.padding="4px 0px 4px 20px";var k=document.createElement("input");k.setAttribute("type","checkbox");k.checked=a.sidebar.isEntryVisible(b.id);k.defaultChecked=k.checked;d.appendChild(k);mxUtils.write(d," "+b.title);f.appendChild(d);var e=function(a){if(null==a||"INPUT"!=mxEvent.getSource(a).nodeName){l.style.textAlign=
-"center";l.style.padding="0px";l.style.color="";l.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);l.appendChild(f)}null!=b.imageCallback?b.imageCallback(l):null!=b.image?l.innerHTML+='<img border="0" src="'+b.image+'"/>':null==b.desc&&(l.style.padding="20px",l.style.color="rgb(179, 179, 179)",mxUtils.write(l,mxResources.get("noPreview")));
-null!=q&&(q.style.backgroundColor="");q=d;q.style.backgroundColor="dark"==uiTheme?"#505759":"#ebf2f9";null!=a&&mxEvent.consume(a)}};mxEvent.addListener(d,"click",e);mxEvent.addListener(d,"dblclick",function(a){k.checked=!k.checked;mxEvent.consume(a)});t.push(function(){return k.checked?b.id:null});0==h&&0==c&&e()})(b.entries[c])})(b[h]);e.style.padding="30px";e.appendChild(n);e.appendChild(f);e.appendChild(l);b=document.createElement("div");b.className="geDialogFooter";b.style.position="absolute";
+"none",I.style.display="none",mxUtils.write(h,mxResources.get("notAvailable"))):(m.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,m,q){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 k=new Graph(f);k.setEnabled(!1);k.setPanning(!0);k.panningHandler.ignoreCell=!0;k.panningHandler.useLeftButtonForPanning=!0;k.minFitScale=null;k.maxFitScale=null;k.centerZoom=!0;c=mxUtils.parseXml(b);var p=a.editor.extractGraphModel(c.documentElement,!0),t=0,u=null,w=k.getGlobalVariable;k.getGlobalVariable=function(a){return"page"==a&&null!=u&&null!=u[t]?u[t].getAttribute("name"):
+"pagenumber"==a?t+1:w.apply(this,arguments)};k.getLinkForCell=function(){return null};c=mxUtils.button("",function(){k.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(){k.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);d=mxUtils.button("",function(){k.maxFitScale=8;k.fit(8);k.center()});d.className="geSprite geSprite-fit";d.setAttribute("title",mxResources.get("fit"));d.style.outline="none";d.style.border="none";d.style.margin="2px";mxUtils.setOpacity(d,60);var y=mxUtils.button("",function(){k.zoomActual();k.center()});y.className="geSprite geSprite-actualsize";y.setAttribute("title",mxResources.get("actualSize"));y.style.outline="none";y.style.border="none";y.style.margin="2px";mxUtils.setOpacity(y,
+60);g=mxUtils.button(m||mxResources.get("discard"),g);g.className="geBtn";var l=document.createElement("select");l.style.maxWidth="80px";l.style.position="relative";l.style.top="-2px";l.style.verticalAlign="bottom";l.style.marginRight="6px";l.style.display="none";e=mxUtils.button(h||mxResources.get("edit"),e);e.className="geBtn gePrimaryBtn";h=document.createElement("div");h.style.position="absolute";h.style.bottom="30px";h.style.width="640px";h.style.textAlign="right";m=document.createElement("div");
+m.className="geToolbarContainer";m.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";f.style.backgroundColor=b;(new mxCodec(a.ownerDocument)).decode(a,k.getModel());k.maxFitScale=1;k.fit(8);k.center()}}function d(d){null!=d&&(d=b(mxUtils.parseXml(a.editor.graph.decompress(mxUtils.getTextContent(d))).documentElement));
+return d}mxEvent.addListener(l,"change",function(a){t=parseInt(l.value);d(u[t]);mxEvent.consume(a)});if("mxfile"==p.nodeName){var c=p.getElementsByTagName("diagram");u=[];for(var e=0;e<c.length;e++)u.push(c[e]);0<u.length&&d(u[t]);if(1<u.length)for(l.style.display="",e=0;e<u.length;e++)c=document.createElement("option"),mxUtils.write(c,u[e].getAttribute("name")||mxResources.get("pageWithNumber",[e+1])),c.setAttribute("value",e),e==t&&c.setAttribute("selected","selected"),l.appendChild(c)}else b(p)};
+m.appendChild(l);m.appendChild(c);m.appendChild(b);m.appendChild(y);m.appendChild(d);c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});c.className="geBtn";q=null!=q?mxUtils.button(mxResources.get("ignore"),q):null;null!=q&&(q.className="geBtn");a.editor.cancelFirst?(h.appendChild(c),null!=q&&h.appendChild(q),h.appendChild(g),h.appendChild(e)):(h.appendChild(e),h.appendChild(g),null!=q&&h.appendChild(q),h.appendChild(c));n.appendChild(h);n.appendChild(m);this.container=n},FindWindow=
+function(a,c,b,e,g){function h(a,b,d){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,d.length)===d||null!=a&&a.test(k))return!0}}return!1}function m(){var a=n.model.getDescendants(n.model.getRoot()),b=p.value.toLowerCase(),k=t.checked?new RegExp(b):null,c=null;d!=b&&(d=b,f=null);var e=null==f;if(0<b.length)for(var u=
+0;u<a.length;u++){var g=n.view.getState(a[u]);if(null!=g&&null!=g.cell.value&&(e||null==c)&&(n.model.isVertex(g.cell)||n.model.isEdge(g.cell))&&(n.isHtmlLabel(g.cell)?(w.innerHTML=n.getLabel(g.cell),label=mxUtils.extractTextWithWhitespace([w])):label=n.getLabel(g.cell),label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase(),null==k&&(label.substring(0,b.length)===b||h(k,g.cell,b))||null!=k&&(k.test(label)||h(k,g.cell,b))))if(e){c=g;break}else null==c&&(c=g);e=e||g==f}null!=
+c?(f=c,n.scrollCellToVisible(f.cell),n.isEnabled()?n.setSelectionCell(f.cell):n.highlightCell(f.cell)):n.isEnabled()&&n.clearSelection();return 0==b.length||null!=c}var q=a.actions.get("find"),n=a.editor.graph,d=null,f=null,k=document.createElement("div");k.style.userSelect="none";k.style.overflow="hidden";k.style.padding="10px";k.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";k.appendChild(p);mxUtils.br(k);var t=document.createElement("input");t.setAttribute("type","checkbox");t.style.marginRight="4px";k.appendChild(t);mxUtils.write(k,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";k.appendChild(u);var w=document.createElement("div");
+mxUtils.br(k);u=mxUtils.button(mxResources.get("reset"),function(){p.value="";p.style.backgroundColor="";d=f=null;p.focus()});u.setAttribute("title",mxResources.get("reset"));u.style.marginTop="6px";u.style.marginRight="4px";u.className="geBtn";k.appendChild(u);u=mxUtils.button(mxResources.get("find"),function(){try{p.style.backgroundColor=m()?"":"#ffcfcf"}catch(y){a.handleError(y)}});u.setAttribute("title",mxResources.get("find")+" (Enter)");u.style.marginTop="6px";u.className="geBtn gePrimaryBtn";
+k.appendChild(u);mxEvent.addListener(p,"keyup",function(a){if(91==a.keyCode||17==a.keyCode)mxEvent.consume(a);else if(27==a.keyCode)q.funct();else if(d!=p.value.toLowerCase()||13==a.keyCode)try{p.style.backgroundColor=m()?"":"#ffcfcf"}catch(l){p.style.backgroundColor="#ffcfcf"}});mxEvent.addListener(k,"keydown",function(b){70==b.keyCode&&a.keyHandler.isControlDown(b)&&!mxEvent.isShiftDown(b)&&(q.funct(),mxEvent.consume(b))});this.window=new mxWindow(mxResources.get("find"),k,c,b,e,g,!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,e,g){var h=a.editor.graph,m="tags",q=document.createElement("div");q.style.userSelect="none";q.style.overflow="hidden";q.style.padding=
+"10px";q.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";q.appendChild(n);if(!a.isOffline()||mxClient.IS_CHROMEAPP){n.style.width="240px";var d=a.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000046966");d.firstChild.style.marginBottom="6px";d.style.marginLeft=
+"6px";q.appendChild(d)}mxEvent.addListener(n,"dblclick",function(){var b=new FilenameDialog(a,m,mxResources.get("ok"),mxUtils.bind(this,function(a){null!=a&&0<a.length&&(m=a)}),mxResources.get("enterPropertyName"));a.showDialog(b.container,300,80,!0,!0);b.init()});n.setAttribute("title",mxResources.get("doubleClickChangeProperty"));mxUtils.br(q);d=mxUtils.button(mxResources.get("hide"),function(){var a=h.getCellsForTags(n.value.split(" "),void 0,m);h.setCellsVisible(a,!1)});d.setAttribute("title",
+mxResources.get("hide"));d.style.marginTop="8px";d.style.marginRight="4px";d.className="geBtn";q.appendChild(d);d=mxUtils.button(mxResources.get("show"),function(){var a=h.getCellsForTags(n.value.split(" "),void 0,m);h.setCellsVisible(a,!0);if(h.isEnabled())h.setSelectionCells(a);else for(var b=0;b<a.length;b++)h.highlightCell(a[b])});d.setAttribute("title",mxResources.get("show"));d.style.marginTop="8px";d.style.marginRight="4px";d.className="geBtn";q.appendChild(d);var f=a.actions.get("tags"),d=
+mxUtils.button(mxResources.get("close"),function(){f.funct()});d.setAttribute("title",mxResources.get("close")+" (Enter/Esc)");d.style.marginTop="8px";d.className="geBtn gePrimaryBtn";q.appendChild(d);mxEvent.addListener(n,"keyup",function(a){13!=a.keyCode&&27!=a.keyCode||f.funct()});this.window=new mxWindow(mxResources.get("tags"),q,c,b,e,g,!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)):h.container.focus()}))},AuthDialog=function(a,c,b,e){var g=document.createElement("div");g.style.textAlign="center";var h=document.createElement("p");h.style.fontSize="16pt";h.style.padding="0px";h.style.margin="0px";h.style.color="gray";mxUtils.write(h,mxResources.get("authorizationRequired"));var m="Unknown",q=document.createElement("img");
+q.setAttribute("border","0");q.setAttribute("align","absmiddle");q.style.marginRight="10px";c==a.drive?(m=mxResources.get("googleDrive"),q.src=IMAGE_PATH+"/google-drive-logo-white.svg"):c==a.dropbox?(m=mxResources.get("dropbox"),q.src=IMAGE_PATH+"/dropbox-logo-white.svg"):c==a.oneDrive?(m=mxResources.get("oneDrive"),q.src=IMAGE_PATH+"/onedrive-logo-white.svg"):c==a.gitHub?(m=mxResources.get("github"),q.src=IMAGE_PATH+"/github-logo-white.svg"):c==a.trello&&(m=mxResources.get("trello"),q.src=IMAGE_PATH+
+"/trello-logo-white.svg");a=document.createElement("p");mxUtils.write(a,mxResources.get("authorizeThisAppIn",[m]));var n=document.createElement("input");n.setAttribute("type","checkbox");m=mxUtils.button(mxResources.get("authorize"),function(){e(n.checked)});m.insertBefore(q,m.firstChild);m.style.marginTop="6px";m.className="geBigButton";g.appendChild(h);g.appendChild(a);g.appendChild(m);b&&(b=document.createElement("p"),b.style.marginTop="20px",b.appendChild(n),h=document.createElement("span"),mxUtils.write(h,
+" "+mxResources.get("rememberMe")),b.appendChild(h),g.appendChild(b),n.checked=!0,n.defaultChecked=!0,mxEvent.addListener(h,"click",function(a){n.checked=!n.checked;mxEvent.consume(a)}));this.container=g},MoreShapesDialog=function(a,c,b){b=null!=b?b:a.sidebar.entries;var e=document.createElement("div"),g=[];if(null!=a.sidebar.customEntries)for(var h=0;h<a.sidebar.customEntries.length;h++){for(var m=a.sidebar.customEntries[h],q={title:a.getResource(m.title),entries:[]},n=0;n<m.entries.length;n++){var d=
+m.entries[n];q.entries.push({id:d.id,title:a.getResource(d.title),desc:a.getResource(d.desc),image:d.preview})}g.push(q)}for(h=0;h<b.length;h++)if(null==a.sidebar.enabledLibraries)g.push(b[h]);else{q={title:b[h].title,entries:[]};for(n=0;n<b[h].entries.length;n++)0<=mxUtils.indexOf(a.sidebar.enabledLibraries,b[h].entries[n].id)&&q.entries.push(b[h].entries[n]);0<q.entries.length&&g.push(q)}b=g;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 f=document.createElement("div"),k=document.createElement("div");f.style.position="absolute";f.style.top="40px";f.style.left="0px";f.style.width="202px";f.style.bottom="60px";f.style.overflow="auto";mxClient.IS_QUIRKS&&(f.style.height="437px",f.style.marginTop="1px");k.style.position="absolute";k.style.left="202px";k.style.right=
+"0px";k.style.top="40px";k.style.bottom="60px";k.style.overflow="auto";k.style.borderLeft="1px solid rgb(211, 211, 211)";k.style.textAlign="center";mxClient.IS_QUIRKS&&(k.style.width=parseInt(n.style.width)-202+"px",k.style.height=f.style.height,k.style.marginTop=f.style.marginTop);var p=null,t=[],u=document.createElement("div");u.style.position="relative";u.style.left="0px";u.style.right="0px";for(h=0;h<b.length;h++)(function(b){var d=u.cloneNode(!1);d.style.fontWeight="bold";d.style.backgroundColor=
+"dark"==uiTheme?"#505759":"#e5e5e5";d.style.padding="6px 0px 6px 20px";mxUtils.write(d,b.title);f.appendChild(d);for(var c=0;c<b.entries.length;c++)(function(b){var d=u.cloneNode(!1);d.style.cursor="pointer";d.style.padding="4px 0px 4px 20px";var l=document.createElement("input");l.setAttribute("type","checkbox");l.checked=a.sidebar.isEntryVisible(b.id);l.defaultChecked=l.checked;d.appendChild(l);mxUtils.write(d," "+b.title);f.appendChild(d);var e=function(a){if(null==a||"INPUT"!=mxEvent.getSource(a).nodeName){k.style.textAlign=
+"center";k.style.padding="0px";k.style.color="";k.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);k.appendChild(f)}null!=b.imageCallback?b.imageCallback(k):null!=b.image?k.innerHTML+='<img border="0" src="'+b.image+'"/>':null==b.desc&&(k.style.padding="20px",k.style.color="rgb(179, 179, 179)",mxUtils.write(k,mxResources.get("noPreview")));
+null!=p&&(p.style.backgroundColor="");p=d;p.style.backgroundColor="dark"==uiTheme?"#505759":"#ebf2f9";null!=a&&mxEvent.consume(a)}};mxEvent.addListener(d,"click",e);mxEvent.addListener(d,"dblclick",function(a){l.checked=!l.checked;mxEvent.consume(a)});t.push(function(){return l.checked?b.id:null});0==h&&0==c&&e()})(b.entries[c])})(b[h]);e.style.padding="30px";e.appendChild(n);e.appendChild(f);e.appendChild(k);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 w=document.createElement("input");w.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)n=document.createElement("span"),n.style.paddingRight="20px",n.appendChild(w),mxUtils.write(n," "+mxResources.get("rememberThisSetting")),w.checked=!0,w.defaultChecked=
!0,mxEvent.addListener(n,"click",function(a){mxEvent.getSource(a)!=w&&(w.checked=!w.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=[],d=0;d<t.length;d++){var f=t[d].apply(this,arguments);null!=f&&b.push(f)}a.sidebar.showEntries(b.join(";"),w.checked,!0)});c.className=
-"geBtn gePrimaryBtn"}else{var y=document.createElement("table"),n=document.createElement("tbody");e.style.height="100%";e.style.overflow="auto";p=document.createElement("tr");y.style.width="100%";c=document.createElement("td");var g=document.createElement("td"),m=document.createElement("td"),k=mxUtils.bind(this,function(b,d,f){var l=document.createElement("input");l.type="checkbox";y.appendChild(l);l.checked=a.sidebar.isEntryVisible(f);var c=document.createElement("span");mxUtils.write(c,d);d=document.createElement("div");
-d.style.display="block";d.appendChild(l);d.appendChild(c);mxEvent.addListener(c,"click",function(a){l.checked=!l.checked;mxEvent.consume(a)});b.appendChild(d);return function(){return l.checked?f:null}});p.appendChild(c);p.appendChild(g);p.appendChild(m);n.appendChild(p);y.appendChild(n);for(var t=[],v=0,h=0;h<b.length;h++)for(n=0;n<b[h].entries.length;n++)v++;for(var z=[c,g,m],C=0,h=0;h<b.length;h++)(function(a){for(var b=0;b<a.entries.length;b++){var d=a.entries[b];t.push(k(z[Math.floor(C/(v/3))],
-d.title,d.id));C++}})(b[h]);e.appendChild(y);b=document.createElement("div");b.style.marginTop="18px";b.style.textAlign="center";w=document.createElement("input");isLocalStorage&&(w.setAttribute("type","checkbox"),w.checked=!0,w.defaultChecked=!0,b.appendChild(w),n=document.createElement("span"),mxUtils.write(n," "+mxResources.get("rememberThisSetting")),b.appendChild(n),mxEvent.addListener(n,"click",function(a){w.checked=!w.checked;mxEvent.consume(a)}));e.appendChild(b);n=mxUtils.button(mxResources.get("cancel"),
+"geBtn gePrimaryBtn"}else{var y=document.createElement("table"),n=document.createElement("tbody");e.style.height="100%";e.style.overflow="auto";q=document.createElement("tr");y.style.width="100%";c=document.createElement("td");var g=document.createElement("td"),m=document.createElement("td"),l=mxUtils.bind(this,function(b,d,f){var k=document.createElement("input");k.type="checkbox";y.appendChild(k);k.checked=a.sidebar.isEntryVisible(f);var c=document.createElement("span");mxUtils.write(c,d);d=document.createElement("div");
+d.style.display="block";d.appendChild(k);d.appendChild(c);mxEvent.addListener(c,"click",function(a){k.checked=!k.checked;mxEvent.consume(a)});b.appendChild(d);return function(){return k.checked?f:null}});q.appendChild(c);q.appendChild(g);q.appendChild(m);n.appendChild(q);y.appendChild(n);for(var t=[],v=0,h=0;h<b.length;h++)for(n=0;n<b[h].entries.length;n++)v++;for(var z=[c,g,m],D=0,h=0;h<b.length;h++)(function(a){for(var b=0;b<a.entries.length;b++){var d=a.entries[b];t.push(l(z[Math.floor(D/(v/3))],
+d.title,d.id));D++}})(b[h]);e.appendChild(y);b=document.createElement("div");b.style.marginTop="18px";b.style.textAlign="center";w=document.createElement("input");isLocalStorage&&(w.setAttribute("type","checkbox"),w.checked=!0,w.defaultChecked=!0,b.appendChild(w),n=document.createElement("span"),mxUtils.write(n," "+mxResources.get("rememberThisSetting")),b.appendChild(n),mxEvent.addListener(n,"click",function(a){w.checked=!w.checked;mxEvent.consume(a)}));e.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"],d=0;d<t.length;d++){var f=t[d].apply(this,arguments);null!=f&&b.push(f)}a.sidebar.showEntries(0<b.length?b.join(";"):"",w.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));e.appendChild(b);this.container=
-e},PluginsDialog=function(a){function c(){if(0==g.length)e.innerHTML=mxResources.get("noPlugins");else{e.innerHTML="";for(var b=0;b<g.length;b++){var d=document.createElement("span");d.style.whiteSpace="nowrap";var q=document.createElement("span");q.className="geSprite geSprite-delete";q.style.position="relative";q.style.cursor="pointer";q.style.top="5px";q.style.marginRight="4px";q.style.display="inline-block";d.appendChild(q);mxUtils.write(d,g[b]);e.appendChild(d);mxUtils.br(e);mxEvent.addListener(q,
+e},PluginsDialog=function(a){function c(){if(0==g.length)e.innerHTML=mxResources.get("noPlugins");else{e.innerHTML="";for(var b=0;b<g.length;b++){var d=document.createElement("span");d.style.whiteSpace="nowrap";var p=document.createElement("span");p.className="geSprite geSprite-delete";p.style.position="relative";p.style.cursor="pointer";p.style.top="5px";p.style.marginRight="4px";p.style.display="inline-block";d.appendChild(p);mxUtils.write(d,g[b]);e.appendChild(d);mxUtils.br(e);mxEvent.addListener(p,
"click",function(b){return function(){a.confirm(window.parent.mxResources.get("delete")+' "'+g[b]+'"?',function(){g.splice(b,1);c()})}}(b))}}}var b=document.createElement("div"),e=document.createElement("div");e.style.height="120px";e.style.overflow="auto";var g=mxSettings.getPlugins().slice();b.appendChild(e);c();var h=mxUtils.button(mxResources.get("add"),function(){var b="",d=urlParams.p;if(null!=d&&0<d.length){for(var e=d.split(";"),d=0;d<e.length;d++){var t=App.pluginRegistry[e[d]];null!=t&&
(b+=t+";")}";"==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){e=a.split(";");for(a=0;a<e.length;a++){var b=e[a],d=App.pluginRegistry[b];null!=d&&(b=d);0<b.length&&0>mxUtils.indexOf(g,b)&&g.push(b)}c()}},mxResources.get("enterValue")+" ("+mxResources.get("url")+")");a.showDialog(b.container,300,80,!0,!0);b.init()});h.className="geBtn";var m=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});
-m.className="geBtn";var p=mxUtils.button(mxResources.get("apply"),function(){mxSettings.setPlugins(g);mxSettings.save();a.hideDialog();a.alert(mxResources.get("restartForChangeRequired"))});p.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 d=document.createElement("div");d.style.marginTop="14px";d.style.textAlign=
-"right";a.editor.cancelFirst?(d.appendChild(m),d.appendChild(n),d.appendChild(h),d.appendChild(p)):(d.appendChild(n),d.appendChild(h),d.appendChild(p),d.appendChild(m));b.appendChild(d);this.container=b},CropImageDialog=function(a,c,b){var e=document.createElement("div"),g=document.createElement("table"),h=document.createElement("tbody"),m=document.createElement("tr"),p=document.createElement("td");p.style.whiteSpace="nowrap";p.setAttribute("colspan","2");mxUtils.write(p,mxResources.get("loading")+
-"...");m.appendChild(p);h.appendChild(m);var m=document.createElement("tr"),n=document.createElement("td"),d=document.createElement("td");g.style.paddingLeft="6px";mxUtils.write(n,mxResources.get("left")+":");var f=document.createElement("input");f.setAttribute("type","text");f.style.width="100px";f.value="0";this.init=function(){f.focus();f.select()};d.appendChild(f);m.appendChild(n);m.appendChild(d);h.appendChild(m);m=document.createElement("tr");n=document.createElement("td");d=document.createElement("td");
-mxUtils.write(n,mxResources.get("top")+":");var l=document.createElement("input");l.setAttribute("type","text");l.style.width="100px";l.value="0";d.appendChild(l);m.appendChild(n);m.appendChild(d);h.appendChild(m);m=document.createElement("tr");n=document.createElement("td");d=document.createElement("td");mxUtils.write(n,mxResources.get("right")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.width="100px";q.value="0";d.appendChild(q);m.appendChild(n);m.appendChild(d);
+m.className="geBtn";var q=mxUtils.button(mxResources.get("apply"),function(){mxSettings.setPlugins(g);mxSettings.save();a.hideDialog();a.alert(mxResources.get("restartForChangeRequired"))});q.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 d=document.createElement("div");d.style.marginTop="14px";d.style.textAlign=
+"right";a.editor.cancelFirst?(d.appendChild(m),d.appendChild(n),d.appendChild(h),d.appendChild(q)):(d.appendChild(n),d.appendChild(h),d.appendChild(q),d.appendChild(m));b.appendChild(d);this.container=b},CropImageDialog=function(a,c,b){var e=document.createElement("div"),g=document.createElement("table"),h=document.createElement("tbody"),m=document.createElement("tr"),q=document.createElement("td");q.style.whiteSpace="nowrap";q.setAttribute("colspan","2");mxUtils.write(q,mxResources.get("loading")+
+"...");m.appendChild(q);h.appendChild(m);var m=document.createElement("tr"),n=document.createElement("td"),d=document.createElement("td");g.style.paddingLeft="6px";mxUtils.write(n,mxResources.get("left")+":");var f=document.createElement("input");f.setAttribute("type","text");f.style.width="100px";f.value="0";this.init=function(){f.focus();f.select()};d.appendChild(f);m.appendChild(n);m.appendChild(d);h.appendChild(m);m=document.createElement("tr");n=document.createElement("td");d=document.createElement("td");
+mxUtils.write(n,mxResources.get("top")+":");var k=document.createElement("input");k.setAttribute("type","text");k.style.width="100px";k.value="0";d.appendChild(k);m.appendChild(n);m.appendChild(d);h.appendChild(m);m=document.createElement("tr");n=document.createElement("td");d=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";d.appendChild(p);m.appendChild(n);m.appendChild(d);
h.appendChild(m);m=document.createElement("tr");n=document.createElement("td");d=document.createElement("td");mxUtils.write(n,mxResources.get("bottom")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.width="100px";t.value="0";d.appendChild(t);m.appendChild(n);m.appendChild(d);h.appendChild(m);m=document.createElement("tr");n=document.createElement("td");d=document.createElement("td");mxUtils.write(n,mxResources.get("circle")+":");m.appendChild(n);var u=document.createElement("input");
-u.setAttribute("type","checkbox");d.appendChild(u);m.appendChild(d);h.appendChild(m);g.appendChild(h);e.appendChild(g);var g=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()}),w=new Image,y=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var d=document.createElement("canvas"),c=d.getContext("2d"),e=w.width,g=w.height,h=parseInt(f.value),m=parseInt(l.value),e=Math.max(1,e-h-parseInt(q.value)),g=Math.max(1,g-m-parseInt(t.value));d.width=e;d.height=g;u.checked&&(c.fillStyle=
-"#000000",c.arc(e/2,g/2,Math.min(e/2,g/2),0,2*Math.PI),c.fill(),c.globalCompositeOperation="source-in");c.drawImage(w,h,m,e,g,0,0,e,g);b(d.toDataURL())});y.setAttribute("disabled","disabled");w.onload=function(){y.removeAttribute("disabled");p.innerHTML="";mxUtils.write(p,mxResources.get("width")+": "+w.width+" "+mxResources.get("height")+": "+w.height)};w.src=c;mxEvent.addListener(e,"keypress",function(a){13==a.keyCode&&y.click()});c=document.createElement("div");c.style.marginTop="20px";c.style.textAlign=
-"right";a.editor.cancelFirst?(c.appendChild(g),c.appendChild(y)):(c.appendChild(y),c.appendChild(g));e.appendChild(c);this.container=e},EditGeometryDialog=function(a,c){var b=a.editor.graph,e=1==c.length?b.getCellGeometry(c[0]):null,g=document.createElement("div"),h=document.createElement("table"),m=document.createElement("tbody"),p=document.createElement("tr"),n=document.createElement("td"),d=document.createElement("td");h.style.paddingLeft="6px";mxUtils.write(n,mxResources.get("relative")+":");
-var f=document.createElement("input");f.setAttribute("type","checkbox");null!=e&&e.relative&&(f.setAttribute("checked","checked"),f.defaultChecked=!0);this.init=function(){f.focus()};d.appendChild(f);p.appendChild(n);p.appendChild(d);m.appendChild(p);p=document.createElement("tr");n=document.createElement("td");d=document.createElement("td");mxUtils.write(n,mxResources.get("left")+":");var l=document.createElement("input");l.setAttribute("type","text");l.style.width="100px";l.value=null!=e?e.x:"";
-d.appendChild(l);p.appendChild(n);p.appendChild(d);m.appendChild(p);p=document.createElement("tr");n=document.createElement("td");d=document.createElement("td");mxUtils.write(n,mxResources.get("top")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.width="100px";q.value=null!=e?e.y:"";d.appendChild(q);p.appendChild(n);p.appendChild(d);m.appendChild(p);p=document.createElement("tr");n=document.createElement("td");d=document.createElement("td");mxUtils.write(n,mxResources.get("dx")+
-":");var t=document.createElement("input");t.setAttribute("type","text");t.style.width="100px";t.value=null!=e&&null!=e.offset?e.offset.x:"";d.appendChild(t);p.appendChild(n);p.appendChild(d);m.appendChild(p);p=document.createElement("tr");n=document.createElement("td");d=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!=e&&null!=e.offset?e.offset.y:"";d.appendChild(u);p.appendChild(n);
-p.appendChild(d);m.appendChild(p);p=document.createElement("tr");n=document.createElement("td");d=document.createElement("td");mxUtils.write(n,mxResources.get("width")+":");var w=document.createElement("input");w.setAttribute("type","text");w.style.width="100px";w.value=null!=e?e.width:"";d.appendChild(w);p.appendChild(n);p.appendChild(d);m.appendChild(p);p=document.createElement("tr");n=document.createElement("td");d=document.createElement("td");mxUtils.write(n,mxResources.get("height")+":");var y=
-document.createElement("input");y.setAttribute("type","text");y.style.width="100px";y.value=null!=e?e.height:"";d.appendChild(y);p.appendChild(n);p.appendChild(d);m.appendChild(p);p=document.createElement("tr");n=document.createElement("td");d=document.createElement("td");mxUtils.write(n,mxResources.get("rotation")+":");var k=document.createElement("input");k.setAttribute("type","text");k.style.width="100px";k.value=1==c.length?mxUtils.getValue(b.getCellStyle(c[0]),mxConstants.STYLE_ROTATION,0):"";
-d.appendChild(k);p.appendChild(n);p.appendChild(d);m.appendChild(p);h.appendChild(m);g.appendChild(h);e=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});e.className="geBtn";var v=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();b.getModel().beginUpdate();try{for(var d=0;d<c.length;d++){var e=b.getCellGeometry(c[d]);null!=e&&(e=e.clone(),b.isCellMovable(c[d])&&(e.relative=f.checked,0<mxUtils.trim(l.value).length&&(e.x=Number(l.value)),0<mxUtils.trim(q.value).length&&
-(e.y=Number(q.value)),0<mxUtils.trim(t.value).length&&(null==e.offset&&(e.offset=new mxPoint),e.offset.x=Number(t.value)),0<mxUtils.trim(u.value).length&&(null==e.offset&&(e.offset=new mxPoint),e.offset.y=Number(u.value))),b.isCellResizable(c[d])&&(0<mxUtils.trim(w.value).length&&(e.width=Number(w.value)),0<mxUtils.trim(y.value).length&&(e.height=Number(y.value))),b.getModel().setGeometry(c[d],e));0<mxUtils.trim(k.value).length&&b.setCellStyles(mxConstants.STYLE_ROTATION,Number(k.value),[c[d]])}}finally{b.getModel().endUpdate()}});
+u.setAttribute("type","checkbox");d.appendChild(u);m.appendChild(d);h.appendChild(m);g.appendChild(h);e.appendChild(g);var g=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()}),w=new Image,y=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var d=document.createElement("canvas"),c=d.getContext("2d"),e=w.width,g=w.height,h=parseInt(f.value),m=parseInt(k.value),e=Math.max(1,e-h-parseInt(p.value)),g=Math.max(1,g-m-parseInt(t.value));d.width=e;d.height=g;u.checked&&(c.fillStyle=
+"#000000",c.arc(e/2,g/2,Math.min(e/2,g/2),0,2*Math.PI),c.fill(),c.globalCompositeOperation="source-in");c.drawImage(w,h,m,e,g,0,0,e,g);b(d.toDataURL())});y.setAttribute("disabled","disabled");w.onload=function(){y.removeAttribute("disabled");q.innerHTML="";mxUtils.write(q,mxResources.get("width")+": "+w.width+" "+mxResources.get("height")+": "+w.height)};w.src=c;mxEvent.addListener(e,"keypress",function(a){13==a.keyCode&&y.click()});c=document.createElement("div");c.style.marginTop="20px";c.style.textAlign=
+"right";a.editor.cancelFirst?(c.appendChild(g),c.appendChild(y)):(c.appendChild(y),c.appendChild(g));e.appendChild(c);this.container=e},EditGeometryDialog=function(a,c){var b=a.editor.graph,e=1==c.length?b.getCellGeometry(c[0]):null,g=document.createElement("div"),h=document.createElement("table"),m=document.createElement("tbody"),q=document.createElement("tr"),n=document.createElement("td"),d=document.createElement("td");h.style.paddingLeft="6px";mxUtils.write(n,mxResources.get("relative")+":");
+var f=document.createElement("input");f.setAttribute("type","checkbox");null!=e&&e.relative&&(f.setAttribute("checked","checked"),f.defaultChecked=!0);this.init=function(){f.focus()};d.appendChild(f);q.appendChild(n);q.appendChild(d);m.appendChild(q);q=document.createElement("tr");n=document.createElement("td");d=document.createElement("td");mxUtils.write(n,mxResources.get("left")+":");var k=document.createElement("input");k.setAttribute("type","text");k.style.width="100px";k.value=null!=e?e.x:"";
+d.appendChild(k);q.appendChild(n);q.appendChild(d);m.appendChild(q);q=document.createElement("tr");n=document.createElement("td");d=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!=e?e.y:"";d.appendChild(p);q.appendChild(n);q.appendChild(d);m.appendChild(q);q=document.createElement("tr");n=document.createElement("td");d=document.createElement("td");mxUtils.write(n,mxResources.get("dx")+
+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.width="100px";t.value=null!=e&&null!=e.offset?e.offset.x:"";d.appendChild(t);q.appendChild(n);q.appendChild(d);m.appendChild(q);q=document.createElement("tr");n=document.createElement("td");d=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!=e&&null!=e.offset?e.offset.y:"";d.appendChild(u);q.appendChild(n);
+q.appendChild(d);m.appendChild(q);q=document.createElement("tr");n=document.createElement("td");d=document.createElement("td");mxUtils.write(n,mxResources.get("width")+":");var w=document.createElement("input");w.setAttribute("type","text");w.style.width="100px";w.value=null!=e?e.width:"";d.appendChild(w);q.appendChild(n);q.appendChild(d);m.appendChild(q);q=document.createElement("tr");n=document.createElement("td");d=document.createElement("td");mxUtils.write(n,mxResources.get("height")+":");var y=
+document.createElement("input");y.setAttribute("type","text");y.style.width="100px";y.value=null!=e?e.height:"";d.appendChild(y);q.appendChild(n);q.appendChild(d);m.appendChild(q);q=document.createElement("tr");n=document.createElement("td");d=document.createElement("td");mxUtils.write(n,mxResources.get("rotation")+":");var l=document.createElement("input");l.setAttribute("type","text");l.style.width="100px";l.value=1==c.length?mxUtils.getValue(b.getCellStyle(c[0]),mxConstants.STYLE_ROTATION,0):"";
+d.appendChild(l);q.appendChild(n);q.appendChild(d);m.appendChild(q);h.appendChild(m);g.appendChild(h);e=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});e.className="geBtn";var v=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();b.getModel().beginUpdate();try{for(var d=0;d<c.length;d++){var e=b.getCellGeometry(c[d]);null!=e&&(e=e.clone(),b.isCellMovable(c[d])&&(e.relative=f.checked,0<mxUtils.trim(k.value).length&&(e.x=Number(k.value)),0<mxUtils.trim(p.value).length&&
+(e.y=Number(p.value)),0<mxUtils.trim(t.value).length&&(null==e.offset&&(e.offset=new mxPoint),e.offset.x=Number(t.value)),0<mxUtils.trim(u.value).length&&(null==e.offset&&(e.offset=new mxPoint),e.offset.y=Number(u.value))),b.isCellResizable(c[d])&&(0<mxUtils.trim(w.value).length&&(e.width=Number(w.value)),0<mxUtils.trim(y.value).length&&(e.height=Number(y.value))),b.getModel().setGeometry(c[d],e));0<mxUtils.trim(l.value).length&&b.setCellStyles(mxConstants.STYLE_ROTATION,Number(l.value),[c[d]])}}finally{b.getModel().endUpdate()}});
v.className="geBtn gePrimaryBtn";mxEvent.addListener(g,"keypress",function(a){13==a.keyCode&&v.click()});h=document.createElement("div");h.style.marginTop="20px";h.style.textAlign="right";a.editor.cancelFirst?(h.appendChild(e),h.appendChild(v)):(h.appendChild(v),h.appendChild(e));g.appendChild(h);this.container=g},LibraryDialog=function(a,c,b,e,g,h){function m(a){for(a=document.elementFromPoint(a.clientX,a.clientY);null!=a&&a.parentNode!=t;)a=a.parentNode;var b=null;if(null!=a)for(var d=t.firstChild,
-b=0;null!=d&&d!=a;)d=d.nextSibling,b++;return b}function p(b,d,l,c,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(){D.innerHTML="";D.style.cursor="pointer";D.style.whiteSpace="nowrap";D.style.textOverflow="ellipsis";mxUtils.write(D,null!=K.title&&0<K.title.length?K.title:mxResources.get("untitled"));D.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(l){w[b]=null;for(var c=0;c<f.length;c++)if(null!=f[c].data&&f[c].data==b||null!=f[c].xml&&null!=d&&f[c].xml==d.xml){f.splice(c,1);break}G.parentNode.removeChild(a);0==f.length&&
-(t.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",u.style.display="");mxEvent.consume(l)});mxEvent.addListener(I,"dblclick",function(a){mxEvent.consume(a)})})(G,b,q);G.appendChild(I);G.style.marginBottom="30px";var D=document.createElement("div");D.style.position="absolute";D.style.boxSizing="border-box";D.style.bottom="-18px";D.style.left="10px";D.style.right="10px";D.style.backgroundColor="#ffffff";D.style.overflow="hidden";D.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(D,"keydown",function(a){13==a.keyCode&&null!=v&&(v(),v=null,mxEvent.consume(a))});B();G.appendChild(D);mxEvent.addListener(D,"mousedown",function(a){"true"!=D.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"!=D.getAttribute("contentEditable")){null!=v&&(v(),v=null);if(null==K.title||0==K.title.length)D.innerHTML="";D.style.textOverflow="";D.style.whiteSpace="";D.style.cursor="text";D.style.color="";D.setAttribute("contentEditable","true");D.focus();document.execCommand("selectAll",!1,null);v=function(){D.removeAttribute("contentEditable");D.style.cursor=
-"pointer";K.title=D.innerHTML;B()};mxEvent.consume(b)}};mxEvent.addListener(D,"click",F);mxEvent.addListener(G,"dblclick",F);t.appendChild(G);mxEvent.addListener(G,"dragstart",function(a){null==b&&null!=q&&(I.style.visibility="hidden",D.style.visibility="hidden");mxClient.IS_FF&&null!=q.xml&&a.dataTransfer.setData("Text",q.xml);y=m(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=
-"";D.style.visibility=""},0)});mxEvent.addListener(G,"dragend",function(a){"hidden"==I.style.visibility&&(I.style.visibility="",D.style.visibility="");y=null;mxUtils.setOpacity(G,100);mxUtils.setPrefixedStyle(G.style,"transform",null)})}else C||(C=!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}
-function n(a){a.dataTransfer.dropEffect=null!=y?"move":"copy";a.stopPropagation();a.preventDefault()}function d(b){b.stopPropagation();b.preventDefault();C=!1;k=m(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 l=document.createElement("div");l.style.whiteSpace="nowrap";l.style.height="40px";b.appendChild(l);mxUtils.write(l,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)};l.appendChild(q);var t=document.createElement("div");t.style.borderWidth=
+b=0;null!=d&&d!=a;)d=d.nextSibling,b++;return b}function q(b,d,k,c,l,e,p,g,h){try{if(null==d||"image/"==d.substring(0,6))if(null==b&&null!=p||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=l,n=e;if(l>a.maxImageSize||e>
+a.maxImageSize){var A=Math.min(1,Math.min(a.maxImageSize/Math.max(1,l)),a.maxImageSize/Math.max(1,e));l*=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!=p){var F=a.stringToCells(a.editor.graph.decompress(p.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(k){w[b]=null;for(var c=0;c<f.length;c++)if(null!=f[c].data&&f[c].data==b||null!=f[c].xml&&null!=d&&f[c].xml==d.xml){f.splice(c,1);break}G.parentNode.removeChild(a);0==f.length&&
+(t.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",u.style.display="");mxEvent.consume(k)});mxEvent.addListener(I,"dblclick",function(a){mxEvent.consume(a)})})(G,b,p);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:l,h:e,title:h},null!=g&&(K.aspect=g),w[b]=E,f.push(K)):null!=p&&(p.aspect="fixed",f.push(p),K=p);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!=p&&(I.style.visibility="hidden",C.style.visibility="hidden");mxClient.IS_FF&&null!=p.xml&&a.dataTransfer.setData("Text",p.xml);y=m(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{l=!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?q(null,null,0,0,0,0,n[M]):q(n[M].data,null,0,0,n[M].w,n[M].h,null,"fixed",n[M].title);l=!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);q(null,null,0,0,0,0,{xml:n,w:V.width,h:V.height})}l=!0}}catch(J){}l||(a.spinner.stop(),a.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(J){}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;l=m(b);if(null!=y)null!=l&&l<t.children.length?(f.splice(l>y?l-1:l,0,f.splice(y,1)[0]),t.insertBefore(t.children[y],t.children[l])):(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){q(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 k=document.createElement("div");k.style.whiteSpace="nowrap";k.style.height="40px";b.appendChild(k);mxUtils.write(k,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==g||g.isRenamable()||p.setAttribute("disabled","true");this.init=function(){if(null==g||g.isRenamable())p.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?p.select():document.execCommand("selectAll",!1,null)};k.appendChild(p);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,C=!1;if(null!=e)for(c=0;c<e.length;c++)l=e[c],p(l.data,null,0,0,l.w,l.h,l,l.aspect,l.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,l,c,k,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,l,c,k,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,l,c,k,e,q,"fixed",mxEvent.isAltDown(b)?null:q.substring(0,q.lastIndexOf(".")).replace(/_/g," ")),t.scrollTop=t.scrollHeight))})):(p(d,f,l,c,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);l=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")});l.setAttribute("id","btnDownload");l.className="geBtn";e.appendChild(l);var x=document.createElement("input");x.setAttribute("multiple","multiple");x.setAttribute("type","file");null==document.documentMode&&(mxEvent.addListener(x,"change",function(b){C=!1;a.importFiles(x.files,0,0,a.maxImageSize,function(a,d,f,l,c,k,e,q,t){B(b)(a,d,f,l,c,k,e,q,t);x.value=""});t.scrollTop=t.scrollHeight}),l=mxUtils.button(mxResources.get("import"),
-function(){null!=v&&(v(),v=null);x.click()}),l.setAttribute("id","btnAddImage"),l.className="geBtn",e.appendChild(l));l=mxUtils.button(mxResources.get("addImageUrl"),function(){null!=v&&(v(),v=null);a.showImageDialog(mxResources.get("addImageUrl"),"",function(a,b,d){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))}p(a,null,0,0,b,d);t.scrollTop=t.scrollHeight}})});l.setAttribute("id","btnAddImageUrl");l.className="geBtn";
-e.appendChild(l);this.saveBtnClickHandler=function(b,d,f,l){a.saveLibrary(b,d,f,l)};l=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(){null!=v&&(v(),v=null);this.saveBtnClickHandler(q.value,f,g,h)}));l.setAttribute("id","btnSave");l.className="geBtn gePrimaryBtn";e.appendChild(l);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,m,p=document.createElement("table"),n=document.createElement("tbody");
-p.style.cellPadding="4px";h=document.createElement("tr");m=document.createElement("td");m.setAttribute("colspan","2");m.style.fontSize="10pt";mxUtils.write(m,b);h.appendChild(m);n.appendChild(h);h=document.createElement("tr");m=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};m.appendChild(d);h.appendChild(m);m=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);m.appendChild(b);var f=new Graph(b);f.setEnabled(!1);var l=a.editor.graph.cloneCell(c);f.addCells([l]);b=f.view.getState(l);var q="";null!=b.shape&&null!=b.shape.stencil&&(q=mxUtils.getPrettyXml(b.shape.stencil.desc));mxUtils.write(d,q||"");b=f.getGraphBounds();
+mxUtils.write(u,mxResources.get("dragImagesHere"));b.appendChild(u);var w={},y=null,l=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++)k=e[c],q(k.data,null,0,0,k.w,k.h,k,k.aspect,k.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,k,c,l,e,p,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();q(d,f,k,c,l,e,p,"fixed",mxEvent.isAltDown(b)?null:p.substring(0,p.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&&(q(d.responseText,f,k,c,l,e,p,"fixed",mxEvent.isAltDown(b)?null:p.substring(0,p.lastIndexOf(".")).replace(/_/g," ")),t.scrollTop=t.scrollHeight))})):(q(d,f,k,c,l,e,p,"fixed",mxEvent.isAltDown(b)?null:p.substring(0,p.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);k=mxUtils.button(mxResources.get("export"),function(){var b=a.createLibraryDataFromImages(f),d=p.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")});k.setAttribute("id","btnDownload");k.className="geBtn";e.appendChild(k);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,k,c,l,e,p,t){B(b)(a,d,f,k,c,l,e,p,t);x.value=""});t.scrollTop=t.scrollHeight}),k=mxUtils.button(mxResources.get("import"),
+function(){null!=v&&(v(),v=null);x.click()}),k.setAttribute("id","btnAddImage"),k.className="geBtn",e.appendChild(k));k=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))}q(a,null,0,0,b,d);t.scrollTop=t.scrollHeight}})});k.setAttribute("id","btnAddImageUrl");k.className="geBtn";
+e.appendChild(k);this.saveBtnClickHandler=function(b,d,f,k){a.saveLibrary(b,d,f,k)};k=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(){null!=v&&(v(),v=null);this.saveBtnClickHandler(p.value,f,g,h)}));k.setAttribute("id","btnSave");k.className="geBtn gePrimaryBtn";e.appendChild(k);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,m,q=document.createElement("table"),n=document.createElement("tbody");
+q.style.cellPadding="4px";h=document.createElement("tr");m=document.createElement("td");m.setAttribute("colspan","2");m.style.fontSize="10pt";mxUtils.write(m,b);h.appendChild(m);n.appendChild(h);h=document.createElement("tr");m=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};m.appendChild(d);h.appendChild(m);m=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);m.appendChild(b);var f=new Graph(b);f.setEnabled(!1);var k=a.editor.graph.cloneCell(c);f.addCells([k]);b=f.view.getState(k);var p="";null!=b.shape&&null!=b.shape.stencil&&(p=mxUtils.getPrettyXml(b.shape.stencil.desc));mxUtils.write(d,p||"");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(m);n.appendChild(h);h=document.createElement("tr");m=document.createElement("td");m.setAttribute("colspan","2");m.style.paddingTop="2px";m.style.whiteSpace="nowrap";m.setAttribute("align","right");g=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});g.className="geBtn";a.editor.cancelFirst&&m.appendChild(g);a.isOffline()||(b=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/support/solutions/articles/16000052874")}),
-b.className="geBtn",m.appendChild(b));var t=function(b,f,l){var c=d.value,e=mxUtils.parseXml(c),c=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(l&&a.hideDialog(),e=!b.model.contains(f),!l||e||c!=q){c=a.editor.graph.compress(c);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("+c+")",[f])}catch(C){throw C;}finally{b.getModel().endUpdate()}e&&b.setSelectionCell(f)}};b=mxUtils.button(mxResources.get("preview"),function(){t(f,l,!1)});b.className="geBtn";m.appendChild(b);b=mxUtils.button(mxResources.get("apply"),function(){t(a.editor.graph,c,!0)});b.className="geBtn gePrimaryBtn";m.appendChild(b);a.editor.cancelFirst||m.appendChild(g);h.appendChild(m);n.appendChild(h);p.appendChild(n);this.container=
-p},CustomDialog=function(a,c,b,e,g,h,m,p){var n=document.createElement("div");n.appendChild(c);c=document.createElement("div");c.style.marginTop="16px";c.style.textAlign="center";null!=m&&c.appendChild(m);m=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=e&&e()});m.className="geBtn";p&&(m.style.display="none");a.editor.cancelFirst&&c.appendChild(m);a.isOffline()||null==h||(p=mxUtils.button(mxResources.get("help"),function(){a.openLink(h)}),p.className="geBtn",c.appendChild(p));
+b.className="geBtn",m.appendChild(b));var t=function(b,f,k){var c=d.value,e=mxUtils.parseXml(c),c=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(k&&a.hideDialog(),e=!b.model.contains(f),!k||e||c!=p){c=a.editor.graph.compress(c);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("+c+")",[f])}catch(D){throw D;}finally{b.getModel().endUpdate()}e&&b.setSelectionCell(f)}};b=mxUtils.button(mxResources.get("preview"),function(){t(f,k,!1)});b.className="geBtn";m.appendChild(b);b=mxUtils.button(mxResources.get("apply"),function(){t(a.editor.graph,c,!0)});b.className="geBtn gePrimaryBtn";m.appendChild(b);a.editor.cancelFirst||m.appendChild(g);h.appendChild(m);n.appendChild(h);q.appendChild(n);this.container=
+q},CustomDialog=function(a,c,b,e,g,h,m,q){var n=document.createElement("div");n.appendChild(c);c=document.createElement("div");c.style.marginTop="16px";c.style.textAlign="center";null!=m&&c.appendChild(m);m=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=e&&e()});m.className="geBtn";q&&(m.style.display="none");a.editor.cancelFirst&&c.appendChild(m);a.isOffline()||null==h||(q=mxUtils.button(mxResources.get("help"),function(){a.openLink(h)}),q.className="geBtn",c.appendChild(q));
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(m);n.appendChild(c);this.cancelBtn=m;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")+
'</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,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,m,p,n,d){function f(){null!=D&&(D.style.fontWeight="normal",D.style.textDecoration="none",D=null)}function l(a,b,d,f,l,c,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("."+l).src="/images/"+
-c+".svg";return!0}function q(a){function b(a){Z.removeChild(f);B.removeChild(d);Z.scrollTop=c}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 l=document.createElement("img");l.src=a;f.appendChild(l);a=document.createElement("img");a.src="/images/close.png";a.className="geTempDlgPreviewCloseBtn";
-a.setAttribute("title",mxResources.get("close"));f.appendChild(a);var c=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(" "),l=0;l<f.length;l++)if(-1<f[l].indexOf("Active")){f.splice(l,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,m,q,n,d){function f(){null!=C&&(C.style.fontWeight="normal",C.style.textDecoration="none",C=null)}function k(a,b,d,f,c,k,l){if(-1<a.className.indexOf("geTempDlgRadioBtnActive"))return!1;a.className+=" geTempDlgRadioBtnActive";B.querySelector(".geTempDlgRadioBtn[data-id="+f+"]").className="geTempDlgRadioBtn "+(l?"geTempDlgRadioBtnLarge":"geTempDlgRadioBtnSmall");B.querySelector("."+b).src="/images/"+d+"-sel.svg";B.querySelector("."+c).src="/images/"+
+k+".svg";return!0}function p(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")}
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 l=null;if(d){l=document.createElement("table");l.className="geTempDlgDiagramsListGrid";var c=document.createElement("tr"),k=document.createElement("th");k.style.width="50%";k.innerHTML=mxResources.get("diagram",null,"Diagram");c.appendChild(k);k=document.createElement("th");k.style.width="25%";k.innerHTML=mxResources.get("changedBy",null,"Changed By");c.appendChild(k);
-k=document.createElement("th");k.style.width="25%";k.innerHTML=mxResources.get("lastModifiedOn",null,"Last modified on");c.appendChild(k);l.appendChild(c);P.appendChild(l)}for(c=0;c<a.length;c++){a[c].isExternal=!b;var e=a[c].url,k=mxUtils.htmlEntities(a[c].title),g=a[c].tooltip||a[c].title,z=a[c].imgUrl,v=mxUtils.htmlEntities(a[c].changedBy||""),h=mxUtils.htmlEntities(a[c].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 C=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);C.appendChild(z);z=document.createElement("td");z.innerHTML=v;C.appendChild(z);z=document.createElement("td");z.innerHTML=h;C.appendChild(z);
-l.appendChild(C);null==F&&(f(),t(C,"geTempDlgDiagramsListGridActive",a[c]));(function(a,b){mxEvent.addListener(C,"click",function(){F!=b&&(f(),t(b,"geTempDlgDiagramsListGridActive",a))});mxEvent.addListener(C,"dblclick",u);mxEvent.addListener(B,"click",function(){q(a)})})(a[c],C)}else{var m=document.createElement("div");m.className="geTempDlgDiagramTile";m.setAttribute("title",g);null==F&&(f(),t(m,"geTempDlgDiagramTileActive",a[c]));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);m.appendChild(v);v=document.createElement("div");v.className="geTempDlgDiagramTileLbl";v.innerHTML=null!=k?k:"";m.appendChild(v);B=document.createElement("img");B.src="/images/icon-search.svg";B.className="geTempDlgDiagramPreviewBtn";
-B.setAttribute("title",mxResources.get("preview"));m.appendChild(B);(function(a,b){mxEvent.addListener(m,"click",function(){F!=b&&(f(),t(b,"geTempDlgDiagramTileActive",a))});mxEvent.addListener(m,"dblclick",u);mxEvent.addListener(B,"click",function(){q(a)})})(a[c],m);P.appendChild(m)}}}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 l=document.createElement("div"),k=mxResources.get(c.title);null==k&&(k=c.title.substring(0,1).toUpperCase()+
-c.title.substring(1));l.className="geTempDlgNewDiagramCatItem";l.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(l,"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);l.appendChild(e);e=document.createElement("div");e.className="geTempDlgNewDiagramCatItemLbl";
-e.innerHTML=k;l.appendChild(e);Q.appendChild(l);(function(a,b){mxEvent.addListener(l,"click",function(){F!=b&&(L.innerHTML=mxResources.get("create"),w(),t(b,"geTempDlgNewDiagramCatItemActive",a))});mxEvent.addListener(l,"dblclick",u)})(c,l)}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),l=a[d];null==c&&(c=d.substring(0,1).toUpperCase()+d.substring(1));f.className="geTemplateCatLink";
-f.setAttribute("title",c+" ("+l.length+")");c=mxUtils.htmlEntities(c);15<c.length&&(c=c.substring(0,15)+"&hellip;");f.innerHTML=c+" ("+l.length+")";b.appendChild(f);(function(b,d,c){mxEvent.addListener(f,"click",function(){D!=c&&(null!=D?(D.style.fontWeight="normal",D.style.textDecoration="none"):(Y.style.display="none",N.style.minHeight="100%"),D=c,D.style.fontWeight="bold",D.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){m&&
-(Z.scrollTop=0,P.innerHTML="",U.spin(P),G=!1,x=!0,S.innerHTML=mxResources.get("recentDiag",null,"Recent Diagrams"),K=null,m(W,a?null:h))}function C(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,D=null,F=null,H=null,A=!1,E=!0,I=!1,M=[],K,T=B.querySelector(".geTempDlgShowAllBtn"),
+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"),l=document.createElement("th");l.style.width="50%";l.innerHTML=mxResources.get("diagram",null,"Diagram");k.appendChild(l);l=document.createElement("th");l.style.width="25%";l.innerHTML=mxResources.get("changedBy",null,"Changed By");k.appendChild(l);
+l=document.createElement("th");l.style.width="25%";l.innerHTML=mxResources.get("lastModifiedOn",null,"Last modified on");k.appendChild(l);c.appendChild(k);P.appendChild(c)}for(k=0;k<a.length;k++){a[k].isExternal=!b;var e=a[k].url,l=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!=l&&l.length>e&&(l=l.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=l;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(){p(a)})})(a[k],D)}else{var m=document.createElement("div");m.className="geTempDlgDiagramTile";m.setAttribute("title",g);null==F&&(f(),t(m,"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);m.appendChild(v);v=document.createElement("div");v.className="geTempDlgDiagramTileLbl";v.innerHTML=null!=l?l:"";m.appendChild(v);B=document.createElement("img");B.src="/images/icon-search.svg";B.className="geTempDlgDiagramPreviewBtn";
+B.setAttribute("title",mxResources.get("preview"));m.appendChild(B);(function(a,b){mxEvent.addListener(m,"click",function(){F!=b&&(f(),t(b,"geTempDlgDiagramTileActive",a))});mxEvent.addListener(m,"dblclick",u);mxEvent.addListener(B,"click",function(){p(a)})})(a[k],m);P.appendChild(m)}}}function l(a,b){Q.innerHTML="";t();for(var d=!b&&5<a.length?5:a.length,f=0;f<d;f++){var k=a[f];k.isCategory=!0;var c=document.createElement("div"),l=mxResources.get(k.title);null==l&&(l=k.title.substring(0,1).toUpperCase()+
+k.title.substring(1));c.className="geTempDlgNewDiagramCatItem";c.setAttribute("title",l);l=mxUtils.htmlEntities(l);15<l.length&&(l=l.substring(0,15)+"&hellip;");null==F&&(L.innerHTML=mxResources.get("create"),w(),t(c,"geTempDlgNewDiagramCatItemActive",k));var e=document.createElement("div");e.className="geTempDlgNewDiagramCatItemImg";var p=document.createElement("img");p.src=NEW_DIAGRAM_CATS_PATH+"/"+k.img;e.appendChild(p);c.appendChild(e);e=document.createElement("div");e.className="geTempDlgNewDiagramCatItemLbl";
+e.innerHTML=l;c.appendChild(e);Q.appendChild(c);(function(a,b){mxEvent.addListener(c,"click",function(){F!=b&&(L.innerHTML=mxResources.get("create"),w(),t(b,"geTempDlgNewDiagramCatItemActive",a))});mxEvent.addListener(c,"dblclick",u)})(k,c)}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"),k=mxResources.get(d),c=a[d];null==k&&(k=d.substring(0,1).toUpperCase()+d.substring(1));f.className="geTemplateCatLink";
+f.setAttribute("title",k+" ("+c.length+")");k=mxUtils.htmlEntities(k);15<k.length&&(k=k.substring(0,15)+"&hellip;");f.innerHTML=k+" ("+c.length+")";b.appendChild(f);(function(b,d,k){mxEvent.addListener(f,"click",function(){C!=k&&(null!=C?(C.style.fontWeight="normal",C.style.textDecoration="none"):(Y.style.display="none",N.style.minHeight="100%"),C=k,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,k,f)}}function z(a){m&&
+(Z.scrollTop=0,P.innerHTML="",U.spin(P),G=!1,x=!0,S.innerHTML=mxResources.get("recentDiag",null,"Recent Diagrams"),K=null,m(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)+'"';q(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(){l(this,"geTempDlgAllDiagramsBtnImg","all-diagrams","myDiagramsBtn","geTempDlgMyDiagramsBtnImg","my-diagrams",!0)&&(E=!0,null==K?z(E):C(K))});mxEvent.addListener(B.querySelector(".geTempDlgRadioBtn[data-id=myDiagramsBtn]"),"click",function(){l(this,"geTempDlgMyDiagramsBtnImg","my-diagrams","allDiagramsBtn","geTempDlgAllDiagramsBtnImg",
-"all-diagrams",!0)&&(E=!1,null==K?z(E):C(K))});mxEvent.addListener(B.querySelector(".geTempDlgRadioBtn[data-id=listBtn]"),"click",function(){l(this,"geTempDlgListBtnImg","list","tilesBtn","geTempDlgTilesBtnImg","tiles",!1)&&(I=!0,y(M,!1,I))});mxEvent.addListener(B.querySelector(".geTempDlgRadioBtn[data-id=tilesBtn]"),"click",function(){l(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?C(b.value):da=setTimeout(function(){C(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!=
+"click",function(){f();Y.style.display="";N.style.minHeight="calc(100% - 280px)";z(E)});mxEvent.addListener(B.querySelector(".geTempDlgRadioBtn[data-id=allDiagramsBtn]"),"click",function(){k(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(){k(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(){k(this,"geTempDlgListBtnImg","list","tilesBtn","geTempDlgTilesBtnImg","tiles",!1)&&(I=!0,y(M,!1,I))});mxEvent.addListener(B.querySelector(".geTempDlgRadioBtn[data-id=tilesBtn]"),"click",function(){k(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"),l(J)):(Y.style.height="440px",Q.style.height="355px",T.innerHTML=mxResources.get("showLess",null,"- Show less"),l(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;l(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;q&&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!=
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==":
@@ -7757,25 +7758,25 @@ if(null!=a.css){var d=document.createElement("style");d.setAttribute("type","tex
a.defaultCustomLibraries);null!=a.enableCustomLibraries&&(Editor.enableCustomLibraries=a.enableCustomLibraries);null!=a.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=a.defaultVertexStyle);null!=a.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=a.defaultEdgeStyle);a.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=a.emptyDiagramXml);a.thumbWidth&&(Sidebar.prototype.thumbWidth=a.thumbWidth);a.thumbHeight&&(Sidebar.prototype.thumbHeight=a.thumbHeight);a.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=
a.emptyLibraryXml);a.sidebarWidth&&(EditorUi.prototype.hsplitPosition=a.sidebarWidth);a.fontCss&&(d=document.createElement("style"),d.setAttribute("type","text/css"),d.appendChild(document.createTextNode(a.fontCss)),f=document.getElementsByTagName("script")[0],f.parentNode.insertBefore(d,f),Editor.prototype.fontCss=a.fontCss);if(null!=a.plugins&&!b)for(App.initPluginCallback(),d=0;d<a.plugins.length;d++)mxscript(a.plugins[d])}};Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";
Editor.GUID_LENGTH=20;Editor.guid=function(a){a=null!=a?a:Editor.GUID_LENGTH;for(var b=[],d=0;d<a;d++)b.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return b.join("")};Editor.prototype.useForeignObjectForMath=!1;Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;var a=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(b){b=null!=b&&"mxlibrary"!=b.nodeName?this.extractGraphModel(b):null;if(null!=b){var d=
-b.getElementsByTagName("parsererror");if(null!=d&&0<d.length){var d=d[0],f=d.getElementsByTagName("div");null!=f&&0<f.length&&(d=f[0]);throw{message:mxUtils.getTextContent(d)};}if("mxGraphModel"==b.nodeName){d=b.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=d&&""!=d)d!=this.graph.currentStyle&&(f=null!=this.graph.themes?this.graph.themes[d]:mxUtils.load(STYLE_PATH+"/"+d+".xml").getDocumentElement(),null!=f&&(c=new mxCodec(f.ownerDocument),c.decode(f,this.graph.getStylesheet())));
-else if(f=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement(),null!=f){var c=new mxCodec(f.ownerDocument);c.decode(f,this.graph.getStylesheet())}this.graph.currentStyle=d;this.graph.mathEnabled="1"==urlParams.math||"1"==b.getAttribute("math");d=b.getAttribute("backgroundImage");null!=d?(d=JSON.parse(d),this.graph.setBackgroundImage(new mxImage(d.src,d.width,d.height))):this.graph.setBackgroundImage(null);mxClient.NO_FO=this.graph.mathEnabled&&
+b.getElementsByTagName("parsererror");if(null!=d&&0<d.length){var d=d[0],f=d.getElementsByTagName("div");null!=f&&0<f.length&&(d=f[0]);throw{message:mxUtils.getTextContent(d)};}if("mxGraphModel"==b.nodeName){d=b.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=d&&""!=d)d!=this.graph.currentStyle&&(f=null!=this.graph.themes?this.graph.themes[d]:mxUtils.load(STYLE_PATH+"/"+d+".xml").getDocumentElement(),null!=f&&(k=new mxCodec(f.ownerDocument),k.decode(f,this.graph.getStylesheet())));
+else if(f=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement(),null!=f){var k=new mxCodec(f.ownerDocument);k.decode(f,this.graph.getStylesheet())}this.graph.currentStyle=d;this.graph.mathEnabled="1"==urlParams.math||"1"==b.getAttribute("math");d=b.getAttribute("backgroundImage");null!=d?(d=JSON.parse(d),this.graph.setBackgroundImage(new mxImage(d.src,d.width,d.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"==b.getAttribute("shadow"),!1)}a.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var c=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(a){a=null!=a?a:!0;var b=c.apply(this,
arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&b.setAttribute("style",this.graph.currentStyle);null!=this.graph.backgroundImage&&b.setAttribute("backgroundImage",JSON.stringify(this.graph.backgroundImage));b.setAttribute("math",this.graph.mathEnabled?"1":"0");b.setAttribute("shadow",this.graph.shadowVisible?"1":"0");return b};Editor.prototype.isDataSvg=function(a){try{var b=mxUtils.parseXml(a).documentElement.getAttribute("content");if(null!=b&&(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)){var d=mxUtils.parseXml(b).documentElement;return"mxfile"==d.nodeName||"mxGraphModel"==d.nodeName}}catch(x){}return!1};Editor.prototype.extractGraphModel=function(a,b){if(null!=a&&"undefined"!==typeof pako){var d=a.ownerDocument.getElementsByTagName("div"),f=[];if(null!=d&&0<d.length)for(var c=0;c<d.length;c++)if("mxgraph"==d[c].getAttribute("class")){f.push(d[c]);
+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)){var d=mxUtils.parseXml(b).documentElement;return"mxfile"==d.nodeName||"mxGraphModel"==d.nodeName}}catch(x){}return!1};Editor.prototype.extractGraphModel=function(a,b){if(null!=a&&"undefined"!==typeof pako){var d=a.ownerDocument.getElementsByTagName("div"),f=[];if(null!=d&&0<d.length)for(var k=0;k<d.length;k++)if("mxgraph"==d[k].getAttribute("class")){f.push(d[k]);
break}0<f.length&&(d=f[0].getAttribute("data-mxgraph"),null!=d?(f=JSON.parse(d),null!=f&&null!=f.xml&&(f=mxUtils.parseXml(f.xml),a=f.documentElement)):(f=f[0].getElementsByTagName("div"),0<f.length&&(d=mxUtils.getTextContent(f[0]),d=this.graph.decompress(d),0<d.length&&(f=mxUtils.parseXml(d),a=f.documentElement))))}if(null!=a&&"svg"==a.nodeName)if(d=a.getAttribute("content"),null!=d&&"<"!=d.charAt(0)&&"%"!=d.charAt(0)&&(d=unescape(window.atob?atob(d):Base64.decode(cont,d))),null!=d&&"%"==d.charAt(0)&&
(d=decodeURIComponent(d)),null!=d&&0<d.length)a=mxUtils.parseXml(d).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==a||b||(f=null,"diagram"==a.nodeName?f=a:"mxfile"==a.nodeName&&(d=a.getElementsByTagName("diagram"),0<d.length&&(f=d[Math.max(0,Math.min(d.length-1,urlParams.page||0))])),null!=f&&(d=this.graph.decompress(mxUtils.getTextContent(f)),null!=d&&0<d.length&&(a=mxUtils.parseXml(d).documentElement)));null==a||"mxGraphModel"==a.nodeName||b&&"mxfile"==a.nodeName||
(a=null);return a};var b=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();b.apply(this,arguments)};var e=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=
function(){e.apply(this,arguments);mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath&&null!=Editor.MathJaxRender?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=function(a,b){a=null!=a?a:"https://math.draw.io/current/MathJax.js?config=TeX-MML-AM_HTMLorMML";Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(a){window.setTimeout(function(){"hidden"!=
a.style.visibility&&MathJax.Hub.Queue(["Typeset",MathJax.Hub,a])},0)};window.MathJax={skipStartupTypeset:!0,showMathMenu:!1,messageStyle:"none",AuthorInit:function(){MathJax.Hub.Config(b||{jax:["input/TeX","input/MathML","input/AsciiMath","output/HTML-CSS"],extensions:["tex2jax.js","mml2jax.js","asciimath2jax.js"],"HTML-CSS":{imageFont:null},TeX:{extensions:["AMSmath.js","AMSsymbols.js","noErrors.js","noUndefined.js"]},tex2jax:{ignoreClass:"mxCellEditor"},asciimath2jax:{ignoreClass:"mxCellEditor"}});
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 d=Editor.prototype.init;Editor.prototype.init=function(){d.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 c=document.createElement("script");c.type="text/javascript";c.src=a;f[0].parentNode.appendChild(c)}};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,d,f,c){void 0!==d?b.push(d.replace(/\\'/g,"'")):void 0!==f?b.push(f.replace(/\\"/g,'"')):void 0!==c&&b.push(c);return""});/,\s*$/.test(a)&&b.push("");return b};if(window.ColorDialog){var g=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(a,b){g.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};
+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 k=document.createElement("script");k.type="text/javascript";k.src=a;f[0].parentNode.appendChild(k)}};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,d,f,k){void 0!==d?b.push(d.replace(/\\'/g,"'")):void 0!==f?b.push(f.replace(/\\"/g,'"')):void 0!==k&&b.push(k);return""});/,\s*$/.test(a)&&b.push("");return b};if(window.ColorDialog){var g=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(a,b){g.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};
var h=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){h.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(a,b){var d=null;null!=a.editor.graph.getModel().getParent(b)?d=b.getId():null!=a.currentPage&&(d=a.currentPage.getId());return d});if(null!=window.StyleFormatPanel){var m=Format.prototype.init;Format.prototype.init=function(){m.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",
-this.update)};var p=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?p.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var 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=
+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 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,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 l=b.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000032875");l.style.position="relative";l.style.marginLeft="6px";l.style.top="2px";c.appendChild(l)}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",
+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 k=b.getCurrentFile();null!=k&&k.isAutosaveOptional()&&(k=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(k))}if(this.isMathOptionVisible()&&f.isEnabled()&&"undefined"!==typeof MathJax){k=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)}});k.style.paddingTop="5px";a.appendChild(k);var c=b.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000032875");c.style.position="relative";c.style.marginLeft="6px";c.style.top="2px";k.appendChild(c)}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,
@@ -7796,37 +7797,37 @@ 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 l=!1,f=0;f<a.length;f++)if(a[f].name==c&&a[f].type==b[c].type){l=!0;break}l||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(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 b={},d=a.vertices,c=a.edges,l=0;l<d.length;l++)this.findCommonProperties(d[l],b,0==l);for(l=0;l<c.length;l++)this.findCommonProperties(c[l],b,0==
-d.length&&0==l);0<Object.getOwnPropertyNames(b).length&&this.container.appendChild(this.addProperties(this.createPanel(),b,a))}};var l=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 l.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=function(a,b,d){function f(a,
-b,d,f){g.getModel().beginUpdate();try{var c=[],l=[];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&&(g.setCellStyles(d.countProperty,k.length,g.getSelectionCells()),c.push(d.countProperty),l.push(k.length))}g.setCellStyles(a,b,g.getSelectionCells());
-c.push(a);l.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(",");g.setCellStyles(d.dependentProps[a],t,g.getSelectionCells());c.push(d.dependentProps[a]);l.push(t)}u.editorUi.fireEvent(new mxEventObject("styleChanged","keys",c,"values",l,"cells",g.getSelectionCells()))}finally{g.getModel().endUpdate()}}function c(b,d,f){var c=mxUtils.getOffset(a,
-!0),l=mxUtils.getOffset(b,!0);d.style.position="absolute";d.style.left=l.x-c.x+"px";d.style.top=l.y-c.y+"px";d.style.width=b.offsetWidth+"px";d.style.height=b.offsetHeight-(f?4:0)+"px";d.style.zIndex=5}function l(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(u,function(l){this.editorUi.pickColor(b,
-function(b){c.style.background="none"==b?"url('"+Dialog.prototype.noColorImage+"')":b;f(a,b,d)});mxEvent.consume(l)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(c);return btn}function k(a,b,d,c,l,k,e){null!=b&&(b=b.split(","),w.push({name:a,values:b,type:d,defVal:c,countProperty:l,parentRow:k,isDeletable:!0,flipBkg:e}));btn=mxUtils.button("+",mxUtils.bind(u,function(b){for(var q=k,u=0;null!=q.nextSibling;)if(q.nextSibling.getAttribute("data-pName")==
-a)q=q.nextSibling,u++;else break;var g={type:d,parentRow:k,index:u,isDeletable:!0,defVal:c,countProperty:l},u=t(a,"",g,0==u%2,e);f(a,c,g);q.parentNode.insertBefore(u,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,l,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:l,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,g,w){var h=t.dispName,v=t.type,m=document.createElement("tr");m.className="gePropRow"+(w?"Dark":"")+(g?"Alt":"")+" gePropNonHeaderRow";m.setAttribute("data-pName",b);m.setAttribute("data-pValue",d);g=!1;null!=t.index&&(m.setAttribute("data-index",t.index),h=(null!=h?h:"")+"["+t.index+"]",g=!0);var z=document.createElement("td");
-z.className="gePropRowCell";z.innerHTML=mxUtils.htmlEntities(mxResources.get(h,null,h));g&&(z.style.textAlign="right");m.appendChild(z);z=document.createElement("td");z.className="gePropRowCell";if("color"==v)z.appendChild(l(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(u,function(){var l=
-document.createElement("select");c(z,l);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));l.appendChild(q)}l.value=d;a.appendChild(l);mxEvent.addListener(l,"change",function(){var a=mxUtils.htmlEntities(l.value);f(b,a,t)});l.focus();mxEvent.addListener(l,"blur",function(){a.removeChild(l)})}))}else"dynamicArr"==v?z.appendChild(k(b,d,t.subType,t.subDefVal,t.countProperty,
-m,w)):"staticArr"==v?z.appendChild(e(b,d,t.subType,t.subDefVal,t.size,m,w)):(z.innerHTML=d,mxEvent.addListener(z,"click",mxUtils.bind(u,function(){function l(){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(z,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&&l()});k.focus();mxEvent.addListener(k,"blur",function(){l()})})));t.isDeletable&&(w=mxUtils.button("-",mxUtils.bind(u,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));
-m.appendChild(z);return m}var u=this,g=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 m=document.createElement("th");m.className="gePropHeaderCell";var z=document.createElement("img");z.src=Sidebar.prototype.expandedImage;m.appendChild(z);mxUtils.write(m,mxResources.get("property"));h.style.cursor="pointer";var y=
-function(){var b=v.querySelectorAll(".gePropNonHeaderRow"),d;if(u.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],l=c.nodeName.toUpperCase();"INPUT"!=l&&"SELECT"!=l||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(){u.editorUi.propertiesCollapsed=!u.editorUi.propertiesCollapsed;y()});h.appendChild(m);
-m=document.createElement("th");m.className="gePropHeaderCell";m.innerHTML=mxResources.get("value");h.appendChild(m);v.appendChild(h);var C=!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=[],m=0;m<U.length;m++){var V=
-d.style[U[m]];O.push(b[U[m]].subDefVal);R.push(null!=V?V.split(","):[])}h.dependentPropsDefVal=O;h.dependentPropsVals=R}v.appendChild(t(p,n,h,C,B));C=!C}}for(m=0;m<w.length;m++)for(h=w[m],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<l.length;k++)c=mxUtils.removeStylename(c,l[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&&
+a[f];else for(var k in b){for(var c=!1,f=0;f<a.length;f++)if(a[f].name==k&&a[f].type==b[k].type){c=!0;break}c||delete b[k]}},k=this.editorUi.editor.graph.view.getState(a);null!=k&&null!=k.shape&&(k.shape.commonCustomPropAdded||(k.shape.commonCustomPropAdded=!0,k.shape.customProperties=k.shape.customProperties||[],k.cell.vertex?Array.prototype.push.apply(k.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(k.shape.customProperties,Editor.commonEdgeProperties)),f(k.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,k=a.edges,c=0;c<d.length;c++)this.findCommonProperties(d[c],b,0==c);for(c=0;c<k.length;c++)this.findCommonProperties(k[c],b,0==
+d.length&&0==c);0<Object.getOwnPropertyNames(b).length&&this.container.appendChild(this.addProperties(this.createPanel(),b,a))}};var k=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 k.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 k=[],c=[];if(null!=d.index){for(var l=[],e=d.parentRow.nextSibling;e&&e.getAttribute("data-pName")==a;)l.push(e.getAttribute("data-pValue")),e=e.nextSibling;d.index<l.length?null!=f?l.splice(f,1):l[d.index]=b:l.push(b);null!=d.size&&l.length>d.size&&(l=l.slice(0,d.size));b=l.join(",");null!=d.countProperty&&(u.setCellStyles(d.countProperty,l.length,u.getSelectionCells()),k.push(d.countProperty),c.push(l.length))}u.setCellStyles(a,b,u.getSelectionCells());
+k.push(a);c.push(b);if(null!=d.dependentProps)for(a=0;a<d.dependentProps.length;a++){var p=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(p);t=t.join(",");u.setCellStyles(d.dependentProps[a],t,u.getSelectionCells());k.push(d.dependentProps[a]);c.push(t)}g.editorUi.fireEvent(new mxEventObject("styleChanged","keys",k,"values",c,"cells",u.getSelectionCells()))}finally{u.getModel().endUpdate()}}function k(b,d,f){var k=mxUtils.getOffset(a,
+!0),c=mxUtils.getOffset(b,!0);d.style.position="absolute";d.style.left=c.x-k.x+"px";d.style.top=c.y-k.y+"px";d.style.width=b.offsetWidth+"px";d.style.height=b.offsetHeight-(f?4:0)+"px";d.style.zIndex=5}function c(a,b,d){var k=document.createElement("div");k.style.width="32px";k.style.height="4px";k.style.margin="2px";k.style.border="1px solid black";k.style.background=b&&"none"!=b?b:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(g,function(c){this.editorUi.pickColor(b,
+function(b){k.style.background="none"==b?"url('"+Dialog.prototype.noColorImage+"')":b;f(a,b,d)});mxEvent.consume(c)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(k);return btn}function l(a,b,d,k,c,l,e){null!=b&&(b=b.split(","),w.push({name:a,values:b,type:d,defVal:k,countProperty:c,parentRow:l,isDeletable:!0,flipBkg:e}));btn=mxUtils.button("+",mxUtils.bind(g,function(b){for(var p=l,g=0;null!=p.nextSibling;)if(p.nextSibling.getAttribute("data-pName")==
+a)p=p.nextSibling,g++;else break;var u={type:d,parentRow:l,index:g,isDeletable:!0,defVal:k,countProperty:c},g=t(a,"",u,0==g%2,e);f(a,k,u);p.parentNode.insertBefore(g,p.nextSibling);mxEvent.consume(b)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function e(a,b,d,f,k,c,l){if(0<k){var e=Array(k);b=null!=b?b.split(","):[];for(var p=0;p<k;p++)e[p]=null!=b[p]?b[p]:null!=f?f:"";w.push({name:a,values:e,type:d,defVal:f,parentRow:c,flipBkg:l,size:k})}return document.createElement("div")}
+function p(a,b,d){var k=document.createElement("input");k.type="checkbox";k.checked="1"==b;mxEvent.addListener(k,"change",function(){f(a,k.checked?"1":"0",d)});return k}function t(b,d,t,u,w){var h=t.dispName,v=t.type,m=document.createElement("tr");m.className="gePropRow"+(w?"Dark":"")+(u?"Alt":"")+" gePropNonHeaderRow";m.setAttribute("data-pName",b);m.setAttribute("data-pValue",d);u=!1;null!=t.index&&(m.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");m.appendChild(z);z=document.createElement("td");z.className="gePropRowCell";if("color"==v)z.appendChild(c(b,d,t));else if("bool"==v||"boolean"==v)z.appendChild(p(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 c=
+document.createElement("select");k(z,c);for(var l=0;l<y.length;l++){var e=y[l],p=document.createElement("option");p.value=mxUtils.htmlEntities(e.val);p.innerHTML=mxUtils.htmlEntities(mxResources.get(e.dispName,null,e.dispName));c.appendChild(p)}c.value=d;a.appendChild(c);mxEvent.addListener(c,"change",function(){var a=mxUtils.htmlEntities(c.value);f(b,a,t)});c.focus();mxEvent.addListener(c,"blur",function(){a.removeChild(c)})}))}else"dynamicArr"==v?z.appendChild(l(b,d,t.subType,t.subDefVal,t.countProperty,
+m,w)):"staticArr"==v?z.appendChild(e(b,d,t.subType,t.subDefVal,t.size,m,w)):(z.innerHTML=d,mxEvent.addListener(z,"click",mxUtils.bind(g,function(){function c(){var a=l.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 l=document.createElement("input");k(z,l,!0);l.value=d;l.className="gePropEditor";
+"int"!=v&&"float"!=v||t.allowAuto||(l.type="number",l.step="int"==v?"1":"any",null!=t.min&&(l.min=parseFloat(t.min)),null!=t.max&&(l.max=parseFloat(t.max)));a.appendChild(l);mxEvent.addListener(l,"keypress",function(a){13==a.keyCode&&c()});l.focus();mxEvent.addListener(l,"blur",function(){c()})})));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));
+m.appendChild(z);return m}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 m=document.createElement("th");m.className="gePropHeaderCell";var z=document.createElement("img");z.src=Sidebar.prototype.expandedImage;m.appendChild(z);mxUtils.write(m,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 k=a.childNodes[f],c=k.nodeName.toUpperCase();"INPUT"!=c&&"SELECT"!=c||a.removeChild(k)}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(m);
+m=document.createElement("th");m.className="gePropHeaderCell";m.innerHTML=mxResources.get("value");h.appendChild(m);v.appendChild(h);var D=!1,B=!1,q;for(q in b)if(h=b[q],"function"!=typeof h.isVisible||h.isVisible(d)){var n=null!=d.style[q]?mxUtils.htmlEntities(d.style[q]+""):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=[],m=0;m<U.length;m++){var V=
+d.style[U[m]];O.push(b[U[m]].subDefVal);R.push(null!=V?V.split(","):[])}h.dependentPropsDefVal=O;h.dependentPropsVals=R}v.appendChild(t(q,n,h,D,B));D=!D}}for(m=0;m<w.length;m++)for(h=w[m],b=h.parentRow,d=0;d<h.values.length;d++)q=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(q,b.nextSibling),b=q;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 k=f.getModel().getStyle(d[b]),l=0;l<c.length;l++)k=mxUtils.removeStylename(k,c[l]);var e=f.getModel().isVertex(d[b])?f.defaultVertexStyle:f.defaultEdgeStyle;null!=a?(k=mxUtils.setStyle(k,mxConstants.STYLE_FILLCOLOR,a.fill||mxUtils.getValue(e,mxConstants.STYLE_FILLCOLOR,null)),k=mxUtils.setStyle(k,mxConstants.STYLE_STROKECOLOR,a.stroke||
+mxUtils.getValue(e,mxConstants.STYLE_STROKECOLOR,null)),k=mxUtils.setStyle(k,mxConstants.STYLE_GRADIENTCOLOR,a.gradient||mxUtils.getValue(e,mxConstants.STYLE_GRADIENTCOLOR,null)),f.getModel().isVertex(d[b])&&(k=mxUtils.setStyle(k,mxConstants.STYLE_FONTCOLOR,a.font||mxUtils.getValue(e,mxConstants.STYLE_FONTCOLOR,null)))):(k=mxUtils.setStyle(k,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(e,mxConstants.STYLE_FILLCOLOR,"#ffffff")),k=mxUtils.setStyle(k,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(e,
+mxConstants.STYLE_STROKECOLOR,"#000000")),k=mxUtils.setStyle(k,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(e,mxConstants.STYLE_GRADIENTCOLOR,null)),f.getModel().isVertex(d[b])&&(k=mxUtils.setStyle(k,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(e,mxConstants.STYLE_FONTCOLOR,null))));f.getModel().setStyle(d[b],k)}}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"),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 l="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" ");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,
+mxConstants.STYLE_STROKECOLOR,"#000000"));else{var d=mxUtils.getValue(f.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff"),l=mxUtils.getValue(f.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");b.style.backgroundColor=d;b.style.border="1px solid "+l}k.appendChild(b)}k.innerHTML="";for(var d=0;d<a.length;d++)0<d&&0==mxUtils.mod(d,4)&&mxUtils.br(k),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,k=document.createElement("div");k.style.whiteSpace="nowrap";k.style.paddingLeft="24px";k.style.paddingRight="20px";a.style.paddingLeft="16px";a.style.paddingBottom="6px";a.style.position="relative";a.appendChild(k);var c="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 l=document.createElement("div");l.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(l,
"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(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,
+1<this.defaultColorSchemes.length&&(a.appendChild(l),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(l);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,k=f.view.getState(f.getSelectionCell());1==f.getSelectionCount()&&null!=k&&null!=k.shape&&null!=k.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=
-"3";Graph.prototype.edgeMode="move"!=urlParams.edge;var q=Graph.prototype.init;Graph.prototype.init=function(){function a(a){b=a;if(mxClient.IS_QUIRKS||7==document.documentMode||8==document.documentMode)b=mxUtils.clone(a)}q.apply(this,arguments);var b=null;mxEvent.addListener(this.container,"mouseenter",a);mxEvent.addListener(this.container,"mousemove",a);mxEvent.addListener(this.container,"mouseleave",function(a){b=null});this.isMouseInsertPoint=function(){return null!=b};var d=this.getInsertPoint;
+"3";Graph.prototype.edgeMode="move"!=urlParams.edge;var p=Graph.prototype.init;Graph.prototype.init=function(){function a(a){b=a;if(mxClient.IS_QUIRKS||7==document.documentMode||8==document.documentMode)b=mxUtils.clone(a)}p.apply(this,arguments);var b=null;mxEvent.addListener(this.container,"mouseenter",a);mxEvent.addListener(this.container,"mousemove",a);mxEvent.addListener(this.container,"mouseleave",function(a){b=null});this.isMouseInsertPoint=function(){return null!=b};var d=this.getInsertPoint;
this.getInsertPoint=function(){return null!=b?this.getPointForEvent(b):d.apply(this,arguments)};var f=this.layoutManager.getLayout;this.layoutManager.getLayout=function(a){var b=this.graph.view.getState(a),b=null!=b?b.style:this.graph.getCellStyle(a);if(null!=b){if("undefined"!=typeof mxRackContainer&&"rack"==b.childLayout){var d=new mxStackLayout(this.graph,!1);d.setChildGeometry=function(a,b){b.height=Math.max(b.height,20);if(1<b.height/20){var d=b.height%20;b.height+=10<d?20-d:-d}this.graph.getModel().setGeometry(a,
b)};d.fill=!0;d.unitSize=mxRackContainer.unitSize|20;d.marginLeft=b.marginLeft||0;d.marginRight=b.marginRight||0;d.marginTop=b.marginTop||0;d.marginBottom=b.marginBottom||0;d.resizeParent=!1;return d}if("undefined"!=typeof mxTableLayout&&"tableLayout"==b.childLayout)return d=new mxTableLayout(this.graph),d.rows=b.tableRows||2,d.columns=b.tableColumns||2,d.colPercentages=b.colPercentages,d.rowPercentages=b.rowPercentages,d.equalColumns="1"==mxUtils.getValue(b,"equalColumns",d.colPercentages?"0":"1"),
d.equalRows="1"==mxUtils.getValue(b,"equalRows",d.rowPercentages?"0":"1"),d.resizeParent="1"==mxUtils.getValue(b,"resizeParent","1"),d.border=b.tableBorder||d.border,d.marginLeft=b.marginLeft||0,d.marginRight=b.marginRight||0,d.marginTop=b.marginTop||0,d.marginBottom=b.marginBottom||0,d.autoAddCol="1"==mxUtils.getValue(b,"autoAddCol","0"),d.autoAddRow="1"==mxUtils.getValue(b,"autoAddRow",d.autoAddCol?"0":"1"),d.colWidths=b.colWidths||"100",d.rowHeights=b.rowHeights||"50",d}return f.apply(this,arguments)}};
@@ -7835,14 +7836,14 @@ this.globalUrlVars[a])}return b};var w=mxGraphView.prototype.validateBackgroundP
this.graph.container.firstChild==this.webKitForceRepaintNode)||(null!=this.webKitForceRepaintNode.parentNode&&this.webKitForceRepaintNode.parentNode.removeChild(this.webKitForceRepaintNode),this.webKitForceRepaintNode=null):(this.webKitForceRepaintNode=document.createElement("div"),this.webKitForceRepaintNode.style.cssText="position:absolute;",a.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,a.ownerSVGElement))}};var y=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=
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 l=null!=b[c].value&&"object"==typeof b[c].value?mxUtils.trim(b[c].value.getAttribute(d)||""):"",k=!0;if(0<l.length)for(var l=l.toLowerCase().split(" "),e=0;e<a.length&&k;e++)var q=mxUtils.trim(a[e]).toLowerCase(),k=k&&(0==q.length||0<=mxUtils.indexOf(l,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),l=new mxCellHighlight(this,b,c,!1);null!=f&&(l.opacity=f);l.highlight(a);window.setTimeout(function(){null!=l.shape&&(mxUtils.setPrefixedStyle(l.shape.node.style,"transition","all 1200ms ease-in-out"),l.shape.node.style.opacity=0);window.setTimeout(function(){l.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 l=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):f.createElement("feGaussianBlur");l.setAttribute("in","SourceAlpha");l.setAttribute("stdDeviation",this.svgShadowBlur);l.setAttribute("result","blur");c.appendChild(l);l=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feOffset"):
-f.createElement("feOffset");l.setAttribute("in","blur");l.setAttribute("dx",this.svgShadowSize);l.setAttribute("dy",this.svgShadowSize);l.setAttribute("result","offsetBlur");c.appendChild(l);l=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feFlood"):f.createElement("feFlood");l.setAttribute("flood-color",this.svgShadowColor);l.setAttribute("flood-opacity",this.svgShadowOpacity);l.setAttribute("result","offsetColor");c.appendChild(l);l=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,
-"feComposite"):f.createElement("feComposite");l.setAttribute("in","offsetColor");l.setAttribute("in2","offsetBlur");l.setAttribute("operator","in");l.setAttribute("result","offsetBlur");c.appendChild(l);l=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feBlend"):f.createElement("feBlend");l.setAttribute("in","SourceGraphic");l.setAttribute("in2","offsetBlur");c.appendChild(l);l=a.getElementsByTagName("defs");0==l.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=l[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",
+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 k=this.model.getCell(a[d]);null!=k&&b.push(k)}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 k=0;k<b.length;k++)if(this.model.isVertex(b[k])||this.model.isEdge(b[k])){var c=null!=b[k].value&&"object"==typeof b[k].value?mxUtils.trim(b[k].value.getAttribute(d)||""):"",l=!0;if(0<c.length)for(var c=c.toLowerCase().split(" "),e=0;e<a.length&&l;e++)var p=mxUtils.trim(a[e]).toLowerCase(),l=l&&(0==p.length||0<=mxUtils.indexOf(c,p));else l=0==a.length;l&&f.push(b[k])}}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 k=0;k<a.length;k++)this.highlightCell(a[k],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 k=Math.max(5,mxUtils.getValue(a.style,mxConstants.STYLE_STROKEWIDTH,1)+4),c=new mxCellHighlight(this,b,k,!1);null!=f&&(c.opacity=f);c.highlight(a);window.setTimeout(function(){null!=c.shape&&(mxUtils.setPrefixedStyle(c.shape.node.style,"transition","all 1200ms ease-in-out"),c.shape.node.style.opacity=0);window.setTimeout(function(){c.destroy()},1200)},d)}};Graph.prototype.addSvgShadow=function(a,
+b,d){d=null!=d?d:!1;var f=a.ownerDocument,k=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"filter"):f.createElement("filter");k.setAttribute("id",this.shadowId);var c=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):f.createElement("feGaussianBlur");c.setAttribute("in","SourceAlpha");c.setAttribute("stdDeviation",this.svgShadowBlur);c.setAttribute("result","blur");k.appendChild(c);c=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feOffset"):
+f.createElement("feOffset");c.setAttribute("in","blur");c.setAttribute("dx",this.svgShadowSize);c.setAttribute("dy",this.svgShadowSize);c.setAttribute("result","offsetBlur");k.appendChild(c);c=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feFlood"):f.createElement("feFlood");c.setAttribute("flood-color",this.svgShadowColor);c.setAttribute("flood-opacity",this.svgShadowOpacity);c.setAttribute("result","offsetColor");k.appendChild(c);c=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,
+"feComposite"):f.createElement("feComposite");c.setAttribute("in","offsetColor");c.setAttribute("in2","offsetBlur");c.setAttribute("operator","in");c.setAttribute("result","offsetBlur");k.appendChild(c);c=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feBlend"):f.createElement("feBlend");c.setAttribute("in","SourceGraphic");c.setAttribute("in2","offsetBlur");k.appendChild(c);c=a.getElementsByTagName("defs");0==c.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=c[0];f.appendChild(k);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 k};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=
@@ -7851,61 +7852,61 @@ 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 k=mxMarker.createMarker;mxMarker.createMarker=function(a,b,d,f,c,l,e,q,t,u){if(null!=d&&null==mxMarker.markers[d]){var g=this.getPackageForType(d);null!=g&&mxStencilRegistry.getStencil(g)}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 l=b.getGraphBounds(),k=0,e=0,q=da.get(),t=1/b.pageScale,u=p.checked;if(u)var t=parseInt(X.value),g=parseInt(W.value),t=Math.min(q.height*g/(l.height/b.view.scale),q.width*t/(l.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;!u&&b.pageVisible?(l=b.getPageLayout(),k-=l.x*q.width,e-=l.y*q.height):u=!0;if(null==d){d=PrintDialog.createPrintPreview(b,t,q,0,k,e,u);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,l){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=
-u;d.appendGraph(b,t,k,e,c,!0)}return d}var f=parseInt(ba.value)/100;isNaN(f)&&(f=1,ba.value="100 %");var f=.75*f,l=w.value,k=h.value,e=!u.checked,t=null;e&&(e=l==q&&k==q);if(!e&&null!=a.pages&&a.pages.length){var g=0,e=a.pages.length-1;u.checked||(g=parseInt(l)-1,e=parseInt(k)-1);for(var v=g;v<=e;v++){var m=a.pages[v],l=m==a.currentPage?c:null;if(null==l){var l=a.createTemporaryGraph(c.getStylesheet()),k=!0,g=!1,n=null,z=null;null==m.viewState&&null==m.root&&a.updatePageRoot(m);null!=m.viewState&&
-(k=m.viewState.pageVisible,g=m.viewState.mathEnabled,n=m.viewState.background,z=m.viewState.backgroundImage);l.background=n;l.backgroundImage=null!=z?new mxImage(z.src,z.width,z.height):null;l.pageVisible=k;l.mathEnabled=g;var C=l.getGlobalVariable;l.getGlobalVariable=function(a){return"page"==a?m.getName():"pagenumber"==a?v+1:C.apply(this,arguments)};document.body.appendChild(l.container);a.updatePageRoot(m);l.model.setRoot(m.root)}t=d(l,t,v!=e);l!=c&&l.container.parentNode.removeChild(l.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"]'),
+[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 l=mxMarker.createMarker;mxMarker.createMarker=function(a,b,d,f,k,c,e,p,t,u){if(null!=d&&null==mxMarker.markers[d]){var g=this.getPackageForType(d);null!=g&&mxStencilRegistry.getStencil(g)}return l.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,k){var c=b.getGraphBounds(),l=0,e=0,p=da.get(),t=1/b.pageScale,g=q.checked;if(g)var t=parseInt(X.value),u=parseInt(W.value),t=Math.min(p.height*u/(c.height/b.view.scale),p.width*t/(c.width/b.view.scale));else t=parseInt(y.value)/(100*b.pageScale),isNaN(t)&&(f=
+1/b.pageScale,y.value="100 %");p=mxRectangle.fromRectangle(p);p.width=Math.ceil(p.width*f);p.height=Math.ceil(p.height*f);t*=f;!g&&b.pageVisible?(c=b.getPageLayout(),l-=c.x*p.width,e-=c.y*p.height):g=!0;if(null==d){d=PrintDialog.createPrintPreview(b,t,p,0,l,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,k,c){var l=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;var e=v.apply(this,arguments);mxClient.NO_FO=l;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:e.className="geDisableMathJax";return e}}d.open(null,null,k,!0)}else{p=b.background;if(null==p||""==p||p==mxConstants.NONE)p="#ffffff";d.backgroundColor=p;d.autoOrigin=
+g;d.appendGraph(b,t,l,e,k,!0)}return d}var f=parseInt(ba.value)/100;isNaN(f)&&(f=1,ba.value="100 %");var f=.75*f,c=w.value,l=h.value,e=!g.checked,t=null;e&&(e=c==p&&l==p);if(!e&&null!=a.pages&&a.pages.length){var u=0,e=a.pages.length-1;g.checked||(u=parseInt(c)-1,e=parseInt(l)-1);for(var v=u;v<=e;v++){var m=a.pages[v],c=m==a.currentPage?k:null;if(null==c){var c=a.createTemporaryGraph(k.getStylesheet()),l=!0,u=!1,z=null,n=null;null==m.viewState&&null==m.root&&a.updatePageRoot(m);null!=m.viewState&&
+(l=m.viewState.pageVisible,u=m.viewState.mathEnabled,z=m.viewState.background,n=m.viewState.backgroundImage);c.background=z;c.backgroundImage=null!=n?new mxImage(n.src,n.width,n.height):null;c.pageVisible=l;c.mathEnabled=u;var D=c.getGlobalVariable;c.getGlobalVariable=function(a){return"page"==a?m.getName():"pagenumber"==a?v+1:D.apply(this,arguments)};document.body.appendChild(c.container);a.updatePageRoot(m);c.model.setRoot(m.root)}t=d(c,t,v!=e);c!=k&&c.container.parentNode.removeChild(c.container)}}else t=
+d(k);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,l=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"));l.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 u=document.createElement("input");u.style.cssText="margin-right:8px;margin-bottom:8px;";u.setAttribute("value","all");u.setAttribute("type","radio");
-u.setAttribute("name","pages-printdialog");t.appendChild(u);k=document.createElement("span");mxUtils.write(k,mxResources.get("printAllPages"));t.appendChild(k);mxUtils.br(t);var g=u.cloneNode(!0);u.setAttribute("checked","checked");g.setAttribute("value","range");t.appendChild(g);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(){g.checked=!0});mxEvent.addListener(h,"focus",function(){g.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&&l.appendChild(t);var v=document.createElement("div");v.style.marginBottom="10px";var m=document.createElement("input");m.style.marginRight="8px";m.setAttribute("value","adjust");m.setAttribute("type","radio");m.setAttribute("name","printZoom");v.appendChild(m);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(){m.checked=!0});l.appendChild(v);var t=t.cloneNode(!1),p=m.cloneNode(!0);p.setAttribute("value","fit");m.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 n=document.createElement("tbody"),
-z=document.createElement("tr"),C=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);k=document.createElement("span");mxUtils.write(k,
-mxResources.get("fitToSheetsAcross"));R.appendChild(k);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});k=document.createElement("span");mxUtils.write(k,mxResources.get("fitToSheetsDown"));J.appendChild(k);z.appendChild(L);z.appendChild(U);z.appendChild(R);C.appendChild(O);C.appendChild(V);C.appendChild(J);n.appendChild(z);n.appendChild(C);v.appendChild(n);
-t.appendChild(v);l.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 da=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 ba=document.createElement("input");ba.style.cssText="margin:0 8px 0 8px;";ba.setAttribute("value","100 %");ba.style.width="60px";t.appendChild(ba);l.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);l.appendChild(k);this.container=l};var v=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==
+var k=a.editor.graph,c=document.createElement("div"),l=document.createElement("h3");l.style.width="100%";l.style.textAlign="center";l.style.marginTop="0px";mxUtils.write(l,b||mxResources.get("print"));c.appendChild(l);var e=1,p=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);l=document.createElement("span");mxUtils.write(l,mxResources.get("printAllPages"));t.appendChild(l);mxUtils.br(t);var u=g.cloneNode(!0);g.setAttribute("checked","checked");u.setAttribute("value","range");t.appendChild(u);l=document.createElement("span");mxUtils.write(l,mxResources.get("pages")+":");t.appendChild(l);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);l=document.createElement("span");mxUtils.write(l,mxResources.get("to"));t.appendChild(l);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(l=0;l<a.pages.length;l++)if(a.currentPage==a.pages[l]){p=l+
+1;w.value=p;h.value=p;break}w.setAttribute("max",e);h.setAttribute("max",e);1<e&&c.appendChild(t);var v=document.createElement("div");v.style.marginBottom="10px";var m=document.createElement("input");m.style.marginRight="8px";m.setAttribute("value","adjust");m.setAttribute("type","radio");m.setAttribute("name","printZoom");v.appendChild(m);l=document.createElement("span");mxUtils.write(l,mxResources.get("adjustTo"));v.appendChild(l);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(){m.checked=!0});c.appendChild(v);var t=t.cloneNode(!1),q=m.cloneNode(!0);q.setAttribute("value","fit");m.setAttribute("checked","checked");l=document.createElement("div");l.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";l.appendChild(q);t.appendChild(l);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);l=document.createElement("span");mxUtils.write(l,
+mxResources.get("fitToSheetsAcross"));R.appendChild(l);mxUtils.write(O,mxResources.get("fitToBy"));var W=X.cloneNode(!0);V.appendChild(W);mxEvent.addListener(X,"focus",function(){q.checked=!0});mxEvent.addListener(W,"focus",function(){q.checked=!0});l=document.createElement("span");mxUtils.write(l,mxResources.get("fitToSheetsDown"));J.appendChild(l);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);c.appendChild(t);t=document.createElement("div");l=document.createElement("div");l.style.fontWeight="bold";l.style.marginBottom="12px";mxUtils.write(l,mxResources.get("paperSize"));t.appendChild(l);l=document.createElement("div");l.style.marginBottom="12px";var da=PageSetupDialog.addPageFormatPanel(l,"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);t.appendChild(l);l=document.createElement("span");mxUtils.write(l,mxResources.get("pageScale"));t.appendChild(l);
+var ba=document.createElement("input");ba.style.cssText="margin:0 8px 0 8px;";ba.setAttribute("value","100 %");ba.style.width="60px";t.appendChild(ba);c.appendChild(t);l=document.createElement("div");l.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&&l.appendChild(t);a.isOffline()||(v=mxUtils.button(mxResources.get("help"),function(){k.openLink("https://desk.draw.io/support/solutions/articles/16000048947")}),
+v.className="geBtn",l.appendChild(v));PrintDialog.previewEnabled&&(v=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();f(!1)}),v.className="geBtn",l.appendChild(v));v=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();f(!0)});v.className="geBtn gePrimaryBtn";l.appendChild(v);a.editor.cancelFirst||l.appendChild(t);c.appendChild(l);this.container=c};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,m,p,n,d,f){n=null!=n?n:!0;var l=document.createElement("div");l.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);l.appendChild(q)}c=document.createElement("div");c.style.padding="6px";c.innerHTML=b;l.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!=m&&(e=mxUtils.button(m,function(){n&&a.hideDialog();null!=p&&p()}),e.className="geBtn gePrimaryBtn",
-b.appendChild(e));this.init=function(){t.focus()};l.appendChild(b);this.container=l};
-(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.21";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==
+var ErrorDialog=function(a,c,b,e,g,h,m,q,n,d,f){n=null!=n?n:!0;var k=document.createElement("div");k.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);k.appendChild(p)}c=document.createElement("div");c.style.padding="6px";c.innerHTML=b;k.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!=m&&(e=mxUtils.button(m,function(){n&&a.hideDialog();null!=q&&q()}),e.className="geBtn gePrimaryBtn",
+b.appendChild(e));this.init=function(){t.focus()};k.appendChild(b);this.container=k};
+(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.22";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,k,c,e){if("1"==urlParams.dev)EditorUi.debug("logError",a,b,k,c,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 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(l){}};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(l){}};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,
+":lnum:"+encodeURIComponent(k)+(null!=c?":colno:"+encodeURIComponent(c):"")+(null!=e&&null!=e.stack?"&stack="+encodeURIComponent(e.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(k){}};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(k){}};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=
-!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;EditorUi.prototype.closableScratchpad=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var a=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!a.getContext||!a.getContext("2d"))}catch(t){}try{var b=document.createElement("canvas"),c=new Image;c.onload=function(){try{b.getContext("2d").drawImage(c,0,0);var a=b.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=
-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(t){}try{b=document.createElement("canvas");b.width=b.height=1;var e=b.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=null!==e.match("image/jpeg")}catch(t){}})();
-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 d=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}),f=d.spin;d.spin=function(c,l){var k=!1;this.active||(f.call(this,c),this.active=!0,null!=l&&(k=document.createElement("div"),k.style.position="absolute",k.style.whiteSpace="nowrap",k.style.background="#4B4243",k.style.color="white",k.style.fontFamily="Helvetica, Arial",k.style.fontSize="9pt",k.style.padding="6px",k.style.paddingLeft="10px",k.style.paddingRight=
-"10px",k.style.zIndex=2E9,k.style.left=Math.max(0,a)+"px",k.style.top=Math.max(0,b+70)+"px",mxUtils.setPrefixedStyle(k.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(k.style,"transform","translate(-50%,-50%)"),"dark"!=uiTheme&&mxUtils.setPrefixedStyle(k.style,"boxShadow","2px 2px 3px 0px #ddd"),"..."!=l.substring(l.length-3,l.length)&&(l+="..."),k.innerHTML=l,c.appendChild(k),d.status=k,mxClient.IS_VML&&(null==document.documentMode||8>=document.documentMode)&&(k.style.left=Math.round(Math.max(0,
-a-k.offsetWidth/2))+"px",k.style.top=Math.round(Math.max(0,b+70-k.offsetHeight/2))+"px")),this.pause=mxUtils.bind(this,function(){var a=function(){};this.active&&(a=mxUtils.bind(this,function(){this.spin(c,l)}));this.stop();return a}),k=!0);return k};var l=d.stop;d.stop=function(){l.call(this);this.active=!1;null!=d.status&&(d.status.parentNode.removeChild(d.status),d.status=null)};d.pause=function(){return function(){}};return d};EditorUi.parsePng=function(a,b,c){function d(a,b){var d=l;l+=b;return a.substring(d,
-l)}function f(a){a=d(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}var l=0;if(d(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=c&&c();else if(d(a,4),"IHDR"!=d(a,4))null!=c&&c();else{d(a,17);do{c=f(a);var e=d(a,4);if(null!=b&&b(l-8,e,c))break;value=d(a,c);d(a,4);if("IEND"==e)break}while(c)}};EditorUi.prototype.isCompatibleString=function(a){try{var b=mxUtils.parseXml(a),d=this.editor.extractGraphModel(b.documentElement,!0);
-return null!=d&&0==d.getElementsByTagName("parsererror").length}catch(q){}return!1};var a=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(b){var d=a.apply(this,arguments);if(null==d)try{var c=b.indexOf("&lt;mxfile ");if(0<=c){var e=b.lastIndexOf("&lt;/mxfile&gt;");e>c&&(d=b.substring(c,e+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var t=mxUtils.parseXml(b),g=this.editor.extractGraphModel(t.documentElement,
+!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;EditorUi.prototype.closableScratchpad=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var a=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!a.getContext||!a.getContext("2d"))}catch(t){}try{var b=document.createElement("canvas"),k=new Image;k.onload=function(){try{b.getContext("2d").drawImage(k,0,0);var a=b.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=
+a&&6<a.length}catch(u){}};k.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(t){}try{b=document.createElement("canvas");b.width=b.height=1;var c=b.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=null!==c.match("image/jpeg")}catch(t){}})();
+EditorUi.prototype.openLink=function(a,b,k){return this.editor.graph.openLink(a,b,k)};EditorUi.prototype.showSplash=function(a){};EditorUi.prototype.getLocalData=function(a,b){b(localStorage.getItem(a))};EditorUi.prototype.setLocalData=function(a,b,k){localStorage.setItem(a,b);null!=k&&k()};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,k){k=null!=k?k:24;var d=new Spinner({lines:12,
+length:k,width:Math.round(k/3),radius:Math.round(k/2),rotate:0,color:"dark"==uiTheme?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),f=d.spin;d.spin=function(k,c){var l=!1;this.active||(f.call(this,k),this.active=!0,null!=c&&(l=document.createElement("div"),l.style.position="absolute",l.style.whiteSpace="nowrap",l.style.background="#4B4243",l.style.color="white",l.style.fontFamily="Helvetica, Arial",l.style.fontSize="9pt",l.style.padding="6px",l.style.paddingLeft="10px",l.style.paddingRight=
+"10px",l.style.zIndex=2E9,l.style.left=Math.max(0,a)+"px",l.style.top=Math.max(0,b+70)+"px",mxUtils.setPrefixedStyle(l.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(l.style,"transform","translate(-50%,-50%)"),"dark"!=uiTheme&&mxUtils.setPrefixedStyle(l.style,"boxShadow","2px 2px 3px 0px #ddd"),"..."!=c.substring(c.length-3,c.length)&&(c+="..."),l.innerHTML=c,k.appendChild(l),d.status=l,mxClient.IS_VML&&(null==document.documentMode||8>=document.documentMode)&&(l.style.left=Math.round(Math.max(0,
+a-l.offsetWidth/2))+"px",l.style.top=Math.round(Math.max(0,b+70-l.offsetHeight/2))+"px")),this.pause=mxUtils.bind(this,function(){var a=function(){};this.active&&(a=mxUtils.bind(this,function(){this.spin(k,c)}));this.stop();return a}),l=!0);return l};var c=d.stop;d.stop=function(){c.call(this);this.active=!1;null!=d.status&&(d.status.parentNode.removeChild(d.status),d.status=null)};d.pause=function(){return function(){}};return d};EditorUi.parsePng=function(a,b,k){function d(a,b){var d=c;c+=b;return a.substring(d,
+c)}function f(a){a=d(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}var c=0;if(d(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=k&&k();else if(d(a,4),"IHDR"!=d(a,4))null!=k&&k();else{d(a,17);do{k=f(a);var e=d(a,4);if(null!=b&&b(c-8,e,k))break;value=d(a,k);d(a,4);if("IEND"==e)break}while(k)}};EditorUi.prototype.isCompatibleString=function(a){try{var b=mxUtils.parseXml(a),d=this.editor.extractGraphModel(b.documentElement,!0);
+return null!=d&&0==d.getElementsByTagName("parsererror").length}catch(p){}return!1};var a=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(b){var d=a.apply(this,arguments);if(null==d)try{var k=b.indexOf("&lt;mxfile ");if(0<=k){var c=b.lastIndexOf("&lt;/mxfile&gt;");c>k&&(d=b.substring(k,c+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),d=null!=g?mxUtils.getXml(g):""}catch(w){}return d};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 d=null!=this.pages?this.pages.slice():null,c=a.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<c.length||1==c.length&&c[0].hasAttribute("name")){this.fileNode=a;this.pages=null!=this.pages?this.pages:[];for(var e=c.length-1;0<=e;e--){var g=this.updatePageRoot(new DiagramPage(c[e]));null==g.getName()&&g.setName(mxResources.get("pageWithNumber",[e+1]));b.model.execute(new ChangePage(this,
g,0==e?g: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!=d)for(e=0;e<d.length;e++)b.model.execute(new ChangePage(this,
-d[e],null))}finally{b.model.endUpdate()}}};EditorUi.prototype.createFileData=function(a,b,c,e,t,g,w,h,k,v){b=null!=b?b:this.editor.graph;t=null!=t?t:!1;k=null!=k?k:!0;var d,f=null;null==c||c.getMode()==App.MODE_DEVICE||c.getMode()==App.MODE_BROWSER?d="_blank":f=d=e;if(null==a)return"";var l=a;if("mxfile"!=l.nodeName.toLowerCase()){var q=b.zapGremlins(mxUtils.getXml(a)),l=b.compress(q);if(b.decompress(l)!=q)return q;q=a.ownerDocument.createElement("diagram");q.setAttribute("id",Editor.guid());mxUtils.setTextContent(q,
-l);l=a.ownerDocument.createElement("mxfile");l.appendChild(q)}v?(l=l.cloneNode(!0),l.removeAttribute("userAgent"),l.removeAttribute("version"),l.removeAttribute("editor"),l.removeAttribute("type")):(l.removeAttribute("userAgent"),l.removeAttribute("version"),l.removeAttribute("editor"),l.removeAttribute("type"),l.setAttribute("modified",(new Date).toISOString()),l.setAttribute("host",window.location.hostname),l.setAttribute("agent",navigator.userAgent),l.setAttribute("version",EditorUi.VERSION),l.setAttribute("etag",
-Editor.guid()),a=null!=c?c.getMode():this.mode,null!=a&&l.setAttribute("type",a));a=mxUtils.getXml(l);if(!g&&!t&&(w||null!=c&&/(\.html)$/i.test(c.getTitle())))a=this.getHtml2(mxUtils.getXml(l),b,null!=c?c.getTitle():null,d,f);else if(g||!t&&null!=c&&/(\.svg)$/i.test(c.getTitle()))null==c||c.getMode()!=App.MODE_DEVICE&&c.getMode()!=App.MODE_BROWSER||(e=null),a=this.getEmbeddedSvg(a,b,e,null,h,k,f);return a};EditorUi.prototype.getXmlFileData=function(a,b){a=null!=a?a:!0;b=null!=b?b:!1;var d=this.editor.getGraphXml(a);
+d[e],null))}finally{b.model.endUpdate()}}};EditorUi.prototype.createFileData=function(a,b,k,c,e,g,w,h,l,v){b=null!=b?b:this.editor.graph;e=null!=e?e:!1;l=null!=l?l:!0;var d,f=null;null==k||k.getMode()==App.MODE_DEVICE||k.getMode()==App.MODE_BROWSER?d="_blank":f=d=c;if(null==a)return"";var p=a;if("mxfile"!=p.nodeName.toLowerCase()){var t=b.zapGremlins(mxUtils.getXml(a)),p=b.compress(t);if(b.decompress(p)!=t)return t;t=a.ownerDocument.createElement("diagram");t.setAttribute("id",Editor.guid());mxUtils.setTextContent(t,
+p);p=a.ownerDocument.createElement("mxfile");p.appendChild(t)}v?(p=p.cloneNode(!0),p.removeAttribute("userAgent"),p.removeAttribute("version"),p.removeAttribute("editor"),p.removeAttribute("type")):(p.removeAttribute("userAgent"),p.removeAttribute("version"),p.removeAttribute("editor"),p.removeAttribute("type"),p.setAttribute("modified",(new Date).toISOString()),p.setAttribute("host",window.location.hostname),p.setAttribute("agent",navigator.userAgent),p.setAttribute("version",EditorUi.VERSION),p.setAttribute("etag",
+Editor.guid()),a=null!=k?k.getMode():this.mode,null!=a&&p.setAttribute("type",a));a=mxUtils.getXml(p);if(!g&&!e&&(w||null!=k&&/(\.html)$/i.test(k.getTitle())))a=this.getHtml2(mxUtils.getXml(p),b,null!=k?k.getTitle():null,d,f);else if(g||!e&&null!=k&&/(\.svg)$/i.test(k.getTitle()))null==k||k.getMode()!=App.MODE_DEVICE&&k.getMode()!=App.MODE_BROWSER||(c=null),a=this.getEmbeddedSvg(a,b,c,null,h,l,f);return a};EditorUi.prototype.getXmlFileData=function(a,b){a=null!=a?a:!0;b=null!=b?b:!1;var d=this.editor.getGraphXml(a);
if(a&&null!=this.fileNode&&null!=this.currentPage)if(d=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(d))),mxUtils.setTextContent(this.currentPage.node,d),d=this.fileNode.cloneNode(!1),b)d.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 c=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(this.pages[f].root));this.editor.graph.saveViewState(this.pages[f].viewState,
c);mxUtils.setTextContent(this.pages[f].node,this.editor.graph.compressNode(c));delete this.pages[f].needsUpdate}d.appendChild(this.pages[f].node)}return d};EditorUi.prototype.anonymizeString=function(a){for(var b=[],d=0;d<a.length;d++){var c=a.charAt(d);0<=EditorUi.ignoredAnonymizedChars.indexOf(c)?b.push(c):isNaN(parseInt(c))?c.toLowerCase()!=c?b.push(String.fromCharCode(65+Math.round(25*Math.random()))):c.toUpperCase()!=c?b.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(c)?
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 d=mxUtils.parseXml(a[EditorUi.DIFF_INSERT][b].data).documentElement.cloneNode(!1);null!=d.getAttribute("name")&&d.setAttribute("name",this.anonymizeString(d.getAttribute("name")));a[EditorUi.DIFF_INSERT][b].data=mxUtils.getXml(d)}catch(u){a[EditorUi.DIFF_INSERT][b].data=u.message}if(null!=
-a[EditorUi.DIFF_UPDATE]){for(var c in a[EditorUi.DIFF_UPDATE]){var e=a[EditorUi.DIFF_UPDATE][c];null!=e.name&&(e.name=this.anonymizeString(e.name));null!=e.cells&&(b=mxUtils.bind(this,function(a){var b=e.cells[a];if(null!=b){for(var d in b)null!=b[d].value&&(b[d].value="["+b[d].value.length+"]"),null!=b[d].style&&(b[d].style="["+b[d].style.length+"]"),null!=b[d].geometry&&(b[d].geometry=this.anonymizeString(b[d].geometry)),0==Object.keys(b[d]).length&&delete b[d];0==Object.keys(b).length&&delete e.cells[a]}}),
+a[EditorUi.DIFF_UPDATE]){for(var c in a[EditorUi.DIFF_UPDATE]){var e=a[EditorUi.DIFF_UPDATE][c];null!=e.name&&(e.name=this.anonymizeString(e.name));null!=e.cells&&(b=mxUtils.bind(this,function(a){var b=e.cells[a];if(null!=b){for(var d in b)null!=b[d].value&&(b[d].value="["+b[d].value.length+"]"),null!=b[d].style&&(b[d].style="["+b[d].style.length+"]"),null!=b[d].geometry&&(b[d].geometry="["+b[d].geometry.length+"]"),0==Object.keys(b[d]).length&&delete b[d];0==Object.keys(b).length&&delete e.cells[a]}}),
b(EditorUi.DIFF_INSERT),b(EditorUi.DIFF_UPDATE),0==Object.keys(e.cells).length&&delete e.cells);0==Object.keys(e).length&&delete a[EditorUi.DIFF_UPDATE][c]}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"),d=0;d<b.length;d++)null!=b[d].getAttribute("value")&&b[d].setAttribute("value","["+b[d].getAttribute("value").length+"]"),null!=b[d].getAttribute("style")&&b[d].setAttribute("style","["+b[d].getAttribute("style").length+"]"),null!=b[d].parentNode&&"root"!=b[d].parentNode.nodeName&&null!=b[d].parentNode.parentNode&&(b[d].setAttribute("id",b[d].parentNode.getAttribute("id")),b[d].parentNode.parentNode.replaceChild(b[d],
b[d].parentNode));b=a.getElementsByTagName("mxGeometry");for(d=0;d<b.length;d++)this.anonymizeAttributes(b[d]);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,e,t,g,h,m,k){t=null!=t?t:!0;h=null!=h?h:this.getXmlFileData(t,null!=g?g:!1);k=null!=k?k:this.getCurrentFile();g=this.editor.graph;if(null!=this.pages&&this.currentPage!=this.pages[0]&&(b||!a&&null!=k&&/(\.svg)$/i.test(k.getTitle()))){g=
-this.createTemporaryGraph(g.getStylesheet());var d=g.getGlobalVariable,f=this.pages[0];g.getGlobalVariable=function(a){return"page"==a?f.getName():"pagenumber"==a?1:d.apply(this,arguments)};document.body.appendChild(g.container);g.model.setRoot(f.root)}a=this.createFileData(h,g,k,window.location.href,a,b,c,e,t,m);g!=this.editor.graph&&g.container.parentNode.removeChild(g.container);return a};EditorUi.prototype.getHtml=function(a,b,c,e,t,g){g=null!=g?g:!0;var d=null,f="https://www.draw.io/js/embed-static.min.js";
-if(null!=b){var d=g?b.getGraphBounds():b.getBoundingBox(b.getSelectionCells()),l=b.view.scale;g=Math.floor(d.x/l-b.view.translate.x);l=Math.floor(d.y/l-b.view.translate.y);d=b.background;null==t&&(b=this.getBasenames().join(";"),0<b.length&&(f="https://www.draw.io/embed.js?s="+b));a.setAttribute("x0",g);a.setAttribute("y0",l)}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,e,t,g,h,m,l){t=null!=t?t:!0;h=null!=h?h:this.getXmlFileData(t,null!=g?g:!1);l=null!=l?l:this.getCurrentFile();g=this.editor.graph;if(null!=this.pages&&this.currentPage!=this.pages[0]&&(b||!a&&null!=l&&/(\.svg)$/i.test(l.getTitle()))){g=
+this.createTemporaryGraph(g.getStylesheet());var d=g.getGlobalVariable,f=this.pages[0];g.getGlobalVariable=function(a){return"page"==a?f.getName():"pagenumber"==a?1:d.apply(this,arguments)};document.body.appendChild(g.container);g.model.setRoot(f.root)}a=this.createFileData(h,g,l,window.location.href,a,b,c,e,t,m);g!=this.editor.graph&&g.container.parentNode.removeChild(g.container);return a};EditorUi.prototype.getHtml=function(a,b,c,e,t,g){g=null!=g?g:!0;var d=null,f="https://www.draw.io/js/embed-static.min.js";
+if(null!=b){var d=g?b.getGraphBounds():b.getBoundingBox(b.getSelectionCells()),k=b.view.scale;g=Math.floor(d.x/k-b.view.translate.x);k=Math.floor(d.y/k-b.view.translate.y);d=b.background;null==t&&(b=this.getBasenames().join(";"),0<b.length&&(f="https://www.draw.io/embed.js?s="+b));a.setAttribute("x0",g);a.setAttribute("y0",k)}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!=e&&a.setAttribute("edit",e));null!=t&&(t=t.replace(/&/g,"&amp;"));a=null!=a?this.editor.graph.zapGremlins(mxUtils.getXml(a)):"";e=this.editor.graph.compress(a);this.editor.graph.decompress(e)!=a&&(e=encodeURIComponent(a));return(null==t?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=t?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==t?null!=c?"<title>"+mxUtils.htmlEntities(c)+"</title>\n":"":"<title>Draw.io Diagram</title>\n")+
(null!=t?'<meta http-equiv="refresh" content="0;URL=\''+t+"'\"/>\n":"")+"</head>\n<body"+(null==t&&null!=d&&d!=mxConstants.NONE?' style="background-color:'+d+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+e+"</div>\n</div>\n"+(null==t?'<script type="text/javascript" src="'+f+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+t+'" 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,e,t){null!=t&&(t=t.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==t?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=t?' xmlns="http://www.w3.org/1999/xhtml">':
@@ -7914,51 +7915,51 @@ t+'" target="_blank"><img border="0" src="https://www.draw.io/images/drawlogo128
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 d=new DiagramPage(b[a]);null==d.getName()&&d.setName(mxResources.get("pageWithNumber",[a+1]));this.pages.push(d)}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,e,t,g,h){try{e=null!=e?e:this.editor.graph.isSelectionEmpty();var d=
-this.getBaseFilename(!t),f=d+"."+a;if("xml"==a){var l='<?xml version="1.0" encoding="UTF-8"?>\n'+(b?mxUtils.getXml(this.editor.getGraphXml(e)):this.getFileData(!0,null,null,null,e,t));this.saveData(f,a,l,"text/xml")}else if("html"==a)l=this.getHtml2(this.getFileData(!0),this.editor.graph,d),this.saveData(f,a,l,"text/html");else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==a?f=d+".png":"jpeg"==a&&(f=d+".jpg"),this.saveRequest(f,a,mxUtils.bind(this,
-function(b,d){try{var f=this.editor.graph.pageVisible;null!=g&&(this.editor.graph.pageVisible=g);var c=this.createDownloadRequest(b,a,e,d,h,t);this.editor.graph.pageVisible=f;return c}catch(A){this.handleError(A)}}));else{var q=null,u=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(f,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(q)}))});if("svg"==a){var w=this.editor.graph.background;
-if(h||w==mxConstants.NONE)w=null;var m=this.editor.graph.getSvg(w,null,null,null,null,e);c&&this.editor.graph.addSvgShadow(m);this.convertImages(m,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();u('<?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 f=d+".svg",q=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();u(a)}),e)}}catch(G){this.handleError(G)}};
-EditorUi.prototype.createDownloadRequest=function(a,b,c,e,t,g){var d=this.editor.graph.getGraphBounds();c=this.getFileData(!0,null,null,null,c,0==g?!1:"xmlpng"!=b);var f="",l="";if(d.width*d.height>MAX_AREA||c.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};d="0";"pdf"==b&&0==g&&(l="&allPages=1");if("xmlpng"==b&&(d="1",b="png",null!=this.pages&&null!=this.currentPage))for(g=0;g<this.pages.length;g++)if(this.pages[g]==this.currentPage){f="&from="+g;break}g=this.editor.graph.background;
-"png"==b&&t&&(g=mxConstants.NONE);return new mxXmlRequest(EXPORT_URL,"format="+b+f+l+"&bg="+(null!=g?g:mxConstants.NONE)+"&base64="+e+"&embedXml="+d+"&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 d=window.location.hash,f=mxUtils.bind(this,function(c){var f=null!=a.data?a.data:"";null!=c&&0<c.length&&(0<f.length&&(f+="\n"),f+=c);c=new LocalFile(this,"csv"!=a.format&&
-0<f.length?f:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);c.getHash=function(){return d};this.fileLoaded(c);"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 l=null!=a.interval?parseInt(a.interval):6E4,e=null,t=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()),q()):this.handleError({message:mxResources.get("error")+" "+a.getStatus()}))}),mxUtils.bind(this,function(a){this.handleError(a)}))}),q=mxUtils.bind(this,function(){window.clearTimeout(e);e=window.setTimeout(t,l)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){q();t()}));q();t()}null!=b&&b()});if(null!=a.url&&0<a.url.length){var l=a.url;/^https?:\/\//.test(l)&&
-!this.isCorsEnabledForUrl(l)&&(l=PROXY_URL+"?url="+encodeURIComponent(l));this.loadUrl(l,mxUtils.bind(this,function(a){f(a)}),mxUtils.bind(this,function(a){null!=c&&c(a)}))}else f("")};EditorUi.prototype.updateDiagram=function(a){function b(a){var b=new mxCellOverlay(a.image||e.warningImage,a.tooltip,a.align,a.valign,a.offset);b.addListener(mxEvent.CLICK,function(b,d){c.alert(a.tooltip)});return b}var d=null,c=this;if(null!=a&&0<a.length&&(d=mxUtils.parseXml(a),a=null!=d?d.documentElement:null,null!=
-a&&"updates"==a.nodeName)){var e=this.editor.graph,g=e.getModel();g.beginUpdate();var h=null;try{for(a=a.firstChild;null!=a;){if("update"==a.nodeName){var m=g.getCell(a.getAttribute("id"));if(null!=m){try{var k=a.getAttribute("value");if(null!=k){var v=mxUtils.parseXml(k).documentElement;if(null!=v)if("1"==v.getAttribute("replace-value"))g.setValue(m,v);else for(var p=v.attributes,n=0;n<p.length;n++)e.setAttributeForCell(m,p[n].nodeName,0<p[n].nodeValue.length?p[n].nodeValue:null)}}catch(E){null!=
-window.console&&console.log("Error in value for "+m.id+": "+E)}try{var B=a.getAttribute("style");null!=B&&e.model.setStyle(m,B)}catch(E){null!=window.console&&console.log("Error in style for "+m.id+": "+E)}try{var x=a.getAttribute("icon");if(null!=x){var G=0<x.length?JSON.parse(x):null;null!=G&&G.append||e.removeCellOverlays(m);null!=G&&e.addCellOverlay(m,b(G))}}catch(E){null!=window.console&&console.log("Error in icon for "+m.id+": "+E)}try{var D=a.getAttribute("geometry");if(null!=D){var D=JSON.parse(D),
-F=e.getCellGeometry(m);if(null!=F){F=F.clone();for(key in D){var H=parseFloat(D[key]);"dx"==key?F.x+=H:"dy"==key?F.y+=H:"dw"==key?F.width+=H:"dh"==key?F.height+=H:F[key]=parseFloat(D[key])}e.model.setGeometry(m,F)}}}catch(E){null!=window.console&&console.log("Error in icon for "+m.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,g)}else if("view"==a.nodeName){if(a.hasAttribute("scale")&&
+this.getBaseFilename(!t),f=d+"."+a;if("xml"==a){var k='<?xml version="1.0" encoding="UTF-8"?>\n'+(b?mxUtils.getXml(this.editor.getGraphXml(e)):this.getFileData(!0,null,null,null,e,t));this.saveData(f,a,k,"text/xml")}else if("html"==a)k=this.getHtml2(this.getFileData(!0),this.editor.graph,d),this.saveData(f,a,k,"text/html");else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==a?f=d+".png":"jpeg"==a&&(f=d+".jpg"),this.saveRequest(f,a,mxUtils.bind(this,
+function(b,d){try{var f=this.editor.graph.pageVisible;null!=g&&(this.editor.graph.pageVisible=g);var c=this.createDownloadRequest(b,a,e,d,h,t);this.editor.graph.pageVisible=f;return c}catch(A){this.handleError(A)}}));else{var p=null,u=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(f,"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 w=this.editor.graph.background;
+if(h||w==mxConstants.NONE)w=null;var m=this.editor.graph.getSvg(w,null,null,null,null,e);c&&this.editor.graph.addSvgShadow(m);this.convertImages(m,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();u('<?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 f=d+".svg",p=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();u(a)}),e)}}catch(G){this.handleError(G)}};
+EditorUi.prototype.createDownloadRequest=function(a,b,c,e,t,g){var d=this.editor.graph.getGraphBounds();c=this.getFileData(!0,null,null,null,c,0==g?!1:"xmlpng"!=b);var f="",k="";if(d.width*d.height>MAX_AREA||c.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};d="0";"pdf"==b&&0==g&&(k="&allPages=1");if("xmlpng"==b&&(d="1",b="png",null!=this.pages&&null!=this.currentPage))for(g=0;g<this.pages.length;g++)if(this.pages[g]==this.currentPage){f="&from="+g;break}g=this.editor.graph.background;
+"png"==b&&t&&(g=mxConstants.NONE);return new mxXmlRequest(EXPORT_URL,"format="+b+f+k+"&bg="+(null!=g?g:mxConstants.NONE)+"&base64="+e+"&embedXml="+d+"&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 d=window.location.hash,f=mxUtils.bind(this,function(f){var c=null!=a.data?a.data:"";null!=f&&0<f.length&&(0<c.length&&(c+="\n"),c+=f);f=new LocalFile(this,"csv"!=a.format&&
+0<c.length?c:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);f.getHash=function(){return d};this.fileLoaded(f);"csv"==a.format&&this.importCsv(c,mxUtils.bind(this,function(a){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=a.update){var k=null!=a.interval?parseInt(a.interval):6E4,e=null,p=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()),t()):this.handleError({message:mxResources.get("error")+" "+a.getStatus()}))}),mxUtils.bind(this,function(a){this.handleError(a)}))}),t=mxUtils.bind(this,function(){window.clearTimeout(e);e=window.setTimeout(p,k)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){t();p()}));t();p()}null!=b&&b()});if(null!=a.url&&0<a.url.length){var k=a.url;/^https?:\/\//.test(k)&&
+!this.isCorsEnabledForUrl(k)&&(k=PROXY_URL+"?url="+encodeURIComponent(k));this.loadUrl(k,mxUtils.bind(this,function(a){f(a)}),mxUtils.bind(this,function(a){null!=c&&c(a)}))}else f("")};EditorUi.prototype.updateDiagram=function(a){function b(a){var b=new mxCellOverlay(a.image||e.warningImage,a.tooltip,a.align,a.valign,a.offset);b.addListener(mxEvent.CLICK,function(b,d){c.alert(a.tooltip)});return b}var d=null,c=this;if(null!=a&&0<a.length&&(d=mxUtils.parseXml(a),a=null!=d?d.documentElement:null,null!=
+a&&"updates"==a.nodeName)){var e=this.editor.graph,g=e.getModel();g.beginUpdate();var h=null;try{for(a=a.firstChild;null!=a;){if("update"==a.nodeName){var m=g.getCell(a.getAttribute("id"));if(null!=m){try{var l=a.getAttribute("value");if(null!=l){var v=mxUtils.parseXml(l).documentElement;if(null!=v)if("1"==v.getAttribute("replace-value"))g.setValue(m,v);else for(var q=v.attributes,n=0;n<q.length;n++)e.setAttributeForCell(m,q[n].nodeName,0<q[n].nodeValue.length?q[n].nodeValue:null)}}catch(E){null!=
+window.console&&console.log("Error in value for "+m.id+": "+E)}try{var B=a.getAttribute("style");null!=B&&e.model.setStyle(m,B)}catch(E){null!=window.console&&console.log("Error in style for "+m.id+": "+E)}try{var x=a.getAttribute("icon");if(null!=x){var G=0<x.length?JSON.parse(x):null;null!=G&&G.append||e.removeCellOverlays(m);null!=G&&e.addCellOverlay(m,b(G))}}catch(E){null!=window.console&&console.log("Error in icon for "+m.id+": "+E)}try{var C=a.getAttribute("geometry");if(null!=C){var C=JSON.parse(C),
+F=e.getCellGeometry(m);if(null!=F){F=F.clone();for(key in C){var H=parseFloat(C[key]);"dx"==key?F.x+=H:"dy"==key?F.y+=H:"dw"==key?F.width+=H:"dh"==key?F.height+=H:F[key]=parseFloat(C[key])}e.model.setGeometry(m,F)}}}catch(E){null!=window.console&&console.log("Error in icon for "+m.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,g)}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&&(h=a.hasAttribute("max-scale")?parseFloat(a.getAttribute("max-scale")):1);a=a.nextSibling}}finally{g.endUpdate()}null!=h&&this.chromelessResize&&this.chromelessResize(!0,h)}return d};EditorUi.prototype.getCopyFilename=function(a,b){var d=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename,
-c="",f=d.lastIndexOf(".");0<=f&&(c=d.substring(f),d=d.substring(0,f));if(b)var e=new Date,f=e.getFullYear(),g=e.getMonth()+1,h=e.getDate(),k=e.getHours(),v=e.getMinutes(),e=e.getSeconds(),d=d+(" "+(f+"-"+g+"-"+h+"-"+k+"-"+v+"-"+e));return d=mxResources.get("copyOf",[d])+c};EditorUi.prototype.fileLoaded=function(a){var b=this.getCurrentFile();this.fileLoadedError=null;this.setCurrentFile(null);var d=!1;this.hideDialog();null!=b&&(b.removeListener(this.descriptorChangedListener),b.close());this.editor.graph.model.clear();
+f="",c=d.lastIndexOf(".");0<=c&&(f=d.substring(c),d=d.substring(0,c));if(b)var e=new Date,c=e.getFullYear(),g=e.getMonth()+1,h=e.getDate(),l=e.getHours(),v=e.getMinutes(),e=e.getSeconds(),d=d+(" "+(c+"-"+g+"-"+h+"-"+l+"-"+v+"-"+e));return d=mxResources.get("copyOf",[d])+f};EditorUi.prototype.fileLoaded=function(a){var b=this.getCurrentFile();this.fileLoadedError=null;this.setCurrentFile(null);var d=!1;this.hideDialog();null!=b&&(b.removeListener(this.descriptorChangedListener),b.close());this.editor.graph.model.clear();
this.editor.undoManager.clear();var c=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"));d=!0;this.isOffline()||
null==a.getMode()||EditorUi.logEvent({category:"File",action:"open",label:a.getMode()+"."+a.getSize()});if(this.editor.editable&&this.mode==a.getMode()&&a.getMode()!=App.MODE_DEVICE&&null!=a.getMode())try{this.addRecent({id:a.getHash(),title:a.getTitle(),mode:a.getMode()})}catch(t){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(t){}}catch(t){this.fileLoadedError=t;null!=window.console&&console.log("error in fileLoaded:",a,t);if(EditorUi.enableLogging&&!this.isOffline())try{(new Image).src=
(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?v="+encodeURIComponent(EditorUi.VERSION)+"&msg=errorInFileLoaded:url:"+encodeURIComponent(window.location.href)+(null!=t&&null!=t.message?":err:"+encodeURIComponent(t.message):"")+(null!=t&&null!=t.stack?"&stack="+encodeURIComponent(t.stack):"")}catch(u){}this.handleError(t,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):c()}),!0)}else c();return d};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(d),this.editor.removeListener("hideDialog",b),this.editor.graph.removeListener(b),null!=window.requestAnimationFrame?window.requestAnimationFrame(a):
-a())}),d={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(d);this.editor.addListener("hideDialog",b)}else null!=window.requestAnimationFrame?window.requestAnimationFrame(a):a()};EditorUi.prototype.getHashValueForPages=function(a,b){var d=0,c=new mxGraphModel,f=new mxCodec;null!=b&&(b.byteCount=0,b.attrCount=0,b.eltCount=0,b.nodeCount=0,b.cellCount=0);
-for(var e=0;e<a.length;e++){this.updatePageRoot(a[e]);var g=a[e].node.cloneNode(!1);g.removeAttribute("name");c.root=a[e].root;var h=f.encode(c);this.editor.graph.saveViewState(a[e].viewState,h,!0);g.appendChild(h);null!=b&&(b.eltCount+=g.getElementsByTagName("*").length,b.nodeCount+=g.getElementsByTagName("mxCell").length,b.cellCount+=c.getDescendants(c.root).length);d=(d<<5)-d+this.hashValue(g,null,b)<<0}return d};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));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,l=null!=b?b(a,e,!0):a.attributes[f].value;null!=l&&(d^=this.hashValue(e,b,c)+this.hashValue(l,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,e,t,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(),d=b.createElement("mxlibrary");mxUtils.setTextContent(d,JSON.stringify(a));b.appendChild(d);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 d=0;d<b.length;d++)b[d].parentNode.removeChild(b[d]);delete this.sidebar.palettes[a]}};EditorUi.prototype.repositionLibrary=function(a){var b=this.sidebar.container;if(null==a){var d=this.sidebar.palettes["L.scratchpad"];null==d&&(d=this.sidebar.palettes.search);null!=d&&(a=d[d.length-1].nextSibling)}a=null!=a?a:b.firstChild.nextSibling.nextSibling;
-var d=b.lastChild,c=d.previousSibling;b.insertBefore(d,a);b.insertBefore(c,d)};EditorUi.prototype.loadLibrary=function(a){var b=mxUtils.parseXml(a.getData());if("mxlibrary"==b.documentElement.nodeName){var d=JSON.parse(mxUtils.getTextContent(b.documentElement));this.libraryLoaded(a,d,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,e=mxUtils.bind(this,function(b,d){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"))),d.appendChild(f)):this.addLibraryEntries(b,d)});if(null!=this.sidebar&&null!=b)for(var l=0;l<b.length;l++)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 d="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==a.aspect&&(d+="aspect=fixed;");return this.sidebar.createVertexTemplate(d+
-"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[l]);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 k=g.parentNode.previousSibling;c=k.getAttribute("title");null!=
-c&&0<c.length&&".scratchpad"!=a.title&&k.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");k.style.position="relative";var m=document.createElement("img");m.setAttribute("src",Dialog.prototype.closeImage);m.setAttribute("title",mxResources.get("close"));m.setAttribute("valign","absmiddle");
-m.setAttribute("border","0");m.style.margin="0 3px";var p=null;if(".scratchpad"!=a.title||this.closableScratchpad)h.appendChild(m),mxEvent.addListener(m,"click",mxUtils.bind(this,function(b){if(!mxEvent.isConsumed(b)){var d=mxUtils.bind(this,function(){this.closeLibrary(a)});null!=p?this.confirm(mxResources.get("allChangesLost"),null,d,mxResources.get("cancel"),mxResources.get("discardChanges")):d();mxEvent.consume(b)}}));if(a.isEditable()){var n=this.editor.graph,x=null,G=mxUtils.bind(this,function(d){this.showLibraryDialog(a.getTitle(),
-g,b,a,a.getMode());mxEvent.consume(d)}),D=mxUtils.bind(this,function(d){a.setModified(!0);a.isAutosave()?(null!=x&&null!=x.parentNode&&x.parentNode.removeChild(x),x=m.cloneNode(!1),x.setAttribute("src",Editor.spinImage),x.setAttribute("title",mxResources.get("saving")),x.style.cursor="default",x.style.marginRight="2px",x.style.marginTop="-2px",h.insertBefore(x,h.firstChild),k.style.paddingRight=18*h.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=x&&null!=
-x.parentNode&&(x.parentNode.removeChild(x),k.style.paddingRight=18*h.childNodes.length+"px")})):null==p&&(p=m.cloneNode(!1),p.setAttribute("src",IMAGE_PATH+"/download.png"),p.setAttribute("title",mxResources.get("save")),h.insertBefore(p,h.firstChild),mxEvent.addListener(p,"click",mxUtils.bind(this,function(d){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==p||a.isModified()||(k.style.paddingRight=18*h.childNodes.length+"px",p.parentNode.removeChild(p),
-p=null)});mxEvent.consume(d)})),k.style.paddingRight=18*h.childNodes.length+"px")}),F=mxUtils.bind(this,function(a,d,c,e){a=n.cloneCells(mxUtils.sortCells(n.model.getTopmostCells(a)));for(var k=0;k<a.length;k++){var l=n.getCellGeometry(a[k]);null!=l&&l.translate(-d.x,-d.y)}g.appendChild(this.sidebar.createVertexTemplateFromCells(a,d.width,d.height,e||"",!0,!1,!1));a={xml:this.editor.graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:d.width,h:d.height};null!=e&&(a.title=e);b.push(a);
-D(c);null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)}),H=mxUtils.bind(this,function(a){if(n.isSelectionEmpty())n.getRubberband().isActive()?(n.getRubberband().execute(a),n.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var b=n.getSelectionCells(),d=n.view.getBounds(b),c=n.view.scale;d.x/=c;d.y/=c;d.width/=c;d.height/=c;d.x-=n.view.translate.x;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,l,q,t,h,v,u){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,m=mxUtils.bind(this,function(d,c){if(null!=d&&"text/xml"==c){var k=mxUtils.parseXml(d);if("mxlibrary"==k.documentElement.nodeName)try{var l=JSON.parse(mxUtils.getTextContent(k.documentElement));e(l,g);b=b.concat(l);D(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 l=mxUtils.getTextContent(q[k]),t=this.stringToCells(this.editor.graph.decompress(l)),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){m(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?m(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":
-"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):m(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()}));m=m.cloneNode(!1);m.setAttribute("src",Editor.editImage);m.setAttribute("title",mxResources.get("edit"));h.insertBefore(m,h.firstChild);mxEvent.addListener(m,"click",G);mxEvent.addListener(g,
+a())}),d={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(d);this.editor.addListener("hideDialog",b)}else null!=window.requestAnimationFrame?window.requestAnimationFrame(a):a()};EditorUi.prototype.getHashValueForPages=function(a,b){var d=0,f=new mxGraphModel,c=new mxCodec;null!=b&&(b.byteCount=0,b.attrCount=0,b.eltCount=0,b.nodeCount=0,b.cellCount=0);
+for(var e=0;e<a.length;e++){this.updatePageRoot(a[e]);var g=a[e].node.cloneNode(!1);g.removeAttribute("name");f.root=a[e].root;var h=c.encode(f);this.editor.graph.saveViewState(a[e].viewState,h,!0);g.appendChild(h);null!=b&&(b.eltCount+=g.getElementsByTagName("*").length,b.nodeCount+=g.getElementsByTagName("mxCell").length,b.cellCount+=f.getDescendants(f.root).length);d=(d<<5)-d+this.hashValue(g,function(a,b,d,f){return!f||"mxGeometry"!=a.nodeName&&"mxPoint"!=a.nodeName||"x"!=b&&"y"!=b&&"width"!=
+b&&"height"!=b?d:Math.round(d)},b)<<0}return d};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 k=a.attributes[f].name,e=null!=b?b(a,k,a.attributes[f].value,!0):a.attributes[f].value;null!=e&&(d^=this.hashValue(k,
+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,e,t,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(),d=b.createElement("mxlibrary");mxUtils.setTextContent(d,JSON.stringify(a));b.appendChild(d);
+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 d=0;d<b.length;d++)b[d].parentNode.removeChild(b[d]);delete this.sidebar.palettes[a]}};EditorUi.prototype.repositionLibrary=function(a){var b=this.sidebar.container;
+if(null==a){var d=this.sidebar.palettes["L.scratchpad"];null==d&&(d=this.sidebar.palettes.search);null!=d&&(a=d[d.length-1].nextSibling)}a=null!=a?a:b.firstChild.nextSibling.nextSibling;var d=b.lastChild,c=d.previousSibling;b.insertBefore(d,a);b.insertBefore(c,d)};EditorUi.prototype.loadLibrary=function(a){var b=mxUtils.parseXml(a.getData());if("mxlibrary"==b.documentElement.nodeName){var d=JSON.parse(mxUtils.getTextContent(b.documentElement));this.libraryLoaded(a,d,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,e=mxUtils.bind(this,function(b,d){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"))),d.appendChild(f)):this.addLibraryEntries(b,d)});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 d="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";
+"fixed"==a.aspect&&(d+="aspect=fixed;");return this.sidebar.createVertexTemplate(d+"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 l=g.parentNode.previousSibling;c=l.getAttribute("title");null!=c&&0<c.length&&".scratchpad"!=a.title&&l.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");l.style.position="relative";var m=document.createElement("img");m.setAttribute("src",Dialog.prototype.closeImage);m.setAttribute("title",
+mxResources.get("close"));m.setAttribute("valign","absmiddle");m.setAttribute("border","0");m.style.margin="0 3px";var q=null;if(".scratchpad"!=a.title||this.closableScratchpad)h.appendChild(m),mxEvent.addListener(m,"click",mxUtils.bind(this,function(b){if(!mxEvent.isConsumed(b)){var d=mxUtils.bind(this,function(){this.closeLibrary(a)});null!=q?this.confirm(mxResources.get("allChangesLost"),null,d,mxResources.get("cancel"),mxResources.get("discardChanges")):d();mxEvent.consume(b)}}));if(a.isEditable()){var n=
+this.editor.graph,x=null,G=mxUtils.bind(this,function(d){this.showLibraryDialog(a.getTitle(),g,b,a,a.getMode());mxEvent.consume(d)}),C=mxUtils.bind(this,function(d){a.setModified(!0);a.isAutosave()?(null!=x&&null!=x.parentNode&&x.parentNode.removeChild(x),x=m.cloneNode(!1),x.setAttribute("src",Editor.spinImage),x.setAttribute("title",mxResources.get("saving")),x.style.cursor="default",x.style.marginRight="2px",x.style.marginTop="-2px",h.insertBefore(x,h.firstChild),l.style.paddingRight=18*h.childNodes.length+
+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=x&&null!=x.parentNode&&(x.parentNode.removeChild(x),l.style.paddingRight=18*h.childNodes.length+"px")})):null==q&&(q=m.cloneNode(!1),q.setAttribute("src",IMAGE_PATH+"/download.png"),q.setAttribute("title",mxResources.get("save")),h.insertBefore(q,h.firstChild),mxEvent.addListener(q,"click",mxUtils.bind(this,function(d){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==q||a.isModified()||
+(l.style.paddingRight=18*h.childNodes.length+"px",q.parentNode.removeChild(q),q=null)});mxEvent.consume(d)})),l.style.paddingRight=18*h.childNodes.length+"px")}),F=mxUtils.bind(this,function(a,d,c,e){a=n.cloneCells(mxUtils.sortCells(n.model.getTopmostCells(a)));for(var k=0;k<a.length;k++){var l=n.getCellGeometry(a[k]);null!=l&&l.translate(-d.x,-d.y)}g.appendChild(this.sidebar.createVertexTemplateFromCells(a,d.width,d.height,e||"",!0,!1,!1));a={xml:this.editor.graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),
+w:d.width,h:d.height};null!=e&&(a.title=e);b.push(a);C(c);null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)}),H=mxUtils.bind(this,function(a){if(n.isSelectionEmpty())n.getRubberband().isActive()?(n.getRubberband().execute(a),n.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var b=n.getSelectionCells(),d=n.view.getBounds(b),c=n.view.scale;d.x/=c;d.y/=c;d.width/=c;d.height/=c;d.x-=n.view.translate.x;
+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,l,p,t,h,v,u){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,p,t),d)],d[0].vertex=!0,F(d,new mxRectangle(0,0,p,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,m=mxUtils.bind(this,function(d,c){if(null!=d&&"text/xml"==c){var k=mxUtils.parseXml(d);if("mxlibrary"==k.documentElement.nodeName)try{var l=JSON.parse(mxUtils.getTextContent(k.documentElement));e(l,g);b=b.concat(l);C(a);
+this.spinner.stop();w=!0}catch(X){}else if("mxfile"==k.documentElement.nodeName)try{for(var p=k.documentElement.getElementsByTagName("diagram"),k=0;k<p.length;k++){var l=mxUtils.getTextContent(p[k]),t=this.stringToCells(this.editor.graph.decompress(l)),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){m(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?m(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?
+"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):m(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()}));m=m.cloneNode(!1);m.setAttribute("src",Editor.editImage);m.setAttribute("title",mxResources.get("edit"));h.insertBefore(m,h.firstChild);mxEvent.addListener(m,"click",G);mxEvent.addListener(g,
"dblclick",function(a){mxEvent.getSource(a)==g&&G(a)});c=m.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+
+mxUtils.bind(this,function(a){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(a)})),h.insertBefore(c,h.firstChild))}l.appendChild(h);l.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+
"image="+f,c.w,c.h,"",c.title||"",!1,!1,!0))}else null!=c.xml&&(f=this.stringToCells(this.editor.graph.decompress(c.xml)),0<f.length&&b.appendChild(this.sidebar.createVertexTemplateFromCells(f,c.w,c.h,c.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=
@@ -7967,17 +7968,17 @@ 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,e,g){a=new ImageDialog(this,a,b,c,e,g);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,e,g){a=new LibraryDialog(this,a,b,c,e,g);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,e){var d=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 l=mxResources.get("ok"),g=null;b=null!=b?b:mxResources.get("error");if(null!=f)if(null!=f.retry&&(l=mxResources.get("cancel"),g=function(){d();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,l,c,g,null,null,null,null,null,null,null,e?c:null)}else null!=c&&c()};EditorUi.prototype.showError=function(a,b,c,e,g,h,m,n,k,v,p,C,B){a=new ErrorDialog(this,a,b,c||mxResources.get("ok"),e,g,h,m,C,n,k);this.showDialog(a.container,v||340,p||(null!=b&&120<b.length?180:150),!0,!1,B);a.init()};EditorUi.prototype.alert=
+mxEvent.consume(a)}));a.appendChild(b);return a};EditorUi.prototype.handleError=function(a,b,c,e){var d=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 k=mxResources.get("ok"),g=null;b=null!=b?b:mxResources.get("error");if(null!=f)if(null!=f.retry&&(k=mxResources.get("cancel"),g=function(){d();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 l=window.location.hash;null!=l&&"#G"==l.substring(0,2)&&(l=l.substring(2),a+='<br><a href="https://drive.google.com/open?id='+l+'" 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,k,c,g,null,null,null,null,null,null,null,e?c:null)}else null!=c&&c()};EditorUi.prototype.showError=function(a,b,c,e,g,h,w,m,l,v,n,q,B){a=new ErrorDialog(this,a,b,c||mxResources.get("ok"),e,g,h,w,q,m,l);this.showDialog(a.container,v||340,n||(null!=b&&120<b.length?180:150),!0,!1,B);a.init()};EditorUi.prototype.alert=
function(a,b){var d=new ErrorDialog(this,null,a,mxResources.get("ok"),b);this.showDialog(d.container,340,100,!0,!1);d.init()};EditorUi.prototype.confirm=function(a,b,c,e,g){var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){};a=new ConfirmDialog(this,a,function(){d();null!=b&&b()},function(){d();null!=c&&c()},e,g);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 d=new TextareaDialog(this,a,b,null,null,mxResources.get("close"));d.textarea.style.width="600px";d.textarea.style.height="380px";this.showDialog(d.container,620,460,!0,!0);d.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(a,b,c,e,g){if(window.Blob&&navigator.msSaveOrOpenBlob)a=e?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 d=document.createElement("a"),f=!mxClient.IS_SF&&0>navigator.userAgent.indexOf("PaleMoon/")&&"undefined"!==typeof d.download;if(mxClient.IS_GC)var l=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./),f=65==(l?parseInt(l[2],10):!1)?!1:f;if(f||this.isOffline()){d.href=URL.createObjectURL(e?this.base64ToBlob(a,
-c):new Blob([a],{type:c}));f?d.download=b:d.setAttribute("target","_blank");document.body.appendChild(d);try{window.setTimeout(function(){URL.revokeObjectURL(d.href)},0),d.click(),d.parentNode.removeChild(d)}catch(k){}}else this.createEchoRequest(a,b,c,e,g).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,c,e,g,h){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=c?"&mime="+c:"")+(null!=g?"&format="+g:"")+(null!=h?"&base64="+h:"")+(null!=b?"&filename="+
-encodeURIComponent(b):"")+(e?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=b||"";for(var d=atob(a),c=d.length,f=Math.ceil(c/1024),e=Array(f),g=0;g<f;++g){for(var h=1024*g,k=Math.min(h+1024,c),v=Array(k-h),m=0;h<k;++m,++h)v[m]=d[h].charCodeAt(0);e[g]=new Uint8Array(v)}return new Blob(e,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,c,e,g,h,m){h=null!=h?h:!1;m=null!=m?m:"vsdx"!=g&&(!mxClient.IS_IOS||!navigator.standalone);g=this.getServiceCount(h);b=new CreateDialog(this,
-b,mxUtils.bind(this,function(b,d){try{if("_blank"==d)if(null==c||"image/"!=c.substring(0,6)||"image/svg"==c.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,c,e);else d==App.MODE_DEVICE||"download"==d?this.doSaveLocalFile(a,b,c,e):null!=b&&0<b.length&&this.pickFolder(d,mxUtils.bind(this,function(f){try{this.exportFile(a,b,c,e,d,f)}catch(C){this.handleError(C)}}))}catch(z){this.handleError(z)}}),
+"_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 d=document.createElement("a"),f=!mxClient.IS_SF&&0>navigator.userAgent.indexOf("PaleMoon/")&&"undefined"!==typeof d.download;if(mxClient.IS_GC)var k=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./),f=65==(k?parseInt(k[2],10):!1)?!1:f;if(f||this.isOffline()){d.href=URL.createObjectURL(e?this.base64ToBlob(a,
+c):new Blob([a],{type:c}));f?d.download=b:d.setAttribute("target","_blank");document.body.appendChild(d);try{window.setTimeout(function(){URL.revokeObjectURL(d.href)},0),d.click(),d.parentNode.removeChild(d)}catch(l){}}else this.createEchoRequest(a,b,c,e,g).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,c,e,g,h){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=c?"&mime="+c:"")+(null!=g?"&format="+g:"")+(null!=h?"&base64="+h:"")+(null!=b?"&filename="+
+encodeURIComponent(b):"")+(e?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=b||"";for(var d=atob(a),c=d.length,f=Math.ceil(c/1024),e=Array(f),g=0;g<f;++g){for(var h=1024*g,l=Math.min(h+1024,c),v=Array(l-h),m=0;h<l;++m,++h)v[m]=d[h].charCodeAt(0);e[g]=new Uint8Array(v)}return new Blob(e,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,c,e,g,h,m){h=null!=h?h:!1;m=null!=m?m:"vsdx"!=g&&(!mxClient.IS_IOS||!navigator.standalone);g=this.getServiceCount(h);b=new CreateDialog(this,
+b,mxUtils.bind(this,function(b,d){try{if("_blank"==d)if(null==c||"image/"!=c.substring(0,6)||"image/svg"==c.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,c,e);else d==App.MODE_DEVICE||"download"==d?this.doSaveLocalFile(a,b,c,e):null!=b&&0<b.length&&this.pickFolder(d,mxUtils.bind(this,function(f){try{this.exportFile(a,b,c,e,d,f)}catch(D){this.handleError(D)}}))}catch(z){this.handleError(z)}}),
mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,h,m,null,1<g,4<g&&(!h||6>g)?3:4,a,c,e);this.showDialog(b.container,420,g==(mxClient.IS_IOS?0:1)?160:4<g?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 d=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",d);
null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)d.apply(this);else{this.exportDialog=document.createElement("div");var c=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=
@@ -7987,9 +7988,9 @@ a.setAttribute("border","0");a.setAttribute("src",b);this.exportDialog.appendChi
arguments)};EditorUi.prototype.saveData=function(a,b,c,e,g){this.isLocalFileSave()?this.saveLocalFile(c,a,e,g,b):this.saveRequest(a,b,mxUtils.bind(this,function(a,d){return this.createEchoRequest(c,a,e,g,b,d)}),c,g,e)};EditorUi.prototype.saveRequest=function(a,b,c,e,g,h,m){m=null!=m?m:!mxClient.IS_IOS||!navigator.standalone;var d=this.getServiceCount(!1);a=new CreateDialog(this,a,mxUtils.bind(this,function(a,d){if("_blank"==d||null!=a&&0<a.length){var f=c("_blank"==d?null:a,d==App.MODE_DEVICE||"download"==
d||null==d||"_blank"==d?"0":"1");null!=f&&(d==App.MODE_DEVICE||"download"==d||"_blank"==d?f.simulate(document,"_blank"):this.pickFolder(d,mxUtils.bind(this,function(c){h=null!=h?h:"pdf"==b?"application/pdf":"image/"+b;if(null!=e)try{this.exportFile(e,a,h,!0,d,c)}catch(B){this.handleError(B)}else this.spinner.spin(document.body,mxResources.get("saving"))&&f.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=f.getStatus()&&299>=f.getStatus())try{this.exportFile(f.getText(),a,h,!0,d,c)}catch(B){this.handleError(B)}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,m,null,1<d,4<d?3:4,e,h,g);this.showDialog(a.container,380,d==(mxClient.IS_IOS?0:1)?160:4<d?390:270,!0,!0);a.init()};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(a,b,c,e,g,h){};EditorUi.prototype.pickFolder=function(a,b,c){b(null)};EditorUi.prototype.exportSvg=function(a,
-b,c,e,g,h,m,n,k,v){if(this.spinner.spin(document.body,mxResources.get("export"))){var d=this.editor.graph.isSelectionEmpty();c=null!=c?c:d;d=b?null:this.editor.graph.background;d==mxConstants.NONE&&(d=null);null==d&&0==b&&(d="#ffffff");var f=this.editor.graph.getSvg(d,a,m,n,null,c,null,null,"blank"==v?"_blank":"self"==v?"_top":null);e&&this.editor.graph.addSvgShadow(f,f);var l=this.getBaseFilename()+".svg",q=mxUtils.bind(this,function(a){this.spinner.stop();g&&a.setAttribute("content",this.getFileData(!0,
-null,null,null,c,k));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(l,"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,f,!1,mxUtils.bind(this,function(){h?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.convertImages(f,q,this.thumbImageCache)):q(f)}))}};EditorUi.prototype.addRadiobox=function(a,b,c,e,g,h,m){return this.addCheckbox(a,c,e,g,h,m,!0,b)};EditorUi.prototype.addCheckbox=function(a,b,c,e,g,h,m,n){h=null!=h?
+b,c,e,g,h,m,n,l,v){if(this.spinner.spin(document.body,mxResources.get("export"))){var d=this.editor.graph.isSelectionEmpty();c=null!=c?c:d;d=b?null:this.editor.graph.background;d==mxConstants.NONE&&(d=null);null==d&&0==b&&(d="#ffffff");var f=this.editor.graph.getSvg(d,a,m,n,null,c,null,null,"blank"==v?"_blank":"self"==v?"_top":null);e&&this.editor.graph.addSvgShadow(f,f);var k=this.getBaseFilename()+".svg",p=mxUtils.bind(this,function(a){this.spinner.stop();g&&a.setAttribute("content",this.getFileData(!0,
+null,null,null,c,l));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(k,"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,f,!1,mxUtils.bind(this,function(){h?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.convertImages(f,p,this.thumbImageCache)):p(f)}))}};EditorUi.prototype.addRadiobox=function(a,b,c,e,g,h,m){return this.addCheckbox(a,c,e,g,h,m,!0,b)};EditorUi.prototype.addCheckbox=function(a,b,c,e,g,h,m,n){h=null!=h?
h:!0;var d=document.createElement("input");d.style.marginRight="8px";d.style.marginTop="16px";d.setAttribute("type",m?"radio":"checkbox");m="geCheckbox-"+Editor.guid();d.id=m;null!=n&&d.setAttribute("name",n);c&&(d.setAttribute("checked","checked"),d.defaultChecked=!0);e&&d.setAttribute("disabled","disabled");h&&(a.appendChild(d),c=document.createElement("label"),mxUtils.write(c,b),c.setAttribute("for",m),a.appendChild(c),g||mxUtils.br(a));return d};EditorUi.prototype.addEditButton=function(a,b){var d=
this.addCheckbox(a,mxResources.get("edit")+":",!0,null,!0);d.style.marginLeft="24px";var c=this.getCurrentFile(),f="";null!=c&&c.getMode()!=App.MODE_DEVICE&&c.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";c=document.createElement("option");c.setAttribute("value","blank");mxUtils.write(c,mxResources.get("makeCopy"));e.appendChild(c);c=document.createElement("option");
c.setAttribute("value","custom");mxUtils.write(c,mxResources.get("custom")+"...");e.appendChild(c);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(d,"change",mxUtils.bind(this,function(){d.checked&&(null==b||
@@ -7998,122 +7999,122 @@ Dialog.prototype.closeImage+"')")+';"></div>'}mxUtils.write(a,mxResources.get("l
f.setAttribute("value","self");mxUtils.write(f,mxResources.get("openInThisWindow"));c.appendChild(f);b&&(f=document.createElement("option"),f.setAttribute("value","frame"),mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),c.appendChild(f));a.appendChild(c);mxUtils.write(a,mxResources.get("borderColor")+":");var e="#0000ff",g=null,g=mxUtils.button("",mxUtils.bind(this,function(a){this.pickColor(e||"none",function(a){e=a;d()});mxEvent.consume(a)}));d();g.style.padding=
mxClient.IS_FF?"4px 2px 4px 2px":"4px";g.style.marginLeft="4px";g.style.height="22px";g.style.width="22px";g.style.position="relative";g.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";g.className="geColorBtn";a.appendChild(g);mxUtils.br(a);return{getColor:function(){return e},getTarget:function(){return c.value},focus:function(){c.focus()}}};EditorUi.prototype.createLink=function(a,b,c,e,g,h,m,n){var d=this.getCurrentFile(),f=[];e&&(f.push("lightbox=1"),"auto"!=a&&f.push("target="+
a),null!=b&&b!=mxConstants.NONE&&f.push("highlight="+("#"==b.charAt(0)?b.substring(1):b)),null!=g&&0<g.length&&f.push("edit="+encodeURIComponent(g)),h&&f.push("layers=1"),this.editor.graph.foldingEnabled&&f.push("nav=1"));c&&(a=this.getSelectedPageIndex(),0<a&&f.push("page="+a));a=!0;null!=m?c="#U"+encodeURIComponent(m):(d=this.getCurrentFile(),n||null==d||d.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="#"+d.getHash(),a=!1));a&&null!=d&&null!=d.getTitle()&&d.getTitle()!=this.defaultFilename&&f.push("title="+encodeURIComponent(d.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("&"):"")+c};EditorUi.prototype.createHtml=function(a,b,c,e,g,h,m,n,k,v,p){this.getBasenames();var d={};""!=g&&g!=mxConstants.NONE&&(d.highlight=g);"auto"!==e&&(d.target=e);
-k||(d.lightbox=!1);d.nav=this.editor.graph.foldingEnabled;c=parseInt(c);isNaN(c)||100==c||(d.zoom=c/100);c=[];m&&(c.push("pages"),d.resize=!0,null!=this.pages&&null!=this.currentPage&&(d.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(c.push("zoom"),d.resize=!0);n&&c.push("layers");0<c.length&&(k&&c.push("lightbox"),d.toolbar=c.join(" "));null!=v&&0<v.length&&(d.edit=v);null!=a?d.url=a:d.xml=this.getFileData(!0,null,null,null,null,!m);b='<div class="mxgraph" style="'+(h?"max-width:100%;":
-"")+(""!=c?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(d))+'"></div>';a=null!=a?"&fetch="+encodeURIComponent(a):"";p(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,e){var d=document.createElement("div");
-d.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("html"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";d.appendChild(f);var l=document.createElement("div");l.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var 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");f=g.cloneNode(!0);f.setAttribute("value","copy");l.appendChild(f);var k=document.createElement("span");mxUtils.write(k,mxResources.get("includeCopyOfMyDiagram"));l.appendChild(k);mxUtils.br(l);l.appendChild(g);k=document.createElement("span");mxUtils.write(k,mxResources.get("publicDiagramUrl"));l.appendChild(k);var h=this.getCurrentFile();null==c&&null!=h&&h.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")),l.appendChild(k),mxEvent.addListener(k,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(h.getId())})));f.setAttribute("checked","checked");null==c&&g.setAttribute("disabled","disabled");d.appendChild(l);var q=this.addLinkSection(d),m=this.addCheckbox(d,mxResources.get("zoom"),!0,null,!0);mxUtils.write(d,":");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%";d.appendChild(n);var p=this.addCheckbox(d,mxResources.get("fit"),!0),l=null!=this.pages&&1<this.pages.length,G=G=this.addCheckbox(d,mxResources.get("allPages"),l,!l),D=this.addCheckbox(d,mxResources.get("layers"),!0),F=this.addCheckbox(d,mxResources.get("lightbox"),!0),H=this.addEditButton(d,F),A=H.getEditInput();A.style.marginBottom="16px";mxEvent.addListener(F,"change",function(){F.checked?A.removeAttribute("disabled"):
-A.setAttribute("disabled","disabled");A.checked&&F.checked?H.getEditSelect().removeAttribute("disabled"):H.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,d,mxUtils.bind(this,function(){e(g.checked?c:null,m.checked,n.value,q.getTarget(),q.getColor(),p.checked,G.checked,D.checked,F.checked,H.getLink())}),null,a,b);this.showDialog(a.container,340,384,!0,!0);f.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,c,e,g,h){var d=document.createElement("div");d.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";d.appendChild(f);var k=this.getCurrentFile(),f="https://desk.draw.io/support/solutions/articles/16000051941";a=0;if(null!=k&&k.constructor==window.DriveFile&&!b){a=80;var f="https://desk.draw.io/support/solutions/articles/16000039384",l=document.createElement("div");l.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";
-var q=document.createElement("div");q.style.whiteSpace="normal";mxUtils.write(q,mxResources.get("linkAccountRequired"));l.appendChild(q);q=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(k.getId())}));q.style.marginTop="12px";q.className="geBtn";l.appendChild(q);d.appendChild(l);q=document.createElement("a");q.style.paddingLeft="12px";q.style.color="gray";q.style.fontSize="11px";q.setAttribute("href","javascript:void(0);");mxUtils.write(q,mxResources.get("check"));
-l.appendChild(q);mxEvent.addListener(q,"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 t=null,m=null;if(null!=c||null!=e)a+=30,mxUtils.write(d,mxResources.get("width")+":"),t=document.createElement("input"),
+(c="#"+d.getHash(),a=!1));a&&null!=d&&null!=d.getTitle()&&d.getTitle()!=this.defaultFilename&&f.push("title="+encodeURIComponent(d.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("&"):"")+c};EditorUi.prototype.createHtml=function(a,b,c,e,g,h,m,n,l,v,q){this.getBasenames();var d={};""!=g&&g!=mxConstants.NONE&&(d.highlight=g);"auto"!==e&&(d.target=e);
+l||(d.lightbox=!1);d.nav=this.editor.graph.foldingEnabled;c=parseInt(c);isNaN(c)||100==c||(d.zoom=c/100);c=[];m&&(c.push("pages"),d.resize=!0,null!=this.pages&&null!=this.currentPage&&(d.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(c.push("zoom"),d.resize=!0);n&&c.push("layers");0<c.length&&(l&&c.push("lightbox"),d.toolbar=c.join(" "));null!=v&&0<v.length&&(d.edit=v);null!=a?d.url=a:d.xml=this.getFileData(!0,null,null,null,null,!m);b='<div class="mxgraph" style="'+(h?"max-width:100%;":
+"")+(""!=c?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(d))+'"></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,c,e){var d=document.createElement("div");
+d.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("html"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";d.appendChild(f);var 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");f=g.cloneNode(!0);f.setAttribute("value","copy");k.appendChild(f);var l=document.createElement("span");mxUtils.write(l,mxResources.get("includeCopyOfMyDiagram"));k.appendChild(l);mxUtils.br(k);k.appendChild(g);l=document.createElement("span");mxUtils.write(l,mxResources.get("publicDiagramUrl"));k.appendChild(l);var h=this.getCurrentFile();null==c&&null!=h&&h.constructor==window.DriveFile&&(l=document.createElement("a"),l.style.paddingLeft="12px",l.style.color="gray",l.setAttribute("href",
+"javascript:void(0);"),mxUtils.write(l,mxResources.get("share")),k.appendChild(l),mxEvent.addListener(l,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(h.getId())})));f.setAttribute("checked","checked");null==c&&g.setAttribute("disabled","disabled");d.appendChild(k);var p=this.addLinkSection(d),m=this.addCheckbox(d,mxResources.get("zoom"),!0,null,!0);mxUtils.write(d,":");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%";d.appendChild(n);var q=this.addCheckbox(d,mxResources.get("fit"),!0),k=null!=this.pages&&1<this.pages.length,G=G=this.addCheckbox(d,mxResources.get("allPages"),k,!k),C=this.addCheckbox(d,mxResources.get("layers"),!0),F=this.addCheckbox(d,mxResources.get("lightbox"),!0),H=this.addEditButton(d,F),A=H.getEditInput();A.style.marginBottom="16px";mxEvent.addListener(F,"change",function(){F.checked?A.removeAttribute("disabled"):
+A.setAttribute("disabled","disabled");A.checked&&F.checked?H.getEditSelect().removeAttribute("disabled"):H.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,d,mxUtils.bind(this,function(){e(g.checked?c:null,m.checked,n.value,p.getTarget(),p.getColor(),q.checked,G.checked,C.checked,F.checked,H.getLink())}),null,a,b);this.showDialog(a.container,340,384,!0,!0);f.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,c,e,g,h){var d=document.createElement("div");d.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";d.appendChild(f);var l=this.getCurrentFile(),f="https://desk.draw.io/support/solutions/articles/16000051941";a=0;if(null!=l&&l.constructor==window.DriveFile&&!b){a=80;var f="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 p=document.createElement("div");p.style.whiteSpace="normal";mxUtils.write(p,mxResources.get("linkAccountRequired"));k.appendChild(p);p=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(l.getId())}));p.style.marginTop="12px";p.className="geBtn";k.appendChild(p);d.appendChild(k);p=document.createElement("a");p.style.paddingLeft="12px";p.style.color="gray";p.style.fontSize="11px";p.setAttribute("href","javascript:void(0);");mxUtils.write(p,mxResources.get("check"));
+k.appendChild(p);mxEvent.addListener(p,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(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 t=null,m=null;if(null!=c||null!=e)a+=30,mxUtils.write(d,mxResources.get("width")+":"),t=document.createElement("input"),
t.setAttribute("type","text"),t.style.marginRight="16px",t.style.width="50px",t.style.marginLeft="6px",t.style.marginRight="16px",t.style.marginBottom="10px",t.value="100%",d.appendChild(t),mxUtils.write(d,mxResources.get("height")+":"),m=document.createElement("input"),m.setAttribute("type","text"),m.style.width="50px",m.style.marginLeft="6px",m.style.marginBottom="10px",m.value=e+"px",d.appendChild(m),mxUtils.br(d);var u=this.addLinkSection(d,h);c=null!=this.pages&&1<this.pages.length;var n=null;
-if(null==k||k.constructor!=window.DriveFile||b)n=this.addCheckbox(d,mxResources.get("allPages"),c,!c);var p=this.addCheckbox(d,mxResources.get("lightbox"),!0),F=this.addEditButton(d,p),H=F.getEditInput(),A=this.addCheckbox(d,mxResources.get("layers"),!0);A.style.marginLeft=H.style.marginLeft;A.style.marginBottom="16px";A.style.marginTop="8px";mxEvent.addListener(p,"change",function(){p.checked?(A.removeAttribute("disabled"),H.removeAttribute("disabled")):(A.setAttribute("disabled","disabled"),H.setAttribute("disabled",
-"disabled"));H.checked&&p.checked?F.getEditSelect().removeAttribute("disabled"):F.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,d,mxUtils.bind(this,function(){g(u.getTarget(),u.getColor(),null==n?!0:n.checked,p.checked,F.getLink(),A.checked,null!=t?t.value:null,null!=m?m.value:null)}),null,mxResources.get("create"),f);this.showDialog(b.container,340,254+a,!0,!0);null!=t?(t.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?t.select():
-document.execCommand("selectAll",!1,null)):u.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,c,e){var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("image"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";d.appendChild(f);var l=this.addCheckbox(d,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),g=e?null:this.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),
-!0),f=this.editor.graph,k=e?null:this.addCheckbox(d,mxResources.get("transparentBackground"),f.background==mxConstants.NONE||null==f.background);null!=k&&(k.style.marginBottom="16px");a=new CustomDialog(this,d,mxUtils.bind(this,function(){c(!l.checked,null!=g?g.checked:!1,null!=k?k.checked:!1)}),null,a,b);this.showDialog(a.container,300,e?100:186,!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,c,e,g,h,m,n){m=null!=m?m:!0;var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=
-this.editor.graph,l="jpeg"==n?196:300,q=document.createElement("h3");mxUtils.write(q,a);q.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";d.appendChild(q);mxUtils.write(d,mxResources.get("zoom")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.marginRight="16px";t.style.width="60px";t.style.marginLeft="4px";t.style.marginRight="12px";t.value=this.lastExportZoom||"100%";d.appendChild(t);mxUtils.write(d,mxResources.get("borderWidth")+":");
-var u=document.createElement("input");u.setAttribute("type","text");u.style.marginRight="16px";u.style.width="60px";u.style.marginLeft="4px";u.value=this.lastExportBorder||"0";d.appendChild(u);mxUtils.br(d);var w=this.addCheckbox(d,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=n),p=this.addCheckbox(d,mxResources.get("selectionOnly"),!1,f.isSelectionEmpty()),y=document.createElement("input");y.style.marginTop="16px";y.style.marginRight="8px";y.style.marginLeft="24px";y.setAttribute("disabled",
-"disabled");y.setAttribute("type","checkbox");h&&(d.appendChild(y),mxUtils.write(d,mxResources.get("crop")),mxUtils.br(d),l+=26,mxEvent.addListener(p,"change",function(){p.checked?y.removeAttribute("disabled"):y.setAttribute("disabled","disabled")}));f.isSelectionEmpty()||(y.setAttribute("checked","checked"),y.defaultChecked=!0);var H=this.addCheckbox(d,mxResources.get("shadow"),f.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&&(d.appendChild(A),mxUtils.write(d,mxResources.get("embedImages")),mxUtils.br(d),l+=26);var E=this.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),m,null,null,"jpeg"!=n),I=null!=this.pages&&1<this.pages.length,M=this.addCheckbox(d,I?mxResources.get("allPages"):"",I,!I,null,"jpeg"!=n);M.style.marginLeft="24px";M.style.marginBottom="16px";I||(M.style.display="none");mxEvent.addListener(E,"change",function(){E.checked&&
+if(null==l||l.constructor!=window.DriveFile||b)n=this.addCheckbox(d,mxResources.get("allPages"),c,!c);var q=this.addCheckbox(d,mxResources.get("lightbox"),!0),F=this.addEditButton(d,q),H=F.getEditInput(),A=this.addCheckbox(d,mxResources.get("layers"),!0);A.style.marginLeft=H.style.marginLeft;A.style.marginBottom="16px";A.style.marginTop="8px";mxEvent.addListener(q,"change",function(){q.checked?(A.removeAttribute("disabled"),H.removeAttribute("disabled")):(A.setAttribute("disabled","disabled"),H.setAttribute("disabled",
+"disabled"));H.checked&&q.checked?F.getEditSelect().removeAttribute("disabled"):F.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,d,mxUtils.bind(this,function(){g(u.getTarget(),u.getColor(),null==n?!0:n.checked,q.checked,F.getLink(),A.checked,null!=t?t.value:null,null!=m?m.value:null)}),null,mxResources.get("create"),f);this.showDialog(b.container,340,254+a,!0,!0);null!=t?(t.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?t.select():
+document.execCommand("selectAll",!1,null)):u.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,c,e){var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("image"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";d.appendChild(f);var k=this.addCheckbox(d,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),g=e?null:this.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),
+!0),f=this.editor.graph,l=e?null:this.addCheckbox(d,mxResources.get("transparentBackground"),f.background==mxConstants.NONE||null==f.background);null!=l&&(l.style.marginBottom="16px");a=new CustomDialog(this,d,mxUtils.bind(this,function(){c(!k.checked,null!=g?g.checked:!1,null!=l?l.checked:!1)}),null,a,b);this.showDialog(a.container,300,e?100:186,!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,c,e,g,h,m,n){m=null!=m?m:!0;var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=
+this.editor.graph,k="jpeg"==n?196:300,p=document.createElement("h3");mxUtils.write(p,a);p.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";d.appendChild(p);mxUtils.write(d,mxResources.get("zoom")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.marginRight="16px";t.style.width="60px";t.style.marginLeft="4px";t.style.marginRight="12px";t.value=this.lastExportZoom||"100%";d.appendChild(t);mxUtils.write(d,mxResources.get("borderWidth")+":");
+var u=document.createElement("input");u.setAttribute("type","text");u.style.marginRight="16px";u.style.width="60px";u.style.marginLeft="4px";u.value=this.lastExportBorder||"0";d.appendChild(u);mxUtils.br(d);var w=this.addCheckbox(d,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=n),q=this.addCheckbox(d,mxResources.get("selectionOnly"),!1,f.isSelectionEmpty()),y=document.createElement("input");y.style.marginTop="16px";y.style.marginRight="8px";y.style.marginLeft="24px";y.setAttribute("disabled",
+"disabled");y.setAttribute("type","checkbox");h&&(d.appendChild(y),mxUtils.write(d,mxResources.get("crop")),mxUtils.br(d),k+=26,mxEvent.addListener(q,"change",function(){q.checked?y.removeAttribute("disabled"):y.setAttribute("disabled","disabled")}));f.isSelectionEmpty()||(y.setAttribute("checked","checked"),y.defaultChecked=!0);var H=this.addCheckbox(d,mxResources.get("shadow"),f.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&&(d.appendChild(A),mxUtils.write(d,mxResources.get("embedImages")),mxUtils.br(d),k+=26);var E=this.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),m,null,null,"jpeg"!=n),I=null!=this.pages&&1<this.pages.length,M=this.addCheckbox(d,I?mxResources.get("allPages"):"",I,!I,null,"jpeg"!=n);M.style.marginLeft="24px";M.style.marginBottom="16px";I||(M.style.display="none");mxEvent.addListener(E,"change",function(){E.checked&&
I?M.removeAttribute("disabled"):M.setAttribute("disabled","disabled")});m&&I||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"==n&&(mxUtils.write(d,mxResources.get("links")+":"),d.appendChild(K),mxUtils.br(d),mxUtils.br(d),l+=26);c=new CustomDialog(this,d,mxUtils.bind(this,function(){this.lastExportBorder=u.value;this.lastExportZoom=t.value;g(t.value,w.checked,!p.checked,H.checked,E.checked,A.checked,u.value,y.checked,!M.checked,K.value)}),null,c,e);this.showDialog(c.container,340,
-l,!0,!0);t.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?t.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,c,e,g){var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=this.editor.graph;if(null!=b){var l=document.createElement("h3");mxUtils.write(l,b);l.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";d.appendChild(l)}var k=this.addCheckbox(d,mxResources.get("fit"),
-!0),h=this.addCheckbox(d,mxResources.get("shadow"),f.shadowVisible&&e,!e),q=this.addCheckbox(d,c),t=this.addCheckbox(d,mxResources.get("lightbox"),!0),m=this.addEditButton(d,t),n=m.getEditInput(),p=1<f.model.getChildCount(f.model.getRoot()),D=this.addCheckbox(d,mxResources.get("layers"),p,!p);D.style.marginLeft=n.style.marginLeft;D.style.marginBottom="12px";D.style.marginTop="8px";mxEvent.addListener(t,"change",function(){t.checked?(p&&D.removeAttribute("disabled"),n.removeAttribute("disabled")):
-(D.setAttribute("disabled","disabled"),n.setAttribute("disabled","disabled"));n.checked&&t.checked?m.getEditSelect().removeAttribute("disabled"):m.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,d,mxUtils.bind(this,function(){a(k.checked,h.checked,q.checked,t.checked,m.getLink(),D.checked)}),null,mxResources.get("embed"),g);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,c,e,g,h,m,n){function d(b){var d=" ",k="";e&&(d=" 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"+
-(g?"&edit=_blank":"")+(h?"&layers=1":"")+"');}})(this);\"",k+="cursor:pointer;");a&&(k+="max-width:100%;");var l="";c&&(l=' width="'+Math.round(f.width)+'" height="'+Math.round(f.height)+'"');m('<img src="'+b+'"'+l+(""!=k?' style="'+k+'"':"")+d+"/>")}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");d(a)}),null,null,null,mxUtils.bind(this,function(a){n({message:mxResources.get("unknownError")})}),
-null,!0,c?2:1,null,b);else if(b=this.getFileData(!0),f.width*f.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){var l="";c&&(l="&w="+Math.round(2*f.width)+"&h="+Math.round(2*f.height));var q=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(e?"1":"0")+l+"&xml="+encodeURIComponent(b));q.send(mxUtils.bind(this,function(){200<=q.getStatus()&&299>=q.getStatus()?d("data:image/png;base64,"+q.getText()):n({message:mxResources.get("unknownError")})}))}else n({message:mxResources.get("drawingTooLarge")})};
-EditorUi.prototype.createEmbedSvg=function(a,b,c,e,g,h,m){var d=this.editor.graph.getSvg(),f=d.getElementsByTagName("a");if(null!=f)for(var l=0;l<f.length;l++){var q=f[l].getAttribute("href");null!=q&&"#"==q.charAt(0)&&"_blank"==f[l].getAttribute("target")&&f[l].removeAttribute("target")}e&&d.setAttribute("content",this.getFileData(!0));b&&this.editor.graph.addSvgShadow(d);if(c){var t=" ",u="";e&&(t="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"+
-(g?"&edit=_blank":"")+(h?"&layers=1":"")+"');}})(this);\"",u+="cursor:pointer;");a&&(u+="max-width:100%;");this.convertImages(d,mxUtils.bind(this,function(a){m('<img src="'+this.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=u?' style="'+u+'"':"")+t+"/>")}))}else u="",e&&(d.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+
-(g?"&edit=_blank":"")+(h?"&layers=1":"")+"');}}})(this);"),u+="cursor:pointer;"),a&&(a=parseInt(d.getAttribute("width")),b=parseInt(d.getAttribute("height")),d.setAttribute("viewBox","0 0 "+a+" "+b),u+="max-width:100%;max-height:"+b+"px;",d.removeAttribute("height")),""!=u&&d.setAttribute("style",u),m(mxUtils.getXml(d))};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+
+a=document.createElement("option");a.setAttribute("value","self");mxUtils.write(a,mxResources.get("openInThisWindow"));K.appendChild(a);"svg"==n&&(mxUtils.write(d,mxResources.get("links")+":"),d.appendChild(K),mxUtils.br(d),mxUtils.br(d),k+=26);c=new CustomDialog(this,d,mxUtils.bind(this,function(){this.lastExportBorder=u.value;this.lastExportZoom=t.value;g(t.value,w.checked,!q.checked,H.checked,E.checked,A.checked,u.value,y.checked,!M.checked,K.value)}),null,c,e);this.showDialog(c.container,340,
+k,!0,!0);t.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?t.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,c,e,g){var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=this.editor.graph;if(null!=b){var k=document.createElement("h3");mxUtils.write(k,b);k.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";d.appendChild(k)}var l=this.addCheckbox(d,mxResources.get("fit"),
+!0),h=this.addCheckbox(d,mxResources.get("shadow"),f.shadowVisible&&e,!e),p=this.addCheckbox(d,c),t=this.addCheckbox(d,mxResources.get("lightbox"),!0),m=this.addEditButton(d,t),n=m.getEditInput(),q=1<f.model.getChildCount(f.model.getRoot()),C=this.addCheckbox(d,mxResources.get("layers"),q,!q);C.style.marginLeft=n.style.marginLeft;C.style.marginBottom="12px";C.style.marginTop="8px";mxEvent.addListener(t,"change",function(){t.checked?(q&&C.removeAttribute("disabled"),n.removeAttribute("disabled")):
+(C.setAttribute("disabled","disabled"),n.setAttribute("disabled","disabled"));n.checked&&t.checked?m.getEditSelect().removeAttribute("disabled"):m.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,d,mxUtils.bind(this,function(){a(l.checked,h.checked,p.checked,t.checked,m.getLink(),C.checked)}),null,mxResources.get("embed"),g);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,c,e,g,h,m,n){function d(b){var d=" ",l="";e&&(d=" 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"+
+(g?"&edit=_blank":"")+(h?"&layers=1":"")+"');}})(this);\"",l+="cursor:pointer;");a&&(l+="max-width:100%;");var k="";c&&(k=' width="'+Math.round(f.width)+'" height="'+Math.round(f.height)+'"');m('<img src="'+b+'"'+k+(""!=l?' style="'+l+'"':"")+d+"/>")}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");d(a)}),null,null,null,mxUtils.bind(this,function(a){n({message:mxResources.get("unknownError")})}),
+null,!0,c?2:1,null,b);else if(b=this.getFileData(!0),f.width*f.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){var k="";c&&(k="&w="+Math.round(2*f.width)+"&h="+Math.round(2*f.height));var p=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(e?"1":"0")+k+"&xml="+encodeURIComponent(b));p.send(mxUtils.bind(this,function(){200<=p.getStatus()&&299>=p.getStatus()?d("data:image/png;base64,"+p.getText()):n({message:mxResources.get("unknownError")})}))}else n({message:mxResources.get("drawingTooLarge")})};
+EditorUi.prototype.createEmbedSvg=function(a,b,c,e,g,h,m){var d=this.editor.graph.getSvg(),f=d.getElementsByTagName("a");if(null!=f)for(var k=0;k<f.length;k++){var p=f[k].getAttribute("href");null!=p&&"#"==p.charAt(0)&&"_blank"==f[k].getAttribute("target")&&f[k].removeAttribute("target")}e&&d.setAttribute("content",this.getFileData(!0));b&&this.editor.graph.addSvgShadow(d);if(c){var t=" ",n="";e&&(t="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"+
+(g?"&edit=_blank":"")+(h?"&layers=1":"")+"');}})(this);\"",n+="cursor:pointer;");a&&(n+="max-width:100%;");this.convertImages(d,mxUtils.bind(this,function(a){m('<img src="'+this.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=n?' style="'+n+'"':"")+t+"/>")}))}else n="",e&&(d.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+
+(g?"&edit=_blank":"")+(h?"&layers=1":"")+"');}}})(this);"),n+="cursor:pointer;"),a&&(a=parseInt(d.getAttribute("width")),b=parseInt(d.getAttribute("height")),d.setAttribute("viewBox","0 0 "+a+" "+b),n+="max-width:100%;max-height:"+b+"px;",d.removeAttribute("height")),""!=n&&d.setAttribute("style",n),m(mxUtils.getXml(d))};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,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,l=this.pages[0];d.getGlobalVariable=function(a){return"page"==a?l.getName():"pagenumber"==a?1:e.apply(this,arguments)};document.body.appendChild(d.container);d.model.setRoot(l.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,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(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,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!=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,m,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(C){"Invalid image"==C.message?this.downloadFile(k):this.handleError(C)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,c,a||1,b,e,null,null,h,m)}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 l=d[k].indexOf(")");f.push('url("');f.push(e[b(d[k].substring(0,l))]);f.push('"'+d[k].substring(l))}this.editor.resolvedFontCss=f.join("");a()}});if(0<d.length)for(var h=1;h<d.length;h++){var m=d[h].indexOf(")"),k=null,v=d[h].indexOf("format(",m);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,m)),k)}}else a()};EditorUi.prototype.exportToCanvas=function(a,b,c,e,g,h,m,n,k,v,p,C,B,x){h=null!=h?h:!0;C=null!=C?C:this.editor.graph;B=null!=B?B:0;var d=k?null:C.background;d==mxConstants.NONE&&(d=null);null==d&&(d=e);null==d&&0==k&&
-(d=this.editor.graph.defaultPageBackgroundColor);this.convertImages(C.getSvg(d,null,null,x,null,null!=m?m:!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")),l=parseInt(c.getAttribute("height"));n=null!=n?n:1;null!=b&&(n=h?Math.min(1,Math.min(3*b/(4*l),b/k)):b/k);k=Math.ceil(n*k)+2*B;l=Math.ceil(n*l)+2*B;e.setAttribute("width",k);e.setAttribute("height",l);var m=e.getContext("2d");
-null!=d&&(m.beginPath(),m.rect(0,0,k,l),m.fillStyle=d,m.fill());m.scale(n,n);mxClient.IS_SF?window.setTimeout(function(){m.drawImage(f,B/n,B/n);a(e)},0):(m.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(C,
-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,l){for(var k=a.getElementsByTagName(c),g=0;g<k.length;g++)mxUtils.bind(this,function(c){var k=e.convert(c.getAttribute(l));if(null!=k&&"data:"!=k.substring(0,5)){var g=f[k];null==g?(d++,this.convertImageToDataUri(k,function(e){null!=e&&(f[k]=e,c.setAttribute(l,
-e));d--;0==d&&b(a)})):c.setAttribute(l,g)}else null!=k&&c.setAttribute(l,k)})(k[g])});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=
+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,m,n,l){l=null!=l?l:"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,l)}catch(D){"Invalid image"==D.message?this.downloadFile(l):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,m)}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]],l=1;l<d.length;l++){var k=d[l].indexOf(")");f.push('url("');f.push(e[b(d[l].substring(0,k))]);f.push('"'+d[l].substring(k))}this.editor.resolvedFontCss=f.join("");a()}});if(0<d.length)for(var h=1;h<d.length;h++){var m=d[h].indexOf(")"),l=null,v=d[h].indexOf("format(",m);0<v&&(l=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"==l||/(\.svg)($|\?)/i.test(a))b="image/svg+xml";else if("otf"==l||"embedded-opentype"==l||/(\.otf)($|\?)/i.test(a))b="application/x-font-opentype";else if("woff"==l||/(\.woff)($|\?)/i.test(a))b="application/font-woff";else if("woff2"==l||/(\.woff2)($|\?)/i.test(a))b="application/font-woff2";else if("eot"==l||/(\.eot)($|\?)/i.test(a))b="application/vnd.ms-fontobject";else if("sfnt"==l||/(\.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,m)),l)}}else a()};EditorUi.prototype.exportToCanvas=function(a,b,c,e,g,h,m,n,l,v,q,D,B,x){h=null!=h?h:!0;D=null!=D?D:this.editor.graph;B=null!=B?B:0;var d=l?null:D.background;d==mxConstants.NONE&&(d=null);null==d&&(d=e);null==d&&0==l&&
+(d=this.editor.graph.defaultPageBackgroundColor);this.convertImages(D.getSvg(d,null,null,x,null,null!=m?m:!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"),l=parseInt(c.getAttribute("width")),k=parseInt(c.getAttribute("height"));n=null!=n?n:1;null!=b&&(n=h?Math.min(1,Math.min(3*b/(4*k),b/l)):b/l);l=Math.ceil(n*l)+2*B;k=Math.ceil(n*k)+2*B;e.setAttribute("width",l);e.setAttribute("height",k);var p=e.getContext("2d");
+null!=d&&(p.beginPath(),p.rect(0,0,l,k),p.fillStyle=d,p.fill());p.scale(n,n);mxClient.IS_SF?window.setTimeout(function(){p.drawImage(f,B/n,B/n);a(e)},0):(p.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,q)};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,k){for(var l=a.getElementsByTagName(c),g=0;g<l.length;g++)mxUtils.bind(this,function(c){var l=e.convert(c.getAttribute(k));if(null!=l&&"data:"!=l.substring(0,5)){var g=f[l];null==g?(d++,this.convertImageToDataUri(l,function(e){null!=e&&(f[l]=e,c.setAttribute(k,
+e));d--;0==d&&b(a)})):c.setAttribute(k,g)}else null!=l&&c.setAttribute(k,l)})(l[g])});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(l){null!=c&&c(l)}};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"),f=a.getContext("2d");a.height=d.height;a.width=d.width;f.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 l=mxUtils.parseXml(a),k=this.editor.extractGraphModel(l.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 m=this.updatePageRoot(new DiagramPage(h[a])),
-q=this.pages.length;null==m.getName()&&m.setName(mxResources.get("pageWithNumber",[q+1]));f.model.execute(new ChangePage(this,m,m,q))}}finally{f.model.endUpdate()}}}null!=k&&"mxGraphModel"===k.nodeName&&(d=f.importGraphModel(k,b,c,e))}}catch(B){throw g||this.handleError(B,mxResources.get("invalidOrMissingFile")),B;}return d};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,e){e=null!=
+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 k=mxUtils.parseXml(a),l=this.editor.extractGraphModel(k.documentElement,null!=this.pages);if(null!=l&&"mxfile"==l.nodeName&&null!=this.pages){var h=l.getElementsByTagName("diagram");if(1==h.length)l=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 m=this.updatePageRoot(new DiagramPage(h[a])),
+p=this.pages.length;null==m.getName()&&m.setName(mxResources.get("pageWithNumber",[p+1]));f.model.execute(new ChangePage(this,m,m,p))}}finally{f.model.endUpdate()}}}null!=l&&"mxGraphModel"===l.nodeName&&(d=f.importGraphModel(l,b,c,e))}}catch(B){throw g||this.handleError(B,mxResources.get("invalidOrMissingFile")),B;}return d};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,e){e=null!=
e?e:a.name;c=null!=c?c:mxUtils.bind(this,function(a){this.handleError(a)});var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio)if(this.isRemoteVisioFormat(e)&&null!=VSD_CONVERT_URL){var d=new FormData;d.append("file1",a,e);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=e,this.doImportVisio(f.response,b,c)}catch(y){c(y)}else c({})});
f.send(d)}else try{this.doImportVisio(a,b,c)}catch(y){c(y)}});this.doImportVisio||this.loadingExtensions||this.isOffline()?d():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",d))};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(t){c(t)}});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(f){this.handleError(f)}});"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(t){c(t)}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,
-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,e,g,h,m){h=null!=h?h:!0;m=null!=m?m:!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()&&(g||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var d=this.editor.graph;if("data:image/png;base64,"==a.substring(0,22)){var f=this.extractGraphModelFromPng(a),l=this.importXml(f,b,c,h,!0);if(0<l.length)return l}if("data:image/svg+xml;"==a.substring(0,19))try{if(f=null,"data:image/svg+xml;base64,"==a.substring(0,
-26)?(f=a.substring(a.indexOf(",")+1),f=window.atob&&!mxClient.IS_SF?atob(f):Base64.decode(f,!0)):f=decodeURIComponent(a.substring(a.indexOf(",")+1)),l=this.importXml(f,b,c,h,!0),0<l.length)return l}catch(z){}this.loadImage(a,mxUtils.bind(this,function(e){if("data:"==a.substring(0,5))this.resizeImage(e,a,mxUtils.bind(this,function(a,e,f){d.setSelectionCell(d.insertVertex(null,null,"",d.snap(b),d.snap(c),e,f,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
-this.convertDataUri(a)+";"))}),m,this.maxImageSize);else{var f=Math.min(1,Math.min(this.maxImageSize/e.width,this.maxImageSize/e.height)),k=Math.round(e.width*f);e=Math.round(e.height*f);d.setSelectionCell(d.insertVertex(null,null,"",d.snap(b),d.snap(c),k,e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";"))}}),mxUtils.bind(this,function(){var f=null;d.getModel().beginUpdate();try{f=d.insertVertex(d.getDefaultParent(),
+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,e,g,h,m){h=null!=h?h:!0;m=null!=m?m:!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()&&(g||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var d=this.editor.graph;if("data:image/png;base64,"==a.substring(0,22)){var f=this.extractGraphModelFromPng(a),k=this.importXml(f,b,c,h,!0);if(0<k.length)return k}if("data:image/svg+xml;"==a.substring(0,19))try{if(f=null,"data:image/svg+xml;base64,"==a.substring(0,
+26)?(f=a.substring(a.indexOf(",")+1),f=window.atob&&!mxClient.IS_SF?atob(f):Base64.decode(f,!0)):f=decodeURIComponent(a.substring(a.indexOf(",")+1)),k=this.importXml(f,b,c,h,!0),0<k.length)return k}catch(z){}this.loadImage(a,mxUtils.bind(this,function(f){if("data:"==a.substring(0,5))this.resizeImage(f,a,mxUtils.bind(this,function(a,f,e){d.setSelectionCell(d.insertVertex(null,null,"",d.snap(b),d.snap(c),f,e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+this.convertDataUri(a)+";"))}),m,this.maxImageSize);else{var e=Math.min(1,Math.min(this.maxImageSize/f.width,this.maxImageSize/f.height)),l=Math.round(f.width*e);f=Math.round(f.height*e);d.setSelectionCell(d.insertVertex(null,null,"",d.snap(b),d.snap(c),l,f,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";"))}}),mxUtils.bind(this,function(){var f=null;d.getModel().beginUpdate();try{f=d.insertVertex(d.getDefaultParent(),
null,a,d.snap(b),d.snap(c),1,1,"text;"+(e?"html=1;":"")),d.updateCellSize(f),d.fireEvent(new mxEventObject("textInserted","cells",[f]))}finally{d.getModel().endUpdate()}d.setSelectionCell(f)}))}else{a=this.editor.graph.zapGremlins(mxUtils.trim(a));if(this.isCompatibleString(a))return this.importXml(a,b,c,h);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,h))}),mxUtils.bind(this,function(a){this.handleError(a)}));
else{d=this.editor.graph;g=null;d.getModel().beginUpdate();try{g=d.insertVertex(d.getDefaultParent(),null,"",d.snap(b),d.snap(c),1,1,"text;"+(e?"html=1;":"")),d.fireEvent(new mxEventObject("textInserted","cells",[g])),"<"==a.charAt(0)&&a.indexOf(">")==a.length-1&&(a=mxUtils.htmlEntities(a)),g.value=a,d.updateCellSize(g),/\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(g.value)&&
d.setLinkForCell(g,g.value),g.geometry.width+=d.gridSize,g.geometry.height+=d.gridSize}finally{d.getModel().endUpdate()}return[g]}}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 d=document.createElement("input");d.setAttribute("type","file");mxEvent.addListener(d,"change",mxUtils.bind(this,function(){null!=d.files&&
this.importFiles(d.files,null,null,this.maxImageSize)}));d.click()}else{window.openNew=!1;window.openKey="import";if(!b){var c=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 d=new Blob([a],{type:"application/octet-stream"});this.importVisio(d,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 e=this.dialog,f=e.close;this.dialog.close=mxUtils.bind(this,function(a){Editor.useLocalStorage=c;f.apply(e,arguments);a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importFile=function(a,b,c,e,g,h,m,n,k,v,p){v=null!=v?v:!0;var d=!1,f=null,l=mxUtils.bind(this,function(a){var b=
-null;null!=a&&"<mxlibrary"==a.substring(0,10)?this.loadLibrary(new LocalLibrary(this,a,m)):b=this.importXml(a,c,e,v);null!=n&&n(b)});"image"==b.substring(0,5)?(k=!1,"image/png"==b.substring(0,9)&&(b=p?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(f=this.importXml(b,c,e,v),k=!0)),k||(f=this.editor.graph,b=a.indexOf(";"),0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1))),v&&f.isGridEnabled()&&(c=f.snap(c),e=f.snap(e)),f=[f.insertVertex(null,null,"",c,e,g,h,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
-a+";")])):/(\.*<graphml )/.test(a)?(d=!0,this.importGraphML(a,l)):null!=k&&null!=m&&(/(\.v(dx|sdx?))($|\?)/i.test(m)||/(\.vs(x|sx?))($|\?)/i.test(m))?(d=!0,this.importVisio(k,l)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,m)?(d=!0,this.parseFile(null!=k?k:new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?l(a.responseText):null!=n&&n(null))}),m)):/(\.v(sd|dx))($|\?)/i.test(m)||/(\.vs(s|x))($|\?)/i.test(m)||
+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=c;e.apply(f,arguments);a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importFile=function(a,b,c,e,g,h,m,n,l,v,q){v=null!=v?v:!0;var d=!1,f=null,k=mxUtils.bind(this,function(a){var b=
+null;null!=a&&"<mxlibrary"==a.substring(0,10)?this.loadLibrary(new LocalLibrary(this,a,m)):b=this.importXml(a,c,e,v);null!=n&&n(b)});"image"==b.substring(0,5)?(l=!1,"image/png"==b.substring(0,9)&&(b=q?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(f=this.importXml(b,c,e,v),l=!0)),l||(f=this.editor.graph,b=a.indexOf(";"),0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1))),v&&f.isGridEnabled()&&(c=f.snap(c),e=f.snap(e)),f=[f.insertVertex(null,null,"",c,e,g,h,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+a+";")])):/(\.*<graphml )/.test(a)?(d=!0,this.importGraphML(a,k)):null!=l&&null!=m&&(/(\.v(dx|sdx?))($|\?)/i.test(m)||/(\.vs(x|sx?))($|\?)/i.test(m))?(d=!0,this.importVisio(l,k)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,m)?(d=!0,this.parseFile(null!=l?l:new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?k(a.responseText):null!=n&&n(null))}),m)):/(\.v(sd|dx))($|\?)/i.test(m)||/(\.vs(s|x))($|\?)/i.test(m)||
(f=this.insertTextAt(this.validateFileData(a),c,e,!0,null,v));d||null==n||n(f);return f};EditorUi.prototype.base64Encode=function(a){for(var b="",d=0,c=a.length,e,g,h;d<c;){e=a.charCodeAt(d++)&255;if(d==c){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4);b+="==";break}g=a.charCodeAt(d++);if(d==c){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);
b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(g&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((g&15)<<2);b+="=";break}h=a.charCodeAt(d++);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(g&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((g&15)<<2|(h&192)>>6);b+=
-"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(h&63)}return b};EditorUi.prototype.importFiles=function(a,b,c,e,g,h,m,n,k,v,p,C){b=null!=b?b:0;c=null!=c?c:0;e=null!=e?e:this.maxImageSize;v=null!=v?v:this.maxImageBytes;var d=null!=b&&null!=c,f=!0,l=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var q=p||this.resampleThreshold,t=0;t<a.length;t++)if("image/"==a[t].type.substring(0,6)&&a[t].size>q){l=!0;break}var u=mxUtils.bind(this,function(){var k=this.editor.graph,l=k.gridSize;
-g=null!=g?g:mxUtils.bind(this,function(a,b,c,e,f,k,g,l,h){return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,g)),null):this.importFile(a,b,c,e,f,k,g,l,h,d,C)});h=null!=h?h:mxUtils.bind(this,function(a){k.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var q=a.length,t=q,u=[],w=mxUtils.bind(this,function(a,b){u[a]=b;if(0==--t){this.spinner.stop();if(null!=n)n(u);else{var d=[];k.getModel().beginUpdate();
-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==m||m(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=C?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],m=parseFloat(f.getAttribute("width")),n=parseFloat(f.getAttribute("height")),v=f.getAttribute("viewBox");if(null==v||0==v.length)f.setAttribute("viewBox",
-"0 0 "+m+" "+n);else if(isNaN(m)||isNaN(n)){var p=v.split(" ");3<p.length&&(m=parseFloat(p[2]),n=parseFloat(p[3]))}q=this.createSvgDataUri(mxUtils.getXml(f));var w=Math.min(1,Math.min(e/Math.max(1,m)),e/Math.max(1,n)),x=g(q,h.type,b+d*l,c+d*l,Math.max(1,Math.round(m*w)),Math.max(1,Math.round(n*w)),h.name);if(isNaN(m)||isNaN(n)){var C=new Image;C.onload=mxUtils.bind(this,function(){m=Math.max(1,C.width);n=Math.max(1,C.height);x[0].geometry.width=m;x[0].geometry.height=n;f.setAttribute("viewBox","0 0 "+
-m+" "+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]])});C.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*l,c+d*l,0,0,h.name)}))}else w(d,mxUtils.bind(this,function(){return null}))}else{n=!1;if("image/png"==h.type){var A=C?null:this.extractGraphModelFromPng(a.target.result);if(null!=A&&0<A.length){var z=
-new Image;z.src=a.target.result;w(d,mxUtils.bind(this,function(){return g(A,"text/xml",b+d*l,c+d*l,z.width,z.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,m,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/m,e/q)):1;return g(k,h.type,b+d*l,c+d*l,Math.round(m*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*l,c+d*l,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*l,c+d*l,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)});l?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?
+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(h&63)}return b};EditorUi.prototype.importFiles=function(a,b,c,e,g,h,m,n,l,v,q,D){b=null!=b?b:0;c=null!=c?c:0;e=null!=e?e:this.maxImageSize;v=null!=v?v:this.maxImageBytes;var d=null!=b&&null!=c,f=!0,k=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var p=q||this.resampleThreshold,t=0;t<a.length;t++)if("image/"==a[t].type.substring(0,6)&&a[t].size>p){k=!0;break}var u=mxUtils.bind(this,function(){var l=this.editor.graph,k=l.gridSize;
+g=null!=g?g:mxUtils.bind(this,function(a,b,c,e,f,l,g,k,h){return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,g)),null):this.importFile(a,b,c,e,f,l,g,k,h,d,D)});h=null!=h?h:mxUtils.bind(this,function(a){l.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var p=a.length,t=p,u=[],w=mxUtils.bind(this,function(a,b){u[a]=b;if(0==--t){this.spinner.stop();if(null!=n)n(u);else{var d=[];l.getModel().beginUpdate();
+try{for(var c=0;c<u.length;c++){var e=u[c]();null!=e&&(d=d.concat(e))}}finally{l.getModel().endUpdate()}}h(d)}}),x=0;x<p;x++)mxUtils.bind(this,function(d){var h=a[d],p=new FileReader;p.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 p=a.target.result,t=p.indexOf(","),n=decodeURIComponent(escape(atob(p.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(p.substring(0,t+1),null!=u){var a=u.getElementsByTagName("svg");if(0<a.length){var f=a[0],m=parseFloat(f.getAttribute("width")),n=parseFloat(f.getAttribute("height")),v=f.getAttribute("viewBox");if(null==v||0==v.length)f.setAttribute("viewBox",
+"0 0 "+m+" "+n);else if(isNaN(m)||isNaN(n)){var q=v.split(" ");3<q.length&&(m=parseFloat(q[2]),n=parseFloat(q[3]))}p=this.createSvgDataUri(mxUtils.getXml(f));var w=Math.min(1,Math.min(e/Math.max(1,m)),e/Math.max(1,n)),x=g(p,h.type,b+d*k,c+d*k,Math.max(1,Math.round(m*w)),Math.max(1,Math.round(n*w)),h.name);if(isNaN(m)||isNaN(n)){var D=new Image;D.onload=mxUtils.bind(this,function(){m=Math.max(1,D.width);n=Math.max(1,D.height);x[0].geometry.width=m;x[0].geometry.height=n;f.setAttribute("viewBox","0 0 "+
+m+" "+n);p=this.createSvgDataUri(mxUtils.getXml(f));var a=p.indexOf(";");0<a&&(p=p.substring(0,a)+p.substring(p.indexOf(",",a+1)));l.setCellStyles("image",p,[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*k,c+d*k,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*k,c+d*k,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(l){this.resizeImage(l,a.target.result,
+mxUtils.bind(this,function(l,m,p){w(d,mxUtils.bind(this,function(){if(null!=l&&l.length<v){var t=f&&this.isResampleImage(a.target.result,q)?Math.min(1,Math.min(e/m,e/p)):1;return g(l,h.type,b+d*k,c+d*k,Math.round(m*t),Math.round(p*t),h.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),f,e,q)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else g(a.target.result,h.type,b+d*k,c+d*k,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*k,c+d*k,240,160,h.name,function(a){w(d,function(){return a})},h):"image"==h.type.substring(0,5)?p.readAsDataURL(h):p.readAsText(h)})(x)});k?this.confirmImageResize(function(a){f=a;u()},l):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?
mxSettings.getResizeImages():null,e=function(c,e){if(c||b)mxSettings.setResizeImages(c?e:null),mxSettings.save();d();a(e)};null==c||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,c)};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,e,g,h){g=null!=g?g:this.maxImageSize;var d=Math.max(1,a.width),f=Math.max(1,a.height);
-if(e&&this.isResampleImage(b,h))try{var k=Math.max(d/g,f/g);if(1<k){var l=Math.round(d/k),m=Math.round(f/k),q=document.createElement("canvas");q.width=l;q.height=m;q.getContext("2d").drawImage(a,0,0,l,m);var t=q.toDataURL();if(t.length<b.length){var n=document.createElement("canvas");n.width=l;n.height=m;var p=n.toDataURL();t!==p&&(b=t,d=l,f=m)}}}catch(D){}c(b,d,f)};EditorUi.prototype.crcTable=[];for(var b=0;256>b;b++)for(var e=b,g=0;8>g;g++)e=1==(e&1)?3988292384^e>>>1:e>>>1,EditorUi.prototype.crcTable[b]=
-e;EditorUi.prototype.updateCRC=function(a,b,c,e){for(var d=0;d<e;d++)a=EditorUi.prototype.crcTable[(a^b[c+d])&255]^a>>>8;return a};EditorUi.prototype.crc32=function(a){this.crcTable=this.crcTable||this.createCrcTable();for(var b=-1,d=0;d<a.length;d++)b=b>>>8^this.crcTable[(b^a.charCodeAt(d))&255];return(b^-1)>>>0};EditorUi.prototype.writeGraphModelToPng=function(a,b,c,e,g){function d(a,b){var d=k;k+=b;return a.substring(d,k)}function f(a){a=d(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<
-16)+(a.charCodeAt(0)<<24)}function l(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(d(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=g&&g();else if(d(a,4),"IHDR"!=d(a,4))null!=g&&g();else{d(a,17);g=a.substring(0,k);do{var h=f(a);if("IDAT"==d(a,4)){g=a.substring(0,k-8);c=c+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+e;e=4294967295;e=this.updateCRC(e,
-b,0,4);e=this.updateCRC(e,c,0,c.length);g+=l(c.length)+b+c+l(e^4294967295);g+=a.substring(k-8,a.length);break}g+=a.substring(k-8,k-4+h);d(a,h);d(a,4)}while(h);return"data:image/png;base64,"+(window.btoa?btoa(g):Base64.encode(g,!0))}};EditorUi.prototype.extractGraphModelFromPng=function(a){var b=null;try{var d=a.substring(a.indexOf(",")+1),c=window.atob&&!mxClient.IS_SF?atob(d):Base64.decode(d,!0);EditorUi.parsePng(c,mxUtils.bind(this,function(a,d,e){a=c.substring(a+8,a+8+e);"zTXt"==d?(e=a.indexOf(String.fromCharCode(0)),
+if(e&&this.isResampleImage(b,h))try{var l=Math.max(d/g,f/g);if(1<l){var k=Math.round(d/l),m=Math.round(f/l),p=document.createElement("canvas");p.width=k;p.height=m;p.getContext("2d").drawImage(a,0,0,k,m);var t=p.toDataURL();if(t.length<b.length){var n=document.createElement("canvas");n.width=k;n.height=m;var q=n.toDataURL();t!==q&&(b=t,d=k,f=m)}}}catch(C){}c(b,d,f)};EditorUi.prototype.crcTable=[];for(var b=0;256>b;b++)for(var e=b,g=0;8>g;g++)e=1==(e&1)?3988292384^e>>>1:e>>>1,EditorUi.prototype.crcTable[b]=
+e;EditorUi.prototype.updateCRC=function(a,b,c,e){for(var d=0;d<e;d++)a=EditorUi.prototype.crcTable[(a^b[c+d])&255]^a>>>8;return a};EditorUi.prototype.crc32=function(a){this.crcTable=this.crcTable||this.createCrcTable();for(var b=-1,d=0;d<a.length;d++)b=b>>>8^this.crcTable[(b^a.charCodeAt(d))&255];return(b^-1)>>>0};EditorUi.prototype.writeGraphModelToPng=function(a,b,c,e,g){function d(a,b){var d=l;l+=b;return a.substring(d,l)}function f(a){a=d(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 l=0;if(d(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=g&&g();else if(d(a,4),"IHDR"!=d(a,4))null!=g&&g();else{d(a,17);g=a.substring(0,l);do{var h=f(a);if("IDAT"==d(a,4)){g=a.substring(0,l-8);c=c+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+e;e=4294967295;e=this.updateCRC(e,
+b,0,4);e=this.updateCRC(e,c,0,c.length);g+=k(c.length)+b+c+k(e^4294967295);g+=a.substring(l-8,a.length);break}g+=a.substring(l-8,l-4+h);d(a,h);d(a,4)}while(h);return"data:image/png;base64,"+(window.btoa?btoa(g):Base64.encode(g,!0))}};EditorUi.prototype.extractGraphModelFromPng=function(a){var b=null;try{var d=a.substring(a.indexOf(",")+1),c=window.atob&&!mxClient.IS_SF?atob(d):Base64.decode(d,!0);EditorUi.parsePng(c,mxUtils.bind(this,function(a,d,e){a=c.substring(a+8,a+8+e);"zTXt"==d?(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"==d&&(a=a.split(String.fromCharCode(0)),1<a.length&&"mxGraphModel"==a[0]&&(b=a[1]));if(null!=b||"IDAT"==d)return!0}))}catch(t){}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 h=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 d=!1;try{a.handleCustomLink(b),d=!0}catch(A){a.handleError(A)}return d};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 e=a.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(b){b=null!=b?b:"";if(null!=a.pages&&null!=a.currentPage)for(var d=0;d<a.pages.length;d++)if(a.pages[d]==a.currentPage){0<d&&(b+=(0<b.length?"&":"?")+"page="+d);break}"1"==urlParams.dev&&(b+=(0<b.length?"&":"?")+"dev=1&drawdev=1");return e.apply(this,arguments)};
var g=b.addClickHandler;b.addClickHandler=function(a,d,c){var e=d;d=function(a,d){if(null==d){var c=mxEvent.getSource(a);"a"==c.nodeName.toLowerCase()&&(d=c.getAttribute("href"))}null!=d&&b.isCustomLink(d)&&(mxEvent.isTouchEvent(a)||!mxEvent.isPopupTrigger(a))&&b.customLinkClicked(d)&&mxEvent.consume(a);null!=e&&e(a,d)};g.call(this,a,d,c)};h.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 m=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:m.apply(this,arguments)};var n=b.labelLinkClicked;b.labelLinkClicked=function(a,d,c){var e=d.getAttribute("href");if(null==e||!b.isCustomLink(e)||!mxEvent.isTouchEvent(c)&&mxEvent.isPopupTrigger(c))n.apply(this,
-arguments);else{if(!b.isEnabled()||null!=a&&b.isCellLocked(a.cell))b.customLinkClicked(e),b.getRubberband().reset();mxEvent.consume(c)}};this.editor.getOrCreateFilename=function(){var b=a.defaultFilename,d=a.getCurrentFile();null!=d&&(b=null!=d.getTitle()?d.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;";
+arguments);else{if(!b.isEnabled()||null!=a&&b.isCellLocked(a.cell))b.customLinkClicked(e),b.getRubberband().reset();mxEvent.consume(c)}};this.editor.getOrCreateFilename=function(){var b=a.defaultFilename,d=a.getCurrentFile();null!=d&&(b=null!=d.getTitle()?d.getTitle():b);return b};var q=this.actions.get("print");q.setEnabled(!mxClient.IS_IOS||!navigator.standalone);q.visible=q.isEnabled();if(!this.editor.chromeless||this.editor.editable){var l=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 d=a.clipboardData||a.originalEvent.clipboardData,c=!1,e=0;e<d.types.length;e++)if("text/"===d.types[e].substring(0,5)){c=!0;break}if(!c){var f=d.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,d,c,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);
+b.container.addEventListener("paste",mxUtils.bind(this,function(a){var b=this.editor.graph;if(!mxEvent.isConsumed(a))try{for(var d=a.clipboardData||a.originalEvent.clipboardData,c=!1,e=0;e<d.types.length;e++)if("text/"===d.types[e].substring(0,5)){c=!0;break}if(!c){var f=d.items;for(index in f){var l=f[index];if("file"===l.kind){if(b.isEditing())this.importFiles([l.getAsFile()],0,0,this.maxImageSize,function(a,d,c,e,f,l){b.insertImage(a,f,l)},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([l.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);
this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(a){var d=mxEvent.getSource(a);null==b.container||!b.isEnabled()||b.isMouseDown||b.isEditing()||null!=this.dialog||"INPUT"==d.nodeName||"TEXTAREA"==d.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 d=a.keyCode;window.setTimeout(mxUtils.bind(this,function(){!z||224!=d&&17!=d&&91!=d||(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 C=this.isSelectionAllowed;this.isSelectionAllowed=
-function(a){return mxEvent.getSource(a)==v?!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,d=b.cellEditor.text2,c=null;null!=d&&(mxEvent.addListener(d,"dragleave",function(a){null!=c&&(c.parentNode.removeChild(c),c=null);a.stopPropagation();a.preventDefault()}),
-mxEvent.addListener(d,"dragover",mxUtils.bind(this,function(a){null==c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=this.highlightElement(d));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(d,"drop",mxUtils.bind(this,function(a){null!=c&&(c.parentNode.removeChild(c),c=null);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,function(a,d,c,e,f,k){b.insertImage(a,f,k)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=
+"copy",mxUtils.bind(this,function(a){b.isEnabled()&&(mxClipboard.copy(b),this.copyCells(v),l())}));mxEvent.addListener(v,"cut",mxUtils.bind(this,function(a){b.isEnabled()&&(mxClipboard.copy(b),this.copyCells(v,!0),l())}));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=
+function(a){return mxEvent.getSource(a)==v?!0:D.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,d=b.cellEditor.text2,c=null;null!=d&&(mxEvent.addListener(d,"dragleave",function(a){null!=c&&(c.parentNode.removeChild(c),c=null);a.stopPropagation();a.preventDefault()}),
+mxEvent.addListener(d,"dragover",mxUtils.bind(this,function(a){null==c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=this.highlightElement(d));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(d,"drop",mxUtils.bind(this,function(a){null!=c&&(c.parentNode.removeChild(c),c=null);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,function(a,d,c,e,f,l){b.insertImage(a,f,l)},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 d=a.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)?this.loadImage(decodeURIComponent(d),mxUtils.bind(this,function(a){var c=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,c)),e/Math.max(1,a));b.insertImage(decodeURIComponent(d),c*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 B=document.createElement("div");B.style.position="absolute";B.style.top="125px";B.style.left="220px";B.style.width="30px";B.style.height="1000px";B.style.background="whiteSmoke";document.body.appendChild(B);var x=document.createElement("div");x.style.position="absolute";x.style.top="95px";x.style.left="220px";x.style.width="30px";x.style.height="30px";x.style.background="whiteSmoke";document.body.appendChild(x);this.vRuler=new mxRuler(this.editor.graph,
-B,!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 d=this.editor.graph.getSelectionCell(),d=this.editor.graph.getModel().getStyle(d);this.styleInput.value=d||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var G=this.isSelectionAllowed;
-this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:G.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 d=mxUtils.convertPoint(b.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),c=b.view.translate,e=b.view.scale,f=d.x/e-c.x,k=d.y/e-c.y;mxEvent.isAltDown(a)&&(k=f=0);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,
-f,k,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a));else{var g=0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):null,d=this.extractGraphModelFromEvent(a,null!=this.pages);if(null!=d)b.setSelectionCells(this.importXml(d,f,k,!0));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")){var l=a.dataTransfer.getData("text/html"),d=document.createElement("div");d.innerHTML=l;var h=null,c=d.getElementsByTagName("img");
-null!=c&&1==c.length?(l=c[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(l)||(h=!0)):(d=d.getElementsByTagName("a"),null!=d&&1==d.length&&(l=d[0].getAttribute("href")));var m=!0,q=mxUtils.bind(this,function(){b.setSelectionCells(this.insertTextAt(l,f,k,!0,h,null,m))});h&&l.length>this.resampleThreshold?this.confirmImageResize(function(a){m=a;q()},mxEvent.isControlDown(a)):q()}else null!=g&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(g)?this.loadImage(decodeURIComponent(g),mxUtils.bind(this,
-function(a){var d=Math.max(1,a.width);a=Math.max(1,a.height);var c=this.maxImageSize,c=Math.min(1,Math.min(c/Math.max(1,d)),c/Math.max(1,a));b.setSelectionCell(b.insertVertex(null,null,"",f,k,d*c,a*c,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+g+";"))}),mxUtils.bind(this,function(a){b.setSelectionCells(this.insertTextAt(g,f,k,!0))})):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&b.setSelectionCells(this.insertTextAt(a.dataTransfer.getData("text/plain"),
-f,k,!0))}}a.stopPropagation();a.preventDefault()}),!1)}this.initPages();this.editUpdateListener=mxUtils.bind(this,function(a,b){var d=b.getProperty("edit");null!=d&&this.updateEditReferences(d)});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,
+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){q=document.createElement("div");q.style.position="absolute";q.style.top="95px";q.style.left="250px";q.style.width="2000px";q.style.height="30px";q.style.background=
+"whiteSmoke";document.body.appendChild(q);var B=document.createElement("div");B.style.position="absolute";B.style.top="125px";B.style.left="220px";B.style.width="30px";B.style.height="1000px";B.style.background="whiteSmoke";document.body.appendChild(B);var x=document.createElement("div");x.style.position="absolute";x.style.top="95px";x.style.left="220px";x.style.width="30px";x.style.height="30px";x.style.background="whiteSmoke";document.body.appendChild(x);this.vRuler=new mxRuler(this.editor.graph,
+B,!0);this.hRuler=new mxRuler(this.editor.graph,q,!1)}if("1"==urlParams.styledev){q=document.getElementById("geFooter");null!=q&&(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)})),q.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){if(0<this.editor.graph.getSelectionCount()){var d=this.editor.graph.getSelectionCell(),d=this.editor.graph.getModel().getStyle(d);this.styleInput.value=d||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var G=this.isSelectionAllowed;
+this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:G.apply(this,arguments)}}q=document.getElementById("geInfo");null!=q&&q.parentNode.removeChild(q);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 d=mxUtils.convertPoint(b.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),c=b.view.translate,e=b.view.scale,f=d.x/e-c.x,l=d.y/e-c.y;mxEvent.isAltDown(a)&&(l=f=0);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,
+f,l,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a));else{var g=0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):null,d=this.extractGraphModelFromEvent(a,null!=this.pages);if(null!=d)b.setSelectionCells(this.importXml(d,f,l,!0));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")){var k=a.dataTransfer.getData("text/html"),d=document.createElement("div");d.innerHTML=k;var h=null,c=d.getElementsByTagName("img");
+null!=c&&1==c.length?(k=c[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)||(h=!0)):(d=d.getElementsByTagName("a"),null!=d&&1==d.length&&(k=d[0].getAttribute("href")));var m=!0,p=mxUtils.bind(this,function(){b.setSelectionCells(this.insertTextAt(k,f,l,!0,h,null,m))});h&&k.length>this.resampleThreshold?this.confirmImageResize(function(a){m=a;p()},mxEvent.isControlDown(a)):p()}else null!=g&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(g)?this.loadImage(decodeURIComponent(g),mxUtils.bind(this,
+function(a){var d=Math.max(1,a.width);a=Math.max(1,a.height);var c=this.maxImageSize,c=Math.min(1,Math.min(c/Math.max(1,d)),c/Math.max(1,a));b.setSelectionCell(b.insertVertex(null,null,"",f,l,d*c,a*c,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+g+";"))}),mxUtils.bind(this,function(a){b.setSelectionCells(this.insertTextAt(g,f,l,!0))})):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&b.setSelectionCells(this.insertTextAt(a.dataTransfer.getData("text/plain"),
+f,l,!0))}}a.stopPropagation();a.preventDefault()}),!1)}this.initPages();this.editUpdateListener=mxUtils.bind(this,function(a,b){var d=b.getProperty("edit");null!=d&&this.updateEditReferences(d)});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 d=a.indexOf(",");0<d&&(b=this.getPageById(a.substring(d+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",
mxUtils.bind(this,function(a,b){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(a,b){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor();this.addListener("gridColorChanged",mxUtils.bind(this,function(a,b){mxSettings.setGridColor(this.editor.graph.view.gridColor);
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 d=this.editor.graph;if(d.isSelectionEmpty())a.innerHTML="";else{var c=mxUtils.sortCells(d.model.getTopmostCells(d.getSelectionCells())),e=mxUtils.getXml(this.editor.graph.encodeCells(c));mxUtils.setTextContent(a,encodeURIComponent(e));b?(d.removeCells(c,!1),d.lastPasteXml=null):(d.lastPasteXml=e,d.pasteCounter=0);a.focus();
document.execCommand("selectAll",!1,null)}};EditorUi.prototype.pasteCells=function(a,b){if(!mxEvent.isConsumed(a)){var d=b.getElementsByTagName("span");if(null!=d&&0<d.length&&"application/vnd.lucid.chart.objects"===d[0].getAttribute("data-lucid-type")){var c=d[0].getAttribute("data-lucid-content");null!=c&&0<c.length&&(this.convertLucidChart(c,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 c=
-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(k){}try{var d=b.getElementsByTagName("span"),h=null!=d&&0<d.length?mxUtils.trim(decodeURIComponent(d[0].textContent)):decodeURIComponent(e);this.isCompatibleString(h)&&(f=!0,e=h)}catch(k){}c.lastPasteXml==e?c.pasteCounter++:(c.lastPasteXml=e,c.pasteCounter=0);d=c.pasteCounter*c.gridSize;if(null!=
-e&&0<e.length&&(f||this.isCompatibleString(e)?c.setSelectionCells(this.importXml(e,d,d)):(f=c.getInsertPoint(),c.isMouseInsertPoint()&&(d=0,c.lastPasteXml==e&&0<c.pasteCounter&&c.pasteCounter--),c.setSelectionCells(this.insertTextAt(e,f.x+d,f.y+d,!0))),!c.isSelectionEmpty())){c.scrollCellToVisible(c.getSelectionCell());null!=this.hoverIcons&&this.hoverIcons.update(c.view.getState(c.getSelectionCell()));try{mxEvent.consume(a)}catch(k){}}}}};EditorUi.prototype.addFileDropHandler=function(a){if(Graph.fileSupport)for(var b=
+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(l){}try{var d=b.getElementsByTagName("span"),h=null!=d&&0<d.length?mxUtils.trim(decodeURIComponent(d[0].textContent)):decodeURIComponent(e);this.isCompatibleString(h)&&(f=!0,e=h)}catch(l){}c.lastPasteXml==e?c.pasteCounter++:(c.lastPasteXml=e,c.pasteCounter=0);d=c.pasteCounter*c.gridSize;if(null!=
+e&&0<e.length&&(f||this.isCompatibleString(e)?c.setSelectionCells(this.importXml(e,d,d)):(f=c.getInsertPoint(),c.isMouseInsertPoint()&&(d=0,c.lastPasteXml==e&&0<c.pasteCounter&&c.pasteCounter--),c.setSelectionCells(this.insertTextAt(e,f.x+d,f.y+d,!0))),!c.isSelectionEmpty())){c.scrollCellToVisible(c.getSelectionCell());null!=this.hoverIcons&&this.hoverIcons.update(c.view.getState(c.getSelectionCell()));try{mxEvent.consume(a)}catch(l){}}}}};EditorUi.prototype.addFileDropHandler=function(a){if(Graph.fileSupport)for(var b=
null,d=0;d<a.length;d++)mxEvent.addListener(a[d],"dragleave",function(a){null!=b&&(b.parentNode.removeChild(b),b=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(a[d],"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[d],"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 d=this.extractGraphModelFromEvent(a);if(null==d){var c=null!=a.dataTransfer?a.dataTransfer:a.clipboardData;null!=c&&(10==document.documentMode||11==document.documentMode?
d=c.getData("Text"):(d=null,d=0<=mxUtils.indexOf(c.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(c.types,"text/html")?c.getData("text/html"):null,null!=d&&0<d.length?(c=document.createElement("div"),c.innerHTML=d,c=c.getElementsByTagName("img"),0<c.length&&(d=c[0].getAttribute("src"))):0<=mxUtils.indexOf(c.types,"text/plain")&&(d=c.getData("text/plain"))),null!=d&&("data:image/png;base64,"==d.substring(0,22)?(d=this.extractGraphModelFromPng(d),null!=d&&0<d.length&&
@@ -8132,42 +8133,42 @@ f=0;f<e;f++)this.addBasenamesForCell(c.model.getChildAt(a,f),b)};EditorUi.protot
this.actions.outlineWindow.window.setVisible(!1),null!=this.actions.layersWindow&&this.actions.layersWindow.window.setVisible(!1),null!=this.menus.tagsWindow&&this.menus.tagsWindow.window.setVisible(!1),null!=this.menus.findWindow&&this.menus.findWindow.window.setVisible(!1))};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);(window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))&&this.installMessageHandler(mxUtils.bind(this,
function(a,b,c){this.spinner.stop();this.addEmbedButtons();this.setGraphEnabled(!0);null!=a&&0<a.length?(this.setFileData(a),this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog(),this.chromelessResize&&this.chromelessResize()):(this.editor.graph.model.clear(),this.editor.fireEvent(new mxEventObject("resetGraphView")));this.editor.undoManager.clear();this.editor.modified=null!=c?c:!1;this.updateUi();window.self!==window.top&&window.focus();null!=
this.format&&this.format.refresh()}))};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(a,b){null!=a?a.getPublicUrl(b):b(null)};EditorUi.prototype.createLoadMessage=function(a){var b=this.editor.graph;return{event:a,pageVisible:b.pageVisible,translate:b.view.translate,
-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,g=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,g);mxEvent.addListener(window,
-"message",mxUtils.bind(this,function(f){if(f.source==(window.opener||window.parent)){var k=f.data,g=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{k=JSON.parse(k)}catch(I){k=null}if(null==k)return;if("dialog"==k.action){this.showError(null!=k.titleKey?mxResources.get(k.titleKey):k.title,null!=k.messageKey?mxResources.get(k.messageKey):k.message,null!=k.buttonKey?mxResources.get(k.buttonKey):k.button);null!=k.modified&&(this.editor.modified=k.modified);return}if("prompt"==k.action){this.spinner.stop();g=new FilenameDialog(this,k.defaultValue||"",null!=k.okKey?mxResources.get(k.okKey):null,function(a){null!=a&&
-h.postMessage(JSON.stringify({event:"prompt",value:a,message:k}),"*")},null!=k.titleKey?mxResources.get(k.titleKey):k.title);this.showDialog(g.container,300,80,!0,!1);g.init();return}if("draft"==k.action){var l=g(k.xml);this.spinner.stop();g=new DraftDialog(this,mxResources.get("draftFound",[k.name||this.defaultFilename]),l,mxUtils.bind(this,function(){this.hideDialog();h.postMessage(JSON.stringify({event:"draft",result:"edit",message:k}),"*")}),mxUtils.bind(this,function(){this.hideDialog();h.postMessage(JSON.stringify({event:"draft",
-result:"discard",message:k}),"*")}),k.editKey?mxResources.get(k.editKey):null,k.discardKey?mxResources.get(k.discardKey):null,k.ignore?mxUtils.bind(this,function(){this.hideDialog();h.postMessage(JSON.stringify({event:"draft",result:"ignore",message:k}),"*")}):null);this.showDialog(g.container,640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{g.init()}catch(I){h.postMessage(JSON.stringify({event:"draft",error:I.toString(),message:k}),"*")}return}if("template"==
-k.action){this.spinner.stop();g=1==k.enableRecent;l=1==k.enableSearch;g=new NewDialog(this,!1,null!=k.callback,mxUtils.bind(this,function(b,c){b=b||this.emptyDiagramXml;null!=k.callback?h.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,g?mxUtils.bind(this,function(a){this.recentReadyCallback=a;h.postMessage(JSON.stringify({event:"recentDocs"}),
-"*")}):null,l?mxUtils.bind(this,function(a,b){this.searchReadyCallback=b;h.postMessage(JSON.stringify({event:"searchDocs",searchStr:a}),"*")}):null,function(a,b,c){h.postMessage(JSON.stringify({event:"template",docUrl:a,info:b,name:c}),"*")});this.showDialog(g.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));g.init();return}if("searchDocsList"==k.action)this.searchReadyCallback(k.list,k.errorMsg);else if("recentDocsList"==k.action)this.recentReadyCallback(k.list,
-k.errorMsg);else{if("textContent"==k.action){this.editor.graph.setEnabled(!1);var m=this.editor.graph,g="";if(null!=this.pages)for(l=0;l<this.pages.length;l++){var n=m;this.currentPage!=this.pages[l]&&(n=this.createTemporaryGraph(m.getStylesheet()),n.model.setRoot(this.pages[l].root));g+=this.pages[l].getName()+" "+n.getIndexableText()+" "}else g=m.getIndexableText();this.editor.graph.setEnabled(!0);h.postMessage(JSON.stringify({event:"textContent",data:g,message:k}),"*");return}if("status"==k.action){null!=
-k.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(k.messageKey))):null!=k.message&&this.editor.setStatus(mxUtils.htmlEntities(k.message));null!=k.modified&&(this.editor.modified=k.modified);return}if("spinner"==k.action){var q=null!=k.messageKey?mxResources.get(k.messageKey):k.message;null==k.show||k.show?this.spinner.spin(document.body,q):this.spinner.stop();return}if("export"==k.action){if("png"==k.format||"xmlpng"==k.format){if(null==k.spin&&null==k.spinKey||this.spinner.spin(document.body,
-null!=k.spinKey?mxResources.get(k.spinKey):k.spin)){var p=null!=k.xml?k.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var m=this.editor.graph,t=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();var b=this.createLoadMessage("export");b.format=k.format;b.message=k;b.data=a;b.xml=encodeURIComponent(p);h.postMessage(JSON.stringify(b),"*")}),u=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);"xmlpng"==k.format&&(a=this.writeGraphModelToPng(a,"zTXt",
-"mxGraphModel",atob(this.editor.graph.compress(p))));m!=this.editor.graph&&m.container.parentNode.removeChild(m.container);t(a)});if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage!=this.pages[0]){var m=this.createTemporaryGraph(m.getStylesheet()),w=m.getGlobalVariable,A=this.pages[0];m.getGlobalVariable=function(a){return"page"==a?A.getName():"pagenumber"==a?1:w.apply(this,arguments)};document.body.appendChild(m.container);m.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,m)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==k.format?"1":"0")+"&base64=1&xml="+encodeURIComponent(encodeURIComponent(p)))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?t("data:image/png;base64,"+a.getText()):u(null)}),mxUtils.bind(this,function(){u(null)}))}}else{null!=k.xml&&0<k.xml.length&&this.setFileData(k.xml);q=this.createLoadMessage("export");
-if("html2"==k.format||"html"==k.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length))g=this.getXmlFileData(),q.xml=mxUtils.getXml(g),q.data=this.getFileData(null,null,!0,null,null,null,g),q.format=k.format;else if("html"==k.format)p=this.editor.getGraphXml(),q.data=this.getHtml(p,this.editor.graph),q.xml=mxUtils.getXml(p),q.format=k.format;else{mxSvgCanvas2D.prototype.foAltText=null;g=this.editor.graph.background;g==mxConstants.NONE&&(g=null);q.xml=this.getFileData(!0);q.format="svg";
-if(k.embedImages||null==k.embedImages){if(null==k.spin&&null==k.spinKey||this.spinner.spin(document.body,null!=k.spinKey?mxResources.get(k.spinKey):k.spin))this.editor.graph.setEnabled(!1),"xmlsvg"==k.format?this.getEmbeddedSvg(q.xml,this.editor.graph,null,!0,mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();q.data=this.createSvgDataUri(a);h.postMessage(JSON.stringify(q),"*")})):this.convertImages(this.editor.graph.getSvg(g),mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);
-this.spinner.stop();q.data=this.createSvgDataUri(mxUtils.getXml(a));h.postMessage(JSON.stringify(q),"*")}));return}g="xmlsvg"==k.format?this.getEmbeddedSvg(this.getFileData(!0),this.editor.graph,null,!0):mxUtils.getXml(this.editor.graph.getSvg(g));q.data=this.createSvgDataUri(g)}h.postMessage(JSON.stringify(q),"*")}return}if("load"==k.action)d=1==k.autosave,this.hideDialog(),null!=k.modified&&null==urlParams.modified&&(urlParams.modified=k.modified),null!=k.saveAndExit&&null==urlParams.saveAndExit&&
-(urlParams.saveAndExit=k.saveAndExit),null!=k.title&&null!=this.buttonContainer&&(l=document.createElement("span"),mxUtils.write(l,k.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),k=null!=k.xmlpng?this.extractGraphModelFromPng(k.xmlpng):k.xml;else{h.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(k)}),"*");return}}}var y=mxUtils.bind(this,function(f,k){c=!0;try{a(f,k)}catch(T){this.handleError(T)}c=!1;null!=urlParams.modified&&this.editor.setStatus("");var g=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});e=g();d&&null==b&&(b=mxUtils.bind(this,
-function(a,b){var d=g();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||h.postMessage(JSON.stringify(this.createLoadMessage("load")),"*")});null!=k&&"function"===typeof k.substring&&"data:application/vnd.visio;base64,"==k.substring(0,34)?(g="0M8R4KGxGuE"==k.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(k.substring(k.indexOf(",")+
-1)),function(a){y(a,f)},mxUtils.bind(this,function(a){this.handleError(a)}),g)):null!=k&&"function"===typeof k.substring&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(k,"")?this.parseFile(new Blob([k],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&"<mxGraphModel"==a.responseText.substring(0,13)&&y(a.responseText,f)}),""):null!=k&&"function"===typeof k.substring&&this.isLucidChartData(k)?this.convertLucidChart(k,
-mxUtils.bind(this,function(a){y(a)}),mxUtils.bind(this,function(a){this.handleError(a)})):(k=g(k),y(k,f))}}));var h=window.opener||window.parent,g="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";h.postMessage(g,"*")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar){var a=document.createElement("div");a.style.display="inline-block";a.style.position="absolute";a.style.paddingTop="atlas"==uiTheme?"2px":"3px";a.style.paddingLeft="8px";a.style.paddingBottom=
+bounds:b.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:b.view.scale,page:b.view.getBackgroundPageBounds()}};EditorUi.prototype.installMessageHandler=function(a){var b=null,d=!1,c=!1,e=null,g=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,g);mxEvent.addListener(window,
+"message",mxUtils.bind(this,function(f){if(f.source==(window.opener||window.parent)){var l=f.data,g=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{l=JSON.parse(l)}catch(I){l=null}if(null==l)return;if("dialog"==l.action){this.showError(null!=l.titleKey?mxResources.get(l.titleKey):l.title,null!=l.messageKey?mxResources.get(l.messageKey):l.message,null!=l.buttonKey?mxResources.get(l.buttonKey):l.button);null!=l.modified&&(this.editor.modified=l.modified);return}if("prompt"==l.action){this.spinner.stop();g=new FilenameDialog(this,l.defaultValue||"",null!=l.okKey?mxResources.get(l.okKey):null,function(a){null!=a&&
+h.postMessage(JSON.stringify({event:"prompt",value:a,message:l}),"*")},null!=l.titleKey?mxResources.get(l.titleKey):l.title);this.showDialog(g.container,300,80,!0,!1);g.init();return}if("draft"==l.action){var k=g(l.xml);this.spinner.stop();g=new DraftDialog(this,mxResources.get("draftFound",[l.name||this.defaultFilename]),k,mxUtils.bind(this,function(){this.hideDialog();h.postMessage(JSON.stringify({event:"draft",result:"edit",message:l}),"*")}),mxUtils.bind(this,function(){this.hideDialog();h.postMessage(JSON.stringify({event:"draft",
+result:"discard",message:l}),"*")}),l.editKey?mxResources.get(l.editKey):null,l.discardKey?mxResources.get(l.discardKey):null,l.ignore?mxUtils.bind(this,function(){this.hideDialog();h.postMessage(JSON.stringify({event:"draft",result:"ignore",message:l}),"*")}):null);this.showDialog(g.container,640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{g.init()}catch(I){h.postMessage(JSON.stringify({event:"draft",error:I.toString(),message:l}),"*")}return}if("template"==
+l.action){this.spinner.stop();g=1==l.enableRecent;k=1==l.enableSearch;g=new NewDialog(this,!1,null!=l.callback,mxUtils.bind(this,function(b,d){b=b||this.emptyDiagramXml;null!=l.callback?h.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,name:d}),"*"):(a(b,f,b!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,g?mxUtils.bind(this,function(a){this.recentReadyCallback=a;h.postMessage(JSON.stringify({event:"recentDocs"}),
+"*")}):null,k?mxUtils.bind(this,function(a,b){this.searchReadyCallback=b;h.postMessage(JSON.stringify({event:"searchDocs",searchStr:a}),"*")}):null,function(a,b,d){h.postMessage(JSON.stringify({event:"template",docUrl:a,info:b,name:d}),"*")});this.showDialog(g.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));g.init();return}if("searchDocsList"==l.action)this.searchReadyCallback(l.list,l.errorMsg);else if("recentDocsList"==l.action)this.recentReadyCallback(l.list,
+l.errorMsg);else{if("textContent"==l.action){this.editor.graph.setEnabled(!1);var m=this.editor.graph,g="";if(null!=this.pages)for(k=0;k<this.pages.length;k++){var n=m;this.currentPage!=this.pages[k]&&(n=this.createTemporaryGraph(m.getStylesheet()),n.model.setRoot(this.pages[k].root));g+=this.pages[k].getName()+" "+n.getIndexableText()+" "}else g=m.getIndexableText();this.editor.graph.setEnabled(!0);h.postMessage(JSON.stringify({event:"textContent",data:g,message:l}),"*");return}if("status"==l.action){null!=
+l.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(l.messageKey))):null!=l.message&&this.editor.setStatus(mxUtils.htmlEntities(l.message));null!=l.modified&&(this.editor.modified=l.modified);return}if("spinner"==l.action){var p=null!=l.messageKey?mxResources.get(l.messageKey):l.message;null==l.show||l.show?this.spinner.spin(document.body,p):this.spinner.stop();return}if("export"==l.action){if("png"==l.format||"xmlpng"==l.format){if(null==l.spin&&null==l.spinKey||this.spinner.spin(document.body,
+null!=l.spinKey?mxResources.get(l.spinKey):l.spin)){var q=null!=l.xml?l.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var m=this.editor.graph,t=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();var b=this.createLoadMessage("export");b.format=l.format;b.message=l;b.data=a;b.xml=encodeURIComponent(q);h.postMessage(JSON.stringify(b),"*")}),u=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);"xmlpng"==l.format&&(a=this.writeGraphModelToPng(a,"zTXt",
+"mxGraphModel",atob(this.editor.graph.compress(q))));m!=this.editor.graph&&m.container.parentNode.removeChild(m.container);t(a)});if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage!=this.pages[0]){var m=this.createTemporaryGraph(m.getStylesheet()),w=m.getGlobalVariable,A=this.pages[0];m.getGlobalVariable=function(a){return"page"==a?A.getName():"pagenumber"==a?1:w.apply(this,arguments)};document.body.appendChild(m.container);m.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,m)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==l.format?"1":"0")+"&base64=1&xml="+encodeURIComponent(encodeURIComponent(q)))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?t("data:image/png;base64,"+a.getText()):u(null)}),mxUtils.bind(this,function(){u(null)}))}}else{null!=l.xml&&0<l.xml.length&&this.setFileData(l.xml);p=this.createLoadMessage("export");
+if("html2"==l.format||"html"==l.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length))g=this.getXmlFileData(),p.xml=mxUtils.getXml(g),p.data=this.getFileData(null,null,!0,null,null,null,g),p.format=l.format;else if("html"==l.format)q=this.editor.getGraphXml(),p.data=this.getHtml(q,this.editor.graph),p.xml=mxUtils.getXml(q),p.format=l.format;else{mxSvgCanvas2D.prototype.foAltText=null;g=this.editor.graph.background;g==mxConstants.NONE&&(g=null);p.xml=this.getFileData(!0);p.format="svg";
+if(l.embedImages||null==l.embedImages){if(null==l.spin&&null==l.spinKey||this.spinner.spin(document.body,null!=l.spinKey?mxResources.get(l.spinKey):l.spin))this.editor.graph.setEnabled(!1),"xmlsvg"==l.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);h.postMessage(JSON.stringify(p),"*")})):this.convertImages(this.editor.graph.getSvg(g),mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);
+this.spinner.stop();p.data=this.createSvgDataUri(mxUtils.getXml(a));h.postMessage(JSON.stringify(p),"*")}));return}g="xmlsvg"==l.format?this.getEmbeddedSvg(this.getFileData(!0),this.editor.graph,null,!0):mxUtils.getXml(this.editor.graph.getSvg(g));p.data=this.createSvgDataUri(g)}h.postMessage(JSON.stringify(p),"*")}return}if("load"==l.action)c=1==l.autosave,this.hideDialog(),null!=l.modified&&null==urlParams.modified&&(urlParams.modified=l.modified),null!=l.saveAndExit&&null==urlParams.saveAndExit&&
+(urlParams.saveAndExit=l.saveAndExit),null!=l.title&&null!=this.buttonContainer&&(k=document.createElement("span"),mxUtils.write(k,l.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(k),this.embedFilenameSpan=
+k),l=null!=l.xmlpng?this.extractGraphModelFromPng(l.xmlpng):l.xml;else{h.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(l)}),"*");return}}}var y=mxUtils.bind(this,function(f,l){d=!0;try{a(f,l)}catch(T){this.handleError(T)}d=!1;null!=urlParams.modified&&this.editor.setStatus("");var g=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});e=g();c&&null==b&&(b=mxUtils.bind(this,
+function(a,b){var c=g();if(c!=e&&!d){var f=this.createLoadMessage("autosave");f.xml=c;c=JSON.stringify(f);(window.opener||window.parent).postMessage(c,"*")}e=c}),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||h.postMessage(JSON.stringify(this.createLoadMessage("load")),"*")});null!=l&&"function"===typeof l.substring&&"data:application/vnd.visio;base64,"==l.substring(0,34)?(g="0M8R4KGxGuE"==l.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(l.substring(l.indexOf(",")+
+1)),function(a){y(a,f)},mxUtils.bind(this,function(a){this.handleError(a)}),g)):null!=l&&"function"===typeof l.substring&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(l,"")?this.parseFile(new Blob([l],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&"<mxGraphModel"==a.responseText.substring(0,13)&&y(a.responseText,f)}),""):null!=l&&"function"===typeof l.substring&&this.isLucidChartData(l)?this.convertLucidChart(l,
+mxUtils.bind(this,function(a){y(a)}),mxUtils.bind(this,function(a){this.handleError(a)})):(l=g(l),y(l,f))}}));var h=window.opener||window.parent,g="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";h.postMessage(g,"*")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar){var a=document.createElement("div");a.style.display="inline-block";a.style.position="absolute";a.style.paddingTop="atlas"==uiTheme?"2px":"3px";a.style.paddingLeft="8px";a.style.paddingBottom=
"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,m="",n="auto",p="auto",B=null,x=null,G=40,D=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?m=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?D=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?m+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+D);k=null!=Q?A.model.getCell(m+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=D;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=
-D;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*D;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 m=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=
+640,520,!0,!0);this.importCsvDialog.init()};EditorUi.prototype.importCsv=function(a,b){try{var d=a.split("\n"),c=[];if(0<d.length){var e={},f=null,g=null,h=null,l=null,m="",n="auto",q="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",l=null,S=[],aa=null,Z=null,N=0;N<d.length&&"#"==d[N].charAt(0);){a=d[N];for(N++;N<
+d.length&&"\\"==a.charAt(a.length-1)&&"#"==d[N].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(d[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?l=L:"namespace"==Q&&0<L.length&&"-"!=L?m=L:"width"==Q?n=L:"height"==Q?q=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(d[N]),Q=Y=null;if(null!=h||null!=l)for(var R=0;R<U.length;R++)h==U[R]&&(Y=R),l==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<d.length;R++){var V=
+this.editor.csvToArray(d[R]);if(V.length==U.length){var J=null,X=null!=Y?m+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),"@"==q.charAt(0)&&null!=J.getAttribute(q.substring(1))?
+J.geometry.height=parseFloat(J.getAttribute(q.substring(1))):J.geometry.height="auto"==q?da.height+H:parseFloat(q),I+=J.geometry.height+C);l=null!=Q?A.model.getCell(m+V[Q]):null;null!=l?(l.style=A.replacePlaceholders(l,g),A.addCell(J,l)):c.push(A.addCell(J))}}for(var ba=c.slice(),ea=c.slice(),O=0;O<S.length;O++)for(var ca=S[O],R=0;R<c.length;R++){var J=c[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<c.length;R++)for(J=c[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<c.length;a++){var b=A.getCellGeometry(c[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"==q&&(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(c,a)};this.executeLayout(function(){ja.execute(A.getDefaultParent());na()},!0,E);E=null}else if("horizontaltree"==P||
+"verticaltree"==P||"auto"==P&&ea.length==2*c.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>c.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(c,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 d="?",c;for(c in urlParams)0>mxUtils.indexOf(a,c)&&null!=urlParams[c]&&(b+=d+c+"="+urlParams[c],d="&")}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 d="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),c;for(c in urlParams)0>mxUtils.indexOf(d,c)&&(a=0==b?a+"?":a+"&",null!=urlParams[c]&&(a+=c+"="+urlParams[c],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 m=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=
m.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()};
@@ -8179,34 +8180,34 @@ a);this.actions.get("redo").setEnabled(this.canRedo()&&a);this.menus.get("edit")
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&&
+"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(),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!=
+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),l=d.getGraphBounds(),k=Math.floor(l.width*g/d.view.scale),m=Math.floor(l.height*g/d.view.scale);
+f.length<=MAX_REQUEST_SIZE&&k*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="+k+"&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 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.viewStateWhitelist="background backgroundImage foldingEnabled pageScale mathEnabled shadowVisible pageFormat".split(" ");
-EditorUi.prototype.patchPages=function(a,c,b,e,g){var h={},m=[],p={},n={},d={},f={};if(null!=e&&null!=e[EditorUi.DIFF_UPDATE])for(var l in e[EditorUi.DIFF_UPDATE])h[l]=e[EditorUi.DIFF_UPDATE][l];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(l in c[EditorUi.DIFF_UPDATE])e=
-c[EditorUi.DIFF_UPDATE][l],null!=e.previous&&(f[e.previous]=l);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;m.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(l in f)w(d[f[l]]),
-delete f[l];for(l in p)y(p[l]),delete p[l];return m};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=e[a];null==b&&(b={inserted:[],moved:{}},e[a]=b);return b}var e={};if(null!=c[EditorUi.DIFF_INSERT])for(var g=0;g<c[EditorUi.DIFF_INSERT].length;g++){var h=c[EditorUi.DIFF_INSERT][g],m=null!=h.parent?h.parent:"",p=null!=h.previous?h.previous:"";b(m).inserted[p]=h}if(null!=c[EditorUi.DIFF_UPDATE])for(var n in c[EditorUi.DIFF_UPDATE])h=c[EditorUi.DIFF_UPDATE][n],null!=h.previous&&(m=h.parent,null==m&&(g=a.getCell(n),null!=g&&(g=
+EditorUi.prototype.patchPages=function(a,c,b,e,g){var h={},m=[],q={},n={},d={},f={};if(null!=e&&null!=e[EditorUi.DIFF_UPDATE])for(var k in e[EditorUi.DIFF_UPDATE])h[k]=e[EditorUi.DIFF_UPDATE][k];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++)q[c[EditorUi.DIFF_INSERT][e].previous]=c[EditorUi.DIFF_INSERT][e];if(null!=c[EditorUi.DIFF_UPDATE])for(k in c[EditorUi.DIFF_UPDATE])e=
+c[EditorUi.DIFF_UPDATE][k],null!=e.previous&&(f[e.previous]=k);if(null!=a){var p="";for(e=0;e<a.length;e++){var t=a[e].getId();d[t]=a[e];null!=f[p]||n[t]||null!=c[EditorUi.DIFF_UPDATE]&&null!=c[EditorUi.DIFF_UPDATE][t]&&null!=c[EditorUi.DIFF_UPDATE][t].previous||(f[p]=t);p=t}}var u={},w=mxUtils.bind(this,function(a){var e=null!=a?a.getId():"";if(null!=a&&!u[e]){u[e]=!0;m.push(a);var l=null!=c[EditorUi.DIFF_UPDATE]?c[EditorUi.DIFF_UPDATE][e]:null;null!=l&&(this.updatePageRoot(a),null!=l.name&&a.setName(l.name),
+null!=l.view&&this.patchViewState(a,l.view),null!=l.cells&&this.patchPage(a,l.cells,h[a.getId()],g),!b||null==l.cells&&null==l.view||(a.needsUpdate=!0))}a=f[e];null!=a&&(delete f[e],w(d[a]));a=q[e];null!=a&&(delete q[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(k in f)w(d[f[k]]),
+delete f[k];for(k in q)y(q[k]),delete q[k];return m};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=e[a];null==b&&(b={inserted:[],moved:{}},e[a]=b);return b}var e={};if(null!=c[EditorUi.DIFF_INSERT])for(var g=0;g<c[EditorUi.DIFF_INSERT].length;g++){var h=c[EditorUi.DIFF_INSERT][g],m=null!=h.parent?h.parent:"",q=null!=h.previous?h.previous:"";b(m).inserted[q]=h}if(null!=c[EditorUi.DIFF_UPDATE])for(var n in c[EditorUi.DIFF_UPDATE])h=c[EditorUi.DIFF_UPDATE][n],null!=h.previous&&(m=h.parent,null==m&&(g=a.getCell(n),null!=g&&(g=
a.getParent(g),null!=g&&(m=g.getId()))),null!=m&&(b(m).moved[h.previous]=n));return e};
-EditorUi.prototype.patchPage=function(a,c,b,e){var g=a==this.currentPage?this.editor.graph.model:new mxGraphModel(a.root),h=this.createParentLookup(g,c);g.beginUpdate();try{var m=g.updateEdgeParent,p=new mxDictionary,n=[];g.updateEdgeParent=function(a,b){!p.get(a)&&e&&(p.put(a,!0),n.push(a))};var d=h[""],f=null!=d&&null!=d.inserted?d.inserted[""]:null,l=null;null!=f&&(l=this.getCellForJson(f));if(null==l){var q=null!=d&&null!=d.moved?d.moved[""]:null;null!=q&&(l=g.getCell(q))}null!=l&&(g.setRoot(l),
-a.root=l);if(null!=c[EditorUi.DIFF_REMOVE])for(var t=0;t<c[EditorUi.DIFF_REMOVE].length;t++){var u=g.getCell(c[EditorUi.DIFF_REMOVE][t]);null!=u&&g.remove(u)}this.patchCellRecursive(a,g,g.root,h,c);if(null!=c[EditorUi.DIFF_UPDATE]){var w=null!=b&&null!=b.cells?b.cells[EditorUi.DIFF_UPDATE]:null;for(q in c[EditorUi.DIFF_UPDATE])this.patchCell(g,g.getCell(q),c[EditorUi.DIFF_UPDATE][q],null!=w?w[q]:null)}if(null!=c[EditorUi.DIFF_INSERT])for(t=0;t<c[EditorUi.DIFF_INSERT].length;t++)f=c[EditorUi.DIFF_INSERT][t],
+EditorUi.prototype.patchPage=function(a,c,b,e){var g=a==this.currentPage?this.editor.graph.model:new mxGraphModel(a.root),h=this.createParentLookup(g,c);g.beginUpdate();try{var m=g.updateEdgeParent,q=new mxDictionary,n=[];g.updateEdgeParent=function(a,b){!q.get(a)&&e&&(q.put(a,!0),n.push(a))};var d=h[""],f=null!=d&&null!=d.inserted?d.inserted[""]:null,k=null;null!=f&&(k=this.getCellForJson(f));if(null==k){var p=null!=d&&null!=d.moved?d.moved[""]:null;null!=p&&(k=g.getCell(p))}null!=k&&(g.setRoot(k),
+a.root=k);if(null!=c[EditorUi.DIFF_REMOVE])for(var t=0;t<c[EditorUi.DIFF_REMOVE].length;t++){var u=g.getCell(c[EditorUi.DIFF_REMOVE][t]);null!=u&&g.remove(u)}this.patchCellRecursive(a,g,g.root,h,c);if(null!=c[EditorUi.DIFF_UPDATE]){var w=null!=b&&null!=b.cells?b.cells[EditorUi.DIFF_UPDATE]:null;for(p in c[EditorUi.DIFF_UPDATE])this.patchCell(g,g.getCell(p),c[EditorUi.DIFF_UPDATE][p],null!=w?w[p]:null)}if(null!=c[EditorUi.DIFF_INSERT])for(t=0;t<c[EditorUi.DIFF_INSERT].length;t++)f=c[EditorUi.DIFF_INSERT][t],
u=g.getCell(f.id),null!=u&&(g.setTerminal(u,g.getCell(f.source),!0),g.setTerminal(u,g.getCell(f.target),!1));g.updateEdgeParent=m;if(e&&0<n.length)for(t=0;t<n.length;t++)g.contains(n[t])&&g.updateEdgeParent(n[t])}finally{g.endUpdate()}};
-EditorUi.prototype.patchCellRecursive=function(a,c,b,e,g){for(var h=e[b.getId()],m=null!=h&&null!=h.inserted?h.inserted:{},p=null!=h&&null!=h.moved?h.moved:{},n=0,h=c.getChildCount(b),d="",f=0;f<h;f++){var l=c.getChildAt(b,f).getId();null==p[d]&&(null==g[EditorUi.DIFF_UPDATE]||null==g[EditorUi.DIFF_UPDATE][l]||null==g[EditorUi.DIFF_UPDATE][l].previous&&null==g[EditorUi.DIFF_UPDATE][l].parent)&&(p[d]=l);d=l}var q=mxUtils.bind(this,function(d){var f=null!=d?d.getId():"";null!=d&&(c.getChildAt(b,n)!=
-d&&c.add(b,d,n),this.patchCellRecursive(a,c,d,e,g),n++);d=p[f];null!=d&&(delete p[f],q(c.getCell(d)));d=m[f];null!=d&&(delete m[f],q(this.getCellForJson(d)))});q();for(var t in p)q(c.getCell(p[t])),delete p[t];for(t in m)q(this.getCellForJson(m[t])),delete m[t]};
+EditorUi.prototype.patchCellRecursive=function(a,c,b,e,g){for(var h=e[b.getId()],m=null!=h&&null!=h.inserted?h.inserted:{},q=null!=h&&null!=h.moved?h.moved:{},n=0,h=c.getChildCount(b),d="",f=0;f<h;f++){var k=c.getChildAt(b,f).getId();null==q[d]&&(null==g[EditorUi.DIFF_UPDATE]||null==g[EditorUi.DIFF_UPDATE][k]||null==g[EditorUi.DIFF_UPDATE][k].previous&&null==g[EditorUi.DIFF_UPDATE][k].parent)&&(q[d]=k);d=k}var p=mxUtils.bind(this,function(d){var f=null!=d?d.getId():"";null!=d&&(c.getChildAt(b,n)!=
+d&&c.add(b,d,n),this.patchCellRecursive(a,c,d,e,g),n++);d=q[f];null!=d&&(delete q[f],p(c.getCell(d)));d=m[f];null!=d&&(delete m[f],p(this.getCellForJson(d)))});p();for(var t in q)p(c.getCell(q[t])),delete q[t];for(t in m)p(this.getCellForJson(m[t])),delete m[t]};
EditorUi.prototype.patchCell=function(a,c,b,e){if(null!=c&&null!=b){if(null==e||null==e.xmlValue&&(null==e.value||""==e.value))null!=b.value?a.setValue(c,b.value):null!=b.xmlValue&&a.setValue(c,mxUtils.parseXml(b.xmlValue).documentElement);null!=e&&null!=e.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)}};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 e=new DiagramPage(a[b]);this.updatePageRoot(e);c.push(e)}return c};
-EditorUi.prototype.diffPages=function(a,c){for(var b=[],e=[],g={},h={},m={},p=null,n=0;n<c.length;n++)h[c[n].getId()]={page:c[n],prev:p},p=c[n];p=null;for(n=0;n<a.length;n++){var d=a[n].getId(),f=h[d];if(null==f)e.push(d);else{var l=this.diffPage(a[n],f.page),q={};0<Object.keys(l).length&&(q.cells=l);l=this.diffViewState(a[n],f.page);0<Object.keys(l).length&&(q.view=l);if((null!=f.prev?null==p:null!=p)||null!=p&&null!=f.prev&&p.getId()!=f.prev.getId())q.previous=null!=f.prev?f.prev.getId():"";null!=
-f.page.getName()&&a[n].getName()!=f.page.getName()&&(q.name=f.page.getName());0<Object.keys(q).length&&(m[d]=q)}delete h[a[n].getId()];p=a[n]}for(d in h)f=h[d],b.push({data:mxUtils.getXml(f.page.node),previous:null!=f.prev?f.prev.getId():""});0<Object.keys(m).length&&(g[EditorUi.DIFF_UPDATE]=m);0<e.length&&(g[EditorUi.DIFF_REMOVE]=e);0<b.length&&(g[EditorUi.DIFF_INSERT]=b);return g};
+EditorUi.prototype.diffPages=function(a,c){for(var b=[],e=[],g={},h={},m={},q=null,n=0;n<c.length;n++)h[c[n].getId()]={page:c[n],prev:q},q=c[n];q=null;for(n=0;n<a.length;n++){var d=a[n].getId(),f=h[d];if(null==f)e.push(d);else{var k=this.diffPage(a[n],f.page),p={};0<Object.keys(k).length&&(p.cells=k);k=this.diffViewState(a[n],f.page);0<Object.keys(k).length&&(p.view=k);if((null!=f.prev?null==q:null!=q)||null!=q&&null!=f.prev&&q.getId()!=f.prev.getId())p.previous=null!=f.prev?f.prev.getId():"";null!=
+f.page.getName()&&a[n].getName()!=f.page.getName()&&(p.name=f.page.getName());0<Object.keys(p).length&&(m[d]=p)}delete h[a[n].getId()];q=a[n]}for(d in h)f=h[d],b.push({data:mxUtils.getXml(f.page.node),previous:null!=f.prev?f.prev.getId():""});0<Object.keys(m).length&&(g[EditorUi.DIFF_UPDATE]=m);0<e.length&&(g[EditorUi.DIFF_REMOVE]=e);0<b.length&&(g[EditorUi.DIFF_INSERT]=b);return g};
EditorUi.prototype.createCellLookup=function(a,c,b,e){e=null!=e?e:{};e[a.getId()]={cell:a,prev:c};b=a.getChildCount();c=null;for(var g=0;g<b;g++){var h=a.getChildAt(g);this.createCellLookup(h,c,g,e);c=h}return e};
-EditorUi.prototype.diffCellRecursive=function(a,c,b,e,g){e=null!=e?e:{};var h=b[a.getId()];delete b[a.getId()];if(null==h)g.push(a.getId());else{var m=this.diffCell(a,h.cell);if(null!=m.parent||(null!=h.prev?null==c:null!=c)||null!=c&&null!=h.prev&&c.getId()!=h.prev.getId())m.previous=null!=h.prev?h.prev.getId():"";0<Object.keys(m).length&&(e[a.getId()]=m)}h=a.getChildCount();c=null;for(m=0;m<h;m++){var p=a.getChildAt(m);this.diffCellRecursive(p,c,b,e,g);c=p}return e};
-EditorUi.prototype.diffPage=function(a,c){var b=[],e=[],g={};this.updatePageRoot(a);this.updatePageRoot(c);var h=this.createCellLookup(c.root,null,0),m=this.diffCellRecursive(a.root,null,h,m,e),p;for(p in h){var n=h[p];b.push(this.getJsonForCell(n.cell,n.prev))}0<Object.keys(m).length&&(g[EditorUi.DIFF_UPDATE]=m);0<e.length&&(g[EditorUi.DIFF_REMOVE]=e);0<b.length&&(g[EditorUi.DIFF_INSERT]=b);return g};
-EditorUi.prototype.diffViewState=function(a,c){var b=a.viewState,e=c.viewState,g={};c==this.currentPage&&(e=this.editor.graph.getViewState());if(null!=b&&null!=e)for(var h=0;h<this.viewStateWhitelist.length;h++){var m=this.viewStateWhitelist[h],p=JSON.stringify(b[m]),n=JSON.stringify(e[m]);p!=n&&(g[m]=n)}return g};
+EditorUi.prototype.diffCellRecursive=function(a,c,b,e,g){e=null!=e?e:{};var h=b[a.getId()];delete b[a.getId()];if(null==h)g.push(a.getId());else{var m=this.diffCell(a,h.cell);if(null!=m.parent||(null!=h.prev?null==c:null!=c)||null!=c&&null!=h.prev&&c.getId()!=h.prev.getId())m.previous=null!=h.prev?h.prev.getId():"";0<Object.keys(m).length&&(e[a.getId()]=m)}h=a.getChildCount();c=null;for(m=0;m<h;m++){var q=a.getChildAt(m);this.diffCellRecursive(q,c,b,e,g);c=q}return e};
+EditorUi.prototype.diffPage=function(a,c){var b=[],e=[],g={};this.updatePageRoot(a);this.updatePageRoot(c);var h=this.createCellLookup(c.root,null,0),m=this.diffCellRecursive(a.root,null,h,m,e),q;for(q in h){var n=h[q];b.push(this.getJsonForCell(n.cell,n.prev))}0<Object.keys(m).length&&(g[EditorUi.DIFF_UPDATE]=m);0<e.length&&(g[EditorUi.DIFF_REMOVE]=e);0<b.length&&(g[EditorUi.DIFF_INSERT]=b);return g};
+EditorUi.prototype.diffViewState=function(a,c){var b=a.viewState,e=c.viewState,g={};c==this.currentPage&&(e=this.editor.graph.getViewState());if(null!=b&&null!=e)for(var h=0;h<this.viewStateWhitelist.length;h++){var m=this.viewStateWhitelist[h],q=JSON.stringify(b[m]),n=JSON.stringify(e[m]);q!=n&&(g[m]=n)}return g};
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;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);return b};
@@ -8221,51 +8222,49 @@ a},init:function(){mxSettings.settings={language:"",configVersion:Editor.configV
"undefined"!==typeof JSON)try{delete mxSettings.settings.isNew,mxSettings.settings.version=mxSettings.currentVersion,localStorage.setItem(mxSettings.key,JSON.stringify(mxSettings.settings))}catch(a){}},load:function(){isLocalStorage&&"undefined"!==typeof JSON&&mxSettings.parse(localStorage.getItem(mxSettings.key));null==mxSettings.settings&&mxSettings.init()},parse:function(a){null!=a&&(a=JSON.parse(a),null!=Editor.config&&Editor.config.override||a.configVersion!=Editor.configVersion?mxSettings.settings=
null:(mxSettings.settings=a,null==mxSettings.settings.plugins&&(mxSettings.settings.plugins=[]),null==mxSettings.settings.recentColors&&(mxSettings.settings.recentColors=[]),null==mxSettings.settings.libraries&&(mxSettings.settings.libraries=Sidebar.prototype.defaultEntries),null==mxSettings.settings.customLibraries&&(mxSettings.settings.customLibraries=Editor.defaultCustomLibraries),null==mxSettings.settings.ui&&(mxSettings.settings.ui=""),null==mxSettings.settings.formatWidth&&(mxSettings.settings.formatWidth=
mxSettings.defaultFormatWidth),null!=mxSettings.settings.lastAlert&&delete mxSettings.settings.lastAlert,null==mxSettings.settings.createTarget&&(mxSettings.settings.createTarget=!1),null==mxSettings.settings.pageFormat&&(mxSettings.settings.pageFormat=mxGraph.prototype.pageFormat),null==mxSettings.settings.search&&(mxSettings.settings.search=!0),null==mxSettings.settings.showStartScreen&&(mxSettings.settings.showStartScreen=!0),null==mxSettings.settings.gridColor&&(mxSettings.settings.gridColor=
-mxGraphView.prototype.gridColor),null==mxSettings.settings.autosave&&(mxSettings.settings.autosave=!0),null!=mxSettings.settings.scratchpadSeen&&delete mxSettings.settings.scratchpadSeen))},clear:function(){isLocalStorage&&localStorage.removeItem(mxSettings.key)}};("undefined"==typeof mxLoadSettings||mxLoadSettings)&&mxSettings.load();DrawioFileSync=function(a){mxEventSource.call(this);this.lastActivity=new Date;this.clientId=Editor.guid();this.ui=a.ui;this.file=a;this.onlineListener=mxUtils.bind(this,function(){this.updateOnlineState();null!=this.channelId&&this.isConnected()&&this.fileChangedNotify()});mxEvent.addListener(window,"online",this.onlineListener);this.visibleListener=mxUtils.bind(this,function(){"hidden"==document.visibilityState?this.isConnected()&&!this.paused&&this.stop():null==this.channelId&&this.start(this.paused)});
-mxEvent.addListener(document,"visibilitychange",this.visibleListener);this.activityListener=mxUtils.bind(this,function(a){this.lastActivity=new Date;null==this.channelId&&this.start(this.paused)});mxEvent.addListener(document,mxClient.IS_POINTER?"pointermove":"mousemove",this.activityListener);mxEvent.addListener(document,"keypress",this.activityListener);mxEvent.addListener(window,"focus",this.activityListener);!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&(mxEvent.addListener(document,"touchstart",this.activityListener),
-mxEvent.addListener(document,"touchmove",this.activityListener))};DrawioFileSync.PROTOCOL=2;mxUtils.extend(DrawioFileSync,mxEventSource);DrawioFileSync.prototype.maxCacheEntrySize=1E6;DrawioFileSync.prototype.enabled=!0;DrawioFileSync.prototype.updateStatusInterval=1E4;DrawioFileSync.prototype.cacheUrl="1"==urlParams.dev?"/cache":"https://rt.draw.io/cache";DrawioFileSync.prototype.channelId=null;DrawioFileSync.prototype.channel=null;DrawioFileSync.prototype.catchupRetryCount=0;
-DrawioFileSync.prototype.maxCatchupRetries=15;DrawioFileSync.prototype.maxCacheReadyRetries=2;DrawioFileSync.prototype.cacheReadyDelay=600;DrawioFileSync.prototype.paused=!1;DrawioFileSync.prototype.inactivityTimeoutSeconds=3600;DrawioFileSync.prototype.lastActivity=null;
-DrawioFileSync.prototype.start=function(a){if("hidden"!=document.visibilityState&&(this.lastModified=this.file.getLastModifiedDate(),this.channelId=this.file.getChannelId(),null!=this.channelId)){this.pusher=this.ui.getPusher();if(null!=this.pusher){try{this.pusherErrorListener=mxUtils.bind(this,function(a){null!=a.error&&null!=a.error.data&&4004===a.error.data.code&&EditorUi.logError("Error: Pusher Limit",null,this.file.getId())}),this.pusher.connection.bind("error",this.pusherErrorListener)}catch(e){}try{if(this.pusher.connect(),
-this.channel=this.pusher.subscribe(this.channelId),this.key=this.file.getChannelKey(),this.lastActivity=new Date,this.paused=!1,a&&this.fileChangedNotify(),null==this.file.stats.start&&(this.file.stats.start=(new Date).toISOString()),EditorUi.debug("Sync.start",[this],a),!this.ui.isOffline()&&!a){var c=this.file.getCurrentUser(),b=null!=c?this.ui.hashValue(c.id):"unknown";EditorUi.logEvent({category:"RT-START-"+DrawioFile.SYNC,action:"file-"+this.file.getId()+"-mode-"+this.file.getMode()+"-size-"+
-this.file.getSize()+"-user-"+b+"-client-"+this.clientId,label:this.file.stats.start})}}catch(e){}}this.installListeners();window.setTimeout(mxUtils.bind(this,function(){this.resetUpdateStatusThread();this.updateOnlineState();this.updateStatus()},0))}};DrawioFileSync.prototype.isConnected=function(){return null!=this.pusher&&null!=this.pusher.connection?"connected"==this.pusher.connection.state:!1};
+mxGraphView.prototype.gridColor),null==mxSettings.settings.autosave&&(mxSettings.settings.autosave=!0),null!=mxSettings.settings.scratchpadSeen&&delete mxSettings.settings.scratchpadSeen))},clear:function(){isLocalStorage&&localStorage.removeItem(mxSettings.key)}};("undefined"==typeof mxLoadSettings||mxLoadSettings)&&mxSettings.load();DrawioFileSync=function(a){mxEventSource.call(this);this.lastActivity=new Date;this.clientId=Editor.guid();this.ui=a.ui;this.file=a;this.onlineListener=mxUtils.bind(this,function(){this.updateOnlineState();this.isConnected()&&this.fileChangedNotify()});mxEvent.addListener(window,"online",this.onlineListener);this.visibleListener=mxUtils.bind(this,function(){"hidden"==document.visibilityState?this.isConnected()&&this.stop():this.start()});mxEvent.addListener(document,"visibilitychange",this.visibleListener);
+this.activityListener=mxUtils.bind(this,function(a){this.lastActivity=new Date;this.start()});mxEvent.addListener(document,mxClient.IS_POINTER?"pointermove":"mousemove",this.activityListener);mxEvent.addListener(document,"keypress",this.activityListener);mxEvent.addListener(window,"focus",this.activityListener);!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&(mxEvent.addListener(document,"touchstart",this.activityListener),mxEvent.addListener(document,"touchmove",this.activityListener))};
+DrawioFileSync.PROTOCOL=3;mxUtils.extend(DrawioFileSync,mxEventSource);DrawioFileSync.prototype.maxCacheEntrySize=1E6;DrawioFileSync.prototype.enabled=!0;DrawioFileSync.prototype.updateStatusInterval=1E4;DrawioFileSync.prototype.cacheUrl="1"==urlParams.dev?"/cache":"https://rt.draw.io/cache";DrawioFileSync.prototype.channelId=null;DrawioFileSync.prototype.channel=null;DrawioFileSync.prototype.catchupRetryCount=0;DrawioFileSync.prototype.maxCatchupRetries=15;
+DrawioFileSync.prototype.maxCacheReadyRetries=2;DrawioFileSync.prototype.cacheReadyDelay=500;DrawioFileSync.prototype.inactivityTimeoutSeconds=3600;DrawioFileSync.prototype.lastActivity=null;
+DrawioFileSync.prototype.start=function(){null==this.channelId&&(this.channelId=this.file.getChannelId());null==this.key&&(this.key=this.file.getChannelKey());if(null==this.pusher&&null!=this.channelId&&"hidden"!=document.visibilityState){this.pusher=this.ui.getPusher();if(null!=this.pusher){try{this.pusherErrorListener=mxUtils.bind(this,function(a){null!=a.error&&null!=a.error.data&&4004===a.error.data.code&&EditorUi.logError("Error: Pusher Limit",null,this.file.getId())}),this.pusher.connection.bind("error",
+this.pusherErrorListener)}catch(b){}try{if(this.pusher.connect(),this.channel=this.pusher.subscribe(this.channelId),EditorUi.debug("Sync.start",[this]),null==this.file.stats.start&&(this.file.stats.start=(new Date).toISOString(),!this.ui.isOffline())){var a=this.file.getCurrentUser(),c=null!=a?this.ui.hashValue(a.id):"unknown";EditorUi.logEvent({category:"RT-START-"+DrawioFile.SYNC,action:"file-"+this.file.getId()+"-mode-"+this.file.getMode()+"-size-"+this.file.getSize()+"-user-"+c+"-client-"+this.clientId,
+label:this.file.stats.start})}}catch(b){}this.installListeners()}window.setTimeout(mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.lastActivity=new Date;this.resetUpdateStatusThread();this.updateOnlineState();this.updateStatus()},0))}};DrawioFileSync.prototype.isConnected=function(){return null!=this.pusher&&null!=this.pusher.connection?"connected"==this.pusher.connection.state:!1};
DrawioFileSync.prototype.updateOnlineState=function(){var a=mxUtils.bind(this,function(a){mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){this.enabled=!this.enabled;this.ui.updateButtonContainer();this.resetUpdateStatusThread();this.updateOnlineState();this.updateStatus();!this.file.inConflictState&&this.enabled&&this.fileChangedNotify()}))});if("min"==uiTheme&&null!=this.ui.buttonContainer){if(null==this.collaboratorsElement){var c=document.createElement("a");c.className="geToolbarButton";
c.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;float:left;";c.style.backgroundPosition="center center";c.style.backgroundRepeat="no-repeat";c.style.backgroundSize="24px 24px";c.style.height="24px";c.style.width="24px";a(c);this.ui.buttonContainer.appendChild(c);this.collaboratorsElement=c}}else null!=this.ui.toolbarContainer&&null==this.collaboratorsElement&&(c=document.createElement("a"),c.className="geButton",c.style.position="absolute",
c.style.display="inline-block",c.style.verticalAlign="bottom",c.style.color="#666",c.style.top="5px",c.style.right="atlas"==uiTheme?"42px":"60px",c.style.padding="2px",c.style.fontSize="8pt",c.style.verticalAlign="middle",c.style.textDecoration="none",c.style.backgroundPosition="center center",c.style.backgroundRepeat="no-repeat",c.style.backgroundSize="16px 16px",c.style.width="16px",c.style.height="16px",mxUtils.setOpacity(c,60),"dark"==uiTheme&&(c.style.filter="invert(100%)"),mxEvent.addListener(c,
mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(a){a.preventDefault()})),a(c),this.ui.toolbarContainer.appendChild(c),this.collaboratorsElement=c);null!=this.collaboratorsElement&&(a="",a=this.enabled?this.file.invalidChecksum?mxResources.get("error")+": "+mxResources.get("checksum"):this.ui.isOffline()||!this.isConnected()?mxResources.get("offline"):mxResources.get("online"):mxResources.get("disconnected"),this.collaboratorsElement.setAttribute("title",a),this.collaboratorsElement.style.backgroundImage=
"url("+(this.enabled?this.ui.isOffline()||!this.isConnected()||this.file.invalidChecksum?Editor.syncProblemImage:Editor.syncImage:Editor.syncDisabledImage)+")")};
-DrawioFileSync.prototype.updateStatus=function(){!this.paused&&this.isConnected()&&null!=this.lastActivity&&((new Date).getTime()-this.lastActivity.getTime())/1E3>this.inactivityTimeoutSeconds&&this.stop();if(!(this.file.isModified()||this.file.inConflictState||null!=this.file.autosaveThread||this.file.savingFile||this.redirectDialogShowing))if(this.enabled&&null!=this.ui.statusContainer){var a=this.ui.timeSince(new Date(this.lastModified));null==a&&(a=mxResources.get("lessThanAMinute"));var c=this.file.isRevisionHistorySupported(),
+DrawioFileSync.prototype.updateStatus=function(){this.isConnected()&&null!=this.lastActivity&&((new Date).getTime()-this.lastActivity.getTime())/1E3>this.inactivityTimeoutSeconds&&this.stop();if(!(this.file.isModified()||this.file.inConflictState||null!=this.file.autosaveThread||this.file.savingFile||this.redirectDialogShowing))if(this.enabled&&null!=this.ui.statusContainer){var a=this.ui.timeSince(new Date(this.lastModified));null==a&&(a=mxResources.get("lessThanAMinute"));var c=this.file.isRevisionHistorySupported(),
b=this.lastMessage;this.lastMessage=null;null!=b&&40<b.length&&(b=b.substring(0,40)+"...");a=mxResources.get("lastChange",[a]);this.ui.editor.setStatus('<div style="display:inline-block;">'+mxUtils.htmlEntities(a)+"</div>"+(null!=b?' <span style="opacity:0;">('+b+")</span>":"")+(this.file.isEditable()?"":'<div class="geStatusAlert" style="margin-left:8px;display:inline-block;">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</div>")+(this.isConnected()?"":'<div class="geStatusAlert geBlink" style="margin-left:8px;display:inline-block;">'+
mxUtils.htmlEntities(mxResources.get("disconnected"))+"</div>"));b=this.ui.statusContainer.getElementsByTagName("div");0<b.length&&(c?(b[0].style.cursor="pointer",b[0].style.textDecoration="underline",b[0].setAttribute("title",mxResources.get("revisionHistory")),mxEvent.addListener(b[0],"click",mxUtils.bind(this,function(){this.ui.actions.get("revisionHistory").funct()}))):b[0].setAttribute("title",a));c=this.ui.statusContainer.getElementsByTagName("span");if(0<c.length){var e=c[0];mxUtils.setPrefixedStyle(e.style,
"transition","all 0.2s ease");window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(e,100);mxUtils.setPrefixedStyle(e.style,"transition","all 1s ease");window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(e,0)}),this.updateStatusInterval/2)}),0)}this.resetUpdateStatusThread()}else this.file.addAllSavedStatus()};
DrawioFileSync.prototype.resetUpdateStatusThread=function(){null!=this.updateStatusThread&&window.clearInterval(this.updateStatusThread);null!=this.channel&&(this.updateStatusThread=window.setInterval(mxUtils.bind(this,function(){this.updateStatus()}),this.updateStatusInterval))};
-DrawioFileSync.prototype.installListeners=function(){null!=this.pusher&&(this.connectionListener=mxUtils.bind(this,function(){this.updateOnlineState();this.updateStatus();if(this.isConnected()&&!this.announced){var a=this.file.getCurrentUser(),c={a:"join"};null!=a&&(c.name=a.displayName,c.uid=a.id);mxUtils.post(this.cacheUrl,this.getIdParameters()+"&msg="+encodeURIComponent(this.objectToString(this.createMessage(c))));this.announced=!0;this.file.stats.msgSent++}}),this.pusher.connection.bind("state_change",
-this.connectionListener));null!=this.channel&&(this.changeListener=mxUtils.bind(this,function(a){this.file.stats.msgReceived++;this.lastActivity=new Date;if(this.enabled&&!this.file.inConflictState&&!this.redirectDialogShowing)try{var c=this.stringToObject(a);null!=c&&(EditorUi.debug("Sync.message",[this],c,a.length,"bytes"),c.v>DrawioFileSync.PROTOCOL?this.file.redirectToNewApp():c.v===DrawioFileSync.PROTOCOL&&null!=c.d&&this.handleMessageData(c.d))}catch(b){null!=window.console&&"1"==urlParams.test&&
-console.log(b)}}),this.channel.bind("changed",this.changeListener))};
+DrawioFileSync.prototype.installListeners=function(){null!=this.pusher&&(this.connectionListener=mxUtils.bind(this,function(){this.updateOnlineState();this.updateStatus();if(this.isConnected()){if(!this.announced){var a=this.file.getCurrentUser(),c={a:"join"};null!=a&&(c.name=a.displayName,c.uid=a.id);mxUtils.post(this.cacheUrl,this.getIdParameters()+"&msg="+encodeURIComponent(this.objectToString(this.createMessage(c))));this.file.stats.msgSent++;this.announced=!0}this.fileChangedNotify()}}),this.pusher.connection.bind("state_change",
+this.connectionListener));null!=this.channel&&(this.changeListener=mxUtils.bind(this,function(a){this.file.stats.msgReceived++;this.lastActivity=new Date;if(this.enabled&&!this.file.inConflictState&&!this.redirectDialogShowing)try{var c=this.stringToObject(a);null!=c&&(EditorUi.debug("Sync.message",[this],c,a.length,"bytes"),c.v>DrawioFileSync.PROTOCOL?this.file.redirectToNewApp(mxUtils.bind(this,function(){})):c.v===DrawioFileSync.PROTOCOL&&null!=c.d&&this.handleMessageData(c.d))}catch(b){null!=
+window.console&&"1"==urlParams.test&&console.log(b)}}),this.channel.bind("changed",this.changeListener))};
DrawioFileSync.prototype.handleMessageData=function(a){"desc"==a.a?this.file.savingFile||this.reloadDescriptor():"join"==a.a||"leave"==a.a?("join"==a.a&&this.file.stats.joined++,null!=a.name&&(this.lastMessage=mxResources.get("join"==a.a?"userJoined":"userLeft",[a.name]),this.resetUpdateStatusThread(),this.updateStatus())):null!=a.m&&(a=new Date(a.m),null==this.lastMessageModified||this.lastMessageModified<a)&&(this.lastMessageModified=a,this.fileChangedNotify())};
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 e=window.setTimeout(mxUtils.bind(this,function(){null!=b&&b()||this.file.loadPatchDescriptor(mxUtils.bind(this,function(e){null!=b&&b()||this.catchup(this.file.getDescriptorEtag(e),this.file.getDescriptorSecret(e),a,c,b)}),c)}),0);return this.notifyThread=e};
-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();null==this.channelId&&this.start()};
-DrawioFileSync.prototype.catchup=function(a,c,b,e,g){var h=this.file.getCurrentEtag();if(h==a)null!=b&&b();else{var m=0,p=mxUtils.bind(this,function(){h!=this.file.getCurrentEtag()?null!=b&&b():null!=g&&g()||mxUtils.get(this.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&from="+encodeURIComponent(h)+"&to="+encodeURIComponent(a)+(null!=c?"&secret="+encodeURIComponent(c):""),mxUtils.bind(this,function(c){this.file.stats.bytesReceived+=c.getText().length;if(h!=this.file.getCurrentEtag())null!=
-b&&b();else if(null==g||!g()){var d=null,f=[],l=[];if(200<=c.getStatus()&&299>=c.getStatus()&&0<c.getText().length)try{var n=JSON.parse(c.getText());if(null!=n&&0<n.length)for(var t=0;t<n.length;t++){var u=this.stringToObject(n[t]);if(u.v>DrawioFileSync.PROTOCOL){this.file.redirectToNewApp(e);l=[];break}else if(u.v===DrawioFileSync.PROTOCOL&&null!=u.d)d=u.d.checksum,l.push(u.d.patch),null!=u.d.details&&(u.d.details.checksum=d,f.push(JSON.stringify(u.d.details)));else{l=[];break}}}catch(w){l=[],null!=
-window.console&&"1"==urlParams.test&&console.log(w)}try{0<l.length?(this.file.stats.cacheHits++,this.merge(l,d,a,b,e,f)):m<=this.maxCacheReadyRetries&&401!=c.getStatus()?(m++,window.setTimeout(p,this.cacheReadyDelay)):(this.file.stats.cacheMiss++,this.reload(b,e,g))}catch(w){null!=e&&e(w)}}}))});window.setTimeout(p,this.cacheReadyDelay)}};
-DrawioFileSync.prototype.reload=function(a,c,b){this.file.updateFile(mxUtils.bind(this,function(){null==this.channelId&&this.start();this.lastModified=this.file.getLastModifiedDate();this.updateStatus();null!=a&&a()}),mxUtils.bind(this,function(a){null!=c&&c(a)}),b)};
+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,e,g){var h=this.file.getCurrentEtag();if(h==a)null!=b&&b();else{var m=0,q=!1,n=mxUtils.bind(this,function(){h!=this.file.getCurrentEtag()?null!=b&&b():null!=g&&g()||mxUtils.get(this.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&from="+encodeURIComponent(h)+"&to="+encodeURIComponent(a)+(null!=c?"&secret="+encodeURIComponent(c):""),mxUtils.bind(this,function(c){this.file.stats.bytesReceived+=c.getText().length;if(h!=this.file.getCurrentEtag())null!=
+b&&b();else if(null==g||!g()){var d=null,k=[],p=[];if(200<=c.getStatus()&&299>=c.getStatus()&&0<c.getText().length)try{var t=JSON.parse(c.getText());if(null!=t&&0<t.length)for(var u=0;u<t.length;u++){var w=this.stringToObject(t[u]);if(w.v>DrawioFileSync.PROTOCOL){q=!0;p=[];break}else if(w.v===DrawioFileSync.PROTOCOL&&null!=w.d)d=w.d.checksum,p.push(w.d.patch),null!=w.d.details&&(w.d.details.checksum=d,k.push(JSON.stringify(w.d.details)));else{q=!0;p=[];break}}}catch(y){p=[],null!=window.console&&
+"1"==urlParams.test&&console.log(y)}try{0<p.length?(this.file.stats.cacheHits++,this.merge(p,d,a,b,e,k)):m<=this.maxCacheReadyRetries&&!q&&401!=c.getStatus()?(m++,window.setTimeout(n,(m+1)*this.cacheReadyDelay)):(this.file.stats.cacheMiss++,this.reload(b,e,g))}catch(y){null!=e&&e(y)}}}))});window.setTimeout(n,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,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 m=0;m<a.length;m++)this.file.shadowPages=this.ui.patchPages(this.file.shadowPages,
-a[m]);var m={},p=null!=c?this.ui.getHashValueForPages(this.file.shadowPages,m):null;"1"==urlParams.test&&EditorUi.debug("Sync.merge",[this],"from",this.file.getCurrentEtag(),"to",b,"backup",this.file.backupPatch,"attempt",this.catchupRetryCount,"details",h,"patches",a,"checksum",c==p,c);if(null!=c&&c!=p){this.file.checksumError(g,a,"Checksum: "+c+(null!=h&&0<h.length?"\nDetails: "+h.join(", "):"")+"\nCurrent: "+p+(null!=m?"\nCurrent Details: "+JSON.stringify(m):""));return}this.file.patch(a,DrawioFile.LAST_WRITE_WINS?
+a[m]);var m={},q=null!=c?this.ui.getHashValueForPages(this.file.shadowPages,m):null;"1"==urlParams.test&&EditorUi.debug("Sync.merge",[this],"from",this.file.getCurrentEtag(),"to",b,"backup",this.file.backupPatch,"attempt",this.catchupRetryCount,"details",h,m,"patches",a,"checksum",c==q,c);if(null!=c&&c!=q){this.file.checksumError(g,a,"Checksum: "+c+(null!=h&&0<h.length?"\nDetails: "+h.join(", "):"")+"\nCurrent: "+q+(null!=m?"\nCurrent Details: "+JSON.stringify(m):""));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(n){this.file.inConflictState=!0;this.file.invalidChecksum=!0;null!=g&&g(n);try{this.file.sendErrorReport("Error in merge",null,n)}catch(d){}}};
-DrawioFileSync.prototype.descriptorChanged=function(a){this.lastModified=this.file.getLastModifiedDate();if(this.isConnected()){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.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.isConnected()||this.file.inConflictState||this.redirectDialogShowing)this.file.shadowPages=a,null==this.channelId&&this.start(),null!=b&&b();else{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},
-m=this.ui.getHashValueForPages(a,h),g=this.ui.diffPages(g,a),h=this.objectToString(this.createMessage({patch:g,checksum:m,details:h})),p=this.objectToString(this.createMessage({m:this.lastModified.getTime()})),n=this.file.getDescriptorSecret(this.file.getDescriptor());c=this.file.getDescriptorEtag(c);var d=this.file.getCurrentEtag();this.file.shadowPages=a;mxUtils.post(this.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(c)+"&to="+encodeURIComponent(d)+"&msg="+encodeURIComponent(p)+(null!=
-n?"&secret="+encodeURIComponent(n):"")+(h.length<this.maxCacheEntrySize?"&data="+encodeURIComponent(h):""),mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?null!=b&&b():null!=e&&e({message:a.getStatus()})}));"1"==urlParams.test&&EditorUi.debug("Sync.fileSaved",[this],"from",c,"to",d,h.length,"bytes","diff",g,"checksum",m);this.file.stats.bytesSent+=h.length;this.file.stats.msgSent++}};
-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 e=this.file.getDescriptorEtag(a);a=this.file.getDescriptorSecret(a);this.catchup(e,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(){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&&null!=this.pusher.connection&&this.pusher.connection.unbind("state_change",this.connectionListener),this.connectionListener=null);null!=this.pusherErrorListener&&(null!=this.pusher&&null!=this.pusher.connection&&this.pusher.connection.unbind("error",
-this.pusherErrorListener),this.pusherErrorListener=null);null!=this.pusher&&null!=this.channel&&null!=this.channelId&&(this.channel=null);null!=this.pusher&&this.pusher.disconnect();this.pusher=this.channelId=null;this.paused=!0;this.updateOnlineState();this.updateStatus()};
-DrawioFileSync.prototype.destroy=function(){if(this.isConnected()){var a=this.file.getCurrentUser(),c={a:"leave"};null!=a&&(c.name=a.displayName,c.uid=a.id);mxUtils.post(this.cacheUrl,this.getIdParameters()+"&msg="+encodeURIComponent(this.objectToString(this.createMessage(c))));this.file.stats.msgSent++}this.stop();null!=this.updateStatusThread&&(window.clearInterval(this.updateStatusThread),this.updateStatusThread=null);null!=this.onlineListener&&(mxEvent.removeListener(window,"online",this.onlineListener),
+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,
+h);var g=this.ui.diffPages(g,a),h=this.objectToString(this.createMessage({patch:g,checksum:e,details:h})),m=this.objectToString(this.createMessage({m:this.lastModified.getTime()})),q=this.file.getDescriptorSecret(this.file.getDescriptor());c=this.file.getDescriptorEtag(c);var n=this.file.getCurrentEtag();this.file.stats.bytesSent+=h.length;this.file.stats.msgSent++;mxUtils.post(this.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(c)+"&to="+encodeURIComponent(n)+"&msg="+encodeURIComponent(m)+
+(null!=q?"&secret="+encodeURIComponent(q):"")+(h.length<this.maxCacheEntrySize?"&data="+encodeURIComponent(h):""),mxUtils.bind(this,function(a){}));"1"==urlParams.test&&EditorUi.debug("Sync.fileSaved",[this],"from",c,"to",n,h.length,"bytes","diff",g,"checksum",e)}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 e=this.file.getDescriptorEtag(a);a=this.file.getDescriptorSecret(a);this.catchup(e,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),
+this.pusherErrorListener=null),null!=this.channel&&(this.channel=null),this.pusher.disconnect(),this.pusher=null);this.updateOnlineState();this.updateStatus()};
+DrawioFileSync.prototype.destroy=function(){if(null!=this.channelId){var a=this.file.getCurrentUser(),c={a:"leave"};null!=a&&(c.name=a.displayName,c.uid=a.id);mxUtils.post(this.cacheUrl,this.getIdParameters()+"&msg="+encodeURIComponent(this.objectToString(this.createMessage(c))));this.file.stats.msgSent++}this.stop();null!=this.updateStatusThread&&(window.clearInterval(this.updateStatusThread),this.updateStatusThread=null);null!=this.onlineListener&&(mxEvent.removeListener(window,"online",this.onlineListener),
this.onlineListener=null);null!=this.visibleListener&&(mxEvent.removeListener(document,"visibilitychange",this.visibleListener),this.visibleListener=null);null!=this.activityListener&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointermove":"mousemove",this.activityListener),mxEvent.removeListener(document,"keypress",this.activityListener),mxEvent.removeListener(window,"focus",this.activityListener),!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&(mxEvent.removeListener(document,"touchstart",this.activityListener),
mxEvent.removeListener(document,"touchmove",this.activityListener)),this.activityListener=null);null!=this.collaboratorsElement&&(this.collaboratorsElement.parentNode.removeChild(this.collaboratorsElement),this.collaboratorsElement=null)};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 e=null;try{e=window.open(a)}catch(p){}null==e||void 0===e?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!=
+(new Image).src=mxGraph.prototype.warningImage.src;window.openWindow=mxUtils.bind(this,function(a,b,c){var e=null;try{e=window.open(a)}catch(q){}null==e||void 0===e?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(e){null!=window.console&&console.log("Plugin Error:",e,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";
App.DROPBOX_APPKEY="libwls2fa9szdji";App.DROPBOX_URL="js/dropbox/Dropbox-sdk.min.js";App.DROPINS_URL="https://www.dropbox.com/static/api/2/dropins.js";App.ONEDRIVE_URL="https://js.live.net/v7.2/OneDrive.js";App.TRELLO_URL="https://api.trello.com/1/client.js";App.TRELLO_JQUERY_URL="https://code.jquery.com/jquery-1.7.1.min.js";App.FOOTER_PLUGIN_URL="https://www.jgraph.com/drawio-footer.js";App.PUSHER_KEY="1e756b07a690c5bdb054";App.PUSHER_CLUSTER="eu";App.PUSHER_URL="https://js.pusher.com/4.3/pusher.min.js";
App.GOOGLE_APIS="client,drive-share";
@@ -8282,10 +8281,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 e(){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 g=document.getElementById("geInfo");null!=g&&g.parentNode.removeChild(g)}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"),g=document.createElement("iframe"),g.setAttribute("width","0"),g.setAttribute("height","0"),g.setAttribute("src","offline.html"),document.body.appendChild(g);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"auto"!=
-DrawioFile.SYNC||mxscript(App.PUSHER_URL);if("0"!=urlParams.plugins&&"1"!=urlParams.offline){var g=null!=mxSettings.settings?mxSettings.getPlugins():null,h={},m=urlParams.p;App.initPluginCallback();if(null!=m){var p="";"1"==urlParams.drawdev&&(p=document.location.protocol+"//drawhost.jgraph.com/");for(var n=m.split(";"),m=0;m<n.length;m++){var d=App.pluginRegistry[n[m]];null!=d&&null==h[d]?(h[d]=!0,mxscript(p+d)):null!=window.console&&console.log("Unknown plugin:",n[m])}}else"0"==urlParams.chrome||
-EditorUi.isElectronApp||mxscript(App.FOOTER_PLUGIN_URL,null,null,null,mxClient.IS_SVG);if(null!=g&&0<g.length&&"0"!=urlParams.plugins){p=window.location.protocol+"//"+window.location.host;n=!0;for(m=0;m<g.length&&n;m++)"/"!=g[m].charAt(0)&&g[m].substring(0,p.length)!=p&&(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",
-[g.join("\n")]).replace(/\\n/g,"\n")))for(m=0;m<g.length;m++)try{null==h[g[m]]&&(h[d]=!0,mxscript(g[m]))}catch(q){}}}"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 f=window.opener||window.parent,l=function(a){if(a.source==f)try{var b=JSON.parse(a.data);null!=b&&"configure"==b.action&&(mxEvent.removeListener(window,"message",l),Editor.configure(b.config,!0),mxSettings.load(),e())}catch(u){null!=window.console&&console.log("Error in configuration: "+u)}};mxEvent.addListener(window,"message",l);f.postMessage(JSON.stringify({event:"load"}),"*")}else e()};mxUtils.extend(App,EditorUi);
+DrawioFile.SYNC||mxscript(App.PUSHER_URL);if("0"!=urlParams.plugins&&"1"!=urlParams.offline){var g=null!=mxSettings.settings?mxSettings.getPlugins():null,h={},m=urlParams.p;App.initPluginCallback();if(null!=m){var q="";"1"==urlParams.drawdev&&(q=document.location.protocol+"//drawhost.jgraph.com/");for(var n=m.split(";"),m=0;m<n.length;m++){var d=App.pluginRegistry[n[m]];null!=d&&null==h[d]?(h[d]=!0,mxscript(q+d)):null!=window.console&&console.log("Unknown plugin:",n[m])}}else"0"==urlParams.chrome||
+EditorUi.isElectronApp||mxscript(App.FOOTER_PLUGIN_URL,null,null,null,mxClient.IS_SVG);if(null!=g&&0<g.length&&"0"!=urlParams.plugins){q=window.location.protocol+"//"+window.location.host;n=!0;for(m=0;m<g.length&&n;m++)"/"!=g[m].charAt(0)&&g[m].substring(0,q.length)!=q&&(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",
+[g.join("\n")]).replace(/\\n/g,"\n")))for(m=0;m<g.length;m++)try{null==h[g[m]]&&(h[d]=!0,mxscript(g[m]))}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 f=window.opener||window.parent,k=function(a){if(a.source==f)try{var b=JSON.parse(a.data);null!=b&&"configure"==b.action&&(mxEvent.removeListener(window,"message",k),Editor.configure(b.config,!0),mxSettings.load(),e())}catch(u){null!=window.console&&console.log("Error in configuration: "+u)}};mxEvent.addListener(window,"message",k);f.postMessage(JSON.stringify({event:"load"}),"*")}else e()};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";
@@ -8316,8 +8315,8 @@ App.prototype.resetRecent=function(a){if(isLocalStorage&&null!=localStorage)try{
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 e=0;8>e;e++)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 e=this.editor.graph;if(null!=this.pages&&this.currentPage!=this.pages[0]){var e=this.createTemporaryGraph(e.getStylesheet()),g=e.getGlobalVariable,h=this.pages[0];e.getGlobalVariable=function(a){return"page"==a?h.getName():"pagenumber"==a?1:g.apply(this,arguments)};document.body.appendChild(e.container);e.model.setRoot(h.root)}if(mxClient.IS_CHROMEAPP||!e.mathEnabled&&this.useCanvasForExport)this.exportToCanvas(mxUtils.bind(this,
-function(a){e!=this.editor.graph&&e.container.parentNode.removeChild(e.container);c(a)}),a,this.thumbImageCache,"#ffffff",function(){c()},null,null,null,null,null,null,e),b=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var m=document.createElement("canvas"),p=e.getGraphBounds(),n=a/p.width,n=Math.min(1,Math.min(3*a/(4*p.height),n)),d=Math.floor(p.x),f=Math.floor(p.y);m.setAttribute("width",Math.ceil(n*(p.width+4)));m.setAttribute("height",Math.ceil(n*(p.height+4)));var l=m.getContext("2d");
-l.scale(n,n);l.translate(-d,-f);var q=e.background;if(null==q||""==q||q==mxConstants.NONE)q="#ffffff";l.save();l.fillStyle=q;l.fillRect(d,f,Math.ceil(p.width+4),Math.ceil(p.height+4));l.restore();var t=new mxJsCanvas(m),u=new mxAsyncCanvas(this.thumbImageCache);t.images=this.thumbImageCache.images;var w=new mxImageExport;w.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())};w.drawText=function(a,
+function(a){e!=this.editor.graph&&e.container.parentNode.removeChild(e.container);c(a)}),a,this.thumbImageCache,"#ffffff",function(){c()},null,null,null,null,null,null,e),b=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var m=document.createElement("canvas"),q=e.getGraphBounds(),n=a/q.width,n=Math.min(1,Math.min(3*a/(4*q.height),n)),d=Math.floor(q.x),f=Math.floor(q.y);m.setAttribute("width",Math.ceil(n*(q.width+4)));m.setAttribute("height",Math.ceil(n*(q.height+4)));var k=m.getContext("2d");
+k.scale(n,n);k.translate(-d,-f);var p=e.background;if(null==p||""==p||p==mxConstants.NONE)p="#ffffff";k.save();k.fillStyle=p;k.fillRect(d,f,Math.ceil(q.width+4),Math.ceil(q.height+4));k.restore();var t=new mxJsCanvas(m),u=new mxAsyncCanvas(this.thumbImageCache);t.images=this.thumbImageCache.images;var w=new mxImageExport;w.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())};w.drawText=function(a,
b){};w.drawState(e.getView().getState(e.model.root),u);u.finish(mxUtils.bind(this,function(){w.drawState(e.getView().getState(e.model.root),t);e!=this.editor.graph&&e.container.parentNode.removeChild(e.container);c(m)}));b=!0}}catch(y){e!=this.editor.graph&&e.container.parentNode.removeChild(e.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 e=new Date;e.setYear(e.getFullYear()+1);document.cookie="MODE="+c+"; expires="+e.toUTCString()}null!=this.appIcon&&(e=this.getCurrentFile(),c=null!=e?e.getMode():null,c==App.MODE_GOOGLE?(this.appIcon.setAttribute("title",mxResources.get("openIt",
@@ -8334,7 +8333,7 @@ App.prototype.showRefreshDialog=function(a,c){if(!this.showingRefreshDialog&&(th
this.createRealtimeNotice();b.style.left="0";b.style.right="0";b.style.borderRadius="0";b.style.borderLeftStyle="none";b.style.borderRightStyle="none";b.style.marginBottom="26px";b.style.padding="8px 0 8px 0";this.dialog.container.appendChild(b)}};
App.prototype.showAlert=function(a){if(null!=a&&0<a.length){var c=document.createElement("div");c.className="geAlert";c.style.zIndex=2E9;c.style.left="50%";c.style.top="-100%";mxUtils.setPrefixedStyle(c.style,"transform","translate(-50%,0%)");mxUtils.setPrefixedStyle(c.style,"transition","all 1s ease");c.innerHTML=a;a=document.createElement("a");a.className="geAlertLink";a.style.textAlign="right";a.style.marginTop="20px";a.style.display="block";a.setAttribute("title",mxResources.get("close"));a.innerHTML=
mxResources.get("close");c.appendChild(a);mxEvent.addListener(a,"click",function(a){null!=c.parentNode&&(c.parentNode.removeChild(c),mxEvent.consume(a))});document.body.appendChild(c);window.setTimeout(function(){c.style.top="30px"},10);window.setTimeout(function(){mxUtils.setPrefixedStyle(c.style,"transition","all 2s ease");c.style.opacity="0";window.setTimeout(function(){null!=c.parentNode&&c.parentNode.removeChild(c)},2E3)},15E3)}};
-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(p){null!=document.body&&this.handleError(p,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=
+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(q){null!=document.body&&this.handleError(q,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,e){e.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(d){}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 e=this.getDraft(),n=null!=e?e.data:this.getFileData(),c=Editor.useLocalStorage;
@@ -8352,42 +8351,42 @@ App.prototype.pickFile=function(a){a=null!=a?a:this.mode;if(a==App.MODE_GOOGLE)n
"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 e=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 g=this.dialog,h=g.close;this.dialog.close=mxUtils.bind(this,function(a){Editor.useLocalStorage=e;h.apply(g,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(m){this.handleError(m,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(p){this.handleError(p,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=
+mxResources.get("loading"))&&c.getLibrary(a,mxUtils.bind(this,function(a){this.spinner.stop();try{this.loadLibrary(a)}catch(q){this.handleError(q,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(m){this.handleError(m,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 e=document.createElement("input");
e.setAttribute("type","file");mxEvent.addListener(e,"change",mxUtils.bind(this,function(){if(null!=e.files)for(var a=0;a<e.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)})(e.files[a])}));e.click()}};
-App.prototype.saveLibrary=function(a,c,b,e,g,h,m){e=null!=e?e:this.mode;g=null!=g?g:!1;h=null!=h?h:!1;var p=this.createLibraryDataFromImages(c),n=mxUtils.bind(this,function(a){this.spinner.stop();null!=m&&m();this.handleError(a,null!=a?mxResources.get("errorSavingFile"):null)});null==b&&e==App.MODE_DEVICE&&(b=new LocalLibrary(this,p,a));if(null==b)this.pickFolder(e,mxUtils.bind(this,function(b){e==App.MODE_GOOGLE&&null!=this.drive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.drive.insertFile(a,
-p,b,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,c)}),n,this.drive.libraryMimeType):e==App.MODE_GITHUB&&null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitHub.insertLibrary(a,p,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,c)}),n,b):e==App.MODE_TRELLO&&null!=this.trello&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.trello.insertLibrary(a,p,mxUtils.bind(this,
-function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,c)}),n,b):e==App.MODE_DROPBOX&&null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.dropbox.insertLibrary(a,p,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,c)}),n,b):e==App.MODE_ONEDRIVE&&null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.oneDrive.insertLibrary(a,p,mxUtils.bind(this,function(a){this.spinner.stop();
-this.hideDialog(!0);this.libraryLoaded(a,c)}),n,b):e==App.MODE_BROWSER?(b=mxUtils.bind(this,function(){var b=new StorageLibrary(this,p,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(g||this.spinner.spin(document.body,mxResources.get("saving"))){b.setData(p);var d=mxUtils.bind(this,
+App.prototype.saveLibrary=function(a,c,b,e,g,h,m){e=null!=e?e:this.mode;g=null!=g?g:!1;h=null!=h?h:!1;var q=this.createLibraryDataFromImages(c),n=mxUtils.bind(this,function(a){this.spinner.stop();null!=m&&m();this.handleError(a,null!=a?mxResources.get("errorSavingFile"):null)});null==b&&e==App.MODE_DEVICE&&(b=new LocalLibrary(this,q,a));if(null==b)this.pickFolder(e,mxUtils.bind(this,function(b){e==App.MODE_GOOGLE&&null!=this.drive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.drive.insertFile(a,
+q,b,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,c)}),n,this.drive.libraryMimeType):e==App.MODE_GITHUB&&null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitHub.insertLibrary(a,q,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,c)}),n,b):e==App.MODE_TRELLO&&null!=this.trello&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.trello.insertLibrary(a,q,mxUtils.bind(this,
+function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,c)}),n,b):e==App.MODE_DROPBOX&&null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.dropbox.insertLibrary(a,q,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,c)}),n,b):e==App.MODE_ONEDRIVE&&null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.oneDrive.insertLibrary(a,q,mxUtils.bind(this,function(a){this.spinner.stop();
+this.hideDialog(!0);this.libraryLoaded(a,c)}),n,b):e==App.MODE_BROWSER?(b=mxUtils.bind(this,function(){var b=new StorageLibrary(this,q,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(g||this.spinner.spin(document.body,mxResources.get("saving"))){b.setData(q);var d=mxUtils.bind(this,
function(){b.save(!0,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);h||this.libraryLoaded(b,c);null!=m&&m()}),n)});if(a!=b.getTitle()){var f=b.getHash();b.rename(a,mxUtils.bind(this,function(a){b.constructor!=LocalLibrary&&f!=b.getHash()&&(mxSettings.removeCustomLibrary(f),mxSettings.addCustomLibrary(b.getHash()));this.removeLibrarySidebar(f);d()}),n)}else d()}};
-App.prototype.saveFile=function(a,c){var b=this.getCurrentFile();if(null!=b){var e=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 g=null!=b.getTitle()?b.getTitle():this.defaultFilename,h=!mxClient.IS_IOS||!navigator.standalone,m=this.mode,p=this.getServiceCount(!0);
-isLocalStorage&&p++;var n=4>=p?2:6<p?4:3,g=new CreateDialog(this,g,mxUtils.bind(this,function(a,b){null!=a&&0<a.length&&(null==m&&b==App.MODE_DEVICE?(this.setMode(App.MODE_DEVICE),this.save(a,e)):"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)):m!=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,e,null==this.mode,c)})):null!=b&&this.save(a,e))}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),null,null,h,this.isOffline()?null:"https://desk.draw.io/support/solutions/articles/16000042485",!0,n);this.showDialog(g.container,460,p>n?390:270,!0,!0);g.init()}else this.save(b.getTitle(),e)}};
+App.prototype.saveFile=function(a,c){var b=this.getCurrentFile();if(null!=b){var e=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 g=null!=b.getTitle()?b.getTitle():this.defaultFilename,h=!mxClient.IS_IOS||!navigator.standalone,m=this.mode,q=this.getServiceCount(!0);
+isLocalStorage&&q++;var n=4>=q?2:6<q?4:3,g=new CreateDialog(this,g,mxUtils.bind(this,function(a,b){null!=a&&0<a.length&&(null==m&&b==App.MODE_DEVICE?(this.setMode(App.MODE_DEVICE),this.save(a,e)):"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)):m!=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,e,null==this.mode,c)})):null!=b&&this.save(a,e))}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),null,null,h,this.isOffline()?null:"https://desk.draw.io/support/solutions/articles/16000042485",!0,n);this.showDialog(g.container,460,q>n?390:270,!0,!0);g.init()}else this.save(b.getTitle(),e)}};
App.prototype.loadTemplate=function(a,c,b){var e=a;this.isCorsEnabledForUrl(e)||(e="t="+(new Date).getTime(),e=PROXY_URL+"?url="+encodeURIComponent(a)+"&"+e);this.loadUrl(e,mxUtils.bind(this,function(e){/(\.vsdx)($|\?)/i.test(a)?this.importVisio(this.base64ToBlob(e.substring(e.indexOf(",")+1)),function(a){c(a)},b,a):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(e,a)?this.parseFile(new Blob([e],{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(e)?this.convertLucidChart(e,mxUtils.bind(this,function(a){c(a)}),mxUtils.bind(this,function(a){b(a)})):(/(\.png)($|\?)/i.test(a)&&(e=this.extractGraphModelFromPng(e)),c(e))}),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,e,g,h,m,p){e=p?null:null!=e?e: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()}),d=mxUtils.bind(this,function(a){n();null==a&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():null!=a&&this.handleError(a)});try{if(e==App.MODE_GOOGLE&&null!=this.drive)null==m&&null!=this.stateArg&&null!=this.stateArg.folderId&&(m=this.stateArg.folderId),
+App.prototype.createFile=function(a,c,b,e,g,h,m,q){e=q?null:null!=e?e: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()}),d=mxUtils.bind(this,function(a){n();null==a&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():null!=a&&this.handleError(a)});try{if(e==App.MODE_GOOGLE&&null!=this.drive)null==m&&null!=this.stateArg&&null!=this.stateArg.folderId&&(m=this.stateArg.folderId),
this.drive.insertFile(a,c,m,mxUtils.bind(this,function(a){n();this.fileCreated(a,b,h,g)}),d);else if(e==App.MODE_GITHUB&&null!=this.gitHub)this.gitHub.insertFile(a,c,mxUtils.bind(this,function(a){n();this.fileCreated(a,b,h,g)}),d,!1,m);else if(e==App.MODE_TRELLO&&null!=this.trello)this.trello.insertFile(a,c,mxUtils.bind(this,function(a){n();this.fileCreated(a,b,h,g)}),d,!1,m);else if(e==App.MODE_DROPBOX&&null!=this.dropbox)this.dropbox.insertFile(a,c,mxUtils.bind(this,function(a){n();this.fileCreated(a,
b,h,g)}),d);else if(e==App.MODE_ONEDRIVE&&null!=this.oneDrive)this.oneDrive.insertFile(a,c,mxUtils.bind(this,function(a){n();this.fileCreated(a,b,h,g)}),d,!1,m);else if(e==App.MODE_BROWSER){n();var f=mxUtils.bind(this,function(){var e=new StorageFile(this,c,a);e.saveFile(a,!1,mxUtils.bind(this,function(){this.fileCreated(e,b,h,g)}),d)});null==localStorage.getItem(a)?f():this.confirm(mxResources.get("replaceIt",[a]),f,mxUtils.bind(this,function(){null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))}else n(),
-this.fileCreated(new LocalFile(this,c,a,null==e),b,h,g)}catch(l){n(),this.handleError(l)}}};
-App.prototype.fileCreated=function(a,c,b,e){var g=window.location.pathname;null!=c&&0<c.length&&(g+="?libs="+c);g=this.getUrl(g);a.getMode()!=App.MODE_DEVICE&&(g+="#"+a.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var h=a.getData(),h=0<h.length?this.editor.extractGraphModel(mxUtils.parseXml(h).documentElement,!0):null,m=window.location.protocol+"//"+window.location.hostname+g,p=h,n=null;null!=h&&/\.svg$/i.test(a.getTitle())&&(n=this.createTemporaryGraph(this.editor.graph.getStylesheet()),
-document.body.appendChild(n.container),p=this.decodeNodeIntoGraph(p,n));a.setData(this.createFileData(h,n,a,m));null!=n&&n.container.parentNode.removeChild(n.container);var d=mxUtils.bind(this,function(){this.spinner.stop()}),f=mxUtils.bind(this,function(){d();var f=this.getCurrentFile();null==b&&null!=f&&(b=!f.isModified()&&null==f.getMode());var h=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(a);b&&a.addAllSavedStatus();null!=c&&this.sidebar.showEntries(c)}),m=mxUtils.bind(this,
+this.fileCreated(new LocalFile(this,c,a,null==e),b,h,g)}catch(k){n(),this.handleError(k)}}};
+App.prototype.fileCreated=function(a,c,b,e){var g=window.location.pathname;null!=c&&0<c.length&&(g+="?libs="+c);g=this.getUrl(g);a.getMode()!=App.MODE_DEVICE&&(g+="#"+a.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var h=a.getData(),h=0<h.length?this.editor.extractGraphModel(mxUtils.parseXml(h).documentElement,!0):null,m=window.location.protocol+"//"+window.location.hostname+g,q=h,n=null;null!=h&&/\.svg$/i.test(a.getTitle())&&(n=this.createTemporaryGraph(this.editor.graph.getStylesheet()),
+document.body.appendChild(n.container),q=this.decodeNodeIntoGraph(q,n));a.setData(this.createFileData(h,n,a,m));null!=n&&n.container.parentNode.removeChild(n.container);var d=mxUtils.bind(this,function(){this.spinner.stop()}),f=mxUtils.bind(this,function(){d();var f=this.getCurrentFile();null==b&&null!=f&&(b=!f.isModified()&&null==f.getMode());var h=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(a);b&&a.addAllSavedStatus();null!=c&&this.sidebar.showEntries(c)}),m=mxUtils.bind(this,
function(){b||null==f||!f.isModified()?h():this.confirm(mxResources.get("allChangesLost"),null,h,mxResources.get("cancel"),mxResources.get("discardChanges"))});null!=e&&e();null==b||b?m():(a.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(a.getData(),a.getTitle(),null==a.getMode())),null!=e&&e(),window.openWindow(g,null,m))});a.constructor==LocalFile?f():a.saveFile(a.getTitle(),!1,mxUtils.bind(this,function(){f()}),mxUtils.bind(this,
function(a){d();this.handleError(a)}))}};
-App.prototype.loadFile=function(a,c,b,e,g){this.hideDialog();var h=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 g=localStorage.getItem(a);if(null!=g)this.fileLoaded(new StorageFile(this,g,a)),null!=e&&e();else throw{message:mxResources.get("fileNotFound")};}catch(l){this.handleError(l,
+App.prototype.loadFile=function(a,c,b,e,g){this.hideDialog();var h=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 g=localStorage.getItem(a);if(null!=g)this.fileLoaded(new StorageFile(this,g,a)),null!=e&&e();else throw{message:mxResources.get("fileNotFound")};}catch(k){this.handleError(k,
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!=e&&e();else if("S"==a.charAt(0)){this.spinner.stop();try{this.loadDescriptor(JSON.parse(this.editor.graph.decompress(a.substring(1))),
-e,mxUtils.bind(this,function(a){this.handleError(a,mxResources.get("errorLoadingFile"))}))}catch(l){this.handleError(l,mxResources.get("errorLoadingFile"))}}else if("R"==a.charAt(0))this.spinner.stop(),g=decodeURIComponent(a.substring(1)),"<"!=g.charAt(0)&&(g=this.editor.graph.decompress(g)),g=new LocalFile(this,g,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0),g.getHash=function(){return a},this.fileLoaded(g),null!=e&&e();else if("U"==a.charAt(0)){var d=decodeURIComponent(a.substring(1)),
+e,mxUtils.bind(this,function(a){this.handleError(a,mxResources.get("errorLoadingFile"))}))}catch(k){this.handleError(k,mxResources.get("errorLoadingFile"))}}else if("R"==a.charAt(0))this.spinner.stop(),g=decodeURIComponent(a.substring(1)),"<"!=g.charAt(0)&&(g=this.editor.graph.decompress(g)),g=new LocalFile(this,g,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0),g.getHash=function(){return a},this.fileLoaded(g),null!=e&&e();else if("U"==a.charAt(0)){var d=decodeURIComponent(a.substring(1)),
f=mxUtils.bind(this,function(){if("https://drive.google.com/uc?id="!=d.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"+d.substring(31,d.lastIndexOf("&ex")),c,e),!0):!1});!a()&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.addListener("clientLoaded",a);return!0});this.loadTemplate(d,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 e=d,g=d.lastIndexOf("."),h=e.lastIndexOf("/");g>h&&0<h&&(e=e.substring(h+1,g),g=d.substring(g),this.useCanvasForExport||".png"!=g||(g=".xml"),".svg"===g||".xml"===g||".html"===g||".png"===g)&&(c=e+g)}b=new LocalFile(this,b,null!=urlParams.title?decodeURIComponent(urlParams.title):c,!0);b.getHash=function(){return a};this.fileLoaded(b)||f()}}),mxUtils.bind(this,function(){f()||(this.spinner.stop(),
this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile")))}))}else g=null,"G"==a.charAt(0)?g=this.drive:"D"==a.charAt(0)?g=this.dropbox:"W"==a.charAt(0)?g=this.oneDrive:"H"==a.charAt(0)?g=this.gitHub:"T"==a.charAt(0)&&(g=this.trello),null==g?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)),
-g.getFile(a,mxUtils.bind(this,function(a){this.spinner.stop();this.fileLoaded(a);null!=e&&e()}),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()}))})))}),m=this.getCurrentFile(),p=mxUtils.bind(this,function(){g||null==m||!m.isModified()?h():
-this.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){null!=m&&(window.location.hash=m.getHash())}),h,mxResources.get("cancel"),mxResources.get("discardChanges"))});null==a||0==a.length?p():null!=m&&m.isModified()&&!c?window.openWindow(this.getUrl()+"#"+a,null,p):p()};
+g.getFile(a,mxUtils.bind(this,function(a){this.spinner.stop();this.fileLoaded(a);null!=e&&e()}),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()}))})))}),m=this.getCurrentFile(),q=mxUtils.bind(this,function(){g||null==m||!m.isModified()?h():
+this.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){null!=m&&(window.location.hash=m.getHash())}),h,mxResources.get("cancel"),mxResources.get("discardChanges"))});null==a||0==a.length?q():null!=m&&m.isModified()&&!c?window.openWindow(this.getUrl()+"#"+a,null,q):q()};
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 e=0,h=[],m=mxUtils.bind(this,function(){if(0==e){if(null!=b)for(var a=b.length-1;0<=a;a--)null!=h[a]&&this.loadLibrary(h[a]);null!=c&&c()}});if(null!=b)for(var p=0;p<b.length;p++){var n=encodeURIComponent(decodeURIComponent(b[p]));mxUtils.bind(this,
+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 e=0,h=[],m=mxUtils.bind(this,function(){if(0==e){if(null!=b)for(var a=b.length-1;0<=a;a--)null!=h[a]&&this.loadLibrary(h[a]);null!=c&&c()}});if(null!=b)for(var q=0;q<b.length;q++){var n=encodeURIComponent(decodeURIComponent(b[q]));mxUtils.bind(this,
function(b,c){if(null!=b&&0<b.length&&null==this.pendingLibraries[b]&&null==this.sidebar.palettes[b]){e++;var d=mxUtils.bind(this,function(a){delete this.pendingLibraries[b];h[c]=a;e--;m()}),f=mxUtils.bind(this,function(c){a(b,c);e--;m()});this.pendingLibraries[b]=!0;var g=b.substring(0,1);if("L"==g)(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?d(new StorageLibrary(this,b,a)):f()}))}catch(k){f()}}),0);else if("U"==g){var n=decodeURIComponent(b.substring(1));if(!this.isOffline()){g=n;this.isCorsEnabledForUrl(g)||(g="t="+(new Date).getTime(),g=PROXY_URL+"?url="+encodeURIComponent(n)+"&"+g);try{mxUtils.get(g,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus())try{d(new UrlLibrary(this,a.getText(),n))}catch(k){f()}else f()}),function(){f()})}catch(y){f()}}}else{var p=null;"G"==g?
-null!=this.drive&&null!=this.drive.user&&(p=this.drive):"H"==g?null!=this.gitHub&&null!=this.gitHub.getUser()&&(p=this.gitHub):"T"==g?null!=this.trello&&this.trello.isAuthorized()&&(p=this.trello):"D"==g?null!=this.dropbox&&null!=this.dropbox.getUser()&&(p=this.dropbox):"W"==g&&null!=this.oneDrive&&null!=this.oneDrive.getUser()&&(p=this.oneDrive);null!=p?p.getLibrary(decodeURIComponent(b.substring(1)),mxUtils.bind(this,function(a){try{d(a)}catch(k){f()}}),function(a){f()}):f(!0)}}})(n,p)}m()});c(mxSettings.getCustomLibraries(),
+null==b&&(b=this.emptyLibraryXml);null!=b?d(new StorageLibrary(this,b,a)):f()}))}catch(l){f()}}),0);else if("U"==g){var n=decodeURIComponent(b.substring(1));if(!this.isOffline()){g=n;this.isCorsEnabledForUrl(g)||(g="t="+(new Date).getTime(),g=PROXY_URL+"?url="+encodeURIComponent(n)+"&"+g);try{mxUtils.get(g,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus())try{d(new UrlLibrary(this,a.getText(),n))}catch(l){f()}else f()}),function(){f()})}catch(y){f()}}}else{var q=null;"G"==g?
+null!=this.drive&&null!=this.drive.user&&(q=this.drive):"H"==g?null!=this.gitHub&&null!=this.gitHub.getUser()&&(q=this.gitHub):"T"==g?null!=this.trello&&this.trello.isAuthorized()&&(q=this.trello):"D"==g?null!=this.dropbox&&null!=this.dropbox.getUser()&&(q=this.dropbox):"W"==g&&null!=this.oneDrive&&null!=this.oneDrive.getUser()&&(q=this.oneDrive);null!=q?q.getLibrary(decodeURIComponent(b.substring(1)),mxUtils.bind(this,function(a){try{d(a)}catch(l){f()}}),function(a){f()}):f(!0)}}})(n,q)}m()});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()})),
@@ -8404,9 +8403,9 @@ 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,e){var g=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();g()}))}catch(m){this.editor.setStatus(mxUtils.htmlEntities(m.message))}}))).container,300,c?180:140,!0,!0,mxUtils.bind(this,function(a){null!=e&&e();a&&null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))};
-App.prototype.convertFile=function(a,c,b,e,g,h){var m=c;/\.svg$/i.test(m)||(m=m.substring(0,c.lastIndexOf("."))+e);var p=!1;null!=this.gitHub&&a.substring(0,this.gitHub.baseUrl.length)==this.gitHub.baseUrl&&(p=!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);p||(n.responseType="blob");n.onload=mxUtils.bind(this,function(){var a=null;p?(a=JSON.parse(n.responseText),a=this.base64ToBlob(a.content,
+App.prototype.convertFile=function(a,c,b,e,g,h){var m=c;/\.svg$/i.test(m)||(m=m.substring(0,c.lastIndexOf("."))+e);var q=!1;null!=this.gitHub&&a.substring(0,this.gitHub.baseUrl.length)==this.gitHub.baseUrl&&(q=!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);q||(n.responseType="blob");n.onload=mxUtils.bind(this,function(){var a=null;q?(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){g(new LocalFile(this,a,m,!0))}),h,c)});n.send()}else{var d=mxUtils.bind(this,function(b){try{/\.png$/i.test(c)?(temp=this.extractGraphModelFromPng(b),null!=temp?g(new LocalFile(this,temp,m,!0)):g(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?g(new LocalFile(this,a.responseText,m,!0)):null!=h&&h({message:mxResources.get("errorLoadingFile")}))}),c):g(new LocalFile(this,b,m,!0))}catch(l){null!=h&&h(l)}});b=/\.png$/i.test(c)||/\.jpe?g$/i.test(c)||null!=b&&"image/"==b.substring(0,6);p?mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=g){a=JSON.parse(a.getText());var b=a.content;"base64"===a.encoding&&(b=/\.png$/i.test(c)?
+mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?g(new LocalFile(this,a.responseText,m,!0)):null!=h&&h({message:mxResources.get("errorLoadingFile")}))}),c):g(new LocalFile(this,b,m,!0))}catch(k){null!=h&&h(k)}});b=/\.png$/i.test(c)||/\.jpe?g$/i.test(c)||null!=b&&"image/"==b.substring(0,6);q?mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=g){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));d(b)}}else null!=h&&h({code:App.ERROR_UNKNOWN})}),function(){null!=h&&h({code:App.ERROR_UNKNOWN})},!1,this.timeout,function(){null!=h&&h({code:App.ERROR_TIMEOUT,retry:fn})}):this.loadUrl(a,d,h,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?
@@ -8433,8 +8432,8 @@ else{var c=!1;this.userPanel.innerHTML="";b=document.createElement("img");b.setA
'<table title="User ID: '+b.id+'" style="font-size:10pt;padding:20px 20px 10px 10px;"><tr><td valign="top">'+(null!=b.pictureUrl?'<img width="80" height="80" style="margin-right:10px;border-radius:50%;" src="'+b.pictureUrl+'"/>':'<img width="80" height="80" style="margin-right:4px;margin-top:2px;" src="'+this.defaultUserPicture+'"/>')+'</td><td valign="top" style="white-space:nowrap;'+(null!=b.pictureUrl?"padding-top:14px;":"")+'"><b>'+mxUtils.htmlEntities(b.displayName)+"</b><br><small>"+mxUtils.htmlEntities(b.email)+
"</small><br><br><small>"+mxResources.get("googleDrive")+"</small></tr></table>",b=document.createElement("div"),b.style.textAlign="center",b.style.padding="12px",b.style.background="whiteSmoke",b.style.borderTop="1px solid #e0e0e0",b.style.whiteSpace="nowrap",b.appendChild(mxUtils.button(mxResources.get("signOut"),mxUtils.bind(this,function(){var a=this.getCurrentFile();null!=a&&a.constructor==DriveFile?this.confirm(mxResources.get("areYouSure"),mxUtils.bind(this,function(){this.spinner.spin(document.body,
mxResources.get("signOut"));this.diagramContainer.style.display="none";this.formatContainer.style.display="none";this.hsplit.style.display="none";this.sidebarContainer.style.display="none";this.sidebarFooterContainer.style.display="none";null!=this.tabContainer&&(this.tabContainer.style.display="none");a.close();window.setTimeout(mxUtils.bind(this,function(){this.showDialog=function(){};window.location.hash="";this.drive.clearUserId();gapi.auth.signOut();window.location.reload()}),null!=a&&a.constructor==
-DriveFile?2E3:0)})):(this.drive.clearUserId(),this.drive.setUser(null),gapi.auth.signOut())}))),this.userPanel.appendChild(b)));b=mxUtils.bind(this,function(a,b,e,p){null!=a&&(c&&this.userPanel.appendChild(document.createElement("hr")),c=!0,this.userPanel.innerHTML+='<table style="font-size:10pt;padding:20px 20px 10px 10px;"><tr><td valign="top">'+(null!=b?'<img style="margin-right:10px;" src="'+b+'" width="40" height="40"/></td>':"")+'<td valign="middle" style="white-space:nowrap;"><b>'+mxUtils.htmlEntities(a.displayName)+
-"</b>"+(null!=a.email?'<br><font color="gray">'+mxUtils.htmlEntities(a.email)+"</font>":"")+(null!=p?"<br><br><small>"+mxUtils.htmlEntities(p)+"</small>":"")+"</td></tr></table>",a=document.createElement("div"),a.style.textAlign="center",a.style.padding="12px",a.style.background="whiteSmoke",a.style.borderTop="1px solid #e0e0e0",a.style.whiteSpace="nowrap",null!=e&&a.appendChild(mxUtils.button(mxResources.get("signOut"),e)),this.userPanel.appendChild(a))});null!=this.dropbox&&b(this.dropbox.getUser(),
+DriveFile?2E3:0)})):(this.drive.clearUserId(),this.drive.setUser(null),gapi.auth.signOut())}))),this.userPanel.appendChild(b)));b=mxUtils.bind(this,function(a,b,e,q){null!=a&&(c&&this.userPanel.appendChild(document.createElement("hr")),c=!0,this.userPanel.innerHTML+='<table style="font-size:10pt;padding:20px 20px 10px 10px;"><tr><td valign="top">'+(null!=b?'<img style="margin-right:10px;" src="'+b+'" width="40" height="40"/></td>':"")+'<td valign="middle" style="white-space:nowrap;"><b>'+mxUtils.htmlEntities(a.displayName)+
+"</b>"+(null!=a.email?'<br><font color="gray">'+mxUtils.htmlEntities(a.email)+"</font>":"")+(null!=q?"<br><br><small>"+mxUtils.htmlEntities(q)+"</small>":"")+"</td></tr></table>",a=document.createElement("div"),a.style.textAlign="center",a.style.padding="12px",a.style.background="whiteSmoke",a.style.borderTop="1px solid #e0e0e0",a.style.whiteSpace="nowrap",null!=e&&a.appendChild(mxUtils.button(mxResources.get("signOut"),e)),this.userPanel.appendChild(a))});null!=this.dropbox&&b(this.dropbox.getUser(),
IMAGE_PATH+"/dropbox-logo.svg",mxUtils.bind(this,function(){var a=this.getCurrentFile();if(null!=a&&a.constructor==DropboxFile){var b=mxUtils.bind(this,function(){this.dropbox.logout();window.location.hash=""});a.isModified()?this.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b()}else this.dropbox.logout()}),mxResources.get("dropbox"));null!=this.oneDrive&&b(this.oneDrive.getUser(),IMAGE_PATH+"/onedrive-logo.svg",mxUtils.bind(this,function(){var a=
this.getCurrentFile();if(null!=a&&a.constructor==OneDriveFile){var b=mxUtils.bind(this,function(){this.oneDrive.logout();window.location.hash=""});a.isModified()?this.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b()}else this.oneDrive.logout()}),mxResources.get("oneDrive"));null!=this.gitHub&&b(this.gitHub.getUser(),IMAGE_PATH+"/github-logo.svg",mxUtils.bind(this,function(){var a=this.getCurrentFile();if(null!=a&&a.constructor==GitHubFile){var b=
mxUtils.bind(this,function(){this.gitHub.logout();window.location.hash=""});a.isModified()?this.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b()}else this.gitHub.logout()}),mxResources.get("github"));null!=this.trello&&b(this.trello.getUser(),IMAGE_PATH+"/trello-logo.svg",mxUtils.bind(this,function(){var a=this.getCurrentFile();if(null!=a&&a.constructor==TrelloFile){var b=mxUtils.bind(this,function(){this.trello.logout();window.location.hash=
@@ -8442,27 +8441,27 @@ 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,e=a.editor.graph,g=mxUtils.bind(e,e.isEnabled),h=("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&mxClient.IS_SVG&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode),m=("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode),p=("www.draw.io"==
+var c=Menus.prototype.init;Menus.prototype.init=function(){c.apply(this,arguments);var a=this.editorUi,e=a.editor.graph,g=mxUtils.bind(e,e.isEnabled),h=("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&mxClient.IS_SVG&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode),m=("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode),q=("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);
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,m,l,n){b=parseInt(b);!isNaN(b)&&0<b&&a.exportSvg(b/100,c,d,e,f,g,h,!m,l,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"),
+function(b,c,d,e,f,g,h,k,m,n){b=parseInt(b);!isNaN(b)&&0<b&&a.exportSvg(b/100,c,d,e,f,g,h,!k,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,f,k,g,h,m,l){a.createHtml(b,
-c,d,e,f,k,g,h,m,l,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?m.removeAttribute("disabled"):(m.setAttribute("disabled","disabled"),m.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()),m=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()),m=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,!m.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"),
+"...",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,l,g,h,k,m){a.createHtml(b,
+c,d,e,f,l,g,h,k,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?k.removeAttribute("disabled"):(k.setAttribute("disabled","disabled"),k.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()),k=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()),k=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,!k.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"),
null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b()});a.actions.addAction("editShape...",mxUtils.bind(this,function(){e.getSelectionCells();if(1==e.getSelectionCount()){var b=e.getSelectionCell(),c=e.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 d=a.actions.addAction("synchronize",function(){a.synchronizeCurrentFile("none"==
DrawioFile.SYNC)},null,null,"Alt+Shift+S");"none"==DrawioFile.SYNC&&(d.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&&(d=a.actions.addAction("mathematicalTypesetting",
function(){var b=new ChangePageSetup(a);b.ignoreColor=!0;b.ignoreImage=!0;b.mathEnabled=!a.isMathEnabled();e.model.execute(b)}),d.setToggleAction(!0),d.setSelectedCallback(function(){return a.isMathEnabled()}),d.isEnabled=g);if(isLocalStorage||mxClient.IS_CHROMEAPP)d=a.actions.addAction("showStartScreen",function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen());mxSettings.save()}),d.setToggleAction(!0),d.setSelectedCallback(function(){return mxSettings.getShowStartScreen()});var f=
-a.actions.addAction("autosave",function(){a.editor.setAutosave(!a.editor.autosave)});f.setToggleAction(!0);f.setSelectedCallback(function(){return f.isEnabled()&&a.editor.autosave});a.actions.addAction("editGeometry...",function(){for(var b=e.getSelectionCells(),c=[],d=0;d<b.length;d++)e.getModel().isVertex(b[d])&&c.push(b[d]);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 l="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("autosave",function(){a.editor.setAutosave(!a.editor.autosave)});f.setToggleAction(!0);f.setSelectedCallback(function(){return f.isEnabled()&&a.editor.autosave});a.actions.addAction("editGeometry...",function(){for(var b=e.getSelectionCells(),c=[],d=0;d<b.length;d++)e.getModel().isVertex(b[d])&&c.push(b[d]);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 k="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=e.view.getState(e.getSelectionCell());if(e.isEnabled()&&null!=b){a.copiedStyle=mxUtils.clone(b.style);for(var b=e.getModel().getStyle(b.cell),b=null!=b?b.split(";"):[],c=0;c<b.length;c++){var d=b[c],f=d.indexOf("=");if(0<=f){var g=d.substring(0,f),d=d.substring(f+1);null==a.copiedStyle[g]&&"none"==d&&(a.copiedStyle[g]="none")}}}},null,null,Editor.ctrlKey+"+Shift+C");a.actions.addAction("pasteStyle",function(){if(e.isEnabled()&&!e.isSelectionEmpty()&&
-null!=a.copiedStyle){e.getModel().beginUpdate();try{for(var b=e.getSelectionCells(),c=0;c<b.length;c++)for(var d=e.view.getState(b[c]),f=0;f<l.length;f++){var g=l[f],h=a.copiedStyle[g];d.style[g]!=h&&e.setCellStyles(g,h,[b[c]])}}finally{e.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,m,l){b=parseInt(b);!isNaN(b)&&0<b&&a.exportImage(b/100,c,d,e,f,h,!m,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,m,l){b=parseInt(b);!isNaN(b)&&0<b&&a.exportImage(b/100,!1,d,e,!1,h,!m,!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)}));d=a.actions.put("shadowVisible",new Action(mxResources.get("shadow"),function(){e.setShadowVisible(!e.shadowVisible)}));d.setToggleAction(!0);d.setSelectedCallback(function(){return e.shadowVisible});var q=!1;a.actions.put("about",new Action(mxResources.get("aboutDrawio")+"...",function(){q||(a.showDialog((new AboutDialog(a)).container,220,300,!0,!0,function(){q=!1}),
-q=!0)},null,null,"F1"));a.actions.addAction("userManual...",function(){a.openLink("https://support.draw.io/display/DO/Draw.io+Online+User+Manual")});a.actions.addAction("support...",function(){a.openLink("https://about.draw.io/support/")});a.actions.addAction("exportOptionsDisabled...",function(){a.handleError({message:mxResources.get("exportOptionsDisabledDetails")},mxResources.get("exportOptionsDisabled"))});a.actions.addAction("keyboardShortcuts...",function(){mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?
+null!=a.copiedStyle){e.getModel().beginUpdate();try{for(var b=e.getSelectionCells(),c=0;c<b.length;c++)for(var d=e.view.getState(b[c]),f=0;f<k.length;f++){var g=k[f],h=a.copiedStyle[g];d.style[g]!=h&&e.setCellStyles(g,h,[b[c]])}}finally{e.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,m){b=parseInt(b);!isNaN(b)&&0<b&&a.exportImage(b/100,c,d,e,f,h,!k,m)}),!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,m){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)}));d=a.actions.put("shadowVisible",new Action(mxResources.get("shadow"),function(){e.setShadowVisible(!e.shadowVisible)}));d.setToggleAction(!0);d.setSelectedCallback(function(){return e.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}),
+p=!0)},null,null,"F1"));a.actions.addAction("userManual...",function(){a.openLink("https://support.draw.io/display/DO/Draw.io+Online+User+Manual")});a.actions.addAction("support...",function(){a.openLink("https://about.draw.io/support/")});a.actions.addAction("exportOptionsDisabled...",function(){a.handleError({message:mxResources.get("exportOptionsDisabledDetails")},mxResources.get("exportOptionsDisabled"))});a.actions.addAction("keyboardShortcuts...",function(){mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?
a.openLink("https://www.draw.io/shortcuts.svg"):mxClient.IS_SVG?a.openLink("shortcuts.svg"):a.openLink("https://www.draw.io/?lightbox=1#Uhttps%3A%2F%2Fwww.draw.io%2Fshortcuts.svg")});a.actions.addAction("feedback...",function(){var b=new FeedbackDialog(a);a.showDialog(b.container,610,360,!0,!0);b.init()});a.actions.addAction("quickStart...",function(){a.openLink("https://www.youtube.com/watch?v=Z0D96ZikMkc")});d=a.actions.addAction("tags...",mxUtils.bind(this,function(){null==this.tagsWindow?(this.tagsWindow=
new TagsWindow(a,document.body.offsetWidth-380,230,300,120),this.tagsWindow.window.addListener("show",function(){a.fireEvent(new mxEventObject("tags"))}),this.tagsWindow.window.addListener("hide",function(){a.fireEvent(new mxEventObject("tags"))}),this.tagsWindow.window.setVisible(!0),a.fireEvent(new mxEventObject("tags"))):this.tagsWindow.window.setVisible(!this.tagsWindow.window.isVisible())}));d.setToggleAction(!0);d.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.tagsWindow&&
this.tagsWindow.window.isVisible()}));d=a.actions.addAction("find...",mxUtils.bind(this,function(){null==this.findWindow?(this.findWindow=new FindWindow(a,document.body.offsetWidth-300,110,240,140),this.findWindow.window.addListener("show",function(){a.fireEvent(new mxEventObject("find"))}),this.findWindow.window.addListener("hide",function(){a.fireEvent(new mxEventObject("find"))}),this.findWindow.window.setVisible(!0),a.fireEvent(new mxEventObject("find"))):this.findWindow.window.setVisible(!this.findWindow.window.isVisible())}));
@@ -8477,28 +8476,28 @@ this.editorUi.hRuler.setUnit(mxRuler.prototype.INCHES);this.editorUi.vRuler.draw
mxUtils.bind(this,function(){this.editorUi.vRuler.setUnit(mxRuler.prototype.PIXELS);this.editorUi.hRuler.setUnit(mxRuler.prototype.PIXELS);this.editorUi.vRuler.drawRuler(!0);this.editorUi.hRuler.drawRuler(!0)})),this.addMenuItems(b,["-","rulerInch","rulerCM","rulerPixel"],c));"1"==urlParams.test&&(mxResources.parse("showBoundingBox=Show bounding box"),this.editorUi.actions.addAction("showBoundingBox",mxUtils.bind(this,function(){var a=e.getGraphBounds(),b=e.view.translate,c=e.view.scale;e.insertVertex(e.getDefaultParent(),
null,"",a.x/c-b.x,a.y/c-b.y,a.width/c,a.height/c,"fillColor=none;strokeColor=red;")})),mxResources.parse("createSidebarEntry=Create Sidebar Entry"),this.editorUi.actions.addAction("createSidebarEntry",mxUtils.bind(this,function(){e.isSelectionEmpty()||a.showTextDialog("Create Sidebar Entry","sb.createVertexTemplateFromData('"+e.compress(mxUtils.getXml(e.encodeCells(e.getSelectionCells())))+"', width, height, 'Title');")})),this.addMenuItems(b,["-","createSidebarEntry","showBoundingBox"],c),mxResources.parse("testChecksum=Checksum"),
a.actions.addAction("testChecksum",mxUtils.bind(this,function(){null!=a.pages?(mxLog.show(),mxLog.debug(a.pages.length+" page(s) checksum="+a.getHashValueForPages(a.pages))):a.alert("No pages")})),this.addMenuItems(b,["-","testChecksum"],c),mxResources.parse("testXmlImageExport=XML Image Export"),a.actions.addAction("testXmlImageExport",mxUtils.bind(this,function(){var a=new mxImageExport,b=e.getGraphBounds(),c=e.view.scale,d=mxUtils.createXmlDocument(),f=d.createElement("output");d.appendChild(f);
-d=new mxXmlCanvas2D(f);d.translate(Math.floor((1-b.x)/c),Math.floor((1-b.y)/c));d.scale(1/c);var g=0,k=d.save;d.save=function(){g++;k.apply(this,arguments)};var h=d.restore;d.restore=function(){g--;h.apply(this,arguments)};var m=a.drawShape;a.drawShape=function(a){mxLog.debug("entering shape",a,g);m.apply(this,arguments);mxLog.debug("leaving shape",a,g)};a.drawState(e.getView().getState(e.model.root),d);mxLog.show();mxLog.debug(mxUtils.getXml(f));mxLog.debug("stateCounter",g)})),this.addMenuItems(b,
+d=new mxXmlCanvas2D(f);d.translate(Math.floor((1-b.x)/c),Math.floor((1-b.y)/c));d.scale(1/c);var g=0,l=d.save;d.save=function(){g++;l.apply(this,arguments)};var h=d.restore;d.restore=function(){g--;h.apply(this,arguments)};var k=a.drawShape;a.drawShape=function(a){mxLog.debug("entering shape",a,g);k.apply(this,arguments);mxLog.debug("leaving shape",a,g)};a.drawState(e.getView().getState(e.model.root),d);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(D){a.handleError(D,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(e.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,k,h,m,l){a.createHtml(b,c,d,e,f,g,k,h,m,l,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>");
+a.showHtmlDialog(mxResources.get("create"),"https://desk.draw.io/support/solutions/articles/16000042542",b,function(b,c,d,e,f,g,l,h,k,m){a.createHtml(b,c,d,e,f,g,l,h,k,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>");
d.writeln(b);var e=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;e&&d.writeln(c);d.writeln("</body>");d.writeln("</html>");d.close();if(!e){var f=a.document.createElement("div");f.marginLeft="26px";f.marginTop="26px";mxUtils.write(f,mxResources.get("updatingDocument"));e=a.document.createElement("img");e.setAttribute("src",window.location.protocol+"//"+window.location.hostname+"/"+IMAGE_PATH+"/spin.gif");e.style.marginLeft="6px";f.appendChild(e);a.document.body.insertBefore(f,a.document.body.firstChild);
window.setTimeout(function(){var a=document.createElement("script");a.type="text/javascript";a.src=/<script.*?src="(.*?)"/.exec(c)[1];d.body.appendChild(a);f.parentNode.removeChild(f)},20)}});a.showDialog(d.container,440,240,!0,!0);d.init()}))})})}));a.actions.put("liveImage",new Action("Live image...",function(){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(b){a.spinner.stop();null!=b?(b=encodeURIComponent(b),b=new EmbedDialog(a,EXPORT_URL+"?format=png&url="+
b,0),a.showDialog(b.container,440,240,!0,!0),b.init()):a.handleError({message:mxResources.get("invalidPublicUrl")})})}));a.actions.put("embedImage",new Action(mxResources.get("image")+"...",function(){a.showEmbedImageDialog(function(b,c,d,e,f,g){a.spinner.spin(document.body,mxResources.get("loading"))&&a.createEmbedImage(b,c,d,e,f,g,function(b){a.spinner.stop();b=new EmbedDialog(a,b);a.showDialog(b.container,440,240,!0,!0);b.init()},function(b){a.spinner.stop();a.handleError(b)})},mxResources.get("image"),
mxResources.get("retina"),a.isExportToCanvas())}));a.actions.put("embedSvg",new Action(mxResources.get("formatSvg")+"...",function(){a.showEmbedImageDialog(function(b,c,d,e,f,g){a.spinner.spin(document.body,mxResources.get("loading"))&&a.createEmbedSvg(b,c,d,e,f,g,function(b){a.spinner.stop();b=new EmbedDialog(a,b);a.showDialog(b.container,440,240,!0,!0);b.init()},function(b){a.spinner.stop();a.handleError(b)})},mxResources.get("formatSvg"),mxResources.get("image"),!0,"https://desk.draw.io/support/solutions/articles/16000042548")}));
-a.actions.put("embedIframe",new Action(mxResources.get("iframe")+"...",function(){var b=e.getGraphBounds();a.showPublishLinkDialog(mxResources.get("iframe"),null,"100%",Math.ceil((b.y+b.height-e.view.translate.y)/e.view.scale)+2,function(b,c,d,e,f,g,k,h){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(m){a.spinner.stop();m=new EmbedDialog(a,'<iframe frameborder="0" style="width:'+k+";height:"+h+';" src="'+a.createLink(b,c,d,e,f,g,m)+'"></iframe>');
-a.showDialog(m.container,440,240,!0,!0);m.init()})},!0)}));a.actions.put("publishLink",new Action(mxResources.get("link")+"...",function(){a.showPublishLinkDialog(null,null,null,null,function(b,c,d,e,f,g){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(k){a.spinner.stop();k=new EmbedDialog(a,a.createLink(b,c,d,e,f,g,k));a.showDialog(k.container,440,240,!0,!0);k.init()})})}));a.actions.addAction("googleDocs...",function(){a.openLink("http://docsaddon.draw.io")});
+a.actions.put("embedIframe",new Action(mxResources.get("iframe")+"...",function(){var b=e.getGraphBounds();a.showPublishLinkDialog(mxResources.get("iframe"),null,"100%",Math.ceil((b.y+b.height-e.view.translate.y)/e.view.scale)+2,function(b,c,d,e,f,g,l,h){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(k){a.spinner.stop();k=new EmbedDialog(a,'<iframe frameborder="0" style="width:'+l+";height:"+h+';" src="'+a.createLink(b,c,d,e,f,g,k)+'"></iframe>');
+a.showDialog(k.container,440,240,!0,!0);k.init()})},!0)}));a.actions.put("publishLink",new Action(mxResources.get("link")+"...",function(){a.showPublishLinkDialog(null,null,null,null,function(b,c,d,e,f,g){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(l){a.spinner.stop();l=new EmbedDialog(a,a.createLink(b,c,d,e,f,g,l));a.showDialog(l.container,440,240,!0,!0);l.init()})})}));a.actions.addAction("googleDocs...",function(){a.openLink("http://docsaddon.draw.io")});
a.actions.addAction("googleSlides...",function(){a.openLink("https://slidesaddon.draw.io")});a.actions.addAction("googleSites...",function(){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(b){a.spinner.stop();b=new GoogleSitesDialog(a,b);a.showDialog(b.container,420,256,!0,!0);b.init()})});if(isLocalStorage||mxClient.IS_CHROMEAPP)d=a.actions.addAction("scratchpad",function(){a.toggleScratchpad()}),d.setToggleAction(!0),d.setSelectedCallback(function(){return null!=
a.scratchpad}),a.actions.addAction("plugins...",function(){a.showDialog((new PluginsDialog(a)).container,360,170,!0,!1)});d=a.actions.addAction("search",function(){var b=a.sidebar.isEntryVisible("search");a.sidebar.showPalette("search",!b);isLocalStorage&&(mxSettings.settings.search=!b,mxSettings.save())});d.setToggleAction(!0);d.setSelectedCallback(function(){return a.sidebar.isEntryVisible("search")});"1"==urlParams.embed&&(a.actions.get("save").funct=function(b){e.isEditing()&&e.stopEditing();
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 d=a.createLoadMessage("save");d.xml=c;b&&(d.exit=!0);c=JSON.stringify(d)}(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 d(b){b.pickFile(function(c){a.spinner.spin(document.body,mxResources.get("loading"))&&b.getFile(c,function(b){var c=g(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,d){var f=e.view,g=e.getGraphBounds(),k=e.snap(Math.ceil(Math.max(0,g.x/f.scale-f.translate.x)+4*e.gridSize)),h=e.snap(Math.ceil(Math.max(0,(g.y+g.height)/f.scale-f.translate.y)+4*e.gridSize));"data:image/"==b.substring(0,11)?a.loadImage(b,mxUtils.bind(this,function(f){var g=!0,m=mxUtils.bind(this,function(){a.resizeImage(f,b,mxUtils.bind(this,function(f,m,l){f=g?Math.min(1,Math.min(a.maxImageSize/m,a.maxImageSize/l)):1;a.importFile(b,c,
-k,h,Math.round(m*f),Math.round(l*f),d,function(b){a.spinner.stop();e.setSelectionCells(b);e.scrollCellToVisible(e.getSelectionCell())})}),g)});b.length>a.resampleThreshold?a.confirmImageResize(function(a){g=a;m()}):m()}),mxUtils.bind(this,function(){a.handleError({message:mxResources.get("cannotOpenFile")})})):a.importFile(b,c,k,h,0,0,d,function(b){a.spinner.stop();e.setSelectionCells(b);e.scrollCellToVisible(e.getSelectionCell())})}),g=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(){d(a.drive)},c):h&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1));null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){d(a.oneDrive)},c):p&&b.addItem(mxResources.get("oneDrive")+" ("+
+null)},b==a.drive)},!0)}var f=mxUtils.bind(this,function(b,c,d){var f=e.view,g=e.getGraphBounds(),l=e.snap(Math.ceil(Math.max(0,g.x/f.scale-f.translate.x)+4*e.gridSize)),h=e.snap(Math.ceil(Math.max(0,(g.y+g.height)/f.scale-f.translate.y)+4*e.gridSize));"data:image/"==b.substring(0,11)?a.loadImage(b,mxUtils.bind(this,function(f){var g=!0,k=mxUtils.bind(this,function(){a.resizeImage(f,b,mxUtils.bind(this,function(f,k,m){f=g?Math.min(1,Math.min(a.maxImageSize/k,a.maxImageSize/m)):1;a.importFile(b,c,
+l,h,Math.round(k*f),Math.round(m*f),d,function(b){a.spinner.stop();e.setSelectionCells(b);e.scrollCellToVisible(e.getSelectionCell())})}),g)});b.length>a.resampleThreshold?a.confirmImageResize(function(a){g=a;k()}):k()}),mxUtils.bind(this,function(){a.handleError({message:mxResources.get("cannotOpenFile")})})):a.importFile(b,c,l,h,0,0,d,function(b){a.spinner.stop();e.setSelectionCells(b);e.scrollCellToVisible(e.getSelectionCell())})}),g=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(){d(a.drive)},c):h&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1));null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){d(a.oneDrive)},c):q&&b.addItem(mxResources.get("oneDrive")+" ("+
mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){d(a.dropbox)},c):m&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){d(a.gitHub)},c);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){d(a.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.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=g;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"))},
@@ -8516,13 +8515,13 @@ try{a=e.addCell(a),e.fireEvent(new mxEventObject("cellsInserted","cells",[a]))}f
w("",80,80,"rhombus;whiteSpace=wrap;html=1;")}).isEnabled=g;var y=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);y(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){y(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):h&&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):p&&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):m&&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):q&&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):m&&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"),
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):h&&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):p&&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_GOOGLE)},c):h&&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):q&&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):m&&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(){},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):h&&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):p&&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)},
+"...",null,function(){a.pickLibrary(App.MODE_GOOGLE)},c):h&&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):q&&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):m&&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")+
"...",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(" "))})));
@@ -8572,9 +8571,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,e=Math.min(140,Math.max(20,(this.tabContainer.clientWidth-
b)/this.pages.length)+1),g=null,h=0;h<this.pages.length;h++)mxUtils.bind(this,function(b,e){this.pages[b]==this.currentPage?(e.className="geActivePage",e.style.backgroundColor="dark"==uiTheme?"#2a2a2a":"#eeeeee",e.style.fontWeight="bold",e.style.borderTopStyle="none"):e.className="geInactivePage";e.setAttribute("draggable","true");mxEvent.addListener(e,"dragstart",mxUtils.bind(this,function(c){a.isEnabled()?(mxClient.IS_FF&&c.dataTransfer.setData("Text","<diagram/>"),g=b):mxEvent.consume(c)}));mxEvent.addListener(e,
"dragend",mxUtils.bind(this,function(a){g=null;a.stopPropagation();a.preventDefault()}));mxEvent.addListener(e,"dragover",mxUtils.bind(this,function(a){null!=g&&(a.dataTransfer.dropEffect="move");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(e,"drop",mxUtils.bind(this,function(a){null!=g&&b!=g&&this.movePage(g,b);a.stopPropagation();a.preventDefault()}));c.appendChild(e)})(h,this.createTabForPage(this.pages[h],e,this.pages[h]!=this.currentPage));this.tabContainer.innerHTML="";this.tabContainer.appendChild(c);
-e=this.createPageMenuTab();this.tabContainer.appendChild(e);e=null;this.isPageInsertTabVisible()&&(e=this.createPageInsertTab(),this.tabContainer.appendChild(e));if(c.clientWidth>this.tabContainer.clientWidth-b){null!=e&&(e.style.position="absolute",e.style.right="0px",c.style.marginRight="30px");var m=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");m.style.position="absolute";m.style.right=this.editor.chromeless?"29px":"55px";m.style.fontSize="13pt";this.tabContainer.appendChild(m);var p=this.createControlTab(4,
-"&nbsp;&#10095;");p.style.position="absolute";p.style.right=this.editor.chromeless?"0px":"29px";p.style.fontSize="13pt";this.tabContainer.appendChild(p);var n=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));c.style.width=n+"px";mxEvent.addListener(m,"click",mxUtils.bind(this,function(a){c.scrollLeft-=Math.max(20,n-20);mxUtils.setOpacity(m,0<c.scrollLeft?100:50);mxUtils.setOpacity(p,c.scrollLeft<c.scrollWidth-c.clientWidth?100:50);mxEvent.consume(a)}));mxUtils.setOpacity(m,
-0<c.scrollLeft?100:50);mxUtils.setOpacity(p,c.scrollLeft<c.scrollWidth-c.clientWidth?100:50);mxEvent.addListener(p,"click",mxUtils.bind(this,function(a){c.scrollLeft+=Math.max(20,n-20);mxUtils.setOpacity(m,0<c.scrollLeft?100:50);mxUtils.setOpacity(p,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()};
+e=this.createPageMenuTab();this.tabContainer.appendChild(e);e=null;this.isPageInsertTabVisible()&&(e=this.createPageInsertTab(),this.tabContainer.appendChild(e));if(c.clientWidth>this.tabContainer.clientWidth-b){null!=e&&(e.style.position="absolute",e.style.right="0px",c.style.marginRight="30px");var m=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");m.style.position="absolute";m.style.right=this.editor.chromeless?"29px":"55px";m.style.fontSize="13pt";this.tabContainer.appendChild(m);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 n=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));c.style.width=n+"px";mxEvent.addListener(m,"click",mxUtils.bind(this,function(a){c.scrollLeft-=Math.max(20,n-20);mxUtils.setOpacity(m,0<c.scrollLeft?100:50);mxUtils.setOpacity(q,c.scrollLeft<c.scrollWidth-c.clientWidth?100:50);mxEvent.consume(a)}));mxUtils.setOpacity(m,
+0<c.scrollLeft?100:50);mxUtils.setOpacity(q,c.scrollLeft<c.scrollWidth-c.clientWidth?100:50);mxEvent.addListener(q,"click",mxUtils.bind(this,function(a){c.scrollLeft+=Math.max(20,n-20);mxUtils.setOpacity(m,0<c.scrollLeft?100:50);mxUtils.setOpacity(q,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};
@@ -8584,38 +8583,38 @@ 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,c,b){b=this.createTab(b);var e=a.getName()||mxResources.get("untitled"),g=a.getId();b.setAttribute("title",e+(null!=g?" ("+g+")":""));mxUtils.write(b,e);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 e=!1,g=!1;mxEvent.addGestureListeners(c,mxUtils.bind(this,function(c){e=null!=this.currentMenu;g=a==this.currentPage;b.isMouseDown||g||this.selectPage(a)}),null,mxUtils.bind(this,function(h){if(b.isEnabled()&&!b.isMouseDown&&(mxEvent.isTouchEvent(h)&&g||mxEvent.isPopupTrigger(h))){b.popupMenuHandler.hideMenu();
-this.hideCurrentMenu();if(!mxEvent.isTouchEvent(h)||!e){var m=new mxPopupMenu(this.createPageMenu(a));m.div.className+=" geMenubarMenu";m.smartSeparators=!0;m.showDisabled=!0;m.autoExpand=!0;m.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(m,arguments);this.resetCurrentMenu();m.destroy()});var p=mxEvent.getClientX(h),n=mxEvent.getClientY(h);m.popup(p,n,null,h);this.setCurrentMenu(m,c)}mxEvent.consume(h)}}))};
+this.hideCurrentMenu();if(!mxEvent.isTouchEvent(h)||!e){var m=new mxPopupMenu(this.createPageMenu(a));m.div.className+=" geMenubarMenu";m.smartSeparators=!0;m.showDisabled=!0;m.autoExpand=!0;m.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(m,arguments);this.resetCurrentMenu();m.destroy()});var q=mxEvent.getClientX(h),n=mxEvent.getClientY(h);m.popup(q,n,null,h);this.setCurrentMenu(m,c)}mxEvent.consume(h)}}))};
EditorUi.prototype.createPageMenu=function(a,c){return mxUtils.bind(this,function(b,e){b.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,a)+1)}),e);b.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(a)}),e);b.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(a,c)}),e);b.addSeparator(e);b.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(a,
mxResources.get("copyOf",[a.getName()]))}),e)})};(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,e){e.ui=a.ui;return b};a.afterDecode=function(a,b,e){a=e.oldIndex;e.oldIndex=e.newIndex;e.newIndex=a;return e};mxCodecRegistry.register(a)})();
(function(){var a=new mxObjectCodec(new RenamePage,["ui","page"]);a.beforeDecode=function(a,b,e){e.ui=a.ui;return b};a.afterDecode=function(a,b,e){a=e.previous;e.previous=e.name;e.name=a;return e};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,e,g){g.setAttribute("relatedPage",e.relatedPage.getId());null==e.index&&(g.setAttribute("name",e.relatedPage.getName()),null!=e.relatedPage.viewState&&g.setAttribute("viewState",JSON.stringify(e.relatedPage.viewState,function(a,b){return 0>mxUtils.indexOf(c,
a)?b:void 0})),null!=e.relatedPage.root&&a.encodeCell(e.relatedPage.root,g));return g};a.beforeDecode=function(a,c,g){g.ui=a.ui;g.relatedPage=g.ui.getPageById(c.getAttribute("relatedPage"));if(null==g.relatedPage){var b=c.ownerDocument.createElement("diagram");b.setAttribute("id",c.getAttribute("relatedPage"));b.setAttribute("name",c.getAttribute("name"));g.relatedPage=new DiagramPage(b);b=c.getAttribute("viewState");null!=b&&(g.relatedPage.viewState=JSON.parse(b),c.removeAttribute("viewState"));
c=c.cloneNode(!0);b=c.firstChild;if(null!=b)for(g.relatedPage.root=a.decodeCell(b,!1),g=b.nextSibling,b.parentNode.removeChild(b),b=g;null!=b;){g=b.nextSibling;if(b.nodeType==mxConstants.NODETYPE_ELEMENT){var e=b.getAttribute("id");null==a.lookup(e)&&a.decodeCell(b)}b.parentNode.removeChild(b);b=g}}return c};a.afterDecode=function(a,c,g){g.index=g.previousIndex;return g};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,e,p,n){b=null!=b?b:!1;null==e&&(e=this.getFoldableCells(this.getSelectionCells(),a));this.stopEditing();this.model.beginUpdate();try{for(var d=e.slice(),f=[],g=0;g<e.length;g++){var h=this.view.getState(e[g]),m=null!=h?h.style:this.getCellStyle(e[g]);"1"==mxUtils.getValue(m,"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 c=Graph.prototype.foldCells;Graph.prototype.foldCells=function(a,b,e,q,n){b=null!=b?b:!1;null==e&&(e=this.getFoldableCells(this.getSelectionCells(),a));this.stopEditing();this.model.beginUpdate();try{for(var d=e.slice(),f=[],g=0;g<e.length;g++){var h=this.view.getState(e[g]),m=null!=h?h.style:this.getCellStyle(e[g]);"1"==mxUtils.getValue(m,"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=d;e=c.apply(this,arguments)}finally{this.model.endUpdate()}return e};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 w.isVertex(a)&&c(a)}function c(a){var b=!1;null!=a&&(a=w.getParent(a),b=u.view.getState(a),u.view.getState(a),b="tree"==(null!=
-b?b.style:u.getCellStyle(a)).containerType);return b}function e(a){var b=!1;null!=a&&(a=w.getParent(a),b=u.view.getState(a),u.view.getState(a),b=null!=(null!=b?b.style:u.getCellStyle(a)).childLayout);return b}function p(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=p(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 l=u.getOutgoingEdges(u.model.getTerminal(d[0],!0));if(null!=l){for(var n=f==mxConstants.DIRECTION_SOUTH||
-f==mxConstants.DIRECTION_NORTH,q=g=d=0;q<l.length;q++){var t=u.model.getTerminal(l[q],!1);if(f==p(t)){var w=u.view.getState(t);t!=a&&null!=w&&(n&&b!=w.getCenterX()<h.getCenterX()||!n&&b!=w.getCenterY()<h.getCenterY())&&mxUtils.intersects(m,w)&&(d=10+Math.max(d,(Math.min(m.x+m.width,w.x+w.width)-Math.max(m.x,w.x))/k),g=10+Math.max(g,(Math.min(m.y+m.height,w.y+w.height)-Math.max(m.y,w.y))/k))}}n?g=0:d=0;for(q=0;q<l.length;q++)if(t=u.model.getTerminal(l[q],!1),f==p(t)&&(w=u.view.getState(t),t!=a&&null!=
-w&&(n&&b!=w.getCenterX()<h.getCenterX()||!n&&b!=w.getCenterY()<h.getCenterY()))){var x=[];u.traverse(w.cell,!0,function(a,b){null!=b&&x.push(b);x.push(a);return!0});u.moveCells(x,(b?1:-1)*d,(b?1:-1)*g)}}}return u.addCells(e,c)}finally{u.model.endUpdate()}}function d(a){u.model.beginUpdate();try{var b=p(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!=
+b?b.style:u.getCellStyle(a)).containerType);return b}function e(a){var b=!1;null!=a&&(a=w.getParent(a),b=u.view.getState(a),u.view.getState(a),b=null!=(null!=b?b.style:u.getCellStyle(a)).childLayout);return b}function q(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=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;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 l=mxRectangle.fromRectangle(h);f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?l.x+=(b?a.geometry.width+10:-e[1].geometry.width-10)*k:l.y+=(b?a.geometry.height+10:-e[1].geometry.height-10)*k;var m=u.getOutgoingEdges(u.model.getTerminal(d[0],!0));if(null!=m){for(var n=f==mxConstants.DIRECTION_SOUTH||
+f==mxConstants.DIRECTION_NORTH,p=g=d=0;p<m.length;p++){var t=u.model.getTerminal(m[p],!1);if(f==q(t)){var w=u.view.getState(t);t!=a&&null!=w&&(n&&b!=w.getCenterX()<h.getCenterX()||!n&&b!=w.getCenterY()<h.getCenterY())&&mxUtils.intersects(l,w)&&(d=10+Math.max(d,(Math.min(l.x+l.width,w.x+w.width)-Math.max(l.x,w.x))/k),g=10+Math.max(g,(Math.min(l.y+l.height,w.y+w.height)-Math.max(l.y,w.y))/k))}}n?g=0:d=0;for(p=0;p<m.length;p++)if(t=u.model.getTerminal(m[p],!1),f==q(t)&&(w=u.view.getState(t),t!=a&&null!=
+w&&(n&&b!=w.getCenterX()<h.getCenterX()||!n&&b!=w.getCenterY()<h.getCenterY()))){var x=[];u.traverse(w.cell,!0,function(a,b){null!=b&&x.push(b);x.push(a);return!0});u.moveCells(x,(b?1:-1)*d,(b?1:-1)*g)}}}return u.addCells(e,c)}finally{u.model.endUpdate()}}function d(a){u.model.beginUpdate();try{var b=q(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 f(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=p(a),l=u.view.translate,n=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)/n-l.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)/n-l.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)/n-l.y+-e.y+10);return u.addCells(d,b)}finally{u.model.endUpdate()}}function l(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 q(a,b){var c=p(a),d=b==mxConstants.DIRECTION_EAST||b==mxConstants.DIRECTION_WEST;(c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST)==d&&c!=b?t.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=l(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 t=this,u=t.editor.graph,w=u.getModel();mxResources.parse("selectChildren=Select Children");mxResources.parse("selectSiblings=Select Siblings");
+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),l=q(a),m=u.view.translate,n=u.view.scale;l==mxConstants.DIRECTION_SOUTH?(d[1].geometry.x=null==k?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(k.x+k.width)/n-m.x-e.x+10,d[1].geometry.y+=a.geometry.height-e.y+40):l==mxConstants.DIRECTION_NORTH?(d[1].geometry.x=
+null==k?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(k.x+k.width)/n-m.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==k?a.geometry.y+(a.geometry.height-d[1].geometry.height)/2:(k.y+k.height)/n-m.y+-e.y+10);return u.addCells(d,b)}finally{u.model.endUpdate()}}function k(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=q(a),d=b==mxConstants.DIRECTION_EAST||b==mxConstants.DIRECTION_WEST;(c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST)==d&&c!=b?t.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=k(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 t=this,u=t.editor.graph,w=u.getModel();mxResources.parse("selectChildren=Select Children");mxResources.parse("selectSiblings=Select Siblings");
mxResources.parse("selectDescendants=Select Descendants");mxResources.parse("selectParent=Select Parent");var y=t.menus.createPopupMenu;t.menus.createPopupMenu=function(a,c,d){y.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))}};t.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");t.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");t.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");t.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 k=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];w.isEdge(g)&&c(g)&&(e.push(g),g=w.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 k.apply(this,arguments)};t.hoverIcons.getStateAt=function(a,c,d){return b(a.cell)?null:this.graph.view.getState(this.graph.getCellAt(c,d))};var v=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=v.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 m=this.cloneCell(g[0]);this.addEdge(m,u.getDefaultParent(),this.model.getTerminal(g[0],!0),h[e])}}}finally{this.model.endUpdate()}return h};var z=u.moveCells;u.moveCells=function(a,c,d,e,f,g,h){var k=null;this.model.beginUpdate();try{var m=f,l=this.view.getState(f),n=null!=l?l.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!=m&&f!=m&&null!=this.view.getState(a[0])){var q=u.getIncomingEdges(a[0]);if(0<q.length){var t=u.view.getState(u.model.getTerminal(q[0],!0));if(null!=t){var w=u.view.getState(m);null!=w&&(c=(w.getCenterX()-t.getCenterX())/u.view.scale,d=(w.getCenterY()-t.getCenterY())/u.view.scale)}}}}k=z.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(m)&&
-0>mxUtils.indexOf(k,this.model.getTerminal(k[p],!0))&&this.model.setTerminal(k[p],m,!0);else if(b(a[p])&&(q=u.getIncomingEdges(a[p]),0<q.length))if(!e)b(m)&&0>mxUtils.indexOf(a,this.model.getTerminal(q[0],!0))&&this.model.setTerminal(q[0],m,!0);else if(0==u.getIncomingEdges(k[p]).length){l=m;if(null==l||l==u.model.getParent(a[p]))l=u.model.getTerminal(q[0],!0);e=this.cloneCell(q[0]);this.addEdge(e,u.getDefaultParent(),l,k[p])}}finally{this.model.endUpdate()}return k};if(null!=t.sidebar){var C=t.sidebar.dropAndConnect;
-t.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 B={88:t.actions.get("selectChildren"),84:t.actions.get("selectSubtree"),80:t.actions.get("selectParent"),83:t.actions.get("selectSiblings")},x=
+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 l=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];w.isEdge(g)&&c(g)&&(e.push(g),g=w.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 l.apply(this,arguments)};t.hoverIcons.getStateAt=function(a,c,d){return b(a.cell)?null:this.graph.view.getState(this.graph.getCellAt(c,d))};var v=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=v.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 z=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 q=
+0;q<a.length;q++)if(b(a[q])||u.model.isEdge(a[q])&&null==u.model.getTerminal(a[q],!0)){f=u.model.getParent(a[q]);break}if(null!=l&&f!=l&&null!=this.view.getState(a[0])){var p=u.getIncomingEdges(a[0]);if(0<p.length){var t=u.view.getState(u.model.getTerminal(p[0],!0));if(null!=t){var w=u.view.getState(l);null!=w&&(c=(w.getCenterX()-t.getCenterX())/u.view.scale,d=(w.getCenterY()-t.getCenterY())/u.view.scale)}}}}k=z.apply(this,arguments);if(null!=k&&null!=a&&k.length==a.length)for(q=0;q<k.length;q++)if(this.model.isEdge(k[q]))b(l)&&
+0>mxUtils.indexOf(k,this.model.getTerminal(k[q],!0))&&this.model.setTerminal(k[q],l,!0);else if(b(a[q])&&(p=u.getIncomingEdges(a[q]),0<p.length))if(!e)b(l)&&0>mxUtils.indexOf(a,this.model.getTerminal(p[0],!0))&&this.model.setTerminal(p[0],l,!0);else if(0==u.getIncomingEdges(k[q]).length){m=l;if(null==m||m==u.model.getParent(a[q]))m=u.model.getTerminal(p[0],!0);e=this.cloneCell(p[0]);this.addEdge(e,u.getDefaultParent(),m,k[q])}}finally{this.model.endUpdate()}return k};if(null!=t.sidebar){var D=t.sidebar.dropAndConnect;
+t.sidebar.dropAndConnect=function(a,c,d,e){var f=u.model,g=null;f.beginUpdate();try{if(g=D.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 B={88:t.actions.get("selectChildren"),84:t.actions.get("selectSubtree"),80:t.actions.get("selectParent"),83:t.actions.get("selectSiblings")},x=
t.onKeyDown;t.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)?d(u.getSelectionCell()):f(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!=t.hoverIcons&&t.hoverIcons.update(u.view.getState(u.getSelectionCell())),
-u.startEditingAtCell(u.getSelectionCell()),mxEvent.consume(a);else if(mxEvent.isAltDown(a)&&mxEvent.isShiftDown(a)){var e=B[a.keyCode];null!=e&&(e.funct(a),mxEvent.consume(a))}else 37==a.keyCode?(q(u.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(a)):38==a.keyCode?(q(u.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(a)):39==a.keyCode?(q(u.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(a)):40==a.keyCode&&(q(u.getSelectionCell(),mxConstants.DIRECTION_SOUTH),
-mxEvent.consume(a))}}catch(M){console.log("error",M)}mxEvent.isConsumed(a)||x.apply(this,arguments)};var G=u.connectVertex;u.connectVertex=function(a,c,e,g,h,k){var m=u.getIncomingEdges(a);return b(a)&&0<m.length?(e=p(a),g=e==mxConstants.DIRECTION_EAST||e==mxConstants.DIRECTION_WEST,h=c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST,e==c?f(a):g==h?d(a):n(a,c!=mxConstants.DIRECTION_NORTH&&c!=mxConstants.DIRECTION_WEST)):G.call(this,a,c,e,g,h,k)};u.getSubtree=function(a){var c=[a];b(a)&&
-!e(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 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=
+u.startEditingAtCell(u.getSelectionCell()),mxEvent.consume(a);else if(mxEvent.isAltDown(a)&&mxEvent.isShiftDown(a)){var e=B[a.keyCode];null!=e&&(e.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)||x.apply(this,arguments)};var G=u.connectVertex;u.connectVertex=function(a,c,e,g,h,k){var l=u.getIncomingEdges(a);return b(a)&&0<l.length?(e=q(a),g=e==mxConstants.DIRECTION_EAST||e==mxConstants.DIRECTION_WEST,h=c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST,e==c?f(a):g==h?d(a):n(a,c!=mxConstants.DIRECTION_NORTH&&c!=mxConstants.DIRECTION_WEST)):G.call(this,a,c,e,g,h,k)};u.getSubtree=function(a){var c=[a];b(a)&&
+!e(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 H=mxVertexHandler.prototype.destroy;
mxVertexHandler.prototype.destroy=function(a,b){H.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var e=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var a=e.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;");
@@ -8645,7 +8644,7 @@ 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 h=EditorUi.prototype.updateTabContainer;EditorUi.prototype.updateTabContainer=function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom=
-"30px");h.apply(this,arguments)};var m=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){m.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var p=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(a,c){null!=c.shortcut&&900>b&&!mxClient.IS_IOS?a.firstChild.nextSibling.setAttribute("title",c.shortcut):p.apply(this,arguments)};var n=App.prototype.updateUserElement;App.prototype.updateUserElement=
+"30px");h.apply(this,arguments)};var m=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){m.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var q=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(a,c){null!=c.shortcut&&900>b&&!mxClient.IS_IOS?a.firstChild.nextSibling.setAttribute("title",c.shortcut):q.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"))}};
var d=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){d.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=
@@ -8654,9 +8653,9 @@ function(){this.actions.get("save").funct()}));a.appendChild(b);"1"==urlParams.s
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 f=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(a,b,c){var d=this.editorUi.editor.graph;a.smartSeparators=!0;f.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 l=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 k=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);l.apply(this,arguments)};var q=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(a){q.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);k.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 t=Menus.prototype.init;Menus.prototype.init=function(){t.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,
@@ -8671,35 +8670,35 @@ c):b.menus.addSubmenu("importFrom",a,c);a.addSeparator(c);b.menus.addSubmenu("in
a.addSeparator(b):h(a,b,mxResources.get(g[c])+"...",g[c])})));this.put("view",new Menu(mxUtils.bind(this,function(a,c){b.menus.addMenuItems(a,"grid guides - connectionArrows connectionPoints -".split(" "),c);if("undefined"!==typeof MathJax){var d=b.menus.addMenuItem(a,"mathematicalTypesetting",c);b.menus.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000032875")}b.menus.addMenuItems(a,["copyConnect","collapseExpand","-","pageScale"],c)})))};var u=EditorUi.prototype.init;EditorUi.prototype.init=
function(){function a(a,b,c){var d=g.menus.get(a),e=n.addMenu(mxResources.get(a),mxUtils.bind(this,function(){d.funct.apply(this,arguments)}),m);e.className="geMenuItem";e.style.display="inline-block";e.style.boxSizing="border-box";e.style.top="6px";e.style.marginRight="6px";e.style.height="30px";e.style.paddingTop="6px";e.style.paddingBottom="6px";e.style.cursor="pointer";e.setAttribute("title",mxResources.get(a));g.menus.menuCreated(d,e,"geMenuItem");null!=c?(e.style.backgroundImage="url("+c+")",
e.style.backgroundPosition="center center",e.style.backgroundRepeat="no-repeat",e.style.backgroundSize="24px 24px",e.style.width="34px",e.innerHTML=""):b||(e.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",e.style.backgroundPosition="right 6px center",e.style.backgroundRepeat="no-repeat",e.style.paddingRight="22px");return e}function c(a,b,c,d,e,f){var h=document.createElement("a");h.className="geMenuItem";h.style.display="inline-block";h.style.boxSizing="border-box";h.style.height=
-"30px";h.style.padding="6px";h.style.position="relative";h.style.verticalAlign="top";h.style.top="0px";null!=g.statusContainer?l.insertBefore(h,g.statusContainer):l.appendChild(h);null!=f?(h.style.backgroundImage="url("+f+")",h.style.backgroundPosition="center center",h.style.backgroundRepeat="no-repeat",h.style.backgroundSize="24px 24px",h.style.width="34px"):mxUtils.write(h,a);mxEvent.addListener(h,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(a){a.preventDefault()}));
+"30px";h.style.padding="6px";h.style.position="relative";h.style.verticalAlign="top";h.style.top="0px";null!=g.statusContainer?k.insertBefore(h,g.statusContainer):k.appendChild(h);null!=f?(h.style.backgroundImage="url("+f+")",h.style.backgroundPosition="center center",h.style.backgroundRepeat="no-repeat",h.style.backgroundSize="24px 24px",h.style.width="34px"):mxUtils.write(h,a);mxEvent.addListener(h,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(a){a.preventDefault()}));
mxEvent.addListener(h,"click",function(a){"disabled"!=h.getAttribute("disabled")&&b(a);mxEvent.consume(a)});null==c&&(h.style.marginRight="4px");null!=d&&h.setAttribute("title",d);null!=e&&(a=function(){e.isEnabled()?(h.removeAttribute("disabled"),h.style.cursor="pointer"):(h.setAttribute("disabled","disabled"),h.style.cursor="default")},e.addListener("stateChanged",a),a());return h}function d(a,b){var c=document.createElement("div");c.className="geMenuItem";c.style.display="inline-block";c.style.verticalAlign=
-"top";c.style.marginRight="6px";c.style.padding="0 4px 0 4px";c.style.height="30px";c.style.position="relative";c.style.top="0px";for(var d=0;d<a.length;d++)null!=a[d]&&(a[d].style.margin="0px",a[d].style.boxShadow="none",c.appendChild(a[d]));null!=b&&mxUtils.setOpacity(c,b);null!=g.statusContainer?l.insertBefore(c,g.statusContainer):l.appendChild(c);return c}function e(){for(var e=l.firstChild;null!=e;){var f=e.nextSibling;"geMenuItem"!=e.className&&"geItem"!=e.className||e.parentNode.removeChild(e);
-e=f}m=l.firstChild;b=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;(e=900>b)||a("diagram");d([e?a("diagram",null,IMAGE_PATH+"/drawlogo.svg"):null,c(mxResources.get("shapes"),g.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),g.actions.get("image"),e?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTMgMTN2OGg4di04aC04ek0zIDIxaDh2LThIM3Y4ek0zIDN2OGg4VjNIM3ptMTMuNjYtMS4zMUwxMSA3LjM0IDE2LjY2IDEzbDUuNjYtNS42Ni01LjY2LTUuNjV6Ii8+PC9zdmc+":
+"top";c.style.marginRight="6px";c.style.padding="0 4px 0 4px";c.style.height="30px";c.style.position="relative";c.style.top="0px";for(var d=0;d<a.length;d++)null!=a[d]&&(a[d].style.margin="0px",a[d].style.boxShadow="none",c.appendChild(a[d]));null!=b&&mxUtils.setOpacity(c,b);null!=g.statusContainer?k.insertBefore(c,g.statusContainer):k.appendChild(c);return c}function e(){for(var e=k.firstChild;null!=e;){var f=e.nextSibling;"geMenuItem"!=e.className&&"geItem"!=e.className||e.parentNode.removeChild(e);
+e=f}m=k.firstChild;b=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;(e=900>b)||a("diagram");d([e?a("diagram",null,IMAGE_PATH+"/drawlogo.svg"):null,c(mxResources.get("shapes"),g.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),g.actions.get("image"),e?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTMgMTN2OGg4di04aC04ek0zIDIxaDh2LThIM3Y4ek0zIDN2OGg4VjNIM3ptMTMuNjYtMS4zMUwxMSA3LjM0IDE2LjY2IDEzbDUuNjYtNS42Ni01LjY2LTUuNjV6Ii8+PC9zdmc+":
null),c(mxResources.get("format"),g.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+g.actions.get("formatPanel").shortcut+")",g.actions.get("image"),e?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgM2MtNC45NyAwLTkgNC4wMy05IDlzNC4wMyA5IDkgOWMuODMgMCAxLjUtLjY3IDEuNS0xLjUgMC0uMzktLjE1LS43NC0uMzktMS4wMS0uMjMtLjI2LS4zOC0uNjEtLjM4LS45OSAwLS44My42Ny0xLjUgMS41LTEuNUgxNmMyLjc2IDAgNS0yLjI0IDUtNSAwLTQuNDItNC4wMy04LTktOHptLTUuNSA5Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTNS42NyA5IDYuNSA5IDggOS42NyA4IDEwLjUgNy4zMyAxMiA2LjUgMTJ6bTMtNEM4LjY3IDggOCA3LjMzIDggNi41UzguNjcgNSA5LjUgNXMxLjUuNjcgMS41IDEuNVMxMC4zMyA4IDkuNSA4em01IDBjLS44MyAwLTEuNS0uNjctMS41LTEuNVMxMy42NyA1IDE0LjUgNXMxLjUuNjcgMS41IDEuNVMxNS4zMyA4IDE0LjUgOHptMyA0Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTMTYuNjcgOSAxNy41IDlzMS41LjY3IDEuNSAxLjUtLjY3IDEuNS0xLjUgMS41eiIvPjwvc3ZnPg==":
null)],e?60:null);f=a("insert",!0,e?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTkgMTNoLTZ2NmgtMnYtNkg1di0yaDZWNWgydjZoNnYyeiIvPjwvc3ZnPg==":null);d([f,c(mxResources.get("delete"),g.actions.get("delete").funct,null,mxResources.get("delete"),g.actions.get("delete"),e?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNNiAxOWMwIDEuMS45IDIgMiAyaDhjMS4xIDAgMi0uOSAyLTJWN0g2djEyek0xOSA0aC0zLjVsLTEtMWgtNWwtMSAxSDV2MmgxNFY0eiIvPjwvc3ZnPg==":
null)],e?60:null);if(411<=b&&(f=g.actions.get("undo"),e=g.actions.get("redo"),f=c("",f.funct,null,mxResources.get("undo")+" ("+f.shortcut+")",f,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIuNSA4Yy0yLjY1IDAtNS4wNS45OS02LjkgMi42TDIgN3Y5aDlsLTMuNjItMy42MmMxLjM5LTEuMTYgMy4xNi0xLjg4IDUuMTItMS44OCAzLjU0IDAgNi41NSAyLjMxIDcuNiA1LjVsMi4zNy0uNzhDMjEuMDggMTEuMDMgMTcuMTUgOCAxMi41IDh6Ii8+PC9zdmc+"),e=c("",
-e.funct,null,mxResources.get("redo")+" ("+e.shortcut+")",e,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTguNCAxMC42QzE2LjU1IDguOTkgMTQuMTUgOCAxMS41IDhjLTQuNjUgMC04LjU4IDMuMDMtOS45NiA3LjIyTDMuOSAxNmMxLjA1LTMuMTkgNC4wNS01LjUgNy42LTUuNSAxLjk1IDAgMy43My43MiA1LjEyIDEuODhMMTMgMTZoOVY3bC0zLjYgMy42eiIvPjwvc3ZnPg=="),d([f,e],60),480<=b)){var e=g.actions.get("zoomIn"),f=g.actions.get("zoomOut"),k=g.actions.get("resetView");
-d([c("",function(){h.popupMenuHandler.hideMenu();var a=h.view.scale,b=h.view.translate.x,c=h.view.translate.y;g.actions.get("resetView").funct();1E-5>Math.abs(a-h.view.scale)&&b==h.view.translate.x&&c==h.view.translate.y&&g.actions.get(h.pageVisible?"fitPage":"fitWindow").funct()},!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",k,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMyA1djRoMlY1aDRWM0g1Yy0xLjEgMC0yIC45LTIgMnptMiAxMEgzdjRjMCAxLjEuOSAyIDIgMmg0di0ySDV2LTR6bTE0IDRoLTR2Mmg0YzEuMSAwIDItLjkgMi0ydi00aC0ydjR6bTAtMTZoLTR2Mmg0djRoMlY1YzAtMS4xLS45LTItMi0yeiIvPjwvc3ZnPg=="),
+e.funct,null,mxResources.get("redo")+" ("+e.shortcut+")",e,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTguNCAxMC42QzE2LjU1IDguOTkgMTQuMTUgOCAxMS41IDhjLTQuNjUgMC04LjU4IDMuMDMtOS45NiA3LjIyTDMuOSAxNmMxLjA1LTMuMTkgNC4wNS01LjUgNy42LTUuNSAxLjk1IDAgMy43My43MiA1LjEyIDEuODhMMTMgMTZoOVY3bC0zLjYgMy42eiIvPjwvc3ZnPg=="),d([f,e],60),480<=b)){var e=g.actions.get("zoomIn"),f=g.actions.get("zoomOut"),l=g.actions.get("resetView");
+d([c("",function(){h.popupMenuHandler.hideMenu();var a=h.view.scale,b=h.view.translate.x,c=h.view.translate.y;g.actions.get("resetView").funct();1E-5>Math.abs(a-h.view.scale)&&b==h.view.translate.x&&c==h.view.translate.y&&g.actions.get(h.pageVisible?"fitPage":"fitWindow").funct()},!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",l,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMyA1djRoMlY1aDRWM0g1Yy0xLjEgMC0yIC45LTIgMnptMiAxMEgzdjRjMCAxLjEuOSAyIDIgMmg0di0ySDV2LTR6bTE0IDRoLTR2Mmg0YzEuMSAwIDItLjkgMi0ydi00aC0ydjR6bTAtMTZoLTR2Mmg0djRoMlY1YzAtMS4xLS45LTItMi0yeiIvPjwvc3ZnPg=="),
640<=b?c("",e.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",e,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHptMi41LTRoLTJ2Mkg5di0ySDdWOWgyVjdoMXYyaDJ2MXoiLz48L3N2Zz4="):
null,640<=b?c("",f.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",f,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHpNNyA5aDV2MUg3eiIvPjwvc3ZnPg=="):
null],60)}e=g.menus.get("language");null!=e&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&540<=b?(null==M&&(f=n.addMenu("",e.funct),f.setAttribute("title",mxResources.get("language")),f.className="geToolbarButton",f.style.backgroundImage="url("+Editor.globeImage+")",f.style.backgroundPosition="center center",f.style.backgroundRepeat="no-repeat",f.style.backgroundSize="24px 24px",f.style.position="absolute",f.style.height="24px",f.style.width="24px",f.style.zIndex="1",f.style.top="11px",f.style.right=
-"14px",f.style.cursor="pointer",l.appendChild(f),M=f),g.buttonContainer.style.right="40px"):g.buttonContainer.style.right="14px"}u.apply(this,arguments);var f=document.createElement("div");f.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";f.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(f);var g=this,h=g.editor.graph;g.toolbar=this.createToolbar(g.createDiv("geToolbar"));g.defaultLibraryName=
-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 m=null,n=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 p=g.descriptorChanged;g.descriptorChanged=function(){p.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,q=document.createElement("div");q.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 E=n.addMenu("100%",t.funct);E.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");E.style.whiteSpace="nowrap";E.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";E.style.backgroundPosition="right 6px center";
+"14px",f.style.cursor="pointer",k.appendChild(f),M=f),g.buttonContainer.style.right="40px"):g.buttonContainer.style.right="14px"}u.apply(this,arguments);var f=document.createElement("div");f.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";f.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(f);var g=this,h=g.editor.graph;g.toolbar=this.createToolbar(g.createDiv("geToolbar"));g.defaultLibraryName=
+mxResources.get("untitledLibrary");var k=document.createElement("div");k.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 m=null,n=new Menubar(g,k);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);k.setAttribute("title",a.getTitle()+(null!=b?" ("+b+")":""))}else k.removeAttribute("title")};
+g.setStatusText(g.editor.getStatus());k.appendChild(g.statusContainer);g.buttonContainer=document.createElement("div");g.buttonContainer.style.cssText="position:absolute;right:40px;top:12px;white-space:nowrap;";k.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,p=document.createElement("div");p.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 E=n.addMenu("100%",t.funct);E.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");E.style.whiteSpace="nowrap";E.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";E.style.backgroundPosition="right 6px center";
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";q.appendChild(E);t=mxUtils.bind(this,function(){E.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&&(E.style.visibility=this.tabContainer.style.visibility,
-this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility?"30px":"0px")}}q.appendChild(g.tabContainer);q.appendChild(l);q.appendChild(g.diagramContainer);f.appendChild(q);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,h,m){var e=c.y,g=c.x,d=!1,f=!1;if(null!=this.states&&null!=b&&null!=c){var l=this,q=new mxCellState,t=this.graph.getView().scale,u=Math.max(2,this.getGuideTolerance()/2);q.x=b.x+g;q.y=b.y+e;q.width=b.width;q.height=b.height;for(var w=[],y=[],k=0;k<this.states.length;k++){var v=this.states[k];v instanceof mxCellState&&(m||!this.graph.isCellSelected(v.cell))&&((q.x>=v.x&&q.x<=v.x+v.width||v.x>=q.x&&v.x<=q.x+q.width)&&(q.y>
-v.y+v.height+4||q.y+q.height+4<v.y)?w.push(v):(q.y>=v.y&&q.y<=v.y+v.height||v.y>=q.y&&v.y<=q.y+q.height)&&(q.x>v.x+v.width+4||q.x+q.width+4<v.x)&&y.push(v))}var z=0,C=0,B=v=0,x=0,G=0,D=0,F=0,H=5*t;if(1<w.length){w.push(q);w.sort(function(a,b){return a.y-b.y});var A=!1,k=q==w[0],t=q==w[w.length-1];if(!k&&!t)for(k=1;k<w.length-1;k++)if(q==w[k]){t=w[k-1];k=w[k+1];v=C=B=(k.y-t.y-t.height-q.height)/2;break}for(k=0;k<w.length-1;k++){var t=w[k],E=w[k+1],I=q==t||q==E,E=E.y-t.y-t.height,A=A|q==t;if(0==C&&
-0==z)C=E,z=1;else if(Math.abs(C-E)<=(I||1==k&&A?u:0))z+=1;else if(1<z&&A){w=w.slice(0,k+1);break}else if(3<=w.length-k&&!A)z=0,v=C=0!=B?B:0,w.splice(0,0==k?1:k),k=-1;else break;0!=v||I||(C=v=E)}3==w.length&&w[1]==q&&(v=0)}if(1<y.length){y.push(q);y.sort(function(a,b){return a.x-b.x});A=!1;k=q==y[0];t=q==y[y.length-1];if(!k&&!t)for(k=1;k<y.length-1;k++)if(q==y[k]){t=y[k-1];k=y[k+1];D=G=F=(k.x-t.x-t.width-q.width)/2;break}for(k=0;k<y.length-1;k++){t=y[k];E=y[k+1];I=q==t||q==E;E=E.x-t.x-t.width;A|=q==
-t;if(0==G&&0==x)G=E,x=1;else if(Math.abs(G-E)<=(I||1==k&&A?u:0))x+=1;else if(1<x&&A){y=y.slice(0,k+1);break}else if(3<=y.length-k&&!A)x=0,D=G=0!=F?F:0,y.splice(0,0==k?1:k),k=-1;else break;0!=D||I||(G=D=E)}3==y.length&&y[1]==q&&(D=0)}u=function(a,b,c,d){var e=[],f;d?(d=H,f=0):(d=0,f=H);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(l.graph.getView().getOverlayPane());return a};G=function(a,b){if(a&&null!=l.guidesArrHor)for(var c=0;c<l.guidesArrHor.length;c++)l.guidesArrHor[c].node.style.visibility="hidden";if(b&&null!=l.guidesArrVer)for(c=0;c<l.guidesArrVer.length;c++)l.guidesArrVer[c].node.style.visibility="hidden"};if(1<x&&x==y.length-1){x=[];F=l.guidesArrHor;d=[];g=0;k=y[0]==q?1:0;A=y[k].y+y[k].height;if(0<D)for(k=0;k<y.length-1;k++)t=
-y[k],E=y[k+1],q==t?(g=E.x-t.width-D,d.push(new mxPoint(g+t.width+H,A)),d.push(new mxPoint(E.x-H,A))):q==E?(d.push(new mxPoint(t.x+t.width+H,A)),g=t.x+t.width+D,d.push(new mxPoint(g-H,A))):(d.push(new mxPoint(t.x+t.width+H,A)),d.push(new mxPoint(E.x-H,A)));else t=y[0],k=y[2],g=t.x+t.width+(k.x-t.x-t.width-q.width)/2,d.push(new mxPoint(t.x+t.width+H,A)),d.push(new mxPoint(g-H,A)),d.push(new mxPoint(g+q.width+H,A)),d.push(new mxPoint(k.x-H,A));for(k=0;k<d.length;k+=2)y=d[k],D=d[k+1],y=u(y,D,null!=F?
-F[k/2]:null),y.node.style.visibility="visible",y.redraw(),x.push(y);for(k=d.length/2;null!=F&&k<F.length;k++)F[k].destroy();l.guidesArrHor=x;g-=b.x;d=!0}else G(!0);if(1<z&&z==w.length-1){x=[];F=l.guidesArrVer;f=[];e=0;k=w[0]==q?1:0;z=w[k].x+w[k].width;if(0<v)for(k=0;k<w.length-1;k++)t=w[k],E=w[k+1],q==t?(e=E.y-t.height-v,f.push(new mxPoint(z,e+t.height+H)),f.push(new mxPoint(z,E.y-H))):q==E?(f.push(new mxPoint(z,t.y+t.height+H)),e=t.y+t.height+v,f.push(new mxPoint(z,e-H))):(f.push(new mxPoint(z,t.y+
-t.height+H)),f.push(new mxPoint(z,E.y-H)));else t=w[0],k=w[2],e=t.y+t.height+(k.y-t.y-t.height-q.height)/2,f.push(new mxPoint(z,t.y+t.height+H)),f.push(new mxPoint(z,e-H)),f.push(new mxPoint(z,e+q.height+H)),f.push(new mxPoint(z,k.y-H));for(k=0;k<f.length;k+=2)y=f[k],D=f[k+1],y=u(y,D,null!=F?F[k/2]:null,!0),y.node.style.visibility="visible",y.redraw(),x.push(y);for(k=f.length/2;null!=F&&k<F.length;k++)F[k].destroy();l.guidesArrVer=x;e-=b.y;f=!0}else G(!1,!0)}if(d||f)return q=new mxPoint(g,e),w=a.call(this,
-b,q,h,m),d&&!f?q.y=w.y:f&&!d&&(q.x=w.x),w.y!=q.y&&null!=this.guideY&&null!=this.guideY.node&&(this.guideY.node.style.visibility="hidden"),w.x!=q.x&&null!=this.guideX&&null!=this.guideX.node&&(this.guideX.node.style.visibility="hidden"),q;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,e=this.guidesArrHor;if(null!=b)for(var m=0;m<b.length;m++)b[m].node.style.visibility=a?"visible":"hidden";if(null!=
+E.style.height=parseInt(g.tabContainer.style.height)-1+"px";E.style.lineHeight=parseInt(g.tabContainer.style.height)+1+"px";p.appendChild(E);t=mxUtils.bind(this,function(){E.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&&(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,h,m){var e=c.y,g=c.x,d=!1,f=!1;if(null!=this.states&&null!=b&&null!=c){var k=this,p=new mxCellState,t=this.graph.getView().scale,u=Math.max(2,this.getGuideTolerance()/2);p.x=b.x+g;p.y=b.y+e;p.width=b.width;p.height=b.height;for(var w=[],y=[],l=0;l<this.states.length;l++){var v=this.states[l];v instanceof mxCellState&&(m||!this.graph.isCellSelected(v.cell))&&((p.x>=v.x&&p.x<=v.x+v.width||v.x>=p.x&&v.x<=p.x+p.width)&&(p.y>
+v.y+v.height+4||p.y+p.height+4<v.y)?w.push(v):(p.y>=v.y&&p.y<=v.y+v.height||v.y>=p.y&&v.y<=p.y+p.height)&&(p.x>v.x+v.width+4||p.x+p.width+4<v.x)&&y.push(v))}var z=0,D=0,B=v=0,x=0,G=0,C=0,F=0,H=5*t;if(1<w.length){w.push(p);w.sort(function(a,b){return a.y-b.y});var A=!1,l=p==w[0],t=p==w[w.length-1];if(!l&&!t)for(l=1;l<w.length-1;l++)if(p==w[l]){t=w[l-1];l=w[l+1];v=D=B=(l.y-t.y-t.height-p.height)/2;break}for(l=0;l<w.length-1;l++){var t=w[l],E=w[l+1],I=p==t||p==E,E=E.y-t.y-t.height,A=A|p==t;if(0==D&&
+0==z)D=E,z=1;else if(Math.abs(D-E)<=(I||1==l&&A?u:0))z+=1;else if(1<z&&A){w=w.slice(0,l+1);break}else if(3<=w.length-l&&!A)z=0,v=D=0!=B?B:0,w.splice(0,0==l?1:l),l=-1;else break;0!=v||I||(D=v=E)}3==w.length&&w[1]==p&&(v=0)}if(1<y.length){y.push(p);y.sort(function(a,b){return a.x-b.x});A=!1;l=p==y[0];t=p==y[y.length-1];if(!l&&!t)for(l=1;l<y.length-1;l++)if(p==y[l]){t=y[l-1];l=y[l+1];C=G=F=(l.x-t.x-t.width-p.width)/2;break}for(l=0;l<y.length-1;l++){t=y[l];E=y[l+1];I=p==t||p==E;E=E.x-t.x-t.width;A|=p==
+t;if(0==G&&0==x)G=E,x=1;else if(Math.abs(G-E)<=(I||1==l&&A?u:0))x+=1;else if(1<x&&A){y=y.slice(0,l+1);break}else if(3<=y.length-l&&!A)x=0,C=G=0!=F?F:0,y.splice(0,0==l?1:l),l=-1;else break;0!=C||I||(G=C=E)}3==y.length&&y[1]==p&&(C=0)}u=function(a,b,c,d){var e=[],f;d?(d=H,f=0):(d=0,f=H);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(k.graph.getView().getOverlayPane());return a};G=function(a,b){if(a&&null!=k.guidesArrHor)for(var c=0;c<k.guidesArrHor.length;c++)k.guidesArrHor[c].node.style.visibility="hidden";if(b&&null!=k.guidesArrVer)for(c=0;c<k.guidesArrVer.length;c++)k.guidesArrVer[c].node.style.visibility="hidden"};if(1<x&&x==y.length-1){x=[];F=k.guidesArrHor;d=[];g=0;l=y[0]==p?1:0;A=y[l].y+y[l].height;if(0<C)for(l=0;l<y.length-1;l++)t=
+y[l],E=y[l+1],p==t?(g=E.x-t.width-C,d.push(new mxPoint(g+t.width+H,A)),d.push(new mxPoint(E.x-H,A))):p==E?(d.push(new mxPoint(t.x+t.width+H,A)),g=t.x+t.width+C,d.push(new mxPoint(g-H,A))):(d.push(new mxPoint(t.x+t.width+H,A)),d.push(new mxPoint(E.x-H,A)));else t=y[0],l=y[2],g=t.x+t.width+(l.x-t.x-t.width-p.width)/2,d.push(new mxPoint(t.x+t.width+H,A)),d.push(new mxPoint(g-H,A)),d.push(new mxPoint(g+p.width+H,A)),d.push(new mxPoint(l.x-H,A));for(l=0;l<d.length;l+=2)y=d[l],C=d[l+1],y=u(y,C,null!=F?
+F[l/2]:null),y.node.style.visibility="visible",y.redraw(),x.push(y);for(l=d.length/2;null!=F&&l<F.length;l++)F[l].destroy();k.guidesArrHor=x;g-=b.x;d=!0}else G(!0);if(1<z&&z==w.length-1){x=[];F=k.guidesArrVer;f=[];e=0;l=w[0]==p?1:0;z=w[l].x+w[l].width;if(0<v)for(l=0;l<w.length-1;l++)t=w[l],E=w[l+1],p==t?(e=E.y-t.height-v,f.push(new mxPoint(z,e+t.height+H)),f.push(new mxPoint(z,E.y-H))):p==E?(f.push(new mxPoint(z,t.y+t.height+H)),e=t.y+t.height+v,f.push(new mxPoint(z,e-H))):(f.push(new mxPoint(z,t.y+
+t.height+H)),f.push(new mxPoint(z,E.y-H)));else t=w[0],l=w[2],e=t.y+t.height+(l.y-t.y-t.height-p.height)/2,f.push(new mxPoint(z,t.y+t.height+H)),f.push(new mxPoint(z,e-H)),f.push(new mxPoint(z,e+p.height+H)),f.push(new mxPoint(z,l.y-H));for(l=0;l<f.length;l+=2)y=f[l],C=f[l+1],y=u(y,C,null!=F?F[l/2]:null,!0),y.node.style.visibility="visible",y.redraw(),x.push(y);for(l=f.length/2;null!=F&&l<F.length;l++)F[l].destroy();k.guidesArrVer=x;e-=b.y;f=!0}else G(!1,!0)}if(d||f)return p=new mxPoint(g,e),w=a.call(this,
+b,p,h,m),d&&!f?p.y=w.y:f&&!d&&(p.x=w.x),w.y!=p.y&&null!=this.guideY&&null!=this.guideY.node&&(this.guideY.node.style.visibility="hidden"),w.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,e=this.guidesArrHor;if(null!=b)for(var m=0;m<b.length;m++)b[m].node.style.visibility=a?"visible":"hidden";if(null!=
e)for(m=0;m<e.length;m++)e[m].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 h=0;h<a.length;h++)a[h].destroy();this.guidesArrVer=null}if(null!=c){for(h=0;h<c.length;h++)c[h].destroy();this.guidesArrHor=null}}})();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;
LucidImporter={};
diff --git a/src/main/webapp/js/diagramly/DrawioFile.js b/src/main/webapp/js/diagramly/DrawioFile.js
index 3edc9536..94d48521 100644
--- a/src/main/webapp/js/diagramly/DrawioFile.js
+++ b/src/main/webapp/js/diagramly/DrawioFile.js
@@ -1358,16 +1358,30 @@ DrawioFile.prototype.redirectToNewApp = function(error)
var redirect = mxUtils.bind(this, function()
{
- this.ui.spinner.spin(document.body, mxResources.get('loading'));
- this.redirectDialogShowing = false;
+ var fn = mxUtils.bind(this, function()
+ {
+ this.redirectDialogShowing = false;
+
+ if (window.location.href == url)
+ {
+ window.location.reload();
+ }
+ else
+ {
+ window.location.href = url;
+ }
+ });
- if (window.location.href == url)
+ if (this.isModified())
{
- window.location.reload();
+ this.ui.confirm(mxResources.get('allChangesLost'), mxUtils.bind(this, function()
+ {
+ this.redirectDialogShowing = false;
+ }), fn, mxResources.get('cancel'), mxResources.get('discardChanges'));
}
else
{
- window.location.href = url;
+ fn();
}
});
@@ -1574,25 +1588,47 @@ DrawioFile.prototype.fileChanged = function()
*/
DrawioFile.prototype.fileSaved = function(savedData, lastDesc, success, error)
{
- this.inConflictState = false;
- this.invalidChecksum = false;
- this.checkPages();
-
- if (this.sync == null)
+ try
{
- this.shadowData = savedData;
- this.shadowPages = null;
+ this.inConflictState = false;
+ this.invalidChecksum = false;
+ this.checkPages();
- if (success != null)
+ if (this.sync == null)
{
- success();
+ this.shadowData = savedData;
+ this.shadowPages = null;
+
+ if (success != null)
+ {
+ success();
+ }
+ }
+ else
+ {
+ this.sync.fileSaved(this.ui.getPagesForNode(
+ mxUtils.parseXml(savedData).documentElement),
+ lastDesc, success, error);
}
}
- else
+ catch (e)
{
- this.sync.fileSaved(this.ui.getPagesForNode(
- mxUtils.parseXml(savedData).documentElement),
- lastDesc, success, error);
+ this.inConflictState = true;
+ this.invalidChecksum = true;
+
+ if (error != null)
+ {
+ error(e);
+ }
+
+ try
+ {
+ this.sendErrorReport('Error in fileSaved', null, e);
+ }
+ catch (e2)
+ {
+ // ignore
+ }
}
};
diff --git a/src/main/webapp/js/diagramly/DrawioFileSync.js b/src/main/webapp/js/diagramly/DrawioFileSync.js
index cdf3871e..0811cc6d 100644
--- a/src/main/webapp/js/diagramly/DrawioFileSync.js
+++ b/src/main/webapp/js/diagramly/DrawioFileSync.js
@@ -18,7 +18,7 @@ DrawioFileSync = function(file)
{
this.updateOnlineState();
- if (this.channelId != null && this.isConnected())
+ if (this.isConnected())
{
this.fileChangedNotify();
}
@@ -31,14 +31,14 @@ DrawioFileSync = function(file)
{
if (document.visibilityState == 'hidden')
{
- if (this.isConnected() && !this.paused)
+ if (this.isConnected())
{
this.stop();
}
}
- else if (this.channelId == null)
+ else
{
- this.start(this.paused);
+ this.start();
}
});
@@ -48,11 +48,7 @@ DrawioFileSync = function(file)
this.activityListener = mxUtils.bind(this, function(evt)
{
this.lastActivity = new Date();
-
- if (this.channelId == null)
- {
- this.start(this.paused);
- }
+ this.start();
});
mxEvent.addListener(document, (mxClient.IS_POINTER) ? 'pointermove' : 'mousemove', this.activityListener);
@@ -72,7 +68,7 @@ DrawioFileSync = function(file)
* be incremented if new messages are added or the format is changed.
* This must be numeric to compare older vs newer protocol versions.
*/
-DrawioFileSync.PROTOCOL = 2;
+DrawioFileSync.PROTOCOL = 3;
//Extends mxEventSource
mxUtils.extend(DrawioFileSync, mxEventSource);
@@ -125,12 +121,7 @@ DrawioFileSync.prototype.maxCacheReadyRetries = 2;
/**
* Specifies if descriptor change events should be ignored.
*/
-DrawioFileSync.prototype.cacheReadyDelay = 600;
-
-/**
- * Specifies if notifications should be sent and received for changes.
- */
-DrawioFileSync.prototype.paused = false;
+DrawioFileSync.prototype.cacheReadyDelay = 500;
/**
* Inactivity timeout is 1 hour.
@@ -145,59 +136,56 @@ DrawioFileSync.prototype.lastActivity = null;
/**
* Adds all listeners.
*/
-DrawioFileSync.prototype.start = function(resumed)
+DrawioFileSync.prototype.start = function()
{
- if (document.visibilityState != 'hidden')
+ if (this.channelId == null)
{
- this.lastModified = this.file.getLastModifiedDate();
this.channelId = this.file.getChannelId();
+ }
+
+ if (this.key == null)
+ {
+ this.key = this.file.getChannelKey();
+ }
+
+ if (this.pusher == null && this.channelId != null &&
+ document.visibilityState != 'hidden')
+ {
+ this.pusher = this.ui.getPusher();
- if (this.channelId != null)
+ if (this.pusher != null)
{
- this.pusher = this.ui.getPusher();
-
- if (this.pusher != null)
+ try
{
- try
+ // Error listener must be installed before trying to create channel
+ this.pusherErrorListener = mxUtils.bind(this, function(err)
{
- // Error listener must be installed before trying to create channel
- this.pusherErrorListener = mxUtils.bind(this, function(err)
+ if (err.error != null && err.error.data != null &&
+ err.error.data.code === 4004)
{
- if (err.error != null && err.error.data != null &&
- err.error.data.code === 4004)
- {
- EditorUi.logError('Error: Pusher Limit', null, this.file.getId());
- }
- });
-
- this.pusher.connection.bind('error', this.pusherErrorListener);
- }
- catch (e)
- {
- // ignore
- }
+ EditorUi.logError('Error: Pusher Limit', null, this.file.getId());
+ }
+ });
+
+ this.pusher.connection.bind('error', this.pusherErrorListener);
+ }
+ catch (e)
+ {
+ // ignore
+ }
+
+ try
+ {
+ this.pusher.connect();
+ this.channel = this.pusher.subscribe(this.channelId);
+
+ EditorUi.debug('Sync.start', [this]);
- try
+ if (this.file.stats.start == null)
{
- this.pusher.connect();
- this.channel = this.pusher.subscribe(this.channelId);
- this.key = this.file.getChannelKey();
- this.lastActivity = new Date();
- this.paused = false;
-
- if (resumed)
- {
- this.fileChangedNotify();
- }
-
- if (this.file.stats.start == null)
- {
- this.file.stats.start = new Date().toISOString();
- }
-
- EditorUi.debug('Sync.start', [this], resumed);
-
- if (!this.ui.isOffline() && !resumed)
+ this.file.stats.start = new Date().toISOString();
+
+ if (!this.ui.isOffline())
{
var user = this.file.getCurrentUser();
var uid = (user != null) ? this.ui.hashValue(user.id) : 'unknown';
@@ -211,21 +199,23 @@ DrawioFileSync.prototype.start = function(resumed)
label: this.file.stats.start});
}
}
- catch (e)
- {
- // ignore
- }
}
-
- this.installListeners();
-
- window.setTimeout(mxUtils.bind(this, function()
+ catch (e)
{
- this.resetUpdateStatusThread();
- this.updateOnlineState();
- this.updateStatus();
- }, 0));
+ // ignore
+ }
+
+ this.installListeners();
}
+
+ window.setTimeout(mxUtils.bind(this, function()
+ {
+ this.lastModified = this.file.getLastModifiedDate();
+ this.lastActivity = new Date();
+ this.resetUpdateStatusThread();
+ this.updateOnlineState();
+ this.updateStatus();
+ }, 0));
}
};
@@ -359,7 +349,7 @@ DrawioFileSync.prototype.updateOnlineState = function()
*/
DrawioFileSync.prototype.updateStatus = function()
{
- if (!this.paused && this.isConnected() && this.lastActivity != null &&
+ if (this.isConnected() && this.lastActivity != null &&
(new Date().getTime() - this.lastActivity.getTime()) / 1000 >
this.inactivityTimeoutSeconds)
{
@@ -473,9 +463,6 @@ DrawioFileSync.prototype.resetUpdateStatusThread = function()
*/
DrawioFileSync.prototype.installListeners = function()
{
- // Ignores old messages
- var lastModifiedDate = null;
-
if (this.pusher != null)
{
// Listens to remote model changes
@@ -484,22 +471,28 @@ DrawioFileSync.prototype.installListeners = function()
this.updateOnlineState();
this.updateStatus();
- if (this.isConnected() && !this.announced)
+ if (this.isConnected())
{
- var user = this.file.getCurrentUser();
- var join = {a: 'join'};
-
- if (user != null)
+ if (!this.announced)
{
- join.name = user.displayName;
- join.uid = user.id;
+ var user = this.file.getCurrentUser();
+ var join = {a: 'join'};
+
+ if (user != null)
+ {
+ join.name = user.displayName;
+ join.uid = user.id;
+ }
+
+ mxUtils.post(this.cacheUrl, this.getIdParameters() +
+ '&msg=' + encodeURIComponent(this.objectToString(
+ this.createMessage(join))));
+ this.file.stats.msgSent++;
+ this.announced = true;
}
- mxUtils.post(this.cacheUrl, this.getIdParameters() +
- '&msg=' + encodeURIComponent(this.objectToString(
- this.createMessage(join))));
- this.announced = true;
- this.file.stats.msgSent++;
+ // Catchup on any lost edits
+ this.fileChangedNotify();
}
});
@@ -527,7 +520,10 @@ DrawioFileSync.prototype.installListeners = function()
// Handles protocol mismatch
if (msg.v > DrawioFileSync.PROTOCOL)
{
- this.file.redirectToNewApp();
+ this.file.redirectToNewApp(mxUtils.bind(this, function()
+ {
+ // Callback adds cancel option
+ }));
}
else if (msg.v === DrawioFileSync.PROTOCOL && msg.d != null)
{
@@ -675,12 +671,7 @@ DrawioFileSync.prototype.updateDescriptor = function(desc)
{
this.file.setDescriptor(desc);
this.file.descriptorChanged();
-
- if (this.channelId == null)
- {
- // Checks channel ID and starts sync
- this.start();
- }
+ this.start();
};
/**
@@ -702,6 +693,7 @@ DrawioFileSync.prototype.catchup = function(etag, secret, success, error, abort)
// Cache entry may not have been uploaded to cache before new
// etag is visible to client so retry once after cache miss
var cacheReadyRetryCount = 0;
+ var failed = false;
var doCatchup = mxUtils.bind(this, function()
{
@@ -751,7 +743,7 @@ DrawioFileSync.prototype.catchup = function(etag, secret, success, error, abort)
if (value.v > DrawioFileSync.PROTOCOL)
{
- this.file.redirectToNewApp(error);
+ failed = true;
temp = [];
break;
}
@@ -769,6 +761,7 @@ DrawioFileSync.prototype.catchup = function(etag, secret, success, error, abort)
}
else
{
+ failed = true;
temp = [];
break;
}
@@ -795,10 +788,10 @@ DrawioFileSync.prototype.catchup = function(etag, secret, success, error, abort)
}
// Retries if cache entry was not yet there
else if (cacheReadyRetryCount <= this.maxCacheReadyRetries &&
- req.getStatus() != 401)
+ !failed && req.getStatus() != 401)
{
cacheReadyRetryCount++;
- window.setTimeout(doCatchup, this.cacheReadyDelay);
+ window.setTimeout(doCatchup, (cacheReadyRetryCount + 1) * this.cacheReadyDelay);
}
else
{
@@ -829,14 +822,9 @@ DrawioFileSync.prototype.reload = function(success, error, abort)
{
this.file.updateFile(mxUtils.bind(this, function()
{
- if (this.channelId == null)
- {
- // Checks channel ID and starts sync
- this.start();
- }
-
this.lastModified = this.file.getLastModifiedDate();
this.updateStatus();
+ this.start();
if (success != null)
{
@@ -889,7 +877,7 @@ DrawioFileSync.prototype.merge = function(patches, checksum, etag, success, erro
'from', this.file.getCurrentEtag(), 'to', etag,
'backup', this.file.backupPatch,
'attempt', this.catchupRetryCount,
- 'details', details,
+ 'details', details, currentDetails,
'patches', patches,
'checksum', checksum == current, checksum);
}
@@ -957,7 +945,7 @@ DrawioFileSync.prototype.descriptorChanged = function(etag)
{
this.lastModified = this.file.getLastModifiedDate();
- if (this.isConnected())
+ if (this.channelId != null)
{
var msg = this.objectToString(this.createMessage({a: 'desc',
m: this.lastModified.getTime()}));
@@ -1014,67 +1002,52 @@ DrawioFileSync.prototype.fileSaved = function(pages, lastDesc, success, error)
this.resetUpdateStatusThread();
this.catchupRetryCount = 0;
- if (this.isConnected() && !this.file.inConflictState && !this.redirectDialogShowing)
+ if (!this.ui.isOffline() && !this.file.inConflictState && !this.redirectDialogShowing)
{
- // Computes diff and checksum
- var shadow = (this.file.shadowPages != null) ?
- this.file.shadowPages : this.ui.getPagesForNode(
- mxUtils.parseXml(this.file.shadowData).documentElement)
- var details = {v: EditorUi.VERSION, t: new Date().toISOString(), ua: navigator.userAgent};
- var checksum = this.ui.getHashValueForPages(pages, details);
- var diff = this.ui.diffPages(shadow, pages);
-
- // Data is stored in cache and message is sent to all listeners
- var data = this.objectToString(this.createMessage({patch: diff, checksum: checksum, details: details}));
- var msg = this.objectToString(this.createMessage({m: this.lastModified.getTime()}));
- var secret = this.file.getDescriptorSecret(this.file.getDescriptor());
- var etag = this.file.getDescriptorEtag(lastDesc);
- var current = this.file.getCurrentEtag();
- this.file.shadowPages = pages;
-
- mxUtils.post(this.cacheUrl, this.getIdParameters() +
- '&from=' + encodeURIComponent(etag) + '&to=' + encodeURIComponent(current) +
- '&msg=' + encodeURIComponent(msg) + ((secret != null) ? '&secret=' + encodeURIComponent(secret) : '') +
- ((data.length < this.maxCacheEntrySize) ? '&data=' + encodeURIComponent(data) : ''),
- mxUtils.bind(this, function(req)
+ this.start();
+
+ if (this.channelId != null)
{
- if (req.getStatus() >= 200 && req.getStatus() <= 299)
+ // Computes diff and checksum
+ var shadow = (this.file.shadowPages != null) ?
+ this.file.shadowPages : this.ui.getPagesForNode(
+ mxUtils.parseXml(this.file.shadowData).documentElement)
+ var details = {v: EditorUi.VERSION, t: new Date().toISOString(), ua: navigator.userAgent};
+ var checksum = this.ui.getHashValueForPages(pages, details);
+ var diff = this.ui.diffPages(shadow, pages);
+
+ // Data is stored in cache and message is sent to all listeners
+ var data = this.objectToString(this.createMessage({patch: diff, checksum: checksum, details: details}));
+ var msg = this.objectToString(this.createMessage({m: this.lastModified.getTime()}));
+ var secret = this.file.getDescriptorSecret(this.file.getDescriptor());
+ var etag = this.file.getDescriptorEtag(lastDesc);
+ var current = this.file.getCurrentEtag();
+ this.file.stats.bytesSent += data.length;
+ this.file.stats.msgSent++;
+
+ mxUtils.post(this.cacheUrl, this.getIdParameters() +
+ '&from=' + encodeURIComponent(etag) + '&to=' + encodeURIComponent(current) +
+ '&msg=' + encodeURIComponent(msg) + ((secret != null) ? '&secret=' + encodeURIComponent(secret) : '') +
+ ((data.length < this.maxCacheEntrySize) ? '&data=' + encodeURIComponent(data) : ''),
+ mxUtils.bind(this, function(req)
{
- if (success != null)
- {
- success();
- }
- }
- else if (error != null)
+ // Ignores response
+ }));
+
+ if (urlParams['test'] == '1')
{
- error({message: req.getStatus()});
+ EditorUi.debug('Sync.fileSaved', [this],
+ 'from', etag, 'to', current, data.length,
+ 'bytes', 'diff', diff, 'checksum', checksum);
}
- }));
-
- if (urlParams['test'] == '1')
- {
- EditorUi.debug('Sync.fileSaved', [this],
- 'from', etag, 'to', current, data.length,
- 'bytes', 'diff', diff, 'checksum', checksum);
}
-
- this.file.stats.bytesSent += data.length;
- this.file.stats.msgSent++;
}
- else
+
+ this.file.shadowPages = pages;
+
+ if (success != null)
{
- this.file.shadowPages = pages;
-
- if (this.channelId == null)
- {
- // Checks channel ID and starts sync
- this.start();
- }
-
- if (success != null)
- {
- success();
- }
+ success();
}
};
@@ -1140,49 +1113,47 @@ DrawioFileSync.prototype.fileConflict = function(desc, success, error)
*/
DrawioFileSync.prototype.stop = function()
{
- EditorUi.debug('Sync.stop', [this]);
-
- if (this.changeListener != null && this.channel != null)
- {
- this.channel.unbind('changed', this.changeListener);
- this.changeListener = null;
- }
-
- if (this.connectionListener != null)
+ if (this.pusher != null)
{
- if (this.pusher != null && this.pusher.connection != null)
+ EditorUi.debug('Sync.stop', [this]);
+
+ if (this.changeListener != null && this.channel != null)
{
- this.pusher.connection.unbind('state_change', this.connectionListener);
+ this.channel.unbind('changed', this.changeListener);
+ this.changeListener = null;
}
-
- this.connectionListener = null;
- }
-
- if (this.pusherErrorListener != null)
- {
- if (this.pusher != null && this.pusher.connection != null)
+
+ if (this.connectionListener != null)
+ {
+ if (this.pusher.connection != null)
+ {
+ this.pusher.connection.unbind('state_change', this.connectionListener);
+ }
+
+ this.connectionListener = null;
+ }
+
+ if (this.pusherErrorListener != null)
{
- this.pusher.connection.unbind('error', this.pusherErrorListener);
+ if (this.pusher.connection != null)
+ {
+ this.pusher.connection.unbind('error', this.pusherErrorListener);
+ }
+
+ this.pusherErrorListener = null;
}
-
- this.pusherErrorListener = null;
- }
-
- if (this.pusher != null && this.channel != null && this.channelId != null)
- {
- // See https://github.com/pusher/pusher-js/issues/75
- //this.pusher.unsubscribe(this.channelId);
- this.channel = null;
- }
- if (this.pusher != null)
- {
+ if (this.channel != null)
+ {
+ // See https://github.com/pusher/pusher-js/issues/75
+ // this.pusher.unsubscribe(this.channelId);
+ this.channel = null;
+ }
+
this.pusher.disconnect();
+ this.pusher = null;
}
- this.channelId = null;
- this.pusher = null;
- this.paused = true;
this.updateOnlineState();
this.updateStatus();
};
@@ -1192,7 +1163,7 @@ DrawioFileSync.prototype.stop = function()
*/
DrawioFileSync.prototype.destroy = function()
{
- if (this.isConnected())
+ if (this.channelId != null)
{
var user = this.file.getCurrentUser();
var leave = {a: 'leave'};
diff --git a/src/main/webapp/js/diagramly/EditorUi.js b/src/main/webapp/js/diagramly/EditorUi.js
index d8b6b0b0..cdbad74e 100644
--- a/src/main/webapp/js/diagramly/EditorUi.js
+++ b/src/main/webapp/js/diagramly/EditorUi.js
@@ -1022,7 +1022,7 @@
{
if (cellDiffs[cellId].value != null)
{
- cellDiffs[cellId].value = '[' +
+ cellDiffs[cellId].value = '[' +
cellDiffs[cellId].value.length + ']';
}
@@ -1034,8 +1034,8 @@
if (cellDiffs[cellId].geometry != null)
{
- cellDiffs[cellId].geometry = this.anonymizeString(
- cellDiffs[cellId].geometry);
+ cellDiffs[cellId].geometry = '[' +
+ cellDiffs[cellId].geometry.length + ']';
}
if (Object.keys(cellDiffs[cellId]).length == 0)
@@ -2408,7 +2408,20 @@
details.cellCount += model.getDescendants(model.root).length;
}
- hash = ((hash << 5) - hash + this.hashValue(diagram, null, details)) << 0;
+ hash = ((hash << 5) - hash + this.hashValue(diagram, function(obj, key, value, isXml)
+ {
+ // Ignores JS machine rounding errors in known numeric attributes
+ // eg. 412.33333333333326 (Webkit/FF) == 412.33333333333325 (Edge/IE11)
+ if (isXml && (obj.nodeName == 'mxGeometry' || obj.nodeName == 'mxPoint') &&
+ (key == 'x' || key == 'y' || key == 'width' || key == 'height'))
+ {
+ return Math.round(value);
+ }
+ else
+ {
+ return value;
+ }
+ }, details)) << 0;
}
return hash;
@@ -2428,7 +2441,7 @@
{
if (obj.nodeName != null)
{
- hash = hash ^ this.hashValue(obj.nodeName, replacer);
+ hash = hash ^ this.hashValue(obj.nodeName, replacer, details);
}
if (obj.attributes != null)
@@ -2441,7 +2454,7 @@
for (var i = 0; i < obj.attributes.length; i++)
{
var key = obj.attributes[i].name;
- var value = (replacer != null) ? replacer(obj, key, true) : obj.attributes[i].value;
+ var value = (replacer != null) ? replacer(obj, key, obj.attributes[i].value, true) : obj.attributes[i].value;
if (value != null)
{
@@ -2472,7 +2485,7 @@
for (var i = 0; i < str.length; i++)
{
- temp = ((temp << 5) - temp + str.charCodeAt(i)) << 0;
+ temp = ((temp << 5) - temp + str.charCodeAt(i)) << 0;
}
hash = hash ^ temp;
diff --git a/src/main/webapp/js/embed-static.min.js b/src/main/webapp/js/embed-static.min.js
index 0a15036a..27fea9ee 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.21",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.22",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/")||
diff --git a/src/main/webapp/js/reader.min.js b/src/main/webapp/js/reader.min.js
index df833350..fded4c61 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.21",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.22",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/")||
diff --git a/src/main/webapp/js/viewer.min.js b/src/main/webapp/js/viewer.min.js
index 93e09eb7..919220c3 100644
--- a/src/main/webapp/js/viewer.min.js
+++ b/src/main/webapp/js/viewer.min.js
@@ -2023,8 +2023,8 @@ l.appendChild(c);mxUtils.write(l,mxResources.get("gridSize")+":");var g=document
":");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&&
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,b){if(b||g!=document.activeElement&&n!=document.activeElement){a=!1;for(c=0;c<h.length;c++)b=h[c],C?"custom"==b.key&&(q.value=b.key,C=!1):null!=b.format&&("a4"==b.key?826==e.width?(e=mxRectangle.fromRectangle(e),e.width=827):826==e.height&&(e=mxRectangle.fromRectangle(e),e.height=827):"a5"==b.key&&(584==e.width?(e=mxRectangle.fromRectangle(e),e.width=583):584==e.height&&(e=mxRectangle.fromRectangle(e),e.height=583)),e.width==b.format.width&&
-e.height==b.format.height?(q.value=b.key,l.setAttribute("checked","checked"),l.defaultChecked=!0,l.checked=!0,p.removeAttribute("checked"),p.defaultChecked=!1,p.checked=!1,a=!0):e.width==b.format.height&&e.height==b.format.width&&(q.value=b.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"),
+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],C?"custom"==d.key&&(q.value=d.key,C=!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 C=!1;k();a.appendChild(q);mxUtils.br(a);
@@ -2036,20 +2036,20 @@ format:new mxRectangle(0,0,1654,2336)},{key:"a3",title:"A3 (297 mm x 420 mm)",fo
(function(){mxGraphView.prototype.validateBackgroundPage=function(){var a=this.graph;if(null!=a.container&&!a.transparentBackground){if(a.pageVisible){var b=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(b),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!mxClient.IS_QUIRKS,this.backgroundPageShape.dialect=
mxConstants.DIALECT_STRICTHTML,this.backgroundPageShape.init(a.container),c.style.position="absolute",a.container.insertBefore(this.backgroundPageShape.node,c),this.backgroundPageShape.redraw(),this.backgroundPageShape.node.className="geBackgroundPage",mxEvent.addListener(this.backgroundPageShape.node,"dblclick",mxUtils.bind(this,function(c){a.dblClick(c)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(c){a.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(c))}),
mxUtils.bind(this,function(c){null!=a.tooltipHandler&&a.tooltipHandler.isHideOnHover()&&a.tooltipHandler.hide();a.isMouseDown&&!mxEvent.isConsumed(c)&&a.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(c))}),mxUtils.bind(this,function(c){a.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(c))})))}else this.backgroundPageShape.scale=1,this.backgroundPageShape.bounds=b,this.backgroundPageShape.redraw()}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape=
-null);this.validateBackgroundStyles()}};mxGraphView.prototype.validateBackgroundStyles=function(){var a=this.graph,b=null==a.background||a.background==mxConstants.NONE?a.defaultPageBackgroundColor:a.background,c=null!=b&&this.gridColor!=b.toLowerCase()?this.gridColor:"#ffffff",f="none",d="";if(a.isGridEnabled()){d=10;mxClient.IS_SVG?(f=unescape(encodeURIComponent(this.createSvgGrid(c))),f=window.btoa?btoa(f):Base64.encode(f,!0),f="url(data:image/svg+xml;base64,"+f+")",d=a.gridSize*this.scale*this.gridSteps):
-f="url("+this.gridImage+")";var e=c=0;null!=a.view.backgroundPageShape&&(e=this.getBackgroundPageBounds(),c=1+e.x,e=1+e.y);d=-Math.round(d-mxUtils.mod(this.translate.x*this.scale-c,d))+"px "+-Math.round(d-mxUtils.mod(this.translate.y*this.scale-e,d))+"px"}c=a.view.canvas;null!=c.ownerSVGElement&&(c=c.ownerSVGElement);null!=a.view.backgroundPageShape?(a.view.backgroundPageShape.node.style.backgroundPosition=d,a.view.backgroundPageShape.node.style.backgroundImage=f,a.view.backgroundPageShape.node.style.backgroundColor=
-b,a.container.className="geDiagramContainer geDiagramBackdrop",c.style.backgroundImage="none",c.style.backgroundColor=""):(a.container.className="geDiagramContainer",c.style.backgroundPosition=d,c.style.backgroundColor=b,c.style.backgroundImage=f)};mxGraphView.prototype.createSvgGrid=function(a){for(var b=this.graph.gridSize*this.scale;b<this.minGridSize;)b*=2;for(var c=this.gridSteps*b,f=[],d=1;d<this.gridSteps;d++){var e=d*b;f.push("M 0 "+e+" L "+c+" "+e+" M "+e+" 0 L "+e+" "+c)}return'<svg width="'+
-c+'" height="'+c+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+c+'" height="'+c+'" patternUnits="userSpaceOnUse"><path d="'+f.join(" ")+'" fill="none" stroke="'+a+'" opacity="0.2" stroke-width="1"/><path d="M '+c+" 0 L 0 0 0 "+c+'" fill="none" stroke="'+a+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var a=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(b,d){a.apply(this,arguments);if(null!=this.shiftPreview1){var c=
-this.view.canvas;null!=c.ownerSVGElement&&(c=c.ownerSVGElement);var f=this.gridSize*this.view.scale*this.view.gridSteps,f=-Math.round(f-mxUtils.mod(this.view.translate.x*this.view.scale+b,f))+"px "+-Math.round(f-mxUtils.mod(this.view.translate.y*this.view.scale+d,f))+"px";c.style.backgroundPosition=f}};mxGraph.prototype.updatePageBreaks=function(a,b,c){var f=this.view.scale,d=this.view.translate,e=this.pageFormat,r=f*this.pageScale,h=this.view.getBackgroundPageBounds();b=h.width;c=h.height;var m=
-new mxRectangle(f*d.x,f*d.y,e.width*r,e.height*r),k=(a=a&&Math.min(m.width,m.height)>this.minPageBreakDist)?Math.ceil(c/m.height)-1:0,v=a?Math.ceil(b/m.width)-1:0,q=h.x+b,x=h.y+c;null==this.horizontalPageBreaks&&0<k&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<v&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var c=a==this.horizontalPageBreaks?k:v,b=0;b<=c;b++){var d=a==this.horizontalPageBreaks?[new mxPoint(Math.round(h.x),Math.round(h.y+(b+1)*m.height)),
-new mxPoint(Math.round(q),Math.round(h.y+(b+1)*m.height))]:[new mxPoint(Math.round(h.x+(b+1)*m.width),Math.round(h.y)),new mxPoint(Math.round(h.x+(b+1)*m.width),Math.round(x))];null!=a[b]?(a[b].points=d,a[b].redraw()):(d=new mxPolyline(d,this.pageBreakColor),d.dialect=this.dialect,d.isDashed=this.pageBreakDashed,d.pointerEvents=!1,d.init(this.view.backgroundPane),d.redraw(),a[b]=d)}for(b=c;b<a.length;b++)a[b].destroy();a.splice(c,a.length-c)}});a(this.horizontalPageBreaks);a(this.verticalPageBreaks)};
-var b=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(a,d,c){for(var f=0;f<d.length;f++)if(this.graph.getModel().isVertex(d[f])){var g=this.graph.getCellGeometry(d[f]);if(null!=g&&g.relative)return!1}return b.apply(this,arguments)};var e=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var a=e.apply(this,arguments);a.intersects=mxUtils.bind(this,function(b,c){return this.isConnecting()?
-!0:mxCellMarker.prototype.intersects.apply(a,arguments)});return a};mxGraphView.prototype.createBackgroundPageShape=function(a){return new mxRectangleShape(a,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var a=this.getGraphBounds(),b=0<a.width?a.x/this.scale-this.translate.x:0,c=0<a.height?a.y/this.scale-this.translate.y:0,d=this.graph.pageFormat,g=this.graph.pageScale,e=d.width*g,d=d.height*g,g=Math.floor(Math.min(0,b)/e),r=Math.floor(Math.min(0,
-c)/d);return new mxRectangle(this.scale*(this.translate.x+g*e),this.scale*(this.translate.y+r*d),this.scale*(Math.ceil(Math.max(1,b+a.width/this.scale)/e)-g)*e,this.scale*(Math.ceil(Math.max(1,c+a.height/this.scale)/d)-r)*d)};var d=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(a,b){d.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=
-a+"px",this.view.backgroundPageShape.node.style.marginTop=b+"px")};var k=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(a,b,c,d,g,e){var f=k.apply(this,arguments);null==e||e||mxEvent.addListener(f,"mousedown",function(a){mxEvent.consume(a)});return f};var l=mxGraphHandler.prototype.getInitialCellForEvent;mxGraphHandler.prototype.getInitialCellForEvent=function(a){var b=this.graph.getModel(),c=b.getParent(this.graph.getSelectionCell()),d=l.apply(this,arguments),g=b.getParent(d);
-if(null==c||c!=d&&c!=g)for(;!this.graph.isCellSelected(d)&&!this.graph.isCellSelected(g)&&b.isVertex(g)&&!this.graph.isContainer(g);)d=g,g=this.graph.getModel().getParent(d);return d};var p=mxGraphHandler.prototype.isDelayedSelection;mxGraphHandler.prototype.isDelayedSelection=function(a,b){var c=p.apply(this,arguments);if(!c)for(var d=this.graph.getModel(),g=d.getParent(a);null!=g;){if(this.graph.isCellSelected(g)&&d.isVertex(g)){c=!0;break}g=d.getParent(g)}return c};mxGraphHandler.prototype.selectDelayed=
-function(a){if(!this.graph.popupMenuHandler.isPopupTrigger(a)){var b=a.getCell();null==b&&(b=this.cell);var c=this.graph.view.getState(b);if(null==c||!a.isSource(c.control))for(var c=this.graph.getModel(),d=c.getParent(b);!this.graph.isCellSelected(d)&&c.isVertex(d);)b=d,d=c.getParent(b);this.graph.selectCellForEvent(b,a.getEvent())}};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(a){a=a.getCell();for(var b=this.graph.getModel(),c=b.getParent(a);b.isVertex(c)&&!this.graph.isContainer(c);)this.graph.isCellSelected(c)&&
-(a=c),c=b.getParent(c);return a}})();EditorUi=function(a,b,e){mxEventSource.call(this);this.destroyFunctions=[];this.editor=a||new Editor;this.container=b||document.body;var d=this.editor.graph;d.lightbox=e;d.useCssTransforms&&(this.lazyZoomDelay=0);mxClient.IS_SVG?mxPopupMenu.prototype.submenuImage="data:image/gif;base64,R0lGODlhCQAJAIAAAP///zMzMyH5BAEAAAAALAAAAAAJAAkAAAIPhI8WebHsHopSOVgb26AAADs=":(new Image).src=mxPopupMenu.prototype.submenuImage;mxClient.IS_SVG||null==mxConnectionHandler.prototype.connectImage||((new Image).src=mxConnectionHandler.prototype.connectImage.src);
+null);this.validateBackgroundStyles()}};mxGraphView.prototype.validateBackgroundStyles=function(){var a=this.graph,b=null==a.background||a.background==mxConstants.NONE?a.defaultPageBackgroundColor:a.background,c=null!=b&&this.gridColor!=b.toLowerCase()?this.gridColor:"#ffffff",d="none",g="";if(a.isGridEnabled()){g=10;mxClient.IS_SVG?(d=unescape(encodeURIComponent(this.createSvgGrid(c))),d=window.btoa?btoa(d):Base64.encode(d,!0),d="url(data:image/svg+xml;base64,"+d+")",g=a.gridSize*this.scale*this.gridSteps):
+d="url("+this.gridImage+")";var e=c=0;null!=a.view.backgroundPageShape&&(e=this.getBackgroundPageBounds(),c=1+e.x,e=1+e.y);g=-Math.round(g-mxUtils.mod(this.translate.x*this.scale-c,g))+"px "+-Math.round(g-mxUtils.mod(this.translate.y*this.scale-e,g))+"px"}c=a.view.canvas;null!=c.ownerSVGElement&&(c=c.ownerSVGElement);null!=a.view.backgroundPageShape?(a.view.backgroundPageShape.node.style.backgroundPosition=g,a.view.backgroundPageShape.node.style.backgroundImage=d,a.view.backgroundPageShape.node.style.backgroundColor=
+b,a.container.className="geDiagramContainer geDiagramBackdrop",c.style.backgroundImage="none",c.style.backgroundColor=""):(a.container.className="geDiagramContainer",c.style.backgroundPosition=g,c.style.backgroundColor=b,c.style.backgroundImage=d)};mxGraphView.prototype.createSvgGrid=function(a){for(var d=this.graph.gridSize*this.scale;d<this.minGridSize;)d*=2;for(var c=this.gridSteps*d,b=[],g=1;g<this.gridSteps;g++){var e=g*d;b.push("M 0 "+e+" L "+c+" "+e+" M "+e+" 0 L "+e+" "+c)}return'<svg width="'+
+c+'" height="'+c+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+c+'" height="'+c+'" patternUnits="userSpaceOnUse"><path d="'+b.join(" ")+'" fill="none" stroke="'+a+'" opacity="0.2" stroke-width="1"/><path d="M '+c+" 0 L 0 0 0 "+c+'" fill="none" stroke="'+a+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var a=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(d,b){a.apply(this,arguments);if(null!=this.shiftPreview1){var c=
+this.view.canvas;null!=c.ownerSVGElement&&(c=c.ownerSVGElement);var f=this.gridSize*this.view.scale*this.view.gridSteps,f=-Math.round(f-mxUtils.mod(this.view.translate.x*this.view.scale+d,f))+"px "+-Math.round(f-mxUtils.mod(this.view.translate.y*this.view.scale+b,f))+"px";c.style.backgroundPosition=f}};mxGraph.prototype.updatePageBreaks=function(a,d,c){var b=this.view.scale,g=this.view.translate,e=this.pageFormat,r=b*this.pageScale,h=this.view.getBackgroundPageBounds();d=h.width;c=h.height;var m=
+new mxRectangle(b*g.x,b*g.y,e.width*r,e.height*r),k=(a=a&&Math.min(m.width,m.height)>this.minPageBreakDist)?Math.ceil(c/m.height)-1:0,v=a?Math.ceil(d/m.width)-1:0,q=h.x+d,x=h.y+c;null==this.horizontalPageBreaks&&0<k&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<v&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var c=a==this.horizontalPageBreaks?k:v,d=0;d<=c;d++){var b=a==this.horizontalPageBreaks?[new mxPoint(Math.round(h.x),Math.round(h.y+(d+1)*m.height)),
+new mxPoint(Math.round(q),Math.round(h.y+(d+1)*m.height))]:[new mxPoint(Math.round(h.x+(d+1)*m.width),Math.round(h.y)),new mxPoint(Math.round(h.x+(d+1)*m.width),Math.round(x))];null!=a[d]?(a[d].points=b,a[d].redraw()):(b=new mxPolyline(b,this.pageBreakColor),b.dialect=this.dialect,b.isDashed=this.pageBreakDashed,b.pointerEvents=!1,b.init(this.view.backgroundPane),b.redraw(),a[d]=b)}for(d=c;d<a.length;d++)a[d].destroy();a.splice(c,a.length-c)}});a(this.horizontalPageBreaks);a(this.verticalPageBreaks)};
+var b=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(a,d,c){for(var f=0;f<d.length;f++)if(this.graph.getModel().isVertex(d[f])){var g=this.graph.getCellGeometry(d[f]);if(null!=g&&g.relative)return!1}return b.apply(this,arguments)};var e=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var a=e.apply(this,arguments);a.intersects=mxUtils.bind(this,function(d,c){return this.isConnecting()?
+!0:mxCellMarker.prototype.intersects.apply(a,arguments)});return a};mxGraphView.prototype.createBackgroundPageShape=function(a){return new mxRectangleShape(a,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var a=this.getGraphBounds(),d=0<a.width?a.x/this.scale-this.translate.x:0,c=0<a.height?a.y/this.scale-this.translate.y:0,b=this.graph.pageFormat,g=this.graph.pageScale,e=b.width*g,b=b.height*g,g=Math.floor(Math.min(0,d)/e),r=Math.floor(Math.min(0,
+c)/b);return new mxRectangle(this.scale*(this.translate.x+g*e),this.scale*(this.translate.y+r*b),this.scale*(Math.ceil(Math.max(1,d+a.width/this.scale)/e)-g)*e,this.scale*(Math.ceil(Math.max(1,c+a.height/this.scale)/b)-r)*b)};var d=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(a,b){d.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=
+a+"px",this.view.backgroundPageShape.node.style.marginTop=b+"px")};var k=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(a,d,c,b,g,e){var f=k.apply(this,arguments);null==e||e||mxEvent.addListener(f,"mousedown",function(a){mxEvent.consume(a)});return f};var l=mxGraphHandler.prototype.getInitialCellForEvent;mxGraphHandler.prototype.getInitialCellForEvent=function(a){var d=this.graph.getModel(),c=d.getParent(this.graph.getSelectionCell()),b=l.apply(this,arguments),g=d.getParent(b);
+if(null==c||c!=b&&c!=g)for(;!this.graph.isCellSelected(b)&&!this.graph.isCellSelected(g)&&d.isVertex(g)&&!this.graph.isContainer(g);)b=g,g=this.graph.getModel().getParent(b);return b};var p=mxGraphHandler.prototype.isDelayedSelection;mxGraphHandler.prototype.isDelayedSelection=function(a,d){var c=p.apply(this,arguments);if(!c)for(var b=this.graph.getModel(),g=b.getParent(a);null!=g;){if(this.graph.isCellSelected(g)&&b.isVertex(g)){c=!0;break}g=b.getParent(g)}return c};mxGraphHandler.prototype.selectDelayed=
+function(a){if(!this.graph.popupMenuHandler.isPopupTrigger(a)){var d=a.getCell();null==d&&(d=this.cell);var c=this.graph.view.getState(d);if(null==c||!a.isSource(c.control))for(var c=this.graph.getModel(),b=c.getParent(d);!this.graph.isCellSelected(b)&&c.isVertex(b);)d=b,b=c.getParent(d);this.graph.selectCellForEvent(d,a.getEvent())}};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(a){a=a.getCell();for(var d=this.graph.getModel(),c=d.getParent(a);d.isVertex(c)&&!this.graph.isContainer(c);)this.graph.isCellSelected(c)&&
+(a=c),c=d.getParent(c);return a}})();EditorUi=function(a,b,e){mxEventSource.call(this);this.destroyFunctions=[];this.editor=a||new Editor;this.container=b||document.body;var d=this.editor.graph;d.lightbox=e;d.useCssTransforms&&(this.lazyZoomDelay=0);mxClient.IS_SVG?mxPopupMenu.prototype.submenuImage="data:image/gif;base64,R0lGODlhCQAJAIAAAP///zMzMyH5BAEAAAAALAAAAAAJAAkAAAIPhI8WebHsHopSOVgb26AAADs=":(new Image).src=mxPopupMenu.prototype.submenuImage;mxClient.IS_SVG||null==mxConnectionHandler.prototype.connectImage||((new Image).src=mxConnectionHandler.prototype.connectImage.src);
this.editor.chromeless&&!this.editor.editable&&(this.footerHeight=0,d.isEnabled=function(){return!1},d.panningHandler.isForcePanningEvent=function(a){return!mxEvent.isPopupTrigger(a.getEvent())});this.actions=new Actions(this);this.menus=this.createMenus();this.createDivs();this.createUi();this.refresh();var k=mxUtils.bind(this,function(a){null==a&&(a=window.event);return this.isSelectionAllowed(a)||d.isEditing()});this.container==document.body&&(this.menubarContainer.onselectstart=k,this.menubarContainer.onmousedown=
k,this.toolbarContainer.onselectstart=k,this.toolbarContainer.onmousedown=k,this.diagramContainer.onselectstart=k,this.diagramContainer.onmousedown=k,this.sidebarContainer.onselectstart=k,this.sidebarContainer.onmousedown=k,this.formatContainer.onselectstart=k,this.formatContainer.onmousedown=k,this.footerContainer.onselectstart=k,this.footerContainer.onmousedown=k,null!=this.tabContainer&&(this.tabContainer.onselectstart=k));!this.editor.chromeless||this.editor.editable?(b=function(a){var c=mxEvent.getSource(a);
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();
@@ -2206,8 +2206,8 @@ this.getRubberband=function(){return g};var n=(new Date).getTime(),r=0,h=this.co
"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 C=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&
(C=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=C)}));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,e){e=null!=e?e:[];if(0<b||0<d){var g=this.getModel(),h=a+b,n=c+d;null==f&&(f=this.getCurrentRoot(),null==f&&(f=g.getRoot()));if(null!=f)for(var m=g.getChildCount(f),H=0;H<m;H++){var r=g.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));(g.isEdge(r)||g.isVertex(r))&&t.x>=a&&t.y+t.height<=n&&t.y>=c&&t.x+t.width<=h&&e.push(r);this.getAllCells(a,c,b,d,r,e)}}}return e};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.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 D=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,c){if("mouseDown"==c.getProperty("eventName")){var b=c.getProperty("event").getState();D=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!=D?this.addSelectionCells(D):1<this.getSelectionCount()&&this.isCellSelected(d)&&this.removeSelectionCell(d);D=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)};
@@ -2304,8 +2304,8 @@ HoverIcons.prototype.getState=function(a){if(null!=a){a=a.cell;if(!this.graph.ge
HoverIcons.prototype.update=function(a,b,e){if(this.graph.connectionArrowsEnabled){var d=null;this.prev!=a||this.isActive()?(this.startTime=(new Date).getTime(),this.prev=a,d=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=a&&(this.updateThread=window.setTimeout(mxUtils.bind(this,function(){this.isActive()||this.graph.isMouseDown||this.graph.panningHandler.isActive()||(this.prev=a,this.update(a,b,e))}),this.updateDelay+10))):null!=this.startTime&&(d=(new Date).getTime()-this.startTime);
this.setDisplay("");null!=this.currentState&&this.currentState!=a&&d<this.activationDelay&&null!=this.bbox&&!mxUtils.contains(this.bbox,b,e)?this.reset(!1):(null!=this.currentState||d>this.activationDelay)&&this.currentState!=a&&(d>this.updateDelay&&null!=a||null==this.bbox||null==b||null==e||!mxUtils.contains(this.bbox,b,e))&&(null!=a&&this.graph.isEnabled()?(this.removeNodes(),this.setCurrentState(a),this.repaint(),this.graph.connectionHandler.constraintHandler.currentFocus!=a&&this.graph.connectionHandler.constraintHandler.reset()):
this.reset())}else this.reset()};HoverIcons.prototype.setCurrentState=function(a){"eastwest"!=a.style.portConstraint&&(this.graph.container.appendChild(this.arrowUp),this.graph.container.appendChild(this.arrowDown));this.graph.container.appendChild(this.arrowRight);this.graph.container.appendChild(this.arrowLeft);this.currentState=a};
-(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 f=this.getState(a);null!=f&&this.graph.model.isEdge(f.cell)&&null!=f.style&&1!=f.style[mxConstants.STYLE_CURVED]&&!f.invalid&&this.updateLineJumps(f)&&this.graph.cellRenderer.redraw(f,!1,this.isRendering());f=b.apply(this,arguments);null!=
-f&&this.graph.model.isEdge(f.cell)&&1!=f.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(f);return f};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]&&
+(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=
@@ -2343,66 +2343,66 @@ this.view.invalidate(c[b],!1,!1)}}};Graph.prototype.replaceElement=function(a,c)
if(null!=e&&0<e.length){d.innerHTML=e;for(var g=d.getElementsByTagName(null!=b?b:"*"),h=0;h<g.length;h++)c(g[h]);d.innerHTML!=e&&this.cellLabelChanged(a[f],d.innerHTML)}}};Graph.prototype.cellLabelChanged=function(a,c,b){c=this.zapGremlins(c);this.model.beginUpdate();try{if(null!=a.value&&"object"==typeof a.value){if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder"))for(var d=a.getAttribute("placeholder"),f=a;null!=f;){if(f==this.model.getRoot()||null!=f.value&&"object"==typeof f.value&&
f.hasAttribute(d)){this.setAttributeForCell(f,d,c);break}f=this.model.getParent(f)}var e=a.value.cloneNode(!0);e.setAttribute("label",c);c=e}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(a){if(null!=a){for(var c=new mxDictionary,b=0;b<a.length;b++)c.put(a[b],!0);for(var d=[],b=0;b<a.length;b++){var f=this.model.getParent(a[b]);null==f||c.get(f)||(c.put(f,!0),d.push(f))}for(b=0;b<d.length;b++)if(f=this.view.getState(d[b]),
null!=f&&(this.model.isEdge(f.cell)||this.model.isVertex(f.cell))&&this.isCellDeletable(f.cell)){var e=mxUtils.getValue(f.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),g=mxUtils.getValue(f.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);if(e==mxConstants.NONE&&g==mxConstants.NONE){e=!0;for(g=0;g<this.model.getChildCount(f.cell)&&e;g++)c.get(this.model.getChildAt(f.cell,g))||(e=!1);e&&a.push(f.cell)}}}mxGraph.prototype.cellsRemoved.apply(this,arguments)};Graph.prototype.removeCellsAfterUngroup=
-function(a){for(var c=[],b=0;b<a.length;b++)if(this.isCellDeletable(a[b])){var f=this.view.getState(a[b]);if(null!=f){var d=mxUtils.getValue(f.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),f=mxUtils.getValue(f.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);d==mxConstants.NONE&&f==mxConstants.NONE&&c.push(a[b])}}a=c;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(a,c){this.setAttributeForCell(a,"link",c)};Graph.prototype.setTooltipForCell=
-function(a,c){this.setAttributeForCell(a,"tooltip",c)};Graph.prototype.setAttributeForCell=function(a,c,b){var f;null!=a.value&&"object"==typeof a.value?f=a.value.cloneNode(!0):(f=mxUtils.createXmlDocument().createElement("UserObject"),f.setAttribute("label",a.value||""));null!=b&&0<b.length?f.setAttribute(c,b):f.removeAttribute(c);this.model.setValue(a,f)};Graph.prototype.getDropTarget=function(a,c,b,f){this.getModel();if(mxEvent.isAltDown(c))return null;for(var d=0;d<a.length;d++)if(this.model.isEdge(this.model.getParent(a[d])))return null;
-return mxGraph.prototype.getDropTarget.apply(this,arguments)};Graph.prototype.click=function(a){mxGraph.prototype.click.call(this,a);this.firstClickState=a.getState();this.firstClickSource=a.getSource()};Graph.prototype.dblClick=function(a,c){if(this.isEnabled()){var b=mxUtils.convertPoint(this.container,mxEvent.getClientX(a),mxEvent.getClientY(a));if(null!=a&&!this.model.isVertex(c)){var f=this.model.isEdge(c)?this.view.getState(c):null,d=mxEvent.getSource(a);this.firstClickState!=f||this.firstClickSource!=
-d||null!=f&&null!=f.text&&null!=f.text.node&&(mxUtils.contains(f.text.boundingBox,b.x,b.y)||mxUtils.isAncestorNode(f.text.node,mxEvent.getSource(a)))||(null!=f||this.isCellLocked(this.getDefaultParent()))&&(null==f||this.isCellLocked(f.cell))||!(null!=f||mxClient.IS_VML&&d==this.view.getCanvas()||mxClient.IS_SVG&&d==this.view.getCanvas().ownerSVGElement)||(c=this.addText(b.x,b.y,f))}mxGraph.prototype.dblClick.call(this,a,c)}};Graph.prototype.getInsertPoint=function(){var a=this.getGridSize(),c=this.container.scrollLeft/
-this.view.scale-this.view.translate.x,b=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible)var f=this.getPageLayout(),d=this.getPageSize(),c=Math.max(c,f.x*d.width),b=Math.max(b,f.y*d.height);return new mxPoint(this.snap(c+a),this.snap(b+a))};Graph.prototype.getFreeInsertPoint=function(){var a=this.view,c=this.getGraphBounds(),b=this.getInsertPoint(),f=this.snap(Math.round(Math.max(b.x,c.x/a.scale-a.translate.x+(0==c.width?2*this.gridSize:0)))),a=this.snap(Math.round(Math.max(b.y,
-(c.y+c.height)/a.scale-a.translate.y+2*this.gridSize)));return new mxPoint(f,a)};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.addText=function(a,c,b){var f=new mxCell;f.value="Text";f.style="text;html=1;resizable=0;points=[];";f.geometry=new mxGeometry(0,0,0,0);f.vertex=!0;if(null!=b){f.style+="align=center;verticalAlign=middle;labelBackgroundColor=#ffffff;";f.geometry.relative=!0;f.connectable=!1;var d=this.view.getRelativePoint(b,a,c);f.geometry.x=Math.round(1E4*d.x)/
-1E4;f.geometry.y=Math.round(d.y);f.geometry.offset=new mxPoint(0,0);var d=this.view.getPoint(b,f.geometry),e=this.view.scale;f.geometry.offset=new mxPoint(Math.round((a-d.x)/e),Math.round((c-d.y)/e))}else f.style+="autosize=1;align=left;verticalAlign=top;spacingTop=-4;",d=this.view.translate,f.geometry.width=40,f.geometry.height=20,f.geometry.x=Math.round(a/this.view.scale)-d.x,f.geometry.y=Math.round(c/this.view.scale)-d.y;this.getModel().beginUpdate();try{this.addCells([f],null!=b?b.cell:null),
-this.fireEvent(new mxEventObject("textInserted","cells",[f])),this.autoSizeCell(f)}finally{this.getModel().endUpdate()}return f};Graph.prototype.getAbsoluteUrl=function(a){null!=a&&this.isRelativeUrl(a)&&(a="#"==a.charAt(0)?this.baseUrl+a:"/"==a.charAt(0)?this.domainUrl+a:this.domainPathUrl+a);return a};Graph.prototype.addClickHandler=function(a,c,b){var f=mxUtils.bind(this,function(){var a=this.container.getElementsByTagName("a");if(null!=a)for(var b=0;b<a.length;b++){var f=this.getAbsoluteUrl(a[b].getAttribute("href"));
-null!=f&&(a[b].setAttribute("rel",this.linkRelation),a[b].setAttribute("href",f),null!=c&&mxEvent.addGestureListeners(a[b],null,null,c))}});this.model.addListener(mxEvent.CHANGE,f);f();var d=this.container.style.cursor,e=this.getTolerance(),g=this,h={currentState:null,currentLink:null,highlight:null!=a&&""!=a&&a!=mxConstants.NONE?new mxCellHighlight(g,a,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(a){var c=a.sourceState;if(null==c||null==g.getLinkForCell(c.cell))a=
+function(a){for(var c=[],b=0;b<a.length;b++)if(this.isCellDeletable(a[b])){var d=this.view.getState(a[b]);if(null!=d){var f=mxUtils.getValue(d.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),d=mxUtils.getValue(d.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);f==mxConstants.NONE&&d==mxConstants.NONE&&c.push(a[b])}}a=c;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(a,c){this.setAttributeForCell(a,"link",c)};Graph.prototype.setTooltipForCell=
+function(a,c){this.setAttributeForCell(a,"tooltip",c)};Graph.prototype.setAttributeForCell=function(a,c,b){var d;null!=a.value&&"object"==typeof a.value?d=a.value.cloneNode(!0):(d=mxUtils.createXmlDocument().createElement("UserObject"),d.setAttribute("label",a.value||""));null!=b&&0<b.length?d.setAttribute(c,b):d.removeAttribute(c);this.model.setValue(a,d)};Graph.prototype.getDropTarget=function(a,c,b,d){this.getModel();if(mxEvent.isAltDown(c))return null;for(var f=0;f<a.length;f++)if(this.model.isEdge(this.model.getParent(a[f])))return null;
+return mxGraph.prototype.getDropTarget.apply(this,arguments)};Graph.prototype.click=function(a){mxGraph.prototype.click.call(this,a);this.firstClickState=a.getState();this.firstClickSource=a.getSource()};Graph.prototype.dblClick=function(a,c){if(this.isEnabled()){var b=mxUtils.convertPoint(this.container,mxEvent.getClientX(a),mxEvent.getClientY(a));if(null!=a&&!this.model.isVertex(c)){var d=this.model.isEdge(c)?this.view.getState(c):null,f=mxEvent.getSource(a);this.firstClickState!=d||this.firstClickSource!=
+f||null!=d&&null!=d.text&&null!=d.text.node&&(mxUtils.contains(d.text.boundingBox,b.x,b.y)||mxUtils.isAncestorNode(d.text.node,mxEvent.getSource(a)))||(null!=d||this.isCellLocked(this.getDefaultParent()))&&(null==d||this.isCellLocked(d.cell))||!(null!=d||mxClient.IS_VML&&f==this.view.getCanvas()||mxClient.IS_SVG&&f==this.view.getCanvas().ownerSVGElement)||(c=this.addText(b.x,b.y,d))}mxGraph.prototype.dblClick.call(this,a,c)}};Graph.prototype.getInsertPoint=function(){var a=this.getGridSize(),c=this.container.scrollLeft/
+this.view.scale-this.view.translate.x,b=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible)var d=this.getPageLayout(),f=this.getPageSize(),c=Math.max(c,d.x*f.width),b=Math.max(b,d.y*f.height);return new mxPoint(this.snap(c+a),this.snap(b+a))};Graph.prototype.getFreeInsertPoint=function(){var a=this.view,c=this.getGraphBounds(),b=this.getInsertPoint(),d=this.snap(Math.round(Math.max(b.x,c.x/a.scale-a.translate.x+(0==c.width?2*this.gridSize:0)))),a=this.snap(Math.round(Math.max(b.y,
+(c.y+c.height)/a.scale-a.translate.y+2*this.gridSize)));return new mxPoint(d,a)};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.addText=function(a,c,b){var d=new mxCell;d.value="Text";d.style="text;html=1;resizable=0;points=[];";d.geometry=new mxGeometry(0,0,0,0);d.vertex=!0;if(null!=b){d.style+="align=center;verticalAlign=middle;labelBackgroundColor=#ffffff;";d.geometry.relative=!0;d.connectable=!1;var f=this.view.getRelativePoint(b,a,c);d.geometry.x=Math.round(1E4*f.x)/
+1E4;d.geometry.y=Math.round(f.y);d.geometry.offset=new mxPoint(0,0);var f=this.view.getPoint(b,d.geometry),e=this.view.scale;d.geometry.offset=new mxPoint(Math.round((a-f.x)/e),Math.round((c-f.y)/e))}else d.style+="autosize=1;align=left;verticalAlign=top;spacingTop=-4;",f=this.view.translate,d.geometry.width=40,d.geometry.height=20,d.geometry.x=Math.round(a/this.view.scale)-f.x,d.geometry.y=Math.round(c/this.view.scale)-f.y;this.getModel().beginUpdate();try{this.addCells([d],null!=b?b.cell:null),
+this.fireEvent(new mxEventObject("textInserted","cells",[d])),this.autoSizeCell(d)}finally{this.getModel().endUpdate()}return d};Graph.prototype.getAbsoluteUrl=function(a){null!=a&&this.isRelativeUrl(a)&&(a="#"==a.charAt(0)?this.baseUrl+a:"/"==a.charAt(0)?this.domainUrl+a:this.domainPathUrl+a);return a};Graph.prototype.addClickHandler=function(a,c,b){var d=mxUtils.bind(this,function(){var a=this.container.getElementsByTagName("a");if(null!=a)for(var b=0;b<a.length;b++){var d=this.getAbsoluteUrl(a[b].getAttribute("href"));
+null!=d&&(a[b].setAttribute("rel",this.linkRelation),a[b].setAttribute("href",d),null!=c&&mxEvent.addGestureListeners(a[b],null,null,c))}});this.model.addListener(mxEvent.CHANGE,d);d();var f=this.container.style.cursor,e=this.getTolerance(),g=this,h={currentState:null,currentLink:null,highlight:null!=a&&""!=a&&a!=mxConstants.NONE?new mxCellHighlight(g,a,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(a){var c=a.sourceState;if(null==c||null==g.getLinkForCell(c.cell))a=
g.getCellAt(a.getGraphX(),a.getGraphY(),null,null,null,function(a,c,b){return null==g.getLinkForCell(a.cell)}),c=g.view.getState(a);c!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=c,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(a,c){this.startX=c.getGraphX();this.startY=c.getGraphY();this.scrollLeft=g.container.scrollLeft;this.scrollTop=g.container.scrollTop;null==this.currentLink&&"auto"==g.container.style.overflow&&(g.container.style.cursor=
-"move");this.updateCurrentState(c)},mouseMove:function(a,c){if(g.isMouseDown){if(null!=this.currentLink){var b=Math.abs(this.startX-c.getGraphX()),f=Math.abs(this.startY-c.getGraphY());(b>e||f>e)&&this.clear()}}else{for(b=c.getSource();null!=b&&"a"!=b.nodeName.toLowerCase();)b=b.parentNode;null!=b?this.clear():(null!=g.tooltipHandler&&null!=this.currentLink&&null!=this.currentState&&g.tooltipHandler.reset(c,!0,this.currentState),(null==this.currentState||c.getState()!=this.currentState&&null!=c.sourceState||
-!g.intersects(this.currentState,c.getGraphX(),c.getGraphY()))&&this.updateCurrentState(c))}},mouseUp:function(a,f){for(var d=f.getSource(),h=f.getEvent();null!=d&&"a"!=d.nodeName.toLowerCase();)d=d.parentNode;null==d&&Math.abs(this.scrollLeft-g.container.scrollLeft)<e&&Math.abs(this.scrollTop-g.container.scrollTop)<e&&(null==f.sourceState||!f.isSource(f.sourceState.control))&&((mxEvent.isLeftMouseButton(h)||mxEvent.isMiddleMouseButton(h))&&!mxEvent.isPopupTrigger(h)||mxEvent.isTouchEvent(h))&&(null!=
-this.currentLink?(d=g.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&d||null==c||c(h,this.currentLink),mxEvent.isConsumed(h)||(h=mxEvent.isMiddleMouseButton(h)?"_blank":d?g.linkTarget:"_top",g.openLink(this.currentLink,h),f.consume())):null!=b&&!f.isConsumed()&&Math.abs(this.scrollLeft-g.container.scrollLeft)<e&&Math.abs(this.scrollTop-g.container.scrollTop)<e&&Math.abs(this.startX-f.getGraphX())<e&&Math.abs(this.startY-f.getGraphY())<e&&b(f.getEvent()));this.clear()},activate:function(a){this.currentLink=
-g.getAbsoluteUrl(g.getLinkForCell(a.cell));null!=this.currentLink&&(g.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(a))},clear:function(){null!=g.container&&(g.container.style.cursor=d);this.currentLink=this.currentState=null;null!=this.highlight&&this.highlight.hide();null!=g.tooltipHandler&&g.tooltipHandler.hide()}};g.click=function(a){};g.addMouseListener(h);mxEvent.addListener(document,"mouseleave",function(a){h.clear()})};Graph.prototype.duplicateCells=function(a,
-c){a=null!=a?a:this.getSelectionCells();c=null!=c?c:!0;a=this.model.getTopmostCells(a);var b=this.getModel(),f=this.gridSize,d=[];b.beginUpdate();try{for(var e=this.cloneCells(a,!1,null,!0),g=0;g<a.length;g++){var h=b.getParent(a[g]),n=this.moveCells([e[g]],f,f,!1)[0];d.push(n);if(c)b.add(h,e[g]);else{var m=h.getIndex(a[g]);b.add(h,e[g],m+1)}}}finally{b.endUpdate()}return d};Graph.prototype.insertImage=function(a,c,b){if(null!=a){for(var f=this.cellEditor.textarea.getElementsByTagName("img"),d=[],
-e=0;e<f.length;e++)d.push(f[e]);document.execCommand("insertimage",!1,a);a=this.cellEditor.textarea.getElementsByTagName("img");if(a.length==d.length+1)for(e=a.length-1;0<=e;e--)if(0==e||a[e]!=d[e-1]){a[e].setAttribute("width",c);a[e].setAttribute("height",b);break}}};Graph.prototype.insertLink=function(a){if(0==a.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var c=this.cellEditor.textarea.getElementsByTagName("a"),b=[],f=0;f<c.length;f++)b.push(c[f]);document.execCommand("createlink",
-!1,mxUtils.trim(a));c=this.cellEditor.textarea.getElementsByTagName("a");if(c.length==b.length+1)for(f=c.length-1;0<=f;f--)if(c[f]!=b[f-1]){for(c=c[f].getElementsByTagName("a");0<c.length;){for(b=c[0].parentNode;null!=c[0].firstChild;)b.insertBefore(c[0].firstChild,c[0]);b.removeChild(c[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(a))};Graph.prototype.isCellResizable=function(a){var c=mxGraph.prototype.isCellResizable.apply(this,arguments),b=this.view.getState(a),b=null!=b?b.style:
-this.getCellStyle(a);return c||"0"!=mxUtils.getValue(b,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==b[mxConstants.STYLE_WHITE_SPACE]};Graph.prototype.distributeCells=function(a,c){null==c&&(c=this.getSelectionCells());if(null!=c&&1<c.length){for(var b=[],f=null,d=null,e=0;e<c.length;e++)if(this.getModel().isVertex(c[e])){var g=this.view.getState(c[e]);if(null!=g){var h=a?g.getCenterX():g.getCenterY(),f=null!=f?Math.max(f,h):h,d=null!=d?Math.min(d,h):h;b.push(g)}}if(2<b.length){b.sort(function(c,b){return a?
-c.x-b.x:c.y-b.y});g=this.view.translate;h=this.view.scale;d=d/h-(a?g.x:g.y);f=f/h-(a?g.x:g.y);this.getModel().beginUpdate();try{for(var n=(f-d)/(b.length-1),f=d,e=1;e<b.length-1;e++){var m=this.view.getState(this.model.getParent(b[e].cell)),r=this.getCellGeometry(b[e].cell),f=f+n;null!=r&&null!=m&&(r=r.clone(),a?r.x=Math.round(f-r.width/2)-m.origin.x:r.y=Math.round(f-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,f=0;f<a.length;f++)b.put(a[f],!0);for(f=0;f<c.length;f++){var d=this.view.getState(a[f]);if(null!=d){var e=this.getCellGeometry(c[f]);null==e||!e.relative||this.model.isEdge(a[f])||b.get(this.model.getParent(a[f]))||(e.relative=!1,e.x=d.x/d.view.scale-d.view.translate.x,e.y=d.y/d.view.scale-d.view.translate.y)}}b=new mxCodec;d=
-new mxGraphModel;e=d.getChildAt(d.getRoot(),0);for(f=0;f<a.length;f++)d.add(e,c[f]);return b.encode(d)};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,f,d,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;d=null!=d?d:!0;e=null!=e?e:!0;g=null!=
-g?g:!0;var t=e||f?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",(d?"-0.5 -0.5":"0 0")+" "+z+" "+q);v.appendChild(k);var w=this.createSvgCanvas(k);w.foOffset=d?-.5:0;w.textOffset=d?-.5:0;w.imageOffset=d?-.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,f,d,e,g,h,n,m,r,t,x){var k=this.state;if(null!=this.foAltText&&(0==f||0!=k.fontSize&&e.length<5*f/k.fontSize)){var v=this.createElement("text");v.setAttribute("x",Math.round(f/2));v.setAttribute("y",Math.round((d+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",
+"move");this.updateCurrentState(c)},mouseMove:function(a,c){if(g.isMouseDown){if(null!=this.currentLink){var b=Math.abs(this.startX-c.getGraphX()),d=Math.abs(this.startY-c.getGraphY());(b>e||d>e)&&this.clear()}}else{for(b=c.getSource();null!=b&&"a"!=b.nodeName.toLowerCase();)b=b.parentNode;null!=b?this.clear():(null!=g.tooltipHandler&&null!=this.currentLink&&null!=this.currentState&&g.tooltipHandler.reset(c,!0,this.currentState),(null==this.currentState||c.getState()!=this.currentState&&null!=c.sourceState||
+!g.intersects(this.currentState,c.getGraphX(),c.getGraphY()))&&this.updateCurrentState(c))}},mouseUp:function(a,d){for(var f=d.getSource(),h=d.getEvent();null!=f&&"a"!=f.nodeName.toLowerCase();)f=f.parentNode;null==f&&Math.abs(this.scrollLeft-g.container.scrollLeft)<e&&Math.abs(this.scrollTop-g.container.scrollTop)<e&&(null==d.sourceState||!d.isSource(d.sourceState.control))&&((mxEvent.isLeftMouseButton(h)||mxEvent.isMiddleMouseButton(h))&&!mxEvent.isPopupTrigger(h)||mxEvent.isTouchEvent(h))&&(null!=
+this.currentLink?(f=g.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&f||null==c||c(h,this.currentLink),mxEvent.isConsumed(h)||(h=mxEvent.isMiddleMouseButton(h)?"_blank":f?g.linkTarget:"_top",g.openLink(this.currentLink,h),d.consume())):null!=b&&!d.isConsumed()&&Math.abs(this.scrollLeft-g.container.scrollLeft)<e&&Math.abs(this.scrollTop-g.container.scrollTop)<e&&Math.abs(this.startX-d.getGraphX())<e&&Math.abs(this.startY-d.getGraphY())<e&&b(d.getEvent()));this.clear()},activate:function(a){this.currentLink=
+g.getAbsoluteUrl(g.getLinkForCell(a.cell));null!=this.currentLink&&(g.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(a))},clear:function(){null!=g.container&&(g.container.style.cursor=f);this.currentLink=this.currentState=null;null!=this.highlight&&this.highlight.hide();null!=g.tooltipHandler&&g.tooltipHandler.hide()}};g.click=function(a){};g.addMouseListener(h);mxEvent.addListener(document,"mouseleave",function(a){h.clear()})};Graph.prototype.duplicateCells=function(a,
+c){a=null!=a?a:this.getSelectionCells();c=null!=c?c:!0;a=this.model.getTopmostCells(a);var b=this.getModel(),d=this.gridSize,f=[];b.beginUpdate();try{for(var e=this.cloneCells(a,!1,null,!0),g=0;g<a.length;g++){var h=b.getParent(a[g]),n=this.moveCells([e[g]],d,d,!1)[0];f.push(n);if(c)b.add(h,e[g]);else{var m=h.getIndex(a[g]);b.add(h,e[g],m+1)}}}finally{b.endUpdate()}return f};Graph.prototype.insertImage=function(a,c,b){if(null!=a){for(var d=this.cellEditor.textarea.getElementsByTagName("img"),f=[],
+e=0;e<d.length;e++)f.push(d[e]);document.execCommand("insertimage",!1,a);a=this.cellEditor.textarea.getElementsByTagName("img");if(a.length==f.length+1)for(e=a.length-1;0<=e;e--)if(0==e||a[e]!=f[e-1]){a[e].setAttribute("width",c);a[e].setAttribute("height",b);break}}};Graph.prototype.insertLink=function(a){if(0==a.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var c=this.cellEditor.textarea.getElementsByTagName("a"),b=[],d=0;d<c.length;d++)b.push(c[d]);document.execCommand("createlink",
+!1,mxUtils.trim(a));c=this.cellEditor.textarea.getElementsByTagName("a");if(c.length==b.length+1)for(d=c.length-1;0<=d;d--)if(c[d]!=b[d-1]){for(c=c[d].getElementsByTagName("a");0<c.length;){for(b=c[0].parentNode;null!=c[0].firstChild;)b.insertBefore(c[0].firstChild,c[0]);b.removeChild(c[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(a))};Graph.prototype.isCellResizable=function(a){var c=mxGraph.prototype.isCellResizable.apply(this,arguments),b=this.view.getState(a),b=null!=b?b.style:
+this.getCellStyle(a);return c||"0"!=mxUtils.getValue(b,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==b[mxConstants.STYLE_WHITE_SPACE]};Graph.prototype.distributeCells=function(a,c){null==c&&(c=this.getSelectionCells());if(null!=c&&1<c.length){for(var b=[],d=null,f=null,e=0;e<c.length;e++)if(this.getModel().isVertex(c[e])){var g=this.view.getState(c[e]);if(null!=g){var h=a?g.getCenterX():g.getCenterY(),d=null!=d?Math.max(d,h):h,f=null!=f?Math.min(f,h):h;b.push(g)}}if(2<b.length){b.sort(function(c,b){return a?
+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",
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,D=new mxRectangle(p.x*c,p.y*c,H.width*c,H.height*c);mxUtils.intersects(t,D)&&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 C=h.drawCellState;h.drawCellState=function(a,c){for(var b=a.view.graph,f=b.isCellSelected(a.cell),d=b.model.getParent(a.cell);!e&&!f&&null!=d;)f=b.isCellSelected(d),d=b.model.getParent(d);(e||f)&&C.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 f=0;f<a.length;f++){var d=a[f].getAttribute("href");null==d&&(d=a[f].getAttribute("xlink:href"));null!=d&&(null!=c&&/^https?:\/\//.test(d)?a[f].setAttribute("target",c):b&&this.isCustomLink(d)&&a[f].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(a){return new mxSvgCanvas2D(a)};
+var p=this.view.translate,D=new mxRectangle(p.x*c,p.y*c,H.width*c,H.height*c);mxUtils.intersects(t,D)&&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 C=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)&&C.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],f=b.rows[0].cells,d=0,e=0;e<f.length;e++)var g=f[e].getAttribute("colspan"),d=d+(null!=g?parseInt(g):1);b=b.insertRow(c);for(e=0;e<d;e++)mxUtils.br(b.insertCell(-1));return b.cells[0]};Graph.prototype.deleteRow=
-function(a,c){a.tBodies[0].deleteRow(c)};Graph.prototype.insertColumn=function(a,c){var b=a.tHead;if(null!=b)for(var f=0;f<b.rows.length;f++){var d=document.createElement("th");b.rows[f].appendChild(d);mxUtils.br(d)}b=a.tBodies[0];for(f=0;f<b.rows.length;f++)d=b.rows[f].insertCell(c),mxUtils.br(d);return b.rows[0].cells[0<=c?c:b.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(a,c){if(0<=c)for(var b=a.tBodies[0].rows,f=0;f<b.length;f++)b[f].cells.length>c&&b[f].deleteCell(c)};Graph.prototype.pasteHtmlAtCaret=
-function(a){var c;if(window.getSelection){if(c=window.getSelection(),c.getRangeAt&&c.rangeCount){c=c.getRangeAt(0);c.deleteContents();var b=document.createElement("div");b.innerHTML=a;a=document.createDocumentFragment();for(var f;f=b.firstChild;)lastNode=a.appendChild(f);c.insertNode(a)}}else(c=document.selection)&&"Control"!=c.type&&c.createRange().pasteHTML(a)};Graph.prototype.createLinkForHint=function(a,c){function b(a,c){a.length>c&&(a=a.substring(0,Math.round(c/2))+"..."+a.substring(a.length-
-Math.round(c/4)));return a}a=null!=a?a:"javascript:void(0);";if(null==c||0==c.length)c=this.isCustomLink(a)?this.getLinkTitle(a):a;var f=document.createElement("a");f.setAttribute("rel",this.linkRelation);f.setAttribute("href",this.getAbsoluteUrl(a));f.setAttribute("title",b(this.isCustomLink(a)?this.getLinkTitle(a):a,80));null!=this.linkTarget&&f.setAttribute("target",this.linkTarget);mxUtils.write(f,b(c,40));this.isCustomLink(a)&&mxEvent.addListener(f,"click",mxUtils.bind(this,function(c){this.customLinkClicked(a);
-mxEvent.consume(c)}));return f};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(a,c){this.popupMenuHandler.hideMenu()});var a=this.updateMouseEvent;this.updateMouseEvent=function(c){c=a.apply(this,arguments);if(mxEvent.isTouchEvent(c.getEvent())&&null==c.getState()){var b=this.getCellAt(c.graphX,c.graphY);null!=b&&this.isSwimlane(b)&&this.hitsSwimlaneContent(b,c.graphX,
-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,f=!1,d=this.fireMouseEvent;this.fireMouseEvent=function(a,e,g){a==mxEvent.MOUSE_DOWN&&(e=this.updateMouseEvent(e),c=this.isCellSelected(e.getCell()),b=this.isSelectionEmpty(),f=this.popupMenuHandler.isMenuShowing());d.apply(this,arguments)};this.popupMenuHandler.mouseUp=
-mxUtils.bind(this,function(a,d){this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==d.getState()||!d.isSource(d.getState().control))&&(this.popupMenuHandler.popupTrigger||!f&&!mxEvent.isMouseEvent(d.getEvent())&&(b&&null==d.getCell()&&this.isSelectionEmpty()||c&&this.isCellSelected(d.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,f=a.rangeCount;b<f;++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<
+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=
+function(a,c){a.tBodies[0].deleteRow(c)};Graph.prototype.insertColumn=function(a,c){var b=a.tHead;if(null!=b)for(var d=0;d<b.rows.length;d++){var f=document.createElement("th");b.rows[d].appendChild(f);mxUtils.br(f)}b=a.tBodies[0];for(d=0;d<b.rows.length;d++)f=b.rows[d].insertCell(c),mxUtils.br(f);return b.rows[0].cells[0<=c?c:b.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(a,c){if(0<=c)for(var b=a.tBodies[0].rows,d=0;d<b.length;d++)b[d].cells.length>c&&b[d].deleteCell(c)};Graph.prototype.pasteHtmlAtCaret=
+function(a){var c;if(window.getSelection){if(c=window.getSelection(),c.getRangeAt&&c.rangeCount){c=c.getRangeAt(0);c.deleteContents();var b=document.createElement("div");b.innerHTML=a;a=document.createDocumentFragment();for(var d;d=b.firstChild;)lastNode=a.appendChild(d);c.insertNode(a)}}else(c=document.selection)&&"Control"!=c.type&&c.createRange().pasteHTML(a)};Graph.prototype.createLinkForHint=function(a,c){function b(a,c){a.length>c&&(a=a.substring(0,Math.round(c/2))+"..."+a.substring(a.length-
+Math.round(c/4)));return a}a=null!=a?a:"javascript:void(0);";if(null==c||0==c.length)c=this.isCustomLink(a)?this.getLinkTitle(a):a;var d=document.createElement("a");d.setAttribute("rel",this.linkRelation);d.setAttribute("href",this.getAbsoluteUrl(a));d.setAttribute("title",b(this.isCustomLink(a)?this.getLinkTitle(a):a,80));null!=this.linkTarget&&d.setAttribute("target",this.linkTarget);mxUtils.write(d,b(c,40));this.isCustomLink(a)&&mxEvent.addListener(d,"click",mxUtils.bind(this,function(c){this.customLinkClicked(a);
+mxEvent.consume(c)}));return d};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(a,c){this.popupMenuHandler.hideMenu()});var a=this.updateMouseEvent;this.updateMouseEvent=function(c){c=a.apply(this,arguments);if(mxEvent.isTouchEvent(c.getEvent())&&null==c.getState()){var b=this.getCellAt(c.graphX,c.graphY);null!=b&&this.isSwimlane(b)&&this.hitsSwimlaneContent(b,c.graphX,
+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=
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),
-f=this.graph.getCellGeometry(a);this.graph.getModel().isEdge(b)&&null!=f&&f.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 f=b.firstChild;null!=a&&null!=f;)c(a,f),a=a.nextSibling,f=f.nextSibling;return b}function b(a,c){if(null!=a)if(c.originalNode!=a)f(a);else for(a=a.firstChild,c=c.firstChild;null!=a;){var d=a.nextSibling;null==c?f(a):(b(a,c),c=c.nextSibling);a=d}}function f(a){for(var c=a.firstChild;null!=c;){var b=c.nextSibling;f(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,
-mxUtils.getTextContent(a).replace(/\n|\r/g,"")),1==a.nodeType&&(a.removeAttribute("style"),a.removeAttribute("class"),a.removeAttribute("width"),a.removeAttribute("cellpadding"),a.removeAttribute("cellspacing"),a.removeAttribute("border"))):a.parentNode.removeChild(a)}q.apply(this,arguments);mxClient.IS_QUIRKS||7===document.documentMode||8===document.documentMode||mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(a){var f=c(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,
-function(){b(this.textarea,f)}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var a=this.graph.view.getState(this.editingCell),c=null!=a&&"0"!=mxUtils.getValue(a.style,"nl2Br","1"),b=this.saveSelection();if(this.codeViewMode){h=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<h.length&&"\n"==h.charAt(h.length-1)&&(h=h.substring(0,h.length-1));h=this.graph.sanitizeHtml(c?h.replace(/\n/g,"<br/>"):h,!0);this.textarea.className="mxCellEditor geContentEditable";var f=mxUtils.getValue(a.style,
-mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE),c=mxUtils.getValue(a.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),d=mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),e=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,g=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,a=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==
-mxConstants.FONT_UNDERLINE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(f*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(f)+"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=d;this.textarea.style.padding="0px";this.textarea.innerHTML!=h&&(this.textarea.innerHTML=
+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,
+mxUtils.getTextContent(a).replace(/\n|\r/g,"")),1==a.nodeType&&(a.removeAttribute("style"),a.removeAttribute("class"),a.removeAttribute("width"),a.removeAttribute("cellpadding"),a.removeAttribute("cellspacing"),a.removeAttribute("border"))):a.parentNode.removeChild(a)}q.apply(this,arguments);mxClient.IS_QUIRKS||7===document.documentMode||8===document.documentMode||mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(a){var d=c(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,
+function(){b(this.textarea,d)}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var a=this.graph.view.getState(this.editingCell),c=null!=a&&"0"!=mxUtils.getValue(a.style,"nl2Br","1"),b=this.saveSelection();if(this.codeViewMode){h=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<h.length&&"\n"==h.charAt(h.length-1)&&(h=h.substring(0,h.length-1));h=this.graph.sanitizeHtml(c?h.replace(/\n/g,"<br/>"):h,!0);this.textarea.className="mxCellEditor geContentEditable";var d=mxUtils.getValue(a.style,
+mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE),c=mxUtils.getValue(a.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),f=mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),e=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,g=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,a=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==
+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 f=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(f*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(f)+"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=
+"<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==
-this.bounds.height){this.bounds.width=160*b;this.bounds.height=60*b;var f=null!=a.text?a.text.margin:null;null==f&&(f=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+=f.x*this.bounds.width;this.bounds.y+=f.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-
+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,
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=
-mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null),c==mxConstants.NONE&&(c=null);return c};mxCellEditor.prototype.getMinimumSize=function(a){var c=this.graph.getView().scale;return new mxRectangle(0,0,null==a.text?30:a.text.size*c+20,30)};var g=mxGraphHandler.prototype.moveCells;mxGraphHandler.prototype.moveCells=function(a,c,b,f,d,e){mxEvent.isAltDown(e)&&(d=null);g.apply(this,arguments)};mxGraphHandler.prototype.updateHint=function(c){if(null!=this.shape){null==this.hint&&(this.hint=
-a(),this.graph.container.appendChild(this.hint));var b=this.graph.view.translate,f=this.graph.view.scale;c=this.roundLength((this.bounds.x+this.currentDx)/f-b.x);b=this.roundLength((this.bounds.y+this.currentDy)/f-b.y);this.hint.innerHTML=c+", "+b;this.hint.style.left=this.shape.bounds.x+Math.round((this.shape.bounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.shape.bounds.y+this.shape.bounds.height+12+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(this.hint.parentNode.removeChild(this.hint),
+mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null),c==mxConstants.NONE&&(c=null);return c};mxCellEditor.prototype.getMinimumSize=function(a){var c=this.graph.getView().scale;return new mxRectangle(0,0,null==a.text?30:a.text.size*c+20,30)};var g=mxGraphHandler.prototype.moveCells;mxGraphHandler.prototype.moveCells=function(a,c,b,d,f,e){mxEvent.isAltDown(e)&&(f=null);g.apply(this,arguments)};mxGraphHandler.prototype.updateHint=function(c){if(null!=this.shape){null==this.hint&&(this.hint=
+a(),this.graph.container.appendChild(this.hint));var b=this.graph.view.translate,d=this.graph.view.scale;c=this.roundLength((this.bounds.x+this.currentDx)/d-b.x);b=this.roundLength((this.bounds.y+this.currentDy)/d-b.y);this.hint.innerHTML=c+", "+b;this.hint.style.left=this.shape.bounds.x+Math.round((this.shape.bounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.shape.bounds.y+this.shape.bounds.height+12+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(this.hint.parentNode.removeChild(this.hint),
this.hint=null)};mxVertexHandler.prototype.isRecursiveResize=function(a,c){return!this.graph.isSwimlane(a.cell)&&0<this.graph.model.getChildCount(a.cell)&&!mxEvent.isControlDown(c.getEvent())&&!this.graph.isCellCollapsed(a.cell)&&"1"==mxUtils.getValue(a.style,"recursiveResize","1")&&null==mxUtils.getValue(a.style,"childLayout",null)};mxVertexHandler.prototype.isCenteredEvent=function(a,c){return!(!this.graph.isSwimlane(a.cell)&&0<this.graph.model.getChildCount(a.cell)&&!this.graph.isCellCollapsed(a.cell)&&
"1"==mxUtils.getValue(a.style,"recursiveResize","1")&&null==mxUtils.getValue(a.style,"childLayout",null))&&mxEvent.isControlDown(c.getEvent())||mxEvent.isMetaDown(c.getEvent())};var n=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var a=new mxPoint(0,0),c=this.tolerance;this.graph.cellEditor.getEditingCell()==this.state.cell&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(c/=2,a.x=this.sizers[0].bounds.width+c,a.y=this.sizers[0].bounds.height+
c):a=n.apply(this,arguments);return a};mxVertexHandler.prototype.updateHint=function(c){this.index!=mxEvent.LABEL_HANDLE&&(null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint)),this.index==mxEvent.ROTATION_HANDLE?this.hint.innerHTML=this.currentAlpha+"&deg;":(c=this.state.view.scale,this.hint.innerHTML=this.roundLength(this.bounds.width/c)+" x "+this.roundLength(this.bounds.height/c)),c=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:
this.state.style[mxConstants.STYLE_ROTATION]||"0"),null==c&&(c=this.bounds),this.hint.style.left=c.x+Math.round((c.width-this.hint.clientWidth)/2)+"px",this.hint.style.top=c.y+c.height+12+"px",null!=this.linkHint&&(this.linkHint.style.display="none"))};mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(c,b){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));
-var f=this.graph.view.translate,d=this.graph.view.scale,e=this.roundLength(b.x/d-f.x),f=this.roundLength(b.y/d-f.y);this.hint.innerHTML=e+", "+f;this.hint.style.visibility="visible";if(this.isSource||this.isTarget)null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(e=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*e.x)+"%, "+Math.round(100*e.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=
+var d=this.graph.view.translate,f=this.graph.view.scale,e=this.roundLength(b.x/f-d.x),d=this.roundLength(b.y/f-d.y);this.hint.innerHTML=e+", "+d;this.hint.style.visibility="visible";if(this.isSource||this.isTarget)null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(e=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*e.x)+"%, "+Math.round(100*e.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=
Math.round(c.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(c.getGraphY(),b.y)+this.state.view.graph.gridSize+"px";null!=this.linkHint&&(this.linkHint.style.display="none")};mxEdgeHandler.prototype.removeHint=mxVertexHandler.prototype.removeHint;HoverIcons.prototype.mainHandle=mxClient.IS_SVG?Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'" stroke-width="1"/>'):new mxImage(IMAGE_PATH+"/handle-main.png",17,17);HoverIcons.prototype.secondaryHandle=
mxClient.IS_SVG?Graph.createSvgImage(16,16,'<path d="m 8 3 L 13 8 L 8 13 L 3 8 z" stroke="#fff" fill="#fca000"/>'):new mxImage(IMAGE_PATH+"/handle-secondary.png",17,17);HoverIcons.prototype.fixedHandle=mxClient.IS_SVG?Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'" stroke-width="1"/><path d="m 7 7 L 11 11 M 7 11 L 11 7" stroke="#fff"/>'):new mxImage(IMAGE_PATH+"/handle-fixed.png",17,17);HoverIcons.prototype.terminalHandle=mxClient.IS_SVG?
Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'" stroke-width="1"/><circle cx="9" cy="9" r="2" stroke="#fff" fill="transparent"/>'):new mxImage(IMAGE_PATH+"/handle-terminal.png",17,17);HoverIcons.prototype.rotationHandle=new mxImage(mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAAVCAYAAACkCdXRAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAAA6ZJREFUeNqM001IY1cUB/D/fYmm2sbR2lC1zYlgoRG6MpEyBlpxM9iFIGKFIm3s0lCKjOByhCLZCFqLBF1YFVJdSRbdFHRhBbULtRuFVBTzYRpJgo2mY5OX5N9Fo2TG+eiFA/dd3vvd8+65ByTxshARTdf1JySp6/oTEdFe9T5eg5lIcnBwkCSZyWS+exX40oyur68/KxaLf5Okw+H4X+A9JBaLfUySZ2dnnJqaosPhIAACeC34DJRKpb7IZrMcHx+nwWCgUopGo/EOKwf9fn/1CzERUevr6+9ls1mOjIwQAH0+H4PBIKPR6D2ofAQCgToRUeVYJUkuLy8TANfW1kiS8/PzCy84Mw4MDBAAZ2dnmc/nub+/X0MSEBF1cHDwMJVKsaGhgV6vl+l0mqOjo1+KyKfl1dze3l4NBoM/PZ+diFSLiIKIGBOJxA9bW1sEwNXVVSaTyQMRaRaRxrOzs+9J8ujoaE5EPhQRq67rcZ/PRwD0+/3Udf03EdEgIqZisZibnJykwWDg4eEhd3Z2xkXELCJvPpdBrYjUiEhL+Xo4HH4sIhUaAKNSqiIcDsNkMqG+vh6RSOQQQM7tdhsAQCkFAHC73UUATxcWFqypVApmsxnDw8OwWq2TADQNgAYAFosF+XweyWQSdru9BUBxcXFRB/4rEgDcPouIIx6P4+bmBi0tLSCpAzBqAIqnp6c/dnZ2IpfLYXNzE62traMADACKNputpr+/v8lms9UAKAAwiMjXe3t7KBQKqKurQy6Xi6K0i2l6evpROp1mbW0t29vbGY/Hb8/IVIqq2zlJXl1dsaOjg2azmefn5wwEAl+JSBVExCgi75PkzMwMlVJsbGxkIpFgPp8PX15ePopEIs3JZPITXdf/iEajbGpqolKKExMT1HWdHo/nIxGpgIgoEXnQ3d39kCTHxsYIgC6Xi3NzcwyHw8xkMozFYlxaWmJbWxuVUuzt7WUul6PX6/1cRN4WEe2uA0SkaWVl5XGpRVhdXU0A1DSNlZWVdz3qdDrZ09PDWCzG4+Pjn0XEWvp9KJKw2WwKwBsA3gHQHAqFfr24uMDGxgZ2d3cRiUQAAHa7HU6nE319fTg5Ofmlq6vrGwB/AngaCoWK6rbsNptNA1AJoA7Aux6Pp3NoaMhjsVg+QNmIRqO/u1yubwFEASRKUAEA7rASqABUAKgC8KAUb5XWCOAfAFcA/gJwDSB7C93DylCtdM8qABhLc5TumV6KQigUeubjfwcAHkQJ94ndWeYAAAAASUVORK5CYII=":
@@ -2414,26 +2414,26 @@ HoverIcons.prototype.triangleDown.src,(new Image).src=HoverIcons.prototype.trian
function(a){return!mxEvent.isShiftDown(a.getEvent())};if(Graph.touchStyle){if(mxClient.IS_TOUCH||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints)mxShape.prototype.svgStrokeTolerance=18,mxVertexHandler.prototype.tolerance=12,mxEdgeHandler.prototype.tolerance=12,Graph.prototype.tolerance=12,mxVertexHandler.prototype.rotationHandleVSpacing=-24,mxConstraintHandler.prototype.getTolerance=function(a){return mxEvent.isMouseEvent(a.getEvent())?4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=
function(a){var c=a.getEvent();return null==a.getState()&&!mxEvent.isMouseEvent(c)||mxEvent.isPopupTrigger(c)&&(null==a.getState()||mxEvent.isControlDown(c)||mxEvent.isShiftDown(c))};var r=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=function(a,c){r.apply(this,arguments);mxEvent.isTouchEvent(c.getEvent())&&this.graph.isCellSelected(c.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(a){var c=
a.getEvent();return mxEvent.isLeftMouseButton(c)&&(this.useLeftButtonForPanning&&null==a.getState()||mxEvent.isControlDown(c)&&!mxEvent.isShiftDown(c))||this.usePopupTrigger&&mxEvent.isPopupTrigger(c)};mxRubberband.prototype.isSpaceEvent=function(a){return this.graph.isEnabled()&&!this.graph.isCellLocked(this.graph.getDefaultParent())&&mxEvent.isControlDown(a.getEvent())&&mxEvent.isShiftDown(a.getEvent())};mxRubberband.prototype.mouseUp=function(a,c){var b=null!=this.div&&"none"!=this.div.style.display,
-f=null,d=null,e=null,g=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(f=this.first.x,d=this.first.y,e=(this.currentX-f)/this.graph.view.scale,g=(this.currentY-d)/this.graph.view.scale,mxEvent.isAltDown(c.getEvent())||(e=this.graph.snap(e),g=this.graph.snap(g),this.graph.isGridEnabled()||(Math.abs(e)<this.graph.tolerance&&(e=0),Math.abs(g)<this.graph.tolerance&&(g=0))));this.reset();if(b){if(mxEvent.isAltDown(c.getEvent())&&this.graph.isToggleEvent(c.getEvent())){var e=new mxRectangle(this.x,
-this.y,this.width,this.height),h=this.graph.getCells(e.x,e.y,e.width,e.height);this.graph.removeSelectionCells(h)}else if(this.isSpaceEvent(c)){this.graph.model.beginUpdate();try{for(h=this.graph.getCellsBeyond(f,d,this.graph.getDefaultParent(),!0,!0),b=0;b<h.length;b++)if(this.graph.isCellMovable(h[b])){var n=this.graph.view.getState(h[b]),m=this.graph.getCellGeometry(h[b]);null!=n&&null!=m&&(m=m.clone(),m.translate(e,g),this.graph.model.setGeometry(h[b],m))}}finally{this.graph.model.endUpdate()}}else e=
-new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(e,c.getEvent());c.consume()}};mxRubberband.prototype.mouseMove=function(a,c){if(!c.isConsumed()&&null!=this.first){var b=mxUtils.getScrollOrigin(this.graph.container),f=mxUtils.getOffset(this.graph.container);b.x-=f.x;b.y-=f.y;var f=c.getX()+b.x,b=c.getY()+b.y,d=this.first.x-f,e=this.first.y-b,g=this.graph.tolerance;if(null!=this.div||Math.abs(d)>g||Math.abs(e)>g)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),
-this.update(f,b),this.isSpaceEvent(c)?(f=this.x+this.width,b=this.y+this.height,d=this.graph.view.scale,mxEvent.isAltDown(c.getEvent())||(this.width=this.graph.snap(this.width/d)*d,this.height=this.graph.snap(this.height/d)*d,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=f-this.width),this.y<this.first.y&&(this.y=b-this.height)),this.div.style.borderStyle="dashed",this.div.style.backgroundColor=
+d=null,f=null,e=null,g=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(d=this.first.x,f=this.first.y,e=(this.currentX-d)/this.graph.view.scale,g=(this.currentY-f)/this.graph.view.scale,mxEvent.isAltDown(c.getEvent())||(e=this.graph.snap(e),g=this.graph.snap(g),this.graph.isGridEnabled()||(Math.abs(e)<this.graph.tolerance&&(e=0),Math.abs(g)<this.graph.tolerance&&(g=0))));this.reset();if(b){if(mxEvent.isAltDown(c.getEvent())&&this.graph.isToggleEvent(c.getEvent())){var e=new mxRectangle(this.x,
+this.y,this.width,this.height),h=this.graph.getCells(e.x,e.y,e.width,e.height);this.graph.removeSelectionCells(h)}else if(this.isSpaceEvent(c)){this.graph.model.beginUpdate();try{for(h=this.graph.getCellsBeyond(d,f,this.graph.getDefaultParent(),!0,!0),b=0;b<h.length;b++)if(this.graph.isCellMovable(h[b])){var n=this.graph.view.getState(h[b]),m=this.graph.getCellGeometry(h[b]);null!=n&&null!=m&&(m=m.clone(),m.translate(e,g),this.graph.model.setGeometry(h[b],m))}}finally{this.graph.model.endUpdate()}}else e=
+new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(e,c.getEvent());c.consume()}};mxRubberband.prototype.mouseMove=function(a,c){if(!c.isConsumed()&&null!=this.first){var b=mxUtils.getScrollOrigin(this.graph.container),d=mxUtils.getOffset(this.graph.container);b.x-=d.x;b.y-=d.y;var d=c.getX()+b.x,b=c.getY()+b.y,f=this.first.x-d,e=this.first.y-b,g=this.graph.tolerance;if(null!=this.div||Math.abs(f)>g||Math.abs(e)>g)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),
+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,f){v.apply(this,arguments);b!=this.currentTerminalState?(m=(new Date).getTime(),w=0):w=(new Date).getTime()-m;this.currentTerminalState=b};var C=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"))&&C.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,f=this.state.getVisibleTerminalState(b),d=null!=a&&(0==a||a>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==a)?this.graph.getConnectionConstraint(this.state,
-f,b):null,b=null!=(null!=d?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(b),d):null)?this.fixedHandleImage:null!=d&&null!=f?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]),f=this.graph.getCellGeometry(a[0]);if(c.isEdge(b)&&null!=f&&f.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),f=this.graph.getCellGeometry(a.cell);return c.isEdge(b)&&null!=f&&f.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 D=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(a,c){var b=this.graph.getModel(),f=b.getParent(this.state.cell),d=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(c)==mxEvent.ROTATION_HANDLE||!b.isEdge(f)||null==d||!d.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&D.apply(this,arguments)};mxVertexHandler.prototype.isRotationHandleVisible=
+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 C=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"))&&C.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 D=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)&&D.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 B=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(a,c){B.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),f=this.graph.getLinksForState(this.state);this.updateLinkHint(b,
-f);if(null!=b||null!=f&&0<f.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 f=document.createElement("img");f.setAttribute("src",Editor.editImage);f.setAttribute("title",mxResources.get("editLink"));f.setAttribute("width","11");f.setAttribute("height","11");f.style.marginLeft="10px";f.style.marginBottom="-1px";f.style.cursor="pointer";this.linkHint.appendChild(f);mxEvent.addListener(f,"click",mxUtils.bind(this,
-function(a){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(a)}));f=document.createElement("img");f.setAttribute("src",Dialog.prototype.clearImage);f.setAttribute("title",mxResources.get("removeIt",[mxResources.get("link")]));f.setAttribute("width","13");f.setAttribute("height","10");f.style.marginLeft="4px";f.style.marginBottom="-1px";f.style.cursor="pointer";this.linkHint.appendChild(f);mxEvent.addListener(f,"click",mxUtils.bind(this,function(a){this.graph.setLinkForCell(this.state.cell,
-null);mxEvent.consume(a)}))}if(null!=b)for(f=0;f<b.length;f++){var d=document.createElement("div");d.style.marginTop=null!=c||0<f?"6px":"0px";d.appendChild(this.graph.createLinkForHint(b[f].getAttribute("href"),mxUtils.getTextContent(b[f])));this.linkHint.appendChild(d)}}};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,
+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,
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]||
@@ -2446,107 +2446,107 @@ a;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultV
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 C(){mxActor.call(this)}function x(){mxActor.call(this)}function t(){mxRectangleShape.call(this)}function z(){mxRectangleShape.call(this)}function D(){mxCylinder.call(this)}function N(){mxShape.call(this)}function B(){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,f,d,e,g,h,n,m){g+=n;var na=f.clone();f.x-=d*(2*g+n);f.y-=e*(2*g+n);d*=g+n;e*=g+n;return function(){a.ellipse(na.x-d-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,f,d,e){c=Math.max(0,Math.min(f,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));e?(a.moveTo(c,d),a.lineTo(c,c),a.lineTo(0,0),a.moveTo(c,c),a.lineTo(f,c)):(a.moveTo(0,0),a.lineTo(f-c,0),a.lineTo(f,c),a.lineTo(f,d),a.lineTo(c,d),a.lineTo(0,d-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,f,d){c=Math.min(f,d/Ba);a.translate((f-c)/2,(d-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,f,d,e){c=Math.min(f,d/(.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((f-c)/2,(d-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,f,d,e){c=Math.min(d/2,Math.round(d/8)+this.strokewidth-
-1);if(e&&null!=this.fill||!e&&null==this.fill)a.moveTo(0,c),a.curveTo(0,2*c,f,2*c,f,c),e||(a.stroke(),a.begin()),a.translate(0,c/2),a.moveTo(0,c),a.curveTo(0,2*c,f,2*c,f,c),e||(a.stroke(),a.begin()),a.translate(0,c/2),a.moveTo(0,c),a.curveTo(0,2*c,f,2*c,f,c),e||(a.stroke(),a.begin()),a.translate(0,-c);e||(a.moveTo(0,c),a.curveTo(0,-c/3,f,-c/3,f,c),a.lineTo(f,d-c),a.curveTo(f,d+c/3,0,d+c/3,0,d-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,f,d,e){c=Math.max(0,Math.min(f,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));e?(a.moveTo(f-c,0),a.lineTo(f-c,c),a.lineTo(f,c)):(a.moveTo(0,0),a.lineTo(f-c,0),a.lineTo(f,c),a.lineTo(f,d),a.lineTo(0,d),a.lineTo(0,0),a.close());a.end()};mxCellRenderer.registerShape("note",k);mxUtils.extend(l,mxActor);l.prototype.redrawPath=
-function(a,c,b,f,d){a.moveTo(0,0);a.quadTo(f/2,.5*d,f,0);a.quadTo(.5*f,d/2,f,d);a.quadTo(f/2,.5*d,0,d);a.quadTo(.5*f,d/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,f,d,e){c=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));b=Math.max(0,Math.min(d,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(f-c,b),a.lineTo(f,b)):("left"==g?(a.moveTo(0,0),a.lineTo(c,0),a.lineTo(c,b),a.lineTo(f,b)):(a.moveTo(0,b),a.lineTo(f-c,b),a.lineTo(f-c,0),a.lineTo(f,0)),a.lineTo(f,d),a.lineTo(0,d),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,f,d){c=Math.max(0,Math.min(f,Math.min(d,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(f,0),new mxPoint(f,d),new mxPoint(0,d),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,f,d){c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
-"size",this.size))));a.moveTo(0,c/2);a.quadTo(f/4,1.4*c,f/2,c/2);a.quadTo(3*f/4,c*(1-1.4),f,c/2);a.lineTo(f,d-c/2);a.quadTo(3*f/4,d-1.4*c,f/2,d-c/2);a.quadTo(f/4,d-c*(1-1.4),0,d-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,f=a.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return c*=
-f,new mxRectangle(a.x,a.y+c,b,f-2*c);c*=b;return new mxRectangle(a.x+c,a.y,b-2*c,f)}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,f,d){c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,
-0);a.lineTo(f,0);a.lineTo(f,d-c/2);a.quadTo(3*f/4,d-1.4*c,f/2,d-c/2);a.quadTo(f/4,d-c*(1-1.4),0,d-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,f){var d=mxUtils.getValue(this.style,"size");return null!=d?f*Math.max(0,Math.min(1,d)):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,f,d){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,d),new mxPoint(c,0),new mxPoint(f,0),new mxPoint(f-c,d)],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,f,d){c=f*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,d),new mxPoint(c,0),new mxPoint(f-c,0),new mxPoint(f,d)],this.isRounded,b,!0)};mxCellRenderer.registerShape("trapezoid",
-g);mxUtils.extend(n,mxActor);n.prototype.size=.5;n.prototype.redrawPath=function(a,c,b,f,d){a.setFillColor(null);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(f,0),new mxPoint(c,0),new mxPoint(c,d/2),new mxPoint(0,d/2),new mxPoint(c,d/2),new mxPoint(c,d),new mxPoint(f,d)],this.isRounded,b,!1);a.end()};mxCellRenderer.registerShape("curlyBracket",
-n);mxUtils.extend(r,mxActor);r.prototype.redrawPath=function(a,c,b,f,d){a.setStrokeWidth(1);a.setFillColor(this.stroke);c=f/5;a.rect(0,0,c,d);a.fillAndStroke();a.rect(2*c,0,c,d);a.fillAndStroke();a.rect(4*c,0,c,d);a.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",r);h.prototype.moveTo=function(a,c){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=c;this.firstX=a;this.firstY=c};h.prototype.close=function(){null!=this.firstX&&null!=this.firstY&&(this.lineTo(this.firstX,
-this.firstY),this.originalClose.apply(this.canvas,arguments));this.originalClose.apply(this.canvas,arguments)};h.prototype.quadTo=function(a,c,b,f){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=b;this.lastY=f};h.prototype.curveTo=function(a,c,b,f,d,e){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=d;this.lastY=e};h.prototype.arcTo=function(a,c,b,f,d,e,g){this.originalArcTo.apply(this.canvas,arguments);this.lastX=e;this.lastY=g};h.prototype.lineTo=function(a,c){if(null!=
-this.lastX&&null!=this.lastY){var b=function(a){return"number"===typeof a?a?0>a?-1:1:a===a?0:NaN:NaN},f=Math.abs(a-this.lastX),d=Math.abs(c-this.lastY),e=Math.sqrt(f*f+d*d);if(2>e){this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=c;return}var g=Math.round(e/10),h=this.defaultVariation;5>g&&(g=5,h/=3);for(var na=b(a-this.lastX)*f/g,b=b(c-this.lastY)*d/g,f=f/e,d=d/e,e=0;e<g;e++){var n=(Math.random()-.5)*h;this.originalLineTo.call(this.canvas,na*e+this.lastX-n*d,b*e+this.lastY-
-n*f)}this.originalLineTo.call(this.canvas,a,c)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=c};h.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};var Ha=mxShape.prototype.paint;mxShape.prototype.defaultJiggle=1.5;mxShape.prototype.paint=function(a){null!=
+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,
+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-
+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,
+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",
+g);mxUtils.extend(n,mxActor);n.prototype.size=.5;n.prototype.redrawPath=function(a,c,b,d,f){a.setFillColor(null);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(d,0),new mxPoint(c,0),new mxPoint(c,f/2),new mxPoint(0,f/2),new mxPoint(c,f/2),new mxPoint(c,f),new mxPoint(d,f)],this.isRounded,b,!1);a.end()};mxCellRenderer.registerShape("curlyBracket",
+n);mxUtils.extend(r,mxActor);r.prototype.redrawPath=function(a,c,b,d,f){a.setStrokeWidth(1);a.setFillColor(this.stroke);c=d/5;a.rect(0,0,c,f);a.fillAndStroke();a.rect(2*c,0,c,f);a.fillAndStroke();a.rect(4*c,0,c,f);a.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",r);h.prototype.moveTo=function(a,c){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=c;this.firstX=a;this.firstY=c};h.prototype.close=function(){null!=this.firstX&&null!=this.firstY&&(this.lineTo(this.firstX,
+this.firstY),this.originalClose.apply(this.canvas,arguments));this.originalClose.apply(this.canvas,arguments)};h.prototype.quadTo=function(a,c,b,d){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=b;this.lastY=d};h.prototype.curveTo=function(a,c,b,d,f,e){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=f;this.lastY=e};h.prototype.arcTo=function(a,c,b,d,f,e,g){this.originalArcTo.apply(this.canvas,arguments);this.lastX=e;this.lastY=g};h.prototype.lineTo=function(a,c){if(null!=
+this.lastX&&null!=this.lastY){var b=function(a){return"number"===typeof a?a?0>a?-1:1:a===a?0:NaN:NaN},d=Math.abs(a-this.lastX),f=Math.abs(c-this.lastY),e=Math.sqrt(d*d+f*f);if(2>e){this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=c;return}var g=Math.round(e/10),h=this.defaultVariation;5>g&&(g=5,h/=3);for(var na=b(a-this.lastX)*d/g,b=b(c-this.lastY)*f/g,d=d/e,f=f/e,e=0;e<g;e++){var n=(Math.random()-.5)*h;this.originalLineTo.call(this.canvas,na*e+this.lastX-n*f,b*e+this.lastY-
+n*d)}this.originalLineTo.call(this.canvas,a,c)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=c};h.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};var Ha=mxShape.prototype.paint;mxShape.prototype.defaultJiggle=1.5;mxShape.prototype.paint=function(a){null!=
this.style&&"0"!=mxUtils.getValue(this.style,"comic","0")&&null==a.handHiggle&&(a.handJiggle=new h(a,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle)));Ha.apply(this,arguments);null!=a.handJiggle&&(a.handJiggle.destroy(),delete a.handJiggle)};mxRhombus.prototype.defaultJiggle=2;var Ia=mxRectangleShape.prototype.isHtmlAllowed;mxRectangleShape.prototype.isHtmlAllowed=function(){return(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0"))&&Ia.apply(this,arguments)};var Ja=mxRectangleShape.prototype.paintBackground;
-mxRectangleShape.prototype.paintBackground=function(a,c,b,f,d){if(null==a.handJiggle)Ja.apply(this,arguments);else{var e=!0;null!=this.style&&(e="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(e||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)e||null!=this.fill&&this.fill!=mxConstants.NONE||(a.pointerEvents=!1),a.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?e=Math.min(f/2,Math.min(d/
-2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,e=Math.min(f*e,d*e)),a.moveTo(c+e,b),a.lineTo(c+f-e,b),a.quadTo(c+f,b,c+f,b+e),a.lineTo(c+f,b+d-e),a.quadTo(c+f,b+d,c+f-e,b+d),a.lineTo(c+e,b+d),a.quadTo(c,b+d,c,b+d-e),a.lineTo(c,b+e),a.quadTo(c,b,c+e,b)):(a.moveTo(c,b),a.lineTo(c+f,b),a.lineTo(c+f,b+d),a.lineTo(c,b+d),a.lineTo(c,b)),a.close(),a.end(),a.fillAndStroke()}};
-var Ka=mxRectangleShape.prototype.paintForeground;mxRectangleShape.prototype.paintForeground=function(a,c,b,f,d){null==a.handJiggle&&Ka.apply(this,arguments)};mxUtils.extend(m,mxRectangleShape);m.prototype.size=.1;m.prototype.isHtmlAllowed=function(){return!1};m.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var c=a.width,b=a.height;
-a=new mxRectangle(a.x,a.y,c,b);var f=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.max(f,Math.min(c*d,b*d));a.x+=Math.round(f);a.width-=Math.round(2*f)}return a};m.prototype.paintForeground=function(a,c,b,f,d){var e=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var g=mxUtils.getValue(this.style,
-mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,e=Math.max(e,Math.min(f*g,d*g));e=Math.round(e);a.begin();a.moveTo(c+e,b);a.lineTo(c+e,b+d);a.moveTo(c+f-e,b);a.lineTo(c+f-e,b+d);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,f,d){a.setFillColor(mxConstants.NONE);a.rect(c,b,f,d);a.fill()};w.prototype.paintForeground=function(a,
-c,b,f,d){};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,f,d){c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;b=Math.max(0,Math.min(d,
-parseFloat(mxUtils.getValue(this.style,"size",this.size))));var e=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),g=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),h=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(a,[new mxPoint(0,0),new mxPoint(f,0),new mxPoint(f,d-b),new mxPoint(Math.min(f,e+h),d-b),new mxPoint(g,d),new mxPoint(Math.max(0,e),d-b),new mxPoint(0,
-d-b)],this.isRounded,c,!0,[4])};mxCellRenderer.registerShape("callout",v);mxUtils.extend(C,mxActor);C.prototype.size=.2;C.prototype.fixedSize=20;C.prototype.isRoundable=function(){return!0};C.prototype.redrawPath=function(a,c,b,f,d){c="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):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(f-c,0),new mxPoint(f,d/2),new mxPoint(f-c,d),new mxPoint(0,d),new mxPoint(c,d/2)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("step",C);mxUtils.extend(x,mxHexagon);x.prototype.size=.25;x.prototype.isRoundable=function(){return!0};x.prototype.redrawPath=function(a,c,b,f,d){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(c,0),new mxPoint(f-c,0),new mxPoint(f,.5*d),new mxPoint(f-c,d),new mxPoint(c,d),new mxPoint(0,.5*d)],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,f,d){var e=Math.min(f/5,d/5)+1;a.begin();a.moveTo(c+f/2,b+e);a.lineTo(c+f/2,b+d-e);a.moveTo(c+e,b+d/2);a.lineTo(c+f-e,b+d/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,f,d){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;f-=2*e;d-=2*e;0<f&&0<d&&(a.setShadow(!1),Da.apply(this,[a,c,b,f,d]))}};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,
-f,d){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;f-=2*e;d-=2*e;0<f&&0<d&&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(f+this.strokewidth,d+this.strokewidth),r+=x,t+=x);var x=c,v=b,x=h==mxConstants.ALIGN_CENTER?x+(f-na)/2:h==mxConstants.ALIGN_RIGHT?x+(f-na-r):x+r,v=n==mxConstants.ALIGN_MIDDLE?v+(d-m)/2:n==mxConstants.ALIGN_BOTTOM?v+(d-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(D,mxCylinder);D.prototype.redrawPath=function(a,c,b,f,d,e){e?(a.moveTo(0,0),a.lineTo(f/2,d/2),a.lineTo(f,0),a.end()):(a.moveTo(0,0),a.lineTo(f,0),a.lineTo(f,d),a.lineTo(0,d),a.close())};mxCellRenderer.registerShape("message",D);mxUtils.extend(N,mxShape);N.prototype.paintBackground=function(a,c,b,f,d){a.translate(c,b);a.ellipse(f/4,0,f/2,d/4);a.fillAndStroke();a.begin();a.moveTo(f/2,d/4);a.lineTo(f/2,2*d/3);a.moveTo(f/2,d/3);a.lineTo(0,
-d/3);a.moveTo(f/2,d/3);a.lineTo(f,d/3);a.moveTo(f/2,2*d/3);a.lineTo(0,d);a.moveTo(f/2,2*d/3);a.lineTo(f,d);a.end();a.stroke()};mxCellRenderer.registerShape("umlActor",N);mxUtils.extend(B,mxShape);B.prototype.getLabelMargins=function(a){return new mxRectangle(a.width/6,0,0,0)};B.prototype.paintBackground=function(a,c,b,f,d){a.translate(c,b);a.begin();a.moveTo(0,d/4);a.lineTo(0,3*d/4);a.end();a.stroke();a.begin();a.moveTo(0,d/2);a.lineTo(f/6,d/2);a.end();a.stroke();a.ellipse(f/6,0,5*f/6,d);a.fillAndStroke()};
-mxCellRenderer.registerShape("umlBoundary",B);mxUtils.extend(G,mxEllipse);G.prototype.paintVertexShape=function(a,c,b,f,d){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(c+f/8,b+d);a.lineTo(c+7*f/8,b+d);a.end();a.stroke()};mxCellRenderer.registerShape("umlEntity",G);mxUtils.extend(J,mxShape);J.prototype.paintVertexShape=function(a,c,b,f,d){a.translate(c,b);a.begin();a.moveTo(f,0);a.lineTo(0,d);a.moveTo(0,0);a.lineTo(f,d);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,f,d){a.translate(c,b);a.begin();a.moveTo(3*f/8,d/8*1.1);a.lineTo(5*f/8,0);a.end();a.stroke();a.ellipse(0,d/8,f,7*d/8);a.fillAndStroke()};y.prototype.paintForeground=function(a,c,b,f,d){a.begin();a.moveTo(3*f/8,d/8*1.1);a.lineTo(5*f/8,d/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,f,d){var e=Math.max(0,Math.min(d,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,f,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,f,e),a.restore()));e<d&&(a.setDashed(!0),a.begin(),a.moveTo(c+f/2,b+e),a.lineTo(c+f/2,b+d),a.end(),a.stroke())};A.prototype.paintForeground=function(a,c,b,f,d){var e=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,a,c,b,f,Math.min(d,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,f,d){var e=this.corner,g=Math.min(f,Math.max(e,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),h=Math.min(d,Math.max(1.5*
-e,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),n=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);n!=mxConstants.NONE&&(a.setFillColor(n),a.rect(c,b,f,d),a.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(a,c,b,f,d),a.setGradient(this.fill,this.gradient,c,b,f,d,this.gradientDirection)):a.setFillColor(this.fill);a.begin();a.moveTo(c,b);a.lineTo(c+g,b);a.lineTo(c+g,b+Math.max(0,
-h-1.5*e));a.lineTo(c+Math.max(0,g-e),b+h);a.lineTo(c,b+h);a.close();a.fillAndStroke();a.begin();a.moveTo(c+g,b);a.lineTo(c+f,b);a.lineTo(c+f,b+d);a.lineTo(c,b+d);a.lineTo(c,b+h);a.stroke()};mxCellRenderer.registerShape("umlFrame",I);mxPerimeter.LifelinePerimeter=function(a,c,b,f){f=A.prototype.size;null!=c&&(f=mxUtils.getValue(c.style,"size",f)*c.view.scale);c=parseFloat(c.style[mxConstants.STYLE_STROKEWIDTH]||1)*c.view.scale/2-1;b.x<a.getCenterX()&&(c=-1*(c+1));return new mxPoint(a.getCenterX()+
-c,Math.min(a.y+a.height,Math.max(a.y+f,b.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(a,c,b,f){f=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(a,c,b,f){f=parseFloat(c.style[mxConstants.STYLE_STROKEWIDTH]||1)*c.view.scale/2-1;null!=c.style.backboneSize&&(f+=parseFloat(c.style.backboneSize)*
-c.view.scale/2-1);if("south"==c.style[mxConstants.STYLE_DIRECTION]||"north"==c.style[mxConstants.STYLE_DIRECTION])return b.x<a.getCenterX()&&(f=-1*(f+1)),new mxPoint(a.getCenterX()+f,Math.min(a.y+a.height,Math.max(a.y,b.y)));b.y<a.getCenterY()&&(f=-1*(f+1));return new mxPoint(Math.min(a.x+a.width,Math.max(a.x,b.x)),a.getCenterY()+f)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(a,c,b,f){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(a,
-new mxRectangle(0,0,0,Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(c.style,"size",v.prototype.size))*c.view.scale))),c.style),c,b,f)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(a,c,b,d){var e=f.prototype.size;null!=c&&(e=mxUtils.getValue(c.style,"size",e));var g=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==
+mxRectangleShape.prototype.paintBackground=function(a,c,b,d,f){if(null==a.handJiggle)Ja.apply(this,arguments);else{var e=!0;null!=this.style&&(e="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(e||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)e||null!=this.fill&&this.fill!=mxConstants.NONE||(a.pointerEvents=!1),a.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?e=Math.min(d/2,Math.min(f/
+2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,e=Math.min(d*e,f*e)),a.moveTo(c+e,b),a.lineTo(c+d-e,b),a.quadTo(c+d,b,c+d,b+e),a.lineTo(c+d,b+f-e),a.quadTo(c+d,b+f,c+d-e,b+f),a.lineTo(c+e,b+f),a.quadTo(c,b+f,c,b+f-e),a.lineTo(c,b+e),a.quadTo(c,b,c+e,b)):(a.moveTo(c,b),a.lineTo(c+d,b),a.lineTo(c+d,b+f),a.lineTo(c,b+f),a.lineTo(c,b)),a.close(),a.end(),a.fillAndStroke()}};
+var Ka=mxRectangleShape.prototype.paintForeground;mxRectangleShape.prototype.paintForeground=function(a,c,b,d,f){null==a.handJiggle&&Ka.apply(this,arguments)};mxUtils.extend(m,mxRectangleShape);m.prototype.size=.1;m.prototype.isHtmlAllowed=function(){return!1};m.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var c=a.width,b=a.height;
+a=new mxRectangle(a.x,a.y,c,b);var d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,d=Math.max(d,Math.min(c*f,b*f));a.x+=Math.round(d);a.width-=Math.round(2*d)}return a};m.prototype.paintForeground=function(a,c,b,d,f){var e=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));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));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(C,mxActor);C.prototype.size=.2;C.prototype.fixedSize=20;C.prototype.isRoundable=function(){return!0};C.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",C);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+
+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(D,mxCylinder);D.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",D);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(B,mxShape);B.prototype.getLabelMargins=function(a){return new mxRectangle(a.width/6,0,0,0)};B.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",B);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);
+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*
+e,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),n=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);n!=mxConstants.NONE&&(a.setFillColor(n),a.rect(c,b,d,f),a.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(a,c,b,d,f),a.setGradient(this.fill,this.gradient,c,b,d,f,this.gradientDirection)):a.setFillColor(this.fill);a.begin();a.moveTo(c,b);a.lineTo(c+g,b);a.lineTo(c+g,b+Math.max(0,
+h-1.5*e));a.lineTo(c+Math.max(0,g-e),b+h);a.lineTo(c,b+h);a.close();a.fillAndStroke();a.begin();a.moveTo(c+g,b);a.lineTo(c+d,b);a.lineTo(c+d,b+f);a.lineTo(c,b+f);a.lineTo(c,b+h);a.stroke()};mxCellRenderer.registerShape("umlFrame",I);mxPerimeter.LifelinePerimeter=function(a,c,b,d){d=A.prototype.size;null!=c&&(d=mxUtils.getValue(c.style,"size",d)*c.view.scale);c=parseFloat(c.style[mxConstants.STYLE_STROKEWIDTH]||1)*c.view.scale/2-1;b.x<a.getCenterX()&&(c=-1*(c+1));return new mxPoint(a.getCenterX()+
+c,Math.min(a.y+a.height,Math.max(a.y+d,b.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(a,c,b,d){d=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(a,c,b,d){d=parseFloat(c.style[mxConstants.STYLE_STROKEWIDTH]||1)*c.view.scale/2-1;null!=c.style.backboneSize&&(d+=parseFloat(c.style.backboneSize)*
+c.view.scale/2-1);if("south"==c.style[mxConstants.STYLE_DIRECTION]||"north"==c.style[mxConstants.STYLE_DIRECTION])return b.x<a.getCenterX()&&(d=-1*(d+1)),new mxPoint(a.getCenterX()+d,Math.min(a.y+a.height,Math.max(a.y,b.y)));b.y<a.getCenterY()&&(d=-1*(d+1));return new mxPoint(Math.min(a.x+a.width,Math.max(a.x,b.x)),a.getCenterY()+d)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(a,c,b,d){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(a,
+new mxRectangle(0,0,0,Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(c.style,"size",v.prototype.size))*c.view.scale))),c.style),c,b,d)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(a,c,b,d){var e=f.prototype.size;null!=c&&(e=mxUtils.getValue(c.style,"size",e));var g=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_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,f){var d=g.prototype.size;null!=c&&(d=mxUtils.getValue(c.style,"size",d));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?(d=n*Math.max(0,Math.min(1,d)),h=[new mxPoint(e+d,h),new mxPoint(e+n-d,h),new mxPoint(e+n,h+m),new mxPoint(e,h+m),new mxPoint(e+d,h)]):c==mxConstants.DIRECTION_WEST?
-(d=n*Math.max(0,Math.min(1,d)),h=[new mxPoint(e,h),new mxPoint(e+n,h),new mxPoint(e+n-d,h+m),new mxPoint(e+d,h+m),new mxPoint(e,h)]):c==mxConstants.DIRECTION_NORTH?(d=m*Math.max(0,Math.min(1,d)),h=[new mxPoint(e,h+d),new mxPoint(e+n,h),new mxPoint(e+n,h+m),new mxPoint(e,h+m-d),new mxPoint(e,h+d)]):(d=m*Math.max(0,Math.min(1,d)),h=[new mxPoint(e,h),new mxPoint(e+n,h+d),new mxPoint(e+n,h+m-d),new mxPoint(e,h+m),new mxPoint(e,h)]);m=a.getCenterX();a=a.getCenterY();a=new mxPoint(m,a);f&&(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,f){var d="0"!=mxUtils.getValue(c.style,"fixedSize","0"),e=d?C.prototype.fixedSize:C.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?(d=d?Math.max(0,Math.min(n,e)):n*Math.max(0,Math.min(1,e)),h=[new mxPoint(g,h),new mxPoint(g+n-d,h),new mxPoint(g+n,a),new mxPoint(g+n-d,h+m),new mxPoint(g,h+m),new mxPoint(g+d,a),new mxPoint(g,h)]):c==mxConstants.DIRECTION_WEST?(d=d?Math.max(0,Math.min(n,e)):n*Math.max(0,Math.min(1,e)),h=[new mxPoint(g+d,h),new mxPoint(g+n,h),new mxPoint(g+n-d,a),new mxPoint(g+n,h+m),new mxPoint(g+d,h+m),new mxPoint(g,a),new mxPoint(g+d,h)]):c==mxConstants.DIRECTION_NORTH?(d=d?Math.max(0,
-Math.min(m,e)):m*Math.max(0,Math.min(1,e)),h=[new mxPoint(g,h+d),new mxPoint(r,h),new mxPoint(g+n,h+d),new mxPoint(g+n,h+m),new mxPoint(r,h+m-d),new mxPoint(g,h+m),new mxPoint(g,h+d)]):(d=d?Math.max(0,Math.min(m,e)):m*Math.max(0,Math.min(1,e)),h=[new mxPoint(g,h),new mxPoint(r,h+d),new mxPoint(g+n,h),new mxPoint(g+n,h+m-d),new mxPoint(r,h+m),new mxPoint(g,h+m-d),new mxPoint(g,h)]);r=new mxPoint(r,a);f&&(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,f){var d=x.prototype.size;null!=c&&(d=mxUtils.getValue(c.style,"size",d));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?(d=n*Math.max(0,Math.min(1,d)),g=[new mxPoint(m,g),new mxPoint(e+h,g+d),new mxPoint(e+h,g+n-d),new mxPoint(m,
-g+n),new mxPoint(e,g+n-d),new mxPoint(e,g+d),new mxPoint(m,g)]):(d=h*Math.max(0,Math.min(1,d)),g=[new mxPoint(e+d,g),new mxPoint(e+h-d,g),new mxPoint(e+h,a),new mxPoint(e+h-d,g+n),new mxPoint(e+d,g+n),new mxPoint(e,a),new mxPoint(e+d,g)]);m=new mxPoint(m,a);f&&(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,f,
-d){var e=parseFloat(mxUtils.getValue(this.style,"size",this.size));a.translate(c,b);a.ellipse((f-e)/2,0,e,e);a.fillAndStroke();a.begin();a.moveTo(f/2,e);a.lineTo(f/2,d);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,f,d){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(f/2,e+g);a.lineTo(f/2,d);a.end();a.stroke();a.begin();a.moveTo((f-e)/2-g,e/2);a.quadTo((f-e)/2-g,e+g,f/2,e+g);a.quadTo((f+e)/2+g,e+g,(f+e)/2+g,e/2);a.end();a.stroke()};mxCellRenderer.registerShape("requires",Q);mxUtils.extend(X,mxShape);X.prototype.paintBackground=function(a,c,b,f,d){a.translate(c,b);a.begin();a.moveTo(0,0);a.quadTo(f,0,f,d/2);a.quadTo(f,d,0,d);a.end();a.stroke()};mxCellRenderer.registerShape("requiredInterface",X);mxUtils.extend(U,mxShape);U.prototype.inset=
-2;U.prototype.paintBackground=function(a,c,b,f,d){var e=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(c,b);a.ellipse(0,e,f-2*e,d-2*e);a.fillAndStroke();a.begin();a.moveTo(f/2,0);a.quadTo(f,0,f,d/2);a.quadTo(f,d,f/2,d);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,f,d,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*d-c/2,n=.7*d-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(f,0),a.lineTo(f,d),a.lineTo(b,d),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,f,d){var e=Math.min(4,Math.min(f/5,d/5));0<f&&0<d&&(a.ellipse(c+e,b+e,f-2*e,d-2*e),a.fillAndStroke());a.setShadow(!1);this.outerStroke&&(a.ellipse(c,b,f,d),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=
+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?C.prototype.fixedSize:C.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,
+"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,f,d){c=Math.min(d,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,d),new mxPoint(0,c),new mxPoint(f,0),new mxPoint(f,d)],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,f,d){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(f*g,d*g));g=Math.max(e,Math.min(f,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));e=Math.max(e,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.begin();a.moveTo(c,b+e);a.lineTo(c+f,b+e);a.end();a.stroke();a.begin();a.moveTo(c+g,b);a.lineTo(c+g,b+d);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,f,d){c=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));b=Math.max(0,Math.min(d,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(f,0),new mxPoint(f,b),new mxPoint(c,b),new mxPoint(c,d),new mxPoint(0,d)],this.isRounded,e,!0);a.end()};
-mxCellRenderer.registerShape("corner",S);mxUtils.extend(L,mxActor);L.prototype.redrawPath=function(a,c,b,f,d){a.moveTo(0,0);a.lineTo(0,d);a.end();a.moveTo(f,0);a.lineTo(f,d);a.end();a.moveTo(0,d/2);a.lineTo(f,d/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,f,d){c=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));b=Math.max(0,Math.min(d,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(f,0),new mxPoint(f,b),new mxPoint((f+c)/2,b),new mxPoint((f+c)/2,d),new mxPoint((f-c)/2,d),new mxPoint((f-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=
-function(a,c,b,f,d){var e=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));c=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));b=(d-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(f-c,b),new mxPoint(f-c,0),new mxPoint(f,d/2),new mxPoint(f-c,d),new mxPoint(f-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,f,d){var e=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",T.prototype.arrowWidth))));c=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",T.prototype.arrowSize))));b=(d-e)/2;var e=b+e,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,d/2),new mxPoint(c,0),new mxPoint(c,b),new mxPoint(f-c,b),new mxPoint(f-c,0),new mxPoint(f,
-d/2),new mxPoint(f-c,d),new mxPoint(f-c,e),new mxPoint(c,e),new mxPoint(c,d)],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,f,d){c=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(c,0);a.lineTo(f,0);a.quadTo(f-2*c,d/2,f,d);a.lineTo(c,d);a.quadTo(c-2*c,d/2,c,0);a.close();a.end()};mxCellRenderer.registerShape("dataStorage",R);mxUtils.extend(V,
-mxActor);V.prototype.redrawPath=function(a,c,b,f,d){a.moveTo(0,0);a.quadTo(f,0,f,d/2);a.quadTo(f,d,0,d);a.close();a.end()};mxCellRenderer.registerShape("or",V);mxUtils.extend(ga,mxActor);ga.prototype.redrawPath=function(a,c,b,f,d){a.moveTo(0,0);a.quadTo(f,0,f,d/2);a.quadTo(f,d,0,d);a.quadTo(f/2,d/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,f,d){c=Math.min(f/
-2,Math.min(d,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(f-c,0),new mxPoint(f,.8*c),new mxPoint(f,d),new mxPoint(0,d),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,f,d){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,0),new mxPoint(f,0),new mxPoint(f,d-c),new mxPoint(f/2,d),new mxPoint(0,d-c)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("offPageConnector",aa);mxUtils.extend(Z,mxEllipse);Z.prototype.paintVertexShape=function(a,c,b,f,d){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();
-a.moveTo(c+f/2,b+d);a.lineTo(c+f,b+d);a.end();a.stroke()};mxCellRenderer.registerShape("tapeData",Z);mxUtils.extend(pa,mxEllipse);pa.prototype.paintVertexShape=function(a,c,b,f,d){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(c,b+d/2);a.lineTo(c+f,b+d/2);a.end();a.stroke();a.begin();a.moveTo(c+f/2,b);a.lineTo(c+f/2,b+d);a.end();a.stroke()};mxCellRenderer.registerShape("orEllipse",pa);mxUtils.extend(qa,mxEllipse);qa.prototype.paintVertexShape=function(a,
-c,b,f,d){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(c+.145*f,b+.145*d);a.lineTo(c+.855*f,b+.855*d);a.end();a.stroke();a.begin();a.moveTo(c+.855*f,b+.145*d);a.lineTo(c+.145*f,b+.855*d);a.end();a.stroke()};mxCellRenderer.registerShape("sumEllipse",qa);mxUtils.extend(fa,mxRhombus);fa.prototype.paintVertexShape=function(a,c,b,f,d){mxRhombus.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(c,b+d/2);a.lineTo(c+f,b+d/2);
-a.end();a.stroke()};mxCellRenderer.registerShape("sortShape",fa);mxUtils.extend(la,mxEllipse);la.prototype.paintVertexShape=function(a,c,b,f,d){a.begin();a.moveTo(c,b);a.lineTo(c+f,b);a.lineTo(c+f/2,b+d/2);a.close();a.fillAndStroke();a.begin();a.moveTo(c,b+d);a.lineTo(c+f,b+d);a.lineTo(c+f/2,b+d/2);a.close();a.fillAndStroke()};mxCellRenderer.registerShape("collate",la);mxUtils.extend(ua,mxEllipse);ua.prototype.paintVertexShape=function(a,c,b,f,d){var e=b+d-5;a.begin();a.moveTo(c,b);a.lineTo(c,b+d);
-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+f,e);a.moveTo(c+f,b);a.lineTo(c+f,b+d);a.moveTo(c+f,e);a.lineTo(c+f-10,e-5);a.moveTo(c+f,e);a.lineTo(c+f-10,e+5);a.end();a.stroke()};mxCellRenderer.registerShape("dimension",ua);mxUtils.extend(ma,mxEllipse);ma.prototype.paintVertexShape=function(a,c,b,f,d){this.outline||a.setStrokeColor(null);mxRectangleShape.prototype.paintBackground.apply(this,arguments);null!=this.style&&(a.setStrokeColor(this.stroke),a.rect(c,
-b,f,d),a.fill(),a.begin(),a.moveTo(c,b),"1"==mxUtils.getValue(this.style,"top","1")?a.lineTo(c+f,b):a.moveTo(c+f,b),"1"==mxUtils.getValue(this.style,"right","1")?a.lineTo(c+f,b+d):a.moveTo(c+f,b+d),"1"==mxUtils.getValue(this.style,"bottom","1")?a.lineTo(c,b+d):a.moveTo(c,b+d),"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,f,d){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();"vertical"==mxUtils.getValue(this.style,"line")?(a.moveTo(c+f/2,b),a.lineTo(c+f/2,b+d)):(a.moveTo(c,b+d/2),a.lineTo(c+f,b+d/2));a.end();a.stroke()};mxCellRenderer.registerShape("lineEllipse",sa);mxUtils.extend(ha,mxActor);ha.prototype.redrawPath=function(a,c,b,f,d){c=Math.min(f,d/2);a.moveTo(0,0);a.lineTo(f-c,0);a.quadTo(f,0,f,d/2);a.quadTo(f,d,f-c,d);a.lineTo(0,d);a.close();a.end()};mxCellRenderer.registerShape("delay",
-ha);mxUtils.extend(ca,mxActor);ca.prototype.size=.2;ca.prototype.redrawPath=function(a,c,b,f,d){c=Math.min(d,f);var e=Math.max(0,Math.min(c,c*parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=(d-e)/2;b=c+e;var g=(f-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(f,c);a.lineTo(f,b);a.lineTo(e,b);a.lineTo(e,d);a.lineTo(g,d);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,f,d){c=Math.min(f,d/2);b=Math.min(f-c,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*f);a.moveTo(0,d/2);a.lineTo(b,0);a.lineTo(f-c,0);a.quadTo(f,0,f,d/2);a.quadTo(f,d,f-c,d);a.lineTo(b,d);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 f=[],d=0;d<c.length;d++)f.push(mxUtils.clone(c[d]));
-var d=a.state.dashed,e=a.state.fixDash;ia.prototype.origPaintEdgeShape.apply(this,[a,f,b]);3<=a.state.strokeWidth&&(f=mxUtils.getValue(this.style,"fillColor",null),null!=f&&(a.setStrokeColor(f),a.setStrokeWidth(a.state.strokeWidth-2),a.setDashed(d,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,f,d,e,g,h,n,m){var r=d*(g+n+1),t=e*(g+n+1);return function(){a.begin();a.moveTo(f.x-r/2-t/2,f.y-t/2+r/2);a.lineTo(f.x+t/2-3*r/2,f.y-3*t/2-r/2);a.stroke()}});mxMarker.addMarker("cross",function(a,c,b,f,d,e,g,h,n,m){var r=d*(g+n+1),t=e*(g+n+1);return function(){a.begin();
-a.moveTo(f.x-r/2-t/2,f.y-t/2+r/2);a.lineTo(f.x+t/2-3*r/2,f.y-3*t/2-r/2);a.moveTo(f.x-r/2+t/2,f.y-t/2-r/2);a.lineTo(f.x-t/2-3*r/2,f.y-3*t/2+r/2);a.stroke()}});mxMarker.addMarker("circle",wa);mxMarker.addMarker("circlePlus",function(a,c,b,f,d,e,g,h,n,m){var r=f.clone(),t=wa.apply(this,arguments),x=d*(g+2*n),v=e*(g+2*n);return function(){t.apply(this,arguments);a.begin();a.moveTo(r.x-d*n,r.y-e*n);a.lineTo(r.x-2*x+d*n,r.y-2*v+e*n);a.moveTo(r.x-x-v+e*n,r.y-v+x-d*n);a.lineTo(r.x+v-x-e*n,r.y-v-x+d*n);a.stroke()}});
-mxMarker.addMarker("async",function(a,c,b,f,d,e,g,h,n,m){c=d*n*1.118;b=e*n*1.118;d*=g+n;e*=g+n;var r=f.clone();r.x-=c;r.y-=b;f.x+=1*-d-c;f.y+=1*-e-b;return function(){a.begin();a.moveTo(r.x,r.y);h?a.lineTo(r.x-d-e/2,r.y-e+d/2):a.lineTo(r.x+e/2-d,r.y-e-d/2);a.lineTo(r.x-d,r.y-e);a.close();m?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync",function(a){a=null!=a?a:2;return function(c,b,f,d,e,g,h,n,m,r){e*=h+m;g*=h+m;var t=d.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,f,d,e,g){g=a.shape.getEdgeWidth()*a.view.scale+b;return new mxPoint(e.x+f*c/4+d*g/2,e.y+d*c/4-f*g/2)},function(c,f,d,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,f,d){return P(a,c,function(c){var d=a.absolutePoints,e=d.length-1;c=a.view.translate;var g=
-a.view.scale,h=b?d[0]:d[e],d=b?d[1]:d[e-1],e=d.x-h.x,n=d.y-h.y,m=Math.sqrt(e*e+n*n),h=f.call(this,m,e/m,n/m,h,d);return new mxPoint(h.x/g-c.x,h.y/g-c.y)},function(c,f,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);f.x=(f.x+c.x)*n;f.y=(f.y+c.y)*n;d.call(this,t,h/t,r/t,m,g,f,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))),f=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",T.prototype.arrowSize)));return new mxPoint(c.x+(1-f)*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(f){var d=[P(f,["size"],function(b){var f=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+f,b.y+f)},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(f.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(ja(f));return d}},xa=function(a,c,b,f,d){b=null!=b?b:1;return function(e){var g=[P(e,["size"],function(c){var b=null!=d?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,f=parseFloat(mxUtils.getValue(this.state.style,
-"size",b?d:a));return new mxPoint(c.x+Math.max(0,Math.min(c.width,f*(b?1:c.width))),c.getCenterY())},function(a,c,f){var g=null!=d?"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(f.getEvent())&&(a=e.view.graph.snap(a));this.state.style.size=a},null,f)];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 f=
-null!=c?c:b.height/8;if("1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var d=mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(b.x+b.width-Math.min(b.width/2,d),b.y+f)}d=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)*d),b.y+f)},function(c,b,f){"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,f,d,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=f;g.ignoreGrid=null!=d?d:!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,f,d,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(d.x+b*(e+a.shape.strokewidth*a.view.scale)+f*c/2,d.y+f*(e+a.shape.strokewidth*a.view.scale)-b*c/2)},function(b,f,d,e,g,h,n){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,h.x,h.y));f=mxUtils.ptLineDist(e.x,e.y,e.x+d,e.y-f,h.x,h.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(f-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,f,d,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(d.x+b*(e+a.shape.strokewidth*a.view.scale)+f*c/2,d.y+f*(e+a.shape.strokewidth*a.view.scale)-b*c/2)},function(b,f,d,e,g,h,n){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,h.x,h.y));f=mxUtils.ptLineDist(e.x,e.y,e.x+d,e.y-f,h.x,h.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(f-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())&&
+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,
+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=
+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=
+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)*
+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())&&
(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE],a.style.endWidth=a.style.startWidth);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]),Math.abs(parseFloat(a.style.startWidth)-parseFloat(a.style.endWidth))<c&&(a.style.startWidth=a.style.endWidth))})));mxUtils.getValue(a.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=
-mxConstants.NONE&&(b.push(ta(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(c,b,f,d,e){c=(a.shape.getEdgeWidth()-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(d.x+b*(e+a.shape.strokewidth*a.view.scale)-f*c/2,d.y+f*(e+a.shape.strokewidth*a.view.scale)+b*c/2)},function(b,f,d,e,g,h,n){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,h.x,h.y));f=mxUtils.ptLineDist(e.x,e.y,
-e.x+d,e.y-f,h.x,h.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(f-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_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]);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])})),b.push(ta(a,
-["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(c,b,f,d,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(d.x+b*(e+a.shape.strokewidth*a.view.scale)-f*c/2,d.y+f*(e+a.shape.strokewidth*a.view.scale)+b*c/2)},function(b,f,d,e,g,h,n){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,h.x,h.y));f=mxUtils.ptLineDist(e.x,e.y,e.x+d,e.y-
-f,h.x,h.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(f-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]=
+mxConstants.NONE&&(b.push(ta(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(c,b,d,f,e){c=(a.shape.getEdgeWidth()-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.width=Math.round(2*b)/a.view.scale;mxEvent.isControlDown(n.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]);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])})),b.push(ta(a,
+["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,
["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,
@@ -2556,7 +2556,7 @@ c.x)/b*2)))})]},note:function(a){return[P(a,["size"],function(a){var c=Math.max(
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-
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))),f=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+f),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,
+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=
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=
@@ -2565,9 +2565,9 @@ Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"tabWidth",p.proto
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(C.prototype.size,!0,null,!0,C.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,f,d){var e=a.view;f=null!=f&&0<f.length?f[0]:null;var g=a.absolutePoints,h=g[0],g=g[g.length-1];null!=
-f&&(f=e.transformControlPoint(a,f));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 f=c-v.y;c=(t*a-r*f)/(n*t-m*r);a=(m*a-n*f)/(m*r-n*t);x?(b&&(v=new mxPoint(v.x+n*c,v.y+m*c),d.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),d.push(v)),v=new mxPoint(v.x+
-n*c,v.y+m*c));d.push(v)};var v=h;null==f&&(f=new mxPoint(h.x+(g.x-h.x)/2,h.y+(g.y-h.y)/2));a(f.x,f.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=[];
+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=[];
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;
@@ -2681,15 +2681,16 @@ mxResources.get("synchronize"),mxUtils.bind(this,function(){this.reloadFile(a,b)
DrawioFile.prototype.showCopyDialog=function(a,b,e){this.invalidChecksum=this.inConflictState=!1;this.addUnsavedStatus();this.ui.showError(mxResources.get("externalChanges"),mxResources.get("fileChangedOverwriteDialog"),mxResources.get("makeCopy"),mxUtils.bind(this,function(){this.copyFile(a,b)}),null,mxResources.get("overwrite"),e,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog()}),360,this.constructor==DriveFile?180:150);null!=this.ui.dialog&&null!=this.ui.dialog.container&&
this.constructor==DriveFile&&(e=this.ui.createRealtimeNotice(),e.style.left="0",e.style.right="0",e.style.borderRadius="0",e.style.borderLeftStyle="none",e.style.borderRightStyle="none",e.style.marginBottom="26px",e.style.padding="8px 0 8px 0",this.ui.dialog.container.appendChild(e))};
DrawioFile.prototype.showConflictDialog=function(a,b){this.ui.showError(mxResources.get("externalChanges"),mxResources.get("fileChangedSyncDialog"),mxResources.get("overwrite"),a,null,mxResources.get("synchronize"),b,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog();this.handleFileError(null,!1)}),340,150)};
-DrawioFile.prototype.redirectToNewApp=function(a){this.ui.spinner.stop();if(!this.redirectDialogShowing){this.redirectDialogShowing=!0;var b=window.location.protocol+"//"+window.location.host+"/"+this.ui.getSearch("create title mode url drive splash state".split(" "))+"#"+this.getHash(),e=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("loading"));this.redirectDialogShowing=!1;window.location.href==b?window.location.reload():window.location.href=b});null!=a?this.ui.confirm(mxResources.get("redirectToNewApp"),
-e,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;null!=a&&a()})):this.ui.alert(mxResources.get("redirectToNewApp"),e)}};DrawioFile.prototype.handleFileSuccess=function(a){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(this.isModified()?this.fileChanged():a?(this.addAllSavedStatus(),null!=this.sync&&(this.sync.resetUpdateStatusThread(),this.sync.remoteFileChanged&&(this.sync.remoteFileChanged=!1,this.sync.fileChangedNotify()))):this.ui.editor.setStatus(""))};
+DrawioFile.prototype.redirectToNewApp=function(a){this.ui.spinner.stop();if(!this.redirectDialogShowing){this.redirectDialogShowing=!0;var b=window.location.protocol+"//"+window.location.host+"/"+this.ui.getSearch("create title mode url drive splash state".split(" "))+"#"+this.getHash(),e=mxUtils.bind(this,function(){var a=mxUtils.bind(this,function(){this.redirectDialogShowing=!1;window.location.href==b?window.location.reload():window.location.href=b});this.isModified()?this.ui.confirm(mxResources.get("allChangesLost"),
+mxUtils.bind(this,function(){this.redirectDialogShowing=!1}),a,mxResources.get("cancel"),mxResources.get("discardChanges")):a()});null!=a?this.ui.confirm(mxResources.get("redirectToNewApp"),e,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;null!=a&&a()})):this.ui.alert(mxResources.get("redirectToNewApp"),e)}};
+DrawioFile.prototype.handleFileSuccess=function(a){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(this.isModified()?this.fileChanged():a?(this.addAllSavedStatus(),null!=this.sync&&(this.sync.resetUpdateStatusThread(),this.sync.remoteFileChanged&&(this.sync.remoteFileChanged=!1,this.sync.fileChangedNotify()))):this.ui.editor.setStatus(""))};
DrawioFile.prototype.handleFileError=function(a,b){this.ui.spinner.stop();if(this.ui.getCurrentFile()==this)if(this.inConflictState)this.handleConflictError(a,b);else if(this.isModified()&&this.addUnsavedStatus(a),b)this.ui.handleError(a,null!=a?mxResources.get("errorSavingFile"):null);else if(!this.isModified()){var e=null!=a?null!=a.error?a.error.message:a.message:null;null!=e&&60<e.length&&(e=e.substring(0,60)+"...");this.ui.editor.setStatus('<div class="geStatusAlert" style="cursor:pointer;overflow:hidden;">'+
mxUtils.htmlEntities(mxResources.get("error"))+(null!=e?" ("+mxUtils.htmlEntities(e)+")":"")+"</div>")}};
DrawioFile.prototype.handleConflictError=function(a,b){var e=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),d=mxUtils.bind(this,function(a){this.handleFileError(a,!0)}),k=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("saving"))&&(this.ui.editor.setStatus(""),this.save(!0,e,d,null,!0,this.constructor==GitHubFile&&null!=a?a.commitMessage:null))}),l=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("updatingDocument"))&&this.synchronizeFile(mxUtils.bind(this,
function(){this.ui.spinner.stop();this.ui.spinner.spin(document.body,mxResources.get("saving"))&&this.save(!0,e,d,null,null,this.constructor==GitHubFile&&null!=a?a.commitMessage:null)}),d)});"none"==DrawioFile.SYNC?this.showCopyDialog(e,d,k):this.invalidChecksum?this.showRefreshDialog(e,d):b?this.showConflictDialog(k,l):this.addConflictStatus(mxUtils.bind(this,function(){this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("updatingDocument")));this.synchronizeFile(e,d)}),this.getErrorMessage(a))};
DrawioFile.prototype.getErrorMessage=function(a){return null!=a?null!=a.error?a.error.message:a.message:null};
DrawioFile.prototype.fileChanged=function(){this.setModified(!0);this.isAutosave()?(this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get("saving"))+"..."),this.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(a){null==this.autosaveThread&&this.handleFileSuccess(!0)}),mxUtils.bind(this,function(a){this.handleFileError(a)}))):this.isAutosaveOptional()&&this.ui.editor.autosave||this.inConflictState||this.addUnsavedStatus()};
-DrawioFile.prototype.fileSaved=function(a,b,e,d){this.invalidChecksum=this.inConflictState=!1;this.checkPages();null==this.sync?(this.shadowData=a,this.shadowPages=null,null!=e&&e()):this.sync.fileSaved(this.ui.getPagesForNode(mxUtils.parseXml(a).documentElement),b,e,d)};
+DrawioFile.prototype.fileSaved=function(a,b,e,d){try{this.invalidChecksum=this.inConflictState=!1,this.checkPages(),null==this.sync?(this.shadowData=a,this.shadowPages=null,null!=e&&e()):this.sync.fileSaved(this.ui.getPagesForNode(mxUtils.parseXml(a).documentElement),b,e,d)}catch(k){this.invalidChecksum=this.inConflictState=!0;null!=d&&d(k);try{this.sendErrorReport("Error in fileSaved",null,k)}catch(l){}}};
DrawioFile.prototype.autosave=function(a,b,e,d){null==this.lastAutosave&&(this.lastAutosave=(new Date).getTime());a=(new Date).getTime()-this.lastAutosave<b?a:0;this.clearAutosave();var k=window.setTimeout(mxUtils.bind(this,function(){this.lastAutosave=null;this.autosaveThread==k&&(this.autosaveThread=null);if(this.isModified()&&this.isAutosaveNow()){var a=this.isAutosaveRevision();a&&(this.lastAutosaveRevision=(new Date).getTime());this.save(a,mxUtils.bind(this,function(a){this.autosaveCompleted();
null!=e&&e(a)}),mxUtils.bind(this,function(a){null!=d&&d(a)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=e&&e(null)}),a);this.autosaveThread=k};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){};DrawioFile.prototype.clearAutosave=function(){null!=this.autosaveThread&&(window.clearTimeout(this.autosaveThread),this.autosaveThread=null)};
DrawioFile.prototype.isAutosaveRevision=function(){var a=(new Date).getTime();return null==this.lastAutosaveRevision||a-this.lastAutosaveRevision>this.maxAutosaveRevisionDelay};DrawioFile.prototype.descriptorChanged=function(){this.fireEvent(new mxEventObject("descriptorChanged"))};DrawioFile.prototype.contentChanged=function(){this.fireEvent(new mxEventObject("contentChanged"))};
@@ -2722,29 +2723,29 @@ dispName:"Lifeline"},{val:"orthogonalPerimeter",dispName:"Orthogonal"},{val:"bac
{name:"resizable",dispName:"Resizable",type:"bool",defVal:!0},{name:"resizeWidth",dispName:"Resize Width",type:"bool",defVal:!1},{name:"resizeHeight",dispName:"Resize Height",type:"bool",defVal:!1},{name:"rotatable",dispName:"Rotatable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0}];Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## The label is concatenated in the form fromlabel + label + tolabel if all are defined.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40.\n#\n# edgespacing: 40\n#\n## Name of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle. Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nEvan Miller,CFO,emi,Office 1,,me@example.com,#dae8fc,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Evan Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nRon Donovan,System Admin,rdo,Office 3,Evan Miller,me@example.com,#d5e8d4,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nTessa Valet,HR Director,tva,Office 4,Evan Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\n';
Editor.shadowOptionEnabled=!0;Editor.config=null;Editor.configVersion=null;Editor.configure=function(a,c){if(null!=a){Editor.config=a;Editor.configVersion=a.version;Menus.prototype.defaultFonts=a.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors=a.presetColors||ColorDialog.prototype.presetColors;ColorDialog.prototype.defaultColors=a.defaultColors||ColorDialog.prototype.defaultColors;StyleFormatPanel.prototype.defaultColorSchemes=a.defaultColorSchemes||StyleFormatPanel.prototype.defaultColorSchemes;
Graph.prototype.defaultEdgeLength=a.defaultEdgeLength||Graph.prototype.defaultEdgeLength;null!=a.templateFile&&(EditorUi.templateFile=a.templateFile);a.customFonts&&(Menus.prototype.defaultFonts=a.customFonts.concat(Menus.prototype.defaultFonts));a.customPresetColors&&(ColorDialog.prototype.presetColors=a.customPresetColors.concat(ColorDialog.prototype.presetColors));null!=a.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=a.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));
-if(null!=a.css){var b=document.createElement("style");b.setAttribute("type","text/css");b.appendChild(document.createTextNode(a.css));var f=document.getElementsByTagName("script")[0];f.parentNode.insertBefore(b,f)}null!=a.libraries&&(Sidebar.prototype.customEntries=a.libraries);null!=a.enabledLibraries&&(Sidebar.prototype.enabledLibraries=a.enabledLibraries);null!=a.defaultLibraries&&(Sidebar.prototype.defaultEntries=a.defaultLibraries);null!=a.defaultCustomLibraries&&(Editor.defaultCustomLibraries=
+if(null!=a.css){var b=document.createElement("style");b.setAttribute("type","text/css");b.appendChild(document.createTextNode(a.css));var d=document.getElementsByTagName("script")[0];d.parentNode.insertBefore(b,d)}null!=a.libraries&&(Sidebar.prototype.customEntries=a.libraries);null!=a.enabledLibraries&&(Sidebar.prototype.enabledLibraries=a.enabledLibraries);null!=a.defaultLibraries&&(Sidebar.prototype.defaultEntries=a.defaultLibraries);null!=a.defaultCustomLibraries&&(Editor.defaultCustomLibraries=
a.defaultCustomLibraries);null!=a.enableCustomLibraries&&(Editor.enableCustomLibraries=a.enableCustomLibraries);null!=a.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=a.defaultVertexStyle);null!=a.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=a.defaultEdgeStyle);a.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=a.emptyDiagramXml);a.thumbWidth&&(Sidebar.prototype.thumbWidth=a.thumbWidth);a.thumbHeight&&(Sidebar.prototype.thumbHeight=a.thumbHeight);a.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=
-a.emptyLibraryXml);a.sidebarWidth&&(EditorUi.prototype.hsplitPosition=a.sidebarWidth);a.fontCss&&(b=document.createElement("style"),b.setAttribute("type","text/css"),b.appendChild(document.createTextNode(a.fontCss)),f=document.getElementsByTagName("script")[0],f.parentNode.insertBefore(b,f),Editor.prototype.fontCss=a.fontCss);if(null!=a.plugins&&!c)for(App.initPluginCallback(),b=0;b<a.plugins.length;b++)mxscript(a.plugins[b])}};Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";
+a.emptyLibraryXml);a.sidebarWidth&&(EditorUi.prototype.hsplitPosition=a.sidebarWidth);a.fontCss&&(b=document.createElement("style"),b.setAttribute("type","text/css"),b.appendChild(document.createTextNode(a.fontCss)),d=document.getElementsByTagName("script")[0],d.parentNode.insertBefore(b,d),Editor.prototype.fontCss=a.fontCss);if(null!=a.plugins&&!c)for(App.initPluginCallback(),b=0;b<a.plugins.length;b++)mxscript(a.plugins[b])}};Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";
Editor.GUID_LENGTH=20;Editor.guid=function(a){a=null!=a?a:Editor.GUID_LENGTH;for(var c=[],b=0;b<a;b++)c.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return c.join("")};Editor.prototype.useForeignObjectForMath=!1;Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;var a=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(c){c=null!=c&&"mxlibrary"!=c.nodeName?this.extractGraphModel(c):null;if(null!=c){var b=
-c.getElementsByTagName("parsererror");if(null!=b&&0<b.length){var b=b[0],f=b.getElementsByTagName("div");null!=f&&0<f.length&&(b=f[0]);throw{message:mxUtils.getTextContent(b)};}if("mxGraphModel"==c.nodeName){b=c.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=b&&""!=b)b!=this.graph.currentStyle&&(f=null!=this.graph.themes?this.graph.themes[b]:mxUtils.load(STYLE_PATH+"/"+b+".xml").getDocumentElement(),null!=f&&(d=new mxCodec(f.ownerDocument),d.decode(f,this.graph.getStylesheet())));
-else if(f=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement(),null!=f){var d=new mxCodec(f.ownerDocument);d.decode(f,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&&
+c.getElementsByTagName("parsererror");if(null!=b&&0<b.length){var b=b[0],d=b.getElementsByTagName("div");null!=d&&0<d.length&&(b=d[0]);throw{message:mxUtils.getTextContent(b)};}if("mxGraphModel"==c.nodeName){b=c.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=b&&""!=b)b!=this.graph.currentStyle&&(d=null!=this.graph.themes?this.graph.themes[b]:mxUtils.load(STYLE_PATH+"/"+b+".xml").getDocumentElement(),null!=d&&(f=new mxCodec(d.ownerDocument),f.decode(d,this.graph.getStylesheet())));
+else if(d=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement(),null!=d){var 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(D){}return!1};Editor.prototype.extractGraphModel=function(a,c){if(null!=a&&"undefined"!==typeof pako){var b=a.ownerDocument.getElementsByTagName("div"),f=[];if(null!=b&&0<b.length)for(var d=0;d<b.length;d++)if("mxgraph"==b[d].getAttribute("class")){f.push(b[d]);
-break}0<f.length&&(b=f[0].getAttribute("data-mxgraph"),null!=b?(f=JSON.parse(b),null!=f&&null!=f.xml&&(f=mxUtils.parseXml(f.xml),a=f.documentElement)):(f=f[0].getElementsByTagName("div"),0<f.length&&(b=mxUtils.getTextContent(f[0]),b=this.graph.decompress(b),0<b.length&&(f=mxUtils.parseXml(b),a=f.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||(f=null,"diagram"==a.nodeName?f=a:"mxfile"==a.nodeName&&(b=a.getElementsByTagName("diagram"),0<b.length&&(f=b[Math.max(0,Math.min(b.length-1,urlParams.page||0))])),null!=f&&(b=this.graph.decompress(mxUtils.getTextContent(f)),null!=b&&0<b.length&&(a=mxUtils.parseXml(b).documentElement)));null==a||"mxGraphModel"==a.nodeName||c&&"mxfile"==a.nodeName||
+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(D){}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=
function(){d.apply(this,arguments);mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath&&null!=Editor.MathJaxRender?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=function(a,c){a=null!=a?a:"https://math.draw.io/current/MathJax.js?config=TeX-MML-AM_HTMLorMML";Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(a){window.setTimeout(function(){"hidden"!=
a.style.visibility&&MathJax.Hub.Queue(["Typeset",MathJax.Hub,a])},0)};window.MathJax={skipStartupTypeset:!0,showMathMenu:!1,messageStyle:"none",AuthorInit:function(){MathJax.Hub.Config(c||{jax:["input/TeX","input/MathML","input/AsciiMath","output/HTML-CSS"],extensions:["tex2jax.js","mml2jax.js","asciimath2jax.js"],"HTML-CSS":{imageFont:null},TeX:{extensions:["AMSmath.js","AMSsymbols.js","noErrors.js","noUndefined.js"]},tex2jax:{ignoreClass:"mxCellEditor"},asciimath2jax:{ignoreClass:"mxCellEditor"}});
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 b=Editor.prototype.init;Editor.prototype.init=function(){b.apply(this,arguments);this.graph.addListener(mxEvent.SIZE,mxUtils.bind(this,function(a,
-c){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 c=[];a.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\[\S\s][^"\\]*)*)"|([^,'"\s\\]*(?:\s+[^,'"\s\\]+)*))\s*(?:,|$)/g,function(a,b,f,d){void 0!==b?c.push(b.replace(/\\'/g,"'")):void 0!==f?c.push(f.replace(/\\"/g,'"')):void 0!==d&&c.push(d);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()};
+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,f=this.createOption(mxResources.get("shadow"),function(){return b.shadowVisible},function(a){var f=new ChangePageSetup(c);f.ignoreColor=!0;f.ignoreImage=!0;f.shadowVisible=a;b.model.execute(f)},{install:function(a){this.listener=function(){a(b.shadowVisible)};c.addListener("shadowVisibleChanged",this.listener)},destroy:function(){c.removeListener(this.listener)}});
-Editor.shadowOptionEnabled||(f.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(f,60));a.appendChild(f)}return a};var c=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(a){a=c.apply(this,arguments);var b=this.editorUi,f=b.editor.graph;if(f.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()&&f.isEnabled()&&"undefined"!==typeof MathJax){d=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)}});d.style.paddingTop="5px";a.appendChild(d);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";d.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",
+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)}});
+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",
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,
@@ -2764,54 +2765,54 @@ type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.offPageConnector.pro
{fill:"#d5e8d4",stroke:"#82b366"},{fill:"#ffe6cc",stroke:"#d79b00"},{fill:"#fff2cc",stroke:"#d6b656"},{fill:"#f8cecc",stroke:"#b85450"},{fill:"#e1d5e7",stroke:"#9673a6"}],[{fill:"#60a917",stroke:"#2D7600",font:"#ffffff"},{fill:"#008a00",stroke:"#005700",font:"#ffffff"},{fill:"#1ba1e2",stroke:"#006EAF",font:"#ffffff"},{fill:"#0050ef",stroke:"#001DBC",font:"#ffffff"},{fill:"#6a00ff",stroke:"#3700CC",font:"#ffffff"},{fill:"#aa00ff",stroke:"#7700CC",font:"#ffffff"},{fill:"#d80073",stroke:"#A50040",font:"#ffffff"},
{fill:"#a20025",stroke:"#6F0000",font:"#ffffff"}],[{fill:"#e51400",stroke:"#B20000",font:"#ffffff"},{fill:"#fa6800",stroke:"#C73500",font:"#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,c,b){if(null!=c){var f=function(a){if(null!=a)if(b)for(var f=0;f<a.length;f++)c[a[f].name]=
-a[f];else for(var d in c){for(var e=!1,f=0;f<a.length;f++)if(a[f].name==d&&a[f].type==c[d].type){e=!0;break}e||delete c[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 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==
+{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(B){}}};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 f(a,
-c,b,f){v.getModel().beginUpdate();try{var d=[],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!=f?g.splice(f,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()),d.push(b.countProperty),e.push(g.length))}v.setCellStyles(a,c,v.getSelectionCells());
-d.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());d.push(b.dependentProps[a]);e.push(m)}r.editorUi.fireEvent(new mxEventObject("styleChanged","keys",d,"values",e,"cells",v.getSelectionCells()))}finally{v.getModel().endUpdate()}}function d(c,b,f){var d=mxUtils.getOffset(a,
-!0),e=mxUtils.getOffset(c,!0);b.style.position="absolute";b.style.left=e.x-d.x+"px";b.style.top=e.y-d.y+"px";b.style.width=c.offsetWidth+"px";b.style.height=c.offsetHeight-(f?4:0)+"px";b.style.zIndex=5}function e(a,c,b){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=c&&"none"!=c?c:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(r,function(e){this.editorUi.pickColor(c,
-function(c){d.style.background="none"==c?"url('"+Dialog.prototype.noColorImage+"')":c;f(a,c,b)});mxEvent.consume(e)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(d);return btn}function g(a,c,b,d,e,g,h){null!=c&&(c=c.split(","),t.push({name:a,values:c,type:b,defVal:d,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:d,countProperty:e},r=m(a,"",v,0==r%2,h);f(a,d,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,f,d,e,g){if(0<d){var h=Array(d);c=null!=c?c.split(","):[];for(var n=0;n<d;n++)h[n]=null!=c[n]?c[n]:null!=f?f:"";t.push({name:a,values:h,type:b,defVal:f,parentRow:e,flipBkg:g,size:d})}return document.createElement("div")}
-function n(a,c,b){var d=document.createElement("input");d.type="checkbox";d.checked="1"==c;mxEvent.addListener(d,"change",function(){f(a,d.checked?"1":"0",b)});return d}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");
+"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,
+!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=
-document.createElement("select");d(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);f(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)+"");f(c,a,m)}var g=document.createElement("input");d(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){f(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));
+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 f=a.childNodes.length-1;0<=f;f--)try{var d=a.childNodes[f],e=d.nodeName.toUpperCase();"INPUT"!=e&&"SELECT"!=e||a.removeChild(d)}catch(aa){}}else l.src=Sidebar.prototype.expandedImage,b="";for(f=0;f<c.length;f++)c[f].style.display=b};mxEvent.addListener(w,"click",function(){r.editorUi.propertiesCollapsed=!r.editorUi.propertiesCollapsed;z()});w.appendChild(x);
+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,C=!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)C=!C;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,C));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=
-function(a){function c(a){function c(a){var c=mxUtils.button("",function(c){f.getModel().beginUpdate();try{var b=f.getSelectionCells();for(c=0;c<b.length;c++){for(var d=f.getModel().getStyle(b[c]),g=0;g<e.length;g++)d=mxUtils.removeStylename(d,e[g]);var h=f.getModel().isVertex(b[c])?f.defaultVertexStyle:f.defaultEdgeStyle;null!=a?(d=mxUtils.setStyle(d,mxConstants.STYLE_FILLCOLOR,a.fill||mxUtils.getValue(h,mxConstants.STYLE_FILLCOLOR,null)),d=mxUtils.setStyle(d,mxConstants.STYLE_STROKECOLOR,a.stroke||
-mxUtils.getValue(h,mxConstants.STYLE_STROKECOLOR,null)),d=mxUtils.setStyle(d,mxConstants.STYLE_GRADIENTCOLOR,a.gradient||mxUtils.getValue(h,mxConstants.STYLE_GRADIENTCOLOR,null)),f.getModel().isVertex(b[c])&&(d=mxUtils.setStyle(d,mxConstants.STYLE_FONTCOLOR,a.font||mxUtils.getValue(h,mxConstants.STYLE_FONTCOLOR,null)))):(d=mxUtils.setStyle(d,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(h,mxConstants.STYLE_FILLCOLOR,"#ffffff")),d=mxUtils.setStyle(d,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(h,
-mxConstants.STYLE_STROKECOLOR,"#000000")),d=mxUtils.setStyle(d,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(h,mxConstants.STYLE_GRADIENTCOLOR,null)),f.getModel().isVertex(b[c])&&(d=mxUtils.setStyle(d,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(h,mxConstants.STYLE_FONTCOLOR,null))));f.getModel().setStyle(b[c],d)}}finally{f.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&&
-(mxClient.IS_QUIRKS||10>document.documentMode)?c.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+a.fill+"', EndColorStr='"+a.gradient+"', GradientType=0)":c.style.backgroundImage="linear-gradient("+a.fill+" 0px,"+a.gradient+" 100%)":a.fill==mxConstants.NONE?c.style.background="url('"+Dialog.prototype.noColorImage+"')":c.style.backgroundColor=a.fill||mxUtils.getValue(f.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff"),c.style.border="1px solid "+(a.stroke||mxUtils.getValue(f.defaultVertexStyle,
-mxConstants.STYLE_STROKECOLOR,"#000000"));else{var b=mxUtils.getValue(f.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff"),g=mxUtils.getValue(f.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");c.style.backgroundColor=b;c.style.border="1px solid "+g}d.appendChild(c)}d.innerHTML="";for(var b=0;b<a.length;b++)0<b&&0==mxUtils.mod(b,4)&&mxUtils.br(d),c(a[b])}function b(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 e="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=
+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&&
+(mxClient.IS_QUIRKS||10>document.documentMode)?c.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+a.fill+"', EndColorStr='"+a.gradient+"', GradientType=0)":c.style.backgroundImage="linear-gradient("+a.fill+" 0px,"+a.gradient+" 100%)":a.fill==mxConstants.NONE?c.style.background="url('"+Dialog.prototype.noColorImage+"')":c.style.backgroundColor=a.fill||mxUtils.getValue(d.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff"),c.style.border="1px solid "+(a.stroke||mxUtils.getValue(d.defaultVertexStyle,
+mxConstants.STYLE_STROKECOLOR,"#000000"));else{var b=mxUtils.getValue(d.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff"),g=mxUtils.getValue(d.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");c.style.backgroundColor=b;c.style.border="1px solid "+g}f.appendChild(c)}f.innerHTML="";for(var b=0;b<a.length;b++)0<b&&0==mxUtils.mod(b,4)&&mxUtils.br(f),c(a[b])}function b(a){mxEvent.addListener(a,"mouseenter",function(){a.style.opacity="1"});mxEvent.addListener(a,"mouseleave",function(){a.style.opacity=
+"0.5"})}var d=this.editorUi.editor.graph,f=document.createElement("div");f.style.whiteSpace="nowrap";f.style.paddingLeft="24px";f.style.paddingRight="20px";a.style.paddingLeft="16px";a.style.paddingBottom="6px";a.style.position="relative";a.appendChild(f);var e="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 g=document.createElement("div");g.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(g,
"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme-1,this.defaultColorSchemes.length);c(this.defaultColorSchemes[this.editorUi.currentScheme])}));var h=document.createElement("div");h.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(g),a.appendChild(h));mxEvent.addListener(h,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme+1,this.defaultColorSchemes.length);c(this.defaultColorSchemes[this.editorUi.currentScheme])}));b(g);b(h);c(this.defaultColorSchemes[this.editorUi.currentScheme]);return a};StyleFormatPanel.prototype.addEditOps=function(a){var c=this.format.getSelectionState(),b=null;1==this.editorUi.editor.graph.getSelectionCount()&&
-(b=mxUtils.button(mxResources.get("editStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("editStyle").funct()})),b.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),b.style.width="202px",b.style.marginBottom="2px",a.appendChild(b));var f=this.editorUi.editor.graph,d=f.view.getState(f.getSelectionCell());1==f.getSelectionCount()&&null!=d&&null!=d.shape&&null!=d.shape.stencil?(c=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,
+(b=mxUtils.button(mxResources.get("editStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("editStyle").funct()})),b.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),b.style.width="202px",b.style.marginBottom="2px",a.appendChild(b));var d=this.editorUi.editor.graph,f=d.view.getState(d.getSelectionCell());1==d.getSelectionCount()&&null!=f&&null!=f.shape&&null!=f.shape.stencil?(c=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,
function(a){this.editorUi.actions.get("editShape").funct()})),c.setAttribute("title",mxResources.get("editShape")),c.style.marginBottom="2px",null==b?c.style.width="202px":(b.style.width="100px",c.style.width="100px",c.style.marginLeft="2px"),a.appendChild(c)):c.image&&(c=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(a){this.editorUi.actions.get("image").funct()})),c.setAttribute("title",mxResources.get("editImage")),c.style.marginBottom="2px",null==b?c.style.width="202px":
(b.style.width="100px",c.style.width="100px",c.style.marginLeft="2px"),a.appendChild(c));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=
"3";Graph.prototype.edgeMode="move"!=urlParams.edge;var n=Graph.prototype.init;Graph.prototype.init=function(){function a(a){c=a;if(mxClient.IS_QUIRKS||7==document.documentMode||8==document.documentMode)c=mxUtils.clone(a)}n.apply(this,arguments);var c=null;mxEvent.addListener(this.container,"mouseenter",a);mxEvent.addListener(this.container,"mousemove",a);mxEvent.addListener(this.container,"mouseleave",function(a){c=null});this.isMouseInsertPoint=function(){return null!=c};var b=this.getInsertPoint;
-this.getInsertPoint=function(){return null!=c?this.getPointForEvent(c):b.apply(this,arguments)};var f=this.layoutManager.getLayout;this.layoutManager.getLayout=function(a){var c=this.graph.view.getState(a),c=null!=c?c.style:this.graph.getCellStyle(a);if(null!=c){if("undefined"!=typeof mxRackContainer&&"rack"==c.childLayout){var b=new mxStackLayout(this.graph,!1);b.setChildGeometry=function(a,c){c.height=Math.max(c.height,20);if(1<c.height/20){var b=c.height%20;c.height+=10<b?20-b:-b}this.graph.getModel().setGeometry(a,
+this.getInsertPoint=function(){return null!=c?this.getPointForEvent(c):b.apply(this,arguments)};var d=this.layoutManager.getLayout;this.layoutManager.getLayout=function(a){var c=this.graph.view.getState(a),c=null!=c?c.style:this.graph.getCellStyle(a);if(null!=c){if("undefined"!=typeof mxRackContainer&&"rack"==c.childLayout){var b=new mxStackLayout(this.graph,!1);b.setChildGeometry=function(a,c){c.height=Math.max(c.height,20);if(1<c.height/20){var b=c.height%20;c.height+=10<b?20-b:-b}this.graph.getModel().setGeometry(a,
c)};b.fill=!0;b.unitSize=mxRackContainer.unitSize|20;b.marginLeft=c.marginLeft||0;b.marginRight=c.marginRight||0;b.marginTop=c.marginTop||0;b.marginBottom=c.marginBottom||0;b.resizeParent=!1;return b}if("undefined"!=typeof mxTableLayout&&"tableLayout"==c.childLayout)return b=new mxTableLayout(this.graph),b.rows=c.tableRows||2,b.columns=c.tableColumns||2,b.colPercentages=c.colPercentages,b.rowPercentages=c.rowPercentages,b.equalColumns="1"==mxUtils.getValue(c,"equalColumns",b.colPercentages?"0":"1"),
-b.equalRows="1"==mxUtils.getValue(c,"equalRows",b.rowPercentages?"0":"1"),b.resizeParent="1"==mxUtils.getValue(c,"resizeParent","1"),b.border=c.tableBorder||b.border,b.marginLeft=c.marginLeft||0,b.marginRight=c.marginRight||0,b.marginTop=c.marginTop||0,b.marginBottom=c.marginBottom||0,b.autoAddCol="1"==mxUtils.getValue(c,"autoAddCol","0"),b.autoAddRow="1"==mxUtils.getValue(c,"autoAddRow",b.autoAddCol?"0":"1"),b.colWidths=c.colWidths||"100",b.rowHeights=c.rowHeights||"50",b}return f.apply(this,arguments)}};
+b.equalRows="1"==mxUtils.getValue(c,"equalRows",b.rowPercentages?"0":"1"),b.resizeParent="1"==mxUtils.getValue(c,"resizeParent","1"),b.border=c.tableBorder||b.border,b.marginLeft=c.marginLeft||0,b.marginRight=c.marginRight||0,b.marginTop=c.marginTop||0,b.marginBottom=c.marginBottom||0,b.autoAddCol="1"==mxUtils.getValue(c,"autoAddCol","0"),b.autoAddRow="1"==mxUtils.getValue(c,"autoAddRow",b.autoAddCol?"0":"1"),b.colWidths=c.colWidths||"100",b.rowHeights=c.rowHeights||"50",b}return d.apply(this,arguments)}};
var r=Graph.prototype.isCssTransformsSupported;Graph.prototype.isCssTransformsSupported=function(){return r.apply(this,arguments)&&!mxClient.IS_SF};var h=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(a){var c=h.apply(this,arguments);if(null==c){if(null==this.globalUrlVars&&null!=urlParams.vars)try{this.globalUrlVars=JSON.parse(decodeURIComponent(urlParams.vars))}catch(z){null!=window.console&&console.log("Error in vars URL parameter: "+z)}null!=this.globalUrlVars&&(c=
this.globalUrlVars[a])}return c};var m=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){m.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var a=this.getDrawPane().parentNode;!this.graph.mathEnabled||mxClient.NO_FO||null!=this.webKitForceRepaintNode&&null!=this.webKitForceRepaintNode.parentNode||"svg"!=this.graph.container.firstChild.nodeName?null==this.webKitForceRepaintNode||this.graph.mathEnabled&&("svg"==this.graph.container.firstChild.nodeName||
this.graph.container.firstChild==this.webKitForceRepaintNode)||(null!=this.webKitForceRepaintNode.parentNode&&this.webKitForceRepaintNode.parentNode.removeChild(this.webKitForceRepaintNode),this.webKitForceRepaintNode=null):(this.webKitForceRepaintNode=document.createElement("div"),this.webKitForceRepaintNode.style.cssText="position:absolute;",a.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,a.ownerSVGElement))}};var w=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=
function(){w.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 c=0;c<a.actions.length;c++)if(null!=a.actions[c].open)if(this.isCustomLink(a.actions[c].open)){if(!this.customLinkClicked(a.actions[c].open))return}else this.openLink(a.actions[c].open);this.model.beginUpdate();try{for(c=0;c<a.actions.length;c++)this.handleLinkAction(a.actions[c])}finally{this.model.endUpdate()}}};
Graph.prototype.handleLinkAction=function(a){var c=[];null!=a.select&&this.isEnabled()&&(c=this.getCellsForAction(a.select),this.setSelectionCells(c));null!=a.highlight&&(c=this.getCellsForAction(a.highlight),this.highlightCells(c,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&&(c=this.getCellsForAction(a.scroll));0<c.length&&this.scrollCellToVisible(c[0])};Graph.prototype.getCellsForAction=function(a){return this.getCellsById(a.cells).concat(this.getCellsForTags(a.tags))};Graph.prototype.getCellsById=function(a){var c=[];if(null!=a)for(var b=0;b<a.length;b++)if("*"==a[b])var f=this.getDefaultParent(),c=c.concat(this.model.filterDescendants(function(a){return a!=f},f));else{var d=this.model.getCell(a[b]);null!=d&&c.push(d)}return c};Graph.prototype.getCellsForTags=
-function(a,c,b){var f=[];if(null!=a){c=null!=c?c:this.model.getDescendants(this.model.getRoot());b=null!=b?b:"tags";for(var d=0;d<c.length;d++)if(this.model.isVertex(c[d])||this.model.isEdge(c[d])){var e=null!=c[d].value&&"object"==typeof c[d].value?mxUtils.trim(c[d].value.getAttribute(b)||""):"",g=!0;if(0<e.length)for(var e=e.toLowerCase().split(" "),h=0;h<a.length&&g;h++)var n=mxUtils.trim(a[h]).toLowerCase(),g=g&&(0==n.length||0<=mxUtils.indexOf(e,n));else g=0==a.length;g&&f.push(c[d])}}return f};
-Graph.prototype.toggleCells=function(a){this.model.beginUpdate();try{for(var c=0;c<a.length;c++)this.model.setVisible(a[c],!this.model.isVisible(a[c]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(a,c){this.model.beginUpdate();try{for(var b=0;b<a.length;b++)this.model.setVisible(a[b],c)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(a,c,b,f){for(var d=0;d<a.length;d++)this.highlightCell(a[d],c,b,f)};Graph.prototype.highlightCell=function(a,c,
-b,f){c=null!=c?c:mxConstants.DEFAULT_VALID_COLOR;b=null!=b?b:1E3;a=this.view.getState(a);if(null!=a){var d=Math.max(5,mxUtils.getValue(a.style,mxConstants.STYLE_STROKEWIDTH,1)+4),e=new mxCellHighlight(this,c,d,!1);null!=f&&(e.opacity=f);e.highlight(a);window.setTimeout(function(){null!=e.shape&&(mxUtils.setPrefixedStyle(e.shape.node.style,"transition","all 1200ms ease-in-out"),e.shape.node.style.opacity=0);window.setTimeout(function(){e.destroy()},1200)},b)}};Graph.prototype.addSvgShadow=function(a,
-c,b){b=null!=b?b:!1;var f=a.ownerDocument,d=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"filter"):f.createElement("filter");d.setAttribute("id",this.shadowId);var e=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):f.createElement("feGaussianBlur");e.setAttribute("in","SourceAlpha");e.setAttribute("stdDeviation",this.svgShadowBlur);e.setAttribute("result","blur");d.appendChild(e);e=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feOffset"):
-f.createElement("feOffset");e.setAttribute("in","blur");e.setAttribute("dx",this.svgShadowSize);e.setAttribute("dy",this.svgShadowSize);e.setAttribute("result","offsetBlur");d.appendChild(e);e=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feFlood"):f.createElement("feFlood");e.setAttribute("flood-color",this.svgShadowColor);e.setAttribute("flood-opacity",this.svgShadowOpacity);e.setAttribute("result","offsetColor");d.appendChild(e);e=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,
-"feComposite"):f.createElement("feComposite");e.setAttribute("in","offsetColor");e.setAttribute("in2","offsetBlur");e.setAttribute("operator","in");e.setAttribute("result","offsetBlur");d.appendChild(e);e=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feBlend"):f.createElement("feBlend");e.setAttribute("in","SourceGraphic");e.setAttribute("in2","offsetBlur");d.appendChild(e);e=a.getElementsByTagName("defs");0==e.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=e[0];f.appendChild(d);b||((c||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,c){mxClient.IS_SVG&&(c=null!=c?c:!0,(this.shadowVisible=a)?this.view.getDrawPane().setAttribute("filter",
+a.scroll&&(c=this.getCellsForAction(a.scroll));0<c.length&&this.scrollCellToVisible(c[0])};Graph.prototype.getCellsForAction=function(a){return this.getCellsById(a.cells).concat(this.getCellsForTags(a.tags))};Graph.prototype.getCellsById=function(a){var c=[];if(null!=a)for(var b=0;b<a.length;b++)if("*"==a[b])var d=this.getDefaultParent(),c=c.concat(this.model.filterDescendants(function(a){return a!=d},d));else{var f=this.model.getCell(a[b]);null!=f&&c.push(f)}return c};Graph.prototype.getCellsForTags=
+function(a,c,b){var d=[];if(null!=a){c=null!=c?c:this.model.getDescendants(this.model.getRoot());b=null!=b?b:"tags";for(var f=0;f<c.length;f++)if(this.model.isVertex(c[f])||this.model.isEdge(c[f])){var e=null!=c[f].value&&"object"==typeof c[f].value?mxUtils.trim(c[f].value.getAttribute(b)||""):"",g=!0;if(0<e.length)for(var e=e.toLowerCase().split(" "),h=0;h<a.length&&g;h++)var n=mxUtils.trim(a[h]).toLowerCase(),g=g&&(0==n.length||0<=mxUtils.indexOf(e,n));else g=0==a.length;g&&d.push(c[f])}}return d};
+Graph.prototype.toggleCells=function(a){this.model.beginUpdate();try{for(var c=0;c<a.length;c++)this.model.setVisible(a[c],!this.model.isVisible(a[c]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(a,c){this.model.beginUpdate();try{for(var b=0;b<a.length;b++)this.model.setVisible(a[b],c)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(a,c,b,d){for(var f=0;f<a.length;f++)this.highlightCell(a[f],c,b,d)};Graph.prototype.highlightCell=function(a,c,
+b,d){c=null!=c?c:mxConstants.DEFAULT_VALID_COLOR;b=null!=b?b:1E3;a=this.view.getState(a);if(null!=a){var f=Math.max(5,mxUtils.getValue(a.style,mxConstants.STYLE_STROKEWIDTH,1)+4),e=new mxCellHighlight(this,c,f,!1);null!=d&&(e.opacity=d);e.highlight(a);window.setTimeout(function(){null!=e.shape&&(mxUtils.setPrefixedStyle(e.shape.node.style,"transition","all 1200ms ease-in-out"),e.shape.node.style.opacity=0);window.setTimeout(function(){e.destroy()},1200)},b)}};Graph.prototype.addSvgShadow=function(a,
+c,b){b=null!=b?b:!1;var d=a.ownerDocument,f=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"filter"):d.createElement("filter");f.setAttribute("id",this.shadowId);var e=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):d.createElement("feGaussianBlur");e.setAttribute("in","SourceAlpha");e.setAttribute("stdDeviation",this.svgShadowBlur);e.setAttribute("result","blur");f.appendChild(e);e=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"feOffset"):
+d.createElement("feOffset");e.setAttribute("in","blur");e.setAttribute("dx",this.svgShadowSize);e.setAttribute("dy",this.svgShadowSize);e.setAttribute("result","offsetBlur");f.appendChild(e);e=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"feFlood"):d.createElement("feFlood");e.setAttribute("flood-color",this.svgShadowColor);e.setAttribute("flood-opacity",this.svgShadowOpacity);e.setAttribute("result","offsetColor");f.appendChild(e);e=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,
+"feComposite"):d.createElement("feComposite");e.setAttribute("in","offsetColor");e.setAttribute("in2","offsetBlur");e.setAttribute("operator","in");e.setAttribute("result","offsetBlur");f.appendChild(e);e=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"feBlend"):d.createElement("feBlend");e.setAttribute("in","SourceGraphic");e.setAttribute("in2","offsetBlur");f.appendChild(e);e=a.getElementsByTagName("defs");0==e.length?(d=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,
+"defs"):d.createElement("defs"),null!=a.firstChild?a.insertBefore(d,a.firstChild):a.appendChild(d)):d=e[0];d.appendChild(f);b||((c||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 f};Graph.prototype.setShadowVisible=function(a,c){mxClient.IS_SVG&&(c=null!=c?c:!0,(this.shadowVisible=a)?this.view.getDrawPane().setAttribute("filter",
"url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),c&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var a=this.model.getChildCount(this.model.root),c,b=0;do c=this.model.getChildAt(this.model.root,b);while(b++<a&&"1"==mxUtils.getValue(this.getCellStyle(c),"locked","0"));null!=c&&this.setDefaultParent(c)}};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=
@@ -2820,15 +2821,15 @@ 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 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,f,d,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 f(c){function b(c,b,d){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)&&(f=
-1/c.pageScale,p.value="100 %");n=mxRectangle.fromRectangle(n);n.width=Math.ceil(n.width*f);n.height=Math.ceil(n.height*f);m*=f;!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),
-c.writeln("</style>"))};if("undefined"!==typeof MathJax){var w=b.renderPage;b.renderPage=function(a,c,b,f,d,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,d,!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,d,!0)}return b}var f=parseInt(W.value)/100;isNaN(f)&&(f=1,W.value="100 %");var f=.75*f,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?d:null;if(null==e){var e=a.createTemporaryGraph(d.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 C=e.getGlobalVariable;e.getGlobalVariable=function(a){return"page"==a?l.getName():"pagenumber"==a?t+1:C.apply(this,arguments)};document.body.appendChild(e.container);a.updatePageRoot(l);e.model.setRoot(l.root)}m=b(e,m,t!=h);e!=d&&e.container.parentNode.removeChild(e.container)}}else m=
-b(d);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"]'),
+[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),
+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 C=e.getGlobalVariable;e.getGlobalVariable=function(a){return"page"==a?l.getName():"pagenumber"==a?t+1:C.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=
+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 d=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");
+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;";
@@ -2836,8 +2837,8 @@ p.setAttribute("value","100 %");p.style.width="50px";t.appendChild(p);mxEvent.ad
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);C.appendChild(q);C.appendChild(u);t.appendChild(C);
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(){d.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();f(!1)}),t.className="geBtn",g.appendChild(t));t=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();f(!0)});t.className="geBtn gePrimaryBtn";g.appendChild(t);a.editor.cancelFirst||g.appendChild(m);e.appendChild(g);this.container=e};var C=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==
+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 C=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)):(C.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");
@@ -2865,10 +2866,10 @@ h,0==e?h:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode
b[e],null))}finally{c.model.endUpdate()}}};EditorUi.prototype.createFileData=function(a,b,d,e,r,h,m,k,v,l){b=null!=b?b:this.editor.graph;r=null!=r?r:!1;v=null!=v?v:!0;var c,f=null;null==d||d.getMode()==App.MODE_DEVICE||d.getMode()==App.MODE_BROWSER?c="_blank":f=c=e;if(null==a)return"";var g=a;if("mxfile"!=g.nodeName.toLowerCase()){var n=b.zapGremlins(mxUtils.getXml(a)),g=b.compress(n);if(b.decompress(g)!=n)return n;n=a.ownerDocument.createElement("diagram");n.setAttribute("id",Editor.guid());mxUtils.setTextContent(n,
g);g=a.ownerDocument.createElement("mxfile");g.appendChild(n)}l?(g=g.cloneNode(!0),g.removeAttribute("userAgent"),g.removeAttribute("version"),g.removeAttribute("editor"),g.removeAttribute("type")):(g.removeAttribute("userAgent"),g.removeAttribute("version"),g.removeAttribute("editor"),g.removeAttribute("type"),g.setAttribute("modified",(new Date).toISOString()),g.setAttribute("host",window.location.hostname),g.setAttribute("agent",navigator.userAgent),g.setAttribute("version",EditorUi.VERSION),g.setAttribute("etag",
Editor.guid()),a=null!=d?d.getMode():this.mode,null!=a&&g.setAttribute("type",a));a=mxUtils.getXml(g);if(!h&&!r&&(m||null!=d&&/(\.html)$/i.test(d.getTitle())))a=this.getHtml2(mxUtils.getXml(g),b,null!=d?d.getTitle():null,c,f);else if(h||!r&&null!=d&&/(\.svg)$/i.test(d.getTitle()))null==d||d.getMode()!=App.MODE_DEVICE&&d.getMode()!=App.MODE_BROWSER||(e=null),a=this.getEmbeddedSvg(a,b,e,null,k,v,f);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 c=[],b=0;b<a.length;b++){var d=a.charAt(b);0<=EditorUi.ignoredAnonymizedChars.indexOf(d)?c.push(d):isNaN(parseInt(d))?d.toLowerCase()!=d?c.push(String.fromCharCode(65+Math.round(25*Math.random()))):d.toUpperCase()!=d?c.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(d)?
+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 d=0;d<this.pages.length;d++){if(this.currentPage!=this.pages[d]&&this.pages[d].needsUpdate){var f=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(this.pages[d].root));this.editor.graph.saveViewState(this.pages[d].viewState,
+f);mxUtils.setTextContent(this.pages[d].node,this.editor.graph.compressNode(f));delete this.pages[d].needsUpdate}c.appendChild(this.pages[d].node)}return c};EditorUi.prototype.anonymizeString=function(a){for(var c=[],b=0;b<a.length;b++){var d=a.charAt(b);0<=EditorUi.ignoredAnonymizedChars.indexOf(d)?c.push(d):isNaN(parseInt(d))?d.toLowerCase()!=d?c.push(String.fromCharCode(65+Math.round(25*Math.random()))):d.toUpperCase()!=d?c.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(d)?
c.push(" "):c.push("?"):c.push(Math.round(9*Math.random()))}return c.join("")};EditorUi.prototype.anonymizePatch=function(a){if(null!=a[EditorUi.DIFF_INSERT])for(var c=0;c<a[EditorUi.DIFF_INSERT].length;c++)try{var b=mxUtils.parseXml(a[EditorUi.DIFF_INSERT][c].data).documentElement.cloneNode(!1);null!=b.getAttribute("name")&&b.setAttribute("name",this.anonymizeString(b.getAttribute("name")));a[EditorUi.DIFF_INSERT][c].data=mxUtils.getXml(b)}catch(h){a[EditorUi.DIFF_INSERT][c].data=h.message}if(null!=
-a[EditorUi.DIFF_UPDATE]){for(var d in a[EditorUi.DIFF_UPDATE]){var e=a[EditorUi.DIFF_UPDATE][d];null!=e.name&&(e.name=this.anonymizeString(e.name));null!=e.cells&&(c=mxUtils.bind(this,function(a){var c=e.cells[a];if(null!=c){for(var b in c)null!=c[b].value&&(c[b].value="["+c[b].value.length+"]"),null!=c[b].style&&(c[b].style="["+c[b].style.length+"]"),null!=c[b].geometry&&(c[b].geometry=this.anonymizeString(c[b].geometry)),0==Object.keys(c[b]).length&&delete c[b];0==Object.keys(c).length&&delete e.cells[a]}}),
+a[EditorUi.DIFF_UPDATE]){for(var d in a[EditorUi.DIFF_UPDATE]){var e=a[EditorUi.DIFF_UPDATE][d];null!=e.name&&(e.name=this.anonymizeString(e.name));null!=e.cells&&(c=mxUtils.bind(this,function(a){var c=e.cells[a];if(null!=c){for(var b in c)null!=c[b].value&&(c[b].value="["+c[b].value.length+"]"),null!=c[b].style&&(c[b].style="["+c[b].style.length+"]"),null!=c[b].geometry&&(c[b].geometry="["+c[b].geometry.length+"]"),0==Object.keys(c[b]).length&&delete c[b];0==Object.keys(c).length&&delete e.cells[a]}}),
c(EditorUi.DIFF_INSERT),c(EditorUi.DIFF_UPDATE),0==Object.keys(e.cells).length&&delete e.cells);0==Object.keys(e).length&&delete a[EditorUi.DIFF_UPDATE][d]}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 c=0;c<a.attributes.length;c++)"as"!=a.attributes[c].name&&a.setAttribute(a.attributes[c].name,this.anonymizeString(a.attributes[c].value));if(null!=a.childNodes)for(c=0;c<a.childNodes.length;c++)this.anonymizeAttributes(a.childNodes[c])};
EditorUi.prototype.anonymizeNode=function(a){for(var c=a.getElementsByTagName("mxCell"),b=0;b<c.length;b++)null!=c[b].getAttribute("value")&&c[b].setAttribute("value","["+c[b].getAttribute("value").length+"]"),null!=c[b].getAttribute("style")&&c[b].setAttribute("style","["+c[b].getAttribute("style").length+"]"),null!=c[b].parentNode&&"root"!=c[b].parentNode.nodeName&&null!=c[b].parentNode.parentNode&&(c[b].setAttribute("id",c[b].parentNode.getAttribute("id")),c[b].parentNode.parentNode.replaceChild(c[b],
c[b].parentNode));c=a.getElementsByTagName("mxGeometry");for(b=0;b<c.length;b++)this.anonymizeAttributes(c[b]);return a};EditorUi.prototype.synchronizeCurrentFile=function(a){var c=this.getCurrentFile();null!=c&&(c.savingFile?this.handleError({message:mxResources.get("busy")}):!a&&c.invalidChecksum?c.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(c.clearAutosave(),this.editor.setStatus(""),a?c.reloadFile(mxUtils.bind(this,function(){c.handleFileSuccess("manual"==
@@ -2903,32 +2904,32 @@ 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!=r&&null!=r.message?":err:"+encodeURIComponent(r.message):"")+(null!=r&&null!=r.stack?"&stack="+encodeURIComponent(r.stack):"")}catch(h){}this.handleError(r,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!=c?this.fileLoaded(c):d()}),!0)}else d();return b};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 c=mxUtils.bind(this,function(){this.isActive()||(this.editor.graph.removeMouseListener(b),this.editor.removeListener("hideDialog",c),this.editor.graph.removeListener(c),null!=window.requestAnimationFrame?window.requestAnimationFrame(a):
a())}),b={mouseDown:function(){},mouseMove:function(){},mouseUp:c};this.editor.graph.addListener(mxEvent.EDITING_STOPPED,c);this.editor.graph.addListener(mxEvent.ESCAPE,c);this.editor.graph.addMouseListener(b);this.editor.addListener("hideDialog",c)}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 e=0;e<a.length;e++){this.updatePageRoot(a[e]);var m=a[e].node.cloneNode(!1);m.removeAttribute("name");d.root=a[e].root;var k=f.encode(d);this.editor.graph.saveViewState(a[e].viewState,k,!0);m.appendChild(k);null!=b&&(b.eltCount+=m.getElementsByTagName("*").length,b.nodeCount+=m.getElementsByTagName("mxCell").length,b.cellCount+=d.getDescendants(d.root).length);c=(c<<5)-c+this.hashValue(m,null,b)<<0}return c};EditorUi.prototype.hashValue=function(a,b,d){var c=0;if("object"===typeof a&&"number"===
-typeof a.nodeType&&"string"===typeof a.nodeName&&"function"===typeof a.getAttribute){null!=a.nodeName&&(c^=this.hashValue(a.nodeName,b));if(null!=a.attributes){null!=d&&(d.attrCount+=a.attributes.length);for(var f=0;f<a.attributes.length;f++){var e=a.attributes[f].name,g=null!=b?b(a,e,!0):a.attributes[f].value;null!=g&&(c^=this.hashValue(e,b,d)+this.hashValue(g,b,d))}}if(null!=a.childNodes)for(f=0;f<a.childNodes.length;f++)c=(c<<5)-c+this.hashValue(a.childNodes[f],b,d)<<0}else if(null!=a&&"function"!==
-typeof a){a=String(a);b=0;null!=d&&(d.byteCount+=a.length);for(f=0;f<a.length;f++)b=(b<<5)-b+a.charCodeAt(f)<<0;c^=b}return c};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(a,b,d,e,r,h,m){};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 c=mxUtils.createXmlDocument(),b=c.createElement("mxlibrary");mxUtils.setTextContent(b,JSON.stringify(a));c.appendChild(b);return mxUtils.getXml(c)};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 c=this.sidebar.palettes[a];if(null!=c){for(var b=0;b<c.length;b++)c[b].parentNode.removeChild(c[b]);delete this.sidebar.palettes[a]}};EditorUi.prototype.repositionLibrary=function(a){var c=this.sidebar.container;if(null==a){var b=this.sidebar.palettes["L.scratchpad"];null==b&&(b=this.sidebar.palettes.search);null!=b&&(a=b[b.length-1].nextSibling)}a=null!=a?a:c.firstChild.nextSibling.nextSibling;
-var b=c.lastChild,d=b.previousSibling;c.insertBefore(b,a);c.insertBefore(d,b)};EditorUi.prototype.loadLibrary=function(a){var c=mxUtils.parseXml(a.getData());if("mxlibrary"==c.documentElement.nodeName){var b=JSON.parse(mxUtils.getTextContent(c.documentElement));this.libraryLoaded(a,b,c.documentElement.getAttribute("title"))}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(a){return""};EditorUi.prototype.libraryLoaded=function(a,b,d){if(null!=
-this.sidebar){a.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(a.getHash());".scratchpad"==a.title&&(this.scratchpad=a);var c=this.sidebar.palettes[a.getHash()],c=null!=c?c[c.length-1].nextSibling:null;this.removeLibrarySidebar(a.getHash());var f=null,e=mxUtils.bind(this,function(c,b){0==c.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"))),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,D=null,u=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),
-k,b,a,a.getMode());mxEvent.consume(c)}),B=mxUtils.bind(this,function(c){a.setModified(!0);a.isAutosave()?(null!=D&&null!=D.parentNode&&D.parentNode.removeChild(D),D=p.cloneNode(!1),D.setAttribute("src",Editor.spinImage),D.setAttribute("title",mxResources.get("saving")),D.style.cursor="default",D.style.marginRight="2px",D.style.marginTop="-2px",l.insertBefore(D,l.firstChild),v.style.paddingRight=18*l.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=D&&null!=
-D.parentNode&&(D.parentNode.removeChild(D),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);
-B(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;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.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);B(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")}));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,
+for(var e=0;e<a.length;e++){this.updatePageRoot(a[e]);var m=a[e].node.cloneNode(!1);m.removeAttribute("name");d.root=a[e].root;var k=f.encode(d);this.editor.graph.saveViewState(a[e].viewState,k,!0);m.appendChild(k);null!=b&&(b.eltCount+=m.getElementsByTagName("*").length,b.nodeCount+=m.getElementsByTagName("mxCell").length,b.cellCount+=d.getDescendants(d.root).length);c=(c<<5)-c+this.hashValue(m,function(a,c,b,d){return!d||"mxGeometry"!=a.nodeName&&"mxPoint"!=a.nodeName||"x"!=c&&"y"!=c&&"width"!=
+c&&"height"!=c?b:Math.round(b)},b)<<0}return c};EditorUi.prototype.hashValue=function(a,b,d){var c=0;if("object"===typeof a&&"number"===typeof a.nodeType&&"string"===typeof a.nodeName&&"function"===typeof a.getAttribute){null!=a.nodeName&&(c^=this.hashValue(a.nodeName,b,d));if(null!=a.attributes){null!=d&&(d.attrCount+=a.attributes.length);for(var f=0;f<a.attributes.length;f++){var e=a.attributes[f].name,g=null!=b?b(a,e,a.attributes[f].value,!0):a.attributes[f].value;null!=g&&(c^=this.hashValue(e,
+b,d)+this.hashValue(g,b,d))}}if(null!=a.childNodes)for(f=0;f<a.childNodes.length;f++)c=(c<<5)-c+this.hashValue(a.childNodes[f],b,d)<<0}else if(null!=a&&"function"!==typeof a){a=String(a);b=0;null!=d&&(d.byteCount+=a.length);for(f=0;f<a.length;f++)b=(b<<5)-b+a.charCodeAt(f)<<0;c^=b}return c};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(a,b,d,e,r,h,m){};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 c=mxUtils.createXmlDocument(),b=c.createElement("mxlibrary");mxUtils.setTextContent(b,JSON.stringify(a));c.appendChild(b);
+return mxUtils.getXml(c)};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 c=this.sidebar.palettes[a];if(null!=c){for(var b=0;b<c.length;b++)c[b].parentNode.removeChild(c[b]);delete this.sidebar.palettes[a]}};EditorUi.prototype.repositionLibrary=function(a){var c=this.sidebar.container;
+if(null==a){var b=this.sidebar.palettes["L.scratchpad"];null==b&&(b=this.sidebar.palettes.search);null!=b&&(a=b[b.length-1].nextSibling)}a=null!=a?a:c.firstChild.nextSibling.nextSibling;var b=c.lastChild,d=b.previousSibling;c.insertBefore(b,a);c.insertBefore(d,b)};EditorUi.prototype.loadLibrary=function(a){var c=mxUtils.parseXml(a.getData());if("mxlibrary"==c.documentElement.nodeName){var b=JSON.parse(mxUtils.getTextContent(c.documentElement));this.libraryLoaded(a,b,c.documentElement.getAttribute("title"))}else throw{message:mxResources.get("notALibraryFile")};
+};EditorUi.prototype.getLibraryStorageHint=function(a){return""};EditorUi.prototype.libraryLoaded=function(a,b,d){if(null!=this.sidebar){a.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(a.getHash());".scratchpad"==a.title&&(this.scratchpad=a);var c=this.sidebar.palettes[a.getHash()],c=null!=c?c[c.length-1].nextSibling:null;this.removeLibrarySidebar(a.getHash());var e=null,f=mxUtils.bind(this,function(c,b){0==c.length&&a.isEditable()?(null==e&&(e=document.createElement("div"),mxUtils.setPrefixedStyle(e.style,
+"borderRadius","6px"),e.style.border="3px dotted lightGray",e.style.textAlign="center",e.style.padding="8px",e.style.color="#B3B3B3",mxUtils.write(e,mxResources.get("dragElementsHere"))),b.appendChild(e)):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){f(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,D=null,u=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),k,b,a,a.getMode());mxEvent.consume(c)}),B=mxUtils.bind(this,function(c){a.setModified(!0);a.isAutosave()?(null!=D&&null!=D.parentNode&&D.parentNode.removeChild(D),D=p.cloneNode(!1),D.setAttribute("src",Editor.spinImage),D.setAttribute("title",mxResources.get("saving")),D.style.cursor="default",D.style.marginRight="2px",D.style.marginTop="-2px",l.insertBefore(D,l.firstChild),v.style.paddingRight=18*l.childNodes.length+
+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=D&&null!=D.parentNode&&(D.parentNode.removeChild(D),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,f){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,f||"",!0,!1,!1));a={xml:this.editor.graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),
+w:c.width,h:c.height};null!=f&&(a.title=f);b.push(a);B(d);null!=e&&null!=e.parentNode&&0<b.length&&(e.parentNode.removeChild(e),e=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;
+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!=e?e.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!=e&&(e.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.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!=e&&(e.style.border="3px dotted lightGray"))}));Graph.fileSupport&&(mxEvent.addListener(k,"dragover",mxUtils.bind(this,function(a){null!=e?e.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!=e&&(e.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!=e&&null!=e.parentNode&&0<b.length&&(e.parentNode.removeChild(e),e=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));f(h,k);b=b.concat(h);B(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")}));
+null!=e&&null!=e.parentNode&&0<b.length&&(e.parentNode.removeChild(e),e=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!=e?e.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,
-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=
+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],e=d.data;if(null!=e){var e=this.convertDataUri(e),f="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==d.aspect&&(f+="aspect=fixed;");b.appendChild(this.sidebar.createVertexTemplate(f+
+"image="+e,d.w,d.h,"",d.title||"",!1,!1,!0))}else null!=d.xml&&(e=this.stringToCells(this.editor.graph.decompress(d.xml)),0<e.length&&b.appendChild(this.sidebar.createVertexTemplateFromCells(e,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=",
@@ -2941,17 +2942,17 @@ f.code?null!=f.message?mxUtils.htmlEntities(f.message):mxUtils.htmlEntities(mxRe
"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};
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};
+return c};EditorUi.prototype.saveCanvas=function(a,b,d){var c="jpeg"==d?"jpg":d,e=this.getBaseFilename()+"."+c;a=this.createImageDataUri(a,b,d);this.saveData(e,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",
"_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,f=Math.ceil(d/1024),e=Array(f),m=0;m<f;++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);e[m]=new Uint8Array(l)}return new Blob(e,{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,
+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)}}),
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=
-"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 c=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"));
+"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 e=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});e.spin(this.exportDialog);this.exportToCanvas(mxUtils.bind(this,function(a){e.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var c=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",c);this.exportDialog.appendChild(a);mxEvent.addListener(a,"click",mxUtils.bind(this,function(){this.openInNewWindow(c.substring(c.indexOf(",")+1),"image/png",!0);b.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",b);document.body.appendChild(this.exportDialog)}mxEvent.consume(a)}),Editor.cameraLargeImage,mxResources.get("export"))}b.apply(this,
arguments)};EditorUi.prototype.saveData=function(a,b,d,e,k){this.isLocalFileSave()?this.saveLocalFile(d,a,e,k,b):this.saveRequest(a,b,mxUtils.bind(this,function(a,c){return this.createEchoRequest(d,a,e,k,b,c)}),d,k,e)};EditorUi.prototype.saveRequest=function(a,b,d,e,k,h,m){m=null!=m?m:!mxClient.IS_IOS||!navigator.standalone;var c=this.getServiceCount(!1);a=new CreateDialog(this,a,mxUtils.bind(this,function(a,c){if("_blank"==c||null!=a&&0<a.length){var f=d("_blank"==c?null:a,c==App.MODE_DEVICE||"download"==
c||null==c||"_blank"==c?"0":"1");null!=f&&(c==App.MODE_DEVICE||"download"==c||"_blank"==c?f.simulate(document,"_blank"):this.pickFolder(c,mxUtils.bind(this,function(d){h=null!=h?h:"pdf"==b?"application/pdf":"image/"+b;if(null!=e)try{this.exportFile(e,a,h,!0,c,d)}catch(z){this.handleError(z)}else this.spinner.spin(document.body,mxResources.get("saving"))&&f.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=f.getStatus()&&299>=f.getStatus())try{this.exportFile(f.getText(),a,h,!0,c,d)}catch(z){this.handleError(z)}else this.handleError({message:mxResources.get("errorSavingFile")})}),
@@ -2960,12 +2961,12 @@ b,d,e,k,h,m,l,v,p){if(this.spinner.spin(document.body,mxResources.get("export"))
null,null,null,d,v));if(null!=this.editor.fontCss){var c=a.ownerDocument,c=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"style"):c.createElement("style");c.setAttribute("type","text/css");mxUtils.setTextContent(c,this.editor.fontCss);a.getElementsByTagName("defs")[0].appendChild(c)}var b='<!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()||b.length<=MAX_REQUEST_SIZE?this.saveData(g,"svg",b,
"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}))});this.convertMath(this.editor.graph,f,!1,mxUtils.bind(this,function(){h?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.convertImages(f,n,this.thumbImageCache)):n(f)}))}};EditorUi.prototype.addRadiobox=function(a,b,d,e,k,h,m){return this.addCheckbox(a,d,e,k,h,m,!0,b)};EditorUi.prototype.addCheckbox=function(a,b,d,e,k,h,m,l){h=null!=h?
h:!0;var c=document.createElement("input");c.style.marginRight="8px";c.style.marginTop="16px";c.setAttribute("type",m?"radio":"checkbox");m="geCheckbox-"+Editor.guid();c.id=m;null!=l&&c.setAttribute("name",l);d&&(c.setAttribute("checked","checked"),c.defaultChecked=!0);e&&c.setAttribute("disabled","disabled");h&&(a.appendChild(c),d=document.createElement("label"),mxUtils.write(d,b),d.setAttribute("for",m),a.appendChild(d),k||mxUtils.br(a));return c};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(){m.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",m=null,m=mxUtils.button("",mxUtils.bind(this,function(a){this.pickColor(e||"none",function(a){e=a;c()});mxEvent.consume(a)}));c();m.style.padding=
-mxClient.IS_FF?"4px 2px 4px 2px":"4px";m.style.marginLeft="4px";m.style.height="22px";m.style.width="22px";m.style.position="relative";m.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";m.className="geColorBtn";a.appendChild(m);mxUtils.br(a);return{getColor:function(){return e},getTarget:function(){return d.value},focus:function(){d.focus()}}};EditorUi.prototype.createLink=function(a,b,d,e,k,h,m,l){var c=this.getCurrentFile(),f=[];e&&(f.push("lightbox=1"),"auto"!=a&&f.push("target="+
+this.addCheckbox(a,mxResources.get("edit")+":",!0,null,!0);c.style.marginLeft="24px";var d=this.getCurrentFile(),e="";null!=d&&d.getMode()!=App.MODE_DEVICE&&d.getMode()!=App.MODE_BROWSER&&(e=window.location.href);var f=document.createElement("select");f.style.width="120px";f.style.marginLeft="8px";f.style.marginRight="10px";f.className="geBtn";d=document.createElement("option");d.setAttribute("value","blank");mxUtils.write(d,mxResources.get("makeCopy"));f.appendChild(d);d=document.createElement("option");
+d.setAttribute("value","custom");mxUtils.write(d,mxResources.get("custom")+"...");f.appendChild(d);a.appendChild(f);mxEvent.addListener(f,"change",mxUtils.bind(this,function(){if("custom"==f.value){var a=new FilenameDialog(this,e,mxResources.get("ok"),function(a){null!=a?e=a:f.value="blank"},mxResources.get("url"),null,null,null,null,function(){f.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)?f.removeAttribute("disabled"):f.setAttribute("disabled","disabled")}));mxUtils.br(a);return{getLink:function(){return c.checked?"blank"===f.value?"_blank":e:null},getEditInput:function(){return c},getEditSelect:function(){return f}}};EditorUi.prototype.addLinkSection=function(a,b){function c(){m.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=f&&f!=mxConstants.NONE?"border:1px solid black;background-color:"+f:"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 e=document.createElement("option");e.setAttribute("value","auto");mxUtils.write(e,mxResources.get("automatic"));d.appendChild(e);e=document.createElement("option");e.setAttribute("value","blank");mxUtils.write(e,mxResources.get("openInNewWindow"));d.appendChild(e);e=document.createElement("option");
+e.setAttribute("value","self");mxUtils.write(e,mxResources.get("openInThisWindow"));d.appendChild(e);b&&(e=document.createElement("option"),e.setAttribute("value","frame"),mxUtils.write(e,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),d.appendChild(e));a.appendChild(d);mxUtils.write(a,mxResources.get("borderColor")+":");var f="#0000ff",m=null,m=mxUtils.button("",mxUtils.bind(this,function(a){this.pickColor(f||"none",function(a){f=a;c()});mxEvent.consume(a)}));c();m.style.padding=
+mxClient.IS_FF?"4px 2px 4px 2px":"4px";m.style.marginLeft="4px";m.style.height="22px";m.style.width="22px";m.style.position="relative";m.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";m.className="geColorBtn";a.appendChild(m);mxUtils.br(a);return{getColor:function(){return f},getTarget:function(){return d.value},focus:function(){d.focus()}}};EditorUi.prototype.createLink=function(a,b,d,e,k,h,m,l){var c=this.getCurrentFile(),f=[];e&&(f.push("lightbox=1"),"auto"!=a&&f.push("target="+
a),null!=b&&b!=mxConstants.NONE&&f.push("highlight="+("#"==b.charAt(0)?b.substring(1):b)),null!=k&&0<k.length&&f.push("edit="+encodeURIComponent(k)),h&&f.push("layers=1"),this.editor.graph.foldingEnabled&&f.push("nav=1"));d&&(a=this.getSelectedPageIndex(),0<a&&f.push("page="+a));a=!0;null!=m?d="#U"+encodeURIComponent(m):(c=this.getCurrentFile(),l||null==c||c.constructor!=window.DriveFile?d="#R"+encodeURIComponent(d?this.getFileData(!0,null,null,null,null,null,null,!0):this.editor.graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):
(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%;":
@@ -2981,8 +2982,8 @@ n.appendChild(r);mxEvent.addListener(r,"click",mxUtils.bind(this,function(){this
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 B=this.addCheckbox(c,mxResources.get("lightbox"),!0),G=this.addEditButton(c,B),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(B,"change",function(){B.checked?(y.removeAttribute("disabled"),J.removeAttribute("disabled")):(y.setAttribute("disabled","disabled"),J.setAttribute("disabled",
"disabled"));J.checked&&B.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,B.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()),n=e?null:this.addCheckbox(c,mxResources.get("includeCopyOfMyDiagram"),
-!0),f=this.editor.graph,k=e?null:this.addCheckbox(c,mxResources.get("transparentBackground"),f.background==mxConstants.NONE||null==f.background);null!=k&&(k.style.marginBottom="16px");a=new CustomDialog(this,c,mxUtils.bind(this,function(){d(!g.checked,null!=n?n.checked:!1,null!=k?k.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=
+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",
@@ -2998,56 +2999,56 @@ EditorUi.prototype.createEmbedSvg=function(a,b,d,e,k,h,m){var c=this.editor.grap
(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+
" "+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],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(h){}finally{this.editor.graph=d}return a};EditorUi.prototype.getEmbeddedPng=function(a,b,d){var c=this.editor.graph,f=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),f=d;else if(null!=this.pages&&this.currentPage!=this.pages[0]){var c=this.createTemporaryGraph(c.getStylesheet()),
-e=c.getGlobalVariable,g=this.pages[0];c.getGlobalVariable=function(a){return"page"==a?g.getName():"pagenumber"==a?1:e.apply(this,arguments)};document.body.appendChild(c.container);c.model.setRoot(g.root)}this.exportToCanvas(mxUtils.bind(this,function(d){try{null==f&&(f=this.getFileData(!0));var e=d.toDataURL("image/png"),e=this.writeGraphModelToPng(e,"zTXt","mxGraphModel",atob(this.editor.graph.compress(f)));a(e.substring(e.lastIndexOf(",")+1));c!=this.editor.graph&&c.container.parentNode.removeChild(c.container)}catch(C){null!=
+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(C){null!=
b&&b(C)}}),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 f=new Image;f.onload=mxUtils.bind(this,function(){try{var e=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;e.setAttribute("width",g);e.setAttribute("height",m);var n=e.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(f,z/l,z/l);a(e)},0):(n.drawImage(f,z/l,z/l),a(e))}catch(Q){null!=k&&k(Q)}});f.onerror=function(a){null!=k&&k(a)};try{q&&this.editor.graph.addSvgShadow(d,d);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;d.getElementsByTagName("defs")[0].appendChild(a)}this.convertMath(t,
-d,!0,mxUtils.bind(this,function(){f.src=this.createSvgDataUri(mxUtils.getXml(d))}))});this.loadFonts(e)}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 f="http://"==c.substring(0,7)||"https://"==c.substring(0,8);f&&!navigator.onLine?c=d.svgBrokenImage.src:!f||c.substring(0,a.baseUrl.length)==a.baseUrl||d.crossOriginImages&&d.isCorsEnabledForUrl(c)?"chrome-extension://"!=
+(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,
+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 f=a.getText();if(c){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!=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=
+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)&&
+"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"),f=a.getContext("2d");a.height=c.height;a.width=c.width;f.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=
+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=
function(a,b,d,e,k){b=null!=b?b:0;d=null!=d?d:0;var c=[];try{var f=this.editor.graph;if(null!=a&&0<a.length){var g=mxUtils.parseXml(a),n=this.editor.extractGraphModel(g.documentElement,null!=this.pages);if(null!=n&&"mxfile"==n.nodeName&&null!=this.pages){var l=n.getElementsByTagName("diagram");if(1==l.length)n=mxUtils.parseXml(f.decompress(mxUtils.getTextContent(l[0]))).documentElement;else if(1<l.length){f.model.beginUpdate();try{for(a=0;a<l.length;a++){l[a].removeAttribute("id");var r=this.updatePageRoot(new DiagramPage(l[a])),
p=this.pages.length;null==r.getName()&&r.setName(mxResources.get("pageWithNumber",[p+1]));f.model.execute(new ChangePage(this,r,r,p))}}finally{f.model.endUpdate()}}}null!=n&&"mxGraphModel"===n.nodeName&&(c=f.importGraphModel(n,b,d,e))}}catch(z){throw k||this.handleError(z,mxResources.get("invalidOrMissingFile")),z;}return c};EditorUi.prototype.isRemoteVisioFormat=function(a){return/(\.v(sd|dx))($|\?)/i.test(a)||/(\.vs(s|x))($|\?)/i.test(a)};EditorUi.prototype.importVisio=function(a,b,d,e){e=null!=
e?e:a.name;d=null!=d?d:mxUtils.bind(this,function(a){this.handleError(a)});var c=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio)if(this.isRemoteVisioFormat(e)&&null!=VSD_CONVERT_URL){var c=new FormData;c.append("file1",a,e);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=e,this.doImportVisio(f.response,b,d)}catch(w){d(w)}else d({})});
f.send(c)}else try{this.doImportVisio(a,b,d)}catch(w){d(w)}});this.doImportVisio||this.loadingExtensions||this.isOffline()?c():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",c))};EditorUi.prototype.importGraphML=function(a,b,d){d=null!=d?d:mxUtils.bind(this,function(a){this.handleError(a)});var c=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(a,b,d)}catch(r){d(r)}});this.doImportGraphML||this.loadingExtensions||this.isOffline()?
c():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",c))};EditorUi.prototype.exportVisio=function(){var a=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams()}catch(f){this.handleError(f)}});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline()?a():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",a))};EditorUi.prototype.convertLucidChart=function(a,b,d){var c=mxUtils.bind(this,
function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter)try{b(LucidImporter.importState(JSON.parse(a)))}catch(r){d(r)}else d({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline()?window.setTimeout(c,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",c):mxscript("js/extensions.min.js",c))};EditorUi.prototype.insertAsPreText=function(a,b,d){var c=this.editor.graph,
-f=null;c.getModel().beginUpdate();try{f=c.insertVertex(null,null,"<pre>"+a+"</pre>",b,d,1,1,"text;html=1;align=center;verticalAlign=middle;"),c.updateCellSize(f,!0)}finally{c.getModel().endUpdate()}return f};EditorUi.prototype.insertTextAt=function(a,b,d,e,k,h,m){h=null!=h?h:!0;m=null!=m?m:!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,
+e=null;c.getModel().beginUpdate();try{e=c.insertVertex(null,null,"<pre>"+a+"</pre>",b,d,1,1,"text;html=1;align=center;verticalAlign=middle;"),c.updateCellSize(e,!0)}finally{c.getModel().endUpdate()}return e};EditorUi.prototype.insertTextAt=function(a,b,d,e,k,h,m){h=null!=h?h:!0;m=null!=m?m:!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,d,!0))}));else if("data:"==a.substring(0,5)||!this.isOffline()&&(k||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var c=this.editor.graph;if("data:image/png;base64,"==a.substring(0,22)){var f=this.extractGraphModelFromPng(a),g=this.importXml(f,b,d,h,!0);if(0<g.length)return g}if("data:image/svg+xml;"==a.substring(0,19))try{if(f=null,"data:image/svg+xml;base64,"==a.substring(0,
-26)?(f=a.substring(a.indexOf(",")+1),f=window.atob&&!mxClient.IS_SF?atob(f):Base64.decode(f,!0)):f=decodeURIComponent(a.substring(a.indexOf(",")+1)),g=this.importXml(f,b,d,h,!0),0<g.length)return g}catch(x){}this.loadImage(a,mxUtils.bind(this,function(f){if("data:"==a.substring(0,5))this.resizeImage(f,a,mxUtils.bind(this,function(a,f,e){c.setSelectionCell(c.insertVertex(null,null,"",c.snap(b),c.snap(d),f,e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
-this.convertDataUri(a)+";"))}),m,this.maxImageSize);else{var e=Math.min(1,Math.min(this.maxImageSize/f.width,this.maxImageSize/f.height)),g=Math.round(f.width*e);f=Math.round(f.height*e);c.setSelectionCell(c.insertVertex(null,null,"",c.snap(b),c.snap(d),g,f,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";"))}}),mxUtils.bind(this,function(){var f=null;c.getModel().beginUpdate();try{f=c.insertVertex(c.getDefaultParent(),
+26)?(f=a.substring(a.indexOf(",")+1),f=window.atob&&!mxClient.IS_SF?atob(f):Base64.decode(f,!0)):f=decodeURIComponent(a.substring(a.indexOf(",")+1)),g=this.importXml(f,b,d,h,!0),0<g.length)return g}catch(x){}this.loadImage(a,mxUtils.bind(this,function(e){if("data:"==a.substring(0,5))this.resizeImage(e,a,mxUtils.bind(this,function(a,e,f){c.setSelectionCell(c.insertVertex(null,null,"",c.snap(b),c.snap(d),e,f,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+this.convertDataUri(a)+";"))}),m,this.maxImageSize);else{var f=Math.min(1,Math.min(this.maxImageSize/e.width,this.maxImageSize/e.height)),g=Math.round(e.width*f);e=Math.round(e.height*f);c.setSelectionCell(c.insertVertex(null,null,"",c.snap(b),c.snap(d),g,e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";"))}}),mxUtils.bind(this,function(){var f=null;c.getModel().beginUpdate();try{f=c.insertVertex(c.getDefaultParent(),
null,a,c.snap(b),c.snap(d),1,1,"text;"+(e?"html=1;":"")),c.updateCellSize(f),c.fireEvent(new mxEventObject("textInserted","cells",[f]))}finally{c.getModel().endUpdate()}c.setSelectionCell(f)}))}else{a=this.editor.graph.zapGremlins(mxUtils.trim(a));if(this.isCompatibleString(a))return this.importXml(a,b,d,h);if(0<a.length)if(this.isLucidChartData(a))this.convertLucidChart(a,mxUtils.bind(this,function(a){this.editor.graph.setSelectionCells(this.importXml(a,b,d,h))}),mxUtils.bind(this,function(a){this.handleError(a)}));
else{c=this.editor.graph;k=null;c.getModel().beginUpdate();try{k=c.insertVertex(c.getDefaultParent(),null,"",c.snap(b),c.snap(d),1,1,"text;"+(e?"html=1;":"")),c.fireEvent(new mxEventObject("textInserted","cells",[k])),"<"==a.charAt(0)&&a.indexOf(">")==a.length-1&&(a=mxUtils.htmlEntities(a)),k.value=a,c.updateCellSize(k),/\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(k.value)&&
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 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,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,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="+
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,f,e,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,f,e,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,b){v[a]=b;if(0==--p){this.spinner.stop();if(null!=l)l(v);else{var c=[];g.getModel().beginUpdate();
-try{for(var d=0;d<v.length;d++){var f=v[d]();null!=f&&(c=c.concat(f))}}finally{g.getModel().endUpdate()}}h(c)}}),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");
+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");
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 z=t?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 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,
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,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,d){d=null!=d?d:a.name;var c=new FormData;c.append("format","xml");c.append("upfile",a,d);var f=new XMLHttpRequest;f.open("POST",OPEN_URL);f.onreadystatechange=function(){b(f)};f.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);
+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(B){}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 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,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)<<
+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)),
"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(r){}null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));return b};EditorUi.prototype.loadImage=function(a,b,d){var c=new Image;c.onload=function(){b(c)};null!=d&&(c.onerror=