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>2020-04-05 18:45:51 +0300
committerGaudenz Alder <gaudenz@jgraph.com>2020-04-05 18:45:51 +0300
commit86c9e569c6ff4680e3d7952c54139c7c33a9513f (patch)
tree9494837cfa8cd4c56ec8e57607f0176324fbd541
parentbea646cbc2b458930f1b97f169b36bf69e6a9ebb (diff)
12.9.8 releasev12.9.8
-rw-r--r--ChangeLog5
-rw-r--r--VERSION2
-rw-r--r--etc/mxgraph/mxClient.js6
-rw-r--r--src/main/webapp/js/app.min.js2417
-rw-r--r--src/main/webapp/js/diagramly/Dialogs.js23
-rw-r--r--src/main/webapp/js/diagramly/EditorUi.js37
-rw-r--r--src/main/webapp/js/mxgraph/Editor.js7
-rw-r--r--src/main/webapp/js/mxgraph/Graph.js49
-rw-r--r--src/main/webapp/js/viewer.min.js601
-rw-r--r--src/main/webapp/service-worker.js2
10 files changed, 1613 insertions, 1536 deletions
diff --git a/ChangeLog b/ChangeLog
index 63907ca9..804c1d6e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+05-APR-2020: 12.9.8
+
+- Fixes formatting for pasted text
+- Uses mxGraph 4.1.2 beta 1
+
03-APR-2020: 12.9.7
- Optional size, position and angle panels
diff --git a/VERSION b/VERSION
index 33425074..de785bea 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-12.9.7 \ No newline at end of file
+12.9.8 \ No newline at end of file
diff --git a/etc/mxgraph/mxClient.js b/etc/mxgraph/mxClient.js
index ca843dcd..3a6ffc7e 100644
--- a/etc/mxgraph/mxClient.js
+++ b/etc/mxgraph/mxClient.js
@@ -1171,9 +1171,9 @@ mxGraph.prototype.getAllEdges=function(a){var b=[];if(null!=a)for(var c=0;c<a.le
mxGraph.prototype.cellSizeUpdated=function(a,b){if(null!=a){this.model.beginUpdate();try{var c=this.getPreferredSizeForCell(a),d=this.model.getGeometry(a);if(null!=c&&null!=d){var e=this.isCellCollapsed(a),d=d.clone();if(this.isSwimlane(a)){var f=this.getCellStyle(a),g=this.model.getStyle(a);null==g&&(g="");mxUtils.getValue(f,mxConstants.STYLE_HORIZONTAL,!0)?(g=mxUtils.setStyle(g,mxConstants.STYLE_STARTSIZE,c.height+8),e&&(d.height=c.height+8),d.width=c.width):(g=mxUtils.setStyle(g,mxConstants.STYLE_STARTSIZE,
c.width+8),e&&(d.width=c.width+8),d.height=c.height);this.model.setStyle(a,g)}else{var k=this.view.createState(a),l=k.style[mxConstants.STYLE_ALIGN]||mxConstants.ALIGN_CENTER;l==mxConstants.ALIGN_RIGHT?d.x+=d.width-c.width:l==mxConstants.ALIGN_CENTER&&(d.x+=Math.round((d.width-c.width)/2));var m=this.getVerticalAlign(k);m==mxConstants.ALIGN_BOTTOM?d.y+=d.height-c.height:m==mxConstants.ALIGN_MIDDLE&&(d.y+=Math.round((d.height-c.height)/2));d.width=c.width;d.height=c.height}if(!b&&!e){var n=this.view.getBounds(this.model.getChildren(a));
if(null!=n){var p=this.view.translate,q=this.view.scale,r=(n.y+n.height)/q-d.y-p.y;d.width=Math.max(d.width,(n.x+n.width)/q-d.x-p.x);d.height=Math.max(d.height,r)}}this.cellsResized([a],[d],!1)}}finally{this.model.endUpdate()}}};
-mxGraph.prototype.getPreferredSizeForCell=function(a){var b=null;if(null!=a){var c=this.view.createState(a),d=c.style;if(!this.model.isEdge(a)){var e=d[mxConstants.STYLE_FONTSIZE]||mxConstants.DEFAULT_FONTSIZE;a=b=0;null==this.getImage(c)&&null==d[mxConstants.STYLE_IMAGE]||d[mxConstants.STYLE_SHAPE]!=mxConstants.SHAPE_LABEL||(d[mxConstants.STYLE_VERTICAL_ALIGN]==mxConstants.ALIGN_MIDDLE&&(b+=parseFloat(d[mxConstants.STYLE_IMAGE_WIDTH])||mxLabel.prototype.imageSize),d[mxConstants.STYLE_ALIGN]!=mxConstants.ALIGN_CENTER&&
-(a+=parseFloat(d[mxConstants.STYLE_IMAGE_HEIGHT])||mxLabel.prototype.imageSize));b+=2*(d[mxConstants.STYLE_SPACING]||0);b+=d[mxConstants.STYLE_SPACING_LEFT]||0;b+=d[mxConstants.STYLE_SPACING_RIGHT]||0;a+=2*(d[mxConstants.STYLE_SPACING]||0);a+=d[mxConstants.STYLE_SPACING_TOP]||0;a+=d[mxConstants.STYLE_SPACING_BOTTOM]||0;var f=this.getFoldingImage(c);null!=f&&(b+=f.width+8);f=this.cellRenderer.getLabelValue(c);null!=f&&0<f.length?(this.isHtmlLabel(c.cell)||(f=mxUtils.htmlEntities(f,!1)),f=f.replace(/\n/g,
-"<br>"),e=mxUtils.getSizeForString(f,e,d[mxConstants.STYLE_FONTFAMILY],null,d[mxConstants.STYLE_FONTSTYLE]),c=e.width+b,a=e.height+a,mxUtils.getValue(d,mxConstants.STYLE_HORIZONTAL,!0)||(d=a,a=c,c=d),this.gridEnabled&&(c=this.snap(c+this.gridSize/2),a=this.snap(a+this.gridSize/2)),b=new mxRectangle(0,0,c,a)):(d=4*this.gridSize,b=new mxRectangle(0,0,d,d))}}return b};mxGraph.prototype.resizeCell=function(a,b,c){return this.resizeCells([a],[b],c)[0]};
+mxGraph.prototype.getPreferredSizeForCell=function(a,b){var c=null;if(null!=a){var d=this.view.createState(a),e=d.style;if(!this.model.isEdge(a)){var f=e[mxConstants.STYLE_FONTSIZE]||mxConstants.DEFAULT_FONTSIZE,g=0,c=0;null==this.getImage(d)&&null==e[mxConstants.STYLE_IMAGE]||e[mxConstants.STYLE_SHAPE]!=mxConstants.SHAPE_LABEL||(e[mxConstants.STYLE_VERTICAL_ALIGN]==mxConstants.ALIGN_MIDDLE&&(g+=parseFloat(e[mxConstants.STYLE_IMAGE_WIDTH])||mxLabel.prototype.imageSize),e[mxConstants.STYLE_ALIGN]!=
+mxConstants.ALIGN_CENTER&&(c+=parseFloat(e[mxConstants.STYLE_IMAGE_HEIGHT])||mxLabel.prototype.imageSize));var g=g+2*(e[mxConstants.STYLE_SPACING]||0),g=g+(e[mxConstants.STYLE_SPACING_LEFT]||0),g=g+(e[mxConstants.STYLE_SPACING_RIGHT]||0),c=c+2*(e[mxConstants.STYLE_SPACING]||0),c=c+(e[mxConstants.STYLE_SPACING_TOP]||0),c=c+(e[mxConstants.STYLE_SPACING_BOTTOM]||0),k=this.getFoldingImage(d);null!=k&&(g+=k.width+8);k=this.cellRenderer.getLabelValue(d);null!=k&&0<k.length?(this.isHtmlLabel(d.cell)||(k=
+mxUtils.htmlEntities(k,!1)),k=k.replace(/\n/g,"<br>"),f=mxUtils.getSizeForString(k,f,e[mxConstants.STYLE_FONTFAMILY],b,e[mxConstants.STYLE_FONTSTYLE]),d=f.width+g,c=f.height+c,mxUtils.getValue(e,mxConstants.STYLE_HORIZONTAL,!0)||(e=c,c=d,d=e),this.gridEnabled&&(d=this.snap(d+this.gridSize/2),c=this.snap(c+this.gridSize/2)),c=new mxRectangle(0,0,d,c)):(e=4*this.gridSize,c=new mxRectangle(0,0,e,e))}}return c};mxGraph.prototype.resizeCell=function(a,b,c){return this.resizeCells([a],[b],c)[0]};
mxGraph.prototype.resizeCells=function(a,b,c){c=null!=c?c:this.isRecursiveResize();this.model.beginUpdate();try{var d=this.cellsResized(a,b,c);this.fireEvent(new mxEventObject(mxEvent.RESIZE_CELLS,"cells",a,"bounds",b,"previous",d))}finally{this.model.endUpdate()}return a};
mxGraph.prototype.cellsResized=function(a,b,c){c=null!=c?c:!1;var d=[];if(null!=a&&null!=b&&a.length==b.length){this.model.beginUpdate();try{for(var e=0;e<a.length;e++)d.push(this.cellResized(a[e],b[e],!1,c)),this.isExtendParent(a[e])&&this.extendParent(a[e]),this.constrainChild(a[e]);this.resetEdgesOnResize&&this.resetEdges(a);this.fireEvent(new mxEventObject(mxEvent.CELLS_RESIZED,"cells",a,"bounds",b,"previous",d))}finally{this.model.endUpdate()}}return d};
mxGraph.prototype.cellResized=function(a,b,c,d){var e=this.model.getGeometry(a);if(null!=e&&(e.x!=b.x||e.y!=b.y||e.width!=b.width||e.height!=b.height)){var f=e.clone();!c&&f.relative?(c=f.offset,null!=c&&(c.x+=b.x-f.x,c.y+=b.y-f.y)):(f.x=b.x,f.y=b.y);f.width=b.width;f.height=b.height;f.relative||!this.model.isVertex(a)||this.isAllowNegativeCoordinates()||(f.x=Math.max(0,f.x),f.y=Math.max(0,f.y));this.model.beginUpdate();try{d&&this.resizeChildCells(a,f),this.model.setGeometry(a,f),this.constrainChildCells(a)}finally{this.model.endUpdate()}}return e};
diff --git a/src/main/webapp/js/app.min.js b/src/main/webapp/js/app.min.js
index 564665dd..7db321f5 100644
--- a/src/main/webapp/js/app.min.js
+++ b/src/main/webapp/js/app.min.js
@@ -1315,9 +1315,9 @@ mxGraph.prototype.getAllEdges=function(a){var b=[];if(null!=a)for(var c=0;c<a.le
mxGraph.prototype.cellSizeUpdated=function(a,b){if(null!=a){this.model.beginUpdate();try{var c=this.getPreferredSizeForCell(a),d=this.model.getGeometry(a);if(null!=c&&null!=d){var e=this.isCellCollapsed(a),d=d.clone();if(this.isSwimlane(a)){var f=this.getCellStyle(a),g=this.model.getStyle(a);null==g&&(g="");mxUtils.getValue(f,mxConstants.STYLE_HORIZONTAL,!0)?(g=mxUtils.setStyle(g,mxConstants.STYLE_STARTSIZE,c.height+8),e&&(d.height=c.height+8),d.width=c.width):(g=mxUtils.setStyle(g,mxConstants.STYLE_STARTSIZE,
c.width+8),e&&(d.width=c.width+8),d.height=c.height);this.model.setStyle(a,g)}else{var k=this.view.createState(a),l=k.style[mxConstants.STYLE_ALIGN]||mxConstants.ALIGN_CENTER;l==mxConstants.ALIGN_RIGHT?d.x+=d.width-c.width:l==mxConstants.ALIGN_CENTER&&(d.x+=Math.round((d.width-c.width)/2));var m=this.getVerticalAlign(k);m==mxConstants.ALIGN_BOTTOM?d.y+=d.height-c.height:m==mxConstants.ALIGN_MIDDLE&&(d.y+=Math.round((d.height-c.height)/2));d.width=c.width;d.height=c.height}if(!b&&!e){var n=this.view.getBounds(this.model.getChildren(a));
if(null!=n){var p=this.view.translate,q=this.view.scale,r=(n.y+n.height)/q-d.y-p.y;d.width=Math.max(d.width,(n.x+n.width)/q-d.x-p.x);d.height=Math.max(d.height,r)}}this.cellsResized([a],[d],!1)}}finally{this.model.endUpdate()}}};
-mxGraph.prototype.getPreferredSizeForCell=function(a){var b=null;if(null!=a){var c=this.view.createState(a),d=c.style;if(!this.model.isEdge(a)){var e=d[mxConstants.STYLE_FONTSIZE]||mxConstants.DEFAULT_FONTSIZE;a=b=0;null==this.getImage(c)&&null==d[mxConstants.STYLE_IMAGE]||d[mxConstants.STYLE_SHAPE]!=mxConstants.SHAPE_LABEL||(d[mxConstants.STYLE_VERTICAL_ALIGN]==mxConstants.ALIGN_MIDDLE&&(b+=parseFloat(d[mxConstants.STYLE_IMAGE_WIDTH])||mxLabel.prototype.imageSize),d[mxConstants.STYLE_ALIGN]!=mxConstants.ALIGN_CENTER&&
-(a+=parseFloat(d[mxConstants.STYLE_IMAGE_HEIGHT])||mxLabel.prototype.imageSize));b+=2*(d[mxConstants.STYLE_SPACING]||0);b+=d[mxConstants.STYLE_SPACING_LEFT]||0;b+=d[mxConstants.STYLE_SPACING_RIGHT]||0;a+=2*(d[mxConstants.STYLE_SPACING]||0);a+=d[mxConstants.STYLE_SPACING_TOP]||0;a+=d[mxConstants.STYLE_SPACING_BOTTOM]||0;var f=this.getFoldingImage(c);null!=f&&(b+=f.width+8);f=this.cellRenderer.getLabelValue(c);null!=f&&0<f.length?(this.isHtmlLabel(c.cell)||(f=mxUtils.htmlEntities(f,!1)),f=f.replace(/\n/g,
-"<br>"),e=mxUtils.getSizeForString(f,e,d[mxConstants.STYLE_FONTFAMILY],null,d[mxConstants.STYLE_FONTSTYLE]),c=e.width+b,a=e.height+a,mxUtils.getValue(d,mxConstants.STYLE_HORIZONTAL,!0)||(d=a,a=c,c=d),this.gridEnabled&&(c=this.snap(c+this.gridSize/2),a=this.snap(a+this.gridSize/2)),b=new mxRectangle(0,0,c,a)):(d=4*this.gridSize,b=new mxRectangle(0,0,d,d))}}return b};mxGraph.prototype.resizeCell=function(a,b,c){return this.resizeCells([a],[b],c)[0]};
+mxGraph.prototype.getPreferredSizeForCell=function(a,b){var c=null;if(null!=a){var d=this.view.createState(a),e=d.style;if(!this.model.isEdge(a)){var f=e[mxConstants.STYLE_FONTSIZE]||mxConstants.DEFAULT_FONTSIZE,g=0,c=0;null==this.getImage(d)&&null==e[mxConstants.STYLE_IMAGE]||e[mxConstants.STYLE_SHAPE]!=mxConstants.SHAPE_LABEL||(e[mxConstants.STYLE_VERTICAL_ALIGN]==mxConstants.ALIGN_MIDDLE&&(g+=parseFloat(e[mxConstants.STYLE_IMAGE_WIDTH])||mxLabel.prototype.imageSize),e[mxConstants.STYLE_ALIGN]!=
+mxConstants.ALIGN_CENTER&&(c+=parseFloat(e[mxConstants.STYLE_IMAGE_HEIGHT])||mxLabel.prototype.imageSize));var g=g+2*(e[mxConstants.STYLE_SPACING]||0),g=g+(e[mxConstants.STYLE_SPACING_LEFT]||0),g=g+(e[mxConstants.STYLE_SPACING_RIGHT]||0),c=c+2*(e[mxConstants.STYLE_SPACING]||0),c=c+(e[mxConstants.STYLE_SPACING_TOP]||0),c=c+(e[mxConstants.STYLE_SPACING_BOTTOM]||0),k=this.getFoldingImage(d);null!=k&&(g+=k.width+8);k=this.cellRenderer.getLabelValue(d);null!=k&&0<k.length?(this.isHtmlLabel(d.cell)||(k=
+mxUtils.htmlEntities(k,!1)),k=k.replace(/\n/g,"<br>"),f=mxUtils.getSizeForString(k,f,e[mxConstants.STYLE_FONTFAMILY],b,e[mxConstants.STYLE_FONTSTYLE]),d=f.width+g,c=f.height+c,mxUtils.getValue(e,mxConstants.STYLE_HORIZONTAL,!0)||(e=c,c=d,d=e),this.gridEnabled&&(d=this.snap(d+this.gridSize/2),c=this.snap(c+this.gridSize/2)),c=new mxRectangle(0,0,d,c)):(e=4*this.gridSize,c=new mxRectangle(0,0,e,e))}}return c};mxGraph.prototype.resizeCell=function(a,b,c){return this.resizeCells([a],[b],c)[0]};
mxGraph.prototype.resizeCells=function(a,b,c){c=null!=c?c:this.isRecursiveResize();this.model.beginUpdate();try{var d=this.cellsResized(a,b,c);this.fireEvent(new mxEventObject(mxEvent.RESIZE_CELLS,"cells",a,"bounds",b,"previous",d))}finally{this.model.endUpdate()}return a};
mxGraph.prototype.cellsResized=function(a,b,c){c=null!=c?c:!1;var d=[];if(null!=a&&null!=b&&a.length==b.length){this.model.beginUpdate();try{for(var e=0;e<a.length;e++)d.push(this.cellResized(a[e],b[e],!1,c)),this.isExtendParent(a[e])&&this.extendParent(a[e]),this.constrainChild(a[e]);this.resetEdgesOnResize&&this.resetEdges(a);this.fireEvent(new mxEventObject(mxEvent.CELLS_RESIZED,"cells",a,"bounds",b,"previous",d))}finally{this.model.endUpdate()}}return d};
mxGraph.prototype.cellResized=function(a,b,c,d){var e=this.model.getGeometry(a);if(null!=e&&(e.x!=b.x||e.y!=b.y||e.width!=b.width||e.height!=b.height)){var f=e.clone();!c&&f.relative?(c=f.offset,null!=c&&(c.x+=b.x-f.x,c.y+=b.y-f.y)):(f.x=b.x,f.y=b.y);f.width=b.width;f.height=b.height;f.relative||!this.model.isVertex(a)||this.isAllowNegativeCoordinates()||(f.x=Math.max(0,f.x),f.y=Math.max(0,f.y));this.model.beginUpdate();try{d&&this.resizeChildCells(a,f),this.model.setGeometry(a,f),this.constrainChildCells(a)}finally{this.model.endUpdate()}}return e};
@@ -2039,7 +2039,7 @@ x.style.color=.5>.213*this.rgb[0]+.715*this.rgb[1]+.072*this.rgb[2]?"#FFF":"#000
this.rgb[1]=b;var e=null===c?this.rgb[2]:this.rgb[2]=c,f=Math.min(Math.min(a,b),e);c=Math.max(Math.max(a,b),e);var g=c-f;0===g?a=[null,0,c]:(a=a===f?3+(e-b)/g:b===f?5+(a-e)/g:1+(b-a)/g,a=[6===a?0:a,g/c,c]);null!==a[0]&&(this.hsv[0]=a[0]);0!==a[2]&&(this.hsv[1]=a[1]);this.hsv[2]=a[2];this.exportColor(d)};this.fromString=function(a,b){var c=a.match(/^\W*([0-9A-F]{3}([0-9A-F]{3})?)\W*$/i);return c?(6===c[1].length?this.fromRGB(parseInt(c[1].substr(0,2),16)/255,parseInt(c[1].substr(2,2),16)/255,parseInt(c[1].substr(4,
2),16)/255,b):this.fromRGB(parseInt(c[1].charAt(0)+c[1].charAt(0),16)/255,parseInt(c[1].charAt(1)+c[1].charAt(1),16)/255,parseInt(c[1].charAt(2)+c[1].charAt(2),16)/255,b),!0):!1};this.toString=function(){return(256|Math.round(255*this.rgb[0])).toString(16).substr(1)+(256|Math.round(255*this.rgb[1])).toString(16).substr(1)+(256|Math.round(255*this.rgb[2])).toString(16).substr(1)};var r=this,t="hvs"===this.pickerMode.toLowerCase()?1:0,u=jscolor.fetchElement(this.valueElement),x=jscolor.fetchElement(this.styleElement),
y=!1,B=!1,A=1,z=2,C=4,v=8;u&&(q=function(){r.fromString(u.value,A);p()},jscolor.addEvent(u,"keyup",q),jscolor.addEvent(u,"input",q),jscolor.addEvent(u,"blur",l),u.setAttribute("autocomplete","off"));x&&(x.jscStyle={backgroundImage:x.style.backgroundImage,backgroundColor:x.style.backgroundColor,color:x.style.color});switch(t){case 0:jscolor.requireImage("hs.png");break;case 1:jscolor.requireImage("hv.png")}this.importColor()}};jscolor.install();
-Editor=function(a,c,d,b,g){mxEventSource.call(this);this.chromeless=null!=a?a:this.chromeless;this.initStencilRegistry();this.graph=b||this.createGraph(c,d);this.editable=null!=g?g:!a;this.undoManager=this.createUndoManager();this.status="";this.getOrCreateFilename=function(){return this.filename||mxResources.get("drawing",[Editor.pageCounter])+".xml"};this.getFilename=function(){return this.filename};this.setStatus=function(a){this.status=a;this.fireEvent(new mxEventObject("statusChanged"))};this.getStatus=
+Editor=function(a,c,d,b,f){mxEventSource.call(this);this.chromeless=null!=a?a:this.chromeless;this.initStencilRegistry();this.graph=b||this.createGraph(c,d);this.editable=null!=f?f:!a;this.undoManager=this.createUndoManager();this.status="";this.getOrCreateFilename=function(){return this.filename||mxResources.get("drawing",[Editor.pageCounter])+".xml"};this.getFilename=function(){return this.filename};this.setStatus=function(a){this.status=a;this.fireEvent(new mxEventObject("statusChanged"))};this.getStatus=
function(){return this.status};this.graphChangeListener=function(a,b){var c=null!=b?b.getProperty("edit"):null;null!=c&&c.ignoreEdit||this.setModified(!0)};this.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.graphChangeListener.apply(this,arguments)}));this.graph.resetViewOnRootChange=!1;this.init()};Editor.pageCounter=0;
(function(){try{for(var a=window;null!=a.opener&&"undefined"!==typeof a.opener.Editor&&!isNaN(a.opener.Editor.pageCounter)&&a.opener!=a;)a=a.opener;null!=a&&(a.Editor.pageCounter++,Editor.pageCounter=a.Editor.pageCounter)}catch(c){}})();Editor.useLocalStorage="undefined"!=typeof Storage&&mxClient.IS_IOS;
Editor.moveImage=mxClient.IS_SVG?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI4cHgiIGhlaWdodD0iMjhweCI+PGc+PC9nPjxnPjxnPjxnPjxwYXRoIHRyYW5zZm9ybT0idHJhbnNsYXRlKDIuNCwyLjQpc2NhbGUoMC44KXJvdGF0ZSg0NSwxMiwxMikiIHN0cm9rZT0iIzI5YjZmMiIgZmlsbD0iIzI5YjZmMiIgZD0iTTE1LDNsMi4zLDIuM2wtMi44OSwyLjg3bDEuNDIsMS40MkwxOC43LDYuN0wyMSw5VjNIMTV6IE0zLDlsMi4zLTIuM2wyLjg3LDIuODlsMS40Mi0xLjQyTDYuNyw1LjNMOSwzSDNWOXogTTksMjEgbC0yLjMtMi4zbDIuODktMi44N2wtMS40Mi0xLjQyTDUuMywxNy4zTDMsMTV2Nkg5eiBNMjEsMTVsLTIuMywyLjNsLTIuODctMi44OWwtMS40MiwxLjQybDIuODksMi44N0wxNSwyMWg2VjE1eiIvPjwvZz48L2c+PC9nPjwvc3ZnPgo=":IMAGE_PATH+
@@ -2065,7 +2065,7 @@ Editor.fullscreenLargeImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAA
Editor.ctrlKey=mxClient.IS_MAC?"Cmd":"Ctrl";Editor.hintOffset=20;Editor.popupsAllowed=!0;mxUtils.extend(Editor,mxEventSource);Editor.prototype.originalNoForeignObject=mxClient.NO_FO;Editor.prototype.transparentImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhMAAwAIAAAP///wAAACH5BAEAAAAALAAAAAAwADAAAAIxhI+py+0Po5y02ouz3rz7D4biSJbmiabqyrbuC8fyTNf2jef6zvf+DwwKh8Si8egpAAA7":IMAGE_PATH+"/transparent.gif";Editor.prototype.extendCanvas=!0;Editor.prototype.chromeless=!1;Editor.prototype.cancelFirst=!0;
Editor.prototype.enabled=!0;Editor.prototype.filename=null;Editor.prototype.modified=!1;Editor.prototype.autosave=!0;Editor.prototype.initialTopSpacing=0;Editor.prototype.appName=document.title;Editor.prototype.editBlankUrl=window.location.protocol+"//"+window.location.host+"/";Editor.prototype.defaultGraphOverflow="hidden";Editor.prototype.init=function(){};Editor.prototype.isChromelessView=function(){return this.chromeless};Editor.prototype.setAutosave=function(a){this.autosave=a;this.fireEvent(new mxEventObject("autosaveChanged"))};
Editor.prototype.getEditBlankUrl=function(a){return this.editBlankUrl+a};
-Editor.prototype.editAsNew=function(a,c){var d=null!=c?"?title="+encodeURIComponent(c):"";null!=urlParams.ui&&(d+=(0<d.length?"&":"?")+"ui="+urlParams.ui);if("undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)){var b=null,g=mxUtils.bind(this,function(c){"ready"==c.data&&c.source==b&&(mxEvent.removeListener(window,"message",g),b.postMessage(a,"*"))});mxEvent.addListener(window,"message",g);b=this.graph.openLink(this.getEditBlankUrl(d+(0<d.length?"&":"?")+
+Editor.prototype.editAsNew=function(a,c){var d=null!=c?"?title="+encodeURIComponent(c):"";null!=urlParams.ui&&(d+=(0<d.length?"&":"?")+"ui="+urlParams.ui);if("undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)){var b=null,f=mxUtils.bind(this,function(c){"ready"==c.data&&c.source==b&&(mxEvent.removeListener(window,"message",f),b.postMessage(a,"*"))});mxEvent.addListener(window,"message",f);b=this.graph.openLink(this.getEditBlankUrl(d+(0<d.length?"&":"?")+
"client=1"),null,!0)}else this.graph.openLink(this.getEditBlankUrl(d)+"#R"+encodeURIComponent(a))};Editor.prototype.createGraph=function(a,c){var d=new Graph(null,c,null,null,a);d.transparentBackground=!1;this.chromeless||(d.isBlankLink=function(a){return!this.isExternalProtocol(a)});return d};
Editor.prototype.resetGraph=function(){this.graph.gridEnabled=!this.isChromelessView()||"1"==urlParams.grid;this.graph.graphHandler.guidesEnabled=!0;this.graph.setTooltips(!0);this.graph.setConnectable(!0);this.graph.foldingEnabled=!0;this.graph.scrollbars=this.graph.defaultScrollbars;this.graph.pageVisible=this.graph.defaultPageVisible;this.graph.pageBreaksVisible=this.graph.pageVisible;this.graph.preferPageSize=this.graph.pageBreaksVisible;this.graph.background=null;this.graph.pageScale=mxGraph.prototype.pageScale;
this.graph.pageFormat=mxGraph.prototype.pageFormat;this.graph.currentScale=1;this.graph.currentTranslate.x=0;this.graph.currentTranslate.y=0;this.updateGraphComponents();this.graph.view.setScale(1)};
@@ -2078,14 +2078,14 @@ Editor.prototype.getGraphXml=function(a){a=(null!=a?a:1)?(new mxCodec(mxUtils.cr
this.graph.gridSize);a.setAttribute("guides",this.graph.graphHandler.guidesEnabled?"1":"0");a.setAttribute("tooltips",this.graph.tooltipHandler.isEnabled()?"1":"0");a.setAttribute("connect",this.graph.connectionHandler.isEnabled()?"1":"0");a.setAttribute("arrows",this.graph.connectionArrowsEnabled?"1":"0");a.setAttribute("fold",this.graph.foldingEnabled?"1":"0");a.setAttribute("page",this.graph.pageVisible?"1":"0");a.setAttribute("pageScale",this.graph.pageScale);a.setAttribute("pageWidth",this.graph.pageFormat.width);
a.setAttribute("pageHeight",this.graph.pageFormat.height);null!=this.graph.background&&a.setAttribute("background",this.graph.background);return a};Editor.prototype.updateGraphComponents=function(){var a=this.graph;null!=a.container&&(a.view.validateBackground(),a.container.style.overflow=a.scrollbars?"auto":this.defaultGraphOverflow,this.fireEvent(new mxEventObject("updateGraphComponents")))};Editor.prototype.setModified=function(a){this.modified=a};
Editor.prototype.setFilename=function(a){this.filename=a};
-Editor.prototype.createUndoManager=function(){var a=this.graph,c=new mxUndoManager;this.undoListener=function(a,d){c.undoableEditHappened(d.getProperty("edit"))};var d=mxUtils.bind(this,function(a,c){this.undoListener.apply(this,arguments)});a.getModel().addListener(mxEvent.UNDO,d);a.getView().addListener(mxEvent.UNDO,d);d=function(b,c){var d=a.getSelectionCellsForChanges(c.getProperty("edit").changes,function(a){return!(a instanceof mxChildChange)});if(0<d.length){a.getModel();for(var g=[],f=0;f<
-d.length;f++)null!=a.view.getState(d[f])&&g.push(d[f]);a.setSelectionCells(g)}};c.addListener(mxEvent.UNDO,d);c.addListener(mxEvent.REDO,d);return c};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(a){this.consumer=this.producer=null;this.done=a;this.args=null};OpenFile.prototype.setConsumer=function(a){this.consumer=a;this.execute()};
+Editor.prototype.createUndoManager=function(){var a=this.graph,c=new mxUndoManager;this.undoListener=function(a,d){c.undoableEditHappened(d.getProperty("edit"))};var d=mxUtils.bind(this,function(a,c){this.undoListener.apply(this,arguments)});a.getModel().addListener(mxEvent.UNDO,d);a.getView().addListener(mxEvent.UNDO,d);d=function(b,c){var d=a.getSelectionCellsForChanges(c.getProperty("edit").changes,function(a){return!(a instanceof mxChildChange)});if(0<d.length){a.getModel();for(var f=[],g=0;g<
+d.length;g++)null!=a.view.getState(d[g])&&f.push(d[g]);a.setSelectionCells(f)}};c.addListener(mxEvent.UNDO,d);c.addListener(mxEvent.REDO,d);return c};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(a){this.consumer=this.producer=null;this.done=a;this.args=null};OpenFile.prototype.setConsumer=function(a){this.consumer=a;this.execute()};
OpenFile.prototype.setData=function(){this.args=arguments;this.execute()};OpenFile.prototype.error=function(a){this.cancel(!0);mxUtils.alert(a)};OpenFile.prototype.execute=function(){null!=this.consumer&&null!=this.args&&(this.cancel(!1),this.consumer.apply(this,this.args))};OpenFile.prototype.cancel=function(a){null!=this.done&&this.done(null!=a?a:!0)};
-function Dialog(a,c,d,b,g,e,h,f,k,l,m){var n=0;mxClient.IS_VML&&(null==document.documentMode||8>document.documentMode)&&(n=80);d+=n;b+=n;var p=d,q=b,u=mxUtils.getDocumentSize();null!=window.innerHeight&&(u.height=window.innerHeight);var v=u.height,r=Math.max(1,Math.round((u.width-d-64)/2)),w=Math.max(1,Math.round((v-b-a.footerHeight)/3));mxClient.IS_QUIRKS||(c.style.maxHeight="100%");d=null!=document.body?Math.min(d,document.body.scrollWidth-64):d;b=Math.min(b,v-64);0<a.dialogs.length&&(this.zIndex+=
-2*a.dialogs.length);null==this.bg&&(this.bg=a.createDiv("background"),this.bg.style.position="absolute",this.bg.style.background=Dialog.backdropColor,this.bg.style.height=v+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity),mxClient.IS_QUIRKS&&new mxDivResizer(this.bg));u=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=u.x+"px";this.bg.style.top=u.y+"px";r+=u.x;w+=u.y;g&&document.body.appendChild(this.bg);var t=a.createDiv(k?"geTransDialog":
-"geDialog");g=this.getPosition(r,w,d,b);r=g.x;w=g.y;t.style.width=d+"px";t.style.height=b+"px";t.style.left=r+"px";t.style.top=w+"px";t.style.zIndex=this.zIndex;t.appendChild(c);document.body.appendChild(t);!f&&c.clientHeight>t.clientHeight-64&&(c.style.overflowY="auto");if(e&&(e=document.createElement("img"),e.setAttribute("src",Dialog.prototype.closeImage),e.setAttribute("title",mxResources.get("close")),e.className="geDialogClose",e.style.top=w+14+"px",e.style.left=r+d+38-n+"px",e.style.zIndex=
+function Dialog(a,c,d,b,f,e,h,g,k,l,m){var n=0;mxClient.IS_VML&&(null==document.documentMode||8>document.documentMode)&&(n=80);d+=n;b+=n;var p=d,q=b,u=mxUtils.getDocumentSize();null!=window.innerHeight&&(u.height=window.innerHeight);var v=u.height,r=Math.max(1,Math.round((u.width-d-64)/2)),w=Math.max(1,Math.round((v-b-a.footerHeight)/3));mxClient.IS_QUIRKS||(c.style.maxHeight="100%");d=null!=document.body?Math.min(d,document.body.scrollWidth-64):d;b=Math.min(b,v-64);0<a.dialogs.length&&(this.zIndex+=
+2*a.dialogs.length);null==this.bg&&(this.bg=a.createDiv("background"),this.bg.style.position="absolute",this.bg.style.background=Dialog.backdropColor,this.bg.style.height=v+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity),mxClient.IS_QUIRKS&&new mxDivResizer(this.bg));u=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=u.x+"px";this.bg.style.top=u.y+"px";r+=u.x;w+=u.y;f&&document.body.appendChild(this.bg);var t=a.createDiv(k?"geTransDialog":
+"geDialog");f=this.getPosition(r,w,d,b);r=f.x;w=f.y;t.style.width=d+"px";t.style.height=b+"px";t.style.left=r+"px";t.style.top=w+"px";t.style.zIndex=this.zIndex;t.appendChild(c);document.body.appendChild(t);!g&&c.clientHeight>t.clientHeight-64&&(c.style.overflowY="auto");if(e&&(e=document.createElement("img"),e.setAttribute("src",Dialog.prototype.closeImage),e.setAttribute("title",mxResources.get("close")),e.className="geDialogClose",e.style.top=w+14+"px",e.style.left=r+d+38-n+"px",e.style.zIndex=
this.zIndex,mxEvent.addListener(e,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(e),this.dialogImg=e,!m)){var y=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(a){y=!0}),null,mxUtils.bind(this,function(b){y&&(a.hideDialog(!0),y=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=l){var e=l();null!=e&&(p=d=e.w,q=b=e.h)}e=mxUtils.getDocumentSize();v=e.height;this.bg.style.height=v+"px";r=Math.max(1,Math.round((e.width-d-64)/2));w=Math.max(1,
-Math.round((v-b-a.footerHeight)/3));d=null!=document.body?Math.min(p,document.body.scrollWidth-64):p;b=Math.min(q,v-64);e=this.getPosition(r,w,d,b);r=e.x;w=e.y;t.style.left=r+"px";t.style.top=w+"px";t.style.width=d+"px";t.style.height=b+"px";!f&&c.clientHeight>t.clientHeight-64&&(c.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=w+14+"px",this.dialogImg.style.left=r+d+38-n+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=h;this.container=
+Math.round((v-b-a.footerHeight)/3));d=null!=document.body?Math.min(p,document.body.scrollWidth-64):p;b=Math.min(q,v-64);e=this.getPosition(r,w,d,b);r=e.x;w=e.y;t.style.left=r+"px";t.style.top=w+"px";t.style.width=d+"px";t.style.height=b+"px";!g&&c.clientHeight>t.clientHeight-64&&(c.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=w+14+"px",this.dialogImg.style.left=r+d+38-n+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=h;this.container=
t;a.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-1;
Dialog.prototype.noColorImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkEzRDlBMUUwODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkEzRDlBMUUxODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QTNEOUExREU4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QTNEOUExREY4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5xh3fmAAAABlBMVEX////MzMw46qqDAAAAGElEQVR42mJggAJGKGAYIIGBth8KAAIMAEUQAIElnLuQAAAAAElFTkSuQmCC":IMAGE_PATH+
"/nocolor.png";Dialog.prototype.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJAQMAAADaX5RTAAAABlBMVEV7mr3///+wksspAAAAAnRSTlP/AOW3MEoAAAAdSURBVAgdY9jXwCDDwNDRwHCwgeExmASygSL7GgB12QiqNHZZIwAAAABJRU5ErkJggg==":IMAGE_PATH+"/close.png";
@@ -2095,82 +2095,82 @@ Dialog.prototype.lockedImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoA
"/locked.png";
Dialog.prototype.unlockedImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAMAAABhq6zVAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MzdDMDZCN0QxNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MzdDMDZCN0UxNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDozN0MwNkI3QjE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDozN0MwNkI3QzE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PkKMpVwAAAAYUExURZmZmbKysr+/v6ysrOXl5czMzLGxsf///zHN5lwAAAAIdFJOU/////////8A3oO9WQAAADxJREFUeNpUzFESACAEBNBVsfe/cZJU+8Mzs8CIABCidtfGOndnYsT40HDSiCcbPdoJo10o9aI677cpwACRoAF3dFNlswAAAABJRU5ErkJggg==":IMAGE_PATH+
"/unlocked.png";Dialog.prototype.bgOpacity=80;Dialog.prototype.getPosition=function(a,c){return new mxPoint(a,c)};Dialog.prototype.close=function(a,c){if(null!=this.onDialogClose){if(0==this.onDialogClose(a,c))return!1;this.onDialogClose=null}null!=this.dialogImg&&(this.dialogImg.parentNode.removeChild(this.dialogImg),this.dialogImg=null);null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);mxEvent.removeListener(window,"resize",this.resizeListener);this.container.parentNode.removeChild(this.container)};
-var ErrorDialog=function(a,c,d,b,g,e,h,f,k,l,m){k=null!=k?k:!0;var n=document.createElement("div");n.style.textAlign="center";if(null!=c){var p=document.createElement("div");p.style.padding="0px";p.style.margin="0px";p.style.fontSize="18px";p.style.paddingBottom="16px";p.style.marginBottom="10px";p.style.borderBottom="1px solid #c0c0c0";p.style.color="gray";p.style.whiteSpace="nowrap";p.style.textOverflow="ellipsis";p.style.overflow="hidden";mxUtils.write(p,c);p.setAttribute("title",c);n.appendChild(p)}c=
-document.createElement("div");c.style.lineHeight="1.2em";c.style.padding="6px";c.innerHTML=d;n.appendChild(c);d=document.createElement("div");d.style.marginTop="12px";d.style.textAlign="center";null!=e&&(c=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();e()}),c.className="geBtn",d.appendChild(c),d.style.textAlign="center");null!=l&&(l=mxUtils.button(l,function(){null!=m&&m()}),l.className="geBtn",d.appendChild(l));var q=mxUtils.button(b,function(){k&&a.hideDialog();null!=g&&g()});
-q.className="geBtn";d.appendChild(q);null!=h&&(b=mxUtils.button(h,function(){k&&a.hideDialog();null!=f&&f()}),b.className="geBtn gePrimaryBtn",d.appendChild(b));this.init=function(){q.focus()};n.appendChild(d);this.container=n},PrintDialog=function(a,c){this.create(a,c)};
-PrintDialog.prototype.create=function(a){function c(a){var b=f.checked||l.checked,c=parseInt(n.value)/100;isNaN(c)&&(c=1,n.value="100%");var c=.75*c,e=d.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,g=1/d.pageScale;if(b){var h=f.checked?1:parseInt(m.value);isNaN(h)||(g=mxUtils.getScaleForPageCount(h,d,e))}d.getGraphBounds();var k=h=0,e=mxRectangle.fromRectangle(e);e.width=Math.ceil(e.width*c);e.height=Math.ceil(e.height*c);g*=c;!b&&d.pageVisible?(c=d.getPageLayout(),h-=c.x*e.width,k-=c.y*e.height):
-b=!0;b=PrintDialog.createPrintPreview(d,g,e,0,h,k,b);b.open();a&&PrintDialog.printPreview(b)}var d=a.editor.graph,b,g,e=document.createElement("table");e.style.width="100%";e.style.height="100%";var h=document.createElement("tbody");b=document.createElement("tr");var f=document.createElement("input");f.setAttribute("type","checkbox");g=document.createElement("td");g.setAttribute("colspan","2");g.style.fontSize="10pt";g.appendChild(f);var k=document.createElement("span");mxUtils.write(k," "+mxResources.get("fitPage"));
-g.appendChild(k);mxEvent.addListener(k,"click",function(a){f.checked=!f.checked;l.checked=!f.checked;mxEvent.consume(a)});mxEvent.addListener(f,"change",function(){l.checked=!f.checked});b.appendChild(g);h.appendChild(b);b=b.cloneNode(!1);var l=document.createElement("input");l.setAttribute("type","checkbox");g=document.createElement("td");g.style.fontSize="10pt";g.appendChild(l);k=document.createElement("span");mxUtils.write(k," "+mxResources.get("posterPrint")+":");g.appendChild(k);mxEvent.addListener(k,
-"click",function(a){l.checked=!l.checked;f.checked=!l.checked;mxEvent.consume(a)});b.appendChild(g);var m=document.createElement("input");m.setAttribute("value","1");m.setAttribute("type","number");m.setAttribute("min","1");m.setAttribute("size","4");m.setAttribute("disabled","disabled");m.style.width="50px";g=document.createElement("td");g.style.fontSize="10pt";g.appendChild(m);mxUtils.write(g," "+mxResources.get("pages")+" (max)");b.appendChild(g);h.appendChild(b);mxEvent.addListener(l,"change",
-function(){l.checked?m.removeAttribute("disabled"):m.setAttribute("disabled","disabled");f.checked=!l.checked});b=b.cloneNode(!1);g=document.createElement("td");mxUtils.write(g,mxResources.get("pageScale")+":");b.appendChild(g);g=document.createElement("td");var n=document.createElement("input");n.setAttribute("value","100 %");n.setAttribute("size","5");n.style.width="50px";g.appendChild(n);b.appendChild(g);h.appendChild(b);b=document.createElement("tr");g=document.createElement("td");g.colSpan=2;
-g.style.paddingTop="20px";g.setAttribute("align","right");k=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});k.className="geBtn";a.editor.cancelFirst&&g.appendChild(k);if(PrintDialog.previewEnabled){var p=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();c(!1)});p.className="geBtn";g.appendChild(p)}p=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();c(!0)});p.className="geBtn gePrimaryBtn";g.appendChild(p);a.editor.cancelFirst||
-g.appendChild(k);b.appendChild(g);h.appendChild(b);e.appendChild(h);this.container=e};PrintDialog.printPreview=function(a){try{if(null!=a.wnd){var c=function(){a.wnd.focus();a.wnd.print();a.wnd.close()};mxClient.IS_GC?window.setTimeout(c,500):c()}}catch(d){}};
-PrintDialog.createPrintPreview=function(a,c,d,b,g,e,h){c=new mxPrintPreview(a,c,d,b,g,e);c.title=mxResources.get("preview");c.printBackgroundImage=!0;c.autoOrigin=h;a=a.background;if(null==a||""==a||a==mxConstants.NONE)a="#ffffff";c.backgroundColor=a;var f=c.writeHead;c.writeHead=function(a){f.apply(this,arguments);a.writeln('<style type="text/css">');a.writeln("@media screen {");a.writeln(" body > div { padding:30px;box-sizing:content-box; }");a.writeln("}");a.writeln("</style>")};return c};
+var ErrorDialog=function(a,c,d,b,f,e,h,g,k,l,m){k=null!=k?k:!0;var n=document.createElement("div");n.style.textAlign="center";if(null!=c){var p=document.createElement("div");p.style.padding="0px";p.style.margin="0px";p.style.fontSize="18px";p.style.paddingBottom="16px";p.style.marginBottom="10px";p.style.borderBottom="1px solid #c0c0c0";p.style.color="gray";p.style.whiteSpace="nowrap";p.style.textOverflow="ellipsis";p.style.overflow="hidden";mxUtils.write(p,c);p.setAttribute("title",c);n.appendChild(p)}c=
+document.createElement("div");c.style.lineHeight="1.2em";c.style.padding="6px";c.innerHTML=d;n.appendChild(c);d=document.createElement("div");d.style.marginTop="12px";d.style.textAlign="center";null!=e&&(c=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();e()}),c.className="geBtn",d.appendChild(c),d.style.textAlign="center");null!=l&&(l=mxUtils.button(l,function(){null!=m&&m()}),l.className="geBtn",d.appendChild(l));var q=mxUtils.button(b,function(){k&&a.hideDialog();null!=f&&f()});
+q.className="geBtn";d.appendChild(q);null!=h&&(b=mxUtils.button(h,function(){k&&a.hideDialog();null!=g&&g()}),b.className="geBtn gePrimaryBtn",d.appendChild(b));this.init=function(){q.focus()};n.appendChild(d);this.container=n},PrintDialog=function(a,c){this.create(a,c)};
+PrintDialog.prototype.create=function(a){function c(a){var b=g.checked||l.checked,c=parseInt(n.value)/100;isNaN(c)&&(c=1,n.value="100%");var c=.75*c,e=d.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,f=1/d.pageScale;if(b){var h=g.checked?1:parseInt(m.value);isNaN(h)||(f=mxUtils.getScaleForPageCount(h,d,e))}d.getGraphBounds();var k=h=0,e=mxRectangle.fromRectangle(e);e.width=Math.ceil(e.width*c);e.height=Math.ceil(e.height*c);f*=c;!b&&d.pageVisible?(c=d.getPageLayout(),h-=c.x*e.width,k-=c.y*e.height):
+b=!0;b=PrintDialog.createPrintPreview(d,f,e,0,h,k,b);b.open();a&&PrintDialog.printPreview(b)}var d=a.editor.graph,b,f,e=document.createElement("table");e.style.width="100%";e.style.height="100%";var h=document.createElement("tbody");b=document.createElement("tr");var g=document.createElement("input");g.setAttribute("type","checkbox");f=document.createElement("td");f.setAttribute("colspan","2");f.style.fontSize="10pt";f.appendChild(g);var k=document.createElement("span");mxUtils.write(k," "+mxResources.get("fitPage"));
+f.appendChild(k);mxEvent.addListener(k,"click",function(a){g.checked=!g.checked;l.checked=!g.checked;mxEvent.consume(a)});mxEvent.addListener(g,"change",function(){l.checked=!g.checked});b.appendChild(f);h.appendChild(b);b=b.cloneNode(!1);var l=document.createElement("input");l.setAttribute("type","checkbox");f=document.createElement("td");f.style.fontSize="10pt";f.appendChild(l);k=document.createElement("span");mxUtils.write(k," "+mxResources.get("posterPrint")+":");f.appendChild(k);mxEvent.addListener(k,
+"click",function(a){l.checked=!l.checked;g.checked=!l.checked;mxEvent.consume(a)});b.appendChild(f);var m=document.createElement("input");m.setAttribute("value","1");m.setAttribute("type","number");m.setAttribute("min","1");m.setAttribute("size","4");m.setAttribute("disabled","disabled");m.style.width="50px";f=document.createElement("td");f.style.fontSize="10pt";f.appendChild(m);mxUtils.write(f," "+mxResources.get("pages")+" (max)");b.appendChild(f);h.appendChild(b);mxEvent.addListener(l,"change",
+function(){l.checked?m.removeAttribute("disabled"):m.setAttribute("disabled","disabled");g.checked=!l.checked});b=b.cloneNode(!1);f=document.createElement("td");mxUtils.write(f,mxResources.get("pageScale")+":");b.appendChild(f);f=document.createElement("td");var n=document.createElement("input");n.setAttribute("value","100 %");n.setAttribute("size","5");n.style.width="50px";f.appendChild(n);b.appendChild(f);h.appendChild(b);b=document.createElement("tr");f=document.createElement("td");f.colSpan=2;
+f.style.paddingTop="20px";f.setAttribute("align","right");k=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});k.className="geBtn";a.editor.cancelFirst&&f.appendChild(k);if(PrintDialog.previewEnabled){var p=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();c(!1)});p.className="geBtn";f.appendChild(p)}p=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();c(!0)});p.className="geBtn gePrimaryBtn";f.appendChild(p);a.editor.cancelFirst||
+f.appendChild(k);b.appendChild(f);h.appendChild(b);e.appendChild(h);this.container=e};PrintDialog.printPreview=function(a){try{if(null!=a.wnd){var c=function(){a.wnd.focus();a.wnd.print();a.wnd.close()};mxClient.IS_GC?window.setTimeout(c,500):c()}}catch(d){}};
+PrintDialog.createPrintPreview=function(a,c,d,b,f,e,h){c=new mxPrintPreview(a,c,d,b,f,e);c.title=mxResources.get("preview");c.printBackgroundImage=!0;c.autoOrigin=h;a=a.background;if(null==a||""==a||a==mxConstants.NONE)a="#ffffff";c.backgroundColor=a;var g=c.writeHead;c.writeHead=function(a){g.apply(this,arguments);a.writeln('<style type="text/css">');a.writeln("@media screen {");a.writeln(" body > div { padding:30px;box-sizing:content-box; }");a.writeln("}");a.writeln("</style>")};return c};
PrintDialog.previewEnabled=!0;
-var PageSetupDialog=function(a){function c(){null==m||m==mxConstants.NONE?(l.style.backgroundColor="",l.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(l.style.backgroundColor=m,l.style.backgroundImage="")}function d(){null==q?(p.removeAttribute("title"),p.style.fontSize="",p.innerHTML=mxResources.get("change")+"..."):(p.setAttribute("title",q.src),p.style.fontSize="11px",p.innerHTML=q.src.substring(0,42)+"...")}var b=a.editor.graph,g,e,h=document.createElement("table");h.style.width=
-"100%";h.style.height="100%";var f=document.createElement("tbody");g=document.createElement("tr");e=document.createElement("td");e.style.verticalAlign="top";e.style.fontSize="10pt";mxUtils.write(e,mxResources.get("paperSize")+":");g.appendChild(e);e=document.createElement("td");e.style.verticalAlign="top";e.style.fontSize="10pt";var k=PageSetupDialog.addPageFormatPanel(e,"pagesetupdialog",b.pageFormat);g.appendChild(e);f.appendChild(g);g=document.createElement("tr");e=document.createElement("td");
-mxUtils.write(e,mxResources.get("background")+":");g.appendChild(e);e=document.createElement("td");e.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var l=document.createElement("button");l.style.width="18px";l.style.height="18px";l.style.marginRight="20px";l.style.backgroundPosition="center center";l.style.backgroundRepeat="no-repeat";var m=b.background;c();mxEvent.addListener(l,"click",function(b){a.pickColor(m||"none",function(a){m=a;c()});mxEvent.consume(b)});
-e.appendChild(l);mxUtils.write(e,mxResources.get("gridSize")+":");var n=document.createElement("input");n.setAttribute("type","number");n.setAttribute("min","0");n.style.width="40px";n.style.marginLeft="6px";n.value=b.getGridSize();e.appendChild(n);mxEvent.addListener(n,"change",function(){var a=parseInt(n.value);n.value=Math.max(1,isNaN(a)?b.getGridSize():a)});g.appendChild(e);f.appendChild(g);g=document.createElement("tr");e=document.createElement("td");mxUtils.write(e,mxResources.get("image")+
-":");g.appendChild(e);e=document.createElement("td");var p=document.createElement("a");p.style.textDecoration="underline";p.style.cursor="pointer";p.style.color="#a0a0a0";var q=b.backgroundImage;mxEvent.addListener(p,"click",function(b){a.showBackgroundImageDialog(function(a){q=a;d()});mxEvent.consume(b)});d();e.appendChild(p);g.appendChild(e);f.appendChild(g);g=document.createElement("tr");e=document.createElement("td");e.colSpan=2;e.style.paddingTop="16px";e.setAttribute("align","right");var u=
+var PageSetupDialog=function(a){function c(){null==m||m==mxConstants.NONE?(l.style.backgroundColor="",l.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(l.style.backgroundColor=m,l.style.backgroundImage="")}function d(){null==q?(p.removeAttribute("title"),p.style.fontSize="",p.innerHTML=mxResources.get("change")+"..."):(p.setAttribute("title",q.src),p.style.fontSize="11px",p.innerHTML=q.src.substring(0,42)+"...")}var b=a.editor.graph,f,e,h=document.createElement("table");h.style.width=
+"100%";h.style.height="100%";var g=document.createElement("tbody");f=document.createElement("tr");e=document.createElement("td");e.style.verticalAlign="top";e.style.fontSize="10pt";mxUtils.write(e,mxResources.get("paperSize")+":");f.appendChild(e);e=document.createElement("td");e.style.verticalAlign="top";e.style.fontSize="10pt";var k=PageSetupDialog.addPageFormatPanel(e,"pagesetupdialog",b.pageFormat);f.appendChild(e);g.appendChild(f);f=document.createElement("tr");e=document.createElement("td");
+mxUtils.write(e,mxResources.get("background")+":");f.appendChild(e);e=document.createElement("td");e.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var l=document.createElement("button");l.style.width="18px";l.style.height="18px";l.style.marginRight="20px";l.style.backgroundPosition="center center";l.style.backgroundRepeat="no-repeat";var m=b.background;c();mxEvent.addListener(l,"click",function(b){a.pickColor(m||"none",function(a){m=a;c()});mxEvent.consume(b)});
+e.appendChild(l);mxUtils.write(e,mxResources.get("gridSize")+":");var n=document.createElement("input");n.setAttribute("type","number");n.setAttribute("min","0");n.style.width="40px";n.style.marginLeft="6px";n.value=b.getGridSize();e.appendChild(n);mxEvent.addListener(n,"change",function(){var a=parseInt(n.value);n.value=Math.max(1,isNaN(a)?b.getGridSize():a)});f.appendChild(e);g.appendChild(f);f=document.createElement("tr");e=document.createElement("td");mxUtils.write(e,mxResources.get("image")+
+":");f.appendChild(e);e=document.createElement("td");var p=document.createElement("a");p.style.textDecoration="underline";p.style.cursor="pointer";p.style.color="#a0a0a0";var q=b.backgroundImage;mxEvent.addListener(p,"click",function(b){a.showBackgroundImageDialog(function(a){q=a;d()});mxEvent.consume(b)});d();e.appendChild(p);f.appendChild(e);g.appendChild(f);f=document.createElement("tr");e=document.createElement("td");e.colSpan=2;e.style.paddingTop="16px";e.setAttribute("align","right");var u=
mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});u.className="geBtn";a.editor.cancelFirst&&e.appendChild(u);var v=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();b.gridSize!==n.value&&b.setGridSize(parseInt(n.value));var c=new ChangePageSetup(a,m,q,k.get());c.ignoreColor=b.background==m;c.ignoreImage=(null!=b.backgroundImage?b.backgroundImage.src:null)===(null!=q?q.src:null);b.pageFormat.width==c.previousFormat.width&&b.pageFormat.height==c.previousFormat.height&&
-c.ignoreColor&&c.ignoreImage||b.model.execute(c)});v.className="geBtn gePrimaryBtn";e.appendChild(v);a.editor.cancelFirst||e.appendChild(u);g.appendChild(e);f.appendChild(g);h.appendChild(f);this.container=h};
-PageSetupDialog.addPageFormatPanel=function(a,c,d,b){function g(a,b,c){if(c||n!=document.activeElement&&p!=document.activeElement){a=!1;for(b=0;b<u.length;b++)c=u[b],t?"custom"==c.key&&(f.value=c.key,t=!1):null!=c.format&&("a4"==c.key?826==d.width?(d=mxRectangle.fromRectangle(d),d.width=827):826==d.height&&(d=mxRectangle.fromRectangle(d),d.height=827):"a5"==c.key&&(584==d.width?(d=mxRectangle.fromRectangle(d),d.width=583):584==d.height&&(d=mxRectangle.fromRectangle(d),d.height=583)),d.width==c.format.width&&
-d.height==c.format.height?(f.value=c.key,e.setAttribute("checked","checked"),e.defaultChecked=!0,e.checked=!0,h.removeAttribute("checked"),h.defaultChecked=!1,h.checked=!1,a=!0):d.width==c.format.height&&d.height==c.format.width&&(f.value=c.key,e.removeAttribute("checked"),e.defaultChecked=!1,e.checked=!1,h.setAttribute("checked","checked"),h.defaultChecked=!0,a=h.checked=!0));a?(k.style.display="",m.style.display="none"):(n.value=d.width/100,p.value=d.height/100,e.setAttribute("checked","checked"),
-f.value="custom",k.style.display="none",m.style.display="")}}c="format-"+c;var e=document.createElement("input");e.setAttribute("name",c);e.setAttribute("type","radio");e.setAttribute("value","portrait");var h=document.createElement("input");h.setAttribute("name",c);h.setAttribute("type","radio");h.setAttribute("value","landscape");var f=document.createElement("select");f.style.marginBottom="8px";f.style.width="202px";var k=document.createElement("div");k.style.marginLeft="4px";k.style.width="210px";
+c.ignoreColor&&c.ignoreImage||b.model.execute(c)});v.className="geBtn gePrimaryBtn";e.appendChild(v);a.editor.cancelFirst||e.appendChild(u);f.appendChild(e);g.appendChild(f);h.appendChild(g);this.container=h};
+PageSetupDialog.addPageFormatPanel=function(a,c,d,b){function f(a,b,c){if(c||n!=document.activeElement&&p!=document.activeElement){a=!1;for(b=0;b<u.length;b++)c=u[b],t?"custom"==c.key&&(g.value=c.key,t=!1):null!=c.format&&("a4"==c.key?826==d.width?(d=mxRectangle.fromRectangle(d),d.width=827):826==d.height&&(d=mxRectangle.fromRectangle(d),d.height=827):"a5"==c.key&&(584==d.width?(d=mxRectangle.fromRectangle(d),d.width=583):584==d.height&&(d=mxRectangle.fromRectangle(d),d.height=583)),d.width==c.format.width&&
+d.height==c.format.height?(g.value=c.key,e.setAttribute("checked","checked"),e.defaultChecked=!0,e.checked=!0,h.removeAttribute("checked"),h.defaultChecked=!1,h.checked=!1,a=!0):d.width==c.format.height&&d.height==c.format.width&&(g.value=c.key,e.removeAttribute("checked"),e.defaultChecked=!1,e.checked=!1,h.setAttribute("checked","checked"),h.defaultChecked=!0,a=h.checked=!0));a?(k.style.display="",m.style.display="none"):(n.value=d.width/100,p.value=d.height/100,e.setAttribute("checked","checked"),
+g.value="custom",k.style.display="none",m.style.display="")}}c="format-"+c;var e=document.createElement("input");e.setAttribute("name",c);e.setAttribute("type","radio");e.setAttribute("value","portrait");var h=document.createElement("input");h.setAttribute("name",c);h.setAttribute("type","radio");h.setAttribute("value","landscape");var g=document.createElement("select");g.style.marginBottom="8px";g.style.width="202px";var k=document.createElement("div");k.style.marginLeft="4px";k.style.width="210px";
k.style.height="24px";e.style.marginRight="6px";k.appendChild(e);c=document.createElement("span");c.style.maxWidth="100px";mxUtils.write(c,mxResources.get("portrait"));k.appendChild(c);h.style.marginLeft="10px";h.style.marginRight="6px";k.appendChild(h);var l=document.createElement("span");l.style.width="100px";mxUtils.write(l,mxResources.get("landscape"));k.appendChild(l);var m=document.createElement("div");m.style.marginLeft="4px";m.style.width="210px";m.style.height="24px";var n=document.createElement("input");
-n.setAttribute("size","7");n.style.textAlign="right";m.appendChild(n);mxUtils.write(m," in x ");var p=document.createElement("input");p.setAttribute("size","7");p.style.textAlign="right";m.appendChild(p);mxUtils.write(m," in");k.style.display="none";m.style.display="none";for(var q={},u=PageSetupDialog.getFormats(),v=0;v<u.length;v++){var r=u[v];q[r.key]=r;var w=document.createElement("option");w.setAttribute("value",r.key);mxUtils.write(w,r.title);f.appendChild(w)}var t=!1;g();a.appendChild(f);mxUtils.br(a);
-a.appendChild(k);a.appendChild(m);var y=d,x=function(a,c){var e=q[f.value];null!=e.format?(n.value=e.format.width/100,p.value=e.format.height/100,m.style.display="none",k.style.display=""):(k.style.display="none",m.style.display="");e=parseFloat(n.value);if(isNaN(e)||0>=e)n.value=d.width/100;e=parseFloat(p.value);if(isNaN(e)||0>=e)p.value=d.height/100;e=new mxRectangle(0,0,Math.floor(100*parseFloat(n.value)),Math.floor(100*parseFloat(p.value)));"custom"!=f.value&&h.checked&&(e=new mxRectangle(0,0,
-e.height,e.width));c&&t||e.width==y.width&&e.height==y.height||(y=e,null!=b&&b(y))};mxEvent.addListener(c,"click",function(a){e.checked=!0;x(a);mxEvent.consume(a)});mxEvent.addListener(l,"click",function(a){h.checked=!0;x(a);mxEvent.consume(a)});mxEvent.addListener(n,"blur",x);mxEvent.addListener(n,"click",x);mxEvent.addListener(p,"blur",x);mxEvent.addListener(p,"click",x);mxEvent.addListener(h,"change",x);mxEvent.addListener(e,"change",x);mxEvent.addListener(f,"change",function(a){t="custom"==f.value;
-x(a,!0)});x();return{set:function(a){d=a;g(null,null,!0)},get:function(){return y},widthInput:n,heightInput:p}};
+n.setAttribute("size","7");n.style.textAlign="right";m.appendChild(n);mxUtils.write(m," in x ");var p=document.createElement("input");p.setAttribute("size","7");p.style.textAlign="right";m.appendChild(p);mxUtils.write(m," in");k.style.display="none";m.style.display="none";for(var q={},u=PageSetupDialog.getFormats(),v=0;v<u.length;v++){var r=u[v];q[r.key]=r;var w=document.createElement("option");w.setAttribute("value",r.key);mxUtils.write(w,r.title);g.appendChild(w)}var t=!1;f();a.appendChild(g);mxUtils.br(a);
+a.appendChild(k);a.appendChild(m);var y=d,x=function(a,c){var e=q[g.value];null!=e.format?(n.value=e.format.width/100,p.value=e.format.height/100,m.style.display="none",k.style.display=""):(k.style.display="none",m.style.display="");e=parseFloat(n.value);if(isNaN(e)||0>=e)n.value=d.width/100;e=parseFloat(p.value);if(isNaN(e)||0>=e)p.value=d.height/100;e=new mxRectangle(0,0,Math.floor(100*parseFloat(n.value)),Math.floor(100*parseFloat(p.value)));"custom"!=g.value&&h.checked&&(e=new mxRectangle(0,0,
+e.height,e.width));c&&t||e.width==y.width&&e.height==y.height||(y=e,null!=b&&b(y))};mxEvent.addListener(c,"click",function(a){e.checked=!0;x(a);mxEvent.consume(a)});mxEvent.addListener(l,"click",function(a){h.checked=!0;x(a);mxEvent.consume(a)});mxEvent.addListener(n,"blur",x);mxEvent.addListener(n,"click",x);mxEvent.addListener(p,"blur",x);mxEvent.addListener(p,"click",x);mxEvent.addListener(h,"change",x);mxEvent.addListener(e,"change",x);mxEvent.addListener(g,"change",function(a){t="custom"==g.value;
+x(a,!0)});x();return{set:function(a){d=a;f(null,null,!0)},get:function(){return y},widthInput:n,heightInput:p}};
PageSetupDialog.getFormats=function(){return[{key:"letter",title:'US-Letter (8,5" x 11")',format:mxConstants.PAGE_FORMAT_LETTER_PORTRAIT},{key:"legal",title:'US-Legal (8,5" x 14")',format:new mxRectangle(0,0,850,1400)},{key:"tabloid",title:'US-Tabloid (11" x 17")',format:new mxRectangle(0,0,1100,1700)},{key:"executive",title:'US-Executive (7" x 10")',format:new mxRectangle(0,0,700,1E3)},{key:"a0",title:"A0 (841 mm x 1189 mm)",format:new mxRectangle(0,0,3300,4681)},{key:"a1",title:"A1 (594 mm x 841 mm)",
format:new mxRectangle(0,0,2339,3300)},{key:"a2",title:"A2 (420 mm x 594 mm)",format:new mxRectangle(0,0,1654,2336)},{key:"a3",title:"A3 (297 mm x 420 mm)",format:new mxRectangle(0,0,1169,1654)},{key:"a4",title:"A4 (210 mm x 297 mm)",format:mxConstants.PAGE_FORMAT_A4_PORTRAIT},{key:"a5",title:"A5 (148 mm x 210 mm)",format:new mxRectangle(0,0,583,827)},{key:"a6",title:"A6 (105 mm x 148 mm)",format:new mxRectangle(0,0,413,583)},{key:"a7",title:"A7 (74 mm x 105 mm)",format:new mxRectangle(0,0,291,413)},
{key:"b4",title:"B4 (250 mm x 353 mm)",format:new mxRectangle(0,0,980,1390)},{key:"b5",title:"B5 (176 mm x 250 mm)",format:new mxRectangle(0,0,690,980)},{key:"16-9",title:"16:9 (1600 x 900)",format:new mxRectangle(0,0,1600,900)},{key:"16-10",title:"16:10 (1920 x 1200)",format:new mxRectangle(0,0,1920,1200)},{key:"4-3",title:"4:3 (1600 x 1200)",format:new mxRectangle(0,0,1600,1200)},{key:"custom",title:mxResources.get("custom"),format:null}]};
-var FilenameDialog=function(a,c,d,b,g,e,h,f,k,l,m,n){k=null!=k?k:!0;var p,q,u=document.createElement("table"),v=document.createElement("tbody");u.style.marginTop="8px";p=document.createElement("tr");q=document.createElement("td");q.style.whiteSpace="nowrap";q.style.fontSize="10pt";q.style.width=m?"80px":"120px";mxUtils.write(q,(g||mxResources.get("filename"))+":");p.appendChild(q);var r=document.createElement("input");r.setAttribute("value",c||"");r.style.marginLeft="4px";r.style.width=null!=n?n+
-"px":"180px";var w=mxUtils.button(d,function(){if(null==e||e(r.value))k&&a.hideDialog(),b(r.value)});w.className="geBtn gePrimaryBtn";this.init=function(){if(null!=g||null==h)if(r.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?r.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var a=u.parentNode;if(null!=a){var b=null;mxEvent.addListener(a,"dragleave",function(a){null!=b&&(b.style.backgroundColor="",b=null);a.stopPropagation();a.preventDefault()});
+var FilenameDialog=function(a,c,d,b,f,e,h,g,k,l,m,n){k=null!=k?k:!0;var p,q,u=document.createElement("table"),v=document.createElement("tbody");u.style.marginTop="8px";p=document.createElement("tr");q=document.createElement("td");q.style.whiteSpace="nowrap";q.style.fontSize="10pt";q.style.width=m?"80px":"120px";mxUtils.write(q,(f||mxResources.get("filename"))+":");p.appendChild(q);var r=document.createElement("input");r.setAttribute("value",c||"");r.style.marginLeft="4px";r.style.width=null!=n?n+
+"px":"180px";var w=mxUtils.button(d,function(){if(null==e||e(r.value))k&&a.hideDialog(),b(r.value)});w.className="geBtn gePrimaryBtn";this.init=function(){if(null!=f||null==h)if(r.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?r.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var a=u.parentNode;if(null!=a){var b=null;mxEvent.addListener(a,"dragleave",function(a){null!=b&&(b.style.backgroundColor="",b=null);a.stopPropagation();a.preventDefault()});
mxEvent.addListener(a,"dragover",mxUtils.bind(this,function(a){null==b&&(!mxClient.IS_IE||10<document.documentMode)&&(b=r,b.style.backgroundColor="#ebf2f9");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(a,"drop",mxUtils.bind(this,function(a){null!=b&&(b.style.backgroundColor="",b=null);0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")&&(r.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),w.click());a.stopPropagation();a.preventDefault()}))}}};q=document.createElement("td");
-q.style.whiteSpace="nowrap";q.appendChild(r);p.appendChild(q);if(null!=g||null==h)v.appendChild(p),null!=m&&(null!=a.editor.diagramFileTypes&&(p=FilenameDialog.createFileTypes(a,r,a.editor.diagramFileTypes),p.style.marginLeft="6px",p.style.width="74px",q.appendChild(p),r.style.width=null!=n?n-40+"px":"140px"),q.appendChild(FilenameDialog.createTypeHint(a,r,m)));null!=h&&(p=document.createElement("tr"),q=document.createElement("td"),q.colSpan=2,q.appendChild(h),p.appendChild(q),v.appendChild(p));p=
-document.createElement("tr");q=document.createElement("td");q.colSpan=2;q.style.paddingTop="20px";q.style.whiteSpace="nowrap";q.setAttribute("align","right");m=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=l&&l()});m.className="geBtn";a.editor.cancelFirst&&q.appendChild(m);null!=f&&(n=mxUtils.button(mxResources.get("help"),function(){a.editor.graph.openLink(f)}),n.className="geBtn",q.appendChild(n));mxEvent.addListener(r,"keypress",function(a){13==a.keyCode&&w.click()});
+q.style.whiteSpace="nowrap";q.appendChild(r);p.appendChild(q);if(null!=f||null==h)v.appendChild(p),null!=m&&(null!=a.editor.diagramFileTypes&&(p=FilenameDialog.createFileTypes(a,r,a.editor.diagramFileTypes),p.style.marginLeft="6px",p.style.width="74px",q.appendChild(p),r.style.width=null!=n?n-40+"px":"140px"),q.appendChild(FilenameDialog.createTypeHint(a,r,m)));null!=h&&(p=document.createElement("tr"),q=document.createElement("td"),q.colSpan=2,q.appendChild(h),p.appendChild(q),v.appendChild(p));p=
+document.createElement("tr");q=document.createElement("td");q.colSpan=2;q.style.paddingTop="20px";q.style.whiteSpace="nowrap";q.setAttribute("align","right");m=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=l&&l()});m.className="geBtn";a.editor.cancelFirst&&q.appendChild(m);null!=g&&(n=mxUtils.button(mxResources.get("help"),function(){a.editor.graph.openLink(g)}),n.className="geBtn",q.appendChild(n));mxEvent.addListener(r,"keypress",function(a){13==a.keyCode&&w.click()});
q.appendChild(w);a.editor.cancelFirst||q.appendChild(m);p.appendChild(q);v.appendChild(p);u.appendChild(v);this.container=u};FilenameDialog.filenameHelpLink=null;
-FilenameDialog.createTypeHint=function(a,c,d){var b=document.createElement("img");b.style.cssText="vertical-align:top;height:16px;width:16px;margin-left:4px;background-repeat:no-repeat;background-position:center bottom;cursor:pointer;";mxUtils.setOpacity(b,70);var g=function(){b.setAttribute("src",Editor.helpImage);b.setAttribute("title",mxResources.get("help"));for(var a=0;a<d.length;a++)if(0<d[a].ext.length&&c.value.toLowerCase().substring(c.value.length-d[a].ext.length-1)=="."+d[a].ext){b.setAttribute("src",
-mxClient.imageBasePath+"/warning.png");b.setAttribute("title",mxResources.get(d[a].title));break}};mxEvent.addListener(c,"keyup",g);mxEvent.addListener(c,"change",g);mxEvent.addListener(b,"click",function(c){var d=b.getAttribute("title");b.getAttribute("src")==Editor.helpImage?a.editor.graph.openLink(FilenameDialog.filenameHelpLink):""!=d&&a.showError(null,d,mxResources.get("help"),function(){a.editor.graph.openLink(FilenameDialog.filenameHelpLink)},null,mxResources.get("ok"),null,null,null,340,90);
-mxEvent.consume(c)});g();return b};
-FilenameDialog.createFileTypes=function(a,c,d){var b=document.createElement("select");for(a=0;a<d.length;a++){var g=document.createElement("option");g.setAttribute("value",a);mxUtils.write(g,mxResources.get(d[a].description)+" (."+d[a].extension+")");b.appendChild(g)}mxEvent.addListener(b,"change",function(a){a=d[b.value].extension;var e=c.value.lastIndexOf(".");0<e?(a=d[b.value].extension,c.value=c.value.substring(0,e+1)+a):c.value=c.value+"."+a;"createEvent"in document?(a=document.createEvent("HTMLEvents"),
-a.initEvent("change",!1,!0),c.dispatchEvent(a)):c.fireEvent("onchange")});mxEvent.addListener(c,"change",function(a){var e=c.value.lastIndexOf(".");a=0;if(0<e)for(var e=c.value.toLowerCase().substring(e+1),f=0;f<d.length;f++)if(e==d[f].extension){a=f;break}b.value=a});return b};
+FilenameDialog.createTypeHint=function(a,c,d){var b=document.createElement("img");b.style.cssText="vertical-align:top;height:16px;width:16px;margin-left:4px;background-repeat:no-repeat;background-position:center bottom;cursor:pointer;";mxUtils.setOpacity(b,70);var f=function(){b.setAttribute("src",Editor.helpImage);b.setAttribute("title",mxResources.get("help"));for(var a=0;a<d.length;a++)if(0<d[a].ext.length&&c.value.toLowerCase().substring(c.value.length-d[a].ext.length-1)=="."+d[a].ext){b.setAttribute("src",
+mxClient.imageBasePath+"/warning.png");b.setAttribute("title",mxResources.get(d[a].title));break}};mxEvent.addListener(c,"keyup",f);mxEvent.addListener(c,"change",f);mxEvent.addListener(b,"click",function(c){var d=b.getAttribute("title");b.getAttribute("src")==Editor.helpImage?a.editor.graph.openLink(FilenameDialog.filenameHelpLink):""!=d&&a.showError(null,d,mxResources.get("help"),function(){a.editor.graph.openLink(FilenameDialog.filenameHelpLink)},null,mxResources.get("ok"),null,null,null,340,90);
+mxEvent.consume(c)});f();return b};
+FilenameDialog.createFileTypes=function(a,c,d){var b=document.createElement("select");for(a=0;a<d.length;a++){var f=document.createElement("option");f.setAttribute("value",a);mxUtils.write(f,mxResources.get(d[a].description)+" (."+d[a].extension+")");b.appendChild(f)}mxEvent.addListener(b,"change",function(a){a=d[b.value].extension;var e=c.value.lastIndexOf(".");0<e?(a=d[b.value].extension,c.value=c.value.substring(0,e+1)+a):c.value=c.value+"."+a;"createEvent"in document?(a=document.createEvent("HTMLEvents"),
+a.initEvent("change",!1,!0),c.dispatchEvent(a)):c.fireEvent("onchange")});a=function(a){var e=c.value.lastIndexOf(".");a=0;if(0<e)for(var e=c.value.toLowerCase().substring(e+1),g=0;g<d.length;g++)if(e==d[g].extension){a=g;break}b.value=a};mxEvent.addListener(c,"change",a);a();return b};
(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(b){a.dblClick(b)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(b){a.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(b))}),
mxUtils.bind(this,function(b){null!=a.tooltipHandler&&a.tooltipHandler.isHideOnHover()&&a.tooltipHandler.hide();a.isMouseDown&&!mxEvent.isConsumed(b)&&a.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(b))}),mxUtils.bind(this,function(b){a.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(b))})))}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",d="none",e="";if(a.isGridEnabled()){e=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+")",e=a.gridSize*this.scale*this.gridSteps):
-d="url("+this.gridImage+")";var g=c=0;null!=a.view.backgroundPageShape&&(g=this.getBackgroundPageBounds(),c=1+g.x,g=1+g.y);e=-Math.round(e-mxUtils.mod(this.translate.x*this.scale-c,e))+"px "+-Math.round(e-mxUtils.mod(this.translate.y*this.scale-g,e))+"px"}c=a.view.canvas;null!=c.ownerSVGElement&&(c=c.ownerSVGElement);null!=a.view.backgroundPageShape?(a.view.backgroundPageShape.node.style.backgroundPosition=e,a.view.backgroundPageShape.node.style.backgroundImage=d,a.view.backgroundPageShape.node.style.backgroundColor=
+d="url("+this.gridImage+")";var f=c=0;null!=a.view.backgroundPageShape&&(f=this.getBackgroundPageBounds(),c=1+f.x,f=1+f.y);e=-Math.round(e-mxUtils.mod(this.translate.x*this.scale-c,e))+"px "+-Math.round(e-mxUtils.mod(this.translate.y*this.scale-f,e))+"px"}c=a.view.canvas;null!=c.ownerSVGElement&&(c=c.ownerSVGElement);null!=a.view.backgroundPageShape?(a.view.backgroundPageShape.node.style.backgroundPosition=e,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=e,c.style.backgroundColor=b,c.style.backgroundImage=d)};mxGraphView.prototype.createSvgGrid=function(a){for(var b=this.graph.gridSize*this.scale;b<this.minGridSize;)b*=2;for(var c=this.gridSteps*b,d=[],e=1;e<this.gridSteps;e++){var f=e*b;d.push("M 0 "+f+" L "+c+" "+f+" M "+f+" 0 L "+f+" "+c)}return'<svg width="'+
c+'" height="'+c+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+c+'" height="'+c+'" patternUnits="userSpaceOnUse"><path d="'+d.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,c){a.apply(this,arguments);if(null!=this.shiftPreview1){var d=
-this.view.canvas;null!=d.ownerSVGElement&&(d=d.ownerSVGElement);var e=this.gridSize*this.view.scale*this.view.gridSteps,e=-Math.round(e-mxUtils.mod(this.view.translate.x*this.view.scale+b,e))+"px "+-Math.round(e-mxUtils.mod(this.view.translate.y*this.view.scale+c,e))+"px";d.style.backgroundPosition=e}};mxGraph.prototype.updatePageBreaks=function(a,b,c){var d=this.view.scale,e=this.view.translate,g=this.pageFormat,f=d*this.pageScale,h=this.view.getBackgroundPageBounds();b=h.width;c=h.height;var k=
-new mxRectangle(d*e.x,d*e.y,g.width*f,g.height*f),l=(a=a&&Math.min(k.width,k.height)>this.minPageBreakDist)?Math.ceil(c/k.height)-1:0,w=a?Math.ceil(b/k.width)-1:0,t=h.x+b,y=h.y+c;null==this.horizontalPageBreaks&&0<l&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<w&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var b=a==this.horizontalPageBreaks?l:w,c=0;c<=b;c++){var d=a==this.horizontalPageBreaks?[new mxPoint(Math.round(h.x),Math.round(h.y+(c+1)*k.height)),
+this.view.canvas;null!=d.ownerSVGElement&&(d=d.ownerSVGElement);var e=this.gridSize*this.view.scale*this.view.gridSteps,e=-Math.round(e-mxUtils.mod(this.view.translate.x*this.view.scale+b,e))+"px "+-Math.round(e-mxUtils.mod(this.view.translate.y*this.view.scale+c,e))+"px";d.style.backgroundPosition=e}};mxGraph.prototype.updatePageBreaks=function(a,b,c){var d=this.view.scale,e=this.view.translate,f=this.pageFormat,g=d*this.pageScale,h=this.view.getBackgroundPageBounds();b=h.width;c=h.height;var k=
+new mxRectangle(d*e.x,d*e.y,f.width*g,f.height*g),l=(a=a&&Math.min(k.width,k.height)>this.minPageBreakDist)?Math.ceil(c/k.height)-1:0,w=a?Math.ceil(b/k.width)-1:0,t=h.x+b,y=h.y+c;null==this.horizontalPageBreaks&&0<l&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<w&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var b=a==this.horizontalPageBreaks?l:w,c=0;c<=b;c++){var d=a==this.horizontalPageBreaks?[new mxPoint(Math.round(h.x),Math.round(h.y+(c+1)*k.height)),
new mxPoint(Math.round(t),Math.round(h.y+(c+1)*k.height))]:[new mxPoint(Math.round(h.x+(c+1)*k.width),Math.round(h.y)),new mxPoint(Math.round(h.x+(c+1)*k.width),Math.round(y))];null!=a[c]?(a[c].points=d,a[c].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[c]=d)}for(c=b;c<a.length;c++)a[c].destroy();a.splice(b,a.length-b)}});a(this.horizontalPageBreaks);a(this.verticalPageBreaks)};
-var c=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(a,b,d){for(var e=0;e<b.length;e++)if(this.graph.getModel().isVertex(b[e])){var g=this.graph.getCellGeometry(b[e]);if(null!=g&&g.relative)return!1}return c.apply(this,arguments)};var d=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var a=d.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,e=this.graph.pageScale,g=d.width*e,d=d.height*e,e=Math.floor(Math.min(0,b)/g),h=Math.floor(Math.min(0,
-c)/d);return new mxRectangle(this.scale*(this.translate.x+e*g),this.scale*(this.translate.y+h*d),this.scale*(Math.ceil(Math.max(1,b+a.width/this.scale)/g)-e)*g,this.scale*(Math.ceil(Math.max(1,c+a.height/this.scale)/d)-h)*d)};var b=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(a,c){b.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=c+"px")};var g=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(a,b,c,d,e,h){var f=g.apply(this,arguments);null==h||h||mxEvent.addListener(f,"mousedown",function(a){mxEvent.consume(a)});return f};var e=mxGraphHandler.prototype.getInitialCellForEvent;mxGraphHandler.prototype.getInitialCellForEvent=function(a){var b=this.graph.getModel(),c=b.getParent(this.graph.getSelectionCell()),d=e.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 h=mxGraphHandler.prototype.isDelayedSelection;mxGraphHandler.prototype.isDelayedSelection=function(a,b){var c=h.apply(this,arguments);if(!c)for(var d=this.graph.getModel(),e=d.getParent(a);null!=e;){if(this.graph.isCellSelected(e)&&d.isVertex(e)){c=!0;break}e=d.getParent(e)}return c};mxGraphHandler.prototype.selectDelayed=
+var c=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(a,b,d){for(var e=0;e<b.length;e++)if(this.graph.getModel().isVertex(b[e])){var f=this.graph.getCellGeometry(b[e]);if(null!=f&&f.relative)return!1}return c.apply(this,arguments)};var d=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var a=d.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,e=this.graph.pageScale,f=d.width*e,d=d.height*e,e=Math.floor(Math.min(0,b)/f),h=Math.floor(Math.min(0,
+c)/d);return new mxRectangle(this.scale*(this.translate.x+e*f),this.scale*(this.translate.y+h*d),this.scale*(Math.ceil(Math.max(1,b+a.width/this.scale)/f)-e)*f,this.scale*(Math.ceil(Math.max(1,c+a.height/this.scale)/d)-h)*d)};var b=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(a,c){b.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=c+"px")};var f=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(a,b,c,d,e,h){var g=f.apply(this,arguments);null==h||h||mxEvent.addListener(g,"mousedown",function(a){mxEvent.consume(a)});return g};var e=mxGraphHandler.prototype.getInitialCellForEvent;mxGraphHandler.prototype.getInitialCellForEvent=function(a){var b=this.graph.getModel(),c=b.getParent(this.graph.getSelectionCell()),d=e.apply(this,arguments),f=b.getParent(d);
+if(null==c||c!=d&&c!=f)for(;!this.graph.isCellSelected(d)&&!this.graph.isCellSelected(f)&&b.isVertex(f)&&!this.graph.isContainer(f);)d=f,f=this.graph.getModel().getParent(d);return d};var h=mxGraphHandler.prototype.isDelayedSelection;mxGraphHandler.prototype.isDelayedSelection=function(a,b){var c=h.apply(this,arguments);if(!c)for(var d=this.graph.getModel(),e=d.getParent(a);null!=e;){if(this.graph.isCellSelected(e)&&d.isVertex(e)){c=!0;break}e=d.getParent(e)}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,c,d){mxEventSource.call(this);this.destroyFunctions=[];this.editor=a||new Editor;this.container=c||document.body;var b=this.editor.graph;b.lightbox=d;b.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,b.isEnabled=function(){return!1},b.panningHandler.isForcePanningEvent=function(a){return!mxEvent.isPopupTrigger(a.getEvent())});this.actions=new Actions(this);this.menus=this.createMenus();if(!b.standalone){this.createDivs();this.createUi();this.refresh();var g=mxUtils.bind(this,function(a){null==a&&(a=window.event);return b.isEditing()||null!=a&&this.isSelectionAllowed(a)});this.container==document.body&&(this.menubarContainer.onselectstart=
-g,this.menubarContainer.onmousedown=g,this.toolbarContainer.onselectstart=g,this.toolbarContainer.onmousedown=g,this.diagramContainer.onselectstart=g,this.diagramContainer.onmousedown=g,this.sidebarContainer.onselectstart=g,this.sidebarContainer.onmousedown=g,this.formatContainer.onselectstart=g,this.formatContainer.onmousedown=g,this.footerContainer.onselectstart=g,this.footerContainer.onmousedown=g,null!=this.tabContainer&&(this.tabContainer.onselectstart=g));!this.editor.chromeless||this.editor.editable?
-(c=function(a){if(null!=a){var b=mxEvent.getSource(a);if("A"==b.nodeName)for(;null!=b;){if("geHint"==b.className)return!0;b=b.parentNode}}return g(a)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",c):this.diagramContainer.oncontextmenu=c):b.panningHandler.usePopupTrigger=!1;b.init(this.diagramContainer);mxClient.IS_SVG&&null!=b.view.getDrawPane()&&(c=b.view.getDrawPane().ownerSVGElement,null!=c&&(c.style.position=
+this.editor.chromeless&&!this.editor.editable&&(this.footerHeight=0,b.isEnabled=function(){return!1},b.panningHandler.isForcePanningEvent=function(a){return!mxEvent.isPopupTrigger(a.getEvent())});this.actions=new Actions(this);this.menus=this.createMenus();if(!b.standalone){this.createDivs();this.createUi();this.refresh();var f=mxUtils.bind(this,function(a){null==a&&(a=window.event);return b.isEditing()||null!=a&&this.isSelectionAllowed(a)});this.container==document.body&&(this.menubarContainer.onselectstart=
+f,this.menubarContainer.onmousedown=f,this.toolbarContainer.onselectstart=f,this.toolbarContainer.onmousedown=f,this.diagramContainer.onselectstart=f,this.diagramContainer.onmousedown=f,this.sidebarContainer.onselectstart=f,this.sidebarContainer.onmousedown=f,this.formatContainer.onselectstart=f,this.formatContainer.onmousedown=f,this.footerContainer.onselectstart=f,this.footerContainer.onmousedown=f,null!=this.tabContainer&&(this.tabContainer.onselectstart=f));!this.editor.chromeless||this.editor.editable?
+(c=function(a){if(null!=a){var b=mxEvent.getSource(a);if("A"==b.nodeName)for(;null!=b;){if("geHint"==b.className)return!0;b=b.parentNode}}return f(a)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",c):this.diagramContainer.oncontextmenu=c):b.panningHandler.usePopupTrigger=!1;b.init(this.diagramContainer);mxClient.IS_SVG&&null!=b.view.getDrawPane()&&(c=b.view.getDrawPane().ownerSVGElement,null!=c&&(c.style.position=
"absolute"));this.hoverIcons=this.createHoverIcons();mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(a){var b=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(a)-b.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(a)-b.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var e=!1,h=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=
function(a,b){return e||h.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(a){32!=a.which||b.isEditing()?mxEvent.isConsumed(a)||27!=a.keyCode||this.hideDialog(null,!0):(e=!0,this.hoverIcons.reset(),b.container.style.cursor="move",b.isEditing()||mxEvent.getSource(a)!=b.container||mxEvent.consume(a))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(a){b.container.style.cursor="";e=!1});mxEvent.addListener(document,"keyup",
-this.keyupHandler);var f=b.panningHandler.isForcePanningEvent;b.panningHandler.isForcePanningEvent=function(a){return f.apply(this,arguments)||e||mxEvent.isMouseEvent(a.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(a.getEvent()))&&(!mxEvent.isControlDown(a.getEvent())&&mxEvent.isRightMouseButton(a.getEvent())||mxEvent.isMiddleMouseButton(a.getEvent()))};var k=b.cellEditor.isStopEditingEvent;b.cellEditor.isStopEditingEvent=function(a){return k.apply(this,arguments)||13==a.keyCode&&(!mxClient.IS_SF&&
+this.keyupHandler);var g=b.panningHandler.isForcePanningEvent;b.panningHandler.isForcePanningEvent=function(a){return g.apply(this,arguments)||e||mxEvent.isMouseEvent(a.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(a.getEvent()))&&(!mxEvent.isControlDown(a.getEvent())&&mxEvent.isRightMouseButton(a.getEvent())||mxEvent.isMiddleMouseButton(a.getEvent()))};var k=b.cellEditor.isStopEditingEvent;b.cellEditor.isStopEditingEvent=function(a){return k.apply(this,arguments)||13==a.keyCode&&(!mxClient.IS_SF&&
mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxClient.IS_SF&&mxEvent.isShiftDown(a))};var l=b.isZoomWheelEvent;b.isZoomWheelEvent=function(){return e||l.apply(this,arguments)};var m=!1,n=null,p=null,q=null,u=mxUtils.bind(this,function(){if(null!=this.toolbar&&m!=b.cellEditor.isContentEditing()){for(var a=this.toolbar.container.firstChild,c=[];null!=a;){var d=a.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,a)&&(a.parentNode.removeChild(a),c.push(a));a=d}a=this.toolbar.fontMenu;
d=this.toolbar.sizeMenu;if(null==q)this.toolbar.createTextToolbar();else{for(var e=0;e<q.length;e++)this.toolbar.container.appendChild(q[e]);this.toolbar.fontMenu=n;this.toolbar.sizeMenu=p}m=b.cellEditor.isContentEditing();n=a;p=d;q=c}}),v=this,r=b.cellEditor.startEditing;b.cellEditor.startEditing=function(){r.apply(this,arguments);u();if(b.cellEditor.isContentEditing()){var a=!1,c=function(){a||(a=!0,window.setTimeout(function(){for(var c=b.getSelectedElement();null!=c&&c.nodeType!=mxConstants.NODETYPE_ELEMENT;)c=
c.parentNode;if(null!=c&&(c=mxUtils.getCurrentStyle(c),null!=c&&null!=v.toolbar)){var d=c.fontFamily;"'"==d.charAt(0)&&(d=d.substring(1));"'"==d.charAt(d.length-1)&&(d=d.substring(0,d.length-1));v.toolbar.setFontName(d);v.toolbar.setFontSize(parseInt(c.fontSize))}a=!1},0))};mxEvent.addListener(b.cellEditor.textarea,"input",c);mxEvent.addListener(b.cellEditor.textarea,"touchend",c);mxEvent.addListener(b.cellEditor.textarea,"mouseup",c);mxEvent.addListener(b.cellEditor.textarea,"keyup",c);c()}};var w=
b.cellEditor.stopEditing;b.cellEditor.stopEditing=function(a,b){try{w.apply(this,arguments),u()}catch(G){v.handleError(G)}};b.container.setAttribute("tabindex","0");b.container.style.cursor="default";if(window.self===window.top&&null!=b.container.parentNode)try{b.container.focus()}catch(F){}var t=b.fireMouseEvent;b.fireMouseEvent=function(a,b,c){a==mxEvent.MOUSE_DOWN&&this.container.focus();t.apply(this,arguments)};b.popupMenuHandler.autoExpand=!0;null!=this.menus&&(b.popupMenuHandler.factoryMethod=
mxUtils.bind(this,function(a,b,c){this.menus.createPopupMenu(a,b,c)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(a){b.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};var y="rounded shadow glass dashed dashPattern comic labelBackgroundColor".split(" "),x="shape edgeStyle curved rounded elbow comic jumpStyle jumpSize".split(" ");this.setDefaultStyle=function(a){try{var c=b.view.getState(a);if(null!=c){var d=
-a.clone();d.style="";var e=b.getCellStyle(d);a=[];var d=[],g;for(g in c.style)e[g]!=c.style[g]&&(a.push(c.style[g]),d.push(g));for(var f=b.getModel().getStyle(c.cell),h=null!=f?f.split(";"):[],f=0;f<h.length;f++){var k=h[f],l=k.indexOf("=");if(0<=l){g=k.substring(0,l);var m=k.substring(l+1);null!=e[g]&&"none"==m&&(a.push(m),d.push(g))}}b.getModel().isEdge(c.cell)?b.currentEdgeStyle={}:b.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",d,"values",a,"cells",[c.cell]))}}catch(M){this.handleError(M)}};
+a.clone();d.style="";var e=b.getCellStyle(d);a=[];var d=[],f;for(f in c.style)e[f]!=c.style[f]&&(a.push(c.style[f]),d.push(f));for(var g=b.getModel().getStyle(c.cell),h=null!=g?g.split(";"):[],g=0;g<h.length;g++){var k=h[g],l=k.indexOf("=");if(0<=l){f=k.substring(0,l);var m=k.substring(l+1);null!=e[f]&&"none"==m&&(a.push(m),d.push(f))}}b.getModel().isEdge(c.cell)?b.currentEdgeStyle={}:b.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",d,"values",a,"cells",[c.cell]))}}catch(M){this.handleError(M)}};
this.clearDefaultStyle=function(){b.currentEdgeStyle=mxUtils.clone(b.defaultEdgeStyle);b.currentVertexStyle=mxUtils.clone(b.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var C=["fontFamily","fontSize","fontColor"],B="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),D=["startArrow startFill startSize sourcePerimeterSpacing endArrow endFill endSize targetPerimeterSpacing".split(" "),["strokeColor","strokeWidth"],
-["fillColor","gradientColor"],C,["opacity"],["align"],["html"]];for(a=0;a<D.length;a++)for(c=0;c<D[a].length;c++)y.push(D[a][c]);for(a=0;a<x.length;a++)0>mxUtils.indexOf(y,x[a])&&y.push(x[a]);var A=function(a,c){var d=b.getModel();d.beginUpdate();try{for(var e=0;e<a.length;e++){var g=a[e],f;if(c)f=["fontSize","fontFamily","fontColor"];else{var h=d.getStyle(g),k=null!=h?h.split(";"):[];f=y.slice();for(var l=0;l<k.length;l++){var m=k[l],n=m.indexOf("=");if(0<=n){var p=m.substring(0,n),q=mxUtils.indexOf(f,
-p);0<=q&&f.splice(q,1);for(var u=0;u<D.length;u++){var r=D[u];if(0<=mxUtils.indexOf(r,p))for(var v=0;v<r.length;v++){var t=mxUtils.indexOf(f,r[v]);0<=t&&f.splice(t,1)}}}}}for(var w=d.isEdge(g),C=w?b.currentEdgeStyle:b.currentVertexStyle,B=d.getStyle(g),l=0;l<f.length;l++){var p=f[l],A=C[p];null==A||"shape"==p&&!w||w&&!(0>mxUtils.indexOf(x,p))||(B=mxUtils.setStyle(B,p,A))}d.setStyle(g,B)}}finally{d.endUpdate()}};b.addListener("cellsInserted",function(a,b){A(b.getProperty("cells"))});b.addListener("textInserted",
-function(a,b){A(b.getProperty("cells"),!0)});b.connectionHandler.addListener(mxEvent.CONNECT,function(a,b){var c=[b.getProperty("cell")];b.getProperty("terminalInserted")&&c.push(b.getProperty("terminal"));A(c)});this.addListener("styleChanged",mxUtils.bind(this,function(a,c){var d=c.getProperty("cells"),e=!1,g=!1;if(0<d.length)for(var f=0;f<d.length&&(e=b.getModel().isVertex(d[f])||e,!(g=b.getModel().isEdge(d[f])||g)||!e);f++);else g=e=!0;for(var d=c.getProperty("keys"),h=c.getProperty("values"),
-f=0;f<d.length;f++){var k=0<=mxUtils.indexOf(C,d[f]);if("strokeColor"!=d[f]||null!=h[f]&&"none"!=h[f])if(0<=mxUtils.indexOf(x,d[f]))g||0<=mxUtils.indexOf(B,d[f])?null==h[f]?delete b.currentEdgeStyle[d[f]]:b.currentEdgeStyle[d[f]]=h[f]:e&&0<=mxUtils.indexOf(y,d[f])&&(null==h[f]?delete b.currentVertexStyle[d[f]]:b.currentVertexStyle[d[f]]=h[f]);else if(0<=mxUtils.indexOf(y,d[f])){if(e||k)null==h[f]?delete b.currentVertexStyle[d[f]]:b.currentVertexStyle[d[f]]=h[f];if(g||k||0<=mxUtils.indexOf(B,d[f]))null==
-h[f]?delete b.currentEdgeStyle[d[f]]:b.currentEdgeStyle[d[f]]=h[f]}}null!=this.toolbar&&(this.toolbar.setFontName(b.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(b.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==b.currentEdgeStyle.edgeStyle&&"1"==b.currentEdgeStyle.curved?"geSprite geSprite-curved":"straight"==b.currentEdgeStyle.edgeStyle||
+["fillColor","gradientColor"],C,["opacity"],["align"],["html"]];for(a=0;a<D.length;a++)for(c=0;c<D[a].length;c++)y.push(D[a][c]);for(a=0;a<x.length;a++)0>mxUtils.indexOf(y,x[a])&&y.push(x[a]);var A=function(a,c){var d=b.getModel();d.beginUpdate();try{for(var e=0;e<a.length;e++){var f=a[e],g;if(c)g=["fontSize","fontFamily","fontColor"];else{var h=d.getStyle(f),k=null!=h?h.split(";"):[];g=y.slice();for(var l=0;l<k.length;l++){var m=k[l],n=m.indexOf("=");if(0<=n){var p=m.substring(0,n),q=mxUtils.indexOf(g,
+p);0<=q&&g.splice(q,1);for(var u=0;u<D.length;u++){var r=D[u];if(0<=mxUtils.indexOf(r,p))for(var v=0;v<r.length;v++){var t=mxUtils.indexOf(g,r[v]);0<=t&&g.splice(t,1)}}}}}for(var w=d.isEdge(f),C=w?b.currentEdgeStyle:b.currentVertexStyle,B=d.getStyle(f),l=0;l<g.length;l++){var p=g[l],A=C[p];null==A||"shape"==p&&!w||w&&!(0>mxUtils.indexOf(x,p))||(B=mxUtils.setStyle(B,p,A))}d.setStyle(f,B)}}finally{d.endUpdate()}};b.addListener("cellsInserted",function(a,b){A(b.getProperty("cells"))});b.addListener("textInserted",
+function(a,b){A(b.getProperty("cells"),!0)});b.connectionHandler.addListener(mxEvent.CONNECT,function(a,b){var c=[b.getProperty("cell")];b.getProperty("terminalInserted")&&c.push(b.getProperty("terminal"));A(c)});this.addListener("styleChanged",mxUtils.bind(this,function(a,c){var d=c.getProperty("cells"),e=!1,f=!1;if(0<d.length)for(var g=0;g<d.length&&(e=b.getModel().isVertex(d[g])||e,!(f=b.getModel().isEdge(d[g])||f)||!e);g++);else f=e=!0;for(var d=c.getProperty("keys"),h=c.getProperty("values"),
+g=0;g<d.length;g++){var k=0<=mxUtils.indexOf(C,d[g]);if("strokeColor"!=d[g]||null!=h[g]&&"none"!=h[g])if(0<=mxUtils.indexOf(x,d[g]))f||0<=mxUtils.indexOf(B,d[g])?null==h[g]?delete b.currentEdgeStyle[d[g]]:b.currentEdgeStyle[d[g]]=h[g]:e&&0<=mxUtils.indexOf(y,d[g])&&(null==h[g]?delete b.currentVertexStyle[d[g]]:b.currentVertexStyle[d[g]]=h[g]);else if(0<=mxUtils.indexOf(y,d[g])){if(e||k)null==h[g]?delete b.currentVertexStyle[d[g]]:b.currentVertexStyle[d[g]]=h[g];if(f||k||0<=mxUtils.indexOf(B,d[g]))null==
+h[g]?delete b.currentEdgeStyle[d[g]]:b.currentEdgeStyle[d[g]]=h[g]}}null!=this.toolbar&&(this.toolbar.setFontName(b.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(b.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==b.currentEdgeStyle.edgeStyle&&"1"==b.currentEdgeStyle.curved?"geSprite geSprite-curved":"straight"==b.currentEdgeStyle.edgeStyle||
"none"==b.currentEdgeStyle.edgeStyle||null==b.currentEdgeStyle.edgeStyle?"geSprite geSprite-straight":"entityRelationEdgeStyle"==b.currentEdgeStyle.edgeStyle?"geSprite geSprite-entity":"elbowEdgeStyle"==b.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==b.currentEdgeStyle.elbow?"verticalelbow":"horizontalelbow"):"isometricEdgeStyle"==b.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==b.currentEdgeStyle.elbow?"verticalisometric":"horizontalisometric"):"geSprite geSprite-orthogonal"),
null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==b.currentEdgeStyle.shape?"geSprite geSprite-linkedge":"flexArrow"==b.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==b.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"),null!=this.toolbar.lineStartMenu&&(this.toolbar.lineStartMenu.getElementsByTagName("div")[0].className=this.getCssClassForMarker("start",b.currentEdgeStyle.shape,b.currentEdgeStyle[mxConstants.STYLE_STARTARROW],
mxUtils.getValue(b.currentEdgeStyle,"startFill","1"))),null!=this.toolbar.lineEndMenu&&(this.toolbar.lineEndMenu.getElementsByTagName("div")[0].className=this.getCssClassForMarker("end",b.currentEdgeStyle.shape,b.currentEdgeStyle[mxConstants.STYLE_ENDARROW],mxUtils.getValue(b.currentEdgeStyle,"endFill","1"))))}));null!=this.toolbar&&(a=mxUtils.bind(this,function(){var a=b.currentVertexStyle.fontFamily||"Helvetica",c=String(b.currentVertexStyle.fontSize||"12"),d=b.getView().getState(b.getSelectionCell());
@@ -2189,38 +2189,38 @@ EditorUi.prototype.getCssClassForMarker=function(a,c,d,b){return"flexArrow"==c?n
d==mxConstants.ARROW_DIAMOND_THIN?"1"==b?"geSprite geSprite-"+a+"thindiamond":"geSprite geSprite-"+a+"thindiamondtrans":"openAsync"==d?"geSprite geSprite-"+a+"openasync":"dash"==d?"geSprite geSprite-"+a+"dash":"cross"==d?"geSprite geSprite-"+a+"cross":"async"==d?"1"==b?"geSprite geSprite-"+a+"async":"geSprite geSprite-"+a+"asynctrans":"circle"==d||"circlePlus"==d?"1"==b||"circle"==d?"geSprite geSprite-"+a+"circle":"geSprite geSprite-"+a+"circleplus":"ERone"==d?"geSprite geSprite-"+a+"erone":"ERmandOne"==
d?"geSprite geSprite-"+a+"eronetoone":"ERmany"==d?"geSprite geSprite-"+a+"ermany":"ERoneToMany"==d?"geSprite geSprite-"+a+"eronetomany":"ERzeroToOne"==d?"geSprite geSprite-"+a+"eroneopt":"ERzeroToMany"==d?"geSprite geSprite-"+a+"ermanyopt":"geSprite geSprite-noarrow"};EditorUi.prototype.createMenus=function(){return null};
EditorUi.prototype.updatePasteActionStates=function(){var a=this.editor.graph,c=this.actions.get("paste"),d=this.actions.get("pasteHere");c.setEnabled(this.editor.graph.cellEditor.isContentEditing()||!mxClipboard.isEmpty()&&a.isEnabled()&&!a.isCellLocked(a.getDefaultParent()));d.setEnabled(c.isEnabled())};
-EditorUi.prototype.initClipboard=function(){var a=this,c=mxClipboard.cut;mxClipboard.cut=function(b){b.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):c.apply(this,arguments);a.updatePasteActionStates()};mxClipboard.copy=function(b){var c=null;if(b.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{for(var c=c||b.getSelectionCells(),c=b.getExportableCells(b.model.getTopmostCells(c)),d={},e=b.createCellLookup(c),g=b.cloneCells(c,null,d),m=new mxGraphModel,n=m.getChildAt(m.getRoot(),
-0),p=0;p<g.length;p++)m.add(n,g[p]);b.updateCustomLinks(b.createCellMapping(d,e),g);mxClipboard.insertCount=1;mxClipboard.setCells(g)}a.updatePasteActionStates();return c};var d=mxClipboard.paste;mxClipboard.paste=function(b){var c=null;b.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):c=d.apply(this,arguments);a.updatePasteActionStates();return c};var b=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){b.apply(this,arguments);a.updatePasteActionStates()};
-var g=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(b,c){g.apply(this,arguments);a.updatePasteActionStates()};this.updatePasteActionStates()};EditorUi.prototype.lazyZoomDelay=20;EditorUi.prototype.wheelZoomDelay=400;EditorUi.prototype.buttonZoomDelay=600;
+EditorUi.prototype.initClipboard=function(){var a=this,c=mxClipboard.cut;mxClipboard.cut=function(b){b.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):c.apply(this,arguments);a.updatePasteActionStates()};mxClipboard.copy=function(b){var c=null;if(b.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{for(var c=c||b.getSelectionCells(),c=b.getExportableCells(b.model.getTopmostCells(c)),d={},e=b.createCellLookup(c),f=b.cloneCells(c,null,d),m=new mxGraphModel,n=m.getChildAt(m.getRoot(),
+0),p=0;p<f.length;p++)m.add(n,f[p]);b.updateCustomLinks(b.createCellMapping(d,e),f);mxClipboard.insertCount=1;mxClipboard.setCells(f)}a.updatePasteActionStates();return c};var d=mxClipboard.paste;mxClipboard.paste=function(b){var c=null;b.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):c=d.apply(this,arguments);a.updatePasteActionStates();return c};var b=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){b.apply(this,arguments);a.updatePasteActionStates()};
+var f=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(b,c){f.apply(this,arguments);a.updatePasteActionStates()};this.updatePasteActionStates()};EditorUi.prototype.lazyZoomDelay=20;EditorUi.prototype.wheelZoomDelay=400;EditorUi.prototype.buttonZoomDelay=600;
EditorUi.prototype.initCanvas=function(){var a=this.editor.graph;a.timerAutoScroll=!0;a.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((a.container.offsetWidth-34)/a.view.scale)),Math.max(0,Math.round((a.container.offsetHeight-34)/a.view.scale)))};a.view.getBackgroundPageBounds=function(){var a=this.graph.getPageLayout(),b=this.graph.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)};a.getPreferredPageSize=function(a,b,c){a=this.getPageLayout();b=this.getPageSize();return new mxRectangle(0,0,a.width*b.width,a.height*b.height)};var c=null,d=this;if(this.editor.isChromelessView()){this.chromelessResize=c=mxUtils.bind(this,function(b,c,d,e){if(null!=a.container&&!a.isViewer()){d=null!=d?d:0;e=null!=e?e:0;var g=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),f=mxUtils.hasScrollbars(a.container),h=a.view.translate,k=a.view.scale,l=mxRectangle.fromRectangle(g);
-l.x=l.x/k-h.x;l.y=l.y/k-h.y;l.width/=k;l.height/=k;var h=a.container.scrollTop,m=a.container.scrollLeft,n=mxClient.IS_QUIRKS||8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)n+=3;var p=a.container.offsetWidth-n,n=a.container.offsetHeight-n;b=b?Math.max(.3,Math.min(c||1,p/l.width)):k;c=(p-b*l.width)/2/b;var q=0==this.lightboxVerticalDivider?0:(n-b*l.height)/this.lightboxVerticalDivider/b;f&&(c=Math.max(c,0),q=Math.max(q,0));if(f||g.width<p||g.height<n)a.view.scaleAndTranslate(b,
-Math.floor(c-l.x),Math.floor(q-l.y)),a.container.scrollTop=h*b/k,a.container.scrollLeft=m*b/k;else if(0!=d||0!=e)g=a.view.translate,a.view.setTranslate(Math.floor(g.x+d/k),Math.floor(g.y+e/k))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var b=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",b);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",b)});this.editor.addListener("resetGraphView",
-mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(b){a.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(b){a.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var g=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));this.chromelessToolbar=document.createElement("div");this.chromelessToolbar.style.position="fixed";this.chromelessToolbar.style.overflow="hidden";
+this.scale*a.height*b.height)};a.getPreferredPageSize=function(a,b,c){a=this.getPageLayout();b=this.getPageSize();return new mxRectangle(0,0,a.width*b.width,a.height*b.height)};var c=null,d=this;if(this.editor.isChromelessView()){this.chromelessResize=c=mxUtils.bind(this,function(b,c,d,e){if(null!=a.container&&!a.isViewer()){d=null!=d?d:0;e=null!=e?e:0;var f=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),g=mxUtils.hasScrollbars(a.container),h=a.view.translate,k=a.view.scale,l=mxRectangle.fromRectangle(f);
+l.x=l.x/k-h.x;l.y=l.y/k-h.y;l.width/=k;l.height/=k;var h=a.container.scrollTop,m=a.container.scrollLeft,n=mxClient.IS_QUIRKS||8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)n+=3;var p=a.container.offsetWidth-n,n=a.container.offsetHeight-n;b=b?Math.max(.3,Math.min(c||1,p/l.width)):k;c=(p-b*l.width)/2/b;var q=0==this.lightboxVerticalDivider?0:(n-b*l.height)/this.lightboxVerticalDivider/b;g&&(c=Math.max(c,0),q=Math.max(q,0));if(g||f.width<p||f.height<n)a.view.scaleAndTranslate(b,
+Math.floor(c-l.x),Math.floor(q-l.y)),a.container.scrollTop=h*b/k,a.container.scrollLeft=m*b/k;else if(0!=d||0!=e)f=a.view.translate,a.view.setTranslate(Math.floor(f.x+d/k),Math.floor(f.y+e/k))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var b=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",b);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",b)});this.editor.addListener("resetGraphView",
+mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(b){a.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(b){a.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var f=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));this.chromelessToolbar=document.createElement("div");this.chromelessToolbar.style.position="fixed";this.chromelessToolbar.style.overflow="hidden";
this.chromelessToolbar.style.boxSizing="border-box";this.chromelessToolbar.style.whiteSpace="nowrap";this.chromelessToolbar.style.backgroundColor="#000000";this.chromelessToolbar.style.padding="10px 10px 8px 10px";this.chromelessToolbar.style.left=a.isViewer()?"0":"50%";mxClient.IS_VML||(mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"borderRadius","20px"),mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out"));var e=mxUtils.bind(this,function(){var b=
mxUtils.getCurrentStyle(a.container);a.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=b?parseInt(b["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",e);e();var h=0,e=mxUtils.bind(this,function(a,b,c){h++;var d=document.createElement("span");d.style.paddingLeft="8px";d.style.paddingRight="8px";d.style.cursor="pointer";mxEvent.addListener(d,"click",a);null!=c&&d.setAttribute("title",
-c);a=document.createElement("img");a.setAttribute("border","0");a.setAttribute("src",b);d.appendChild(a);this.chromelessToolbar.appendChild(d);return d});null!=g.backBtn&&e(mxUtils.bind(this,function(a){window.location.href=g.backBtn.url;mxEvent.consume(a)}),Editor.backLargeImage,mxResources.get("back",null,"Back"));var f=e(mxUtils.bind(this,function(a){this.actions.get("previousPage").funct();mxEvent.consume(a)}),Editor.previousLargeImage,mxResources.get("previousPage")),k=document.createElement("div");
+c);a=document.createElement("img");a.setAttribute("border","0");a.setAttribute("src",b);d.appendChild(a);this.chromelessToolbar.appendChild(d);return d});null!=f.backBtn&&e(mxUtils.bind(this,function(a){window.location.href=f.backBtn.url;mxEvent.consume(a)}),Editor.backLargeImage,mxResources.get("back",null,"Back"));var g=e(mxUtils.bind(this,function(a){this.actions.get("previousPage").funct();mxEvent.consume(a)}),Editor.previousLargeImage,mxResources.get("previousPage")),k=document.createElement("div");
k.style.display="inline-block";k.style.verticalAlign="top";k.style.fontFamily="Helvetica,Arial";k.style.marginTop="8px";k.style.fontSize="14px";k.style.color="#ffffff";this.chromelessToolbar.appendChild(k);var l=e(mxUtils.bind(this,function(a){this.actions.get("nextPage").funct();mxEvent.consume(a)}),Editor.nextLargeImage,mxResources.get("nextPage")),m=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(k.innerHTML="",mxUtils.write(k,mxUtils.indexOf(this.pages,
-this.currentPage)+1+" / "+this.pages.length))});f.style.paddingLeft="0px";f.style.paddingRight="4px";l.style.paddingLeft="4px";l.style.paddingRight="0px";var n=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(l.style.display="",f.style.display="",k.style.display="inline-block"):(l.style.display="none",f.style.display="none",k.style.display="none");m()});this.editor.addListener("resetGraphView",n);this.editor.addListener("pageSelected",m);e(mxUtils.bind(this,
+this.currentPage)+1+" / "+this.pages.length))});g.style.paddingLeft="0px";g.style.paddingRight="4px";l.style.paddingLeft="4px";l.style.paddingRight="0px";var n=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(l.style.display="",g.style.display="",k.style.display="inline-block"):(l.style.display="none",g.style.display="none",k.style.display="none");m()});this.editor.addListener("resetGraphView",n);this.editor.addListener("pageSelected",m);e(mxUtils.bind(this,
function(a){this.actions.get("zoomOut").funct();mxEvent.consume(a)}),Editor.zoomOutLargeImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");e(mxUtils.bind(this,function(a){this.actions.get("zoomIn").funct();mxEvent.consume(a)}),Editor.zoomInLargeImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");e(mxUtils.bind(this,function(b){a.isLightboxView()?(1==a.view.scale?this.lightboxFit():a.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(b)}),Editor.actualSizeLargeImage,
mxResources.get("fit"));var p=null,q=null,u=mxUtils.bind(this,function(a){null!=p&&(window.clearTimeout(p),fadeThead=null);null!=q&&(window.clearTimeout(q),fadeThead2=null);p=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);p=null;q=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";q=null}),600)}),a||200)}),v=mxUtils.bind(this,function(a){null!=p&&(window.clearTimeout(p),fadeThead=null);null!=q&&(window.clearTimeout(q),
fadeThead2=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,a||30)});if("1"==urlParams.layers){this.layersDialog=null;var r=e(mxUtils.bind(this,function(b){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=a.createLayersDialog();mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=
null}));var c=r.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily="Helvetica,Arial";this.layersDialog.style.backgroundColor="#000000";this.layersDialog.style.width="160px";this.layersDialog.style.padding="4px 2px 4px 2px";this.layersDialog.style.color="#ffffff";mxUtils.setOpacity(this.layersDialog,70);this.layersDialog.style.left=c.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+
this.chromelessToolbar.offsetHeight+4+"px";c=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=c.zIndex;document.body.appendChild(this.layersDialog)}mxEvent.consume(b)}),Editor.layersLargeImage,mxResources.get("layers")),w=a.getModel();w.addListener(mxEvent.CHANGE,function(){r.style.display=1<w.getChildCount(w.root)?"":"none"})}this.addChromelessToolbarItems(e);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||e(mxUtils.bind(this,function(b){null!=
-this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):a.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(b)}),Editor.editLargeImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(n=0;n<this.lightboxToolbarActions.length;n++){var t=this.lightboxToolbarActions[n];e(t.fn,t.icon,t.tooltip)}null!=g.refreshBtn&&e(mxUtils.bind(this,function(a){g.refreshBtn.url?window.location.href=g.refreshBtn.url:
-window.location.reload();mxEvent.consume(a)}),Editor.refreshLargeImage,mxResources.get("refresh",null,"Refresh"));null!=g.fullscreenBtn&&window.self!==window.top&&e(mxUtils.bind(this,function(b){g.fullscreenBtn.url?a.openLink(g.fullscreenBtn.url):a.openLink(window.location.href);mxEvent.consume(b)}),Editor.fullscreenLargeImage,mxResources.get("openInNewWindow",null,"Open in New Window"));(g.closeBtn&&window.self===window.top||a.lightbox&&("1"==urlParams.close||this.container!=document.body))&&e(mxUtils.bind(this,
-function(a){"1"==urlParams.close||g.closeBtn?window.close():(this.destroy(),mxEvent.consume(a))}),Editor.closeLargeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";a.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");a.container.appendChild(this.chromelessToolbar);mxEvent.addListener(a.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(mxEvent.isShiftDown(a)||
+this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):a.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(b)}),Editor.editLargeImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(n=0;n<this.lightboxToolbarActions.length;n++){var t=this.lightboxToolbarActions[n];e(t.fn,t.icon,t.tooltip)}null!=f.refreshBtn&&e(mxUtils.bind(this,function(a){f.refreshBtn.url?window.location.href=f.refreshBtn.url:
+window.location.reload();mxEvent.consume(a)}),Editor.refreshLargeImage,mxResources.get("refresh",null,"Refresh"));null!=f.fullscreenBtn&&window.self!==window.top&&e(mxUtils.bind(this,function(b){f.fullscreenBtn.url?a.openLink(f.fullscreenBtn.url):a.openLink(window.location.href);mxEvent.consume(b)}),Editor.fullscreenLargeImage,mxResources.get("openInNewWindow",null,"Open in New Window"));(f.closeBtn&&window.self===window.top||a.lightbox&&("1"==urlParams.close||this.container!=document.body))&&e(mxUtils.bind(this,
+function(a){"1"==urlParams.close||f.closeBtn?window.close():(this.destroy(),mxEvent.consume(a))}),Editor.closeLargeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";a.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");a.container.appendChild(this.chromelessToolbar);mxEvent.addListener(a.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(mxEvent.isShiftDown(a)||
v(30),u())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(a){mxEvent.consume(a)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?u():v(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?u():v(100);mxEvent.consume(a)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||
v(30)}));var y=a.getTolerance();a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(b,c){this.startX=c.getGraphX();this.startY=c.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(b,c){mxEvent.isTouchEvent(c.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<y&&Math.abs(this.scrollTop-a.container.scrollTop)<y&&Math.abs(this.startX-c.getGraphX())<y&&Math.abs(this.startY-c.getGraphY())<
y&&(0<parseFloat(d.chromelessToolbar.style.opacity||0)?u():v(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var x=a.view.validate;a.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var a=this.graph.getPagePadding(),b=this.graph.getPageSize();this.translate.x=a.x-(this.x0||0)*b.width;this.translate.y=a.y-(this.y0||0)*b.height}x.apply(this,arguments)};if(!a.isViewer()){var C=a.sizeDidChange;a.sizeDidChange=
-function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var b=this.getPageLayout(),c=this.getPagePadding(),d=this.getPageSize(),e=Math.ceil(2*c.x+b.width*d.width),g=Math.ceil(2*c.y+b.height*d.height),f=a.minimumGraphSize;if(null==f||f.width!=e||f.height!=g)a.minimumGraphSize=new mxRectangle(0,0,e,g);e=c.x-b.x*d.width;c=c.y-b.y*d.height;this.autoTranslate||this.view.translate.x==e&&this.view.translate.y==c?C.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=b.x,this.view.y0=
+function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var b=this.getPageLayout(),c=this.getPagePadding(),d=this.getPageSize(),e=Math.ceil(2*c.x+b.width*d.width),f=Math.ceil(2*c.y+b.height*d.height),g=a.minimumGraphSize;if(null==g||g.width!=e||g.height!=f)a.minimumGraphSize=new mxRectangle(0,0,e,f);e=c.x-b.x*d.width;c=c.y-b.y*d.height;this.autoTranslate||this.view.translate.x==e&&this.view.translate.y==c?C.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=b.x,this.view.y0=
b.y,b=a.view.translate.x,d=a.view.translate.y,a.view.setTranslate(e,c),a.container.scrollLeft+=Math.round((e-b)*a.view.scale),a.container.scrollTop+=Math.round((c-d)*a.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var B=a.view.getBackgroundPane(),D=a.view.getDrawPane();a.cumulativeZoomFactor=1;var A=null,F=null,J=null,G=null,K=function(b){null!=A&&window.clearTimeout(A);window.setTimeout(function(){a.isMouseDown||(A=window.setTimeout(mxUtils.bind(this,
function(){a.isFastZoomEnabled()&&(null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform",null)),D.style.transformOrigin="",B.style.transformOrigin="",mxClient.IS_SF?(D.style.transform="scale(1)",B.style.transform="scale(1)",window.setTimeout(function(){D.style.transform="";B.style.transform=""},0)):(D.style.transform=
-"",B.style.transform=""),a.view.getDecoratorPane().style.opacity="",a.view.getOverlayPane().style.opacity="");var b=new mxPoint(a.container.scrollLeft,a.container.scrollTop),e=mxUtils.getOffset(a.container),g=a.view.scale,f=0,h=0;null!=F&&(f=a.container.offsetWidth/2-F.x+e.x,h=a.container.offsetHeight/2-F.y+e.y);a.zoom(a.cumulativeZoomFactor);a.view.scale!=g&&(null!=J&&(f+=b.x-J.x,h+=b.y-J.y),null!=c&&d.chromelessResize(!1,null,f*(a.cumulativeZoomFactor-1),h*(a.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(a.container)||
-0==f&&0==h||(a.container.scrollLeft-=f*(a.cumulativeZoomFactor-1),a.container.scrollTop-=h*(a.cumulativeZoomFactor-1)));null!=G&&D.setAttribute("filter",G);a.cumulativeZoomFactor=1;G=F=J=A=null}),null!=b?b:a.isFastZoomEnabled()?d.wheelZoomDelay:d.lazyZoomDelay))},0)};a.lazyZoom=function(b,c,e){(c=c||!a.scrollbars)&&(F=new mxPoint(a.container.offsetLeft+a.container.clientWidth/2,a.container.offsetTop+a.container.clientHeight/2));b?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=
+"",B.style.transform=""),a.view.getDecoratorPane().style.opacity="",a.view.getOverlayPane().style.opacity="");var b=new mxPoint(a.container.scrollLeft,a.container.scrollTop),e=mxUtils.getOffset(a.container),f=a.view.scale,g=0,h=0;null!=F&&(g=a.container.offsetWidth/2-F.x+e.x,h=a.container.offsetHeight/2-F.y+e.y);a.zoom(a.cumulativeZoomFactor);a.view.scale!=f&&(null!=J&&(g+=b.x-J.x,h+=b.y-J.y),null!=c&&d.chromelessResize(!1,null,g*(a.cumulativeZoomFactor-1),h*(a.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(a.container)||
+0==g&&0==h||(a.container.scrollLeft-=g*(a.cumulativeZoomFactor-1),a.container.scrollTop-=h*(a.cumulativeZoomFactor-1)));null!=G&&D.setAttribute("filter",G);a.cumulativeZoomFactor=1;G=F=J=A=null}),null!=b?b:a.isFastZoomEnabled()?d.wheelZoomDelay:d.lazyZoomDelay))},0)};a.lazyZoom=function(b,c,e){(c=c||!a.scrollbars)&&(F=new mxPoint(a.container.offsetLeft+a.container.clientWidth/2,a.container.offsetTop+a.container.clientHeight/2));b?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=
(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*
-this.cumulativeZoomFactor,160))/this.view.scale;if(a.isFastZoomEnabled()){null==G&&""!=D.getAttribute("filter")&&(G=D.getAttribute("filter"),D.removeAttribute("filter"));J=new mxPoint(a.container.scrollLeft,a.container.scrollTop);b=c?a.container.scrollLeft+a.container.clientWidth/2:F.x+a.container.scrollLeft-a.container.offsetLeft;var g=c?a.container.scrollTop+a.container.clientHeight/2:F.y+a.container.scrollTop-a.container.offsetTop;D.style.transformOrigin=b+"px "+g+"px";D.style.transform="scale("+
-this.cumulativeZoomFactor+")";B.style.transformOrigin=b+"px "+g+"px";B.style.transform="scale("+this.cumulativeZoomFactor+")";null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&(b=a.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(b.style,"transform-origin",(c?a.container.clientWidth/2+a.container.scrollLeft-b.offsetLeft+"px":F.x+a.container.scrollLeft-b.offsetLeft-a.container.offsetLeft+"px")+" "+(c?a.container.clientHeight/2+a.container.scrollTop-b.offsetTop+"px":F.y+
+this.cumulativeZoomFactor,160))/this.view.scale;if(a.isFastZoomEnabled()){null==G&&""!=D.getAttribute("filter")&&(G=D.getAttribute("filter"),D.removeAttribute("filter"));J=new mxPoint(a.container.scrollLeft,a.container.scrollTop);b=c?a.container.scrollLeft+a.container.clientWidth/2:F.x+a.container.scrollLeft-a.container.offsetLeft;var f=c?a.container.scrollTop+a.container.clientHeight/2:F.y+a.container.scrollTop-a.container.offsetTop;D.style.transformOrigin=b+"px "+f+"px";D.style.transform="scale("+
+this.cumulativeZoomFactor+")";B.style.transformOrigin=b+"px "+f+"px";B.style.transform="scale("+this.cumulativeZoomFactor+")";null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&(b=a.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(b.style,"transform-origin",(c?a.container.clientWidth/2+a.container.scrollLeft-b.offsetLeft+"px":F.x+a.container.scrollLeft-b.offsetLeft-a.container.offsetLeft+"px")+" "+(c?a.container.clientHeight/2+a.container.scrollTop-b.offsetTop+"px":F.y+
a.container.scrollTop-b.offsetTop-a.container.offsetTop+"px")),mxUtils.setPrefixedStyle(b.style,"transform","scale("+this.cumulativeZoomFactor+")"));a.view.getDecoratorPane().style.opacity="0";a.view.getOverlayPane().style.opacity="0";null!=d.hoverIcons&&d.hoverIcons.reset()}K(e)};mxEvent.addGestureListeners(a.container,function(a){null!=A&&window.clearTimeout(A)},null,function(b){1!=a.cumulativeZoomFactor&&K(0)});mxEvent.addListener(a.container,"scroll",function(){A&&!a.isMouseDown&&1!=a.cumulativeZoomFactor&&
K(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(b,c,d){if(null==this.dialogs||0==this.dialogs.length)if(!a.scrollbars&&a.isScrollWheelEvent(b)){d=a.view.getTranslate();var e=40/a.view.scale;mxEvent.isShiftDown(b)?a.view.setTranslate(d.x+(c?-e:e),d.y):a.view.setTranslate(d.x,d.y+(c?e:-e))}else if(d||a.isZoomWheelEvent(b))for(d=mxEvent.getSource(b);null!=d;){if(d==a.container)return a.tooltipHandler.hideTooltip(),F=new mxPoint(mxEvent.getClientX(b),mxEvent.getClientY(b)),a.lazyZoom(c),
mxEvent.consume(b),!1;d=d.parentNode}}),a.container);a.panningHandler.zoomGraph=function(b){a.cumulativeZoomFactor=b.scale;a.lazyZoom(0<b.scale,!0);mxEvent.consume(b)}};EditorUi.prototype.addChromelessToolbarItems=function(a){a(mxUtils.bind(this,function(a){this.actions.get("print").funct();mxEvent.consume(a)}),Editor.printLargeImage,mxResources.get("print"))};
@@ -2237,28 +2237,28 @@ EditorUi.prototype.setScrollbars=function(a){var c=this.editor.graph,d=c.contain
EditorUi.prototype.resetScrollbars=function(){var a=this.editor.graph;if(!this.editor.extendCanvas)a.container.scrollTop=0,a.container.scrollLeft=0,mxUtils.hasScrollbars(a.container)||a.view.setTranslate(0,0);else if(!this.editor.isChromelessView())if(mxUtils.hasScrollbars(a.container))if(a.pageVisible){var c=a.getPagePadding();a.container.scrollTop=Math.floor(c.y-this.editor.initialTopSpacing)-1;a.container.scrollLeft=Math.floor(Math.min(c.x,(a.container.scrollWidth-a.container.clientWidth)/2))-
1;c=a.getGraphBounds();0<c.width&&0<c.height&&(c.x>a.container.scrollLeft+.9*a.container.clientWidth&&(a.container.scrollLeft=Math.min(c.x+c.width-a.container.clientWidth,c.x-10)),c.y>a.container.scrollTop+.9*a.container.clientHeight&&(a.container.scrollTop=Math.min(c.y+c.height-a.container.clientHeight,c.y-10)))}else{var c=a.getGraphBounds(),d=Math.max(c.width,a.scrollTileSize.width*a.view.scale);a.container.scrollTop=Math.floor(Math.max(0,c.y-Math.max(20,(a.container.clientHeight-Math.max(c.height,
a.scrollTileSize.height*a.view.scale))/4)));a.container.scrollLeft=Math.floor(Math.max(0,c.x-Math.max(0,(a.container.clientWidth-d)/2)))}else{var c=mxRectangle.fromRectangle(a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds()),d=a.view.translate,b=a.view.scale;c.x=c.x/b-d.x;c.y=c.y/b-d.y;c.width/=b;c.height/=b;a.view.setTranslate(Math.floor(Math.max(0,(a.container.clientWidth-c.width)/2)-c.x+2),Math.floor((a.pageVisible?0:Math.max(0,(a.container.clientHeight-c.height)/4))-c.y+1))}};
-EditorUi.prototype.setPageVisible=function(a){var c=this.editor.graph,d=mxUtils.hasScrollbars(c.container),b=0,g=0;d&&(b=c.view.translate.x*c.view.scale-c.container.scrollLeft,g=c.view.translate.y*c.view.scale-c.container.scrollTop);c.pageVisible=a;c.pageBreaksVisible=a;c.preferPageSize=a;c.view.validateBackground();d&&(a=c.getSelectionCells(),c.clearSelection(),c.setSelectionCells(a));c.sizeDidChange();d&&(c.container.scrollLeft=c.view.translate.x*c.view.scale-b,c.container.scrollTop=c.view.translate.y*
-c.view.scale-g);this.fireEvent(new mxEventObject("pageViewChanged"))};function ChangePageSetup(a,c,d,b,g){this.ui=a;this.previousColor=this.color=c;this.previousImage=this.image=d;this.previousFormat=this.format=b;this.previousPageScale=this.pageScale=g;this.ignoreImage=this.ignoreColor=!1}
+EditorUi.prototype.setPageVisible=function(a){var c=this.editor.graph,d=mxUtils.hasScrollbars(c.container),b=0,f=0;d&&(b=c.view.translate.x*c.view.scale-c.container.scrollLeft,f=c.view.translate.y*c.view.scale-c.container.scrollTop);c.pageVisible=a;c.pageBreaksVisible=a;c.preferPageSize=a;c.view.validateBackground();d&&(a=c.getSelectionCells(),c.clearSelection(),c.setSelectionCells(a));c.sizeDidChange();d&&(c.container.scrollLeft=c.view.translate.x*c.view.scale-b,c.container.scrollTop=c.view.translate.y*
+c.view.scale-f);this.fireEvent(new mxEventObject("pageViewChanged"))};function ChangePageSetup(a,c,d,b,f){this.ui=a;this.previousColor=this.color=c;this.previousImage=this.image=d;this.previousFormat=this.format=b;this.previousPageScale=this.pageScale=f;this.ignoreImage=this.ignoreColor=!1}
ChangePageSetup.prototype.execute=function(){var a=this.ui.editor.graph;if(!this.ignoreColor){this.color=this.previousColor;var c=a.background;this.ui.setBackgroundColor(this.previousColor);this.previousColor=c}this.ignoreImage||(this.image=this.previousImage,c=a.backgroundImage,this.ui.setBackgroundImage(this.previousImage),this.previousImage=c);null!=this.previousFormat&&(this.format=this.previousFormat,c=a.pageFormat,this.previousFormat.width!=c.width||this.previousFormat.height!=c.height)&&(this.ui.setPageFormat(this.previousFormat),
this.previousFormat=c);null!=this.foldingEnabled&&this.foldingEnabled!=this.ui.editor.graph.foldingEnabled&&(this.ui.setFoldingEnabled(this.foldingEnabled),this.foldingEnabled=!this.foldingEnabled);null!=this.previousPageScale&&(a=this.ui.editor.graph.pageScale,this.previousPageScale!=a&&(this.ui.setPageScale(this.previousPageScale),this.previousPageScale=a))};
(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat","previousPageScale"]);a.afterDecode=function(a,d,b){b.previousColor=b.color;b.previousImage=b.image;b.previousFormat=b.format;b.previousPageScale=b.pageScale;null!=b.foldingEnabled&&(b.foldingEnabled=!b.foldingEnabled);return b};mxCodecRegistry.register(a)})();EditorUi.prototype.setBackgroundColor=function(a){this.editor.graph.background=a;this.editor.graph.view.validateBackground();this.fireEvent(new mxEventObject("backgroundColorChanged"))};
EditorUi.prototype.setFoldingEnabled=function(a){this.editor.graph.foldingEnabled=a;this.editor.graph.view.revalidate();this.fireEvent(new mxEventObject("foldingEnabledChanged"))};EditorUi.prototype.setPageFormat=function(a){this.editor.graph.pageFormat=a;this.editor.graph.pageVisible?(this.editor.graph.view.validateBackground(),this.editor.graph.sizeDidChange()):this.actions.get("pageView").funct();this.fireEvent(new mxEventObject("pageFormatChanged"))};
EditorUi.prototype.setPageScale=function(a){this.editor.graph.pageScale=a;this.editor.graph.pageVisible?(this.editor.graph.view.validateBackground(),this.editor.graph.sizeDidChange()):this.actions.get("pageView").funct();this.fireEvent(new mxEventObject("pageScaleChanged"))};EditorUi.prototype.setGridColor=function(a){this.editor.graph.view.gridColor=a;this.editor.graph.view.validateBackground();this.fireEvent(new mxEventObject("gridColorChanged"))};
-EditorUi.prototype.addUndoListener=function(){var a=this.actions.get("undo"),c=this.actions.get("redo"),d=this.editor.undoManager,b=mxUtils.bind(this,function(){a.setEnabled(this.canUndo());c.setEnabled(this.canRedo())});d.addListener(mxEvent.ADD,b);d.addListener(mxEvent.UNDO,b);d.addListener(mxEvent.REDO,b);d.addListener(mxEvent.CLEAR,b);var g=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){g.apply(this,arguments);b()};var e=this.editor.graph.cellEditor.stopEditing;
+EditorUi.prototype.addUndoListener=function(){var a=this.actions.get("undo"),c=this.actions.get("redo"),d=this.editor.undoManager,b=mxUtils.bind(this,function(){a.setEnabled(this.canUndo());c.setEnabled(this.canRedo())});d.addListener(mxEvent.ADD,b);d.addListener(mxEvent.UNDO,b);d.addListener(mxEvent.REDO,b);d.addListener(mxEvent.CLEAR,b);var f=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){f.apply(this,arguments);b()};var e=this.editor.graph.cellEditor.stopEditing;
this.editor.graph.cellEditor.stopEditing=function(a,c){e.apply(this,arguments);b()};b()};
-EditorUi.prototype.updateActionStates=function(){var a=this.editor.graph,c=!a.isSelectionEmpty(),d=!1,b=!1,g=a.getSelectionCells();if(null!=g)for(var e=0;e<g.length;e++){var h=g[e];a.getModel().isEdge(h)&&(b=!0);a.getModel().isVertex(h)&&(d=!0);if(b&&d)break}g="cut copy bold italic underline delete duplicate editStyle editTooltip editLink backgroundColor borderColor edit toFront toBack lockUnlock solid dashed pasteSize dotted fillColor gradientColor shadow fontColor formattedText rounded toggleRounded sharp strokeColor".split(" ");for(e=
-0;e<g.length;e++)this.actions.get(g[e]).setEnabled(c);this.actions.get("setAsDefaultStyle").setEnabled(1==a.getSelectionCount());this.actions.get("clearWaypoints").setEnabled(!a.isSelectionEmpty());this.actions.get("copySize").setEnabled(1==a.getSelectionCount());this.actions.get("turn").setEnabled(!a.isSelectionEmpty());this.actions.get("curved").setEnabled(b);this.actions.get("rotation").setEnabled(d);this.actions.get("wordWrap").setEnabled(d);this.actions.get("autosize").setEnabled(d);b=d&&1==
+EditorUi.prototype.updateActionStates=function(){var a=this.editor.graph,c=!a.isSelectionEmpty(),d=!1,b=!1,f=a.getSelectionCells();if(null!=f)for(var e=0;e<f.length;e++){var h=f[e];a.getModel().isEdge(h)&&(b=!0);a.getModel().isVertex(h)&&(d=!0);if(b&&d)break}f="cut copy bold italic underline delete duplicate editStyle editTooltip editLink backgroundColor borderColor edit toFront toBack lockUnlock solid dashed pasteSize dotted fillColor gradientColor shadow fontColor formattedText rounded toggleRounded sharp strokeColor".split(" ");for(e=
+0;e<f.length;e++)this.actions.get(f[e]).setEnabled(c);this.actions.get("setAsDefaultStyle").setEnabled(1==a.getSelectionCount());this.actions.get("clearWaypoints").setEnabled(!a.isSelectionEmpty());this.actions.get("copySize").setEnabled(1==a.getSelectionCount());this.actions.get("turn").setEnabled(!a.isSelectionEmpty());this.actions.get("curved").setEnabled(b);this.actions.get("rotation").setEnabled(d);this.actions.get("wordWrap").setEnabled(d);this.actions.get("autosize").setEnabled(d);b=d&&1==
a.getSelectionCount();this.actions.get("group").setEnabled(1<a.getSelectionCount()||b&&!a.isContainer(a.getSelectionCell()));this.actions.get("ungroup").setEnabled(1==a.getSelectionCount()&&(0<a.getModel().getChildCount(a.getSelectionCell())||b&&a.isContainer(a.getSelectionCell())));this.actions.get("removeFromGroup").setEnabled(b&&a.getModel().isVertex(a.getModel().getParent(a.getSelectionCell())));a.view.getState(a.getSelectionCell());this.menus.get("navigation").setEnabled(c||null!=a.view.currentRoot);
this.actions.get("collapsible").setEnabled(d&&(a.isContainer(a.getSelectionCell())||0<a.model.getChildCount(a.getSelectionCell())));this.actions.get("home").setEnabled(null!=a.view.currentRoot);this.actions.get("exitGroup").setEnabled(null!=a.view.currentRoot);this.actions.get("enterGroup").setEnabled(1==a.getSelectionCount()&&a.isValidRoot(a.getSelectionCell()));c=1==a.getSelectionCount()&&a.isCellFoldable(a.getSelectionCell());this.actions.get("expand").setEnabled(c);this.actions.get("collapse").setEnabled(c);
this.actions.get("editLink").setEnabled(1==a.getSelectionCount());this.actions.get("openLink").setEnabled(1==a.getSelectionCount()&&null!=a.getLinkForCell(a.getSelectionCell()));this.actions.get("guides").setEnabled(a.isEnabled());this.actions.get("grid").setEnabled(!this.editor.chromeless||this.editor.editable);c=a.isEnabled()&&!a.isCellLocked(a.getDefaultParent());this.menus.get("layout").setEnabled(c);this.menus.get("insert").setEnabled(c);this.menus.get("direction").setEnabled(c&&d);this.menus.get("align").setEnabled(c&&
d&&1<a.getSelectionCount());this.menus.get("distribute").setEnabled(c&&d&&1<a.getSelectionCount());this.actions.get("selectVertices").setEnabled(c);this.actions.get("selectEdges").setEnabled(c);this.actions.get("selectAll").setEnabled(c);this.actions.get("selectNone").setEnabled(c);this.updatePasteActionStates()};EditorUi.prototype.zeroOffset=new mxPoint(0,0);EditorUi.prototype.getDiagramContainerOffset=function(){return this.zeroOffset};
-EditorUi.prototype.refresh=function(a){a=null!=a?a:!0;var c=mxClient.IS_IE&&(null==document.documentMode||5==document.documentMode),d=this.container.clientWidth,b=this.container.clientHeight;this.container==document.body&&(d=document.body.clientWidth||document.documentElement.clientWidth,b=c?document.body.clientHeight||document.documentElement.clientHeight:document.documentElement.clientHeight);var g=0;mxClient.IS_IOS&&!window.navigator.standalone&&window.innerHeight!=document.documentElement.clientHeight&&
-(g=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var e=Math.max(0,Math.min(this.hsplitPosition,d-this.splitSize-20)),h=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",h+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",h+=this.toolbarHeight);0<h&&!mxClient.IS_QUIRKS&&(h+=1);var f=0;if(null!=this.sidebarFooterContainer){var k=
-this.footerHeight+g,f=Math.max(0,Math.min(b-h-k,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=e+"px";this.sidebarFooterContainer.style.height=f+"px";this.sidebarFooterContainer.style.bottom=k+"px"}k=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=h+"px";this.sidebarContainer.style.width=e+"px";this.formatContainer.style.top=h+"px";this.formatContainer.style.width=k+"px";this.formatContainer.style.display=null!=this.format?"":"none";var l=this.getDiagramContainerOffset(),
-m=null!=this.hsplit.parentNode?e+this.splitSize:0;this.diagramContainer.style.left=m+l.x+"px";this.diagramContainer.style.top=h+l.y+"px";this.footerContainer.style.height=this.footerHeight+"px";this.hsplit.style.top=this.sidebarContainer.style.top;this.hsplit.style.bottom=this.footerHeight+g+"px";this.hsplit.style.left=e+"px";this.footerContainer.style.display=0==this.footerHeight?"none":"";null!=this.tabContainer&&(this.tabContainer.style.left=m+"px");c?(this.menubarContainer.style.width=d+"px",
-this.toolbarContainer.style.width=this.menubarContainer.style.width,c=Math.max(0,b-this.footerHeight-this.menubarHeight-this.toolbarHeight),this.sidebarContainer.style.height=c-f+"px",this.formatContainer.style.height=c+"px",this.diagramContainer.style.width=null!=this.hsplit.parentNode?Math.max(0,d-e-this.splitSize-k)+"px":d+"px",this.footerContainer.style.width=this.menubarContainer.style.width,f=Math.max(0,b-this.footerHeight-this.menubarHeight-this.toolbarHeight),null!=this.tabContainer&&(this.tabContainer.style.width=
-this.diagramContainer.style.width,this.tabContainer.style.bottom=this.footerHeight+g+"px",f-=this.tabContainer.clientHeight),this.diagramContainer.style.height=f+"px",this.hsplit.style.height=f+"px"):(0<this.footerHeight&&(this.footerContainer.style.bottom=g+"px"),this.diagramContainer.style.right=k+"px",d=0,null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+g+"px",this.tabContainer.style.right=this.diagramContainer.style.right,d=this.tabContainer.clientHeight),this.sidebarContainer.style.bottom=
-this.footerHeight+f+g+"px",this.formatContainer.style.bottom=this.footerHeight+g+"px",this.diagramContainer.style.bottom=this.footerHeight+g+d+"px");a&&this.editor.graph.sizeDidChange()};EditorUi.prototype.createTabContainer=function(){return null};
+EditorUi.prototype.refresh=function(a){a=null!=a?a:!0;var c=mxClient.IS_IE&&(null==document.documentMode||5==document.documentMode),d=this.container.clientWidth,b=this.container.clientHeight;this.container==document.body&&(d=document.body.clientWidth||document.documentElement.clientWidth,b=c?document.body.clientHeight||document.documentElement.clientHeight:document.documentElement.clientHeight);var f=0;mxClient.IS_IOS&&!window.navigator.standalone&&window.innerHeight!=document.documentElement.clientHeight&&
+(f=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var e=Math.max(0,Math.min(this.hsplitPosition,d-this.splitSize-20)),h=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",h+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",h+=this.toolbarHeight);0<h&&!mxClient.IS_QUIRKS&&(h+=1);var g=0;if(null!=this.sidebarFooterContainer){var k=
+this.footerHeight+f,g=Math.max(0,Math.min(b-h-k,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=e+"px";this.sidebarFooterContainer.style.height=g+"px";this.sidebarFooterContainer.style.bottom=k+"px"}k=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=h+"px";this.sidebarContainer.style.width=e+"px";this.formatContainer.style.top=h+"px";this.formatContainer.style.width=k+"px";this.formatContainer.style.display=null!=this.format?"":"none";var l=this.getDiagramContainerOffset(),
+m=null!=this.hsplit.parentNode?e+this.splitSize:0;this.diagramContainer.style.left=m+l.x+"px";this.diagramContainer.style.top=h+l.y+"px";this.footerContainer.style.height=this.footerHeight+"px";this.hsplit.style.top=this.sidebarContainer.style.top;this.hsplit.style.bottom=this.footerHeight+f+"px";this.hsplit.style.left=e+"px";this.footerContainer.style.display=0==this.footerHeight?"none":"";null!=this.tabContainer&&(this.tabContainer.style.left=m+"px");c?(this.menubarContainer.style.width=d+"px",
+this.toolbarContainer.style.width=this.menubarContainer.style.width,c=Math.max(0,b-this.footerHeight-this.menubarHeight-this.toolbarHeight),this.sidebarContainer.style.height=c-g+"px",this.formatContainer.style.height=c+"px",this.diagramContainer.style.width=null!=this.hsplit.parentNode?Math.max(0,d-e-this.splitSize-k)+"px":d+"px",this.footerContainer.style.width=this.menubarContainer.style.width,g=Math.max(0,b-this.footerHeight-this.menubarHeight-this.toolbarHeight),null!=this.tabContainer&&(this.tabContainer.style.width=
+this.diagramContainer.style.width,this.tabContainer.style.bottom=this.footerHeight+f+"px",g-=this.tabContainer.clientHeight),this.diagramContainer.style.height=g+"px",this.hsplit.style.height=g+"px"):(0<this.footerHeight&&(this.footerContainer.style.bottom=f+"px"),this.diagramContainer.style.right=k+"px",d=0,null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+f+"px",this.tabContainer.style.right=this.diagramContainer.style.right,d=this.tabContainer.clientHeight),this.sidebarContainer.style.bottom=
+this.footerHeight+g+f+"px",this.formatContainer.style.bottom=this.footerHeight+f+"px",this.diagramContainer.style.bottom=this.footerHeight+f+d+"px");a&&this.editor.graph.sizeDidChange()};EditorUi.prototype.createTabContainer=function(){return null};
EditorUi.prototype.createDivs=function(){this.menubarContainer=this.createDiv("geMenubarContainer");this.toolbarContainer=this.createDiv("geToolbarContainer");this.sidebarContainer=this.createDiv("geSidebarContainer");this.formatContainer=this.createDiv("geSidebarContainer geFormatContainer");this.diagramContainer=this.createDiv("geDiagramContainer");this.footerContainer=this.createDiv("geFooterContainer");this.hsplit=this.createDiv("geHsplit");this.hsplit.setAttribute("title",mxResources.get("collapseExpand"));
this.menubarContainer.style.top="0px";this.menubarContainer.style.left="0px";this.menubarContainer.style.right="0px";this.toolbarContainer.style.left="0px";this.toolbarContainer.style.right="0px";this.sidebarContainer.style.left="0px";this.formatContainer.style.right="0px";this.formatContainer.style.zIndex="1";this.diagramContainer.style.right=(null!=this.format?this.formatWidth:0)+"px";this.footerContainer.style.left="0px";this.footerContainer.style.right="0px";this.footerContainer.style.bottom=
"0px";this.footerContainer.style.zIndex=mxPopupMenu.prototype.zIndex-2;this.hsplit.style.width=this.splitSize+"px";if(this.sidebarFooterContainer=this.createSidebarFooterContainer())this.sidebarFooterContainer.style.left="0px";this.editor.chromeless?this.diagramContainer.style.border="none":this.tabContainer=this.createTabContainer()};EditorUi.prototype.createSidebarFooterContainer=function(){return null};
@@ -2267,36 +2267,36 @@ this.sidebar=this.editor.chromeless?null:this.createSidebar(this.sidebarContaine
this.container.appendChild(this.sidebarFooterContainer);this.container.appendChild(this.diagramContainer);null!=this.container&&null!=this.tabContainer&&this.container.appendChild(this.tabContainer);this.toolbar=this.editor.chromeless?null:this.createToolbar(this.createDiv("geToolbar"));null!=this.toolbar&&(this.toolbarContainer.appendChild(this.toolbar.container),this.container.appendChild(this.toolbarContainer));null!=this.sidebar&&(this.container.appendChild(this.hsplit),this.addSplitHandler(this.hsplit,
!0,0,mxUtils.bind(this,function(a){this.hsplitPosition=a;this.refresh()})))};EditorUi.prototype.createStatusContainer=function(){var a=document.createElement("a");a.className="geItem geStatus";420>screen.width&&(a.style.maxWidth=Math.max(20,screen.width-320)+"px",a.style.overflow="hidden");return a};EditorUi.prototype.setStatusText=function(a){this.statusContainer.innerHTML=a};EditorUi.prototype.createToolbar=function(a){return new Toolbar(this,a)};
EditorUi.prototype.createSidebar=function(a){return new Sidebar(this,a)};EditorUi.prototype.createFormat=function(a){return new Format(this,a)};EditorUi.prototype.createFooter=function(){return this.createDiv("geFooter")};EditorUi.prototype.createDiv=function(a){var c=document.createElement("div");c.className=a;return c};
-EditorUi.prototype.addSplitHandler=function(a,c,d,b){function g(a){if(null!=h){var e=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a));b(Math.max(0,f+(c?e.x-h.x:h.y-e.y)-d));mxEvent.consume(a);f!=m()&&(k=!0,l=null)}}function e(a){g(a);h=f=null}var h=null,f=null,k=!0,l=null;mxClient.IS_POINTER&&(a.style.touchAction="none");var m=mxUtils.bind(this,function(){var b=parseInt(c?a.style.left:a.style.bottom);c||(b=b+d-this.footerHeight);return b});mxEvent.addGestureListeners(a,function(a){h=new mxPoint(mxEvent.getClientX(a),
-mxEvent.getClientY(a));f=m();k=!1;mxEvent.consume(a)});mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){if(!k&&this.hsplitClickEnabled){var c=null!=l?l-d:0;l=m();b(c);mxEvent.consume(a)}}));mxEvent.addGestureListeners(document,null,g,e);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,g,e)})};
-EditorUi.prototype.handleError=function(a,c,d,b,g){a=null!=a&&null!=a.error?a.error:a;if(null!=a||null!=c){g=mxUtils.htmlEntities(mxResources.get("unknownError"));var e=mxResources.get("ok");c=null!=c?c:mxResources.get("error");null!=a&&null!=a.message&&(g=mxUtils.htmlEntities(a.message));this.showError(c,g,e,d,null,null,null,null,null,null,null,null,b?d:null)}else null!=d&&d()};
-EditorUi.prototype.showError=function(a,c,d,b,g,e,h,f,k,l,m,n,p){a=new ErrorDialog(this,a,c,d||mxResources.get("ok"),b,g,e,h,n,f,k);c=Math.ceil(null!=c?c.length/50:1);this.showDialog(a.container,l||340,m||100+20*c,!0,!1,p);a.init()};EditorUi.prototype.showDialog=function(a,c,d,b,g,e,h,f,k,l){this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,a,c,d,b,g,e,h,f,k,l);this.dialogs.push(this.dialog)};
+EditorUi.prototype.addSplitHandler=function(a,c,d,b){function f(a){if(null!=h){var e=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a));b(Math.max(0,g+(c?e.x-h.x:h.y-e.y)-d));mxEvent.consume(a);g!=m()&&(k=!0,l=null)}}function e(a){f(a);h=g=null}var h=null,g=null,k=!0,l=null;mxClient.IS_POINTER&&(a.style.touchAction="none");var m=mxUtils.bind(this,function(){var b=parseInt(c?a.style.left:a.style.bottom);c||(b=b+d-this.footerHeight);return b});mxEvent.addGestureListeners(a,function(a){h=new mxPoint(mxEvent.getClientX(a),
+mxEvent.getClientY(a));g=m();k=!1;mxEvent.consume(a)});mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){if(!k&&this.hsplitClickEnabled){var c=null!=l?l-d:0;l=m();b(c);mxEvent.consume(a)}}));mxEvent.addGestureListeners(document,null,f,e);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,f,e)})};
+EditorUi.prototype.handleError=function(a,c,d,b,f){a=null!=a&&null!=a.error?a.error:a;if(null!=a||null!=c){f=mxUtils.htmlEntities(mxResources.get("unknownError"));var e=mxResources.get("ok");c=null!=c?c:mxResources.get("error");null!=a&&null!=a.message&&(f=mxUtils.htmlEntities(a.message));this.showError(c,f,e,d,null,null,null,null,null,null,null,null,b?d:null)}else null!=d&&d()};
+EditorUi.prototype.showError=function(a,c,d,b,f,e,h,g,k,l,m,n,p){a=new ErrorDialog(this,a,c,d||mxResources.get("ok"),b,f,e,h,n,g,k);c=Math.ceil(null!=c?c.length/50:1);this.showDialog(a.container,l||340,m||100+20*c,!0,!1,p);a.init()};EditorUi.prototype.showDialog=function(a,c,d,b,f,e,h,g,k,l){this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,a,c,d,b,f,e,h,g,k,l);this.dialogs.push(this.dialog)};
EditorUi.prototype.hideDialog=function(a,c){if(null!=this.dialogs&&0<this.dialogs.length){var d=this.dialogs.pop();0==d.close(a,c)?this.dialogs.push(d):(this.dialog=0<this.dialogs.length?this.dialogs[this.dialogs.length-1]:null,this.editor.fireEvent(new mxEventObject("hideDialog")),null==this.dialog&&"hidden"!=this.editor.graph.container.style.visibility&&window.setTimeout(mxUtils.bind(this,function(){this.editor.graph.isEditing()&&null!=this.editor.graph.cellEditor.textarea?this.editor.graph.cellEditor.textarea.focus():
-(mxUtils.clearSelection(),this.editor.graph.container.focus())}),0))}};EditorUi.prototype.pickColor=function(a,c){var d=this.editor.graph,b=d.cellEditor.saveSelection(),g=226+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12)),e=new ColorDialog(this,a||"none",function(a){d.cellEditor.restoreSelection(b);c(a)},function(){d.cellEditor.restoreSelection(b)});this.showDialog(e.container,230,g,!0,!1);e.init()};
+(mxUtils.clearSelection(),this.editor.graph.container.focus())}),0))}};EditorUi.prototype.pickColor=function(a,c){var d=this.editor.graph,b=d.cellEditor.saveSelection(),f=226+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12)),e=new ColorDialog(this,a||"none",function(a){d.cellEditor.restoreSelection(b);c(a)},function(){d.cellEditor.restoreSelection(b)});this.showDialog(e.container,230,f,!0,!1);e.init()};
EditorUi.prototype.openFile=function(){window.openFile=new OpenFile(mxUtils.bind(this,function(a){this.hideDialog(a)}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:320,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null})};
-EditorUi.prototype.extractGraphModelFromHtml=function(a){var c=null;try{var d=a.indexOf("&lt;mxGraphModel ");if(0<=d){var b=a.lastIndexOf("&lt;/mxGraphModel&gt;");b>d&&(c=a.substring(d,b+21).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}}catch(g){}return c};
+EditorUi.prototype.extractGraphModelFromHtml=function(a){var c=null;try{var d=a.indexOf("&lt;mxGraphModel ");if(0<=d){var b=a.lastIndexOf("&lt;/mxGraphModel&gt;");b>d&&(c=a.substring(d,b+21).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}}catch(f){}return c};
EditorUi.prototype.extractGraphModelFromEvent=function(a){var c=null,d=null;null!=a&&(a=null!=a.dataTransfer?a.dataTransfer:a.clipboardData,null!=a&&(10==document.documentMode||11==document.documentMode?d=a.getData("Text"):(d=0<=mxUtils.indexOf(a.types,"text/html")?a.getData("text/html"):null,mxUtils.indexOf(a.types,null==d||0==d.length)&&(d=a.getData("text/plain"))),null!=d&&(d=Graph.zapGremlins(mxUtils.trim(d)),a=this.extractGraphModelFromHtml(d),null!=a&&(d=a))));null!=d&&this.isCompatibleString(d)&&
(c=d);return c};EditorUi.prototype.isCompatibleString=function(a){return!1};EditorUi.prototype.saveFile=function(a){a||null==this.editor.filename?(a=new FilenameDialog(this,this.editor.getOrCreateFilename(),mxResources.get("save"),mxUtils.bind(this,function(a){this.save(a)}),null,mxUtils.bind(this,function(a){if(null!=a&&0<a.length)return!0;mxUtils.confirm(mxResources.get("invalidName"));return!1})),this.showDialog(a.container,300,100,!0,!0),a.init()):this.save(this.editor.getOrCreateFilename())};
EditorUi.prototype.save=function(a){if(null!=a){this.editor.graph.isEditing()&&this.editor.graph.stopEditing();var c=mxUtils.getXml(this.editor.getGraphXml());try{if(Editor.useLocalStorage){if(null!=localStorage.getItem(a)&&!mxUtils.confirm(mxResources.get("replaceIt",[a])))return;localStorage.setItem(a,c);this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("saved"))+" "+new Date)}else if(c.length<MAX_REQUEST_SIZE)(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(a)+"&xml="+encodeURIComponent(c))).simulate(document,
"_blank");else{mxUtils.alert(mxResources.get("drawingTooLarge"));mxUtils.popup(c);return}this.editor.setModified(!1);this.editor.setFilename(a);this.updateDocumentTitle()}catch(d){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("errorSavingFile")))}}};
-EditorUi.prototype.executeLayout=function(a,c,d){var b=this.editor.graph;if(b.isEnabled()){b.getModel().beginUpdate();try{a()}catch(g){throw g;}finally{this.allowAnimation&&c&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("Camino"))?(a=new mxMorphing(b),a.addListener(mxEvent.DONE,mxUtils.bind(this,function(){b.getModel().endUpdate();null!=d&&d()})),a.startAnimation()):(b.getModel().endUpdate(),null!=d&&d())}}};
-EditorUi.prototype.showImageDialog=function(a,c,d,b){b=this.editor.graph.cellEditor;var g=b.saveSelection(),e=mxUtils.prompt(a,c);b.restoreSelection(g);if(null!=e&&0<e.length){var h=new Image;h.onload=function(){d(e,h.width,h.height)};h.onerror=function(){d(null);mxUtils.alert(mxResources.get("fileNotFound"))};h.src=e}else d(null)};EditorUi.prototype.showLinkDialog=function(a,c,d){a=new LinkDialog(this,a,c,d);this.showDialog(a.container,420,90,!0,!0);a.init()};
+EditorUi.prototype.executeLayout=function(a,c,d){var b=this.editor.graph;if(b.isEnabled()){b.getModel().beginUpdate();try{a()}catch(f){throw f;}finally{this.allowAnimation&&c&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("Camino"))?(a=new mxMorphing(b),a.addListener(mxEvent.DONE,mxUtils.bind(this,function(){b.getModel().endUpdate();null!=d&&d()})),a.startAnimation()):(b.getModel().endUpdate(),null!=d&&d())}}};
+EditorUi.prototype.showImageDialog=function(a,c,d,b){b=this.editor.graph.cellEditor;var f=b.saveSelection(),e=mxUtils.prompt(a,c);b.restoreSelection(f);if(null!=e&&0<e.length){var h=new Image;h.onload=function(){d(e,h.width,h.height)};h.onerror=function(){d(null);mxUtils.alert(mxResources.get("fileNotFound"))};h.src=e}else d(null)};EditorUi.prototype.showLinkDialog=function(a,c,d){a=new LinkDialog(this,a,c,d);this.showDialog(a.container,420,90,!0,!0);a.init()};
EditorUi.prototype.showDataDialog=function(a){null!=a&&(a=new EditDataDialog(this,a),this.showDialog(a.container,480,420,!0,!1,null,!1),a.init())};
EditorUi.prototype.showBackgroundImageDialog=function(a){a=null!=a?a:mxUtils.bind(this,function(a){a=new ChangePageSetup(this,null,a);a.ignoreColor=!0;this.editor.graph.model.execute(a)});var c=mxUtils.prompt(mxResources.get("backgroundImage"),"");if(null!=c&&0<c.length){var d=new Image;d.onload=function(){a(new mxImage(c,d.width,d.height))};d.onerror=function(){a(null);mxUtils.alert(mxResources.get("fileNotFound"))};d.src=c}else a(null)};
EditorUi.prototype.setBackgroundImage=function(a){this.editor.graph.setBackgroundImage(a);this.editor.graph.view.validateBackgroundImage();this.fireEvent(new mxEventObject("backgroundImageChanged"))};EditorUi.prototype.confirm=function(a,c,d){mxUtils.confirm(a)?null!=c&&c():null!=d&&d()};
EditorUi.prototype.createOutline=function(a){var c=new mxOutline(this.editor.graph);c.border=20;mxEvent.addListener(window,"resize",function(){c.update()});this.addListener("pageFormatChanged",function(){c.update()});return c};EditorUi.prototype.altShiftActions={67:"clearWaypoints",65:"connectionArrows",76:"editLink",80:"connectionPoints",84:"editTooltip",86:"pasteSize",88:"copySize"};
-EditorUi.prototype.createKeyHandler=function(a){function c(a,c,d){h.push(function(){if(!b.isSelectionEmpty()&&b.isEnabled())if(c=null!=c?c:1,d){b.getModel().beginUpdate();try{for(var e=b.getSelectionCells(),g=0;g<e.length;g++)if(b.getModel().isVertex(e[g])&&b.isCellResizable(e[g])){var f=b.getCellGeometry(e[g]);null!=f&&(f=f.clone(),37==a?f.width=Math.max(0,f.width-c):38==a?f.height=Math.max(0,f.height-c):39==a?f.width+=c:40==a&&(f.height+=c),b.getModel().setGeometry(e[g],f))}}finally{b.getModel().endUpdate()}}else{var h=
-b.getSelectionCell(),f=b.model.getParent(h),e=null;1==b.getSelectionCount()&&b.model.isVertex(h)&&null!=b.layoutManager&&!b.isCellLocked(h)&&(e=b.layoutManager.getLayout(f));if(null!=e&&e.constructor==mxStackLayout)e=f.getIndex(h),37==a||38==a?b.model.add(f,h,Math.max(0,e-1)):39!=a&&40!=a||b.model.add(f,h,Math.min(b.model.getChildCount(f),e+1));else{e=b.getMovableCells(b.getSelectionCells());h=[];for(g=0;g<e.length;g++)f=b.getCurrentCellStyle(e[g]),"1"==mxUtils.getValue(f,"part","0")?(f=b.model.getParent(e[g]),
-b.model.isVertex(f)&&0>mxUtils.indexOf(e,f)&&h.push(f)):h.push(e[g]);0<h.length&&(e=f=0,37==a?f=-c:38==a?e=-c:39==a?f=c:40==a&&(e=c),b.moveCells(h,f,e))}}});null!=f&&window.clearTimeout(f);f=window.setTimeout(function(){if(0<h.length){b.getModel().beginUpdate();try{for(var a=0;a<h.length;a++)h[a]();h=[]}finally{b.getModel().endUpdate()}}},200)}var d=this,b=this.editor.graph,g=new mxKeyHandler(b),e=g.isEventIgnored;g.isEventIgnored=function(a){return!(mxEvent.isShiftDown(a)&&9==a.keyCode)&&(!this.isControlDown(a)||
-mxEvent.isShiftDown(a)||90!=a.keyCode&&89!=a.keyCode&&188!=a.keyCode&&190!=a.keyCode&&85!=a.keyCode)&&(66!=a.keyCode&&73!=a.keyCode||!this.isControlDown(a)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&e.apply(this,arguments)};g.isEnabledForEvent=function(a){return!mxEvent.isConsumed(a)&&this.isGraphEvent(a)&&this.isEnabled()&&(null==d.dialogs||0==d.dialogs.length)};g.isControlDown=function(a){return mxEvent.isControlDown(a)||mxClient.IS_MAC&&a.metaKey};var h=[],f=
-null,k={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},l=g.getFunction;mxKeyHandler.prototype.getFunction=function(a){if(b.isEnabled()){if(mxEvent.isShiftDown(a)&&mxEvent.isAltDown(a)){var e=d.actions.get(d.altShiftActions[a.keyCode]);if(null!=e)return e.funct}if(9==a.keyCode&&mxEvent.isAltDown(a))return b.cellEditor.isContentEditing()?function(){document.execCommand("outdent",!1,null)}:mxEvent.isShiftDown(a)?function(){b.selectParentCell()}:
+EditorUi.prototype.createKeyHandler=function(a){function c(a,c,d){h.push(function(){if(!b.isSelectionEmpty()&&b.isEnabled())if(c=null!=c?c:1,d){b.getModel().beginUpdate();try{for(var e=b.getSelectionCells(),f=0;f<e.length;f++)if(b.getModel().isVertex(e[f])&&b.isCellResizable(e[f])){var g=b.getCellGeometry(e[f]);null!=g&&(g=g.clone(),37==a?g.width=Math.max(0,g.width-c):38==a?g.height=Math.max(0,g.height-c):39==a?g.width+=c:40==a&&(g.height+=c),b.getModel().setGeometry(e[f],g))}}finally{b.getModel().endUpdate()}}else{var h=
+b.getSelectionCell(),g=b.model.getParent(h),e=null;1==b.getSelectionCount()&&b.model.isVertex(h)&&null!=b.layoutManager&&!b.isCellLocked(h)&&(e=b.layoutManager.getLayout(g));if(null!=e&&e.constructor==mxStackLayout)e=g.getIndex(h),37==a||38==a?b.model.add(g,h,Math.max(0,e-1)):39!=a&&40!=a||b.model.add(g,h,Math.min(b.model.getChildCount(g),e+1));else{e=b.getMovableCells(b.getSelectionCells());h=[];for(f=0;f<e.length;f++)g=b.getCurrentCellStyle(e[f]),"1"==mxUtils.getValue(g,"part","0")?(g=b.model.getParent(e[f]),
+b.model.isVertex(g)&&0>mxUtils.indexOf(e,g)&&h.push(g)):h.push(e[f]);0<h.length&&(e=g=0,37==a?g=-c:38==a?e=-c:39==a?g=c:40==a&&(e=c),b.moveCells(h,g,e))}}});null!=g&&window.clearTimeout(g);g=window.setTimeout(function(){if(0<h.length){b.getModel().beginUpdate();try{for(var a=0;a<h.length;a++)h[a]();h=[]}finally{b.getModel().endUpdate()}}},200)}var d=this,b=this.editor.graph,f=new mxKeyHandler(b),e=f.isEventIgnored;f.isEventIgnored=function(a){return!(mxEvent.isShiftDown(a)&&9==a.keyCode)&&(!this.isControlDown(a)||
+mxEvent.isShiftDown(a)||90!=a.keyCode&&89!=a.keyCode&&188!=a.keyCode&&190!=a.keyCode&&85!=a.keyCode)&&(66!=a.keyCode&&73!=a.keyCode||!this.isControlDown(a)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&e.apply(this,arguments)};f.isEnabledForEvent=function(a){return!mxEvent.isConsumed(a)&&this.isGraphEvent(a)&&this.isEnabled()&&(null==d.dialogs||0==d.dialogs.length)};f.isControlDown=function(a){return mxEvent.isControlDown(a)||mxClient.IS_MAC&&a.metaKey};var h=[],g=
+null,k={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},l=f.getFunction;mxKeyHandler.prototype.getFunction=function(a){if(b.isEnabled()){if(mxEvent.isShiftDown(a)&&mxEvent.isAltDown(a)){var e=d.actions.get(d.altShiftActions[a.keyCode]);if(null!=e)return e.funct}if(9==a.keyCode&&mxEvent.isAltDown(a))return b.cellEditor.isContentEditing()?function(){document.execCommand("outdent",!1,null)}:mxEvent.isShiftDown(a)?function(){b.selectParentCell()}:
function(){b.selectChildCell()};if(null!=k[a.keyCode]&&!b.isSelectionEmpty())if(!this.isControlDown(a)&&mxEvent.isShiftDown(a)&&mxEvent.isAltDown(a)){if(b.model.isVertex(b.getSelectionCell()))return function(){var c=b.connectVertex(b.getSelectionCell(),k[a.keyCode],b.defaultEdgeLength,a,!0);null!=c&&0<c.length&&(1==c.length&&b.model.isEdge(c[0])?b.setSelectionCell(b.model.getTerminal(c[0],!1)):b.setSelectionCell(c[c.length-1]),b.scrollCellToVisible(b.getSelectionCell()),null!=d.hoverIcons&&d.hoverIcons.update(b.view.getState(b.getSelectionCell())))}}else return this.isControlDown(a)?
-function(){c(a.keyCode,mxEvent.isShiftDown(a)?b.gridSize:null,!0)}:function(){c(a.keyCode,mxEvent.isShiftDown(a)?b.gridSize:null)}}return l.apply(this,arguments)};g.bindAction=mxUtils.bind(this,function(a,b,c,d){var e=this.actions.get(c);null!=e&&(c=function(){e.isEnabled()&&e.funct()},b?d?g.bindControlShiftKey(a,c):g.bindControlKey(a,c):d?g.bindShiftKey(a,c):g.bindKey(a,c))});var m=this,n=g.escape;g.escape=function(a){n.apply(this,arguments)};g.enter=function(){};g.bindControlShiftKey(36,function(){b.exitGroup()});
-g.bindControlShiftKey(35,function(){b.enterGroup()});g.bindKey(36,function(){b.home()});g.bindKey(35,function(){b.refresh()});g.bindAction(107,!0,"zoomIn");g.bindAction(109,!0,"zoomOut");g.bindAction(80,!0,"print");g.bindAction(79,!0,"outline",!0);if(!this.editor.chromeless||this.editor.editable)g.bindControlKey(36,function(){b.isEnabled()&&b.foldCells(!0)}),g.bindControlKey(35,function(){b.isEnabled()&&b.foldCells(!1)}),g.bindControlKey(13,function(){if(b.isEnabled())try{b.setSelectionCells(b.duplicateCells(b.getSelectionCells(),
-!1))}catch(p){m.handleError(p)}}),g.bindAction(8,!1,"delete"),g.bindAction(8,!0,"deleteAll"),g.bindAction(46,!1,"delete"),g.bindAction(46,!0,"deleteAll"),g.bindAction(72,!0,"resetView"),g.bindAction(72,!0,"fitWindow",!0),g.bindAction(74,!0,"fitPage"),g.bindAction(74,!0,"fitTwoPages",!0),g.bindAction(48,!0,"customZoom"),g.bindAction(82,!0,"turn"),g.bindAction(82,!0,"clearDefaultStyle",!0),g.bindAction(83,!0,"save"),g.bindAction(83,!0,"saveAs",!0),g.bindAction(65,!0,"selectAll"),g.bindAction(65,!0,
-"selectNone",!0),g.bindAction(73,!0,"selectVertices",!0),g.bindAction(69,!0,"selectEdges",!0),g.bindAction(69,!0,"editStyle"),g.bindAction(66,!0,"bold"),g.bindAction(66,!0,"toBack",!0),g.bindAction(70,!0,"toFront",!0),g.bindAction(68,!0,"duplicate"),g.bindAction(68,!0,"setAsDefaultStyle",!0),g.bindAction(90,!0,"undo"),g.bindAction(89,!0,"autosize",!0),g.bindAction(88,!0,"cut"),g.bindAction(67,!0,"copy"),g.bindAction(86,!0,"paste"),g.bindAction(71,!0,"group"),g.bindAction(77,!0,"editData"),g.bindAction(71,
-!0,"grid",!0),g.bindAction(73,!0,"italic"),g.bindAction(76,!0,"lockUnlock"),g.bindAction(76,!0,"layers",!0),g.bindAction(80,!0,"formatPanel",!0),g.bindAction(85,!0,"underline"),g.bindAction(85,!0,"ungroup",!0),g.bindAction(190,!0,"superscript"),g.bindAction(188,!0,"subscript"),g.bindAction(9,!1,"indent",!0),g.bindKey(13,function(){b.isEnabled()&&b.startEditingAtCell()}),g.bindKey(113,function(){b.isEnabled()&&b.startEditingAtCell()});mxClient.IS_WIN?g.bindAction(89,!0,"redo"):g.bindAction(90,!0,"redo",
-!0);return g};
+function(){c(a.keyCode,mxEvent.isShiftDown(a)?b.gridSize:null,!0)}:function(){c(a.keyCode,mxEvent.isShiftDown(a)?b.gridSize:null)}}return l.apply(this,arguments)};f.bindAction=mxUtils.bind(this,function(a,b,c,d){var e=this.actions.get(c);null!=e&&(c=function(){e.isEnabled()&&e.funct()},b?d?f.bindControlShiftKey(a,c):f.bindControlKey(a,c):d?f.bindShiftKey(a,c):f.bindKey(a,c))});var m=this,n=f.escape;f.escape=function(a){n.apply(this,arguments)};f.enter=function(){};f.bindControlShiftKey(36,function(){b.exitGroup()});
+f.bindControlShiftKey(35,function(){b.enterGroup()});f.bindKey(36,function(){b.home()});f.bindKey(35,function(){b.refresh()});f.bindAction(107,!0,"zoomIn");f.bindAction(109,!0,"zoomOut");f.bindAction(80,!0,"print");f.bindAction(79,!0,"outline",!0);if(!this.editor.chromeless||this.editor.editable)f.bindControlKey(36,function(){b.isEnabled()&&b.foldCells(!0)}),f.bindControlKey(35,function(){b.isEnabled()&&b.foldCells(!1)}),f.bindControlKey(13,function(){if(b.isEnabled())try{b.setSelectionCells(b.duplicateCells(b.getSelectionCells(),
+!1))}catch(p){m.handleError(p)}}),f.bindAction(8,!1,"delete"),f.bindAction(8,!0,"deleteAll"),f.bindAction(46,!1,"delete"),f.bindAction(46,!0,"deleteAll"),f.bindAction(72,!0,"resetView"),f.bindAction(72,!0,"fitWindow",!0),f.bindAction(74,!0,"fitPage"),f.bindAction(74,!0,"fitTwoPages",!0),f.bindAction(48,!0,"customZoom"),f.bindAction(82,!0,"turn"),f.bindAction(82,!0,"clearDefaultStyle",!0),f.bindAction(83,!0,"save"),f.bindAction(83,!0,"saveAs",!0),f.bindAction(65,!0,"selectAll"),f.bindAction(65,!0,
+"selectNone",!0),f.bindAction(73,!0,"selectVertices",!0),f.bindAction(69,!0,"selectEdges",!0),f.bindAction(69,!0,"editStyle"),f.bindAction(66,!0,"bold"),f.bindAction(66,!0,"toBack",!0),f.bindAction(70,!0,"toFront",!0),f.bindAction(68,!0,"duplicate"),f.bindAction(68,!0,"setAsDefaultStyle",!0),f.bindAction(90,!0,"undo"),f.bindAction(89,!0,"autosize",!0),f.bindAction(88,!0,"cut"),f.bindAction(67,!0,"copy"),f.bindAction(86,!0,"paste"),f.bindAction(71,!0,"group"),f.bindAction(77,!0,"editData"),f.bindAction(71,
+!0,"grid",!0),f.bindAction(73,!0,"italic"),f.bindAction(76,!0,"lockUnlock"),f.bindAction(76,!0,"layers",!0),f.bindAction(80,!0,"formatPanel",!0),f.bindAction(85,!0,"underline"),f.bindAction(85,!0,"ungroup",!0),f.bindAction(190,!0,"superscript"),f.bindAction(188,!0,"subscript"),f.bindAction(9,!1,"indent",!0),f.bindKey(13,function(){b.isEnabled()&&b.startEditingAtCell()}),f.bindKey(113,function(){b.isEnabled()&&b.startEditingAtCell()});mxClient.IS_WIN?f.bindAction(89,!0,"redo"):f.bindAction(90,!0,"redo",
+!0);return f};
EditorUi.prototype.destroy=function(){null!=this.editor&&(this.editor.destroy(),this.editor=null);null!=this.menubar&&(this.menubar.destroy(),this.menubar=null);null!=this.toolbar&&(this.toolbar.destroy(),this.toolbar=null);null!=this.sidebar&&(this.sidebar.destroy(),this.sidebar=null);null!=this.keyHandler&&(this.keyHandler.destroy(),this.keyHandler=null);null!=this.keydownHandler&&(mxEvent.removeListener(document,"keydown",this.keydownHandler),this.keydownHandler=null);null!=this.keyupHandler&&(mxEvent.removeListener(document,
"keyup",this.keyupHandler),this.keyupHandler=null);null!=this.resizeHandler&&(mxEvent.removeListener(window,"resize",this.resizeHandler),this.resizeHandler=null);null!=this.gestureHandler&&(mxEvent.removeGestureListeners(document,this.gestureHandler),this.gestureHandler=null);null!=this.orientationChangeHandler&&(mxEvent.removeListener(window,"orientationchange",this.orientationChangeHandler),this.orientationChangeHandler=null);null!=this.scrollHandler&&(mxEvent.removeListener(window,"scroll",this.scrollHandler),
this.scrollHandler=null);if(null!=this.destroyFunctions){for(var a=0;a<this.destroyFunctions.length;a++)this.destroyFunctions[a]();this.destroyFunctions=null}for(var c=[this.menubarContainer,this.toolbarContainer,this.sidebarContainer,this.formatContainer,this.diagramContainer,this.footerContainer,this.chromelessToolbar,this.hsplit,this.sidebarFooterContainer,this.layersDialog],a=0;a<c.length;a++)null!=c[a]&&null!=c[a].parentNode&&c[a].parentNode.removeChild(c[a])};function Sidebar(a,c){this.editorUi=a;this.container=c;this.palettes={};this.taglist={};this.showTooltips=!0;this.graph=a.createTemporaryGraph(this.editorUi.editor.graph.getStylesheet());this.graph.cellRenderer.minSvgStrokeWidth=this.minThumbStrokeWidth;this.graph.cellRenderer.antiAlias=this.thumbAntiAlias;this.graph.container.style.visibility="hidden";this.graph.foldingEnabled=!1;document.body.appendChild(this.graph.container);this.pointerUpHandler=mxUtils.bind(this,function(){this.showTooltips=
@@ -2312,28 +2312,28 @@ Sidebar.prototype.searchImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgo
"/search.png";Sidebar.prototype.dragPreviewBorder="1px dashed black";Sidebar.prototype.enableTooltips=!0;Sidebar.prototype.tooltipBorder=16;Sidebar.prototype.tooltipDelay=300;Sidebar.prototype.dropTargetDelay=200;Sidebar.prototype.gearImage=STENCIL_PATH+"/clipart/Gear_128x128.png";Sidebar.prototype.thumbWidth=42;Sidebar.prototype.thumbHeight=42;Sidebar.prototype.minThumbStrokeWidth=1;Sidebar.prototype.thumbAntiAlias=!1;Sidebar.prototype.thumbPadding=5<=document.documentMode?2:3;
Sidebar.prototype.thumbBorder=2;"large"!=urlParams["sidebar-entries"]&&(Sidebar.prototype.thumbPadding=5<=document.documentMode?0:1,Sidebar.prototype.thumbBorder=1,Sidebar.prototype.thumbWidth=32,Sidebar.prototype.thumbHeight=30,Sidebar.prototype.minThumbStrokeWidth=1.3,Sidebar.prototype.thumbAntiAlias=!0);Sidebar.prototype.sidebarTitleSize=9;Sidebar.prototype.sidebarTitles=!1;Sidebar.prototype.tooltipTitles=!0;Sidebar.prototype.maxTooltipWidth=400;Sidebar.prototype.maxTooltipHeight=400;
Sidebar.prototype.addStencilsToIndex=!0;Sidebar.prototype.defaultImageWidth=80;Sidebar.prototype.defaultImageHeight=80;Sidebar.prototype.getTooltipOffset=function(){return new mxPoint(0,0)};
-Sidebar.prototype.showTooltip=function(a,c,d,b,g,e){if(this.enableTooltips&&this.showTooltips&&this.currentElt!=a){null!=this.thread&&(window.clearTimeout(this.thread),this.thread=null);var h=mxUtils.bind(this,function(){null==this.tooltip&&(this.tooltip=document.createElement("div"),this.tooltip.className="geSidebarTooltip",this.tooltip.style.zIndex=mxPopupMenu.prototype.zIndex-1,document.body.appendChild(this.tooltip),this.graph2=new Graph(this.tooltip,null,null,this.editorUi.editor.graph.getStylesheet()),
+Sidebar.prototype.showTooltip=function(a,c,d,b,f,e){if(this.enableTooltips&&this.showTooltips&&this.currentElt!=a){null!=this.thread&&(window.clearTimeout(this.thread),this.thread=null);var h=mxUtils.bind(this,function(){null==this.tooltip&&(this.tooltip=document.createElement("div"),this.tooltip.className="geSidebarTooltip",this.tooltip.style.zIndex=mxPopupMenu.prototype.zIndex-1,document.body.appendChild(this.tooltip),this.graph2=new Graph(this.tooltip,null,null,this.editorUi.editor.graph.getStylesheet()),
this.graph2.resetViewOnRootChange=!1,this.graph2.foldingEnabled=!1,this.graph2.gridEnabled=!1,this.graph2.autoScroll=!1,this.graph2.setTooltips(!1),this.graph2.setConnectable(!1),this.graph2.setEnabled(!1),mxClient.IS_SVG||(this.graph2.view.canvas.style.position="relative"));this.graph2.model.clear();this.graph2.view.setTranslate(this.tooltipBorder,this.tooltipBorder);this.graph2.view.scale=d>this.maxTooltipWidth||b>this.maxTooltipHeight?Math.round(100*Math.min(this.maxTooltipWidth/d,this.maxTooltipHeight/
-b))/100:1;this.tooltip.style.display="block";this.graph2.labelsVisible=null==e||e;var f=mxClient.NO_FO;mxClient.NO_FO=Editor.prototype.originalNoForeignObject;this.graph2.addCells(c);mxClient.NO_FO=f;var h=this.graph2.getGraphBounds(),l=h.width+2*this.tooltipBorder+4,f=h.height+2*this.tooltipBorder;mxClient.IS_QUIRKS?(f+=4,this.tooltip.style.overflow="hidden"):this.tooltip.style.overflow="visible";this.tooltip.style.width=l+"px";var m=l;if(this.tooltipTitles&&null!=g&&0<g.length){null==this.tooltipTitle?
-(this.tooltipTitle=document.createElement("div"),this.tooltipTitle.style.borderTop="1px solid gray",this.tooltipTitle.style.textAlign="center",this.tooltipTitle.style.width="100%",this.tooltipTitle.style.overflow="hidden",this.tooltipTitle.style.position="absolute",this.tooltipTitle.style.paddingTop="6px",this.tooltipTitle.style.bottom="6px",this.tooltip.appendChild(this.tooltipTitle)):this.tooltipTitle.innerHTML="";this.tooltipTitle.style.display="";mxUtils.write(this.tooltipTitle,g);var m=Math.min(this.maxTooltipWidth,
-Math.max(l,this.tooltipTitle.scrollWidth+4)),n=this.tooltipTitle.offsetHeight+10,f=f+n;mxClient.IS_SVG?this.tooltipTitle.style.marginTop=2-n+"px":(f-=6,this.tooltipTitle.style.top=f-n+"px")}else null!=this.tooltipTitle&&null!=this.tooltipTitle.parentNode&&(this.tooltipTitle.style.display="none");m>l&&(this.tooltip.style.width=m+"px");this.tooltip.style.height=f+"px";var l=-Math.round(h.x-this.tooltipBorder)+(m>l?(m-l)/2:0),h=-Math.round(h.y-this.tooltipBorder),n=document.body,p=document.documentElement,
-q=this.getTooltipOffset(),m=this.container.clientWidth+this.editorUi.splitSize+3+this.editorUi.container.offsetLeft+q.x,f=Math.min(Math.max(n.clientHeight||0,p.clientHeight)-f-20,Math.max(0,this.editorUi.container.offsetTop+this.container.offsetTop+a.offsetTop-this.container.scrollTop-f/2+16))+q.y;mxClient.IS_SVG?0!=l||0!=h?this.graph2.view.canvas.setAttribute("transform","translate("+l+","+h+")"):this.graph2.view.canvas.removeAttribute("transform"):(this.graph2.view.drawPane.style.left=l+"px",this.graph2.view.drawPane.style.top=
-h+"px");this.tooltip.style.position="absolute";this.tooltip.style.left=m+"px";this.tooltip.style.top=f+"px"});null!=this.tooltip&&"none"!=this.tooltip.style.display?h():this.thread=window.setTimeout(h,this.tooltipDelay);this.currentElt=a}};Sidebar.prototype.hideTooltip=function(){null!=this.thread&&(window.clearTimeout(this.thread),this.thread=null);null!=this.tooltip&&(this.tooltip.style.display="none",this.currentElt=null)};
-Sidebar.prototype.addDataEntry=function(a,c,d,b,g){return this.addEntry(a,mxUtils.bind(this,function(){return this.createVertexTemplateFromData(g,c,d,b)}))};
+b))/100:1;this.tooltip.style.display="block";this.graph2.labelsVisible=null==e||e;var g=mxClient.NO_FO;mxClient.NO_FO=Editor.prototype.originalNoForeignObject;this.graph2.addCells(c);mxClient.NO_FO=g;var h=this.graph2.getGraphBounds(),l=h.width+2*this.tooltipBorder+4,g=h.height+2*this.tooltipBorder;mxClient.IS_QUIRKS?(g+=4,this.tooltip.style.overflow="hidden"):this.tooltip.style.overflow="visible";this.tooltip.style.width=l+"px";var m=l;if(this.tooltipTitles&&null!=f&&0<f.length){null==this.tooltipTitle?
+(this.tooltipTitle=document.createElement("div"),this.tooltipTitle.style.borderTop="1px solid gray",this.tooltipTitle.style.textAlign="center",this.tooltipTitle.style.width="100%",this.tooltipTitle.style.overflow="hidden",this.tooltipTitle.style.position="absolute",this.tooltipTitle.style.paddingTop="6px",this.tooltipTitle.style.bottom="6px",this.tooltip.appendChild(this.tooltipTitle)):this.tooltipTitle.innerHTML="";this.tooltipTitle.style.display="";mxUtils.write(this.tooltipTitle,f);var m=Math.min(this.maxTooltipWidth,
+Math.max(l,this.tooltipTitle.scrollWidth+4)),n=this.tooltipTitle.offsetHeight+10,g=g+n;mxClient.IS_SVG?this.tooltipTitle.style.marginTop=2-n+"px":(g-=6,this.tooltipTitle.style.top=g-n+"px")}else null!=this.tooltipTitle&&null!=this.tooltipTitle.parentNode&&(this.tooltipTitle.style.display="none");m>l&&(this.tooltip.style.width=m+"px");this.tooltip.style.height=g+"px";var l=-Math.round(h.x-this.tooltipBorder)+(m>l?(m-l)/2:0),h=-Math.round(h.y-this.tooltipBorder),n=document.body,p=document.documentElement,
+q=this.getTooltipOffset(),m=this.container.clientWidth+this.editorUi.splitSize+3+this.editorUi.container.offsetLeft+q.x,g=Math.min(Math.max(n.clientHeight||0,p.clientHeight)-g-20,Math.max(0,this.editorUi.container.offsetTop+this.container.offsetTop+a.offsetTop-this.container.scrollTop-g/2+16))+q.y;mxClient.IS_SVG?0!=l||0!=h?this.graph2.view.canvas.setAttribute("transform","translate("+l+","+h+")"):this.graph2.view.canvas.removeAttribute("transform"):(this.graph2.view.drawPane.style.left=l+"px",this.graph2.view.drawPane.style.top=
+h+"px");this.tooltip.style.position="absolute";this.tooltip.style.left=m+"px";this.tooltip.style.top=g+"px"});null!=this.tooltip&&"none"!=this.tooltip.style.display?h():this.thread=window.setTimeout(h,this.tooltipDelay);this.currentElt=a}};Sidebar.prototype.hideTooltip=function(){null!=this.thread&&(window.clearTimeout(this.thread),this.thread=null);null!=this.tooltip&&(this.tooltip.style.display="none",this.currentElt=null)};
+Sidebar.prototype.addDataEntry=function(a,c,d,b,f){return this.addEntry(a,mxUtils.bind(this,function(){return this.createVertexTemplateFromData(f,c,d,b)}))};
Sidebar.prototype.addEntries=function(a){for(var c=0;c<a.length;c++)mxUtils.bind(this,function(a){var b=a.data,c=null!=a.title?a.title:"";null!=a.tags&&(c+=" "+a.tags);null!=b&&0<c.length?this.addEntry(c,mxUtils.bind(this,function(){b=this.editorUi.convertDataUri(b);var c="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==a.aspect&&(c+="aspect=fixed;");return this.createVertexTemplate(c+"image="+b,a.w,a.h,"",a.title||"",!1,!1,!0)})):null!=a.xml&&0<c.length&&this.addEntry(c,
mxUtils.bind(this,function(){var b=this.editorUi.stringToCells(Graph.decompress(a.xml));return this.createVertexTemplateFromCells(b,a.w,a.h,a.title||"",!0,!1,!0)}))})(a[c])};
-Sidebar.prototype.addEntry=function(a,c){if(null!=this.taglist&&null!=a&&0<a.length)for(var d=a.toLowerCase().replace(/[\/\,\(\)]/g," ").split(" "),b=mxUtils.bind(this,function(a){if(null!=a&&1<a.length){var b=this.taglist[a];"object"!==typeof b&&(b={entries:[],dict:new mxDictionary},this.taglist[a]=b);null==b.dict.get(c)&&(b.dict.put(c,c),b.entries.push(c))}}),g=0;g<d.length;g++){b(d[g]);var e=d[g].replace(/\.*\d*$/,"");e!=d[g]&&b(e)}return c};
-Sidebar.prototype.searchEntries=function(a,c,d,b,g){if(null!=this.taglist&&null!=a){var e=a.toLowerCase().split(" ");g=new mxDictionary;var h=(d+1)*c;a=[];for(var f=0,k=0;k<e.length;k++)if(0<e[k].length){var l=this.taglist[e[k]],m=new mxDictionary;if(null!=l){var n=l.entries;a=[];for(var p=0;p<n.length;p++)if(l=n[p],0==f==(null==g.get(l))&&(m.put(l,l),a.push(l),k==e.length-1&&a.length==h)){b(a.slice(d*c,h),h,!0,e);return}}else a=[];g=m;f++}g=a.length;b(a.slice(d*c,(d+1)*c),g,!1,e)}else b([],null,
+Sidebar.prototype.addEntry=function(a,c){if(null!=this.taglist&&null!=a&&0<a.length)for(var d=a.toLowerCase().replace(/[\/\,\(\)]/g," ").split(" "),b=mxUtils.bind(this,function(a){if(null!=a&&1<a.length){var b=this.taglist[a];"object"!==typeof b&&(b={entries:[],dict:new mxDictionary},this.taglist[a]=b);null==b.dict.get(c)&&(b.dict.put(c,c),b.entries.push(c))}}),f=0;f<d.length;f++){b(d[f]);var e=d[f].replace(/\.*\d*$/,"");e!=d[f]&&b(e)}return c};
+Sidebar.prototype.searchEntries=function(a,c,d,b,f){if(null!=this.taglist&&null!=a){var e=a.toLowerCase().split(" ");f=new mxDictionary;var h=(d+1)*c;a=[];for(var g=0,k=0;k<e.length;k++)if(0<e[k].length){var l=this.taglist[e[k]],m=new mxDictionary;if(null!=l){var n=l.entries;a=[];for(var p=0;p<n.length;p++)if(l=n[p],0==g==(null==f.get(l))&&(m.put(l,l),a.push(l),k==e.length-1&&a.length==h)){b(a.slice(d*c,h),h,!0,e);return}}else a=[];f=m;g++}f=a.length;b(a.slice(d*c,(d+1)*c),f,!1,e)}else b([],null,
null,e)};Sidebar.prototype.filterTags=function(a){if(null!=a){a=a.split(" ");for(var c=[],d={},b=0;b<a.length;b++)null==d[a[b]]&&(d[a[b]]="1",c.push(a[b]));return c.join(" ")}return null};Sidebar.prototype.cloneCell=function(a,c){var d=a.clone();null!=c&&(d.value=c);return d};
Sidebar.prototype.addSearchPalette=function(a){var c=document.createElement("div");c.style.visibility="hidden";this.container.appendChild(c);var d=document.createElement("div");d.className="geSidebar";d.style.boxSizing="border-box";d.style.overflow="hidden";d.style.width="100%";d.style.padding="8px";d.style.paddingTop="14px";d.style.paddingBottom="0px";a||(d.style.display="none");var b=document.createElement("div");b.style.whiteSpace="nowrap";b.style.textOverflow="clip";b.style.paddingBottom="8px";
-b.style.cursor="default";var g=document.createElement("input");g.setAttribute("placeholder",mxResources.get("searchShapes"));g.setAttribute("type","text");g.style.fontSize="12px";g.style.overflow="hidden";g.style.boxSizing="border-box";g.style.border="solid 1px #d5d5d5";g.style.borderRadius="4px";g.style.width="100%";g.style.outline="none";g.style.padding="6px";g.style.paddingRight="20px";b.appendChild(g);var e=document.createElement("img");e.setAttribute("src",Sidebar.prototype.searchImage);e.setAttribute("title",
-mxResources.get("search"));e.style.position="relative";e.style.left="-18px";mxClient.IS_QUIRKS?(g.style.height="28px",e.style.top="-4px"):e.style.top="1px";e.style.background="url('"+this.editorUi.editor.transparentImage+"')";var h;b.appendChild(e);d.appendChild(b);var f=document.createElement("center"),k=mxUtils.button(mxResources.get("moreResults"),function(){h()});k.style.display="none";k.style.lineHeight="normal";k.style.marginTop="4px";k.style.marginBottom="8px";f.style.paddingTop="4px";f.style.paddingBottom=
-"4px";f.appendChild(k);d.appendChild(f);var l="",m=!1,n=!1,p=0,q={},u=12,v=mxUtils.bind(this,function(){m=!1;this.currentSearch=null;for(var a=d.firstChild;null!=a;){var c=a.nextSibling;a!=b&&a!=f&&a.parentNode.removeChild(a);a=c}});mxEvent.addListener(e,"click",function(){e.getAttribute("src")==Dialog.prototype.closeImage&&(e.setAttribute("src",Sidebar.prototype.searchImage),e.setAttribute("title",mxResources.get("search")),k.style.display="none",l=g.value="",v());g.focus()});h=mxUtils.bind(this,
-function(){u=4*Math.max(1,Math.floor(this.container.clientWidth/(this.thumbWidth+10)));this.hideTooltip();if(""!=g.value){if(null!=f.parentNode&&(l!=g.value&&(v(),l=g.value,q={},n=!1,p=0),!m&&!n)){k.setAttribute("disabled","true");k.style.display="";k.style.cursor="wait";k.innerHTML=mxResources.get("loading")+"...";m=!0;var a={};this.currentSearch=a;this.searchEntries(l,u,p,mxUtils.bind(this,function(b,c,e,g){if(this.currentSearch==a){b=null!=b?b:[];m=!1;p++;this.insertSearchHint(d,l,u,p,b,c,e,g);
-0==b.length&&1==p&&(l="");null!=f.parentNode&&f.parentNode.removeChild(f);for(c=0;c<b.length;c++)try{var h=b[c]();null==q[h.innerHTML]&&(q[h.innerHTML]="1",d.appendChild(h))}catch(B){}e?(k.removeAttribute("disabled"),k.innerHTML=mxResources.get("moreResults")):(k.innerHTML=mxResources.get("reset"),k.style.display="none",n=!0);k.style.cursor="";d.appendChild(f)}}),mxUtils.bind(this,function(){k.style.cursor=""}))}}else v(),l=g.value="",q={},k.style.display="none",n=!1,g.focus()});mxEvent.addListener(g,
-"keydown",mxUtils.bind(this,function(a){13==a.keyCode&&(h(),mxEvent.consume(a))}));mxEvent.addListener(g,"keyup",mxUtils.bind(this,function(a){""==g.value?(e.setAttribute("src",Sidebar.prototype.searchImage),e.setAttribute("title",mxResources.get("search"))):(e.setAttribute("src",Dialog.prototype.closeImage),e.setAttribute("title",mxResources.get("reset")));""==g.value?(n=!0,k.style.display="none"):g.value!=l?(k.style.display="none",n=!1):m||(k.style.display=n?"none":"")}));mxEvent.addListener(g,
-"mousedown",function(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=!0});mxEvent.addListener(g,"selectstart",function(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=!0});a=document.createElement("div");a.appendChild(d);this.container.appendChild(a);this.palettes.search=[c,a]};
-Sidebar.prototype.insertSearchHint=function(a,c,d,b,g,e,h,f){0==g.length&&1==b&&(d=document.createElement("div"),d.className="geTitle",d.style.cssText="background-color:transparent;border-color:transparent;color:gray;padding:6px 0px 0px 0px !important;margin:4px 8px 4px 8px;text-align:center;cursor:default !important",mxUtils.write(d,mxResources.get("noResultsFor",[c])),a.appendChild(d))};
+b.style.cursor="default";var f=document.createElement("input");f.setAttribute("placeholder",mxResources.get("searchShapes"));f.setAttribute("type","text");f.style.fontSize="12px";f.style.overflow="hidden";f.style.boxSizing="border-box";f.style.border="solid 1px #d5d5d5";f.style.borderRadius="4px";f.style.width="100%";f.style.outline="none";f.style.padding="6px";f.style.paddingRight="20px";b.appendChild(f);var e=document.createElement("img");e.setAttribute("src",Sidebar.prototype.searchImage);e.setAttribute("title",
+mxResources.get("search"));e.style.position="relative";e.style.left="-18px";mxClient.IS_QUIRKS?(f.style.height="28px",e.style.top="-4px"):e.style.top="1px";e.style.background="url('"+this.editorUi.editor.transparentImage+"')";var h;b.appendChild(e);d.appendChild(b);var g=document.createElement("center"),k=mxUtils.button(mxResources.get("moreResults"),function(){h()});k.style.display="none";k.style.lineHeight="normal";k.style.marginTop="4px";k.style.marginBottom="8px";g.style.paddingTop="4px";g.style.paddingBottom=
+"4px";g.appendChild(k);d.appendChild(g);var l="",m=!1,n=!1,p=0,q={},u=12,v=mxUtils.bind(this,function(){m=!1;this.currentSearch=null;for(var a=d.firstChild;null!=a;){var c=a.nextSibling;a!=b&&a!=g&&a.parentNode.removeChild(a);a=c}});mxEvent.addListener(e,"click",function(){e.getAttribute("src")==Dialog.prototype.closeImage&&(e.setAttribute("src",Sidebar.prototype.searchImage),e.setAttribute("title",mxResources.get("search")),k.style.display="none",l=f.value="",v());f.focus()});h=mxUtils.bind(this,
+function(){u=4*Math.max(1,Math.floor(this.container.clientWidth/(this.thumbWidth+10)));this.hideTooltip();if(""!=f.value){if(null!=g.parentNode&&(l!=f.value&&(v(),l=f.value,q={},n=!1,p=0),!m&&!n)){k.setAttribute("disabled","true");k.style.display="";k.style.cursor="wait";k.innerHTML=mxResources.get("loading")+"...";m=!0;var a={};this.currentSearch=a;this.searchEntries(l,u,p,mxUtils.bind(this,function(b,c,e,f){if(this.currentSearch==a){b=null!=b?b:[];m=!1;p++;this.insertSearchHint(d,l,u,p,b,c,e,f);
+0==b.length&&1==p&&(l="");null!=g.parentNode&&g.parentNode.removeChild(g);for(c=0;c<b.length;c++)try{var h=b[c]();null==q[h.innerHTML]&&(q[h.innerHTML]="1",d.appendChild(h))}catch(B){}e?(k.removeAttribute("disabled"),k.innerHTML=mxResources.get("moreResults")):(k.innerHTML=mxResources.get("reset"),k.style.display="none",n=!0);k.style.cursor="";d.appendChild(g)}}),mxUtils.bind(this,function(){k.style.cursor=""}))}}else v(),l=f.value="",q={},k.style.display="none",n=!1,f.focus()});mxEvent.addListener(f,
+"keydown",mxUtils.bind(this,function(a){13==a.keyCode&&(h(),mxEvent.consume(a))}));mxEvent.addListener(f,"keyup",mxUtils.bind(this,function(a){""==f.value?(e.setAttribute("src",Sidebar.prototype.searchImage),e.setAttribute("title",mxResources.get("search"))):(e.setAttribute("src",Dialog.prototype.closeImage),e.setAttribute("title",mxResources.get("reset")));""==f.value?(n=!0,k.style.display="none"):f.value!=l?(k.style.display="none",n=!1):m||(k.style.display=n?"none":"")}));mxEvent.addListener(f,
+"mousedown",function(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=!0});mxEvent.addListener(f,"selectstart",function(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=!0});a=document.createElement("div");a.appendChild(d);this.container.appendChild(a);this.palettes.search=[c,a]};
+Sidebar.prototype.insertSearchHint=function(a,c,d,b,f,e,h,g){0==f.length&&1==b&&(d=document.createElement("div"),d.className="geTitle",d.style.cssText="background-color:transparent;border-color:transparent;color:gray;padding:6px 0px 0px 0px !important;margin:4px 8px 4px 8px;text-align:center;cursor:default !important",mxUtils.write(d,mxResources.get("noResultsFor",[c])),a.appendChild(d))};
Sidebar.prototype.addGeneralPalette=function(a){var c=[this.createVertexTemplateEntry("rounded=0;whiteSpace=wrap;html=1;",120,60,"","Rectangle",null,null,"rect rectangle box"),this.createVertexTemplateEntry("rounded=1;whiteSpace=wrap;html=1;",120,60,"","Rounded Rectangle",null,null,"rounded rect rectangle box"),this.createVertexTemplateEntry("text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",40,20,"Text","Text",null,null,"text textbox textarea label"),
this.createVertexTemplateEntry("text;html=1;strokeColor=none;fillColor=none;spacing=5;spacingTop=-20;whiteSpace=wrap;overflow=hidden;rounded=0;",190,120,"<h1>Heading</h1><p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>","Textbox",null,null,"text textbox textarea"),this.createVertexTemplateEntry("ellipse;whiteSpace=wrap;html=1;",120,80,"","Ellipse",null,null,"oval ellipse state"),this.createVertexTemplateEntry("whiteSpace=wrap;html=1;aspect=fixed;",
80,80,"","Square",null,null,"square"),this.createVertexTemplateEntry("ellipse;whiteSpace=wrap;html=1;aspect=fixed;",80,80,"","Circle",null,null,"circle"),this.createVertexTemplateEntry("shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;",120,60,"","Process",null,null,"process task"),this.createVertexTemplateEntry("rhombus;whiteSpace=wrap;html=1;",80,80,"","Diamond",null,null,"diamond rhombus if condition decision conditional question test"),this.createVertexTemplateEntry("shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;",
@@ -2375,7 +2375,7 @@ null,null,"collate"),this.createVertexTemplateEntry("shape=switch;whiteSpace=wra
296,100,"Process Bar")}),this.createVertexTemplateEntry("swimlane;",200,200,"Container","Container",null,null,"container swimlane lane pool group"),this.addEntry("list group erd table",function(){var d=new mxCell("List",new mxGeometry(0,0,140,110),"swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=26;fillColor=none;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;");d.vertex=!0;d.insert(a.cloneCell(c,"Item 1"));d.insert(a.cloneCell(c,"Item 2"));
d.insert(a.cloneCell(c,"Item 3"));return a.createVertexTemplateFromCells([d],d.geometry.width,d.geometry.height,"List")}),this.addEntry("list item entry value group erd table",function(){return a.createVertexTemplateFromCells([a.cloneCell(c,"List Item")],c.geometry.width,c.geometry.height,"List Item")})]};
Sidebar.prototype.addUmlPalette=function(a){var c=this,d=new mxCell("+ field: type",new mxGeometry(0,0,100,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;");d.vertex=!0;var b=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;");
-b.vertex=!0;var g=[this.createVertexTemplateEntry("html=1;",110,50,"Object","Object",null,null,"uml static class object instance"),this.createVertexTemplateEntry("html=1;",110,50,"&laquo;interface&raquo;<br><b>Name</b>","Interface",null,null,"uml static class interface object instance annotated annotation"),this.addEntry("uml static class object instance",function(){var a=new mxCell("Classname",new mxGeometry(0,0,160,90),"swimlane;fontStyle=1;align=center;verticalAlign=top;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;");
+b.vertex=!0;var f=[this.createVertexTemplateEntry("html=1;",110,50,"Object","Object",null,null,"uml static class object instance"),this.createVertexTemplateEntry("html=1;",110,50,"&laquo;interface&raquo;<br><b>Name</b>","Interface",null,null,"uml static class interface object instance annotated annotation"),this.addEntry("uml static class object instance",function(){var a=new mxCell("Classname",new mxGeometry(0,0,160,90),"swimlane;fontStyle=1;align=center;verticalAlign=top;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;");
a.vertex=!0;a.insert(d.clone());a.insert(b.clone());a.insert(c.cloneCell(d,"+ method(type): type"));return c.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,"Class")}),this.addEntry("uml static class section subsection",function(){var a=new mxCell("Classname",new mxGeometry(0,0,140,110),"swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=26;fillColor=none;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;");a.vertex=
!0;a.insert(d.clone());a.insert(d.clone());a.insert(d.clone());return c.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,"Class 2")}),this.addEntry("uml static class item member method function variable field attribute label",function(){return c.createVertexTemplateFromCells([c.cloneCell(d,"+ item: attribute")],d.geometry.width,d.geometry.height,"Item 1")}),this.addEntry("uml static class item member method function variable field attribute label",function(){var a=new mxCell("item: attribute",
new mxGeometry(0,0,120,d.geometry.height),"label;fontStyle=0;strokeColor=none;fillColor=none;align=left;verticalAlign=top;overflow=hidden;spacingLeft=28;spacingRight=4;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;imageWidth=16;imageHeight=16;image="+c.gearImage);a.vertex=!0;return c.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,"Item 2")}),this.addEntry("uml static class divider hline line separator",function(){return c.createVertexTemplateFromCells([b.clone()],
@@ -2415,7 +2415,7 @@ a.geometry.setTerminalPoint(new mxPoint(0,0),!0);a.geometry.setTerminalPoint(new
!0;a.edge=!0;var b=new mxCell("0..n",new mxGeometry(-1,0,0,0),"resizable=0;html=1;align=left;verticalAlign=top;labelBackgroundColor=#ffffff;fontSize=10;");b.geometry.relative=!0;b.setConnectable(!1);b.vertex=!0;a.insert(b);b=new mxCell("1",new mxGeometry(1,0,0,0),"resizable=0;html=1;align=right;verticalAlign=top;labelBackgroundColor=#ffffff;fontSize=10;");b.geometry.relative=!0;b.setConnectable(!1);b.vertex=!0;a.insert(b);return c.createEdgeTemplateFromCells([a],160,0,"Relation 2")}),this.createEdgeTemplateEntry("endArrow=open;endSize=12;dashed=1;html=1;",
160,0,"Use","Dependency",null,"uml dependency use"),this.createEdgeTemplateEntry("endArrow=block;endSize=16;endFill=0;html=1;",160,0,"Extends","Generalization",null,"uml generalization extend"),this.createEdgeTemplateEntry("endArrow=block;startArrow=block;endFill=1;startFill=1;html=1;",160,0,"","Association 2",null,"uml association"),this.createEdgeTemplateEntry("endArrow=open;startArrow=circlePlus;endFill=0;startFill=0;endSize=8;html=1;",160,0,"","Inner Class",null,"uml inner class"),this.createEdgeTemplateEntry("endArrow=open;startArrow=cross;endFill=0;startFill=0;endSize=8;startSize=10;html=1;",
160,0,"","Terminate",null,"uml terminate"),this.createEdgeTemplateEntry("endArrow=block;dashed=1;endFill=0;endSize=12;html=1;",160,0,"","Implementation",null,"uml realization implementation"),this.createEdgeTemplateEntry("endArrow=diamondThin;endFill=0;endSize=24;html=1;",160,0,"","Aggregation 2",null,"uml aggregation"),this.createEdgeTemplateEntry("endArrow=diamondThin;endFill=1;endSize=24;html=1;",160,0,"","Composition 2",null,"uml composition"),this.createEdgeTemplateEntry("endArrow=open;endFill=1;endSize=12;html=1;",
-160,0,"","Association 3",null,"uml association")];this.addPaletteFunctions("uml",mxResources.get("uml"),a||!1,g)};
+160,0,"","Association 3",null,"uml association")];this.addPaletteFunctions("uml",mxResources.get("uml"),a||!1,f)};
Sidebar.prototype.addBpmnPalette=function(a,c){var d=this,b=[this.createVertexTemplateEntry("shape=ext;rounded=1;html=1;whiteSpace=wrap;",120,80,"Task","Process",null,null,"bpmn task process"),this.createVertexTemplateEntry("shape=ext;rounded=1;html=1;whiteSpace=wrap;double=1;",120,80,"Transaction","Transaction",null,null,"bpmn transaction"),this.createVertexTemplateEntry("shape=ext;rounded=1;html=1;whiteSpace=wrap;dashed=1;dashPattern=1 4;",120,80,"Event\nSub-Process","Event Sub-Process",null,null,
"bpmn event subprocess sub process sub-process"),this.createVertexTemplateEntry("shape=ext;rounded=1;html=1;whiteSpace=wrap;strokeWidth=3;",120,80,"Call Activity","Call Activity",null,null,"bpmn call activity"),this.addEntry("bpmn subprocess sub process sub-process",function(){var a=new mxCell("Sub-Process",new mxGeometry(0,0,120,80),"html=1;whiteSpace=wrap;rounded=1;dropTarget=0;");a.vertex=!0;var b=new mxCell("",new mxGeometry(.5,1,14,14),"html=1;shape=plus;outlineConnect=0;");b.vertex=!0;b.geometry.relative=
!0;b.geometry.offset=new mxPoint(-7,-14);a.insert(b);return d.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,"Sub-Process")}),this.addEntry(this.getTagsForStencil("mxgraph.bpmn","loop","subprocess sub process sub-process looped").join(" "),function(){var a=new mxCell("Looped\nSub-Process",new mxGeometry(0,0,120,80),"html=1;whiteSpace=wrap;rounded=1;dropTarget=0;");a.vertex=!0;var b=new mxCell("",new mxGeometry(.5,1,14,14),"html=1;shape=mxgraph.bpmn.loop;outlineConnect=0;");b.vertex=
@@ -2440,81 +2440,81 @@ null,null,"swimlane lane pool"),this.addDataEntry("container swimlane pool horiz
100,0,"","Default Flow",null,"bpmn default flow"),this.createEdgeTemplateEntry("startArrow=diamondThin;startFill=0;startSize=14;endArrow=block;endFill=1;endSize=6;html=1;",100,0,"","Conditional Flow",null,"bpmn conditional flow"),this.createEdgeTemplateEntry("startArrow=oval;startFill=0;startSize=7;endArrow=block;endFill=0;endSize=10;dashed=1;html=1;",100,0,"","Message Flow 1",null,"bpmn message flow"),this.addEntry("bpmn message flow",function(){var a=new mxCell("",new mxGeometry(0,0,0,0),"startArrow=oval;startFill=0;startSize=7;endArrow=block;endFill=0;endSize=10;dashed=1;html=1;");
a.geometry.setTerminalPoint(new mxPoint(0,0),!0);a.geometry.setTerminalPoint(new mxPoint(100,0),!1);a.geometry.relative=!0;a.edge=!0;var b=new mxCell("",new mxGeometry(0,0,20,14),"shape=message;html=1;outlineConnect=0;");b.geometry.relative=!0;b.vertex=!0;b.geometry.offset=new mxPoint(-10,-7);a.insert(b);return d.createEdgeTemplateFromCells([a],100,0,"Message Flow 2")}),this.createEdgeTemplateEntry("shape=link;html=1;",100,0,"","Link",null,"bpmn link")];this.addPaletteFunctions("bpmn","BPMN "+mxResources.get("general"),
!1,b)};Sidebar.prototype.createTitle=function(a){var c=document.createElement("a");c.setAttribute("title",mxResources.get("sidebarTooltip"));c.className="geTitle";mxUtils.write(c,a);return c};
-Sidebar.prototype.createThumb=function(a,c,d,b,g,e,h,f,k){this.graph.labelsVisible=null==e||e;e=mxClient.NO_FO;mxClient.NO_FO=Editor.prototype.originalNoForeignObject;this.graph.view.scaleAndTranslate(1,0,0);this.graph.addCells(a);a=this.graph.getGraphBounds();f=Math.floor(100*Math.min((c-2*this.thumbBorder)/a.width,(d-2*this.thumbBorder)/a.height))/100;this.graph.view.scaleAndTranslate(f,Math.floor((c-a.width*f)/2/f-a.x),Math.floor((d-a.height*f)/2/f-a.y));if(this.graph.dialect!=mxConstants.DIALECT_SVG||
-mxClient.NO_FO||null==this.graph.view.getCanvas().ownerSVGElement){if(f=this.graph.container.cloneNode(!1),f.innerHTML=this.graph.container.innerHTML,mxClient.IS_QUIRKS||8==document.documentMode)f.firstChild.style.overflow="visible"}else f=this.graph.view.getCanvas().ownerSVGElement.cloneNode(!0);this.graph.getModel().clear();mxClient.NO_FO=e;mxClient.IS_IE6&&(b.style.backgroundImage="url("+this.editorUi.editor.transparentImage+")");f.style.position="relative";f.style.overflow="hidden";f.style.left=
-this.thumbBorder+"px";f.style.top=this.thumbBorder+"px";f.style.width=c+"px";f.style.height=d+"px";f.style.visibility="";f.style.minWidth="";f.style.minHeight="";b.appendChild(f);this.sidebarTitles&&null!=g&&0!=h&&(b.style.height=this.thumbHeight+(mxClient.IS_QUIRKS?2*this.thumbPadding+2:0)+this.sidebarTitleSize+8+"px",c=document.createElement("div"),c.style.fontSize=this.sidebarTitleSize+"px",c.style.color="#303030",c.style.textAlign="center",c.style.whiteSpace="nowrap",mxClient.IS_IE&&(c.style.height=
-this.sidebarTitleSize+12+"px"),c.style.paddingTop="4px",mxUtils.write(c,g),b.appendChild(c));return a};
-Sidebar.prototype.createItem=function(a,c,d,b,g,e,h){var f=document.createElement("a");f.className="geItem";f.style.overflow="hidden";var k=mxClient.IS_QUIRKS?8+2*this.thumbPadding:2*this.thumbBorder;f.style.width=this.thumbWidth+k+"px";f.style.height=this.thumbHeight+k+"px";f.style.padding=this.thumbPadding+"px";mxClient.IS_IE6&&(f.style.border="none");mxEvent.addListener(f,"click",function(a){mxEvent.consume(a)});this.createThumb(a,this.thumbWidth,this.thumbHeight,f,c,d,b,g,e);var l=new mxRectangle(0,
-0,g,e);1<a.length||a[0].vertex?(b=this.createDragSource(f,this.createDropHandler(a,!0,h,l),this.createDragPreview(g,e),a,l),this.addClickHandler(f,b,a),b.isGuidesEnabled=mxUtils.bind(this,function(){return this.editorUi.editor.graph.graphHandler.guidesEnabled})):null!=a[0]&&a[0].edge&&(b=this.createDragSource(f,this.createDropHandler(a,!1,h,l),this.createDragPreview(g,e),a,l),this.addClickHandler(f,b,a));mxClient.IS_IOS||mxEvent.addGestureListeners(f,null,mxUtils.bind(this,function(b){mxEvent.isMouseEvent(b)&&
-this.showTooltip(f,a,l.width,l.height,c,d)}));return f};
-Sidebar.prototype.updateShapes=function(a,c){var d=this.editorUi.editor.graph,b=d.getCellStyle(a),g=[];d.model.beginUpdate();try{for(var e=d.getModel().getStyle(a),h="shadow dashed dashPattern fontFamily fontSize fontColor align startFill startSize endFill endSize strokeColor strokeWidth fillColor gradientColor html part noEdgeStyle edgeStyle elbow childLayout recursiveResize container collapsible connectable".split(" "),f=0;f<c.length;f++){var k=c[f];if(d.getModel().isVertex(k)==d.getModel().isVertex(a)||
-d.getModel().isEdge(k)==d.getModel().isEdge(a)){var l=d.getCurrentCellStyle(c[f]);d.getModel().setStyle(k,e);if("1"==mxUtils.getValue(l,"composite","0"))for(var m=d.model.getChildCount(k);0<=m;m--)d.model.remove(d.model.getChildAt(k,m));"umlLifeline"==l[mxConstants.STYLE_SHAPE]&&"umlLifeline"!=b[mxConstants.STYLE_SHAPE]&&(d.setCellStyles(mxConstants.STYLE_SHAPE,"umlLifeline",[k]),d.setCellStyles("participant",b[mxConstants.STYLE_SHAPE],[k]));for(m=0;m<h.length;m++){var n=l[h[m]];null!=n&&d.setCellStyles(h[m],
-n,[k])}g.push(k)}}}finally{d.model.endUpdate()}return g};
-Sidebar.prototype.createDropHandler=function(a,c,d,b){d=null!=d?d:!0;return mxUtils.bind(this,function(g,e,h,f,k,l){for(l=l?null:mxEvent.isTouchEvent(e)||mxEvent.isPenEvent(e)?document.elementFromPoint(mxEvent.getClientX(e),mxEvent.getClientY(e)):mxEvent.getSource(e);null!=l&&l!=this.container;)l=l.parentNode;if(null==l&&g.isEnabled()){a=g.getImportableCells(a);if(0<a.length){g.stopEditing();l=null==h||mxEvent.isAltDown(e)?!1:g.isValidDropTarget(h,a,e);var m=null;null==h||l||(h=null);if(!g.isCellLocked(h||
-g.getDefaultParent())){g.model.beginUpdate();try{f=Math.round(f);k=Math.round(k);if(c&&g.isSplitTarget(h,a,e)){var n=g.cloneCells(a);g.splitEdge(h,n,null,f-b.width/2,k-b.height/2);m=n}else 0<a.length&&(m=g.importCells(a,f,k,h));if(null!=g.layoutManager){var p=g.layoutManager.getLayout(h);if(null!=p){var q=g.view.scale,u=g.view.translate,v=(f+u.x)*q,r=(k+u.y)*q;for(h=0;h<m.length;h++)p.moveCell(m[h],v,r)}}!d||null!=e&&mxEvent.isShiftDown(e)||g.fireEvent(new mxEventObject("cellsInserted","cells",m))}catch(w){this.editorUi.handleError(w)}finally{g.model.endUpdate()}null!=
-m&&0<m.length&&(g.scrollCellToVisible(m[0]),g.setSelectionCells(m));g.editAfterInsert&&null!=e&&mxEvent.isMouseEvent(e)&&null!=m&&1==m.length&&window.setTimeout(function(){g.startEditing(m[0])},0)}}mxEvent.consume(e)}})};Sidebar.prototype.createDragPreview=function(a,c){var d=document.createElement("div");d.style.border=this.dragPreviewBorder;d.style.width=a+"px";d.style.height=c+"px";return d};
-Sidebar.prototype.dropAndConnect=function(a,c,d,b,g){var e=this.getDropAndConnectGeometry(a,c[b],d,c),h=[];if(null!=e){var f=this.editorUi.editor.graph,k=null;f.model.beginUpdate();try{var l=f.getCellGeometry(a),m=f.getCellGeometry(c[b]),n=f.model.getParent(a),p=!0;if(null!=f.layoutManager){var q=f.layoutManager.getLayout(n);if(null!=q&&q.constructor==mxStackLayout&&(p=!1,h=f.view.getState(n),null!=h)){var u=new mxPoint(h.x/f.view.scale-f.view.translate.x,h.y/f.view.scale-f.view.translate.y);e.x+=
-u.x;e.y+=u.y;var v=e.getTerminalPoint(!1);null!=v&&(v.x+=u.x,v.y+=u.y)}}var r=m.x,w=m.y;f.model.isEdge(c[b])&&(w=r=0);var t=f.model.isEdge(a)||null!=l&&!l.relative&&p,h=c=f.importCells(c,e.x-(t?r:0),e.y-(t?w:0),t?n:null);if(f.model.isEdge(a))f.model.setTerminal(a,c[b],d==mxConstants.DIRECTION_NORTH);else if(f.model.isEdge(c[b])){f.model.setTerminal(c[b],a,!0);var y=f.getCellGeometry(c[b]);y.points=null;if(null!=y.getTerminalPoint(!1))y.setTerminalPoint(e.getTerminalPoint(!1),!1);else if(t&&f.model.isVertex(n)){var x=
-f.view.getState(n),u=x.cell!=f.view.currentRoot?new mxPoint(x.x/f.view.scale-f.view.translate.x,x.y/f.view.scale-f.view.translate.y):new mxPoint(0,0);f.cellsMoved(c,u.x,u.y,null,null,!0)}}else m=f.getCellGeometry(c[b]),r=e.x-Math.round(m.x),w=e.y-Math.round(m.y),e.x=Math.round(m.x),e.y=Math.round(m.y),f.model.setGeometry(c[b],e),f.cellsMoved(c,r,w,null,null,!0),h=c.slice(),k=1==h.length?h[0]:null,c.push(f.insertEdge(null,null,"",a,c[b],f.createCurrentEdgeStyle()));null!=g&&mxEvent.isShiftDown(g)||
-f.fireEvent(new mxEventObject("cellsInserted","cells",c))}catch(C){this.editorUi.handleError(C)}finally{f.model.endUpdate()}f.editAfterInsert&&null!=g&&mxEvent.isMouseEvent(g)&&null!=k&&window.setTimeout(function(){f.startEditing(k)},0)}return h};
-Sidebar.prototype.getDropAndConnectGeometry=function(a,c,d,b){var g=this.editorUi.editor.graph,e=g.view,h=1<b.length,f=g.getCellGeometry(a);b=g.getCellGeometry(c);null!=f&&null!=b&&(b=b.clone(),g.model.isEdge(a)?(a=g.view.getState(a),f=a.absolutePoints,c=f[0],g=f[f.length-1],d==mxConstants.DIRECTION_NORTH?(b.x=c.x/e.scale-e.translate.x-b.width/2,b.y=c.y/e.scale-e.translate.y-b.height/2):(b.x=g.x/e.scale-e.translate.x-b.width/2,b.y=g.y/e.scale-e.translate.y-b.height/2)):(f.relative&&(a=g.view.getState(a),
-f=f.clone(),f.x=(a.x-e.translate.x)/e.scale,f.y=(a.y-e.translate.y)/e.scale),e=g.defaultEdgeLength,g.model.isEdge(c)&&null!=b.getTerminalPoint(!0)&&null!=b.getTerminalPoint(!1)?(c=b.getTerminalPoint(!0),g=b.getTerminalPoint(!1),e=g.x-c.x,c=g.y-c.y,e=Math.sqrt(e*e+c*c),b.x=f.getCenterX(),b.y=f.getCenterY(),b.width=1,b.height=1,d==mxConstants.DIRECTION_NORTH?(b.height=e,b.y=f.y-e,b.setTerminalPoint(new mxPoint(b.x,b.y),!1)):d==mxConstants.DIRECTION_EAST?(b.width=e,b.x=f.x+f.width,b.setTerminalPoint(new mxPoint(b.x+
-b.width,b.y),!1)):d==mxConstants.DIRECTION_SOUTH?(b.height=e,b.y=f.y+f.height,b.setTerminalPoint(new mxPoint(b.x,b.y+b.height),!1)):d==mxConstants.DIRECTION_WEST&&(b.width=e,b.x=f.x-e,b.setTerminalPoint(new mxPoint(b.x,b.y),!1))):(!h&&45<b.width&&45<b.height&&45<f.width&&45<f.height&&(b.width*=f.height/b.height,b.height=f.height),b.x=f.x+f.width/2-b.width/2,b.y=f.y+f.height/2-b.height/2,d==mxConstants.DIRECTION_NORTH?b.y=b.y-f.height/2-b.height/2-e:d==mxConstants.DIRECTION_EAST?b.x=b.x+f.width/2+
-b.width/2+e:d==mxConstants.DIRECTION_SOUTH?b.y=b.y+f.height/2+b.height/2+e:d==mxConstants.DIRECTION_WEST&&(b.x=b.x-f.width/2-b.width/2-e),g.model.isEdge(c)&&null!=b.getTerminalPoint(!0)&&null!=c.getTerminal(!1)&&(f=g.getCellGeometry(c.getTerminal(!1)),null!=f&&(d==mxConstants.DIRECTION_NORTH?(b.x-=f.getCenterX(),b.y-=f.getCenterY()+f.height/2):d==mxConstants.DIRECTION_EAST?(b.x-=f.getCenterX()-f.width/2,b.y-=f.getCenterY()):d==mxConstants.DIRECTION_SOUTH?(b.x-=f.getCenterX(),b.y-=f.getCenterY()-f.height/
-2):d==mxConstants.DIRECTION_WEST&&(b.x-=f.getCenterX()+f.width/2,b.y-=f.getCenterY()))))));return b};Sidebar.prototype.isDropStyleEnabled=function(a,c){var d=!0;if(null!=c&&1==a.length){var b=this.graph.getCellStyle(a[c]);null!=b&&(d=mxUtils.getValue(b,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(b,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE)!=mxConstants.NONE)}return d};Sidebar.prototype.isDropStyleTargetIgnored=function(a){return this.graph.isSwimlane(a.cell)};
-Sidebar.prototype.createDragSource=function(a,c,d,b,g){function e(a,b){var c;mxClient.IS_IE&&!mxClient.IS_SVG?(mxClient.IS_IE6&&"CSS1Compat"!=document.compatMode?(c=document.createElement(mxClient.VML_PREFIX+":image"),c.setAttribute("src",a.src),c.style.borderStyle="none"):(c=document.createElement("div"),c.style.backgroundImage="url("+a.src+")",c.style.backgroundPosition="center",c.style.backgroundRepeat="no-repeat"),c.style.width=a.width+4+"px",c.style.height=a.height+4+"px",c.style.display=mxClient.IS_QUIRKS?
-"inline":"inline-block"):(c=mxUtils.createImage(a.src),c.style.width=a.width+"px",c.style.height=a.height+"px");null!=b&&c.setAttribute("title",b);mxUtils.setOpacity(c,a==this.refreshTarget?30:20);c.style.position="absolute";c.style.cursor="crosshair";return c}function h(a,b,c,d){null!=d.parentNode&&(mxUtils.contains(c,a,b)?(mxUtils.setOpacity(d,100),E=d):mxUtils.setOpacity(d,d==A?30:20));return c}for(var f=this.editorUi,k=f.editor.graph,l=null,m=null,n=this,p=0;p<b.length&&(null==m&&this.editorUi.editor.graph.model.isVertex(b[p])?
-m=p:null==l&&this.editorUi.editor.graph.model.isEdge(b[p])&&null==this.editorUi.editor.graph.model.getTerminal(b[p],!0)&&(l=p),null==m||null==l);p++);var q=this.isDropStyleEnabled(b,m),u=mxUtils.makeDraggable(a,this.editorUi.editor.graph,mxUtils.bind(this,function(a,d,e,f,g){null!=this.updateThread&&window.clearTimeout(this.updateThread);if(null!=b&&null!=t&&E==A){var h=a.isCellSelected(t.cell)?a.getSelectionCells():[t.cell],h=this.updateShapes(a.model.isEdge(t.cell)?b[0]:b[m],h);a.setSelectionCells(h)}else null!=
+Sidebar.prototype.createThumb=function(a,c,d,b,f,e,h,g,k){this.graph.labelsVisible=null==e||e;e=mxClient.NO_FO;mxClient.NO_FO=Editor.prototype.originalNoForeignObject;this.graph.view.scaleAndTranslate(1,0,0);this.graph.addCells(a);a=this.graph.getGraphBounds();g=Math.floor(100*Math.min((c-2*this.thumbBorder)/a.width,(d-2*this.thumbBorder)/a.height))/100;this.graph.view.scaleAndTranslate(g,Math.floor((c-a.width*g)/2/g-a.x),Math.floor((d-a.height*g)/2/g-a.y));if(this.graph.dialect!=mxConstants.DIALECT_SVG||
+mxClient.NO_FO||null==this.graph.view.getCanvas().ownerSVGElement){if(g=this.graph.container.cloneNode(!1),g.innerHTML=this.graph.container.innerHTML,mxClient.IS_QUIRKS||8==document.documentMode)g.firstChild.style.overflow="visible"}else g=this.graph.view.getCanvas().ownerSVGElement.cloneNode(!0);this.graph.getModel().clear();mxClient.NO_FO=e;mxClient.IS_IE6&&(b.style.backgroundImage="url("+this.editorUi.editor.transparentImage+")");g.style.position="relative";g.style.overflow="hidden";g.style.left=
+this.thumbBorder+"px";g.style.top=this.thumbBorder+"px";g.style.width=c+"px";g.style.height=d+"px";g.style.visibility="";g.style.minWidth="";g.style.minHeight="";b.appendChild(g);this.sidebarTitles&&null!=f&&0!=h&&(b.style.height=this.thumbHeight+(mxClient.IS_QUIRKS?2*this.thumbPadding+2:0)+this.sidebarTitleSize+8+"px",c=document.createElement("div"),c.style.fontSize=this.sidebarTitleSize+"px",c.style.color="#303030",c.style.textAlign="center",c.style.whiteSpace="nowrap",mxClient.IS_IE&&(c.style.height=
+this.sidebarTitleSize+12+"px"),c.style.paddingTop="4px",mxUtils.write(c,f),b.appendChild(c));return a};
+Sidebar.prototype.createItem=function(a,c,d,b,f,e,h){var g=document.createElement("a");g.className="geItem";g.style.overflow="hidden";var k=mxClient.IS_QUIRKS?8+2*this.thumbPadding:2*this.thumbBorder;g.style.width=this.thumbWidth+k+"px";g.style.height=this.thumbHeight+k+"px";g.style.padding=this.thumbPadding+"px";mxClient.IS_IE6&&(g.style.border="none");mxEvent.addListener(g,"click",function(a){mxEvent.consume(a)});this.createThumb(a,this.thumbWidth,this.thumbHeight,g,c,d,b,f,e);var l=new mxRectangle(0,
+0,f,e);1<a.length||a[0].vertex?(b=this.createDragSource(g,this.createDropHandler(a,!0,h,l),this.createDragPreview(f,e),a,l),this.addClickHandler(g,b,a),b.isGuidesEnabled=mxUtils.bind(this,function(){return this.editorUi.editor.graph.graphHandler.guidesEnabled})):null!=a[0]&&a[0].edge&&(b=this.createDragSource(g,this.createDropHandler(a,!1,h,l),this.createDragPreview(f,e),a,l),this.addClickHandler(g,b,a));mxClient.IS_IOS||mxEvent.addGestureListeners(g,null,mxUtils.bind(this,function(b){mxEvent.isMouseEvent(b)&&
+this.showTooltip(g,a,l.width,l.height,c,d)}));return g};
+Sidebar.prototype.updateShapes=function(a,c){var d=this.editorUi.editor.graph,b=d.getCellStyle(a),f=[];d.model.beginUpdate();try{for(var e=d.getModel().getStyle(a),h="shadow dashed dashPattern fontFamily fontSize fontColor align startFill startSize endFill endSize strokeColor strokeWidth fillColor gradientColor html part noEdgeStyle edgeStyle elbow childLayout recursiveResize container collapsible connectable".split(" "),g=0;g<c.length;g++){var k=c[g];if(d.getModel().isVertex(k)==d.getModel().isVertex(a)||
+d.getModel().isEdge(k)==d.getModel().isEdge(a)){var l=d.getCurrentCellStyle(c[g]);d.getModel().setStyle(k,e);if("1"==mxUtils.getValue(l,"composite","0"))for(var m=d.model.getChildCount(k);0<=m;m--)d.model.remove(d.model.getChildAt(k,m));"umlLifeline"==l[mxConstants.STYLE_SHAPE]&&"umlLifeline"!=b[mxConstants.STYLE_SHAPE]&&(d.setCellStyles(mxConstants.STYLE_SHAPE,"umlLifeline",[k]),d.setCellStyles("participant",b[mxConstants.STYLE_SHAPE],[k]));for(m=0;m<h.length;m++){var n=l[h[m]];null!=n&&d.setCellStyles(h[m],
+n,[k])}f.push(k)}}}finally{d.model.endUpdate()}return f};
+Sidebar.prototype.createDropHandler=function(a,c,d,b){d=null!=d?d:!0;return mxUtils.bind(this,function(f,e,h,g,k,l){for(l=l?null:mxEvent.isTouchEvent(e)||mxEvent.isPenEvent(e)?document.elementFromPoint(mxEvent.getClientX(e),mxEvent.getClientY(e)):mxEvent.getSource(e);null!=l&&l!=this.container;)l=l.parentNode;if(null==l&&f.isEnabled()){a=f.getImportableCells(a);if(0<a.length){f.stopEditing();l=null==h||mxEvent.isAltDown(e)?!1:f.isValidDropTarget(h,a,e);var m=null;null==h||l||(h=null);if(!f.isCellLocked(h||
+f.getDefaultParent())){f.model.beginUpdate();try{g=Math.round(g);k=Math.round(k);if(c&&f.isSplitTarget(h,a,e)){var n=f.cloneCells(a);f.splitEdge(h,n,null,g-b.width/2,k-b.height/2);m=n}else 0<a.length&&(m=f.importCells(a,g,k,h));if(null!=f.layoutManager){var p=f.layoutManager.getLayout(h);if(null!=p){var q=f.view.scale,u=f.view.translate,v=(g+u.x)*q,r=(k+u.y)*q;for(h=0;h<m.length;h++)p.moveCell(m[h],v,r)}}!d||null!=e&&mxEvent.isShiftDown(e)||f.fireEvent(new mxEventObject("cellsInserted","cells",m))}catch(w){this.editorUi.handleError(w)}finally{f.model.endUpdate()}null!=
+m&&0<m.length&&(f.scrollCellToVisible(m[0]),f.setSelectionCells(m));f.editAfterInsert&&null!=e&&mxEvent.isMouseEvent(e)&&null!=m&&1==m.length&&window.setTimeout(function(){f.startEditing(m[0])},0)}}mxEvent.consume(e)}})};Sidebar.prototype.createDragPreview=function(a,c){var d=document.createElement("div");d.style.border=this.dragPreviewBorder;d.style.width=a+"px";d.style.height=c+"px";return d};
+Sidebar.prototype.dropAndConnect=function(a,c,d,b,f){var e=this.getDropAndConnectGeometry(a,c[b],d,c),h=[];if(null!=e){var g=this.editorUi.editor.graph,k=null;g.model.beginUpdate();try{var l=g.getCellGeometry(a),m=g.getCellGeometry(c[b]),n=g.model.getParent(a),p=!0;if(null!=g.layoutManager){var q=g.layoutManager.getLayout(n);if(null!=q&&q.constructor==mxStackLayout&&(p=!1,h=g.view.getState(n),null!=h)){var u=new mxPoint(h.x/g.view.scale-g.view.translate.x,h.y/g.view.scale-g.view.translate.y);e.x+=
+u.x;e.y+=u.y;var v=e.getTerminalPoint(!1);null!=v&&(v.x+=u.x,v.y+=u.y)}}var r=m.x,w=m.y;g.model.isEdge(c[b])&&(w=r=0);var t=g.model.isEdge(a)||null!=l&&!l.relative&&p,h=c=g.importCells(c,e.x-(t?r:0),e.y-(t?w:0),t?n:null);if(g.model.isEdge(a))g.model.setTerminal(a,c[b],d==mxConstants.DIRECTION_NORTH);else if(g.model.isEdge(c[b])){g.model.setTerminal(c[b],a,!0);var y=g.getCellGeometry(c[b]);y.points=null;if(null!=y.getTerminalPoint(!1))y.setTerminalPoint(e.getTerminalPoint(!1),!1);else if(t&&g.model.isVertex(n)){var x=
+g.view.getState(n),u=x.cell!=g.view.currentRoot?new mxPoint(x.x/g.view.scale-g.view.translate.x,x.y/g.view.scale-g.view.translate.y):new mxPoint(0,0);g.cellsMoved(c,u.x,u.y,null,null,!0)}}else m=g.getCellGeometry(c[b]),r=e.x-Math.round(m.x),w=e.y-Math.round(m.y),e.x=Math.round(m.x),e.y=Math.round(m.y),g.model.setGeometry(c[b],e),g.cellsMoved(c,r,w,null,null,!0),h=c.slice(),k=1==h.length?h[0]:null,c.push(g.insertEdge(null,null,"",a,c[b],g.createCurrentEdgeStyle()));null!=f&&mxEvent.isShiftDown(f)||
+g.fireEvent(new mxEventObject("cellsInserted","cells",c))}catch(C){this.editorUi.handleError(C)}finally{g.model.endUpdate()}g.editAfterInsert&&null!=f&&mxEvent.isMouseEvent(f)&&null!=k&&window.setTimeout(function(){g.startEditing(k)},0)}return h};
+Sidebar.prototype.getDropAndConnectGeometry=function(a,c,d,b){var f=this.editorUi.editor.graph,e=f.view,h=1<b.length,g=f.getCellGeometry(a);b=f.getCellGeometry(c);null!=g&&null!=b&&(b=b.clone(),f.model.isEdge(a)?(a=f.view.getState(a),g=a.absolutePoints,c=g[0],f=g[g.length-1],d==mxConstants.DIRECTION_NORTH?(b.x=c.x/e.scale-e.translate.x-b.width/2,b.y=c.y/e.scale-e.translate.y-b.height/2):(b.x=f.x/e.scale-e.translate.x-b.width/2,b.y=f.y/e.scale-e.translate.y-b.height/2)):(g.relative&&(a=f.view.getState(a),
+g=g.clone(),g.x=(a.x-e.translate.x)/e.scale,g.y=(a.y-e.translate.y)/e.scale),e=f.defaultEdgeLength,f.model.isEdge(c)&&null!=b.getTerminalPoint(!0)&&null!=b.getTerminalPoint(!1)?(c=b.getTerminalPoint(!0),f=b.getTerminalPoint(!1),e=f.x-c.x,c=f.y-c.y,e=Math.sqrt(e*e+c*c),b.x=g.getCenterX(),b.y=g.getCenterY(),b.width=1,b.height=1,d==mxConstants.DIRECTION_NORTH?(b.height=e,b.y=g.y-e,b.setTerminalPoint(new mxPoint(b.x,b.y),!1)):d==mxConstants.DIRECTION_EAST?(b.width=e,b.x=g.x+g.width,b.setTerminalPoint(new mxPoint(b.x+
+b.width,b.y),!1)):d==mxConstants.DIRECTION_SOUTH?(b.height=e,b.y=g.y+g.height,b.setTerminalPoint(new mxPoint(b.x,b.y+b.height),!1)):d==mxConstants.DIRECTION_WEST&&(b.width=e,b.x=g.x-e,b.setTerminalPoint(new mxPoint(b.x,b.y),!1))):(!h&&45<b.width&&45<b.height&&45<g.width&&45<g.height&&(b.width*=g.height/b.height,b.height=g.height),b.x=g.x+g.width/2-b.width/2,b.y=g.y+g.height/2-b.height/2,d==mxConstants.DIRECTION_NORTH?b.y=b.y-g.height/2-b.height/2-e:d==mxConstants.DIRECTION_EAST?b.x=b.x+g.width/2+
+b.width/2+e:d==mxConstants.DIRECTION_SOUTH?b.y=b.y+g.height/2+b.height/2+e:d==mxConstants.DIRECTION_WEST&&(b.x=b.x-g.width/2-b.width/2-e),f.model.isEdge(c)&&null!=b.getTerminalPoint(!0)&&null!=c.getTerminal(!1)&&(g=f.getCellGeometry(c.getTerminal(!1)),null!=g&&(d==mxConstants.DIRECTION_NORTH?(b.x-=g.getCenterX(),b.y-=g.getCenterY()+g.height/2):d==mxConstants.DIRECTION_EAST?(b.x-=g.getCenterX()-g.width/2,b.y-=g.getCenterY()):d==mxConstants.DIRECTION_SOUTH?(b.x-=g.getCenterX(),b.y-=g.getCenterY()-g.height/
+2):d==mxConstants.DIRECTION_WEST&&(b.x-=g.getCenterX()+g.width/2,b.y-=g.getCenterY()))))));return b};Sidebar.prototype.isDropStyleEnabled=function(a,c){var d=!0;if(null!=c&&1==a.length){var b=this.graph.getCellStyle(a[c]);null!=b&&(d=mxUtils.getValue(b,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(b,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE)!=mxConstants.NONE)}return d};Sidebar.prototype.isDropStyleTargetIgnored=function(a){return this.graph.isSwimlane(a.cell)};
+Sidebar.prototype.createDragSource=function(a,c,d,b,f){function e(a,b){var c;mxClient.IS_IE&&!mxClient.IS_SVG?(mxClient.IS_IE6&&"CSS1Compat"!=document.compatMode?(c=document.createElement(mxClient.VML_PREFIX+":image"),c.setAttribute("src",a.src),c.style.borderStyle="none"):(c=document.createElement("div"),c.style.backgroundImage="url("+a.src+")",c.style.backgroundPosition="center",c.style.backgroundRepeat="no-repeat"),c.style.width=a.width+4+"px",c.style.height=a.height+4+"px",c.style.display=mxClient.IS_QUIRKS?
+"inline":"inline-block"):(c=mxUtils.createImage(a.src),c.style.width=a.width+"px",c.style.height=a.height+"px");null!=b&&c.setAttribute("title",b);mxUtils.setOpacity(c,a==this.refreshTarget?30:20);c.style.position="absolute";c.style.cursor="crosshair";return c}function h(a,b,c,d){null!=d.parentNode&&(mxUtils.contains(c,a,b)?(mxUtils.setOpacity(d,100),E=d):mxUtils.setOpacity(d,d==A?30:20));return c}for(var g=this.editorUi,k=g.editor.graph,l=null,m=null,n=this,p=0;p<b.length&&(null==m&&this.editorUi.editor.graph.model.isVertex(b[p])?
+m=p:null==l&&this.editorUi.editor.graph.model.isEdge(b[p])&&null==this.editorUi.editor.graph.model.getTerminal(b[p],!0)&&(l=p),null==m||null==l);p++);var q=this.isDropStyleEnabled(b,m),u=mxUtils.makeDraggable(a,this.editorUi.editor.graph,mxUtils.bind(this,function(a,d,e,g,f){null!=this.updateThread&&window.clearTimeout(this.updateThread);if(null!=b&&null!=t&&E==A){var h=a.isCellSelected(t.cell)?a.getSelectionCells():[t.cell],h=this.updateShapes(a.model.isEdge(t.cell)?b[0]:b[m],h);a.setSelectionCells(h)}else null!=
b&&null!=E&&null!=r&&E!=A?(h=a.model.isEdge(r.cell)||null==l?m:l,a.setSelectionCells(this.dropAndConnect(r.cell,b,K,h,d))):c.apply(this,arguments);null!=this.editorUi.hoverIcons&&this.editorUi.hoverIcons.update(a.view.getState(a.getSelectionCell()))}),d,0,0,k.autoscroll,!0,!0);k.addListener(mxEvent.ESCAPE,function(a,b){u.isActive()&&u.reset()});var v=u.mouseDown;u.mouseDown=function(a){mxEvent.isPopupTrigger(a)||mxEvent.isMultiTouchEvent(a)||(k.stopEditing(),v.apply(this,arguments))};var r=null,w=
null,t=null,y=!1,x=e(this.triangleUp,mxResources.get("connect")),C=e(this.triangleRight,mxResources.get("connect")),B=e(this.triangleDown,mxResources.get("connect")),D=e(this.triangleLeft,mxResources.get("connect")),A=e(this.refreshTarget,mxResources.get("replace")),F=null,J=e(this.roundDrop),G=e(this.roundDrop),K=mxConstants.DIRECTION_NORTH,E=null,O=u.createPreviewElement;u.createPreviewElement=function(a){var b=O.apply(this,arguments);mxClient.IS_SVG&&(b.style.pointerEvents="none");this.previewElementWidth=
-b.style.width;this.previewElementHeight=b.style.height;return b};var Q=u.dragEnter;u.dragEnter=function(a,b){null!=f.hoverIcons&&f.hoverIcons.setDisplay("none");Q.apply(this,arguments)};var R=u.dragExit;u.dragExit=function(a,b){null!=f.hoverIcons&&f.hoverIcons.setDisplay("");R.apply(this,arguments)};u.dragOver=function(a,c){mxDragSource.prototype.dragOver.apply(this,arguments);null!=this.currentGuide&&null!=E&&this.currentGuide.hide();if(null!=this.previewElement){var d=a.view;if(null!=t&&E==A)this.previewElement.style.display=
-a.model.isEdge(t.cell)?"none":"",this.previewElement.style.left=t.x+"px",this.previewElement.style.top=t.y+"px",this.previewElement.style.width=t.width+"px",this.previewElement.style.height=t.height+"px";else if(null!=r&&null!=E){var e=a.model.isEdge(r.cell)||null==l?m:l,f=n.getDropAndConnectGeometry(r.cell,b[e],K,b),h=a.model.isEdge(r.cell)?null:a.getCellGeometry(r.cell),k=a.getCellGeometry(b[e]),p=a.model.getParent(r.cell),q=d.translate.x*d.scale,H=d.translate.y*d.scale;null!=h&&!h.relative&&a.model.isVertex(p)&&
-p!=d.currentRoot&&(H=d.getState(p),q=H.x,H=H.y);h=k.x;k=k.y;a.model.isEdge(b[e])&&(k=h=0);this.previewElement.style.left=(f.x-h)*d.scale+q+"px";this.previewElement.style.top=(f.y-k)*d.scale+H+"px";1==b.length&&(this.previewElement.style.width=f.width*d.scale+"px",this.previewElement.style.height=f.height*d.scale+"px");this.previewElement.style.display=""}else null!=u.currentHighlight.state&&a.model.isEdge(u.currentHighlight.state.cell)?(this.previewElement.style.left=Math.round(parseInt(this.previewElement.style.left)-
-g.width*d.scale/2)+"px",this.previewElement.style.top=Math.round(parseInt(this.previewElement.style.top)-g.height*d.scale/2)+"px"):(this.previewElement.style.width=this.previewElementWidth,this.previewElement.style.height=this.previewElementHeight,this.previewElement.style.display="")}};var L=(new Date).getTime(),I=0,M=null,ba=this.editorUi.editor.graph.getCellStyle(b[0]);u.getDropTarget=mxUtils.bind(this,function(a,c,d,e){var f=mxEvent.isAltDown(e)||null==b?null:a.getCellAt(c,d);if(null!=f&&!this.graph.isCellConnectable(f)){var g=
-this.graph.getModel().getParent(f);this.graph.getModel().isVertex(g)&&this.graph.isCellConnectable(g)&&(f=g)}a.isCellLocked(f)&&(f=null);var k=a.view.getState(f),g=E=null;M!=k?(M=k,L=(new Date).getTime(),I=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=k&&(this.updateThread=window.setTimeout(function(){null==E&&(M=k,u.getDropTarget(a,c,d,e))},this.dropTargetDelay+10))):I=(new Date).getTime()-L;if(q&&2500>I&&null!=k&&!mxEvent.isShiftDown(e)&&(mxUtils.getValue(k.style,mxConstants.STYLE_SHAPE)!=
+b.style.width;this.previewElementHeight=b.style.height;return b};var Q=u.dragEnter;u.dragEnter=function(a,b){null!=g.hoverIcons&&g.hoverIcons.setDisplay("none");Q.apply(this,arguments)};var R=u.dragExit;u.dragExit=function(a,b){null!=g.hoverIcons&&g.hoverIcons.setDisplay("");R.apply(this,arguments)};u.dragOver=function(a,c){mxDragSource.prototype.dragOver.apply(this,arguments);null!=this.currentGuide&&null!=E&&this.currentGuide.hide();if(null!=this.previewElement){var d=a.view;if(null!=t&&E==A)this.previewElement.style.display=
+a.model.isEdge(t.cell)?"none":"",this.previewElement.style.left=t.x+"px",this.previewElement.style.top=t.y+"px",this.previewElement.style.width=t.width+"px",this.previewElement.style.height=t.height+"px";else if(null!=r&&null!=E){var e=a.model.isEdge(r.cell)||null==l?m:l,g=n.getDropAndConnectGeometry(r.cell,b[e],K,b),h=a.model.isEdge(r.cell)?null:a.getCellGeometry(r.cell),k=a.getCellGeometry(b[e]),p=a.model.getParent(r.cell),q=d.translate.x*d.scale,H=d.translate.y*d.scale;null!=h&&!h.relative&&a.model.isVertex(p)&&
+p!=d.currentRoot&&(H=d.getState(p),q=H.x,H=H.y);h=k.x;k=k.y;a.model.isEdge(b[e])&&(k=h=0);this.previewElement.style.left=(g.x-h)*d.scale+q+"px";this.previewElement.style.top=(g.y-k)*d.scale+H+"px";1==b.length&&(this.previewElement.style.width=g.width*d.scale+"px",this.previewElement.style.height=g.height*d.scale+"px");this.previewElement.style.display=""}else null!=u.currentHighlight.state&&a.model.isEdge(u.currentHighlight.state.cell)?(this.previewElement.style.left=Math.round(parseInt(this.previewElement.style.left)-
+f.width*d.scale/2)+"px",this.previewElement.style.top=Math.round(parseInt(this.previewElement.style.top)-f.height*d.scale/2)+"px"):(this.previewElement.style.width=this.previewElementWidth,this.previewElement.style.height=this.previewElementHeight,this.previewElement.style.display="")}};var L=(new Date).getTime(),I=0,M=null,ba=this.editorUi.editor.graph.getCellStyle(b[0]);u.getDropTarget=mxUtils.bind(this,function(a,c,d,e){var g=mxEvent.isAltDown(e)||null==b?null:a.getCellAt(c,d);if(null!=g&&!this.graph.isCellConnectable(g)){var f=
+this.graph.getModel().getParent(g);this.graph.getModel().isVertex(f)&&this.graph.isCellConnectable(f)&&(g=f)}a.isCellLocked(g)&&(g=null);var k=a.view.getState(g),f=E=null;M!=k?(M=k,L=(new Date).getTime(),I=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=k&&(this.updateThread=window.setTimeout(function(){null==E&&(M=k,u.getDropTarget(a,c,d,e))},this.dropTargetDelay+10))):I=(new Date).getTime()-L;if(q&&2500>I&&null!=k&&!mxEvent.isShiftDown(e)&&(mxUtils.getValue(k.style,mxConstants.STYLE_SHAPE)!=
mxUtils.getValue(ba,mxConstants.STYLE_SHAPE)&&(mxUtils.getValue(k.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(k.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(k.style,mxConstants.STYLE_GRADIENTCOLOR,mxConstants.NONE)!=mxConstants.NONE)||"image"==mxUtils.getValue(ba,mxConstants.STYLE_SHAPE)||1500<I||a.model.isEdge(k.cell))&&I>this.dropTargetDelay&&!this.isDropStyleTargetIgnored(k)&&(a.model.isVertex(k.cell)&&null!=
m||a.model.isEdge(k.cell)&&a.model.isEdge(b[0]))){t=k;var l=a.model.isEdge(k.cell)?a.view.getPoint(k):new mxPoint(k.getCenterX(),k.getCenterY()),l=new mxRectangle(l.x-this.refreshTarget.width/2,l.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height);A.style.left=Math.floor(l.x)+"px";A.style.top=Math.floor(l.y)+"px";null==F&&(a.container.appendChild(A),F=A.parentNode);h(c,d,l,A)}else null==t||!mxUtils.contains(t,c,d)||1500<I&&!mxEvent.isShiftDown(e)?(t=null,null!=F&&(A.parentNode.removeChild(A),
-F=null)):null!=t&&null!=F&&(l=a.model.isEdge(t.cell)?a.view.getPoint(t):new mxPoint(t.getCenterX(),t.getCenterY()),l=new mxRectangle(l.x-this.refreshTarget.width/2,l.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height),h(c,d,l,A));if(y&&null!=r&&!mxEvent.isAltDown(e)&&null==E){g=mxRectangle.fromRectangle(r);if(a.model.isEdge(r.cell)){var n=r.absolutePoints;null!=J.parentNode&&(l=n[0],g.add(h(c,d,new mxRectangle(l.x-this.roundDrop.width/2,l.y-this.roundDrop.height/2,this.roundDrop.width,
-this.roundDrop.height),J)));null!=G.parentNode&&(n=n[n.length-1],g.add(h(c,d,new mxRectangle(n.x-this.roundDrop.width/2,n.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),G)))}else l=mxRectangle.fromRectangle(r),null!=r.shape&&null!=r.shape.boundingBox&&(l=mxRectangle.fromRectangle(r.shape.boundingBox)),l.grow(this.graph.tolerance),l.grow(HoverIcons.prototype.arrowSpacing),n=this.graph.selectionCellsHandler.getHandler(r.cell),null!=n&&(l.x-=n.horizontalOffset/2,l.y-=n.verticalOffset/
-2,l.width+=n.horizontalOffset,l.height+=n.verticalOffset,null!=n.rotationShape&&null!=n.rotationShape.node&&"hidden"!=n.rotationShape.node.style.visibility&&"none"!=n.rotationShape.node.style.display&&null!=n.rotationShape.boundingBox&&l.add(n.rotationShape.boundingBox)),g.add(h(c,d,new mxRectangle(r.getCenterX()-this.triangleUp.width/2,l.y-this.triangleUp.height,this.triangleUp.width,this.triangleUp.height),x)),g.add(h(c,d,new mxRectangle(l.x+l.width,r.getCenterY()-this.triangleRight.height/2,this.triangleRight.width,
-this.triangleRight.height),C)),g.add(h(c,d,new mxRectangle(r.getCenterX()-this.triangleDown.width/2,l.y+l.height,this.triangleDown.width,this.triangleDown.height),B)),g.add(h(c,d,new mxRectangle(l.x-this.triangleLeft.width,r.getCenterY()-this.triangleLeft.height/2,this.triangleLeft.width,this.triangleLeft.height),D));null!=g&&g.grow(10)}K=mxConstants.DIRECTION_NORTH;E==C?K=mxConstants.DIRECTION_EAST:E==B||E==G?K=mxConstants.DIRECTION_SOUTH:E==D&&(K=mxConstants.DIRECTION_WEST);null!=t&&E==A&&(k=t);
-l=(null==m||a.isCellConnectable(b[m]))&&(a.model.isEdge(f)&&null!=m||a.model.isVertex(f)&&a.isCellConnectable(f));if(null!=r&&5E3<=I||r!=k&&(null==g||!mxUtils.contains(g,c,d)||500<I&&null==E&&l))if(y=!1,r=5E3>I&&I>this.dropTargetDelay||a.model.isEdge(f)?k:null,null!=r&&l){g=[J,G,x,C,B,D];for(l=0;l<g.length;l++)null!=g[l].parentNode&&g[l].parentNode.removeChild(g[l]);a.model.isEdge(f)?(n=k.absolutePoints,null!=n&&(l=n[0],n=n[n.length-1],g=a.tolerance,new mxRectangle(c-g,d-g,2*g,2*g),J.style.left=Math.floor(l.x-
-this.roundDrop.width/2)+"px",J.style.top=Math.floor(l.y-this.roundDrop.height/2)+"px",G.style.left=Math.floor(n.x-this.roundDrop.width/2)+"px",G.style.top=Math.floor(n.y-this.roundDrop.height/2)+"px",null==a.model.getTerminal(f,!0)&&a.container.appendChild(J),null==a.model.getTerminal(f,!1)&&a.container.appendChild(G))):(l=mxRectangle.fromRectangle(k),null!=k.shape&&null!=k.shape.boundingBox&&(l=mxRectangle.fromRectangle(k.shape.boundingBox)),l.grow(this.graph.tolerance),l.grow(HoverIcons.prototype.arrowSpacing),
+F=null)):null!=t&&null!=F&&(l=a.model.isEdge(t.cell)?a.view.getPoint(t):new mxPoint(t.getCenterX(),t.getCenterY()),l=new mxRectangle(l.x-this.refreshTarget.width/2,l.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height),h(c,d,l,A));if(y&&null!=r&&!mxEvent.isAltDown(e)&&null==E){f=mxRectangle.fromRectangle(r);if(a.model.isEdge(r.cell)){var n=r.absolutePoints;null!=J.parentNode&&(l=n[0],f.add(h(c,d,new mxRectangle(l.x-this.roundDrop.width/2,l.y-this.roundDrop.height/2,this.roundDrop.width,
+this.roundDrop.height),J)));null!=G.parentNode&&(n=n[n.length-1],f.add(h(c,d,new mxRectangle(n.x-this.roundDrop.width/2,n.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),G)))}else l=mxRectangle.fromRectangle(r),null!=r.shape&&null!=r.shape.boundingBox&&(l=mxRectangle.fromRectangle(r.shape.boundingBox)),l.grow(this.graph.tolerance),l.grow(HoverIcons.prototype.arrowSpacing),n=this.graph.selectionCellsHandler.getHandler(r.cell),null!=n&&(l.x-=n.horizontalOffset/2,l.y-=n.verticalOffset/
+2,l.width+=n.horizontalOffset,l.height+=n.verticalOffset,null!=n.rotationShape&&null!=n.rotationShape.node&&"hidden"!=n.rotationShape.node.style.visibility&&"none"!=n.rotationShape.node.style.display&&null!=n.rotationShape.boundingBox&&l.add(n.rotationShape.boundingBox)),f.add(h(c,d,new mxRectangle(r.getCenterX()-this.triangleUp.width/2,l.y-this.triangleUp.height,this.triangleUp.width,this.triangleUp.height),x)),f.add(h(c,d,new mxRectangle(l.x+l.width,r.getCenterY()-this.triangleRight.height/2,this.triangleRight.width,
+this.triangleRight.height),C)),f.add(h(c,d,new mxRectangle(r.getCenterX()-this.triangleDown.width/2,l.y+l.height,this.triangleDown.width,this.triangleDown.height),B)),f.add(h(c,d,new mxRectangle(l.x-this.triangleLeft.width,r.getCenterY()-this.triangleLeft.height/2,this.triangleLeft.width,this.triangleLeft.height),D));null!=f&&f.grow(10)}K=mxConstants.DIRECTION_NORTH;E==C?K=mxConstants.DIRECTION_EAST:E==B||E==G?K=mxConstants.DIRECTION_SOUTH:E==D&&(K=mxConstants.DIRECTION_WEST);null!=t&&E==A&&(k=t);
+l=(null==m||a.isCellConnectable(b[m]))&&(a.model.isEdge(g)&&null!=m||a.model.isVertex(g)&&a.isCellConnectable(g));if(null!=r&&5E3<=I||r!=k&&(null==f||!mxUtils.contains(f,c,d)||500<I&&null==E&&l))if(y=!1,r=5E3>I&&I>this.dropTargetDelay||a.model.isEdge(g)?k:null,null!=r&&l){f=[J,G,x,C,B,D];for(l=0;l<f.length;l++)null!=f[l].parentNode&&f[l].parentNode.removeChild(f[l]);a.model.isEdge(g)?(n=k.absolutePoints,null!=n&&(l=n[0],n=n[n.length-1],f=a.tolerance,new mxRectangle(c-f,d-f,2*f,2*f),J.style.left=Math.floor(l.x-
+this.roundDrop.width/2)+"px",J.style.top=Math.floor(l.y-this.roundDrop.height/2)+"px",G.style.left=Math.floor(n.x-this.roundDrop.width/2)+"px",G.style.top=Math.floor(n.y-this.roundDrop.height/2)+"px",null==a.model.getTerminal(g,!0)&&a.container.appendChild(J),null==a.model.getTerminal(g,!1)&&a.container.appendChild(G))):(l=mxRectangle.fromRectangle(k),null!=k.shape&&null!=k.shape.boundingBox&&(l=mxRectangle.fromRectangle(k.shape.boundingBox)),l.grow(this.graph.tolerance),l.grow(HoverIcons.prototype.arrowSpacing),
n=this.graph.selectionCellsHandler.getHandler(k.cell),null!=n&&(l.x-=n.horizontalOffset/2,l.y-=n.verticalOffset/2,l.width+=n.horizontalOffset,l.height+=n.verticalOffset,null!=n.rotationShape&&null!=n.rotationShape.node&&"hidden"!=n.rotationShape.node.style.visibility&&"none"!=n.rotationShape.node.style.display&&null!=n.rotationShape.boundingBox&&l.add(n.rotationShape.boundingBox)),x.style.left=Math.floor(k.getCenterX()-this.triangleUp.width/2)+"px",x.style.top=Math.floor(l.y-this.triangleUp.height)+
"px",C.style.left=Math.floor(l.x+l.width)+"px",C.style.top=Math.floor(k.getCenterY()-this.triangleRight.height/2)+"px",B.style.left=x.style.left,B.style.top=Math.floor(l.y+l.height)+"px",D.style.left=Math.floor(l.x-this.triangleLeft.width)+"px",D.style.top=C.style.top,"eastwest"!=k.style.portConstraint&&(a.container.appendChild(x),a.container.appendChild(B)),a.container.appendChild(C),a.container.appendChild(D));null!=k&&(w=a.selectionCellsHandler.getHandler(k.cell),null!=w&&null!=w.setHandlesVisible&&
-w.setHandlesVisible(!1));y=!0}else for(g=[J,G,x,C,B,D],l=0;l<g.length;l++)null!=g[l].parentNode&&g[l].parentNode.removeChild(g[l]);y||null==w||w.setHandlesVisible(!0);f=mxEvent.isAltDown(e)&&!mxEvent.isShiftDown(e)||null!=t&&E==A?null:mxDragSource.prototype.getDropTarget.apply(this,arguments);g=a.getModel();if(null!=f&&(null!=E||!a.isSplitTarget(f,b,e))){for(;null!=f&&!a.isValidDropTarget(f,b,e)&&g.isVertex(g.getParent(f));)f=g.getParent(f);null!=f&&(a.view.currentRoot==f||!a.isValidRoot(f)&&0==a.getModel().getChildCount(f)||
-a.isCellLocked(f)||g.isEdge(f)||!a.isValidDropTarget(f,b,e))&&(f=null)}return f});u.stopDrag=function(){mxDragSource.prototype.stopDrag.apply(this,arguments);for(var a=[J,G,A,x,C,B,D],b=0;b<a.length;b++)null!=a[b].parentNode&&a[b].parentNode.removeChild(a[b]);null!=r&&null!=w&&w.reset();E=F=t=r=w=null};return u};
-Sidebar.prototype.itemClicked=function(a,c,d,b){b=this.editorUi.editor.graph;b.container.focus();if(mxEvent.isAltDown(d)&&1==b.getSelectionCount()&&b.model.isVertex(b.getSelectionCell())){c=null;for(var g=0;g<a.length&&null==c;g++)b.model.isVertex(a[g])&&(c=g);null!=c&&(b.setSelectionCells(this.dropAndConnect(b.getSelectionCell(),a,mxEvent.isMetaDown(d)||mxEvent.isControlDown(d)?mxEvent.isShiftDown(d)?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH:mxEvent.isShiftDown(d)?mxConstants.DIRECTION_EAST:
+w.setHandlesVisible(!1));y=!0}else for(f=[J,G,x,C,B,D],l=0;l<f.length;l++)null!=f[l].parentNode&&f[l].parentNode.removeChild(f[l]);y||null==w||w.setHandlesVisible(!0);g=mxEvent.isAltDown(e)&&!mxEvent.isShiftDown(e)||null!=t&&E==A?null:mxDragSource.prototype.getDropTarget.apply(this,arguments);f=a.getModel();if(null!=g&&(null!=E||!a.isSplitTarget(g,b,e))){for(;null!=g&&!a.isValidDropTarget(g,b,e)&&f.isVertex(f.getParent(g));)g=f.getParent(g);null!=g&&(a.view.currentRoot==g||!a.isValidRoot(g)&&0==a.getModel().getChildCount(g)||
+a.isCellLocked(g)||f.isEdge(g)||!a.isValidDropTarget(g,b,e))&&(g=null)}return g});u.stopDrag=function(){mxDragSource.prototype.stopDrag.apply(this,arguments);for(var a=[J,G,A,x,C,B,D],b=0;b<a.length;b++)null!=a[b].parentNode&&a[b].parentNode.removeChild(a[b]);null!=r&&null!=w&&w.reset();E=F=t=r=w=null};return u};
+Sidebar.prototype.itemClicked=function(a,c,d,b){b=this.editorUi.editor.graph;b.container.focus();if(mxEvent.isAltDown(d)&&1==b.getSelectionCount()&&b.model.isVertex(b.getSelectionCell())){c=null;for(var f=0;f<a.length&&null==c;f++)b.model.isVertex(a[f])&&(c=f);null!=c&&(b.setSelectionCells(this.dropAndConnect(b.getSelectionCell(),a,mxEvent.isMetaDown(d)||mxEvent.isControlDown(d)?mxEvent.isShiftDown(d)?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH:mxEvent.isShiftDown(d)?mxConstants.DIRECTION_EAST:
mxConstants.DIRECTION_SOUTH,c,d)),b.scrollCellToVisible(b.getSelectionCell()))}else mxEvent.isShiftDown(d)&&!b.isSelectionEmpty()?(this.updateShapes(a[0],b.getSelectionCells()),b.scrollCellToVisible(b.getSelectionCell())):(a=mxEvent.isAltDown(d)?b.getFreeInsertPoint():b.getCenterInsertPoint(b.getBoundingBoxFromGeometry(a,!0)),c.drop(b,d,null,a.x,a.y,!0))};
-Sidebar.prototype.addClickHandler=function(a,c,d){var b=c.mouseDown,g=c.mouseMove,e=c.mouseUp,h=this.editorUi.editor.graph.tolerance,f=null,k=this;c.mouseDown=function(c){b.apply(this,arguments);f=new mxPoint(mxEvent.getClientX(c),mxEvent.getClientY(c));null!=this.dragElement&&(this.dragElement.style.display="none",mxUtils.setOpacity(a,50))};c.mouseMove=function(b){null!=this.dragElement&&"none"==this.dragElement.style.display&&null!=f&&(Math.abs(f.x-mxEvent.getClientX(b))>h||Math.abs(f.y-mxEvent.getClientY(b))>
-h)&&(this.dragElement.style.display="",mxUtils.setOpacity(a,100));g.apply(this,arguments)};c.mouseUp=function(b){try{mxEvent.isPopupTrigger(b)||null!=this.currentGraph||null==this.dragElement||"none"!=this.dragElement.style.display||k.itemClicked(d,c,b,a),e.apply(c,arguments),mxUtils.setOpacity(a,100),f=null,k.currentElt=a}catch(m){c.reset(),k.editorUi.handleError(m)}}};
-Sidebar.prototype.createVertexTemplateEntry=function(a,c,d,b,g,e,h,f){f=null!=f&&0<f.length?f:null!=g?g.toLowerCase():"";return this.addEntry(f,mxUtils.bind(this,function(){return this.createVertexTemplate(a,c,d,b,g,e,h)}))};Sidebar.prototype.createVertexTemplate=function(a,c,d,b,g,e,h,f){a=[new mxCell(null!=b?b:"",new mxGeometry(0,0,c,d),a)];a[0].vertex=!0;return this.createVertexTemplateFromCells(a,c,d,g,e,h,f)};
-Sidebar.prototype.createVertexTemplateFromData=function(a,c,d,b,g,e,h){a=mxUtils.parseXml(Graph.decompress(a));var f=new mxCodec(a),k=new mxGraphModel;f.decode(a.documentElement,k);a=this.graph.cloneCells(k.root.getChildAt(0).children);return this.createVertexTemplateFromCells(a,c,d,b,g,e,h)};Sidebar.prototype.createVertexTemplateFromCells=function(a,c,d,b,g,e,h){return this.createItem(a,b,g,e,c,d,h)};
-Sidebar.prototype.createEdgeTemplateEntry=function(a,c,d,b,g,e,h,f){h=null!=h&&0<h.length?h:g.toLowerCase();return this.addEntry(h,mxUtils.bind(this,function(){return this.createEdgeTemplate(a,c,d,b,g,e,f)}))};
-Sidebar.prototype.createEdgeTemplate=function(a,c,d,b,g,e,h){a=new mxCell(null!=b?b:"",new mxGeometry(0,0,c,d),a);a.geometry.setTerminalPoint(new mxPoint(0,d),!0);a.geometry.setTerminalPoint(new mxPoint(c,0),!1);a.geometry.relative=!0;a.edge=!0;return this.createEdgeTemplateFromCells([a],c,d,g,e,h)};Sidebar.prototype.createEdgeTemplateFromCells=function(a,c,d,b,g,e){return this.createItem(a,b,g,!0,c,d,e)};
+Sidebar.prototype.addClickHandler=function(a,c,d){var b=c.mouseDown,f=c.mouseMove,e=c.mouseUp,h=this.editorUi.editor.graph.tolerance,g=null,k=this;c.mouseDown=function(c){b.apply(this,arguments);g=new mxPoint(mxEvent.getClientX(c),mxEvent.getClientY(c));null!=this.dragElement&&(this.dragElement.style.display="none",mxUtils.setOpacity(a,50))};c.mouseMove=function(b){null!=this.dragElement&&"none"==this.dragElement.style.display&&null!=g&&(Math.abs(g.x-mxEvent.getClientX(b))>h||Math.abs(g.y-mxEvent.getClientY(b))>
+h)&&(this.dragElement.style.display="",mxUtils.setOpacity(a,100));f.apply(this,arguments)};c.mouseUp=function(b){try{mxEvent.isPopupTrigger(b)||null!=this.currentGraph||null==this.dragElement||"none"!=this.dragElement.style.display||k.itemClicked(d,c,b,a),e.apply(c,arguments),mxUtils.setOpacity(a,100),g=null,k.currentElt=a}catch(m){c.reset(),k.editorUi.handleError(m)}}};
+Sidebar.prototype.createVertexTemplateEntry=function(a,c,d,b,f,e,h,g){g=null!=g&&0<g.length?g:null!=f?f.toLowerCase():"";return this.addEntry(g,mxUtils.bind(this,function(){return this.createVertexTemplate(a,c,d,b,f,e,h)}))};Sidebar.prototype.createVertexTemplate=function(a,c,d,b,f,e,h,g){a=[new mxCell(null!=b?b:"",new mxGeometry(0,0,c,d),a)];a[0].vertex=!0;return this.createVertexTemplateFromCells(a,c,d,f,e,h,g)};
+Sidebar.prototype.createVertexTemplateFromData=function(a,c,d,b,f,e,h){a=mxUtils.parseXml(Graph.decompress(a));var g=new mxCodec(a),k=new mxGraphModel;g.decode(a.documentElement,k);a=this.graph.cloneCells(k.root.getChildAt(0).children);return this.createVertexTemplateFromCells(a,c,d,b,f,e,h)};Sidebar.prototype.createVertexTemplateFromCells=function(a,c,d,b,f,e,h){return this.createItem(a,b,f,e,c,d,h)};
+Sidebar.prototype.createEdgeTemplateEntry=function(a,c,d,b,f,e,h,g){h=null!=h&&0<h.length?h:f.toLowerCase();return this.addEntry(h,mxUtils.bind(this,function(){return this.createEdgeTemplate(a,c,d,b,f,e,g)}))};
+Sidebar.prototype.createEdgeTemplate=function(a,c,d,b,f,e,h){a=new mxCell(null!=b?b:"",new mxGeometry(0,0,c,d),a);a.geometry.setTerminalPoint(new mxPoint(0,d),!0);a.geometry.setTerminalPoint(new mxPoint(c,0),!1);a.geometry.relative=!0;a.edge=!0;return this.createEdgeTemplateFromCells([a],c,d,f,e,h)};Sidebar.prototype.createEdgeTemplateFromCells=function(a,c,d,b,f,e){return this.createItem(a,b,f,!0,c,d,e)};
Sidebar.prototype.addPaletteFunctions=function(a,c,d,b){this.addPalette(a,c,d,mxUtils.bind(this,function(a){for(var c=0;c<b.length;c++)a.appendChild(b[c](a))}))};
-Sidebar.prototype.addPalette=function(a,c,d,b){c=this.createTitle(c);this.container.appendChild(c);var g=document.createElement("div");g.className="geSidebar";mxClient.IS_POINTER&&(g.style.touchAction="none");d?(b(g),b=null):g.style.display="none";this.addFoldingHandler(c,g,b);d=document.createElement("div");d.appendChild(g);this.container.appendChild(d);null!=a&&(this.palettes[a]=[c,d]);return g};
-Sidebar.prototype.addFoldingHandler=function(a,c,d){var b=!1;if(!mxClient.IS_IE||8<=document.documentMode)a.style.backgroundImage="none"==c.style.display?"url('"+this.collapsedImage+"')":"url('"+this.expandedImage+"')";a.style.backgroundRepeat="no-repeat";a.style.backgroundPosition="0% 50%";mxEvent.addListener(a,"click",mxUtils.bind(this,function(g){if("none"==c.style.display){if(b)c.style.display="block";else if(b=!0,null!=d){a.style.cursor="wait";var e=a.innerHTML;a.innerHTML=mxResources.get("loading")+
-"...";window.setTimeout(function(){c.style.display="block";a.style.cursor="";a.innerHTML=e;var b=mxClient.NO_FO;mxClient.NO_FO=Editor.prototype.originalNoForeignObject;d(c,a);mxClient.NO_FO=b},mxClient.IS_FF?20:0)}else c.style.display="block";a.style.backgroundImage="url('"+this.expandedImage+"')"}else a.style.backgroundImage="url('"+this.collapsedImage+"')",c.style.display="none";mxEvent.consume(g)}));mxClient.IS_QUIRKS||mxEvent.addListener(a,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,
+Sidebar.prototype.addPalette=function(a,c,d,b){c=this.createTitle(c);this.container.appendChild(c);var f=document.createElement("div");f.className="geSidebar";mxClient.IS_POINTER&&(f.style.touchAction="none");d?(b(f),b=null):f.style.display="none";this.addFoldingHandler(c,f,b);d=document.createElement("div");d.appendChild(f);this.container.appendChild(d);null!=a&&(this.palettes[a]=[c,d]);return f};
+Sidebar.prototype.addFoldingHandler=function(a,c,d){var b=!1;if(!mxClient.IS_IE||8<=document.documentMode)a.style.backgroundImage="none"==c.style.display?"url('"+this.collapsedImage+"')":"url('"+this.expandedImage+"')";a.style.backgroundRepeat="no-repeat";a.style.backgroundPosition="0% 50%";mxEvent.addListener(a,"click",mxUtils.bind(this,function(f){if("none"==c.style.display){if(b)c.style.display="block";else if(b=!0,null!=d){a.style.cursor="wait";var e=a.innerHTML;a.innerHTML=mxResources.get("loading")+
+"...";window.setTimeout(function(){c.style.display="block";a.style.cursor="";a.innerHTML=e;var b=mxClient.NO_FO;mxClient.NO_FO=Editor.prototype.originalNoForeignObject;d(c,a);mxClient.NO_FO=b},mxClient.IS_FF?20:0)}else c.style.display="block";a.style.backgroundImage="url('"+this.expandedImage+"')"}else a.style.backgroundImage="url('"+this.collapsedImage+"')",c.style.display="none";mxEvent.consume(f)}));mxClient.IS_QUIRKS||mxEvent.addListener(a,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,
function(a){a.preventDefault()}))};Sidebar.prototype.removePalette=function(a){var c=this.palettes[a];if(null!=c){this.palettes[a]=null;for(a=0;a<c.length;a++)this.container.removeChild(c[a]);return!0}return!1};
-Sidebar.prototype.addImagePalette=function(a,c,d,b,g,e,h){for(var f=[],k=0;k<g.length;k++)mxUtils.bind(this,function(a,c,e){if(null==e){e=a.lastIndexOf("/");var g=a.lastIndexOf(".");e=a.substring(0<=e?e+1:0,0<=g?g:a.length).replace(/[-_]/g," ")}f.push(this.createVertexTemplateEntry("image;html=1;labelBackgroundColor=#ffffff;image="+d+a+b,this.defaultImageWidth,this.defaultImageHeight,"",c,null!=c,null,this.filterTags(e)))})(g[k],null!=e?e[k]:null,null!=h?h[g[k]]:null);this.addPaletteFunctions(a,c,
-!1,f)};Sidebar.prototype.getTagsForStencil=function(a,c,d){a=a.split(".");for(var b=1;b<a.length;b++)a[b]=a[b].replace(/_/g," ");a.push(c.replace(/_/g," "));null!=d&&a.push(d);return a.slice(1,a.length)};
-Sidebar.prototype.addStencilPalette=function(a,c,d,b,g,e,h,f,k){h=null!=h?h:1;if(this.addStencilsToIndex){var l=[];if(null!=k)for(var m=0;m<k.length;m++)l.push(k[m]);mxStencilRegistry.loadStencilSet(d,mxUtils.bind(this,function(a,c,d,e,k){if(null==g||0>mxUtils.indexOf(g,c)){d=this.getTagsForStencil(a,c);var m=null!=f?f[c]:null;null!=m&&d.push(m);l.push(this.createVertexTemplateEntry("shape="+a+c.toLowerCase()+b,Math.round(e*h),Math.round(k*h),"",c.replace(/_/g," "),null,null,this.filterTags(d.join(" "))))}}),
-!0,!0);this.addPaletteFunctions(a,c,!1,l)}else this.addPalette(a,c,!1,mxUtils.bind(this,function(a){null==b&&(b="");null!=e&&e.call(this,a);if(null!=k)for(var c=0;c<k.length;c++)k[c](a);mxStencilRegistry.loadStencilSet(d,mxUtils.bind(this,function(c,d,e,f,k){(null==g||0>mxUtils.indexOf(g,d))&&a.appendChild(this.createVertexTemplate("shape="+c+d.toLowerCase()+b,Math.round(f*h),Math.round(k*h),"",d.replace(/_/g," "),!0))}),!0)}))};
+Sidebar.prototype.addImagePalette=function(a,c,d,b,f,e,h){for(var g=[],k=0;k<f.length;k++)mxUtils.bind(this,function(a,c,e){if(null==e){e=a.lastIndexOf("/");var f=a.lastIndexOf(".");e=a.substring(0<=e?e+1:0,0<=f?f:a.length).replace(/[-_]/g," ")}g.push(this.createVertexTemplateEntry("image;html=1;labelBackgroundColor=#ffffff;image="+d+a+b,this.defaultImageWidth,this.defaultImageHeight,"",c,null!=c,null,this.filterTags(e)))})(f[k],null!=e?e[k]:null,null!=h?h[f[k]]:null);this.addPaletteFunctions(a,c,
+!1,g)};Sidebar.prototype.getTagsForStencil=function(a,c,d){a=a.split(".");for(var b=1;b<a.length;b++)a[b]=a[b].replace(/_/g," ");a.push(c.replace(/_/g," "));null!=d&&a.push(d);return a.slice(1,a.length)};
+Sidebar.prototype.addStencilPalette=function(a,c,d,b,f,e,h,g,k){h=null!=h?h:1;if(this.addStencilsToIndex){var l=[];if(null!=k)for(var m=0;m<k.length;m++)l.push(k[m]);mxStencilRegistry.loadStencilSet(d,mxUtils.bind(this,function(a,c,d,e,k){if(null==f||0>mxUtils.indexOf(f,c)){d=this.getTagsForStencil(a,c);var m=null!=g?g[c]:null;null!=m&&d.push(m);l.push(this.createVertexTemplateEntry("shape="+a+c.toLowerCase()+b,Math.round(e*h),Math.round(k*h),"",c.replace(/_/g," "),null,null,this.filterTags(d.join(" "))))}}),
+!0,!0);this.addPaletteFunctions(a,c,!1,l)}else this.addPalette(a,c,!1,mxUtils.bind(this,function(a){null==b&&(b="");null!=e&&e.call(this,a);if(null!=k)for(var c=0;c<k.length;c++)k[c](a);mxStencilRegistry.loadStencilSet(d,mxUtils.bind(this,function(c,d,e,g,k){(null==f||0>mxUtils.indexOf(f,d))&&a.appendChild(this.createVertexTemplate("shape="+c+d.toLowerCase()+b,Math.round(g*h),Math.round(k*h),"",d.replace(/_/g," "),!0))}),!0)}))};
Sidebar.prototype.destroy=function(){null!=this.graph&&(null!=this.graph.container&&null!=this.graph.container.parentNode&&this.graph.container.parentNode.removeChild(this.graph.container),this.graph.destroy(),this.graph=null);null!=this.pointerUpHandler&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointerup":"mouseup",this.pointerUpHandler),this.pointerUpHandler=null);null!=this.pointerDownHandler&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointerdown":"mousedown",this.pointerDownHandler),
this.pointerDownHandler=null);null!=this.pointerMoveHandler&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointermove":"mousemove",this.pointerMoveHandler),this.pointerMoveHandler=null);null!=this.pointerOutHandler&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointerout":"mouseout",this.pointerOutHandler),this.pointerOutHandler=null)};"undefined"!==typeof html4&&(html4.ATTRIBS["a::target"]=0,html4.ATTRIBS["source::src"]=0,html4.ATTRIBS["video::src"]=0);(function(){var a=[["nbsp","160"],["shy","173"]],c=mxUtils.parseXml;mxUtils.parseXml=function(d){for(var b=0;b<a.length;b++)d=d.replace(new RegExp("&"+a[b][0]+";","g"),"&#"+a[b][1]+";");return c(d)}})();
Date.prototype.toISOString||function(){function a(a){a=String(a);1===a.length&&(a="0"+a);return a}Date.prototype.toISOString=function(){return this.getUTCFullYear()+"-"+a(this.getUTCMonth()+1)+"-"+a(this.getUTCDate())+"T"+a(this.getUTCHours())+":"+a(this.getUTCMinutes())+":"+a(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"}}();Date.now||(Date.now=function(){return(new Date).getTime()});mxConstants.POINTS=1;mxConstants.MILLIMETERS=2;mxConstants.INCHES=3;
mxConstants.PIXELS_PER_MM=3.937;mxConstants.PIXELS_PER_INCH=100;mxConstants.SHADOW_OPACITY=.25;mxConstants.SHADOWCOLOR="#000000";mxConstants.VML_SHADOWCOLOR="#d0d0d0";mxGraph.prototype.pageBreakColor="#c0c0c0";mxGraph.prototype.pageScale=1;(function(){try{if(null!=navigator&&null!=navigator.language){var a=navigator.language.toLowerCase();mxGraph.prototype.pageFormat="en-us"===a||"en-ca"===a||"es-mx"===a?mxConstants.PAGE_FORMAT_LETTER_PORTRAIT:mxConstants.PAGE_FORMAT_A4_PORTRAIT}}catch(c){}})();
mxText.prototype.baseSpacingTop=5;mxText.prototype.baseSpacingBottom=1;mxGraphModel.prototype.ignoreRelativeEdgeParent=!1;mxGraphView.prototype.gridImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhCgAKAJEAAAAAAP///8zMzP///yH5BAEAAAMALAAAAAAKAAoAAAIJ1I6py+0Po2wFADs=":IMAGE_PATH+"/grid.gif";mxGraphView.prototype.gridSteps=4;mxGraphView.prototype.minGridSize=4;mxGraphView.prototype.defaultGridColor="#d0d0d0";mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultGridColor;
mxGraphView.prototype.unit=mxConstants.POINTS;mxGraphView.prototype.setUnit=function(a){this.unit!=a&&(this.unit=a,this.fireEvent(new mxEventObject("unitChanged","unit",a)))};mxSvgCanvas2D.prototype.foAltText="[Not supported by viewer]";mxShape.prototype.getConstraints=function(a,c,d){return null};
-Graph=function(a,c,d,b,g,e){mxGraph.call(this,a,c,d,b);this.themes=g||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=e?e:!1;a=this.baseUrl;c=a.indexOf("//");this.domainPathUrl=this.domainUrl="";0<c&&(c=a.indexOf("/",c+2),0<c&&(this.domainUrl=a.substring(0,c)),c=a.lastIndexOf("/"),0<c&&(this.domainPathUrl=a.substring(0,c+1)));this.isHtmlLabel=function(a){a=this.getCurrentCellStyle(a);
-return null!=a?"1"==a.html||"wrap"==a[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var h=null,f=null,k=null,l=null,m=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,b){if("mouseDown"==b.getProperty("eventName")&&this.isEnabled()){var c=b.getProperty("event");if(!mxEvent.isControlDown(c.getEvent())&&!mxEvent.isShiftDown(c.getEvent())){var d=c.getState();null!=d&&this.model.isEdge(d.cell)&&(h=new mxPoint(c.getGraphX(),c.getGraphY()),m=this.isCellSelected(d.cell),k=
-d,f=c,null!=d.text&&null!=d.text.boundingBox&&mxUtils.contains(d.text.boundingBox,c.getGraphX(),c.getGraphY())?l=mxEvent.LABEL_HANDLE:(d=this.selectionCellsHandler.getHandler(d.cell),null!=d&&null!=d.bends&&0<d.bends.length&&(l=d.getHandleForEvent(c))))}}}));this.addMouseListener({mouseDown:function(a,b){},mouseMove:mxUtils.bind(this,function(a,b){var c=this.selectionCellsHandler.handlers.map,d;for(d in c)if(null!=c[d].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isControlDown(b.getEvent())&&
-!mxEvent.isShiftDown(b.getEvent())&&!mxEvent.isAltDown(b.getEvent()))if(d=this.tolerance,null!=h&&null!=k&&null!=f){if(c=k,Math.abs(h.x-b.getGraphX())>d||Math.abs(h.y-b.getGraphY())>d){this.isCellSelected(c.cell)||this.setSelectionCell(c.cell);var e=this.selectionCellsHandler.getHandler(c.cell);if(null!=e&&null!=e.bends&&0<e.bends.length){var g=e.getHandleForEvent(f),n=this.view.getEdgeStyle(c);d=n==mxEdgeStyle.EntityRelation;m||l!=mxEvent.LABEL_HANDLE||(g=l);if(d&&0!=g&&g!=e.bends.length-1&&g!=mxEvent.LABEL_HANDLE)!d||
-null==c.visibleSourceState&&null==c.visibleTargetState||(this.graphHandler.reset(),b.consume());else if(g==mxEvent.LABEL_HANDLE||0==g||null!=c.visibleSourceState||g==e.bends.length-1||null!=c.visibleTargetState)d||g==mxEvent.LABEL_HANDLE||(d=c.absolutePoints,null!=d&&(null==n&&null==g||n==mxEdgeStyle.OrthConnector)&&(g=l,null==g&&(g=new mxRectangle(h.x,h.y),g.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(g,d[0].x,d[0].y)?g=0:mxUtils.contains(g,d[d.length-1].x,d[d.length-1].y)?
-g=e.bends.length-1:null!=n&&(2==d.length||3==d.length&&(0==Math.round(d[0].x-d[1].x)&&0==Math.round(d[1].x-d[2].x)||0==Math.round(d[0].y-d[1].y)&&0==Math.round(d[1].y-d[2].y)))?g=2:(g=mxUtils.findNearestSegment(c,h.x,h.y),g=null==n?mxEvent.VIRTUAL_HANDLE-g:g+1))),null==g&&(g=mxEvent.VIRTUAL_HANDLE)),e.start(b.getGraphX(),b.getGraphX(),g),l=h=f=k=null,m=!1,b.consume(),this.graphHandler.reset()}}}else if(c=b.getState(),null!=c&&this.model.isEdge(c.cell)){e=null;d=c.absolutePoints;if(null!=d)if(g=new mxRectangle(b.getGraphX(),
-b.getGraphY()),g.grow(mxEdgeHandler.prototype.handleImage.width/2),null!=c.text&&null!=c.text.boundingBox&&mxUtils.contains(c.text.boundingBox,b.getGraphX(),b.getGraphY()))e="move";else if(mxUtils.contains(g,d[0].x,d[0].y)||mxUtils.contains(g,d[d.length-1].x,d[d.length-1].y))e="pointer";else if(null!=c.visibleSourceState||null!=c.visibleTargetState)n=this.view.getEdgeStyle(c),e="crosshair",n!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(c)&&(n=mxUtils.findNearestSegment(c,b.getGraphX(),b.getGraphY()),
-n<d.length-1&&0<=n&&(e=0==Math.round(d[n].x-d[n+1].x)?"col-resize":"row-resize"));null!=e&&c.setCursor(e)}}),mouseUp:mxUtils.bind(this,function(a,b){l=h=f=k=null})})}this.cellRenderer.getLabelValue=function(a){var b=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);a.view.graph.isHtmlLabel(a.cell)&&(b=1!=a.style.html?mxUtils.htmlEntities(b,!1):a.view.graph.sanitizeHtml(b));return b};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0);this.setDropEnabled(!0);this.setPanning(!0);
+Graph=function(a,c,d,b,f,e){mxGraph.call(this,a,c,d,b);this.themes=f||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=e?e:!1;a=this.baseUrl;c=a.indexOf("//");this.domainPathUrl=this.domainUrl="";0<c&&(c=a.indexOf("/",c+2),0<c&&(this.domainUrl=a.substring(0,c)),c=a.lastIndexOf("/"),0<c&&(this.domainPathUrl=a.substring(0,c+1)));this.isHtmlLabel=function(a){a=this.getCurrentCellStyle(a);
+return null!=a?"1"==a.html||"wrap"==a[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var h=null,g=null,k=null,l=null,m=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,b){if("mouseDown"==b.getProperty("eventName")&&this.isEnabled()){var c=b.getProperty("event");if(!mxEvent.isControlDown(c.getEvent())&&!mxEvent.isShiftDown(c.getEvent())){var d=c.getState();null!=d&&this.model.isEdge(d.cell)&&(h=new mxPoint(c.getGraphX(),c.getGraphY()),m=this.isCellSelected(d.cell),k=
+d,g=c,null!=d.text&&null!=d.text.boundingBox&&mxUtils.contains(d.text.boundingBox,c.getGraphX(),c.getGraphY())?l=mxEvent.LABEL_HANDLE:(d=this.selectionCellsHandler.getHandler(d.cell),null!=d&&null!=d.bends&&0<d.bends.length&&(l=d.getHandleForEvent(c))))}}}));this.addMouseListener({mouseDown:function(a,b){},mouseMove:mxUtils.bind(this,function(a,b){var c=this.selectionCellsHandler.handlers.map,d;for(d in c)if(null!=c[d].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isControlDown(b.getEvent())&&
+!mxEvent.isShiftDown(b.getEvent())&&!mxEvent.isAltDown(b.getEvent()))if(d=this.tolerance,null!=h&&null!=k&&null!=g){if(c=k,Math.abs(h.x-b.getGraphX())>d||Math.abs(h.y-b.getGraphY())>d){this.isCellSelected(c.cell)||this.setSelectionCell(c.cell);var e=this.selectionCellsHandler.getHandler(c.cell);if(null!=e&&null!=e.bends&&0<e.bends.length){var f=e.getHandleForEvent(g),n=this.view.getEdgeStyle(c);d=n==mxEdgeStyle.EntityRelation;m||l!=mxEvent.LABEL_HANDLE||(f=l);if(d&&0!=f&&f!=e.bends.length-1&&f!=mxEvent.LABEL_HANDLE)!d||
+null==c.visibleSourceState&&null==c.visibleTargetState||(this.graphHandler.reset(),b.consume());else if(f==mxEvent.LABEL_HANDLE||0==f||null!=c.visibleSourceState||f==e.bends.length-1||null!=c.visibleTargetState)d||f==mxEvent.LABEL_HANDLE||(d=c.absolutePoints,null!=d&&(null==n&&null==f||n==mxEdgeStyle.OrthConnector)&&(f=l,null==f&&(f=new mxRectangle(h.x,h.y),f.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(f,d[0].x,d[0].y)?f=0:mxUtils.contains(f,d[d.length-1].x,d[d.length-1].y)?
+f=e.bends.length-1:null!=n&&(2==d.length||3==d.length&&(0==Math.round(d[0].x-d[1].x)&&0==Math.round(d[1].x-d[2].x)||0==Math.round(d[0].y-d[1].y)&&0==Math.round(d[1].y-d[2].y)))?f=2:(f=mxUtils.findNearestSegment(c,h.x,h.y),f=null==n?mxEvent.VIRTUAL_HANDLE-f:f+1))),null==f&&(f=mxEvent.VIRTUAL_HANDLE)),e.start(b.getGraphX(),b.getGraphX(),f),l=h=g=k=null,m=!1,b.consume(),this.graphHandler.reset()}}}else if(c=b.getState(),null!=c&&this.model.isEdge(c.cell)){e=null;d=c.absolutePoints;if(null!=d)if(f=new mxRectangle(b.getGraphX(),
+b.getGraphY()),f.grow(mxEdgeHandler.prototype.handleImage.width/2),null!=c.text&&null!=c.text.boundingBox&&mxUtils.contains(c.text.boundingBox,b.getGraphX(),b.getGraphY()))e="move";else if(mxUtils.contains(f,d[0].x,d[0].y)||mxUtils.contains(f,d[d.length-1].x,d[d.length-1].y))e="pointer";else if(null!=c.visibleSourceState||null!=c.visibleTargetState)n=this.view.getEdgeStyle(c),e="crosshair",n!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(c)&&(n=mxUtils.findNearestSegment(c,b.getGraphX(),b.getGraphY()),
+n<d.length-1&&0<=n&&(e=0==Math.round(d[n].x-d[n+1].x)?"col-resize":"row-resize"));null!=e&&c.setCursor(e)}}),mouseUp:mxUtils.bind(this,function(a,b){l=h=g=k=null})})}this.cellRenderer.getLabelValue=function(a){var b=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);a.view.graph.isHtmlLabel(a.cell)&&(b=1!=a.style.html?mxUtils.htmlEntities(b,!1):a.view.graph.sanitizeHtml(b));return b};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0);this.setDropEnabled(!0);this.setPanning(!0);
this.setTooltips(!0);this.setAllowLoops(!0);this.allowAutoPanning=!0;this.constrainChildren=this.resetEdgesOnConnect=!1;this.constrainRelativeChildren=!0;this.graphHandler.scrollOnMove=!1;this.graphHandler.scaleGrid=!0;this.connectionHandler.setCreateTarget(!1);this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(a,b){return!1};this.alternateEdgeStyle="vertical";null==b&&this.loadStylesheet();var n=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=
function(){var a=n.apply(this,arguments);if(this.graph.pageVisible){for(var b=[],c=this.graph.pageFormat,d=this.graph.pageScale,e=c.width*d,c=c.height*d,d=this.graph.view.translate,f=this.graph.view.scale,g=this.graph.getPageLayout(),h=0;h<g.width;h++)b.push(new mxRectangle(((g.x+h)*e+d.x)*f,(g.y*c+d.y)*f,e*f,c*f));for(h=1;h<g.height;h++)b.push(new mxRectangle((g.x*e+d.x)*f,((g.y+h)*c+d.y)*f,e*f,c*f));a=b.concat(a)}return a};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=
function(a,b){return null==a.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(a){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var p=this.graphHandler.getCells;this.graphHandler.getCells=function(a){for(var b=p.apply(this,arguments),c=new mxDictionary,d=[],e=0;e<b.length;e++){var f=this.graph.getCompositeParent(b[e]);null==f||c.get(f)||
@@ -2530,24 +2530,25 @@ this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(
a)};this.connectionHandler.constraintHandler.isStateIgnored=function(a,b){return b&&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 J=this.updateMouseEvent;this.updateMouseEvent=function(a){a=J.apply(this,
arguments);null!=a.state&&this.isCellLocked(a.getCell())&&(a.state=null);return a}}this.currentTranslate=new mxPoint(0,0)};Graph.touchStyle=mxClient.IS_TOUCH||mxClient.IS_FF&&mxClient.IS_WIN||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||null==window.urlParams||"1"==urlParams.touch;Graph.fileSupport=null!=window.File&&null!=window.FileReader&&null!=window.FileList&&(null==window.urlParams||"0"!=urlParams.filesupport);Graph.lineJumpsEnabled=!0;Graph.defaultJumpSize=6;
Graph.minTableColumnWidth=20;Graph.minTableRowHeight=20;Graph.foreignObjectWarningText="Viewer does not support full SVG 1.1";Graph.foreignObjectWarningLink="https://desk.draw.io/support/solutions/articles/16000042487";
-Graph.createSvgImage=function(a,c,d,b,g){d=unescape(encodeURIComponent('<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+a+'px" height="'+c+'px" '+(null!=b&&null!=g?'viewBox="0 0 '+b+" "+g+'" ':"")+'version="1.1">'+d+"</svg>"));return new mxImage("data:image/svg+xml;base64,"+(window.btoa?btoa(d):Base64.encode(d,!0)),a,c)};
+Graph.createSvgImage=function(a,c,d,b,f){d=unescape(encodeURIComponent('<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+a+'px" height="'+c+'px" '+(null!=b&&null!=f?'viewBox="0 0 '+b+" "+f+'" ':"")+'version="1.1">'+d+"</svg>"));return new mxImage("data:image/svg+xml;base64,"+(window.btoa?btoa(d):Base64.encode(d,!0)),a,c)};
Graph.zapGremlins=function(a){for(var c=[],d=0;d<a.length;d++){var b=a.charCodeAt(d);(32<=b||9==b||10==b||13==b)&&65535!=b&&65534!=b&&c.push(a.charAt(d))}return c.join("")};Graph.stringToBytes=function(a){for(var c=Array(a.length),d=0;d<a.length;d++)c[d]=a.charCodeAt(d);return c};Graph.bytesToString=function(a){for(var c=Array(a.length),d=0;d<a.length;d++)c[d]=String.fromCharCode(a[d]);return c.join("")};Graph.compressNode=function(a,c){var d=mxUtils.getXml(a);return Graph.compress(c?d:Graph.zapGremlins(d))};
Graph.compress=function(a,c){if(null==a||0==a.length||"undefined"===typeof pako)return a;var d=c?pako.deflate(encodeURIComponent(a),{to:"string"}):pako.deflateRaw(encodeURIComponent(a),{to:"string"});return window.btoa?btoa(d):Base64.encode(d,!0)};Graph.decompress=function(a,c,d){if(null==a||0==a.length||"undefined"===typeof pako)return a;a=window.atob?atob(a):Base64.decode(a,!0);c=decodeURIComponent(c?pako.inflate(a,{to:"string"}):pako.inflateRaw(a,{to:"string"}));return d?c:Graph.zapGremlins(c)};
-mxUtils.extend(Graph,mxGraph);Graph.prototype.minFitScale=null;Graph.prototype.maxFitScale=null;Graph.prototype.linkPolicy="frame"==urlParams.target?"blank":urlParams.target||"auto";Graph.prototype.linkTarget="frame"==urlParams.target?"_self":"_blank";Graph.prototype.linkRelation="nofollow noopener noreferrer";Graph.prototype.defaultScrollbars=!mxClient.IS_IOS;Graph.prototype.defaultPageVisible=!0;Graph.prototype.lightbox=!1;Graph.prototype.defaultPageBackgroundColor="#ffffff";
-Graph.prototype.defaultPageBorderColor="#ffffff";Graph.prototype.scrollTileSize=new mxRectangle(0,0,400,400);Graph.prototype.transparentBackground=!0;Graph.prototype.selectParentAfterDelete=!1;Graph.prototype.defaultEdgeLength=80;Graph.prototype.edgeMode=!1;Graph.prototype.connectionArrowsEnabled=!0;Graph.prototype.placeholderPattern=RegExp("%(date{.*}|[^%^{^}]+)%","g");Graph.prototype.absoluteUrlPattern=/^(?:[a-z]+:)?\/\//i;Graph.prototype.defaultThemeName="default";
-Graph.prototype.defaultThemes={};Graph.prototype.baseUrl=null!=urlParams.base?decodeURIComponent(urlParams.base):(window!=window.top?document.referrer:document.location.toString()).split("#")[0];Graph.prototype.editAfterInsert=!1;Graph.prototype.builtInProperties=["label","tooltip","placeholders","placeholder"];Graph.prototype.standalone=!1;
-Graph.prototype.init=function(a){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(a,d){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var b=a.view.graph.tolerance,c=!0,e=null,h=mxUtils.bind(this,function(a){c=!0;e=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a))}),f=mxUtils.bind(this,function(a){c=c&&null!=e&&Math.abs(e.x-mxEvent.getClientX(a))<b&&Math.abs(e.y-mxEvent.getClientY(a))<b}),k=mxUtils.bind(this,function(b){if(c)for(var e=mxEvent.getSource(b);null!=
-e&&e!=d.node;){if("a"==e.nodeName.toLowerCase()){a.view.graph.labelLinkClicked(a,e,b);break}e=e.parentNode}});mxEvent.addGestureListeners(d.node,h,f,k);mxEvent.addListener(d.node,"click",function(a){mxEvent.consume(a)})};this.initLayoutManager()};
-(function(){Graph.prototype.useCssTransforms=!1;Graph.prototype.currentScale=1;Graph.prototype.currentTranslate=new mxPoint(0,0);Graph.prototype.isFastZoomEnabled=function(){return"nocss"!=urlParams.zoom&&!mxClient.NO_FO&&!mxClient.IS_EDGE&&!this.useCssTransforms&&this.isCssTransformsSupported()};Graph.prototype.isCssTransformsSupported=function(){return this.dialect==mxConstants.DIALECT_SVG&&!mxClient.NO_FO&&(!this.lightbox||!mxClient.IS_SF)};Graph.prototype.getCellAt=function(a,c,d,h,f,k){this.useCssTransforms&&
-(a=a/this.currentScale-this.currentTranslate.x,c=c/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(a,c,d,h,f,k){h=null!=h?h:!0;f=null!=f?f:!0;null==d&&(d=this.getCurrentRoot(),null==d&&(d=this.getModel().getRoot()));if(null!=d)for(var b=this.model.getChildCount(d)-1;0<=b;b--){var e=this.model.getChildAt(d,b),g=this.getScaledCellAt(a,c,e,h,f,k);if(null!=g)return g;if(this.isCellVisible(e)&&(f&&this.model.isEdge(e)||
-h&&this.model.isVertex(e))&&(g=this.view.getState(e),null!=g&&(null==k||!k(g,a,c))&&this.intersects(g,a,c)))return e}return null};Graph.prototype.isRecursiveVertexResize=function(a){return!this.isSwimlane(a.cell)&&0<this.model.getChildCount(a.cell)&&!this.isCellCollapsed(a.cell)&&"1"==mxUtils.getValue(a.style,"recursiveResize","1")&&null==mxUtils.getValue(a.style,"childLayout",null)};Graph.prototype.isPart=function(a){return this.model.isVertex(a)?"1"==mxUtils.getValue(this.getCurrentCellStyle(a),
-"part","0"):!1};Graph.prototype.getCompositeParent=function(a){for(;this.isPart(a);)a=this.model.getParent(a);return a};mxCellHighlight.prototype.getStrokeWidth=function(a){a=this.strokeWidth;this.graph.useCssTransforms&&(a/=this.graph.currentScale);return a};mxGraphView.prototype.getGraphBounds=function(){var a=this.graphBounds;if(this.graph.useCssTransforms)var c=this.graph.currentTranslate,d=this.graph.currentScale,a=new mxRectangle((a.x+c.x)*d,(a.y+c.y)*d,a.width*d,a.height*d);return a};mxGraphView.prototype.viewStateChanged=
+Graph.removePasteFormatting=function(a){for(;null!=a;)null!=a.firstChild&&Graph.removePasteFormatting(a.firstChild),a.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=a.style&&(a.style.whiteSpace=""),a=a.nextSibling};mxUtils.extend(Graph,mxGraph);Graph.prototype.minFitScale=null;Graph.prototype.maxFitScale=null;Graph.prototype.linkPolicy="frame"==urlParams.target?"blank":urlParams.target||"auto";Graph.prototype.linkTarget="frame"==urlParams.target?"_self":"_blank";Graph.prototype.linkRelation="nofollow noopener noreferrer";
+Graph.prototype.defaultScrollbars=!mxClient.IS_IOS;Graph.prototype.defaultPageVisible=!0;Graph.prototype.lightbox=!1;Graph.prototype.defaultPageBackgroundColor="#ffffff";Graph.prototype.defaultPageBorderColor="#ffffff";Graph.prototype.scrollTileSize=new mxRectangle(0,0,400,400);Graph.prototype.transparentBackground=!0;Graph.prototype.selectParentAfterDelete=!1;Graph.prototype.defaultEdgeLength=80;Graph.prototype.edgeMode=!1;Graph.prototype.connectionArrowsEnabled=!0;
+Graph.prototype.placeholderPattern=RegExp("%(date{.*}|[^%^{^}]+)%","g");Graph.prototype.absoluteUrlPattern=/^(?:[a-z]+:)?\/\//i;Graph.prototype.defaultThemeName="default";Graph.prototype.defaultThemes={};Graph.prototype.baseUrl=null!=urlParams.base?decodeURIComponent(urlParams.base):(window!=window.top?document.referrer:document.location.toString()).split("#")[0];Graph.prototype.editAfterInsert=!1;Graph.prototype.builtInProperties=["label","tooltip","placeholders","placeholder"];
+Graph.prototype.standalone=!1;
+Graph.prototype.init=function(a){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(a,d){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var b=a.view.graph.tolerance,c=!0,e=null,h=mxUtils.bind(this,function(a){c=!0;e=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a))}),g=mxUtils.bind(this,function(a){c=c&&null!=e&&Math.abs(e.x-mxEvent.getClientX(a))<b&&Math.abs(e.y-mxEvent.getClientY(a))<b}),k=mxUtils.bind(this,function(b){if(c)for(var e=mxEvent.getSource(b);null!=
+e&&e!=d.node;){if("a"==e.nodeName.toLowerCase()){a.view.graph.labelLinkClicked(a,e,b);break}e=e.parentNode}});mxEvent.addGestureListeners(d.node,h,g,k);mxEvent.addListener(d.node,"click",function(a){mxEvent.consume(a)})};this.initLayoutManager()};
+(function(){Graph.prototype.useCssTransforms=!1;Graph.prototype.currentScale=1;Graph.prototype.currentTranslate=new mxPoint(0,0);Graph.prototype.isFastZoomEnabled=function(){return"nocss"!=urlParams.zoom&&!mxClient.NO_FO&&!mxClient.IS_EDGE&&!this.useCssTransforms&&this.isCssTransformsSupported()};Graph.prototype.isCssTransformsSupported=function(){return this.dialect==mxConstants.DIALECT_SVG&&!mxClient.NO_FO&&(!this.lightbox||!mxClient.IS_SF)};Graph.prototype.getCellAt=function(a,c,d,h,g,k){this.useCssTransforms&&
+(a=a/this.currentScale-this.currentTranslate.x,c=c/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(a,c,d,h,g,k){h=null!=h?h:!0;g=null!=g?g:!0;null==d&&(d=this.getCurrentRoot(),null==d&&(d=this.getModel().getRoot()));if(null!=d)for(var b=this.model.getChildCount(d)-1;0<=b;b--){var e=this.model.getChildAt(d,b),f=this.getScaledCellAt(a,c,e,h,g,k);if(null!=f)return f;if(this.isCellVisible(e)&&(g&&this.model.isEdge(e)||
+h&&this.model.isVertex(e))&&(f=this.view.getState(e),null!=f&&(null==k||!k(f,a,c))&&this.intersects(f,a,c)))return e}return null};Graph.prototype.isRecursiveVertexResize=function(a){return!this.isSwimlane(a.cell)&&0<this.model.getChildCount(a.cell)&&!this.isCellCollapsed(a.cell)&&"1"==mxUtils.getValue(a.style,"recursiveResize","1")&&null==mxUtils.getValue(a.style,"childLayout",null)};Graph.prototype.isPart=function(a){return"1"==mxUtils.getValue(this.getCurrentCellStyle(a),"part","0")};Graph.prototype.getCompositeParent=
+function(a){for(;this.isPart(a);){var b=this.model.getParent(a);if(!this.model.isVertex(b))break;a=b}return a};mxCellHighlight.prototype.getStrokeWidth=function(a){a=this.strokeWidth;this.graph.useCssTransforms&&(a/=this.graph.currentScale);return a};mxGraphView.prototype.getGraphBounds=function(){var a=this.graphBounds;if(this.graph.useCssTransforms)var c=this.graph.currentTranslate,d=this.graph.currentScale,a=new mxRectangle((a.x+c.x)*d,(a.y+c.y)*d,a.width*d,a.height*d);return a};mxGraphView.prototype.viewStateChanged=
function(){this.graph.useCssTransforms?this.validate():this.revalidate();this.graph.sizeDidChange()};var a=mxGraphView.prototype.validate;mxGraphView.prototype.validate=function(b){this.graph.useCssTransforms&&(this.graph.currentScale=this.scale,this.graph.currentTranslate.x=this.translate.x,this.graph.currentTranslate.y=this.translate.y,this.scale=1,this.translate.x=0,this.translate.y=0);a.apply(this,arguments);this.graph.useCssTransforms&&(this.graph.updateCssTransform(),this.scale=this.graph.currentScale,
this.translate.x=this.graph.currentTranslate.x,this.translate.y=this.graph.currentTranslate.y)};Graph.prototype.updateCssTransform=function(){var a=this.view.getDrawPane();if(null!=a)if(a=a.parentNode,this.useCssTransforms){var c=a.getAttribute("transform");a.setAttribute("transformOrigin","0 0");var d=Math.round(100*this.currentScale)/100;a.setAttribute("transform","scale("+d+","+d+")translate("+Math.round(100*this.currentTranslate.x)/100+","+Math.round(100*this.currentTranslate.y)/100+")");if(c!=
-a.getAttribute("transform"))try{if(mxClient.IS_EDGE){var h=a.style.display;a.style.display="none";a.getBBox();a.style.display=h}}catch(f){}}else a.removeAttribute("transformOrigin"),a.removeAttribute("transform")};var c=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){var a=this.graph.useCssTransforms,d=this.scale,e=this.translate;a&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);c.apply(this,arguments);a&&(this.scale=
-d,this.translate=e)};var d=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(a,c,e){var b=this.useCssTransforms,f=this.view.scale,g=this.view.translate;b&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=!1);d.apply(this,arguments);b&&(this.view.scale=f,this.view.translate=g,this.useCssTransforms=!0)}})();Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.isViewer=function(){return!1};
+a.getAttribute("transform"))try{if(mxClient.IS_EDGE){var h=a.style.display;a.style.display="none";a.getBBox();a.style.display=h}}catch(g){}}else a.removeAttribute("transformOrigin"),a.removeAttribute("transform")};var c=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){var a=this.graph.useCssTransforms,d=this.scale,e=this.translate;a&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);c.apply(this,arguments);a&&(this.scale=
+d,this.translate=e)};var d=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(a,c,e){var b=this.useCssTransforms,f=this.view.scale,k=this.view.translate;b&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=!1);d.apply(this,arguments);b&&(this.view.scale=f,this.view.translate=k,this.useCssTransforms=!0)}})();Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.isViewer=function(){return!1};
Graph.prototype.labelLinkClicked=function(a,c,d){c=c.getAttribute("href");if(null!=c&&!this.isCustomLink(c)&&mxEvent.isLeftMouseButton(d)&&!mxEvent.isPopupTrigger(d)||mxEvent.isTouchEvent(d)){if(!this.isEnabled()||this.isCellLocked(a.cell))a=this.isBlankLink(c)?this.linkTarget:"_top",this.openLink(this.getAbsoluteUrl(c),a);mxEvent.consume(d)}};
-Graph.prototype.openLink=function(a,c,d){var b=window;try{if("_self"==c&&window!=window.top)window.location.href=a;else if(a.substring(0,this.baseUrl.length)==this.baseUrl&&"#"==a.charAt(this.baseUrl.length)&&"_top"==c&&window==window.top){var g=a.split("#")[1];window.location.hash=="#"+g&&(window.location.hash="");window.location.hash=g}else b=window.open(a,null!=c?c:"_blank"),null==b||d||(b.opener=null)}catch(e){}return b};
+Graph.prototype.openLink=function(a,c,d){var b=window;try{if("_self"==c&&window!=window.top)window.location.href=a;else if(a.substring(0,this.baseUrl.length)==this.baseUrl&&"#"==a.charAt(this.baseUrl.length)&&"_top"==c&&window==window.top){var f=a.split("#")[1];window.location.hash=="#"+f&&(window.location.hash="");window.location.hash=f}else b=window.open(a,null!=c?c:"_blank"),null==b||d||(b.opener=null)}catch(e){}return b};
Graph.prototype.getLinkTitle=function(a){return a.substring(a.lastIndexOf("/")+1)};Graph.prototype.isCustomLink=function(a){return"data:"==a.substring(0,5)};Graph.prototype.customLinkClicked=function(a){return!1};Graph.prototype.isExternalProtocol=function(a){return"mailto:"===a.substring(0,7)};Graph.prototype.isBlankLink=function(a){return!this.isExternalProtocol(a)&&("blank"===this.linkPolicy||"self"!==this.linkPolicy&&!this.isRelativeUrl(a)&&a.substring(0,this.domainUrl.length)!==this.domainUrl)};
Graph.prototype.isRelativeUrl=function(a){return null!=a&&!this.absoluteUrlPattern.test(a)&&"data:"!==a.substring(0,5)&&!this.isExternalProtocol(a)};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.initLayoutManager=function(){this.layoutManager=new mxLayoutManager(this);this.layoutManager.getLayout=function(a,c){return null!=this.graph.getCellStyle(a).childLayout};this.layoutManager.getLayout=function(a,c){var d=this.graph.getCellStyle(a);if("stackLayout"==d.childLayout){var b=new mxStackLayout(this.graph,!0);b.resizeParentMax="1"==mxUtils.getValue(d,"resizeParentMax","1");b.horizontal="1"==mxUtils.getValue(d,"horizontalStack","1");b.resizeParent="1"==mxUtils.getValue(d,"resizeParent",
@@ -2562,37 +2563,37 @@ Graph.prototype.isSplitTarget=function(a,c,d){return!this.model.isEdge(c[0])&&!m
Graph.prototype.isLabelMovable=function(a){var c=this.getCurrentCellStyle(a);return!this.isCellLocked(a)&&(this.model.isEdge(a)&&this.edgeLabelsMovable||this.model.isVertex(a)&&(this.vertexLabelsMovable||"1"==mxUtils.getValue(c,"labelMovable","0")))};Graph.prototype.setGridSize=function(a){this.gridSize=a;this.fireEvent(new mxEventObject("gridSizeChanged"))};
Graph.prototype.getClickableLinkForCell=function(a){do{var c=this.getLinkForCell(a);if(null!=c)return c;a=this.model.getParent(a)}while(null!=a);return null};Graph.prototype.getGlobalVariable=function(a){var c=null;"date"==a?c=(new Date).toLocaleDateString():"time"==a?c=(new Date).toLocaleTimeString():"timestamp"==a?c=(new Date).toLocaleString():"date{"==a.substring(0,5)&&(a=a.substring(5,a.length-1),c=this.formatDate(new Date,a));return c};
Graph.prototype.formatDate=function(a,c,d){null==this.dateFormatCache&&(this.dateFormatCache={i18n:{dayNames:"Sun Mon Tue Wed Thu Fri Sat Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),monthNames:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec January February March April May June July August September October November December".split(" ")},masks:{"default":"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",
-shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var b=this.dateFormatCache,g=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,e=/[^-+\dA-Z]/g,h=function(a,b){a=String(a);for(b=b||2;a.length<b;)a="0"+a;return a};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(a)||
-/\d/.test(a)||(c=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");c=String(b.masks[c]||c||b.masks["default"]);"UTC:"==c.slice(0,4)&&(c=c.slice(4),d=!0);var f=d?"getUTC":"get",k=a[f+"Date"](),l=a[f+"Day"](),m=a[f+"Month"](),n=a[f+"FullYear"](),p=a[f+"Hours"](),q=a[f+"Minutes"](),u=a[f+"Seconds"](),f=a[f+"Milliseconds"](),v=d?0:a.getTimezoneOffset(),r={d:k,dd:h(k),ddd:b.i18n.dayNames[l],dddd:b.i18n.dayNames[l+7],m:m+1,mm:h(m+1),mmm:b.i18n.monthNames[m],mmmm:b.i18n.monthNames[m+
-12],yy:String(n).slice(2),yyyy:n,h:p%12||12,hh:h(p%12||12),H:p,HH:h(p),M:q,MM:h(q),s:u,ss:h(u),l:h(f,3),L:h(99<f?Math.round(f/10):f),t:12>p?"a":"p",tt:12>p?"am":"pm",T:12>p?"A":"P",TT:12>p?"AM":"PM",Z:d?"UTC":(String(a).match(g)||[""]).pop().replace(e,""),o:(0<v?"-":"+")+h(100*Math.floor(Math.abs(v)/60)+Math.abs(v)%60,4),S:["th","st","nd","rd"][3<k%10?0:(10!=k%100-k%10)*k%10]};return c.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(a){return a in r?r[a]:a.slice(1,
+shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var b=this.dateFormatCache,f=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,e=/[^-+\dA-Z]/g,h=function(a,b){a=String(a);for(b=b||2;a.length<b;)a="0"+a;return a};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(a)||
+/\d/.test(a)||(c=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");c=String(b.masks[c]||c||b.masks["default"]);"UTC:"==c.slice(0,4)&&(c=c.slice(4),d=!0);var g=d?"getUTC":"get",k=a[g+"Date"](),l=a[g+"Day"](),m=a[g+"Month"](),n=a[g+"FullYear"](),p=a[g+"Hours"](),q=a[g+"Minutes"](),u=a[g+"Seconds"](),g=a[g+"Milliseconds"](),v=d?0:a.getTimezoneOffset(),r={d:k,dd:h(k),ddd:b.i18n.dayNames[l],dddd:b.i18n.dayNames[l+7],m:m+1,mm:h(m+1),mmm:b.i18n.monthNames[m],mmmm:b.i18n.monthNames[m+
+12],yy:String(n).slice(2),yyyy:n,h:p%12||12,hh:h(p%12||12),H:p,HH:h(p),M:q,MM:h(q),s:u,ss:h(u),l:h(g,3),L:h(99<g?Math.round(g/10):g),t:12>p?"a":"p",tt:12>p?"am":"pm",T:12>p?"A":"P",TT:12>p?"AM":"PM",Z:d?"UTC":(String(a).match(f)||[""]).pop().replace(e,""),o:(0<v?"-":"+")+h(100*Math.floor(Math.abs(v)/60)+Math.abs(v)%60,4),S:["th","st","nd","rd"][3<k%10?0:(10!=k%100-k%10)*k%10]};return c.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(a){return a in r?r[a]:a.slice(1,
a.length-1)})};
-Graph.prototype.createLayersDialog=function(){var a=document.createElement("div");a.style.position="absolute";for(var c=this.getModel(),d=c.getChildCount(c.root),b=0;b<d;b++)mxUtils.bind(this,function(b){var d=document.createElement("div");d.style.overflow="hidden";d.style.textOverflow="ellipsis";d.style.padding="2px";d.style.whiteSpace="nowrap";var g=document.createElement("input");g.style.display="inline-block";g.setAttribute("type","checkbox");c.isVisible(b)&&(g.setAttribute("checked","checked"),
-g.defaultChecked=!0);d.appendChild(g);var f=this.convertValueToString(b)||mxResources.get("background")||"Background";d.setAttribute("title",f);mxUtils.write(d,f);a.appendChild(d);mxEvent.addListener(g,"click",function(){null!=g.getAttribute("checked")?g.removeAttribute("checked"):g.setAttribute("checked","checked");c.setVisible(b,g.checked)})})(c.getChildAt(c.root,b));return a};
-Graph.prototype.replacePlaceholders=function(a,c){var d=[];if(null!=c){for(var b=0;match=this.placeholderPattern.exec(c);){var g=match[0];if(2<g.length&&"%label%"!=g&&"%tooltip%"!=g){var e=null;if(match.index>b&&"%"==c.charAt(match.index-1))e=g.substring(1);else{var h=g.substring(1,g.length-1);if(0>h.indexOf("{"))for(var f=a;null==e&&null!=f;)null!=f.value&&"object"==typeof f.value&&(e=f.hasAttribute(h)?null!=f.getAttribute(h)?f.getAttribute(h):"":null),f=this.model.getParent(f);null==e&&(e=this.getGlobalVariable(h))}d.push(c.substring(b,
-match.index)+(null!=e?e:g));b=match.index+g.length}}d.push(c.substring(b))}return d.join("")};Graph.prototype.restoreSelection=function(a){if(null!=a&&0<a.length){for(var c=[],d=0;d<a.length;d++){var b=this.model.getCell(a[d].id);null!=b&&c.push(b)}this.setSelectionCells(c)}else this.clearSelection()};
+Graph.prototype.createLayersDialog=function(){var a=document.createElement("div");a.style.position="absolute";for(var c=this.getModel(),d=c.getChildCount(c.root),b=0;b<d;b++)mxUtils.bind(this,function(b){var d=document.createElement("div");d.style.overflow="hidden";d.style.textOverflow="ellipsis";d.style.padding="2px";d.style.whiteSpace="nowrap";var f=document.createElement("input");f.style.display="inline-block";f.setAttribute("type","checkbox");c.isVisible(b)&&(f.setAttribute("checked","checked"),
+f.defaultChecked=!0);d.appendChild(f);var g=this.convertValueToString(b)||mxResources.get("background")||"Background";d.setAttribute("title",g);mxUtils.write(d,g);a.appendChild(d);mxEvent.addListener(f,"click",function(){null!=f.getAttribute("checked")?f.removeAttribute("checked"):f.setAttribute("checked","checked");c.setVisible(b,f.checked)})})(c.getChildAt(c.root,b));return a};
+Graph.prototype.replacePlaceholders=function(a,c){var d=[];if(null!=c){for(var b=0;match=this.placeholderPattern.exec(c);){var f=match[0];if(2<f.length&&"%label%"!=f&&"%tooltip%"!=f){var e=null;if(match.index>b&&"%"==c.charAt(match.index-1))e=f.substring(1);else{var h=f.substring(1,f.length-1);if(0>h.indexOf("{"))for(var g=a;null==e&&null!=g;)null!=g.value&&"object"==typeof g.value&&(e=g.hasAttribute(h)?null!=g.getAttribute(h)?g.getAttribute(h):"":null),g=this.model.getParent(g);null==e&&(e=this.getGlobalVariable(h))}d.push(c.substring(b,
+match.index)+(null!=e?e:f));b=match.index+f.length}}d.push(c.substring(b))}return d.join("")};Graph.prototype.restoreSelection=function(a){if(null!=a&&0<a.length){for(var c=[],d=0;d<a.length;d++){var b=this.model.getCell(a[d].id);null!=b&&c.push(b)}this.setSelectionCells(c)}else this.clearSelection()};
Graph.prototype.selectCellsForConnectVertex=function(a,c,d){2==a.length&&this.model.isVertex(a[1])?(this.setSelectionCell(a[1]),this.scrollCellToVisible(a[1]),null!=d&&(mxEvent.isTouchEvent(c)?d.update(d.getState(this.view.getState(a[1]))):d.reset())):this.setSelectionCells(a)};
-Graph.prototype.connectVertex=function(a,c,d,b,g,e){if(a.geometry.relative&&this.model.isEdge(a.parent))return[];e=e?e:!1;var h=a.geometry.relative&&null!=a.parent.geometry?new mxPoint(a.parent.geometry.width*a.geometry.x,a.parent.geometry.height*a.geometry.y):new mxPoint(a.geometry.x,a.geometry.y);c==mxConstants.DIRECTION_NORTH?(h.x+=a.geometry.width/2,h.y-=d):c==mxConstants.DIRECTION_SOUTH?(h.x+=a.geometry.width/2,h.y+=a.geometry.height+d):(h.x=c==mxConstants.DIRECTION_WEST?h.x-d:h.x+(a.geometry.width+
-d),h.y+=a.geometry.height/2);d=this.view.getState(this.model.getParent(a));var f=this.view.scale,k=this.view.translate,l=k.x*f,k=k.y*f;null!=d&&this.model.isVertex(d.cell)&&(l=d.x,k=d.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(h.x+=a.parent.geometry.x,h.y+=a.parent.geometry.y);e=e||mxEvent.isControlDown(b)&&!g?null:this.getCellAt(l+h.x*f,k+h.y*f);this.model.isAncestor(e,a)&&(e=null);for(d=e;null!=d;){if(this.isCellLocked(d)){e=null;break}d=this.model.getParent(d)}null!=e&&(d=this.view.getState(a),
-f=this.view.getState(e),null!=d&&null!=f&&mxUtils.intersects(d,f)&&(e=null));if(g=!mxEvent.isShiftDown(b)||g)c==mxConstants.DIRECTION_NORTH?h.y-=a.geometry.height/2:c==mxConstants.DIRECTION_SOUTH?h.y+=a.geometry.height/2:h.x=c==mxConstants.DIRECTION_WEST?h.x-a.geometry.width/2:h.x+a.geometry.width/2;null==e||this.isCellConnectable(e)||(d=this.getModel().getParent(e),this.getModel().isVertex(d)&&this.isCellConnectable(d)&&(e=d));if(e==a||this.model.isEdge(e)||!this.isCellConnectable(e))e=null;d=[];
-this.model.beginUpdate();try{var m=null!=e&&this.isSwimlane(e),f=m?null:e;if(null==f&&g){for(var l=a,n=this.getCellGeometry(a);null!=n&&n.relative;)l=this.getModel().getParent(l),n=this.getCellGeometry(l);l=this.getCompositeParent(l);f=this.duplicateCells([l],!1)[0];n=this.getCellGeometry(f);null!=n&&(n.x=h.x-n.width/2,n.y=h.y-n.height/2);m&&(this.addCells([f],e,null,null,null,!0),e=null)}m=null;null!=this.layoutManager&&(m=this.layoutManager.getLayout(this.model.getParent(a)));var p=mxEvent.isControlDown(b)&&
-g||null==e&&null!=m&&m.constructor==mxStackLayout?null:this.insertEdge(this.model.getParent(a),null,"",a,f,this.createCurrentEdgeStyle());if(null!=p&&this.connectionHandler.insertBeforeSource){var q=null;for(b=a;null!=b.parent&&null!=b.geometry&&b.geometry.relative&&b.parent!=p.parent;)b=this.model.getParent(b);null!=b&&null!=b.parent&&b.parent==p.parent&&(q=b.parent.getIndex(b),this.model.add(b.parent,p,q))}null==e&&null!=f&&null!=m&&null!=a.parent&&m.constructor==mxStackLayout&&c==mxConstants.DIRECTION_WEST&&
-(q=a.parent.getIndex(a),this.model.add(a.parent,f,q));null!=p&&d.push(p);null==e&&null!=f&&d.push(f);null==f&&null!=p&&p.geometry.setTerminalPoint(h,!1);null!=p&&this.fireEvent(new mxEventObject("cellsInserted","cells",[p]))}finally{this.model.endUpdate()}return d};
+Graph.prototype.connectVertex=function(a,c,d,b,f,e){if(a.geometry.relative&&this.model.isEdge(a.parent))return[];e=e?e:!1;var h=a.geometry.relative&&null!=a.parent.geometry?new mxPoint(a.parent.geometry.width*a.geometry.x,a.parent.geometry.height*a.geometry.y):new mxPoint(a.geometry.x,a.geometry.y);c==mxConstants.DIRECTION_NORTH?(h.x+=a.geometry.width/2,h.y-=d):c==mxConstants.DIRECTION_SOUTH?(h.x+=a.geometry.width/2,h.y+=a.geometry.height+d):(h.x=c==mxConstants.DIRECTION_WEST?h.x-d:h.x+(a.geometry.width+
+d),h.y+=a.geometry.height/2);d=this.view.getState(this.model.getParent(a));var g=this.view.scale,k=this.view.translate,l=k.x*g,k=k.y*g;null!=d&&this.model.isVertex(d.cell)&&(l=d.x,k=d.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(h.x+=a.parent.geometry.x,h.y+=a.parent.geometry.y);e=e||mxEvent.isControlDown(b)&&!f?null:this.getCellAt(l+h.x*g,k+h.y*g);this.model.isAncestor(e,a)&&(e=null);for(d=e;null!=d;){if(this.isCellLocked(d)){e=null;break}d=this.model.getParent(d)}null!=e&&(d=this.view.getState(a),
+g=this.view.getState(e),null!=d&&null!=g&&mxUtils.intersects(d,g)&&(e=null));if(f=!mxEvent.isShiftDown(b)||f)c==mxConstants.DIRECTION_NORTH?h.y-=a.geometry.height/2:c==mxConstants.DIRECTION_SOUTH?h.y+=a.geometry.height/2:h.x=c==mxConstants.DIRECTION_WEST?h.x-a.geometry.width/2:h.x+a.geometry.width/2;null==e||this.isCellConnectable(e)||(d=this.getModel().getParent(e),this.getModel().isVertex(d)&&this.isCellConnectable(d)&&(e=d));if(e==a||this.model.isEdge(e)||!this.isCellConnectable(e))e=null;d=[];
+this.model.beginUpdate();try{var m=null!=e&&this.isSwimlane(e),g=m?null:e;if(null==g&&f){for(var l=a,n=this.getCellGeometry(a);null!=n&&n.relative;)l=this.getModel().getParent(l),n=this.getCellGeometry(l);l=this.getCompositeParent(l);g=this.duplicateCells([l],!1)[0];n=this.getCellGeometry(g);null!=n&&(n.x=h.x-n.width/2,n.y=h.y-n.height/2);m&&(this.addCells([g],e,null,null,null,!0),e=null)}m=null;null!=this.layoutManager&&(m=this.layoutManager.getLayout(this.model.getParent(a)));var p=mxEvent.isControlDown(b)&&
+f||null==e&&null!=m&&m.constructor==mxStackLayout?null:this.insertEdge(this.model.getParent(a),null,"",a,g,this.createCurrentEdgeStyle());if(null!=p&&this.connectionHandler.insertBeforeSource){var q=null;for(b=a;null!=b.parent&&null!=b.geometry&&b.geometry.relative&&b.parent!=p.parent;)b=this.model.getParent(b);null!=b&&null!=b.parent&&b.parent==p.parent&&(q=b.parent.getIndex(b),this.model.add(b.parent,p,q))}null==e&&null!=g&&null!=m&&null!=a.parent&&m.constructor==mxStackLayout&&c==mxConstants.DIRECTION_WEST&&
+(q=a.parent.getIndex(a),this.model.add(a.parent,g,q));null!=p&&d.push(p);null==e&&null!=g&&d.push(g);null==g&&null!=p&&p.geometry.setTerminalPoint(h,!1);null!=p&&this.fireEvent(new mxEventObject("cellsInserted","cells",[p]))}finally{this.model.endUpdate()}return d};
Graph.prototype.getIndexableText=function(){var a=document.createElement("div"),c=[],d,b;for(b in this.model.cells)if(d=this.model.cells[b],this.model.isVertex(d)||this.model.isEdge(d))this.isHtmlLabel(d)?(a.innerHTML=this.getLabel(d),d=mxUtils.extractTextWithWhitespace([a])):d=this.getLabel(d),d=mxUtils.trim(d.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<d.length&&c.push(d);return c.join(" ")};
Graph.prototype.convertValueToString=function(a){var c=this.model.getValue(a);if(null!=c&&"object"==typeof c){if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder")){for(var c=a.getAttribute("placeholder"),d=a,b=null;null==b&&null!=d;)null!=d.value&&"object"==typeof d.value&&(b=d.hasAttribute(c)?null!=d.getAttribute(c)?d.getAttribute(c):"":null),d=this.model.getParent(d);return b||""}return c.getAttribute("label")||""}return mxGraph.prototype.convertValueToString.apply(this,arguments)};
Graph.prototype.getLinksForState=function(a){return null!=a&&null!=a.text&&null!=a.text.node?a.text.node.getElementsByTagName("a"):null};Graph.prototype.getLinkForCell=function(a){return null!=a.value&&"object"==typeof a.value?(a=a.value.getAttribute("link"),null!=a&&"javascript:"===a.toLowerCase().substring(0,11)&&(a=a.substring(11)),a):null};
Graph.prototype.getCellStyle=function(a){var c=mxGraph.prototype.getCellStyle.apply(this,arguments);if(null!=a&&null!=this.layoutManager){var d=this.model.getParent(a);this.model.isVertex(d)&&this.isCellCollapsed(a)&&(d=this.layoutManager.getLayout(d),null!=d&&d.constructor==mxStackLayout&&(c[mxConstants.STYLE_HORIZONTAL]=!d.horizontal))}return c};
Graph.prototype.updateAlternateBounds=function(a,c,d){if(null!=a&&null!=c&&null!=this.layoutManager&&null!=c.alternateBounds){var b=this.layoutManager.getLayout(this.model.getParent(a));null!=b&&b.constructor==mxStackLayout&&(b.horizontal?c.alternateBounds.height=0:c.alternateBounds.width=0)}mxGraph.prototype.updateAlternateBounds.apply(this,arguments)};Graph.prototype.isMoveCellsEvent=function(a,c){return mxEvent.isShiftDown(a)||"1"==mxUtils.getValue(c.style,"moveCells","0")};
-Graph.prototype.foldCells=function(a,c,d,b,g){c=null!=c?c:!1;null==d&&(d=this.getFoldableCells(this.getSelectionCells(),a));if(null!=d){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var e=0;e<d.length;e++){var h=this.view.getState(d[e]),f=this.getCellGeometry(d[e]);if(null!=h&&null!=f){var k=Math.round(f.width-h.width/this.view.scale),l=Math.round(f.height-h.height/this.view.scale);if(0!=l||0!=k){var m=this.model.getParent(d[e]),n=this.layoutManager.getLayout(m);
-null==n?null!=g&&this.isMoveCellsEvent(g,h)&&this.moveSiblings(h,m,k,l):null!=g&&mxEvent.isAltDown(g)||n.constructor!=mxStackLayout||n.resizeLast||this.resizeParentStacks(m,n,k,l)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(d)}};
-Graph.prototype.moveSiblings=function(a,c,d,b){this.model.beginUpdate();try{var g=this.getCellsBeyond(a.x,a.y,c,!0,!0);for(c=0;c<g.length;c++)if(g[c]!=a.cell){var e=this.view.getState(g[c]),h=this.getCellGeometry(g[c]);null!=e&&null!=h&&(h=h.clone(),h.translate(Math.round(d*Math.max(0,Math.min(1,(e.x-a.x)/a.width))),Math.round(b*Math.max(0,Math.min(1,(e.y-a.y)/a.height)))),this.model.setGeometry(g[c],h))}}finally{this.model.endUpdate()}};
-Graph.prototype.resizeParentStacks=function(a,c,d,b){if(null!=this.layoutManager&&null!=c&&c.constructor==mxStackLayout&&!c.resizeLast){this.model.beginUpdate();try{for(var g=c.horizontal;null!=a&&null!=c&&c.constructor==mxStackLayout&&c.horizontal==g&&!c.resizeLast;){var e=this.getCellGeometry(a),h=this.view.getState(a);null!=h&&null!=e&&(e=e.clone(),c.horizontal?e.width+=d+Math.min(0,h.width/this.view.scale-e.width):e.height+=b+Math.min(0,h.height/this.view.scale-e.height),this.model.setGeometry(a,
+Graph.prototype.foldCells=function(a,c,d,b,f){c=null!=c?c:!1;null==d&&(d=this.getFoldableCells(this.getSelectionCells(),a));if(null!=d){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var e=0;e<d.length;e++){var h=this.view.getState(d[e]),g=this.getCellGeometry(d[e]);if(null!=h&&null!=g){var k=Math.round(g.width-h.width/this.view.scale),l=Math.round(g.height-h.height/this.view.scale);if(0!=l||0!=k){var m=this.model.getParent(d[e]),n=this.layoutManager.getLayout(m);
+null==n?null!=f&&this.isMoveCellsEvent(f,h)&&this.moveSiblings(h,m,k,l):null!=f&&mxEvent.isAltDown(f)||n.constructor!=mxStackLayout||n.resizeLast||this.resizeParentStacks(m,n,k,l)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(d)}};
+Graph.prototype.moveSiblings=function(a,c,d,b){this.model.beginUpdate();try{var f=this.getCellsBeyond(a.x,a.y,c,!0,!0);for(c=0;c<f.length;c++)if(f[c]!=a.cell){var e=this.view.getState(f[c]),h=this.getCellGeometry(f[c]);null!=e&&null!=h&&(h=h.clone(),h.translate(Math.round(d*Math.max(0,Math.min(1,(e.x-a.x)/a.width))),Math.round(b*Math.max(0,Math.min(1,(e.y-a.y)/a.height)))),this.model.setGeometry(f[c],h))}}finally{this.model.endUpdate()}};
+Graph.prototype.resizeParentStacks=function(a,c,d,b){if(null!=this.layoutManager&&null!=c&&c.constructor==mxStackLayout&&!c.resizeLast){this.model.beginUpdate();try{for(var f=c.horizontal;null!=a&&null!=c&&c.constructor==mxStackLayout&&c.horizontal==f&&!c.resizeLast;){var e=this.getCellGeometry(a),h=this.view.getState(a);null!=h&&null!=e&&(e=e.clone(),c.horizontal?e.width+=d+Math.min(0,h.width/this.view.scale-e.width):e.height+=b+Math.min(0,h.height/this.view.scale-e.height),this.model.setGeometry(a,
e));a=this.model.getParent(a);c=this.layoutManager.getLayout(a)}}finally{this.model.endUpdate()}}};Graph.prototype.isContainer=function(a){var c=this.getCurrentCellStyle(a);return this.isSwimlane(a)?"0"!=c.container:"1"==c.container};Graph.prototype.isExtendParent=function(a){var c=this.model.getParent(a);return null!=c&&(c=this.getCurrentCellStyle(c),null!=c.expand)?"0"!=c.expand:mxGraph.prototype.isExtendParent.apply(this,arguments)};
Graph.prototype.isCellConnectable=function(a){var c=this.getCurrentCellStyle(a);return null!=c.connectable?"0"!=c.connectable:mxGraph.prototype.isCellConnectable.apply(this,arguments)};Graph.prototype.isLabelMovable=function(a){var c=this.getCurrentCellStyle(a);return null!=c.movableLabel?"0"!=c.movableLabel:mxGraph.prototype.isLabelMovable.apply(this,arguments)};Graph.prototype.selectAll=function(a){a=a||this.getDefaultParent();this.isCellLocked(a)||mxGraph.prototype.selectAll.apply(this,arguments)};
Graph.prototype.selectCells=function(a,c,d){d=d||this.getDefaultParent();this.isCellLocked(d)||mxGraph.prototype.selectCells.apply(this,arguments)};Graph.prototype.getSwimlaneAt=function(a,c,d){var b=mxGraph.prototype.getSwimlaneAt.apply(this,arguments);this.isCellLocked(b)&&(b=null);return b};
Graph.prototype.isCellFoldable=function(a){var c=this.getCurrentCellStyle(a);return this.foldingEnabled&&("1"==c.treeFolding||!this.isCellLocked(a)&&(this.isContainer(a)&&"0"!=c.collapsible||!this.isContainer(a)&&"1"==c.collapsible))};Graph.prototype.reset=function(){this.isEditing()&&this.stopEditing(!0);this.escape();this.isSelectionEmpty()||this.clearSelection()};
Graph.prototype.zoom=function(a,c){a=Math.max(.01,Math.min(this.view.scale*a,160))/this.view.scale;mxGraph.prototype.zoom.apply(this,arguments)};Graph.prototype.zoomIn=function(){.15>this.view.scale?this.zoom((this.view.scale+.01)/this.view.scale):this.zoom(Math.round(this.view.scale*this.zoomFactor*20)/20/this.view.scale)};Graph.prototype.zoomOut=function(){.15>=this.view.scale?this.zoom((this.view.scale-.01)/this.view.scale):this.zoom(Math.round(1/this.zoomFactor*this.view.scale*20)/20/this.view.scale)};
-Graph.prototype.getTooltipForCell=function(a){var c="";if(mxUtils.isNode(a.value)){var d=a.value.getAttribute("tooltip");if(null!=d)null!=d&&this.isReplacePlaceholders(a)&&(d=this.replacePlaceholders(a,d)),c=this.sanitizeHtml(d);else{d=this.builtInProperties;a=a.value.attributes;var b=[];this.isEnabled()&&d.push("link");for(var g=0;g<a.length;g++)0>mxUtils.indexOf(d,a[g].nodeName)&&0<a[g].nodeValue.length&&b.push({name:a[g].nodeName,value:a[g].nodeValue});b.sort(function(a,b){return a.name<b.name?
--1:a.name>b.name?1:0});for(g=0;g<b.length;g++)"link"==b[g].name&&this.isCustomLink(b[g].value)||(c+=("link"!=b[g].name?"<b>"+b[g].name+":</b> ":"")+mxUtils.htmlEntities(b[g].value)+"\n");0<c.length&&(c=c.substring(0,c.length-1),mxClient.IS_SVG&&(c='<div style="max-width:360px;">'+c+"</div>"))}}return c};Graph.prototype.stringToBytes=function(a){return Graph.stringToBytes(a)};Graph.prototype.bytesToString=function(a){return Graph.bytesToString(a)};Graph.prototype.compressNode=function(a){return Graph.compressNode(a)};
+Graph.prototype.getTooltipForCell=function(a){var c="";if(mxUtils.isNode(a.value)){var d=a.value.getAttribute("tooltip");if(null!=d)null!=d&&this.isReplacePlaceholders(a)&&(d=this.replacePlaceholders(a,d)),c=this.sanitizeHtml(d);else{d=this.builtInProperties;a=a.value.attributes;var b=[];this.isEnabled()&&d.push("link");for(var f=0;f<a.length;f++)0>mxUtils.indexOf(d,a[f].nodeName)&&0<a[f].nodeValue.length&&b.push({name:a[f].nodeName,value:a[f].nodeValue});b.sort(function(a,b){return a.name<b.name?
+-1:a.name>b.name?1:0});for(f=0;f<b.length;f++)"link"==b[f].name&&this.isCustomLink(b[f].value)||(c+=("link"!=b[f].name?"<b>"+b[f].name+":</b> ":"")+mxUtils.htmlEntities(b[f].value)+"\n");0<c.length&&(c=c.substring(0,c.length-1),mxClient.IS_SVG&&(c='<div style="max-width:360px;">'+c+"</div>"))}}return c};Graph.prototype.stringToBytes=function(a){return Graph.stringToBytes(a)};Graph.prototype.bytesToString=function(a){return Graph.bytesToString(a)};Graph.prototype.compressNode=function(a){return Graph.compressNode(a)};
Graph.prototype.compress=function(a,c){return Graph.compress(a,c)};Graph.prototype.decompress=function(a,c){return Graph.decompress(a,c)};Graph.prototype.zapGremlins=function(a){return Graph.zapGremlins(a)};HoverIcons=function(a){this.graph=a;this.init()};HoverIcons.prototype.arrowSpacing=2;HoverIcons.prototype.updateDelay=500;HoverIcons.prototype.activationDelay=140;HoverIcons.prototype.currentState=null;HoverIcons.prototype.activeArrow=null;HoverIcons.prototype.inactiveOpacity=15;
HoverIcons.prototype.cssCursor="copy";HoverIcons.prototype.checkCollisions=!0;HoverIcons.prototype.arrowFill="#29b6f2";HoverIcons.prototype.triangleUp=mxClient.IS_SVG?Graph.createSvgImage(18,28,'<path d="m 6 26 L 12 26 L 12 12 L 18 12 L 9 1 L 1 12 L 6 12 z" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/triangle-up.png",26,14);
HoverIcons.prototype.triangleRight=mxClient.IS_SVG?Graph.createSvgImage(26,18,'<path d="m 1 6 L 14 6 L 14 1 L 26 9 L 14 18 L 14 12 L 1 12 z" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/triangle-right.png",14,26);HoverIcons.prototype.triangleDown=mxClient.IS_SVG?Graph.createSvgImage(18,26,'<path d="m 6 1 L 6 14 L 1 14 L 9 26 L 18 14 L 12 14 L 12 1 z" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/triangle-down.png",26,14);
@@ -2613,56 +2614,56 @@ this.resetActiveArrow()}));return d};HoverIcons.prototype.resetActiveArrow=funct
HoverIcons.prototype.visitNodes=function(a){for(var c=0;c<this.elts.length;c++)null!=this.elts[c]&&a(this.elts[c])};HoverIcons.prototype.removeNodes=function(){this.visitNodes(function(a){null!=a.parentNode&&a.parentNode.removeChild(a)})};HoverIcons.prototype.setDisplay=function(a){this.visitNodes(function(c){c.style.display=a})};HoverIcons.prototype.isActive=function(){return null!=this.activeArrow&&null!=this.currentState};
HoverIcons.prototype.drag=function(a,c,d){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);null!=this.currentState&&(this.graph.connectionHandler.start(this.currentState,c,d),this.graph.isMouseTrigger=mxEvent.isMouseEvent(a),this.graph.isMouseDown=!0,c=this.graph.selectionCellsHandler.getHandler(this.currentState.cell),null!=c&&c.setHandlesVisible(!1),c=this.graph.connectionHandler.edgeState,null!=a&&mxEvent.isShiftDown(a)&&mxEvent.isControlDown(a)&&null!=c&&"orthogonalEdgeStyle"===
mxUtils.getValue(c.style,mxConstants.STYLE_EDGE,null)&&(a=this.getDirection(),c.cell.style=mxUtils.setStyle(c.cell.style,"sourcePortConstraint",a),c.style.sourcePortConstraint=a))};HoverIcons.prototype.getStateAt=function(a,c,d){return this.graph.view.getState(this.graph.getCellAt(c,d))};
-HoverIcons.prototype.click=function(a,c,d){var b=d.getEvent(),g=d.getGraphX(),e=d.getGraphY(),g=this.getStateAt(a,g,e);null==g||!this.graph.model.isEdge(g.cell)||mxEvent.isControlDown(b)||g.getVisibleTerminalState(!0)!=a&&g.getVisibleTerminalState(!1)!=a?null!=a&&this.graph.selectCellsForConnectVertex(this.graph.connectVertex(a.cell,c,this.graph.defaultEdgeLength,b),b,this):(this.graph.setSelectionCell(g.cell),this.reset());d.consume()};
+HoverIcons.prototype.click=function(a,c,d){var b=d.getEvent(),f=d.getGraphX(),e=d.getGraphY(),f=this.getStateAt(a,f,e);null==f||!this.graph.model.isEdge(f.cell)||mxEvent.isControlDown(b)||f.getVisibleTerminalState(!0)!=a&&f.getVisibleTerminalState(!1)!=a?null!=a&&this.graph.selectCellsForConnectVertex(this.graph.connectVertex(a.cell,c,this.graph.defaultEdgeLength,b),b,this):(this.graph.setSelectionCell(f.cell),this.reset());d.consume()};
HoverIcons.prototype.reset=function(a){null!=a&&!a||null==this.updateThread||window.clearTimeout(this.updateThread);this.activeArrow=this.currentState=this.mouseDownPoint=null;this.removeNodes();this.bbox=null};
HoverIcons.prototype.repaint=function(){this.bbox=null;if(null!=this.currentState){this.currentState=this.getState(this.currentState);if(null!=this.currentState&&this.graph.model.isVertex(this.currentState.cell)&&this.graph.isCellConnectable(this.currentState.cell)){var a=mxRectangle.fromRectangle(this.currentState);null!=this.currentState.shape&&null!=this.currentState.shape.boundingBox&&(a=mxRectangle.fromRectangle(this.currentState.shape.boundingBox));a.grow(this.graph.tolerance);a.grow(this.arrowSpacing);
var c=this.graph.selectionCellsHandler.getHandler(this.currentState.cell),d=null;null!=c&&(a.x-=c.horizontalOffset/2,a.y-=c.verticalOffset/2,a.width+=c.horizontalOffset,a.height+=c.verticalOffset,null!=c.rotationShape&&null!=c.rotationShape.node&&"hidden"!=c.rotationShape.node.style.visibility&&"none"!=c.rotationShape.node.style.display&&null!=c.rotationShape.boundingBox&&(d=c.rotationShape.boundingBox));c=mxUtils.bind(this,function(a,b,c){if(null!=d){var e=new mxRectangle(b,c,a.clientWidth,a.clientHeight);
mxUtils.intersects(e,d)&&(a==this.arrowUp?c-=e.y+e.height-d.y:a==this.arrowRight?b+=d.x+d.width-e.x:a==this.arrowDown?c+=d.y+d.height-e.y:a==this.arrowLeft&&(b-=e.x+e.width-d.x))}a.style.left=b+"px";a.style.top=c+"px";mxUtils.setOpacity(a,this.inactiveOpacity)});c(this.arrowUp,Math.round(this.currentState.getCenterX()-this.triangleUp.width/2-this.tolerance),Math.round(a.y-this.triangleUp.height-this.tolerance));c(this.arrowRight,Math.round(a.x+a.width-this.tolerance),Math.round(this.currentState.getCenterY()-
-this.triangleRight.height/2-this.tolerance));c(this.arrowDown,parseInt(this.arrowUp.style.left),Math.round(a.y+a.height-this.tolerance));c(this.arrowLeft,Math.round(a.x-this.triangleLeft.width-this.tolerance),parseInt(this.arrowRight.style.top));if(this.checkCollisions){var c=this.graph.getCellAt(a.x+a.width+this.triangleRight.width/2,this.currentState.getCenterY()),b=this.graph.getCellAt(a.x-this.triangleLeft.width/2,this.currentState.getCenterY()),g=this.graph.getCellAt(this.currentState.getCenterX(),
-a.y-this.triangleUp.height/2),a=this.graph.getCellAt(this.currentState.getCenterX(),a.y+a.height+this.triangleDown.height/2);null!=c&&c==b&&b==g&&g==a&&(a=g=b=c=null);var e=this.graph.getCellGeometry(this.currentState.cell),h=mxUtils.bind(this,function(a,b){var c=this.graph.model.isVertex(a)&&this.graph.getCellGeometry(a);null==a||this.graph.model.isAncestor(a,this.currentState.cell)||this.graph.isSwimlane(a)||!(null==c||null==e||c.height<3*e.height&&c.width<3*e.width)?b.style.visibility="visible":
-b.style.visibility="hidden"});h(c,this.arrowRight);h(b,this.arrowLeft);h(g,this.arrowUp);h(a,this.arrowDown)}else this.arrowLeft.style.visibility="visible",this.arrowRight.style.visibility="visible",this.arrowUp.style.visibility="visible",this.arrowDown.style.visibility="visible";this.graph.tooltipHandler.isEnabled()?(this.arrowLeft.setAttribute("title",mxResources.get("plusTooltip")),this.arrowRight.setAttribute("title",mxResources.get("plusTooltip")),this.arrowUp.setAttribute("title",mxResources.get("plusTooltip")),
+this.triangleRight.height/2-this.tolerance));c(this.arrowDown,parseInt(this.arrowUp.style.left),Math.round(a.y+a.height-this.tolerance));c(this.arrowLeft,Math.round(a.x-this.triangleLeft.width-this.tolerance),parseInt(this.arrowRight.style.top));if(this.checkCollisions){var c=this.graph.getCellAt(a.x+a.width+this.triangleRight.width/2,this.currentState.getCenterY()),b=this.graph.getCellAt(a.x-this.triangleLeft.width/2,this.currentState.getCenterY()),f=this.graph.getCellAt(this.currentState.getCenterX(),
+a.y-this.triangleUp.height/2),a=this.graph.getCellAt(this.currentState.getCenterX(),a.y+a.height+this.triangleDown.height/2);null!=c&&c==b&&b==f&&f==a&&(a=f=b=c=null);var e=this.graph.getCellGeometry(this.currentState.cell),h=mxUtils.bind(this,function(a,b){var c=this.graph.model.isVertex(a)&&this.graph.getCellGeometry(a);null==a||this.graph.model.isAncestor(a,this.currentState.cell)||this.graph.isSwimlane(a)||!(null==c||null==e||c.height<3*e.height&&c.width<3*e.width)?b.style.visibility="visible":
+b.style.visibility="hidden"});h(c,this.arrowRight);h(b,this.arrowLeft);h(f,this.arrowUp);h(a,this.arrowDown)}else this.arrowLeft.style.visibility="visible",this.arrowRight.style.visibility="visible",this.arrowUp.style.visibility="visible",this.arrowDown.style.visibility="visible";this.graph.tooltipHandler.isEnabled()?(this.arrowLeft.setAttribute("title",mxResources.get("plusTooltip")),this.arrowRight.setAttribute("title",mxResources.get("plusTooltip")),this.arrowUp.setAttribute("title",mxResources.get("plusTooltip")),
this.arrowDown.setAttribute("title",mxResources.get("plusTooltip"))):(this.arrowLeft.removeAttribute("title"),this.arrowRight.removeAttribute("title"),this.arrowUp.removeAttribute("title"),this.arrowDown.removeAttribute("title"))}else this.reset();null!=this.currentState&&(this.bbox=this.computeBoundingBox(),null!=this.bbox&&this.bbox.grow(10))}};
HoverIcons.prototype.computeBoundingBox=function(){var a=this.graph.model.isEdge(this.currentState.cell)?null:mxRectangle.fromRectangle(this.currentState);this.visitNodes(function(c){null!=c.parentNode&&(c=new mxRectangle(c.offsetLeft,c.offsetTop,c.offsetWidth,c.offsetHeight),null==a?a=c:a.add(c))});return a};
HoverIcons.prototype.getState=function(a){if(null!=a)if(a=a.cell,this.graph.getModel().contains(a)){if(this.graph.getModel().isVertex(a)&&!this.graph.isCellConnectable(a)){var c=this.graph.getModel().getParent(a);this.graph.getModel().isVertex(c)&&this.graph.isCellConnectable(c)&&(a=c)}if(this.graph.isCellLocked(a)||this.graph.model.isEdge(a))a=null;a=this.graph.view.getState(a);null!=a&&null==a.style&&(a=null)}else a=null;return a};
HoverIcons.prototype.update=function(a,c,d){if(!this.graph.connectionArrowsEnabled||null!=a&&"0"==mxUtils.getValue(a.style,"allowArrows","1"))this.reset();else{null!=a&&null!=a.cell.geometry&&a.cell.geometry.relative&&this.graph.model.isEdge(a.cell.parent)&&(a=null);var b=null;this.prev!=a||this.isActive()?(this.startTime=(new Date).getTime(),this.prev=a,b=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,c,d))}),this.updateDelay+10))):null!=this.startTime&&(b=(new Date).getTime()-this.startTime);this.setDisplay("");null!=this.currentState&&this.currentState!=a&&b<this.activationDelay&&null!=this.bbox&&!mxUtils.contains(this.bbox,c,d)?this.reset(!1):(null!=this.currentState||b>this.activationDelay)&&this.currentState!=a&&(b>this.updateDelay&&null!=a||null==this.bbox||null==c||null==d||!mxUtils.contains(this.bbox,
c,d))&&(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())}};
-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};Graph.prototype.createParent=function(a,c,d,b,g){a=this.cloneCell(a);for(var e=0;e<d;e++){var h=this.cloneCell(c),f=this.getCellGeometry(h);null!=f&&(f.x+=e*b,f.y+=e*g);a.insert(h)}return a};
+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};Graph.prototype.createParent=function(a,c,d,b,f){a=this.cloneCell(a);for(var e=0;e<d;e++){var h=this.cloneCell(c),g=this.getCellGeometry(h);null!=g&&(g.x+=e*b,g.y+=e*f);a.insert(h)}return a};
Graph.prototype.createTable=function(a,c,d,b){d=null!=d?d:40;b=null!=b?b:30;return this.createParent(this.createVertex(null,null,"",0,0,c*d,a*b,"html=1;whiteSpace=wrap;container=1;collapsible=0;containerType=table;childLayout=stackLayout;resizeLast=1;resizeParent=0;horizontalStack=0;"),this.createParent(this.createVertex(null,null,"",0,0,c*d,b,"html=1;whiteSpace=wrap;container=1;collapsible=0;points=[[0,0.5],[1,0.5]];part=1;portConstraint=eastwest;childLayout=stackLayout;resizeLast=1;resizeParent=0;"),
this.createVertex(null,null,"",0,0,d,b,"html=1;whiteSpace=wrap;connectable=0;part=1;"),c,d,0),a,0,b)};
-Graph.prototype.createCrossFunctionalSwimlane=function(a,c,d,b){d=null!=d?d:120;b=null!=b?b:120;var g=this.createVertex(null,null,"",0,0,c*d,a*b,"swimlane;html=1;whiteSpace=wrap;container=1;collapsible=0;recursiveResize=0;expand=0;containerType=table;childLayout=stackLayout;resizeLast=1;resizeParent=0;horizontalStack=0;"),e=mxUtils.getValue(this.getCellStyle(g),mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);g.geometry.width+=e;g.geometry.height+=e;var h=this.createVertex(null,null,"",
-0,e,c*d+e,b,"swimlane;html=1;whiteSpace=wrap;container=1;collapsible=0;recursiveResize=0;expand=0;horizontal=0;points=[[0,0.5],[1,0.5]];part=1;portConstraint=eastwest;childLayout=stackLayout;resizeLast=1;resizeParent=0;");g.insert(this.createParent(h,this.createVertex(null,null,"",e,0,d,b,"swimlane;html=1;whiteSpace=wrap;container=1;collapsible=0;recursiveResize=0;expand=0;connectable=0;part=1;"),c,d,0));return 1<a?(h.geometry.y=b+e,this.createParent(g,this.createParent(h,this.createVertex(null,null,
-"",e,0,d,b,"swimlane;html=1;whiteSpace=wrap;container=1;collapsible=0;recursiveResize=0;expand=0;connectable=0;part=1;startSize=0;"),c,d,0),a-1,0,b)):g};Graph.prototype.isTableCell=function(a){return this.isTableRow(this.model.getParent(a))};Graph.prototype.isTableRow=function(a){return this.isTable(this.model.getParent(a))};Graph.prototype.isTable=function(a){a=this.getCellStyle(a);return null!=a&&"table"==a.containerType};
-Graph.prototype.setTableRowHeight=function(a,c){var d=this.getModel(),b=d.getParent(a),g=b.getIndex(a);d.beginUpdate();try{var e=this.getCellGeometry(a),h=0;null!=e&&(h=c-e.height,e=e.clone(),e.height=c,d.setGeometry(a,e));for(var f=0;f<d.getChildCount(a);f++){var k=d.getChildAt(a,f);d.isVertex(k)&&(e=this.getCellGeometry(k),null!=e&&(e=e.clone(),e.height=c,d.setGeometry(k,e)))}if(g<d.getChildCount(b)-1&&(a=d.getChildAt(b,g+1),e=this.getCellGeometry(a),null!=e))for(e=e.clone(),e.y+=h,e.height-=h,
-d.setGeometry(a,e),f=0;f<d.getChildCount(a);f++)if(k=d.getChildAt(a,f),d.isVertex(k)){var l=this.getCellGeometry(k);null!=l&&(l=l.clone(),l.height=e.height,d.setGeometry(k,l))}}finally{d.endUpdate()}};
-Graph.prototype.setTableColumnWidth=function(a,c){var d=this.getModel(),b=d.getParent(a),g=d.getParent(b),e=b.getIndex(a);d.beginUpdate();try{var h=this.getCellGeometry(a),f=0;null!=h&&(f=c-h.width);for(var k=0;k<d.getChildCount(g);k++)if(b=d.getChildAt(g,k),d.isVertex(b)){var l=d.getChildAt(b,e);d.isVertex(l)&&(h=this.getCellGeometry(l),null!=h&&(h=h.clone(),h.width=c,d.setGeometry(l,h)));e<d.getChildCount(b)-1&&(l=d.getChildAt(b,e+1),d.isVertex(l)&&(h=this.getCellGeometry(l),null!=h&&(h=h.clone(),
-h.x+=f,h.width-=f,d.setGeometry(l,h))))}}finally{d.endUpdate()}};
-Graph.prototype.getActualStartSize=function(a,c){var d=new mxRectangle;if(this.isSwimlane(a)){var b=this.getCurrentCellStyle(a,c),g=parseInt(mxUtils.getValue(b,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE)),e=1==mxUtils.getValue(b,mxConstants.STYLE_FLIPH,0),h=1==mxUtils.getValue(b,mxConstants.STYLE_FLIPV,0),f=0;mxUtils.getValue(b,mxConstants.STYLE_HORIZONTAL,!0)||f++;b=mxUtils.getValue(b,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);b==mxConstants.DIRECTION_NORTH?f++:b==mxConstants.DIRECTION_WEST?
-f+=2:b==mxConstants.DIRECTION_SOUTH&&(f+=3);f=mxUtils.mod(f,4);0==f?d.y=g:1==f?d.x=g:2==f?d.height=g:3==f&&(d.width=g);h&&(g=d.y,d.y=d.height,d.height=g);e&&(g=d.x,d.x=d.width,d.width=g)}return d};
+Graph.prototype.createCrossFunctionalSwimlane=function(a,c,d,b){d=null!=d?d:120;b=null!=b?b:120;var f=this.createVertex(null,null,"",0,0,c*d,a*b,"swimlane;html=1;whiteSpace=wrap;container=1;collapsible=0;recursiveResize=0;expand=0;containerType=table;childLayout=stackLayout;resizeLast=1;resizeParent=0;horizontalStack=0;"),e=mxUtils.getValue(this.getCellStyle(f),mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);f.geometry.width+=e;f.geometry.height+=e;var h=this.createVertex(null,null,"",
+0,e,c*d+e,b,"swimlane;html=1;whiteSpace=wrap;container=1;collapsible=0;recursiveResize=0;expand=0;horizontal=0;points=[[0,0.5],[1,0.5]];part=1;portConstraint=eastwest;childLayout=stackLayout;resizeLast=1;resizeParent=0;");f.insert(this.createParent(h,this.createVertex(null,null,"",e,0,d,b,"swimlane;html=1;whiteSpace=wrap;container=1;collapsible=0;recursiveResize=0;expand=0;connectable=0;part=1;"),c,d,0));return 1<a?(h.geometry.y=b+e,this.createParent(f,this.createParent(h,this.createVertex(null,null,
+"",e,0,d,b,"swimlane;html=1;whiteSpace=wrap;container=1;collapsible=0;recursiveResize=0;expand=0;connectable=0;part=1;startSize=0;"),c,d,0),a-1,0,b)):f};Graph.prototype.isTableCell=function(a){return this.isTableRow(this.model.getParent(a))};Graph.prototype.isTableRow=function(a){return this.isTable(this.model.getParent(a))};Graph.prototype.isTable=function(a){a=this.getCellStyle(a);return null!=a&&"table"==a.containerType};
+Graph.prototype.setTableRowHeight=function(a,c){var d=this.getModel(),b=d.getParent(a),f=b.getIndex(a);d.beginUpdate();try{var e=this.getCellGeometry(a),h=0;null!=e&&(h=c-e.height,e=e.clone(),e.height=c,d.setGeometry(a,e));for(var g=0;g<d.getChildCount(a);g++){var k=d.getChildAt(a,g);d.isVertex(k)&&(e=this.getCellGeometry(k),null!=e&&(e=e.clone(),e.height=c,d.setGeometry(k,e)))}if(f<d.getChildCount(b)-1&&(a=d.getChildAt(b,f+1),e=this.getCellGeometry(a),null!=e))for(e=e.clone(),e.y+=h,e.height-=h,
+d.setGeometry(a,e),g=0;g<d.getChildCount(a);g++)if(k=d.getChildAt(a,g),d.isVertex(k)){var l=this.getCellGeometry(k);null!=l&&(l=l.clone(),l.height=e.height,d.setGeometry(k,l))}}finally{d.endUpdate()}};
+Graph.prototype.setTableColumnWidth=function(a,c){var d=this.getModel(),b=d.getParent(a),f=d.getParent(b),e=b.getIndex(a);d.beginUpdate();try{var h=this.getCellGeometry(a),g=0;null!=h&&(g=c-h.width);for(var k=0;k<d.getChildCount(f);k++)if(b=d.getChildAt(f,k),d.isVertex(b)){var l=d.getChildAt(b,e);d.isVertex(l)&&(h=this.getCellGeometry(l),null!=h&&(h=h.clone(),h.width=c,d.setGeometry(l,h)));e<d.getChildCount(b)-1&&(l=d.getChildAt(b,e+1),d.isVertex(l)&&(h=this.getCellGeometry(l),null!=h&&(h=h.clone(),
+h.x+=g,h.width-=g,d.setGeometry(l,h))))}}finally{d.endUpdate()}};
+Graph.prototype.getActualStartSize=function(a,c){var d=new mxRectangle;if(this.isSwimlane(a)){var b=this.getCurrentCellStyle(a,c),f=parseInt(mxUtils.getValue(b,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE)),e=1==mxUtils.getValue(b,mxConstants.STYLE_FLIPH,0),h=1==mxUtils.getValue(b,mxConstants.STYLE_FLIPV,0),g=0;mxUtils.getValue(b,mxConstants.STYLE_HORIZONTAL,!0)||g++;b=mxUtils.getValue(b,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);b==mxConstants.DIRECTION_NORTH?g++:b==mxConstants.DIRECTION_WEST?
+g+=2:b==mxConstants.DIRECTION_SOUTH&&(g+=3);g=mxUtils.mod(g,4);0==g?d.y=f:1==g?d.x=f:2==g?d.height=f:3==g&&(d.width=f);h&&(f=d.y,d.y=d.height,d.height=f);e&&(f=d.x,d.x=d.width,d.width=f)}return d};
(function(){var a=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){a.apply(this,arguments);this.validEdges=[]};var c=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(a,b){b=null!=b?b:!0;var d=this.getState(a);null!=d&&b&&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=c.apply(this,
arguments);null!=d&&b&&this.graph.model.isEdge(d.cell)&&null!=d.style&&1!=d.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(d);return d};var d=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(a,b){return d.apply(this,arguments)||null!=a.routedPoints&&null!=b.routedPoints&&!mxUtils.equalPoints(b.routedPoints,a.routedPoints)};var b=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=function(a){b.apply(this,arguments);this.graph.model.isEdge(a.cell)&&
1!=a.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(a)};mxGraphView.prototype.updateLineJumps=function(a){var b=a.absolutePoints;if(Graph.lineJumpsEnabled){var c=null!=a.routedPoints,d=null;if(null!=b&&null!=this.validEdges&&"none"!==mxUtils.getValue(a.style,"jumpStyle","none")){for(var e=function(b,c,e){var f=new mxPoint(c,e);f.type=b;d.push(f);f=null!=a.routedPoints?a.routedPoints[d.length-1]:null;return null==f||f.type!=b||f.x!=c||f.y!=e},f=.5*this.scale,c=!1,d=[],g=0;g<b.length-1;g++){for(var h=
b[g+1],k=b[g],w=[],t=b[g+2];g<b.length-2&&mxUtils.ptSegDistSq(k.x,k.y,t.x,t.y,h.x,h.y)<1*this.scale*this.scale;)h=t,g++,t=b[g+2];for(var c=e(0,k.x,k.y)||c,y=0;y<this.validEdges.length;y++){var x=this.validEdges[y],C=x.absolutePoints;if(null!=C&&mxUtils.intersects(a,x)&&"1"!=x.style.noJump)for(x=0;x<C.length-1;x++){for(var B=C[x+1],D=C[x],t=C[x+2];x<C.length-2&&mxUtils.ptSegDistSq(D.x,D.y,t.x,t.y,B.x,B.y)<1*this.scale*this.scale;)B=t,x++,t=C[x+2];t=mxUtils.intersection(k.x,k.y,h.x,h.y,D.x,D.y,B.x,
B.y);if(null!=t&&(Math.abs(t.x-k.x)>f||Math.abs(t.y-k.y)>f)&&(Math.abs(t.x-h.x)>f||Math.abs(t.y-h.y)>f)&&(Math.abs(t.x-D.x)>f||Math.abs(t.y-D.y)>f)&&(Math.abs(t.x-B.x)>f||Math.abs(t.y-B.y)>f)){B=t.x-k.x;D=t.y-k.y;t={distSq:B*B+D*D,x:t.x,y:t.y};for(B=0;B<w.length;B++)if(w[B].distSq>t.distSq){w.splice(B,0,t);t=null;break}null==t||0!=w.length&&w[w.length-1].x===t.x&&w[w.length-1].y===t.y||w.push(t)}}}for(x=0;x<w.length;x++)c=e(1,w[x].x,w[x].y)||c}t=b[b.length-1];c=e(0,t.x,t.y)||c}a.routedPoints=d;return c}return!1};
-var g=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(a,b,c){this.routedPoints=null!=this.state?this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)g.apply(this,arguments);else{var d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,e=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,f=mxUtils.getValue(this.style,
+var f=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(a,b,c){this.routedPoints=null!=this.state?this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)f.apply(this,arguments);else{var d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,e=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,g=mxUtils.getValue(this.style,
"jumpStyle","none"),h=!0,k=null,l=null,m=[],t=null;a.begin();for(var y=0;y<this.state.routedPoints.length;y++){var x=this.state.routedPoints[y],C=new mxPoint(x.x/this.scale,x.y/this.scale);0==y?C=b[0]:y==this.state.routedPoints.length-1&&(C=b[b.length-1]);var B=!1;if(null!=k&&1==x.type){var D=this.state.routedPoints[y+1],x=D.x/this.scale-C.x,D=D.y/this.scale-C.y,x=x*x+D*D;null==t&&(t=new mxPoint(C.x-k.x,C.y-k.y),l=Math.sqrt(t.x*t.x+t.y*t.y),0<l?(t.x=t.x*e/l,t.y=t.y*e/l):t=null);x>e*e&&0<l&&(x=k.x-
-C.x,D=k.y-C.y,x=x*x+D*D,x>e*e&&(B=new mxPoint(C.x-t.x,C.y-t.y),x=new mxPoint(C.x+t.x,C.y+t.y),m.push(B),this.addPoints(a,m,c,d,!1,null,h),m=0>Math.round(t.x)||0==Math.round(t.x)&&0>=Math.round(t.y)?1:-1,h=!1,"sharp"==f?(a.lineTo(B.x-t.y*m,B.y+t.x*m),a.lineTo(x.x-t.y*m,x.y+t.x*m),a.lineTo(x.x,x.y)):"arc"==f?(m*=1.3,a.curveTo(B.x-t.y*m,B.y+t.x*m,x.x-t.y*m,x.y+t.x*m,x.x,x.y)):(a.moveTo(x.x,x.y),h=!0),m=[x],B=!0))}else t=null;B||(m.push(C),k=C)}this.addPoints(a,m,c,d,!1,null,h);a.stroke()}};var e=mxGraphView.prototype.updateFloatingTerminalPoint;
+C.x,D=k.y-C.y,x=x*x+D*D,x>e*e&&(B=new mxPoint(C.x-t.x,C.y-t.y),x=new mxPoint(C.x+t.x,C.y+t.y),m.push(B),this.addPoints(a,m,c,d,!1,null,h),m=0>Math.round(t.x)||0==Math.round(t.x)&&0>=Math.round(t.y)?1:-1,h=!1,"sharp"==g?(a.lineTo(B.x-t.y*m,B.y+t.x*m),a.lineTo(x.x-t.y*m,x.y+t.x*m),a.lineTo(x.x,x.y)):"arc"==g?(m*=1.3,a.curveTo(B.x-t.y*m,B.y+t.x*m,x.x-t.y*m,x.y+t.x*m,x.x,x.y)):(a.moveTo(x.x,x.y),h=!0),m=[x],B=!0))}else t=null;B||(m.push(C),k=C)}this.addPoints(a,m,c,d,!1,null,h);a.stroke()}};var e=mxGraphView.prototype.updateFloatingTerminalPoint;
mxGraphView.prototype.updateFloatingTerminalPoint=function(a,b,c,d){if(null==b||null==a||"1"!=b.style.snapToPoint&&"1"!=a.style.snapToPoint)e.apply(this,arguments);else{b=this.getTerminalPort(a,b,d);var f=this.getNextPoint(a,c,d),g=this.graph.isOrthogonal(a),h=mxUtils.toRadians(Number(b.style[mxConstants.STYLE_ROTATION]||"0")),k=new mxPoint(b.getCenterX(),b.getCenterY());if(0!=h)var l=Math.cos(-h),m=Math.sin(-h),f=mxUtils.getRotatedPoint(f,l,m,k);l=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]||
0);l+=parseFloat(a.style[d?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);f=this.getPerimeterPoint(b,f,0==h&&g,l);0!=h&&(l=Math.cos(h),m=Math.sin(h),f=mxUtils.getRotatedPoint(f,l,m,k));a.setAbsoluteTerminalPoint(this.snapToAnchorPoint(a,b,c,d,f),d)}};mxGraphView.prototype.snapToAnchorPoint=function(a,b,c,d,e){if(null!=b&&null!=a){a=this.graph.getAllConnectionConstraints(b);d=c=null;if(null!=a)for(var f=0;f<a.length;f++){var g=this.graph.getConnectionPoint(b,
-a[f]);if(null!=g){var h=(g.x-e.x)*(g.x-e.x)+(g.y-e.y)*(g.y-e.y);if(null==d||h<d)c=g,d=h}}null!=c&&(e=c)}return e};var h=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(a,b,c){var d=h.apply(this,arguments);"1"==a.getAttribute("placeholders")&&null!=c.state&&(d=c.state.view.graph.replacePlaceholders(c.state.cell,d));return d};var f=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(a){if(null!=a.style&&"undefined"!==typeof pako){var b=
-mxUtils.getValue(a.style,mxConstants.STYLE_SHAPE,null);if(null!=b&&"string"===typeof b&&"stencil("==b.substring(0,8))try{var c=b.substring(8,b.length-1),d=mxUtils.parseXml(Graph.decompress(c));return new mxShape(new mxStencil(d.documentElement))}catch(p){null!=window.console&&console.log("Error in shape: "+p)}}return f.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];
-mxStencilRegistry.getStencil=function(a){var c=mxStencilRegistry.stencils[a];if(null==c&&null==mxCellRenderer.defaultShapes[a]&&mxStencilRegistry.dynamicLoading){var d=mxStencilRegistry.getBasenameForStencil(a);if(null!=d){c=mxStencilRegistry.libraries[d];if(null!=c){if(null==mxStencilRegistry.packages[d]){for(var b=0;b<c.length;b++){var g=c[b];if(".xml"==g.toLowerCase().substring(g.length-4,g.length))mxStencilRegistry.loadStencilSet(g,null);else if(".js"==g.toLowerCase().substring(g.length-3,g.length))try{if(mxStencilRegistry.allowEval){var e=
-mxUtils.load(g);null!=e&&200<=e.getStatus()&&299>=e.getStatus()&&eval.call(window,e.getText())}}catch(h){null!=window.console&&console.log("error in getStencil:",g,h)}}mxStencilRegistry.packages[d]=1}}else d=d.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+d+".xml",null);c=mxStencilRegistry.stencils[a]}}return c};
+a[f]);if(null!=g){var h=(g.x-e.x)*(g.x-e.x)+(g.y-e.y)*(g.y-e.y);if(null==d||h<d)c=g,d=h}}null!=c&&(e=c)}return e};var h=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(a,b,c){var d=h.apply(this,arguments);"1"==a.getAttribute("placeholders")&&null!=c.state&&(d=c.state.view.graph.replacePlaceholders(c.state.cell,d));return d};var g=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(a){if(null!=a.style&&"undefined"!==typeof pako){var b=
+mxUtils.getValue(a.style,mxConstants.STYLE_SHAPE,null);if(null!=b&&"string"===typeof b&&"stencil("==b.substring(0,8))try{var c=b.substring(8,b.length-1),d=mxUtils.parseXml(Graph.decompress(c));return new mxShape(new mxStencil(d.documentElement))}catch(p){null!=window.console&&console.log("Error in shape: "+p)}}return g.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];
+mxStencilRegistry.getStencil=function(a){var c=mxStencilRegistry.stencils[a];if(null==c&&null==mxCellRenderer.defaultShapes[a]&&mxStencilRegistry.dynamicLoading){var d=mxStencilRegistry.getBasenameForStencil(a);if(null!=d){c=mxStencilRegistry.libraries[d];if(null!=c){if(null==mxStencilRegistry.packages[d]){for(var b=0;b<c.length;b++){var f=c[b];if(".xml"==f.toLowerCase().substring(f.length-4,f.length))mxStencilRegistry.loadStencilSet(f,null);else if(".js"==f.toLowerCase().substring(f.length-3,f.length))try{if(mxStencilRegistry.allowEval){var e=
+mxUtils.load(f);null!=e&&200<=e.getStatus()&&299>=e.getStatus()&&eval.call(window,e.getText())}}catch(h){null!=window.console&&console.log("error in getStencil:",f,h)}}mxStencilRegistry.packages[d]=1}}else d=d.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+d+".xml",null);c=mxStencilRegistry.stencils[a]}}return c};
mxStencilRegistry.getBasenameForStencil=function(a){var c=null;if(null!=a&&"string"===typeof a&&(a=a.split("."),0<a.length&&"mxgraph"==a[0]))for(var c=a[1],d=2;d<a.length-1;d++)c+="/"+a[d];return c};
-mxStencilRegistry.loadStencilSet=function(a,c,d,b){var g=mxStencilRegistry.packages[a];if(null!=d&&d||null==g){var e=!1;if(null==g)try{if(b){mxStencilRegistry.loadStencil(a,mxUtils.bind(this,function(b){null!=b&&null!=b.documentElement&&(mxStencilRegistry.packages[a]=b,e=!0,mxStencilRegistry.parseStencilSet(b.documentElement,c,e))}));return}g=mxStencilRegistry.loadStencil(a);mxStencilRegistry.packages[a]=g;e=!0}catch(h){null!=window.console&&console.log("error in loadStencilSet:",a,h)}null!=g&&null!=
-g.documentElement&&mxStencilRegistry.parseStencilSet(g.documentElement,c,e)}};mxStencilRegistry.loadStencil=function(a,c){if(null!=c)mxUtils.get(a,mxUtils.bind(this,function(a){c(200<=a.getStatus()&&299>=a.getStatus()?a.getXml():null)}));else return mxUtils.load(a).getXml()};mxStencilRegistry.parseStencilSets=function(a){for(var c=0;c<a.length;c++)mxStencilRegistry.parseStencilSet(mxUtils.parseXml(a[c]).documentElement)};
-mxStencilRegistry.parseStencilSet=function(a,c,d){if("stencils"==a.nodeName)for(var b=a.firstChild;null!=b;)"shapes"==b.nodeName&&mxStencilRegistry.parseStencilSet(b,c,d),b=b.nextSibling;else{d=null!=d?d:!0;var b=a.firstChild,g="";a=a.getAttribute("name");for(null!=a&&(g=a+".");null!=b;){if(b.nodeType==mxConstants.NODETYPE_ELEMENT&&(a=b.getAttribute("name"),null!=a)){var g=g.toLowerCase(),e=a.replace(/ /g,"_");d&&mxStencilRegistry.addStencil(g+e.toLowerCase(),new mxStencil(b));if(null!=c){var h=b.getAttribute("w"),
-f=b.getAttribute("h"),h=null==h?80:parseInt(h,10),f=null==f?80:parseInt(f,10);c(g,e,a,h,f)}}b=b.nextSibling}}};
+mxStencilRegistry.loadStencilSet=function(a,c,d,b){var f=mxStencilRegistry.packages[a];if(null!=d&&d||null==f){var e=!1;if(null==f)try{if(b){mxStencilRegistry.loadStencil(a,mxUtils.bind(this,function(b){null!=b&&null!=b.documentElement&&(mxStencilRegistry.packages[a]=b,e=!0,mxStencilRegistry.parseStencilSet(b.documentElement,c,e))}));return}f=mxStencilRegistry.loadStencil(a);mxStencilRegistry.packages[a]=f;e=!0}catch(h){null!=window.console&&console.log("error in loadStencilSet:",a,h)}null!=f&&null!=
+f.documentElement&&mxStencilRegistry.parseStencilSet(f.documentElement,c,e)}};mxStencilRegistry.loadStencil=function(a,c){if(null!=c)mxUtils.get(a,mxUtils.bind(this,function(a){c(200<=a.getStatus()&&299>=a.getStatus()?a.getXml():null)}));else return mxUtils.load(a).getXml()};mxStencilRegistry.parseStencilSets=function(a){for(var c=0;c<a.length;c++)mxStencilRegistry.parseStencilSet(mxUtils.parseXml(a[c]).documentElement)};
+mxStencilRegistry.parseStencilSet=function(a,c,d){if("stencils"==a.nodeName)for(var b=a.firstChild;null!=b;)"shapes"==b.nodeName&&mxStencilRegistry.parseStencilSet(b,c,d),b=b.nextSibling;else{d=null!=d?d:!0;var b=a.firstChild,f="";a=a.getAttribute("name");for(null!=a&&(f=a+".");null!=b;){if(b.nodeType==mxConstants.NODETYPE_ELEMENT&&(a=b.getAttribute("name"),null!=a)){var f=f.toLowerCase(),e=a.replace(/ /g,"_");d&&mxStencilRegistry.addStencil(f+e.toLowerCase(),new mxStencil(b));if(null!=c){var h=b.getAttribute("w"),
+g=b.getAttribute("h"),h=null==h?80:parseInt(h,10),g=null==g?80:parseInt(g,10);c(f,e,a,h,g)}}b=b.nextSibling}}};
"undefined"!=typeof mxVertexHandler&&function(){function a(){var a=document.createElement("div");a.className="geHint";a.style.whiteSpace="nowrap";a.style.position="absolute";return a}function c(a,b){switch(b){case mxConstants.POINTS:return a;case mxConstants.MILLIMETERS:return(a/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.INCHES:return(a/mxConstants.PIXELS_PER_INCH).toFixed(2)}}mxConstants.HANDLE_FILLCOLOR="#29b6f2";mxConstants.HANDLE_STROKECOLOR="#0088cf";mxConstants.VERTEX_SELECTION_COLOR=
"#00a8ff";mxConstants.OUTLINE_COLOR="#00a8ff";mxConstants.OUTLINE_HANDLE_FILLCOLOR="#99ccff";mxConstants.OUTLINE_HANDLE_STROKECOLOR="#00a8ff";mxConstants.CONNECT_HANDLE_FILLCOLOR="#cee7ff";mxConstants.EDGE_SELECTION_COLOR="#00a8ff";mxConstants.DEFAULT_VALID_COLOR="#00a8ff";mxConstants.LABEL_HANDLE_FILLCOLOR="#cee7ff";mxConstants.GUIDE_COLOR="#0088cf";mxConstants.HIGHLIGHT_OPACITY=30;mxConstants.HIGHLIGHT_SIZE=5;mxEdgeHandler.prototype.snapToTerminals=!0;mxGraphHandler.prototype.guidesEnabled=!0;mxGraphHandler.prototype.removeEmptyParents=
!0;mxRubberband.prototype.fadeOut=!0;mxGuide.prototype.isEnabledForEvent=function(a){return!mxEvent.isAltDown(a)};var d=mxConnectionHandler.prototype.isCreateTarget;mxConnectionHandler.prototype.isCreateTarget=function(a){return mxEvent.isControlDown(a)||d.apply(this,arguments)};mxConstraintHandler.prototype.createHighlightShape=function(){var a=new mxEllipse(null,this.highlightColor,this.highlightColor,0);a.opacity=mxConstants.HIGHLIGHT_OPACITY;return a};mxConnectionHandler.prototype.livePreview=
!0;mxConnectionHandler.prototype.cursor="crosshair";mxConnectionHandler.prototype.createEdgeState=function(a){a=this.graph.createCurrentEdgeStyle();a=this.graph.createEdge(null,null,null,null,null,a);a=new mxCellState(this.graph.view,a,this.graph.getCellStyle(a));for(var b in this.graph.currentEdgeStyle)a.style[b]=this.graph.currentEdgeStyle[b];return a};var b=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var a=b.apply(this,arguments);a.isDashed="1"==
-this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED];return a};mxConnectionHandler.prototype.updatePreview=function(a){};var g=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var a=g.apply(this,arguments),b=a.getCell;a.getCell=mxUtils.bind(this,function(a){var c=b.apply(this,arguments);this.error=null;return c});return a};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",
+this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED];return a};mxConnectionHandler.prototype.updatePreview=function(a){};var f=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var a=f.apply(this,arguments),b=a.getCell;a.getCell=mxUtils.bind(this,function(a){var c=b.apply(this,arguments);this.error=null;return c});return a};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",
orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=function(){var a="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";";null!=this.currentEdgeStyle.shape&&(a+="shape="+this.currentEdgeStyle.shape+";");null!=this.currentEdgeStyle.curved&&(a+="curved="+this.currentEdgeStyle.curved+";");null!=this.currentEdgeStyle.rounded&&(a+="rounded="+this.currentEdgeStyle.rounded+";");null!=this.currentEdgeStyle.comic&&(a+="comic="+this.currentEdgeStyle.comic+";");null!=this.currentEdgeStyle.jumpStyle&&
(a+="jumpStyle="+this.currentEdgeStyle.jumpStyle+";");null!=this.currentEdgeStyle.jumpSize&&(a+="jumpSize="+this.currentEdgeStyle.jumpSize+";");null!=this.currentEdgeStyle.orthogonalLoop?a+="orthogonalLoop="+this.currentEdgeStyle.orthogonalLoop+";":null!=Graph.prototype.defaultEdgeStyle.orthogonalLoop&&(a+="orthogonalLoop="+Graph.prototype.defaultEdgeStyle.orthogonalLoop+";");null!=this.currentEdgeStyle.jettySize?a+="jettySize="+this.currentEdgeStyle.jettySize+";":null!=Graph.prototype.defaultEdgeStyle.jettySize&&
(a+="jettySize="+Graph.prototype.defaultEdgeStyle.jettySize+";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(a+="elbow="+this.currentEdgeStyle.elbow+";");return a=null!=this.currentEdgeStyle.html?a+("html="+this.currentEdgeStyle.html+";"):a+"html=1;"};Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var a=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+
@@ -2727,18 +2728,18 @@ f,g){a==mxEvent.MOUSE_DOWN&&(f=this.updateMouseEvent(f),b=this.isCellSelected(f.
this.isCellSelected(e.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.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.alignText=function(a,b){var c=null!=b&&mxEvent.isShiftDown(b);if(c||null!=window.getSelection&&
null!=window.getSelection().containsNode){var d=!0;this.graph.processElements(this.textarea,function(a){c||window.getSelection().containsNode(a,!0)?(a.removeAttribute("align"),a.style.textAlign=null):d=!1});d&&this.graph.cellEditor.setAlign(a)}document.execCommand("justify"+a.toLowerCase(),!1,null)};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var a=window.getSelection();if(a.getRangeAt&&a.rangeCount){for(var b=[],c=0,d=a.rangeCount;c<d;++c)b.push(a.getRangeAt(c));return b}}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 b=0,c=a.length;b<c;++b)sel.addRange(a[b])}else document.selection&&a.select&&a.select()}catch(ea){}};var h=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br",
-"1"));h.apply(this,arguments)};var f=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(a,b){this.isKeepFocusEvent(a)||!mxEvent.isAltDown(a.getEvent())?f.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(a){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var k=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(a,b){k.apply(this,
+"1"));h.apply(this,arguments)};var g=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(a,b){this.isKeepFocusEvent(a)||!mxEvent.isAltDown(a.getEvent())?g.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(a){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var k=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(a,b){k.apply(this,
arguments);var c=this.graph.view.getState(a);this.textarea.className=null!=c&&1==c.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(a);var c=this.graph.getModel().getParent(a),d=this.graph.getCellGeometry(a);this.graph.getModel().isEdge(c)&&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 l=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(a){function b(a,c){c.originalNode=a;a=a.firstChild;for(var d=c.firstChild;null!=a&&null!=d;)b(a,d),a=a.nextSibling,d=d.nextSibling;return c}function c(a,b){if(null!=a)if(b.originalNode!=a)d(a);else for(a=a.firstChild,b=b.firstChild;null!=a;){var e=
a.nextSibling;null==b?d(a):(c(a,b),b=b.nextSibling);a=e}}function d(a){for(var b=a.firstChild;null!=b;){var c=b.nextSibling;d(b);b=c}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)}l.apply(this,arguments);mxClient.IS_QUIRKS||7===document.documentMode||8===document.documentMode||mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(a){var d=b(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,function(){null!=this.textarea&&(0<=this.textarea.innerHTML.indexOf("<o:OfficeDocumentSettings>")||0<=this.textarea.innerHTML.indexOf("\x3c!--[if !mso]>"))&&c(this.textarea,d)}),0)}))};mxCellEditor.prototype.toggleViewMode=
-function(){var a=this.graph.view.getState(this.editingCell);if(null!=a){var b=null!=a&&"0"!=mxUtils.getValue(a.style,"nl2Br","1"),c=this.saveSelection();if(this.codeViewMode){k=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<k.length&&"\n"==k.charAt(k.length-1)&&(k=k.substring(0,k.length-1));k=this.graph.sanitizeHtml(b?k.replace(/\n/g,"<br/>"):k,!0);this.textarea.className="mxCellEditor geContentEditable";var d=mxUtils.getValue(a.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE),
-b=mxUtils.getValue(a.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),e=mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),f=(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,h=[];(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&h.push("underline");
-(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&h.push("line-through");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=h.join(" ");this.textarea.style.fontWeight=f?"bold":"normal";this.textarea.style.fontStyle=g?"italic":"";this.textarea.style.fontFamily=b;this.textarea.style.textAlign=
-e;this.textarea.style.padding="0px";this.textarea.innerHTML!=k&&(this.textarea.innerHTML=k,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 k=mxUtils.htmlEntities(this.textarea.innerHTML);mxClient.IS_QUIRKS||8==document.documentMode||(k=mxUtils.replaceTrailingNewlines(k,
-"<div><br></div>"));k=this.graph.sanitizeHtml(b?k.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):k,!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!=k&&(this.textarea.innerHTML=k);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=c;this.resize()}};var m=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(a,b){if(null!=this.textarea)if(a=this.graph.getView().getState(this.editingCell),this.codeViewMode&&
-null!=a){var c=a.view.scale;this.bounds=mxRectangle.fromRectangle(a);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*c;this.bounds.height=60*c;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=
+a.removeAttribute("border"))):a.parentNode.removeChild(a)}l.apply(this,arguments);mxClient.IS_QUIRKS||7===document.documentMode||8===document.documentMode||mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(a){var d=b(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,function(){null!=this.textarea&&(0<=this.textarea.innerHTML.indexOf("<o:OfficeDocumentSettings>")||0<=this.textarea.innerHTML.indexOf("\x3c!--[if !mso]>")?c(this.textarea,d):Graph.removePasteFormatting(this.textarea))}),
+0)}))};mxCellEditor.prototype.toggleViewMode=function(){var a=this.graph.view.getState(this.editingCell);if(null!=a){var b=null!=a&&"0"!=mxUtils.getValue(a.style,"nl2Br","1"),c=this.saveSelection();if(this.codeViewMode){k=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<k.length&&"\n"==k.charAt(k.length-1)&&(k=k.substring(0,k.length-1));k=this.graph.sanitizeHtml(b?k.replace(/\n/g,"<br/>"):k,!0);this.textarea.className="mxCellEditor geContentEditable";var d=mxUtils.getValue(a.style,mxConstants.STYLE_FONTSIZE,
+mxConstants.DEFAULT_FONTSIZE),b=mxUtils.getValue(a.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),e=mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),f=(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,h=[];(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&
+h.push("underline");(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&h.push("line-through");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=h.join(" ");this.textarea.style.fontWeight=f?"bold":"normal";this.textarea.style.fontStyle=g?"italic":"";this.textarea.style.fontFamily=
+b;this.textarea.style.textAlign=e;this.textarea.style.padding="0px";this.textarea.innerHTML!=k&&(this.textarea.innerHTML=k,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 k=mxUtils.htmlEntities(this.textarea.innerHTML);mxClient.IS_QUIRKS||8==document.documentMode||
+(k=mxUtils.replaceTrailingNewlines(k,"<div><br></div>"));k=this.graph.sanitizeHtml(b?k.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):k,!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!=k&&(this.textarea.innerHTML=k);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=c;this.resize()}};var m=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(a,b){if(null!=this.textarea)if(a=this.graph.getView().getState(this.editingCell),
+this.codeViewMode&&null!=a){var c=a.view.scale;this.bounds=mxRectangle.fromRectangle(a);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*c;this.bounds.height=60*c;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)/c)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/c)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/c)+(this.textarea.offsetHeight-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*c);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/c)+(this.textarea.offsetWidth-
this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*c);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=c:mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+c+","+c+")")}else this.textarea.style.height="",this.textarea.style.overflow="",m.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=
function(a,b){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var c=this.graph.getEditingValue(a.cell,b);"1"==mxUtils.getValue(a.style,"nl2Br","1")&&(c=c.replace(/\n/g,"<br/>"));return c=this.graph.sanitizeHtml(c,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(a){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var b=this.graph.sanitizeHtml(this.textarea.innerHTML,
@@ -2809,7 +2810,7 @@ Format.prototype.init=function(){var a=this.editorUi.editor,c=a.graph;this.updat
this.refresh()};Format.prototype.clearSelectionState=function(){this.selectionState=null};Format.prototype.getSelectionState=function(){null==this.selectionState&&(this.selectionState=this.createSelectionState());return this.selectionState};Format.prototype.createSelectionState=function(){for(var a=this.editorUi.editor.graph.getSelectionCells(),c=this.initSelectionState(),d=0;d<a.length;d++)this.updateSelectionStateForCell(c,a[d],a);return c};
Format.prototype.initSelectionState=function(){return{vertices:[],edges:[],x:null,y:null,width:null,height:null,style:{},containsImage:!1,containsLabel:!1,fill:!0,glass:!0,rounded:!0,comic:!0,autoSize:!1,image:!0,shadow:!0,lineJumps:!0,resizable:!0,movable:!0,rotatable:!0}};
Format.prototype.updateSelectionStateForCell=function(a,c,d){d=this.editorUi.editor.graph;if(d.getModel().isVertex(c)){a.resizable=a.resizable&&d.isCellResizable(c);a.rotatable=a.rotatable&&d.isCellRotatable(c);a.movable=a.movable&&d.isCellMovable(c)&&!d.isTableRow(c)&&!d.isTableCell(c);a.vertices.push(c);var b=d.getCellGeometry(c);if(null!=b&&(0<b.width?null==a.width?a.width=b.width:a.width!=b.width&&(a.width=""):a.containsLabel=!0,0<b.height?null==a.height?a.height=b.height:a.height!=b.height&&
-(a.height=""):a.containsLabel=!0,!b.relative||null!=b.offset)){var g=b.relative?b.offset.x:b.x,b=b.relative?b.offset.y:b.y;null==a.x?a.x=g:a.x!=g&&(a.x="");null==a.y?a.y=b:a.y!=b&&(a.y="")}}else d.getModel().isEdge(c)&&(a.edges.push(c),a.resizable=!1,a.rotatable=!1,a.movable=!1);c=d.view.getState(c);if(null!=c){a.autoSize=a.autoSize||this.isAutoSizeState(c);a.glass=a.glass&&this.isGlassState(c);a.rounded=a.rounded&&this.isRoundedState(c);a.lineJumps=a.lineJumps&&this.isLineJumpState(c);a.comic=a.comic&&
+(a.height=""):a.containsLabel=!0,!b.relative||null!=b.offset)){var f=b.relative?b.offset.x:b.x,b=b.relative?b.offset.y:b.y;null==a.x?a.x=f:a.x!=f&&(a.x="");null==a.y?a.y=b:a.y!=b&&(a.y="")}}else d.getModel().isEdge(c)&&(a.edges.push(c),a.resizable=!1,a.rotatable=!1,a.movable=!1);c=d.view.getState(c);if(null!=c){a.autoSize=a.autoSize||this.isAutoSizeState(c);a.glass=a.glass&&this.isGlassState(c);a.rounded=a.rounded&&this.isRoundedState(c);a.lineJumps=a.lineJumps&&this.isLineJumpState(c);a.comic=a.comic&&
this.isComicState(c);a.image=a.image&&this.isImageState(c);a.shadow=a.shadow&&this.isShadowState(c);a.fill=a.fill&&this.isFillState(c);d=mxUtils.getValue(c.style,mxConstants.STYLE_SHAPE,null);a.containsImage=a.containsImage||"image"==d;for(var e in c.style)d=c.style[e],null!=d&&(null==a.style[e]?a.style[e]=d:a.style[e]!=d&&(a.style[e]=""))}};
Format.prototype.isFillState=function(a){return a.view.graph.model.isVertex(a.cell)||"arrow"==mxUtils.getValue(a.style,mxConstants.STYLE_SHAPE,null)||"filledEdge"==mxUtils.getValue(a.style,mxConstants.STYLE_SHAPE,null)||"flexArrow"==mxUtils.getValue(a.style,mxConstants.STYLE_SHAPE,null)};Format.prototype.isGlassState=function(a){a=mxUtils.getValue(a.style,mxConstants.STYLE_SHAPE,null);return"label"==a||"rectangle"==a||"internalStorage"==a||"ext"==a||"umlLifeline"==a||"swimlane"==a||"process"==a};
Format.prototype.isRoundedState=function(a){return null!=a.shape?a.shape.isRoundable():0<=mxUtils.indexOf(this.roundableShapes,mxUtils.getValue(a.style,mxConstants.STYLE_SHAPE,null))};Format.prototype.isLineJumpState=function(a){var c=mxUtils.getValue(a.style,mxConstants.STYLE_SHAPE,null);return!mxUtils.getValue(a.style,mxConstants.STYLE_CURVED,!1)&&("connector"==c||"filledEdge"==c)};
@@ -2819,91 +2820,91 @@ Format.prototype.clear=function(){this.container.innerHTML="";if(null!=this.pane
Format.prototype.refresh=function(){if("0px"!=this.container.style.width){this.clear();var a=this.editorUi,c=a.editor.graph,d=document.createElement("div");d.style.whiteSpace="nowrap";d.style.color="rgb(112, 112, 112)";d.style.textAlign="left";d.style.cursor="default";var b=document.createElement("div");b.className="geFormatSection";b.style.textAlign="center";b.style.fontWeight="bold";b.style.paddingTop="8px";b.style.fontSize="13px";b.style.borderWidth="0px 0px 1px 1px";b.style.borderStyle="solid";
b.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";b.style.height=mxClient.IS_QUIRKS?"34px":"25px";b.style.overflow="hidden";b.style.width="100%";this.container.appendChild(d);mxEvent.addListener(b,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(a){a.preventDefault()}));if(c.isSelectionEmpty())mxUtils.write(b,mxResources.get("diagram")),b.style.borderLeftWidth="0px",this.showCloseButton&&(c=document.createElement("img"),c.setAttribute("border","0"),c.setAttribute("src",
Dialog.prototype.closeImage),c.setAttribute("title",mxResources.get("hide")),c.style.position="absolute",c.style.display="block",c.style.right="0px",c.style.top="8px",c.style.cursor="pointer",c.style.marginTop="1px",c.style.marginRight="17px",c.style.border="1px solid transparent",c.style.padding="1px",c.style.opacity=.5,b.appendChild(c),mxEvent.addListener(c,"click",function(){a.actions.get("formatPanel").funct()})),d.appendChild(b),this.panels.push(new DiagramFormatPanel(this,a,d));else if(c.isEditing())mxUtils.write(b,
-mxResources.get("text")),d.appendChild(b),this.panels.push(new TextFormatPanel(this,a,d));else{var g=this.getSelectionState().containsLabel,e=null,h=null,c=mxUtils.bind(this,function(a,b,c){var d=mxUtils.bind(this,function(d){e!=a&&(g?this.labelIndex=c:this.currentIndex=c,null!=e&&(e.style.backgroundColor=this.inactiveTabBackgroundColor,e.style.borderBottomWidth="1px"),e=a,e.style.backgroundColor="",e.style.borderBottomWidth="0px",h!=b&&(null!=h&&(h.style.display="none"),h=b,h.style.display=""))});
-mxEvent.addListener(a,"click",d);mxEvent.addListener(a,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(a){a.preventDefault()}));c==(g?this.labelIndex:this.currentIndex)&&d()}),f=0;b.style.backgroundColor=this.inactiveTabBackgroundColor;b.style.borderLeftWidth="1px";b.style.cursor="pointer";b.style.width=g?"50%":"33.3%";b.style.width=g?"50%":"33.3%";var k=b.cloneNode(!1),l=k.cloneNode(!1);k.style.backgroundColor=this.inactiveTabBackgroundColor;l.style.backgroundColor=this.inactiveTabBackgroundColor;
-if(g)k.style.borderLeftWidth="0px";else{b.style.borderLeftWidth="0px";mxUtils.write(b,mxResources.get("style"));d.appendChild(b);var m=d.cloneNode(!1);m.style.display="none";this.panels.push(new StyleFormatPanel(this,a,m));this.container.appendChild(m);c(b,m,f++)}mxUtils.write(k,mxResources.get("text"));d.appendChild(k);b=d.cloneNode(!1);b.style.display="none";this.panels.push(new TextFormatPanel(this,a,b));this.container.appendChild(b);mxUtils.write(l,mxResources.get("arrange"));d.appendChild(l);
-d=d.cloneNode(!1);d.style.display="none";this.panels.push(new ArrangePanel(this,a,d));this.container.appendChild(d);c(k,b,f++);c(l,d,f++)}}};BaseFormatPanel=function(a,c,d){this.format=a;this.editorUi=c;this.container=d;this.listeners=[]};BaseFormatPanel.prototype.buttonBackgroundColor="white";
-BaseFormatPanel.prototype.getSelectionState=function(){for(var a=this.editorUi.editor.graph,c=a.getSelectionCells(),d=null,b=0;b<c.length;b++){var g=a.view.getState(c[b]);if(null!=g&&(g=mxUtils.getValue(g.style,mxConstants.STYLE_SHAPE,null),null!=g))if(null==d)d=g;else if(d!=g)return null}return d};
-BaseFormatPanel.prototype.installInputHandler=function(a,c,d,b,g,e,h,f){e=null!=e?e:"";f=null!=f?f:!1;var k=this.editorUi,l=k.editor.graph;b=null!=b?b:1;g=null!=g?g:999;var m=null,n=!1,p=mxUtils.bind(this,function(p){var q=f?parseFloat(a.value):parseInt(a.value);isNaN(q)||c!=mxConstants.STYLE_ROTATION||(q=mxUtils.mod(Math.round(100*q),36E3)/100);q=Math.min(g,Math.max(b,isNaN(q)?d:q));if(l.cellEditor.isContentEditing()&&h)n||(n=!0,null!=m&&(l.cellEditor.restoreSelection(m),m=null),h(q),a.value=q+e,
+mxResources.get("text")),d.appendChild(b),this.panels.push(new TextFormatPanel(this,a,d));else{var f=this.getSelectionState().containsLabel,e=null,h=null,c=mxUtils.bind(this,function(a,b,c){var d=mxUtils.bind(this,function(d){e!=a&&(f?this.labelIndex=c:this.currentIndex=c,null!=e&&(e.style.backgroundColor=this.inactiveTabBackgroundColor,e.style.borderBottomWidth="1px"),e=a,e.style.backgroundColor="",e.style.borderBottomWidth="0px",h!=b&&(null!=h&&(h.style.display="none"),h=b,h.style.display=""))});
+mxEvent.addListener(a,"click",d);mxEvent.addListener(a,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(a){a.preventDefault()}));c==(f?this.labelIndex:this.currentIndex)&&d()}),g=0;b.style.backgroundColor=this.inactiveTabBackgroundColor;b.style.borderLeftWidth="1px";b.style.cursor="pointer";b.style.width=f?"50%":"33.3%";b.style.width=f?"50%":"33.3%";var k=b.cloneNode(!1),l=k.cloneNode(!1);k.style.backgroundColor=this.inactiveTabBackgroundColor;l.style.backgroundColor=this.inactiveTabBackgroundColor;
+if(f)k.style.borderLeftWidth="0px";else{b.style.borderLeftWidth="0px";mxUtils.write(b,mxResources.get("style"));d.appendChild(b);var m=d.cloneNode(!1);m.style.display="none";this.panels.push(new StyleFormatPanel(this,a,m));this.container.appendChild(m);c(b,m,g++)}mxUtils.write(k,mxResources.get("text"));d.appendChild(k);b=d.cloneNode(!1);b.style.display="none";this.panels.push(new TextFormatPanel(this,a,b));this.container.appendChild(b);mxUtils.write(l,mxResources.get("arrange"));d.appendChild(l);
+d=d.cloneNode(!1);d.style.display="none";this.panels.push(new ArrangePanel(this,a,d));this.container.appendChild(d);c(k,b,g++);c(l,d,g++)}}};BaseFormatPanel=function(a,c,d){this.format=a;this.editorUi=c;this.container=d;this.listeners=[]};BaseFormatPanel.prototype.buttonBackgroundColor="white";
+BaseFormatPanel.prototype.getSelectionState=function(){for(var a=this.editorUi.editor.graph,c=a.getSelectionCells(),d=null,b=0;b<c.length;b++){var f=a.view.getState(c[b]);if(null!=f&&(f=mxUtils.getValue(f.style,mxConstants.STYLE_SHAPE,null),null!=f))if(null==d)d=f;else if(d!=f)return null}return d};
+BaseFormatPanel.prototype.installInputHandler=function(a,c,d,b,f,e,h,g){e=null!=e?e:"";g=null!=g?g:!1;var k=this.editorUi,l=k.editor.graph;b=null!=b?b:1;f=null!=f?f:999;var m=null,n=!1,p=mxUtils.bind(this,function(p){var q=g?parseFloat(a.value):parseInt(a.value);isNaN(q)||c!=mxConstants.STYLE_ROTATION||(q=mxUtils.mod(Math.round(100*q),36E3)/100);q=Math.min(f,Math.max(b,isNaN(q)?d:q));if(l.cellEditor.isContentEditing()&&h)n||(n=!0,null!=m&&(l.cellEditor.restoreSelection(m),m=null),h(q),a.value=q+e,
n=!1);else if(q!=mxUtils.getValue(this.format.getSelectionState().style,c,d)){l.isEditing()&&l.stopEditing(!0);l.getModel().beginUpdate();try{var v=l.getSelectionCells();l.setCellStyles(c,q,v);c==mxConstants.STYLE_FONTSIZE&&l.updateLabelElements(l.getSelectionCells(),function(a){a.style.fontSize=q+"px";a.removeAttribute("size")});for(var r=0;r<v.length;r++)0==l.model.getChildCount(v[r])&&l.autoSizeCell(v[r],!1);k.fireEvent(new mxEventObject("styleChanged","keys",[c],"values",[q],"cells",v))}finally{l.getModel().endUpdate()}}a.value=
q+e;mxEvent.consume(p)});h&&l.cellEditor.isContentEditing()&&(mxEvent.addListener(a,"mousedown",function(){document.activeElement==l.cellEditor.textarea&&(m=l.cellEditor.saveSelection())}),mxEvent.addListener(a,"touchstart",function(){document.activeElement==l.cellEditor.textarea&&(m=l.cellEditor.saveSelection())}));mxEvent.addListener(a,"change",p);mxEvent.addListener(a,"blur",p);return p};
BaseFormatPanel.prototype.createPanel=function(){var a=document.createElement("div");a.className="geFormatSection";a.style.padding="12px 0px 12px 18px";return a};BaseFormatPanel.prototype.createTitle=function(a){var c=document.createElement("div");c.style.padding="0px 0px 6px 0px";c.style.whiteSpace="nowrap";c.style.overflow="hidden";c.style.width="200px";c.style.fontWeight="bold";mxUtils.write(c,a);return c};
-BaseFormatPanel.prototype.createStepper=function(a,c,d,b,g,e,h){d=null!=d?d:1;b=null!=b?b:8;if(mxClient.IS_QUIRKS)b-=2;else if(mxClient.IS_MT||8<=document.documentMode)b+=1;var f=document.createElement("div");mxUtils.setPrefixedStyle(f.style,"borderRadius","3px");f.style.border="1px solid rgb(192, 192, 192)";f.style.position="absolute";var k=document.createElement("div");k.style.borderBottom="1px solid rgb(192, 192, 192)";k.style.position="relative";k.style.height=b+"px";k.style.width="10px";k.className=
-"geBtnUp";f.appendChild(k);var l=k.cloneNode(!1);l.style.border="none";l.style.height=b+"px";l.className="geBtnDown";f.appendChild(l);mxEvent.addListener(l,"click",function(b){""==a.value&&(a.value=e||"2");var f=h?parseFloat(a.value):parseInt(a.value);isNaN(f)||(a.value=f-d,null!=c&&c(b));mxEvent.consume(b)});mxEvent.addListener(k,"click",function(b){""==a.value&&(a.value=e||"0");var f=h?parseFloat(a.value):parseInt(a.value);isNaN(f)||(a.value=f+d,null!=c&&c(b));mxEvent.consume(b)});if(g){var m=null;
-mxEvent.addGestureListeners(f,function(a){if(mxClient.IS_QUIRKS||8==document.documentMode)m=document.selection.createRange();mxEvent.consume(a)},null,function(a){if(null!=m){try{m.select()}catch(p){}m=null;mxEvent.consume(a)}})}return f};
-BaseFormatPanel.prototype.createOption=function(a,c,d,b){var g=document.createElement("div");g.style.padding="6px 0px 1px 0px";g.style.whiteSpace="nowrap";g.style.overflow="hidden";g.style.width="200px";g.style.height=mxClient.IS_QUIRKS?"27px":"18px";var e=document.createElement("input");e.setAttribute("type","checkbox");e.style.margin="0px 6px 0px 0px";g.appendChild(e);var h=document.createElement("span");mxUtils.write(h,a);g.appendChild(h);var f=!1,k=c(),l=function(a){f||(f=!0,a?(e.setAttribute("checked",
-"checked"),e.defaultChecked=!0,e.checked=!0):(e.removeAttribute("checked"),e.defaultChecked=!1,e.checked=!1),k!=a&&(k=a,c()!=k&&d(k)),f=!1)};mxEvent.addListener(g,"click",function(a){if("disabled"!=e.getAttribute("disabled")){a=mxEvent.getSource(a);if(a==g||a==h)e.checked=!e.checked;l(e.checked)}});l(k);null!=b&&(b.install(l),this.listeners.push(b));return g};
-BaseFormatPanel.prototype.createCellOption=function(a,c,d,b,g,e,h,f){b=null!=b?"null"==b?null:b:"1";g=null!=g?"null"==g?null:g:"0";var k=this.editorUi,l=k.editor.graph;return this.createOption(a,function(){var a=l.view.getState(l.getSelectionCell());return null!=a?mxUtils.getValue(a.style,c,d)!=g:null},function(a){f&&l.stopEditing();if(null!=h)h.funct();else{l.getModel().beginUpdate();try{a=a?b:g,l.setCellStyles(c,a,l.getSelectionCells()),null!=e&&e(l.getSelectionCells(),a),k.fireEvent(new mxEventObject("styleChanged",
-"keys",[c],"values",[a],"cells",l.getSelectionCells()))}finally{l.getModel().endUpdate()}}},{install:function(a){this.listener=function(){var b=l.view.getState(l.getSelectionCell());null!=b&&a(mxUtils.getValue(b.style,c,d)!=g)};l.getModel().addListener(mxEvent.CHANGE,this.listener)},destroy:function(){l.getModel().removeListener(this.listener)}})};
-BaseFormatPanel.prototype.createColorOption=function(a,c,d,b,g,e,h){var f=document.createElement("div");f.style.padding="6px 0px 1px 0px";f.style.whiteSpace="nowrap";f.style.overflow="hidden";f.style.width="200px";f.style.height=mxClient.IS_QUIRKS?"27px":"18px";var k=document.createElement("input");k.setAttribute("type","checkbox");k.style.margin="0px 6px 0px 0px";h||f.appendChild(k);var l=document.createElement("span");mxUtils.write(l,a);f.appendChild(l);var m=c(),n=!1,p=null,q=function(a,f,g){if(!n){n=
+BaseFormatPanel.prototype.createStepper=function(a,c,d,b,f,e,h){d=null!=d?d:1;b=null!=b?b:8;if(mxClient.IS_QUIRKS)b-=2;else if(mxClient.IS_MT||8<=document.documentMode)b+=1;var g=document.createElement("div");mxUtils.setPrefixedStyle(g.style,"borderRadius","3px");g.style.border="1px solid rgb(192, 192, 192)";g.style.position="absolute";var k=document.createElement("div");k.style.borderBottom="1px solid rgb(192, 192, 192)";k.style.position="relative";k.style.height=b+"px";k.style.width="10px";k.className=
+"geBtnUp";g.appendChild(k);var l=k.cloneNode(!1);l.style.border="none";l.style.height=b+"px";l.className="geBtnDown";g.appendChild(l);mxEvent.addListener(l,"click",function(b){""==a.value&&(a.value=e||"2");var f=h?parseFloat(a.value):parseInt(a.value);isNaN(f)||(a.value=f-d,null!=c&&c(b));mxEvent.consume(b)});mxEvent.addListener(k,"click",function(b){""==a.value&&(a.value=e||"0");var f=h?parseFloat(a.value):parseInt(a.value);isNaN(f)||(a.value=f+d,null!=c&&c(b));mxEvent.consume(b)});if(f){var m=null;
+mxEvent.addGestureListeners(g,function(a){if(mxClient.IS_QUIRKS||8==document.documentMode)m=document.selection.createRange();mxEvent.consume(a)},null,function(a){if(null!=m){try{m.select()}catch(p){}m=null;mxEvent.consume(a)}})}return g};
+BaseFormatPanel.prototype.createOption=function(a,c,d,b){var f=document.createElement("div");f.style.padding="6px 0px 1px 0px";f.style.whiteSpace="nowrap";f.style.overflow="hidden";f.style.width="200px";f.style.height=mxClient.IS_QUIRKS?"27px":"18px";var e=document.createElement("input");e.setAttribute("type","checkbox");e.style.margin="0px 6px 0px 0px";f.appendChild(e);var h=document.createElement("span");mxUtils.write(h,a);f.appendChild(h);var g=!1,k=c(),l=function(a){g||(g=!0,a?(e.setAttribute("checked",
+"checked"),e.defaultChecked=!0,e.checked=!0):(e.removeAttribute("checked"),e.defaultChecked=!1,e.checked=!1),k!=a&&(k=a,c()!=k&&d(k)),g=!1)};mxEvent.addListener(f,"click",function(a){if("disabled"!=e.getAttribute("disabled")){a=mxEvent.getSource(a);if(a==f||a==h)e.checked=!e.checked;l(e.checked)}});l(k);null!=b&&(b.install(l),this.listeners.push(b));return f};
+BaseFormatPanel.prototype.createCellOption=function(a,c,d,b,f,e,h,g){b=null!=b?"null"==b?null:b:"1";f=null!=f?"null"==f?null:f:"0";var k=this.editorUi,l=k.editor.graph;return this.createOption(a,function(){var a=l.view.getState(l.getSelectionCell());return null!=a?mxUtils.getValue(a.style,c,d)!=f:null},function(a){g&&l.stopEditing();if(null!=h)h.funct();else{l.getModel().beginUpdate();try{a=a?b:f,l.setCellStyles(c,a,l.getSelectionCells()),null!=e&&e(l.getSelectionCells(),a),k.fireEvent(new mxEventObject("styleChanged",
+"keys",[c],"values",[a],"cells",l.getSelectionCells()))}finally{l.getModel().endUpdate()}}},{install:function(a){this.listener=function(){var b=l.view.getState(l.getSelectionCell());null!=b&&a(mxUtils.getValue(b.style,c,d)!=f)};l.getModel().addListener(mxEvent.CHANGE,this.listener)},destroy:function(){l.getModel().removeListener(this.listener)}})};
+BaseFormatPanel.prototype.createColorOption=function(a,c,d,b,f,e,h){var g=document.createElement("div");g.style.padding="6px 0px 1px 0px";g.style.whiteSpace="nowrap";g.style.overflow="hidden";g.style.width="200px";g.style.height=mxClient.IS_QUIRKS?"27px":"18px";var k=document.createElement("input");k.setAttribute("type","checkbox");k.style.margin="0px 6px 0px 0px";h||g.appendChild(k);var l=document.createElement("span");mxUtils.write(l,a);g.appendChild(l);var m=c(),n=!1,p=null,q=function(a,f,g){if(!n){n=
!0;a=/(^#?[a-zA-Z0-9]*$)/.test(a)?a:b;p.innerHTML='<div style="width:'+(mxClient.IS_QUIRKS?"30":"36")+"px;height:12px;margin:3px;border:1px solid black;background-color:"+mxUtils.htmlEntities(null!=a&&a!=mxConstants.NONE?a:b)+';"></div>';if(mxClient.IS_QUIRKS||8==document.documentMode)p.firstChild.style.margin="0px";null!=a&&a!=mxConstants.NONE?(k.setAttribute("checked","checked"),k.defaultChecked=!0,k.checked=!0):(k.removeAttribute("checked"),k.defaultChecked=!1,k.checked=!1);p.style.display=k.checked||
-h?"":"none";null!=e&&e(a);f||(m=a,(g||h||c()!=m)&&d(m));n=!1}},p=mxUtils.button("",mxUtils.bind(this,function(a){this.editorUi.pickColor(m,function(a){q(a,null,!0)});mxEvent.consume(a)}));p.style.position="absolute";p.style.marginTop="-4px";p.style.right=mxClient.IS_QUIRKS?"0px":"20px";p.style.height="22px";p.className="geColorBtn";p.style.display=k.checked||h?"":"none";f.appendChild(p);mxEvent.addListener(f,"click",function(a){a=mxEvent.getSource(a);if(a==k||"INPUT"!=a.nodeName)a!=k&&(k.checked=
-!k.checked),k.checked||null==m||m==mxConstants.NONE||b==mxConstants.NONE||(b=m),q(k.checked?b:mxConstants.NONE)});q(m,!0);null!=g&&(g.install(q),this.listeners.push(g));return f};
-BaseFormatPanel.prototype.createCellColorOption=function(a,c,d,b,g){var e=this.editorUi,h=e.editor.graph;return this.createColorOption(a,function(){var a=h.view.getState(h.getSelectionCell());return null!=a?mxUtils.getValue(a.style,c,null):null},function(a){h.getModel().beginUpdate();try{null!=g&&g(a),h.setCellStyles(c,a,h.getSelectionCells()),e.fireEvent(new mxEventObject("styleChanged","keys",[c],"values",[a],"cells",h.getSelectionCells()))}finally{h.getModel().endUpdate()}},d||mxConstants.NONE,
+h?"":"none";null!=e&&e(a);f||(m=a,(g||h||c()!=m)&&d(m));n=!1}},p=mxUtils.button("",mxUtils.bind(this,function(a){this.editorUi.pickColor(m,function(a){q(a,null,!0)});mxEvent.consume(a)}));p.style.position="absolute";p.style.marginTop="-4px";p.style.right=mxClient.IS_QUIRKS?"0px":"20px";p.style.height="22px";p.className="geColorBtn";p.style.display=k.checked||h?"":"none";g.appendChild(p);mxEvent.addListener(g,"click",function(a){a=mxEvent.getSource(a);if(a==k||"INPUT"!=a.nodeName)a!=k&&(k.checked=
+!k.checked),k.checked||null==m||m==mxConstants.NONE||b==mxConstants.NONE||(b=m),q(k.checked?b:mxConstants.NONE)});q(m,!0);null!=f&&(f.install(q),this.listeners.push(f));return g};
+BaseFormatPanel.prototype.createCellColorOption=function(a,c,d,b,f){var e=this.editorUi,h=e.editor.graph;return this.createColorOption(a,function(){var a=h.view.getState(h.getSelectionCell());return null!=a?mxUtils.getValue(a.style,c,null):null},function(a){h.getModel().beginUpdate();try{null!=f&&f(a),h.setCellStyles(c,a,h.getSelectionCells()),e.fireEvent(new mxEventObject("styleChanged","keys",[c],"values",[a],"cells",h.getSelectionCells()))}finally{h.getModel().endUpdate()}},d||mxConstants.NONE,
{install:function(a){this.listener=function(){var b=h.view.getState(h.getSelectionCell());null!=b&&a(mxUtils.getValue(b.style,c,null))};h.getModel().addListener(mxEvent.CHANGE,this.listener)},destroy:function(){h.getModel().removeListener(this.listener)}},b)};
BaseFormatPanel.prototype.addArrow=function(a,c){c=null!=c?c:10;var d=document.createElement("div");d.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";d.style.padding="6px";d.style.paddingRight="4px";var b=10-c;2==b?d.style.paddingTop="6px":0<b?d.style.paddingTop=6-b+"px":d.style.marginTop="-2px";d.style.height=c+"px";d.style.borderLeft="1px solid #a0a0a0";d.innerHTML='<img border="0" src="'+(mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAHBJREFUeNpidHB2ZyAGsACxDRBPIKCuA6TwCBB/h2rABu4A8SYmKCcXiP/iUFgAxL9gCi8A8SwsirZCMQMTkmANEH9E4v+CmsaArvAdyNFI/FlQ92EoBIE+qCRIUz168DBgsU4OqhinQpgHMABAgAEALY4XLIsJ20oAAAAASUVORK5CYII=":
IMAGE_PATH+"/dropdown.png")+'" style="margin-bottom:4px;">';mxUtils.setOpacity(d,70);b=a.getElementsByTagName("div")[0];null!=b&&(b.style.paddingRight="6px",b.style.marginLeft="4px",b.style.marginTop="-1px",b.style.display=mxClient.IS_QUIRKS?"inline":"inline-block",mxUtils.setOpacity(b,60));mxUtils.setOpacity(a,100);a.style.border="1px solid #a0a0a0";a.style.backgroundColor=this.buttonBackgroundColor;a.style.backgroundImage="none";a.style.width="auto";a.className+=" geColorBtn";mxUtils.setPrefixedStyle(a.style,
-"borderRadius","3px");a.appendChild(d);return b};BaseFormatPanel.prototype.addUnitInput=function(a,c,d,b,g,e,h,f,k){h=null!=h?h:0;c=document.createElement("input");c.style.position="absolute";c.style.textAlign="right";c.style.marginTop="-2px";c.style.right=d+12+"px";c.style.width=b+"px";a.appendChild(c);b=this.createStepper(c,g,e,null,f,null,k);b.style.marginTop=h-2+"px";b.style.right=d+"px";a.appendChild(b);return c};
-BaseFormatPanel.prototype.createRelativeOption=function(a,c,d,b,g){d=null!=d?d:44;var e=this.editorUi.editor.graph,h=this.createPanel();h.style.paddingTop="10px";h.style.paddingBottom="10px";mxUtils.write(h,a);h.style.fontWeight="bold";a=mxUtils.bind(this,function(a){if(null!=b)b(f);else{var d=parseInt(f.value),d=Math.min(100,Math.max(0,isNaN(d)?100:d)),g=e.view.getState(e.getSelectionCell());null!=g&&d!=mxUtils.getValue(g.style,c,100)&&(100==d&&(d=null),e.setCellStyles(c,d,e.getSelectionCells()),
-this.editorUi.fireEvent(new mxEventObject("styleChanged","keys",[c],"values",[d],"cells",e.getSelectionCells())));f.value=(null!=d?d:"100")+" %"}mxEvent.consume(a)});var f=this.addUnitInput(h,"%",20,d,a,10,-15,null!=b);if(null!=c){var k=mxUtils.bind(this,function(a,b,d){if(d||f!=document.activeElement)a=this.format.getSelectionState(),a=parseInt(mxUtils.getValue(a.style,c,100)),f.value=isNaN(a)?"":a+" %"});mxEvent.addListener(f,"keydown",function(a){13==a.keyCode?(e.container.focus(),mxEvent.consume(a)):
-27==a.keyCode&&(k(null,null,!0),e.container.focus(),mxEvent.consume(a))});e.getModel().addListener(mxEvent.CHANGE,k);this.listeners.push({destroy:function(){e.getModel().removeListener(k)}});k()}mxEvent.addListener(f,"blur",a);mxEvent.addListener(f,"change",a);null!=g&&g(f);return h};
-BaseFormatPanel.prototype.addLabel=function(a,c,d,b){b=null!=b?b:61;var g=document.createElement("div");mxUtils.write(g,c);g.style.position="absolute";g.style.right=d+"px";g.style.width=b+"px";g.style.marginTop="6px";g.style.textAlign="center";a.appendChild(g)};
+"borderRadius","3px");a.appendChild(d);return b};BaseFormatPanel.prototype.addUnitInput=function(a,c,d,b,f,e,h,g,k){h=null!=h?h:0;c=document.createElement("input");c.style.position="absolute";c.style.textAlign="right";c.style.marginTop="-2px";c.style.right=d+12+"px";c.style.width=b+"px";a.appendChild(c);b=this.createStepper(c,f,e,null,g,null,k);b.style.marginTop=h-2+"px";b.style.right=d+"px";a.appendChild(b);return c};
+BaseFormatPanel.prototype.createRelativeOption=function(a,c,d,b,f){d=null!=d?d:44;var e=this.editorUi.editor.graph,h=this.createPanel();h.style.paddingTop="10px";h.style.paddingBottom="10px";mxUtils.write(h,a);h.style.fontWeight="bold";a=mxUtils.bind(this,function(a){if(null!=b)b(g);else{var d=parseInt(g.value),d=Math.min(100,Math.max(0,isNaN(d)?100:d)),f=e.view.getState(e.getSelectionCell());null!=f&&d!=mxUtils.getValue(f.style,c,100)&&(100==d&&(d=null),e.setCellStyles(c,d,e.getSelectionCells()),
+this.editorUi.fireEvent(new mxEventObject("styleChanged","keys",[c],"values",[d],"cells",e.getSelectionCells())));g.value=(null!=d?d:"100")+" %"}mxEvent.consume(a)});var g=this.addUnitInput(h,"%",20,d,a,10,-15,null!=b);if(null!=c){var k=mxUtils.bind(this,function(a,b,d){if(d||g!=document.activeElement)a=this.format.getSelectionState(),a=parseInt(mxUtils.getValue(a.style,c,100)),g.value=isNaN(a)?"":a+" %"});mxEvent.addListener(g,"keydown",function(a){13==a.keyCode?(e.container.focus(),mxEvent.consume(a)):
+27==a.keyCode&&(k(null,null,!0),e.container.focus(),mxEvent.consume(a))});e.getModel().addListener(mxEvent.CHANGE,k);this.listeners.push({destroy:function(){e.getModel().removeListener(k)}});k()}mxEvent.addListener(g,"blur",a);mxEvent.addListener(g,"change",a);null!=f&&f(g);return h};
+BaseFormatPanel.prototype.addLabel=function(a,c,d,b){b=null!=b?b:61;var f=document.createElement("div");mxUtils.write(f,c);f.style.position="absolute";f.style.right=d+"px";f.style.width=b+"px";f.style.marginTop="6px";f.style.textAlign="center";a.appendChild(f)};
BaseFormatPanel.prototype.addKeyHandler=function(a,c){mxEvent.addListener(a,"keydown",mxUtils.bind(this,function(a){13==a.keyCode?(this.editorUi.editor.graph.container.focus(),mxEvent.consume(a)):27==a.keyCode&&(null!=c&&c(null,null,!0),this.editorUi.editor.graph.container.focus(),mxEvent.consume(a))}))};
BaseFormatPanel.prototype.styleButtons=function(a){for(var c=0;c<a.length;c++)mxUtils.setPrefixedStyle(a[c].style,"borderRadius","3px"),mxUtils.setOpacity(a[c],100),a[c].style.border="1px solid #a0a0a0",a[c].style.padding="4px",a[c].style.paddingTop="3px",a[c].style.paddingRight="1px",a[c].style.margin="1px",a[c].style.width="24px",a[c].style.height="20px",a[c].className+=" geColorBtn"};
BaseFormatPanel.prototype.destroy=function(){if(null!=this.listeners){for(var a=0;a<this.listeners.length;a++)this.listeners[a].destroy();this.listeners=null}};ArrangePanel=function(a,c,d){BaseFormatPanel.call(this,a,c,d);this.init()};mxUtils.extend(ArrangePanel,BaseFormatPanel);
ArrangePanel.prototype.init=function(){var a=this.editorUi.editor.graph,c=this.format.getSelectionState();this.container.appendChild(this.addLayerOps(this.createPanel()));this.addGeometry(this.container);this.addEdgeGeometry(this.container);c.containsLabel&&0!=c.edges.length||this.container.appendChild(this.addAngle(this.createPanel()));c.containsLabel||0!=c.edges.length||"rectangle"==c.style.shape||"label"==c.style.shape||this.container.appendChild(this.addFlip(this.createPanel()));1<c.vertices.length?
(this.container.appendChild(this.addAlign(this.createPanel())),this.container.appendChild(this.addDistribute(this.createPanel()))):1==c.vertices.length&&0==c.edges.length&&(a.isTable(c.vertices[0])||a.isTableRow(c.vertices[0])||a.isTableCell(c.vertices[0]))&&this.container.appendChild(this.addTable(this.createPanel()));this.container.appendChild(this.addGroupOps(this.createPanel()));c.containsLabel&&(a=document.createElement("div"),a.style.width="100%",a.style.marginTop="0px",a.style.fontWeight="bold",
a.style.padding="10px 0 0 18px",mxUtils.write(a,mxResources.get("style")),this.container.appendChild(a),new StyleFormatPanel(this.format,this.editorUi,this.container))};
-ArrangePanel.prototype.addTable=function(a){var c=this.editorUi,d=c.editor.graph,b=this.format.getSelectionState();a.style.paddingTop="6px";a.style.paddingBottom="10px";var g=document.createElement("div");g.style.marginTop="2px";g.style.marginBottom="8px";g.style.fontWeight="bold";mxUtils.write(g,mxResources.get("table"));a.appendChild(g);g=document.createElement("div");g.style.position="relative";g.style.paddingLeft="0px";g.style.borderWidth="0px";g.className="geToolbarContainer";var e=[c.toolbar.addButton("geSprite-insertcolumnbefore",
-mxResources.get("insertColumnBefore"),mxUtils.bind(this,function(){try{d.insertTableColumn(b.vertices[0],!0)}catch(h){c.handleError(h)}}),g),c.toolbar.addButton("geSprite-insertcolumnafter",mxResources.get("insertColumnAfter"),mxUtils.bind(this,function(){try{d.insertTableColumn(b.vertices[0],!1)}catch(h){c.handleError(h)}}),g),c.toolbar.addButton("geSprite-deletecolumn",mxResources.get("deleteColumn"),mxUtils.bind(this,function(){try{d.deleteTableColumn(b.vertices[0])}catch(h){c.handleError(h)}}),
-g),c.toolbar.addButton("geSprite-insertrowbefore",mxResources.get("insertRowBefore"),mxUtils.bind(this,function(){try{d.insertTableRow(b.vertices[0],!0)}catch(h){c.handleError(h)}}),g),c.toolbar.addButton("geSprite-insertrowafter",mxResources.get("insertRowAfter"),mxUtils.bind(this,function(){try{d.insertTableRow(b.vertices[0],!1)}catch(h){c.handleError(h)}}),g),c.toolbar.addButton("geSprite-deleterow",mxResources.get("deleteRow"),mxUtils.bind(this,function(){try{d.deleteTableRow(b.vertices[0])}catch(h){c.handleError(h)}}),
-g)];this.styleButtons(e);a.appendChild(g);e[2].style.marginRight="9px";return a};
+ArrangePanel.prototype.addTable=function(a){var c=this.editorUi,d=c.editor.graph,b=this.format.getSelectionState();a.style.paddingTop="6px";a.style.paddingBottom="10px";var f=document.createElement("div");f.style.marginTop="2px";f.style.marginBottom="8px";f.style.fontWeight="bold";mxUtils.write(f,mxResources.get("table"));a.appendChild(f);f=document.createElement("div");f.style.position="relative";f.style.paddingLeft="0px";f.style.borderWidth="0px";f.className="geToolbarContainer";var e=[c.toolbar.addButton("geSprite-insertcolumnbefore",
+mxResources.get("insertColumnBefore"),mxUtils.bind(this,function(){try{d.insertTableColumn(b.vertices[0],!0)}catch(h){c.handleError(h)}}),f),c.toolbar.addButton("geSprite-insertcolumnafter",mxResources.get("insertColumnAfter"),mxUtils.bind(this,function(){try{d.insertTableColumn(b.vertices[0],!1)}catch(h){c.handleError(h)}}),f),c.toolbar.addButton("geSprite-deletecolumn",mxResources.get("deleteColumn"),mxUtils.bind(this,function(){try{d.deleteTableColumn(b.vertices[0])}catch(h){c.handleError(h)}}),
+f),c.toolbar.addButton("geSprite-insertrowbefore",mxResources.get("insertRowBefore"),mxUtils.bind(this,function(){try{d.insertTableRow(b.vertices[0],!0)}catch(h){c.handleError(h)}}),f),c.toolbar.addButton("geSprite-insertrowafter",mxResources.get("insertRowAfter"),mxUtils.bind(this,function(){try{d.insertTableRow(b.vertices[0],!1)}catch(h){c.handleError(h)}}),f),c.toolbar.addButton("geSprite-deleterow",mxResources.get("deleteRow"),mxUtils.bind(this,function(){try{d.deleteTableRow(b.vertices[0])}catch(h){c.handleError(h)}}),
+f)];this.styleButtons(e);a.appendChild(f);e[2].style.marginRight="9px";return a};
ArrangePanel.prototype.addLayerOps=function(a){var c=this.editorUi,d=mxUtils.button(mxResources.get("toFront"),function(a){c.actions.get("toFront").funct()});d.setAttribute("title",mxResources.get("toFront")+" ("+this.editorUi.actions.get("toFront").shortcut+")");d.style.width="100px";d.style.marginRight="2px";a.appendChild(d);d=mxUtils.button(mxResources.get("toBack"),function(a){c.actions.get("toBack").funct()});d.setAttribute("title",mxResources.get("toBack")+" ("+this.editorUi.actions.get("toBack").shortcut+
")");d.style.width="100px";a.appendChild(d);return a};
-ArrangePanel.prototype.addGroupOps=function(a){var c=this.editorUi,d=c.editor.graph,b=d.getSelectionCell(),g=this.format.getSelectionState(),e=0,h=null;a.style.paddingTop="8px";a.style.paddingBottom="6px";1<d.getSelectionCount()?(h=mxUtils.button(mxResources.get("group"),function(a){c.actions.get("group").funct()}),h.setAttribute("title",mxResources.get("group")+" ("+this.editorUi.actions.get("group").shortcut+")"),h.style.width="202px",h.style.marginBottom="2px",a.appendChild(h),e++):1==d.getSelectionCount()&&
-!d.getModel().isEdge(b)&&!d.isSwimlane(b)&&0<d.getModel().getChildCount(b)&&(h=mxUtils.button(mxResources.get("ungroup"),function(a){c.actions.get("ungroup").funct()}),h.setAttribute("title",mxResources.get("ungroup")+" ("+this.editorUi.actions.get("ungroup").shortcut+")"),h.style.width="202px",h.style.marginBottom="2px",a.appendChild(h),e++);0<g.vertices.length&&(0<e&&(mxUtils.br(a),e=0),h=mxUtils.button(mxResources.get("copySize"),function(a){c.actions.get("copySize").funct()}),h.setAttribute("title",
-mxResources.get("copySize")+" ("+this.editorUi.actions.get("copySize").shortcut+")"),h.style.width="202px",h.style.marginBottom="2px",a.appendChild(h),e++,null!=c.copiedSize&&(g=mxUtils.button(mxResources.get("pasteSize"),function(a){c.actions.get("pasteSize").funct()}),g.setAttribute("title",mxResources.get("pasteSize")+" ("+this.editorUi.actions.get("pasteSize").shortcut+")"),a.appendChild(g),e++,h.style.width="100px",h.style.marginBottom="2px",g.style.width="100px",g.style.marginBottom="2px"));
+ArrangePanel.prototype.addGroupOps=function(a){var c=this.editorUi,d=c.editor.graph,b=d.getSelectionCell(),f=this.format.getSelectionState(),e=0,h=null;a.style.paddingTop="8px";a.style.paddingBottom="6px";1<d.getSelectionCount()?(h=mxUtils.button(mxResources.get("group"),function(a){c.actions.get("group").funct()}),h.setAttribute("title",mxResources.get("group")+" ("+this.editorUi.actions.get("group").shortcut+")"),h.style.width="202px",h.style.marginBottom="2px",a.appendChild(h),e++):1==d.getSelectionCount()&&
+!d.getModel().isEdge(b)&&!d.isSwimlane(b)&&0<d.getModel().getChildCount(b)&&(h=mxUtils.button(mxResources.get("ungroup"),function(a){c.actions.get("ungroup").funct()}),h.setAttribute("title",mxResources.get("ungroup")+" ("+this.editorUi.actions.get("ungroup").shortcut+")"),h.style.width="202px",h.style.marginBottom="2px",a.appendChild(h),e++);0<f.vertices.length&&(0<e&&(mxUtils.br(a),e=0),h=mxUtils.button(mxResources.get("copySize"),function(a){c.actions.get("copySize").funct()}),h.setAttribute("title",
+mxResources.get("copySize")+" ("+this.editorUi.actions.get("copySize").shortcut+")"),h.style.width="202px",h.style.marginBottom="2px",a.appendChild(h),e++,null!=c.copiedSize&&(f=mxUtils.button(mxResources.get("pasteSize"),function(a){c.actions.get("pasteSize").funct()}),f.setAttribute("title",mxResources.get("pasteSize")+" ("+this.editorUi.actions.get("pasteSize").shortcut+")"),a.appendChild(f),e++,h.style.width="100px",h.style.marginBottom="2px",f.style.width="100px",f.style.marginBottom="2px"));
1==d.getSelectionCount()&&d.getModel().isVertex(b)&&d.getModel().isVertex(d.getModel().getParent(b))?(0<e&&mxUtils.br(a),h=mxUtils.button(mxResources.get("removeFromGroup"),function(a){c.actions.get("removeFromGroup").funct()}),h.setAttribute("title",mxResources.get("removeFromGroup")),h.style.width="202px",h.style.marginBottom="2px",a.appendChild(h),e++):0<d.getSelectionCount()&&(0<e&&mxUtils.br(a),h=mxUtils.button(mxResources.get("clearWaypoints"),mxUtils.bind(this,function(a){this.editorUi.actions.get("clearWaypoints").funct()})),
h.setAttribute("title",mxResources.get("clearWaypoints")+" ("+this.editorUi.actions.get("clearWaypoints").shortcut+")"),h.style.width="202px",h.style.marginBottom="2px",a.appendChild(h),e++);1==d.getSelectionCount()&&(0<e&&mxUtils.br(a),h=mxUtils.button(mxResources.get("editData"),mxUtils.bind(this,function(a){this.editorUi.actions.get("editData").funct()})),h.setAttribute("title",mxResources.get("editData")+" ("+this.editorUi.actions.get("editData").shortcut+")"),h.style.width="100px",h.style.marginBottom=
"2px",a.appendChild(h),e++,h=mxUtils.button(mxResources.get("editLink"),mxUtils.bind(this,function(a){this.editorUi.actions.get("editLink").funct()})),h.setAttribute("title",mxResources.get("editLink")),h.style.width="100px",h.style.marginLeft="2px",h.style.marginBottom="2px",a.appendChild(h),e++);0==e&&(a.style.display="none");return a};
ArrangePanel.prototype.addAlign=function(a){var c=this.editorUi.editor.graph;a.style.paddingTop="6px";a.style.paddingBottom="12px";a.appendChild(this.createTitle(mxResources.get("align")));var d=document.createElement("div");d.style.position="relative";d.style.paddingLeft="0px";d.style.borderWidth="0px";d.className="geToolbarContainer";mxClient.IS_QUIRKS&&(a.style.height="60px");var b=this.editorUi.toolbar.addButton("geSprite-alignleft",mxResources.get("left"),function(){c.alignCells(mxConstants.ALIGN_LEFT)},
-d),g=this.editorUi.toolbar.addButton("geSprite-aligncenter",mxResources.get("center"),function(){c.alignCells(mxConstants.ALIGN_CENTER)},d),e=this.editorUi.toolbar.addButton("geSprite-alignright",mxResources.get("right"),function(){c.alignCells(mxConstants.ALIGN_RIGHT)},d),h=this.editorUi.toolbar.addButton("geSprite-aligntop",mxResources.get("top"),function(){c.alignCells(mxConstants.ALIGN_TOP)},d),f=this.editorUi.toolbar.addButton("geSprite-alignmiddle",mxResources.get("middle"),function(){c.alignCells(mxConstants.ALIGN_MIDDLE)},
-d),k=this.editorUi.toolbar.addButton("geSprite-alignbottom",mxResources.get("bottom"),function(){c.alignCells(mxConstants.ALIGN_BOTTOM)},d);this.styleButtons([b,g,e,h,f,k]);e.style.marginRight="6px";a.appendChild(d);return a};
+d),f=this.editorUi.toolbar.addButton("geSprite-aligncenter",mxResources.get("center"),function(){c.alignCells(mxConstants.ALIGN_CENTER)},d),e=this.editorUi.toolbar.addButton("geSprite-alignright",mxResources.get("right"),function(){c.alignCells(mxConstants.ALIGN_RIGHT)},d),h=this.editorUi.toolbar.addButton("geSprite-aligntop",mxResources.get("top"),function(){c.alignCells(mxConstants.ALIGN_TOP)},d),g=this.editorUi.toolbar.addButton("geSprite-alignmiddle",mxResources.get("middle"),function(){c.alignCells(mxConstants.ALIGN_MIDDLE)},
+d),k=this.editorUi.toolbar.addButton("geSprite-alignbottom",mxResources.get("bottom"),function(){c.alignCells(mxConstants.ALIGN_BOTTOM)},d);this.styleButtons([b,f,e,h,g,k]);e.style.marginRight="6px";a.appendChild(d);return a};
ArrangePanel.prototype.addFlip=function(a){var c=this.editorUi.editor.graph;a.style.paddingTop="6px";a.style.paddingBottom="10px";var d=document.createElement("div");d.style.marginTop="2px";d.style.marginBottom="8px";d.style.fontWeight="bold";mxUtils.write(d,mxResources.get("flip"));a.appendChild(d);d=mxUtils.button(mxResources.get("horizontal"),function(a){c.toggleCellStyles(mxConstants.STYLE_FLIPH,!1)});d.setAttribute("title",mxResources.get("horizontal"));d.style.width="100px";d.style.marginRight=
"2px";a.appendChild(d);d=mxUtils.button(mxResources.get("vertical"),function(a){c.toggleCellStyles(mxConstants.STYLE_FLIPV,!1)});d.setAttribute("title",mxResources.get("vertical"));d.style.width="100px";a.appendChild(d);return a};
ArrangePanel.prototype.addDistribute=function(a){var c=this.editorUi.editor.graph;a.style.paddingTop="6px";a.style.paddingBottom="12px";a.appendChild(this.createTitle(mxResources.get("distribute")));var d=mxUtils.button(mxResources.get("horizontal"),function(a){c.distributeCells(!0)});d.setAttribute("title",mxResources.get("horizontal"));d.style.width="100px";d.style.marginRight="2px";a.appendChild(d);d=mxUtils.button(mxResources.get("vertical"),function(a){c.distributeCells(!1)});d.setAttribute("title",
mxResources.get("vertical"));d.style.width="100px";a.appendChild(d);return a};
-ArrangePanel.prototype.addAngle=function(a){var c=this.editorUi,d=c.editor.graph,b=this.format.getSelectionState();a.style.paddingBottom="8px";var g=document.createElement("div");g.style.position="absolute";g.style.width="70px";g.style.marginTop="0px";g.style.fontWeight="bold";var e=null,h=null,f=null;b.rotatable?(mxUtils.write(g,mxResources.get("angle")),a.appendChild(g),e=this.addUnitInput(a,"°",20,44,function(){h.apply(this,arguments)}),mxUtils.br(a),a.style.paddingTop="10px"):a.style.paddingTop=
-"8px";b.containsLabel||(g=mxResources.get("reverse"),0<b.vertices.length&&0<b.edges.length?g=mxResources.get("turn")+" / "+g:0<b.vertices.length&&(g=mxResources.get("turn")),f=mxUtils.button(g,function(a){c.actions.get("turn").funct(a)}),f.setAttribute("title",g+" ("+this.editorUi.actions.get("turn").shortcut+")"),f.style.width="202px",a.appendChild(f),null!=e&&(f.style.marginTop="8px"));if(null!=e){var k=mxUtils.bind(this,function(a,c,d){if(d||document.activeElement!=e)b=this.format.getSelectionState(),
+ArrangePanel.prototype.addAngle=function(a){var c=this.editorUi,d=c.editor.graph,b=this.format.getSelectionState();a.style.paddingBottom="8px";var f=document.createElement("div");f.style.position="absolute";f.style.width="70px";f.style.marginTop="0px";f.style.fontWeight="bold";var e=null,h=null,g=null;b.rotatable?(mxUtils.write(f,mxResources.get("angle")),a.appendChild(f),e=this.addUnitInput(a,"°",20,44,function(){h.apply(this,arguments)}),mxUtils.br(a),a.style.paddingTop="10px"):a.style.paddingTop=
+"8px";b.containsLabel||(f=mxResources.get("reverse"),0<b.vertices.length&&0<b.edges.length?f=mxResources.get("turn")+" / "+f:0<b.vertices.length&&(f=mxResources.get("turn")),g=mxUtils.button(f,function(a){c.actions.get("turn").funct(a)}),g.setAttribute("title",f+" ("+this.editorUi.actions.get("turn").shortcut+")"),g.style.width="202px",a.appendChild(g),null!=e&&(g.style.marginTop="8px"));if(null!=e){var k=mxUtils.bind(this,function(a,c,d){if(d||document.activeElement!=e)b=this.format.getSelectionState(),
a=parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_ROTATION,0)),e.value=isNaN(a)?"":a+"°"}),h=this.installInputHandler(e,mxConstants.STYLE_ROTATION,0,0,360,"°",null,!0);this.addKeyHandler(e,k);d.getModel().addListener(mxEvent.CHANGE,k);this.listeners.push({destroy:function(){d.getModel().removeListener(k)}});k()}return a};BaseFormatPanel.prototype.getUnit=function(){switch(this.editorUi.editor.graph.view.unit){case mxConstants.POINTS:return"pt";case mxConstants.INCHES:return'"';case mxConstants.MILLIMETERS:return"mm"}};
BaseFormatPanel.prototype.inUnit=function(a){return this.editorUi.editor.graph.view.formatUnitText(a)};BaseFormatPanel.prototype.fromUnit=function(a){switch(this.editorUi.editor.graph.view.unit){case mxConstants.POINTS:return a;case mxConstants.INCHES:return a*mxConstants.PIXELS_PER_INCH;case mxConstants.MILLIMETERS:return a*mxConstants.PIXELS_PER_MM}};BaseFormatPanel.prototype.isFloatUnit=function(){return this.editorUi.editor.graph.view.unit!=mxConstants.POINTS};
BaseFormatPanel.prototype.getUnitStep=function(){switch(this.editorUi.editor.graph.view.unit){case mxConstants.POINTS:return 1;case mxConstants.INCHES:return.1;case mxConstants.MILLIMETERS:return.5}};
-ArrangePanel.prototype.addGeometry=function(a){var c=this,d=this.editorUi,b=d.editor.graph,g=this.format.getSelectionState(),e=this.createPanel();e.style.paddingBottom="8px";var h=document.createElement("div");h.style.position="absolute";h.style.width="50px";h.style.marginTop="0px";h.style.fontWeight="bold";mxUtils.write(h,mxResources.get("size"));e.appendChild(h);var f,k,l,m,n=this.addUnitInput(e,this.getUnit(),84,44,function(){f.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),
+ArrangePanel.prototype.addGeometry=function(a){var c=this,d=this.editorUi,b=d.editor.graph,f=this.format.getSelectionState(),e=this.createPanel();e.style.paddingBottom="8px";var h=document.createElement("div");h.style.position="absolute";h.style.width="50px";h.style.marginTop="0px";h.style.fontWeight="bold";mxUtils.write(h,mxResources.get("size"));e.appendChild(h);var g,k,l,m,n=this.addUnitInput(e,this.getUnit(),84,44,function(){g.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),
p=this.addUnitInput(e,this.getUnit(),20,44,function(){k.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),q=document.createElement("div");q.className="geSprite geSprite-fit";q.setAttribute("title",mxResources.get("autosize")+" ("+this.editorUi.actions.get("autosize").shortcut+")");q.style.position="relative";q.style.cursor="pointer";q.style.marginTop="-3px";q.style.border="0px";q.style.left="52px";mxUtils.setOpacity(q,50);mxEvent.addListener(q,"mouseenter",function(){mxUtils.setOpacity(q,
100)});mxEvent.addListener(q,"mouseleave",function(){mxUtils.setOpacity(q,50)});mxEvent.addListener(q,"click",function(){d.actions.get("autosize").funct()});e.appendChild(q);this.addLabel(e,mxResources.get("width"),84);this.addLabel(e,mxResources.get("height"),20);mxUtils.br(e);h=document.createElement("div");h.style.paddingTop="8px";h.style.paddingRight="20px";h.style.whiteSpace="nowrap";h.style.textAlign="right";var u=this.createCellOption(mxResources.get("constrainProportions"),mxConstants.STYLE_ASPECT,
-null,"fixed","null");u.style.width="100%";h.appendChild(u);e.appendChild(h);var v=u.getElementsByTagName("input")[0];this.addKeyHandler(n,y);this.addKeyHandler(p,y);f=this.addGeometryHandler(n,function(a,b){0<a.width&&(b=Math.max(1,c.fromUnit(b)),v.checked&&(a.height=Math.round(a.height*b*100/a.width)/100),a.width=b)});k=this.addGeometryHandler(p,function(a,b){0<a.height&&(b=Math.max(1,c.fromUnit(b)),v.checked&&(a.width=Math.round(a.width*b*100/a.height)/100),a.height=b)});g.resizable&&a.appendChild(e);
+null,"fixed","null");u.style.width="100%";h.appendChild(u);e.appendChild(h);var v=u.getElementsByTagName("input")[0];this.addKeyHandler(n,y);this.addKeyHandler(p,y);g=this.addGeometryHandler(n,function(a,b){0<a.width&&(b=Math.max(1,c.fromUnit(b)),v.checked&&(a.height=Math.round(a.height*b*100/a.width)/100),a.width=b)});k=this.addGeometryHandler(p,function(a,b){0<a.height&&(b=Math.max(1,c.fromUnit(b)),v.checked&&(a.width=Math.round(a.width*b*100/a.height)/100),a.height=b)});f.resizable&&a.appendChild(e);
var r=this.createPanel();r.style.paddingBottom="30px";h=document.createElement("div");h.style.position="absolute";h.style.width="70px";h.style.marginTop="0px";h.style.fontWeight="bold";mxUtils.write(h,mxResources.get("position"));r.appendChild(h);var w=this.addUnitInput(r,this.getUnit(),84,44,function(){l.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),t=this.addUnitInput(r,this.getUnit(),20,44,function(){m.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());
-mxUtils.br(r);this.addLabel(r,mxResources.get("left"),84);this.addLabel(r,mxResources.get("top"),20);var y=mxUtils.bind(this,function(a,c,d){g=this.format.getSelectionState();if(g.containsLabel||g.vertices.length!=b.getSelectionCount()||null==g.width||null==g.height)e.style.display="none";else{e.style.display="";if(d||document.activeElement!=n)n.value=this.inUnit(g.width)+(""==g.width?"":" "+this.getUnit());if(d||document.activeElement!=p)p.value=this.inUnit(g.height)+(""==g.height?"":" "+this.getUnit())}if(g.vertices.length==
-b.getSelectionCount()&&null!=g.x&&null!=g.y){r.style.display="";if(d||document.activeElement!=w)w.value=this.inUnit(g.x)+(""==g.x?"":" "+this.getUnit());if(d||document.activeElement!=t)t.value=this.inUnit(g.y)+(""==g.y?"":" "+this.getUnit())}else r.style.display="none"});this.addKeyHandler(w,y);this.addKeyHandler(t,y);b.getModel().addListener(mxEvent.CHANGE,y);this.listeners.push({destroy:function(){b.getModel().removeListener(y)}});y();l=this.addGeometryHandler(w,function(a,b){b=c.fromUnit(b);a.relative?
-a.offset.x=b:a.x=b});m=this.addGeometryHandler(t,function(a,b){b=c.fromUnit(b);a.relative?a.offset.y=b:a.y=b});g.movable&&a.appendChild(r)};
-ArrangePanel.prototype.addGeometryHandler=function(a,c){function d(d){if(""!=a.value){var f=parseFloat(a.value);if(isNaN(f))a.value=g+" "+e.getUnit();else if(f!=g){b.getModel().beginUpdate();try{for(var h=b.getSelectionCells(),l=0;l<h.length;l++)if(b.getModel().isVertex(h[l])){var m=b.getCellGeometry(h[l]);if(null!=m){m=m.clone();c(m,f);var n=b.view.getState(h[l]);null!=n&&b.isRecursiveVertexResize(n)&&b.resizeChildCells(h[l],m);b.getModel().setGeometry(h[l],m);b.constrainChildCells(h[l])}}}finally{b.getModel().endUpdate()}g=
-f;a.value=f+" "+e.getUnit()}}mxEvent.consume(d)}var b=this.editorUi.editor.graph,g=null,e=this;mxEvent.addListener(a,"blur",d);mxEvent.addListener(a,"change",d);mxEvent.addListener(a,"focus",function(){g=a.value});return d};
-ArrangePanel.prototype.addEdgeGeometryHandler=function(a,c){function d(d){if(""!=a.value){var e=parseFloat(a.value);if(isNaN(e))a.value=g+" pt";else if(e!=g){b.getModel().beginUpdate();try{for(var f=b.getSelectionCells(),k=0;k<f.length;k++)if(b.getModel().isEdge(f[k])){var l=b.getCellGeometry(f[k]);null!=l&&(l=l.clone(),c(l,e),b.getModel().setGeometry(f[k],l))}}finally{b.getModel().endUpdate()}g=e;a.value=e+" pt"}}mxEvent.consume(d)}var b=this.editorUi.editor.graph,g=null;mxEvent.addListener(a,"blur",
-d);mxEvent.addListener(a,"change",d);mxEvent.addListener(a,"focus",function(){g=a.value});return d};
-ArrangePanel.prototype.addEdgeGeometry=function(a){function c(a){var c=parseInt(n.value),c=Math.min(999,Math.max(1,isNaN(c)?1:c));c!=mxUtils.getValue(g.style,"width",mxCellRenderer.defaultShapes.flexArrow.prototype.defaultWidth)&&(b.setCellStyles("width",c,b.getSelectionCells()),d.fireEvent(new mxEventObject("styleChanged","keys",["width"],"values",[c],"cells",b.getSelectionCells())));n.value=c+" pt";mxEvent.consume(a)}var d=this.editorUi,b=d.editor.graph,g=this.format.getSelectionState(),e=this.createPanel(),
-h=document.createElement("div");h.style.position="absolute";h.style.width="70px";h.style.marginTop="0px";h.style.fontWeight="bold";mxUtils.write(h,mxResources.get("width"));e.appendChild(h);var f,k,l,m,n=this.addUnitInput(e,"pt",20,44,function(){c.apply(this,arguments)});mxUtils.br(e);this.addKeyHandler(n,t);mxEvent.addListener(n,"blur",c);mxEvent.addListener(n,"change",c);a.appendChild(e);var p=this.createPanel();p.style.paddingBottom="30px";h=document.createElement("div");h.style.position="absolute";
+mxUtils.br(r);this.addLabel(r,mxResources.get("left"),84);this.addLabel(r,mxResources.get("top"),20);var y=mxUtils.bind(this,function(a,c,d){f=this.format.getSelectionState();if(f.containsLabel||f.vertices.length!=b.getSelectionCount()||null==f.width||null==f.height)e.style.display="none";else{e.style.display="";if(d||document.activeElement!=n)n.value=this.inUnit(f.width)+(""==f.width?"":" "+this.getUnit());if(d||document.activeElement!=p)p.value=this.inUnit(f.height)+(""==f.height?"":" "+this.getUnit())}if(f.vertices.length==
+b.getSelectionCount()&&null!=f.x&&null!=f.y){r.style.display="";if(d||document.activeElement!=w)w.value=this.inUnit(f.x)+(""==f.x?"":" "+this.getUnit());if(d||document.activeElement!=t)t.value=this.inUnit(f.y)+(""==f.y?"":" "+this.getUnit())}else r.style.display="none"});this.addKeyHandler(w,y);this.addKeyHandler(t,y);b.getModel().addListener(mxEvent.CHANGE,y);this.listeners.push({destroy:function(){b.getModel().removeListener(y)}});y();l=this.addGeometryHandler(w,function(a,b){b=c.fromUnit(b);a.relative?
+a.offset.x=b:a.x=b});m=this.addGeometryHandler(t,function(a,b){b=c.fromUnit(b);a.relative?a.offset.y=b:a.y=b});f.movable&&a.appendChild(r)};
+ArrangePanel.prototype.addGeometryHandler=function(a,c){function d(d){if(""!=a.value){var g=parseFloat(a.value);if(isNaN(g))a.value=f+" "+e.getUnit();else if(g!=f){b.getModel().beginUpdate();try{for(var h=b.getSelectionCells(),l=0;l<h.length;l++)if(b.getModel().isVertex(h[l])){var m=b.getCellGeometry(h[l]);if(null!=m){m=m.clone();c(m,g);var n=b.view.getState(h[l]);null!=n&&b.isRecursiveVertexResize(n)&&b.resizeChildCells(h[l],m);b.getModel().setGeometry(h[l],m);b.constrainChildCells(h[l])}}}finally{b.getModel().endUpdate()}f=
+g;a.value=g+" "+e.getUnit()}}mxEvent.consume(d)}var b=this.editorUi.editor.graph,f=null,e=this;mxEvent.addListener(a,"blur",d);mxEvent.addListener(a,"change",d);mxEvent.addListener(a,"focus",function(){f=a.value});return d};
+ArrangePanel.prototype.addEdgeGeometryHandler=function(a,c){function d(d){if(""!=a.value){var e=parseFloat(a.value);if(isNaN(e))a.value=f+" pt";else if(e!=f){b.getModel().beginUpdate();try{for(var g=b.getSelectionCells(),k=0;k<g.length;k++)if(b.getModel().isEdge(g[k])){var l=b.getCellGeometry(g[k]);null!=l&&(l=l.clone(),c(l,e),b.getModel().setGeometry(g[k],l))}}finally{b.getModel().endUpdate()}f=e;a.value=e+" pt"}}mxEvent.consume(d)}var b=this.editorUi.editor.graph,f=null;mxEvent.addListener(a,"blur",
+d);mxEvent.addListener(a,"change",d);mxEvent.addListener(a,"focus",function(){f=a.value});return d};
+ArrangePanel.prototype.addEdgeGeometry=function(a){function c(a){var c=parseInt(n.value),c=Math.min(999,Math.max(1,isNaN(c)?1:c));c!=mxUtils.getValue(f.style,"width",mxCellRenderer.defaultShapes.flexArrow.prototype.defaultWidth)&&(b.setCellStyles("width",c,b.getSelectionCells()),d.fireEvent(new mxEventObject("styleChanged","keys",["width"],"values",[c],"cells",b.getSelectionCells())));n.value=c+" pt";mxEvent.consume(a)}var d=this.editorUi,b=d.editor.graph,f=this.format.getSelectionState(),e=this.createPanel(),
+h=document.createElement("div");h.style.position="absolute";h.style.width="70px";h.style.marginTop="0px";h.style.fontWeight="bold";mxUtils.write(h,mxResources.get("width"));e.appendChild(h);var g,k,l,m,n=this.addUnitInput(e,"pt",20,44,function(){c.apply(this,arguments)});mxUtils.br(e);this.addKeyHandler(n,t);mxEvent.addListener(n,"blur",c);mxEvent.addListener(n,"change",c);a.appendChild(e);var p=this.createPanel();p.style.paddingBottom="30px";h=document.createElement("div");h.style.position="absolute";
h.style.width="70px";h.style.marginTop="0px";h.style.fontWeight="bold";mxUtils.write(h,"Start");p.appendChild(h);var q=this.addUnitInput(p,"pt",84,44,function(){l.apply(this,arguments)}),u=this.addUnitInput(p,"pt",20,44,function(){m.apply(this,arguments)});mxUtils.br(p);this.addLabel(p,mxResources.get("left"),84);this.addLabel(p,mxResources.get("top"),20);a.appendChild(p);this.addKeyHandler(q,t);this.addKeyHandler(u,t);var v=this.createPanel();v.style.paddingBottom="30px";h=document.createElement("div");
-h.style.position="absolute";h.style.width="70px";h.style.marginTop="0px";h.style.fontWeight="bold";mxUtils.write(h,"End");v.appendChild(h);var r=this.addUnitInput(v,"pt",84,44,function(){f.apply(this,arguments)}),w=this.addUnitInput(v,"pt",20,44,function(){k.apply(this,arguments)});mxUtils.br(v);this.addLabel(v,mxResources.get("left"),84);this.addLabel(v,mxResources.get("top"),20);a.appendChild(v);this.addKeyHandler(r,t);this.addKeyHandler(w,t);var t=mxUtils.bind(this,function(a,c,d){g=this.format.getSelectionState();
-a=b.getSelectionCell();if("link"==g.style.shape||"flexArrow"==g.style.shape){if(e.style.display="",d||document.activeElement!=n)d=mxUtils.getValue(g.style,"width",mxCellRenderer.defaultShapes.flexArrow.prototype.defaultWidth),n.value=d+" pt"}else e.style.display="none";1==b.getSelectionCount()&&b.model.isEdge(a)?(d=b.model.getGeometry(a),null!=d.sourcePoint&&null==b.model.getTerminal(a,!0)?(q.value=d.sourcePoint.x,u.value=d.sourcePoint.y):p.style.display="none",null!=d.targetPoint&&null==b.model.getTerminal(a,
-!1)?(r.value=d.targetPoint.x,w.value=d.targetPoint.y):v.style.display="none"):(p.style.display="none",v.style.display="none")});l=this.addEdgeGeometryHandler(q,function(a,b){a.sourcePoint.x=b});m=this.addEdgeGeometryHandler(u,function(a,b){a.sourcePoint.y=b});f=this.addEdgeGeometryHandler(r,function(a,b){a.targetPoint.x=b});k=this.addEdgeGeometryHandler(w,function(a,b){a.targetPoint.y=b});b.getModel().addListener(mxEvent.CHANGE,t);this.listeners.push({destroy:function(){b.getModel().removeListener(t)}});
+h.style.position="absolute";h.style.width="70px";h.style.marginTop="0px";h.style.fontWeight="bold";mxUtils.write(h,"End");v.appendChild(h);var r=this.addUnitInput(v,"pt",84,44,function(){g.apply(this,arguments)}),w=this.addUnitInput(v,"pt",20,44,function(){k.apply(this,arguments)});mxUtils.br(v);this.addLabel(v,mxResources.get("left"),84);this.addLabel(v,mxResources.get("top"),20);a.appendChild(v);this.addKeyHandler(r,t);this.addKeyHandler(w,t);var t=mxUtils.bind(this,function(a,c,d){f=this.format.getSelectionState();
+a=b.getSelectionCell();if("link"==f.style.shape||"flexArrow"==f.style.shape){if(e.style.display="",d||document.activeElement!=n)d=mxUtils.getValue(f.style,"width",mxCellRenderer.defaultShapes.flexArrow.prototype.defaultWidth),n.value=d+" pt"}else e.style.display="none";1==b.getSelectionCount()&&b.model.isEdge(a)?(d=b.model.getGeometry(a),null!=d.sourcePoint&&null==b.model.getTerminal(a,!0)?(q.value=d.sourcePoint.x,u.value=d.sourcePoint.y):p.style.display="none",null!=d.targetPoint&&null==b.model.getTerminal(a,
+!1)?(r.value=d.targetPoint.x,w.value=d.targetPoint.y):v.style.display="none"):(p.style.display="none",v.style.display="none")});l=this.addEdgeGeometryHandler(q,function(a,b){a.sourcePoint.x=b});m=this.addEdgeGeometryHandler(u,function(a,b){a.sourcePoint.y=b});g=this.addEdgeGeometryHandler(r,function(a,b){a.targetPoint.x=b});k=this.addEdgeGeometryHandler(w,function(a,b){a.targetPoint.y=b});b.getModel().addListener(mxEvent.CHANGE,t);this.listeners.push({destroy:function(){b.getModel().removeListener(t)}});
t()};TextFormatPanel=function(a,c,d){BaseFormatPanel.call(this,a,c,d);this.init()};mxUtils.extend(TextFormatPanel,BaseFormatPanel);TextFormatPanel.prototype.init=function(){this.container.style.borderBottom="none";this.addFont(this.container)};
-TextFormatPanel.prototype.addFont=function(a){function c(a,b){mxClient.IS_IE&&(mxClient.IS_QUIRKS||10>document.documentMode)?a.style.filter=b?"progid:DXImageTransform.Microsoft.Gradient(StartColorStr='#c5ecff', EndColorStr='#87d4fb', GradientType=0)":"":a.style.backgroundImage=b?"linear-gradient(#c5ecff 0px,#87d4fb 100%)":""}var d=this.editorUi,b=d.editor.graph,g=this.format.getSelectionState(),e=this.createTitle(mxResources.get("font"));e.style.paddingLeft="18px";e.style.paddingTop="10px";e.style.paddingBottom=
-"6px";a.appendChild(e);e=this.createPanel();e.style.paddingTop="2px";e.style.paddingBottom="2px";e.style.position="relative";e.style.marginLeft="-2px";e.style.borderWidth="0px";e.className="geToolbarContainer";mxClient.IS_QUIRKS&&(e.style.display="block");if(b.cellEditor.isContentEditing()){var h=e.cloneNode(),f=this.editorUi.toolbar.addMenu(mxResources.get("style"),mxResources.get("style"),!0,"formatBlock",h,null,!0);f.style.color="rgb(112, 112, 112)";f.style.whiteSpace="nowrap";f.style.overflow=
-"hidden";f.style.margin="0px";this.addArrow(f);f.style.width="192px";f.style.height="15px";f=f.getElementsByTagName("div")[0];f.style.cssFloat="right";a.appendChild(h)}a.appendChild(e);h=this.createPanel();h.style.marginTop="8px";h.style.borderTop="1px solid #c0c0c0";h.style.paddingTop="6px";h.style.paddingBottom="6px";var k=this.editorUi.toolbar.addMenu("Helvetica",mxResources.get("fontFamily"),!0,"fontFamily",e,null,!0);k.style.color="rgb(112, 112, 112)";k.style.whiteSpace="nowrap";k.style.overflow=
-"hidden";k.style.margin="0px";this.addArrow(k);k.style.width="192px";k.style.height="15px";f=e.cloneNode(!1);f.style.marginLeft="-3px";var l=this.editorUi.toolbar.addItems(["bold","italic","underline"],f,!0);l[0].setAttribute("title",mxResources.get("bold")+" ("+this.editorUi.actions.get("bold").shortcut+")");l[1].setAttribute("title",mxResources.get("italic")+" ("+this.editorUi.actions.get("italic").shortcut+")");l[2].setAttribute("title",mxResources.get("underline")+" ("+this.editorUi.actions.get("underline").shortcut+
-")");var m=this.editorUi.toolbar.addItems(["vertical"],f,!0)[0];mxClient.IS_QUIRKS&&mxUtils.br(a);a.appendChild(f);this.styleButtons(l);this.styleButtons([m]);var n=e.cloneNode(!1);n.style.marginLeft="-3px";n.style.paddingBottom="0px";var p=function(a){return function(){return a()}},q=this.editorUi.toolbar.addButton("geSprite-left",mxResources.get("left"),b.cellEditor.isContentEditing()?function(a){b.cellEditor.alignText(mxConstants.ALIGN_LEFT,a)}:p(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],
+TextFormatPanel.prototype.addFont=function(a){function c(a,b){mxClient.IS_IE&&(mxClient.IS_QUIRKS||10>document.documentMode)?a.style.filter=b?"progid:DXImageTransform.Microsoft.Gradient(StartColorStr='#c5ecff', EndColorStr='#87d4fb', GradientType=0)":"":a.style.backgroundImage=b?"linear-gradient(#c5ecff 0px,#87d4fb 100%)":""}var d=this.editorUi,b=d.editor.graph,f=this.format.getSelectionState(),e=this.createTitle(mxResources.get("font"));e.style.paddingLeft="18px";e.style.paddingTop="10px";e.style.paddingBottom=
+"6px";a.appendChild(e);e=this.createPanel();e.style.paddingTop="2px";e.style.paddingBottom="2px";e.style.position="relative";e.style.marginLeft="-2px";e.style.borderWidth="0px";e.className="geToolbarContainer";mxClient.IS_QUIRKS&&(e.style.display="block");if(b.cellEditor.isContentEditing()){var h=e.cloneNode(),g=this.editorUi.toolbar.addMenu(mxResources.get("style"),mxResources.get("style"),!0,"formatBlock",h,null,!0);g.style.color="rgb(112, 112, 112)";g.style.whiteSpace="nowrap";g.style.overflow=
+"hidden";g.style.margin="0px";this.addArrow(g);g.style.width="192px";g.style.height="15px";g=g.getElementsByTagName("div")[0];g.style.cssFloat="right";a.appendChild(h)}a.appendChild(e);h=this.createPanel();h.style.marginTop="8px";h.style.borderTop="1px solid #c0c0c0";h.style.paddingTop="6px";h.style.paddingBottom="6px";var k=this.editorUi.toolbar.addMenu("Helvetica",mxResources.get("fontFamily"),!0,"fontFamily",e,null,!0);k.style.color="rgb(112, 112, 112)";k.style.whiteSpace="nowrap";k.style.overflow=
+"hidden";k.style.margin="0px";this.addArrow(k);k.style.width="192px";k.style.height="15px";g=e.cloneNode(!1);g.style.marginLeft="-3px";var l=this.editorUi.toolbar.addItems(["bold","italic","underline"],g,!0);l[0].setAttribute("title",mxResources.get("bold")+" ("+this.editorUi.actions.get("bold").shortcut+")");l[1].setAttribute("title",mxResources.get("italic")+" ("+this.editorUi.actions.get("italic").shortcut+")");l[2].setAttribute("title",mxResources.get("underline")+" ("+this.editorUi.actions.get("underline").shortcut+
+")");var m=this.editorUi.toolbar.addItems(["vertical"],g,!0)[0];mxClient.IS_QUIRKS&&mxUtils.br(a);a.appendChild(g);this.styleButtons(l);this.styleButtons([m]);var n=e.cloneNode(!1);n.style.marginLeft="-3px";n.style.paddingBottom="0px";var p=function(a){return function(){return a()}},q=this.editorUi.toolbar.addButton("geSprite-left",mxResources.get("left"),b.cellEditor.isContentEditing()?function(a){b.cellEditor.alignText(mxConstants.ALIGN_LEFT,a)}:p(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],
[mxConstants.ALIGN_LEFT])),n),u=this.editorUi.toolbar.addButton("geSprite-center",mxResources.get("center"),b.cellEditor.isContentEditing()?function(a){b.cellEditor.alignText(mxConstants.ALIGN_CENTER,a)}:p(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_CENTER])),n),v=this.editorUi.toolbar.addButton("geSprite-right",mxResources.get("right"),b.cellEditor.isContentEditing()?function(a){b.cellEditor.alignText(mxConstants.ALIGN_RIGHT,a)}:p(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],
-[mxConstants.ALIGN_RIGHT])),n);this.styleButtons([q,u,v]);if(b.cellEditor.isContentEditing()){var r=this.editorUi.toolbar.addButton("geSprite-removeformat",mxResources.get("strikethrough"),function(){document.execCommand("strikeThrough",!1,null)},f);this.styleButtons([r]);r.firstChild.style.background="url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PGRlZnM+PHBhdGggaWQ9ImEiIGQ9Ik0wIDBoMjR2MjRIMFYweiIvPjwvZGVmcz48Y2xpcFBhdGggaWQ9ImIiPjx1c2UgeGxpbms6aHJlZj0iI2EiIG92ZXJmbG93PSJ2aXNpYmxlIi8+PC9jbGlwUGF0aD48cGF0aCBjbGlwLXBhdGg9InVybCgjYikiIGZpbGw9IiMwMTAxMDEiIGQ9Ik03LjI0IDguNzVjLS4yNi0uNDgtLjM5LTEuMDMtLjM5LTEuNjcgMC0uNjEuMTMtMS4xNi40LTEuNjcuMjYtLjUuNjMtLjkzIDEuMTEtMS4yOS40OC0uMzUgMS4wNS0uNjMgMS43LS44My42Ni0uMTkgMS4zOS0uMjkgMi4xOC0uMjkuODEgMCAxLjU0LjExIDIuMjEuMzQuNjYuMjIgMS4yMy41NCAxLjY5Ljk0LjQ3LjQuODMuODggMS4wOCAxLjQzLjI1LjU1LjM4IDEuMTUuMzggMS44MWgtMy4wMWMwLS4zMS0uMDUtLjU5LS4xNS0uODUtLjA5LS4yNy0uMjQtLjQ5LS40NC0uNjgtLjItLjE5LS40NS0uMzMtLjc1LS40NC0uMy0uMS0uNjYtLjE2LTEuMDYtLjE2LS4zOSAwLS43NC4wNC0xLjAzLjEzLS4yOS4wOS0uNTMuMjEtLjcyLjM2LS4xOS4xNi0uMzQuMzQtLjQ0LjU1LS4xLjIxLS4xNS40My0uMTUuNjYgMCAuNDguMjUuODguNzQgMS4yMS4zOC4yNS43Ny40OCAxLjQxLjdINy4zOWMtLjA1LS4wOC0uMTEtLjE3LS4xNS0uMjV6TTIxIDEydi0ySDN2Mmg5LjYyYy4xOC4wNy40LjE0LjU1LjIuMzcuMTcuNjYuMzQuODcuNTEuMjEuMTcuMzUuMzYuNDMuNTcuMDcuMi4xMS40My4xMS42OSAwIC4yMy0uMDUuNDUtLjE0LjY2LS4wOS4yLS4yMy4zOC0uNDIuNTMtLjE5LjE1LS40Mi4yNi0uNzEuMzUtLjI5LjA4LS42My4xMy0xLjAxLjEzLS40MyAwLS44My0uMDQtMS4xOC0uMTNzLS42Ni0uMjMtLjkxLS40MmMtLjI1LS4xOS0uNDUtLjQ0LS41OS0uNzUtLjE0LS4zMS0uMjUtLjc2LS4yNS0xLjIxSDYuNGMwIC41NS4wOCAxLjEzLjI0IDEuNTguMTYuNDUuMzcuODUuNjUgMS4yMS4yOC4zNS42LjY2Ljk4LjkyLjM3LjI2Ljc4LjQ4IDEuMjIuNjUuNDQuMTcuOS4zIDEuMzguMzkuNDguMDguOTYuMTMgMS40NC4xMy44IDAgMS41My0uMDkgMi4xOC0uMjhzMS4yMS0uNDUgMS42Ny0uNzljLjQ2LS4zNC44Mi0uNzcgMS4wNy0xLjI3cy4zOC0xLjA3LjM4LTEuNzFjMC0uNi0uMS0xLjE0LS4zMS0xLjYxLS4wNS0uMTEtLjExLS4yMy0uMTctLjMzSDIxeiIvPjwvc3ZnPg==)";
+[mxConstants.ALIGN_RIGHT])),n);this.styleButtons([q,u,v]);if(b.cellEditor.isContentEditing()){var r=this.editorUi.toolbar.addButton("geSprite-removeformat",mxResources.get("strikethrough"),function(){document.execCommand("strikeThrough",!1,null)},g);this.styleButtons([r]);r.firstChild.style.background="url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PGRlZnM+PHBhdGggaWQ9ImEiIGQ9Ik0wIDBoMjR2MjRIMFYweiIvPjwvZGVmcz48Y2xpcFBhdGggaWQ9ImIiPjx1c2UgeGxpbms6aHJlZj0iI2EiIG92ZXJmbG93PSJ2aXNpYmxlIi8+PC9jbGlwUGF0aD48cGF0aCBjbGlwLXBhdGg9InVybCgjYikiIGZpbGw9IiMwMTAxMDEiIGQ9Ik03LjI0IDguNzVjLS4yNi0uNDgtLjM5LTEuMDMtLjM5LTEuNjcgMC0uNjEuMTMtMS4xNi40LTEuNjcuMjYtLjUuNjMtLjkzIDEuMTEtMS4yOS40OC0uMzUgMS4wNS0uNjMgMS43LS44My42Ni0uMTkgMS4zOS0uMjkgMi4xOC0uMjkuODEgMCAxLjU0LjExIDIuMjEuMzQuNjYuMjIgMS4yMy41NCAxLjY5Ljk0LjQ3LjQuODMuODggMS4wOCAxLjQzLjI1LjU1LjM4IDEuMTUuMzggMS44MWgtMy4wMWMwLS4zMS0uMDUtLjU5LS4xNS0uODUtLjA5LS4yNy0uMjQtLjQ5LS40NC0uNjgtLjItLjE5LS40NS0uMzMtLjc1LS40NC0uMy0uMS0uNjYtLjE2LTEuMDYtLjE2LS4zOSAwLS43NC4wNC0xLjAzLjEzLS4yOS4wOS0uNTMuMjEtLjcyLjM2LS4xOS4xNi0uMzQuMzQtLjQ0LjU1LS4xLjIxLS4xNS40My0uMTUuNjYgMCAuNDguMjUuODguNzQgMS4yMS4zOC4yNS43Ny40OCAxLjQxLjdINy4zOWMtLjA1LS4wOC0uMTEtLjE3LS4xNS0uMjV6TTIxIDEydi0ySDN2Mmg5LjYyYy4xOC4wNy40LjE0LjU1LjIuMzcuMTcuNjYuMzQuODcuNTEuMjEuMTcuMzUuMzYuNDMuNTcuMDcuMi4xMS40My4xMS42OSAwIC4yMy0uMDUuNDUtLjE0LjY2LS4wOS4yLS4yMy4zOC0uNDIuNTMtLjE5LjE1LS40Mi4yNi0uNzEuMzUtLjI5LjA4LS42My4xMy0xLjAxLjEzLS40MyAwLS44My0uMDQtMS4xOC0uMTNzLS42Ni0uMjMtLjkxLS40MmMtLjI1LS4xOS0uNDUtLjQ0LS41OS0uNzUtLjE0LS4zMS0uMjUtLjc2LS4yNS0xLjIxSDYuNGMwIC41NS4wOCAxLjEzLjI0IDEuNTguMTYuNDUuMzcuODUuNjUgMS4yMS4yOC4zNS42LjY2Ljk4LjkyLjM3LjI2Ljc4LjQ4IDEuMjIuNjUuNDQuMTcuOS4zIDEuMzguMzkuNDguMDguOTYuMTMgMS40NC4xMy44IDAgMS41My0uMDkgMi4xOC0uMjhzMS4yMS0uNDUgMS42Ny0uNzljLjQ2LS4zNC44Mi0uNzcgMS4wNy0xLjI3cy4zOC0xLjA3LjM4LTEuNzFjMC0uNi0uMS0xLjE0LS4zMS0xLjYxLS4wNS0uMTEtLjExLS4yMy0uMTctLjMzSDIxeiIvPjwvc3ZnPg==)";
r.firstChild.style.backgroundPosition="2px 2px";r.firstChild.style.backgroundSize="18px 18px";this.styleButtons([r])}var w=this.editorUi.toolbar.addButton("geSprite-top",mxResources.get("top"),p(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_TOP])),n),t=this.editorUi.toolbar.addButton("geSprite-middle",mxResources.get("middle"),p(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_MIDDLE])),n),y=this.editorUi.toolbar.addButton("geSprite-bottom",
mxResources.get("bottom"),p(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_BOTTOM])),n);this.styleButtons([w,t,y]);mxClient.IS_QUIRKS&&mxUtils.br(a);a.appendChild(n);var x,C,B,D,A,F,J;b.cellEditor.isContentEditing()?(w.style.display="none",t.style.display="none",y.style.display="none",m.style.display="none",B=this.editorUi.toolbar.addButton("geSprite-justifyfull",mxResources.get("block"),function(){1==B.style.opacity&&document.execCommand("justifyfull",
!1,null)},n),B.style.marginRight="9px",B.style.opacity=1,this.styleButtons([B,x=this.editorUi.toolbar.addButton("geSprite-subscript",mxResources.get("subscript")+" ("+Editor.ctrlKey+"+,)",function(){document.execCommand("subscript",!1,null)},n),C=this.editorUi.toolbar.addButton("geSprite-superscript",mxResources.get("superscript")+" ("+Editor.ctrlKey+"+.)",function(){document.execCommand("superscript",!1,null)},n)]),x.style.marginLeft="9px",p=n.cloneNode(!1),p.style.paddingTop="4px",n=[this.editorUi.toolbar.addButton("geSprite-orderedlist",
@@ -2914,39 +2915,39 @@ mxConstants.ALIGN_CENTER,mxConstants.ALIGN_BOTTOM],topRight:[mxConstants.ALIGN_R
mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_TOP],bottom:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP],bottomRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP]},p=0;p<r.length;p++){var E=document.createElement("option");E.setAttribute("value",r[p]);mxUtils.write(E,mxResources.get(r[p]));G.appendChild(E)}n.appendChild(G);r=e.cloneNode(!1);r.style.marginLeft="0px";r.style.paddingTop=
"4px";r.style.paddingBottom="4px";r.style.fontWeight="normal";mxUtils.write(r,mxResources.get("writingDirection"));var O=document.createElement("select");O.style.position="absolute";O.style.right="20px";O.style.width="97px";O.style.marginTop="-2px";for(var E=["automatic","leftToRight","rightToLeft"],Q={automatic:null,leftToRight:mxConstants.TEXT_DIRECTION_LTR,rightToLeft:mxConstants.TEXT_DIRECTION_RTL},p=0;p<E.length;p++){var R=document.createElement("option");R.setAttribute("value",E[p]);mxUtils.write(R,
mxResources.get(E[p]));O.appendChild(R)}r.appendChild(O);b.isEditing()||(a.appendChild(n),mxEvent.addListener(G,"change",function(a){b.getModel().beginUpdate();try{var c=K[G.value];null!=c&&(b.setCellStyles(mxConstants.STYLE_LABEL_POSITION,c[0],b.getSelectionCells()),b.setCellStyles(mxConstants.STYLE_VERTICAL_LABEL_POSITION,c[1],b.getSelectionCells()),b.setCellStyles(mxConstants.STYLE_ALIGN,c[2],b.getSelectionCells()),b.setCellStyles(mxConstants.STYLE_VERTICAL_ALIGN,c[3],b.getSelectionCells()))}finally{b.getModel().endUpdate()}mxEvent.consume(a)}),
-a.appendChild(r),mxEvent.addListener(O,"change",function(a){b.setCellStyles(mxConstants.STYLE_TEXT_DIRECTION,Q[O.value],b.getSelectionCells());mxEvent.consume(a)}));var L=document.createElement("input");L.style.textAlign="right";L.style.marginTop="4px";mxClient.IS_QUIRKS||(L.style.position="absolute",L.style.right="32px");L.style.width="46px";L.style.height=mxClient.IS_QUIRKS?"21px":"17px";f.appendChild(L);var I=null,n=this.installInputHandler(L,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize,
+a.appendChild(r),mxEvent.addListener(O,"change",function(a){b.setCellStyles(mxConstants.STYLE_TEXT_DIRECTION,Q[O.value],b.getSelectionCells());mxEvent.consume(a)}));var L=document.createElement("input");L.style.textAlign="right";L.style.marginTop="4px";mxClient.IS_QUIRKS||(L.style.position="absolute",L.style.right="32px");L.style.width="46px";L.style.height=mxClient.IS_QUIRKS?"21px":"17px";g.appendChild(L);var I=null,n=this.installInputHandler(L,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize,
1,999," pt",function(a){if(window.getSelection&&!mxClient.IS_IE&&!mxClient.IS_IE11){var c=function(c,e){null!=b.cellEditor.textarea&&c!=b.cellEditor.textarea&&b.cellEditor.textarea.contains(c)&&(e||d.containsNode(c,!0))&&("FONT"==c.nodeName?(c.removeAttribute("size"),c.style.fontSize=a+"px"):mxUtils.getCurrentStyle(c).fontSize!=a+"px"&&(mxUtils.getCurrentStyle(c.parentNode).fontSize!=a+"px"?c.style.fontSize=a+"px":c.style.fontSize=""))},d=window.getSelection(),e=0<d.rangeCount?d.getRangeAt(0).commonAncestorContainer:
b.cellEditor.textarea;e!=b.cellEditor.textarea&&e.nodeType==mxConstants.NODETYPE_ELEMENT||document.execCommand("fontSize",!1,"1");e!=b.cellEditor.textarea&&(e=e.parentNode);if(null!=e&&e.nodeType==mxConstants.NODETYPE_ELEMENT){var f=e.getElementsByTagName("*");c(e);for(e=0;e<f.length;e++)c(f[e])}L.value=a+" pt"}else if(window.getSelection||document.selection)if(c=function(a,b){for(;null!=b;){if(b===a)return!0;b=b.parentNode}return!1},f=null,document.selection?f=document.selection.createRange().parentElement():
(d=window.getSelection(),0<d.rangeCount&&(f=d.getRangeAt(0).commonAncestorContainer)),null!=f&&c(b.cellEditor.textarea,f))for(I=a,document.execCommand("fontSize",!1,"4"),f=b.cellEditor.textarea.getElementsByTagName("font"),e=0;e<f.length;e++)if("4"==f[e].getAttribute("size")){f[e].removeAttribute("size");f[e].style.fontSize=I+"px";window.setTimeout(function(){L.value=I+" pt";I=null},0);break}},!0),n=this.createStepper(L,n,1,10,!0,Menus.prototype.defaultFontSize);n.style.display=L.style.display;n.style.marginTop=
-"4px";mxClient.IS_QUIRKS||(n.style.right="20px");f.appendChild(n);f=k.getElementsByTagName("div")[0];f.style.cssFloat="right";var M=null,ba="#ffffff",ca=null,ga="#000000",X=b.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("backgroundColor"),function(){return ba},function(a){document.execCommand("backcolor",!1,a!=mxConstants.NONE?a:"transparent")},"#ffffff",{install:function(a){M=a},destroy:function(){M=null}},null,!0):this.createCellColorOption(mxResources.get("backgroundColor"),
-mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"#ffffff",null,function(a){b.updateLabelElements(b.getSelectionCells(),function(a){a.style.backgroundColor=null})});X.style.fontWeight="bold";var Y=this.createCellColorOption(mxResources.get("borderColor"),mxConstants.STYLE_LABEL_BORDERCOLOR,"#000000");Y.style.fontWeight="bold";f=b.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("fontColor"),function(){return ga},function(a){if(mxClient.IS_FF){for(var c=b.cellEditor.textarea.getElementsByTagName("font"),
+"4px";mxClient.IS_QUIRKS||(n.style.right="20px");g.appendChild(n);g=k.getElementsByTagName("div")[0];g.style.cssFloat="right";var M=null,ba="#ffffff",ca=null,ga="#000000",X=b.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("backgroundColor"),function(){return ba},function(a){document.execCommand("backcolor",!1,a!=mxConstants.NONE?a:"transparent")},"#ffffff",{install:function(a){M=a},destroy:function(){M=null}},null,!0):this.createCellColorOption(mxResources.get("backgroundColor"),
+mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"#ffffff",null,function(a){b.updateLabelElements(b.getSelectionCells(),function(a){a.style.backgroundColor=null})});X.style.fontWeight="bold";var Y=this.createCellColorOption(mxResources.get("borderColor"),mxConstants.STYLE_LABEL_BORDERCOLOR,"#000000");Y.style.fontWeight="bold";g=b.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("fontColor"),function(){return ga},function(a){if(mxClient.IS_FF){for(var c=b.cellEditor.textarea.getElementsByTagName("font"),
d=[],e=0;e<c.length;e++)d.push({node:c[e],color:c[e].getAttribute("color")});document.execCommand("forecolor",!1,a!=mxConstants.NONE?a:"transparent");a=b.cellEditor.textarea.getElementsByTagName("font");for(e=0;e<a.length;e++)if(e>=d.length||a[e]!=d[e].node||a[e]==d[e].node&&a[e].getAttribute("color")!=d[e].color){d=a[e].firstChild;if(null!=d&&"A"==d.nodeName&&null==d.nextSibling&&null!=d.firstChild){a[e].parentNode.insertBefore(d,a[e]);for(c=d.firstChild;null!=c;){var f=c.nextSibling;a[e].appendChild(c);
c=f}d.appendChild(a[e])}break}}else document.execCommand("forecolor",!1,a!=mxConstants.NONE?a:"transparent")},"#000000",{install:function(a){ca=a},destroy:function(){ca=null}},null,!0):this.createCellColorOption(mxResources.get("fontColor"),mxConstants.STYLE_FONTCOLOR,"#000000",function(a){X.style.display=null==a||a==mxConstants.NONE?"none":"";Y.style.display=X.style.display},function(a){null==a||a==mxConstants.NONE?b.setCellStyles(mxConstants.STYLE_NOLABEL,"1",b.getSelectionCells()):b.setCellStyles(mxConstants.STYLE_NOLABEL,
-null,b.getSelectionCells());b.updateLabelElements(b.getSelectionCells(),function(a){a.removeAttribute("color");a.style.color=null})});f.style.fontWeight="bold";h.appendChild(f);h.appendChild(X);b.cellEditor.isContentEditing()||h.appendChild(Y);a.appendChild(h);h=this.createPanel();h.style.paddingTop="2px";h.style.paddingBottom="4px";f=this.createCellOption(mxResources.get("wordWrap"),mxConstants.STYLE_WHITE_SPACE,null,"wrap","null",null,null,!0);f.style.fontWeight="bold";g.containsLabel||g.autoSize||
-0!=g.edges.length||h.appendChild(f);f=this.createCellOption(mxResources.get("formattedText"),"html","0",null,null,null,d.actions.get("formattedText"));f.style.fontWeight="bold";h.appendChild(f);f=this.createPanel();f.style.paddingTop="10px";f.style.paddingBottom="28px";f.style.fontWeight="normal";n=document.createElement("div");n.style.position="absolute";n.style.width="70px";n.style.marginTop="0px";n.style.fontWeight="bold";mxUtils.write(n,mxResources.get("spacing"));f.appendChild(n);var da,S,Z,
-ha,aa,H=this.addUnitInput(f,"pt",91,44,function(){da.apply(this,arguments)}),T=this.addUnitInput(f,"pt",20,44,function(){S.apply(this,arguments)});mxUtils.br(f);this.addLabel(f,mxResources.get("top"),91);this.addLabel(f,mxResources.get("global"),20);mxUtils.br(f);mxUtils.br(f);var U=this.addUnitInput(f,"pt",162,44,function(){Z.apply(this,arguments)}),ea=this.addUnitInput(f,"pt",91,44,function(){ha.apply(this,arguments)}),ia=this.addUnitInput(f,"pt",20,44,function(){aa.apply(this,arguments)});mxUtils.br(f);
-this.addLabel(f,mxResources.get("left"),162);this.addLabel(f,mxResources.get("bottom"),91);this.addLabel(f,mxResources.get("right"),20);if(b.cellEditor.isContentEditing()){var V=null,fa=null;a.appendChild(this.createRelativeOption(mxResources.get("lineheight"),null,null,function(a){var c=""==a.value?120:parseInt(a.value),c=Math.max(0,isNaN(c)?120:c);null!=V&&(b.cellEditor.restoreSelection(V),V=null);for(var d=b.getSelectedElement();null!=d&&d.nodeType!=mxConstants.NODETYPE_ELEMENT;)d=d.parentNode;
+null,b.getSelectionCells());b.updateLabelElements(b.getSelectionCells(),function(a){a.removeAttribute("color");a.style.color=null})});g.style.fontWeight="bold";h.appendChild(g);h.appendChild(X);b.cellEditor.isContentEditing()||h.appendChild(Y);a.appendChild(h);h=this.createPanel();h.style.paddingTop="2px";h.style.paddingBottom="4px";g=this.createCellOption(mxResources.get("wordWrap"),mxConstants.STYLE_WHITE_SPACE,null,"wrap","null",null,null,!0);g.style.fontWeight="bold";f.containsLabel||f.autoSize||
+0!=f.edges.length||h.appendChild(g);g=this.createCellOption(mxResources.get("formattedText"),"html","0",null,null,null,d.actions.get("formattedText"));g.style.fontWeight="bold";h.appendChild(g);g=this.createPanel();g.style.paddingTop="10px";g.style.paddingBottom="28px";g.style.fontWeight="normal";n=document.createElement("div");n.style.position="absolute";n.style.width="70px";n.style.marginTop="0px";n.style.fontWeight="bold";mxUtils.write(n,mxResources.get("spacing"));g.appendChild(n);var da,S,Z,
+ha,aa,H=this.addUnitInput(g,"pt",91,44,function(){da.apply(this,arguments)}),T=this.addUnitInput(g,"pt",20,44,function(){S.apply(this,arguments)});mxUtils.br(g);this.addLabel(g,mxResources.get("top"),91);this.addLabel(g,mxResources.get("global"),20);mxUtils.br(g);mxUtils.br(g);var U=this.addUnitInput(g,"pt",162,44,function(){Z.apply(this,arguments)}),ea=this.addUnitInput(g,"pt",91,44,function(){ha.apply(this,arguments)}),ia=this.addUnitInput(g,"pt",20,44,function(){aa.apply(this,arguments)});mxUtils.br(g);
+this.addLabel(g,mxResources.get("left"),162);this.addLabel(g,mxResources.get("bottom"),91);this.addLabel(g,mxResources.get("right"),20);if(b.cellEditor.isContentEditing()){var V=null,fa=null;a.appendChild(this.createRelativeOption(mxResources.get("lineheight"),null,null,function(a){var c=""==a.value?120:parseInt(a.value),c=Math.max(0,isNaN(c)?120:c);null!=V&&(b.cellEditor.restoreSelection(V),V=null);for(var d=b.getSelectedElement();null!=d&&d.nodeType!=mxConstants.NODETYPE_ELEMENT;)d=d.parentNode;
null!=d&&d==b.cellEditor.textarea&&null!=b.cellEditor.textarea.firstChild&&("P"!=b.cellEditor.textarea.firstChild.nodeName&&(b.cellEditor.textarea.innerHTML="<p>"+b.cellEditor.textarea.innerHTML+"</p>"),d=b.cellEditor.textarea.firstChild);null!=d&&null!=b.cellEditor.textarea&&d!=b.cellEditor.textarea&&b.cellEditor.textarea.contains(d)&&(d.style.lineHeight=c+"%");a.value=c+" %"},function(a){fa=a;mxEvent.addListener(a,"mousedown",function(){document.activeElement==b.cellEditor.textarea&&(V=b.cellEditor.saveSelection())});
-mxEvent.addListener(a,"touchstart",function(){document.activeElement==b.cellEditor.textarea&&(V=b.cellEditor.saveSelection())});a.value="120 %"}));h=e.cloneNode(!1);h.style.paddingLeft="0px";f=this.editorUi.toolbar.addItems(["link","image"],h,!0);n=[this.editorUi.toolbar.addButton("geSprite-horizontalrule",mxResources.get("insertHorizontalRule"),function(){document.execCommand("inserthorizontalrule",!1)},h),this.editorUi.toolbar.addMenuFunctionInContainer(h,"geSprite-table",mxResources.get("table"),
-!1,mxUtils.bind(this,function(a){this.editorUi.menus.addInsertTableItem(a)}))];this.styleButtons(f);this.styleButtons(n);f=this.createPanel();f.style.paddingTop="10px";f.style.paddingBottom="10px";f.appendChild(this.createTitle(mxResources.get("insert")));f.appendChild(h);a.appendChild(f);mxClient.IS_QUIRKS&&(f.style.height="70");f=e.cloneNode(!1);f.style.paddingLeft="0px";n=[this.editorUi.toolbar.addButton("geSprite-insertcolumnbefore",mxResources.get("insertColumnBefore"),mxUtils.bind(this,function(){try{null!=
-A&&b.insertColumn(A,null!=F?F.cellIndex:0)}catch(P){this.editorUi.handleError(P)}}),f),this.editorUi.toolbar.addButton("geSprite-insertcolumnafter",mxResources.get("insertColumnAfter"),mxUtils.bind(this,function(){try{null!=A&&b.insertColumn(A,null!=F?F.cellIndex+1:-1)}catch(P){this.editorUi.handleError(P)}}),f),this.editorUi.toolbar.addButton("geSprite-deletecolumn",mxResources.get("deleteColumn"),mxUtils.bind(this,function(){try{null!=A&&null!=F&&b.deleteColumn(A,F.cellIndex)}catch(P){this.editorUi.handleError(P)}}),
-f),this.editorUi.toolbar.addButton("geSprite-insertrowbefore",mxResources.get("insertRowBefore"),mxUtils.bind(this,function(){try{null!=A&&null!=J&&b.insertRow(A,J.sectionRowIndex)}catch(P){this.editorUi.handleError(P)}}),f),this.editorUi.toolbar.addButton("geSprite-insertrowafter",mxResources.get("insertRowAfter"),mxUtils.bind(this,function(){try{null!=A&&null!=J&&b.insertRow(A,J.sectionRowIndex+1)}catch(P){this.editorUi.handleError(P)}}),f),this.editorUi.toolbar.addButton("geSprite-deleterow",mxResources.get("deleteRow"),
-mxUtils.bind(this,function(){try{null!=A&&null!=J&&b.deleteRow(A,J.sectionRowIndex)}catch(P){this.editorUi.handleError(P)}}),f)];this.styleButtons(n);n[2].style.marginRight="9px";h=this.createPanel();h.style.paddingTop="10px";h.style.paddingBottom="10px";h.appendChild(this.createTitle(mxResources.get("table")));h.appendChild(f);mxClient.IS_QUIRKS&&(mxUtils.br(a),h.style.height="70");e=e.cloneNode(!1);e.style.paddingLeft="0px";n=[this.editorUi.toolbar.addButton("geSprite-strokecolor",mxResources.get("borderColor"),
+mxEvent.addListener(a,"touchstart",function(){document.activeElement==b.cellEditor.textarea&&(V=b.cellEditor.saveSelection())});a.value="120 %"}));h=e.cloneNode(!1);h.style.paddingLeft="0px";g=this.editorUi.toolbar.addItems(["link","image"],h,!0);n=[this.editorUi.toolbar.addButton("geSprite-horizontalrule",mxResources.get("insertHorizontalRule"),function(){document.execCommand("inserthorizontalrule",!1)},h),this.editorUi.toolbar.addMenuFunctionInContainer(h,"geSprite-table",mxResources.get("table"),
+!1,mxUtils.bind(this,function(a){this.editorUi.menus.addInsertTableItem(a)}))];this.styleButtons(g);this.styleButtons(n);g=this.createPanel();g.style.paddingTop="10px";g.style.paddingBottom="10px";g.appendChild(this.createTitle(mxResources.get("insert")));g.appendChild(h);a.appendChild(g);mxClient.IS_QUIRKS&&(g.style.height="70");g=e.cloneNode(!1);g.style.paddingLeft="0px";n=[this.editorUi.toolbar.addButton("geSprite-insertcolumnbefore",mxResources.get("insertColumnBefore"),mxUtils.bind(this,function(){try{null!=
+A&&b.insertColumn(A,null!=F?F.cellIndex:0)}catch(P){this.editorUi.handleError(P)}}),g),this.editorUi.toolbar.addButton("geSprite-insertcolumnafter",mxResources.get("insertColumnAfter"),mxUtils.bind(this,function(){try{null!=A&&b.insertColumn(A,null!=F?F.cellIndex+1:-1)}catch(P){this.editorUi.handleError(P)}}),g),this.editorUi.toolbar.addButton("geSprite-deletecolumn",mxResources.get("deleteColumn"),mxUtils.bind(this,function(){try{null!=A&&null!=F&&b.deleteColumn(A,F.cellIndex)}catch(P){this.editorUi.handleError(P)}}),
+g),this.editorUi.toolbar.addButton("geSprite-insertrowbefore",mxResources.get("insertRowBefore"),mxUtils.bind(this,function(){try{null!=A&&null!=J&&b.insertRow(A,J.sectionRowIndex)}catch(P){this.editorUi.handleError(P)}}),g),this.editorUi.toolbar.addButton("geSprite-insertrowafter",mxResources.get("insertRowAfter"),mxUtils.bind(this,function(){try{null!=A&&null!=J&&b.insertRow(A,J.sectionRowIndex+1)}catch(P){this.editorUi.handleError(P)}}),g),this.editorUi.toolbar.addButton("geSprite-deleterow",mxResources.get("deleteRow"),
+mxUtils.bind(this,function(){try{null!=A&&null!=J&&b.deleteRow(A,J.sectionRowIndex)}catch(P){this.editorUi.handleError(P)}}),g)];this.styleButtons(n);n[2].style.marginRight="9px";h=this.createPanel();h.style.paddingTop="10px";h.style.paddingBottom="10px";h.appendChild(this.createTitle(mxResources.get("table")));h.appendChild(g);mxClient.IS_QUIRKS&&(mxUtils.br(a),h.style.height="70");e=e.cloneNode(!1);e.style.paddingLeft="0px";n=[this.editorUi.toolbar.addButton("geSprite-strokecolor",mxResources.get("borderColor"),
mxUtils.bind(this,function(a){if(null!=A){var c=A.style.borderColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)});this.editorUi.pickColor(c,function(c){var d=null==F||null!=a&&mxEvent.isShiftDown(a)?A:F;b.processElements(d,function(a){a.style.border=null});null==c||c==mxConstants.NONE?(d.removeAttribute("border"),d.style.border="",d.style.borderCollapse=
""):(d.setAttribute("border","1"),d.style.border="1px solid "+c,d.style.borderCollapse="collapse")})}}),e),this.editorUi.toolbar.addButton("geSprite-fillcolor",mxResources.get("backgroundColor"),mxUtils.bind(this,function(a){if(null!=A){var c=A.style.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)});this.editorUi.pickColor(c,
function(c){var d=null==F||null!=a&&mxEvent.isShiftDown(a)?A:F;b.processElements(d,function(a){a.style.backgroundColor=null});d.style.backgroundColor=null==c||c==mxConstants.NONE?"":c})}}),e),this.editorUi.toolbar.addButton("geSprite-fit",mxResources.get("spacing"),function(){if(null!=A){var a=A.getAttribute("cellPadding")||0,a=new FilenameDialog(d,a,mxResources.get("apply"),mxUtils.bind(this,function(a){null!=a&&0<a.length?A.setAttribute("cellPadding",a):A.removeAttribute("cellPadding")}),mxResources.get("spacing"));
d.showDialog(a.container,300,80,!0,!0);a.init()}},e),this.editorUi.toolbar.addButton("geSprite-left",mxResources.get("left"),function(){null!=A&&A.setAttribute("align","left")},e),this.editorUi.toolbar.addButton("geSprite-center",mxResources.get("center"),function(){null!=A&&A.setAttribute("align","center")},e),this.editorUi.toolbar.addButton("geSprite-right",mxResources.get("right"),function(){null!=A&&A.setAttribute("align","right")},e)];this.styleButtons(n);n[2].style.marginRight="9px";mxClient.IS_QUIRKS&&
-(mxUtils.br(h),mxUtils.br(h));h.appendChild(e);a.appendChild(h);D=h}else a.appendChild(h),a.appendChild(this.createRelativeOption(mxResources.get("opacity"),mxConstants.STYLE_TEXT_OPACITY)),a.appendChild(f);var W=mxUtils.bind(this,function(a,b,d){g=this.format.getSelectionState();a=mxUtils.getValue(g.style,mxConstants.STYLE_FONTSTYLE,0);c(l[0],(a&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD);c(l[1],(a&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC);c(l[2],(a&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE);
-k.firstChild.nodeValue=mxUtils.getValue(g.style,mxConstants.STYLE_FONTFAMILY,Menus.prototype.defaultFont);c(m,"0"==mxUtils.getValue(g.style,mxConstants.STYLE_HORIZONTAL,"1"));if(d||document.activeElement!=L)a=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize)),L.value=isNaN(a)?"":a+" pt";a=mxUtils.getValue(g.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER);c(q,a==mxConstants.ALIGN_LEFT);c(u,a==mxConstants.ALIGN_CENTER);c(v,a==mxConstants.ALIGN_RIGHT);
-a=mxUtils.getValue(g.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE);c(w,a==mxConstants.ALIGN_TOP);c(t,a==mxConstants.ALIGN_MIDDLE);c(y,a==mxConstants.ALIGN_BOTTOM);a=mxUtils.getValue(g.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER);b=mxUtils.getValue(g.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);G.value=a==mxConstants.ALIGN_LEFT&&b==mxConstants.ALIGN_TOP?"topLeft":a==mxConstants.ALIGN_CENTER&&b==mxConstants.ALIGN_TOP?"top":a==mxConstants.ALIGN_RIGHT&&
-b==mxConstants.ALIGN_TOP?"topRight":a==mxConstants.ALIGN_LEFT&&b==mxConstants.ALIGN_BOTTOM?"bottomLeft":a==mxConstants.ALIGN_CENTER&&b==mxConstants.ALIGN_BOTTOM?"bottom":a==mxConstants.ALIGN_RIGHT&&b==mxConstants.ALIGN_BOTTOM?"bottomRight":a==mxConstants.ALIGN_LEFT?"left":a==mxConstants.ALIGN_RIGHT?"right":"center";a=mxUtils.getValue(g.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION);a==mxConstants.TEXT_DIRECTION_RTL?O.value="rightToLeft":a==mxConstants.TEXT_DIRECTION_LTR?
-O.value="leftToRight":a==mxConstants.TEXT_DIRECTION_AUTO&&(O.value="automatic");if(d||document.activeElement!=T)a=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING,2)),T.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=H)a=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_TOP,0)),H.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=ia)a=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_RIGHT,0)),ia.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=
-ea)a=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_BOTTOM,0)),ea.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=U)a=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_LEFT,0)),U.value=isNaN(a)?"":a+" pt"});S=this.installInputHandler(T,mxConstants.STYLE_SPACING,2,-999,999," pt");da=this.installInputHandler(H,mxConstants.STYLE_SPACING_TOP,0,-999,999," pt");aa=this.installInputHandler(ia,mxConstants.STYLE_SPACING_RIGHT,0,-999,999," pt");ha=this.installInputHandler(ea,
+(mxUtils.br(h),mxUtils.br(h));h.appendChild(e);a.appendChild(h);D=h}else a.appendChild(h),a.appendChild(this.createRelativeOption(mxResources.get("opacity"),mxConstants.STYLE_TEXT_OPACITY)),a.appendChild(g);var W=mxUtils.bind(this,function(a,b,d){f=this.format.getSelectionState();a=mxUtils.getValue(f.style,mxConstants.STYLE_FONTSTYLE,0);c(l[0],(a&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD);c(l[1],(a&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC);c(l[2],(a&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE);
+k.firstChild.nodeValue=mxUtils.getValue(f.style,mxConstants.STYLE_FONTFAMILY,Menus.prototype.defaultFont);c(m,"0"==mxUtils.getValue(f.style,mxConstants.STYLE_HORIZONTAL,"1"));if(d||document.activeElement!=L)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize)),L.value=isNaN(a)?"":a+" pt";a=mxUtils.getValue(f.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER);c(q,a==mxConstants.ALIGN_LEFT);c(u,a==mxConstants.ALIGN_CENTER);c(v,a==mxConstants.ALIGN_RIGHT);
+a=mxUtils.getValue(f.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE);c(w,a==mxConstants.ALIGN_TOP);c(t,a==mxConstants.ALIGN_MIDDLE);c(y,a==mxConstants.ALIGN_BOTTOM);a=mxUtils.getValue(f.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER);b=mxUtils.getValue(f.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);G.value=a==mxConstants.ALIGN_LEFT&&b==mxConstants.ALIGN_TOP?"topLeft":a==mxConstants.ALIGN_CENTER&&b==mxConstants.ALIGN_TOP?"top":a==mxConstants.ALIGN_RIGHT&&
+b==mxConstants.ALIGN_TOP?"topRight":a==mxConstants.ALIGN_LEFT&&b==mxConstants.ALIGN_BOTTOM?"bottomLeft":a==mxConstants.ALIGN_CENTER&&b==mxConstants.ALIGN_BOTTOM?"bottom":a==mxConstants.ALIGN_RIGHT&&b==mxConstants.ALIGN_BOTTOM?"bottomRight":a==mxConstants.ALIGN_LEFT?"left":a==mxConstants.ALIGN_RIGHT?"right":"center";a=mxUtils.getValue(f.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION);a==mxConstants.TEXT_DIRECTION_RTL?O.value="rightToLeft":a==mxConstants.TEXT_DIRECTION_LTR?
+O.value="leftToRight":a==mxConstants.TEXT_DIRECTION_AUTO&&(O.value="automatic");if(d||document.activeElement!=T)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING,2)),T.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=H)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING_TOP,0)),H.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=ia)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING_RIGHT,0)),ia.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=
+ea)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING_BOTTOM,0)),ea.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=U)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING_LEFT,0)),U.value=isNaN(a)?"":a+" pt"});S=this.installInputHandler(T,mxConstants.STYLE_SPACING,2,-999,999," pt");da=this.installInputHandler(H,mxConstants.STYLE_SPACING_TOP,0,-999,999," pt");aa=this.installInputHandler(ia,mxConstants.STYLE_SPACING_RIGHT,0,-999,999," pt");ha=this.installInputHandler(ea,
mxConstants.STYLE_SPACING_BOTTOM,0,-999,999," pt");Z=this.installInputHandler(U,mxConstants.STYLE_SPACING_LEFT,0,-999,999," pt");this.addKeyHandler(L,W);this.addKeyHandler(T,W);this.addKeyHandler(H,W);this.addKeyHandler(ia,W);this.addKeyHandler(ea,W);this.addKeyHandler(U,W);b.getModel().addListener(mxEvent.CHANGE,W);this.listeners.push({destroy:function(){b.getModel().removeListener(W)}});W();if(b.cellEditor.isContentEditing()){var ka=!1,e=function(){ka||(ka=!0,window.setTimeout(function(){for(var a=
-b.getSelectedElement();null!=a&&a.nodeType!=mxConstants.NODETYPE_ELEMENT;)a=a.parentNode;if(null!=a){var d=function(a,b){if(null!=a&&null!=b){if(a==b)return!0;if(a.length>b.length+1)return a.substring(a.length-b.length-1,a.length)=="-"+b}return!1},e=function(c){if(null!=b.getParentByName(a,c,b.cellEditor.textarea))return!0;for(var d=a;null!=d&&1==d.childNodes.length;)if(d=d.childNodes[0],d.nodeName==c)return!0;return!1},f=function(a){a=null!=a?a.fontSize:null;return null!=a&&"px"==a.substring(a.length-
+b.getSelectedElement();null!=a&&a.nodeType!=mxConstants.NODETYPE_ELEMENT;)a=a.parentNode;if(null!=a){var d=function(a,b){if(null!=a&&null!=b){if(a==b)return!0;if(a.length>b.length+1)return a.substring(a.length-b.length-1,a.length)=="-"+b}return!1},e=function(c){if(null!=b.getParentByName(a,c,b.cellEditor.textarea))return!0;for(var d=a;null!=d&&1==d.childNodes.length;)if(d=d.childNodes[0],d.nodeName==c)return!0;return!1},g=function(a){a=null!=a?a.fontSize:null;return null!=a&&"px"==a.substring(a.length-
2)?parseFloat(a):mxConstants.DEFAULT_FONTSIZE},h=function(a,b,c){return null!=c.style&&null!=b?(b=b.lineHeight,null!=c.style.lineHeight&&"%"==c.style.lineHeight.substring(c.style.lineHeight.length-1)?parseInt(c.style.lineHeight)/100:"px"==b.substring(b.length-2)?parseFloat(b)/a:parseInt(b)):""};a==b.cellEditor.textarea&&1==b.cellEditor.textarea.children.length&&b.cellEditor.textarea.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&(a=b.cellEditor.textarea.firstChild);var m=mxUtils.getCurrentStyle(a),
-n=f(m),p=h(n,m,a),r=a.getElementsByTagName("*");if(0<r.length&&window.getSelection&&!mxClient.IS_IE&&!mxClient.IS_IE11)for(var t=window.getSelection(),w=0;w<r.length;w++)if(t.containsNode(r[w],!0)){temp=mxUtils.getCurrentStyle(r[w]);var n=Math.max(f(temp),n),y=h(n,temp,r[w]);if(y!=p||isNaN(y))p=""}null!=m&&(c(l[0],"bold"==m.fontWeight||400<m.fontWeight||e("B")||e("STRONG")),c(l[1],"italic"==m.fontStyle||e("I")||e("EM")),c(l[2],e("U")),c(C,e("SUP")),c(x,e("SUB")),b.cellEditor.isTableSelected()?(c(B,
-d(m.textAlign,"justify")),c(q,d(m.textAlign,"left")),c(u,d(m.textAlign,"center")),c(v,d(m.textAlign,"right"))):(e=b.cellEditor.align||mxUtils.getValue(g.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),d(m.textAlign,"justify")?(c(B,d(m.textAlign,"justify")),c(q,!1),c(u,!1),c(v,!1)):(c(B,!1),c(q,e==mxConstants.ALIGN_LEFT),c(u,e==mxConstants.ALIGN_CENTER),c(v,e==mxConstants.ALIGN_RIGHT))),A=b.getParentByName(a,"TABLE",b.cellEditor.textarea),J=null==A?null:b.getParentByName(a,"TR",A),F=null==
+n=g(m),p=h(n,m,a),r=a.getElementsByTagName("*");if(0<r.length&&window.getSelection&&!mxClient.IS_IE&&!mxClient.IS_IE11)for(var t=window.getSelection(),w=0;w<r.length;w++)if(t.containsNode(r[w],!0)){temp=mxUtils.getCurrentStyle(r[w]);var n=Math.max(g(temp),n),y=h(n,temp,r[w]);if(y!=p||isNaN(y))p=""}null!=m&&(c(l[0],"bold"==m.fontWeight||400<m.fontWeight||e("B")||e("STRONG")),c(l[1],"italic"==m.fontStyle||e("I")||e("EM")),c(l[2],e("U")),c(C,e("SUP")),c(x,e("SUB")),b.cellEditor.isTableSelected()?(c(B,
+d(m.textAlign,"justify")),c(q,d(m.textAlign,"left")),c(u,d(m.textAlign,"center")),c(v,d(m.textAlign,"right"))):(e=b.cellEditor.align||mxUtils.getValue(f.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),d(m.textAlign,"justify")?(c(B,d(m.textAlign,"justify")),c(q,!1),c(u,!1),c(v,!1)):(c(B,!1),c(q,e==mxConstants.ALIGN_LEFT),c(u,e==mxConstants.ALIGN_CENTER),c(v,e==mxConstants.ALIGN_RIGHT))),A=b.getParentByName(a,"TABLE",b.cellEditor.textarea),J=null==A?null:b.getParentByName(a,"TR",A),F=null==
A?null:b.getParentByNames(a,["TD","TH"],A),D.style.display=null!=A?"":"none",document.activeElement!=L&&("FONT"==a.nodeName&&"4"==a.getAttribute("size")&&null!=I?(a.removeAttribute("size"),a.style.fontSize=I+" pt",I=null):L.value=isNaN(n)?"":n+" pt",y=parseFloat(p),isNaN(y)?fa.value="100 %":fa.value=Math.round(100*y)+" %"),d=m.color.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+
("0"+Number(d).toString(16)).substr(-2)}),n=m.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)}),null!=ca&&(ga="#"==d.charAt(0)?d:"#000000",ca(ga,!0)),null!=M&&(ba="#"==n.charAt(0)?n:null,M(ba,!0)),null!=k.firstChild&&(m=m.fontFamily,"'"==m.charAt(0)&&(m=m.substring(1)),"'"==m.charAt(m.length-1)&&(m=m.substring(0,m.length-1)),
'"'==m.charAt(0)&&(m=m.substring(1)),'"'==m.charAt(m.length-1)&&(m=m.substring(0,m.length-1)),k.firstChild.nodeValue=m))}ka=!1},0))};(mxClient.IS_FF||mxClient.IS_EDGE||mxClient.IS_IE||mxClient.IS_IE11)&&mxEvent.addListener(b.cellEditor.textarea,"DOMSubtreeModified",e);mxEvent.addListener(b.cellEditor.textarea,"input",e);mxEvent.addListener(b.cellEditor.textarea,"touchend",e);mxEvent.addListener(b.cellEditor.textarea,"mouseup",e);mxEvent.addListener(b.cellEditor.textarea,"keyup",e);this.listeners.push({destroy:function(){}});
@@ -2954,22 +2955,22 @@ e()}return a};StyleFormatPanel=function(a,c,d){BaseFormatPanel.call(this,a,c,d);
StyleFormatPanel.prototype.init=function(){var a=this.format.getSelectionState();a.containsLabel||(a.containsImage&&1==a.vertices.length&&"image"==a.style.shape&&null!=a.style.image&&"data:image/svg+xml;"==a.style.image.substring(0,19)&&this.container.appendChild(this.addSvgStyles(this.createPanel())),a.containsImage&&"image"!=a.style.shape||this.container.appendChild(this.addFill(this.createPanel())),this.container.appendChild(this.addStroke(this.createPanel())),this.container.appendChild(this.addLineJumps(this.createPanel())),
a=this.createRelativeOption(mxResources.get("opacity"),mxConstants.STYLE_OPACITY,41),a.style.paddingTop="8px",a.style.paddingBottom="8px",this.container.appendChild(a),this.container.appendChild(this.addEffects(this.createPanel())));a=this.addEditOps(this.createPanel());null!=a.firstChild&&mxUtils.br(a);this.container.appendChild(this.addStyleOps(a))};
StyleFormatPanel.prototype.getCssRules=function(a){var c=document.implementation.createHTMLDocument(""),d=document.createElement("style");mxUtils.setTextContent(d,a);c.body.appendChild(d);return d.sheet.cssRules};
-StyleFormatPanel.prototype.addSvgStyles=function(a){var c=this.format.getSelectionState();a.style.paddingTop="6px";a.style.paddingBottom="6px";a.style.fontWeight="bold";a.style.display="none";try{var d=c.style.editableCssRules;if(null!=d){var b=new RegExp(d),g=c.style.image.substring(c.style.image.indexOf(",")+1),e=window.atob?atob(g):Base64.decode(g,!0),h=mxUtils.parseXml(e);if(null!=h)for(var f=h.getElementsByTagName("style"),c=0;c<f.length;c++)for(var k=this.getCssRules(mxUtils.getTextContent(f[c])),
-d=0;d<k.length;d++)this.addSvgRule(a,k[d],h,f[c],k,d,b)}}catch(l){}return a};
-StyleFormatPanel.prototype.addSvgRule=function(a,c,d,b,g,e,h){var f=this.editorUi.editor.graph;h.test(c.selectorText)&&(h=mxUtils.bind(this,function(c,h,m){""!=c.style[h]&&(m=this.createColorOption(m+" "+c.selectorText,function(){var a=c.style[h];return(a=a.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i))&&4===a.length?"#"+("0"+parseInt(a[1],10).toString(16)).slice(-2)+("0"+parseInt(a[2],10).toString(16)).slice(-2)+("0"+parseInt(a[3],10).toString(16)).slice(-2):""},function(a){g[e].style[h]=
-a;a="";for(var c=0;c<g.length;c++)a+=g[c].cssText+" ";b.textContent=a;a=mxUtils.getXml(d.documentElement);f.setCellStyles(mxConstants.STYLE_IMAGE,"data:image/svg+xml,"+(window.btoa?btoa(a):Base64.encode(a,!0)),f.getSelectionCells())},"#ffffff",{install:function(a){},destroy:function(){}}),a.appendChild(m),a.style.display="")}),h(c,"fill",mxResources.get("fill")),h(c,"stroke",mxResources.get("line")))};
+StyleFormatPanel.prototype.addSvgStyles=function(a){var c=this.format.getSelectionState();a.style.paddingTop="6px";a.style.paddingBottom="6px";a.style.fontWeight="bold";a.style.display="none";try{var d=c.style.editableCssRules;if(null!=d){var b=new RegExp(d),f=c.style.image.substring(c.style.image.indexOf(",")+1),e=window.atob?atob(f):Base64.decode(f,!0),h=mxUtils.parseXml(e);if(null!=h)for(var g=h.getElementsByTagName("style"),c=0;c<g.length;c++)for(var k=this.getCssRules(mxUtils.getTextContent(g[c])),
+d=0;d<k.length;d++)this.addSvgRule(a,k[d],h,g[c],k,d,b)}}catch(l){}return a};
+StyleFormatPanel.prototype.addSvgRule=function(a,c,d,b,f,e,h){var g=this.editorUi.editor.graph;h.test(c.selectorText)&&(h=mxUtils.bind(this,function(c,h,m){""!=c.style[h]&&(m=this.createColorOption(m+" "+c.selectorText,function(){var a=c.style[h];return(a=a.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i))&&4===a.length?"#"+("0"+parseInt(a[1],10).toString(16)).slice(-2)+("0"+parseInt(a[2],10).toString(16)).slice(-2)+("0"+parseInt(a[3],10).toString(16)).slice(-2):""},function(a){f[e].style[h]=
+a;a="";for(var c=0;c<f.length;c++)a+=f[c].cssText+" ";b.textContent=a;a=mxUtils.getXml(d.documentElement);g.setCellStyles(mxConstants.STYLE_IMAGE,"data:image/svg+xml,"+(window.btoa?btoa(a):Base64.encode(a,!0)),g.getSelectionCells())},"#ffffff",{install:function(a){},destroy:function(){}}),a.appendChild(m),a.style.display="")}),h(c,"fill",mxResources.get("fill")),h(c,"stroke",mxResources.get("line")))};
StyleFormatPanel.prototype.addEditOps=function(a){var c=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));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==d?c.style.width="202px":(d.style.width="100px",c.style.width="100px",c.style.marginLeft="2px"),a.appendChild(c));return a};
-StyleFormatPanel.prototype.addFill=function(a){var c=this.editorUi.editor.graph,d=this.format.getSelectionState();a.style.paddingTop="6px";a.style.paddingBottom="6px";var b=document.createElement("select");b.style.position="absolute";b.style.marginTop="-2px";b.style.right=mxClient.IS_QUIRKS?"52px":"72px";b.style.width="70px";mxEvent.addListener(b,"click",function(a){mxEvent.consume(a)});var g=this.createCellColorOption(mxResources.get("gradient"),mxConstants.STYLE_GRADIENTCOLOR,"#ffffff",function(a){b.style.display=
-null==a||a==mxConstants.NONE?"none":""}),e="image"==d.style.shape?mxConstants.STYLE_IMAGE_BACKGROUND:mxConstants.STYLE_FILLCOLOR,h="image"==d.style.shape?mxResources.get("background"):mxResources.get("fill"),h=this.createCellColorOption(h,e,"#ffffff");h.style.fontWeight="bold";e=mxUtils.getValue(d.style,e,null);g.style.display=null!=e&&e!=mxConstants.NONE&&d.fill&&"image"!=d.style.shape?"":"none";for(var f=[mxConstants.DIRECTION_NORTH,mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST],
-e=0;e<f.length;e++){var k=document.createElement("option");k.setAttribute("value",f[e]);mxUtils.write(k,mxResources.get(f[e]));b.appendChild(k)}g.appendChild(b);var l=mxUtils.bind(this,function(){d=this.format.getSelectionState();var c=mxUtils.getValue(d.style,mxConstants.STYLE_GRADIENT_DIRECTION,mxConstants.DIRECTION_SOUTH);""==c&&(c=mxConstants.DIRECTION_SOUTH);b.value=c;a.style.display=d.fill?"":"none";c=mxUtils.getValue(d.style,mxConstants.STYLE_FILLCOLOR,null);g.style.display=!d.fill||d.containsImage||
-null==c||c==mxConstants.NONE||"filledEdge"==d.style.shape?"none":""});c.getModel().addListener(mxEvent.CHANGE,l);this.listeners.push({destroy:function(){c.getModel().removeListener(l)}});l();mxEvent.addListener(b,"change",function(a){c.setCellStyles(mxConstants.STYLE_GRADIENT_DIRECTION,b.value,c.getSelectionCells());mxEvent.consume(a)});a.appendChild(h);a.appendChild(g);h=this.getCustomColors();for(e=0;e<h.length;e++)a.appendChild(this.createCellColorOption(h[e].title,h[e].key,h[e].defaultValue));
+StyleFormatPanel.prototype.addFill=function(a){var c=this.editorUi.editor.graph,d=this.format.getSelectionState();a.style.paddingTop="6px";a.style.paddingBottom="6px";var b=document.createElement("select");b.style.position="absolute";b.style.marginTop="-2px";b.style.right=mxClient.IS_QUIRKS?"52px":"72px";b.style.width="70px";mxEvent.addListener(b,"click",function(a){mxEvent.consume(a)});var f=this.createCellColorOption(mxResources.get("gradient"),mxConstants.STYLE_GRADIENTCOLOR,"#ffffff",function(a){b.style.display=
+null==a||a==mxConstants.NONE?"none":""}),e="image"==d.style.shape?mxConstants.STYLE_IMAGE_BACKGROUND:mxConstants.STYLE_FILLCOLOR,h="image"==d.style.shape?mxResources.get("background"):mxResources.get("fill"),h=this.createCellColorOption(h,e,"#ffffff");h.style.fontWeight="bold";e=mxUtils.getValue(d.style,e,null);f.style.display=null!=e&&e!=mxConstants.NONE&&d.fill&&"image"!=d.style.shape?"":"none";for(var g=[mxConstants.DIRECTION_NORTH,mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST],
+e=0;e<g.length;e++){var k=document.createElement("option");k.setAttribute("value",g[e]);mxUtils.write(k,mxResources.get(g[e]));b.appendChild(k)}f.appendChild(b);var l=mxUtils.bind(this,function(){d=this.format.getSelectionState();var c=mxUtils.getValue(d.style,mxConstants.STYLE_GRADIENT_DIRECTION,mxConstants.DIRECTION_SOUTH);""==c&&(c=mxConstants.DIRECTION_SOUTH);b.value=c;a.style.display=d.fill?"":"none";c=mxUtils.getValue(d.style,mxConstants.STYLE_FILLCOLOR,null);f.style.display=!d.fill||d.containsImage||
+null==c||c==mxConstants.NONE||"filledEdge"==d.style.shape?"none":""});c.getModel().addListener(mxEvent.CHANGE,l);this.listeners.push({destroy:function(){c.getModel().removeListener(l)}});l();mxEvent.addListener(b,"change",function(a){c.setCellStyles(mxConstants.STYLE_GRADIENT_DIRECTION,b.value,c.getSelectionCells());mxEvent.consume(a)});a.appendChild(h);a.appendChild(f);h=this.getCustomColors();for(e=0;e<h.length;e++)a.appendChild(this.createCellColorOption(h[e].title,h[e].key,h[e].defaultValue));
return a};StyleFormatPanel.prototype.getCustomColors=function(){var a=[];"swimlane"==this.format.getSelectionState().style.shape&&a.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"#ffffff"});return a};
-StyleFormatPanel.prototype.addStroke=function(a){function c(a){var c=parseInt(r.value),c=Math.min(999,Math.max(1,isNaN(c)?1:c));c!=mxUtils.getValue(e.style,mxConstants.STYLE_STROKEWIDTH,1)&&(g.setCellStyles(mxConstants.STYLE_STROKEWIDTH,c,g.getSelectionCells()),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[c],"cells",g.getSelectionCells())));r.value=c+" pt";mxEvent.consume(a)}function d(a){var c=parseInt(w.value),c=Math.min(999,Math.max(1,isNaN(c)?1:
-c));c!=mxUtils.getValue(e.style,mxConstants.STYLE_STROKEWIDTH,1)&&(g.setCellStyles(mxConstants.STYLE_STROKEWIDTH,c,g.getSelectionCells()),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[c],"cells",g.getSelectionCells())));w.value=c+" pt";mxEvent.consume(a)}var b=this.editorUi,g=b.editor.graph,e=this.format.getSelectionState();a.style.paddingTop="4px";a.style.paddingBottom="4px";a.style.whiteSpace="normal";var h=document.createElement("div");h.style.fontWeight=
-"bold";var f=document.createElement("select");f.style.position="absolute";f.style.marginTop="-2px";f.style.right="72px";f.style.width="80px";for(var k=["sharp","rounded","curved"],l=0;l<k.length;l++){var m=document.createElement("option");m.setAttribute("value",k[l]);mxUtils.write(m,mxResources.get(k[l]));f.appendChild(m)}mxEvent.addListener(f,"change",function(a){g.getModel().beginUpdate();try{var c=[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],d=["0",null];"rounded"==f.value?d=["1",null]:
-"curved"==f.value&&(d=[null,"1"]);for(var e=0;e<c.length;e++)g.setCellStyles(c[e],d[e],g.getSelectionCells());b.fireEvent(new mxEventObject("styleChanged","keys",c,"values",d,"cells",g.getSelectionCells()))}finally{g.getModel().endUpdate()}mxEvent.consume(a)});mxEvent.addListener(f,"click",function(a){mxEvent.consume(a)});var n="image"==e.style.shape?mxConstants.STYLE_IMAGE_BORDER:mxConstants.STYLE_STROKECOLOR,k="image"==e.style.shape?mxResources.get("border"):mxResources.get("line"),k=this.createCellColorOption(k,
-n,"#000000");k.appendChild(f);h.appendChild(k);var p=h.cloneNode(!1);p.style.fontWeight="normal";p.style.whiteSpace="nowrap";p.style.position="relative";p.style.paddingLeft="16px";p.style.marginBottom="2px";p.style.marginTop="2px";p.className="geToolbarContainer";var q=mxUtils.bind(this,function(a,b,c,d,e){a=this.editorUi.menus.styleChange(a,"",d,e,"geIcon",null);d=document.createElement("div");d.style.width=b+"px";d.style.height="1px";d.style.borderBottom="1px "+c+" "+this.defaultStrokeColor;d.style.paddingTop=
+StyleFormatPanel.prototype.addStroke=function(a){function c(a){var c=parseInt(r.value),c=Math.min(999,Math.max(1,isNaN(c)?1:c));c!=mxUtils.getValue(e.style,mxConstants.STYLE_STROKEWIDTH,1)&&(f.setCellStyles(mxConstants.STYLE_STROKEWIDTH,c,f.getSelectionCells()),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[c],"cells",f.getSelectionCells())));r.value=c+" pt";mxEvent.consume(a)}function d(a){var c=parseInt(w.value),c=Math.min(999,Math.max(1,isNaN(c)?1:
+c));c!=mxUtils.getValue(e.style,mxConstants.STYLE_STROKEWIDTH,1)&&(f.setCellStyles(mxConstants.STYLE_STROKEWIDTH,c,f.getSelectionCells()),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[c],"cells",f.getSelectionCells())));w.value=c+" pt";mxEvent.consume(a)}var b=this.editorUi,f=b.editor.graph,e=this.format.getSelectionState();a.style.paddingTop="4px";a.style.paddingBottom="4px";a.style.whiteSpace="normal";var h=document.createElement("div");h.style.fontWeight=
+"bold";var g=document.createElement("select");g.style.position="absolute";g.style.marginTop="-2px";g.style.right="72px";g.style.width="80px";for(var k=["sharp","rounded","curved"],l=0;l<k.length;l++){var m=document.createElement("option");m.setAttribute("value",k[l]);mxUtils.write(m,mxResources.get(k[l]));g.appendChild(m)}mxEvent.addListener(g,"change",function(a){f.getModel().beginUpdate();try{var c=[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],d=["0",null];"rounded"==g.value?d=["1",null]:
+"curved"==g.value&&(d=[null,"1"]);for(var e=0;e<c.length;e++)f.setCellStyles(c[e],d[e],f.getSelectionCells());b.fireEvent(new mxEventObject("styleChanged","keys",c,"values",d,"cells",f.getSelectionCells()))}finally{f.getModel().endUpdate()}mxEvent.consume(a)});mxEvent.addListener(g,"click",function(a){mxEvent.consume(a)});var n="image"==e.style.shape?mxConstants.STYLE_IMAGE_BORDER:mxConstants.STYLE_STROKECOLOR,k="image"==e.style.shape?mxResources.get("border"):mxResources.get("line"),k=this.createCellColorOption(k,
+n,"#000000");k.appendChild(g);h.appendChild(k);var p=h.cloneNode(!1);p.style.fontWeight="normal";p.style.whiteSpace="nowrap";p.style.position="relative";p.style.paddingLeft="16px";p.style.marginBottom="2px";p.style.marginTop="2px";p.className="geToolbarContainer";var q=mxUtils.bind(this,function(a,b,c,d,e){a=this.editorUi.menus.styleChange(a,"",d,e,"geIcon",null);d=document.createElement("div");d.style.width=b+"px";d.style.height="1px";d.style.borderBottom="1px "+c+" "+this.defaultStrokeColor;d.style.paddingTop=
"6px";a.firstChild.firstChild.style.padding="0px 4px 0px 4px";a.firstChild.firstChild.style.width=b+"px";a.firstChild.firstChild.appendChild(d);return a}),l=this.editorUi.toolbar.addMenuFunctionInContainer(p,"geSprite-orthogonal",mxResources.get("pattern"),!1,mxUtils.bind(this,function(a){q(a,75,"solid",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],[null,null]).setAttribute("title",mxResources.get("solid"));q(a,75,"dashed",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1",
null]).setAttribute("title",mxResources.get("dashed"));q(a,75,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 1"]).setAttribute("title",mxResources.get("dotted")+" (1)");q(a,75,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 2"]).setAttribute("title",mxResources.get("dotted")+" (2)");q(a,75,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+" (3)")})),u=p.cloneNode(!1),
v=this.editorUi.toolbar.addMenuFunctionInContainer(u,"geSprite-connection",mxResources.get("connection"),!1,mxUtils.bind(this,function(a){this.editorUi.menus.styleChange(a,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],[null,null,null,null],"geIcon geSprite geSprite-connection",null,!0).setAttribute("title",mxResources.get("line"));this.editorUi.menus.styleChange(a,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],
@@ -3010,42 +3011,42 @@ this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],
"9px";y.appendChild(A);l.style.height="15px";m.style.height="15px";v.style.height="15px";x.style.height="17px";C.style.marginLeft="3px";C.style.height="17px";B.style.marginLeft="3px";B.style.height="17px";a.appendChild(h);a.appendChild(u);a.appendChild(p);l=p.cloneNode(!1);l.style.paddingBottom="6px";l.style.paddingTop="4px";l.style.fontWeight="normal";m=document.createElement("div");m.style.position="absolute";m.style.marginLeft="3px";m.style.marginBottom="12px";m.style.marginTop="2px";m.style.fontWeight=
"normal";m.style.width="76px";mxUtils.write(m,mxResources.get("lineend"));l.appendChild(m);var F,J,G=this.addUnitInput(l,"pt",74,33,function(){F.apply(this,arguments)}),K=this.addUnitInput(l,"pt",20,33,function(){J.apply(this,arguments)});mxUtils.br(l);t=document.createElement("div");t.style.height="8px";l.appendChild(t);m=m.cloneNode(!1);mxUtils.write(m,mxResources.get("linestart"));l.appendChild(m);var E,O,Q=this.addUnitInput(l,"pt",74,33,function(){E.apply(this,arguments)}),R=this.addUnitInput(l,
"pt",20,33,function(){O.apply(this,arguments)});mxUtils.br(l);this.addLabel(l,mxResources.get("spacing"),74,50);this.addLabel(l,mxResources.get("size"),20,50);mxUtils.br(l);h=h.cloneNode(!1);h.style.fontWeight="normal";h.style.position="relative";h.style.paddingLeft="16px";h.style.marginBottom="2px";h.style.marginTop="6px";h.style.borderWidth="0px";h.style.paddingBottom="18px";m=document.createElement("div");m.style.position="absolute";m.style.marginLeft="3px";m.style.marginBottom="12px";m.style.marginTop=
-"1px";m.style.fontWeight="normal";m.style.width="120px";mxUtils.write(m,mxResources.get("perimeter"));h.appendChild(m);var L,I=this.addUnitInput(h,"pt",20,41,function(){L.apply(this,arguments)});e.edges.length==g.getSelectionCount()?(a.appendChild(k),mxClient.IS_QUIRKS&&(mxUtils.br(a),mxUtils.br(a)),a.appendChild(l)):e.vertices.length==g.getSelectionCount()&&(mxClient.IS_QUIRKS&&mxUtils.br(a),a.appendChild(h));var M=mxUtils.bind(this,function(a,c,d){function h(a,c,d,f){d=d.getElementsByTagName("div")[0];
+"1px";m.style.fontWeight="normal";m.style.width="120px";mxUtils.write(m,mxResources.get("perimeter"));h.appendChild(m);var L,I=this.addUnitInput(h,"pt",20,41,function(){L.apply(this,arguments)});e.edges.length==f.getSelectionCount()?(a.appendChild(k),mxClient.IS_QUIRKS&&(mxUtils.br(a),mxUtils.br(a)),a.appendChild(l)):e.vertices.length==f.getSelectionCount()&&(mxClient.IS_QUIRKS&&mxUtils.br(a),a.appendChild(h));var M=mxUtils.bind(this,function(a,c,d){function h(a,c,d,f){d=d.getElementsByTagName("div")[0];
d.className=b.getCssClassForMarker(f,e.style.shape,a,c);"geSprite geSprite-noarrow"==d.className&&(d.innerHTML=mxUtils.htmlEntities(mxResources.get("none")),d.style.backgroundImage="none",d.style.verticalAlign="top",d.style.marginTop="5px",d.style.fontSize="10px",d.style.filter="none",d.style.color=this.defaultStrokeColor,d.nextSibling.style.marginTop="0px");return d}e=this.format.getSelectionState();mxUtils.getValue(e.style,n,null);if(d||document.activeElement!=r)a=parseInt(mxUtils.getValue(e.style,
-mxConstants.STYLE_STROKEWIDTH,1)),r.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=w)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_STROKEWIDTH,1)),w.value=isNaN(a)?"":a+" pt";f.style.visibility="connector"==e.style.shape||"filledEdge"==e.style.shape?"":"hidden";"1"==mxUtils.getValue(e.style,mxConstants.STYLE_CURVED,null)?f.value="curved":"1"==mxUtils.getValue(e.style,mxConstants.STYLE_ROUNDED,null)&&(f.value="rounded");"1"==mxUtils.getValue(e.style,mxConstants.STYLE_DASHED,null)?
+mxConstants.STYLE_STROKEWIDTH,1)),r.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=w)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_STROKEWIDTH,1)),w.value=isNaN(a)?"":a+" pt";g.style.visibility="connector"==e.style.shape||"filledEdge"==e.style.shape?"":"hidden";"1"==mxUtils.getValue(e.style,mxConstants.STYLE_CURVED,null)?g.value="curved":"1"==mxUtils.getValue(e.style,mxConstants.STYLE_ROUNDED,null)&&(g.value="rounded");"1"==mxUtils.getValue(e.style,mxConstants.STYLE_DASHED,null)?
null==mxUtils.getValue(e.style,mxConstants.STYLE_DASH_PATTERN,null)?D.style.borderBottom="1px dashed "+this.defaultStrokeColor:D.style.borderBottom="1px dotted "+this.defaultStrokeColor:D.style.borderBottom="1px solid "+this.defaultStrokeColor;A.style.borderBottom=D.style.borderBottom;a=x.getElementsByTagName("div")[0];c=mxUtils.getValue(e.style,mxConstants.STYLE_EDGE,null);"1"==mxUtils.getValue(e.style,mxConstants.STYLE_NOEDGESTYLE,null)&&(c=null);"orthogonalEdgeStyle"==c&&"1"==mxUtils.getValue(e.style,
mxConstants.STYLE_CURVED,null)?a.className="geSprite geSprite-curved":a.className="straight"==c||"none"==c||null==c?"geSprite geSprite-straight":"entityRelationEdgeStyle"==c?"geSprite geSprite-entity":"elbowEdgeStyle"==c?"geSprite "+("vertical"==mxUtils.getValue(e.style,mxConstants.STYLE_ELBOW,null)?"geSprite-verticalelbow":"geSprite-horizontalelbow"):"isometricEdgeStyle"==c?"geSprite "+("vertical"==mxUtils.getValue(e.style,mxConstants.STYLE_ELBOW,null)?"geSprite-verticalisometric":"geSprite-horizontalisometric"):
-"geSprite geSprite-orthogonal";v.getElementsByTagName("div")[0].className="link"==e.style.shape?"geSprite geSprite-linkedge":"flexArrow"==e.style.shape?"geSprite geSprite-arrow":"arrow"==e.style.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection";e.edges.length==g.getSelectionCount()?(u.style.display="",p.style.display="none"):(u.style.display="none",p.style.display="");a=h(mxUtils.getValue(e.style,mxConstants.STYLE_STARTARROW,null),mxUtils.getValue(e.style,"startFill","1"),C,"start");
+"geSprite geSprite-orthogonal";v.getElementsByTagName("div")[0].className="link"==e.style.shape?"geSprite geSprite-linkedge":"flexArrow"==e.style.shape?"geSprite geSprite-arrow":"arrow"==e.style.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection";e.edges.length==f.getSelectionCount()?(u.style.display="",p.style.display="none"):(u.style.display="none",p.style.display="");a=h(mxUtils.getValue(e.style,mxConstants.STYLE_STARTARROW,null),mxUtils.getValue(e.style,"startFill","1"),C,"start");
c=h(mxUtils.getValue(e.style,mxConstants.STYLE_ENDARROW,null),mxUtils.getValue(e.style,"endFill","1"),B,"end");"arrow"==e.style.shape?(a.className="geSprite geSprite-noarrow",c.className="geSprite geSprite-endblocktrans"):"link"==e.style.shape&&(a.className="geSprite geSprite-noarrow",c.className="geSprite geSprite-noarrow");mxUtils.setOpacity(x,"arrow"==e.style.shape?30:100);"connector"!=e.style.shape&&"flexArrow"!=e.style.shape&&"filledEdge"!=e.style.shape?(mxUtils.setOpacity(C,30),mxUtils.setOpacity(B,
30)):(mxUtils.setOpacity(C,100),mxUtils.setOpacity(B,100));if(d||document.activeElement!=R)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE)),R.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=Q)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0)),Q.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=K)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE)),K.value=isNaN(a)?
"":a+" pt";if(d||document.activeElement!=Q)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0)),G.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=I)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_PERIMETER_SPACING,0)),I.value=isNaN(a)?"":a+" pt"});O=this.installInputHandler(R,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");E=this.installInputHandler(Q,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0,-999,999," pt");J=this.installInputHandler(K,
-mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");F=this.installInputHandler(G,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0,-999,999," pt");L=this.installInputHandler(I,mxConstants.STYLE_PERIMETER_SPACING,0,0,999," pt");this.addKeyHandler(r,M);this.addKeyHandler(R,M);this.addKeyHandler(Q,M);this.addKeyHandler(K,M);this.addKeyHandler(G,M);this.addKeyHandler(I,M);g.getModel().addListener(mxEvent.CHANGE,M);this.listeners.push({destroy:function(){g.getModel().removeListener(M)}});
+mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");F=this.installInputHandler(G,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0,-999,999," pt");L=this.installInputHandler(I,mxConstants.STYLE_PERIMETER_SPACING,0,0,999," pt");this.addKeyHandler(r,M);this.addKeyHandler(R,M);this.addKeyHandler(Q,M);this.addKeyHandler(K,M);this.addKeyHandler(G,M);this.addKeyHandler(I,M);f.getModel().addListener(mxEvent.CHANGE,M);this.listeners.push({destroy:function(){f.getModel().removeListener(M)}});
M();return a};
-StyleFormatPanel.prototype.addLineJumps=function(a){var c=this.format.getSelectionState();if(Graph.lineJumpsEnabled&&0<c.edges.length&&0==c.vertices.length&&c.lineJumps){a.style.padding="8px 0px 24px 18px";var d=this.editorUi,b=d.editor.graph,g=document.createElement("div");g.style.position="absolute";g.style.fontWeight="bold";g.style.width="80px";mxUtils.write(g,mxResources.get("lineJumps"));a.appendChild(g);var e=document.createElement("select");e.style.position="absolute";e.style.marginTop="-2px";
-e.style.right="76px";e.style.width="62px";for(var g=["none","arc","gap","sharp"],h=0;h<g.length;h++){var f=document.createElement("option");f.setAttribute("value",g[h]);mxUtils.write(f,mxResources.get(g[h]));e.appendChild(f)}mxEvent.addListener(e,"change",function(a){b.getModel().beginUpdate();try{b.setCellStyles("jumpStyle",e.value,b.getSelectionCells()),d.fireEvent(new mxEventObject("styleChanged","keys",["jumpStyle"],"values",[e.value],"cells",b.getSelectionCells()))}finally{b.getModel().endUpdate()}mxEvent.consume(a)});
+StyleFormatPanel.prototype.addLineJumps=function(a){var c=this.format.getSelectionState();if(Graph.lineJumpsEnabled&&0<c.edges.length&&0==c.vertices.length&&c.lineJumps){a.style.padding="8px 0px 24px 18px";var d=this.editorUi,b=d.editor.graph,f=document.createElement("div");f.style.position="absolute";f.style.fontWeight="bold";f.style.width="80px";mxUtils.write(f,mxResources.get("lineJumps"));a.appendChild(f);var e=document.createElement("select");e.style.position="absolute";e.style.marginTop="-2px";
+e.style.right="76px";e.style.width="62px";for(var f=["none","arc","gap","sharp"],h=0;h<f.length;h++){var g=document.createElement("option");g.setAttribute("value",f[h]);mxUtils.write(g,mxResources.get(f[h]));e.appendChild(g)}mxEvent.addListener(e,"change",function(a){b.getModel().beginUpdate();try{b.setCellStyles("jumpStyle",e.value,b.getSelectionCells()),d.fireEvent(new mxEventObject("styleChanged","keys",["jumpStyle"],"values",[e.value],"cells",b.getSelectionCells()))}finally{b.getModel().endUpdate()}mxEvent.consume(a)});
mxEvent.addListener(e,"click",function(a){mxEvent.consume(a)});a.appendChild(e);var k,l=this.addUnitInput(a,"pt",22,33,function(){k.apply(this,arguments)});k=this.installInputHandler(l,"jumpSize",Graph.defaultJumpSize,0,999," pt");var m=mxUtils.bind(this,function(a,b,d){c=this.format.getSelectionState();e.value=mxUtils.getValue(c.style,"jumpStyle","none");if(d||document.activeElement!=l)a=parseInt(mxUtils.getValue(c.style,"jumpSize",Graph.defaultJumpSize)),l.value=isNaN(a)?"":a+" pt"});this.addKeyHandler(l,
m);b.getModel().addListener(mxEvent.CHANGE,m);this.listeners.push({destroy:function(){b.getModel().removeListener(m)}});m()}else a.style.display="none";return a};
-StyleFormatPanel.prototype.addEffects=function(a){var c=this.editorUi.editor.graph,d=this.format.getSelectionState();a.style.paddingTop="0px";a.style.paddingBottom="2px";var b=document.createElement("table");mxClient.IS_QUIRKS&&(b.style.fontSize="1em");b.style.width="100%";b.style.fontWeight="bold";b.style.paddingRight="20px";var g=document.createElement("tbody"),e=document.createElement("tr");e.style.padding="0px";var h=document.createElement("td");h.style.padding="0px";h.style.width="50%";h.setAttribute("valign",
-"top");var f=h.cloneNode(!0);f.style.paddingLeft="8px";e.appendChild(h);e.appendChild(f);g.appendChild(e);b.appendChild(g);a.appendChild(b);var k=h,l=0,m=mxUtils.bind(this,function(a,b,c){a=this.createCellOption(a,b,c);a.style.width="100%";k.appendChild(a);k=k==h?f:h;l++}),n=mxUtils.bind(this,function(b,c,e){d=this.format.getSelectionState();h.innerHTML="";f.innerHTML="";k=h;d.rounded&&m(mxResources.get("rounded"),mxConstants.STYLE_ROUNDED,0);"swimlane"==d.style.shape&&m(mxResources.get("divider"),
+StyleFormatPanel.prototype.addEffects=function(a){var c=this.editorUi.editor.graph,d=this.format.getSelectionState();a.style.paddingTop="0px";a.style.paddingBottom="2px";var b=document.createElement("table");mxClient.IS_QUIRKS&&(b.style.fontSize="1em");b.style.width="100%";b.style.fontWeight="bold";b.style.paddingRight="20px";var f=document.createElement("tbody"),e=document.createElement("tr");e.style.padding="0px";var h=document.createElement("td");h.style.padding="0px";h.style.width="50%";h.setAttribute("valign",
+"top");var g=h.cloneNode(!0);g.style.paddingLeft="8px";e.appendChild(h);e.appendChild(g);f.appendChild(e);b.appendChild(f);a.appendChild(b);var k=h,l=0,m=mxUtils.bind(this,function(a,b,c){a=this.createCellOption(a,b,c);a.style.width="100%";k.appendChild(a);k=k==h?g:h;l++}),n=mxUtils.bind(this,function(b,c,e){d=this.format.getSelectionState();h.innerHTML="";g.innerHTML="";k=h;d.rounded&&m(mxResources.get("rounded"),mxConstants.STYLE_ROUNDED,0);"swimlane"==d.style.shape&&m(mxResources.get("divider"),
"swimlaneLine",1);d.containsImage||m(mxResources.get("shadow"),mxConstants.STYLE_SHADOW,0);d.glass&&m(mxResources.get("glass"),mxConstants.STYLE_GLASS,0);d.comic&&m(mxResources.get("comic"),"comic",0);0==l&&(a.style.display="none")});c.getModel().addListener(mxEvent.CHANGE,n);this.listeners.push({destroy:function(){c.getModel().removeListener(n)}});n();return a};
StyleFormatPanel.prototype.addStyleOps=function(a){a.style.paddingTop="10px";a.style.paddingBottom="10px";var c=mxUtils.button(mxResources.get("setAsDefaultStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("setAsDefaultStyle").funct()}));c.setAttribute("title",mxResources.get("setAsDefaultStyle")+" ("+this.editorUi.actions.get("setAsDefaultStyle").shortcut+")");c.style.width="202px";a.appendChild(c);return a};DiagramFormatPanel=function(a,c,d){BaseFormatPanel.call(this,a,c,d);this.init()};
mxUtils.extend(DiagramFormatPanel,BaseFormatPanel);DiagramFormatPanel.showPageView=!0;DiagramFormatPanel.prototype.showBackgroundImageOption=!0;DiagramFormatPanel.prototype.init=function(){var a=this.editorUi.editor.graph;this.container.appendChild(this.addView(this.createPanel()));a.isEnabled()&&(this.container.appendChild(this.addOptions(this.createPanel())),this.container.appendChild(this.addPaperSize(this.createPanel())),this.container.appendChild(this.addStyleOps(this.createPanel())))};
DiagramFormatPanel.prototype.addView=function(a){var c=this.editorUi,d=c.editor.graph;a.appendChild(this.createTitle(mxResources.get("view")));this.addGridOption(a);DiagramFormatPanel.showPageView&&a.appendChild(this.createOption(mxResources.get("pageView"),function(){return d.pageVisible},function(a){c.actions.get("pageView").funct()},{install:function(a){this.listener=function(){a(d.pageVisible)};c.addListener("pageViewChanged",this.listener)},destroy:function(){c.removeListener(this.listener)}}));
-if(d.isEnabled()){var b=this.createColorOption(mxResources.get("background"),function(){return d.background},function(a){a=new ChangePageSetup(c,a);a.ignoreImage=!0;d.model.execute(a)},"#ffffff",{install:function(a){this.listener=function(){a(d.background)};c.addListener("backgroundColorChanged",this.listener)},destroy:function(){c.removeListener(this.listener)}});if(this.showBackgroundImageOption){var g=mxUtils.button(mxResources.get("image"),function(a){c.showBackgroundImageDialog();mxEvent.consume(a)});
-g.style.position="absolute";g.className="geColorBtn";g.style.marginTop="-4px";g.style.paddingBottom=11==document.documentMode||mxClient.IS_MT?"0px":"2px";g.style.height="22px";g.style.right=mxClient.IS_QUIRKS?"52px":"72px";g.style.width="56px";b.appendChild(g)}a.appendChild(b)}return a};
+if(d.isEnabled()){var b=this.createColorOption(mxResources.get("background"),function(){return d.background},function(a){a=new ChangePageSetup(c,a);a.ignoreImage=!0;d.model.execute(a)},"#ffffff",{install:function(a){this.listener=function(){a(d.background)};c.addListener("backgroundColorChanged",this.listener)},destroy:function(){c.removeListener(this.listener)}});if(this.showBackgroundImageOption){var f=mxUtils.button(mxResources.get("image"),function(a){c.showBackgroundImageDialog();mxEvent.consume(a)});
+f.style.position="absolute";f.className="geColorBtn";f.style.marginTop="-4px";f.style.paddingBottom=11==document.documentMode||mxClient.IS_MT?"0px":"2px";f.style.height="22px";f.style.right=mxClient.IS_QUIRKS?"52px":"72px";f.style.width="56px";b.appendChild(f)}a.appendChild(b)}return a};
DiagramFormatPanel.prototype.addOptions=function(a){var c=this.editorUi,d=c.editor.graph;a.appendChild(this.createTitle(mxResources.get("options")));d.isEnabled()&&(a.appendChild(this.createOption(mxResources.get("connectionArrows"),function(){return d.connectionArrowsEnabled},function(a){c.actions.get("connectionArrows").funct()},{install:function(a){this.listener=function(){a(d.connectionArrowsEnabled)};c.addListener("connectionArrowsChanged",this.listener)},destroy:function(){c.removeListener(this.listener)}})),
a.appendChild(this.createOption(mxResources.get("connectionPoints"),function(){return d.connectionHandler.isEnabled()},function(a){c.actions.get("connectionPoints").funct()},{install:function(a){this.listener=function(){a(d.connectionHandler.isEnabled())};c.addListener("connectionPointsChanged",this.listener)},destroy:function(){c.removeListener(this.listener)}})),a.appendChild(this.createOption(mxResources.get("guides"),function(){return d.graphHandler.guidesEnabled},function(a){c.actions.get("guides").funct()},
{install:function(a){this.listener=function(){a(d.graphHandler.guidesEnabled)};c.addListener("guidesEnabledChanged",this.listener)},destroy:function(){c.removeListener(this.listener)}})));return a};
-DiagramFormatPanel.prototype.addGridOption=function(a){function c(a){var b=d.isFloatUnit()?parseFloat(e.value):parseInt(e.value),b=d.fromUnit(Math.max(d.inUnit(1),isNaN(b)?d.inUnit(10):b));b!=g.getGridSize()&&g.setGridSize(b);e.value=d.inUnit(b)+" "+d.getUnit();mxEvent.consume(a)}var d=this,b=this.editorUi,g=b.editor.graph,e=document.createElement("input");e.style.position="absolute";e.style.textAlign="right";e.style.width="38px";e.value=this.inUnit(g.getGridSize())+" "+this.getUnit();var h=this.createStepper(e,
-c,this.getUnitStep(),null,null,null,this.isFloatUnit());e.style.display=g.isGridEnabled()?"":"none";h.style.display=e.style.display;mxEvent.addListener(e,"keydown",function(a){13==a.keyCode?(g.container.focus(),mxEvent.consume(a)):27==a.keyCode&&(e.value=g.getGridSize(),g.container.focus(),mxEvent.consume(a))});mxEvent.addListener(e,"blur",c);mxEvent.addListener(e,"change",c);var f=function(a,b){e.value=d.inUnit(g.getGridSize())+" "+d.getUnit();d.format.refresh()};g.view.addListener("unitChanged",
-f);this.listeners.push({destroy:function(){g.view.removeListener(f)}});if(mxClient.IS_SVG){e.style.marginTop="-2px";e.style.right="84px";h.style.marginTop="-16px";h.style.right="72px";var k=this.createColorOption(mxResources.get("grid"),function(){var a=g.view.gridColor;return g.isGridEnabled()?a:null},function(a){var c=g.isGridEnabled();a==mxConstants.NONE?g.setGridEnabled(!1):(g.setGridEnabled(!0),b.setGridColor(a));e.style.display=g.isGridEnabled()?"":"none";h.style.display=e.style.display;c!=
-g.isGridEnabled()&&b.fireEvent(new mxEventObject("gridEnabledChanged"))},"#e0e0e0",{install:function(a){this.listener=function(){a(g.isGridEnabled()?g.view.gridColor:null)};b.addListener("gridColorChanged",this.listener);b.addListener("gridEnabledChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}});k.appendChild(e);k.appendChild(h);a.appendChild(k)}else e.style.marginTop="2px",e.style.right="32px",h.style.marginTop="2px",h.style.right="20px",a.appendChild(e),a.appendChild(h),
-a.appendChild(this.createOption(mxResources.get("grid"),function(){return g.isGridEnabled()},function(a){g.setGridEnabled(a);g.isGridEnabled()&&(g.view.gridColor="#e0e0e0");b.fireEvent(new mxEventObject("gridEnabledChanged"))},{install:function(a){this.listener=function(){e.style.display=g.isGridEnabled()?"":"none";h.style.display=e.style.display;a(g.isGridEnabled())};b.addListener("gridEnabledChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}}))};
+DiagramFormatPanel.prototype.addGridOption=function(a){function c(a){var b=d.isFloatUnit()?parseFloat(e.value):parseInt(e.value),b=d.fromUnit(Math.max(d.inUnit(1),isNaN(b)?d.inUnit(10):b));b!=f.getGridSize()&&f.setGridSize(b);e.value=d.inUnit(b)+" "+d.getUnit();mxEvent.consume(a)}var d=this,b=this.editorUi,f=b.editor.graph,e=document.createElement("input");e.style.position="absolute";e.style.textAlign="right";e.style.width="38px";e.value=this.inUnit(f.getGridSize())+" "+this.getUnit();var h=this.createStepper(e,
+c,this.getUnitStep(),null,null,null,this.isFloatUnit());e.style.display=f.isGridEnabled()?"":"none";h.style.display=e.style.display;mxEvent.addListener(e,"keydown",function(a){13==a.keyCode?(f.container.focus(),mxEvent.consume(a)):27==a.keyCode&&(e.value=f.getGridSize(),f.container.focus(),mxEvent.consume(a))});mxEvent.addListener(e,"blur",c);mxEvent.addListener(e,"change",c);var g=function(a,b){e.value=d.inUnit(f.getGridSize())+" "+d.getUnit();d.format.refresh()};f.view.addListener("unitChanged",
+g);this.listeners.push({destroy:function(){f.view.removeListener(g)}});if(mxClient.IS_SVG){e.style.marginTop="-2px";e.style.right="84px";h.style.marginTop="-16px";h.style.right="72px";var k=this.createColorOption(mxResources.get("grid"),function(){var a=f.view.gridColor;return f.isGridEnabled()?a:null},function(a){var c=f.isGridEnabled();a==mxConstants.NONE?f.setGridEnabled(!1):(f.setGridEnabled(!0),b.setGridColor(a));e.style.display=f.isGridEnabled()?"":"none";h.style.display=e.style.display;c!=
+f.isGridEnabled()&&b.fireEvent(new mxEventObject("gridEnabledChanged"))},"#e0e0e0",{install:function(a){this.listener=function(){a(f.isGridEnabled()?f.view.gridColor:null)};b.addListener("gridColorChanged",this.listener);b.addListener("gridEnabledChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}});k.appendChild(e);k.appendChild(h);a.appendChild(k)}else e.style.marginTop="2px",e.style.right="32px",h.style.marginTop="2px",h.style.right="20px",a.appendChild(e),a.appendChild(h),
+a.appendChild(this.createOption(mxResources.get("grid"),function(){return f.isGridEnabled()},function(a){f.setGridEnabled(a);f.isGridEnabled()&&(f.view.gridColor="#e0e0e0");b.fireEvent(new mxEventObject("gridEnabledChanged"))},{install:function(a){this.listener=function(){e.style.display=f.isGridEnabled()?"":"none";h.style.display=e.style.display;a(f.isGridEnabled())};b.addListener("gridEnabledChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}}))};
DiagramFormatPanel.prototype.addDocumentProperties=function(a){a.appendChild(this.createTitle(mxResources.get("options")));return a};
DiagramFormatPanel.prototype.addPaperSize=function(a){var c=this.editorUi,d=c.editor.graph;a.appendChild(this.createTitle(mxResources.get("paperSize")));var b=PageSetupDialog.addPageFormatPanel(a,"formatpanel",d.pageFormat,function(a){if(null==d.pageFormat||d.pageFormat.width!=a.width||d.pageFormat.height!=a.height)a=new ChangePageSetup(c,null,null,a),a.ignoreColor=!0,a.ignoreImage=!0,d.model.execute(a)});this.addKeyHandler(b.widthInput,function(){b.set(d.pageFormat)});this.addKeyHandler(b.heightInput,
-function(){b.set(d.pageFormat)});var g=function(){b.set(d.pageFormat)};c.addListener("pageFormatChanged",g);this.listeners.push({destroy:function(){c.removeListener(g)}});d.getModel().addListener(mxEvent.CHANGE,g);this.listeners.push({destroy:function(){d.getModel().removeListener(g)}});return a};
+function(){b.set(d.pageFormat)});var f=function(){b.set(d.pageFormat)};c.addListener("pageFormatChanged",f);this.listeners.push({destroy:function(){c.removeListener(f)}});d.getModel().addListener(mxEvent.CHANGE,f);this.listeners.push({destroy:function(){d.getModel().removeListener(f)}});return a};
DiagramFormatPanel.prototype.addStyleOps=function(a){var c=mxUtils.button(mxResources.get("editData"),mxUtils.bind(this,function(a){this.editorUi.actions.get("editData").funct()}));c.setAttribute("title",mxResources.get("editData")+" ("+this.editorUi.actions.get("editData").shortcut+")");c.style.width="202px";c.style.marginBottom="2px";a.appendChild(c);mxUtils.br(a);c=mxUtils.button(mxResources.get("clearDefaultStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("clearDefaultStyle").funct()}));
-c.setAttribute("title",mxResources.get("clearDefaultStyle")+" ("+this.editorUi.actions.get("clearDefaultStyle").shortcut+")");c.style.width="202px";a.appendChild(c);return a};DiagramFormatPanel.prototype.destroy=function(){BaseFormatPanel.prototype.destroy.apply(this,arguments);this.gridEnabledListener&&(this.editorUi.removeListener(this.gridEnabledListener),this.gridEnabledListener=null)};(function(){function a(){mxCylinder.call(this)}function c(){mxActor.call(this)}function d(){mxCylinder.call(this)}function b(){mxCylinder.call(this)}function g(){mxCylinder.call(this)}function e(){mxActor.call(this)}function h(){mxCylinder.call(this)}function f(){mxActor.call(this)}function k(){mxActor.call(this)}function l(){mxActor.call(this)}function m(){mxActor.call(this)}function n(){mxActor.call(this)}function p(){mxActor.call(this)}function q(){mxActor.call(this)}function u(a,b){this.canvas=
+c.setAttribute("title",mxResources.get("clearDefaultStyle")+" ("+this.editorUi.actions.get("clearDefaultStyle").shortcut+")");c.style.width="202px";a.appendChild(c);return a};DiagramFormatPanel.prototype.destroy=function(){BaseFormatPanel.prototype.destroy.apply(this,arguments);this.gridEnabledListener&&(this.editorUi.removeListener(this.gridEnabledListener),this.gridEnabledListener=null)};(function(){function a(){mxCylinder.call(this)}function c(){mxActor.call(this)}function d(){mxCylinder.call(this)}function b(){mxCylinder.call(this)}function f(){mxCylinder.call(this)}function e(){mxActor.call(this)}function h(){mxCylinder.call(this)}function g(){mxActor.call(this)}function k(){mxActor.call(this)}function l(){mxActor.call(this)}function m(){mxActor.call(this)}function n(){mxActor.call(this)}function p(){mxActor.call(this)}function q(){mxActor.call(this)}function u(a,b){this.canvas=
a;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=b;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,u.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,u.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,u.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,u.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;
this.canvas.curveTo=mxUtils.bind(this,u.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,u.prototype.arcTo)}function v(){mxRectangleShape.call(this)}function r(){mxRectangleShape.call(this)}function w(){mxActor.call(this)}function t(){mxActor.call(this)}function y(){mxActor.call(this)}function x(){mxRectangleShape.call(this)}function C(){mxRectangleShape.call(this)}function B(){mxCylinder.call(this)}function D(){mxShape.call(this)}function A(){mxShape.call(this)}
function F(){mxEllipse.call(this)}function J(){mxShape.call(this)}function G(){mxShape.call(this)}function K(){mxRectangleShape.call(this)}function E(){mxShape.call(this)}function O(){mxShape.call(this)}function Q(){mxShape.call(this)}function R(){mxShape.call(this)}function L(){mxShape.call(this)}function I(){mxCylinder.call(this)}function M(){mxCylinder.call(this)}function ba(){mxRectangleShape.call(this)}function ca(){mxDoubleEllipse.call(this)}function ga(){mxDoubleEllipse.call(this)}function X(){mxArrowConnector.call(this);
@@ -3056,12 +3057,12 @@ a.translate(b,c);a.begin();a.moveTo(0,0);a.lineTo(d-f,0);a.lineTo(d,f);a.lineTo(
a.close(),a.fill()),a.begin(),a.moveTo(f,e),a.lineTo(f,f),a.lineTo(0,0),a.moveTo(f,f),a.lineTo(d,f),a.end(),a.stroke())};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 Ea=Math.tan(mxUtils.toRadians(30)),oa=(.5-Ea)/2;mxUtils.extend(c,mxActor);c.prototype.size=20;c.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d,
e/Ea);a.translate((d-b)/2,(e-b)/2+b/4);a.moveTo(0,.25*b);a.lineTo(.5*b,b*oa);a.lineTo(b,.25*b);a.lineTo(.5*b,(.5-oa)*b);a.lineTo(0,.25*b);a.close();a.end()};mxCellRenderer.registerShape("isoRectangle",c);mxUtils.extend(d,mxCylinder);d.prototype.size=20;d.prototype.redrawPath=function(a,b,c,d,e,f){b=Math.min(d,e/(.5+Ea));f?(a.moveTo(0,.25*b),a.lineTo(.5*b,(.5-oa)*b),a.lineTo(b,.25*b),a.moveTo(.5*b,(.5-oa)*b),a.lineTo(.5*b,(1-oa)*b)):(a.translate((d-b)/2,(e-b)/2),a.moveTo(0,.25*b),a.lineTo(.5*b,b*oa),
a.lineTo(b,.25*b),a.lineTo(b,.75*b),a.lineTo(.5*b,(1-oa)*b),a.lineTo(0,.75*b),a.close());a.end()};mxCellRenderer.registerShape("isoCube",d);mxUtils.extend(b,mxCylinder);b.prototype.redrawPath=function(a,b,c,d,e,f){b=Math.min(e/2,Math.round(e/8)+this.strokewidth-1);if(f&&null!=this.fill||!f&&null==this.fill)a.moveTo(0,b),a.curveTo(0,2*b,d,2*b,d,b),f||(a.stroke(),a.begin()),a.translate(0,b/2),a.moveTo(0,b),a.curveTo(0,2*b,d,2*b,d,b),f||(a.stroke(),a.begin()),a.translate(0,b/2),a.moveTo(0,b),a.curveTo(0,
-2*b,d,2*b,d,b),f||(a.stroke(),a.begin()),a.translate(0,-b);f||(a.moveTo(0,b),a.curveTo(0,-b/3,d,-b/3,d,b),a.lineTo(d,e-b),a.curveTo(d,e+b/3,0,e+b/3,0,e-b),a.close())};b.prototype.getLabelMargins=function(a){return new mxRectangle(0,2.5*Math.min(a.height/2,Math.round(a.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",b);mxUtils.extend(g,mxCylinder);g.prototype.size=30;g.prototype.darkOpacity=0;g.prototype.paintVertexShape=function(a,b,c,d,e){var f=Math.max(0,Math.min(d,
+2*b,d,2*b,d,b),f||(a.stroke(),a.begin()),a.translate(0,-b);f||(a.moveTo(0,b),a.curveTo(0,-b/3,d,-b/3,d,b),a.lineTo(d,e-b),a.curveTo(d,e+b/3,0,e+b/3,0,e-b),a.close())};b.prototype.getLabelMargins=function(a){return new mxRectangle(0,2.5*Math.min(a.height/2,Math.round(a.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",b);mxUtils.extend(f,mxCylinder);f.prototype.size=30;f.prototype.darkOpacity=0;f.prototype.paintVertexShape=function(a,b,c,d,e){var f=Math.max(0,Math.min(d,
Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),g=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));a.translate(b,c);a.begin();a.moveTo(0,0);a.lineTo(d-f,0);a.lineTo(d,f);a.lineTo(d,e);a.lineTo(0,e);a.lineTo(0,0);a.close();a.end();a.fillAndStroke();this.outline||(a.setShadow(!1),0!=g&&(a.setFillAlpha(Math.abs(g)),a.setFillColor(0>g?"#FFFFFF":"#000000"),a.begin(),a.moveTo(d-f,0),a.lineTo(d-f,f),a.lineTo(d,f),a.close(),a.fill()),
-a.begin(),a.moveTo(d-f,0),a.lineTo(d-f,f),a.lineTo(d,f),a.end(),a.stroke())};mxCellRenderer.registerShape("note",g);mxUtils.extend(e,mxActor);e.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.quadTo(d/2,.5*e,d,0);a.quadTo(.5*d,e/2,d,e);a.quadTo(d/2,.5*e,0,e);a.quadTo(.5*d,e/2,0,0);a.end()};mxCellRenderer.registerShape("switch",e);mxUtils.extend(h,mxCylinder);h.prototype.tabWidth=60;h.prototype.tabHeight=20;h.prototype.tabPosition="right";h.prototype.redrawPath=function(a,b,c,d,e,f){b=Math.max(0,
+a.begin(),a.moveTo(d-f,0),a.lineTo(d-f,f),a.lineTo(d,f),a.end(),a.stroke())};mxCellRenderer.registerShape("note",f);mxUtils.extend(e,mxActor);e.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.quadTo(d/2,.5*e,d,0);a.quadTo(.5*d,e/2,d,e);a.quadTo(d/2,.5*e,0,e);a.quadTo(.5*d,e/2,0,0);a.end()};mxCellRenderer.registerShape("switch",e);mxUtils.extend(h,mxCylinder);h.prototype.tabWidth=60;h.prototype.tabHeight=20;h.prototype.tabPosition="right";h.prototype.redrawPath=function(a,b,c,d,e,f){b=Math.max(0,
Math.min(d,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var g=mxUtils.getValue(this.style,"tabPosition",this.tabPosition);f?"left"==g?(a.moveTo(0,c),a.lineTo(b,c)):(a.moveTo(d-b,c),a.lineTo(d,c)):("left"==g?(a.moveTo(0,0),a.lineTo(b,0),a.lineTo(b,c),a.lineTo(d,c)):(a.moveTo(0,c),a.lineTo(d-b,c),a.lineTo(d-b,0),a.lineTo(d,0)),a.lineTo(d,e),a.lineTo(0,e),a.lineTo(0,c),a.close());a.end()};
-mxCellRenderer.registerShape("folder",h);mxUtils.extend(f,mxActor);f.prototype.size=30;f.prototype.isRoundable=function(){return!0};f.prototype.redrawPath=function(a,b,c,d,e){b=Math.max(0,Math.min(d,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(b,0),new mxPoint(d,0),new mxPoint(d,e),new mxPoint(0,e),new mxPoint(0,b)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("card",
-f);mxUtils.extend(k,mxActor);k.prototype.size=.4;k.prototype.redrawPath=function(a,b,c,d,e){b=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,b/2);a.quadTo(d/4,1.4*b,d/2,b/2);a.quadTo(3*d/4,b*(1-1.4),d,b/2);a.lineTo(d,e-b/2);a.quadTo(3*d/4,e-1.4*b,d/2,e-b/2);a.quadTo(d/4,e-b*(1-1.4),0,e-b/2);a.lineTo(0,b/2);a.close();a.end()};k.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var b=mxUtils.getValue(this.style,"size",
+mxCellRenderer.registerShape("folder",h);mxUtils.extend(g,mxActor);g.prototype.size=30;g.prototype.isRoundable=function(){return!0};g.prototype.redrawPath=function(a,b,c,d,e){b=Math.max(0,Math.min(d,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(b,0),new mxPoint(d,0),new mxPoint(d,e),new mxPoint(0,e),new mxPoint(0,b)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("card",
+g);mxUtils.extend(k,mxActor);k.prototype.size=.4;k.prototype.redrawPath=function(a,b,c,d,e){b=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,b/2);a.quadTo(d/4,1.4*b,d/2,b/2);a.quadTo(3*d/4,b*(1-1.4),d,b/2);a.lineTo(d,e-b/2);a.quadTo(3*d/4,e-1.4*b,d/2,e-b/2);a.quadTo(d/4,e-b*(1-1.4),0,e-b/2);a.lineTo(0,b/2);a.close();a.end()};k.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var b=mxUtils.getValue(this.style,"size",
this.size),c=a.width,d=a.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return b*=d,new mxRectangle(a.x,a.y+b,c,d-2*b);b*=c;return new mxRectangle(a.x+b,a.y,c-2*b,d)}return a};mxCellRenderer.registerShape("tape",k);mxUtils.extend(l,mxActor);l.prototype.size=.3;l.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};l.prototype.redrawPath=function(a,b,c,d,e){b=e*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,e-b/2);a.quadTo(3*d/4,e-1.4*b,d/2,e-b/2);a.quadTo(d/4,e-b*(1-1.4),0,e-b/2);a.lineTo(0,b/2);a.close();a.end()};mxCellRenderer.registerShape("document",l);var Oa=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(a,b,c,d){var e=mxUtils.getValue(this.style,"size");return null!=e?d*Math.max(0,
Math.min(1,e)):Oa.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var b=2*mxUtils.getValue(this.style,"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,a.height*b),0,0)}return null};mxUtils.extend(m,mxActor);m.prototype.size=.2;m.prototype.isRoundable=function(){return!0};m.prototype.redrawPath=function(a,b,c,d,e){b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,
@@ -3161,7 +3162,7 @@ mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.ge
mxConstants.STYLE_ROUNDED)){var c=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));b.push(ja(a,c/2))}return b},label:ta(),ext:ta(),rectangle:ta(),triangle:ta(),rhombus:ta(),umlLifeline:function(a){return[N(a,["size"],function(a){var b=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",K.prototype.size))));return new mxPoint(a.getCenterX(),a.y+b)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,
b.y-a.y)))},!1)]},umlFrame:function(a){return[N(a,["width","height"],function(a){var b=Math.max(E.prototype.corner,Math.min(a.width,mxUtils.getValue(this.state.style,"width",E.prototype.width))),c=Math.max(1.5*E.prototype.corner,Math.min(a.height,mxUtils.getValue(this.state.style,"height",E.prototype.height)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.width=Math.round(Math.max(E.prototype.corner,Math.min(a.width,b.x-a.x)));this.state.style.height=Math.round(Math.max(1.5*E.prototype.corner,
Math.min(a.height,b.y-a.y)))},!1)]},process:function(a){var b=[N(a,["size"],function(a){var b=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style,"size",v.prototype.size))));return new mxPoint(a.x+a.width*b,a.y+a.height/4)},function(a,b){this.state.style.size=Math.max(0,Math.min(.5,(b.x-a.x)/a.width))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ja(a));return b},cross:function(a){return[N(a,["size"],function(a){var b=Math.min(a.width,a.height),b=Math.max(0,Math.min(1,
-mxUtils.getValue(this.state.style,"size",pa.prototype.size)))*b/2;return new mxPoint(a.getCenterX()-b,a.getCenterY()-b)},function(a,b){var c=Math.min(a.width,a.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,a.getCenterY()-b.y)/c*2,Math.max(0,a.getCenterX()-b.x)/c*2)))})]},note:function(a){return[N(a,["size"],function(a){var b=Math.max(0,Math.min(a.width,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",g.prototype.size)))));return new mxPoint(a.x+a.width-
+mxUtils.getValue(this.state.style,"size",pa.prototype.size)))*b/2;return new mxPoint(a.getCenterX()-b,a.getCenterY()-b)},function(a,b){var c=Math.min(a.width,a.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,a.getCenterY()-b.y)/c*2,Math.max(0,a.getCenterX()-b.x)/c*2)))})]},note:function(a){return[N(a,["size"],function(a){var b=Math.max(0,Math.min(a.width,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",f.prototype.size)))));return new mxPoint(a.x+a.width-
b,a.y+b)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(a.width,a.x+a.width-b.x),Math.min(a.height,b.y-a.y))))})]},manualInput:function(a){var b=[N(a,["size"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",da.prototype.size)));return new mxPoint(a.x+a.width/4,a.y+3*b/4)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,4*(b.y-a.y)/3)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ja(a));
return b},dataStorage:function(a){return[N(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",U.prototype.size))));return new mxPoint(a.x+(1-b)*a.width,a.getCenterY())},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.x+a.width-b.x)/a.width))})]},callout:function(a){var b=[N(a,["size","position"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",w.prototype.size))),c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
"position",w.prototype.position)));mxUtils.getValue(this.state.style,"base",w.prototype.base);return new mxPoint(a.x+c*a.width,a.y+a.height-b)},function(a,b){mxUtils.getValue(this.state.style,"base",w.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(a.height,a.y+a.height-b.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(b.x-a.x)/a.width)))/100}),N(a,["position2"],function(a){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",w.prototype.position2)));
@@ -3173,7 +3174,7 @@ mxUtils.getValue(this.state.style,"jettyHeight",I.prototype.jettyHeight)));retur
b){this.state.style.dx=Math.round(Math.max(0,2*Math.min(a.width/2,b.x-a.x-a.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})]},singleArrow:la(1),doubleArrow:la(.5),folder:function(a){return[N(a,["tabWidth","tabHeight"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"tabWidth",h.prototype.tabWidth))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"tabHeight",h.prototype.tabHeight)));mxUtils.getValue(this.state.style,
"tabPosition",h.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(b=a.width-b);return new mxPoint(a.x+b,a.y+c)},function(a,b){var c=Math.max(0,Math.min(a.width,b.x-a.x));mxUtils.getValue(this.state.style,"tabPosition",h.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(c=a.width-c);this.state.style.tabWidth=Math.round(c);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})]},document:function(a){return[N(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,
"size",l.prototype.size))));return new mxPoint(a.x+3*a.width/4,a.y+(1-b)*a.height)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-b.y)/a.height))})]},tape:function(a){return[N(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",k.prototype.size))));return new mxPoint(a.getCenterX(),a.y+b*a.height/2)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(b.y-a.y)/a.height*2))})]},offPageConnector:function(a){return[N(a,
-["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",fa.prototype.size))));return new mxPoint(a.getCenterX(),a.y+(1-b)*a.height)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-b.y)/a.height))})]},step:wa(t.prototype.size,!0,null,!0,t.prototype.fixedSize),hexagon:wa(y.prototype.size,!0,.5,!0),curlyBracket:wa(p.prototype.size,!1),display:wa(qa.prototype.size,!1),cube:Fa(1,a.prototype.size,!1),card:Fa(.5,f.prototype.size,!0),loopLimit:Fa(.5,
+["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",fa.prototype.size))));return new mxPoint(a.getCenterX(),a.y+(1-b)*a.height)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-b.y)/a.height))})]},step:wa(t.prototype.size,!0,null,!0,t.prototype.fixedSize),hexagon:wa(y.prototype.size,!0,.5,!0),curlyBracket:wa(p.prototype.size,!1),display:wa(qa.prototype.size,!1),cube:Fa(1,a.prototype.size,!1),card:Fa(.5,g.prototype.size,!0),loopLimit:Fa(.5,
V.prototype.size,!0),trapezoid:Ka(.5),parallelogram:Ka(1)};Graph.createHandle=N;Graph.handleFactory=xa;var Ma=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var a=Ma.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var b=this.state.style.shape;null==mxCellRenderer.defaultShapes[b]&&null==mxStencilRegistry.getStencil(b)&&(b=mxConstants.SHAPE_RECTANGLE);b=xa[b];null==b&&null!=this.state.shape&&this.state.shape.isRoundable()&&
(b=xa[mxConstants.SHAPE_RECTANGLE]);null!=b&&(b=b(this.state),null!=b&&(a=null==a?b:a.concat(b)))}return a};mxEdgeHandler.prototype.createCustomHandles=function(){var a=this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_CONNECTOR);a=xa[a];return null!=a?a(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var ya=new mxPoint(1,0),za=new mxPoint(1,0),la=mxUtils.toRadians(-30),ya=mxUtils.getRotatedPoint(ya,
Math.cos(la),Math.sin(la)),la=mxUtils.toRadians(-150),za=mxUtils.getRotatedPoint(za,Math.cos(la),Math.sin(la));mxEdgeStyle.IsometricConnector=function(a,b,c,d,e){var f=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=f.transformControlPoint(a,d));null==h&&null!=b&&(h=new mxPoint(b.getCenterX(),b.getCenterY()));null==g&&null!=c&&(g=new mxPoint(c.getCenterX(),c.getCenterY()));var k=ya.x,l=ya.y,m=za.x,n=za.y,p="horizontal"==mxUtils.getValue(a.style,"elbow",
@@ -3184,9 +3185,9 @@ Graph.prototype.createEdgeHandler=function(a,b){if(b==mxEdgeStyle.IsometricConne
0),!1,null,b,.5*(c-d)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,c-d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,c-d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(c-d)));b>=2*d&&a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return a};mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(.25,
0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(.25,
1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0)];mxEllipse.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(0,
-.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;x.prototype.constraints=mxRectangleShape.prototype.constraints;g.prototype.getConstraints=function(a,b,c){a=[];var d=Math.max(0,Math.min(b,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));a.push(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;x.prototype.constraints=mxRectangleShape.prototype.constraints;f.prototype.getConstraints=function(a,b,c){a=[];var d=Math.max(0,Math.min(b,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-d),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-d,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-.5*d,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.5*(c+d)));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,
-1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));b>=2*d&&a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return a};f.prototype.getConstraints=function(a,b,c){a=[];var d=Math.max(0,Math.min(b,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+d),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,0));a.push(new mxConnectionConstraint(new mxPoint(0,
+1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));b>=2*d&&a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return a};g.prototype.getConstraints=function(a,b,c){a=[];var d=Math.max(0,Math.min(b,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+d),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,0));a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,.5*d,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(c+d)));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));b>=2*d&&a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return a};a.prototype.getConstraints=function(a,b,
c){a=[];var d=Math.max(0,Math.min(b,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-d),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-d,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-.5*d,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,
.5*(c+d)));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+d),c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d,c-.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,c-d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(c-d)));return a};h.prototype.getConstraints=function(a,b,c){a=[];var d=Math.max(0,Math.min(b,
@@ -3225,39 +3226,39 @@ function(a,b,c){a=[];var d=Math.min(c,b),e=Math.max(0,Math.min(d,d*parseFloat(mx
0),!1,null,0,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*g,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,d));return a};K.prototype.constraints=null;ea.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,
.9),!1)];ia.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];R.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];L.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})();function Actions(a){this.editorUi=a;this.actions={};this.init()}
-Actions.prototype.init=function(){function a(a){b.escape();var c=b.getDeletableCells(b.getSelectionCells());if(null!=c&&0<c.length){var d=b.selectParentAfterDelete?b.model.getParents(c):null;b.removeCells(c,a);if(null!=d){a=[];for(c=0;c<d.length;c++)b.model.contains(d[c])&&(b.model.isVertex(d[c])||b.model.isEdge(d[c]))&&a.push(d[c]);b.setSelectionCells(a)}}}var c=this.editorUi,d=c.editor,b=d.graph,g=function(){return Action.prototype.isEnabled.apply(this,arguments)&&b.isEnabled()};this.addAction("new...",
+Actions.prototype.init=function(){function a(a){b.escape();var c=b.getDeletableCells(b.getSelectionCells());if(null!=c&&0<c.length){var d=b.selectParentAfterDelete?b.model.getParents(c):null;b.removeCells(c,a);if(null!=d){a=[];for(c=0;c<d.length;c++)b.model.contains(d[c])&&(b.model.isVertex(d[c])||b.model.isEdge(d[c]))&&a.push(d[c]);b.setSelectionCells(a)}}}var c=this.editorUi,d=c.editor,b=d.graph,f=function(){return Action.prototype.isEnabled.apply(this,arguments)&&b.isEnabled()};this.addAction("new...",
function(){b.openLink(c.getUrl())});this.addAction("open...",function(){window.openNew=!0;window.openKey="open";c.openFile()});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){c.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(a,b){try{var c=mxUtils.parseXml(a);d.graph.setSelectionCells(d.graph.importGraphModel(c.documentElement))}catch(m){mxUtils.alert(mxResources.get("invalidOrMissingFile")+
-": "+m.message)}}));c.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=null})}).isEnabled=g;this.addAction("save",function(){c.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=g;this.addAction("saveAs...",function(){c.saveFile(!0)},null,null,Editor.ctrlKey+"+Shift+S").isEnabled=g;this.addAction("export...",function(){c.showDialog((new ExportDialog(c)).container,300,296,!0,!0)});this.addAction("editDiagram...",function(){var a=new EditDiagramDialog(c);c.showDialog(a.container,
-620,420,!0,!1);a.init()});this.addAction("pageSetup...",function(){c.showDialog((new PageSetupDialog(c)).container,320,220,!0,!0)}).isEnabled=g;this.addAction("print...",function(){c.showDialog((new PrintDialog(c)).container,300,180,!0,!0)},null,"sprite-print",Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(b,null,10,10)});this.addAction("undo",function(){c.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){c.redo()},null,"sprite-redo",mxClient.IS_WIN?
-Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){mxClipboard.cut(b)},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{mxClipboard.copy(b)}catch(f){c.handleError(f)}},null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&mxClipboard.paste(b)},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(a){if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){b.getModel().beginUpdate();
+": "+m.message)}}));c.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=null})}).isEnabled=f;this.addAction("save",function(){c.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=f;this.addAction("saveAs...",function(){c.saveFile(!0)},null,null,Editor.ctrlKey+"+Shift+S").isEnabled=f;this.addAction("export...",function(){c.showDialog((new ExportDialog(c)).container,300,296,!0,!0)});this.addAction("editDiagram...",function(){var a=new EditDiagramDialog(c);c.showDialog(a.container,
+620,420,!0,!1);a.init()});this.addAction("pageSetup...",function(){c.showDialog((new PageSetupDialog(c)).container,320,220,!0,!0)}).isEnabled=f;this.addAction("print...",function(){c.showDialog((new PrintDialog(c)).container,300,180,!0,!0)},null,"sprite-print",Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(b,null,10,10)});this.addAction("undo",function(){c.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){c.redo()},null,"sprite-redo",mxClient.IS_WIN?
+Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){mxClipboard.cut(b)},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{mxClipboard.copy(b)}catch(g){c.handleError(g)}},null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&mxClipboard.paste(b)},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(a){if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){b.getModel().beginUpdate();
try{var c=mxClipboard.paste(b);if(null!=c){a=!0;for(var d=0;d<c.length&&a;d++)a=a&&b.model.isEdge(c[d]);var e=b.view.translate,f=b.view.scale,g=e.x,h=e.y,e=null;if(1==c.length&&a){var u=b.getCellGeometry(c[0]);null!=u&&(e=u.getTerminalPoint(!0))}e=null!=e?e:b.getBoundingBoxFromGeometry(c,a);if(null!=e){var v=Math.round(b.snap(b.popupMenuHandler.triggerX/f-g)),r=Math.round(b.snap(b.popupMenuHandler.triggerY/f-h));b.cellsMoved(c,v-e.x,r-e.y)}}}finally{b.getModel().endUpdate()}}});this.addAction("copySize",
function(a){a=b.getSelectionCell();b.isEnabled()&&null!=a&&b.getModel().isVertex(a)&&(a=b.getCellGeometry(a),null!=a&&(c.copiedSize=new mxRectangle(a.x,a.y,a.width,a.height)))},null,null,"Alt+Shift+X");this.addAction("pasteSize",function(a){if(b.isEnabled()&&!b.isSelectionEmpty()&&null!=c.copiedSize){b.getModel().beginUpdate();try{var d=b.getSelectionCells();for(a=0;a<d.length;a++)if(b.getModel().isVertex(d[a])){var e=b.getCellGeometry(d[a]);null!=e&&(e=e.clone(),e.width=c.copiedSize.width,e.height=
-c.copiedSize.height,b.getModel().setGeometry(d[a],e))}}finally{b.getModel().endUpdate()}}},null,null,"Alt+Shift+V");this.addAction("delete",function(b){a(null!=b&&mxEvent.isShiftDown(b))},null,null,"Delete");this.addAction("deleteAll",function(){a(!0)},null,null,Editor.ctrlKey+"+Delete");this.addAction("duplicate",function(){try{b.setSelectionCells(b.duplicateCells())}catch(f){c.handleError(f)}},null,null,Editor.ctrlKey+"+D");this.put("turn",new Action(mxResources.get("turn")+" / "+mxResources.get("reverse"),
+c.copiedSize.height,b.getModel().setGeometry(d[a],e))}}finally{b.getModel().endUpdate()}}},null,null,"Alt+Shift+V");this.addAction("delete",function(b){a(null!=b&&mxEvent.isShiftDown(b))},null,null,"Delete");this.addAction("deleteAll",function(){a(!0)},null,null,Editor.ctrlKey+"+Delete");this.addAction("duplicate",function(){try{b.setSelectionCells(b.duplicateCells())}catch(g){c.handleError(g)}},null,null,Editor.ctrlKey+"+D");this.put("turn",new Action(mxResources.get("turn")+" / "+mxResources.get("reverse"),
function(a){b.turnShapes(b.getSelectionCells(),null!=a?mxEvent.isShiftDown(a):!1)},null,null,Editor.ctrlKey+"+R"));this.addAction("selectVertices",function(){b.selectVertices(null,!0)},null,null,Editor.ctrlKey+"+Shift+I");this.addAction("selectEdges",function(){b.selectEdges()},null,null,Editor.ctrlKey+"+Shift+E");this.addAction("selectAll",function(){b.selectAll(null,!0)},null,null,Editor.ctrlKey+"+A");this.addAction("selectNone",function(){b.clearSelection()},null,null,Editor.ctrlKey+"+Shift+A");
this.addAction("lockUnlock",function(){if(!b.isSelectionEmpty()){b.getModel().beginUpdate();try{var a=b.isCellMovable(b.getSelectionCell())?1:0;b.toggleCellStyles(mxConstants.STYLE_MOVABLE,a);b.toggleCellStyles(mxConstants.STYLE_RESIZABLE,a);b.toggleCellStyles(mxConstants.STYLE_ROTATABLE,a);b.toggleCellStyles(mxConstants.STYLE_DELETABLE,a);b.toggleCellStyles(mxConstants.STYLE_EDITABLE,a);b.toggleCellStyles("connectable",a)}finally{b.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+L");this.addAction("home",
function(){b.home()},null,null,"Home");this.addAction("exitGroup",function(){b.exitGroup()},null,null,Editor.ctrlKey+"+Shift+Home");this.addAction("enterGroup",function(){b.enterGroup()},null,null,Editor.ctrlKey+"+Shift+End");this.addAction("collapse",function(){b.foldCells(!0)},null,null,Editor.ctrlKey+"+Home");this.addAction("expand",function(){b.foldCells(!1)},null,null,Editor.ctrlKey+"+End");this.addAction("toFront",function(){b.orderCells(!1)},null,null,Editor.ctrlKey+"+Shift+F");this.addAction("toBack",
function(){b.orderCells(!0)},null,null,Editor.ctrlKey+"+Shift+B");this.addAction("group",function(){1==b.getSelectionCount()?b.setCellStyles("container","1"):b.setSelectionCell(b.groupCells(null,0))},null,null,Editor.ctrlKey+"+G");this.addAction("ungroup",function(){1==b.getSelectionCount()&&0==b.getModel().getChildCount(b.getSelectionCell())?b.setCellStyles("container","0"):b.setSelectionCells(b.ungroupCells())},null,null,Editor.ctrlKey+"+Shift+U");this.addAction("removeFromGroup",function(){b.removeCellsFromParent()});
this.addAction("edit",function(){b.isEnabled()&&b.startEditingAtCell()},null,null,"F2/Enter");this.addAction("editData...",function(){var a=b.getSelectionCell()||b.getModel().getRoot();c.showDataDialog(a)},null,null,Editor.ctrlKey+"+M");this.addAction("editTooltip...",function(){var a=c.editor.graph;if(a.isEnabled()&&!a.isSelectionEmpty()){var b=a.getSelectionCell(),d="";if(mxUtils.isNode(b.value)){var e=b.value.getAttribute("tooltip");null!=e&&(d=e)}d=new TextareaDialog(c,mxResources.get("editTooltip")+
":",d,function(c){a.setTooltipForCell(b,c)});c.showDialog(d.container,320,200,!0,!0);d.init()}},null,null,"Alt+Shift+T");this.addAction("openLink",function(){var a=b.getLinkForCell(b.getSelectionCell());null!=a&&b.openLink(a)});this.addAction("editLink...",function(){var a=c.editor.graph;if(a.isEnabled()&&!a.isSelectionEmpty()){var b=a.getSelectionCell(),d=a.getLinkForCell(b)||"";c.showLinkDialog(d,mxResources.get("apply"),function(c){c=mxUtils.trim(c);a.setLinkForCell(b,0<c.length?c:null)})}},null,
-null,"Alt+Shift+L");this.put("insertImage",new Action(mxResources.get("image")+"...",function(){b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(b.clearSelection(),c.actions.get("image").funct())})).isEnabled=g;this.put("insertLink",new Action(mxResources.get("link")+"...",function(){b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&c.showLinkDialog("",mxResources.get("insert"),function(a,c){a=mxUtils.trim(a);if(0<a.length){var d=null,e=b.getLinkTitle(a);null!=c&&0<c.length&&(d=c[0].iconUrl,
+null,"Alt+Shift+L");this.put("insertImage",new Action(mxResources.get("image")+"...",function(){b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(b.clearSelection(),c.actions.get("image").funct())})).isEnabled=f;this.put("insertLink",new Action(mxResources.get("link")+"...",function(){b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&c.showLinkDialog("",mxResources.get("insert"),function(a,c){a=mxUtils.trim(a);if(0<a.length){var d=null,e=b.getLinkTitle(a);null!=c&&0<c.length&&(d=c[0].iconUrl,
e=c[0].name||c[0].type,e=e.charAt(0).toUpperCase()+e.substring(1),30<e.length&&(e=e.substring(0,30)+"..."));var f=b.getFreeInsertPoint(),d=new mxCell(e,new mxGeometry(f.x,f.y,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=d?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+d:"spacing=10;"));d.vertex=!0;b.setLinkForCell(d,a);b.cellSizeUpdated(d,!0);b.getModel().beginUpdate();try{d=b.addCell(d),b.fireEvent(new mxEventObject("cellsInserted","cells",
-[d]))}finally{b.getModel().endUpdate()}b.setSelectionCell(d);b.scrollCellToVisible(b.getSelectionCell())}})})).isEnabled=g;this.addAction("link...",mxUtils.bind(this,function(){var a=c.editor.graph;if(a.isEnabled())if(a.cellEditor.isContentEditing()){var b=a.getSelectedElement(),d=a.getParentByName(b,"A",a.cellEditor.textarea),e="";if(null==d&&null!=b&&null!=b.getElementsByTagName)for(var g=b.getElementsByTagName("a"),h=0;h<g.length&&null==d;h++)g[h].textContent==b.textContent&&(d=g[h]);null!=d&&
-"A"==d.nodeName&&(e=d.getAttribute("href")||"",a.selectNode(d));var q=a.cellEditor.saveSelection();c.showLinkDialog(e,mxResources.get("apply"),mxUtils.bind(this,function(b){a.cellEditor.restoreSelection(q);null!=b&&a.insertLink(b)}))}else a.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=g;this.addAction("autosize",function(){var a=b.getSelectionCells();if(null!=a){b.getModel().beginUpdate();try{for(var c=0;c<a.length;c++){var d=a[c];if(b.getModel().getChildCount(d))b.updateGroupBounds([d],
-20);else{var e=b.view.getState(d),g=b.getCellGeometry(d);b.getModel().isVertex(d)&&null!=e&&null!=e.text&&null!=g&&b.isWrapping(d)?(g=g.clone(),g.height=e.text.boundingBox.height/b.view.scale,b.getModel().setGeometry(d,g)):b.updateCellSize(d)}}}finally{b.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("formattedText",function(){var a=b.getView().getState(b.getSelectionCell());if(null!=a){b.stopEditing();a="1"==a.style.html?null:"1";b.getModel().beginUpdate();try{for(var d=
-b.getSelectionCells(),e=0;e<d.length;e++)if(state=b.getView().getState(d[e]),null!=state){var g=mxUtils.getValue(state.style,"html","0");if("1"==g&&null==a){var h=b.convertValueToString(state.cell);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(h=h.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var p=document.createElement("div");p.innerHTML=h;h=mxUtils.extractTextWithWhitespace(p.childNodes);b.cellLabelChanged(state.cell,h);b.setCellStyles("html",a,[d[e]])}else"0"==g&&"1"==a&&(h=mxUtils.htmlEntities(b.convertValueToString(state.cell),
+[d]))}finally{b.getModel().endUpdate()}b.setSelectionCell(d);b.scrollCellToVisible(b.getSelectionCell())}})})).isEnabled=f;this.addAction("link...",mxUtils.bind(this,function(){var a=c.editor.graph;if(a.isEnabled())if(a.cellEditor.isContentEditing()){var b=a.getSelectedElement(),d=a.getParentByName(b,"A",a.cellEditor.textarea),e="";if(null==d&&null!=b&&null!=b.getElementsByTagName)for(var f=b.getElementsByTagName("a"),h=0;h<f.length&&null==d;h++)f[h].textContent==b.textContent&&(d=f[h]);null!=d&&
+"A"==d.nodeName&&(e=d.getAttribute("href")||"",a.selectNode(d));var q=a.cellEditor.saveSelection();c.showLinkDialog(e,mxResources.get("apply"),mxUtils.bind(this,function(b){a.cellEditor.restoreSelection(q);null!=b&&a.insertLink(b)}))}else a.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=f;this.addAction("autosize",function(){var a=b.getSelectionCells();if(null!=a){b.getModel().beginUpdate();try{for(var c=0;c<a.length;c++){var d=a[c];if(b.getModel().getChildCount(d))b.updateGroupBounds([d],
+20);else{var e=b.view.getState(d),f=b.getCellGeometry(d);b.getModel().isVertex(d)&&null!=e&&null!=e.text&&null!=f&&b.isWrapping(d)?(f=f.clone(),f.height=e.text.boundingBox.height/b.view.scale,b.getModel().setGeometry(d,f)):b.updateCellSize(d)}}}finally{b.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("formattedText",function(){var a=b.getView().getState(b.getSelectionCell());if(null!=a){b.stopEditing();a="1"==a.style.html?null:"1";b.getModel().beginUpdate();try{for(var d=
+b.getSelectionCells(),e=0;e<d.length;e++)if(state=b.getView().getState(d[e]),null!=state){var f=mxUtils.getValue(state.style,"html","0");if("1"==f&&null==a){var h=b.convertValueToString(state.cell);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(h=h.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var p=document.createElement("div");p.innerHTML=h;h=mxUtils.extractTextWithWhitespace(p.childNodes);b.cellLabelChanged(state.cell,h);b.setCellStyles("html",a,[d[e]])}else"0"==f&&"1"==a&&(h=mxUtils.htmlEntities(b.convertValueToString(state.cell),
!1),"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(h=h.replace(/\n/g,"<br/>")),b.cellLabelChanged(state.cell,b.sanitizeHtml(h)),b.setCellStyles("html",a,[d[e]]))}c.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=a?a:"0"],"cells",d))}finally{b.getModel().endUpdate()}}});this.addAction("wordWrap",function(){var a=b.getView().getState(b.getSelectionCell()),c="wrap";b.stopEditing();null!=a&&"wrap"==a.style[mxConstants.STYLE_WHITE_SPACE]&&(c=null);b.setCellStyles(mxConstants.STYLE_WHITE_SPACE,
c)});this.addAction("rotation",function(){var a="0",d=b.getView().getState(b.getSelectionCell());null!=d&&(a=d.style[mxConstants.STYLE_ROTATION]||a);a=new FilenameDialog(c,a,mxResources.get("apply"),function(a){null!=a&&0<a.length&&b.setCellStyles(mxConstants.STYLE_ROTATION,a)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");c.showDialog(a.container,375,80,!0,!0);a.init()});this.addAction("resetView",function(){b.zoomTo(1);c.resetScrollbars()},null,null,Editor.ctrlKey+"+H");
this.addAction("zoomIn",function(a){b.isFastZoomEnabled()?b.lazyZoom(!0,!0,c.buttonZoomDelay):b.zoomIn()},null,null,Editor.ctrlKey+" + (Numpad) / Alt+Mousewheel");this.addAction("zoomOut",function(a){b.isFastZoomEnabled()?b.lazyZoom(!1,!0,c.buttonZoomDelay):b.zoomOut()},null,null,Editor.ctrlKey+" - (Numpad) / Alt+Mousewheel");this.addAction("fitWindow",function(){var a=b.isSelectionEmpty()?b.getGraphBounds():b.getBoundingBox(b.getSelectionCells()),c=b.view.translate,d=b.view.scale;a.width/=d;a.height/=
-d;a.x=a.x/d-c.x;a.y=a.y/d-c.y;var d=b.container.clientWidth-10,e=b.container.clientHeight-10,g=Math.floor(20*Math.min(d/a.width,e/a.height))/20;b.zoomTo(g);mxUtils.hasScrollbars(b.container)&&(b.container.scrollTop=(a.y+c.y)*g-Math.max((e-a.height*g)/2+5,0),b.container.scrollLeft=(a.x+c.x)*g-Math.max((d-a.width*g)/2+5,0))},null,null,Editor.ctrlKey+"+Shift+H");this.addAction("fitPage",mxUtils.bind(this,function(){b.pageVisible||this.get("pageView").funct();var a=b.pageFormat,c=b.pageScale;b.zoomTo(Math.floor(20*
+d;a.x=a.x/d-c.x;a.y=a.y/d-c.y;var d=b.container.clientWidth-10,e=b.container.clientHeight-10,f=Math.floor(20*Math.min(d/a.width,e/a.height))/20;b.zoomTo(f);mxUtils.hasScrollbars(b.container)&&(b.container.scrollTop=(a.y+c.y)*f-Math.max((e-a.height*f)/2+5,0),b.container.scrollLeft=(a.x+c.x)*f-Math.max((d-a.width*f)/2+5,0))},null,null,Editor.ctrlKey+"+Shift+H");this.addAction("fitPage",mxUtils.bind(this,function(){b.pageVisible||this.get("pageView").funct();var a=b.pageFormat,c=b.pageScale;b.zoomTo(Math.floor(20*
Math.min((b.container.clientWidth-10)/a.width/c,(b.container.clientHeight-10)/a.height/c))/20);mxUtils.hasScrollbars(b.container)&&(a=b.getPagePadding(),b.container.scrollTop=a.y*b.view.scale-1,b.container.scrollLeft=Math.min(a.x*b.view.scale,(b.container.scrollWidth-b.container.clientWidth)/2)-1)}),null,null,Editor.ctrlKey+"+J");this.addAction("fitTwoPages",mxUtils.bind(this,function(){b.pageVisible||this.get("pageView").funct();var a=b.pageFormat,c=b.pageScale;b.zoomTo(Math.floor(20*Math.min((b.container.clientWidth-
10)/(2*a.width)/c,(b.container.clientHeight-10)/a.height/c))/20);mxUtils.hasScrollbars(b.container)&&(a=b.getPagePadding(),b.container.scrollTop=Math.min(a.y,(b.container.scrollHeight-b.container.clientHeight)/2),b.container.scrollLeft=Math.min(a.x,(b.container.scrollWidth-b.container.clientWidth)/2))}),null,null,Editor.ctrlKey+"+Shift+J");this.addAction("fitPageWidth",mxUtils.bind(this,function(){b.pageVisible||this.get("pageView").funct();b.zoomTo(Math.floor(20*(b.container.clientWidth-10)/b.pageFormat.width/
b.pageScale)/20);if(mxUtils.hasScrollbars(b.container)){var a=b.getPagePadding();b.container.scrollLeft=Math.min(a.x*b.view.scale,(b.container.scrollWidth-b.container.clientWidth)/2)}}));this.put("customZoom",new Action(mxResources.get("custom")+"...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.editorUi,parseInt(100*b.getView().getScale()),mxResources.get("apply"),mxUtils.bind(this,function(a){a=parseInt(a);!isNaN(a)&&0<a&&b.zoomTo(a/100)}),mxResources.get("zoom")+" (%)");this.editorUi.showDialog(a.container,
300,80,!0,!0);a.init()}),null,null,Editor.ctrlKey+"+0"));this.addAction("pageScale...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.editorUi,parseInt(100*b.pageScale),mxResources.get("apply"),mxUtils.bind(this,function(a){a=parseInt(a);!isNaN(a)&&0<a&&(a=new ChangePageSetup(c,null,null,null,a/100),a.ignoreColor=!0,a.ignoreImage=!0,b.model.execute(a))}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(a.container,300,80,!0,!0);a.init()}));var e=null,e=this.addAction("grid",
function(){b.setGridEnabled(!b.isGridEnabled());c.fireEvent(new mxEventObject("gridEnabledChanged"))},null,null,Editor.ctrlKey+"+Shift+G");e.setToggleAction(!0);e.setSelectedCallback(function(){return b.isGridEnabled()});e.setEnabled(!1);e=this.addAction("guides",function(){b.graphHandler.guidesEnabled=!b.graphHandler.guidesEnabled;c.fireEvent(new mxEventObject("guidesEnabledChanged"))});e.setToggleAction(!0);e.setSelectedCallback(function(){return b.graphHandler.guidesEnabled});e.setEnabled(!1);
-e=this.addAction("tooltips",function(){b.tooltipHandler.setEnabled(!b.tooltipHandler.isEnabled())});e.setToggleAction(!0);e.setSelectedCallback(function(){return b.tooltipHandler.isEnabled()});e=this.addAction("collapseExpand",function(){var a=new ChangePageSetup(c);a.ignoreColor=!0;a.ignoreImage=!0;a.foldingEnabled=!b.foldingEnabled;b.model.execute(a)});e.setToggleAction(!0);e.setSelectedCallback(function(){return b.foldingEnabled});e.isEnabled=g;e=this.addAction("scrollbars",function(){c.setScrollbars(!c.hasScrollbars())});
+e=this.addAction("tooltips",function(){b.tooltipHandler.setEnabled(!b.tooltipHandler.isEnabled())});e.setToggleAction(!0);e.setSelectedCallback(function(){return b.tooltipHandler.isEnabled()});e=this.addAction("collapseExpand",function(){var a=new ChangePageSetup(c);a.ignoreColor=!0;a.ignoreImage=!0;a.foldingEnabled=!b.foldingEnabled;b.model.execute(a)});e.setToggleAction(!0);e.setSelectedCallback(function(){return b.foldingEnabled});e.isEnabled=f;e=this.addAction("scrollbars",function(){c.setScrollbars(!c.hasScrollbars())});
e.setToggleAction(!0);e.setSelectedCallback(function(){return b.scrollbars});e=this.addAction("pageView",mxUtils.bind(this,function(){c.setPageVisible(!b.pageVisible)}));e.setToggleAction(!0);e.setSelectedCallback(function(){return b.pageVisible});e=this.addAction("connectionArrows",function(){b.connectionArrowsEnabled=!b.connectionArrowsEnabled;c.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,null,"Alt+Shift+A");e.setToggleAction(!0);e.setSelectedCallback(function(){return b.connectionArrowsEnabled});
e=this.addAction("connectionPoints",function(){b.setConnectable(!b.connectionHandler.isEnabled());c.fireEvent(new mxEventObject("connectionPointsChanged"))},null,null,"Alt+Shift+P");e.setToggleAction(!0);e.setSelectedCallback(function(){return b.connectionHandler.isEnabled()});e=this.addAction("copyConnect",function(){b.connectionHandler.setCreateTarget(!b.connectionHandler.isCreateTarget());c.fireEvent(new mxEventObject("copyConnectChanged"))});e.setToggleAction(!0);e.setSelectedCallback(function(){return b.connectionHandler.isCreateTarget()});
-e.isEnabled=g;e=this.addAction("autosave",function(){c.editor.setAutosave(!c.editor.autosave)});e.setToggleAction(!0);e.setSelectedCallback(function(){return c.editor.autosave});e.isEnabled=g;e.visible=!1;this.addAction("help",function(){var a="";mxResources.isLanguageSupported(mxClient.language)&&(a="_"+mxClient.language);b.openLink(RESOURCES_PATH+"/help"+a+".html")});var h=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){h||(c.showDialog((new AboutDialog(c)).container,
+e.isEnabled=f;e=this.addAction("autosave",function(){c.editor.setAutosave(!c.editor.autosave)});e.setToggleAction(!0);e.setSelectedCallback(function(){return c.editor.autosave});e.isEnabled=f;e.visible=!1;this.addAction("help",function(){var a="";mxResources.isLanguageSupported(mxClient.language)&&(a="_"+mxClient.language);b.openLink(RESOURCES_PATH+"/help"+a+".html")});var h=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){h||(c.showDialog((new AboutDialog(c)).container,
320,280,!0,!0,function(){h=!1}),h=!0)}));e=mxUtils.bind(this,function(a,c,d,e){return this.addAction(a,function(){if(null!=d&&b.cellEditor.isContentEditing())d();else{b.stopEditing(!1);b.getModel().beginUpdate();try{var a=b.getSelectionCells();b.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,c,a);(c&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD?b.updateLabelElements(b.getSelectionCells(),function(a){a.style.fontWeight=null;"B"==a.nodeName&&b.replaceElement(a)}):(c&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?
b.updateLabelElements(b.getSelectionCells(),function(a){a.style.fontStyle=null;"I"==a.nodeName&&b.replaceElement(a)}):(c&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&b.updateLabelElements(b.getSelectionCells(),function(a){a.style.textDecoration=null;"U"==a.nodeName&&b.replaceElement(a)});for(var e=0;e<a.length;e++)0==b.model.getChildCount(a[e])&&b.autoSizeCell(a[e],!1)}finally{b.getModel().endUpdate()}}},null,null,e)});e("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",
!1,null)},Editor.ctrlKey+"+B");e("italic",mxConstants.FONT_ITALIC,function(){document.execCommand("italic",!1,null)},Editor.ctrlKey+"+I");e("underline",mxConstants.FONT_UNDERLINE,function(){document.execCommand("underline",!1,null)},Editor.ctrlKey+"+U");this.addAction("fontColor...",function(){c.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000")});this.addAction("strokeColor...",function(){c.menus.pickColor(mxConstants.STYLE_STROKECOLOR)});this.addAction("fillColor...",function(){c.menus.pickColor(mxConstants.STYLE_FILLCOLOR)});
@@ -3269,21 +3270,21 @@ b.getSelectionCells()))}finally{b.getModel().endUpdate()}});this.addAction("shar
e);b.setCellStyles(mxConstants.STYLE_CURVED,null);c.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[e,"0"],"cells",b.getSelectionCells()))}finally{b.getModel().endUpdate()}}});this.addAction("curved",function(){b.getModel().beginUpdate();try{b.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),b.setCellStyles(mxConstants.STYLE_CURVED,"1"),c.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],
"values",["0","1"],"cells",b.getSelectionCells()))}finally{b.getModel().endUpdate()}});this.addAction("collapsible",function(){var a=b.view.getState(b.getSelectionCell()),d="1";null!=a&&null!=b.getFoldingImage(a)&&(d="0");b.setCellStyles("collapsible",d);c.fireEvent(new mxEventObject("styleChanged","keys",["collapsible"],"values",[d],"cells",b.getSelectionCells()))});this.addAction("editStyle...",mxUtils.bind(this,function(){var a=b.getSelectionCells();if(null!=a&&0<a.length){var c=b.getModel(),c=
new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",c.getStyle(a[0])||"",function(c){null!=c&&b.setCellStyle(mxUtils.trim(c),a)},null,null,400,220);this.editorUi.showDialog(c.container,420,300,!0,!0);c.init()}}),null,null,Editor.ctrlKey+"+E");this.addAction("setAsDefaultStyle",function(){b.isEnabled()&&!b.isSelectionEmpty()&&c.setDefaultStyle(b.getSelectionCell())},null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function(){b.isEnabled()&&c.clearDefaultStyle()},
-null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var a=b.getSelectionCell();if(null!=a&&b.getModel().isEdge(a)){var c=d.graph.selectionCellsHandler.getHandler(a);if(c instanceof mxEdgeHandler){for(var e=b.view.translate,g=b.view.scale,h=e.x,e=e.y,a=b.getModel().getParent(a),p=b.getCellGeometry(a);b.getModel().isVertex(a)&&null!=p;)h+=p.x,e+=p.y,a=b.getModel().getParent(a),p=b.getCellGeometry(a);h=Math.round(b.snap(b.popupMenuHandler.triggerX/g-h));g=Math.round(b.snap(b.popupMenuHandler.triggerY/
-g-e));c.addPointAt(c.state,h,g)}}});this.addAction("removeWaypoint",function(){var a=c.actions.get("removeWaypoint");null!=a.handler&&a.handler.removePoint(a.handler.state,a.index)});this.addAction("clearWaypoints",function(){var a=b.getSelectionCells();if(null!=a){a=b.addAllEdges(a);b.getModel().beginUpdate();try{for(var c=0;c<a.length;c++){var d=a[c];if(b.getModel().isEdge(d)){var e=b.getCellGeometry(d);null!=e&&(e=e.clone(),e.points=null,b.getModel().setGeometry(d,e))}}}finally{b.getModel().endUpdate()}}},
+null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var a=b.getSelectionCell();if(null!=a&&b.getModel().isEdge(a)){var c=d.graph.selectionCellsHandler.getHandler(a);if(c instanceof mxEdgeHandler){for(var e=b.view.translate,f=b.view.scale,h=e.x,e=e.y,a=b.getModel().getParent(a),p=b.getCellGeometry(a);b.getModel().isVertex(a)&&null!=p;)h+=p.x,e+=p.y,a=b.getModel().getParent(a),p=b.getCellGeometry(a);h=Math.round(b.snap(b.popupMenuHandler.triggerX/f-h));f=Math.round(b.snap(b.popupMenuHandler.triggerY/
+f-e));c.addPointAt(c.state,h,f)}}});this.addAction("removeWaypoint",function(){var a=c.actions.get("removeWaypoint");null!=a.handler&&a.handler.removePoint(a.handler.state,a.index)});this.addAction("clearWaypoints",function(){var a=b.getSelectionCells();if(null!=a){a=b.addAllEdges(a);b.getModel().beginUpdate();try{for(var c=0;c<a.length;c++){var d=a[c];if(b.getModel().isEdge(d)){var e=b.getCellGeometry(d);null!=e&&(e=e.clone(),e.points=null,b.getModel().setGeometry(d,e))}}}finally{b.getModel().endUpdate()}}},
null,null,"Alt+Shift+C");e=this.addAction("subscript",mxUtils.bind(this,function(){b.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");e=this.addAction("superscript",mxUtils.bind(this,function(){b.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");e=this.addAction("indent",mxUtils.bind(this,function(){b.cellEditor.isContentEditing()&&document.execCommand("indent",!1,null)}),null,null,"Shift+Tab");
-this.addAction("image...",function(){if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){var a=mxResources.get("image")+" ("+mxResources.get("url")+"):",d=b.getView().getState(b.getSelectionCell()),e="";null!=d&&(e=d.style[mxConstants.STYLE_IMAGE]||e);var g=b.cellEditor.saveSelection();c.showImageDialog(a,e,function(a,c,d){if(b.cellEditor.isContentEditing())b.cellEditor.restoreSelection(g),b.insertImage(a,c,d);else{var e=b.getSelectionCells();if(null!=a&&(0<a.length||0<e.length)){var f=null;
-b.getModel().beginUpdate();try{if(0==e.length){var h=b.getFreeInsertPoint(),f=e=[b.insertVertex(b.getDefaultParent(),null,"",h.x,h.y,c,d,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];b.fireEvent(new mxEventObject("cellsInserted","cells",f))}b.setCellStyles(mxConstants.STYLE_IMAGE,0<a.length?a:null,e);var k=b.getCurrentCellStyle(e[0]);"image"!=k[mxConstants.STYLE_SHAPE]&&"label"!=k[mxConstants.STYLE_SHAPE]?b.setCellStyles(mxConstants.STYLE_SHAPE,"image",
-e):0==a.length&&b.setCellStyles(mxConstants.STYLE_SHAPE,null,e);if(1==b.getSelectionCount()&&null!=c&&null!=d){var l=e[0],m=b.getModel().getGeometry(l);null!=m&&(m=m.clone(),m.width=c,m.height=d,b.getModel().setGeometry(l,m))}}finally{b.getModel().endUpdate()}null!=f&&(b.setSelectionCells(f),b.scrollCellToVisible(f[0]))}}},b.cellEditor.isContentEditing(),!b.cellEditor.isContentEditing())}}).isEnabled=g;e=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=
+this.addAction("image...",function(){if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){var a=mxResources.get("image")+" ("+mxResources.get("url")+"):",d=b.getView().getState(b.getSelectionCell()),e="";null!=d&&(e=d.style[mxConstants.STYLE_IMAGE]||e);var f=b.cellEditor.saveSelection();c.showImageDialog(a,e,function(a,c,d){if(b.cellEditor.isContentEditing())b.cellEditor.restoreSelection(f),b.insertImage(a,c,d);else{var e=b.getSelectionCells();if(null!=a&&(0<a.length||0<e.length)){var g=null;
+b.getModel().beginUpdate();try{if(0==e.length){var h=b.getFreeInsertPoint(),g=e=[b.insertVertex(b.getDefaultParent(),null,"",h.x,h.y,c,d,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];b.fireEvent(new mxEventObject("cellsInserted","cells",g))}b.setCellStyles(mxConstants.STYLE_IMAGE,0<a.length?a:null,e);var k=b.getCurrentCellStyle(e[0]);"image"!=k[mxConstants.STYLE_SHAPE]&&"label"!=k[mxConstants.STYLE_SHAPE]?b.setCellStyles(mxConstants.STYLE_SHAPE,"image",
+e):0==a.length&&b.setCellStyles(mxConstants.STYLE_SHAPE,null,e);if(1==b.getSelectionCount()&&null!=c&&null!=d){var l=e[0],m=b.getModel().getGeometry(l);null!=m&&(m=m.clone(),m.width=c,m.height=d,b.getModel().setGeometry(l,m))}}finally{b.getModel().endUpdate()}null!=g&&(b.setSelectionCells(g),b.scrollCellToVisible(g[0]))}}},b.cellEditor.isContentEditing(),!b.cellEditor.isContentEditing())}}).isEnabled=f;e=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=
new LayersWindow(c,document.body.offsetWidth-280,120,220,196),this.layersWindow.window.addListener("show",function(){c.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.addListener("hide",function(){c.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),c.fireEvent(new mxEventObject("layers")),this.layersWindow.init()):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+L");e.setToggleAction(!0);
e.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));e=this.addAction("formatPanel",mxUtils.bind(this,function(){c.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");e.setToggleAction(!0);e.setSelectedCallback(mxUtils.bind(this,function(){return 0<c.formatWidth}));e=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(c,document.body.offsetWidth-260,100,180,
180),this.outlineWindow.window.addListener("show",function(){c.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.addListener("hide",function(){c.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.setVisible(!0),c.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+O");e.setToggleAction(!0);e.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&
-this.outlineWindow.window.isVisible()}))};Actions.prototype.addAction=function(a,c,d,b,g){var e;"..."==a.substring(a.length-3)?(a=a.substring(0,a.length-3),e=mxResources.get(a)+"..."):e=mxResources.get(a);return this.put(a,new Action(e,c,d,b,g))};Actions.prototype.put=function(a,c){return this.actions[a]=c};Actions.prototype.get=function(a){return this.actions[a]};
-function Action(a,c,d,b,g){mxEventSource.call(this);this.label=a;this.funct=this.createFunction(c);this.enabled=null!=d?d:!0;this.iconCls=b;this.shortcut=g;this.visible=!0}mxUtils.extend(Action,mxEventSource);Action.prototype.createFunction=function(a){return a};Action.prototype.setEnabled=function(a){this.enabled!=a&&(this.enabled=a,this.fireEvent(new mxEventObject("stateChanged")))};Action.prototype.isEnabled=function(){return this.enabled};
+this.outlineWindow.window.isVisible()}))};Actions.prototype.addAction=function(a,c,d,b,f){var e;"..."==a.substring(a.length-3)?(a=a.substring(0,a.length-3),e=mxResources.get(a)+"..."):e=mxResources.get(a);return this.put(a,new Action(e,c,d,b,f))};Actions.prototype.put=function(a,c){return this.actions[a]=c};Actions.prototype.get=function(a){return this.actions[a]};
+function Action(a,c,d,b,f){mxEventSource.call(this);this.label=a;this.funct=this.createFunction(c);this.enabled=null!=d?d:!0;this.iconCls=b;this.shortcut=f;this.visible=!0}mxUtils.extend(Action,mxEventSource);Action.prototype.createFunction=function(a){return a};Action.prototype.setEnabled=function(a){this.enabled!=a&&(this.enabled=a,this.fireEvent(new mxEventObject("stateChanged")))};Action.prototype.isEnabled=function(){return this.enabled};
Action.prototype.setToggleAction=function(a){this.toggleAction=a};Action.prototype.setSelectedCallback=function(a){this.selectedCallback=a};Action.prototype.isSelected=function(){return this.selectedCallback()};Menus=function(a){this.editorUi=a;this.menus={};this.init();mxClient.IS_SVG||((new Image).src=this.checkmarkImage)};Menus.prototype.defaultFont="Helvetica";Menus.prototype.defaultFontSize="12";Menus.prototype.defaultMenuItems="file edit view arrange extras help".split(" ");Menus.prototype.defaultFonts="Helvetica;Verdana;Times New Roman;Garamond;Comic Sans MS;Courier New;Georgia;Lucida Console;Tahoma".split(";");
Menus.prototype.init=function(){var a=this.editorUi.editor.graph,c=mxUtils.bind(a,a.isEnabled);this.customFonts=[];this.customFontSizes=[];this.put("fontFamily",new Menu(mxUtils.bind(this,function(c,b){for(var d=mxUtils.bind(this,function(d){this.styleChange(c,d,[mxConstants.STYLE_FONTFAMILY],[d],null,b,function(){document.execCommand("fontname",!1,d)},function(){a.updateLabelElements(a.getSelectionCells(),function(b){b.removeAttribute("face");b.style.fontFamily=null;"PRE"==b.nodeName&&a.replaceElement(b,
"div")})}).firstChild.nextSibling.style.fontFamily=d}),e=0;e<this.defaultFonts.length;e++)d(this.defaultFonts[e]);c.addSeparator(b);if(0<this.customFonts.length){for(e=0;e<this.customFonts.length;e++)d(this.customFonts[e]);c.addSeparator(b);c.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){this.customFonts=[];this.editorUi.fireEvent(new mxEventObject("customFontsChanged"))}),b);c.addSeparator(b)}this.promptChange(c,mxResources.get("custom")+"...","",mxConstants.DEFAULT_FONTFAMILY,
-mxConstants.STYLE_FONTFAMILY,b,!0,mxUtils.bind(this,function(a){0>mxUtils.indexOf(this.customFonts,a)&&(this.customFonts.push(a),this.editorUi.fireEvent(new mxEventObject("customFontsChanged")))}))})));this.put("formatBlock",new Menu(mxUtils.bind(this,function(c,b){function d(d,g){return c.addItem(d,null,mxUtils.bind(this,function(){null!=a.cellEditor.textarea&&(a.cellEditor.textarea.focus(),document.execCommand("formatBlock",!1,"<"+g+">"))}),b)}d(mxResources.get("normal"),"p");d("","h1").firstChild.nextSibling.innerHTML=
+mxConstants.STYLE_FONTFAMILY,b,!0,mxUtils.bind(this,function(a){0>mxUtils.indexOf(this.customFonts,a)&&(this.customFonts.push(a),this.editorUi.fireEvent(new mxEventObject("customFontsChanged")))}))})));this.put("formatBlock",new Menu(mxUtils.bind(this,function(c,b){function d(d,f){return c.addItem(d,null,mxUtils.bind(this,function(){null!=a.cellEditor.textarea&&(a.cellEditor.textarea.focus(),document.execCommand("formatBlock",!1,"<"+f+">"))}),b)}d(mxResources.get("normal"),"p");d("","h1").firstChild.nextSibling.innerHTML=
'<h1 style="margin:0px;">'+mxResources.get("heading")+" 1</h1>";d("","h2").firstChild.nextSibling.innerHTML='<h2 style="margin:0px;">'+mxResources.get("heading")+" 2</h2>";d("","h3").firstChild.nextSibling.innerHTML='<h3 style="margin:0px;">'+mxResources.get("heading")+" 3</h3>";d("","h4").firstChild.nextSibling.innerHTML='<h4 style="margin:0px;">'+mxResources.get("heading")+" 4</h4>";d("","h5").firstChild.nextSibling.innerHTML='<h5 style="margin:0px;">'+mxResources.get("heading")+" 5</h5>";d("",
"h6").firstChild.nextSibling.innerHTML='<h6 style="margin:0px;">'+mxResources.get("heading")+" 6</h6>";d("","pre").firstChild.nextSibling.innerHTML='<pre style="margin:0px;">'+mxResources.get("formatted")+"</pre>";d("","blockquote").firstChild.nextSibling.innerHTML='<blockquote style="margin-top:0px;margin-bottom:0px;">'+mxResources.get("blockquote")+"</blockquote>"})));this.put("fontSize",new Menu(mxUtils.bind(this,function(c,b){for(var d=[6,8,9,10,11,12,14,18,24,36,48,72],e=mxUtils.bind(this,function(d){this.styleChange(c,
d,[mxConstants.STYLE_FONTSIZE],[d],null,b,function(){if(null!=a.cellEditor.textarea){document.execCommand("fontSize",!1,"3");for(var b=a.cellEditor.textarea.getElementsByTagName("font"),c=0;c<b.length;c++)if("3"==b[c].getAttribute("size")){b[c].removeAttribute("size");b[c].style.fontSize=d+"px";break}}})}),h=0;h<d.length;h++)e(d[h]);c.addSeparator(b);if(0<this.customFontSizes.length){for(h=0;h<this.customFontSizes.length;h++)e(this.customFontSizes[h]);c.addSeparator(b);c.addItem(mxResources.get("reset"),
@@ -3300,34 +3301,34 @@ a.getDefaultParent();b.execute(c);a.getModel().isVertex(c)&&a.updateGroupBounds(
a,b);a.addSeparator(b);this.addSubmenu("navigation",a,b);this.addSubmenu("insert",a,b);this.addSubmenu("layout",a,b);this.addMenuItems(a,"- group ungroup removeFromGroup - clearWaypoints autosize".split(" "),b)}))).isEnabled=c;this.put("insert",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,["insertLink","insertImage"],b)})));this.put("view",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,(null!=this.editorUi.format?["formatPanel"]:[]).concat("outline layers - pageView pageScale - scrollbars tooltips - grid guides - connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),
b))})));this.put("viewPanels",new Menu(mxUtils.bind(this,function(a,b){null!=this.editorUi.format&&this.addMenuItems(a,["formatPanel"],b);this.addMenuItems(a,["outline","layers"],b)})));this.put("viewZoom",new Menu(mxUtils.bind(this,function(c,b){this.addMenuItems(c,["resetView","-"],b);for(var d=[.25,.5,.75,1,1.25,1.5,2,3,4],e=0;e<d.length;e++)(function(d){c.addItem(100*d+"%",null,function(){a.zoomTo(d)},b)})(d[e]);this.addMenuItems(c,"- fitWindow fitPageWidth fitPage fitTwoPages - customZoom".split(" "),
b)})));this.put("file",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,"new open - save saveAs - import export - pageSetup print".split(" "),b)})));this.put("edit",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,"undo redo - cut copy paste delete - duplicate - editData editTooltip editStyle - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));this.put("extras",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,
-["copyConnect","collapseExpand","-","editDiagram"])})));this.put("help",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,["help","-","about"])})))};Menus.prototype.put=function(a,c){return this.menus[a]=c};Menus.prototype.get=function(a){return this.menus[a]};Menus.prototype.addSubmenu=function(a,c,d,b){var g=this.get(a);null!=g&&(g=g.isEnabled(),c.showDisabled||g)&&(d=c.addItem(b||mxResources.get(a),null,null,d,null,g),this.addMenu(a,c,d))};
+["copyConnect","collapseExpand","-","editDiagram"])})));this.put("help",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,["help","-","about"])})))};Menus.prototype.put=function(a,c){return this.menus[a]=c};Menus.prototype.get=function(a){return this.menus[a]};Menus.prototype.addSubmenu=function(a,c,d,b){var f=this.get(a);null!=f&&(f=f.isEnabled(),c.showDisabled||f)&&(d=c.addItem(b||mxResources.get(a),null,null,d,null,f),this.addMenu(a,c,d))};
Menus.prototype.addMenu=function(a,c,d){var b=this.get(a);null!=b&&(c.showDisabled||b.isEnabled())&&this.get(a).execute(c,d)};
Menus.prototype.addInsertTableItem=function(a,c){function d(a,b){for(var c=["<table>"],d=0;d<a;d++){c.push("<tr>");for(var e=0;e<b;e++)c.push("<td><br></td>");c.push("</tr>")}c.push("</table>");return c.join("")}c=null!=c?c:mxUtils.bind(this,function(a,b,c){var e=this.editorUi.editor.graph;a=e.getParentByName(mxEvent.getSource(a),"TD");if(null!=a&&null!=e.cellEditor.textarea){e.getParentByName(a,"TR");var f=e.cellEditor.textarea.getElementsByTagName("table");a=[];for(var g=0;g<f.length;g++)a.push(f[g]);
-e.container.focus();e.pasteHtmlAtCaret(d(b,c));b=e.cellEditor.textarea.getElementsByTagName("table");if(b.length==a.length+1)for(g=b.length-1;0<=g;g--)if(0==g||b[g]!=a[g-1]){e.selectNode(b[g].rows[0].cells[0]);break}}});var b=this.editorUi.editor.graph,g=null,e=null,h=a.addItem("",null,mxUtils.bind(this,function(a){null!=e&&null!=g&&c(a,g.sectionRowIndex+1,e.cellIndex+1)})),f='<img src="'+mxClient.imageBasePath+'/transparent.gif" width="16" height="16"/>';h.firstChild.innerHTML="";var k=function(a,
-b){var c=document.createElement("table");c.setAttribute("border","1");c.style.borderCollapse="collapse";c.style.borderStyle="solid";mxClient.IS_QUIRKS||c.setAttribute("cellPadding","8");for(var d=0;d<a;d++)for(var e=c.insertRow(d),g=0;g<b;g++){var h=e.insertCell(-1);mxClient.IS_QUIRKS&&(h.innerHTML=f)}return c}(5,5);h.firstChild.appendChild(k);var l=document.createElement("div");l.style.padding="4px";l.style.fontSize=Menus.prototype.defaultFontSize+"px";l.innerHTML="1x1";h.firstChild.appendChild(l);
-mxEvent.addListener(k,"mouseover",function(a){e=b.getParentByName(mxEvent.getSource(a),"TD");if(null!=e){g=b.getParentByName(e,"TR");for(var c=Math.min(20,g.sectionRowIndex+2),d=Math.min(20,e.cellIndex+2),h=k.rows.length;h<c;h++)for(var m=k.insertRow(h),v=0;v<k.rows[0].cells.length;v++){var r=m.insertCell(-1);mxClient.IS_QUIRKS&&(r.innerHTML=f)}for(h=0;h<k.rows.length;h++)for(m=k.rows[h],v=m.cells.length;v<d;v++)r=m.insertCell(-1),mxClient.IS_QUIRKS&&(r.innerHTML=f);l.innerHTML=e.cellIndex+1+"x"+
-(g.sectionRowIndex+1);for(c=0;c<k.rows.length;c++)for(d=k.rows[c],h=0;h<d.cells.length;h++)d.cells[h].style.backgroundColor=c<=g.sectionRowIndex&&h<=e.cellIndex?"blue":"transparent";mxEvent.consume(a)}})};
-Menus.prototype.edgeStyleChange=function(a,c,d,b,g,e,h){return a.addItem(c,null,mxUtils.bind(this,function(){var a=this.editorUi.editor.graph;a.stopEditing(!1);a.getModel().beginUpdate();try{for(var c=a.getSelectionCells(),e=[],g=0;g<c.length;g++){var n=c[g];if(a.getModel().isEdge(n)){if(h){var p=a.getCellGeometry(n);null!=p&&(p=p.clone(),p.points=null,a.getModel().setGeometry(n,p))}for(var q=0;q<d.length;q++)a.setCellStyles(d[q],b[q],[n]);e.push(n)}}this.editorUi.fireEvent(new mxEventObject("styleChanged",
-"keys",d,"values",b,"cells",e))}finally{a.getModel().endUpdate()}}),e,g)};Menus.prototype.styleChange=function(a,c,d,b,g,e,h,f){var k=this.createStyleChangeFunction(d,b);return a.addItem(c,null,mxUtils.bind(this,function(){var a=this.editorUi.editor.graph;null!=h&&a.cellEditor.isContentEditing()?h():k(f)}),e,g)};
-Menus.prototype.createStyleChangeFunction=function(a,c){return mxUtils.bind(this,function(d){var b=this.editorUi.editor.graph;b.stopEditing(!1);b.getModel().beginUpdate();try{for(var g=b.getSelectionCells(),e=0;e<a.length;e++)if(b.setCellStyles(a[e],c[e],g),a[e]==mxConstants.STYLE_ALIGN&&b.updateLabelElements(g,function(a){a.removeAttribute("align");a.style.textAlign=null}),a[e]==mxConstants.STYLE_FONTFAMILY)for(e=0;e<g.length;e++)0==b.model.getChildCount(g[e])&&b.autoSizeCell(g[e],!1);null!=d&&d();
-this.editorUi.fireEvent(new mxEventObject("styleChanged","keys",a,"values",c,"cells",g))}finally{b.getModel().endUpdate()}})};
-Menus.prototype.promptChange=function(a,c,d,b,g,e,h,f,k){return a.addItem(c,null,mxUtils.bind(this,function(){var a=this.editorUi.editor.graph,c=b,e=a.getView().getState(a.getSelectionCell());null!=e&&(c=e.style[g]||c);c=new FilenameDialog(this.editorUi,c,mxResources.get("apply"),mxUtils.bind(this,function(b){if(null!=b&&0<b.length){a.getModel().beginUpdate();try{a.stopEditing(!1),a.setCellStyles(g,b)}finally{a.getModel().endUpdate()}null!=f&&f(b)}}),mxResources.get("enterValue")+(0<d.length?" "+
+e.container.focus();e.pasteHtmlAtCaret(d(b,c));b=e.cellEditor.textarea.getElementsByTagName("table");if(b.length==a.length+1)for(g=b.length-1;0<=g;g--)if(0==g||b[g]!=a[g-1]){e.selectNode(b[g].rows[0].cells[0]);break}}});var b=this.editorUi.editor.graph,f=null,e=null,h=a.addItem("",null,mxUtils.bind(this,function(a){null!=e&&null!=f&&c(a,f.sectionRowIndex+1,e.cellIndex+1)})),g='<img src="'+mxClient.imageBasePath+'/transparent.gif" width="16" height="16"/>';h.firstChild.innerHTML="";var k=function(a,
+b){var c=document.createElement("table");c.setAttribute("border","1");c.style.borderCollapse="collapse";c.style.borderStyle="solid";mxClient.IS_QUIRKS||c.setAttribute("cellPadding","8");for(var d=0;d<a;d++)for(var e=c.insertRow(d),f=0;f<b;f++){var h=e.insertCell(-1);mxClient.IS_QUIRKS&&(h.innerHTML=g)}return c}(5,5);h.firstChild.appendChild(k);var l=document.createElement("div");l.style.padding="4px";l.style.fontSize=Menus.prototype.defaultFontSize+"px";l.innerHTML="1x1";h.firstChild.appendChild(l);
+mxEvent.addListener(k,"mouseover",function(a){e=b.getParentByName(mxEvent.getSource(a),"TD");if(null!=e){f=b.getParentByName(e,"TR");for(var c=Math.min(20,f.sectionRowIndex+2),d=Math.min(20,e.cellIndex+2),h=k.rows.length;h<c;h++)for(var m=k.insertRow(h),v=0;v<k.rows[0].cells.length;v++){var r=m.insertCell(-1);mxClient.IS_QUIRKS&&(r.innerHTML=g)}for(h=0;h<k.rows.length;h++)for(m=k.rows[h],v=m.cells.length;v<d;v++)r=m.insertCell(-1),mxClient.IS_QUIRKS&&(r.innerHTML=g);l.innerHTML=e.cellIndex+1+"x"+
+(f.sectionRowIndex+1);for(c=0;c<k.rows.length;c++)for(d=k.rows[c],h=0;h<d.cells.length;h++)d.cells[h].style.backgroundColor=c<=f.sectionRowIndex&&h<=e.cellIndex?"blue":"transparent";mxEvent.consume(a)}})};
+Menus.prototype.edgeStyleChange=function(a,c,d,b,f,e,h){return a.addItem(c,null,mxUtils.bind(this,function(){var a=this.editorUi.editor.graph;a.stopEditing(!1);a.getModel().beginUpdate();try{for(var c=a.getSelectionCells(),e=[],f=0;f<c.length;f++){var n=c[f];if(a.getModel().isEdge(n)){if(h){var p=a.getCellGeometry(n);null!=p&&(p=p.clone(),p.points=null,a.getModel().setGeometry(n,p))}for(var q=0;q<d.length;q++)a.setCellStyles(d[q],b[q],[n]);e.push(n)}}this.editorUi.fireEvent(new mxEventObject("styleChanged",
+"keys",d,"values",b,"cells",e))}finally{a.getModel().endUpdate()}}),e,f)};Menus.prototype.styleChange=function(a,c,d,b,f,e,h,g){var k=this.createStyleChangeFunction(d,b);return a.addItem(c,null,mxUtils.bind(this,function(){var a=this.editorUi.editor.graph;null!=h&&a.cellEditor.isContentEditing()?h():k(g)}),e,f)};
+Menus.prototype.createStyleChangeFunction=function(a,c){return mxUtils.bind(this,function(d){var b=this.editorUi.editor.graph;b.stopEditing(!1);b.getModel().beginUpdate();try{for(var f=b.getSelectionCells(),e=0;e<a.length;e++)if(b.setCellStyles(a[e],c[e],f),a[e]==mxConstants.STYLE_ALIGN&&b.updateLabelElements(f,function(a){a.removeAttribute("align");a.style.textAlign=null}),a[e]==mxConstants.STYLE_FONTFAMILY)for(e=0;e<f.length;e++)0==b.model.getChildCount(f[e])&&b.autoSizeCell(f[e],!1);null!=d&&d();
+this.editorUi.fireEvent(new mxEventObject("styleChanged","keys",a,"values",c,"cells",f))}finally{b.getModel().endUpdate()}})};
+Menus.prototype.promptChange=function(a,c,d,b,f,e,h,g,k){return a.addItem(c,null,mxUtils.bind(this,function(){var a=this.editorUi.editor.graph,c=b,e=a.getView().getState(a.getSelectionCell());null!=e&&(c=e.style[f]||c);c=new FilenameDialog(this.editorUi,c,mxResources.get("apply"),mxUtils.bind(this,function(b){if(null!=b&&0<b.length){a.getModel().beginUpdate();try{a.stopEditing(!1),a.setCellStyles(f,b)}finally{a.getModel().endUpdate()}null!=g&&g(b)}}),mxResources.get("enterValue")+(0<d.length?" "+
d:""));this.editorUi.showDialog(c.container,300,80,!0,!0);c.init()}),e,k,h)};
-Menus.prototype.pickColor=function(a,c,d){var b=this.editorUi.editor.graph,g=226+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12));if(null!=c&&b.cellEditor.isContentEditing()){var e=b.cellEditor.saveSelection();a=new ColorDialog(this.editorUi,d||"000000",mxUtils.bind(this,function(a){b.cellEditor.restoreSelection(e);document.execCommand(c,!1,a!=mxConstants.NONE?a:"transparent")}),function(){b.cellEditor.restoreSelection(e)});this.editorUi.showDialog(a.container,
-230,g,!0,!0);a.init()}else{null==this.colorDialog&&(this.colorDialog=new ColorDialog(this.editorUi));this.colorDialog.currentColorKey=a;d=b.getView().getState(b.getSelectionCell());var h="none";null!=d&&(h=d.style[a]||h);"none"==h?(h="ffffff",this.colorDialog.picker.fromString("ffffff"),this.colorDialog.colorInput.value="none"):this.colorDialog.picker.fromString(h);this.editorUi.showDialog(this.colorDialog.container,230,g,!0,!0);this.colorDialog.init()}};
+Menus.prototype.pickColor=function(a,c,d){var b=this.editorUi.editor.graph,f=226+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12));if(null!=c&&b.cellEditor.isContentEditing()){var e=b.cellEditor.saveSelection();a=new ColorDialog(this.editorUi,d||"000000",mxUtils.bind(this,function(a){b.cellEditor.restoreSelection(e);document.execCommand(c,!1,a!=mxConstants.NONE?a:"transparent")}),function(){b.cellEditor.restoreSelection(e)});this.editorUi.showDialog(a.container,
+230,f,!0,!0);a.init()}else{null==this.colorDialog&&(this.colorDialog=new ColorDialog(this.editorUi));this.colorDialog.currentColorKey=a;d=b.getView().getState(b.getSelectionCell());var h="none";null!=d&&(h=d.style[a]||h);"none"==h?(h="ffffff",this.colorDialog.picker.fromString("ffffff"),this.colorDialog.colorInput.value="none"):this.colorDialog.picker.fromString(h);this.editorUi.showDialog(this.colorDialog.container,230,f,!0,!0);this.colorDialog.init()}};
Menus.prototype.toggleStyle=function(a,c){var d=this.editorUi.editor.graph,b=d.toggleCellStyles(a,c);this.editorUi.fireEvent(new mxEventObject("styleChanged","keys",[a],"values",[b],"cells",d.getSelectionCells()))};
-Menus.prototype.addMenuItem=function(a,c,d,b,g,e){var h=this.editorUi.actions.get(c);return null!=h&&(a.showDisabled||h.isEnabled())&&h.visible?(c=a.addItem(e||h.label,null,function(){h.funct(b)},d,g,h.isEnabled()),h.toggleAction&&h.isSelected()&&a.addCheckmark(c,Editor.checkmarkImage),this.addShortcut(c,h),c):null};
-Menus.prototype.addShortcut=function(a,c){if(null!=c.shortcut){var d=a.firstChild.nextSibling.nextSibling,b=document.createElement("span");b.style.color="gray";mxUtils.write(b,c.shortcut);d.appendChild(b)}};Menus.prototype.addMenuItems=function(a,c,d,b,g){for(var e=0;e<c.length;e++)"-"==c[e]?a.addSeparator(d):this.addMenuItem(a,c[e],d,b,null!=g?g[e]:null)};
+Menus.prototype.addMenuItem=function(a,c,d,b,f,e){var h=this.editorUi.actions.get(c);return null!=h&&(a.showDisabled||h.isEnabled())&&h.visible?(c=a.addItem(e||h.label,null,function(){h.funct(b)},d,f,h.isEnabled()),h.toggleAction&&h.isSelected()&&a.addCheckmark(c,Editor.checkmarkImage),this.addShortcut(c,h),c):null};
+Menus.prototype.addShortcut=function(a,c){if(null!=c.shortcut){var d=a.firstChild.nextSibling.nextSibling,b=document.createElement("span");b.style.color="gray";mxUtils.write(b,c.shortcut);d.appendChild(b)}};Menus.prototype.addMenuItems=function(a,c,d,b,f){for(var e=0;e<c.length;e++)"-"==c[e]?a.addSeparator(d):this.addMenuItem(a,c[e],d,b,null!=f?f[e]:null)};
Menus.prototype.createPopupMenu=function(a,c,d){a.smartSeparators=!0;this.addPopupMenuHistoryItems(a,c,d);this.addPopupMenuEditItems(a,c,d);this.addPopupMenuStyleItems(a,c,d);this.addPopupMenuArrangeItems(a,c,d);this.addPopupMenuCellItems(a,c,d);this.addPopupMenuSelectionItems(a,c,d)};Menus.prototype.addPopupMenuHistoryItems=function(a,c,d){this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(a,["undo","redo"],null,d)};
Menus.prototype.addPopupMenuEditItems=function(a,c,d){this.editorUi.editor.graph.isSelectionEmpty()?this.addMenuItems(a,["pasteHere"],null,d):this.addMenuItems(a,"delete - cut copy - duplicate".split(" "),null,d)};Menus.prototype.addPopupMenuStyleItems=function(a,c,d){1==this.editorUi.editor.graph.getSelectionCount()?this.addMenuItems(a,["-","setAsDefaultStyle"],null,d):this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(a,["-","clearDefaultStyle"],null,d)};
Menus.prototype.addPopupMenuArrangeItems=function(a,c,d){var b=this.editorUi.editor.graph;b.isSelectionEmpty()||this.addMenuItems(a,["-","toFront","toBack"],null,d);1<b.getSelectionCount()?this.addMenuItems(a,["-","group"],null,d):1==b.getSelectionCount()&&!b.getModel().isEdge(c)&&!b.isSwimlane(c)&&0<b.getModel().getChildCount(c)&&this.addMenuItems(a,["-","ungroup"],null,d)};
-Menus.prototype.addPopupMenuCellItems=function(a,c,d){var b=this.editorUi.editor.graph;c=b.getSelectionCell();var g=b.view.getState(c);a.addSeparator();if(null!=g){var e=!1;if(b.getModel().isEdge(c)&&"entityRelationEdgeStyle"!=mxUtils.getValue(g.style,mxConstants.STYLE_EDGE,null)&&"arrow"!=mxUtils.getValue(g.style,mxConstants.STYLE_SHAPE,null)){var e=b.selectionCellsHandler.getHandler(c),h=!1;if(e instanceof mxEdgeHandler&&null!=e.bends&&2<e.bends.length){var h=e.getHandleForEvent(b.updateMouseEvent(new mxMouseEvent(d))),
-f=this.editorUi.actions.get("removeWaypoint");f.handler=e;f.index=h;h=0<h&&h<e.bends.length-1}a.addSeparator();this.addMenuItem(a,"turn",null,d,null,mxResources.get("reverse"));this.addMenuItems(a,[h?"removeWaypoint":"addWaypoint"],null,d);e=b.getModel().getGeometry(c);e=null!=e&&null!=e.points&&0<e.points.length}1==b.getSelectionCount()&&(e||b.getModel().isVertex(c)&&0<b.getModel().getEdgeCount(c))&&this.addMenuItems(a,["-","clearWaypoints"],null,d)}1==b.getSelectionCount()&&(this.addMenuItems(a,
-["-","editData","editLink"],null,d),b.getModel().isVertex(c)&&null!=mxUtils.getValue(g.style,mxConstants.STYLE_IMAGE,null)&&(a.addSeparator(),this.addMenuItem(a,"image",null,d).firstChild.nextSibling.innerHTML=mxResources.get("editImage")+"..."))};Menus.prototype.addPopupMenuSelectionItems=function(a,c,d){this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(a,["-","selectVertices","selectEdges","selectAll"],null,d)};
+Menus.prototype.addPopupMenuCellItems=function(a,c,d){var b=this.editorUi.editor.graph;c=b.getSelectionCell();var f=b.view.getState(c);a.addSeparator();if(null!=f){var e=!1;if(b.getModel().isEdge(c)&&"entityRelationEdgeStyle"!=mxUtils.getValue(f.style,mxConstants.STYLE_EDGE,null)&&"arrow"!=mxUtils.getValue(f.style,mxConstants.STYLE_SHAPE,null)){var e=b.selectionCellsHandler.getHandler(c),h=!1;if(e instanceof mxEdgeHandler&&null!=e.bends&&2<e.bends.length){var h=e.getHandleForEvent(b.updateMouseEvent(new mxMouseEvent(d))),
+g=this.editorUi.actions.get("removeWaypoint");g.handler=e;g.index=h;h=0<h&&h<e.bends.length-1}a.addSeparator();this.addMenuItem(a,"turn",null,d,null,mxResources.get("reverse"));this.addMenuItems(a,[h?"removeWaypoint":"addWaypoint"],null,d);e=b.getModel().getGeometry(c);e=null!=e&&null!=e.points&&0<e.points.length}1==b.getSelectionCount()&&(e||b.getModel().isVertex(c)&&0<b.getModel().getEdgeCount(c))&&this.addMenuItems(a,["-","clearWaypoints"],null,d)}1==b.getSelectionCount()&&(this.addMenuItems(a,
+["-","editData","editLink"],null,d),b.getModel().isVertex(c)&&null!=mxUtils.getValue(f.style,mxConstants.STYLE_IMAGE,null)&&(a.addSeparator(),this.addMenuItem(a,"image",null,d).firstChild.nextSibling.innerHTML=mxResources.get("editImage")+"..."))};Menus.prototype.addPopupMenuSelectionItems=function(a,c,d){this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(a,["-","selectVertices","selectEdges","selectAll"],null,d)};
Menus.prototype.createMenubar=function(a){for(var c=new Menubar(this.editorUi,a),d=this.defaultMenuItems,b=0;b<d.length;b++)mxUtils.bind(this,function(a){var e=c.addMenu(mxResources.get(d[b]),mxUtils.bind(this,function(){a.funct.apply(this,arguments)}));this.menuCreated(a,e)})(this.get(d[b]));return c};
Menus.prototype.menuCreated=function(a,c,d){null!=c&&(d=null!=d?d:"geItem",a.addListener("stateChanged",function(){(c.enabled=a.enabled)?(c.className=d,8==document.documentMode&&(c.style.color="")):(c.className=d+" mxDisabled",8==document.documentMode&&(c.style.color="#c3c3c3"))}))};function Menubar(a,c){this.editorUi=a;this.container=c}Menubar.prototype.hideMenu=function(){this.editorUi.hideCurrentMenu()};
Menubar.prototype.addMenu=function(a,c,d){var b=document.createElement("a");b.className="geItem";mxUtils.write(b,a);this.addMenuHandler(b,c);null!=d?this.container.insertBefore(b,d):this.container.appendChild(b);return b};
-Menubar.prototype.addMenuHandler=function(a,c){if(null!=c){var d=!0,b=mxUtils.bind(this,function(b){if(d&&null==a.enabled||a.enabled){this.editorUi.editor.graph.popupMenuHandler.hideMenu();var e=new mxPopupMenu(c);e.div.className+=" geMenubarMenu";e.smartSeparators=!0;e.showDisabled=!0;e.autoExpand=!0;e.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(e,arguments);this.editorUi.resetCurrentMenu();e.destroy()});var g=mxUtils.getOffset(a);e.popup(g.x,g.y+a.offsetHeight,null,
+Menubar.prototype.addMenuHandler=function(a,c){if(null!=c){var d=!0,b=mxUtils.bind(this,function(b){if(d&&null==a.enabled||a.enabled){this.editorUi.editor.graph.popupMenuHandler.hideMenu();var e=new mxPopupMenu(c);e.div.className+=" geMenubarMenu";e.smartSeparators=!0;e.showDisabled=!0;e.autoExpand=!0;e.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(e,arguments);this.editorUi.resetCurrentMenu();e.destroy()});var f=mxUtils.getOffset(a);e.popup(f.x,f.y+a.offsetHeight,null,
b);this.editorUi.setCurrentMenu(e,a)}mxEvent.consume(b)});mxEvent.addListener(a,"mousemove",mxUtils.bind(this,function(c){null!=this.editorUi.currentMenu&&this.editorUi.currentMenuElt!=a&&(this.editorUi.hideCurrentMenu(),b(c))}));mxEvent.addListener(a,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(b){d=this.currentElt!=a;b.preventDefault()}));mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){b(a);d=!0}))}};Menubar.prototype.destroy=function(){};
function Menu(a,c){mxEventSource.call(this);this.funct=a;this.enabled=null!=c?c:!0}mxUtils.extend(Menu,mxEventSource);Menu.prototype.isEnabled=function(){return this.enabled};Menu.prototype.setEnabled=function(a){this.enabled!=a&&(this.enabled=a,this.fireEvent(new mxEventObject("stateChanged")))};Menu.prototype.execute=function(a,c){this.funct(a,c)};EditorUi.prototype.createMenus=function(){return new Menus(this)};function Toolbar(a,c){this.editorUi=a;this.container=c;this.staticElements=[];this.init();this.gestureHandler=mxUtils.bind(this,function(a){null!=this.editorUi.currentMenu&&mxEvent.getSource(a)!=this.editorUi.currentMenu.div&&this.hideMenu()});mxEvent.addGestureListeners(document,this.gestureHandler)}
Toolbar.prototype.dropdownImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDQANAIABAHt7e////yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IE1hY2ludG9zaCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpCREM1NkJFMjE0NEMxMUU1ODk1Q0M5MjQ0MTA4QjNDMSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDpCREM1NkJFMzE0NEMxMUU1ODk1Q0M5MjQ0MTA4QjNDMSI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOkQzOUMzMjZCMTQ0QjExRTU4OTVDQzkyNDQxMDhCM0MxIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOkQzOUMzMjZDMTQ0QjExRTU4OTVDQzkyNDQxMDhCM0MxIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+Af/+/fz7+vn49/b19PPy8fDv7u3s6+rp6Ofm5eTj4uHg397d3Nva2djX1tXU09LR0M/OzczLysnIx8bFxMPCwcC/vr28u7q5uLe2tbSzsrGwr66trKuqqainpqWko6KhoJ+enZybmpmYl5aVlJOSkZCPjo2Mi4qJiIeGhYSDgoGAf359fHt6eXh3dnV0c3JxcG9ubWxramloZ2ZlZGNiYWBfXl1cW1pZWFdWVVRTUlFQT05NTEtKSUhHRkVEQ0JBQD8+PTw7Ojk4NzY1NDMyMTAvLi0sKyopKCcmJSQjIiEgHx4dHBsaGRgXFhUUExIREA8ODQwLCgkIBwYFBAMCAQAAIfkEAQAAAQAsAAAAAA0ADQAAAhGMj6nL3QAjVHIu6azbvPtWAAA7":IMAGE_PATH+
@@ -3343,11 +3344,11 @@ null,!0).setAttribute("title",mxResources.get("simple"));this.editorUi.menus.edg
null,null,null],"geIcon geSprite geSprite-horizontalisometric",null,!0).setAttribute("title",mxResources.get("isometric"));this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle","vertical",null,null],"geIcon geSprite geSprite-verticalisometric",null,!0).setAttribute("title",mxResources.get("isometric"));this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,
mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle","1",null],"geIcon geSprite geSprite-curved",null,!0).setAttribute("title",mxResources.get("curved"));this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["entityRelationEdgeStyle",null,null],"geIcon geSprite geSprite-entity",null,!0).setAttribute("title",mxResources.get("entityRelation"))})),this.addDropDownArrow(this.edgeStyleMenu,"geSprite-orthogonal",44,50,0,0,22,-4));this.addSeparator();
a=this.addMenu("",mxResources.get("insert")+" ("+mxResources.get("doubleClickTooltip")+")",!0,"insert",null,!0);this.addDropDownArrow(a,"geSprite-plus",38,48,-4,-3,36,-8);if("1"==urlParams.test){this.addSeparator();var b=this.addMenuFunction("geIcon geSprite geSprite-table",mxResources.get("table"),!1,mxUtils.bind(this,function(a){var c=this.editorUi.editor.graph,d=c.getSelectionCell();c.isTableCell(d)||c.isTableRow(d)||c.isTable(d)?(b=a.addItem("",null,mxUtils.bind(this,function(){try{c.insertTableColumn(d,
-!0)}catch(f){this.editorUi.handleError(f)}}),null,"geIcon geSprite geSprite-insertcolumnbefore"),b.setAttribute("title",mxResources.get("insertColumnBefore")),b=a.addItem("",null,mxUtils.bind(this,function(){try{c.insertTableColumn(d,!1)}catch(f){this.editorUi.handleError(f)}}),null,"geIcon geSprite geSprite-insertcolumnafter"),b.setAttribute("title",mxResources.get("insertColumnAfter")),b=a.addItem("Delete column",null,mxUtils.bind(this,function(){if(null!=d)try{c.deleteTableColumn(d)}catch(f){this.editorUi.handleError(f)}}),
-null,"geIcon geSprite geSprite-deletecolumn"),b.setAttribute("title",mxResources.get("deleteColumn")),b=a.addItem("",null,mxUtils.bind(this,function(){try{c.insertTableRow(d,!0)}catch(f){this.editorUi.handleError(f)}}),null,"geIcon geSprite geSprite-insertrowbefore"),b.setAttribute("title",mxResources.get("insertRowBefore")),b=a.addItem("",null,mxUtils.bind(this,function(){try{c.insertTableRow(d,!1)}catch(f){this.editorUi.handleError(f)}}),null,"geIcon geSprite geSprite-insertrowafter"),b.setAttribute("title",
-mxResources.get("insertRowAfter")),b=a.addItem("",null,mxUtils.bind(this,function(){try{c.deleteTableRow(d)}catch(f){this.editorUi.handleError(f)}}),null,"geIcon geSprite geSprite-deleterow"),b.setAttribute("title",mxResources.get("deleteRow"))):this.editorUi.menus.addInsertTableItem(a,mxUtils.bind(this,function(a,b,d){b=mxEvent.isShiftDown(a)?c.createCrossFunctionalSwimlane(b,d):c.createTable(b,d);a=mxEvent.isAltDown(a)?c.getFreeInsertPoint():c.getCenterInsertPoint(c.getBoundingBoxFromGeometry([b],
+!0)}catch(g){this.editorUi.handleError(g)}}),null,"geIcon geSprite geSprite-insertcolumnbefore"),b.setAttribute("title",mxResources.get("insertColumnBefore")),b=a.addItem("",null,mxUtils.bind(this,function(){try{c.insertTableColumn(d,!1)}catch(g){this.editorUi.handleError(g)}}),null,"geIcon geSprite geSprite-insertcolumnafter"),b.setAttribute("title",mxResources.get("insertColumnAfter")),b=a.addItem("Delete column",null,mxUtils.bind(this,function(){if(null!=d)try{c.deleteTableColumn(d)}catch(g){this.editorUi.handleError(g)}}),
+null,"geIcon geSprite geSprite-deletecolumn"),b.setAttribute("title",mxResources.get("deleteColumn")),b=a.addItem("",null,mxUtils.bind(this,function(){try{c.insertTableRow(d,!0)}catch(g){this.editorUi.handleError(g)}}),null,"geIcon geSprite geSprite-insertrowbefore"),b.setAttribute("title",mxResources.get("insertRowBefore")),b=a.addItem("",null,mxUtils.bind(this,function(){try{c.insertTableRow(d,!1)}catch(g){this.editorUi.handleError(g)}}),null,"geIcon geSprite geSprite-insertrowafter"),b.setAttribute("title",
+mxResources.get("insertRowAfter")),b=a.addItem("",null,mxUtils.bind(this,function(){try{c.deleteTableRow(d)}catch(g){this.editorUi.handleError(g)}}),null,"geIcon geSprite geSprite-deleterow"),b.setAttribute("title",mxResources.get("deleteRow"))):this.editorUi.menus.addInsertTableItem(a,mxUtils.bind(this,function(a,b,d){b=mxEvent.isShiftDown(a)?c.createCrossFunctionalSwimlane(b,d):c.createTable(b,d);a=mxEvent.isAltDown(a)?c.getFreeInsertPoint():c.getCenterInsertPoint(c.getBoundingBoxFromGeometry([b],
!0));a=c.importCells([b],a.x,a.y);null!=a&&0<a.length&&(c.scrollCellToVisible(a[0]),c.setSelectionCells(a))}))}));b.style.position="relative";b.style.whiteSpace="nowrap";b.style.overflow="hidden";b.innerHTML='<div class="geSprite geSprite-table" style="margin-left:-2px;"></div>'+this.dropdownImageHtml;b.style.width=mxClient.IS_QUIRKS?"50px":"30px";EditorUi.compactUi&&(b.getElementsByTagName("img")[0].style.left="22px",b.getElementsByTagName("img")[0].style.top="5px")}};
-Toolbar.prototype.addDropDownArrow=function(a,c,d,b,g,e,h,f){g=EditorUi.compactUi?g:f;a.style.whiteSpace="nowrap";a.style.overflow="hidden";a.style.position="relative";a.innerHTML='<div class="geSprite '+c+'" style="margin-left:'+g+"px;margin-top:"+e+'px;"></div>'+this.dropdownImageHtml;a.style.width=mxClient.IS_QUIRKS?b+"px":b-(null!=h?h:32)+"px";mxClient.IS_QUIRKS&&(a.style.height=EditorUi.compactUi?"24px":"26px");EditorUi.compactUi&&(a.getElementsByTagName("img")[0].style.left="24px",a.getElementsByTagName("img")[0].style.top=
+Toolbar.prototype.addDropDownArrow=function(a,c,d,b,f,e,h,g){f=EditorUi.compactUi?f:g;a.style.whiteSpace="nowrap";a.style.overflow="hidden";a.style.position="relative";a.innerHTML='<div class="geSprite '+c+'" style="margin-left:'+f+"px;margin-top:"+e+'px;"></div>'+this.dropdownImageHtml;a.style.width=mxClient.IS_QUIRKS?b+"px":b-(null!=h?h:32)+"px";mxClient.IS_QUIRKS&&(a.style.height=EditorUi.compactUi?"24px":"26px");EditorUi.compactUi&&(a.getElementsByTagName("img")[0].style.left="24px",a.getElementsByTagName("img")[0].style.top=
"5px",a.style.width=mxClient.IS_QUIRKS?d+"px":d-10+"px")};Toolbar.prototype.setFontName=function(a){null!=this.fontMenu&&(this.fontMenu.innerHTML='<div style="width:60px;overflow:hidden;display:inline-block;">'+mxUtils.htmlEntities(a)+"</div>"+this.dropdownImageHtml)};Toolbar.prototype.setFontSize=function(a){null!=this.sizeMenu&&(this.sizeMenu.innerHTML='<div style="width:24px;overflow:hidden;display:inline-block;">'+a+"</div>"+this.dropdownImageHtml)};
Toolbar.prototype.createTextToolbar=function(){var a=this.editorUi.editor.graph,c=this.addMenu("",mxResources.get("style"),!0,"formatBlock");c.style.position="relative";c.style.whiteSpace="nowrap";c.style.overflow="hidden";c.innerHTML=mxResources.get("style")+this.dropdownImageHtml;EditorUi.compactUi&&(c.style.paddingRight="18px",c.getElementsByTagName("img")[0].style.right="1px",c.getElementsByTagName("img")[0].style.top="5px");this.addSeparator();this.fontMenu=this.addMenu("",mxResources.get("fontFamily"),
!0,"fontFamily");this.fontMenu.style.position="relative";this.fontMenu.style.whiteSpace="nowrap";this.fontMenu.style.overflow="hidden";this.fontMenu.style.width=mxClient.IS_QUIRKS?"80px":"60px";this.setFontName(Menus.prototype.defaultFont);EditorUi.compactUi&&(this.fontMenu.style.paddingRight="18px",this.fontMenu.getElementsByTagName("img")[0].style.right="1px",this.fontMenu.getElementsByTagName("img")[0].style.top="5px");this.addSeparator();this.sizeMenu=this.addMenu(Menus.prototype.defaultFontSize,
@@ -3362,99 +3363,99 @@ d.setAttribute("title",mxResources.get("fontColor"));d=a.addItem("",null,this.ed
"hidden";c.innerHTML='<div class="geSprite geSprite-dots" style="margin-left:-2px;"></div>'+this.dropdownImageHtml;c.style.width=mxClient.IS_QUIRKS?"50px":"30px";EditorUi.compactUi&&(c.getElementsByTagName("img")[0].style.left="22px",c.getElementsByTagName("img")[0].style.top="5px");this.addSeparator();this.addButton("geIcon geSprite geSprite-code",mxResources.get("html"),function(){a.cellEditor.toggleViewMode();0<a.cellEditor.textarea.innerHTML.length&&("&nbsp;"!=a.cellEditor.textarea.innerHTML||
!a.cellEditor.clearOnChange)&&window.setTimeout(function(){document.execCommand("selectAll",!1,null)})});this.addSeparator();c=this.addMenuFunction("",mxResources.get("insert"),!0,mxUtils.bind(this,function(a){a.addItem(mxResources.get("insertLink"),null,mxUtils.bind(this,function(){this.editorUi.actions.get("link").funct()}));a.addItem(mxResources.get("insertImage"),null,mxUtils.bind(this,function(){this.editorUi.actions.get("image").funct()}));a.addItem(mxResources.get("insertHorizontalRule"),null,
mxUtils.bind(this,function(){document.execCommand("inserthorizontalrule",!1,null)}))}));c.style.whiteSpace="nowrap";c.style.overflow="hidden";c.style.position="relative";c.innerHTML='<div class="geSprite geSprite-plus" style="margin-left:-4px;margin-top:-3px;"></div>'+this.dropdownImageHtml;c.style.width=mxClient.IS_QUIRKS?"36px":"16px";EditorUi.compactUi&&(c.getElementsByTagName("img")[0].style.left="24px",c.getElementsByTagName("img")[0].style.top="5px",c.style.width=mxClient.IS_QUIRKS?"50px":"30px");
-this.addSeparator();var d=this.addMenuFunction("geIcon geSprite geSprite-table",mxResources.get("table"),!1,mxUtils.bind(this,function(b){var c=a.getSelectedElement(),d=a.getParentByNames(c,["TD","TH"],a.cellEditor.text2),h=a.getParentByName(c,"TR",a.cellEditor.text2);if(null==h)this.editorUi.menus.addInsertTableItem(b);else{var f=a.getParentByName(h,"TABLE",a.cellEditor.text2),c=b.addItem("",null,mxUtils.bind(this,function(){try{a.selectNode(a.insertColumn(f,null!=d?d.cellIndex:0))}catch(k){this.editorUi.handleError(k)}}),
-null,"geIcon geSprite geSprite-insertcolumnbefore");c.setAttribute("title",mxResources.get("insertColumnBefore"));c=b.addItem("",null,mxUtils.bind(this,function(){try{a.selectNode(a.insertColumn(f,null!=d?d.cellIndex+1:-1))}catch(k){this.editorUi.handleError(k)}}),null,"geIcon geSprite geSprite-insertcolumnafter");c.setAttribute("title",mxResources.get("insertColumnAfter"));c=b.addItem("Delete column",null,mxUtils.bind(this,function(){if(null!=d)try{a.deleteColumn(f,d.cellIndex)}catch(k){this.editorUi.handleError(k)}}),
-null,"geIcon geSprite geSprite-deletecolumn");c.setAttribute("title",mxResources.get("deleteColumn"));c=b.addItem("",null,mxUtils.bind(this,function(){try{a.selectNode(a.insertRow(f,h.sectionRowIndex))}catch(k){this.editorUi.handleError(k)}}),null,"geIcon geSprite geSprite-insertrowbefore");c.setAttribute("title",mxResources.get("insertRowBefore"));c=b.addItem("",null,mxUtils.bind(this,function(){try{a.selectNode(a.insertRow(f,h.sectionRowIndex+1))}catch(k){this.editorUi.handleError(k)}}),null,"geIcon geSprite geSprite-insertrowafter");
-c.setAttribute("title",mxResources.get("insertRowAfter"));c=b.addItem("",null,mxUtils.bind(this,function(){try{a.deleteRow(f,h.sectionRowIndex)}catch(k){this.editorUi.handleError(k)}}),null,"geIcon geSprite geSprite-deleterow");c.setAttribute("title",mxResources.get("deleteRow"));c=b.addItem("",null,mxUtils.bind(this,function(){var a=f.style.borderColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+
-("0"+Number(d).toString(16)).substr(-2)});this.editorUi.pickColor(a,function(a){null==a||a==mxConstants.NONE?(f.removeAttribute("border"),f.style.border="",f.style.borderCollapse=""):(f.setAttribute("border","1"),f.style.border="1px solid "+a,f.style.borderCollapse="collapse")})}),null,"geIcon geSprite geSprite-strokecolor");c.setAttribute("title",mxResources.get("borderColor"));c=b.addItem("",null,mxUtils.bind(this,function(){var a=f.style.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,
-function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)});this.editorUi.pickColor(a,function(a){f.style.backgroundColor=null==a||a==mxConstants.NONE?"":a})}),null,"geIcon geSprite geSprite-fillcolor");c.setAttribute("title",mxResources.get("backgroundColor"));c=b.addItem("",null,mxUtils.bind(this,function(){var a=f.getAttribute("cellPadding")||0,a=new FilenameDialog(this.editorUi,a,mxResources.get("apply"),
-mxUtils.bind(this,function(a){null!=a&&0<a.length?f.setAttribute("cellPadding",a):f.removeAttribute("cellPadding")}),mxResources.get("spacing"));this.editorUi.showDialog(a.container,300,80,!0,!0);a.init()}),null,"geIcon geSprite geSprite-fit");c.setAttribute("title",mxResources.get("spacing"));c=b.addItem("",null,mxUtils.bind(this,function(){f.setAttribute("align","left")}),null,"geIcon geSprite geSprite-left");c.setAttribute("title",mxResources.get("left"));c=b.addItem("",null,mxUtils.bind(this,
-function(){f.setAttribute("align","center")}),null,"geIcon geSprite geSprite-center");c.setAttribute("title",mxResources.get("center"));c=b.addItem("",null,mxUtils.bind(this,function(){f.setAttribute("align","right")}),null,"geIcon geSprite geSprite-right");c.setAttribute("title",mxResources.get("right"))}}));d.style.position="relative";d.style.whiteSpace="nowrap";d.style.overflow="hidden";d.innerHTML='<div class="geSprite geSprite-table" style="margin-left:-2px;"></div>'+this.dropdownImageHtml;d.style.width=
-mxClient.IS_QUIRKS?"50px":"30px";EditorUi.compactUi&&(d.getElementsByTagName("img")[0].style.left="22px",d.getElementsByTagName("img")[0].style.top="5px")};Toolbar.prototype.hideMenu=function(){this.editorUi.hideCurrentMenu()};Toolbar.prototype.addMenu=function(a,c,d,b,g,e,h){var f=this.editorUi.menus.get(b),k=this.addMenuFunction(a,c,d,function(){f.funct.apply(f,arguments)},g,e);h||f.addListener("stateChanged",function(){k.setEnabled(f.enabled)});return k};
-Toolbar.prototype.addMenuFunction=function(a,c,d,b,g,e){return this.addMenuFunctionInContainer(null!=g?g:this.container,a,c,d,b,e)};Toolbar.prototype.addMenuFunctionInContainer=function(a,c,d,b,g,e){c=b?this.createLabel(c):this.createButton(c);this.initElement(c,d);this.addMenuHandler(c,b,g,e);a.appendChild(c);return c};Toolbar.prototype.addSeparator=function(a){a=null!=a?a:this.container;var c=document.createElement("div");c.className="geSeparator";a.appendChild(c);return c};
-Toolbar.prototype.addItems=function(a,c,d){for(var b=[],g=0;g<a.length;g++){var e=a[g];"-"==e?b.push(this.addSeparator(c)):b.push(this.addItem("geSprite-"+e.toLowerCase(),e,c,d))}return b};Toolbar.prototype.addItem=function(a,c,d,b){var g=this.editorUi.actions.get(c),e=null;null!=g&&(c=g.label,null!=g.shortcut&&(c+=" ("+g.shortcut+")"),e=this.addButton(a,c,g.funct,d),b||(e.setEnabled(g.enabled),g.addListener("stateChanged",function(){e.setEnabled(g.enabled)})));return e};
+this.addSeparator();var d=this.addMenuFunction("geIcon geSprite geSprite-table",mxResources.get("table"),!1,mxUtils.bind(this,function(b){var c=a.getSelectedElement(),d=a.getParentByNames(c,["TD","TH"],a.cellEditor.text2),h=a.getParentByName(c,"TR",a.cellEditor.text2);if(null==h)this.editorUi.menus.addInsertTableItem(b);else{var g=a.getParentByName(h,"TABLE",a.cellEditor.text2),c=b.addItem("",null,mxUtils.bind(this,function(){try{a.selectNode(a.insertColumn(g,null!=d?d.cellIndex:0))}catch(k){this.editorUi.handleError(k)}}),
+null,"geIcon geSprite geSprite-insertcolumnbefore");c.setAttribute("title",mxResources.get("insertColumnBefore"));c=b.addItem("",null,mxUtils.bind(this,function(){try{a.selectNode(a.insertColumn(g,null!=d?d.cellIndex+1:-1))}catch(k){this.editorUi.handleError(k)}}),null,"geIcon geSprite geSprite-insertcolumnafter");c.setAttribute("title",mxResources.get("insertColumnAfter"));c=b.addItem("Delete column",null,mxUtils.bind(this,function(){if(null!=d)try{a.deleteColumn(g,d.cellIndex)}catch(k){this.editorUi.handleError(k)}}),
+null,"geIcon geSprite geSprite-deletecolumn");c.setAttribute("title",mxResources.get("deleteColumn"));c=b.addItem("",null,mxUtils.bind(this,function(){try{a.selectNode(a.insertRow(g,h.sectionRowIndex))}catch(k){this.editorUi.handleError(k)}}),null,"geIcon geSprite geSprite-insertrowbefore");c.setAttribute("title",mxResources.get("insertRowBefore"));c=b.addItem("",null,mxUtils.bind(this,function(){try{a.selectNode(a.insertRow(g,h.sectionRowIndex+1))}catch(k){this.editorUi.handleError(k)}}),null,"geIcon geSprite geSprite-insertrowafter");
+c.setAttribute("title",mxResources.get("insertRowAfter"));c=b.addItem("",null,mxUtils.bind(this,function(){try{a.deleteRow(g,h.sectionRowIndex)}catch(k){this.editorUi.handleError(k)}}),null,"geIcon geSprite geSprite-deleterow");c.setAttribute("title",mxResources.get("deleteRow"));c=b.addItem("",null,mxUtils.bind(this,function(){var a=g.style.borderColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+
+("0"+Number(d).toString(16)).substr(-2)});this.editorUi.pickColor(a,function(a){null==a||a==mxConstants.NONE?(g.removeAttribute("border"),g.style.border="",g.style.borderCollapse=""):(g.setAttribute("border","1"),g.style.border="1px solid "+a,g.style.borderCollapse="collapse")})}),null,"geIcon geSprite geSprite-strokecolor");c.setAttribute("title",mxResources.get("borderColor"));c=b.addItem("",null,mxUtils.bind(this,function(){var a=g.style.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,
+function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)});this.editorUi.pickColor(a,function(a){g.style.backgroundColor=null==a||a==mxConstants.NONE?"":a})}),null,"geIcon geSprite geSprite-fillcolor");c.setAttribute("title",mxResources.get("backgroundColor"));c=b.addItem("",null,mxUtils.bind(this,function(){var a=g.getAttribute("cellPadding")||0,a=new FilenameDialog(this.editorUi,a,mxResources.get("apply"),
+mxUtils.bind(this,function(a){null!=a&&0<a.length?g.setAttribute("cellPadding",a):g.removeAttribute("cellPadding")}),mxResources.get("spacing"));this.editorUi.showDialog(a.container,300,80,!0,!0);a.init()}),null,"geIcon geSprite geSprite-fit");c.setAttribute("title",mxResources.get("spacing"));c=b.addItem("",null,mxUtils.bind(this,function(){g.setAttribute("align","left")}),null,"geIcon geSprite geSprite-left");c.setAttribute("title",mxResources.get("left"));c=b.addItem("",null,mxUtils.bind(this,
+function(){g.setAttribute("align","center")}),null,"geIcon geSprite geSprite-center");c.setAttribute("title",mxResources.get("center"));c=b.addItem("",null,mxUtils.bind(this,function(){g.setAttribute("align","right")}),null,"geIcon geSprite geSprite-right");c.setAttribute("title",mxResources.get("right"))}}));d.style.position="relative";d.style.whiteSpace="nowrap";d.style.overflow="hidden";d.innerHTML='<div class="geSprite geSprite-table" style="margin-left:-2px;"></div>'+this.dropdownImageHtml;d.style.width=
+mxClient.IS_QUIRKS?"50px":"30px";EditorUi.compactUi&&(d.getElementsByTagName("img")[0].style.left="22px",d.getElementsByTagName("img")[0].style.top="5px")};Toolbar.prototype.hideMenu=function(){this.editorUi.hideCurrentMenu()};Toolbar.prototype.addMenu=function(a,c,d,b,f,e,h){var g=this.editorUi.menus.get(b),k=this.addMenuFunction(a,c,d,function(){g.funct.apply(g,arguments)},f,e);h||g.addListener("stateChanged",function(){k.setEnabled(g.enabled)});return k};
+Toolbar.prototype.addMenuFunction=function(a,c,d,b,f,e){return this.addMenuFunctionInContainer(null!=f?f:this.container,a,c,d,b,e)};Toolbar.prototype.addMenuFunctionInContainer=function(a,c,d,b,f,e){c=b?this.createLabel(c):this.createButton(c);this.initElement(c,d);this.addMenuHandler(c,b,f,e);a.appendChild(c);return c};Toolbar.prototype.addSeparator=function(a){a=null!=a?a:this.container;var c=document.createElement("div");c.className="geSeparator";a.appendChild(c);return c};
+Toolbar.prototype.addItems=function(a,c,d){for(var b=[],f=0;f<a.length;f++){var e=a[f];"-"==e?b.push(this.addSeparator(c)):b.push(this.addItem("geSprite-"+e.toLowerCase(),e,c,d))}return b};Toolbar.prototype.addItem=function(a,c,d,b){var f=this.editorUi.actions.get(c),e=null;null!=f&&(c=f.label,null!=f.shortcut&&(c+=" ("+f.shortcut+")"),e=this.addButton(a,c,f.funct,d),b||(e.setEnabled(f.enabled),f.addListener("stateChanged",function(){e.setEnabled(f.enabled)})));return e};
Toolbar.prototype.addButton=function(a,c,d,b){a=this.createButton(a);b=null!=b?b:this.container;this.initElement(a,c);this.addClickHandler(a,d);b.appendChild(a);return a};Toolbar.prototype.initElement=function(a,c){null!=c&&a.setAttribute("title",c);this.addEnabledState(a)};Toolbar.prototype.addEnabledState=function(a){var c=a.className;a.setEnabled=function(d){a.enabled=d;a.className=d?c:c+" mxDisabled"};a.setEnabled(!0)};
Toolbar.prototype.addClickHandler=function(a,c){null!=c&&(mxEvent.addListener(a,"click",function(d){a.enabled&&c(d);mxEvent.consume(d)}),mxEvent.addListener(a,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(a){a.preventDefault()})))};Toolbar.prototype.createButton=function(a){var c=document.createElement("a");c.className="geButton";var d=document.createElement("div");null!=a&&(d.className="geSprite "+a);c.appendChild(d);return c};
Toolbar.prototype.createLabel=function(a,c){var d=document.createElement("a");d.className="geLabel";mxUtils.write(d,a);return d};
-Toolbar.prototype.addMenuHandler=function(a,c,d,b){if(null!=d){var g=this.editorUi.editor.graph,e=null,h=!0;mxEvent.addListener(a,"click",mxUtils.bind(this,function(f){if(h&&(null==a.enabled||a.enabled)){g.popupMenuHandler.hideMenu();e=new mxPopupMenu(d);e.div.className+=" geToolbarMenu";e.showDisabled=b;e.labels=c;e.autoExpand=!0;var k=mxUtils.getOffset(a);e.popup(k.x,k.y+a.offsetHeight,null,f);this.editorUi.setCurrentMenu(e,a);!c&&e.div.scrollHeight>e.div.clientHeight&&(e.div.style.width="40px");
-e.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(e,arguments);this.editorUi.resetCurrentMenu();e.destroy()});e.addListener(mxEvent.EVENT_HIDE,mxUtils.bind(this,function(){this.currentElt=null}))}h=!0;mxEvent.consume(f)}));mxEvent.addListener(a,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(b){h=this.currentElt!=a;b.preventDefault()}))}};
+Toolbar.prototype.addMenuHandler=function(a,c,d,b){if(null!=d){var f=this.editorUi.editor.graph,e=null,h=!0;mxEvent.addListener(a,"click",mxUtils.bind(this,function(g){if(h&&(null==a.enabled||a.enabled)){f.popupMenuHandler.hideMenu();e=new mxPopupMenu(d);e.div.className+=" geToolbarMenu";e.showDisabled=b;e.labels=c;e.autoExpand=!0;var k=mxUtils.getOffset(a);e.popup(k.x,k.y+a.offsetHeight,null,g);this.editorUi.setCurrentMenu(e,a);!c&&e.div.scrollHeight>e.div.clientHeight&&(e.div.style.width="40px");
+e.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(e,arguments);this.editorUi.resetCurrentMenu();e.destroy()});e.addListener(mxEvent.EVENT_HIDE,mxUtils.bind(this,function(){this.currentElt=null}))}h=!0;mxEvent.consume(g)}));mxEvent.addListener(a,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(b){h=this.currentElt!=a;b.preventDefault()}))}};
Toolbar.prototype.destroy=function(){null!=this.gestureHandler&&(mxEvent.removeGestureListeners(document,this.gestureHandler),this.gestureHandler=null)};var OpenDialog=function(){var a=document.createElement("iframe");a.style.backgroundColor="transparent";a.allowTransparency="true";a.style.borderStyle="none";a.style.borderWidth="0px";a.style.overflow="hidden";a.frameBorder="0";var c=mxClient.IS_VML&&(null==document.documentMode||8>document.documentMode)?20:0;a.setAttribute("width",(Editor.useLocalStorage?640:320)+c+"px");a.setAttribute("height",(Editor.useLocalStorage?480:220)+c+"px");a.setAttribute("src",OPEN_FORM);this.container=a},ColorDialog=
-function(a,c,d,b){function g(){var a=e(0==ColorDialog.recentColors.length?["FFFFFF"]:ColorDialog.recentColors,11,"FFFFFF",!0);a.style.marginBottom="8px";return a}function e(a,b,c,d){b=null!=b?b:12;var e=document.createElement("table");e.style.borderCollapse="collapse";e.setAttribute("cellspacing","0");e.style.marginBottom="20px";e.style.cellSpacing="0px";var k=document.createElement("tbody");e.appendChild(k);for(var m=a.length/b,n=0;n<m;n++){for(var p=document.createElement("tr"),q=0;q<b;q++)(function(a){var b=
-document.createElement("td");b.style.border="1px solid black";b.style.padding="0px";b.style.width="16px";b.style.height="16px";null==a&&(a=c);"none"==a?b.style.background="url('"+Dialog.prototype.noColorImage+"')":b.style.backgroundColor="#"+a;p.appendChild(b);null!=a&&(b.style.cursor="pointer",mxEvent.addListener(b,"click",function(){"none"==a?(f.fromString("ffffff"),h.value="none"):f.fromString(a)}))})(a[n*b+q]);k.appendChild(p)}d&&(a=document.createElement("td"),a.setAttribute("title",mxResources.get("reset")),
-a.style.border="1px solid black",a.style.padding="0px",a.style.width="16px",a.style.height="16px",a.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')",a.style.backgroundPosition="center center",a.style.backgroundRepeat="no-repeat",a.style.cursor="pointer",p.appendChild(a),mxEvent.addListener(a,"click",function(){ColorDialog.resetRecentColors();e.parentNode.replaceChild(g(),e)}));l.appendChild(e);return e}this.editorUi=a;var h=document.createElement("input");h.style.marginBottom="10px";
-h.style.width="216px";mxClient.IS_IE&&(h.style.marginTop="10px",document.body.appendChild(h));this.init=function(){mxClient.IS_TOUCH||h.focus()};var f=new jscolor.color(h);f.pickerOnfocus=!1;f.showPicker();var k=document.createElement("div");jscolor.picker.box.style.position="relative";jscolor.picker.box.style.width="230px";jscolor.picker.box.style.height="100px";jscolor.picker.box.style.paddingBottom="10px";k.appendChild(jscolor.picker.box);var l=document.createElement("center");k.appendChild(h);
-mxUtils.br(k);g();var m=e(this.presetColors);m.style.marginBottom="8px";m=e(this.defaultColors);m.style.marginBottom="16px";k.appendChild(l);m=document.createElement("div");m.style.textAlign="right";m.style.whiteSpace="nowrap";var n=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=b&&b()});n.className="geBtn";a.editor.cancelFirst&&m.appendChild(n);var p=null!=d?d:this.createApplyFunction();d=mxUtils.button(mxResources.get("apply"),function(){var b=h.value;/(^#?[a-zA-Z0-9]*$)/.test(b)?
-("none"!=b&&"#"!=b.charAt(0)&&(b="#"+b),ColorDialog.addRecentColor("none"!=b?b.substring(1):b,12),p(b),a.hideDialog()):a.handleError({message:mxResources.get("invalidInput")})});d.className="geBtn gePrimaryBtn";m.appendChild(d);a.editor.cancelFirst||m.appendChild(n);null!=c&&("none"==c?(f.fromString("ffffff"),h.value="none"):f.fromString(c));k.appendChild(m);this.picker=f;this.colorInput=h;mxEvent.addListener(k,"keydown",function(c){27==c.keyCode&&(a.hideDialog(),null!=b&&b(),mxEvent.consume(c))});
+function(a,c,d,b){function f(){var a=e(0==ColorDialog.recentColors.length?["FFFFFF"]:ColorDialog.recentColors,11,"FFFFFF",!0);a.style.marginBottom="8px";return a}function e(a,b,c,d){b=null!=b?b:12;var e=document.createElement("table");e.style.borderCollapse="collapse";e.setAttribute("cellspacing","0");e.style.marginBottom="20px";e.style.cellSpacing="0px";var k=document.createElement("tbody");e.appendChild(k);for(var m=a.length/b,n=0;n<m;n++){for(var p=document.createElement("tr"),q=0;q<b;q++)(function(a){var b=
+document.createElement("td");b.style.border="1px solid black";b.style.padding="0px";b.style.width="16px";b.style.height="16px";null==a&&(a=c);"none"==a?b.style.background="url('"+Dialog.prototype.noColorImage+"')":b.style.backgroundColor="#"+a;p.appendChild(b);null!=a&&(b.style.cursor="pointer",mxEvent.addListener(b,"click",function(){"none"==a?(g.fromString("ffffff"),h.value="none"):g.fromString(a)}))})(a[n*b+q]);k.appendChild(p)}d&&(a=document.createElement("td"),a.setAttribute("title",mxResources.get("reset")),
+a.style.border="1px solid black",a.style.padding="0px",a.style.width="16px",a.style.height="16px",a.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')",a.style.backgroundPosition="center center",a.style.backgroundRepeat="no-repeat",a.style.cursor="pointer",p.appendChild(a),mxEvent.addListener(a,"click",function(){ColorDialog.resetRecentColors();e.parentNode.replaceChild(f(),e)}));l.appendChild(e);return e}this.editorUi=a;var h=document.createElement("input");h.style.marginBottom="10px";
+h.style.width="216px";mxClient.IS_IE&&(h.style.marginTop="10px",document.body.appendChild(h));this.init=function(){mxClient.IS_TOUCH||h.focus()};var g=new jscolor.color(h);g.pickerOnfocus=!1;g.showPicker();var k=document.createElement("div");jscolor.picker.box.style.position="relative";jscolor.picker.box.style.width="230px";jscolor.picker.box.style.height="100px";jscolor.picker.box.style.paddingBottom="10px";k.appendChild(jscolor.picker.box);var l=document.createElement("center");k.appendChild(h);
+mxUtils.br(k);f();var m=e(this.presetColors);m.style.marginBottom="8px";m=e(this.defaultColors);m.style.marginBottom="16px";k.appendChild(l);m=document.createElement("div");m.style.textAlign="right";m.style.whiteSpace="nowrap";var n=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=b&&b()});n.className="geBtn";a.editor.cancelFirst&&m.appendChild(n);var p=null!=d?d:this.createApplyFunction();d=mxUtils.button(mxResources.get("apply"),function(){var b=h.value;/(^#?[a-zA-Z0-9]*$)/.test(b)?
+("none"!=b&&"#"!=b.charAt(0)&&(b="#"+b),ColorDialog.addRecentColor("none"!=b?b.substring(1):b,12),p(b),a.hideDialog()):a.handleError({message:mxResources.get("invalidInput")})});d.className="geBtn gePrimaryBtn";m.appendChild(d);a.editor.cancelFirst||m.appendChild(n);null!=c&&("none"==c?(g.fromString("ffffff"),h.value="none"):g.fromString(c));k.appendChild(m);this.picker=g;this.colorInput=h;mxEvent.addListener(k,"keydown",function(c){27==c.keyCode&&(a.hideDialog(),null!=b&&b(),mxEvent.consume(c))});
this.container=k};ColorDialog.prototype.presetColors="E6D0DE CDA2BE B5739D E1D5E7 C3ABD0 A680B8 D4E1F5 A9C4EB 7EA6E0 D5E8D4 9AC7BF 67AB9F D5E8D4 B9E0A5 97D077 FFF2CC FFE599 FFD966 FFF4C3 FFCE9F FFB570 F8CECC F19C99 EA6B66".split(" ");ColorDialog.prototype.defaultColors="none FFFFFF E6E6E6 CCCCCC B3B3B3 999999 808080 666666 4D4D4D 333333 1A1A1A 000000 FFCCCC FFE6CC FFFFCC E6FFCC CCFFCC CCFFE6 CCFFFF CCE5FF CCCCFF E5CCFF FFCCFF FFCCE6 FF9999 FFCC99 FFFF99 CCFF99 99FF99 99FFCC 99FFFF 99CCFF 9999FF CC99FF FF99FF FF99CC FF6666 FFB366 FFFF66 B3FF66 66FF66 66FFB3 66FFFF 66B2FF 6666FF B266FF FF66FF FF66B3 FF3333 FF9933 FFFF33 99FF33 33FF33 33FF99 33FFFF 3399FF 3333FF 9933FF FF33FF FF3399 FF0000 FF8000 FFFF00 80FF00 00FF00 00FF80 00FFFF 007FFF 0000FF 7F00FF FF00FF FF0080 CC0000 CC6600 CCCC00 66CC00 00CC00 00CC66 00CCCC 0066CC 0000CC 6600CC CC00CC CC0066 990000 994C00 999900 4D9900 009900 00994D 009999 004C99 000099 4C0099 990099 99004D 660000 663300 666600 336600 006600 006633 006666 003366 000066 330066 660066 660033 330000 331A00 333300 1A3300 003300 00331A 003333 001933 000033 190033 330033 33001A".split(" ");
ColorDialog.prototype.createApplyFunction=function(){return mxUtils.bind(this,function(a){var c=this.editorUi.editor.graph;c.getModel().beginUpdate();try{c.setCellStyles(this.currentColorKey,a),this.editorUi.fireEvent(new mxEventObject("styleChanged","keys",[this.currentColorKey],"values",[a],"cells",c.getSelectionCells()))}finally{c.getModel().endUpdate()}})};ColorDialog.recentColors=[];
ColorDialog.addRecentColor=function(a,c){null!=a&&(mxUtils.remove(a,ColorDialog.recentColors),ColorDialog.recentColors.splice(0,0,a),ColorDialog.recentColors.length>=c&&ColorDialog.recentColors.pop())};ColorDialog.resetRecentColors=function(){ColorDialog.recentColors=[]};
var AboutDialog=function(a){var c=document.createElement("div");c.setAttribute("align","center");var d=document.createElement("h3");mxUtils.write(d,mxResources.get("about")+" GraphEditor");c.appendChild(d);d=document.createElement("img");d.style.border="0px";d.setAttribute("width","176");d.setAttribute("width","151");d.setAttribute("src",IMAGE_PATH+"/logo.png");c.appendChild(d);mxUtils.br(c);mxUtils.write(c,"Powered by mxGraph "+mxClient.VERSION);mxUtils.br(c);d=document.createElement("a");d.setAttribute("href",
-"http://www.jgraph.com/");d.setAttribute("target","_blank");mxUtils.write(d,"www.jgraph.com");c.appendChild(d);mxUtils.br(c);mxUtils.br(c);d=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});d.className="geBtn gePrimaryBtn";c.appendChild(d);this.container=c},TextareaDialog=function(a,c,d,b,g,e,h,f,k,l,m,n,p,q){h=null!=h?h:300;f=null!=f?f:120;l=null!=l?l:!1;var u,v,r=document.createElement("table"),w=document.createElement("tbody");u=document.createElement("tr");v=document.createElement("td");
-v.style.fontSize="10pt";v.style.width="100px";mxUtils.write(v,c);u.appendChild(v);w.appendChild(u);u=document.createElement("tr");v=document.createElement("td");var t=document.createElement("textarea");m&&t.setAttribute("wrap","off");t.setAttribute("spellcheck","false");t.setAttribute("autocorrect","off");t.setAttribute("autocomplete","off");t.setAttribute("autocapitalize","off");mxUtils.write(t,d||"");t.style.resize="none";t.style.width=h+"px";t.style.height=f+"px";this.textarea=t;this.init=function(){t.focus();
+"http://www.jgraph.com/");d.setAttribute("target","_blank");mxUtils.write(d,"www.jgraph.com");c.appendChild(d);mxUtils.br(c);mxUtils.br(c);d=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});d.className="geBtn gePrimaryBtn";c.appendChild(d);this.container=c},TextareaDialog=function(a,c,d,b,f,e,h,g,k,l,m,n,p,q){h=null!=h?h:300;g=null!=g?g:120;l=null!=l?l:!1;var u,v,r=document.createElement("table"),w=document.createElement("tbody");u=document.createElement("tr");v=document.createElement("td");
+v.style.fontSize="10pt";v.style.width="100px";mxUtils.write(v,c);u.appendChild(v);w.appendChild(u);u=document.createElement("tr");v=document.createElement("td");var t=document.createElement("textarea");m&&t.setAttribute("wrap","off");t.setAttribute("spellcheck","false");t.setAttribute("autocorrect","off");t.setAttribute("autocomplete","off");t.setAttribute("autocapitalize","off");mxUtils.write(t,d||"");t.style.resize="none";t.style.width=h+"px";t.style.height=g+"px";this.textarea=t;this.init=function(){t.focus();
t.scrollTop=0};v.appendChild(t);u.appendChild(v);w.appendChild(u);u=document.createElement("tr");v=document.createElement("td");v.style.paddingTop="14px";v.style.whiteSpace="nowrap";v.setAttribute("align","right");null!=p&&(c=mxUtils.button(mxResources.get("help"),function(){a.editor.graph.openLink(p)}),c.className="geBtn",v.appendChild(c));if(null!=q)for(c=0;c<q.length;c++)(function(a,b){var c=mxUtils.button(a,function(a){b(a,t)});c.className="geBtn";v.appendChild(c)})(q[c][0],q[c][1]);e=mxUtils.button(e||
-mxResources.get("cancel"),function(){a.hideDialog();null!=g&&g()});e.className="geBtn";a.editor.cancelFirst&&v.appendChild(e);null!=k&&k(v,t);null!=b&&(k=mxUtils.button(n||mxResources.get("apply"),function(){l||a.hideDialog();b(t.value)}),k.className="geBtn gePrimaryBtn",v.appendChild(k));a.editor.cancelFirst||v.appendChild(e);u.appendChild(v);w.appendChild(u);r.appendChild(w);this.container=r},EditDiagramDialog=function(a){var c=document.createElement("div");c.style.textAlign="right";var d=document.createElement("textarea");
+mxResources.get("cancel"),function(){a.hideDialog();null!=f&&f()});e.className="geBtn";a.editor.cancelFirst&&v.appendChild(e);null!=k&&k(v,t);null!=b&&(k=mxUtils.button(n||mxResources.get("apply"),function(){l||a.hideDialog();b(t.value)}),k.className="geBtn gePrimaryBtn",v.appendChild(k));a.editor.cancelFirst||v.appendChild(e);u.appendChild(v);w.appendChild(u);r.appendChild(w);this.container=r},EditDiagramDialog=function(a){var c=document.createElement("div");c.style.textAlign="right";var d=document.createElement("textarea");
d.setAttribute("wrap","off");d.setAttribute("spellcheck","false");d.setAttribute("autocorrect","off");d.setAttribute("autocomplete","off");d.setAttribute("autocapitalize","off");d.style.overflow="auto";d.style.resize="none";d.style.width="600px";d.style.height="360px";d.style.marginBottom="16px";d.value=mxUtils.getPrettyXml(a.editor.getGraphXml());c.appendChild(d);this.init=function(){d.focus()};Graph.fileSupport&&(d.addEventListener("dragover",function(a){a.stopPropagation();a.preventDefault()},
-!1),d.addEventListener("drop",function(b){b.stopPropagation();b.preventDefault();if(0<b.dataTransfer.files.length){b=b.dataTransfer.files[0];var c=new FileReader;c.onload=function(a){d.value=a.target.result};c.readAsText(b)}else d.value=a.extractGraphModelFromEvent(b)},!1));var b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});b.className="geBtn";a.editor.cancelFirst&&c.appendChild(b);var g=document.createElement("select");g.style.width="180px";g.className="geBtn";if(a.editor.graph.isEnabled()){var e=
-document.createElement("option");e.setAttribute("value","replace");mxUtils.write(e,mxResources.get("replaceExistingDrawing"));g.appendChild(e)}e=document.createElement("option");e.setAttribute("value","new");mxUtils.write(e,mxResources.get("openInNewWindow"));EditDiagramDialog.showNewWindowOption&&g.appendChild(e);a.editor.graph.isEnabled()&&(e=document.createElement("option"),e.setAttribute("value","import"),mxUtils.write(e,mxResources.get("addToExistingDrawing")),g.appendChild(e));c.appendChild(g);
-e=mxUtils.button(mxResources.get("ok"),function(){var b=Graph.zapGremlins(mxUtils.trim(d.value)),c=null;if("new"==g.value)a.hideDialog(),a.editor.editAsNew(b);else if("replace"==g.value){a.editor.graph.model.beginUpdate();try{a.editor.setGraphXml(mxUtils.parseXml(b).documentElement),a.hideDialog()}catch(n){c=n}finally{a.editor.graph.model.endUpdate()}}else if("import"==g.value){a.editor.graph.model.beginUpdate();try{var e=mxUtils.parseXml(b),l=new mxGraphModel;(new mxCodec(e)).decode(e.documentElement,
+!1),d.addEventListener("drop",function(b){b.stopPropagation();b.preventDefault();if(0<b.dataTransfer.files.length){b=b.dataTransfer.files[0];var c=new FileReader;c.onload=function(a){d.value=a.target.result};c.readAsText(b)}else d.value=a.extractGraphModelFromEvent(b)},!1));var b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});b.className="geBtn";a.editor.cancelFirst&&c.appendChild(b);var f=document.createElement("select");f.style.width="180px";f.className="geBtn";if(a.editor.graph.isEnabled()){var e=
+document.createElement("option");e.setAttribute("value","replace");mxUtils.write(e,mxResources.get("replaceExistingDrawing"));f.appendChild(e)}e=document.createElement("option");e.setAttribute("value","new");mxUtils.write(e,mxResources.get("openInNewWindow"));EditDiagramDialog.showNewWindowOption&&f.appendChild(e);a.editor.graph.isEnabled()&&(e=document.createElement("option"),e.setAttribute("value","import"),mxUtils.write(e,mxResources.get("addToExistingDrawing")),f.appendChild(e));c.appendChild(f);
+e=mxUtils.button(mxResources.get("ok"),function(){var b=Graph.zapGremlins(mxUtils.trim(d.value)),c=null;if("new"==f.value)a.hideDialog(),a.editor.editAsNew(b);else if("replace"==f.value){a.editor.graph.model.beginUpdate();try{a.editor.setGraphXml(mxUtils.parseXml(b).documentElement),a.hideDialog()}catch(n){c=n}finally{a.editor.graph.model.endUpdate()}}else if("import"==f.value){a.editor.graph.model.beginUpdate();try{var e=mxUtils.parseXml(b),l=new mxGraphModel;(new mxCodec(e)).decode(e.documentElement,
l);var m=l.getChildren(l.getChildAt(l.getRoot(),0));a.editor.graph.setSelectionCells(a.editor.graph.importCells(m));a.hideDialog()}catch(n){c=n}finally{a.editor.graph.model.endUpdate()}}null!=c&&mxUtils.alert(c.message)});e.className="geBtn gePrimaryBtn";c.appendChild(e);a.editor.cancelFirst||c.appendChild(b);this.container=c};EditDiagramDialog.showNewWindowOption=!0;
var ExportDialog=function(a){function c(){var a=m.value,b=a.lastIndexOf(".");m.value=0<b?a.substring(0,b+1)+n.value:a+"."+n.value;"xml"===n.value?(p.setAttribute("disabled","true"),q.setAttribute("disabled","true"),u.setAttribute("disabled","true"),y.setAttribute("disabled","true")):(p.removeAttribute("disabled"),q.removeAttribute("disabled"),u.removeAttribute("disabled"),y.removeAttribute("disabled"));"png"===n.value||"svg"===n.value?t.removeAttribute("disabled"):t.setAttribute("disabled","disabled");
-"png"===n.value?(v.removeAttribute("disabled"),r.removeAttribute("disabled")):(v.setAttribute("disabled","disabled"),r.setAttribute("disabled","disabled"))}function d(){q.style.backgroundColor=q.value*u.value>MAX_AREA||0>=q.value?"red":"";u.style.backgroundColor=q.value*u.value>MAX_AREA||0>=u.value?"red":""}var b=a.editor.graph,g=b.getGraphBounds(),e=b.view.scale,h=Math.ceil(g.width/e),f=Math.ceil(g.height/e),k,e=document.createElement("table"),l=document.createElement("tbody");e.setAttribute("cellpadding",
-mxClient.IS_SF?"0":"2");g=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";k.style.width="100px";mxUtils.write(k,mxResources.get("filename")+":");g.appendChild(k);var m=document.createElement("input");m.setAttribute("value",a.editor.getOrCreateFilename());m.style.width="180px";k=document.createElement("td");k.appendChild(m);g.appendChild(k);l.appendChild(g);g=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("format")+
-":");g.appendChild(k);var n=document.createElement("select");n.style.width="180px";k=document.createElement("option");k.setAttribute("value","png");mxUtils.write(k,mxResources.get("formatPng"));n.appendChild(k);k=document.createElement("option");ExportDialog.showGifOption&&(k.setAttribute("value","gif"),mxUtils.write(k,mxResources.get("formatGif")),n.appendChild(k));k=document.createElement("option");k.setAttribute("value","jpg");mxUtils.write(k,mxResources.get("formatJpg"));n.appendChild(k);k=document.createElement("option");
-k.setAttribute("value","pdf");mxUtils.write(k,mxResources.get("formatPdf"));n.appendChild(k);k=document.createElement("option");k.setAttribute("value","svg");mxUtils.write(k,mxResources.get("formatSvg"));n.appendChild(k);ExportDialog.showXmlOption&&(k=document.createElement("option"),k.setAttribute("value","xml"),mxUtils.write(k,mxResources.get("formatXml")),n.appendChild(k));k=document.createElement("td");k.appendChild(n);g.appendChild(k);l.appendChild(g);g=document.createElement("tr");k=document.createElement("td");
-k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("zoom")+" (%):");g.appendChild(k);var p=document.createElement("input");p.setAttribute("type","number");p.setAttribute("value","100");p.style.width="180px";k=document.createElement("td");k.appendChild(p);g.appendChild(k);l.appendChild(g);g=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("width")+":");g.appendChild(k);var q=document.createElement("input");q.setAttribute("value",
-h);q.style.width="180px";k=document.createElement("td");k.appendChild(q);g.appendChild(k);l.appendChild(g);g=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("height")+":");g.appendChild(k);var u=document.createElement("input");u.setAttribute("value",f);u.style.width="180px";k=document.createElement("td");k.appendChild(u);g.appendChild(k);l.appendChild(g);g=document.createElement("tr");k=document.createElement("td");k.style.fontSize=
-"10pt";mxUtils.write(k,mxResources.get("dpi")+":");g.appendChild(k);var v=document.createElement("select");v.style.width="180px";k=document.createElement("option");k.setAttribute("value","100");mxUtils.write(k,"100dpi");v.appendChild(k);k=document.createElement("option");k.setAttribute("value","200");mxUtils.write(k,"200dpi");v.appendChild(k);k=document.createElement("option");k.setAttribute("value","300");mxUtils.write(k,"300dpi");v.appendChild(k);k=document.createElement("option");k.setAttribute("value",
+"png"===n.value?(v.removeAttribute("disabled"),r.removeAttribute("disabled")):(v.setAttribute("disabled","disabled"),r.setAttribute("disabled","disabled"))}function d(){q.style.backgroundColor=q.value*u.value>MAX_AREA||0>=q.value?"red":"";u.style.backgroundColor=q.value*u.value>MAX_AREA||0>=u.value?"red":""}var b=a.editor.graph,f=b.getGraphBounds(),e=b.view.scale,h=Math.ceil(f.width/e),g=Math.ceil(f.height/e),k,e=document.createElement("table"),l=document.createElement("tbody");e.setAttribute("cellpadding",
+mxClient.IS_SF?"0":"2");f=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";k.style.width="100px";mxUtils.write(k,mxResources.get("filename")+":");f.appendChild(k);var m=document.createElement("input");m.setAttribute("value",a.editor.getOrCreateFilename());m.style.width="180px";k=document.createElement("td");k.appendChild(m);f.appendChild(k);l.appendChild(f);f=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("format")+
+":");f.appendChild(k);var n=document.createElement("select");n.style.width="180px";k=document.createElement("option");k.setAttribute("value","png");mxUtils.write(k,mxResources.get("formatPng"));n.appendChild(k);k=document.createElement("option");ExportDialog.showGifOption&&(k.setAttribute("value","gif"),mxUtils.write(k,mxResources.get("formatGif")),n.appendChild(k));k=document.createElement("option");k.setAttribute("value","jpg");mxUtils.write(k,mxResources.get("formatJpg"));n.appendChild(k);k=document.createElement("option");
+k.setAttribute("value","pdf");mxUtils.write(k,mxResources.get("formatPdf"));n.appendChild(k);k=document.createElement("option");k.setAttribute("value","svg");mxUtils.write(k,mxResources.get("formatSvg"));n.appendChild(k);ExportDialog.showXmlOption&&(k=document.createElement("option"),k.setAttribute("value","xml"),mxUtils.write(k,mxResources.get("formatXml")),n.appendChild(k));k=document.createElement("td");k.appendChild(n);f.appendChild(k);l.appendChild(f);f=document.createElement("tr");k=document.createElement("td");
+k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("zoom")+" (%):");f.appendChild(k);var p=document.createElement("input");p.setAttribute("type","number");p.setAttribute("value","100");p.style.width="180px";k=document.createElement("td");k.appendChild(p);f.appendChild(k);l.appendChild(f);f=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("width")+":");f.appendChild(k);var q=document.createElement("input");q.setAttribute("value",
+h);q.style.width="180px";k=document.createElement("td");k.appendChild(q);f.appendChild(k);l.appendChild(f);f=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("height")+":");f.appendChild(k);var u=document.createElement("input");u.setAttribute("value",g);u.style.width="180px";k=document.createElement("td");k.appendChild(u);f.appendChild(k);l.appendChild(f);f=document.createElement("tr");k=document.createElement("td");k.style.fontSize=
+"10pt";mxUtils.write(k,mxResources.get("dpi")+":");f.appendChild(k);var v=document.createElement("select");v.style.width="180px";k=document.createElement("option");k.setAttribute("value","100");mxUtils.write(k,"100dpi");v.appendChild(k);k=document.createElement("option");k.setAttribute("value","200");mxUtils.write(k,"200dpi");v.appendChild(k);k=document.createElement("option");k.setAttribute("value","300");mxUtils.write(k,"300dpi");v.appendChild(k);k=document.createElement("option");k.setAttribute("value",
"400");mxUtils.write(k,"400dpi");v.appendChild(k);k=document.createElement("option");k.setAttribute("value","custom");mxUtils.write(k,mxResources.get("custom"));v.appendChild(k);var r=document.createElement("input");r.style.width="180px";r.style.display="none";r.setAttribute("value","100");r.setAttribute("type","number");r.setAttribute("min","50");r.setAttribute("step","50");var w=!1;mxEvent.addListener(v,"change",function(){"custom"==this.value?(this.style.display="none",r.style.display="",r.focus()):
-(r.value=this.value,w||(p.value=this.value))});mxEvent.addListener(r,"change",function(){var a=parseInt(r.value);isNaN(a)||0>=a?r.style.backgroundColor="red":(r.style.backgroundColor="",w||(p.value=a))});k=document.createElement("td");k.appendChild(v);k.appendChild(r);g.appendChild(k);l.appendChild(g);g=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("background")+":");g.appendChild(k);var t=document.createElement("input");t.setAttribute("type",
-"checkbox");t.checked=null==b.background||b.background==mxConstants.NONE;k=document.createElement("td");k.appendChild(t);mxUtils.write(k,mxResources.get("transparent"));g.appendChild(k);l.appendChild(g);g=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("borderWidth")+":");g.appendChild(k);var y=document.createElement("input");y.setAttribute("type","number");y.setAttribute("value",ExportDialog.lastBorderValue);y.style.width="180px";
-k=document.createElement("td");k.appendChild(y);g.appendChild(k);l.appendChild(g);e.appendChild(l);mxEvent.addListener(n,"change",c);c();mxEvent.addListener(p,"change",function(){w=!0;var a=Math.max(0,parseFloat(p.value)||100)/100;p.value=parseFloat((100*a).toFixed(2));0<h?(q.value=Math.floor(h*a),u.value=Math.floor(f*a)):(p.value="100",q.value=h,u.value=f);d()});mxEvent.addListener(q,"change",function(){var a=parseInt(q.value)/h;0<a?(p.value=parseFloat((100*a).toFixed(2)),u.value=Math.floor(f*a)):
-(p.value="100",q.value=h,u.value=f);d()});mxEvent.addListener(u,"change",function(){var a=parseInt(u.value)/f;0<a?(p.value=parseFloat((100*a).toFixed(2)),q.value=Math.floor(h*a)):(p.value="100",q.value=h,u.value=f);d()});g=document.createElement("tr");k=document.createElement("td");k.setAttribute("align","right");k.style.paddingTop="22px";k.colSpan=2;var x=mxUtils.button(mxResources.get("export"),mxUtils.bind(this,function(){if(0>=parseInt(p.value))mxUtils.alert(mxResources.get("drawingEmpty"));else{var c=
+(r.value=this.value,w||(p.value=this.value))});mxEvent.addListener(r,"change",function(){var a=parseInt(r.value);isNaN(a)||0>=a?r.style.backgroundColor="red":(r.style.backgroundColor="",w||(p.value=a))});k=document.createElement("td");k.appendChild(v);k.appendChild(r);f.appendChild(k);l.appendChild(f);f=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("background")+":");f.appendChild(k);var t=document.createElement("input");t.setAttribute("type",
+"checkbox");t.checked=null==b.background||b.background==mxConstants.NONE;k=document.createElement("td");k.appendChild(t);mxUtils.write(k,mxResources.get("transparent"));f.appendChild(k);l.appendChild(f);f=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("borderWidth")+":");f.appendChild(k);var y=document.createElement("input");y.setAttribute("type","number");y.setAttribute("value",ExportDialog.lastBorderValue);y.style.width="180px";
+k=document.createElement("td");k.appendChild(y);f.appendChild(k);l.appendChild(f);e.appendChild(l);mxEvent.addListener(n,"change",c);c();mxEvent.addListener(p,"change",function(){w=!0;var a=Math.max(0,parseFloat(p.value)||100)/100;p.value=parseFloat((100*a).toFixed(2));0<h?(q.value=Math.floor(h*a),u.value=Math.floor(g*a)):(p.value="100",q.value=h,u.value=g);d()});mxEvent.addListener(q,"change",function(){var a=parseInt(q.value)/h;0<a?(p.value=parseFloat((100*a).toFixed(2)),u.value=Math.floor(g*a)):
+(p.value="100",q.value=h,u.value=g);d()});mxEvent.addListener(u,"change",function(){var a=parseInt(u.value)/g;0<a?(p.value=parseFloat((100*a).toFixed(2)),q.value=Math.floor(h*a)):(p.value="100",q.value=h,u.value=g);d()});f=document.createElement("tr");k=document.createElement("td");k.setAttribute("align","right");k.style.paddingTop="22px";k.colSpan=2;var x=mxUtils.button(mxResources.get("export"),mxUtils.bind(this,function(){if(0>=parseInt(p.value))mxUtils.alert(mxResources.get("drawingEmpty"));else{var c=
m.value,d=n.value,e=Math.max(0,parseFloat(p.value)||100)/100,f=Math.max(0,parseInt(y.value)),g=b.background,h=Math.max(1,parseInt(r.value));if(("svg"==d||"png"==d)&&t.checked)g=null;else if(null==g||g==mxConstants.NONE)g="#ffffff";ExportDialog.lastBorderValue=f;ExportDialog.exportFile(a,c,d,g,e,f,h)}}));x.className="geBtn gePrimaryBtn";var C=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});C.className="geBtn";a.editor.cancelFirst?(k.appendChild(C),k.appendChild(x)):(k.appendChild(x),
-k.appendChild(C));g.appendChild(k);l.appendChild(g);e.appendChild(l);this.container=e};ExportDialog.lastBorderValue=0;ExportDialog.showGifOption=!0;ExportDialog.showXmlOption=!0;
-ExportDialog.exportFile=function(a,c,d,b,g,e,h){var f=a.editor.graph;if("xml"==d)ExportDialog.saveLocalFile(a,mxUtils.getXml(a.editor.getGraphXml()),c,d);else if("svg"==d)ExportDialog.saveLocalFile(a,mxUtils.getXml(f.getSvg(b,g,e)),c,d);else{var k=f.getGraphBounds(),l=mxUtils.createXmlDocument(),m=l.createElement("output");l.appendChild(m);l=new mxXmlCanvas2D(m);l.translate(Math.floor((e/g-k.x)/f.view.scale),Math.floor((e/g-k.y)/f.view.scale));l.scale(g/f.view.scale);(new mxImageExport).drawState(f.getView().getState(f.model.root),
-l);m="xml="+encodeURIComponent(mxUtils.getXml(m));l=Math.ceil(k.width*g/f.view.scale+2*e);g=Math.ceil(k.height*g/f.view.scale+2*e);m.length<=MAX_REQUEST_SIZE&&l*g<MAX_AREA?(a.hideDialog(),(new mxXmlRequest(EXPORT_URL,"format="+d+"&filename="+encodeURIComponent(c)+"&bg="+(null!=b?b:"none")+"&w="+l+"&h="+g+"&"+m+"&dpi="+h)).simulate(document,"_blank")):mxUtils.alert(mxResources.get("drawingTooLarge"))}};
+k.appendChild(C));f.appendChild(k);l.appendChild(f);e.appendChild(l);this.container=e};ExportDialog.lastBorderValue=0;ExportDialog.showGifOption=!0;ExportDialog.showXmlOption=!0;
+ExportDialog.exportFile=function(a,c,d,b,f,e,h){var g=a.editor.graph;if("xml"==d)ExportDialog.saveLocalFile(a,mxUtils.getXml(a.editor.getGraphXml()),c,d);else if("svg"==d)ExportDialog.saveLocalFile(a,mxUtils.getXml(g.getSvg(b,f,e)),c,d);else{var k=g.getGraphBounds(),l=mxUtils.createXmlDocument(),m=l.createElement("output");l.appendChild(m);l=new mxXmlCanvas2D(m);l.translate(Math.floor((e/f-k.x)/g.view.scale),Math.floor((e/f-k.y)/g.view.scale));l.scale(f/g.view.scale);(new mxImageExport).drawState(g.getView().getState(g.model.root),
+l);m="xml="+encodeURIComponent(mxUtils.getXml(m));l=Math.ceil(k.width*f/g.view.scale+2*e);f=Math.ceil(k.height*f/g.view.scale+2*e);m.length<=MAX_REQUEST_SIZE&&l*f<MAX_AREA?(a.hideDialog(),(new mxXmlRequest(EXPORT_URL,"format="+d+"&filename="+encodeURIComponent(c)+"&bg="+(null!=b?b:"none")+"&w="+l+"&h="+f+"&"+m+"&dpi="+h)).simulate(document,"_blank")):mxUtils.alert(mxResources.get("drawingTooLarge"))}};
ExportDialog.saveLocalFile=function(a,c,d,b){c.length<MAX_REQUEST_SIZE?(a.hideDialog(),(new mxXmlRequest(SAVE_URL,"xml="+encodeURIComponent(c)+"&filename="+encodeURIComponent(d)+"&format="+b)).simulate(document,"_blank")):(mxUtils.alert(mxResources.get("drawingTooLarge")),mxUtils.popup(xml))};
-var EditDataDialog=function(a,c){function d(){0<w.value.length?t.removeAttribute("disabled"):t.setAttribute("disabled","disabled")}var b=document.createElement("div"),g=a.editor.graph,e=g.getModel().getValue(c);if(!mxUtils.isNode(e)){var h=mxUtils.createXmlDocument().createElement("object");h.setAttribute("label",e||"");e=h}var f=new mxForm("properties");f.table.style.width="100%";for(var k=e.attributes,l=[],m=[],n=0,p=null!=EditDataDialog.getDisplayIdForCell?EditDataDialog.getDisplayIdForCell(a,
+var EditDataDialog=function(a,c){function d(){0<w.value.length?t.removeAttribute("disabled"):t.setAttribute("disabled","disabled")}var b=document.createElement("div"),f=a.editor.graph,e=f.getModel().getValue(c);if(!mxUtils.isNode(e)){var h=mxUtils.createXmlDocument().createElement("object");h.setAttribute("label",e||"");e=h}var g=new mxForm("properties");g.table.style.width="100%";for(var k=e.attributes,l=[],m=[],n=0,p=null!=EditDataDialog.getDisplayIdForCell?EditDataDialog.getDisplayIdForCell(a,
c):null,q=function(a,b){var c=document.createElement("div");c.style.position="relative";c.style.paddingRight="20px";c.style.boxSizing="border-box";c.style.width="100%";var d=document.createElement("a"),e=mxUtils.createImage(Dialog.prototype.closeImage);e.style.height="9px";e.style.fontSize="9px";e.style.marginBottom=mxClient.IS_IE11?"-1px":"5px";d.className="geButton";d.setAttribute("title",mxResources.get("delete"));d.style.position="absolute";d.style.top="4px";d.style.right="0px";d.style.margin=
-"0px";d.style.width="9px";d.style.height="9px";d.style.cursor="pointer";d.appendChild(e);e=function(a){return function(){for(var b=0,c=0;c<l.length;c++){if(l[c]==a){m[c]=null;f.table.deleteRow(b+(null!=p?1:0));break}null!=m[c]&&b++}}}(b);mxEvent.addListener(d,"click",e);e=a.parentNode;c.appendChild(a);c.appendChild(d);e.appendChild(c)},h=function(a,b,c){l[a]=b;m[a]=f.addTextarea(l[n]+":",c,2);m[a].style.width="100%";0<c.indexOf("\n")&&m[a].setAttribute("rows","2");q(m[a],b)},u=[],v=g.getModel().getParent(c)==
-g.getModel().getRoot(),r=0;r<k.length;r++)!v&&"label"==k[r].nodeName||"placeholders"==k[r].nodeName||u.push({name:k[r].nodeName,value:k[r].nodeValue});u.sort(function(a,b){return a.name<b.name?-1:a.name>b.name?1:0});null!=p&&(k=document.createElement("div"),k.style.width="100%",k.style.fontSize="11px",k.style.textAlign="center",mxUtils.write(k,p),f.addField(mxResources.get("id")+":",k));for(r=0;r<u.length;r++)h(n,u[r].name,u[r].value),n++;h=document.createElement("div");h.style.cssText="position:absolute;left:30px;right:30px;overflow-y:auto;top:30px;bottom:80px;";
-h.appendChild(f.table);u=document.createElement("div");u.style.boxSizing="border-box";u.style.paddingRight="160px";u.style.whiteSpace="nowrap";u.style.marginTop="6px";u.style.width="100%";var w=document.createElement("input");w.setAttribute("placeholder",mxResources.get("enterPropertyName"));w.setAttribute("type","text");w.setAttribute("size",mxClient.IS_IE||mxClient.IS_IE11?"36":"40");w.style.boxSizing="border-box";w.style.marginLeft="2px";w.style.width="100%";u.appendChild(w);h.appendChild(u);b.appendChild(h);
-var t=mxUtils.button(mxResources.get("addProperty"),function(){var a=w.value;if(0<a.length&&"label"!=a&&"placeholders"!=a&&0>a.indexOf(":"))try{var b=mxUtils.indexOf(l,a);if(0<=b&&null!=m[b])m[b].focus();else{e.cloneNode(!1).setAttribute(a,"");0<=b&&(l.splice(b,1),m.splice(b,1));l.push(a);var c=f.addTextarea(a+":","",2);c.style.width="100%";m.push(c);q(c,a);c.focus()}t.setAttribute("disabled","disabled");w.value=""}catch(D){mxUtils.alert(D)}else mxUtils.alert(mxResources.get("invalidName"))});this.init=
+"0px";d.style.width="9px";d.style.height="9px";d.style.cursor="pointer";d.appendChild(e);e=function(a){return function(){for(var b=0,c=0;c<l.length;c++){if(l[c]==a){m[c]=null;g.table.deleteRow(b+(null!=p?1:0));break}null!=m[c]&&b++}}}(b);mxEvent.addListener(d,"click",e);e=a.parentNode;c.appendChild(a);c.appendChild(d);e.appendChild(c)},h=function(a,b,c){l[a]=b;m[a]=g.addTextarea(l[n]+":",c,2);m[a].style.width="100%";0<c.indexOf("\n")&&m[a].setAttribute("rows","2");q(m[a],b)},u=[],v=f.getModel().getParent(c)==
+f.getModel().getRoot(),r=0;r<k.length;r++)!v&&"label"==k[r].nodeName||"placeholders"==k[r].nodeName||u.push({name:k[r].nodeName,value:k[r].nodeValue});u.sort(function(a,b){return a.name<b.name?-1:a.name>b.name?1:0});null!=p&&(k=document.createElement("div"),k.style.width="100%",k.style.fontSize="11px",k.style.textAlign="center",mxUtils.write(k,p),g.addField(mxResources.get("id")+":",k));for(r=0;r<u.length;r++)h(n,u[r].name,u[r].value),n++;h=document.createElement("div");h.style.cssText="position:absolute;left:30px;right:30px;overflow-y:auto;top:30px;bottom:80px;";
+h.appendChild(g.table);u=document.createElement("div");u.style.boxSizing="border-box";u.style.paddingRight="160px";u.style.whiteSpace="nowrap";u.style.marginTop="6px";u.style.width="100%";var w=document.createElement("input");w.setAttribute("placeholder",mxResources.get("enterPropertyName"));w.setAttribute("type","text");w.setAttribute("size",mxClient.IS_IE||mxClient.IS_IE11?"36":"40");w.style.boxSizing="border-box";w.style.marginLeft="2px";w.style.width="100%";u.appendChild(w);h.appendChild(u);b.appendChild(h);
+var t=mxUtils.button(mxResources.get("addProperty"),function(){var a=w.value;if(0<a.length&&"label"!=a&&"placeholders"!=a&&0>a.indexOf(":"))try{var b=mxUtils.indexOf(l,a);if(0<=b&&null!=m[b])m[b].focus();else{e.cloneNode(!1).setAttribute(a,"");0<=b&&(l.splice(b,1),m.splice(b,1));l.push(a);var c=g.addTextarea(a+":","",2);c.style.width="100%";m.push(c);q(c,a);c.focus()}t.setAttribute("disabled","disabled");w.value=""}catch(D){mxUtils.alert(D)}else mxUtils.alert(mxResources.get("invalidName"))});this.init=
function(){0<m.length?m[0].focus():w.focus()};t.setAttribute("title",mxResources.get("addProperty"));t.setAttribute("disabled","disabled");t.style.textOverflow="ellipsis";t.style.position="absolute";t.style.overflow="hidden";t.style.width="144px";t.style.right="0px";t.className="geBtn";u.appendChild(t);h=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog.apply(a,arguments)});h.className="geBtn";u=mxUtils.button(mxResources.get("apply"),function(){try{a.hideDialog.apply(a,arguments);
-e=e.cloneNode(!0);for(var b=!1,d=0;d<l.length;d++)null==m[d]?e.removeAttribute(l[d]):(e.setAttribute(l[d],m[d].value),b=b||"placeholder"==l[d]&&"1"==e.getAttribute("placeholders"));b&&e.removeAttribute("label");g.getModel().setValue(c,e)}catch(B){mxUtils.alert(B)}});u.className="geBtn gePrimaryBtn";mxEvent.addListener(w,"keyup",d);mxEvent.addListener(w,"change",d);k=document.createElement("div");k.style.cssText="position:absolute;left:30px;right:30px;text-align:right;bottom:30px;height:40px;";if(a.editor.graph.getModel().isVertex(c)||
+e=e.cloneNode(!0);for(var b=!1,d=0;d<l.length;d++)null==m[d]?e.removeAttribute(l[d]):(e.setAttribute(l[d],m[d].value),b=b||"placeholder"==l[d]&&"1"==e.getAttribute("placeholders"));b&&e.removeAttribute("label");f.getModel().setValue(c,e)}catch(B){mxUtils.alert(B)}});u.className="geBtn gePrimaryBtn";mxEvent.addListener(w,"keyup",d);mxEvent.addListener(w,"change",d);k=document.createElement("div");k.style.cssText="position:absolute;left:30px;right:30px;text-align:right;bottom:30px;height:40px;";if(a.editor.graph.getModel().isVertex(c)||
a.editor.graph.getModel().isEdge(c)){v=document.createElement("span");v.style.marginRight="10px";r=document.createElement("input");r.setAttribute("type","checkbox");r.style.marginRight="6px";"1"==e.getAttribute("placeholders")&&(r.setAttribute("checked","checked"),r.defaultChecked=!0);mxEvent.addListener(r,"click",function(){"1"==e.getAttribute("placeholders")?e.removeAttribute("placeholders"):e.setAttribute("placeholders","1")});v.appendChild(r);mxUtils.write(v,mxResources.get("placeholders"));if(null!=
EditDataDialog.placeholderHelpLink){r=document.createElement("a");r.setAttribute("href",EditDataDialog.placeholderHelpLink);r.setAttribute("title",mxResources.get("help"));r.setAttribute("target","_blank");r.style.marginLeft="8px";r.style.cursor="help";var y=document.createElement("img");mxUtils.setOpacity(y,50);y.style.height="16px";y.style.width="16px";y.setAttribute("border","0");y.setAttribute("valign","middle");y.style.marginTop=mxClient.IS_IE11?"0px":"-4px";y.setAttribute("src",Editor.helpImage);
r.appendChild(y);v.appendChild(r)}k.appendChild(v)}a.editor.cancelFirst?(k.appendChild(h),k.appendChild(u)):(k.appendChild(u),k.appendChild(h));b.appendChild(k);this.container=b};EditDataDialog.getDisplayIdForCell=function(a,c){var d=null;null!=a.editor.graph.getModel().getParent(c)&&(d=c.getId());return d};EditDataDialog.placeholderHelpLink=null;
-var LinkDialog=function(a,c,d,b){var g=document.createElement("div");mxUtils.write(g,mxResources.get("editLink")+":");var e=document.createElement("div");e.className="geTitle";e.style.backgroundColor="transparent";e.style.borderColor="transparent";e.style.whiteSpace="nowrap";e.style.textOverflow="clip";e.style.cursor="default";mxClient.IS_VML||(e.style.paddingRight="20px");var h=document.createElement("input");h.setAttribute("value",c);h.setAttribute("placeholder","http://www.example.com/");h.setAttribute("type",
+var LinkDialog=function(a,c,d,b){var f=document.createElement("div");mxUtils.write(f,mxResources.get("editLink")+":");var e=document.createElement("div");e.className="geTitle";e.style.backgroundColor="transparent";e.style.borderColor="transparent";e.style.whiteSpace="nowrap";e.style.textOverflow="clip";e.style.cursor="default";mxClient.IS_VML||(e.style.paddingRight="20px");var h=document.createElement("input");h.setAttribute("value",c);h.setAttribute("placeholder","http://www.example.com/");h.setAttribute("type",
"text");h.style.marginTop="6px";h.style.width="400px";h.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";h.style.backgroundRepeat="no-repeat";h.style.backgroundPosition="100% 50%";h.style.paddingRight="14px";c=document.createElement("div");c.setAttribute("title",mxResources.get("reset"));c.style.position="relative";c.style.left="-16px";c.style.width="12px";c.style.height="14px";c.style.cursor="pointer";c.style.display=mxClient.IS_VML?"inline":"inline-block";c.style.top=(mxClient.IS_VML?
-0:3)+"px";c.style.background="url("+IMAGE_PATH+"/transparent.gif)";mxEvent.addListener(c,"click",function(){h.value="";h.focus()});e.appendChild(h);e.appendChild(c);g.appendChild(e);this.init=function(){h.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?h.select():document.execCommand("selectAll",!1,null)};e=document.createElement("div");e.style.marginTop="18px";e.style.textAlign="right";mxEvent.addListener(h,"keypress",function(c){13==c.keyCode&&(a.hideDialog(),
-b(h.value))});c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});c.className="geBtn";a.editor.cancelFirst&&e.appendChild(c);d=mxUtils.button(d,function(){a.hideDialog();b(h.value)});d.className="geBtn gePrimaryBtn";e.appendChild(d);a.editor.cancelFirst||e.appendChild(c);g.appendChild(e);this.container=g},OutlineWindow=function(a,c,d,b,g){function e(){l.outline.pageScale=h.pageScale;l.outline.pageFormat=h.pageFormat;l.outline.pageVisible=h.pageVisible;l.outline.background=null==
-h.background||h.background==mxConstants.NONE?h.defaultPageBackgroundColor:h.background;var a=mxUtils.getCurrentStyle(h.container);f.style.backgroundColor=a.backgroundColor;null!=h.view.backgroundPageShape&&null!=l.outline.view.backgroundPageShape&&(l.outline.view.backgroundPageShape.fill=h.view.backgroundPageShape.fill);l.outline.refresh()}var h=a.editor.graph,f=document.createElement("div");f.style.position="absolute";f.style.width="100%";f.style.height="100%";f.style.border="1px solid whiteSmoke";
-f.style.overflow="hidden";this.window=new mxWindow(mxResources.get("outline"),f,c,d,b,g,!0,!0);this.window.minimumSize=new mxRectangle(0,0,80,80);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.setLocation=function(a,b){var c=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;a=Math.max(0,Math.min(a,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-
+0:3)+"px";c.style.background="url("+IMAGE_PATH+"/transparent.gif)";mxEvent.addListener(c,"click",function(){h.value="";h.focus()});e.appendChild(h);e.appendChild(c);f.appendChild(e);this.init=function(){h.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?h.select():document.execCommand("selectAll",!1,null)};e=document.createElement("div");e.style.marginTop="18px";e.style.textAlign="right";mxEvent.addListener(h,"keypress",function(c){13==c.keyCode&&(a.hideDialog(),
+b(h.value))});c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});c.className="geBtn";a.editor.cancelFirst&&e.appendChild(c);d=mxUtils.button(d,function(){a.hideDialog();b(h.value)});d.className="geBtn gePrimaryBtn";e.appendChild(d);a.editor.cancelFirst||e.appendChild(c);f.appendChild(e);this.container=f},OutlineWindow=function(a,c,d,b,f){function e(){l.outline.pageScale=h.pageScale;l.outline.pageFormat=h.pageFormat;l.outline.pageVisible=h.pageVisible;l.outline.background=null==
+h.background||h.background==mxConstants.NONE?h.defaultPageBackgroundColor:h.background;var a=mxUtils.getCurrentStyle(h.container);g.style.backgroundColor=a.backgroundColor;null!=h.view.backgroundPageShape&&null!=l.outline.view.backgroundPageShape&&(l.outline.view.backgroundPageShape.fill=h.view.backgroundPageShape.fill);l.outline.refresh()}var h=a.editor.graph,g=document.createElement("div");g.style.position="absolute";g.style.width="100%";g.style.height="100%";g.style.border="1px solid whiteSmoke";
+g.style.overflow="hidden";this.window=new mxWindow(mxResources.get("outline"),g,c,d,b,f,!0,!0);this.window.minimumSize=new mxRectangle(0,0,80,80);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.setLocation=function(a,b){var c=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;a=Math.max(0,Math.min(a,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-
this.table.clientWidth));b=Math.max(0,Math.min(b,c-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};var k=mxUtils.bind(this,function(){var a=this.window.getX(),b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window,"resize",k);var l=a.createOutline(this.window);this.destroy=function(){mxEvent.removeListener(window,"resize",k);this.window.destroy();l.destroy()};this.window.addListener(mxEvent.RESIZE,mxUtils.bind(this,
function(){l.update(!1);l.outline.sizeDidChange()}));this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit();l.suspended=!1;l.outline.refresh();l.update()}));this.window.addListener(mxEvent.HIDE,mxUtils.bind(this,function(){l.suspended=!0}));this.window.addListener(mxEvent.NORMALIZE,mxUtils.bind(this,function(){l.suspended=!1;l.update()}));this.window.addListener(mxEvent.MINIMIZE,mxUtils.bind(this,function(){l.suspended=!0}));var m=l.createGraph;l.createGraph=function(a){var b=
-m.apply(this,arguments);b.gridEnabled=!1;b.pageScale=h.pageScale;b.pageFormat=h.pageFormat;b.background=null==h.background||h.background==mxConstants.NONE?h.defaultPageBackgroundColor:h.background;b.pageVisible=h.pageVisible;var c=mxUtils.getCurrentStyle(h.container);f.style.backgroundColor=c.backgroundColor;return b};l.init(f);a.editor.addListener("resetGraphView",e);a.addListener("pageFormatChanged",e);a.addListener("backgroundColorChanged",e);a.addListener("backgroundImageChanged",e);a.addListener("pageViewChanged",
-function(){e();l.update(!0)});if(l.outline.dialect==mxConstants.DIALECT_SVG){var n=a.actions.get("zoomIn"),p=a.actions.get("zoomOut");mxEvent.addMouseWheelListener(function(a,b){for(var c=!1,d=mxEvent.getSource(a);null!=d;){if(d==l.outline.view.canvas.ownerSVGElement){c=!0;break}d=d.parentNode}c&&(b?n.funct():p.funct())})}},LayersWindow=function(a,c,d,b,g){function e(b){if(f.isEnabled()&&null!=b){var c=f.convertValueToString(b),c=new FilenameDialog(a,c||mxResources.get("background"),mxResources.get("rename"),
-mxUtils.bind(this,function(a){null!=a&&f.cellLabelChanged(b,a)}),mxResources.get("enterName"));a.showDialog(c.container,300,100,!0,!0);c.init()}}function h(){function a(a,b,c,d){var g=document.createElement("div");g.className="geToolbarContainer";g.style.overflow="hidden";g.style.position="relative";g.style.padding="4px";g.style.height="22px";g.style.display="block";g.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;g.style.borderWidth="0px 0px 1px 0px";g.style.borderColor=
-"#c3c3c3";g.style.borderStyle="solid";g.style.whiteSpace="nowrap";g.setAttribute("title",b);var k=document.createElement("div");k.style.display="inline-block";k.style.width="100%";k.style.textOverflow="ellipsis";k.style.overflow="hidden";mxEvent.addListener(g,"dragover",function(b){b.dataTransfer.dropEffect="move";p=a;b.stopPropagation();b.preventDefault()});mxEvent.addListener(g,"dragstart",function(a){n=g;mxClient.IS_FF&&a.dataTransfer.setData("Text","<layer/>")});mxEvent.addListener(g,"dragend",
-function(a){null!=n&&null!=p&&f.addCell(c,f.model.root,p);p=n=null;a.stopPropagation();a.preventDefault()});var l=document.createElement("img");l.setAttribute("draggable","false");l.setAttribute("align","top");l.setAttribute("border","0");l.style.padding="4px";l.setAttribute("title",mxResources.get("lockUnlock"));var r=f.getCurrentCellStyle(c);"1"==mxUtils.getValue(r,"locked","0")?l.setAttribute("src",Dialog.prototype.lockedImage):l.setAttribute("src",Dialog.prototype.unlockedImage);f.isEnabled()&&
-(l.style.cursor="pointer");mxEvent.addListener(l,"click",function(a){if(f.isEnabled()){var b=null;f.getModel().beginUpdate();try{b="1"==mxUtils.getValue(r,"locked","0")?null:"1",f.setCellStyles("locked",b,[c])}finally{f.getModel().endUpdate()}"1"==b&&f.removeSelectionCells(f.getModel().getDescendants(c));mxEvent.consume(a)}});k.appendChild(l);l=document.createElement("input");l.setAttribute("type","checkbox");l.setAttribute("title",mxResources.get("hideIt",[c.value||mxResources.get("background")]));
-l.style.marginLeft="4px";l.style.marginRight="6px";l.style.marginTop="4px";k.appendChild(l);f.model.isVisible(c)&&(l.setAttribute("checked","checked"),l.defaultChecked=!0);mxEvent.addListener(l,"click",function(a){f.model.setVisible(c,!f.model.isVisible(c));mxEvent.consume(a)});mxUtils.write(k,b);g.appendChild(k);if(f.isEnabled()){if(mxClient.IS_TOUCH||mxClient.IS_POINTER||mxClient.IS_VML||mxClient.IS_IE&&10>document.documentMode)b=document.createElement("div"),b.style.display="block",b.style.textAlign=
-"right",b.style.whiteSpace="nowrap",b.style.position="absolute",b.style.right="6px",b.style.top="6px",0<a&&(k=document.createElement("a"),k.setAttribute("title",mxResources.get("toBack")),k.className="geButton",k.style.cssFloat="none",k.innerHTML="&#9660;",k.style.width="14px",k.style.height="14px",k.style.fontSize="14px",k.style.margin="0px",k.style.marginTop="-1px",b.appendChild(k),mxEvent.addListener(k,"click",function(b){f.isEnabled()&&f.addCell(c,f.model.root,a-1);mxEvent.consume(b)})),0<=a&&
-a<q-1&&(k=document.createElement("a"),k.setAttribute("title",mxResources.get("toFront")),k.className="geButton",k.style.cssFloat="none",k.innerHTML="&#9650;",k.style.width="14px",k.style.height="14px",k.style.fontSize="14px",k.style.margin="0px",k.style.marginTop="-1px",b.appendChild(k),mxEvent.addListener(k,"click",function(b){f.isEnabled()&&f.addCell(c,f.model.root,a+1);mxEvent.consume(b)})),g.appendChild(b);mxClient.IS_SVG&&(!mxClient.IS_IE||10<=document.documentMode)&&(g.setAttribute("draggable",
-"true"),g.style.cursor="move")}mxEvent.addListener(g,"dblclick",function(a){var b=mxEvent.getSource(a).nodeName;"INPUT"!=b&&"IMG"!=b&&(e(c),mxEvent.consume(a))});f.getDefaultParent()==c?(g.style.background="white"==Dialog.backdropColor?"#e6eff8":"#505759",g.style.fontWeight=f.isEnabled()?"bold":"",u=c):mxEvent.addListener(g,"click",function(a){f.isEnabled()&&(f.setDefaultParent(d),f.view.setCurrentRoot(null),h())});m.appendChild(g)}q=f.model.getChildCount(f.model.root);m.innerHTML="";for(var b=q-
-1;0<=b;b--)mxUtils.bind(this,function(c){a(b,f.convertValueToString(c)||mxResources.get("background"),c,c)})(f.model.getChildAt(f.model.root,b));var c=f.convertValueToString(u)||mxResources.get("background");r.setAttribute("title",mxResources.get("removeIt",[c]));y.setAttribute("title",mxResources.get("duplicateIt",[c]));t.setAttribute("title",mxResources.get("editData"));f.isSelectionEmpty()&&(w.className="geButton mxDisabled")}var f=a.editor.graph,k=document.createElement("div");k.style.userSelect=
+m.apply(this,arguments);b.gridEnabled=!1;b.pageScale=h.pageScale;b.pageFormat=h.pageFormat;b.background=null==h.background||h.background==mxConstants.NONE?h.defaultPageBackgroundColor:h.background;b.pageVisible=h.pageVisible;var c=mxUtils.getCurrentStyle(h.container);g.style.backgroundColor=c.backgroundColor;return b};l.init(g);a.editor.addListener("resetGraphView",e);a.addListener("pageFormatChanged",e);a.addListener("backgroundColorChanged",e);a.addListener("backgroundImageChanged",e);a.addListener("pageViewChanged",
+function(){e();l.update(!0)});if(l.outline.dialect==mxConstants.DIALECT_SVG){var n=a.actions.get("zoomIn"),p=a.actions.get("zoomOut");mxEvent.addMouseWheelListener(function(a,b){for(var c=!1,d=mxEvent.getSource(a);null!=d;){if(d==l.outline.view.canvas.ownerSVGElement){c=!0;break}d=d.parentNode}c&&(b?n.funct():p.funct())})}},LayersWindow=function(a,c,d,b,f){function e(b){if(g.isEnabled()&&null!=b){var c=g.convertValueToString(b),c=new FilenameDialog(a,c||mxResources.get("background"),mxResources.get("rename"),
+mxUtils.bind(this,function(a){null!=a&&g.cellLabelChanged(b,a)}),mxResources.get("enterName"));a.showDialog(c.container,300,100,!0,!0);c.init()}}function h(){function a(a,b,c,d){var f=document.createElement("div");f.className="geToolbarContainer";f.style.overflow="hidden";f.style.position="relative";f.style.padding="4px";f.style.height="22px";f.style.display="block";f.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;f.style.borderWidth="0px 0px 1px 0px";f.style.borderColor=
+"#c3c3c3";f.style.borderStyle="solid";f.style.whiteSpace="nowrap";f.setAttribute("title",b);var k=document.createElement("div");k.style.display="inline-block";k.style.width="100%";k.style.textOverflow="ellipsis";k.style.overflow="hidden";mxEvent.addListener(f,"dragover",function(b){b.dataTransfer.dropEffect="move";p=a;b.stopPropagation();b.preventDefault()});mxEvent.addListener(f,"dragstart",function(a){n=f;mxClient.IS_FF&&a.dataTransfer.setData("Text","<layer/>")});mxEvent.addListener(f,"dragend",
+function(a){null!=n&&null!=p&&g.addCell(c,g.model.root,p);p=n=null;a.stopPropagation();a.preventDefault()});var l=document.createElement("img");l.setAttribute("draggable","false");l.setAttribute("align","top");l.setAttribute("border","0");l.style.padding="4px";l.setAttribute("title",mxResources.get("lockUnlock"));var r=g.getCurrentCellStyle(c);"1"==mxUtils.getValue(r,"locked","0")?l.setAttribute("src",Dialog.prototype.lockedImage):l.setAttribute("src",Dialog.prototype.unlockedImage);g.isEnabled()&&
+(l.style.cursor="pointer");mxEvent.addListener(l,"click",function(a){if(g.isEnabled()){var b=null;g.getModel().beginUpdate();try{b="1"==mxUtils.getValue(r,"locked","0")?null:"1",g.setCellStyles("locked",b,[c])}finally{g.getModel().endUpdate()}"1"==b&&g.removeSelectionCells(g.getModel().getDescendants(c));mxEvent.consume(a)}});k.appendChild(l);l=document.createElement("input");l.setAttribute("type","checkbox");l.setAttribute("title",mxResources.get("hideIt",[c.value||mxResources.get("background")]));
+l.style.marginLeft="4px";l.style.marginRight="6px";l.style.marginTop="4px";k.appendChild(l);g.model.isVisible(c)&&(l.setAttribute("checked","checked"),l.defaultChecked=!0);mxEvent.addListener(l,"click",function(a){g.model.setVisible(c,!g.model.isVisible(c));mxEvent.consume(a)});mxUtils.write(k,b);f.appendChild(k);if(g.isEnabled()){if(mxClient.IS_TOUCH||mxClient.IS_POINTER||mxClient.IS_VML||mxClient.IS_IE&&10>document.documentMode)b=document.createElement("div"),b.style.display="block",b.style.textAlign=
+"right",b.style.whiteSpace="nowrap",b.style.position="absolute",b.style.right="6px",b.style.top="6px",0<a&&(k=document.createElement("a"),k.setAttribute("title",mxResources.get("toBack")),k.className="geButton",k.style.cssFloat="none",k.innerHTML="&#9660;",k.style.width="14px",k.style.height="14px",k.style.fontSize="14px",k.style.margin="0px",k.style.marginTop="-1px",b.appendChild(k),mxEvent.addListener(k,"click",function(b){g.isEnabled()&&g.addCell(c,g.model.root,a-1);mxEvent.consume(b)})),0<=a&&
+a<q-1&&(k=document.createElement("a"),k.setAttribute("title",mxResources.get("toFront")),k.className="geButton",k.style.cssFloat="none",k.innerHTML="&#9650;",k.style.width="14px",k.style.height="14px",k.style.fontSize="14px",k.style.margin="0px",k.style.marginTop="-1px",b.appendChild(k),mxEvent.addListener(k,"click",function(b){g.isEnabled()&&g.addCell(c,g.model.root,a+1);mxEvent.consume(b)})),f.appendChild(b);mxClient.IS_SVG&&(!mxClient.IS_IE||10<=document.documentMode)&&(f.setAttribute("draggable",
+"true"),f.style.cursor="move")}mxEvent.addListener(f,"dblclick",function(a){var b=mxEvent.getSource(a).nodeName;"INPUT"!=b&&"IMG"!=b&&(e(c),mxEvent.consume(a))});g.getDefaultParent()==c?(f.style.background="white"==Dialog.backdropColor?"#e6eff8":"#505759",f.style.fontWeight=g.isEnabled()?"bold":"",u=c):mxEvent.addListener(f,"click",function(a){g.isEnabled()&&(g.setDefaultParent(d),g.view.setCurrentRoot(null),h())});m.appendChild(f)}q=g.model.getChildCount(g.model.root);m.innerHTML="";for(var b=q-
+1;0<=b;b--)mxUtils.bind(this,function(c){a(b,g.convertValueToString(c)||mxResources.get("background"),c,c)})(g.model.getChildAt(g.model.root,b));var c=g.convertValueToString(u)||mxResources.get("background");r.setAttribute("title",mxResources.get("removeIt",[c]));y.setAttribute("title",mxResources.get("duplicateIt",[c]));t.setAttribute("title",mxResources.get("editData"));g.isSelectionEmpty()&&(w.className="geButton mxDisabled")}var g=a.editor.graph,k=document.createElement("div");k.style.userSelect=
"none";k.style.background="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;k.style.border="1px solid whiteSmoke";k.style.height="100%";k.style.marginBottom="10px";k.style.overflow="auto";var l=EditorUi.compactUi?"26px":"30px",m=document.createElement("div");m.style.backgroundColor="white"==Dialog.backdropColor?"#dcdcdc":Dialog.backdropColor;m.style.position="absolute";m.style.overflow="auto";m.style.left="0px";m.style.right="0px";m.style.top="0px";m.style.bottom=parseInt(l)+7+"px";
k.appendChild(m);var n=null,p=null;mxEvent.addListener(k,"dragover",function(a){a.dataTransfer.dropEffect="move";p=0;a.stopPropagation();a.preventDefault()});mxEvent.addListener(k,"drop",function(a){a.stopPropagation();a.preventDefault()});var q=null,u=null,v=document.createElement("div");v.className="geToolbarContainer";v.style.position="absolute";v.style.bottom="0px";v.style.left="0px";v.style.right="0px";v.style.height=l;v.style.overflow="hidden";v.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":
"1px";v.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;v.style.borderWidth="1px 0px 0px 0px";v.style.borderColor="#c3c3c3";v.style.borderStyle="solid";v.style.display="block";v.style.whiteSpace="nowrap";mxClient.IS_QUIRKS&&(v.style.filter="none");l=document.createElement("a");l.className="geButton";mxClient.IS_QUIRKS&&(l.style.filter="none");var r=l.cloneNode();r.innerHTML='<div class="geSprite geSprite-delete" style="display:inline-block;"></div>';mxEvent.addListener(r,
-"click",function(a){if(f.isEnabled()){f.model.beginUpdate();try{var b=f.model.root.getIndex(u);f.removeCells([u],!1);0==f.model.getChildCount(f.model.root)?(f.model.add(f.model.root,new mxCell),f.setDefaultParent(null)):0<b&&b<=f.model.getChildCount(f.model.root)?f.setDefaultParent(f.model.getChildAt(f.model.root,b-1)):f.setDefaultParent(null)}finally{f.model.endUpdate()}}mxEvent.consume(a)});f.isEnabled()||(r.className="geButton mxDisabled");v.appendChild(r);var w=l.cloneNode();w.setAttribute("title",
-mxUtils.trim(mxResources.get("moveSelectionTo",[""])));w.innerHTML='<div class="geSprite geSprite-insert" style="display:inline-block;"></div>';mxEvent.addListener(w,"click",function(b){if(f.isEnabled()&&!f.isSelectionEmpty()){a.editor.graph.popupMenuHandler.hideMenu();var c=new mxPopupMenu(mxUtils.bind(this,function(a,b){for(var c=q-1;0<=c;c--)mxUtils.bind(this,function(c){var d=a.addItem(f.convertValueToString(c)||mxResources.get("background"),null,mxUtils.bind(this,function(){f.moveCells(f.getSelectionCells(),
-0,0,!1,c)}),b);1==f.getSelectionCount()&&f.model.isAncestor(c,f.getSelectionCell())&&a.addCheckmark(d,Editor.checkmarkImage)})(f.model.getChildAt(f.model.root,c))}));c.div.className+=" geMenubarMenu";c.smartSeparators=!0;c.showDisabled=!0;c.autoExpand=!0;c.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(c,arguments);c.destroy()});var d=mxUtils.getOffset(w);c.popup(d.x,d.y+w.offsetHeight,null,b);a.setCurrentMenu(c)}});v.appendChild(w);var t=l.cloneNode();t.innerHTML='<div class="geSprite geSprite-dots" style="display:inline-block;"></div>';
-t.setAttribute("title",mxResources.get("rename"));mxEvent.addListener(t,"click",function(b){f.isEnabled()&&a.showDataDialog(u);mxEvent.consume(b)});f.isEnabled()||(t.className="geButton mxDisabled");v.appendChild(t);var y=l.cloneNode();y.innerHTML='<div class="geSprite geSprite-duplicate" style="display:inline-block;"></div>';mxEvent.addListener(y,"click",function(a){if(f.isEnabled()){a=null;f.model.beginUpdate();try{a=f.cloneCell(u),f.cellLabelChanged(a,mxResources.get("untitledLayer")),a.setVisible(!0),
-a=f.addCell(a,f.model.root),f.setDefaultParent(a)}finally{f.model.endUpdate()}null==a||f.isCellLocked(a)||f.selectAll(a)}});f.isEnabled()||(y.className="geButton mxDisabled");v.appendChild(y);l=l.cloneNode();l.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';l.setAttribute("title",mxResources.get("addLayer"));mxEvent.addListener(l,"click",function(a){if(f.isEnabled()){f.model.beginUpdate();try{var b=f.addCell(new mxCell(mxResources.get("untitledLayer")),f.model.root);
-f.setDefaultParent(b)}finally{f.model.endUpdate()}}mxEvent.consume(a)});f.isEnabled()||(l.className="geButton mxDisabled");v.appendChild(l);k.appendChild(v);h();f.model.addListener(mxEvent.CHANGE,function(){h()});f.selectionModel.addListener(mxEvent.CHANGE,function(){f.isSelectionEmpty()?w.className="geButton mxDisabled":w.className="geButton"});this.window=new mxWindow(mxResources.get("layers"),k,c,d,b,g,!0,!0);this.window.minimumSize=new mxRectangle(0,0,120,120);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);
+"click",function(a){if(g.isEnabled()){g.model.beginUpdate();try{var b=g.model.root.getIndex(u);g.removeCells([u],!1);0==g.model.getChildCount(g.model.root)?(g.model.add(g.model.root,new mxCell),g.setDefaultParent(null)):0<b&&b<=g.model.getChildCount(g.model.root)?g.setDefaultParent(g.model.getChildAt(g.model.root,b-1)):g.setDefaultParent(null)}finally{g.model.endUpdate()}}mxEvent.consume(a)});g.isEnabled()||(r.className="geButton mxDisabled");v.appendChild(r);var w=l.cloneNode();w.setAttribute("title",
+mxUtils.trim(mxResources.get("moveSelectionTo",[""])));w.innerHTML='<div class="geSprite geSprite-insert" style="display:inline-block;"></div>';mxEvent.addListener(w,"click",function(b){if(g.isEnabled()&&!g.isSelectionEmpty()){a.editor.graph.popupMenuHandler.hideMenu();var c=new mxPopupMenu(mxUtils.bind(this,function(a,b){for(var c=q-1;0<=c;c--)mxUtils.bind(this,function(c){var d=a.addItem(g.convertValueToString(c)||mxResources.get("background"),null,mxUtils.bind(this,function(){g.moveCells(g.getSelectionCells(),
+0,0,!1,c)}),b);1==g.getSelectionCount()&&g.model.isAncestor(c,g.getSelectionCell())&&a.addCheckmark(d,Editor.checkmarkImage)})(g.model.getChildAt(g.model.root,c))}));c.div.className+=" geMenubarMenu";c.smartSeparators=!0;c.showDisabled=!0;c.autoExpand=!0;c.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(c,arguments);c.destroy()});var d=mxUtils.getOffset(w);c.popup(d.x,d.y+w.offsetHeight,null,b);a.setCurrentMenu(c)}});v.appendChild(w);var t=l.cloneNode();t.innerHTML='<div class="geSprite geSprite-dots" style="display:inline-block;"></div>';
+t.setAttribute("title",mxResources.get("rename"));mxEvent.addListener(t,"click",function(b){g.isEnabled()&&a.showDataDialog(u);mxEvent.consume(b)});g.isEnabled()||(t.className="geButton mxDisabled");v.appendChild(t);var y=l.cloneNode();y.innerHTML='<div class="geSprite geSprite-duplicate" style="display:inline-block;"></div>';mxEvent.addListener(y,"click",function(a){if(g.isEnabled()){a=null;g.model.beginUpdate();try{a=g.cloneCell(u),g.cellLabelChanged(a,mxResources.get("untitledLayer")),a.setVisible(!0),
+a=g.addCell(a,g.model.root),g.setDefaultParent(a)}finally{g.model.endUpdate()}null==a||g.isCellLocked(a)||g.selectAll(a)}});g.isEnabled()||(y.className="geButton mxDisabled");v.appendChild(y);l=l.cloneNode();l.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';l.setAttribute("title",mxResources.get("addLayer"));mxEvent.addListener(l,"click",function(a){if(g.isEnabled()){g.model.beginUpdate();try{var b=g.addCell(new mxCell(mxResources.get("untitledLayer")),g.model.root);
+g.setDefaultParent(b)}finally{g.model.endUpdate()}}mxEvent.consume(a)});g.isEnabled()||(l.className="geButton mxDisabled");v.appendChild(l);k.appendChild(v);h();g.model.addListener(mxEvent.CHANGE,function(){h()});g.selectionModel.addListener(mxEvent.CHANGE,function(){g.isSelectionEmpty()?w.className="geButton mxDisabled":w.className="geButton"});this.window=new mxWindow(mxResources.get("layers"),k,c,d,b,f,!0,!0);this.window.minimumSize=new mxRectangle(0,0,120,120);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);
this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.init=function(){m.scrollTop=m.scrollHeight-m.clientHeight};this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));this.refreshLayers=h;this.window.setLocation=function(a,b){var c=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;a=Math.max(0,Math.min(a,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));
b=Math.max(0,Math.min(b,c-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};var x=mxUtils.bind(this,function(){var a=this.window.getX(),b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window,"resize",x);this.destroy=function(){mxEvent.removeListener(window,"resize",x);this.window.destroy()}};
(function(){Sidebar.prototype.tagIndex="5V1dV+M6sv01rDvngax0oLvveYQEaGaAziE0PW8sxVYSDbblI9uk6V9/VVWS7ST+kB0zL3etbmIn3ltlfZRKUqkU/rpRLN6MmFJym5yM/8QL/Xnw7yLceXQ03fA3JaOTyfjCQCKZehvu66tErCMW6J9E1M4jlJcFTJWIPP1VIKK1ixj/zML4VBRiTMaf9HOKx8G7/lwy71V/ZJEv8Vv8cKea9KW646tU41nk678/4tK7SZVu5FpC9oz/TDPVnkEPJlsn4wVma1lEnVemGByy6q+M+SXkSmaQ6Vv27gJeBDzyOQDMu1ma5FVEEVBEtuokgQhdyZ62Uv/9qWWoYPRltgx4A3U970/hc6BnIuD+kdI+KbGTcelGce6ec4evOBl/k0r8llGKtWBTvulF98xVKjzEvxWXDVS/M8VHF57Hk0TDpzpxJQGScC9TIoX3euXvVV/UcWWpDFkqsCYyfaM/1ly36vGfgVhv0oiasyfh7ypgyaaBaKHl5/nThqb5VeAvZEigXx8k0AolJJUkVjo7jGBOHFOm29Se3FZin6VsyRL42V+2U90z9crTOGAeIEK8Q1UCnMlGxk4CLWb/gsflKt0y/MLnbzyQccgjaIivAjgTT/Gtr4Quf9cXXWRLjRKxyRwvkBko75hHnjisPzUkP/kyESnHtwoAtQ7kkrehL7UyzUAtLrh6E5g7Nnn9iYo2SWW8ZVr1QYsTIW8gE+ll5kHWQlXGdr/Qug1Zl/RDe2O4FL+fWPBaiJSUZGoDT6HRYT3DN9Gdgy4agY3Q59gj+iIOdAOB/MmYYlHKqYp5PMLaFHMVirSSG2XYySnnZrGHNW19JdaZoiYxGV8LbGq+9DKsT0APT3Sk1ldzXaZszQvOpfzlkndUYodytAPDOEuxuocyEqlUmM+Jbm6HevkAq0sAW8+MB9BmQJs+8HQr1Wup3G2zL6uCetJZjXKofV7J+FLnUUWtxZyLTYa20FzpV1GxEgnVdxH4JOgyS0QECr4F3z3nEUHWUQfUjUi/ZUv7tjqTGaCkl0q6Wou0Ef9tdhslUBAn9Xq4GshZkG6gTmx0m8EqvuGoYzb4iwMYdDnVMcpbS2QM3TYB3mM0Sp71/0fuSVPf7lmki1d10DN3LE6x0/CKut+GuddVgGpRyFCtc/sZYS/Cm9FySdUj3sgIPlOZeZvWNAm1o0uTXH81UO3zZEEqQDkwD5q37t+zdAOqNe/RS/aJ6Tdi5purBt73xV930PiLapT8HTTXqz2Kh7JloQ26bIlVOtAl6dIY9uBPMhbeCdgtu/ZLJeEe1XdduTSPrpc6v9+TlIf64jakMpeQ9RumQFVr3YiV3vcb+eZyy9Viw4Ogl1p+nM2xmofSyNSdYgHjnSzA6m26fu+wTKtwYM30S1LXTkxPsYp0qp+nbu8yg271r4xnWM3/hoseBI+8qttygmLlSfLhZtmsS7CZUd1Kds295iT2m4dTh7aH0qLgF2QqGo5qVVdLtHiPvIp2mdDXinvvXtBgGhLRI4/1sJs09z5TqY6sRCNVqlU+2qxPDNuRuxm20MqLmqNOO3CqHRqxEGEclC3jNtATkMOLhFZpOynrH5FAc3UlcKRsbJHvy/9wD8iylUSFJHhrrfmRYBPaZCGDZ2Mu6QXolr3prFf16OdvsxOjqyqUVPXzVEngw+g2Qrur8WehCxWnqu71sE9gv/QWnrSalK00WglxllLFX+VXVaxv1TMae7yFcRrlV2059PNiNr2+wdxh60gmKamJ7trRDvIm4xsecYXqxI7z6sQ5pICWKDHp6jFiEyjpgtLioL1lU6MmSu3VHZm0QtcI1RVNeCPPjIeKHnuZLamxJzHnNIzdyIzsV2+DJm+Y22ZVlPINS35AxuFl1Bo4nQ5IJ7PIfxyW8xzGplLgaG9BGginPqsrUhn55RCZiLoxbRn4v4dAbkYubdBLFkWoRfXYs24CvPz8lGzpNZchT1XDzN8OSEkcF8ZBhnP+1cq2jJgddJORxMmOmMX7w5A96HXzILoS882Mr/IBWqAHTcjxejheKQPvJRo3kWNuP0g0msMlzn6upFoK36/o6A6R34t5fG0RKMGiNdXSwyFVJX4R6mwE9Y+GsodSb1gcv7cCTRUWmCEx1rI2SAbsPvY2+m9QmTl7mCeBdrAdKeMnTGC24X4ylMvU3qWtzY2Yf5/QdB+kwyKPB1i9agqkwEqZJqm+HLULWY27rx0Q72mUWoass8VjGOIQHihN0cRKenQVagMsqEtZ40YXPq4geB2yGWCXNjHdvWUBLwzZJqO0hL+TVEJ2va5urbACZWbCVYXEuLKywZep5bhnERlBRuANDHRa5c1HgwZlFJY2kWnipFFzIUE+znKy+EtINIQLcbvWDo8tdUmlOANNl1A7/85EXGmvHeBG00tYB81LS0AuLBVnVATUY8Ryv9DreSbjX5/Gw7BN6qTSVmRHniapOrKd1UqFa33dmLRcn4eiO68TzJgwXYga5OrAdj+l/P+s/3w5u4BXnkOdFpGwo5wOb+7Cf+7CX/0GtfRfzjCN8YfJX05g2BeQMAv9mxwCtgIWyOwr5L/o7pR+6SJ3Fe/5QLwwr4C6BIv1fKyzpToXHJTbLiG8/GQotrMJyTgA31zp7sYz07uavDfhI0+ET93fNFPKrlqZnmkCBaS85u7Qkeu8E9ciU7jYt/Oin4Cirkdwp8G3qlPh7jTYKupVrjsR5kytjqzkeYIFXRodnI/DcJL3VsvKmexWjgEoQCsdT/N5gLf5grrxeJ6vHTm4gO6UlxdM9fCJr5VdTooZGIdRDXwVSKniAK23gL3Xr/TsPT66RK06s+5MS1xeX2UqEqZDcGRYCDPKrMfWwKV89WhCtCt0umFC9cHJWKCO87lZ93ND0Yx1Ilesax5NH5/A6H4+Kc+ulmZcK+SoYJnx5BWnwRUNUOzoqJMouyS0VN6PSOkRm10jTnAgsGXKVzQTWkNVwXMVcD3cwHzgiccCc+0iwrV+eIB8vYYrzXPHQmiE1ZMQ1dCqZe8YRowhM391K5bkoGWFgTnpJC0cvypov69W1PHZKu61VvUKlrlgOFehv8dRqYiSVFVPrFeh9R+a6FKwUKF/2DYN5EtABZqrc/t6ZBF2b+Aky+I4EDDf0hE76YPlKyXWsFCNdaYrfEHqwDPaoVMBPZl25/OkuXfYh1AuGViPJI2HzBH4syPx50fiP/fFS0ErkVp1KFpUCxjqH1AdWqWlSspDr9t9mp8sRe05lZKcAbbwhWfvXCT5uaMGgh6KpJLW1xfoBw3LaFijA7pLbA/dLBaAHq0vExEoc+vIsCVvS8dsgKfzHs2zF5UcNegfdc9XQw7LtzEBEfnVuw5qsk9o/ZpU+TG0Qy5lmqJsZZKl/bKVR1cmoRI9kMKywhvIGYGrFIq+bi/73BQ0hZ97urenL6JXo5mqakobbtIVV66p/w8gNxay1cYALkHB9QnaBuTxx//OCudewXQalev3OcXoIopkah29PmH7C415oHVru0dODdPkGKapDAJyVt7oUe06YBVuotXIfZ+gJPdtaYfWuto0odAH8LSEDeELJ+eFgmTOYjMjHzutTu3jF0WpG5cTsOdrF/oO4OA7ZEqfB4GIEzsLWN3o6/CT3nipaAhKotcVWg06C0PjypdFnnW8zKDa16wc7zM8ads4WfHympGqW4QkbMBZ9BJqM5HWi99YkIFBog0Hzio7lkrk6FpEIqHNUzdS+rD2lUqc/dJZEPYVaHSDy8bczBP5mZ0nMo6LJDO2Kt7crnZYv2dpIkqO4Lj+UwiaZGA0N9XXHbZnPaKg7UVm+cmsVbpgLwQqTBDlK2QRjYqU9WGg36q1rR4EKSmgVoQS93g0qWbzMLnj/zKeThc2Ny9xdcxvW89tJ4FBZ+TrYS822IEJJ+OfG7MBproKdaU+lm6ha0k6VD5Wkg2Rn63EH5QRvWjn4LGOw95S7TY+lo3TH5bgr0x4r7qHlmhA5xdL8inC2+X+qnIjibHk+hEt7HPJHmiPr5FDKwqa25qJBIaLoGOvda+c0H4n10rRyKPrgymjDoVVMM5x8qynOBbcSwY9gDZTfidm4q9hNigH6Zq7EjwAgaEWn4CdRLdtSHCS1yLr+oE6voukO1CwEDCn2jNsm2CDCNlvtAe2HK3BYr8H2yZ1uJHuZl7so7STbMGZwqkd6+yc2C8a0q/ngU2T1/pvyFPmk83Tn/jK+AeZjy7QxdUCkrSe3NbTqNgL40jzsEOzt6u1D9tkTG81GT/skQ2ayLenp/lHp2H3zgzG+tdOZtsNHX1oJuNi99VAhH9Z9NF0P6/LNDBfboa6fZhgGdkTPhmqg3Eaf+zelGaa70Uruxfjpw7m7dWUBlIMPOJLqqEnlbYw7m/rCMN8W4EIq3yU28lRr/00O6EP07B7pPtJPgO3BzSObqMkNTPyh4nQVpli6C+Kh7umeGXIdYrzyrTE4a54V+7GdziaNakWdy8rutDfP+5Q6uGXHqZnFasiznRQXfSQERvNwMTfZtcLB/4N88lR1Bd6tC6Wmg+3UpO1nNAGReekn+dT/fCb2QYDbrLizeyyPyxWZ8bSBMBkfKP5KJTH8MncwhpdhJEJPjKZR2kWM4anfp4/4AqMtort1M9HJXJkDjXvCa99fDR7j1goZ+Ci5eNlH6zuA1JT24fiScpErMTelfGWWtwxQgHFjjzCtuJuPPlabFdZTK9hY7OU1LD5pjsLmKV+V7LRWsksxq1hcNHhDR5nYFYqnRg0I1Y7DGhmMD12qaM7njEng52y6I//yONAG9BDsy/0hb98H4T2Hv7Q9t5BMyMPDTB4Nn9XzMNV9SGpaZMwKq/cRu6MBdc0PRqMupDoGiLfYQUGNXqIoSzglobh11Ll0aDyYCql7wahxgrlvX5sEk9cZ8huDzRQKtakbzDk+1FCGCwTPmIQ6tuLe/08bRLHSBvMs1uV8of6M2tpff8UM/Pjklg8LY7ij2R0alrmSxLrke4KNjZKlWGvuIKL9jaT+K844epjeCsbzgtnkPNwXuM/X3fC4BwyjB44eY2kUW1gqzKElvowWzyKevTim5hHprYrSXGfbPU290OwgmbZRoHEXmVmBwR7emHQ9K589FG7k96B/hk0nQWuRNKy6Ee92NUl1NrCPFkWodFqXT7dWLX8EYuTjUw/LIFnGWQh/wD6BXjF5f1UsZTtMB/UxgsRVUy8uA9OYDJGlyEbZyNpS1HacBx90z06HU8knhzZ+GJAVIo1Vl/L92CjS6WtHnxx8r5FZ4xmPbZPYWNQQGbmEnRmuZ+BSxs5k2zBqQJpskiklWy1PIuQ4XrcZbGXdyOzpNmGIhLrhZhgucX6peINVyxIRreX0Gvda5tspRgFQCo8FlPjIwyemeTOGHtHJCIiCLF1sTgfj3fTib1jX+DJSDoQaa0feE+++5K/Z4mSnEGL3N11JS8SdE9HeEraqGfFD0fVEJwXKwldJ25PbrDKdG6T+y0F1RlOcDth5Q1LnHvED0S48Kx/2FCEsd33NxRhFplVkqLAB2obiywGV+ucayDaPEbVTg7QOnlfSrsfbDAhf+w3rmPInvWoA13OtB5XbLiyp9hIlxATesgqVVuZanqbKm6MJh1Y9lBCLL9k9Gl8cwW+HVN5dYJRLrKWiYZmurNPX2FH4z9mJNcfpaWJPKJ1YKpu6aZ3cv+m5HAb00cnVoSnzXdi39v8OjrjroXiW7JZiggXhh5ecLu4/2OIdA7Ih+C08S2Hz/Mi1Fqe56VEdMY8L6Zn4/H4j64J+gKCZEl0trLXXWAjGMsGJWQg26I8EcMmW9IrrmlhBZrg+JIlHLZJUsDSTda8UlJHNIXvj2Y5Dm0N7+NY9pee1o2LUIfB7vYSCPXf0b/4OxT2bsD8RsTjfKH/6Z9VXOcwfICpjK3rhMzX9DytZOyWPLfXrWCUPg9NPwImrq4cFDp2bgze3FOyVbYDpm9SprndbD67s+TRiPMDD27nJfk83rKrqZ7X5xQq0q9YDHNhWMhV5/fLowhZv+42gEJbG6qJssvEbZBSVOXSZTsKYuja+uiYEEIglnuoh940Z5eYnsnancUvHRghyGUuRsN2kzpsWYZVmcuVBAd9W77MgSF8cWI9JZs5sAeipm0DrrRhtrqDCGj+YStWogZxgwj9oEfBAkdsCZHMvHQ0uwCj1xdrQQeRMG1SSzqzI4JDRSpiZTWQ8TCDQIm6wsMEi66wv1qClVex6HKgZJe6zcRte5SqGO6zX6dWll1JmiVrIz2g68ZgQnab6IEXIcRmwh3ZYRxAHN5hGCfHMT5dGKlkiVuP1WAvj64TsOvFLGDWJOJAP/lY+rOPooctUXaFcG5CMCa1a0AHPB6LmSeMTZjfdEePpjmWiipzbiI1JJMhSCDb6SkZvNPUfwVnB0LYx541RzxuJ/k8hFT3ptWjI2OJC8b3RVLQnYF/CSf9GYYUlJRr45LCdn5cmnOM+J+nGctEOKfpC22h0DCFPGOcUCZPT0PubViEX01O6XyqRR4tbFvn7ONCdyczP8nnzoqrvnzzLNmUx3kP0PNFsKof4FFvGGqlYWNjR/bvu+xaITXs0W3mplMCaGSq9dDgslfw95VecO/809fRxfT0YkqMuRWRmxYdiWa1RIXZ4s43G5IMY9p07mxL6Mn4UtAY33ZVfdkuC2NpZQ2orngTjbcXfnaxl7EVNqU7WUX1OZLvoBYVfDWmbgulWK24yneHH1cVriJPvce4Kh95HZSwgX8Tx5T8neyLftHFIDycVUHfSFbhqFqHRluMTCF73Rk7urVIY0gLE+jEreOr5DkbiOfzMTy0c16rX25fTSgzM38k16QXl41tRaVVG+mqHQ9Kj2tRjO4N49KlY/vbrXN4V1f3WuAjOGZmozND0lk84L9yZ3zmzFEzTpQwu8YD2B2viUbXWWKDSOkmchQHFhbnzo2qkgRHQ8tEBty9dVYSnR8lzW0QZLBgZ46HuswCmA8R9ltgtcHh8HNJD3RKA4PMUdZbLlFOtrvUhnEyICPSHGYAsR3mR598eOA4RDUx91qTOIbeVNIBkpDJiqcJlB1dnsAJOg2hOSqwoxkt5cC8PixAfV9cX8Gqx8PJzjAM7N5oP9h+T2rYzFYabfWizslupwMJu8s4qIywhoDnZ+gK/DqkqPM94mMlfji1sFJxfTppGJD3YpwMzng2OOP54IyfB2f8cgzjvK6saydCejFOBmc8G5zxfHDGz4MzfunPCEXQt3+YDK4TahiP0Ak1jEfohBrGI3RCDeMROqGG8QidMBlcJ9QwHqETahiP0Ak1jEfohBrGI3RCDWMfnSDjVL6Y+cxIeMnoK67frkNzxEEetjrhb7XHe/VlzX35Z/NSCj73REj+FIdndDml9mfNO0Si1lGgL+nuK5gEjn+Du6vZ3iiMhyK1J7EeLjJ0IJ0MTApUp8xL0fUFY+1PIThD4lH4kcAc0ZZ7fsEUO87W7k3yOaX2XX9x6sksJg8y+L2461euSImrmyKhGTR4ZOeLfsTzjUylzdYYbqqzuZbvRY8OMSAUjkF3l2M7rL3GgfcSMN/nCg7P1gX0PUvjzEbVbDt124lo0ptoAFl6SwF7LF4S3QbMsrY0LjilL47hGt08fS+aQ3tDMPNvaYbHaMjVCm4278rUQudkb2+mtp+2Z3RgWoYf/YJS812Jv/v7mYQmH57QA7rd3d5cFu+VZMFuaksRSzpcr7Lp9ktr8l9M6+y/mNb5x6Y1f5j/18prJ60PLq+dtD64vHbS+uDyAhVlI6M799fdE5h8YAK31gsPt6BVaZt6RsUp69DTk3fr9ROx1h3yS5LHHaarfvARrtguLAODtUQzBeyZU8d6kM5KpOZkDlwuH5J18iGsZwOxPmOw7TcZpG2xuxs4cH33aI5Jd5J0A/u0wKZ8oZC56GjUdHaNAwVZp8aD2xqnlQ7dlXy5uknqlI8rfmfa4p+V00n/cZ2kaqGdDEA7r5a267C7hbLPjMiWvXFYo0Y/ZnPdiBUy+ToCJYpL0l6tk/j+06MLbE6e4m3OCmUMBlbBmIwYySAVIUXwCUXkNy1blzguKWaN4jE6VDljtma3rNJVX2ak5eHgFEcCGB0nG3TrWcrDQ+wrQdSQmIkm0+0tpXzFpGTTidwVMBCtiEwAsXob3RfLWCX4ypxyl0oZVL1mDXTKAh75Jk66e3WYbjBMgC8SL0vqzqOpBO7WH5vDDkAZ6haFYTV80TxG3EGhkULjQpwqMUeO68F4KirOKKgkwXBn/2FvzDVZc9pEc2C+SiA3Pgq6yskW3VGGFYeCeDJ2blwWhh1SQRGzpMmTZIdgizN+NtQNGoLctdpe2WPnJ+N/XIVx+o67L/O4wYoztyZe5jFhh4EpiyoZ6kje0SLH+OEmmkWxpN90tkyJ4zpgyWbHhcM19WsZkH6Ras0i8du55AloXNdaztzYgSmjVSMTb53tH+BUg7xhGZYONOBme6EMCujYxrX+rN3BeYD6xunkoQ3XlnTdTqBDlETN0hSK5ABzV3IzOXRyoYOyyjWjlS7C4Gzl2KFuctjgTfkpR62bf3bRrzgai5lv1GzlwbDVWPlKbkk35kykmnDxNfh7Eyk+b73cNsoi+HsbRY71qHcpDnlyBic7MhgeB3Q5TsmbJMsckqeTLbVSk+tI5EHclWjjK84IzRcv3ASRtGEiPyEv+h/61AUTSdPlpplatvIkMKP6LPiW06Ed6OhY1wfKmLYftpG+gY7Fc4RyhcXwxBznF3yQ2LXoERXmbJgl6LsIFIGoOEPugOC7tnWi/CywOxNXSxuzuPakZB7BoTLnqxhxGxNtsOAVRmUdSnF0fvb2MtDBzKimE2/MA2mNB7qTEI8873ZXiid0El/MsdYrniqHt38sni8oclZHCnqsvxCLcqZV5+t+fnro/r7m5ryWStYNhRnMYvM+Tnm60EOFmFThlPqfZeZcvRe6EzZntaWkS0wsOJ8spTa4HjHk+6Ibt48fQlPMCVXtlFkLkvG2iMbZYpnXMBwMWHzFas7yPYRn2FSxmTraXlU05nQ71NwNh5Uc4uTB2MANp7Sh5+EmdN03vFN026Vw7ud/xJ2r5Q8KdgOHyTIb+oN5bt1bHpGwXf/vNj8HUrMgLTPqDioiQ1eBf7KAoiFR2zLDcwecuIa+t7TluwWGYR+m9rzA4ghBJ5iZsdwJqknTOi4mHXJ0HtARirSFPaHPBXL1KyZjxYJaSwJh5izfLind6Vpr9KPN18QcHuVG8GizwuetHvkllLGJuoi6sGeG/eObVOI3NJkAhoY154U58DxDm/F6suBsH7TdDa8wy2tA3fQ6YlC9NOXTGgF0TuGI+bD1SyTEX3M0aAXOM1NHtJU7n0ZywCkYmwWjBz30PNV21NvJzuSeO0EfLBzLSaFI8HQybXkJbo+4tZ/tLMW0krl0QcGMLniY2CkXc+kC1c9lJPUyS1OcetH6+4SiDIMPmf4dGpT+0lgaIX3TQmvUXIL7tS5MjYlzg7gjwTfSQF3xN9z0aDhTy1PUXKarOmnpnCoJzWDUmgLFgLBZGF0hcDmELWGhtiVWVYyHIcbCnNNabPDKOwolTaRtHq1FxLnabcBlpslwVCMGezrNyo69hvxMhe7NKq2yCuzowiK1zpsqmSSnl5yFGAIM7kBRVJ1H68B2DYvgp5cBwwNf58z3A5yua4hje1NQxjHTqlC3Bed2VIAx6JNYZTRNUNy1A2UYw6GIJmxFftcFSGvDF8JELCgYOq0S75NO7UvgzpwS72R8qv8/ZWop8DTbmR5fknemaluT2kvj5fRFJLLje6ss2UCcubWuqSZOMX53Uj4XDH+0nxTziHBunKMpfIOWCGTtjU0KwgfbJPYIawXWuUKzqHiBn+9NQxjAUFssWiW8m2z0WSihRldm5Q/ElaZpXEz/6FMhmihnSOm+CF/mw3DTbBjZdrj6CLXi3E5041VrkdJWbsdN3SXA6E78nQk8jJVwWuBLIXHTLNl9S9Ec04PI8pHWKvfRbYEEcvuS8CixfoyRS1PbcJa+8F+wBL2m181vTnDqPM0v3FlG1+IX+QKnipndmk/ZksMe4W/ANBlflVJJs2W7StlP4oAHehqJJ3NiUn8MSXwN4xO/eAtQGNcsGjSN/bzqTf4DMn7D4rLAvbO91851AIa6CmB9wgvHx0e30ekd9TiPUo9cwMH+3uBFFLT571cSLcAO8roTkUFVIjoWj5N7XieKjDzA4dPtYd3b+jiPZCB+xaTSDirhaBFZnWFuWhNLdP3Sb/diemM6EMb2ms3QNzgeGsc+dOUKGM1ktsSZMgjAqTjuIn5idqksZYIGnp6A8MItr205EY/N+dkKcxzX0bLo3kLK9I8hiEr5BNFrh+KEfgwopR5JhgOTPkq5+gBK/QFjy4GFftODSX9ILqqJg5X/TGjj1R8yV3cYSdoPqRDXLMCAGUNSBtJGzhgsO/Y4jyg+xbxXE4/UhoiespQF77gOa0e7eWi0s/FkrD9WNG0CW882fBvwlNxvvFfyzRgorU/HptUVBG6zdODOGk83i2jQkJ/09x4uccbM/F6NH7EINuHhNEZktuOlMlO0SkxXYfnHZpoRBlaYybU5t2wpfL9lQyThV1L6NUm34kZThkF9C91FPjq0dLTEeyeea4Zle02yhLzFiaaEfORJyjLFIrtJa9XA0Uow6UZAnjseLcPmbjwh94VHlsZGJvFhyLlaFp2fuFnzDo/N8PQNxE4Sv5tiJNcw3WJ05d/Mzi2K0n03poX0KACac1zyGqKn2QyqF6wS7MV+zr3Ffc5W5pn9sNl7vLq9ZZrziinM8xgi12CwVt16W+ucAf8z04VDZ2xY+BrLXtdGBSPi9wrCaqp7RnE87+gFdANgfrM75R4c7dvjxeDKy9T7IFTkqpPoAXYQiJZlrB3kA4/TjEKfHyvEPMjQ8/9oogUz+xaPZ4rkdhWwV3hy27QQUIXFY31wI1PasqxWgZv0xJ31xJ13xv3QajQbpCI/82OJnMLpHwJG11x3p1i4shPunlAdMbY+mDQ74SadcT/xlUw/yfthJ12wCVtxPGJgw35XmVR1CLBmupkxBU53VCE5e4Jdu6a1N/jU1l1rz5B4AuZARroHljjTAMIHFadYVUBjqegcRrgofTqgIKykRANWm7VhSMLHsnbdtYLhX+yd4fYTuTUr3ZK8TFkk6wIn7BA84rk3y4CZBY38HByV/9CefZZqa1Lfl8YJ/XyCfkewgYfsgze+EV67KWnwCyZouIcpJvqubXp6Dx4JM7UHUTRkQsZPvlpZHKKVgpsUaIrDDQU11B6PcKoPHFdt7I03bXa7mAqW41X3yDo3lSmmJL/vwBFhASlaZ0jsXfm6MfThLpmtsXarWZdaWwJP3MEp9za1p9FUGY8NLHuHwdEZkWHpAMndYxfT4lC6Wk739fkD6OMCDguCJSBoA4IClZL1lcDRBKiPmgie8rc3xdFw+kwjeHIM+OwY8Pkx4M9dwLDLEephqUG/cXOaBJxi241gdIG+4kXW43VXMcosk0FYzgZhOR+E5fMgLF8GYfnan+USwwljIWfLACtK/kQvqslwVGfDUZ0PQTVlefBuPZhz8PpuYJkMwnI2CMv5kSxwXGOqMvSUXAmcQrK3XWhuFO41mYyfKrRZTYG1ki5oNfaSB2hC6bslXXbkMUtOTIXkCwSfOD/vaNHt0ykmoqEaniUbpOlZskEanyYLB3zLcLiXhOpJgh1RuSzNZBias2Fozoeh+TwMzZdhaL52pzEGUM0iQB1kRM61k/HD1QkeK5NuTjntucUb3rj/tprpZ8605QWTue7CtACZEpkVMuFND5kWP3MmIwfedJDpkq3XNBgIMnvlDFVLdMVZ0HaSDRPKa4knt0sAoRsm4wvsLhYye9Oj0RIfhHRISpdp4+kRO8y0lcR7L3nwnGCMOLdFAsNyFfA3490RiFWHF8OdweQFbLdrOSJxvmjOlJkv6jLjZBjmZqunZ7Og8kSzaixkPM4YUa53yfEfsR6TCvKKsRd7//4P";
@@ -8487,22 +8488,22 @@ DrawioFile.prototype.changeListenerEnabled=!0;DrawioFile.prototype.lastAutosaveR
DrawioFile.prototype.synchronizeFile=function(a,d){this.savingFile?null!=d&&d({message:mxResources.get("busy")}):null!=this.sync?this.sync.fileChanged(a,d):this.updateFile(a,d)};
DrawioFile.prototype.updateFile=function(a,d,c,b){null!=c&&c()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=d&&d():this.getLatestVersion(mxUtils.bind(this,function(g){try{null!=c&&c()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=d&&d():null!=g?this.mergeFile(g,a,d,b):this.reloadFile(a,d))}catch(f){null!=d&&d(f)}}),d))};
DrawioFile.prototype.mergeFile=function(a,d,c,b){var g=!0;try{this.stats.fileMerged++;var f=null!=this.shadowPages?this.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.shadowData).documentElement),k=this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement);if(null!=k&&0<k.length){this.shadowPages=k;this.backupPatch=this.isModified()?this.ui.diffPages(f,this.ui.pages):null;var l=[this.ui.diffPages(null!=b?b:f,this.shadowPages)];if(!this.ignorePatches(l)){var n=this.ui.patchPages(f,
-l[0]);b={};var u=this.ui.getHashValueForPages(n,b),f={},e=this.ui.getHashValueForPages(this.shadowPages,f);"1"==urlParams.test&&EditorUi.debug("File.mergeFile",[this],"backup",this.backupPatch,"patches",l,"checksum",e==u,u);if(null!=u&&u!=e){var m=this.compressReportData(this.getAnonymizedXmlForPages(k)),p=this.compressReportData(this.getAnonymizedXmlForPages(n)),q=this.ui.hashValue(a.getCurrentEtag()),t=this.ui.hashValue(this.getCurrentEtag());this.checksumError(c,l,"Shadow Details: "+JSON.stringify(b)+
-"\nChecksum: "+u+"\nCurrent: "+e+"\nCurrent Details: "+JSON.stringify(f)+"\nFrom: "+q+"\nTo: "+t+"\n\nFile Data:\n"+m+"\nPatched Shadow:\n"+p,null,"mergeFile");return}this.patch(l,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw g=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(a.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=d&&d()}catch(y){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();
-null!=c&&c(y);try{if(g)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,y);else{var v=this.getCurrentUser(),z=null!=v?v.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),z,y)}}catch(C){}}};
+l[0]);b={};var t=this.ui.getHashValueForPages(n,b),f={},e=this.ui.getHashValueForPages(this.shadowPages,f);"1"==urlParams.test&&EditorUi.debug("File.mergeFile",[this],"backup",this.backupPatch,"patches",l,"checksum",e==t,t);if(null!=t&&t!=e){var m=this.compressReportData(this.getAnonymizedXmlForPages(k)),p=this.compressReportData(this.getAnonymizedXmlForPages(n)),v=this.ui.hashValue(a.getCurrentEtag()),q=this.ui.hashValue(this.getCurrentEtag());this.checksumError(c,l,"Shadow Details: "+JSON.stringify(b)+
+"\nChecksum: "+t+"\nCurrent: "+e+"\nCurrent Details: "+JSON.stringify(f)+"\nFrom: "+v+"\nTo: "+q+"\n\nFile Data:\n"+m+"\nPatched Shadow:\n"+p,null,"mergeFile");return}this.patch(l,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw g=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(a.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=d&&d()}catch(x){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();
+null!=c&&c(x);try{if(g)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,x);else{var u=this.getCurrentUser(),y=null!=u?u.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),y,x)}}catch(B){}}};
DrawioFile.prototype.getAnonymizedXmlForPages=function(a){var d=new mxCodec(mxUtils.createXmlDocument()),c=d.document.createElement("mxfile");if(null!=a)for(var b=0;b<a.length;b++){var g=d.encode(new mxGraphModel(a[b].root));"1"!=urlParams.dev&&(g=this.ui.anonymizeNode(g,!0));g.setAttribute("id",a[b].getId());a[b].viewState&&this.ui.editor.graph.saveViewState(a[b].viewState,g,!0);c.appendChild(g)}return mxUtils.getPrettyXml(c)};
DrawioFile.prototype.compressReportData=function(a,d,c){d=null!=d?d:1E4;null!=c&&null!=a&&a.length>c?a=a.substring(0,c)+"[...]":null!=a&&a.length>d&&(a=Graph.compress(a)+"\n");return a};
DrawioFile.prototype.checksumError=function(a,d,c,b,g){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=a&&a();try{if(this.errorReportsEnabled){if(null!=d)for(a=0;a<d.length;a++)this.ui.anonymizePatch(d[a]);var f=mxUtils.bind(this,function(a){var b=this.compressReportData(JSON.stringify(d,null,2));a=null!=a?this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement)),
25E3):"n/a";this.sendErrorReport("Checksum Error in "+g+" "+this.getHash(),(null!=c?c:"")+"\n\nPatches:\n"+b+(null!=a?"\n\nRemote:\n"+a:""),null,7E4)});null==b?f(null):this.getLatestVersion(mxUtils.bind(this,function(a){null!=a&&a.getCurrentEtag()==b?f(a):f(null)}),function(){})}else{var k=this.getCurrentUser(),l=null!=k?k.id:"unknown";EditorUi.logError("Checksum Error in "+g+" "+this.getId(),null,this.getMode()+"."+this.getId(),"user_"+l+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync"));
try{EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+this.getHash(),action:g,label:"user_"+l+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")})}catch(n){}}}catch(n){}};
-DrawioFile.prototype.sendErrorReport=function(a,d,c,b){try{var g=this.compressReportData(this.getAnonymizedXmlForPages(this.shadowPages),25E3),f=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),k=this.getCurrentUser(),l=null!=k?this.ui.hashValue(k.id):"unknown",n=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",u=this.getTitle(),e=u.lastIndexOf("."),k="xml";0<e&&(k=u.substring(e));var m=null!=c?c.stack:Error().stack;EditorUi.sendReport(a+" "+(new Date).toISOString()+
+DrawioFile.prototype.sendErrorReport=function(a,d,c,b){try{var g=this.compressReportData(this.getAnonymizedXmlForPages(this.shadowPages),25E3),f=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),k=this.getCurrentUser(),l=null!=k?this.ui.hashValue(k.id):"unknown",n=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",t=this.getTitle(),e=t.lastIndexOf("."),k="xml";0<e&&(k=t.substring(e));var m=null!=c?c.stack:Error().stack;EditorUi.sendReport(a+" "+(new Date).toISOString()+
":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+k+")\nUser="+l+n+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=d?"\n\n"+d:
"")+(null!=c?"\n\nError: "+c.message:"")+"\n\nStack:\n"+m+"\n\nShadow:\n"+g+"\n\nData:\n"+f,b)}catch(p){}};
DrawioFile.prototype.reloadFile=function(a,d){try{this.ui.spinner.stop();var c=mxUtils.bind(this,function(){this.stats.fileReloaded++;this.reportEnabled=!1;var b=this.ui.editor.graph.getViewState(),c=this.ui.editor.graph.getSelectionCells(),d=this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(d,b,c);null!=this.backupPatch&&this.patch([this.backupPatch]);var f=this.ui.getCurrentFile();null!=f&&(f.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)}),c,mxResources.get("cancel"),mxResources.get("discardChanges")):c()}catch(b){null!=d&&d(b)}};DrawioFile.prototype.copyFile=function(a,d){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};
DrawioFile.prototype.ignorePatches=function(a){for(var d=!0,c=0;c<a.length&&d;c++)d=d&&0==Object.keys(a[c]).length;return d};
-DrawioFile.prototype.patch=function(a,d){var c=this.ui.editor.undoManager,b=c.history.slice(),g=c.indexOfNextAdd,f=this.ui.editor.graph;f.container.style.visibility="hidden";var k=this.changeListenerEnabled;this.changeListenerEnabled=!1;var l=f.foldingEnabled,n=f.mathEnabled,u=f.cellRenderer.redraw;f.cellRenderer.redraw=function(a){a.view.graph.isEditing(a.cell)&&(a.view.graph.scrollCellToVisible(a.cell),a.view.graph.cellEditor.resize());u.apply(this,arguments)};f.model.beginUpdate();try{for(var e=
-0;e<a.length;e++)this.ui.pages=this.ui.patchPages(this.ui.pages,a[e],!0,d,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{f.container.style.visibility="";f.model.endUpdate();f.cellRenderer.redraw=u;this.changeListenerEnabled=k;c.history=b;c.indexOfNextAdd=g;c.fireEvent(new mxEventObject(mxEvent.CLEAR));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)n!=
+DrawioFile.prototype.patch=function(a,d){var c=this.ui.editor.undoManager,b=c.history.slice(),g=c.indexOfNextAdd,f=this.ui.editor.graph;f.container.style.visibility="hidden";var k=this.changeListenerEnabled;this.changeListenerEnabled=!1;var l=f.foldingEnabled,n=f.mathEnabled,t=f.cellRenderer.redraw;f.cellRenderer.redraw=function(a){a.view.graph.isEditing(a.cell)&&(a.view.graph.scrollCellToVisible(a.cell),a.view.graph.cellEditor.resize());t.apply(this,arguments)};f.model.beginUpdate();try{for(var e=
+0;e<a.length;e++)this.ui.pages=this.ui.patchPages(this.ui.pages,a[e],!0,d,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{f.container.style.visibility="";f.model.endUpdate();f.cellRenderer.redraw=t;this.changeListenerEnabled=k;c.history=b;c.indexOfNextAdd=g;c.fireEvent(new mxEventObject(mxEvent.CLEAR));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)n!=
f.mathEnabled?(this.ui.editor.updateGraphComponents(),f.refresh()):(l!=f.foldingEnabled?f.view.revalidate():f.view.validate(),f.sizeDidChange());this.ui.updateTabContainer()}};
DrawioFile.prototype.save=function(a,d,c,b,g,f){try{if(this.isEditable())if(!g&&this.invalidChecksum)if(null!=c)c({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=d&&d();else if(null!=c)c({message:mxResources.get("readOnly")});else throw Error(mxResources.get("readOnly"));}catch(k){if(null!=c)c(k);else throw k;}};
DrawioFile.prototype.updateFileData=function(a){this.setData(this.ui.getFileData(null,null,null,null,null,null,null,null,this,null!=a?!a:!this.isCompressed()))};DrawioFile.prototype.isCompressedStorage=function(){return!0};DrawioFile.prototype.isCompressed=function(){var a=null!=this.ui.fileNode?this.ui.fileNode.getAttribute("compressed"):null;return null!=a?"false"!=a:this.isCompressedStorage()&&Editor.compressXml};
@@ -8562,23 +8563,23 @@ StorageFile.listFiles=function(a,d,c,b){a.getDatabaseItems(function(a){var b=[];
StorageLibrary.prototype.isRenamable=function(a,d,c){return".scratchpad"!=this.title};StorageLibrary.prototype.open=function(){};RemoteFile=function(a,d,c){DrawioFile.call(this,a,d);this.title=c;this.mode=null};mxUtils.extend(RemoteFile,DrawioFile);RemoteFile.prototype.isAutosave=function(){return!1};RemoteFile.prototype.getMode=function(){return this.mode};RemoteFile.prototype.getTitle=function(){return this.title};RemoteFile.prototype.isRenamable=function(){return!1};RemoteFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};RemoteLibrary=function(a,d,c){RemoteFile.call(this,a,d,c.title);this.libObj=c};mxUtils.extend(RemoteLibrary,LocalFile);RemoteLibrary.prototype.getHash=function(){return"R"+encodeURIComponent(JSON.stringify([this.libObj.id,this.libObj.title,this.libObj.downloadUrl]))};RemoteLibrary.prototype.isEditable=function(){return!1};RemoteLibrary.prototype.isRenamable=function(){return!1};RemoteLibrary.prototype.isAutosave=function(){return!1};RemoteLibrary.prototype.save=function(a,d,c){};
RemoteLibrary.prototype.saveAs=function(a,d,c){};RemoteLibrary.prototype.updateFileData=function(){};RemoteLibrary.prototype.open=function(){};UrlLibrary=function(a,d,c){StorageFile.call(this,a,d,c);a=c;d=a.lastIndexOf("/");0<=d&&(a=a.substring(d+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,d,c){return!1};UrlLibrary.prototype.saveAs=function(a,d,c){};UrlLibrary.prototype.open=function(){};/*
mxClient.IS_IOS || */
-var StorageDialog=function(a,d,c){function b(b,p,f,v,q,t){function g(){mxEvent.addListener(B,"click",null!=t?t:function(){f!=App.MODE_GOOGLE||a.isDriveDomain()?f==App.MODE_GOOGLE&&a.spinner.spin(document.body,mxResources.get("authorizing"))?a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();a.setMode(f,n.checked);d()})):f==App.MODE_ONEDRIVE&&a.spinner.spin(document.body,mxResources.get("authorizing"))?a.oneDrive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();a.setMode(f,n.checked);
-d()})):(a.setMode(f,n.checked),d()):window.location.hostname=DriveClient.prototype.newAppHostname})}++u>c&&(mxUtils.br(e),u=0);var B=document.createElement("a");B.style.overflow="hidden";B.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";B.className="geBaseButton";B.style.boxSizing="border-box";B.style.fontSize="11px";B.style.position="relative";B.style.margin="4px";B.style.marginTop="2px";B.style.padding="8px 10px 12px 10px";B.style.width="88px";B.style.height=StorageDialog.extended?"50px":
-"100px";B.style.whiteSpace="nowrap";B.setAttribute("title",p);mxClient.IS_QUIRKS&&(B.style.cssFloat="left",B.style.zoom="1");var A=document.createElement("div");A.style.textOverflow="ellipsis";A.style.overflow="hidden";if(null!=b){var x=document.createElement("img");x.setAttribute("src",b);x.setAttribute("border","0");x.setAttribute("align","absmiddle");x.style.width=StorageDialog.extended?"24px":"60px";x.style.height=StorageDialog.extended?"24px":"60px";x.style.paddingBottom=StorageDialog.extended?
-"4px":"6px";B.appendChild(x)}else A.style.paddingTop="5px",A.style.whiteSpace="normal",mxClient.IS_IOS?(B.style.padding="0px 10px 20px 10px",B.style.top="6px"):mxClient.IS_FF&&(A.style.paddingTop="0px",A.style.marginTop="-2px");StorageDialog.extended&&(B.style.paddingTop="4px",B.style.marginBottom="0px",A.display="inline-block",2==c&&(x.style.width="38px",x.style.height="38px",B.style.width="80px",B.style.height="68px"));B.appendChild(A);mxUtils.write(A,p);if(null!=q)for(b=0;b<q.length;b++)mxUtils.br(A),
-mxUtils.write(A,q[b]);if(null!=v&&null==a[v]){x.style.visibility="hidden";mxUtils.setOpacity(A,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(B);var l=window.setTimeout(function(){null==a[v]&&(k.stop(),B.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(b,e){null!=a[v]&&e.getProperty("client")==a[v]&&(window.clearTimeout(l),mxUtils.setOpacity(A,
-100),x.style.visibility="",k.stop(),g(),"drive"==v&&null!=m.parentNode&&m.parentNode.removeChild(m))}))}else g();e.appendChild(B)}c=null!=c?c:2;var g=document.createElement("div");g.style.textAlign="center";g.style.whiteSpace="nowrap";g.style.paddingTop="0px";g.style.paddingBottom="20px";var f=a.addLanguageMenu(g,!0);null!=f&&(f.style.bottom=parseInt("28px")-3+"px");if(!a.isOffline()&&1<a.getServiceCount()){f=document.createElement("a");f.setAttribute("href","https://about.draw.io/support/");f.setAttribute("title",
+var StorageDialog=function(a,d,c){function b(b,p,f,u,q,v){function g(){mxEvent.addListener(C,"click",null!=v?v:function(){f!=App.MODE_GOOGLE||a.isDriveDomain()?f==App.MODE_GOOGLE&&a.spinner.spin(document.body,mxResources.get("authorizing"))?a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();a.setMode(f,n.checked);d()})):f==App.MODE_ONEDRIVE&&a.spinner.spin(document.body,mxResources.get("authorizing"))?a.oneDrive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();a.setMode(f,n.checked);
+d()})):(a.setMode(f,n.checked),d()):window.location.hostname=DriveClient.prototype.newAppHostname})}++t>c&&(mxUtils.br(e),t=0);var C=document.createElement("a");C.style.overflow="hidden";C.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";C.className="geBaseButton";C.style.boxSizing="border-box";C.style.fontSize="11px";C.style.position="relative";C.style.margin="4px";C.style.marginTop="2px";C.style.padding="8px 10px 12px 10px";C.style.width="88px";C.style.height=StorageDialog.extended?"50px":
+"100px";C.style.whiteSpace="nowrap";C.setAttribute("title",p);mxClient.IS_QUIRKS&&(C.style.cssFloat="left",C.style.zoom="1");var z=document.createElement("div");z.style.textOverflow="ellipsis";z.style.overflow="hidden";if(null!=b){var k=document.createElement("img");k.setAttribute("src",b);k.setAttribute("border","0");k.setAttribute("align","absmiddle");k.style.width=StorageDialog.extended?"24px":"60px";k.style.height=StorageDialog.extended?"24px":"60px";k.style.paddingBottom=StorageDialog.extended?
+"4px":"6px";C.appendChild(k)}else z.style.paddingTop="5px",z.style.whiteSpace="normal",mxClient.IS_IOS?(C.style.padding="0px 10px 20px 10px",C.style.top="6px"):mxClient.IS_FF&&(z.style.paddingTop="0px",z.style.marginTop="-2px");StorageDialog.extended&&(C.style.paddingTop="4px",C.style.marginBottom="0px",z.display="inline-block",2==c&&(k.style.width="38px",k.style.height="38px",C.style.width="80px",C.style.height="68px"));C.appendChild(z);mxUtils.write(z,p);if(null!=q)for(b=0;b<q.length;b++)mxUtils.br(z),
+mxUtils.write(z,q[b]);if(null!=u&&null==a[u]){k.style.visibility="hidden";mxUtils.setOpacity(z,10);var A=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});A.spin(C);var l=window.setTimeout(function(){null==a[u]&&(A.stop(),C.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(b,e){null!=a[u]&&e.getProperty("client")==a[u]&&(window.clearTimeout(l),mxUtils.setOpacity(z,
+100),k.style.visibility="",A.stop(),g(),"drive"==u&&null!=m.parentNode&&m.parentNode.removeChild(m))}))}else g();e.appendChild(C)}c=null!=c?c:2;var g=document.createElement("div");g.style.textAlign="center";g.style.whiteSpace="nowrap";g.style.paddingTop="0px";g.style.paddingBottom="20px";var f=a.addLanguageMenu(g,!0);null!=f&&(f.style.bottom=parseInt("28px")-3+"px");if(!a.isOffline()&&1<a.getServiceCount()){f=document.createElement("a");f.setAttribute("href","https://about.draw.io/support/");f.setAttribute("title",
mxResources.get("help"));f.setAttribute("target","_blank");f.style.position="absolute";f.style.userSelect="none";f.style.textDecoration="none";f.style.cursor="pointer";f.style.fontSize="12px";f.style.bottom="28px";f.style.left="26px";f.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";f.appendChild(k);
mxUtils.write(f,mxResources.get("help"));g.appendChild(f)}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";l.style.userSelect="none";mxUtils.write(l,mxResources.get("decideLater"));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"};g.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});f=document.createElement("div");mxClient.IS_QUIRKS&&(f.style.whiteSpace="nowrap",f.style.cssFloat="left");f.style.border="1px solid #d3d3d3";f.style.borderWidth="1px 0px 1px 0px";f.style.padding="12px 0px 12px 0px";var n=document.createElement("input");n.setAttribute("type","checkbox");n.setAttribute("checked","checked");n.defaultChecked=
-!0;var u=0,e=document.createElement("div");e.style.paddingTop="2px";f.appendChild(e);var m=document.createElement("p"),k=document.createElement("p");k.style.fontSize="16pt";k.style.padding="0px";k.style.paddingTop="4px";k.style.paddingBottom="16px";k.style.margin="0px";k.style.color="gray";mxUtils.write(k,mxResources.get("saveDiagramsTo")+":");g.appendChild(k);var p=function(){u=0;"function"===typeof window.DriveClient&&b(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,
+!0;var t=0,e=document.createElement("div");e.style.paddingTop="2px";f.appendChild(e);var m=document.createElement("p"),k=document.createElement("p");k.style.fontSize="16pt";k.style.padding="0px";k.style.paddingTop="4px";k.style.paddingBottom="16px";k.style.margin="0px";k.style.color="gray";mxUtils.write(k,mxResources.get("saveDiagramsTo")+":");g.appendChild(k);var p=function(){t=0;"function"===typeof window.DriveClient&&b(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,
"drive");"function"===typeof window.OneDriveClient&&b(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive");b(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);!isLocalStorage||"1"!=urlParams.browser&&"1"!=urlParams.offline||b(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER);StorageDialog.extended&&("function"===typeof window.DropboxClient&&b(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,
-"dropbox"),null!=a.gitHub&&b(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub"),null!=a.gitLab&&b(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab"))};g.appendChild(f);p();k=document.createElement("p");k.style.marginTop="8px";k.style.marginBottom="6px";var q=document.createElement("div");q.style.marginBottom="10px";if(!a.isOfflineApp()){var t=document.createElement("a");t.style.color="gray";t.style.fontSize="12px";t.style.cursor="pointer";
-t.style.userSelect="none";mxUtils.write(t,(StorageDialog.extended?mxResources.get("showLess"):mxResources.get("showMore"))+"...");q.appendChild(t);k.appendChild(q);mxEvent.addListener(t,"click",function(a){e.innerHTML="";t.innerHTML="";StorageDialog.extended=!StorageDialog.extended;p();mxUtils.write(t,(StorageDialog.extended?mxResources.get("showLess"):mxResources.get("showMore"))+"...");mxEvent.consume(a)})}k.appendChild(n);var v=document.createElement("span");v.style.color="gray";v.style.fontSize=
-"12px";v.style.userSelect="none";mxUtils.write(v," "+mxResources.get("rememberThisSetting"));k.appendChild(v);mxUtils.br(k);q=a.getRecent();if(!a.isOfflineApp()&&null!=q&&0<q.length){var z=document.createElement("select");z.style.marginTop="8px";z.style.maxWidth="170px";var y=document.createElement("option");y.setAttribute("value","");y.setAttribute("selected","selected");y.style.textAlign="center";mxUtils.write(y,mxResources.get("openRecent")+"...");z.appendChild(y);for(y=0;y<q.length;y++)(function(a){var b=
-a.mode;b==App.MODE_GOOGLE?b="googleDrive":b==App.MODE_ONEDRIVE&&(b="oneDrive");var e=document.createElement("option");e.setAttribute("value",a.id);mxUtils.write(e,a.title+" ("+mxResources.get(b)+")");z.appendChild(e)})(q[y]);k.appendChild(z);mxEvent.addListener(z,"change",function(b){""!=z.value&&a.loadFile(z.value)})}else k.style.marginTop="20px",f.style.padding="30px 0px 26px 0px";Graph.fileSupport&&(q=document.createElement("div"),q.style.marginBottom="10px",q.style.padding="18px 0px 6px 0px",
-y=document.createElement("a"),y.style.cursor="pointer",y.style.fontSize="12px",y.style.color="gray",y.style.userSelect="none",mxUtils.write(y,mxResources.get("import")+": "+mxResources.get("gliffy")+", "+mxResources.get("formatVssx")+", "+mxResources.get("formatVsdx")+", "+mxResources.get("lucidchart")+"..."),mxEvent.addListener(y,"click",function(){if(null==a.storageFileInputElt){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.type="",b.type="file",b.value="")});b.style.display="none";document.body.appendChild(b);a.storageFileInputElt=b}a.storageFileInputElt.click()}),q.appendChild(y),k.appendChild(q),f.style.paddingBottom="4px");f.appendChild(k);mxEvent.addListener(v,"click",function(a){n.checked=!n.checked;mxEvent.consume(a)});mxClient.IS_SVG&&isLocalStorage&&"0"!=urlParams.gapi&&(null==document.documentMode||10<=document.documentMode)&&window.setTimeout(function(){null==a.drive&&
+"dropbox"),null!=a.gitHub&&b(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub"),null!=a.gitLab&&b(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab"))};g.appendChild(f);p();k=document.createElement("p");k.style.marginTop="8px";k.style.marginBottom="6px";var v=document.createElement("div");v.style.marginBottom="10px";if(!a.isOfflineApp()){var q=document.createElement("a");q.style.color="gray";q.style.fontSize="12px";q.style.cursor="pointer";
+q.style.userSelect="none";mxUtils.write(q,(StorageDialog.extended?mxResources.get("showLess"):mxResources.get("showMore"))+"...");v.appendChild(q);k.appendChild(v);mxEvent.addListener(q,"click",function(a){e.innerHTML="";q.innerHTML="";StorageDialog.extended=!StorageDialog.extended;p();mxUtils.write(q,(StorageDialog.extended?mxResources.get("showLess"):mxResources.get("showMore"))+"...");mxEvent.consume(a)})}k.appendChild(n);var u=document.createElement("span");u.style.color="gray";u.style.fontSize=
+"12px";u.style.userSelect="none";mxUtils.write(u," "+mxResources.get("rememberThisSetting"));k.appendChild(u);mxUtils.br(k);v=a.getRecent();if(!a.isOfflineApp()&&null!=v&&0<v.length){var y=document.createElement("select");y.style.marginTop="8px";y.style.maxWidth="170px";var x=document.createElement("option");x.setAttribute("value","");x.setAttribute("selected","selected");x.style.textAlign="center";mxUtils.write(x,mxResources.get("openRecent")+"...");y.appendChild(x);for(x=0;x<v.length;x++)(function(a){var b=
+a.mode;b==App.MODE_GOOGLE?b="googleDrive":b==App.MODE_ONEDRIVE&&(b="oneDrive");var e=document.createElement("option");e.setAttribute("value",a.id);mxUtils.write(e,a.title+" ("+mxResources.get(b)+")");y.appendChild(e)})(v[x]);k.appendChild(y);mxEvent.addListener(y,"change",function(b){""!=y.value&&a.loadFile(y.value)})}else k.style.marginTop="20px",f.style.padding="30px 0px 26px 0px";Graph.fileSupport&&(v=document.createElement("div"),v.style.marginBottom="10px",v.style.padding="18px 0px 6px 0px",
+x=document.createElement("a"),x.style.cursor="pointer",x.style.fontSize="12px",x.style.color="gray",x.style.userSelect="none",mxUtils.write(x,mxResources.get("import")+": "+mxResources.get("gliffy")+", "+mxResources.get("formatVssx")+", "+mxResources.get("formatVsdx")+", "+mxResources.get("lucidchart")+"..."),mxEvent.addListener(x,"click",function(){if(null==a.storageFileInputElt){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.type="",b.type="file",b.value="")});b.style.display="none";document.body.appendChild(b);a.storageFileInputElt=b}a.storageFileInputElt.click()}),v.appendChild(x),k.appendChild(v),f.style.paddingBottom="4px");f.appendChild(k);mxEvent.addListener(u,"click",function(a){n.checked=!n.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://desk.draw.io/a/solutions/articles/16000074659" target="_blank"><img border="0" src="'+mxGraph.prototype.warningImage.src+'" align="top"> '+mxResources.get("googleDriveMissingClickHere")+"</a>",g.appendChild(m))},5E3);this.container=g};StorageDialog.extended=!1;
var SplashDialog=function(a){var d=document.createElement("div");d.style.textAlign="center";var c=a.addLanguageMenu(d,!0);null!=c&&(c.style.bottom="19px");c=null;c=a.getServiceCount();if(!a.isOffline()&&1<c){c=document.createElement("a");c.setAttribute("href","https://about.draw.io/support/");c.setAttribute("title",mxResources.get("help"));c.setAttribute("target","_blank");c.style.position="absolute";c.style.fontSize="12px";c.style.textDecoration="none";c.style.cursor="pointer";c.style.bottom="22px";
c.style.left="26px";c.style.color="gray";var b=document.createElement("img");mxUtils.setOpacity(b,50);b.style.height="16px";b.style.width="16px";b.setAttribute("border","0");b.setAttribute("valign","bottom");b.setAttribute("src",Editor.helpImage);b.style.marginRight="2px";c.appendChild(b);mxUtils.write(c,mxResources.get("help"));d.appendChild(c)}c=document.createElement("p");c.style.fontSize="16pt";c.style.padding="0px";c.style.paddingTop="2px";c.style.margin="0px";c.style.color="gray";b=document.createElement("img");
@@ -8595,30 +8596,30 @@ mxEvent.addListener(c,"click",function(){a.hideDialog(!1);a.setMode(null);a.clea
f.style.color="gray";mxUtils.write(f,a.formatFileSize(d.length));b.appendChild(f);var l=document.createElement("textarea");l.setAttribute("autocomplete","off");l.setAttribute("autocorrect","off");l.setAttribute("autocapitalize","off");l.setAttribute("spellcheck","false");l.style.fontFamily="monospace";l.style.wordBreak="break-all";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");
b.appendChild(l);mxUtils.br(b);this.init=function(){window.setTimeout(function(){5E5>d.length?(l.value=d,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=d.substring(0,340)+"... ("+mxResources.get("drawingTooLarge")+")")},0)};f=document.createElement("div");f.style.position="absolute";f.style.bottom="36px";f.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>d.length?"preview":"openInNewWindow"),function(){var b=5E5>d.length?l.value:d;if(null!=g)g(b);else if(k)try{var e=a.openLink(b);null!=e&&(null==c||0<c)&&window.setTimeout(mxUtils.bind(this,function(){null!=e&&null!=e.location.href&&e.location.href.substring(0,8)!=b.substring(0,8)&&(e.close(),a.handleError({message:mxResources.get("drawingTooLarge")}))}),
-c||500)}catch(t){a.handleError({message:t.message||mxResources.get("drawingTooLarge")})}else{var f=window.open(),f=null!=f?f.document:null;null!=f?(f.writeln("<html><head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head><body>'+d+"</body></html>"),f.close()):a.handleError({message:mxResources.get("errorUpdatingPreview")})}}),n.className="geBtn",f.appendChild(n));if(!k||7500<d.length){var u=mxUtils.button(mxResources.get("download"),function(){a.hideDialog();
-a.saveData("embed.txt","txt",d,"text/plain")});u.className="geBtn";f.appendChild(u)}if(k&&(!a.isOffline()||mxClient.IS_CHROMEAPP)){if(51200>d.length){var e=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")})}}),u=document.createElement("img");u.setAttribute("src",Editor.facebookImage);u.setAttribute("width","18");u.setAttribute("height","18");u.setAttribute("border",
-"0");e.appendChild(u);e.setAttribute("title",mxResources.get("facebook")+" ("+a.formatFileSize(51200)+" max)");e.style.verticalAlign="bottom";e.style.paddingTop="4px";e.style.minWidth="46px";e.className="geBtn";f.appendChild(e)}7168>d.length&&(e=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")})}}),
-u=document.createElement("img"),u.setAttribute("src",Editor.tweetImage),u.setAttribute("width","18"),u.setAttribute("height","18"),u.setAttribute("border","0"),u.style.marginBottom="5px",e.appendChild(u),e.setAttribute("title",mxResources.get("twitter")+" ("+a.formatFileSize(7168)+" max)"),e.style.verticalAlign="bottom",e.style.paddingTop="4px",e.style.minWidth="46px",e.className="geBtn",f.appendChild(e))}u=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});f.appendChild(u);e=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>d.length?mxClient.IS_SF||null!=document.documentMode?u.className="geBtn gePrimaryBtn":(f.appendChild(e),e.className="geBtn gePrimaryBtn",u.className="geBtn"):(f.appendChild(n),u.className="geBtn",n.className="geBtn gePrimaryBtn");b.appendChild(f);this.container=b};
+c||500)}catch(q){a.handleError({message:q.message||mxResources.get("drawingTooLarge")})}else{var f=window.open(),f=null!=f?f.document:null;null!=f?(f.writeln("<html><head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head><body>'+d+"</body></html>"),f.close()):a.handleError({message:mxResources.get("errorUpdatingPreview")})}}),n.className="geBtn",f.appendChild(n));if(!k||7500<d.length){var t=mxUtils.button(mxResources.get("download"),function(){a.hideDialog();
+a.saveData("embed.txt","txt",d,"text/plain")});t.className="geBtn";f.appendChild(t)}if(k&&(!a.isOffline()||mxClient.IS_CHROMEAPP)){if(51200>d.length){var e=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")})}}),t=document.createElement("img");t.setAttribute("src",Editor.facebookImage);t.setAttribute("width","18");t.setAttribute("height","18");t.setAttribute("border",
+"0");e.appendChild(t);e.setAttribute("title",mxResources.get("facebook")+" ("+a.formatFileSize(51200)+" max)");e.style.verticalAlign="bottom";e.style.paddingTop="4px";e.style.minWidth="46px";e.className="geBtn";f.appendChild(e)}7168>d.length&&(e=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")})}}),
+t=document.createElement("img"),t.setAttribute("src",Editor.tweetImage),t.setAttribute("width","18"),t.setAttribute("height","18"),t.setAttribute("border","0"),t.style.marginBottom="5px",e.appendChild(t),e.setAttribute("title",mxResources.get("twitter")+" ("+a.formatFileSize(7168)+" max)"),e.style.verticalAlign="bottom",e.style.paddingTop="4px",e.style.minWidth="46px",e.className="geBtn",f.appendChild(e))}t=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});f.appendChild(t);e=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>d.length?mxClient.IS_SF||null!=document.documentMode?t.className="geBtn gePrimaryBtn":(f.appendChild(e),e.className="geBtn gePrimaryBtn",t.className="geBtn"):(f.appendChild(n),t.className="geBtn",n.className="geBtn gePrimaryBtn");b.appendChild(f);this.container=b};
EmbedDialog.showPreviewOption=!0;
-var GoogleSitesDialog=function(a,d){function c(){var a=null!=D&&null!=D.getTitle()?D.getTitle():this.defaultFilename;if(A.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<E.length&&(b+="&s="+E);""!=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="+(x.checked?"1":"0");
-b+="&resize="+(C.checked?"1":"0");b+="&x0="+Number(e.value);b+="&y0="+n;g.mathEnabled&&(b+="&math=1");y.checked?b+="&edit=_blank":z.checked&&(b+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));u.value=b}else D.constructor==DriveFile||D.constructor==DropboxFile?(b="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=p.value?b+=encodeURIComponent(mxUtils.htmlEntities(p.value))+"&type=3":(b+=D.getHash().substring(1),b=D.constructor==DropboxFile?b+"&type=2":b+"&type=1"),null!=
-a&&(b+="&title="+encodeURIComponent(a)),""!=m.value&&(a=parseInt(m.value)+parseInt(e.value),b+="&height="+a),u.value=b):u.value=""}var b=document.createElement("div"),g=a.editor.graph,f=g.getGraphBounds(),k=g.view.scale,l=Math.floor(f.x/k-g.view.translate.x),n=Math.floor(f.y/k-g.view.translate.y);mxUtils.write(b,mxResources.get("googleGadget")+":");mxUtils.br(b);var u=document.createElement("input");u.setAttribute("type","text");u.style.marginBottom="8px";u.style.marginTop="2px";u.style.width="410px";
-b.appendChild(u);mxUtils.br(b);this.init=function(){u.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?u.select():document.execCommand("selectAll",!1,null)};mxUtils.write(b,mxResources.get("top")+":");var e=document.createElement("input");e.setAttribute("type","text");e.setAttribute("size","4");e.style.marginRight="16px";e.style.marginLeft="4px";e.value=l;b.appendChild(e);mxUtils.write(b,mxResources.get("height")+":");var m=document.createElement("input");m.setAttribute("type",
+var GoogleSitesDialog=function(a,d){function c(){var a=null!=D&&null!=D.getTitle()?D.getTitle():this.defaultFilename;if(z.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<F.length&&(b+="&s="+F);""!=v.value&&"0"!=v.value&&(b+="&border="+v.value);""!=m.value&&(b+="&height="+m.value);b+="&pan="+(q.checked?"1":"0");b+="&zoom="+(u.checked?"1":"0");b+="&fit="+(A.checked?"1":"0");
+b+="&resize="+(B.checked?"1":"0");b+="&x0="+Number(e.value);b+="&y0="+n;g.mathEnabled&&(b+="&math=1");x.checked?b+="&edit=_blank":y.checked&&(b+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));t.value=b}else D.constructor==DriveFile||D.constructor==DropboxFile?(b="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=p.value?b+=encodeURIComponent(mxUtils.htmlEntities(p.value))+"&type=3":(b+=D.getHash().substring(1),b=D.constructor==DropboxFile?b+"&type=2":b+"&type=1"),null!=
+a&&(b+="&title="+encodeURIComponent(a)),""!=m.value&&(a=parseInt(m.value)+parseInt(e.value),b+="&height="+a),t.value=b):t.value=""}var b=document.createElement("div"),g=a.editor.graph,f=g.getGraphBounds(),k=g.view.scale,l=Math.floor(f.x/k-g.view.translate.x),n=Math.floor(f.y/k-g.view.translate.y);mxUtils.write(b,mxResources.get("googleGadget")+":");mxUtils.br(b);var t=document.createElement("input");t.setAttribute("type","text");t.style.marginBottom="8px";t.style.marginTop="2px";t.style.width="410px";
+b.appendChild(t);mxUtils.br(b);this.init=function(){t.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?t.select():document.execCommand("selectAll",!1,null)};mxUtils.write(b,mxResources.get("top")+":");var e=document.createElement("input");e.setAttribute("type","text");e.setAttribute("size","4");e.style.marginRight="16px";e.style.marginLeft="4px";e.value=l;b.appendChild(e);mxUtils.write(b,mxResources.get("height")+":");var m=document.createElement("input");m.setAttribute("type",
"text");m.setAttribute("size","4");m.style.marginLeft="4px";m.value=Math.ceil(f.height/k);b.appendChild(m);mxUtils.br(b);f=document.createElement("hr");f.setAttribute("size","1");f.style.marginBottom="16px";f.style.marginTop="16px";b.appendChild(f);mxUtils.write(b,mxResources.get("publicDiagramUrl")+":");mxUtils.br(b);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=d||"";
-b.appendChild(p);mxUtils.br(b);mxUtils.write(b,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";b.appendChild(q);mxUtils.br(b);var t=document.createElement("input");t.setAttribute("type","checkbox");t.setAttribute("checked","checked");t.defaultChecked=!0;t.style.marginLeft="16px";b.appendChild(t);mxUtils.write(b,mxResources.get("pan")+" ");var v=document.createElement("input");
-v.setAttribute("type","checkbox");v.setAttribute("checked","checked");v.defaultChecked=!0;v.style.marginLeft="8px";b.appendChild(v);mxUtils.write(b,mxResources.get("zoom")+" ");var z=document.createElement("input");z.setAttribute("type","checkbox");z.style.marginLeft="8px";z.setAttribute("title",window.location.href);b.appendChild(z);mxUtils.write(b,mxResources.get("edit")+" ");var y=document.createElement("input");y.setAttribute("type","checkbox");y.style.marginLeft="8px";b.appendChild(y);mxUtils.write(b,
-mxResources.get("asNew")+" ");mxUtils.br(b);var C=document.createElement("input");C.setAttribute("type","checkbox");C.setAttribute("checked","checked");C.defaultChecked=!0;C.style.marginLeft="16px";b.appendChild(C);mxUtils.write(b,mxResources.get("resize")+" ");var x=document.createElement("input");x.setAttribute("type","checkbox");x.style.marginLeft="8px";b.appendChild(x);mxUtils.write(b,mxResources.get("fit")+" ");var A=document.createElement("input");A.setAttribute("type","checkbox");A.style.marginLeft=
-"8px";b.appendChild(A);mxUtils.write(b,mxResources.get("embed")+" ");var E=a.getBasenames().join(";"),D=a.getCurrentFile();mxEvent.addListener(t,"change",c);mxEvent.addListener(v,"change",c);mxEvent.addListener(C,"change",c);mxEvent.addListener(x,"change",c);mxEvent.addListener(z,"change",c);mxEvent.addListener(y,"change",c);mxEvent.addListener(A,"change",c);mxEvent.addListener(m,"change",c);mxEvent.addListener(e,"change",c);mxEvent.addListener(q,"change",c);mxEvent.addListener(p,"change",c);c();
-mxEvent.addListener(u,"click",function(){u.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?u.select():document.execCommand("selectAll",!1,null)});f=document.createElement("div");f.style.paddingTop="12px";f.style.textAlign="right";k=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});k.className="geBtn gePrimaryBtn";f.appendChild(k);b.appendChild(f);this.container=b},CreateGraphDialog=function(a,d,c){var b=document.createElement("div");b.style.textAlign=
+b.appendChild(p);mxUtils.br(b);mxUtils.write(b,mxResources.get("borderWidth")+":");var v=document.createElement("input");v.setAttribute("type","text");v.setAttribute("size","3");v.style.marginBottom="8px";v.style.marginLeft="4px";v.value="0";b.appendChild(v);mxUtils.br(b);var q=document.createElement("input");q.setAttribute("type","checkbox");q.setAttribute("checked","checked");q.defaultChecked=!0;q.style.marginLeft="16px";b.appendChild(q);mxUtils.write(b,mxResources.get("pan")+" ");var u=document.createElement("input");
+u.setAttribute("type","checkbox");u.setAttribute("checked","checked");u.defaultChecked=!0;u.style.marginLeft="8px";b.appendChild(u);mxUtils.write(b,mxResources.get("zoom")+" ");var y=document.createElement("input");y.setAttribute("type","checkbox");y.style.marginLeft="8px";y.setAttribute("title",window.location.href);b.appendChild(y);mxUtils.write(b,mxResources.get("edit")+" ");var x=document.createElement("input");x.setAttribute("type","checkbox");x.style.marginLeft="8px";b.appendChild(x);mxUtils.write(b,
+mxResources.get("asNew")+" ");mxUtils.br(b);var B=document.createElement("input");B.setAttribute("type","checkbox");B.setAttribute("checked","checked");B.defaultChecked=!0;B.style.marginLeft="16px";b.appendChild(B);mxUtils.write(b,mxResources.get("resize")+" ");var A=document.createElement("input");A.setAttribute("type","checkbox");A.style.marginLeft="8px";b.appendChild(A);mxUtils.write(b,mxResources.get("fit")+" ");var z=document.createElement("input");z.setAttribute("type","checkbox");z.style.marginLeft=
+"8px";b.appendChild(z);mxUtils.write(b,mxResources.get("embed")+" ");var F=a.getBasenames().join(";"),D=a.getCurrentFile();mxEvent.addListener(q,"change",c);mxEvent.addListener(u,"change",c);mxEvent.addListener(B,"change",c);mxEvent.addListener(A,"change",c);mxEvent.addListener(y,"change",c);mxEvent.addListener(x,"change",c);mxEvent.addListener(z,"change",c);mxEvent.addListener(m,"change",c);mxEvent.addListener(e,"change",c);mxEvent.addListener(v,"change",c);mxEvent.addListener(p,"change",c);c();
+mxEvent.addListener(t,"click",function(){t.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?t.select():document.execCommand("selectAll",!1,null)});f=document.createElement("div");f.style.paddingTop="12px";f.style.textAlign="right";k=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});k.className="geBtn gePrimaryBtn";f.appendChild(k);b.appendChild(f);this.container=b},CreateGraphDialog=function(a,d,c){var b=document.createElement("div");b.style.textAlign=
"right";this.init=function(){var d=document.createElement("div");d.style.position="relative";d.style.border="1px solid gray";d.style.width="100%";d.style.height="360px";d.style.overflow="hidden";d.style.marginBottom="16px";mxEvent.disableContextMenu(d);b.appendChild(d);var f=new Graph(d);f.setCellsCloneable(!0);f.setPanning(!0);f.setAllowDanglingEdges(!1);f.connectionHandler.select=!1;f.view.setTranslate(20,20);f.border=20;f.panningHandler.useLeftButtonForPanning=!0;var k="curved=1;";f.cellRenderer.installCellOverlayListeners=
function(a,b,e){mxCellRenderer.prototype.installCellOverlayListeners.apply(this,arguments);mxEvent.addListener(e.node,mxClient.IS_POINTER?"pointerdown":"mousedown",function(e){b.fireEvent(new mxEventObject("pointerdown","event",e,"state",a))});!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&mxEvent.addListener(e.node,"touchstart",function(e){b.fireEvent(new mxEventObject("pointerdown","event",e,"state",a))})};f.getAllConnectionConstraints=function(){return null};f.connectionHandler.marker.highlight.keepOnTop=
!1;f.connectionHandler.createEdgeState=function(a){a=f.createEdge(null,null,null,null,null,k);return new mxCellState(this.graph.view,a,this.graph.getCellStyle(a))};var l=f.getDefaultParent(),n=mxUtils.bind(this,function(a){var b=new mxCellOverlay(this.connectImage,"Add outgoing");b.cursor="hand";b.addListener(mxEvent.CLICK,function(b,e){f.connectionHandler.reset();f.clearSelection();var c=f.getCellGeometry(a),d;m(function(){d=f.insertVertex(l,null,"Entry",c.x,c.y,80,30,"rounded=1;");n(d);f.view.refresh(d);
-f.insertEdge(l,null,"",a,d,k)},function(){f.scrollCellToVisible(d)})});b.addListener("pointerdown",function(a,b){var e=b.getProperty("event"),c=b.getProperty("state");f.popupMenuHandler.hideMenu();f.stopEditing(!1);var d=mxUtils.convertPoint(f.container,mxEvent.getClientX(e),mxEvent.getClientY(e));f.connectionHandler.start(c,d.x,d.y);f.isMouseDown=!0;f.isMouseTrigger=mxEvent.isMouseEvent(e);mxEvent.consume(e)});f.addCellOverlay(a,b)});f.getModel().beginUpdate();var u;try{u=f.insertVertex(l,null,"Start",
-0,0,80,30,"ellipse"),n(u)}finally{f.getModel().endUpdate()}var e;"horizontalTree"==c?(e=new mxCompactTreeLayout(f),e.edgeRouting=!1,e.levelDistance=30,k="edgeStyle=elbowEdgeStyle;elbow=horizontal;"):"verticalTree"==c?(e=new mxCompactTreeLayout(f,!1),e.edgeRouting=!1,e.levelDistance=30,k="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"radialTree"==c?(e=new mxRadialTreeLayout(f,!1),e.edgeRouting=!1,e.levelDistance=80):"verticalFlow"==c?e=new mxHierarchicalLayout(f,mxConstants.DIRECTION_NORTH):"horizontalFlow"==
-c?e=new mxHierarchicalLayout(f,mxConstants.DIRECTION_WEST):"organic"==c?(e=new mxFastOrganicLayout(f,!1),e.forceConstant=80):"circle"==c&&(e=new mxCircleLayout(f));if(null!=e){var m=function(a,b){f.getModel().beginUpdate();try{null!=a&&a(),e.execute(f.getDefaultParent(),u)}catch(C){throw C;}finally{var c=new mxMorphing(f);c.addListener(mxEvent.DONE,mxUtils.bind(this,function(){f.getModel().endUpdate();null!=b&&b()}));c.startAnimation()}},p=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=
-function(a,b,e,c,d){p.apply(this,arguments);m()};f.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);m()};f.connectionHandler.addListener(mxEvent.CONNECT,function(){m()})}var q=mxUtils.button(mxResources.get("close"),function(){a.confirm(mxResources.get("areYouSure"),function(){null!=d.parentNode&&(f.destroy(),d.parentNode.removeChild(d));a.hideDialog()})});q.className="geBtn";a.editor.cancelFirst&&b.appendChild(q);var t=mxUtils.button(mxResources.get("insert"),function(){f.clearCellOverlays();
-var b=a.editor.graph.getFreeInsertPoint(),b=a.editor.graph.importCells(f.getModel().getChildren(f.getDefaultParent()),b.x,b.y),e=a.editor.graph.view,c=e.getBounds(b);c.x-=e.translate.x;c.y-=e.translate.y;a.editor.graph.scrollRectToVisible(c);a.editor.graph.setSelectionCells(b);null!=d.parentNode&&(f.destroy(),d.parentNode.removeChild(d));a.hideDialog()});b.appendChild(t);t.className="geBtn gePrimaryBtn";a.editor.cancelFirst||b.appendChild(q)};this.container=b};
+f.insertEdge(l,null,"",a,d,k)},function(){f.scrollCellToVisible(d)})});b.addListener("pointerdown",function(a,b){var e=b.getProperty("event"),c=b.getProperty("state");f.popupMenuHandler.hideMenu();f.stopEditing(!1);var d=mxUtils.convertPoint(f.container,mxEvent.getClientX(e),mxEvent.getClientY(e));f.connectionHandler.start(c,d.x,d.y);f.isMouseDown=!0;f.isMouseTrigger=mxEvent.isMouseEvent(e);mxEvent.consume(e)});f.addCellOverlay(a,b)});f.getModel().beginUpdate();var t;try{t=f.insertVertex(l,null,"Start",
+0,0,80,30,"ellipse"),n(t)}finally{f.getModel().endUpdate()}var e;"horizontalTree"==c?(e=new mxCompactTreeLayout(f),e.edgeRouting=!1,e.levelDistance=30,k="edgeStyle=elbowEdgeStyle;elbow=horizontal;"):"verticalTree"==c?(e=new mxCompactTreeLayout(f,!1),e.edgeRouting=!1,e.levelDistance=30,k="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"radialTree"==c?(e=new mxRadialTreeLayout(f,!1),e.edgeRouting=!1,e.levelDistance=80):"verticalFlow"==c?e=new mxHierarchicalLayout(f,mxConstants.DIRECTION_NORTH):"horizontalFlow"==
+c?e=new mxHierarchicalLayout(f,mxConstants.DIRECTION_WEST):"organic"==c?(e=new mxFastOrganicLayout(f,!1),e.forceConstant=80):"circle"==c&&(e=new mxCircleLayout(f));if(null!=e){var m=function(a,b){f.getModel().beginUpdate();try{null!=a&&a(),e.execute(f.getDefaultParent(),t)}catch(B){throw B;}finally{var c=new mxMorphing(f);c.addListener(mxEvent.DONE,mxUtils.bind(this,function(){f.getModel().endUpdate();null!=b&&b()}));c.startAnimation()}},p=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=
+function(a,b,e,c,d){p.apply(this,arguments);m()};f.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);m()};f.connectionHandler.addListener(mxEvent.CONNECT,function(){m()})}var v=mxUtils.button(mxResources.get("close"),function(){a.confirm(mxResources.get("areYouSure"),function(){null!=d.parentNode&&(f.destroy(),d.parentNode.removeChild(d));a.hideDialog()})});v.className="geBtn";a.editor.cancelFirst&&b.appendChild(v);var q=mxUtils.button(mxResources.get("insert"),function(){f.clearCellOverlays();
+var b=a.editor.graph.getFreeInsertPoint(),b=a.editor.graph.importCells(f.getModel().getChildren(f.getDefaultParent()),b.x,b.y),e=a.editor.graph.view,c=e.getBounds(b);c.x-=e.translate.x;c.y-=e.translate.y;a.editor.graph.scrollRectToVisible(c);a.editor.graph.setSelectionCells(b);null!=d.parentNode&&(f.destroy(),d.parentNode.removeChild(d));a.hideDialog()});b.appendChild(q);q.className="geBtn gePrimaryBtn";a.editor.cancelFirst||b.appendChild(v)};this.container=b};
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,d){var c=document.createElement("div");c.style.whiteSpace="nowrap";var b=document.createElement("h2");mxUtils.write(b,mxResources.get("backgroundImage"));b.style.marginTop="0px";c.appendChild(b);mxUtils.write(c,mxResources.get("image")+" "+mxResources.get("url")+":");mxUtils.br(c);var b=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=
@@ -8626,72 +8627,72 @@ null!=b?b.src:"";var f=!1,k=function(){f||""==g.value||a.isOffline()?(l.value=""
e&&(e.parentNode.removeChild(e),e=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(b,"dragover",mxUtils.bind(this,function(c){null==e&&(!mxClient.IS_IE||10<document.documentMode)&&(e=a.highlightElement(b));c.stopPropagation();c.preventDefault()}));mxEvent.addListener(b,"drop",mxUtils.bind(this,function(b){null!=e&&(e.parentNode.removeChild(e),e=null);if(0<b.dataTransfer.files.length)a.importFiles(b.dataTransfer.files,0,0,a.maxBackgroundSize,function(a,b,e,c,d,m){g.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,!0);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)&&(g.value=decodeURIComponent(c),k())}b.stopPropagation();b.preventDefault()}),!1)}};c.appendChild(g);mxUtils.br(c);mxUtils.br(c);mxUtils.write(c,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!=b?b.width:"";c.appendChild(l);mxUtils.write(c,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!=b?b.height:"";c.appendChild(n);b=mxUtils.button(mxResources.get("reset"),function(){g.value="";l.value="";n.value="";f=!1});mxEvent.addListener(b,"mousedown",
-function(){f=!0});mxEvent.addListener(b,"touchstart",function(){f=!0});b.className="geBtn";b.width="100";c.appendChild(b);mxUtils.br(c);mxEvent.addListener(g,"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&&(g.value=a.url,k()));g.focus()};b=document.createElement("div");b.style.marginTop="40px";b.style.textAlign="right";var u=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});
-u.className="geBtn";a.editor.cancelFirst&&b.appendChild(u);if(!a.isOffline()&&"undefined"!=typeof google&&"undefined"!=typeof google.picker&&window.self===window.top){var e=mxUtils.button(mxResources.get("search"),function(){if(null==a.imageSearchPicker){var b=(new google.picker.PickerBuilder).setLocale(mxLanguage).addView(google.picker.ViewId.IMAGE_SEARCH).enableFeature(google.picker.Feature.NAV_HIDDEN);a.imageSearchPicker=b.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.imageSearchPicker.setVisible(!0)});
+function(){f=!0});mxEvent.addListener(b,"touchstart",function(){f=!0});b.className="geBtn";b.width="100";c.appendChild(b);mxUtils.br(c);mxEvent.addListener(g,"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&&(g.value=a.url,k()));g.focus()};b=document.createElement("div");b.style.marginTop="40px";b.style.textAlign="right";var t=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});
+t.className="geBtn";a.editor.cancelFirst&&b.appendChild(t);if(!a.isOffline()&&"undefined"!=typeof google&&"undefined"!=typeof google.picker&&window.self===window.top){var e=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)});
e.className="geBtn";b.appendChild(e);null!=a.drive&&"1"==urlParams.photos&&(e=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=(new google.picker.PickerBuilder).setAppId(a.drive.appId).setLocale(mxLanguage).setOAuthToken(a.drive.token).addView(google.picker.ViewId.PHOTO_UPLOAD);a.photoPicker=b.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.photoPicker.setVisible(!0)}))}),
-e.className="geBtn",b.appendChild(e))}e=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();d(""!=g.value?new mxImage(mxUtils.trim(g.value),l.value,n.value):null)});e.className="geBtn gePrimaryBtn";b.appendChild(e);a.editor.cancelFirst||b.appendChild(u);c.appendChild(b);this.container=c},ParseDialog=function(a,d,c){function b(b,e){var c=b.split("\n");if("plantUmlPng"==e||"plantUmlSvg"==e||"plantUmlTxt"==e){if(a.spinner.spin(document.body,mxResources.get("inserting"))){var d=a.editor.graph,
+e.className="geBtn",b.appendChild(e))}e=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();d(""!=g.value?new mxImage(mxUtils.trim(g.value),l.value,n.value):null)});e.className="geBtn gePrimaryBtn";b.appendChild(e);a.editor.cancelFirst||b.appendChild(t);c.appendChild(b);this.container=c},ParseDialog=function(a,d,c){function b(b,e){var c=b.split("\n");if("plantUmlPng"==e||"plantUmlSvg"==e||"plantUmlTxt"==e){if(a.spinner.spin(document.body,mxResources.get("inserting"))){var d=a.editor.graph,
m="plantUmlTxt"==e?"txt":"plantUmlPng"==e?"png":"svg";a.generatePlantUmlImage(b,m,function(e,c,p){a.spinner.stop();var g=null;d.getModel().beginUpdate();try{g="txt"==m?a.insertAsPreText(e,f.x,f.y):d.insertVertex(null,null,null,f.x,f.y,c,p,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a.convertDataUri(e)+";"),d.setAttributeForCell(g,"plantUmlData",JSON.stringify({data:b,format:m},null,2))}finally{d.getModel().endUpdate()}null!=g&&(d.setSelectionCell(g),d.scrollCellToVisible(g))},
function(b){a.handleError(b)})}}else if("mermaid"==e)a.spinner.spin(document.body,mxResources.get("inserting"))&&(d=a.editor.graph,a.generateMermaidImage(b,m,function(e,c,m){a.spinner.stop();var p=null;d.getModel().beginUpdate();try{p=d.insertVertex(null,null,null,f.x,f.y,c,m,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+e+";"),d.setAttributeForCell(p,"mermaidData",JSON.stringify({data:b,config:EditorUi.defaultMermaidConfig},null,2))}finally{d.getModel().endUpdate()}null!=p&&(d.setSelectionCell(p),
-d.scrollCellToVisible(p))},function(b){a.handleError(b)}));else if("table"==e){for(var p=null,g=[],q=0,A=0;A<c.length;A++){var k=mxUtils.trim(c[A]);if("create table"==k.substring(0,12).toLowerCase())k=mxUtils.trim(k.substring(12)),"("==k.charAt(k.length-1)&&(k=k.substring(0,k.lastIndexOf(" "))),p=new mxCell(k,new mxGeometry(q,0,160,26),"swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;marginBottom=0;align=center;"),
-p.vertex=!0,g.push(p),k=a.editor.graph.getPreferredSizeForCell(B),null!=k&&(p.geometry.width=k.width+10);else if(null!=p&&")"==k.charAt(0))q+=p.geometry.width+40,p=null;else if("("!=k&&null!=p&&(k=k.substring(0,","==k.charAt(k.length-1)?k.length-1:k.length),"primary key"!=k.substring(0,11).toLowerCase())){var l=k.toLowerCase().indexOf("primary key"),k=k.replace(/primary key/i,""),B=new mxCell(k,new mxGeometry(0,0,90,26),"shape=partialRectangle;top=0;left=0;right=0;bottom=0;align=left;verticalAlign=top;spacingTop=-2;fillColor=none;spacingLeft=34;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;dropTarget=0;");
-B.vertex=!0;k=sb.cloneCell(B,0<l?"PK":"");k.connectable=!1;k.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;";k.geometry.width=30;k.geometry.height=26;B.insert(k);k=a.editor.graph.getPreferredSizeForCell(B);null!=k&&p.geometry.width<k.width+10&&(p.geometry.width=Math.min(220,k.width+10));p.insert(B);p.geometry.height+=26}}0<g.length&&(d=a.editor.graph,
-A=d.view,c=d.getGraphBounds(),d.setSelectionCells(d.importCells(g,Math.ceil(Math.max(0,c.x/A.scale-A.translate.x)+4*d.gridSize),Math.ceil(Math.max(0,(c.y+c.height)/A.scale-A.translate.y)+4*d.gridSize))),d.scrollCellToVisible(d.getSelectionCell()))}else if("list"==e){if(0<c.length){d=a.editor.graph;B=null;g=[];for(A=p=0;A<c.length;A++)";"!=c[A].charAt(0)&&(0==c[A].length?B=null:null==B?(B=new mxCell(c[A],new mxGeometry(p,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"),
-B.vertex=!0,g.push(B),k=d.getPreferredSizeForCell(B),null!=k&&B.geometry.width<k.width+10&&(B.geometry.width=k.width+10),p+=B.geometry.width+40):"--"==c[A]?(k=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;"),k.vertex=!0,B.geometry.height+=k.geometry.height,B.insert(k)):0<c[A].length&&(q=new mxCell(c[A],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;"),
-q.vertex=!0,k=d.getPreferredSizeForCell(q),null!=k&&q.geometry.width<k.width&&(q.geometry.width=k.width),B.geometry.width=Math.max(B.geometry.width,q.geometry.width),B.geometry.height+=q.geometry.height,B.insert(q)));if(0<g.length){d.getModel().beginUpdate();try{g=d.importCells(g,f.x,f.y);k=[];for(A=0;A<g.length;A++)k.push(g[A]),k=k.concat(g[A].children);d.fireEvent(new mxEventObject("cellsInserted","cells",k))}finally{d.getModel().endUpdate()}d.setSelectionCells(g);d.scrollCellToVisible(d.getSelectionCell())}}}else{for(var B=
-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,g.push(b));return b},n={},g=[],A=0;A<c.length;A++)if(";"!=c[A].charAt(0)){var G=c[A].split("->");if(2<=G.length){var l=B(G[0]),J=B(G[G.length-1]),G=new mxCell(2<G.length?G[1]:"",new mxGeometry);G.edge=!0;l.insertEdge(G,!0);J.insertEdge(G,!1);g.push(G)}}if(0<g.length){c=document.createElement("div");c.style.visibility="hidden";document.body.appendChild(c);d=new Graph(c);d.getModel().beginUpdate();
-try{g=d.importCells(g);for(A=0;A<g.length;A++)d.getModel().isVertex(g[A])&&(k=d.getPreferredSizeForCell(g[A]),g[A].geometry.width=Math.max(g[A].geometry.width,k.width),g[A].geometry.height=Math.max(g[A].geometry.height,k.height));p=new mxFastOrganicLayout(d);p.disableEdgeStyle=!1;p.forceConstant=120;p.execute(d.getDefaultParent());q=new mxParallelEdgeLayout(d);q.spacing=20;q.execute(d.getDefaultParent())}finally{d.getModel().endUpdate()}d.clearCellOverlays();k=[];a.editor.graph.getModel().beginUpdate();
+d.scrollCellToVisible(p))},function(b){a.handleError(b)}));else if("table"==e){for(var p=null,g=[],v=0,z=0;z<c.length;z++){var k=mxUtils.trim(c[z]);if("create table"==k.substring(0,12).toLowerCase())k=mxUtils.trim(k.substring(12)),"("==k.charAt(k.length-1)&&(k=k.substring(0,k.lastIndexOf(" "))),p=new mxCell(k,new mxGeometry(v,0,160,26),"swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;marginBottom=0;align=center;"),
+p.vertex=!0,g.push(p),k=a.editor.graph.getPreferredSizeForCell(C),null!=k&&(p.geometry.width=k.width+10);else if(null!=p&&")"==k.charAt(0))v+=p.geometry.width+40,p=null;else if("("!=k&&null!=p&&(k=k.substring(0,","==k.charAt(k.length-1)?k.length-1:k.length),"primary key"!=k.substring(0,11).toLowerCase())){var l=k.toLowerCase().indexOf("primary key"),k=k.replace(/primary key/i,""),C=new mxCell(k,new mxGeometry(0,0,90,26),"shape=partialRectangle;top=0;left=0;right=0;bottom=0;align=left;verticalAlign=top;spacingTop=-2;fillColor=none;spacingLeft=34;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;dropTarget=0;");
+C.vertex=!0;k=sb.cloneCell(C,0<l?"PK":"");k.connectable=!1;k.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;";k.geometry.width=30;k.geometry.height=26;C.insert(k);k=a.editor.graph.getPreferredSizeForCell(C);null!=k&&p.geometry.width<k.width+10&&(p.geometry.width=Math.min(220,k.width+10));p.insert(C);p.geometry.height+=26}}0<g.length&&(d=a.editor.graph,
+z=d.view,c=d.getGraphBounds(),d.setSelectionCells(d.importCells(g,Math.ceil(Math.max(0,c.x/z.scale-z.translate.x)+4*d.gridSize),Math.ceil(Math.max(0,(c.y+c.height)/z.scale-z.translate.y)+4*d.gridSize))),d.scrollCellToVisible(d.getSelectionCell()))}else if("list"==e){if(0<c.length){d=a.editor.graph;C=null;g=[];for(z=p=0;z<c.length;z++)";"!=c[z].charAt(0)&&(0==c[z].length?C=null:null==C?(C=new mxCell(c[z],new mxGeometry(p,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"),
+C.vertex=!0,g.push(C),k=d.getPreferredSizeForCell(C),null!=k&&C.geometry.width<k.width+10&&(C.geometry.width=k.width+10),p+=C.geometry.width+40):"--"==c[z]?(k=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;"),k.vertex=!0,C.geometry.height+=k.geometry.height,C.insert(k)):0<c[z].length&&(v=new mxCell(c[z],new mxGeometry(0,0,60,26),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),
+v.vertex=!0,k=d.getPreferredSizeForCell(v),null!=k&&v.geometry.width<k.width&&(v.geometry.width=k.width),C.geometry.width=Math.max(C.geometry.width,v.geometry.width),C.geometry.height+=v.geometry.height,C.insert(v)));if(0<g.length){d.getModel().beginUpdate();try{g=d.importCells(g,f.x,f.y);k=[];for(z=0;z<g.length;z++)k.push(g[z]),k=k.concat(g[z].children);d.fireEvent(new mxEventObject("cellsInserted","cells",k))}finally{d.getModel().endUpdate()}d.setSelectionCells(g);d.scrollCellToVisible(d.getSelectionCell())}}}else{for(var C=
+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,g.push(b));return b},n={},g=[],z=0;z<c.length;z++)if(";"!=c[z].charAt(0)){var H=c[z].split("->");if(2<=H.length){var l=C(H[0]),J=C(H[H.length-1]),H=new mxCell(2<H.length?H[1]:"",new mxGeometry);H.edge=!0;l.insertEdge(H,!0);J.insertEdge(H,!1);g.push(H)}}if(0<g.length){c=document.createElement("div");c.style.visibility="hidden";document.body.appendChild(c);d=new Graph(c);d.getModel().beginUpdate();
+try{g=d.importCells(g);for(z=0;z<g.length;z++)d.getModel().isVertex(g[z])&&(k=d.getPreferredSizeForCell(g[z]),g[z].geometry.width=Math.max(g[z].geometry.width,k.width),g[z].geometry.height=Math.max(g[z].geometry.height,k.height));p=new mxFastOrganicLayout(d);p.disableEdgeStyle=!1;p.forceConstant=120;p.execute(d.getDefaultParent());v=new mxParallelEdgeLayout(d);v.spacing=20;v.execute(d.getDefaultParent())}finally{d.getModel().endUpdate()}d.clearCellOverlays();k=[];a.editor.graph.getModel().beginUpdate();
try{k=a.editor.graph.importCells(d.getModel().getChildren(d.getDefaultParent()),f.x,f.y),a.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",k))}finally{a.editor.graph.getModel().endUpdate()}a.editor.graph.setSelectionCells(k);a.editor.graph.scrollCellToVisible(a.editor.graph.getSelectionCell());d.destroy();c.parentNode.removeChild(c)}}}function g(){return"list"==l.value?"Person\n-name: String\n-birthDate: Date\n--\n+getName(): String\n+setName(String): void\n+isBirthday(): boolean\n\nAddress\n-street: String\n-city: String\n-state: String":
"mermaid"==l.value?"graph TD;\n A--\x3eB;\n A--\x3eC;\n B--\x3eD;\n C--\x3eD;":"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 f=a.editor.graph.getFreeInsertPoint();d=document.createElement("div");d.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");if("formatSql"==c||"mermaid"==c)l.style.display="none";var n=document.createElement("option");n.setAttribute("value","list");mxUtils.write(n,mxResources.get("list"));"plantUml"!=c&&l.appendChild(n);null!=c&&"fromText"!=c||n.setAttribute("selected","selected");n=document.createElement("option");n.setAttribute("value","table");mxUtils.write(n,mxResources.get("formatSql"));"formatSql"==c&&(l.appendChild(n),n.setAttribute("selected",
"selected"));n=document.createElement("option");n.setAttribute("value","mermaid");mxUtils.write(n,mxResources.get("formatSql"));"mermaid"==c&&(l.appendChild(n),n.setAttribute("selected","selected"));n=document.createElement("option");n.setAttribute("value","diagram");mxUtils.write(n,mxResources.get("diagram"));"plantUml"!=c&&l.appendChild(n);n=document.createElement("option");n.setAttribute("value","plantUmlSvg");mxUtils.write(n,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");"plantUml"==
-c&&n.setAttribute("selected","selected");var u=document.createElement("option");u.setAttribute("value","plantUmlPng");mxUtils.write(u,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+")");var e=document.createElement("option");e.setAttribute("value","plantUmlTxt");mxUtils.write(e,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!a.isOffline()&&"plantUml"==c&&(l.appendChild(n),l.appendChild(u),l.appendChild(e));var m=g();k.value=
+c&&n.setAttribute("selected","selected");var t=document.createElement("option");t.setAttribute("value","plantUmlPng");mxUtils.write(t,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+")");var e=document.createElement("option");e.setAttribute("value","plantUmlTxt");mxUtils.write(e,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!a.isOffline()&&"plantUml"==c&&(l.appendChild(n),l.appendChild(t),l.appendChild(e));var m=g();k.value=
m;d.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));d.appendChild(l);mxEvent.addListener(l,"change",function(){var a=g();if(0==k.value.length||k.value==m)m=a,k.value=m});
-a.isOffline()||"mermaid"!=c&&"plantUml"!=c||(n=mxUtils.button(mxResources.get("help"),function(){a.openLink("mermaid"==c?"https://mermaid-js.github.io/mermaid/#/":"https://plantuml.com/")}),n.className="geBtn",d.appendChild(n));n=mxUtils.button(mxResources.get("close"),function(){k.value==m?a.hideDialog():a.confirm(mxResources.get("areYouSure"),function(){a.hideDialog()})});n.className="geBtn";a.editor.cancelFirst&&d.appendChild(n);u=mxUtils.button(mxResources.get("insert"),function(){a.hideDialog();
-b(k.value,l.value)});d.appendChild(u);u.className="geBtn gePrimaryBtn";a.editor.cancelFirst||d.appendChild(n);this.container=d},NewDialog=function(a,d,c,b,g,f,k,l,n,u,e,m,p,q,t,v,z){function y(){var a=!0;if(null!=S)for(;J<S.length&&(a||0!=mxUtils.mod(J,30));){var b=S[J++],b=A(b.url,b.libs,b.title,b.tooltip?b.tooltip:b.title,b.select,b.imgUrl,b.info,b.onClick,b.preview,b.noImg,b.clibs);a&&b.click();a=!1}}function C(){if(X)c||a.hideDialog(),q(X,aa,G.value);else if(b)c||a.hideDialog(),b(fa,G.value);
-else{var e=G.value;null!=e&&0<e.length&&a.pickFolder(a.mode,function(b){a.createFile(e,fa,null!=W&&0<W.length?W:null,null,function(){a.hideDialog()},null,b,null,null!=ga&&0<ga.length?ga:null)},a.mode!=App.MODE_GOOGLE||null==a.stateArg||null==a.stateArg.folderId)}}function x(a,b,e,c,d,m){null!=ba&&(ba.style.backgroundColor="transparent",ba.style.border="1px solid transparent");F.removeAttribute("disabled");fa=b;W=e;ga=m;ba=a;X=c;aa=d;ba.style.backgroundColor=l;ba.style.border=n}function A(b,e,c,d,
-m,p,f,g,q,t,k){var B=document.createElement("div");B.className="geTemplate";B.style.height=Z+"px";B.style.width=da+"px";null!=c?B.setAttribute("title",mxResources.get(c,null,c)):null!=d&&0<d.length&&B.setAttribute("title",d);if(null!=p)B.style.backgroundImage="url("+p+")",B.style.backgroundSize="contain",B.style.backgroundPosition="center center",B.style.backgroundRepeat="no-repeat",mxEvent.addListener(B,"click",function(a){x(B,null,null,b,f,k)}),mxEvent.addListener(B,"dblclick",function(a){C()});
-else if(!t&&null!=b&&0<b.length){d=q||TEMPLATE_PATH+"/"+b.substring(0,b.length-4)+".png";B.style.backgroundImage="url("+d+")";B.style.backgroundPosition="center center";B.style.backgroundRepeat="no-repeat";null!=c&&(B.innerHTML='<table width="100%" height="100%" style="line-height:1.3em;'+("dark"==uiTheme?"":"background:rgba(255,255,255,0.85);")+'border:inherit;"><tr><td align="center" valign="middle"><span style="display:inline-block;padding:4px 8px 4px 8px;user-select:none;border-radius:3px;background:rgba(255,255,255,0.85);overflow:hidden;text-overflow:ellipsis;max-width:'+
-(Z-34)+'px;">'+mxResources.get(c,null,c)+"</span></td></tr></table>");var v=!1;mxEvent.addListener(B,"click",function(c){F.setAttribute("disabled","disabled");B.style.backgroundColor="transparent";B.style.border="1px solid transparent";c=b;c=/^https?:\/\//.test(c)&&!a.editor.isCorsEnabledForUrl(c)?PROXY_URL+"?url="+encodeURIComponent(c):TEMPLATE_PATH+"/"+c;I.spin(P);mxUtils.get(c,mxUtils.bind(this,function(a){I.stop();200<=a.getStatus()&&299>=a.getStatus()&&(x(B,a.getText(),e,null,null,k),v&&C())}))});
-mxEvent.addListener(B,"dblclick",function(a){v=!0})}else B.innerHTML='<table width="100%" height="100%" style="line-height:1.3em;"><tr><td align="center" valign="middle"><span style="display:inline-block;padding:4px 8px 4px 8px;user-select:none;border-radius:3px;background:#ffffff;overflow:hidden;text-overflow:ellipsis;max-width:'+(Z-34)+'px;">'+mxResources.get(c,null,c)+"</span></td></tr></table>",m&&x(B),null!=g?mxEvent.addListener(B,"click",g):(mxEvent.addListener(B,"click",function(a){x(B,null,
-null,b,f)}),mxEvent.addListener(B,"dblclick",function(a){C()}));P.appendChild(B);return B}function E(){T&&(T=!1,mxEvent.addListener(P,"scroll",function(a){P.scrollTop+P.clientHeight>=P.scrollHeight&&(y(),mxEvent.consume(a))}));var a=null;if(0<ea){var b=document.createElement("div");b.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(b,mxResources.get("custom"));ca.appendChild(b);for(var e in M){var c=document.createElement("div"),b=e,d=M[e];
-18<b.length&&(b=b.substring(0,18)+"&hellip;");c.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;";c.setAttribute("title",b+" ("+d.length+")");mxUtils.write(c,c.getAttribute("title"));null!=u&&(c.style.padding=u);ca.appendChild(c);(function(b,e){mxEvent.addListener(c,"click",function(){a!=e&&(a.style.backgroundColor="",a=e,a.style.backgroundColor=k,P.scrollTop=0,P.innerHTML="",J=0,S=M[b],O=null,y())})})(e,
+a.isOffline()||"mermaid"!=c&&"plantUml"!=c||(n=mxUtils.button(mxResources.get("help"),function(){a.openLink("mermaid"==c?"https://mermaid-js.github.io/mermaid/#/":"https://plantuml.com/")}),n.className="geBtn",d.appendChild(n));n=mxUtils.button(mxResources.get("close"),function(){k.value==m?a.hideDialog():a.confirm(mxResources.get("areYouSure"),function(){a.hideDialog()})});n.className="geBtn";a.editor.cancelFirst&&d.appendChild(n);t=mxUtils.button(mxResources.get("insert"),function(){a.hideDialog();
+b(k.value,l.value)});d.appendChild(t);t.className="geBtn gePrimaryBtn";a.editor.cancelFirst||d.appendChild(n);this.container=d},NewDialog=function(a,d,c,b,g,f,k,l,n,t,e,m,p,v,q,u,y){function x(){var a=!0;if(null!=S)for(;J<S.length&&(a||0!=mxUtils.mod(J,30));){var b=S[J++],b=z(b.url,b.libs,b.title,b.tooltip?b.tooltip:b.title,b.select,b.imgUrl,b.info,b.onClick,b.preview,b.noImg,b.clibs);a&&b.click();a=!1}}function B(){if(X)c||a.hideDialog(),v(X,aa,H.value);else if(b)c||a.hideDialog(),b(fa,H.value);
+else{var e=H.value;null!=e&&0<e.length&&a.pickFolder(a.mode,function(b){a.createFile(e,fa,null!=W&&0<W.length?W:null,null,function(){a.hideDialog()},null,b,null,null!=ga&&0<ga.length?ga:null)},a.mode!=App.MODE_GOOGLE||null==a.stateArg||null==a.stateArg.folderId)}}function A(a,b,e,c,d,m){null!=ba&&(ba.style.backgroundColor="transparent",ba.style.border="1px solid transparent");E.removeAttribute("disabled");fa=b;W=e;ga=m;ba=a;X=c;aa=d;ba.style.backgroundColor=l;ba.style.border=n}function z(b,e,c,d,
+m,p,f,g,v,q,k){var u=document.createElement("div");u.className="geTemplate";u.style.height=Z+"px";u.style.width=da+"px";null!=c?u.setAttribute("title",mxResources.get(c,null,c)):null!=d&&0<d.length&&u.setAttribute("title",d);if(null!=p)u.style.backgroundImage="url("+p+")",u.style.backgroundSize="contain",u.style.backgroundPosition="center center",u.style.backgroundRepeat="no-repeat",mxEvent.addListener(u,"click",function(a){A(u,null,null,b,f,k)}),mxEvent.addListener(u,"dblclick",function(a){B()});
+else if(!q&&null!=b&&0<b.length){d=v||TEMPLATE_PATH+"/"+b.substring(0,b.length-4)+".png";u.style.backgroundImage="url("+d+")";u.style.backgroundPosition="center center";u.style.backgroundRepeat="no-repeat";null!=c&&(u.innerHTML='<table width="100%" height="100%" style="line-height:1.3em;'+("dark"==uiTheme?"":"background:rgba(255,255,255,0.85);")+'border:inherit;"><tr><td align="center" valign="middle"><span style="display:inline-block;padding:4px 8px 4px 8px;user-select:none;border-radius:3px;background:rgba(255,255,255,0.85);overflow:hidden;text-overflow:ellipsis;max-width:'+
+(Z-34)+'px;">'+mxResources.get(c,null,c)+"</span></td></tr></table>");var C=!1;mxEvent.addListener(u,"click",function(c){E.setAttribute("disabled","disabled");u.style.backgroundColor="transparent";u.style.border="1px solid transparent";c=b;c=/^https?:\/\//.test(c)&&!a.editor.isCorsEnabledForUrl(c)?PROXY_URL+"?url="+encodeURIComponent(c):TEMPLATE_PATH+"/"+c;I.spin(P);mxUtils.get(c,mxUtils.bind(this,function(a){I.stop();200<=a.getStatus()&&299>=a.getStatus()&&(A(u,a.getText(),e,null,null,k),C&&B())}))});
+mxEvent.addListener(u,"dblclick",function(a){C=!0})}else u.innerHTML='<table width="100%" height="100%" style="line-height:1.3em;"><tr><td align="center" valign="middle"><span style="display:inline-block;padding:4px 8px 4px 8px;user-select:none;border-radius:3px;background:#ffffff;overflow:hidden;text-overflow:ellipsis;max-width:'+(Z-34)+'px;">'+mxResources.get(c,null,c)+"</span></td></tr></table>",m&&A(u),null!=g?mxEvent.addListener(u,"click",g):(mxEvent.addListener(u,"click",function(a){A(u,null,
+null,b,f)}),mxEvent.addListener(u,"dblclick",function(a){B()}));P.appendChild(u);return u}function F(){T&&(T=!1,mxEvent.addListener(P,"scroll",function(a){P.scrollTop+P.clientHeight>=P.scrollHeight&&(x(),mxEvent.consume(a))}));var a=null;if(0<ea){var b=document.createElement("div");b.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(b,mxResources.get("custom"));ca.appendChild(b);for(var e in M){var c=document.createElement("div"),b=e,d=M[e];
+18<b.length&&(b=b.substring(0,18)+"&hellip;");c.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;";c.setAttribute("title",b+" ("+d.length+")");mxUtils.write(c,c.getAttribute("title"));null!=t&&(c.style.padding=t);ca.appendChild(c);(function(b,e){mxEvent.addListener(c,"click",function(){a!=e&&(a.style.backgroundColor="",a=e,a.style.backgroundColor=k,P.scrollTop=0,P.innerHTML="",J=0,S=M[b],O=null,x())})})(e,
c)}b=document.createElement("div");b.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(b,"draw.io");ca.appendChild(b)}for(e in R)c=document.createElement("div"),b=mxResources.get(e),d=R[e],null==b&&(b=e.substring(0,1).toUpperCase()+e.substring(1)),18<b.length&&(b=b.substring(0,18)+"&hellip;"),c.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;",
-c.setAttribute("title",b+" ("+d.length+")"),mxUtils.write(c,c.getAttribute("title")),null!=u&&(c.style.padding=u),ca.appendChild(c),null==a&&0<d.length&&(a=c,a.style.backgroundColor=k,S=d),function(b,e){mxEvent.addListener(c,"click",function(){a!=e&&(a.style.backgroundColor="",a=e,a.style.backgroundColor=k,P.scrollTop=0,P.innerHTML="",J=0,S=R[b],O=null,y())})}(e,c);y()}c=null!=c?c:!0;g=null!=g?g:!1;k=null!=k?k:"#ebf2f9";l=null!=l?l:"dark"==uiTheme?"transparent":"#e6eff8";n=null!=n?n:"dark"==uiTheme?
-"1px dotted rgb(235, 242, 249)":"1px solid #ccd9ea";e=null!=e?e:EditorUi.templateFile;var D=document.createElement("div");D.style.height="100%";var B=document.createElement("div");B.style.whiteSpace="nowrap";B.style.height="46px";c&&D.appendChild(B);var H=document.createElement("img");H.setAttribute("border","0");H.setAttribute("align","absmiddle");H.style.width="40px";H.style.height="40px";H.style.marginRight="10px";H.style.paddingBottom="4px";H.src=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_GITLAB?IMAGE_PATH+"/gitlab-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";!d&&c&&B.appendChild(H);c&&mxUtils.write(B,(null==a.mode||a.mode==App.MODE_GOOGLE||a.mode==App.MODE_BROWSER?mxResources.get("diagramName"):
-mxResources.get("filename"))+":");H=".drawio";a.mode==App.MODE_GOOGLE&&null!=a.drive?H=a.drive.extension:a.mode==App.MODE_DROPBOX&&null!=a.dropbox?H=a.dropbox.extension:a.mode==App.MODE_ONEDRIVE&&null!=a.oneDrive?H=a.oneDrive.extension:a.mode==App.MODE_GITHUB&&null!=a.gitHub?H=a.gitHub.extension:a.mode==App.MODE_GITLAB&&null!=a.gitLab?H=a.gitLab.extension:a.mode==App.MODE_TRELLO&&null!=a.trello&&(H=a.trello.extension);var G=document.createElement("input");G.setAttribute("value",a.defaultFilename+
-H);G.style.marginLeft="10px";G.style.width=d?"144px":"284px";this.init=function(){c&&(G.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?G.select():document.execCommand("selectAll",!1,null))};H=FilenameDialog.createFileTypes(a,G,a.editor.diagramFileTypes);H.style.marginLeft="6px";H.style.width=d?"80px":"140px";c&&(B.appendChild(G),B.appendChild(H),null!=a.editor.fileExtensions&&(H=FilenameDialog.createTypeHint(a,G,a.editor.fileExtensions),H.style.marginTop="12px",
-B.appendChild(H)));var B=!1,J=0,I=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}),F=mxUtils.button(v||mxResources.get("create"),function(){F.setAttribute("disabled","disabled");C();F.removeAttribute("disabled")});F.className="geBtn gePrimaryBtn";if(m||p){var K=[],O=null,Q=null,Y=null,U=function(a){F.setAttribute("disabled","disabled");for(var b=0;b<K.length;b++)K[b].className=b==a?"geBtn gePrimaryBtn":"geBtn"},
-B=!0;v=document.createElement("div");v.style.whiteSpace="nowrap";v.style.height="30px";D.appendChild(v);H=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){ca.style.display="";P.style.left="160px";U(0);P.scrollTop=0;P.innerHTML="";J=0;O!=S&&(S=O,R=Q,ea=Y,ca.innerHTML="",E(),O=null)});K.push(H);v.appendChild(H);var L=function(a){ca.style.display="none";P.style.left="30px";U(a?-1:1);null==O&&(O=S);P.scrollTop=0;P.innerHTML="";I.spin(P);var b=function(a,b,e){J=0;I.stop();S=a;e=
-e||{};var c=0,d;for(d in e)c+=e[d].length;if(b)P.innerHTML=b;else if(0==a.length&&0==c)P.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams",null,"No Diagrams Found"));else if(P.innerHTML="",0<c){ca.style.display="";P.style.left="160px";ca.innerHTML="";ea=0;R={"draw.io":a};for(d in e)R[d]=e[d];E()}else y()};a?p(V.value,b):m(b)};m&&(H=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){L()}),v.appendChild(H),K.push(H));if(p){H=document.createElement("span");H.style.marginLeft=
-"10px";H.innerHTML=mxUtils.htmlEntities(mxResources.get("search")+":");v.appendChild(H);var V=document.createElement("input");V.style.marginRight="10px";V.style.marginLeft="10px";V.style.width="220px";mxEvent.addListener(V,"keypress",function(a){13==a.keyCode&&L(!0)});v.appendChild(V);H=mxUtils.button(mxResources.get("search"),function(){L(!0)});H.className="geBtn";v.appendChild(H)}U(0)}var W=null,ga=null,fa=null,ba=null,X=null,aa=null,P=document.createElement("div");P.style.border="1px solid #d3d3d3";
-P.style.position="absolute";P.style.left="160px";P.style.right="34px";v=(c?72:40)+(B?30:0);P.style.top=v+"px";P.style.bottom="68px";P.style.margin="6px 0 0 -1px";P.style.padding="6px";P.style.overflow="auto";var ca=document.createElement("div");ca.style.cssText="position:absolute;left:30px;width:128px;top:"+v+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";var Z=140,da=140,R={},M={},ea=0,T=!0;R.basic=[{title:"blankDiagram",select:!0}];var S=R.basic;if(!d){var ha=function(){mxUtils.get(N,
+c.setAttribute("title",b+" ("+d.length+")"),mxUtils.write(c,c.getAttribute("title")),null!=t&&(c.style.padding=t),ca.appendChild(c),null==a&&0<d.length&&(a=c,a.style.backgroundColor=k,S=d),function(b,e){mxEvent.addListener(c,"click",function(){a!=e&&(a.style.backgroundColor="",a=e,a.style.backgroundColor=k,P.scrollTop=0,P.innerHTML="",J=0,S=R[b],O=null,x())})}(e,c);x()}c=null!=c?c:!0;g=null!=g?g:!1;k=null!=k?k:"#ebf2f9";l=null!=l?l:"dark"==uiTheme?"transparent":"#e6eff8";n=null!=n?n:"dark"==uiTheme?
+"1px dotted rgb(235, 242, 249)":"1px solid #ccd9ea";e=null!=e?e:EditorUi.templateFile;var D=document.createElement("div");D.style.height="100%";var C=document.createElement("div");C.style.whiteSpace="nowrap";C.style.height="46px";c&&D.appendChild(C);var G=document.createElement("img");G.setAttribute("border","0");G.setAttribute("align","absmiddle");G.style.width="40px";G.style.height="40px";G.style.marginRight="10px";G.style.paddingBottom="4px";G.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_GITLAB?IMAGE_PATH+"/gitlab-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";!d&&c&&C.appendChild(G);c&&mxUtils.write(C,(null==a.mode||a.mode==App.MODE_GOOGLE||a.mode==App.MODE_BROWSER?mxResources.get("diagramName"):
+mxResources.get("filename"))+":");G=".drawio";a.mode==App.MODE_GOOGLE&&null!=a.drive?G=a.drive.extension:a.mode==App.MODE_DROPBOX&&null!=a.dropbox?G=a.dropbox.extension:a.mode==App.MODE_ONEDRIVE&&null!=a.oneDrive?G=a.oneDrive.extension:a.mode==App.MODE_GITHUB&&null!=a.gitHub?G=a.gitHub.extension:a.mode==App.MODE_GITLAB&&null!=a.gitLab?G=a.gitLab.extension:a.mode==App.MODE_TRELLO&&null!=a.trello&&(G=a.trello.extension);var H=document.createElement("input");H.setAttribute("value",a.defaultFilename+
+G);H.style.marginLeft="10px";H.style.width=d?"144px":"284px";this.init=function(){c&&(H.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?H.select():document.execCommand("selectAll",!1,null))};c&&(C.appendChild(H),null!=a.editor.diagramFileTypes&&(G=FilenameDialog.createFileTypes(a,H,a.editor.diagramFileTypes),G.style.marginLeft="6px",G.style.width=d?"80px":"140px",C.appendChild(G)),null!=a.editor.fileExtensions&&(G=FilenameDialog.createTypeHint(a,H,a.editor.fileExtensions),
+G.style.marginTop="12px",C.appendChild(G)));var C=!1,J=0,I=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}),E=mxUtils.button(u||mxResources.get("create"),function(){E.setAttribute("disabled","disabled");B();E.removeAttribute("disabled")});E.className="geBtn gePrimaryBtn";if(m||p){var K=[],O=null,Q=null,Y=null,U=function(a){E.setAttribute("disabled","disabled");for(var b=0;b<K.length;b++)K[b].className=b==a?"geBtn gePrimaryBtn":
+"geBtn"},C=!0;u=document.createElement("div");u.style.whiteSpace="nowrap";u.style.height="30px";D.appendChild(u);G=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){ca.style.display="";P.style.left="160px";U(0);P.scrollTop=0;P.innerHTML="";J=0;O!=S&&(S=O,R=Q,ea=Y,ca.innerHTML="",F(),O=null)});K.push(G);u.appendChild(G);var L=function(a){ca.style.display="none";P.style.left="30px";U(a?-1:1);null==O&&(O=S);P.scrollTop=0;P.innerHTML="";I.spin(P);var b=function(a,b,e){J=0;I.stop();
+S=a;e=e||{};var c=0,d;for(d in e)c+=e[d].length;if(b)P.innerHTML=b;else if(0==a.length&&0==c)P.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams",null,"No Diagrams Found"));else if(P.innerHTML="",0<c){ca.style.display="";P.style.left="160px";ca.innerHTML="";ea=0;R={"draw.io":a};for(d in e)R[d]=e[d];F()}else x()};a?p(V.value,b):m(b)};m&&(G=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){L()}),u.appendChild(G),K.push(G));if(p){G=document.createElement("span");G.style.marginLeft=
+"10px";G.innerHTML=mxUtils.htmlEntities(mxResources.get("search")+":");u.appendChild(G);var V=document.createElement("input");V.style.marginRight="10px";V.style.marginLeft="10px";V.style.width="220px";mxEvent.addListener(V,"keypress",function(a){13==a.keyCode&&L(!0)});u.appendChild(V);G=mxUtils.button(mxResources.get("search"),function(){L(!0)});G.className="geBtn";u.appendChild(G)}U(0)}var W=null,ga=null,fa=null,ba=null,X=null,aa=null,P=document.createElement("div");P.style.border="1px solid #d3d3d3";
+P.style.position="absolute";P.style.left="160px";P.style.right="34px";u=(c?72:40)+(C?30:0);P.style.top=u+"px";P.style.bottom="68px";P.style.margin="6px 0 0 -1px";P.style.padding="6px";P.style.overflow="auto";var ca=document.createElement("div");ca.style.cssText="position:absolute;left:30px;width:128px;top:"+u+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";var Z=140,da=140,R={},M={},ea=0,T=!0;R.basic=[{title:"blankDiagram",select:!0}];var S=R.basic;if(!d){var ha=function(){mxUtils.get(N,
function(a){if(!ma){ma=!0;a=a.getXml().documentElement.firstChild;for(var b={};null!=a;){if("undefined"!==typeof a.getAttribute)if("clibs"==a.nodeName){for(var e=a.getAttribute("name"),c=a.getElementsByTagName("add"),d=[],m=0;m<c.length;m++)d.push(encodeURIComponent(mxUtils.getTextContent(c[m])));null!=e&&0<d.length&&(b[e]=d.join(";"))}else e=a.getAttribute("url"),null!=e&&(c=a.getAttribute("section"),null==c&&(c=e.indexOf("/"),c=e.substring(0,c)),e=R[c],null==e&&(e=[],R[c]=e),c=a.getAttribute("clibs"),
-null!=b[c]&&(c=b[c]),e.push({url:a.getAttribute("url"),libs:a.getAttribute("libs"),title:a.getAttribute("title"),tooltip:a.getAttribute("url"),preview:a.getAttribute("preview"),clibs:c}));a=a.nextSibling}I.stop();E()}})};D.appendChild(ca);D.appendChild(P);var ma=!1,N=e;/^https?:\/\//.test(N)&&!a.editor.isCorsEnabledForUrl(N)&&(N=PROXY_URL+"?url="+encodeURIComponent(N));I.spin(P);null!=z?z(function(a,b){M=a;Y=ea=b;ha()},ha):ha();Q=R}mxEvent.addListener(G,"keypress",function(b){a.dialog.container.firstChild==
-D&&13==b.keyCode&&C()});e=document.createElement("div");e.style.marginTop=d?"4px":"16px";e.style.textAlign="right";e.style.position="absolute";e.style.left="40px";e.style.bottom="24px";e.style.right="40px";d||a.isOffline()||!c||null!=b||g||(z=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://support.draw.io/display/DO/Creating+and+Opening+Files")}),z.className="geBtn",e.appendChild(z));z=mxUtils.button(mxResources.get("cancel"),function(){null!=f&&f();a.hideDialog(!0)});z.className=
-"geBtn";!a.editor.cancelFirst||g&&null==f||e.appendChild(z);d||"1"==urlParams.embed||g||(d=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()}),
-d.className="geBtn",e.appendChild(d));Graph.fileSupport&&t&&(t=mxUtils.button(mxResources.get("import"),function(){if(null==a.newDlgFileInputElt){var b=document.createElement("input");b.setAttribute("multiple","multiple");b.setAttribute("type","file");mxEvent.addListener(b,"change",function(e){a.openFiles(b.files,!0);b.value=""});b.style.display="none";document.body.appendChild(b);a.newDlgFileInputElt=b}a.newDlgFileInputElt.click()}),t.className="geBtn",e.appendChild(t));e.appendChild(F);a.editor.cancelFirst||
-null!=b||g&&null==f||e.appendChild(z);D.appendChild(e);this.container=D},CreateDialog=function(a,d,c,b,g,f,k,l,n,u,e,m,p,q,t,v,z){function y(b,e,c,p){function f(){mxEvent.addListener(g,"click",function(){var b=c;if(k){var e=A.value,m=e.lastIndexOf(".");if(0>d.lastIndexOf(".")&&0>m){var b=null!=b?b:B.value,p="";b==App.MODE_GOOGLE?p=a.drive.extension:b==App.MODE_GITHUB?p=a.gitHub.extension:b==App.MODE_GITLAB?p=a.gitLab.extension:b==App.MODE_TRELLO?p=a.trello.extension:b==App.MODE_DROPBOX?p=a.dropbox.extension:
-b==App.MODE_ONEDRIVE?p=a.oneDrive.extension:b==App.MODE_DEVICE&&(p=".drawio");0<=m&&(e=e.substring(0,m));A.value=e+p}}C(c)})}var g=document.createElement("a");g.style.overflow="hidden";var q=document.createElement("img");q.src=b;q.setAttribute("border","0");q.setAttribute("align","absmiddle");q.style.width="60px";q.style.height="60px";q.style.paddingBottom="6px";g.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";g.className="geBaseButton";g.style.position="relative";g.style.margin="4px";g.style.padding=
-"8px 8px 10px 8px";g.style.whiteSpace="nowrap";g.appendChild(q);mxClient.IS_QUIRKS&&(g.style.cssFloat="left",g.style.zoom="1");g.style.color="gray";g.style.fontSize="11px";var t=document.createElement("div");g.appendChild(t);mxUtils.write(t,e);if(null!=p&&null==a[p]){q.style.visibility="hidden";mxUtils.setOpacity(t,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(g);var x=window.setTimeout(function(){null==
-a[p]&&(v.stop(),g.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[p]&&(window.clearTimeout(x),mxUtils.setOpacity(t,100),q.style.visibility="",v.stop(),f())}))}else f();E.appendChild(g);++D==m&&(mxUtils.br(E),D=0)}function C(b){var e=A.value;if(null==b||null!=e&&0<e.length)z&&a.hideDialog(),c(e,b,A)}k=null!=k?k:!0;l=null!=l?l:!0;m=null!=m?m:4;z=null!=z?z:!0;f=document.createElement("div");f.style.whiteSpace="nowrap";null==b&&a.addLanguageMenu(f);var x=
-document.createElement("h2");mxUtils.write(x,g||mxResources.get("create"));x.style.marginTop="0px";x.style.marginBottom="24px";f.appendChild(x);mxUtils.write(f,mxResources.get("filename")+":");var A=document.createElement("input");A.setAttribute("value",d);A.style.width="200px";A.style.marginLeft="10px";A.style.marginBottom="20px";A.style.maxWidth="70%";this.init=function(){A.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?A.select():document.execCommand("selectAll",
-!1,null)};f.appendChild(A);null!=v&&f.appendChild(FilenameDialog.createTypeHint(a,A,v));null==p||null==q||"image/"!=q.substring(0,6)||"image/svg"==q.substring(0,9)&&!mxClient.IS_SVG||(A.style.width="160px",g=document.createElement("img"),p=t?p:btoa(unescape(encodeURIComponent(p))),g.setAttribute("src","data:"+q+";base64,"+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%)"),
-f.appendChild(g),n&&Editor.popupsAllowed&&(g.style.cursor="pointer",mxEvent.addGestureListeners(g,null,null,function(){C("_blank")})));mxUtils.br(f);var E=document.createElement("div");E.style.textAlign="center";var D=0;E.style.marginTop="6px";f.appendChild(E);var B=document.createElement("select");B.style.marginLeft="10px";a.isOfflineApp()||a.isOffline()||("function"===typeof window.DriveClient&&(q=document.createElement("option"),q.setAttribute("value",App.MODE_GOOGLE),mxUtils.write(q,mxResources.get("googleDrive")),
-B.appendChild(q),y(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(q=document.createElement("option"),q.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(q,mxResources.get("oneDrive")),B.appendChild(q),a.mode==App.MODE_ONEDRIVE&&q.setAttribute("selected","selected"),y(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive")),"function"===typeof window.DropboxClient&&(q=document.createElement("option"),
-q.setAttribute("value",App.MODE_DROPBOX),mxUtils.write(q,mxResources.get("dropbox")),B.appendChild(q),a.mode==App.MODE_DROPBOX&&q.setAttribute("selected","selected"),y(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),null!=a.gitHub&&(q=document.createElement("option"),q.setAttribute("value",App.MODE_GITHUB),mxUtils.write(q,mxResources.get("github")),B.appendChild(q),y(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),null!=a.gitLab&&
-(q=document.createElement("option"),q.setAttribute("value",App.MODE_GITLAB),mxUtils.write(q,mxResources.get("gitlab")),B.appendChild(q),y(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab")),"function"===typeof window.TrelloClient&&(q=document.createElement("option"),q.setAttribute("value",App.MODE_TRELLO),mxUtils.write(q,mxResources.get("trello")),B.appendChild(q),y(IMAGE_PATH+"/trello-logo.svg",mxResources.get("trello"),App.MODE_TRELLO,"trello")));Editor.useLocalStorage&&
-"device"!=urlParams.storage&&null==a.getCurrentFile()||(q=document.createElement("option"),q.setAttribute("value",App.MODE_DEVICE),mxUtils.write(q,mxResources.get("device")),B.appendChild(q),a.mode!=App.MODE_DEVICE&&l||q.setAttribute("selected","selected"),e&&y(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")),
-B.appendChild(l),a.mode==App.MODE_BROWSER&&l.setAttribute("selected","selected"),y(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));l=document.createElement("div");l.style.marginTop="26px";l.style.textAlign="center";null!=u&&(e=mxUtils.button(mxResources.get("help"),function(){a.openLink(u)}),e.className="geBtn",l.appendChild(e));e=mxUtils.button(mxResources.get("cancel"),function(){null!=b?b():(a.fileLoaded(null),a.hideDialog(),window.close(),window.location.href=a.getUrl())});
-e.className="geBtn";a.editor.cancelFirst&&l.appendChild(e);null==b&&(q=mxUtils.button(mxResources.get("decideLater"),function(){C(null)}),q.className="geBtn",l.appendChild(q));n&&Editor.popupsAllowed&&(n=mxUtils.button(mxResources.get("openInNewWindow"),function(){C("_blank")}),n.className="geBtn",l.appendChild(n));CreateDialog.showDownloadButton&&(n=mxUtils.button(mxResources.get("download"),function(){C("download")}),n.className="geBtn",l.appendChild(n));a.editor.cancelFirst||l.appendChild(e);mxEvent.addListener(A,
-"keypress",function(b){13==b.keyCode?C(App.MODE_DEVICE):27==b.keyCode&&(a.fileLoaded(null),a.hideDialog(),window.close())});f.appendChild(l);this.container=f};CreateDialog.showDownloadButton=!0;
+null!=b[c]&&(c=b[c]),e.push({url:a.getAttribute("url"),libs:a.getAttribute("libs"),title:a.getAttribute("title"),tooltip:a.getAttribute("url"),preview:a.getAttribute("preview"),clibs:c}));a=a.nextSibling}I.stop();F()}})};D.appendChild(ca);D.appendChild(P);var ma=!1,N=e;/^https?:\/\//.test(N)&&!a.editor.isCorsEnabledForUrl(N)&&(N=PROXY_URL+"?url="+encodeURIComponent(N));I.spin(P);null!=y?y(function(a,b){M=a;Y=ea=b;ha()},ha):ha();Q=R}mxEvent.addListener(H,"keypress",function(b){a.dialog.container.firstChild==
+D&&13==b.keyCode&&B()});e=document.createElement("div");e.style.marginTop=d?"4px":"16px";e.style.textAlign="right";e.style.position="absolute";e.style.left="40px";e.style.bottom="24px";e.style.right="40px";d||a.isOffline()||!c||null!=b||g||(y=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://support.draw.io/display/DO/Creating+and+Opening+Files")}),y.className="geBtn",e.appendChild(y));y=mxUtils.button(mxResources.get("cancel"),function(){null!=f&&f();a.hideDialog(!0)});y.className=
+"geBtn";!a.editor.cancelFirst||g&&null==f||e.appendChild(y);d||"1"==urlParams.embed||g||(d=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()}),
+d.className="geBtn",e.appendChild(d));Graph.fileSupport&&q&&(q=mxUtils.button(mxResources.get("import"),function(){if(null==a.newDlgFileInputElt){var b=document.createElement("input");b.setAttribute("multiple","multiple");b.setAttribute("type","file");mxEvent.addListener(b,"change",function(e){a.openFiles(b.files,!0);b.value=""});b.style.display="none";document.body.appendChild(b);a.newDlgFileInputElt=b}a.newDlgFileInputElt.click()}),q.className="geBtn",e.appendChild(q));e.appendChild(E);a.editor.cancelFirst||
+null!=b||g&&null==f||e.appendChild(y);D.appendChild(e);this.container=D},CreateDialog=function(a,d,c,b,g,f,k,l,n,t,e,m,p,v,q,u,y){function x(b,e,c,p){function f(){mxEvent.addListener(g,"click",function(){var b=c;if(k){var e=z.value,m=e.lastIndexOf(".");if(0>d.lastIndexOf(".")&&0>m){var b=null!=b?b:C.value,p="";b==App.MODE_GOOGLE?p=a.drive.extension:b==App.MODE_GITHUB?p=a.gitHub.extension:b==App.MODE_GITLAB?p=a.gitLab.extension:b==App.MODE_TRELLO?p=a.trello.extension:b==App.MODE_DROPBOX?p=a.dropbox.extension:
+b==App.MODE_ONEDRIVE?p=a.oneDrive.extension:b==App.MODE_DEVICE&&(p=".drawio");0<=m&&(e=e.substring(0,m));z.value=e+p}}B(c)})}var g=document.createElement("a");g.style.overflow="hidden";var u=document.createElement("img");u.src=b;u.setAttribute("border","0");u.setAttribute("align","absmiddle");u.style.width="60px";u.style.height="60px";u.style.paddingBottom="6px";g.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";g.className="geBaseButton";g.style.position="relative";g.style.margin="4px";g.style.padding=
+"8px 8px 10px 8px";g.style.whiteSpace="nowrap";g.appendChild(u);mxClient.IS_QUIRKS&&(g.style.cssFloat="left",g.style.zoom="1");g.style.color="gray";g.style.fontSize="11px";var v=document.createElement("div");g.appendChild(v);mxUtils.write(v,e);if(null!=p&&null==a[p]){u.style.visibility="hidden";mxUtils.setOpacity(v,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(g);var A=window.setTimeout(function(){null==
+a[p]&&(q.stop(),g.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[p]&&(window.clearTimeout(A),mxUtils.setOpacity(v,100),u.style.visibility="",q.stop(),f())}))}else f();F.appendChild(g);++D==m&&(mxUtils.br(F),D=0)}function B(b){var e=z.value;if(null==b||null!=e&&0<e.length)y&&a.hideDialog(),c(e,b,z)}k=null!=k?k:!0;l=null!=l?l:!0;m=null!=m?m:4;y=null!=y?y:!0;f=document.createElement("div");f.style.whiteSpace="nowrap";null==b&&a.addLanguageMenu(f);var A=
+document.createElement("h2");mxUtils.write(A,g||mxResources.get("create"));A.style.marginTop="0px";A.style.marginBottom="24px";f.appendChild(A);mxUtils.write(f,mxResources.get("filename")+":");var z=document.createElement("input");z.setAttribute("value",d);z.style.width="200px";z.style.marginLeft="10px";z.style.marginBottom="20px";z.style.maxWidth="70%";this.init=function(){z.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?z.select():document.execCommand("selectAll",
+!1,null)};f.appendChild(z);null!=u&&(null!=a.editor.diagramFileTypes&&(g=FilenameDialog.createFileTypes(a,z,a.editor.diagramFileTypes),g.style.marginLeft="6px",g.style.width="80px",f.appendChild(g)),f.appendChild(FilenameDialog.createTypeHint(a,z,u)));null==p||null==v||"image/"!=v.substring(0,6)||"image/svg"==v.substring(0,9)&&!mxClient.IS_SVG||(z.style.width="160px",u=document.createElement("img"),p=q?p:btoa(unescape(encodeURIComponent(p))),u.setAttribute("src","data:"+v+";base64,"+p),u.style.position=
+"absolute",u.style.top="70px",u.style.right="100px",u.style.maxWidth="120px",u.style.maxHeight="80px",mxUtils.setPrefixedStyle(u.style,"transform","translate(50%,-50%)"),f.appendChild(u),n&&Editor.popupsAllowed&&(u.style.cursor="pointer",mxEvent.addGestureListeners(u,null,null,function(){B("_blank")})));mxUtils.br(f);var F=document.createElement("div");F.style.textAlign="center";var D=0;F.style.marginTop="6px";f.appendChild(F);var C=document.createElement("select");C.style.marginLeft="10px";a.isOfflineApp()||
+a.isOffline()||("function"===typeof window.DriveClient&&(v=document.createElement("option"),v.setAttribute("value",App.MODE_GOOGLE),mxUtils.write(v,mxResources.get("googleDrive")),C.appendChild(v),x(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(v=document.createElement("option"),v.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(v,mxResources.get("oneDrive")),C.appendChild(v),a.mode==App.MODE_ONEDRIVE&&
+v.setAttribute("selected","selected"),x(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive")),"function"===typeof window.DropboxClient&&(v=document.createElement("option"),v.setAttribute("value",App.MODE_DROPBOX),mxUtils.write(v,mxResources.get("dropbox")),C.appendChild(v),a.mode==App.MODE_DROPBOX&&v.setAttribute("selected","selected"),x(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),null!=a.gitHub&&(v=document.createElement("option"),
+v.setAttribute("value",App.MODE_GITHUB),mxUtils.write(v,mxResources.get("github")),C.appendChild(v),x(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),null!=a.gitLab&&(v=document.createElement("option"),v.setAttribute("value",App.MODE_GITLAB),mxUtils.write(v,mxResources.get("gitlab")),C.appendChild(v),x(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab")),"function"===typeof window.TrelloClient&&(v=document.createElement("option"),v.setAttribute("value",
+App.MODE_TRELLO),mxUtils.write(v,mxResources.get("trello")),C.appendChild(v),x(IMAGE_PATH+"/trello-logo.svg",mxResources.get("trello"),App.MODE_TRELLO,"trello")));Editor.useLocalStorage&&"device"!=urlParams.storage&&null==a.getCurrentFile()||(v=document.createElement("option"),v.setAttribute("value",App.MODE_DEVICE),mxUtils.write(v,mxResources.get("device")),C.appendChild(v),a.mode!=App.MODE_DEVICE&&l||v.setAttribute("selected","selected"),e&&x(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")),C.appendChild(l),a.mode==App.MODE_BROWSER&&l.setAttribute("selected","selected"),x(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));l=document.createElement("div");l.style.marginTop="26px";l.style.textAlign="center";null!=t&&(e=mxUtils.button(mxResources.get("help"),function(){a.openLink(t)}),
+e.className="geBtn",l.appendChild(e));e=mxUtils.button(mxResources.get("cancel"),function(){null!=b?b():(a.fileLoaded(null),a.hideDialog(),window.close(),window.location.href=a.getUrl())});e.className="geBtn";a.editor.cancelFirst&&l.appendChild(e);null==b&&(v=mxUtils.button(mxResources.get("decideLater"),function(){B(null)}),v.className="geBtn",l.appendChild(v));n&&Editor.popupsAllowed&&(n=mxUtils.button(mxResources.get("openInNewWindow"),function(){B("_blank")}),n.className="geBtn",l.appendChild(n));
+CreateDialog.showDownloadButton&&(n=mxUtils.button(mxResources.get("download"),function(){B("download")}),n.className="geBtn",l.appendChild(n));a.editor.cancelFirst||l.appendChild(e);mxEvent.addListener(z,"keypress",function(b){13==b.keyCode?B(App.MODE_DEVICE):27==b.keyCode&&(a.fileLoaded(null),a.hideDialog(),window.close())});f.appendChild(l);this.container=f};CreateDialog.showDownloadButton=!0;
var PopupDialog=function(a,d,c,b,g){g=null!=g?g:!0;var f=document.createElement("div");f.style.textAlign="left";mxUtils.write(f,mxResources.get("fileOpenLocation"));mxUtils.br(f);mxUtils.br(f);var k=mxUtils.button(mxResources.get("openInThisWindow"),function(){g&&a.hideDialog();null!=b&&b()});k.className="geBtn";k.style.marginBottom="8px";k.style.width="280px";f.appendChild(k);mxUtils.br(f);var l=mxUtils.button(mxResources.get("openInNewWindow"),function(){g&&a.hideDialog();null!=c&&c();a.openLink(d,
null,!0)});l.className="geBtn gePrimaryBtn";l.style.width=k.style.width;f.appendChild(l);mxUtils.br(f);mxUtils.br(f);mxUtils.write(f,mxResources.get("allowPopups"));this.container=f},ImageDialog=function(a,d,c,b,g,f){f=null!=f?f:!0;var k=a.editor.graph,l=document.createElement("div");mxUtils.write(l,d);d=document.createElement("div");d.className="geTitle";d.style.backgroundColor="transparent";d.style.borderColor="transparent";d.style.whiteSpace="nowrap";d.style.textOverflow="clip";d.style.cursor=
"default";mxClient.IS_VML||(d.style.paddingRight="20px");var n=document.createElement("input");n.setAttribute("value",c);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?460: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";c=document.createElement("div");c.setAttribute("title",mxResources.get("reset"));c.style.position="relative";c.style.left="-16px";c.style.width="12px";c.style.height="14px";c.style.cursor="pointer";c.style.display=mxClient.IS_VML?"inline":"inline-block";c.style.top=(mxClient.IS_VML?0:3)+"px";c.style.background="url('"+a.editor.transparentImage+"')";mxEvent.addListener(c,"click",function(){n.value="";n.focus()});d.appendChild(n);d.appendChild(c);
-l.appendChild(d);var u=function(e,c,d,m){var p="data:"==e.substring(0,5);!a.isOffline()||p&&"undefined"===typeof chrome?0<e.length&&a.spinner.spin(document.body,mxResources.get("inserting"))?a.loadImage(e,function(p){a.spinner.stop();a.hideDialog();var g=!1===m?1:null!=c&&null!=d?Math.max(c/p.width,d/p.height):Math.min(1,Math.min(520/p.width,520/p.height));f&&(e=a.convertDataUri(e));b(e,Math.round(Number(p.width)*g),Math.round(Number(p.height)*g))},function(){a.spinner.stop();b(null);a.showError(mxResources.get("error"),
-mxResources.get("fileNotFound"),mxResources.get("ok"))}):(a.hideDialog(),b(e)):(e=a.convertDataUri(e),c=null==c?120:c,d=null==d?100:d,a.hideDialog(),b(e,c,d))},e=function(e,c){if(null!=e){var d=g?null:k.getModel().getGeometry(k.getSelectionCell());null!=d?u(e,d.width,d.height,c):u(e,null,null,c)}else a.hideDialog(),b(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",
+l.appendChild(d);var t=function(e,c,d,m){var p="data:"==e.substring(0,5);!a.isOffline()||p&&"undefined"===typeof chrome?0<e.length&&a.spinner.spin(document.body,mxResources.get("inserting"))?a.loadImage(e,function(p){a.spinner.stop();a.hideDialog();var g=!1===m?1:null!=c&&null!=d?Math.max(c/p.width,d/p.height):Math.min(1,Math.min(520/p.width,520/p.height));f&&(e=a.convertDataUri(e));b(e,Math.round(Number(p.width)*g),Math.round(Number(p.height)*g))},function(){a.spinner.stop();b(null);a.showError(mxResources.get("error"),
+mxResources.get("fileNotFound"),mxResources.get("ok"))}):(a.hideDialog(),b(e)):(e=a.convertDataUri(e),c=null==c?120:c,d=null==d?100:d,a.hideDialog(),b(e,c,d))},e=function(e,c){if(null!=e){var d=g?null:k.getModel().getGeometry(k.getSelectionCell());null!=d?t(e,d.width,d.height,c):t(e,null,null,c)}else a.hideDialog(),b(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(e){null==c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=a.highlightElement(b));e.stopPropagation();e.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,d,m,p,f,g){e(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),null,null,!0);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)&&e(decodeURIComponent(d))}b.stopPropagation();b.preventDefault()}),!1)}};c=document.createElement("div");c.style.marginTop=mxClient.IS_QUIRKS?"22px":"14px";c.style.textAlign="center";d=mxUtils.button(mxResources.get("cancel"),
function(){a.spinner.stop();a.hideDialog()});d.className="geBtn";a.editor.cancelFirst&&c.appendChild(d);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){if(null==a.imgDlgFileInputElt){var m=document.createElement("input");m.setAttribute("multiple","multiple");m.setAttribute("type","file");mxEvent.addListener(m,"change",function(b){null!=
@@ -8700,177 +8701,177 @@ m.files&&(a.importFiles(m.files,0,0,a.maxImageSize,function(a,b,c,d,m,p){e(a)},f
a.imageSearchPicker=b.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.imageSearchPicker.setVisible(!0)}),p.className="geBtn",c.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=(new google.picker.PickerBuilder).setAppId(a.drive.appId).setLocale(mxLanguage).setOAuthToken(a.drive.token).addView(google.picker.ViewId.PHOTO_UPLOAD);
a.photoPicker=b.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.photoPicker.setVisible(!0)}))}),p.className="geBtn",c.appendChild(p)));mxEvent.addListener(n,"keypress",function(a){13==a.keyCode&&e(n.value)});p=mxUtils.button(mxResources.get("apply"),function(){e(n.value)});p.className="geBtn gePrimaryBtn";c.appendChild(p);a.editor.cancelFirst||c.appendChild(d);Graph.fileSupport&&(c.style.marginTop="120px",l.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",l.style.backgroundPosition=
"center 65%",l.style.backgroundRepeat="no-repeat",d=document.createElement("div"),d.style.position="absolute",d.style.width="420px",d.style.top="58%",d.style.textAlign="center",d.style.fontSize="18px",d.style.color="#a0c3ff",mxUtils.write(d,mxResources.get("dragImagesHere")),l.appendChild(d));l.appendChild(c);this.container=l},LinkDialog=function(a,d,c,b,g){function f(a,b,e){e=mxUtils.button("",e);e.className="geBtn";e.setAttribute("title",b);b=document.createElement("img");b.style.height="26px";
-b.style.width="26px";b.setAttribute("src",a);e.style.minWidth="42px";e.style.verticalAlign="middle";e.appendChild(b);z.appendChild(e)}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="100%";n.style.boxSizing="border-box";n.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";n.style.backgroundRepeat="no-repeat";n.style.backgroundPosition="100% 50%";n.style.paddingRight="14px";var u=document.createElement("div");u.setAttribute("title",mxResources.get("reset"));u.style.position="relative";u.style.left="-16px";u.style.width="12px";u.style.height=
-"14px";u.style.cursor="pointer";u.style.display=mxClient.IS_VML?"inline":"inline-block";u.style.top=(mxClient.IS_VML?0:3)+"px";u.style.background="url('"+a.editor.transparentImage+"')";mxEvent.addListener(u,"click",function(){n.value="";n.focus()});var e=document.createElement("input");e.style.cssText="margin-right:8px;margin-bottom:8px;";e.setAttribute("value","url");e.setAttribute("type","radio");e.setAttribute("name","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="100%";if(g&&null!=a.pages){null!=d&&"data:page/id,"==d.substring(0,13)?(m.setAttribute("checked","checked"),m.defaultChecked=!0):(n.setAttribute("value",d),e.setAttribute("checked","checked"),e.defaultChecked=!0);l.appendChild(e);l.appendChild(n);l.appendChild(u);mxUtils.br(l);l.appendChild(m);g=!1;for(u=0;u<a.pages.length;u++){var q=document.createElement("option");
-mxUtils.write(q,a.pages[u].getName()||mxResources.get("pageWithNumber",[u+1]));q.setAttribute("value","data:page/id,"+a.pages[u].getId());d==q.getAttribute("value")&&(q.setAttribute("selected","selected"),g=!0);p.appendChild(q)}if(!g&&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)})}l.appendChild(p)}else n.setAttribute("value",d),l.appendChild(n),l.appendChild(u);k.appendChild(l);var v=mxUtils.button(c,function(){a.hideDialog();b(m.checked?"pageNotFound"!==p.value?p.value:d: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",
+b.style.width="26px";b.setAttribute("src",a);e.style.minWidth="42px";e.style.verticalAlign="middle";e.appendChild(b);y.appendChild(e)}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="100%";n.style.boxSizing="border-box";n.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";n.style.backgroundRepeat="no-repeat";n.style.backgroundPosition="100% 50%";n.style.paddingRight="14px";var t=document.createElement("div");t.setAttribute("title",mxResources.get("reset"));t.style.position="relative";t.style.left="-16px";t.style.width="12px";t.style.height=
+"14px";t.style.cursor="pointer";t.style.display=mxClient.IS_VML?"inline":"inline-block";t.style.top=(mxClient.IS_VML?0:3)+"px";t.style.background="url('"+a.editor.transparentImage+"')";mxEvent.addListener(t,"click",function(){n.value="";n.focus()});var e=document.createElement("input");e.style.cssText="margin-right:8px;margin-bottom:8px;";e.setAttribute("value","url");e.setAttribute("type","radio");e.setAttribute("name","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="100%";if(g&&null!=a.pages){null!=d&&"data:page/id,"==d.substring(0,13)?(m.setAttribute("checked","checked"),m.defaultChecked=!0):(n.setAttribute("value",d),e.setAttribute("checked","checked"),e.defaultChecked=!0);l.appendChild(e);l.appendChild(n);l.appendChild(t);mxUtils.br(l);l.appendChild(m);g=!1;for(t=0;t<a.pages.length;t++){var v=document.createElement("option");
+mxUtils.write(v,a.pages[t].getName()||mxResources.get("pageWithNumber",[t+1]));v.setAttribute("value","data:page/id,"+a.pages[t].getId());d==v.getAttribute("value")&&(v.setAttribute("selected","selected"),g=!0);p.appendChild(v)}if(!g&&m.checked){var q=document.createElement("option");mxUtils.write(q,mxResources.get("pageNotFound"));q.setAttribute("disabled","disabled");q.setAttribute("selected","selected");q.setAttribute("value","pageNotFound");p.appendChild(q);mxEvent.addListener(p,"change",function(){null==
+q.parentNode||q.selected||q.parentNode.removeChild(q)})}l.appendChild(p)}else n.setAttribute("value",d),l.appendChild(n),l.appendChild(t);k.appendChild(l);var u=mxUtils.button(c,function(){a.hideDialog();b(m.checked?"pageNotFound"!==p.value?p.value:d:n.value,LinkDialog.selectedDocs)});u.style.verticalAlign="middle";u.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(){e.removeAttribute("checked");m.setAttribute("checked","checked");m.checked=!0});mxEvent.addListener(n,"focus",function(){m.removeAttribute("checked");e.setAttribute("checked","checked");e.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(e){null==
-c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=a.highlightElement(b));e.stopPropagation();e.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")),e.setAttribute("checked","checked"),e.checked=!0,v.click());a.stopPropagation();a.preventDefault()}),!1)}};var z=document.createElement("div");z.style.marginTop=
-"20px";z.style.textAlign="center";c=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/solution/articles/16000080137")});c.style.verticalAlign="middle";c.className="geBtn";z.appendChild(c);a.isOffline()&&!mxClient.IS_CHROMEAPP&&(c.style.display="none");c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});c.style.verticalAlign="middle";c.className="geBtn";a.editor.cancelFirst&&z.appendChild(c);LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(a){if(a.action==
+c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=a.highlightElement(b));e.stopPropagation();e.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")),e.setAttribute("checked","checked"),e.checked=!0,u.click());a.stopPropagation();a.preventDefault()}),!1)}};var y=document.createElement("div");y.style.marginTop=
+"20px";y.style.textAlign="center";c=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/solution/articles/16000080137")});c.style.verticalAlign="middle";c.className="geBtn";y.appendChild(c);a.isOffline()&&!mxClient.IS_CHROMEAPP&&(c.style.display="none");c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});c.style.verticalAlign="middle";c.className="geBtn";a.editor.cancelFirst&&y.appendChild(c);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&&
f(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=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0),e=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0),c=(new google.picker.DocsView).setIncludeFolders(!0).setEnableDrives(!0).setSelectFolderEnabled(!0),
b=(new google.picker.PickerBuilder).setAppId(a.drive.appId).setLocale(mxLanguage).setOAuthToken(a.drive.token).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(b).addView(e).addView(c).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.PHOTO_UPLOAD);a.linkPicker=b.setCallback(function(a){LinkDialog.filePicked(a)}).build()}a.linkPicker.setVisible(!0)}))});
"undefined"!=typeof Dropbox&&"undefined"!=typeof Dropbox.choose&&f(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&&f(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&&f(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),function(){a.gitHub.pickFile(function(a){if(null!=
a){a=a.split("/");var b=a[0],e=a[1],c=a[2];a=a.slice(3,a.length).join("/");n.value="https://github.com/"+b+"/"+e+"/blob/"+c+"/"+a;n.focus()}})});null!=a.gitLab&&f(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),function(){a.gitLab.pickFile(function(a){if(null!=a){a=a.split("/");var b=a[0],e=a[1],c=a[2];a=a.slice(3,a.length).join("/");n.value=DRAWIO_GITLAB_URL+"/"+b+"/"+e+"/blob/"+c+"/"+a;n.focus()}})});mxEvent.addListener(n,"keypress",function(e){13==e.keyCode&&(a.hideDialog(),b(m.checked?
-p.value:n.value,LinkDialog.selectedDocs))});z.appendChild(v);a.editor.cancelFirst||z.appendChild(c);k.appendChild(z);this.container=k},FeedbackDialog=function(a,d,c,b){var g=document.createElement("div"),f=document.createElement("div");mxUtils.write(f,mxResources.get("sendYourFeedback"));f.style.fontSize="18px";f.style.marginBottom="18px";g.appendChild(f);f=document.createElement("div");mxUtils.write(f,mxResources.get("yourEmailAddress")+(c?"":" ("+mxResources.get("required")+")"));g.appendChild(f);
-var k=document.createElement("input");k.setAttribute("type","text");k.style.marginTop="6px";k.style.width="600px";var l=mxUtils.button(mxResources.get("sendMessage"),function(){var c=e.value+(u.checked?"\nDiagram:\n"+(null!=b?b:mxUtils.getXml(a.getXmlFileData())):"")+"\nuserAgent:\n"+navigator.userAgent+"\nappVersion:\n"+navigator.appVersion+"\nappName:\n"+navigator.appName+"\nplatform:\n"+navigator.platform;c.length>FeedbackDialog.maxAttachmentSize?a.alert(mxResources.get("drawingTooLarge")):(a.hideDialog(),
+p.value:n.value,LinkDialog.selectedDocs))});y.appendChild(u);a.editor.cancelFirst||y.appendChild(c);k.appendChild(y);this.container=k},FeedbackDialog=function(a,d,c,b){var g=document.createElement("div"),f=document.createElement("div");mxUtils.write(f,mxResources.get("sendYourFeedback"));f.style.fontSize="18px";f.style.marginBottom="18px";g.appendChild(f);f=document.createElement("div");mxUtils.write(f,mxResources.get("yourEmailAddress")+(c?"":" ("+mxResources.get("required")+")"));g.appendChild(f);
+var k=document.createElement("input");k.setAttribute("type","text");k.style.marginTop="6px";k.style.width="600px";var l=mxUtils.button(mxResources.get("sendMessage"),function(){var c=e.value+(t.checked?"\nDiagram:\n"+(null!=b?b:mxUtils.getXml(a.getXmlFileData())):"")+"\nuserAgent:\n"+navigator.userAgent+"\nappVersion:\n"+navigator.appVersion+"\nappName:\n"+navigator.appName+"\nplatform:\n"+navigator.platform;c.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(k.value)+"&version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&body="+encodeURIComponent((null!=d?d:"Feedback")+":\n"+c),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"))}))});
l.className="geBtn gePrimaryBtn";if(!c){l.setAttribute("disabled","disabled");var n=/^(([^<>()[\]\\.,;:\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(k,"change",function(){0<k.value.length&&0<n.test(k.value)?l.removeAttribute("disabled"):l.setAttribute("disabled","disabled")});mxEvent.addListener(k,"keyup",function(){0<k.value.length&&n.test(k.value)?l.removeAttribute("disabled"):l.setAttribute("disabled",
-"disabled")})}g.appendChild(k);this.init=function(){k.focus()};var u=document.createElement("input");u.setAttribute("type","checkbox");u.setAttribute("checked","checked");u.defaultChecked=!0;c=document.createElement("p");c.style.marginTop="14px";c.appendChild(u);f=document.createElement("span");mxUtils.write(f," "+mxResources.get("includeCopyOfMyDiagram"));c.appendChild(f);mxEvent.addListener(f,"click",function(a){u.checked=!u.checked;mxEvent.consume(a)});g.appendChild(c);f=document.createElement("div");
+"disabled")})}g.appendChild(k);this.init=function(){k.focus()};var t=document.createElement("input");t.setAttribute("type","checkbox");t.setAttribute("checked","checked");t.defaultChecked=!0;c=document.createElement("p");c.style.marginTop="14px";c.appendChild(t);f=document.createElement("span");mxUtils.write(f," "+mxResources.get("includeCopyOfMyDiagram"));c.appendChild(f);mxEvent.addListener(f,"click",function(a){t.checked=!t.checked;mxEvent.consume(a)});g.appendChild(c);f=document.createElement("div");
mxUtils.write(f,mxResources.get("feedback"));g.appendChild(f);var e=document.createElement("textarea");e.style.resize="none";e.style.width="600px";e.style.height="140px";e.style.marginTop="6px";e.setAttribute("placeholder",mxResources.get("comments"));g.appendChild(e);c=document.createElement("div");c.style.marginTop="26px";c.style.textAlign="right";f=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});f.className="geBtn";a.editor.cancelFirst?(c.appendChild(f),c.appendChild(l)):(c.appendChild(l),
c.appendChild(f));g.appendChild(c);this.container=g};FeedbackDialog.maxAttachmentSize=1E6;
var RevisionDialog=function(a,d,c){var b=document.createElement("div"),g=document.createElement("h3");g.style.marginTop="0px";mxUtils.write(g,mxResources.get("revisionHistory"));b.appendChild(g);var f=document.createElement("div");f.style.position="absolute";f.style.overflow="auto";f.style.width="170px";f.style.height="378px";b.appendChild(f);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);b.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,u=null,e=0,m=l.getGlobalVariable;l.getGlobalVariable=function(a){return"page"==a&&null!=u&&null!=u[e]?u[e].getAttribute("name"):"pagenumber"==a?e+1:"pagecount"==a?null!=u?u.length:1:m.apply(this,arguments)};l.getLinkForCell=
-function(){return null};Editor.MathJaxRender&&l.addListener(mxEvent.SIZE,mxUtils.bind(this,function(b,e){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(),t=null,v=null,z=null,y=null,C=mxUtils.button("",function(){null!=z&&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";C.setAttribute("disabled","disabled");mxUtils.setOpacity(C,20);var x=mxUtils.button("",function(){null!=z&&l.zoomOut()});x.className="geSprite geSprite-zoomout";x.setAttribute("title",mxResources.get("zoomOut"));x.style.outline="none";x.style.border="none";x.style.margin="2px";x.setAttribute("disabled","disabled");mxUtils.setOpacity(x,20);var A=mxUtils.button("",function(){null!=z&&
-(l.maxFitScale=8,l.fit(8),l.center())});A.className="geSprite geSprite-fit";A.setAttribute("title",mxResources.get("fit"));A.style.outline="none";A.style.border="none";A.style.margin="2px";A.setAttribute("disabled","disabled");mxUtils.setOpacity(A,20);var E=mxUtils.button("",function(){null!=z&&(l.zoomActual(),l.center())});E.className="geSprite geSprite-actualsize";E.setAttribute("title",mxResources.get("actualSize"));E.style.outline="none";E.style.border="none";E.style.margin="2px";E.setAttribute("disabled",
-"disabled");mxUtils.setOpacity(E,20);var D=document.createElement("div");D.style.position="absolute";D.style.textAlign="right";D.style.color="gray";D.style.marginTop="10px";D.style.backgroundColor="transparent";D.style.top="440px";D.style.right="32px";D.style.maxWidth="380px";D.style.cursor="default";var B=mxUtils.button(mxResources.get("download"),function(){if(null!=z){var b=mxUtils.getXml(z.documentElement),e=a.getBaseFilename()+".drawio";a.isLocalFileSave()?a.saveLocalFile(b,e,"text/xml"):(b=
-"undefined"===typeof pako?"&xml="+encodeURIComponent(b):"&data="+encodeURIComponent(Graph.compress(b)),(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(e)+"&format=xml"+b)).simulate(document,"_blank"))}});B.className="geBtn";B.setAttribute("disabled","disabled");var H=mxUtils.button(mxResources.get("restore"),function(){null!=z&&null!=y&&a.confirm(mxResources.get("areYouSure"),function(){null!=c?c(y):a.spinner.spin(document.body,mxResources.get("restoring"))&&q.save(!0,function(b){a.spinner.stop();
-a.replaceFileData(y);a.hideDialog()},function(b){a.spinner.stop();a.editor.setStatus("");a.handleError(b,null!=b?mxResources.get("errorSavingFile"):null)})})});H.className="geBtn";H.setAttribute("disabled","disabled");var G=document.createElement("select");G.setAttribute("disabled","disabled");G.style.maxWidth="80px";G.style.position="relative";G.style.top="-2px";G.style.verticalAlign="bottom";G.style.marginRight="6px";G.style.display="none";var J=null;mxEvent.addListener(G,"change",function(a){null!=
-J&&(J(a),mxEvent.consume(a))});var I=mxUtils.button(mxResources.get("edit"),function(){null!=z&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(z.documentElement)),a.openLink(a.getUrl(),null,!0))});I.className="geBtn";I.setAttribute("disabled","disabled");null!=c&&(I.style.display="none");var F=mxUtils.button(mxResources.get("show"),function(){null!=v&&a.openLink(v.getUrl(G.selectedIndex))});F.className="geBtn gePrimaryBtn";F.setAttribute("disabled",
-"disabled");null!=c&&(F.style.display="none",H.className="geBtn gePrimaryBtn");g=document.createElement("div");g.style.position="absolute";g.style.top="482px";g.style.width="640px";g.style.textAlign="right";var K=document.createElement("div");K.className="geToolbarContainer";K.style.backgroundColor="transparent";K.style.padding="2px";K.style.border="none";K.style.left="199px";K.style.top="442px";var O=null;if(null!=d&&0<d.length){k.style.cursor="move";var Q=document.createElement("table");Q.style.border=
-"1px solid lightGray";Q.style.borderCollapse="collapse";Q.style.borderSpacing="0px";Q.style.width="100%";var Y=document.createElement("tbody"),U=(new Date).toDateString();null!=a.currentPage&&null!=a.pages&&(n=mxUtils.indexOf(a.pages,a.currentPage));for(var L=d.length-1;0<=L;L--){var V=function(b){var c=new Date(b.modifiedDate),m=null;if(0<=c.getTime()){var f=function(d){p.stop();var f=mxUtils.parseXml(d),g=a.editor.extractGraphModel(f.documentElement,!0);if(null!=g){var t=function(a){null!=a&&(a=
-v(mxUtils.parseXml(Graph.decompress(mxUtils.getTextContent(a))).documentElement));return a},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};G.style.display="none";G.innerHTML="";z=f;y=d;u=parseSelectFunction=null;e=0;if("mxfile"==g.nodeName){f=g.getElementsByTagName("diagram");u=[];for(d=0;d<f.length;d++)u.push(f[d]);e=Math.min(n,
-u.length-1);0<u.length&&t(u[e]);if(1<u.length)for(G.removeAttribute("disabled"),G.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==e&&f.setAttribute("selected","selected"),G.appendChild(f);J=function(){try{var b=parseInt(G.value);e=n=b;t(u[b])}catch(M){G.value=n,a.handleError(M)}}}else v(g);d=b.lastModifyingUserName;null!=d&&20<d.length&&(d=d.substring(0,20)+"...");
-D.innerHTML="";mxUtils.write(D,(null!=d?d+" ":"")+c.toLocaleDateString()+" "+c.toLocaleTimeString());D.setAttribute("title",m.getAttribute("title"));C.removeAttribute("disabled");x.removeAttribute("disabled");A.removeAttribute("disabled");E.removeAttribute("disabled");null!=q&&q.isRestricted()||(a.editor.graph.isEnabled()&&H.removeAttribute("disabled"),B.removeAttribute("disabled"),F.removeAttribute("disabled"),I.removeAttribute("disabled"));mxUtils.setOpacity(C,60);mxUtils.setOpacity(x,60);mxUtils.setOpacity(A,
-60);mxUtils.setOpacity(E,60)}else G.style.display="none",G.innerHTML="",D.innerHTML="",mxUtils.write(D,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==d[d.length-1]?mxUtils.write(g,mxResources.get("current")):c.toDateString()===U?mxUtils.write(g,c.toLocaleTimeString()):mxUtils.write(g,c.toLocaleDateString()+
-" "+c.toLocaleTimeString());m.appendChild(g);m.setAttribute("title",c.toLocaleDateString()+" "+c.toLocaleTimeString()+(null!=b.fileSize?" "+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",y=z=null,D.removeAttribute("title"),D.innerHTML=mxUtils.htmlEntities(mxResources.get("loading")+"..."),k.style.backgroundColor=
-"#ffffff",l.getModel().clear(),H.setAttribute("disabled","disabled"),B.setAttribute("disabled","disabled"),C.setAttribute("disabled","disabled"),x.setAttribute("disabled","disabled"),E.setAttribute("disabled","disabled"),A.setAttribute("disabled","disabled"),I.setAttribute("disabled","disabled"),F.setAttribute("disabled","disabled"),G.setAttribute("disabled","disabled"),mxUtils.setOpacity(C,20),mxUtils.setOpacity(x,20),mxUtils.setOpacity(A,20),mxUtils.setOpacity(E,20),p.spin(k),b.getXml(function(a){if(v==
-b)try{f(a)}catch(ca){D.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+": "+ca.message)}},function(a){p.stop();G.style.display="none";G.innerHTML="";D.innerHTML="";mxUtils.write(D,mxResources.get("errorLoadingFile"))}),mxEvent.consume(a))});mxEvent.addListener(m,"dblclick",function(a){F.click();window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(a)},!1);Y.appendChild(m)}return m}(d[L]);null!=V&&L==d.length-1&&(O=V)}Q.appendChild(Y);
-f.appendChild(Q)}else null==q||null==a.drive&&q.constructor==window.DriveFile||null==a.dropbox&&q.constructor==window.DropboxFile?(k.style.display="none",K.style.display="none",mxUtils.write(f,mxResources.get("notAvailable"))):(k.style.display="none",K.style.display="none",mxUtils.write(f,mxResources.get("noRevisions")));this.init=function(){null!=O&&O.click()};f=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});f.className="geBtn";K.appendChild(G);K.appendChild(C);K.appendChild(x);
-K.appendChild(E);K.appendChild(A);a.editor.cancelFirst?(g.appendChild(f),g.appendChild(B),g.appendChild(I),g.appendChild(H),g.appendChild(F)):(g.appendChild(B),g.appendChild(I),g.appendChild(H),g.appendChild(F),g.appendChild(f));b.appendChild(g);b.appendChild(K);b.appendChild(D);this.container=b},DraftDialog=function(a,d,c,b,g,f,k,l,n){var u=document.createElement("div"),e=document.createElement("div");e.style.marginTop="0px";e.style.whiteSpace="nowrap";e.style.overflow="auto";e.style.lineHeight=
-"normal";mxUtils.write(e,d);u.appendChild(e);var m=document.createElement("select"),p=mxUtils.bind(this,function(){C=mxUtils.parseXml(n[m.value].data);x=a.editor.extractGraphModel(C.documentElement,!0);A=0;this.init()});if(null!=n){m.style.marginLeft="4px";for(d=0;d<n.length;d++){var q=document.createElement("option");q.setAttribute("value",d);var t=new Date(n[d].created),v=new Date(n[d].modified);mxUtils.write(q,t.toLocaleDateString()+" "+t.toLocaleTimeString()+" - "+(t.toDateString(),v.toDateString(),
-v.toLocaleDateString())+" "+v.toLocaleTimeString());m.appendChild(q)}e.appendChild(m);mxEvent.addListener(m,"change",p)}null==c&&(c=n[0].data);var z=document.createElement("div");z.style.position="absolute";z.style.border="1px solid lightGray";z.style.marginTop="10px";z.style.width="640px";z.style.top="46px";z.style.bottom="74px";z.style.overflow="hidden";mxEvent.disableContextMenu(z);u.appendChild(z);var y=new Graph(z);y.setEnabled(!1);y.setPanning(!0);y.panningHandler.ignoreCell=!0;y.panningHandler.useLeftButtonForPanning=
-!0;y.minFitScale=null;y.maxFitScale=null;y.centerZoom=!0;var C=mxUtils.parseXml(c),x=a.editor.extractGraphModel(C.documentElement,!0),A=0,E=null,D=y.getGlobalVariable;y.getGlobalVariable=function(a){return"page"==a&&null!=E&&null!=E[A]?E[A].getAttribute("name"):"pagenumber"==a?A+1:"pagecount"==a?null!=E?E.length:1:D.apply(this,arguments)};y.getLinkForCell=function(){return null};c=mxUtils.button("",function(){y.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);e=mxUtils.button("",function(){y.zoomOut()});e.className="geSprite geSprite-zoomout";e.setAttribute("title",mxResources.get("zoomOut"));e.style.outline="none";e.style.border="none";e.style.margin="2px";mxUtils.setOpacity(e,60);d=mxUtils.button("",function(){y.maxFitScale=8;y.fit(8);y.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);q=mxUtils.button("",function(){y.zoomActual();y.center()});q.className="geSprite geSprite-actualsize";q.setAttribute("title",mxResources.get("actualSize"));q.style.outline="none";q.style.border="none";q.style.margin="2px";mxUtils.setOpacity(q,60);k=mxUtils.button(k||mxResources.get("discard"),function(){g.apply(this,[m.value,mxUtils.bind(this,function(){null!=m.parentNode&&(m.options[m.selectedIndex].parentNode.removeChild(m.options[m.selectedIndex]),
-0<m.options.length?(m.value=m.options[0].value,p()):a.hideDialog(!0))})])});k.className="geBtn";var B=document.createElement("select");B.style.maxWidth="80px";B.style.position="relative";B.style.top="-2px";B.style.verticalAlign="bottom";B.style.marginRight="6px";B.style.display="none";f=mxUtils.button(f||mxResources.get("edit"),function(){b.apply(this,[m.value])});f.className="geBtn gePrimaryBtn";t=document.createElement("div");t.style.position="absolute";t.style.bottom="30px";t.style.width="640px";
-t.style.textAlign="right";v=document.createElement("div");v.className="geToolbarContainer";v.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";this.init=function(){function a(a){if(null!=a){var b=a.getAttribute("background");if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";z.style.backgroundColor=b;(new mxCodec(a.ownerDocument)).decode(a,y.getModel());y.maxFitScale=1;y.fit(8);y.center()}}function b(b){null!=b&&(b=a(mxUtils.parseXml(Graph.decompress(mxUtils.getTextContent(b))).documentElement));
-return b}mxEvent.addListener(B,"change",function(a){A=parseInt(B.value);b(E[A]);mxEvent.consume(a)});if("mxfile"==x.nodeName){var e=x.getElementsByTagName("diagram");E=[];for(var c=0;c<e.length;c++)E.push(e[c]);0<E.length&&b(E[A]);B.innerHTML="";if(1<E.length)for(B.style.display="",c=0;c<E.length;c++)e=document.createElement("option"),mxUtils.write(e,E[c].getAttribute("name")||mxResources.get("pageWithNumber",[c+1])),e.setAttribute("value",c),c==A&&e.setAttribute("selected","selected"),B.appendChild(e);
-else B.style.display="none"}else a(x)};v.appendChild(B);v.appendChild(c);v.appendChild(e);v.appendChild(q);v.appendChild(d);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?(t.appendChild(c),null!=l&&t.appendChild(l),t.appendChild(k),t.appendChild(f)):(t.appendChild(f),t.appendChild(k),null!=l&&t.appendChild(l),t.appendChild(c));u.appendChild(t);
-u.appendChild(v);this.container=u},FindWindow=function(a,d,c,b,g){function f(a,b,e){if("object"===typeof b.value&&null!=b.value.attributes){b=b.value.attributes;for(var c=0;c<b.length;c++)if("label"!=b[c].nodeName){var d=mxUtils.trim(b[c].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==a&&d.substring(0,e.length)===e||null!=a&&a.test(d))return!0}}return!1}function k(b){var c=n.model.getDescendants(n.model.getRoot()),d=q.value.toLowerCase(),p=t.checked?new RegExp(d):null,
-g=null;u!=d&&(u=d,e=null,m=!1);var v=null==e;if(0<d.length){if(m){m=!1;for(var x,l=0;l<a.pages.length;l++)if(a.currentPage==a.pages[l]){x=l;break}b=(x+1)%a.pages.length;e=null;do m=!1,c=a.pages[b],n=a.createTemporaryGraph(n.getStylesheet()),a.updatePageRoot(c),n.model.setRoot(c.root),b=(b+1)%a.pages.length;while(!k(!0)&&b!=x);e&&(e=null,a.selectPage(c));m=!1;n=a.editor.graph;return k(!0)}for(l=0;l<c.length;l++){x=n.view.getState(c[l]);if(null!=x&&null!=x.cell.value&&(v||null==g)&&(n.model.isVertex(x.cell)||
-n.model.isEdge(x.cell))&&(n.isHtmlLabel(x.cell)?(y.innerHTML=n.getLabel(x.cell),label=mxUtils.extractTextWithWhitespace([y])):label=n.getLabel(x.cell),label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase(),null==p&&(label.substring(0,d.length)===d||f(p,x.cell,d))||null!=p&&(p.test(label)||f(p,x.cell,d))))if(v){g=x;break}else null==g&&(g=x);v=v||x==e}}if(null!=g){if(l==c.length&&z.checked)return e=null,m=!0,k(!0);e=g;n.scrollCellToVisible(e.cell);n.isEnabled()?n.setSelectionCell(e.cell):
-n.highlightCell(e.cell)}else{if(!b&&z.checked)return m=!0,k(!0);n.isEnabled()&&n.clearSelection()}return 0==d.length||null!=g}var l=a.actions.get("find"),n=a.editor.graph,u=null,e=null,m=!1,p=document.createElement("div");p.style.userSelect="none";p.style.overflow="hidden";p.style.padding="10px";p.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";p.appendChild(q);mxUtils.br(p);var t=document.createElement("input");t.setAttribute("id","geFindWinRegExChck");t.setAttribute("type","checkbox");t.style.marginRight="4px";p.appendChild(t);var v=document.createElement("label");v.setAttribute("for","geFindWinRegExChck");p.appendChild(v);mxUtils.write(v,mxResources.get("regularExpression"));p.appendChild(v);v=a.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000088250");
-v.style.position="relative";v.style.marginLeft="6px";v.style.top="-1px";p.appendChild(v);mxUtils.br(p);var z=document.createElement("input");z.setAttribute("id","geFindWinAllPagesChck");z.setAttribute("type","checkbox");z.style.marginRight="4px";p.appendChild(z);v=document.createElement("label");v.setAttribute("for","geFindWinAllPagesChck");p.appendChild(v);mxUtils.write(v,mxResources.get("allPages"));p.appendChild(v);var y=document.createElement("div");mxUtils.br(p);v=mxUtils.button(mxResources.get("reset"),
-function(){q.value="";q.style.backgroundColor="";u=e=null;m=!1;q.focus()});v.setAttribute("title",mxResources.get("reset"));v.style.marginTop="6px";v.style.marginRight="4px";v.style.marginLeft=(b-20-156)/2+"px";v.className="geBtn";p.appendChild(v);v=mxUtils.button(mxResources.get("find"),function(){try{q.style.backgroundColor=k()?"":"#ffcfcf"}catch(x){a.handleError(x)}});v.setAttribute("title",mxResources.get("find")+" (Enter)");v.style.marginTop="6px";v.className="geBtn gePrimaryBtn";p.appendChild(v);
-mxEvent.addListener(q,"keyup",function(a){if(91==a.keyCode||17==a.keyCode)mxEvent.consume(a);else if(27==a.keyCode)l.funct();else if(u!=q.value.toLowerCase()||13==a.keyCode)try{q.style.backgroundColor=k()?"":"#ffcfcf"}catch(A){q.style.backgroundColor="#ffcfcf"}});mxEvent.addListener(p,"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"),p,d,c,b,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.fit();this.window.isVisible()?(q.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?q.select():document.execCommand("selectAll",!1,null),null!=a.pages&&1<a.pages.length?z.removeAttribute("disabled"):(z.checked=!1,z.setAttribute("disabled","disabled"))):n.container.focus()}));this.window.setLocation=function(a,
-b){var e=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;a=Math.max(0,Math.min(a,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,e-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};var C=mxUtils.bind(this,function(){var a=this.window.getX(),b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window,
-"resize",C);this.destroy=function(){mxEvent.removeListener(window,"resize",C);this.window.destroy()}},FreehandWindow=function(a,d,c,b,g){var f=a.editor.graph;a=document.createElement("div");a.style.userSelect="none";a.style.overflow="hidden";a.style.height="100%";var k=mxUtils.button(mxResources.get("startDrawing"),function(){f.freehand.isDrawing()&&f.freehand.stopDrawing();f.freehand.startDrawing()});k.setAttribute("title",mxResources.get("startDrawing"));k.style.marginTop="8px";k.style.marginRight=
-"4px";k.style.width="160px";k.style.overflow="hidden";k.style.textOverflow="ellipsis";k.style.textAlign="center";k.className="geBtn gePrimaryBtn";a.appendChild(k);var l=k.cloneNode(!1);mxUtils.write(l,mxResources.get("stopDrawing"));l.setAttribute("title",mxResources.get("stopDrawing"));l.style.marginTop="4px";mxEvent.addListener(l,"click",function(){f.freehand.stopDrawing()});a.appendChild(l);this.window=new mxWindow(mxResources.get("freehand"),a,d,c,b,g,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);
-this.window.setResizable(!1);this.window.setClosable(!0);f.addListener("freehandStateChanged",mxUtils.bind(this,function(){l.className="geBtn"+(f.freehand.isDrawing()?" gePrimaryBtn":"")}));this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit()}));this.window.addListener("hide",mxUtils.bind(this,function(){f.freehand.isDrawing()&&f.freehand.stopDrawing()}));this.window.setLocation=function(a,b){var e=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;
-a=Math.max(0,Math.min(a,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,e-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};var n=mxUtils.bind(this,function(){var a=this.window.getX(),b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window,"resize",n);this.destroy=function(){mxEvent.removeListener(window,"resize",n);this.window.destroy()}},
-TagsWindow=function(a,d,c,b,g){var f=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 u=a.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000046966");u.firstChild.style.marginBottom="6px";u.style.marginLeft="6px";l.appendChild(u)}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);
-u=mxUtils.button(mxResources.get("hide"),function(){var a=f.getCellsForTags(n.value.split(" "),void 0,k,!0);f.setCellsVisible(a,!1)});u.setAttribute("title",mxResources.get("hide"));u.style.marginTop="8px";u.style.marginRight="4px";u.className="geBtn";l.appendChild(u);u=mxUtils.button(mxResources.get("show"),function(){var a=f.getCellsForTags(n.value.split(" "),void 0,k,!0);f.setCellsVisible(a,!0);if(f.isEnabled()){for(var b=[],e=0;e<a.length;e++)(f.model.isVertex(a[e])||f.model.isEdge(a[e]))&&b.push(a[e]);
-f.setSelectionCells(b)}else for(e=0;e<a.length;e++)f.highlightCell(a[e])});u.setAttribute("title",mxResources.get("show"));u.style.marginTop="8px";u.style.marginRight="4px";u.className="geBtn";l.appendChild(u);var e=a.actions.get("tags"),u=mxUtils.button(mxResources.get("close"),function(){e.funct()});u.setAttribute("title",mxResources.get("close")+" (Enter/Esc)");u.style.marginTop="8px";u.className="geBtn gePrimaryBtn";l.appendChild(u);mxEvent.addListener(n,"keyup",function(a){13!=a.keyCode&&27!=
-a.keyCode||e.funct()});this.window=new mxWindow(mxResources.get("tags"),l,d,c,b,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.fit();this.window.isVisible()?(n.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?n.select():document.execCommand("selectAll",!1,null)):f.container.focus()}));this.window.setLocation=function(a,
-b){var e=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;a=Math.max(0,Math.min(a,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,e-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};var m=mxUtils.bind(this,function(){var a=this.window.getX(),b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window,
-"resize",m);this.destroy=function(){mxEvent.removeListener(window,"resize",m);this.window.destroy()}},AuthDialog=function(a,d,c,b){var g=document.createElement("div");g.style.textAlign="center";var f=document.createElement("p");f.style.fontSize="16pt";f.style.padding="0px";f.style.margin="0px";f.style.color="gray";mxUtils.write(f,mxResources.get("authorizationRequired"));var k="Unknown",l=document.createElement("img");l.setAttribute("border","0");l.setAttribute("align","absmiddle");l.style.marginRight=
-"10px";d==a.drive?(k=mxResources.get("googleDrive"),l.src=IMAGE_PATH+"/google-drive-logo-white.svg"):d==a.dropbox?(k=mxResources.get("dropbox"),l.src=IMAGE_PATH+"/dropbox-logo-white.svg"):d==a.oneDrive?(k=mxResources.get("oneDrive"),l.src=IMAGE_PATH+"/onedrive-logo-white.svg"):d==a.gitHub?(k=mxResources.get("github"),l.src=IMAGE_PATH+"/github-logo-white.svg"):d==a.gitLab?(k=mxResources.get("gitlab"),l.src=IMAGE_PATH+"/gitlab-logo.svg",l.style.width="32px"):d==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(){b(n.checked)});k.insertBefore(l,k.firstChild);k.style.marginTop="6px";k.className="geBigButton";k.style.fontSize="18px";k.style.padding="14px";g.appendChild(f);g.appendChild(a);g.appendChild(k);c&&(c=document.createElement("p"),c.style.marginTop=
-"20px",c.appendChild(n),f=document.createElement("span"),mxUtils.write(f," "+mxResources.get("rememberMe")),c.appendChild(f),g.appendChild(c),n.checked=!0,n.defaultChecked=!0,mxEvent.addListener(f,"click",function(a){n.checked=!n.checked;mxEvent.consume(a)}));this.container=g},MoreShapesDialog=function(a,d,c){c=null!=c?c:a.sidebar.entries;var b=document.createElement("div"),g=[];if(null!=a.sidebar.customEntries)for(var f=0;f<a.sidebar.customEntries.length;f++){for(var k=a.sidebar.customEntries[f],
-l={title:a.getResource(k.title),entries:[]},n=0;n<k.entries.length;n++){var u=k.entries[n];l.entries.push({id:u.id,title:a.getResource(u.title),desc:a.getResource(u.desc),image:u.preview})}g.push(l)}for(f=0;f<c.length;f++)if(null==a.sidebar.enabledLibraries)g.push(c[f]);else{l={title:c[f].title,entries:[]};for(n=0;n<c[f].entries.length;n++)0<=mxUtils.indexOf(a.sidebar.enabledLibraries,c[f].entries[n].id)&&l.entries.push(c[f].entries[n]);0<l.entries.length&&g.push(l)}c=g;if(d){n=mxUtils.bind(this,
-function(b){for(var c=0;c<b.length;c++)(function(b){var d=t.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);e.appendChild(d);for(var f=0;f<b.entries.length;f++)(function(b){var d=t.cloneNode(!1);d.style.cursor="pointer";d.style.padding="4px 0px 4px 20px";d.style.whiteSpace="nowrap";d.style.overflow="hidden";d.style.textOverflow="ellipsis";d.setAttribute("title",b.title+" ("+b.id+")");var g=
-document.createElement("input");g.setAttribute("type","checkbox");g.checked=a.sidebar.isEntryVisible(b.id);g.defaultChecked=g.checked;d.appendChild(g);mxUtils.write(d," "+b.title);e.appendChild(d);var B=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 e=document.createElement("pre");e.style.boxSizing="border-box";e.style.fontFamily="inherit";e.style.margin="20px";e.style.right="0px";
-e.style.textAlign="left";mxUtils.write(e,b.desc);m.appendChild(e)}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=d;p.style.backgroundColor="dark"==uiTheme?"#505759":"#ebf2f9";null!=a&&mxEvent.consume(a)}};mxEvent.addListener(d,"click",B);mxEvent.addListener(d,"dblclick",function(a){g.checked=
-!g.checked;mxEvent.consume(a)});q.push(function(){return g.checked?b.id:null});0==c&&0==f&&B()})(b.entries[f])})(b[c])});f=document.createElement("div");f.className="geDialogTitle";mxUtils.write(f,mxResources.get("shapes"));f.style.position="absolute";f.style.top="0px";f.style.left="0px";f.style.lineHeight="40px";f.style.height="40px";f.style.right="0px";mxClient.IS_QUIRKS&&(f.style.width="718px");var e=document.createElement("div"),m=document.createElement("div");e.style.position="absolute";e.style.top=
-"40px";e.style.left="0px";e.style.width="202px";e.style.bottom="60px";e.style.overflow="auto";mxClient.IS_QUIRKS&&(e.style.height="437px",e.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(f.style.width)-202+"px",m.style.height=e.style.height,m.style.marginTop=e.style.marginTop);
-var p=null,q=[],t=document.createElement("div");t.style.position="relative";t.style.left="0px";t.style.right="0px";n(c);b.style.padding="30px";b.appendChild(f);b.appendChild(e);b.appendChild(m);c=document.createElement("div");c.className="geDialogFooter";c.style.position="absolute";c.style.paddingRight="16px";c.style.color="gray";c.style.left="0px";c.style.right="0px";c.style.bottom="0px";c.style.height="60px";c.style.lineHeight="52px";mxClient.IS_QUIRKS&&(c.style.width=f.style.width,c.style.paddingTop=
-"12px");var v=document.createElement("input");v.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)f=document.createElement("span"),f.style.paddingRight="20px",f.appendChild(v),mxUtils.write(f," "+mxResources.get("rememberThisSetting")),v.checked=!0,v.defaultChecked=!0,mxEvent.addListener(f,"click",function(a){mxEvent.getSource(a)!=v&&(v.checked=!v.checked,mxEvent.consume(a))}),mxClient.IS_QUIRKS&&(f.style.position="relative",f.style.top="-6px"),c.appendChild(f);f=mxUtils.button(mxResources.get("cancel"),
-function(){a.hideDialog()});f.className="geBtn";n=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();for(var b=[],e=0;e<q.length;e++){var c=q[e].apply(this,arguments);null!=c&&b.push(c)}a.sidebar.showEntries(b.join(";"),v.checked,!0)});n.className="geBtn gePrimaryBtn"}else{var z=document.createElement("table"),f=document.createElement("tbody");b.style.height="100%";b.style.overflow="auto";n=document.createElement("tr");z.style.width="100%";d=document.createElement("td");var g=document.createElement("td"),
-k=document.createElement("td"),y=mxUtils.bind(this,function(b,e,c){var d=document.createElement("input");d.type="checkbox";z.appendChild(d);d.checked=a.sidebar.isEntryVisible(c);var m=document.createElement("span");mxUtils.write(m,e);e=document.createElement("div");e.style.display="block";e.appendChild(d);e.appendChild(m);mxEvent.addListener(m,"click",function(a){d.checked=!d.checked;mxEvent.consume(a)});b.appendChild(e);return function(){return d.checked?c:null}});n.appendChild(d);n.appendChild(g);
-n.appendChild(k);f.appendChild(n);z.appendChild(f);for(var q=[],C=0,f=0;f<c.length;f++)for(n=0;n<c[f].entries.length;n++)C++;for(var x=[d,g,k],A=0,f=0;f<c.length;f++)(function(a){for(var b=0;b<a.entries.length;b++){var e=a.entries[b];q.push(y(x[Math.floor(A/(C/3))],e.title,e.id));A++}})(c[f]);b.appendChild(z);c=document.createElement("div");c.style.marginTop="18px";c.style.textAlign="center";v=document.createElement("input");isLocalStorage&&(v.setAttribute("type","checkbox"),v.checked=!0,v.defaultChecked=
-!0,c.appendChild(v),f=document.createElement("span"),mxUtils.write(f," "+mxResources.get("rememberThisSetting")),c.appendChild(f),mxEvent.addListener(f,"click",function(a){v.checked=!v.checked;mxEvent.consume(a)}));b.appendChild(c);f=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});f.className="geBtn";n=mxUtils.button(mxResources.get("apply"),function(){for(var b=["search"],e=0;e<q.length;e++){var c=q[e].apply(this,arguments);null!=c&&b.push(c)}a.sidebar.showEntries(0<b.length?
-b.join(";"):"",v.checked);a.hideDialog()});n.className="geBtn gePrimaryBtn";c=document.createElement("div");c.style.marginTop="26px";c.style.textAlign="right"}a.editor.cancelFirst?(c.appendChild(f),c.appendChild(n)):(c.appendChild(n),c.appendChild(f));b.appendChild(c);this.container=b},PluginsDialog=function(a){function d(){if(0==g.length)b.innerHTML=mxUtils.htmlEntities(mxResources.get("noPlugins"));else{b.innerHTML="";for(var e=0;e<g.length;e++){var c=document.createElement("span");c.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";c.appendChild(p);mxUtils.write(c,g[e]);b.appendChild(c);mxUtils.br(b);mxEvent.addListener(p,"click",function(b){return function(){a.confirm(mxResources.get("delete")+' "'+g[b]+'"?',function(){g.splice(b,1);d()})}}(e))}}}var c=document.createElement("div"),b=document.createElement("div");
-b.style.height="120px";b.style.overflow="auto";var g=mxSettings.getPlugins().slice();c.appendChild(b);d();var f=mxUtils.button(mxResources.get("add"),function(){var b="",c=urlParams.p;if(null!=c&&0<c.length){for(var p=c.split(";"),c=0;c<p.length;c++){var f=App.pluginRegistry[p[c]];null!=f&&(b+=f+";")}";"==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){p=a.split(";");for(a=0;a<p.length;a++){var b=p[a],e=App.pluginRegistry[b];
-null!=e&&(b=e);0<b.length&&0>mxUtils.indexOf(g,b)&&g.push(b)}d()}},mxResources.get("enterValue")+" ("+mxResources.get("url")+")");a.showDialog(b.container,300,80,!0,!0);b.init()});f.className="geBtn";var k=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});k.className="geBtn";var l=mxUtils.button(mxResources.get("apply"),function(){mxSettings.setPlugins(g);mxSettings.save();a.hideDialog();a.alert(mxResources.get("restartForChangeRequired"))});l.className="geBtn gePrimaryBtn";var n=
-document.createElement("div");n.style.marginTop="14px";n.style.textAlign="right";var u=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/support/solutions/articles/16000056430")});u.className="geBtn";a.isOffline()&&!mxClient.IS_CHROMEAPP&&(u.style.display="none");n.appendChild(u);a.editor.cancelFirst?(n.appendChild(k),n.appendChild(f),n.appendChild(l)):(n.appendChild(f),n.appendChild(l),n.appendChild(k));c.appendChild(n);this.container=c},CropImageDialog=function(a,
-d,c){function b(a){null!=k&&k.destroy();k=a?new Croppie(f,{viewport:{width:150,height:150,type:"circle"},enableExif:!0,showZoomer:!1,enableResize:!1,enableOrientation:!0}):new Croppie(f,{viewport:{width:150,height:150,type:"square"},enableExif:!0,showZoomer:!1,enableResize:!0,enableOrientation:!0});k.bind({url:d})}var g=document.createElement("div"),f=document.createElement("div");f.style.width="300px";f.style.height="300px";g.appendChild(f);var k=null;this.init=function(){b()};var l=document.createElement("input");
-l.setAttribute("type","checkbox");l.setAttribute("id","croppieCircle");l.style.margin="5px";g.appendChild(l);var n=document.createElement("label");n.setAttribute("for","croppieCircle");mxUtils.write(n,mxResources.get("circle"));g.appendChild(n);var u,e,m,p,n=document.createElement("div");u=document.createElement("button");e=document.createElement("button");n.appendChild(u);n.appendChild(e);m=document.createElement("i");p=document.createElement("i");u.appendChild(m);e.appendChild(p);n.className="cr-rotate-controls";
-n.style["float"]="right";n.style.position="inherit";u.className="cr-rotate-l";e.className="cr-rotate-r";g.appendChild(n);u.addEventListener("click",function(){k.rotate(-90)});e.addEventListener("click",function(){k.rotate(90)});mxEvent.addListener(l,"change",function(){b(this.checked)});l=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});l.className="geBtn";n=mxUtils.button(mxResources.get("apply"),function(){k.result({type:"base64",size:"original"}).then(function(b){c(b);a.hideDialog()})});
-n.className="geBtn gePrimaryBtn";u=document.createElement("div");u.style.marginTop="20px";u.style.textAlign="right";a.editor.cancelFirst?(u.appendChild(l),u.appendChild(n)):(u.appendChild(n),u.appendChild(l));g.appendChild(u);this.container=g},EditGeometryDialog=function(a,d){var c=a.editor.graph,b=1==d.length?c.getCellGeometry(d[0]):null,g=document.createElement("div"),f=document.createElement("table"),k=document.createElement("tbody"),l=document.createElement("tr"),n=document.createElement("td"),
-u=document.createElement("td");f.style.paddingLeft="6px";mxUtils.write(n,mxResources.get("relative")+":");var e=document.createElement("input");e.setAttribute("type","checkbox");null!=b&&b.relative&&(e.setAttribute("checked","checked"),e.defaultChecked=!0);this.init=function(){e.focus()};u.appendChild(e);l.appendChild(n);l.appendChild(u);k.appendChild(l);l=document.createElement("tr");n=document.createElement("td");u=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!=b?b.x:"";u.appendChild(m);l.appendChild(n);l.appendChild(u);k.appendChild(l);l=document.createElement("tr");n=document.createElement("td");u=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!=b?b.y:"";u.appendChild(p);l.appendChild(n);l.appendChild(u);k.appendChild(l);l=document.createElement("tr");
-n=document.createElement("td");u=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!=b&&null!=b.offset?b.offset.x:"";u.appendChild(q);l.appendChild(n);l.appendChild(u);k.appendChild(l);l=document.createElement("tr");n=document.createElement("td");u=document.createElement("td");mxUtils.write(n,mxResources.get("dy")+":");var t=document.createElement("input");t.setAttribute("type",
-"text");t.style.width="100px";t.value=null!=b&&null!=b.offset?b.offset.y:"";u.appendChild(t);l.appendChild(n);l.appendChild(u);k.appendChild(l);l=document.createElement("tr");n=document.createElement("td");u=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!=b?b.width:"";u.appendChild(v);l.appendChild(n);l.appendChild(u);k.appendChild(l);l=document.createElement("tr");n=
-document.createElement("td");u=document.createElement("td");mxUtils.write(n,mxResources.get("height")+":");var z=document.createElement("input");z.setAttribute("type","text");z.style.width="100px";z.value=null!=b?b.height:"";u.appendChild(z);l.appendChild(n);l.appendChild(u);k.appendChild(l);l=document.createElement("tr");n=document.createElement("td");u=document.createElement("td");mxUtils.write(n,mxResources.get("rotation")+":");var y=document.createElement("input");y.setAttribute("type","text");
-y.style.width="100px";y.value=1==d.length?mxUtils.getValue(c.getCellStyle(d[0]),mxConstants.STYLE_ROTATION,0):"";u.appendChild(y);l.appendChild(n);l.appendChild(u);k.appendChild(l);f.appendChild(k);g.appendChild(f);b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});b.className="geBtn";var C=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();c.getModel().beginUpdate();try{for(var b=0;b<d.length;b++){var f=c.getCellGeometry(d[b]);null!=f&&(f=f.clone(),c.isCellMovable(d[b])&&
-(f.relative=e.checked,0<mxUtils.trim(m.value).length&&(f.x=Number(m.value)),0<mxUtils.trim(p.value).length&&(f.y=Number(p.value)),0<mxUtils.trim(q.value).length&&(null==f.offset&&(f.offset=new mxPoint),f.offset.x=Number(q.value)),0<mxUtils.trim(t.value).length&&(null==f.offset&&(f.offset=new mxPoint),f.offset.y=Number(t.value))),c.isCellResizable(d[b])&&(0<mxUtils.trim(v.value).length&&(f.width=Number(v.value)),0<mxUtils.trim(z.value).length&&(f.height=Number(z.value))),c.getModel().setGeometry(d[b],
-f));0<mxUtils.trim(y.value).length&&c.setCellStyles(mxConstants.STYLE_ROTATION,Number(y.value),[d[b]])}}finally{c.getModel().endUpdate()}});C.className="geBtn gePrimaryBtn";mxEvent.addListener(g,"keypress",function(a){13==a.keyCode&&C.click()});f=document.createElement("div");f.style.marginTop="20px";f.style.textAlign="right";a.editor.cancelFirst?(f.appendChild(b),f.appendChild(C)):(f.appendChild(C),f.appendChild(b));g.appendChild(f);this.container=g},LibraryDialog=function(a,d,c,b,g,f){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 e=q.firstChild,b=0;null!=e&&e!=a;)e=e.nextSibling,b++;return b}function l(b,c,d,m,f,p,g,n,y){try{if(a.spinner.stop(),null==c||"image/"==c.substring(0,6))if(null==b&&null!=g||null==v[b]){var B=function(){I.innerHTML="";I.style.cursor="pointer";I.style.whiteSpace="nowrap";I.style.textOverflow="ellipsis";mxUtils.write(I,null!=K.title&&0<K.title.length?K.title:mxResources.get("untitled"));
-I.style.color=null==K.title||0==K.title.length?"#d0d0d0":""};q.style.backgroundImage="";t.style.display="none";var H=f,D=p;if(f>a.maxImageSize||p>a.maxImageSize){var F=Math.min(1,Math.min(a.maxImageSize/Math.max(1,f)),a.maxImageSize/Math.max(1,p));f*=F;p*=F}H>D?(D=Math.round(100*D/H),H=100):(H=Math.round(100*H/D),D=100);var E=document.createElement("div");E.setAttribute("draggable","true");E.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";E.style.position="relative";E.style.cursor="move";
-mxUtils.setPrefixedStyle(E.style,"transition","transform .1s ease-in-out");if(null!=b){var J=document.createElement("img");J.setAttribute("src",x.convert(b));J.style.width=H+"px";J.style.height=D+"px";J.style.margin="10px";J.style.paddingBottom=Math.floor((100-D)/2)+"px";J.style.paddingLeft=Math.floor((100-H)/2)+"px";E.appendChild(J)}else if(null!=g){var u=a.stringToCells(Graph.decompress(g.xml));0<u.length&&(a.sidebar.createThumb(u,100,100,E,null,!0,!1),E.firstChild.style.display=mxClient.IS_QUIRKS?
-"inline":"inline-block",E.firstChild.style.cursor="")}var G=document.createElement("img");G.setAttribute("src",Editor.closeImage);G.setAttribute("border","0");G.setAttribute("title",mxResources.get("delete"));G.setAttribute("align","top");G.style.paddingTop="4px";G.style.position="absolute";G.style.marginLeft="-12px";G.style.zIndex="1";G.style.cursor="pointer";mxEvent.addListener(G,"dragstart",function(a){mxEvent.consume(a)});(function(a,b,c){mxEvent.addListener(G,"click",function(d){v[b]=null;for(var m=
-0;m<e.length;m++)if(null!=e[m].data&&e[m].data==b||null!=e[m].xml&&null!=c&&e[m].xml==c.xml){e.splice(m,1);break}E.parentNode.removeChild(a);0==e.length&&(q.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",t.style.display="");mxEvent.consume(d)});mxEvent.addListener(G,"dblclick",function(a){mxEvent.consume(a)})})(E,b,g);E.appendChild(G);E.style.marginBottom="30px";var I=document.createElement("div");I.style.position="absolute";I.style.boxSizing="border-box";I.style.bottom="-18px";I.style.left=
-"10px";I.style.right="10px";I.style.backgroundColor="#ffffff";I.style.overflow="hidden";I.style.textAlign="center";var K=null;null!=b?(K={data:b,w:f,h:p,title:y},null!=n&&(K.aspect=n),v[b]=J,e.push(K)):null!=g&&(g.aspect="fixed",e.push(g),K=g);mxEvent.addListener(I,"keydown",function(a){13==a.keyCode&&null!=C&&(C(),C=null,mxEvent.consume(a))});B();E.appendChild(I);mxEvent.addListener(I,"mousedown",function(a){"true"!=I.getAttribute("contentEditable")&&mxEvent.consume(a)});u=function(b){if(mxClient.IS_IOS||
-mxClient.IS_QUIRKS||mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var e=new FilenameDialog(a,K.title||"",mxResources.get("ok"),function(a){null!=a&&(K.title=a,B())},mxResources.get("enterValue"));a.showDialog(e.container,300,80,!0,!0);e.init();mxEvent.consume(b)}else if("true"!=I.getAttribute("contentEditable")){null!=C&&(C(),C=null);if(null==K.title||0==K.title.length)I.innerHTML="";I.style.textOverflow="";I.style.whiteSpace="";I.style.cursor="text";I.style.color="";I.setAttribute("contentEditable",
-"true");mxUtils.setPrefixedStyle(I.style,"user-select","text");I.focus();document.execCommand("selectAll",!1,null);C=function(){I.removeAttribute("contentEditable");I.style.cursor="pointer";K.title=I.innerHTML;B()};mxEvent.consume(b)}};mxEvent.addListener(I,"click",u);mxEvent.addListener(E,"dblclick",u);q.appendChild(E);mxEvent.addListener(E,"dragstart",function(a){null==b&&null!=g&&(G.style.visibility="hidden",I.style.visibility="hidden");mxClient.IS_FF&&null!=g.xml&&a.dataTransfer.setData("Text",
-g.xml);z=k(a);mxClient.IS_GC&&(E.style.opacity="0.9");window.setTimeout(function(){mxUtils.setPrefixedStyle(E.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(E,30);G.style.visibility="";I.style.visibility=""},0)});mxEvent.addListener(E,"dragend",function(a){"hidden"==G.style.visibility&&(G.style.visibility="",I.style.visibility="");z=null;mxUtils.setOpacity(E,100);mxUtils.setPrefixedStyle(E.style,"transform",null)})}else A||(A=!0,a.handleError({message:mxResources.get("fileExists")}));else{f=
-!1;try{if(H=mxUtils.parseXml(b),"mxlibrary"==H.documentElement.nodeName){D=JSON.parse(mxUtils.getTextContent(H.documentElement));if(null!=D&&0<D.length)for(var O=0;O<D.length;O++)null!=D[O].xml?l(null,null,0,0,0,0,D[O]):l(D[O].data,null,0,0,D[O].w,D[O].h,null,"fixed",D[O].title);f=!0}else if("mxfile"==H.documentElement.nodeName){for(var Q=H.documentElement.getElementsByTagName("diagram"),O=0;O<Q.length;O++){var D=mxUtils.getTextContent(Q[O]),u=a.stringToCells(Graph.decompress(D)),Z=a.editor.graph.getBoundingBoxFromGeometry(u);
-l(null,null,0,0,0,0,{xml:D,w:Z.width,h:Z.height})}f=!0}}catch(da){}f||(a.spinner.stop(),a.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(da){}return null}function n(a){a.dataTransfer.dropEffect=null!=z?"move":"copy";a.stopPropagation();a.preventDefault()}function u(b){b.stopPropagation();b.preventDefault();A=!1;y=k(b);if(null!=z)null!=y&&y<q.children.length?(e.splice(y>z?y-1:y,0,e.splice(z,1)[0]),q.insertBefore(q.children[z],q.children[y])):(e.push(e.splice(z,1)[0]),q.appendChild(q.children[z]));
-else if(0<b.dataTransfer.files.length)a.importFiles(b.dataTransfer.files,0,0,a.maxImageSize,E(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 e=[];c=document.createElement("div");
+"376px";k.style.overflow="hidden";mxEvent.disableContextMenu(k);b.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,t=null,e=0,m=l.getGlobalVariable;l.getGlobalVariable=function(a){return"page"==a&&null!=t&&null!=t[e]?t[e].getAttribute("name"):"pagenumber"==a?e+1:"pagecount"==a?null!=t?t.length:1:m.apply(this,arguments)};l.getLinkForCell=
+function(){return null};Editor.MathJaxRender&&l.addListener(mxEvent.SIZE,mxUtils.bind(this,function(b,e){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%"}),v=a.getCurrentFile(),q=null,u=null,y=null,x=null,B=mxUtils.button("",function(){null!=y&&l.zoomIn()});B.className="geSprite geSprite-zoomin";
+B.setAttribute("title",mxResources.get("zoomIn"));B.style.outline="none";B.style.border="none";B.style.margin="2px";B.setAttribute("disabled","disabled");mxUtils.setOpacity(B,20);var A=mxUtils.button("",function(){null!=y&&l.zoomOut()});A.className="geSprite geSprite-zoomout";A.setAttribute("title",mxResources.get("zoomOut"));A.style.outline="none";A.style.border="none";A.style.margin="2px";A.setAttribute("disabled","disabled");mxUtils.setOpacity(A,20);var z=mxUtils.button("",function(){null!=y&&
+(l.maxFitScale=8,l.fit(8),l.center())});z.className="geSprite geSprite-fit";z.setAttribute("title",mxResources.get("fit"));z.style.outline="none";z.style.border="none";z.style.margin="2px";z.setAttribute("disabled","disabled");mxUtils.setOpacity(z,20);var F=mxUtils.button("",function(){null!=y&&(l.zoomActual(),l.center())});F.className="geSprite geSprite-actualsize";F.setAttribute("title",mxResources.get("actualSize"));F.style.outline="none";F.style.border="none";F.style.margin="2px";F.setAttribute("disabled",
+"disabled");mxUtils.setOpacity(F,20);var D=document.createElement("div");D.style.position="absolute";D.style.textAlign="right";D.style.color="gray";D.style.marginTop="10px";D.style.backgroundColor="transparent";D.style.top="440px";D.style.right="32px";D.style.maxWidth="380px";D.style.cursor="default";var C=mxUtils.button(mxResources.get("download"),function(){if(null!=y){var b=mxUtils.getXml(y.documentElement),e=a.getBaseFilename()+".drawio";a.isLocalFileSave()?a.saveLocalFile(b,e,"text/xml"):(b=
+"undefined"===typeof pako?"&xml="+encodeURIComponent(b):"&data="+encodeURIComponent(Graph.compress(b)),(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(e)+"&format=xml"+b)).simulate(document,"_blank"))}});C.className="geBtn";C.setAttribute("disabled","disabled");var G=mxUtils.button(mxResources.get("restore"),function(){null!=y&&null!=x&&a.confirm(mxResources.get("areYouSure"),function(){null!=c?c(x):a.spinner.spin(document.body,mxResources.get("restoring"))&&v.save(!0,function(b){a.spinner.stop();
+a.replaceFileData(x);a.hideDialog()},function(b){a.spinner.stop();a.editor.setStatus("");a.handleError(b,null!=b?mxResources.get("errorSavingFile"):null)})})});G.className="geBtn";G.setAttribute("disabled","disabled");var H=document.createElement("select");H.setAttribute("disabled","disabled");H.style.maxWidth="80px";H.style.position="relative";H.style.top="-2px";H.style.verticalAlign="bottom";H.style.marginRight="6px";H.style.display="none";var J=null;mxEvent.addListener(H,"change",function(a){null!=
+J&&(J(a),mxEvent.consume(a))});var I=mxUtils.button(mxResources.get("edit"),function(){null!=y&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(y.documentElement)),a.openLink(a.getUrl(),null,!0))});I.className="geBtn";I.setAttribute("disabled","disabled");null!=c&&(I.style.display="none");var E=mxUtils.button(mxResources.get("show"),function(){null!=u&&a.openLink(u.getUrl(H.selectedIndex))});E.className="geBtn gePrimaryBtn";E.setAttribute("disabled",
+"disabled");null!=c&&(E.style.display="none",G.className="geBtn gePrimaryBtn");g=document.createElement("div");g.style.position="absolute";g.style.top="482px";g.style.width="640px";g.style.textAlign="right";var K=document.createElement("div");K.className="geToolbarContainer";K.style.backgroundColor="transparent";K.style.padding="2px";K.style.border="none";K.style.left="199px";K.style.top="442px";var O=null;if(null!=d&&0<d.length){k.style.cursor="move";var Q=document.createElement("table");Q.style.border=
+"1px solid lightGray";Q.style.borderCollapse="collapse";Q.style.borderSpacing="0px";Q.style.width="100%";var Y=document.createElement("tbody"),U=(new Date).toDateString();null!=a.currentPage&&null!=a.pages&&(n=mxUtils.indexOf(a.pages,a.currentPage));for(var L=d.length-1;0<=L;L--){var V=function(b){var c=new Date(b.modifiedDate),m=null;if(0<=c.getTime()){var f=function(d){p.stop();var f=mxUtils.parseXml(d),g=a.editor.extractGraphModel(f.documentElement,!0);if(null!=g){var u=function(a){null!=a&&(a=
+q(mxUtils.parseXml(Graph.decompress(mxUtils.getTextContent(a))).documentElement));return a},q=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};H.style.display="none";H.innerHTML="";y=f;x=d;t=parseSelectFunction=null;e=0;if("mxfile"==g.nodeName){f=g.getElementsByTagName("diagram");t=[];for(d=0;d<f.length;d++)t.push(f[d]);e=Math.min(n,
+t.length-1);0<t.length&&u(t[e]);if(1<t.length)for(H.removeAttribute("disabled"),H.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==e&&f.setAttribute("selected","selected"),H.appendChild(f);J=function(){try{var b=parseInt(H.value);e=n=b;u(t[b])}catch(M){H.value=n,a.handleError(M)}}}else q(g);d=b.lastModifyingUserName;null!=d&&20<d.length&&(d=d.substring(0,20)+"...");
+D.innerHTML="";mxUtils.write(D,(null!=d?d+" ":"")+c.toLocaleDateString()+" "+c.toLocaleTimeString());D.setAttribute("title",m.getAttribute("title"));B.removeAttribute("disabled");A.removeAttribute("disabled");z.removeAttribute("disabled");F.removeAttribute("disabled");null!=v&&v.isRestricted()||(a.editor.graph.isEnabled()&&G.removeAttribute("disabled"),C.removeAttribute("disabled"),E.removeAttribute("disabled"),I.removeAttribute("disabled"));mxUtils.setOpacity(B,60);mxUtils.setOpacity(A,60);mxUtils.setOpacity(z,
+60);mxUtils.setOpacity(F,60)}else H.style.display="none",H.innerHTML="",D.innerHTML="",mxUtils.write(D,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==d[d.length-1]?mxUtils.write(g,mxResources.get("current")):c.toDateString()===U?mxUtils.write(g,c.toLocaleTimeString()):mxUtils.write(g,c.toLocaleDateString()+
+" "+c.toLocaleTimeString());m.appendChild(g);m.setAttribute("title",c.toLocaleDateString()+" "+c.toLocaleTimeString()+(null!=b.fileSize?" "+a.formatFileSize(parseInt(b.fileSize)):"")+(null!=b.lastModifyingUserName?" "+b.lastModifyingUserName:""));mxEvent.addListener(m,"click",function(a){u!=b&&(p.stop(),null!=q&&(q.style.backgroundColor=""),u=b,q=m,q.style.backgroundColor="#ebf2f9",x=y=null,D.removeAttribute("title"),D.innerHTML=mxUtils.htmlEntities(mxResources.get("loading")+"..."),k.style.backgroundColor=
+"#ffffff",l.getModel().clear(),G.setAttribute("disabled","disabled"),C.setAttribute("disabled","disabled"),B.setAttribute("disabled","disabled"),A.setAttribute("disabled","disabled"),F.setAttribute("disabled","disabled"),z.setAttribute("disabled","disabled"),I.setAttribute("disabled","disabled"),E.setAttribute("disabled","disabled"),H.setAttribute("disabled","disabled"),mxUtils.setOpacity(B,20),mxUtils.setOpacity(A,20),mxUtils.setOpacity(z,20),mxUtils.setOpacity(F,20),p.spin(k),b.getXml(function(a){if(u==
+b)try{f(a)}catch(ca){D.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+": "+ca.message)}},function(a){p.stop();H.style.display="none";H.innerHTML="";D.innerHTML="";mxUtils.write(D,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);Y.appendChild(m)}return m}(d[L]);null!=V&&L==d.length-1&&(O=V)}Q.appendChild(Y);
+f.appendChild(Q)}else null==v||null==a.drive&&v.constructor==window.DriveFile||null==a.dropbox&&v.constructor==window.DropboxFile?(k.style.display="none",K.style.display="none",mxUtils.write(f,mxResources.get("notAvailable"))):(k.style.display="none",K.style.display="none",mxUtils.write(f,mxResources.get("noRevisions")));this.init=function(){null!=O&&O.click()};f=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});f.className="geBtn";K.appendChild(H);K.appendChild(B);K.appendChild(A);
+K.appendChild(F);K.appendChild(z);a.editor.cancelFirst?(g.appendChild(f),g.appendChild(C),g.appendChild(I),g.appendChild(G),g.appendChild(E)):(g.appendChild(C),g.appendChild(I),g.appendChild(G),g.appendChild(E),g.appendChild(f));b.appendChild(g);b.appendChild(K);b.appendChild(D);this.container=b},DraftDialog=function(a,d,c,b,g,f,k,l,n){var t=document.createElement("div"),e=document.createElement("div");e.style.marginTop="0px";e.style.whiteSpace="nowrap";e.style.overflow="auto";e.style.lineHeight=
+"normal";mxUtils.write(e,d);t.appendChild(e);var m=document.createElement("select"),p=mxUtils.bind(this,function(){B=mxUtils.parseXml(n[m.value].data);A=a.editor.extractGraphModel(B.documentElement,!0);z=0;this.init()});if(null!=n){m.style.marginLeft="4px";for(d=0;d<n.length;d++){var v=document.createElement("option");v.setAttribute("value",d);var q=new Date(n[d].created),u=new Date(n[d].modified);mxUtils.write(v,q.toLocaleDateString()+" "+q.toLocaleTimeString()+" - "+(q.toDateString(),u.toDateString(),
+u.toLocaleDateString())+" "+u.toLocaleTimeString());m.appendChild(v)}e.appendChild(m);mxEvent.addListener(m,"change",p)}null==c&&(c=n[0].data);var y=document.createElement("div");y.style.position="absolute";y.style.border="1px solid lightGray";y.style.marginTop="10px";y.style.width="640px";y.style.top="46px";y.style.bottom="74px";y.style.overflow="hidden";mxEvent.disableContextMenu(y);t.appendChild(y);var x=new Graph(y);x.setEnabled(!1);x.setPanning(!0);x.panningHandler.ignoreCell=!0;x.panningHandler.useLeftButtonForPanning=
+!0;x.minFitScale=null;x.maxFitScale=null;x.centerZoom=!0;var B=mxUtils.parseXml(c),A=a.editor.extractGraphModel(B.documentElement,!0),z=0,F=null,D=x.getGlobalVariable;x.getGlobalVariable=function(a){return"page"==a&&null!=F&&null!=F[z]?F[z].getAttribute("name"):"pagenumber"==a?z+1:"pagecount"==a?null!=F?F.length:1:D.apply(this,arguments)};x.getLinkForCell=function(){return null};c=mxUtils.button("",function(){x.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);e=mxUtils.button("",function(){x.zoomOut()});e.className="geSprite geSprite-zoomout";e.setAttribute("title",mxResources.get("zoomOut"));e.style.outline="none";e.style.border="none";e.style.margin="2px";mxUtils.setOpacity(e,60);d=mxUtils.button("",function(){x.maxFitScale=8;x.fit(8);x.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);v=mxUtils.button("",function(){x.zoomActual();x.center()});v.className="geSprite geSprite-actualsize";v.setAttribute("title",mxResources.get("actualSize"));v.style.outline="none";v.style.border="none";v.style.margin="2px";mxUtils.setOpacity(v,60);k=mxUtils.button(k||mxResources.get("discard"),function(){g.apply(this,[m.value,mxUtils.bind(this,function(){null!=m.parentNode&&(m.options[m.selectedIndex].parentNode.removeChild(m.options[m.selectedIndex]),
+0<m.options.length?(m.value=m.options[0].value,p()):a.hideDialog(!0))})])});k.className="geBtn";var C=document.createElement("select");C.style.maxWidth="80px";C.style.position="relative";C.style.top="-2px";C.style.verticalAlign="bottom";C.style.marginRight="6px";C.style.display="none";f=mxUtils.button(f||mxResources.get("edit"),function(){b.apply(this,[m.value])});f.className="geBtn gePrimaryBtn";q=document.createElement("div");q.style.position="absolute";q.style.bottom="30px";q.style.width="640px";
+q.style.textAlign="right";u=document.createElement("div");u.className="geToolbarContainer";u.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";this.init=function(){function a(a){if(null!=a){var b=a.getAttribute("background");if(null==b||""==b||b==mxConstants.NONE)b="dark"==uiTheme?"transparent":"#ffffff";y.style.backgroundColor=b;(new mxCodec(a.ownerDocument)).decode(a,x.getModel());x.maxFitScale=1;x.fit(8);x.center()}}function b(b){null!=
+b&&(b=a(mxUtils.parseXml(Graph.decompress(mxUtils.getTextContent(b))).documentElement));return b}mxEvent.addListener(C,"change",function(a){z=parseInt(C.value);b(F[z]);mxEvent.consume(a)});if("mxfile"==A.nodeName){var e=A.getElementsByTagName("diagram");F=[];for(var c=0;c<e.length;c++)F.push(e[c]);0<F.length&&b(F[z]);C.innerHTML="";if(1<F.length)for(C.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==z&&e.setAttribute("selected","selected"),C.appendChild(e);else C.style.display="none"}else a(A)};u.appendChild(C);u.appendChild(c);u.appendChild(e);u.appendChild(v);u.appendChild(d);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?(q.appendChild(c),null!=l&&q.appendChild(l),q.appendChild(k),q.appendChild(f)):
+(q.appendChild(f),q.appendChild(k),null!=l&&q.appendChild(l),q.appendChild(c));t.appendChild(q);t.appendChild(u);this.container=t},FindWindow=function(a,d,c,b,g){function f(a,b,e){if("object"===typeof b.value&&null!=b.value.attributes){b=b.value.attributes;for(var c=0;c<b.length;c++)if("label"!=b[c].nodeName){var d=mxUtils.trim(b[c].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==a&&d.substring(0,e.length)===e||null!=a&&a.test(d))return!0}}return!1}function k(b){var c=n.model.getDescendants(n.model.getRoot()),
+d=v.value.toLowerCase(),p=q.checked?new RegExp(d):null,g=null;t!=d&&(t=d,e=null,m=!1);var u=null==e;if(0<d.length){if(m){m=!1;for(var A,l=0;l<a.pages.length;l++)if(a.currentPage==a.pages[l]){A=l;break}b=(A+1)%a.pages.length;e=null;do m=!1,c=a.pages[b],n=a.createTemporaryGraph(n.getStylesheet()),a.updatePageRoot(c),n.model.setRoot(c.root),b=(b+1)%a.pages.length;while(!k(!0)&&b!=A);e&&(e=null,a.selectPage(c));m=!1;n=a.editor.graph;return k(!0)}for(l=0;l<c.length;l++){A=n.view.getState(c[l]);if(null!=
+A&&null!=A.cell.value&&(u||null==g)&&(n.model.isVertex(A.cell)||n.model.isEdge(A.cell))&&(n.isHtmlLabel(A.cell)?(x.innerHTML=n.getLabel(A.cell),label=mxUtils.extractTextWithWhitespace([x])):label=n.getLabel(A.cell),label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase(),null==p&&(label.substring(0,d.length)===d||f(p,A.cell,d))||null!=p&&(p.test(label)||f(p,A.cell,d))))if(u){g=A;break}else null==g&&(g=A);u=u||A==e}}if(null!=g){if(l==c.length&&y.checked)return e=null,m=!0,k(!0);
+e=g;n.scrollCellToVisible(e.cell);n.isEnabled()?n.setSelectionCell(e.cell):n.highlightCell(e.cell)}else{if(!b&&y.checked)return m=!0,k(!0);n.isEnabled()&&n.clearSelection()}return 0==d.length||null!=g}var l=a.actions.get("find"),n=a.editor.graph,t=null,e=null,m=!1,p=document.createElement("div");p.style.userSelect="none";p.style.overflow="hidden";p.style.padding="10px";p.style.height="100%";var v=document.createElement("input");v.setAttribute("placeholder",mxResources.get("find"));v.setAttribute("type",
+"text");v.style.marginTop="4px";v.style.marginBottom="6px";v.style.width="200px";v.style.fontSize="12px";v.style.borderRadius="4px";v.style.padding="6px";p.appendChild(v);mxUtils.br(p);var q=document.createElement("input");q.setAttribute("id","geFindWinRegExChck");q.setAttribute("type","checkbox");q.style.marginRight="4px";p.appendChild(q);var u=document.createElement("label");u.setAttribute("for","geFindWinRegExChck");p.appendChild(u);mxUtils.write(u,mxResources.get("regularExpression"));p.appendChild(u);
+u=a.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000088250");u.style.position="relative";u.style.marginLeft="6px";u.style.top="-1px";p.appendChild(u);mxUtils.br(p);var y=document.createElement("input");y.setAttribute("id","geFindWinAllPagesChck");y.setAttribute("type","checkbox");y.style.marginRight="4px";p.appendChild(y);u=document.createElement("label");u.setAttribute("for","geFindWinAllPagesChck");p.appendChild(u);mxUtils.write(u,mxResources.get("allPages"));p.appendChild(u);
+var x=document.createElement("div");mxUtils.br(p);u=mxUtils.button(mxResources.get("reset"),function(){v.value="";v.style.backgroundColor="";t=e=null;m=!1;v.focus()});u.setAttribute("title",mxResources.get("reset"));u.style.marginTop="6px";u.style.marginRight="4px";u.style.marginLeft=(b-20-156)/2+"px";u.className="geBtn";p.appendChild(u);u=mxUtils.button(mxResources.get("find"),function(){try{v.style.backgroundColor=k()?"":"#ffcfcf"}catch(A){a.handleError(A)}});u.setAttribute("title",mxResources.get("find")+
+" (Enter)");u.style.marginTop="6px";u.className="geBtn gePrimaryBtn";p.appendChild(u);mxEvent.addListener(v,"keyup",function(a){if(91==a.keyCode||17==a.keyCode)mxEvent.consume(a);else if(27==a.keyCode)l.funct();else if(t!=v.value.toLowerCase()||13==a.keyCode)try{v.style.backgroundColor=k()?"":"#ffcfcf"}catch(z){v.style.backgroundColor="#ffcfcf"}});mxEvent.addListener(p,"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"),p,d,c,b,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.fit();this.window.isVisible()?(v.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?v.select():document.execCommand("selectAll",!1,null),null!=a.pages&&1<a.pages.length?y.removeAttribute("disabled"):(y.checked=!1,y.setAttribute("disabled",
+"disabled"))):n.container.focus()}));this.window.setLocation=function(a,b){var e=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;a=Math.max(0,Math.min(a,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,e-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};var B=mxUtils.bind(this,function(){var a=this.window.getX(),
+b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window,"resize",B);this.destroy=function(){mxEvent.removeListener(window,"resize",B);this.window.destroy()}},FreehandWindow=function(a,d,c,b,g){var f=a.editor.graph;a=document.createElement("div");a.style.userSelect="none";a.style.overflow="hidden";a.style.height="100%";var k=mxUtils.button(mxResources.get("startDrawing"),function(){f.freehand.isDrawing()&&f.freehand.stopDrawing();f.freehand.startDrawing()});k.setAttribute("title",
+mxResources.get("startDrawing"));k.style.marginTop="8px";k.style.marginRight="4px";k.style.width="160px";k.style.overflow="hidden";k.style.textOverflow="ellipsis";k.style.textAlign="center";k.className="geBtn gePrimaryBtn";a.appendChild(k);var l=k.cloneNode(!1);mxUtils.write(l,mxResources.get("stopDrawing"));l.setAttribute("title",mxResources.get("stopDrawing"));l.style.marginTop="4px";mxEvent.addListener(l,"click",function(){f.freehand.stopDrawing()});a.appendChild(l);this.window=new mxWindow(mxResources.get("freehand"),
+a,d,c,b,g,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);f.addListener("freehandStateChanged",mxUtils.bind(this,function(){l.className="geBtn"+(f.freehand.isDrawing()?" gePrimaryBtn":"")}));this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit()}));this.window.addListener("hide",mxUtils.bind(this,function(){f.freehand.isDrawing()&&f.freehand.stopDrawing()}));this.window.setLocation=function(a,b){var e=
+window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;a=Math.max(0,Math.min(a,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,e-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};var n=mxUtils.bind(this,function(){var a=this.window.getX(),b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window,"resize",
+n);this.destroy=function(){mxEvent.removeListener(window,"resize",n);this.window.destroy()}},TagsWindow=function(a,d,c,b,g){var f=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 t=a.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000046966");t.firstChild.style.marginBottom="6px";t.style.marginLeft="6px";l.appendChild(t)}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);t=mxUtils.button(mxResources.get("hide"),function(){var a=f.getCellsForTags(n.value.split(" "),void 0,k,!0);f.setCellsVisible(a,!1)});t.setAttribute("title",mxResources.get("hide"));t.style.marginTop="8px";t.style.marginRight="4px";t.className="geBtn";l.appendChild(t);t=mxUtils.button(mxResources.get("show"),function(){var a=f.getCellsForTags(n.value.split(" "),void 0,k,!0);f.setCellsVisible(a,!0);if(f.isEnabled()){for(var b=
+[],e=0;e<a.length;e++)(f.model.isVertex(a[e])||f.model.isEdge(a[e]))&&b.push(a[e]);f.setSelectionCells(b)}else for(e=0;e<a.length;e++)f.highlightCell(a[e])});t.setAttribute("title",mxResources.get("show"));t.style.marginTop="8px";t.style.marginRight="4px";t.className="geBtn";l.appendChild(t);var e=a.actions.get("tags"),t=mxUtils.button(mxResources.get("close"),function(){e.funct()});t.setAttribute("title",mxResources.get("close")+" (Enter/Esc)");t.style.marginTop="8px";t.className="geBtn gePrimaryBtn";
+l.appendChild(t);mxEvent.addListener(n,"keyup",function(a){13!=a.keyCode&&27!=a.keyCode||e.funct()});this.window=new mxWindow(mxResources.get("tags"),l,d,c,b,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.fit();this.window.isVisible()?(n.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?n.select():document.execCommand("selectAll",
+!1,null)):f.container.focus()}));this.window.setLocation=function(a,b){var e=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;a=Math.max(0,Math.min(a,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,e-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};var m=mxUtils.bind(this,function(){var a=this.window.getX(),b=this.window.getY();
+this.window.setLocation(a,b)});mxEvent.addListener(window,"resize",m);this.destroy=function(){mxEvent.removeListener(window,"resize",m);this.window.destroy()}},AuthDialog=function(a,d,c,b){var g=document.createElement("div");g.style.textAlign="center";var f=document.createElement("p");f.style.fontSize="16pt";f.style.padding="0px";f.style.margin="0px";f.style.color="gray";mxUtils.write(f,mxResources.get("authorizationRequired"));var k="Unknown",l=document.createElement("img");l.setAttribute("border",
+"0");l.setAttribute("align","absmiddle");l.style.marginRight="10px";d==a.drive?(k=mxResources.get("googleDrive"),l.src=IMAGE_PATH+"/google-drive-logo-white.svg"):d==a.dropbox?(k=mxResources.get("dropbox"),l.src=IMAGE_PATH+"/dropbox-logo-white.svg"):d==a.oneDrive?(k=mxResources.get("oneDrive"),l.src=IMAGE_PATH+"/onedrive-logo-white.svg"):d==a.gitHub?(k=mxResources.get("github"),l.src=IMAGE_PATH+"/github-logo-white.svg"):d==a.gitLab?(k=mxResources.get("gitlab"),l.src=IMAGE_PATH+"/gitlab-logo.svg",l.style.width=
+"32px"):d==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(){b(n.checked)});k.insertBefore(l,k.firstChild);k.style.marginTop="6px";k.className="geBigButton";k.style.fontSize="18px";k.style.padding="14px";g.appendChild(f);g.appendChild(a);g.appendChild(k);
+c&&(c=document.createElement("p"),c.style.marginTop="20px",c.appendChild(n),f=document.createElement("span"),mxUtils.write(f," "+mxResources.get("rememberMe")),c.appendChild(f),g.appendChild(c),n.checked=!0,n.defaultChecked=!0,mxEvent.addListener(f,"click",function(a){n.checked=!n.checked;mxEvent.consume(a)}));this.container=g},MoreShapesDialog=function(a,d,c){c=null!=c?c:a.sidebar.entries;var b=document.createElement("div"),g=[];if(null!=a.sidebar.customEntries)for(var f=0;f<a.sidebar.customEntries.length;f++){for(var k=
+a.sidebar.customEntries[f],l={title:a.getResource(k.title),entries:[]},n=0;n<k.entries.length;n++){var t=k.entries[n];l.entries.push({id:t.id,title:a.getResource(t.title),desc:a.getResource(t.desc),image:t.preview})}g.push(l)}for(f=0;f<c.length;f++)if(null==a.sidebar.enabledLibraries)g.push(c[f]);else{l={title:c[f].title,entries:[]};for(n=0;n<c[f].entries.length;n++)0<=mxUtils.indexOf(a.sidebar.enabledLibraries,c[f].entries[n].id)&&l.entries.push(c[f].entries[n]);0<l.entries.length&&g.push(l)}c=g;
+if(d){n=mxUtils.bind(this,function(b){for(var c=0;c<b.length;c++)(function(b){var d=q.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);e.appendChild(d);for(var f=0;f<b.entries.length;f++)(function(b){var d=q.cloneNode(!1);d.style.cursor="pointer";d.style.padding="4px 0px 4px 20px";d.style.whiteSpace="nowrap";d.style.overflow="hidden";d.style.textOverflow="ellipsis";d.setAttribute("title",
+b.title+" ("+b.id+")");var g=document.createElement("input");g.setAttribute("type","checkbox");g.checked=a.sidebar.isEntryVisible(b.id);g.defaultChecked=g.checked;d.appendChild(g);mxUtils.write(d," "+b.title);e.appendChild(d);var u=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 e=document.createElement("pre");e.style.boxSizing="border-box";e.style.fontFamily="inherit";e.style.margin=
+"20px";e.style.right="0px";e.style.textAlign="left";mxUtils.write(e,b.desc);m.appendChild(e)}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=d;p.style.backgroundColor="dark"==uiTheme?"#505759":"#ebf2f9";null!=a&&mxEvent.consume(a)}};mxEvent.addListener(d,"click",u);mxEvent.addListener(d,
+"dblclick",function(a){g.checked=!g.checked;mxEvent.consume(a)});v.push(function(){return g.checked?b.id:null});0==c&&0==f&&u()})(b.entries[f])})(b[c])});f=document.createElement("div");f.className="geDialogTitle";mxUtils.write(f,mxResources.get("shapes"));f.style.position="absolute";f.style.top="0px";f.style.left="0px";f.style.lineHeight="40px";f.style.height="40px";f.style.right="0px";mxClient.IS_QUIRKS&&(f.style.width="718px");var e=document.createElement("div"),m=document.createElement("div");
+e.style.position="absolute";e.style.top="40px";e.style.left="0px";e.style.width="202px";e.style.bottom="60px";e.style.overflow="auto";mxClient.IS_QUIRKS&&(e.style.height="437px",e.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(f.style.width)-202+"px",m.style.height=e.style.height,
+m.style.marginTop=e.style.marginTop);var p=null,v=[],q=document.createElement("div");q.style.position="relative";q.style.left="0px";q.style.right="0px";n(c);b.style.padding="30px";b.appendChild(f);b.appendChild(e);b.appendChild(m);c=document.createElement("div");c.className="geDialogFooter";c.style.position="absolute";c.style.paddingRight="16px";c.style.color="gray";c.style.left="0px";c.style.right="0px";c.style.bottom="0px";c.style.height="60px";c.style.lineHeight="52px";mxClient.IS_QUIRKS&&(c.style.width=
+f.style.width,c.style.paddingTop="12px");var u=document.createElement("input");u.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)f=document.createElement("span"),f.style.paddingRight="20px",f.appendChild(u),mxUtils.write(f," "+mxResources.get("rememberThisSetting")),u.checked=!0,u.defaultChecked=!0,mxEvent.addListener(f,"click",function(a){mxEvent.getSource(a)!=u&&(u.checked=!u.checked,mxEvent.consume(a))}),mxClient.IS_QUIRKS&&(f.style.position="relative",f.style.top="-6px"),
+c.appendChild(f);f=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});f.className="geBtn";n=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();for(var b=[],e=0;e<v.length;e++){var c=v[e].apply(this,arguments);null!=c&&b.push(c)}a.sidebar.showEntries(b.join(";"),u.checked,!0)});n.className="geBtn gePrimaryBtn"}else{var y=document.createElement("table"),f=document.createElement("tbody");b.style.height="100%";b.style.overflow="auto";n=document.createElement("tr");y.style.width=
+"100%";d=document.createElement("td");var g=document.createElement("td"),k=document.createElement("td"),x=mxUtils.bind(this,function(b,e,c){var d=document.createElement("input");d.type="checkbox";y.appendChild(d);d.checked=a.sidebar.isEntryVisible(c);var m=document.createElement("span");mxUtils.write(m,e);e=document.createElement("div");e.style.display="block";e.appendChild(d);e.appendChild(m);mxEvent.addListener(m,"click",function(a){d.checked=!d.checked;mxEvent.consume(a)});b.appendChild(e);return function(){return d.checked?
+c:null}});n.appendChild(d);n.appendChild(g);n.appendChild(k);f.appendChild(n);y.appendChild(f);for(var v=[],B=0,f=0;f<c.length;f++)for(n=0;n<c[f].entries.length;n++)B++;for(var A=[d,g,k],z=0,f=0;f<c.length;f++)(function(a){for(var b=0;b<a.entries.length;b++){var e=a.entries[b];v.push(x(A[Math.floor(z/(B/3))],e.title,e.id));z++}})(c[f]);b.appendChild(y);c=document.createElement("div");c.style.marginTop="18px";c.style.textAlign="center";u=document.createElement("input");isLocalStorage&&(u.setAttribute("type",
+"checkbox"),u.checked=!0,u.defaultChecked=!0,c.appendChild(u),f=document.createElement("span"),mxUtils.write(f," "+mxResources.get("rememberThisSetting")),c.appendChild(f),mxEvent.addListener(f,"click",function(a){u.checked=!u.checked;mxEvent.consume(a)}));b.appendChild(c);f=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});f.className="geBtn";n=mxUtils.button(mxResources.get("apply"),function(){for(var b=["search"],e=0;e<v.length;e++){var c=v[e].apply(this,arguments);null!=c&&
+b.push(c)}a.sidebar.showEntries(0<b.length?b.join(";"):"",u.checked);a.hideDialog()});n.className="geBtn gePrimaryBtn";c=document.createElement("div");c.style.marginTop="26px";c.style.textAlign="right"}a.editor.cancelFirst?(c.appendChild(f),c.appendChild(n)):(c.appendChild(n),c.appendChild(f));b.appendChild(c);this.container=b},PluginsDialog=function(a){function d(){if(0==g.length)b.innerHTML=mxUtils.htmlEntities(mxResources.get("noPlugins"));else{b.innerHTML="";for(var e=0;e<g.length;e++){var c=
+document.createElement("span");c.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";c.appendChild(p);mxUtils.write(c,g[e]);b.appendChild(c);mxUtils.br(b);mxEvent.addListener(p,"click",function(b){return function(){a.confirm(mxResources.get("delete")+' "'+g[b]+'"?',function(){g.splice(b,1);d()})}}(e))}}}var c=document.createElement("div"),
+b=document.createElement("div");b.style.height="120px";b.style.overflow="auto";var g=mxSettings.getPlugins().slice();c.appendChild(b);d();var f=mxUtils.button(mxResources.get("add"),function(){var b="",c=urlParams.p;if(null!=c&&0<c.length){for(var p=c.split(";"),c=0;c<p.length;c++){var f=App.pluginRegistry[p[c]];null!=f&&(b+=f+";")}";"==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){p=a.split(";");for(a=0;a<p.length;a++){var b=
+p[a],e=App.pluginRegistry[b];null!=e&&(b=e);0<b.length&&0>mxUtils.indexOf(g,b)&&g.push(b)}d()}},mxResources.get("enterValue")+" ("+mxResources.get("url")+")");a.showDialog(b.container,300,80,!0,!0);b.init()});f.className="geBtn";var k=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});k.className="geBtn";var l=mxUtils.button(mxResources.get("apply"),function(){mxSettings.setPlugins(g);mxSettings.save();a.hideDialog();a.alert(mxResources.get("restartForChangeRequired"))});l.className=
+"geBtn gePrimaryBtn";var n=document.createElement("div");n.style.marginTop="14px";n.style.textAlign="right";var t=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/support/solutions/articles/16000056430")});t.className="geBtn";a.isOffline()&&!mxClient.IS_CHROMEAPP&&(t.style.display="none");n.appendChild(t);a.editor.cancelFirst?(n.appendChild(k),n.appendChild(f),n.appendChild(l)):(n.appendChild(f),n.appendChild(l),n.appendChild(k));c.appendChild(n);this.container=c},
+CropImageDialog=function(a,d,c){function b(a){null!=k&&k.destroy();k=a?new Croppie(f,{viewport:{width:150,height:150,type:"circle"},enableExif:!0,showZoomer:!1,enableResize:!1,enableOrientation:!0}):new Croppie(f,{viewport:{width:150,height:150,type:"square"},enableExif:!0,showZoomer:!1,enableResize:!0,enableOrientation:!0});k.bind({url:d})}var g=document.createElement("div"),f=document.createElement("div");f.style.width="300px";f.style.height="300px";g.appendChild(f);var k=null;this.init=function(){b()};
+var l=document.createElement("input");l.setAttribute("type","checkbox");l.setAttribute("id","croppieCircle");l.style.margin="5px";g.appendChild(l);var n=document.createElement("label");n.setAttribute("for","croppieCircle");mxUtils.write(n,mxResources.get("circle"));g.appendChild(n);var t,e,m,p,n=document.createElement("div");t=document.createElement("button");e=document.createElement("button");n.appendChild(t);n.appendChild(e);m=document.createElement("i");p=document.createElement("i");t.appendChild(m);
+e.appendChild(p);n.className="cr-rotate-controls";n.style["float"]="right";n.style.position="inherit";t.className="cr-rotate-l";e.className="cr-rotate-r";g.appendChild(n);t.addEventListener("click",function(){k.rotate(-90)});e.addEventListener("click",function(){k.rotate(90)});mxEvent.addListener(l,"change",function(){b(this.checked)});l=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});l.className="geBtn";n=mxUtils.button(mxResources.get("apply"),function(){k.result({type:"base64",
+size:"original"}).then(function(b){c(b);a.hideDialog()})});n.className="geBtn gePrimaryBtn";t=document.createElement("div");t.style.marginTop="20px";t.style.textAlign="right";a.editor.cancelFirst?(t.appendChild(l),t.appendChild(n)):(t.appendChild(n),t.appendChild(l));g.appendChild(t);this.container=g},EditGeometryDialog=function(a,d){var c=a.editor.graph,b=1==d.length?c.getCellGeometry(d[0]):null,g=document.createElement("div"),f=document.createElement("table"),k=document.createElement("tbody"),l=
+document.createElement("tr"),n=document.createElement("td"),t=document.createElement("td");f.style.paddingLeft="6px";mxUtils.write(n,mxResources.get("relative")+":");var e=document.createElement("input");e.setAttribute("type","checkbox");null!=b&&b.relative&&(e.setAttribute("checked","checked"),e.defaultChecked=!0);this.init=function(){e.focus()};t.appendChild(e);l.appendChild(n);l.appendChild(t);k.appendChild(l);l=document.createElement("tr");n=document.createElement("td");t=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!=b?b.x:"";t.appendChild(m);l.appendChild(n);l.appendChild(t);k.appendChild(l);l=document.createElement("tr");n=document.createElement("td");t=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!=b?b.y:"";t.appendChild(p);l.appendChild(n);
+l.appendChild(t);k.appendChild(l);l=document.createElement("tr");n=document.createElement("td");t=document.createElement("td");mxUtils.write(n,mxResources.get("dx")+":");var v=document.createElement("input");v.setAttribute("type","text");v.style.width="100px";v.value=null!=b&&null!=b.offset?b.offset.x:"";t.appendChild(v);l.appendChild(n);l.appendChild(t);k.appendChild(l);l=document.createElement("tr");n=document.createElement("td");t=document.createElement("td");mxUtils.write(n,mxResources.get("dy")+
+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.width="100px";q.value=null!=b&&null!=b.offset?b.offset.y:"";t.appendChild(q);l.appendChild(n);l.appendChild(t);k.appendChild(l);l=document.createElement("tr");n=document.createElement("td");t=document.createElement("td");mxUtils.write(n,mxResources.get("width")+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.width="100px";u.value=null!=b?b.width:"";t.appendChild(u);l.appendChild(n);l.appendChild(t);
+k.appendChild(l);l=document.createElement("tr");n=document.createElement("td");t=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!=b?b.height:"";t.appendChild(y);l.appendChild(n);l.appendChild(t);k.appendChild(l);l=document.createElement("tr");n=document.createElement("td");t=document.createElement("td");mxUtils.write(n,mxResources.get("rotation")+":");var x=document.createElement("input");
+x.setAttribute("type","text");x.style.width="100px";x.value=1==d.length?mxUtils.getValue(c.getCellStyle(d[0]),mxConstants.STYLE_ROTATION,0):"";t.appendChild(x);l.appendChild(n);l.appendChild(t);k.appendChild(l);f.appendChild(k);g.appendChild(f);b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});b.className="geBtn";var B=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();c.getModel().beginUpdate();try{for(var b=0;b<d.length;b++){var f=c.getCellGeometry(d[b]);null!=
+f&&(f=f.clone(),c.isCellMovable(d[b])&&(f.relative=e.checked,0<mxUtils.trim(m.value).length&&(f.x=Number(m.value)),0<mxUtils.trim(p.value).length&&(f.y=Number(p.value)),0<mxUtils.trim(v.value).length&&(null==f.offset&&(f.offset=new mxPoint),f.offset.x=Number(v.value)),0<mxUtils.trim(q.value).length&&(null==f.offset&&(f.offset=new mxPoint),f.offset.y=Number(q.value))),c.isCellResizable(d[b])&&(0<mxUtils.trim(u.value).length&&(f.width=Number(u.value)),0<mxUtils.trim(y.value).length&&(f.height=Number(y.value))),
+c.getModel().setGeometry(d[b],f));0<mxUtils.trim(x.value).length&&c.setCellStyles(mxConstants.STYLE_ROTATION,Number(x.value),[d[b]])}}finally{c.getModel().endUpdate()}});B.className="geBtn gePrimaryBtn";mxEvent.addListener(g,"keypress",function(a){13==a.keyCode&&B.click()});f=document.createElement("div");f.style.marginTop="20px";f.style.textAlign="right";a.editor.cancelFirst?(f.appendChild(b),f.appendChild(B)):(f.appendChild(B),f.appendChild(b));g.appendChild(f);this.container=g},LibraryDialog=function(a,
+d,c,b,g,f){function k(a){for(a=document.elementFromPoint(a.clientX,a.clientY);null!=a&&a.parentNode!=v;)a=a.parentNode;var b=null;if(null!=a)for(var e=v.firstChild,b=0;null!=e&&e!=a;)e=e.nextSibling,b++;return b}function l(b,c,d,m,f,p,g,n,x){try{if(a.spinner.stop(),null==c||"image/"==c.substring(0,6))if(null==b&&null!=g||null==u[b]){var C=function(){I.innerHTML="";I.style.cursor="pointer";I.style.whiteSpace="nowrap";I.style.textOverflow="ellipsis";mxUtils.write(I,null!=K.title&&0<K.title.length?K.title:
+mxResources.get("untitled"));I.style.color=null==K.title||0==K.title.length?"#d0d0d0":""};v.style.backgroundImage="";q.style.display="none";var G=f,D=p;if(f>a.maxImageSize||p>a.maxImageSize){var F=Math.min(1,Math.min(a.maxImageSize/Math.max(1,f)),a.maxImageSize/Math.max(1,p));f*=F;p*=F}G>D?(D=Math.round(100*D/G),G=100):(G=Math.round(100*G/D),D=100);var E=document.createElement("div");E.setAttribute("draggable","true");E.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";E.style.position="relative";
+E.style.cursor="move";mxUtils.setPrefixedStyle(E.style,"transition","transform .1s ease-in-out");if(null!=b){var J=document.createElement("img");J.setAttribute("src",A.convert(b));J.style.width=G+"px";J.style.height=D+"px";J.style.margin="10px";J.style.paddingBottom=Math.floor((100-D)/2)+"px";J.style.paddingLeft=Math.floor((100-G)/2)+"px";E.appendChild(J)}else if(null!=g){var t=a.stringToCells(Graph.decompress(g.xml));0<t.length&&(a.sidebar.createThumb(t,100,100,E,null,!0,!1),E.firstChild.style.display=
+mxClient.IS_QUIRKS?"inline":"inline-block",E.firstChild.style.cursor="")}var H=document.createElement("img");H.setAttribute("src",Editor.closeImage);H.setAttribute("border","0");H.setAttribute("title",mxResources.get("delete"));H.setAttribute("align","top");H.style.paddingTop="4px";H.style.position="absolute";H.style.marginLeft="-12px";H.style.zIndex="1";H.style.cursor="pointer";mxEvent.addListener(H,"dragstart",function(a){mxEvent.consume(a)});(function(a,b,c){mxEvent.addListener(H,"click",function(d){u[b]=
+null;for(var m=0;m<e.length;m++)if(null!=e[m].data&&e[m].data==b||null!=e[m].xml&&null!=c&&e[m].xml==c.xml){e.splice(m,1);break}E.parentNode.removeChild(a);0==e.length&&(v.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",q.style.display="");mxEvent.consume(d)});mxEvent.addListener(H,"dblclick",function(a){mxEvent.consume(a)})})(E,b,g);E.appendChild(H);E.style.marginBottom="30px";var I=document.createElement("div");I.style.position="absolute";I.style.boxSizing="border-box";I.style.bottom=
+"-18px";I.style.left="10px";I.style.right="10px";I.style.backgroundColor="#ffffff";I.style.overflow="hidden";I.style.textAlign="center";var K=null;null!=b?(K={data:b,w:f,h:p,title:x},null!=n&&(K.aspect=n),u[b]=J,e.push(K)):null!=g&&(g.aspect="fixed",e.push(g),K=g);mxEvent.addListener(I,"keydown",function(a){13==a.keyCode&&null!=B&&(B(),B=null,mxEvent.consume(a))});C();E.appendChild(I);mxEvent.addListener(I,"mousedown",function(a){"true"!=I.getAttribute("contentEditable")&&mxEvent.consume(a)});t=function(b){if(mxClient.IS_IOS||
+mxClient.IS_QUIRKS||mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var e=new FilenameDialog(a,K.title||"",mxResources.get("ok"),function(a){null!=a&&(K.title=a,C())},mxResources.get("enterValue"));a.showDialog(e.container,300,80,!0,!0);e.init();mxEvent.consume(b)}else if("true"!=I.getAttribute("contentEditable")){null!=B&&(B(),B=null);if(null==K.title||0==K.title.length)I.innerHTML="";I.style.textOverflow="";I.style.whiteSpace="";I.style.cursor="text";I.style.color="";I.setAttribute("contentEditable",
+"true");mxUtils.setPrefixedStyle(I.style,"user-select","text");I.focus();document.execCommand("selectAll",!1,null);B=function(){I.removeAttribute("contentEditable");I.style.cursor="pointer";K.title=I.innerHTML;C()};mxEvent.consume(b)}};mxEvent.addListener(I,"click",t);mxEvent.addListener(E,"dblclick",t);v.appendChild(E);mxEvent.addListener(E,"dragstart",function(a){null==b&&null!=g&&(H.style.visibility="hidden",I.style.visibility="hidden");mxClient.IS_FF&&null!=g.xml&&a.dataTransfer.setData("Text",
+g.xml);y=k(a);mxClient.IS_GC&&(E.style.opacity="0.9");window.setTimeout(function(){mxUtils.setPrefixedStyle(E.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(E,30);H.style.visibility="";I.style.visibility=""},0)});mxEvent.addListener(E,"dragend",function(a){"hidden"==H.style.visibility&&(H.style.visibility="",I.style.visibility="");y=null;mxUtils.setOpacity(E,100);mxUtils.setPrefixedStyle(E.style,"transform",null)})}else z||(z=!0,a.handleError({message:mxResources.get("fileExists")}));else{f=
+!1;try{if(G=mxUtils.parseXml(b),"mxlibrary"==G.documentElement.nodeName){D=JSON.parse(mxUtils.getTextContent(G.documentElement));if(null!=D&&0<D.length)for(var O=0;O<D.length;O++)null!=D[O].xml?l(null,null,0,0,0,0,D[O]):l(D[O].data,null,0,0,D[O].w,D[O].h,null,"fixed",D[O].title);f=!0}else if("mxfile"==G.documentElement.nodeName){for(var Q=G.documentElement.getElementsByTagName("diagram"),O=0;O<Q.length;O++){var D=mxUtils.getTextContent(Q[O]),t=a.stringToCells(Graph.decompress(D)),Z=a.editor.graph.getBoundingBoxFromGeometry(t);
+l(null,null,0,0,0,0,{xml:D,w:Z.width,h:Z.height})}f=!0}}catch(da){}f||(a.spinner.stop(),a.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(da){}return null}function n(a){a.dataTransfer.dropEffect=null!=y?"move":"copy";a.stopPropagation();a.preventDefault()}function t(b){b.stopPropagation();b.preventDefault();z=!1;x=k(b);if(null!=y)null!=x&&x<v.children.length?(e.splice(x>y?x-1:x,0,e.splice(y,1)[0]),v.insertBefore(v.children[y],v.children[x])):(e.push(e.splice(y,1)[0]),v.appendChild(v.children[y]));
+else if(0<b.dataTransfer.files.length)a.importFiles(b.dataTransfer.files,0,0,a.maxImageSize,F(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);v.scrollTop=v.scrollHeight})}b.stopPropagation();b.preventDefault()}var e=[];c=document.createElement("div");
c.style.height="100%";var m=document.createElement("div");m.style.whiteSpace="nowrap";m.style.height="40px";c.appendChild(m);mxUtils.write(m,mxResources.get("filename")+":");null==d&&(d=a.defaultLibraryName+".xml");var p=document.createElement("input");p.setAttribute("value",d);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)};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==e.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"));c.appendChild(t);var v={},z=null,y=null,C=null;d=function(a){"true"!=mxEvent.getSource(a).getAttribute("contentEditable")&&null!=C&&(C(),C=null,mxEvent.consume(a))};mxEvent.addListener(q,"mousedown",d);mxEvent.addListener(q,"pointerdown",d);mxEvent.addListener(q,"touchstart",
-d);var x=new mxUrlConverter,A=!1;if(null!=b)for(d=0;d<b.length;d++)m=b[d],l(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 E=function(b){return function(e,c,d,m,f,p,g,k,t){null!=t&&(/(\.vsdx)($|\?)/i.test(t.name)||/(\.vssx)($|\?)/i.test(t.name))?a.importVisio(t,mxUtils.bind(this,function(a){l(a,c,d,m,f,p,g,"fixed",mxEvent.isAltDown(b)?
-null:g.substring(0,g.lastIndexOf(".")).replace(/_/g," "))})):null!=t&&!a.isOffline()&&(new XMLHttpRequest).upload&&a.isRemoteFileFormat(e,t.name)?a.parseFile(t,mxUtils.bind(this,function(e){4==e.readyState&&(a.spinner.stop(),200<=e.status&&299>=e.status&&(l(e.responseText,c,d,m,f,p,g,"fixed",mxEvent.isAltDown(b)?null:g.substring(0,g.lastIndexOf(".")).replace(/_/g," ")),q.scrollTop=q.scrollHeight))})):(l(e,c,d,m,f,p,g,"fixed",mxEvent.isAltDown(b)?null:g.substring(0,g.lastIndexOf(".")).replace(/_/g,
-" ")),q.scrollTop=q.scrollHeight)}};mxEvent.addListener(q,"dragover",n);mxEvent.addListener(q,"drop",u);mxEvent.addListener(t,"dragover",n);mxEvent.addListener(t,"drop",u);c.appendChild(q);b=document.createElement("div");b.style.textAlign="right";b.style.marginTop="20px";d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});d.setAttribute("id","btnCancel");d.className="geBtn";a.editor.cancelFirst&&b.appendChild(d);m=mxUtils.button(mxResources.get("export"),function(){var b=a.createLibraryDataFromImages(e),
+5<=document.documentMode||mxClient.IS_QUIRKS?p.select():document.execCommand("selectAll",!1,null)};m.appendChild(p);var v=document.createElement("div");v.style.borderWidth="1px 0px 1px 0px";v.style.borderColor="#d3d3d3";v.style.borderStyle="solid";v.style.marginTop="6px";v.style.overflow="auto";v.style.height="340px";v.style.backgroundPosition="center center";v.style.backgroundRepeat="no-repeat";0==e.length&&Graph.fileSupport&&(v.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");var q=
+document.createElement("div");q.style.position="absolute";q.style.width="640px";q.style.top="260px";q.style.textAlign="center";q.style.fontSize="22px";q.style.color="#a0c3ff";mxUtils.write(q,mxResources.get("dragImagesHere"));c.appendChild(q);var u={},y=null,x=null,B=null;d=function(a){"true"!=mxEvent.getSource(a).getAttribute("contentEditable")&&null!=B&&(B(),B=null,mxEvent.consume(a))};mxEvent.addListener(v,"mousedown",d);mxEvent.addListener(v,"pointerdown",d);mxEvent.addListener(v,"touchstart",
+d);var A=new mxUrlConverter,z=!1;if(null!=b)for(d=0;d<b.length;d++)m=b[d],l(m.data,null,0,0,m.w,m.h,m,m.aspect,m.title);mxEvent.addListener(v,"dragleave",function(a){q.style.cursor="";for(var b=mxEvent.getSource(a);null!=b;){if(b==v||b==q){a.stopPropagation();a.preventDefault();break}b=b.parentNode}});var F=function(b){return function(e,c,d,m,f,p,g,u,k){null!=k&&(/(\.vsdx)($|\?)/i.test(k.name)||/(\.vssx)($|\?)/i.test(k.name))?a.importVisio(k,mxUtils.bind(this,function(a){l(a,c,d,m,f,p,g,"fixed",mxEvent.isAltDown(b)?
+null:g.substring(0,g.lastIndexOf(".")).replace(/_/g," "))})):null!=k&&!a.isOffline()&&(new XMLHttpRequest).upload&&a.isRemoteFileFormat(e,k.name)?a.parseFile(k,mxUtils.bind(this,function(e){4==e.readyState&&(a.spinner.stop(),200<=e.status&&299>=e.status&&(l(e.responseText,c,d,m,f,p,g,"fixed",mxEvent.isAltDown(b)?null:g.substring(0,g.lastIndexOf(".")).replace(/_/g," ")),v.scrollTop=v.scrollHeight))})):(l(e,c,d,m,f,p,g,"fixed",mxEvent.isAltDown(b)?null:g.substring(0,g.lastIndexOf(".")).replace(/_/g,
+" ")),v.scrollTop=v.scrollHeight)}};mxEvent.addListener(v,"dragover",n);mxEvent.addListener(v,"drop",t);mxEvent.addListener(q,"dragover",n);mxEvent.addListener(q,"drop",t);c.appendChild(v);b=document.createElement("div");b.style.textAlign="right";b.style.marginTop="20px";d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});d.setAttribute("id","btnCancel");d.className="geBtn";a.editor.cancelFirst&&b.appendChild(d);m=mxUtils.button(mxResources.get("export"),function(){var b=a.createLibraryDataFromImages(e),
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";b.appendChild(m);if(Graph.fileSupport){if(null==a.libDlgFileInputElt){var D=document.createElement("input");D.setAttribute("multiple","multiple");D.setAttribute("type","file");mxEvent.addListener(D,"change",
-function(b){A=!1;a.importFiles(D.files,0,0,a.maxImageSize,function(a,e,c,d,m,f,p,g,k){null!=D.files&&(E(b)(a,e,c,d,m,f,p,g,k),D.type="",D.type="file",D.value="")});q.scrollTop=q.scrollHeight});D.style.display="none";document.body.appendChild(D);a.libDlgFileInputElt=D}m=mxUtils.button(mxResources.get("import"),function(){null!=C&&(C(),C=null);a.libDlgFileInputElt.click()});m.setAttribute("id","btnAddImage");m.className="geBtn";b.appendChild(m)}m=mxUtils.button(mxResources.get("addImageUrl"),function(){null!=
-C&&(C(),C=null);a.showImageDialog(mxResources.get("addImageUrl"),"",function(a,b,e){A=!1;if(null!=a){if("data:image/"==a.substring(0,11)){var c=a.indexOf(",");0<c&&(a=a.substring(0,c)+";base64,"+a.substring(c+1))}l(a,null,0,0,b,e);q.scrollTop=q.scrollHeight}})});m.setAttribute("id","btnAddImageUrl");m.className="geBtn";b.appendChild(m);this.saveBtnClickHandler=function(b,e,c,d){a.saveLibrary(b,e,c,d)};m=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(){null!=C&&(C(),C=null);this.saveBtnClickHandler(p.value,
+function(b){z=!1;a.importFiles(D.files,0,0,a.maxImageSize,function(a,e,c,d,m,f,p,g,k){null!=D.files&&(F(b)(a,e,c,d,m,f,p,g,k),D.type="",D.type="file",D.value="")});v.scrollTop=v.scrollHeight});D.style.display="none";document.body.appendChild(D);a.libDlgFileInputElt=D}m=mxUtils.button(mxResources.get("import"),function(){null!=B&&(B(),B=null);a.libDlgFileInputElt.click()});m.setAttribute("id","btnAddImage");m.className="geBtn";b.appendChild(m)}m=mxUtils.button(mxResources.get("addImageUrl"),function(){null!=
+B&&(B(),B=null);a.showImageDialog(mxResources.get("addImageUrl"),"",function(a,b,e){z=!1;if(null!=a){if("data:image/"==a.substring(0,11)){var c=a.indexOf(",");0<c&&(a=a.substring(0,c)+";base64,"+a.substring(c+1))}l(a,null,0,0,b,e);v.scrollTop=v.scrollHeight}})});m.setAttribute("id","btnAddImageUrl");m.className="geBtn";b.appendChild(m);this.saveBtnClickHandler=function(b,e,c,d){a.saveLibrary(b,e,c,d)};m=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(){null!=B&&(B(),B=null);this.saveBtnClickHandler(p.value,
e,g,f)}));m.setAttribute("id","btnSave");m.className="geBtn gePrimaryBtn";b.appendChild(m);a.editor.cancelFirst||b.appendChild(d);c.appendChild(b);this.container=c},EditShapeDialog=function(a,d,c,b,g){b=null!=b?b:300;g=null!=g?g:120;var f,k,l=document.createElement("table"),n=document.createElement("tbody");l.style.cellPadding="4px";f=document.createElement("tr");k=document.createElement("td");k.setAttribute("colspan","2");k.style.fontSize="10pt";mxUtils.write(k,c);f.appendChild(k);n.appendChild(f);
-f=document.createElement("tr");k=document.createElement("td");var u=document.createElement("textarea");u.style.outline="none";u.style.resize="none";u.style.width=b-200+"px";u.style.height=g+"px";this.textarea=u;this.init=function(){u.focus();u.scrollTop=0};k.appendChild(u);f.appendChild(k);k=document.createElement("td");c=document.createElement("div");c.style.position="relative";c.style.border="1px solid gray";c.style.top="6px";c.style.width="200px";c.style.height=g+4+"px";c.style.overflow="hidden";
-c.style.marginBottom="16px";mxEvent.disableContextMenu(c);k.appendChild(c);var e=new Graph(c);e.setEnabled(!1);var m=a.editor.graph.cloneCell(d);e.addCells([m]);c=e.view.getState(m);var p="";null!=c.shape&&null!=c.shape.stencil&&(p=mxUtils.getPrettyXml(c.shape.stencil.desc));mxUtils.write(u,p||"");c=e.getGraphBounds();g=Math.min(160/c.width,(g-40)/c.height);e.view.scaleAndTranslate(g,20/g-c.x,20/g-c.y);f.appendChild(k);n.appendChild(f);f=document.createElement("tr");k=document.createElement("td");
-k.setAttribute("colspan","2");k.style.paddingTop="2px";k.style.whiteSpace="nowrap";k.setAttribute("align","right");a.isOffline()||(g=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/support/solutions/articles/16000052874")}),g.className="geBtn",k.appendChild(g));g=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});g.className="geBtn";a.editor.cancelFirst&&k.appendChild(g);var q=function(b,e,c){var d=u.value,m=mxUtils.parseXml(d),d=mxUtils.getPrettyXml(m.documentElement),
-m=m.documentElement.getElementsByTagName("parsererror");if(null!=m&&0<m.length)a.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(c&&a.hideDialog(),m=!b.model.contains(e),!c||m||d!=p){d=Graph.compress(d);b.getModel().beginUpdate();try{if(m){var f=a.editor.graph.getFreeInsertPoint();e.geometry.x=f.x;e.geometry.y=f.y;b.addCell(e)}b.setCellStyles(mxConstants.STYLE_SHAPE,"stencil("+d+")",[e])}catch(A){throw A;}finally{b.getModel().endUpdate()}m&&
-(b.setSelectionCell(e),b.scrollCellToVisible(e))}};c=mxUtils.button(mxResources.get("preview"),function(){q(e,m,!1)});c.className="geBtn";k.appendChild(c);c=mxUtils.button(mxResources.get("apply"),function(){q(a.editor.graph,d,!0)});c.className="geBtn gePrimaryBtn";k.appendChild(c);a.editor.cancelFirst||k.appendChild(g);f.appendChild(k);n.appendChild(f);l.appendChild(n);this.container=l},CustomDialog=function(a,d,c,b,g,f,k,l){var n=document.createElement("div");n.appendChild(d);d=document.createElement("div");
+f=document.createElement("tr");k=document.createElement("td");var t=document.createElement("textarea");t.style.outline="none";t.style.resize="none";t.style.width=b-200+"px";t.style.height=g+"px";this.textarea=t;this.init=function(){t.focus();t.scrollTop=0};k.appendChild(t);f.appendChild(k);k=document.createElement("td");c=document.createElement("div");c.style.position="relative";c.style.border="1px solid gray";c.style.top="6px";c.style.width="200px";c.style.height=g+4+"px";c.style.overflow="hidden";
+c.style.marginBottom="16px";mxEvent.disableContextMenu(c);k.appendChild(c);var e=new Graph(c);e.setEnabled(!1);var m=a.editor.graph.cloneCell(d);e.addCells([m]);c=e.view.getState(m);var p="";null!=c.shape&&null!=c.shape.stencil&&(p=mxUtils.getPrettyXml(c.shape.stencil.desc));mxUtils.write(t,p||"");c=e.getGraphBounds();g=Math.min(160/c.width,(g-40)/c.height);e.view.scaleAndTranslate(g,20/g-c.x,20/g-c.y);f.appendChild(k);n.appendChild(f);f=document.createElement("tr");k=document.createElement("td");
+k.setAttribute("colspan","2");k.style.paddingTop="2px";k.style.whiteSpace="nowrap";k.setAttribute("align","right");a.isOffline()||(g=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/support/solutions/articles/16000052874")}),g.className="geBtn",k.appendChild(g));g=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});g.className="geBtn";a.editor.cancelFirst&&k.appendChild(g);var v=function(b,e,c){var d=t.value,m=mxUtils.parseXml(d),d=mxUtils.getPrettyXml(m.documentElement),
+m=m.documentElement.getElementsByTagName("parsererror");if(null!=m&&0<m.length)a.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(c&&a.hideDialog(),m=!b.model.contains(e),!c||m||d!=p){d=Graph.compress(d);b.getModel().beginUpdate();try{if(m){var f=a.editor.graph.getFreeInsertPoint();e.geometry.x=f.x;e.geometry.y=f.y;b.addCell(e)}b.setCellStyles(mxConstants.STYLE_SHAPE,"stencil("+d+")",[e])}catch(z){throw z;}finally{b.getModel().endUpdate()}m&&
+(b.setSelectionCell(e),b.scrollCellToVisible(e))}};c=mxUtils.button(mxResources.get("preview"),function(){v(e,m,!1)});c.className="geBtn";k.appendChild(c);c=mxUtils.button(mxResources.get("apply"),function(){v(a.editor.graph,d,!0)});c.className="geBtn gePrimaryBtn";k.appendChild(c);a.editor.cancelFirst||k.appendChild(g);f.appendChild(k);n.appendChild(f);l.appendChild(n);this.container=l},CustomDialog=function(a,d,c,b,g,f,k,l){var n=document.createElement("div");n.appendChild(d);d=document.createElement("div");
d.style.marginTop="16px";d.style.textAlign="center";null!=k&&d.appendChild(k);a.isOffline()||null==f||(k=mxUtils.button(mxResources.get("help"),function(){a.openLink(f)}),k.className="geBtn",d.appendChild(k));k=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=b&&b()});k.className="geBtn";l&&(k.style.display="none");a.editor.cancelFirst&&d.appendChild(k);g=mxUtils.button(g||mxResources.get("ok"),function(){a.hideDialog();null!=c&&c()});d.appendChild(g);g.className="geBtn gePrimaryBtn";
a.editor.cancelFirst||d.appendChild(k);n.appendChild(d);this.cancelBtn=k;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>",d=document.createElement("div");d.innerHTML=a;d.className="geTemplateDlg";
var a=window.innerWidth,c=window.innerHeight,b=987,g=712;.9*a<b&&(b=Math.max(.9*a,600),d.style.width=b+"px");.9*c<g&&(g=Math.max(.9*c,300),d.style.height=g+"px");this.width=b;this.height=g;this.container=d};
-TemplatesDialog.prototype.init=function(a,d,c,b,g,f,k,l,n,u){function e(){null!=H&&(H.style.fontWeight="normal",H.style.textDecoration="none",H=null)}function m(a,b,e,c,d,m,f){if(-1<a.className.indexOf("geTempDlgRadioBtnActive"))return!1;a.className+=" geTempDlgRadioBtnActive";E.querySelector(".geTempDlgRadioBtn[data-id="+c+"]").className="geTempDlgRadioBtn "+(f?"geTempDlgRadioBtnLarge":"geTempDlgRadioBtnSmall");E.querySelector("."+b).src="/images/"+e+"-sel.svg";E.querySelector("."+d).src="/images/"+
-m+".svg";return!0}function p(a){function b(a){W.removeChild(c);E.removeChild(e);W.scrollTop=m}a=a.prevImgUrl||a.imgUrl||TEMPLATE_PATH+"/"+a.url.substring(0,a.url.length-4)+".png";var e=document.createElement("div");e.className="geTempDlgDialogMask";E.appendChild(e);var c=document.createElement("div");c.className="geTempDlgDiagramPreviewBox";var d=document.createElement("img");d.src=a;c.appendChild(d);a=document.createElement("img");a.src="/images/close.png";a.className="geTempDlgPreviewCloseBtn";
-a.setAttribute("title",mxResources.get("close"));c.appendChild(a);var m=W.scrollTop;mxEvent.addListener(a,"click",b);mxEvent.addListener(e,"click",b);W.appendChild(c);W.scrollTop=0;c.style.lineHeight=c.clientHeight+"px"}function q(a,b,e){if(null!=G){for(var c=G.className.split(" "),d=0;d<c.length;d++)if(-1<c[d].indexOf("Active")){c.splice(d,1);break}G.className=c.join(" ")}null!=a?(G=a,G.className+=" "+b,J=e,X.className="geTempDlgCreateBtn"):(J=G=null,X.className="geTempDlgCreateBtn geTempDlgCreateBtnDisabled")}
-function t(b){if(null!=J){var e=J;J=null;X.className="geTempDlgCreateBtn geTempDlgCreateBtnDisabled geTempDlgCreateBtnBusy";e.isExternal?(1==b?u(e.url,e,"nameInput.value"):n(e.url,e,"nameInput.value"),a.hideDialog(!0)):mxUtils.get(TEMPLATE_PATH+"/"+e.url,mxUtils.bind(this,function(b){200<=b.getStatus()&&299>=b.getStatus()&&(d(b.getText(),"nameInput.value"),a.hideDialog(!0))}))}}function v(a){a=a?"":"none";for(var b=E.querySelectorAll(".geTempDlgLinkToDiagram"),e=0;e<b.length;e++)b[e].style.display=
-a}function z(a,b,e){function c(){X.innerHTML=b?mxUtils.htmlEntities(mxResources.get("create")):mxUtils.htmlEntities(mxResources.get("copy"));v(!b)}U.innerHTML="";q();O=a;var d=null;if(e){d=document.createElement("table");d.className="geTempDlgDiagramsListGrid";var m=document.createElement("tr"),f=document.createElement("th");f.style.width="50%";f.innerHTML=mxUtils.htmlEntities(mxResources.get("diagram",null,"Diagram"));m.appendChild(f);f=document.createElement("th");f.style.width="25%";f.innerHTML=
-mxUtils.htmlEntities(mxResources.get("changedBy",null,"Changed By"));m.appendChild(f);f=document.createElement("th");f.style.width="25%";f.innerHTML=mxUtils.htmlEntities(mxResources.get("lastModifiedOn",null,"Last modified on"));m.appendChild(f);d.appendChild(m);U.appendChild(d)}for(m=0;m<a.length;m++){a[m].isExternal=!b;var g=a[m].url,f=mxUtils.htmlEntities(a[m].title),k=a[m].tooltip||a[m].title,B=a[m].imgUrl,A=mxUtils.htmlEntities(a[m].changedBy||""),x=mxUtils.htmlEntities(a[m].lastModifiedOn||
-"");B||(B=TEMPLATE_PATH+"/"+g.substring(0,g.length-4)+".png");g=e?50:15;null!=f&&f.length>g&&(f=f.substring(0,g)+"&hellip;");if(e){var l=document.createElement("tr"),B=document.createElement("td"),n=document.createElement("img");n.src="/images/icon-search.svg";n.className="geTempDlgDiagramListPreviewBtn";n.setAttribute("title",mxResources.get("preview"));B.appendChild(n);k=document.createElement("span");k.className="geTempDlgDiagramTitle";k.innerHTML=f;B.appendChild(k);l.appendChild(B);B=document.createElement("td");
-B.innerHTML=A;l.appendChild(B);B=document.createElement("td");B.innerHTML=x;l.appendChild(B);d.appendChild(l);null==G&&(c(),q(l,"geTempDlgDiagramsListGridActive",a[m]));(function(a,b){mxEvent.addListener(l,"click",function(){G!=b&&(c(),q(b,"geTempDlgDiagramsListGridActive",a))});mxEvent.addListener(l,"dblclick",t);mxEvent.addListener(n,"click",function(){p(a)})})(a[m],l)}else{var y=document.createElement("div");y.className="geTempDlgDiagramTile";y.setAttribute("title",k);null==G&&(c(),q(y,"geTempDlgDiagramTileActive",
-a[m]));A=document.createElement("div");A.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgLoading";var z=document.createElement("img");z.style.display="none";(function(a,b){z.onload=function(){b.className="geTempDlgDiagramTileImg";a.style.display=""};z.onerror=function(){b.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgError"}})(z,A);z.src=B;A.appendChild(z);y.appendChild(A);A=document.createElement("div");A.className="geTempDlgDiagramTileLbl";A.innerHTML=null!=f?f:"";y.appendChild(A);
-n=document.createElement("img");n.src="/images/icon-search.svg";n.className="geTempDlgDiagramPreviewBtn";n.setAttribute("title",mxResources.get("preview"));y.appendChild(n);(function(a,b){mxEvent.addListener(y,"click",function(){G!=b&&(c(),q(b,"geTempDlgDiagramTileActive",a))});mxEvent.addListener(y,"dblclick",t);mxEvent.addListener(n,"click",function(){p(a)})})(a[m],y);U.appendChild(y)}}}function y(a,b){ba.innerHTML="";q();for(var e=!b&&5<a.length?5:a.length,c=0;c<e;c++){var d=a[c];d.isCategory=
-!0;var m=document.createElement("div"),f=mxResources.get(d.title);null==f&&(f=d.title.substring(0,1).toUpperCase()+d.title.substring(1));m.className="geTempDlgNewDiagramCatItem";m.setAttribute("title",f);f=mxUtils.htmlEntities(f);15<f.length&&(f=f.substring(0,15)+"&hellip;");null==G&&(X.innerHTML=mxUtils.htmlEntities(mxResources.get("create")),v(),q(m,"geTempDlgNewDiagramCatItemActive",d));var p=document.createElement("div");p.className="geTempDlgNewDiagramCatItemImg";var g=document.createElement("img");
-g.src=NEW_DIAGRAM_CATS_PATH+"/"+d.img;p.appendChild(g);m.appendChild(p);p=document.createElement("div");p.className="geTempDlgNewDiagramCatItemLbl";p.innerHTML=f;m.appendChild(p);ba.appendChild(m);(function(a,b){mxEvent.addListener(m,"click",function(){G!=b&&(X.innerHTML=mxUtils.htmlEntities(mxResources.get("create")),v(),q(b,"geTempDlgNewDiagramCatItemActive",a))});mxEvent.addListener(m,"dblclick",t)})(d,m)}Y.style.display=5>a.length?"none":""}function C(a){var b=E.querySelector(".geTemplatesList"),
-e;for(e in a){var c=document.createElement("div"),d=mxResources.get(e),m=a[e];null==d&&(d=e.substring(0,1).toUpperCase()+e.substring(1));c.className="geTemplateCatLink";c.setAttribute("title",d+" ("+m.length+")");d=mxUtils.htmlEntities(d);15<d.length&&(d=d.substring(0,15)+"&hellip;");c.innerHTML=d+" ("+m.length+")";b.appendChild(c);(function(b,e,d){mxEvent.addListener(c,"click",function(){H!=d&&(null!=H?(H.style.fontWeight="normal",H.style.textDecoration="none"):(fa.style.display="none",ga.style.minHeight=
-"100%"),H=d,H.style.fontWeight="bold",H.style.textDecoration="underline",W.scrollTop=0,D&&(B=!0),L.innerHTML=e,V.style.display="none",z(a[b],!0))})})(e,d,c)}}function x(a){k&&(W.scrollTop=0,U.innerHTML="",aa.spin(U),B=!1,D=!0,L.innerHTML=mxUtils.htmlEntities(mxResources.get("recentDiag",null,"Recent Diagrams")),Q=null,k(M,a?null:f))}function A(a){e();W.scrollTop=0;U.innerHTML="";aa.spin(U);B=!1;D=!0;ea=null;L.innerHTML=mxUtils.htmlEntities(mxResources.get("searchResults",null,"Search Results"))+' "'+
-mxUtils.htmlEntities(a)+'"';l(a,M,F?null:f);Q=a}b=null!=b?b:TEMPLATE_PATH+"/index.xml";g=null!=g?g:NEW_DIAGRAM_CATS_PATH+"/index.xml";var E=this.container,D=!1,B=!1,H=null,G=null,J=null,I=!1,F=!0,K=!1,O=[],Q,Y=E.querySelector(".geTempDlgShowAllBtn"),U=E.querySelector(".geTempDlgDiagramsTiles"),L=E.querySelector(".geTempDlgDiagramsListTitle"),V=E.querySelector(".geTempDlgDiagramsListBtns"),W=E.querySelector(".geTempDlgContent"),ga=E.querySelector(".geTempDlgDiagramsList"),fa=E.querySelector(".geTempDlgNewDiagramCat"),
-ba=E.querySelector(".geTempDlgNewDiagramCatList"),X=E.querySelector(".geTempDlgCreateBtn"),aa=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(E.querySelector(".geTempDlgNewDiagramlbl"),"click",function(){e();fa.style.display="";ga.style.minHeight="calc(100% - 280px)";x(F)});mxEvent.addListener(E.querySelector(".geTempDlgRadioBtn[data-id=allDiagramsBtn]"),"click",function(){m(this,"geTempDlgAllDiagramsBtnImg",
-"all-diagrams","myDiagramsBtn","geTempDlgMyDiagramsBtnImg","my-diagrams",!0)&&(F=!0,null==Q?x(F):A(Q))});mxEvent.addListener(E.querySelector(".geTempDlgRadioBtn[data-id=myDiagramsBtn]"),"click",function(){m(this,"geTempDlgMyDiagramsBtnImg","my-diagrams","allDiagramsBtn","geTempDlgAllDiagramsBtnImg","all-diagrams",!0)&&(F=!1,null==Q?x(F):A(Q))});mxEvent.addListener(E.querySelector(".geTempDlgRadioBtn[data-id=listBtn]"),"click",function(){m(this,"geTempDlgListBtnImg","list","tilesBtn","geTempDlgTilesBtnImg",
-"tiles",!1)&&(K=!0,z(O,!1,K))});mxEvent.addListener(E.querySelector(".geTempDlgRadioBtn[data-id=tilesBtn]"),"click",function(){m(this,"geTempDlgTilesBtnImg","tiles","listBtn","geTempDlgListBtnImg","list",!1)&&(K=!1,z(O,!1,K))});mxEvent.addListener(Y,"click",function(){I?(fa.style.height="280px",ba.style.height="190px",Y.innerHTML=mxUtils.htmlEntities(mxResources.get("showAll",null,"+ Show all")),y(da)):(fa.style.height="440px",ba.style.height="355px",Y.innerHTML=mxUtils.htmlEntities(mxResources.get("showLess",
-null,"- Show less")),y(da,!0));I=!I});var P=!1,ca=!1,Z={},da=[],R=1;mxUtils.get(b,function(a){if(!P){P=!0;for(a=a.getXml().documentElement.firstChild;null!=a;){if("undefined"!==typeof a.getAttribute){var b=a.getAttribute("url");if(null!=b){var e=b.indexOf("/"),b=b.substring(0,e),e=Z[b];null==e&&(R++,e=[],Z[b]=e);e.push({url:a.getAttribute("url"),libs:a.getAttribute("libs"),clibs:a.getAttribute("clibs"),title:a.getAttribute("title"),tooltip:a.getAttribute("url"),imgUrl:a.getAttribute("imgUrl")})}}a=
-a.nextSibling}C(Z)}});mxUtils.get(g,function(a){if(!ca){ca=!0;for(a=a.getXml().documentElement.firstChild;null!=a;)"undefined"!==typeof a.getAttribute&&null!=a.getAttribute("title")&&da.push({img:a.getAttribute("img"),libs:a.getAttribute("libs"),clibs:a.getAttribute("clibs"),title:a.getAttribute("title")}),a=a.nextSibling;y(da)}});var M=function(a,b){V.style.display="";aa.stop();D=!1;B?B=!1:b?U.innerHTML=b:0==a.length?U.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams",null,"No Diagrams Found")):
-z(a,!1,K)};x(F);var ea=null;l&&mxEvent.addListener(E.querySelector(".geTempDlgSearchBox"),"keyup",function(a){var b=this;null!=ea&&clearTimeout(ea);13==a.keyCode?A(b.value):ea=setTimeout(function(){A(b.value)},500)});mxEvent.addListener(X,"click",t);mxEvent.addListener(E.querySelector(".geTempDlgLinkToDiagramBtn"),"click",function(a){t(!0)});mxEvent.addListener(E.querySelector(".geTempDlgCancelBtn"),"click",function(){null!=c&&c();a.hideDialog(!0)})};
+TemplatesDialog.prototype.init=function(a,d,c,b,g,f,k,l,n,t){function e(){null!=G&&(G.style.fontWeight="normal",G.style.textDecoration="none",G=null)}function m(a,b,e,c,d,m,f){if(-1<a.className.indexOf("geTempDlgRadioBtnActive"))return!1;a.className+=" geTempDlgRadioBtnActive";F.querySelector(".geTempDlgRadioBtn[data-id="+c+"]").className="geTempDlgRadioBtn "+(f?"geTempDlgRadioBtnLarge":"geTempDlgRadioBtnSmall");F.querySelector("."+b).src="/images/"+e+"-sel.svg";F.querySelector("."+d).src="/images/"+
+m+".svg";return!0}function p(a){function b(a){W.removeChild(c);F.removeChild(e);W.scrollTop=m}a=a.prevImgUrl||a.imgUrl||TEMPLATE_PATH+"/"+a.url.substring(0,a.url.length-4)+".png";var e=document.createElement("div");e.className="geTempDlgDialogMask";F.appendChild(e);var c=document.createElement("div");c.className="geTempDlgDiagramPreviewBox";var d=document.createElement("img");d.src=a;c.appendChild(d);a=document.createElement("img");a.src="/images/close.png";a.className="geTempDlgPreviewCloseBtn";
+a.setAttribute("title",mxResources.get("close"));c.appendChild(a);var m=W.scrollTop;mxEvent.addListener(a,"click",b);mxEvent.addListener(e,"click",b);W.appendChild(c);W.scrollTop=0;c.style.lineHeight=c.clientHeight+"px"}function v(a,b,e){if(null!=H){for(var c=H.className.split(" "),d=0;d<c.length;d++)if(-1<c[d].indexOf("Active")){c.splice(d,1);break}H.className=c.join(" ")}null!=a?(H=a,H.className+=" "+b,J=e,X.className="geTempDlgCreateBtn"):(J=H=null,X.className="geTempDlgCreateBtn geTempDlgCreateBtnDisabled")}
+function q(b){if(null!=J){var e=J;J=null;X.className="geTempDlgCreateBtn geTempDlgCreateBtnDisabled geTempDlgCreateBtnBusy";e.isExternal?(1==b?t(e.url,e,"nameInput.value"):n(e.url,e,"nameInput.value"),a.hideDialog(!0)):mxUtils.get(TEMPLATE_PATH+"/"+e.url,mxUtils.bind(this,function(b){200<=b.getStatus()&&299>=b.getStatus()&&(d(b.getText(),"nameInput.value"),a.hideDialog(!0))}))}}function u(a){a=a?"":"none";for(var b=F.querySelectorAll(".geTempDlgLinkToDiagram"),e=0;e<b.length;e++)b[e].style.display=
+a}function y(a,b,e){function c(){X.innerHTML=b?mxUtils.htmlEntities(mxResources.get("create")):mxUtils.htmlEntities(mxResources.get("copy"));u(!b)}U.innerHTML="";v();O=a;var d=null;if(e){d=document.createElement("table");d.className="geTempDlgDiagramsListGrid";var m=document.createElement("tr"),f=document.createElement("th");f.style.width="50%";f.innerHTML=mxUtils.htmlEntities(mxResources.get("diagram",null,"Diagram"));m.appendChild(f);f=document.createElement("th");f.style.width="25%";f.innerHTML=
+mxUtils.htmlEntities(mxResources.get("changedBy",null,"Changed By"));m.appendChild(f);f=document.createElement("th");f.style.width="25%";f.innerHTML=mxUtils.htmlEntities(mxResources.get("lastModifiedOn",null,"Last modified on"));m.appendChild(f);d.appendChild(m);U.appendChild(d)}for(m=0;m<a.length;m++){a[m].isExternal=!b;var g=a[m].url,f=mxUtils.htmlEntities(a[m].title),k=a[m].tooltip||a[m].title,C=a[m].imgUrl,z=mxUtils.htmlEntities(a[m].changedBy||""),A=mxUtils.htmlEntities(a[m].lastModifiedOn||
+"");C||(C=TEMPLATE_PATH+"/"+g.substring(0,g.length-4)+".png");g=e?50:15;null!=f&&f.length>g&&(f=f.substring(0,g)+"&hellip;");if(e){var l=document.createElement("tr"),C=document.createElement("td"),n=document.createElement("img");n.src="/images/icon-search.svg";n.className="geTempDlgDiagramListPreviewBtn";n.setAttribute("title",mxResources.get("preview"));C.appendChild(n);k=document.createElement("span");k.className="geTempDlgDiagramTitle";k.innerHTML=f;C.appendChild(k);l.appendChild(C);C=document.createElement("td");
+C.innerHTML=z;l.appendChild(C);C=document.createElement("td");C.innerHTML=A;l.appendChild(C);d.appendChild(l);null==H&&(c(),v(l,"geTempDlgDiagramsListGridActive",a[m]));(function(a,b){mxEvent.addListener(l,"click",function(){H!=b&&(c(),v(b,"geTempDlgDiagramsListGridActive",a))});mxEvent.addListener(l,"dblclick",q);mxEvent.addListener(n,"click",function(){p(a)})})(a[m],l)}else{var y=document.createElement("div");y.className="geTempDlgDiagramTile";y.setAttribute("title",k);null==H&&(c(),v(y,"geTempDlgDiagramTileActive",
+a[m]));z=document.createElement("div");z.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgLoading";var x=document.createElement("img");x.style.display="none";(function(a,b){x.onload=function(){b.className="geTempDlgDiagramTileImg";a.style.display=""};x.onerror=function(){b.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgError"}})(x,z);x.src=C;z.appendChild(x);y.appendChild(z);z=document.createElement("div");z.className="geTempDlgDiagramTileLbl";z.innerHTML=null!=f?f:"";y.appendChild(z);
+n=document.createElement("img");n.src="/images/icon-search.svg";n.className="geTempDlgDiagramPreviewBtn";n.setAttribute("title",mxResources.get("preview"));y.appendChild(n);(function(a,b){mxEvent.addListener(y,"click",function(){H!=b&&(c(),v(b,"geTempDlgDiagramTileActive",a))});mxEvent.addListener(y,"dblclick",q);mxEvent.addListener(n,"click",function(){p(a)})})(a[m],y);U.appendChild(y)}}}function x(a,b){ba.innerHTML="";v();for(var e=!b&&5<a.length?5:a.length,c=0;c<e;c++){var d=a[c];d.isCategory=
+!0;var m=document.createElement("div"),f=mxResources.get(d.title);null==f&&(f=d.title.substring(0,1).toUpperCase()+d.title.substring(1));m.className="geTempDlgNewDiagramCatItem";m.setAttribute("title",f);f=mxUtils.htmlEntities(f);15<f.length&&(f=f.substring(0,15)+"&hellip;");null==H&&(X.innerHTML=mxUtils.htmlEntities(mxResources.get("create")),u(),v(m,"geTempDlgNewDiagramCatItemActive",d));var p=document.createElement("div");p.className="geTempDlgNewDiagramCatItemImg";var g=document.createElement("img");
+g.src=NEW_DIAGRAM_CATS_PATH+"/"+d.img;p.appendChild(g);m.appendChild(p);p=document.createElement("div");p.className="geTempDlgNewDiagramCatItemLbl";p.innerHTML=f;m.appendChild(p);ba.appendChild(m);(function(a,b){mxEvent.addListener(m,"click",function(){H!=b&&(X.innerHTML=mxUtils.htmlEntities(mxResources.get("create")),u(),v(b,"geTempDlgNewDiagramCatItemActive",a))});mxEvent.addListener(m,"dblclick",q)})(d,m)}Y.style.display=5>a.length?"none":""}function B(a){var b=F.querySelector(".geTemplatesList"),
+e;for(e in a){var c=document.createElement("div"),d=mxResources.get(e),m=a[e];null==d&&(d=e.substring(0,1).toUpperCase()+e.substring(1));c.className="geTemplateCatLink";c.setAttribute("title",d+" ("+m.length+")");d=mxUtils.htmlEntities(d);15<d.length&&(d=d.substring(0,15)+"&hellip;");c.innerHTML=d+" ("+m.length+")";b.appendChild(c);(function(b,e,d){mxEvent.addListener(c,"click",function(){G!=d&&(null!=G?(G.style.fontWeight="normal",G.style.textDecoration="none"):(fa.style.display="none",ga.style.minHeight=
+"100%"),G=d,G.style.fontWeight="bold",G.style.textDecoration="underline",W.scrollTop=0,D&&(C=!0),L.innerHTML=e,V.style.display="none",y(a[b],!0))})})(e,d,c)}}function A(a){k&&(W.scrollTop=0,U.innerHTML="",aa.spin(U),C=!1,D=!0,L.innerHTML=mxUtils.htmlEntities(mxResources.get("recentDiag",null,"Recent Diagrams")),Q=null,k(M,a?null:f))}function z(a){e();W.scrollTop=0;U.innerHTML="";aa.spin(U);C=!1;D=!0;ea=null;L.innerHTML=mxUtils.htmlEntities(mxResources.get("searchResults",null,"Search Results"))+' "'+
+mxUtils.htmlEntities(a)+'"';l(a,M,E?null:f);Q=a}b=null!=b?b:TEMPLATE_PATH+"/index.xml";g=null!=g?g:NEW_DIAGRAM_CATS_PATH+"/index.xml";var F=this.container,D=!1,C=!1,G=null,H=null,J=null,I=!1,E=!0,K=!1,O=[],Q,Y=F.querySelector(".geTempDlgShowAllBtn"),U=F.querySelector(".geTempDlgDiagramsTiles"),L=F.querySelector(".geTempDlgDiagramsListTitle"),V=F.querySelector(".geTempDlgDiagramsListBtns"),W=F.querySelector(".geTempDlgContent"),ga=F.querySelector(".geTempDlgDiagramsList"),fa=F.querySelector(".geTempDlgNewDiagramCat"),
+ba=F.querySelector(".geTempDlgNewDiagramCatList"),X=F.querySelector(".geTempDlgCreateBtn"),aa=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(F.querySelector(".geTempDlgNewDiagramlbl"),"click",function(){e();fa.style.display="";ga.style.minHeight="calc(100% - 280px)";A(E)});mxEvent.addListener(F.querySelector(".geTempDlgRadioBtn[data-id=allDiagramsBtn]"),"click",function(){m(this,"geTempDlgAllDiagramsBtnImg",
+"all-diagrams","myDiagramsBtn","geTempDlgMyDiagramsBtnImg","my-diagrams",!0)&&(E=!0,null==Q?A(E):z(Q))});mxEvent.addListener(F.querySelector(".geTempDlgRadioBtn[data-id=myDiagramsBtn]"),"click",function(){m(this,"geTempDlgMyDiagramsBtnImg","my-diagrams","allDiagramsBtn","geTempDlgAllDiagramsBtnImg","all-diagrams",!0)&&(E=!1,null==Q?A(E):z(Q))});mxEvent.addListener(F.querySelector(".geTempDlgRadioBtn[data-id=listBtn]"),"click",function(){m(this,"geTempDlgListBtnImg","list","tilesBtn","geTempDlgTilesBtnImg",
+"tiles",!1)&&(K=!0,y(O,!1,K))});mxEvent.addListener(F.querySelector(".geTempDlgRadioBtn[data-id=tilesBtn]"),"click",function(){m(this,"geTempDlgTilesBtnImg","tiles","listBtn","geTempDlgListBtnImg","list",!1)&&(K=!1,y(O,!1,K))});mxEvent.addListener(Y,"click",function(){I?(fa.style.height="280px",ba.style.height="190px",Y.innerHTML=mxUtils.htmlEntities(mxResources.get("showAll",null,"+ Show all")),x(da)):(fa.style.height="440px",ba.style.height="355px",Y.innerHTML=mxUtils.htmlEntities(mxResources.get("showLess",
+null,"- Show less")),x(da,!0));I=!I});var P=!1,ca=!1,Z={},da=[],R=1;mxUtils.get(b,function(a){if(!P){P=!0;for(a=a.getXml().documentElement.firstChild;null!=a;){if("undefined"!==typeof a.getAttribute){var b=a.getAttribute("url");if(null!=b){var e=b.indexOf("/"),b=b.substring(0,e),e=Z[b];null==e&&(R++,e=[],Z[b]=e);e.push({url:a.getAttribute("url"),libs:a.getAttribute("libs"),clibs:a.getAttribute("clibs"),title:a.getAttribute("title"),tooltip:a.getAttribute("url"),imgUrl:a.getAttribute("imgUrl")})}}a=
+a.nextSibling}B(Z)}});mxUtils.get(g,function(a){if(!ca){ca=!0;for(a=a.getXml().documentElement.firstChild;null!=a;)"undefined"!==typeof a.getAttribute&&null!=a.getAttribute("title")&&da.push({img:a.getAttribute("img"),libs:a.getAttribute("libs"),clibs:a.getAttribute("clibs"),title:a.getAttribute("title")}),a=a.nextSibling;x(da)}});var M=function(a,b){V.style.display="";aa.stop();D=!1;C?C=!1:b?U.innerHTML=b:0==a.length?U.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams",null,"No Diagrams Found")):
+y(a,!1,K)};A(E);var ea=null;l&&mxEvent.addListener(F.querySelector(".geTempDlgSearchBox"),"keyup",function(a){var b=this;null!=ea&&clearTimeout(ea);13==a.keyCode?z(b.value):ea=setTimeout(function(){z(b.value)},500)});mxEvent.addListener(X,"click",q);mxEvent.addListener(F.querySelector(".geTempDlgLinkToDiagramBtn"),"click",function(a){q(!0)});mxEvent.addListener(F.querySelector(".geTempDlgCancelBtn"),"click",function(){null!=c&&c();a.hideDialog(!0)})};
var BtnDialog=function(a,d,c,b){var g=document.createElement("div");g.style.textAlign="center";var f=document.createElement("p");f.style.fontSize="16pt";f.style.padding="0px";f.style.margin="0px";f.style.color="gray";mxUtils.write(f,mxResources.get("done"));var k="Unknown",l=document.createElement("img");l.setAttribute("border","0");l.setAttribute("align","absmiddle");l.style.marginRight="10px";d==a.drive?(k=mxResources.get("googleDrive"),l.src=IMAGE_PATH+"/google-drive-logo-white.svg"):d==a.dropbox?
(k=mxResources.get("dropbox"),l.src=IMAGE_PATH+"/dropbox-logo-white.svg"):d==a.oneDrive?(k=mxResources.get("oneDrive"),l.src=IMAGE_PATH+"/onedrive-logo-white.svg"):d==a.gitHub?(k=mxResources.get("github"),l.src=IMAGE_PATH+"/github-logo-white.svg"):d==a.gitLab?(k=mxResources.get("gitlab"),l.src=IMAGE_PATH+"/gitlab-logo.svg"):d==a.trello&&(k=mxResources.get("trello"),l.src=IMAGE_PATH+"/trello-logo-white.svg");a=document.createElement("p");mxUtils.write(a,mxResources.get("authorizedIn",[k],"You are now authorized in {1}"));
-c=mxUtils.button(c,b);c.insertBefore(l,c.firstChild);c.style.marginTop="6px";c.className="geBigButton";c.style.fontSize="18px";c.style.padding="14px";g.appendChild(f);g.appendChild(a);g.appendChild(c);this.container=g},FontDialog=function(a,d,c,b,g){function f(a){this.style.border="";13==a.keyCode&&C.click()}var k,l,n,u=document.createElement("table"),e=document.createElement("tbody");u.style.marginTop="8px";k=document.createElement("tr");l=document.createElement("td");l.colSpan=2;l.style.whiteSpace=
+c=mxUtils.button(c,b);c.insertBefore(l,c.firstChild);c.style.marginTop="6px";c.className="geBigButton";c.style.fontSize="18px";c.style.padding="14px";g.appendChild(f);g.appendChild(a);g.appendChild(c);this.container=g},FontDialog=function(a,d,c,b,g){function f(a){this.style.border="";13==a.keyCode&&B.click()}var k,l,n,t=document.createElement("table"),e=document.createElement("tbody");t.style.marginTop="8px";k=document.createElement("tr");l=document.createElement("td");l.colSpan=2;l.style.whiteSpace=
"nowrap";l.style.fontSize="10pt";l.style.fontWeight="bold";var m=document.createElement("input");m.style.cssText="margin-right:8px;margin-bottom:8px;";m.setAttribute("value","sysfonts");m.setAttribute("type","radio");m.setAttribute("name","current-fontdialog");m.setAttribute("id","fontdialog-sysfonts");l.appendChild(m);n=document.createElement("label");n.setAttribute("for","fontdialog-sysfonts");mxUtils.write(n,mxResources.get("sysFonts",null,"System Fonts"));l.appendChild(n);k.appendChild(l);e.appendChild(k);
k=document.createElement("tr");l=document.createElement("td");l.style.whiteSpace="nowrap";l.style.fontSize="10pt";l.style.width="120px";l.style.paddingLeft="15px";mxUtils.write(l,mxResources.get("fontname",null,"Font Name")+":");k.appendChild(l);var p=document.createElement("input");"s"==b&&p.setAttribute("value",d);p.style.marginLeft="4px";p.style.width="250px";p.className="dlg_fontName_s";l=document.createElement("td");l.appendChild(p);k.appendChild(l);e.appendChild(k);k=document.createElement("tr");
-l=document.createElement("td");l.colSpan=2;l.style.whiteSpace="nowrap";l.style.fontSize="10pt";l.style.fontWeight="bold";var q=document.createElement("input");q.style.cssText="margin-right:8px;margin-bottom:8px;";q.setAttribute("value","googlefonts");q.setAttribute("type","radio");q.setAttribute("name","current-fontdialog");q.setAttribute("id","fontdialog-googlefonts");l.appendChild(q);n=document.createElement("label");n.setAttribute("for","fontdialog-googlefonts");mxUtils.write(n,mxResources.get("googleFonts",
-null,"Google Fonts"));l.appendChild(n);k.appendChild(l);e.appendChild(k);k=document.createElement("tr");l=document.createElement("td");l.style.whiteSpace="nowrap";l.style.fontSize="10pt";l.style.width="120px";l.style.paddingLeft="15px";mxUtils.write(l,mxResources.get("fontname",null,"Font Name")+":");k.appendChild(l);var t=document.createElement("input");"g"==b&&t.setAttribute("value",d);t.style.marginLeft="4px";t.style.width="250px";t.className="dlg_fontName_g";l=document.createElement("td");l.appendChild(t);
-k.appendChild(l);e.appendChild(k);k=document.createElement("tr");l=document.createElement("td");l.colSpan=2;l.style.whiteSpace="nowrap";l.style.fontSize="10pt";l.style.fontWeight="bold";var v=document.createElement("input");v.style.cssText="margin-right:8px;margin-bottom:8px;";v.setAttribute("value","webfonts");v.setAttribute("type","radio");v.setAttribute("name","current-fontdialog");v.setAttribute("id","fontdialog-webfonts");l.appendChild(v);n=document.createElement("label");n.setAttribute("for",
-"fontdialog-webfonts");mxUtils.write(n,mxResources.get("webfonts",null,"Web Fonts"));l.appendChild(n);k.appendChild(l);e.appendChild(k);k=document.createElement("tr");l=document.createElement("td");l.style.whiteSpace="nowrap";l.style.fontSize="10pt";l.style.width="120px";l.style.paddingLeft="15px";mxUtils.write(l,mxResources.get("fontname",null,"Font Name")+":");k.appendChild(l);var z=document.createElement("input");"w"==b&&z.setAttribute("value",d);z.style.marginLeft="4px";z.style.width="250px";
-z.className="dlg_fontName_w";l=document.createElement("td");l.appendChild(z);k.appendChild(l);e.appendChild(k);k=document.createElement("tr");l=document.createElement("td");l.style.whiteSpace="nowrap";l.style.fontSize="10pt";l.style.width="120px";l.style.paddingLeft="15px";mxUtils.write(l,mxResources.get("fontUrl",null,"Font URL")+":");k.appendChild(l);var y=document.createElement("input");y.setAttribute("value",c||"");y.style.marginLeft="4px";y.style.width="250px";y.className="dlg_fontUrl";l=document.createElement("td");
-l.appendChild(y);k.appendChild(l);e.appendChild(k);this.init=function(){var a=p;"g"==b?a=t:"w"==b&&(a=z);a.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?a.select():document.execCommand("selectAll",!1,null)};k=document.createElement("tr");l=document.createElement("td");l.colSpan=2;l.style.paddingTop="20px";l.style.whiteSpace="nowrap";l.setAttribute("align","right");a.isOffline()||(d=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://www.diagrams.net/blog/external-fonts")}),
-d.className="geBtn",l.appendChild(d));d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});d.className="geBtn";a.editor.cancelFirst&&l.appendChild(d);var C=mxUtils.button(mxResources.get("apply"),function(){var b,e,c;m.checked?(b=p.value,c="s"):q.checked?(b=t.value,e=Editor.GOOGLE_FONTS+encodeURIComponent(b).replace(/%20/g,"+"),c="g"):v.checked&&(b=z.value,e=y.value,c="w");var d;d=e;var f=c,k=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;null==
-b||0==b.length?(u.querySelector(".dlg_fontName_"+f).style.border="1px solid red",d=!1):"w"!=f||k.test(d)?d=!0:(u.querySelector(".dlg_fontUrl").style.border="1px solid red",d=!1);d&&(g(b,e,c),a.hideDialog())});C.className="geBtn gePrimaryBtn";mxEvent.addListener(p,"keypress",f);mxEvent.addListener(t,"keypress",f);mxEvent.addListener(z,"keypress",f);mxEvent.addListener(y,"keypress",f);mxEvent.addListener(p,"focus",function(){m.setAttribute("checked","checked");m.checked=!0});mxEvent.addListener(t,"focus",
-function(){q.setAttribute("checked","checked");q.checked=!0});mxEvent.addListener(z,"focus",function(){v.setAttribute("checked","checked");v.checked=!0});mxEvent.addListener(y,"focus",function(){v.setAttribute("checked","checked");v.checked=!0});l.appendChild(C);a.editor.cancelFirst||l.appendChild(d);k.appendChild(l);e.appendChild(k);u.appendChild(e);this.container=u};
+l=document.createElement("td");l.colSpan=2;l.style.whiteSpace="nowrap";l.style.fontSize="10pt";l.style.fontWeight="bold";var v=document.createElement("input");v.style.cssText="margin-right:8px;margin-bottom:8px;";v.setAttribute("value","googlefonts");v.setAttribute("type","radio");v.setAttribute("name","current-fontdialog");v.setAttribute("id","fontdialog-googlefonts");l.appendChild(v);n=document.createElement("label");n.setAttribute("for","fontdialog-googlefonts");mxUtils.write(n,mxResources.get("googleFonts",
+null,"Google Fonts"));l.appendChild(n);k.appendChild(l);e.appendChild(k);k=document.createElement("tr");l=document.createElement("td");l.style.whiteSpace="nowrap";l.style.fontSize="10pt";l.style.width="120px";l.style.paddingLeft="15px";mxUtils.write(l,mxResources.get("fontname",null,"Font Name")+":");k.appendChild(l);var q=document.createElement("input");"g"==b&&q.setAttribute("value",d);q.style.marginLeft="4px";q.style.width="250px";q.className="dlg_fontName_g";l=document.createElement("td");l.appendChild(q);
+k.appendChild(l);e.appendChild(k);k=document.createElement("tr");l=document.createElement("td");l.colSpan=2;l.style.whiteSpace="nowrap";l.style.fontSize="10pt";l.style.fontWeight="bold";var u=document.createElement("input");u.style.cssText="margin-right:8px;margin-bottom:8px;";u.setAttribute("value","webfonts");u.setAttribute("type","radio");u.setAttribute("name","current-fontdialog");u.setAttribute("id","fontdialog-webfonts");l.appendChild(u);n=document.createElement("label");n.setAttribute("for",
+"fontdialog-webfonts");mxUtils.write(n,mxResources.get("webfonts",null,"Web Fonts"));l.appendChild(n);k.appendChild(l);e.appendChild(k);k=document.createElement("tr");l=document.createElement("td");l.style.whiteSpace="nowrap";l.style.fontSize="10pt";l.style.width="120px";l.style.paddingLeft="15px";mxUtils.write(l,mxResources.get("fontname",null,"Font Name")+":");k.appendChild(l);var y=document.createElement("input");"w"==b&&y.setAttribute("value",d);y.style.marginLeft="4px";y.style.width="250px";
+y.className="dlg_fontName_w";l=document.createElement("td");l.appendChild(y);k.appendChild(l);e.appendChild(k);k=document.createElement("tr");l=document.createElement("td");l.style.whiteSpace="nowrap";l.style.fontSize="10pt";l.style.width="120px";l.style.paddingLeft="15px";mxUtils.write(l,mxResources.get("fontUrl",null,"Font URL")+":");k.appendChild(l);var x=document.createElement("input");x.setAttribute("value",c||"");x.style.marginLeft="4px";x.style.width="250px";x.className="dlg_fontUrl";l=document.createElement("td");
+l.appendChild(x);k.appendChild(l);e.appendChild(k);this.init=function(){var a=p;"g"==b?a=q:"w"==b&&(a=y);a.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?a.select():document.execCommand("selectAll",!1,null)};k=document.createElement("tr");l=document.createElement("td");l.colSpan=2;l.style.paddingTop="20px";l.style.whiteSpace="nowrap";l.setAttribute("align","right");a.isOffline()||(d=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://www.diagrams.net/blog/external-fonts")}),
+d.className="geBtn",l.appendChild(d));d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});d.className="geBtn";a.editor.cancelFirst&&l.appendChild(d);var B=mxUtils.button(mxResources.get("apply"),function(){var b,e,c;m.checked?(b=p.value,c="s"):v.checked?(b=q.value,e=Editor.GOOGLE_FONTS+encodeURIComponent(b).replace(/%20/g,"+"),c="g"):u.checked&&(b=y.value,e=x.value,c="w");var d;d=e;var f=c,k=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;null==
+b||0==b.length?(t.querySelector(".dlg_fontName_"+f).style.border="1px solid red",d=!1):"w"!=f||k.test(d)?d=!0:(t.querySelector(".dlg_fontUrl").style.border="1px solid red",d=!1);d&&(g(b,e,c),a.hideDialog())});B.className="geBtn gePrimaryBtn";mxEvent.addListener(p,"keypress",f);mxEvent.addListener(q,"keypress",f);mxEvent.addListener(y,"keypress",f);mxEvent.addListener(x,"keypress",f);mxEvent.addListener(p,"focus",function(){m.setAttribute("checked","checked");m.checked=!0});mxEvent.addListener(q,"focus",
+function(){v.setAttribute("checked","checked");v.checked=!0});mxEvent.addListener(y,"focus",function(){u.setAttribute("checked","checked");u.checked=!0});mxEvent.addListener(x,"focus",function(){u.setAttribute("checked","checked");u.checked=!0});l.appendChild(B);a.editor.cancelFirst||l.appendChild(d);k.appendChild(l);e.appendChild(k);t.appendChild(e);this.container=t};
function AspectDialog(a,d,c,b,g){this.aspect={pageId:d||a.pages[0].getId(),layerIds:c||[]};d=document.createElement("div");var f=document.createElement("h5");f.style.margin="0 0 10px";mxUtils.write(f,mxResources.get("pages"));d.appendChild(f);c=document.createElement("div");c.className="geAspectDlgList";d.appendChild(c);f=document.createElement("h5");f.style.margin="0 0 10px";mxUtils.write(f,mxResources.get("layers"));d.appendChild(f);f=document.createElement("div");f.className="geAspectDlgList";
d.appendChild(f);this.pagesContainer=c;this.layersContainer=f;this.ui=a;c=document.createElement("div");c.style.marginTop="16px";c.style.textAlign="center";f=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=g&&g()});f.className="geBtn";a.editor.cancelFirst&&c.appendChild(f);var k=mxUtils.button(mxResources.get("ok"),mxUtils.bind(this,function(){a.hideDialog();b({pageId:this.selectedPage,layerIds:Object.keys(this.selectedLayers)})}));c.appendChild(k);k.className="geBtn gePrimaryBtn";
a.editor.cancelFirst||c.appendChild(f);k.setAttribute("disabled","disabled");this.okBtn=k;d.appendChild(c);this.container=d}AspectDialog.prototype.init=function(){this.ui.getFileData(!0);for(var a=0;a<this.ui.pages.length;a++){var d=this.ui.updatePageRoot(this.ui.pages[a]);this.createPageItem(d.getId(),d.getName(),d.node,d.root)}};
@@ -8935,7 +8936,7 @@ Editor.MathJaxRender(this.graph.container)}))};var c=document.getElementsByTagNa
[];a.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\[\S\s][^"\\]*)*)"|([^,'"\s\\]*(?:\s+[^,'"\s\\]+)*))\s*(?:,|$)/g,function(a,e,c,d){void 0!==e?b.push(e.replace(/\\'/g,"'")):void 0!==c?b.push(c.replace(/\\"/g,'"')):void 0!==d&&b.push(d);return""});/,\s*$/.test(a)&&b.push("");return b};Editor.prototype.isCorsEnabledForUrl=function(a){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)return!0;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?:\/\/[^\/]*\.blob.core.windows.net\//.test(a)||/^https?:\/\/[^\/]*\.diagrams\.new\/proxy/.test(a)||/^https?:\/\/[^\/]*\.draw\.io\/proxy/.test(a)||/^https?:\/\/[^\/]*\.github\.io\//.test(a)};Editor.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var b=
a.convert,e=this;a.convert=function(c){if(null!=c){var d="http://"==c.substring(0,7)||"https://"==c.substring(0,8);d&&!navigator.onLine?c=EditorUi.prototype.svgBrokenImage.src:!d||c.substring(0,a.baseUrl.length)==a.baseUrl||EditorUi.prototype.crossOriginImages&&e.isCorsEnabledForUrl(c)?"chrome-extension://"==c.substring(0,19)||mxClient.IS_CHROMEAPP||(c=b.apply(this,arguments)):c=PROXY_URL+"?url="+encodeURIComponent(c)}return c};return a};Editor.prototype.createSvgDataUri=function(a){return"data:image/svg+xml;base64,"+
-btoa(unescape(encodeURIComponent(a)))};Editor.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(EditorUi.prototype.svgBrokenImage.src)});else{var e=new Image;EditorUi.prototype.crossOriginImages&&(e.crossOrigin="anonymous");e.onload=function(){var a=document.createElement("canvas"),c=a.getContext("2d");a.height=e.height;a.width=e.width;c.drawImage(e,0,0);try{b(a.toDataURL())}catch(F){b(EditorUi.prototype.svgBrokenImage.src)}};
+btoa(unescape(encodeURIComponent(a)))};Editor.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(EditorUi.prototype.svgBrokenImage.src)});else{var e=new Image;EditorUi.prototype.crossOriginImages&&(e.crossOrigin="anonymous");e.onload=function(){var a=document.createElement("canvas"),c=a.getContext("2d");a.height=e.height;a.width=e.width;c.drawImage(e,0,0);try{b(a.toDataURL())}catch(E){b(EditorUi.prototype.svgBrokenImage.src)}};
e.onerror=function(){b(EditorUi.prototype.svgBrokenImage.src)};e.src=a}};Editor.prototype.convertImages=function(a,b,e,c){null==c&&(c=this.createImageUrlConverter());var d=0,m=e||{};e=mxUtils.bind(this,function(e,f){for(var p=a.getElementsByTagName(e),g=0;g<p.length;g++)mxUtils.bind(this,function(e){var p=c.convert(e.getAttribute(f));if(null!=p&&"data:"!=p.substring(0,5)){var g=m[p];null==g?(d++,this.convertImageToDataUri(p,function(c){null!=c&&(m[p]=c,e.setAttribute(f,c));d--;0==d&&b(a)})):e.setAttribute(f,
g)}else null!=p&&e.setAttribute(f,p)})(p[g])});e("image","xlink:href");e("img","src");0==d&&b(a)};Editor.prototype.base64Encode=function(a){for(var b="",e=0,c=a.length,d,m,f;e<c;){d=a.charCodeAt(e++)&255;if(e==c){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((d&3)<<4);b+="==";break}m=a.charCodeAt(e++);if(e==c){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>
2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((d&3)<<4|(m&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((m&15)<<2);b+="=";break}f=a.charCodeAt(e++);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((d&3)<<4|(m&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((m&15)<<2|(f&192)>>6);
@@ -8945,16 +8946,16 @@ function(a){return a.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"
k))));mxUtils.bind(this,function(a){if(null==d[a]){d[a]=a;c++;var b="application/x-font-ttf";if("svg"==g||/(\.svg)($|\?)/i.test(a))b="image/svg+xml";else if("otf"==g||"embedded-opentype"==g||/(\.otf)($|\?)/i.test(a))b="application/x-font-opentype";else if("woff"==g||/(\.woff)($|\?)/i.test(a))b="application/font-woff";else if("woff2"==g||/(\.woff2)($|\?)/i.test(a))b="application/font-woff2";else if("eot"==g||/(\.eot)($|\?)/i.test(a))b="application/vnd.ms-fontobject";else if("sfnt"==g||/(\.sfnt)($|\?)/i.test(a))b=
"application/font-sfnt";var e=a;/^https?:\/\//.test(e)&&!this.isCorsEnabledForUrl(e)&&(e=PROXY_URL+"?url="+encodeURIComponent(a));this.loadUrl(e,mxUtils.bind(this,function(b){d[a]=b;c--;m()}),mxUtils.bind(this,function(a){c--;m()}),!0,null,"data:"+b+";charset=utf-8;base64,")}})(b(e[f].substring(0,p)),g)}}else a()};Editor.prototype.addMathCss=function(a){a=a.getElementsByTagName("defs");if(null!=a&&0<a.length)for(var b=document.getElementsByTagName("style"),e=0;e<b.length;e++)0<mxUtils.getTextContent(b[e]).indexOf("MathJax")&&
a[0].appendChild(b[e].cloneNode(!0))};Editor.prototype.addFontCss=function(a,b){b=null!=b?b:this.fontCss;if(null!=b){var e=a.getElementsByTagName("defs"),c=a.ownerDocument;0==e.length?(e=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"defs"):c.createElement("defs"),null!=a.firstChild?a.insertBefore(e,a.firstChild):a.appendChild(e)):e=e[0];c=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"style"):c.createElement("style");c.setAttribute("type","text/css");mxUtils.setTextContent(c,
-b);e.appendChild(c)}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport&&(!this.graph.mathEnabled||!mxClient.IS_SF&&!((mxClient.IS_GC||mxClient.IS_EDGE)&&!mxClient.IS_MAC))};Editor.prototype.exportToCanvas=function(a,b,e,c,d,m,f,p,g,k,q,t,v,A){m=null!=m?m:!0;t=null!=t?t:this.graph;v=null!=v?v:0;var x=g?null:t.background;x==mxConstants.NONE&&(x=null);null==x&&(x=c);null==x&&0==g&&(x=this.graph.defaultPageBackgroundColor);this.convertImages(t.getSvg(x,
-null,null,A,null,null!=f?f:!0,null,null,null,k),mxUtils.bind(this,function(e){var c=new Image;c.onload=mxUtils.bind(this,function(){try{var f=document.createElement("canvas"),g=parseInt(e.getAttribute("width")),k=parseInt(e.getAttribute("height"));p=null!=p?p:1;null!=b&&(p=m?Math.min(1,Math.min(3*b/(4*k),b/g)):b/g);g=Math.ceil(p*g)+2*v;k=Math.ceil(p*k)+2*v;f.setAttribute("width",g);f.setAttribute("height",k);var q=f.getContext("2d");null!=x&&(q.beginPath(),q.rect(0,0,g,k),q.fillStyle=x,q.fill());
-q.scale(p,p);mxClient.IS_SF?window.setTimeout(function(){q.drawImage(c,v/p,v/p);a(f)},0):(q.drawImage(c,v/p,v/p),a(f))}catch(da){null!=d&&d(da)}});c.onerror=function(a){null!=d&&d(a)};try{k&&this.graph.addSvgShadow(e);var f=mxUtils.bind(this,function(){if(null!=this.resolvedFontCss){var a=document.createElement("style");a.setAttribute("type","text/css");a.innerHTML=this.resolvedFontCss;e.getElementsByTagName("defs")[0].appendChild(a)}t.mathEnabled&&this.addMathCss(e);c.src=this.createSvgDataUri(mxUtils.getXml(e))});
-this.loadFonts(f)}catch(aa){null!=d&&d(aa)}}),e,q)};Editor.prototype.writeGraphModelToPng=function(a,b,e,c,d){function m(a,b){var e=g;g+=b;return a.substring(e,g)}function f(a){a=m(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function p(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 g=0;if(m(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,
+b);e.appendChild(c)}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport&&(!this.graph.mathEnabled||!mxClient.IS_SF&&!((mxClient.IS_GC||mxClient.IS_EDGE)&&!mxClient.IS_MAC))};Editor.prototype.exportToCanvas=function(a,b,e,c,d,m,f,p,g,k,u,v,q,z){m=null!=m?m:!0;v=null!=v?v:this.graph;q=null!=q?q:0;var l=g?null:v.background;l==mxConstants.NONE&&(l=null);null==l&&(l=c);null==l&&0==g&&(l=this.graph.defaultPageBackgroundColor);this.convertImages(v.getSvg(l,
+null,null,z,null,null!=f?f:!0,null,null,null,k),mxUtils.bind(this,function(e){var c=new Image;c.onload=mxUtils.bind(this,function(){try{var f=document.createElement("canvas"),g=parseInt(e.getAttribute("width")),k=parseInt(e.getAttribute("height"));p=null!=p?p:1;null!=b&&(p=m?Math.min(1,Math.min(3*b/(4*k),b/g)):b/g);g=Math.ceil(p*g)+2*q;k=Math.ceil(p*k)+2*q;f.setAttribute("width",g);f.setAttribute("height",k);var u=f.getContext("2d");null!=l&&(u.beginPath(),u.rect(0,0,g,k),u.fillStyle=l,u.fill());
+u.scale(p,p);mxClient.IS_SF?window.setTimeout(function(){u.drawImage(c,q/p,q/p);a(f)},0):(u.drawImage(c,q/p,q/p),a(f))}catch(da){null!=d&&d(da)}});c.onerror=function(a){null!=d&&d(a)};try{k&&this.graph.addSvgShadow(e);var f=mxUtils.bind(this,function(){if(null!=this.resolvedFontCss){var a=document.createElement("style");a.setAttribute("type","text/css");a.innerHTML=this.resolvedFontCss;e.getElementsByTagName("defs")[0].appendChild(a)}v.mathEnabled&&this.addMathCss(e);c.src=this.createSvgDataUri(mxUtils.getXml(e))});
+this.loadFonts(f)}catch(aa){null!=d&&d(aa)}}),e,u)};Editor.prototype.writeGraphModelToPng=function(a,b,e,c,d){function m(a,b){var e=g;g+=b;return a.substring(e,g)}function f(a){a=m(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function p(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 g=0;if(m(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,
26,10))null!=d&&d();else if(m(a,4),"IHDR"!=m(a,4))null!=d&&d();else{m(a,17);d=a.substring(0,g);do{var k=f(a);if("IDAT"==m(a,4)){d=a.substring(0,g-8);e=e+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+c;c=4294967295;c=EditorUi.prototype.updateCRC(c,b,0,4);c=EditorUi.prototype.updateCRC(c,e,0,e.length);d+=p(e.length)+b+e+p(c^4294967295);d+=a.substring(g-8,a.length);break}d+=a.substring(g-8,g-4+k);m(a,k);m(a,4)}while(k);return"data:image/png;base64,"+(window.btoa?btoa(d):Base64.encode(d,
!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://desk.draw.io/support/solutions/articles/16000091426";var g=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(a,b){g.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var f=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){f.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=
function(a,b){var e=null;null!=a.editor.graph.getModel().getParent(b)?e=b.getId():null!=a.currentPage&&(e=a.currentPage.getId());return e});if(null!=window.StyleFormatPanel){var k=Format.prototype.init;Format.prototype.init=function(){k.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var l=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?l.apply(this,arguments):
this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var a=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=a&&a.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(a){return!1};var n=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(a){a=n.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var b=this.editorUi,e=b.editor.graph,c=this.createOption(mxResources.get("shadow"),
-function(){return e.shadowVisible},function(a){var c=new ChangePageSetup(b);c.ignoreColor=!0;c.ignoreImage=!0;c.shadowVisible=a;e.model.execute(c)},{install:function(a){this.listener=function(){a(e.shadowVisible)};b.addListener("shadowVisibleChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}});Editor.shadowOptionEnabled||(c.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(c,60));a.appendChild(c)}return a};var u=DiagramFormatPanel.prototype.addOptions;
-DiagramFormatPanel.prototype.addOptions=function(a){a=u.apply(this,arguments);var b=this.editorUi,e=b.editor.graph;if(e.isEnabled()){var c=b.getCurrentFile();if(null!=c&&c.isAutosaveOptional()){var d=this.createOption(mxResources.get("autosave"),function(){return b.editor.autosave},function(a){b.editor.setAutosave(a);b.editor.autosave&&c.isModified()&&c.fileChanged()},{install:function(a){this.listener=function(){a(b.editor.autosave)};b.editor.addListener("autosaveChanged",this.listener)},destroy:function(){b.editor.removeListener(this.listener)}});
+function(){return e.shadowVisible},function(a){var c=new ChangePageSetup(b);c.ignoreColor=!0;c.ignoreImage=!0;c.shadowVisible=a;e.model.execute(c)},{install:function(a){this.listener=function(){a(e.shadowVisible)};b.addListener("shadowVisibleChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}});Editor.shadowOptionEnabled||(c.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(c,60));a.appendChild(c)}return a};var t=DiagramFormatPanel.prototype.addOptions;
+DiagramFormatPanel.prototype.addOptions=function(a){a=t.apply(this,arguments);var b=this.editorUi,e=b.editor.graph;if(e.isEnabled()){var c=b.getCurrentFile();if(null!=c&&c.isAutosaveOptional()){var d=this.createOption(mxResources.get("autosave"),function(){return b.editor.autosave},function(a){b.editor.setAutosave(a);b.editor.autosave&&c.isModified()&&c.fileChanged()},{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()&&e.isEnabled()&&"undefined"!==typeof MathJax){d=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return e.mathEnabled},function(a){b.actions.get("mathematicalTypesetting").funct()},{install:function(a){this.listener=function(){a(e.mathEnabled)};b.addListener("mathEnabledChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}});d.style.paddingTop="5px";a.appendChild(d);var m=b.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000032875");
m.style.position="relative";m.style.marginLeft="6px";m.style.top="2px";d.appendChild(m)}return a};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.link.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.flexArrow.prototype.customProperties=
[{name:"width",dispName:"Width",type:"float",min:0,defVal:10},{name:"startWidth",dispName:"Start Width",type:"float",min:0,defVal:20},{name:"endWidth",dispName:"End Width",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.process.prototype.customProperties=[{name:"size",dispName:"Indent",type:"float",min:0,max:.5,defVal:.1}];mxCellRenderer.defaultShapes.rhombus.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,max:50,defVal:mxConstants.LINE_ARCSIZE},{name:"double",
@@ -8978,24 +8979,24 @@ font:"#ffffff"},{fill:"#aa00ff",stroke:"#7700CC",font:"#ffffff"},{fill:"#d80073"
{fill:"#a0522d",stroke:"#6D1F00",font:"#ffffff"}],[{fill:"",stroke:""},{fill:mxConstants.NONE,stroke:""},{fill:"#fad7ac",stroke:"#b46504"},{fill:"#fad9d5",stroke:"#ae4132"},{fill:"#b0e3e6",stroke:"#0e8088"},{fill:"#b1ddf0",stroke:"#10739e"},{fill:"#d0cee2",stroke:"#56517e"},{fill:"#bac8d3",stroke:"#23445d"}],[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",
stroke:"#d79b00",gradient:"#ffa500"},{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[{fill:"",stroke:""},{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=
null;StyleFormatPanel.prototype.findCommonProperties=function(a,b,e){if(null!=b){var c=function(a){if(null!=a)if(e)for(var c=0;c<a.length;c++)b[a[c].name]=a[c];else for(var d in b){for(var m=!1,c=0;c<a.length;c++)if(a[c].name==d&&a[c].type==b[d].type){m=!0;break}m||delete b[d]}},d=this.editorUi.editor.graph.view.getState(a);null!=d&&null!=d.shape&&(d.shape.commonCustomPropAdded||(d.shape.commonCustomPropAdded=!0,d.shape.customProperties=d.shape.customProperties||[],d.cell.vertex?Array.prototype.push.apply(d.shape.customProperties,
-Editor.commonVertexProperties):Array.prototype.push.apply(d.shape.customProperties,Editor.commonEdgeProperties)),c(d.shape.customProperties));a=a.getAttribute("customProperties");if(null!=a)try{c(JSON.parse(a))}catch(F){}}};var e=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var a=this.format.createSelectionState();"image"==a.style.shape||a.containsLabel||this.container.appendChild(this.addStyles(this.createPanel()));e.apply(this,arguments);if(Editor.enableCustomProperties){for(var b=
+Editor.commonVertexProperties):Array.prototype.push.apply(d.shape.customProperties,Editor.commonEdgeProperties)),c(d.shape.customProperties));a=a.getAttribute("customProperties");if(null!=a)try{c(JSON.parse(a))}catch(E){}}};var e=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var a=this.format.createSelectionState();"image"==a.style.shape||a.containsLabel||this.container.appendChild(this.addStyles(this.createPanel()));e.apply(this,arguments);if(Editor.enableCustomProperties){for(var b=
{},c=a.vertices,d=a.edges,m=0;m<c.length;m++)this.findCommonProperties(c[m],b,0==m);for(m=0;m<d.length;m++)this.findCommonProperties(d[m],b,0==c.length&&0==m);null!=Object.getOwnPropertyNames&&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,e){function c(a,b,e,c){t.getModel().beginUpdate();try{var d=[],m=[];if(null!=e.index){for(var f=[],p=e.parentRow.nextSibling;p&&p.getAttribute("data-pName")==a;)f.push(p.getAttribute("data-pValue")),p=p.nextSibling;e.index<f.length?null!=c?f.splice(c,1):f[e.index]=b:f.push(b);null!=e.size&&f.length>e.size&&(f=f.slice(0,e.size));b=f.join(",");null!=e.countProperty&&
-(t.setCellStyles(e.countProperty,f.length,t.getSelectionCells()),d.push(e.countProperty),m.push(f.length))}t.setCellStyles(a,b,t.getSelectionCells());d.push(a);m.push(b);if(null!=e.dependentProps)for(a=0;a<e.dependentProps.length;a++){var g=e.dependentPropsDefVal[a],k=e.dependentPropsVals[a];if(k.length>b)k=k.slice(0,b);else for(var v=k.length;v<b;v++)k.push(g);k=k.join(",");t.setCellStyles(e.dependentProps[a],k,t.getSelectionCells());d.push(e.dependentProps[a]);m.push(k)}if("function"==typeof e.onChange)e.onChange(t,
-b);q.editorUi.fireEvent(new mxEventObject("styleChanged","keys",d,"values",m,"cells",t.getSelectionCells()))}finally{t.getModel().endUpdate()}}function d(b,e,c){var d=mxUtils.getOffset(a,!0),m=mxUtils.getOffset(b,!0);e.style.position="absolute";e.style.left=m.x-d.x+"px";e.style.top=m.y-d.y+"px";e.style.width=b.offsetWidth+"px";e.style.height=b.offsetHeight-(c?4:0)+"px";e.style.zIndex=5}function m(a,b,e){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(q,function(m){this.editorUi.pickColor(b,function(b){d.style.background="none"==b?"url('"+Dialog.prototype.noColorImage+"')":b;c(a,b,e)});mxEvent.consume(m)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(d);return btn}function f(a,b,e,d,m,f,p){null!=b&&(b=b.split(","),v.push({name:a,values:b,type:e,defVal:d,countProperty:m,
-parentRow:f,isDeletable:!0,flipBkg:p}));btn=mxUtils.button("+",mxUtils.bind(q,function(b){for(var g=f,q=0;null!=g.nextSibling;)if(g.nextSibling.getAttribute("data-pName")==a)g=g.nextSibling,q++;else break;var t={type:e,parentRow:f,index:q,isDeletable:!0,defVal:d,countProperty:m},q=k(a,"",t,0==q%2,p);c(a,d,t);g.parentNode.insertBefore(q,g.nextSibling);mxEvent.consume(b)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function p(a,b,e,c,d,m,f){if(0<d){var p=Array(d);
-b=null!=b?b.split(","):[];for(var g=0;g<d;g++)p[g]=null!=b[g]?b[g]:null!=c?c:"";v.push({name:a,values:p,type:e,defVal:c,parentRow:m,flipBkg:f,size:d})}return document.createElement("div")}function g(a,b,e){var d=document.createElement("input");d.type="checkbox";d.checked="1"==b;mxEvent.addListener(d,"change",function(){c(a,d.checked?"1":"0",e)});return d}function k(b,e,k,t,v){var A=k.dispName,x=k.type,l=document.createElement("tr");l.className="gePropRow"+(v?"Dark":"")+(t?"Alt":"")+" gePropNonHeaderRow";
-l.setAttribute("data-pName",b);l.setAttribute("data-pValue",e);t=!1;null!=k.index&&(l.setAttribute("data-index",k.index),A=(null!=A?A:"")+"["+k.index+"]",t=!0);var n=document.createElement("td");n.className="gePropRowCell";n.innerHTML=mxUtils.htmlEntities(mxResources.get(A,null,A));t&&(n.style.textAlign="right");l.appendChild(n);n=document.createElement("td");n.className="gePropRowCell";if("color"==x)n.appendChild(m(b,e,k));else if("bool"==x||"boolean"==x)n.appendChild(g(b,e,k));else if("enum"==x){var y=
-k.enumList;for(v=0;v<y.length;v++)if(A=y[v],A.val==e){n.innerHTML=mxUtils.htmlEntities(mxResources.get(A.dispName,null,A.dispName));break}mxEvent.addListener(n,"click",mxUtils.bind(q,function(){var m=document.createElement("select");d(n,m);for(var f=0;f<y.length;f++){var p=y[f],g=document.createElement("option");g.value=mxUtils.htmlEntities(p.val);g.innerHTML=mxUtils.htmlEntities(mxResources.get(p.dispName,null,p.dispName));m.appendChild(g)}m.value=e;a.appendChild(m);mxEvent.addListener(m,"change",
-function(){var a=mxUtils.htmlEntities(m.value);c(b,a,k)});m.focus();mxEvent.addListener(m,"blur",function(){a.removeChild(m)})}))}else"dynamicArr"==x?n.appendChild(f(b,e,k.subType,k.subDefVal,k.countProperty,l,v)):"staticArr"==x?n.appendChild(p(b,e,k.subType,k.subDefVal,k.size,l,v)):(n.innerHTML=e,mxEvent.addListener(n,"click",mxUtils.bind(q,function(){function m(){var a=f.value,a=0==a.length&&"string"!=x?0:a;k.allowAuto&&(null!=a.trim&&"auto"==a.trim().toLowerCase()?(a="auto",x="string"):(a=parseFloat(a),
-a=isNaN(a)?0:a));null!=k.min&&a<k.min?a=k.min:null!=k.max&&a>k.max&&(a=k.max);a=mxUtils.htmlEntities(("int"==x?parseInt(a):a)+"");c(b,a,k)}var f=document.createElement("input");d(n,f,!0);f.value=e;f.className="gePropEditor";"int"!=x&&"float"!=x||k.allowAuto||(f.type="number",f.step="int"==x?"1":"any",null!=k.min&&(f.min=parseFloat(k.min)),null!=k.max&&(f.max=parseFloat(k.max)));a.appendChild(f);mxEvent.addListener(f,"keypress",function(a){13==a.keyCode&&m()});f.focus();mxEvent.addListener(f,"blur",
-function(){m()})})));k.isDeletable&&(v=mxUtils.button("-",mxUtils.bind(q,function(a){c(b,"",k,k.index);mxEvent.consume(a)})),v.style.height="16px",v.style.width="25px",v.style["float"]="right",v.className="geColorBtn",n.appendChild(v));l.appendChild(n);return l}var q=this,t=this.editorUi.editor.graph,v=[];a.style.position="relative";a.style.padding="0";var A=document.createElement("table");A.style.whiteSpace="nowrap";A.style.width="100%";var x=document.createElement("tr");x.className="gePropHeader";
-var l=document.createElement("th");l.className="gePropHeaderCell";var n=document.createElement("img");n.src=Sidebar.prototype.expandedImage;l.appendChild(n);mxUtils.write(l,mxResources.get("property"));x.style.cursor="pointer";var y=function(){var b=A.querySelectorAll(".gePropNonHeaderRow"),e;if(q.editorUi.propertiesCollapsed){n.src=Sidebar.prototype.collapsedImage;e="none";for(var c=a.childNodes.length-1;0<=c;c--)try{var d=a.childNodes[c],m=d.nodeName.toUpperCase();"INPUT"!=m&&"SELECT"!=m||a.removeChild(d)}catch(ka){}}else n.src=
-Sidebar.prototype.expandedImage,e="";for(c=0;c<b.length;c++)b[c].style.display=e};mxEvent.addListener(x,"click",function(){q.editorUi.propertiesCollapsed=!q.editorUi.propertiesCollapsed;y()});x.appendChild(l);l=document.createElement("th");l.className="gePropHeaderCell";l.innerHTML=mxResources.get("value");x.appendChild(l);A.appendChild(x);var z=!1,D=!1,B;for(B in b)if(x=b[B],"function"!=typeof x.isVisible||x.isVisible(e,this)){var C=null!=e.style[B]?mxUtils.htmlEntities(e.style[B]+""):null!=x.getDefaultValue?
-x.getDefaultValue(e,this):x.defVal;if("separator"==x.type)D=!D;else{if("staticArr"==x.type)x.size=parseInt(e.style[x.sizeProperty]||b[x.sizeProperty].defVal)||0;else if(null!=x.dependentProps){for(var E=x.dependentProps,u=[],H=[],l=0;l<E.length;l++){var G=e.style[E[l]];H.push(b[E[l]].subDefVal);u.push(null!=G?G.split(","):[])}x.dependentPropsDefVal=H;x.dependentPropsVals=u}A.appendChild(k(B,C,x,z,D));z=!z}}for(l=0;l<v.length;l++)for(x=v[l],b=x.parentRow,e=0;e<x.values.length;e++)B=k(x.name,x.values[e],
-{type:x.type,parentRow:x.parentRow,isDeletable:x.isDeletable,index:e,defVal:x.defVal,countProperty:x.countProperty,size:x.size},0==e%2,x.flipBkg),b.parentNode.insertBefore(B,b.nextSibling),b=B;a.appendChild(A);y();return a};StyleFormatPanel.prototype.addStyles=function(a){function b(a){function b(a){var b=mxUtils.button("",function(b){c.getModel().beginUpdate();try{var e=c.getSelectionCells();for(b=0;b<e.length;b++){for(var d=c.getModel().getStyle(e[b]),f=0;f<m.length;f++)d=mxUtils.removeStylename(d,
+mxUtils.br(a);return m.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=function(a,b,e){function c(a,b,e,c){v.getModel().beginUpdate();try{var d=[],m=[];if(null!=e.index){for(var f=[],p=e.parentRow.nextSibling;p&&p.getAttribute("data-pName")==a;)f.push(p.getAttribute("data-pValue")),p=p.nextSibling;e.index<f.length?null!=c?f.splice(c,1):f[e.index]=b:f.push(b);null!=e.size&&f.length>e.size&&(f=f.slice(0,e.size));b=f.join(",");null!=e.countProperty&&
+(v.setCellStyles(e.countProperty,f.length,v.getSelectionCells()),d.push(e.countProperty),m.push(f.length))}v.setCellStyles(a,b,v.getSelectionCells());d.push(a);m.push(b);if(null!=e.dependentProps)for(a=0;a<e.dependentProps.length;a++){var g=e.dependentPropsDefVal[a],k=e.dependentPropsVals[a];if(k.length>b)k=k.slice(0,b);else for(var q=k.length;q<b;q++)k.push(g);k=k.join(",");v.setCellStyles(e.dependentProps[a],k,v.getSelectionCells());d.push(e.dependentProps[a]);m.push(k)}if("function"==typeof e.onChange)e.onChange(v,
+b);u.editorUi.fireEvent(new mxEventObject("styleChanged","keys",d,"values",m,"cells",v.getSelectionCells()))}finally{v.getModel().endUpdate()}}function d(b,e,c){var d=mxUtils.getOffset(a,!0),m=mxUtils.getOffset(b,!0);e.style.position="absolute";e.style.left=m.x-d.x+"px";e.style.top=m.y-d.y+"px";e.style.width=b.offsetWidth+"px";e.style.height=b.offsetHeight-(c?4:0)+"px";e.style.zIndex=5}function m(a,b,e){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(u,function(m){this.editorUi.pickColor(b,function(b){d.style.background="none"==b?"url('"+Dialog.prototype.noColorImage+"')":b;c(a,b,e)});mxEvent.consume(m)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(d);return btn}function f(a,b,e,d,m,f,p){null!=b&&(b=b.split(","),q.push({name:a,values:b,type:e,defVal:d,countProperty:m,
+parentRow:f,isDeletable:!0,flipBkg:p}));btn=mxUtils.button("+",mxUtils.bind(u,function(b){for(var g=f,u=0;null!=g.nextSibling;)if(g.nextSibling.getAttribute("data-pName")==a)g=g.nextSibling,u++;else break;var v={type:e,parentRow:f,index:u,isDeletable:!0,defVal:d,countProperty:m},u=k(a,"",v,0==u%2,p);c(a,d,v);g.parentNode.insertBefore(u,g.nextSibling);mxEvent.consume(b)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function p(a,b,e,c,d,m,f){if(0<d){var p=Array(d);
+b=null!=b?b.split(","):[];for(var g=0;g<d;g++)p[g]=null!=b[g]?b[g]:null!=c?c:"";q.push({name:a,values:p,type:e,defVal:c,parentRow:m,flipBkg:f,size:d})}return document.createElement("div")}function g(a,b,e){var d=document.createElement("input");d.type="checkbox";d.checked="1"==b;mxEvent.addListener(d,"change",function(){c(a,d.checked?"1":"0",e)});return d}function k(b,e,k,v,q){var z=k.dispName,l=k.type,A=document.createElement("tr");A.className="gePropRow"+(q?"Dark":"")+(v?"Alt":"")+" gePropNonHeaderRow";
+A.setAttribute("data-pName",b);A.setAttribute("data-pValue",e);v=!1;null!=k.index&&(A.setAttribute("data-index",k.index),z=(null!=z?z:"")+"["+k.index+"]",v=!0);var n=document.createElement("td");n.className="gePropRowCell";n.innerHTML=mxUtils.htmlEntities(mxResources.get(z,null,z));v&&(n.style.textAlign="right");A.appendChild(n);n=document.createElement("td");n.className="gePropRowCell";if("color"==l)n.appendChild(m(b,e,k));else if("bool"==l||"boolean"==l)n.appendChild(g(b,e,k));else if("enum"==l){var y=
+k.enumList;for(q=0;q<y.length;q++)if(z=y[q],z.val==e){n.innerHTML=mxUtils.htmlEntities(mxResources.get(z.dispName,null,z.dispName));break}mxEvent.addListener(n,"click",mxUtils.bind(u,function(){var m=document.createElement("select");d(n,m);for(var f=0;f<y.length;f++){var p=y[f],g=document.createElement("option");g.value=mxUtils.htmlEntities(p.val);g.innerHTML=mxUtils.htmlEntities(mxResources.get(p.dispName,null,p.dispName));m.appendChild(g)}m.value=e;a.appendChild(m);mxEvent.addListener(m,"change",
+function(){var a=mxUtils.htmlEntities(m.value);c(b,a,k)});m.focus();mxEvent.addListener(m,"blur",function(){a.removeChild(m)})}))}else"dynamicArr"==l?n.appendChild(f(b,e,k.subType,k.subDefVal,k.countProperty,A,q)):"staticArr"==l?n.appendChild(p(b,e,k.subType,k.subDefVal,k.size,A,q)):(n.innerHTML=e,mxEvent.addListener(n,"click",mxUtils.bind(u,function(){function m(){var a=f.value,a=0==a.length&&"string"!=l?0:a;k.allowAuto&&(null!=a.trim&&"auto"==a.trim().toLowerCase()?(a="auto",l="string"):(a=parseFloat(a),
+a=isNaN(a)?0:a));null!=k.min&&a<k.min?a=k.min:null!=k.max&&a>k.max&&(a=k.max);a=mxUtils.htmlEntities(("int"==l?parseInt(a):a)+"");c(b,a,k)}var f=document.createElement("input");d(n,f,!0);f.value=e;f.className="gePropEditor";"int"!=l&&"float"!=l||k.allowAuto||(f.type="number",f.step="int"==l?"1":"any",null!=k.min&&(f.min=parseFloat(k.min)),null!=k.max&&(f.max=parseFloat(k.max)));a.appendChild(f);mxEvent.addListener(f,"keypress",function(a){13==a.keyCode&&m()});f.focus();mxEvent.addListener(f,"blur",
+function(){m()})})));k.isDeletable&&(q=mxUtils.button("-",mxUtils.bind(u,function(a){c(b,"",k,k.index);mxEvent.consume(a)})),q.style.height="16px",q.style.width="25px",q.style["float"]="right",q.className="geColorBtn",n.appendChild(q));A.appendChild(n);return A}var u=this,v=this.editorUi.editor.graph,q=[];a.style.position="relative";a.style.padding="0";var z=document.createElement("table");z.style.whiteSpace="nowrap";z.style.width="100%";var l=document.createElement("tr");l.className="gePropHeader";
+var A=document.createElement("th");A.className="gePropHeaderCell";var n=document.createElement("img");n.src=Sidebar.prototype.expandedImage;A.appendChild(n);mxUtils.write(A,mxResources.get("property"));l.style.cursor="pointer";var y=function(){var b=z.querySelectorAll(".gePropNonHeaderRow"),e;if(u.editorUi.propertiesCollapsed){n.src=Sidebar.prototype.collapsedImage;e="none";for(var c=a.childNodes.length-1;0<=c;c--)try{var d=a.childNodes[c],m=d.nodeName.toUpperCase();"INPUT"!=m&&"SELECT"!=m||a.removeChild(d)}catch(ka){}}else n.src=
+Sidebar.prototype.expandedImage,e="";for(c=0;c<b.length;c++)b[c].style.display=e};mxEvent.addListener(l,"click",function(){u.editorUi.propertiesCollapsed=!u.editorUi.propertiesCollapsed;y()});l.appendChild(A);A=document.createElement("th");A.className="gePropHeaderCell";A.innerHTML=mxResources.get("value");l.appendChild(A);z.appendChild(l);var x=!1,D=!1,B;for(B in b)if(l=b[B],"function"!=typeof l.isVisible||l.isVisible(e,this)){var F=null!=e.style[B]?mxUtils.htmlEntities(e.style[B]+""):null!=l.getDefaultValue?
+l.getDefaultValue(e,this):l.defVal;if("separator"==l.type)D=!D;else{if("staticArr"==l.type)l.size=parseInt(e.style[l.sizeProperty]||b[l.sizeProperty].defVal)||0;else if(null!=l.dependentProps){for(var C=l.dependentProps,t=[],G=[],A=0;A<C.length;A++){var H=e.style[C[A]];G.push(b[C[A]].subDefVal);t.push(null!=H?H.split(","):[])}l.dependentPropsDefVal=G;l.dependentPropsVals=t}z.appendChild(k(B,F,l,x,D));x=!x}}for(A=0;A<q.length;A++)for(l=q[A],b=l.parentRow,e=0;e<l.values.length;e++)B=k(l.name,l.values[e],
+{type:l.type,parentRow:l.parentRow,isDeletable:l.isDeletable,index:e,defVal:l.defVal,countProperty:l.countProperty,size:l.size},0==e%2,l.flipBkg),b.parentNode.insertBefore(B,b.nextSibling),b=B;a.appendChild(z);y();return a};StyleFormatPanel.prototype.addStyles=function(a){function b(a){function b(a){var b=mxUtils.button("",function(b){c.getModel().beginUpdate();try{var e=c.getSelectionCells();for(b=0;b<e.length;b++){for(var d=c.getModel().getStyle(e[b]),f=0;f<m.length;f++)d=mxUtils.removeStylename(d,
m[f]);var p=c.getModel().isVertex(e[b])?c.defaultVertexStyle:c.defaultEdgeStyle;null!=a?(d=mxUtils.setStyle(d,mxConstants.STYLE_GRADIENTCOLOR,a.gradient||mxUtils.getValue(p,mxConstants.STYLE_GRADIENTCOLOR,null)),d=""==a.fill?mxUtils.setStyle(d,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(d,mxConstants.STYLE_FILLCOLOR,a.fill||mxUtils.getValue(p,mxConstants.STYLE_FILLCOLOR,null)),d=""==a.stroke?mxUtils.setStyle(d,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(d,mxConstants.STYLE_STROKECOLOR,
a.stroke||mxUtils.getValue(p,mxConstants.STYLE_STROKECOLOR,null)),c.getModel().isVertex(e[b])&&(d=mxUtils.setStyle(d,mxConstants.STYLE_FONTCOLOR,a.font||mxUtils.getValue(p,mxConstants.STYLE_FONTCOLOR,null)))):(d=mxUtils.setStyle(d,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(p,mxConstants.STYLE_FILLCOLOR,"#ffffff")),d=mxUtils.setStyle(d,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(p,mxConstants.STYLE_STROKECOLOR,"#000000")),d=mxUtils.setStyle(d,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(p,
mxConstants.STYLE_GRADIENTCOLOR,null)),c.getModel().isVertex(e[b])&&(d=mxUtils.setStyle(d,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(p,mxConstants.STYLE_FONTCOLOR,null))));c.getModel().setStyle(e[b],d)}}finally{c.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='"+
@@ -9009,24 +9010,24 @@ mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.editorUi.current
function(a){this.editorUi.actions.get("editShape").funct()})),b.setAttribute("title",mxResources.get("editShape")),b.style.marginBottom="2px",null==e?b.style.width="202px":(e.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==e?b.style.width="202px":
(e.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 p=Graph.prototype.init;Graph.prototype.init=function(){function a(a){b=a;try{if(mxClient.IS_QUIRKS||7==document.documentMode||8==document.documentMode)b=document.createEventObject(a),b.type=a.type,b.canBubble=a.canBubble,b.cancelable=a.cancelable,b.view=a.view,b.detail=a.detail,b.screenX=a.screenX,b.screenY=a.screenY,b.clientX=a.clientX,b.clientY=a.clientY,b.ctrlKey=a.ctrlKey,b.altKey=a.altKey,b.shiftKey=a.shiftKey,b.metaKey=a.metaKey,b.button=
-a.button,b.relatedTarget=a.relatedTarget}catch(F){}}p.apply(this,arguments);window.mxFreehand&&(this.freehand=new mxFreehand(this));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 e=this.getInsertPoint;this.getInsertPoint=function(){return null!=b?this.getPointForEvent(b):e.apply(this,arguments)};var c=this.layoutManager.getLayout;
+a.button,b.relatedTarget=a.relatedTarget}catch(E){}}p.apply(this,arguments);window.mxFreehand&&(this.freehand=new mxFreehand(this));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 e=this.getInsertPoint;this.getInsertPoint=function(){return null!=b?this.getPointForEvent(b):e.apply(this,arguments)};var c=this.layoutManager.getLayout;
this.layoutManager.getLayout=function(a){var b=this.graph.getCellStyle(a);if(null!=b){if("rack"==b.childLayout){var e=new mxStackLayout(this.graph,!1);e.gridSize=null!=b.rackUnitSize?parseFloat(b.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;e.fill=!0;e.marginLeft=b.marginLeft||0;e.marginRight=b.marginRight||0;e.marginTop=b.marginTop||0;e.marginBottom=b.marginBottom||0;e.allowGaps=b.allowGaps||0;e.resizeParent=!1;return e}if("undefined"!==typeof mxTableLayout&&"tableLayout"==
b.childLayout)return e=new mxTableLayout(this.graph),e.rows=b.tableRows||2,e.columns=b.tableColumns||2,e.colPercentages=b.colPercentages,e.rowPercentages=b.rowPercentages,e.equalColumns="1"==mxUtils.getValue(b,"equalColumns",e.colPercentages?"0":"1"),e.equalRows="1"==mxUtils.getValue(b,"equalRows",e.rowPercentages?"0":"1"),e.resizeParent="1"==mxUtils.getValue(b,"resizeParent","1"),e.border=b.tableBorder||e.border,e.marginLeft=b.marginLeft||0,e.marginRight=b.marginRight||0,e.marginTop=b.marginTop||
-0,e.marginBottom=b.marginBottom||0,e.autoAddCol="1"==mxUtils.getValue(b,"autoAddCol","0"),e.autoAddRow="1"==mxUtils.getValue(b,"autoAddRow",e.autoAddCol?"0":"1"),e.colWidths=b.colWidths||"100",e.rowHeights=b.rowHeights||"50",e}return c.apply(this,arguments)};this.updateGlobalUrlVariables()};var q=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return q.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=
-Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var a=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=a)for(var b in a)this.globalVars[b]=a[b]}catch(G){null!=window.console&&console.log("Error in vars URL parameter: "+G)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var t=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(a){var b=
-t.apply(this,arguments);null==b&&null!=this.globalVars&&(b=this.globalVars[a]);return b};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var a=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(a.ownerDocument)).decode(a)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var v=Graph.prototype.getSvg;Graph.prototype.getSvg=function(a,b,e,c,d,m,f,p,g,k,q){var t=null;null!=this.themes&&"darkTheme"==this.defaultThemeName&&
-(t=this.stylesheet,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var A=v.apply(this,arguments);if(q&&null!=this.extFonts&&0<this.extFonts.length){var x=A.ownerDocument,l=null!=x.createElementNS?x.createElementNS(mxConstants.NS_SVG,"style"):x.createElement("style");null!=x.setAttributeNS?l.setAttributeNS("type","text/css"):l.setAttribute("type","text/css");for(var n="",y="",z=0;z<this.extFonts.length;z++){var D=this.extFonts[z].name,C=this.extFonts[z].url;0==C.indexOf(Editor.GOOGLE_FONTS)?
-n+="@import url("+C+");\n":y+='@font-face {\nfont-family: "'+D+'";\nsrc: url("'+C+'");\n}\n'}l.appendChild(x.createTextNode(n+y));A.getElementsByTagName("defs")[0].appendChild(l)}null!=t&&(this.stylesheet=t,this.refresh());return A};var z=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=function(){var a=z.apply(this,arguments);if(this.mathEnabled){this.container.getBoundingClientRect();var b=a.drawText;a.drawText=function(a,e){if(null!=a.text&&null!=a.text.value&&a.text.checkBounds()&&
-(mxUtils.isNode(a.text.value)||a.text.dialect==mxConstants.DIALECT_STRICTHTML)){var c=a.text.getContentNode();if(null!=c){c=c.cloneNode(!0);if(c.getElementsByTagNameNS)for(var d=c.getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML","math");0<d.length;)d[0].parentNode.removeChild(d[0]);null!=c.innerHTML&&(d=a.text.value,a.text.value=c.innerHTML,b.apply(this,arguments),a.text.value=d)}}else b.apply(this,arguments)}}return a};var y=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=
-function(){y.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 C=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){C.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(a){if("data:action/json,"==
+0,e.marginBottom=b.marginBottom||0,e.autoAddCol="1"==mxUtils.getValue(b,"autoAddCol","0"),e.autoAddRow="1"==mxUtils.getValue(b,"autoAddRow",e.autoAddCol?"0":"1"),e.colWidths=b.colWidths||"100",e.rowHeights=b.rowHeights||"50",e}return c.apply(this,arguments)};this.updateGlobalUrlVariables()};var v=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return v.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=
+Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var a=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=a)for(var b in a)this.globalVars[b]=a[b]}catch(H){null!=window.console&&console.log("Error in vars URL parameter: "+H)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var q=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(a){var b=
+q.apply(this,arguments);null==b&&null!=this.globalVars&&(b=this.globalVars[a]);return b};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var a=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(a.ownerDocument)).decode(a)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var u=Graph.prototype.getSvg;Graph.prototype.getSvg=function(a,b,e,c,d,m,f,p,g,k,v){var q=null;null!=this.themes&&"darkTheme"==this.defaultThemeName&&
+(q=this.stylesheet,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var z=u.apply(this,arguments);if(v&&null!=this.extFonts&&0<this.extFonts.length){var l=z.ownerDocument,A=null!=l.createElementNS?l.createElementNS(mxConstants.NS_SVG,"style"):l.createElement("style");null!=l.setAttributeNS?A.setAttributeNS("type","text/css"):A.setAttribute("type","text/css");for(var n="",y="",x=0;x<this.extFonts.length;x++){var D=this.extFonts[x].name,B=this.extFonts[x].url;0==B.indexOf(Editor.GOOGLE_FONTS)?
+n+="@import url("+B+");\n":y+='@font-face {\nfont-family: "'+D+'";\nsrc: url("'+B+'");\n}\n'}A.appendChild(l.createTextNode(n+y));z.getElementsByTagName("defs")[0].appendChild(A)}null!=q&&(this.stylesheet=q,this.refresh());return z};var y=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=function(){var a=y.apply(this,arguments);if(this.mathEnabled){this.container.getBoundingClientRect();var b=a.drawText;a.drawText=function(a,e){if(null!=a.text&&null!=a.text.value&&a.text.checkBounds()&&
+(mxUtils.isNode(a.text.value)||a.text.dialect==mxConstants.DIALECT_STRICTHTML)){var c=a.text.getContentNode();if(null!=c){c=c.cloneNode(!0);if(c.getElementsByTagNameNS)for(var d=c.getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML","math");0<d.length;)d[0].parentNode.removeChild(d[0]);null!=c.innerHTML&&(d=a.text.value,a.text.value=c.innerHTML,b.apply(this,arguments),a.text.value=d)}}else b.apply(this,arguments)}}return a};var x=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=
+function(){x.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 B=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){B.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++){var e=a.actions[b];if(null!=e.open)if(this.isCustomLink(e.open)){if(!this.customLinkClicked(e.open))return}else this.openLink(e.open)}this.model.beginUpdate();try{for(b=0;b<a.actions.length;b++)e=a.actions[b],null!=e.toggle&&this.toggleCells(this.getCellsForAction(e.toggle,!0)),null!=e.show&&this.setCellsVisible(this.getCellsForAction(e.show,!0),!0),null!=e.hide&&this.setCellsVisible(this.getCellsForAction(e.hide,
!0),!1)}finally{this.model.endUpdate()}for(b=0;b<a.actions.length;b++){var e=a.actions[b],c=[];null!=e.select&&this.isEnabled()&&(c=this.getCellsForAction(e.select),this.setSelectionCells(c));null!=e.highlight&&(c=this.getCellsForAction(e.highlight),this.highlightCells(c,e.highlight.color,e.highlight.duration,e.highlight.opacity));null!=e.scroll&&(c=this.getCellsForAction(e.scroll));0<c.length&&this.scrollCellToVisible(c[0])}}};Graph.prototype.updateCustomLinksForCell=function(a,b){var e=this.getLinkForCell(b);
null!=e&&"data:action/json,"==e.substring(0,17)&&this.setLinkForCell(b,this.updateCustomLink(a,e));if(this.isHtmlLabel(b)){var c=document.createElement("div");c.innerHTML=this.getLabel(b);for(var d=c.getElementsByTagName("a"),m=!1,f=0;f<d.length;f++)e=d[f].getAttribute("href"),null!=e&&"data:action/json,"==e.substring(0,17)&&(d[f].setAttribute("href",this.updateCustomLink(a,e)),m=!0);m&&this.labelChanged(b,c.innerHTML)}};Graph.prototype.updateCustomLink=function(a,b){if("data:action/json,"==b.substring(0,
17))try{var e=JSON.parse(b.substring(17));null!=e.actions&&(this.updateCustomLinkActions(a,e.actions),b="data:action/json,"+JSON.stringify(e))}catch(J){}return b};Graph.prototype.updateCustomLinkActions=function(a,b){for(var e=0;e<b.length;e++){var c=b[e];this.updateCustomLinkAction(a,c.toggle);this.updateCustomLinkAction(a,c.show);this.updateCustomLinkAction(a,c.hide);this.updateCustomLinkAction(a,c.select);this.updateCustomLinkAction(a,c.highlight);this.updateCustomLinkAction(a,c.scroll)}};Graph.prototype.updateCustomLinkAction=
function(a,b){if(null!=b&&null!=b.cells){for(var e=[],c=0;c<b.cells.length;c++)if("*"==b.cells[c])e.push(b.cells[c]);else{var d=a[b.cells[c]];null!=d?""!=d&&e.push(d):e.push(b.cells[c])}b.cells=e}};Graph.prototype.getCellsForAction=function(a,b){return this.getCellsById(a.cells).concat(this.getCellsForTags(a.tags,null,null,b))};Graph.prototype.getCellsById=function(a){var b=[];if(null!=a)for(var e=0;e<a.length;e++)if("*"==a[e])var c=this.getDefaultParent(),b=b.concat(this.model.filterDescendants(function(a){return a!=
c},c));else{var d=this.model.getCell(a[e]);null!=d&&b.push(d)}return b};Graph.prototype.getCellsForTags=function(a,b,e,c){var d=[];if(null!=a){b=null!=b?b:this.model.getDescendants(this.model.getRoot());e=null!=e?e:"tags";for(var m=0,f={},p=0;p<a.length;p++)0<a[p].length&&(f[a[p].toLowerCase()]=!0,m++);for(p=0;p<b.length;p++)if(c&&this.model.getParent(b[p])==this.model.root||this.model.isVertex(b[p])||this.model.isEdge(b[p])){var g=null!=b[p].value&&"object"==typeof b[p].value?mxUtils.trim(b[p].value.getAttribute(e)||
-""):"",k=!1;if(0<g.length){if(g=g.toLowerCase().split(" "),g.length>=a.length){for(var q=k=0;q<g.length&&k<m;q++)null!=f[g[q]]&&k++;k=k==m}}else k=0==a.length;k&&d.push(b[p])}}return d};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 e=0;e<a.length;e++)this.model.setVisible(a[e],b)}finally{this.model.endUpdate()}};
+""):"",k=!1;if(0<g.length){if(g=g.toLowerCase().split(" "),g.length>=a.length){for(var u=k=0;u<g.length&&k<m;u++)null!=f[g[u]]&&k++;k=k==m}}else k=0==a.length;k&&d.push(b[p])}}return d};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 e=0;e<a.length;e++)this.model.setVisible(a[e],b)}finally{this.model.endUpdate()}};
Graph.prototype.highlightCells=function(a,b,e,c){for(var d=0;d<a.length;d++)this.highlightCell(a[d],b,e,c)};Graph.prototype.highlightCell=function(a,b,e,c){b=null!=b?b:mxConstants.DEFAULT_VALID_COLOR;e=null!=e?e:1E3;a=this.view.getState(a);if(null!=a){var d=Math.max(5,mxUtils.getValue(a.style,mxConstants.STYLE_STROKEWIDTH,1)+4),m=new mxCellHighlight(this,b,d,!1);null!=c&&(m.opacity=c);m.highlight(a);window.setTimeout(function(){null!=m.shape&&(mxUtils.setPrefixedStyle(m.shape.node.style,"transition",
"all 1200ms ease-in-out"),m.shape.node.style.opacity=0);window.setTimeout(function(){m.destroy()},1200)},e)}};Graph.prototype.addSvgShadow=function(a,b,e){e=null!=e?e:!1;var c=a.ownerDocument,d=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"filter"):c.createElement("filter");d.setAttribute("id",this.shadowId);var m=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):c.createElement("feGaussianBlur");m.setAttribute("in","SourceAlpha");m.setAttribute("stdDeviation",
this.svgShadowBlur);m.setAttribute("result","blur");d.appendChild(m);m=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"feOffset"):c.createElement("feOffset");m.setAttribute("in","blur");m.setAttribute("dx",this.svgShadowSize);m.setAttribute("dy",this.svgShadowSize);m.setAttribute("result","offsetBlur");d.appendChild(m);m=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"feFlood"):c.createElement("feFlood");m.setAttribute("flood-color",this.svgShadowColor);m.setAttribute("flood-opacity",
@@ -9042,67 +9043,67 @@ STENCIL_PATH+"/flowchart.xml"];mxStencilRegistry.libraries.ios=[SHAPES_PATH+"/mo
[SHAPES_PATH+"/mockup/mxMockupText.js"];mxStencilRegistry.libraries.floorplan=[SHAPES_PATH+"/mxFloorplan.js",STENCIL_PATH+"/floorplan.xml"];mxStencilRegistry.libraries.bootstrap=[SHAPES_PATH+"/mxBootstrap.js",SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.xml"];mxStencilRegistry.libraries.gcp2=[SHAPES_PATH+"/mxGCP2.js",STENCIL_PATH+"/gcp2.xml"];mxStencilRegistry.libraries.ibm=[SHAPES_PATH+"/mxIBM.js",STENCIL_PATH+
"/ibm.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=
[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.aws4=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.aws4b=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.veeam=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam.xml"];mxStencilRegistry.libraries.veeam2=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam2.xml"];mxStencilRegistry.libraries.pid2inst=
-[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(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 x=mxMarker.createMarker;mxMarker.createMarker=
-function(a,b,e,c,d,m,f,p,g,k){if(null!=e&&null==mxMarker.markers[e]){var q=this.getPackageForType(e);null!=q&&mxStencilRegistry.getStencil(q)}return x.apply(this,arguments)};PrintDialog.prototype.create=function(a,b){function e(){A.value=Math.max(1,Math.min(p,Math.max(parseInt(A.value),parseInt(v.value))));v.value=Math.max(1,Math.min(p,Math.min(parseInt(A.value),parseInt(v.value))))}function c(b){function e(b,e,m){var f=b.useCssTransforms,p=b.currentTranslate,g=b.currentScale,k=b.view.translate,q=
-b.view.scale;b.useCssTransforms&&(b.useCssTransforms=!1,b.currentTranslate=new mxPoint(0,0),b.currentScale=1,b.view.translate=new mxPoint(0,0),b.view.scale=1);var t=b.getGraphBounds(),v=0,A=0,x=ma.get(),l=1/b.pageScale,z=y.checked;if(z)var l=parseInt(S.value),D=parseInt(ha.value),l=Math.min(x.height*D/(t.height/b.view.scale),x.width*l/(t.width/b.view.scale));else l=parseInt(n.value)/(100*b.pageScale),isNaN(l)&&(c=1/b.pageScale,n.value="100 %");x=mxRectangle.fromRectangle(x);x.width=Math.ceil(x.width*
-c);x.height=Math.ceil(x.height*c);l*=c;!z&&b.pageVisible?(t=b.getPageLayout(),v-=t.x*x.width,A-=t.y*x.height):z=!0;if(null==e){e=PrintDialog.createPrintPreview(b,l,x,0,v,A,z);e.pageSelector=!1;e.mathEnabled=!1;v=a.getCurrentFile();null!=v&&(e.title=v.getTitle());var C=e.writeHead;e.writeHead=function(e){C.apply(this,arguments);null!=a.editor.fontCss&&(e.writeln('<style type="text/css">'),e.writeln(a.editor.fontCss),e.writeln("</style>"));if(null!=b.extFonts)for(var c=0;c<b.extFonts.length;c++){var d=
-b.extFonts[c].name,m=b.extFonts[c].url;0==m.indexOf(Editor.GOOGLE_FONTS)?e.writeln('<link rel="stylesheet" href="'+m+'" charset="UTF-8" type="text/css">'):(e.writeln('<style type="text/css">'),e.writeln('@font-face {\n\tfont-family: "'+d+'";\n\tsrc: url("'+m+'");\n}'),e.writeln("</style>"))}};if("undefined"!==typeof MathJax){var E=e.renderPage;e.renderPage=function(b,e,c,d,m,f){var p=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!a.editor.useForeignObjectForMath?!0:a.editor.originalNoForeignObject;
-var g=E.apply(this,arguments);mxClient.NO_FO=p;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:g.className="geDisableMathJax";return g}}v=null;null!=d.themes&&"darkTheme"==d.defaultThemeName&&(v=d.stylesheet,d.stylesheet=d.getDefaultStylesheet(),d.refresh());e.open(null,null,m,!0);null!=v&&(d.stylesheet=v,d.refresh())}else{x=b.background;if(null==x||""==x||x==mxConstants.NONE)x="#ffffff";e.backgroundColor=x;e.autoOrigin=z;e.appendGraph(b,l,v,A,m,!0);if(null!=b.extFonts&&null!=e.wnd)for(m=
-0;m<b.extFonts.length;m++)v=b.extFonts[m].name,A=b.extFonts[m].url,0==A.indexOf(Editor.GOOGLE_FONTS)?e.wnd.document.writeln('<link rel="stylesheet" href="'+A+'" charset="UTF-8" type="text/css">'):(e.wnd.document.writeln('<style type="text/css">'),e.wnd.document.writeln('@font-face {\n\tfont-family: "'+v+'";\n\tsrc: url("'+A+'");\n}'),e.wnd.document.writeln("</style>"))}f&&(b.useCssTransforms=f,b.currentTranslate=p,b.currentScale=g,b.view.translate=k,b.view.scale=q);return e}var c=parseInt(N.value)/
-100;isNaN(c)&&(c=1,N.value="100 %");var c=.75*c,m=v.value,f=A.value,p=!q.checked,k=null;p&&(p=m==g&&f==g);if(!p&&null!=a.pages&&a.pages.length){var t=0,p=a.pages.length-1;q.checked||(t=parseInt(m)-1,p=parseInt(f)-1);for(var x=t;x<=p;x++){var l=a.pages[x],m=l==a.currentPage?d:null;if(null==m){var m=a.createTemporaryGraph(d.getStylesheet()),f=!0,t=!1,z=null,D=null;null==l.viewState&&null==l.root&&a.updatePageRoot(l);null!=l.viewState&&(f=l.viewState.pageVisible,t=l.viewState.mathEnabled,z=l.viewState.background,
-D=l.viewState.backgroundImage,m.extFonts=l.viewState.extFonts);m.background=z;m.backgroundImage=null!=D?new mxImage(D.src,D.width,D.height):null;m.pageVisible=f;m.mathEnabled=t;var C=m.getGlobalVariable;m.getGlobalVariable=function(b){return"page"==b?l.getName():"pagenumber"==b?x+1:"pagecount"==b?null!=a.pages?a.pages.length:1:C.apply(this,arguments)};document.body.appendChild(m.container);a.updatePageRoot(l);m.model.setRoot(l.root)}k=e(m,k,x!=p);m!=d&&m.container.parentNode.removeChild(m.container)}}else k=
+[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 A=mxMarker.createMarker;mxMarker.createMarker=
+function(a,b,e,c,d,m,f,p,g,k){if(null!=e&&null==mxMarker.markers[e]){var u=this.getPackageForType(e);null!=u&&mxStencilRegistry.getStencil(u)}return A.apply(this,arguments)};PrintDialog.prototype.create=function(a,b){function e(){z.value=Math.max(1,Math.min(p,Math.max(parseInt(z.value),parseInt(v.value))));v.value=Math.max(1,Math.min(p,Math.min(parseInt(z.value),parseInt(v.value))))}function c(b){function e(b,e,m){var f=b.useCssTransforms,p=b.currentTranslate,g=b.currentScale,k=b.view.translate,u=
+b.view.scale;b.useCssTransforms&&(b.useCssTransforms=!1,b.currentTranslate=new mxPoint(0,0),b.currentScale=1,b.view.translate=new mxPoint(0,0),b.view.scale=1);var v=b.getGraphBounds(),q=0,z=0,l=ma.get(),A=1/b.pageScale,x=y.checked;if(x)var A=parseInt(S.value),D=parseInt(ha.value),A=Math.min(l.height*D/(v.height/b.view.scale),l.width*A/(v.width/b.view.scale));else A=parseInt(n.value)/(100*b.pageScale),isNaN(A)&&(c=1/b.pageScale,n.value="100 %");l=mxRectangle.fromRectangle(l);l.width=Math.ceil(l.width*
+c);l.height=Math.ceil(l.height*c);A*=c;!x&&b.pageVisible?(v=b.getPageLayout(),q-=v.x*l.width,z-=v.y*l.height):x=!0;if(null==e){e=PrintDialog.createPrintPreview(b,A,l,0,q,z,x);e.pageSelector=!1;e.mathEnabled=!1;q=a.getCurrentFile();null!=q&&(e.title=q.getTitle());var B=e.writeHead;e.writeHead=function(e){B.apply(this,arguments);null!=a.editor.fontCss&&(e.writeln('<style type="text/css">'),e.writeln(a.editor.fontCss),e.writeln("</style>"));if(null!=b.extFonts)for(var c=0;c<b.extFonts.length;c++){var d=
+b.extFonts[c].name,m=b.extFonts[c].url;0==m.indexOf(Editor.GOOGLE_FONTS)?e.writeln('<link rel="stylesheet" href="'+m+'" charset="UTF-8" type="text/css">'):(e.writeln('<style type="text/css">'),e.writeln('@font-face {\n\tfont-family: "'+d+'";\n\tsrc: url("'+m+'");\n}'),e.writeln("</style>"))}};if("undefined"!==typeof MathJax){var F=e.renderPage;e.renderPage=function(b,e,c,d,m,f){var p=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!a.editor.useForeignObjectForMath?!0:a.editor.originalNoForeignObject;
+var g=F.apply(this,arguments);mxClient.NO_FO=p;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:g.className="geDisableMathJax";return g}}q=null;null!=d.themes&&"darkTheme"==d.defaultThemeName&&(q=d.stylesheet,d.stylesheet=d.getDefaultStylesheet(),d.refresh());e.open(null,null,m,!0);null!=q&&(d.stylesheet=q,d.refresh())}else{l=b.background;if(null==l||""==l||l==mxConstants.NONE)l="#ffffff";e.backgroundColor=l;e.autoOrigin=x;e.appendGraph(b,A,q,z,m,!0);if(null!=b.extFonts&&null!=e.wnd)for(m=
+0;m<b.extFonts.length;m++)q=b.extFonts[m].name,z=b.extFonts[m].url,0==z.indexOf(Editor.GOOGLE_FONTS)?e.wnd.document.writeln('<link rel="stylesheet" href="'+z+'" charset="UTF-8" type="text/css">'):(e.wnd.document.writeln('<style type="text/css">'),e.wnd.document.writeln('@font-face {\n\tfont-family: "'+q+'";\n\tsrc: url("'+z+'");\n}'),e.wnd.document.writeln("</style>"))}f&&(b.useCssTransforms=f,b.currentTranslate=p,b.currentScale=g,b.view.translate=k,b.view.scale=u);return e}var c=parseInt(N.value)/
+100;isNaN(c)&&(c=1,N.value="100 %");var c=.75*c,m=v.value,f=z.value,p=!u.checked,k=null;p&&(p=m==g&&f==g);if(!p&&null!=a.pages&&a.pages.length){var q=0,p=a.pages.length-1;u.checked||(q=parseInt(m)-1,p=parseInt(f)-1);for(var l=q;l<=p;l++){var A=a.pages[l],m=A==a.currentPage?d:null;if(null==m){var m=a.createTemporaryGraph(d.getStylesheet()),f=!0,q=!1,x=null,D=null;null==A.viewState&&null==A.root&&a.updatePageRoot(A);null!=A.viewState&&(f=A.viewState.pageVisible,q=A.viewState.mathEnabled,x=A.viewState.background,
+D=A.viewState.backgroundImage,m.extFonts=A.viewState.extFonts);m.background=x;m.backgroundImage=null!=D?new mxImage(D.src,D.width,D.height):null;m.pageVisible=f;m.mathEnabled=q;var B=m.getGlobalVariable;m.getGlobalVariable=function(b){return"page"==b?A.getName():"pagenumber"==b?l+1:"pagecount"==b?null!=a.pages?a.pages.length:1:B.apply(this,arguments)};document.body.appendChild(m.container);a.updatePageRoot(A);m.model.setRoot(A.root)}k=e(m,k,l!=p);m!=d&&m.container.parentNode.removeChild(m.container)}}else k=
e(d);null==k?a.handleError({message:mxResources.get("errorUpdatingPreview")}):(k.mathEnabled&&(p=k.wnd.document,p.writeln('<script type="text/x-mathjax-config">'),p.writeln("MathJax.Hub.Config({"),p.writeln("showMathMenu: false,"),p.writeln('messageStyle: "none",'),p.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],'),p.writeln('extensions: ["tex2jax.js", "mml2jax.js", "asciimath2jax.js"],'),p.writeln('"HTML-CSS": {'),p.writeln("imageFont: null"),p.writeln("},"),p.writeln("TeX: {"),
p.writeln('extensions: ["AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js"]'),p.writeln("},"),p.writeln("tex2jax: {"),p.writeln('\tignoreClass: "geDisableMathJax"'),p.writeln("},"),p.writeln("asciimath2jax: {"),p.writeln('\tignoreClass: "geDisableMathJax"'),p.writeln("}"),p.writeln("});"),b&&(p.writeln("MathJax.Hub.Queue(function () {"),p.writeln("window.print();"),p.writeln("});")),p.writeln("\x3c/script>"),p.writeln('<script type="text/javascript" src="'+DRAW_MATH_URL+'/MathJax.js">\x3c/script>')),
-k.closeDocument(),!k.mathEnabled&&b&&PrintDialog.printPreview(k))}var d=a.editor.graph,m=document.createElement("div"),f=document.createElement("h3");f.style.width="100%";f.style.textAlign="center";f.style.marginTop="0px";mxUtils.write(f,b||mxResources.get("print"));m.appendChild(f);var p=1,g=1,k=document.createElement("div");k.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var q=document.createElement("input");q.style.cssText="margin-right:8px;margin-bottom:8px;";
-q.setAttribute("value","all");q.setAttribute("type","radio");q.setAttribute("name","pages-printdialog");k.appendChild(q);f=document.createElement("span");mxUtils.write(f,mxResources.get("printAllPages"));k.appendChild(f);mxUtils.br(k);var t=q.cloneNode(!0);q.setAttribute("checked","checked");t.setAttribute("value","range");k.appendChild(t);f=document.createElement("span");mxUtils.write(f,mxResources.get("pages")+":");k.appendChild(f);var v=document.createElement("input");v.style.cssText="margin:0 8px 0 8px;";
-v.setAttribute("value","1");v.setAttribute("type","number");v.setAttribute("min","1");v.style.width="50px";k.appendChild(v);f=document.createElement("span");mxUtils.write(f,mxResources.get("to"));k.appendChild(f);var A=v.cloneNode(!0);k.appendChild(A);mxEvent.addListener(v,"focus",function(){t.checked=!0});mxEvent.addListener(A,"focus",function(){t.checked=!0});mxEvent.addListener(v,"change",e);mxEvent.addListener(A,"change",e);if(null!=a.pages&&(p=a.pages.length,null!=a.currentPage))for(f=0;f<a.pages.length;f++)if(a.currentPage==
-a.pages[f]){g=f+1;v.value=g;A.value=g;break}v.setAttribute("max",p);A.setAttribute("max",p);1<p&&m.appendChild(k);var x=document.createElement("div");x.style.marginBottom="10px";var l=document.createElement("input");l.style.marginRight="8px";l.setAttribute("value","adjust");l.setAttribute("type","radio");l.setAttribute("name","printZoom");x.appendChild(l);f=document.createElement("span");mxUtils.write(f,mxResources.get("adjustTo"));x.appendChild(f);var n=document.createElement("input");n.style.cssText=
-"margin:0 8px 0 8px;";n.setAttribute("value","100 %");n.style.width="50px";x.appendChild(n);mxEvent.addListener(n,"focus",function(){l.checked=!0});m.appendChild(x);var k=k.cloneNode(!1),y=l.cloneNode(!0);y.setAttribute("value","fit");l.setAttribute("checked","checked");f=document.createElement("div");f.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";f.appendChild(y);k.appendChild(f);x=document.createElement("table");x.style.display="inline-block";var z=document.createElement("tbody"),
-D=document.createElement("tr"),C=D.cloneNode(!0),E=document.createElement("td"),u=E.cloneNode(!0),B=E.cloneNode(!0),H=E.cloneNode(!0),ea=E.cloneNode(!0),T=E.cloneNode(!0);E.style.textAlign="right";H.style.textAlign="right";mxUtils.write(E,mxResources.get("fitTo"));var S=document.createElement("input");S.style.cssText="margin:0 8px 0 8px;";S.setAttribute("value","1");S.setAttribute("min","1");S.setAttribute("type","number");S.style.width="40px";u.appendChild(S);f=document.createElement("span");mxUtils.write(f,
-mxResources.get("fitToSheetsAcross"));B.appendChild(f);mxUtils.write(H,mxResources.get("fitToBy"));var ha=S.cloneNode(!0);ea.appendChild(ha);mxEvent.addListener(S,"focus",function(){y.checked=!0});mxEvent.addListener(ha,"focus",function(){y.checked=!0});f=document.createElement("span");mxUtils.write(f,mxResources.get("fitToSheetsDown"));T.appendChild(f);D.appendChild(E);D.appendChild(u);D.appendChild(B);C.appendChild(H);C.appendChild(ea);C.appendChild(T);z.appendChild(D);z.appendChild(C);x.appendChild(z);
-k.appendChild(x);m.appendChild(k);k=document.createElement("div");f=document.createElement("div");f.style.fontWeight="bold";f.style.marginBottom="12px";mxUtils.write(f,mxResources.get("paperSize"));k.appendChild(f);f=document.createElement("div");f.style.marginBottom="12px";var ma=PageSetupDialog.addPageFormatPanel(f,"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);k.appendChild(f);f=document.createElement("span");mxUtils.write(f,mxResources.get("pageScale"));k.appendChild(f);
-var N=document.createElement("input");N.style.cssText="margin:0 8px 0 8px;";N.setAttribute("value","100 %");N.style.width="60px";k.appendChild(N);m.appendChild(k);f=document.createElement("div");f.style.cssText="text-align:right;margin:48px 0 0 0;";k=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});k.className="geBtn";a.editor.cancelFirst&&f.appendChild(k);a.isOffline()||(x=mxUtils.button(mxResources.get("help"),function(){d.openLink("https://desk.draw.io/support/solutions/articles/16000048947")}),
-x.className="geBtn",f.appendChild(x));PrintDialog.previewEnabled&&(x=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();c(!1)}),x.className="geBtn",f.appendChild(x));x=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();c(!0)});x.className="geBtn gePrimaryBtn";f.appendChild(x);a.editor.cancelFirst||f.appendChild(k);m.appendChild(f);this.container=m};var A=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)):(A.apply(this,arguments),null!=this.mathEnabled&&
-this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible))};Editor.prototype.useCanvasForExport=!1;try{var E=document.createElement("canvas"),D=new Image;D.onload=function(){try{E.getContext("2d").drawImage(D,0,0);var a=E.toDataURL("image/png");Editor.prototype.useCanvasForExport=
-null!=a&&6<a.length}catch(H){}};D.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(B){}})();
-(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,c,b){b.ui=a.ui;return c};a.afterDecode=function(a,c,b){b.previousColor=b.color;b.previousImage=b.image;b.previousFormat=b.format;null!=b.foldingEnabled&&(b.foldingEnabled=!b.foldingEnabled);null!=b.mathEnabled&&(b.mathEnabled=!b.mathEnabled);null!=b.shadowVisible&&(b.shadowVisible=!b.shadowVisible);return b};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="12.9.7";EditorUi.compactUi="atlas"!=uiTheme;mxGraphView.prototype.defaultDarkGridColor="#6e6e6e";"dark"==uiTheme&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars=
+k.closeDocument(),!k.mathEnabled&&b&&PrintDialog.printPreview(k))}var d=a.editor.graph,m=document.createElement("div"),f=document.createElement("h3");f.style.width="100%";f.style.textAlign="center";f.style.marginTop="0px";mxUtils.write(f,b||mxResources.get("print"));m.appendChild(f);var p=1,g=1,k=document.createElement("div");k.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");k.appendChild(u);f=document.createElement("span");mxUtils.write(f,mxResources.get("printAllPages"));k.appendChild(f);mxUtils.br(k);var q=u.cloneNode(!0);u.setAttribute("checked","checked");q.setAttribute("value","range");k.appendChild(q);f=document.createElement("span");mxUtils.write(f,mxResources.get("pages")+":");k.appendChild(f);var v=document.createElement("input");v.style.cssText="margin:0 8px 0 8px;";
+v.setAttribute("value","1");v.setAttribute("type","number");v.setAttribute("min","1");v.style.width="50px";k.appendChild(v);f=document.createElement("span");mxUtils.write(f,mxResources.get("to"));k.appendChild(f);var z=v.cloneNode(!0);k.appendChild(z);mxEvent.addListener(v,"focus",function(){q.checked=!0});mxEvent.addListener(z,"focus",function(){q.checked=!0});mxEvent.addListener(v,"change",e);mxEvent.addListener(z,"change",e);if(null!=a.pages&&(p=a.pages.length,null!=a.currentPage))for(f=0;f<a.pages.length;f++)if(a.currentPage==
+a.pages[f]){g=f+1;v.value=g;z.value=g;break}v.setAttribute("max",p);z.setAttribute("max",p);1<p&&m.appendChild(k);var l=document.createElement("div");l.style.marginBottom="10px";var A=document.createElement("input");A.style.marginRight="8px";A.setAttribute("value","adjust");A.setAttribute("type","radio");A.setAttribute("name","printZoom");l.appendChild(A);f=document.createElement("span");mxUtils.write(f,mxResources.get("adjustTo"));l.appendChild(f);var n=document.createElement("input");n.style.cssText=
+"margin:0 8px 0 8px;";n.setAttribute("value","100 %");n.style.width="50px";l.appendChild(n);mxEvent.addListener(n,"focus",function(){A.checked=!0});m.appendChild(l);var k=k.cloneNode(!1),y=A.cloneNode(!0);y.setAttribute("value","fit");A.setAttribute("checked","checked");f=document.createElement("div");f.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";f.appendChild(y);k.appendChild(f);l=document.createElement("table");l.style.display="inline-block";var x=document.createElement("tbody"),
+D=document.createElement("tr"),B=D.cloneNode(!0),F=document.createElement("td"),t=F.cloneNode(!0),C=F.cloneNode(!0),G=F.cloneNode(!0),ea=F.cloneNode(!0),T=F.cloneNode(!0);F.style.textAlign="right";G.style.textAlign="right";mxUtils.write(F,mxResources.get("fitTo"));var S=document.createElement("input");S.style.cssText="margin:0 8px 0 8px;";S.setAttribute("value","1");S.setAttribute("min","1");S.setAttribute("type","number");S.style.width="40px";t.appendChild(S);f=document.createElement("span");mxUtils.write(f,
+mxResources.get("fitToSheetsAcross"));C.appendChild(f);mxUtils.write(G,mxResources.get("fitToBy"));var ha=S.cloneNode(!0);ea.appendChild(ha);mxEvent.addListener(S,"focus",function(){y.checked=!0});mxEvent.addListener(ha,"focus",function(){y.checked=!0});f=document.createElement("span");mxUtils.write(f,mxResources.get("fitToSheetsDown"));T.appendChild(f);D.appendChild(F);D.appendChild(t);D.appendChild(C);B.appendChild(G);B.appendChild(ea);B.appendChild(T);x.appendChild(D);x.appendChild(B);l.appendChild(x);
+k.appendChild(l);m.appendChild(k);k=document.createElement("div");f=document.createElement("div");f.style.fontWeight="bold";f.style.marginBottom="12px";mxUtils.write(f,mxResources.get("paperSize"));k.appendChild(f);f=document.createElement("div");f.style.marginBottom="12px";var ma=PageSetupDialog.addPageFormatPanel(f,"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);k.appendChild(f);f=document.createElement("span");mxUtils.write(f,mxResources.get("pageScale"));k.appendChild(f);
+var N=document.createElement("input");N.style.cssText="margin:0 8px 0 8px;";N.setAttribute("value","100 %");N.style.width="60px";k.appendChild(N);m.appendChild(k);f=document.createElement("div");f.style.cssText="text-align:right;margin:48px 0 0 0;";k=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});k.className="geBtn";a.editor.cancelFirst&&f.appendChild(k);a.isOffline()||(l=mxUtils.button(mxResources.get("help"),function(){d.openLink("https://desk.draw.io/support/solutions/articles/16000048947")}),
+l.className="geBtn",f.appendChild(l));PrintDialog.previewEnabled&&(l=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();c(!1)}),l.className="geBtn",f.appendChild(l));l=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();c(!0)});l.className="geBtn gePrimaryBtn";f.appendChild(l);a.editor.cancelFirst||f.appendChild(k);m.appendChild(f);this.container=m};var z=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)):(z.apply(this,arguments),null!=this.mathEnabled&&
+this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible))};Editor.prototype.useCanvasForExport=!1;try{var F=document.createElement("canvas"),D=new Image;D.onload=function(){try{F.getContext("2d").drawImage(D,0,0);var a=F.toDataURL("image/png");Editor.prototype.useCanvasForExport=
+null!=a&&6<a.length}catch(G){}};D.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(C){}})();
+(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,c,b){b.ui=a.ui;return c};a.afterDecode=function(a,c,b){b.previousColor=b.color;b.previousImage=b.image;b.previousFormat=b.format;null!=b.foldingEnabled&&(b.foldingEnabled=!b.foldingEnabled);null!=b.mathEnabled&&(b.mathEnabled=!b.mathEnabled);null!=b.shadowVisible&&(b.shadowVisible=!b.shadowVisible);return b};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="12.9.8";EditorUi.compactUi="atlas"!=uiTheme;mxGraphView.prototype.defaultDarkGridColor="#6e6e6e";"dark"==uiTheme&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars=
"\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl="1"==urlParams.dev?"/cache":window.REALTIME_URL;null==EditorUi.cacheUrl&&"undefined"!==typeof DrawioFile&&(DrawioFile.SYNC="none");Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&isLocalStorage&&
!EditorUi.isElectronApp&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://desk.draw.io/support/solutions/articles/16000042367";EditorUi.defaultMermaidConfig={theme:"neutral",arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!1},sequence:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,
topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(a,b,c,d,f,g,k){g=null!=g?g:0<=a.indexOf("NetworkError")||0<=a.indexOf("SecurityError")||0<=a.indexOf("NS_ERROR_FAILURE")||0<=a.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&&"1"!=urlParams.dev)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 e=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";f=null!=f?f:Error(a);(new Image).src=e+"/log?severity="+g+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(a)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(c)+(null!=d?":colno:"+encodeURIComponent(d):"")+(null!=f&&null!=f.stack?"&stack="+encodeURIComponent(f.stack):"")}}catch(C){}try{k||null==window.console||
-console.error(g,a,b,c,d,f)}catch(C){}};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(p){}};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>
+null!=a&&0>a.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=a;var e=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";f=null!=f?f:Error(a);(new Image).src=e+"/log?severity="+g+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(a)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(c)+(null!=d?":colno:"+encodeURIComponent(d):"")+(null!=f&&null!=f.stack?"&stack="+encodeURIComponent(f.stack):"")}}catch(B){}try{k||null==window.console||
+console.error(g,a,b,c,d,f)}catch(B){}};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(p){}};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(p){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var a=[(new Date).toISOString()],b=0;b<arguments.length;b++)null!=arguments[b]&&a.push(arguments[b]);console.log.apply(console,a)}}catch(p){}};EditorUi.parsePng=function(a,b,c){function e(a,b){var e=m;m+=b;return a.substring(e,
m)}function d(a){a=e(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}var m=0;if(e(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=c&&c();else if(e(a,4),"IHDR"!=e(a,4))null!=c&&c();else{e(a,17);do{c=d(a);var f=e(a,4);if(null!=b&&b(m-8,f,c))break;value=e(a,c);e(a,4);if("IEND"==f)break}while(c)}};EditorUi.removeChildNodes=function(a){for(;null!=a.firstChild;)a.removeChild(a.firstChild)};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';
EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.timeout=Editor.prototype.timeout;EditorUi.prototype.sidebarFooterHeight=38;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";
-EditorUi.prototype.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.maxTextBytes=5E5;EditorUi.prototype.currentFile=
-null;EditorUi.prototype.printPdfExport=!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;EditorUi.prototype.insertTemplateEnabled=!0;EditorUi.prototype.closableScratchpad=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var 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(v){}};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 d=
-b.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=null!==d.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.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(a){return this.isOfflineApp()||!navigator.onLine||!a&&"1"==urlParams.stealth};EditorUi.prototype.createSpinner=function(a,b,c){c=null!=c?c:24;
-var e=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=e.spin;e.spin=function(c,m){var f=!1;this.active||(d.call(this,c),this.active=!0,null!=m&&(f=document.createElement("div"),f.style.position="absolute",f.style.whiteSpace="nowrap",f.style.background="#4B4243",f.style.color="white",f.style.fontFamily="Helvetica, Arial",f.style.fontSize="9pt",f.style.padding="6px",f.style.paddingLeft=
-"10px",f.style.paddingRight="10px",f.style.zIndex=2E9,f.style.left=Math.max(0,a)+"px",f.style.top=Math.max(0,b+70)+"px",mxUtils.setPrefixedStyle(f.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(f.style,"transform","translate(-50%,-50%)"),"dark"!=uiTheme&&mxUtils.setPrefixedStyle(f.style,"boxShadow","2px 2px 3px 0px #ddd"),"..."!=m.substring(m.length-3,m.length)&&"!"!=m.charAt(m.length-1)&&(m+="..."),f.innerHTML=m,c.appendChild(f),e.status=f,mxClient.IS_VML&&(null==document.documentMode||8>=
-document.documentMode)&&(f.style.left=Math.round(Math.max(0,a-f.offsetWidth/2))+"px",f.style.top=Math.round(Math.max(0,b+70-f.offsetHeight/2))+"px")),this.pause=mxUtils.bind(this,function(){var a=function(){};this.active&&(a=mxUtils.bind(this,function(){this.spin(c,m)}));this.stop();return a}),f=!0);return f};var m=e.stop;e.stop=function(){m.call(this);this.active=!1;null!=e.status&&null!=e.status.parentNode&&e.status.parentNode.removeChild(e.status);e.status=null};e.pause=function(){return function(){}};
-return e};EditorUi.prototype.isCompatibleString=function(a){try{var b=mxUtils.parseXml(a),e=this.editor.extractGraphModel(b.documentElement,!0);return null!=e&&0==e.getElementsByTagName("parsererror").length}catch(q){}return!1};EditorUi.prototype.isVisioData=function(a){return 8<a.length&&208==a.charCodeAt(0)&&207==a.charCodeAt(1)&&17==a.charCodeAt(2)&&224==a.charCodeAt(3)&&161==a.charCodeAt(4)&&177==a.charCodeAt(5)&&26==a.charCodeAt(6)&&225==a.charCodeAt(7)||80==a.charCodeAt(0)&&75==a.charCodeAt(1)&&
-3==a.charCodeAt(2)&&4==a.charCodeAt(3)||80==a.charCodeAt(0)&&75==a.charCodeAt(1)&&3==a.charCodeAt(2)&&6==a.charCodeAt(3)};EditorUi.prototype.isPngData=function(a){return 8<a.length&&137==a.charCodeAt(0)&&80==a.charCodeAt(1)&&78==a.charCodeAt(2)&&71==a.charCodeAt(3)&&13==a.charCodeAt(4)&&10==a.charCodeAt(5)&&26==a.charCodeAt(6)&&10==a.charCodeAt(7)};var a=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(b){var e=a.apply(this,arguments);if(null==e)try{var c=
-b.indexOf("&lt;mxfile ");if(0<=c){var d=b.lastIndexOf("&lt;/mxfile&gt;");d>c&&(e=b.substring(c,d+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var f=mxUtils.parseXml(b),g=this.editor.extractGraphModel(f.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility),e=null!=g?mxUtils.getXml(g):""}catch(z){}return e};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=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 e=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 d=c.length-1;0<=d;d--){var f=this.updatePageRoot(new DiagramPage(c[d]));null==f.getName()&&f.setName(mxResources.get("pageWithNumber",[d+1]));b.model.execute(new ChangePage(this,f,0==d?f: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!=e)for(d=0;d<e.length;d++)b.model.execute(new ChangePage(this,e[d],null))}finally{b.model.endUpdate()}}};EditorUi.prototype.createFileData=function(a,b,c,d,f,g,k,l,n,x,A){b=null!=b?b:this.editor.graph;f=null!=f?f:!1;n=null!=n?n:!0;var e,m=null;null==c||c.getMode()==App.MODE_DEVICE||c.getMode()==App.MODE_BROWSER?
-e="_blank":m=e=d;if(null==a)return"";var p=a;if("mxfile"!=p.nodeName.toLowerCase()){if(A){var q=a.ownerDocument.createElement("diagram");q.setAttribute("id",Editor.guid());q.appendChild(a)}else{q=Graph.zapGremlins(mxUtils.getXml(a));p=Graph.compress(q);if(Graph.decompress(p)!=q)return q;q=a.ownerDocument.createElement("diagram");q.setAttribute("id",Editor.guid());mxUtils.setTextContent(q,p)}p=a.ownerDocument.createElement("mxfile");p.appendChild(q)}x?(p=p.cloneNode(!0),p.removeAttribute("modified"),
+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.maxTextWidth=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.maxTextBytes=
+5E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.printPdfExport=!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;EditorUi.prototype.insertTemplateEnabled=!0;EditorUi.prototype.closableScratchpad=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var 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(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.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(a){return this.isOfflineApp()||!navigator.onLine||!a&&"1"==urlParams.stealth};EditorUi.prototype.createSpinner=
+function(a,b,c){c=null!=c?c:24;var e=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=e.spin;e.spin=function(c,m){var f=!1;this.active||(d.call(this,c),this.active=!0,null!=m&&(f=document.createElement("div"),f.style.position="absolute",f.style.whiteSpace="nowrap",f.style.background="#4B4243",f.style.color="white",f.style.fontFamily="Helvetica, Arial",f.style.fontSize=
+"9pt",f.style.padding="6px",f.style.paddingLeft="10px",f.style.paddingRight="10px",f.style.zIndex=2E9,f.style.left=Math.max(0,a)+"px",f.style.top=Math.max(0,b+70)+"px",mxUtils.setPrefixedStyle(f.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(f.style,"transform","translate(-50%,-50%)"),"dark"!=uiTheme&&mxUtils.setPrefixedStyle(f.style,"boxShadow","2px 2px 3px 0px #ddd"),"..."!=m.substring(m.length-3,m.length)&&"!"!=m.charAt(m.length-1)&&(m+="..."),f.innerHTML=m,c.appendChild(f),e.status=f,mxClient.IS_VML&&
+(null==document.documentMode||8>=document.documentMode)&&(f.style.left=Math.round(Math.max(0,a-f.offsetWidth/2))+"px",f.style.top=Math.round(Math.max(0,b+70-f.offsetHeight/2))+"px")),this.pause=mxUtils.bind(this,function(){var a=function(){};this.active&&(a=mxUtils.bind(this,function(){this.spin(c,m)}));this.stop();return a}),f=!0);return f};var m=e.stop;e.stop=function(){m.call(this);this.active=!1;null!=e.status&&null!=e.status.parentNode&&e.status.parentNode.removeChild(e.status);e.status=null};
+e.pause=function(){return function(){}};return e};EditorUi.prototype.isCompatibleString=function(a){try{var b=mxUtils.parseXml(a),e=this.editor.extractGraphModel(b.documentElement,!0);return null!=e&&0==e.getElementsByTagName("parsererror").length}catch(v){}return!1};EditorUi.prototype.isVisioData=function(a){return 8<a.length&&208==a.charCodeAt(0)&&207==a.charCodeAt(1)&&17==a.charCodeAt(2)&&224==a.charCodeAt(3)&&161==a.charCodeAt(4)&&177==a.charCodeAt(5)&&26==a.charCodeAt(6)&&225==a.charCodeAt(7)||
+80==a.charCodeAt(0)&&75==a.charCodeAt(1)&&3==a.charCodeAt(2)&&4==a.charCodeAt(3)||80==a.charCodeAt(0)&&75==a.charCodeAt(1)&&3==a.charCodeAt(2)&&6==a.charCodeAt(3)};EditorUi.prototype.isPngData=function(a){return 8<a.length&&137==a.charCodeAt(0)&&80==a.charCodeAt(1)&&78==a.charCodeAt(2)&&71==a.charCodeAt(3)&&13==a.charCodeAt(4)&&10==a.charCodeAt(5)&&26==a.charCodeAt(6)&&10==a.charCodeAt(7)};var a=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(b){var e=
+a.apply(this,arguments);if(null==e)try{var c=b.indexOf("&lt;mxfile ");if(0<=c){var d=b.lastIndexOf("&lt;/mxfile&gt;");d>c&&(e=b.substring(c,d+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var f=mxUtils.parseXml(b),g=this.editor.extractGraphModel(f.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility),e=null!=g?mxUtils.getXml(g):""}catch(y){}return e};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=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 e=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 d=c.length-1;0<=d;d--){var f=this.updatePageRoot(new DiagramPage(c[d]));null==f.getName()&&f.setName(mxResources.get("pageWithNumber",[d+1]));b.model.execute(new ChangePage(this,f,0==d?f: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!=e)for(d=0;d<e.length;d++)b.model.execute(new ChangePage(this,e[d],null))}finally{b.model.endUpdate()}}};EditorUi.prototype.createFileData=function(a,b,c,d,f,g,k,l,n,A,z){b=null!=b?b:this.editor.graph;f=null!=f?f:!1;n=null!=n?n:!0;var e,m=null;null==c||c.getMode()==App.MODE_DEVICE||c.getMode()==App.MODE_BROWSER?
+e="_blank":m=e=d;if(null==a)return"";var p=a;if("mxfile"!=p.nodeName.toLowerCase()){if(z){var u=a.ownerDocument.createElement("diagram");u.setAttribute("id",Editor.guid());u.appendChild(a)}else{u=Graph.zapGremlins(mxUtils.getXml(a));p=Graph.compress(u);if(Graph.decompress(p)!=u)return u;u=a.ownerDocument.createElement("diagram");u.setAttribute("id",Editor.guid());mxUtils.setTextContent(u,p)}p=a.ownerDocument.createElement("mxfile");p.appendChild(u)}A?(p=p.cloneNode(!0),p.removeAttribute("modified"),
p.removeAttribute("host"),p.removeAttribute("agent"),p.removeAttribute("etag"),p.removeAttribute("userAgent"),p.removeAttribute("version"),p.removeAttribute("editor"),p.removeAttribute("type")):(p.removeAttribute("userAgent"),p.removeAttribute("version"),p.removeAttribute("editor"),p.removeAttribute("pages"),p.removeAttribute("type"),mxClient.IS_CHROMEAPP?p.setAttribute("host","Chrome"):EditorUi.isElectronApp?p.setAttribute("host","Electron"):p.setAttribute("host",window.location.hostname),p.setAttribute("modified",
-(new Date).toISOString()),p.setAttribute("agent",navigator.appVersion),p.setAttribute("version",EditorUi.VERSION),p.setAttribute("etag",Editor.guid()),a=null!=c?c.getMode():this.mode,null!=a&&p.setAttribute("type",a),1<p.getElementsByTagName("diagram").length&&null!=this.pages&&p.setAttribute("pages",this.pages.length));A=A?mxUtils.getPrettyXml(p):mxUtils.getXml(p);if(!g&&!f&&(k||null!=c&&/(\.html)$/i.test(c.getTitle())))A=this.getHtml2(mxUtils.getXml(p),b,null!=c?c.getTitle():null,e,m);else if(g||
-!f&&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,n,m);return A};EditorUi.prototype.getXmlFileData=function(a,b,c){a=null!=a?a:!0;b=null!=b?b:!1;c=null!=c?c:!Editor.compressXml;var e=this.editor.getGraphXml(a);if(a&&null!=this.fileNode&&null!=this.currentPage)if(a=function(a){var b=a.getElementsByTagName("mxGraphModel"),b=0<b.length?b[0]:null;null==b&&c?(b=mxUtils.trim(mxUtils.getTextContent(a)),
+(new Date).toISOString()),p.setAttribute("agent",navigator.appVersion),p.setAttribute("version",EditorUi.VERSION),p.setAttribute("etag",Editor.guid()),a=null!=c?c.getMode():this.mode,null!=a&&p.setAttribute("type",a),1<p.getElementsByTagName("diagram").length&&null!=this.pages&&p.setAttribute("pages",this.pages.length));z=z?mxUtils.getPrettyXml(p):mxUtils.getXml(p);if(!g&&!f&&(k||null!=c&&/(\.html)$/i.test(c.getTitle())))z=this.getHtml2(mxUtils.getXml(p),b,null!=c?c.getTitle():null,e,m);else if(g||
+!f&&null!=c&&/(\.svg)$/i.test(c.getTitle()))null==c||c.getMode()!=App.MODE_DEVICE&&c.getMode()!=App.MODE_BROWSER||(d=null),z=this.getEmbeddedSvg(z,b,d,null,l,n,m);return z};EditorUi.prototype.getXmlFileData=function(a,b,c){a=null!=a?a:!0;b=null!=b?b:!1;c=null!=c?c:!Editor.compressXml;var e=this.editor.getGraphXml(a);if(a&&null!=this.fileNode&&null!=this.currentPage)if(a=function(a){var b=a.getElementsByTagName("mxGraphModel"),b=0<b.length?b[0]:null;null==b&&c?(b=mxUtils.trim(mxUtils.getTextContent(a)),
a=a.cloneNode(!1),0<b.length&&(b=Graph.decompress(b),null!=b&&0<b.length&&a.appendChild(mxUtils.parseXml(b).documentElement))):null==b||c?a=a.cloneNode(!0):(a=a.cloneNode(!1),mxUtils.setTextContent(a,Graph.compressNode(b)));e.appendChild(a)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(e)),e=this.fileNode.cloneNode(!1),b)a(this.currentPage.node);else for(b=0;b<this.pages.length;b++){if(this.currentPage!=this.pages[b]&&this.pages[b].needsUpdate){var d=
(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(this.pages[b].root));this.editor.graph.saveViewState(this.pages[b].viewState,d);EditorUi.removeChildNodes(this.pages[b].node);mxUtils.setTextContent(this.pages[b].node,Graph.compressNode(d));delete this.pages[b].needsUpdate}a(this.pages[b].node)}return e};EditorUi.prototype.anonymizeString=function(a,b){for(var e=[],c=0;c<a.length;c++){var d=a.charAt(c);0<=EditorUi.ignoredAnonymizedChars.indexOf(d)?e.push(d):isNaN(parseInt(d))?d.toLowerCase()!=
d?e.push(String.fromCharCode(65+Math.round(25*Math.random()))):d.toUpperCase()!=d?e.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(d)?e.push(" "):e.push("?"):e.push(b?"0":Math.round(9*Math.random()))}return e.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 e=mxUtils.parseXml(a[EditorUi.DIFF_INSERT][b].data).documentElement.cloneNode(!1);null!=e.getAttribute("name")&&e.setAttribute("name",
-this.anonymizeString(e.getAttribute("name")));a[EditorUi.DIFF_INSERT][b].data=mxUtils.getXml(e)}catch(v){a[EditorUi.DIFF_INSERT][b].data=v.message}if(null!=a[EditorUi.DIFF_UPDATE]){for(var c in a[EditorUi.DIFF_UPDATE]){var d=a[EditorUi.DIFF_UPDATE][c];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 e in b)null!=b[e].value&&(b[e].value="["+b[e].value.length+"]"),null!=b[e].xmlValue&&(b[e].xmlValue="["+b[e].xmlValue.length+
+this.anonymizeString(e.getAttribute("name")));a[EditorUi.DIFF_INSERT][b].data=mxUtils.getXml(e)}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 d=a[EditorUi.DIFF_UPDATE][c];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 e in b)null!=b[e].value&&(b[e].value="["+b[e].value.length+"]"),null!=b[e].xmlValue&&(b[e].xmlValue="["+b[e].xmlValue.length+
"]"),null!=b[e].style&&(b[e].style="["+b[e].style.length+"]"),0==Object.keys(b[e]).length&&delete b[e];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][c]}0==Object.keys(a[EditorUi.DIFF_UPDATE]).length&&delete a[EditorUi.DIFF_UPDATE]}return a};EditorUi.prototype.anonymizeAttributes=function(a,b){if(null!=a.attributes)for(var e=0;e<a.attributes.length;e++)"as"!=
a.attributes[e].name&&a.setAttribute(a.attributes[e].name,this.anonymizeString(a.attributes[e].value,b));if(null!=a.childNodes)for(e=0;e<a.childNodes.length;e++)this.anonymizeAttributes(a.childNodes[e],b)};EditorUi.prototype.anonymizeNode=function(a,b){for(var e=a.getElementsByTagName("mxCell"),c=0;c<e.length;c++)null!=e[c].getAttribute("value")&&e[c].setAttribute("value","["+e[c].getAttribute("value").length+"]"),null!=e[c].getAttribute("xmlValue")&&e[c].setAttribute("xmlValue","["+e[c].getAttribute("xmlValue").length+
"]"),null!=e[c].getAttribute("style")&&e[c].setAttribute("style","["+e[c].getAttribute("style").length+"]"),null!=e[c].parentNode&&"root"!=e[c].parentNode.nodeName&&null!=e[c].parentNode.parentNode&&(e[c].setAttribute("id",e[c].parentNode.getAttribute("id")),e[c].parentNode.parentNode.replaceChild(e[c],e[c].parentNode));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,f,g,k,
-l,n,x){f=null!=f?f:!0;g=null!=g?g:!1;var e=this.editor.graph;if(b||!a&&null!=n&&/(\.svg)$/i.test(n.getTitle()))if(x=!1,null!=this.pages&&this.currentPage!=this.pages[0]){var m=e.getGlobalVariable,e=this.createTemporaryGraph(e.getStylesheet()),p=this.pages[0];e.getGlobalVariable=function(a){return"page"==a?p.getName():"pagenumber"==a?1:m.apply(this,arguments)};document.body.appendChild(e.container);e.model.setRoot(p.root)}k=null!=k?k:this.getXmlFileData(f,g,x);n=null!=n?n:this.getCurrentFile();a=this.createFileData(k,
-e,n,window.location.href,a,b,c,d,f,l,x);e!=this.editor.graph&&e.container.parentNode.removeChild(e.container);return a};EditorUi.prototype.getHtml=function(a,b,c,d,f,g){g=null!=g?g:!0;var e=null,m=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=b){var e=g?b.getGraphBounds():b.getBoundingBox(b.getSelectionCells()),p=b.view.scale;g=Math.floor(e.x/p-b.view.translate.x);p=Math.floor(e.y/p-b.view.translate.y);e=b.background;null==f&&(b=this.getBasenames().join(";"),0<b.length&&(m=EditorUi.drawHost+
+l,n,A){f=null!=f?f:!0;g=null!=g?g:!1;var e=this.editor.graph;if(b||!a&&null!=n&&/(\.svg)$/i.test(n.getTitle()))if(A=!1,null!=this.pages&&this.currentPage!=this.pages[0]){var m=e.getGlobalVariable,e=this.createTemporaryGraph(e.getStylesheet()),p=this.pages[0];e.getGlobalVariable=function(a){return"page"==a?p.getName():"pagenumber"==a?1:m.apply(this,arguments)};document.body.appendChild(e.container);e.model.setRoot(p.root)}k=null!=k?k:this.getXmlFileData(f,g,A);n=null!=n?n:this.getCurrentFile();a=this.createFileData(k,
+e,n,window.location.href,a,b,c,d,f,l,A);e!=this.editor.graph&&e.container.parentNode.removeChild(e.container);return a};EditorUi.prototype.getHtml=function(a,b,c,d,f,g){g=null!=g?g:!0;var e=null,m=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=b){var e=g?b.getGraphBounds():b.getBoundingBox(b.getSelectionCells()),p=b.view.scale;g=Math.floor(e.x/p-b.view.translate.x);p=Math.floor(e.y/p-b.view.translate.y);e=b.background;null==f&&(b=this.getBasenames().join(";"),0<b.length&&(m=EditorUi.drawHost+
"/embed.js?s="+b));a.setAttribute("x0",g);a.setAttribute("y0",p)}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!=f&&(f=f.replace(/&/g,"&amp;"));a=null!=a?Graph.zapGremlins(mxUtils.getXml(a)):"";d=Graph.compress(a);Graph.decompress(d)!=a&&(d=encodeURIComponent(a));return(null==f?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':
"")+"<!DOCTYPE html>\n<html"+(null!=f?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==f?null!=c?"<title>"+mxUtils.htmlEntities(c)+"</title>\n":"":"<title>Draw.io Diagram</title>\n")+(null!=f?'<meta http-equiv="refresh" content="0;URL=\''+f+"'\"/>\n":"")+"</head>\n<body"+(null==f&&null!=e&&e!=mxConstants.NONE?' style="background-color:'+e+';">':">")+'\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==f?'<script type="text/javascript" src="'+m+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+f+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(a,b,c,d,f){b=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer.min.js";null!=f&&(f=f.replace(/&/g,"&amp;"));a={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,
@@ -9111,26 +9112,26 @@ f+"'\"/>\n":"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph"
function(a){a=this.validateFileData(a);this.pages=this.fileNode=this.currentPage=null;a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var b=Editor.extractParserError(a,mxResources.get("invalidOrMissingFile"));if(b)throw Error(mxResources.get("notADiagramFile")+" ("+b+")");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"))){var c=
null;this.fileNode=a;this.pages=[];for(var e=0;e<b.length;e++)null==b[e].getAttribute("id")&&b[e].setAttribute("id",e),a=new DiagramPage(b[e]),null==a.getName()&&a.setName(mxResources.get("pageWithNumber",[e+1])),this.pages.push(a),null!=urlParams["page-id"]&&a.getId()==urlParams["page-id"]&&(c=a);this.currentPage=null!=c?c: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);if(null!=urlParams["layer-ids"])try{var d=urlParams["layer-ids"].split(" ");a={};for(e=0;e<d.length;e++)a[d[e]]=!0;for(var f=this.editor.graph.getModel(),g=f.getChildren(f.root),e=0;e<g.length;e++){var k=g[e];f.setVisible(k,a[k.id]||
-!1)}}catch(C){}};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)||/(\.drawio)$/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,f,g,k,l,n,x,A){try{d=null!=d?d:this.editor.graph.isSelectionEmpty();var e=this.getBaseFilename(!f),m=e+"."+a;if("xml"==a){var p='<?xml version="1.0" encoding="UTF-8"?>\n'+this.getFileData(!0,null,null,null,d,f,null,null,null,b);this.saveData(m,a,p,"text/xml")}else if("html"==a)p=this.getHtml2(this.getFileData(!0),this.editor.graph,e),this.saveData(m,a,p,"text/html");else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==
-a?m=e+".png":"jpeg"==a&&(m=e+".jpg"),this.saveRequest(m,a,mxUtils.bind(this,function(b,c){try{var e=this.editor.graph.pageVisible;null!=g&&(this.editor.graph.pageVisible=g);var m=this.createDownloadRequest(b,a,d,c,k,f,l,n,x,A);this.editor.graph.pageVisible=e;return m}catch(Y){this.handleError(Y)}}));else{var v=null,q=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(m,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),
-mxUtils.bind(this,function(){mxUtils.popup(v)}))});if("svg"==a){var t=this.editor.graph.background;if(k||t==mxConstants.NONE)t=null;var y=this.editor.graph.getSvg(t,null,null,null,null,d);c&&this.editor.graph.addSvgShadow(y);this.convertImages(y,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 m=e+".svg",v=this.getFileData(!1,
-!0,null,mxUtils.bind(this,function(a){this.spinner.stop();q(a)}),d)}}catch(F){this.handleError(F)}};EditorUi.prototype.createDownloadRequest=function(a,b,c,d,f,g,k,l,n,x){var e=this.editor.graph,m=e.getGraphBounds();c=this.getFileData(!0,null,null,null,c,0==g?!1:"xmlpng"!=b);var p="",v="";if(m.width*m.height>MAX_AREA||c.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};x=x?"1":"0";"pdf"==b&&0==g&&(v="&allPages=1");if("xmlpng"==b&&(x="1",b="png",null!=this.pages&&null!=this.currentPage))for(g=
-0;g<this.pages.length;g++)if(this.pages[g]==this.currentPage){p="&from="+g;break}g=e.background;"png"==b&&f?g=mxConstants.NONE:f||null!=g&&g!=mxConstants.NONE||(g="#ffffff");f={globalVars:e.getExportVariables()};n&&(f.grid={size:e.gridSize,steps:e.view.gridSteps,color:e.view.gridColor});return new mxXmlRequest(EXPORT_URL,"format="+b+p+v+"&bg="+(null!=g?g:mxConstants.NONE)+"&base64="+d+"&embedXml="+x+"&xml="+encodeURIComponent(c)+(null!=a?"&filename="+encodeURIComponent(a):"")+"&extras="+encodeURIComponent(JSON.stringify(f))+
+!1)}}catch(B){}};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)||/(\.drawio)$/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,f,g,k,l,n,A,z){try{d=null!=d?d:this.editor.graph.isSelectionEmpty();var e=this.getBaseFilename(!f),m=e+"."+a;if("xml"==a){var p='<?xml version="1.0" encoding="UTF-8"?>\n'+this.getFileData(!0,null,null,null,d,f,null,null,null,b);this.saveData(m,a,p,"text/xml")}else if("html"==a)p=this.getHtml2(this.getFileData(!0),this.editor.graph,e),this.saveData(m,a,p,"text/html");else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==
+a?m=e+".png":"jpeg"==a&&(m=e+".jpg"),this.saveRequest(m,a,mxUtils.bind(this,function(b,c){try{var e=this.editor.graph.pageVisible;null!=g&&(this.editor.graph.pageVisible=g);var m=this.createDownloadRequest(b,a,d,c,k,f,l,n,A,z);this.editor.graph.pageVisible=e;return m}catch(Y){this.handleError(Y)}}));else{var u=null,q=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(m,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),
+mxUtils.bind(this,function(){mxUtils.popup(u)}))});if("svg"==a){var v=this.editor.graph.background;if(k||v==mxConstants.NONE)v=null;var x=this.editor.graph.getSvg(v,null,null,null,null,d);c&&this.editor.graph.addSvgShadow(x);this.convertImages(x,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 m=e+".svg",u=this.getFileData(!1,
+!0,null,mxUtils.bind(this,function(a){this.spinner.stop();q(a)}),d)}}catch(E){this.handleError(E)}};EditorUi.prototype.createDownloadRequest=function(a,b,c,d,f,g,k,l,n,A){var e=this.editor.graph,m=e.getGraphBounds();c=this.getFileData(!0,null,null,null,c,0==g?!1:"xmlpng"!=b);var p="",u="";if(m.width*m.height>MAX_AREA||c.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};A=A?"1":"0";"pdf"==b&&0==g&&(u="&allPages=1");if("xmlpng"==b&&(A="1",b="png",null!=this.pages&&null!=this.currentPage))for(g=
+0;g<this.pages.length;g++)if(this.pages[g]==this.currentPage){p="&from="+g;break}g=e.background;"png"==b&&f?g=mxConstants.NONE:f||null!=g&&g!=mxConstants.NONE||(g="#ffffff");f={globalVars:e.getExportVariables()};n&&(f.grid={size:e.gridSize,steps:e.view.gridSteps,color:e.view.gridColor});return new mxXmlRequest(EXPORT_URL,"format="+b+p+u+"&bg="+(null!=g?g:mxConstants.NONE)+"&base64="+d+"&embedXml="+A+"&xml="+encodeURIComponent(c)+(null!=a?"&filename="+encodeURIComponent(a):"")+"&extras="+encodeURIComponent(JSON.stringify(f))+
(null!=k?"&scale="+k:"")+(null!=l?"&border="+l:""))};EditorUi.prototype.setMode=function(a,b){this.mode=a};EditorUi.prototype.loadDescriptor=function(a,b,c){var e=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 e};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 f=null!=a.interval?parseInt(a.interval):6E4,m=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()),g()):this.handleError({message:mxResources.get("error")+
" "+a.getStatus()}))}),mxUtils.bind(this,function(a){this.handleError(a)}))}),g=mxUtils.bind(this,function(){window.clearTimeout(m);m=window.setTimeout(p,f)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){g();p()}));g();p()}null!=b&&b()});if(null!=a.url&&0<a.url.length){var f=a.url;/^https?:\/\//.test(f)&&!this.editor.isCorsEnabledForUrl(f)&&(f=PROXY_URL+"?url="+encodeURIComponent(f));this.loadUrl(f,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){e.alert(a.tooltip)});return b}var c=null,e=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,f=d.getModel();f.beginUpdate();var g=null;try{for(a=a.firstChild;null!=a;){if("update"==a.nodeName){var k=f.getCell(a.getAttribute("id"));
-if(null!=k){try{var l=a.getAttribute("value");if(null!=l){var x=mxUtils.parseXml(l).documentElement;if(null!=x)if("1"==x.getAttribute("replace-value"))f.setValue(k,x);else for(var A=x.attributes,n=0;n<A.length;n++)d.setAttributeForCell(k,A[n].nodeName,0<A[n].nodeValue.length?A[n].nodeValue:null)}}catch(K){null!=window.console&&console.log("Error in value for "+k.id+": "+K)}try{var D=a.getAttribute("style");null!=D&&d.model.setStyle(k,D)}catch(K){null!=window.console&&console.log("Error in style for "+
-k.id+": "+K)}try{var u=a.getAttribute("icon");if(null!=u){var H=0<u.length?JSON.parse(u):null;null!=H&&H.append||d.removeCellOverlays(k);null!=H&&d.addCellOverlay(k,b(H))}}catch(K){null!=window.console&&console.log("Error in icon for "+k.id+": "+K)}try{var G=a.getAttribute("geometry");if(null!=G){var G=JSON.parse(G),J=d.getCellGeometry(k);if(null!=J){J=J.clone();for(key in G){var I=parseFloat(G[key]);"dx"==key?J.x+=I:"dy"==key?J.y+=I:"dw"==key?J.width+=I:"dh"==key?J.height+=I:J[key]=parseFloat(G[key])}d.model.setGeometry(k,
-J)}}}catch(K){null!=window.console&&console.log("Error in icon for "+k.id+": "+K)}}}else if("model"==a.nodeName){for(var F=a.firstChild;null!=F&&F.nodeType!=mxConstants.NODETYPE_ELEMENT;)F=F.nextSibling;null!=F&&(new mxCodec(a.firstChild)).decode(F,f)}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{f.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,e="",d=c.lastIndexOf(".");0<=d&&(e=c.substring(d),c=c.substring(0,d));if(b)var f=new Date,d=f.getFullYear(),m=f.getMonth()+1,g=f.getDate(),k=f.getHours(),x=f.getMinutes(),f=f.getSeconds(),c=
-c+(" "+(d+"-"+m+"-"+g+"-"+k+"-"+x+"-"+f));return c=mxResources.get("copyOf",[c])+e};EditorUi.prototype.fileLoaded=function(a,b){var c=this.getCurrentFile();this.fileLoadedError=null;this.setCurrentFile(null);var e=!1;this.hideDialog();null!=c&&(EditorUi.debug("File.closed",[c]),c.removeListener(this.descriptorChangedListener),c.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var d=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=c&&this.updateDocumentTitle();
+if(null!=k){try{var l=a.getAttribute("value");if(null!=l){var A=mxUtils.parseXml(l).documentElement;if(null!=A)if("1"==A.getAttribute("replace-value"))f.setValue(k,A);else for(var z=A.attributes,n=0;n<z.length;n++)d.setAttributeForCell(k,z[n].nodeName,0<z[n].nodeValue.length?z[n].nodeValue:null)}}catch(K){null!=window.console&&console.log("Error in value for "+k.id+": "+K)}try{var D=a.getAttribute("style");null!=D&&d.model.setStyle(k,D)}catch(K){null!=window.console&&console.log("Error in style for "+
+k.id+": "+K)}try{var t=a.getAttribute("icon");if(null!=t){var G=0<t.length?JSON.parse(t):null;null!=G&&G.append||d.removeCellOverlays(k);null!=G&&d.addCellOverlay(k,b(G))}}catch(K){null!=window.console&&console.log("Error in icon for "+k.id+": "+K)}try{var H=a.getAttribute("geometry");if(null!=H){var H=JSON.parse(H),J=d.getCellGeometry(k);if(null!=J){J=J.clone();for(key in H){var I=parseFloat(H[key]);"dx"==key?J.x+=I:"dy"==key?J.y+=I:"dw"==key?J.width+=I:"dh"==key?J.height+=I:J[key]=parseFloat(H[key])}d.model.setGeometry(k,
+J)}}}catch(K){null!=window.console&&console.log("Error in icon for "+k.id+": "+K)}}}else if("model"==a.nodeName){for(var E=a.firstChild;null!=E&&E.nodeType!=mxConstants.NODETYPE_ELEMENT;)E=E.nextSibling;null!=E&&(new mxCodec(a.firstChild)).decode(E,f)}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{f.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,e="",d=c.lastIndexOf(".");0<=d&&(e=c.substring(d),c=c.substring(0,d));if(b)var f=new Date,d=f.getFullYear(),m=f.getMonth()+1,g=f.getDate(),k=f.getHours(),l=f.getMinutes(),f=f.getSeconds(),c=
+c+(" "+(d+"-"+m+"-"+g+"-"+k+"-"+l+"-"+f));return c=mxResources.get("copyOf",[c])+e};EditorUi.prototype.fileLoaded=function(a,b){var c=this.getCurrentFile();this.fileLoadedError=null;this.setCurrentFile(null);var e=!1;this.hideDialog();null!=c&&(EditorUi.debug("File.closed",[c]),c.removeListener(this.descriptorChangedListener),c.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var d=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=c&&this.updateDocumentTitle();
this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);!b&&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();b||this.showSplash()});if(null!=a)try{mxClient.IS_SF&&"min"==uiTheme&&(this.diagramContainer.style.visibility="");this.openingFile=!0;
this.setCurrentFile(a);a.addListener("descriptorChanged",this.descriptorChangedListener);a.addListener("contentChanged",this.descriptorChangedListener);a.open();delete this.openingFile;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"));e=!0;this.isOffline()||null==a.getMode()||EditorUi.logEvent({category:a.getMode().toUpperCase()+"-OPEN-FILE-"+
-a.getHash(),action:"size_"+a.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")});EditorUi.debug("File.opened",[a]);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(z){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(z){}}catch(z){this.fileLoadedError=z;if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+
-(null!=a?a.getHash():"none"),action:"message_"+z.message,label:"stack_"+z.stack})}catch(y){}var f=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()});b?f():this.handleError(z,mxResources.get("errorLoadingFile"),f,!0,null,null,!0)}else d();return e};EditorUi.prototype.getHashValueForPages=function(a,b){var c=0,e=new mxGraphModel,d=new mxCodec;null!=b&&(b.byteCount=
+a.getHash(),action:"size_"+a.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")});EditorUi.debug("File.opened",[a]);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(y){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(y){}}catch(y){this.fileLoadedError=y;if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+
+(null!=a?a.getHash():"none"),action:"message_"+y.message,label:"stack_"+y.stack})}catch(x){}var f=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()});b?f():this.handleError(y,mxResources.get("errorLoadingFile"),f,!0,null,null,!0)}else d();return e};EditorUi.prototype.getHashValueForPages=function(a,b){var c=0,e=new mxGraphModel,d=new mxCodec;null!=b&&(b.byteCount=
0,b.attrCount=0,b.eltCount=0,b.nodeCount=0);for(var f=0;f<a.length;f++){this.updatePageRoot(a[f]);var m=a[f].node.cloneNode(!1);m.removeAttribute("name");e.root=a[f].root;var g=d.encode(e);this.editor.graph.saveViewState(a[f].viewState,g,!0);g.removeAttribute("pageWidth");g.removeAttribute("pageHeight");m.appendChild(g);null!=b&&(b.eltCount+=m.getElementsByTagName("*").length,b.nodeCount+=m.getElementsByTagName("mxCell").length);c=(c<<5)-c+this.hashValue(m,function(a,b,c,e){return!e||"mxGeometry"!=
a.nodeName&&"mxPoint"!=a.nodeName||"x"!=b&&"y"!=b&&"width"!=b&&"height"!=b?e&&"mxCell"==a.nodeName&&"previous"==b?null:c:Math.round(c)},b)<<0}return c};EditorUi.prototype.hashValue=function(a,b,c){var e=0;if(null!=a&&"object"===typeof a&&"number"===typeof a.nodeType&&"string"===typeof a.nodeName&&"function"===typeof a.getAttribute){null!=a.nodeName&&(e^=this.hashValue(a.nodeName,b,c));if(null!=a.attributes){null!=c&&(c.attrCount+=a.attributes.length);for(var d=0;d<a.attributes.length;d++){var f=a.attributes[d].name,
m=null!=b?b(a,f,a.attributes[d].value,!0):a.attributes[d].value;null!=m&&(e^=this.hashValue(f,b,c)+this.hashValue(m,b,c))}}if(null!=a.childNodes)for(d=0;d<a.childNodes.length;d++)e=(e<<5)-e+this.hashValue(a.childNodes[d],b,c)<<0}else if(null!=a&&"function"!==typeof a){a=String(a);b=0;null!=c&&(c.byteCount+=a.length);for(d=0;d<a.length;d++)b=(b<<5)-b+a.charCodeAt(d)<<0;e^=b}return e};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=
@@ -9139,20 +9140,20 @@ c=b.createElement("mxlibrary");mxUtils.setTextContent(c,JSON.stringify(a));b.app
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,e=c.previousSibling;b.insertBefore(c,a);b.insertBefore(e,c)};EditorUi.prototype.loadLibrary=function(a,b){var c=mxUtils.parseXml(a.getData());if("mxlibrary"==c.documentElement.nodeName){var e=JSON.parse(mxUtils.getTextContent(c.documentElement));
this.libraryLoaded(a,e,c.documentElement.getAttribute("title"),b)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(a){return""};EditorUi.prototype.libraryLoaded=function(a,b,c,d){if(null!=this.sidebar){a.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(a.getHash());".scratchpad"==a.title&&(this.scratchpad=a);var e=this.sidebar.palettes[a.getHash()],e=null!=e?e[e.length-1].nextSibling:null;this.removeLibrarySidebar(a.getHash());var f=
null,m=mxUtils.bind(this,function(b,c){0==b.length&&a.isEditable()?(null==f&&(f=document.createElement("div"),f.className="geDropTarget",mxUtils.write(f,mxResources.get("dragElementsHere"))),c.appendChild(f)):this.addLibraryEntries(b,c)});null!=this.sidebar&&null!=b&&this.sidebar.addEntries(b);c=null!=c&&0<c.length?c:a.getTitle();var g=this.sidebar.addPalette(a.getHash(),c,null!=d?d:!0,mxUtils.bind(this,function(a){m(b,a)}));this.repositionLibrary(e);var p=g.parentNode.previousSibling;d=p.getAttribute("title");
-null!=d&&0<d.length&&".scratchpad"!=a.title&&p.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+d);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");p.style.position="relative";var A=document.createElement("img");A.setAttribute("src",Dialog.prototype.closeImage);A.setAttribute("title",mxResources.get("close"));A.setAttribute("valign","absmiddle");
-A.setAttribute("border","0");A.style.cursor="pointer";A.style.margin="0 3px";var l=null;if(".scratchpad"!=a.title||this.closableScratchpad)k.appendChild(A),mxEvent.addListener(A,"click",mxUtils.bind(this,function(b){if(!mxEvent.isConsumed(b)){var c=mxUtils.bind(this,function(){this.closeLibrary(a)});null!=l?this.confirm(mxResources.get("allChangesLost"),null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c();mxEvent.consume(b)}}));if(a.isEditable()){var q=this.editor.graph,n=null,
-u=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),g,b,a,a.getMode());mxEvent.consume(c)}),G=mxUtils.bind(this,function(c){a.setModified(!0);a.isAutosave()?(null!=n&&null!=n.parentNode&&n.parentNode.removeChild(n),n=A.cloneNode(!1),n.setAttribute("src",Editor.spinImage),n.setAttribute("title",mxResources.get("saving")),n.style.cursor="default",n.style.marginRight="2px",n.style.marginTop="-2px",k.insertBefore(n,k.firstChild),p.style.paddingRight=18*k.childNodes.length+"px",this.saveLibrary(a.getTitle(),
-b,a,a.getMode(),!0,!0,function(){null!=n&&null!=n.parentNode&&(n.parentNode.removeChild(n),p.style.paddingRight=18*k.childNodes.length+"px")})):null==l&&(l=A.cloneNode(!1),l.setAttribute("src",IMAGE_PATH+"/download.png"),l.setAttribute("title",mxResources.get("save")),k.insertBefore(l,k.firstChild),mxEvent.addListener(l,"click",mxUtils.bind(this,function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==l||a.isModified()||(p.style.paddingRight=18*k.childNodes.length+
-"px",l.parentNode.removeChild(l),l=null)});mxEvent.consume(c)})),p.style.paddingRight=18*k.childNodes.length+"px")}),J=mxUtils.bind(this,function(a,c,d,e){a=q.cloneCells(mxUtils.sortCells(q.model.getTopmostCells(a)));for(var m=0;m<a.length;m++){var p=q.getCellGeometry(a[m]);null!=p&&p.translate(-c.x,-c.y)}g.appendChild(this.sidebar.createVertexTemplateFromCells(a,c.width,c.height,e||"",!0,!1,!1));a={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:c.width,h:c.height};null!=e&&
-(a.title=e);b.push(a);G(d);null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)}),I=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 b=q.getSelectionCells(),c=q.view.getBounds(b),d=q.view.scale;c.x/=d;c.y/=d;c.width/=d;c.height/=d;c.x-=q.view.translate.x;c.y-=q.view.translate.y;
-J(b,c)}mxEvent.consume(a)});mxEvent.addGestureListeners(g,function(){},mxUtils.bind(this,function(a){q.isMouseDown&&null!=q.panningManager&&null!=q.graphHandler.first&&(q.graphHandler.suspend(),null!=q.graphHandler.hint&&(q.graphHandler.hint.style.visibility="hidden"),g.style.backgroundColor="#f1f3f4",g.style.cursor="copy",q.panningManager.stop(),q.autoScroll=!1,mxEvent.consume(a))}),mxUtils.bind(this,function(a){q.isMouseDown&&null!=q.panningManager&&null!=q.graphHandler&&(g.style.backgroundColor=
-"",g.style.cursor="default",this.sidebar.showTooltips=!0,q.panningManager.stop(),q.graphHandler.reset(),q.isMouseDown=!1,q.autoScroll=!0,I(a),mxEvent.consume(a))}));mxEvent.addListener(g,"mouseleave",mxUtils.bind(this,function(a){q.isMouseDown&&null!=q.graphHandler.first&&(q.graphHandler.resume(),null!=q.graphHandler.hint&&(q.graphHandler.hint.style.visibility="visible"),g.style.backgroundColor="",g.style.cursor="",q.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(g,"dragover",mxUtils.bind(this,
-function(a){g.style.backgroundColor="#f1f3f4";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.cursor="";g.style.backgroundColor="";0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(c,d,e,p,k,A,q,x,l){if(null!=c&&"image/"==d.substring(0,6))c="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+
-this.convertDataUri(c),c=[new mxCell("",new mxGeometry(0,0,k,A),c)],c[0].vertex=!0,J(c,new mxRectangle(0,0,k,A),a,mxEvent.isAltDown(a)?null:q.substring(0,q.lastIndexOf(".")).replace(/_/g," ")),null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null);else{var v=!1,t=mxUtils.bind(this,function(c,d){if(null!=c&&"application/pdf"==d){var e=Editor.extractGraphModelFromPdf(c);null!=e&&0<e.length&&(c=e)}if(null!=c)if(e=mxUtils.parseXml(c),"mxlibrary"==e.documentElement.nodeName)try{var p=
-JSON.parse(mxUtils.getTextContent(e.documentElement));m(p,g);b=b.concat(p);G(a);this.spinner.stop();v=!0}catch(M){}else if("mxfile"==e.documentElement.nodeName)try{for(var k=e.documentElement.getElementsByTagName("diagram"),p=0;p<k.length;p++){var q=this.stringToCells(Editor.getDiagramNodeXml(k[p])),A=this.editor.graph.getBoundingBoxFromGeometry(q);J(q,new mxRectangle(0,0,A.width,A.height),a)}v=!0}catch(M){null!=window.console&&console.log("error in drop handler:",M)}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!=l&&null!=q&&(/(\.v(dx|sdx?))($|\?)/i.test(q)||/(\.vs(x|sx?))($|\?)/i.test(q))?this.importVisio(l,function(a){t(a,"text/xml")},null,q):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,q)&&null!=l?this.parseFile(l,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?t(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?
-"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):t(c,d)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(g,"dragleave",function(a){g.style.cursor="";g.style.backgroundColor="";a.stopPropagation();a.preventDefault()}));A=A.cloneNode(!1);A.setAttribute("src",Editor.editImage);A.setAttribute("title",mxResources.get("edit"));k.insertBefore(A,k.firstChild);mxEvent.addListener(A,"click",u);mxEvent.addListener(g,"dblclick",function(a){mxEvent.getSource(a)==
-g&&u(a)});d=A.cloneNode(!1);d.setAttribute("src",Editor.plusImage);d.setAttribute("title",mxResources.get("add"));k.insertBefore(d,k.firstChild);mxEvent.addListener(d,"click",I);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);
+null!=d&&0<d.length&&".scratchpad"!=a.title&&p.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+d);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");p.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.cursor="pointer";l.style.margin="0 3px";var v=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!=v?this.confirm(mxResources.get("allChangesLost"),null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c();mxEvent.consume(b)}}));if(a.isEditable()){var n=this.editor.graph,t=null,
+G=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),g,b,a,a.getMode());mxEvent.consume(c)}),H=mxUtils.bind(this,function(c){a.setModified(!0);a.isAutosave()?(null!=t&&null!=t.parentNode&&t.parentNode.removeChild(t),t=l.cloneNode(!1),t.setAttribute("src",Editor.spinImage),t.setAttribute("title",mxResources.get("saving")),t.style.cursor="default",t.style.marginRight="2px",t.style.marginTop="-2px",k.insertBefore(t,k.firstChild),p.style.paddingRight=18*k.childNodes.length+"px",this.saveLibrary(a.getTitle(),
+b,a,a.getMode(),!0,!0,function(){null!=t&&null!=t.parentNode&&(t.parentNode.removeChild(t),p.style.paddingRight=18*k.childNodes.length+"px")})):null==v&&(v=l.cloneNode(!1),v.setAttribute("src",IMAGE_PATH+"/download.png"),v.setAttribute("title",mxResources.get("save")),k.insertBefore(v,k.firstChild),mxEvent.addListener(v,"click",mxUtils.bind(this,function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==v||a.isModified()||(p.style.paddingRight=18*k.childNodes.length+
+"px",v.parentNode.removeChild(v),v=null)});mxEvent.consume(c)})),p.style.paddingRight=18*k.childNodes.length+"px")}),J=mxUtils.bind(this,function(a,c,d,e){a=n.cloneCells(mxUtils.sortCells(n.model.getTopmostCells(a)));for(var m=0;m<a.length;m++){var p=n.getCellGeometry(a[m]);null!=p&&p.translate(-c.x,-c.y)}g.appendChild(this.sidebar.createVertexTemplateFromCells(a,c.width,c.height,e||"",!0,!1,!1));a={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:c.width,h:c.height};null!=e&&
+(a.title=e);b.push(a);H(d);null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)}),I=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(),c=n.view.getBounds(b),d=n.view.scale;c.x/=d;c.y/=d;c.width/=d;c.height/=d;c.x-=n.view.translate.x;c.y-=n.view.translate.y;
+J(b,c)}mxEvent.consume(a)});mxEvent.addGestureListeners(g,function(){},mxUtils.bind(this,function(a){n.isMouseDown&&null!=n.panningManager&&null!=n.graphHandler.first&&(n.graphHandler.suspend(),null!=n.graphHandler.hint&&(n.graphHandler.hint.style.visibility="hidden"),g.style.backgroundColor="#f1f3f4",g.style.cursor="copy",n.panningManager.stop(),n.autoScroll=!1,mxEvent.consume(a))}),mxUtils.bind(this,function(a){n.isMouseDown&&null!=n.panningManager&&null!=n.graphHandler&&(g.style.backgroundColor=
+"",g.style.cursor="default",this.sidebar.showTooltips=!0,n.panningManager.stop(),n.graphHandler.reset(),n.isMouseDown=!1,n.autoScroll=!0,I(a),mxEvent.consume(a))}));mxEvent.addListener(g,"mouseleave",mxUtils.bind(this,function(a){n.isMouseDown&&null!=n.graphHandler.first&&(n.graphHandler.resume(),null!=n.graphHandler.hint&&(n.graphHandler.hint.style.visibility="visible"),g.style.backgroundColor="",g.style.cursor="",n.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(g,"dragover",mxUtils.bind(this,
+function(a){g.style.backgroundColor="#f1f3f4";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.cursor="";g.style.backgroundColor="";0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(c,d,e,p,k,l,u,z,v){if(null!=c&&"image/"==d.substring(0,6))c="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+
+this.convertDataUri(c),c=[new mxCell("",new mxGeometry(0,0,k,l),c)],c[0].vertex=!0,J(c,new mxRectangle(0,0,k,l),a,mxEvent.isAltDown(a)?null:u.substring(0,u.lastIndexOf(".")).replace(/_/g," ")),null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null);else{var q=!1,n=mxUtils.bind(this,function(c,d){if(null!=c&&"application/pdf"==d){var e=Editor.extractGraphModelFromPdf(c);null!=e&&0<e.length&&(c=e)}if(null!=c)if(e=mxUtils.parseXml(c),"mxlibrary"==e.documentElement.nodeName)try{var p=
+JSON.parse(mxUtils.getTextContent(e.documentElement));m(p,g);b=b.concat(p);H(a);this.spinner.stop();q=!0}catch(M){}else if("mxfile"==e.documentElement.nodeName)try{for(var k=e.documentElement.getElementsByTagName("diagram"),p=0;p<k.length;p++){var l=this.stringToCells(Editor.getDiagramNodeXml(k[p])),u=this.editor.graph.getBoundingBoxFromGeometry(l);J(l,new mxRectangle(0,0,u.width,u.height),a)}q=!0}catch(M){null!=window.console&&console.log("error in drop handler:",M)}q||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));
+null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)});null!=v&&null!=u&&(/(\.v(dx|sdx?))($|\?)/i.test(u)||/(\.vs(x|sx?))($|\?)/i.test(u))?this.importVisio(v,function(a){n(a,"text/xml")},null,u):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,u)&&null!=v?this.parseFile(v,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(g,"dragleave",function(a){g.style.cursor="";g.style.backgroundColor="";a.stopPropagation();a.preventDefault()}));l=l.cloneNode(!1);l.setAttribute("src",Editor.editImage);l.setAttribute("title",mxResources.get("edit"));k.insertBefore(l,k.firstChild);mxEvent.addListener(l,"click",G);mxEvent.addListener(g,"dblclick",function(a){mxEvent.getSource(a)==
+g&&G(a)});d=l.cloneNode(!1);d.setAttribute("src",Editor.plusImage);d.setAttribute("title",mxResources.get("add"));k.insertBefore(d,k.firstChild);mxEvent.addListener(d,"click",I);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)})),k.insertBefore(d,k.firstChild))}p.appendChild(k);p.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],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(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.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground=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):"dark"==uiTheme&&(mxClient.link("stylesheet",STYLE_PATH+"/dark.css"),Dialog.backdropColor="#2a2a2a",Graph.prototype.defaultThemeName="darkTheme",Graph.prototype.defaultPageBackgroundColor="#2a2a2a",Graph.prototype.defaultPageBorderColor="#505759",Format.prototype.inactiveTabBackgroundColor=
@@ -9161,13 +9162,13 @@ Editor.checkmarkImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAM
480:360,Graph.fileSupport?200:90,!0,!0);a.init()};EditorUi.prototype.showBackgroundImageDialog=function(a){a=null!=a?a:mxUtils.bind(this,function(a){a=new ChangePageSetup(this,null,a);a.ignoreColor=!0;this.editor.graph.model.execute(a)});var b=new BackgroundImageDialog(this,mxUtils.bind(this,function(b){a(b)}));this.showDialog(b.container,360,200,!0,!0);b.init()};EditorUi.prototype.showLibraryDialog=function(a,b,c,d,f){a=new LibraryDialog(this,a,b,c,d,f);this.showDialog(a.container,640,440,!0,!1,
mxUtils.bind(this,function(a){a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));a.init()};var d=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(a){var b=d.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(a){this.editor.graph.isSelectionEmpty()&&b.refresh()}));return b};EditorUi.prototype.createSidebarFooterContainer=function(){var a=this.createDiv("geSidebarContainer geSidebarFooter");a.style.position=
"absolute";a.style.overflow="hidden";var b=document.createElement("a");b.className="geTitle";b.style.color="#DF6C0C";b.style.fontWeight="bold";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,f,g,k){var e=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},m=null!=a&&null!=a.error?a.error:a;if(null!=a&&null!=a.stack&&null!=a.message)try{k?null!=window.console&&console.error("EditorUi.handleError:",a):EditorUi.logError("Caught: "+(null!=a.message?a.message:"null"),null,null,null,a,"INFO")}catch(B){}if(null!=m||null!=b){k=mxUtils.htmlEntities(mxResources.get("unknownError"));
-var p=mxResources.get("ok"),A=null;b=null!=b?b:mxResources.get("error");if(null!=m){null!=m.retry&&(p=mxResources.get("cancel"),A=function(){e();m.retry()});if(404==m.code||404==m.status||403==m.code){k=403==m.code?null!=m.message?mxUtils.htmlEntities(m.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=f?f:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var q=
-null!=g?g:window.location.hash;if(null!=q&&("#G"==q.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==q.substring(0,45))&&(null!=a&&null!=a.error&&(null!=a.error.errors&&0<a.error.errors.length&&"fileAccess"==a.error.errors[0].reason||null!=a.error.data&&0<a.error.data.length&&"fileAccess"==a.error.data[0].reason)||404==m.code||404==m.status)){q="#U"==q.substring(0,2)?q.substring(45,q.lastIndexOf("%26ex")):q.substring(2);this.showError(b,k,mxResources.get("openInNewWindow"),mxUtils.bind(this,
-function(){this.editor.graph.openLink("https://drive.google.com/open?id="+q);this.handleError(a,b,c,d,f)}),A,mxResources.get("changeUser"),mxUtils.bind(this,function(){function a(){e.innerHTML="";for(var a=0;a<b.length;a++){var c=document.createElement("option");mxUtils.write(c,b[a].displayName);c.value=a;e.appendChild(c);c=document.createElement("option");c.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(c,"<"+b[a].email+">");c.setAttribute("disabled","disabled");e.appendChild(c)}c=document.createElement("option");
+mxEvent.consume(a)}));a.appendChild(b);return a};EditorUi.prototype.handleError=function(a,b,c,d,f,g,k){var e=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},m=null!=a&&null!=a.error?a.error:a;if(null!=a&&null!=a.stack&&null!=a.message)try{k?null!=window.console&&console.error("EditorUi.handleError:",a):EditorUi.logError("Caught: "+(null!=a.message?a.message:"null"),null,null,null,a,"INFO")}catch(C){}if(null!=m||null!=b){k=mxUtils.htmlEntities(mxResources.get("unknownError"));
+var p=mxResources.get("ok"),l=null;b=null!=b?b:mxResources.get("error");if(null!=m){null!=m.retry&&(p=mxResources.get("cancel"),l=function(){e();m.retry()});if(404==m.code||404==m.status||403==m.code){k=403==m.code?null!=m.message?mxUtils.htmlEntities(m.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=f?f:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var u=
+null!=g?g:window.location.hash;if(null!=u&&("#G"==u.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==u.substring(0,45))&&(null!=a&&null!=a.error&&(null!=a.error.errors&&0<a.error.errors.length&&"fileAccess"==a.error.errors[0].reason||null!=a.error.data&&0<a.error.data.length&&"fileAccess"==a.error.data[0].reason)||404==m.code||404==m.status)){u="#U"==u.substring(0,2)?u.substring(45,u.lastIndexOf("%26ex")):u.substring(2);this.showError(b,k,mxResources.get("openInNewWindow"),mxUtils.bind(this,
+function(){this.editor.graph.openLink("https://drive.google.com/open?id="+u);this.handleError(a,b,c,d,f)}),l,mxResources.get("changeUser"),mxUtils.bind(this,function(){function a(){e.innerHTML="";for(var a=0;a<b.length;a++){var c=document.createElement("option");mxUtils.write(c,b[a].displayName);c.value=a;e.appendChild(c);c=document.createElement("option");c.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(c,"<"+b[a].email+">");c.setAttribute("disabled","disabled");e.appendChild(c)}c=document.createElement("option");
mxUtils.write(c,mxResources.get("addAccount"));c.value=b.length;e.appendChild(c)}var b=this.drive.getUsersList(),c=document.createElement("div"),d=document.createElement("span");d.style.marginTop="6px";mxUtils.write(d,mxResources.get("changeUser")+": ");c.appendChild(d);var e=document.createElement("select");e.style.width="200px";a();mxEvent.addListener(e,"change",mxUtils.bind(this,function(){var c=e.value,d=b.length!=c;d&&this.drive.setUser(b[c]);this.drive.authorize(d,mxUtils.bind(this,function(){d||
(b=this.drive.getUsersList(),a())}),mxUtils.bind(this,function(a){this.handleError(a)}),!0)}));c.appendChild(e);c=new CustomDialog(this,c,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(c.container,300,75,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=c&&c()}),480,150);return}}null!=m.message?k=mxUtils.htmlEntities(m.message):null!=m.response&&null!=m.response.error?k=mxUtils.htmlEntities(m.response.error):"undefined"!==
-typeof window.App&&(m.code==App.ERROR_TIMEOUT?k=mxUtils.htmlEntities(mxResources.get("timeout")):m.code==App.ERROR_BUSY&&(k=mxUtils.htmlEntities(mxResources.get("busy"))))}var l=g=null;null!=m&&null!=m.helpLink&&(g=mxResources.get("help"),l=mxUtils.bind(this,function(){return this.editor.graph.openLink(m.helpLink)}));this.showError(b,k,p,c,A,null,null,g,l,null,null,null,d?c:null)}else null!=c&&c()};EditorUi.prototype.alert=function(a,b){var c=new ErrorDialog(this,null,a,mxResources.get("ok"),b);this.showDialog(c.container,
+typeof window.App&&(m.code==App.ERROR_TIMEOUT?k=mxUtils.htmlEntities(mxResources.get("timeout")):m.code==App.ERROR_BUSY&&(k=mxUtils.htmlEntities(mxResources.get("busy"))))}var n=g=null;null!=m&&null!=m.helpLink&&(g=mxResources.get("help"),n=mxUtils.bind(this,function(){return this.editor.graph.openLink(m.helpLink)}));this.showError(b,k,p,c,l,null,null,g,n,null,null,null,d?c:null)}else null!=c&&c()};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,f,g){var e=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},m=Math.min(200,28*Math.ceil(a.length/50));a=new ConfirmDialog(this,a,function(){e();null!=b&&b()},function(){e();null!=c&&c()},d,f,null,null,null,null,m);this.showDialog(a.container,340,46+m,!0,g);a.init()};EditorUi.prototype.showBanner=function(a,b,c){var d=!1;if(!(this.bannerShowing||this["hideBanner"+a]||isLocalStorage&&null!=mxSettings.settings&&
null!=mxSettings.settings["close"+a])){var e=document.createElement("div");e.style.cssText="position:absolute;bottom:10px;left:50%;max-width:90%;padding:18px 34px 12px 20px;font-size:16px;font-weight:bold;white-space:nowrap;cursor:pointer;z-index:"+mxPopupMenu.prototype.zIndex+";";mxUtils.setPrefixedStyle(e.style,"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(e.style,"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(e.style,"transition","all 1s ease");e.className="geBtn gePrimaryBtn";
d=document.createElement("img");d.setAttribute("src",IMAGE_PATH+"/logo.png");d.setAttribute("border","0");d.setAttribute("align","absmiddle");d.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";e.appendChild(d);d=document.createElement("img");d.setAttribute("src",Dialog.prototype.closeImage);d.setAttribute("title",mxResources.get("close"));d.setAttribute("border","0");d.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";
@@ -9178,10 +9179,10 @@ function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createSvgDa
function(a,b,c,d,f){var e="jpeg"==c?"jpg":c;d=this.getBaseFilename(d)+"."+e;a=this.createImageDataUri(a,b,c,f);this.saveData(d,e,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,null,null,null,null,!0);c.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(a,b,c,d,f){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.isOffline())navigator.standalone||null==c||"image/"!=c.substring(0,6)?this.showTextDialog(b+":",a):this.openInNewWindow(a,c,d);else{var e=document.createElement("a"),m=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&!mxClient.IS_IOS&&"undefined"!==typeof e.download;if(mxClient.IS_GC&&null!=navigator.userAgent)var g=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./),
-m=65==(g?parseInt(g[2],10):!1)?!1:m;if(m||this.isOffline()){e.href=URL.createObjectURL(d?this.base64ToBlob(a,c):new Blob([a],{type:c}));m?e.download=b:e.setAttribute("target","_blank");document.body.appendChild(e);try{window.setTimeout(function(){URL.revokeObjectURL(e.href)},0),e.click(),e.parentNode.removeChild(e)}catch(C){}}else this.createEchoRequest(a,b,c,d,f).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,c,d,f,g){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,
-a+(null!=c?"&mime="+c:"")+(null!=f?"&format="+f:"")+(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,e=Math.ceil(d/1024),f=Array(e),m=0;m<e;++m){for(var g=1024*m,k=Math.min(g+1024,d),l=Array(k-g),A=0;g<k;++A,++g)l[A]=c[g].charCodeAt(0);f[m]=new Uint8Array(l)}return new Blob(f,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,c,d,f,g,k){g=null!=g?g:!1;k=null!=k?k:
+m=65==(g?parseInt(g[2],10):!1)?!1:m;if(m||this.isOffline()){e.href=URL.createObjectURL(d?this.base64ToBlob(a,c):new Blob([a],{type:c}));m?e.download=b:e.setAttribute("target","_blank");document.body.appendChild(e);try{window.setTimeout(function(){URL.revokeObjectURL(e.href)},0),e.click(),e.parentNode.removeChild(e)}catch(B){}}else this.createEchoRequest(a,b,c,d,f).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,c,d,f,g){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,
+a+(null!=c?"&mime="+c:"")+(null!=f?"&format="+f:"")+(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,e=Math.ceil(d/1024),f=Array(e),m=0;m<e;++m){for(var g=1024*m,k=Math.min(g+1024,d),l=Array(k-g),z=0;g<k;++z,++g)l[z]=c[g].charCodeAt(0);f[m]=new Uint8Array(l)}return new Blob(f,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,c,d,f,g,k){g=null!=g?g:!1;k=null!=k?k:
"vsdx"!=f&&(!mxClient.IS_IOS||!navigator.standalone);f=this.getServiceCount(g);isLocalStorage&&f++;var e=4>=f?2:6<f?4:3;b=new CreateDialog(this,b,mxUtils.bind(this,function(b,e){try{if("_blank"==e)if(null!=c&&"image/"==c.substring(0,6))this.openInNewWindow(a,c,d);else{var f=window.open("about:blank");null==f?mxUtils.popup(a,!0):(f.document.write("<pre>"+mxUtils.htmlEntities(a,!1)+"</pre>"),f.document.close())}else e==App.MODE_DEVICE||"download"==e?this.doSaveLocalFile(a,b,c,d):null!=b&&0<b.length&&
-this.pickFolder(e,mxUtils.bind(this,function(f){try{this.exportFile(a,b,c,d,e,f)}catch(D){this.handleError(D)}}))}catch(E){this.handleError(E)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,g,k,null,1<f,e,a,c,d);g=this.isServices(f)?f>e?390:270:160;this.showDialog(b.container,400,g,!0,!0);b.init()};EditorUi.prototype.openInNewWindow=function(a,b,c){var d=window.open("about:blank");null==d||null==d.document?mxUtils.popup(a,!0):("image/svg+xml"!=
+this.pickFolder(e,mxUtils.bind(this,function(f){try{this.exportFile(a,b,c,d,e,f)}catch(D){this.handleError(D)}}))}catch(F){this.handleError(F)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,g,k,null,1<f,e,a,c,d);g=this.isServices(f)?f>e?390:270:160;this.showDialog(b.container,400,g,!0,!0);b.init()};EditorUi.prototype.openInNewWindow=function(a,b,c){var d=window.open("about:blank");null==d||null==d.document?mxUtils.popup(a,!0):("image/svg+xml"!=
b||mxClient.IS_SVG?(c=c?a:btoa(unescape(encodeURIComponent(a))),"image/svg+xml"==b?mxClient.IS_GC&&mxClient.IS_MAC?d.document.write('<html><object style="max-width:100%;" data="data:'+b+";base64,"+c+'"/></html>'):d.document.write("<html>"+a+"</html>"):d.document.write('<html><img style="max-width:100%;" src="data:'+b+";base64,"+c+'"/></html>')):d.document.write("<html><pre>"+mxUtils.htmlEntities(a,!1)+"</pre></html>"),d.document.close())};var c=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.addChromelessToolbarItems=
function(a){if(this.isExportToCanvas()){this.exportDialog=null;var b=a(mxUtils.bind(this,function(a){var c=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",c);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)c.apply(this);else{this.exportDialog=document.createElement("div");var d=b.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");
this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily="Helvetica,Arial";this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width="50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left=d.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+
@@ -9189,10 +9190,10 @@ this.chromelessToolbar.offsetHeight+4+"px";d=mxUtils.getCurrentStyle(this.editor
null,"png");a=document.createElement("img");a.style.maxWidth="140px";a.style.maxHeight="140px";a.style.cursor="pointer";a.style.backgroundColor="white";a.setAttribute("title",mxResources.get("openInNewWindow"));a.setAttribute("border","0");a.setAttribute("src",b);this.exportDialog.appendChild(a);mxEvent.addListener(a,"click",mxUtils.bind(this,function(){this.openInNewWindow(b.substring(b.indexOf(",")+1),"image/png",!0);c.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,
function(a){this.spinner.stop();this.handleError(a)}));mxEvent.addListener(this.editor.graph.container,"click",c);document.body.appendChild(this.exportDialog)}mxEvent.consume(a)}),Editor.cameraLargeImage,mxResources.get("export"))}c.apply(this,arguments)};EditorUi.prototype.saveData=function(a,b,c,d,f){this.isLocalFileSave()?this.saveLocalFile(c,a,d,f,b):this.saveRequest(a,b,mxUtils.bind(this,function(a,e){return this.createEchoRequest(c,a,d,f,b,e)}),c,f,d)};EditorUi.prototype.saveRequest=function(a,
b,c,d,f,g,k){k=null!=k?k:!mxClient.IS_IOS||!navigator.standalone;var e=this.getServiceCount(!1);isLocalStorage&&e++;var m=4>=e?2:6<e?4:3;a=new CreateDialog(this,a,mxUtils.bind(this,function(a,e){if("_blank"==e||null!=a&&0<a.length){var f=c("_blank"==e?null:a,e==App.MODE_DEVICE||"download"==e||null==e||"_blank"==e?"0":"1");null!=f&&(e==App.MODE_DEVICE||"download"==e||"_blank"==e?f.simulate(document,"_blank"):this.pickFolder(e,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,e,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,g,!0,e,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,k,null,1<e,m,d,g,f);e=this.isServices(e)?4<e?390:270:160;this.showDialog(a.container,380,e,!0,!0);a.init()};EditorUi.prototype.isServices=function(a){return 1!=a};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(a,b,c,d,f,g){};EditorUi.prototype.pickFolder=function(a,b,c){b(null)};EditorUi.prototype.exportSvg=function(a,b,c,d,f,g,k,l,n,x){if(this.spinner.spin(document.body,mxResources.get("export")))try{var e=
-this.editor.graph.isSelectionEmpty();c=null!=c?c:e;var m=b?null:this.editor.graph.background;m==mxConstants.NONE&&(m=null);null==m&&0==b&&(m="#ffffff");var p=this.editor.graph.getSvg(m,a,k,l,null,c,null,null,"blank"==x?"_blank":"self"==x?"_top":null,null,!0);d&&this.editor.graph.addSvgShadow(p);var q=this.getBaseFilename()+".svg",v=mxUtils.bind(this,function(a){this.spinner.stop();f&&a.setAttribute("content",this.getFileData(!0,null,null,null,c,n,null,null,null,!1));var b='<?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);this.isLocalFileSave()||b.length<=MAX_REQUEST_SIZE?this.saveData(q,"svg",b,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}))});this.editor.addFontCss(p);this.editor.graph.mathEnabled&&this.editor.addMathCss(p);g?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.convertImages(p,v,this.thumbImageCache)):v(p)}catch(G){this.handleError(G)}};EditorUi.prototype.addRadiobox=
+b;if(null!=d)try{this.exportFile(d,a,g,!0,e,c)}catch(C){this.handleError(C)}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,g,!0,e,c)}catch(C){this.handleError(C)}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<e,m,d,g,f);e=this.isServices(e)?4<e?390:270:160;this.showDialog(a.container,380,e,!0,!0);a.init()};EditorUi.prototype.isServices=function(a){return 1!=a};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(a,b,c,d,f,g){};EditorUi.prototype.pickFolder=function(a,b,c){b(null)};EditorUi.prototype.exportSvg=function(a,b,c,d,f,g,k,l,n,A){if(this.spinner.spin(document.body,mxResources.get("export")))try{var e=
+this.editor.graph.isSelectionEmpty();c=null!=c?c:e;var m=b?null:this.editor.graph.background;m==mxConstants.NONE&&(m=null);null==m&&0==b&&(m="#ffffff");var p=this.editor.graph.getSvg(m,a,k,l,null,c,null,null,"blank"==A?"_blank":"self"==A?"_top":null,null,!0);d&&this.editor.graph.addSvgShadow(p);var u=this.getBaseFilename()+".svg",q=mxUtils.bind(this,function(a){this.spinner.stop();f&&a.setAttribute("content",this.getFileData(!0,null,null,null,c,n,null,null,null,!1));var b='<?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);this.isLocalFileSave()||b.length<=MAX_REQUEST_SIZE?this.saveData(u,"svg",b,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}))});this.editor.addFontCss(p);this.editor.graph.mathEnabled&&this.editor.addMathCss(p);g?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.convertImages(p,q,this.thumbImageCache)):q(p)}catch(H){this.handleError(H)}};EditorUi.prototype.addRadiobox=
function(a,b,c,d,f,g,k){return this.addCheckbox(a,c,d,f,g,k,!0,b)};EditorUi.prototype.addCheckbox=function(a,b,c,d,f,g,k,l){g=null!=g?g:!0;var e=document.createElement("input");e.style.marginRight="8px";e.style.marginTop="16px";e.setAttribute("type",k?"radio":"checkbox");k="geCheckbox-"+Editor.guid();e.id=k;null!=l&&e.setAttribute("name",l);c&&(e.setAttribute("checked","checked"),e.defaultChecked=!0);d&&e.setAttribute("disabled","disabled");g&&(a.appendChild(e),c=document.createElement("label"),mxUtils.write(c,
b),c.setAttribute("for",k),a.appendChild(c),f||mxUtils.br(a));return e};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(),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,
@@ -9202,163 +9203,163 @@ e.setAttribute("value","blank");mxUtils.write(e,mxResources.get("openInNewWindow
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,c,d,f,g,k,l){var e=this.getCurrentFile(),m=[];d&&(m.push("lightbox=1"),"auto"!=a&&m.push("target="+a),null!=b&&b!=mxConstants.NONE&&m.push("highlight="+("#"==b.charAt(0)?b.substring(1):b)),null!=f&&0<f.length&&m.push("edit="+encodeURIComponent(f)),g&&m.push("layers=1"),this.editor.graph.foldingEnabled&&m.push("nav=1"));c&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&m.push("page-id="+this.currentPage.getId());a=!0;null!=k?c=
"#U"+encodeURIComponent(k):(e=this.getCurrentFile(),l||null==e||e.constructor!=window.DriveFile?c="#R"+encodeURIComponent(c?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(c="#"+e.getHash(),a=!1));a&&null!=e&&null!=e.getTitle()&&e.getTitle()!=this.defaultFilename&&m.push("title="+encodeURIComponent(e.getTitle()));return(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:
-"https://"+window.location.host+"/")+(0<m.length?"?"+m.join("&"):"")+c};EditorUi.prototype.createHtml=function(a,b,c,d,f,g,k,l,n,x,A){this.getBasenames();var e={};""!=f&&f!=mxConstants.NONE&&(e.highlight=f);"auto"!==d&&(e.target=d);n||(e.lightbox=!1);e.nav=this.editor.graph.foldingEnabled;c=parseInt(c);isNaN(c)||100==c||(e.zoom=c/100);c=[];k&&(c.push("pages"),e.resize=!0,null!=this.pages&&null!=this.currentPage&&(e.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(c.push("zoom"),e.resize=!0);
-l&&c.push("layers");0<c.length&&(n&&c.push("lightbox"),e.toolbar=c.join(" "));null!=x&&0<x.length&&(e.edit=x);null!=a?e.url=a:e.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(e))+'"></div>';a=null!=a?"&fetch="+encodeURIComponent(a):"";A(b,'<script type="text/javascript" src="'+(0<a.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":
+"https://"+window.location.host+"/")+(0<m.length?"?"+m.join("&"):"")+c};EditorUi.prototype.createHtml=function(a,b,c,d,f,g,k,l,n,A,z){this.getBasenames();var e={};""!=f&&f!=mxConstants.NONE&&(e.highlight=f);"auto"!==d&&(e.target=d);n||(e.lightbox=!1);e.nav=this.editor.graph.foldingEnabled;c=parseInt(c);isNaN(c)||100==c||(e.zoom=c/100);c=[];k&&(c.push("pages"),e.resize=!0,null!=this.pages&&null!=this.currentPage&&(e.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(c.push("zoom"),e.resize=!0);
+l&&c.push("layers");0<c.length&&(n&&c.push("lightbox"),e.toolbar=c.join(" "));null!=A&&0<A.length&&(e.edit=A);null!=a?e.url=a:e.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(e))+'"></div>';a=null!=a?"&fetch="+encodeURIComponent(a):"";z(b,'<script type="text/javascript" src="'+(0<a.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":
EditorUi.drawHost+"/embed2.js?")+a:"1"==urlParams.dev?"https://test.draw.io/js/viewer.min.js":window.VIEWER_URL?window.VIEWER_URL:EditorUi.drawHost+"/js/viewer.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(a,b,c,d){var e=document.createElement("div");e.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";e.appendChild(f);var m=document.createElement("div");
m.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");m.appendChild(f);var k=document.createElement("span");mxUtils.write(k,mxResources.get("includeCopyOfMyDiagram"));m.appendChild(k);mxUtils.br(m);m.appendChild(g);
k=document.createElement("span");mxUtils.write(k,mxResources.get("publicDiagramUrl"));m.appendChild(k);var p=this.getCurrentFile();null==c&&null!=p&&p.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")),m.appendChild(k),mxEvent.addListener(k,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(p.getId())})));f.setAttribute("checked",
-"checked");null==c&&g.setAttribute("disabled","disabled");e.appendChild(m);var l=this.addLinkSection(e),n=this.addCheckbox(e,mxResources.get("zoom"),!0,null,!0);mxUtils.write(e,":");var q=document.createElement("input");q.setAttribute("type","text");q.style.marginRight="16px";q.style.width="60px";q.style.marginLeft="4px";q.style.marginRight="12px";q.value="100%";e.appendChild(q);var u=this.addCheckbox(e,mxResources.get("fit"),!0),m=null!=this.pages&&1<this.pages.length,H=H=this.addCheckbox(e,mxResources.get("allPages"),
-m,!m),G=this.addCheckbox(e,mxResources.get("layers"),!0),J=this.addCheckbox(e,mxResources.get("lightbox"),!0),I=this.addEditButton(e,J),F=I.getEditInput();F.style.marginBottom="16px";mxEvent.addListener(J,"change",function(){J.checked?F.removeAttribute("disabled"):F.setAttribute("disabled","disabled");F.checked&&J.checked?I.getEditSelect().removeAttribute("disabled"):I.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,e,mxUtils.bind(this,function(){d(g.checked?c:null,n.checked,
-q.value,l.getTarget(),l.getColor(),u.checked,H.checked,G.checked,J.checked,I.getLink())}),null,a,b);this.showDialog(a.container,340,384,!0,!0);f.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,c,d,f,g){var e=document.createElement("div");e.style.whiteSpace="nowrap";var m=document.createElement("h3");mxUtils.write(m,a||mxResources.get("link"));m.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";e.appendChild(m);var k=this.getCurrentFile(),m="https://desk.draw.io/support/solutions/articles/16000051941";
+"checked");null==c&&g.setAttribute("disabled","disabled");e.appendChild(m);var l=this.addLinkSection(e),n=this.addCheckbox(e,mxResources.get("zoom"),!0,null,!0);mxUtils.write(e,":");var v=document.createElement("input");v.setAttribute("type","text");v.style.marginRight="16px";v.style.width="60px";v.style.marginLeft="4px";v.style.marginRight="12px";v.value="100%";e.appendChild(v);var t=this.addCheckbox(e,mxResources.get("fit"),!0),m=null!=this.pages&&1<this.pages.length,G=G=this.addCheckbox(e,mxResources.get("allPages"),
+m,!m),H=this.addCheckbox(e,mxResources.get("layers"),!0),J=this.addCheckbox(e,mxResources.get("lightbox"),!0),I=this.addEditButton(e,J),E=I.getEditInput();E.style.marginBottom="16px";mxEvent.addListener(J,"change",function(){J.checked?E.removeAttribute("disabled"):E.setAttribute("disabled","disabled");E.checked&&J.checked?I.getEditSelect().removeAttribute("disabled"):I.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,e,mxUtils.bind(this,function(){d(g.checked?c:null,n.checked,
+v.value,l.getTarget(),l.getColor(),t.checked,G.checked,H.checked,J.checked,I.getLink())}),null,a,b);this.showDialog(a.container,340,384,!0,!0);f.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,c,d,f,g){var e=document.createElement("div");e.style.whiteSpace="nowrap";var m=document.createElement("h3");mxUtils.write(m,a||mxResources.get("link"));m.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";e.appendChild(m);var k=this.getCurrentFile(),m="https://desk.draw.io/support/solutions/articles/16000051941";
a=0;if(null!=k&&k.constructor==window.DriveFile&&!b){a=80;var m="https://desk.draw.io/support/solutions/articles/16000039384",p=document.createElement("div");p.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var l=document.createElement("div");l.style.whiteSpace="normal";mxUtils.write(l,mxResources.get("linkAccountRequired"));p.appendChild(l);l=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(k.getId())}));
l.style.marginTop="12px";l.className="geBtn";p.appendChild(l);e.appendChild(p);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"));p.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 n=null,q=null;if(null!=c||null!=d)a+=30,mxUtils.write(e,mxResources.get("width")+":"),n=document.createElement("input"),n.setAttribute("type","text"),n.style.marginRight="16px",n.style.width="50px",n.style.marginLeft="6px",n.style.marginRight="16px",n.style.marginBottom="10px",n.value="100%",e.appendChild(n),mxUtils.write(e,mxResources.get("height")+
-":"),q=document.createElement("input"),q.setAttribute("type","text"),q.style.width="50px",q.style.marginLeft="6px",q.style.marginBottom="10px",q.value=d+"px",e.appendChild(q),mxUtils.br(e);var v=this.addLinkSection(e,g);c=null!=this.pages&&1<this.pages.length;var t=null;if(null==k||k.constructor!=window.DriveFile||b)t=this.addCheckbox(e,mxResources.get("allPages"),c,!c);var u=this.addCheckbox(e,mxResources.get("lightbox"),!0),J=this.addEditButton(e,u),I=J.getEditInput(),F=this.addCheckbox(e,mxResources.get("layers"),
-!0);F.style.marginLeft=I.style.marginLeft;F.style.marginBottom="16px";F.style.marginTop="8px";mxEvent.addListener(u,"change",function(){u.checked?(F.removeAttribute("disabled"),I.removeAttribute("disabled")):(F.setAttribute("disabled","disabled"),I.setAttribute("disabled","disabled"));I.checked&&u.checked?J.getEditSelect().removeAttribute("disabled"):J.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,e,mxUtils.bind(this,function(){f(v.getTarget(),v.getColor(),null==t?
-!0:t.checked,u.checked,J.getLink(),F.checked,null!=n?n.value:null,null!=q?q.value:null)}),null,mxResources.get("create"),m);this.showDialog(b.container,340,254+a,!0,!0);null!=n?(n.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?n.select():document.execCommand("selectAll",!1,null)):v.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,c,d,f){var e=document.createElement("div");e.style.whiteSpace="nowrap";var m=document.createElement("h3");mxUtils.write(m,
+null,mxResources.get(null!=a?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(a.container,300,80,!0,!1);a.init()}))}))}var n=null,u=null;if(null!=c||null!=d)a+=30,mxUtils.write(e,mxResources.get("width")+":"),n=document.createElement("input"),n.setAttribute("type","text"),n.style.marginRight="16px",n.style.width="50px",n.style.marginLeft="6px",n.style.marginRight="16px",n.style.marginBottom="10px",n.value="100%",e.appendChild(n),mxUtils.write(e,mxResources.get("height")+
+":"),u=document.createElement("input"),u.setAttribute("type","text"),u.style.width="50px",u.style.marginLeft="6px",u.style.marginBottom="10px",u.value=d+"px",e.appendChild(u),mxUtils.br(e);var v=this.addLinkSection(e,g);c=null!=this.pages&&1<this.pages.length;var q=null;if(null==k||k.constructor!=window.DriveFile||b)q=this.addCheckbox(e,mxResources.get("allPages"),c,!c);var t=this.addCheckbox(e,mxResources.get("lightbox"),!0),J=this.addEditButton(e,t),I=J.getEditInput(),E=this.addCheckbox(e,mxResources.get("layers"),
+!0);E.style.marginLeft=I.style.marginLeft;E.style.marginBottom="16px";E.style.marginTop="8px";mxEvent.addListener(t,"change",function(){t.checked?(E.removeAttribute("disabled"),I.removeAttribute("disabled")):(E.setAttribute("disabled","disabled"),I.setAttribute("disabled","disabled"));I.checked&&t.checked?J.getEditSelect().removeAttribute("disabled"):J.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,e,mxUtils.bind(this,function(){f(v.getTarget(),v.getColor(),null==q?
+!0:q.checked,t.checked,J.getLink(),E.checked,null!=n?n.value:null,null!=u?u.value:null)}),null,mxResources.get("create"),m);this.showDialog(b.container,340,254+a,!0,!0);null!=n?(n.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?n.select():document.execCommand("selectAll",!1,null)):v.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,c,d,f){var e=document.createElement("div");e.style.whiteSpace="nowrap";var m=document.createElement("h3");mxUtils.write(m,
mxResources.get("image"));m.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(f?"10":"4")+"px";e.appendChild(m);if(f){mxUtils.write(e,mxResources.get("zoom")+":");var g=document.createElement("input");g.setAttribute("type","text");g.style.marginRight="16px";g.style.width="60px";g.style.marginLeft="4px";g.style.marginRight="12px";g.value=this.lastExportZoom||"100%";e.appendChild(g);mxUtils.write(e,mxResources.get("borderWidth")+":");var k=document.createElement("input");k.setAttribute("type",
"text");k.style.marginRight="16px";k.style.width="60px";k.style.marginLeft="4px";k.value=this.lastExportBorder||"0";e.appendChild(k);mxUtils.br(e)}var p=this.addCheckbox(e,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),l=d?null:this.addCheckbox(e,mxResources.get("includeCopyOfMyDiagram"),!0),m=this.editor.graph,n=d?null:this.addCheckbox(e,mxResources.get("transparentBackground"),m.background==mxConstants.NONE||null==m.background);null!=n&&(n.style.marginBottom="16px");a=
new CustomDialog(this,e,mxUtils.bind(this,function(){var a=parseInt(g.value)/100||1,b=parseInt(k.value)||0;c(!p.checked,null!=l?l.checked:!1,null!=n?n.checked:!1,a,b)}),null,a,b);this.showDialog(a.container,300,(f?25:0)+(d?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,c,d,f,g,k,l){k=null!=k?k:!0;var e=document.createElement("div");e.style.whiteSpace="nowrap";var m=this.editor.graph,p="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";
-e.appendChild(n);mxUtils.write(e,mxResources.get("zoom")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.marginRight="16px";q.style.width="60px";q.style.marginLeft="4px";q.style.marginRight="12px";q.value=this.lastExportZoom||"100%";e.appendChild(q);mxUtils.write(e,mxResources.get("borderWidth")+":");var v=document.createElement("input");v.setAttribute("type","text");v.style.marginRight="16px";v.style.width="60px";v.style.marginLeft="4px";v.value=this.lastExportBorder||
-"0";e.appendChild(v);mxUtils.br(e);var t=this.addCheckbox(e,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=l),u=this.addCheckbox(e,mxResources.get("selectionOnly"),!1,m.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");g&&(e.appendChild(y),mxUtils.write(e,mxResources.get("crop")),mxUtils.br(e),p+=26,mxEvent.addListener(u,"change",function(){u.checked?
-y.removeAttribute("disabled"):y.setAttribute("disabled","disabled")}));m.isSelectionEmpty()||(y.setAttribute("checked","checked"),y.defaultChecked=!0);var z=this.addCheckbox(e,mxResources.get("shadow"),m.shadowVisible),F=document.createElement("input");F.style.marginTop="16px";F.style.marginRight="8px";F.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||F.setAttribute("disabled","disabled");b&&(e.appendChild(F),mxUtils.write(e,mxResources.get("embedImages")),mxUtils.br(e),p+=
+e.appendChild(n);mxUtils.write(e,mxResources.get("zoom")+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.marginRight="16px";u.style.width="60px";u.style.marginLeft="4px";u.style.marginRight="12px";u.value=this.lastExportZoom||"100%";e.appendChild(u);mxUtils.write(e,mxResources.get("borderWidth")+":");var v=document.createElement("input");v.setAttribute("type","text");v.style.marginRight="16px";v.style.width="60px";v.style.marginLeft="4px";v.value=this.lastExportBorder||
+"0";e.appendChild(v);mxUtils.br(e);var q=this.addCheckbox(e,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=l),t=this.addCheckbox(e,mxResources.get("selectionOnly"),!1,m.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&&(e.appendChild(x),mxUtils.write(e,mxResources.get("crop")),mxUtils.br(e),p+=26,mxEvent.addListener(t,"change",function(){t.checked?
+x.removeAttribute("disabled"):x.setAttribute("disabled","disabled")}));m.isSelectionEmpty()||(x.setAttribute("checked","checked"),x.defaultChecked=!0);var y=this.addCheckbox(e,mxResources.get("shadow"),m.shadowVisible),E=document.createElement("input");E.style.marginTop="16px";E.style.marginRight="8px";E.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||E.setAttribute("disabled","disabled");b&&(e.appendChild(E),mxUtils.write(e,mxResources.get("embedImages")),mxUtils.br(e),p+=
26);var K=null;if("png"==l||"jpeg"==l)K=this.addCheckbox(e,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),p+=26;var O=this.addCheckbox(e,mxResources.get("includeCopyOfMyDiagram"),k,null,null,"jpeg"!=l),Q=null!=this.pages&&1<this.pages.length,Y=this.addCheckbox(e,Q?mxResources.get("allPages"):"",Q,!Q,null,"jpeg"!=l);Y.style.marginLeft="24px";Y.style.marginBottom="16px";Q?p+=26:Y.style.display="none";mxEvent.addListener(O,"change",function(){O.checked&&Q?Y.removeAttribute("disabled"):
Y.setAttribute("disabled","disabled")});k&&Q||Y.setAttribute("disabled","disabled");var U=document.createElement("select");U.style.maxWidth="260px";U.style.marginLeft="8px";U.style.marginRight="10px";U.className="geBtn";a=document.createElement("option");a.setAttribute("value","auto");mxUtils.write(a,mxResources.get("automatic"));U.appendChild(a);a=document.createElement("option");a.setAttribute("value","blank");mxUtils.write(a,mxResources.get("openInNewWindow"));U.appendChild(a);a=document.createElement("option");
-a.setAttribute("value","self");mxUtils.write(a,mxResources.get("openInThisWindow"));U.appendChild(a);"svg"==l&&(mxUtils.write(e,mxResources.get("links")+":"),e.appendChild(U),mxUtils.br(e),mxUtils.br(e),p+=26);c=new CustomDialog(this,e,mxUtils.bind(this,function(){this.lastExportBorder=v.value;this.lastExportZoom=q.value;f(q.value,t.checked,!u.checked,z.checked,O.checked,F.checked,v.value,y.checked,!Y.checked,U.value,null!=K?K.checked:null)}),null,c,d);this.showDialog(c.container,340,p,!0,!0,null,
-null,null,null,!0);q.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?q.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,c,d,f){var e=document.createElement("div");e.style.whiteSpace="nowrap";var m=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";e.appendChild(g)}var k=this.addCheckbox(e,mxResources.get("fit"),
-!0),p=this.addCheckbox(e,mxResources.get("shadow"),m.shadowVisible&&d,!d),l=this.addCheckbox(e,c),n=this.addCheckbox(e,mxResources.get("lightbox"),!0),q=this.addEditButton(e,n),t=q.getEditInput(),u=1<m.model.getChildCount(m.model.getRoot()),G=this.addCheckbox(e,mxResources.get("layers"),u,!u);G.style.marginLeft=t.style.marginLeft;G.style.marginBottom="12px";G.style.marginTop="8px";mxEvent.addListener(n,"change",function(){n.checked?(u&&G.removeAttribute("disabled"),t.removeAttribute("disabled")):
-(G.setAttribute("disabled","disabled"),t.setAttribute("disabled","disabled"));t.checked&&n.checked?q.getEditSelect().removeAttribute("disabled"):q.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,e,mxUtils.bind(this,function(){a(k.checked,p.checked,l.checked,n.checked,q.getLink(),G.checked)}),null,mxResources.get("embed"),f);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,c,d,f,g,k,l){function e(b){var e=" ",p="";d&&(e=" 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('"+
+a.setAttribute("value","self");mxUtils.write(a,mxResources.get("openInThisWindow"));U.appendChild(a);"svg"==l&&(mxUtils.write(e,mxResources.get("links")+":"),e.appendChild(U),mxUtils.br(e),mxUtils.br(e),p+=26);c=new CustomDialog(this,e,mxUtils.bind(this,function(){this.lastExportBorder=v.value;this.lastExportZoom=u.value;f(u.value,q.checked,!t.checked,y.checked,O.checked,E.checked,v.value,x.checked,!Y.checked,U.value,null!=K?K.checked:null)}),null,c,d);this.showDialog(c.container,340,p,!0,!0,null,
+null,null,null,!0);u.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?u.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,c,d,f){var e=document.createElement("div");e.style.whiteSpace="nowrap";var m=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";e.appendChild(g)}var k=this.addCheckbox(e,mxResources.get("fit"),
+!0),p=this.addCheckbox(e,mxResources.get("shadow"),m.shadowVisible&&d,!d),l=this.addCheckbox(e,c),n=this.addCheckbox(e,mxResources.get("lightbox"),!0),v=this.addEditButton(e,n),q=v.getEditInput(),t=1<m.model.getChildCount(m.model.getRoot()),H=this.addCheckbox(e,mxResources.get("layers"),t,!t);H.style.marginLeft=q.style.marginLeft;H.style.marginBottom="12px";H.style.marginTop="8px";mxEvent.addListener(n,"change",function(){n.checked?(t&&H.removeAttribute("disabled"),q.removeAttribute("disabled")):
+(H.setAttribute("disabled","disabled"),q.setAttribute("disabled","disabled"));q.checked&&n.checked?v.getEditSelect().removeAttribute("disabled"):v.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,e,mxUtils.bind(this,function(){a(k.checked,p.checked,l.checked,n.checked,v.getLink(),H.checked)}),null,mxResources.get("embed"),f);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,c,d,f,g,k,l){function e(b){var e=" ",p="";d&&(e=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
EditorUi.drawHost+"/?client=1&lightbox=1"+(f?"&edit=_blank":"")+(g?"&layers=1":"")+"');}})(this);\"",p+="cursor:pointer;");a&&(p+="max-width:100%;");var l="";c&&(l=' width="'+Math.round(m.width)+'" height="'+Math.round(m.height)+'"');k('<img src="'+b+'"'+l+(""!=p?' style="'+p+'"':"")+e+"/>")}var m=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");e(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),m.width*m.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){var p="";c&&(p="&w="+Math.round(2*m.width)+"&h="+Math.round(2*m.height));var n=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(d?"1":"0")+p+"&xml="+encodeURIComponent(b));n.send(mxUtils.bind(this,function(){200<=n.getStatus()&&299>=n.getStatus()?e("data:image/png;base64,"+n.getText()):l({message:mxResources.get("unknownError")})}))}else l({message:mxResources.get("drawingTooLarge")})};
-EditorUi.prototype.createEmbedSvg=function(a,b,c,d,f,g,k){var e=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!c),m=e.getElementsByTagName("a");if(null!=m)for(var p=0;p<m.length;p++){var l=m[p].getAttribute("href");null!=l&&"#"==l.charAt(0)&&"_blank"==m[p].getAttribute("target")&&m[p].removeAttribute("target")}d&&e.setAttribute("content",this.getFileData(!0));b&&this.editor.graph.addSvgShadow(e);if(c){var n=" ",q="";d&&(n="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
-EditorUi.drawHost+"/?client=1&lightbox=1"+(f?"&edit=_blank":"")+(g?"&layers=1":"")+"');}})(this);\"",q+="cursor:pointer;");a&&(q+="max-width:100%;");this.convertImages(e,mxUtils.bind(this,function(a){k('<img src="'+this.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=q?' style="'+q+'"':"")+n+"/>")}))}else q="",d&&(e.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
-EditorUi.drawHost+"/?client=1&lightbox=1"+(f?"&edit=_blank":"")+(g?"&layers=1":"")+"');}}})(this);"),q+="cursor:pointer;"),a&&(a=parseInt(e.getAttribute("width")),b=parseInt(e.getAttribute("height")),e.setAttribute("viewBox","-0.5 -0.5 "+a+" "+b),q+="max-width:100%;max-height:"+b+"px;",e.removeAttribute("height")),""!=q&&e.setAttribute("style",q),this.editor.addFontCss(e),this.editor.graph.mathEnabled&&this.editor.addMathCss(e),k(mxUtils.getXml(e))};EditorUi.prototype.timeSince=function(a){a=Math.floor((new Date-
+EditorUi.prototype.createEmbedSvg=function(a,b,c,d,f,g,k){var e=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!c),m=e.getElementsByTagName("a");if(null!=m)for(var p=0;p<m.length;p++){var l=m[p].getAttribute("href");null!=l&&"#"==l.charAt(0)&&"_blank"==m[p].getAttribute("target")&&m[p].removeAttribute("target")}d&&e.setAttribute("content",this.getFileData(!0));b&&this.editor.graph.addSvgShadow(e);if(c){var n=" ",u="";d&&(n="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
+EditorUi.drawHost+"/?client=1&lightbox=1"+(f?"&edit=_blank":"")+(g?"&layers=1":"")+"');}})(this);\"",u+="cursor:pointer;");a&&(u+="max-width:100%;");this.convertImages(e,mxUtils.bind(this,function(a){k('<img src="'+this.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=u?' style="'+u+'"':"")+n+"/>")}))}else u="",d&&(e.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
+EditorUi.drawHost+"/?client=1&lightbox=1"+(f?"&edit=_blank":"")+(g?"&layers=1":"")+"');}}})(this);"),u+="cursor:pointer;"),a&&(a=parseInt(e.getAttribute("width")),b=parseInt(e.getAttribute("height")),e.setAttribute("viewBox","-0.5 -0.5 "+a+" "+b),u+="max-width:100%;max-height:"+b+"px;",e.removeAttribute("height")),""!=u&&e.setAttribute("style",u),this.editor.addFontCss(e),this.editor.graph.mathEnabled&&this.editor.addMathCss(e),k(mxUtils.getXml(e))};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.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&&(a=Editor.parseDiagramNode(c))}d=this.editor.graph;try{this.editor.graph=b,this.editor.setGraphXml(a)}catch(v){}finally{this.editor.graph=d}return a};EditorUi.prototype.getEmbeddedPng=function(a,b,c){try{var d=this.editor.graph,e=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),e=c;else if(null!=this.pages&&this.currentPage!=this.pages[0]){var d=this.createTemporaryGraph(d.getStylesheet()),f=d.getGlobalVariable,g=this.pages[0];d.getGlobalVariable=function(a){return"page"==a?g.getName():"pagenumber"==a?1:f.apply(this,arguments)};document.body.appendChild(d.container);
-d.model.setRoot(g.root)}this.exportToCanvas(mxUtils.bind(this,function(c){try{null==e&&(e=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var f=c.toDataURL("image/png"),f=this.writeGraphModelToPng(f,"tEXt","mxfile",encodeURIComponent(e));a(f.substring(f.lastIndexOf(",")+1));d!=this.editor.graph&&d.container.parentNode.removeChild(d.container)}catch(x){null!=b&&b(x)}}),null,null,null,mxUtils.bind(this,function(a){null!=b&&b(a)}),null,null,null,null,d.shadowVisible,null,d)}catch(y){null!=
-b&&b(y)}};EditorUi.prototype.getEmbeddedSvg=function(a,b,c,d,f,g,k,l){l=null!=l?l:!0;k=b.background;k==mxConstants.NONE&&(k=null);g=b.getSvg(k,null,null,null,null,g);b.shadowVisible&&b.addSvgShadow(g);null!=a&&g.setAttribute("content",a);null!=c&&g.setAttribute("resource",c);if(null!=f)this.embedFonts(g,mxUtils.bind(this,function(a){l?this.convertImages(a,mxUtils.bind(this,function(a){f((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')+
+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&&(a=Editor.parseDiagramNode(c))}d=this.editor.graph;try{this.editor.graph=b,this.editor.setGraphXml(a)}catch(u){}finally{this.editor.graph=d}return a};EditorUi.prototype.getEmbeddedPng=function(a,b,c){try{var d=this.editor.graph,e=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),e=c;else if(null!=this.pages&&this.currentPage!=this.pages[0]){var d=this.createTemporaryGraph(d.getStylesheet()),f=d.getGlobalVariable,m=this.pages[0];d.getGlobalVariable=function(a){return"page"==a?m.getName():"pagenumber"==a?1:f.apply(this,arguments)};document.body.appendChild(d.container);
+d.model.setRoot(m.root)}this.exportToCanvas(mxUtils.bind(this,function(c){try{null==e&&(e=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var f=c.toDataURL("image/png"),f=this.writeGraphModelToPng(f,"tEXt","mxfile",encodeURIComponent(e));a(f.substring(f.lastIndexOf(",")+1));d!=this.editor.graph&&d.container.parentNode.removeChild(d.container)}catch(A){null!=b&&b(A)}}),null,null,null,mxUtils.bind(this,function(a){null!=b&&b(a)}),null,null,null,null,d.shadowVisible,null,d)}catch(x){null!=
+b&&b(x)}};EditorUi.prototype.getEmbeddedSvg=function(a,b,c,d,f,g,k,l){l=null!=l?l:!0;k=b.background;k==mxConstants.NONE&&(k=null);g=b.getSvg(k,null,null,null,null,g);b.shadowVisible&&b.addSvgShadow(g);null!=a&&g.setAttribute("content",a);null!=c&&g.setAttribute("resource",c);if(null!=f)this.embedFonts(g,mxUtils.bind(this,function(a){l?this.convertImages(a,mxUtils.bind(this,function(a){f((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))})):f((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(g)};EditorUi.prototype.embedFonts=function(a,b){this.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&
-this.editor.addFontCss(a,this.editor.resolvedFontCss),this.embedExtFonts(mxUtils.bind(this,function(c){try{null!=c&&this.editor.addFontCss(a,c),b(a)}catch(q){b(a)}}))}catch(p){b(a)}}))};EditorUi.prototype.exportImage=function(a,b,c,d,f,g,k,l,n,x,A){n=null!=n?n:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var e=this.editor.graph.isSelectionEmpty();c=null!=c?c:e;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();
-try{this.saveCanvas(a,f?this.getFileData(!0,null,null,null,c,l):null,n,null==this.pages||0==this.pages.length,A)}catch(B){"Invalid image"==B.message?this.downloadFile(n):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,x)}catch(D){this.spinner.stop(),this.handleError(D)}}};EditorUi.prototype.embedCssFonts=function(a,b){function c(a){return a.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$",
+this.editor.addFontCss(a,this.editor.resolvedFontCss),this.embedExtFonts(mxUtils.bind(this,function(c){try{null!=c&&this.editor.addFontCss(a,c),b(a)}catch(v){b(a)}}))}catch(p){b(a)}}))};EditorUi.prototype.exportImage=function(a,b,c,d,f,g,k,l,n,A,z){n=null!=n?n:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var e=this.editor.graph.isSelectionEmpty();c=null!=c?c:e;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();
+try{this.saveCanvas(a,f?this.getFileData(!0,null,null,null,c,l):null,n,null==this.pages||0==this.pages.length,z)}catch(C){"Invalid image"==C.message?this.downloadFile(n):this.handleError(C)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,c,a||1,b,d,null,null,g,k,A)}catch(D){this.spinner.stop(),this.handleError(D)}}};EditorUi.prototype.embedCssFonts=function(a,b){function c(a){return a.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$",
"g"),"")}var d=a.split("url("),e=0;null==this.cachedFonts&&(this.cachedFonts={});var f=mxUtils.bind(this,function(){if(0==e){for(var a=[d[0]],f=1;f<d.length;f++){var g=d[f].indexOf(")");a.push('url("');a.push(this.cachedFonts[c(d[f].substring(0,g))]);a.push('"'+d[f].substring(g))}b(a.join(""))}});if(0<d.length){for(var g=1;g<d.length;g++){var m=d[g].indexOf(")"),k=null,l=d[g].indexOf("format(",m);0<l&&(k=c(d[g].substring(l+7,d[g].indexOf(")",l))));mxUtils.bind(this,function(a){if(null==this.cachedFonts[a]){this.cachedFonts[a]=
a;e++;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 c=a;/^https?:\/\//.test(c)&&
!this.editor.isCorsEnabledForUrl(c)&&(c=PROXY_URL+"?url="+encodeURIComponent(a));this.loadUrl(c,mxUtils.bind(this,function(b){this.cachedFonts[a]=b;e--;f()}),mxUtils.bind(this,function(a){e--;f()}),!0,null,"data:"+b+";charset=utf-8;base64,")}})(c(d[g].substring(0,m)),k)}f()}else b(a)};EditorUi.prototype.loadFonts=function(a){null!=this.editor.fontCss&&null==this.editor.resolvedFontCss?this.embedCssFonts(this.editor.fontCss,mxUtils.bind(this,function(b){this.editor.resolvedFontCss=b;a()})):a()};EditorUi.prototype.embedExtFonts=
function(a){var b=this.editor.graph.extFonts;if(null!=b&&0<b.length){var c="",d=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts={});for(var e=mxUtils.bind(this,function(){0==d&&this.embedCssFonts(c,a)}),f=0;f<b.length;f++)mxUtils.bind(this,function(a,b){0==b.indexOf(Editor.GOOGLE_FONTS)?null==this.cachedGoogleFonts[b]?(d++,this.loadUrl(b,mxUtils.bind(this,function(a){this.cachedGoogleFonts[b]=a;c+=a;d--;e()}),mxUtils.bind(this,function(a){d--;c+="@import url("+b+");";e()}))):c+=this.cachedGoogleFonts[b]:
-c+='@font-face {font-family: "'+a+'";src: url("'+b+'");}'})(b[f].name,b[f].url);e()}else a()};EditorUi.prototype.exportToCanvas=function(a,b,c,d,f,g,k,l,n,x,A,u,D,B,H){try{g=null!=g?g:!0;k=null!=k?k:!0;u=null!=u?u:this.editor.graph;D=null!=D?D:0;var e=n?null:u.background;e==mxConstants.NONE&&(e=null);null==e&&(e=d);null==e&&0==n&&(e="#ffffff");this.convertImages(u.getSvg(null,null,null,B,null,k,null,null,null,x),mxUtils.bind(this,function(c){try{var d=new Image;d.onload=mxUtils.bind(this,function(){try{var m=
-function(){mxClient.IS_SF?window.setTimeout(function(){A.drawImage(d,D/l,D/l);a(k)},0):(A.drawImage(d,D/l,D/l),a(k))},k=document.createElement("canvas"),p=parseInt(c.getAttribute("width")),n=parseInt(c.getAttribute("height"));l=null!=l?l:1;null!=b&&(l=g?Math.min(1,Math.min(3*b/(4*n),b/p)):b/p);p=Math.ceil(l*p)+2*D;n=Math.ceil(l*n)+2*D;k.setAttribute("width",p);k.setAttribute("height",n);var A=k.getContext("2d");null!=e&&(A.beginPath(),A.rect(0,0,p,n),A.fillStyle=e,A.fill());A.scale(l,l);if(H){var x=
-u.view,q=x.scale;x.scale=1;var v=btoa(unescape(encodeURIComponent(x.createSvgGrid(x.gridColor))));x.scale=q;var v="data:image/svg+xml;base64,"+v,t=u.gridSize*x.gridSteps*l,E=u.getGraphBounds(),y=x.translate.x*q,z=x.translate.y*q,C=y+(E.x-y)/q,B=z+(E.y-z)/q,F=new Image;F.onload=function(){try{for(var a=-Math.round(t-mxUtils.mod((y-C)*l,t)),b=-Math.round(t-mxUtils.mod((z-B)*l,t));a<p;a+=t)for(var c=b;c<n;c+=t)A.drawImage(F,a/l,c/l);m()}catch(M){null!=f&&f(M)}};F.onerror=function(a){null!=f&&f(a)};F.src=
-v}else m()}catch(Z){null!=f&&f(Z)}});d.onerror=function(a){null!=f&&f(a)};x&&this.editor.graph.addSvgShadow(c);this.editor.graph.mathEnabled&&this.editor.addMathCss(c);var m=mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(c,this.editor.resolvedFontCss),d.src=this.createSvgDataUri(mxUtils.getXml(c))}catch(K){null!=f&&f(K)}});this.embedExtFonts(mxUtils.bind(this,function(a){try{null!=a&&this.editor.addFontCss(c,a),this.loadFonts(m)}catch(O){null!=f&&f(O)}}))}catch(K){null!=
-f&&f(K)}}),c,A)}catch(J){null!=f&&f(J)}};EditorUi.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var b=a.convert,c=this;a.convert=function(d){if(null!=d){var e="http://"==d.substring(0,7)||"https://"==d.substring(0,8);e&&!navigator.onLine?d=c.svgBrokenImage.src:!e||d.substring(0,a.baseUrl.length)==a.baseUrl||c.crossOriginImages&&c.editor.isCorsEnabledForUrl(d)?"chrome-extension://"==d.substring(0,19)||mxClient.IS_CHROMEAPP||(d=b.apply(this,arguments)):d=PROXY_URL+
+c+='@font-face {font-family: "'+a+'";src: url("'+b+'");}'})(b[f].name,b[f].url);e()}else a()};EditorUi.prototype.exportToCanvas=function(a,b,c,d,f,g,k,l,n,A,z,t,D,C,G){try{g=null!=g?g:!0;k=null!=k?k:!0;t=null!=t?t:this.editor.graph;D=null!=D?D:0;var e=n?null:t.background;e==mxConstants.NONE&&(e=null);null==e&&(e=d);null==e&&0==n&&(e="#ffffff");this.convertImages(t.getSvg(null,null,null,C,null,k,null,null,null,A),mxUtils.bind(this,function(c){try{var d=new Image;d.onload=mxUtils.bind(this,function(){try{var m=
+function(){mxClient.IS_SF?window.setTimeout(function(){u.drawImage(d,D/l,D/l);a(k)},0):(u.drawImage(d,D/l,D/l),a(k))},k=document.createElement("canvas"),p=parseInt(c.getAttribute("width")),n=parseInt(c.getAttribute("height"));l=null!=l?l:1;null!=b&&(l=g?Math.min(1,Math.min(3*b/(4*n),b/p)):b/p);p=Math.ceil(l*p)+2*D;n=Math.ceil(l*n)+2*D;k.setAttribute("width",p);k.setAttribute("height",n);var u=k.getContext("2d");null!=e&&(u.beginPath(),u.rect(0,0,p,n),u.fillStyle=e,u.fill());u.scale(l,l);if(G){var z=
+t.view,A=z.scale;z.scale=1;var v=btoa(unescape(encodeURIComponent(z.createSvgGrid(z.gridColor))));z.scale=A;var v="data:image/svg+xml;base64,"+v,q=t.gridSize*z.gridSteps*l,F=t.getGraphBounds(),x=z.translate.x*A,y=z.translate.y*A,B=x+(F.x-x)/A,E=y+(F.y-y)/A,C=new Image;C.onload=function(){try{for(var a=-Math.round(q-mxUtils.mod((x-B)*l,q)),b=-Math.round(q-mxUtils.mod((y-E)*l,q));a<p;a+=q)for(var c=b;c<n;c+=q)u.drawImage(C,a/l,c/l);m()}catch(M){null!=f&&f(M)}};C.onerror=function(a){null!=f&&f(a)};C.src=
+v}else m()}catch(Z){null!=f&&f(Z)}});d.onerror=function(a){null!=f&&f(a)};A&&this.editor.graph.addSvgShadow(c);this.editor.graph.mathEnabled&&this.editor.addMathCss(c);var m=mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(c,this.editor.resolvedFontCss),d.src=this.createSvgDataUri(mxUtils.getXml(c))}catch(K){null!=f&&f(K)}});this.embedExtFonts(mxUtils.bind(this,function(a){try{null!=a&&this.editor.addFontCss(c,a),this.loadFonts(m)}catch(O){null!=f&&f(O)}}))}catch(K){null!=
+f&&f(K)}}),c,z)}catch(J){null!=f&&f(J)}};EditorUi.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var b=a.convert,c=this;a.convert=function(d){if(null!=d){var e="http://"==d.substring(0,7)||"https://"==d.substring(0,8);e&&!navigator.onLine?d=c.svgBrokenImage.src:!e||d.substring(0,a.baseUrl.length)==a.baseUrl||c.crossOriginImages&&c.editor.isCorsEnabledForUrl(d)?"chrome-extension://"==d.substring(0,19)||mxClient.IS_CHROMEAPP||(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 e=0,f=c||{};c=mxUtils.bind(this,function(c,g){for(var m=a.getElementsByTagName(c),k=0;k<m.length;k++)mxUtils.bind(this,function(c){try{if(null!=c){var m=d.convert(c.getAttribute(g));if(null!=m&&"data:"!=m.substring(0,5)){var k=f[m];null==k?(e++,this.convertImageToDataUri(m,function(d){null!=d&&(f[m]=d,c.setAttribute(g,d));e--;0==e&&b(a)})):c.setAttribute(g,
-k)}else null!=m&&c.setAttribute(g,m)}}catch(B){}})(m[k])});c("image","xlink:href");c("img","src");0==e&&b(a)};EditorUi.prototype.loadUrl=function(a,b,c,d,f,g,k,l){try{var e=!k&&(d||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||/(\.gif)($|\?)/i.test(a)||/(\.pdf)($|\?)/i.test(a));f=null!=f?f:!0;var m=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(e){if((9==document.documentMode||10==document.documentMode)&&
+k)}else null!=m&&c.setAttribute(g,m)}}catch(C){}})(m[k])});c("image","xlink:href");c("img","src");0==e&&b(a)};EditorUi.prototype.loadUrl=function(a,b,c,d,f,g,k,l){try{var e=!k&&(d||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||/(\.gif)($|\?)/i.test(a)||/(\.pdf)($|\?)/i.test(a));f=null!=f?f:!0;var m=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(e){if((9==document.documentMode||10==document.documentMode)&&
"undefined"!==typeof window.mxUtilsBinaryToArray){a=mxUtilsBinaryToArray(a.request.responseBody).toArray();for(var d=Array(a.length),f=0;f<a.length;f++)d[f]=String.fromCharCode(a[f]);d=d.join("")}g=null!=g?g:"data:image/png;base64,";d=g+this.base64Encode(d)}b(d)}}else null!=c&&(0==a.getStatus()?c({message:mxResources.get("accessDenied")},a):c({message:mxResources.get("error")+" "+a.getStatus()},a))}),function(a){null!=c&&c({message:mxResources.get("error")+" "+a.getStatus()})},e,this.timeout,function(){f&&
-null!=c&&c({code:App.ERROR_TIMEOUT,retry:m})},l)});m()}catch(A){null!=c&&c(A)}};EditorUi.prototype.isCorsEnabledForUrl=function(a){return this.editor.isCorsEnabledForUrl(a)};EditorUi.prototype.convertImageToDataUri=function(a,b){try{var c=!0,d=window.setTimeout(mxUtils.bind(this,function(){c=!1;b(this.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){window.clearTimeout(d);c&&b(this.createSvgDataUri(a.getText()))}),function(){window.clearTimeout(d);
-c&&b(this.svgBrokenImage.src)});else{var e=new Image,f=this;this.crossOriginImages&&(e.crossOrigin="anonymous");e.onload=function(){window.clearTimeout(d);if(c)try{var a=document.createElement("canvas"),g=a.getContext("2d");a.height=e.height;a.width=e.width;g.drawImage(e,0,0);b(a.toDataURL())}catch(C){b(f.svgBrokenImage.src)}};e.onerror=function(){window.clearTimeout(d);c&&b(f.svgBrokenImage.src)};e.src=a}}catch(z){b(this.svgBrokenImage.src)}};EditorUi.prototype.importXml=function(a,b,c,d,f){b=null!=
+null!=c&&c({code:App.ERROR_TIMEOUT,retry:m})},l)});m()}catch(z){null!=c&&c(z)}};EditorUi.prototype.isCorsEnabledForUrl=function(a){return this.editor.isCorsEnabledForUrl(a)};EditorUi.prototype.convertImageToDataUri=function(a,b){try{var c=!0,d=window.setTimeout(mxUtils.bind(this,function(){c=!1;b(this.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){window.clearTimeout(d);c&&b(this.createSvgDataUri(a.getText()))}),function(){window.clearTimeout(d);
+c&&b(this.svgBrokenImage.src)});else{var e=new Image,f=this;this.crossOriginImages&&(e.crossOrigin="anonymous");e.onload=function(){window.clearTimeout(d);if(c)try{var a=document.createElement("canvas"),g=a.getContext("2d");a.height=e.height;a.width=e.width;g.drawImage(e,0,0);b(a.toDataURL())}catch(B){b(f.svgBrokenImage.src)}};e.onerror=function(){window.clearTimeout(d);c&&b(f.svgBrokenImage.src)};e.src=a}}catch(y){b(this.svgBrokenImage.src)}};EditorUi.prototype.importXml=function(a,b,c,d,f){b=null!=
b?b:0;c=null!=c?c:0;var e=[];try{var g=this.editor.graph;if(null!=a&&0<a.length){g.model.beginUpdate();try{var m=mxUtils.parseXml(a);a={};var k=this.editor.extractGraphModel(m.documentElement,null!=this.pages);if(null!=k&&"mxfile"==k.nodeName&&null!=this.pages){var p=k.getElementsByTagName("diagram");if(1==p.length)k=Editor.parseDiagramNode(p[0]),null!=this.currentPage&&(a[p[0].getAttribute("id")]=this.currentPage.getId());else if(1<p.length){var m=[],l=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&
-(a[p[0].getAttribute("id")]=this.pages[0].getId(),k=Editor.parseDiagramNode(p[0]),d=!1,l=1);for(;l<p.length;l++){var n=p[l].getAttribute("id");p[l].removeAttribute("id");var q=this.updatePageRoot(new DiagramPage(p[l]));a[n]=p[l].getAttribute("id");var t=this.pages.length;null==q.getName()&&q.setName(mxResources.get("pageWithNumber",[t+1]));g.model.execute(new ChangePage(this,q,q,t,!0));m.push(q)}this.updatePageLinks(a,m)}}if(null!=k&&"mxGraphModel"===k.nodeName&&(e=g.importGraphModel(k,b,c,d),null!=
-e))for(l=0;l<e.length;l++)this.updatePageLinksForCell(a,e[l])}finally{g.model.endUpdate()}}}catch(H){if(f)throw H;this.handleError(H)}return e};EditorUi.prototype.updatePageLinks=function(a,b){for(var c=0;c<b.length;c++)this.updatePageLinksForCell(a,b[c].root)};EditorUi.prototype.updatePageLinksForCell=function(a,b){var c=document.createElement("div"),d=this.editor.graph,e=d.getLinkForCell(b);null!=e&&d.setLinkForCell(b,this.updatePageLink(a,e));if(d.isHtmlLabel(b)){c.innerHTML=d.getLabel(b);for(var f=
+(a[p[0].getAttribute("id")]=this.pages[0].getId(),k=Editor.parseDiagramNode(p[0]),d=!1,l=1);for(;l<p.length;l++){var n=p[l].getAttribute("id");p[l].removeAttribute("id");var v=this.updatePageRoot(new DiagramPage(p[l]));a[n]=p[l].getAttribute("id");var q=this.pages.length;null==v.getName()&&v.setName(mxResources.get("pageWithNumber",[q+1]));g.model.execute(new ChangePage(this,v,v,q,!0));m.push(v)}this.updatePageLinks(a,m)}}if(null!=k&&"mxGraphModel"===k.nodeName&&(e=g.importGraphModel(k,b,c,d),null!=
+e))for(l=0;l<e.length;l++)this.updatePageLinksForCell(a,e[l])}finally{g.model.endUpdate()}}}catch(G){if(f)throw G;this.handleError(G)}return e};EditorUi.prototype.updatePageLinks=function(a,b){for(var c=0;c<b.length;c++)this.updatePageLinksForCell(a,b[c].root)};EditorUi.prototype.updatePageLinksForCell=function(a,b){var c=document.createElement("div"),d=this.editor.graph,e=d.getLinkForCell(b);null!=e&&d.setLinkForCell(b,this.updatePageLink(a,e));if(d.isHtmlLabel(b)){c.innerHTML=d.getLabel(b);for(var f=
c.getElementsByTagName("a"),g=!1,m=0;m<f.length;m++)e=f[m].getAttribute("href"),null!=e&&(f[m].setAttribute("href",this.updatePageLink(a,e)),g=!0);g&&d.labelChanged(b,c.innerHTML)}for(m=0;m<d.model.getChildCount(b);m++)this.updatePageLinksForCell(a,d.model.getChildAt(b,m))};EditorUi.prototype.updatePageLink=function(a,b){if("data:page/id,"==b.substring(0,13)){var c=a[b.substring(b.indexOf(",")+1)];b=null!=c?"data:page/id,"+c:null}else if("data:action/json,"==b.substring(0,17))try{var d=JSON.parse(b.substring(17));
-if(null!=d.actions){for(var e=0;e<d.actions.length;e++){var f=d.actions[e];null!=f.open&&"data:page/id,"==f.open.substring(0,13)&&(c=a[f.open.substring(f.open.indexOf(",")+1)],null!=c?f.open="data:page/id,"+c:delete f.open)}b="data:action/json,"+JSON.stringify(d)}}catch(z){}return b};EditorUi.prototype.isRemoteVisioFormat=function(a){return/(\.v(sd|dx))($|\?)/i.test(a)||/(\.vs(s|x))($|\?)/i.test(a)};EditorUi.prototype.importVisio=function(a,b,c,d){d=null!=d?d:a.name;c=null!=c?c:mxUtils.bind(this,
-function(a){this.handleError(a)});var e=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var e=this.isRemoteVisioFormat(d);try{var f="UNKNOWN-VISIO",g=d.lastIndexOf(".");0<=g&&g<d.length&&(f=d.substring(g+1).toUpperCase());EditorUi.logEvent({category:f+"-MS-IMPORT-FILE",action:"filename_"+d,label:e?"remote":"local"})}catch(x){}if(e)if(null==VSD_CONVERT_URL||this.isOffline())c({message:"conf"==this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});
-else{e=new FormData;e.append("file1",a,d);var m=new XMLHttpRequest;m.open("POST",VSD_CONVERT_URL);m.responseType="blob";this.addRemoteServiceSecurityCheck(m);m.onreadystatechange=mxUtils.bind(this,function(){if(4==m.readyState)if(200<=m.status&&299>=m.status)try{var a=m.response;if("text/xml"==a.type){var e=new FileReader;e.onload=mxUtils.bind(this,function(a){try{b(a.target.result)}catch(D){c({message:mxResources.get("errorLoadingFile")})}});e.readAsText(a)}else this.doImportVisio(a,b,c,d)}catch(E){c(E)}else c({})});
-m.send(e)}else try{this.doImportVisio(a,b,c,d)}catch(x){c(x)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?e():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",e))};EditorUi.prototype.importGraphML=function(a,b,c){c=null!=c?c:mxUtils.bind(this,function(a){this.handleError(a)});var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(a,
-b,c)}catch(t){c(t)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?d():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",d))};EditorUi.prototype.exportVisio=function(){var a=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams()||this.handleError({message:mxResources.get("unknownError")})}catch(m){this.handleError(m)}else this.spinner.stop(),
-this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?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{EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+a.length}),EditorUi.debug("convertLucidChart",a)}catch(t){}try{b(LucidImporter.importState(JSON.parse(a)))}catch(t){null!=
-window.console&&console.error(t),c(t)}}else c({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(d,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",d):mxscript("js/extensions.min.js",d))};EditorUi.prototype.generateMermaidImage=function(a,b,c,d){var e=this,f=function(){try{this.loadingMermaid=!1,b=null!=b?b:EditorUi.defaultMermaidConfig,b.securityLevel=
+if(null!=d.actions){for(var e=0;e<d.actions.length;e++){var f=d.actions[e];null!=f.open&&"data:page/id,"==f.open.substring(0,13)&&(c=a[f.open.substring(f.open.indexOf(",")+1)],null!=c?f.open="data:page/id,"+c:delete f.open)}b="data:action/json,"+JSON.stringify(d)}}catch(y){}return b};EditorUi.prototype.isRemoteVisioFormat=function(a){return/(\.v(sd|dx))($|\?)/i.test(a)||/(\.vs(s|x))($|\?)/i.test(a)};EditorUi.prototype.importVisio=function(a,b,c,d){d=null!=d?d:a.name;c=null!=c?c:mxUtils.bind(this,
+function(a){this.handleError(a)});var e=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var e=this.isRemoteVisioFormat(d);try{var f="UNKNOWN-VISIO",g=d.lastIndexOf(".");0<=g&&g<d.length&&(f=d.substring(g+1).toUpperCase());EditorUi.logEvent({category:f+"-MS-IMPORT-FILE",action:"filename_"+d,label:e?"remote":"local"})}catch(A){}if(e)if(null==VSD_CONVERT_URL||this.isOffline())c({message:"conf"==this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});
+else{e=new FormData;e.append("file1",a,d);var m=new XMLHttpRequest;m.open("POST",VSD_CONVERT_URL);m.responseType="blob";this.addRemoteServiceSecurityCheck(m);m.onreadystatechange=mxUtils.bind(this,function(){if(4==m.readyState)if(200<=m.status&&299>=m.status)try{var a=m.response;if("text/xml"==a.type){var e=new FileReader;e.onload=mxUtils.bind(this,function(a){try{b(a.target.result)}catch(D){c({message:mxResources.get("errorLoadingFile")})}});e.readAsText(a)}else this.doImportVisio(a,b,c,d)}catch(F){c(F)}else c({})});
+m.send(e)}else try{this.doImportVisio(a,b,c,d)}catch(A){c(A)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?e():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",e))};EditorUi.prototype.importGraphML=function(a,b,c){c=null!=c?c:mxUtils.bind(this,function(a){this.handleError(a)});var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(a,
+b,c)}catch(q){c(q)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?d():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",d))};EditorUi.prototype.exportVisio=function(){var a=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams()||this.handleError({message:mxResources.get("unknownError")})}catch(m){this.handleError(m)}else this.spinner.stop(),
+this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?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{EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+a.length}),EditorUi.debug("convertLucidChart",a)}catch(q){}try{b(LucidImporter.importState(JSON.parse(a)))}catch(q){null!=
+window.console&&console.error(q),c(q)}}else c({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(d,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",d):mxscript("js/extensions.min.js",d))};EditorUi.prototype.generateMermaidImage=function(a,b,c,d){var e=this,f=function(){try{this.loadingMermaid=!1,b=null!=b?b:EditorUi.defaultMermaidConfig,b.securityLevel=
"strict",b.startOnLoad=!1,mermaid.mermaidAPI.initialize(b),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),a,function(a){try{if(mxClient.IS_IE||mxClient.IS_IE11)a=a.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var b=mxUtils.parseXml(a).getElementsByTagName("svg");if(0<b.length){var f=parseFloat(b[0].getAttribute("width")),g=parseFloat(b[0].getAttribute("height"));c(e.convertDataUri(e.createSvgDataUri(a)),
-f,g)}else d({message:mxResources.get("invalidInput")})}catch(A){d(A)}})}catch(z){d(z)}};"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?f():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",f):mxscript("js/extensions.min.js",f))};EditorUi.prototype.generatePlantUmlImage=function(a,b,c,d){function e(a,b,c){c1=a>>2;c2=(a&3)<<4|b>>4;c3=(b&15)<<2|c>>6;c4=c&63;r="";r+=f(c1&63);r+=f(c2&63);r+=f(c3&63);return r+=f(c4&63)}function f(a){if(10>a)return String.fromCharCode(48+
+f,g)}else d({message:mxResources.get("invalidInput")})}catch(z){d(z)}})}catch(y){d(y)}};"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?f():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",f):mxscript("js/extensions.min.js",f))};EditorUi.prototype.generatePlantUmlImage=function(a,b,c,d){function e(a,b,c){c1=a>>2;c2=(a&3)<<4|b>>4;c3=(b&15)<<2|c>>6;c4=c&63;r="";r+=f(c1&63);r+=f(c2&63);r+=f(c3&63);return r+=f(c4&63)}function f(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?"_":"?"}var g=new XMLHttpRequest;g.open("GET",("txt"==b?PLANT_URL+"/txt/":"png"==b?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(a){r="";for(i=0;i<a.length;i+=3)r=i+2==a.length?r+e(a.charCodeAt(i),a.charCodeAt(i+1),0):i+1==a.length?r+e(a.charCodeAt(i),0,0):r+e(a.charCodeAt(i),a.charCodeAt(i+1),a.charCodeAt(i+2));return r}(pako.deflateRaw(a,{to:"string"})),!0);"txt"!=b&&(g.responseType=
"blob");g.onload=function(a){if(200<=this.status&&300>this.status)if("txt"==b)c(this.response);else{var e=new FileReader;e.readAsDataURL(this.response);e.onloadend=function(a){var b=new Image;b.onload=function(){try{var a=b.width,f=b.height;if(0==a&&0==f){var g=e.result,m=g.indexOf(","),k=decodeURIComponent(escape(atob(g.substring(m+1)))),p=mxUtils.parseXml(k).getElementsByTagName("svg");0<p.length&&(a=parseFloat(p[0].getAttribute("width")),f=parseFloat(p[0].getAttribute("height")))}c(e.result,a,
f)}catch(I){d(I)}};b.src=e.result};e.onerror=function(a){d(a)}}else d(a)};g.onerror=function(a){d(a)};g.send()};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=left;verticalAlign=top;"),d.updateCellSize(e,!0)}finally{d.getModel().endUpdate()}return e};EditorUi.prototype.insertTextAt=function(a,b,c,d,f,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()&&(f||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var e=this.editor.graph;if("data:application/pdf;base64,"==a.substring(0,28)){var m=
-Editor.extractGraphModelFromPdf(a);if(null!=m&&0<m.length)return this.importXml(m,b,c,g,!0)}if("data:image/png;base64,"==a.substring(0,22)&&(m=this.extractGraphModelFromPng(a),null!=m&&0<m.length))return this.importXml(m,b,c,g,!0);if("data:image/svg+xml;"==a.substring(0,19))try{m=null;"data:image/svg+xml;base64,"==a.substring(0,26)?(m=a.substring(a.indexOf(",")+1),m=window.atob&&!mxClient.IS_SF?atob(m):Base64.decode(m,!0)):m=decodeURIComponent(a.substring(a.indexOf(",")+1));var p=this.importXml(m,
-b,c,g,!0);if(0<p.length)return p}catch(A){}this.loadImage(a,mxUtils.bind(this,function(d){if("data:"==a.substring(0,5))this.resizeImage(d,a,mxUtils.bind(this,function(a,d,f){e.setSelectionCell(e.insertVertex(null,null,"",e.snap(b),e.snap(c),d,f,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(a)+";"))}),k,this.maxImageSize);else{var f=Math.min(1,Math.min(this.maxImageSize/d.width,this.maxImageSize/d.height)),
+Editor.extractGraphModelFromPdf(a);if(null!=m&&0<m.length)return this.importXml(m,b,c,g,!0)}if("data:image/png;base64,"==a.substring(0,22)&&(m=this.extractGraphModelFromPng(a),null!=m&&0<m.length))return this.importXml(m,b,c,g,!0);if("data:image/svg+xml;"==a.substring(0,19))try{m=null;"data:image/svg+xml;base64,"==a.substring(0,26)?(m=a.substring(a.indexOf(",")+1),m=window.atob&&!mxClient.IS_SF?atob(m):Base64.decode(m,!0)):m=decodeURIComponent(a.substring(a.indexOf(",")+1));var l=this.importXml(m,
+b,c,g,!0);if(0<l.length)return l}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,f){e.setSelectionCell(e.insertVertex(null,null,"",e.snap(b),e.snap(c),d,f,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(a)+";"))}),k,this.maxImageSize);else{var f=Math.min(1,Math.min(this.maxImageSize/d.width,this.maxImageSize/d.height)),
g=Math.round(d.width*f);d=Math.round(d.height*f);e.setSelectionCell(e.insertVertex(null,null,"",e.snap(b),e.snap(c),g,d,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";"))}}),mxUtils.bind(this,function(){var f=null;e.getModel().beginUpdate();try{f=e.insertVertex(e.getDefaultParent(),null,a,e.snap(b),e.snap(c),1,1,"text;"+(d?"html=1;":"")),e.updateCellSize(f),e.fireEvent(new mxEventObject("textInserted","cells",[f]))}finally{e.getModel().endUpdate()}e.setSelectionCell(f)}))}else{a=
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(d){this.editor.graph.setSelectionCells(this.importXml(d,b,c,g));!this.isOffline()&&(/.*\.diagrams\.net$/.test(window.location.hostname)||/.*\.appspot\.com$/.test(window.location.hostname)||/.*\.draw\.io$/.test(window.location.hostname))&&this.showBanner("LucidChartImportSurvey",mxResources.get("notSatisfiedWithImport"),
-mxUtils.bind(this,function(){var b=new FeedbackDialog(this,"Lucidchart Import Feedback",!0,a);this.showDialog(b.container,610,360,!0,!1);b.init()}))}),mxUtils.bind(this,function(a){this.handleError(a)}));else{e=this.editor.graph;f=null;e.getModel().beginUpdate();try{f=e.insertVertex(e.getDefaultParent(),null,"",e.snap(b),e.snap(c),1,1,"text;"+(d?"html=1;":"")),e.fireEvent(new mxEventObject("textInserted","cells",[f])),"<"==a.charAt(0)&&a.indexOf(">")==a.length-1&&(a=mxUtils.htmlEntities(a)),a.length>
-this.maxTextBytes&&(a=a.substring(0,this.maxTextBytes)+"..."),f.value=a,e.updateCellSize(f),/\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(f.value)&&e.setLinkForCell(f,f.value),f.geometry.width+=e.gridSize,f.geometry.height+=e.gridSize}finally{e.getModel().endUpdate()}return[f]}}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)||'{"Properties":'==a.substring(0,14))};EditorUi.prototype.importLocalFile=function(a,b){if(a&&Graph.fileSupport){if(null==this.importFileInputElt){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.type="",c.type="file",c.value="")}));c.style.display="none";document.body.appendChild(c);this.importFileInputElt=c}this.importFileInputElt.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,0,0,!0)}),null,b)}else this.editor.graph.setSelectionCells(this.importXml(a,0,0,!0))}));
-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.importZipFile=function(a,b,c){var d=this,e=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(a).then(function(e){if(0==Object.keys(e.files).length)c();
-else{var f=0,g,m=!1;e.forEach(function(a,d){var e=d.name.toLowerCase();"diagram/diagram.xml"==e?(m=!0,d.async("string").then(function(a){0==a.indexOf("<mxfile ")?b(a):c()})):0==e.indexOf("versions/")&&(e=parseInt(e.substr(9)),e>f&&(f=e,g=d))});0<f?g.async("string").then(function(e){!d.isOffline()&&(new XMLHttpRequest).upload&&d.isRemoteFileFormat(e,a.name)?d.parseFile(new Blob([e],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?b(a.responseText):
-c())}),a.name):c()}):m||c()}},function(a){c(a)}):c()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?e():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",e))};EditorUi.prototype.importFile=function(a,b,c,d,f,g,k,l,n,x,A){x=null!=x?x:!0;var e=!1,m=null,p=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,x);null!=l&&l(b)});"image"==b.substring(0,5)?(n=!1,"image/png"==
-b.substring(0,9)&&(b=A?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(m=this.importXml(b,c,d,x),n=!0)),n||(b=this.editor.graph,A=a.indexOf(";"),0<A&&(a=a.substring(0,A)+a.substring(a.indexOf(",",A+1))),x&&b.isGridEnabled()&&(c=b.snap(c),d=b.snap(d)),m=[b.insertVertex(null,null,"",c,d,f,g,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";")])):/(\.*<graphml )/.test(a)?(e=!0,this.importGraphML(a,p)):null!=n&&
-null!=k&&(/(\.v(dx|sdx?))($|\?)/i.test(k)||/(\.vs(x|sx?))($|\?)/i.test(k))?(e=!0,this.importVisio(n,p)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,k)?(e=!0,this.parseFile(null!=n?n:new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?p(a.responseText):null!=l&&l(null))}),k)):0==a.indexOf("PK")&&null!=n?(e=!0,this.importZipFile(n,p,mxUtils.bind(this,function(){m=this.insertTextAt(this.validateFileData(a),
-c,d,!0,null,x);l(m)}))):/(\.v(sd|dx))($|\?)/i.test(k)||/(\.vs(s|x))($|\?)/i.test(k)||(m=this.insertTextAt(this.validateFileData(a),c,d,!0,null,x));e||null==l||l(m);return m};EditorUi.prototype.base64Encode=function(a){for(var b="",c=0,d=a.length,e,f,g;c<d;){e=a.charCodeAt(c++)&255;if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4);b+="==";break}f=a.charCodeAt(c++);if(c==
-d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(f&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&15)<<2);b+="=";break}g=a.charCodeAt(c++);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(f&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&
-15)<<2|(g&192)>>6);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g&63)}return b};EditorUi.prototype.importFiles=function(a,b,c,d,f,g,k,l,n,x,A,u){d=null!=d?d:this.maxImageSize;x=null!=x?x:this.maxImageBytes;var e=null!=b&&null!=c,m=!0;b=null!=b?b:0;c=null!=c?c:0;var p=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var q=A||this.resampleThreshold,v=0;v<a.length;v++)if("image/"==a[v].type.substring(0,6)&&a[v].size>q){p=!0;break}var t=mxUtils.bind(this,function(){var p=this.editor.graph,
-n=p.gridSize;f=null!=f?f:mxUtils.bind(this,function(a,b,c,d,f,g,k,m,p){try{return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,k)),null):this.importFile(a,b,c,d,f,g,k,m,p,e,u)}catch(Z){return this.handleError(Z),null}});g=null!=g?g:mxUtils.bind(this,function(a){p.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var q=a.length,v=q,t=[],D=mxUtils.bind(this,function(a,b){t[a]=b;if(0==--v){this.spinner.stop();
-if(null!=l)l(t);else{var c=[];p.getModel().beginUpdate();try{for(var d=0;d<t.length;d++){var e=t[d]();null!=e&&(c=c.concat(e))}}finally{p.getModel().endUpdate()}}g(c)}}),E=0;E<q;E++)mxUtils.bind(this,function(e){var g=a[e];if(null!=g){var 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,q=l.indexOf(","),v=decodeURIComponent(escape(atob(l.substring(q+1)))),t=mxUtils.parseXml(v),v=
-t.getElementsByTagName("svg");if(0<v.length){var v=v[0],E=u?null:v.getAttribute("content");null!=E&&"<"!=E.charAt(0)&&"%"!=E.charAt(0)&&(E=unescape(window.atob?atob(E):Base64.decode(E,!0)));null!=E&&"%"==E.charAt(0)&&(E=decodeURIComponent(E));null==E||"<mxfile "!==E.substring(0,8)&&"<mxGraphModel "!==E.substring(0,14)?D(e,mxUtils.bind(this,function(){try{if(l.substring(0,q+1),null!=t){var a=t.getElementsByTagName("svg");if(0<a.length){var k=a[0],m=k.getAttribute("width"),x=k.getAttribute("height"),
-m=null!=m&&"%"!=m.charAt(m.length-1)?parseFloat(m):NaN,x=null!=x&&"%"!=x.charAt(x.length-1)?parseFloat(x):NaN,A=k.getAttribute("viewBox");if(null==A||0==A.length)k.setAttribute("viewBox","0 0 "+m+" "+x);else if(isNaN(m)||isNaN(x)){var v=A.split(" ");3<v.length&&(m=parseFloat(v[2]),x=parseFloat(v[3]))}l=this.createSvgDataUri(mxUtils.getXml(k));var u=Math.min(1,Math.min(d/Math.max(1,m)),d/Math.max(1,x)),D=f(l,g.type,b+e*n,c+e*n,Math.max(1,Math.round(m*u)),Math.max(1,Math.round(x*u)),g.name);if(isNaN(m)||
-isNaN(x)){var E=new Image;E.onload=mxUtils.bind(this,function(){m=Math.max(1,E.width);x=Math.max(1,E.height);D[0].geometry.width=m;D[0].geometry.height=x;k.setAttribute("viewBox","0 0 "+m+" "+x);l=this.createSvgDataUri(mxUtils.getXml(k));var a=l.indexOf(";");0<a&&(l=l.substring(0,a)+l.substring(l.indexOf(",",a+1)));p.setCellStyles("image",l,[D[0]])});E.src=this.createSvgDataUri(mxUtils.getXml(k))}return D}}}catch(ia){}return null})):D(e,mxUtils.bind(this,function(){return f(E,"text/xml",b+e*n,c+e*
-n,0,0,g.name)}))}else D(e,mxUtils.bind(this,function(){return null}))}else{v=!1;if("image/png"==g.type){var z=u?null:this.extractGraphModelFromPng(a.target.result);if(null!=z&&0<z.length){var B=new Image;B.src=a.target.result;D(e,mxUtils.bind(this,function(){return f(z,"text/xml",b+e*n,c+e*n,B.width,B.height,g.name)}));v=!0}}v||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,
-function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(a.target.result,mxUtils.bind(this,function(k){this.resizeImage(k,a.target.result,mxUtils.bind(this,function(k,l,p){D(e,mxUtils.bind(this,function(){if(null!=k&&k.length<x){var q=m&&this.isResampleImage(a.target.result,A)?Math.min(1,Math.min(d/l,d/p)):1;return f(k,g.type,b+e*n,c+e*n,Math.round(l*q),Math.round(p*q),g.name)}this.handleError({message:mxResources.get("imageTooBig")});
-return null}))}),m,d,A)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else l=a.target.result,f(l,g.type,b+e*n,c+e*n,240,160,g.name,function(a){D(e,function(){return a})},g)});/(\.v(dx|sdx?))($|\?)/i.test(g.name)||/(\.vs(x|sx?))($|\?)/i.test(g.name)?f(null,g.type,b+e*n,c+e*n,240,160,g.name,function(a){D(e,function(){return a})},g):"image"==g.type.substring(0,5)||"application/pdf"==g.type?l.readAsDataURL(g):l.readAsText(g)}})(E)});if(p){p=[];
-for(v=0;v<a.length;v++)p.push(a[v]);a=p;this.confirmImageResize(function(a){m=a;t()},n)}else t()};EditorUi.prototype.confirmImageResize=function(a,b){b=null!=b?b:!1;var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},d=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,e=function(d,e){if(d||b)mxSettings.setResizeImages(d?e:null),mxSettings.save();c();a(e)};null==d||b?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),
+mxUtils.bind(this,function(){var b=new FeedbackDialog(this,"Lucidchart Import Feedback",!0,a);this.showDialog(b.container,610,360,!0,!1);b.init()}))}),mxUtils.bind(this,function(a){this.handleError(a)}));else{e=this.editor.graph;f=null;e.getModel().beginUpdate();try{f=e.insertVertex(e.getDefaultParent(),null,"",e.snap(b),e.snap(c),1,1,"text;whiteSpace=wrap;"+(d?"html=1;":""));e.fireEvent(new mxEventObject("textInserted","cells",[f]));"<"==a.charAt(0)&&a.indexOf(">")==a.length-1&&(a=mxUtils.htmlEntities(a));
+a.length>this.maxTextBytes&&(a=a.substring(0,this.maxTextBytes)+"...");f.value=a;e.updateCellSize(f);if(0<this.maxTextWidth&&f.geometry.width>this.maxTextWidth){var p=e.getPreferredSizeForCell(f,this.maxTextWidth);f.geometry.width=p.width;f.geometry.height=p.height}/\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(f.value)&&e.setLinkForCell(f,
+f.value);f.geometry.width+=e.gridSize;f.geometry.height+=e.gridSize}finally{e.getModel().endUpdate()}return[f]}}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)||'{"Properties":'==a.substring(0,14))};EditorUi.prototype.importLocalFile=function(a,b){if(a&&Graph.fileSupport){if(null==this.importFileInputElt){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.type="",c.type="file",c.value="")}));c.style.display=
+"none";document.body.appendChild(c);this.importFileInputElt=c}this.importFileInputElt.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,
+0,0,!0)}),null,b)}else this.editor.graph.setSelectionCells(this.importXml(a,0,0,!0))}));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.importZipFile=function(a,b,c){var d=this,e=mxUtils.bind(this,function(){this.loadingExtensions=
+!1;"undefined"!==typeof JSZip?JSZip.loadAsync(a).then(function(e){if(0==Object.keys(e.files).length)c();else{var f=0,g,m=!1;e.forEach(function(a,d){var e=d.name.toLowerCase();"diagram/diagram.xml"==e?(m=!0,d.async("string").then(function(a){0==a.indexOf("<mxfile ")?b(a):c()})):0==e.indexOf("versions/")&&(e=parseInt(e.substr(9)),e>f&&(f=e,g=d))});0<f?g.async("string").then(function(e){!d.isOffline()&&(new XMLHttpRequest).upload&&d.isRemoteFileFormat(e,a.name)?d.parseFile(new Blob([e],{type:"application/octet-stream"}),
+mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?b(a.responseText):c())}),a.name):c()}):m||c()}},function(a){c(a)}):c()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?e():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",e))};EditorUi.prototype.importFile=function(a,b,c,d,f,g,k,l,n,A,z){A=null!=A?A:!0;var e=!1,m=null,p=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,A);null!=l&&l(b)});"image"==b.substring(0,5)?(n=!1,"image/png"==b.substring(0,9)&&(b=z?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(m=this.importXml(b,c,d,A),n=!0)),n||(b=this.editor.graph,z=a.indexOf(";"),0<z&&(a=a.substring(0,z)+a.substring(a.indexOf(",",z+1))),A&&b.isGridEnabled()&&(c=b.snap(c),d=b.snap(d)),m=[b.insertVertex(null,null,"",c,d,f,g,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+a+";")])):/(\.*<graphml )/.test(a)?(e=!0,this.importGraphML(a,p)):null!=n&&null!=k&&(/(\.v(dx|sdx?))($|\?)/i.test(k)||/(\.vs(x|sx?))($|\?)/i.test(k))?(e=!0,this.importVisio(n,p)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,k)?(e=!0,this.parseFile(null!=n?n:new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?p(a.responseText):null!=l&&l(null))}),k)):0==a.indexOf("PK")&&null!=n?(e=!0,this.importZipFile(n,
+p,mxUtils.bind(this,function(){m=this.insertTextAt(this.validateFileData(a),c,d,!0,null,A);l(m)}))):/(\.v(sd|dx))($|\?)/i.test(k)||/(\.vs(s|x))($|\?)/i.test(k)||(m=this.insertTextAt(this.validateFileData(a),c,d,!0,null,A));e||null==l||l(m);return m};EditorUi.prototype.base64Encode=function(a){for(var b="",c=0,d=a.length,e,f,g;c<d;){e=a.charCodeAt(c++)&255;if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&
+3)<<4);b+="==";break}f=a.charCodeAt(c++);if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(f&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&15)<<2);b+="=";break}g=a.charCodeAt(c++);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&
+3)<<4|(f&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&15)<<2|(g&192)>>6);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g&63)}return b};EditorUi.prototype.importFiles=function(a,b,c,d,f,g,k,l,n,A,z,t){d=null!=d?d:this.maxImageSize;A=null!=A?A:this.maxImageBytes;var e=null!=b&&null!=c,m=!0;b=null!=b?b:0;c=null!=c?c:0;var p=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var u=z||this.resampleThreshold,v=0;v<a.length;v++)if("image/"==
+a[v].type.substring(0,6)&&a[v].size>u){p=!0;break}var q=mxUtils.bind(this,function(){var p=this.editor.graph,n=p.gridSize;f=null!=f?f:mxUtils.bind(this,function(a,b,c,d,f,g,k,m,l){try{return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,k)),null):this.importFile(a,b,c,d,f,g,k,m,l,e,t)}catch(Z){return this.handleError(Z),null}});g=null!=g?g:mxUtils.bind(this,function(a){p.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var u=
+a.length,v=u,q=[],D=mxUtils.bind(this,function(a,b){q[a]=b;if(0==--v){this.spinner.stop();if(null!=l)l(q);else{var c=[];p.getModel().beginUpdate();try{for(var d=0;d<q.length;d++){var e=q[d]();null!=e&&(c=c.concat(e))}}finally{p.getModel().endUpdate()}}g(c)}}),F=0;F<u;F++)mxUtils.bind(this,function(e){var g=a[e];if(null!=g){var 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,u=l.indexOf(","),
+v=decodeURIComponent(escape(atob(l.substring(u+1)))),q=mxUtils.parseXml(v),v=q.getElementsByTagName("svg");if(0<v.length){var v=v[0],F=t?null:v.getAttribute("content");null!=F&&"<"!=F.charAt(0)&&"%"!=F.charAt(0)&&(F=unescape(window.atob?atob(F):Base64.decode(F,!0)));null!=F&&"%"==F.charAt(0)&&(F=decodeURIComponent(F));null==F||"<mxfile "!==F.substring(0,8)&&"<mxGraphModel "!==F.substring(0,14)?D(e,mxUtils.bind(this,function(){try{if(l.substring(0,u+1),null!=q){var a=q.getElementsByTagName("svg");
+if(0<a.length){var k=a[0],m=k.getAttribute("width"),z=k.getAttribute("height"),m=null!=m&&"%"!=m.charAt(m.length-1)?parseFloat(m):NaN,z=null!=z&&"%"!=z.charAt(z.length-1)?parseFloat(z):NaN,A=k.getAttribute("viewBox");if(null==A||0==A.length)k.setAttribute("viewBox","0 0 "+m+" "+z);else if(isNaN(m)||isNaN(z)){var v=A.split(" ");3<v.length&&(m=parseFloat(v[2]),z=parseFloat(v[3]))}l=this.createSvgDataUri(mxUtils.getXml(k));var t=Math.min(1,Math.min(d/Math.max(1,m)),d/Math.max(1,z)),D=f(l,g.type,b+e*
+n,c+e*n,Math.max(1,Math.round(m*t)),Math.max(1,Math.round(z*t)),g.name);if(isNaN(m)||isNaN(z)){var F=new Image;F.onload=mxUtils.bind(this,function(){m=Math.max(1,F.width);z=Math.max(1,F.height);D[0].geometry.width=m;D[0].geometry.height=z;k.setAttribute("viewBox","0 0 "+m+" "+z);l=this.createSvgDataUri(mxUtils.getXml(k));var a=l.indexOf(";");0<a&&(l=l.substring(0,a)+l.substring(l.indexOf(",",a+1)));p.setCellStyles("image",l,[D[0]])});F.src=this.createSvgDataUri(mxUtils.getXml(k))}return D}}}catch(ia){}return null})):
+D(e,mxUtils.bind(this,function(){return f(F,"text/xml",b+e*n,c+e*n,0,0,g.name)}))}else D(e,mxUtils.bind(this,function(){return null}))}else{v=!1;if("image/png"==g.type){var y=t?null:this.extractGraphModelFromPng(a.target.result);if(null!=y&&0<y.length){var E=new Image;E.src=a.target.result;D(e,mxUtils.bind(this,function(){return f(y,"text/xml",b+e*n,c+e*n,E.width,E.height,g.name)}));v=!0}}v||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),
+mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(a.target.result,mxUtils.bind(this,function(k){this.resizeImage(k,a.target.result,mxUtils.bind(this,function(k,l,p){D(e,mxUtils.bind(this,function(){if(null!=k&&k.length<A){var u=m&&this.isResampleImage(a.target.result,z)?Math.min(1,Math.min(d/l,d/p)):1;return f(k,g.type,b+e*n,c+e*n,Math.round(l*u),Math.round(p*u),g.name)}this.handleError({message:mxResources.get("imageTooBig")});
+return null}))}),m,d,z)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else l=a.target.result,f(l,g.type,b+e*n,c+e*n,240,160,g.name,function(a){D(e,function(){return a})},g)});/(\.v(dx|sdx?))($|\?)/i.test(g.name)||/(\.vs(x|sx?))($|\?)/i.test(g.name)?f(null,g.type,b+e*n,c+e*n,240,160,g.name,function(a){D(e,function(){return a})},g):"image"==g.type.substring(0,5)||"application/pdf"==g.type?l.readAsDataURL(g):l.readAsText(g)}})(F)});if(p){p=[];
+for(v=0;v<a.length;v++)p.push(a[v]);a=p;this.confirmImageResize(function(a){m=a;q()},n)}else q()};EditorUi.prototype.confirmImageResize=function(a,b){b=null!=b?b:!1;var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},d=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,e=function(d,e){if(d||b)mxSettings.setResizeImages(d?e:null),mxSettings.save();c();a(e)};null==d||b?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),
function(a){e(a,!0)},function(a){e(a,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,!0,!0):e(!1,d)};EditorUi.prototype.parseFile=function(a,b,c){c=null!=c?c:a.name;var d=new FormData;d.append("format","xml");d.append("upfile",a,c);var e=new XMLHttpRequest;e.open("POST",
-OPEN_URL);e.onreadystatechange=function(){b(e)};e.send(d);try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+a.size})}catch(v){}};EditorUi.prototype.isResampleImage=function(a,b){b=null!=b?b:this.resampleThreshold;return a.length>b};EditorUi.prototype.resizeImage=function(a,b,c,d,f,g){f=null!=f?f:this.maxImageSize;var e=Math.max(1,a.width),k=Math.max(1,a.height);if(d&&this.isResampleImage(b,g))try{var m=Math.max(e/f,k/f);if(1<m){var l=Math.round(e/m),p=Math.round(k/m),n=document.createElement("canvas");
-n.width=l;n.height=p;n.getContext("2d").drawImage(a,0,0,l,p);var q=n.toDataURL();if(q.length<b.length){var v=document.createElement("canvas");v.width=l;v.height=p;var t=v.toDataURL();q!==t&&(b=q,e=l,k=p)}}}catch(G){}c(b,e,k)};EditorUi.prototype.crcTable=[];for(var b=0;256>b;b++)for(var g=b,f=0;8>f;f++)g=1==(g&1)?3988292384^g>>>1:g>>>1,EditorUi.prototype.crcTable[b]=g;EditorUi.prototype.updateCRC=function(a,b,c,d){for(var e=0;e<d;e++)a=EditorUi.prototype.crcTable[(a^b.charCodeAt(c+e))&255]^a>>>8;return a};
+OPEN_URL);e.onreadystatechange=function(){b(e)};e.send(d);try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+a.size})}catch(u){}};EditorUi.prototype.isResampleImage=function(a,b){b=null!=b?b:this.resampleThreshold;return a.length>b};EditorUi.prototype.resizeImage=function(a,b,c,d,f,g){f=null!=f?f:this.maxImageSize;var e=Math.max(1,a.width),k=Math.max(1,a.height);if(d&&this.isResampleImage(b,g))try{var m=Math.max(e/f,k/f);if(1<m){var l=Math.round(e/m),p=Math.round(k/m),n=document.createElement("canvas");
+n.width=l;n.height=p;n.getContext("2d").drawImage(a,0,0,l,p);var u=n.toDataURL();if(u.length<b.length){var v=document.createElement("canvas");v.width=l;v.height=p;var q=v.toDataURL();u!==q&&(b=u,e=l,k=p)}}}catch(H){}c(b,e,k)};EditorUi.prototype.crcTable=[];for(var b=0;256>b;b++)for(var g=b,f=0;8>f;f++)g=1==(g&1)?3988292384^g>>>1:g>>>1,EditorUi.prototype.crcTable[b]=g;EditorUi.prototype.updateCRC=function(a,b,c,d){for(var e=0;e<d;e++)a=EditorUi.prototype.crcTable[(a^b.charCodeAt(c+e))&255]^a>>>8;return a};
EditorUi.prototype.crc32=function(a){this.crcTable=this.crcTable||this.createCrcTable();for(var b=-1,c=0;c<a.length;c++)b=b>>>8^this.crcTable[(b^a.charCodeAt(c))&255];return(b^-1)>>>0};EditorUi.prototype.writeGraphModelToPng=function(a,b,c,d,f){function e(a,b){var c=m;m+=b;return a.substring(c,m)}function g(a){a=e(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 m=0;if(e(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=f&&f();else if(e(a,4),"IHDR"!=e(a,4))null!=f&&f();else{e(a,17);f=a.substring(0,m);do{var l=g(a);if("IDAT"==e(a,4)){f=a.substring(0,m-8);"pHYs"==b&&"dpi"==c?(c=Math.round(d/.0254),c=k(c)+k(c)+String.fromCharCode(1)):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);f+=k(c.length)+
-b+c+k(d^4294967295);f+=a.substring(m-8,a.length);break}f+=a.substring(m-8,m-4+l);e(a,l);e(a,4)}while(l);return"data:image/png;base64,"+(window.btoa?btoa(f):Base64.encode(f,!0))}};EditorUi.prototype.extractGraphModelFromPng=function(a){return Editor.extractGraphModelFromPng(a)};EditorUi.prototype.loadImage=function(a,b,c){try{var d=new Image;d.onload=function(){d.width=0<d.width?d.width:120;d.height=0<d.height?d.height:120;b(d)};null!=c&&(d.onerror=c);d.src=a}catch(t){if(null!=c)c(t);else throw t;
+b+c+k(d^4294967295);f+=a.substring(m-8,a.length);break}f+=a.substring(m-8,m-4+l);e(a,l);e(a,4)}while(l);return"data:image/png;base64,"+(window.btoa?btoa(f):Base64.encode(f,!0))}};EditorUi.prototype.extractGraphModelFromPng=function(a){return Editor.extractGraphModelFromPng(a)};EditorUi.prototype.loadImage=function(a,b,c){try{var d=new Image;d.onload=function(){d.width=0<d.width?d.width:120;d.height=0<d.height?d.height:120;b(d)};null!=c&&(d.onerror=c);d.src=a}catch(q){if(null!=c)c(q);else throw q;
}};var k=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.cellEditor.editPlantUmlData=function(c,d,e){var f=JSON.parse(e);d=new TextareaDialog(a,mxResources.get("plantUml")+":",f.data,function(d){null!=d&&a.spinner.spin(document.body,mxResources.get("inserting"))&&a.generatePlantUmlImage(d,f.format,
function(e,g,k){a.spinner.stop();b.getModel().beginUpdate();try{if("txt"==f.format)b.labelChanged(c,"<pre>"+e+"</pre>"),b.updateCellSize(c,!0);else{b.setCellStyles("image",a.convertDataUri(e),[c]);var m=b.model.getGeometry(c);null!=m&&(m=m.clone(),m.width=g,m.height=k,b.cellsResized([c],[m],!1))}b.setAttributeForCell(c,"plantUmlData",JSON.stringify({data:d,format:f.format}))}finally{b.getModel().endUpdate()}},function(b){a.handleError(b)})},null,null,400,220);a.showDialog(d.container,420,300,!0,!0);
d.init()};b.cellEditor.editMermaidData=function(c,d,e){var f=JSON.parse(e);d=new TextareaDialog(a,mxResources.get("mermaid")+":",f.data,function(d){null!=d&&a.spinner.spin(document.body,mxResources.get("inserting"))&&a.generateMermaidImage(d,f.config,function(e,g,k){a.spinner.stop();b.getModel().beginUpdate();try{b.setCellStyles("image",e,[c]);var m=b.model.getGeometry(c);null!=m&&(m=m.clone(),m.width=Math.max(m.width,g),m.height=Math.max(m.height,k),b.cellsResized([c],[m],!1));b.setAttributeForCell(c,
-"mermaidData",JSON.stringify({data:d,config:f.config},null,2))}finally{b.getModel().endUpdate()}},function(b){a.handleError(b)})},null,null,400,220);a.showDialog(d.container,420,300,!0,!0);d.init()};var c=b.cellEditor.startEditing;b.cellEditor.startEditing=function(b,d){try{var e=this.graph.getAttributeForCell(b,"plantUmlData");null!=e?this.editPlantUmlData(b,d,e):(e=this.graph.getAttributeForCell(b,"mermaidData"),null!=e?this.editMermaidData(b,d,e):c.apply(this,arguments))}catch(G){a.handleError(G)}};
-b.getLinkTitle=function(b){return a.getLinkTitle(b)};b.customLinkClicked=function(b){var c=!1;try{a.handleCustomLink(b),c=!0}catch(H){a.handleError(H)}return c};var d=this.clearDefaultStyle;this.clearDefaultStyle=function(){d.apply(this,arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://desk.draw.io/support/solutions/articles/16000051979");var f=a.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(b){b=null!=b?b:"";if(null!=
+"mermaidData",JSON.stringify({data:d,config:f.config},null,2))}finally{b.getModel().endUpdate()}},function(b){a.handleError(b)})},null,null,400,220);a.showDialog(d.container,420,300,!0,!0);d.init()};var c=b.cellEditor.startEditing;b.cellEditor.startEditing=function(b,d){try{var e=this.graph.getAttributeForCell(b,"plantUmlData");null!=e?this.editPlantUmlData(b,d,e):(e=this.graph.getAttributeForCell(b,"mermaidData"),null!=e?this.editMermaidData(b,d,e):c.apply(this,arguments))}catch(H){a.handleError(H)}};
+b.getLinkTitle=function(b){return a.getLinkTitle(b)};b.customLinkClicked=function(b){var c=!1;try{a.handleCustomLink(b),c=!0}catch(G){a.handleError(G)}return c};var d=this.clearDefaultStyle;this.clearDefaultStyle=function(){d.apply(this,arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://desk.draw.io/support/solutions/articles/16000051979");var f=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 f.apply(this,arguments)};var g=b.addClickHandler;b.addClickHandler=function(a,c,d){var e=c;c=function(a,c){if(null==c){var d=mxEvent.getSource(a);"a"==d.nodeName.toLowerCase()&&(c=d.getAttribute("href"))}null!=c&&b.isCustomLink(c)&&(mxEvent.isTouchEvent(a)||!mxEvent.isPopupTrigger(a))&&b.customLinkClicked(c)&&
mxEvent.consume(a);null!=e&&e(a,c)};g.call(this,a,c,d)};k.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?450:370,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var l=b.getExportVariables;b.getExportVariables=function(){var b=l.apply(this,arguments),c=a.getCurrentFile();null!=c&&(b.filename=c.getTitle());
b.pagecount=null!=a.pages?a.pages.length:1;b.page=null!=a.currentPage?a.currentPage.getName():"";b.pagenumber=null!=a.pages&&null!=a.currentPage?mxUtils.indexOf(a.pages,a.currentPage)+1:1;return b};var n=b.getGlobalVariable;b.getGlobalVariable=function(b){var c=a.getCurrentFile();return"filename"==b&&null!=c?c.getTitle():"page"==b&&null!=a.currentPage?a.currentPage.getName():"pagenumber"==b?null!=a.currentPage&&null!=a.pages?mxUtils.indexOf(a.pages,a.currentPage)+1:1:"pagecount"==b?null!=a.pages?
-a.pages.length:1:n.apply(this,arguments)};var u=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))u.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 x=this.actions.get("print");x.setEnabled(!mxClient.IS_IOS||!navigator.standalone);x.visible=x.isEnabled();if(!this.editor.chromeless||this.editor.editable)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",
+a.pages.length:1:n.apply(this,arguments)};var t=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))t.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 A=this.actions.get("print");A.setEnabled(!mxClient.IS_IOS||!navigator.standalone);A.visible=A.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"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"),this.installImagePasteHandler(),this.installNativeClipboardHandler();this.spinner=this.createSpinner(document.body.clientWidth/2-2,Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,24);Graph.fileSupport&&this.editor.graph.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(a){var b=this.editor.graph,c=b.cellEditor.text2,d=null;null!=c&&(mxEvent.addListener(c,"dragleave",
function(a){null!=d&&(d.parentNode.removeChild(d),d=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(a){null==d&&(!mxClient.IS_IE||10<document.documentMode)&&(d=this.highlightElement(c));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(c,"drop",mxUtils.bind(this,function(a){null!=d&&(d.parentNode.removeChild(d),d=null);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,function(a,c,d,e,
f,g){b.insertImage(a,f,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},mxEvent.isControlDown(a));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")){var c=a.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)?this.loadImage(decodeURIComponent(c),mxUtils.bind(this,function(a){var d=Math.max(1,a.width);a=Math.max(1,a.height);var e=this.maxImageSize,e=Math.min(1,Math.min(e/Math.max(1,d)),e/Math.max(1,
-a));b.insertImage(decodeURIComponent(c),d*e,a*e)})):document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"));a.stopPropagation();a.preventDefault()})))}));"undefined"!==typeof window.mxSettings&&(x=this.editor.graph.view,
-x.setUnit(mxSettings.getUnit()),x.addListener("unitChanged",function(a,b){mxSettings.setUnit(b.getProperty("unit"));mxSettings.save()}),this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,x.unit),this.refresh());if("1"==urlParams.styledev){x=document.getElementById("geFooter");null!=x&&(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)})),x.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,
-function(a,b){if(0<this.editor.graph.getSelectionCount()){var c=this.editor.graph.getSelectionCell(),c=this.editor.graph.getModel().getStyle(c);this.styleInput.value=c||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var A=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:A.apply(this,arguments)}}x=document.getElementById("geInfo");null!=x&&x.parentNode.removeChild(x);if(Graph.fileSupport&&(!this.editor.chromeless||
-this.editor.editable)){var E=null;mxEvent.addListener(b.container,"dragleave",function(a){b.isEnabled()&&(null!=E&&(E.parentNode.removeChild(E),E=null),a.stopPropagation(),a.preventDefault())});mxEvent.addListener(b.container,"dragover",mxUtils.bind(this,function(a){null==E&&(!mxClient.IS_IE||10<document.documentMode)&&(E=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!=E&&(E.parentNode.removeChild(E),E=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;if(0<a.dataTransfer.files.length)mxEvent.isAltDown(a)&&(g=f=null),this.importFiles(a.dataTransfer.files,f,g,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a));else{mxEvent.isAltDown(a)&&(g=f=0);var k=0<=mxUtils.indexOf(a.dataTransfer.types,
+a));b.insertImage(decodeURIComponent(c),d*e,a*e)})):document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"));a.stopPropagation();a.preventDefault()})))}));"undefined"!==typeof window.mxSettings&&(A=this.editor.graph.view,
+A.setUnit(mxSettings.getUnit()),A.addListener("unitChanged",function(a,b){mxSettings.setUnit(b.getProperty("unit"));mxSettings.save()}),this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,A.unit),this.refresh());if("1"==urlParams.styledev){A=document.getElementById("geFooter");null!=A&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type",
+"text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),A.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,
+function(a,b){if(0<this.editor.graph.getSelectionCount()){var c=this.editor.graph.getSelectionCell(),c=this.editor.graph.getModel().getStyle(c);this.styleInput.value=c||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var z=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:z.apply(this,arguments)}}A=document.getElementById("geInfo");null!=A&&A.parentNode.removeChild(A);if(Graph.fileSupport&&(!this.editor.chromeless||
+this.editor.editable)){var F=null;mxEvent.addListener(b.container,"dragleave",function(a){b.isEnabled()&&(null!=F&&(F.parentNode.removeChild(F),F=null),a.stopPropagation(),a.preventDefault())});mxEvent.addListener(b.container,"dragover",mxUtils.bind(this,function(a){null==F&&(!mxClient.IS_IE||10<document.documentMode)&&(F=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!=F&&(F.parentNode.removeChild(F),F=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;if(0<a.dataTransfer.files.length)mxEvent.isAltDown(a)&&(g=f=null),this.importFiles(a.dataTransfer.files,f,g,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a));else{mxEvent.isAltDown(a)&&(g=f=0);var k=0<=mxUtils.indexOf(a.dataTransfer.types,
"text/uri-list")?a.dataTransfer.getData("text/uri-list"):null,c=this.extractGraphModelFromEvent(a,null!=this.pages);if(null!=c)b.setSelectionCells(this.importXml(c,f,g,!0));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")){var m=a.dataTransfer.getData("text/html"),c=document.createElement("div");c.innerHTML=m;var l=null,d=c.getElementsByTagName("img");null!=d&&1==d.length?(m=d[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(m)||(l=!0)):(d=c.getElementsByTagName("a"),null!=
d&&1==d.length?m=d[0].getAttribute("href"):(c=c.getElementsByTagName("pre"),null!=c&&1==c.length&&(m=mxUtils.getTextContent(c[0]))));var p=!0,n=mxUtils.bind(this,function(){b.setSelectionCells(this.insertTextAt(m,f,g,!0,l,null,p))});l&&m.length>this.resampleThreshold?this.confirmImageResize(function(a){p=a;n()},mxEvent.isControlDown(a)):n()}else null!=k&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)?this.loadImage(decodeURIComponent(k),mxUtils.bind(this,function(a){var c=Math.max(1,a.width);a=Math.max(1,
a.height);var d=this.maxImageSize,d=Math.min(1,Math.min(d/Math.max(1,c)),d/Math.max(1,a));b.setSelectionCell(b.insertVertex(null,null,"",f,g,c*d,a*d,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+k+";"))}),mxUtils.bind(this,function(a){b.setSelectionCells(this.insertTextAt(k,f,g,!0))})):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&b.setSelectionCells(this.insertTextAt(a.dataTransfer.getData("text/plain"),f,g,!0))}}a.stopPropagation();
a.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var a=this.editor.graph;a.container.addEventListener("paste",mxUtils.bind(this,function(b){if(!mxEvent.isConsumed(b))try{for(var c=b.clipboardData||b.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(a.isEditing())this.importFiles([g.getAsFile()],0,0,this.maxImageSize,function(b,c,d,e,f,g){a.insertImage(b,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 k=this.editor.graph.getInsertPoint();this.importFiles([g.getAsFile()],k.x,k.y,this.maxImageSize);mxEvent.consume(b)}break}}}}catch(C){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function a(){window.setTimeout(function(){c.innerHTML=
+if("file"===g.kind){if(a.isEditing())this.importFiles([g.getAsFile()],0,0,this.maxImageSize,function(b,c,d,e,f,g){a.insertImage(b,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 k=this.editor.graph.getInsertPoint();this.importFiles([g.getAsFile()],k.x,k.y,this.maxImageSize);mxEvent.consume(b)}break}}}}catch(B){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function a(){window.setTimeout(function(){c.innerHTML=
"&nbsp;";c.focus();document.execCommand("selectAll",!1,null)},0)}var b=this.editor.graph,c=document.createElement("div");c.setAttribute("autocomplete","off");c.setAttribute("autocorrect","off");c.setAttribute("autocapitalize","off");c.setAttribute("spellcheck","false");c.style.textRendering="optimizeSpeed";c.style.fontFamily="monospace";c.style.wordBreak="break-all";c.style.background="transparent";c.style.color="transparent";c.style.position="absolute";c.style.whiteSpace="nowrap";c.style.overflow=
"hidden";c.style.display="block";c.style.fontSize="1";c.style.zIndex="-1";c.style.resize="none";c.style.outline="none";c.style.width="1px";c.style.height="1px";mxUtils.setOpacity(c,0);c.contentEditable=!0;c.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 e=mxEvent.getSource(a);null==b.container||!b.isEnabled()||b.isMouseDown||
b.isEditing()||null!=this.dialog||"INPUT"==e.nodeName||"TEXTAREA"==e.nodeName||!(224==a.keyCode||!mxClient.IS_MAC&&17==a.keyCode||mxClient.IS_MAC&&91==a.keyCode)||d||(c.style.left=b.container.scrollLeft+10+"px",c.style.top=b.container.scrollTop+10+"px",b.container.appendChild(c),d=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){c.focus();document.execCommand("selectAll",!1,null)},0):(c.focus(),document.execCommand("selectAll",!1,null)))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,
-function(a){var e=a.keyCode;window.setTimeout(mxUtils.bind(this,function(){!d||224!=e&&17!=e&&91!=e||(d=!1,b.isEditing()||null!=this.dialog||null==b.container||b.container.focus(),c.parentNode.removeChild(c),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(c,"copy",mxUtils.bind(this,function(d){if(b.isEnabled())try{mxClipboard.copy(b),this.copyCells(c),a()}catch(z){this.handleError(z)}}));mxEvent.addListener(c,"cut",mxUtils.bind(this,function(d){if(b.isEnabled())try{mxClipboard.copy(b),
-this.copyCells(c,!0),a()}catch(z){this.handleError(z)}}));mxEvent.addListener(c,"paste",mxUtils.bind(this,function(a){b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&((new Date).getTime(),c.innerHTML="&nbsp;",c.focus(),null!=a.clipboardData&&this.pasteCells(a,c,!0),mxEvent.isConsumed(a)||window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,c,!1)}),0))}),!0);var f=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==c?!0:f.apply(this,arguments)}};
+function(a){var e=a.keyCode;window.setTimeout(mxUtils.bind(this,function(){!d||224!=e&&17!=e&&91!=e||(d=!1,b.isEditing()||null!=this.dialog||null==b.container||b.container.focus(),c.parentNode.removeChild(c),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(c,"copy",mxUtils.bind(this,function(d){if(b.isEnabled())try{mxClipboard.copy(b),this.copyCells(c),a()}catch(y){this.handleError(y)}}));mxEvent.addListener(c,"cut",mxUtils.bind(this,function(d){if(b.isEnabled())try{mxClipboard.copy(b),
+this.copyCells(c,!0),a()}catch(y){this.handleError(y)}}));mxEvent.addListener(c,"paste",mxUtils.bind(this,function(a){b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&((new Date).getTime(),c.innerHTML="&nbsp;",c.focus(),null!=a.clipboardData&&this.pasteCells(a,c,!0,!0),mxEvent.isConsumed(a)||window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,c,!1,!0)}),0))}),!0);var f=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==c?!0:f.apply(this,arguments)}};
EditorUi.prototype.getLinkTitle=function(a){var b=Graph.prototype.getLinkTitle.apply(this,arguments);if("data:page/id,"==a.substring(0,13)){var c=a.indexOf(",");0<c&&(b=this.getPageById(a.substring(c+1)),b=null!=b?b.getName():mxResources.get("pageNotFound"))}else"data:"==a.substring(0,5)&&(b=mxResources.get("action"));return b};EditorUi.prototype.handleCustomLink=function(a){if("data:page/id,"==a.substring(0,13)){var b=a.indexOf(",");if(a=this.getPageById(a.substring(b+1)))this.selectPage(a);else throw Error(mxResources.get("pageNotFound")||
"Page not found");}else this.editor.graph.handleCustomLink(a)};EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){ColorDialog.recentColors=mxSettings.getRecentColors();if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,function(a){a.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),
this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(e){}this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(a,b){var c=b.getProperty("customFonts");this.menus.customFonts=c;mxSettings.setCustomFonts(c);mxSettings.save()}));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("dark"==uiTheme);this.addListener("gridColorChanged",mxUtils.bind(this,
function(a,b){mxSettings.setGridColor(this.editor.graph.view.gridColor,"dark"==uiTheme);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(c.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,c){if(!mxEvent.isConsumed(a)){var d=b;if(c&&null!=a.clipboardData&&a.clipboardData.getData){var e=a.clipboardData.getData("text/html");if(null!=e&&0<e.length){if(d=document.createElement("div"),d.innerHTML=e,e=d.getElementsByTagName("style"),null!=e)for(;0<e.length;)e[0].parentNode.removeChild(e[0])}else e=a.clipboardData.getData("text/plain"),null!=e&&0<e.length&&
-(d=document.createElement("div"),mxUtils.setTextContent(d,e))}e=d.getElementsByTagName("span");if(null!=e&&0<e.length&&"application/vnd.lucid.chart.objects"===e[0].getAttribute("data-lucid-type"))c=e[0].getAttribute("data-lucid-content"),null!=c&&0<c.length&&(this.convertLucidChart(c,mxUtils.bind(this,function(a){var b=this.editor.graph;b.lastPasteXml==a?b.pasteCounter++:(b.lastPasteXml=a,b.pasteCounter=0);var c=b.pasteCounter*b.gridSize;b.setSelectionCells(this.importXml(a,c,c));b.scrollCellToVisible(b.getSelectionCell())}),
-mxUtils.bind(this,function(a){this.handleError(a)})),mxEvent.consume(a));else{var f=mxUtils.trim(null==d.innerText?mxUtils.getTextContent(d):d.innerText),g=!1;try{var k=f.lastIndexOf("%3E");0<=k&&k<f.length-3&&(f=f.substring(0,k+3))}catch(D){}try{var e=d.getElementsByTagName("span"),m=null!=e&&0<e.length?mxUtils.trim(decodeURIComponent(e[0].textContent)):decodeURIComponent(f);this.isCompatibleString(m)&&(g=!0,f=m)}catch(D){}try{var l=this.editor.graph;if(null!=f&&0<f.length){l.lastPasteXml==f?l.pasteCounter++:
-(l.lastPasteXml=f,l.pasteCounter=0);var n=l.pasteCounter*l.gridSize;if(g||this.isCompatibleString(f))l.setSelectionCells(this.importXml(f,n,n));else{var p=l.getInsertPoint();l.isMouseInsertPoint()&&(n=0,l.lastPasteXml==f&&0<l.pasteCounter&&l.pasteCounter--);l.setSelectionCells(this.insertTextAt(f,p.x+n,p.y+n,!0))}l.isSelectionEmpty()||(l.scrollCellToVisible(l.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(l.view.getState(l.getSelectionCell())));try{mxEvent.consume(a)}catch(D){}}else c||
-(l.lastPasteXml=null,l.pasteCounter=0)}catch(D){this.handleError(D)}}}b.innerHTML="&nbsp;"};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&&this.openLocalFile(c,null,!0)):!this.isOffline()&&this.isRemoteFileFormat(c)?(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(c))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()&&this.openLocalFile(a.getText(),null,!0)})):/^https?:\/\//.test(c)&&(null==this.getCurrentFile()?window.location.hash=
-"#U"+encodeURIComponent(c):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(c)))))}else this.openLocalFile(c,null,!0)}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){try{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)+".drawio":/(\.pdf)$/i.test(e)&&(e=e.substring(0,e.length-4)+".drawio");var f=mxUtils.bind(this,function(a){e=0<=e.lastIndexOf(".")?e.substring(0,e.lastIndexOf("."))+".drawio":e+".drawio";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(E){this.handleError(E,
-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)+".drawio"),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(A){this.handleError(A,mxResources.get("errorLoadingFile"))}}else if(0==d.indexOf("PK"))this.importZipFile(a,mxUtils.bind(this,function(a){this.spinner.stop();f(a)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(d,e,b)}));else{if("image/png"==a.type.substring(0,9))d=
-this.extractGraphModelFromPng(d);else if("application/pdf"==a.type){var g=Editor.extractGraphModelFromPdf(d);null!=g&&(d=g)}this.spinner.stop();this.openLocalFile(d,e,b)}}}catch(A){this.handleError(A)}});c.onerror=mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a);window.openFile=null});"image"!==a.type.substring(0,5)&&"application/pdf"!==a.type||"image/svg"===a.type.substring(0,9)?c.readAsText(a):c.readAsDataURL(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=mxUtils.parseXml(a);null!=d&&(this.editor.setGraphXml(d.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,a,b||this.defaultFilename,c))});if(null!=a&&0<a.length)null==d||!d.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)?e():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&null!=d&&d.isModified()?this.confirm(mxResources.get("allChangesLost"),
-null,e,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(a,b),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=d&&d.isModified()?this.confirm(mxResources.get("allChangesLost"),null,e,mxResources.get("cancel"),mxResources.get("discardChanges")):e()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var a={};if(null!=this.pages)for(var b=
-0;b<this.pages.length;b++)this.updatePageRoot(this.pages[b]),this.addBasenamesForCell(this.pages[b].root,a);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),a);var b=[],c;for(c in a)b.push(c);return b};EditorUi.prototype.addBasenamesForCell=function(a,b){function c(a){if(null!=a){var c=a.lastIndexOf(".");0<c&&(a=a.substring(c+1,a.length));null==b[a]&&(b[a]=!0)}}var d=this.editor.graph,e=d.getCellStyle(a);c(mxStencilRegistry.getBasenameForStencil(e[mxConstants.STYLE_SHAPE]));d.model.isEdge(a)&&
-(c(mxMarker.getPackageForType(e[mxConstants.STYLE_STARTARROW])),c(mxMarker.getPackageForType(e[mxConstants.STYLE_ENDARROW])));for(var e=d.model.getChildCount(a),f=0;f<e;f++)this.addBasenamesForCell(d.model.getChildAt(a,f),b)};EditorUi.prototype.setGraphEnabled=function(a){this.diagramContainer.style.visibility=a?"":"hidden";this.formatContainer.style.visibility=a?"":"hidden";this.sidebarFooterContainer.style.display=a?"":"none";this.sidebarContainer.style.display=a?"":"none";this.hsplit.style.display=
+null):(c.lastPasteXml=e,c.pasteCounter=0);a.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.pasteCells=function(a,b,c,d){if(!mxEvent.isConsumed(a)){var e=b,f=!1;if(c&&null!=a.clipboardData&&a.clipboardData.getData){var g=a.clipboardData.getData("text/html");if(null!=g&&0<g.length){e=document.createElement("div");e.innerHTML=g;f=!0;g=e.getElementsByTagName("style");if(null!=g)for(;0<g.length;)g[0].parentNode.removeChild(g[0]);Graph.removePasteFormatting(e)}else g=a.clipboardData.getData("text/plain"),
+null!=g&&0<g.length&&(e=document.createElement("div"),mxUtils.setTextContent(e,g))}g=e.getElementsByTagName("span");if(null!=g&&0<g.length&&"application/vnd.lucid.chart.objects"===g[0].getAttribute("data-lucid-type"))c=g[0].getAttribute("data-lucid-content"),null!=c&&0<c.length&&(this.convertLucidChart(c,mxUtils.bind(this,function(a){var b=this.editor.graph;b.lastPasteXml==a?b.pasteCounter++:(b.lastPasteXml=a,b.pasteCounter=0);var c=b.pasteCounter*b.gridSize;b.setSelectionCells(this.importXml(a,c,
+c));b.scrollCellToVisible(b.getSelectionCell())}),mxUtils.bind(this,function(a){this.handleError(a)})),mxEvent.consume(a));else{var f=f?e.outerHTML:mxUtils.trim(null==e.innerText?mxUtils.getTextContent(e):e.innerText),k=!1;try{var m=f.lastIndexOf("%3E");0<=m&&m<f.length-3&&(f=f.substring(0,m+3))}catch(C){}try{var g=e.getElementsByTagName("span"),l=null!=g&&0<g.length?mxUtils.trim(decodeURIComponent(g[0].textContent)):decodeURIComponent(f);this.isCompatibleString(l)&&(k=!0,f=l)}catch(C){}try{var n=
+this.editor.graph;if(null!=f&&0<f.length){n.lastPasteXml==f?n.pasteCounter++:(n.lastPasteXml=f,n.pasteCounter=0);var p=n.pasteCounter*n.gridSize;if(k||this.isCompatibleString(f))n.setSelectionCells(this.importXml(f,p,p));else if(d&&1==n.getSelectionCount())n.labelChanged(n.getSelectionCell(),f);else{var v=n.getInsertPoint();n.isMouseInsertPoint()&&(p=0,n.lastPasteXml==f&&0<n.pasteCounter&&n.pasteCounter--);n.setSelectionCells(this.insertTextAt(f,v.x+p,v.y+p,!0))}n.isSelectionEmpty()||(n.scrollCellToVisible(n.getSelectionCell()),
+null!=this.hoverIcons&&this.hoverIcons.update(n.view.getState(n.getSelectionCell())));try{mxEvent.consume(a)}catch(C){}}else c||(n.lastPasteXml=null,n.pasteCounter=0)}catch(C){this.handleError(C)}}}b.innerHTML="&nbsp;"};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&&this.openLocalFile(c,null,!0)):!this.isOffline()&&this.isRemoteFileFormat(c)?(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(c))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()&&this.openLocalFile(a.getText(),
+null,!0)})):/^https?:\/\//.test(c)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(c):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(c)))))}else this.openLocalFile(c,null,!0)}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){try{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)+".drawio":/(\.pdf)$/i.test(e)&&(e=e.substring(0,e.length-4)+".drawio");var f=mxUtils.bind(this,function(a){e=0<=e.lastIndexOf(".")?e.substring(0,e.lastIndexOf("."))+".drawio":e+".drawio";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();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)+".drawio"),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(z){this.handleError(z,mxResources.get("errorLoadingFile"))}}else if(0==d.indexOf("PK"))this.importZipFile(a,mxUtils.bind(this,function(a){this.spinner.stop();f(a)}),mxUtils.bind(this,function(){this.spinner.stop();
+this.openLocalFile(d,e,b)}));else{if("image/png"==a.type.substring(0,9))d=this.extractGraphModelFromPng(d);else if("application/pdf"==a.type){var g=Editor.extractGraphModelFromPdf(d);null!=g&&(d=g)}this.spinner.stop();this.openLocalFile(d,e,b)}}}catch(z){this.handleError(z)}});c.onerror=mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a);window.openFile=null});"image"!==a.type.substring(0,5)&&"application/pdf"!==a.type||"image/svg"===a.type.substring(0,9)?c.readAsText(a):c.readAsDataURL(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=mxUtils.parseXml(a);null!=d&&(this.editor.setGraphXml(d.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,a,b||this.defaultFilename,c))});if(null!=a&&0<a.length)null==d||!d.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)?e():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&
+null!=d&&d.isModified()?this.confirm(mxResources.get("allChangesLost"),null,e,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(a,b),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=d&&d.isModified()?this.confirm(mxResources.get("allChangesLost"),null,e,mxResources.get("cancel"),mxResources.get("discardChanges")):e()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=
+function(){var a={};if(null!=this.pages)for(var b=0;b<this.pages.length;b++)this.updatePageRoot(this.pages[b]),this.addBasenamesForCell(this.pages[b].root,a);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),a);var b=[],c;for(c in a)b.push(c);return b};EditorUi.prototype.addBasenamesForCell=function(a,b){function c(a){if(null!=a){var c=a.lastIndexOf(".");0<c&&(a=a.substring(c+1,a.length));null==b[a]&&(b[a]=!0)}}var d=this.editor.graph,e=d.getCellStyle(a);c(mxStencilRegistry.getBasenameForStencil(e[mxConstants.STYLE_SHAPE]));
+d.model.isEdge(a)&&(c(mxMarker.getPackageForType(e[mxConstants.STYLE_STARTARROW])),c(mxMarker.getPackageForType(e[mxConstants.STYLE_ENDARROW])));for(var e=d.model.getChildCount(a),f=0;f<e;f++)this.addBasenamesForCell(d.model.getChildAt(a,f),b)};EditorUi.prototype.setGraphEnabled=function(a){this.diagramContainer.style.visibility=a?"":"hidden";this.formatContainer.style.visibility=a?"":"hidden";this.sidebarFooterContainer.style.display=a?"":"none";this.sidebarContainer.style.display=a?"":"none";this.hsplit.style.display=
a?"":"none";this.editor.graph.setEnabled(a);null!=this.ruler&&(this.ruler.hRuler.container.style.visibility=a?"":"hidden",this.ruler.vRuler.container.style.visibility=a?"":"hidden");null!=this.tabContainer&&(this.tabContainer.style.visibility=a?"":"hidden");a||(null!=this.actions.outlineWindow&&this.actions.outlineWindow.window.setVisible(!1),null!=this.actions.layersWindow&&this.actions.layersWindow.window.setVisible(!1),null!=this.menus.tagsWindow&&this.menus.tagsWindow.window.setVisible(!1),null!=
this.menus.findWindow&&this.menus.findWindow.window.setVisible(!1))};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?
@@ -9367,17 +9368,17 @@ d=!1,e=null,f=mxUtils.bind(this,function(a,b){this.editor.modified&&"0"!=urlPara
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=Graph.decompress(a)))}catch(ca){}return a});if("json"==urlParams.proto){try{k=JSON.parse(k)}catch(P){k=null}try{if(null==k)return;if("dialog"==k.action){this.showError(null!=k.titleKey?mxResources.get(k.titleKey):k.title,null!=k.messageKey?
mxResources.get(k.messageKey):k.message,null!=k.buttonKey?mxResources.get(k.buttonKey):k.button);null!=k.modified&&(this.editor.modified=k.modified);return}if("prompt"==k.action){this.spinner.stop();var l=new FilenameDialog(this,k.defaultValue||"",null!=k.okKey?mxResources.get(k.okKey):null,function(a){null!=a&&g.postMessage(JSON.stringify({event:"prompt",value:a,message:k}),"*")},null!=k.titleKey?mxResources.get(k.titleKey):k.title);this.showDialog(l.container,300,80,!0,!1);l.init();return}if("draft"==
k.action){var n=m(k.xml);this.spinner.stop();l=new DraftDialog(this,mxResources.get("draftFound",[k.name||this.defaultFilename]),n,mxUtils.bind(this,function(){this.hideDialog();g.postMessage(JSON.stringify({event:"draft",result:"edit",message:k}),"*")}),mxUtils.bind(this,function(){this.hideDialog();g.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();
-g.postMessage(JSON.stringify({event:"draft",result:"ignore",message:k}),"*")}):null);this.showDialog(l.container,640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{l.init()}catch(P){g.postMessage(JSON.stringify({event:"draft",error:P.toString(),message:k}),"*")}return}if("template"==k.action){this.spinner.stop();var p=1==k.enableRecent,q=1==k.enableSearch,v=1==k.enableCustomTemp,l=new NewDialog(this,!1,null!=k.callback,mxUtils.bind(this,function(b,c){b=b||this.emptyDiagramXml;
-null!=k.callback?g.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,name:c}),"*"):(a(b,f,b!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,p?mxUtils.bind(this,function(a){this.remoteInvoke("getRecentDiagrams",null,null,a,function(){a(null,"Network Error!")})}):null,q?mxUtils.bind(this,function(a,b){this.remoteInvoke("searchDiagrams",[a],null,b,function(){b(null,"Network Error!")})}):null,mxUtils.bind(this,
-function(a,b,c){g.postMessage(JSON.stringify({event:"template",docUrl:a,info:b,name:c}),"*")}),null,null,v?mxUtils.bind(this,function(a){this.remoteInvoke("getCustomTemplates",null,null,a,function(){a({},0)})}):null);this.showDialog(l.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));l.init();return}if("textContent"==k.action){var u=this.getDiagramTextContent();g.postMessage(JSON.stringify({event:"textContent",data:u,message:k}),"*");return}if("status"==
-k.action){null!=k.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(k.messageKey))):null!=k.message&&this.editor.setStatus(mxUtils.htmlEntities(k.message));null!=k.modified&&(this.editor.modified=k.modified);return}if("spinner"==k.action){var t=null!=k.messageKey?mxResources.get(k.messageKey):k.message;null==k.show||k.show?this.spinner.spin(document.body,t):this.spinner.stop();return}if("export"==k.action){if("png"==k.format||"xmlpng"==k.format){if(null==k.spin&&null==k.spinKey||
-this.spinner.spin(document.body,null!=k.spinKey?mxResources.get(k.spinKey):k.spin)){var z=null!=k.xml?k.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var F=this.editor.graph,y=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(z);g.postMessage(JSON.stringify(b),"*")}),O=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);"xmlpng"==k.format&&(a=
-this.writeGraphModelToPng(a,"tEXt","mxfile",encodeURIComponent(z)));F!=this.editor.graph&&F.container.parentNode.removeChild(F.container);y(a)}),Q=k.pageId||(null!=this.pages?this.pages[0].getId():null);if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage.getId()!=Q){for(var Y=F.getGlobalVariable,F=this.createTemporaryGraph(F.getStylesheet()),U,L=0;L<this.pages.length;L++)if(this.pages[L].getId()==Q){U=this.updatePageRoot(this.pages[L]);break}F.getGlobalVariable=function(a){return"page"==
-a?U.getName():"pagenumber"==a?1:Y.apply(this,arguments)};document.body.appendChild(F.container);F.model.setRoot(U.root)}if(null!=k.layerIds){for(var V=F.model,W=V.getChildCells(V.getRoot()),l={},L=0;L<k.layerIds.length;L++)l[k.layerIds[L]]=!0;for(L=0;L<W.length;L++)V.setVisible(W[L],l[W[L].id]||!1)}this.exportToCanvas(mxUtils.bind(this,function(a){O(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,function(){O(null)}),null,null,k.scale,null,null,null,F)}else(new mxXmlRequest(EXPORT_URL,
-"format=png&embedXml="+("xmlpng"==k.format?"1":"0")+(null!=Q?"&pageId="+Q:"")+(null!=k.layerIds?"&extras="+encodeURIComponent(JSON.stringify({layerIds:k.layerIds})):"")+(null!=k.scale?"&scale="+k.scale:"")+"&base64=1&xml="+encodeURIComponent(z))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?y("data:image/png;base64,"+a.getText()):O(null)}),mxUtils.bind(this,function(){O(null)}))}}else{null!=k.xml&&0<k.xml.length&&this.setFileData(k.xml);t=this.createLoadMessage("export");
-if("html2"==k.format||"html"==k.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var ga=this.getXmlFileData();t.xml=mxUtils.getXml(ga);t.data=this.getFileData(null,null,!0,null,null,null,ga);t.format=k.format}else if("html"==k.format)z=this.editor.getGraphXml(),t.data=this.getHtml(z,this.editor.graph),t.xml=mxUtils.getXml(z),t.format=k.format;else{mxSvgCanvas2D.prototype.foAltText=null;var fa=this.editor.graph.background;fa==mxConstants.NONE&&(fa=null);t.xml=this.getFileData(!0,
-null,null,null,null,null,null,null,null,!1);t.format="svg";var ba=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();t.data=this.createSvgDataUri(a);g.postMessage(JSON.stringify(t),"*")});if("xmlsvg"==k.format)(null==k.spin&&null==k.spinKey||this.spinner.spin(document.body,null!=k.spinKey?mxResources.get(k.spinKey):k.spin))&&this.getEmbeddedSvg(t.xml,this.editor.graph,null,!0,ba,null,null,k.embedImages);else if(null==k.spin&&null==k.spinKey||this.spinner.spin(document.body,
-null!=k.spinKey?mxResources.get(k.spinKey):k.spin)){this.editor.graph.setEnabled(!1);var X=this.editor.graph.getSvg(fa);this.embedFonts(X,mxUtils.bind(this,function(a){k.embedImages||null==k.embedImages?this.convertImages(a,mxUtils.bind(this,function(a){ba(mxUtils.getXml(a))})):ba(mxUtils.getXml(a))}))}return}g.postMessage(JSON.stringify(t),"*")}return}if("load"==k.action)d=1==k.autosave,this.hideDialog(),null!=k.modified&&null==urlParams.modified&&(urlParams.modified=k.modified),null!=k.saveAndExit&&
+g.postMessage(JSON.stringify({event:"draft",result:"ignore",message:k}),"*")}):null);this.showDialog(l.container,640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{l.init()}catch(P){g.postMessage(JSON.stringify({event:"draft",error:P.toString(),message:k}),"*")}return}if("template"==k.action){this.spinner.stop();var p=1==k.enableRecent,u=1==k.enableSearch,t=1==k.enableCustomTemp,l=new NewDialog(this,!1,null!=k.callback,mxUtils.bind(this,function(b,c){b=b||this.emptyDiagramXml;
+null!=k.callback?g.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,name:c}),"*"):(a(b,f,b!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,p?mxUtils.bind(this,function(a){this.remoteInvoke("getRecentDiagrams",null,null,a,function(){a(null,"Network Error!")})}):null,u?mxUtils.bind(this,function(a,b){this.remoteInvoke("searchDiagrams",[a],null,b,function(){b(null,"Network Error!")})}):null,mxUtils.bind(this,
+function(a,b,c){g.postMessage(JSON.stringify({event:"template",docUrl:a,info:b,name:c}),"*")}),null,null,t?mxUtils.bind(this,function(a){this.remoteInvoke("getCustomTemplates",null,null,a,function(){a({},0)})}):null);this.showDialog(l.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));l.init();return}if("textContent"==k.action){var v=this.getDiagramTextContent();g.postMessage(JSON.stringify({event:"textContent",data:v,message:k}),"*");return}if("status"==
+k.action){null!=k.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(k.messageKey))):null!=k.message&&this.editor.setStatus(mxUtils.htmlEntities(k.message));null!=k.modified&&(this.editor.modified=k.modified);return}if("spinner"==k.action){var 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 y=null!=k.xml?k.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var E=this.editor.graph,x=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(y);g.postMessage(JSON.stringify(b),"*")}),O=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);"xmlpng"==k.format&&(a=
+this.writeGraphModelToPng(a,"tEXt","mxfile",encodeURIComponent(y)));E!=this.editor.graph&&E.container.parentNode.removeChild(E.container);x(a)}),Q=k.pageId||(null!=this.pages?this.pages[0].getId():null);if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage.getId()!=Q){for(var Y=E.getGlobalVariable,E=this.createTemporaryGraph(E.getStylesheet()),U,L=0;L<this.pages.length;L++)if(this.pages[L].getId()==Q){U=this.updatePageRoot(this.pages[L]);break}E.getGlobalVariable=function(a){return"page"==
+a?U.getName():"pagenumber"==a?1:Y.apply(this,arguments)};document.body.appendChild(E.container);E.model.setRoot(U.root)}if(null!=k.layerIds){for(var V=E.model,W=V.getChildCells(V.getRoot()),l={},L=0;L<k.layerIds.length;L++)l[k.layerIds[L]]=!0;for(L=0;L<W.length;L++)V.setVisible(W[L],l[W[L].id]||!1)}this.exportToCanvas(mxUtils.bind(this,function(a){O(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,function(){O(null)}),null,null,k.scale,null,null,null,E)}else(new mxXmlRequest(EXPORT_URL,
+"format=png&embedXml="+("xmlpng"==k.format?"1":"0")+(null!=Q?"&pageId="+Q:"")+(null!=k.layerIds?"&extras="+encodeURIComponent(JSON.stringify({layerIds:k.layerIds})):"")+(null!=k.scale?"&scale="+k.scale:"")+"&base64=1&xml="+encodeURIComponent(y))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?x("data:image/png;base64,"+a.getText()):O(null)}),mxUtils.bind(this,function(){O(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)){var ga=this.getXmlFileData();q.xml=mxUtils.getXml(ga);q.data=this.getFileData(null,null,!0,null,null,null,ga);q.format=k.format}else if("html"==k.format)y=this.editor.getGraphXml(),q.data=this.getHtml(y,this.editor.graph),q.xml=mxUtils.getXml(y),q.format=k.format;else{mxSvgCanvas2D.prototype.foAltText=null;var fa=this.editor.graph.background;fa==mxConstants.NONE&&(fa=null);q.xml=this.getFileData(!0,
+null,null,null,null,null,null,null,null,!1);q.format="svg";var ba=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();q.data=this.createSvgDataUri(a);g.postMessage(JSON.stringify(q),"*")});if("xmlsvg"==k.format)(null==k.spin&&null==k.spinKey||this.spinner.spin(document.body,null!=k.spinKey?mxResources.get(k.spinKey):k.spin))&&this.getEmbeddedSvg(q.xml,this.editor.graph,null,!0,ba,null,null,k.embedImages);else if(null==k.spin&&null==k.spinKey||this.spinner.spin(document.body,
+null!=k.spinKey?mxResources.get(k.spinKey):k.spin)){this.editor.graph.setEnabled(!1);var X=this.editor.graph.getSvg(fa);this.embedFonts(X,mxUtils.bind(this,function(a){k.embedImages||null==k.embedImages?this.convertImages(a,mxUtils.bind(this,function(a){ba(mxUtils.getXml(a))})):ba(mxUtils.getXml(a))}))}return}g.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&&(n=document.createElement("span"),mxUtils.write(n,k.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="6px",this.buttonContainer.style.right="25px"):"min"!=uiTheme&&(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),
this.buttonContainer.appendChild(n),this.embedFilenameSpan=n),k=null!=k.xmlpng?this.extractGraphModelFromPng(k.xmlpng):k.xml;else{"remoteInvokeReady"==k.action?this.handleRemoteInvokeReady(g):"remoteInvoke"==k.action?this.handleRemoteInvoke(k,f.origin):"remoteInvokeResponse"==k.action?this.handleRemoteInvokeResponse(k):g.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(k)}),"*");return}}catch(P){this.handleError(P)}}var aa=mxUtils.bind(this,function(f,k){c=!0;try{a(f,k)}catch(da){this.handleError(da)}c=
!1;null!=urlParams.modified&&this.editor.setStatus("");var m=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});e=m();d&&null==b&&(b=mxUtils.bind(this,function(a,b){var d=m();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",
@@ -9388,14 +9389,14 @@ function(){if(null!=this.menubar){var a=document.createElement("div");a.style.di
a.appendChild(b)):(mxUtils.write(b,mxResources.get("save")),b.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),a.appendChild(b),"1"==urlParams.saveAndExit&&(b=document.createElement("a"),mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",mxResources.get("saveAndExit")),b.className="geBigButton geBigStandardButton",b.style.marginLeft="6px",mxEvent.addListener(b,
"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b)));b=document.createElement("a");mxUtils.write(b,mxResources.get("exit"));b.setAttribute("title",mxResources.get("exit"));b.className="geBigButton geBigStandardButton";b.style.marginLeft="6px";b.style.marginRight="20px";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.isOffline()?null:"https://about.draw.io/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};
-EditorUi.prototype.executeLayoutList=function(a,b){for(var c=this.editor.graph,d=c.getSelectionCells(),e=0;e<a.length;e++){var f=new window[a[e].layout](c);if(null!=a[e].config)for(var g in a[e].config)f[g]=a[e].config[g];this.executeLayout(function(){f.execute(c.getDefaultParent(),0==d.length?null:d)},e==a.length-1,b)}};EditorUi.prototype.importCsv=function(a,b){try{var c=a.split("\n"),d=[],e=[],f={};if(0<c.length){var g={},k=null,m=null,l=null,n=null,u=null,D=null,B=null,H=null,G="",J="auto",I=
-"auto",F=null,K=null,O=40,Q=40,Y=100,U=0,L=this.editor.graph;L.getGraphBounds();for(var V=function(){null!=b?b(la):(L.setSelectionCells(la),L.scrollCellToVisible(L.getSelectionCell()))},W=L.getFreeInsertPoint(),ga=W.x,fa=W.y,W=fa,ba=null,X="auto",H=null,aa=[],P=null,ca=null,Z=0;Z<c.length&&"#"==c[Z].charAt(0);){a=c[Z];for(Z++;Z<c.length&&"\\"==a.charAt(a.length-1)&&"#"==c[Z].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(c[Z].substring(1)),Z++;if("#"!=a.charAt(1)){var da=a.indexOf(":");if(0<
-da){var R=mxUtils.trim(a.substring(1,da)),M=mxUtils.trim(a.substring(da+1));"label"==R?ba=L.sanitizeHtml(M):"labelname"==R&&0<M.length&&"-"!=M?n=M:"labels"==R&&0<M.length&&"-"!=M?u=JSON.parse(M):"style"==R?k=M:"parentstyle"==R?D=M:"stylename"==R&&0<M.length&&"-"!=M?l=M:"styles"==R&&0<M.length&&"-"!=M?m=JSON.parse(M):"identity"==R&&0<M.length&&"-"!=M?B=M:"parent"==R&&0<M.length&&"-"!=M?H=M:"namespace"==R&&0<M.length&&"-"!=M?G=M:"width"==R?J=M:"height"==R?I=M:"left"==R&&0<M.length?F=M:"top"==R&&0<M.length?
-K=M:"ignore"==R?ca=M.split(","):"connect"==R?aa.push(JSON.parse(M)):"link"==R?P=M:"padding"==R?U=parseFloat(M):"edgespacing"==R?O=parseFloat(M):"nodespacing"==R?Q=parseFloat(M):"levelspacing"==R?Y=parseFloat(M):"layout"==R&&(X=M)}}}if(null==c[Z])throw Error(mxResources.get("invalidOrMissingFile"));for(var ea=this.editor.csvToArray(c[Z]),R=da=null,M=[],T=0;T<ea.length;T++)B==ea[T]&&(da=T),H==ea[T]&&(R=T),M.push(mxUtils.trim(ea[T]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==
-ba&&(ba="%"+M[0]+"%");if(null!=aa)for(var S=0;S<aa.length;S++)null==g[aa[S].to]&&(g[aa[S].to]={});B=[];for(T=Z+1;T<c.length;T++){var ha=this.editor.csvToArray(c[T]);if(null==ha){var ma=40<c[T].length?c[T].substring(0,40)+"...":c[T];throw Error(ma+" ("+T+"):\n"+mxResources.get("containsValidationErrors"));}0<ha.length&&B.push(ha)}L.model.beginUpdate();try{for(T=0;T<B.length;T++){var ha=B[T],N=null,ka=null!=da?G+ha[da]:null;null!=ka&&(N=L.model.getCell(ka));var c=null!=N,ia=new mxCell(ba,new mxGeometry(ga,
-W,0,0),k||"whiteSpace=wrap;html=1;");ia.vertex=!0;ia.id=ka;for(var ja=0;ja<ha.length;ja++)L.setAttributeForCell(ia,M[ja],ha[ja]);if(null!=n&&null!=u){var ua=u[ia.getAttribute(n)];null!=ua&&L.labelChanged(ia,ua)}if(null!=l&&null!=m){var va=m[ia.getAttribute(l)];null!=va&&(ia.style=va)}L.setAttributeForCell(ia,"placeholders","1");ia.style=L.replacePlaceholders(ia,ia.style);c&&(L.model.setGeometry(N,ia.geometry),L.model.setStyle(N,ia.style),0>mxUtils.indexOf(e,N)&&e.push(N));N=ia;if(!c)for(S=0;S<aa.length;S++)g[aa[S].to][N.getAttribute(aa[S].to)]=
-N;null!=P&&"link"!=P&&(L.setLinkForCell(N,N.getAttribute(P)),L.setAttributeForCell(N,P,null));L.fireEvent(new mxEventObject("cellsInserted","cells",[N]));var wa=this.editor.graph.getPreferredSizeForCell(N);N.vertex&&(null!=F&&null!=N.getAttribute(F)&&(N.geometry.x=ga+parseFloat(N.getAttribute(F))),null!=K&&null!=N.getAttribute(K)&&(N.geometry.y=fa+parseFloat(N.getAttribute(K))),"@"==J.charAt(0)&&null!=N.getAttribute(J.substring(1))?N.geometry.width=parseFloat(N.getAttribute(J.substring(1))):N.geometry.width=
-"auto"==J?wa.width+U:parseFloat(J),"@"==I.charAt(0)&&null!=N.getAttribute(I.substring(1))?N.geometry.height=parseFloat(N.getAttribute(I.substring(1))):N.geometry.height="auto"==I?wa.height+U:parseFloat(I),W+=N.geometry.height+Q);c?(null==f[ka]&&(f[ka]=[]),f[ka].push(N)):(H=null!=R?L.model.getCell(G+ha[R]):null,d.push(N),null!=H?(H.style=L.replacePlaceholders(H,D),L.addCell(N,H)):e.push(L.addCell(N)))}for(var na=e.slice(),la=e.slice(),S=0;S<aa.length;S++)for(var xa=aa[S],T=0;T<d.length;T++){var N=
+EditorUi.prototype.executeLayoutList=function(a,b){for(var c=this.editor.graph,d=c.getSelectionCells(),e=0;e<a.length;e++){var f=new window[a[e].layout](c);if(null!=a[e].config)for(var g in a[e].config)f[g]=a[e].config[g];this.executeLayout(function(){f.execute(c.getDefaultParent(),0==d.length?null:d)},e==a.length-1,b)}};EditorUi.prototype.importCsv=function(a,b){try{var c=a.split("\n"),d=[],e=[],f={};if(0<c.length){var g={},k=null,m=null,l=null,n=null,t=null,D=null,C=null,G=null,H="",J="auto",I=
+"auto",E=null,K=null,O=40,Q=40,Y=100,U=0,L=this.editor.graph;L.getGraphBounds();for(var V=function(){null!=b?b(la):(L.setSelectionCells(la),L.scrollCellToVisible(L.getSelectionCell()))},W=L.getFreeInsertPoint(),ga=W.x,fa=W.y,W=fa,ba=null,X="auto",G=null,aa=[],P=null,ca=null,Z=0;Z<c.length&&"#"==c[Z].charAt(0);){a=c[Z];for(Z++;Z<c.length&&"\\"==a.charAt(a.length-1)&&"#"==c[Z].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(c[Z].substring(1)),Z++;if("#"!=a.charAt(1)){var da=a.indexOf(":");if(0<
+da){var R=mxUtils.trim(a.substring(1,da)),M=mxUtils.trim(a.substring(da+1));"label"==R?ba=L.sanitizeHtml(M):"labelname"==R&&0<M.length&&"-"!=M?n=M:"labels"==R&&0<M.length&&"-"!=M?t=JSON.parse(M):"style"==R?k=M:"parentstyle"==R?D=M:"stylename"==R&&0<M.length&&"-"!=M?l=M:"styles"==R&&0<M.length&&"-"!=M?m=JSON.parse(M):"identity"==R&&0<M.length&&"-"!=M?C=M:"parent"==R&&0<M.length&&"-"!=M?G=M:"namespace"==R&&0<M.length&&"-"!=M?H=M:"width"==R?J=M:"height"==R?I=M:"left"==R&&0<M.length?E=M:"top"==R&&0<M.length?
+K=M:"ignore"==R?ca=M.split(","):"connect"==R?aa.push(JSON.parse(M)):"link"==R?P=M:"padding"==R?U=parseFloat(M):"edgespacing"==R?O=parseFloat(M):"nodespacing"==R?Q=parseFloat(M):"levelspacing"==R?Y=parseFloat(M):"layout"==R&&(X=M)}}}if(null==c[Z])throw Error(mxResources.get("invalidOrMissingFile"));for(var ea=this.editor.csvToArray(c[Z]),R=da=null,M=[],T=0;T<ea.length;T++)C==ea[T]&&(da=T),G==ea[T]&&(R=T),M.push(mxUtils.trim(ea[T]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==
+ba&&(ba="%"+M[0]+"%");if(null!=aa)for(var S=0;S<aa.length;S++)null==g[aa[S].to]&&(g[aa[S].to]={});C=[];for(T=Z+1;T<c.length;T++){var ha=this.editor.csvToArray(c[T]);if(null==ha){var ma=40<c[T].length?c[T].substring(0,40)+"...":c[T];throw Error(ma+" ("+T+"):\n"+mxResources.get("containsValidationErrors"));}0<ha.length&&C.push(ha)}L.model.beginUpdate();try{for(T=0;T<C.length;T++){var ha=C[T],N=null,ka=null!=da?H+ha[da]:null;null!=ka&&(N=L.model.getCell(ka));var c=null!=N,ia=new mxCell(ba,new mxGeometry(ga,
+W,0,0),k||"whiteSpace=wrap;html=1;");ia.vertex=!0;ia.id=ka;for(var ja=0;ja<ha.length;ja++)L.setAttributeForCell(ia,M[ja],ha[ja]);if(null!=n&&null!=t){var ua=t[ia.getAttribute(n)];null!=ua&&L.labelChanged(ia,ua)}if(null!=l&&null!=m){var va=m[ia.getAttribute(l)];null!=va&&(ia.style=va)}L.setAttributeForCell(ia,"placeholders","1");ia.style=L.replacePlaceholders(ia,ia.style);c&&(L.model.setGeometry(N,ia.geometry),L.model.setStyle(N,ia.style),0>mxUtils.indexOf(e,N)&&e.push(N));N=ia;if(!c)for(S=0;S<aa.length;S++)g[aa[S].to][N.getAttribute(aa[S].to)]=
+N;null!=P&&"link"!=P&&(L.setLinkForCell(N,N.getAttribute(P)),L.setAttributeForCell(N,P,null));L.fireEvent(new mxEventObject("cellsInserted","cells",[N]));var wa=this.editor.graph.getPreferredSizeForCell(N);N.vertex&&(null!=E&&null!=N.getAttribute(E)&&(N.geometry.x=ga+parseFloat(N.getAttribute(E))),null!=K&&null!=N.getAttribute(K)&&(N.geometry.y=fa+parseFloat(N.getAttribute(K))),"@"==J.charAt(0)&&null!=N.getAttribute(J.substring(1))?N.geometry.width=parseFloat(N.getAttribute(J.substring(1))):N.geometry.width=
+"auto"==J?wa.width+U:parseFloat(J),"@"==I.charAt(0)&&null!=N.getAttribute(I.substring(1))?N.geometry.height=parseFloat(N.getAttribute(I.substring(1))):N.geometry.height="auto"==I?wa.height+U:parseFloat(I),W+=N.geometry.height+Q);c?(null==f[ka]&&(f[ka]=[]),f[ka].push(N)):(G=null!=R?L.model.getCell(H+ha[R]):null,d.push(N),null!=G?(G.style=L.replacePlaceholders(G,D),L.addCell(N,G)):e.push(L.addCell(N)))}for(var na=e.slice(),la=e.slice(),S=0;S<aa.length;S++)for(var xa=aa[S],T=0;T<d.length;T++){var N=
d[T],ya=mxUtils.bind(this,function(a,b,c){var d=b.getAttribute(c.from);if(null!=d&&(L.setAttributeForCell(b,c.from,null),""!=d))for(var d=d.split(","),e=0;e<d.length;e++){var f=g[c.to][d[e]];if(null!=f){var k=c.label;null!=c.fromlabel&&(k=(b.getAttribute(c.fromlabel)||"")+(k||""));null!=c.tolabel&&(k=(k||"")+(f.getAttribute(c.tolabel)||""));var m="target"==c.placeholders==!c.invert?f:a,m=null!=c.style?L.replacePlaceholders(m,c.style):L.createCurrentEdgeStyle();la.push(L.insertEdge(null,null,k||"",
c.invert?f:a,c.invert?a:f,m));mxUtils.remove(c.invert?a:f,na)}}});ya(N,N,xa);if(null!=f[N.id])for(ja=0;ja<f[N.id].length;ja++)ya(N,f[N.id][ja],xa)}if(null!=ca)for(T=0;T<d.length;T++)for(N=d[T],ja=0;ja<ca.length;ja++)L.setAttributeForCell(N,mxUtils.trim(ca[ja]),null);if(0<e.length){var oa=new mxParallelEdgeLayout(L);oa.spacing=O;var ta=function(){0<oa.spacing&&oa.execute(L.getDefaultParent());for(var a=0;a<e.length;a++){var b=L.getCellGeometry(e[a]);b.x=Math.round(L.snap(b.x));b.y=Math.round(L.snap(b.y));
"auto"==J&&(b.width=Math.round(L.snap(b.width)));"auto"==I&&(b.height=Math.round(L.snap(b.height)))}};if("["==X.charAt(0)){var za=V;L.view.validate();this.executeLayoutList(JSON.parse(X),function(){ta();za()});V=null}else if("circle"==X){var ra=new mxCircleLayout(L);ra.resetEdges=!1;var Aa=ra.isVertexIgnored;ra.isVertexIgnored=function(a){return Aa.apply(this,arguments)||0>mxUtils.indexOf(e,a)};this.executeLayout(function(){ra.execute(L.getDefaultParent());ta()},!0,V);V=null}else if("horizontaltree"==
@@ -9414,73 +9415,73 @@ this.menus.get("view").setEnabled(b);this.menus.get("importFrom").setEnabled(a);
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&&!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 u=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&
-(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);u.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,b,c,d,f,g,k){var e=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(e.getSvg(d,f,g)),"image/svg+xml");else{var m=a.getFileData(!0,null,null,
-null,null,!0),l=e.getGraphBounds(),n=Math.floor(l.width*f/e.view.scale),p=Math.floor(l.height*f/e.view.scale);if(m.length<=MAX_REQUEST_SIZE&&n*p<MAX_AREA)if(a.hideDialog(),"png"!=c&&"jpg"!=c&&"jpeg"!=c||!a.isExportToCanvas()){var q={globalVars:e.getExportVariables()};a.saveRequest(b,c,function(a,b){return new mxXmlRequest(EXPORT_URL,"format="+c+"&base64="+(b||"0")+(null!=a?"&filename="+encodeURIComponent(a):"")+"&extras="+encodeURIComponent(JSON.stringify(q))+(0<k?"&dpi="+k:"")+"&bg="+(null!=d?d:
-"none")+"&w="+n+"&h="+p+"&border="+g+"&xml="+encodeURIComponent(m))})}else"png"==c?a.exportImage(f,null==d||"none"==d,!0,!1,!1,g,!0,!1,null,null,k):a.exportImage(f,!1,!0,!1,!1,g,!0,!1,"jpeg");else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var a=this.editor.graph,b="";if(null!=this.pages)for(var c=0;c<this.pages.length;c++){var d=a;this.currentPage!=this.pages[c]&&(d=this.createTemporaryGraph(a.getStylesheet()),
+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 t=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&
+(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);t.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,b,c,d,f,g,k){var e=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(e.getSvg(d,f,g)),"image/svg+xml");else{var l=a.getFileData(!0,null,null,
+null,null,!0),m=e.getGraphBounds(),n=Math.floor(m.width*f/e.view.scale),p=Math.floor(m.height*f/e.view.scale);if(l.length<=MAX_REQUEST_SIZE&&n*p<MAX_AREA)if(a.hideDialog(),"png"!=c&&"jpg"!=c&&"jpeg"!=c||!a.isExportToCanvas()){var u={globalVars:e.getExportVariables()};a.saveRequest(b,c,function(a,b){return new mxXmlRequest(EXPORT_URL,"format="+c+"&base64="+(b||"0")+(null!=a?"&filename="+encodeURIComponent(a):"")+"&extras="+encodeURIComponent(JSON.stringify(u))+(0<k?"&dpi="+k:"")+"&bg="+(null!=d?d:
+"none")+"&w="+n+"&h="+p+"&border="+g+"&xml="+encodeURIComponent(l))})}else"png"==c?a.exportImage(f,null==d||"none"==d,!0,!1,!1,g,!0,!1,null,null,k):a.exportImage(f,!1,!0,!1,!1,g,!0,!1,"jpeg");else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var a=this.editor.graph,b="";if(null!=this.pages)for(var c=0;c<this.pages.length;c++){var d=a;this.currentPage!=this.pages[c]&&(d=this.createTemporaryGraph(a.getStylesheet()),
this.updatePageRoot(this.pages[c]),d.model.setRoot(this.pages[c].root));b+=this.pages[c].getName()+" "+d.getIndexableText()+" "}else b=a.getIndexableText();this.editor.graph.setEnabled(!0);return b};EditorUi.prototype.showRemotelyStoredLibrary=function(a){var b={},c=document.createElement("div");c.style.whiteSpace="nowrap";var d=document.createElement("h3");mxUtils.write(d,mxUtils.htmlEntities(a));d.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(d);var e=
-document.createElement("div");e.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";e.innerHTML='<div style="text-align:center;padding:8px;"><img src="/images/spin.gif"></div>';var f={};try{var g=mxSettings.getCustomLibraries();for(a=0;a<g.length;a++){var k=g[a];if("R"==k.substring(0,1)){var l=JSON.parse(decodeURIComponent(k.substring(1)));f[l[0]]={id:l[0],title:l[1],downloadUrl:l[2]}}}}catch(x){}this.remoteInvoke("getCustomLibraries",null,null,function(a){e.innerHTML="";if(0==
+document.createElement("div");e.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";e.innerHTML='<div style="text-align:center;padding:8px;"><img src="/images/spin.gif"></div>';var f={};try{var g=mxSettings.getCustomLibraries();for(a=0;a<g.length;a++){var k=g[a];if("R"==k.substring(0,1)){var l=JSON.parse(decodeURIComponent(k.substring(1)));f[l[0]]={id:l[0],title:l[1],downloadUrl:l[2]}}}}catch(A){}this.remoteInvoke("getCustomLibraries",null,null,function(a){e.innerHTML="";if(0==
a.length)e.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var c=0;c<a.length;c++){var d=a[c];f[d.id]&&(b[d.id]=d);var g=this.addCheckbox(e,d.title,f[d.id]);(function(a,c){mxEvent.addListener(c,"change",function(){this.checked?b[a.id]=a:delete b[a.id]})})(d,g)}},mxUtils.bind(this,function(a){e.innerHTML="";var b=document.createElement("div");b.style.padding="8px";b.style.textAlign="center";mxUtils.write(b,
-mxResources.get("error")+": ");mxUtils.write(b,null!=a&&null!=a.message?a.message:mxResources.get("unknownError"));e.appendChild(b)}));c.appendChild(e);c=new CustomDialog(this,c,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var a=0,c;for(c in b)null==f[c]&&(a++,mxUtils.bind(this,function(b){this.remoteInvoke("getFileContent",[b.downloadUrl],null,mxUtils.bind(this,function(c){a--;0==a&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,c,b))}catch(B){this.handleError(B,
+mxResources.get("error")+": ");mxUtils.write(b,null!=a&&null!=a.message?a.message:mxResources.get("unknownError"));e.appendChild(b)}));c.appendChild(e);c=new CustomDialog(this,c,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var a=0,c;for(c in b)null==f[c]&&(a++,mxUtils.bind(this,function(b){this.remoteInvoke("getFileContent",[b.downloadUrl],null,mxUtils.bind(this,function(c){a--;0==a&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,c,b))}catch(C){this.handleError(C,
mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){a--;0==a&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(b[c]));for(c in f)b[c]||this.closeLibrary(new RemoteLibrary(this,null,f[c]));0==a&&this.spinner.stop()}),null,null,"https://desk.draw.io/support/solutions/articles/16000092763");this.showDialog(c.container,340,375,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1,
allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,allowedDomains:["app.diagrams.net"]},setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(a){this.remoteWin=a;for(var b=0;b<this.remoteInvokeQueue.length;b++)a.postMessage(this.remoteInvokeQueue[b],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(a){var b=
a.msgMarkers,c=this.remoteInvokeCallbacks[b.callbackId];if(null==c)throw Error("No callback for "+(null!=b?b.callbackId:"null"));a.error?c.error&&c.error(a.error.errResp):c.callback&&c.callback.apply(this,a.resp);this.remoteInvokeCallbacks[b.callbackId]=null};EditorUi.prototype.remoteInvoke=function(a,b,c,d,f){var e=!0,g=window.setTimeout(mxUtils.bind(this,function(){e=!1;f({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),k=mxUtils.bind(this,function(){window.clearTimeout(g);
e&&d.apply(this,arguments)});c=c||{};c.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:k,error:f});a=JSON.stringify({event:"remoteInvoke",funtionName:a,functionArgs:b,msgMarkers:c});null!=this.remoteWin?this.remoteWin.postMessage(a,"*"):this.remoteInvokeQueue.push(a)};EditorUi.prototype.handleRemoteInvoke=function(a,b){var c=mxUtils.bind(this,function(b,c){var d={event:"remoteInvokeResponse",msgMarkers:a.msgMarkers};null!=c?d.error={errResp:c}:null!=b&&(d.resp=
b);this.remoteWin.postMessage(JSON.stringify(d),"*")});try{var d=a.funtionName,e=this.remoteInvokableFns[d];if(null!=e&&"function"===typeof this[d]){if(e.allowedDomains){for(var f=!1,g=0;g<e.allowedDomains.length;g++)if(b=="https://"+e.allowedDomains[g]){f=!0;break}if(!f){c(null,"Invalid Call: "+d+" is not allowed.");return}}var k=a.functionArgs;Array.isArray(k)||(k=[]);if(e.isAsync)k.push(function(){c(Array.prototype.slice.apply(arguments))}),k.push(function(a){c(null,a||"Unkown Error")}),this[d].apply(this,
-k);else{var l=this[d].apply(this,k);c([l])}}else c(null,"Invalid Call: "+d+" is not found.")}catch(x){c(null,"Invalid Call: An error occured, "+x.message)}};EditorUi.prototype.openDatabase=function(a,b){if(null==this.database){var c=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=c)try{var d=c.open("database",2);d.onupgradeneeded=function(a){var b=d.result;1>a.oldVersion&&b.createObjectStore("objects",{keyPath:"key"});2>a.oldVersion&&(b.createObjectStore("files",{keyPath:"title"}),
+k);else{var l=this[d].apply(this,k);c([l])}}else c(null,"Invalid Call: "+d+" is not found.")}catch(A){c(null,"Invalid Call: An error occured, "+A.message)}};EditorUi.prototype.openDatabase=function(a,b){if(null==this.database){var c=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=c)try{var d=c.open("database",2);d.onupgradeneeded=function(a){var b=d.result;1>a.oldVersion&&b.createObjectStore("objects",{keyPath:"key"});2>a.oldVersion&&(b.createObjectStore("files",{keyPath:"title"}),
b.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)};d.onsuccess=mxUtils.bind(this,function(b){var c=d.result;this.database=c;EditorUi.migrateStorageFiles&&(StorageFile.migrate(c),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(a){if(!a||"1"==urlParams.forceMigration){var b=document.createElement("iframe");b.style.display=
"none";b.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(b);var c=!0,d=!1,e,f=0,g=mxUtils.bind(this,function(){d=!0;this.setDatabaseItem(".drawioMigrated3",!0);b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),k=mxUtils.bind(this,function(){f++;l()}),l=mxUtils.bind(this,function(){try{if(f>=e.length)g();else{var a=e[f];StorageFile.getFileContent(this,a,mxUtils.bind(this,
function(c){null==c||".scratchpad"==a&&c==this.emptyLibraryXml?b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[a]}),"*"):k()}),k)}}catch(I){console.log(I)}}),m=mxUtils.bind(this,function(a){try{this.setDatabaseItem(null,[{title:a.title,size:a.data.length,lastModified:Date.now(),type:a.isLib?"L":"F"},{title:a.title,data:a.data}],k,k,["filesInfo","files"])}catch(I){console.log(I)}});a=mxUtils.bind(this,function(a){try{if(a.source==b.contentWindow){var f=
-{};try{f=JSON.parse(a.data)}catch(F){}"init"==f.event?(b.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=f.event||d||(c?null!=f.resp&&0<f.resp.length&&null!=f.resp[0]?(e=f.resp[0],c=!1,l()):g():null!=f.resp&&0<f.resp.length&&null!=f.resp[0]?m(f.resp[0]):k())}}catch(F){console.log(F)}});window.addEventListener("message",a)}})));a(c);c.onversionchange=
-function(){c.close()}});d.onerror=b;d.onblocked=function(){}}catch(t){null!=b&&b(t)}else null!=b&&b()}else a(this.database)};EditorUi.prototype.setDatabaseItem=function(a,b,c,d,f){this.openDatabase(mxUtils.bind(this,function(e){try{f=f||"objects";Array.isArray(f)||(f=[f],a=[a],b=[b]);var g=e.transaction(f,"readwrite");g.oncomplete=c;g.onerror=d;for(e=0;e<f.length;e++)g.objectStore(f[e]).put(null!=a&&null!=a[e]?{key:a[e],data:b[e]}:b[e])}catch(y){null!=d&&d(y)}}),d)};EditorUi.prototype.removeDatabaseItem=
-function(a,b,c,d){this.openDatabase(mxUtils.bind(this,function(e){d=d||"objects";Array.isArray(d)||(d=[d],a=[a]);e=e.transaction(d,"readwrite");e.oncomplete=b;e.onerror=c;for(var f=0;f<d.length;f++)e.objectStore(d[f])["delete"](a[f])}),c)};EditorUi.prototype.getDatabaseItem=function(a,b,c,d){this.openDatabase(mxUtils.bind(this,function(e){try{d=d||"objects";var f=e.transaction([d],"readonly").objectStore(d).get(a);f.onsuccess=function(){b(f.result)};f.onerror=c}catch(z){null!=c&&c(z)}}),c)};EditorUi.prototype.getDatabaseItems=
-function(a,b,c){this.openDatabase(mxUtils.bind(this,function(d){try{c=c||"objects";var e=d.transaction([c],"readonly").objectStore(c).openCursor(IDBKeyRange.lowerBound(0)),f=[];e.onsuccess=function(b){null==b.target.result?a(f):(f.push(b.target.result.value),b.target.result["continue"]())};e.onerror=b}catch(z){null!=b&&b(z)}}),b)};EditorUi.prototype.getDatabaseItemKeys=function(a,b,c){this.openDatabase(mxUtils.bind(this,function(d){try{c=c||"objects";var e=d.transaction([c],"readonly").objectStore(c).getAllKeys();
-e.onsuccess=function(){a(e.result)};e.onerror=b}catch(v){null!=b&&b(v)}}),b)};EditorUi.prototype.commentsSupported=function(){var a=this.getCurrentFile();return null!=a?a.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var a=this.getCurrentFile();return null!=a?a.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var a=this.getCurrentFile();return null!=a?a.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(a,b){var c=this.getCurrentFile();
+{};try{f=JSON.parse(a.data)}catch(E){}"init"==f.event?(b.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=f.event||d||(c?null!=f.resp&&0<f.resp.length&&null!=f.resp[0]?(e=f.resp[0],c=!1,l()):g():null!=f.resp&&0<f.resp.length&&null!=f.resp[0]?m(f.resp[0]):k())}}catch(E){console.log(E)}});window.addEventListener("message",a)}})));a(c);c.onversionchange=
+function(){c.close()}});d.onerror=b;d.onblocked=function(){}}catch(q){null!=b&&b(q)}else null!=b&&b()}else a(this.database)};EditorUi.prototype.setDatabaseItem=function(a,b,c,d,f){this.openDatabase(mxUtils.bind(this,function(e){try{f=f||"objects";Array.isArray(f)||(f=[f],a=[a],b=[b]);var g=e.transaction(f,"readwrite");g.oncomplete=c;g.onerror=d;for(e=0;e<f.length;e++)g.objectStore(f[e]).put(null!=a&&null!=a[e]?{key:a[e],data:b[e]}:b[e])}catch(x){null!=d&&d(x)}}),d)};EditorUi.prototype.removeDatabaseItem=
+function(a,b,c,d){this.openDatabase(mxUtils.bind(this,function(e){d=d||"objects";Array.isArray(d)||(d=[d],a=[a]);e=e.transaction(d,"readwrite");e.oncomplete=b;e.onerror=c;for(var f=0;f<d.length;f++)e.objectStore(d[f])["delete"](a[f])}),c)};EditorUi.prototype.getDatabaseItem=function(a,b,c,d){this.openDatabase(mxUtils.bind(this,function(e){try{d=d||"objects";var f=e.transaction([d],"readonly").objectStore(d).get(a);f.onsuccess=function(){b(f.result)};f.onerror=c}catch(y){null!=c&&c(y)}}),c)};EditorUi.prototype.getDatabaseItems=
+function(a,b,c){this.openDatabase(mxUtils.bind(this,function(d){try{c=c||"objects";var e=d.transaction([c],"readonly").objectStore(c).openCursor(IDBKeyRange.lowerBound(0)),f=[];e.onsuccess=function(b){null==b.target.result?a(f):(f.push(b.target.result.value),b.target.result["continue"]())};e.onerror=b}catch(y){null!=b&&b(y)}}),b)};EditorUi.prototype.getDatabaseItemKeys=function(a,b,c){this.openDatabase(mxUtils.bind(this,function(d){try{c=c||"objects";var e=d.transaction([c],"readonly").objectStore(c).getAllKeys();
+e.onsuccess=function(){a(e.result)};e.onerror=b}catch(u){null!=b&&b(u)}}),b)};EditorUi.prototype.commentsSupported=function(){var a=this.getCurrentFile();return null!=a?a.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var a=this.getCurrentFile();return null!=a?a.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var a=this.getCurrentFile();return null!=a?a.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(a,b){var c=this.getCurrentFile();
null!=c?c.getComments(a,b):a([])};EditorUi.prototype.addComment=function(a,b,c){var d=this.getCurrentFile();null!=d?d.addComment(a,b,c):b(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var a=this.getCurrentFile();return null!=a?a.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var a=this.getCurrentFile();return null!=a?a.canComment():!0};EditorUi.prototype.newComment=function(a,b){var c=this.getCurrentFile();return null!=c?c.newComment(a,b):new DrawioComment(this,null,
a,Date.now(),Date.now(),!1,b)};EditorUi.prototype.isRevisionHistorySupported=function(){var a=this.getCurrentFile();return null!=a&&a.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(a,b){var c=this.getCurrentFile();null!=c&&c.getRevisions?c.getRevisions(a,b):b({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var a=this.getCurrentFile();return null!=a&&(a.constructor==DriveFile&&a.isEditable()||a.constructor==DropboxFile)};EditorUi.prototype.getServiceName=
function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(a){a.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var a=[],b=0;b<localStorage.length;b++){var c=localStorage.key(b),d=localStorage.getItem(c);if(0<c.length&&(".scratchpad"==c||"."!=c.charAt(0))&&0<d.length){var f="<mxfile "===d.substring(0,8)||"<?xml"===
d.substring(0,5)||"\x3c!--[if IE]>"===d.substring(0,12),d="<mxlibrary>"===d.substring(0,11);(f||d)&&a.push(c)}}return a};EditorUi.prototype.getLocalStorageFile=function(a){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var b=localStorage.getItem(a);return{title:a,data:b,isLib:"<mxlibrary>"===b.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
-var CommentsWindow=function(a,d,c,b,g,f){function k(){for(var a=C.getElementsByTagName("div"),b=0,c=0;c<a.length;c++)"none"!=a[c].style.display&&a[c].parentNode==C&&b++;x.style.display=0==b?"block":"none"}function l(a,b,c,d){function e(){b.removeChild(l);b.removeChild(m);g.style.display="block";f.style.display="block"}v={div:b,comment:a,saveCallback:c,deleteOnCancel:d};var f=b.querySelector(".geCommentTxt"),g=b.querySelector(".geCommentActionsList"),l=document.createElement("textarea");l.className=
-"geCommentEditTxtArea";l.style.minHeight=f.offsetHeight+"px";l.value=a.content;b.insertBefore(l,f);var m=document.createElement("div");m.className="geCommentEditBtns";var n=mxUtils.button(mxResources.get("cancel"),function(){d?(b.parentNode.removeChild(b),k()):e();v=null});n.className="geCommentEditBtn";m.appendChild(n);var p=mxUtils.button(mxResources.get("save"),function(){f.innerHTML="";a.content=l.value;mxUtils.write(f,a.content);e();c(a);v=null});mxEvent.addListener(l,"keydown",mxUtils.bind(this,
+var CommentsWindow=function(a,d,c,b,g,f){function k(){for(var a=B.getElementsByTagName("div"),b=0,c=0;c<a.length;c++)"none"!=a[c].style.display&&a[c].parentNode==B&&b++;A.style.display=0==b?"block":"none"}function l(a,b,c,d){function e(){b.removeChild(l);b.removeChild(m);g.style.display="block";f.style.display="block"}u={div:b,comment:a,saveCallback:c,deleteOnCancel:d};var f=b.querySelector(".geCommentTxt"),g=b.querySelector(".geCommentActionsList"),l=document.createElement("textarea");l.className=
+"geCommentEditTxtArea";l.style.minHeight=f.offsetHeight+"px";l.value=a.content;b.insertBefore(l,f);var m=document.createElement("div");m.className="geCommentEditBtns";var n=mxUtils.button(mxResources.get("cancel"),function(){d?(b.parentNode.removeChild(b),k()):e();u=null});n.className="geCommentEditBtn";m.appendChild(n);var p=mxUtils.button(mxResources.get("save"),function(){f.innerHTML="";a.content=l.value;mxUtils.write(f,a.content);e();c(a);u=null});mxEvent.addListener(l,"keydown",mxUtils.bind(this,
function(a){mxEvent.isConsumed(a)||((mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a))&&13==a.keyCode?(p.click(),mxEvent.consume(a)):27==a.keyCode&&(n.click(),mxEvent.consume(a)))}));p.focus();p.className="geCommentEditBtn gePrimaryBtn";m.appendChild(p);b.insertBefore(m,f);g.style.display="none";f.style.display="none";l.focus()}function n(b,c){c.innerHTML="";var d=new Date(b.modifiedDate),e=a.timeSince(d);null==e&&(e=mxResources.get("lessThanAMinute"));mxUtils.write(c,mxResources.get("timeAgo",
-[e],"{1} ago"));c.setAttribute("title",d.toLocaleDateString()+" "+d.toLocaleTimeString())}function u(a){var b=document.createElement("img");b.className="geCommentBusyImg";b.src=IMAGE_PATH+"/spin.gif";a.appendChild(b);a.busyImg=b}function e(a){a.style.border="1px solid red";a.removeChild(a.busyImg)}function m(a){a.style.border="";a.removeChild(a.busyImg)}function p(b,c,d,f,g){function A(a,c,d){var e=document.createElement("li");e.className="geCommentAction";var f=document.createElement("a");f.className=
-"geCommentActionLnk";mxUtils.write(f,a);e.appendChild(f);mxEvent.addListener(f,"click",function(a){c(a,b);a.preventDefault();mxEvent.consume(a)});J.appendChild(e);d&&(e.style.display="none")}function E(){function a(b){c.push(d);if(null!=b.replies)for(var e=0;e<b.replies.length;e++)d=d.nextSibling,a(b.replies[e])}var c=[],d=B;a(b);return{pdiv:d,replies:c}}function F(c,d,g,k,n){function x(){u(t);b.addReply(q,function(a){q.id=a;b.replies.push(q);m(t);g&&g()},function(b){A();e(t);a.handleError(b,null,
-null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},k,n)}function A(){l(q,t,function(a){x()},!0)}var v=E().pdiv,q=a.newComment(c,a.getCurrentUser());q.pCommentId=b.id;null==b.replies&&(b.replies=[]);var t=p(q,b.replies,v,f+1);d?A():x()}if(g||!b.isResolved){x.style.display="none";var B=document.createElement("div");B.className="geCommentContainer";B.setAttribute("data-commentId",b.id);B.style.marginLeft=20*f+5+"px";b.isResolved&&"dark"!=uiTheme&&(B.style.backgroundColor="ghostWhite");
-var z=document.createElement("div");z.className="geCommentHeader";var y=document.createElement("img");y.className="geCommentUserImg";y.src=b.user.pictureUrl||Editor.userImage;z.appendChild(y);y=document.createElement("div");y.className="geCommentHeaderTxt";z.appendChild(y);var H=document.createElement("div");H.className="geCommentUsername";mxUtils.write(H,b.user.displayName||"");y.appendChild(H);H=document.createElement("div");H.className="geCommentDate";H.setAttribute("data-commentId",b.id);n(b,
-H);y.appendChild(H);B.appendChild(z);z=document.createElement("div");z.className="geCommentTxt";mxUtils.write(z,b.content||"");B.appendChild(z);z=document.createElement("div");z.className="geCommentActions";var J=document.createElement("ul");J.className="geCommentActionsList";z.appendChild(J);q||0!=f&&!t||A(mxResources.get("reply"),function(){F("",!0)},b.isResolved);y=a.getCurrentUser();null==y||y.id!=b.user.id||q||(A(mxResources.get("edit"),function(){function c(){l(b,B,function(){u(B);b.editComment(b.content,
-function(){m(B)},function(b){e(B);c();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}c()},b.isResolved),A(mxResources.get("delete"),function(){a.confirm(mxResources.get("areYouSure"),function(){u(B);b.deleteComment(function(){for(var a=E(b).replies,d=0;d<a.length;d++)C.removeChild(a[d]);for(d=0;d<c.length;d++)if(c[d]==b){c.splice(d,1);break}x.style.display=0==C.getElementsByTagName("div").length?"block":"none"},function(b){e(B);a.handleError(b,null,null,
-null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},b.isResolved));q||0!=f||A(b.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(a){function c(){var c=a.target;c.innerHTML="";b.isResolved=!b.isResolved;mxUtils.write(c,b.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var d=b.isResolved?"none":"",e=E(b).replies,f="dark"==uiTheme?"transparent":b.isResolved?"ghostWhite":"white",g=0;g<e.length;g++){e[g].style.backgroundColor=f;for(var l=e[g].querySelectorAll(".geCommentAction"),
-m=0;m<l.length;m++)l[m]!=c.parentNode&&(l[m].style.display=d);D||(e[g].style.display="none")}k()}b.isResolved?F(mxResources.get("reOpened")+": ",!0,c,!1,!0):F(mxResources.get("markedAsResolved"),!1,c,!0)});B.appendChild(z);null!=d?C.insertBefore(B,d.nextSibling):C.appendChild(B);for(d=0;null!=b.replies&&d<b.replies.length;d++)z=b.replies[d],z.isResolved=b.isResolved,p(z,b.replies,null,f+1,g);null!=v&&(v.comment.id==b.id?(g=b.content,b.content=v.comment.content,l(b,B,v.saveCallback,v.deleteOnCancel),
-b.content=g):null==v.comment.id&&v.comment.pCommentId==b.id&&(C.appendChild(v.div),l(v.comment,v.div,v.saveCallback,v.deleteOnCancel)));return B}}var q=!a.canComment(),t=a.canReplyToReplies(),v=null,z=document.createElement("div");z.className="geCommentsWin";z.style.background="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;var y=EditorUi.compactUi?"26px":"30px",C=document.createElement("div");C.className="geCommentsList";C.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":
-Dialog.backdropColor;C.style.bottom=parseInt(y)+7+"px";z.appendChild(C);var x=document.createElement("span");x.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(x,mxResources.get("noCommentsFound"));var A=document.createElement("div");A.className="geToolbarContainer geCommentsToolbar";A.style.height=y;A.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";A.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;mxClient.IS_QUIRKS&&(A.style.filter=
-"none");y=document.createElement("a");y.className="geButton";mxClient.IS_QUIRKS&&(y.style.filter="none");if(!q){var E=y.cloneNode();E.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';E.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(E,"click",function(b){function c(){l(d,f,function(b){u(f);a.addComment(b,function(a){b.id=a;B.push(b);m(f)},function(b){e(f);c();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},
-!0)}var d=a.newComment("",a.getCurrentUser()),f=p(d,B,null,0);c();b.preventDefault();mxEvent.consume(b)});A.appendChild(E)}E=y.cloneNode();E.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';E.setAttribute("title",mxResources.get("showResolved"));var D=!1;"dark"==uiTheme&&(E.style.filter="invert(100%)");mxEvent.addListener(E,"click",function(a){this.className=(D=!D)?"geButton geCheckedBtn":"geButton";H();a.preventDefault();mxEvent.consume(a)});A.appendChild(E);a.commentsRefreshNeeded()&&
-(E=y.cloneNode(),E.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',E.setAttribute("title",mxResources.get("refresh")),"dark"==uiTheme&&(E.style.filter="invert(100%)"),mxEvent.addListener(E,"click",function(a){H();a.preventDefault();mxEvent.consume(a)}),A.appendChild(E));a.commentsSaveNeeded()&&(y=y.cloneNode(),y.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',y.setAttribute("title",mxResources.get("save")),"dark"==uiTheme&&
-(y.style.filter="invert(100%)"),mxEvent.addListener(y,"click",function(a){f();a.preventDefault();mxEvent.consume(a)}),A.appendChild(y));z.appendChild(A);var B=[],H=mxUtils.bind(this,function(){this.hasError=!1;if(null!=v)try{v.div=v.div.cloneNode(!0);var b=v.div.querySelector(".geCommentEditTxtArea"),c=v.div.querySelector(".geCommentEditBtns");v.comment.content=b.value;b.parentNode.removeChild(b);c.parentNode.removeChild(c)}catch(F){a.handleError(F)}C.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+
-IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";t=a.canReplyToReplies();a.commentsSupported()?a.getComments(function(a){function b(a){if(null!=a){a.sort(function(a,b){return new Date(a.modifiedDate)-new Date(b.modifiedDate)});for(var c=0;c<a.length;c++)b(a[c].replies)}}a.sort(function(a,b){return new Date(a.modifiedDate)-new Date(b.modifiedDate)});C.innerHTML="";C.appendChild(x);x.style.display="block";B=a;for(a=0;a<B.length;a++)b(B[a].replies),
-p(B[a],B,null,0,D);null!=v&&null==v.comment.id&&null==v.comment.pCommentId&&(C.appendChild(v.div),l(v.comment,v.div,v.saveCallback,v.deleteOnCancel))},mxUtils.bind(this,function(a){C.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(a&&a.message?": "+a.message:""));this.hasError=!0})):C.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});H();this.refreshComments=H;A=mxUtils.bind(this,function(){function a(b){var d=c[b.id];if(null!=d)for(n(b,d),d=0;null!=b.replies&&d<b.replies.length;d++)a(b.replies[d])}
-if(this.window.isVisible()){for(var b=C.querySelectorAll(".geCommentDate"),c={},d=0;d<b.length;d++){var e=b[d];c[e.getAttribute("data-commentId")]=e}for(d=0;d<B.length;d++)a(B[d])}});setInterval(A,6E4);this.refreshCommentsTime=A;this.window=new mxWindow(mxResources.get("comments"),z,d,c,b,g,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,
-mxUtils.bind(this,function(){this.window.fit()}));this.window.setLocation=function(a,b){var c=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;a=Math.max(0,Math.min(a,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,c-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};var G=mxUtils.bind(this,function(){var a=this.window.getX(),
-b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window,"resize",G);this.destroy=function(){mxEvent.removeListener(window,"resize",G);this.window.destroy()}},ConfirmDialog=function(a,d,c,b,g,f,k,l,n,u,e){var m=document.createElement("div");m.style.textAlign="center";e=null!=e?e:44;var p=document.createElement("div");p.style.padding="6px";p.style.overflow="auto";p.style.maxHeight=e+"px";p.style.lineHeight="1.2em";mxClient.IS_QUIRKS&&(p.style.height="60px");mxUtils.write(p,d);
-m.appendChild(p);null!=u&&(p=document.createElement("div"),p.style.padding="6px 0 6px 0",d=document.createElement("img"),d.setAttribute("src",u),p.appendChild(d),m.appendChild(p));u=document.createElement("div");u.style.textAlign="center";u.style.whiteSpace="nowrap";var q=document.createElement("input");q.setAttribute("type","checkbox");f=mxUtils.button(f||mxResources.get("cancel"),function(){a.hideDialog();null!=b&&b(q.checked)});f.className="geBtn";null!=l&&(f.innerHTML=l+"<br>"+f.innerHTML,f.style.paddingBottom=
-"8px",f.style.paddingTop="8px",f.style.height="auto",f.style.width="40%");a.editor.cancelFirst&&u.appendChild(f);var t=mxUtils.button(g||mxResources.get("ok"),function(){a.hideDialog();null!=c&&c(q.checked)});u.appendChild(t);null!=k?(t.innerHTML=k+"<br>"+t.innerHTML+"<br>",t.style.paddingBottom="8px",t.style.paddingTop="8px",t.style.height="auto",t.className="geBtn",t.style.width="40%"):t.className="geBtn gePrimaryBtn";a.editor.cancelFirst||u.appendChild(f);m.appendChild(u);n?(u.style.marginTop=
-"10px",p=document.createElement("p"),p.style.marginTop="20px",p.appendChild(q),g=document.createElement("span"),mxUtils.write(g," "+mxResources.get("rememberThisSetting")),p.appendChild(g),m.appendChild(p),mxEvent.addListener(g,"click",function(a){q.checked=!q.checked;mxEvent.consume(a)})):u.style.marginTop="12px";this.init=function(){t.focus()};this.container=m};EditorUi.DIFF_INSERT="i";EditorUi.DIFF_REMOVE="r";EditorUi.DIFF_UPDATE="u";EditorUi.prototype.codec=new mxCodec;EditorUi.prototype.viewStateProperties={background:!0,backgroundImage:!0,shadowVisible:!0,foldingEnabled:!0,pageScale:!0,mathEnabled:!0,pageFormat:!0,extFonts:!0};EditorUi.prototype.cellProperties={id:!0,value:!0,xmlValue:!0,vertex:!0,edge:!0,visible:!0,collapsed:!0,connectable:!0,parent:!0,children:!0,previous:!0,source:!0,target:!0,edges:!0,geometry:!0,style:!0,mxObjectId:!0,mxTransient:!0};
-EditorUi.prototype.patchPages=function(a,d,c,b,g){var f={},k=[],l={},n={},u={},e={};if(null!=b&&null!=b[EditorUi.DIFF_UPDATE])for(var m in b[EditorUi.DIFF_UPDATE])f[m]=b[EditorUi.DIFF_UPDATE][m];if(null!=d[EditorUi.DIFF_REMOVE])for(b=0;b<d[EditorUi.DIFF_REMOVE].length;b++)n[d[EditorUi.DIFF_REMOVE][b]]=!0;if(null!=d[EditorUi.DIFF_INSERT])for(b=0;b<d[EditorUi.DIFF_INSERT].length;b++)l[d[EditorUi.DIFF_INSERT][b].previous]=d[EditorUi.DIFF_INSERT][b];if(null!=d[EditorUi.DIFF_UPDATE])for(m in d[EditorUi.DIFF_UPDATE])b=
-d[EditorUi.DIFF_UPDATE][m],null!=b.previous&&(e[b.previous]=m);if(null!=a){var p="";for(b=0;b<a.length;b++){var q=a[b].getId();u[q]=a[b];null!=e[p]||n[q]||null!=d[EditorUi.DIFF_UPDATE]&&null!=d[EditorUi.DIFF_UPDATE][q]&&null!=d[EditorUi.DIFF_UPDATE][q].previous||(e[p]=q);p=q}}var t={},v=mxUtils.bind(this,function(a){var b=null!=a?a.getId():"";if(null!=a&&!t[b]){t[b]=!0;k.push(a);var m=null!=d[EditorUi.DIFF_UPDATE]?d[EditorUi.DIFF_UPDATE][b]: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,f[a.getId()],g),!c||null==m.cells&&null==m.view||(a.needsUpdate=!0))}a=e[b];null!=a&&(delete e[b],v(u[a]));a=l[b];null!=a&&(delete l[b],z(a))}),z=mxUtils.bind(this,function(a){a=mxUtils.parseXml(a.data).documentElement;a=new DiagramPage(a);this.updatePageRoot(a);var b=u[a.getId()];null==b?v(a):(b.root=a.root,this.currentPage==b?this.editor.graph.model.setRoot(b.root):c&&(b.needsUpdate=!0))});v();for(m in e)v(u[e[m]]),
-delete e[m];for(m in l)z(l[m]),delete l[m];return k};EditorUi.prototype.patchViewState=function(a,d){if(null!=a.viewState&&null!=d){a==this.currentPage&&(a.viewState=this.editor.graph.getViewState());for(var c in d)a.viewState[c]=JSON.parse(d[c]);a==this.currentPage&&this.editor.graph.setViewState(a.viewState,!0)}};
+[e],"{1} ago"));c.setAttribute("title",d.toLocaleDateString()+" "+d.toLocaleTimeString())}function t(a){var b=document.createElement("img");b.className="geCommentBusyImg";b.src=IMAGE_PATH+"/spin.gif";a.appendChild(b);a.busyImg=b}function e(a){a.style.border="1px solid red";a.removeChild(a.busyImg)}function m(a){a.style.border="";a.removeChild(a.busyImg)}function p(b,c,d,f,g){function z(a,c,d){var e=document.createElement("li");e.className="geCommentAction";var f=document.createElement("a");f.className=
+"geCommentActionLnk";mxUtils.write(f,a);e.appendChild(f);mxEvent.addListener(f,"click",function(a){c(a,b);a.preventDefault();mxEvent.consume(a)});J.appendChild(e);d&&(e.style.display="none")}function F(){function a(b){c.push(d);if(null!=b.replies)for(var e=0;e<b.replies.length;e++)d=d.nextSibling,a(b.replies[e])}var c=[],d=y;a(b);return{pdiv:d,replies:c}}function E(c,d,g,k,n){function z(){t(v);b.addReply(q,function(a){q.id=a;b.replies.push(q);m(v);g&&g()},function(b){A();e(v);a.handleError(b,null,
+null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},k,n)}function A(){l(q,v,function(a){z()},!0)}var u=F().pdiv,q=a.newComment(c,a.getCurrentUser());q.pCommentId=b.id;null==b.replies&&(b.replies=[]);var v=p(q,b.replies,u,f+1);d?A():z()}if(g||!b.isResolved){A.style.display="none";var y=document.createElement("div");y.className="geCommentContainer";y.setAttribute("data-commentId",b.id);y.style.marginLeft=20*f+5+"px";b.isResolved&&"dark"!=uiTheme&&(y.style.backgroundColor="ghostWhite");
+var x=document.createElement("div");x.className="geCommentHeader";var C=document.createElement("img");C.className="geCommentUserImg";C.src=b.user.pictureUrl||Editor.userImage;x.appendChild(C);C=document.createElement("div");C.className="geCommentHeaderTxt";x.appendChild(C);var G=document.createElement("div");G.className="geCommentUsername";mxUtils.write(G,b.user.displayName||"");C.appendChild(G);G=document.createElement("div");G.className="geCommentDate";G.setAttribute("data-commentId",b.id);n(b,
+G);C.appendChild(G);y.appendChild(x);x=document.createElement("div");x.className="geCommentTxt";mxUtils.write(x,b.content||"");y.appendChild(x);x=document.createElement("div");x.className="geCommentActions";var J=document.createElement("ul");J.className="geCommentActionsList";x.appendChild(J);v||0!=f&&!q||z(mxResources.get("reply"),function(){E("",!0)},b.isResolved);C=a.getCurrentUser();null==C||C.id!=b.user.id||v||(z(mxResources.get("edit"),function(){function c(){l(b,y,function(){t(y);b.editComment(b.content,
+function(){m(y)},function(b){e(y);c();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}c()},b.isResolved),z(mxResources.get("delete"),function(){a.confirm(mxResources.get("areYouSure"),function(){t(y);b.deleteComment(function(){for(var a=F(b).replies,d=0;d<a.length;d++)B.removeChild(a[d]);for(d=0;d<c.length;d++)if(c[d]==b){c.splice(d,1);break}A.style.display=0==B.getElementsByTagName("div").length?"block":"none"},function(b){e(y);a.handleError(b,null,null,
+null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},b.isResolved));v||0!=f||z(b.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(a){function c(){var c=a.target;c.innerHTML="";b.isResolved=!b.isResolved;mxUtils.write(c,b.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var d=b.isResolved?"none":"",e=F(b).replies,f="dark"==uiTheme?"transparent":b.isResolved?"ghostWhite":"white",g=0;g<e.length;g++){e[g].style.backgroundColor=f;for(var l=e[g].querySelectorAll(".geCommentAction"),
+m=0;m<l.length;m++)l[m]!=c.parentNode&&(l[m].style.display=d);D||(e[g].style.display="none")}k()}b.isResolved?E(mxResources.get("reOpened")+": ",!0,c,!1,!0):E(mxResources.get("markedAsResolved"),!1,c,!0)});y.appendChild(x);null!=d?B.insertBefore(y,d.nextSibling):B.appendChild(y);for(d=0;null!=b.replies&&d<b.replies.length;d++)x=b.replies[d],x.isResolved=b.isResolved,p(x,b.replies,null,f+1,g);null!=u&&(u.comment.id==b.id?(g=b.content,b.content=u.comment.content,l(b,y,u.saveCallback,u.deleteOnCancel),
+b.content=g):null==u.comment.id&&u.comment.pCommentId==b.id&&(B.appendChild(u.div),l(u.comment,u.div,u.saveCallback,u.deleteOnCancel)));return y}}var v=!a.canComment(),q=a.canReplyToReplies(),u=null,y=document.createElement("div");y.className="geCommentsWin";y.style.background="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;var x=EditorUi.compactUi?"26px":"30px",B=document.createElement("div");B.className="geCommentsList";B.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":
+Dialog.backdropColor;B.style.bottom=parseInt(x)+7+"px";y.appendChild(B);var A=document.createElement("span");A.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(A,mxResources.get("noCommentsFound"));var z=document.createElement("div");z.className="geToolbarContainer geCommentsToolbar";z.style.height=x;z.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";z.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;mxClient.IS_QUIRKS&&(z.style.filter=
+"none");x=document.createElement("a");x.className="geButton";mxClient.IS_QUIRKS&&(x.style.filter="none");if(!v){var F=x.cloneNode();F.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';F.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(F,"click",function(b){function c(){l(d,f,function(b){t(f);a.addComment(b,function(a){b.id=a;C.push(b);m(f)},function(b){e(f);c();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},
+!0)}var d=a.newComment("",a.getCurrentUser()),f=p(d,C,null,0);c();b.preventDefault();mxEvent.consume(b)});z.appendChild(F)}F=x.cloneNode();F.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';F.setAttribute("title",mxResources.get("showResolved"));var D=!1;"dark"==uiTheme&&(F.style.filter="invert(100%)");mxEvent.addListener(F,"click",function(a){this.className=(D=!D)?"geButton geCheckedBtn":"geButton";G();a.preventDefault();mxEvent.consume(a)});z.appendChild(F);a.commentsRefreshNeeded()&&
+(F=x.cloneNode(),F.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',F.setAttribute("title",mxResources.get("refresh")),"dark"==uiTheme&&(F.style.filter="invert(100%)"),mxEvent.addListener(F,"click",function(a){G();a.preventDefault();mxEvent.consume(a)}),z.appendChild(F));a.commentsSaveNeeded()&&(x=x.cloneNode(),x.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',x.setAttribute("title",mxResources.get("save")),"dark"==uiTheme&&
+(x.style.filter="invert(100%)"),mxEvent.addListener(x,"click",function(a){f();a.preventDefault();mxEvent.consume(a)}),z.appendChild(x));y.appendChild(z);var C=[],G=mxUtils.bind(this,function(){this.hasError=!1;if(null!=u)try{u.div=u.div.cloneNode(!0);var b=u.div.querySelector(".geCommentEditTxtArea"),c=u.div.querySelector(".geCommentEditBtns");u.comment.content=b.value;b.parentNode.removeChild(b);c.parentNode.removeChild(c)}catch(E){a.handleError(E)}B.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+
+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";q=a.canReplyToReplies();a.commentsSupported()?a.getComments(function(a){function b(a){if(null!=a){a.sort(function(a,b){return new Date(a.modifiedDate)-new Date(b.modifiedDate)});for(var c=0;c<a.length;c++)b(a[c].replies)}}a.sort(function(a,b){return new Date(a.modifiedDate)-new Date(b.modifiedDate)});B.innerHTML="";B.appendChild(A);A.style.display="block";C=a;for(a=0;a<C.length;a++)b(C[a].replies),
+p(C[a],C,null,0,D);null!=u&&null==u.comment.id&&null==u.comment.pCommentId&&(B.appendChild(u.div),l(u.comment,u.div,u.saveCallback,u.deleteOnCancel))},mxUtils.bind(this,function(a){B.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(a&&a.message?": "+a.message:""));this.hasError=!0})):B.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});G();this.refreshComments=G;z=mxUtils.bind(this,function(){function a(b){var d=c[b.id];if(null!=d)for(n(b,d),d=0;null!=b.replies&&d<b.replies.length;d++)a(b.replies[d])}
+if(this.window.isVisible()){for(var b=B.querySelectorAll(".geCommentDate"),c={},d=0;d<b.length;d++){var e=b[d];c[e.getAttribute("data-commentId")]=e}for(d=0;d<C.length;d++)a(C[d])}});setInterval(z,6E4);this.refreshCommentsTime=z;this.window=new mxWindow(mxResources.get("comments"),y,d,c,b,g,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,
+mxUtils.bind(this,function(){this.window.fit()}));this.window.setLocation=function(a,b){var c=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;a=Math.max(0,Math.min(a,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,c-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};var H=mxUtils.bind(this,function(){var a=this.window.getX(),
+b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window,"resize",H);this.destroy=function(){mxEvent.removeListener(window,"resize",H);this.window.destroy()}},ConfirmDialog=function(a,d,c,b,g,f,k,l,n,t,e){var m=document.createElement("div");m.style.textAlign="center";e=null!=e?e:44;var p=document.createElement("div");p.style.padding="6px";p.style.overflow="auto";p.style.maxHeight=e+"px";p.style.lineHeight="1.2em";mxClient.IS_QUIRKS&&(p.style.height="60px");mxUtils.write(p,d);
+m.appendChild(p);null!=t&&(p=document.createElement("div"),p.style.padding="6px 0 6px 0",d=document.createElement("img"),d.setAttribute("src",t),p.appendChild(d),m.appendChild(p));t=document.createElement("div");t.style.textAlign="center";t.style.whiteSpace="nowrap";var v=document.createElement("input");v.setAttribute("type","checkbox");f=mxUtils.button(f||mxResources.get("cancel"),function(){a.hideDialog();null!=b&&b(v.checked)});f.className="geBtn";null!=l&&(f.innerHTML=l+"<br>"+f.innerHTML,f.style.paddingBottom=
+"8px",f.style.paddingTop="8px",f.style.height="auto",f.style.width="40%");a.editor.cancelFirst&&t.appendChild(f);var q=mxUtils.button(g||mxResources.get("ok"),function(){a.hideDialog();null!=c&&c(v.checked)});t.appendChild(q);null!=k?(q.innerHTML=k+"<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||t.appendChild(f);m.appendChild(t);n?(t.style.marginTop=
+"10px",p=document.createElement("p"),p.style.marginTop="20px",p.appendChild(v),g=document.createElement("span"),mxUtils.write(g," "+mxResources.get("rememberThisSetting")),p.appendChild(g),m.appendChild(p),mxEvent.addListener(g,"click",function(a){v.checked=!v.checked;mxEvent.consume(a)})):t.style.marginTop="12px";this.init=function(){q.focus()};this.container=m};EditorUi.DIFF_INSERT="i";EditorUi.DIFF_REMOVE="r";EditorUi.DIFF_UPDATE="u";EditorUi.prototype.codec=new mxCodec;EditorUi.prototype.viewStateProperties={background:!0,backgroundImage:!0,shadowVisible:!0,foldingEnabled:!0,pageScale:!0,mathEnabled:!0,pageFormat:!0,extFonts:!0};EditorUi.prototype.cellProperties={id:!0,value:!0,xmlValue:!0,vertex:!0,edge:!0,visible:!0,collapsed:!0,connectable:!0,parent:!0,children:!0,previous:!0,source:!0,target:!0,edges:!0,geometry:!0,style:!0,mxObjectId:!0,mxTransient:!0};
+EditorUi.prototype.patchPages=function(a,d,c,b,g){var f={},k=[],l={},n={},t={},e={};if(null!=b&&null!=b[EditorUi.DIFF_UPDATE])for(var m in b[EditorUi.DIFF_UPDATE])f[m]=b[EditorUi.DIFF_UPDATE][m];if(null!=d[EditorUi.DIFF_REMOVE])for(b=0;b<d[EditorUi.DIFF_REMOVE].length;b++)n[d[EditorUi.DIFF_REMOVE][b]]=!0;if(null!=d[EditorUi.DIFF_INSERT])for(b=0;b<d[EditorUi.DIFF_INSERT].length;b++)l[d[EditorUi.DIFF_INSERT][b].previous]=d[EditorUi.DIFF_INSERT][b];if(null!=d[EditorUi.DIFF_UPDATE])for(m in d[EditorUi.DIFF_UPDATE])b=
+d[EditorUi.DIFF_UPDATE][m],null!=b.previous&&(e[b.previous]=m);if(null!=a){var p="";for(b=0;b<a.length;b++){var v=a[b].getId();t[v]=a[b];null!=e[p]||n[v]||null!=d[EditorUi.DIFF_UPDATE]&&null!=d[EditorUi.DIFF_UPDATE][v]&&null!=d[EditorUi.DIFF_UPDATE][v].previous||(e[p]=v);p=v}}var q={},u=mxUtils.bind(this,function(a){var b=null!=a?a.getId():"";if(null!=a&&!q[b]){q[b]=!0;k.push(a);var m=null!=d[EditorUi.DIFF_UPDATE]?d[EditorUi.DIFF_UPDATE][b]: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,f[a.getId()],g),!c||null==m.cells&&null==m.view||(a.needsUpdate=!0))}a=e[b];null!=a&&(delete e[b],u(t[a]));a=l[b];null!=a&&(delete l[b],y(a))}),y=mxUtils.bind(this,function(a){a=mxUtils.parseXml(a.data).documentElement;a=new DiagramPage(a);this.updatePageRoot(a);var b=t[a.getId()];null==b?u(a):(b.root=a.root,this.currentPage==b?this.editor.graph.model.setRoot(b.root):c&&(b.needsUpdate=!0))});u();for(m in e)u(t[e[m]]),
+delete e[m];for(m in l)y(l[m]),delete l[m];return k};EditorUi.prototype.patchViewState=function(a,d){if(null!=a.viewState&&null!=d){a==this.currentPage&&(a.viewState=this.editor.graph.getViewState());for(var c in d)a.viewState[c]=JSON.parse(d[c]);a==this.currentPage&&this.editor.graph.setViewState(a.viewState,!0)}};
EditorUi.prototype.createParentLookup=function(a,d){function c(a){var c=b[a];null==c&&(c={inserted:[],moved:{}},b[a]=c);return c}var b={};if(null!=d[EditorUi.DIFF_INSERT])for(var g=0;g<d[EditorUi.DIFF_INSERT].length;g++){var f=d[EditorUi.DIFF_INSERT][g],k=null!=f.parent?f.parent:"",l=null!=f.previous?f.previous:"";c(k).inserted[l]=f}if(null!=d[EditorUi.DIFF_UPDATE])for(var n in d[EditorUi.DIFF_UPDATE])f=d[EditorUi.DIFF_UPDATE][n],null!=f.previous&&(k=f.parent,null==k&&(g=a.getCell(n),null!=g&&(g=
a.getParent(g),null!=g&&(k=g.getId()))),null!=k&&(c(k).moved[f.previous]=n));return b};
-EditorUi.prototype.patchPage=function(a,d,c,b){var g=a==this.currentPage?this.editor.graph.model:new mxGraphModel(a.root),f=this.createParentLookup(g,d);g.beginUpdate();try{var k=g.updateEdgeParent,l=new mxDictionary,n=[];g.updateEdgeParent=function(a,c){!l.get(a)&&b&&(l.put(a,!0),n.push(a))};var u=f[""],e=null!=u&&null!=u.inserted?u.inserted[""]:null,m=null;null!=e&&(m=this.getCellForJson(e));if(null==m){var p=null!=u&&null!=u.moved?u.moved[""]:null;null!=p&&(m=g.getCell(p))}null!=m&&(g.setRoot(m),
-a.root=m);this.patchCellRecursive(a,g,g.root,f,d);if(null!=d[EditorUi.DIFF_REMOVE])for(var q=0;q<d[EditorUi.DIFF_REMOVE].length;q++){var t=g.getCell(d[EditorUi.DIFF_REMOVE][q]);null!=t&&g.remove(t)}if(null!=d[EditorUi.DIFF_UPDATE]){var v=null!=c&&null!=c.cells?c.cells[EditorUi.DIFF_UPDATE]:null;for(p in d[EditorUi.DIFF_UPDATE])this.patchCell(g,g.getCell(p),d[EditorUi.DIFF_UPDATE][p],null!=v?v[p]:null)}if(null!=d[EditorUi.DIFF_INSERT])for(q=0;q<d[EditorUi.DIFF_INSERT].length;q++)e=d[EditorUi.DIFF_INSERT][q],
-t=g.getCell(e.id),null!=t&&(g.setTerminal(t,g.getCell(e.source),!0),g.setTerminal(t,g.getCell(e.target),!1));g.updateEdgeParent=k;if(b&&0<n.length)for(q=0;q<n.length;q++)g.contains(n[q])&&g.updateEdgeParent(n[q])}finally{g.endUpdate()}};
-EditorUi.prototype.patchCellRecursive=function(a,d,c,b,g){if(null!=c){for(var f=b[c.getId()],k=null!=f&&null!=f.inserted?f.inserted:{},f=null!=f&&null!=f.moved?f.moved:{},l=0,n=d.getChildCount(c),u="",e=0;e<n;e++){var m=d.getChildAt(c,e).getId();null==f[u]&&(null==g[EditorUi.DIFF_UPDATE]||null==g[EditorUi.DIFF_UPDATE][m]||null==g[EditorUi.DIFF_UPDATE][m].previous&&null==g[EditorUi.DIFF_UPDATE][m].parent)&&(f[u]=m);u=m}n=mxUtils.bind(this,function(e,f){var k=null!=e?e.getId():"";if(null!=e&&f){var m=
-d.getCell(k);null!=m&&m!=e&&(e=null)}null!=e&&(d.getChildAt(c,l)!=e&&d.add(c,e,l),this.patchCellRecursive(a,d,e,b,g),l++);return k});for(u=[null];0<u.length;)if(e=u.shift(),e=n(null!=e?e.child:null,null!=e?e.insert:!1),m=f[e],null!=m&&(delete f[e],u.push({child:d.getCell(m)})),m=k[e],null!=m&&(delete k[e],u.push({child:this.getCellForJson(m),insert:!0})),0==u.length){for(e in f)u.push({child:d.getCell(f[e])}),delete f[e];for(e in k)u.push({child:this.getCellForJson(k[e]),insert:!0}),delete k[e]}}};
+EditorUi.prototype.patchPage=function(a,d,c,b){var g=a==this.currentPage?this.editor.graph.model:new mxGraphModel(a.root),f=this.createParentLookup(g,d);g.beginUpdate();try{var k=g.updateEdgeParent,l=new mxDictionary,n=[];g.updateEdgeParent=function(a,c){!l.get(a)&&b&&(l.put(a,!0),n.push(a))};var t=f[""],e=null!=t&&null!=t.inserted?t.inserted[""]:null,m=null;null!=e&&(m=this.getCellForJson(e));if(null==m){var p=null!=t&&null!=t.moved?t.moved[""]:null;null!=p&&(m=g.getCell(p))}null!=m&&(g.setRoot(m),
+a.root=m);this.patchCellRecursive(a,g,g.root,f,d);if(null!=d[EditorUi.DIFF_REMOVE])for(var v=0;v<d[EditorUi.DIFF_REMOVE].length;v++){var q=g.getCell(d[EditorUi.DIFF_REMOVE][v]);null!=q&&g.remove(q)}if(null!=d[EditorUi.DIFF_UPDATE]){var u=null!=c&&null!=c.cells?c.cells[EditorUi.DIFF_UPDATE]:null;for(p in d[EditorUi.DIFF_UPDATE])this.patchCell(g,g.getCell(p),d[EditorUi.DIFF_UPDATE][p],null!=u?u[p]:null)}if(null!=d[EditorUi.DIFF_INSERT])for(v=0;v<d[EditorUi.DIFF_INSERT].length;v++)e=d[EditorUi.DIFF_INSERT][v],
+q=g.getCell(e.id),null!=q&&(g.setTerminal(q,g.getCell(e.source),!0),g.setTerminal(q,g.getCell(e.target),!1));g.updateEdgeParent=k;if(b&&0<n.length)for(v=0;v<n.length;v++)g.contains(n[v])&&g.updateEdgeParent(n[v])}finally{g.endUpdate()}};
+EditorUi.prototype.patchCellRecursive=function(a,d,c,b,g){if(null!=c){for(var f=b[c.getId()],k=null!=f&&null!=f.inserted?f.inserted:{},f=null!=f&&null!=f.moved?f.moved:{},l=0,n=d.getChildCount(c),t="",e=0;e<n;e++){var m=d.getChildAt(c,e).getId();null==f[t]&&(null==g[EditorUi.DIFF_UPDATE]||null==g[EditorUi.DIFF_UPDATE][m]||null==g[EditorUi.DIFF_UPDATE][m].previous&&null==g[EditorUi.DIFF_UPDATE][m].parent)&&(f[t]=m);t=m}n=mxUtils.bind(this,function(e,f){var k=null!=e?e.getId():"";if(null!=e&&f){var m=
+d.getCell(k);null!=m&&m!=e&&(e=null)}null!=e&&(d.getChildAt(c,l)!=e&&d.add(c,e,l),this.patchCellRecursive(a,d,e,b,g),l++);return k});for(t=[null];0<t.length;)if(e=t.shift(),e=n(null!=e?e.child:null,null!=e?e.insert:!1),m=f[e],null!=m&&(delete f[e],t.push({child:d.getCell(m)})),m=k[e],null!=m&&(delete k[e],t.push({child:this.getCellForJson(m),insert:!0})),0==t.length){for(e in f)t.push({child:d.getCell(f[e])}),delete f[e];for(e in k)t.push({child:this.getCellForJson(k[e]),insert:!0}),delete k[e]}}};
EditorUi.prototype.patchCell=function(a,d,c,b){if(null!=d&&null!=c){if(null==b||null==b.xmlValue&&(null==b.value||""==b.value))"value"in c?a.setValue(d,c.value):null!=c.xmlValue&&a.setValue(d,mxUtils.parseXml(c.xmlValue).documentElement);null!=b&&null!=b.style||null==c.style||a.setStyle(d,c.style);null!=c.visible&&a.setVisible(d,1==c.visible);null!=c.collapsed&&a.setCollapsed(d,1==c.collapsed);null!=c.vertex&&(d.vertex=1==c.vertex);null!=c.edge&&(d.edge=1==c.edge);null!=c.connectable&&(d.connectable=
1==c.connectable);null!=c.geometry&&a.setGeometry(d,this.codec.decode(mxUtils.parseXml(c.geometry).documentElement));null!=c.source&&a.setTerminal(d,a.getCell(c.source),!0);null!=c.target&&a.setTerminal(d,a.getCell(c.target),!1);for(var g in c)this.cellProperties[g]||(d[g]=c[g])}};
EditorUi.prototype.getPagesForNode=function(a,d){var c=this.editor.extractGraphModel(a,!0,!0);null!=c&&(a=c);var c=a.getElementsByTagName(d||"diagram"),b=[];if(0<c.length)for(var g=0;g<c.length;g++){var f=new DiagramPage(c[g]);this.updatePageRoot(f,!0);b.push(f)}else"mxGraphModel"==a.nodeName&&(f=new DiagramPage(a.ownerDocument.createElement("diagram")),f.setName(mxResources.get("pageWithNumber",[1])),mxUtils.setTextContent(f.node,Graph.compressNode(a,!0)),b.push(f));return b};
-EditorUi.prototype.diffPages=function(a,d){for(var c=[],b=[],g={},f={},k={},l=null,n=0;n<d.length;n++)f[d[n].getId()]={page:d[n],prev:l},l=d[n];l=null;for(n=0;n<a.length;n++){var u=a[n].getId(),e=f[u];if(null==e)b.push(u);else{var m=this.diffPage(a[n],e.page),p={};0<Object.keys(m).length&&(p.cells=m);m=this.diffViewState(a[n],e.page);0<Object.keys(m).length&&(p.view=m);if((null!=e.prev?null==l:null!=l)||null!=l&&null!=e.prev&&l.getId()!=e.prev.getId())p.previous=null!=e.prev?e.prev.getId():"";null!=
-e.page.getName()&&a[n].getName()!=e.page.getName()&&(p.name=e.page.getName());0<Object.keys(p).length&&(k[u]=p)}delete f[a[n].getId()];l=a[n]}for(u in f)e=f[u],c.push({data:mxUtils.getXml(e.page.node),previous:null!=e.prev?e.prev.getId():""});0<Object.keys(k).length&&(g[EditorUi.DIFF_UPDATE]=k);0<b.length&&(g[EditorUi.DIFF_REMOVE]=b);0<c.length&&(g[EditorUi.DIFF_INSERT]=c);return g};
+EditorUi.prototype.diffPages=function(a,d){for(var c=[],b=[],g={},f={},k={},l=null,n=0;n<d.length;n++)f[d[n].getId()]={page:d[n],prev:l},l=d[n];l=null;for(n=0;n<a.length;n++){var t=a[n].getId(),e=f[t];if(null==e)b.push(t);else{var m=this.diffPage(a[n],e.page),p={};0<Object.keys(m).length&&(p.cells=m);m=this.diffViewState(a[n],e.page);0<Object.keys(m).length&&(p.view=m);if((null!=e.prev?null==l:null!=l)||null!=l&&null!=e.prev&&l.getId()!=e.prev.getId())p.previous=null!=e.prev?e.prev.getId():"";null!=
+e.page.getName()&&a[n].getName()!=e.page.getName()&&(p.name=e.page.getName());0<Object.keys(p).length&&(k[t]=p)}delete f[a[n].getId()];l=a[n]}for(t in f)e=f[t],c.push({data:mxUtils.getXml(e.page.node),previous:null!=e.prev?e.prev.getId():""});0<Object.keys(k).length&&(g[EditorUi.DIFF_UPDATE]=k);0<b.length&&(g[EditorUi.DIFF_REMOVE]=b);0<c.length&&(g[EditorUi.DIFF_INSERT]=c);return g};
EditorUi.prototype.createCellLookup=function(a,d,c){c=null!=c?c:{};c[a.getId()]={cell:a,prev:d};var b=a.getChildCount();d=null;for(var g=0;g<b;g++){var f=a.getChildAt(g);this.createCellLookup(f,d,c);d=f}return c};
EditorUi.prototype.diffCellRecursive=function(a,d,c,b,g){b=null!=b?b:{};var f=c[a.getId()];delete c[a.getId()];if(null==f)g.push(a.getId());else{var k=this.diffCell(a,f.cell);if(null!=k.parent||(null!=f.prev?null==d:null!=d)||null!=d&&null!=f.prev&&d.getId()!=f.prev.getId())k.previous=null!=f.prev?f.prev.getId():"";0<Object.keys(k).length&&(b[a.getId()]=k)}f=a.getChildCount();d=null;for(k=0;k<f;k++){var l=a.getChildAt(k);this.diffCellRecursive(l,d,c,b,g);d=l}return b};
EditorUi.prototype.diffPage=function(a,d){var c=[],b=[],g={};this.updatePageRoot(a);this.updatePageRoot(d);var f=this.createCellLookup(d.root),k=this.diffCellRecursive(a.root,null,f,k,b),l;for(l in f){var n=f[l];c.push(this.getJsonForCell(n.cell,n.prev))}0<Object.keys(k).length&&(g[EditorUi.DIFF_UPDATE]=k);0<b.length&&(g[EditorUi.DIFF_REMOVE]=b);0<c.length&&(g[EditorUi.DIFF_INSERT]=c);return g};
@@ -9525,14 +9526,14 @@ DrawioFileSync.prototype.fileChangedNotify=function(){if(this.isValidState())if(
DrawioFileSync.prototype.fileChanged=function(a,d,c,b){return this.notifyThread=b=window.setTimeout(mxUtils.bind(this,function(){null!=c&&c()||(this.isValidState()?this.file.loadPatchDescriptor(mxUtils.bind(this,function(b){null!=c&&c()||(this.isValidState()?this.catchup(b,a,d,c):null!=d&&d())}),d):null!=d&&d())}),b?this.cacheReadyDelay:0)};
DrawioFileSync.prototype.reloadDescriptor=function(){this.file.loadDescriptor(mxUtils.bind(this,function(a){null!=a?(this.file.setDescriptorRevisionId(a,this.file.getCurrentRevisionId()),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,d,c,b){if(null!=a&&(null==b||!b())){var g=this.file.getDescriptorRevisionId(a),f=this.file.getCurrentRevisionId();if(f==g)this.file.patchDescriptor(this.file.getDescriptor(),a),null!=d&&d();else if(this.isValidState()){var k=this.file.getDescriptorSecret(a),l=0,n=!1,u=mxUtils.bind(this,function(){if(null==b||!b())if(f!=this.file.getCurrentRevisionId())null!=d&&d();else if(this.isValidState()){var e=!0,m=window.setTimeout(mxUtils.bind(this,function(){e=!1;
-this.reload(d,c,b)}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&from="+encodeURIComponent(f)+"&to="+encodeURIComponent(g)+(null!=k?"&secret="+encodeURIComponent(k):""),mxUtils.bind(this,function(g){this.file.stats.bytesReceived+=g.getText().length;window.clearTimeout(m);if(e&&(null==b||!b()))if(f!=this.file.getCurrentRevisionId())null!=d&&d();else if(this.isValidState()){var k=null,p=[];if(200<=g.getStatus()&&299>=g.getStatus()&&0<g.getText().length)try{var v=
-JSON.parse(g.getText());if(null!=v&&0<v.length)for(var z=0;z<v.length;z++){var y=this.stringToObject(v[z]);if(y.v>DrawioFileSync.PROTOCOL){n=!0;p=[];break}else if(y.v===DrawioFileSync.PROTOCOL&&null!=y.d)k=y.d.checksum,p.push(y.d.patch);else{n=!0;p=[];break}}}catch(C){p=[],null!=window.console&&"1"==urlParams.test&&console.log(C)}try{0<p.length?(this.file.stats.cacheHits++,this.merge(p,k,a,d,c,b)):l<=this.maxCacheReadyRetries-1&&!n&&401!=g.getStatus()?(l++,this.file.stats.cacheMiss++,window.setTimeout(u,
-(l+1)*this.cacheReadyDelay)):(this.file.stats.cacheFail++,this.reload(d,c,b))}catch(C){null!=c&&c(C)}}else null!=c&&c()}))}else null!=c&&c()});window.setTimeout(u,this.cacheReadyDelay)}else null!=c&&c()}};DrawioFileSync.prototype.reload=function(a,d,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!=d&&d(a)}),c,b)};
+DrawioFileSync.prototype.catchup=function(a,d,c,b){if(null!=a&&(null==b||!b())){var g=this.file.getDescriptorRevisionId(a),f=this.file.getCurrentRevisionId();if(f==g)this.file.patchDescriptor(this.file.getDescriptor(),a),null!=d&&d();else if(this.isValidState()){var k=this.file.getDescriptorSecret(a),l=0,n=!1,t=mxUtils.bind(this,function(){if(null==b||!b())if(f!=this.file.getCurrentRevisionId())null!=d&&d();else if(this.isValidState()){var e=!0,m=window.setTimeout(mxUtils.bind(this,function(){e=!1;
+this.reload(d,c,b)}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&from="+encodeURIComponent(f)+"&to="+encodeURIComponent(g)+(null!=k?"&secret="+encodeURIComponent(k):""),mxUtils.bind(this,function(g){this.file.stats.bytesReceived+=g.getText().length;window.clearTimeout(m);if(e&&(null==b||!b()))if(f!=this.file.getCurrentRevisionId())null!=d&&d();else if(this.isValidState()){var k=null,p=[];if(200<=g.getStatus()&&299>=g.getStatus()&&0<g.getText().length)try{var u=
+JSON.parse(g.getText());if(null!=u&&0<u.length)for(var y=0;y<u.length;y++){var x=this.stringToObject(u[y]);if(x.v>DrawioFileSync.PROTOCOL){n=!0;p=[];break}else if(x.v===DrawioFileSync.PROTOCOL&&null!=x.d)k=x.d.checksum,p.push(x.d.patch);else{n=!0;p=[];break}}}catch(B){p=[],null!=window.console&&"1"==urlParams.test&&console.log(B)}try{0<p.length?(this.file.stats.cacheHits++,this.merge(p,k,a,d,c,b)):l<=this.maxCacheReadyRetries-1&&!n&&401!=g.getStatus()?(l++,this.file.stats.cacheMiss++,window.setTimeout(t,
+(l+1)*this.cacheReadyDelay)):(this.file.stats.cacheFail++,this.reload(d,c,b))}catch(B){null!=c&&c(B)}}else null!=c&&c()}))}else null!=c&&c()});window.setTimeout(t,this.cacheReadyDelay)}else null!=c&&c()}};DrawioFileSync.prototype.reload=function(a,d,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!=d&&d(a)}),c,b)};
DrawioFileSync.prototype.merge=function(a,d,c,b,g,f){try{this.file.stats.merged++;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.backupPatch=this.file.isModified()?this.ui.diffPages(this.file.shadowPages,this.ui.pages):null;var k=this.file.ignorePatches(a),l=this.file.getDescriptorRevisionId(c);if(!k){for(f=0;f<a.length;f++)this.file.shadowPages=this.ui.patchPages(this.file.shadowPages,
-a[f]);var n=null!=d?this.ui.getHashValueForPages(this.file.shadowPages):null;"1"==urlParams.test&&EditorUi.debug("Sync.merge",[this],"from",this.file.getCurrentRevisionId(),"to",l,"etag",this.file.getDescriptorEtag(c),"backup",this.file.backupPatch,"attempt",this.catchupRetryCount,"patches",a,"checksum",d==n,d);if(null!=d&&d!=n){var u=this.ui.hashValue(this.file.getCurrentRevisionId()),e=this.ui.hashValue(l);this.file.checksumError(g,a,"From: "+u+"\nTo: "+e+"\nChecksum: "+d+"\nCurrent: "+n,l,"merge");
-return}this.file.patch(a,DrawioFile.LAST_WRITE_WINS?this.file.backupPatch:null)}this.file.invalidChecksum=!1;this.file.inConflictState=!1;this.file.patchDescriptor(this.file.getDescriptor(),c);this.file.backupPatch=null;null!=b&&b()}catch(q){this.file.inConflictState=!0;this.file.invalidChecksum=!0;this.file.descriptorChanged();null!=g&&g(q);try{if(this.file.errorReportsEnabled)u=this.ui.hashValue(this.file.getCurrentRevisionId()),e=this.ui.hashValue(l),this.file.sendErrorReport("Error in merge",
-"From: "+u+"\nTo: "+e+"\nChecksum: "+d+"\nPatches:\n"+this.file.compressReportData(JSON.stringify(a,null,2)),q);else{var m=this.file.getCurrentUser(),p=null!=m?m.id:"unknown";EditorUi.logError("Error in merge",null,this.file.getMode()+"."+this.file.getId(),p,q)}}catch(t){}}};
+a[f]);var n=null!=d?this.ui.getHashValueForPages(this.file.shadowPages):null;"1"==urlParams.test&&EditorUi.debug("Sync.merge",[this],"from",this.file.getCurrentRevisionId(),"to",l,"etag",this.file.getDescriptorEtag(c),"backup",this.file.backupPatch,"attempt",this.catchupRetryCount,"patches",a,"checksum",d==n,d);if(null!=d&&d!=n){var t=this.ui.hashValue(this.file.getCurrentRevisionId()),e=this.ui.hashValue(l);this.file.checksumError(g,a,"From: "+t+"\nTo: "+e+"\nChecksum: "+d+"\nCurrent: "+n,l,"merge");
+return}this.file.patch(a,DrawioFile.LAST_WRITE_WINS?this.file.backupPatch:null)}this.file.invalidChecksum=!1;this.file.inConflictState=!1;this.file.patchDescriptor(this.file.getDescriptor(),c);this.file.backupPatch=null;null!=b&&b()}catch(v){this.file.inConflictState=!0;this.file.invalidChecksum=!0;this.file.descriptorChanged();null!=g&&g(v);try{if(this.file.errorReportsEnabled)t=this.ui.hashValue(this.file.getCurrentRevisionId()),e=this.ui.hashValue(l),this.file.sendErrorReport("Error in merge",
+"From: "+t+"\nTo: "+e+"\nChecksum: "+d+"\nPatches:\n"+this.file.compressReportData(JSON.stringify(a,null,2)),v);else{var m=this.file.getCurrentUser(),p=null!=m?m.id:"unknown";EditorUi.logError("Error in merge",null,this.file.getMode()+"."+this.file.getId(),p,v)}}catch(q){}}};
DrawioFileSync.prototype.descriptorChanged=function(a){this.lastModified=this.file.getLastModifiedDate();if(null!=this.channelId){var d=this.objectToString(this.createMessage({a:"desc",m:this.lastModified.getTime()})),c=this.file.getCurrentRevisionId(),b=this.objectToString({});mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(a)+"&to="+encodeURIComponent(c)+"&msg="+encodeURIComponent(d)+"&data="+encodeURIComponent(b));this.file.stats.bytesSent+=b.length;this.file.stats.msgSent++}this.updateStatus()};
DrawioFileSync.prototype.objectToString=function(a){a=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(Graph.decompress(a))};
DrawioFileSync.prototype.fileSaved=function(a,d,c,b){this.lastModified=this.file.getLastModifiedDate();this.resetUpdateStatusThread();this.catchupRetryCount=0;if(!this.ui.isOffline()&&!this.file.inConflictState&&!this.file.redirectDialogShowing&&(this.start(),null!=this.channelId)){var g=null!=this.file.shadowPages?this.file.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.file.shadowData).documentElement);b=this.ui.getHashValueForPages(a);g=this.ui.diffPages(g,a);d=this.file.getDescriptorRevisionId(d);
@@ -9548,7 +9549,7 @@ mxAsyncCanvas.prototype.decWaitCounter=function(){this.waitCounter--;0==this.wai
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,d,c,b){};mxAsyncCanvas.prototype.roundrect=function(a,d,c,b,g,f){};mxAsyncCanvas.prototype.ellipse=function(a,d,c,b){};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,d,c,b,g,f,k,l){g=this.rewriteImageSource(g);a=this.htmlCanvas.images[g];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[g]=a,a.src=g)};mxAsyncCanvas.prototype.fill=function(){};mxAsyncCanvas.prototype.stroke=function(){};mxAsyncCanvas.prototype.fillAndStroke=function(){};
-mxAsyncCanvas.prototype.text=function(a,d,c,b,g,f,k,l,n,u,e,m){if(null!=g&&0!=g.length&&(a=this.state.scale,"html"==n&&"function"===typeof html2canvas)){this.incWaitCounter();var p=this.canvasIndex++;html2canvas(g,{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.text=function(a,d,c,b,g,f,k,l,n,t,e,m){if(null!=g&&0!=g.length&&(a=this.state.scale,"html"==n&&"function"===typeof html2canvas)){this.incWaitCounter();var p=this.canvasIndex++;html2canvas(g,{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,c,b,g){return c+c+b+b+g+g});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,d){this.state.dx+=a;this.state.dy+=d;this.ctx.translate(a,d)};
@@ -9563,9 +9564,9 @@ mxJsCanvas.prototype.setShadowOffset=function(a,d){this.state.shadowDx=a;this.st
mxJsCanvas.prototype.arcTo=function(a,d,c,b,g,f,k){a=mxUtils.arcToCurves(this.lastMoveX,this.lastMoveY,a,d,c,b,g,f,k);if(null!=a)for(d=0;d<a.length;d+=6)this.curveTo(a[d],a[d+1],a[d+2],a[d+3],a[d+4],a[d+5])};mxJsCanvas.prototype.curveTo=function(a,d,c,b,g,f){this.ctx.bezierCurveTo(a,d,c,b,g,f);this.lastMoveX=g;this.lastMoveY=f};mxJsCanvas.prototype.rect=function(a,d,c,b){this.begin();this.moveTo(a,d);this.lineTo(a+c,d);this.lineTo(a+c,d+b);this.lineTo(a,d+b);this.close()};
mxJsCanvas.prototype.roundrect=function(a,d,c,b,g,f){this.begin();this.moveTo(a+g,d);this.lineTo(a+c-g,d);this.quadTo(a+c,d,a+c,d+f);this.lineTo(a+c,d+b-f);this.quadTo(a+c,d+b,a+c-g,d+b);this.lineTo(a+g,d+b);this.quadTo(a,d+b,a,d+b-f);this.lineTo(a,d+f);this.quadTo(a,d,a+g,d)};mxJsCanvas.prototype.ellipse=function(a,d,c,b){this.ctx.save();this.ctx.translate(a+c/2,d+b/2);this.ctx.scale(c/2,b/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,d,c,b,g,f,k,l){g=this.rewriteImageSource(g);g=this.images[g];if(null!=g&&0<g.height&&0<g.width){var n=this.ctx;n.save();if(f){f=g.width;var u=g.height,e=Math.min(c/f,b/u);a+=(c-f*e)/2;d+=(b-u*e)/2;c=f*e;b=u*e}k&&(n.translate(2*a+c,0),n.scale(-1,1));l&&(n.translate(0,2*d+b),n.scale(1,-1));n.drawImage(g,a,d,c,b);n.restore()}};mxJsCanvas.prototype.begin=function(){this.ctx.beginPath()};mxJsCanvas.prototype.close=function(){this.ctx.closePath()};
+mxJsCanvas.prototype.image=function(a,d,c,b,g,f,k,l){g=this.rewriteImageSource(g);g=this.images[g];if(null!=g&&0<g.height&&0<g.width){var n=this.ctx;n.save();if(f){f=g.width;var t=g.height,e=Math.min(c/f,b/t);a+=(c-f*e)/2;d+=(b-t*e)/2;c=f*e;b=t*e}k&&(n.translate(2*a+c,0),n.scale(-1,1));l&&(n.translate(0,2*d+b),n.scale(1,-1));n.drawImage(g,a,d,c,b);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,d=this.ctx.shadowOffsetX,c=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=d;this.ctx.shadowOffsetY=c}else this.ctx.fill(),this.ctx.stroke()};
-mxJsCanvas.prototype.text=function(a,d,c,b,g,f,k,l,n,u,e,m){if(null!=g&&0!=g.length){c=this.state.scale;0!=m&&(this.ctx.translate(Math.round(a),Math.round(d)),this.ctx.rotate(m*Math.PI/180),this.ctx.translate(Math.round(-a),Math.round(-d)));if("html"==n){g=this.subCanvas[this.canvasIndex++];n=g.height;m=g.width;switch(k){case mxConstants.ALIGN_MIDDLE:d-=n/2/c;break;case mxConstants.ALIGN_BOTTOM:d-=n/c}switch(f){case mxConstants.ALIGN_CENTER:a-=m/2/c;break;case mxConstants.ALIGN_RIGHT:a-=m/c}this.ctx.save();
+mxJsCanvas.prototype.text=function(a,d,c,b,g,f,k,l,n,t,e,m){if(null!=g&&0!=g.length){c=this.state.scale;0!=m&&(this.ctx.translate(Math.round(a),Math.round(d)),this.ctx.rotate(m*Math.PI/180),this.ctx.translate(Math.round(-a),Math.round(-d)));if("html"==n){g=this.subCanvas[this.canvasIndex++];n=g.height;m=g.width;switch(k){case mxConstants.ALIGN_MIDDLE:d-=n/2/c;break;case mxConstants.ALIGN_BOTTOM:d-=n/c}switch(f){case mxConstants.ALIGN_CENTER:a-=m/2/c;break;case mxConstants.ALIGN_RIGHT:a-=m/c}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(d)-.5,Math.round(g.width/c),Math.round(g.height/c))),null!=this.state.fontBorderColor&&(this.ctx.strokeStyle=this.state.fontBorderColor,this.ctx.lineWidth=1,this.ctx.strokeRect(Math.round(a)-.5,Math.round(d)-.5,Math.round(g.width/c),Math.round(g.height/c)));this.ctx.scale(1/c,1/c);this.ctx.drawImage(g,
Math.round(a*c),Math.round(d*c))}else{this.ctx.save();this.updateFont();m=document.createElement("div");m.innerHTML=g;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);g=g.split("\n");m=n[1];this.ctx.textBaseline="top";n=d;switch(k){case mxConstants.ALIGN_MIDDLE:this.ctx.textBaseline=
"middle";d-=(g.length-1)*m/2;n=d-this.state.fontSize/2;break;case mxConstants.ALIGN_BOTTOM:this.ctx.textBaseline="alphabetic",d-=m*(g.length-1),n=d-this.state.fontSize}k=[];m=[];for(c=0;c<g.length;c++)m[c]=a,k[c]=this.ctx.measureText(g[c]).width,null!=f&&f!=mxConstants.ALIGN_LEFT&&(m[c]-=k[c],f==mxConstants.ALIGN_CENTER&&(m[c]+=k[c]/2));if(null!=this.state.fontBackgroundColor||null!=this.state.fontBorderColor){a=m[0];f=k[0];for(c=1;c<g.length;c++)a=Math.min(a,m[c]),f=Math.max(f,k[c]);this.ctx.save();
@@ -9578,8 +9579,8 @@ DriveFile.prototype.isConflict=function(a){return null!=a&&null!=a.error&&412==a
DriveFile.prototype.getPublicUrl=function(a){this.ui.drive.executeRequest({url:"/files/"+this.desc.id+"/permissions?supportsAllDrives=true"},mxUtils.bind(this,function(d){if(null!=d&&null!=d.items)for(var c=0;c<d.items.length;c++)if("anyoneWithLink"===d.items[c].id||"anyone"===d.items[c].id){a(this.desc.webContentLink);return}a(null)}),mxUtils.bind(this,function(){a(null)}))};DriveFile.prototype.isAutosaveOptional=function(){return!0};
DriveFile.prototype.isRenamable=function(){return this.isEditable()&&DrawioFile.prototype.isEditable.apply(this,arguments)};DriveFile.prototype.isMovable=function(){return this.isEditable()};DriveFile.prototype.isTrashed=function(){return this.desc.labels.trashed};DriveFile.prototype.save=function(a,d,c,b,g){DrawioFile.prototype.save.apply(this,[a,mxUtils.bind(this,function(){this.saveFile(null,a,d,c,b,g)}),c,b,g])};
DriveFile.prototype.saveFile=function(a,d,c,b,g,f){try{if(!this.isEditable())null!=c&&c();else if(!this.savingFile){var k=mxUtils.bind(this,function(a,f){var l=null,e=null;try{l=this.isModified;e=this.isModified();this.setModified(!1);this.savingFileTime=new Date;this.savingFile=!0;this.isModified=function(){return!0};var m=this.desc;this.ui.drive.saveFile(this,f,mxUtils.bind(this,function(a,f){try{this.savingFile=!1,this.isModified=l,0!=a?(d&&(this.lastAutosaveRevision=(new Date).getTime()),this.autosaveDelay=
-Math.min(8E3,Math.max(this.saveDelay+500,DriveFile.prototype.autosaveDelay)),this.desc=a,this.fileSaved(f,m,mxUtils.bind(this,function(){this.contentChanged();null!=c&&c(a)}),b)):(this.setModified(e||this.isModified()),null!=b&&b(a))}catch(t){if(this.setModified(e||this.isModified()),null!=b)b(t);else throw t;}}),mxUtils.bind(this,function(c,d){try{this.savingFile=!1,this.isModified=l,this.setModified(e||this.isModified()),this.isConflict(c)?(this.inConflictState=!0,null!=this.sync?(this.savingFile=
-!0,this.savingFileTime=new Date,this.sync.fileConflict(d,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){this.updateFileData();k(a,!0)}),100+500*Math.random())}),mxUtils.bind(this,function(){this.savingFile=!1;null!=b&&b()}))):null!=b&&b()):null!=b&&b(c)}catch(t){if(this.setModified(e||this.isModified()),null!=b)b(t);else throw t;}}),g,g,a)}catch(p){if(this.savingFile=!1,null!=l&&(this.isModified=l),null!=e&&this.setModified(e||this.isModified()),null!=b)b(p);else throw p;
+Math.min(8E3,Math.max(this.saveDelay+500,DriveFile.prototype.autosaveDelay)),this.desc=a,this.fileSaved(f,m,mxUtils.bind(this,function(){this.contentChanged();null!=c&&c(a)}),b)):(this.setModified(e||this.isModified()),null!=b&&b(a))}catch(q){if(this.setModified(e||this.isModified()),null!=b)b(q);else throw q;}}),mxUtils.bind(this,function(c,d){try{this.savingFile=!1,this.isModified=l,this.setModified(e||this.isModified()),this.isConflict(c)?(this.inConflictState=!0,null!=this.sync?(this.savingFile=
+!0,this.savingFileTime=new Date,this.sync.fileConflict(d,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){this.updateFileData();k(a,!0)}),100+500*Math.random())}),mxUtils.bind(this,function(){this.savingFile=!1;null!=b&&b()}))):null!=b&&b()):null!=b&&b(c)}catch(q){if(this.setModified(e||this.isModified()),null!=b)b(q);else throw q;}}),g,g,a)}catch(p){if(this.savingFile=!1,null!=l&&(this.isModified=l),null!=e&&this.setModified(e||this.isModified()),null!=b)b(p);else throw p;
}});k(f,d)}}catch(l){if(null!=b)b(l);else throw l;}};DriveFile.prototype.copyFile=function(a,d){this.isRestricted()?DrawioFile.prototype.copyFile.apply(this,arguments):this.makeCopy(mxUtils.bind(this,function(){if(this.ui.spinner.spin(document.body,mxResources.get("saving")))try{this.save(!0,a,d)}catch(c){d(c)}}),d,!0)};
DriveFile.prototype.makeCopy=function(a,d,c){this.ui.spinner.spin(document.body,mxResources.get("saving"))&&this.saveAs(this.ui.getCopyFilename(this,c),mxUtils.bind(this,function(b){this.desc=b;this.ui.spinner.stop();this.setModified(!1);this.backupPatch=null;this.inConflictState=this.invalidChecksum=!1;this.descriptorChanged();a()}),mxUtils.bind(this,function(){this.ui.spinner.stop();null!=d&&d()}))};DriveFile.prototype.saveAs=function(a,d,c){this.ui.drive.copyFile(this.getId(),a,d,c)};
DriveFile.prototype.rename=function(a,d,c){var b=this.getCurrentEtag();this.ui.drive.renameFile(this.getId(),a,mxUtils.bind(this,function(g){this.hasSameExtension(a,this.getTitle())?(this.desc=g,this.descriptorChanged(),null!=this.sync&&this.sync.descriptorChanged(b),null!=d&&d(g)):(this.desc=g,null!=this.sync&&this.sync.descriptorChanged(b),this.save(!0,d,c))}),c)};
@@ -9604,9 +9605,9 @@ DriveClient.prototype.getUsersList=function(){var a=[],d=JSON.parse(this.getPers
DriveClient.prototype.execute=function(a){var d=mxUtils.bind(this,function(c){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.logout();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,d)};
DriveClient.prototype.executeRequest=function(a,d,c){try{var b=!0,g=null,f=0;null!=this.requestThread&&window.clearTimeout(this.requestThread);var k=mxUtils.bind(this,function(){try{this.requestThread=null;this.currentRequest=a;null!=g&&window.clearTimeout(g);g=window.setTimeout(mxUtils.bind(this,function(){b=!1;null!=c&&c({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:k})}),this.ui.timeout);var l=null,n=!1;"string"===typeof a.params?l=a.params:null!=a.params&&(l=JSON.stringify(a.params),
-n=!0);var u=a.fullUrl||this.GDriveBaseUrl+a.url;n&&(u+=(0<u.indexOf("?")?"&":"?")+"alt=json");var e=new mxXmlRequest(u,l,a.method||"GET");e.setRequestHeaders=mxUtils.bind(this,function(b,c){if(null!=a.headers)for(var d in a.headers)b.setRequestHeader(d,a.headers[d]);else null!=a.contentType?b.setRequestHeader("Content-Type",a.contentType):n&&b.setRequestHeader("Content-Type","application/json");b.setRequestHeader("Authorization","Bearer "+this.token)});e.send(mxUtils.bind(this,function(e){try{if(window.clearTimeout(g),
-b){var l;try{l=JSON.parse(e.getText())}catch(v){l=null}if(200<=e.getStatus()&&299>=e.getStatus())null!=d&&d(l);else{var m=null!=l&&null!=l.error?null!=l.error.data?l.error.data:l.error.errors:null,n=null!=m&&0<m.length?m[0].reason:null;null==c||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&&this.retryAuth||
-401==l.error.code&&this.retryAuth&&"authError"==n?(null!=c&&c(l),this.retryAuth=!1):(this.retryAuth=!0,this.execute(k)):null!=l&&null!=l.error&&412!=l.error.code&&404!=l.error.code&&400!=l.error.code&&this.currentRequest==a&&f<this.maxRetries?(f++,this.requestThread=window.setTimeout(k,Math.round(Math.pow(2,f)*(1+.1*(Math.random()-.5))*this.coolOff))):null!=c&&c(l):c(l)}}}catch(v){if(null!=c)c(v);else throw v;}}))}catch(m){if(null!=c)c(m);else throw m;}});null!=this.token&&this.authCalled?k():this.execute(k)}catch(l){if(null!=
+n=!0);var t=a.fullUrl||this.GDriveBaseUrl+a.url;n&&(t+=(0<t.indexOf("?")?"&":"?")+"alt=json");var e=new mxXmlRequest(t,l,a.method||"GET");e.setRequestHeaders=mxUtils.bind(this,function(b,c){if(null!=a.headers)for(var d in a.headers)b.setRequestHeader(d,a.headers[d]);else null!=a.contentType?b.setRequestHeader("Content-Type",a.contentType):n&&b.setRequestHeader("Content-Type","application/json");b.setRequestHeader("Authorization","Bearer "+this.token)});e.send(mxUtils.bind(this,function(e){try{if(window.clearTimeout(g),
+b){var l;try{l=JSON.parse(e.getText())}catch(u){l=null}if(200<=e.getStatus()&&299>=e.getStatus())null!=d&&d(l);else{var m=null!=l&&null!=l.error?null!=l.error.data?l.error.data:l.error.errors:null,n=null!=m&&0<m.length?m[0].reason:null;null==c||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&&this.retryAuth||
+401==l.error.code&&this.retryAuth&&"authError"==n?(null!=c&&c(l),this.retryAuth=!1):(this.retryAuth=!0,this.execute(k)):null!=l&&null!=l.error&&412!=l.error.code&&404!=l.error.code&&400!=l.error.code&&this.currentRequest==a&&f<this.maxRetries?(f++,this.requestThread=window.setTimeout(k,Math.round(Math.pow(2,f)*(1+.1*(Math.random()-.5))*this.coolOff))):null!=c&&c(l):c(l)}}}catch(u){if(null!=c)c(u);else throw u;}}))}catch(m){if(null!=c)c(m);else throw m;}});null!=this.token&&this.authCalled?k():this.execute(k)}catch(l){if(null!=
c)c(l);else throw l;}};DriveClient.prototype.createAuthWin=function(a){return window.open(a?a:"about:blank","gdauth",["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())};
DriveClient.prototype.authorize=function(a,d,c,b,g){var f=mxUtils.bind(this,function(a,b,e){this.token=a.access_token;a.expires=Date.now()+1E3*parseInt(a.expires_in);a.remember=b;this.resetTokenRefresh(a);this.authCalled=!0;if(e||null==this.user){var f=JSON.stringify(a);this.updateUser(mxUtils.bind(this,function(){var a=JSON.parse(f);this.setPersistentToken(a,!b);null!=d&&d()}),c)}else null!=d&&(this.setPersistentToken(a,!b),d())});try{null!=this.ui.stateArg&&null!=this.ui.stateArg.userId&&(this.userId=
this.ui.stateArg.userId,null!=this.user&&this.user.id!=this.userId&&(this.user=null));var k=JSON.parse(this.getPersistentToken(!0));null!=k&&(null==this.userId?null!=k.current?(this.userId=k.current.userId,k=k[this.userId]):k=null:k=k[this.userId]);if(!a||null!=k&&null!=k.refresh_token)if(a)(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname)+"&refresh_token="+k.refresh_token,null,"GET")).send(mxUtils.bind(this,function(a){200<=
@@ -9621,24 +9622,24 @@ DriveClient.prototype.loadDescriptor=function(a,d,c,b){this.executeRequest({url:
DriveClient.prototype.getFile=function(a,d,c,b,g){b=null!=b?b:!1;g=null!=g?g:!1;null!=urlParams.rev?this.executeRequest({url:"/files/"+a+"/revisions/"+urlParams.rev+"?supportsAllDrives=true"},mxUtils.bind(this,function(b){b.title=b.originalFilename;b.headRevisionId=b.id;b.id=a;this.getXmlFile(b,d,c)}),c):this.loadDescriptor(a,mxUtils.bind(this,function(a){try{if(null!=this.user){var f=/\.png$/i.test(a.title);/\.v(dx|sdx?)$/i.test(a.title)||/\.gliffy$/i.test(a.title)||!this.ui.useCanvasForExport&&
f?this.ui.convertFile(a.downloadUrl,a.title,a.mimeType,this.extension,d,c,null,{Authorization:"Bearer "+this.token}):b||g||a.mimeType==this.libraryMimeType||a.mimeType==this.xmlMimeType?this.getXmlFile(a,d,c,!0,g):this.getXmlFile(a,d,c)}else c({message:mxResources.get("loggedOut")})}catch(l){if(null!=c)c(l);else throw l;}}),c)};DriveClient.prototype.isGoogleRealtimeMimeType=function(a){return null!=a&&"application/vnd.jgraph.mxfile."==a.substring(0,30)};
DriveClient.prototype.getXmlFile=function(a,d,c,b,g){try{var f={Authorization:"Bearer "+this.token},k=a.downloadUrl;this.ui.loadUrl(k,mxUtils.bind(this,function(b){try{if(null==b)c({message:mxResources.get("invalidOrMissingFile")});else if(a.mimeType==this.libraryMimeType||g)a.mimeType!=this.libraryMimeType||g?d(new DriveLibrary(this.ui,b,a)):c({message:mxResources.get("notADiagramFile")});else{var f=!1;if(/\.png$/i.test(a.title)){var l=b.lastIndexOf(",");if(0<l){var e=this.ui.extractGraphModelFromPng(b.substring(l+
-1));if(null!=e&&0<e.length)b=e;else try{var e=b.substring(l+1),m=!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(e):atob(e),p=this.ui.editor.extractGraphModel(mxUtils.parseXml(m).documentElement,!0);null==p||0<p.getElementsByTagName("parsererror").length?f=!0:b=m}catch(q){f=!0}}}else/\.pdf$/i.test(a.title)?(e=Editor.extractGraphModelFromPdf(b),null!=e&&0<e.length&&(f=!0,b=e)):"data:image/png;base64,PG14ZmlsZS"==b.substring(0,32)&&(m=b.substring(22),b=window.atob&&!mxClient.IS_SF?atob(m):
-Base64.decode(m));Graph.fileSupport&&(new XMLHttpRequest).upload&&this.ui.isRemoteFileFormat(b,k)?this.ui.parseFile(new Blob([b],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){try{4==b.readyState&&(200<=b.status&&299>=b.status?d(new LocalFile(this.ui,b.responseText,a.title+this.extension,!0)):null!=c&&c({message:mxResources.get("errorLoadingFile")}))}catch(t){if(null!=c)c(t);else throw t;}}),a.title):d(f?new LocalFile(this.ui,b,a.title,!0):new DriveFile(this.ui,b,a))}}catch(q){if(null!=
-c)c(q);else throw q;}}),c,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)||/\.pdf$/i.test(a.title),null,null,null,f)}catch(l){if(null!=c)c(l);else throw l;}};
-DriveClient.prototype.saveFile=function(a,d,c,b,g,f,k,l){try{var n=0;a.saveLevel=1;var u=mxUtils.bind(this,function(c){if(null!=b)b(c);else throw c;try{if(!a.isConflict(c)){var d="sl_"+a.saveLevel+"-error_"+(a.getErrorMessage(c)||"unknown");null!=c&&null!=c.error&&null!=c.error.code&&(d+="-code_"+c.error.code);EditorUi.logEvent({category:"ERROR-SAVE-FILE-"+a.getHash()+"-rev_"+a.desc.headRevisionId+"-mod_"+a.desc.modifiedDate+"-size_"+a.getSize()+"-mime_"+a.desc.mimeType+(this.ui.editor.autosave?"":
-"-nosave")+(a.isAutosave()?"":"-noauto")+(a.changeListenerEnabled?"":"-nolisten")+(a.inConflictState?"-conflict":"")+(a.invalidChecksum?"-invalid":""),action:d,label:(null!=this.user?"user_"+this.user.id:"nouser")+(null!=a.sync?"-client_"+a.sync.clientId:"-nosync")})}}catch(D){}}),e=mxUtils.bind(this,function(b){u(b);try{EditorUi.logError(b.message,null,null,b),EditorUi.sendReport("Critical error in DriveClient.saveFile "+(new Date).toISOString()+":\n\nUserAgent="+navigator.userAgent+"\nAppVersion="+
-navigator.appVersion+"\nAppName="+navigator.appName+"\nPlatform="+navigator.platform+"\nFile="+a.desc.id+"."+a.desc.headRevisionId+"\nMime="+a.desc.mimeType+"\nUser="+(null!=this.user?this.user.id:"nouser")+(null!=a.sync?"-client_"+a.sync.clientId:"-nosync")+"\nSaveLevel="+a.saveLevel+"\nSaveAsPng="+(this.ui.useCanvasForExport&&/(\.png)$/i.test(a.getTitle()))+"\nRetryCount="+n+"\nError="+b+"\nMessage="+b.message+"\n\nStack:\n"+b.stack)}catch(E){}});if(a.isEditable()&&null!=a.desc){var m=(new Date).getTime(),
-p=a.desc.etag,q=a.desc.modifiedDate,t=a.desc.headRevisionId,v=this.ui.useCanvasForExport&&/(\.png)$/i.test(a.getTitle());f=null!=f?f:!1;var z=null,y=!1,C={mimeType:a.desc.mimeType,title:a.getTitle()};if(this.isGoogleRealtimeMimeType(C.mimeType))C.mimeType=this.xmlMimeType,z=a.desc,y=d=!0;else if("application/octet-stream"==C.mimeType||"1"==urlParams["override-mime"]&&C.mimeType!=this.xmlMimeType)C.mimeType=this.xmlMimeType;var x=mxUtils.bind(this,function(b,g,x){try{a.saveLevel=3;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)}));x||(null!=b||f||(b=this.placeholderThumbnail,g=this.placeholderMimeType),null!=b&&null!=g&&(C.thumbnail={image:b,mimeType:g}));var A=a.getData(),E=mxUtils.bind(this,function(b){try{if(a.saveDelay=(new Date).getTime()-m,a.saveLevel=11,null==b)u({message:mxResources.get("errorSavingFile")+": Empty response"});
-else{var f=(new Date(b.modifiedDate)).getTime()-(new Date(q)).getTime();if(0>=f||p==b.etag||d&&t==b.headRevisionId){a.saveLevel=12;var g=[];0>=f&&g.push("invalid modified time");p==b.etag&&g.push("stale etag");d&&t==b.headRevisionId&&g.push("stale revision");var k=g.join(", ");u({message:mxResources.get("errorSavingFile")+": "+k},b);try{EditorUi.logError("Critical: Error saving to Google Drive "+a.desc.id,null,"from-"+t+"."+q+"-"+this.ui.hashValue(p)+"-to-"+b.headRevisionId+"."+b.modifiedDate+"-"+
-this.ui.hashValue(b.etag)+(0<k.length?"-errors-"+k:""),"user-"+(null!=this.user?this.user.id:"nouser")+(null!=a.sync?"-client_"+a.sync.clientId:"-nosync"))}catch(O){}}else if(a.saveLevel=null,c(b,A),null!=z){this.executeRequest({url:"/files/"+z.id+"/revisions/"+z.headRevisionId+"?supportsAllDrives=true"},mxUtils.bind(this,mxUtils.bind(this,function(a){a.pinned=!0;this.executeRequest({url:"/files/"+z.id+"/revisions/"+z.headRevisionId,method:"PUT",params:a})})));try{EditorUi.logEvent({category:a.convertedFrom+
-"-CONVERT-FILE-"+a.getHash(),action:"from_"+z.id+"."+z.headRevisionId+"-to_"+a.desc.id+"."+a.desc.headRevisionId,label:null!=this.user?"user_"+this.user.id:"nouser"+(null!=a.sync?"-client_"+a.sync.clientId:"nosync")})}catch(O){}}}}catch(O){e(O)}}),D=mxUtils.bind(this,function(c,f){a.saveLevel=4;try{null!=l&&(C.properties=l);var g=k||a.constructor!=DriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?null:a.getCurrentEtag(),m=mxUtils.bind(this,function(b){a.saveLevel=5;try{var k=a.desc.mimeType!=
-this.xmlMimeType&&a.desc.mimeType!=this.mimeType&&a.desc.mimeType!=this.libraryMimeType,l=!0,m=null;try{m=window.setTimeout(mxUtils.bind(this,function(){l=!1;u({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),3*this.ui.timeout)}catch(W){}this.executeRequest(this.createUploadRequest(a.getId(),C,c,d||b||k,f,b?null:g,y),mxUtils.bind(this,function(a){window.clearTimeout(m);l&&E(a)}),mxUtils.bind(this,function(b){window.clearTimeout(m);if(l){a.saveLevel=6;try{a.isConflict(b)?this.executeRequest({url:"/files/"+
-a.getId()+"?supportsAllDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(c){a.saveLevel=7;try{if(null!=c&&c.etag==g)if(n<this.staleEtagMaxRetries){n++;var d=2*n*this.coolOff*(1+.1*(Math.random()-.5));window.setTimeout(x,d);"1"==urlParams.test&&EditorUi.debug("DriveClient: Stale Etag Detected","retry",n,"delay",d)}else{x(!0);try{EditorUi.logEvent({category:"STALE-ETAG-SAVE-FILE-"+a.getHash(),action:"rev_"+a.desc.headRevisionId+"-mod_"+a.desc.modifiedDate+"-size_"+a.getSize()+"-mime_"+
-a.desc.mimeType+(this.ui.editor.autosave?"":"-nosave")+(a.isAutosave()?"":"-noauto")+(a.changeListenerEnabled?"":"-nolisten")+(a.inConflictState?"-conflict":"")+(a.invalidChecksum?"-invalid":""),label:(null!=this.user?"user_"+this.user.id:"nouser")+(null!=a.sync?"-client_"+a.sync.clientId:"-nosync")})}catch(ba){}}else"1"==urlParams.test&&c.headRevisionId==t&&EditorUi.debug("DriveClient: Remote Etag Changed","local",g,"remote",c.etag,"rev",a.desc.headRevisionId,"response",[c],"file",[a]),u(b,c)}catch(ba){e(ba)}}),
-mxUtils.bind(this,function(){u(b)})):u(b)}catch(ga){e(ga)}}}))}catch(W){e(W)}}),x=mxUtils.bind(this,function(b){a.saveLevel=9;if(b)m(b);else{var c=!0,d=null;try{d=window.setTimeout(mxUtils.bind(this,function(){c=!1;u({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),3*this.ui.timeout)}catch(V){}this.executeRequest({url:"/files/"+a.getId()+"?supportsAllDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(f){window.clearTimeout(d);if(c){a.saveLevel=10;try{null!=f&&f.headRevisionId==
-t?("1"==urlParams.test&&g!=f.etag&&EditorUi.debug("DriveClient: Preflight Etag Update","from",g,"to",f.etag,"rev",a.desc.headRevisionId,"response",[f],"file",[a]),g=f.etag,m(b)):u({error:{code:412}},f)}catch(W){e(W)}}}),mxUtils.bind(this,function(b){window.clearTimeout(d);c&&(a.saveLevel=11,u(b))}))}});if(v&&null==b){a.saveLevel=8;var p=new Image;p.onload=mxUtils.bind(this,function(){try{var a=this.thumbnailWidth/p.width,b=document.createElement("canvas");b.width=this.thumbnailWidth;b.height=Math.floor(p.height*
-a);b.getContext("2d").drawImage(p,0,0,b.width,b.height);var c=b.toDataURL(),c=c.substring(c.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_");C.thumbnail={image:c,mimeType:"image/png"};x(!1)}catch(V){try{x(!1)}catch(W){e(W)}}});p.src="data:image/png;base64,"+c}else x(!1)}catch(Y){e(Y)}});v?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){D(a,!0)}),u,this.ui.getCurrentFile()!=a?A:null):D(A,!1)}catch(J){e(J)}});try{a.saveLevel=2,(f||v||a.constructor==DriveLibrary||!this.enableThumbnails||"0"==
-urlParams.thumb||null!=C.mimeType&&"application/vnd.jgraph.mxfile"!=C.mimeType.substring(0,29)||!this.ui.getThumbnail(this.thumbnailWidth,mxUtils.bind(this,function(a){try{var b=null;try{null!=a&&(b=a.toDataURL("image/png")),null!=b&&(b=b.length>this.maxThumbnailSize?null:b.substring(b.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_"))}catch(D){b=null}x(b,"image/png")}catch(D){e(D)}})))&&x(null,null,a.constructor!=DriveLibrary)}catch(A){e(A)}}else this.ui.editor.graph.reset(),u({message:mxResources.get("readOnly")})}catch(A){e(A)}};
+1));if(null!=e&&0<e.length)b=e;else try{var e=b.substring(l+1),m=!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(e):atob(e),p=this.ui.editor.extractGraphModel(mxUtils.parseXml(m).documentElement,!0);null==p||0<p.getElementsByTagName("parsererror").length?f=!0:b=m}catch(v){f=!0}}}else/\.pdf$/i.test(a.title)?(e=Editor.extractGraphModelFromPdf(b),null!=e&&0<e.length&&(f=!0,b=e)):"data:image/png;base64,PG14ZmlsZS"==b.substring(0,32)&&(m=b.substring(22),b=window.atob&&!mxClient.IS_SF?atob(m):
+Base64.decode(m));Graph.fileSupport&&(new XMLHttpRequest).upload&&this.ui.isRemoteFileFormat(b,k)?this.ui.parseFile(new Blob([b],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){try{4==b.readyState&&(200<=b.status&&299>=b.status?d(new LocalFile(this.ui,b.responseText,a.title+this.extension,!0)):null!=c&&c({message:mxResources.get("errorLoadingFile")}))}catch(q){if(null!=c)c(q);else throw q;}}),a.title):d(f?new LocalFile(this.ui,b,a.title,!0):new DriveFile(this.ui,b,a))}}catch(v){if(null!=
+c)c(v);else throw v;}}),c,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)||/\.pdf$/i.test(a.title),null,null,null,f)}catch(l){if(null!=c)c(l);else throw l;}};
+DriveClient.prototype.saveFile=function(a,d,c,b,g,f,k,l){try{var n=0;a.saveLevel=1;var t=mxUtils.bind(this,function(c){if(null!=b)b(c);else throw c;try{if(!a.isConflict(c)){var d="sl_"+a.saveLevel+"-error_"+(a.getErrorMessage(c)||"unknown");null!=c&&null!=c.error&&null!=c.error.code&&(d+="-code_"+c.error.code);EditorUi.logEvent({category:"ERROR-SAVE-FILE-"+a.getHash()+"-rev_"+a.desc.headRevisionId+"-mod_"+a.desc.modifiedDate+"-size_"+a.getSize()+"-mime_"+a.desc.mimeType+(this.ui.editor.autosave?"":
+"-nosave")+(a.isAutosave()?"":"-noauto")+(a.changeListenerEnabled?"":"-nolisten")+(a.inConflictState?"-conflict":"")+(a.invalidChecksum?"-invalid":""),action:d,label:(null!=this.user?"user_"+this.user.id:"nouser")+(null!=a.sync?"-client_"+a.sync.clientId:"-nosync")})}}catch(D){}}),e=mxUtils.bind(this,function(b){t(b);try{EditorUi.logError(b.message,null,null,b),EditorUi.sendReport("Critical error in DriveClient.saveFile "+(new Date).toISOString()+":\n\nUserAgent="+navigator.userAgent+"\nAppVersion="+
+navigator.appVersion+"\nAppName="+navigator.appName+"\nPlatform="+navigator.platform+"\nFile="+a.desc.id+"."+a.desc.headRevisionId+"\nMime="+a.desc.mimeType+"\nUser="+(null!=this.user?this.user.id:"nouser")+(null!=a.sync?"-client_"+a.sync.clientId:"-nosync")+"\nSaveLevel="+a.saveLevel+"\nSaveAsPng="+(this.ui.useCanvasForExport&&/(\.png)$/i.test(a.getTitle()))+"\nRetryCount="+n+"\nError="+b+"\nMessage="+b.message+"\n\nStack:\n"+b.stack)}catch(F){}});if(a.isEditable()&&null!=a.desc){var m=(new Date).getTime(),
+p=a.desc.etag,v=a.desc.modifiedDate,q=a.desc.headRevisionId,u=this.ui.useCanvasForExport&&/(\.png)$/i.test(a.getTitle());f=null!=f?f:!1;var y=null,x=!1,B={mimeType:a.desc.mimeType,title:a.getTitle()};if(this.isGoogleRealtimeMimeType(B.mimeType))B.mimeType=this.xmlMimeType,y=a.desc,x=d=!0;else if("application/octet-stream"==B.mimeType||"1"==urlParams["override-mime"]&&B.mimeType!=this.xmlMimeType)B.mimeType=this.xmlMimeType;var A=mxUtils.bind(this,function(b,g,A){try{a.saveLevel=3;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)}));A||(null!=b||f||(b=this.placeholderThumbnail,g=this.placeholderMimeType),null!=b&&null!=g&&(B.thumbnail={image:b,mimeType:g}));var z=a.getData(),F=mxUtils.bind(this,function(b){try{if(a.saveDelay=(new Date).getTime()-m,a.saveLevel=11,null==b)t({message:mxResources.get("errorSavingFile")+": Empty response"});
+else{var f=(new Date(b.modifiedDate)).getTime()-(new Date(v)).getTime();if(0>=f||p==b.etag||d&&q==b.headRevisionId){a.saveLevel=12;var g=[];0>=f&&g.push("invalid modified time");p==b.etag&&g.push("stale etag");d&&q==b.headRevisionId&&g.push("stale revision");var k=g.join(", ");t({message:mxResources.get("errorSavingFile")+": "+k},b);try{EditorUi.logError("Critical: Error saving to Google Drive "+a.desc.id,null,"from-"+q+"."+v+"-"+this.ui.hashValue(p)+"-to-"+b.headRevisionId+"."+b.modifiedDate+"-"+
+this.ui.hashValue(b.etag)+(0<k.length?"-errors-"+k:""),"user-"+(null!=this.user?this.user.id:"nouser")+(null!=a.sync?"-client_"+a.sync.clientId:"-nosync"))}catch(O){}}else if(a.saveLevel=null,c(b,z),null!=y){this.executeRequest({url:"/files/"+y.id+"/revisions/"+y.headRevisionId+"?supportsAllDrives=true"},mxUtils.bind(this,mxUtils.bind(this,function(a){a.pinned=!0;this.executeRequest({url:"/files/"+y.id+"/revisions/"+y.headRevisionId,method:"PUT",params:a})})));try{EditorUi.logEvent({category:a.convertedFrom+
+"-CONVERT-FILE-"+a.getHash(),action:"from_"+y.id+"."+y.headRevisionId+"-to_"+a.desc.id+"."+a.desc.headRevisionId,label:null!=this.user?"user_"+this.user.id:"nouser"+(null!=a.sync?"-client_"+a.sync.clientId:"nosync")})}catch(O){}}}}catch(O){e(O)}}),D=mxUtils.bind(this,function(c,f){a.saveLevel=4;try{null!=l&&(B.properties=l);var g=k||a.constructor!=DriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?null:a.getCurrentEtag(),m=mxUtils.bind(this,function(b){a.saveLevel=5;try{var k=a.desc.mimeType!=
+this.xmlMimeType&&a.desc.mimeType!=this.mimeType&&a.desc.mimeType!=this.libraryMimeType,l=!0,m=null;try{m=window.setTimeout(mxUtils.bind(this,function(){l=!1;t({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),3*this.ui.timeout)}catch(W){}this.executeRequest(this.createUploadRequest(a.getId(),B,c,d||b||k,f,b?null:g,x),mxUtils.bind(this,function(a){window.clearTimeout(m);l&&F(a)}),mxUtils.bind(this,function(b){window.clearTimeout(m);if(l){a.saveLevel=6;try{a.isConflict(b)?this.executeRequest({url:"/files/"+
+a.getId()+"?supportsAllDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(c){a.saveLevel=7;try{if(null!=c&&c.etag==g)if(n<this.staleEtagMaxRetries){n++;var d=2*n*this.coolOff*(1+.1*(Math.random()-.5));window.setTimeout(p,d);"1"==urlParams.test&&EditorUi.debug("DriveClient: Stale Etag Detected","retry",n,"delay",d)}else{p(!0);try{EditorUi.logEvent({category:"STALE-ETAG-SAVE-FILE-"+a.getHash(),action:"rev_"+a.desc.headRevisionId+"-mod_"+a.desc.modifiedDate+"-size_"+a.getSize()+"-mime_"+
+a.desc.mimeType+(this.ui.editor.autosave?"":"-nosave")+(a.isAutosave()?"":"-noauto")+(a.changeListenerEnabled?"":"-nolisten")+(a.inConflictState?"-conflict":"")+(a.invalidChecksum?"-invalid":""),label:(null!=this.user?"user_"+this.user.id:"nouser")+(null!=a.sync?"-client_"+a.sync.clientId:"-nosync")})}catch(ba){}}else"1"==urlParams.test&&c.headRevisionId==q&&EditorUi.debug("DriveClient: Remote Etag Changed","local",g,"remote",c.etag,"rev",a.desc.headRevisionId,"response",[c],"file",[a]),t(b,c)}catch(ba){e(ba)}}),
+mxUtils.bind(this,function(){t(b)})):t(b)}catch(ga){e(ga)}}}))}catch(W){e(W)}}),p=mxUtils.bind(this,function(b){a.saveLevel=9;if(b)m(b);else{var c=!0,d=null;try{d=window.setTimeout(mxUtils.bind(this,function(){c=!1;t({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),3*this.ui.timeout)}catch(V){}this.executeRequest({url:"/files/"+a.getId()+"?supportsAllDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(f){window.clearTimeout(d);if(c){a.saveLevel=10;try{null!=f&&f.headRevisionId==
+q?("1"==urlParams.test&&g!=f.etag&&EditorUi.debug("DriveClient: Preflight Etag Update","from",g,"to",f.etag,"rev",a.desc.headRevisionId,"response",[f],"file",[a]),g=f.etag,m(b)):t({error:{code:412}},f)}catch(W){e(W)}}}),mxUtils.bind(this,function(b){window.clearTimeout(d);c&&(a.saveLevel=11,t(b))}))}});if(u&&null==b){a.saveLevel=8;var A=new Image;A.onload=mxUtils.bind(this,function(){try{var a=this.thumbnailWidth/A.width,b=document.createElement("canvas");b.width=this.thumbnailWidth;b.height=Math.floor(A.height*
+a);b.getContext("2d").drawImage(A,0,0,b.width,b.height);var c=b.toDataURL(),c=c.substring(c.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_");B.thumbnail={image:c,mimeType:"image/png"};p(!1)}catch(V){try{p(!1)}catch(W){e(W)}}});A.src="data:image/png;base64,"+c}else p(!1)}catch(Y){e(Y)}});u?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){D(a,!0)}),t,this.ui.getCurrentFile()!=a?z:null):D(z,!1)}catch(J){e(J)}});try{a.saveLevel=2,(f||u||a.constructor==DriveLibrary||!this.enableThumbnails||"0"==
+urlParams.thumb||null!=B.mimeType&&"application/vnd.jgraph.mxfile"!=B.mimeType.substring(0,29)||!this.ui.getThumbnail(this.thumbnailWidth,mxUtils.bind(this,function(a){try{var b=null;try{null!=a&&(b=a.toDataURL("image/png")),null!=b&&(b=b.length>this.maxThumbnailSize?null:b.substring(b.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_"))}catch(D){b=null}A(b,"image/png")}catch(D){e(D)}})))&&A(null,null,a.constructor!=DriveLibrary)}catch(z){e(z)}}else this.ui.editor.graph.reset(),t({message:mxResources.get("readOnly")})}catch(z){e(z)}};
DriveClient.prototype.insertFile=function(a,d,c,b,g,f,k){f=null!=f?f:this.xmlMimeType;a={mimeType:f,title:a};null!=c&&(a.parents=[{kind:"drive#fileLink",id:c}]);this.executeRequest(this.createUploadRequest(null,a,d,!1,k),mxUtils.bind(this,function(a){f==this.libraryMimeType?b(new DriveLibrary(this.ui,d,a)):0==a?null!=g&&g({message:mxResources.get("errorSavingFile")}):b(new DriveFile(this.ui,d,a))}),g)};
DriveClient.prototype.createUploadRequest=function(a,d,c,b,g,f,k){g=null!=g?g:!1;var l={"Content-Type":'multipart/mixed; boundary="-------314159265358979323846"'};null!=f&&(l["If-Match"]=f);a={fullUrl:"https://content.googleapis.com/upload/drive/v2/files"+(null!=a?"/"+a:"")+"?uploadType=multipart&supportsAllDrives=true&fields="+this.allFields,method:null!=a?"PUT":"POST",headers:l,params:"\r\n---------314159265358979323846\r\nContent-Type: application/json\r\n\r\n"+JSON.stringify(d)+"\r\n---------314159265358979323846\r\nContent-Type: application/octect-stream\r\nContent-Transfer-Encoding: base64\r\n\r\n"+
(null!=c?g?c:Base64.encode(c):"")+"\r\n---------314159265358979323846--"};b||(a.fullUrl+="&newRevision=false");k&&(a.fullUrl+="&pinned=true");return a};
@@ -9665,7 +9666,7 @@ a.rev+"&chrome=0&nav=1&layers=1&edit=_blank"+(null!=b?"&page="+b:""))+window.loc
DropboxFile.prototype.doSave=function(a,d,c,b,g,f){var k=this.stat.name;this.stat.name=a;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.stat.name=k;this.saveFile(a,d,c,b,g,f)}),b,g,f])};
DropboxFile.prototype.saveFile=function(a,d,c,b){this.isEditable()?this.savingFile?null!=b&&b({code:App.ERROR_BUSY}):(d=mxUtils.bind(this,function(d){if(d){var f=null,g=null;try{f=this.isModified;g=this.isModified();this.savingFile=!0;this.savingFileTime=new Date;var l=mxUtils.bind(this,function(){this.setModified(!1);this.isModified=function(){return g}});l();var n=mxUtils.bind(this,function(d){var e=this.stat.path_display.lastIndexOf("/"),e=1<e?this.stat.path_display.substring(1,e+1):null;this.ui.dropbox.saveFile(a,
d,mxUtils.bind(this,function(a){this.savingFile=!1;this.isModified=f;this.stat=a;this.contentChanged();null!=c&&c()}),mxUtils.bind(this,function(a){this.savingFile=!1;this.isModified=f;this.setModified(g||this.isModified());if(null!=b){if(null!=a&&null!=a.retry){var c=a.retry;a.retry=function(){l();c()}}b(a)}}),e)});this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle())?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){n(this.ui.base64ToBlob(a,"image/png"))}),b,this.ui.getCurrentFile()!=
-this?this.getData():null):n(this.getData())}catch(u){if(this.savingFile=!1,null!=f&&(this.isModified=f),null!=g&&this.setModified(g||this.isModified()),null!=b)b(u);else throw u;}}else null!=b&&b()}),this.getTitle()==a?d(!0):this.ui.dropbox.checkExists(a,d)):null!=c&&c()};
+this?this.getData():null):n(this.getData())}catch(t){if(this.savingFile=!1,null!=f&&(this.isModified=f),null!=g&&this.setModified(g||this.isModified()),null!=b)b(t);else throw t;}}else null!=b&&b()}),this.getTitle()==a?d(!0):this.ui.dropbox.checkExists(a,d)):null!=c&&c()};
DropboxFile.prototype.rename=function(a,d,c){this.ui.dropbox.renameFile(this,a,mxUtils.bind(this,function(b){this.hasSameExtension(a,this.getTitle())?(this.stat=b,this.descriptorChanged(),null!=d&&d()):(this.stat=b,this.descriptorChanged(),this.save(!0,d,c))}),c)};DropboxLibrary=function(a,d,c){DropboxFile.call(this,a,d,c)};mxUtils.extend(DropboxLibrary,DropboxFile);DropboxLibrary.prototype.isAutosave=function(){return!0};DropboxLibrary.prototype.doSave=function(a,d,c){this.saveFile(a,!1,d,c)};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=".drawio";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,d,c){var b=!0,g=window.setTimeout(mxUtils.bind(this,function(){b=!1;d({code:App.ERROR_TIMEOUT})}),this.ui.timeout),f=this.client.usersGetCurrentAccount();f.then(mxUtils.bind(this,function(c){window.clearTimeout(g);b&&(this.setUser(new DrawioUser(c.account_id,c.email,c.name.display_name)),a())}));f["catch"](mxUtils.bind(this,function(f){window.clearTimeout(g);b&&(null==f||401!==f.status||c?d({message:mxResources.get("accessDenied")}):(this.setUser(null),
@@ -9676,8 +9677,8 @@ DropboxClient.prototype.executePromise=function(a,d,c){var b=mxUtils.bind(this,f
f?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){g(!0)},c)})}):this.authenticate(function(){b(!0)},c)))}))}),g=mxUtils.bind(this,function(a){null==this.user?this.updateUser(function(){g(!0)},c,a):b(a)});null===this.client.getAccessToken()?this.authenticate(function(){g(!0)},c):g(!1)};DropboxClient.prototype.getLibrary=function(a,d,c){this.getFile(a,d,c,!0)};
DropboxClient.prototype.getFile=function(a,d,c,b){b=null!=b?b:!1;var g=/\.png$/i.test(a);if(/^https:\/\//i.test(a)||/\.v(dx|sdx?)$/i.test(a)||/\.gliffy$/i.test(a)||/\.pdf$/i.test(a)||!this.ui.useCanvasForExport&&g){var f=mxUtils.bind(this,function(){var b=a.split("/");this.ui.convertFile(a,0<b.length?b[b.length-1]:a,null,this.extension,d,c)});null!=this.token?f():this.authenticate(f,c)}else f={path:"/"+a},null!=urlParams.rev&&(f.rev=urlParams.rev),this.readFile(f,mxUtils.bind(this,function(c,f){var k=
g?c.lastIndexOf(","):-1,l=null;0<k&&(k=this.ui.extractGraphModelFromPng(c.substring(k+1)),null!=k&&0<k.length?c=k:l=new LocalFile(this,c,a,!0));d(null!=l?l:b?new DropboxLibrary(this.ui,c,f):new DropboxFile(this.ui,c,f))}),c,g)};
-DropboxClient.prototype.readFile=function(a,d,c,b){var g=mxUtils.bind(this,function(k){var l=!0,n=window.setTimeout(mxUtils.bind(this,function(){l=!1;c({code:App.ERROR_TIMEOUT})}),this.ui.timeout),u=this.client.filesGetMetadata({path:"/"+a.path.substring(1),include_deleted:!1});u.then(mxUtils.bind(this,function(a){}));u["catch"](function(a){window.clearTimeout(n);l&&null!=a&&409==a.status&&(l=!1,c({message:mxResources.get("fileNotFound")}))});u=this.client.filesDownload(a);u.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){d(e.result,a)});b?e.readAsDataURL(a.fileBlob):e.readAsText(a.fileBlob)}catch(p){c(p)}}}));u["catch"](mxUtils.bind(this,function(a){window.clearTimeout(n);l&&(l=!1,null==a||500!=a.status&&400!=a.status&&401!=a.status?c({message:mxResources.get("error")+" "+a.status}):(this.client.setAccessToken(null),this.setUser(null),k?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){f(!0)},
+DropboxClient.prototype.readFile=function(a,d,c,b){var g=mxUtils.bind(this,function(k){var l=!0,n=window.setTimeout(mxUtils.bind(this,function(){l=!1;c({code:App.ERROR_TIMEOUT})}),this.ui.timeout),t=this.client.filesGetMetadata({path:"/"+a.path.substring(1),include_deleted:!1});t.then(mxUtils.bind(this,function(a){}));t["catch"](function(a){window.clearTimeout(n);l&&null!=a&&409==a.status&&(l=!1,c({message:mxResources.get("fileNotFound")}))});t=this.client.filesDownload(a);t.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){d(e.result,a)});b?e.readAsDataURL(a.fileBlob):e.readAsText(a.fileBlob)}catch(p){c(p)}}}));t["catch"](mxUtils.bind(this,function(a){window.clearTimeout(n);l&&(l=!1,null==a||500!=a.status&&400!=a.status&&401!=a.status?c({message:mxResources.get("error")+" "+a.status}):(this.client.setAccessToken(null),this.setUser(null),k?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){f(!0)},
c)})}):this.authenticate(function(){g(!0)},c)))}))}),f=mxUtils.bind(this,function(a){null==this.user?this.updateUser(function(){f(!0)},c,a):g(a)});null===this.client.getAccessToken()?this.authenticate(function(){f(!0)},c):f(!1)};
DropboxClient.prototype.checkExists=function(a,d,c){var b=this.client.filesGetMetadata({path:"/"+a.toLowerCase(),include_deleted:!1});this.executePromise(b,mxUtils.bind(this,function(b){c?d(!1,!0,b):this.ui.confirm(mxResources.get("replaceIt",[a]),function(){d(!0,!0,b)},function(){d(!1,!0,b)})}),function(a){d(!0,!1)})};
DropboxClient.prototype.renameFile=function(a,d,c,b){if(/[\\\/:\?\*"\|]/.test(d))b({message:mxResources.get("dropboxCharsNotAllowed")});else{if(null!=a&&null!=d){var g=a.stat.path_display.substring(1),f=g.lastIndexOf("/");0<f&&(d=g.substring(0,f+1)+d)}null!=a&&null!=d&&a.stat.path_lower.substring(1)!==d.toLowerCase()?this.checkExists(d,mxUtils.bind(this,function(f,g,n){f?(f=mxUtils.bind(this,function(f){f=this.client.filesMove({from_path:a.stat.path_display,to_path:"/"+d,autorename:!1});this.executePromise(f,
@@ -9720,18 +9721,18 @@ a();return}}catch(f){}d({message:mxResources.get("unknownError")+" (Code: "+c.ge
OneDriveClient.prototype.executeRequest=function(a,d,c){var b=mxUtils.bind(this,function(g){var f=!0,k=window.setTimeout(mxUtils.bind(this,function(){f=!1;c({code:App.ERROR_TIMEOUT,retry:b})}),this.ui.timeout);this.get(a,mxUtils.bind(this,function(a){window.clearTimeout(k);f&&(200<=a.getStatus()&&299>=a.getStatus()||404==a.getStatus()?(null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0),d(a)):g||401!==a.getStatus()&&400!==a.getStatus()?c(this.parseRequestText(a)):this.authenticate(function(){b(!0)},
c,g))}),c)});null==this.token||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){b(!0)},c):b(!1)};OneDriveClient.prototype.checkToken=function(a){null==this.token||null==this.tokenRefreshThread||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(a,this.emptyFn):a()};OneDriveClient.prototype.getItemRef=function(a){var d=a.split("/");return 1<d.length?{driveId:d[0],id:d[1]}:{id:a}};
OneDriveClient.prototype.getItemURL=function(a,d){var c=a.split("/");return 1<c.length?(d?"":this.baseUrl)+"/drives/"+c[0]+"/items/"+c[1]:(d?"":this.baseUrl)+"/me/drive/items/"+a};OneDriveClient.prototype.getLibrary=function(a,d,c){this.getFile(a,d,c,!1,!0)};
-OneDriveClient.prototype.getFile=function(a,d,c,b,g){g=null!=g?g:!1;this.executeRequest(this.getItemURL(a),mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){var b=JSON.parse(a.getText()),f=/\.png$/i.test(b.name);if(/\.v(dx|sdx?)$/i.test(b.name)||/\.gliffy$/i.test(b.name)||/\.pdf$/i.test(b.name)||!this.ui.useCanvasForExport&&f)this.ui.convertFile(b["@microsoft.graph.downloadUrl"],b.name,null!=b.file?b.file.mimeType:null,this.extension,d,c);else{var n=!0,u=window.setTimeout(mxUtils.bind(this,
-function(){n=!1;c({code:App.ERROR_TIMEOUT})}),this.ui.timeout);this.ui.loadUrl(b["@microsoft.graph.downloadUrl"],mxUtils.bind(this,function(a){try{if(window.clearTimeout(u),n){var e=f?a.lastIndexOf(","):-1,k=null;if(0<e){var l=this.ui.extractGraphModelFromPng(a.substring(e+1));null!=l&&0<l.length?a=l:k=new LocalFile(this.ui,a,b.name,!0)}else if("data:image/png;base64,PG14ZmlsZS"==a.substring(0,32)){var t=a.substring(22);a=window.atob&&!mxClient.IS_SF?atob(t):Base64.decode(t)}Graph.fileSupport&&(new XMLHttpRequest).upload&&
-this.ui.isRemoteFileFormat(a,b["@microsoft.graph.downloadUrl"])?this.ui.parseFile(new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){try{4==a.readyState&&(200<=a.status&&299>=a.status?d(new LocalFile(this.ui,a.responseText,b.name+this.extension,!0)):null!=c&&c({message:mxResources.get("errorLoadingFile")}))}catch(z){if(null!=c)c(z);else throw z;}}),b.name):null!=k?d(k):g?d(new OneDriveLibrary(this.ui,a,b)):d(new OneDriveFile(this.ui,a,b))}}catch(v){if(null!=c)c(v);else throw v;
-}}),mxUtils.bind(this,function(a){window.clearTimeout(u);n&&c(this.parseRequestText(a))}),f||null!=b.file&&null!=b.file.mimeType&&("image/"==b.file.mimeType.substring(0,6)||"application/pdf"==b.file.mimeType))}}else c(this.parseRequestText(a))}),c)};
+OneDriveClient.prototype.getFile=function(a,d,c,b,g){g=null!=g?g:!1;this.executeRequest(this.getItemURL(a),mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){var b=JSON.parse(a.getText()),f=/\.png$/i.test(b.name);if(/\.v(dx|sdx?)$/i.test(b.name)||/\.gliffy$/i.test(b.name)||/\.pdf$/i.test(b.name)||!this.ui.useCanvasForExport&&f)this.ui.convertFile(b["@microsoft.graph.downloadUrl"],b.name,null!=b.file?b.file.mimeType:null,this.extension,d,c);else{var n=!0,t=window.setTimeout(mxUtils.bind(this,
+function(){n=!1;c({code:App.ERROR_TIMEOUT})}),this.ui.timeout);this.ui.loadUrl(b["@microsoft.graph.downloadUrl"],mxUtils.bind(this,function(a){try{if(window.clearTimeout(t),n){var e=f?a.lastIndexOf(","):-1,k=null;if(0<e){var l=this.ui.extractGraphModelFromPng(a.substring(e+1));null!=l&&0<l.length?a=l:k=new LocalFile(this.ui,a,b.name,!0)}else if("data:image/png;base64,PG14ZmlsZS"==a.substring(0,32)){var q=a.substring(22);a=window.atob&&!mxClient.IS_SF?atob(q):Base64.decode(q)}Graph.fileSupport&&(new XMLHttpRequest).upload&&
+this.ui.isRemoteFileFormat(a,b["@microsoft.graph.downloadUrl"])?this.ui.parseFile(new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){try{4==a.readyState&&(200<=a.status&&299>=a.status?d(new LocalFile(this.ui,a.responseText,b.name+this.extension,!0)):null!=c&&c({message:mxResources.get("errorLoadingFile")}))}catch(y){if(null!=c)c(y);else throw y;}}),b.name):null!=k?d(k):g?d(new OneDriveLibrary(this.ui,a,b)):d(new OneDriveFile(this.ui,a,b))}}catch(u){if(null!=c)c(u);else throw u;
+}}),mxUtils.bind(this,function(a){window.clearTimeout(t);n&&c(this.parseRequestText(a))}),f||null!=b.file&&null!=b.file.mimeType&&("image/"==b.file.mimeType.substring(0,6)||"application/pdf"==b.file.mimeType))}}else c(this.parseRequestText(a))}),c)};
OneDriveClient.prototype.renameFile=function(a,d,c,b){null!=a&&null!=d&&(this.isValidFilename(d)?this.checkExists(a.getParentId(),d,!1,mxUtils.bind(this,function(g){g?this.writeFile(this.getItemURL(a.getId()),JSON.stringify({name:d}),"PATCH","application/json",c,b):b()})):b({message:this.invalidFilenameRegExs[0].test(d)?mxResources.get("oneDriveCharsNotAllowed"):mxResources.get("oneDriveInvalidDeviceName")}))};
OneDriveClient.prototype.moveFile=function(a,d,c,b){d=this.getItemRef(d);var g=this.getItemRef(a);d.driveId!=g.driveId?b({message:mxResources.get("cannotMoveOneDrive",null,"Moving a file between accounts is not supported yet.")}):this.writeFile(this.getItemURL(a),JSON.stringify({parentReference:d}),"PATCH","application/json",c,b)};OneDriveClient.prototype.insertLibrary=function(a,d,c,b,g){this.insertFile(a,d,c,b,!0,g)};
OneDriveClient.prototype.insertFile=function(a,d,c,b,g,f){this.isValidFilename(a)?(g=null!=g?g:!1,this.checkExists(f,a,!0,mxUtils.bind(this,function(k){k?(k="/me/drive/root",null!=f&&(k=this.getItemURL(f,!0)),k=this.baseUrl+k+"/children/"+encodeURIComponent(a)+"/content",this.writeFile(k,d,"PUT",null,mxUtils.bind(this,function(a){g?c(new OneDriveLibrary(this.ui,d,a)):c(new OneDriveFile(this.ui,d,a))}),b)):b()}))):b({message:this.invalidFilenameRegExs[0].test(a)?mxResources.get("oneDriveCharsNotAllowed"):
mxResources.get("oneDriveInvalidDeviceName")})};
OneDriveClient.prototype.checkExists=function(a,d,c,b){var g="/me/drive/root";null!=a&&(g=this.getItemURL(a,!0));this.executeRequest(this.baseUrl+g+"/children/"+encodeURIComponent(d),mxUtils.bind(this,function(a){404==a.getStatus()?b(!0):c?(this.ui.spinner.stop(),this.ui.confirm(mxResources.get("replaceIt",[d]),function(){b(!0)},function(){b(!1)})):(this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){b(!1)}))}),function(a){b(!1)},
!0)};OneDriveClient.prototype.saveFile=function(a,d,c,b){try{var g=a.getData(),f=mxUtils.bind(this,function(f){var k=this.getItemURL(a.getId());this.writeFile(k+"/content/",f,"PUT",null,mxUtils.bind(this,function(a){d(a,g)}),c,b)});this.ui.useCanvasForExport&&/(\.png)$/i.test(a.meta.name)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){f(this.ui.base64ToBlob(a,"image/png"))}),c,this.ui.getCurrentFile()!=a?g:null):f(g)}catch(k){c(k)}};
-OneDriveClient.prototype.writeFile=function(a,d,c,b,g,f,k){try{if(null!=a&&null!=d)if(4E6<=d.length)f({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(d.length)+" / 4 MB)"});else{var l=mxUtils.bind(this,function(n){try{var u=!0,e=null;try{e=window.setTimeout(mxUtils.bind(this,function(){u=!1;f({code:App.ERROR_TIMEOUT,retry:l})}),this.ui.timeout)}catch(p){}var m=new mxXmlRequest(a,d,c);m.setRequestHeaders=mxUtils.bind(this,function(a,c){a.setRequestHeader("Content-Type",b||" ");
-a.setRequestHeader("Authorization","Bearer "+this.token);null!=k&&a.setRequestHeader("If-Match",k)});m.send(mxUtils.bind(this,function(a){window.clearTimeout(e);u&&(200<=a.getStatus()&&299>=a.getStatus()?(null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0),g(JSON.parse(a.getText()))):n||401!==a.getStatus()?f(this.parseRequestText(a),a):this.authenticate(function(){l(!0)},f,n))}),mxUtils.bind(this,function(a){window.clearTimeout(e);u&&f(this.parseRequestText(a))}))}catch(p){f(p)}});null==
+OneDriveClient.prototype.writeFile=function(a,d,c,b,g,f,k){try{if(null!=a&&null!=d)if(4E6<=d.length)f({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(d.length)+" / 4 MB)"});else{var l=mxUtils.bind(this,function(n){try{var t=!0,e=null;try{e=window.setTimeout(mxUtils.bind(this,function(){t=!1;f({code:App.ERROR_TIMEOUT,retry:l})}),this.ui.timeout)}catch(p){}var m=new mxXmlRequest(a,d,c);m.setRequestHeaders=mxUtils.bind(this,function(a,c){a.setRequestHeader("Content-Type",b||" ");
+a.setRequestHeader("Authorization","Bearer "+this.token);null!=k&&a.setRequestHeader("If-Match",k)});m.send(mxUtils.bind(this,function(a){window.clearTimeout(e);t&&(200<=a.getStatus()&&299>=a.getStatus()?(null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0),g(JSON.parse(a.getText()))):n||401!==a.getStatus()?f(this.parseRequestText(a),a):this.authenticate(function(){l(!0)},f,n))}),mxUtils.bind(this,function(a){window.clearTimeout(e);t&&f(this.parseRequestText(a))}))}catch(p){f(p)}});null==
this.token||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){l(!0)},f):l(!1)}else f({message:mxResources.get("unknownError")})}catch(n){f(n)}};OneDriveClient.prototype.parseRequestText=function(a){var d={message:mxResources.get("unknownError")};try{d=JSON.parse(a.getText())}catch(c){}return d};OneDriveClient.prototype.pickLibrary=function(a){this.pickFile(function(d){a(d)})};
OneDriveClient.prototype.pickFolder=function(a,d){var c=mxUtils.bind(this,function(b){var c=mxUtils.bind(this,function(){OneDrive.save({clientId:this.clientId,action:"query",openInNewWindow:!0,advanced:{endpointHint:mxClient.IS_IE11?null:this.endpointHint,redirectUri:this.pickerRedirectUri,queryParameters:"select=id,name,parentReference",accessToken:this.token,isConsumerAccount:!1},success:mxUtils.bind(this,function(b){a(b);mxClient.IS_IE11&&(this.token=b.accessToken)}),cancel:mxUtils.bind(this,function(){}),
error:mxUtils.bind(this,function(a){this.ui.showError(mxResources.get("error"),a)})})});b?c():this.ui.confirm(mxResources.get("useRootFolder"),mxUtils.bind(this,function(){a({value:[{id:"root",name:"root",parentReference:{driveId:"me"}}]})}),c,mxResources.get("yes"),mxResources.get("noPickFolder")+"...",!0);null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0)});null==this.token||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(mxUtils.bind(this,function(){c(!1)}),this.emptyFn):c(d)};
@@ -9742,43 +9743,43 @@ GitHubFile.prototype.getPublicUrl=function(a){null!=this.meta.download_url?mxUti
GitHubFile.prototype.isRenamable=function(){return!1};GitHubFile.prototype.getLatestVersion=function(a,d){this.peer.getFile(this.getId(),a,d)};GitHubFile.prototype.isCompressedStorage=function(){return!1};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,d){a.sha=d};
GitHubFile.prototype.save=function(a,d,c,b,g,f){this.doSave(this.getTitle(),d,c,b,g,f)};GitHubFile.prototype.saveAs=function(a,d,c){this.doSave(a,d,c)};GitHubFile.prototype.doSave=function(a,d,c,b,g,f){var k=this.meta.name;this.meta.name=a;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.meta.name=k;this.saveFile(a,!1,d,c,b,g,f)}),c,b,g])};
GitHubFile.prototype.saveFile=function(a,d,c,b,g,f,k){if(this.isEditable())if(this.savingFile)null!=b&&b({code:App.ERROR_BUSY});else{var l=mxUtils.bind(this,function(d){if(this.getTitle()==a){var g=null,e=null;try{g=this.isModified;e=this.isModified();this.savingFile=!0;this.savingFileTime=new Date;var k=mxUtils.bind(this,function(){this.setModified(!1);this.isModified=function(){return e}}),l=this.getCurrentEtag(),n=this.data;k();this.peer.saveFile(this,mxUtils.bind(this,function(a){this.savingFile=
-!1;this.isModified=g;this.setDescriptorEtag(this.meta,a);this.fileSaved(n,l,mxUtils.bind(this,function(){this.contentChanged();null!=c&&c()}),b)}),mxUtils.bind(this,function(a){this.savingFile=!1;this.isModified=g;this.setModified(e||this.isModified());if(this.isConflict(a))this.inConflictState=!0,null!=b&&b({commitMessage:d});else if(null!=b){if(null!=a&&null!=a.retry){var c=a.retry;a.retry=function(){k();c()}}b(a)}}),f,d)}catch(t){if(this.savingFile=!1,null!=g&&(this.isModified=g),null!=e&&this.setModified(e||
-this.isModified()),null!=b)b(t);else throw t;}}else this.savingFile=!0,this.savingFileTime=new Date,this.ui.pickFolder(this.getMode(),mxUtils.bind(this,function(e){this.peer.insertFile(a,this.getData(),mxUtils.bind(this,function(a){this.savingFile=!1;null!=c&&c();this.ui.fileLoaded(a)}),mxUtils.bind(this,function(){this.savingFile=!1;null!=b&&b()}),!1,e,d)}))});null!=k?l(k):this.peer.showCommitDialog(this.meta.name,null==this.getDescriptorEtag(this.meta)||this.meta.isNew,mxUtils.bind(this,function(a){l(a)}),
+!1;this.isModified=g;this.setDescriptorEtag(this.meta,a);this.fileSaved(n,l,mxUtils.bind(this,function(){this.contentChanged();null!=c&&c()}),b)}),mxUtils.bind(this,function(a){this.savingFile=!1;this.isModified=g;this.setModified(e||this.isModified());if(this.isConflict(a))this.inConflictState=!0,null!=b&&b({commitMessage:d});else if(null!=b){if(null!=a&&null!=a.retry){var c=a.retry;a.retry=function(){k();c()}}b(a)}}),f,d)}catch(q){if(this.savingFile=!1,null!=g&&(this.isModified=g),null!=e&&this.setModified(e||
+this.isModified()),null!=b)b(q);else throw q;}}else this.savingFile=!0,this.savingFileTime=new Date,this.ui.pickFolder(this.getMode(),mxUtils.bind(this,function(e){this.peer.insertFile(a,this.getData(),mxUtils.bind(this,function(a){this.savingFile=!1;null!=c&&c();this.ui.fileLoaded(a)}),mxUtils.bind(this,function(){this.savingFile=!1;null!=b&&b()}),!1,e,d)}))});null!=k?l(k):this.peer.showCommitDialog(this.meta.name,null==this.getDescriptorEtag(this.meta)||this.meta.isNew,mxUtils.bind(this,function(a){l(a)}),
b)}else null!=c&&c()};GitHubLibrary=function(a,d,c){GitHubFile.call(this,a,d,c)};mxUtils.extend(GitHubLibrary,GitHubFile);GitHubLibrary.prototype.doSave=function(a,d,c){this.saveFile(a,!1,d,c)};GitHubLibrary.prototype.open=function(){};GitHubClient=function(a,d){DrawioClient.call(this,a,d||"ghauth")};mxUtils.extend(GitHubClient,DrawioClient);GitHubClient.prototype.clientId="test.draw.io"==window.location.hostname?"23bc97120b9035515661":"89c9e4624ca416554489";GitHubClient.prototype.scope="repo";GitHubClient.prototype.extension=".drawio";GitHubClient.prototype.baseUrl="https://api.github.com";GitHubClient.prototype.maxFileSize=1E6;GitHubClient.prototype.authToken="token";
GitHubClient.prototype.updateUser=function(a,d,c){var b=!0,g=window.setTimeout(mxUtils.bind(this,function(){b=!1;d({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout),f=new mxXmlRequest(this.baseUrl+"/user",null,"GET"),k=this.authToken+" "+this.token;f.setRequestHeaders=function(a,b){a.setRequestHeader("Authorization",k)};f.send(mxUtils.bind(this,function(){window.clearTimeout(g);b&&(401===f.getStatus()?c?d({message:mxResources.get("accessDenied")}):(this.logout(),this.authenticate(mxUtils.bind(this,
function(){this.updateUser(a,d,!0)}),d)):200>f.getStatus()||300<=f.getStatus()?d({message:mxResources.get("accessDenied")}):(this.setUser(this.createUser(JSON.parse(f.getText()))),a()))}),d)};GitHubClient.prototype.createUser=function(a){return new DrawioUser(a.id,a.email,a.name)};
GitHubClient.prototype.authenticate=function(a,d){if(null==window.onGitHubCallback){var c=mxUtils.bind(this,function(){var b=!0;this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(g,f){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(b)if(window.onGitHubCallback=null,b=!1,null==k)d({message:mxResources.get("accessDenied"),retry:c});else{var n=mxUtils.bind(this,function(){var b=
-!0,c=window.setTimeout(mxUtils.bind(this,function(){b=!1;d({code:App.ERROR_TIMEOUT,retry:n})}),this.ui.timeout);mxUtils.get("/github?client_id="+this.clientId+"&code="+k,mxUtils.bind(this,function(e){window.clearTimeout(c);if(b)try{if(200>e.getStatus()||300<=e.getStatus())d({message:mxResources.get("cannotLogin")});else{null!=f&&f();var k=e.getText();this.token=k.substring(k.indexOf("=")+1,k.indexOf("&"));this.setUser(null);g&&this.setPersistentToken(this.token);a()}}catch(q){d(q)}finally{null!=l&&
+!0,c=window.setTimeout(mxUtils.bind(this,function(){b=!1;d({code:App.ERROR_TIMEOUT,retry:n})}),this.ui.timeout);mxUtils.get("/github?client_id="+this.clientId+"&code="+k,mxUtils.bind(this,function(e){window.clearTimeout(c);if(b)try{if(200>e.getStatus()||300<=e.getStatus())d({message:mxResources.get("cannotLogin")});else{null!=f&&f();var k=e.getText();this.token=k.substring(k.indexOf("=")+1,k.indexOf("&"));this.setUser(null);g&&this.setPersistentToken(this.token);a()}}catch(v){d(v)}finally{null!=l&&
l.close()}}))});n()}else null!=l&&l.close()}):d({message:mxResources.get("serviceUnavailableOrBlocked"),retry:c})}),mxUtils.bind(this,function(){b&&(window.onGitHubCallback=null,b=!1,d({message:mxResources.get("accessDenied"),retry:c}))}))});c()}else d({code:App.ERROR_BUSY})};GitHubClient.prototype.getErrorMessage=function(a,d){try{var c=JSON.parse(a.getText());null!=c&&null!=c.message&&(d=c.message)}catch(b){}return d};
-GitHubClient.prototype.executeRequest=function(a,d,c,b){var g=mxUtils.bind(this,function(k){var l=!0,n=window.setTimeout(mxUtils.bind(this,function(){l=!1;c({code:App.ERROR_TIMEOUT,retry:f})}),this.ui.timeout),u=this.authToken+" "+this.token;a.setRequestHeaders=function(a,b){a.setRequestHeader("Authorization",u)};a.send(mxUtils.bind(this,function(){window.clearTimeout(n);if(l)if(200<=a.getStatus()&&299>=a.getStatus()||b&&404==a.getStatus())d(a);else if(401===a.getStatus())k?c({code:a.getStatus(),
+GitHubClient.prototype.executeRequest=function(a,d,c,b){var g=mxUtils.bind(this,function(k){var l=!0,n=window.setTimeout(mxUtils.bind(this,function(){l=!1;c({code:App.ERROR_TIMEOUT,retry:f})}),this.ui.timeout),t=this.authToken+" "+this.token;a.setRequestHeaders=function(a,b){a.setRequestHeader("Authorization",t)};a.send(mxUtils.bind(this,function(){window.clearTimeout(n);if(l)if(200<=a.getStatus()&&299>=a.getStatus()||b&&404==a.getStatus())d(a);else if(401===a.getStatus())k?c({code:a.getStatus(),
message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){f(!0)},c)})}):this.authenticate(function(){g(!0)},c);else if(403===a.getStatus()){var e=!1;try{var m=JSON.parse(a.getText());null!=m&&null!=m.errors&&0<m.errors.length&&(e="too_large"==m.errors[0].code)}catch(p){}c({message:mxResources.get(e?"drawingTooLarge":"forbidden")})}else 404===a.getStatus()?c({code:a.getStatus(),message:this.getErrorMessage(a,mxResources.get("fileNotFound"))}):409===a.getStatus()?
c({code:a.getStatus(),status:409}):c({code:a.getStatus(),message:this.getErrorMessage(a,mxResources.get("error")+" "+a.getStatus())})}),c)}),f=mxUtils.bind(this,function(a){null==this.user?this.updateUser(function(){f(!0)},c,a):g(a)});null==this.token?this.authenticate(function(){f(!0)},c):f(!1)};GitHubClient.prototype.getLibrary=function(a,d,c){this.getFile(a,d,c,!0)};
GitHubClient.prototype.getSha=function(a,d,c,b,g,f){var k="&t="+(new Date).getTime();a=new mxXmlRequest(this.baseUrl+"/repos/"+a+"/"+d+"/contents/"+c+"?ref="+b+k,null,"HEAD");this.executeRequest(a,mxUtils.bind(this,function(a){try{g(a.request.getResponseHeader("Etag").match(/"([^"]+)"/)[1])}catch(n){f(n)}}),f)};
-GitHubClient.prototype.getFile=function(a,d,c,b,g){b=null!=b?b:!1;var f=a.split("/"),k=f[0],l=f[1],n=f[2];a=f.slice(3,f.length).join("/");f=/\.png$/i.test(a);if(!g&&(/\.v(dx|sdx?)$/i.test(a)||/\.gliffy$/i.test(a)||/\.pdf$/i.test(a)||!this.ui.useCanvasForExport&&f))if(null!=this.token){g=this.baseUrl+"/repos/"+k+"/"+l+"/contents/"+a+"?ref="+n;var u={Authorization:"token "+this.token},f=a.split("/");this.ui.convertFile(g,0<f.length?f[f.length-1]:a,null,this.extension,d,c,null,u)}else c({message:mxResources.get("accessDenied")});
+GitHubClient.prototype.getFile=function(a,d,c,b,g){b=null!=b?b:!1;var f=a.split("/"),k=f[0],l=f[1],n=f[2];a=f.slice(3,f.length).join("/");f=/\.png$/i.test(a);if(!g&&(/\.v(dx|sdx?)$/i.test(a)||/\.gliffy$/i.test(a)||/\.pdf$/i.test(a)||!this.ui.useCanvasForExport&&f))if(null!=this.token){g=this.baseUrl+"/repos/"+k+"/"+l+"/contents/"+a+"?ref="+n;var t={Authorization:"token "+this.token},f=a.split("/");this.ui.convertFile(g,0<f.length?f[f.length-1]:a,null,this.extension,d,c,null,t)}else c({message:mxResources.get("accessDenied")});
else f="&t="+(new Date).getTime(),a=new mxXmlRequest(this.baseUrl+"/repos/"+k+"/"+l+"/contents/"+a+"?ref="+n+f,null,"GET"),this.executeRequest(a,mxUtils.bind(this,function(a){try{d(this.createGitHubFile(k,l,n,JSON.parse(a.getText()),b))}catch(m){c(m)}}),c)};
GitHubClient.prototype.createGitHubFile=function(a,d,c,b,g){a={org:a,repo:d,ref:c,name:b.name,path:b.path,sha:b.sha,html_url:b.html_url,download_url:b.download_url};d=b.content;"base64"===b.encoding&&(/\.jpe?g$/i.test(b.name)?d="data:image/jpeg;base64,"+d:/\.gif$/i.test(b.name)?d="data:image/gif;base64,"+d:/\.png$/i.test(b.name)?(b=this.ui.extractGraphModelFromPng(d),d=null!=b&&0<b.length?b:"data:image/png;base64,"+d):d=Base64.decode(d));return g?new GitHubLibrary(this.ui,d,a):new GitHubFile(this.ui,
d,a)};GitHubClient.prototype.insertLibrary=function(a,d,c,b,g){this.insertFile(a,d,c,b,!0,g,!1)};
-GitHubClient.prototype.insertFile=function(a,d,c,b,g,f,k){g=null!=g?g:!1;f=f.split("/");var l=f[0],n=f[1],u=f[2],e=f.slice(3,f.length).join("/");0<e.length&&(e+="/");e+=a;this.checkExists(l+"/"+n+"/"+u+"/"+e,!0,mxUtils.bind(this,function(f,p){f?g?(k||(d=Base64.encode(d)),this.showCommitDialog(a,!0,mxUtils.bind(this,function(a){this.writeFile(l,n,u,e,a,d,p,mxUtils.bind(this,function(a){try{var d=JSON.parse(a.getText());c(this.createGitHubFile(l,n,u,d.content,g))}catch(z){b(z)}}),b)}),b)):c(new GitHubFile(this.ui,
-d,{org:l,repo:n,ref:u,name:a,path:e,sha:p,isNew:!0})):b()}))};GitHubClient.prototype.showCommitDialog=function(a,d,c,b){var g=this.ui.spinner.pause();a=new FilenameDialog(this.ui,mxResources.get(d?"addedFile":"updateFile",[a]),mxResources.get("ok"),mxUtils.bind(this,function(a){g();c(a)}),mxResources.get("commitMessage"),null,null,null,null,mxUtils.bind(this,function(){b()}),null,280);this.ui.showDialog(a.container,400,80,!0,!1);a.init()};
+GitHubClient.prototype.insertFile=function(a,d,c,b,g,f,k){g=null!=g?g:!1;f=f.split("/");var l=f[0],n=f[1],t=f[2],e=f.slice(3,f.length).join("/");0<e.length&&(e+="/");e+=a;this.checkExists(l+"/"+n+"/"+t+"/"+e,!0,mxUtils.bind(this,function(f,p){f?g?(k||(d=Base64.encode(d)),this.showCommitDialog(a,!0,mxUtils.bind(this,function(a){this.writeFile(l,n,t,e,a,d,p,mxUtils.bind(this,function(a){try{var d=JSON.parse(a.getText());c(this.createGitHubFile(l,n,t,d.content,g))}catch(y){b(y)}}),b)}),b)):c(new GitHubFile(this.ui,
+d,{org:l,repo:n,ref:t,name:a,path:e,sha:p,isNew:!0})):b()}))};GitHubClient.prototype.showCommitDialog=function(a,d,c,b){var g=this.ui.spinner.pause();a=new FilenameDialog(this.ui,mxResources.get(d?"addedFile":"updateFile",[a]),mxResources.get("ok"),mxUtils.bind(this,function(a){g();c(a)}),mxResources.get("commitMessage"),null,null,null,null,mxUtils.bind(this,function(){b()}),null,280);this.ui.showDialog(a.container,400,80,!0,!1);a.init()};
GitHubClient.prototype.writeFile=function(a,d,c,b,g,f,k,l,n){f.length>=this.maxFileSize?n({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(f.length)+" / 1 MB)"}):(c={path:b,branch:decodeURIComponent(c),message:g,content:f},null!=k&&(c.sha=k),a=new mxXmlRequest(this.baseUrl+"/repos/"+a+"/"+d+"/contents/"+b,JSON.stringify(c),"PUT"),this.executeRequest(a,mxUtils.bind(this,function(a){l(a)}),mxUtils.bind(this,function(a){404==a.code&&(a.helpLink="https://github.com/settings/connections/applications/"+
this.clientId,a.code=null);n(a)})))};
GitHubClient.prototype.checkExists=function(a,d,c){var b=a.split("/"),g=b[0],f=b[1],k=b[2];a=b.slice(3,b.length).join("/");this.getSha(g,f,a,k,mxUtils.bind(this,function(b){if(d){var f=this.ui.spinner.pause();this.ui.confirm(mxResources.get("replaceIt",[a]),function(){f();c(!0,b)},function(){f();c(!1)})}else this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){c(!1)})}),mxUtils.bind(this,function(a){c(!0)}),null,!0)};
-GitHubClient.prototype.saveFile=function(a,d,c,b,g){var f=a.meta.org,k=a.meta.repo,l=a.meta.ref,n=a.meta.path,u=mxUtils.bind(this,function(b,e){this.writeFile(f,k,l,n,g,e,b,mxUtils.bind(this,function(b){delete a.meta.isNew;d(JSON.parse(b.getText()).content.sha)}),mxUtils.bind(this,function(a){c(a)}))}),e=mxUtils.bind(this,function(){this.ui.useCanvasForExport&&/(\.png)$/i.test(n)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(b){u(a.meta.sha,b)}),c,this.ui.getCurrentFile()!=a?a.getData():null):
-u(a.meta.sha,Base64.encode(a.getData()))});b?this.getSha(f,k,n,l,mxUtils.bind(this,function(b){a.meta.sha=b;e()}),c):e()};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.saveFile=function(a,d,c,b,g){var f=a.meta.org,k=a.meta.repo,l=a.meta.ref,n=a.meta.path,t=mxUtils.bind(this,function(b,e){this.writeFile(f,k,l,n,g,e,b,mxUtils.bind(this,function(b){delete a.meta.isNew;d(JSON.parse(b.getText()).content.sha)}),mxUtils.bind(this,function(a){c(a)}))}),e=mxUtils.bind(this,function(){this.ui.useCanvasForExport&&/(\.png)$/i.test(n)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(b){t(a.meta.sha,b)}),c,this.ui.getCurrentFile()!=a?a.getData():null):
+t(a.meta.sha,Base64.encode(a.getData()))});b?this.getSha(f,k,n,l,mxUtils.bind(this,function(b){a.meta.sha=b;e()}),c):e()};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,d){var c=null,b=null,g=null,f=null,k=document.createElement("div");k.style.whiteSpace="nowrap";k.style.overflow="hidden";k.style.height="304px";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.border="1px solid lightgray";n.style.boxSizing=
-"border-box";n.style.padding="4px";n.style.overflow="auto";n.style.lineHeight="1.2em";n.style.height="274px";k.appendChild(n);var u=document.createElement("div");u.style.textOverflow="ellipsis";u.style.boxSizing="border-box";u.style.overflow="hidden";u.style.padding="4px";u.style.width="100%";var e=new CustomDialog(this.ui,k,mxUtils.bind(this,function(){d(c+"/"+b+"/"+encodeURIComponent(g)+"/"+f)}));this.ui.showDialog(e.container,420,360,!0,!0);a&&e.okButton.parentNode.removeChild(e.okButton);var m=
-mxUtils.bind(this,function(a,b,c){var d=document.createElement("a");d.setAttribute("href","javascript:void(0);");d.setAttribute("title",a);mxUtils.write(d,a);mxEvent.addListener(d,"click",b);null!=c&&(a=u.cloneNode(),a.style.padding=c,a.appendChild(d),d=a);return d}),p=mxUtils.bind(this,function(a){var d=document.createElement("div");d.style.marginBottom="8px";d.appendChild(m(c+"/"+b,mxUtils.bind(this,function(){f=null;C()})));a||(mxUtils.write(d," / "),d.appendChild(m(decodeURIComponent(g),mxUtils.bind(this,
-function(){f=null;y()}))));if(null!=f&&0<f.length){var e=f.split("/");for(a=0;a<e.length;a++)(function(a){mxUtils.write(d," / ");d.appendChild(m(e[a],mxUtils.bind(this,function(){f=e.slice(0,a+1).join("/");z()})))})(a)}n.appendChild(d)}),q=mxUtils.bind(this,function(a){this.ui.handleError(a,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(f=g=b=c=null,C()):this.ui.hideDialog()}))}),t=null,v=null,z=mxUtils.bind(this,function(k){null==k&&(n.innerHTML="",k=1);var l=new mxXmlRequest(this.baseUrl+
-"/repos/"+c+"/"+b+"/contents/"+f+"?ref="+encodeURIComponent(g)+"&per_page=100&page="+k,null,"GET");this.ui.spinner.spin(n,mxResources.get("loading"));e.okButton.removeAttribute("disabled");null!=v&&(mxEvent.removeListener(n,"scroll",v),v=null);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 x=mxUtils.bind(this,function(){z(k+1)});mxEvent.addListener(t,
-"click",x);this.executeRequest(l,mxUtils.bind(this,function(e){this.ui.spinner.stop();1==k&&(p(),n.appendChild(m("../ [Up]",mxUtils.bind(this,function(){if(""==f)f=null,C();else{var a=f.split("/");f=a.slice(0,a.length-1).join("/");z()}}),"4px")));var l=JSON.parse(e.getText());if(null==l||0==l.length)mxUtils.write(n,mxResources.get("noFiles"));else{var x=!0,A=0;e=mxUtils.bind(this,function(e){for(var k=0;k<l.length;k++)mxUtils.bind(this,function(k,l){if(e==("dir"==k.type)){var p=u.cloneNode();p.style.backgroundColor=
-x?"#eeeeee":"";x=!x;var v=document.createElement("img");v.src=IMAGE_PATH+"/"+("dir"==k.type?"folder.png":"file.png");v.setAttribute("align","absmiddle");v.style.marginRight="4px";v.style.marginTop="-4px";v.width=20;p.appendChild(v);p.appendChild(m(k.name+("dir"==k.type?"/":""),mxUtils.bind(this,function(){"dir"==k.type?(f=k.path,z()):a&&"file"==k.type&&(this.ui.hideDialog(),d(c+"/"+b+"/"+encodeURIComponent(g)+"/"+k.path))})));n.appendChild(p);A++}})(l[k],k)});e(!0);a&&e(!1)}}),q,!0)}),y=mxUtils.bind(this,
-function(a){null==a&&(n.innerHTML="",a=1);var d=new mxXmlRequest(this.baseUrl+"/repos/"+c+"/"+b+"/branches?per_page=100&page="+a,null,"GET");e.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(n,mxResources.get("loading"));null!=v&&(mxEvent.removeListener(n,"scroll",v),v=null);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(){y(a+1)});mxEvent.addListener(t,"click",k);this.executeRequest(d,mxUtils.bind(this,function(b){this.ui.spinner.stop();1==a&&(p(!0),n.appendChild(m("../ [Up]",mxUtils.bind(this,function(){f=null;C()}),"4px")));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,b){var c=u.cloneNode();c.style.backgroundColor=0==b%2?"#eeeeee":"";c.appendChild(m(a.name,mxUtils.bind(this,function(){g=
-a.name;f="";z()})));n.appendChild(c)})(b[c],c);100==b.length&&(n.appendChild(t),v=function(){n.scrollTop>=n.scrollHeight-n.offsetHeight&&k()},mxEvent.addListener(n,"scroll",v))}}),q)}),C=mxUtils.bind(this,function(a){null==a&&(n.innerHTML="",a=1);var d=new mxXmlRequest(this.baseUrl+"/user/repos?per_page=100&page="+a,null,"GET");e.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(n,mxResources.get("loading"));null!=v&&mxEvent.removeListener(n,"scroll",v);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(){C(a+1)});mxEvent.addListener(t,"click",k);this.executeRequest(d,mxUtils.bind(this,function(d){this.ui.spinner.stop();d=JSON.parse(d.getText());if(null==d||0==d.length)mxUtils.write(n,mxResources.get("noFiles"));else{1==a&&(n.appendChild(m(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 d=a.split("/");if(1<d.length){a=d[0];var e=d[1];3>d.length?(c=a,b=e,f=g=null,y()):this.ui.spinner.spin(n,mxResources.get("loading"))&&(d=encodeURIComponent(d.slice(2,d.length).join("/")),this.getFile(a+"/"+e+"/"+d,mxUtils.bind(this,function(a){this.ui.spinner.stop();c=a.meta.org;b=a.meta.repo;g=decodeURIComponent(a.meta.ref);f="";z()}),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 e=0;e<d.length;e++)mxUtils.bind(this,function(a,d){var e=u.cloneNode();e.style.backgroundColor=0==d%2?"#eeeeee":"";e.appendChild(m(a.full_name,mxUtils.bind(this,function(){c=a.owner.login;b=a.name;g=a.default_branch;
-f="";z()})));n.appendChild(e)})(d[e],e)}100==d.length&&(n.appendChild(t),v=function(){n.scrollTop>=n.scrollHeight-n.offsetHeight&&k()},mxEvent.addListener(n,"scroll",v))}),q)});C()};GitHubClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);this.token=null};TrelloFile=function(a,d,c){DrawioFile.call(this,a,d);this.meta=c;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};
+"border-box";n.style.padding="4px";n.style.overflow="auto";n.style.lineHeight="1.2em";n.style.height="274px";k.appendChild(n);var t=document.createElement("div");t.style.textOverflow="ellipsis";t.style.boxSizing="border-box";t.style.overflow="hidden";t.style.padding="4px";t.style.width="100%";var e=new CustomDialog(this.ui,k,mxUtils.bind(this,function(){d(c+"/"+b+"/"+encodeURIComponent(g)+"/"+f)}));this.ui.showDialog(e.container,420,360,!0,!0);a&&e.okButton.parentNode.removeChild(e.okButton);var m=
+mxUtils.bind(this,function(a,b,c){var d=document.createElement("a");d.setAttribute("href","javascript:void(0);");d.setAttribute("title",a);mxUtils.write(d,a);mxEvent.addListener(d,"click",b);null!=c&&(a=t.cloneNode(),a.style.padding=c,a.appendChild(d),d=a);return d}),p=mxUtils.bind(this,function(a){var d=document.createElement("div");d.style.marginBottom="8px";d.appendChild(m(c+"/"+b,mxUtils.bind(this,function(){f=null;B()})));a||(mxUtils.write(d," / "),d.appendChild(m(decodeURIComponent(g),mxUtils.bind(this,
+function(){f=null;x()}))));if(null!=f&&0<f.length){var e=f.split("/");for(a=0;a<e.length;a++)(function(a){mxUtils.write(d," / ");d.appendChild(m(e[a],mxUtils.bind(this,function(){f=e.slice(0,a+1).join("/");y()})))})(a)}n.appendChild(d)}),v=mxUtils.bind(this,function(a){this.ui.handleError(a,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(f=g=b=c=null,B()):this.ui.hideDialog()}))}),q=null,u=null,y=mxUtils.bind(this,function(k){null==k&&(n.innerHTML="",k=1);var l=new mxXmlRequest(this.baseUrl+
+"/repos/"+c+"/"+b+"/contents/"+f+"?ref="+encodeURIComponent(g)+"&per_page=100&page="+k,null,"GET");this.ui.spinner.spin(n,mxResources.get("loading"));e.okButton.removeAttribute("disabled");null!=u&&(mxEvent.removeListener(n,"scroll",u),u=null);null!=q&&null!=q.parentNode&&q.parentNode.removeChild(q);q=document.createElement("a");q.style.display="block";q.setAttribute("href","javascript:void(0);");mxUtils.write(q,mxResources.get("more")+"...");var A=mxUtils.bind(this,function(){y(k+1)});mxEvent.addListener(q,
+"click",A);this.executeRequest(l,mxUtils.bind(this,function(e){this.ui.spinner.stop();1==k&&(p(),n.appendChild(m("../ [Up]",mxUtils.bind(this,function(){if(""==f)f=null,B();else{var a=f.split("/");f=a.slice(0,a.length-1).join("/");y()}}),"4px")));var l=JSON.parse(e.getText());if(null==l||0==l.length)mxUtils.write(n,mxResources.get("noFiles"));else{var A=!0,z=0;e=mxUtils.bind(this,function(e){for(var k=0;k<l.length;k++)mxUtils.bind(this,function(k,l){if(e==("dir"==k.type)){var p=t.cloneNode();p.style.backgroundColor=
+A?"#eeeeee":"";A=!A;var u=document.createElement("img");u.src=IMAGE_PATH+"/"+("dir"==k.type?"folder.png":"file.png");u.setAttribute("align","absmiddle");u.style.marginRight="4px";u.style.marginTop="-4px";u.width=20;p.appendChild(u);p.appendChild(m(k.name+("dir"==k.type?"/":""),mxUtils.bind(this,function(){"dir"==k.type?(f=k.path,y()):a&&"file"==k.type&&(this.ui.hideDialog(),d(c+"/"+b+"/"+encodeURIComponent(g)+"/"+k.path))})));n.appendChild(p);z++}})(l[k],k)});e(!0);a&&e(!1)}}),v,!0)}),x=mxUtils.bind(this,
+function(a){null==a&&(n.innerHTML="",a=1);var d=new mxXmlRequest(this.baseUrl+"/repos/"+c+"/"+b+"/branches?per_page=100&page="+a,null,"GET");e.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(n,mxResources.get("loading"));null!=u&&(mxEvent.removeListener(n,"scroll",u),u=null);null!=q&&null!=q.parentNode&&q.parentNode.removeChild(q);q=document.createElement("a");q.style.display="block";q.setAttribute("href","javascript:void(0);");mxUtils.write(q,mxResources.get("more")+"...");var k=
+mxUtils.bind(this,function(){x(a+1)});mxEvent.addListener(q,"click",k);this.executeRequest(d,mxUtils.bind(this,function(b){this.ui.spinner.stop();1==a&&(p(!0),n.appendChild(m("../ [Up]",mxUtils.bind(this,function(){f=null;B()}),"4px")));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,b){var c=t.cloneNode();c.style.backgroundColor=0==b%2?"#eeeeee":"";c.appendChild(m(a.name,mxUtils.bind(this,function(){g=
+a.name;f="";y()})));n.appendChild(c)})(b[c],c);100==b.length&&(n.appendChild(q),u=function(){n.scrollTop>=n.scrollHeight-n.offsetHeight&&k()},mxEvent.addListener(n,"scroll",u))}}),v)}),B=mxUtils.bind(this,function(a){null==a&&(n.innerHTML="",a=1);var d=new mxXmlRequest(this.baseUrl+"/user/repos?per_page=100&page="+a,null,"GET");e.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(n,mxResources.get("loading"));null!=u&&mxEvent.removeListener(n,"scroll",u);null!=q&&null!=q.parentNode&&
+q.parentNode.removeChild(q);q=document.createElement("a");q.style.display="block";q.setAttribute("href","javascript:void(0);");mxUtils.write(q,mxResources.get("more")+"...");var k=mxUtils.bind(this,function(){B(a+1)});mxEvent.addListener(q,"click",k);this.executeRequest(d,mxUtils.bind(this,function(d){this.ui.spinner.stop();d=JSON.parse(d.getText());if(null==d||0==d.length)mxUtils.write(n,mxResources.get("noFiles"));else{1==a&&(n.appendChild(m(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 d=a.split("/");if(1<d.length){a=d[0];var e=d[1];3>d.length?(c=a,b=e,f=g=null,x()):this.ui.spinner.spin(n,mxResources.get("loading"))&&(d=encodeURIComponent(d.slice(2,d.length).join("/")),this.getFile(a+"/"+e+"/"+d,mxUtils.bind(this,function(a){this.ui.spinner.stop();c=a.meta.org;b=a.meta.repo;g=decodeURIComponent(a.meta.ref);f="";y()}),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 e=0;e<d.length;e++)mxUtils.bind(this,function(a,d){var e=t.cloneNode();e.style.backgroundColor=0==d%2?"#eeeeee":"";e.appendChild(m(a.full_name,mxUtils.bind(this,function(){c=a.owner.login;b=a.name;g=a.default_branch;
+f="";y()})));n.appendChild(e)})(d[e],e)}100==d.length&&(n.appendChild(q),u=function(){n.scrollTop>=n.scrollHeight-n.offsetHeight&&k()},mxEvent.addListener(n,"scroll",u))}),v)});B()};GitHubClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);this.token=null};TrelloFile=function(a,d,c){DrawioFile.call(this,a,d);this.meta=c;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,d,c){this.doSave(this.getTitle(),d,c)};TrelloFile.prototype.saveAs=function(a,d,c){this.doSave(a,d,c)};TrelloFile.prototype.doSave=function(a,d,c){var b=this.meta.name;this.meta.name=a;DrawioFile.prototype.save.apply(this,arguments);this.meta.name=b;this.saveFile(a,!1,d,c)};
TrelloFile.prototype.saveFile=function(a,d,c,b){if(this.isEditable())if(this.savingFile)null!=b&&(this.saveNeededCounter++,b({code:App.ERROR_BUSY}));else if(this.savingFile=!0,this.savingFileTime=new Date,this.getTitle()==a){var g=this.isModified,f=this.isModified(),k=mxUtils.bind(this,function(){this.setModified(!1);this.isModified=function(){return f}});k();this.ui.trello.saveFile(this,mxUtils.bind(this,function(f){this.savingFile=!1;this.isModified=g;this.meta=f;this.contentChanged();null!=c&&
c();0<this.saveNeededCounter&&(this.saveNeededCounter--,this.saveFile(a,d,c,b))}),mxUtils.bind(this,function(a){this.savingFile=!1;this.isModified=g;this.setModified(f||this.isModified());if(null!=b){if(null!=a&&null!=a.retry){var c=a.retry;a.retry=function(){k();c()}}b(a)}}))}else this.ui.pickFolder(App.MODE_TRELLO,mxUtils.bind(this,function(f){this.ui.trello.insertFile(a,this.getData(),mxUtils.bind(this,function(f){this.savingFile=!1;null!=c&&c();this.ui.fileLoaded(f);0<this.saveNeededCounter&&
@@ -9791,52 +9792,52 @@ TrelloClient.prototype.insertFile=function(a,d,c,b,g,f){g=null!=g?g:!1;var k=mxU
TrelloClient.prototype.saveFile=function(a,d,c){var b=a.meta.compoundId.split(this.SEPARATOR),g=mxUtils.bind(this,function(g){this.writeFile(a.meta.name,g,b[0],function(a){Trello.del("cards/"+b[0]+"/attachments/"+b[1],mxUtils.bind(this,function(){d(a)}),mxUtils.bind(this,function(a){null!=a&&401==a.status?this.authenticate(f,c,!0):c()}))},c)}),f=mxUtils.bind(this,function(){this.ui.useCanvasForExport&&/(\.png)$/i.test(a.meta.name)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){g(this.ui.base64ToBlob(a,
"image/png"))}),c,this.ui.getCurrentFile()!=a?a.getData():null):g(a.getData())});this.authenticate(f,c)};
TrelloClient.prototype.writeFile=function(a,d,c,b,g){if(null!=a&&null!=d)if(d.length>=this.maxFileSize)g({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(d.length)+" / 10 MB)"});else{var f=mxUtils.bind(this,function(){var k=!0,l=window.setTimeout(mxUtils.bind(this,function(){k=!1;g({code:App.ERROR_TIMEOUT,retry:f})}),this.ui.timeout),n=new FormData;n.append("key",Trello.key());n.append("token",Trello.token());n.append("file","string"===typeof d?new Blob([d]):d,a);n.append("name",
-a);var u=new XMLHttpRequest;u.responseType="json";u.onreadystatechange=mxUtils.bind(this,function(){if(4===u.readyState&&(window.clearTimeout(l),k))if(200==u.status){var a=u.response;a.compoundId=c+this.SEPARATOR+a.id;b(a)}else 401==u.status?this.authenticate(f,g,!0):g()});u.open("POST",this.baseUrl+"cards/"+c+"/attachments");u.send(n)});this.authenticate(f,g)}else g({message:mxResources.get("unknownError")})};TrelloClient.prototype.pickLibrary=function(a){this.pickFile(a)};
+a);var t=new XMLHttpRequest;t.responseType="json";t.onreadystatechange=mxUtils.bind(this,function(){if(4===t.readyState&&(window.clearTimeout(l),k))if(200==t.status){var a=t.response;a.compoundId=c+this.SEPARATOR+a.id;b(a)}else 401==t.status?this.authenticate(f,g,!0):g()});t.open("POST",this.baseUrl+"cards/"+c+"/attachments");t.send(n)});this.authenticate(f,g)}else g({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,d){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,d){var c=null,b="@me",g=0,f=document.createElement("div");f.style.whiteSpace="nowrap";f.style.overflow="hidden";f.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";f.appendChild(k);var l=document.createElement("div");l.style.whiteSpace="nowrap";l.style.overflow="auto";l.style.height=
"194px";f.appendChild(l);f=new CustomDialog(this.ui,f);this.ui.showDialog(f.container,340,270,!0,!0);f.okButton.parentNode.removeChild(f.okButton);var n=mxUtils.bind(this,function(a,b,c){g++;var d=document.createElement("div");d.style="width:100%;text-overflow:ellipsis;overflow:hidden;vertical-align:middle;background:"+(0==g%2?"#eee":"#fff");var e=document.createElement("a");e.setAttribute("href","javascript:void(0);");if(null!=c){var f=document.createElement("img");f.src=c.url;f.width=c.width;f.height=
-c.height;f.style="border: 1px solid black;margin:5px;vertical-align:middle";e.appendChild(f)}mxUtils.write(e,a);mxEvent.addListener(e,"click",b);d.appendChild(e);return d}),u=mxUtils.bind(this,function(a){this.ui.handleError(a,null,mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.hideDialog()}))}),e=mxUtils.bind(this,function(){g=0;l.innerHTML="";this.ui.spinner.spin(l,mxResources.get("loading"));var a=mxUtils.bind(this,function(){Trello.cards.get(c+"/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 b=0;b<a.length;b++)mxUtils.bind(this,function(a){l.appendChild(n(a.name,mxUtils.bind(this,function(){this.ui.hideDialog();d(c+this.SEPARATOR+a.id)}),null!=a.previews?a.previews[0]:null))})(a[b])})()}),mxUtils.bind(this,function(b){401==b.status?this.authenticate(a,u,!0):
-null!=u&&u(b)}))});a()}),m=null,p=null,q=mxUtils.bind(this,function(f){null==f&&(g=0,l.innerHTML="",f=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(f+1)});mxEvent.addListener(m,"click",k);var t=mxUtils.bind(this,function(){Trello.get("search",
-{query:""==mxUtils.trim(b)?"is:open":b,cards_limit:100,cards_page:f-1},mxUtils.bind(this,function(g){this.ui.spinner.stop();g=null!=g?g.cards:null;if(null==g||0==g.length)mxUtils.write(l,mxResources.get("noFiles"));else{1==f&&(l.appendChild(n(mxResources.get("filterCards")+"...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.ui,b,mxResources.get("ok"),mxUtils.bind(this,function(a){null!=a&&(b=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 v=0;v<g.length;v++)mxUtils.bind(this,function(b){l.appendChild(n(b.name,mxUtils.bind(this,function(){a?(c=b.id,e()):(this.ui.hideDialog(),d(b.id))})))})(g[v]);100==g.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(t,u,!0):null!=u&&u({message:a.responseText})}))});t()});q()};
+c.height;f.style="border: 1px solid black;margin:5px;vertical-align:middle";e.appendChild(f)}mxUtils.write(e,a);mxEvent.addListener(e,"click",b);d.appendChild(e);return d}),t=mxUtils.bind(this,function(a){this.ui.handleError(a,null,mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.hideDialog()}))}),e=mxUtils.bind(this,function(){g=0;l.innerHTML="";this.ui.spinner.spin(l,mxResources.get("loading"));var a=mxUtils.bind(this,function(){Trello.cards.get(c+"/attachments",{fields:"id,name,previews"},
+mxUtils.bind(this,function(a){this.ui.spinner.stop();l.appendChild(n("../ [Up]",mxUtils.bind(this,function(){v()})));mxUtils.br(l);null==a||0==a.length?mxUtils.write(l,mxResources.get("noFiles")):mxUtils.bind(this,function(){for(var b=0;b<a.length;b++)mxUtils.bind(this,function(a){l.appendChild(n(a.name,mxUtils.bind(this,function(){this.ui.hideDialog();d(c+this.SEPARATOR+a.id)}),null!=a.previews?a.previews[0]:null))})(a[b])})()}),mxUtils.bind(this,function(b){401==b.status?this.authenticate(a,t,!0):
+null!=t&&t(b)}))});a()}),m=null,p=null,v=mxUtils.bind(this,function(f){null==f&&(g=0,l.innerHTML="",f=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);v(f+1)});mxEvent.addListener(m,"click",k);var q=mxUtils.bind(this,function(){Trello.get("search",
+{query:""==mxUtils.trim(b)?"is:open":b,cards_limit:100,cards_page:f-1},mxUtils.bind(this,function(g){this.ui.spinner.stop();g=null!=g?g.cards:null;if(null==g||0==g.length)mxUtils.write(l,mxResources.get("noFiles"));else{1==f&&(l.appendChild(n(mxResources.get("filterCards")+"...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.ui,b,mxResources.get("ok"),mxUtils.bind(this,function(a){null!=a&&(b=a,v())}),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 u=0;u<g.length;u++)mxUtils.bind(this,function(b){l.appendChild(n(b.name,mxUtils.bind(this,function(){a?(c=b.id,e()):(this.ui.hideDialog(),d(b.id))})))})(g[u]);100==g.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(q,t,!0):null!=t&&t({message:a.responseText})}))});q()});v()};
TrelloClient.prototype.isAuthorized=function(){try{return null!=localStorage.trello_token}catch(a){}return!1};TrelloClient.prototype.logout=function(){localStorage.removeItem("trello_token");Trello.deauthorize()};GitLabFile=function(a,d,c){GitHubFile.call(this,a,d,c);this.peer=this.ui.gitLab};mxUtils.extend(GitLabFile,GitHubFile);GitLabFile.prototype.getId=function(){return 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:""):""):"")};GitLabFile.prototype.getHash=function(){return encodeURIComponent("A"+this.getId())};GitLabFile.prototype.isConflict=function(a){return null!=a&&400==a.status};
GitLabFile.prototype.getMode=function(){return App.MODE_GITLAB};GitLabFile.prototype.getDescriptorEtag=function(a){return a.last_commit_id};GitLabFile.prototype.setDescriptorEtag=function(a,d){a.last_commit_id=d};GitLabLibrary=function(a,d,c){GitLabFile.call(this,a,d,c)};mxUtils.extend(GitLabLibrary,GitLabFile);GitLabLibrary.prototype.doSave=function(a,d,c){this.saveFile(a,!1,d,c)};GitLabLibrary.prototype.open=function(){};GitLabClient=function(a){GitHubClient.call(this,a,"gitlabauth")};mxUtils.extend(GitLabClient,GitHubClient);GitLabClient.prototype.clientId=DRAWIO_GITLAB_ID;GitLabClient.prototype.scope="api%20read_repository%20write_repository";GitLabClient.prototype.baseUrl=DRAWIO_GITLAB_URL+"/api/v4";GitLabClient.prototype.authToken="Bearer";
GitLabClient.prototype.authenticate=function(a,d){if(null==window.onGitLabCallback){var c=mxUtils.bind(this,function(){var b=!0;this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(g,f){var k=window.location.href,k=k.substring(0,k.lastIndexOf("/")),k=encodeURIComponent(k+"/gitlab.html");null!=window.open(DRAWIO_GITLAB_URL+"/oauth/authorize?client_id="+this.clientId+"&scope="+this.scope+"&redirect_uri="+k+"&response_type=token&state=123","gitlabauth")?window.onGitLabCallback=mxUtils.bind(this,
function(k,n){b?(window.onGitLabCallback=null,b=!1,null==k?d({message:mxResources.get("accessDenied"),retry:c}):(null!=f&&f(),this.token=k,this.setUser(null),g&&this.setPersistentToken(this.token),a())):null!=n&&n.close()}):d({message:mxResources.get("serviceUnavailableOrBlocked"),retry:c})}),mxUtils.bind(this,function(){b&&(window.onGitLabCallback=null,b=!1,d({message:mxResources.get("accessDenied"),retry:c}))}))});c()}else d({code:App.ERROR_BUSY})};
-GitLabClient.prototype.executeRequest=function(a,d,c,b){var g=mxUtils.bind(this,function(k){var l=!0,n=window.setTimeout(mxUtils.bind(this,function(){l=!1;c({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout),u=this.authToken+" "+this.token;a.setRequestHeaders=function(a,b){a.setRequestHeader("Authorization",u);a.setRequestHeader("PRIVATE_TOKEN",u);a.setRequestHeader("Content-Type","application/json")};a.send(mxUtils.bind(this,function(){window.clearTimeout(n);if(l)if(200<=
+GitLabClient.prototype.executeRequest=function(a,d,c,b){var g=mxUtils.bind(this,function(k){var l=!0,n=window.setTimeout(mxUtils.bind(this,function(){l=!1;c({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout),t=this.authToken+" "+this.token;a.setRequestHeaders=function(a,b){a.setRequestHeader("Authorization",t);a.setRequestHeader("PRIVATE_TOKEN",t);a.setRequestHeader("Content-Type","application/json")};a.send(mxUtils.bind(this,function(){window.clearTimeout(n);if(l)if(200<=
a.getStatus()&&299>=a.getStatus()||b&&404==a.getStatus())d(a);else if(401===a.getStatus())k?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){f(!0)},c)})}):this.authenticate(function(){g(!0)},c);else if(403===a.getStatus()){var e=!1;try{var m=JSON.parse(a.getText());null!=m&&null!=m.errors&&0<m.errors.length&&(e="too_large"==m.errors[0].code)}catch(p){}c({message:mxResources.get(e?"drawingTooLarge":"forbidden")})}else 404===a.getStatus()?c({message:this.getErrorMessage(a,
mxResources.get("fileNotFound"))}):400===a.getStatus()?c({status:400}):c({status:a.getStatus(),message:this.getErrorMessage(a,mxResources.get("error")+" "+a.getStatus())})}),c)}),f=mxUtils.bind(this,function(a){null==this.user?this.updateUser(function(){f(!0)},c,a):g(a)});null==this.token?this.authenticate(function(){f(!0)},c):f(!1)};
-GitLabClient.prototype.getRefIndex=function(a,d,c,b,g){if(null!=g)c(a,g);else{var f=a.length-2,k=mxUtils.bind(this,function(){if(2>f)b({message:mxResources.get("fileNotFound")});else{var g=Math.max(f-1,0),n=a.slice(0,g).join("/"),g=a[g],u=a[f],e=a.slice(f+1,a.length).join("/"),n=this.baseUrl+"/projects/"+encodeURIComponent(n+"/"+g)+"/repository/"+(d?"tree?path="+e+"&ref="+u:"files/"+encodeURIComponent(e)+"?ref="+u),m=new mxXmlRequest(n,null,"HEAD");this.executeRequest(m,mxUtils.bind(this,function(){200==
+GitLabClient.prototype.getRefIndex=function(a,d,c,b,g){if(null!=g)c(a,g);else{var f=a.length-2,k=mxUtils.bind(this,function(){if(2>f)b({message:mxResources.get("fileNotFound")});else{var g=Math.max(f-1,0),n=a.slice(0,g).join("/"),g=a[g],t=a[f],e=a.slice(f+1,a.length).join("/"),n=this.baseUrl+"/projects/"+encodeURIComponent(n+"/"+g)+"/repository/"+(d?"tree?path="+e+"&ref="+t:"files/"+encodeURIComponent(e)+"?ref="+t),m=new mxXmlRequest(n,null,"HEAD");this.executeRequest(m,mxUtils.bind(this,function(){200==
m.getStatus()?c(a,f):b({message:mxResources.get("fileNotFound")})}),mxUtils.bind(this,function(){404==m.getStatus()?(f--,k()):b({message:mxResources.get("fileNotFound")})}))}});k()}};
-GitLabClient.prototype.getFile=function(a,d,c,b,g,f){b=null!=b?b:!1;this.getRefIndex(a.split("/"),!1,mxUtils.bind(this,function(f,l){var k=Math.max(l-1,0),u=f.slice(0,k).join("/"),e=f[k],m=f[l];a=f.slice(l+1,f.length).join("/");k=/\.png$/i.test(a);if(!g&&(/\.v(dx|sdx?)$/i.test(a)||/\.gliffy$/i.test(a)||/\.pdf$/i.test(a)||!this.ui.useCanvasForExport&&k))if(null!=this.token){var k="&t="+(new Date).getTime(),p=this.baseUrl+"/projects/"+encodeURIComponent(u+"/"+e)+"/repository/files/"+encodeURIComponent(a)+
-"?ref="+m;f=a.split("/");this.ui.convertFile(p+k,0<f.length?f[f.length-1]:a,null,this.extension,d,c,mxUtils.bind(this,function(a,b,c){a=new mxXmlRequest(a,null,"GET");this.executeRequest(a,mxUtils.bind(this,function(a){try{b(this.getFileContent(JSON.parse(a.getText())))}catch(y){c(y)}}),c)}))}else c({message:mxResources.get("accessDenied")});else k="&t="+(new Date).getTime(),p=this.baseUrl+"/projects/"+encodeURIComponent(u+"/"+e)+"/repository/files/"+encodeURIComponent(a)+"?ref="+m,k=new mxXmlRequest(p+
-k,null,"GET"),this.executeRequest(k,mxUtils.bind(this,function(a){try{d(this.createGitLabFile(u,e,m,JSON.parse(a.getText()),b,l))}catch(t){c(t)}}),c)}),c,f)};
+GitLabClient.prototype.getFile=function(a,d,c,b,g,f){b=null!=b?b:!1;this.getRefIndex(a.split("/"),!1,mxUtils.bind(this,function(f,l){var k=Math.max(l-1,0),t=f.slice(0,k).join("/"),e=f[k],m=f[l];a=f.slice(l+1,f.length).join("/");k=/\.png$/i.test(a);if(!g&&(/\.v(dx|sdx?)$/i.test(a)||/\.gliffy$/i.test(a)||/\.pdf$/i.test(a)||!this.ui.useCanvasForExport&&k))if(null!=this.token){var k="&t="+(new Date).getTime(),p=this.baseUrl+"/projects/"+encodeURIComponent(t+"/"+e)+"/repository/files/"+encodeURIComponent(a)+
+"?ref="+m;f=a.split("/");this.ui.convertFile(p+k,0<f.length?f[f.length-1]:a,null,this.extension,d,c,mxUtils.bind(this,function(a,b,c){a=new mxXmlRequest(a,null,"GET");this.executeRequest(a,mxUtils.bind(this,function(a){try{b(this.getFileContent(JSON.parse(a.getText())))}catch(x){c(x)}}),c)}))}else c({message:mxResources.get("accessDenied")});else k="&t="+(new Date).getTime(),p=this.baseUrl+"/projects/"+encodeURIComponent(t+"/"+e)+"/repository/files/"+encodeURIComponent(a)+"?ref="+m,k=new mxXmlRequest(p+
+k,null,"GET"),this.executeRequest(k,mxUtils.bind(this,function(a){try{d(this.createGitLabFile(t,e,m,JSON.parse(a.getText()),b,l))}catch(q){c(q)}}),c)}),c,f)};
GitLabClient.prototype.getFileContent=function(a){var d=a.file_name,c=a.content;"base64"===a.encoding&&(/\.jpe?g$/i.test(d)?c="data:image/jpeg;base64,"+c:/\.gif$/i.test(d)?c="data:image/gif;base64,"+c:/\.pdf$/i.test(d)?c="data:application/pdf;base64,"+c:/\.png$/i.test(d)?(a=this.ui.extractGraphModelFromPng(c),c=null!=a&&0<a.length?a:"data:image/png;base64,"+c):c=Base64.decode(c));return c};
GitLabClient.prototype.createGitLabFile=function(a,d,c,b,g,f){var k=DRAWIO_GITLAB_URL+"/";a={org:a,repo:d,ref:c,name:b.file_name,path:b.file_path,html_url:k+a+"/"+d+"/blob/"+c+"/"+b.file_path,download_url:k+a+"/"+d+"/raw/"+c+"/"+b.file_path+"?inline=false",last_commit_id:b.last_commit_id,refPos:f};b=this.getFileContent(b);return g?new GitLabLibrary(this.ui,b,a):new GitLabFile(this.ui,b,a)};
GitLabClient.prototype.insertFile=function(a,d,c,b,g,f,k){g=null!=g?g:!1;this.getRefIndex(f.split("/"),!0,mxUtils.bind(this,function(f,n){var l=Math.max(n-1,0),e=f.slice(0,l).join("/"),m=f[l],p=f[n];path=f.slice(n+1,f.length).join("/");0<path.length&&(path+="/");path+=a;this.checkExists(e+"/"+m+"/"+p+"/"+path,!0,mxUtils.bind(this,function(f,l){if(f)if(g)k||(d=Base64.encode(d)),this.showCommitDialog(a,!0,mxUtils.bind(this,function(a){this.writeFile(e,m,p,path,a,d,l,mxUtils.bind(this,function(a){try{var d=
-JSON.parse(a.getText());c(this.createGitLabFile(e,m,p,d.content,g,n))}catch(x){b(x)}}),b)}),b);else{var v=DRAWIO_GITLAB_URL+"/";c(new GitLabFile(this.ui,d,{org:e,repo:m,ref:p,name:a,path:path,html_url:v+e+"/"+m+"/blob/"+p+"/"+path,download_url:v+e+"/"+m+"/raw/"+p+"/"+path+"?inline=false",refPos:n,last_commit_id:l,isNew:!0}))}else b()}))}),b)};
+JSON.parse(a.getText());c(this.createGitLabFile(e,m,p,d.content,g,n))}catch(A){b(A)}}),b)}),b);else{var u=DRAWIO_GITLAB_URL+"/";c(new GitLabFile(this.ui,d,{org:e,repo:m,ref:p,name:a,path:path,html_url:u+e+"/"+m+"/blob/"+p+"/"+path,download_url:u+e+"/"+m+"/raw/"+p+"/"+path+"?inline=false",refPos:n,last_commit_id:l,isNew:!0}))}else b()}))}),b)};
GitLabClient.prototype.checkExists=function(a,d,c){this.getFile(a,mxUtils.bind(this,function(b){if(d){var g=this.ui.spinner.pause();this.ui.confirm(mxResources.get("replaceIt",[a]),function(){g();c(!0,b.getCurrentEtag())},function(){g();c(!1)})}else this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){c(!1)})}),mxUtils.bind(this,function(a){c(!0)}),null,!0)};
-GitLabClient.prototype.writeFile=function(a,d,c,b,g,f,k,l,n){if(f.length>=this.maxFileSize)n({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(f.length)+" / 1 MB)"});else{var u="POST";c={path:encodeURIComponent(b),branch:decodeURIComponent(c),commit_message:g,content:f,encoding:"base64"};null!=k&&(c.last_commit_id=k,u="PUT");a=this.baseUrl+"/projects/"+encodeURIComponent(a+"/"+d)+"/repository/files/"+encodeURIComponent(b);u=new mxXmlRequest(a,JSON.stringify(c),u);this.executeRequest(u,
+GitLabClient.prototype.writeFile=function(a,d,c,b,g,f,k,l,n){if(f.length>=this.maxFileSize)n({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(f.length)+" / 1 MB)"});else{var t="POST";c={path:encodeURIComponent(b),branch:decodeURIComponent(c),commit_message:g,content:f,encoding:"base64"};null!=k&&(c.last_commit_id=k,t="PUT");a=this.baseUrl+"/projects/"+encodeURIComponent(a+"/"+d)+"/repository/files/"+encodeURIComponent(b);t=new mxXmlRequest(a,JSON.stringify(c),t);this.executeRequest(t,
mxUtils.bind(this,function(a){l(a)}),n)}};
-GitLabClient.prototype.saveFile=function(a,d,c,b,g){var f=a.meta.org,k=a.meta.repo,l=a.meta.ref,n=a.meta.path,u=mxUtils.bind(this,function(b,e){this.writeFile(f,k,l,n,g,e,b,mxUtils.bind(this,function(b){delete a.meta.isNew;this.getFile(f+"/"+k+"/"+l+"/"+n,mxUtils.bind(this,function(b){b.getData()==a.getData()?d(b.getCurrentEtag()):d({content:a.getCurrentEtag()})}),c,null,null,a.meta.refPos)}),c)}),e=mxUtils.bind(this,function(){this.ui.useCanvasForExport&&/(\.png)$/i.test(n)?this.ui.getEmbeddedPng(mxUtils.bind(this,
-function(b){u(a.meta.last_commit_id,b)}),c,this.ui.getCurrentFile()!=a?a.getData():null):u(a.meta.last_commit_id,Base64.encode(a.getData()))});b?this.getFile(f+"/"+k+"/"+l+"/"+n,mxUtils.bind(this,function(b){a.meta.last_commit_id=b.meta.last_commit_id;e()}),c):e()};GitLabClient.prototype.pickFolder=function(a){this.showGitLabDialog(!1,a)};GitLabClient.prototype.pickFile=function(a){a=null!=a?a:mxUtils.bind(this,function(a){this.ui.loadFile("A"+encodeURIComponent(a))});this.showGitLabDialog(!0,a)};
+GitLabClient.prototype.saveFile=function(a,d,c,b,g){var f=a.meta.org,k=a.meta.repo,l=a.meta.ref,n=a.meta.path,t=mxUtils.bind(this,function(b,e){this.writeFile(f,k,l,n,g,e,b,mxUtils.bind(this,function(b){delete a.meta.isNew;this.getFile(f+"/"+k+"/"+l+"/"+n,mxUtils.bind(this,function(b){b.getData()==a.getData()?d(b.getCurrentEtag()):d({content:a.getCurrentEtag()})}),c,null,null,a.meta.refPos)}),c)}),e=mxUtils.bind(this,function(){this.ui.useCanvasForExport&&/(\.png)$/i.test(n)?this.ui.getEmbeddedPng(mxUtils.bind(this,
+function(b){t(a.meta.last_commit_id,b)}),c,this.ui.getCurrentFile()!=a?a.getData():null):t(a.meta.last_commit_id,Base64.encode(a.getData()))});b?this.getFile(f+"/"+k+"/"+l+"/"+n,mxUtils.bind(this,function(b){a.meta.last_commit_id=b.meta.last_commit_id;e()}),c):e()};GitLabClient.prototype.pickFolder=function(a){this.showGitLabDialog(!1,a)};GitLabClient.prototype.pickFile=function(a){a=null!=a?a:mxUtils.bind(this,function(a){this.ui.loadFile("A"+encodeURIComponent(a))});this.showGitLabDialog(!0,a)};
GitLabClient.prototype.showGitLabDialog=function(a,d){var c=null,b=null,g=null,f=null,k=document.createElement("div");k.style.whiteSpace="nowrap";k.style.overflow="hidden";k.style.height="304px";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.border="1px solid lightgray";n.style.boxSizing=
-"border-box";n.style.padding="4px";n.style.overflow="auto";n.style.lineHeight="1.2em";n.style.height="274px";k.appendChild(n);var u=document.createElement("div");u.style.textOverflow="ellipsis";u.style.boxSizing="border-box";u.style.overflow="hidden";u.style.padding="4px";u.style.width="100%";var e=new CustomDialog(this.ui,k,mxUtils.bind(this,function(){d(c+"/"+b+"/"+encodeURIComponent(g)+"/"+f)}));this.ui.showDialog(e.container,420,360,!0,!0);a&&e.okButton.parentNode.removeChild(e.okButton);var m=
-mxUtils.bind(this,function(a,b,c){var d=document.createElement("a");d.setAttribute("href","javascript:void(0);");d.setAttribute("title",a);mxUtils.write(d,a);mxEvent.addListener(d,"click",b);null!=c&&(a=u.cloneNode(),a.style.padding=c,a.appendChild(d),d=a);return d}),p=mxUtils.bind(this,function(a){var d=document.createElement("div");d.style.marginBottom="8px";d.appendChild(m(c+"/"+b,mxUtils.bind(this,function(){f=null;C()})));a||(mxUtils.write(d," / "),d.appendChild(m(decodeURIComponent(g),mxUtils.bind(this,
-function(){f=null;y()}))));if(null!=f&&0<f.length){var e=f.split("/");for(a=0;a<e.length;a++)(function(a){mxUtils.write(d," / ");d.appendChild(m(e[a],mxUtils.bind(this,function(){f=e.slice(0,a+1).join("/");z()})))})(a)}n.appendChild(d)}),q=mxUtils.bind(this,function(a){this.ui.handleError(a,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(f=g=b=c=null,C()):this.ui.hideDialog()}))}),t=null,v=null,z=mxUtils.bind(this,function(k){null==k&&(n.innerHTML="",k=1);var l=new mxXmlRequest(this.baseUrl+
-"/projects/"+encodeURIComponent(c+"/"+b)+"/repository/tree?path="+f+"&ref="+g+"&per_page=100&page="+k,null,"GET");this.ui.spinner.spin(n,mxResources.get("loading"));e.okButton.removeAttribute("disabled");null!=v&&(mxEvent.removeListener(n,"scroll",v),v=null);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 x=mxUtils.bind(this,function(){z(k+
-1)});mxEvent.addListener(t,"click",x);this.executeRequest(l,mxUtils.bind(this,function(e){this.ui.spinner.stop();1==k&&(p(!g),n.appendChild(m("../ [Up]",mxUtils.bind(this,function(){if(""==f)f=null,C();else{var a=f.split("/");f=a.slice(0,a.length-1).join("/");z()}}),"4px")));var l=JSON.parse(e.getText());if(null==l||0==l.length)mxUtils.write(n,mxResources.get("noFiles"));else{var A=!0,q=0;e=mxUtils.bind(this,function(e){for(var k=0;k<l.length;k++)mxUtils.bind(this,function(k){if(e==("tree"==k.type)){var l=
-u.cloneNode();l.style.backgroundColor=A?"#eeeeee":"";A=!A;var x=document.createElement("img");x.src=IMAGE_PATH+"/"+("tree"==k.type?"folder.png":"file.png");x.setAttribute("align","absmiddle");x.style.marginRight="4px";x.style.marginTop="-4px";x.width=20;l.appendChild(x);l.appendChild(m(k.name+("tree"==k.type?"/":""),mxUtils.bind(this,function(){"tree"==k.type?(f=k.path,z()):a&&"blob"==k.type&&(this.ui.hideDialog(),d(c+"/"+b+"/"+g+"/"+k.path))})));n.appendChild(l);q++}})(l[k])});e(!0);a&&e(!1);100==
-q&&(n.appendChild(t),v=function(){n.scrollTop>=n.scrollHeight-n.offsetHeight&&x()},mxEvent.addListener(n,"scroll",v))}}),q,!0)}),y=mxUtils.bind(this,function(a){null==a&&(n.innerHTML="",a=1);var d=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(c+"/"+b)+"/repository/branches?per_page=100&page="+a,null,"GET");e.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(n,mxResources.get("loading"));null!=v&&(mxEvent.removeListener(n,"scroll",v),v=null);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(){y(a+1)});mxEvent.addListener(t,"click",k);this.executeRequest(d,mxUtils.bind(this,function(b){this.ui.spinner.stop();1==a&&(p(!0),n.appendChild(m("../ [Up]",mxUtils.bind(this,function(){f=null;C()}),"4px")));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,b){var c=u.cloneNode();c.style.backgroundColor=0==b%2?"#eeeeee":"";c.appendChild(m(a.name,mxUtils.bind(this,function(){g=encodeURIComponent(a.name);f="";z()})));n.appendChild(c)})(b[c],c);100==b.length&&(n.appendChild(t),v=function(){n.scrollTop>=n.scrollHeight-n.offsetHeight&&k()},mxEvent.addListener(n,"scroll",v))}}),q)});e.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(n,mxResources.get("loading"));var C=mxUtils.bind(this,
-function(a){this.ui.spinner.stop();null==a&&(n.innerHTML="",a=1);null!=v&&(mxEvent.removeListener(n,"scroll",v),v=null);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 d=mxUtils.bind(this,function(){C(a+1)});mxEvent.addListener(t,"click",d);var e=mxUtils.bind(this,function(a){this.ui.spinner.spin(n,mxResources.get("loading"));var b=new mxXmlRequest(this.baseUrl+
-"/groups?per_page=100",null,"GET");this.executeRequest(b,mxUtils.bind(this,function(b){this.ui.spinner.stop();a(JSON.parse(b.getText()))}),q)}),k=mxUtils.bind(this,function(a,b){this.ui.spinner.spin(n,mxResources.get("loading"));var c=new mxXmlRequest(this.baseUrl+"/groups/"+a.id+"/projects?per_page=100",null,"GET");this.executeRequest(c,mxUtils.bind(this,function(c){this.ui.spinner.stop();b(a,JSON.parse(c.getText()))}),q)});e(mxUtils.bind(this,function(e){var l=new mxXmlRequest(this.baseUrl+"/users/"+
+"border-box";n.style.padding="4px";n.style.overflow="auto";n.style.lineHeight="1.2em";n.style.height="274px";k.appendChild(n);var t=document.createElement("div");t.style.textOverflow="ellipsis";t.style.boxSizing="border-box";t.style.overflow="hidden";t.style.padding="4px";t.style.width="100%";var e=new CustomDialog(this.ui,k,mxUtils.bind(this,function(){d(c+"/"+b+"/"+encodeURIComponent(g)+"/"+f)}));this.ui.showDialog(e.container,420,360,!0,!0);a&&e.okButton.parentNode.removeChild(e.okButton);var m=
+mxUtils.bind(this,function(a,b,c){var d=document.createElement("a");d.setAttribute("href","javascript:void(0);");d.setAttribute("title",a);mxUtils.write(d,a);mxEvent.addListener(d,"click",b);null!=c&&(a=t.cloneNode(),a.style.padding=c,a.appendChild(d),d=a);return d}),p=mxUtils.bind(this,function(a){var d=document.createElement("div");d.style.marginBottom="8px";d.appendChild(m(c+"/"+b,mxUtils.bind(this,function(){f=null;B()})));a||(mxUtils.write(d," / "),d.appendChild(m(decodeURIComponent(g),mxUtils.bind(this,
+function(){f=null;x()}))));if(null!=f&&0<f.length){var e=f.split("/");for(a=0;a<e.length;a++)(function(a){mxUtils.write(d," / ");d.appendChild(m(e[a],mxUtils.bind(this,function(){f=e.slice(0,a+1).join("/");y()})))})(a)}n.appendChild(d)}),v=mxUtils.bind(this,function(a){this.ui.handleError(a,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(f=g=b=c=null,B()):this.ui.hideDialog()}))}),q=null,u=null,y=mxUtils.bind(this,function(k){null==k&&(n.innerHTML="",k=1);var l=new mxXmlRequest(this.baseUrl+
+"/projects/"+encodeURIComponent(c+"/"+b)+"/repository/tree?path="+f+"&ref="+g+"&per_page=100&page="+k,null,"GET");this.ui.spinner.spin(n,mxResources.get("loading"));e.okButton.removeAttribute("disabled");null!=u&&(mxEvent.removeListener(n,"scroll",u),u=null);null!=q&&null!=q.parentNode&&q.parentNode.removeChild(q);q=document.createElement("a");q.style.display="block";q.setAttribute("href","javascript:void(0);");mxUtils.write(q,mxResources.get("more")+"...");var A=mxUtils.bind(this,function(){y(k+
+1)});mxEvent.addListener(q,"click",A);this.executeRequest(l,mxUtils.bind(this,function(e){this.ui.spinner.stop();1==k&&(p(!g),n.appendChild(m("../ [Up]",mxUtils.bind(this,function(){if(""==f)f=null,B();else{var a=f.split("/");f=a.slice(0,a.length-1).join("/");y()}}),"4px")));var l=JSON.parse(e.getText());if(null==l||0==l.length)mxUtils.write(n,mxResources.get("noFiles"));else{var z=!0,v=0;e=mxUtils.bind(this,function(e){for(var k=0;k<l.length;k++)mxUtils.bind(this,function(k){if(e==("tree"==k.type)){var l=
+t.cloneNode();l.style.backgroundColor=z?"#eeeeee":"";z=!z;var p=document.createElement("img");p.src=IMAGE_PATH+"/"+("tree"==k.type?"folder.png":"file.png");p.setAttribute("align","absmiddle");p.style.marginRight="4px";p.style.marginTop="-4px";p.width=20;l.appendChild(p);l.appendChild(m(k.name+("tree"==k.type?"/":""),mxUtils.bind(this,function(){"tree"==k.type?(f=k.path,y()):a&&"blob"==k.type&&(this.ui.hideDialog(),d(c+"/"+b+"/"+g+"/"+k.path))})));n.appendChild(l);v++}})(l[k])});e(!0);a&&e(!1);100==
+v&&(n.appendChild(q),u=function(){n.scrollTop>=n.scrollHeight-n.offsetHeight&&A()},mxEvent.addListener(n,"scroll",u))}}),v,!0)}),x=mxUtils.bind(this,function(a){null==a&&(n.innerHTML="",a=1);var d=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(c+"/"+b)+"/repository/branches?per_page=100&page="+a,null,"GET");e.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(n,mxResources.get("loading"));null!=u&&(mxEvent.removeListener(n,"scroll",u),u=null);null!=q&&null!=q.parentNode&&
+q.parentNode.removeChild(q);q=document.createElement("a");q.style.display="block";q.setAttribute("href","javascript:void(0);");mxUtils.write(q,mxResources.get("more")+"...");var k=mxUtils.bind(this,function(){x(a+1)});mxEvent.addListener(q,"click",k);this.executeRequest(d,mxUtils.bind(this,function(b){this.ui.spinner.stop();1==a&&(p(!0),n.appendChild(m("../ [Up]",mxUtils.bind(this,function(){f=null;B()}),"4px")));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,b){var c=t.cloneNode();c.style.backgroundColor=0==b%2?"#eeeeee":"";c.appendChild(m(a.name,mxUtils.bind(this,function(){g=encodeURIComponent(a.name);f="";y()})));n.appendChild(c)})(b[c],c);100==b.length&&(n.appendChild(q),u=function(){n.scrollTop>=n.scrollHeight-n.offsetHeight&&k()},mxEvent.addListener(n,"scroll",u))}}),v)});e.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(n,mxResources.get("loading"));var B=mxUtils.bind(this,
+function(a){this.ui.spinner.stop();null==a&&(n.innerHTML="",a=1);null!=u&&(mxEvent.removeListener(n,"scroll",u),u=null);null!=q&&null!=q.parentNode&&q.parentNode.removeChild(q);q=document.createElement("a");q.style.display="block";q.setAttribute("href","javascript:void(0);");mxUtils.write(q,mxResources.get("more")+"...");var d=mxUtils.bind(this,function(){B(a+1)});mxEvent.addListener(q,"click",d);var e=mxUtils.bind(this,function(a){this.ui.spinner.spin(n,mxResources.get("loading"));var b=new mxXmlRequest(this.baseUrl+
+"/groups?per_page=100",null,"GET");this.executeRequest(b,mxUtils.bind(this,function(b){this.ui.spinner.stop();a(JSON.parse(b.getText()))}),v)}),k=mxUtils.bind(this,function(a,b){this.ui.spinner.spin(n,mxResources.get("loading"));var c=new mxXmlRequest(this.baseUrl+"/groups/"+a.id+"/projects?per_page=100",null,"GET");this.executeRequest(c,mxUtils.bind(this,function(c){this.ui.spinner.stop();b(a,JSON.parse(c.getText()))}),v)});e(mxUtils.bind(this,function(e){var l=new mxXmlRequest(this.baseUrl+"/users/"+
this.user.id+"/projects?per_page=100&page="+a,null,"GET");this.ui.spinner.spin(n,mxResources.get("loading"));this.executeRequest(l,mxUtils.bind(this,function(l){this.ui.spinner.stop();l=JSON.parse(l.getText());if(null!=l&&0!=l.length||null!=e&&0!=e.length){1==a&&(n.appendChild(m(mxResources.get("enterValue")+"...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.ui,"org/repo/ref",mxResources.get("ok"),mxUtils.bind(this,function(a){null!=a&&(a=a.split("/"),1<a.length?(c=a[0],b=a[1],g="master",
-f=null,2<a.length&&(f=encodeURIComponent(a.slice(2,a.length).join("/"))),z()):(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 p=!0,x=0;x<l.length;x++)mxUtils.bind(this,function(a,d){var e=u.cloneNode();e.style.backgroundColor=p?"#eeeeee":"";p=!p;e.appendChild(m(a.name_with_namespace,mxUtils.bind(this,function(){c=a.owner.username;b=
-a.path;g=a.default_branch||"master";f="";z()})));n.appendChild(e)})(l[x],x);for(x=0;x<e.length;x++)k(e[x],mxUtils.bind(this,function(a,d){for(var e=0;e<d.length;e++){var k=u.cloneNode();k.style.backgroundColor=p?"#eeeeee":"";p=!p;mxUtils.bind(this,function(d){k.appendChild(m(d.name_with_namespace,mxUtils.bind(this,function(){c=a.full_path;b=d.path;g=d.default_branch||"master";f="";z()})));n.appendChild(k)})(d[e])}}))}else mxUtils.write(n,mxResources.get("noFiles"));100==l.length&&(n.appendChild(t),
-v=function(){n.scrollTop>=n.scrollHeight-n.offsetHeight&&d()},mxEvent.addListener(n,"scroll",v))}),q)}))});this.token?this.user?C():this.updateUser(function(){C()},q,!0):this.authenticate(mxUtils.bind(this,function(){this.updateUser(function(){C()},q,!0)}),q)};GitLabClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);this.token=null};DrawioComment=function(a,d,c,b,g,f,k){this.file=a;this.id=d;this.content=c;this.modifiedDate=b;this.createdDate=g;this.isResolved=f;this.user=k;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(a){null!=a&&this.replies.push(a)};DrawioComment.prototype.addReply=function(a,d,c,b,g){d()};DrawioComment.prototype.editComment=function(a,d,c){d()};DrawioComment.prototype.deleteComment=function(a,d){a()};DriveComment=function(a,d,c,b,g,f,k,l){DrawioComment.call(this,a,d,c,b,g,f,k);this.pCommentId=l};mxUtils.extend(DriveComment,DrawioComment);DriveComment.prototype.addReply=function(a,d,c,b,g){a={content:a.content};b?a.verb="resolve":g&&(a.verb="reopen");this.file.ui.drive.executeRequest({url:"/files/"+this.file.getId()+"/comments/"+this.id+"/replies",params:a,method:"POST"},mxUtils.bind(this,function(a){d(a.replyId)}),c)};
+f=null,2<a.length&&(f=encodeURIComponent(a.slice(2,a.length).join("/"))),y()):(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 p=!0,z=0;z<l.length;z++)mxUtils.bind(this,function(a,d){var e=t.cloneNode();e.style.backgroundColor=p?"#eeeeee":"";p=!p;e.appendChild(m(a.name_with_namespace,mxUtils.bind(this,function(){c=a.owner.username;b=
+a.path;g=a.default_branch||"master";f="";y()})));n.appendChild(e)})(l[z],z);for(z=0;z<e.length;z++)k(e[z],mxUtils.bind(this,function(a,d){for(var e=0;e<d.length;e++){var k=t.cloneNode();k.style.backgroundColor=p?"#eeeeee":"";p=!p;mxUtils.bind(this,function(d){k.appendChild(m(d.name_with_namespace,mxUtils.bind(this,function(){c=a.full_path;b=d.path;g=d.default_branch||"master";f="";y()})));n.appendChild(k)})(d[e])}}))}else mxUtils.write(n,mxResources.get("noFiles"));100==l.length&&(n.appendChild(q),
+u=function(){n.scrollTop>=n.scrollHeight-n.offsetHeight&&d()},mxEvent.addListener(n,"scroll",u))}),v)}))});this.token?this.user?B():this.updateUser(function(){B()},v,!0):this.authenticate(mxUtils.bind(this,function(){this.updateUser(function(){B()},v,!0)}),v)};GitLabClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);this.token=null};DrawioComment=function(a,d,c,b,g,f,k){this.file=a;this.id=d;this.content=c;this.modifiedDate=b;this.createdDate=g;this.isResolved=f;this.user=k;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(a){null!=a&&this.replies.push(a)};DrawioComment.prototype.addReply=function(a,d,c,b,g){d()};DrawioComment.prototype.editComment=function(a,d,c){d()};DrawioComment.prototype.deleteComment=function(a,d){a()};DriveComment=function(a,d,c,b,g,f,k,l){DrawioComment.call(this,a,d,c,b,g,f,k);this.pCommentId=l};mxUtils.extend(DriveComment,DrawioComment);DriveComment.prototype.addReply=function(a,d,c,b,g){a={content:a.content};b?a.verb="resolve":g&&(a.verb="reopen");this.file.ui.drive.executeRequest({url:"/files/"+this.file.getId()+"/comments/"+this.id+"/replies",params:a,method:"POST"},mxUtils.bind(this,function(a){d(a.replyId)}),c)};
DriveComment.prototype.editComment=function(a,d,c){this.content=a;a={content:a};this.file.ui.drive.executeRequest(this.pCommentId?{url:"/files/"+this.file.getId()+"/comments/"+this.pCommentId+"/replies/"+this.id,params:a,method:"PATCH"}:{url:"/files/"+this.file.getId()+"/comments/"+this.id,params:a,method:"PATCH"},d,c)};
DriveComment.prototype.deleteComment=function(a,d){this.file.ui.drive.executeRequest(this.pCommentId?{url:"/files/"+this.file.getId()+"/comments/"+this.pCommentId+"/replies/"+this.id,method:"DELETE"}:{url:"/files/"+this.file.getId()+"/comments/"+this.id,method:"DELETE"},a,d)};App=function(a,d,c){EditorUi.call(this,a,d,null!=c?c:"1"==urlParams.lightbox||"min"==uiTheme&&"0"!=urlParams.chrome);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(window.onunload=mxUtils.bind(this,function(){var a=this.getCurrentFile();if(null!=a&&a.isModified()){var c={category:"DISCARD-FILE-"+a.getHash(),action:(a.savingFile?"saving":"")+(a.savingFile&&null!=a.savingFileTime?"_"+Math.round((Date.now()-a.savingFileTime.getTime())/1E3):"")+(null!=a.saveLevel?"-sl_"+a.saveLevel:"")+"-age_"+(null!=
a.ageStart?Math.round((Date.now()-a.ageStart.getTime())/1E3):"x")+(this.editor.autosave?"":"-nosave")+(a.isAutosave()?"":"-noauto")+"-open_"+(null!=a.opened?Math.round((Date.now()-a.opened.getTime())/1E3):"x")+"-save_"+(null!=a.lastSaved?Math.round((Date.now()-a.lastSaved.getTime())/1E3):"x")+"-change_"+(null!=a.lastChanged?Math.round((Date.now()-a.lastChanged.getTime())/1E3):"x")+"-alive_"+Math.round((Date.now()-App.startTime.getTime())/1E3),label:null!=a.sync?"client_"+a.sync.clientId:"nosync"};
@@ -9854,7 +9855,7 @@ App.getStoredMode=function(){var a=null;null==a&&isLocalStorage&&(a=localStorage
2)?(mxscript(App.DROPBOX_URL),mxscript(App.DROPINS_URL,null,"dropboxjs",App.DROPBOX_APPKEY)):"0"==urlParams.chrome&&(window.DropboxClient=null):window.DropboxClient=null),"function"===typeof window.OneDriveClient&&("0"!=urlParams.od&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?App.mode==App.MODE_ONEDRIVE||null!=window.location.hash&&"#W"==window.location.hash.substring(0,2)?mxscript(App.ONEDRIVE_URL):"0"==urlParams.chrome&&(window.OneDriveClient=null):
window.OneDriveClient=null),"function"===typeof window.TrelloClient&&("0"!=urlParams.tr&&isSvgBrowser&&(null==document.documentMode||10<=document.documentMode)?App.mode==App.MODE_TRELLO||null!=window.location.hash&&"#T"==window.location.hash.substring(0,2)?(mxscript(App.TRELLO_JQUERY_URL),mxscript(App.TRELLO_URL)):"0"==urlParams.chrome&&(window.TrelloClient=null):window.TrelloClient=null)),"undefined"==typeof JSON&&mxscript("js/json/json2.min.js")))})();
App.main=function(a,d){function c(b){mxUtils.getAll("1"!=urlParams.dev?[b]:[b,STYLE_PATH+"/default.xml",STYLE_PATH+"/dark-default.xml"],function(b){mxResources.parse(b[0].getText());if(isLocalStorage&&null!=localStorage&&null!=window.location.hash&&"#_CONFIG_"==window.location.hash.substring(0,9))try{var c=function(a){if(null!=a)for(var b=0;b<a.length;b++)if(!e[a[b]])throw Error(mxResources.get("invalidInput")+' "'+a[b])+'"';return!0},e={},f;for(f in App.pluginRegistry)e[App.pluginRegistry[f]]=!0;
-var g=JSON.parse(Graph.decompress(window.location.hash.substring(9)));null!=g&&c(g.plugins)&&(EditorUi.debug("Setting configuration",JSON.stringify(g)),confirm(mxResources.get("configLinkWarn"))&&confirm(mxResources.get("configLinkConfirm"))&&(localStorage.setItem(".configuration",JSON.stringify(g)),window.location.hash="",window.location.reload()));window.location.hash=""}catch(z){window.location.hash="",alert(z)}2<b.length&&(Graph.prototype.defaultThemes["default-style2"]=b[1].getDocumentElement(),
+var g=JSON.parse(Graph.decompress(window.location.hash.substring(9)));null!=g&&c(g.plugins)&&(EditorUi.debug("Setting configuration",JSON.stringify(g)),confirm(mxResources.get("configLinkWarn"))&&confirm(mxResources.get("configLinkConfirm"))&&(localStorage.setItem(".configuration",JSON.stringify(g)),window.location.hash="",window.location.reload()));window.location.hash=""}catch(y){window.location.hash="",alert(y)}2<b.length&&(Graph.prototype.defaultThemes["default-style2"]=b[1].getDocumentElement(),
Graph.prototype.defaultThemes.darkTheme=b[2].getDocumentElement());b=null!=d?d():new App(new Editor("0"==urlParams.chrome||"min"==uiTheme,null,null,null,"0"!=urlParams.chrome));if(null!=window.mxscript){if("function"===typeof window.DropboxClient&&null==window.Dropbox&&null!=window.DrawDropboxClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&isSvgBrowser&&(null==document.documentMode||9<document.documentMode))mxscript(App.DROPBOX_URL,function(){mxscript(App.DROPINS_URL,
function(){DrawDropboxClientCallback()},"dropboxjs",App.DROPBOX_APPKEY)});else if("undefined"===typeof window.Dropbox||"undefined"===typeof window.Dropbox.choose)window.DropboxClient=null;"function"===typeof window.OneDriveClient&&"undefined"===typeof OneDrive&&null!=window.DrawOneDriveClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?mxscript(App.ONEDRIVE_URL,
window.DrawOneDriveClientCallback):"undefined"===typeof window.OneDrive&&(window.OneDriveClient=null);"function"===typeof window.TrelloClient&&"undefined"===typeof window.Trello&&null!=window.DrawTrelloClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.tr||"1"==urlParams.embed&&"1"==urlParams.tr)&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?mxscript(App.TRELLO_JQUERY_URL,function(){mxscript(App.TRELLO_URL,function(){DrawTrelloClientCallback()})}):
@@ -9865,8 +9866,8 @@ urlParams.libs&&"https://aws.amazon.com/architecture/icons/"==document.referrer.
mxscript("js/stencils.min.js"),mxscript("js/extensions.min.js"),window.addEventListener("load",function(){navigator.serviceWorker.register("/service-worker.js")})))}catch(e){null!=window.console&&console.error(e)}!("ArrayBuffer"in window)||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"auto"!=DrawioFile.SYNC||"1"==urlParams.embed||"1"==urlParams.local||"0"==urlParams.chrome&&"1"!=urlParams.rt||"1"==urlParams.stealth||"1"==urlParams.offline||mxscript(App.PUSHER_URL);if("0"!=urlParams.plugins&&"1"!=
urlParams.offline){g=null!=mxSettings.settings?mxSettings.getPlugins():null;if(null==mxSettings.settings&&isLocalStorage&&"undefined"!==typeof JSON)try{var f=JSON.parse(localStorage.getItem(mxSettings.key));null!=f&&(g=f.plugins)}catch(e){}f=urlParams.p;App.initPluginCallback();null!=f&&App.loadPlugins(f.split(";"));if(null!=g&&0<g.length&&"0"!=urlParams.plugins){for(var f=window.location.protocol+"//"+window.location.host,k=!0,l=0;l<g.length&&k;l++)"/"!=g[l].charAt(0)&&g[l].substring(0,f.length)!=
f&&(k=!1);if(k||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(l=0;l<g.length;l++)try{null==App.pluginsLoaded[g[l]]&&(App.pluginsLoaded[g[l]]=!0,App.embedModePluginsCount++,"/"==g[l].charAt(0)&&(g[l]=PLUGINS_BASE_PATH+g[l]),mxscript(g[l]))}catch(e){}}}"function"===
-typeof window.DriveClient&&"undefined"===typeof gapi&&("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&isSvgBrowser&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode)?mxscript("https://apis.google.com/js/api.js?onload=DrawGapiClientCallback",null,null,null,mxClient.IS_SVG):"undefined"===typeof window.gapi&&(window.DriveClient=null)}"0"!=urlParams.math&&Editor.initMath();if("1"==urlParams.configure){var n=window.opener||window.parent,u=
-function(a){if(a.source==n)try{var c=JSON.parse(a.data);null!=c&&"configure"==c.action&&(mxEvent.removeListener(window,"message",u),Editor.configure(c.config,!0),mxSettings.load(),b())}catch(p){null!=window.console&&console.log("Error in configure message: "+p,a.data)}};mxEvent.addListener(window,"message",u);n.postMessage(JSON.stringify({event:"configure"}),"*")}else{if(null==Editor.config){if(null!=window.DRAWIO_CONFIG)try{EditorUi.debug("Using global configuration",window.DRAWIO_CONFIG),Editor.configure(window.DRAWIO_CONFIG),
+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 n=window.opener||window.parent,t=
+function(a){if(a.source==n)try{var c=JSON.parse(a.data);null!=c&&"configure"==c.action&&(mxEvent.removeListener(window,"message",t),Editor.configure(c.config,!0),mxSettings.load(),b())}catch(p){null!=window.console&&console.log("Error in configure message: "+p,a.data)}};mxEvent.addListener(window,"message",t);n.postMessage(JSON.stringify({event:"configure"}),"*")}else{if(null==Editor.config){if(null!=window.DRAWIO_CONFIG)try{EditorUi.debug("Using global configuration",window.DRAWIO_CONFIG),Editor.configure(window.DRAWIO_CONFIG),
mxSettings.load()}catch(e){null!=window.console&&console.error(e)}if(isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed&&(g=localStorage.getItem(".configuration"),null!=g))try{g=JSON.parse(g),null!=g&&(EditorUi.debug("Using local configuration",g),Editor.configure(g),mxSettings.load())}catch(e){null!=window.console&&console.error(e)}}b()}};mxUtils.extend(App,EditorUi);App.prototype.defaultUserPicture="https://lh3.googleusercontent.com/-HIzvXUy6QUY/AAAAAAAAAAI/AAAAAAAAAAA/giuR7PQyjEk/photo.jpg?sz=64";
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=":
@@ -9906,11 +9907,11 @@ 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,d=this.getCurrentFile();this.isOfflineApp()&&(a+=" app");null!=d&&(a=(null!=d.getTitle()?d.getTitle():this.defaultFilename)+" - "+a);document.title!=a&&(document.title=a,a=this.editor.graph,a.invalidateDescendantsWithPlaceholders(a.model.getRoot()),a.view.validate())}};
App.prototype.createCrcTable=function(){for(var a=[],d,c=0;256>c;c++){d=c;for(var b=0;8>b;b++)d=d&1?3988292384^d>>>1:d>>>1;a[c]=d}return a};
-App.prototype.getThumbnail=function(a,d){var c=!1;try{var b=!0,g=window.setTimeout(mxUtils.bind(this,function(){b=!1;d(null)}),this.timeout),f=mxUtils.bind(this,function(a){window.clearTimeout(g);b&&d(a)});null==this.thumbImageCache&&(this.thumbImageCache={});var k=this.editor.graph,l=null!=k.themes&&"darkTheme"==k.defaultThemeName;if(null!=this.pages&&(this.currentPage!=this.pages[0]||l)){var n=k.getGlobalVariable,k=this.createTemporaryGraph(l?k.getDefaultStylesheet():k.getStylesheet()),u=this.pages[0];
-l&&(k.defaultThemeName="default");k.getGlobalVariable=function(a){return"page"==a?u.getName():"pagenumber"==a?1:n.apply(this,arguments)};k.getGlobalVariable=n;document.body.appendChild(k.container);k.model.setRoot(u.root)}if(mxClient.IS_CHROMEAPP||this.useCanvasForExport)this.exportToCanvas(mxUtils.bind(this,function(a){try{k!=this.editor.graph&&null!=k.container.parentNode&&k.container.parentNode.removeChild(k.container)}catch(E){a=null}f(a)}),a,this.thumbImageCache,"#ffffff",function(){f()},null,
-null,null,null,null,null,k),c=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var e=document.createElement("canvas"),m=k.getGraphBounds(),p=a/m.width,p=Math.min(1,Math.min(3*a/(4*m.height),p)),q=Math.floor(m.x),t=Math.floor(m.y);e.setAttribute("width",Math.ceil(p*(m.width+4)));e.setAttribute("height",Math.ceil(p*(m.height+4)));var v=e.getContext("2d");v.scale(p,p);v.translate(-q,-t);var z=k.background;if(null==z||""==z||z==mxConstants.NONE)z="#ffffff";v.save();v.fillStyle=z;v.fillRect(q,
-t,Math.ceil(m.width+4),Math.ceil(m.height+4));v.restore();var y=new mxJsCanvas(e),C=new mxAsyncCanvas(this.thumbImageCache);y.images=this.thumbImageCache.images;var x=new mxImageExport;x.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())};x.drawText=function(a,b){};x.drawState(k.getView().getState(k.model.root),C);C.finish(mxUtils.bind(this,function(){try{x.drawState(k.getView().getState(k.model.root),
-y),k!=this.editor.graph&&null!=k.container.parentNode&&k.container.parentNode.removeChild(k.container)}catch(A){e=null}f(e)}));c=!0}}catch(A){c=!1,null!=k&&k!=this.editor.graph&&null!=k.container.parentNode&&k.container.parentNode.removeChild(k.container)}return c};
+App.prototype.getThumbnail=function(a,d){var c=!1;try{var b=!0,g=window.setTimeout(mxUtils.bind(this,function(){b=!1;d(null)}),this.timeout),f=mxUtils.bind(this,function(a){window.clearTimeout(g);b&&d(a)});null==this.thumbImageCache&&(this.thumbImageCache={});var k=this.editor.graph,l=null!=k.themes&&"darkTheme"==k.defaultThemeName;if(null!=this.pages&&(this.currentPage!=this.pages[0]||l)){var n=k.getGlobalVariable,k=this.createTemporaryGraph(l?k.getDefaultStylesheet():k.getStylesheet()),t=this.pages[0];
+l&&(k.defaultThemeName="default");k.getGlobalVariable=function(a){return"page"==a?t.getName():"pagenumber"==a?1:n.apply(this,arguments)};k.getGlobalVariable=n;document.body.appendChild(k.container);k.model.setRoot(t.root)}if(mxClient.IS_CHROMEAPP||this.useCanvasForExport)this.exportToCanvas(mxUtils.bind(this,function(a){try{k!=this.editor.graph&&null!=k.container.parentNode&&k.container.parentNode.removeChild(k.container)}catch(F){a=null}f(a)}),a,this.thumbImageCache,"#ffffff",function(){f()},null,
+null,null,null,null,null,k),c=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var e=document.createElement("canvas"),m=k.getGraphBounds(),p=a/m.width,p=Math.min(1,Math.min(3*a/(4*m.height),p)),v=Math.floor(m.x),q=Math.floor(m.y);e.setAttribute("width",Math.ceil(p*(m.width+4)));e.setAttribute("height",Math.ceil(p*(m.height+4)));var u=e.getContext("2d");u.scale(p,p);u.translate(-v,-q);var y=k.background;if(null==y||""==y||y==mxConstants.NONE)y="#ffffff";u.save();u.fillStyle=y;u.fillRect(v,
+q,Math.ceil(m.width+4),Math.ceil(m.height+4));u.restore();var x=new mxJsCanvas(e),B=new mxAsyncCanvas(this.thumbImageCache);x.images=this.thumbImageCache.images;var A=new mxImageExport;A.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())};A.drawText=function(a,b){};A.drawState(k.getView().getState(k.model.root),B);B.finish(mxUtils.bind(this,function(){try{A.drawState(k.getView().getState(k.model.root),
+x),k!=this.editor.graph&&null!=k.container.parentNode&&k.container.parentNode.removeChild(k.container)}catch(z){e=null}f(e)}));c=!0}}catch(z){c=!1,null!=k&&k!=this.editor.graph&&null!=k.container.parentNode&&k.container.parentNode.removeChild(k.container)}return c};
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(d,c){a.apply(this,arguments);null!=this.mode&&(Editor.useLocalStorage=this.mode==App.MODE_BROWSER);if(null!=this.appIcon){var b=this.getCurrentFile();d=null!=b?b.getMode():d;d==App.MODE_GOOGLE?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("googleDrive")])),this.appIcon.style.cursor="pointer"):d==App.MODE_DROPBOX?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("dropbox")])),
this.appIcon.style.cursor="pointer"):d==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=d==App.MODE_DEVICE?"pointer":"default")}if(c)try{if(isLocalStorage)localStorage.setItem(".mode",d);else if("undefined"!=typeof Storage){var g=new Date;g.setYear(g.getFullYear()+1);document.cookie="MODE="+d+"; expires="+g.toUTCString()}}catch(f){}}})();
@@ -9926,7 +9927,7 @@ App.prototype.showRefreshDialog=function(a,d){if(!this.showingRefreshDialog&&(th
this.createRealtimeNotice();c.style.left="0";c.style.right="0";c.style.borderRadius="0";c.style.borderLeftStyle="none";c.style.borderRightStyle="none";c.style.marginBottom="26px";c.style.padding="8px 0 8px 0";this.dialog.container.appendChild(c)}};
App.prototype.showAlert=function(a){if(null!=a&&0<a.length){var d=document.createElement("div");d.className="geAlert";d.style.zIndex=2E9;d.style.left="50%";d.style.top="-100%";mxUtils.setPrefixedStyle(d.style,"transform","translate(-50%,0%)");mxUtils.setPrefixedStyle(d.style,"transition","all 1s ease");d.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");d.appendChild(a);mxEvent.addListener(a,"click",function(a){null!=d.parentNode&&(d.parentNode.removeChild(d),mxEvent.consume(a))});document.body.appendChild(d);window.setTimeout(function(){d.style.top="30px"},10);window.setTimeout(function(){mxUtils.setPrefixedStyle(d.style,"transition","all 2s ease");d.style.opacity="0";window.setTimeout(function(){null!=d.parentNode&&d.parentNode.removeChild(d)},2E3)},15E3)}};
-App.prototype.start=function(){var a=this;window.onerror=function(b,c,d,g,u){EditorUi.logError("Uncaught: "+(null!=b?b:""),c,d,g,u,null,!0);a.handleError({message:b},mxResources.get("unknownError"),null,null,null,null,!0)};null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);this.restoreLibraries();this.spinner.stop();try{if("1"!=urlParams.client&&"1"!=urlParams.embed){try{isLocalStorage&&window.addEventListener("storage",mxUtils.bind(this,function(a){var b=this.getCurrentFile();
+App.prototype.start=function(){var a=this;window.onerror=function(b,c,d,g,t){EditorUi.logError("Uncaught: "+(null!=b?b:""),c,d,g,t,null,!0);a.handleError({message:b},mxResources.get("unknownError"),null,null,null,null,!0)};null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);this.restoreLibraries();this.spinner.stop();try{if("1"!=urlParams.client&&"1"!=urlParams.embed){try{isLocalStorage&&window.addEventListener("storage",mxUtils.bind(this,function(a){var b=this.getCurrentFile();
EditorUi.debug("storage event",a,b);null!=b&&".draft-alive-check"==a.key&&null!=a.newValue&&null!=b.draftId&&(this.draftAliveCheck=a.newValue,b.saveDraft())})),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||this.isOfflineApp()||!/.*\.draw\.io$/.test(window.location.hostname)||this.editor.chromeless&&!this.editor.editable||this.showNameChangeBanner()}catch(f){}mxEvent.addListener(window,"hashchange",mxUtils.bind(this,function(a){try{this.hideDialog();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!=a?a.getHash():""}))}}))}if((null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.url)this.loadFile("U"+urlParams.url,!0);else if(null==this.getCurrentFile()){var d=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;
@@ -9960,26 +9961,26 @@ App.prototype.saveLibrary=function(a,d,c,b,g,f,k){try{b=null!=b?b:this.mode;g=nu
this.drive.insertFile(a,l,c,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,d)}),n,this.drive.libraryMimeType):b==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,d)}),n,c):b==App.MODE_GITLAB&&null!=this.gitLab&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitLab.insertLibrary(a,
l,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,d)}),n,c):b==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,d)}),n,c):b==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,d)}),n,c):b==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,d)}),n,c):b==App.MODE_BROWSER?(c=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,d)}),n)}),null==localStorage.getItem(a)?
-c():this.confirm(mxResources.get("replaceIt",[a]),c)):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})}));else if(g||this.spinner.spin(document.body,mxResources.get("saving"))){c.setData(l);var u=mxUtils.bind(this,function(){c.save(!0,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);f||this.libraryLoaded(c,d);null!=k&&k()}),n)});if(a!=c.getTitle()){var e=c.getHash();c.rename(a,mxUtils.bind(this,function(a){c.constructor!=LocalLibrary&&e!=c.getHash()&&
-(mxSettings.removeCustomLibrary(e),mxSettings.addCustomLibrary(c.getHash()));this.removeLibrarySidebar(e);u()}),n)}else u()}}catch(m){this.handleError(m)}};
+c():this.confirm(mxResources.get("replaceIt",[a]),c)):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})}));else if(g||this.spinner.spin(document.body,mxResources.get("saving"))){c.setData(l);var t=mxUtils.bind(this,function(){c.save(!0,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);f||this.libraryLoaded(c,d);null!=k&&k()}),n)});if(a!=c.getTitle()){var e=c.getHash();c.rename(a,mxUtils.bind(this,function(a){c.constructor!=LocalLibrary&&e!=c.getHash()&&
+(mxSettings.removeCustomLibrary(e),mxSettings.addCustomLibrary(c.getHash()));this.removeLibrarySidebar(e);t()}),n)}else t()}}catch(m){this.handleError(m)}};
App.prototype.saveFile=function(a,d){var c=this.getCurrentFile();if(null!=c){var b=mxUtils.bind(this,function(){EditorUi.enableDrafts&&c.removeDraft();this.getCurrentFile()==c||c.isModified()||(c.getMode()!=App.MODE_DEVICE?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved"))):this.editor.setStatus(""));null!=d&&d()});if(a||null==c.getTitle()||null==this.mode){var g=null!=c.getTitle()?c.getTitle():this.defaultFilename,f=!mxClient.IS_IOS||!navigator.standalone,k=this.mode,
l=this.getServiceCount(!0);isLocalStorage&&l++;var n=4>=l?2:6<l?4:3,g=new CreateDialog(this,g,mxUtils.bind(this,function(a,c,d){null!=a&&0<a.length&&(/(\.pdf)$/i.test(a)?this.confirm(mxResources.get("didYouMeanToExportToPdf"),mxUtils.bind(this,function(){this.hideDialog();this.actions.get("exportPdf").funct()}),mxUtils.bind(this,function(){d.value=a.split(".").slice(0,-1).join(".");d.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?d.select():document.execCommand("selectAll",
!1,null)}),mxResources.get("yes"),mxResources.get("no")):(this.hideDialog(),null==k&&c==App.MODE_DEVICE?(this.setMode(App.MODE_DEVICE),this.save(a,b)):"download"==c?(new LocalFile(this,null,a)).save():"_blank"==c?(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(this.getFileData(!0)),this.openLink(this.getUrl(window.location.pathname),null,!0)):k!=c?this.pickFolder(c,mxUtils.bind(this,function(d){this.createFile(a,this.getFileData(/(\.xml)$/i.test(a)||0>a.indexOf(".")||
/(\.drawio)$/i.test(a),/(\.svg)$/i.test(a),/(\.html)$/i.test(a)),null,c,b,null==this.mode,d)})):null!=c&&this.save(a,b)))}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),null,null,f,null,!0,n,null,null,null,this.editor.fileExtensions,!1);this.showDialog(g.container,400,l>n?390:270,!0,!0);g.init()}else this.save(c.getTitle(),b)}};
App.prototype.loadTemplate=function(a,d,c,b){var g=!1,f=a;this.editor.isCorsEnabledForUrl(f)||(f="t="+(new Date).getTime(),f=PROXY_URL+"?url="+encodeURIComponent(a)+"&base64=1&"+f,g=!0);var k=null!=b?b:a;this.loadUrl(f,mxUtils.bind(this,function(b){try{var f=g?!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(b):atob(b):b;if(/(\.v(dx|sdx?))($|\?)/i.test(k)||this.isVisioData(f))this.importVisio(this.base64ToBlob(b.substring(b.indexOf(",")+1)),function(a){d(a)},c,k);else if(!this.isOffline()&&
-(new XMLHttpRequest).upload&&this.isRemoteFileFormat(f,k))this.parseFile(new Blob([f],{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)}),a);else if(this.isLucidChartData(f))this.convertLucidChart(f,mxUtils.bind(this,function(a){d(a)}),mxUtils.bind(this,function(a){c(a)}));else{if(/(\.png)($|\?)/i.test(k)||this.isPngData(f))f=this.extractGraphModelFromPng(b);d(f)}}catch(u){c(u)}}),
+(new XMLHttpRequest).upload&&this.isRemoteFileFormat(f,k))this.parseFile(new Blob([f],{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)}),a);else if(this.isLucidChartData(f))this.convertLucidChart(f,mxUtils.bind(this,function(a){d(a)}),mxUtils.bind(this,function(a){c(a)}));else{if(/(\.png)($|\?)/i.test(k)||this.isPngData(f))f=this.extractGraphModelFromPng(b);d(f)}}catch(t){c(t)}}),
c,/(\.png)($|\?)/i.test(k)||/(\.v(dx|sdx?))($|\?)/i.test(k),null,null,g)};App.prototype.getPeerForMode=function(a){return a==App.MODE_GOOGLE?this.drive:a==App.MODE_GITHUB?this.gitHub:a==App.MODE_GITLAB?this.gitLab:a==App.MODE_DROPBOX?this.dropbox:a==App.MODE_ONEDRIVE?this.oneDrive:a==App.MODE_TRELLO?this.trello:null};
-App.prototype.createFile=function(a,d,c,b,g,f,k,l,n){b=l?null:null!=b?b:this.mode;if(null!=a&&this.spinner.spin(document.body,mxResources.get("inserting"))){d=null!=d?d:this.emptyDiagramXml;var u=mxUtils.bind(this,function(){this.spinner.stop()}),e=mxUtils.bind(this,function(a){u();null==a&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():null!=a&&this.handleError(a)});try{if(b==App.MODE_GOOGLE&&null!=this.drive)null==k&&null!=this.stateArg&&null!=this.stateArg.folderId&&(k=this.stateArg.folderId),
-this.drive.insertFile(a,d,k,mxUtils.bind(this,function(a){u();this.fileCreated(a,c,f,g,n)}),e);else if(b==App.MODE_GITHUB&&null!=this.gitHub)this.gitHub.insertFile(a,d,mxUtils.bind(this,function(a){u();this.fileCreated(a,c,f,g,n)}),e,!1,k);else if(b==App.MODE_GITLAB&&null!=this.gitLab)this.gitLab.insertFile(a,d,mxUtils.bind(this,function(a){u();this.fileCreated(a,c,f,g,n)}),e,!1,k);else if(b==App.MODE_TRELLO&&null!=this.trello)this.trello.insertFile(a,d,mxUtils.bind(this,function(a){u();this.fileCreated(a,
-c,f,g,n)}),e,!1,k);else if(b==App.MODE_DROPBOX&&null!=this.dropbox)this.dropbox.insertFile(a,d,mxUtils.bind(this,function(a){u();this.fileCreated(a,c,f,g,n)}),e);else if(b==App.MODE_ONEDRIVE&&null!=this.oneDrive)this.oneDrive.insertFile(a,d,mxUtils.bind(this,function(a){u();this.fileCreated(a,c,f,g,n)}),e,!1,k);else if(b==App.MODE_BROWSER){u();var m=mxUtils.bind(this,function(){var b=new StorageFile(this,d,a);b.saveFile(a,!1,mxUtils.bind(this,function(){this.fileCreated(b,c,f,g,n)}),e)});null==localStorage.getItem(a)?
-m():this.confirm(mxResources.get("replaceIt",[a]),m,mxUtils.bind(this,function(){null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))}else u(),this.fileCreated(new LocalFile(this,d,a,null==b),c,f,g,n)}catch(p){u(),this.handleError(p)}}};
-App.prototype.fileCreated=function(a,d,c,b,g){var f=window.location.pathname;null!=d&&0<d.length&&(f+="?libs="+d);null!=g&&0<g.length&&(f+="?clibs="+g);f=this.getUrl(f);a.getMode()!=App.MODE_DEVICE&&(f+="#"+a.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var k=a.getData(),k=0<k.length?this.editor.extractGraphModel(mxUtils.parseXml(k).documentElement,!0):null,l=window.location.protocol+"//"+window.location.hostname+f,n=k,u=null;null!=k&&/\.svg$/i.test(a.getTitle())&&
-(u=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(u.container),n=this.decodeNodeIntoGraph(n,u));a.setData(this.createFileData(k,u,a,l));null!=u&&u.container.parentNode.removeChild(u.container);var e=mxUtils.bind(this,function(){this.spinner.stop()}),m=mxUtils.bind(this,function(){e();var k=this.getCurrentFile();null==c&&null!=k&&(c=!k.isModified()&&null==k.getMode());var l=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(a);c&&a.addAllSavedStatus();
+App.prototype.createFile=function(a,d,c,b,g,f,k,l,n){b=l?null:null!=b?b:this.mode;if(null!=a&&this.spinner.spin(document.body,mxResources.get("inserting"))){d=null!=d?d:this.emptyDiagramXml;var t=mxUtils.bind(this,function(){this.spinner.stop()}),e=mxUtils.bind(this,function(a){t();null==a&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():null!=a&&this.handleError(a)});try{if(b==App.MODE_GOOGLE&&null!=this.drive)null==k&&null!=this.stateArg&&null!=this.stateArg.folderId&&(k=this.stateArg.folderId),
+this.drive.insertFile(a,d,k,mxUtils.bind(this,function(a){t();this.fileCreated(a,c,f,g,n)}),e);else if(b==App.MODE_GITHUB&&null!=this.gitHub)this.gitHub.insertFile(a,d,mxUtils.bind(this,function(a){t();this.fileCreated(a,c,f,g,n)}),e,!1,k);else if(b==App.MODE_GITLAB&&null!=this.gitLab)this.gitLab.insertFile(a,d,mxUtils.bind(this,function(a){t();this.fileCreated(a,c,f,g,n)}),e,!1,k);else if(b==App.MODE_TRELLO&&null!=this.trello)this.trello.insertFile(a,d,mxUtils.bind(this,function(a){t();this.fileCreated(a,
+c,f,g,n)}),e,!1,k);else if(b==App.MODE_DROPBOX&&null!=this.dropbox)this.dropbox.insertFile(a,d,mxUtils.bind(this,function(a){t();this.fileCreated(a,c,f,g,n)}),e);else if(b==App.MODE_ONEDRIVE&&null!=this.oneDrive)this.oneDrive.insertFile(a,d,mxUtils.bind(this,function(a){t();this.fileCreated(a,c,f,g,n)}),e,!1,k);else if(b==App.MODE_BROWSER){t();var m=mxUtils.bind(this,function(){var b=new StorageFile(this,d,a);b.saveFile(a,!1,mxUtils.bind(this,function(){this.fileCreated(b,c,f,g,n)}),e)});null==localStorage.getItem(a)?
+m():this.confirm(mxResources.get("replaceIt",[a]),m,mxUtils.bind(this,function(){null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))}else t(),this.fileCreated(new LocalFile(this,d,a,null==b),c,f,g,n)}catch(p){t(),this.handleError(p)}}};
+App.prototype.fileCreated=function(a,d,c,b,g){var f=window.location.pathname;null!=d&&0<d.length&&(f+="?libs="+d);null!=g&&0<g.length&&(f+="?clibs="+g);f=this.getUrl(f);a.getMode()!=App.MODE_DEVICE&&(f+="#"+a.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var k=a.getData(),k=0<k.length?this.editor.extractGraphModel(mxUtils.parseXml(k).documentElement,!0):null,l=window.location.protocol+"//"+window.location.hostname+f,n=k,t=null;null!=k&&/\.svg$/i.test(a.getTitle())&&
+(t=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(t.container),n=this.decodeNodeIntoGraph(n,t));a.setData(this.createFileData(k,t,a,l));null!=t&&t.container.parentNode.removeChild(t.container);var e=mxUtils.bind(this,function(){this.spinner.stop()}),m=mxUtils.bind(this,function(){e();var k=this.getCurrentFile();null==c&&null!=k&&(c=!k.isModified()&&null==k.getMode());var l=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(a);c&&a.addAllSavedStatus();
null!=d&&this.sidebar.showEntries(d);if(null!=g){for(var b=[],e=g.split(";"),f=0;f<e.length;f++)b.push(decodeURIComponent(e[f]));this.loadLibraries(b)}}),m=mxUtils.bind(this,function(){c||null==k||!k.isModified()?l():this.confirm(mxResources.get("allChangesLost"),null,l,mxResources.get("cancel"),mxResources.get("discardChanges"))});null!=b&&b();null==c||c?m():(a.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(a.getData(),a.getTitle(),
null==a.getMode())),null!=b&&b(),window.openWindow(f,null,m))});a.constructor==LocalFile?m():a.saveFile(a.getTitle(),!1,mxUtils.bind(this,function(){m()}),mxUtils.bind(this,function(a){e();this.handleError(a)}))}};
App.prototype.loadFile=function(a,d,c,b,g){this.hideDialog();var f=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){var f=mxUtils.bind(this,function(a){this.handleError(a,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=a?a.getHash():""}))});a=decodeURIComponent(a.substring(1));
StorageFile.getFileContent(this,a,mxUtils.bind(this,function(c){null!=c?(this.fileLoaded(new StorageFile(this,c,a)),null!=b&&b()):f({message:mxResources.get("fileNotFound")})}),f)}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!=c)this.spinner.stop(),this.fileLoaded(c),null!=b&&b();else if("S"==a.charAt(0)){this.spinner.stop();
-try{this.loadDescriptor(JSON.parse(Graph.decompress(a.substring(1))),b,mxUtils.bind(this,function(a){this.handleError(a,mxResources.get("errorLoadingFile"))}))}catch(q){this.handleError(q,mxResources.get("errorLoadingFile"))}}else if("R"==a.charAt(0)){this.spinner.stop();var g=decodeURIComponent(a.substring(1));"<"!=g.charAt(0)&&(g=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);
+try{this.loadDescriptor(JSON.parse(Graph.decompress(a.substring(1))),b,mxUtils.bind(this,function(a){this.handleError(a,mxResources.get("errorLoadingFile"))}))}catch(v){this.handleError(v,mxResources.get("errorLoadingFile"))}}else if("R"==a.charAt(0)){this.spinner.stop();var g=decodeURIComponent(a.substring(1));"<"!=g.charAt(0)&&(g=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!=b&&b()}else if("U"==a.charAt(0)){var e=decodeURIComponent(a.substring(1)),k=mxUtils.bind(this,function(){if("https://drive.google.com/uc?id="!=e.substring(0,31)||null==this.drive&&"function"!==typeof window.DriveClient)return!1;this.hideDialog();var a=mxUtils.bind(this,function(){this.spinner.stop();if(null!=this.drive){var a=e.substring(31,e.lastIndexOf("&ex"));this.loadFile("G"+a,d,null,mxUtils.bind(this,function(){var c=this.getCurrentFile();null!=c&&this.editor.chromeless&&!this.editor.editable&&
(c.getHash=function(){return"G"+a},window.location.hash="#"+c.getHash());null!=b&&b()}));return!0}return!1});!a()&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.addListener("clientLoaded",a);return!0});this.loadTemplate(e,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=e,f=e.lastIndexOf("."),g=d.lastIndexOf("/");f>g&&0<g&&(d=d.substring(g+1,f),f=e.substring(f),this.useCanvasForExport||
".png"!=f||(f=".drawio"),".svg"===f||".xml"===f||".html"===f||".png"===f||".drawio"===f)&&(c=d+f)}b=new LocalFile(this,b,null!=urlParams.title?decodeURIComponent(urlParams.title):c,!0);b.getHash=function(){return a};this.fileLoaded(b,!0)||k()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}else k()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}),mxUtils.bind(this,function(){k()||(this.spinner.stop(),
@@ -9991,9 +9992,9 @@ App.prototype.getLibraryStorageHint=function(a){var d=a.getTitle();a.constructor
mxResources.get("browser")+")":a.constructor==LocalLibrary&&(d+=" ("+mxResources.get("device")+")");return d};App.prototype.restoreLibraries=function(){this.loadLibraries(mxSettings.getCustomLibraries(),mxUtils.bind(this,function(){this.loadLibraries((urlParams.clibs||"").split(";"))}))};
App.prototype.loadLibraries=function(a,d){if(null!=this.sidebar){null==this.pendingLibraries&&(this.pendingLibraries={});var c=mxUtils.bind(this,function(a,b){b||mxSettings.removeCustomLibrary(a);delete this.pendingLibraries[a]}),b=0,g=[],f=mxUtils.bind(this,function(){if(0==b){if(null!=a)for(var c=a.length-1;0<=c;c--)null!=g[c]&&this.loadLibrary(g[c]);null!=d&&d()}});if(null!=a)for(var k=0;k<a.length;k++){var l=encodeURIComponent(decodeURIComponent(a[k]));mxUtils.bind(this,function(a,d){if(null!=
a&&0<a.length&&null==this.pendingLibraries[a]&&null==this.sidebar.palettes[a]){b++;var e=mxUtils.bind(this,function(c){delete this.pendingLibraries[a];g[d]=c;b--;f()}),k=mxUtils.bind(this,function(d){c(a,d);b--;f()});this.pendingLibraries[a]=!0;var l=a.substring(0,1);if("L"==l)(isLocalStorage||mxClient.IS_CHROMEAPP)&&window.setTimeout(mxUtils.bind(this,function(){try{var b=decodeURIComponent(a.substring(1));StorageFile.getFileContent(this,b,mxUtils.bind(this,function(a){".scratchpad"==b&&null==a&&
-(a=this.emptyLibraryXml);null!=a?e(new StorageLibrary(this,a,b)):k()}),k)}catch(y){k()}}),0);else if("U"==l){var n=decodeURIComponent(a.substring(1));if(!this.isOffline()){l=n;this.editor.isCorsEnabledForUrl(l)||(l="t="+(new Date).getTime(),l=PROXY_URL+"?url="+encodeURIComponent(n)+"&"+l);try{mxUtils.get(l,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus())try{e(new UrlLibrary(this,a.getText(),n))}catch(y){k()}else k()}),function(){k()})}catch(z){k()}}}else if("R"==l){if(l=decodeURIComponent(a.substring(1)),
-!this.isOffline())try{var l=JSON.parse(l),u={id:l[0],title:l[1],downloadUrl:l[2]};this.remoteInvoke("getFileContent",[u.downloadUrl],null,mxUtils.bind(this,function(a){try{e(new RemoteLibrary(this,a,u))}catch(y){k()}}),function(){k()})}catch(z){k()}}else if("S"==l&&null!=this.loadDesktopLib)try{this.loadDesktopLib(decodeURIComponent(a.substring(1)),function(a){e(a)},k)}catch(z){k()}else{var v=null;"G"==l?null!=this.drive&&null!=this.drive.user&&(v=this.drive):"H"==l?null!=this.gitHub&&null!=this.gitHub.getUser()&&
-(v=this.gitHub):"T"==l?null!=this.trello&&this.trello.isAuthorized()&&(v=this.trello):"D"==l?null!=this.dropbox&&null!=this.dropbox.getUser()&&(v=this.dropbox):"W"==l&&null!=this.oneDrive&&null!=this.oneDrive.getUser()&&(v=this.oneDrive);null!=v?v.getLibrary(decodeURIComponent(a.substring(1)),mxUtils.bind(this,function(a){try{e(a)}catch(y){k()}}),function(a){k()}):k(!0)}}})(l,k)}f()}};
+(a=this.emptyLibraryXml);null!=a?e(new StorageLibrary(this,a,b)):k()}),k)}catch(x){k()}}),0);else if("U"==l){var n=decodeURIComponent(a.substring(1));if(!this.isOffline()){l=n;this.editor.isCorsEnabledForUrl(l)||(l="t="+(new Date).getTime(),l=PROXY_URL+"?url="+encodeURIComponent(n)+"&"+l);try{mxUtils.get(l,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus())try{e(new UrlLibrary(this,a.getText(),n))}catch(x){k()}else k()}),function(){k()})}catch(y){k()}}}else if("R"==l){if(l=decodeURIComponent(a.substring(1)),
+!this.isOffline())try{var l=JSON.parse(l),t={id:l[0],title:l[1],downloadUrl:l[2]};this.remoteInvoke("getFileContent",[t.downloadUrl],null,mxUtils.bind(this,function(a){try{e(new RemoteLibrary(this,a,t))}catch(x){k()}}),function(){k()})}catch(y){k()}}else if("S"==l&&null!=this.loadDesktopLib)try{this.loadDesktopLib(decodeURIComponent(a.substring(1)),function(a){e(a)},k)}catch(y){k()}else{var u=null;"G"==l?null!=this.drive&&null!=this.drive.user&&(u=this.drive):"H"==l?null!=this.gitHub&&null!=this.gitHub.getUser()&&
+(u=this.gitHub):"T"==l?null!=this.trello&&this.trello.isAuthorized()&&(u=this.trello):"D"==l?null!=this.dropbox&&null!=this.dropbox.getUser()&&(u=this.dropbox):"W"==l&&null!=this.oneDrive&&null!=this.oneDrive.getUser()&&(u=this.oneDrive);null!=u?u.getLibrary(decodeURIComponent(a.substring(1)),mxUtils.bind(this,function(a){try{e(a)}catch(x){k()}}),function(a){k()}):k(!0)}}})(l,k)}f()}};
App.prototype.updateButtonContainer=function(){if(null!=this.buttonContainer){var a=this.getCurrentFile();this.commentsSupported()?null==this.commentButton&&(this.commentButton=document.createElement("a"),this.commentButton.setAttribute("title",mxResources.get("comments")),this.commentButton.className="geToolbarButton",this.commentButton.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;float:left;cursor:pointer;width:24px;height:24px;background-size:24px 24px;background-position:center center;background-repeat:no-repeat;background-image:url("+
Editor.commentImage+");","atlas"==uiTheme?(this.commentButton.style.marginRight="10px",this.commentButton.style.marginTop="-3px"):this.commentButton.style.marginTop="min"==uiTheme?"1px":"-5px",mxEvent.addListener(this.commentButton,"click",mxUtils.bind(this,function(){this.actions.get("comments").funct()})),this.buttonContainer.appendChild(this.commentButton),"dark"==uiTheme||"atlas"==uiTheme)&&(this.commentButton.style.filter="invert(100%)"):null!=this.commentButton&&(this.commentButton.parentNode.removeChild(this.commentButton),
this.commentButton=null);null!=a&&a.constructor==DriveFile?null==this.shareButton&&(this.shareButton=document.createElement("div"),this.shareButton.className="geBtn gePrimaryBtn",this.shareButton.style.display="inline-block",this.shareButton.style.backgroundColor="#F2931E",this.shareButton.style.borderColor="#F08705",this.shareButton.style.backgroundImage="none",this.shareButton.style.padding="2px 10px 0 10px",this.shareButton.style.marginTop="-10px",this.shareButton.style.height="28px",this.shareButton.style.lineHeight=
@@ -10009,10 +10010,10 @@ c():this.confirm(mxResources.get("replaceIt",[d]),c))};
App.prototype.descriptorChanged=function(){var a=this.getCurrentFile();if(null!=a){if(null!=this.fname){this.fnameWrapper.style.display="block";this.fname.innerHTML="";var d=null!=a.getTitle()?a.getTitle():this.defaultFilename;mxUtils.write(this.fname,d);this.fname.setAttribute("title",d+" - "+mxResources.get("rename"))}var d=this.editor.graph,c=a.isEditable()&&!a.invalidChecksum;d.isEnabled()&&!c&&d.reset();d.setEnabled(c);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.editor.graph.isSelectionEmpty()&&this.format.refresh()};
App.prototype.showAuthDialog=function(a,d,c,b){var g=this.spinner.pause();this.showDialog((new AuthDialog(this,a,d,mxUtils.bind(this,function(a){try{null!=c&&c(a,mxUtils.bind(this,function(){this.hideDialog();g()}))}catch(k){this.editor.setStatus(mxUtils.htmlEntities(k.message))}}))).container,300,d?180:140,!0,!0,mxUtils.bind(this,function(a){null!=b&&b();a&&null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))};
-App.prototype.convertFile=function(a,d,c,b,g,f,k,l){var n=d;/\.svg$/i.test(n)||(n=n.substring(0,d.lastIndexOf("."))+b);var u=!1;null!=this.gitHub&&a.substring(0,this.gitHub.baseUrl.length)==this.gitHub.baseUrl&&(u=!0);if(/\.v(dx|sdx?)$/i.test(d)&&Graph.fileSupport&&(new XMLHttpRequest).upload&&"string"===typeof(new XMLHttpRequest).responseType){var e=new XMLHttpRequest;e.open("GET",a,!0);u||(e.responseType="blob");if(l)for(var m in l)e.setRequestHeader(m,l[m]);e.onload=mxUtils.bind(this,function(){if(200<=
-e.status&&299>=e.status){var a=null;u?(a=JSON.parse(e.responseText),a=this.base64ToBlob(a.content,"application/octet-stream")):a=new Blob([e.response],{type:"application/octet-stream"});this.importVisio(a,mxUtils.bind(this,function(a){g(new LocalFile(this,a,n,!0))}),f,d)}else null!=f&&f({message:mxResources.get("errorLoadingFile")})});e.onerror=f;e.send()}else{var p=mxUtils.bind(this,function(b){try{if(/\.pdf$/i.test(d)){var c=Editor.extractGraphModelFromPdf(b);null!=c&&0<c.length&&g(new LocalFile(this,
-c,n,!0))}else/\.png$/i.test(d)?(c=this.extractGraphModelFromPng(b),null!=c?g(new LocalFile(this,c,n,!0)):g(new LocalFile(this,b,d,!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,n,!0)):null!=f&&f({message:mxResources.get("errorLoadingFile")}))}),d):g(new LocalFile(this,b,n,!0))}catch(v){null!=
-f&&f(v)}});c=/\.png$/i.test(d)||/\.jpe?g$/i.test(d)||/\.pdf$/i.test(d)||null!=c&&"image/"==c.substring(0,6);u?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(d)?"data:image/png;base64,"+b:/\.pdf$/i.test(d)?"data:application/pdf;base64,"+b:!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(b):atob(b));p(b)}}else null!=f&&f({code:App.ERROR_UNKNOWN})}),function(){null!=
+App.prototype.convertFile=function(a,d,c,b,g,f,k,l){var n=d;/\.svg$/i.test(n)||(n=n.substring(0,d.lastIndexOf("."))+b);var t=!1;null!=this.gitHub&&a.substring(0,this.gitHub.baseUrl.length)==this.gitHub.baseUrl&&(t=!0);if(/\.v(dx|sdx?)$/i.test(d)&&Graph.fileSupport&&(new XMLHttpRequest).upload&&"string"===typeof(new XMLHttpRequest).responseType){var e=new XMLHttpRequest;e.open("GET",a,!0);t||(e.responseType="blob");if(l)for(var m in l)e.setRequestHeader(m,l[m]);e.onload=mxUtils.bind(this,function(){if(200<=
+e.status&&299>=e.status){var a=null;t?(a=JSON.parse(e.responseText),a=this.base64ToBlob(a.content,"application/octet-stream")):a=new Blob([e.response],{type:"application/octet-stream"});this.importVisio(a,mxUtils.bind(this,function(a){g(new LocalFile(this,a,n,!0))}),f,d)}else null!=f&&f({message:mxResources.get("errorLoadingFile")})});e.onerror=f;e.send()}else{var p=mxUtils.bind(this,function(b){try{if(/\.pdf$/i.test(d)){var c=Editor.extractGraphModelFromPdf(b);null!=c&&0<c.length&&g(new LocalFile(this,
+c,n,!0))}else/\.png$/i.test(d)?(c=this.extractGraphModelFromPng(b),null!=c?g(new LocalFile(this,c,n,!0)):g(new LocalFile(this,b,d,!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,n,!0)):null!=f&&f({message:mxResources.get("errorLoadingFile")}))}),d):g(new LocalFile(this,b,n,!0))}catch(u){null!=
+f&&f(u)}});c=/\.png$/i.test(d)||/\.jpe?g$/i.test(d)||/\.pdf$/i.test(d)||null!=c&&"image/"==c.substring(0,6);t?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(d)?"data:image/png;base64,"+b:/\.pdf$/i.test(d)?"data:application/pdf;base64,"+b:!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(b):atob(b));p(b)}}else null!=f&&f({code:App.ERROR_UNKNOWN})}),function(){null!=
f&&f({code:App.ERROR_UNKNOWN})},!1,this.timeout,function(){null!=f&&f({code:App.ERROR_TIMEOUT,retry:fn})},l):null!=k?k(a,p,f,c):this.loadUrl(a,p,f,c,null,null,null,l)}};
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="32px";this.appIcon.style.height=this.menubarHeight-28+"px";this.appIcon.style.margin="14px 0px 8px 16px";this.appIcon.style.opacity="0.85";this.appIcon.style.borderRadius="3px";"dark"!=uiTheme&&(this.appIcon.style.backgroundColor="#f08705");mxEvent.disableContextMenu(this.appIcon);mxEvent.addListener(this.appIcon,
"click",mxUtils.bind(this,function(a){this.appIconClicked(a)}));var a=mxClient.IS_SVG?"dark"==uiTheme?"url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIKICAgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMzA2LjE4NSAxMjAuMjk2IgogICB2aWV3Qm94PSIyNCAyNiA2OCA2OCIKICAgeT0iMHB4IgogICB4PSIwcHgiCiAgIHZlcnNpb249IjEuMSI+CiAgIAkgPGc+PGxpbmUKICAgICAgIHkyPSI3Mi4zOTQiCiAgICAgICB4Mj0iNDEuMDYxIgogICAgICAgeTE9IjQzLjM4NCIKICAgICAgIHgxPSI1OC4wNjkiCiAgICAgICBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiCiAgICAgICBzdHJva2Utd2lkdGg9IjMuNTUyOCIKICAgICAgIHN0cm9rZT0iI0ZGRkZGRiIKICAgICAgIGZpbGw9Im5vbmUiIC8+PGxpbmUKICAgICAgIHkyPSI3Mi4zOTQiCiAgICAgICB4Mj0iNzUuMDc2IgogICAgICAgeTE9IjQzLjM4NCIKICAgICAgIHgxPSI1OC4wNjgiCiAgICAgICBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiCiAgICAgICBzdHJva2Utd2lkdGg9IjMuNTAwOCIKICAgICAgIHN0cm9rZT0iI0ZGRkZGRiIKICAgICAgIGZpbGw9Im5vbmUiIC8+PGc+PHBhdGgKICAgICAgICAgZD0iTTUyLjc3Myw3Ny4wODRjMCwxLjk1NC0xLjU5OSwzLjU1My0zLjU1MywzLjU1M0gzNi45OTljLTEuOTU0LDAtMy41NTMtMS41OTktMy41NTMtMy41NTN2LTkuMzc5ICAgIGMwLTEuOTU0LDEuNTk5LTMuNTUzLDMuNTUzLTMuNTUzaDEyLjIyMmMxLjk1NCwwLDMuNTUzLDEuNTk5LDMuNTUzLDMuNTUzVjc3LjA4NHoiCiAgICAgICAgIGZpbGw9IiNGRkZGRkYiIC8+PC9nPjxnCiAgICAgICBpZD0iZzM0MTkiPjxwYXRoCiAgICAgICAgIGQ9Ik02Ny43NjIsNDguMDc0YzAsMS45NTQtMS41OTksMy41NTMtMy41NTMsMy41NTNINTEuOTg4Yy0xLjk1NCwwLTMuNTUzLTEuNTk5LTMuNTUzLTMuNTUzdi05LjM3OSAgICBjMC0xLjk1NCwxLjU5OS0zLjU1MywzLjU1My0zLjU1M0g2NC4yMWMxLjk1NCwwLDMuNTUzLDEuNTk5LDMuNTUzLDMuNTUzVjQ4LjA3NHoiCiAgICAgICAgIGZpbGw9IiNGRkZGRkYiIC8+PC9nPjxnPjxwYXRoCiAgICAgICAgIGQ9Ik04Mi43NTIsNzcuMDg0YzAsMS45NTQtMS41OTksMy41NTMtMy41NTMsMy41NTNINjYuOTc3Yy0xLjk1NCwwLTMuNTUzLTEuNTk5LTMuNTUzLTMuNTUzdi05LjM3OSAgICBjMC0xLjk1NCwxLjU5OS0zLjU1MywzLjU1My0zLjU1M2gxMi4yMjJjMS45NTQsMCwzLjU1MywxLjU5OSwzLjU1MywzLjU1M1Y3Ny4wODR6IgogICAgICAgICBmaWxsPSIjRkZGRkZGIiAvPjwvZz48L2c+PC9zdmc+)":
@@ -10057,7 +10058,7 @@ App.prototype.getCurrentUser=function(){var a=null;null!=this.drive&&null!=this.
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,b){null!=a&&a.firstChild.nextSibling.appendChild(this.createHelpLink(b))};
var d=Menus.prototype.init;Menus.prototype.init=function(){function a(a,b,c){this.ui=a;this.previousExtFonts=this.extFonts=b;this.prevCustomFonts=this.customFonts=c}d.apply(this,arguments);var b=this.editorUi,g=b.editor.graph,f=mxUtils.bind(g,g.isEnabled),k=("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&mxClient.IS_SVG&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode),l=("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||"app.diagrams.net"==window.location.hostname)&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&!mxClient.IS_IOS&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode),u=("1"!=urlParams.embed&&"0"!=urlParams.tr||"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||"app.diagrams.net"==window.location.hostname)&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&!mxClient.IS_IOS&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode),t=("1"!=urlParams.embed&&"0"!=urlParams.tr||"1"==urlParams.embed&&
"1"==urlParams.tr)&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode);mxClient.IS_SVG||b.isOffline()||((new Image).src=IMAGE_PATH+"/help.png");b.actions.addAction("new...",function(){var a=b.isOffline(),c=new NewDialog(b,a);b.showDialog(c.container,a?350:620,a?70:440,!0,!0,function(a){a&&null==b.getCurrentFile()&&b.showSplash()});c.init()});b.actions.put("exportSvg",new Action(mxResources.get("formatSvg")+"...",function(){b.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),
"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(a,c,d,e,f,g,k,l,m,n){a=parseInt(a);!isNaN(a)&&0<a&&b.exportSvg(a/100,c,d,e,f,g,k,!l,m,n)}),!0,null,"svg")}));b.actions.put("insertTemplate",new Action(mxResources.get("template")+"...",function(){var a=new NewDialog(b,null,!1,function(a){b.hideDialog();if(null!=a){var c=b.editor.graph.getFreeInsertPoint();g.setSelectionCells(b.importXml(a,Math.max(c.x,20),Math.max(c.y,20),!0));g.scrollCellToVisible(g.getSelectionCell())}},
null,null,null,null,null,null,null,null,null,null,!1,mxResources.get("insert"));b.showDialog(a.container,620,440,!0,!0)})).isEnabled=f;var e=b.actions.addAction("points",function(){b.editor.graph.view.setUnit(mxConstants.POINTS)});e.setToggleAction(!0);e.setSelectedCallback(function(){return b.editor.graph.view.unit==mxConstants.POINTS});e=b.actions.addAction("inches",function(){b.editor.graph.view.setUnit(mxConstants.INCHES)});e.setToggleAction(!0);e.setSelectedCallback(function(){return b.editor.graph.view.unit==
@@ -10089,15 +10090,15 @@ e.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.tagsWindow&
b.fireEvent(new mxEventObject("find"))):this.findWindow.window.setVisible(!this.findWindow.window.isVisible())}));e.setToggleAction(!0);e.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.findWindow&&this.findWindow.window.isVisible()}));b.actions.put("exportVsdx",new Action(mxResources.get("formatVsdx")+" (beta)...",function(){b.exportVisio()}));isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed&&b.actions.addAction("configuration...",function(){var a=localStorage.getItem(".configuration"),
a=new TextareaDialog(b,mxResources.get("configuration")+":",null!=a?JSON.stringify(JSON.parse(a),null,2):"",function(a){if(null!=a)try{if(0<a.length){var c=JSON.parse(a);localStorage.setItem(".configuration",JSON.stringify(c))}else localStorage.removeItem(".configuration");b.hideDialog();b.alert(mxResources.get("restartForChangeRequired"))}catch(D){b.handleError(D)}},null,null,null,null,null,!0,null,null,"https://desk.draw.io/support/solutions/articles/16000058316",EditorUi.isElectronApp?null:[[mxResources.get("reset"),
function(a,c){b.confirm(mxResources.get("areYouSure"),function(){try{localStorage.removeItem(".configuration"),localStorage.removeItem(".drawio-config"),localStorage.removeItem(".mode"),b.hideDialog(),b.alert(mxResources.get("restartForChangeRequired"))}catch(D){b.handleError(D)}})}],[mxResources.get("link"),function(a,c){if(0<c.value.length)try{var d=JSON.parse(c.value),e=window.location.protocol+"//"+window.location.host+"/"+b.getSearch()+"#_CONFIG_"+Graph.compress(JSON.stringify(d)),f=new EmbedDialog(b,
-e);b.showDialog(f.container,440,240,!0);f.init()}catch(G){b.handleError(G)}else b.handleError({message:mxResources.get("invalidInput")})}]]);a.textarea.style.width="600px";a.textarea.style.height="380px";b.showDialog(a.container,620,460,!0,!1);a.init()});if(mxClient.IS_CHROMEAPP||isLocalStorage){this.put("language",new Menu(mxUtils.bind(this,function(a,c){var d=mxUtils.bind(this,function(d){var e=""==d?mxResources.get("automatic"):mxLanguageMap[d],f=null;""!=e&&(f=a.addItem(e,null,mxUtils.bind(this,
-function(){mxSettings.setLanguage(d);mxSettings.save();mxClient.language=d;mxResources.loadDefaultBundle=!1;mxResources.add(RESOURCE_BASE);b.alert(mxResources.get("restartForChangeRequired"))}),c),(d==mxLanguage||""==d&&null==mxLanguage)&&a.addCheckmark(f,Editor.checkmarkImage));return f});d("");a.addSeparator(c);for(var e in mxLanguageMap)d(e)})));var q=Menus.prototype.createMenubar;Menus.prototype.createMenubar=function(a){var b=q.apply(this,arguments);if(null!=b){var c=this.get("language");if(null!=
+e);b.showDialog(f.container,440,240,!0);f.init()}catch(H){b.handleError(H)}else b.handleError({message:mxResources.get("invalidInput")})}]]);a.textarea.style.width="600px";a.textarea.style.height="380px";b.showDialog(a.container,620,460,!0,!1);a.init()});if(mxClient.IS_CHROMEAPP||isLocalStorage){this.put("language",new Menu(mxUtils.bind(this,function(a,c){var d=mxUtils.bind(this,function(d){var e=""==d?mxResources.get("automatic"):mxLanguageMap[d],f=null;""!=e&&(f=a.addItem(e,null,mxUtils.bind(this,
+function(){mxSettings.setLanguage(d);mxSettings.save();mxClient.language=d;mxResources.loadDefaultBundle=!1;mxResources.add(RESOURCE_BASE);b.alert(mxResources.get("restartForChangeRequired"))}),c),(d==mxLanguage||""==d&&null==mxLanguage)&&a.addCheckmark(f,Editor.checkmarkImage));return f});d("");a.addSeparator(c);for(var e in mxLanguageMap)d(e)})));var v=Menus.prototype.createMenubar;Menus.prototype.createMenubar=function(a){var b=v.apply(this,arguments);if(null!=b){var c=this.get("language");if(null!=
c){c=b.addMenu("",c.funct);c.setAttribute("title",mxResources.get("language"));c.style.width="16px";c.style.paddingTop="2px";c.style.paddingLeft="4px";c.style.zIndex="1";c.style.position="absolute";c.style.display="block";c.style.cursor="pointer";c.style.right="17px";"atlas"==uiTheme?(c.style.top="6px",c.style.right="15px"):c.style.top="min"==uiTheme?"2px":"0px";if(mxClient.IS_VML)c.innerHTML='<div class="geIcon geSprite geSprite-globe"/>';else{var d=document.createElement("div");d.style.backgroundImage=
"url("+Editor.globeImage+")";d.style.backgroundPosition="center center";d.style.backgroundRepeat="no-repeat";d.style.backgroundSize="19px 19px";d.style.position="absolute";d.style.height="19px";d.style.width="19px";d.style.marginTop="2px";d.style.zIndex="1";c.appendChild(d);mxUtils.setOpacity(c,40);if("atlas"==uiTheme||"dark"==uiTheme)c.style.opacity="0.85",c.style.filter="invert(100%)"}document.body.appendChild(c)}}return b}}b.customLayoutConfig=[{layout:"mxHierarchicalLayout",config:{orientation:"west",
intraCellSpacing:30,interRankCellSpacing:100,interHierarchySpacing:60,parallelEdgeSpacing:10}}];b.actions.addAction("runLayout",function(){var a=new TextareaDialog(b,"Run Layouts:",JSON.stringify(b.customLayoutConfig,null,2),function(a){if(0<a.length)try{var c=JSON.parse(a);b.executeLayoutList(c);b.customLayoutConfig=c}catch(D){b.handleError(D),null!=window.console&&console.error(D)}});a.textarea.style.width="600px";a.textarea.style.height="380px";b.showDialog(a.container,620,460,!0,!0);a.init()});
-var e=this.get("layout"),t=e.funct;e.funct=function(a,c){t.apply(this,arguments);a.addSeparator(c);a.addItem(mxResources.get("orgChart")+"...",null,function(){var a=null,c=20,d=20,e=!0,f=function(){b.loadingOrgChart=!1;b.spinner.stop();if("undefined"!==typeof mxOrgChartLayout&&null!=a&&e){var f=b.editor.graph;(new mxOrgChartLayout(f,a,c,d)).execute(f.getDefaultParent());e=!1}},g=document.createElement("div"),k=document.createElement("div");k.style.marginTop="6px";k.style.display="inline-block";k.style.width=
+var e=this.get("layout"),q=e.funct;e.funct=function(a,c){q.apply(this,arguments);a.addSeparator(c);a.addItem(mxResources.get("orgChart")+"...",null,function(){var a=null,c=20,d=20,e=!0,f=function(){b.loadingOrgChart=!1;b.spinner.stop();if("undefined"!==typeof mxOrgChartLayout&&null!=a&&e){var f=b.editor.graph;(new mxOrgChartLayout(f,a,c,d)).execute(f.getDefaultParent());e=!1}},g=document.createElement("div"),k=document.createElement("div");k.style.marginTop="6px";k.style.display="inline-block";k.style.width=
"140px";mxUtils.write(k,mxResources.get("orgChartType")+": ");g.appendChild(k);var l=document.createElement("select");l.style.width="200px";l.style.boxSizing="border-box";for(var k=[mxResources.get("linear"),mxResources.get("hanger2"),mxResources.get("hanger4"),mxResources.get("fishbone1"),mxResources.get("fishbone2"),mxResources.get("1ColumnLeft"),mxResources.get("1ColumnRight"),mxResources.get("smart")],m=0;m<k.length;m++){var n=document.createElement("option");mxUtils.write(n,k[m]);n.value=m;2==
m&&n.setAttribute("selected","selected");l.appendChild(n)}mxEvent.addListener(l,"change",function(){a=l.value});g.appendChild(l);k=document.createElement("div");k.style.marginTop="6px";k.style.display="inline-block";k.style.width="140px";mxUtils.write(k,mxResources.get("parentChildSpacing")+": ");g.appendChild(k);var p=document.createElement("input");p.type="number";p.value=c;p.style.width="200px";p.style.boxSizing="border-box";g.appendChild(p);mxEvent.addListener(p,"change",function(){c=p.value});
-k=document.createElement("div");k.style.marginTop="6px";k.style.display="inline-block";k.style.width="140px";mxUtils.write(k,mxResources.get("siblingSpacing")+": ");g.appendChild(k);var x=document.createElement("input");x.type="number";x.value=d;x.style.width="200px";x.style.boxSizing="border-box";g.appendChild(x);mxEvent.addListener(x,"change",function(){d=x.value});g=new CustomDialog(b,g,function(){null==a&&(a=2);"undefined"!==typeof mxOrgChartLayout||b.loadingOrgChart||b.isOffline(!0)?f():b.spinner.spin(document.body,
+k=document.createElement("div");k.style.marginTop="6px";k.style.display="inline-block";k.style.width="140px";mxUtils.write(k,mxResources.get("siblingSpacing")+": ");g.appendChild(k);var u=document.createElement("input");u.type="number";u.value=d;u.style.width="200px";u.style.boxSizing="border-box";g.appendChild(u);mxEvent.addListener(u,"change",function(){d=u.value});g=new CustomDialog(b,g,function(){null==a&&(a=2);"undefined"!==typeof mxOrgChartLayout||b.loadingOrgChart||b.isOffline(!0)?f():b.spinner.spin(document.body,
mxResources.get("loading"))&&(b.loadingOrgChart=!0,"1"==urlParams.dev?mxscript("js/orgchart.min.js",f):mxscript("js/extensions.min.js",f))});b.showDialog(g.container,355,125,!0,!0)},c,null,f());a.addSeparator(c);b.menus.addMenuItem(a,"runLayout",c,null,null,mxResources.get("apply")+"...")};this.put("help",new Menu(mxUtils.bind(this,function(a,c){if(!mxClient.IS_CHROMEAPP&&b.isOffline())this.addMenuItems(a,["about"],c);else{var d=a.addItem("Search:",null,null,c,null,null,!1);d.style.backgroundColor=
"dark"==uiTheme?"#505759":"whiteSmoke";d.style.cursor="default";var e=document.createElement("input");e.setAttribute("type","text");e.setAttribute("size","25");e.style.marginLeft="8px";mxEvent.addListener(e,"keydown",mxUtils.bind(this,function(a){var b=mxUtils.trim(e.value);13==a.keyCode&&0<b.length?(this.editorUi.openLink("https://desk.draw.io/support/search/solutions?term="+encodeURIComponent(b)),e.value="",EditorUi.logEvent({category:"SEARCH-HELP",action:"search",label:b}),null!=this.editorUi.menubar&&
window.setTimeout(mxUtils.bind(this,function(){this.editorUi.menubar.hideMenu()}),0)):27==a.keyCode&&(e.value="")}));d.firstChild.nextSibling.appendChild(e);mxEvent.addGestureListeners(e,function(a){document.activeElement!=e&&e.focus();mxEvent.consume(a)},function(a){mxEvent.consume(a)},function(a){mxEvent.consume(a)});window.setTimeout(function(){e.focus()},0);this.addMenuItems(a,"- keyboardShortcuts quickStart - userManual support - about".split(" "),c)}"1"==urlParams.test&&(a.addSeparator(c),this.addSubmenu("testDevelop",
@@ -10106,12 +10107,12 @@ b.actions.addAction("createSidebarEntry",mxUtils.bind(this,function(){g.isSelect
b.actions.addAction("testCheckFile",mxUtils.bind(this,function(){var a=null!=b.pages&&null!=b.getCurrentFile()?b.getCurrentFile().getAnonymizedXmlForPages(b.pages):"",a=new TextareaDialog(b,"Paste Data:",a,function(a){if(0<a.length)try{var c=function(a){function b(a){if(null==n[a]){if(n[a]=!0,null!=e[a]){for(;0<e[a].length;){var d=e[a].pop();b(d)}delete e[a]}}else mxLog.debug(c+": Visited: "+a)}var c=a.parentNode.id,d=a.childNodes;a={};for(var e={},f=null,g={},k=0;k<d.length;k++){var l=d[k];if(null!=
l.id&&0<l.id.length)if(null==a[l.id]){a[l.id]=l.id;var m=l.getAttribute("parent");null==m?null!=f?mxLog.debug(c+": Multiple roots: "+l.id):f=l.id:(null==e[m]&&(e[m]=[]),e[m].push(l.id))}else g[l.id]=l.id}0<Object.keys(g).length?(d=c+": "+Object.keys(g).length+" Duplicates: "+Object.keys(g).join(", "),mxLog.debug(d+" (see console)")):mxLog.debug(c+": Checked");var n={};null==f?mxLog.debug(c+": No root"):(b(f),Object.keys(n).length!=Object.keys(a).length&&(mxLog.debug(c+": Invalid tree: (see console)"),
console.log(c+": Invalid tree",e)))};"<"!=a.charAt(0)&&(a=Graph.decompress(a),mxLog.debug("See console for uncompressed XML"),console.log("xml",a));var d=mxUtils.parseXml(a),e=b.getPagesForNode(d.documentElement,"mxGraphModel");if(null!=e&&0<e.length)try{var f=b.getHashValueForPages(e);mxLog.debug("Checksum: ",f)}catch(J){mxLog.debug("Error: ",J.message)}else mxLog.debug("No pages found for checksum");var g=d.getElementsByTagName("root");for(a=0;a<g.length;a++)c(g[a]);mxLog.show()}catch(J){b.handleError(J),
-null!=window.console&&console.error(J)}});a.textarea.style.width="600px";a.textarea.style.height="380px";b.showDialog(a.container,620,460,!0,!0);a.init()})),b.actions.addAction("testDiff",mxUtils.bind(this,function(){if(null!=b.pages){var a=new TextareaDialog(b,"Paste Data:","",function(a){if(0<a.length)try{console.log(JSON.stringify(b.diffPages(b.pages,b.getPagesForNode(mxUtils.parseXml(a).documentElement)),null,2))}catch(E){b.handleError(E),null!=window.console&&console.error(E)}});a.textarea.style.width=
+null!=window.console&&console.error(J)}});a.textarea.style.width="600px";a.textarea.style.height="380px";b.showDialog(a.container,620,460,!0,!0);a.init()})),b.actions.addAction("testDiff",mxUtils.bind(this,function(){if(null!=b.pages){var a=new TextareaDialog(b,"Paste Data:","",function(a){if(0<a.length)try{console.log(JSON.stringify(b.diffPages(b.pages,b.getPagesForNode(mxUtils.parseXml(a).documentElement)),null,2))}catch(F){b.handleError(F),null!=window.console&&console.error(F)}});a.textarea.style.width=
"600px";a.textarea.style.height="380px";b.showDialog(a.container,620,460,!0,!0);a.init()}else b.alert("No pages")})),b.actions.addAction("testInspect",mxUtils.bind(this,function(){console.log(b,g.getModel())})),b.actions.addAction("testXmlImageExport",mxUtils.bind(this,function(){var a=new mxImageExport,b=g.getGraphBounds(),c=g.view.scale,d=mxUtils.createXmlDocument(),e=d.createElement("output");d.appendChild(e);d=new mxXmlCanvas2D(e);d.translate(Math.floor((1-b.x)/c),Math.floor((1-b.y)/c));d.scale(1/
c);var f=0,k=d.save;d.save=function(){f++;k.apply(this,arguments)};var l=d.restore;d.restore=function(){f--;l.apply(this,arguments)};var m=a.drawShape;a.drawShape=function(a){mxLog.debug("entering shape",a,f);m.apply(this,arguments);mxLog.debug("leaving shape",a,f)};a.drawState(g.getView().getState(g.model.root),d);mxLog.show();mxLog.debug(mxUtils.getXml(e));mxLog.debug("stateCounter",f)})),b.actions.addAction("testDownloadRtModel...",mxUtils.bind(this,function(){null==b.drive?b.handleError({message:mxResources.get("serviceUnavailableOrBlocked")}):
b.drive.execute(mxUtils.bind(this,function(){var a=prompt("File ID","");if(null!=a&&0<a.length&&b.spinner.spin(document.body,mxResources.get("export"))){var c=new mxXmlRequest("https://www.googleapis.com/drive/v2/files/"+a+"/realtime?supportsAllDrives=true",null,"GET");c.setRequestHeaders=function(a){mxXmlRequest.prototype.setRequestHeaders.apply(this,arguments);a.setRequestHeader("authorization","Bearer "+b.drive.token)};c.send(function(c){b.spinner.stop();200<=c.getStatus()&&299>=c.getStatus()?
b.saveLocalFile(c.getText(),"json-"+a+".txt","text/plain"):b.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))})}}))})),b.actions.addAction("testShowConsole",function(){mxLog.isVisible()?mxLog.window.fit():mxLog.show();mxLog.window.div.style.zIndex=mxPopupMenu.prototype.zIndex-1}),this.put("testDevelop",new Menu(mxUtils.bind(this,function(a,c){this.addMenuItems(a,"createSidebarEntry showBoundingBox - testCheckFile testDiff - testInspect - testXmlImageExport - testDownloadRtModel".split(" "),
-c);a.addItem(mxResources.get("testImportRtModel")+"...",null,function(){var a=document.createElement("input");a.setAttribute("type","file");mxEvent.addListener(a,"change",mxUtils.bind(this,function(){if(null!=a.files){var c=new FileReader;c.onload=mxUtils.bind(this,function(c){try{b.openLocalFile(mxUtils.getXml(b.drive.convertJsonToXml(JSON.parse(c.target.result).data)),a.files[0].name,!0)}catch(H){b.handleError(H,mxResources.get("errorLoadingFile"))}});c.readAsText(a.files[0])}}));a.click()},c);
+c);a.addItem(mxResources.get("testImportRtModel")+"...",null,function(){var a=document.createElement("input");a.setAttribute("type","file");mxEvent.addListener(a,"change",mxUtils.bind(this,function(){if(null!=a.files){var c=new FileReader;c.onload=mxUtils.bind(this,function(c){try{b.openLocalFile(mxUtils.getXml(b.drive.convertJsonToXml(JSON.parse(c.target.result).data)),a.files[0].name,!0)}catch(G){b.handleError(G,mxResources.get("errorLoadingFile"))}});c.readAsText(a.files[0])}}));a.click()},c);
this.addMenuItems(a,["-","testShowConsole"],c)}))));b.actions.addAction("shapes...",function(){mxClient.IS_CHROMEAPP||!b.isOffline()?b.showDialog((new MoreShapesDialog(b,!0)).container,640,isLocalStorage?mxClient.IS_IOS?480:460:440,!0,!0):b.showDialog((new MoreShapesDialog(b,!1)).container,360,isLocalStorage?mxClient.IS_IOS?300:280:260,!0,!0)});b.actions.put("createShape",new Action(mxResources.get("shape")+"...",function(a){g.isEnabled()&&(a=new mxCell("",new mxGeometry(0,0,120,120),b.defaultCustomShapeStyle),
a.vertex=!0,a=new EditShapeDialog(b,a,mxResources.get("editShape")+":",630,400),b.showDialog(a.container,640,480,!0,!1),a.init())})).isEnabled=f;b.actions.put("embedHtml",new Action(mxResources.get("html")+"...",function(){b.spinner.spin(document.body,mxResources.get("loading"))&&b.getPublicUrl(b.getCurrentFile(),function(a){b.spinner.stop();b.showHtmlDialog(mxResources.get("create"),"https://desk.draw.io/support/solutions/articles/16000042542",a,function(a,c,d,e,f,g,k,l,m,n){b.createHtml(a,c,d,e,
f,g,k,l,m,n,mxUtils.bind(this,function(a,c){var d=new EmbedDialog(b,a+"\n"+c,null,null,function(){var d=window.open(),e=d.document;if(null!=e){"CSS1Compat"===document.compatMode&&e.writeln("<!DOCTYPE html>");e.writeln("<html>");e.writeln("<head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head>');e.writeln("<body>");e.writeln(a);var f=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;f&&e.writeln(c);e.writeln("</body>");e.writeln("</html>");
@@ -10131,7 +10132,7 @@ a()}));this.put("exportAs",new Menu(mxUtils.bind(this,function(a,c){b.isExportTo
g.gridSize));"data:image/"==a.substring(0,11)?b.loadImage(a,mxUtils.bind(this,function(e){var f=!0,m=mxUtils.bind(this,function(){b.resizeImage(e,a,mxUtils.bind(this,function(e,m,n){e=f?Math.min(1,Math.min(b.maxImageSize/m,b.maxImageSize/n)):1;b.importFile(a,c,k,l,Math.round(m*e),Math.round(n*e),d,function(a){b.spinner.stop();g.setSelectionCells(a);g.scrollCellToVisible(g.getSelectionCell())})}),f)});a.length>b.resampleThreshold?b.confirmImageResize(function(a){f=a;m()}):m()}),mxUtils.bind(this,function(){b.handleError({message:mxResources.get("cannotOpenFile")})})):
b.importFile(a,c,k,l,0,0,d,function(a){b.spinner.stop();g.setSelectionCells(a);g.scrollCellToVisible(g.getSelectionCell())})}),f=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":/\.pdf$/i.test(a)&&(b="application/pdf");return b});"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=b.drive?a.addItem(mxResources.get("googleDrive")+"...",null,function(){d(b.drive)},c):k&&"function"===typeof window.DriveClient&&
a.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1));null!=b.oneDrive?a.addItem(mxResources.get("oneDrive")+"...",null,function(){d(b.oneDrive)},c):n&&"function"===typeof window.OneDriveClient&&a.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=b.dropbox?a.addItem(mxResources.get("dropbox")+"...",null,function(){d(b.dropbox)},c):l&&"function"===typeof window.DropboxClient&&a.addItem(mxResources.get("dropbox")+
-" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);a.addSeparator(c);null!=b.gitHub&&a.addItem(mxResources.get("github")+"...",null,function(){d(b.gitHub)},c);null!=b.gitLab&&a.addItem(mxResources.get("gitlab")+"...",null,function(){d(b.gitLab)},c);null!=b.trello?a.addItem(mxResources.get("trello")+"...",null,function(){d(b.trello)},c):u&&"function"===typeof window.TrelloClient&&a.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);
+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);a.addSeparator(c);null!=b.gitHub&&a.addItem(mxResources.get("github")+"...",null,function(){d(b.gitHub)},c);null!=b.gitLab&&a.addItem(mxResources.get("gitlab")+"...",null,function(){d(b.gitLab)},c);null!=b.trello?a.addItem(mxResources.get("trello")+"...",null,function(){d(b.trello)},c):t&&"function"===typeof window.TrelloClient&&a.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);
a.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&a.addItem(mxResources.get("browser")+"...",null,function(){b.importLocalFile(!1)},c);a.addItem(mxResources.get("device")+"...",null,function(){b.importLocalFile(!0)},c);b.isOffline()||(a.addSeparator(c),a.addItem(mxResources.get("url")+"...",null,function(){var a=new FilenameDialog(b,"",mxResources.get("import"),function(a){if(null!=a&&0<a.length&&b.spinner.spin(document.body,mxResources.get("loading"))){var c=/(\.png)($|\?)/i.test(a)?"image/png":
"text/xml";b.loadUrl(PROXY_URL+"?url="+encodeURIComponent(a),function(b){e(b,c,a)},function(){b.spinner.stop();b.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==c)}},mxResources.get("url"));b.showDialog(a.container,300,80,!0,!0);a.init()},c))}))).isEnabled=f;this.put("theme",new Menu(mxUtils.bind(this,function(a,c){var d=mxSettings.getUi(),e=a.addItem(mxResources.get("automatic"),null,function(){mxSettings.setUi("");mxSettings.save();b.alert(mxResources.get("restartForChangeRequired"))},
c);"kennedy"!=d&&"atlas"!=d&&"dark"!=d&&"min"!=d&&a.addCheckmark(e,Editor.checkmarkImage);a.addSeparator(c);e=a.addItem(mxResources.get("kennedy"),null,function(){mxSettings.setUi("kennedy");mxSettings.save();b.alert(mxResources.get("restartForChangeRequired"))},c);"kennedy"==d&&a.addCheckmark(e,Editor.checkmarkImage);e=a.addItem(mxResources.get("minimal"),null,function(){mxSettings.setUi("min");mxSettings.save();b.alert(mxResources.get("restartForChangeRequired"))},c);"min"==d&&a.addCheckmark(e,
@@ -10141,31 +10142,31 @@ a.constructor==DriveFile||a.constructor==StorageFile?mxResources.get("diagramNam
b.getCurrentFile();if(null!=a){var c=b.getCopyFilename(a);a.constructor==DriveFile?(c=new CreateDialog(b,c,mxUtils.bind(this,function(c,d){"download"==d&&(d=App.MODE_GOOGLE);null!=c&&0<c.length&&(d==App.MODE_GOOGLE?b.spinner.spin(document.body,mxResources.get("saving"))&&a.saveAs(c,mxUtils.bind(this,function(c){a.desc=c;a.save(!1,mxUtils.bind(this,function(){b.spinner.stop();a.setModified(!1);a.addAllSavedStatus()}),mxUtils.bind(this,function(a){b.handleError(a)}))}),mxUtils.bind(this,function(a){b.handleError(a)})):
b.createFile(c,b.getFileData(!0),null,d))}),mxUtils.bind(this,function(){b.hideDialog()}),mxResources.get("makeCopy"),mxResources.get("create"),null,null,null,null,!0,null,null,null,null,b.editor.fileExtensions),b.showDialog(c.container,420,380,!0,!0),c.init()):b.editor.editAsNew(this.editorUi.getFileData(!0),c)}}));b.actions.addAction("moveToFolder...",mxUtils.bind(this,function(){var a=b.getCurrentFile();if(a.getMode()==App.MODE_GOOGLE||a.getMode()==App.MODE_ONEDRIVE){var c=!1;if(a.getMode()==App.MODE_GOOGLE&&
null!=a.desc.parents)for(var d=0;d<a.desc.parents.length;d++)if(a.desc.parents[d].isRoot){c=!0;break}b.pickFolder(a.getMode(),mxUtils.bind(this,function(c){b.spinner.spin(document.body,mxResources.get("moving"))&&a.move(c,mxUtils.bind(this,function(a){b.spinner.stop()}),mxUtils.bind(this,function(a){b.handleError(a)}))}),null,!0,c)}}));this.put("publish",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,["publishLink"],b)})));b.actions.put("useOffline",new Action(mxResources.get("useOffline")+
-"...",function(){b.openLink("https://app.draw.io/")}));b.actions.put("downloadDesktop",new Action(mxResources.get("downloadDesktop")+"...",function(){b.openLink("https://get.draw.io/")}));this.editorUi.actions.addAction("share...",mxUtils.bind(this,function(){try{var a=b.getCurrentFile();null!=a&&b.drive.showPermissions(a.getId())}catch(A){b.handleError(A)}}));this.put("embed",new Menu(mxUtils.bind(this,function(a,c){var d=b.getCurrentFile();null==d||d.getMode()!=App.MODE_GOOGLE&&d.getMode()!=App.MODE_GITHUB||
-!/(\.png)$/i.test(d.getTitle())||this.addMenuItems(a,["liveImage","-"],c);this.addMenuItems(a,["embedImage","embedSvg","-","embedHtml"],c);navigator.standalone||b.isOffline()||this.addMenuItems(a,["embedIframe"],c);"1"==urlParams.embed||b.isOffline()||this.addMenuItems(a,"- googleDocs googleSlides googleSheets - microsoftOffice".split(" "),c)})));var v=function(a,c,d,e){("plantUml"!=e||EditorUi.enablePlantUml&&!b.isOffline())&&a.addItem(d,null,mxUtils.bind(this,function(){if("fromText"==e||"formatSql"==
-e||"plantUml"==e||"mermaid"==e){var a=new ParseDialog(b,d,e);b.showDialog(a.container,620,420,!0,!1);b.dialog.container.style.overflow="auto"}else a=new CreateGraphDialog(b,d,e),b.showDialog(a.container,620,420,!0,!1);a.init()}),c,null,f())},z=function(a,c,d,e){var f=g.isMouseInsertPoint()?g.getInsertPoint():g.getFreeInsertPoint(),k=new mxCell(a,new mxGeometry(f.x,f.y,c,d),e);k.vertex=!0;g.getModel().beginUpdate();try{k=g.addCell(k),g.fireEvent(new mxEventObject("cellsInserted","cells",[k]))}finally{g.getModel().endUpdate()}g.scrollCellToVisible(k);
+"...",function(){b.openLink("https://app.draw.io/")}));b.actions.put("downloadDesktop",new Action(mxResources.get("downloadDesktop")+"...",function(){b.openLink("https://get.draw.io/")}));this.editorUi.actions.addAction("share...",mxUtils.bind(this,function(){try{var a=b.getCurrentFile();null!=a&&b.drive.showPermissions(a.getId())}catch(z){b.handleError(z)}}));this.put("embed",new Menu(mxUtils.bind(this,function(a,c){var d=b.getCurrentFile();null==d||d.getMode()!=App.MODE_GOOGLE&&d.getMode()!=App.MODE_GITHUB||
+!/(\.png)$/i.test(d.getTitle())||this.addMenuItems(a,["liveImage","-"],c);this.addMenuItems(a,["embedImage","embedSvg","-","embedHtml"],c);navigator.standalone||b.isOffline()||this.addMenuItems(a,["embedIframe"],c);"1"==urlParams.embed||b.isOffline()||this.addMenuItems(a,"- googleDocs googleSlides googleSheets - microsoftOffice".split(" "),c)})));var u=function(a,c,d,e){("plantUml"!=e||EditorUi.enablePlantUml&&!b.isOffline())&&a.addItem(d,null,mxUtils.bind(this,function(){if("fromText"==e||"formatSql"==
+e||"plantUml"==e||"mermaid"==e){var a=new ParseDialog(b,d,e);b.showDialog(a.container,620,420,!0,!1);b.dialog.container.style.overflow="auto"}else a=new CreateGraphDialog(b,d,e),b.showDialog(a.container,620,420,!0,!1);a.init()}),c,null,f())},y=function(a,c,d,e){var f=g.isMouseInsertPoint()?g.getInsertPoint():g.getFreeInsertPoint(),k=new mxCell(a,new mxGeometry(f.x,f.y,c,d),e);k.vertex=!0;g.getModel().beginUpdate();try{k=g.addCell(k),g.fireEvent(new mxEventObject("cellsInserted","cells",[k]))}finally{g.getModel().endUpdate()}g.scrollCellToVisible(k);
g.setSelectionCell(k);g.container.focus();g.editAfterInsert&&g.startEditing(k);window.setTimeout(function(){null!=b.hoverIcons&&b.hoverIcons.update(g.view.getState(k))},0);return k};b.actions.put("exportSvg",new Action(mxResources.get("formatSvg")+"...",function(){b.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(a,c,d,e,f,g,k,l,m,n){a=parseInt(a);!isNaN(a)&&0<a&&b.exportSvg(a/100,c,d,e,f,g,
-k,!l,m,n)}),!0,null,"svg")}));b.actions.put("insertText",new Action(mxResources.get("text"),function(){g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())&&g.startEditingAtCell(z("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=f;b.actions.put("insertRectangle",new Action(mxResources.get("rectangle"),function(){g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())&&
-z("",120,60,"whiteSpace=wrap;html=1;")}),null,null,Editor.ctrlKey+"+K").isEnabled=f;b.actions.put("insertEllipse",new Action(mxResources.get("ellipse"),function(){g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())&&z("",80,80,"ellipse;whiteSpace=wrap;html=1;")}),null,null,Editor.ctrlKey+"+Shift+K").isEnabled=f;b.actions.put("insertRhombus",new Action(mxResources.get("rhombus"),function(){g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())&&z("",80,80,"rhombus;whiteSpace=wrap;html=1;")})).isEnabled=
-f;var y=mxUtils.bind(this,function(a,b,c){for(var d=0;d<c.length;d++)"-"==c[d]?a.addSeparator(b):v(a,b,mxResources.get(c[d])+"...",c[d])});this.put("insert",new Menu(mxUtils.bind(this,function(a,c){this.addMenuItems(a,"insertRectangle insertEllipse insertRhombus - insertText insertLink - createShape insertFreehand - insertImage".split(" "),c);b.insertTemplateEnabled&&!b.isOffline()&&this.addMenuItems(a,["insertTemplate"],c);a.addSeparator(c);this.addSubmenu("insertLayout",a,c,mxResources.get("layout"));
-this.addSubmenu("insertAdvanced",a,c,mxResources.get("advanced"))})));this.put("insertLayout",new Menu(mxUtils.bind(this,function(a,b){y(a,b,"horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "))})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(a,c){y(a,c,["fromText","plantUml","mermaid","-","formatSql"]);a.addItem(mxResources.get("csv")+"...",null,function(){b.showImportCsvDialog()},c,null,f())})));this.put("openRecent",new Menu(function(a,
+k,!l,m,n)}),!0,null,"svg")}));b.actions.put("insertText",new Action(mxResources.get("text"),function(){g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())&&g.startEditingAtCell(y("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=f;b.actions.put("insertRectangle",new Action(mxResources.get("rectangle"),function(){g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())&&
+y("",120,60,"whiteSpace=wrap;html=1;")}),null,null,Editor.ctrlKey+"+K").isEnabled=f;b.actions.put("insertEllipse",new Action(mxResources.get("ellipse"),function(){g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())&&y("",80,80,"ellipse;whiteSpace=wrap;html=1;")}),null,null,Editor.ctrlKey+"+Shift+K").isEnabled=f;b.actions.put("insertRhombus",new Action(mxResources.get("rhombus"),function(){g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())&&y("",80,80,"rhombus;whiteSpace=wrap;html=1;")})).isEnabled=
+f;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(a,c){this.addMenuItems(a,"insertRectangle insertEllipse insertRhombus - insertText insertLink - createShape insertFreehand - insertImage".split(" "),c);b.insertTemplateEnabled&&!b.isOffline()&&this.addMenuItems(a,["insertTemplate"],c);a.addSeparator(c);this.addSubmenu("insertLayout",a,c,mxResources.get("layout"));
+this.addSubmenu("insertAdvanced",a,c,mxResources.get("advanced"))})));this.put("insertLayout",new Menu(mxUtils.bind(this,function(a,b){x(a,b,"horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "))})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(a,c){x(a,c,["fromText","plantUml","mermaid","-","formatSql"]);a.addItem(mxResources.get("csv")+"...",null,function(){b.showImportCsvDialog()},c,null,f())})));this.put("openRecent",new Menu(function(a,
c){var d=b.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");a.addItem(d.title+" ("+mxResources.get(e)+")",null,function(){b.loadFile(d.id)},c)})(d[e]);a.addSeparator(c)}a.addItem(mxResources.get("reset"),null,function(){b.resetRecent()},c)}));this.put("openFrom",new Menu(function(a,c){null!=b.drive?a.addItem(mxResources.get("googleDrive")+"...",null,function(){b.pickFile(App.MODE_GOOGLE)},c):k&&"function"===
typeof window.DriveClient&&a.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=b.oneDrive?a.addItem(mxResources.get("oneDrive")+"...",null,function(){b.pickFile(App.MODE_ONEDRIVE)},c):n&&"function"===typeof window.OneDriveClient&&a.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=b.dropbox?a.addItem(mxResources.get("dropbox")+"...",null,function(){b.pickFile(App.MODE_DROPBOX)},
-c):l&&"function"===typeof window.DropboxClient&&a.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);a.addSeparator(c);null!=b.gitHub&&a.addItem(mxResources.get("github")+"...",null,function(){b.pickFile(App.MODE_GITHUB)},c);null!=b.gitLab&&a.addItem(mxResources.get("gitlab")+"...",null,function(){b.pickFile(App.MODE_GITLAB)},c);null!=b.trello?a.addItem(mxResources.get("trello")+"...",null,function(){b.pickFile(App.MODE_TRELLO)},c):u&&"function"===
+c):l&&"function"===typeof window.DropboxClient&&a.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);a.addSeparator(c);null!=b.gitHub&&a.addItem(mxResources.get("github")+"...",null,function(){b.pickFile(App.MODE_GITHUB)},c);null!=b.gitLab&&a.addItem(mxResources.get("gitlab")+"...",null,function(){b.pickFile(App.MODE_GITLAB)},c);null!=b.trello?a.addItem(mxResources.get("trello")+"...",null,function(){b.pickFile(App.MODE_TRELLO)},c):t&&"function"===
typeof window.TrelloClient&&a.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);a.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&a.addItem(mxResources.get("browser")+"...",null,function(){b.pickFile(App.MODE_BROWSER)},c);a.addItem(mxResources.get("device")+"...",null,function(){b.pickFile(App.MODE_DEVICE)},c);b.isOffline()||(a.addSeparator(c),a.addItem(mxResources.get("url")+"...",null,function(){var a=new FilenameDialog(b,"",mxResources.get("open"),
function(a){null!=a&&0<a.length&&(null==b.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(a):window.openWindow((mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(a)))},mxResources.get("url"));b.showDialog(a.container,300,80,!0,!0);a.init()},c))}));Editor.enableCustomLibraries&&(this.put("newLibrary",new Menu(function(a,c){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=b.drive?a.addItem(mxResources.get("googleDrive")+
"...",null,function(){b.showLibraryDialog(null,null,null,null,App.MODE_GOOGLE)},c):k&&"function"===typeof window.DriveClient&&a.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1));null!=b.oneDrive?a.addItem(mxResources.get("oneDrive")+"...",null,function(){b.showLibraryDialog(null,null,null,null,App.MODE_ONEDRIVE)},c):n&&"function"===typeof window.OneDriveClient&&a.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,
function(){},c,null,!1);null!=b.dropbox?a.addItem(mxResources.get("dropbox")+"...",null,function(){b.showLibraryDialog(null,null,null,null,App.MODE_DROPBOX)},c):l&&"function"===typeof window.DropboxClient&&a.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);a.addSeparator(c);null!=b.gitHub&&a.addItem(mxResources.get("github")+"...",null,function(){b.showLibraryDialog(null,null,null,null,App.MODE_GITHUB)},c);null!=b.gitLab&&a.addItem(mxResources.get("gitlab")+
-"...",null,function(){b.showLibraryDialog(null,null,null,null,App.MODE_GITLAB)},c);null!=b.trello?a.addItem(mxResources.get("trello")+"...",null,function(){b.showLibraryDialog(null,null,null,null,App.MODE_TRELLO)},c):u&&"function"===typeof window.TrelloClient&&a.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);a.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&a.addItem(mxResources.get("browser")+"...",null,function(){b.showLibraryDialog(null,
+"...",null,function(){b.showLibraryDialog(null,null,null,null,App.MODE_GITLAB)},c);null!=b.trello?a.addItem(mxResources.get("trello")+"...",null,function(){b.showLibraryDialog(null,null,null,null,App.MODE_TRELLO)},c):t&&"function"===typeof window.TrelloClient&&a.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);a.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&a.addItem(mxResources.get("browser")+"...",null,function(){b.showLibraryDialog(null,
null,null,null,App.MODE_BROWSER)},c);a.addItem(mxResources.get("device")+"...",null,function(){b.showLibraryDialog(null,null,null,null,App.MODE_DEVICE)},c)})),this.put("openLibraryFrom",new Menu(function(a,c){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=b.drive?a.addItem(mxResources.get("googleDrive")+"...",null,function(){b.pickLibrary(App.MODE_GOOGLE)},c):k&&"function"===typeof window.DriveClient&&a.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+
"...)",null,function(){},c,null,!1));null!=b.oneDrive?a.addItem(mxResources.get("oneDrive")+"...",null,function(){b.pickLibrary(App.MODE_ONEDRIVE)},c):n&&"function"===typeof window.OneDriveClient&&a.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=b.dropbox?a.addItem(mxResources.get("dropbox")+"...",null,function(){b.pickLibrary(App.MODE_DROPBOX)},c):l&&"function"===typeof window.DropboxClient&&a.addItem(mxResources.get("dropbox")+" ("+
-mxResources.get("loading")+"...)",null,function(){},c,null,!1);a.addSeparator(c);null!=b.gitHub&&a.addItem(mxResources.get("github")+"...",null,function(){b.pickLibrary(App.MODE_GITHUB)},c);null!=b.gitLab&&a.addItem(mxResources.get("gitlab")+"...",null,function(){b.pickLibrary(App.MODE_GITLAB)},c);null!=b.trello?a.addItem(mxResources.get("trello")+"...",null,function(){b.pickLibrary(App.MODE_TRELLO)},c):u&&"function"===typeof window.TrelloClient&&a.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+
+mxResources.get("loading")+"...)",null,function(){},c,null,!1);a.addSeparator(c);null!=b.gitHub&&a.addItem(mxResources.get("github")+"...",null,function(){b.pickLibrary(App.MODE_GITHUB)},c);null!=b.gitLab&&a.addItem(mxResources.get("gitlab")+"...",null,function(){b.pickLibrary(App.MODE_GITLAB)},c);null!=b.trello?a.addItem(mxResources.get("trello")+"...",null,function(){b.pickLibrary(App.MODE_TRELLO)},c):t&&"function"===typeof window.TrelloClient&&a.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+
"...)",null,function(){},c,null,!1);a.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&a.addItem(mxResources.get("browser")+"...",null,function(){b.pickLibrary(App.MODE_BROWSER)},c);a.addItem(mxResources.get("device")+"...",null,function(){b.pickLibrary(App.MODE_DEVICE)},c);b.isOffline()||(a.addSeparator(c),a.addItem(mxResources.get("url")+"...",null,function(){var a=new FilenameDialog(b,"",mxResources.get("open"),function(a){if(null!=a&&0<a.length&&b.spinner.spin(document.body,mxResources.get("loading"))){var c=
-a;b.editor.isCorsEnabledForUrl(a)||(c=PROXY_URL+"?url="+encodeURIComponent(a));mxUtils.get(c,function(c){if(200<=c.getStatus()&&299>=c.getStatus()){b.spinner.stop();try{b.loadLibrary(new UrlLibrary(this,c.getText(),a))}catch(G){b.handleError(G,mxResources.get("errorLoadingFile"))}}else b.spinner.stop(),b.handleError(null,mxResources.get("errorLoadingFile"))},function(){b.spinner.stop();b.handleError(null,mxResources.get("errorLoadingFile"))})}},mxResources.get("url"));b.showDialog(a.container,300,
+a;b.editor.isCorsEnabledForUrl(a)||(c=PROXY_URL+"?url="+encodeURIComponent(a));mxUtils.get(c,function(c){if(200<=c.getStatus()&&299>=c.getStatus()){b.spinner.stop();try{b.loadLibrary(new UrlLibrary(this,c.getText(),a))}catch(H){b.handleError(H,mxResources.get("errorLoadingFile"))}}else b.spinner.stop(),b.handleError(null,mxResources.get("errorLoadingFile"))},function(){b.spinner.stop();b.handleError(null,mxResources.get("errorLoadingFile"))})}},mxResources.get("url"));b.showDialog(a.container,300,
80,!0,!0);a.init()},c));"1"==urlParams.confLib&&(a.addSeparator(c),a.addItem(mxResources.get("confluenceCloud")+"...",null,function(){b.showRemotelyStoredLibrary(mxResources.get("libraries"))},c))})));this.put("edit",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,["undo","redo","-","cut","copy"]);mxIsElectron&&this.addMenuItems(a,["copyAsImage"]);this.addMenuItems(a,"paste delete - duplicate - find - editData editTooltip - editStyle editGeometry - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));
e=b.actions.addAction("comments",mxUtils.bind(this,function(){if(null==this.commentsWindow)this.commentsWindow=new CommentsWindow(b,document.body.offsetWidth-380,120,300,350),this.commentsWindow.window.addListener("show",function(){b.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.addListener("hide",function(){b.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.setVisible(!0),b.fireEvent(new mxEventObject("comments"));else{var a=!this.commentsWindow.window.isVisible();
-this.commentsWindow.window.setVisible(a);this.commentsWindow.refreshCommentsTime();a&&this.commentsWindow.hasError&&this.commentsWindow.refreshComments()}}));e.setToggleAction(!0);e.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.commentsWindow&&this.commentsWindow.window.isVisible()}));b.editor.addListener("fileLoaded",mxUtils.bind(this,function(){null!=this.commentsWindow&&(this.commentsWindow.destroy(),this.commentsWindow=null)}));var e=this.get("viewPanels"),C=e.funct;e.funct=
-function(a,c){C.apply(this,arguments);b.commentsSupported()&&b.menus.addMenuItems(a,["comments"],c)};this.put("view",new Menu(mxUtils.bind(this,function(a,c){this.addMenuItems(a,(null!=this.editorUi.format?["formatPanel"]:[]).concat(["outline","layers"]).concat(b.commentsSupported()?["comments","-"]:["-"]));this.addMenuItems(a,["-","search"],c);if(isLocalStorage||mxClient.IS_CHROMEAPP){var d=this.addMenuItem(a,"scratchpad",c);(!b.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(d,
+this.commentsWindow.window.setVisible(a);this.commentsWindow.refreshCommentsTime();a&&this.commentsWindow.hasError&&this.commentsWindow.refreshComments()}}));e.setToggleAction(!0);e.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.commentsWindow&&this.commentsWindow.window.isVisible()}));b.editor.addListener("fileLoaded",mxUtils.bind(this,function(){null!=this.commentsWindow&&(this.commentsWindow.destroy(),this.commentsWindow=null)}));var e=this.get("viewPanels"),B=e.funct;e.funct=
+function(a,c){B.apply(this,arguments);b.commentsSupported()&&b.menus.addMenuItems(a,["comments"],c)};this.put("view",new Menu(mxUtils.bind(this,function(a,c){this.addMenuItems(a,(null!=this.editorUi.format?["formatPanel"]:[]).concat(["outline","layers"]).concat(b.commentsSupported()?["comments","-"]:["-"]));this.addMenuItems(a,["-","search"],c);if(isLocalStorage||mxClient.IS_CHROMEAPP){var d=this.addMenuItem(a,"scratchpad",c);(!b.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(d,
"https://desk.draw.io/support/solutions/articles/16000042367")}this.addMenuItems(a,["shapes","-","pageView","pageScale"]);this.addSubmenu("units",a,c);this.addMenuItems(a,"- scrollbars tooltips ruler - grid guides".split(" "),c);mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode)&&this.addMenuItem(a,"shadowVisible",c);this.addMenuItems(a,"- connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),c)})));this.put("extras",new Menu(mxUtils.bind(this,function(a,c){"1"!=
urlParams.embed&&(this.addSubmenu("theme",a,c),a.addSeparator(c));if("undefined"!==typeof MathJax){var d=this.addMenuItem(a,"mathematicalTypesetting",c);(!b.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000032875")}this.addMenuItems(a,["copyConnect","collapseExpand","-"],c);"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&this.addMenuItems(a,["showStartScreen"],c);"1"!=urlParams.embed&&this.addMenuItems(a,
["autosave","compressed"],c);a.addSeparator(c);!b.isOfflineApp()&&isLocalStorage&&this.addMenuItem(a,"plugins",c);this.addMenuItems(a,["tags","-","editDiagram","-","configuration"],c);a.addSeparator(c);"1"==urlParams.newTempDlg&&(b.actions.addAction("templates",function(){var a=new TemplatesDialog;b.showDialog(a.container,a.width,a.height,!0,!1,null,!1,!0);a.init(b,function(a){console.log(a)},null,null,null,"user",function(a,b){setTimeout(function(){b?a([{url:"123",title:"Test 1Test 1Test 1Test 1Test 1Test 1Test 11Test 1Test 11Test 1Test 1dgdsgdfg fdg dfgdfg dfg dfg"},
@@ -10246,32 +10247,32 @@ null,null,!0,!0))}),b))})};(function(){var a=EditorUi.prototype.refresh;EditorUi
(function(){var a=new mxObjectCodec(new ChangePage,"ui relatedPage index neverShown page previousPage".split(" ")),d="defaultParent currentRoot scrollLeft scrollTop scale translate lastPasteXml pasteCounter".split(" ");a.afterEncode=function(a,b,g){g.setAttribute("relatedPage",b.relatedPage.getId());null==b.index&&(g.setAttribute("name",b.relatedPage.getName()),null!=b.relatedPage.viewState&&g.setAttribute("viewState",JSON.stringify(b.relatedPage.viewState,function(a,b){return 0>mxUtils.indexOf(d,
a)?b:void 0})),null!=b.relatedPage.root&&a.encodeCell(b.relatedPage.root,g));return g};a.beforeDecode=function(a,b,d){d.ui=a.ui;d.relatedPage=d.ui.getPageById(b.getAttribute("relatedPage"));if(null==d.relatedPage){var c=b.ownerDocument.createElement("diagram");c.setAttribute("id",b.getAttribute("relatedPage"));c.setAttribute("name",b.getAttribute("name"));d.relatedPage=new DiagramPage(c);c=b.getAttribute("viewState");null!=c&&(d.relatedPage.viewState=JSON.parse(c),b.removeAttribute("viewState"));
b=b.cloneNode(!0);c=b.firstChild;if(null!=c)for(d.relatedPage.root=a.decodeCell(c,!1),d=c.nextSibling,c.parentNode.removeChild(c),c=d;null!=c;){d=c.nextSibling;if(c.nodeType==mxConstants.NODETYPE_ELEMENT){var g=c.getAttribute("id");null==a.lookup(g)&&a.decodeCell(c)}c.parentNode.removeChild(c);c=d}}return b};a.afterDecode=function(a,b,d){d.index=d.previousIndex;return d};mxCodecRegistry.register(a)})();(function(){EditorUi.prototype.altShiftActions[68]="selectDescendants";var a=Graph.prototype.foldCells;Graph.prototype.foldCells=function(b,c,d,k,l){c=null!=c?c:!1;null==d&&(d=this.getFoldableCells(this.getSelectionCells(),b));this.stopEditing();this.model.beginUpdate();try{for(var f=d.slice(),g=[],e=0;e<d.length;e++){var m=this.getCurrentCellStyle(d[e]);"1"==mxUtils.getValue(m,"treeFolding","0")&&(this.traverse(d[e],!0,mxUtils.bind(this,function(a,b){null!=b&&g.push(b);a!=d[e]&&g.push(a);return a==
-d[e]||!this.model.isCollapsed(a)})),this.model.setCollapsed(d[e],b))}for(e=0;e<g.length;e++)this.model.setVisible(g[e],!b);d=f;d=a.apply(this,arguments)}finally{this.model.endUpdate()}return d};var d=EditorUi.prototype.init;EditorUi.prototype.init=function(){d.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function a(a){return v.isVertex(a)&&d(a)}function c(a){var b=!1;null!=a&&(b="1"==t.getCurrentCellStyle(a).treeMoving);
-return b}function d(a){var b=!1;null!=a&&(a=v.getParent(a),b=t.view.getState(a),b="tree"==(null!=b?b.style:t.getCellStyle(a)).containerType);return b}function k(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 l(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 n(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=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;t.view.currentRoot!=c&&(e[1].geometry.x-=g.x,e[1].geometry.y-=g.y);var k=t.view.getState(a),m=t.view.scale;if(null!=k){var n=mxRectangle.fromRectangle(k);f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?n.x+=(b?a.geometry.width+10:-e[1].geometry.width-10)*m:n.y+=(b?a.geometry.height+10:-e[1].geometry.height-10)*m;var p=t.getOutgoingEdges(t.model.getTerminal(d[0],
-!0));if(null!=p){for(var v=f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH,q=g=d=0;q<p.length;q++){var u=t.model.getTerminal(p[q],!1);if(f==l(u)){var A=t.view.getState(u);u!=a&&null!=A&&(v&&b!=A.getCenterX()<k.getCenterX()||!v&&b!=A.getCenterY()<k.getCenterY())&&mxUtils.intersects(n,A)&&(d=10+Math.max(d,(Math.min(n.x+n.width,A.x+A.width)-Math.max(n.x,A.x))/m),g=10+Math.max(g,(Math.min(n.y+n.height,A.y+A.height)-Math.max(n.y,A.y))/m))}}v?g=0:d=0;for(q=0;q<p.length;q++)if(u=t.model.getTerminal(p[q],
-!1),f==l(u)&&(A=t.view.getState(u),u!=a&&null!=A&&(v&&b!=A.getCenterX()<k.getCenterX()||!v&&b!=A.getCenterY()<k.getCenterY()))){var x=[];t.traverse(A.cell,!0,function(a,b){null!=b&&x.push(b);x.push(a);return!0});t.moveCells(x,(b?1:-1)*d,(b?1:-1)*g)}}}return t.addCells(e,c)}finally{t.model.endUpdate()}}function u(a){t.model.beginUpdate();try{var b=l(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 k=a.geometry.width+40,m=a.geometry.height+40;b==mxConstants.DIRECTION_SOUTH?k=0:b==mxConstants.DIRECTION_NORTH?(k=0,m=-m):b==mxConstants.DIRECTION_WEST?(k=-k,m=0):b==mxConstants.DIRECTION_EAST&&(m=0);t.moveCells(g,k,m);return t.addCells(d,e)}finally{t.model.endUpdate()}}function e(a,b){t.model.beginUpdate();try{var c=
-t.model.getParent(a),d=t.getIncomingEdges(a),e=l(a);0==d.length&&(d=[t.createEdge(c,null,"",null,null,t.createCurrentEdgeStyle())],e=b);var f=t.cloneCells([d[0],a]);t.model.setTerminal(f[0],a,!0);if(null==t.model.getTerminal(f[0],!1)){t.model.setTerminal(f[0],f[1],!1);var g=t.getCellStyle(f[1]).newEdgeStyle;if(null!=g)try{var k=JSON.parse(g),m;for(m in k)t.setCellStyles(m,k[m],[f[0]]),"edgeStyle"==m&&"elbowEdgeStyle"==k[m]&&t.setCellStyles("elbow",e==mxConstants.DIRECTION_SOUTH||e==mxConstants.DIRECTION_NOTH?
-"vertical":"horizontal",[f[0]])}catch(P){}}var d=t.getOutgoingEdges(a),n=c.geometry,g=[];t.view.currentRoot==c&&(n=new mxRectangle);for(k=0;k<d.length;k++){var p=t.model.getTerminal(d[k],!1);null!=p&&g.push(p)}var v=t.view.getBounds(g),q=t.view.translate,u=t.view.scale;e==mxConstants.DIRECTION_SOUTH?(f[1].geometry.x=null==v?a.geometry.x+(a.geometry.width-f[1].geometry.width)/2:(v.x+v.width)/u-q.x-n.x+10,f[1].geometry.y+=f[1].geometry.height-n.y+40):e==mxConstants.DIRECTION_NORTH?(f[1].geometry.x=
-null==v?a.geometry.x+(a.geometry.width-f[1].geometry.width)/2:(v.x+v.width)/u-q.x+-n.x+10,f[1].geometry.y-=f[1].geometry.height+n.y+40):(f[1].geometry.x=e==mxConstants.DIRECTION_WEST?f[1].geometry.x-(f[1].geometry.width+n.x+40):f[1].geometry.x+(f[1].geometry.width-n.x+40),f[1].geometry.y=null==v?a.geometry.y+(a.geometry.height-f[1].geometry.height)/2:(v.y+v.height)/u-q.y+-n.y+10);return t.addCells(f,c)}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=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=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(),z=q.menus.createPopupMenu;q.menus.createPopupMenu=function(b,c,d){z.apply(this,arguments);
-if(1==t.getSelectionCount()){c=t.getSelectionCell();var e=t.getOutgoingEdges(c);b.addSeparator();0<e.length&&(a(t.getSelectionCell())&&this.addMenuItems(b,["selectChildren"],null,d),this.addMenuItems(b,["selectDescendants"],null,d));a(t.getSelectionCell())&&(b.addSeparator(),0<t.getIncomingEdges(c).length&&this.addMenuItems(b,["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 y=t.removeCells;t.removeCells=function(b,c){c=null!=
-c?c:!0;null==b&&(b=this.getDeletableCells(this.getSelectionCells()));c&&(b=this.getDeletableCells(this.addAllEdges(b)));for(var e=[],f=0;f<b.length;f++){var g=b[f];v.isEdge(g)&&d(g)&&(e.push(g),g=v.getTerminal(g,!1));if(a(g)){var k=[];t.traverse(g,!0,function(a,b){null!=b&&k.push(b);k.push(a);return!0});0<k.length&&(e=e.concat(k),g=t.getIncomingEdges(b[f]),b=b.concat(g))}else null!=g&&e.push(b[f])}b=e;return y.apply(this,arguments)};q.hoverIcons.getStateAt=function(b,c,d){return a(b.cell)?null:this.graph.view.getState(this.graph.getCellAt(c,
-d))};var C=t.duplicateCells;t.duplicateCells=function(b,c){b=null!=b?b:this.getSelectionCells();for(var d=b.slice(0),e=0;e<d.length;e++){var f=t.view.getState(d[e]);if(null!=f&&a(f.cell))for(var g=t.getIncomingEdges(f.cell),f=0;f<g.length;f++)mxUtils.remove(g[f],b)}this.model.beginUpdate();try{var k=C.call(this,b,c);if(k.length==b.length)for(e=0;e<b.length;e++)if(a(b[e])){var l=t.getIncomingEdges(k[e]),g=t.getIncomingEdges(b[e]);if(0==l.length&&0<g.length){var m=this.cloneCell(g[0]);this.addEdge(m,
-t.getDefaultParent(),this.model.getTerminal(g[0],!0),k[e])}}}finally{this.model.endUpdate()}return k};var x=t.moveCells;t.moveCells=function(b,c,d,e,f,g,k){var l=null;this.model.beginUpdate();try{var m=f,n=this.getCurrentCellStyle(f);if(null!=b&&a(f)&&"1"==mxUtils.getValue(n,"treeFolding","0")){for(var p=0;p<b.length;p++)if(a(b[p])||t.model.isEdge(b[p])&&null==t.model.getTerminal(b[p],!0)){f=t.model.getParent(b[p]);break}if(null!=m&&f!=m&&null!=this.view.getState(b[0])){var v=t.getIncomingEdges(b[0]);
-if(0<v.length){var q=t.view.getState(t.model.getTerminal(v[0],!0));if(null!=q){var u=t.view.getState(m);null!=u&&(c=(u.getCenterX()-q.getCenterX())/t.view.scale,d=(u.getCenterY()-q.getCenterY())/t.view.scale)}}}}l=x.apply(this,arguments);if(null!=l&&null!=b&&l.length==b.length)for(p=0;p<l.length;p++)if(this.model.isEdge(l[p]))a(m)&&0>mxUtils.indexOf(l,this.model.getTerminal(l[p],!0))&&this.model.setTerminal(l[p],m,!0);else if(a(b[p])&&(v=t.getIncomingEdges(b[p]),0<v.length))if(!e)a(m)&&0>mxUtils.indexOf(b,
-this.model.getTerminal(v[0],!0))&&this.model.setTerminal(v[0],m,!0);else if(0==t.getIncomingEdges(l[p]).length){n=m;if(null==n||n==t.model.getParent(b[p]))n=t.model.getTerminal(v[0],!0);e=this.cloneCell(v[0]);this.addEdge(e,t.getDefaultParent(),n,l[p])}}finally{this.model.endUpdate()}return l};if(null!=q.sidebar){var A=q.sidebar.dropAndConnect;q.sidebar.dropAndConnect=function(b,c,d,e){var f=t.model,g=null;f.beginUpdate();try{if(g=A.apply(this,arguments),a(b))for(var k=0;k<g.length;k++)if(f.isEdge(g[k])&&
-null==f.getTerminal(g[k],!0)){f.setTerminal(g[k],b,!0);var l=t.getCellGeometry(g[k]);l.points=null;null!=l.getTerminalPoint(!0)&&l.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return g}}var E={88:q.actions.get("selectChildren"),84:q.actions.get("selectSubtree"),80:q.actions.get("selectParent"),83:q.actions.get("selectSiblings")},D=q.onKeyDown;q.onKeyDown=function(b){try{if(t.isEnabled()&&!t.isEditing()&&a(t.getSelectionCell())&&1==t.getSelectionCount()){var c=null;0<t.getIncomingEdges(t.getSelectionCell()).length&&
-(9==b.which?c=mxEvent.isShiftDown(b)?u(t.getSelectionCell()):e(t.getSelectionCell()):13==b.which&&(c=n(t.getSelectionCell(),!mxEvent.isShiftDown(b))));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(b);else if(mxEvent.isAltDown(b)&&mxEvent.isShiftDown(b)){var d=E[b.keyCode];
-null!=d&&(d.funct(b),mxEvent.consume(b))}else 37==b.keyCode?(p(t.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(b)):38==b.keyCode?(p(t.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(b)):39==b.keyCode?(p(t.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(b)):40==b.keyCode&&(p(t.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(b))}}catch(Q){q.handleError(Q)}mxEvent.isConsumed(b)||D.apply(this,arguments)};var B=t.connectVertex;t.connectVertex=
-function(b,c,d,f,g,k){var m=t.getIncomingEdges(b);return a(b)?(d=l(b),f=d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST,g=c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST,d==c||0==m.length?e(b,c):f==g?u(b):n(b,c!=mxConstants.DIRECTION_NORTH&&c!=mxConstants.DIRECTION_WEST)):B.call(this,b,c,d,f,g,k)};t.getSubtree=function(b){var d=[b];!c(b)&&!a(b)||k(b)||t.traverse(b,!0,function(a,b){null!=b&&0>mxUtils.indexOf(d,b)&&d.push(b);0>mxUtils.indexOf(d,a)&&d.push(a);return!0});return d};
-var H=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){H.apply(this,arguments);(c(this.state.cell)||a(this.state.cell))&&!k(this.state.cell)&&0<this.graph.getOutgoingEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title","Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="24px",this.moveHandle.style.height="24px",this.graph.container.appendChild(this.moveHandle),
-mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(a){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(a),mxEvent.getClientY(a),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(a);this.graph.isMouseDown=!0;q.hoverIcons.reset();mxEvent.consume(a)})))};var G=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){G.apply(this,arguments);null!=this.moveHandle&&
+d[e]||!this.model.isCollapsed(a)})),this.model.setCollapsed(d[e],b))}for(e=0;e<g.length;e++)this.model.setVisible(g[e],!b);d=f;d=a.apply(this,arguments)}finally{this.model.endUpdate()}return d};var d=EditorUi.prototype.init;EditorUi.prototype.init=function(){d.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function a(a){return u.isVertex(a)&&d(a)}function c(a){var b=!1;null!=a&&(b="1"==q.getCurrentCellStyle(a).treeMoving);
+return b}function d(a){var b=!1;null!=a&&(a=u.getParent(a),b=q.view.getState(a),b="tree"==(null!=b?b.style:q.getCellStyle(a)).containerType);return b}function k(a){var b=!1;null!=a&&(a=u.getParent(a),b=q.view.getState(a),q.view.getState(a),b=null!=(null!=b?b.style:q.getCellStyle(a)).childLayout);return b}function l(a){a=q.view.getState(a);if(null!=a){var b=q.getIncomingEdges(a.cell);if(0<b.length&&(b=q.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;q.model.beginUpdate();try{var c=q.model.getParent(a),d=q.getIncomingEdges(a),e=q.cloneCells([d[0],a]);q.model.setTerminal(e[0],q.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;q.view.currentRoot!=c&&(e[1].geometry.x-=g.x,e[1].geometry.y-=g.y);var k=q.view.getState(a),m=q.view.scale;if(null!=k){var n=mxRectangle.fromRectangle(k);f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?n.x+=(b?a.geometry.width+10:-e[1].geometry.width-10)*m:n.y+=(b?a.geometry.height+10:-e[1].geometry.height-10)*m;var p=q.getOutgoingEdges(q.model.getTerminal(d[0],
+!0));if(null!=p){for(var u=f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH,t=g=d=0;t<p.length;t++){var v=q.model.getTerminal(p[t],!1);if(f==l(v)){var z=q.view.getState(v);v!=a&&null!=z&&(u&&b!=z.getCenterX()<k.getCenterX()||!u&&b!=z.getCenterY()<k.getCenterY())&&mxUtils.intersects(n,z)&&(d=10+Math.max(d,(Math.min(n.x+n.width,z.x+z.width)-Math.max(n.x,z.x))/m),g=10+Math.max(g,(Math.min(n.y+n.height,z.y+z.height)-Math.max(n.y,z.y))/m))}}u?g=0:d=0;for(t=0;t<p.length;t++)if(v=q.model.getTerminal(p[t],
+!1),f==l(v)&&(z=q.view.getState(v),v!=a&&null!=z&&(u&&b!=z.getCenterX()<k.getCenterX()||!u&&b!=z.getCenterY()<k.getCenterY()))){var y=[];q.traverse(z.cell,!0,function(a,b){null!=b&&y.push(b);y.push(a);return!0});q.moveCells(y,(b?1:-1)*d,(b?1:-1)*g)}}}return q.addCells(e,c)}finally{q.model.endUpdate()}}function t(a){q.model.beginUpdate();try{var b=l(a),c=q.getIncomingEdges(a),d=q.cloneCells([c[0],a]);q.model.setTerminal(c[0],d[1],!1);q.model.setTerminal(d[0],d[1],!0);q.model.setTerminal(d[0],a,!1);
+var e=q.model.getParent(a),f=e.geometry,g=[];q.view.currentRoot!=e&&(d[1].geometry.x-=f.x,d[1].geometry.y-=f.y);q.traverse(a,!0,function(a,b){null!=b&&g.push(b);g.push(a);return!0});var k=a.geometry.width+40,m=a.geometry.height+40;b==mxConstants.DIRECTION_SOUTH?k=0:b==mxConstants.DIRECTION_NORTH?(k=0,m=-m):b==mxConstants.DIRECTION_WEST?(k=-k,m=0):b==mxConstants.DIRECTION_EAST&&(m=0);q.moveCells(g,k,m);return q.addCells(d,e)}finally{q.model.endUpdate()}}function e(a,b){q.model.beginUpdate();try{var c=
+q.model.getParent(a),d=q.getIncomingEdges(a),e=l(a);0==d.length&&(d=[q.createEdge(c,null,"",null,null,q.createCurrentEdgeStyle())],e=b);var f=q.cloneCells([d[0],a]);q.model.setTerminal(f[0],a,!0);if(null==q.model.getTerminal(f[0],!1)){q.model.setTerminal(f[0],f[1],!1);var g=q.getCellStyle(f[1]).newEdgeStyle;if(null!=g)try{var k=JSON.parse(g),m;for(m in k)q.setCellStyles(m,k[m],[f[0]]),"edgeStyle"==m&&"elbowEdgeStyle"==k[m]&&q.setCellStyles("elbow",e==mxConstants.DIRECTION_SOUTH||e==mxConstants.DIRECTION_NOTH?
+"vertical":"horizontal",[f[0]])}catch(P){}}var d=q.getOutgoingEdges(a),n=c.geometry,g=[];q.view.currentRoot==c&&(n=new mxRectangle);for(k=0;k<d.length;k++){var p=q.model.getTerminal(d[k],!1);null!=p&&g.push(p)}var u=q.view.getBounds(g),t=q.view.translate,v=q.view.scale;e==mxConstants.DIRECTION_SOUTH?(f[1].geometry.x=null==u?a.geometry.x+(a.geometry.width-f[1].geometry.width)/2:(u.x+u.width)/v-t.x-n.x+10,f[1].geometry.y+=f[1].geometry.height-n.y+40):e==mxConstants.DIRECTION_NORTH?(f[1].geometry.x=
+null==u?a.geometry.x+(a.geometry.width-f[1].geometry.width)/2:(u.x+u.width)/v-t.x+-n.x+10,f[1].geometry.y-=f[1].geometry.height+n.y+40):(f[1].geometry.x=e==mxConstants.DIRECTION_WEST?f[1].geometry.x-(f[1].geometry.width+n.x+40):f[1].geometry.x+(f[1].geometry.width-n.x+40),f[1].geometry.y=null==u?a.geometry.y+(a.geometry.height-f[1].geometry.height)/2:(u.y+u.height)/v-t.y+-n.y+10);return q.addCells(f,c)}finally{q.model.endUpdate()}}function m(a,b,c){a=q.getOutgoingEdges(a);c=q.view.getState(c);var d=
+[];if(null!=c&&null!=a){for(var e=0;e<a.length;e++){var f=q.view.getState(q.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?v.actions.get("selectParent").funct():
+c==b?(d=q.getOutgoingEdges(a),null!=d&&0<d.length&&q.setSelectionCell(q.model.getTerminal(d[0],!1))):(c=q.getIncomingEdges(a),null!=c&&0<c.length&&(d=m(q.model.getTerminal(c[0],!0),d,a),c=q.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&&q.setSelectionCell(d[c].cell)))))}var v=this,q=v.editor.graph,u=q.getModel(),y=v.menus.createPopupMenu;v.menus.createPopupMenu=function(b,c,d){y.apply(this,arguments);
+if(1==q.getSelectionCount()){c=q.getSelectionCell();var e=q.getOutgoingEdges(c);b.addSeparator();0<e.length&&(a(q.getSelectionCell())&&this.addMenuItems(b,["selectChildren"],null,d),this.addMenuItems(b,["selectDescendants"],null,d));a(q.getSelectionCell())&&(b.addSeparator(),0<q.getIncomingEdges(c).length&&this.addMenuItems(b,["selectSiblings","selectParent"],null,d))}};v.actions.addAction("selectChildren",function(){if(q.isEnabled()&&1==q.getSelectionCount()){var a=q.getSelectionCell(),a=q.getOutgoingEdges(a);
+if(null!=a){for(var b=[],c=0;c<a.length;c++)b.push(q.model.getTerminal(a[c],!1));q.setSelectionCells(b)}}},null,null,"Alt+Shift+X");v.actions.addAction("selectSiblings",function(){if(q.isEnabled()&&1==q.getSelectionCount()){var a=q.getSelectionCell(),a=q.getIncomingEdges(a);if(null!=a&&0<a.length&&(a=q.getOutgoingEdges(q.model.getTerminal(a[0],!0)),null!=a)){for(var b=[],c=0;c<a.length;c++)b.push(q.model.getTerminal(a[c],!1));q.setSelectionCells(b)}}},null,null,"Alt+Shift+S");v.actions.addAction("selectParent",
+function(){if(q.isEnabled()&&1==q.getSelectionCount()){var a=q.getSelectionCell(),a=q.getIncomingEdges(a);null!=a&&0<a.length&&q.setSelectionCell(q.model.getTerminal(a[0],!0))}},null,null,"Alt+Shift+P");v.actions.addAction("selectDescendants",function(){if(q.isEnabled()&&1==q.getSelectionCount()){var a=q.getSelectionCell(),b=[];q.traverse(a,!0,function(a,c){null!=c&&b.push(c);b.push(a);return!0});q.setSelectionCells(b)}},null,null,"Alt+Shift+D");var x=q.removeCells;q.removeCells=function(b,c){c=null!=
+c?c:!0;null==b&&(b=this.getDeletableCells(this.getSelectionCells()));c&&(b=this.getDeletableCells(this.addAllEdges(b)));for(var e=[],f=0;f<b.length;f++){var g=b[f];u.isEdge(g)&&d(g)&&(e.push(g),g=u.getTerminal(g,!1));if(a(g)){var k=[];q.traverse(g,!0,function(a,b){null!=b&&k.push(b);k.push(a);return!0});0<k.length&&(e=e.concat(k),g=q.getIncomingEdges(b[f]),b=b.concat(g))}else null!=g&&e.push(b[f])}b=e;return x.apply(this,arguments)};v.hoverIcons.getStateAt=function(b,c,d){return a(b.cell)?null:this.graph.view.getState(this.graph.getCellAt(c,
+d))};var B=q.duplicateCells;q.duplicateCells=function(b,c){b=null!=b?b:this.getSelectionCells();for(var d=b.slice(0),e=0;e<d.length;e++){var f=q.view.getState(d[e]);if(null!=f&&a(f.cell))for(var g=q.getIncomingEdges(f.cell),f=0;f<g.length;f++)mxUtils.remove(g[f],b)}this.model.beginUpdate();try{var k=B.call(this,b,c);if(k.length==b.length)for(e=0;e<b.length;e++)if(a(b[e])){var l=q.getIncomingEdges(k[e]),g=q.getIncomingEdges(b[e]);if(0==l.length&&0<g.length){var m=this.cloneCell(g[0]);this.addEdge(m,
+q.getDefaultParent(),this.model.getTerminal(g[0],!0),k[e])}}}finally{this.model.endUpdate()}return k};var A=q.moveCells;q.moveCells=function(b,c,d,e,f,g,k){var l=null;this.model.beginUpdate();try{var m=f,n=this.getCurrentCellStyle(f);if(null!=b&&a(f)&&"1"==mxUtils.getValue(n,"treeFolding","0")){for(var p=0;p<b.length;p++)if(a(b[p])||q.model.isEdge(b[p])&&null==q.model.getTerminal(b[p],!0)){f=q.model.getParent(b[p]);break}if(null!=m&&f!=m&&null!=this.view.getState(b[0])){var u=q.getIncomingEdges(b[0]);
+if(0<u.length){var t=q.view.getState(q.model.getTerminal(u[0],!0));if(null!=t){var v=q.view.getState(m);null!=v&&(c=(v.getCenterX()-t.getCenterX())/q.view.scale,d=(v.getCenterY()-t.getCenterY())/q.view.scale)}}}}l=A.apply(this,arguments);if(null!=l&&null!=b&&l.length==b.length)for(p=0;p<l.length;p++)if(this.model.isEdge(l[p]))a(m)&&0>mxUtils.indexOf(l,this.model.getTerminal(l[p],!0))&&this.model.setTerminal(l[p],m,!0);else if(a(b[p])&&(u=q.getIncomingEdges(b[p]),0<u.length))if(!e)a(m)&&0>mxUtils.indexOf(b,
+this.model.getTerminal(u[0],!0))&&this.model.setTerminal(u[0],m,!0);else if(0==q.getIncomingEdges(l[p]).length){n=m;if(null==n||n==q.model.getParent(b[p]))n=q.model.getTerminal(u[0],!0);e=this.cloneCell(u[0]);this.addEdge(e,q.getDefaultParent(),n,l[p])}}finally{this.model.endUpdate()}return l};if(null!=v.sidebar){var z=v.sidebar.dropAndConnect;v.sidebar.dropAndConnect=function(b,c,d,e){var f=q.model,g=null;f.beginUpdate();try{if(g=z.apply(this,arguments),a(b))for(var k=0;k<g.length;k++)if(f.isEdge(g[k])&&
+null==f.getTerminal(g[k],!0)){f.setTerminal(g[k],b,!0);var l=q.getCellGeometry(g[k]);l.points=null;null!=l.getTerminalPoint(!0)&&l.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return g}}var F={88:v.actions.get("selectChildren"),84:v.actions.get("selectSubtree"),80:v.actions.get("selectParent"),83:v.actions.get("selectSiblings")},D=v.onKeyDown;v.onKeyDown=function(b){try{if(q.isEnabled()&&!q.isEditing()&&a(q.getSelectionCell())&&1==q.getSelectionCount()){var c=null;0<q.getIncomingEdges(q.getSelectionCell()).length&&
+(9==b.which?c=mxEvent.isShiftDown(b)?t(q.getSelectionCell()):e(q.getSelectionCell()):13==b.which&&(c=n(q.getSelectionCell(),!mxEvent.isShiftDown(b))));if(null!=c&&0<c.length)1==c.length&&q.model.isEdge(c[0])?q.setSelectionCell(q.model.getTerminal(c[0],!1)):q.setSelectionCell(c[c.length-1]),null!=v.hoverIcons&&v.hoverIcons.update(q.view.getState(q.getSelectionCell())),q.startEditingAtCell(q.getSelectionCell()),mxEvent.consume(b);else if(mxEvent.isAltDown(b)&&mxEvent.isShiftDown(b)){var d=F[b.keyCode];
+null!=d&&(d.funct(b),mxEvent.consume(b))}else 37==b.keyCode?(p(q.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(b)):38==b.keyCode?(p(q.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(b)):39==b.keyCode?(p(q.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(b)):40==b.keyCode&&(p(q.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(b))}}catch(Q){v.handleError(Q)}mxEvent.isConsumed(b)||D.apply(this,arguments)};var C=q.connectVertex;q.connectVertex=
+function(b,c,d,f,g,k){var m=q.getIncomingEdges(b);return a(b)?(d=l(b),f=d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST,g=c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST,d==c||0==m.length?e(b,c):f==g?t(b):n(b,c!=mxConstants.DIRECTION_NORTH&&c!=mxConstants.DIRECTION_WEST)):C.call(this,b,c,d,f,g,k)};q.getSubtree=function(b){var d=[b];!c(b)&&!a(b)||k(b)||q.traverse(b,!0,function(a,b){null!=b&&0>mxUtils.indexOf(d,b)&&d.push(b);0>mxUtils.indexOf(d,a)&&d.push(a);return!0});return d};
+var G=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){G.apply(this,arguments);(c(this.state.cell)||a(this.state.cell))&&!k(this.state.cell)&&0<this.graph.getOutgoingEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title","Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="24px",this.moveHandle.style.height="24px",this.graph.container.appendChild(this.moveHandle),
+mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(a){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(a),mxEvent.getClientY(a),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(a);this.graph.isMouseDown=!0;v.hoverIcons.reset();mxEvent.consume(a)})))};var H=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){H.apply(this,arguments);null!=this.moveHandle&&
(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var J=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(a){J.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.display=a?"":"none")};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 c=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var a=c.apply(this,arguments),d=this.graph;return a.concat([this.addEntry("tree container",function(){var a=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");a.vertex=!0;var b=new mxCell("Parent",new mxGeometry(140,
60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');b.vertex=!0;var c=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');c.vertex=!0;var d=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");d.geometry.relative=
@@ -10279,14 +10280,14 @@ this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.m
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;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":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 g=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');g.vertex=!0;var e=new mxCell("",new mxGeometry(0,0,0,
0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");e.geometry.relative=!0;e.edge=!0;b.insertEdge(e,!0);g.insertEdge(e,!1);var m=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');m.vertex=!0;var p=new mxCell("",
-new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");p.geometry.relative=!0;p.edge=!0;b.insertEdge(p,!0);m.insertEdge(p,!1);var q=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;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
-q.vertex=!0;var t=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");t.geometry.relative=!0;t.edge=!0;b.insertEdge(t,!0);q.insertEdge(t,!1);a.insert(d);a.insert(e);a.insert(p);a.insert(t);a.insert(b);a.insert(c);a.insert(g);a.insert(m);a.insert(q);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var a=new mxCell("Central Idea",
+new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");p.geometry.relative=!0;p.edge=!0;b.insertEdge(p,!0);m.insertEdge(p,!1);var v=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;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
+v.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);v.insertEdge(q,!1);a.insert(d);a.insert(e);a.insert(p);a.insert(q);a.insert(b);a.insert(c);a.insert(g);a.insert(m);a.insert(v);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var a=new mxCell("Central Idea",
new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};treeFolding=1;treeMoving=1;');a.vertex=!0;return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps 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;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":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 mindmaps 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;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":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;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
a.vertex=!0;var b=new mxCell("Organization",new mxGeometry(80,40,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');d.setAttributeForCell(b,"treeRoot","1");b.vertex=!0;var c=new mxCell("Division",new mxGeometry(20,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
-c.vertex=!0;var g=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");g.geometry.relative=!0;g.edge=!0;b.insertEdge(g,!0);c.insertEdge(g,!1);var u=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');u.vertex=!0;var e=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
-e.geometry.relative=!0;e.edge=!0;b.insertEdge(e,!0);u.insertEdge(e,!1);a.insert(g);a.insert(e);a.insert(b);a.insert(c);a.insert(u);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree root",function(){var a=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');d.setAttributeForCell(a,"treeRoot",
+c.vertex=!0;var g=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");g.geometry.relative=!0;g.edge=!0;b.insertEdge(g,!0);c.insertEdge(g,!1);var t=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');t.vertex=!0;var e=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
+e.geometry.relative=!0;e.edge=!0;b.insertEdge(e,!0);t.insertEdge(e,!1);a.insert(g);a.insert(e);a.insert(b);a.insert(c);a.insert(t);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree root",function(){var a=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');d.setAttributeForCell(a,"treeRoot",
"1");a.vertex=!0;return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree division",function(){var a=new mxCell("Division",new mxGeometry(20,40,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');a.vertex=!0;var b=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
b.geometry.setTerminalPoint(new mxPoint(0,0),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);return sb.createVertexTemplateFromCells([a,b],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree sub sections",function(){var a=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");a.vertex=!0;var b=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");
b.geometry.setTerminalPoint(new mxPoint(110,-40),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);var c=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");c.vertex=!0;var d=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");d.geometry.setTerminalPoint(new mxPoint(110,-40),!0);d.geometry.relative=
@@ -10298,7 +10299,7 @@ g.className="geTitle";b.appendChild(g);return g}var d=document.createElement("di
c("newLibrary",mxResources.get("newLibrary")),d.style.boxSizing="border-box",d.style.paddingRight="6px",d.style.paddingLeft="6px",d.style.height="32px",d.style.left="0",d=c("openLibraryFrom",mxResources.get("openLibraryFrom")),d.style.borderLeft="1px solid lightgray",d.style.boxSizing="border-box",d.style.paddingRight="6px",d.style.paddingLeft="6px",d.style.height="32px",d.style.left="50%";b.appendChild(a.sidebar.container);b.style.overflow="hidden";return b});a.sidebarWindow.window.minimumSize=new mxRectangle(0,
0,90,90);a.sidebarWindow.window.setVisible(!0);a.getLocalData("sidebar",function(b){a.sidebar.showEntries(b,null,!0)});a.restoreLibraries()}else a.sidebarWindow.window.setVisible(!a.sidebarWindow.window.isVisible());a.sidebarWindow.window.isVisible()&&a.sidebarWindow.window.fit()}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=null;else{var c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;
try{var b=document.createElement("style");b.type="text/css";b.innerHTML="* { -webkit-font-smoothing: antialiased; }html body .mxWindow button.geBtn { font-size:12px !important; margin-left: 0; }html body table.mxWindow td.mxWindowPane div.mxWindowPane *:not(svg *) { font-size:9pt; }table.mxWindow * :not(svg *) { font-size:13px; }html body div.diagramContainer button, html body button.geBtn { font-size:14px; font-weight:700;border-radius: 5px; }html body button.geBtn:active { opacity: 0.6; }html body a.geMenuItem { opacity: 0.75; cursor: pointer; user-select:none; }html body a.geMenuItem[disabled] { opacity: 0.2; }html body a.geMenuItem[disabled]:active { opacity: 0.2; }html body div.geActivePage { opacity: 0.7; }html body a.geMenuItem:active { opacity: 0.2; }html body .geToolbarButton { opacity: 0.3; }html body .geToolbarButton:active { opacity: 0.15; }html body .geStatus:active { opacity: 0.5; }html table.mxPopupMenu tr.mxPopupMenuItemHover:active { opacity:0.7; }html body .geDialog input, html body .geToolbarContainer input, html body .mxWindow input {padding:2px;display:inline-block; }div.geDialog { border-radius: 5px; }html body div.geDialog button.geBigButton { color: #fff !important; border: none !important; }.mxWindow button, .geDialog select, .mxWindow select { display:inline-block; }html body .mxWindow .geColorBtn, html body .geDialog .geColorBtn { background: none; }html body div.diagramContainer button, html body .mxWindow button, html body .geDialog button { min-width: 0px; border-radius: 5px; color: #353535 !important; border-style: solid; border-width: 1px; border-color: rgb(216, 216, 216); }html body div.diagramContainer button:hover, html body .mxWindow button:hover, html body .geDialog button:hover { border-color: rgb(177, 177, 177); }html body div.diagramContainer button:active, html body .mxWindow button:active, html body .geDialog button:active { opacity: 0.6; }div.diagramContainer button.geBtn, .mxWindow button.geBtn, .geDialog button.geBtn { min-width:72px; font-weight: 600; background: none; }div.diagramContainer button.gePrimaryBtn, .mxWindow button.gePrimaryBtn, .geDialog button.gePrimaryBtn, html body .gePrimaryBtn { background: #29b6f2; color: #fff !important; border: none; box-shadow: none; }html body .gePrimaryBtn:hover { background: #29b6f2; border: none; box-shadow: inherit; }html body button.gePrimaryBtn:hover { background: #29b6f2; border: none; }.geBtn button { min-width:72px !important; }div.geToolbarContainer a.geButton { margin:0px; padding: 0 2px 4px 2px; } .geDialog, .mxWindow td.mxWindowPane *, div.geSprite, td.mxWindowTitle, .geDiagramContainer { box-sizing:content-box; }.mxWindow div button.geStyleButton { box-sizing: border-box; }table.mxWindow td.mxWindowPane button.geColorBtn { padding:0px; box-sizing: border-box; }td.mxWindowPane .geSidebarContainer button { padding:2px; box-sizing: border-box; }html body .geMenuItem { font-size:14px; text-decoration: none; font-weight: normal; padding: 6px 10px 6px 10px; border: none; border-radius: 5px; color: #353535; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }.geToolbarContainer { background:#fff !important; }div.geSidebarContainer { background-color: #ffffff; }div.geSidebarContainer .geTitle { background-color:#fdfdfd; }div.mxWindow td.mxWindowPane button { background-image: none; float: none; }td.mxWindowTitle { height: 22px !important; background: none !important; font-size: 13px !important; text-align:center !important; border-bottom:1px solid lightgray; }div.mxWindow, div.mxWindowTitle { background-image: none !important; background-color:#fff !important; }div.mxWindow { border-radius:5px; box-shadow: 0px 0px 2px #C0C0C0 !important;}div.mxWindow * { font-family: inherit !important; }html div.geVerticalHandle { position:absolute;bottom:0px;left:50%;cursor:row-resize;width:11px;height:11px;background:white;margin-bottom:-6px; margin-left:-6px; border: none; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }html div.geInactivePage { background: rgb(249, 249, 249) !important; color: #A0A0A0 !important; } html div.geActivePage { background: white !important;color: #353535 !important; } html div.mxRubberband { border:1px solid; border-color: #29b6f2 !important; background:rgba(41,182,242,0.4) !important; } html body div.mxPopupMenu { border-radius:5px; border:1px solid #c0c0c0; padding:5px 0 5px 0; box-shadow: 0px 4px 17px -4px rgba(96,96,96,1); } html table.mxPopupMenu td.mxPopupMenuItem { color: #353535; font-size: 14px; padding-top: 4px; padding-bottom: 4px; }html table.mxPopupMenu tr.mxPopupMenuItemHover { background-color: #29b6f2; }html tr.mxPopupMenuItemHover td.mxPopupMenuItem, html tr.mxPopupMenuItemHover td.mxPopupMenuItem span { color: #fff !important; }html tr.mxPopupMenuItem, html td.mxPopupMenuItem { transition-property: none !important; }html table.mxPopupMenu hr { height: 2px; background-color: rgba(0,0,0,.07); margin: 5px 0; }"+
-(mxClient.IS_IOS?"html input[type=checkbox], html input[type=radio] { height:12px; }":"");document.getElementsByTagName("head")[0].appendChild(b)}catch(v){}var g=function(a,b,c,d,e,f,g){var k=document.createElement("div");k.className="geSidebarContainer";k.style.position="absolute";k.style.width="100%";k.style.height="100%";k.style.border="1px solid whiteSmoke";k.style.overflowX="hidden";k.style.overflowY="auto";g(k);this.window=new mxWindow(b,k,c,d,e,f,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);
+(mxClient.IS_IOS?"html input[type=checkbox], html input[type=radio] { height:12px; }":"");document.getElementsByTagName("head")[0].appendChild(b)}catch(u){}var g=function(a,b,c,d,e,f,g){var k=document.createElement("div");k.className="geSidebarContainer";k.style.position="absolute";k.style.width="100%";k.style.height="100%";k.style.border="1px solid whiteSmoke";k.style.overflowX="hidden";k.style.overflowY="auto";g(k);this.window=new mxWindow(b,k,c,d,e,f,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);
this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.setLocation=function(a,b){var c=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;a=Math.max(0,Math.min(a,(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,c-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};mxClient.IS_SF&&
(this.window.div.onselectstart=mxUtils.bind(this,function(b){null==b&&(b=window.event);return null!=b&&a.isSelectionAllowed(b)}))};Editor.checkmarkImage=Graph.createSvgImage(22,18,'<path transform="translate(4 0)" d="M7.181,15.007a1,1,0,0,1-.793-0.391L3.222,10.5A1,1,0,1,1,4.808,9.274L7.132,12.3l6.044-8.86A1,1,0,1,1,14.83,4.569l-6.823,10a1,1,0,0,1-.8.437H7.181Z" fill="#29b6f2"/>').src;mxWindow.prototype.closeImage=Graph.createSvgImage(18,10,'<path d="M 5 1 L 13 9 M 13 1 L 5 9" stroke="#C0C0C0" stroke-width="2"/>').src;
mxWindow.prototype.minimizeImage=Graph.createSvgImage(14,10,'<path d="M 3 7 L 7 3 L 11 7" stroke="#C0C0C0" stroke-width="2" fill="#ffffff"/>').src;mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,10,'<path d="M 3 3 L 7 7 L 11 3" stroke="#C0C0C0" stroke-width="2" fill="#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=
@@ -10306,7 +10307,7 @@ mxWindow.prototype.minimizeImage=Graph.createSvgImage(14,10,'<path d="M 3 7 L 7
"#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=!mxClient.IS_IOS&&!mxClient.IS_ANDROID;Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var f=EditorUi.prototype.updateTabContainer;
EditorUi.prototype.updateTabContainer=function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom=this.tabContainerHeight+"px");f.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,b){null!=b.shortcut&&900>
c&&!mxClient.IS_IOS?a.firstChild.nextSibling.setAttribute("title",b.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="position:relative;margin-right:4px;cursor:pointer;display:"+a.style.display;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"));"none"!=a.style.display&&(a.style.display="inline-block")}};var u=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){u.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;";
+"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"));"none"!=a.style.display&&(a.style.display="inline-block")}};var t=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){t.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"}};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="8px";a.style.marginRight="4px";var b=document.createElement("a");
b.className="geMenuItem gePrimaryBtn";b.style.marginLeft="8px";b.style.padding="6px";"1"==urlParams.noSaveBtn?(mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",mxResources.get("saveAndExit")),mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b)):(mxUtils.write(b,mxResources.get("save")),b.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),
a.appendChild(b),"1"==urlParams.saveAndExit&&(b=document.createElement("a"),mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",mxResources.get("saveAndExit")),b.className="geMenuItem",b.style.marginLeft="6px",b.style.padding="6px",mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b)));b=document.createElement("a");mxUtils.write(b,mxResources.get("exit"));b.setAttribute("title",mxResources.get("exit"));b.className=
@@ -10315,7 +10316,7 @@ a.appendChild(b),"1"==urlParams.saveAndExit&&(b=document.createElement("a"),mxUt
"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("layout",a),this.addSubmenu("view",a,null,mxResources.get("options")),a.addSeparator(),this.addSubmenu("insert",a),this.addMenuItems(a,["-","exitGroup"],null,c)):d.isEnabled()&&this.addMenuItems(a,["-","lockUnlock"],null,c)};EditorUi.prototype.toggleFormatPanel=function(b){null!=this.formatWindow?
this.formatWindow.window.setVisible(b?!1:!this.formatWindow.window.isVisible()):a(this)};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};var m=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.sidebarWindow&&(this.sidebarWindow.window.setVisible(!1),this.sidebarWindow.window.destroy(),this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.window.setVisible(!1),this.formatWindow.window.destroy(),this.formatWindow=null);null!=this.actions.outlineWindow&&
(this.actions.outlineWindow.window.setVisible(!1),this.actions.outlineWindow.window.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&(this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.window.destroy(),this.actions.layersWindow=null);null!=this.menus.tagsWindow&&(this.menus.tagsWindow.window.setVisible(!1),this.menus.tagsWindow.window.destroy(),this.menus.tagsWindow=null);null!=this.menus.findWindow&&(this.menus.findWindow.window.setVisible(!1),this.menus.findWindow.window.destroy(),
-this.menus.findWindow=null);m.apply(this,arguments)};var p=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(a){p.apply(this,arguments);a||(null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1))};EditorUi.prototype.chromelessWindowResize=function(){};var q=Menus.prototype.init;Menus.prototype.init=function(){q.apply(this,arguments);var b=this.editorUi,c=b.editor.graph;b.actions.get("editDiagram").label=
+this.menus.findWindow=null);m.apply(this,arguments)};var p=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(a){p.apply(this,arguments);a||(null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1))};EditorUi.prototype.chromelessWindowResize=function(){};var v=Menus.prototype.init;Menus.prototype.init=function(){v.apply(this,arguments);var b=this.editorUi,c=b.editor.graph;b.actions.get("editDiagram").label=
mxResources.get("formatXml")+"...";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("importCsv",new Action(mxResources.get("csv")+"...",function(){c.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,"Insert from Text","formatSql");b.showDialog(a.container,620,420,!0,!1);a.init()}));b.actions.put("toggleShapes",new Action(mxResources.get("shapes")+"...",function(){d(b)}));b.actions.put("toggleFormat",new Action(mxResources.get("format")+"...",function(){a(b)}));EditorUi.enablePlantUml&&!b.isOffline()&&b.actions.put("plantUml",new Action(mxResources.get("plantUml")+
"...",function(){var a=new ParseDialog(b,"Insert from Text","plantUml");b.showDialog(a.container,620,420,!0,!1);a.init()}));this.put("diagram",new Menu(mxUtils.bind(this,function(a,c){var d=b.getCurrentFile();b.menus.addSubmenu("extras",a,c,mxResources.get("preferences"));a.addSeparator(c);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?(b.menus.addMenuItems(a,["new","open","-"],c),EditorUi.isElectronApp&&b.menus.addMenuItems(a,["synchronize","-"],c),b.menus.addMenuItems(a,["save","saveAs","-"],c)):
@@ -10326,7 +10327,7 @@ b.menus.addMenuItems(a,["-","revisionHistory"],c)})));var e=this.get("exportAs")
a,c);a.addSeparator(c);b.menus.addMenuItems(a,["scrollbars","tooltips","ruler"],c);"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&b.menus.addMenuItems(a,["-","search","scratchpad","-","showStartScreen"],c);!b.isOfflineApp()&&isLocalStorage&&b.menus.addMenuItem(a,"plugins",c);a.addSeparator(c);b.menus.addMenuItem(a,"drawConfig",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)})));mxUtils.bind(this,function(){var a=this.get("insert"),c=a.funct;a.funct=function(a,d){c.apply(this,arguments);a.addSeparator(d);b.menus.addMenuItems(a,["-","toggleShapes"],d)}})();var g="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),k=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):k(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 ruler - 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=function(){function a(a,b,c){var d=k.menus.get(a),e=p.addMenu(mxResources.get(a),mxUtils.bind(this,function(){d.funct.apply(this,arguments)}),n);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));k.menus.menuCreated(d,
+c)})))};var q=EditorUi.prototype.init;EditorUi.prototype.init=function(){function a(a,b,c){var d=k.menus.get(a),e=p.addMenu(mxResources.get(a),mxUtils.bind(this,function(){d.funct.apply(this,arguments)}),n);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));k.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 b(a,b,c,d,e,f){var g=document.createElement("a");g.className="geMenuItem";g.style.display=
"inline-block";g.style.boxSizing="border-box";g.style.height="30px";g.style.padding="6px";g.style.position="relative";g.style.verticalAlign="top";g.style.top="0px";null!=k.statusContainer?m.insertBefore(g,k.statusContainer):m.appendChild(g);null!=f?(g.style.backgroundImage="url("+f+")",g.style.backgroundPosition="center center",g.style.backgroundRepeat="no-repeat",g.style.backgroundSize="24px 24px",g.style.width="34px"):mxUtils.write(g,a);mxEvent.addListener(g,mxClient.IS_POINTER?"pointerdown":"mousedown",
mxUtils.bind(this,function(a){a.preventDefault()}));mxEvent.addListener(g,"click",function(a){"disabled"!=g.getAttribute("disabled")&&b(a);mxEvent.consume(a)});null==c&&(g.style.marginRight="4px");null!=d&&g.setAttribute("title",d);null!=e&&(a=function(){e.isEnabled()?(g.removeAttribute("disabled"),g.style.cursor="pointer"):(g.setAttribute("disabled","disabled"),g.style.cursor="default")},e.addListener("stateChanged",a),a());return g}function e(a,b){var c=document.createElement("div");c.className=
@@ -10340,45 +10341,45 @@ e([b("",function(){l.popupMenuHandler.hideMenu();var a=l.view.scale,b=l.view.tra
640<=c?b("",d.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",d,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHptMi41LTRoLTJ2Mkg5di0ySDdWOWgyVjdoMXYyaDJ2MXoiLz48L3N2Zz4="):
null,640<=c?b("",f.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",f,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHpNNyA5aDV2MUg3eiIvPjwvc3ZnPg=="):
null],60)}d=k.menus.get("language");null!=d&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=c?(null==O&&(f=p.addMenu("",d.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.right="8px",f.style.cursor=
-"pointer",f.style.top="1"==urlParams.embed?"12px":"11px",m.appendChild(f),O=f),k.buttonContainer.style.paddingRight="34px"):(k.buttonContainer.style.paddingRight="4px",null!=O&&(O.parentNode.removeChild(O),O=null))}t.apply(this,arguments);var g=document.createElement("div");g.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";g.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(g);null==urlParams.clibs&&
+"pointer",f.style.top="1"==urlParams.embed?"12px":"11px",m.appendChild(f),O=f),k.buttonContainer.style.paddingRight="34px"):(k.buttonContainer.style.paddingRight="4px",null!=O&&(O.parentNode.removeChild(O),O=null))}q.apply(this,arguments);var g=document.createElement("div");g.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";g.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(g);null==urlParams.clibs&&
null==urlParams.libs||d(this);var k=this,l=k.editor.graph;k.toolbar=this.createToolbar(k.createDiv("geToolbar"));k.defaultLibraryName=mxResources.get("untitledLibrary");var m=document.createElement("div");m.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;border-bottom:1px solid lightgray;background-color:#ffffff;text-align:left;white-space:nowrap;";var n=null,p=new Menubar(k,m);k.statusContainer=k.createStatusContainer();k.statusContainer.style.position="relative";
-k.statusContainer.style.maxWidth="";k.statusContainer.style.marginTop="7px";k.statusContainer.style.marginLeft="6px";k.statusContainer.style.color="gray";k.statusContainer.style.cursor="default";k.editor.addListener("statusChanged",mxUtils.bind(this,function(){k.setStatusText(k.editor.getStatus())}));var q=k.descriptorChanged;k.descriptorChanged=function(){q.apply(this,arguments);var a=k.getCurrentFile();if(null!=a&&null!=a.getTitle()){var b=a.getMode();"google"==b?b="googleDrive":"github"==b?b="gitHub":
+k.statusContainer.style.maxWidth="";k.statusContainer.style.marginTop="7px";k.statusContainer.style.marginLeft="6px";k.statusContainer.style.color="gray";k.statusContainer.style.cursor="default";k.editor.addListener("statusChanged",mxUtils.bind(this,function(){k.setStatusText(k.editor.getStatus())}));var t=k.descriptorChanged;k.descriptorChanged=function(){t.apply(this,arguments);var a=k.getCurrentFile();if(null!=a&&null!=a.getTitle()){var b=a.getMode();"google"==b?b="googleDrive":"github"==b?b="gitHub":
"gitlab"==b?b="gitLab":"onedrive"==b&&(b="oneDrive");b=mxResources.get(b);m.setAttribute("title",a.getTitle()+(null!=b?" ("+b+")":""))}else m.removeAttribute("title")};k.setStatusText(k.editor.getStatus());m.appendChild(k.statusContainer);k.buttonContainer=document.createElement("div");k.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";m.appendChild(k.buttonContainer);k.menubarContainer=k.buttonContainer;
-k.tabContainer=document.createElement("div");k.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 g=k.diagramContainer.parentNode,u=document.createElement("div");u.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";k.diagramContainer.style.top="47px";var I=k.menus.get("viewZoom");
-if(null!=I){this.tabContainer.style.right="70px";var F=p.addMenu("100%",I.funct);F.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");F.style.whiteSpace="nowrap";F.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";F.style.backgroundPosition="right 6px center";F.style.backgroundRepeat="no-repeat";F.style.backgroundColor="#ffffff";F.style.paddingRight="10px";F.style.display="block";F.style.position="absolute";F.style.textDecoration="none";F.style.textDecoration="none";
-F.style.right="0px";F.style.bottom="0px";F.style.overflow="hidden";F.style.visibility="hidden";F.style.textAlign="center";F.style.color="#000";F.style.fontSize="12px";F.style.color="#707070";F.style.width="59px";F.style.cursor="pointer";F.style.borderTop="1px solid lightgray";F.style.borderLeft="1px solid lightgray";F.style.height=parseInt(k.tabContainerHeight)-1+"px";F.style.lineHeight=parseInt(k.tabContainerHeight)+1+"px";u.appendChild(F);I=mxUtils.bind(this,function(){F.innerHTML=Math.round(100*
-k.editor.graph.view.scale)+"%"});k.editor.graph.view.addListener(mxEvent.EVENT_SCALE,I);k.editor.addListener("resetGraphView",I);k.editor.addListener("pageSelected",I);var K=k.setGraphEnabled;k.setGraphEnabled=function(){K.apply(this,arguments);null!=this.tabContainer&&(F.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility?this.tabContainerHeight+"px":"0px")}}u.appendChild(k.tabContainer);u.appendChild(m);u.appendChild(k.diagramContainer);
-g.appendChild(u);k.updateTabContainer();var O=null;f();mxEvent.addListener(window,"resize",function(){f();null!=k.sidebarWindow&&k.sidebarWindow.window.fit();null!=k.formatWindow&&k.formatWindow.window.fit();null!=k.actions.outlineWindow&&k.actions.outlineWindow.window.fit();null!=k.actions.layersWindow&&k.actions.layersWindow.window.fit();null!=k.menus.tagsWindow&&k.menus.tagsWindow.window.fit();null!=k.menus.findWindow&&k.menus.findWindow.window.fit()})}}};
-(function(){var a=!1;"min"!=uiTheme||a||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),a=!0);var d=EditorUi.initTheme;EditorUi.initTheme=function(){d.apply(this,arguments);"min"!=uiTheme||a||(this.initMinimalTheme(),a=!0)}})();(function(){var a=mxGuide.prototype.move;mxGuide.prototype.move=function(b,c,d,k){var f=c.y,g=c.x,u=!1,e=!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+g;p.y=b.y+f;p.width=b.width;p.height=b.height;for(var v=[],z=[],y=0;y<this.states.length;y++){var C=this.states[y];C instanceof mxCellState&&(k||!this.graph.isCellSelected(C.cell))&&((p.x>=C.x&&p.x<=C.x+C.width||C.x>=p.x&&C.x<=p.x+p.width)&&(p.y>
-C.y+C.height+4||p.y+p.height+4<C.y)?v.push(C):(p.y>=C.y&&p.y<=C.y+C.height||C.y>=p.y&&C.y<=p.y+p.height)&&(p.x>C.x+C.width+4||p.x+p.width+4<C.x)&&z.push(C))}var x=0,A=0,E=C=0,D=0,B=0,H=0,G=0,J=5*q;if(1<v.length){v.push(p);v.sort(function(a,b){return a.y-b.y});var I=!1,y=p==v[0],q=p==v[v.length-1];if(!y&&!q)for(y=1;y<v.length-1;y++)if(p==v[y]){q=v[y-1];y=v[y+1];C=A=E=(y.y-q.y-q.height-p.height)/2;break}for(y=0;y<v.length-1;y++){var q=v[y],F=v[y+1],K=p==q||p==F,F=F.y-q.y-q.height,I=I|p==q;if(0==A&&
-0==x)A=F,x=1;else if(Math.abs(A-F)<=(K||1==y&&I?t:0))x+=1;else if(1<x&&I){v=v.slice(0,y+1);break}else if(3<=v.length-y&&!I)x=0,C=A=0!=E?E:0,v.splice(0,0==y?1:y),y=-1;else break;0!=C||K||(A=C=F)}3==v.length&&v[1]==p&&(C=0)}if(1<z.length){z.push(p);z.sort(function(a,b){return a.x-b.x});I=!1;y=p==z[0];q=p==z[z.length-1];if(!y&&!q)for(y=1;y<z.length-1;y++)if(p==z[y]){q=z[y-1];y=z[y+1];H=B=G=(y.x-q.x-q.width-p.width)/2;break}for(y=0;y<z.length-1;y++){q=z[y];F=z[y+1];K=p==q||p==F;F=F.x-q.x-q.width;I|=p==
-q;if(0==B&&0==D)B=F,D=1;else if(Math.abs(B-F)<=(K||1==y&&I?t:0))D+=1;else if(1<D&&I){z=z.slice(0,y+1);break}else if(3<=z.length-y&&!I)D=0,H=B=0!=G?G:0,z.splice(0,0==y?1:y),y=-1;else break;0!=H||K||(B=H=F)}3==z.length&&z[1]==p&&(H=0)}t=function(a,b,c,d){var e=[],f;d?(d=J,f=0):(d=0,f=J);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};B=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<D&&D==z.length-1){D=[];G=m.guidesArrHor;u=[];g=0;y=z[0]==p?1:0;I=z[y].y+z[y].height;if(0<H)for(y=0;y<z.length-1;y++)q=
-z[y],F=z[y+1],p==q?(g=F.x-q.width-H,u.push(new mxPoint(g+q.width+J,I)),u.push(new mxPoint(F.x-J,I))):p==F?(u.push(new mxPoint(q.x+q.width+J,I)),g=q.x+q.width+H,u.push(new mxPoint(g-J,I))):(u.push(new mxPoint(q.x+q.width+J,I)),u.push(new mxPoint(F.x-J,I)));else q=z[0],y=z[2],g=q.x+q.width+(y.x-q.x-q.width-p.width)/2,u.push(new mxPoint(q.x+q.width+J,I)),u.push(new mxPoint(g-J,I)),u.push(new mxPoint(g+p.width+J,I)),u.push(new mxPoint(y.x-J,I));for(y=0;y<u.length;y+=2)z=u[y],H=u[y+1],z=t(z,H,null!=G?
-G[y/2]:null),z.node.style.visibility="visible",z.redraw(),D.push(z);for(y=u.length/2;null!=G&&y<G.length;y++)G[y].destroy();m.guidesArrHor=D;g-=b.x;u=!0}else B(!0);if(1<x&&x==v.length-1){D=[];G=m.guidesArrVer;e=[];f=0;y=v[0]==p?1:0;x=v[y].x+v[y].width;if(0<C)for(y=0;y<v.length-1;y++)q=v[y],F=v[y+1],p==q?(f=F.y-q.height-C,e.push(new mxPoint(x,f+q.height+J)),e.push(new mxPoint(x,F.y-J))):p==F?(e.push(new mxPoint(x,q.y+q.height+J)),f=q.y+q.height+C,e.push(new mxPoint(x,f-J))):(e.push(new mxPoint(x,q.y+
-q.height+J)),e.push(new mxPoint(x,F.y-J)));else q=v[0],y=v[2],f=q.y+q.height+(y.y-q.y-q.height-p.height)/2,e.push(new mxPoint(x,q.y+q.height+J)),e.push(new mxPoint(x,f-J)),e.push(new mxPoint(x,f+p.height+J)),e.push(new mxPoint(x,y.y-J));for(y=0;y<e.length;y+=2)z=e[y],H=e[y+1],z=t(z,H,null!=G?G[y/2]:null,!0),z.node.style.visibility="visible",z.redraw(),D.push(z);for(y=e.length/2;null!=G&&y<G.length;y++)G[y].destroy();m.guidesArrVer=D;f-=b.y;e=!0}else B(!1,!0)}if(u||e)return p=new mxPoint(g,f),v=a.call(this,
-b,p,d,k),u&&!e?p.y=v.y:e&&!u&&(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;B(!0,!0);return a.apply(this,arguments)};var d=mxGuide.prototype.setVisible;mxGuide.prototype.setVisible=function(a){d.call(this,a);var b=this.guidesArrVer,c=this.guidesArrHor;if(null!=b)for(var k=0;k<b.length;k++)b[k].node.style.visibility=a?"visible":"hidden";if(null!=
-c)for(k=0;k<c.length;k++)c[k].node.style.visibility=a?"visible":"hidden"};var c=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){c.call(this);var a=this.guidesArrVer,d=this.guidesArrHor;if(null!=a){for(var f=0;f<a.length;f++)a[f].destroy();this.guidesArrVer=null}if(null!=d){for(f=0;f<d.length;f++)d[f].destroy();this.guidesArrHor=null}}})();function mxRuler(a,d,c,b){function g(){var b=a.diagramContainer;u.style.top=b.offsetTop-k+"px";u.style.left=b.offsetLeft-k+"px";u.style.width=(c?0:b.offsetWidth)+k+"px";u.style.height=(c?b.offsetHeight:0)+k+"px"}function f(a,b,c){var d;return function(){var e=this,f=arguments,g=c&&!d;clearTimeout(d);d=setTimeout(function(){d=null;c||a.apply(e,f)},b);g&&a.apply(e,f)}}var k=this.RULER_THICKNESS,l=this;this.unit=d;var n="dark"!=window.uiTheme?{bkgClr:"#ffffff",outBkgClr:"#e8e9ed",cornerClr:"#fbfbfb",
-strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"}:{bkgClr:"#202020",outBkgClr:"#2a2a2a",cornerClr:"#2a2a2a",strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"},u=document.createElement("div");u.style.position="absolute";u.style.background=n.bkgClr;u.style[c?"borderRight":"borderBottom"]="0.5px solid "+n.strokeClr;u.style.borderLeft="0.5px solid "+n.strokeClr;document.body.appendChild(u);mxEvent.disableContextMenu(u);this.editorUiRefresh=a.refresh;a.refresh=function(b){l.editorUiRefresh.apply(a,
-arguments);g()};g();var e=document.createElement("canvas");e.width=u.offsetWidth;e.height=u.offsetHeight;u.style.overflow="hidden";e.style.position="relative";u.appendChild(e);var m=e.getContext("2d");this.ui=a;var p=a.editor.graph;this.graph=p;this.container=u;this.canvas=e;var q=function(a,b,d,e,f){a=Math.round(a);b=Math.round(b);d=Math.round(d);e=Math.round(e);m.beginPath();m.moveTo(a+.5,b+.5);m.lineTo(d+.5,e+.5);m.stroke();f&&(c?(m.save(),m.translate(a,b),m.rotate(-Math.PI/2),m.fillText(f,0,0),
-m.restore()):m.fillText(f,a,b))},t=function(){m.clearRect(0,0,e.width,e.height);m.beginPath();m.lineWidth=.7;m.strokeStyle=n.strokeClr;m.setLineDash([]);m.font="9px Arial";m.textAlign="center";var a=p.view.scale,b=p.view.getBackgroundPageBounds(),d=p.view.translate,f=p.view.getGraphBounds(),g=p.pageVisible,u=g?k+(c?b.y-p.container.scrollTop:b.x-p.container.scrollLeft):k+(c?d.y-p.container.scrollTop:d.x-p.container.scrollLeft),t=0;g&&(t=c?Math.floor(((f.y+1)/a-d.y)/p.pageFormat.height)*p.pageFormat.height*
-a:Math.floor(((f.x+1)/a-d.x)/p.pageFormat.width)*p.pageFormat.width*a);var D,B,H;switch(l.unit){case mxConstants.POINTS:D=H=10;B=[3,5,5,5,5,10,5,5,5,5];break;case mxConstants.MILLIMETERS:H=10;D=mxConstants.PIXELS_PER_MM;B=[5,3,3,3,3,6,3,3,3,3];break;case mxConstants.INCHES:H=.5>=a||4<=a?8:16,D=mxConstants.PIXELS_PER_INCH/H,B=[5,3,5,3,7,3,5,3,7,3,5,3,7,3,5,3]}d=D;2<=a?d=D/(2*Math.floor(a/2)):.5>=a&&(d=D*Math.floor(1/a/2)*(l.unit==mxConstants.MILLIMETERS?2:1));D=null;b=g?Math.min(u+(c?b.height:b.width),
-c?e.height:e.width):c?e.height:e.width;g&&(m.fillStyle=n.outBkgClr,c?(m.fillRect(0,k,k,u-k),m.fillRect(0,b,k,e.height)):(m.fillRect(k,0,u-k,k),m.fillRect(b,0,e.width,k)));m.fillStyle=n.fontClr;for(g=g?u:u%(d*a);g<=b;g+=d*a)if(f=Math.round((g-u)/a/d),!(g<k||f==D)){D=f;var G=null;0==f%H&&(G=l.formatText(t+f*d)+"");c?q(k-B[Math.abs(f)%H],g,k,g,G):q(g,k-B[Math.abs(f)%H],g,k,G)}m.lineWidth=1;q(c?0:k,c?k:0,k,k);m.fillStyle=n.cornerClr;m.fillRect(0,0,k,k)};this.drawRuler=t;this.sizeListener=d=f(function(){var a=
-p.container;c?(a=a.offsetHeight+k,e.height!=a&&(e.height=a,u.style.height=a+"px",t())):(a=a.offsetWidth+k,e.width!=a&&(e.width=a,u.style.width=a+"px",t()))},10);this.pageListener=function(){t()};this.scrollListener=b=f(function(){var a=c?p.container.scrollTop:p.container.scrollLeft;l.lastScroll!=a&&(l.lastScroll=a,t())},10);this.unitListener=function(a,b){l.setUnit(b.getProperty("unit"))};p.addListener(mxEvent.SIZE,d);p.container.addEventListener("scroll",b);p.view.addListener("unitChanged",this.unitListener);
-a.addListener("pageViewChanged",this.pageListener);a.addListener("pageScaleChanged",this.pageListener);a.addListener("pageFormatChanged",this.pageListener);this.setStyle=function(a){n=a;u.style.background=n.bkgClr;t()};this.origGuideMove=mxGuide.prototype.move;mxGuide.prototype.move=function(a,b,d,e){var f;if(c&&4<a.height||!c&&4<a.width){if(null!=l.guidePart)try{m.putImageData(l.guidePart.imgData1,l.guidePart.x1,l.guidePart.y1),m.putImageData(l.guidePart.imgData2,l.guidePart.x2,l.guidePart.y2),m.putImageData(l.guidePart.imgData3,
-l.guidePart.x3,l.guidePart.y3)}catch(K){}f=l.origGuideMove.apply(this,arguments);try{var g,p,u,t,v,y,z,C,F;m.lineWidth=.5;m.strokeStyle=n.guideClr;m.setLineDash([2]);c?(p=a.y+f.y+k-this.graph.container.scrollTop,g=0,v=p+a.height/2,t=k/2,C=p+a.height,z=0,u=m.getImageData(g,p-1,k,3),q(g,p,k,p),p--,y=m.getImageData(t,v-1,k,3),q(t,v,k,v),v--,F=m.getImageData(z,C-1,k,3),q(z,C,k,C),C--):(p=0,g=a.x+f.x+k-this.graph.container.scrollLeft,v=k/2,t=g+a.width/2,C=0,z=g+a.width,u=m.getImageData(g-1,p,3,k),q(g,
-p,g,k),g--,y=m.getImageData(t-1,v,3,k),q(t,v,t,k),t--,F=m.getImageData(z-1,C,3,k),q(z,C,z,k),z--);if(null==l.guidePart||l.guidePart.x1!=g||l.guidePart.y1!=p)l.guidePart={imgData1:u,x1:g,y1:p,imgData2:y,x2:t,y2:v,imgData3:F,x3:z,y3:C}}catch(K){}}else f=l.origGuideMove.apply(this,arguments);return f};this.origGuideDestroy=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){var a=l.origGuideDestroy.apply(this,arguments);if(null!=l.guidePart)try{m.putImageData(l.guidePart.imgData1,l.guidePart.x1,
-l.guidePart.y1),m.putImageData(l.guidePart.imgData2,l.guidePart.x2,l.guidePart.y2),m.putImageData(l.guidePart.imgData3,l.guidePart.x3,l.guidePart.y3),l.guidePart=null}catch(z){}return a}}mxRuler.prototype.RULER_THICKNESS=14;mxRuler.prototype.unit=mxConstants.POINTS;mxRuler.prototype.setUnit=function(a){this.unit=a;this.drawRuler()};
+k.tabContainer=document.createElement("div");k.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 g=k.diagramContainer.parentNode,v=document.createElement("div");v.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";k.diagramContainer.style.top="47px";var I=k.menus.get("viewZoom");
+if(null!=I){this.tabContainer.style.right="70px";var E=p.addMenu("100%",I.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.cursor="pointer";E.style.borderTop="1px solid lightgray";E.style.borderLeft="1px solid lightgray";E.style.height=parseInt(k.tabContainerHeight)-1+"px";E.style.lineHeight=parseInt(k.tabContainerHeight)+1+"px";v.appendChild(E);I=mxUtils.bind(this,function(){E.innerHTML=Math.round(100*
+k.editor.graph.view.scale)+"%"});k.editor.graph.view.addListener(mxEvent.EVENT_SCALE,I);k.editor.addListener("resetGraphView",I);k.editor.addListener("pageSelected",I);var K=k.setGraphEnabled;k.setGraphEnabled=function(){K.apply(this,arguments);null!=this.tabContainer&&(E.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility?this.tabContainerHeight+"px":"0px")}}v.appendChild(k.tabContainer);v.appendChild(m);v.appendChild(k.diagramContainer);
+g.appendChild(v);k.updateTabContainer();var O=null;f();mxEvent.addListener(window,"resize",function(){f();null!=k.sidebarWindow&&k.sidebarWindow.window.fit();null!=k.formatWindow&&k.formatWindow.window.fit();null!=k.actions.outlineWindow&&k.actions.outlineWindow.window.fit();null!=k.actions.layersWindow&&k.actions.layersWindow.window.fit();null!=k.menus.tagsWindow&&k.menus.tagsWindow.window.fit();null!=k.menus.findWindow&&k.menus.findWindow.window.fit()})}}};
+(function(){var a=!1;"min"!=uiTheme||a||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),a=!0);var d=EditorUi.initTheme;EditorUi.initTheme=function(){d.apply(this,arguments);"min"!=uiTheme||a||(this.initMinimalTheme(),a=!0)}})();(function(){var a=mxGuide.prototype.move;mxGuide.prototype.move=function(b,c,d,k){var f=c.y,g=c.x,t=!1,e=!1;if(null!=this.states&&null!=b&&null!=c){var m=this,p=new mxCellState,v=this.graph.getView().scale,q=Math.max(2,this.getGuideTolerance()/2);p.x=b.x+g;p.y=b.y+f;p.width=b.width;p.height=b.height;for(var u=[],y=[],x=0;x<this.states.length;x++){var B=this.states[x];B instanceof mxCellState&&(k||!this.graph.isCellSelected(B.cell))&&((p.x>=B.x&&p.x<=B.x+B.width||B.x>=p.x&&B.x<=p.x+p.width)&&(p.y>
+B.y+B.height+4||p.y+p.height+4<B.y)?u.push(B):(p.y>=B.y&&p.y<=B.y+B.height||B.y>=p.y&&B.y<=p.y+p.height)&&(p.x>B.x+B.width+4||p.x+p.width+4<B.x)&&y.push(B))}var A=0,z=0,F=B=0,D=0,C=0,G=0,H=0,J=5*v;if(1<u.length){u.push(p);u.sort(function(a,b){return a.y-b.y});var I=!1,x=p==u[0],v=p==u[u.length-1];if(!x&&!v)for(x=1;x<u.length-1;x++)if(p==u[x]){v=u[x-1];x=u[x+1];B=z=F=(x.y-v.y-v.height-p.height)/2;break}for(x=0;x<u.length-1;x++){var v=u[x],E=u[x+1],K=p==v||p==E,E=E.y-v.y-v.height,I=I|p==v;if(0==z&&
+0==A)z=E,A=1;else if(Math.abs(z-E)<=(K||1==x&&I?q:0))A+=1;else if(1<A&&I){u=u.slice(0,x+1);break}else if(3<=u.length-x&&!I)A=0,B=z=0!=F?F:0,u.splice(0,0==x?1:x),x=-1;else break;0!=B||K||(z=B=E)}3==u.length&&u[1]==p&&(B=0)}if(1<y.length){y.push(p);y.sort(function(a,b){return a.x-b.x});I=!1;x=p==y[0];v=p==y[y.length-1];if(!x&&!v)for(x=1;x<y.length-1;x++)if(p==y[x]){v=y[x-1];x=y[x+1];G=C=H=(x.x-v.x-v.width-p.width)/2;break}for(x=0;x<y.length-1;x++){v=y[x];E=y[x+1];K=p==v||p==E;E=E.x-v.x-v.width;I|=p==
+v;if(0==C&&0==D)C=E,D=1;else if(Math.abs(C-E)<=(K||1==x&&I?q:0))D+=1;else if(1<D&&I){y=y.slice(0,x+1);break}else if(3<=y.length-x&&!I)D=0,G=C=0!=H?H:0,y.splice(0,0==x?1:x),x=-1;else break;0!=G||K||(C=G=E)}3==y.length&&y[1]==p&&(G=0)}q=function(a,b,c,d){var e=[],f;d?(d=J,f=0):(d=0,f=J);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};C=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<D&&D==y.length-1){D=[];H=m.guidesArrHor;t=[];g=0;x=y[0]==p?1:0;I=y[x].y+y[x].height;if(0<G)for(x=0;x<y.length-1;x++)v=
+y[x],E=y[x+1],p==v?(g=E.x-v.width-G,t.push(new mxPoint(g+v.width+J,I)),t.push(new mxPoint(E.x-J,I))):p==E?(t.push(new mxPoint(v.x+v.width+J,I)),g=v.x+v.width+G,t.push(new mxPoint(g-J,I))):(t.push(new mxPoint(v.x+v.width+J,I)),t.push(new mxPoint(E.x-J,I)));else v=y[0],x=y[2],g=v.x+v.width+(x.x-v.x-v.width-p.width)/2,t.push(new mxPoint(v.x+v.width+J,I)),t.push(new mxPoint(g-J,I)),t.push(new mxPoint(g+p.width+J,I)),t.push(new mxPoint(x.x-J,I));for(x=0;x<t.length;x+=2)y=t[x],G=t[x+1],y=q(y,G,null!=H?
+H[x/2]:null),y.node.style.visibility="visible",y.redraw(),D.push(y);for(x=t.length/2;null!=H&&x<H.length;x++)H[x].destroy();m.guidesArrHor=D;g-=b.x;t=!0}else C(!0);if(1<A&&A==u.length-1){D=[];H=m.guidesArrVer;e=[];f=0;x=u[0]==p?1:0;A=u[x].x+u[x].width;if(0<B)for(x=0;x<u.length-1;x++)v=u[x],E=u[x+1],p==v?(f=E.y-v.height-B,e.push(new mxPoint(A,f+v.height+J)),e.push(new mxPoint(A,E.y-J))):p==E?(e.push(new mxPoint(A,v.y+v.height+J)),f=v.y+v.height+B,e.push(new mxPoint(A,f-J))):(e.push(new mxPoint(A,v.y+
+v.height+J)),e.push(new mxPoint(A,E.y-J)));else v=u[0],x=u[2],f=v.y+v.height+(x.y-v.y-v.height-p.height)/2,e.push(new mxPoint(A,v.y+v.height+J)),e.push(new mxPoint(A,f-J)),e.push(new mxPoint(A,f+p.height+J)),e.push(new mxPoint(A,x.y-J));for(x=0;x<e.length;x+=2)y=e[x],G=e[x+1],y=q(y,G,null!=H?H[x/2]:null,!0),y.node.style.visibility="visible",y.redraw(),D.push(y);for(x=e.length/2;null!=H&&x<H.length;x++)H[x].destroy();m.guidesArrVer=D;f-=b.y;e=!0}else C(!1,!0)}if(t||e)return p=new mxPoint(g,f),u=a.call(this,
+b,p,d,k),t&&!e?p.y=u.y:e&&!t&&(p.x=u.x),u.y!=p.y&&null!=this.guideY&&null!=this.guideY.node&&(this.guideY.node.style.visibility="hidden"),u.x!=p.x&&null!=this.guideX&&null!=this.guideX.node&&(this.guideX.node.style.visibility="hidden"),p;C(!0,!0);return a.apply(this,arguments)};var d=mxGuide.prototype.setVisible;mxGuide.prototype.setVisible=function(a){d.call(this,a);var b=this.guidesArrVer,c=this.guidesArrHor;if(null!=b)for(var k=0;k<b.length;k++)b[k].node.style.visibility=a?"visible":"hidden";if(null!=
+c)for(k=0;k<c.length;k++)c[k].node.style.visibility=a?"visible":"hidden"};var c=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){c.call(this);var a=this.guidesArrVer,d=this.guidesArrHor;if(null!=a){for(var f=0;f<a.length;f++)a[f].destroy();this.guidesArrVer=null}if(null!=d){for(f=0;f<d.length;f++)d[f].destroy();this.guidesArrHor=null}}})();function mxRuler(a,d,c,b){function g(){var b=a.diagramContainer;t.style.top=b.offsetTop-k+"px";t.style.left=b.offsetLeft-k+"px";t.style.width=(c?0:b.offsetWidth)+k+"px";t.style.height=(c?b.offsetHeight:0)+k+"px"}function f(a,b,c){var d;return function(){var e=this,f=arguments,g=c&&!d;clearTimeout(d);d=setTimeout(function(){d=null;c||a.apply(e,f)},b);g&&a.apply(e,f)}}var k=this.RULER_THICKNESS,l=this;this.unit=d;var n="dark"!=window.uiTheme?{bkgClr:"#ffffff",outBkgClr:"#e8e9ed",cornerClr:"#fbfbfb",
+strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"}:{bkgClr:"#202020",outBkgClr:"#2a2a2a",cornerClr:"#2a2a2a",strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"},t=document.createElement("div");t.style.position="absolute";t.style.background=n.bkgClr;t.style[c?"borderRight":"borderBottom"]="0.5px solid "+n.strokeClr;t.style.borderLeft="0.5px solid "+n.strokeClr;document.body.appendChild(t);mxEvent.disableContextMenu(t);this.editorUiRefresh=a.refresh;a.refresh=function(b){l.editorUiRefresh.apply(a,
+arguments);g()};g();var e=document.createElement("canvas");e.width=t.offsetWidth;e.height=t.offsetHeight;t.style.overflow="hidden";e.style.position="relative";t.appendChild(e);var m=e.getContext("2d");this.ui=a;var p=a.editor.graph;this.graph=p;this.container=t;this.canvas=e;var v=function(a,b,d,e,f){a=Math.round(a);b=Math.round(b);d=Math.round(d);e=Math.round(e);m.beginPath();m.moveTo(a+.5,b+.5);m.lineTo(d+.5,e+.5);m.stroke();f&&(c?(m.save(),m.translate(a,b),m.rotate(-Math.PI/2),m.fillText(f,0,0),
+m.restore()):m.fillText(f,a,b))},q=function(){m.clearRect(0,0,e.width,e.height);m.beginPath();m.lineWidth=.7;m.strokeStyle=n.strokeClr;m.setLineDash([]);m.font="9px Arial";m.textAlign="center";var a=p.view.scale,b=p.view.getBackgroundPageBounds(),d=p.view.translate,f=p.view.getGraphBounds(),g=p.pageVisible,t=g?k+(c?b.y-p.container.scrollTop:b.x-p.container.scrollLeft):k+(c?d.y-p.container.scrollTop:d.x-p.container.scrollLeft),q=0;g&&(q=c?Math.floor(((f.y+1)/a-d.y)/p.pageFormat.height)*p.pageFormat.height*
+a:Math.floor(((f.x+1)/a-d.x)/p.pageFormat.width)*p.pageFormat.width*a);var D,C,G;switch(l.unit){case mxConstants.POINTS:D=G=10;C=[3,5,5,5,5,10,5,5,5,5];break;case mxConstants.MILLIMETERS:G=10;D=mxConstants.PIXELS_PER_MM;C=[5,3,3,3,3,6,3,3,3,3];break;case mxConstants.INCHES:G=.5>=a||4<=a?8:16,D=mxConstants.PIXELS_PER_INCH/G,C=[5,3,5,3,7,3,5,3,7,3,5,3,7,3,5,3]}d=D;2<=a?d=D/(2*Math.floor(a/2)):.5>=a&&(d=D*Math.floor(1/a/2)*(l.unit==mxConstants.MILLIMETERS?2:1));D=null;b=g?Math.min(t+(c?b.height:b.width),
+c?e.height:e.width):c?e.height:e.width;g&&(m.fillStyle=n.outBkgClr,c?(m.fillRect(0,k,k,t-k),m.fillRect(0,b,k,e.height)):(m.fillRect(k,0,t-k,k),m.fillRect(b,0,e.width,k)));m.fillStyle=n.fontClr;for(g=g?t:t%(d*a);g<=b;g+=d*a)if(f=Math.round((g-t)/a/d),!(g<k||f==D)){D=f;var H=null;0==f%G&&(H=l.formatText(q+f*d)+"");c?v(k-C[Math.abs(f)%G],g,k,g,H):v(g,k-C[Math.abs(f)%G],g,k,H)}m.lineWidth=1;v(c?0:k,c?k:0,k,k);m.fillStyle=n.cornerClr;m.fillRect(0,0,k,k)};this.drawRuler=q;this.sizeListener=d=f(function(){var a=
+p.container;c?(a=a.offsetHeight+k,e.height!=a&&(e.height=a,t.style.height=a+"px",q())):(a=a.offsetWidth+k,e.width!=a&&(e.width=a,t.style.width=a+"px",q()))},10);this.pageListener=function(){q()};this.scrollListener=b=f(function(){var a=c?p.container.scrollTop:p.container.scrollLeft;l.lastScroll!=a&&(l.lastScroll=a,q())},10);this.unitListener=function(a,b){l.setUnit(b.getProperty("unit"))};p.addListener(mxEvent.SIZE,d);p.container.addEventListener("scroll",b);p.view.addListener("unitChanged",this.unitListener);
+a.addListener("pageViewChanged",this.pageListener);a.addListener("pageScaleChanged",this.pageListener);a.addListener("pageFormatChanged",this.pageListener);this.setStyle=function(a){n=a;t.style.background=n.bkgClr;q()};this.origGuideMove=mxGuide.prototype.move;mxGuide.prototype.move=function(a,b,d,e){var f;if(c&&4<a.height||!c&&4<a.width){if(null!=l.guidePart)try{m.putImageData(l.guidePart.imgData1,l.guidePart.x1,l.guidePart.y1),m.putImageData(l.guidePart.imgData2,l.guidePart.x2,l.guidePart.y2),m.putImageData(l.guidePart.imgData3,
+l.guidePart.x3,l.guidePart.y3)}catch(K){}f=l.origGuideMove.apply(this,arguments);try{var g,p,t,q,u,x,y,B,E;m.lineWidth=.5;m.strokeStyle=n.guideClr;m.setLineDash([2]);c?(p=a.y+f.y+k-this.graph.container.scrollTop,g=0,u=p+a.height/2,q=k/2,B=p+a.height,y=0,t=m.getImageData(g,p-1,k,3),v(g,p,k,p),p--,x=m.getImageData(q,u-1,k,3),v(q,u,k,u),u--,E=m.getImageData(y,B-1,k,3),v(y,B,k,B),B--):(p=0,g=a.x+f.x+k-this.graph.container.scrollLeft,u=k/2,q=g+a.width/2,B=0,y=g+a.width,t=m.getImageData(g-1,p,3,k),v(g,
+p,g,k),g--,x=m.getImageData(q-1,u,3,k),v(q,u,q,k),q--,E=m.getImageData(y-1,B,3,k),v(y,B,y,k),y--);if(null==l.guidePart||l.guidePart.x1!=g||l.guidePart.y1!=p)l.guidePart={imgData1:t,x1:g,y1:p,imgData2:x,x2:q,y2:u,imgData3:E,x3:y,y3:B}}catch(K){}}else f=l.origGuideMove.apply(this,arguments);return f};this.origGuideDestroy=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){var a=l.origGuideDestroy.apply(this,arguments);if(null!=l.guidePart)try{m.putImageData(l.guidePart.imgData1,l.guidePart.x1,
+l.guidePart.y1),m.putImageData(l.guidePart.imgData2,l.guidePart.x2,l.guidePart.y2),m.putImageData(l.guidePart.imgData3,l.guidePart.x3,l.guidePart.y3),l.guidePart=null}catch(y){}return a}}mxRuler.prototype.RULER_THICKNESS=14;mxRuler.prototype.unit=mxConstants.POINTS;mxRuler.prototype.setUnit=function(a){this.unit=a;this.drawRuler()};
mxRuler.prototype.formatText=function(a){switch(this.unit){case mxConstants.POINTS:return Math.round(a);case mxConstants.MILLIMETERS:return(a/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.INCHES:return(a/mxConstants.PIXELS_PER_INCH).toFixed(2)}};
mxRuler.prototype.destroy=function(){this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.graph.removeListener(this.sizeListener);this.graph.container.removeEventListener("scroll",this.scrollListener);this.graph.view.removeListener("unitChanged",this.unitListener);this.ui.removeListener("pageViewChanged",this.pageListener);this.ui.removeListener("pageScaleChanged",this.pageListener);this.ui.removeListener("pageFormatChanged",
this.pageListener);null!=this.container&&this.container.parentNode.removeChild(this.container)};
function mxDualRuler(a,d){var c=new mxPoint(mxRuler.prototype.RULER_THICKNESS,mxRuler.prototype.RULER_THICKNESS);this.editorUiGetDiagContOffset=a.getDiagramContainerOffset;a.getDiagramContainerOffset=function(){return c};this.editorUiRefresh=a.refresh;this.ui=a;this.origGuideMove=mxGuide.prototype.move;this.origGuideDestroy=mxGuide.prototype.destroy;this.vRuler=new mxRuler(a,d,!0);this.hRuler=new mxRuler(a,d,!1,!0);var b=mxUtils.bind(this,function(b){var c=!1;mxEvent.addGestureListeners(b,mxUtils.bind(this,
function(b){c=null!=a.currentMenu;mxEvent.consume(b)}),null,mxUtils.bind(this,function(d){if(a.editor.graph.isEnabled()&&!a.editor.graph.isMouseDown&&(mxEvent.isTouchEvent(d)||mxEvent.isPopupTrigger(d))){a.editor.graph.popupMenuHandler.hideMenu();a.hideCurrentMenu();if(!mxEvent.isTouchEvent(d)||!c){var f=new mxPopupMenu(mxUtils.bind(this,function(b,c){a.menus.addMenuItems(b,["points","millimeters"],c)}));f.div.className+=" geMenubarMenu";f.smartSeparators=!0;f.showDisabled=!0;f.autoExpand=!0;f.hideMenu=
mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(f,arguments);a.resetCurrentMenu();f.destroy()});var g=mxEvent.getClientX(d),k=mxEvent.getClientY(d);f.popup(g,k,null,d);a.setCurrentMenu(f,b)}mxEvent.consume(d)}}))});b(this.hRuler.container);b(this.vRuler.container);this.vRuler.drawRuler();this.hRuler.drawRuler()}mxDualRuler.prototype.setUnit=function(a){this.vRuler.setUnit(a);this.hRuler.setUnit(a)};mxDualRuler.prototype.setStyle=function(a){this.vRuler.setStyle(a);this.hRuler.setStyle(a)};
-mxDualRuler.prototype.destroy=function(){this.vRuler.destroy();this.hRuler.destroy();this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.ui.getDiagramContainerOffset=this.editorUiGetDiagContOffset};function mxFreehand(a){var d=null!=a.view&&null!=a.view.canvas?a.view.canvas.ownerSVGElement:null;if(null!=a.container&&null!=d){var c=mxFreehand.prototype.NORMAL_SMOOTHING,b=null,g=[],f,k=[],l,n=!1,u=!0,e=[],m=!1,p=!0;this.setClosedPath=function(a){n=a};this.setAutoClose=function(a){u=a};this.setStopClickEnabled=function(a){p=a};this.setSmoothing=function(a){c=a};var q=function(b){m=b;a.getRubberband().setEnabled(!b);a.graphHandler.setSelectEnabled(!b);a.graphHandler.setMoveEnabled(!b);a.container.style.cursor=
-b?"crosshair":"";a.fireEvent(new mxEventObject("freehandStateChanged"))};this.startDrawing=function(){q(!0)};this.isDrawing=function(){return m};var t=mxUtils.bind(this,function(a){if(b){var c=p&&0<k.length&&null!=l&&2>l.length;c||k.push.apply(k,l);l=[];k.push(null);g.push(b);b=null;c&&this.stopDrawing();mxEvent.consume(a)}});this.stopDrawing=function(){if(0<g.length){for(var c=k[0].x,d=k[0].x,e=k[0].y,f=k[0].y,l=1;l<k.length;l++)null!=k[l]&&(c=Math.max(c,k[l].x),d=Math.min(d,k[l].x),e=Math.max(e,
-k[l].y),f=Math.min(f,k[l].y));c-=d;e-=f;if(0<c&&0<e){var m=100/c,p=100/e;k.map(function(a){if(null==a)return a;a.x=(a.x-d)*m;a.y=(a.y-f)*p;return a});for(var t='<shape strokewidth="inherit"><foreground>',v=0,l=0;l<k.length;l++){var y=k[l];if(null==y){var y=!1,v=k[v],z=k[l-1];!n&&u&&(y=v.x-z.x,z=v.y-z.y,y=Math.sqrt(y*y+z*z)<=a.tolerance);if(n||y)t+='<line x="'+v.x.toFixed(2)+'" y="'+v.y.toFixed(2)+'"/>';t+="</path>"+(n||y?"<fillstroke/>":"<stroke/>");v=l+1}else t=l==v?t+('<path><move x="'+y.x.toFixed(2)+
-'" y="'+y.y.toFixed(2)+'"/>'):t+('<line x="'+y.x.toFixed(2)+'" y="'+y.y.toFixed(2)+'"/>')}var l=mxConstants.STYLE_SHAPE+"=stencil("+Graph.compress(t+"</foreground></shape>")+");fillColor=none;",t=a.view.scale,v=a.view.translate,K=new mxCell("",new mxGeometry(d/t-v.x,f/t-v.y,c/t,e/t),l);K.vertex=1;a.model.beginUpdate();try{K=a.addCell(K)}finally{a.model.endUpdate()}a.fireEvent(new mxEventObject("cellsInserted","cells",[K]));a.fireEvent(new mxEventObject("freehandInserted","cell",K));setTimeout(function(){a.setSelectionCells([K])},
-10)}for(l=0;l<g.length;l++)g[l].parentNode.removeChild(g[l]);b=null;g=[];k=[]}q(!1)};mxEvent.addGestureListeners(d,function(c){if(m){var g=parseFloat(a.currentVertexStyle[mxConstants.STYLE_STROKEWIDTH]||1),g=Math.max(1,g*a.view.scale);b=document.createElementNS("http://www.w3.org/2000/svg","path");b.setAttribute("fill","none");b.setAttribute("stroke",a.currentVertexStyle[mxConstants.STYLE_STROKECOLOR]||"#000");b.setAttribute("stroke-width",g);if("1"==a.currentVertexStyle[mxConstants.STYLE_DASHED]){var n=
-a.currentVertexStyle[mxConstants.STYLE_DASH_PATTERN]||"3 3",n=n.split(" ").map(function(a){return parseFloat(a)*g}).join(" ");b.setAttribute("stroke-dasharray",n)}e=[];n=v(c);z(n);f="M"+n.x+" "+n.y;k.push(n);l=[];b.setAttribute("d",f);d.appendChild(b);mxEvent.consume(c)}},function(a){if(b){z(v(a));var c=y(0);if(c){f+=" L"+c.x+" "+c.y;k.push(c);var d="";l=[];for(var g=2;g<e.length;g+=2)c=y(g),d+=" L"+c.x+" "+c.y,l.push(c);b.setAttribute("d",f+d)}mxEvent.consume(a)}},t);var v=function(b){return mxUtils.convertPoint(a.container,
-mxEvent.getClientX(b),mxEvent.getClientY(b))},z=function(a){for(e.push(a);e.length>c;)e.shift()},y=function(a){var b=e.length;if(1===b%2||b>=c){var d=0,f=0,g,k=0;for(g=a;g<b;g++)k++,a=e[g],d+=a.x,f+=a.y;return{x:d/k,y:f/k}}return null}}}mxFreehand.prototype.NO_SMOOTHING=1;mxFreehand.prototype.MILD_SMOOTHING=4;mxFreehand.prototype.NORMAL_SMOOTHING=8;mxFreehand.prototype.VERY_SMOOTH_SMOOTHING=12;mxFreehand.prototype.SUPER_SMOOTH_SMOOTHING=16;mxFreehand.prototype.HYPER_SMOOTH_SMOOTHING=20;
+mxDualRuler.prototype.destroy=function(){this.vRuler.destroy();this.hRuler.destroy();this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.ui.getDiagramContainerOffset=this.editorUiGetDiagContOffset};function mxFreehand(a){var d=null!=a.view&&null!=a.view.canvas?a.view.canvas.ownerSVGElement:null;if(null!=a.container&&null!=d){var c=mxFreehand.prototype.NORMAL_SMOOTHING,b=null,g=[],f,k=[],l,n=!1,t=!0,e=[],m=!1,p=!0;this.setClosedPath=function(a){n=a};this.setAutoClose=function(a){t=a};this.setStopClickEnabled=function(a){p=a};this.setSmoothing=function(a){c=a};var v=function(b){m=b;a.getRubberband().setEnabled(!b);a.graphHandler.setSelectEnabled(!b);a.graphHandler.setMoveEnabled(!b);a.container.style.cursor=
+b?"crosshair":"";a.fireEvent(new mxEventObject("freehandStateChanged"))};this.startDrawing=function(){v(!0)};this.isDrawing=function(){return m};var q=mxUtils.bind(this,function(a){if(b){var c=p&&0<k.length&&null!=l&&2>l.length;c||k.push.apply(k,l);l=[];k.push(null);g.push(b);b=null;c&&this.stopDrawing();mxEvent.consume(a)}});this.stopDrawing=function(){if(0<g.length){for(var c=k[0].x,d=k[0].x,e=k[0].y,f=k[0].y,l=1;l<k.length;l++)null!=k[l]&&(c=Math.max(c,k[l].x),d=Math.min(d,k[l].x),e=Math.max(e,
+k[l].y),f=Math.min(f,k[l].y));c-=d;e-=f;if(0<c&&0<e){var m=100/c,p=100/e;k.map(function(a){if(null==a)return a;a.x=(a.x-d)*m;a.y=(a.y-f)*p;return a});for(var q='<shape strokewidth="inherit"><foreground>',u=0,l=0;l<k.length;l++){var x=k[l];if(null==x){var x=!1,u=k[u],y=k[l-1];!n&&t&&(x=u.x-y.x,y=u.y-y.y,x=Math.sqrt(x*x+y*y)<=a.tolerance);if(n||x)q+='<line x="'+u.x.toFixed(2)+'" y="'+u.y.toFixed(2)+'"/>';q+="</path>"+(n||x?"<fillstroke/>":"<stroke/>");u=l+1}else q=l==u?q+('<path><move x="'+x.x.toFixed(2)+
+'" y="'+x.y.toFixed(2)+'"/>'):q+('<line x="'+x.x.toFixed(2)+'" y="'+x.y.toFixed(2)+'"/>')}var l=mxConstants.STYLE_SHAPE+"=stencil("+Graph.compress(q+"</foreground></shape>")+");fillColor=none;",q=a.view.scale,u=a.view.translate,K=new mxCell("",new mxGeometry(d/q-u.x,f/q-u.y,c/q,e/q),l);K.vertex=1;a.model.beginUpdate();try{K=a.addCell(K)}finally{a.model.endUpdate()}a.fireEvent(new mxEventObject("cellsInserted","cells",[K]));a.fireEvent(new mxEventObject("freehandInserted","cell",K));setTimeout(function(){a.setSelectionCells([K])},
+10)}for(l=0;l<g.length;l++)g[l].parentNode.removeChild(g[l]);b=null;g=[];k=[]}v(!1)};mxEvent.addGestureListeners(d,function(c){if(m){var g=parseFloat(a.currentVertexStyle[mxConstants.STYLE_STROKEWIDTH]||1),g=Math.max(1,g*a.view.scale);b=document.createElementNS("http://www.w3.org/2000/svg","path");b.setAttribute("fill","none");b.setAttribute("stroke",a.currentVertexStyle[mxConstants.STYLE_STROKECOLOR]||"#000");b.setAttribute("stroke-width",g);if("1"==a.currentVertexStyle[mxConstants.STYLE_DASHED]){var n=
+a.currentVertexStyle[mxConstants.STYLE_DASH_PATTERN]||"3 3",n=n.split(" ").map(function(a){return parseFloat(a)*g}).join(" ");b.setAttribute("stroke-dasharray",n)}e=[];n=u(c);y(n);f="M"+n.x+" "+n.y;k.push(n);l=[];b.setAttribute("d",f);d.appendChild(b);mxEvent.consume(c)}},function(a){if(b){y(u(a));var c=x(0);if(c){f+=" L"+c.x+" "+c.y;k.push(c);var d="";l=[];for(var g=2;g<e.length;g+=2)c=x(g),d+=" L"+c.x+" "+c.y,l.push(c);b.setAttribute("d",f+d)}mxEvent.consume(a)}},q);var u=function(b){return mxUtils.convertPoint(a.container,
+mxEvent.getClientX(b),mxEvent.getClientY(b))},y=function(a){for(e.push(a);e.length>c;)e.shift()},x=function(a){var b=e.length;if(1===b%2||b>=c){var d=0,f=0,g,k=0;for(g=a;g<b;g++)k++,a=e[g],d+=a.x,f+=a.y;return{x:d/k,y:f/k}}return null}}}mxFreehand.prototype.NO_SMOOTHING=1;mxFreehand.prototype.MILD_SMOOTHING=4;mxFreehand.prototype.NORMAL_SMOOTHING=8;mxFreehand.prototype.VERY_SMOOTH_SMOOTHING=12;mxFreehand.prototype.SUPER_SMOOTH_SMOOTHING=16;mxFreehand.prototype.HYPER_SMOOTH_SMOOTHING=20;
diff --git a/src/main/webapp/js/diagramly/Dialogs.js b/src/main/webapp/js/diagramly/Dialogs.js
index 83f73056..33916e6a 100644
--- a/src/main/webapp/js/diagramly/Dialogs.js
+++ b/src/main/webapp/js/diagramly/Dialogs.js
@@ -2754,14 +2754,17 @@ var NewDialog = function(editorUi, compact, showName, callback, createOnly, canc
};
// Adds filetype dropdown
- var typeSelect = FilenameDialog.createFileTypes(editorUi, nameInput, editorUi.editor.diagramFileTypes);
- typeSelect.style.marginLeft = '6px';
- typeSelect.style.width = (compact) ? '80px' : '140px';
-
if (showName)
{
header.appendChild(nameInput);
- header.appendChild(typeSelect);
+
+ if (editorUi.editor.diagramFileTypes != null)
+ {
+ var typeSelect = FilenameDialog.createFileTypes(editorUi, nameInput, editorUi.editor.diagramFileTypes);
+ typeSelect.style.marginLeft = '6px';
+ typeSelect.style.width = (compact) ? '80px' : '140px';
+ header.appendChild(typeSelect);
+ }
if (editorUi.editor.fileExtensions != null)
{
@@ -3629,6 +3632,14 @@ var CreateDialog = function(editorUi, title, createFn, cancelFn, dlgTitle, btnLa
if (hints != null)
{
+ if (editorUi.editor.diagramFileTypes != null)
+ {
+ var typeSelect = FilenameDialog.createFileTypes(editorUi, nameInput, editorUi.editor.diagramFileTypes);
+ typeSelect.style.marginLeft = '6px';
+ typeSelect.style.width = '80px';
+ div.appendChild(typeSelect);
+ }
+
div.appendChild(FilenameDialog.createTypeHint(editorUi, nameInput, hints));
}
@@ -6116,7 +6127,7 @@ var DraftDialog = function(editorUi, title, xml, editFn, discardFn, editLabel, d
if (bg == null || bg == '' || bg == mxConstants.NONE)
{
- bg = '#ffffff';
+ bg = (uiTheme == 'dark') ? 'transparent' : '#ffffff';
}
container.style.backgroundColor = bg;
diff --git a/src/main/webapp/js/diagramly/EditorUi.js b/src/main/webapp/js/diagramly/EditorUi.js
index 24b48292..cd60546f 100644
--- a/src/main/webapp/js/diagramly/EditorUi.js
+++ b/src/main/webapp/js/diagramly/EditorUi.js
@@ -89,7 +89,7 @@
* Link for scratchpad help.
*/
EditorUi.scratchpadHelpLink = 'https://desk.draw.io/support/solutions/articles/16000042367';
-
+
/**
* Default Mermaid config without using foreign objects in flowcharts.
*/
@@ -404,6 +404,12 @@
* Defines the maximum size for images.
*/
EditorUi.prototype.maxImageSize = 520;
+
+ /**
+ * Defines the maximum width for pasted text.
+ * Use 0 to disable check.
+ */
+ EditorUi.prototype.maxTextWidth = 520;
/**
* Images above 100K should be resampled.
@@ -8084,7 +8090,7 @@
// Fires cellsInserted to apply the current style to the inserted text.
// This requires the value to be empty when the event is fired.
cell = graph.insertVertex(graph.getDefaultParent(), null, '',
- graph.snap(dx), graph.snap(dy), 1, 1, 'text;' + ((html) ? 'html=1;' : ''));
+ graph.snap(dx), graph.snap(dy), 1, 1, 'text;whiteSpace=wrap;' + ((html) ? 'html=1;' : ''));
graph.fireEvent(new mxEventObject('textInserted', 'cells', [cell]));
// Single tag is converted
@@ -8105,6 +8111,14 @@
cell.value = text;
graph.updateCellSize(cell);
+ // Adds wrapping for large text blocks
+ if (this.maxTextWidth > 0 && cell.geometry.width > this.maxTextWidth)
+ {
+ var size = graph.getPreferredSizeForCell(cell, this.maxTextWidth);
+ cell.geometry.width = size.width;
+ cell.geometry.height = size.height;
+ }
+
// See http://stackoverflow.com/questions/6927719/url-regex-does-not-work-in-javascript
var regexp = /\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;
@@ -10332,14 +10346,14 @@
if (evt.clipboardData != null)
{
- this.pasteCells(evt, textInput, true);
+ this.pasteCells(evt, textInput, true, true);
}
if (!mxEvent.isConsumed(evt))
{
window.setTimeout(mxUtils.bind(this, function()
{
- this.pasteCells(evt, textInput, false);
+ this.pasteCells(evt, textInput, false, true);
}), 0);
}
}
@@ -10585,15 +10599,16 @@
elt.innerHTML = '';
}
};
-
+
/**
* Creates the format panel and adds overrides.
*/
- EditorUi.prototype.pasteCells = function(evt, realElt, useEvent)
+ EditorUi.prototype.pasteCells = function(evt, realElt, useEvent, pasteAsLabel)
{
if (!mxEvent.isConsumed(evt))
{
var elt = realElt;
+ var asHtml = false;
if (useEvent && evt.clipboardData != null && evt.clipboardData.getData)
{
@@ -10603,6 +10618,7 @@
{
elt = document.createElement('div');
elt.innerHTML = data;
+ asHtml = true;
// Workaround for innerText not ignoring style elements in Chrome
var styles = elt.getElementsByTagName('style');
@@ -10614,6 +10630,8 @@
styles[0].parentNode.removeChild(styles[0]);
}
}
+
+ Graph.removePasteFormatting(elt);
}
else
{
@@ -10663,7 +10681,8 @@
}
else
{
- var xml = mxUtils.trim((elt.innerText == null) ?
+ var xml = (asHtml) ? elt.outerHTML :
+ mxUtils.trim((elt.innerText == null) ?
mxUtils.getTextContent(elt) : elt.innerText);
var compat = false;
@@ -10723,6 +10742,10 @@
{
graph.setSelectionCells(this.importXml(xml, dx, dx));
}
+ else if (pasteAsLabel && graph.getSelectionCount() == 1)
+ {
+ graph.labelChanged(graph.getSelectionCell(), xml);
+ }
else
{
var pt = graph.getInsertPoint();
diff --git a/src/main/webapp/js/mxgraph/Editor.js b/src/main/webapp/js/mxgraph/Editor.js
index b0c1a8f8..a7cccafd 100644
--- a/src/main/webapp/js/mxgraph/Editor.js
+++ b/src/main/webapp/js/mxgraph/Editor.js
@@ -2243,7 +2243,7 @@ FilenameDialog.createFileTypes = function(editorUi, nameInput, types)
}
});
- mxEvent.addListener(nameInput, 'change', function(evt)
+ var nameInputChanged = function(evt)
{
var idx = nameInput.value.lastIndexOf('.');
var active = 0;
@@ -2264,7 +2264,10 @@ FilenameDialog.createFileTypes = function(editorUi, nameInput, types)
}
typeSelect.value = active;
- });
+ };
+
+ mxEvent.addListener(nameInput, 'change', nameInputChanged);
+ nameInputChanged();
return typeSelect;
};
diff --git a/src/main/webapp/js/mxgraph/Graph.js b/src/main/webapp/js/mxgraph/Graph.js
index f50747c6..48070264 100644
--- a/src/main/webapp/js/mxgraph/Graph.js
+++ b/src/main/webapp/js/mxgraph/Graph.js
@@ -1145,6 +1145,27 @@ Graph.decompress = function(data, inflate, checked)
return (checked) ? inflated : Graph.zapGremlins(inflated);
}
};
+
+/**
+ * Removes formatting from pasted HTML.
+ */
+Graph.removePasteFormatting = function(elt)
+{
+ while (elt != null)
+ {
+ if (elt.firstChild != null)
+ {
+ Graph.removePasteFormatting(elt.firstChild);
+ }
+
+ if (elt.nodeType == mxConstants.NODETYPE_ELEMENT && elt.style != null)
+ {
+ elt.style.whiteSpace = '';
+ }
+
+ elt = elt.nextSibling;
+ }
+};
/**
* Graph inherits from mxGraph.
@@ -1469,8 +1490,7 @@ Graph.prototype.init = function(container)
*/
Graph.prototype.isPart = function(cell)
{
- return (!this.model.isVertex(cell)) ? false :
- mxUtils.getValue(this.getCurrentCellStyle(cell), 'part', '0') == '1';
+ return mxUtils.getValue(this.getCurrentCellStyle(cell), 'part', '0') == '1';
};
/**
@@ -1480,7 +1500,14 @@ Graph.prototype.init = function(container)
{
while (this.isPart(cell))
{
- cell = this.model.getParent(cell);
+ var temp = this.model.getParent(cell);
+
+ if (!this.model.isVertex(temp))
+ {
+ break;
+ }
+
+ cell = temp;
}
return cell;
@@ -8357,12 +8384,18 @@ if (typeof mxVertexHandler != 'undefined')
window.setTimeout(mxUtils.bind(this, function()
{
- // Paste from Word or Excel
- if (this.textarea != null &&
- (this.textarea.innerHTML.indexOf('<o:OfficeDocumentSettings>') >= 0 ||
- this.textarea.innerHTML.indexOf('<!--[if !mso]>') >= 0))
+ if (this.textarea != null)
{
- checkNode(this.textarea, clone);
+ // Paste from Word or Excel
+ if (this.textarea.innerHTML.indexOf('<o:OfficeDocumentSettings>') >= 0 ||
+ this.textarea.innerHTML.indexOf('<!--[if !mso]>') >= 0)
+ {
+ checkNode(this.textarea, clone);
+ }
+ else
+ {
+ Graph.removePasteFormatting(this.textarea);
+ }
}
}), 0);
}));
diff --git a/src/main/webapp/js/viewer.min.js b/src/main/webapp/js/viewer.min.js
index 1a5caaaf..f023c58f 100644
--- a/src/main/webapp/js/viewer.min.js
+++ b/src/main/webapp/js/viewer.min.js
@@ -1280,9 +1280,9 @@ mxGraph.prototype.getAllEdges=function(a){var b=[];if(null!=a)for(var c=0;c<a.le
mxGraph.prototype.cellSizeUpdated=function(a,b){if(null!=a){this.model.beginUpdate();try{var c=this.getPreferredSizeForCell(a),d=this.model.getGeometry(a);if(null!=c&&null!=d){var e=this.isCellCollapsed(a),d=d.clone();if(this.isSwimlane(a)){var f=this.getCellStyle(a),g=this.model.getStyle(a);null==g&&(g="");mxUtils.getValue(f,mxConstants.STYLE_HORIZONTAL,!0)?(g=mxUtils.setStyle(g,mxConstants.STYLE_STARTSIZE,c.height+8),e&&(d.height=c.height+8),d.width=c.width):(g=mxUtils.setStyle(g,mxConstants.STYLE_STARTSIZE,
c.width+8),e&&(d.width=c.width+8),d.height=c.height);this.model.setStyle(a,g)}else{var k=this.view.createState(a),l=k.style[mxConstants.STYLE_ALIGN]||mxConstants.ALIGN_CENTER;l==mxConstants.ALIGN_RIGHT?d.x+=d.width-c.width:l==mxConstants.ALIGN_CENTER&&(d.x+=Math.round((d.width-c.width)/2));var m=this.getVerticalAlign(k);m==mxConstants.ALIGN_BOTTOM?d.y+=d.height-c.height:m==mxConstants.ALIGN_MIDDLE&&(d.y+=Math.round((d.height-c.height)/2));d.width=c.width;d.height=c.height}if(!b&&!e){var n=this.view.getBounds(this.model.getChildren(a));
if(null!=n){var p=this.view.translate,q=this.view.scale,r=(n.y+n.height)/q-d.y-p.y;d.width=Math.max(d.width,(n.x+n.width)/q-d.x-p.x);d.height=Math.max(d.height,r)}}this.cellsResized([a],[d],!1)}}finally{this.model.endUpdate()}}};
-mxGraph.prototype.getPreferredSizeForCell=function(a){var b=null;if(null!=a){var c=this.view.createState(a),d=c.style;if(!this.model.isEdge(a)){var e=d[mxConstants.STYLE_FONTSIZE]||mxConstants.DEFAULT_FONTSIZE;a=b=0;null==this.getImage(c)&&null==d[mxConstants.STYLE_IMAGE]||d[mxConstants.STYLE_SHAPE]!=mxConstants.SHAPE_LABEL||(d[mxConstants.STYLE_VERTICAL_ALIGN]==mxConstants.ALIGN_MIDDLE&&(b+=parseFloat(d[mxConstants.STYLE_IMAGE_WIDTH])||mxLabel.prototype.imageSize),d[mxConstants.STYLE_ALIGN]!=mxConstants.ALIGN_CENTER&&
-(a+=parseFloat(d[mxConstants.STYLE_IMAGE_HEIGHT])||mxLabel.prototype.imageSize));b+=2*(d[mxConstants.STYLE_SPACING]||0);b+=d[mxConstants.STYLE_SPACING_LEFT]||0;b+=d[mxConstants.STYLE_SPACING_RIGHT]||0;a+=2*(d[mxConstants.STYLE_SPACING]||0);a+=d[mxConstants.STYLE_SPACING_TOP]||0;a+=d[mxConstants.STYLE_SPACING_BOTTOM]||0;var f=this.getFoldingImage(c);null!=f&&(b+=f.width+8);f=this.cellRenderer.getLabelValue(c);null!=f&&0<f.length?(this.isHtmlLabel(c.cell)||(f=mxUtils.htmlEntities(f,!1)),f=f.replace(/\n/g,
-"<br>"),e=mxUtils.getSizeForString(f,e,d[mxConstants.STYLE_FONTFAMILY],null,d[mxConstants.STYLE_FONTSTYLE]),c=e.width+b,a=e.height+a,mxUtils.getValue(d,mxConstants.STYLE_HORIZONTAL,!0)||(d=a,a=c,c=d),this.gridEnabled&&(c=this.snap(c+this.gridSize/2),a=this.snap(a+this.gridSize/2)),b=new mxRectangle(0,0,c,a)):(d=4*this.gridSize,b=new mxRectangle(0,0,d,d))}}return b};mxGraph.prototype.resizeCell=function(a,b,c){return this.resizeCells([a],[b],c)[0]};
+mxGraph.prototype.getPreferredSizeForCell=function(a,b){var c=null;if(null!=a){var d=this.view.createState(a),e=d.style;if(!this.model.isEdge(a)){var f=e[mxConstants.STYLE_FONTSIZE]||mxConstants.DEFAULT_FONTSIZE,g=0,c=0;null==this.getImage(d)&&null==e[mxConstants.STYLE_IMAGE]||e[mxConstants.STYLE_SHAPE]!=mxConstants.SHAPE_LABEL||(e[mxConstants.STYLE_VERTICAL_ALIGN]==mxConstants.ALIGN_MIDDLE&&(g+=parseFloat(e[mxConstants.STYLE_IMAGE_WIDTH])||mxLabel.prototype.imageSize),e[mxConstants.STYLE_ALIGN]!=
+mxConstants.ALIGN_CENTER&&(c+=parseFloat(e[mxConstants.STYLE_IMAGE_HEIGHT])||mxLabel.prototype.imageSize));var g=g+2*(e[mxConstants.STYLE_SPACING]||0),g=g+(e[mxConstants.STYLE_SPACING_LEFT]||0),g=g+(e[mxConstants.STYLE_SPACING_RIGHT]||0),c=c+2*(e[mxConstants.STYLE_SPACING]||0),c=c+(e[mxConstants.STYLE_SPACING_TOP]||0),c=c+(e[mxConstants.STYLE_SPACING_BOTTOM]||0),k=this.getFoldingImage(d);null!=k&&(g+=k.width+8);k=this.cellRenderer.getLabelValue(d);null!=k&&0<k.length?(this.isHtmlLabel(d.cell)||(k=
+mxUtils.htmlEntities(k,!1)),k=k.replace(/\n/g,"<br>"),f=mxUtils.getSizeForString(k,f,e[mxConstants.STYLE_FONTFAMILY],b,e[mxConstants.STYLE_FONTSTYLE]),d=f.width+g,c=f.height+c,mxUtils.getValue(e,mxConstants.STYLE_HORIZONTAL,!0)||(e=c,c=d,d=e),this.gridEnabled&&(d=this.snap(d+this.gridSize/2),c=this.snap(c+this.gridSize/2)),c=new mxRectangle(0,0,d,c)):(e=4*this.gridSize,c=new mxRectangle(0,0,e,e))}}return c};mxGraph.prototype.resizeCell=function(a,b,c){return this.resizeCells([a],[b],c)[0]};
mxGraph.prototype.resizeCells=function(a,b,c){c=null!=c?c:this.isRecursiveResize();this.model.beginUpdate();try{var d=this.cellsResized(a,b,c);this.fireEvent(new mxEventObject(mxEvent.RESIZE_CELLS,"cells",a,"bounds",b,"previous",d))}finally{this.model.endUpdate()}return a};
mxGraph.prototype.cellsResized=function(a,b,c){c=null!=c?c:!1;var d=[];if(null!=a&&null!=b&&a.length==b.length){this.model.beginUpdate();try{for(var e=0;e<a.length;e++)d.push(this.cellResized(a[e],b[e],!1,c)),this.isExtendParent(a[e])&&this.extendParent(a[e]),this.constrainChild(a[e]);this.resetEdgesOnResize&&this.resetEdges(a);this.fireEvent(new mxEventObject(mxEvent.CELLS_RESIZED,"cells",a,"bounds",b,"previous",d))}finally{this.model.endUpdate()}}return d};
mxGraph.prototype.cellResized=function(a,b,c,d){var e=this.model.getGeometry(a);if(null!=e&&(e.x!=b.x||e.y!=b.y||e.width!=b.width||e.height!=b.height)){var f=e.clone();!c&&f.relative?(c=f.offset,null!=c&&(c.x+=b.x-f.x,c.y+=b.y-f.y)):(f.x=b.x,f.y=b.y);f.width=b.width;f.height=b.height;f.relative||!this.model.isVertex(a)||this.isAllowNegativeCoordinates()||(f.x=Math.max(0,f.x),f.y=Math.max(0,f.y));this.model.beginUpdate();try{d&&this.resizeChildCells(a,f),this.model.setGeometry(a,f),this.constrainChildCells(a)}finally{this.model.endUpdate()}}return e};
@@ -2046,11 +2046,11 @@ Editor.prototype.setFilename=function(a){this.filename=a};
Editor.prototype.createUndoManager=function(){var a=this.graph,b=new mxUndoManager;this.undoListener=function(a,e){b.undoableEditHappened(e.getProperty("edit"))};var e=mxUtils.bind(this,function(a,b){this.undoListener.apply(this,arguments)});a.getModel().addListener(mxEvent.UNDO,e);a.getView().addListener(mxEvent.UNDO,e);e=function(c,b){var e=a.getSelectionCellsForChanges(b.getProperty("edit").changes,function(a){return!(a instanceof mxChildChange)});if(0<e.length){a.getModel();for(var m=[],u=0;u<
e.length;u++)null!=a.view.getState(e[u])&&m.push(e[u]);a.setSelectionCells(m)}};b.addListener(mxEvent.UNDO,e);b.addListener(mxEvent.REDO,e);return b};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(a){this.consumer=this.producer=null;this.done=a;this.args=null};OpenFile.prototype.setConsumer=function(a){this.consumer=a;this.execute()};
OpenFile.prototype.setData=function(){this.args=arguments;this.execute()};OpenFile.prototype.error=function(a){this.cancel(!0);mxUtils.alert(a)};OpenFile.prototype.execute=function(){null!=this.consumer&&null!=this.args&&(this.cancel(!1),this.consumer.apply(this,this.args))};OpenFile.prototype.cancel=function(a){null!=this.done&&this.done(null!=a?a:!0)};
-function Dialog(a,b,e,c,m,k,q,u,y,B,d){var f=0;mxClient.IS_VML&&(null==document.documentMode||8>document.documentMode)&&(f=80);e+=f;c+=f;var g=e,p=c,l=mxUtils.getDocumentSize();null!=window.innerHeight&&(l.height=window.innerHeight);var n=l.height,A=Math.max(1,Math.round((l.width-e-64)/2)),x=Math.max(1,Math.round((n-c-a.footerHeight)/3));mxClient.IS_QUIRKS||(b.style.maxHeight="100%");e=null!=document.body?Math.min(e,document.body.scrollWidth-64):e;c=Math.min(c,n-64);0<a.dialogs.length&&(this.zIndex+=
-2*a.dialogs.length);null==this.bg&&(this.bg=a.createDiv("background"),this.bg.style.position="absolute",this.bg.style.background=Dialog.backdropColor,this.bg.style.height=n+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity),mxClient.IS_QUIRKS&&new mxDivResizer(this.bg));l=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=l.x+"px";this.bg.style.top=l.y+"px";A+=l.x;x+=l.y;m&&document.body.appendChild(this.bg);var t=a.createDiv(y?"geTransDialog":
-"geDialog");m=this.getPosition(A,x,e,c);A=m.x;x=m.y;t.style.width=e+"px";t.style.height=c+"px";t.style.left=A+"px";t.style.top=x+"px";t.style.zIndex=this.zIndex;t.appendChild(b);document.body.appendChild(t);!u&&b.clientHeight>t.clientHeight-64&&(b.style.overflowY="auto");if(k&&(k=document.createElement("img"),k.setAttribute("src",Dialog.prototype.closeImage),k.setAttribute("title",mxResources.get("close")),k.className="geDialogClose",k.style.top=x+14+"px",k.style.left=A+e+38-f+"px",k.style.zIndex=
-this.zIndex,mxEvent.addListener(k,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(k),this.dialogImg=k,!d)){var F=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(a){F=!0}),null,mxUtils.bind(this,function(d){F&&(a.hideDialog(!0),F=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=B){var d=B();null!=d&&(g=e=d.w,p=c=d.h)}d=mxUtils.getDocumentSize();n=d.height;this.bg.style.height=n+"px";A=Math.max(1,Math.round((d.width-e-64)/2));x=Math.max(1,
-Math.round((n-c-a.footerHeight)/3));e=null!=document.body?Math.min(g,document.body.scrollWidth-64):g;c=Math.min(p,n-64);d=this.getPosition(A,x,e,c);A=d.x;x=d.y;t.style.left=A+"px";t.style.top=x+"px";t.style.width=e+"px";t.style.height=c+"px";!u&&b.clientHeight>t.clientHeight-64&&(b.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=x+14+"px",this.dialogImg.style.left=A+e+38-f+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=q;this.container=
+function Dialog(a,b,e,c,m,k,q,u,y,B,d){var f=0;mxClient.IS_VML&&(null==document.documentMode||8>document.documentMode)&&(f=80);e+=f;c+=f;var g=e,p=c,l=mxUtils.getDocumentSize();null!=window.innerHeight&&(l.height=window.innerHeight);var n=l.height,x=Math.max(1,Math.round((l.width-e-64)/2)),A=Math.max(1,Math.round((n-c-a.footerHeight)/3));mxClient.IS_QUIRKS||(b.style.maxHeight="100%");e=null!=document.body?Math.min(e,document.body.scrollWidth-64):e;c=Math.min(c,n-64);0<a.dialogs.length&&(this.zIndex+=
+2*a.dialogs.length);null==this.bg&&(this.bg=a.createDiv("background"),this.bg.style.position="absolute",this.bg.style.background=Dialog.backdropColor,this.bg.style.height=n+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity),mxClient.IS_QUIRKS&&new mxDivResizer(this.bg));l=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=l.x+"px";this.bg.style.top=l.y+"px";x+=l.x;A+=l.y;m&&document.body.appendChild(this.bg);var t=a.createDiv(y?"geTransDialog":
+"geDialog");m=this.getPosition(x,A,e,c);x=m.x;A=m.y;t.style.width=e+"px";t.style.height=c+"px";t.style.left=x+"px";t.style.top=A+"px";t.style.zIndex=this.zIndex;t.appendChild(b);document.body.appendChild(t);!u&&b.clientHeight>t.clientHeight-64&&(b.style.overflowY="auto");if(k&&(k=document.createElement("img"),k.setAttribute("src",Dialog.prototype.closeImage),k.setAttribute("title",mxResources.get("close")),k.className="geDialogClose",k.style.top=A+14+"px",k.style.left=x+e+38-f+"px",k.style.zIndex=
+this.zIndex,mxEvent.addListener(k,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(k),this.dialogImg=k,!d)){var G=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(a){G=!0}),null,mxUtils.bind(this,function(d){G&&(a.hideDialog(!0),G=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=B){var d=B();null!=d&&(g=e=d.w,p=c=d.h)}d=mxUtils.getDocumentSize();n=d.height;this.bg.style.height=n+"px";x=Math.max(1,Math.round((d.width-e-64)/2));A=Math.max(1,
+Math.round((n-c-a.footerHeight)/3));e=null!=document.body?Math.min(g,document.body.scrollWidth-64):g;c=Math.min(p,n-64);d=this.getPosition(x,A,e,c);x=d.x;A=d.y;t.style.left=x+"px";t.style.top=A+"px";t.style.width=e+"px";t.style.height=c+"px";!u&&b.clientHeight>t.clientHeight-64&&(b.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=A+14+"px",this.dialogImg.style.left=x+e+38-f+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=q;this.container=
t;a.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-1;
Dialog.prototype.noColorImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkEzRDlBMUUwODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkEzRDlBMUUxODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QTNEOUExREU4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QTNEOUExREY4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5xh3fmAAAABlBMVEX////MzMw46qqDAAAAGElEQVR42mJggAJGKGAYIIGBth8KAAIMAEUQAIElnLuQAAAAAElFTkSuQmCC":IMAGE_PATH+
"/nocolor.png";Dialog.prototype.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJAQMAAADaX5RTAAAABlBMVEV7mr3///+wksspAAAAAnRSTlP/AOW3MEoAAAAdSURBVAgdY9jXwCDDwNDRwHCwgeExmASygSL7GgB12QiqNHZZIwAAAABJRU5ErkJggg==":IMAGE_PATH+"/close.png";
@@ -2083,24 +2083,24 @@ PageSetupDialog.addPageFormatPanel=function(a,b,e,c){function m(a,c,b){if(b||f!=
e.height==b.format.height?(u.value=b.key,k.setAttribute("checked","checked"),k.defaultChecked=!0,k.checked=!0,q.removeAttribute("checked"),q.defaultChecked=!1,q.checked=!1,a=!0):e.width==b.format.height&&e.height==b.format.width&&(u.value=b.key,k.removeAttribute("checked"),k.defaultChecked=!1,k.checked=!1,q.setAttribute("checked","checked"),q.defaultChecked=!0,a=q.checked=!0));a?(y.style.display="",d.style.display="none"):(f.value=e.width/100,g.value=e.height/100,k.setAttribute("checked","checked"),
u.value="custom",y.style.display="none",d.style.display="")}}b="format-"+b;var k=document.createElement("input");k.setAttribute("name",b);k.setAttribute("type","radio");k.setAttribute("value","portrait");var q=document.createElement("input");q.setAttribute("name",b);q.setAttribute("type","radio");q.setAttribute("value","landscape");var u=document.createElement("select");u.style.marginBottom="8px";u.style.width="202px";var y=document.createElement("div");y.style.marginLeft="4px";y.style.width="210px";
y.style.height="24px";k.style.marginRight="6px";y.appendChild(k);b=document.createElement("span");b.style.maxWidth="100px";mxUtils.write(b,mxResources.get("portrait"));y.appendChild(b);q.style.marginLeft="10px";q.style.marginRight="6px";y.appendChild(q);var B=document.createElement("span");B.style.width="100px";mxUtils.write(B,mxResources.get("landscape"));y.appendChild(B);var d=document.createElement("div");d.style.marginLeft="4px";d.style.width="210px";d.style.height="24px";var f=document.createElement("input");
-f.setAttribute("size","7");f.style.textAlign="right";d.appendChild(f);mxUtils.write(d," in x ");var g=document.createElement("input");g.setAttribute("size","7");g.style.textAlign="right";d.appendChild(g);mxUtils.write(d," in");y.style.display="none";d.style.display="none";for(var p={},l=PageSetupDialog.getFormats(),n=0;n<l.length;n++){var A=l[n];p[A.key]=A;var x=document.createElement("option");x.setAttribute("value",A.key);mxUtils.write(x,A.title);u.appendChild(x)}var t=!1;m();a.appendChild(u);mxUtils.br(a);
-a.appendChild(y);a.appendChild(d);var F=e,z=function(a,b){var l=p[u.value];null!=l.format?(f.value=l.format.width/100,g.value=l.format.height/100,d.style.display="none",y.style.display=""):(y.style.display="none",d.style.display="");l=parseFloat(f.value);if(isNaN(l)||0>=l)f.value=e.width/100;l=parseFloat(g.value);if(isNaN(l)||0>=l)g.value=e.height/100;l=new mxRectangle(0,0,Math.floor(100*parseFloat(f.value)),Math.floor(100*parseFloat(g.value)));"custom"!=u.value&&q.checked&&(l=new mxRectangle(0,0,
-l.height,l.width));b&&t||l.width==F.width&&l.height==F.height||(F=l,null!=c&&c(F))};mxEvent.addListener(b,"click",function(a){k.checked=!0;z(a);mxEvent.consume(a)});mxEvent.addListener(B,"click",function(a){q.checked=!0;z(a);mxEvent.consume(a)});mxEvent.addListener(f,"blur",z);mxEvent.addListener(f,"click",z);mxEvent.addListener(g,"blur",z);mxEvent.addListener(g,"click",z);mxEvent.addListener(q,"change",z);mxEvent.addListener(k,"change",z);mxEvent.addListener(u,"change",function(a){t="custom"==u.value;
-z(a,!0)});z();return{set:function(a){e=a;m(null,null,!0)},get:function(){return F},widthInput:f,heightInput:g}};
+f.setAttribute("size","7");f.style.textAlign="right";d.appendChild(f);mxUtils.write(d," in x ");var g=document.createElement("input");g.setAttribute("size","7");g.style.textAlign="right";d.appendChild(g);mxUtils.write(d," in");y.style.display="none";d.style.display="none";for(var p={},l=PageSetupDialog.getFormats(),n=0;n<l.length;n++){var x=l[n];p[x.key]=x;var A=document.createElement("option");A.setAttribute("value",x.key);mxUtils.write(A,x.title);u.appendChild(A)}var t=!1;m();a.appendChild(u);mxUtils.br(a);
+a.appendChild(y);a.appendChild(d);var G=e,z=function(a,b){var l=p[u.value];null!=l.format?(f.value=l.format.width/100,g.value=l.format.height/100,d.style.display="none",y.style.display=""):(y.style.display="none",d.style.display="");l=parseFloat(f.value);if(isNaN(l)||0>=l)f.value=e.width/100;l=parseFloat(g.value);if(isNaN(l)||0>=l)g.value=e.height/100;l=new mxRectangle(0,0,Math.floor(100*parseFloat(f.value)),Math.floor(100*parseFloat(g.value)));"custom"!=u.value&&q.checked&&(l=new mxRectangle(0,0,
+l.height,l.width));b&&t||l.width==G.width&&l.height==G.height||(G=l,null!=c&&c(G))};mxEvent.addListener(b,"click",function(a){k.checked=!0;z(a);mxEvent.consume(a)});mxEvent.addListener(B,"click",function(a){q.checked=!0;z(a);mxEvent.consume(a)});mxEvent.addListener(f,"blur",z);mxEvent.addListener(f,"click",z);mxEvent.addListener(g,"blur",z);mxEvent.addListener(g,"click",z);mxEvent.addListener(q,"change",z);mxEvent.addListener(k,"change",z);mxEvent.addListener(u,"change",function(a){t="custom"==u.value;
+z(a,!0)});z();return{set:function(a){e=a;m(null,null,!0)},get:function(){return G},widthInput:f,heightInput:g}};
PageSetupDialog.getFormats=function(){return[{key:"letter",title:'US-Letter (8,5" x 11")',format:mxConstants.PAGE_FORMAT_LETTER_PORTRAIT},{key:"legal",title:'US-Legal (8,5" x 14")',format:new mxRectangle(0,0,850,1400)},{key:"tabloid",title:'US-Tabloid (11" x 17")',format:new mxRectangle(0,0,1100,1700)},{key:"executive",title:'US-Executive (7" x 10")',format:new mxRectangle(0,0,700,1E3)},{key:"a0",title:"A0 (841 mm x 1189 mm)",format:new mxRectangle(0,0,3300,4681)},{key:"a1",title:"A1 (594 mm x 841 mm)",
format:new mxRectangle(0,0,2339,3300)},{key:"a2",title:"A2 (420 mm x 594 mm)",format:new mxRectangle(0,0,1654,2336)},{key:"a3",title:"A3 (297 mm x 420 mm)",format:new mxRectangle(0,0,1169,1654)},{key:"a4",title:"A4 (210 mm x 297 mm)",format:mxConstants.PAGE_FORMAT_A4_PORTRAIT},{key:"a5",title:"A5 (148 mm x 210 mm)",format:new mxRectangle(0,0,583,827)},{key:"a6",title:"A6 (105 mm x 148 mm)",format:new mxRectangle(0,0,413,583)},{key:"a7",title:"A7 (74 mm x 105 mm)",format:new mxRectangle(0,0,291,413)},
{key:"b4",title:"B4 (250 mm x 353 mm)",format:new mxRectangle(0,0,980,1390)},{key:"b5",title:"B5 (176 mm x 250 mm)",format:new mxRectangle(0,0,690,980)},{key:"16-9",title:"16:9 (1600 x 900)",format:new mxRectangle(0,0,1600,900)},{key:"16-10",title:"16:10 (1920 x 1200)",format:new mxRectangle(0,0,1920,1200)},{key:"4-3",title:"4:3 (1600 x 1200)",format:new mxRectangle(0,0,1600,1200)},{key:"custom",title:mxResources.get("custom"),format:null}]};
-var FilenameDialog=function(a,b,e,c,m,k,q,u,y,B,d,f){y=null!=y?y:!0;var g,p,l=document.createElement("table"),n=document.createElement("tbody");l.style.marginTop="8px";g=document.createElement("tr");p=document.createElement("td");p.style.whiteSpace="nowrap";p.style.fontSize="10pt";p.style.width=d?"80px":"120px";mxUtils.write(p,(m||mxResources.get("filename"))+":");g.appendChild(p);var A=document.createElement("input");A.setAttribute("value",b||"");A.style.marginLeft="4px";A.style.width=null!=f?f+
-"px":"180px";var x=mxUtils.button(e,function(){if(null==k||k(A.value))y&&a.hideDialog(),c(A.value)});x.className="geBtn gePrimaryBtn";this.init=function(){if(null!=m||null==q)if(A.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?A.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var a=l.parentNode;if(null!=a){var d=null;mxEvent.addListener(a,"dragleave",function(a){null!=d&&(d.style.backgroundColor="",d=null);a.stopPropagation();a.preventDefault()});
-mxEvent.addListener(a,"dragover",mxUtils.bind(this,function(a){null==d&&(!mxClient.IS_IE||10<document.documentMode)&&(d=A,d.style.backgroundColor="#ebf2f9");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(a,"drop",mxUtils.bind(this,function(a){null!=d&&(d.style.backgroundColor="",d=null);0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")&&(A.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),x.click());a.stopPropagation();a.preventDefault()}))}}};p=document.createElement("td");
-p.style.whiteSpace="nowrap";p.appendChild(A);g.appendChild(p);if(null!=m||null==q)n.appendChild(g),null!=d&&(null!=a.editor.diagramFileTypes&&(g=FilenameDialog.createFileTypes(a,A,a.editor.diagramFileTypes),g.style.marginLeft="6px",g.style.width="74px",p.appendChild(g),A.style.width=null!=f?f-40+"px":"140px"),p.appendChild(FilenameDialog.createTypeHint(a,A,d)));null!=q&&(g=document.createElement("tr"),p=document.createElement("td"),p.colSpan=2,p.appendChild(q),g.appendChild(p),n.appendChild(g));g=
-document.createElement("tr");p=document.createElement("td");p.colSpan=2;p.style.paddingTop="20px";p.style.whiteSpace="nowrap";p.setAttribute("align","right");d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=B&&B()});d.className="geBtn";a.editor.cancelFirst&&p.appendChild(d);null!=u&&(f=mxUtils.button(mxResources.get("help"),function(){a.editor.graph.openLink(u)}),f.className="geBtn",p.appendChild(f));mxEvent.addListener(A,"keypress",function(a){13==a.keyCode&&x.click()});
-p.appendChild(x);a.editor.cancelFirst||p.appendChild(d);g.appendChild(p);n.appendChild(g);l.appendChild(n);this.container=l};FilenameDialog.filenameHelpLink=null;
+var FilenameDialog=function(a,b,e,c,m,k,q,u,y,B,d,f){y=null!=y?y:!0;var g,p,l=document.createElement("table"),n=document.createElement("tbody");l.style.marginTop="8px";g=document.createElement("tr");p=document.createElement("td");p.style.whiteSpace="nowrap";p.style.fontSize="10pt";p.style.width=d?"80px":"120px";mxUtils.write(p,(m||mxResources.get("filename"))+":");g.appendChild(p);var x=document.createElement("input");x.setAttribute("value",b||"");x.style.marginLeft="4px";x.style.width=null!=f?f+
+"px":"180px";var A=mxUtils.button(e,function(){if(null==k||k(x.value))y&&a.hideDialog(),c(x.value)});A.className="geBtn gePrimaryBtn";this.init=function(){if(null!=m||null==q)if(x.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?x.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var a=l.parentNode;if(null!=a){var d=null;mxEvent.addListener(a,"dragleave",function(a){null!=d&&(d.style.backgroundColor="",d=null);a.stopPropagation();a.preventDefault()});
+mxEvent.addListener(a,"dragover",mxUtils.bind(this,function(a){null==d&&(!mxClient.IS_IE||10<document.documentMode)&&(d=x,d.style.backgroundColor="#ebf2f9");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(a,"drop",mxUtils.bind(this,function(a){null!=d&&(d.style.backgroundColor="",d=null);0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")&&(x.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),A.click());a.stopPropagation();a.preventDefault()}))}}};p=document.createElement("td");
+p.style.whiteSpace="nowrap";p.appendChild(x);g.appendChild(p);if(null!=m||null==q)n.appendChild(g),null!=d&&(null!=a.editor.diagramFileTypes&&(g=FilenameDialog.createFileTypes(a,x,a.editor.diagramFileTypes),g.style.marginLeft="6px",g.style.width="74px",p.appendChild(g),x.style.width=null!=f?f-40+"px":"140px"),p.appendChild(FilenameDialog.createTypeHint(a,x,d)));null!=q&&(g=document.createElement("tr"),p=document.createElement("td"),p.colSpan=2,p.appendChild(q),g.appendChild(p),n.appendChild(g));g=
+document.createElement("tr");p=document.createElement("td");p.colSpan=2;p.style.paddingTop="20px";p.style.whiteSpace="nowrap";p.setAttribute("align","right");d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=B&&B()});d.className="geBtn";a.editor.cancelFirst&&p.appendChild(d);null!=u&&(f=mxUtils.button(mxResources.get("help"),function(){a.editor.graph.openLink(u)}),f.className="geBtn",p.appendChild(f));mxEvent.addListener(x,"keypress",function(a){13==a.keyCode&&A.click()});
+p.appendChild(A);a.editor.cancelFirst||p.appendChild(d);g.appendChild(p);n.appendChild(g);l.appendChild(n);this.container=l};FilenameDialog.filenameHelpLink=null;
FilenameDialog.createTypeHint=function(a,b,e){var c=document.createElement("img");c.style.cssText="vertical-align:top;height:16px;width:16px;margin-left:4px;background-repeat:no-repeat;background-position:center bottom;cursor:pointer;";mxUtils.setOpacity(c,70);var m=function(){c.setAttribute("src",Editor.helpImage);c.setAttribute("title",mxResources.get("help"));for(var a=0;a<e.length;a++)if(0<e[a].ext.length&&b.value.toLowerCase().substring(b.value.length-e[a].ext.length-1)=="."+e[a].ext){c.setAttribute("src",
mxClient.imageBasePath+"/warning.png");c.setAttribute("title",mxResources.get(e[a].title));break}};mxEvent.addListener(b,"keyup",m);mxEvent.addListener(b,"change",m);mxEvent.addListener(c,"click",function(b){var e=c.getAttribute("title");c.getAttribute("src")==Editor.helpImage?a.editor.graph.openLink(FilenameDialog.filenameHelpLink):""!=e&&a.showError(null,e,mxResources.get("help"),function(){a.editor.graph.openLink(FilenameDialog.filenameHelpLink)},null,mxResources.get("ok"),null,null,null,340,90);
mxEvent.consume(b)});m();return c};
FilenameDialog.createFileTypes=function(a,b,e){var c=document.createElement("select");for(a=0;a<e.length;a++){var m=document.createElement("option");m.setAttribute("value",a);mxUtils.write(m,mxResources.get(e[a].description)+" (."+e[a].extension+")");c.appendChild(m)}mxEvent.addListener(c,"change",function(a){a=e[c.value].extension;var k=b.value.lastIndexOf(".");0<k?(a=e[c.value].extension,b.value=b.value.substring(0,k+1)+a):b.value=b.value+"."+a;"createEvent"in document?(a=document.createEvent("HTMLEvents"),
-a.initEvent("change",!1,!0),b.dispatchEvent(a)):b.fireEvent("onchange")});mxEvent.addListener(b,"change",function(a){var k=b.value.lastIndexOf(".");a=0;if(0<k)for(var k=b.value.toLowerCase().substring(k+1),m=0;m<e.length;m++)if(k==e[m].extension){a=m;break}c.value=a});return c};
+a.initEvent("change",!1,!0),b.dispatchEvent(a)):b.fireEvent("onchange")});a=function(a){var k=b.value.lastIndexOf(".");a=0;if(0<k)for(var k=b.value.toLowerCase().substring(k+1),m=0;m<e.length;m++)if(k==e[m].extension){a=m;break}c.value=a};mxEvent.addListener(b,"change",a);a();return c};
(function(){mxGraphView.prototype.validateBackgroundPage=function(){var a=this.graph;if(null!=a.container&&!a.transparentBackground){if(a.pageVisible){var c=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var b=a.container.firstChild;null!=b&&b.nodeType!=mxConstants.NODETYPE_ELEMENT;)b=b.nextSibling;null!=b&&(this.backgroundPageShape=this.createBackgroundPageShape(c),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!mxClient.IS_QUIRKS,this.backgroundPageShape.dialect=
mxConstants.DIALECT_STRICTHTML,this.backgroundPageShape.init(a.container),b.style.position="absolute",a.container.insertBefore(this.backgroundPageShape.node,b),this.backgroundPageShape.redraw(),this.backgroundPageShape.node.className="geBackgroundPage",mxEvent.addListener(this.backgroundPageShape.node,"dblclick",mxUtils.bind(this,function(d){a.dblClick(d)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(d){a.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(d))}),
mxUtils.bind(this,function(d){null!=a.tooltipHandler&&a.tooltipHandler.isHideOnHover()&&a.tooltipHandler.hide();a.isMouseDown&&!mxEvent.isConsumed(d)&&a.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(d))}),mxUtils.bind(this,function(d){a.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(d))})))}else this.backgroundPageShape.scale=1,this.backgroundPageShape.bounds=c,this.backgroundPageShape.redraw()}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape=
@@ -2109,7 +2109,7 @@ d="url("+this.gridImage+")";var g=b=0;null!=a.view.backgroundPageShape&&(g=this.
c,a.container.className="geDiagramContainer geDiagramBackdrop",b.style.backgroundImage="none",b.style.backgroundColor=""):(a.container.className="geDiagramContainer",b.style.backgroundPosition=f,b.style.backgroundColor=c,b.style.backgroundImage=d)};mxGraphView.prototype.createSvgGrid=function(a){for(var c=this.graph.gridSize*this.scale;c<this.minGridSize;)c*=2;for(var b=this.gridSteps*c,d=[],f=1;f<this.gridSteps;f++){var g=f*c;d.push("M 0 "+g+" L "+b+" "+g+" M "+g+" 0 L "+g+" "+b)}return'<svg width="'+
b+'" height="'+b+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+b+'" height="'+b+'" patternUnits="userSpaceOnUse"><path d="'+d.join(" ")+'" fill="none" stroke="'+a+'" opacity="0.2" stroke-width="1"/><path d="M '+b+" 0 L 0 0 0 "+b+'" 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(c,b){a.apply(this,arguments);if(null!=this.shiftPreview1){var e=
this.view.canvas;null!=e.ownerSVGElement&&(e=e.ownerSVGElement);var d=this.gridSize*this.view.scale*this.view.gridSteps,d=-Math.round(d-mxUtils.mod(this.view.translate.x*this.view.scale+c,d))+"px "+-Math.round(d-mxUtils.mod(this.view.translate.y*this.view.scale+b,d))+"px";e.style.backgroundPosition=d}};mxGraph.prototype.updatePageBreaks=function(a,c,b){var d=this.view.scale,f=this.view.translate,g=this.pageFormat,e=d*this.pageScale,l=this.view.getBackgroundPageBounds();c=l.width;b=l.height;var n=
-new mxRectangle(d*f.x,d*f.y,g.width*e,g.height*e),k=(a=a&&Math.min(n.width,n.height)>this.minPageBreakDist)?Math.ceil(b/n.height)-1:0,x=a?Math.ceil(c/n.width)-1:0,t=l.x+c,m=l.y+b;null==this.horizontalPageBreaks&&0<k&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<x&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var d=a==this.horizontalPageBreaks?k:x,c=0;c<=d;c++){var b=a==this.horizontalPageBreaks?[new mxPoint(Math.round(l.x),Math.round(l.y+(c+1)*n.height)),
+new mxRectangle(d*f.x,d*f.y,g.width*e,g.height*e),k=(a=a&&Math.min(n.width,n.height)>this.minPageBreakDist)?Math.ceil(b/n.height)-1:0,A=a?Math.ceil(c/n.width)-1:0,t=l.x+c,m=l.y+b;null==this.horizontalPageBreaks&&0<k&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<A&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var d=a==this.horizontalPageBreaks?k:A,c=0;c<=d;c++){var b=a==this.horizontalPageBreaks?[new mxPoint(Math.round(l.x),Math.round(l.y+(c+1)*n.height)),
new mxPoint(Math.round(t),Math.round(l.y+(c+1)*n.height))]:[new mxPoint(Math.round(l.x+(c+1)*n.width),Math.round(l.y)),new mxPoint(Math.round(l.x+(c+1)*n.width),Math.round(m))];null!=a[c]?(a[c].points=b,a[c].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[c]=b)}for(c=d;c<a.length;c++)a[c].destroy();a.splice(d,a.length-d)}});a(this.horizontalPageBreaks);a(this.verticalPageBreaks)};
var b=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(a,c,e){for(var d=0;d<c.length;d++)if(this.graph.getModel().isVertex(c[d])){var f=this.graph.getCellGeometry(c[d]);if(null!=f&&f.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(c,b){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(),c=0<a.width?a.x/this.scale-this.translate.x:0,b=0<a.height?a.y/this.scale-this.translate.y:0,d=this.graph.pageFormat,f=this.graph.pageScale,g=d.width*f,d=d.height*f,f=Math.floor(Math.min(0,c)/g),e=Math.floor(Math.min(0,
@@ -2125,16 +2125,16 @@ m,this.menubarContainer.onmousedown=m,this.toolbarContainer.onselectstart=m,this
function(a,d){return k||q.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(a){32!=a.which||c.isEditing()?mxEvent.isConsumed(a)||27!=a.keyCode||this.hideDialog(null,!0):(k=!0,this.hoverIcons.reset(),c.container.style.cursor="move",c.isEditing()||mxEvent.getSource(a)!=c.container||mxEvent.consume(a))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(a){c.container.style.cursor="";k=!1});mxEvent.addListener(document,"keyup",
this.keyupHandler);var u=c.panningHandler.isForcePanningEvent;c.panningHandler.isForcePanningEvent=function(a){return u.apply(this,arguments)||k||mxEvent.isMouseEvent(a.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(a.getEvent()))&&(!mxEvent.isControlDown(a.getEvent())&&mxEvent.isRightMouseButton(a.getEvent())||mxEvent.isMiddleMouseButton(a.getEvent()))};var y=c.cellEditor.isStopEditingEvent;c.cellEditor.isStopEditingEvent=function(a){return y.apply(this,arguments)||13==a.keyCode&&(!mxClient.IS_SF&&
mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxClient.IS_SF&&mxEvent.isShiftDown(a))};var B=c.isZoomWheelEvent;c.isZoomWheelEvent=function(){return k||B.apply(this,arguments)};var d=!1,f=null,g=null,p=null,l=mxUtils.bind(this,function(){if(null!=this.toolbar&&d!=c.cellEditor.isContentEditing()){for(var a=this.toolbar.container.firstChild,b=[];null!=a;){var e=a.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,a)&&(a.parentNode.removeChild(a),b.push(a));a=e}a=this.toolbar.fontMenu;
-e=this.toolbar.sizeMenu;if(null==p)this.toolbar.createTextToolbar();else{for(var l=0;l<p.length;l++)this.toolbar.container.appendChild(p[l]);this.toolbar.fontMenu=f;this.toolbar.sizeMenu=g}d=c.cellEditor.isContentEditing();f=a;g=e;p=b}}),n=this,A=c.cellEditor.startEditing;c.cellEditor.startEditing=function(){A.apply(this,arguments);l();if(c.cellEditor.isContentEditing()){var a=!1,d=function(){a||(a=!0,window.setTimeout(function(){for(var d=c.getSelectedElement();null!=d&&d.nodeType!=mxConstants.NODETYPE_ELEMENT;)d=
-d.parentNode;if(null!=d&&(d=mxUtils.getCurrentStyle(d),null!=d&&null!=n.toolbar)){var b=d.fontFamily;"'"==b.charAt(0)&&(b=b.substring(1));"'"==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1));n.toolbar.setFontName(b);n.toolbar.setFontSize(parseInt(d.fontSize))}a=!1},0))};mxEvent.addListener(c.cellEditor.textarea,"input",d);mxEvent.addListener(c.cellEditor.textarea,"touchend",d);mxEvent.addListener(c.cellEditor.textarea,"mouseup",d);mxEvent.addListener(c.cellEditor.textarea,"keyup",d);d()}};var x=
-c.cellEditor.stopEditing;c.cellEditor.stopEditing=function(a,d){try{x.apply(this,arguments),l()}catch(N){n.handleError(N)}};c.container.setAttribute("tabindex","0");c.container.style.cursor="default";if(window.self===window.top&&null!=c.container.parentNode)try{c.container.focus()}catch(J){}var t=c.fireMouseEvent;c.fireMouseEvent=function(a,d,c){a==mxEvent.MOUSE_DOWN&&this.container.focus();t.apply(this,arguments)};c.popupMenuHandler.autoExpand=!0;null!=this.menus&&(c.popupMenuHandler.factoryMethod=
-mxUtils.bind(this,function(a,d,c){this.menus.createPopupMenu(a,d,c)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(a){c.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};var F="rounded shadow glass dashed dashPattern comic labelBackgroundColor".split(" "),z="shape edgeStyle curved rounded elbow comic jumpStyle jumpSize".split(" ");this.setDefaultStyle=function(a){try{var d=c.view.getState(a);if(null!=d){var b=
-a.clone();b.style="";var f=c.getCellStyle(b);a=[];var b=[],g;for(g in d.style)f[g]!=d.style[g]&&(a.push(d.style[g]),b.push(g));for(var e=c.getModel().getStyle(d.cell),l=null!=e?e.split(";"):[],e=0;e<l.length;e++){var n=l[e],p=n.indexOf("=");if(0<=p){g=n.substring(0,p);var v=n.substring(p+1);null!=f[g]&&"none"==v&&(a.push(v),b.push(g))}}c.getModel().isEdge(d.cell)?c.currentEdgeStyle={}:c.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",b,"values",a,"cells",[d.cell]))}}catch(T){this.handleError(T)}};
+e=this.toolbar.sizeMenu;if(null==p)this.toolbar.createTextToolbar();else{for(var l=0;l<p.length;l++)this.toolbar.container.appendChild(p[l]);this.toolbar.fontMenu=f;this.toolbar.sizeMenu=g}d=c.cellEditor.isContentEditing();f=a;g=e;p=b}}),n=this,x=c.cellEditor.startEditing;c.cellEditor.startEditing=function(){x.apply(this,arguments);l();if(c.cellEditor.isContentEditing()){var a=!1,d=function(){a||(a=!0,window.setTimeout(function(){for(var d=c.getSelectedElement();null!=d&&d.nodeType!=mxConstants.NODETYPE_ELEMENT;)d=
+d.parentNode;if(null!=d&&(d=mxUtils.getCurrentStyle(d),null!=d&&null!=n.toolbar)){var b=d.fontFamily;"'"==b.charAt(0)&&(b=b.substring(1));"'"==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1));n.toolbar.setFontName(b);n.toolbar.setFontSize(parseInt(d.fontSize))}a=!1},0))};mxEvent.addListener(c.cellEditor.textarea,"input",d);mxEvent.addListener(c.cellEditor.textarea,"touchend",d);mxEvent.addListener(c.cellEditor.textarea,"mouseup",d);mxEvent.addListener(c.cellEditor.textarea,"keyup",d);d()}};var A=
+c.cellEditor.stopEditing;c.cellEditor.stopEditing=function(a,d){try{A.apply(this,arguments),l()}catch(N){n.handleError(N)}};c.container.setAttribute("tabindex","0");c.container.style.cursor="default";if(window.self===window.top&&null!=c.container.parentNode)try{c.container.focus()}catch(K){}var t=c.fireMouseEvent;c.fireMouseEvent=function(a,d,c){a==mxEvent.MOUSE_DOWN&&this.container.focus();t.apply(this,arguments)};c.popupMenuHandler.autoExpand=!0;null!=this.menus&&(c.popupMenuHandler.factoryMethod=
+mxUtils.bind(this,function(a,d,c){this.menus.createPopupMenu(a,d,c)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(a){c.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};var G="rounded shadow glass dashed dashPattern comic labelBackgroundColor".split(" "),z="shape edgeStyle curved rounded elbow comic jumpStyle jumpSize".split(" ");this.setDefaultStyle=function(a){try{var d=c.view.getState(a);if(null!=d){var b=
+a.clone();b.style="";var f=c.getCellStyle(b);a=[];var b=[],g;for(g in d.style)f[g]!=d.style[g]&&(a.push(d.style[g]),b.push(g));for(var e=c.getModel().getStyle(d.cell),l=null!=e?e.split(";"):[],e=0;e<l.length;e++){var n=l[e],v=n.indexOf("=");if(0<=v){g=n.substring(0,v);var p=n.substring(v+1);null!=f[g]&&"none"==p&&(a.push(p),b.push(g))}}c.getModel().isEdge(d.cell)?c.currentEdgeStyle={}:c.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",b,"values",a,"cells",[d.cell]))}}catch(T){this.handleError(T)}};
this.clearDefaultStyle=function(){c.currentEdgeStyle=mxUtils.clone(c.defaultEdgeStyle);c.currentVertexStyle=mxUtils.clone(c.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var E=["fontFamily","fontSize","fontColor"],C="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),v=["startArrow startFill startSize sourcePerimeterSpacing endArrow endFill endSize targetPerimeterSpacing".split(" "),["strokeColor","strokeWidth"],
-["fillColor","gradientColor"],E,["opacity"],["align"],["html"]];for(a=0;a<v.length;a++)for(b=0;b<v[a].length;b++)F.push(v[a][b]);for(a=0;a<z.length;a++)0>mxUtils.indexOf(F,z[a])&&F.push(z[a]);var L=function(a,d){var b=c.getModel();b.beginUpdate();try{for(var f=0;f<a.length;f++){var g=a[f],e;if(d)e=["fontSize","fontFamily","fontColor"];else{var l=b.getStyle(g),n=null!=l?l.split(";"):[];e=F.slice();for(var p=0;p<n.length;p++){var t=n[p],x=t.indexOf("=");if(0<=x){var k=t.substring(0,x),m=mxUtils.indexOf(e,
-k);0<=m&&e.splice(m,1);for(var A=0;A<v.length;A++){var L=v[A];if(0<=mxUtils.indexOf(L,k))for(var H=0;H<L.length;H++){var u=mxUtils.indexOf(e,L[H]);0<=u&&e.splice(u,1)}}}}}for(var J=b.isEdge(g),C=J?c.currentEdgeStyle:c.currentVertexStyle,q=b.getStyle(g),p=0;p<e.length;p++){var k=e[p],y=C[k];null==y||"shape"==k&&!J||J&&!(0>mxUtils.indexOf(z,k))||(q=mxUtils.setStyle(q,k,y))}b.setStyle(g,q)}}finally{b.endUpdate()}};c.addListener("cellsInserted",function(a,d){L(d.getProperty("cells"))});c.addListener("textInserted",
-function(a,d){L(d.getProperty("cells"),!0)});c.connectionHandler.addListener(mxEvent.CONNECT,function(a,d){var c=[d.getProperty("cell")];d.getProperty("terminalInserted")&&c.push(d.getProperty("terminal"));L(c)});this.addListener("styleChanged",mxUtils.bind(this,function(a,d){var b=d.getProperty("cells"),f=!1,g=!1;if(0<b.length)for(var e=0;e<b.length&&(f=c.getModel().isVertex(b[e])||f,!(g=c.getModel().isEdge(b[e])||g)||!f);e++);else g=f=!0;for(var b=d.getProperty("keys"),l=d.getProperty("values"),
-e=0;e<b.length;e++){var n=0<=mxUtils.indexOf(E,b[e]);if("strokeColor"!=b[e]||null!=l[e]&&"none"!=l[e])if(0<=mxUtils.indexOf(z,b[e]))g||0<=mxUtils.indexOf(C,b[e])?null==l[e]?delete c.currentEdgeStyle[b[e]]:c.currentEdgeStyle[b[e]]=l[e]:f&&0<=mxUtils.indexOf(F,b[e])&&(null==l[e]?delete c.currentVertexStyle[b[e]]:c.currentVertexStyle[b[e]]=l[e]);else if(0<=mxUtils.indexOf(F,b[e])){if(f||n)null==l[e]?delete c.currentVertexStyle[b[e]]:c.currentVertexStyle[b[e]]=l[e];if(g||n||0<=mxUtils.indexOf(C,b[e]))null==
+["fillColor","gradientColor"],E,["opacity"],["align"],["html"]];for(a=0;a<v.length;a++)for(b=0;b<v[a].length;b++)G.push(v[a][b]);for(a=0;a<z.length;a++)0>mxUtils.indexOf(G,z[a])&&G.push(z[a]);var I=function(a,d){var b=c.getModel();b.beginUpdate();try{for(var f=0;f<a.length;f++){var g=a[f],e;if(d)e=["fontSize","fontFamily","fontColor"];else{var l=b.getStyle(g),n=null!=l?l.split(";"):[];e=G.slice();for(var p=0;p<n.length;p++){var t=n[p],A=t.indexOf("=");if(0<=A){var k=t.substring(0,A),x=mxUtils.indexOf(e,
+k);0<=x&&e.splice(x,1);for(var m=0;m<v.length;m++){var I=v[m];if(0<=mxUtils.indexOf(I,k))for(var H=0;H<I.length;H++){var u=mxUtils.indexOf(e,I[H]);0<=u&&e.splice(u,1)}}}}}for(var K=b.isEdge(g),C=K?c.currentEdgeStyle:c.currentVertexStyle,q=b.getStyle(g),p=0;p<e.length;p++){var k=e[p],y=C[k];null==y||"shape"==k&&!K||K&&!(0>mxUtils.indexOf(z,k))||(q=mxUtils.setStyle(q,k,y))}b.setStyle(g,q)}}finally{b.endUpdate()}};c.addListener("cellsInserted",function(a,d){I(d.getProperty("cells"))});c.addListener("textInserted",
+function(a,d){I(d.getProperty("cells"),!0)});c.connectionHandler.addListener(mxEvent.CONNECT,function(a,d){var c=[d.getProperty("cell")];d.getProperty("terminalInserted")&&c.push(d.getProperty("terminal"));I(c)});this.addListener("styleChanged",mxUtils.bind(this,function(a,d){var b=d.getProperty("cells"),f=!1,g=!1;if(0<b.length)for(var e=0;e<b.length&&(f=c.getModel().isVertex(b[e])||f,!(g=c.getModel().isEdge(b[e])||g)||!f);e++);else g=f=!0;for(var b=d.getProperty("keys"),l=d.getProperty("values"),
+e=0;e<b.length;e++){var n=0<=mxUtils.indexOf(E,b[e]);if("strokeColor"!=b[e]||null!=l[e]&&"none"!=l[e])if(0<=mxUtils.indexOf(z,b[e]))g||0<=mxUtils.indexOf(C,b[e])?null==l[e]?delete c.currentEdgeStyle[b[e]]:c.currentEdgeStyle[b[e]]=l[e]:f&&0<=mxUtils.indexOf(G,b[e])&&(null==l[e]?delete c.currentVertexStyle[b[e]]:c.currentVertexStyle[b[e]]=l[e]);else if(0<=mxUtils.indexOf(G,b[e])){if(f||n)null==l[e]?delete c.currentVertexStyle[b[e]]:c.currentVertexStyle[b[e]]=l[e];if(g||n||0<=mxUtils.indexOf(C,b[e]))null==
l[e]?delete c.currentEdgeStyle[b[e]]:c.currentEdgeStyle[b[e]]=l[e]}}null!=this.toolbar&&(this.toolbar.setFontName(c.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(c.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==c.currentEdgeStyle.edgeStyle&&"1"==c.currentEdgeStyle.curved?"geSprite geSprite-curved":"straight"==c.currentEdgeStyle.edgeStyle||
"none"==c.currentEdgeStyle.edgeStyle||null==c.currentEdgeStyle.edgeStyle?"geSprite geSprite-straight":"entityRelationEdgeStyle"==c.currentEdgeStyle.edgeStyle?"geSprite geSprite-entity":"elbowEdgeStyle"==c.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==c.currentEdgeStyle.elbow?"verticalelbow":"horizontalelbow"):"isometricEdgeStyle"==c.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==c.currentEdgeStyle.elbow?"verticalisometric":"horizontalisometric"):"geSprite geSprite-orthogonal"),
null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==c.currentEdgeStyle.shape?"geSprite geSprite-linkedge":"flexArrow"==c.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==c.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"),null!=this.toolbar.lineStartMenu&&(this.toolbar.lineStartMenu.getElementsByTagName("div")[0].className=this.getCssClassForMarker("start",c.currentEdgeStyle.shape,c.currentEdgeStyle[mxConstants.STYLE_STARTARROW],
@@ -2159,8 +2159,8 @@ EditorUi.prototype.initClipboard=function(){var a=this,b=mxClipboard.cut;mxClipb
var m=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(b,c){m.apply(this,arguments);a.updatePasteActionStates()};this.updatePasteActionStates()};EditorUi.prototype.lazyZoomDelay=20;EditorUi.prototype.wheelZoomDelay=400;EditorUi.prototype.buttonZoomDelay=600;
EditorUi.prototype.initCanvas=function(){var a=this.editor.graph;a.timerAutoScroll=!0;a.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((a.container.offsetWidth-34)/a.view.scale)),Math.max(0,Math.round((a.container.offsetHeight-34)/a.view.scale)))};a.view.getBackgroundPageBounds=function(){var a=this.graph.getPageLayout(),d=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*d.width),this.scale*(this.translate.y+a.y*d.height),this.scale*a.width*d.width,
this.scale*a.height*d.height)};a.getPreferredPageSize=function(a,d,b){a=this.getPageLayout();d=this.getPageSize();return new mxRectangle(0,0,a.width*d.width,a.height*d.height)};var b=null,e=this;if(this.editor.isChromelessView()){this.chromelessResize=b=mxUtils.bind(this,function(d,b,c,f){if(null!=a.container&&!a.isViewer()){c=null!=c?c:0;f=null!=f?f:0;var g=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),e=mxUtils.hasScrollbars(a.container),l=a.view.translate,n=a.view.scale,p=mxRectangle.fromRectangle(g);
-p.x=p.x/n-l.x;p.y=p.y/n-l.y;p.width/=n;p.height/=n;var l=a.container.scrollTop,v=a.container.scrollLeft,t=mxClient.IS_QUIRKS||8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)t+=3;var D=a.container.offsetWidth-t,t=a.container.offsetHeight-t;d=d?Math.max(.3,Math.min(b||1,D/p.width)):n;b=(D-d*p.width)/2/d;var x=0==this.lightboxVerticalDivider?0:(t-d*p.height)/this.lightboxVerticalDivider/d;e&&(b=Math.max(b,0),x=Math.max(x,0));if(e||g.width<D||g.height<t)a.view.scaleAndTranslate(d,
-Math.floor(b-p.x),Math.floor(x-p.y)),a.container.scrollTop=l*d/n,a.container.scrollLeft=v*d/n;else if(0!=c||0!=f)g=a.view.translate,a.view.setTranslate(Math.floor(g.x+c/n),Math.floor(g.y+f/n))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var c=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",c);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",c)});this.editor.addListener("resetGraphView",
+p.x=p.x/n-l.x;p.y=p.y/n-l.y;p.width/=n;p.height/=n;var l=a.container.scrollTop,v=a.container.scrollLeft,t=mxClient.IS_QUIRKS||8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)t+=3;var D=a.container.offsetWidth-t,t=a.container.offsetHeight-t;d=d?Math.max(.3,Math.min(b||1,D/p.width)):n;b=(D-d*p.width)/2/d;var A=0==this.lightboxVerticalDivider?0:(t-d*p.height)/this.lightboxVerticalDivider/d;e&&(b=Math.max(b,0),A=Math.max(A,0));if(e||g.width<D||g.height<t)a.view.scaleAndTranslate(d,
+Math.floor(b-p.x),Math.floor(A-p.y)),a.container.scrollTop=l*d/n,a.container.scrollLeft=v*d/n;else if(0!=c||0!=f)g=a.view.translate,a.view.setTranslate(Math.floor(g.x+c/n),Math.floor(g.y+f/n))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var c=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",c);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",c)});this.editor.addListener("resetGraphView",
mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(d){a.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(d){a.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var m=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));this.chromelessToolbar=document.createElement("div");this.chromelessToolbar.style.position="fixed";this.chromelessToolbar.style.overflow="hidden";
this.chromelessToolbar.style.boxSizing="border-box";this.chromelessToolbar.style.whiteSpace="nowrap";this.chromelessToolbar.style.backgroundColor="#000000";this.chromelessToolbar.style.padding="10px 10px 8px 10px";this.chromelessToolbar.style.left=a.isViewer()?"0":"50%";mxClient.IS_VML||(mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"borderRadius","20px"),mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out"));var k=mxUtils.bind(this,function(){var d=
mxUtils.getCurrentStyle(a.container);a.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=d?parseInt(d["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",k);k();var q=0,k=mxUtils.bind(this,function(a,d,b){q++;var c=document.createElement("span");c.style.paddingLeft="8px";c.style.paddingRight="8px";c.style.cursor="pointer";mxEvent.addListener(c,"click",a);null!=b&&c.setAttribute("title",
@@ -2169,25 +2169,25 @@ y.style.display="inline-block";y.style.verticalAlign="top";y.style.fontFamily="H
this.currentPage)+1+" / "+this.pages.length))});u.style.paddingLeft="0px";u.style.paddingRight="4px";B.style.paddingLeft="4px";B.style.paddingRight="0px";var f=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(B.style.display="",u.style.display="",y.style.display="inline-block"):(B.style.display="none",u.style.display="none",y.style.display="none");d()});this.editor.addListener("resetGraphView",f);this.editor.addListener("pageSelected",d);k(mxUtils.bind(this,
function(a){this.actions.get("zoomOut").funct();mxEvent.consume(a)}),Editor.zoomOutLargeImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");k(mxUtils.bind(this,function(a){this.actions.get("zoomIn").funct();mxEvent.consume(a)}),Editor.zoomInLargeImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");k(mxUtils.bind(this,function(d){a.isLightboxView()?(1==a.view.scale?this.lightboxFit():a.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(d)}),Editor.actualSizeLargeImage,
mxResources.get("fit"));var g=null,p=null,l=mxUtils.bind(this,function(a){null!=g&&(window.clearTimeout(g),fadeThead=null);null!=p&&(window.clearTimeout(p),fadeThead2=null);g=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);g=null;p=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";p=null}),600)}),a||200)}),n=mxUtils.bind(this,function(a){null!=g&&(window.clearTimeout(g),fadeThead=null);null!=p&&(window.clearTimeout(p),
-fadeThead2=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,a||30)});if("1"==urlParams.layers){this.layersDialog=null;var A=k(mxUtils.bind(this,function(d){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=a.createLayersDialog();mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=
-null}));var b=A.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily="Helvetica,Arial";this.layersDialog.style.backgroundColor="#000000";this.layersDialog.style.width="160px";this.layersDialog.style.padding="4px 2px 4px 2px";this.layersDialog.style.color="#ffffff";mxUtils.setOpacity(this.layersDialog,70);this.layersDialog.style.left=b.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+
-this.chromelessToolbar.offsetHeight+4+"px";b=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=b.zIndex;document.body.appendChild(this.layersDialog)}mxEvent.consume(d)}),Editor.layersLargeImage,mxResources.get("layers")),x=a.getModel();x.addListener(mxEvent.CHANGE,function(){A.style.display=1<x.getChildCount(x.root)?"":"none"})}this.addChromelessToolbarItems(k);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||k(mxUtils.bind(this,function(d){null!=
+fadeThead2=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,a||30)});if("1"==urlParams.layers){this.layersDialog=null;var x=k(mxUtils.bind(this,function(d){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=a.createLayersDialog();mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=
+null}));var b=x.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily="Helvetica,Arial";this.layersDialog.style.backgroundColor="#000000";this.layersDialog.style.width="160px";this.layersDialog.style.padding="4px 2px 4px 2px";this.layersDialog.style.color="#ffffff";mxUtils.setOpacity(this.layersDialog,70);this.layersDialog.style.left=b.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+
+this.chromelessToolbar.offsetHeight+4+"px";b=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=b.zIndex;document.body.appendChild(this.layersDialog)}mxEvent.consume(d)}),Editor.layersLargeImage,mxResources.get("layers")),A=a.getModel();A.addListener(mxEvent.CHANGE,function(){x.style.display=1<A.getChildCount(A.root)?"":"none"})}this.addChromelessToolbarItems(k);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||k(mxUtils.bind(this,function(d){null!=
this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):a.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(d)}),Editor.editLargeImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(f=0;f<this.lightboxToolbarActions.length;f++){var t=this.lightboxToolbarActions[f];k(t.fn,t.icon,t.tooltip)}null!=m.refreshBtn&&k(mxUtils.bind(this,function(a){m.refreshBtn.url?window.location.href=m.refreshBtn.url:
window.location.reload();mxEvent.consume(a)}),Editor.refreshLargeImage,mxResources.get("refresh",null,"Refresh"));null!=m.fullscreenBtn&&window.self!==window.top&&k(mxUtils.bind(this,function(d){m.fullscreenBtn.url?a.openLink(m.fullscreenBtn.url):a.openLink(window.location.href);mxEvent.consume(d)}),Editor.fullscreenLargeImage,mxResources.get("openInNewWindow",null,"Open in New Window"));(m.closeBtn&&window.self===window.top||a.lightbox&&("1"==urlParams.close||this.container!=document.body))&&k(mxUtils.bind(this,
function(a){"1"==urlParams.close||m.closeBtn?window.close():(this.destroy(),mxEvent.consume(a))}),Editor.closeLargeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";a.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");a.container.appendChild(this.chromelessToolbar);mxEvent.addListener(a.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(mxEvent.isShiftDown(a)||
n(30),l())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(a){mxEvent.consume(a)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?l():n(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?l():n(100);mxEvent.consume(a)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||
-n(30)}));var F=a.getTolerance();a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(d,b){this.startX=b.getGraphX();this.startY=b.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(a,d){},mouseUp:function(d,b){mxEvent.isTouchEvent(b.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<F&&Math.abs(this.scrollTop-a.container.scrollTop)<F&&Math.abs(this.startX-b.getGraphX())<F&&Math.abs(this.startY-b.getGraphY())<
-F&&(0<parseFloat(e.chromelessToolbar.style.opacity||0)?l():n(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var z=a.view.validate;a.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var a=this.graph.getPagePadding(),d=this.graph.getPageSize();this.translate.x=a.x-(this.x0||0)*d.width;this.translate.y=a.y-(this.y0||0)*d.height}z.apply(this,arguments)};if(!a.isViewer()){var E=a.sizeDidChange;a.sizeDidChange=
+n(30)}));var G=a.getTolerance();a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(d,b){this.startX=b.getGraphX();this.startY=b.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(a,d){},mouseUp:function(d,b){mxEvent.isTouchEvent(b.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<G&&Math.abs(this.scrollTop-a.container.scrollTop)<G&&Math.abs(this.startX-b.getGraphX())<G&&Math.abs(this.startY-b.getGraphY())<
+G&&(0<parseFloat(e.chromelessToolbar.style.opacity||0)?l():n(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var z=a.view.validate;a.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var a=this.graph.getPagePadding(),d=this.graph.getPageSize();this.translate.x=a.x-(this.x0||0)*d.width;this.translate.y=a.y-(this.y0||0)*d.height}z.apply(this,arguments)};if(!a.isViewer()){var E=a.sizeDidChange;a.sizeDidChange=
function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var d=this.getPageLayout(),b=this.getPagePadding(),c=this.getPageSize(),f=Math.ceil(2*b.x+d.width*c.width),g=Math.ceil(2*b.y+d.height*c.height),e=a.minimumGraphSize;if(null==e||e.width!=f||e.height!=g)a.minimumGraphSize=new mxRectangle(0,0,f,g);f=b.x-d.x*c.width;b=b.y-d.y*c.height;this.autoTranslate||this.view.translate.x==f&&this.view.translate.y==b?E.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=d.x,this.view.y0=
-d.y,d=a.view.translate.x,c=a.view.translate.y,a.view.setTranslate(f,b),a.container.scrollLeft+=Math.round((f-d)*a.view.scale),a.container.scrollTop+=Math.round((b-c)*a.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var C=a.view.getBackgroundPane(),v=a.view.getDrawPane();a.cumulativeZoomFactor=1;var L=null,J=null,H=null,N=null,D=function(d){null!=L&&window.clearTimeout(L);window.setTimeout(function(){a.isMouseDown||(L=window.setTimeout(mxUtils.bind(this,
+d.y,d=a.view.translate.x,c=a.view.translate.y,a.view.setTranslate(f,b),a.container.scrollLeft+=Math.round((f-d)*a.view.scale),a.container.scrollTop+=Math.round((b-c)*a.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var C=a.view.getBackgroundPane(),v=a.view.getDrawPane();a.cumulativeZoomFactor=1;var I=null,K=null,H=null,N=null,D=function(d){null!=I&&window.clearTimeout(I);window.setTimeout(function(){a.isMouseDown||(I=window.setTimeout(mxUtils.bind(this,
function(){a.isFastZoomEnabled()&&(null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform",null)),v.style.transformOrigin="",C.style.transformOrigin="",mxClient.IS_SF?(v.style.transform="scale(1)",C.style.transform="scale(1)",window.setTimeout(function(){v.style.transform="";C.style.transform=""},0)):(v.style.transform=
-"",C.style.transform=""),a.view.getDecoratorPane().style.opacity="",a.view.getOverlayPane().style.opacity="");var d=new mxPoint(a.container.scrollLeft,a.container.scrollTop),c=mxUtils.getOffset(a.container),f=a.view.scale,g=0,l=0;null!=J&&(g=a.container.offsetWidth/2-J.x+c.x,l=a.container.offsetHeight/2-J.y+c.y);a.zoom(a.cumulativeZoomFactor);a.view.scale!=f&&(null!=H&&(g+=d.x-H.x,l+=d.y-H.y),null!=b&&e.chromelessResize(!1,null,g*(a.cumulativeZoomFactor-1),l*(a.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(a.container)||
-0==g&&0==l||(a.container.scrollLeft-=g*(a.cumulativeZoomFactor-1),a.container.scrollTop-=l*(a.cumulativeZoomFactor-1)));null!=N&&v.setAttribute("filter",N);a.cumulativeZoomFactor=1;N=J=H=L=null}),null!=d?d:a.isFastZoomEnabled()?e.wheelZoomDelay:e.lazyZoomDelay))},0)};a.lazyZoom=function(d,b,c){(b=b||!a.scrollbars)&&(J=new mxPoint(a.container.offsetLeft+a.container.clientWidth/2,a.container.offsetTop+a.container.clientHeight/2));d?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=
+"",C.style.transform=""),a.view.getDecoratorPane().style.opacity="",a.view.getOverlayPane().style.opacity="");var d=new mxPoint(a.container.scrollLeft,a.container.scrollTop),c=mxUtils.getOffset(a.container),f=a.view.scale,g=0,l=0;null!=K&&(g=a.container.offsetWidth/2-K.x+c.x,l=a.container.offsetHeight/2-K.y+c.y);a.zoom(a.cumulativeZoomFactor);a.view.scale!=f&&(null!=H&&(g+=d.x-H.x,l+=d.y-H.y),null!=b&&e.chromelessResize(!1,null,g*(a.cumulativeZoomFactor-1),l*(a.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(a.container)||
+0==g&&0==l||(a.container.scrollLeft-=g*(a.cumulativeZoomFactor-1),a.container.scrollTop-=l*(a.cumulativeZoomFactor-1)));null!=N&&v.setAttribute("filter",N);a.cumulativeZoomFactor=1;N=K=H=I=null}),null!=d?d:a.isFastZoomEnabled()?e.wheelZoomDelay:e.lazyZoomDelay))},0)};a.lazyZoom=function(d,b,c){(b=b||!a.scrollbars)&&(K=new mxPoint(a.container.offsetLeft+a.container.clientWidth/2,a.container.offsetTop+a.container.clientHeight/2));d?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=
(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*
-this.cumulativeZoomFactor,160))/this.view.scale;if(a.isFastZoomEnabled()){null==N&&""!=v.getAttribute("filter")&&(N=v.getAttribute("filter"),v.removeAttribute("filter"));H=new mxPoint(a.container.scrollLeft,a.container.scrollTop);d=b?a.container.scrollLeft+a.container.clientWidth/2:J.x+a.container.scrollLeft-a.container.offsetLeft;var f=b?a.container.scrollTop+a.container.clientHeight/2:J.y+a.container.scrollTop-a.container.offsetTop;v.style.transformOrigin=d+"px "+f+"px";v.style.transform="scale("+
-this.cumulativeZoomFactor+")";C.style.transformOrigin=d+"px "+f+"px";C.style.transform="scale("+this.cumulativeZoomFactor+")";null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&(d=a.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(d.style,"transform-origin",(b?a.container.clientWidth/2+a.container.scrollLeft-d.offsetLeft+"px":J.x+a.container.scrollLeft-d.offsetLeft-a.container.offsetLeft+"px")+" "+(b?a.container.clientHeight/2+a.container.scrollTop-d.offsetTop+"px":J.y+
-a.container.scrollTop-d.offsetTop-a.container.offsetTop+"px")),mxUtils.setPrefixedStyle(d.style,"transform","scale("+this.cumulativeZoomFactor+")"));a.view.getDecoratorPane().style.opacity="0";a.view.getOverlayPane().style.opacity="0";null!=e.hoverIcons&&e.hoverIcons.reset()}D(c)};mxEvent.addGestureListeners(a.container,function(a){null!=L&&window.clearTimeout(L)},null,function(d){1!=a.cumulativeZoomFactor&&D(0)});mxEvent.addListener(a.container,"scroll",function(){L&&!a.isMouseDown&&1!=a.cumulativeZoomFactor&&
-D(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(d,b,c){if(null==this.dialogs||0==this.dialogs.length)if(!a.scrollbars&&a.isScrollWheelEvent(d)){c=a.view.getTranslate();var f=40/a.view.scale;mxEvent.isShiftDown(d)?a.view.setTranslate(c.x+(b?-f:f),c.y):a.view.setTranslate(c.x,c.y+(b?f:-f))}else if(c||a.isZoomWheelEvent(d))for(c=mxEvent.getSource(d);null!=c;){if(c==a.container)return a.tooltipHandler.hideTooltip(),J=new mxPoint(mxEvent.getClientX(d),mxEvent.getClientY(d)),a.lazyZoom(b),
+this.cumulativeZoomFactor,160))/this.view.scale;if(a.isFastZoomEnabled()){null==N&&""!=v.getAttribute("filter")&&(N=v.getAttribute("filter"),v.removeAttribute("filter"));H=new mxPoint(a.container.scrollLeft,a.container.scrollTop);d=b?a.container.scrollLeft+a.container.clientWidth/2:K.x+a.container.scrollLeft-a.container.offsetLeft;var f=b?a.container.scrollTop+a.container.clientHeight/2:K.y+a.container.scrollTop-a.container.offsetTop;v.style.transformOrigin=d+"px "+f+"px";v.style.transform="scale("+
+this.cumulativeZoomFactor+")";C.style.transformOrigin=d+"px "+f+"px";C.style.transform="scale("+this.cumulativeZoomFactor+")";null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&(d=a.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(d.style,"transform-origin",(b?a.container.clientWidth/2+a.container.scrollLeft-d.offsetLeft+"px":K.x+a.container.scrollLeft-d.offsetLeft-a.container.offsetLeft+"px")+" "+(b?a.container.clientHeight/2+a.container.scrollTop-d.offsetTop+"px":K.y+
+a.container.scrollTop-d.offsetTop-a.container.offsetTop+"px")),mxUtils.setPrefixedStyle(d.style,"transform","scale("+this.cumulativeZoomFactor+")"));a.view.getDecoratorPane().style.opacity="0";a.view.getOverlayPane().style.opacity="0";null!=e.hoverIcons&&e.hoverIcons.reset()}D(c)};mxEvent.addGestureListeners(a.container,function(a){null!=I&&window.clearTimeout(I)},null,function(d){1!=a.cumulativeZoomFactor&&D(0)});mxEvent.addListener(a.container,"scroll",function(){I&&!a.isMouseDown&&1!=a.cumulativeZoomFactor&&
+D(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(d,b,c){if(null==this.dialogs||0==this.dialogs.length)if(!a.scrollbars&&a.isScrollWheelEvent(d)){c=a.view.getTranslate();var f=40/a.view.scale;mxEvent.isShiftDown(d)?a.view.setTranslate(c.x+(b?-f:f),c.y):a.view.setTranslate(c.x,c.y+(b?f:-f))}else if(c||a.isZoomWheelEvent(d))for(c=mxEvent.getSource(d);null!=c;){if(c==a.container)return a.tooltipHandler.hideTooltip(),K=new mxPoint(mxEvent.getClientX(d),mxEvent.getClientY(d)),a.lazyZoom(b),
mxEvent.consume(d),!1;c=c.parentNode}}),a.container);a.panningHandler.zoomGraph=function(d){a.cumulativeZoomFactor=d.scale;a.lazyZoom(0<d.scale,!0);mxEvent.consume(d)}};EditorUi.prototype.addChromelessToolbarItems=function(a){a(mxUtils.bind(this,function(a){this.actions.get("print").funct();mxEvent.consume(a)}),Editor.printLargeImage,mxResources.get("print"))};
EditorUi.prototype.createTemporaryGraph=function(a){a=new Graph(document.createElement("div"),null,null,a);a.resetViewOnRootChange=!1;a.setConnectable(!1);a.gridEnabled=!1;a.autoScroll=!1;a.setTooltips(!1);a.setEnabled(!1);a.container.style.visibility="hidden";a.container.style.position="absolute";a.container.style.overflow="hidden";a.container.style.height="1px";a.container.style.width="1px";return a};
EditorUi.prototype.addChromelessClickHandler=function(){var a=urlParams.highlight;null!=a&&0<a.length&&(a="#"+a);this.editor.graph.addClickHandler(a)};EditorUi.prototype.toggleFormatPanel=function(a){null!=this.format&&(this.formatWidth=a||0<this.formatWidth?0:240,this.formatContainer.style.display=a||0<this.formatWidth?"":"none",this.refresh(),this.format.refresh(),this.fireEvent(new mxEventObject("formatWidthChanged")))};
@@ -2280,30 +2280,31 @@ l<f.length-1&&0<=l&&(e=0==Math.round(f[l].x-f[l+1].x)?"col-resize":"row-resize")
this.setTooltips(!0);this.setAllowLoops(!0);this.allowAutoPanning=!0;this.constrainChildren=this.resetEdgesOnConnect=!1;this.constrainRelativeChildren=!0;this.graphHandler.scrollOnMove=!1;this.graphHandler.scaleGrid=!0;this.connectionHandler.setCreateTarget(!1);this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(a,d){return!1};this.alternateEdgeStyle="vertical";null==c&&this.loadStylesheet();var f=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=
function(){var a=f.apply(this,arguments);if(this.graph.pageVisible){for(var d=[],c=this.graph.pageFormat,b=this.graph.pageScale,e=c.width*b,c=c.height*b,b=this.graph.view.translate,g=this.graph.view.scale,l=this.graph.getPageLayout(),n=0;n<l.width;n++)d.push(new mxRectangle(((l.x+n)*e+b.x)*g,(l.y*c+b.y)*g,e*g,c*g));for(n=1;n<l.height;n++)d.push(new mxRectangle((l.x*e+b.x)*g,((l.y+n)*c+b.y)*g,e*g,c*g));a=d.concat(a)}return a};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=
function(a,d){return null==a.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(a){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var g=this.graphHandler.getCells;this.graphHandler.getCells=function(a){for(var d=g.apply(this,arguments),c=new mxDictionary,b=[],f=0;f<d.length;f++){var e=this.graph.getCompositeParent(d[f]);null==e||c.get(e)||
-(c.put(e,!0),b.push(e))}return b};var p=this.graphHandler.start;this.graphHandler.start=function(a,d,c,b){a=this.graph.getCompositeParent(a);p.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(a,d){d=this.graph.getCompositeParent(d);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var l=new mxRubberband(this);this.getRubberband=function(){return l};var n=(new Date).getTime(),A=0,x=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=
-function(){var a=this.currentState;x.apply(this,arguments);a!=this.currentState?(n=(new Date).getTime(),A=0):A=(new Date).getTime()-n};var t=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=this.currentState&&a.getState()==this.currentState&&2E3<A||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&t.apply(this,arguments)};var F=this.isToggleEvent;this.isToggleEvent=function(a){return F.apply(this,
+(c.put(e,!0),b.push(e))}return b};var p=this.graphHandler.start;this.graphHandler.start=function(a,d,c,b){a=this.graph.getCompositeParent(a);p.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(a,d){d=this.graph.getCompositeParent(d);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var l=new mxRubberband(this);this.getRubberband=function(){return l};var n=(new Date).getTime(),x=0,A=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=
+function(){var a=this.currentState;A.apply(this,arguments);a!=this.currentState?(n=(new Date).getTime(),x=0):x=(new Date).getTime()-n};var t=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=this.currentState&&a.getState()==this.currentState&&2E3<x||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&t.apply(this,arguments)};var G=this.isToggleEvent;this.isToggleEvent=function(a){return G.apply(this,
arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(a)};var z=l.isForceRubberbandEvent;l.isForceRubberbandEvent=function(a){return z.apply(this,arguments)&&!mxEvent.isShiftDown(a.getEvent())&&!mxEvent.isControlDown(a.getEvent())||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(a.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==a.getState()&&mxEvent.isTouchEvent(a.getEvent())};var E=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,
function(){this.isEnabled()&&(E=this.container.style.cursor,this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END,mxUtils.bind(this,function(){this.isEnabled()&&(this.container.style.cursor=E)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(a){return mxEvent.isMouseEvent(a.getEvent())};var C=this.click;this.click=function(a){var d=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);if(this.isEnabled()&&!d||
a.isConsumed())return C.apply(this,arguments);var c=d?a.sourceState.cell:a.getCell();null!=c&&(c=this.getClickableLinkForCell(c),null!=c&&(this.isCustomLink(c)?this.customLinkClicked(c):this.openLink(c)));this.isEnabled()&&d&&this.clearSelection()};this.tooltipHandler.getStateForEvent=function(a){return a.sourceState};this.getCursorForMouseEvent=function(a){var d=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);return this.getCursorForCell(d?a.sourceState.cell:a.getCell())};
var v=this.getCursorForCell;this.getCursorForCell=function(a){if(!this.isEnabled()||this.isCellLocked(a)){if(null!=this.getClickableLinkForCell(a))return"pointer";if(this.isCellLocked(a))return"default"}return v.apply(this,arguments)};this.selectRegion=function(a,d){var c=this.getAllCells(a.x,a.y,a.width,a.height);this.selectCellsForEvent(c,d);return c};this.getAllCells=function(a,d,c,b,f,e){e=null!=e?e:[];if(0<c||0<b){var g=this.getModel(),l=a+c,n=d+b;null==f&&(f=this.getCurrentRoot(),null==f&&(f=
-g.getRoot()));if(null!=f)for(var p=g.getChildCount(f),v=0;v<p;v++){var t=g.getChildAt(f,v),k=this.view.getState(t);if(null!=k&&this.isCellVisible(t)&&"1"!=mxUtils.getValue(k.style,"locked","0")){var m=mxUtils.getValue(k.style,mxConstants.STYLE_ROTATION)||0;0!=m&&(k=mxUtils.getBoundingBox(k,m));(g.isEdge(t)||g.isVertex(t))&&k.x>=a&&k.y+k.height<=n&&k.y>=d&&k.x+k.width<=l&&e.push(t);this.getAllCells(a,d,c,b,t,e)}}}return e};var L=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=
-function(a,d,c){return this.graph.isCellSelected(a)?!1:L.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 J=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,d){if("mouseDown"==d.getProperty("eventName")){var c=d.getProperty("event").getState();J=null==c||this.isSelectionEmpty()||this.isCellSelected(c.cell)?null:
-this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(a,d){if(!mxEvent.isMultiTouchEvent(d)){var c=d.getProperty("event"),b=d.getProperty("cell");null==b?(c=mxUtils.convertPoint(this.container,mxEvent.getClientX(c),mxEvent.getClientY(c)),l.start(c.x,c.y)):null!=J?this.addSelectionCells(J):1<this.getSelectionCount()&&this.isCellSelected(b)&&this.removeSelectionCell(b);J=null;d.consume()}}));this.connectionHandler.selectCells=function(a,d){this.graph.setSelectionCell(d||
+g.getRoot()));if(null!=f)for(var v=g.getChildCount(f),p=0;p<v;p++){var t=g.getChildAt(f,p),k=this.view.getState(t);if(null!=k&&this.isCellVisible(t)&&"1"!=mxUtils.getValue(k.style,"locked","0")){var m=mxUtils.getValue(k.style,mxConstants.STYLE_ROTATION)||0;0!=m&&(k=mxUtils.getBoundingBox(k,m));(g.isEdge(t)||g.isVertex(t))&&k.x>=a&&k.y+k.height<=n&&k.y>=d&&k.x+k.width<=l&&e.push(t);this.getAllCells(a,d,c,b,t,e)}}}return e};var I=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=
+function(a,d,c){return this.graph.isCellSelected(a)?!1:I.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 K=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,d){if("mouseDown"==d.getProperty("eventName")){var c=d.getProperty("event").getState();K=null==c||this.isSelectionEmpty()||this.isCellSelected(c.cell)?null:
+this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(a,d){if(!mxEvent.isMultiTouchEvent(d)){var c=d.getProperty("event"),b=d.getProperty("cell");null==b?(c=mxUtils.convertPoint(this.container,mxEvent.getClientX(c),mxEvent.getClientY(c)),l.start(c.x,c.y)):null!=K?this.addSelectionCells(K):1<this.getSelectionCount()&&this.isCellSelected(b)&&this.removeSelectionCell(b);K=null;d.consume()}}));this.connectionHandler.selectCells=function(a,d){this.graph.setSelectionCell(d||
a)};this.connectionHandler.constraintHandler.isStateIgnored=function(a,d){return d&&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 H=this.updateMouseEvent;this.updateMouseEvent=function(a){a=H.apply(this,
arguments);null!=a.state&&this.isCellLocked(a.getCell())&&(a.state=null);return a}}this.currentTranslate=new mxPoint(0,0)};Graph.touchStyle=mxClient.IS_TOUCH||mxClient.IS_FF&&mxClient.IS_WIN||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||null==window.urlParams||"1"==urlParams.touch;Graph.fileSupport=null!=window.File&&null!=window.FileReader&&null!=window.FileList&&(null==window.urlParams||"0"!=urlParams.filesupport);Graph.lineJumpsEnabled=!0;Graph.defaultJumpSize=6;
Graph.minTableColumnWidth=20;Graph.minTableRowHeight=20;Graph.foreignObjectWarningText="Viewer does not support full SVG 1.1";Graph.foreignObjectWarningLink="https://desk.draw.io/support/solutions/articles/16000042487";
Graph.createSvgImage=function(a,b,e,c,m){e=unescape(encodeURIComponent('<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+a+'px" height="'+b+'px" '+(null!=c&&null!=m?'viewBox="0 0 '+c+" "+m+'" ':"")+'version="1.1">'+e+"</svg>"));return new mxImage("data:image/svg+xml;base64,"+(window.btoa?btoa(e):Base64.encode(e,!0)),a,b)};
Graph.zapGremlins=function(a){for(var b=[],e=0;e<a.length;e++){var c=a.charCodeAt(e);(32<=c||9==c||10==c||13==c)&&65535!=c&&65534!=c&&b.push(a.charAt(e))}return b.join("")};Graph.stringToBytes=function(a){for(var b=Array(a.length),e=0;e<a.length;e++)b[e]=a.charCodeAt(e);return b};Graph.bytesToString=function(a){for(var b=Array(a.length),e=0;e<a.length;e++)b[e]=String.fromCharCode(a[e]);return b.join("")};Graph.compressNode=function(a,b){var e=mxUtils.getXml(a);return Graph.compress(b?e:Graph.zapGremlins(e))};
Graph.compress=function(a,b){if(null==a||0==a.length||"undefined"===typeof pako)return a;var e=b?pako.deflate(encodeURIComponent(a),{to:"string"}):pako.deflateRaw(encodeURIComponent(a),{to:"string"});return window.btoa?btoa(e):Base64.encode(e,!0)};Graph.decompress=function(a,b,e){if(null==a||0==a.length||"undefined"===typeof pako)return a;a=window.atob?atob(a):Base64.decode(a,!0);b=decodeURIComponent(b?pako.inflate(a,{to:"string"}):pako.inflateRaw(a,{to:"string"}));return e?b:Graph.zapGremlins(b)};
-mxUtils.extend(Graph,mxGraph);Graph.prototype.minFitScale=null;Graph.prototype.maxFitScale=null;Graph.prototype.linkPolicy="frame"==urlParams.target?"blank":urlParams.target||"auto";Graph.prototype.linkTarget="frame"==urlParams.target?"_self":"_blank";Graph.prototype.linkRelation="nofollow noopener noreferrer";Graph.prototype.defaultScrollbars=!mxClient.IS_IOS;Graph.prototype.defaultPageVisible=!0;Graph.prototype.lightbox=!1;Graph.prototype.defaultPageBackgroundColor="#ffffff";
-Graph.prototype.defaultPageBorderColor="#ffffff";Graph.prototype.scrollTileSize=new mxRectangle(0,0,400,400);Graph.prototype.transparentBackground=!0;Graph.prototype.selectParentAfterDelete=!1;Graph.prototype.defaultEdgeLength=80;Graph.prototype.edgeMode=!1;Graph.prototype.connectionArrowsEnabled=!0;Graph.prototype.placeholderPattern=RegExp("%(date{.*}|[^%^{^}]+)%","g");Graph.prototype.absoluteUrlPattern=/^(?:[a-z]+:)?\/\//i;Graph.prototype.defaultThemeName="default";
-Graph.prototype.defaultThemes={};Graph.prototype.baseUrl=null!=urlParams.base?decodeURIComponent(urlParams.base):(window!=window.top?document.referrer:document.location.toString()).split("#")[0];Graph.prototype.editAfterInsert=!1;Graph.prototype.builtInProperties=["label","tooltip","placeholders","placeholder"];Graph.prototype.standalone=!1;
+Graph.removePasteFormatting=function(a){for(;null!=a;)null!=a.firstChild&&Graph.removePasteFormatting(a.firstChild),a.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=a.style&&(a.style.whiteSpace=""),a=a.nextSibling};mxUtils.extend(Graph,mxGraph);Graph.prototype.minFitScale=null;Graph.prototype.maxFitScale=null;Graph.prototype.linkPolicy="frame"==urlParams.target?"blank":urlParams.target||"auto";Graph.prototype.linkTarget="frame"==urlParams.target?"_self":"_blank";Graph.prototype.linkRelation="nofollow noopener noreferrer";
+Graph.prototype.defaultScrollbars=!mxClient.IS_IOS;Graph.prototype.defaultPageVisible=!0;Graph.prototype.lightbox=!1;Graph.prototype.defaultPageBackgroundColor="#ffffff";Graph.prototype.defaultPageBorderColor="#ffffff";Graph.prototype.scrollTileSize=new mxRectangle(0,0,400,400);Graph.prototype.transparentBackground=!0;Graph.prototype.selectParentAfterDelete=!1;Graph.prototype.defaultEdgeLength=80;Graph.prototype.edgeMode=!1;Graph.prototype.connectionArrowsEnabled=!0;
+Graph.prototype.placeholderPattern=RegExp("%(date{.*}|[^%^{^}]+)%","g");Graph.prototype.absoluteUrlPattern=/^(?:[a-z]+:)?\/\//i;Graph.prototype.defaultThemeName="default";Graph.prototype.defaultThemes={};Graph.prototype.baseUrl=null!=urlParams.base?decodeURIComponent(urlParams.base):(window!=window.top?document.referrer:document.location.toString()).split("#")[0];Graph.prototype.editAfterInsert=!1;Graph.prototype.builtInProperties=["label","tooltip","placeholders","placeholder"];
+Graph.prototype.standalone=!1;
Graph.prototype.init=function(a){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(a,e){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var c=a.view.graph.tolerance,b=!0,k=null,q=mxUtils.bind(this,function(a){b=!0;k=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a))}),u=mxUtils.bind(this,function(a){b=b&&null!=k&&Math.abs(k.x-mxEvent.getClientX(a))<c&&Math.abs(k.y-mxEvent.getClientY(a))<c}),y=mxUtils.bind(this,function(c){if(b)for(var d=mxEvent.getSource(c);null!=
d&&d!=e.node;){if("a"==d.nodeName.toLowerCase()){a.view.graph.labelLinkClicked(a,d,c);break}d=d.parentNode}});mxEvent.addGestureListeners(e.node,q,u,y);mxEvent.addListener(e.node,"click",function(a){mxEvent.consume(a)})};this.initLayoutManager()};
(function(){Graph.prototype.useCssTransforms=!1;Graph.prototype.currentScale=1;Graph.prototype.currentTranslate=new mxPoint(0,0);Graph.prototype.isFastZoomEnabled=function(){return"nocss"!=urlParams.zoom&&!mxClient.NO_FO&&!mxClient.IS_EDGE&&!this.useCssTransforms&&this.isCssTransformsSupported()};Graph.prototype.isCssTransformsSupported=function(){return this.dialect==mxConstants.DIALECT_SVG&&!mxClient.NO_FO&&(!this.lightbox||!mxClient.IS_SF)};Graph.prototype.getCellAt=function(a,b,e,q,u,y){this.useCssTransforms&&
(a=a/this.currentScale-this.currentTranslate.x,b=b/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(a,b,e,q,u,y){q=null!=q?q:!0;u=null!=u?u:!0;null==e&&(e=this.getCurrentRoot(),null==e&&(e=this.getModel().getRoot()));if(null!=e)for(var c=this.model.getChildCount(e)-1;0<=c;c--){var d=this.model.getChildAt(e,c),f=this.getScaledCellAt(a,b,d,q,u,y);if(null!=f)return f;if(this.isCellVisible(d)&&(u&&this.model.isEdge(d)||
-q&&this.model.isVertex(d))&&(f=this.view.getState(d),null!=f&&(null==y||!y(f,a,b))&&this.intersects(f,a,b)))return d}return null};Graph.prototype.isRecursiveVertexResize=function(a){return!this.isSwimlane(a.cell)&&0<this.model.getChildCount(a.cell)&&!this.isCellCollapsed(a.cell)&&"1"==mxUtils.getValue(a.style,"recursiveResize","1")&&null==mxUtils.getValue(a.style,"childLayout",null)};Graph.prototype.isPart=function(a){return this.model.isVertex(a)?"1"==mxUtils.getValue(this.getCurrentCellStyle(a),
-"part","0"):!1};Graph.prototype.getCompositeParent=function(a){for(;this.isPart(a);)a=this.model.getParent(a);return a};mxCellHighlight.prototype.getStrokeWidth=function(a){a=this.strokeWidth;this.graph.useCssTransforms&&(a/=this.graph.currentScale);return a};mxGraphView.prototype.getGraphBounds=function(){var a=this.graphBounds;if(this.graph.useCssTransforms)var b=this.graph.currentTranslate,e=this.graph.currentScale,a=new mxRectangle((a.x+b.x)*e,(a.y+b.y)*e,a.width*e,a.height*e);return a};mxGraphView.prototype.viewStateChanged=
+q&&this.model.isVertex(d))&&(f=this.view.getState(d),null!=f&&(null==y||!y(f,a,b))&&this.intersects(f,a,b)))return d}return null};Graph.prototype.isRecursiveVertexResize=function(a){return!this.isSwimlane(a.cell)&&0<this.model.getChildCount(a.cell)&&!this.isCellCollapsed(a.cell)&&"1"==mxUtils.getValue(a.style,"recursiveResize","1")&&null==mxUtils.getValue(a.style,"childLayout",null)};Graph.prototype.isPart=function(a){return"1"==mxUtils.getValue(this.getCurrentCellStyle(a),"part","0")};Graph.prototype.getCompositeParent=
+function(a){for(;this.isPart(a);){var b=this.model.getParent(a);if(!this.model.isVertex(b))break;a=b}return a};mxCellHighlight.prototype.getStrokeWidth=function(a){a=this.strokeWidth;this.graph.useCssTransforms&&(a/=this.graph.currentScale);return a};mxGraphView.prototype.getGraphBounds=function(){var a=this.graphBounds;if(this.graph.useCssTransforms)var b=this.graph.currentTranslate,e=this.graph.currentScale,a=new mxRectangle((a.x+b.x)*e,(a.y+b.y)*e,a.width*e,a.height*e);return a};mxGraphView.prototype.viewStateChanged=
function(){this.graph.useCssTransforms?this.validate():this.revalidate();this.graph.sizeDidChange()};var a=mxGraphView.prototype.validate;mxGraphView.prototype.validate=function(b){this.graph.useCssTransforms&&(this.graph.currentScale=this.scale,this.graph.currentTranslate.x=this.translate.x,this.graph.currentTranslate.y=this.translate.y,this.scale=1,this.translate.x=0,this.translate.y=0);a.apply(this,arguments);this.graph.useCssTransforms&&(this.graph.updateCssTransform(),this.scale=this.graph.currentScale,
this.translate.x=this.graph.currentTranslate.x,this.translate.y=this.graph.currentTranslate.y)};Graph.prototype.updateCssTransform=function(){var a=this.view.getDrawPane();if(null!=a)if(a=a.parentNode,this.useCssTransforms){var b=a.getAttribute("transform");a.setAttribute("transformOrigin","0 0");var e=Math.round(100*this.currentScale)/100;a.setAttribute("transform","scale("+e+","+e+")translate("+Math.round(100*this.currentTranslate.x)/100+","+Math.round(100*this.currentTranslate.y)/100+")");if(b!=
a.getAttribute("transform"))try{if(mxClient.IS_EDGE){var q=a.style.display;a.style.display="none";a.getBBox();a.style.display=q}}catch(u){}}else a.removeAttribute("transformOrigin"),a.removeAttribute("transform")};var b=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){var a=this.graph.useCssTransforms,e=this.scale,k=this.translate;a&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);b.apply(this,arguments);a&&(this.scale=
@@ -2325,8 +2326,8 @@ Graph.prototype.isLabelMovable=function(a){var b=this.getCurrentCellStyle(a);ret
Graph.prototype.getClickableLinkForCell=function(a){do{var b=this.getLinkForCell(a);if(null!=b)return b;a=this.model.getParent(a)}while(null!=a);return null};Graph.prototype.getGlobalVariable=function(a){var b=null;"date"==a?b=(new Date).toLocaleDateString():"time"==a?b=(new Date).toLocaleTimeString():"timestamp"==a?b=(new Date).toLocaleString():"date{"==a.substring(0,5)&&(a=a.substring(5,a.length-1),b=this.formatDate(new Date,a));return b};
Graph.prototype.formatDate=function(a,b,e){null==this.dateFormatCache&&(this.dateFormatCache={i18n:{dayNames:"Sun Mon Tue Wed Thu Fri Sat Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),monthNames:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec January February March April May June July August September October November December".split(" ")},masks:{"default":"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",
shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var c=this.dateFormatCache,m=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,k=/[^-+\dA-Z]/g,q=function(a,d){a=String(a);for(d=d||2;a.length<d;)a="0"+a;return a};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(a)||
-/\d/.test(a)||(b=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");b=String(c.masks[b]||b||c.masks["default"]);"UTC:"==b.slice(0,4)&&(b=b.slice(4),e=!0);var u=e?"getUTC":"get",y=a[u+"Date"](),B=a[u+"Day"](),d=a[u+"Month"](),f=a[u+"FullYear"](),g=a[u+"Hours"](),p=a[u+"Minutes"](),l=a[u+"Seconds"](),u=a[u+"Milliseconds"](),n=e?0:a.getTimezoneOffset(),A={d:y,dd:q(y),ddd:c.i18n.dayNames[B],dddd:c.i18n.dayNames[B+7],m:d+1,mm:q(d+1),mmm:c.i18n.monthNames[d],mmmm:c.i18n.monthNames[d+
-12],yy:String(f).slice(2),yyyy:f,h:g%12||12,hh:q(g%12||12),H:g,HH:q(g),M:p,MM:q(p),s:l,ss:q(l),l:q(u,3),L:q(99<u?Math.round(u/10):u),t:12>g?"a":"p",tt:12>g?"am":"pm",T:12>g?"A":"P",TT:12>g?"AM":"PM",Z:e?"UTC":(String(a).match(m)||[""]).pop().replace(k,""),o:(0<n?"-":"+")+q(100*Math.floor(Math.abs(n)/60)+Math.abs(n)%60,4),S:["th","st","nd","rd"][3<y%10?0:(10!=y%100-y%10)*y%10]};return b.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(a){return a in A?A[a]:a.slice(1,
+/\d/.test(a)||(b=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");b=String(c.masks[b]||b||c.masks["default"]);"UTC:"==b.slice(0,4)&&(b=b.slice(4),e=!0);var u=e?"getUTC":"get",y=a[u+"Date"](),B=a[u+"Day"](),d=a[u+"Month"](),f=a[u+"FullYear"](),g=a[u+"Hours"](),p=a[u+"Minutes"](),l=a[u+"Seconds"](),u=a[u+"Milliseconds"](),n=e?0:a.getTimezoneOffset(),x={d:y,dd:q(y),ddd:c.i18n.dayNames[B],dddd:c.i18n.dayNames[B+7],m:d+1,mm:q(d+1),mmm:c.i18n.monthNames[d],mmmm:c.i18n.monthNames[d+
+12],yy:String(f).slice(2),yyyy:f,h:g%12||12,hh:q(g%12||12),H:g,HH:q(g),M:p,MM:q(p),s:l,ss:q(l),l:q(u,3),L:q(99<u?Math.round(u/10):u),t:12>g?"a":"p",tt:12>g?"am":"pm",T:12>g?"A":"P",TT:12>g?"AM":"PM",Z:e?"UTC":(String(a).match(m)||[""]).pop().replace(k,""),o:(0<n?"-":"+")+q(100*Math.floor(Math.abs(n)/60)+Math.abs(n)%60,4),S:["th","st","nd","rd"][3<y%10?0:(10!=y%100-y%10)*y%10]};return b.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(a){return a in x?x[a]:a.slice(1,
a.length-1)})};
Graph.prototype.createLayersDialog=function(){var a=document.createElement("div");a.style.position="absolute";for(var b=this.getModel(),e=b.getChildCount(b.root),c=0;c<e;c++)mxUtils.bind(this,function(c){var e=document.createElement("div");e.style.overflow="hidden";e.style.textOverflow="ellipsis";e.style.padding="2px";e.style.whiteSpace="nowrap";var m=document.createElement("input");m.style.display="inline-block";m.setAttribute("type","checkbox");b.isVisible(c)&&(m.setAttribute("checked","checked"),
m.defaultChecked=!0);e.appendChild(m);var u=this.convertValueToString(c)||mxResources.get("background")||"Background";e.setAttribute("title",u);mxUtils.write(e,u);a.appendChild(e);mxEvent.addListener(m,"click",function(){null!=m.getAttribute("checked")?m.removeAttribute("checked"):m.setAttribute("checked","checked");b.setVisible(c,m.checked)})})(b.getChildAt(b.root,c));return a};
@@ -2404,13 +2405,13 @@ u+=2:c==mxConstants.DIRECTION_SOUTH&&(u+=3);u=mxUtils.mod(u,4);0==u?e.y=m:1==u?e
(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){c=null!=c?c:!0;var d=this.getState(a);null!=d&&c&&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&&c&&this.graph.model.isEdge(d.cell)&&null!=d.style&&1!=d.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(d);return d};var e=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(a,b){return e.apply(this,arguments)||null!=a.routedPoints&&null!=b.routedPoints&&!mxUtils.equalPoints(b.routedPoints,a.routedPoints)};var c=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=function(a){c.apply(this,arguments);this.graph.model.isEdge(a.cell)&&
1!=a.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(a)};mxGraphView.prototype.updateLineJumps=function(a){var b=a.absolutePoints;if(Graph.lineJumpsEnabled){var d=null!=a.routedPoints,c=null;if(null!=b&&null!=this.validEdges&&"none"!==mxUtils.getValue(a.style,"jumpStyle","none")){for(var e=function(d,b,f){var e=new mxPoint(b,f);e.type=d;c.push(e);e=null!=a.routedPoints?a.routedPoints[c.length-1]:null;return null==e||e.type!=d||e.x!=b||e.y!=f},p=.5*this.scale,d=!1,c=[],l=0;l<b.length-1;l++){for(var n=
-b[l+1],k=b[l],x=[],t=b[l+2];l<b.length-2&&mxUtils.ptSegDistSq(k.x,k.y,t.x,t.y,n.x,n.y)<1*this.scale*this.scale;)n=t,l++,t=b[l+2];for(var d=e(0,k.x,k.y)||d,m=0;m<this.validEdges.length;m++){var z=this.validEdges[m],u=z.absolutePoints;if(null!=u&&mxUtils.intersects(a,z)&&"1"!=z.style.noJump)for(z=0;z<u.length-1;z++){for(var C=u[z+1],v=u[z],t=u[z+2];z<u.length-2&&mxUtils.ptSegDistSq(v.x,v.y,t.x,t.y,C.x,C.y)<1*this.scale*this.scale;)C=t,z++,t=u[z+2];t=mxUtils.intersection(k.x,k.y,n.x,n.y,v.x,v.y,C.x,
-C.y);if(null!=t&&(Math.abs(t.x-k.x)>p||Math.abs(t.y-k.y)>p)&&(Math.abs(t.x-n.x)>p||Math.abs(t.y-n.y)>p)&&(Math.abs(t.x-v.x)>p||Math.abs(t.y-v.y)>p)&&(Math.abs(t.x-C.x)>p||Math.abs(t.y-C.y)>p)){C=t.x-k.x;v=t.y-k.y;t={distSq:C*C+v*v,x:t.x,y:t.y};for(C=0;C<x.length;C++)if(x[C].distSq>t.distSq){x.splice(C,0,t);t=null;break}null==t||0!=x.length&&x[x.length-1].x===t.x&&x[x.length-1].y===t.y||x.push(t)}}}for(z=0;z<x.length;z++)d=e(1,x[z].x,x[z].y)||d}t=b[b.length-1];d=e(0,t.x,t.y)||d}a.routedPoints=c;return d}return!1};
+b[l+1],x=b[l],k=[],t=b[l+2];l<b.length-2&&mxUtils.ptSegDistSq(x.x,x.y,t.x,t.y,n.x,n.y)<1*this.scale*this.scale;)n=t,l++,t=b[l+2];for(var d=e(0,x.x,x.y)||d,m=0;m<this.validEdges.length;m++){var z=this.validEdges[m],u=z.absolutePoints;if(null!=u&&mxUtils.intersects(a,z)&&"1"!=z.style.noJump)for(z=0;z<u.length-1;z++){for(var C=u[z+1],v=u[z],t=u[z+2];z<u.length-2&&mxUtils.ptSegDistSq(v.x,v.y,t.x,t.y,C.x,C.y)<1*this.scale*this.scale;)C=t,z++,t=u[z+2];t=mxUtils.intersection(x.x,x.y,n.x,n.y,v.x,v.y,C.x,
+C.y);if(null!=t&&(Math.abs(t.x-x.x)>p||Math.abs(t.y-x.y)>p)&&(Math.abs(t.x-n.x)>p||Math.abs(t.y-n.y)>p)&&(Math.abs(t.x-v.x)>p||Math.abs(t.y-v.y)>p)&&(Math.abs(t.x-C.x)>p||Math.abs(t.y-C.y)>p)){C=t.x-x.x;v=t.y-x.y;t={distSq:C*C+v*v,x:t.x,y:t.y};for(C=0;C<k.length;C++)if(k[C].distSq>t.distSq){k.splice(C,0,t);t=null;break}null==t||0!=k.length&&k[k.length-1].x===t.x&&k[k.length-1].y===t.y||k.push(t)}}}for(z=0;z<k.length;z++)d=e(1,k[z].x,k[z].y)||d}t=b[b.length-1];d=e(0,t.x,t.y)||d}a.routedPoints=c;return d}return!1};
var m=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(a,b,d){this.routedPoints=null!=this.state?this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)m.apply(this,arguments);else{var c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,e=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,p=mxUtils.getValue(this.style,
-"jumpStyle","none"),l=!0,n=null,k=null,x=[],t=null;a.begin();for(var u=0;u<this.state.routedPoints.length;u++){var z=this.state.routedPoints[u],q=new mxPoint(z.x/this.scale,z.y/this.scale);0==u?q=b[0]:u==this.state.routedPoints.length-1&&(q=b[b.length-1]);var C=!1;if(null!=n&&1==z.type){var v=this.state.routedPoints[u+1],z=v.x/this.scale-q.x,v=v.y/this.scale-q.y,z=z*z+v*v;null==t&&(t=new mxPoint(q.x-n.x,q.y-n.y),k=Math.sqrt(t.x*t.x+t.y*t.y),0<k?(t.x=t.x*e/k,t.y=t.y*e/k):t=null);z>e*e&&0<k&&(z=n.x-
-q.x,v=n.y-q.y,z=z*z+v*v,z>e*e&&(C=new mxPoint(q.x-t.x,q.y-t.y),z=new mxPoint(q.x+t.x,q.y+t.y),x.push(C),this.addPoints(a,x,d,c,!1,null,l),x=0>Math.round(t.x)||0==Math.round(t.x)&&0>=Math.round(t.y)?1:-1,l=!1,"sharp"==p?(a.lineTo(C.x-t.y*x,C.y+t.x*x),a.lineTo(z.x-t.y*x,z.y+t.x*x),a.lineTo(z.x,z.y)):"arc"==p?(x*=1.3,a.curveTo(C.x-t.y*x,C.y+t.x*x,z.x-t.y*x,z.y+t.x*x,z.x,z.y)):(a.moveTo(z.x,z.y),l=!0),x=[z],C=!0))}else t=null;C||(x.push(q),n=q)}this.addPoints(a,x,d,c,!1,null,l);a.stroke()}};var k=mxGraphView.prototype.updateFloatingTerminalPoint;
-mxGraphView.prototype.updateFloatingTerminalPoint=function(a,b,d,c){if(null==b||null==a||"1"!=b.style.snapToPoint&&"1"!=a.style.snapToPoint)k.apply(this,arguments);else{b=this.getTerminalPort(a,b,c);var f=this.getNextPoint(a,d,c),e=this.graph.isOrthogonal(a),l=mxUtils.toRadians(Number(b.style[mxConstants.STYLE_ROTATION]||"0")),n=new mxPoint(b.getCenterX(),b.getCenterY());if(0!=l)var m=Math.cos(-l),x=Math.sin(-l),f=mxUtils.getRotatedPoint(f,m,x,n);m=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]||
-0);m+=parseFloat(a.style[c?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);f=this.getPerimeterPoint(b,f,0==l&&e,m);0!=l&&(m=Math.cos(l),x=Math.sin(l),f=mxUtils.getRotatedPoint(f,m,x,n));a.setAbsoluteTerminalPoint(this.snapToAnchorPoint(a,b,d,c,f),c)}};mxGraphView.prototype.snapToAnchorPoint=function(a,b,d,c,e){if(null!=b&&null!=a){a=this.graph.getAllConnectionConstraints(b);c=d=null;if(null!=a)for(var f=0;f<a.length;f++){var g=this.graph.getConnectionPoint(b,
+"jumpStyle","none"),l=!0,n=null,k=null,A=[],t=null;a.begin();for(var u=0;u<this.state.routedPoints.length;u++){var z=this.state.routedPoints[u],E=new mxPoint(z.x/this.scale,z.y/this.scale);0==u?E=b[0]:u==this.state.routedPoints.length-1&&(E=b[b.length-1]);var C=!1;if(null!=n&&1==z.type){var v=this.state.routedPoints[u+1],z=v.x/this.scale-E.x,v=v.y/this.scale-E.y,z=z*z+v*v;null==t&&(t=new mxPoint(E.x-n.x,E.y-n.y),k=Math.sqrt(t.x*t.x+t.y*t.y),0<k?(t.x=t.x*e/k,t.y=t.y*e/k):t=null);z>e*e&&0<k&&(z=n.x-
+E.x,v=n.y-E.y,z=z*z+v*v,z>e*e&&(C=new mxPoint(E.x-t.x,E.y-t.y),z=new mxPoint(E.x+t.x,E.y+t.y),A.push(C),this.addPoints(a,A,d,c,!1,null,l),A=0>Math.round(t.x)||0==Math.round(t.x)&&0>=Math.round(t.y)?1:-1,l=!1,"sharp"==p?(a.lineTo(C.x-t.y*A,C.y+t.x*A),a.lineTo(z.x-t.y*A,z.y+t.x*A),a.lineTo(z.x,z.y)):"arc"==p?(A*=1.3,a.curveTo(C.x-t.y*A,C.y+t.x*A,z.x-t.y*A,z.y+t.x*A,z.x,z.y)):(a.moveTo(z.x,z.y),l=!0),A=[z],C=!0))}else t=null;C||(A.push(E),n=E)}this.addPoints(a,A,d,c,!1,null,l);a.stroke()}};var k=mxGraphView.prototype.updateFloatingTerminalPoint;
+mxGraphView.prototype.updateFloatingTerminalPoint=function(a,b,d,c){if(null==b||null==a||"1"!=b.style.snapToPoint&&"1"!=a.style.snapToPoint)k.apply(this,arguments);else{b=this.getTerminalPort(a,b,c);var f=this.getNextPoint(a,d,c),e=this.graph.isOrthogonal(a),l=mxUtils.toRadians(Number(b.style[mxConstants.STYLE_ROTATION]||"0")),n=new mxPoint(b.getCenterX(),b.getCenterY());if(0!=l)var x=Math.cos(-l),m=Math.sin(-l),f=mxUtils.getRotatedPoint(f,x,m,n);x=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]||
+0);x+=parseFloat(a.style[c?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);f=this.getPerimeterPoint(b,f,0==l&&e,x);0!=l&&(x=Math.cos(l),m=Math.sin(l),f=mxUtils.getRotatedPoint(f,x,m,n));a.setAbsoluteTerminalPoint(this.snapToAnchorPoint(a,b,d,c,f),c)}};mxGraphView.prototype.snapToAnchorPoint=function(a,b,d,c,e){if(null!=b&&null!=a){a=this.graph.getAllConnectionConstraints(b);c=d=null;if(null!=a)for(var f=0;f<a.length;f++){var g=this.graph.getConnectionPoint(b,
a[f]);if(null!=g){var n=(g.x-e.x)*(g.x-e.x)+(g.y-e.y)*(g.y-e.y);if(null==c||n<c)d=g,c=n}}null!=d&&(e=d)}return e};var q=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(a,b,d){var c=q.apply(this,arguments);"1"==a.getAttribute("placeholders")&&null!=d.state&&(c=d.state.view.graph.replacePlaceholders(d.state.cell,c));return c};var u=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(a){if(null!=a.style&&"undefined"!==typeof pako){var b=
mxUtils.getValue(a.style,mxConstants.STYLE_SHAPE,null);if(null!=b&&"string"===typeof b&&"stencil("==b.substring(0,8))try{var d=b.substring(8,b.length-1),c=mxUtils.parseXml(Graph.decompress(d));return new mxShape(new mxStencil(c.documentElement))}catch(g){null!=window.console&&console.log("Error in shape: "+g)}}return u.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];
mxStencilRegistry.getStencil=function(a){var b=mxStencilRegistry.stencils[a];if(null==b&&null==mxCellRenderer.defaultShapes[a]&&mxStencilRegistry.dynamicLoading){var e=mxStencilRegistry.getBasenameForStencil(a);if(null!=e){b=mxStencilRegistry.libraries[e];if(null!=b){if(null==mxStencilRegistry.packages[e]){for(var c=0;c<b.length;c++){var m=b[c];if(".xml"==m.toLowerCase().substring(m.length-4,m.length))mxStencilRegistry.loadStencilSet(m,null);else if(".js"==m.toLowerCase().substring(m.length-3,m.length))try{if(mxStencilRegistry.allowEval){var k=
@@ -2429,17 +2430,17 @@ orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=function(){var a="edg
(a+="jumpStyle="+this.currentEdgeStyle.jumpStyle+";");null!=this.currentEdgeStyle.jumpSize&&(a+="jumpSize="+this.currentEdgeStyle.jumpSize+";");null!=this.currentEdgeStyle.orthogonalLoop?a+="orthogonalLoop="+this.currentEdgeStyle.orthogonalLoop+";":null!=Graph.prototype.defaultEdgeStyle.orthogonalLoop&&(a+="orthogonalLoop="+Graph.prototype.defaultEdgeStyle.orthogonalLoop+";");null!=this.currentEdgeStyle.jettySize?a+="jettySize="+this.currentEdgeStyle.jettySize+";":null!=Graph.prototype.defaultEdgeStyle.jettySize&&
(a+="jettySize="+Graph.prototype.defaultEdgeStyle.jettySize+";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(a+="elbow="+this.currentEdgeStyle.elbow+";");return a=null!=this.currentEdgeStyle.html?a+("html="+this.currentEdgeStyle.html+";"):a+"html=1;"};Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var a=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+
"/default.xml").getDocumentElement():null;null!=a&&(new mxCodec(a.ownerDocument)).decode(a,this.getStylesheet())};Graph.prototype.createCellLookup=function(a,d){d=null!=d?d:{};for(var b=0;b<a.length;b++){var c=a[b];d[mxObjectIdentity.get(c)]=c.getId();for(var f=this.model.getChildCount(c),e=0;e<f;e++)this.createCellLookup([this.model.getChildAt(c,e)],d)}return d};Graph.prototype.createCellMapping=function(a,d,b){b=null!=b?b:{};for(var c in a){var f=d[c];null==b[f]&&(b[f]=a[c].getId()||"")}return b};
-Graph.prototype.importGraphModel=function(a,d,b,c){d=null!=d?d:0;b=null!=b?b:0;var f=new mxCodec(a.ownerDocument),e=new mxGraphModel;f.decode(a,e);a=[];var f={},g={},l=e.getChildren(this.cloneCell(e.root,this.isCloneInvalidEdges(),f));if(null!=l){var n=this.createCellLookup([e.root]),l=l.slice();this.model.beginUpdate();try{if(1!=l.length||this.isCellLocked(this.getDefaultParent()))for(e=0;e<l.length;e++){var p=this.model.getChildren(this.moveCells([l[e]],d,b,!1,this.model.getRoot())[0]);null!=p&&
-(a=a.concat(p))}else a=this.moveCells(e.getChildren(l[0]),d,b,!1,this.getDefaultParent()),g[e.getChildAt(e.root,0).getId()]=this.getDefaultParent().getId();if(null!=a&&(this.createCellMapping(f,n,g),this.updateCustomLinks(g,a),c)){this.isGridEnabled()&&(d=this.snap(d),b=this.snap(b));var v=this.getBoundingBoxFromGeometry(a,!0);null!=v&&this.moveCells(a,d-v.x,b-v.y)}}finally{this.model.endUpdate()}}return a};Graph.prototype.encodeCells=function(a){for(var d={},b=this.cloneCells(a,null,d),c=new mxDictionary,
+Graph.prototype.importGraphModel=function(a,d,b,c){d=null!=d?d:0;b=null!=b?b:0;var f=new mxCodec(a.ownerDocument),e=new mxGraphModel;f.decode(a,e);a=[];var f={},g={},l=e.getChildren(this.cloneCell(e.root,this.isCloneInvalidEdges(),f));if(null!=l){var n=this.createCellLookup([e.root]),l=l.slice();this.model.beginUpdate();try{if(1!=l.length||this.isCellLocked(this.getDefaultParent()))for(e=0;e<l.length;e++){var v=this.model.getChildren(this.moveCells([l[e]],d,b,!1,this.model.getRoot())[0]);null!=v&&
+(a=a.concat(v))}else a=this.moveCells(e.getChildren(l[0]),d,b,!1,this.getDefaultParent()),g[e.getChildAt(e.root,0).getId()]=this.getDefaultParent().getId();if(null!=a&&(this.createCellMapping(f,n,g),this.updateCustomLinks(g,a),c)){this.isGridEnabled()&&(d=this.snap(d),b=this.snap(b));var p=this.getBoundingBoxFromGeometry(a,!0);null!=p&&this.moveCells(a,d-p.x,b-p.y)}}finally{this.model.endUpdate()}}return a};Graph.prototype.encodeCells=function(a){for(var d={},b=this.cloneCells(a,null,d),c=new mxDictionary,
f=0;f<a.length;f++)c.put(a[f],!0);for(f=0;f<b.length;f++){var e=this.view.getState(a[f]);if(null!=e){var g=this.getCellGeometry(b[f]);null==g||!g.relative||this.model.isEdge(a[f])||c.get(this.model.getParent(a[f]))||(g.relative=!1,g.x=e.x/e.view.scale-e.view.translate.x,g.y=e.y/e.view.scale-e.view.translate.y)}}c=new mxCodec;e=new mxGraphModel;g=e.getChildAt(e.getRoot(),0);for(f=0;f<b.length;f++)e.add(g,b[f]);this.updateCustomLinks(this.createCellMapping(d,this.createCellLookup(a)),b);return c.encode(e)};
var k=Graph.prototype.moveCells;Graph.prototype.moveCells=function(a,d,b,c,f,e,g){g=null!=g?g:{};var l=k.apply(this,arguments);c&&this.updateCustomLinks(this.createCellMapping(g,this.createCellLookup(a)),l);return l};Graph.prototype.updateCustomLinks=function(a,d){for(var b=0;b<d.length;b++)null!=d[b]&&this.updateCustomLinksForCell(a,d[b])};Graph.prototype.updateCustomLinksForCell=function(a,d){};Graph.prototype.getAllConnectionConstraints=function(a,d){if(null!=a){var b=mxUtils.getValue(a.style,
"points",null);if(null!=b){var c=[];try{for(var f=JSON.parse(b),b=0;b<f.length;b++){var e=f[b];c.push(new mxConnectionConstraint(new mxPoint(e[0],e[1]),2<e.length?"0"!=e[2]:!0,null,3<e.length?e[3]:0,4<e.length?e[4]:0))}}catch(na){}return c}if(null!=a.shape&&null!=a.shape.bounds){e=a.shape.direction;f=a.shape.bounds;b=a.shape.scale;c=f.width/b;f=f.height/b;if(e==mxConstants.DIRECTION_NORTH||e==mxConstants.DIRECTION_SOUTH)e=c,c=f,f=e;b=a.shape.getConstraints(a.style,c,f);if(null!=b)return b;if(null!=
a.shape.stencil&&null!=a.shape.stencil.constraints)return a.shape.stencil.constraints;if(null!=a.shape.constraints)return a.shape.constraints}}return null};Graph.prototype.flipEdge=function(a){if(null!=a){var d=this.getCurrentCellStyle(a),d=mxUtils.getValue(d,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;this.setCellStyles(mxConstants.STYLE_ELBOW,d,[a])}};Graph.prototype.isValidRoot=function(a){for(var d=
this.model.getChildCount(a),b=0,c=0;c<d;c++){var f=this.model.getChildAt(a,c);this.model.isVertex(f)&&(f=this.getCellGeometry(f),null==f||f.relative||b++)}return 0<b||this.isContainer(a)};Graph.prototype.isValidDropTarget=function(a){var d=this.getCurrentCellStyle(a);return("1"!=mxUtils.getValue(d,"part","0")||this.isContainer(a))&&"0"!=mxUtils.getValue(d,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(a))};Graph.prototype.createGroupCell=function(){var a=
mxGraph.prototype.createGroupCell.apply(this,arguments);a.setStyle("group");return a};Graph.prototype.isExtendParentsOnAdd=function(a){var d=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(d&&null!=a&&null!=this.layoutManager){var b=this.model.getParent(a);null!=b&&(b=this.layoutManager.getLayout(b),null!=b&&b.constructor==mxStackLayout&&(d=!1))}return d};Graph.prototype.getPreferredSizeForCell=function(a){var d=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=
-d&&(d.width+=10,d.height+=4,this.gridEnabled&&(d.width=this.snap(d.width),d.height=this.snap(d.height)));return d};Graph.prototype.turnShapes=function(a,d){var b=this.getModel(),c=[];b.beginUpdate();try{for(var f=0;f<a.length;f++){var e=a[f];if(b.isEdge(e)){var g=b.getTerminal(e,!0),l=b.getTerminal(e,!1);b.setTerminal(e,l,!0);b.setTerminal(e,g,!1);var n=b.getGeometry(e);if(null!=n){n=n.clone();null!=n.points&&n.points.reverse();var p=n.getTerminalPoint(!0),v=n.getTerminalPoint(!1);n.setTerminalPoint(p,
-!1);n.setTerminalPoint(v,!0);b.setGeometry(e,n);var t=this.view.getState(e),k=this.view.getState(g),m=this.view.getState(l);if(null!=t){var x=null!=k?this.getConnectionConstraint(t,k,!0):null,D=null!=m?this.getConnectionConstraint(t,m,!1):null;this.setConnectionConstraint(e,g,!0,D);this.setConnectionConstraint(e,l,!1,x)}c.push(e)}}else if(b.isVertex(e)&&(n=this.getCellGeometry(e),null!=n)){n=n.clone();n.x+=n.width/2-n.height/2;n.y+=n.height/2-n.width/2;var L=n.width;n.width=n.height;n.height=L;b.setGeometry(e,
-n);var z=this.view.getState(e);if(null!=z){var A=[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],O=mxUtils.getValue(z.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,A[mxUtils.mod(mxUtils.indexOf(A,O)+(d?-1:1),A.length)],[e])}c.push(e)}}}finally{b.endUpdate()}return c};Graph.prototype.stencilHasPlaceholders=function(a){if(null!=a&&null!=a.fgNode)for(a=a.fgNode.firstChild;null!=
+d&&(d.width+=10,d.height+=4,this.gridEnabled&&(d.width=this.snap(d.width),d.height=this.snap(d.height)));return d};Graph.prototype.turnShapes=function(a,d){var b=this.getModel(),c=[];b.beginUpdate();try{for(var f=0;f<a.length;f++){var e=a[f];if(b.isEdge(e)){var g=b.getTerminal(e,!0),l=b.getTerminal(e,!1);b.setTerminal(e,l,!0);b.setTerminal(e,g,!1);var n=b.getGeometry(e);if(null!=n){n=n.clone();null!=n.points&&n.points.reverse();var v=n.getTerminalPoint(!0),p=n.getTerminalPoint(!1);n.setTerminalPoint(v,
+!1);n.setTerminalPoint(p,!0);b.setGeometry(e,n);var t=this.view.getState(e),k=this.view.getState(g),m=this.view.getState(l);if(null!=t){var x=null!=k?this.getConnectionConstraint(t,k,!0):null,D=null!=m?this.getConnectionConstraint(t,m,!1):null;this.setConnectionConstraint(e,g,!0,D);this.setConnectionConstraint(e,l,!1,x)}c.push(e)}}else if(b.isVertex(e)&&(n=this.getCellGeometry(e),null!=n)){n=n.clone();n.x+=n.width/2-n.height/2;n.y+=n.height/2-n.width/2;var A=n.width;n.width=n.height;n.height=A;b.setGeometry(e,
+n);var I=this.view.getState(e);if(null!=I){var z=[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],O=mxUtils.getValue(I.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,z[mxUtils.mod(mxUtils.indexOf(z,O)+(d?-1:1),z.length)],[e])}c.push(e)}}}finally{b.endUpdate()}return c};Graph.prototype.stencilHasPlaceholders=function(a){if(null!=a&&null!=a.fgNode)for(a=a.fgNode.firstChild;null!=
a;){if("text"==a.nodeName&&"1"==a.getAttribute("placeholders"))return!0;a=a.nextSibling}return!1};Graph.prototype.processChange=function(a){mxGraph.prototype.processChange.apply(this,arguments);a instanceof mxValueChange&&null!=a.cell&&null!=a.cell.value&&"object"==typeof a.cell.value&&this.invalidateDescendantsWithPlaceholders(a.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(a){a=this.model.getDescendants(a);if(0<a.length)for(var d=0;d<a.length;d++){var b=this.view.getState(a[d]);
null!=b&&null!=b.shape&&null!=b.shape.stencil&&this.stencilHasPlaceholders(b.shape.stencil)?this.removeStateForCell(a[d]):this.isReplacePlaceholders(a[d])&&this.view.invalidate(a[d],!1,!1)}};Graph.prototype.replaceElement=function(a,d){for(var b=a.ownerDocument.createElement(null!=d?d:"span"),c=Array.prototype.slice.call(a.attributes);attr=c.pop();)b.setAttribute(attr.nodeName,attr.nodeValue);b.innerHTML=a.innerHTML;a.parentNode.replaceChild(b,a)};Graph.prototype.processElements=function(a,d){if(null!=
a)for(var b=a.getElementsByTagName("*"),c=0;c<b.length;c++)d(b[c])};Graph.prototype.updateLabelElements=function(a,d,b){a=null!=a?a:this.getSelectionCells();for(var c=document.createElement("div"),f=0;f<a.length;f++)if(this.isHtmlLabel(a[f])){var e=this.convertValueToString(a[f]);if(null!=e&&0<e.length){c.innerHTML=e;for(var g=c.getElementsByTagName(null!=b?b:"*"),l=0;l<g.length;l++)d(g[l]);c.innerHTML!=e&&this.cellLabelChanged(a[f],c.innerHTML)}}};Graph.prototype.cellLabelChanged=function(a,d,b){d=
@@ -2460,17 +2461,17 @@ g.getCellAt(a.getGraphX(),a.getGraphY(),null,null,null,function(a,d,b){return nu
!g.intersects(this.currentState,d.getGraphX(),d.getGraphY()))&&this.updateCurrentState(d))}},mouseUp:function(a,c){for(var f=c.getSource(),l=c.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==c.sourceState||!c.isSource(c.sourceState.control))&&((mxEvent.isLeftMouseButton(l)||mxEvent.isMiddleMouseButton(l))&&!mxEvent.isPopupTrigger(l)||mxEvent.isTouchEvent(l))&&(null!=
this.currentLink?(f=g.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&f||null==d||d(l,this.currentLink),mxEvent.isConsumed(l)||(l=mxEvent.isMiddleMouseButton(l)?"_blank":f?g.linkTarget:"_top",g.openLink(this.currentLink,l),c.consume())):null!=b&&!c.isConsumed()&&Math.abs(this.scrollLeft-g.container.scrollLeft)<e&&Math.abs(this.scrollTop-g.container.scrollTop)<e&&Math.abs(this.startX-c.getGraphX())<e&&Math.abs(this.startY-c.getGraphY())<e&&b(c.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(l);mxEvent.addListener(document,"mouseleave",function(a){l.clear()})};Graph.prototype.duplicateCells=function(a,
-d){a=null!=a?a:this.getSelectionCells();d=null!=d?d:!0;a=this.model.getTopmostCells(a);var b=this.getModel(),c=this.gridSize,f=[];b.beginUpdate();try{for(var e=this.cloneCells(a,!1,null,!0),g=0;g<a.length;g++){var l=b.getParent(a[g]),n=this.moveCells([e[g]],c,c,!1)[0];f.push(n);if(d)b.add(l,e[g]);else{var p=l.getIndex(a[g]);b.add(l,e[g],p+1)}}}finally{b.endUpdate()}return f};Graph.prototype.insertImage=function(a,d,b){if(null!=a&&null!=this.cellEditor.textarea){for(var c=this.cellEditor.textarea.getElementsByTagName("img"),
+d){a=null!=a?a:this.getSelectionCells();d=null!=d?d:!0;a=this.model.getTopmostCells(a);var b=this.getModel(),c=this.gridSize,f=[];b.beginUpdate();try{for(var e=this.cloneCells(a,!1,null,!0),g=0;g<a.length;g++){var l=b.getParent(a[g]),n=this.moveCells([e[g]],c,c,!1)[0];f.push(n);if(d)b.add(l,e[g]);else{var v=l.getIndex(a[g]);b.add(l,e[g],v+1)}}}finally{b.endUpdate()}return f};Graph.prototype.insertImage=function(a,d,b){if(null!=a&&null!=this.cellEditor.textarea){for(var c=this.cellEditor.textarea.getElementsByTagName("img"),
f=[],e=0;e<c.length;e++)f.push(c[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",d);a[e].setAttribute("height",b);break}}};Graph.prototype.insertLink=function(a){if(null!=this.cellEditor.textarea)if(0==a.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var d=this.cellEditor.textarea.getElementsByTagName("a"),b=[],c=0;c<d.length;c++)b.push(d[c]);
document.execCommand("createlink",!1,mxUtils.trim(a));d=this.cellEditor.textarea.getElementsByTagName("a");if(d.length==b.length+1)for(c=d.length-1;0<=c;c--)if(d[c]!=b[c-1]){for(d=d[c].getElementsByTagName("a");0<d.length;){for(b=d[0].parentNode;null!=d[0].firstChild;)b.insertBefore(d[0].firstChild,d[0]);b.removeChild(d[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(a))};Graph.prototype.isCellResizable=function(a){var d=mxGraph.prototype.isCellResizable.apply(this,arguments),b=
this.getCurrentCellStyle(a);return!this.isTableCell(a)&&!this.isTableRow(a)&&(d||"0"!=mxUtils.getValue(b,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==b[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(a,d){null==d&&(d=this.getSelectionCells());if(null!=d&&1<d.length){for(var b=[],c=null,f=null,e=0;e<d.length;e++)if(this.getModel().isVertex(d[e])){var g=this.view.getState(d[e]);if(null!=g){var l=a?g.getCenterX():g.getCenterY(),c=null!=c?Math.max(c,l):l,f=null!=f?Math.min(f,l):
-l;b.push(g)}}if(2<b.length){b.sort(function(d,b){return a?d.x-b.x:d.y-b.y});g=this.view.translate;l=this.view.scale;f=f/l-(a?g.x:g.y);c=c/l-(a?g.x:g.y);this.getModel().beginUpdate();try{for(var n=(c-f)/(b.length-1),c=f,e=1;e<b.length-1;e++){var p=this.view.getState(this.model.getParent(b[e].cell)),v=this.getCellGeometry(b[e].cell),c=c+n;null!=v&&null!=p&&(v=v.clone(),a?v.x=Math.round(c-v.width/2)-p.origin.x:v.y=Math.round(c-v.height/2)-p.origin.y,this.getModel().setGeometry(b[e].cell,v))}}finally{this.getModel().endUpdate()}}}return d};
+l;b.push(g)}}if(2<b.length){b.sort(function(d,b){return a?d.x-b.x:d.y-b.y});g=this.view.translate;l=this.view.scale;f=f/l-(a?g.x:g.y);c=c/l-(a?g.x:g.y);this.getModel().beginUpdate();try{for(var n=(c-f)/(b.length-1),c=f,e=1;e<b.length-1;e++){var v=this.view.getState(this.model.getParent(b[e].cell)),p=this.getCellGeometry(b[e].cell),c=c+n;null!=p&&null!=v&&(p=p.clone(),a?p.x=Math.round(c-p.width/2)-v.origin.x:p.y=Math.round(c-p.height/2)-v.origin.y,this.getModel().setGeometry(b[e].cell,p))}}finally{this.getModel().endUpdate()}}}return d};
Graph.prototype.isCloneEvent=function(a){return mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxEvent.isControlDown(a)};Graph.prototype.createSvgImageExport=function(){var a=new mxImageExport;a.getLinkForCellState=mxUtils.bind(this,function(a,d){return this.getLinkForCell(a.cell)});return a};Graph.prototype.getSvg=function(a,d,b,c,f,e,g,l,n,v){var p=this.useCssTransforms;p&&(this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange());try{d=null!=d?d:1;b=null!=b?b:0;f=null!=f?f:!0;e=null!=e?e:
!0;g=null!=g?g:!0;var t=e||c?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==t)throw Error(mxResources.get("drawingEmpty"));var k=this.view.scale,m=mxUtils.createXmlDocument(),x=null!=m.createElementNS?m.createElementNS(mxConstants.NS_SVG,"svg"):m.createElement("svg");null!=a&&(null!=x.style?x.style.backgroundColor=a:x.setAttribute("style","background-color:"+a));null==m.createElementNS?(x.setAttribute("xmlns",mxConstants.NS_SVG),x.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):
-x.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=d/k;var D=Math.max(1,Math.ceil(t.width*a)+2*b)+(v?5:0),L=Math.max(1,Math.ceil(t.height*a)+2*b)+(v?5:0);x.setAttribute("version","1.1");x.setAttribute("width",D+"px");x.setAttribute("height",L+"px");x.setAttribute("viewBox",(f?"-0.5 -0.5":"0 0")+" "+D+" "+L);m.appendChild(x);var z=null!=m.createElementNS?m.createElementNS(mxConstants.NS_SVG,"g"):m.createElement("g");x.appendChild(z);var A=this.createSvgCanvas(z);
-A.foOffset=f?-.5:0;A.textOffset=f?-.5:0;A.imageOffset=f?-.5:0;A.translate(Math.floor((b/d-t.x)/k),Math.floor((b/d-t.y)/k));var H=document.createElement("div"),u=A.getAlternateText;A.getAlternateText=function(a,d,b,c,f,e,g,l,n,v,p,t,k){if(null!=e&&0<this.state.fontSize)try{mxUtils.isNode(e)?e=e.innerText:(H.innerHTML=e,e=mxUtils.extractTextWithWhitespace(H.childNodes));for(var m=Math.ceil(2*c/this.state.fontSize),x=[],D=0,ha=0;(0==m||D<m)&&ha<e.length;){var Na=e.charCodeAt(ha);if(10==Na||13==Na){if(0<
-D)break}else x.push(e.charAt(ha)),255>Na&&D++;ha++}x.length<e.length&&1<e.length-x.length&&(e=mxUtils.trim(x.join(""))+"...");return e}catch(Ta){return u.apply(this,arguments)}else return u.apply(this,arguments)};var J=this.backgroundImage;if(null!=J){d=k/d;var C=this.view.translate,M=new mxRectangle(C.x*d,C.y*d,J.width*d,J.height*d);mxUtils.intersects(t,M)&&A.image(C.x,C.y,J.width,J.height,J.src,!0)}A.scale(a);A.textEnabled=g;l=null!=l?l:this.createSvgImageExport();var q=l.drawCellState,N=l.getLinkForCellState;
-l.getLinkForCellState=function(a,d){var b=N.apply(this,arguments);return null==b||a.view.graph.isCustomLink(b)?null:b};l.drawCellState=function(a,d){for(var b=a.view.graph,c=b.isCellSelected(a.cell),f=b.model.getParent(a.cell);!e&&!c&&null!=f;)c=b.isCellSelected(f),f=b.model.getParent(f);(e||c)&&q.apply(this,arguments)};l.drawState(this.getView().getState(this.model.root),A);this.updateSvgLinks(x,n,!0);this.addForeignObjectWarning(A,x);return x}finally{p&&(this.useCssTransforms=!0,this.view.revalidate(),
+x.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=d/k;var D=Math.max(1,Math.ceil(t.width*a)+2*b)+(v?5:0),A=Math.max(1,Math.ceil(t.height*a)+2*b)+(v?5:0);x.setAttribute("version","1.1");x.setAttribute("width",D+"px");x.setAttribute("height",A+"px");x.setAttribute("viewBox",(f?"-0.5 -0.5":"0 0")+" "+D+" "+A);m.appendChild(x);var I=null!=m.createElementNS?m.createElementNS(mxConstants.NS_SVG,"g"):m.createElement("g");x.appendChild(I);var z=this.createSvgCanvas(I);
+z.foOffset=f?-.5:0;z.textOffset=f?-.5:0;z.imageOffset=f?-.5:0;z.translate(Math.floor((b/d-t.x)/k),Math.floor((b/d-t.y)/k));var H=document.createElement("div"),u=z.getAlternateText;z.getAlternateText=function(a,d,b,c,f,e,g,l,n,v,p,t,k){if(null!=e&&0<this.state.fontSize)try{mxUtils.isNode(e)?e=e.innerText:(H.innerHTML=e,e=mxUtils.extractTextWithWhitespace(H.childNodes));for(var x=Math.ceil(2*c/this.state.fontSize),m=[],D=0,ha=0;(0==x||D<x)&&ha<e.length;){var Na=e.charCodeAt(ha);if(10==Na||13==Na){if(0<
+D)break}else m.push(e.charAt(ha)),255>Na&&D++;ha++}m.length<e.length&&1<e.length-m.length&&(e=mxUtils.trim(m.join(""))+"...");return e}catch(Ta){return u.apply(this,arguments)}else return u.apply(this,arguments)};var K=this.backgroundImage;if(null!=K){d=k/d;var C=this.view.translate,M=new mxRectangle(C.x*d,C.y*d,K.width*d,K.height*d);mxUtils.intersects(t,M)&&z.image(C.x,C.y,K.width,K.height,K.src,!0)}z.scale(a);z.textEnabled=g;l=null!=l?l:this.createSvgImageExport();var E=l.drawCellState,q=l.getLinkForCellState;
+l.getLinkForCellState=function(a,d){var b=q.apply(this,arguments);return null==b||a.view.graph.isCustomLink(b)?null:b};l.drawCellState=function(a,d){for(var b=a.view.graph,c=b.isCellSelected(a.cell),f=b.model.getParent(a.cell);!e&&!c&&null!=f;)c=b.isCellSelected(f),f=b.model.getParent(f);(e||c)&&E.apply(this,arguments)};l.drawState(this.getView().getState(this.model.root),z);this.updateSvgLinks(x,n,!0);this.addForeignObjectWarning(z,x);return x}finally{p&&(this.useCssTransforms=!0,this.view.revalidate(),
this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(a,d){if(0<d.getElementsByTagName("foreignObject").length){var b=a.createElement("switch"),c=a.createElement("g");c.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var f=a.createElement("a");f.setAttribute("transform","translate(0,-5)");null==f.setAttributeNS||d.ownerDocument!=document&&null==document.documentMode?(f.setAttribute("xlink:href",Graph.foreignObjectWarningLink),f.setAttribute("target",
"_blank")):(f.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),f.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));var e=a.createElement("text");e.setAttribute("text-anchor","middle");e.setAttribute("font-size","10px");e.setAttribute("x","50%");e.setAttribute("y","100%");mxUtils.write(e,Graph.foreignObjectWarningText);b.appendChild(c);f.appendChild(e);b.appendChild(f);d.appendChild(b)}};Graph.prototype.updateSvgLinks=function(a,d,b){a=a.getElementsByTagName("a");
for(var c=0;c<a.length;c++){var f=a[c].getAttribute("href");null==f&&(f=a[c].getAttribute("xlink:href"));null!=f&&(null!=d&&/^https?:\/\//.test(f)?a[c].setAttribute("target",d):b&&this.isCustomLink(f)&&a[c].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(a){a=new mxSvgCanvas2D(a);a.pointerEvents=!0;return a};Graph.prototype.getSelectedElement=function(){var a=null;if(window.getSelection){var d=window.getSelection();d.getRangeAt&&d.rangeCount&&(a=d.getRangeAt(0).commonAncestorContainer)}else document.selection&&
@@ -2493,14 +2494,14 @@ document.selection.createRange)return document.selection.createRange();return nu
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),c=this.graph.getCellGeometry(a);this.graph.getModel().isEdge(b)&&null!=c&&c.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 B=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(a){function d(a,b){b.originalNode=a;a=a.firstChild;for(var c=b.firstChild;null!=a&&null!=c;)d(a,c),a=a.nextSibling,c=c.nextSibling;return b}function b(a,d){if(null!=a)if(d.originalNode!=a)c(a);else for(a=a.firstChild,d=d.firstChild;null!=a;){var f=
a.nextSibling;null==d?c(a):(b(a,d),d=d.nextSibling);a=f}}function c(a){for(var d=a.firstChild;null!=d;){var b=d.nextSibling;c(d);d=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)}B.apply(this,arguments);mxClient.IS_QUIRKS||7===document.documentMode||8===document.documentMode||mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(a){var c=d(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,function(){null!=this.textarea&&(0<=this.textarea.innerHTML.indexOf("<o:OfficeDocumentSettings>")||0<=this.textarea.innerHTML.indexOf("\x3c!--[if !mso]>"))&&b(this.textarea,c)}),0)}))};mxCellEditor.prototype.toggleViewMode=
-function(){var a=this.graph.view.getState(this.editingCell);if(null!=a){var d=null!=a&&"0"!=mxUtils.getValue(a.style,"nl2Br","1"),b=this.saveSelection();if(this.codeViewMode){n=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<n.length&&"\n"==n.charAt(n.length-1)&&(n=n.substring(0,n.length-1));n=this.graph.sanitizeHtml(d?n.replace(/\n/g,"<br/>"):n,!0);this.textarea.className="mxCellEditor geContentEditable";var c=mxUtils.getValue(a.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE),
-d=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,l=[];(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&l.push("underline");
-(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&l.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(c*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(c)+"px";this.textarea.style.textDecoration=l.join(" ");this.textarea.style.fontWeight=e?"bold":"normal";this.textarea.style.fontStyle=g?"italic":"";this.textarea.style.fontFamily=d;this.textarea.style.textAlign=
-f;this.textarea.style.padding="0px";this.textarea.innerHTML!=n&&(this.textarea.innerHTML=n,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 n=mxUtils.htmlEntities(this.textarea.innerHTML);mxClient.IS_QUIRKS||8==document.documentMode||(n=mxUtils.replaceTrailingNewlines(n,
-"<div><br></div>"));n=this.graph.sanitizeHtml(d?n.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):n,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var c=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(c*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(c)+"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!=n&&(this.textarea.innerHTML=n);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=b;this.resize()}};var d=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(a,b){if(null!=this.textarea)if(a=this.graph.getView().getState(this.editingCell),this.codeViewMode&&
-null!=a){var c=a.view.scale;this.bounds=mxRectangle.fromRectangle(a);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*c;this.bounds.height=60*c;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=
+a.removeAttribute("border"))):a.parentNode.removeChild(a)}B.apply(this,arguments);mxClient.IS_QUIRKS||7===document.documentMode||8===document.documentMode||mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(a){var c=d(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,function(){null!=this.textarea&&(0<=this.textarea.innerHTML.indexOf("<o:OfficeDocumentSettings>")||0<=this.textarea.innerHTML.indexOf("\x3c!--[if !mso]>")?b(this.textarea,c):Graph.removePasteFormatting(this.textarea))}),
+0)}))};mxCellEditor.prototype.toggleViewMode=function(){var a=this.graph.view.getState(this.editingCell);if(null!=a){var d=null!=a&&"0"!=mxUtils.getValue(a.style,"nl2Br","1"),b=this.saveSelection();if(this.codeViewMode){n=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<n.length&&"\n"==n.charAt(n.length-1)&&(n=n.substring(0,n.length-1));n=this.graph.sanitizeHtml(d?n.replace(/\n/g,"<br/>"):n,!0);this.textarea.className="mxCellEditor geContentEditable";var c=mxUtils.getValue(a.style,mxConstants.STYLE_FONTSIZE,
+mxConstants.DEFAULT_FONTSIZE),d=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,l=[];(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&
+l.push("underline");(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&l.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(c*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(c)+"px";this.textarea.style.textDecoration=l.join(" ");this.textarea.style.fontWeight=e?"bold":"normal";this.textarea.style.fontStyle=g?"italic":"";this.textarea.style.fontFamily=
+d;this.textarea.style.textAlign=f;this.textarea.style.padding="0px";this.textarea.innerHTML!=n&&(this.textarea.innerHTML=n,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 n=mxUtils.htmlEntities(this.textarea.innerHTML);mxClient.IS_QUIRKS||8==document.documentMode||
+(n=mxUtils.replaceTrailingNewlines(n,"<div><br></div>"));n=this.graph.sanitizeHtml(d?n.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):n,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var c=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(c*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(c)+"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!=n&&(this.textarea.innerHTML=n);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=b;this.resize()}};var d=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(a,b){if(null!=this.textarea)if(a=this.graph.getView().getState(this.editingCell),
+this.codeViewMode&&null!=a){var c=a.view.scale;this.bounds=mxRectangle.fromRectangle(a);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*c;this.bounds.height=60*c;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)/c)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/c)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/c)+(this.textarea.offsetHeight-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*c);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/c)+(this.textarea.offsetWidth-
this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*c);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=c:mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+c+","+c+")")}else this.textarea.style.height="",this.textarea.style.overflow="",d.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=
function(a,d){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var b=this.graph.getEditingValue(a.cell,d);"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 d=this.graph.sanitizeHtml(this.textarea.innerHTML,
@@ -2511,9 +2512,9 @@ function(a){return a?b(a,this.unit):a};mxGraphHandler.prototype.updateHint=funct
Math.round((this.pBounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.pBounds.y+this.currentDy+this.pBounds.height+Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(this.hint.parentNode.removeChild(this.hint),this.hint=null)};var l=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function a(a){b.get(a)||(b.put(a,!0),f.push(a))}for(var d=l.apply(this,arguments),b=
new mxDictionary,c=this.graph.model,f=[],e=0;e<d.length;e++){var g=d[e];this.graph.isTableCell(g)?a(c.getParent(c.getParent(g))):this.graph.isTableRow(g)&&a(c.getParent(g));a(g)}return f};var n=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(a){var d=n.apply(this,arguments);d.stroke="#C0C0C0";d.strokewidth=1;return d};mxVertexHandler.prototype.getSelectionStrokeWidth=function(a){return!this.graph.isCellResizable(this.state.cell)||
this.graph.isTable(this.state.cell)&&this.graph.isCellSelected(this.state.cell)||this.graph.isTableRow(this.state.cell)||this.graph.isTableCell(this.state.cell)?2:1};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=function(){var a=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+a.x/2,this.bounds.y+this.rotationHandleVSpacing-a.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(a,
-d){return this.graph.isRecursiveVertexResize(a)&&!mxEvent.isControlDown(d.getEvent())};mxVertexHandler.prototype.isCenteredEvent=function(a,d){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(d.getEvent())||mxEvent.isMetaDown(d.getEvent())};var A=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=
-function(){return A.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTable(this.state.cell)};mxVertexHandler.prototype.getSizerBounds=function(){return this.graph.isTableCell(this.state.cell)?this.graph.view.getState(this.graph.model.getParent(this.graph.model.getParent(this.state.cell))):this.bounds};var x=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return x.apply(this,
-arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var t=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(a){return a.tableHandle||t.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};var F=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){var a=F.apply(this,arguments);this.graph.isTableRow(this.state.cell)?
+d){return this.graph.isRecursiveVertexResize(a)&&!mxEvent.isControlDown(d.getEvent())};mxVertexHandler.prototype.isCenteredEvent=function(a,d){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(d.getEvent())||mxEvent.isMetaDown(d.getEvent())};var x=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=
+function(){return x.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTable(this.state.cell)};mxVertexHandler.prototype.getSizerBounds=function(){return this.graph.isTableCell(this.state.cell)?this.graph.view.getState(this.graph.model.getParent(this.graph.model.getParent(this.state.cell))):this.bounds};var A=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return A.apply(this,
+arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var t=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(a){return a.tableHandle||t.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};var G=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){var a=G.apply(this,arguments);this.graph.isTableRow(this.state.cell)?
a.grow(-1):this.graph.isTableCell(this.state.cell)&&a.grow(-2);return a};var z=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var a=z.apply(this,arguments);if(this.graph.isTable(this.state.cell)){var d=this.graph,b=d.model,c=d.getActualStartSize(this.state.cell),f=b.getChildAt(this.state.cell,0),e=this.state;null==a&&(a=[]);for(var g=0;g<b.getChildCount(this.state.cell)-1;g++)mxUtils.bind(this,function(c){if(null!=c&&b.isVertex(c.cell)){var f=
new mxLine(new mxRectangle,mxVertexHandler.TABLE_HANDLE_COLOR,2);c=new mxHandle(c,"row-resize",null,f);c.tableHandle=!0;var e=0;c.shape.node.parentNode.insertBefore(c.shape.node,c.shape.node.parentNode.firstChild);c.redraw=function(){null!=this.shape&&null!=this.state.shape&&(this.shape.bounds.x=this.state.x,this.shape.bounds.width=this.state.width,this.shape.bounds.y=this.state.y+this.state.height+e,this.shape.bounds.height=1,this.shape.node.style.zOrder=-1,this.shape.redraw())};c.setPosition=function(a,
d,b){e=d.y-a.y-a.height};c.execute=function(){var a=d.model.getGeometry(this.state.cell);d.setTableRowHeight(this.state.cell,a.height+e);e=0};a.push(c)}})(this.graph.view.getState(b.getChildAt(this.state.cell,g)));for(g=0;g<b.getChildCount(f)-1;g++)mxUtils.bind(this,function(d){if(null!=d){var b=new mxLine(new mxRectangle,mxVertexHandler.TABLE_HANDLE_COLOR,2,!0);d=new mxHandle(d,"col-resize",null,b);d.tableHandle=!0;var f=0;d.shape.node.parentNode.insertBefore(d.shape.node,d.shape.node.parentNode.firstChild);
@@ -2523,7 +2524,7 @@ this.graph.isTable(this.state.cell)};var C=mxVertexHandler.prototype.getHandlePa
this.customHandles[c].shape.bounds,e=f.getCenterX(),g=f.getCenterY();if(Math.abs(this.state.x-e)<f.width/2||Math.abs(this.state.y-g)<f.height/2||Math.abs(this.state.x+this.state.width-e)<f.width/2||Math.abs(this.state.y+this.state.height-g)<f.height/2){b=!0;break}}b&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(d/=2,a.x=this.sizers[0].bounds.width+d,a.y=this.sizers[0].bounds.height+d):a=C.apply(this,arguments);return a};mxVertexHandler.prototype.updateHint=function(d){if(this.index!=
mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=this.currentAlpha+"&deg;";else{d=this.state.view.scale;var c=this.state.view.unit;this.hint.innerHTML=b(this.roundLength(this.bounds.width/d),c)+" x "+b(this.roundLength(this.bounds.height/d),c)}d=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0");null==d&&
(d=this.bounds);this.hint.style.left=d.x+Math.round((d.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=d.y+d.height+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")}};mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display="")};var v=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(a,d){v.apply(this,arguments);null!=this.graph.graphHandler&&
-null!=this.graph.graphHandler.first&&null!=this.linkHint&&"none"!=this.linkHint.style.display&&(this.linkHint.style.display="none")};var L=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(a,d){L.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(d,c){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));var f=this.graph.view.translate,
+null!=this.graph.graphHandler.first&&null!=this.linkHint&&"none"!=this.linkHint.style.display&&(this.linkHint.style.display="none")};var I=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(a,d){I.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(d,c){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));var f=this.graph.view.translate,
e=this.graph.view.scale,g=this.roundLength(c.x/e-f.x),f=this.roundLength(c.y/e-f.y),e=this.graph.view.unit;this.hint.innerHTML=b(g,e)+", "+b(f,e);this.hint.style.visibility="visible";if(this.isSource||this.isTarget)null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(g=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*g.x)+"%, "+Math.round(100*g.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=
Math.round(d.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(d.getGraphY(),c.y)+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")};mxEdgeHandler.prototype.removeHint=mxVertexHandler.prototype.removeHint;HoverIcons.prototype.mainHandle=mxClient.IS_SVG?Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'" stroke-width="1"/>'):new mxImage(IMAGE_PATH+"/handle-main.png",17,17);HoverIcons.prototype.secondaryHandle=
mxClient.IS_SVG?Graph.createSvgImage(16,16,'<path d="m 8 3 L 13 8 L 8 13 L 3 8 z" stroke="#fff" fill="#fca000"/>'):new mxImage(IMAGE_PATH+"/handle-secondary.png",17,17);HoverIcons.prototype.fixedHandle=mxClient.IS_SVG?Graph.createSvgImage(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?
@@ -2534,7 +2535,7 @@ Sidebar.prototype.refreshTarget=HoverIcons.prototype.refreshTarget,Sidebar.proto
(new Image).src=HoverIcons.prototype.triangleDown.src,(new Image).src=HoverIcons.prototype.triangleLeft.src,(new Image).src=HoverIcons.prototype.refreshTarget.src,(new Image).src=HoverIcons.prototype.roundDrop.src);mxVertexHandler.prototype.rotationEnabled=!0;mxVertexHandler.prototype.manageSizers=!0;mxVertexHandler.prototype.livePreview=!0;mxGraphHandler.prototype.maxLivePreview=16;mxRubberband.prototype.defaultOpacity=30;mxConnectionHandler.prototype.outlineConnect=!0;mxCellHighlight.prototype.keepOnTop=
!0;mxVertexHandler.prototype.parentHighlightEnabled=!0;mxEdgeHandler.prototype.parentHighlightEnabled=!0;mxEdgeHandler.prototype.dblClickRemoveEnabled=!0;mxEdgeHandler.prototype.straightRemoveEnabled=!0;mxEdgeHandler.prototype.virtualBendsEnabled=!0;mxEdgeHandler.prototype.mergeRemoveEnabled=!0;mxEdgeHandler.prototype.manageLabelHandle=!0;mxEdgeHandler.prototype.outlineConnect=!0;mxEdgeHandler.prototype.isAddVirtualBendEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.isCustomHandleEvent=
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=-16,mxConstraintHandler.prototype.getTolerance=function(a){return mxEvent.isMouseEvent(a.getEvent())?4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=
-function(a){var d=a.getEvent();return null==a.getState()&&!mxEvent.isMouseEvent(d)||mxEvent.isPopupTrigger(d)&&(null==a.getState()||mxEvent.isControlDown(d)||mxEvent.isShiftDown(d))};var J=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=function(a,d){J.apply(this,arguments);mxEvent.isTouchEvent(d.getEvent())&&this.graph.isCellSelected(d.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(a){var d=
+function(a){var d=a.getEvent();return null==a.getState()&&!mxEvent.isMouseEvent(d)||mxEvent.isPopupTrigger(d)&&(null==a.getState()||mxEvent.isControlDown(d)||mxEvent.isShiftDown(d))};var K=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=function(a,d){K.apply(this,arguments);mxEvent.isTouchEvent(d.getEvent())&&this.graph.isCellSelected(d.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(a){var d=
a.getEvent();return mxEvent.isLeftMouseButton(d)&&(this.useLeftButtonForPanning&&null==a.getState()||mxEvent.isControlDown(d)&&!mxEvent.isShiftDown(d))||this.usePopupTrigger&&mxEvent.isPopupTrigger(d)};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.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&
(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(a,d){if(this.cancelled)this.cancelled=!1,d.consume();else{var b=null!=this.div&&"none"!=this.div.style.display,c=null,f=null,e=null,g=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(c=this.first.x,f=this.first.y,e=(this.currentX-c)/this.graph.view.scale,g=(this.currentY-f)/this.graph.view.scale,mxEvent.isAltDown(d.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(d.getEvent())&&this.graph.isToggleEvent(d.getEvent())){var e=new mxRectangle(this.x,this.y,this.width,this.height),l=this.graph.getCells(e.x,e.y,e.width,e.height);this.graph.removeSelectionCells(l)}else if(this.isSpaceEvent(d)){this.graph.model.beginUpdate();try{for(l=this.graph.getCellsBeyond(c,f,this.graph.getDefaultParent(),!0,!0),b=0;b<l.length;b++)if(this.graph.isCellMovable(l[b])){var n=
@@ -2547,8 +2548,8 @@ b};var Q=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.i
a&&0==a,c=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,c,b):null,b=null!=(null!=f?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(b),f):null)?this.fixedHandleImage:null!=f&&null!=c?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 R=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(a,d,b){this.handleImage=d==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:d==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return R.apply(this,arguments)};var ba=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=
function(a){if(null!=a&&1==a.length){var d=this.graph.getModel(),b=d.getParent(a[0]),c=this.graph.getCellGeometry(a[0]);if(d.isEdge(b)&&null!=c&&c.relative&&(d=this.graph.view.getState(a[0]),null!=d&&2>d.width&&2>d.height&&null!=d.text&&null!=d.text.boundingBox))return mxRectangle.fromRectangle(d.text.boundingBox)}return ba.apply(this,arguments)};var X=mxGraphHandler.prototype.getGuideStates;mxGraphHandler.prototype.getGuideStates=function(){for(var a=X.apply(this,arguments),d=[],b=0;b<a.length;b++)"1"!=
-mxUtils.getValue(a[b].style,"part","0")&&d.push(a[b]);return d};var G=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(a){var d=this.graph.getModel(),b=d.getParent(a.cell),c=this.graph.getCellGeometry(a.cell);return d.isEdge(b)&&null!=c&&c.relative&&2>a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox?(d=a.text.unrotatedBoundingBox||a.text.boundingBox,new mxRectangle(Math.round(d.x),Math.round(d.y),Math.round(d.width),Math.round(d.height))):
-G.apply(this,arguments)};var T=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(a,d){var b=this.graph.getModel(),c=b.getParent(this.state.cell),f=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(d)==mxEvent.ROTATION_HANDLE||!b.isEdge(c)||null==f||!f.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&T.apply(this,arguments)};mxVertexHandler.prototype.rotateClick=function(){var a=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,
+mxUtils.getValue(a[b].style,"part","0")&&d.push(a[b]);return d};var F=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(a){var d=this.graph.getModel(),b=d.getParent(a.cell),c=this.graph.getCellGeometry(a.cell);return d.isEdge(b)&&null!=c&&c.relative&&2>a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox?(d=a.text.unrotatedBoundingBox||a.text.boundingBox,new mxRectangle(Math.round(d.x),Math.round(d.y),Math.round(d.width),Math.round(d.height))):
+F.apply(this,arguments)};var T=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(a,d){var b=this.graph.getModel(),c=b.getParent(this.state.cell),f=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(d)==mxEvent.ROTATION_HANDLE||!b.isEdge(c)||null==f||!f.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&T.apply(this,arguments)};mxVertexHandler.prototype.rotateClick=function(){var a=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,
mxConstants.NONE),d=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);this.state.view.graph.model.isVertex(this.state.cell)&&a==mxConstants.NONE&&d==mxConstants.NONE?(a=mxUtils.mod(mxUtils.getValue(this.state.style,mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION,a,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])};var ia=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(a,
d){ia.apply(this,arguments);null!=this.graph.graphHandler.first&&(null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none"),null!=this.linkHint&&"none"!=this.linkHint.style.display&&(this.linkHint.style.display="none"))};var ja=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(a,d){ja.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?
"":"none");null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="")};var la=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){la.apply(this,arguments);var a=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));this.rowState=null;this.graph.isTableRow(this.state.cell)?this.rowState=this.state:this.graph.isTableCell(this.state.cell)&&(this.rowState=this.graph.view.getState(this.graph.model.getParent(this.state.cell)));
@@ -2568,9 +2569,9 @@ this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null
this.linkHint.style.left=Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(a.y+a.height+Editor.hintOffset)+"px"}};var Z=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){Z.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var aa=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){aa.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),
this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function a(){mxCylinder.call(this)}function b(){mxActor.call(this)}function e(){mxCylinder.call(this)}function c(){mxCylinder.call(this)}function m(){mxCylinder.call(this)}function k(){mxActor.call(this)}function q(){mxCylinder.call(this)}function u(){mxActor.call(this)}function y(){mxActor.call(this)}function B(){mxActor.call(this)}function d(){mxActor.call(this)}function f(){mxActor.call(this)}function g(){mxActor.call(this)}function p(){mxActor.call(this)}function l(a,d){this.canvas=
a;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=d;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,l.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,l.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,l.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,l.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;
-this.canvas.curveTo=mxUtils.bind(this,l.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,l.prototype.arcTo)}function n(){mxRectangleShape.call(this)}function A(){mxRectangleShape.call(this)}function x(){mxActor.call(this)}function t(){mxActor.call(this)}function F(){mxActor.call(this)}function z(){mxRectangleShape.call(this)}function E(){mxRectangleShape.call(this)}function C(){mxCylinder.call(this)}function v(){mxShape.call(this)}function L(){mxShape.call(this)}
-function J(){mxEllipse.call(this)}function H(){mxShape.call(this)}function N(){mxShape.call(this)}function D(){mxRectangleShape.call(this)}function M(){mxShape.call(this)}function Q(){mxShape.call(this)}function R(){mxShape.call(this)}function ba(){mxShape.call(this)}function X(){mxShape.call(this)}function G(){mxCylinder.call(this)}function T(){mxCylinder.call(this)}function ia(){mxRectangleShape.call(this)}function ja(){mxDoubleEllipse.call(this)}function la(){mxDoubleEllipse.call(this)}function ea(){mxArrowConnector.call(this);
-this.spacing=0}function V(){mxArrowConnector.call(this);this.spacing=0}function U(){mxActor.call(this)}function Y(){mxRectangleShape.call(this)}function fa(){mxActor.call(this)}function Z(){mxActor.call(this)}function aa(){mxActor.call(this)}function O(){mxActor.call(this)}function K(){mxActor.call(this)}function ka(){mxActor.call(this)}function P(){mxActor.call(this)}function S(){mxActor.call(this)}function ca(){mxActor.call(this)}function na(){mxActor.call(this)}function I(){mxEllipse.call(this)}
+this.canvas.curveTo=mxUtils.bind(this,l.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,l.prototype.arcTo)}function n(){mxRectangleShape.call(this)}function x(){mxRectangleShape.call(this)}function A(){mxActor.call(this)}function t(){mxActor.call(this)}function G(){mxActor.call(this)}function z(){mxRectangleShape.call(this)}function E(){mxRectangleShape.call(this)}function C(){mxCylinder.call(this)}function v(){mxShape.call(this)}function I(){mxShape.call(this)}
+function K(){mxEllipse.call(this)}function H(){mxShape.call(this)}function N(){mxShape.call(this)}function D(){mxRectangleShape.call(this)}function M(){mxShape.call(this)}function Q(){mxShape.call(this)}function R(){mxShape.call(this)}function ba(){mxShape.call(this)}function X(){mxShape.call(this)}function F(){mxCylinder.call(this)}function T(){mxCylinder.call(this)}function ia(){mxRectangleShape.call(this)}function ja(){mxDoubleEllipse.call(this)}function la(){mxDoubleEllipse.call(this)}function ea(){mxArrowConnector.call(this);
+this.spacing=0}function V(){mxArrowConnector.call(this);this.spacing=0}function U(){mxActor.call(this)}function Y(){mxRectangleShape.call(this)}function fa(){mxActor.call(this)}function Z(){mxActor.call(this)}function aa(){mxActor.call(this)}function O(){mxActor.call(this)}function L(){mxActor.call(this)}function ka(){mxActor.call(this)}function P(){mxActor.call(this)}function S(){mxActor.call(this)}function ca(){mxActor.call(this)}function na(){mxActor.call(this)}function J(){mxEllipse.call(this)}
function oa(){mxEllipse.call(this)}function da(){mxEllipse.call(this)}function ga(){mxRhombus.call(this)}function ya(){mxEllipse.call(this)}function za(){mxEllipse.call(this)}function Aa(){mxEllipse.call(this)}function ra(){mxEllipse.call(this)}function pa(){mxActor.call(this)}function sa(){mxActor.call(this)}function ta(){mxActor.call(this)}function ma(){mxConnector.call(this)}function Ba(a,d,b,c,f,e,g,l,n,v){g+=n;var ha=c.clone();c.x-=f*(2*g+n);c.y-=e*(2*g+n);f*=g+n;e*=g+n;return function(){a.ellipse(ha.x-
f-g,ha.y-e-g,2*g,2*g);v?a.fillAndStroke():a.stroke()}}mxUtils.extend(a,mxCylinder);a.prototype.size=20;a.prototype.darkOpacity=0;a.prototype.darkOpacity2=0;a.prototype.paintVertexShape=function(a,d,b,c,f){var e=Math.max(0,Math.min(c,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),g=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),ha=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2))));
a.translate(d,b);a.begin();a.moveTo(0,0);a.lineTo(c-e,0);a.lineTo(c,e);a.lineTo(c,f);a.lineTo(e,f);a.lineTo(0,f-e);a.lineTo(0,0);a.close();a.end();a.fillAndStroke();this.outline||(a.setShadow(!1),0!=g&&(a.setFillAlpha(Math.abs(g)),a.setFillColor(0>g?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(c-e,0),a.lineTo(c,e),a.lineTo(e,e),a.close(),a.fill()),0!=ha&&(a.setFillAlpha(Math.abs(ha)),a.setFillColor(0>ha?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(e,e),a.lineTo(e,f),a.lineTo(0,f-
@@ -2598,19 +2599,19 @@ mxConstants.NONE)e||null!=this.fill&&this.fill!=mxConstants.NONE||(a.pointerEven
c,b+f,d+c-e,b+f),a.lineTo(d+e,b+f),a.quadTo(d,b+f,d,b+f-e),a.lineTo(d,b+e),a.quadTo(d,b,d+e,b)):(a.moveTo(d,b),a.lineTo(d+c,b),a.lineTo(d+c,b+f),a.lineTo(d,b+f),a.lineTo(d,b)),a.close(),a.end(),a.fillAndStroke()}};var La=mxRectangleShape.prototype.paintForeground;mxRectangleShape.prototype.paintForeground=function(a,d,b,c,f){null==a.handJiggle&&La.apply(this,arguments)};mxUtils.extend(n,mxRectangleShape);n.prototype.size=.1;n.prototype.isHtmlAllowed=function(){return!1};n.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 d=a.width,b=a.height;a=new mxRectangle(a.x,a.y,d,b);var c=d*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,c=Math.max(c,Math.min(d*f,b*f));a.x+=
Math.round(c);a.width-=Math.round(2*c)}return a};n.prototype.paintForeground=function(a,d,b,c,f){var e=c*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(c*g,f*g));e=Math.round(e);a.begin();a.moveTo(d+e,b);a.lineTo(d+e,b+f);a.moveTo(d+c-e,b);a.lineTo(d+c-e,b+f);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,
-arguments)};mxCellRenderer.registerShape("process",n);mxUtils.extend(A,mxRectangleShape);A.prototype.paintBackground=function(a,d,b,c,f){a.setFillColor(mxConstants.NONE);a.rect(d,b,c,f);a.fill()};A.prototype.paintForeground=function(a,d,b,c,f){};mxCellRenderer.registerShape("transparent",A);mxUtils.extend(x,mxHexagon);x.prototype.size=30;x.prototype.position=.5;x.prototype.position2=.5;x.prototype.base=20;x.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,
-"size",this.size))*this.scale)};x.prototype.isRoundable=function(){return!0};x.prototype.redrawPath=function(a,d,b,c,f){d=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=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),g=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),l=Math.max(0,Math.min(c,
-parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(a,[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,f-b),new mxPoint(Math.min(c,e+l),f-b),new mxPoint(g,f),new mxPoint(Math.max(0,e),f-b),new mxPoint(0,f-b)],this.isRounded,d,!0,[4])};mxCellRenderer.registerShape("callout",x);mxUtils.extend(t,mxActor);t.prototype.size=.2;t.prototype.fixedSize=20;t.prototype.isRoundable=function(){return!0};t.prototype.redrawPath=function(a,d,b,c,f){d="0"!=mxUtils.getValue(this.style,"fixedSize",
-"0")?Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(c-d,0),new mxPoint(c,f/2),new mxPoint(c-d,f),new mxPoint(0,f),new mxPoint(d,f/2)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("step",t);mxUtils.extend(F,mxHexagon);F.prototype.size=
-.25;F.prototype.isRoundable=function(){return!0};F.prototype.redrawPath=function(a,d,b,c,f){d=c*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-d,0),new mxPoint(c,.5*f),new mxPoint(c-d,f),new mxPoint(d,f),new mxPoint(0,.5*f)],this.isRounded,b,!0)};mxCellRenderer.registerShape("hexagon",F);mxUtils.extend(z,mxRectangleShape);z.prototype.isHtmlAllowed=
+arguments)};mxCellRenderer.registerShape("process",n);mxUtils.extend(x,mxRectangleShape);x.prototype.paintBackground=function(a,d,b,c,f){a.setFillColor(mxConstants.NONE);a.rect(d,b,c,f);a.fill()};x.prototype.paintForeground=function(a,d,b,c,f){};mxCellRenderer.registerShape("transparent",x);mxUtils.extend(A,mxHexagon);A.prototype.size=30;A.prototype.position=.5;A.prototype.position2=.5;A.prototype.base=20;A.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,
+"size",this.size))*this.scale)};A.prototype.isRoundable=function(){return!0};A.prototype.redrawPath=function(a,d,b,c,f){d=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=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),g=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),l=Math.max(0,Math.min(c,
+parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(a,[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,f-b),new mxPoint(Math.min(c,e+l),f-b),new mxPoint(g,f),new mxPoint(Math.max(0,e),f-b),new mxPoint(0,f-b)],this.isRounded,d,!0,[4])};mxCellRenderer.registerShape("callout",A);mxUtils.extend(t,mxActor);t.prototype.size=.2;t.prototype.fixedSize=20;t.prototype.isRoundable=function(){return!0};t.prototype.redrawPath=function(a,d,b,c,f){d="0"!=mxUtils.getValue(this.style,"fixedSize",
+"0")?Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(c-d,0),new mxPoint(c,f/2),new mxPoint(c-d,f),new mxPoint(0,f),new mxPoint(d,f/2)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("step",t);mxUtils.extend(G,mxHexagon);G.prototype.size=
+.25;G.prototype.isRoundable=function(){return!0};G.prototype.redrawPath=function(a,d,b,c,f){d=c*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-d,0),new mxPoint(c,.5*f),new mxPoint(c-d,f),new mxPoint(d,f),new mxPoint(0,.5*f)],this.isRounded,b,!0)};mxCellRenderer.registerShape("hexagon",G);mxUtils.extend(z,mxRectangleShape);z.prototype.isHtmlAllowed=
function(){return!1};z.prototype.paintForeground=function(a,d,b,c,f){var e=Math.min(c/5,f/5)+1;a.begin();a.moveTo(d+c/2,b+e);a.lineTo(d+c/2,b+f-e);a.moveTo(d+e,b+f/2);a.lineTo(d+c-e,b+f/2);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",z);var Ga=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var d=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||
0))*this.scale;return new mxRectangle(a.x+d,a.y+d,a.width-2*d,a.height-2*d)}return a};mxRhombus.prototype.paintVertexShape=function(a,d,b,c,f){Ga.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);d+=e;b+=e;c-=2*e;f-=2*e;0<c&&0<f&&(a.setShadow(!1),Ga.apply(this,[a,d,b,c,f]))}};mxUtils.extend(E,mxRectangleShape);E.prototype.isHtmlAllowed=function(){return!1};E.prototype.getLabelBounds=function(a){if(1==
this.style["double"]){var d=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+d,a.y+d,a.width-2*d,a.height-2*d)}return a};E.prototype.paintForeground=function(a,d,b,c,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);d+=e;b+=e;c-=2*e;f-=2*e;0<c&&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 l=this.style["symbol"+e+"Align"],ha=this.style["symbol"+e+"VerticalAlign"],n=this.style["symbol"+e+"Width"],v=this.style["symbol"+e+"Height"],p=this.style["symbol"+e+"Spacing"]||0,t=this.style["symbol"+e+"VSpacing"]||p,k=this.style["symbol"+e+"ArcSpacing"];null!=k&&(k*=this.getArcSize(c+this.strokewidth,f+this.strokewidth),p+=k,t+=k);var k=d,x=b,k=l==mxConstants.ALIGN_CENTER?k+(c-n)/2:l==mxConstants.ALIGN_RIGHT?k+
(c-n-p):k+p,x=ha==mxConstants.ALIGN_MIDDLE?x+(f-v)/2:ha==mxConstants.ALIGN_BOTTOM?x+(f-v-t):x+t;a.save();l=new g;l.style=this.style;g.prototype.paintVertexShape.call(l,a,k,x,n,v);a.restore()}e++}while(null!=g)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",E);mxUtils.extend(C,mxCylinder);C.prototype.redrawPath=function(a,d,b,c,f,e){e?(a.moveTo(0,0),a.lineTo(c/2,f/2),a.lineTo(c,0),a.end()):(a.moveTo(0,0),a.lineTo(c,0),a.lineTo(c,f),a.lineTo(0,f),
-a.close())};mxCellRenderer.registerShape("message",C);mxUtils.extend(v,mxShape);v.prototype.paintBackground=function(a,d,b,c,f){a.translate(d,b);a.ellipse(c/4,0,c/2,f/4);a.fillAndStroke();a.begin();a.moveTo(c/2,f/4);a.lineTo(c/2,2*f/3);a.moveTo(c/2,f/3);a.lineTo(0,f/3);a.moveTo(c/2,f/3);a.lineTo(c,f/3);a.moveTo(c/2,2*f/3);a.lineTo(0,f);a.moveTo(c/2,2*f/3);a.lineTo(c,f);a.end();a.stroke()};mxCellRenderer.registerShape("umlActor",v);mxUtils.extend(L,mxShape);L.prototype.getLabelMargins=function(a){return new mxRectangle(a.width/
-6,0,0,0)};L.prototype.paintBackground=function(a,d,b,c,f){a.translate(d,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(c/6,f/2);a.end();a.stroke();a.ellipse(c/6,0,5*c/6,f);a.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",L);mxUtils.extend(J,mxEllipse);J.prototype.paintVertexShape=function(a,d,b,c,f){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(d+c/8,b+f);a.lineTo(d+7*c/8,b+f);a.end();a.stroke()};mxCellRenderer.registerShape("umlEntity",
-J);mxUtils.extend(H,mxShape);H.prototype.paintVertexShape=function(a,d,b,c,f){a.translate(d,b);a.begin();a.moveTo(c,0);a.lineTo(0,f);a.moveTo(0,0);a.lineTo(c,f);a.end();a.stroke()};mxCellRenderer.registerShape("umlDestroy",H);mxUtils.extend(N,mxShape);N.prototype.getLabelBounds=function(a){return new mxRectangle(a.x,a.y+a.height/8,a.width,7*a.height/8)};N.prototype.paintBackground=function(a,d,b,c,f){a.translate(d,b);a.begin();a.moveTo(3*c/8,f/8*1.1);a.lineTo(5*c/8,0);a.end();a.stroke();a.ellipse(0,
+a.close())};mxCellRenderer.registerShape("message",C);mxUtils.extend(v,mxShape);v.prototype.paintBackground=function(a,d,b,c,f){a.translate(d,b);a.ellipse(c/4,0,c/2,f/4);a.fillAndStroke();a.begin();a.moveTo(c/2,f/4);a.lineTo(c/2,2*f/3);a.moveTo(c/2,f/3);a.lineTo(0,f/3);a.moveTo(c/2,f/3);a.lineTo(c,f/3);a.moveTo(c/2,2*f/3);a.lineTo(0,f);a.moveTo(c/2,2*f/3);a.lineTo(c,f);a.end();a.stroke()};mxCellRenderer.registerShape("umlActor",v);mxUtils.extend(I,mxShape);I.prototype.getLabelMargins=function(a){return new mxRectangle(a.width/
+6,0,0,0)};I.prototype.paintBackground=function(a,d,b,c,f){a.translate(d,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(c/6,f/2);a.end();a.stroke();a.ellipse(c/6,0,5*c/6,f);a.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",I);mxUtils.extend(K,mxEllipse);K.prototype.paintVertexShape=function(a,d,b,c,f){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(d+c/8,b+f);a.lineTo(d+7*c/8,b+f);a.end();a.stroke()};mxCellRenderer.registerShape("umlEntity",
+K);mxUtils.extend(H,mxShape);H.prototype.paintVertexShape=function(a,d,b,c,f){a.translate(d,b);a.begin();a.moveTo(c,0);a.lineTo(0,f);a.moveTo(0,0);a.lineTo(c,f);a.end();a.stroke()};mxCellRenderer.registerShape("umlDestroy",H);mxUtils.extend(N,mxShape);N.prototype.getLabelBounds=function(a){return new mxRectangle(a.x,a.y+a.height/8,a.width,7*a.height/8)};N.prototype.paintBackground=function(a,d,b,c,f){a.translate(d,b);a.begin();a.moveTo(3*c/8,f/8*1.1);a.lineTo(5*c/8,0);a.end();a.stroke();a.ellipse(0,
f/8,c,7*f/8);a.fillAndStroke()};N.prototype.paintForeground=function(a,d,b,c,f){a.begin();a.moveTo(3*c/8,f/8*1.1);a.lineTo(5*c/8,f/4);a.end();a.stroke()};mxCellRenderer.registerShape("umlControl",N);mxUtils.extend(D,mxRectangleShape);D.prototype.size=40;D.prototype.isHtmlAllowed=function(){return!1};D.prototype.getLabelBounds=function(a){var d=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,d)};D.prototype.paintBackground=
function(a,d,b,c,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,d,b,c,e):(g=this.state.view.graph.cellRenderer.getShape(g),null!=g&&g!=D&&(g=new g,g.apply(this.state),a.save(),g.paintVertexShape(a,d,b,c,e),a.restore()));e<f&&(a.setDashed(!0),a.begin(),a.moveTo(d+c/2,b+e),a.lineTo(d+c/2,b+f),a.end(),a.stroke())};D.prototype.paintForeground=
function(a,d,b,c,f){var e=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,a,d,b,c,Math.min(f,e))};mxCellRenderer.registerShape("umlLifeline",D);mxUtils.extend(M,mxShape);M.prototype.width=60;M.prototype.height=30;M.prototype.corner=10;M.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,
@@ -2618,20 +2619,20 @@ function(a,d,b,c,f){var e=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this
mxConstants.NONE?(this.getGradientBounds(a,d,b,c,f),a.setGradient(this.fill,this.gradient,d,b,c,f,this.gradientDirection)):a.setFillColor(this.fill);a.begin();a.moveTo(d,b);a.lineTo(d+g,b);a.lineTo(d+g,b+Math.max(0,l-1.5*e));a.lineTo(d+Math.max(0,g-e),b+l);a.lineTo(d,b+l);a.close();a.fillAndStroke();a.begin();a.moveTo(d+g,b);a.lineTo(d+c,b);a.lineTo(d+c,b+f);a.lineTo(d,b+f);a.lineTo(d,b+l);a.stroke()};mxCellRenderer.registerShape("umlFrame",M);mxPerimeter.LifelinePerimeter=function(a,d,b,c){c=D.prototype.size;
null!=d&&(c=mxUtils.getValue(d.style,"size",c)*d.view.scale);d=parseFloat(d.style[mxConstants.STYLE_STROKEWIDTH]||1)*d.view.scale/2-1;b.x<a.getCenterX()&&(d=-1*(d+1));return new mxPoint(a.getCenterX()+d,Math.min(a.y+a.height,Math.max(a.y+c,b.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(a,d,b,c){c=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter);
mxPerimeter.BackbonePerimeter=function(a,d,b,c){c=parseFloat(d.style[mxConstants.STYLE_STROKEWIDTH]||1)*d.view.scale/2-1;null!=d.style.backboneSize&&(c+=parseFloat(d.style.backboneSize)*d.view.scale/2-1);if("south"==d.style[mxConstants.STYLE_DIRECTION]||"north"==d.style[mxConstants.STYLE_DIRECTION])return b.x<a.getCenterX()&&(c=-1*(c+1)),new mxPoint(a.getCenterX()+c,Math.min(a.y+a.height,Math.max(a.y,b.y)));b.y<a.getCenterY()&&(c=-1*(c+1));return new mxPoint(Math.min(a.x+a.width,Math.max(a.x,b.x)),
-a.getCenterY()+c)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(a,d,b,c){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(a,new mxRectangle(0,0,0,Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(d.style,"size",x.prototype.size))*d.view.scale))),d.style),d,b,c)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(a,b,c,f){var e=d.prototype.size;
+a.getCenterY()+c)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(a,d,b,c){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(a,new mxRectangle(0,0,0,Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(d.style,"size",A.prototype.size))*d.view.scale))),d.style),d,b,c)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(a,b,c,f){var e=d.prototype.size;
null!=b&&(e=mxUtils.getValue(b.style,"size",e));var g=a.x,l=a.y,n=a.width,v=a.height;b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_SOUTH?(e=v*Math.max(0,Math.min(1,e)),l=[new mxPoint(g,l),new mxPoint(g+n,l+e),new mxPoint(g+n,l+v),new mxPoint(g,l+v-e),new mxPoint(g,l)]):(e=n*Math.max(0,Math.min(1,e)),l=[new mxPoint(g+e,l),new mxPoint(g+n,l),new mxPoint(g+n-e,l+v),new mxPoint(g,
l+v),new mxPoint(g+e,l)]);v=a.getCenterX();a=a.getCenterY();a=new mxPoint(v,a);f&&(c.x<g||c.x>g+n?a.y=c.y:a.x=c.x);return mxUtils.getPerimeterPoint(l,a,c)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(a,d,b,c){var e=f.prototype.size;null!=d&&(e=mxUtils.getValue(d.style,"size",e));var g=a.x,l=a.y,n=a.width,v=a.height;d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;
d==mxConstants.DIRECTION_EAST?(e=n*Math.max(0,Math.min(1,e)),l=[new mxPoint(g+e,l),new mxPoint(g+n-e,l),new mxPoint(g+n,l+v),new mxPoint(g,l+v),new mxPoint(g+e,l)]):d==mxConstants.DIRECTION_WEST?(e=n*Math.max(0,Math.min(1,e)),l=[new mxPoint(g,l),new mxPoint(g+n,l),new mxPoint(g+n-e,l+v),new mxPoint(g+e,l+v),new mxPoint(g,l)]):d==mxConstants.DIRECTION_NORTH?(e=v*Math.max(0,Math.min(1,e)),l=[new mxPoint(g,l+e),new mxPoint(g+n,l),new mxPoint(g+n,l+v),new mxPoint(g,l+v-e),new mxPoint(g,l+e)]):(e=v*Math.max(0,
Math.min(1,e)),l=[new mxPoint(g,l),new mxPoint(g+n,l+e),new mxPoint(g+n,l+v-e),new mxPoint(g,l+v),new mxPoint(g,l)]);v=a.getCenterX();a=a.getCenterY();a=new mxPoint(v,a);c&&(b.x<g||b.x>g+n?a.y=b.y:a.x=b.x);return mxUtils.getPerimeterPoint(l,a,b)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(a,d,b,c){var f="0"!=mxUtils.getValue(d.style,"fixedSize","0"),e=f?t.prototype.fixedSize:t.prototype.size;null!=d&&(e=mxUtils.getValue(d.style,
"size",e));var g=a.x,l=a.y,n=a.width,v=a.height,p=a.getCenterX();a=a.getCenterY();d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_EAST?(f=f?Math.max(0,Math.min(n,e)):n*Math.max(0,Math.min(1,e)),l=[new mxPoint(g,l),new mxPoint(g+n-f,l),new mxPoint(g+n,a),new mxPoint(g+n-f,l+v),new mxPoint(g,l+v),new mxPoint(g+f,a),new mxPoint(g,l)]):d==mxConstants.DIRECTION_WEST?(f=f?Math.max(0,Math.min(n,e)):n*Math.max(0,
Math.min(1,e)),l=[new mxPoint(g+f,l),new mxPoint(g+n,l),new mxPoint(g+n-f,a),new mxPoint(g+n,l+v),new mxPoint(g+f,l+v),new mxPoint(g,a),new mxPoint(g+f,l)]):d==mxConstants.DIRECTION_NORTH?(f=f?Math.max(0,Math.min(v,e)):v*Math.max(0,Math.min(1,e)),l=[new mxPoint(g,l+f),new mxPoint(p,l),new mxPoint(g+n,l+f),new mxPoint(g+n,l+v),new mxPoint(p,l+v-f),new mxPoint(g,l+v),new mxPoint(g,l+f)]):(f=f?Math.max(0,Math.min(v,e)):v*Math.max(0,Math.min(1,e)),l=[new mxPoint(g,l),new mxPoint(p,l+f),new mxPoint(g+
-n,l),new mxPoint(g+n,l+v-f),new mxPoint(p,l+v),new mxPoint(g,l+v-f),new mxPoint(g,l)]);p=new mxPoint(p,a);c&&(b.x<g||b.x>g+n?p.y=b.y:p.x=b.x);return mxUtils.getPerimeterPoint(l,p,b)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(a,d,b,c){var f=F.prototype.size;null!=d&&(f=mxUtils.getValue(d.style,"size",f));var e=a.x,g=a.y,l=a.width,n=a.height,v=a.getCenterX();a=a.getCenterY();d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,
+n,l),new mxPoint(g+n,l+v-f),new mxPoint(p,l+v),new mxPoint(g,l+v-f),new mxPoint(g,l)]);p=new mxPoint(p,a);c&&(b.x<g||b.x>g+n?p.y=b.y:p.x=b.x);return mxUtils.getPerimeterPoint(l,p,b)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(a,d,b,c){var f=G.prototype.size;null!=d&&(f=mxUtils.getValue(d.style,"size",f));var e=a.x,g=a.y,l=a.width,n=a.height,v=a.getCenterX();a=a.getCenterY();d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,
mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_NORTH||d==mxConstants.DIRECTION_SOUTH?(f=n*Math.max(0,Math.min(1,f)),g=[new mxPoint(v,g),new mxPoint(e+l,g+f),new mxPoint(e+l,g+n-f),new mxPoint(v,g+n),new mxPoint(e,g+n-f),new mxPoint(e,g+f),new mxPoint(v,g)]):(f=l*Math.max(0,Math.min(1,f)),g=[new mxPoint(e+f,g),new mxPoint(e+l-f,g),new mxPoint(e+l,a),new mxPoint(e+l-f,g+n),new mxPoint(e+f,g+n),new mxPoint(e,a),new mxPoint(e+f,g)]);v=new mxPoint(v,a);c&&(b.x<e||b.x>e+
l?v.y=b.y:v.x=b.x);return mxUtils.getPerimeterPoint(g,v,b)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(Q,mxShape);Q.prototype.size=10;Q.prototype.paintBackground=function(a,d,b,c,f){var e=parseFloat(mxUtils.getValue(this.style,"size",this.size));a.translate(d,b);a.ellipse((c-e)/2,0,e,e);a.fillAndStroke();a.begin();a.moveTo(c/2,e);a.lineTo(c/2,f);a.end();a.stroke()};mxCellRenderer.registerShape("lollipop",Q);mxUtils.extend(R,mxShape);R.prototype.size=
10;R.prototype.inset=2;R.prototype.paintBackground=function(a,d,b,c,f){var e=parseFloat(mxUtils.getValue(this.style,"size",this.size)),g=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(d,b);a.begin();a.moveTo(c/2,e+g);a.lineTo(c/2,f);a.end();a.stroke();a.begin();a.moveTo((c-e)/2-g,e/2);a.quadTo((c-e)/2-g,e+g,c/2,e+g);a.quadTo((c+e)/2+g,e+g,(c+e)/2+g,e/2);a.end();a.stroke()};mxCellRenderer.registerShape("requires",R);mxUtils.extend(ba,mxShape);ba.prototype.paintBackground=
function(a,d,b,c,f){a.translate(d,b);a.begin();a.moveTo(0,0);a.quadTo(c,0,c,f/2);a.quadTo(c,f,0,f);a.end();a.stroke()};mxCellRenderer.registerShape("requiredInterface",ba);mxUtils.extend(X,mxShape);X.prototype.inset=2;X.prototype.paintBackground=function(a,d,b,c,f){var e=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(d,b);a.ellipse(0,e,c-2*e,f-2*e);a.fillAndStroke();a.begin();a.moveTo(c/2,0);a.quadTo(c,0,c,f/2);a.quadTo(c,f,c/2,f);a.end();a.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",
-X);mxUtils.extend(G,mxCylinder);G.prototype.jettyWidth=20;G.prototype.jettyHeight=10;G.prototype.redrawPath=function(a,d,b,c,f,e){var g=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));d=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));b=g/2;var g=b+g/2,l=Math.min(d,f-d),n=Math.min(l+2*d,f-d);e?(a.moveTo(b,l),a.lineTo(g,l),a.lineTo(g,l+d),a.lineTo(b,l+d),a.moveTo(b,n),a.lineTo(g,n),a.lineTo(g,n+d),a.lineTo(b,n+d)):(a.moveTo(b,0),a.lineTo(c,0),a.lineTo(c,
-f),a.lineTo(b,f),a.lineTo(b,n+d),a.lineTo(0,n+d),a.lineTo(0,n),a.lineTo(b,n),a.lineTo(b,l+d),a.lineTo(0,l+d),a.lineTo(0,l),a.lineTo(b,l),a.close());a.end()};mxCellRenderer.registerShape("module",G);mxUtils.extend(T,mxCylinder);T.prototype.jettyWidth=32;T.prototype.jettyHeight=12;T.prototype.redrawPath=function(a,d,b,c,f,e){var g=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));d=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));b=g/2;var g=b+g/2,l=.3*f-d/
+X);mxUtils.extend(F,mxCylinder);F.prototype.jettyWidth=20;F.prototype.jettyHeight=10;F.prototype.redrawPath=function(a,d,b,c,f,e){var g=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));d=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));b=g/2;var g=b+g/2,l=Math.min(d,f-d),n=Math.min(l+2*d,f-d);e?(a.moveTo(b,l),a.lineTo(g,l),a.lineTo(g,l+d),a.lineTo(b,l+d),a.moveTo(b,n),a.lineTo(g,n),a.lineTo(g,n+d),a.lineTo(b,n+d)):(a.moveTo(b,0),a.lineTo(c,0),a.lineTo(c,
+f),a.lineTo(b,f),a.lineTo(b,n+d),a.lineTo(0,n+d),a.lineTo(0,n),a.lineTo(b,n),a.lineTo(b,l+d),a.lineTo(0,l+d),a.lineTo(0,l),a.lineTo(b,l),a.close());a.end()};mxCellRenderer.registerShape("module",F);mxUtils.extend(T,mxCylinder);T.prototype.jettyWidth=32;T.prototype.jettyHeight=12;T.prototype.redrawPath=function(a,d,b,c,f,e){var g=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));d=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));b=g/2;var g=b+g/2,l=.3*f-d/
2,n=.7*f-d/2;e?(a.moveTo(b,l),a.lineTo(g,l),a.lineTo(g,l+d),a.lineTo(b,l+d),a.moveTo(b,n),a.lineTo(g,n),a.lineTo(g,n+d),a.lineTo(b,n+d)):(a.moveTo(b,0),a.lineTo(c,0),a.lineTo(c,f),a.lineTo(b,f),a.lineTo(b,n+d),a.lineTo(0,n+d),a.lineTo(0,n),a.lineTo(b,n),a.lineTo(b,l+d),a.lineTo(0,l+d),a.lineTo(0,l),a.lineTo(b,l),a.close());a.end()};mxCellRenderer.registerShape("component",T);mxUtils.extend(ia,mxRectangleShape);ia.prototype.paintForeground=function(a,d,b,c,f){var e=c/2,g=f/2,l=mxUtils.getValue(this.style,
mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;a.begin();this.addPoints(a,[new mxPoint(d+e,b),new mxPoint(d+c,b+g),new mxPoint(d+e,b+f),new mxPoint(d,b+g)],this.isRounded,l,!0);a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",ia);mxUtils.extend(ja,mxDoubleEllipse);ja.prototype.outerStroke=!0;ja.prototype.paintVertexShape=function(a,d,b,c,f){var e=Math.min(4,Math.min(c/5,f/5));0<c&&0<f&&(a.ellipse(d+e,b+e,c-2*e,f-2*
e),a.fillAndStroke());a.setShadow(!1);this.outerStroke&&(a.ellipse(d,b,c,f),a.stroke())};mxCellRenderer.registerShape("endState",ja);mxUtils.extend(la,ja);la.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",la);mxUtils.extend(ea,mxArrowConnector);ea.prototype.defaultWidth=4;ea.prototype.isOpenEnded=function(){return!0};ea.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};ea.prototype.isArrowRounded=function(){return this.isRounded};
@@ -2642,12 +2643,12 @@ parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.begin();a.moveTo(d,b+e
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(c,0),new mxPoint(c,b),new mxPoint(d,b),new mxPoint(d,f),new mxPoint(0,f)],this.isRounded,e,!0);a.end()};mxCellRenderer.registerShape("corner",fa);mxUtils.extend(Z,mxActor);Z.prototype.redrawPath=function(a,d,b,c,f){a.moveTo(0,0);a.lineTo(0,f);a.end();a.moveTo(c,0);a.lineTo(c,f);a.end();a.moveTo(0,f/2);a.lineTo(c,
f/2);a.end()};mxCellRenderer.registerShape("crossbar",Z);mxUtils.extend(aa,mxActor);aa.prototype.dx=20;aa.prototype.dy=20;aa.prototype.redrawPath=function(a,d,b,c,f){d=Math.max(0,Math.min(c,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(c,0),new mxPoint(c,b),new mxPoint((c+d)/2,b),new mxPoint((c+d)/2,f),new mxPoint((c-d)/2,f),new mxPoint((c-d)/2,b),new mxPoint(0,b)],this.isRounded,e,!0);a.end()};mxCellRenderer.registerShape("tee",aa);mxUtils.extend(O,mxActor);O.prototype.arrowWidth=.3;O.prototype.arrowSize=.2;O.prototype.redrawPath=function(a,d,b,c,f){var e=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
-"arrowSize",this.arrowSize))));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(c-d,b),new mxPoint(c-d,0),new mxPoint(c,f/2),new mxPoint(c-d,f),new mxPoint(c-d,e),new mxPoint(0,e)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("singleArrow",O);mxUtils.extend(K,mxActor);K.prototype.redrawPath=function(a,d,b,c,f){var e=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",
+"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(c-d,b),new mxPoint(c-d,0),new mxPoint(c,f/2),new mxPoint(c-d,f),new mxPoint(c-d,e),new mxPoint(0,e)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("singleArrow",O);mxUtils.extend(L,mxActor);L.prototype.redrawPath=function(a,d,b,c,f){var e=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",
O.prototype.arrowWidth))));d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",O.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(d,0),new mxPoint(d,b),new mxPoint(c-d,b),new mxPoint(c-d,0),new mxPoint(c,f/2),new mxPoint(c-d,f),new mxPoint(c-d,e),new mxPoint(d,e),new mxPoint(d,f)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("doubleArrow",
-K);mxUtils.extend(ka,mxActor);ka.prototype.size=.1;ka.prototype.redrawPath=function(a,d,b,c,f){d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(d,0);a.lineTo(c,0);a.quadTo(c-2*d,f/2,c,f);a.lineTo(d,f);a.quadTo(d-2*d,f/2,d,0);a.close();a.end()};mxCellRenderer.registerShape("dataStorage",ka);mxUtils.extend(P,mxActor);P.prototype.redrawPath=function(a,d,b,c,f){a.moveTo(0,0);a.quadTo(c,0,c,f/2);a.quadTo(c,f,0,f);a.close();a.end()};mxCellRenderer.registerShape("or",
+L);mxUtils.extend(ka,mxActor);ka.prototype.size=.1;ka.prototype.redrawPath=function(a,d,b,c,f){d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(d,0);a.lineTo(c,0);a.quadTo(c-2*d,f/2,c,f);a.lineTo(d,f);a.quadTo(d-2*d,f/2,d,0);a.close();a.end()};mxCellRenderer.registerShape("dataStorage",ka);mxUtils.extend(P,mxActor);P.prototype.redrawPath=function(a,d,b,c,f){a.moveTo(0,0);a.quadTo(c,0,c,f/2);a.quadTo(c,f,0,f);a.close();a.end()};mxCellRenderer.registerShape("or",
P);mxUtils.extend(S,mxActor);S.prototype.redrawPath=function(a,d,b,c,f){a.moveTo(0,0);a.quadTo(c,0,c,f/2);a.quadTo(c,f,0,f);a.quadTo(c/2,f/2,0,0);a.close();a.end()};mxCellRenderer.registerShape("xor",S);mxUtils.extend(ca,mxActor);ca.prototype.size=20;ca.prototype.isRoundable=function(){return!0};ca.prototype.redrawPath=function(a,d,b,c,f){d=Math.min(c/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(d,0),new mxPoint(c-d,0),new mxPoint(c,.8*d),new mxPoint(c,f),new mxPoint(0,f),new mxPoint(0,.8*d)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("loopLimit",ca);mxUtils.extend(na,mxActor);na.prototype.size=.375;na.prototype.isRoundable=function(){return!0};na.prototype.redrawPath=function(a,d,b,c,f){d=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(c,0),new mxPoint(c,f-d),new mxPoint(c/2,f),new mxPoint(0,f-d)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("offPageConnector",na);mxUtils.extend(I,mxEllipse);I.prototype.paintVertexShape=function(a,d,b,c,f){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(d+c/2,b+f);a.lineTo(d+c,b+f);a.end();a.stroke()};mxCellRenderer.registerShape("tapeData",I);mxUtils.extend(oa,mxEllipse);oa.prototype.paintVertexShape=function(a,
+2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,f-d),new mxPoint(c/2,f),new mxPoint(0,f-d)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("offPageConnector",na);mxUtils.extend(J,mxEllipse);J.prototype.paintVertexShape=function(a,d,b,c,f){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(d+c/2,b+f);a.lineTo(d+c,b+f);a.end();a.stroke()};mxCellRenderer.registerShape("tapeData",J);mxUtils.extend(oa,mxEllipse);oa.prototype.paintVertexShape=function(a,
d,b,c,f){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(d,b+f/2);a.lineTo(d+c,b+f/2);a.end();a.stroke();a.begin();a.moveTo(d+c/2,b);a.lineTo(d+c/2,b+f);a.end();a.stroke()};mxCellRenderer.registerShape("orEllipse",oa);mxUtils.extend(da,mxEllipse);da.prototype.paintVertexShape=function(a,d,b,c,f){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(d+.145*c,b+.145*f);a.lineTo(d+.855*c,b+.855*f);a.end();a.stroke();
a.begin();a.moveTo(d+.855*c,b+.145*f);a.lineTo(d+.145*c,b+.855*f);a.end();a.stroke()};mxCellRenderer.registerShape("sumEllipse",da);mxUtils.extend(ga,mxRhombus);ga.prototype.paintVertexShape=function(a,d,b,c,f){mxRhombus.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(d,b+f/2);a.lineTo(d+c,b+f/2);a.end();a.stroke()};mxCellRenderer.registerShape("sortShape",ga);mxUtils.extend(ya,mxEllipse);ya.prototype.paintVertexShape=function(a,d,b,c,f){a.begin();a.moveTo(d,b);
a.lineTo(d+c,b);a.lineTo(d+c/2,b+f/2);a.close();a.fillAndStroke();a.begin();a.moveTo(d,b+f);a.lineTo(d+c,b+f);a.lineTo(d+c/2,b+f/2);a.close();a.fillAndStroke()};mxCellRenderer.registerShape("collate",ya);mxUtils.extend(za,mxEllipse);za.prototype.paintVertexShape=function(a,d,b,c,f){var e=b+f-5;a.begin();a.moveTo(d,b);a.lineTo(d,b+f);a.moveTo(d,e);a.lineTo(d+10,e-5);a.moveTo(d,e);a.lineTo(d+10,e+5);a.moveTo(d,e);a.lineTo(d+c,e);a.moveTo(d+c,b);a.lineTo(d+c,b+f);a.moveTo(d+c,e);a.lineTo(d+c-10,e-5);
@@ -2684,23 +2685,23 @@ a.y+d)},function(a,d){this.state.style.size=Math.round(Math.max(0,Math.min(a.hei
Math.min(a.width,d.x-a.x)));this.state.style.height=Math.round(Math.max(1.5*M.prototype.corner,Math.min(a.height,d.y-a.y)))},!1)]},process:function(a){var d=[W(a,["size"],function(a){var d=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style,"size",n.prototype.size))));return new mxPoint(a.x+a.width*d,a.y+a.height/4)},function(a,d){this.state.style.size=Math.max(0,Math.min(.5,(d.x-a.x)/a.width))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(ua(a));return d},cross:function(a){return[W(a,
["size"],function(a){var d=Math.min(a.width,a.height),d=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",sa.prototype.size)))*d/2;return new mxPoint(a.getCenterX()-d,a.getCenterY()-d)},function(a,d){var b=Math.min(a.width,a.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,a.getCenterY()-d.y)/b*2,Math.max(0,a.getCenterX()-d.x)/b*2)))})]},note:function(a){return[W(a,["size"],function(a){var d=Math.max(0,Math.min(a.width,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,
"size",m.prototype.size)))));return new mxPoint(a.x+a.width-d,a.y+d)},function(a,d){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(a.width,a.x+a.width-d.x),Math.min(a.height,d.y-a.y))))})]},manualInput:function(a){var d=[W(a,["size"],function(a){var d=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",U.prototype.size)));return new mxPoint(a.x+a.width/4,a.y+3*d/4)},function(a,d){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,4*(d.y-a.y)/3)))})];mxUtils.getValue(a.style,
-mxConstants.STYLE_ROUNDED,!1)&&d.push(ua(a));return d},dataStorage:function(a){return[W(a,["size"],function(a){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",ka.prototype.size))));return new mxPoint(a.x+(1-d)*a.width,a.getCenterY())},function(a,d){this.state.style.size=Math.max(0,Math.min(1,(a.x+a.width-d.x)/a.width))})]},callout:function(a){var d=[W(a,["size","position"],function(a){var d=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",x.prototype.size))),
-b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",x.prototype.position)));mxUtils.getValue(this.state.style,"base",x.prototype.base);return new mxPoint(a.x+b*a.width,a.y+a.height-d)},function(a,d){mxUtils.getValue(this.state.style,"base",x.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(a.height,a.y+a.height-d.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(d.x-a.x)/a.width)))/100}),W(a,["position2"],function(a){var d=Math.max(0,Math.min(1,
-mxUtils.getValue(this.state.style,"position2",x.prototype.position2)));return new mxPoint(a.x+d*a.width,a.y+a.height)},function(a,d){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(d.x-a.x)/a.width)))/100}),W(a,["base"],function(a){var d=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",x.prototype.size))),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",x.prototype.position))),c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,
-"base",x.prototype.base)));return new mxPoint(a.x+Math.min(a.width,b*a.width+c),a.y+a.height-d)},function(a,d){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",x.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(a.width,d.x-a.x-b*a.width)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(ua(a));return d},internalStorage:function(a){var d=[W(a,["dx","dy"],function(a){var d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,
+mxConstants.STYLE_ROUNDED,!1)&&d.push(ua(a));return d},dataStorage:function(a){return[W(a,["size"],function(a){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",ka.prototype.size))));return new mxPoint(a.x+(1-d)*a.width,a.getCenterY())},function(a,d){this.state.style.size=Math.max(0,Math.min(1,(a.x+a.width-d.x)/a.width))})]},callout:function(a){var d=[W(a,["size","position"],function(a){var d=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",A.prototype.size))),
+b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",A.prototype.position)));mxUtils.getValue(this.state.style,"base",A.prototype.base);return new mxPoint(a.x+b*a.width,a.y+a.height-d)},function(a,d){mxUtils.getValue(this.state.style,"base",A.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(a.height,a.y+a.height-d.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(d.x-a.x)/a.width)))/100}),W(a,["position2"],function(a){var d=Math.max(0,Math.min(1,
+mxUtils.getValue(this.state.style,"position2",A.prototype.position2)));return new mxPoint(a.x+d*a.width,a.y+a.height)},function(a,d){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(d.x-a.x)/a.width)))/100}),W(a,["base"],function(a){var d=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",A.prototype.size))),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",A.prototype.position))),c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,
+"base",A.prototype.base)));return new mxPoint(a.x+Math.min(a.width,b*a.width+c),a.y+a.height-d)},function(a,d){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",A.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(a.width,d.x-a.x-b*a.width)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(ua(a));return d},internalStorage:function(a){var d=[W(a,["dx","dy"],function(a){var d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,
"dx",Y.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",Y.prototype.dy)));return new mxPoint(a.x+d,a.y+b)},function(a,d){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,d.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,d.y-a.y)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(ua(a));return d},module:function(a){return[W(a,["jettyWidth","jettyHeight"],function(a){var d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,
-"jettyWidth",G.prototype.jettyWidth))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"jettyHeight",G.prototype.jettyHeight)));return new mxPoint(a.x+d/2,a.y+2*b)},function(a,d){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(a.width,d.x-a.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(a.height,d.y-a.y))/2)})]},corner:function(a){return[W(a,["dx","dy"],function(a){var d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",fa.prototype.dx))),
+"jettyWidth",F.prototype.jettyWidth))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"jettyHeight",F.prototype.jettyHeight)));return new mxPoint(a.x+d/2,a.y+2*b)},function(a,d){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(a.width,d.x-a.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(a.height,d.y-a.y))/2)})]},corner:function(a){return[W(a,["dx","dy"],function(a){var d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",fa.prototype.dx))),
b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",fa.prototype.dy)));return new mxPoint(a.x+d,a.y+b)},function(a,d){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,d.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,d.y-a.y)))})]},tee:function(a){return[W(a,["dx","dy"],function(a){var d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",aa.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",aa.prototype.dy)));
return new mxPoint(a.x+(a.width+d)/2,a.y+b)},function(a,d){this.state.style.dx=Math.round(Math.max(0,2*Math.min(a.width/2,d.x-a.x-a.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,d.y-a.y)))})]},singleArrow:va(1),doubleArrow:va(.5),folder:function(a){return[W(a,["tabWidth","tabHeight"],function(a){var d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"tabWidth",q.prototype.tabWidth))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"tabHeight",
q.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",q.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(d=a.width-d);return new mxPoint(a.x+d,a.y+b)},function(a,d){var b=Math.max(0,Math.min(a.width,d.x-a.x));mxUtils.getValue(this.state.style,"tabPosition",q.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(b=a.width-b);this.state.style.tabWidth=Math.round(b);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(a.height,d.y-a.y)))})]},document:function(a){return[W(a,["size"],
function(a){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",B.prototype.size))));return new mxPoint(a.x+3*a.width/4,a.y+(1-d)*a.height)},function(a,d){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-d.y)/a.height))})]},tape:function(a){return[W(a,["size"],function(a){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",y.prototype.size))));return new mxPoint(a.getCenterX(),a.y+d*a.height/2)},function(a,d){this.state.style.size=Math.max(0,
-Math.min(1,(d.y-a.y)/a.height*2))})]},offPageConnector:function(a){return[W(a,["size"],function(a){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",na.prototype.size))));return new mxPoint(a.getCenterX(),a.y+(1-d)*a.height)},function(a,d){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-d.y)/a.height))})]},step:Ha(t.prototype.size,!0,null,!0,t.prototype.fixedSize),hexagon:Ha(F.prototype.size,!0,.5,!0),curlyBracket:Ha(g.prototype.size,!1),display:Ha(ta.prototype.size,
+Math.min(1,(d.y-a.y)/a.height*2))})]},offPageConnector:function(a){return[W(a,["size"],function(a){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",na.prototype.size))));return new mxPoint(a.getCenterX(),a.y+(1-d)*a.height)},function(a,d){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-d.y)/a.height))})]},step:Ha(t.prototype.size,!0,null,!0,t.prototype.fixedSize),hexagon:Ha(G.prototype.size,!0,.5,!0),curlyBracket:Ha(g.prototype.size,!1),display:Ha(ta.prototype.size,
!1),cube:Ma(1,a.prototype.size,!1),card:Ma(.5,u.prototype.size,!0),loopLimit:Ma(.5,ca.prototype.size,!0),trapezoid:Qa(.5),parallelogram:Qa(1)};Graph.createHandle=W;Graph.handleFactory=Ia;var Ra=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var a=Ra.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var d=this.state.style.shape;null==mxCellRenderer.defaultShapes[d]&&null==mxStencilRegistry.getStencil(d)&&(d=mxConstants.SHAPE_RECTANGLE);
d=Ia[d];null==d&&null!=this.state.shape&&this.state.shape.isRoundable()&&(d=Ia[mxConstants.SHAPE_RECTANGLE]);null!=d&&(d=d(this.state),null!=d&&(a=null==a?d:a.concat(d)))}return a};mxEdgeHandler.prototype.createCustomHandles=function(){var a=this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_CONNECTOR);a=Ia[a];return null!=a?a(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var Ja=new mxPoint(1,0),
Ka=new mxPoint(1,0),va=mxUtils.toRadians(-30),Ja=mxUtils.getRotatedPoint(Ja,Math.cos(va),Math.sin(va)),va=mxUtils.toRadians(-150),Ka=mxUtils.getRotatedPoint(Ka,Math.cos(va),Math.sin(va));mxEdgeStyle.IsometricConnector=function(a,d,b,c,f){var e=a.view;c=null!=c&&0<c.length?c[0]:null;var g=a.absolutePoints,l=g[0],g=g[g.length-1];null!=c&&(c=e.transformControlPoint(a,c));null==l&&null!=d&&(l=new mxPoint(d.getCenterX(),d.getCenterY()));null==g&&null!=b&&(g=new mxPoint(b.getCenterX(),b.getCenterY()));
var n=Ja.x,v=Ja.y,p=Ka.x,t=Ka.y,k="horizontal"==mxUtils.getValue(a.style,"elbow","horizontal");if(null!=g&&null!=l){a=function(a,d,b){a-=x.x;var c=d-x.y;d=(t*a-p*c)/(n*t-v*p);a=(v*a-n*c)/(v*p-n*t);k?(b&&(x=new mxPoint(x.x+n*d,x.y+v*d),f.push(x)),x=new mxPoint(x.x+p*a,x.y+t*a)):(b&&(x=new mxPoint(x.x+p*a,x.y+t*a),f.push(x)),x=new mxPoint(x.x+n*d,x.y+v*d));f.push(x)};var x=l;null==c&&(c=new mxPoint(l.x+(g.x-l.x)/2,l.y+(g.y-l.y)/2));a(c.x,c.y,!0);a(g.x,g.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",
mxEdgeStyle.IsometricConnector);var Sa=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(a,d){if(d==mxEdgeStyle.IsometricConnector){var b=new mxElbowEdgeHandler(a);b.snapToTerminals=!1;return b}return Sa.apply(this,arguments)};b.prototype.constraints=[];e.prototype.getConstraints=function(a,d,b){a=[];var c=Math.tan(mxUtils.toRadians(30)),f=(.5-c)/2,c=Math.min(d,b/(.5+c));d=(d-c)/2;b=(b-c)/2;a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,b+.25*c));a.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,d+.5*c,b+c*f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d+c,b+.25*c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d+c,b+.75*c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d+.5*c,b+(1-f)*c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,b+.75*c));return a};x.prototype.getConstraints=function(a,d,b){a=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var c=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,
+0),!1,null,d+.5*c,b+c*f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d+c,b+.25*c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d+c,b+.75*c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d+.5*c,b+(1-f)*c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,b+.75*c));return a};A.prototype.getConstraints=function(a,d,b){a=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var c=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,
"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var f=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2))));parseFloat(mxUtils.getValue(this.style,"base",this.base));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.25,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,
0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*(b-c)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,b-c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,b-c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(b-c)));d>=2*c&&a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return a};mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
0),!0),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),
@@ -2714,10 +2715,10 @@ Math.min(b,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));a.push(n
q.prototype.getConstraints=function(a,d,b){a=[];var c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth)))),f=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?(a.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,0)),a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,c,f)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+c),f))):(a.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-.5*c,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,f)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-c),f)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,f));a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,d,.25*(b-f)+f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*(b-f)+f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.75*(b-f)+f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(b-f)+f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(b-f)+f));a.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,.75*(b-f)+f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,b));a.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return a};Y.prototype.constraints=mxRectangleShape.prototype.constraints;ka.prototype.constraints=mxRectangleShape.prototype.constraints;I.prototype.constraints=mxEllipse.prototype.constraints;oa.prototype.constraints=mxEllipse.prototype.constraints;
+0),!1,null,0,.75*(b-f)+f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,b));a.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return a};Y.prototype.constraints=mxRectangleShape.prototype.constraints;ka.prototype.constraints=mxRectangleShape.prototype.constraints;J.prototype.constraints=mxEllipse.prototype.constraints;oa.prototype.constraints=mxEllipse.prototype.constraints;
da.prototype.constraints=mxEllipse.prototype.constraints;ra.prototype.constraints=mxEllipse.prototype.constraints;U.prototype.constraints=mxRectangleShape.prototype.constraints;pa.prototype.constraints=mxRectangleShape.prototype.constraints;ta.prototype.getConstraints=function(a,d,b){a=[];var c=Math.min(d,b/2),f=Math.min(d-c,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*d);a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));a.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,f,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(f+d-c),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(f+d-c),b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,b));return a};G.prototype.getConstraints=function(a,d,b){d=parseFloat(mxUtils.getValue(a,
-"jettyWidth",G.prototype.jettyWidth))/2;a=parseFloat(mxUtils.getValue(a,"jettyHeight",G.prototype.jettyHeight));var c=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,d),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,
+0),!1,null,f,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(f+d-c),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(f+d-c),b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,b));return a};F.prototype.getConstraints=function(a,d,b){d=parseFloat(mxUtils.getValue(a,
+"jettyWidth",F.prototype.jettyWidth))/2;a=parseFloat(mxUtils.getValue(a,"jettyHeight",F.prototype.jettyHeight));var c=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,d),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,
.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!1,null,d),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(b-.5*a,1.5*a)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(b-.5*a,3.5*a))];b>5*a&&c.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,d));b>8*a&&c.push(new mxConnectionConstraint(new mxPoint(0,
.5),!1,null,d));b>15*a&&c.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,d));return c};ca.prototype.constraints=mxRectangleShape.prototype.constraints;na.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,
.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];v.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75,
@@ -2738,7 +2739,7 @@ da.prototype.constraints=mxEllipse.prototype.constraints;ra.prototype.constraint
0),!1,null,d,.5*f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+c),f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.5*(b+f)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,b));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,
1),!1));return a};Z.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];O.prototype.getConstraints=
function(a,d,b){a=[];var c=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),f=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize)))),c=(b-c)/2;a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-f),c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-f,0));a.push(new mxConnectionConstraint(new mxPoint(1,
-.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-f,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-f),b-c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,b-c));return a};K.prototype.getConstraints=function(a,d,b){a=[];var c=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",O.prototype.arrowWidth)))),f=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",O.prototype.arrowSize)))),c=(b-c)/2;a.push(new mxConnectionConstraint(new mxPoint(0,
+.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-f,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-f),b-c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,b-c));return a};L.prototype.getConstraints=function(a,d,b){a=[];var c=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",O.prototype.arrowWidth)))),f=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",O.prototype.arrowSize)))),c=(b-c)/2;a.push(new mxConnectionConstraint(new mxPoint(0,
.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-f,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-f,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d,b-c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,b));return a};sa.prototype.getConstraints=
function(a,d,b){a=[];var c=Math.min(b,d),f=Math.max(0,Math.min(c,c*parseFloat(mxUtils.getValue(this.style,"size",this.size)))),c=(b-f)/2,e=c+f,g=(d-f)/2,f=g+f;a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,.5*c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,0));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,.5*c));a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,f,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,b-.5*c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,b));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,b-.5*c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+f),c));a.push(new mxConnectionConstraint(new mxPoint(0,
@@ -2808,8 +2809,8 @@ DrawioFile.prototype.synchronizeFile=function(a,b){this.savingFile?null!=b&&b({m
DrawioFile.prototype.updateFile=function(a,b,e,c){null!=e&&e()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=b&&b():this.getLatestVersion(mxUtils.bind(this,function(m){try{null!=e&&e()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=b&&b():null!=m?this.mergeFile(m,a,b,c):this.reloadFile(a,b))}catch(k){null!=b&&b(k)}}),b))};
DrawioFile.prototype.mergeFile=function(a,b,e,c){var m=!0;try{this.stats.fileMerged++;var k=null!=this.shadowPages?this.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.shadowData).documentElement),q=this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement);if(null!=q&&0<q.length){this.shadowPages=q;this.backupPatch=this.isModified()?this.ui.diffPages(k,this.ui.pages):null;var u=[this.ui.diffPages(null!=c?c:k,this.shadowPages)];if(!this.ignorePatches(u)){var y=this.ui.patchPages(k,
u[0]);c={};var B=this.ui.getHashValueForPages(y,c),k={},d=this.ui.getHashValueForPages(this.shadowPages,k);"1"==urlParams.test&&EditorUi.debug("File.mergeFile",[this],"backup",this.backupPatch,"patches",u,"checksum",d==B,B);if(null!=B&&B!=d){var f=this.compressReportData(this.getAnonymizedXmlForPages(q)),g=this.compressReportData(this.getAnonymizedXmlForPages(y)),p=this.ui.hashValue(a.getCurrentEtag()),l=this.ui.hashValue(this.getCurrentEtag());this.checksumError(e,u,"Shadow Details: "+JSON.stringify(c)+
-"\nChecksum: "+B+"\nCurrent: "+d+"\nCurrent Details: "+JSON.stringify(k)+"\nFrom: "+p+"\nTo: "+l+"\n\nFile Data:\n"+f+"\nPatched Shadow:\n"+g,null,"mergeFile");return}this.patch(u,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw m=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(a.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=b&&b()}catch(x){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();
-null!=e&&e(x);try{if(m)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,x);else{var n=this.getCurrentUser(),A=null!=n?n.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),A,x)}}catch(t){}}};
+"\nChecksum: "+B+"\nCurrent: "+d+"\nCurrent Details: "+JSON.stringify(k)+"\nFrom: "+p+"\nTo: "+l+"\n\nFile Data:\n"+f+"\nPatched Shadow:\n"+g,null,"mergeFile");return}this.patch(u,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw m=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(a.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=b&&b()}catch(A){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();
+null!=e&&e(A);try{if(m)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,A);else{var n=this.getCurrentUser(),x=null!=n?n.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),x,A)}}catch(t){}}};
DrawioFile.prototype.getAnonymizedXmlForPages=function(a){var b=new mxCodec(mxUtils.createXmlDocument()),e=b.document.createElement("mxfile");if(null!=a)for(var c=0;c<a.length;c++){var m=b.encode(new mxGraphModel(a[c].root));"1"!=urlParams.dev&&(m=this.ui.anonymizeNode(m,!0));m.setAttribute("id",a[c].getId());a[c].viewState&&this.ui.editor.graph.saveViewState(a[c].viewState,m,!0);e.appendChild(m)}return mxUtils.getPrettyXml(e)};
DrawioFile.prototype.compressReportData=function(a,b,e){b=null!=b?b:1E4;null!=e&&null!=a&&a.length>e?a=a.substring(0,e)+"[...]":null!=a&&a.length>b&&(a=Graph.compress(a)+"\n");return a};
DrawioFile.prototype.checksumError=function(a,b,e,c,m){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=a&&a();try{if(this.errorReportsEnabled){if(null!=b)for(a=0;a<b.length;a++)this.ui.anonymizePatch(b[a]);var k=mxUtils.bind(this,function(a){var c=this.compressReportData(JSON.stringify(b,null,2));a=null!=a?this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement)),
@@ -2983,9 +2984,9 @@ function(){var a=mxUtils.htmlEntities(e.value);c(d,a,p)});e.focus();mxEvent.addL
a=isNaN(a)?0:a));null!=p.min&&a<p.min?a=p.min:null!=p.max&&a>p.max&&(a=p.max);a=mxUtils.htmlEntities(("int"==m?parseInt(a):a)+"");c(d,a,p)}var g=document.createElement("input");f(z,g,!0);g.value=b;g.className="gePropEditor";"int"!=m&&"float"!=m||p.allowAuto||(g.type="number",g.step="int"==m?"1":"any",null!=p.min&&(g.min=parseFloat(p.min)),null!=p.max&&(g.max=parseFloat(p.max)));a.appendChild(g);mxEvent.addListener(g,"keypress",function(a){13==a.keyCode&&e()});g.focus();mxEvent.addListener(g,"blur",
function(){e()})})));p.isDeletable&&(x=mxUtils.button("-",mxUtils.bind(t,function(a){c(d,"",p,p.index);mxEvent.consume(a)})),x.style.height="16px",x.style.width="25px",x.style["float"]="right",x.className="geColorBtn",z.appendChild(x));A.appendChild(z);return A}var t=this,k=this.editorUi.editor.graph,x=[];a.style.position="relative";a.style.padding="0";var m=document.createElement("table");m.style.whiteSpace="nowrap";m.style.width="100%";var v=document.createElement("tr");v.className="gePropHeader";
var A=document.createElement("th");A.className="gePropHeaderCell";var z=document.createElement("img");z.src=Sidebar.prototype.expandedImage;A.appendChild(z);mxUtils.write(A,mxResources.get("property"));v.style.cursor="pointer";var C=function(){var d=m.querySelectorAll(".gePropNonHeaderRow"),b;if(t.editorUi.propertiesCollapsed){z.src=Sidebar.prototype.collapsedImage;b="none";for(var c=a.childNodes.length-1;0<=c;c--)try{var f=a.childNodes[c],e=f.nodeName.toUpperCase();"INPUT"!=e&&"SELECT"!=e||a.removeChild(f)}catch(oa){}}else z.src=
-Sidebar.prototype.expandedImage,b="";for(c=0;c<d.length;c++)d[c].style.display=b};mxEvent.addListener(v,"click",function(){t.editorUi.propertiesCollapsed=!t.editorUi.propertiesCollapsed;C()});v.appendChild(A);A=document.createElement("th");A.className="gePropHeaderCell";A.innerHTML=mxResources.get("value");v.appendChild(A);m.appendChild(v);var q=!1,E=!1,F;for(F in d)if(v=d[F],"function"!=typeof v.isVisible||v.isVisible(b,this)){var L=null!=b.style[F]?mxUtils.htmlEntities(b.style[F]+""):null!=v.getDefaultValue?
-v.getDefaultValue(b,this):v.defVal;if("separator"==v.type)E=!E;else{if("staticArr"==v.type)v.size=parseInt(b.style[v.sizeProperty]||d[v.sizeProperty].defVal)||0;else if(null!=v.dependentProps){for(var u=v.dependentProps,y=[],J=[],A=0;A<u.length;A++){var B=b.style[u[A]];J.push(d[u[A]].subDefVal);y.push(null!=B?B.split(","):[])}v.dependentPropsDefVal=J;v.dependentPropsVals=y}m.appendChild(p(F,L,v,q,E));q=!q}}for(A=0;A<x.length;A++)for(v=x[A],d=v.parentRow,b=0;b<v.values.length;b++)F=p(v.name,v.values[b],
-{type:v.type,parentRow:v.parentRow,isDeletable:v.isDeletable,index:b,defVal:v.defVal,countProperty:v.countProperty,size:v.size},0==b%2,v.flipBkg),d.parentNode.insertBefore(F,d.nextSibling),d=F;a.appendChild(m);C();return a};StyleFormatPanel.prototype.addStyles=function(a){function d(a){function d(a){var d=mxUtils.button("",function(d){c.getModel().beginUpdate();try{var b=c.getSelectionCells();for(d=0;d<b.length;d++){for(var f=c.getModel().getStyle(b[d]),g=0;g<e.length;g++)f=mxUtils.removeStylename(f,
+Sidebar.prototype.expandedImage,b="";for(c=0;c<d.length;c++)d[c].style.display=b};mxEvent.addListener(v,"click",function(){t.editorUi.propertiesCollapsed=!t.editorUi.propertiesCollapsed;C()});v.appendChild(A);A=document.createElement("th");A.className="gePropHeaderCell";A.innerHTML=mxResources.get("value");v.appendChild(A);m.appendChild(v);var E=!1,q=!1,I;for(I in d)if(v=d[I],"function"!=typeof v.isVisible||v.isVisible(b,this)){var G=null!=b.style[I]?mxUtils.htmlEntities(b.style[I]+""):null!=v.getDefaultValue?
+v.getDefaultValue(b,this):v.defVal;if("separator"==v.type)q=!q;else{if("staticArr"==v.type)v.size=parseInt(b.style[v.sizeProperty]||d[v.sizeProperty].defVal)||0;else if(null!=v.dependentProps){for(var u=v.dependentProps,y=[],K=[],A=0;A<u.length;A++){var B=b.style[u[A]];K.push(d[u[A]].subDefVal);y.push(null!=B?B.split(","):[])}v.dependentPropsDefVal=K;v.dependentPropsVals=y}m.appendChild(p(I,G,v,E,q));E=!E}}for(A=0;A<x.length;A++)for(v=x[A],d=v.parentRow,b=0;b<v.values.length;b++)I=p(v.name,v.values[b],
+{type:v.type,parentRow:v.parentRow,isDeletable:v.isDeletable,index:b,defVal:v.defVal,countProperty:v.countProperty,size:v.size},0==b%2,v.flipBkg),d.parentNode.insertBefore(I,d.nextSibling),d=I;a.appendChild(m);C();return a};StyleFormatPanel.prototype.addStyles=function(a){function d(a){function d(a){var d=mxUtils.button("",function(d){c.getModel().beginUpdate();try{var b=c.getSelectionCells();for(d=0;d<b.length;d++){for(var f=c.getModel().getStyle(b[d]),g=0;g<e.length;g++)f=mxUtils.removeStylename(f,
e[g]);var l=c.getModel().isVertex(b[d])?c.defaultVertexStyle:c.defaultEdgeStyle;null!=a?(f=mxUtils.setStyle(f,mxConstants.STYLE_GRADIENTCOLOR,a.gradient||mxUtils.getValue(l,mxConstants.STYLE_GRADIENTCOLOR,null)),f=""==a.fill?mxUtils.setStyle(f,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(f,mxConstants.STYLE_FILLCOLOR,a.fill||mxUtils.getValue(l,mxConstants.STYLE_FILLCOLOR,null)),f=""==a.stroke?mxUtils.setStyle(f,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(f,mxConstants.STYLE_STROKECOLOR,
a.stroke||mxUtils.getValue(l,mxConstants.STYLE_STROKECOLOR,null)),c.getModel().isVertex(b[d])&&(f=mxUtils.setStyle(f,mxConstants.STYLE_FONTCOLOR,a.font||mxUtils.getValue(l,mxConstants.STYLE_FONTCOLOR,null)))):(f=mxUtils.setStyle(f,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(l,mxConstants.STYLE_FILLCOLOR,"#ffffff")),f=mxUtils.setStyle(f,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(l,mxConstants.STYLE_STROKECOLOR,"#000000")),f=mxUtils.setStyle(f,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(l,
mxConstants.STYLE_GRADIENTCOLOR,null)),c.getModel().isVertex(b[d])&&(f=mxUtils.setStyle(f,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(l,mxConstants.STYLE_FONTCOLOR,null))));c.getModel().setStyle(b[d],f)}}finally{c.getModel().endUpdate()}});d.className="geStyleButton";d.style.width="36px";d.style.height="30px";d.style.margin="0px 6px 6px 0px";if(null!=a)null!=a.gradient?mxClient.IS_IE&&(mxClient.IS_QUIRKS||10>document.documentMode)?d.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+
@@ -3003,12 +3004,12 @@ a.button,d.relatedTarget=a.relatedTarget}catch(D){}}g.apply(this,arguments);wind
this.layoutManager.getLayout=function(a){var d=this.graph.getCellStyle(a);if(null!=d){if("rack"==d.childLayout){var b=new mxStackLayout(this.graph,!1);b.gridSize=null!=d.rackUnitSize?parseFloat(d.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;b.fill=!0;b.marginLeft=d.marginLeft||0;b.marginRight=d.marginRight||0;b.marginTop=d.marginTop||0;b.marginBottom=d.marginBottom||0;b.allowGaps=d.allowGaps||0;b.resizeParent=!1;return b}if("undefined"!==typeof mxTableLayout&&"tableLayout"==
d.childLayout)return b=new mxTableLayout(this.graph),b.rows=d.tableRows||2,b.columns=d.tableColumns||2,b.colPercentages=d.colPercentages,b.rowPercentages=d.rowPercentages,b.equalColumns="1"==mxUtils.getValue(d,"equalColumns",b.colPercentages?"0":"1"),b.equalRows="1"==mxUtils.getValue(d,"equalRows",b.rowPercentages?"0":"1"),b.resizeParent="1"==mxUtils.getValue(d,"resizeParent","1"),b.border=d.tableBorder||b.border,b.marginLeft=d.marginLeft||0,b.marginRight=d.marginRight||0,b.marginTop=d.marginTop||
0,b.marginBottom=d.marginBottom||0,b.autoAddCol="1"==mxUtils.getValue(d,"autoAddCol","0"),b.autoAddRow="1"==mxUtils.getValue(d,"autoAddRow",b.autoAddCol?"0":"1"),b.colWidths=d.colWidths||"100",b.rowHeights=d.rowHeights||"50",b}return c.apply(this,arguments)};this.updateGlobalUrlVariables()};var p=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return p.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=
-Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var a=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=a)for(var d in a)this.globalVars[d]=a[d]}catch(J){null!=window.console&&console.log("Error in vars URL parameter: "+J)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var l=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(a){var d=
+Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var a=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=a)for(var d in a)this.globalVars[d]=a[d]}catch(K){null!=window.console&&console.log("Error in vars URL parameter: "+K)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var l=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(a){var d=
l.apply(this,arguments);null==d&&null!=this.globalVars&&(d=this.globalVars[a]);return d};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var a=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(a.ownerDocument)).decode(a)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var n=Graph.prototype.getSvg;Graph.prototype.getSvg=function(a,d,b,c,f,e,g,l,p,t,k){var x=null;null!=this.themes&&"darkTheme"==this.defaultThemeName&&
-(x=this.stylesheet,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var m=n.apply(this,arguments);if(k&&null!=this.extFonts&&0<this.extFonts.length){var v=m.ownerDocument,A=null!=v.createElementNS?v.createElementNS(mxConstants.NS_SVG,"style"):v.createElement("style");null!=v.setAttributeNS?A.setAttributeNS("type","text/css"):A.setAttribute("type","text/css");for(var z="",D="",C=0;C<this.extFonts.length;C++){var q=this.extFonts[C].name,E=this.extFonts[C].url;0==E.indexOf(Editor.GOOGLE_FONTS)?
-z+="@import url("+E+");\n":D+='@font-face {\nfont-family: "'+q+'";\nsrc: url("'+E+'");\n}\n'}A.appendChild(v.createTextNode(z+D));m.getElementsByTagName("defs")[0].appendChild(A)}null!=x&&(this.stylesheet=x,this.refresh());return m};var A=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=function(){var a=A.apply(this,arguments);if(this.mathEnabled){this.container.getBoundingClientRect();var d=a.drawText;a.drawText=function(a,b){if(null!=a.text&&null!=a.text.value&&a.text.checkBounds()&&
-(mxUtils.isNode(a.text.value)||a.text.dialect==mxConstants.DIALECT_STRICTHTML)){var c=a.text.getContentNode();if(null!=c){c=c.cloneNode(!0);if(c.getElementsByTagNameNS)for(var f=c.getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML","math");0<f.length;)f[0].parentNode.removeChild(f[0]);null!=c.innerHTML&&(f=a.text.value,a.text.value=c.innerHTML,d.apply(this,arguments),a.text.value=f)}}else d.apply(this,arguments)}}return a};var x=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=
-function(){x.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&&
+(x=this.stylesheet,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var m=n.apply(this,arguments);if(k&&null!=this.extFonts&&0<this.extFonts.length){var v=m.ownerDocument,A=null!=v.createElementNS?v.createElementNS(mxConstants.NS_SVG,"style"):v.createElement("style");null!=v.setAttributeNS?A.setAttributeNS("type","text/css"):A.setAttribute("type","text/css");for(var z="",D="",C=0;C<this.extFonts.length;C++){var E=this.extFonts[C].name,q=this.extFonts[C].url;0==q.indexOf(Editor.GOOGLE_FONTS)?
+z+="@import url("+q+");\n":D+='@font-face {\nfont-family: "'+E+'";\nsrc: url("'+q+'");\n}\n'}A.appendChild(v.createTextNode(z+D));m.getElementsByTagName("defs")[0].appendChild(A)}null!=x&&(this.stylesheet=x,this.refresh());return m};var x=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=function(){var a=x.apply(this,arguments);if(this.mathEnabled){this.container.getBoundingClientRect();var d=a.drawText;a.drawText=function(a,b){if(null!=a.text&&null!=a.text.value&&a.text.checkBounds()&&
+(mxUtils.isNode(a.text.value)||a.text.dialect==mxConstants.DIALECT_STRICTHTML)){var c=a.text.getContentNode();if(null!=c){c=c.cloneNode(!0);if(c.getElementsByTagNameNS)for(var f=c.getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML","math");0<f.length;)f[0].parentNode.removeChild(f[0]);null!=c.innerHTML&&(f=a.text.value,a.text.value=c.innerHTML,d.apply(this,arguments),a.text.value=f)}}else d.apply(this,arguments)}}return a};var A=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=
+function(){A.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 t=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){t.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 d=0;d<a.actions.length;d++){var b=a.actions[d];if(null!=b.open)if(this.isCustomLink(b.open)){if(!this.customLinkClicked(b.open))return}else this.openLink(b.open)}this.model.beginUpdate();try{for(d=0;d<a.actions.length;d++)b=a.actions[d],null!=b.toggle&&this.toggleCells(this.getCellsForAction(b.toggle,!0)),null!=b.show&&this.setCellsVisible(this.getCellsForAction(b.show,!0),!0),null!=b.hide&&this.setCellsVisible(this.getCellsForAction(b.hide,
!0),!1)}finally{this.model.endUpdate()}for(d=0;d<a.actions.length;d++){var b=a.actions[d],c=[];null!=b.select&&this.isEnabled()&&(c=this.getCellsForAction(b.select),this.setSelectionCells(c));null!=b.highlight&&(c=this.getCellsForAction(b.highlight),this.highlightCells(c,b.highlight.color,b.highlight.duration,b.highlight.opacity));null!=b.scroll&&(c=this.getCellsForAction(b.scroll));0<c.length&&this.scrollCellToVisible(c[0])}}};Graph.prototype.updateCustomLinksForCell=function(a,d){var b=this.getLinkForCell(d);
@@ -3032,30 +3033,30 @@ STENCIL_PATH+"/flowchart.xml"];mxStencilRegistry.libraries.ios=[SHAPES_PATH+"/mo
[SHAPES_PATH+"/mockup/mxMockupText.js"];mxStencilRegistry.libraries.floorplan=[SHAPES_PATH+"/mxFloorplan.js",STENCIL_PATH+"/floorplan.xml"];mxStencilRegistry.libraries.bootstrap=[SHAPES_PATH+"/mxBootstrap.js",SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.xml"];mxStencilRegistry.libraries.gcp2=[SHAPES_PATH+"/mxGCP2.js",STENCIL_PATH+"/gcp2.xml"];mxStencilRegistry.libraries.ibm=[SHAPES_PATH+"/mxIBM.js",STENCIL_PATH+
"/ibm.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=
[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.aws4=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.aws4b=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.veeam=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam.xml"];mxStencilRegistry.libraries.veeam2=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam2.xml"];mxStencilRegistry.libraries.pid2inst=
-[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(a){var d=null;null!=a&&0<a.length&&("ER"==a.substring(0,2)?d="mxgraph.er":"sysML"==a.substring(0,5)&&(d="mxgraph.sysml"));return d};var F=mxMarker.createMarker;mxMarker.createMarker=
-function(a,d,b,c,f,e,g,l,n,p){if(null!=b&&null==mxMarker.markers[b]){var t=this.getPackageForType(b);null!=t&&mxStencilRegistry.getStencil(t)}return F.apply(this,arguments)};PrintDialog.prototype.create=function(a,d){function b(){m.value=Math.max(1,Math.min(l,Math.max(parseInt(m.value),parseInt(x.value))));x.value=Math.max(1,Math.min(l,Math.min(parseInt(m.value),parseInt(x.value))))}function c(d){function b(d,b,e){var g=d.useCssTransforms,l=d.currentTranslate,n=d.currentScale,p=d.view.translate,t=
-d.view.scale;d.useCssTransforms&&(d.useCssTransforms=!1,d.currentTranslate=new mxPoint(0,0),d.currentScale=1,d.view.translate=new mxPoint(0,0),d.view.scale=1);var k=d.getGraphBounds(),x=0,m=0,A=na.get(),z=1/d.pageScale,D=C.checked;if(D)var z=parseInt(S.value),q=parseInt(ca.value),z=Math.min(A.height*q/(k.height/d.view.scale),A.width*z/(k.width/d.view.scale));else z=parseInt(v.value)/(100*d.pageScale),isNaN(z)&&(c=1/d.pageScale,v.value="100 %");A=mxRectangle.fromRectangle(A);A.width=Math.ceil(A.width*
-c);A.height=Math.ceil(A.height*c);z*=c;!D&&d.pageVisible?(k=d.getPageLayout(),x-=k.x*A.width,m-=k.y*A.height):D=!0;if(null==b){b=PrintDialog.createPrintPreview(d,z,A,0,x,m,D);b.pageSelector=!1;b.mathEnabled=!1;x=a.getCurrentFile();null!=x&&(b.title=x.getTitle());var E=b.writeHead;b.writeHead=function(b){E.apply(this,arguments);null!=a.editor.fontCss&&(b.writeln('<style type="text/css">'),b.writeln(a.editor.fontCss),b.writeln("</style>"));if(null!=d.extFonts)for(var c=0;c<d.extFonts.length;c++){var f=
-d.extFonts[c].name,e=d.extFonts[c].url;0==e.indexOf(Editor.GOOGLE_FONTS)?b.writeln('<link rel="stylesheet" href="'+e+'" charset="UTF-8" type="text/css">'):(b.writeln('<style type="text/css">'),b.writeln('@font-face {\n\tfont-family: "'+f+'";\n\tsrc: url("'+e+'");\n}'),b.writeln("</style>"))}};if("undefined"!==typeof MathJax){var F=b.renderPage;b.renderPage=function(d,b,c,f,e,g){var l=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!a.editor.useForeignObjectForMath?!0:a.editor.originalNoForeignObject;
-var n=F.apply(this,arguments);mxClient.NO_FO=l;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:n.className="geDisableMathJax";return n}}x=null;null!=f.themes&&"darkTheme"==f.defaultThemeName&&(x=f.stylesheet,f.stylesheet=f.getDefaultStylesheet(),f.refresh());b.open(null,null,e,!0);null!=x&&(f.stylesheet=x,f.refresh())}else{A=d.background;if(null==A||""==A||A==mxConstants.NONE)A="#ffffff";b.backgroundColor=A;b.autoOrigin=D;b.appendGraph(d,z,x,m,e,!0);if(null!=d.extFonts&&null!=b.wnd)for(e=
-0;e<d.extFonts.length;e++)x=d.extFonts[e].name,m=d.extFonts[e].url,0==m.indexOf(Editor.GOOGLE_FONTS)?b.wnd.document.writeln('<link rel="stylesheet" href="'+m+'" charset="UTF-8" type="text/css">'):(b.wnd.document.writeln('<style type="text/css">'),b.wnd.document.writeln('@font-face {\n\tfont-family: "'+x+'";\n\tsrc: url("'+m+'");\n}'),b.wnd.document.writeln("</style>"))}g&&(d.useCssTransforms=g,d.currentTranslate=l,d.currentScale=n,d.view.translate=p,d.view.scale=t);return b}var c=parseInt(I.value)/
-100;isNaN(c)&&(c=1,I.value="100 %");var c=.75*c,e=x.value,g=m.value,l=!t.checked,p=null;l&&(l=e==n&&g==n);if(!l&&null!=a.pages&&a.pages.length){var k=0,l=a.pages.length-1;t.checked||(k=parseInt(e)-1,l=parseInt(g)-1);for(var A=k;A<=l;A++){var z=a.pages[A],e=z==a.currentPage?f:null;if(null==e){var e=a.createTemporaryGraph(f.getStylesheet()),g=!0,k=!1,D=null,q=null;null==z.viewState&&null==z.root&&a.updatePageRoot(z);null!=z.viewState&&(g=z.viewState.pageVisible,k=z.viewState.mathEnabled,D=z.viewState.background,
-q=z.viewState.backgroundImage,e.extFonts=z.viewState.extFonts);e.background=D;e.backgroundImage=null!=q?new mxImage(q.src,q.width,q.height):null;e.pageVisible=g;e.mathEnabled=k;var E=e.getGlobalVariable;e.getGlobalVariable=function(d){return"page"==d?z.getName():"pagenumber"==d?A+1:"pagecount"==d?null!=a.pages?a.pages.length:1:E.apply(this,arguments)};document.body.appendChild(e.container);a.updatePageRoot(z);e.model.setRoot(z.root)}p=b(e,p,A!=l);e!=f&&e.container.parentNode.removeChild(e.container)}}else p=
+[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 d=null;null!=a&&0<a.length&&("ER"==a.substring(0,2)?d="mxgraph.er":"sysML"==a.substring(0,5)&&(d="mxgraph.sysml"));return d};var G=mxMarker.createMarker;mxMarker.createMarker=
+function(a,d,b,c,f,e,g,l,n,p){if(null!=b&&null==mxMarker.markers[b]){var t=this.getPackageForType(b);null!=t&&mxStencilRegistry.getStencil(t)}return G.apply(this,arguments)};PrintDialog.prototype.create=function(a,d){function b(){m.value=Math.max(1,Math.min(l,Math.max(parseInt(m.value),parseInt(x.value))));x.value=Math.max(1,Math.min(l,Math.min(parseInt(m.value),parseInt(x.value))))}function c(d){function b(d,b,e){var g=d.useCssTransforms,l=d.currentTranslate,n=d.currentScale,p=d.view.translate,t=
+d.view.scale;d.useCssTransforms&&(d.useCssTransforms=!1,d.currentTranslate=new mxPoint(0,0),d.currentScale=1,d.view.translate=new mxPoint(0,0),d.view.scale=1);var k=d.getGraphBounds(),x=0,m=0,A=na.get(),z=1/d.pageScale,D=C.checked;if(D)var z=parseInt(S.value),E=parseInt(ca.value),z=Math.min(A.height*E/(k.height/d.view.scale),A.width*z/(k.width/d.view.scale));else z=parseInt(v.value)/(100*d.pageScale),isNaN(z)&&(c=1/d.pageScale,v.value="100 %");A=mxRectangle.fromRectangle(A);A.width=Math.ceil(A.width*
+c);A.height=Math.ceil(A.height*c);z*=c;!D&&d.pageVisible?(k=d.getPageLayout(),x-=k.x*A.width,m-=k.y*A.height):D=!0;if(null==b){b=PrintDialog.createPrintPreview(d,z,A,0,x,m,D);b.pageSelector=!1;b.mathEnabled=!1;x=a.getCurrentFile();null!=x&&(b.title=x.getTitle());var q=b.writeHead;b.writeHead=function(b){q.apply(this,arguments);null!=a.editor.fontCss&&(b.writeln('<style type="text/css">'),b.writeln(a.editor.fontCss),b.writeln("</style>"));if(null!=d.extFonts)for(var c=0;c<d.extFonts.length;c++){var f=
+d.extFonts[c].name,e=d.extFonts[c].url;0==e.indexOf(Editor.GOOGLE_FONTS)?b.writeln('<link rel="stylesheet" href="'+e+'" charset="UTF-8" type="text/css">'):(b.writeln('<style type="text/css">'),b.writeln('@font-face {\n\tfont-family: "'+f+'";\n\tsrc: url("'+e+'");\n}'),b.writeln("</style>"))}};if("undefined"!==typeof MathJax){var G=b.renderPage;b.renderPage=function(d,b,c,f,e,g){var l=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!a.editor.useForeignObjectForMath?!0:a.editor.originalNoForeignObject;
+var n=G.apply(this,arguments);mxClient.NO_FO=l;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:n.className="geDisableMathJax";return n}}x=null;null!=f.themes&&"darkTheme"==f.defaultThemeName&&(x=f.stylesheet,f.stylesheet=f.getDefaultStylesheet(),f.refresh());b.open(null,null,e,!0);null!=x&&(f.stylesheet=x,f.refresh())}else{A=d.background;if(null==A||""==A||A==mxConstants.NONE)A="#ffffff";b.backgroundColor=A;b.autoOrigin=D;b.appendGraph(d,z,x,m,e,!0);if(null!=d.extFonts&&null!=b.wnd)for(e=
+0;e<d.extFonts.length;e++)x=d.extFonts[e].name,m=d.extFonts[e].url,0==m.indexOf(Editor.GOOGLE_FONTS)?b.wnd.document.writeln('<link rel="stylesheet" href="'+m+'" charset="UTF-8" type="text/css">'):(b.wnd.document.writeln('<style type="text/css">'),b.wnd.document.writeln('@font-face {\n\tfont-family: "'+x+'";\n\tsrc: url("'+m+'");\n}'),b.wnd.document.writeln("</style>"))}g&&(d.useCssTransforms=g,d.currentTranslate=l,d.currentScale=n,d.view.translate=p,d.view.scale=t);return b}var c=parseInt(J.value)/
+100;isNaN(c)&&(c=1,J.value="100 %");var c=.75*c,e=x.value,g=m.value,l=!t.checked,p=null;l&&(l=e==n&&g==n);if(!l&&null!=a.pages&&a.pages.length){var k=0,l=a.pages.length-1;t.checked||(k=parseInt(e)-1,l=parseInt(g)-1);for(var A=k;A<=l;A++){var z=a.pages[A],e=z==a.currentPage?f:null;if(null==e){var e=a.createTemporaryGraph(f.getStylesheet()),g=!0,k=!1,D=null,E=null;null==z.viewState&&null==z.root&&a.updatePageRoot(z);null!=z.viewState&&(g=z.viewState.pageVisible,k=z.viewState.mathEnabled,D=z.viewState.background,
+E=z.viewState.backgroundImage,e.extFonts=z.viewState.extFonts);e.background=D;e.backgroundImage=null!=E?new mxImage(E.src,E.width,E.height):null;e.pageVisible=g;e.mathEnabled=k;var q=e.getGlobalVariable;e.getGlobalVariable=function(d){return"page"==d?z.getName():"pagenumber"==d?A+1:"pagecount"==d?null!=a.pages?a.pages.length:1:q.apply(this,arguments)};document.body.appendChild(e.container);a.updatePageRoot(z);e.model.setRoot(z.root)}p=b(e,p,A!=l);e!=f&&e.container.parentNode.removeChild(e.container)}}else p=
b(f);null==p?a.handleError({message:mxResources.get("errorUpdatingPreview")}):(p.mathEnabled&&(l=p.wnd.document,l.writeln('<script type="text/x-mathjax-config">'),l.writeln("MathJax.Hub.Config({"),l.writeln("showMathMenu: false,"),l.writeln('messageStyle: "none",'),l.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],'),l.writeln('extensions: ["tex2jax.js", "mml2jax.js", "asciimath2jax.js"],'),l.writeln('"HTML-CSS": {'),l.writeln("imageFont: null"),l.writeln("},"),l.writeln("TeX: {"),
l.writeln('extensions: ["AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js"]'),l.writeln("},"),l.writeln("tex2jax: {"),l.writeln('\tignoreClass: "geDisableMathJax"'),l.writeln("},"),l.writeln("asciimath2jax: {"),l.writeln('\tignoreClass: "geDisableMathJax"'),l.writeln("}"),l.writeln("});"),d&&(l.writeln("MathJax.Hub.Queue(function () {"),l.writeln("window.print();"),l.writeln("});")),l.writeln("\x3c/script>"),l.writeln('<script type="text/javascript" src="'+DRAW_MATH_URL+'/MathJax.js">\x3c/script>')),
p.closeDocument(),!p.mathEnabled&&d&&PrintDialog.printPreview(p))}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,d||mxResources.get("print"));e.appendChild(g);var l=1,n=1,p=document.createElement("div");p.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var t=document.createElement("input");t.style.cssText="margin-right:8px;margin-bottom:8px;";
t.setAttribute("value","all");t.setAttribute("type","radio");t.setAttribute("name","pages-printdialog");p.appendChild(t);g=document.createElement("span");mxUtils.write(g,mxResources.get("printAllPages"));p.appendChild(g);mxUtils.br(p);var k=t.cloneNode(!0);t.setAttribute("checked","checked");k.setAttribute("value","range");p.appendChild(k);g=document.createElement("span");mxUtils.write(g,mxResources.get("pages")+":");p.appendChild(g);var x=document.createElement("input");x.style.cssText="margin:0 8px 0 8px;";
x.setAttribute("value","1");x.setAttribute("type","number");x.setAttribute("min","1");x.style.width="50px";p.appendChild(x);g=document.createElement("span");mxUtils.write(g,mxResources.get("to"));p.appendChild(g);var m=x.cloneNode(!0);p.appendChild(m);mxEvent.addListener(x,"focus",function(){k.checked=!0});mxEvent.addListener(m,"focus",function(){k.checked=!0});mxEvent.addListener(x,"change",b);mxEvent.addListener(m,"change",b);if(null!=a.pages&&(l=a.pages.length,null!=a.currentPage))for(g=0;g<a.pages.length;g++)if(a.currentPage==
a.pages[g]){n=g+1;x.value=n;m.value=n;break}x.setAttribute("max",l);m.setAttribute("max",l);1<l&&e.appendChild(p);var A=document.createElement("div");A.style.marginBottom="10px";var z=document.createElement("input");z.style.marginRight="8px";z.setAttribute("value","adjust");z.setAttribute("type","radio");z.setAttribute("name","printZoom");A.appendChild(z);g=document.createElement("span");mxUtils.write(g,mxResources.get("adjustTo"));A.appendChild(g);var v=document.createElement("input");v.style.cssText=
-"margin:0 8px 0 8px;";v.setAttribute("value","100 %");v.style.width="50px";A.appendChild(v);mxEvent.addListener(v,"focus",function(){z.checked=!0});e.appendChild(A);var p=p.cloneNode(!1),C=z.cloneNode(!0);C.setAttribute("value","fit");z.setAttribute("checked","checked");g=document.createElement("div");g.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";g.appendChild(C);p.appendChild(g);A=document.createElement("table");A.style.display="inline-block";var q=document.createElement("tbody"),
-E=document.createElement("tr"),F=E.cloneNode(!0),u=document.createElement("td"),y=u.cloneNode(!0),L=u.cloneNode(!0),B=u.cloneNode(!0),ka=u.cloneNode(!0),P=u.cloneNode(!0);u.style.textAlign="right";B.style.textAlign="right";mxUtils.write(u,mxResources.get("fitTo"));var S=document.createElement("input");S.style.cssText="margin:0 8px 0 8px;";S.setAttribute("value","1");S.setAttribute("min","1");S.setAttribute("type","number");S.style.width="40px";y.appendChild(S);g=document.createElement("span");mxUtils.write(g,
-mxResources.get("fitToSheetsAcross"));L.appendChild(g);mxUtils.write(B,mxResources.get("fitToBy"));var ca=S.cloneNode(!0);ka.appendChild(ca);mxEvent.addListener(S,"focus",function(){C.checked=!0});mxEvent.addListener(ca,"focus",function(){C.checked=!0});g=document.createElement("span");mxUtils.write(g,mxResources.get("fitToSheetsDown"));P.appendChild(g);E.appendChild(u);E.appendChild(y);E.appendChild(L);F.appendChild(B);F.appendChild(ka);F.appendChild(P);q.appendChild(E);q.appendChild(F);A.appendChild(q);
+"margin:0 8px 0 8px;";v.setAttribute("value","100 %");v.style.width="50px";A.appendChild(v);mxEvent.addListener(v,"focus",function(){z.checked=!0});e.appendChild(A);var p=p.cloneNode(!1),C=z.cloneNode(!0);C.setAttribute("value","fit");z.setAttribute("checked","checked");g=document.createElement("div");g.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";g.appendChild(C);p.appendChild(g);A=document.createElement("table");A.style.display="inline-block";var E=document.createElement("tbody"),
+q=document.createElement("tr"),G=q.cloneNode(!0),u=document.createElement("td"),y=u.cloneNode(!0),I=u.cloneNode(!0),B=u.cloneNode(!0),ka=u.cloneNode(!0),P=u.cloneNode(!0);u.style.textAlign="right";B.style.textAlign="right";mxUtils.write(u,mxResources.get("fitTo"));var S=document.createElement("input");S.style.cssText="margin:0 8px 0 8px;";S.setAttribute("value","1");S.setAttribute("min","1");S.setAttribute("type","number");S.style.width="40px";y.appendChild(S);g=document.createElement("span");mxUtils.write(g,
+mxResources.get("fitToSheetsAcross"));I.appendChild(g);mxUtils.write(B,mxResources.get("fitToBy"));var ca=S.cloneNode(!0);ka.appendChild(ca);mxEvent.addListener(S,"focus",function(){C.checked=!0});mxEvent.addListener(ca,"focus",function(){C.checked=!0});g=document.createElement("span");mxUtils.write(g,mxResources.get("fitToSheetsDown"));P.appendChild(g);q.appendChild(u);q.appendChild(y);q.appendChild(I);G.appendChild(B);G.appendChild(ka);G.appendChild(P);E.appendChild(q);E.appendChild(G);A.appendChild(E);
p.appendChild(A);e.appendChild(p);p=document.createElement("div");g=document.createElement("div");g.style.fontWeight="bold";g.style.marginBottom="12px";mxUtils.write(g,mxResources.get("paperSize"));p.appendChild(g);g=document.createElement("div");g.style.marginBottom="12px";var na=PageSetupDialog.addPageFormatPanel(g,"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);p.appendChild(g);g=document.createElement("span");mxUtils.write(g,mxResources.get("pageScale"));p.appendChild(g);
-var I=document.createElement("input");I.style.cssText="margin:0 8px 0 8px;";I.setAttribute("value","100 %");I.style.width="60px";p.appendChild(I);e.appendChild(p);g=document.createElement("div");g.style.cssText="text-align:right;margin:48px 0 0 0;";p=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});p.className="geBtn";a.editor.cancelFirst&&g.appendChild(p);a.isOffline()||(A=mxUtils.button(mxResources.get("help"),function(){f.openLink("https://desk.draw.io/support/solutions/articles/16000048947")}),
+var J=document.createElement("input");J.style.cssText="margin:0 8px 0 8px;";J.setAttribute("value","100 %");J.style.width="60px";p.appendChild(J);e.appendChild(p);g=document.createElement("div");g.style.cssText="text-align:right;margin:48px 0 0 0;";p=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});p.className="geBtn";a.editor.cancelFirst&&g.appendChild(p);a.isOffline()||(A=mxUtils.button(mxResources.get("help"),function(){f.openLink("https://desk.draw.io/support/solutions/articles/16000048947")}),
A.className="geBtn",g.appendChild(A));PrintDialog.previewEnabled&&(A=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();c(!1)}),A.className="geBtn",g.appendChild(A));A=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();c(!0)});A.className="geBtn gePrimaryBtn";g.appendChild(A);a.editor.cancelFirst||g.appendChild(p);e.appendChild(g);this.container=e};var z=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)):(z.apply(this,arguments),null!=this.mathEnabled&&
this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible))};Editor.prototype.useCanvasForExport=!1;try{var E=document.createElement("canvas"),C=new Image;C.onload=function(){try{E.getContext("2d").drawImage(C,0,0);var a=E.toDataURL("image/png");Editor.prototype.useCanvasForExport=
-null!=a&&6<a.length}catch(L){}};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(v){}})();
+null!=a&&6<a.length}catch(I){}};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(v){}})();
(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,e,c){c.ui=a.ui;return e};a.afterDecode=function(a,e,c){c.previousColor=c.color;c.previousImage=c.image;c.previousFormat=c.format;null!=c.foldingEnabled&&(c.foldingEnabled=!c.foldingEnabled);null!=c.mathEnabled&&(c.mathEnabled=!c.mathEnabled);null!=c.shadowVisible&&(c.shadowVisible=!c.shadowVisible);return c};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="@DRAWIO-VERSION@";EditorUi.compactUi="atlas"!=uiTheme;mxGraphView.prototype.defaultDarkGridColor="#6e6e6e";"dark"==uiTheme&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars=
"\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl="1"==urlParams.dev?"/cache":window.REALTIME_URL;null==EditorUi.cacheUrl&&"undefined"!==typeof DrawioFile&&(DrawioFile.SYNC="none");Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&isLocalStorage&&
!EditorUi.isElectronApp&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://desk.draw.io/support/solutions/articles/16000042367";EditorUi.defaultMermaidConfig={theme:"neutral",arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!1},sequence:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,
@@ -3065,24 +3066,24 @@ console.error(n,a,b,c,e,l)}catch(t){}};EditorUi.logEvent=function(a){if("1"==url
b&&(a=a.substring(0,b)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(a))}catch(g){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var a=[(new Date).toISOString()],b=0;b<arguments.length;b++)null!=arguments[b]&&a.push(arguments[b]);console.log.apply(console,a)}}catch(g){}};EditorUi.parsePng=function(a,b,c){function d(a,d){var b=e;e+=d;return a.substring(b,
e)}function f(a){a=d(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}var e=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 g=d(a,4);if(null!=b&&b(e-8,g,c))break;value=d(a,c);d(a,4);if("IEND"==g)break}while(c)}};EditorUi.removeChildNodes=function(a){for(;null!=a.firstChild;)a.removeChild(a.firstChild)};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';
EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.timeout=Editor.prototype.timeout;EditorUi.prototype.sidebarFooterHeight=38;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";
-EditorUi.prototype.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.maxTextBytes=5E5;EditorUi.prototype.currentFile=
-null;EditorUi.prototype.printPdfExport=!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;EditorUi.prototype.insertTemplateEnabled=!0;EditorUi.prototype.closableScratchpad=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var a=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!a.getContext||!a.getContext("2d"))}catch(l){}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(n){}};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(l){}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(l){}})();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.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(a){return this.isOfflineApp()||!navigator.onLine||!a&&"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,e){var g=!1;this.active||(f.call(this,c),this.active=!0,null!=e&&(g=document.createElement("div"),g.style.position="absolute",g.style.whiteSpace="nowrap",g.style.background="#4B4243",g.style.color="white",g.style.fontFamily="Helvetica, Arial",g.style.fontSize="9pt",g.style.padding="6px",g.style.paddingLeft=
-"10px",g.style.paddingRight="10px",g.style.zIndex=2E9,g.style.left=Math.max(0,a)+"px",g.style.top=Math.max(0,b+70)+"px",mxUtils.setPrefixedStyle(g.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(g.style,"transform","translate(-50%,-50%)"),"dark"!=uiTheme&&mxUtils.setPrefixedStyle(g.style,"boxShadow","2px 2px 3px 0px #ddd"),"..."!=e.substring(e.length-3,e.length)&&"!"!=e.charAt(e.length-1)&&(e+="..."),g.innerHTML=e,c.appendChild(g),d.status=g,mxClient.IS_VML&&(null==document.documentMode||8>=
-document.documentMode)&&(g.style.left=Math.round(Math.max(0,a-g.offsetWidth/2))+"px",g.style.top=Math.round(Math.max(0,b+70-g.offsetHeight/2))+"px")),this.pause=mxUtils.bind(this,function(){var a=function(){};this.active&&(a=mxUtils.bind(this,function(){this.spin(c,e)}));this.stop();return a}),g=!0);return g};var e=d.stop;d.stop=function(){e.call(this);this.active=!1;null!=d.status&&null!=d.status.parentNode&&d.status.parentNode.removeChild(d.status);d.status=null};d.pause=function(){return function(){}};
-return d};EditorUi.prototype.isCompatibleString=function(a){try{var d=mxUtils.parseXml(a),b=this.editor.extractGraphModel(d.documentElement,!0);return null!=b&&0==b.getElementsByTagName("parsererror").length}catch(p){}return!1};EditorUi.prototype.isVisioData=function(a){return 8<a.length&&208==a.charCodeAt(0)&&207==a.charCodeAt(1)&&17==a.charCodeAt(2)&&224==a.charCodeAt(3)&&161==a.charCodeAt(4)&&177==a.charCodeAt(5)&&26==a.charCodeAt(6)&&225==a.charCodeAt(7)||80==a.charCodeAt(0)&&75==a.charCodeAt(1)&&
-3==a.charCodeAt(2)&&4==a.charCodeAt(3)||80==a.charCodeAt(0)&&75==a.charCodeAt(1)&&3==a.charCodeAt(2)&&6==a.charCodeAt(3)};EditorUi.prototype.isPngData=function(a){return 8<a.length&&137==a.charCodeAt(0)&&80==a.charCodeAt(1)&&78==a.charCodeAt(2)&&71==a.charCodeAt(3)&&13==a.charCodeAt(4)&&10==a.charCodeAt(5)&&26==a.charCodeAt(6)&&10==a.charCodeAt(7)};var a=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(d){var b=a.apply(this,arguments);if(null==b)try{var c=
-d.indexOf("&lt;mxfile ");if(0<=c){var e=d.lastIndexOf("&lt;/mxfile&gt;");e>c&&(b=d.substring(c,e+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var l=mxUtils.parseXml(d),n=this.editor.extractGraphModel(l.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility),b=null!=n?mxUtils.getXml(n):""}catch(A){}return b};EditorUi.prototype.validateFileData=function(a){if(null!=a&&0<a.length){var d=a.indexOf('<meta charset="utf-8">');
-0<=d&&(a=a.slice(0,d)+'<meta charset="utf-8"/>'+a.slice(d+23-1,a.length));a=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 d=null!=a?this.editor.extractGraphModel(a,!0):null;null!=d&&(a=d);if(null!=a){d=this.editor.graph;d.model.beginUpdate();try{var b=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 n=this.updatePageRoot(new DiagramPage(c[e]));null==n.getName()&&n.setName(mxResources.get("pageWithNumber",[e+1]));d.model.execute(new ChangePage(this,n,0==e?n: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])),d.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!=b)for(e=0;e<b.length;e++)d.model.execute(new ChangePage(this,b[e],null))}finally{d.model.endUpdate()}}};EditorUi.prototype.createFileData=function(a,b,c,e,l,n,k,x,t,m,z){b=null!=b?b:this.editor.graph;l=null!=l?l:!1;t=null!=t?t:!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 g=a;if("mxfile"!=g.nodeName.toLowerCase()){if(z){var p=a.ownerDocument.createElement("diagram");p.setAttribute("id",Editor.guid());p.appendChild(a)}else{p=Graph.zapGremlins(mxUtils.getXml(a));g=Graph.compress(p);if(Graph.decompress(g)!=p)return p;p=a.ownerDocument.createElement("diagram");p.setAttribute("id",Editor.guid());mxUtils.setTextContent(p,g)}g=a.ownerDocument.createElement("mxfile");g.appendChild(p)}m?(g=g.cloneNode(!0),g.removeAttribute("modified"),
+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.maxTextWidth=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.maxTextBytes=
+5E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.printPdfExport=!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;EditorUi.prototype.insertTemplateEnabled=!0;EditorUi.prototype.closableScratchpad=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var a=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!a.getContext||!a.getContext("2d"))}catch(l){}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(n){}};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(l){}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(l){}})();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.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(a){return this.isOfflineApp()||!navigator.onLine||!a&&"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,e){var g=!1;this.active||(f.call(this,c),this.active=!0,null!=e&&(g=document.createElement("div"),g.style.position="absolute",g.style.whiteSpace="nowrap",g.style.background="#4B4243",g.style.color="white",g.style.fontFamily="Helvetica, Arial",g.style.fontSize=
+"9pt",g.style.padding="6px",g.style.paddingLeft="10px",g.style.paddingRight="10px",g.style.zIndex=2E9,g.style.left=Math.max(0,a)+"px",g.style.top=Math.max(0,b+70)+"px",mxUtils.setPrefixedStyle(g.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(g.style,"transform","translate(-50%,-50%)"),"dark"!=uiTheme&&mxUtils.setPrefixedStyle(g.style,"boxShadow","2px 2px 3px 0px #ddd"),"..."!=e.substring(e.length-3,e.length)&&"!"!=e.charAt(e.length-1)&&(e+="..."),g.innerHTML=e,c.appendChild(g),d.status=g,mxClient.IS_VML&&
+(null==document.documentMode||8>=document.documentMode)&&(g.style.left=Math.round(Math.max(0,a-g.offsetWidth/2))+"px",g.style.top=Math.round(Math.max(0,b+70-g.offsetHeight/2))+"px")),this.pause=mxUtils.bind(this,function(){var a=function(){};this.active&&(a=mxUtils.bind(this,function(){this.spin(c,e)}));this.stop();return a}),g=!0);return g};var e=d.stop;d.stop=function(){e.call(this);this.active=!1;null!=d.status&&null!=d.status.parentNode&&d.status.parentNode.removeChild(d.status);d.status=null};
+d.pause=function(){return function(){}};return d};EditorUi.prototype.isCompatibleString=function(a){try{var d=mxUtils.parseXml(a),b=this.editor.extractGraphModel(d.documentElement,!0);return null!=b&&0==b.getElementsByTagName("parsererror").length}catch(p){}return!1};EditorUi.prototype.isVisioData=function(a){return 8<a.length&&208==a.charCodeAt(0)&&207==a.charCodeAt(1)&&17==a.charCodeAt(2)&&224==a.charCodeAt(3)&&161==a.charCodeAt(4)&&177==a.charCodeAt(5)&&26==a.charCodeAt(6)&&225==a.charCodeAt(7)||
+80==a.charCodeAt(0)&&75==a.charCodeAt(1)&&3==a.charCodeAt(2)&&4==a.charCodeAt(3)||80==a.charCodeAt(0)&&75==a.charCodeAt(1)&&3==a.charCodeAt(2)&&6==a.charCodeAt(3)};EditorUi.prototype.isPngData=function(a){return 8<a.length&&137==a.charCodeAt(0)&&80==a.charCodeAt(1)&&78==a.charCodeAt(2)&&71==a.charCodeAt(3)&&13==a.charCodeAt(4)&&10==a.charCodeAt(5)&&26==a.charCodeAt(6)&&10==a.charCodeAt(7)};var a=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(d){var b=
+a.apply(this,arguments);if(null==b)try{var c=d.indexOf("&lt;mxfile ");if(0<=c){var e=d.lastIndexOf("&lt;/mxfile&gt;");e>c&&(b=d.substring(c,e+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var l=mxUtils.parseXml(d),n=this.editor.extractGraphModel(l.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility),b=null!=n?mxUtils.getXml(n):""}catch(x){}return b};EditorUi.prototype.validateFileData=function(a){if(null!=a&&0<a.length){var d=
+a.indexOf('<meta charset="utf-8">');0<=d&&(a=a.slice(0,d)+'<meta charset="utf-8"/>'+a.slice(d+23-1,a.length));a=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 d=null!=a?this.editor.extractGraphModel(a,!0):null;null!=d&&(a=d);if(null!=a){d=this.editor.graph;d.model.beginUpdate();try{var b=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 n=this.updatePageRoot(new DiagramPage(c[e]));null==n.getName()&&n.setName(mxResources.get("pageWithNumber",[e+1]));d.model.execute(new ChangePage(this,n,0==e?n: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])),d.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!=b)for(e=0;e<b.length;e++)d.model.execute(new ChangePage(this,b[e],null))}finally{d.model.endUpdate()}}};EditorUi.prototype.createFileData=function(a,b,c,e,l,n,k,m,t,q,z){b=null!=b?b:this.editor.graph;l=null!=l?l:!1;t=null!=t?t:!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 g=a;if("mxfile"!=g.nodeName.toLowerCase()){if(z){var p=a.ownerDocument.createElement("diagram");p.setAttribute("id",Editor.guid());p.appendChild(a)}else{p=Graph.zapGremlins(mxUtils.getXml(a));g=Graph.compress(p);if(Graph.decompress(g)!=p)return p;p=a.ownerDocument.createElement("diagram");p.setAttribute("id",Editor.guid());mxUtils.setTextContent(p,g)}g=a.ownerDocument.createElement("mxfile");g.appendChild(p)}q?(g=g.cloneNode(!0),g.removeAttribute("modified"),
g.removeAttribute("host"),g.removeAttribute("agent"),g.removeAttribute("etag"),g.removeAttribute("userAgent"),g.removeAttribute("version"),g.removeAttribute("editor"),g.removeAttribute("type")):(g.removeAttribute("userAgent"),g.removeAttribute("version"),g.removeAttribute("editor"),g.removeAttribute("pages"),g.removeAttribute("type"),mxClient.IS_CHROMEAPP?g.setAttribute("host","Chrome"):EditorUi.isElectronApp?g.setAttribute("host","Electron"):g.setAttribute("host",window.location.hostname),g.setAttribute("modified",
(new Date).toISOString()),g.setAttribute("agent",navigator.appVersion),g.setAttribute("version",EditorUi.VERSION),g.setAttribute("etag",Editor.guid()),a=null!=c?c.getMode():this.mode,null!=a&&g.setAttribute("type",a),1<g.getElementsByTagName("diagram").length&&null!=this.pages&&g.setAttribute("pages",this.pages.length));z=z?mxUtils.getPrettyXml(g):mxUtils.getXml(g);if(!n&&!l&&(k||null!=c&&/(\.html)$/i.test(c.getTitle())))z=this.getHtml2(mxUtils.getXml(g),b,null!=c?c.getTitle():null,d,f);else if(n||
-!l&&null!=c&&/(\.svg)$/i.test(c.getTitle()))null==c||c.getMode()!=App.MODE_DEVICE&&c.getMode()!=App.MODE_BROWSER||(e=null),z=this.getEmbeddedSvg(z,b,e,null,x,t,f);return z};EditorUi.prototype.getXmlFileData=function(a,b,c){a=null!=a?a:!0;b=null!=b?b:!1;c=null!=c?c:!Editor.compressXml;var d=this.editor.getGraphXml(a);if(a&&null!=this.fileNode&&null!=this.currentPage)if(a=function(a){var b=a.getElementsByTagName("mxGraphModel"),b=0<b.length?b[0]:null;null==b&&c?(b=mxUtils.trim(mxUtils.getTextContent(a)),
+!l&&null!=c&&/(\.svg)$/i.test(c.getTitle()))null==c||c.getMode()!=App.MODE_DEVICE&&c.getMode()!=App.MODE_BROWSER||(e=null),z=this.getEmbeddedSvg(z,b,e,null,m,t,f);return z};EditorUi.prototype.getXmlFileData=function(a,b,c){a=null!=a?a:!0;b=null!=b?b:!1;c=null!=c?c:!Editor.compressXml;var d=this.editor.getGraphXml(a);if(a&&null!=this.fileNode&&null!=this.currentPage)if(a=function(a){var b=a.getElementsByTagName("mxGraphModel"),b=0<b.length?b[0]:null;null==b&&c?(b=mxUtils.trim(mxUtils.getTextContent(a)),
a=a.cloneNode(!1),0<b.length&&(b=Graph.decompress(b),null!=b&&0<b.length&&a.appendChild(mxUtils.parseXml(b).documentElement))):null==b||c?a=a.cloneNode(!0):(a=a.cloneNode(!1),mxUtils.setTextContent(a,Graph.compressNode(b)));d.appendChild(a)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(d)),d=this.fileNode.cloneNode(!1),b)a(this.currentPage.node);else for(b=0;b<this.pages.length;b++){if(this.currentPage!=this.pages[b]&&this.pages[b].needsUpdate){var f=
(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(this.pages[b].root));this.editor.graph.saveViewState(this.pages[b].viewState,f);EditorUi.removeChildNodes(this.pages[b].node);mxUtils.setTextContent(this.pages[b].node,Graph.compressNode(f));delete this.pages[b].needsUpdate}a(this.pages[b].node)}return d};EditorUi.prototype.anonymizeString=function(a,b){for(var d=[],c=0;c<a.length;c++){var f=a.charAt(c);0<=EditorUi.ignoredAnonymizedChars.indexOf(f)?d.push(f):isNaN(parseInt(f))?f.toLowerCase()!=
f?d.push(String.fromCharCode(65+Math.round(25*Math.random()))):f.toUpperCase()!=f?d.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(f)?d.push(" "):d.push("?"):d.push(b?"0":Math.round(9*Math.random()))}return d.join("")};EditorUi.prototype.anonymizePatch=function(a){if(null!=a[EditorUi.DIFF_INSERT])for(var d=0;d<a[EditorUi.DIFF_INSERT].length;d++)try{var b=mxUtils.parseXml(a[EditorUi.DIFF_INSERT][d].data).documentElement.cloneNode(!1);null!=b.getAttribute("name")&&b.setAttribute("name",
@@ -3091,8 +3092,8 @@ this.anonymizeString(b.getAttribute("name")));a[EditorUi.DIFF_INSERT][d].data=mx
a.attributes[d].name&&a.setAttribute(a.attributes[d].name,this.anonymizeString(a.attributes[d].value,b));if(null!=a.childNodes)for(d=0;d<a.childNodes.length;d++)this.anonymizeAttributes(a.childNodes[d],b)};EditorUi.prototype.anonymizeNode=function(a,b){for(var d=a.getElementsByTagName("mxCell"),c=0;c<d.length;c++)null!=d[c].getAttribute("value")&&d[c].setAttribute("value","["+d[c].getAttribute("value").length+"]"),null!=d[c].getAttribute("xmlValue")&&d[c].setAttribute("xmlValue","["+d[c].getAttribute("xmlValue").length+
"]"),null!=d[c].getAttribute("style")&&d[c].setAttribute("style","["+d[c].getAttribute("style").length+"]"),null!=d[c].parentNode&&"root"!=d[c].parentNode.nodeName&&null!=d[c].parentNode.parentNode&&(d[c].setAttribute("id",d[c].parentNode.getAttribute("id")),d[c].parentNode.parentNode.replaceChild(d[c],d[c].parentNode));return a};EditorUi.prototype.synchronizeCurrentFile=function(a){var d=this.getCurrentFile();null!=d&&(d.savingFile?this.handleError({message:mxResources.get("busy")}):!a&&d.invalidChecksum?
d.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(d.clearAutosave(),this.editor.setStatus(""),a?d.reloadFile(mxUtils.bind(this,function(){d.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){d.handleFileError(a,!0)})):d.synchronizeFile(mxUtils.bind(this,function(){d.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){d.handleFileError(a,!0)}))))};EditorUi.prototype.getFileData=function(a,b,c,e,l,n,k,
-x,t,m){l=null!=l?l:!0;n=null!=n?n:!1;var d=this.editor.graph;if(b||!a&&null!=t&&/(\.svg)$/i.test(t.getTitle()))if(m=!1,null!=this.pages&&this.currentPage!=this.pages[0]){var f=d.getGlobalVariable,d=this.createTemporaryGraph(d.getStylesheet()),g=this.pages[0];d.getGlobalVariable=function(a){return"page"==a?g.getName():"pagenumber"==a?1:f.apply(this,arguments)};document.body.appendChild(d.container);d.model.setRoot(g.root)}k=null!=k?k:this.getXmlFileData(l,n,m);t=null!=t?t:this.getCurrentFile();a=this.createFileData(k,
-d,t,window.location.href,a,b,c,e,l,x,m);d!=this.editor.graph&&d.container.parentNode.removeChild(d.container);return a};EditorUi.prototype.getHtml=function(a,b,c,e,l,n){n=null!=n?n:!0;var d=null,f=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=b){var d=n?b.getGraphBounds():b.getBoundingBox(b.getSelectionCells()),g=b.view.scale;n=Math.floor(d.x/g-b.view.translate.x);g=Math.floor(d.y/g-b.view.translate.y);d=b.background;null==l&&(b=this.getBasenames().join(";"),0<b.length&&(f=EditorUi.drawHost+
+m,t,q){l=null!=l?l:!0;n=null!=n?n:!1;var d=this.editor.graph;if(b||!a&&null!=t&&/(\.svg)$/i.test(t.getTitle()))if(q=!1,null!=this.pages&&this.currentPage!=this.pages[0]){var f=d.getGlobalVariable,d=this.createTemporaryGraph(d.getStylesheet()),g=this.pages[0];d.getGlobalVariable=function(a){return"page"==a?g.getName():"pagenumber"==a?1:f.apply(this,arguments)};document.body.appendChild(d.container);d.model.setRoot(g.root)}k=null!=k?k:this.getXmlFileData(l,n,q);t=null!=t?t:this.getCurrentFile();a=this.createFileData(k,
+d,t,window.location.href,a,b,c,e,l,m,q);d!=this.editor.graph&&d.container.parentNode.removeChild(d.container);return a};EditorUi.prototype.getHtml=function(a,b,c,e,l,n){n=null!=n?n:!0;var d=null,f=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=b){var d=n?b.getGraphBounds():b.getBoundingBox(b.getSelectionCells()),g=b.view.scale;n=Math.floor(d.x/g-b.view.translate.x);g=Math.floor(d.y/g-b.view.translate.y);d=b.background;null==l&&(b=this.getBasenames().join(";"),0<b.length&&(f=EditorUi.drawHost+
"/embed.js?s="+b));a.setAttribute("x0",n);a.setAttribute("y0",g)}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!=l&&(l=l.replace(/&/g,"&amp;"));a=null!=a?Graph.zapGremlins(mxUtils.getXml(a)):"";e=Graph.compress(a);Graph.decompress(e)!=a&&(e=encodeURIComponent(a));return(null==l?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':
"")+"<!DOCTYPE html>\n<html"+(null!=l?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==l?null!=c?"<title>"+mxUtils.htmlEntities(c)+"</title>\n":"":"<title>Draw.io Diagram</title>\n")+(null!=l?'<meta http-equiv="refresh" content="0;URL=\''+l+"'\"/>\n":"")+"</head>\n<body"+(null==l&&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==l?'<script type="text/javascript" src="'+f+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+l+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(a,b,c,e,l){b=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer.min.js";null!=l&&(l=l.replace(/&/g,"&amp;"));a={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,
@@ -3100,14 +3101,14 @@ resize:!0,xml:Graph.zapGremlins(a),toolbar:"pages zoom layers lightbox"};null!=t
l+"'\"/>\n":"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(a))+'"></div>\n'+(null==l?'<script type="text/javascript" src="'+b+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+l+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=
function(a){a=this.validateFileData(a);this.pages=this.fileNode=this.currentPage=null;a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var d=Editor.extractParserError(a,mxResources.get("invalidOrMissingFile"));if(d)throw Error(mxResources.get("notADiagramFile")+" ("+d+")");d=null!=a?this.editor.extractGraphModel(a,!0):null;null!=d&&(a=d);if(null!=a&&"mxfile"==a.nodeName&&(d=a.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<d.length||1==d.length&&d[0].hasAttribute("name"))){var b=
null;this.fileNode=a;this.pages=[];for(var c=0;c<d.length;c++)null==d[c].getAttribute("id")&&d[c].setAttribute("id",c),a=new DiagramPage(d[c]),null==a.getName()&&a.setName(mxResources.get("pageWithNumber",[c+1])),this.pages.push(a),null!=urlParams["page-id"]&&a.getId()==urlParams["page-id"]&&(b=a);this.currentPage=null!=b?b: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);if(null!=urlParams["layer-ids"])try{var e=urlParams["layer-ids"].split(" ");a={};for(c=0;c<e.length;c++)a[e[c]]=!0;for(var n=this.editor.graph.getModel(),k=n.getChildren(n.root),c=0;c<k.length;c++){var x=k[c];n.setVisible(x,a[x.id]||
+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);if(null!=urlParams["layer-ids"])try{var e=urlParams["layer-ids"].split(" ");a={};for(c=0;c<e.length;c++)a[e[c]]=!0;for(var n=this.editor.graph.getModel(),k=n.getChildren(n.root),c=0;c<k.length;c++){var m=k[c];n.setVisible(m,a[m.id]||
!1)}}catch(t){}};EditorUi.prototype.getBaseFilename=function(a){var d=this.getCurrentFile(),d=null!=d&&null!=d.getTitle()?d.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(d)||/(\.html)$/i.test(d)||/(\.svg)$/i.test(d)||/(\.png)$/i.test(d)||/(\.drawio)$/i.test(d))d=d.substring(0,d.lastIndexOf("."));!a&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(d=d+"-"+this.currentPage.getName());return d};
-EditorUi.prototype.downloadFile=function(a,b,c,e,l,n,k,x,t,m,z){try{e=null!=e?e:this.editor.graph.isSelectionEmpty();var d=this.getBaseFilename(!l),f=d+"."+a;if("xml"==a){var g='<?xml version="1.0" encoding="UTF-8"?>\n'+this.getFileData(!0,null,null,null,e,l,null,null,null,b);this.saveData(f,a,g,"text/xml")}else if("html"==a)g=this.getHtml2(this.getFileData(!0),this.editor.graph,d),this.saveData(f,a,g,"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(d,b){try{var c=this.editor.graph.pageVisible;null!=n&&(this.editor.graph.pageVisible=n);var f=this.createDownloadRequest(d,a,e,b,k,l,x,t,m,z);this.editor.graph.pageVisible=c;return f}catch(ba){this.handleError(ba)}}));else{var p=null,A=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 q=this.editor.graph.background;if(k||q==mxConstants.NONE)q=null;var F=this.editor.graph.getSvg(q,null,null,null,null,e);c&&this.editor.graph.addSvgShadow(F);this.convertImages(F,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();A('<?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();A(a)}),e)}}catch(D){this.handleError(D)}};EditorUi.prototype.createDownloadRequest=function(a,b,c,e,l,n,k,x,t,m){var d=this.editor.graph,f=d.getGraphBounds();c=this.getFileData(!0,null,null,null,c,0==n?!1:"xmlpng"!=b);var g="",p="";if(f.width*f.height>MAX_AREA||c.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};m=m?"1":"0";"pdf"==b&&0==n&&(p="&allPages=1");if("xmlpng"==b&&(m="1",b="png",null!=this.pages&&null!=this.currentPage))for(n=
-0;n<this.pages.length;n++)if(this.pages[n]==this.currentPage){g="&from="+n;break}n=d.background;"png"==b&&l?n=mxConstants.NONE:l||null!=n&&n!=mxConstants.NONE||(n="#ffffff");l={globalVars:d.getExportVariables()};t&&(l.grid={size:d.gridSize,steps:d.view.gridSteps,color:d.view.gridColor});return new mxXmlRequest(EXPORT_URL,"format="+b+g+p+"&bg="+(null!=n?n:mxConstants.NONE)+"&base64="+e+"&embedXml="+m+"&xml="+encodeURIComponent(c)+(null!=a?"&filename="+encodeURIComponent(a):"")+"&extras="+encodeURIComponent(JSON.stringify(l))+
-(null!=k?"&scale="+k:"")+(null!=x?"&border="+x:""))};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"==
+EditorUi.prototype.downloadFile=function(a,b,c,e,l,n,k,m,t,q,z){try{e=null!=e?e:this.editor.graph.isSelectionEmpty();var d=this.getBaseFilename(!l),f=d+"."+a;if("xml"==a){var g='<?xml version="1.0" encoding="UTF-8"?>\n'+this.getFileData(!0,null,null,null,e,l,null,null,null,b);this.saveData(f,a,g,"text/xml")}else if("html"==a)g=this.getHtml2(this.getFileData(!0),this.editor.graph,d),this.saveData(f,a,g,"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(d,b){try{var c=this.editor.graph.pageVisible;null!=n&&(this.editor.graph.pageVisible=n);var f=this.createDownloadRequest(d,a,e,b,k,l,m,t,q,z);this.editor.graph.pageVisible=c;return f}catch(ba){this.handleError(ba)}}));else{var p=null,x=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 A=this.editor.graph.background;if(k||A==mxConstants.NONE)A=null;var u=this.editor.graph.getSvg(A,null,null,null,null,e);c&&this.editor.graph.addSvgShadow(u);this.convertImages(u,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();x('<?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();x(a)}),e)}}catch(D){this.handleError(D)}};EditorUi.prototype.createDownloadRequest=function(a,b,c,e,l,n,k,m,t,q){var d=this.editor.graph,f=d.getGraphBounds();c=this.getFileData(!0,null,null,null,c,0==n?!1:"xmlpng"!=b);var g="",p="";if(f.width*f.height>MAX_AREA||c.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};q=q?"1":"0";"pdf"==b&&0==n&&(p="&allPages=1");if("xmlpng"==b&&(q="1",b="png",null!=this.pages&&null!=this.currentPage))for(n=
+0;n<this.pages.length;n++)if(this.pages[n]==this.currentPage){g="&from="+n;break}n=d.background;"png"==b&&l?n=mxConstants.NONE:l||null!=n&&n!=mxConstants.NONE||(n="#ffffff");l={globalVars:d.getExportVariables()};t&&(l.grid={size:d.gridSize,steps:d.view.gridSteps,color:d.view.gridColor});return new mxXmlRequest(EXPORT_URL,"format="+b+g+p+"&bg="+(null!=n?n:mxConstants.NONE)+"&base64="+e+"&embedXml="+q+"&xml="+encodeURIComponent(c)+(null!=a?"&filename="+encodeURIComponent(a):"")+"&extras="+encodeURIComponent(JSON.stringify(l))+
+(null!=k?"&scale="+k:"")+(null!=m?"&border="+m:""))};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 e=null!=a.interval?parseInt(a.interval):6E4,g=null,l=mxUtils.bind(this,function(){var d=this.currentPage;mxUtils.post(a.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(a){d===this.currentPage&&(200<=a.getStatus()&&300>=a.getStatus()?(this.updateDiagram(a.getText()),n()):this.handleError({message:mxResources.get("error")+
" "+a.getStatus()}))}),mxUtils.bind(this,function(a){this.handleError(a)}))}),n=mxUtils.bind(this,function(){window.clearTimeout(g);g=window.setTimeout(l,e)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){n();l()}));n();l()}null!=b&&b()});if(null!=a.url&&0<a.url.length){var e=a.url;/^https?:\/\//.test(e)&&!this.editor.isCorsEnabledForUrl(e)&&(e=PROXY_URL+"?url="+encodeURIComponent(e));this.loadUrl(e,mxUtils.bind(this,function(a){f(a)}),mxUtils.bind(this,function(a){null!=c&&
c(a)}))}else f("")};EditorUi.prototype.updateDiagram=function(a){function d(a){var d=new mxCellOverlay(a.image||e.warningImage,a.tooltip,a.align,a.valign,a.offset);d.addListener(mxEvent.CLICK,function(d,b){c.alert(a.tooltip)});return d}var b=null,c=this;if(null!=a&&0<a.length&&(b=mxUtils.parseXml(a),a=null!=b?b.documentElement:null,null!=a&&"updates"==a.nodeName)){var e=this.editor.graph,n=e.getModel();n.beginUpdate();var k=null;try{for(a=a.firstChild;null!=a;){if("update"==a.nodeName){var m=n.getCell(a.getAttribute("id"));
@@ -3119,8 +3120,8 @@ d+(" "+(f+"-"+k+"-"+m+"-"+t+"-"+q+"-"+e));return d=mxResources.get("copyOf",[d])
this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);!b&&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();b||this.showSplash()});if(null!=a)try{mxClient.IS_SF&&"min"==uiTheme&&(this.diagramContainer.style.visibility="");this.openingFile=!0;
this.setCurrentFile(a);a.addListener("descriptorChanged",this.descriptorChangedListener);a.addListener("contentChanged",this.descriptorChangedListener);a.open();delete this.openingFile;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:a.getMode().toUpperCase()+"-OPEN-FILE-"+
-a.getHash(),action:"size_"+a.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")});EditorUi.debug("File.opened",[a]);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(A){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(A){}}catch(A){this.fileLoadedError=A;if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+
-(null!=a?a.getHash():"none"),action:"message_"+A.message,label:"stack_"+A.stack})}catch(x){}var e=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=d?this.fileLoaded(d):f()});b?e():this.handleError(A,mxResources.get("errorLoadingFile"),e,!0,null,null,!0)}else f();return c};EditorUi.prototype.getHashValueForPages=function(a,b){var d=0,c=new mxGraphModel,f=new mxCodec;null!=b&&(b.byteCount=
+a.getHash(),action:"size_"+a.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")});EditorUi.debug("File.opened",[a]);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(x){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(x){}}catch(x){this.fileLoadedError=x;if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+
+(null!=a?a.getHash():"none"),action:"message_"+x.message,label:"stack_"+x.stack})}catch(A){}var e=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=d?this.fileLoaded(d):f()});b?e():this.handleError(x,mxResources.get("errorLoadingFile"),e,!0,null,null,!0)}else f();return c};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);for(var e=0;e<a.length;e++){this.updatePageRoot(a[e]);var k=a[e].node.cloneNode(!1);k.removeAttribute("name");c.root=a[e].root;var m=f.encode(c);this.editor.graph.saveViewState(a[e].viewState,m,!0);m.removeAttribute("pageWidth");m.removeAttribute("pageHeight");k.appendChild(m);null!=b&&(b.eltCount+=k.getElementsByTagName("*").length,b.nodeCount+=k.getElementsByTagName("mxCell").length);d=(d<<5)-d+this.hashValue(k,function(a,d,b,c){return!c||"mxGeometry"!=
a.nodeName&&"mxPoint"!=a.nodeName||"x"!=d&&"y"!=d&&"width"!=d&&"height"!=d?c&&"mxCell"==a.nodeName&&"previous"==d?null:b:Math.round(b)},b)<<0}return d};EditorUi.prototype.hashValue=function(a,b,c){var d=0;if(null!=a&&"object"===typeof a&&"number"===typeof a.nodeType&&"string"===typeof a.nodeName&&"function"===typeof a.getAttribute){null!=a.nodeName&&(d^=this.hashValue(a.nodeName,b,c));if(null!=a.attributes){null!=c&&(c.attrCount+=a.attributes.length);for(var f=0;f<a.attributes.length;f++){var e=a.attributes[f].name,
g=null!=b?b(a,e,a.attributes[f].value,!0):a.attributes[f].value;null!=g&&(d^=this.hashValue(e,b,c)+this.hashValue(g,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=
@@ -3139,7 +3140,7 @@ H(d,b)}mxEvent.consume(a)});mxEvent.addGestureListeners(p,function(){},mxUtils.b
"",p.style.cursor="default",this.sidebar.showTooltips=!0,C.panningManager.stop(),C.graphHandler.reset(),C.isMouseDown=!1,C.autoScroll=!0,B(a),mxEvent.consume(a))}));mxEvent.addListener(p,"mouseleave",mxUtils.bind(this,function(a){C.isMouseDown&&null!=C.graphHandler.first&&(C.graphHandler.resume(),null!=C.graphHandler.hint&&(C.graphHandler.hint.style.visibility="visible"),p.style.backgroundColor="",p.style.cursor="",C.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(p,"dragover",mxUtils.bind(this,
function(a){p.style.backgroundColor="#f1f3f4";a.dataTransfer.dropEffect="copy";p.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(p,"drop",mxUtils.bind(this,function(a){p.style.cursor="";p.style.backgroundColor="";0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(d,c,e,l,n,k,t,m,x){if(null!=d&&"image/"==c.substring(0,6))d="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+
this.convertDataUri(d),d=[new mxCell("",new mxGeometry(0,0,n,k),d)],d[0].vertex=!0,H(d,new mxRectangle(0,0,n,k),a,mxEvent.isAltDown(a)?null:t.substring(0,t.lastIndexOf(".")).replace(/_/g," ")),null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null);else{var z=!1,A=mxUtils.bind(this,function(d,c){if(null!=d&&"application/pdf"==c){var e=Editor.extractGraphModelFromPdf(d);null!=e&&0<e.length&&(d=e)}if(null!=d)if(e=mxUtils.parseXml(d),"mxlibrary"==e.documentElement.nodeName)try{var l=
-JSON.parse(mxUtils.getTextContent(e.documentElement));g(l,p);b=b.concat(l);y(a);this.spinner.stop();z=!0}catch(K){}else if("mxfile"==e.documentElement.nodeName)try{for(var n=e.documentElement.getElementsByTagName("diagram"),l=0;l<n.length;l++){var k=this.stringToCells(Editor.getDiagramNodeXml(n[l])),t=this.editor.graph.getBoundingBoxFromGeometry(k);H(k,new mxRectangle(0,0,t.width,t.height),a)}z=!0}catch(K){null!=window.console&&console.log("error in drop handler:",K)}z||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));
+JSON.parse(mxUtils.getTextContent(e.documentElement));g(l,p);b=b.concat(l);y(a);this.spinner.stop();z=!0}catch(L){}else if("mxfile"==e.documentElement.nodeName)try{for(var n=e.documentElement.getElementsByTagName("diagram"),l=0;l<n.length;l++){var k=this.stringToCells(Editor.getDiagramNodeXml(n[l])),t=this.editor.graph.getBoundingBoxFromGeometry(k);H(k,new mxRectangle(0,0,t.width,t.height),a)}z=!0}catch(L){null!=window.console&&console.log("error in drop handler:",L)}z||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));
null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)});null!=x&&null!=t&&(/(\.v(dx|sdx?))($|\?)/i.test(t)||/(\.vs(x|sx?))($|\?)/i.test(t))?this.importVisio(x,function(a){A(a,"text/xml")},null,t):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,t)&&null!=x?this.parseFile(x,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?A(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?
"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):A(d,c)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(p,"dragleave",function(a){p.style.cursor="";p.style.backgroundColor="";a.stopPropagation();a.preventDefault()}));z=z.cloneNode(!1);z.setAttribute("src",Editor.editImage);z.setAttribute("title",mxResources.get("edit"));m.insertBefore(z,m.firstChild);mxEvent.addListener(z,"click",u);mxEvent.addListener(p,"dblclick",function(a){mxEvent.getSource(a)==
p&&u(a)});e=z.cloneNode(!1);e.setAttribute("src",Editor.plusImage);e.setAttribute("title",mxResources.get("add"));m.insertBefore(e,m.firstChild);mxEvent.addListener(e,"click",B);this.isOffline()||".scratchpad"!=a.title||null==EditorUi.scratchpadHelpLink||(e=document.createElement("span"),e.setAttribute("title",mxResources.get("help")),e.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;",mxUtils.write(e,"?"),mxEvent.addGestureListeners(e,mxUtils.bind(this,function(a){this.openLink(EditorUi.scratchpadHelpLink);
@@ -3157,7 +3158,7 @@ null!=n?n:window.location.hash;if(null!=m&&("#G"==m.substring(0,2)||"#Uhttps%3A%
function(){this.editor.graph.openLink("https://drive.google.com/open?id="+m);this.handleError(a,b,c,e,l)}),p,mxResources.get("changeUser"),mxUtils.bind(this,function(){function a(){e.innerHTML="";for(var a=0;a<d.length;a++){var b=document.createElement("option");mxUtils.write(b,d[a].displayName);b.value=a;e.appendChild(b);b=document.createElement("option");b.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(b,"<"+d[a].email+">");b.setAttribute("disabled","disabled");e.appendChild(b)}b=document.createElement("option");
mxUtils.write(b,mxResources.get("addAccount"));b.value=d.length;e.appendChild(b)}var d=this.drive.getUsersList(),b=document.createElement("div"),c=document.createElement("span");c.style.marginTop="6px";mxUtils.write(c,mxResources.get("changeUser")+": ");b.appendChild(c);var e=document.createElement("select");e.style.width="200px";a();mxEvent.addListener(e,"change",mxUtils.bind(this,function(){var b=e.value,c=d.length!=b;c&&this.drive.setUser(d[b]);this.drive.authorize(c,mxUtils.bind(this,function(){c||
(d=this.drive.getUsersList(),a())}),mxUtils.bind(this,function(a){this.handleError(a)}),!0)}));b.appendChild(e);b=new CustomDialog(this,b,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(b.container,300,75,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=c&&c()}),480,150);return}}null!=f.message?k=mxUtils.htmlEntities(f.message):null!=f.response&&null!=f.response.error?k=mxUtils.htmlEntities(f.response.error):"undefined"!==
-typeof window.App&&(f.code==App.ERROR_TIMEOUT?k=mxUtils.htmlEntities(mxResources.get("timeout")):f.code==App.ERROR_BUSY&&(k=mxUtils.htmlEntities(mxResources.get("busy"))))}var A=n=null;null!=f&&null!=f.helpLink&&(n=mxResources.get("help"),A=mxUtils.bind(this,function(){return this.editor.graph.openLink(f.helpLink)}));this.showError(b,k,g,c,p,null,null,n,A,null,null,null,e?c:null)}else null!=c&&c()};EditorUi.prototype.alert=function(a,b){var d=new ErrorDialog(this,null,a,mxResources.get("ok"),b);this.showDialog(d.container,
+typeof window.App&&(f.code==App.ERROR_TIMEOUT?k=mxUtils.htmlEntities(mxResources.get("timeout")):f.code==App.ERROR_BUSY&&(k=mxUtils.htmlEntities(mxResources.get("busy"))))}var x=n=null;null!=f&&null!=f.helpLink&&(n=mxResources.get("help"),x=mxUtils.bind(this,function(){return this.editor.graph.openLink(f.helpLink)}));this.showError(b,k,g,c,p,null,null,n,x,null,null,null,e?c:null)}else null!=c&&c()};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,l,n){var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},f=Math.min(200,28*Math.ceil(a.length/50));a=new ConfirmDialog(this,a,function(){d();null!=b&&b()},function(){d();null!=c&&c()},e,l,null,null,null,null,f);this.showDialog(a.container,340,46+f,!0,n);a.init()};EditorUi.prototype.showBanner=function(a,b,c){var d=!1;if(!(this.bannerShowing||this["hideBanner"+a]||isLocalStorage&&null!=mxSettings.settings&&
null!=mxSettings.settings["close"+a])){var e=document.createElement("div");e.style.cssText="position:absolute;bottom:10px;left:50%;max-width:90%;padding:18px 34px 12px 20px;font-size:16px;font-weight:bold;white-space:nowrap;cursor:pointer;z-index:"+mxPopupMenu.prototype.zIndex+";";mxUtils.setPrefixedStyle(e.style,"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(e.style,"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(e.style,"transition","all 1s ease");e.className="geBtn gePrimaryBtn";
d=document.createElement("img");d.setAttribute("src",IMAGE_PATH+"/logo.png");d.setAttribute("border","0");d.setAttribute("align","absmiddle");d.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";e.appendChild(d);d=document.createElement("img");d.setAttribute("src",Dialog.prototype.closeImage);d.setAttribute("title",mxResources.get("close"));d.setAttribute("border","0");d.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";
@@ -3182,7 +3183,7 @@ b,c,e,l,n,k){k=null!=k?k:!mxClient.IS_IOS||!navigator.standalone;var d=this.getS
b;if(null!=e)try{this.exportFile(e,a,n,!0,d,c)}catch(v){this.handleError(v)}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,n,!0,d,c)}catch(v){this.handleError(v)}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<d,f,e,n,l);d=this.isServices(d)?4<d?390:270:160;this.showDialog(a.container,380,d,!0,!0);a.init()};EditorUi.prototype.isServices=function(a){return 1!=a};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(a,b,c,e,l,n){};EditorUi.prototype.pickFolder=function(a,b,c){b(null)};EditorUi.prototype.exportSvg=function(a,b,c,e,l,n,k,m,t,q){if(this.spinner.spin(document.body,mxResources.get("export")))try{var d=
this.editor.graph.isSelectionEmpty();c=null!=c?c:d;var f=b?null:this.editor.graph.background;f==mxConstants.NONE&&(f=null);null==f&&0==b&&(f="#ffffff");var g=this.editor.graph.getSvg(f,a,k,m,null,c,null,null,"blank"==q?"_blank":"self"==q?"_top":null,null,!0);e&&this.editor.graph.addSvgShadow(g);var p=this.getBaseFilename()+".svg",x=mxUtils.bind(this,function(a){this.spinner.stop();l&&a.setAttribute("content",this.getFileData(!0,null,null,null,c,t,null,null,null,!1));var 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);this.isLocalFileSave()||d.length<=MAX_REQUEST_SIZE?this.saveData(p,"svg",d,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(d)}))});this.editor.addFontCss(g);this.editor.graph.mathEnabled&&this.editor.addMathCss(g);n?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.convertImages(g,x,this.thumbImageCache)):x(g)}catch(J){this.handleError(J)}};EditorUi.prototype.addRadiobox=
+mxUtils.getXml(a);this.isLocalFileSave()||d.length<=MAX_REQUEST_SIZE?this.saveData(p,"svg",d,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(d)}))});this.editor.addFontCss(g);this.editor.graph.mathEnabled&&this.editor.addMathCss(g);n?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.convertImages(g,x,this.thumbImageCache)):x(g)}catch(K){this.handleError(K)}};EditorUi.prototype.addRadiobox=
function(a,b,c,e,l,n,k){return this.addCheckbox(a,c,e,l,n,k,!0,b)};EditorUi.prototype.addCheckbox=function(a,b,c,e,l,n,k,m){n=null!=n?n:!0;var d=document.createElement("input");d.style.marginRight="8px";d.style.marginTop="16px";d.setAttribute("type",k?"radio":"checkbox");k="geCheckbox-"+Editor.guid();d.id=k;null!=m&&d.setAttribute("name",m);c&&(d.setAttribute("checked","checked"),d.defaultChecked=!0);e&&d.setAttribute("disabled","disabled");n&&(a.appendChild(d),c=document.createElement("label"),mxUtils.write(c,
b),c.setAttribute("for",k),a.appendChild(c),l||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(),e="";null!=c&&c.getMode()!=App.MODE_DEVICE&&c.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";c=document.createElement("option");
c.setAttribute("value","blank");mxUtils.write(c,mxResources.get("makeCopy"));f.appendChild(c);c=document.createElement("option");c.setAttribute("value","custom");mxUtils.write(c,mxResources.get("custom")+"...");f.appendChild(c);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,
@@ -3209,25 +3210,25 @@ null,mxResources.get(null!=a?"diagramIsPublic":"diagramIsNotPublic"),mxResources
mxResources.get("image"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(l?"10":"4")+"px";d.appendChild(f);if(l){mxUtils.write(d,mxResources.get("zoom")+":");var g=document.createElement("input");g.setAttribute("type","text");g.style.marginRight="16px";g.style.width="60px";g.style.marginLeft="4px";g.style.marginRight="12px";g.value=this.lastExportZoom||"100%";d.appendChild(g);mxUtils.write(d,mxResources.get("borderWidth")+":");var k=document.createElement("input");k.setAttribute("type",
"text");k.style.marginRight="16px";k.style.width="60px";k.style.marginLeft="4px";k.value=this.lastExportBorder||"0";d.appendChild(k);mxUtils.br(d)}var p=this.addCheckbox(d,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),m=e?null:this.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),!0),f=this.editor.graph,q=e?null:this.addCheckbox(d,mxResources.get("transparentBackground"),f.background==mxConstants.NONE||null==f.background);null!=q&&(q.style.marginBottom="16px");a=
new CustomDialog(this,d,mxUtils.bind(this,function(){var a=parseInt(g.value)/100||1,d=parseInt(k.value)||0;c(!p.checked,null!=m?m.checked:!1,null!=q?q.checked:!1,a,d)}),null,a,b);this.showDialog(a.container,300,(l?25:0)+(e?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,c,e,l,n,k,m){k=null!=k?k:!0;var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=this.editor.graph,g="jpeg"==m?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 x=document.createElement("input");x.setAttribute("type","text");x.style.marginRight="16px";x.style.width="60px";x.style.marginLeft="4px";x.style.marginRight="12px";x.value=this.lastExportZoom||"100%";d.appendChild(x);mxUtils.write(d,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";d.appendChild(q);mxUtils.br(d);var A=this.addCheckbox(d,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=m),u=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");n&&(d.appendChild(y),mxUtils.write(d,mxResources.get("crop")),mxUtils.br(d),g+=26,mxEvent.addListener(u,"change",function(){u.checked?
+d.appendChild(p);mxUtils.write(d,mxResources.get("zoom")+":");var x=document.createElement("input");x.setAttribute("type","text");x.style.marginRight="16px";x.style.width="60px";x.style.marginLeft="4px";x.style.marginRight="12px";x.value=this.lastExportZoom||"100%";d.appendChild(x);mxUtils.write(d,mxResources.get("borderWidth")+":");var A=document.createElement("input");A.setAttribute("type","text");A.style.marginRight="16px";A.style.width="60px";A.style.marginLeft="4px";A.value=this.lastExportBorder||
+"0";d.appendChild(A);mxUtils.br(d);var q=this.addCheckbox(d,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=m),u=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");n&&(d.appendChild(y),mxUtils.write(d,mxResources.get("crop")),mxUtils.br(d),g+=26,mxEvent.addListener(u,"change",function(){u.checked?
y.removeAttribute("disabled"):y.setAttribute("disabled","disabled")}));f.isSelectionEmpty()||(y.setAttribute("checked","checked"),y.defaultChecked=!0);var B=this.addCheckbox(d,mxResources.get("shadow"),f.shadowVisible),D=document.createElement("input");D.style.marginTop="16px";D.style.marginRight="8px";D.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||D.setAttribute("disabled","disabled");b&&(d.appendChild(D),mxUtils.write(d,mxResources.get("embedImages")),mxUtils.br(d),g+=
26);var M=null;if("png"==m||"jpeg"==m)M=this.addCheckbox(d,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),g+=26;var Q=this.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),k,null,null,"jpeg"!=m),R=null!=this.pages&&1<this.pages.length,ba=this.addCheckbox(d,R?mxResources.get("allPages"):"",R,!R,null,"jpeg"!=m);ba.style.marginLeft="24px";ba.style.marginBottom="16px";R?g+=26:ba.style.display="none";mxEvent.addListener(Q,"change",function(){Q.checked&&R?ba.removeAttribute("disabled"):
ba.setAttribute("disabled","disabled")});k&&R||ba.setAttribute("disabled","disabled");var X=document.createElement("select");X.style.maxWidth="260px";X.style.marginLeft="8px";X.style.marginRight="10px";X.className="geBtn";a=document.createElement("option");a.setAttribute("value","auto");mxUtils.write(a,mxResources.get("automatic"));X.appendChild(a);a=document.createElement("option");a.setAttribute("value","blank");mxUtils.write(a,mxResources.get("openInNewWindow"));X.appendChild(a);a=document.createElement("option");
-a.setAttribute("value","self");mxUtils.write(a,mxResources.get("openInThisWindow"));X.appendChild(a);"svg"==m&&(mxUtils.write(d,mxResources.get("links")+":"),d.appendChild(X),mxUtils.br(d),mxUtils.br(d),g+=26);c=new CustomDialog(this,d,mxUtils.bind(this,function(){this.lastExportBorder=q.value;this.lastExportZoom=x.value;l(x.value,A.checked,!u.checked,B.checked,Q.checked,D.checked,q.value,y.checked,!ba.checked,X.value,null!=M?M.checked:null)}),null,c,e);this.showDialog(c.container,340,g,!0,!0,null,
+a.setAttribute("value","self");mxUtils.write(a,mxResources.get("openInThisWindow"));X.appendChild(a);"svg"==m&&(mxUtils.write(d,mxResources.get("links")+":"),d.appendChild(X),mxUtils.br(d),mxUtils.br(d),g+=26);c=new CustomDialog(this,d,mxUtils.bind(this,function(){this.lastExportBorder=A.value;this.lastExportZoom=x.value;l(x.value,q.checked,!u.checked,B.checked,Q.checked,D.checked,A.value,y.checked,!ba.checked,X.value,null!=M?M.checked:null)}),null,c,e);this.showDialog(c.container,340,g,!0,!0,null,
null,null,null,!0);x.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?x.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,c,e,l){var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=this.editor.graph;if(null!=b){var g=document.createElement("h3");mxUtils.write(g,b);g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";d.appendChild(g)}var k=this.addCheckbox(d,mxResources.get("fit"),
!0),p=this.addCheckbox(d,mxResources.get("shadow"),f.shadowVisible&&e,!e),m=this.addCheckbox(d,c),q=this.addCheckbox(d,mxResources.get("lightbox"),!0),C=this.addEditButton(d,q),v=C.getEditInput(),u=1<f.model.getChildCount(f.model.getRoot()),y=this.addCheckbox(d,mxResources.get("layers"),u,!u);y.style.marginLeft=v.style.marginLeft;y.style.marginBottom="12px";y.style.marginTop="8px";mxEvent.addListener(q,"change",function(){q.checked?(u&&y.removeAttribute("disabled"),v.removeAttribute("disabled")):
(y.setAttribute("disabled","disabled"),v.setAttribute("disabled","disabled"));v.checked&&q.checked?C.getEditSelect().removeAttribute("disabled"):C.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,d,mxUtils.bind(this,function(){a(k.checked,p.checked,m.checked,q.checked,C.getLink(),y.checked)}),null,mxResources.get("embed"),l);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,c,e,l,n,k,m){function d(d){var b=" ",g="";e&&(b=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
EditorUi.drawHost+"/?client=1&lightbox=1"+(l?"&edit=_blank":"")+(n?"&layers=1":"")+"');}})(this);\"",g+="cursor:pointer;");a&&(g+="max-width:100%;");var p="";c&&(p=' width="'+Math.round(f.width)+'" height="'+Math.round(f.height)+'"');k('<img src="'+d+'"'+p+(""!=g?' style="'+g+'"':"")+b+"/>")}var f=this.editor.graph.getGraphBounds();if(this.isExportToCanvas())this.exportToCanvas(mxUtils.bind(this,function(a){var b=e?this.getFileData(!0):null;a=this.createImageDataUri(a,b,"png");d(a)}),null,null,null,
mxUtils.bind(this,function(a){m({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 g="";c&&(g="&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")+g+"&xml="+encodeURIComponent(b));p.send(mxUtils.bind(this,function(){200<=p.getStatus()&&299>=p.getStatus()?d("data:image/png;base64,"+p.getText()):m({message:mxResources.get("unknownError")})}))}else m({message:mxResources.get("drawingTooLarge")})};
-EditorUi.prototype.createEmbedSvg=function(a,b,c,e,l,n,k){var d=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!c),f=d.getElementsByTagName("a");if(null!=f)for(var g=0;g<f.length;g++){var p=f[g].getAttribute("href");null!=p&&"#"==p.charAt(0)&&"_blank"==f[g].getAttribute("target")&&f[g].removeAttribute("target")}e&&d.setAttribute("content",this.getFileData(!0));b&&this.editor.graph.addSvgShadow(d);if(c){var m=" ",q="";e&&(m="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
-EditorUi.drawHost+"/?client=1&lightbox=1"+(l?"&edit=_blank":"")+(n?"&layers=1":"")+"');}})(this);\"",q+="cursor:pointer;");a&&(q+="max-width:100%;");this.convertImages(d,mxUtils.bind(this,function(a){k('<img src="'+this.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=q?' style="'+q+'"':"")+m+"/>")}))}else q="",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('"+
-EditorUi.drawHost+"/?client=1&lightbox=1"+(l?"&edit=_blank":"")+(n?"&layers=1":"")+"');}}})(this);"),q+="cursor:pointer;"),a&&(a=parseInt(d.getAttribute("width")),b=parseInt(d.getAttribute("height")),d.setAttribute("viewBox","-0.5 -0.5 "+a+" "+b),q+="max-width:100%;max-height:"+b+"px;",d.removeAttribute("height")),""!=q&&d.setAttribute("style",q),this.editor.addFontCss(d),this.editor.graph.mathEnabled&&this.editor.addMathCss(d),k(mxUtils.getXml(d))};EditorUi.prototype.timeSince=function(a){a=Math.floor((new Date-
+EditorUi.prototype.createEmbedSvg=function(a,b,c,e,l,n,k){var d=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!c),f=d.getElementsByTagName("a");if(null!=f)for(var g=0;g<f.length;g++){var p=f[g].getAttribute("href");null!=p&&"#"==p.charAt(0)&&"_blank"==f[g].getAttribute("target")&&f[g].removeAttribute("target")}e&&d.setAttribute("content",this.getFileData(!0));b&&this.editor.graph.addSvgShadow(d);if(c){var m=" ",x="";e&&(m="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
+EditorUi.drawHost+"/?client=1&lightbox=1"+(l?"&edit=_blank":"")+(n?"&layers=1":"")+"');}})(this);\"",x+="cursor:pointer;");a&&(x+="max-width:100%;");this.convertImages(d,mxUtils.bind(this,function(a){k('<img src="'+this.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=x?' style="'+x+'"':"")+m+"/>")}))}else x="",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('"+
+EditorUi.drawHost+"/?client=1&lightbox=1"+(l?"&edit=_blank":"")+(n?"&layers=1":"")+"');}}})(this);"),x+="cursor:pointer;"),a&&(a=parseInt(d.getAttribute("width")),b=parseInt(d.getAttribute("height")),d.setAttribute("viewBox","-0.5 -0.5 "+a+" "+b),x+="max-width:100%;max-height:"+b+"px;",d.removeAttribute("height")),""!=x&&d.setAttribute("style",x),this.editor.addFontCss(d),this.editor.graph.mathEnabled&&this.editor.addMathCss(d),k(mxUtils.getXml(d))};EditorUi.prototype.timeSince=function(a){a=Math.floor((new Date-
a)/1E3);var d=Math.floor(a/31536E3);if(1<d)return d+" "+mxResources.get("years");d=Math.floor(a/2592E3);if(1<d)return d+" "+mxResources.get("months");d=Math.floor(a/86400);if(1<d)return d+" "+mxResources.get("days");d=Math.floor(a/3600);if(1<d)return d+" "+mxResources.get("hours");d=Math.floor(a/60);return 1<d?d+" "+mxResources.get("minutes"):1==d?d+" "+mxResources.get("minute"):null};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],e=b.getGlobalVariable;b.getGlobalVariable=function(a){return"page"==a?d.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==a?1:e.apply(this,arguments)}}}null!=d&&(a=Editor.parseDiagramNode(d))}c=this.editor.graph;try{this.editor.graph=b,this.editor.setGraphXml(a)}catch(n){}finally{this.editor.graph=c}return a};EditorUi.prototype.getEmbeddedPng=function(a,b,c){try{var d=this.editor.graph,e=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),e=c;else if(null!=this.pages&&this.currentPage!=this.pages[0]){var d=this.createTemporaryGraph(d.getStylesheet()),f=d.getGlobalVariable,g=this.pages[0];d.getGlobalVariable=function(a){return"page"==a?g.getName():"pagenumber"==a?1:f.apply(this,arguments)};document.body.appendChild(d.container);
-d.model.setRoot(g.root)}this.exportToCanvas(mxUtils.bind(this,function(c){try{null==e&&(e=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var f=c.toDataURL("image/png"),f=this.writeGraphModelToPng(f,"tEXt","mxfile",encodeURIComponent(e));a(f.substring(f.lastIndexOf(",")+1));d!=this.editor.graph&&d.container.parentNode.removeChild(d.container)}catch(F){null!=b&&b(F)}}),null,null,null,mxUtils.bind(this,function(a){null!=b&&b(a)}),null,null,null,null,d.shadowVisible,null,d)}catch(x){null!=
-b&&b(x)}};EditorUi.prototype.getEmbeddedSvg=function(a,b,c,e,l,n,k,m){m=null!=m?m:!0;k=b.background;k==mxConstants.NONE&&(k=null);n=b.getSvg(k,null,null,null,null,n);b.shadowVisible&&b.addSvgShadow(n);null!=a&&n.setAttribute("content",a);null!=c&&n.setAttribute("resource",c);if(null!=l)this.embedFonts(n,mxUtils.bind(this,function(a){m?this.convertImages(a,mxUtils.bind(this,function(a){l((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')+
+d.model.setRoot(g.root)}this.exportToCanvas(mxUtils.bind(this,function(c){try{null==e&&(e=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var f=c.toDataURL("image/png"),f=this.writeGraphModelToPng(f,"tEXt","mxfile",encodeURIComponent(e));a(f.substring(f.lastIndexOf(",")+1));d!=this.editor.graph&&d.container.parentNode.removeChild(d.container)}catch(G){null!=b&&b(G)}}),null,null,null,mxUtils.bind(this,function(a){null!=b&&b(a)}),null,null,null,null,d.shadowVisible,null,d)}catch(A){null!=
+b&&b(A)}};EditorUi.prototype.getEmbeddedSvg=function(a,b,c,e,l,n,k,m){m=null!=m?m:!0;k=b.background;k==mxConstants.NONE&&(k=null);n=b.getSvg(k,null,null,null,null,n);b.shadowVisible&&b.addSvgShadow(n);null!=a&&n.setAttribute("content",a);null!=c&&n.setAttribute("resource",c);if(null!=l)this.embedFonts(n,mxUtils.bind(this,function(a){m?this.convertImages(a,mxUtils.bind(this,function(a){l((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))})):l((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(n)};EditorUi.prototype.embedFonts=function(a,b){this.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&
this.editor.addFontCss(a,this.editor.resolvedFontCss),this.embedExtFonts(mxUtils.bind(this,function(d){try{null!=d&&this.editor.addFontCss(a,d),b(a)}catch(p){b(a)}}))}catch(g){b(a)}}))};EditorUi.prototype.exportImage=function(a,b,c,e,l,n,k,m,t,q,z){t=null!=t?t:"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,l?this.getFileData(!0,null,null,null,c,m):null,t,null==this.pages||0==this.pages.length,z)}catch(v){"Invalid image"==v.message?this.downloadFile(t):this.handleError(v)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,c,a||1,b,e,null,null,n,k,q)}catch(C){this.spinner.stop(),this.handleError(C)}}};EditorUi.prototype.embedCssFonts=function(a,b){function d(a){return a.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$",
@@ -3237,82 +3238,82 @@ a;e++;var d="application/x-font-ttf";if("svg"==t||/(\.svg)($|\?)/i.test(a))d="im
function(a){var d=this.editor.graph.extFonts;if(null!=d&&0<d.length){var b="",c=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts={});for(var e=mxUtils.bind(this,function(){0==c&&this.embedCssFonts(b,a)}),n=0;n<d.length;n++)mxUtils.bind(this,function(a,d){0==d.indexOf(Editor.GOOGLE_FONTS)?null==this.cachedGoogleFonts[d]?(c++,this.loadUrl(d,mxUtils.bind(this,function(a){this.cachedGoogleFonts[d]=a;b+=a;c--;e()}),mxUtils.bind(this,function(a){c--;b+="@import url("+d+");";e()}))):b+=this.cachedGoogleFonts[d]:
b+='@font-face {font-family: "'+a+'";src: url("'+d+'");}'})(d[n].name,d[n].url);e()}else a()};EditorUi.prototype.exportToCanvas=function(a,b,c,e,l,n,k,m,t,q,z,u,C,v,y){try{n=null!=n?n:!0;k=null!=k?k:!0;u=null!=u?u:this.editor.graph;C=null!=C?C:0;var d=t?null:u.background;d==mxConstants.NONE&&(d=null);null==d&&(d=e);null==d&&0==t&&(d="#ffffff");this.convertImages(u.getSvg(null,null,null,v,null,k,null,null,null,q),mxUtils.bind(this,function(c){try{var e=new Image;e.onload=mxUtils.bind(this,function(){try{var f=
function(){mxClient.IS_SF?window.setTimeout(function(){t.drawImage(e,C/m,C/m);a(g)},0):(t.drawImage(e,C/m,C/m),a(g))},g=document.createElement("canvas"),k=parseInt(c.getAttribute("width")),p=parseInt(c.getAttribute("height"));m=null!=m?m:1;null!=b&&(m=n?Math.min(1,Math.min(3*b/(4*p),b/k)):b/k);k=Math.ceil(m*k)+2*C;p=Math.ceil(m*p)+2*C;g.setAttribute("width",k);g.setAttribute("height",p);var t=g.getContext("2d");null!=d&&(t.beginPath(),t.rect(0,0,k,p),t.fillStyle=d,t.fill());t.scale(m,m);if(y){var z=
-u.view,x=z.scale;z.scale=1;var q=btoa(unescape(encodeURIComponent(z.createSvgGrid(z.gridColor))));z.scale=x;var q="data:image/svg+xml;base64,"+q,v=u.gridSize*z.gridSteps*m,A=u.getGraphBounds(),D=z.translate.x*x,E=z.translate.y*x,H=D+(A.x-D)/x,F=E+(A.y-E)/x,B=new Image;B.onload=function(){try{for(var a=-Math.round(v-mxUtils.mod((D-H)*m,v)),d=-Math.round(v-mxUtils.mod((E-F)*m,v));a<k;a+=v)for(var b=d;b<p;b+=v)t.drawImage(B,a/m,b/m);f()}catch(K){null!=l&&l(K)}};B.onerror=function(a){null!=l&&l(a)};B.src=
+u.view,x=z.scale;z.scale=1;var q=btoa(unescape(encodeURIComponent(z.createSvgGrid(z.gridColor))));z.scale=x;var q="data:image/svg+xml;base64,"+q,v=u.gridSize*z.gridSteps*m,A=u.getGraphBounds(),D=z.translate.x*x,E=z.translate.y*x,H=D+(A.x-D)/x,B=E+(A.y-E)/x,G=new Image;G.onload=function(){try{for(var a=-Math.round(v-mxUtils.mod((D-H)*m,v)),d=-Math.round(v-mxUtils.mod((E-B)*m,v));a<k;a+=v)for(var b=d;b<p;b+=v)t.drawImage(G,a/m,b/m);f()}catch(L){null!=l&&l(L)}};G.onerror=function(a){null!=l&&l(a)};G.src=
q}else f()}catch(Z){null!=l&&l(Z)}});e.onerror=function(a){null!=l&&l(a)};q&&this.editor.graph.addSvgShadow(c);this.editor.graph.mathEnabled&&this.editor.addMathCss(c);var f=mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(c,this.editor.resolvedFontCss),e.src=this.createSvgDataUri(mxUtils.getXml(c))}catch(M){null!=l&&l(M)}});this.embedExtFonts(mxUtils.bind(this,function(a){try{null!=a&&this.editor.addFontCss(c,a),this.loadFonts(f)}catch(Q){null!=l&&l(Q)}}))}catch(M){null!=
l&&l(M)}}),c,z)}catch(H){null!=l&&l(H)}};EditorUi.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var b=a.convert,c=this;a.convert=function(d){if(null!=d){var e="http://"==d.substring(0,7)||"https://"==d.substring(0,8);e&&!navigator.onLine?d=c.svgBrokenImage.src:!e||d.substring(0,a.baseUrl.length)==a.baseUrl||c.crossOriginImages&&c.editor.isCorsEnabledForUrl(d)?"chrome-extension://"==d.substring(0,19)||mxClient.IS_CHROMEAPP||(d=b.apply(this,arguments)):d=PROXY_URL+
"?url="+encodeURIComponent(d)}return d};return a};EditorUi.prototype.convertImages=function(a,b,c,e){null==e&&(e=this.createImageUrlConverter());var d=0,f=c||{};c=mxUtils.bind(this,function(c,g){for(var l=a.getElementsByTagName(c),n=0;n<l.length;n++)mxUtils.bind(this,function(c){try{if(null!=c){var l=e.convert(c.getAttribute(g));if(null!=l&&"data:"!=l.substring(0,5)){var n=f[l];null==n?(d++,this.convertImageToDataUri(l,function(e){null!=e&&(f[l]=e,c.setAttribute(g,e));d--;0==d&&b(a)})):c.setAttribute(g,
n)}else null!=l&&c.setAttribute(g,l)}}catch(v){}})(l[n])});c("image","xlink:href");c("img","src");0==d&&b(a)};EditorUi.prototype.loadUrl=function(a,b,c,e,l,n,k,m){try{var d=!k&&(e||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||/(\.gif)($|\?)/i.test(a)||/(\.pdf)($|\?)/i.test(a));l=null!=l?l:!0;var f=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=b){var e=a.getText();if(d){if((9==document.documentMode||10==document.documentMode)&&
"undefined"!==typeof window.mxUtilsBinaryToArray){a=mxUtilsBinaryToArray(a.request.responseBody).toArray();for(var e=Array(a.length),f=0;f<a.length;f++)e[f]=String.fromCharCode(a[f]);e=e.join("")}n=null!=n?n:"data:image/png;base64,";e=n+this.base64Encode(e)}b(e)}}else null!=c&&(0==a.getStatus()?c({message:mxResources.get("accessDenied")},a):c({message:mxResources.get("error")+" "+a.getStatus()},a))}),function(a){null!=c&&c({message:mxResources.get("error")+" "+a.getStatus()})},d,this.timeout,function(){l&&
null!=c&&c({code:App.ERROR_TIMEOUT,retry:f})},m)});f()}catch(z){null!=c&&c(z)}};EditorUi.prototype.isCorsEnabledForUrl=function(a){return this.editor.isCorsEnabledForUrl(a)};EditorUi.prototype.convertImageToDataUri=function(a,b){try{var d=!0,c=window.setTimeout(mxUtils.bind(this,function(){d=!1;b(this.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){window.clearTimeout(c);d&&b(this.createSvgDataUri(a.getText()))}),function(){window.clearTimeout(c);
-d&&b(this.svgBrokenImage.src)});else{var e=new Image,f=this;this.crossOriginImages&&(e.crossOrigin="anonymous");e.onload=function(){window.clearTimeout(c);if(d)try{var a=document.createElement("canvas"),g=a.getContext("2d");a.height=e.height;a.width=e.width;g.drawImage(e,0,0);b(a.toDataURL())}catch(t){b(f.svgBrokenImage.src)}};e.onerror=function(){window.clearTimeout(c);d&&b(f.svgBrokenImage.src)};e.src=a}}catch(A){b(this.svgBrokenImage.src)}};EditorUi.prototype.importXml=function(a,b,c,e,l){b=null!=
+d&&b(this.svgBrokenImage.src)});else{var e=new Image,f=this;this.crossOriginImages&&(e.crossOrigin="anonymous");e.onload=function(){window.clearTimeout(c);if(d)try{var a=document.createElement("canvas"),g=a.getContext("2d");a.height=e.height;a.width=e.width;g.drawImage(e,0,0);b(a.toDataURL())}catch(t){b(f.svgBrokenImage.src)}};e.onerror=function(){window.clearTimeout(c);d&&b(f.svgBrokenImage.src)};e.src=a}}catch(x){b(this.svgBrokenImage.src)}};EditorUi.prototype.importXml=function(a,b,c,e,l){b=null!=
b?b:0;c=null!=c?c:0;var d=[];try{var f=this.editor.graph;if(null!=a&&0<a.length){f.model.beginUpdate();try{var g=mxUtils.parseXml(a);a={};var k=this.editor.extractGraphModel(g.documentElement,null!=this.pages);if(null!=k&&"mxfile"==k.nodeName&&null!=this.pages){var m=k.getElementsByTagName("diagram");if(1==m.length)k=Editor.parseDiagramNode(m[0]),null!=this.currentPage&&(a[m[0].getAttribute("id")]=this.currentPage.getId());else if(1<m.length){var g=[],p=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&
-(a[m[0].getAttribute("id")]=this.pages[0].getId(),k=Editor.parseDiagramNode(m[0]),e=!1,p=1);for(;p<m.length;p++){var q=m[p].getAttribute("id");m[p].removeAttribute("id");var C=this.updatePageRoot(new DiagramPage(m[p]));a[q]=m[p].getAttribute("id");var v=this.pages.length;null==C.getName()&&C.setName(mxResources.get("pageWithNumber",[v+1]));f.model.execute(new ChangePage(this,C,C,v,!0));g.push(C)}this.updatePageLinks(a,g)}}if(null!=k&&"mxGraphModel"===k.nodeName&&(d=f.importGraphModel(k,b,c,e),null!=
-d))for(p=0;p<d.length;p++)this.updatePageLinksForCell(a,d[p])}finally{f.model.endUpdate()}}}catch(L){if(l)throw L;this.handleError(L)}return d};EditorUi.prototype.updatePageLinks=function(a,b){for(var d=0;d<b.length;d++)this.updatePageLinksForCell(a,b[d].root)};EditorUi.prototype.updatePageLinksForCell=function(a,b){var d=document.createElement("div"),c=this.editor.graph,e=c.getLinkForCell(b);null!=e&&c.setLinkForCell(b,this.updatePageLink(a,e));if(c.isHtmlLabel(b)){d.innerHTML=c.getLabel(b);for(var f=
+(a[m[0].getAttribute("id")]=this.pages[0].getId(),k=Editor.parseDiagramNode(m[0]),e=!1,p=1);for(;p<m.length;p++){var q=m[p].getAttribute("id");m[p].removeAttribute("id");var u=this.updatePageRoot(new DiagramPage(m[p]));a[q]=m[p].getAttribute("id");var v=this.pages.length;null==u.getName()&&u.setName(mxResources.get("pageWithNumber",[v+1]));f.model.execute(new ChangePage(this,u,u,v,!0));g.push(u)}this.updatePageLinks(a,g)}}if(null!=k&&"mxGraphModel"===k.nodeName&&(d=f.importGraphModel(k,b,c,e),null!=
+d))for(p=0;p<d.length;p++)this.updatePageLinksForCell(a,d[p])}finally{f.model.endUpdate()}}}catch(I){if(l)throw I;this.handleError(I)}return d};EditorUi.prototype.updatePageLinks=function(a,b){for(var d=0;d<b.length;d++)this.updatePageLinksForCell(a,b[d].root)};EditorUi.prototype.updatePageLinksForCell=function(a,b){var d=document.createElement("div"),c=this.editor.graph,e=c.getLinkForCell(b);null!=e&&c.setLinkForCell(b,this.updatePageLink(a,e));if(c.isHtmlLabel(b)){d.innerHTML=c.getLabel(b);for(var f=
d.getElementsByTagName("a"),k=!1,m=0;m<f.length;m++)e=f[m].getAttribute("href"),null!=e&&(f[m].setAttribute("href",this.updatePageLink(a,e)),k=!0);k&&c.labelChanged(b,d.innerHTML)}for(m=0;m<c.model.getChildCount(b);m++)this.updatePageLinksForCell(a,c.model.getChildAt(b,m))};EditorUi.prototype.updatePageLink=function(a,b){if("data:page/id,"==b.substring(0,13)){var d=a[b.substring(b.indexOf(",")+1)];b=null!=d?"data:page/id,"+d:null}else if("data:action/json,"==b.substring(0,17))try{var c=JSON.parse(b.substring(17));
-if(null!=c.actions){for(var e=0;e<c.actions.length;e++){var f=c.actions[e];null!=f.open&&"data:page/id,"==f.open.substring(0,13)&&(d=a[f.open.substring(f.open.indexOf(",")+1)],null!=d?f.open="data:page/id,"+d:delete f.open)}b="data:action/json,"+JSON.stringify(c)}}catch(A){}return b};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){var d=this.isRemoteVisioFormat(e);try{var f="UNKNOWN-VISIO",g=e.lastIndexOf(".");0<=g&&g<e.length&&(f=e.substring(g+1).toUpperCase());EditorUi.logEvent({category:f+"-MS-IMPORT-FILE",action:"filename_"+e,label:d?"remote":"local"})}catch(F){}if(d)if(null==VSD_CONVERT_URL||this.isOffline())c({message:"conf"==this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});
+if(null!=c.actions){for(var e=0;e<c.actions.length;e++){var f=c.actions[e];null!=f.open&&"data:page/id,"==f.open.substring(0,13)&&(d=a[f.open.substring(f.open.indexOf(",")+1)],null!=d?f.open="data:page/id,"+d:delete f.open)}b="data:action/json,"+JSON.stringify(c)}}catch(x){}return b};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){var d=this.isRemoteVisioFormat(e);try{var f="UNKNOWN-VISIO",g=e.lastIndexOf(".");0<=g&&g<e.length&&(f=e.substring(g+1).toUpperCase());EditorUi.logEvent({category:f+"-MS-IMPORT-FILE",action:"filename_"+e,label:d?"remote":"local"})}catch(G){}if(d)if(null==VSD_CONVERT_URL||this.isOffline())c({message:"conf"==this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});
else{d=new FormData;d.append("file1",a,e);var l=new XMLHttpRequest;l.open("POST",VSD_CONVERT_URL);l.responseType="blob";this.addRemoteServiceSecurityCheck(l);l.onreadystatechange=mxUtils.bind(this,function(){if(4==l.readyState)if(200<=l.status&&299>=l.status)try{var a=l.response;if("text/xml"==a.type){var d=new FileReader;d.onload=mxUtils.bind(this,function(a){try{b(a.target.result)}catch(C){c({message:mxResources.get("errorLoadingFile")})}});d.readAsText(a)}else this.doImportVisio(a,b,c,e)}catch(E){c(E)}else c({})});
-l.send(d)}else try{this.doImportVisio(a,b,c,e)}catch(F){c(F)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?d():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",d))};EditorUi.prototype.importGraphML=function(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,
+l.send(d)}else try{this.doImportVisio(a,b,c,e)}catch(G){c(G)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?d():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",d))};EditorUi.prototype.importGraphML=function(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(l){c(l)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?d():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",d))};EditorUi.prototype.exportVisio=function(){var a=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams()||this.handleError({message:mxResources.get("unknownError")})}catch(f){this.handleError(f)}else this.spinner.stop(),
this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?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{EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+a.length}),EditorUi.debug("convertLucidChart",a)}catch(l){}try{b(LucidImporter.importState(JSON.parse(a)))}catch(l){null!=
window.console&&console.error(l),c(l)}}else c({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(d,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",d):mxscript("js/extensions.min.js",d))};EditorUi.prototype.generateMermaidImage=function(a,b,c,e){var d=this,f=function(){try{this.loadingMermaid=!1,b=null!=b?b:EditorUi.defaultMermaidConfig,b.securityLevel=
"strict",b.startOnLoad=!1,mermaid.mermaidAPI.initialize(b),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),a,function(a){try{if(mxClient.IS_IE||mxClient.IS_IE11)a=a.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var b=mxUtils.parseXml(a).getElementsByTagName("svg");if(0<b.length){var f=parseFloat(b[0].getAttribute("width")),g=parseFloat(b[0].getAttribute("height"));c(d.convertDataUri(d.createSvgDataUri(a)),
-f,g)}else e({message:mxResources.get("invalidInput")})}catch(z){e(z)}})}catch(A){e(A)}};"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?f():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",f):mxscript("js/extensions.min.js",f))};EditorUi.prototype.generatePlantUmlImage=function(a,b,c,e){function d(a,d,b){c1=a>>2;c2=(a&3)<<4|d>>4;c3=(d&15)<<2|b>>6;c4=b&63;r="";r+=f(c1&63);r+=f(c2&63);r+=f(c3&63);return r+=f(c4&63)}function f(a){if(10>a)return String.fromCharCode(48+
+f,g)}else e({message:mxResources.get("invalidInput")})}catch(z){e(z)}})}catch(x){e(x)}};"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?f():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",f):mxscript("js/extensions.min.js",f))};EditorUi.prototype.generatePlantUmlImage=function(a,b,c,e){function d(a,d,b){c1=a>>2;c2=(a&3)<<4|d>>4;c3=(d&15)<<2|b>>6;c4=b&63;r="";r+=f(c1&63);r+=f(c2&63);r+=f(c3&63);return r+=f(c4&63)}function f(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?"_":"?"}var g=new XMLHttpRequest;g.open("GET",("txt"==b?PLANT_URL+"/txt/":"png"==b?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(a){r="";for(i=0;i<a.length;i+=3)r=i+2==a.length?r+d(a.charCodeAt(i),a.charCodeAt(i+1),0):i+1==a.length?r+d(a.charCodeAt(i),0,0):r+d(a.charCodeAt(i),a.charCodeAt(i+1),a.charCodeAt(i+2));return r}(pako.deflateRaw(a,{to:"string"})),!0);"txt"!=b&&(g.responseType=
"blob");g.onload=function(a){if(200<=this.status&&300>this.status)if("txt"==b)c(this.response);else{var d=new FileReader;d.readAsDataURL(this.response);d.onloadend=function(a){var b=new Image;b.onload=function(){try{var a=b.width,f=b.height;if(0==a&&0==f){var g=d.result,l=g.indexOf(","),n=decodeURIComponent(escape(atob(g.substring(l+1)))),k=mxUtils.parseXml(n).getElementsByTagName("svg");0<k.length&&(a=parseFloat(k[0].getAttribute("width")),f=parseFloat(k[0].getAttribute("height")))}c(d.result,a,
f)}catch(N){e(N)}};b.src=d.result};d.onerror=function(a){e(a)}}else e(a)};g.onerror=function(a){e(a)};g.send()};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=left;verticalAlign=top;"),d.updateCellSize(e,!0)}finally{d.getModel().endUpdate()}return e};EditorUi.prototype.insertTextAt=function(a,b,c,e,l,n,k){n=null!=n?n:!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()&&(l||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var d=this.editor.graph;if("data:application/pdf;base64,"==a.substring(0,28)){var f=
Editor.extractGraphModelFromPdf(a);if(null!=f&&0<f.length)return this.importXml(f,b,c,n,!0)}if("data:image/png;base64,"==a.substring(0,22)&&(f=this.extractGraphModelFromPng(a),null!=f&&0<f.length))return this.importXml(f,b,c,n,!0);if("data:image/svg+xml;"==a.substring(0,19))try{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));var g=this.importXml(f,
-b,c,n,!0);if(0<g.length)return g}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)+";"))}),k,this.maxImageSize);else{var f=Math.min(1,Math.min(this.maxImageSize/e.width,this.maxImageSize/e.height)),
+b,c,n,!0);if(0<g.length)return g}catch(E){}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)+";"))}),k,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);d.setSelectionCell(d.insertVertex(null,null,"",d.snap(b),d.snap(c),g,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(),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=
Graph.zapGremlins(mxUtils.trim(a));if(this.isCompatibleString(a))return this.importXml(a,b,c,n);if(0<a.length)if(this.isLucidChartData(a))this.convertLucidChart(a,mxUtils.bind(this,function(d){this.editor.graph.setSelectionCells(this.importXml(d,b,c,n));!this.isOffline()&&(/.*\.diagrams\.net$/.test(window.location.hostname)||/.*\.appspot\.com$/.test(window.location.hostname)||/.*\.draw\.io$/.test(window.location.hostname))&&this.showBanner("LucidChartImportSurvey",mxResources.get("notSatisfiedWithImport"),
-mxUtils.bind(this,function(){var d=new FeedbackDialog(this,"Lucidchart Import Feedback",!0,a);this.showDialog(d.container,610,360,!0,!1);d.init()}))}),mxUtils.bind(this,function(a){this.handleError(a)}));else{d=this.editor.graph;l=null;d.getModel().beginUpdate();try{l=d.insertVertex(d.getDefaultParent(),null,"",d.snap(b),d.snap(c),1,1,"text;"+(e?"html=1;":"")),d.fireEvent(new mxEventObject("textInserted","cells",[l])),"<"==a.charAt(0)&&a.indexOf(">")==a.length-1&&(a=mxUtils.htmlEntities(a)),a.length>
-this.maxTextBytes&&(a=a.substring(0,this.maxTextBytes)+"..."),l.value=a,d.updateCellSize(l),/\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(l.value)&&d.setLinkForCell(l,l.value),l.geometry.width+=d.gridSize,l.geometry.height+=d.gridSize}finally{d.getModel().endUpdate()}return[l]}}return[]};EditorUi.prototype.formatFileSize=function(a){var d=
--1;do a/=1024,d++;while(1024<a);return Math.max(a,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[d]};EditorUi.prototype.convertDataUri=function(a){if("data:"==a.substring(0,5)){var d=a.indexOf(";");0<d&&(a=a.substring(0,d)+a.substring(a.indexOf(",",d+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)||'{"Properties":'==a.substring(0,14))};EditorUi.prototype.importLocalFile=function(a,b){if(a&&Graph.fileSupport){if(null==this.importFileInputElt){var d=document.createElement("input");d.setAttribute("type","file");mxEvent.addListener(d,"change",mxUtils.bind(this,function(){null!=d.files&&(this.importFiles(d.files,null,null,this.maxImageSize),d.type="",d.type="file",d.value="")}));d.style.display="none";document.body.appendChild(d);this.importFileInputElt=d}this.importFileInputElt.click()}else{window.openNew=
-!1;window.openKey="import";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,d){if(null!=d&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(d)){var b=new Blob([a],{type:"application/octet-stream"});this.importVisio(b,mxUtils.bind(this,function(a){this.importXml(a,0,0,!0)}),null,d)}else this.editor.graph.setSelectionCells(this.importXml(a,0,0,!0))}));
-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.importZipFile=function(a,b,c){var d=this,e=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(a).then(function(e){if(0==Object.keys(e.files).length)c();
-else{var f=0,g,l=!1;e.forEach(function(a,d){var e=d.name.toLowerCase();"diagram/diagram.xml"==e?(l=!0,d.async("string").then(function(a){0==a.indexOf("<mxfile ")?b(a):c()})):0==e.indexOf("versions/")&&(e=parseInt(e.substr(9)),e>f&&(f=e,g=d))});0<f?g.async("string").then(function(e){!d.isOffline()&&(new XMLHttpRequest).upload&&d.isRemoteFileFormat(e,a.name)?d.parseFile(new Blob([e],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?b(a.responseText):
-c())}),a.name):c()}):l||c()}},function(a){c(a)}):c()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?e():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",e))};EditorUi.prototype.importFile=function(a,b,c,e,l,n,k,m,t,q,z){q=null!=q?q:!0;var d=!1,f=null,g=mxUtils.bind(this,function(a){var d=null;null!=a&&"<mxlibrary"==a.substring(0,10)?this.loadLibrary(new LocalLibrary(this,a,k)):d=this.importXml(a,c,e,q);null!=m&&m(d)});"image"==b.substring(0,5)?(t=!1,"image/png"==
-b.substring(0,9)&&(b=z?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(f=this.importXml(b,c,e,q),t=!0)),t||(b=this.editor.graph,z=a.indexOf(";"),0<z&&(a=a.substring(0,z)+a.substring(a.indexOf(",",z+1))),q&&b.isGridEnabled()&&(c=b.snap(c),e=b.snap(e)),f=[b.insertVertex(null,null,"",c,e,l,n,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";")])):/(\.*<graphml )/.test(a)?(d=!0,this.importGraphML(a,g)):null!=t&&
-null!=k&&(/(\.v(dx|sdx?))($|\?)/i.test(k)||/(\.vs(x|sx?))($|\?)/i.test(k))?(d=!0,this.importVisio(t,g)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,k)?(d=!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?g(a.responseText):null!=m&&m(null))}),k)):0==a.indexOf("PK")&&null!=t?(d=!0,this.importZipFile(t,g,mxUtils.bind(this,function(){f=this.insertTextAt(this.validateFileData(a),
-c,e,!0,null,q);m(f)}))):/(\.v(sd|dx))($|\?)/i.test(k)||/(\.vs(s|x))($|\?)/i.test(k)||(f=this.insertTextAt(this.validateFileData(a),c,e,!0,null,q));d||null==m||m(f);return f};EditorUi.prototype.base64Encode=function(a){for(var d="",b=0,c=a.length,e,n,k;b<c;){e=a.charCodeAt(b++)&255;if(b==c){d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4);d+="==";break}n=a.charCodeAt(b++);if(b==
-c){d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(n&240)>>4);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((n&15)<<2);d+="=";break}k=a.charCodeAt(b++);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(n&240)>>4);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((n&
-15)<<2|(k&192)>>6);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(k&63)}return d};EditorUi.prototype.importFiles=function(a,b,c,e,l,n,k,m,t,q,z,u){e=null!=e?e:this.maxImageSize;q=null!=q?q:this.maxImageBytes;var d=null!=b&&null!=c,f=!0;b=null!=b?b:0;c=null!=c?c:0;var g=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var p=z||this.resampleThreshold,x=0;x<a.length;x++)if("image/"==a[x].type.substring(0,6)&&a[x].size>p){g=!0;break}var A=mxUtils.bind(this,function(){var g=this.editor.graph,
-p=g.gridSize;l=null!=l?l:mxUtils.bind(this,function(a,b,c,e,f,g,l,n,k){try{return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,l)),null):this.importFile(a,b,c,e,f,g,l,n,k,d,u)}catch(Z){return this.handleError(Z),null}});n=null!=n?n:mxUtils.bind(this,function(a){g.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var t=a.length,v=t,x=[],A=mxUtils.bind(this,function(a,d){x[a]=d;if(0==--v){this.spinner.stop();
-if(null!=m)m(x);else{var b=[];g.getModel().beginUpdate();try{for(var c=0;c<x.length;c++){var e=x[c]();null!=e&&(b=b.concat(e))}}finally{g.getModel().endUpdate()}}n(b)}}),C=0;C<t;C++)mxUtils.bind(this,function(d){var n=a[d];if(null!=n){var m=new FileReader;m.onload=mxUtils.bind(this,function(a){if(null==k||k(n))if("image/"==n.type.substring(0,6))if("image/svg"==n.type.substring(0,9)){var m=a.target.result,t=m.indexOf(","),v=decodeURIComponent(escape(atob(m.substring(t+1)))),x=mxUtils.parseXml(v),v=
-x.getElementsByTagName("svg");if(0<v.length){var v=v[0],D=u?null:v.getAttribute("content");null!=D&&"<"!=D.charAt(0)&&"%"!=D.charAt(0)&&(D=unescape(window.atob?atob(D):Base64.decode(D,!0)));null!=D&&"%"==D.charAt(0)&&(D=decodeURIComponent(D));null==D||"<mxfile "!==D.substring(0,8)&&"<mxGraphModel "!==D.substring(0,14)?A(d,mxUtils.bind(this,function(){try{if(m.substring(0,t+1),null!=x){var a=x.getElementsByTagName("svg");if(0<a.length){var f=a[0],k=f.getAttribute("width"),q=f.getAttribute("height"),
-k=null!=k&&"%"!=k.charAt(k.length-1)?parseFloat(k):NaN,q=null!=q&&"%"!=q.charAt(q.length-1)?parseFloat(q):NaN,z=f.getAttribute("viewBox");if(null==z||0==z.length)f.setAttribute("viewBox","0 0 "+k+" "+q);else if(isNaN(k)||isNaN(q)){var v=z.split(" ");3<v.length&&(k=parseFloat(v[2]),q=parseFloat(v[3]))}m=this.createSvgDataUri(mxUtils.getXml(f));var D=Math.min(1,Math.min(e/Math.max(1,k)),e/Math.max(1,q)),u=l(m,n.type,b+d*p,c+d*p,Math.max(1,Math.round(k*D)),Math.max(1,Math.round(q*D)),n.name);if(isNaN(k)||
-isNaN(q)){var A=new Image;A.onload=mxUtils.bind(this,function(){k=Math.max(1,A.width);q=Math.max(1,A.height);u[0].geometry.width=k;u[0].geometry.height=q;f.setAttribute("viewBox","0 0 "+k+" "+q);m=this.createSvgDataUri(mxUtils.getXml(f));var a=m.indexOf(";");0<a&&(m=m.substring(0,a)+m.substring(m.indexOf(",",a+1)));g.setCellStyles("image",m,[u[0]])});A.src=this.createSvgDataUri(mxUtils.getXml(f))}return u}}}catch(da){}return null})):A(d,mxUtils.bind(this,function(){return l(D,"text/xml",b+d*p,c+d*
-p,0,0,n.name)}))}else A(d,mxUtils.bind(this,function(){return null}))}else{v=!1;if("image/png"==n.type){var C=u?null:this.extractGraphModelFromPng(a.target.result);if(null!=C&&0<C.length){var y=new Image;y.src=a.target.result;A(d,mxUtils.bind(this,function(){return l(C,"text/xml",b+d*p,c+d*p,y.width,y.height,n.name)}));v=!0}}v||(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,k,m){A(d,mxUtils.bind(this,function(){if(null!=g&&g.length<q){var t=f&&this.isResampleImage(a.target.result,z)?Math.min(1,Math.min(e/k,e/m)):1;return l(g,n.type,b+d*p,c+d*p,Math.round(k*t),Math.round(m*t),n.name)}this.handleError({message:mxResources.get("imageTooBig")});
-return null}))}),f,e,z)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else m=a.target.result,l(m,n.type,b+d*p,c+d*p,240,160,n.name,function(a){A(d,function(){return a})},n)});/(\.v(dx|sdx?))($|\?)/i.test(n.name)||/(\.vs(x|sx?))($|\?)/i.test(n.name)?l(null,n.type,b+d*p,c+d*p,240,160,n.name,function(a){A(d,function(){return a})},n):"image"==n.type.substring(0,5)||"application/pdf"==n.type?m.readAsDataURL(n):m.readAsText(n)}})(C)});if(g){g=[];
+mxUtils.bind(this,function(){var d=new FeedbackDialog(this,"Lucidchart Import Feedback",!0,a);this.showDialog(d.container,610,360,!0,!1);d.init()}))}),mxUtils.bind(this,function(a){this.handleError(a)}));else{d=this.editor.graph;l=null;d.getModel().beginUpdate();try{l=d.insertVertex(d.getDefaultParent(),null,"",d.snap(b),d.snap(c),1,1,"text;whiteSpace=wrap;"+(e?"html=1;":""));d.fireEvent(new mxEventObject("textInserted","cells",[l]));"<"==a.charAt(0)&&a.indexOf(">")==a.length-1&&(a=mxUtils.htmlEntities(a));
+a.length>this.maxTextBytes&&(a=a.substring(0,this.maxTextBytes)+"...");l.value=a;d.updateCellSize(l);if(0<this.maxTextWidth&&l.geometry.width>this.maxTextWidth){var m=d.getPreferredSizeForCell(l,this.maxTextWidth);l.geometry.width=m.width;l.geometry.height=m.height}/\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(l.value)&&d.setLinkForCell(l,
+l.value);l.geometry.width+=d.gridSize;l.geometry.height+=d.gridSize}finally{d.getModel().endUpdate()}return[l]}}return[]};EditorUi.prototype.formatFileSize=function(a){var d=-1;do a/=1024,d++;while(1024<a);return Math.max(a,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[d]};EditorUi.prototype.convertDataUri=function(a){if("data:"==a.substring(0,5)){var d=a.indexOf(";");0<d&&(a=a.substring(0,d)+a.substring(a.indexOf(",",d+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)||'{"Properties":'==a.substring(0,14))};EditorUi.prototype.importLocalFile=function(a,b){if(a&&Graph.fileSupport){if(null==this.importFileInputElt){var d=document.createElement("input");d.setAttribute("type","file");mxEvent.addListener(d,"change",mxUtils.bind(this,function(){null!=d.files&&(this.importFiles(d.files,null,null,this.maxImageSize),d.type="",d.type="file",d.value="")}));d.style.display=
+"none";document.body.appendChild(d);this.importFileInputElt=d}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";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,d){if(null!=d&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(d)){var b=new Blob([a],{type:"application/octet-stream"});this.importVisio(b,mxUtils.bind(this,function(a){this.importXml(a,
+0,0,!0)}),null,d)}else this.editor.graph.setSelectionCells(this.importXml(a,0,0,!0))}));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.importZipFile=function(a,b,c){var d=this,e=mxUtils.bind(this,function(){this.loadingExtensions=
+!1;"undefined"!==typeof JSZip?JSZip.loadAsync(a).then(function(e){if(0==Object.keys(e.files).length)c();else{var f=0,g,l=!1;e.forEach(function(a,d){var e=d.name.toLowerCase();"diagram/diagram.xml"==e?(l=!0,d.async("string").then(function(a){0==a.indexOf("<mxfile ")?b(a):c()})):0==e.indexOf("versions/")&&(e=parseInt(e.substr(9)),e>f&&(f=e,g=d))});0<f?g.async("string").then(function(e){!d.isOffline()&&(new XMLHttpRequest).upload&&d.isRemoteFileFormat(e,a.name)?d.parseFile(new Blob([e],{type:"application/octet-stream"}),
+mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?b(a.responseText):c())}),a.name):c()}):l||c()}},function(a){c(a)}):c()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?e():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",e))};EditorUi.prototype.importFile=function(a,b,c,e,l,n,k,m,t,q,z){q=null!=q?q:!0;var d=!1,f=null,g=mxUtils.bind(this,function(a){var d=null;null!=a&&"<mxlibrary"==a.substring(0,10)?this.loadLibrary(new LocalLibrary(this,
+a,k)):d=this.importXml(a,c,e,q);null!=m&&m(d)});"image"==b.substring(0,5)?(t=!1,"image/png"==b.substring(0,9)&&(b=z?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(f=this.importXml(b,c,e,q),t=!0)),t||(b=this.editor.graph,z=a.indexOf(";"),0<z&&(a=a.substring(0,z)+a.substring(a.indexOf(",",z+1))),q&&b.isGridEnabled()&&(c=b.snap(c),e=b.snap(e)),f=[b.insertVertex(null,null,"",c,e,l,n,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+a+";")])):/(\.*<graphml )/.test(a)?(d=!0,this.importGraphML(a,g)):null!=t&&null!=k&&(/(\.v(dx|sdx?))($|\?)/i.test(k)||/(\.vs(x|sx?))($|\?)/i.test(k))?(d=!0,this.importVisio(t,g)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,k)?(d=!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?g(a.responseText):null!=m&&m(null))}),k)):0==a.indexOf("PK")&&null!=t?(d=!0,this.importZipFile(t,
+g,mxUtils.bind(this,function(){f=this.insertTextAt(this.validateFileData(a),c,e,!0,null,q);m(f)}))):/(\.v(sd|dx))($|\?)/i.test(k)||/(\.vs(s|x))($|\?)/i.test(k)||(f=this.insertTextAt(this.validateFileData(a),c,e,!0,null,q));d||null==m||m(f);return f};EditorUi.prototype.base64Encode=function(a){for(var d="",b=0,c=a.length,e,n,k;b<c;){e=a.charCodeAt(b++)&255;if(b==c){d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&
+3)<<4);d+="==";break}n=a.charCodeAt(b++);if(b==c){d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(n&240)>>4);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((n&15)<<2);d+="=";break}k=a.charCodeAt(b++);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&
+3)<<4|(n&240)>>4);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((n&15)<<2|(k&192)>>6);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(k&63)}return d};EditorUi.prototype.importFiles=function(a,b,c,e,l,n,k,m,t,q,z,u){e=null!=e?e:this.maxImageSize;q=null!=q?q:this.maxImageBytes;var d=null!=b&&null!=c,f=!0;b=null!=b?b:0;c=null!=c?c:0;var g=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var p=z||this.resampleThreshold,x=0;x<a.length;x++)if("image/"==
+a[x].type.substring(0,6)&&a[x].size>p){g=!0;break}var A=mxUtils.bind(this,function(){var g=this.editor.graph,p=g.gridSize;l=null!=l?l:mxUtils.bind(this,function(a,b,c,e,f,g,l,n,k){try{return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,l)),null):this.importFile(a,b,c,e,f,g,l,n,k,d,u)}catch(Z){return this.handleError(Z),null}});n=null!=n?n:mxUtils.bind(this,function(a){g.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var t=
+a.length,x=t,v=[],C=mxUtils.bind(this,function(a,d){v[a]=d;if(0==--x){this.spinner.stop();if(null!=m)m(v);else{var b=[];g.getModel().beginUpdate();try{for(var c=0;c<v.length;c++){var e=v[c]();null!=e&&(b=b.concat(e))}}finally{g.getModel().endUpdate()}}n(b)}}),A=0;A<t;A++)mxUtils.bind(this,function(d){var n=a[d];if(null!=n){var m=new FileReader;m.onload=mxUtils.bind(this,function(a){if(null==k||k(n))if("image/"==n.type.substring(0,6))if("image/svg"==n.type.substring(0,9)){var m=a.target.result,t=m.indexOf(","),
+x=decodeURIComponent(escape(atob(m.substring(t+1)))),v=mxUtils.parseXml(x),x=v.getElementsByTagName("svg");if(0<x.length){var x=x[0],D=u?null:x.getAttribute("content");null!=D&&"<"!=D.charAt(0)&&"%"!=D.charAt(0)&&(D=unescape(window.atob?atob(D):Base64.decode(D,!0)));null!=D&&"%"==D.charAt(0)&&(D=decodeURIComponent(D));null==D||"<mxfile "!==D.substring(0,8)&&"<mxGraphModel "!==D.substring(0,14)?C(d,mxUtils.bind(this,function(){try{if(m.substring(0,t+1),null!=v){var a=v.getElementsByTagName("svg");
+if(0<a.length){var f=a[0],k=f.getAttribute("width"),z=f.getAttribute("height"),k=null!=k&&"%"!=k.charAt(k.length-1)?parseFloat(k):NaN,z=null!=z&&"%"!=z.charAt(z.length-1)?parseFloat(z):NaN,q=f.getAttribute("viewBox");if(null==q||0==q.length)f.setAttribute("viewBox","0 0 "+k+" "+z);else if(isNaN(k)||isNaN(z)){var x=q.split(" ");3<x.length&&(k=parseFloat(x[2]),z=parseFloat(x[3]))}m=this.createSvgDataUri(mxUtils.getXml(f));var D=Math.min(1,Math.min(e/Math.max(1,k)),e/Math.max(1,z)),u=l(m,n.type,b+d*
+p,c+d*p,Math.max(1,Math.round(k*D)),Math.max(1,Math.round(z*D)),n.name);if(isNaN(k)||isNaN(z)){var C=new Image;C.onload=mxUtils.bind(this,function(){k=Math.max(1,C.width);z=Math.max(1,C.height);u[0].geometry.width=k;u[0].geometry.height=z;f.setAttribute("viewBox","0 0 "+k+" "+z);m=this.createSvgDataUri(mxUtils.getXml(f));var a=m.indexOf(";");0<a&&(m=m.substring(0,a)+m.substring(m.indexOf(",",a+1)));g.setCellStyles("image",m,[u[0]])});C.src=this.createSvgDataUri(mxUtils.getXml(f))}return u}}}catch(da){}return null})):
+C(d,mxUtils.bind(this,function(){return l(D,"text/xml",b+d*p,c+d*p,0,0,n.name)}))}else C(d,mxUtils.bind(this,function(){return null}))}else{x=!1;if("image/png"==n.type){var A=u?null:this.extractGraphModelFromPng(a.target.result);if(null!=A&&0<A.length){var y=new Image;y.src=a.target.result;C(d,mxUtils.bind(this,function(){return l(A,"text/xml",b+d*p,c+d*p,y.width,y.height,n.name)}));x=!0}}x||(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,k,m){C(d,mxUtils.bind(this,function(){if(null!=g&&g.length<q){var t=f&&this.isResampleImage(a.target.result,z)?Math.min(1,Math.min(e/k,e/m)):1;return l(g,n.type,b+d*p,c+d*p,Math.round(k*t),Math.round(m*t),n.name)}this.handleError({message:mxResources.get("imageTooBig")});
+return null}))}),f,e,z)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else m=a.target.result,l(m,n.type,b+d*p,c+d*p,240,160,n.name,function(a){C(d,function(){return a})},n)});/(\.v(dx|sdx?))($|\?)/i.test(n.name)||/(\.vs(x|sx?))($|\?)/i.test(n.name)?l(null,n.type,b+d*p,c+d*p,240,160,n.name,function(a){C(d,function(){return a})},n):"image"==n.type.substring(0,5)||"application/pdf"==n.type?m.readAsDataURL(n):m.readAsText(n)}})(A)});if(g){g=[];
for(x=0;x<a.length;x++)g.push(a[x]);a=g;this.confirmImageResize(function(a){f=a;A()},t)}else A()};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);try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+a.size})}catch(n){}};EditorUi.prototype.isResampleImage=function(a,b){b=null!=b?b:this.resampleThreshold;return a.length>b};EditorUi.prototype.resizeImage=function(a,b,c,e,l,n){l=null!=l?l:this.maxImageSize;var d=Math.max(1,a.width),f=Math.max(1,a.height);if(e&&this.isResampleImage(b,n))try{var g=Math.max(d/l,f/l);if(1<g){var k=Math.round(d/g),m=Math.round(f/g),p=document.createElement("canvas");
-p.width=k;p.height=m;p.getContext("2d").drawImage(a,0,0,k,m);var q=p.toDataURL();if(q.length<b.length){var v=document.createElement("canvas");v.width=k;v.height=m;var u=v.toDataURL();q!==u&&(b=q,d=k,f=m)}}}catch(J){}c(b,d,f)};EditorUi.prototype.crcTable=[];for(var c=0;256>c;c++)for(var m=c,k=0;8>k;k++)m=1==(m&1)?3988292384^m>>>1:m>>>1,EditorUi.prototype.crcTable[c]=m;EditorUi.prototype.updateCRC=function(a,b,c,e){for(var d=0;d<e;d++)a=EditorUi.prototype.crcTable[(a^b.charCodeAt(c+d))&255]^a>>>8;return a};
+p.width=k;p.height=m;p.getContext("2d").drawImage(a,0,0,k,m);var q=p.toDataURL();if(q.length<b.length){var v=document.createElement("canvas");v.width=k;v.height=m;var u=v.toDataURL();q!==u&&(b=q,d=k,f=m)}}}catch(K){}c(b,d,f)};EditorUi.prototype.crcTable=[];for(var c=0;256>c;c++)for(var m=c,k=0;8>k;k++)m=1==(m&1)?3988292384^m>>>1:m>>>1,EditorUi.prototype.crcTable[c]=m;EditorUi.prototype.updateCRC=function(a,b,c,e){for(var d=0;d<e;d++)a=EditorUi.prototype.crcTable[(a^b.charCodeAt(c+d))&255]^a>>>8;return a};
EditorUi.prototype.crc32=function(a){this.crcTable=this.crcTable||this.createCrcTable();for(var d=-1,b=0;b<a.length;b++)d=d>>>8^this.crcTable[(d^a.charCodeAt(b))&255];return(d^-1)>>>0};EditorUi.prototype.writeGraphModelToPng=function(a,b,c,e,l){function d(a,d){var b=k;k+=d;return a.substring(b,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 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 k=0;if(d(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=l&&l();else if(d(a,4),"IHDR"!=d(a,4))null!=l&&l();else{d(a,17);l=a.substring(0,k);do{var m=f(a);if("IDAT"==d(a,4)){l=a.substring(0,k-8);"pHYs"==b&&"dpi"==c?(c=Math.round(e/.0254),c=g(c)+g(c)+String.fromCharCode(1)):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);l+=g(c.length)+
b+c+g(e^4294967295);l+=a.substring(k-8,a.length);break}l+=a.substring(k-8,k-4+m);d(a,m);d(a,4)}while(m);return"data:image/png;base64,"+(window.btoa?btoa(l):Base64.encode(l,!0))}};EditorUi.prototype.extractGraphModelFromPng=function(a){return Editor.extractGraphModelFromPng(a)};EditorUi.prototype.loadImage=function(a,b,c){try{var d=new Image;d.onload=function(){d.width=0<d.width?d.width:120;d.height=0<d.height?d.height:120;b(d)};null!=c&&(d.onerror=c);d.src=a}catch(l){if(null!=c)c(l);else throw l;
}};var q=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.cellEditor.editPlantUmlData=function(d,c,e){var f=JSON.parse(e);c=new TextareaDialog(a,mxResources.get("plantUml")+":",f.data,function(c){null!=c&&a.spinner.spin(document.body,mxResources.get("inserting"))&&a.generatePlantUmlImage(c,f.format,
function(e,g,l){a.spinner.stop();b.getModel().beginUpdate();try{if("txt"==f.format)b.labelChanged(d,"<pre>"+e+"</pre>"),b.updateCellSize(d,!0);else{b.setCellStyles("image",a.convertDataUri(e),[d]);var k=b.model.getGeometry(d);null!=k&&(k=k.clone(),k.width=g,k.height=l,b.cellsResized([d],[k],!1))}b.setAttributeForCell(d,"plantUmlData",JSON.stringify({data:c,format:f.format}))}finally{b.getModel().endUpdate()}},function(b){a.handleError(b)})},null,null,400,220);a.showDialog(c.container,420,300,!0,!0);
c.init()};b.cellEditor.editMermaidData=function(d,c,e){var f=JSON.parse(e);c=new TextareaDialog(a,mxResources.get("mermaid")+":",f.data,function(c){null!=c&&a.spinner.spin(document.body,mxResources.get("inserting"))&&a.generateMermaidImage(c,f.config,function(e,g,l){a.spinner.stop();b.getModel().beginUpdate();try{b.setCellStyles("image",e,[d]);var k=b.model.getGeometry(d);null!=k&&(k=k.clone(),k.width=Math.max(k.width,g),k.height=Math.max(k.height,l),b.cellsResized([d],[k],!1));b.setAttributeForCell(d,
-"mermaidData",JSON.stringify({data:c,config:f.config},null,2))}finally{b.getModel().endUpdate()}},function(b){a.handleError(b)})},null,null,400,220);a.showDialog(c.container,420,300,!0,!0);c.init()};var c=b.cellEditor.startEditing;b.cellEditor.startEditing=function(b,d){try{var e=this.graph.getAttributeForCell(b,"plantUmlData");null!=e?this.editPlantUmlData(b,d,e):(e=this.graph.getAttributeForCell(b,"mermaidData"),null!=e?this.editMermaidData(b,d,e):c.apply(this,arguments))}catch(J){a.handleError(J)}};
-b.getLinkTitle=function(b){return a.getLinkTitle(b)};b.customLinkClicked=function(b){var d=!1;try{a.handleCustomLink(b),d=!0}catch(L){a.handleError(L)}return d};var e=this.clearDefaultStyle;this.clearDefaultStyle=function(){e.apply(this,arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://desk.draw.io/support/solutions/articles/16000051979");var l=a.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(b){b=null!=b?b:"";if(null!=
+"mermaidData",JSON.stringify({data:c,config:f.config},null,2))}finally{b.getModel().endUpdate()}},function(b){a.handleError(b)})},null,null,400,220);a.showDialog(c.container,420,300,!0,!0);c.init()};var c=b.cellEditor.startEditing;b.cellEditor.startEditing=function(b,d){try{var e=this.graph.getAttributeForCell(b,"plantUmlData");null!=e?this.editPlantUmlData(b,d,e):(e=this.graph.getAttributeForCell(b,"mermaidData"),null!=e?this.editMermaidData(b,d,e):c.apply(this,arguments))}catch(K){a.handleError(K)}};
+b.getLinkTitle=function(b){return a.getLinkTitle(b)};b.customLinkClicked=function(b){var d=!1;try{a.handleCustomLink(b),d=!0}catch(I){a.handleError(I)}return d};var e=this.clearDefaultStyle;this.clearDefaultStyle=function(){e.apply(this,arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://desk.draw.io/support/solutions/articles/16000051979");var l=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 l.apply(this,arguments)};var k=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)};k.call(this,a,d,c)};q.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?450:370,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var m=b.getExportVariables;b.getExportVariables=function(){var b=m.apply(this,arguments),d=a.getCurrentFile();null!=d&&(b.filename=d.getTitle());
-b.pagecount=null!=a.pages?a.pages.length:1;b.page=null!=a.currentPage?a.currentPage.getName():"";b.pagenumber=null!=a.pages&&null!=a.currentPage?mxUtils.indexOf(a.pages,a.currentPage)+1:1;return b};var x=b.getGlobalVariable;b.getGlobalVariable=function(b){var d=a.getCurrentFile();return"filename"==b&&null!=d?d.getTitle():"page"==b&&null!=a.currentPage?a.currentPage.getName():"pagenumber"==b?null!=a.currentPage&&null!=a.pages?mxUtils.indexOf(a.pages,a.currentPage)+1:1:"pagecount"==b?null!=a.pages?
-a.pages.length:1:x.apply(this,arguments)};var t=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))t.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 u=this.actions.get("print");u.setEnabled(!mxClient.IS_IOS||!navigator.standalone);u.visible=u.isEnabled();if(!this.editor.chromeless||this.editor.editable)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",
+b.pagecount=null!=a.pages?a.pages.length:1;b.page=null!=a.currentPage?a.currentPage.getName():"";b.pagenumber=null!=a.pages&&null!=a.currentPage?mxUtils.indexOf(a.pages,a.currentPage)+1:1;return b};var u=b.getGlobalVariable;b.getGlobalVariable=function(b){var d=a.getCurrentFile();return"filename"==b&&null!=d?d.getTitle():"page"==b&&null!=a.currentPage?a.currentPage.getName():"pagenumber"==b?null!=a.currentPage&&null!=a.pages?mxUtils.indexOf(a.pages,a.currentPage)+1:1:"pagecount"==b?null!=a.pages?
+a.pages.length:1:u.apply(this,arguments)};var t=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))t.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 y=this.actions.get("print");y.setEnabled(!mxClient.IS_IOS||!navigator.standalone);y.visible=y.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"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"),this.installImagePasteHandler(),this.installNativeClipboardHandler();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,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 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()})))}));"undefined"!==typeof window.mxSettings&&(u=this.editor.graph.view,
-u.setUnit(mxSettings.getUnit()),u.addListener("unitChanged",function(a,b){mxSettings.setUnit(b.getProperty("unit"));mxSettings.save()}),this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,u.unit),this.refresh());if("1"==urlParams.styledev){u=document.getElementById("geFooter");null!=u&&(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)})),u.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 z=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:z.apply(this,arguments)}}u=document.getElementById("geInfo");null!=u&&u.parentNode.removeChild(u);if(Graph.fileSupport&&(!this.editor.chromeless||
-this.editor.editable)){var y=null;mxEvent.addListener(b.container,"dragleave",function(a){b.isEnabled()&&(null!=y&&(y.parentNode.removeChild(y),y=null),a.stopPropagation(),a.preventDefault())});mxEvent.addListener(b.container,"dragover",mxUtils.bind(this,function(a){null==y&&(!mxClient.IS_IE||10<document.documentMode)&&(y=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!=y&&(y.parentNode.removeChild(y),y=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,g=d.y/e-c.y;if(0<a.dataTransfer.files.length)mxEvent.isAltDown(a)&&(g=f=null),this.importFiles(a.dataTransfer.files,f,g,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a));else{mxEvent.isAltDown(a)&&(g=f=0);var l=0<=mxUtils.indexOf(a.dataTransfer.types,
+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()})))}));"undefined"!==typeof window.mxSettings&&(y=this.editor.graph.view,
+y.setUnit(mxSettings.getUnit()),y.addListener("unitChanged",function(a,b){mxSettings.setUnit(b.getProperty("unit"));mxSettings.save()}),this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,y.unit),this.refresh());if("1"==urlParams.styledev){y=document.getElementById("geFooter");null!=y&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type",
+"text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),y.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,
+function(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 z=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:z.apply(this,arguments)}}y=document.getElementById("geInfo");null!=y&&y.parentNode.removeChild(y);if(Graph.fileSupport&&(!this.editor.chromeless||
+this.editor.editable)){var E=null;mxEvent.addListener(b.container,"dragleave",function(a){b.isEnabled()&&(null!=E&&(E.parentNode.removeChild(E),E=null),a.stopPropagation(),a.preventDefault())});mxEvent.addListener(b.container,"dragover",mxUtils.bind(this,function(a){null==E&&(!mxClient.IS_IE||10<document.documentMode)&&(E=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!=E&&(E.parentNode.removeChild(E),E=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,g=d.y/e-c.y;if(0<a.dataTransfer.files.length)mxEvent.isAltDown(a)&&(g=f=null),this.importFiles(a.dataTransfer.files,f,g,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a));else{mxEvent.isAltDown(a)&&(g=f=0);var l=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,g,!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 n=null,c=d.getElementsByTagName("img");null!=c&&1==c.length?(k=c[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)||(n=!0)):(c=d.getElementsByTagName("a"),null!=
c&&1==c.length?k=c[0].getAttribute("href"):(d=d.getElementsByTagName("pre"),null!=d&&1==d.length&&(k=mxUtils.getTextContent(d[0]))));var m=!0,p=mxUtils.bind(this,function(){b.setSelectionCells(this.insertTextAt(k,f,g,!0,n,null,m))});n&&k.length>this.resampleThreshold?this.confirmImageResize(function(a){m=a;p()},mxEvent.isControlDown(a)):p()}else null!=l&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(l)?this.loadImage(decodeURIComponent(l),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,g,d*c,a*c,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+l+";"))}),mxUtils.bind(this,function(a){b.setSelectionCells(this.insertTextAt(l,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();
@@ -3321,34 +3322,34 @@ if("file"===k.kind){if(a.isEditing())this.importFiles([k.getAsFile()],0,0,this.m
"&nbsp;";c.focus();document.execCommand("selectAll",!1,null)},0)}var b=this.editor.graph,c=document.createElement("div");c.setAttribute("autocomplete","off");c.setAttribute("autocorrect","off");c.setAttribute("autocapitalize","off");c.setAttribute("spellcheck","false");c.style.textRendering="optimizeSpeed";c.style.fontFamily="monospace";c.style.wordBreak="break-all";c.style.background="transparent";c.style.color="transparent";c.style.position="absolute";c.style.whiteSpace="nowrap";c.style.overflow=
"hidden";c.style.display="block";c.style.fontSize="1";c.style.zIndex="-1";c.style.resize="none";c.style.outline="none";c.style.width="1px";c.style.height="1px";mxUtils.setOpacity(c,0);c.contentEditable=!0;c.innerHTML="&nbsp;";var e=!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)||e||(c.style.left=b.container.scrollLeft+10+"px",c.style.top=b.container.scrollTop+10+"px",b.container.appendChild(c),e=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){c.focus();document.execCommand("selectAll",!1,null)},0):(c.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(){!e||224!=d&&17!=d&&91!=d||(e=!1,b.isEditing()||null!=this.dialog||null==b.container||b.container.focus(),c.parentNode.removeChild(c),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(c,"copy",mxUtils.bind(this,function(d){if(b.isEnabled())try{mxClipboard.copy(b),this.copyCells(c),a()}catch(A){this.handleError(A)}}));mxEvent.addListener(c,"cut",mxUtils.bind(this,function(d){if(b.isEnabled())try{mxClipboard.copy(b),
-this.copyCells(c,!0),a()}catch(A){this.handleError(A)}}));mxEvent.addListener(c,"paste",mxUtils.bind(this,function(a){b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&((new Date).getTime(),c.innerHTML="&nbsp;",c.focus(),null!=a.clipboardData&&this.pasteCells(a,c,!0),mxEvent.isConsumed(a)||window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,c,!1)}),0))}),!0);var l=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==c?!0:l.apply(this,arguments)}};
+function(a){var d=a.keyCode;window.setTimeout(mxUtils.bind(this,function(){!e||224!=d&&17!=d&&91!=d||(e=!1,b.isEditing()||null!=this.dialog||null==b.container||b.container.focus(),c.parentNode.removeChild(c),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(c,"copy",mxUtils.bind(this,function(d){if(b.isEnabled())try{mxClipboard.copy(b),this.copyCells(c),a()}catch(x){this.handleError(x)}}));mxEvent.addListener(c,"cut",mxUtils.bind(this,function(d){if(b.isEnabled())try{mxClipboard.copy(b),
+this.copyCells(c,!0),a()}catch(x){this.handleError(x)}}));mxEvent.addListener(c,"paste",mxUtils.bind(this,function(a){b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&((new Date).getTime(),c.innerHTML="&nbsp;",c.focus(),null!=a.clipboardData&&this.pasteCells(a,c,!0,!0),mxEvent.isConsumed(a)||window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,c,!1,!0)}),0))}),!0);var l=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==c?!0:l.apply(this,arguments)}};
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();if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,function(a){a.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),
this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(d){}this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(a,b){var d=b.getProperty("customFonts");this.menus.customFonts=d;mxSettings.setCustomFonts(d);mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));
this.addListener("copyConnectChanged",mxUtils.bind(this,function(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("dark"==uiTheme);this.addListener("gridColorChanged",mxUtils.bind(this,
function(a,b){mxSettings.setGridColor(this.editor.graph.view.gridColor,"dark"==uiTheme);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(d.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,c){if(!mxEvent.isConsumed(a)){var d=b;if(c&&null!=a.clipboardData&&a.clipboardData.getData){var e=a.clipboardData.getData("text/html");if(null!=e&&0<e.length){if(d=document.createElement("div"),d.innerHTML=e,e=d.getElementsByTagName("style"),null!=e)for(;0<e.length;)e[0].parentNode.removeChild(e[0])}else e=a.clipboardData.getData("text/plain"),null!=e&&0<e.length&&
-(d=document.createElement("div"),mxUtils.setTextContent(d,e))}e=d.getElementsByTagName("span");if(null!=e&&0<e.length&&"application/vnd.lucid.chart.objects"===e[0].getAttribute("data-lucid-type"))c=e[0].getAttribute("data-lucid-content"),null!=c&&0<c.length&&(this.convertLucidChart(c,mxUtils.bind(this,function(a){var b=this.editor.graph;b.lastPasteXml==a?b.pasteCounter++:(b.lastPasteXml=a,b.pasteCounter=0);var d=b.pasteCounter*b.gridSize;b.setSelectionCells(this.importXml(a,d,d));b.scrollCellToVisible(b.getSelectionCell())}),
-mxUtils.bind(this,function(a){this.handleError(a)})),mxEvent.consume(a));else{var f=mxUtils.trim(null==d.innerText?mxUtils.getTextContent(d):d.innerText),g=!1;try{var k=f.lastIndexOf("%3E");0<=k&&k<f.length-3&&(f=f.substring(0,k+3))}catch(C){}try{var e=d.getElementsByTagName("span"),m=null!=e&&0<e.length?mxUtils.trim(decodeURIComponent(e[0].textContent)):decodeURIComponent(f);this.isCompatibleString(m)&&(g=!0,f=m)}catch(C){}try{var q=this.editor.graph;if(null!=f&&0<f.length){q.lastPasteXml==f?q.pasteCounter++:
-(q.lastPasteXml=f,q.pasteCounter=0);var z=q.pasteCounter*q.gridSize;if(g||this.isCompatibleString(f))q.setSelectionCells(this.importXml(f,z,z));else{var u=q.getInsertPoint();q.isMouseInsertPoint()&&(z=0,q.lastPasteXml==f&&0<q.pasteCounter&&q.pasteCounter--);q.setSelectionCells(this.insertTextAt(f,u.x+z,u.y+z,!0))}q.isSelectionEmpty()||(q.scrollCellToVisible(q.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(q.view.getState(q.getSelectionCell())));try{mxEvent.consume(a)}catch(C){}}else c||
-(q.lastPasteXml=null,q.pasteCounter=0)}catch(C){this.handleError(C)}}}b.innerHTML="&nbsp;"};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&&this.openLocalFile(d,null,!0)):!this.isOffline()&&this.isRemoteFileFormat(d)?(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(d))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()&&this.openLocalFile(a.getText(),null,!0)})):/^https?:\/\//.test(d)&&(null==this.getCurrentFile()?window.location.hash=
-"#U"+encodeURIComponent(d):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(d)))))}else this.openLocalFile(d,null,!0)}a.stopPropagation();a.preventDefault()}))};EditorUi.prototype.highlightElement=function(a){var b=0,d=0,c,e;if(null==a){e=document.body;var k=document.documentElement;c=(e.clientWidth||k.clientWidth)-3;e=Math.max(e.clientHeight||0,k.clientHeight)-3}else b=a.offsetTop,d=a.offsetLeft,c=a.clientWidth,
-e=a.clientHeight;k=document.createElement("div");k.style.zIndex=mxPopupMenu.prototype.zIndex+2;k.style.border="3px dotted rgb(254, 137, 12)";k.style.pointerEvents="none";k.style.position="absolute";k.style.top=b+"px";k.style.left=d+"px";k.style.width=Math.max(0,c-3)+"px";k.style.height=Math.max(0,e-3)+"px";null!=a&&a.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(k):document.body.appendChild(k);return k};EditorUi.prototype.stringToCells=function(a){a=mxUtils.parseXml(a);
-var b=this.editor.extractGraphModel(a.documentElement);a=[];if(null!=b){var d=new mxCodec(b.ownerDocument),c=new mxGraphModel;d.decode(b,c);b=c.getChildAt(c.getRoot(),0);for(d=0;d<c.getChildCount(b);d++)a.push(c.getChildAt(b,d))}return a};EditorUi.prototype.openFiles=function(a,b){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var d=0;d<a.length;d++)mxUtils.bind(this,function(a){var d=new FileReader;d.onload=mxUtils.bind(this,function(d){try{var c=d.target.result,e=a.name;if(null!=
-e&&0<e.length){!this.useCanvasForExport&&/(\.png)$/i.test(e)?e=e.substring(0,e.length-4)+".drawio":/(\.pdf)$/i.test(e)&&(e=e.substring(0,e.length-4)+".drawio");var f=mxUtils.bind(this,function(a){e=0<=e.lastIndexOf(".")?e.substring(0,e.lastIndexOf("."))+".drawio":e+".drawio";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(E){this.handleError(E,
-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(c))this.importGraphML(c,mxUtils.bind(this,function(a){this.spinner.stop();f(a)}));else if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,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(c))/(\.json)$/i.test(e)&&(e=e.substring(0,e.length-5)+".drawio"),this.convertLucidChart(c,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"==d.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,d.target.result,a.name))}catch(z){this.handleError(z,mxResources.get("errorLoadingFile"))}}else if(0==c.indexOf("PK"))this.importZipFile(a,mxUtils.bind(this,function(a){this.spinner.stop();f(a)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(c,e,b)}));else{if("image/png"==a.type.substring(0,9))c=
-this.extractGraphModelFromPng(c);else if("application/pdf"==a.type){var g=Editor.extractGraphModelFromPdf(c);null!=g&&(c=g)}this.spinner.stop();this.openLocalFile(c,e,b)}}}catch(z){this.handleError(z)}});d.onerror=mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a);window.openFile=null});"image"!==a.type.substring(0,5)&&"application/pdf"!==a.type||"image/svg"===a.type.substring(0,9)?d.readAsText(a):d.readAsDataURL(a)})(a[d])};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=mxUtils.parseXml(a);null!=d&&(this.editor.setGraphXml(d.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,a,b||this.defaultFilename,c))});if(null!=a&&0<a.length)null==d||!d.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)?e():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&null!=d&&d.isModified()?this.confirm(mxResources.get("allChangesLost"),
-null,e,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(a,b),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=d&&d.isModified()?this.confirm(mxResources.get("allChangesLost"),null,e,mxResources.get("cancel"),mxResources.get("discardChanges")):e()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var a={};if(null!=this.pages)for(var b=
-0;b<this.pages.length;b++)this.updatePageRoot(this.pages[b]),this.addBasenamesForCell(this.pages[b].root,a);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),a);var b=[],c;for(c in a)b.push(c);return b};EditorUi.prototype.addBasenamesForCell=function(a,b){function d(a){if(null!=a){var d=a.lastIndexOf(".");0<d&&(a=a.substring(d+1,a.length));null==b[a]&&(b[a]=!0)}}var c=this.editor.graph,e=c.getCellStyle(a);d(mxStencilRegistry.getBasenameForStencil(e[mxConstants.STYLE_SHAPE]));c.model.isEdge(a)&&
-(d(mxMarker.getPackageForType(e[mxConstants.STYLE_STARTARROW])),d(mxMarker.getPackageForType(e[mxConstants.STYLE_ENDARROW])));for(var e=c.model.getChildCount(a),f=0;f<e;f++)this.addBasenamesForCell(c.model.getChildAt(a,f),b)};EditorUi.prototype.setGraphEnabled=function(a){this.diagramContainer.style.visibility=a?"":"hidden";this.formatContainer.style.visibility=a?"":"hidden";this.sidebarFooterContainer.style.display=a?"":"none";this.sidebarContainer.style.display=a?"":"none";this.hsplit.style.display=
+null):(d.lastPasteXml=e,d.pasteCounter=0);a.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.pasteCells=function(a,b,c,e){if(!mxEvent.isConsumed(a)){var d=b,f=!1;if(c&&null!=a.clipboardData&&a.clipboardData.getData){var g=a.clipboardData.getData("text/html");if(null!=g&&0<g.length){d=document.createElement("div");d.innerHTML=g;f=!0;g=d.getElementsByTagName("style");if(null!=g)for(;0<g.length;)g[0].parentNode.removeChild(g[0]);Graph.removePasteFormatting(d)}else g=a.clipboardData.getData("text/plain"),
+null!=g&&0<g.length&&(d=document.createElement("div"),mxUtils.setTextContent(d,g))}g=d.getElementsByTagName("span");if(null!=g&&0<g.length&&"application/vnd.lucid.chart.objects"===g[0].getAttribute("data-lucid-type"))c=g[0].getAttribute("data-lucid-content"),null!=c&&0<c.length&&(this.convertLucidChart(c,mxUtils.bind(this,function(a){var b=this.editor.graph;b.lastPasteXml==a?b.pasteCounter++:(b.lastPasteXml=a,b.pasteCounter=0);var d=b.pasteCounter*b.gridSize;b.setSelectionCells(this.importXml(a,d,
+d));b.scrollCellToVisible(b.getSelectionCell())}),mxUtils.bind(this,function(a){this.handleError(a)})),mxEvent.consume(a));else{var f=f?d.outerHTML:mxUtils.trim(null==d.innerText?mxUtils.getTextContent(d):d.innerText),k=!1;try{var m=f.lastIndexOf("%3E");0<=m&&m<f.length-3&&(f=f.substring(0,m+3))}catch(v){}try{var g=d.getElementsByTagName("span"),p=null!=g&&0<g.length?mxUtils.trim(decodeURIComponent(g[0].textContent)):decodeURIComponent(f);this.isCompatibleString(p)&&(k=!0,f=p)}catch(v){}try{var q=
+this.editor.graph;if(null!=f&&0<f.length){q.lastPasteXml==f?q.pasteCounter++:(q.lastPasteXml=f,q.pasteCounter=0);var u=q.pasteCounter*q.gridSize;if(k||this.isCompatibleString(f))q.setSelectionCells(this.importXml(f,u,u));else if(e&&1==q.getSelectionCount())q.labelChanged(q.getSelectionCell(),f);else{var y=q.getInsertPoint();q.isMouseInsertPoint()&&(u=0,q.lastPasteXml==f&&0<q.pasteCounter&&q.pasteCounter--);q.setSelectionCells(this.insertTextAt(f,y.x+u,y.y+u,!0))}q.isSelectionEmpty()||(q.scrollCellToVisible(q.getSelectionCell()),
+null!=this.hoverIcons&&this.hoverIcons.update(q.view.getState(q.getSelectionCell())));try{mxEvent.consume(a)}catch(v){}}else c||(q.lastPasteXml=null,q.pasteCounter=0)}catch(v){this.handleError(v)}}}b.innerHTML="&nbsp;"};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&&this.openLocalFile(d,null,!0)):!this.isOffline()&&this.isRemoteFileFormat(d)?(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(d))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()&&this.openLocalFile(a.getText(),
+null,!0)})):/^https?:\/\//.test(d)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(d):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(d)))))}else this.openLocalFile(d,null,!0)}a.stopPropagation();a.preventDefault()}))};EditorUi.prototype.highlightElement=function(a){var b=0,d=0,c,e;if(null==a){e=document.body;var k=document.documentElement;c=(e.clientWidth||k.clientWidth)-3;e=Math.max(e.clientHeight||
+0,k.clientHeight)-3}else b=a.offsetTop,d=a.offsetLeft,c=a.clientWidth,e=a.clientHeight;k=document.createElement("div");k.style.zIndex=mxPopupMenu.prototype.zIndex+2;k.style.border="3px dotted rgb(254, 137, 12)";k.style.pointerEvents="none";k.style.position="absolute";k.style.top=b+"px";k.style.left=d+"px";k.style.width=Math.max(0,c-3)+"px";k.style.height=Math.max(0,e-3)+"px";null!=a&&a.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(k):document.body.appendChild(k);
+return k};EditorUi.prototype.stringToCells=function(a){a=mxUtils.parseXml(a);var b=this.editor.extractGraphModel(a.documentElement);a=[];if(null!=b){var d=new mxCodec(b.ownerDocument),c=new mxGraphModel;d.decode(b,c);b=c.getChildAt(c.getRoot(),0);for(d=0;d<c.getChildCount(b);d++)a.push(c.getChildAt(b,d))}return a};EditorUi.prototype.openFiles=function(a,b){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var d=0;d<a.length;d++)mxUtils.bind(this,function(a){var d=new FileReader;d.onload=
+mxUtils.bind(this,function(d){try{var c=d.target.result,e=a.name;if(null!=e&&0<e.length){!this.useCanvasForExport&&/(\.png)$/i.test(e)?e=e.substring(0,e.length-4)+".drawio":/(\.pdf)$/i.test(e)&&(e=e.substring(0,e.length-4)+".drawio");var f=mxUtils.bind(this,function(a){e=0<=e.lastIndexOf(".")?e.substring(0,e.lastIndexOf("."))+".drawio":e+".drawio";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(E){this.handleError(E,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(c))this.importGraphML(c,mxUtils.bind(this,function(a){this.spinner.stop();f(a)}));else if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,
+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(c))/(\.json)$/i.test(e)&&(e=e.substring(0,e.length-5)+".drawio"),this.convertLucidChart(c,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"==d.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,d.target.result,a.name))}catch(z){this.handleError(z,mxResources.get("errorLoadingFile"))}}else if(0==c.indexOf("PK"))this.importZipFile(a,mxUtils.bind(this,function(a){this.spinner.stop();f(a)}),mxUtils.bind(this,function(){this.spinner.stop();
+this.openLocalFile(c,e,b)}));else{if("image/png"==a.type.substring(0,9))c=this.extractGraphModelFromPng(c);else if("application/pdf"==a.type){var g=Editor.extractGraphModelFromPdf(c);null!=g&&(c=g)}this.spinner.stop();this.openLocalFile(c,e,b)}}}catch(z){this.handleError(z)}});d.onerror=mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a);window.openFile=null});"image"!==a.type.substring(0,5)&&"application/pdf"!==a.type||"image/svg"===a.type.substring(0,9)?d.readAsText(a):d.readAsDataURL(a)})(a[d])};
+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=mxUtils.parseXml(a);null!=d&&(this.editor.setGraphXml(d.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,a,b||this.defaultFilename,c))});if(null!=a&&0<a.length)null==d||!d.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)?e():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&
+null!=d&&d.isModified()?this.confirm(mxResources.get("allChangesLost"),null,e,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(a,b),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=d&&d.isModified()?this.confirm(mxResources.get("allChangesLost"),null,e,mxResources.get("cancel"),mxResources.get("discardChanges")):e()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=
+function(){var a={};if(null!=this.pages)for(var b=0;b<this.pages.length;b++)this.updatePageRoot(this.pages[b]),this.addBasenamesForCell(this.pages[b].root,a);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),a);var b=[],c;for(c in a)b.push(c);return b};EditorUi.prototype.addBasenamesForCell=function(a,b){function d(a){if(null!=a){var d=a.lastIndexOf(".");0<d&&(a=a.substring(d+1,a.length));null==b[a]&&(b[a]=!0)}}var c=this.editor.graph,e=c.getCellStyle(a);d(mxStencilRegistry.getBasenameForStencil(e[mxConstants.STYLE_SHAPE]));
+c.model.isEdge(a)&&(d(mxMarker.getPackageForType(e[mxConstants.STYLE_STARTARROW])),d(mxMarker.getPackageForType(e[mxConstants.STYLE_ENDARROW])));for(var e=c.model.getChildCount(a),f=0;f<e;f++)this.addBasenamesForCell(c.model.getChildAt(a,f),b)};EditorUi.prototype.setGraphEnabled=function(a){this.diagramContainer.style.visibility=a?"":"hidden";this.formatContainer.style.visibility=a?"":"hidden";this.sidebarFooterContainer.style.display=a?"":"none";this.sidebarContainer.style.display=a?"":"none";this.hsplit.style.display=
a?"":"none";this.editor.graph.setEnabled(a);null!=this.ruler&&(this.ruler.hRuler.container.style.visibility=a?"":"hidden",this.ruler.vRuler.container.style.visibility=a?"":"hidden");null!=this.tabContainer&&(this.tabContainer.style.visibility=a?"":"hidden");a||(null!=this.actions.outlineWindow&&this.actions.outlineWindow.window.setVisible(!1),null!=this.actions.layersWindow&&this.actions.layersWindow.window.setVisible(!1),null!=this.menus.tagsWindow&&this.menus.tagsWindow.window.setVisible(!1),null!=
this.menus.findWindow&&this.menus.findWindow.window.setVisible(!1))};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?
@@ -3362,8 +3363,8 @@ null!=g.callback?m.postMessage(JSON.stringify({event:"template",xml:b,blank:b==t
function(a,b,d){m.postMessage(JSON.stringify({event:"template",docUrl:a,info:b,name:d}),"*")}),null,null,u?mxUtils.bind(this,function(a){this.remoteInvoke("getCustomTemplates",null,null,a,function(){a({},0)})}):null);this.showDialog(k.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));k.init();return}if("textContent"==g.action){var x=this.getDiagramTextContent();m.postMessage(JSON.stringify({event:"textContent",data:x,message:g}),"*");return}if("status"==
g.action){null!=g.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(g.messageKey))):null!=g.message&&this.editor.setStatus(mxUtils.htmlEntities(g.message));null!=g.modified&&(this.editor.modified=g.modified);return}if("spinner"==g.action){var y=null!=g.messageKey?mxResources.get(g.messageKey):g.message;null==g.show||g.show?this.spinner.spin(document.body,y):this.spinner.stop();return}if("export"==g.action){if("png"==g.format||"xmlpng"==g.format){if(null==g.spin&&null==g.spinKey||
this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin)){var A=null!=g.xml?g.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var D=this.editor.graph,B=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();var b=this.createLoadMessage("export");b.format=g.format;b.message=g;b.data=a;b.xml=encodeURIComponent(A);m.postMessage(JSON.stringify(b),"*")}),Q=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);"xmlpng"==g.format&&(a=
-this.writeGraphModelToPng(a,"tEXt","mxfile",encodeURIComponent(A)));D!=this.editor.graph&&D.container.parentNode.removeChild(D.container);B(a)}),R=g.pageId||(null!=this.pages?this.pages[0].getId():null);if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage.getId()!=R){for(var ba=D.getGlobalVariable,D=this.createTemporaryGraph(D.getStylesheet()),X,G=0;G<this.pages.length;G++)if(this.pages[G].getId()==R){X=this.updatePageRoot(this.pages[G]);break}D.getGlobalVariable=function(a){return"page"==
-a?X.getName():"pagenumber"==a?1:ba.apply(this,arguments)};document.body.appendChild(D.container);D.model.setRoot(X.root)}if(null!=g.layerIds){for(var T=D.model,ia=T.getChildCells(T.getRoot()),k={},G=0;G<g.layerIds.length;G++)k[g.layerIds[G]]=!0;for(G=0;G<ia.length;G++)T.setVisible(ia[G],k[ia[G].id]||!1)}this.exportToCanvas(mxUtils.bind(this,function(a){Q(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,function(){Q(null)}),null,null,g.scale,null,null,null,D)}else(new mxXmlRequest(EXPORT_URL,
+this.writeGraphModelToPng(a,"tEXt","mxfile",encodeURIComponent(A)));D!=this.editor.graph&&D.container.parentNode.removeChild(D.container);B(a)}),R=g.pageId||(null!=this.pages?this.pages[0].getId():null);if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage.getId()!=R){for(var ba=D.getGlobalVariable,D=this.createTemporaryGraph(D.getStylesheet()),X,F=0;F<this.pages.length;F++)if(this.pages[F].getId()==R){X=this.updatePageRoot(this.pages[F]);break}D.getGlobalVariable=function(a){return"page"==
+a?X.getName():"pagenumber"==a?1:ba.apply(this,arguments)};document.body.appendChild(D.container);D.model.setRoot(X.root)}if(null!=g.layerIds){for(var T=D.model,ia=T.getChildCells(T.getRoot()),k={},F=0;F<g.layerIds.length;F++)k[g.layerIds[F]]=!0;for(F=0;F<ia.length;F++)T.setVisible(ia[F],k[ia[F].id]||!1)}this.exportToCanvas(mxUtils.bind(this,function(a){Q(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,function(){Q(null)}),null,null,g.scale,null,null,null,D)}else(new mxXmlRequest(EXPORT_URL,
"format=png&embedXml="+("xmlpng"==g.format?"1":"0")+(null!=R?"&pageId="+R:"")+(null!=g.layerIds?"&extras="+encodeURIComponent(JSON.stringify({layerIds:g.layerIds})):"")+(null!=g.scale?"&scale="+g.scale:"")+"&base64=1&xml="+encodeURIComponent(A))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?B("data:image/png;base64,"+a.getText()):Q(null)}),mxUtils.bind(this,function(){Q(null)}))}}else{null!=g.xml&&0<g.xml.length&&this.setFileData(g.xml);y=this.createLoadMessage("export");
if("html2"==g.format||"html"==g.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var ja=this.getXmlFileData();y.xml=mxUtils.getXml(ja);y.data=this.getFileData(null,null,!0,null,null,null,ja);y.format=g.format}else if("html"==g.format)A=this.editor.getGraphXml(),y.data=this.getHtml(A,this.editor.graph),y.xml=mxUtils.getXml(A),y.format=g.format;else{mxSvgCanvas2D.prototype.foAltText=null;var la=this.editor.graph.background;la==mxConstants.NONE&&(la=null);y.xml=this.getFileData(!0,
null,null,null,null,null,null,null,null,!1);y.format="svg";var ea=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();y.data=this.createSvgDataUri(a);m.postMessage(JSON.stringify(y),"*")});if("xmlsvg"==g.format)(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin))&&this.getEmbeddedSvg(y.xml,this.editor.graph,null,!0,ea,null,null,g.embedImages);else if(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,
@@ -3378,20 +3379,20 @@ function(){if(null!=this.menubar){var a=document.createElement("div");a.style.di
a.appendChild(b)):(mxUtils.write(b,mxResources.get("save")),b.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),a.appendChild(b),"1"==urlParams.saveAndExit&&(b=document.createElement("a"),mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",mxResources.get("saveAndExit")),b.className="geBigButton geBigStandardButton",b.style.marginLeft="6px",mxEvent.addListener(b,
"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b)));b=document.createElement("a");mxUtils.write(b,mxResources.get("exit"));b.setAttribute("title",mxResources.get("exit"));b.className="geBigButton geBigStandardButton";b.style.marginLeft="6px";b.style.marginRight="20px";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.isOffline()?null:"https://about.draw.io/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};
-EditorUi.prototype.executeLayoutList=function(a,b){for(var d=this.editor.graph,c=d.getSelectionCells(),e=0;e<a.length;e++){var f=new window[a[e].layout](d);if(null!=a[e].config)for(var k in a[e].config)f[k]=a[e].config[k];this.executeLayout(function(){f.execute(d.getDefaultParent(),0==c.length?null:c)},e==a.length-1,b)}};EditorUi.prototype.importCsv=function(a,b){try{var d=a.split("\n"),c=[],e=[],f={};if(0<d.length){var k={},m=null,q=null,u=null,z=null,y=null,C=null,v=null,B=null,J="",H="auto",N=
-"auto",D=null,M=null,Q=40,R=40,ba=100,X=0,G=this.editor.graph;G.getGraphBounds();for(var T=function(){null!=b?b(pa):(G.setSelectionCells(pa),G.scrollCellToVisible(G.getSelectionCell()))},ia=G.getFreeInsertPoint(),ja=ia.x,la=ia.y,ia=la,ea=null,V="auto",B=null,U=[],Y=null,fa=null,Z=0;Z<d.length&&"#"==d[Z].charAt(0);){a=d[Z];for(Z++;Z<d.length&&"\\"==a.charAt(a.length-1)&&"#"==d[Z].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(d[Z].substring(1)),Z++;if("#"!=a.charAt(1)){var aa=a.indexOf(":");if(0<
-aa){var O=mxUtils.trim(a.substring(1,aa)),K=mxUtils.trim(a.substring(aa+1));"label"==O?ea=G.sanitizeHtml(K):"labelname"==O&&0<K.length&&"-"!=K?z=K:"labels"==O&&0<K.length&&"-"!=K?y=JSON.parse(K):"style"==O?m=K:"parentstyle"==O?C=K:"stylename"==O&&0<K.length&&"-"!=K?u=K:"styles"==O&&0<K.length&&"-"!=K?q=JSON.parse(K):"identity"==O&&0<K.length&&"-"!=K?v=K:"parent"==O&&0<K.length&&"-"!=K?B=K:"namespace"==O&&0<K.length&&"-"!=K?J=K:"width"==O?H=K:"height"==O?N=K:"left"==O&&0<K.length?D=K:"top"==O&&0<K.length?
-M=K:"ignore"==O?fa=K.split(","):"connect"==O?U.push(JSON.parse(K)):"link"==O?Y=K:"padding"==O?X=parseFloat(K):"edgespacing"==O?Q=parseFloat(K):"nodespacing"==O?R=parseFloat(K):"levelspacing"==O?ba=parseFloat(K):"layout"==O&&(V=K)}}}if(null==d[Z])throw Error(mxResources.get("invalidOrMissingFile"));for(var ka=this.editor.csvToArray(d[Z]),O=aa=null,K=[],P=0;P<ka.length;P++)v==ka[P]&&(aa=P),B==ka[P]&&(O=P),K.push(mxUtils.trim(ka[P]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==
-ea&&(ea="%"+K[0]+"%");if(null!=U)for(var S=0;S<U.length;S++)null==k[U[S].to]&&(k[U[S].to]={});v=[];for(P=Z+1;P<d.length;P++){var ca=this.editor.csvToArray(d[P]);if(null==ca){var na=40<d[P].length?d[P].substring(0,40)+"...":d[P];throw Error(na+" ("+P+"):\n"+mxResources.get("containsValidationErrors"));}0<ca.length&&v.push(ca)}G.model.beginUpdate();try{for(P=0;P<v.length;P++){var ca=v[P],I=null,oa=null!=aa?J+ca[aa]:null;null!=oa&&(I=G.model.getCell(oa));var d=null!=I,da=new mxCell(ea,new mxGeometry(ja,
-ia,0,0),m||"whiteSpace=wrap;html=1;");da.vertex=!0;da.id=oa;for(var ga=0;ga<ca.length;ga++)G.setAttributeForCell(da,K[ga],ca[ga]);if(null!=z&&null!=y){var ya=y[da.getAttribute(z)];null!=ya&&G.labelChanged(da,ya)}if(null!=u&&null!=q){var za=q[da.getAttribute(u)];null!=za&&(da.style=za)}G.setAttributeForCell(da,"placeholders","1");da.style=G.replacePlaceholders(da,da.style);d&&(G.model.setGeometry(I,da.geometry),G.model.setStyle(I,da.style),0>mxUtils.indexOf(e,I)&&e.push(I));I=da;if(!d)for(S=0;S<U.length;S++)k[U[S].to][I.getAttribute(U[S].to)]=
-I;null!=Y&&"link"!=Y&&(G.setLinkForCell(I,I.getAttribute(Y)),G.setAttributeForCell(I,Y,null));G.fireEvent(new mxEventObject("cellsInserted","cells",[I]));var Aa=this.editor.graph.getPreferredSizeForCell(I);I.vertex&&(null!=D&&null!=I.getAttribute(D)&&(I.geometry.x=ja+parseFloat(I.getAttribute(D))),null!=M&&null!=I.getAttribute(M)&&(I.geometry.y=la+parseFloat(I.getAttribute(M))),"@"==H.charAt(0)&&null!=I.getAttribute(H.substring(1))?I.geometry.width=parseFloat(I.getAttribute(H.substring(1))):I.geometry.width=
-"auto"==H?Aa.width+X:parseFloat(H),"@"==N.charAt(0)&&null!=I.getAttribute(N.substring(1))?I.geometry.height=parseFloat(I.getAttribute(N.substring(1))):I.geometry.height="auto"==N?Aa.height+X:parseFloat(N),ia+=I.geometry.height+R);d?(null==f[oa]&&(f[oa]=[]),f[oa].push(I)):(B=null!=O?G.model.getCell(J+ca[O]):null,c.push(I),null!=B?(B.style=G.replacePlaceholders(B,C),G.addCell(I,B)):e.push(G.addCell(I)))}for(var ra=e.slice(),pa=e.slice(),S=0;S<U.length;S++)for(var sa=U[S],P=0;P<c.length;P++){var I=c[P],
-ta=mxUtils.bind(this,function(a,b,d){var c=b.getAttribute(d.from);if(null!=c&&(G.setAttributeForCell(b,d.from,null),""!=c))for(var c=c.split(","),e=0;e<c.length;e++){var f=k[d.to][c[e]];if(null!=f){var g=d.label;null!=d.fromlabel&&(g=(b.getAttribute(d.fromlabel)||"")+(g||""));null!=d.tolabel&&(g=(g||"")+(f.getAttribute(d.tolabel)||""));var l="target"==d.placeholders==!d.invert?f:a,l=null!=d.style?G.replacePlaceholders(l,d.style):G.createCurrentEdgeStyle();pa.push(G.insertEdge(null,null,g||"",d.invert?
-f:a,d.invert?a:f,l));mxUtils.remove(d.invert?a:f,ra)}}});ta(I,I,sa);if(null!=f[I.id])for(ga=0;ga<f[I.id].length;ga++)ta(I,f[I.id][ga],sa)}if(null!=fa)for(P=0;P<c.length;P++)for(I=c[P],ga=0;ga<fa.length;ga++)G.setAttributeForCell(I,mxUtils.trim(fa[ga]),null);if(0<e.length){var ma=new mxParallelEdgeLayout(G);ma.spacing=Q;var Ba=function(){0<ma.spacing&&ma.execute(G.getDefaultParent());for(var a=0;a<e.length;a++){var b=G.getCellGeometry(e[a]);b.x=Math.round(G.snap(b.x));b.y=Math.round(G.snap(b.y));"auto"==
-H&&(b.width=Math.round(G.snap(b.width)));"auto"==N&&(b.height=Math.round(G.snap(b.height)))}};if("["==V.charAt(0)){var Da=T;G.view.validate();this.executeLayoutList(JSON.parse(V),function(){Ba();Da()});T=null}else if("circle"==V){var qa=new mxCircleLayout(G);qa.resetEdges=!1;var Oa=qa.isVertexIgnored;qa.isVertexIgnored=function(a){return Oa.apply(this,arguments)||0>mxUtils.indexOf(e,a)};this.executeLayout(function(){qa.execute(G.getDefaultParent());Ba()},!0,T);T=null}else if("horizontaltree"==V||
-"verticaltree"==V||"auto"==V&&pa.length==2*e.length-1&&1==ra.length){G.view.validate();var Ca=new mxCompactTreeLayout(G,"horizontaltree"==V);Ca.levelDistance=R;Ca.edgeRouting=!1;Ca.resetEdges=!1;this.executeLayout(function(){Ca.execute(G.getDefaultParent(),0<ra.length?ra[0]:null)},!0,T);T=null}else if("horizontalflow"==V||"verticalflow"==V||"auto"==V&&1==ra.length){G.view.validate();var wa=new mxHierarchicalLayout(G,"horizontalflow"==V?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);wa.intraCellSpacing=
-R;wa.parallelEdgeSpacing=Q;wa.interRankCellSpacing=ba;wa.disableEdgeStyle=!1;this.executeLayout(function(){wa.execute(G.getDefaultParent(),pa);G.moveCells(pa,ja,la)},!0,T);T=null}else if("organic"==V||"auto"==V&&pa.length>e.length){G.view.validate();var xa=new mxFastOrganicLayout(G);xa.forceConstant=3*R;xa.resetEdges=!1;var La=xa.isVertexIgnored;xa.isVertexIgnored=function(a){return La.apply(this,arguments)||0>mxUtils.indexOf(e,a)};ma=new mxParallelEdgeLayout(G);ma.spacing=Q;this.executeLayout(function(){xa.execute(G.getDefaultParent());
-Ba()},!0,T);T=null}}this.hideDialog()}finally{G.model.endUpdate()}null!=T&&T()}}catch(Ga){this.handleError(Ga)}};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;
+EditorUi.prototype.executeLayoutList=function(a,b){for(var d=this.editor.graph,c=d.getSelectionCells(),e=0;e<a.length;e++){var f=new window[a[e].layout](d);if(null!=a[e].config)for(var k in a[e].config)f[k]=a[e].config[k];this.executeLayout(function(){f.execute(d.getDefaultParent(),0==c.length?null:c)},e==a.length-1,b)}};EditorUi.prototype.importCsv=function(a,b){try{var d=a.split("\n"),c=[],e=[],f={};if(0<d.length){var k={},m=null,q=null,u=null,z=null,y=null,C=null,v=null,B=null,K="",H="auto",N=
+"auto",D=null,M=null,Q=40,R=40,ba=100,X=0,F=this.editor.graph;F.getGraphBounds();for(var T=function(){null!=b?b(pa):(F.setSelectionCells(pa),F.scrollCellToVisible(F.getSelectionCell()))},ia=F.getFreeInsertPoint(),ja=ia.x,la=ia.y,ia=la,ea=null,V="auto",B=null,U=[],Y=null,fa=null,Z=0;Z<d.length&&"#"==d[Z].charAt(0);){a=d[Z];for(Z++;Z<d.length&&"\\"==a.charAt(a.length-1)&&"#"==d[Z].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(d[Z].substring(1)),Z++;if("#"!=a.charAt(1)){var aa=a.indexOf(":");if(0<
+aa){var O=mxUtils.trim(a.substring(1,aa)),L=mxUtils.trim(a.substring(aa+1));"label"==O?ea=F.sanitizeHtml(L):"labelname"==O&&0<L.length&&"-"!=L?z=L:"labels"==O&&0<L.length&&"-"!=L?y=JSON.parse(L):"style"==O?m=L:"parentstyle"==O?C=L:"stylename"==O&&0<L.length&&"-"!=L?u=L:"styles"==O&&0<L.length&&"-"!=L?q=JSON.parse(L):"identity"==O&&0<L.length&&"-"!=L?v=L:"parent"==O&&0<L.length&&"-"!=L?B=L:"namespace"==O&&0<L.length&&"-"!=L?K=L:"width"==O?H=L:"height"==O?N=L:"left"==O&&0<L.length?D=L:"top"==O&&0<L.length?
+M=L:"ignore"==O?fa=L.split(","):"connect"==O?U.push(JSON.parse(L)):"link"==O?Y=L:"padding"==O?X=parseFloat(L):"edgespacing"==O?Q=parseFloat(L):"nodespacing"==O?R=parseFloat(L):"levelspacing"==O?ba=parseFloat(L):"layout"==O&&(V=L)}}}if(null==d[Z])throw Error(mxResources.get("invalidOrMissingFile"));for(var ka=this.editor.csvToArray(d[Z]),O=aa=null,L=[],P=0;P<ka.length;P++)v==ka[P]&&(aa=P),B==ka[P]&&(O=P),L.push(mxUtils.trim(ka[P]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==
+ea&&(ea="%"+L[0]+"%");if(null!=U)for(var S=0;S<U.length;S++)null==k[U[S].to]&&(k[U[S].to]={});v=[];for(P=Z+1;P<d.length;P++){var ca=this.editor.csvToArray(d[P]);if(null==ca){var na=40<d[P].length?d[P].substring(0,40)+"...":d[P];throw Error(na+" ("+P+"):\n"+mxResources.get("containsValidationErrors"));}0<ca.length&&v.push(ca)}F.model.beginUpdate();try{for(P=0;P<v.length;P++){var ca=v[P],J=null,oa=null!=aa?K+ca[aa]:null;null!=oa&&(J=F.model.getCell(oa));var d=null!=J,da=new mxCell(ea,new mxGeometry(ja,
+ia,0,0),m||"whiteSpace=wrap;html=1;");da.vertex=!0;da.id=oa;for(var ga=0;ga<ca.length;ga++)F.setAttributeForCell(da,L[ga],ca[ga]);if(null!=z&&null!=y){var ya=y[da.getAttribute(z)];null!=ya&&F.labelChanged(da,ya)}if(null!=u&&null!=q){var za=q[da.getAttribute(u)];null!=za&&(da.style=za)}F.setAttributeForCell(da,"placeholders","1");da.style=F.replacePlaceholders(da,da.style);d&&(F.model.setGeometry(J,da.geometry),F.model.setStyle(J,da.style),0>mxUtils.indexOf(e,J)&&e.push(J));J=da;if(!d)for(S=0;S<U.length;S++)k[U[S].to][J.getAttribute(U[S].to)]=
+J;null!=Y&&"link"!=Y&&(F.setLinkForCell(J,J.getAttribute(Y)),F.setAttributeForCell(J,Y,null));F.fireEvent(new mxEventObject("cellsInserted","cells",[J]));var Aa=this.editor.graph.getPreferredSizeForCell(J);J.vertex&&(null!=D&&null!=J.getAttribute(D)&&(J.geometry.x=ja+parseFloat(J.getAttribute(D))),null!=M&&null!=J.getAttribute(M)&&(J.geometry.y=la+parseFloat(J.getAttribute(M))),"@"==H.charAt(0)&&null!=J.getAttribute(H.substring(1))?J.geometry.width=parseFloat(J.getAttribute(H.substring(1))):J.geometry.width=
+"auto"==H?Aa.width+X:parseFloat(H),"@"==N.charAt(0)&&null!=J.getAttribute(N.substring(1))?J.geometry.height=parseFloat(J.getAttribute(N.substring(1))):J.geometry.height="auto"==N?Aa.height+X:parseFloat(N),ia+=J.geometry.height+R);d?(null==f[oa]&&(f[oa]=[]),f[oa].push(J)):(B=null!=O?F.model.getCell(K+ca[O]):null,c.push(J),null!=B?(B.style=F.replacePlaceholders(B,C),F.addCell(J,B)):e.push(F.addCell(J)))}for(var ra=e.slice(),pa=e.slice(),S=0;S<U.length;S++)for(var sa=U[S],P=0;P<c.length;P++){var J=c[P],
+ta=mxUtils.bind(this,function(a,b,d){var c=b.getAttribute(d.from);if(null!=c&&(F.setAttributeForCell(b,d.from,null),""!=c))for(var c=c.split(","),e=0;e<c.length;e++){var f=k[d.to][c[e]];if(null!=f){var g=d.label;null!=d.fromlabel&&(g=(b.getAttribute(d.fromlabel)||"")+(g||""));null!=d.tolabel&&(g=(g||"")+(f.getAttribute(d.tolabel)||""));var l="target"==d.placeholders==!d.invert?f:a,l=null!=d.style?F.replacePlaceholders(l,d.style):F.createCurrentEdgeStyle();pa.push(F.insertEdge(null,null,g||"",d.invert?
+f:a,d.invert?a:f,l));mxUtils.remove(d.invert?a:f,ra)}}});ta(J,J,sa);if(null!=f[J.id])for(ga=0;ga<f[J.id].length;ga++)ta(J,f[J.id][ga],sa)}if(null!=fa)for(P=0;P<c.length;P++)for(J=c[P],ga=0;ga<fa.length;ga++)F.setAttributeForCell(J,mxUtils.trim(fa[ga]),null);if(0<e.length){var ma=new mxParallelEdgeLayout(F);ma.spacing=Q;var Ba=function(){0<ma.spacing&&ma.execute(F.getDefaultParent());for(var a=0;a<e.length;a++){var b=F.getCellGeometry(e[a]);b.x=Math.round(F.snap(b.x));b.y=Math.round(F.snap(b.y));"auto"==
+H&&(b.width=Math.round(F.snap(b.width)));"auto"==N&&(b.height=Math.round(F.snap(b.height)))}};if("["==V.charAt(0)){var Da=T;F.view.validate();this.executeLayoutList(JSON.parse(V),function(){Ba();Da()});T=null}else if("circle"==V){var qa=new mxCircleLayout(F);qa.resetEdges=!1;var Oa=qa.isVertexIgnored;qa.isVertexIgnored=function(a){return Oa.apply(this,arguments)||0>mxUtils.indexOf(e,a)};this.executeLayout(function(){qa.execute(F.getDefaultParent());Ba()},!0,T);T=null}else if("horizontaltree"==V||
+"verticaltree"==V||"auto"==V&&pa.length==2*e.length-1&&1==ra.length){F.view.validate();var Ca=new mxCompactTreeLayout(F,"horizontaltree"==V);Ca.levelDistance=R;Ca.edgeRouting=!1;Ca.resetEdges=!1;this.executeLayout(function(){Ca.execute(F.getDefaultParent(),0<ra.length?ra[0]:null)},!0,T);T=null}else if("horizontalflow"==V||"verticalflow"==V||"auto"==V&&1==ra.length){F.view.validate();var wa=new mxHierarchicalLayout(F,"horizontalflow"==V?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);wa.intraCellSpacing=
+R;wa.parallelEdgeSpacing=Q;wa.interRankCellSpacing=ba;wa.disableEdgeStyle=!1;this.executeLayout(function(){wa.execute(F.getDefaultParent(),pa);F.moveCells(pa,ja,la)},!0,T);T=null}else if("organic"==V||"auto"==V&&pa.length>e.length){F.view.validate();var xa=new mxFastOrganicLayout(F);xa.forceConstant=3*R;xa.resetEdges=!1;var La=xa.isVertexIgnored;xa.isVertexIgnored=function(a){return La.apply(this,arguments)||0>mxUtils.indexOf(e,a)};ma=new mxParallelEdgeLayout(F);ma.spacing=Q;this.executeLayout(function(){xa.execute(F.getDefaultParent());
+Ba()},!0,T);T=null}}this.hideDialog()}finally{F.model.endUpdate()}null!=T&&T()}}catch(Ga){this.handleError(Ga)}};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,560,130,!0,!0);a.init()};var u=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=
u.apply(this,arguments),d=this.editor.graph,c=b.getSourceGraphBounds;b.getSourceGraphBounds=function(){if(mxUtils.hasScrollbars(d.container)&&d.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 c.apply(this,arguments)};var e=b.getSourceContainerSize;b.getSourceContainerSize=function(){if(mxUtils.hasScrollbars(d.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(d.container)&&null!=this.source.minimumGraphSize){var c=this.source.getPagePadding();return new mxPoint(Math.round(Math.max(0,(b.outline.container.clientWidth/a-(this.source.minimumGraphSize.width-
@@ -3409,7 +3410,7 @@ this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.vis
null,null,!0),g=d.getGraphBounds(),n=Math.floor(g.width*l/d.view.scale),p=Math.floor(g.height*l/d.view.scale);if(f.length<=MAX_REQUEST_SIZE&&n*p<MAX_AREA)if(a.hideDialog(),"png"!=c&&"jpg"!=c&&"jpeg"!=c||!a.isExportToCanvas()){var q={globalVars:d.getExportVariables()};a.saveRequest(b,c,function(a,b){return new mxXmlRequest(EXPORT_URL,"format="+c+"&base64="+(b||"0")+(null!=a?"&filename="+encodeURIComponent(a):"")+"&extras="+encodeURIComponent(JSON.stringify(q))+(0<m?"&dpi="+m:"")+"&bg="+(null!=e?e:
"none")+"&w="+n+"&h="+p+"&border="+k+"&xml="+encodeURIComponent(f))})}else"png"==c?a.exportImage(l,null==e||"none"==e,!0,!1,!1,k,!0,!1,null,null,m):a.exportImage(l,!1,!0,!1,!1,k,!0,!1,"jpeg");else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var a=this.editor.graph,b="";if(null!=this.pages)for(var c=0;c<this.pages.length;c++){var e=a;this.currentPage!=this.pages[c]&&(e=this.createTemporaryGraph(a.getStylesheet()),
this.updatePageRoot(this.pages[c]),e.model.setRoot(this.pages[c].root));b+=this.pages[c].getName()+" "+e.getIndexableText()+" "}else b=a.getIndexableText();this.editor.graph.setEnabled(!0);return b};EditorUi.prototype.showRemotelyStoredLibrary=function(a){var b={},d=document.createElement("div");d.style.whiteSpace="nowrap";var c=document.createElement("h3");mxUtils.write(c,mxUtils.htmlEntities(a));c.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";d.appendChild(c);var e=
-document.createElement("div");e.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";e.innerHTML='<div style="text-align:center;padding:8px;"><img src="/images/spin.gif"></div>';var k={};try{var m=mxSettings.getCustomLibraries();for(a=0;a<m.length;a++){var q=m[a];if("R"==q.substring(0,1)){var t=JSON.parse(decodeURIComponent(q.substring(1)));k[t[0]]={id:t[0],title:t[1],downloadUrl:t[2]}}}}catch(F){}this.remoteInvoke("getCustomLibraries",null,null,function(a){e.innerHTML="";if(0==
+document.createElement("div");e.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";e.innerHTML='<div style="text-align:center;padding:8px;"><img src="/images/spin.gif"></div>';var k={};try{var m=mxSettings.getCustomLibraries();for(a=0;a<m.length;a++){var q=m[a];if("R"==q.substring(0,1)){var t=JSON.parse(decodeURIComponent(q.substring(1)));k[t[0]]={id:t[0],title:t[1],downloadUrl:t[2]}}}}catch(G){}this.remoteInvoke("getCustomLibraries",null,null,function(a){e.innerHTML="";if(0==
a.length)e.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var d=0;d<a.length;d++){var c=a[d];k[c.id]&&(b[c.id]=c);var f=this.addCheckbox(e,c.title,k[c.id]);(function(a,d){mxEvent.addListener(d,"change",function(){this.checked?b[a.id]=a:delete b[a.id]})})(c,f)}},mxUtils.bind(this,function(a){e.innerHTML="";var b=document.createElement("div");b.style.padding="8px";b.style.textAlign="center";mxUtils.write(b,
mxResources.get("error")+": ");mxUtils.write(b,null!=a&&null!=a.message?a.message:mxResources.get("unknownError"));e.appendChild(b)}));d.appendChild(e);d=new CustomDialog(this,d,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var a=0,d;for(d in b)null==k[d]&&(a++,mxUtils.bind(this,function(b){this.remoteInvoke("getFileContent",[b.downloadUrl],null,mxUtils.bind(this,function(d){a--;0==a&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,d,b))}catch(v){this.handleError(v,
mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){a--;0==a&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(b[d]));for(d in k)b[d]||this.closeLibrary(new RemoteLibrary(this,null,k[d]));0==a&&this.spinner.stop()}),null,null,"https://desk.draw.io/support/solutions/articles/16000092763");this.showDialog(d.container,340,375,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1,
@@ -3417,41 +3418,41 @@ allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,allowe
a.msgMarkers,d=this.remoteInvokeCallbacks[b.callbackId];if(null==d)throw Error("No callback for "+(null!=b?b.callbackId:"null"));a.error?d.error&&d.error(a.error.errResp):d.callback&&d.callback.apply(this,a.resp);this.remoteInvokeCallbacks[b.callbackId]=null};EditorUi.prototype.remoteInvoke=function(a,b,c,e,l){var d=!0,f=window.setTimeout(mxUtils.bind(this,function(){d=!1;l({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),g=mxUtils.bind(this,function(){window.clearTimeout(f);
d&&e.apply(this,arguments)});c=c||{};c.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:g,error:l});a=JSON.stringify({event:"remoteInvoke",funtionName:a,functionArgs:b,msgMarkers:c});null!=this.remoteWin?this.remoteWin.postMessage(a,"*"):this.remoteInvokeQueue.push(a)};EditorUi.prototype.handleRemoteInvoke=function(a,b){var d=mxUtils.bind(this,function(b,d){var c={event:"remoteInvokeResponse",msgMarkers:a.msgMarkers};null!=d?c.error={errResp:d}:null!=b&&(c.resp=
b);this.remoteWin.postMessage(JSON.stringify(c),"*")});try{var c=a.funtionName,e=this.remoteInvokableFns[c];if(null!=e&&"function"===typeof this[c]){if(e.allowedDomains){for(var f=!1,k=0;k<e.allowedDomains.length;k++)if(b=="https://"+e.allowedDomains[k]){f=!0;break}if(!f){d(null,"Invalid Call: "+c+" is not allowed.");return}}var m=a.functionArgs;Array.isArray(m)||(m=[]);if(e.isAsync)m.push(function(){d(Array.prototype.slice.apply(arguments))}),m.push(function(a){d(null,a||"Unkown Error")}),this[c].apply(this,
-m);else{var q=this[c].apply(this,m);d([q])}}else d(null,"Invalid Call: "+c+" is not found.")}catch(F){d(null,"Invalid Call: An error occured, "+F.message)}};EditorUi.prototype.openDatabase=function(a,b){if(null==this.database){var d=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=d)try{var c=d.open("database",2);c.onupgradeneeded=function(a){var b=c.result;1>a.oldVersion&&b.createObjectStore("objects",{keyPath:"key"});2>a.oldVersion&&(b.createObjectStore("files",{keyPath:"title"}),
+m);else{var q=this[c].apply(this,m);d([q])}}else d(null,"Invalid Call: "+c+" is not found.")}catch(G){d(null,"Invalid Call: An error occured, "+G.message)}};EditorUi.prototype.openDatabase=function(a,b){if(null==this.database){var d=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=d)try{var c=d.open("database",2);c.onupgradeneeded=function(a){var b=c.result;1>a.oldVersion&&b.createObjectStore("objects",{keyPath:"key"});2>a.oldVersion&&(b.createObjectStore("files",{keyPath:"title"}),
b.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)};c.onsuccess=mxUtils.bind(this,function(b){var d=c.result;this.database=d;EditorUi.migrateStorageFiles&&(StorageFile.migrate(d),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(a){if(!a||"1"==urlParams.forceMigration){var b=document.createElement("iframe");b.style.display=
"none";b.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(b);var d=!0,c=!1,e,f=0,g=mxUtils.bind(this,function(){c=!0;this.setDatabaseItem(".drawioMigrated3",!0);b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),k=mxUtils.bind(this,function(){f++;l()}),l=mxUtils.bind(this,function(){try{if(f>=e.length)g();else{var a=e[f];StorageFile.getFileContent(this,a,mxUtils.bind(this,
function(d){null==d||".scratchpad"==a&&d==this.emptyLibraryXml?b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[a]}),"*"):k()}),k)}}catch(N){console.log(N)}}),m=mxUtils.bind(this,function(a){try{this.setDatabaseItem(null,[{title:a.title,size:a.data.length,lastModified:Date.now(),type:a.isLib?"L":"F"},{title:a.title,data:a.data}],k,k,["filesInfo","files"])}catch(N){console.log(N)}});a=mxUtils.bind(this,function(a){try{if(a.source==b.contentWindow){var f=
{};try{f=JSON.parse(a.data)}catch(D){}"init"==f.event?(b.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=f.event||c||(d?null!=f.resp&&0<f.resp.length&&null!=f.resp[0]?(e=f.resp[0],d=!1,l()):g():null!=f.resp&&0<f.resp.length&&null!=f.resp[0]?m(f.resp[0]):k())}}catch(D){console.log(D)}});window.addEventListener("message",a)}})));a(d);d.onversionchange=
-function(){d.close()}});c.onerror=b;c.onblocked=function(){}}catch(l){null!=b&&b(l)}else null!=b&&b()}else a(this.database)};EditorUi.prototype.setDatabaseItem=function(a,b,c,e,k){this.openDatabase(mxUtils.bind(this,function(d){try{k=k||"objects";Array.isArray(k)||(k=[k],a=[a],b=[b]);var f=d.transaction(k,"readwrite");f.oncomplete=c;f.onerror=e;for(d=0;d<k.length;d++)f.objectStore(k[d]).put(null!=a&&null!=a[d]?{key:a[d],data:b[d]}:b[d])}catch(x){null!=e&&e(x)}}),e)};EditorUi.prototype.removeDatabaseItem=
-function(a,b,c,e){this.openDatabase(mxUtils.bind(this,function(d){e=e||"objects";Array.isArray(e)||(e=[e],a=[a]);d=d.transaction(e,"readwrite");d.oncomplete=b;d.onerror=c;for(var f=0;f<e.length;f++)d.objectStore(e[f])["delete"](a[f])}),c)};EditorUi.prototype.getDatabaseItem=function(a,b,c,e){this.openDatabase(mxUtils.bind(this,function(d){try{e=e||"objects";var f=d.transaction([e],"readonly").objectStore(e).get(a);f.onsuccess=function(){b(f.result)};f.onerror=c}catch(A){null!=c&&c(A)}}),c)};EditorUi.prototype.getDatabaseItems=
-function(a,b,c){this.openDatabase(mxUtils.bind(this,function(d){try{c=c||"objects";var e=d.transaction([c],"readonly").objectStore(c).openCursor(IDBKeyRange.lowerBound(0)),f=[];e.onsuccess=function(b){null==b.target.result?a(f):(f.push(b.target.result.value),b.target.result["continue"]())};e.onerror=b}catch(A){null!=b&&b(A)}}),b)};EditorUi.prototype.getDatabaseItemKeys=function(a,b,c){this.openDatabase(mxUtils.bind(this,function(d){try{c=c||"objects";var e=d.transaction([c],"readonly").objectStore(c).getAllKeys();
+function(){d.close()}});c.onerror=b;c.onblocked=function(){}}catch(l){null!=b&&b(l)}else null!=b&&b()}else a(this.database)};EditorUi.prototype.setDatabaseItem=function(a,b,c,e,k){this.openDatabase(mxUtils.bind(this,function(d){try{k=k||"objects";Array.isArray(k)||(k=[k],a=[a],b=[b]);var f=d.transaction(k,"readwrite");f.oncomplete=c;f.onerror=e;for(d=0;d<k.length;d++)f.objectStore(k[d]).put(null!=a&&null!=a[d]?{key:a[d],data:b[d]}:b[d])}catch(A){null!=e&&e(A)}}),e)};EditorUi.prototype.removeDatabaseItem=
+function(a,b,c,e){this.openDatabase(mxUtils.bind(this,function(d){e=e||"objects";Array.isArray(e)||(e=[e],a=[a]);d=d.transaction(e,"readwrite");d.oncomplete=b;d.onerror=c;for(var f=0;f<e.length;f++)d.objectStore(e[f])["delete"](a[f])}),c)};EditorUi.prototype.getDatabaseItem=function(a,b,c,e){this.openDatabase(mxUtils.bind(this,function(d){try{e=e||"objects";var f=d.transaction([e],"readonly").objectStore(e).get(a);f.onsuccess=function(){b(f.result)};f.onerror=c}catch(x){null!=c&&c(x)}}),c)};EditorUi.prototype.getDatabaseItems=
+function(a,b,c){this.openDatabase(mxUtils.bind(this,function(d){try{c=c||"objects";var e=d.transaction([c],"readonly").objectStore(c).openCursor(IDBKeyRange.lowerBound(0)),f=[];e.onsuccess=function(b){null==b.target.result?a(f):(f.push(b.target.result.value),b.target.result["continue"]())};e.onerror=b}catch(x){null!=b&&b(x)}}),b)};EditorUi.prototype.getDatabaseItemKeys=function(a,b,c){this.openDatabase(mxUtils.bind(this,function(d){try{c=c||"objects";var e=d.transaction([c],"readonly").objectStore(c).getAllKeys();
e.onsuccess=function(){a(e.result)};e.onerror=b}catch(n){null!=b&&b(n)}}),b)};EditorUi.prototype.commentsSupported=function(){var a=this.getCurrentFile();return null!=a?a.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var a=this.getCurrentFile();return null!=a?a.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var a=this.getCurrentFile();return null!=a?a.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(a,b){var d=this.getCurrentFile();
null!=d?d.getComments(a,b):a([])};EditorUi.prototype.addComment=function(a,b,c){var d=this.getCurrentFile();null!=d?d.addComment(a,b,c):b(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var a=this.getCurrentFile();return null!=a?a.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var a=this.getCurrentFile();return null!=a?a.canComment():!0};EditorUi.prototype.newComment=function(a,b){var d=this.getCurrentFile();return null!=d?d.newComment(a,b):new DrawioComment(this,null,
a,Date.now(),Date.now(),!1,b)};EditorUi.prototype.isRevisionHistorySupported=function(){var a=this.getCurrentFile();return null!=a&&a.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(a,b){var d=this.getCurrentFile();null!=d&&d.getRevisions?d.getRevisions(a,b):b({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var a=this.getCurrentFile();return null!=a&&(a.constructor==DriveFile&&a.isEditable()||a.constructor==DropboxFile)};EditorUi.prototype.getServiceName=
function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(a){a.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var a=[],b=0;b<localStorage.length;b++){var c=localStorage.key(b),e=localStorage.getItem(c);if(0<c.length&&(".scratchpad"==c||"."!=c.charAt(0))&&0<e.length){var k="<mxfile "===e.substring(0,8)||"<?xml"===
e.substring(0,5)||"\x3c!--[if IE]>"===e.substring(0,12),e="<mxlibrary>"===e.substring(0,11);(k||e)&&a.push(c)}}return a};EditorUi.prototype.getLocalStorageFile=function(a){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var b=localStorage.getItem(a);return{title:a,data:b,isLib:"<mxlibrary>"===b.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
-var CommentsWindow=function(a,b,e,c,m,k){function q(){for(var a=t.getElementsByTagName("div"),b=0,d=0;d<a.length;d++)"none"!=a[d].style.display&&a[d].parentNode==t&&b++;F.style.display=0==b?"block":"none"}function u(a,b,d,c){function e(){b.removeChild(k);b.removeChild(l);g.style.display="block";f.style.display="block"}n={div:b,comment:a,saveCallback:d,deleteOnCancel:c};var f=b.querySelector(".geCommentTxt"),g=b.querySelector(".geCommentActionsList"),k=document.createElement("textarea");k.className=
+var CommentsWindow=function(a,b,e,c,m,k){function q(){for(var a=t.getElementsByTagName("div"),b=0,d=0;d<a.length;d++)"none"!=a[d].style.display&&a[d].parentNode==t&&b++;G.style.display=0==b?"block":"none"}function u(a,b,d,c){function e(){b.removeChild(k);b.removeChild(l);g.style.display="block";f.style.display="block"}n={div:b,comment:a,saveCallback:d,deleteOnCancel:c};var f=b.querySelector(".geCommentTxt"),g=b.querySelector(".geCommentActionsList"),k=document.createElement("textarea");k.className=
"geCommentEditTxtArea";k.style.minHeight=f.offsetHeight+"px";k.value=a.content;b.insertBefore(k,f);var l=document.createElement("div");l.className="geCommentEditBtns";var m=mxUtils.button(mxResources.get("cancel"),function(){c?(b.parentNode.removeChild(b),q()):e();n=null});m.className="geCommentEditBtn";l.appendChild(m);var p=mxUtils.button(mxResources.get("save"),function(){f.innerHTML="";a.content=k.value;mxUtils.write(f,a.content);e();d(a);n=null});mxEvent.addListener(k,"keydown",mxUtils.bind(this,
function(a){mxEvent.isConsumed(a)||((mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a))&&13==a.keyCode?(p.click(),mxEvent.consume(a)):27==a.keyCode&&(m.click(),mxEvent.consume(a)))}));p.focus();p.className="geCommentEditBtn gePrimaryBtn";l.appendChild(p);b.insertBefore(l,f);g.style.display="none";f.style.display="none";k.focus()}function y(b,d){d.innerHTML="";var c=new Date(b.modifiedDate),e=a.timeSince(c);null==e&&(e=mxResources.get("lessThanAMinute"));mxUtils.write(d,mxResources.get("timeAgo",
[e],"{1} ago"));d.setAttribute("title",c.toLocaleDateString()+" "+c.toLocaleTimeString())}function B(a){var b=document.createElement("img");b.className="geCommentBusyImg";b.src=IMAGE_PATH+"/spin.gif";a.appendChild(b);a.busyImg=b}function d(a){a.style.border="1px solid red";a.removeChild(a.busyImg)}function f(a){a.style.border="";a.removeChild(a.busyImg)}function g(b,c,e,k,m){function z(a,d,c){var e=document.createElement("li");e.className="geCommentAction";var f=document.createElement("a");f.className=
-"geCommentActionLnk";mxUtils.write(f,a);e.appendChild(f);mxEvent.addListener(f,"click",function(a){d(a,b);a.preventDefault();mxEvent.consume(a)});Q.appendChild(e);c&&(e.style.display="none")}function v(){function a(b){d.push(c);if(null!=b.replies)for(var e=0;e<b.replies.length;e++)c=c.nextSibling,a(b.replies[e])}var d=[],c=x;a(b);return{pdiv:c,replies:d}}function D(c,e,l,m,n){function q(){B(D);b.addReply(t,function(a){t.id=a;b.replies.push(t);f(D);l&&l()},function(b){p();d(D);a.handleError(b,null,
-null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},m,n)}function p(){u(t,D,function(a){q()},!0)}var z=v().pdiv,t=a.newComment(c,a.getCurrentUser());t.pCommentId=b.id;null==b.replies&&(b.replies=[]);var D=g(t,b.replies,z,k+1);e?p():q()}if(m||!b.isResolved){F.style.display="none";var x=document.createElement("div");x.className="geCommentContainer";x.setAttribute("data-commentId",b.id);x.style.marginLeft=20*k+5+"px";b.isResolved&&"dark"!=uiTheme&&(x.style.backgroundColor="ghostWhite");
+"geCommentActionLnk";mxUtils.write(f,a);e.appendChild(f);mxEvent.addListener(f,"click",function(a){d(a,b);a.preventDefault();mxEvent.consume(a)});Q.appendChild(e);c&&(e.style.display="none")}function v(){function a(b){d.push(c);if(null!=b.replies)for(var e=0;e<b.replies.length;e++)c=c.nextSibling,a(b.replies[e])}var d=[],c=x;a(b);return{pdiv:c,replies:d}}function D(c,e,l,m,n){function q(){B(x);b.addReply(t,function(a){t.id=a;b.replies.push(t);f(x);l&&l()},function(b){p();d(x);a.handleError(b,null,
+null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},m,n)}function p(){u(t,x,function(a){q()},!0)}var z=v().pdiv,t=a.newComment(c,a.getCurrentUser());t.pCommentId=b.id;null==b.replies&&(b.replies=[]);var x=g(t,b.replies,z,k+1);e?p():q()}if(m||!b.isResolved){G.style.display="none";var x=document.createElement("div");x.className="geCommentContainer";x.setAttribute("data-commentId",b.id);x.style.marginLeft=20*k+5+"px";b.isResolved&&"dark"!=uiTheme&&(x.style.backgroundColor="ghostWhite");
var A=document.createElement("div");A.className="geCommentHeader";var E=document.createElement("img");E.className="geCommentUserImg";E.src=b.user.pictureUrl||Editor.userImage;A.appendChild(E);E=document.createElement("div");E.className="geCommentHeaderTxt";A.appendChild(E);var M=document.createElement("div");M.className="geCommentUsername";mxUtils.write(M,b.user.displayName||"");E.appendChild(M);M=document.createElement("div");M.className="geCommentDate";M.setAttribute("data-commentId",b.id);y(b,
M);E.appendChild(M);x.appendChild(A);A=document.createElement("div");A.className="geCommentTxt";mxUtils.write(A,b.content||"");x.appendChild(A);A=document.createElement("div");A.className="geCommentActions";var Q=document.createElement("ul");Q.className="geCommentActionsList";A.appendChild(Q);p||0!=k&&!l||z(mxResources.get("reply"),function(){D("",!0)},b.isResolved);E=a.getCurrentUser();null==E||E.id!=b.user.id||p||(z(mxResources.get("edit"),function(){function c(){u(b,x,function(){B(x);b.editComment(b.content,
-function(){f(x)},function(b){d(x);c();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}c()},b.isResolved),z(mxResources.get("delete"),function(){a.confirm(mxResources.get("areYouSure"),function(){B(x);b.deleteComment(function(){for(var a=v(b).replies,d=0;d<a.length;d++)t.removeChild(a[d]);for(d=0;d<c.length;d++)if(c[d]==b){c.splice(d,1);break}F.style.display=0==t.getElementsByTagName("div").length?"block":"none"},function(b){d(x);a.handleError(b,null,null,
+function(){f(x)},function(b){d(x);c();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}c()},b.isResolved),z(mxResources.get("delete"),function(){a.confirm(mxResources.get("areYouSure"),function(){B(x);b.deleteComment(function(){for(var a=v(b).replies,d=0;d<a.length;d++)t.removeChild(a[d]);for(d=0;d<c.length;d++)if(c[d]==b){c.splice(d,1);break}G.style.display=0==t.getElementsByTagName("div").length?"block":"none"},function(b){d(x);a.handleError(b,null,null,
null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},b.isResolved));p||0!=k||z(b.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(a){function d(){var d=a.target;d.innerHTML="";b.isResolved=!b.isResolved;mxUtils.write(d,b.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var c=b.isResolved?"none":"",e=v(b).replies,f="dark"==uiTheme?"transparent":b.isResolved?"ghostWhite":"white",g=0;g<e.length;g++){e[g].style.backgroundColor=f;for(var k=e[g].querySelectorAll(".geCommentAction"),
l=0;l<k.length;l++)k[l]!=d.parentNode&&(k[l].style.display=c);C||(e[g].style.display="none")}q()}b.isResolved?D(mxResources.get("reOpened")+": ",!0,d,!1,!0):D(mxResources.get("markedAsResolved"),!1,d,!0)});x.appendChild(A);null!=e?t.insertBefore(x,e.nextSibling):t.appendChild(x);for(e=0;null!=b.replies&&e<b.replies.length;e++)A=b.replies[e],A.isResolved=b.isResolved,g(A,b.replies,null,k+1,m);null!=n&&(n.comment.id==b.id?(m=b.content,b.content=n.comment.content,u(b,x,n.saveCallback,n.deleteOnCancel),
-b.content=m):null==n.comment.id&&n.comment.pCommentId==b.id&&(t.appendChild(n.div),u(n.comment,n.div,n.saveCallback,n.deleteOnCancel)));return x}}var p=!a.canComment(),l=a.canReplyToReplies(),n=null,A=document.createElement("div");A.className="geCommentsWin";A.style.background="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;var x=EditorUi.compactUi?"26px":"30px",t=document.createElement("div");t.className="geCommentsList";t.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":
-Dialog.backdropColor;t.style.bottom=parseInt(x)+7+"px";A.appendChild(t);var F=document.createElement("span");F.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(F,mxResources.get("noCommentsFound"));var z=document.createElement("div");z.className="geToolbarContainer geCommentsToolbar";z.style.height=x;z.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";z.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;mxClient.IS_QUIRKS&&(z.style.filter=
-"none");x=document.createElement("a");x.className="geButton";mxClient.IS_QUIRKS&&(x.style.filter="none");if(!p){var E=x.cloneNode();E.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';E.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(E,"click",function(b){function c(){u(e,k,function(b){B(k);a.addComment(b,function(a){b.id=a;v.push(b);f(k)},function(b){d(k);c();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},
-!0)}var e=a.newComment("",a.getCurrentUser()),k=g(e,v,null,0);c();b.preventDefault();mxEvent.consume(b)});z.appendChild(E)}E=x.cloneNode();E.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';E.setAttribute("title",mxResources.get("showResolved"));var C=!1;"dark"==uiTheme&&(E.style.filter="invert(100%)");mxEvent.addListener(E,"click",function(a){this.className=(C=!C)?"geButton geCheckedBtn":"geButton";L();a.preventDefault();mxEvent.consume(a)});z.appendChild(E);a.commentsRefreshNeeded()&&
-(E=x.cloneNode(),E.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',E.setAttribute("title",mxResources.get("refresh")),"dark"==uiTheme&&(E.style.filter="invert(100%)"),mxEvent.addListener(E,"click",function(a){L();a.preventDefault();mxEvent.consume(a)}),z.appendChild(E));a.commentsSaveNeeded()&&(x=x.cloneNode(),x.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',x.setAttribute("title",mxResources.get("save")),"dark"==uiTheme&&
-(x.style.filter="invert(100%)"),mxEvent.addListener(x,"click",function(a){k();a.preventDefault();mxEvent.consume(a)}),z.appendChild(x));A.appendChild(z);var v=[],L=mxUtils.bind(this,function(){this.hasError=!1;if(null!=n)try{n.div=n.div.cloneNode(!0);var b=n.div.querySelector(".geCommentEditTxtArea"),d=n.div.querySelector(".geCommentEditBtns");n.comment.content=b.value;b.parentNode.removeChild(b);d.parentNode.removeChild(d)}catch(D){a.handleError(D)}t.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+
-IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";l=a.canReplyToReplies();a.commentsSupported()?a.getComments(function(a){function b(a){if(null!=a){a.sort(function(a,b){return new Date(a.modifiedDate)-new Date(b.modifiedDate)});for(var d=0;d<a.length;d++)b(a[d].replies)}}a.sort(function(a,b){return new Date(a.modifiedDate)-new Date(b.modifiedDate)});t.innerHTML="";t.appendChild(F);F.style.display="block";v=a;for(a=0;a<v.length;a++)b(v[a].replies),
-g(v[a],v,null,0,C);null!=n&&null==n.comment.id&&null==n.comment.pCommentId&&(t.appendChild(n.div),u(n.comment,n.div,n.saveCallback,n.deleteOnCancel))},mxUtils.bind(this,function(a){t.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(a&&a.message?": "+a.message:""));this.hasError=!0})):t.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});L();this.refreshComments=L;z=mxUtils.bind(this,function(){function a(b){var c=d[b.id];if(null!=c)for(y(b,c),c=0;null!=b.replies&&c<b.replies.length;c++)a(b.replies[c])}
-if(this.window.isVisible()){for(var b=t.querySelectorAll(".geCommentDate"),d={},c=0;c<b.length;c++){var e=b[c];d[e.getAttribute("data-commentId")]=e}for(c=0;c<v.length;c++)a(v[c])}});setInterval(z,6E4);this.refreshCommentsTime=z;this.window=new mxWindow(mxResources.get("comments"),A,b,e,c,m,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,
-mxUtils.bind(this,function(){this.window.fit()}));this.window.setLocation=function(a,b){var d=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;a=Math.max(0,Math.min(a,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,d-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};var J=mxUtils.bind(this,function(){var a=this.window.getX(),
-b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window,"resize",J);this.destroy=function(){mxEvent.removeListener(window,"resize",J);this.window.destroy()}},ConfirmDialog=function(a,b,e,c,m,k,q,u,y,B,d){var f=document.createElement("div");f.style.textAlign="center";d=null!=d?d:44;var g=document.createElement("div");g.style.padding="6px";g.style.overflow="auto";g.style.maxHeight=d+"px";g.style.lineHeight="1.2em";mxClient.IS_QUIRKS&&(g.style.height="60px");mxUtils.write(g,b);
+b.content=m):null==n.comment.id&&n.comment.pCommentId==b.id&&(t.appendChild(n.div),u(n.comment,n.div,n.saveCallback,n.deleteOnCancel)));return x}}var p=!a.canComment(),l=a.canReplyToReplies(),n=null,x=document.createElement("div");x.className="geCommentsWin";x.style.background="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;var A=EditorUi.compactUi?"26px":"30px",t=document.createElement("div");t.className="geCommentsList";t.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":
+Dialog.backdropColor;t.style.bottom=parseInt(A)+7+"px";x.appendChild(t);var G=document.createElement("span");G.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(G,mxResources.get("noCommentsFound"));var z=document.createElement("div");z.className="geToolbarContainer geCommentsToolbar";z.style.height=A;z.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";z.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;mxClient.IS_QUIRKS&&(z.style.filter=
+"none");A=document.createElement("a");A.className="geButton";mxClient.IS_QUIRKS&&(A.style.filter="none");if(!p){var E=A.cloneNode();E.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';E.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(E,"click",function(b){function c(){u(e,k,function(b){B(k);a.addComment(b,function(a){b.id=a;v.push(b);f(k)},function(b){d(k);c();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},
+!0)}var e=a.newComment("",a.getCurrentUser()),k=g(e,v,null,0);c();b.preventDefault();mxEvent.consume(b)});z.appendChild(E)}E=A.cloneNode();E.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';E.setAttribute("title",mxResources.get("showResolved"));var C=!1;"dark"==uiTheme&&(E.style.filter="invert(100%)");mxEvent.addListener(E,"click",function(a){this.className=(C=!C)?"geButton geCheckedBtn":"geButton";I();a.preventDefault();mxEvent.consume(a)});z.appendChild(E);a.commentsRefreshNeeded()&&
+(E=A.cloneNode(),E.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',E.setAttribute("title",mxResources.get("refresh")),"dark"==uiTheme&&(E.style.filter="invert(100%)"),mxEvent.addListener(E,"click",function(a){I();a.preventDefault();mxEvent.consume(a)}),z.appendChild(E));a.commentsSaveNeeded()&&(A=A.cloneNode(),A.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',A.setAttribute("title",mxResources.get("save")),"dark"==uiTheme&&
+(A.style.filter="invert(100%)"),mxEvent.addListener(A,"click",function(a){k();a.preventDefault();mxEvent.consume(a)}),z.appendChild(A));x.appendChild(z);var v=[],I=mxUtils.bind(this,function(){this.hasError=!1;if(null!=n)try{n.div=n.div.cloneNode(!0);var b=n.div.querySelector(".geCommentEditTxtArea"),d=n.div.querySelector(".geCommentEditBtns");n.comment.content=b.value;b.parentNode.removeChild(b);d.parentNode.removeChild(d)}catch(D){a.handleError(D)}t.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+
+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";l=a.canReplyToReplies();a.commentsSupported()?a.getComments(function(a){function b(a){if(null!=a){a.sort(function(a,b){return new Date(a.modifiedDate)-new Date(b.modifiedDate)});for(var d=0;d<a.length;d++)b(a[d].replies)}}a.sort(function(a,b){return new Date(a.modifiedDate)-new Date(b.modifiedDate)});t.innerHTML="";t.appendChild(G);G.style.display="block";v=a;for(a=0;a<v.length;a++)b(v[a].replies),
+g(v[a],v,null,0,C);null!=n&&null==n.comment.id&&null==n.comment.pCommentId&&(t.appendChild(n.div),u(n.comment,n.div,n.saveCallback,n.deleteOnCancel))},mxUtils.bind(this,function(a){t.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(a&&a.message?": "+a.message:""));this.hasError=!0})):t.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});I();this.refreshComments=I;z=mxUtils.bind(this,function(){function a(b){var c=d[b.id];if(null!=c)for(y(b,c),c=0;null!=b.replies&&c<b.replies.length;c++)a(b.replies[c])}
+if(this.window.isVisible()){for(var b=t.querySelectorAll(".geCommentDate"),d={},c=0;c<b.length;c++){var e=b[c];d[e.getAttribute("data-commentId")]=e}for(c=0;c<v.length;c++)a(v[c])}});setInterval(z,6E4);this.refreshCommentsTime=z;this.window=new mxWindow(mxResources.get("comments"),x,b,e,c,m,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,
+mxUtils.bind(this,function(){this.window.fit()}));this.window.setLocation=function(a,b){var d=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;a=Math.max(0,Math.min(a,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,d-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};var K=mxUtils.bind(this,function(){var a=this.window.getX(),
+b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window,"resize",K);this.destroy=function(){mxEvent.removeListener(window,"resize",K);this.window.destroy()}},ConfirmDialog=function(a,b,e,c,m,k,q,u,y,B,d){var f=document.createElement("div");f.style.textAlign="center";d=null!=d?d:44;var g=document.createElement("div");g.style.padding="6px";g.style.overflow="auto";g.style.maxHeight=d+"px";g.style.lineHeight="1.2em";mxClient.IS_QUIRKS&&(g.style.height="60px");mxUtils.write(g,b);
f.appendChild(g);null!=B&&(g=document.createElement("div"),g.style.padding="6px 0 6px 0",b=document.createElement("img"),b.setAttribute("src",B),g.appendChild(b),f.appendChild(g));B=document.createElement("div");B.style.textAlign="center";B.style.whiteSpace="nowrap";var p=document.createElement("input");p.setAttribute("type","checkbox");k=mxUtils.button(k||mxResources.get("cancel"),function(){a.hideDialog();null!=c&&c(p.checked)});k.className="geBtn";null!=u&&(k.innerHTML=u+"<br>"+k.innerHTML,k.style.paddingBottom=
"8px",k.style.paddingTop="8px",k.style.height="auto",k.style.width="40%");a.editor.cancelFirst&&B.appendChild(k);var l=mxUtils.button(m||mxResources.get("ok"),function(){a.hideDialog();null!=e&&e(p.checked)});B.appendChild(l);null!=q?(l.innerHTML=q+"<br>"+l.innerHTML+"<br>",l.style.paddingBottom="8px",l.style.paddingTop="8px",l.style.height="auto",l.className="geBtn",l.style.width="40%"):l.className="geBtn gePrimaryBtn";a.editor.cancelFirst||B.appendChild(k);f.appendChild(B);y?(B.style.marginTop=
"10px",g=document.createElement("p"),g.style.marginTop="20px",g.appendChild(p),m=document.createElement("span"),mxUtils.write(m," "+mxResources.get("rememberThisSetting")),g.appendChild(m),f.appendChild(g),mxEvent.addListener(m,"click",function(a){p.checked=!p.checked;mxEvent.consume(a)})):B.style.marginTop="12px";this.init=function(){l.focus()};this.container=f};function DiagramPage(a,b){this.node=a;null!=b?this.node.setAttribute("id",b):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
@@ -3520,29 +3521,29 @@ b=b.cloneNode(!0);c=b.firstChild;if(null!=c)for(m.relatedPage.root=a.decodeCell(
k[d]||!this.model.isCollapsed(a)})),this.model.setCollapsed(k[d],b))}for(d=0;d<m.length;d++)this.model.setVisible(m[d],!b);k=c;k=a.apply(this,arguments)}finally{this.model.endUpdate()}return k};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 a(a){return n.isVertex(a)&&e(a)}function b(a){var b=!1;null!=a&&(b="1"==l.getCurrentCellStyle(a).treeMoving);
return b}function e(a){var b=!1;null!=a&&(a=n.getParent(a),b=l.view.getState(a),b="tree"==(null!=b?b.style:l.getCellStyle(a)).containerType);return b}function q(a){var b=!1;null!=a&&(a=n.getParent(a),b=l.view.getState(a),l.view.getState(a),b=null!=(null!=b?b.style:l.getCellStyle(a)).childLayout);return b}function u(a){a=l.view.getState(a);if(null!=a){var b=l.getIncomingEdges(a.cell);if(0<b.length&&(b=l.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 y(a,b){b=null!=b?b:!0;l.model.beginUpdate();try{var d=l.model.getParent(a),c=l.getIncomingEdges(a),e=l.cloneCells([c[0],a]);l.model.setTerminal(e[0],l.model.getTerminal(c[0],!0),!0);var f=u(a),g=d.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;l.view.currentRoot!=d&&(e[1].geometry.x-=g.x,e[1].geometry.y-=g.y);var k=l.view.getState(a),m=l.view.scale;if(null!=k){var n=mxRectangle.fromRectangle(k);f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?n.x+=(b?a.geometry.width+10:-e[1].geometry.width-10)*m:n.y+=(b?a.geometry.height+10:-e[1].geometry.height-10)*m;var q=l.getOutgoingEdges(l.model.getTerminal(c[0],
-!0));if(null!=q){for(var p=f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH,t=g=c=0;t<q.length;t++){var z=l.model.getTerminal(q[t],!1);if(f==u(z)){var v=l.view.getState(z);z!=a&&null!=v&&(p&&b!=v.getCenterX()<k.getCenterX()||!p&&b!=v.getCenterY()<k.getCenterY())&&mxUtils.intersects(n,v)&&(c=10+Math.max(c,(Math.min(n.x+n.width,v.x+v.width)-Math.max(n.x,v.x))/m),g=10+Math.max(g,(Math.min(n.y+n.height,v.y+v.height)-Math.max(n.y,v.y))/m))}}p?g=0:c=0;for(t=0;t<q.length;t++)if(z=l.model.getTerminal(q[t],
-!1),f==u(z)&&(v=l.view.getState(z),z!=a&&null!=v&&(p&&b!=v.getCenterX()<k.getCenterX()||!p&&b!=v.getCenterY()<k.getCenterY()))){var x=[];l.traverse(v.cell,!0,function(a,b){null!=b&&x.push(b);x.push(a);return!0});l.moveCells(x,(b?1:-1)*c,(b?1:-1)*g)}}}return l.addCells(e,d)}finally{l.model.endUpdate()}}function B(a){l.model.beginUpdate();try{var b=u(a),d=l.getIncomingEdges(a),c=l.cloneCells([d[0],a]);l.model.setTerminal(d[0],c[1],!1);l.model.setTerminal(c[0],c[1],!0);l.model.setTerminal(c[0],a,!1);
+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;l.view.currentRoot!=d&&(e[1].geometry.x-=g.x,e[1].geometry.y-=g.y);var k=l.view.getState(a),m=l.view.scale;if(null!=k){var n=mxRectangle.fromRectangle(k);f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?n.x+=(b?a.geometry.width+10:-e[1].geometry.width-10)*m:n.y+=(b?a.geometry.height+10:-e[1].geometry.height-10)*m;var p=l.getOutgoingEdges(l.model.getTerminal(c[0],
+!0));if(null!=p){for(var q=f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH,z=g=c=0;z<p.length;z++){var t=l.model.getTerminal(p[z],!1);if(f==u(t)){var v=l.view.getState(t);t!=a&&null!=v&&(q&&b!=v.getCenterX()<k.getCenterX()||!q&&b!=v.getCenterY()<k.getCenterY())&&mxUtils.intersects(n,v)&&(c=10+Math.max(c,(Math.min(n.x+n.width,v.x+v.width)-Math.max(n.x,v.x))/m),g=10+Math.max(g,(Math.min(n.y+n.height,v.y+v.height)-Math.max(n.y,v.y))/m))}}q?g=0:c=0;for(z=0;z<p.length;z++)if(t=l.model.getTerminal(p[z],
+!1),f==u(t)&&(v=l.view.getState(t),t!=a&&null!=v&&(q&&b!=v.getCenterX()<k.getCenterX()||!q&&b!=v.getCenterY()<k.getCenterY()))){var x=[];l.traverse(v.cell,!0,function(a,b){null!=b&&x.push(b);x.push(a);return!0});l.moveCells(x,(b?1:-1)*c,(b?1:-1)*g)}}}return l.addCells(e,d)}finally{l.model.endUpdate()}}function B(a){l.model.beginUpdate();try{var b=u(a),d=l.getIncomingEdges(a),c=l.cloneCells([d[0],a]);l.model.setTerminal(d[0],c[1],!1);l.model.setTerminal(c[0],c[1],!0);l.model.setTerminal(c[0],a,!1);
var e=l.model.getParent(a),f=e.geometry,g=[];l.view.currentRoot!=e&&(c[1].geometry.x-=f.x,c[1].geometry.y-=f.y);l.traverse(a,!0,function(a,b){null!=b&&g.push(b);g.push(a);return!0});var k=a.geometry.width+40,m=a.geometry.height+40;b==mxConstants.DIRECTION_SOUTH?k=0:b==mxConstants.DIRECTION_NORTH?(k=0,m=-m):b==mxConstants.DIRECTION_WEST?(k=-k,m=0):b==mxConstants.DIRECTION_EAST&&(m=0);l.moveCells(g,k,m);return l.addCells(c,e)}finally{l.model.endUpdate()}}function d(a,b){l.model.beginUpdate();try{var c=
l.model.getParent(a),d=l.getIncomingEdges(a),e=u(a);0==d.length&&(d=[l.createEdge(c,null,"",null,null,l.createCurrentEdgeStyle())],e=b);var f=l.cloneCells([d[0],a]);l.model.setTerminal(f[0],a,!0);if(null==l.model.getTerminal(f[0],!1)){l.model.setTerminal(f[0],f[1],!1);var g=l.getCellStyle(f[1]).newEdgeStyle;if(null!=g)try{var k=JSON.parse(g),m;for(m in k)l.setCellStyles(m,k[m],[f[0]]),"edgeStyle"==m&&"elbowEdgeStyle"==k[m]&&l.setCellStyles("elbow",e==mxConstants.DIRECTION_SOUTH||e==mxConstants.DIRECTION_NOTH?
-"vertical":"horizontal",[f[0]])}catch(Y){}}var d=l.getOutgoingEdges(a),n=c.geometry,g=[];l.view.currentRoot==c&&(n=new mxRectangle);for(k=0;k<d.length;k++){var q=l.model.getTerminal(d[k],!1);null!=q&&g.push(q)}var p=l.view.getBounds(g),t=l.view.translate,z=l.view.scale;e==mxConstants.DIRECTION_SOUTH?(f[1].geometry.x=null==p?a.geometry.x+(a.geometry.width-f[1].geometry.width)/2:(p.x+p.width)/z-t.x-n.x+10,f[1].geometry.y+=f[1].geometry.height-n.y+40):e==mxConstants.DIRECTION_NORTH?(f[1].geometry.x=
-null==p?a.geometry.x+(a.geometry.width-f[1].geometry.width)/2:(p.x+p.width)/z-t.x+-n.x+10,f[1].geometry.y-=f[1].geometry.height+n.y+40):(f[1].geometry.x=e==mxConstants.DIRECTION_WEST?f[1].geometry.x-(f[1].geometry.width+n.x+40):f[1].geometry.x+(f[1].geometry.width-n.x+40),f[1].geometry.y=null==p?a.geometry.y+(a.geometry.height-f[1].geometry.height)/2:(p.y+p.height)/z-t.y+-n.y+10);return l.addCells(f,c)}finally{l.model.endUpdate()}}function f(a,b,c){a=l.getOutgoingEdges(a);c=l.view.getState(c);var d=
+"vertical":"horizontal",[f[0]])}catch(Y){}}var d=l.getOutgoingEdges(a),n=c.geometry,g=[];l.view.currentRoot==c&&(n=new mxRectangle);for(k=0;k<d.length;k++){var p=l.model.getTerminal(d[k],!1);null!=p&&g.push(p)}var q=l.view.getBounds(g),z=l.view.translate,t=l.view.scale;e==mxConstants.DIRECTION_SOUTH?(f[1].geometry.x=null==q?a.geometry.x+(a.geometry.width-f[1].geometry.width)/2:(q.x+q.width)/t-z.x-n.x+10,f[1].geometry.y+=f[1].geometry.height-n.y+40):e==mxConstants.DIRECTION_NORTH?(f[1].geometry.x=
+null==q?a.geometry.x+(a.geometry.width-f[1].geometry.width)/2:(q.x+q.width)/t-z.x+-n.x+10,f[1].geometry.y-=f[1].geometry.height+n.y+40):(f[1].geometry.x=e==mxConstants.DIRECTION_WEST?f[1].geometry.x-(f[1].geometry.width+n.x+40):f[1].geometry.x+(f[1].geometry.width-n.x+40),f[1].geometry.y=null==q?a.geometry.y+(a.geometry.height-f[1].geometry.height)/2:(q.y+q.height)/t-z.y+-n.y+10);return l.addCells(f,c)}finally{l.model.endUpdate()}}function f(a,b,c){a=l.getOutgoingEdges(a);c=l.view.getState(c);var d=
[];if(null!=c&&null!=a){for(var e=0;e<a.length;e++){var f=l.view.getState(l.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 g(a,b){var c=u(a),d=b==mxConstants.DIRECTION_EAST||b==mxConstants.DIRECTION_WEST;(c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST)==d&&c!=b?p.actions.get("selectParent").funct():
-c==b?(d=l.getOutgoingEdges(a),null!=d&&0<d.length&&l.setSelectionCell(l.model.getTerminal(d[0],!1))):(c=l.getIncomingEdges(a),null!=c&&0<c.length&&(d=f(l.model.getTerminal(c[0],!0),d,a),c=l.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&&l.setSelectionCell(d[c].cell)))))}var p=this,l=p.editor.graph,n=l.getModel(),A=p.menus.createPopupMenu;p.menus.createPopupMenu=function(b,c,d){A.apply(this,arguments);
+c==b?(d=l.getOutgoingEdges(a),null!=d&&0<d.length&&l.setSelectionCell(l.model.getTerminal(d[0],!1))):(c=l.getIncomingEdges(a),null!=c&&0<c.length&&(d=f(l.model.getTerminal(c[0],!0),d,a),c=l.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&&l.setSelectionCell(d[c].cell)))))}var p=this,l=p.editor.graph,n=l.getModel(),x=p.menus.createPopupMenu;p.menus.createPopupMenu=function(b,c,d){x.apply(this,arguments);
if(1==l.getSelectionCount()){c=l.getSelectionCell();var e=l.getOutgoingEdges(c);b.addSeparator();0<e.length&&(a(l.getSelectionCell())&&this.addMenuItems(b,["selectChildren"],null,d),this.addMenuItems(b,["selectDescendants"],null,d));a(l.getSelectionCell())&&(b.addSeparator(),0<l.getIncomingEdges(c).length&&this.addMenuItems(b,["selectSiblings","selectParent"],null,d))}};p.actions.addAction("selectChildren",function(){if(l.isEnabled()&&1==l.getSelectionCount()){var a=l.getSelectionCell(),a=l.getOutgoingEdges(a);
if(null!=a){for(var b=[],c=0;c<a.length;c++)b.push(l.model.getTerminal(a[c],!1));l.setSelectionCells(b)}}},null,null,"Alt+Shift+X");p.actions.addAction("selectSiblings",function(){if(l.isEnabled()&&1==l.getSelectionCount()){var a=l.getSelectionCell(),a=l.getIncomingEdges(a);if(null!=a&&0<a.length&&(a=l.getOutgoingEdges(l.model.getTerminal(a[0],!0)),null!=a)){for(var b=[],c=0;c<a.length;c++)b.push(l.model.getTerminal(a[c],!1));l.setSelectionCells(b)}}},null,null,"Alt+Shift+S");p.actions.addAction("selectParent",
-function(){if(l.isEnabled()&&1==l.getSelectionCount()){var a=l.getSelectionCell(),a=l.getIncomingEdges(a);null!=a&&0<a.length&&l.setSelectionCell(l.model.getTerminal(a[0],!0))}},null,null,"Alt+Shift+P");p.actions.addAction("selectDescendants",function(){if(l.isEnabled()&&1==l.getSelectionCount()){var a=l.getSelectionCell(),b=[];l.traverse(a,!0,function(a,c){null!=c&&b.push(c);b.push(a);return!0});l.setSelectionCells(b)}},null,null,"Alt+Shift+D");var x=l.removeCells;l.removeCells=function(b,c){c=null!=
-c?c:!0;null==b&&(b=this.getDeletableCells(this.getSelectionCells()));c&&(b=this.getDeletableCells(this.addAllEdges(b)));for(var d=[],f=0;f<b.length;f++){var g=b[f];n.isEdge(g)&&e(g)&&(d.push(g),g=n.getTerminal(g,!1));if(a(g)){var k=[];l.traverse(g,!0,function(a,b){null!=b&&k.push(b);k.push(a);return!0});0<k.length&&(d=d.concat(k),g=l.getIncomingEdges(b[f]),b=b.concat(g))}else null!=g&&d.push(b[f])}b=d;return x.apply(this,arguments)};p.hoverIcons.getStateAt=function(b,c,d){return a(b.cell)?null:this.graph.view.getState(this.graph.getCellAt(c,
+function(){if(l.isEnabled()&&1==l.getSelectionCount()){var a=l.getSelectionCell(),a=l.getIncomingEdges(a);null!=a&&0<a.length&&l.setSelectionCell(l.model.getTerminal(a[0],!0))}},null,null,"Alt+Shift+P");p.actions.addAction("selectDescendants",function(){if(l.isEnabled()&&1==l.getSelectionCount()){var a=l.getSelectionCell(),b=[];l.traverse(a,!0,function(a,c){null!=c&&b.push(c);b.push(a);return!0});l.setSelectionCells(b)}},null,null,"Alt+Shift+D");var A=l.removeCells;l.removeCells=function(b,c){c=null!=
+c?c:!0;null==b&&(b=this.getDeletableCells(this.getSelectionCells()));c&&(b=this.getDeletableCells(this.addAllEdges(b)));for(var d=[],f=0;f<b.length;f++){var g=b[f];n.isEdge(g)&&e(g)&&(d.push(g),g=n.getTerminal(g,!1));if(a(g)){var k=[];l.traverse(g,!0,function(a,b){null!=b&&k.push(b);k.push(a);return!0});0<k.length&&(d=d.concat(k),g=l.getIncomingEdges(b[f]),b=b.concat(g))}else null!=g&&d.push(b[f])}b=d;return A.apply(this,arguments)};p.hoverIcons.getStateAt=function(b,c,d){return a(b.cell)?null:this.graph.view.getState(this.graph.getCellAt(c,
d))};var t=l.duplicateCells;l.duplicateCells=function(b,c){b=null!=b?b:this.getSelectionCells();for(var d=b.slice(0),e=0;e<d.length;e++){var f=l.view.getState(d[e]);if(null!=f&&a(f.cell))for(var g=l.getIncomingEdges(f.cell),f=0;f<g.length;f++)mxUtils.remove(g[f],b)}this.model.beginUpdate();try{var k=t.call(this,b,c);if(k.length==b.length)for(e=0;e<b.length;e++)if(a(b[e])){var m=l.getIncomingEdges(k[e]),g=l.getIncomingEdges(b[e]);if(0==m.length&&0<g.length){var n=this.cloneCell(g[0]);this.addEdge(n,
-l.getDefaultParent(),this.model.getTerminal(g[0],!0),k[e])}}}finally{this.model.endUpdate()}return k};var F=l.moveCells;l.moveCells=function(b,c,d,e,f,g,k){var m=null;this.model.beginUpdate();try{var n=f,q=this.getCurrentCellStyle(f);if(null!=b&&a(f)&&"1"==mxUtils.getValue(q,"treeFolding","0")){for(var p=0;p<b.length;p++)if(a(b[p])||l.model.isEdge(b[p])&&null==l.model.getTerminal(b[p],!0)){f=l.model.getParent(b[p]);break}if(null!=n&&f!=n&&null!=this.view.getState(b[0])){var t=l.getIncomingEdges(b[0]);
-if(0<t.length){var z=l.view.getState(l.model.getTerminal(t[0],!0));if(null!=z){var u=l.view.getState(n);null!=u&&(c=(u.getCenterX()-z.getCenterX())/l.view.scale,d=(u.getCenterY()-z.getCenterY())/l.view.scale)}}}}m=F.apply(this,arguments);if(null!=m&&null!=b&&m.length==b.length)for(p=0;p<m.length;p++)if(this.model.isEdge(m[p]))a(n)&&0>mxUtils.indexOf(m,this.model.getTerminal(m[p],!0))&&this.model.setTerminal(m[p],n,!0);else if(a(b[p])&&(t=l.getIncomingEdges(b[p]),0<t.length))if(!e)a(n)&&0>mxUtils.indexOf(b,
-this.model.getTerminal(t[0],!0))&&this.model.setTerminal(t[0],n,!0);else if(0==l.getIncomingEdges(m[p]).length){q=n;if(null==q||q==l.model.getParent(b[p]))q=l.model.getTerminal(t[0],!0);e=this.cloneCell(t[0]);this.addEdge(e,l.getDefaultParent(),q,m[p])}}finally{this.model.endUpdate()}return m};if(null!=p.sidebar){var z=p.sidebar.dropAndConnect;p.sidebar.dropAndConnect=function(b,c,d,e){var f=l.model,g=null;f.beginUpdate();try{if(g=z.apply(this,arguments),a(b))for(var k=0;k<g.length;k++)if(f.isEdge(g[k])&&
+l.getDefaultParent(),this.model.getTerminal(g[0],!0),k[e])}}}finally{this.model.endUpdate()}return k};var G=l.moveCells;l.moveCells=function(b,c,d,e,f,g,k){var m=null;this.model.beginUpdate();try{var n=f,p=this.getCurrentCellStyle(f);if(null!=b&&a(f)&&"1"==mxUtils.getValue(p,"treeFolding","0")){for(var q=0;q<b.length;q++)if(a(b[q])||l.model.isEdge(b[q])&&null==l.model.getTerminal(b[q],!0)){f=l.model.getParent(b[q]);break}if(null!=n&&f!=n&&null!=this.view.getState(b[0])){var z=l.getIncomingEdges(b[0]);
+if(0<z.length){var t=l.view.getState(l.model.getTerminal(z[0],!0));if(null!=t){var u=l.view.getState(n);null!=u&&(c=(u.getCenterX()-t.getCenterX())/l.view.scale,d=(u.getCenterY()-t.getCenterY())/l.view.scale)}}}}m=G.apply(this,arguments);if(null!=m&&null!=b&&m.length==b.length)for(q=0;q<m.length;q++)if(this.model.isEdge(m[q]))a(n)&&0>mxUtils.indexOf(m,this.model.getTerminal(m[q],!0))&&this.model.setTerminal(m[q],n,!0);else if(a(b[q])&&(z=l.getIncomingEdges(b[q]),0<z.length))if(!e)a(n)&&0>mxUtils.indexOf(b,
+this.model.getTerminal(z[0],!0))&&this.model.setTerminal(z[0],n,!0);else if(0==l.getIncomingEdges(m[q]).length){p=n;if(null==p||p==l.model.getParent(b[q]))p=l.model.getTerminal(z[0],!0);e=this.cloneCell(z[0]);this.addEdge(e,l.getDefaultParent(),p,m[q])}}finally{this.model.endUpdate()}return m};if(null!=p.sidebar){var z=p.sidebar.dropAndConnect;p.sidebar.dropAndConnect=function(b,c,d,e){var f=l.model,g=null;f.beginUpdate();try{if(g=z.apply(this,arguments),a(b))for(var k=0;k<g.length;k++)if(f.isEdge(g[k])&&
null==f.getTerminal(g[k],!0)){f.setTerminal(g[k],b,!0);var m=l.getCellGeometry(g[k]);m.points=null;null!=m.getTerminalPoint(!0)&&m.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return g}}var E={88:p.actions.get("selectChildren"),84:p.actions.get("selectSubtree"),80:p.actions.get("selectParent"),83:p.actions.get("selectSiblings")},C=p.onKeyDown;p.onKeyDown=function(b){try{if(l.isEnabled()&&!l.isEditing()&&a(l.getSelectionCell())&&1==l.getSelectionCount()){var c=null;0<l.getIncomingEdges(l.getSelectionCell()).length&&
(9==b.which?c=mxEvent.isShiftDown(b)?B(l.getSelectionCell()):d(l.getSelectionCell()):13==b.which&&(c=y(l.getSelectionCell(),!mxEvent.isShiftDown(b))));if(null!=c&&0<c.length)1==c.length&&l.model.isEdge(c[0])?l.setSelectionCell(l.model.getTerminal(c[0],!1)):l.setSelectionCell(c[c.length-1]),null!=p.hoverIcons&&p.hoverIcons.update(l.view.getState(l.getSelectionCell())),l.startEditingAtCell(l.getSelectionCell()),mxEvent.consume(b);else if(mxEvent.isAltDown(b)&&mxEvent.isShiftDown(b)){var e=E[b.keyCode];
null!=e&&(e.funct(b),mxEvent.consume(b))}else 37==b.keyCode?(g(l.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(b)):38==b.keyCode?(g(l.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(b)):39==b.keyCode?(g(l.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(b)):40==b.keyCode&&(g(l.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(b))}}catch(R){p.handleError(R)}mxEvent.isConsumed(b)||C.apply(this,arguments)};var v=l.connectVertex;l.connectVertex=
function(b,c,e,f,g,k){var m=l.getIncomingEdges(b);return a(b)?(e=u(b),f=e==mxConstants.DIRECTION_EAST||e==mxConstants.DIRECTION_WEST,g=c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST,e==c||0==m.length?d(b,c):f==g?B(b):y(b,c!=mxConstants.DIRECTION_NORTH&&c!=mxConstants.DIRECTION_WEST)):v.call(this,b,c,e,f,g,k)};l.getSubtree=function(c){var d=[c];!b(c)&&!a(c)||q(c)||l.traverse(c,!0,function(a,b){null!=b&&0>mxUtils.indexOf(d,b)&&d.push(b);0>mxUtils.indexOf(d,a)&&d.push(a);return!0});return d};
-var L=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){L.apply(this,arguments);(b(this.state.cell)||a(this.state.cell))&&!q(this.state.cell)&&0<this.graph.getOutgoingEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title","Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="24px",this.moveHandle.style.height="24px",this.graph.container.appendChild(this.moveHandle),
-mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(a){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(a),mxEvent.getClientY(a),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(a);this.graph.isMouseDown=!0;p.hoverIcons.reset();mxEvent.consume(a)})))};var J=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){J.apply(this,arguments);null!=this.moveHandle&&
+var I=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){I.apply(this,arguments);(b(this.state.cell)||a(this.state.cell))&&!q(this.state.cell)&&0<this.graph.getOutgoingEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title","Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="24px",this.moveHandle.style.height="24px",this.graph.container.appendChild(this.moveHandle),
+mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(a){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(a),mxEvent.getClientY(a),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(a);this.graph.isMouseDown=!0;p.hoverIcons.reset();mxEvent.consume(a)})))};var K=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){K.apply(this,arguments);null!=this.moveHandle&&
(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var H=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(a){H.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.display=a?"":"none")};var N=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(a,b){N.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,400,320),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");a.vertex=!0;var b=new mxCell("Parent",new mxGeometry(140,
60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');b.vertex=!0;var c=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');c.vertex=!0;var e=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");e.geometry.relative=
@@ -3653,15 +3654,15 @@ e.style.whiteSpace="nowrap";e.style.textAlign="left";e.style.zIndex=this.toolbar
function(){mxUtils.setOpacity(e,0);c=null;m=window.setTimeout(mxUtils.bind(this,function(){e.style.display="none";m=null}),100)}),a||200)}),q=mxUtils.bind(this,function(a){null!=c&&(window.clearTimeout(c),fadeThead=null);null!=m&&(window.clearTimeout(m),fadeThead2=null);e.style.display="";mxUtils.setOpacity(e,a||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(q(30),k())}));mxEvent.addListener(e,mxClient.IS_POINTER?
"pointermove":"mousemove",function(a){mxEvent.consume(a)});mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(a){q(100)}));mxEvent.addListener(e,"mousemove",mxUtils.bind(this,function(a){q(100);mxEvent.consume(a)}));mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||q(30)}));var u=this.graph,y=u.getTolerance();u.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(a,b){this.startX=b.getGraphX();this.startY=b.getGraphY();
this.scrollLeft=u.container.scrollLeft;this.scrollTop=u.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(a,b){mxEvent.isTouchEvent(b.getEvent())&&Math.abs(this.scrollLeft-u.container.scrollLeft)<y&&Math.abs(this.scrollTop-u.container.scrollTop)<y&&Math.abs(this.startX-b.getGraphX())<y&&Math.abs(this.startY-b.getGraphY())<y&&(0<parseFloat(e.style.opacity||0)?k():q(30))}})}for(var B=this.toolbarItems,d=0,f=null,g=null,p=0;p<B.length;p++){var l=B[p];if("pages"==l){g=b.ownerDocument.createElement("div");
-g.style.cssText="display:inline-block;position:relative;padding:3px 4px 0 4px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;";mxUtils.setOpacity(g,70);var n=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");n.style.borderRightStyle="none";n.style.paddingLeft="0px";n.style.paddingRight="0px";e.appendChild(g);var A=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage+
-1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");A.style.paddingLeft="0px";A.style.paddingRight="0px";l=mxUtils.bind(this,function(){g.innerHTML="";mxUtils.write(g,this.currentPage+1+" / "+this.diagrams.length);g.style.display=1<this.diagrams.length?"inline-block":"none";n.style.display=g.style.display;A.style.display=g.style.display});this.addListener("graphChanged",l);l()}else if("zoom"==l)this.zoomEnabled&&(a(mxUtils.bind(this,function(){this.graph.zoomOut()}),Editor.zoomOutImage,
-mxResources.get("zoomOut")||"Zoom Out"),a(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),a(mxUtils.bind(this,function(){this.graph.view.scaleAndTranslate(this.graph.initialViewState.scale,this.graph.initialViewState.translate.x,this.graph.initialViewState.translate.y)}),Editor.zoomFitImage,mxResources.get("fit")||"Fit"));else if("layers"==l){if(this.layersEnabled){var x=this.graph.getModel(),t=a(mxUtils.bind(this,function(a){if(null!=f)f.parentNode.removeChild(f),
+g.style.cssText="display:inline-block;position:relative;padding:3px 4px 0 4px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;";mxUtils.setOpacity(g,70);var n=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");n.style.borderRightStyle="none";n.style.paddingLeft="0px";n.style.paddingRight="0px";e.appendChild(g);var x=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage+
+1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");x.style.paddingLeft="0px";x.style.paddingRight="0px";l=mxUtils.bind(this,function(){g.innerHTML="";mxUtils.write(g,this.currentPage+1+" / "+this.diagrams.length);g.style.display=1<this.diagrams.length?"inline-block":"none";n.style.display=g.style.display;x.style.display=g.style.display});this.addListener("graphChanged",l);l()}else if("zoom"==l)this.zoomEnabled&&(a(mxUtils.bind(this,function(){this.graph.zoomOut()}),Editor.zoomOutImage,
+mxResources.get("zoomOut")||"Zoom Out"),a(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),a(mxUtils.bind(this,function(){this.graph.view.scaleAndTranslate(this.graph.initialViewState.scale,this.graph.initialViewState.translate.x,this.graph.initialViewState.translate.y)}),Editor.zoomFitImage,mxResources.get("fit")||"Fit"));else if("layers"==l){if(this.layersEnabled){var A=this.graph.getModel(),t=a(mxUtils.bind(this,function(a){if(null!=f)f.parentNode.removeChild(f),
f=null;else{f=this.graph.createLayersDialog();mxEvent.addListener(f,"mouseleave",function(){f.parentNode.removeChild(f);f=null});a=t.getBoundingClientRect();f.style.width="140px";f.style.padding="2px 0px 2px 0px";f.style.border="1px solid #d0d0d0";f.style.backgroundColor="#eee";f.style.fontFamily="Helvetica Neue,Helvetica,Arial Unicode MS,Arial";f.style.fontSize="11px";f.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(f,80);var b=mxUtils.getDocumentScrollOrigin(document);f.style.left=b.x+a.left+
-"px";f.style.top=b.y+a.bottom+"px";document.body.appendChild(f)}}),Editor.layersImage,mxResources.get("layers")||"Layers");x.addListener(mxEvent.CHANGE,function(){t.style.display=1<x.getChildCount(x.root)?"inline-block":"none"});t.style.display=1<x.getChildCount(x.root)?"inline-block":"none"}}else"lightbox"==l?this.lightboxEnabled&&a(mxUtils.bind(this,function(){this.showLightbox()}),Editor.maximizeImage,mxResources.get("show")||"Show"):null!=this.graphConfig["toolbar-buttons"]&&(l=this.graphConfig["toolbar-buttons"][l],
+"px";f.style.top=b.y+a.bottom+"px";document.body.appendChild(f)}}),Editor.layersImage,mxResources.get("layers")||"Layers");A.addListener(mxEvent.CHANGE,function(){t.style.display=1<A.getChildCount(A.root)?"inline-block":"none"});t.style.display=1<A.getChildCount(A.root)?"inline-block":"none"}}else"lightbox"==l?this.lightboxEnabled&&a(mxUtils.bind(this,function(){this.showLightbox()}),Editor.maximizeImage,mxResources.get("show")||"Show"):null!=this.graphConfig["toolbar-buttons"]&&(l=this.graphConfig["toolbar-buttons"][l],
null!=l&&a(null==l.enabled||l.enabled?l.handler:function(){},l.image,l.title,l.enabled))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*d);null!=this.graphConfig.title&&(B=b.ownerDocument.createElement("div"),B.style.cssText="display:inline-block;position:relative;padding:3px 6px 0 6px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;",B.setAttribute("title",this.graphConfig.title),mxUtils.write(B,this.graphConfig.title),mxUtils.setOpacity(B,
-70),e.appendChild(B));this.minToolbarWidth=34*d;var F=b.style.border,B=mxUtils.bind(this,function(){e.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,b.offsetWidth)+"px";e.style.border="1px solid #d0d0d0";if(1!=this.graphConfig["toolbar-nohide"]){var a=b.getBoundingClientRect(),c=mxUtils.getScrollOrigin(document.body),c="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-c.x,top:-c.y},a={left:a.left-c.left,top:a.top-
-c.top,bottom:a.bottom-c.top,right:a.right-c.left};e.style.left=a.left+"px";"bottom"==this.graphConfig["toolbar-position"]?e.style.top=a.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(e.style.marginTop=-this.toolbarHeight+"px",e.style.top=a.top+1+"px"):e.style.top=a.top+"px";"1px solid transparent"==F&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(e);var d=mxUtils.bind(this,function(){null!=e.parentNode&&e.parentNode.removeChild(e);null!=f&&(f.parentNode.removeChild(f),
-f=null);b.style.border=F});mxEvent.addListener(document,"mousemove",function(a){for(a=mxEvent.getSource(a);null!=a;){if(a==b||a==e||a==f)return;a=a.parentNode}d()});mxEvent.addListener(document,"mouseleave",function(a){d()})}else e.style.top=-this.toolbarHeight+"px",b.appendChild(e)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(b,"mouseenter",B):B()};
+70),e.appendChild(B));this.minToolbarWidth=34*d;var G=b.style.border,B=mxUtils.bind(this,function(){e.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,b.offsetWidth)+"px";e.style.border="1px solid #d0d0d0";if(1!=this.graphConfig["toolbar-nohide"]){var a=b.getBoundingClientRect(),c=mxUtils.getScrollOrigin(document.body),c="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-c.x,top:-c.y},a={left:a.left-c.left,top:a.top-
+c.top,bottom:a.bottom-c.top,right:a.right-c.left};e.style.left=a.left+"px";"bottom"==this.graphConfig["toolbar-position"]?e.style.top=a.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(e.style.marginTop=-this.toolbarHeight+"px",e.style.top=a.top+1+"px"):e.style.top=a.top+"px";"1px solid transparent"==G&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(e);var d=mxUtils.bind(this,function(){null!=e.parentNode&&e.parentNode.removeChild(e);null!=f&&(f.parentNode.removeChild(f),
+f=null);b.style.border=G});mxEvent.addListener(document,"mousemove",function(a){for(a=mxEvent.getSource(a);null!=a;){if(a==b||a==e||a==f)return;a=a.parentNode}d()});mxEvent.addListener(document,"mouseleave",function(a){d()})}else e.style.top=-this.toolbarHeight+"px",b.appendChild(e)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(b,"mouseenter",B):B()};
GraphViewer.prototype.addClickHandler=function(a,b){a.linkPolicy=this.graphConfig.target||a.linkPolicy;a.addClickHandler(this.graphConfig.highlight,mxUtils.bind(this,function(e,c){if(null==c){var m=mxEvent.getSource(e);"a"==m.nodeName.toLowerCase()&&(c=m.getAttribute("href"))}null!=b?null==c||a.isCustomLink(c)?mxEvent.consume(e):a.isExternalProtocol(c)||a.isBlankLink(c)||window.setTimeout(function(){b.destroy()},0):null!=c&&null==b&&a.isCustomLink(c)&&(mxEvent.isTouchEvent(e)||!mxEvent.isPopupTrigger(e))&&
a.customLinkClicked(c)&&mxEvent.consume(e)}),mxUtils.bind(this,function(a){null!=b||!this.lightboxClickEnabled||mxEvent.isTouchEvent(a)&&0!=this.toolbarItems.length||this.showLightbox()}))};
GraphViewer.prototype.showLightbox=function(a,b,e){if("open"==this.graphConfig.lightbox||window.self!==window.top)if(null==this.lightboxWindow||this.lightboxWindow.closed){a=null!=a?a:null!=this.graphConfig.editable?this.graphConfig.editable:!0;e={client:1,lightbox:1,target:null!=e?e:"blank"};a&&(e.edit=this.graphConfig.edit||"_blank");if(null!=b?b:1)e.close=1;this.layersEnabled&&(e.layers=1);null!=this.graphConfig&&0!=this.graphConfig.nav&&(e.nav=1);null!=this.graphConfig&&null!=this.graphConfig.highlight&&
@@ -3682,7 +3683,7 @@ GraphViewer.initCss=function(){try{var a=document.createElement("style");a.type=
GraphViewer.cachedUrls={};GraphViewer.getUrl=function(a,b,e){if(null!=GraphViewer.cachedUrls[a])b(GraphViewer.cachedUrls[a]);else{var c=null!=navigator.userAgent&&0<navigator.userAgent.indexOf("MSIE 9")?new XDomainRequest:new XMLHttpRequest;c.open("GET",a);c.onload=function(){b(null!=c.getText?c.getText():c.responseText)};c.onerror=e;c.send()}};GraphViewer.resizeSensorEnabled=!0;GraphViewer.useResizeSensor=!0;
(function(){var a=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(a){return window.setTimeout(a,20)},b=function(e,c){function m(){this.q=[];this.add=function(a){this.q.push(a)};var a,b;this.call=function(){a=0;for(b=this.q.length;a<b;a++)this.q[a].call()}}function k(a,b){return a.currentStyle?a.currentStyle[b]:window.getComputedStyle?window.getComputedStyle(a,null).getPropertyValue(b):a.style[b]}function q(b,c){if(!b.resizedAttached)b.resizedAttached=
new m,b.resizedAttached.add(c);else if(b.resizedAttached){b.resizedAttached.add(c);return}b.resizeSensor=document.createElement("div");b.resizeSensor.className="resize-sensor";b.resizeSensor.style.cssText="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;";b.resizeSensor.innerHTML='<div class="resize-sensor-expand" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s;"></div></div><div class="resize-sensor-shrink" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s; width: 200%; height: 200%"></div></div>';
-b.appendChild(b.resizeSensor);"static"==k(b,"position")&&(b.style.position="relative");var d=b.resizeSensor.childNodes[0],e=d.childNodes[0],f=b.resizeSensor.childNodes[1],g=function(){e.style.width="100000px";e.style.height="100000px";d.scrollLeft=1E5;d.scrollTop=1E5;f.scrollLeft=1E5;f.scrollTop=1E5};g();var q=!1,t=function(){b.resizedAttached&&(q&&(b.resizedAttached.call(),q=!1),a(t))};a(t);var u,y,B,C,v=function(){if((B=b.offsetWidth)!=u||(C=b.offsetHeight)!=y)q=!0,u=B,y=C;g()},L=function(a,b,c){a.attachEvent?
-a.attachEvent("on"+b,c):a.addEventListener(b,c)};L(d,"scroll",v);L(f,"scroll",v)}var u=function(){GraphViewer.resizeSensorEnabled&&c()},y=Object.prototype.toString.call(e),B="[object Array]"===y||"[object NodeList]"===y||"[object HTMLCollection]"===y||"undefined"!==typeof jQuery&&e instanceof jQuery||"undefined"!==typeof Elements&&e instanceof Elements;if(B)for(var y=0,d=e.length;y<d;y++)q(e[y],u);else q(e,u);this.detach=function(){if(B)for(var a=0,c=e.length;a<c;a++)b.detach(e[a]);else b.detach(e)}};
+b.appendChild(b.resizeSensor);"static"==k(b,"position")&&(b.style.position="relative");var d=b.resizeSensor.childNodes[0],e=d.childNodes[0],f=b.resizeSensor.childNodes[1],g=function(){e.style.width="100000px";e.style.height="100000px";d.scrollLeft=1E5;d.scrollTop=1E5;f.scrollLeft=1E5;f.scrollTop=1E5};g();var q=!1,t=function(){b.resizedAttached&&(q&&(b.resizedAttached.call(),q=!1),a(t))};a(t);var u,y,B,C,v=function(){if((B=b.offsetWidth)!=u||(C=b.offsetHeight)!=y)q=!0,u=B,y=C;g()},I=function(a,b,c){a.attachEvent?
+a.attachEvent("on"+b,c):a.addEventListener(b,c)};I(d,"scroll",v);I(f,"scroll",v)}var u=function(){GraphViewer.resizeSensorEnabled&&c()},y=Object.prototype.toString.call(e),B="[object Array]"===y||"[object NodeList]"===y||"[object HTMLCollection]"===y||"undefined"!==typeof jQuery&&e instanceof jQuery||"undefined"!==typeof Elements&&e instanceof Elements;if(B)for(var y=0,d=e.length;y<d;y++)q(e[y],u);else q(e,u);this.detach=function(){if(B)for(var a=0,c=e.length;a<c;a++)b.detach(e[a]);else b.detach(e)}};
b.detach=function(a){a.resizeSensor&&(a.removeChild(a.resizeSensor),delete a.resizeSensor,delete a.resizedAttached)};window.ResizeSensor=b})();
(function(){Editor.initMath();GraphViewer.initCss();if(null!=window.onDrawioViewerLoad)window.onDrawioViewerLoad();else GraphViewer.processElements()})();
diff --git a/src/main/webapp/service-worker.js b/src/main/webapp/service-worker.js
index 90cd924b..fa8b0d2a 100644
--- a/src/main/webapp/service-worker.js
+++ b/src/main/webapp/service-worker.js
@@ -6,7 +6,7 @@ if (workbox)
workbox.precaching.precacheAndRoute([
{
"url": "js/app.min.js",
- "revision": "9e5d19fe4b5457b431f7f8805c94d965"
+ "revision": "8548e6ad3bc466efae221cd0e783d7a5"
},
{
"url": "js/extensions.min.js",