From 5c95e2d973908dc6c0c831b0bad68dc0c80be34a Mon Sep 17 00:00:00 2001 From: Gaudenz Alder <gaudenz@jgraph.com> Date: Mon, 19 Aug 2019 17:20:51 +0200 Subject: [PATCH] 11.1.5 release --- ChangeLog | 14 +- VERSION | 2 +- etc/build/build.xml | 2 + src/main/webapp/cache.manifest | 2 +- src/main/webapp/electron.js | 3 +- src/main/webapp/export3.html | 11 +- src/main/webapp/js/app.min.js | 2780 +++++++++-------- src/main/webapp/js/diagramly/App.js | 2 +- src/main/webapp/js/diagramly/DevTools.js | 2 + src/main/webapp/js/diagramly/Devel.js | 7 +- src/main/webapp/js/diagramly/Editor.js | 85 +- src/main/webapp/js/diagramly/EditorUi.js | 613 ++-- src/main/webapp/js/diagramly/Menus.js | 57 +- src/main/webapp/js/diagramly/mxRuler.js | 420 +++ .../webapp/js/diagramly/vsdx/VsdxExport.js | 2 +- .../js/diagramly/vsdx/mxVsdxCanvas2D.js | 26 +- src/main/webapp/js/extensions.min.js | 316 +- src/main/webapp/js/mxgraph/Actions.js | 2 +- src/main/webapp/js/mxgraph/Dialogs.js | 112 +- src/main/webapp/js/mxgraph/Editor.js | 66 + src/main/webapp/js/mxgraph/Format.js | 149 +- src/main/webapp/js/mxgraph/Graph.js | 48 +- src/main/webapp/js/mxgraph/Shapes.js | 20 + src/main/webapp/js/mxgraph/Sidebar.js | 9 +- src/main/webapp/js/viewer.min.js | 1905 +++++------ src/main/webapp/plugins/cConf-1-4-8.js | 5 +- src/main/webapp/plugins/p1.js | 40 +- src/main/webapp/shortcuts.svg | 2 +- 28 files changed, 3771 insertions(+), 2931 deletions(-) create mode 100644 src/main/webapp/js/diagramly/mxRuler.js diff --git a/ChangeLog b/ChangeLog index 5d2796ac8..e4043357f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +19-AUG-2019: 11.1.5 + +- Fixes ignored background for multipage PDF export +- Adds Lollipop Notation shape in UML section +- Fixes export for global placeholders +- Adds XML declaration for SVG export +- Enables block alignment for text +- Adds allowArrows style + 08-AUG-2019: 11.1.4 - Fixes grid NPE in export dialog @@ -12,7 +21,7 @@ 05-AUG-2019: 11.1.2 - Fixes encoding of embedded PNG data -- Ads custom Gitlab URL option +- Adds custom Gitlab URL option 02-AUG-2019: 11.1.1 @@ -49,6 +58,7 @@ - Fixes incorrect zTXt header for PNG+XML files - Fixes rounding of ellipse positions in SVG - Fixes rounding for fixed connection points +- Uses mxGraph 4.0.3 beta 4 23-JUL-2019: 11.0.4 @@ -58,11 +68,13 @@ - Fixes handling of repository paths in GitLab - Ignores hidden cells for selectAll +- Uses mxGraph 4.0.3 beta 3 22-JUL-2019: 11.0.2 - Replaces alt+click with shift+click in ChromeOS - Uses draw.io Viewer app for lightbox mode +- Uses mxGraph 4.0.3 beta 2 20-JUL-2019: 11.0.1 diff --git a/VERSION b/VERSION index e1a515a3f..76222eb0a 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -11.1.4 \ No newline at end of file +11.1.5 \ No newline at end of file diff --git a/etc/build/build.xml b/etc/build/build.xml index f774fc168..bc3f2664b 100644 --- a/etc/build/build.xml +++ b/etc/build/build.xml @@ -275,6 +275,7 @@ <file name="Trees.js" /> <file name="Minimal.js" /> <file name="DistanceGuides.js" /> + <file name="mxRuler.js" /> <file name="mxFreehand.js" /> <file name="DrawioUser.js" /> <file name="DrawioComment.js" /> @@ -375,6 +376,7 @@ <file name="Trees.js" /> <file name="Minimal.js" /> <file name="DistanceGuides.js" /> + <file name="mxRuler.js" /> <file name="mxFreehand.js" /> </sources> </jscomp> diff --git a/src/main/webapp/cache.manifest b/src/main/webapp/cache.manifest index 467b5f107..7b653e800 100644 --- a/src/main/webapp/cache.manifest +++ b/src/main/webapp/cache.manifest @@ -1,7 +1,7 @@ CACHE MANIFEST # THIS FILE WAS GENERATED. DO NOT MODIFY! -# 08/08/2019 04:41 PM +# 08/19/2019 05:05 PM app.html index.html?offline=1 diff --git a/src/main/webapp/electron.js b/src/main/webapp/electron.js index 37d1a7c71..db0ec72fe 100644 --- a/src/main/webapp/electron.js +++ b/src/main/webapp/electron.js @@ -1076,7 +1076,8 @@ function exportDiagram(event, args, directFinalize) } else if (args.format == 'png' || args.format == 'jpg' || args.format == 'jpeg') { - var newBounds = {width: Math.ceil(bounds.width + bounds.x), height: Math.ceil(bounds.height + bounds.y)}; + //Adds an extra pixel to prevent scrollbars from showing + var newBounds = {width: Math.ceil(bounds.width + bounds.x) + 1, height: Math.ceil(bounds.height + bounds.y) + 1}; browser.setBounds(newBounds); //TODO The browser takes sometime to show the graph (also after resize it takes some time to render) diff --git a/src/main/webapp/export3.html b/src/main/webapp/export3.html index 5971375ab..bb40f8215 100644 --- a/src/main/webapp/export3.html +++ b/src/main/webapp/export3.html @@ -103,6 +103,12 @@ diagrams = xmlDoc.documentElement.getElementsByTagName('diagram'); } + //Add global variables to graph + if (extras != null && extras.globalVars != null) + { + graph.globalUrlVars = extras.globalVars; + } + /** * Implements %page% and %pagenumber% placeholders */ @@ -319,7 +325,8 @@ codec.decode(xmlDoc.documentElement, model); // Loads background color - var bg = (data.bg != null && data.bg.length > 0) ? data.bg : xmlDoc.documentElement.getAttribute('background'); + var bg = (data.bg != null && data.bg.length > 0 && data.format != 'pdf') ? + data.bg : xmlDoc.documentElement.getAttribute('background'); // Normalizes values for transparent backgrounds if (bg == 'none' || bg == '') @@ -334,7 +341,7 @@ } // Sets background color on page - if (bg != null) + if (bg != null && data.format != 'pdf') { document.body.style.backgroundColor = bg; } diff --git a/src/main/webapp/js/app.min.js b/src/main/webapp/js/app.min.js index 929dc32a2..556387407 100644 --- a/src/main/webapp/js/app.min.js +++ b/src/main/webapp/js/app.min.js @@ -2048,11 +2048,11 @@ 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);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,f,e,h,g,k,l,m){var p=0;mxClient.IS_VML&&(null==document.documentMode||8>document.documentMode)&&(p=80);d+=p;b+=p;var n=d,t=b,r=mxUtils.getDocumentSize(),w=r.height,v=Math.max(1,Math.round((r.width-d-64)/2)),u=Math.max(1,Math.round((w-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,w-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=w+"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));r=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=r.x+"px";this.bg.style.top=r.y+"px";v+=r.x;u+=r.y;f&&document.body.appendChild(this.bg);var q=a.createDiv(k?"geTransDialog":"geDialog");f=this.getPosition(v,u,d,b);v=f.x;u=f.y;q.style.width= -d+"px";q.style.height=b+"px";q.style.left=v+"px";q.style.top=u+"px";q.style.zIndex=this.zIndex;q.appendChild(c);document.body.appendChild(q);!g&&c.clientHeight>q.clientHeight-64&&(c.style.overflowY="auto");e&&(e=document.createElement("img"),e.setAttribute("src",Dialog.prototype.closeImage),e.setAttribute("title",mxResources.get("close")),e.className="geDialogClose",e.style.top=u+14+"px",e.style.left=v+d+38-p+"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||mxEvent.addGestureListeners(this.bg,null,null,mxUtils.bind(this,function(b){a.hideDialog(!0)})));this.resizeListener=mxUtils.bind(this,function(){if(null!=l){var e=l();null!=e&&(n=d=e.w,t=b=e.h)}e=mxUtils.getDocumentSize();w=e.height;this.bg.style.height=w+"px";v=Math.max(1,Math.round((e.width-d-64)/2));u=Math.max(1,Math.round((w-b-a.footerHeight)/3));d=null!=document.body?Math.min(n,document.body.scrollWidth-64):n;b=Math.min(t,w-64);e=this.getPosition(v, -u,d,b);v=e.x;u=e.y;q.style.left=v+"px";q.style.top=u+"px";q.style.width=d+"px";q.style.height=b+"px";!g&&c.clientHeight>q.clientHeight-64&&(c.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=u+14+"px",this.dialogImg.style.left=v+d+38-p+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=h;this.container=q;a.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-1; +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,v=mxUtils.getDocumentSize(),w=v.height,t=Math.max(1,Math.round((v.width-d-64)/2)),u=Math.max(1,Math.round((w-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,w-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=w+"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));v=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=v.x+"px";this.bg.style.top=v.y+"px";t+=v.x;u+=v.y;f&&document.body.appendChild(this.bg);var r=a.createDiv(k?"geTransDialog":"geDialog");f=this.getPosition(t,u,d,b);t=f.x;u=f.y;r.style.width= +d+"px";r.style.height=b+"px";r.style.left=t+"px";r.style.top=u+"px";r.style.zIndex=this.zIndex;r.appendChild(c);document.body.appendChild(r);!g&&c.clientHeight>r.clientHeight-64&&(c.style.overflowY="auto");e&&(e=document.createElement("img"),e.setAttribute("src",Dialog.prototype.closeImage),e.setAttribute("title",mxResources.get("close")),e.className="geDialogClose",e.style.top=u+14+"px",e.style.left=t+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||mxEvent.addGestureListeners(this.bg,null,null,mxUtils.bind(this,function(b){a.hideDialog(!0)})));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();w=e.height;this.bg.style.height=w+"px";t=Math.max(1,Math.round((e.width-d-64)/2));u=Math.max(1,Math.round((w-b-a.footerHeight)/3));d=null!=document.body?Math.min(p,document.body.scrollWidth-64):p;b=Math.min(q,w-64);e=this.getPosition(t, +u,d,b);t=e.x;u=e.y;r.style.left=t+"px";r.style.top=u+"px";r.style.width=d+"px";r.style.height=b+"px";!g&&c.clientHeight>r.clientHeight-64&&(c.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=u+14+"px",this.dialogImg.style.left=t+d+38-n+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=h;this.container=r;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"; Dialog.prototype.clearImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDQAKAIABAMDAwP///yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OUIzOEM1NzI4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OUIzOEM1NzM4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo5QjM4QzU3MDg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo5QjM4QzU3MTg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAEAAAEALAAAAAANAAoAAAIXTGCJebD9jEOTqRlttXdrB32PJ2ncyRQAOw==":IMAGE_PATH+ @@ -2061,35 +2061,38 @@ 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,f,e,h,g,k,l,m){k=null!=k?k:!0;var p=document.createElement("div");p.style.textAlign="center";if(null!=c){var n=document.createElement("div");n.style.padding="0px";n.style.margin="0px";n.style.fontSize="18px";n.style.paddingBottom="16px";n.style.marginBottom="10px";n.style.borderBottom="1px solid #c0c0c0";n.style.color="gray";n.style.whiteSpace="nowrap";n.style.textOverflow="ellipsis";n.style.overflow="hidden";mxUtils.write(n,c);n.setAttribute("title",c);p.appendChild(n)}c= -document.createElement("div");c.style.lineHeight="1.2em";c.style.padding="6px";c.innerHTML=d;p.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 t=mxUtils.button(b,function(){k&&a.hideDialog();null!=f&&f()}); -t.className="geBtn";d.appendChild(t);null!=h&&(b=mxUtils.button(h,function(){k&&a.hideDialog();null!=g&&g()}),b.className="geBtn gePrimaryBtn",d.appendChild(b));this.init=function(){t.focus()};p.appendChild(d);this.container=p},PrintDialog=function(a,c){this.create(a,c)}; -PrintDialog.prototype.create=function(a){function c(a){var b=g.checked||l.checked,c=parseInt(p.value)/100;isNaN(c)&&(c=1,p.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): +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 p=document.createElement("input");p.setAttribute("value","100 %");p.setAttribute("size","5");p.style.width="50px";f.appendChild(p);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 n=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();c(!1)});n.className="geBtn";f.appendChild(n)}n=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();c(!0)});n.className="geBtn gePrimaryBtn";f.appendChild(n);a.editor.cancelFirst|| +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==t?(n.removeAttribute("title"),n.style.fontSize="",n.innerHTML=mxResources.get("change")+"..."):(n.setAttribute("title",t.src),n.style.fontSize="11px",n.innerHTML=t.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 p=document.createElement("input");p.setAttribute("type","number");p.setAttribute("min","0");p.style.width="40px";p.style.marginLeft="6px";p.value=b.getGridSize();e.appendChild(p);mxEvent.addListener(p,"change",function(){var a=parseInt(p.value);p.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 n=document.createElement("a");n.style.textDecoration="underline";n.style.cursor="pointer";n.style.color="#a0a0a0";var t=b.backgroundImage;mxEvent.addListener(n,"click",function(b){a.showBackgroundImageDialog(function(a){t=a;d()});mxEvent.consume(b)});d();e.appendChild(n);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 r= -mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});r.className="geBtn";a.editor.cancelFirst&&e.appendChild(r);var w=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();b.gridSize!==p.value&&b.setGridSize(parseInt(p.value));var c=new ChangePageSetup(a,m,t,k.get());c.ignoreColor=b.background==m;c.ignoreImage=(null!=b.backgroundImage?b.backgroundImage.src:null)===(null!=t?t.src:null);b.pageFormat.width==c.previousFormat.width&&b.pageFormat.height==c.previousFormat.height&& -c.ignoreColor&&c.ignoreImage||b.model.execute(c)});w.className="geBtn gePrimaryBtn";e.appendChild(w);a.editor.cancelFirst||e.appendChild(r);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||p!=document.activeElement&&n!=document.activeElement){a=!1;for(b=0;b<r.length;b++)c=r[b],q?"custom"==c.key&&(g.value=c.key,q=!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"):(p.value=d.width/100,n.value=d.height/100,e.setAttribute("checked","checked"), +var PageSetupDialog=function(a){function c(){null==n||n==mxConstants.NONE?(m.style.backgroundColor="",m.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(m.style.backgroundColor=n,m.style.backgroundImage="")}function d(){null==v?(q.removeAttribute("title"),q.style.fontSize="",q.innerHTML=mxResources.get("change")+"..."):(q.setAttribute("title",v.src),q.style.fontSize="11px",q.innerHTML=v.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);if("1"==urlParams.ruler){f=document.createElement("tr");e=document.createElement("td"); +e.style.verticalAlign="top";e.style.fontSize="10pt";mxUtils.write(e,mxResources.get("unit",null,"Unit")+":");f.appendChild(e);e=document.createElement("td");e.style.verticalAlign="top";e.style.fontSize="10pt";var l=PageSetupDialog.addUnitPanel(e,b.view.unit);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 m=document.createElement("button");m.style.width="18px";m.style.height="18px";m.style.marginRight="20px";m.style.backgroundPosition="center center";m.style.backgroundRepeat="no-repeat";var n=b.background;c();mxEvent.addListener(m,"click",function(b){a.pickColor(n||"none",function(a){n=a;c()});mxEvent.consume(b)});e.appendChild(m);mxUtils.write(e,mxResources.get("gridSize")+":");var p=document.createElement("input");p.setAttribute("type","number");p.setAttribute("min","0");p.style.width= +"40px";p.style.marginLeft="6px";p.value=b.getGridSize();e.appendChild(p);mxEvent.addListener(p,"change",function(){var a=parseInt(p.value);p.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 q=document.createElement("a");q.style.textDecoration="underline";q.style.cursor="pointer";q.style.color="#a0a0a0";var v= +b.backgroundImage;mxEvent.addListener(q,"click",function(b){a.showBackgroundImageDialog(function(a){v=a;d()});mxEvent.consume(b)});d();e.appendChild(q);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 w=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});w.className="geBtn";a.editor.cancelFirst&&e.appendChild(w);var t=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog(); +b.gridSize!==p.value&&b.setGridSize(parseInt(p.value));var c=new ChangePageSetup(a,n,v,k.get());c.ignoreColor=b.background==n;c.ignoreImage=(null!=b.backgroundImage?b.backgroundImage.src:null)===(null!=v?v.src:null);b.pageFormat.width==c.previousFormat.width&&b.pageFormat.height==c.previousFormat.height&&c.ignoreColor&&c.ignoreImage||b.model.execute(c);null!=l&&b.view.setUnit(parseInt(l.value))});t.className="geBtn gePrimaryBtn";e.appendChild(t);a.editor.cancelFirst||e.appendChild(w);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<v.length;b++)c=v[b],r?"custom"==c.key&&(g.value=c.key,r=!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 p=document.createElement("input"); -p.setAttribute("size","7");p.style.textAlign="right";m.appendChild(p);mxUtils.write(m," in x ");var n=document.createElement("input");n.setAttribute("size","7");n.style.textAlign="right";m.appendChild(n);mxUtils.write(m," in");k.style.display="none";m.style.display="none";for(var t={},r=PageSetupDialog.getFormats(),w=0;w<r.length;w++){var v=r[w];t[v.key]=v;var u=document.createElement("option");u.setAttribute("value",v.key);mxUtils.write(u,v.title);g.appendChild(u)}var q=!1;f();a.appendChild(g);mxUtils.br(a); -a.appendChild(k);a.appendChild(m);var z=d,y=function(a,c){var e=t[g.value];null!=e.format?(p.value=e.format.width/100,n.value=e.format.height/100,m.style.display="none",k.style.display=""):(k.style.display="none",m.style.display="");e=parseFloat(p.value);if(isNaN(e)||0>=e)p.value=d.width/100;e=parseFloat(n.value);if(isNaN(e)||0>=e)n.value=d.height/100;e=new mxRectangle(0,0,Math.floor(100*parseFloat(p.value)),Math.floor(100*parseFloat(n.value)));"custom"!=g.value&&h.checked&&(e=new mxRectangle(0,0, -e.height,e.width));c&&q||e.width==z.width&&e.height==z.height||(z=e,null!=b&&b(z))};mxEvent.addListener(c,"click",function(a){e.checked=!0;y(a);mxEvent.consume(a)});mxEvent.addListener(l,"click",function(a){h.checked=!0;y(a);mxEvent.consume(a)});mxEvent.addListener(p,"blur",y);mxEvent.addListener(p,"click",y);mxEvent.addListener(n,"blur",y);mxEvent.addListener(n,"click",y);mxEvent.addListener(h,"change",y);mxEvent.addListener(e,"change",y);mxEvent.addListener(g,"change",function(a){q="custom"==g.value; -y(a,!0)});y();return{set:function(a){d=a;f(null,null,!0)},get:function(){return z},widthInput:p,heightInput:n}}; +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={},v=PageSetupDialog.getFormats(),w=0;w<v.length;w++){var t=v[w];q[t.key]=t;var u=document.createElement("option");u.setAttribute("value",t.key);mxUtils.write(u,t.title);g.appendChild(u)}var r=!1;f();a.appendChild(g);mxUtils.br(a); +a.appendChild(k);a.appendChild(m);var x=d,y=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&&r||e.width==x.width&&e.height==x.height||(x=e,null!=b&&b(x))};mxEvent.addListener(c,"click",function(a){e.checked=!0;y(a);mxEvent.consume(a)});mxEvent.addListener(l,"click",function(a){h.checked=!0;y(a);mxEvent.consume(a)});mxEvent.addListener(n,"blur",y);mxEvent.addListener(n,"click",y);mxEvent.addListener(p,"blur",y);mxEvent.addListener(p,"click",y);mxEvent.addListener(h,"change",y);mxEvent.addListener(e,"change",y);mxEvent.addListener(g,"change",function(a){r="custom"==g.value; +y(a,!0)});y();return{set:function(a){d=a;f(null,null,!0)},get:function(){return x},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 (279 mm x 432 mm)",format:new mxRectangle(0,0,1100,1700)},{key:"a0",title:"A0 (841 mm x 1189 mm)",format:new mxRectangle(0,0,3300,4681)},{key:"a1",title:"A1 (594 mm x 841 mm)",format:new mxRectangle(0,0,2339,3300)},{key:"a2",title:"A2 (420 mm x 594 mm)", format:new mxRectangle(0,0,1654,2336)},{key:"a3",title:"A3 (297 mm x 420 mm)",format:new mxRectangle(0,0,1169,1654)},{key:"a4",title:"A4 (210 mm x 297 mm)",format:mxConstants.PAGE_FORMAT_A4_PORTRAIT},{key:"a5",title:"A5 (148 mm x 210 mm)",format:new mxRectangle(0,0,583,827)},{key:"a6",title:"A6 (105 mm x 148 mm)",format:new mxRectangle(0,0,413,583)},{key:"a7",title:"A7 (74 mm x 105 mm)",format:new mxRectangle(0,0,291,413)},{key:"custom",title:mxResources.get("custom"),format:null}]}; +PageSetupDialog.addUnitPanel=function(a,c,d){var b=document.createElement("select");b.style.marginBottom="8px";b.style.width="202px";for(var f=PageSetupDialog.getUnits(),e=0;e<f.length;e++){var h=f[e],g=document.createElement("option");g.setAttribute("value",h.unit);mxUtils.write(g,mxResources.get(h.key,null,h.title));b.appendChild(g)}a.appendChild(b);b.value=c;null!=d&&mxEvent.addListener(b,"change",function(a){d(parseInt(b.value))});return b}; +PageSetupDialog.getUnits=function(){return[{key:"pixel",title:"Pixel",unit:mxConstants.PIXELS},{key:"inch",title:"Inch",unit:mxConstants.INCHES},{key:"cm",title:"CM",unit:mxConstants.CENTIMETERS}]}; (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= @@ -2098,13 +2101,13 @@ d="url("+this.gridImage+")";var f=c=0;null!=a.view.backgroundPageShape&&(f=this. 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 g=e*b;d.push("M 0 "+g+" L "+c+" "+g+" M "+g+" 0 L "+g+" "+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,u=a?Math.ceil(b/k.width)-1:0,q=h.x+b,z=h.y+c;null==this.horizontalPageBreaks&&0<l&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<u&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var b=a==this.horizontalPageBreaks?l:u,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(q),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(z))];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)}; +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,u=a?Math.ceil(b/k.width)-1:0,r=h.x+b,x=h.y+c;null==this.horizontalPageBreaks&&0<l&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<u&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var b=a==this.horizontalPageBreaks?l:u,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(r),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(x))];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,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= +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),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= 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();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= @@ -2113,17 +2116,17 @@ mxEvent.getSource(a);if("A"==b.nodeName)for(;null!=b;){if("geHint"==b.className) 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?(e=!0,this.hoverIcons.reset(),b.container.style.cursor="move",b.isEditing()||mxEvent.getSource(a)!=b.container||mxEvent.consume(a)):mxEvent.isConsumed(a)||27!=a.keyCode||this.hideDialog(null,!0)});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(a){b.container.style.cursor="";e=!1});mxEvent.addListener(document,"keyup",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=!1,m=null,p=null,n=null,t=mxUtils.bind(this,function(){if(null!=this.toolbar&&l!=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==n)this.toolbar.createTextToolbar();else{for(var e=0;e<n.length;e++)this.toolbar.container.appendChild(n[e]);this.toolbar.fontMenu= -m;this.toolbar.sizeMenu=p}l=b.cellEditor.isContentEditing();m=a;p=d;n=c}}),r=this,w=b.cellEditor.startEditing;b.cellEditor.startEditing=function(){w.apply(this,arguments);t();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!=r.toolbar)){var d=c.fontFamily;"'"==d.charAt(0)&&(d=d.substring(1));"'"==d.charAt(d.length- -1)&&(d=d.substring(0,d.length-1));r.toolbar.setFontName(d);r.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 v=b.cellEditor.stopEditing;b.cellEditor.stopEditing=function(a,b){v.apply(this,arguments);t()};b.container.setAttribute("tabindex","0");b.container.style.cursor= +mxClient.IS_SF&&mxEvent.isShiftDown(a))};var l=!1,m=null,n=null,p=null,q=mxUtils.bind(this,function(){if(null!=this.toolbar&&l!=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==p)this.toolbar.createTextToolbar();else{for(var e=0;e<p.length;e++)this.toolbar.container.appendChild(p[e]);this.toolbar.fontMenu= +m;this.toolbar.sizeMenu=n}l=b.cellEditor.isContentEditing();m=a;n=d;p=c}}),v=this,w=b.cellEditor.startEditing;b.cellEditor.startEditing=function(){w.apply(this,arguments);q();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 t=b.cellEditor.stopEditing;b.cellEditor.stopEditing=function(a,b){t.apply(this,arguments);q()};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 u=b.fireMouseEvent;b.fireMouseEvent=function(a,b,c){a==mxEvent.MOUSE_DOWN&&this.container.focus();u.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 q="rounded shadow glass dashed dashPattern comic labelBackgroundColor".split(" "),z="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=[],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(B){this.handleError(B)}};this.clearDefaultStyle=function(){b.currentEdgeStyle=mxUtils.clone(b.defaultEdgeStyle);b.currentVertexStyle=mxUtils.clone(b.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged", -"keys",[],"values",[],"cells",[]))};var y=["fontFamily","fontSize","fontColor"],E="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),A=["startArrow startFill startSize sourcePerimeterSpacing endArrow endFill endSize targetPerimeterSpacing".split(" "),["strokeColor","strokeWidth"],["fillColor","gradientColor"],y,["opacity"],["align"],["html"]];for(a=0;a<A.length;a++)for(c=0;c<A[a].length;c++)q.push(A[a][c]);for(a=0;a<z.length;a++)0>mxUtils.indexOf(q,z[a])&&q.push(z[a]); -var D=function(a,c){var d=b.getModel();d.beginUpdate();try{if(c)for(var e=d.isEdge(k),f=e?b.currentEdgeStyle:b.currentVertexStyle,e=["fontSize","fontFamily","fontColor"],g=0;g<e.length;g++){var h=f[e[g]];null!=h&&b.setCellStyles(e[g],h,a)}else for(h=0;h<a.length;h++){for(var k=a[h],l=d.getStyle(k),m=null!=l?l.split(";"):[],B=q.slice(),g=0;g<m.length;g++){var p=m[g],C=p.indexOf("=");if(0<=C){var n=p.substring(0,C),r=mxUtils.indexOf(B,n);0<=r&&B.splice(r,1);for(var t=0;t<A.length;t++){var F=A[t];if(0<= -mxUtils.indexOf(F,n))for(var v=0;v<F.length;v++){var w=mxUtils.indexOf(B,F[v]);0<=w&&B.splice(w,1)}}}}for(var f=(e=d.isEdge(k))?b.currentEdgeStyle:b.currentVertexStyle,u=d.getStyle(k),g=0;g<B.length;g++){var n=B[g],D=f[n];null==D||"shape"==n&&!e||e&&!(0>mxUtils.indexOf(z,n))||(u=mxUtils.setStyle(u,n,D))}d.setStyle(k,u)}}finally{d.endUpdate()}};b.addListener("cellsInserted",function(a,b){D(b.getProperty("cells"))});b.addListener("textInserted",function(a,b){D(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"));D(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(y,d[g]);if("strokeColor"!=d[g]||null!=h[g]&&"none"!= -h[g])if(0<=mxUtils.indexOf(z,d[g]))f||0<=mxUtils.indexOf(E,d[g])?null==h[g]?delete b.currentEdgeStyle[d[g]]:b.currentEdgeStyle[d[g]]=h[g]:e&&0<=mxUtils.indexOf(q,d[g])&&(null==h[g]?delete b.currentVertexStyle[d[g]]:b.currentVertexStyle[d[g]]=h[g]);else if(0<=mxUtils.indexOf(q,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(E,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|| +this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};var r="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=[],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 y=["fontFamily","fontSize","fontColor"],D="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),z=["startArrow startFill startSize sourcePerimeterSpacing endArrow endFill endSize targetPerimeterSpacing".split(" "),["strokeColor","strokeWidth"],["fillColor","gradientColor"],y,["opacity"],["align"],["html"]];for(a=0;a<z.length;a++)for(c=0;c<z[a].length;c++)r.push(z[a][c]);for(a=0;a<x.length;a++)0>mxUtils.indexOf(r,x[a])&&r.push(x[a]); +var E=function(a,c){var d=b.getModel();d.beginUpdate();try{if(c)for(var e=d.isEdge(k),f=e?b.currentEdgeStyle:b.currentVertexStyle,e=["fontSize","fontFamily","fontColor"],g=0;g<e.length;g++){var h=f[e[g]];null!=h&&b.setCellStyles(e[g],h,a)}else for(h=0;h<a.length;h++){for(var k=a[h],l=d.getStyle(k),m=null!=l?l.split(";"):[],n=r.slice(),g=0;g<m.length;g++){var C=m[g],A=C.indexOf("=");if(0<=A){var L=C.substring(0,A),p=mxUtils.indexOf(n,L);0<=p&&n.splice(p,1);for(var v=0;v<z.length;v++){var q=z[v];if(0<= +mxUtils.indexOf(q,L))for(var t=0;t<q.length;t++){var F=mxUtils.indexOf(n,q[t]);0<=F&&n.splice(F,1)}}}}for(var f=(e=d.isEdge(k))?b.currentEdgeStyle:b.currentVertexStyle,w=d.getStyle(k),g=0;g<n.length;g++){var L=n[g],u=f[L];null==u||"shape"==L&&!e||e&&!(0>mxUtils.indexOf(x,L))||(w=mxUtils.setStyle(w,L,u))}d.setStyle(k,w)}}finally{d.endUpdate()}};b.addListener("cellsInserted",function(a,b){E(b.getProperty("cells"))});b.addListener("textInserted",function(a,b){E(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"));E(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(y,d[f]);if("strokeColor"!=d[f]||null!=h[f]&&"none"!= +h[f])if(0<=mxUtils.indexOf(x,d[f]))g||0<=mxUtils.indexOf(D,d[f])?null==h[f]?delete b.currentEdgeStyle[d[f]]:b.currentEdgeStyle[d[f]]=h[f]:e&&0<=mxUtils.indexOf(r,d[f])&&(null==h[f]?delete b.currentVertexStyle[d[f]]:b.currentVertexStyle[d[f]]=h[f]);else if(0<=mxUtils.indexOf(r,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(D,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||"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= @@ -2145,31 +2148,31 @@ EditorUi.prototype.updatePasteActionStates=function(){var a=this.editor.graph,c= 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()};var d=mxClipboard.copy;mxClipboard.copy=function(b){b.cellEditor.isContentEditing()?document.execCommand("copy",!1,null):d.apply(this,arguments);a.updatePasteActionStates()};var b=mxClipboard.paste;mxClipboard.paste=function(c){var d=null;c.cellEditor.isContentEditing()?document.execCommand("paste", !1,null):d=b.apply(this,arguments);a.updatePasteActionStates();return d};var f=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){f.apply(this,arguments);a.updatePasteActionStates()};var e=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(b,c){e.apply(this,arguments);a.updatePasteActionStates()};this.updatePasteActionStates()};EditorUi.prototype.lazyZoomDelay=20; EditorUi.prototype.initCanvas=function(){var a=this.editor.graph;a.timerAutoScroll=!0;a.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((a.container.offsetWidth-34)/a.view.scale)),Math.max(0,Math.round((a.container.offsetHeight-34)/a.view.scale)))};a.view.getBackgroundPageBounds=function(){var a=this.graph.getPageLayout(),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){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,p=mxClient.IS_QUIRKS||8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)p+=3;var B=a.container.offsetWidth-p,p=a.container.offsetHeight-p;b=b?Math.max(.3,Math.min(c||1,B/l.width)):k;c=(B-b*l.width)/2/b;var I=0==this.lightboxVerticalDivider?0:(p-b*l.height)/this.lightboxVerticalDivider/b;f&&(c=Math.max(c,0),I=Math.max(I,0));if(f||g.width<B||g.height<p)a.view.scaleAndTranslate(b, -Math.floor(c-l.x),Math.floor(I-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", +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){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 C=0==this.lightboxVerticalDivider?0:(n-b*l.height)/this.lightboxVerticalDivider/b;g&&(c=Math.max(c,0),C=Math.max(C,0));if(g||f.width<p||f.height<n)a.view.scaleAndTranslate(b, +Math.floor(c-l.x),Math.floor(C-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="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); 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!=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))});g.style.paddingLeft="0px"; -g.style.paddingRight="4px";l.style.paddingLeft="4px";l.style.paddingRight="0px";var p=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(l.style.display="",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",p);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 n=null,t=null,r=mxUtils.bind(this,function(a){null!=n&&(window.clearTimeout(n), -fadeThead=null);null!=t&&(window.clearTimeout(t),fadeThead2=null);n=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);n=null;t=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";t=null}),600)}),a||200)}),w=mxUtils.bind(this,function(a){null!=n&&(window.clearTimeout(n),fadeThead=null);null!=t&&(window.clearTimeout(t),fadeThead2=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,a|| -30)});if("1"==urlParams.layers){this.layersDialog=null;var v=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=v.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius", +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,v=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)}),w=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 t=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=t.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")),u=a.getModel();u.addListener(mxEvent.CHANGE,function(){v.style.display=1<u.getChildCount(u.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(p=0;p<this.lightboxToolbarActions.length;p++){var q=this.lightboxToolbarActions[p];e(q.fn,q.icon,q.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&& +this.layersDialog.style.zIndex=c.zIndex;document.body.appendChild(this.layersDialog)}mxEvent.consume(b)}),Editor.layersLargeImage,mxResources.get("layers")),u=a.getModel();u.addListener(mxEvent.CHANGE,function(){t.style.display=1<u.getChildCount(u.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 r=this.lightboxToolbarActions[n];e(r.fn,r.icon,r.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";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)||w(30),r())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(a){mxEvent.consume(a)}); -mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?r():w(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?r():w(100);mxEvent.consume(a)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||w(30)}));var z=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)<z&&Math.abs(this.scrollTop-a.container.scrollTop)<z&&Math.abs(this.startX-c.getGraphX())<z&&Math.abs(this.startY-c.getGraphY())<z&&(0<parseFloat(d.chromelessToolbar.style.opacity||0)?r():w(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var y= -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}y.apply(this,arguments)};var E=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?E.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()))}}a.updateZoomTimeout=null;a.cumulativeZoomFactor=1;var A=null;a.lazyZoom=function(b){null!=this.updateZoomTimeout&&window.clearTimeout(this.updateZoomTimeout);b?.15>this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor=(this.view.scale+.01)/this.view.scale:(this.cumulativeZoomFactor*=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor* +mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");a.container.appendChild(this.chromelessToolbar);mxEvent.addListener(a.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(mxEvent.isShiftDown(a)||w(30),v())}));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)?v():w(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?v():w(100);mxEvent.consume(a)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||w(30)}));var x=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)<x&&Math.abs(this.scrollTop-a.container.scrollTop)<x&&Math.abs(this.startX-c.getGraphX())<x&&Math.abs(this.startY-c.getGraphY())<x&&(0<parseFloat(d.chromelessToolbar.style.opacity||0)?v():w(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var y= +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}y.apply(this,arguments)};var D=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),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?D.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()))}}a.updateZoomTimeout=null;a.cumulativeZoomFactor=1;var z=null;a.lazyZoom=function(b){null!=this.updateZoomTimeout&&window.clearTimeout(this.updateZoomTimeout);b?.15>this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor=(this.view.scale+.01)/this.view.scale:(this.cumulativeZoomFactor*=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor* 20)/20/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor=(this.view.scale-.01)/this.view.scale:(this.cumulativeZoomFactor/=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale);this.cumulativeZoomFactor=Math.max(.01,Math.min(this.view.scale*this.cumulativeZoomFactor,160)/this.view.scale);this.updateZoomTimeout=window.setTimeout(mxUtils.bind(this,function(){var b=mxUtils.getOffset(a.container), -e=0,g=0;null!=A&&(e=a.container.offsetWidth/2-A.x+b.x,g=a.container.offsetHeight/2-A.y+b.y);b=this.view.scale;this.zoom(this.cumulativeZoomFactor);this.view.scale!=b&&(null!=c&&d.chromelessResize(!1,null,e*(this.cumulativeZoomFactor-1),g*(this.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(a.container)||0==e&&0==g||(a.container.scrollLeft-=e*(this.cumulativeZoomFactor-1),a.container.scrollTop-=g*(this.cumulativeZoomFactor-1)));this.cumulativeZoomFactor=1;this.updateZoomTimeout=null}),this.lazyZoomDelay)}; -mxEvent.addMouseWheelListener(mxUtils.bind(this,function(b,c){if((null==this.dialogs||0==this.dialogs.length)&&a.isZoomWheelEvent(b))for(var d=mxEvent.getSource(b);null!=d;){if(d==a.container)return A=new mxPoint(mxEvent.getClientX(b),mxEvent.getClientY(b)),a.lazyZoom(c),mxEvent.consume(b),!1;d=d.parentNode}}),a.container)};EditorUi.prototype.addChromelessToolbarItems=function(a){a(mxUtils.bind(this,function(a){this.actions.get("print").funct();mxEvent.consume(a)}),Editor.printLargeImage,mxResources.get("print"))}; +e=0,f=0;null!=z&&(e=a.container.offsetWidth/2-z.x+b.x,f=a.container.offsetHeight/2-z.y+b.y);b=this.view.scale;this.zoom(this.cumulativeZoomFactor);this.view.scale!=b&&(null!=c&&d.chromelessResize(!1,null,e*(this.cumulativeZoomFactor-1),f*(this.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(a.container)||0==e&&0==f||(a.container.scrollLeft-=e*(this.cumulativeZoomFactor-1),a.container.scrollTop-=f*(this.cumulativeZoomFactor-1)));this.cumulativeZoomFactor=1;this.updateZoomTimeout=null}),this.lazyZoomDelay)}; +mxEvent.addMouseWheelListener(mxUtils.bind(this,function(b,c){if((null==this.dialogs||0==this.dialogs.length)&&a.isZoomWheelEvent(b))for(var d=mxEvent.getSource(b);null!=d;){if(d==a.container)return z=new mxPoint(mxEvent.getClientX(b),mxEvent.getClientY(b)),a.lazyZoom(c),mxEvent.consume(b),!1;d=d.parentNode}}),a.container)};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")))}; EditorUi.prototype.lightboxFit=function(a){if(this.isDiagramEmpty())this.editor.graph.view.setScale(1);else{var c=urlParams.border,d=60;null!=c&&(d=parseInt(c));this.editor.graph.maxFitScale=this.lightboxMaxFitScale;this.editor.graph.fit(d,null,null,null,null,null,a);this.editor.graph.maxFitScale=null}};EditorUi.prototype.isDiagramEmpty=function(){var a=this.editor.graph.getModel();return 1==a.getChildCount(a.root)&&0==a.getChildCount(a.getChildAt(a.root,0))}; @@ -2218,7 +2221,7 @@ EditorUi.prototype.createSidebar=function(a){return new Sidebar(this,a)};EditorU 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,p,n){a=new ErrorDialog(this,a,c,d||mxResources.get("ok"),b,f,e,h,p,g,k);c=Math.ceil(null!=c?c.length/50:1);this.showDialog(a.container,l||340,m||100+20*c,!0,!1,n);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.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(),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})}; @@ -2233,8 +2236,8 @@ EditorUi.prototype.showDataDialog=function(a){null!=a&&(a=new EditDataDialog(thi 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 e= -b.getSelectionCell(),g=b.model.getParent(e),f=null,1==b.getSelectionCount()&&b.model.isVertex(e)&&null!=b.layoutManager&&!b.isCellLocked(e)&&(f=b.layoutManager.getLayout(g)),null!=f&&f.constructor==mxStackLayout?(f=g.getIndex(e),37==a||38==a?b.model.add(g,e,Math.max(0,f-1)):39!=a&&40!=a||b.model.add(g,e,Math.min(b.model.getChildCount(g),f+1))):(g=e=0,37==a?e=-c:38==a?g=-c:39==a?e=c:40==a&&(g=c),b.moveCells(b.getMovableCells(b.getSelectionCells()),e,g))});null!=g&&window.clearTimeout(g);g=window.setTimeout(function(){if(0< +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 e= +b.getSelectionCell(),f=b.model.getParent(e),g=null,1==b.getSelectionCount()&&b.model.isVertex(e)&&null!=b.layoutManager&&!b.isCellLocked(e)&&(g=b.layoutManager.getLayout(f)),null!=g&&g.constructor==mxStackLayout?(g=f.getIndex(e),37==a||38==a?b.model.add(f,e,Math.max(0,g-1)):39!=a&&40!=a||b.model.add(f,e,Math.min(b.model.getChildCount(f),g+1))):(f=e=0,37==a?e=-c:38==a?f=-c:39==a?e=c:40==a&&(f=c),b.moveCells(b.getMovableCells(b.getSelectionCells()),e,f))});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()}b.scrollCellToVisible(b.getSelectionCell())}},200)}var d=this,b=this.editor.graph,f=new mxKeyHandler(b),e=f.isEventIgnored;f.isEventIgnored=function(a){return(!this.isControlDown(a)||mxEvent.isShiftDown(a)||90!=a.keyCode&&89!=a.keyCode&&188!=a.keyCode&&190!=a.keyCode&&85!=a.keyCode)&&(66!=a.keyCode&&73!=a.keyCode||!this.isControlDown(a)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&& !mxClient.IS_SF)&&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 mxEvent.isShiftDown(a)?function(){b.selectParentCell()}:function(){b.selectChildCell()};if(null!=k[a.keyCode]&&!b.isSelectionEmpty())if(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&& @@ -2263,20 +2266,20 @@ Sidebar.prototype.showTooltip=function(a,c,d,b,f,e){if(this.enableTooltips&&this 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 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";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),l=this.tooltipTitle.offsetHeight+ -10,g+=l,mxClient.IS_SVG?this.tooltipTitle.style.marginTop=2-l+"px":(g-=6,this.tooltipTitle.style.top=g-l+"px")):null!=this.tooltipTitle&&null!=this.tooltipTitle.parentNode&&(this.tooltipTitle.style.display="none");this.tooltip.style.height=g+"px";var l=-Math.round(h.x-this.tooltipBorder),h=-Math.round(h.y-this.tooltipBorder),m=document.body,p=document.documentElement,n=this.getTooltipOffset(),t=this.container.clientWidth+this.editorUi.splitSize+3+this.editorUi.container.offsetLeft+n.x,g=Math.min(Math.max(m.clientHeight|| -0,p.clientHeight)-g-20,Math.max(0,this.editorUi.container.offsetTop+this.container.offsetTop+a.offsetTop-this.container.scrollTop-g/2+16))+n.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=t+"px";this.tooltip.style.top=g+"px"});null!=this.tooltip&& +10,g+=l,mxClient.IS_SVG?this.tooltipTitle.style.marginTop=2-l+"px":(g-=6,this.tooltipTitle.style.top=g-l+"px")):null!=this.tooltipTitle&&null!=this.tooltipTitle.parentNode&&(this.tooltipTitle.style.display="none");this.tooltip.style.height=g+"px";var l=-Math.round(h.x-this.tooltipBorder),h=-Math.round(h.y-this.tooltipBorder),m=document.body,n=document.documentElement,p=this.getTooltipOffset(),q=this.container.clientWidth+this.editorUi.splitSize+3+this.editorUi.container.offsetLeft+p.x,g=Math.min(Math.max(m.clientHeight|| +0,n.clientHeight)-g-20,Math.max(0,this.editorUi.container.offsetTop+this.container.offsetTop+a.offsetTop-this.container.scrollTop-g/2+16))+p.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=q+"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.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 p=l.entries;a=[];for(var n=0;n<p.length;n++)if(l=p[n],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, +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 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";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,p=!1,n=0,t={},r=12,w=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="",w());f.focus()});h=mxUtils.bind(this,function(){r=4*Math.max(1, -Math.floor(this.container.clientWidth/(this.thumbWidth+10)));this.hideTooltip();if(""!=f.value){if(null!=g.parentNode&&(l!=f.value&&(w(),l=f.value,t={},p=!1,n=0),!m&&!p)){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,r,n,mxUtils.bind(this,function(b,c,e,f){if(this.currentSearch==a){b=null!=b?b:[];m=!1;n++;this.insertSearchHint(d,l,r,n,b,c,e,f);null!=g.parentNode&&g.parentNode.removeChild(g); -for(c=0;c<b.length;c++)try{var h=b[c]();null==t[h.innerHTML]&&(t[h.innerHTML]="1",d.appendChild(h))}catch(A){}e?(k.removeAttribute("disabled"),k.innerHTML=mxResources.get("moreResults")):(k.innerHTML=mxResources.get("reset"),k.style.display="none",p=!0);k.style.cursor="";d.appendChild(g)}}),mxUtils.bind(this,function(){k.style.cursor=""}))}}else w(),l=f.value="",t={},k.style.display="none",p=!1,f.focus()});mxEvent.addListener(f,"keydown",mxUtils.bind(this,function(a){13==a.keyCode&&(h(),mxEvent.consume(a))})); -mxEvent.addListener(f,"focus",function(){f.style.paddingRight=""});mxEvent.addListener(f,"blur",function(){f.style.paddingRight="20px"});f.style.paddingRight="20px";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?(p=!0,k.style.display="none"):f.value!=l?(k.style.display= -"none",p=!1):m||(k.style.display=p?"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]}; +d.appendChild(g);var l="",m=!1,n=!1,p=0,q={},v=12,w=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="",w());f.focus()});h=mxUtils.bind(this,function(){v=4*Math.max(1, +Math.floor(this.container.clientWidth/(this.thumbWidth+10)));this.hideTooltip();if(""!=f.value){if(null!=g.parentNode&&(l!=f.value&&(w(),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,v,p,mxUtils.bind(this,function(b,c,e,f){if(this.currentSearch==a){b=null!=b?b:[];m=!1;p++;this.insertSearchHint(d,l,v,p,b,c,e,f);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(z){}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 w(),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,"focus",function(){f.style.paddingRight=""});mxEvent.addListener(f,"blur",function(){f.style.paddingRight="20px"});f.style.paddingRight="20px";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;", @@ -2332,11 +2335,12 @@ a.geometry.width,a.geometry.height,"Component with Attributes")}),this.createVer new mxGeometry(0,0,140,60),"verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;");a.vertex=!0;return c.createVertexTemplateFromCells([a.clone()],a.geometry.width,a.geometry.height,"Class 3")}),this.addEntry("uml static class object instance",function(){var a=new mxCell('<p style="margin:0px;margin-top:4px;text-align:center;"><b>Class</b></p><hr size="1"/><div style="height:2px;"></div><hr size="1"/><div style="height:2px;"></div>',new mxGeometry(0,0,140,60),"verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;"); a.vertex=!0;return c.createVertexTemplateFromCells([a.clone()],a.geometry.width,a.geometry.height,"Class 4")}),this.addEntry("uml static class object instance",function(){var a=new mxCell('<p style="margin:0px;margin-top:4px;text-align:center;"><b>Class</b></p><hr size="1"/><p style="margin:0px;margin-left:4px;">+ field: Type</p><hr size="1"/><p style="margin:0px;margin-left:4px;">+ method(): Type</p>',new mxGeometry(0,0,160,90),"verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;"); a.vertex=!0;return c.createVertexTemplateFromCells([a.clone()],a.geometry.width,a.geometry.height,"Class 5")}),this.addEntry("uml static class object instance",function(){var a=new mxCell('<p style="margin:0px;margin-top:4px;text-align:center;"><i><<Interface>></i><br/><b>Interface</b></p><hr size="1"/><p style="margin:0px;margin-left:4px;">+ field1: Type<br/>+ field2: Type</p><hr size="1"/><p style="margin:0px;margin-left:4px;">+ method1(Type): Type<br/>+ method2(Type, Type): Type</p>', -new mxGeometry(0,0,190,140),"verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;");a.vertex=!0;return c.createVertexTemplateFromCells([a.clone()],a.geometry.width,a.geometry.height,"Interface 2")}),this.createVertexTemplateEntry("shape=providedRequiredInterface;html=1;verticalLabelPosition=bottom;",20,20,"","Provided/Required Interface",null,null,"uml static class provided required interface"),this.createVertexTemplateEntry("shape=requiredInterface;html=1;verticalLabelPosition=bottom;", -10,20,"","Required Interface",null,null,"uml static class required interface"),this.createVertexTemplateEntry("shape=umlBoundary;whiteSpace=wrap;html=1;",100,80,"Boundary Object","Boundary Object",null,null,"uml boundary object"),this.createVertexTemplateEntry("ellipse;shape=umlEntity;whiteSpace=wrap;html=1;",80,80,"Entity Object","Entity Object",null,null,"uml entity object"),this.createVertexTemplateEntry("ellipse;shape=umlControl;whiteSpace=wrap;html=1;",70,80,"Control Object","Control Object", -null,null,"uml control object"),this.createVertexTemplateEntry("shape=umlActor;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;html=1;",30,60,"Actor","Actor",!1,null,"uml actor"),this.createVertexTemplateEntry("ellipse;whiteSpace=wrap;html=1;",140,70,"Use Case","Use Case",null,null,"uml use case usecase"),this.addEntry("uml activity state start",function(){var a=new mxCell("",new mxGeometry(0,0,30,30),"ellipse;html=1;shape=startState;fillColor=#000000;strokeColor=#ff0000;"); -a.vertex=!0;var b=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;html=1;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;");b.geometry.setTerminalPoint(new mxPoint(15,90),!1);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!0);return c.createVertexTemplateFromCells([a,b],30,90,"Start")}),this.addEntry("uml activity state",function(){var a=new mxCell("Activity",new mxGeometry(0,0,120,40),"rounded=1;whiteSpace=wrap;html=1;arcSize=40;fontColor=#000000;fillColor=#ffffc0;strokeColor=#ff0000;"); -a.vertex=!0;var b=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;html=1;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;");b.geometry.setTerminalPoint(new mxPoint(60,100),!1);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!0);return c.createVertexTemplateFromCells([a,b],120,100,"Activity")}),this.addEntry("uml activity composite state",function(){var a=new mxCell("Composite State",new mxGeometry(0,0,160,60),"swimlane;html=1;fontStyle=1;align=center;verticalAlign=middle;childLayout=stackLayout;horizontal=1;startSize=30;horizontalStack=0;resizeParent=0;resizeLast=1;container=0;fontColor=#000000;collapsible=0;rounded=1;arcSize=30;strokeColor=#ff0000;fillColor=#ffffc0;swimlaneFillColor=#ffffc0;"); +new mxGeometry(0,0,190,140),"verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;");a.vertex=!0;return c.createVertexTemplateFromCells([a.clone()],a.geometry.width,a.geometry.height,"Interface 2")}),this.createVertexTemplateEntry("shape=providedRequiredInterface;html=1;verticalLabelPosition=bottom;",20,20,"","Provided Required Interface",null,null,"uml provided required interface lollipop"),this.createVertexTemplateEntry("shape=requiredInterface;html=1;verticalLabelPosition=bottom;", +10,20,"","Required Interface",null,null,"uml required interface lollipop"),this.addEntry("uml lollipop provided required interface",function(){return c.createVertexTemplateFromData("zVTBTuMwEP0aH0FpQrnTlLKHRULiAHv0JpPE4GSiybRN+HrGsWka0QoOaLWWIuW9mfFo3rOtkrTu70i31T3mYFVyq5KUENn/1X0K1qo4MrlK1iqOI/lUvDkTXYzRqNUEDX+nIPYFO2234BlPdDzYQBBumxxcfqSSFRJXWGKj7W/EVsiFkC/APDyaN1eht4xCVVzbEIUmvyHCvcAGG/DMxlgbtvQdIS9hNgRrKiEMcfV5rjErDHUHWAPTICkEVrPZzbfSnYflIe9Q+oBGdpxSOtxSBoGdhJOfozYTNcp5Wtrk30pbaVukhjL7WWDRjIZnBy6XH/DPHK7749z1cEB56H0tqGPCV3gyOVeh/39hXR8aRfOKn3Py6msnpcC0nZN+XxmGx1ZnLrKXiz13rMCGN7o21kn8C+wO2GQ6BILWizjgFC3S2CCJxiW8tqZshMtETqCDK6dSCzkCR3wxLuFbp8mo0nKllmu3addC5twpTO/O44qgM2/67zjedEd3QAz92afmjK8fBUtfMXh4EeA+HCeXERyswJQVz7lT52Bm6eSfwOkB9XYfv6/v", +50,20,"Lollipop Notation")}),this.createVertexTemplateEntry("shape=umlBoundary;whiteSpace=wrap;html=1;",100,80,"Boundary Object","Boundary Object",null,null,"uml boundary object"),this.createVertexTemplateEntry("ellipse;shape=umlEntity;whiteSpace=wrap;html=1;",80,80,"Entity Object","Entity Object",null,null,"uml entity object"),this.createVertexTemplateEntry("ellipse;shape=umlControl;whiteSpace=wrap;html=1;",70,80,"Control Object","Control Object",null,null,"uml control object"),this.createVertexTemplateEntry("shape=umlActor;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;html=1;", +30,60,"Actor","Actor",!1,null,"uml actor"),this.createVertexTemplateEntry("ellipse;whiteSpace=wrap;html=1;",140,70,"Use Case","Use Case",null,null,"uml use case usecase"),this.addEntry("uml activity state start",function(){var a=new mxCell("",new mxGeometry(0,0,30,30),"ellipse;html=1;shape=startState;fillColor=#000000;strokeColor=#ff0000;");a.vertex=!0;var b=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;html=1;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;"); +b.geometry.setTerminalPoint(new mxPoint(15,90),!1);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!0);return c.createVertexTemplateFromCells([a,b],30,90,"Start")}),this.addEntry("uml activity state",function(){var a=new mxCell("Activity",new mxGeometry(0,0,120,40),"rounded=1;whiteSpace=wrap;html=1;arcSize=40;fontColor=#000000;fillColor=#ffffc0;strokeColor=#ff0000;");a.vertex=!0;var b=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;html=1;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;"); +b.geometry.setTerminalPoint(new mxPoint(60,100),!1);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!0);return c.createVertexTemplateFromCells([a,b],120,100,"Activity")}),this.addEntry("uml activity composite state",function(){var a=new mxCell("Composite State",new mxGeometry(0,0,160,60),"swimlane;html=1;fontStyle=1;align=center;verticalAlign=middle;childLayout=stackLayout;horizontal=1;startSize=30;horizontalStack=0;resizeParent=0;resizeLast=1;container=0;fontColor=#000000;collapsible=0;rounded=1;arcSize=30;strokeColor=#ff0000;fillColor=#ffffc0;swimlaneFillColor=#ffffc0;"); a.vertex=!0;var b=new mxCell("Subtitle",new mxGeometry(0,0,200,26),"text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;spacingLeft=4;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;fontColor=#000000;");b.vertex=!0;a.insert(b);b=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;html=1;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;");b.geometry.setTerminalPoint(new mxPoint(80,120),!1);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b, !0);return c.createVertexTemplateFromCells([a,b],160,120,"Composite State")}),this.addEntry("uml activity condition",function(){var a=new mxCell("Condition",new mxGeometry(0,0,80,40),"rhombus;whiteSpace=wrap;html=1;fillColor=#ffffc0;strokeColor=#ff0000;");a.vertex=!0;var b=new mxCell("no",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;html=1;align=left;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;");b.geometry.setTerminalPoint(new mxPoint(180,20),!1);b.geometry.relative= !0;b.geometry.x=-1;b.edge=!0;a.insertEdge(b,!0);var d=new mxCell("yes",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;html=1;align=left;verticalAlign=top;endArrow=open;endSize=8;strokeColor=#ff0000;");d.geometry.setTerminalPoint(new mxPoint(40,100),!1);d.geometry.relative=!0;d.geometry.x=-1;d.edge=!0;a.insertEdge(d,!0);return c.createVertexTemplateFromCells([a,b,d],180,100,"Condition")}),this.addEntry("uml activity fork join",function(){var a=new mxCell("",new mxGeometry(0,0,200,10),"shape=line;html=1;strokeWidth=6;strokeColor=#ff0000;"); @@ -2387,42 +2391,42 @@ Sidebar.prototype.createItem=function(a,c,d,b,f,e,h){var g=document.createElemen 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.view.getState(k),m=null!=l?l.style:d.getCellStyle(c[g]);d.getModel().setStyle(k,e);if(null!=l&&"1"==mxUtils.getValue(l.style,"composite","0"))for(var p=d.model.getChildCount(k);0<=p;p--)d.model.remove(d.model.getChildAt(k,p));if(null!=m)for("umlLifeline"==m[mxConstants.STYLE_SHAPE]&&"umlLifeline"!=b[mxConstants.STYLE_SHAPE]&&(d.setCellStyles(mxConstants.STYLE_SHAPE,"umlLifeline",[k]),d.setCellStyles("participant",b[mxConstants.STYLE_SHAPE],[k])), -p=0;p<h.length;p++){var n=m[h[p]];null!=n&&d.setCellStyles(h[p],n,[k])}f.push(k)}}}finally{d.model.endUpdate()}return f}; +d.getModel().isEdge(k)==d.getModel().isEdge(a)){var l=d.view.getState(k),m=null!=l?l.style:d.getCellStyle(c[g]);d.getModel().setStyle(k,e);if(null!=l&&"1"==mxUtils.getValue(l.style,"composite","0"))for(var n=d.model.getChildCount(k);0<=n;n--)d.model.remove(d.model.getChildAt(k,n));if(null!=m)for("umlLifeline"==m[mxConstants.STYLE_SHAPE]&&"umlLifeline"!=b[mxConstants.STYLE_SHAPE]&&(d.setCellStyles(mxConstants.STYLE_SHAPE,"umlLifeline",[k]),d.setCellStyles("participant",b[mxConstants.STYLE_SHAPE],[k])), +n=0;n<h.length;n++){var p=m[h[n]];null!=p&&d.setCellStyles(h[n],p,[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 p=f.cloneCells(a);f.splitEdge(h,p,null,g-b.width/2,k-b.height/2);m=p}else 0<a.length&&(m=f.importCells(a,g,k,h));if(null!=f.layoutManager){var n=f.layoutManager.getLayout(h);if(null!=n){var t=f.view.scale,r=f.view.translate,w=(g+r.x)*t,v=(k+r.y)*t;for(h=0;h<m.length;h++)n.moveCell(m[h],w,v)}}!d||null!=e&&mxEvent.isShiftDown(e)||f.fireEvent(new mxEventObject("cellsInserted","cells",m))}catch(u){this.editorUi.handleError(u)}finally{f.model.endUpdate()}null!= +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,v=f.view.translate,w=(g+v.x)*q,t=(k+v.y)*q;for(h=0;h<m.length;h++)p.moveCell(m[h],w,t)}}!d||null!=e&&mxEvent.isShiftDown(e)||f.fireEvent(new mxEventObject("cellsInserted","cells",m))}catch(u){this.editorUi.handleError(u)}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]),p=g.model.getParent(a),n=!0;if(null!=g.layoutManager){var t=g.layoutManager.getLayout(p);if(null!=t&&t.constructor==mxStackLayout&&(n=!1,h=g.view.getState(p),null!=h)){var r=new mxPoint(h.x/g.view.scale-g.view.translate.x,h.y/g.view.scale-g.view.translate.y);e.x+= -r.x;e.y+=r.y;var w=e.getTerminalPoint(!1);null!=w&&(w.x+=r.x,w.y+=r.y)}}var v=m.x,u=m.y;g.model.isEdge(c[b])&&(u=v=0);var q=g.model.isEdge(a)||null!=l&&!l.relative&&n,h=c=g.importCells(c,e.x-(q?v:0),e.y-(q?u:0),q?p: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 z=g.getCellGeometry(c[b]);z.points=null;if(null!=z.getTerminalPoint(!1))z.setTerminalPoint(e.getTerminalPoint(!1),!1);else if(q&&g.model.isVertex(p)){var y= -g.view.getState(p),r=y.cell!=g.view.currentRoot?new mxPoint(y.x/g.view.scale-g.view.translate.x,y.y/g.view.scale-g.view.translate.y):new mxPoint(0,0);g.cellsMoved(c,r.x,r.y,null,null,!0)}}else m=g.getCellGeometry(c[b]),v=e.x-Math.round(m.x),u=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,v,u,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(E){this.editorUi.handleError(E)}finally{g.model.endUpdate()}g.editAfterInsert&&null!=f&&mxEvent.isMouseEvent(f)&&null!=k&&window.setTimeout(function(){g.startEditing(k)},0)}return h}; +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 v=new mxPoint(h.x/g.view.scale-g.view.translate.x,h.y/g.view.scale-g.view.translate.y);e.x+= +v.x;e.y+=v.y;var w=e.getTerminalPoint(!1);null!=w&&(w.x+=v.x,w.y+=v.y)}}var t=m.x,u=m.y;g.model.isEdge(c[b])&&(u=t=0);var r=g.model.isEdge(a)||null!=l&&!l.relative&&p,h=c=g.importCells(c,e.x-(r?t:0),e.y-(r?u:0),r?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 x=g.getCellGeometry(c[b]);x.points=null;if(null!=x.getTerminalPoint(!1))x.setTerminalPoint(e.getTerminalPoint(!1),!1);else if(r&&g.model.isVertex(n)){var y= +g.view.getState(n),v=y.cell!=g.view.currentRoot?new mxPoint(y.x/g.view.scale-g.view.translate.x,y.y/g.view.scale-g.view.translate.y):new mxPoint(0,0);g.cellsMoved(c,v.x,v.y,null,null,!0)}}else m=g.getCellGeometry(c[b]),t=e.x-Math.round(m.x),u=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,t,u,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(D){this.editorUi.handleError(D)}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.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),G=d):mxUtils.setOpacity(d,d==D?30:20));return c}for(var g=this.editorUi,k=g.editor.graph,l=null,m=null,p=this,n=0;n<b.length&&(null==m&&this.editorUi.editor.graph.model.isVertex(b[n])? -m=n:null==l&&this.editorUi.editor.graph.model.isEdge(b[n])&&null==this.editorUi.editor.graph.model.getTerminal(b[n],!0)&&(l=n),null==m||null==l);n++);var t=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!=u&&G==D){var h=a.isCellSelected(u.cell)?a.getSelectionCells():[u.cell],h=this.updateShapes(a.model.isEdge(u.cell)?b[0]:b[m],h);a.setSelectionCells(h)}else null!=b&&null!=G&&null!= -w&&G!=D?(h=a.model.isEdge(w.cell)||null==l?m:l,a.setSelectionCells(this.dropAndConnect(w.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){t.isActive()&&t.reset()});var r=t.mouseDown;t.mouseDown=function(a){mxEvent.isPopupTrigger(a)||mxEvent.isMultiTouchEvent(a)||(k.stopEditing(),r.apply(this,arguments))};var w=null,v=null,u=null,q=!1, -z=e(this.triangleUp,mxResources.get("connect")),y=e(this.triangleRight,mxResources.get("connect")),E=e(this.triangleDown,mxResources.get("connect")),A=e(this.triangleLeft,mxResources.get("connect")),D=e(this.refreshTarget,mxResources.get("replace")),F=null,J=e(this.roundDrop),M=e(this.roundDrop),K=mxConstants.DIRECTION_NORTH,G=null,L=t.createPreviewElement;t.createPreviewElement=function(a){var b=L.apply(this,arguments);mxClient.IS_SVG&&(b.style.pointerEvents="none");this.previewElementWidth=b.style.width; -this.previewElementHeight=b.style.height;return b};var O=t.dragEnter;t.dragEnter=function(a,b){null!=g.hoverIcons&&g.hoverIcons.setDisplay("none");O.apply(this,arguments)};var Q=t.dragExit;t.dragExit=function(a,b){null!=g.hoverIcons&&g.hoverIcons.setDisplay("");Q.apply(this,arguments)};t.dragOver=function(a,c){mxDragSource.prototype.dragOver.apply(this,arguments);null!=this.currentGuide&&null!=G&&this.currentGuide.hide();if(null!=this.previewElement){var d=a.view;if(null!=u&&G==D)this.previewElement.style.display= -a.model.isEdge(u.cell)?"none":"",this.previewElement.style.left=u.x+"px",this.previewElement.style.top=u.y+"px",this.previewElement.style.width=u.width+"px",this.previewElement.style.height=u.height+"px";else if(null!=w&&null!=G){var e=a.model.isEdge(w.cell)||null==l?m:l,g=p.getDropAndConnectGeometry(w.cell,b[e],K,b),h=a.model.isEdge(w.cell)?null:a.getCellGeometry(w.cell),k=a.getCellGeometry(b[e]),B=a.model.getParent(w.cell),C=d.translate.x*d.scale,I=d.translate.y*d.scale;null!=h&&!h.relative&&a.model.isVertex(B)&& -B!=d.currentRoot&&(I=d.getState(B),C=I.x,I=I.y);h=k.x;k=k.y;a.model.isEdge(b[e])&&(k=h=0);this.previewElement.style.left=(g.x-h)*d.scale+C+"px";this.previewElement.style.top=(g.y-k)*d.scale+I+"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!=t.currentHighlight.state&&a.model.isEdge(t.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 P=(new Date).getTime(),H=0,B=null,I=this.editorUi.editor.graph.getCellStyle(b[0]);t.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=G=null;B!=k?(B=k,P=(new Date).getTime(),H=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=k&&(this.updateThread=window.setTimeout(function(){null==G&&(B=k,t.getDropTarget(a,c,d,e))},this.dropTargetDelay+10))):H=(new Date).getTime()-P;if(2500>H&&null!=k&&!mxEvent.isShiftDown(e)&&(mxUtils.getValue(k.style,mxConstants.STYLE_SHAPE)!= -mxUtils.getValue(I,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(I,mxConstants.STYLE_SHAPE)||1500<H||a.model.isEdge(k.cell))&&H>this.dropTargetDelay&&(a.model.isVertex(k.cell)&&null!=m||a.model.isEdge(k.cell)&&a.model.isEdge(b[0]))){u= -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);D.style.left=Math.floor(l.x)+"px";D.style.top=Math.floor(l.y)+"px";null==F&&(a.container.appendChild(D),F=D.parentNode);h(c,d,l,D)}else null==u||!mxUtils.contains(u,c,d)||1500<H&&!mxEvent.isShiftDown(e)?(u=null,null!=F&&(D.parentNode.removeChild(D),F=null)):null!=u&&null!=F&& -(l=a.model.isEdge(u.cell)?a.view.getPoint(u):new mxPoint(u.getCenterX(),u.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,D));if(q&&null!=w&&!mxEvent.isAltDown(e)&&null==G){f=mxRectangle.fromRectangle(w);if(a.model.isEdge(w.cell)){var C=w.absolutePoints;null!=J.parentNode&&(l=C[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!=M.parentNode&&(C=C[C.length-1],f.add(h(c,d,new mxRectangle(C.x-this.roundDrop.width/2,C.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),M)))}else l=mxRectangle.fromRectangle(w),null!=w.shape&&null!=w.shape.boundingBox&&(l=mxRectangle.fromRectangle(w.shape.boundingBox)),l.grow(this.graph.tolerance),l.grow(HoverIcons.prototype.arrowSpacing),C=this.graph.selectionCellsHandler.getHandler(w.cell),null!=C&&(l.x-=C.horizontalOffset/2,l.y-=C.verticalOffset/2,l.width+=C.horizontalOffset, -l.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&&l.add(C.rotationShape.boundingBox)),f.add(h(c,d,new mxRectangle(w.getCenterX()-this.triangleUp.width/2,l.y-this.triangleUp.height,this.triangleUp.width,this.triangleUp.height),z)),f.add(h(c,d,new mxRectangle(l.x+l.width,w.getCenterY()-this.triangleRight.height/2,this.triangleRight.width,this.triangleRight.height), -y)),f.add(h(c,d,new mxRectangle(w.getCenterX()-this.triangleDown.width/2,l.y+l.height,this.triangleDown.width,this.triangleDown.height),E)),f.add(h(c,d,new mxRectangle(l.x-this.triangleLeft.width,w.getCenterY()-this.triangleLeft.height/2,this.triangleLeft.width,this.triangleLeft.height),A));null!=f&&f.grow(10)}K=mxConstants.DIRECTION_NORTH;G==y?K=mxConstants.DIRECTION_EAST:G==E||G==M?K=mxConstants.DIRECTION_SOUTH:G==A&&(K=mxConstants.DIRECTION_WEST);null!=u&&G==D&&(k=u);l=(null==m||a.isCellConnectable(b[m]))&& -(a.model.isEdge(g)&&null!=m||a.model.isVertex(g)&&a.isCellConnectable(g));if(null!=w&&5E3<=H||w!=k&&(null==f||!mxUtils.contains(f,c,d)||500<H&&null==G&&l))if(q=!1,w=5E3>H&&H>this.dropTargetDelay||a.model.isEdge(g)?k:null,null!=w&&l){f=[J,M,z,y,E,A];for(l=0;l<f.length;l++)null!=f[l].parentNode&&f[l].parentNode.removeChild(f[l]);a.model.isEdge(g)?(C=k.absolutePoints,null!=C&&(l=C[0],C=C[C.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",M.style.left=Math.floor(C.x-this.roundDrop.width/2)+"px",M.style.top=Math.floor(C.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(M))):(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),C=this.graph.selectionCellsHandler.getHandler(k.cell), -null!=C&&(l.x-=C.horizontalOffset/2,l.y-=C.verticalOffset/2,l.width+=C.horizontalOffset,l.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&&l.add(C.rotationShape.boundingBox)),z.style.left=Math.floor(k.getCenterX()-this.triangleUp.width/2)+"px",z.style.top=Math.floor(l.y-this.triangleUp.height)+"px",y.style.left=Math.floor(l.x+l.width)+"px",y.style.top= -Math.floor(k.getCenterY()-this.triangleRight.height/2)+"px",E.style.left=z.style.left,E.style.top=Math.floor(l.y+l.height)+"px",A.style.left=Math.floor(l.x-this.triangleLeft.width)+"px",A.style.top=y.style.top,"eastwest"!=k.style.portConstraint&&(a.container.appendChild(z),a.container.appendChild(E)),a.container.appendChild(y),a.container.appendChild(A));null!=k&&(v=a.selectionCellsHandler.getHandler(k.cell),null!=v&&null!=v.setHandlesVisible&&v.setHandlesVisible(!1));q=!0}else for(f=[J,M,z,y,E,A], -l=0;l<f.length;l++)null!=f[l].parentNode&&f[l].parentNode.removeChild(f[l]);q||null==v||v.setHandlesVisible(!0);g=mxEvent.isAltDown(e)&&!mxEvent.isShiftDown(e)||null!=u&&G==D?null:mxDragSource.prototype.getDropTarget.apply(this,arguments);f=a.getModel();if(null!=g&&(null!=G||!a.isSplitTarget(g,b,e))){for(;null!=g&&!a.isValidDropTarget(g,b,e)&&f.isVertex(f.getParent(g));)g=f.getParent(g);if(a.view.currentRoot==g||!a.isValidRoot(g)&&0==a.getModel().getChildCount(g)||a.isCellLocked(g)||f.isEdge(g))g= -null}return g});t.stopDrag=function(){mxDragSource.prototype.stopDrag.apply(this,arguments);for(var a=[J,M,D,z,y,E,A],b=0;b<a.length;b++)null!=a[b].parentNode&&a[b].parentNode.removeChild(a[b]);null!=w&&null!=v&&v.reset();G=F=u=w=v=null};return t}; +"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),G=d):mxUtils.setOpacity(d,d==E?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=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!=u&&G==E){var h=a.isCellSelected(u.cell)?a.getSelectionCells():[u.cell],h=this.updateShapes(a.model.isEdge(u.cell)?b[0]:b[m],h);a.setSelectionCells(h)}else null!=b&&null!=G&&null!= +w&&G!=E?(h=a.model.isEdge(w.cell)||null==l?m:l,a.setSelectionCells(this.dropAndConnect(w.cell,b,J,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){q.isActive()&&q.reset()});var v=q.mouseDown;q.mouseDown=function(a){mxEvent.isPopupTrigger(a)||mxEvent.isMultiTouchEvent(a)||(k.stopEditing(),v.apply(this,arguments))};var w=null,t=null,u=null,r=!1, +x=e(this.triangleUp,mxResources.get("connect")),y=e(this.triangleRight,mxResources.get("connect")),D=e(this.triangleDown,mxResources.get("connect")),z=e(this.triangleLeft,mxResources.get("connect")),E=e(this.refreshTarget,mxResources.get("replace")),F=null,I=e(this.roundDrop),N=e(this.roundDrop),J=mxConstants.DIRECTION_NORTH,G=null,K=q.createPreviewElement;q.createPreviewElement=function(a){var b=K.apply(this,arguments);mxClient.IS_SVG&&(b.style.pointerEvents="none");this.previewElementWidth=b.style.width; +this.previewElementHeight=b.style.height;return b};var P=q.dragEnter;q.dragEnter=function(a,b){null!=g.hoverIcons&&g.hoverIcons.setDisplay("none");P.apply(this,arguments)};var R=q.dragExit;q.dragExit=function(a,b){null!=g.hoverIcons&&g.hoverIcons.setDisplay("");R.apply(this,arguments)};q.dragOver=function(a,c){mxDragSource.prototype.dragOver.apply(this,arguments);null!=this.currentGuide&&null!=G&&this.currentGuide.hide();if(null!=this.previewElement){var d=a.view;if(null!=u&&G==E)this.previewElement.style.display= +a.model.isEdge(u.cell)?"none":"",this.previewElement.style.left=u.x+"px",this.previewElement.style.top=u.y+"px",this.previewElement.style.width=u.width+"px",this.previewElement.style.height=u.height+"px";else if(null!=w&&null!=G){var e=a.model.isEdge(w.cell)||null==l?m:l,g=n.getDropAndConnectGeometry(w.cell,b[e],J,b),h=a.model.isEdge(w.cell)?null:a.getCellGeometry(w.cell),k=a.getCellGeometry(b[e]),A=a.model.getParent(w.cell),C=d.translate.x*d.scale,L=d.translate.y*d.scale;null!=h&&!h.relative&&a.model.isVertex(A)&& +A!=d.currentRoot&&(L=d.getState(A),C=L.x,L=L.y);h=k.x;k=k.y;a.model.isEdge(b[e])&&(k=h=0);this.previewElement.style.left=(g.x-h)*d.scale+C+"px";this.previewElement.style.top=(g.y-k)*d.scale+L+"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!=q.currentHighlight.state&&a.model.isEdge(q.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 Q=(new Date).getTime(),H=0,M=null,C=this.editorUi.editor.graph.getCellStyle(b[0]);q.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=G=null;M!=k?(M=k,Q=(new Date).getTime(),H=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=k&&(this.updateThread=window.setTimeout(function(){null==G&&(M=k,q.getDropTarget(a,c,d,e))},this.dropTargetDelay+10))):H=(new Date).getTime()-Q;if(2500>H&&null!=k&&!mxEvent.isShiftDown(e)&&(mxUtils.getValue(k.style,mxConstants.STYLE_SHAPE)!= +mxUtils.getValue(C,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(C,mxConstants.STYLE_SHAPE)||1500<H||a.model.isEdge(k.cell))&&H>this.dropTargetDelay&&(a.model.isVertex(k.cell)&&null!=m||a.model.isEdge(k.cell)&&a.model.isEdge(b[0]))){u= +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);E.style.left=Math.floor(l.x)+"px";E.style.top=Math.floor(l.y)+"px";null==F&&(a.container.appendChild(E),F=E.parentNode);h(c,d,l,E)}else null==u||!mxUtils.contains(u,c,d)||1500<H&&!mxEvent.isShiftDown(e)?(u=null,null!=F&&(E.parentNode.removeChild(E),F=null)):null!=u&&null!=F&& +(l=a.model.isEdge(u.cell)?a.view.getPoint(u):new mxPoint(u.getCenterX(),u.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,E));if(r&&null!=w&&!mxEvent.isAltDown(e)&&null==G){f=mxRectangle.fromRectangle(w);if(a.model.isEdge(w.cell)){var A=w.absolutePoints;null!=I.parentNode&&(l=A[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), +I)));null!=N.parentNode&&(A=A[A.length-1],f.add(h(c,d,new mxRectangle(A.x-this.roundDrop.width/2,A.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),N)))}else l=mxRectangle.fromRectangle(w),null!=w.shape&&null!=w.shape.boundingBox&&(l=mxRectangle.fromRectangle(w.shape.boundingBox)),l.grow(this.graph.tolerance),l.grow(HoverIcons.prototype.arrowSpacing),A=this.graph.selectionCellsHandler.getHandler(w.cell),null!=A&&(l.x-=A.horizontalOffset/2,l.y-=A.verticalOffset/2,l.width+=A.horizontalOffset, +l.height+=A.verticalOffset,null!=A.rotationShape&&null!=A.rotationShape.node&&"hidden"!=A.rotationShape.node.style.visibility&&"none"!=A.rotationShape.node.style.display&&null!=A.rotationShape.boundingBox&&l.add(A.rotationShape.boundingBox)),f.add(h(c,d,new mxRectangle(w.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,w.getCenterY()-this.triangleRight.height/2,this.triangleRight.width,this.triangleRight.height), +y)),f.add(h(c,d,new mxRectangle(w.getCenterX()-this.triangleDown.width/2,l.y+l.height,this.triangleDown.width,this.triangleDown.height),D)),f.add(h(c,d,new mxRectangle(l.x-this.triangleLeft.width,w.getCenterY()-this.triangleLeft.height/2,this.triangleLeft.width,this.triangleLeft.height),z));null!=f&&f.grow(10)}J=mxConstants.DIRECTION_NORTH;G==y?J=mxConstants.DIRECTION_EAST:G==D||G==N?J=mxConstants.DIRECTION_SOUTH:G==z&&(J=mxConstants.DIRECTION_WEST);null!=u&&G==E&&(k=u);l=(null==m||a.isCellConnectable(b[m]))&& +(a.model.isEdge(g)&&null!=m||a.model.isVertex(g)&&a.isCellConnectable(g));if(null!=w&&5E3<=H||w!=k&&(null==f||!mxUtils.contains(f,c,d)||500<H&&null==G&&l))if(r=!1,w=5E3>H&&H>this.dropTargetDelay||a.model.isEdge(g)?k:null,null!=w&&l){f=[I,N,x,y,D,z];for(l=0;l<f.length;l++)null!=f[l].parentNode&&f[l].parentNode.removeChild(f[l]);a.model.isEdge(g)?(A=k.absolutePoints,null!=A&&(l=A[0],A=A[A.length-1],f=a.tolerance,new mxRectangle(c-f,d-f,2*f,2*f),I.style.left=Math.floor(l.x-this.roundDrop.width/2)+"px", +I.style.top=Math.floor(l.y-this.roundDrop.height/2)+"px",N.style.left=Math.floor(A.x-this.roundDrop.width/2)+"px",N.style.top=Math.floor(A.y-this.roundDrop.height/2)+"px",null==a.model.getTerminal(g,!0)&&a.container.appendChild(I),null==a.model.getTerminal(g,!1)&&a.container.appendChild(N))):(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),A=this.graph.selectionCellsHandler.getHandler(k.cell), +null!=A&&(l.x-=A.horizontalOffset/2,l.y-=A.verticalOffset/2,l.width+=A.horizontalOffset,l.height+=A.verticalOffset,null!=A.rotationShape&&null!=A.rotationShape.node&&"hidden"!=A.rotationShape.node.style.visibility&&"none"!=A.rotationShape.node.style.display&&null!=A.rotationShape.boundingBox&&l.add(A.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",y.style.left=Math.floor(l.x+l.width)+"px",y.style.top= +Math.floor(k.getCenterY()-this.triangleRight.height/2)+"px",D.style.left=x.style.left,D.style.top=Math.floor(l.y+l.height)+"px",z.style.left=Math.floor(l.x-this.triangleLeft.width)+"px",z.style.top=y.style.top,"eastwest"!=k.style.portConstraint&&(a.container.appendChild(x),a.container.appendChild(D)),a.container.appendChild(y),a.container.appendChild(z));null!=k&&(t=a.selectionCellsHandler.getHandler(k.cell),null!=t&&null!=t.setHandlesVisible&&t.setHandlesVisible(!1));r=!0}else for(f=[I,N,x,y,D,z], +l=0;l<f.length;l++)null!=f[l].parentNode&&f[l].parentNode.removeChild(f[l]);r||null==t||t.setHandlesVisible(!0);g=mxEvent.isAltDown(e)&&!mxEvent.isShiftDown(e)||null!=u&&G==E?null:mxDragSource.prototype.getDropTarget.apply(this,arguments);f=a.getModel();if(null!=g&&(null!=G||!a.isSplitTarget(g,b,e))){for(;null!=g&&!a.isValidDropTarget(g,b,e)&&f.isVertex(f.getParent(g));)g=f.getParent(g);if(a.view.currentRoot==g||!a.isValidRoot(g)&&0==a.getModel().getChildCount(g)||a.isCellLocked(g)||f.isEdge(g))g= +null}return g});q.stopDrag=function(){mxDragSource.prototype.stopDrag.apply(this,arguments);for(var a=[I,N,E,x,y,D,z],b=0;b<a.length;b++)null!=a[b].parentNode&&a[b].parentNode.removeChild(a[b]);null!=w&&null!=t&&t.reset();G=F=u=w=t=null};return q}; 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 if(mxEvent.isShiftDown(d)&&!b.isSelectionEmpty())this.updateShapes(a[0],b.getSelectionCells()),b.scrollCellToVisible(b.getSelectionCell());else{a=b.getFreeInsertPoint();if(mxEvent.isAltDown(d)){var f=b.getGraphBounds(),e=b.view.translate,h=b.view.scale;a.x=f.x/h-e.x+f.width/h+b.gridSize;a.y=f.y/h-e.y}c.drop(b,d,null,a.x,a.y,!0);null!=this.editorUi.hoverIcons&&(mxEvent.isTouchEvent(d)||mxEvent.isPenEvent(d))&&this.editorUi.hoverIcons.update(b.view.getState(b.getSelectionCell()))}}; 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))> @@ -2443,29 +2447,29 @@ Sidebar.prototype.addStencilPalette=function(a,c,d,b,f,e,h,g,k){h=null!=h?h:1;if 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);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.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.gridColor="#e0e0e0";mxSvgCanvas2D.prototype.foAltText="[Not supported by viewer]"; -mxShape.prototype.getConstraints=function(a,c,d){return null}; +mxText.prototype.baseSpacingTop=5;mxText.prototype.baseSpacingBottom=1;mxGraphModel.prototype.ignoreRelativeEdgeParent=!1;mxGraphView.prototype.gridImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhCgAKAJEAAAAAAP///8zMzP///yH5BAEAAAMALAAAAAAKAAoAAAIJ1I6py+0Po2wFADs=":IMAGE_PATH+"/grid.gif";mxGraphView.prototype.gridSteps=4;mxGraphView.prototype.minGridSize=4;mxGraphView.prototype.gridColor="#e0e0e0";mxGraphView.prototype.unit=mxConstants.PIXELS; +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,f){mxGraph.call(this,a,c,d,b);this.themes=f||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);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){var b=this.view.getState(a);a=null!=b?b.style:this.getCellStyle(a); return null!=a?"1"==a.html||"wrap"==a[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var e=null,h=null,g=null,k=null,l=!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)&&(e=new mxPoint(c.getGraphX(),c.getGraphY()),l=this.isCellSelected(d.cell),g= d,h=c,null!=d.text&&null!=d.text.boundingBox&&mxUtils.contains(d.text.boundingBox,c.getGraphX(),c.getGraphY())?k=mxEvent.LABEL_HANDLE:(d=this.selectionCellsHandler.getHandler(d.cell),null!=d&&null!=d.bends&&0<d.bends.length&&(k=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!=e&&null!=g&&null!=h){if(c=g,Math.abs(e.x-b.getGraphX())>d||Math.abs(e.y-b.getGraphY())>d){this.isCellSelected(c.cell)||this.setSelectionCell(c.cell);var f=this.selectionCellsHandler.getHandler(c.cell);if(null!=f&&null!=f.bends&&0<f.bends.length){var m=f.getHandleForEvent(h),p=this.view.getEdgeStyle(c);d=p==mxEdgeStyle.EntityRelation;l||k!=mxEvent.LABEL_HANDLE||(m=k);if(d&&0!=m&&m!=f.bends.length-1&&m!=mxEvent.LABEL_HANDLE)!d|| -null==c.visibleSourceState&&null==c.visibleTargetState||(this.graphHandler.reset(),b.consume());else if(m==mxEvent.LABEL_HANDLE||0==m||null!=c.visibleSourceState||m==f.bends.length-1||null!=c.visibleTargetState)d||m==mxEvent.LABEL_HANDLE||(d=c.absolutePoints,null!=d&&(null==p&&null==m||p==mxEdgeStyle.OrthConnector)&&(m=k,null==m&&(m=new mxRectangle(e.x,e.y),m.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(m,d[0].x,d[0].y)?m=0:mxUtils.contains(m,d[d.length-1].x,d[d.length-1].y)? -m=f.bends.length-1:null!=p&&(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)))?m=2:(m=mxUtils.findNearestSegment(c,e.x,e.y),m=null==p?mxEvent.VIRTUAL_HANDLE-m:m+1))),null==m&&(m=mxEvent.VIRTUAL_HANDLE)),f.start(b.getGraphX(),b.getGraphX(),m),k=e=h=g=null,l=!1,b.consume(),this.graphHandler.reset()}}}else if(c=b.getState(),null!=c&&this.model.isEdge(c.cell)){f=null;d=c.absolutePoints;if(null!=d)if(m=new mxRectangle(b.getGraphX(), -b.getGraphY()),m.grow(mxEdgeHandler.prototype.handleImage.width/2),null!=c.text&&null!=c.text.boundingBox&&mxUtils.contains(c.text.boundingBox,b.getGraphX(),b.getGraphY()))f="move";else if(mxUtils.contains(m,d[0].x,d[0].y)||mxUtils.contains(m,d[d.length-1].x,d[d.length-1].y))f="pointer";else if(null!=c.visibleSourceState||null!=c.visibleTargetState)p=this.view.getEdgeStyle(c),f="crosshair",p!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(c)&&(p=mxUtils.findNearestSegment(c,b.getGraphX(),b.getGraphY()), -p<d.length-1&&0<=p&&(f=0==Math.round(d[p].x-d[p+1].x)?"col-resize":"row-resize"));null!=f&&c.setCursor(f)}}),mouseUp:mxUtils.bind(this,function(a,b){k=e=h=g=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); +!mxEvent.isShiftDown(b.getEvent())&&!mxEvent.isAltDown(b.getEvent()))if(d=this.tolerance,null!=e&&null!=g&&null!=h){if(c=g,Math.abs(e.x-b.getGraphX())>d||Math.abs(e.y-b.getGraphY())>d){this.isCellSelected(c.cell)||this.setSelectionCell(c.cell);var f=this.selectionCellsHandler.getHandler(c.cell);if(null!=f&&null!=f.bends&&0<f.bends.length){var m=f.getHandleForEvent(h),n=this.view.getEdgeStyle(c);d=n==mxEdgeStyle.EntityRelation;l||k!=mxEvent.LABEL_HANDLE||(m=k);if(d&&0!=m&&m!=f.bends.length-1&&m!=mxEvent.LABEL_HANDLE)!d|| +null==c.visibleSourceState&&null==c.visibleTargetState||(this.graphHandler.reset(),b.consume());else if(m==mxEvent.LABEL_HANDLE||0==m||null!=c.visibleSourceState||m==f.bends.length-1||null!=c.visibleTargetState)d||m==mxEvent.LABEL_HANDLE||(d=c.absolutePoints,null!=d&&(null==n&&null==m||n==mxEdgeStyle.OrthConnector)&&(m=k,null==m&&(m=new mxRectangle(e.x,e.y),m.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(m,d[0].x,d[0].y)?m=0:mxUtils.contains(m,d[d.length-1].x,d[d.length-1].y)? +m=f.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)))?m=2:(m=mxUtils.findNearestSegment(c,e.x,e.y),m=null==n?mxEvent.VIRTUAL_HANDLE-m:m+1))),null==m&&(m=mxEvent.VIRTUAL_HANDLE)),f.start(b.getGraphX(),b.getGraphX(),m),k=e=h=g=null,l=!1,b.consume(),this.graphHandler.reset()}}}else if(c=b.getState(),null!=c&&this.model.isEdge(c.cell)){f=null;d=c.absolutePoints;if(null!=d)if(m=new mxRectangle(b.getGraphX(), +b.getGraphY()),m.grow(mxEdgeHandler.prototype.handleImage.width/2),null!=c.text&&null!=c.text.boundingBox&&mxUtils.contains(c.text.boundingBox,b.getGraphX(),b.getGraphY()))f="move";else if(mxUtils.contains(m,d[0].x,d[0].y)||mxUtils.contains(m,d[d.length-1].x,d[d.length-1].y))f="pointer";else if(null!=c.visibleSourceState||null!=c.visibleTargetState)n=this.view.getEdgeStyle(c),f="crosshair",n!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(c)&&(n=mxUtils.findNearestSegment(c,b.getGraphX(),b.getGraphY()), +n<d.length-1&&0<=n&&(f=0==Math.round(d[n].x-d[n+1].x)?"col-resize":"row-resize"));null!=f&&c.setCursor(f)}}),mouseUp:mxUtils.bind(this,function(a,b){k=e=h=g=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 m=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates= -function(){var a=m.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,g=this.graph.view.scale,f=this.graph.getPageLayout(),h=0;h<f.width;h++)b.push(new mxRectangle(((f.x+h)*e+d.x)*g,(f.y*c+d.y)*g,e*g,c*g));for(h=0;h<f.height;h++)b.push(new mxRectangle((f.x*e+d.x)*g,((f.y+h)*c+d.y)*g,e*g,c*g));a=b.concat(a)}return a};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor= +function(){var a=m.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=0;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)};this.graphHandler.getCells=function(a){for(var b=mxGraphHandler.prototype.getCells.apply(this,arguments),c=[],d=0;d<b.length;d++){var e=this.graph.view.getState(b[d]),e=null!=e?e.style:this.graph.getCellStyle(b[d]); -"1"==mxUtils.getValue(e,"part","0")?(e=this.graph.model.getParent(b[d]),this.graph.model.isVertex(e)&&0>mxUtils.indexOf(b,e)&&c.push(e)):c.push(b[d])}return c};this.connectionHandler.createTargetVertex=function(a,b){var c=this.graph.view.getState(b),c=null!=c?c.style:this.graph.getCellStyle(b);mxUtils.getValue(c,"part",!1)&&(c=this.graph.model.getParent(b),this.graph.model.isVertex(c)&&(b=c));return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var p=new mxRubberband(this); -this.getRubberband=function(){return p};var n=(new Date).getTime(),t=0,r=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var a=this.currentState;r.apply(this,arguments);a!=this.currentState?(n=(new Date).getTime(),t=0):t=(new Date).getTime()-n};var w=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=this.currentState&&a.getState()==this.currentState&&2E3<t||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style, -"outlineConnect","1"))&&w.apply(this,arguments)};var v=this.isToggleEvent;this.isToggleEvent=function(a){return v.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(a)};var u=p.isForceRubberbandEvent;p.isForceRubberbandEvent=function(a){return u.apply(this,arguments)||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 q=null;this.panningHandler.addListener(mxEvent.PAN_START, -mxUtils.bind(this,function(){this.isEnabled()&&(q=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=q)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(a){return mxEvent.isMouseEvent(a.getEvent())};var z=this.click;this.click=function(a){var b=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);if(this.isEnabled()&& -!b||a.isConsumed())return z.apply(this,arguments);var c=b?a.sourceState.cell:a.getCell();null!=c&&(c=this.getLinkForCell(c),null!=c&&(this.isCustomLink(c)?this.customLinkClicked(c):this.openLink(c)));this.isEnabled()&&b&&this.clearSelection()};this.tooltipHandler.getStateForEvent=function(a){return a.sourceState};this.getCursorForMouseEvent=function(a){var b=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);return this.getCursorForCell(b?a.sourceState.cell:a.getCell())};var y= -this.getCursorForCell;this.getCursorForCell=function(a){if(!this.isEnabled()||this.isCellLocked(a)){if(null!=this.getLinkForCell(a))return"pointer";if(this.isCellLocked(a))return"default"}return y.apply(this,arguments)};this.selectRegion=function(a,b){var c=this.getAllCells(a.x,a.y,a.width,a.height);this.selectCellsForEvent(c,b);return c};this.getAllCells=function(a,b,c,d,e,g){g=null!=g?g:[];if(0<c||0<d){var f=this.getModel(),h=a+c,k=b+d;null==e&&(e=this.getCurrentRoot(),null==e&&(e=f.getRoot())); -if(null!=e)for(var l=f.getChildCount(e),B=0;B<l;B++){var m=f.getChildAt(e,B),C=this.view.getState(m);if(null!=C&&this.isCellVisible(m)&&"1"!=mxUtils.getValue(C.style,"locked","0")){var p=mxUtils.getValue(C.style,mxConstants.STYLE_ROTATION)||0;0!=p&&(C=mxUtils.getBoundingBox(C,p));(f.isEdge(m)||f.isVertex(m))&&C.x>=a&&C.y+C.height<=k&&C.y>=b&&C.x+C.width<=h&&g.push(m);this.getAllCells(a,b,c,d,m,g)}}}return g};var E=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent= -function(a,b,c){return this.graph.isCellSelected(a)?!1:E.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 A=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,b){if("mouseDown"==b.getProperty("eventName")){var c=b.getProperty("event").getState();A=null==c||this.isSelectionEmpty()||this.isCellSelected(c.cell)?null: -this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(a,b){if(!mxEvent.isMultiTouchEvent(b)){var c=b.getProperty("event"),d=b.getProperty("cell");null==d?(c=mxUtils.convertPoint(this.container,mxEvent.getClientX(c),mxEvent.getClientY(c)),p.start(c.x,c.y)):null!=A?this.addSelectionCells(A):1<this.getSelectionCount()&&this.isCellSelected(d)&&this.removeSelectionCell(d);A=null;b.consume()}}));this.connectionHandler.selectCells=function(a,b){this.graph.setSelectionCell(b|| -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 D=this.updateMouseEvent;this.updateMouseEvent=function(a){a=D.apply(this, +"1"==mxUtils.getValue(e,"part","0")?(e=this.graph.model.getParent(b[d]),this.graph.model.isVertex(e)&&0>mxUtils.indexOf(b,e)&&c.push(e)):c.push(b[d])}return c};this.connectionHandler.createTargetVertex=function(a,b){var c=this.graph.view.getState(b),c=null!=c?c.style:this.graph.getCellStyle(b);mxUtils.getValue(c,"part",!1)&&(c=this.graph.model.getParent(b),this.graph.model.isVertex(c)&&(b=c));return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var n=new mxRubberband(this); +this.getRubberband=function(){return n};var p=(new Date).getTime(),q=0,v=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var a=this.currentState;v.apply(this,arguments);a!=this.currentState?(p=(new Date).getTime(),q=0):q=(new Date).getTime()-p};var w=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=this.currentState&&a.getState()==this.currentState&&2E3<q||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style, +"outlineConnect","1"))&&w.apply(this,arguments)};var t=this.isToggleEvent;this.isToggleEvent=function(a){return t.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(a)};var u=n.isForceRubberbandEvent;n.isForceRubberbandEvent=function(a){return u.apply(this,arguments)||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 r=null;this.panningHandler.addListener(mxEvent.PAN_START, +mxUtils.bind(this,function(){this.isEnabled()&&(r=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=r)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(a){return mxEvent.isMouseEvent(a.getEvent())};var x=this.click;this.click=function(a){var b=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);if(this.isEnabled()&& +!b||a.isConsumed())return x.apply(this,arguments);var c=b?a.sourceState.cell:a.getCell();null!=c&&(c=this.getLinkForCell(c),null!=c&&(this.isCustomLink(c)?this.customLinkClicked(c):this.openLink(c)));this.isEnabled()&&b&&this.clearSelection()};this.tooltipHandler.getStateForEvent=function(a){return a.sourceState};this.getCursorForMouseEvent=function(a){var b=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);return this.getCursorForCell(b?a.sourceState.cell:a.getCell())};var y= +this.getCursorForCell;this.getCursorForCell=function(a){if(!this.isEnabled()||this.isCellLocked(a)){if(null!=this.getLinkForCell(a))return"pointer";if(this.isCellLocked(a))return"default"}return y.apply(this,arguments)};this.selectRegion=function(a,b){var c=this.getAllCells(a.x,a.y,a.width,a.height);this.selectCellsForEvent(c,b);return c};this.getAllCells=function(a,b,c,d,e,f){f=null!=f?f:[];if(0<c||0<d){var g=this.getModel(),h=a+c,k=b+d;null==e&&(e=this.getCurrentRoot(),null==e&&(e=g.getRoot())); +if(null!=e)for(var l=g.getChildCount(e),m=0;m<l;m++){var C=g.getChildAt(e,m),A=this.view.getState(C);if(null!=A&&this.isCellVisible(C)&&"1"!=mxUtils.getValue(A.style,"locked","0")){var n=mxUtils.getValue(A.style,mxConstants.STYLE_ROTATION)||0;0!=n&&(A=mxUtils.getBoundingBox(A,n));(g.isEdge(C)||g.isVertex(C))&&A.x>=a&&A.y+A.height<=k&&A.y>=b&&A.x+A.width<=h&&f.push(C);this.getAllCells(a,b,c,d,C,f)}}}return f};var D=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent= +function(a,b,c){return this.graph.isCellSelected(a)?!1:D.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 z=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,b){if("mouseDown"==b.getProperty("eventName")){var c=b.getProperty("event").getState();z=null==c||this.isSelectionEmpty()||this.isCellSelected(c.cell)?null: +this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(a,b){if(!mxEvent.isMultiTouchEvent(b)){var c=b.getProperty("event"),d=b.getProperty("cell");null==d?(c=mxUtils.convertPoint(this.container,mxEvent.getClientX(c),mxEvent.getClientY(c)),n.start(c.x,c.y)):null!=z?this.addSelectionCells(z):1<this.getSelectionCount()&&this.isCellSelected(d)&&this.removeSelectionCell(d);z=null;b.consume()}}));this.connectionHandler.selectCells=function(a,b){this.graph.setSelectionCell(b|| +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 E=this.updateMouseEvent;this.updateMouseEvent=function(a){a=E.apply(this, arguments);null!=a.state&&this.isCellLocked(a.getCell())&&(a.state=null);return a}}this.currentTranslate=new mxPoint(0,0)};Graph.touchStyle=mxClient.IS_TOUCH||mxClient.IS_FF&&mxClient.IS_WIN||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||null==window.urlParams||"1"==urlParams.touch;Graph.fileSupport=null!=window.File&&null!=window.FileReader&&null!=window.FileList&&(null==window.urlParams||"0"!=urlParams.filesupport);Graph.lineJumpsEnabled=!0;Graph.defaultJumpSize=6; Graph.createSvgImage=function(a,c,d){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" 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){return Graph.compress(Graph.zapGremlins(mxUtils.getXml(a)))}; @@ -2480,8 +2484,8 @@ c,d,h,g,k){h=null!=h?h:!0;g=null!=g?g:!0;null==d&&(d=this.getCurrentRoot(),null= 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");a.setAttribute("transform","scale("+this.currentScale+","+this.currentScale+")translate("+this.currentTranslate.x+","+this.currentTranslate.y+")");if(c!=a.getAttribute("transform"))try{if(mxClient.IS_EDGE){var d=a.style.display;a.style.display="none";a.getBBox();a.style.display=d}}catch(h){}}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,g=this.view.scale,f=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=g,this.view.translate=f,this.useCssTransforms=!0)}})();Graph.prototype.isLightboxView=function(){return this.lightbox};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)}}; +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.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 f=a.split("#")[1];window.location.hash=="#"+f&&(window.location.hash="");window.location.hash=f}else b=window.open(a,c),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}; @@ -2497,8 +2501,8 @@ Graph.prototype.isLabelMovable=function(a){var c=this.view.getState(a),c=null!=c 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,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"](),p=a[g+"FullYear"](),n=a[g+"Hours"](),t=a[g+"Minutes"](),r=a[g+"Seconds"](),g=a[g+"Milliseconds"](),w=d?0:a.getTimezoneOffset(),v={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(p).slice(2),yyyy:p,h:n%12||12,hh:h(n%12||12),H:n,HH:h(n),M:t,MM:h(t),s:r,ss:h(r),l:h(g,3),L:h(99<g?Math.round(g/10):g),t:12>n?"a":"p",tt:12>n?"am":"pm",T:12>n?"A":"P",TT:12>n?"AM":"PM",Z:d?"UTC":(String(a).match(f)||[""]).pop().replace(e,""),o:(0<w?"-":"+")+h(100*Math.floor(Math.abs(w)/60)+Math.abs(w)%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 v?v[a]:a.slice(1, +/\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"](),v=a[g+"Seconds"](),g=a[g+"Milliseconds"](),w=d?0:a.getTimezoneOffset(),t={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:v,ss:h(v),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<w?"-":"+")+h(100*Math.floor(Math.abs(w)/60)+Math.abs(w)%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 t?t[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 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}; @@ -2508,16 +2512,16 @@ Graph.prototype.selectCellsForConnectVertex=function(a,c,d){2==a.length&&this.mo 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{g=e;if(null==g&&f){for(var l=a,m=this.getCellGeometry(a);null!=m&&m.relative;)l=this.getModel().getParent(l),m=this.getCellGeometry(l);var p=this.view.getState(l),n=null!=p?p.style:this.getCellStyle(l);if(mxUtils.getValue(n,"part",!1)){var t=this.model.getParent(l);this.model.isVertex(t)&&(l=t)}g=this.duplicateCells([l],!1)[0];m=this.getCellGeometry(g);null!=m&&(m.x=h.x-m.width/2,m.y=h.y-m.height/2)}m=null;null!=this.layoutManager&&(m=this.layoutManager.getLayout(this.model.getParent(a))); -var r=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!=r&&this.connectionHandler.insertBeforeSource){var w=null;for(b=a;null!=b.parent&&null!=b.geometry&&b.geometry.relative&&b.parent!=r.parent;)b=this.model.getParent(b);null!=b&&null!=b.parent&&b.parent==r.parent&&(w=b.parent.getIndex(b),this.model.add(b.parent,r,w))}null==e&&null!=g&&null!=m&&null!=a.parent&&m.constructor== -mxStackLayout&&c==mxConstants.DIRECTION_WEST&&(w=a.parent.getIndex(a),this.model.add(a.parent,g,w));null!=r&&d.push(r);null==e&&null!=g&&d.push(g);null==g&&null!=r&&r.geometry.setTerminalPoint(h,!1);null!=r&&this.fireEvent(new mxEventObject("cellsInserted","cells",[r]))}finally{this.model.endUpdate()}return d}; +this.model.beginUpdate();try{g=e;if(null==g&&f){for(var l=a,m=this.getCellGeometry(a);null!=m&&m.relative;)l=this.getModel().getParent(l),m=this.getCellGeometry(l);var n=this.view.getState(l),p=null!=n?n.style:this.getCellStyle(l);if(mxUtils.getValue(p,"part",!1)){var q=this.model.getParent(l);this.model.isVertex(q)&&(l=q)}g=this.duplicateCells([l],!1)[0];m=this.getCellGeometry(g);null!=m&&(m.x=h.x-m.width/2,m.y=h.y-m.height/2)}m=null;null!=this.layoutManager&&(m=this.layoutManager.getLayout(this.model.getParent(a))); +var v=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!=v&&this.connectionHandler.insertBeforeSource){var w=null;for(b=a;null!=b.parent&&null!=b.geometry&&b.geometry.relative&&b.parent!=v.parent;)b=this.model.getParent(b);null!=b&&null!=b.parent&&b.parent==v.parent&&(w=b.parent.getIndex(b),this.model.add(b.parent,v,w))}null==e&&null!=g&&null!=m&&null!=a.parent&&m.constructor== +mxStackLayout&&c==mxConstants.DIRECTION_WEST&&(w=a.parent.getIndex(a),this.model.add(a.parent,g,w));null!=v&&d.push(v);null==e&&null!=g&&d.push(g);null==g&&null!=v&&v.geometry.setTerminalPoint(h,!1);null!=v&&this.fireEvent(new mxEventObject("cellsInserted","cells",[v]))}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){if(null!=a.value&&"object"==typeof a.value){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 a.value.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){return mxEvent.isShiftDown(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]),p=this.layoutManager.getLayout(m); -null==p?null!=f&&this.isMoveCellsEvent(f)&&this.moveSiblings(h,m,k,l):null!=f&&mxEvent.isAltDown(f)||p.constructor!=mxStackLayout||p.resizeLast||this.resizeParentStacks(m,p,k,l)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(d)}}; +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)&&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.view.getState(a),c=null!=c?c.style:this.getCellStyle(a);return this.isSwimlane(a)?"0"!=c.container:"1"==c.container};Graph.prototype.isCellConnectable=function(a){var c=this.view.getState(a),c=null!=c?c.style:this.getCellStyle(a);return null!=c&&null!=c.connectable?"0"!=c.connectable:mxGraph.prototype.isCellConnectable.apply(this,arguments)}; @@ -2556,21 +2560,22 @@ e(c,this.arrowRight);e(d,this.arrowLeft);e(b,this.arrowUp);e(a,this.arrowDown)}e 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&&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())}else this.reset()};HoverIcons.prototype.setCurrentState=function(a){"eastwest"!=a.style.portConstraint&&(this.graph.container.appendChild(this.arrowUp),this.graph.container.appendChild(this.arrowDown));this.graph.container.appendChild(this.arrowRight);this.graph.container.appendChild(this.arrowLeft);this.currentState=a}; +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}; (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 g=new mxPoint(c,e);g.type=b;d.push(g);g=null!=a.routedPoints?a.routedPoints[d.length-1]:null;return null==g||g.type!=b||g.x!=c||g.y!=e},g=.5*this.scale,c=!1,d=[],f=0;f<b.length-1;f++){for(var h= -b[f+1],k=b[f],u=[],q=b[f+2];f<b.length-2&&mxUtils.ptSegDistSq(k.x,k.y,q.x,q.y,h.x,h.y)<1*this.scale*this.scale;)h=q,f++,q=b[f+2];for(var c=e(0,k.x,k.y)||c,z=0;z<this.validEdges.length;z++){var y=this.validEdges[z],E=y.absolutePoints;if(null!=E&&mxUtils.intersects(a,y)&&"1"!=y.style.noJump)for(y=0;y<E.length-1;y++){for(var A=E[y+1],D=E[y],q=E[y+2];y<E.length-2&&mxUtils.ptSegDistSq(D.x,D.y,q.x,q.y,A.x,A.y)<1*this.scale*this.scale;)A=q,y++,q=E[y+2];q=mxUtils.intersection(k.x,k.y,h.x,h.y,D.x,D.y,A.x, -A.y);if(null!=q&&(Math.abs(q.x-k.x)>g||Math.abs(q.y-k.y)>g)&&(Math.abs(q.x-h.x)>g||Math.abs(q.y-h.y)>g)&&(Math.abs(q.x-D.x)>g||Math.abs(q.y-D.y)>g)&&(Math.abs(q.x-A.x)>g||Math.abs(q.y-A.y)>g)){A=q.x-k.x;D=q.y-k.y;q={distSq:A*A+D*D,x:q.x,y:q.y};for(A=0;A<u.length;A++)if(u[A].distSq>q.distSq){u.splice(A,0,q);q=null;break}null==q||0!=u.length&&u[u.length-1].x===q.x&&u[u.length-1].y===q.y||u.push(q)}}}for(y=0;y<u.length;y++)c=e(1,u[y].x,u[y].y)||c}q=b[b.length-1];c=e(0,q.x,q.y)||c}a.routedPoints=d;return c}return!1}; +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],u=[],r=b[g+2];g<b.length-2&&mxUtils.ptSegDistSq(k.x,k.y,r.x,r.y,h.x,h.y)<1*this.scale*this.scale;)h=r,g++,r=b[g+2];for(var c=e(0,k.x,k.y)||c,x=0;x<this.validEdges.length;x++){var y=this.validEdges[x],D=y.absolutePoints;if(null!=D&&mxUtils.intersects(a,y)&&"1"!=y.style.noJump)for(y=0;y<D.length-1;y++){for(var z=D[y+1],E=D[y],r=D[y+2];y<D.length-2&&mxUtils.ptSegDistSq(E.x,E.y,r.x,r.y,z.x,z.y)<1*this.scale*this.scale;)z=r,y++,r=D[y+2];r=mxUtils.intersection(k.x,k.y,h.x,h.y,E.x,E.y,z.x, +z.y);if(null!=r&&(Math.abs(r.x-k.x)>f||Math.abs(r.y-k.y)>f)&&(Math.abs(r.x-h.x)>f||Math.abs(r.y-h.y)>f)&&(Math.abs(r.x-E.x)>f||Math.abs(r.y-E.y)>f)&&(Math.abs(r.x-z.x)>f||Math.abs(r.y-z.y)>f)){z=r.x-k.x;E=r.y-k.y;r={distSq:z*z+E*E,x:r.x,y:r.y};for(z=0;z<u.length;z++)if(u[z].distSq>r.distSq){u.splice(z,0,r);r=null;break}null==r||0!=u.length&&u[u.length-1].x===r.x&&u[u.length-1].y===r.y||u.push(r)}}}for(y=0;y<u.length;y++)c=e(1,u[y].x,u[y].y)||c}r=b[b.length-1];c=e(0,r.x,r.y)||c}a.routedPoints=d;return c}return!1}; 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,k=!0,l=null,m=null;h=[];var q=null;a.begin();for(var z=0;z<this.state.routedPoints.length;z++){var y=this.state.routedPoints[z],E=new mxPoint(y.x/this.scale,y.y/this.scale);0==z?E=b[0]:z==this.state.routedPoints.length-1&&(E=b[b.length-1]);var A=!1;if(null!=l&&1==y.type){var D=this.state.routedPoints[z+1],y=D.x/this.scale-E.x,D=D.y/this.scale-E.y,y=y*y+D*D;null==q&&(q=new mxPoint(E.x-l.x,E.y-l.y),m=Math.sqrt(q.x*q.x+q.y*q.y),0<m?(q.x=q.x*e/m,q.y=q.y*e/m):q=null);y>e*e&&0<m&& -(y=l.x-E.x,D=l.y-E.y,y=y*y+D*D,y>e*e&&(A=new mxPoint(E.x-q.x,E.y-q.y),y=new mxPoint(E.x+q.x,E.y+q.y),h.push(A),this.addPoints(a,h,c,d,!1,null,k),h=0>Math.round(q.x)||0==Math.round(q.x)&&0>=Math.round(q.y)?1:-1,k=!1,"sharp"==g?(a.lineTo(A.x-q.y*h,A.y+q.x*h),a.lineTo(y.x-q.y*h,y.y+q.x*h),a.lineTo(y.x,y.y)):"arc"==g?(h*=1.3,a.curveTo(A.x-q.y*h,A.y+q.x*h,y.x-q.y*h,y.y+q.x*h,y.x,y.y)):(a.moveTo(y.x,y.y),k=!0),h=[y],A=!0))}else q=null;A||(h.push(E),l=E)}this.addPoints(a,h,c,d,!1,null,k);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 g=this.getNextPoint(a,c,d),f=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),g=mxUtils.getRotatedPoint(g,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);g=this.getPerimeterPoint(b,g,0==h&&f,l);0!=h&&(l=Math.cos(h),m=Math.sin(h),g=mxUtils.getRotatedPoint(g,l,m,k));a.setAbsoluteTerminalPoint(this.snapToAnchorPoint(a,b,c,d,g),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 g= -0;g<a.length;g++){var f=this.graph.getConnectionPoint(b,a[g]);if(null!=f){var h=(f.x-e.x)*(f.x-e.x)+(f.y-e.y)*(f.y-e.y);if(null==d||h<d)c=f,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(n){null!=window.console&&console.log("Error in shape: "+n)}}return g.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0; +"jumpStyle","none"),h,k=!0,l=null,m=null;h=[];var r=null;a.begin();for(var x=0;x<this.state.routedPoints.length;x++){var y=this.state.routedPoints[x],D=new mxPoint(y.x/this.scale,y.y/this.scale);0==x?D=b[0]:x==this.state.routedPoints.length-1&&(D=b[b.length-1]);var z=!1;if(null!=l&&1==y.type){var E=this.state.routedPoints[x+1],y=E.x/this.scale-D.x,E=E.y/this.scale-D.y,y=y*y+E*E;null==r&&(r=new mxPoint(D.x-l.x,D.y-l.y),m=Math.sqrt(r.x*r.x+r.y*r.y),0<m?(r.x=r.x*e/m,r.y=r.y*e/m):r=null);y>e*e&&0<m&& +(y=l.x-D.x,E=l.y-D.y,y=y*y+E*E,y>e*e&&(z=new mxPoint(D.x-r.x,D.y-r.y),y=new mxPoint(D.x+r.x,D.y+r.y),h.push(z),this.addPoints(a,h,c,d,!1,null,k),h=0>Math.round(r.x)||0==Math.round(r.x)&&0>=Math.round(r.y)?1:-1,k=!1,"sharp"==g?(a.lineTo(z.x-r.y*h,z.y+r.x*h),a.lineTo(y.x-r.y*h,y.y+r.x*h),a.lineTo(y.x,y.y)):"arc"==g?(h*=1.3,a.curveTo(z.x-r.y*h,z.y+r.x*h,y.x-r.y*h,y.y+r.x*h,y.x,y.y)):(a.moveTo(y.x,y.y),k=!0),h=[y],z=!0))}else r=null;z||(h.push(D),l=D)}this.addPoints(a,h,c,d,!1,null,k);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 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}; @@ -2579,128 +2584,129 @@ mxStencilRegistry.loadStencilSet=function(a,c,d,b){var f=mxStencilRegistry.packa 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}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 c=mxConnectionHandler.prototype.isCreateTarget;mxConnectionHandler.prototype.isCreateTarget= -function(a){return mxEvent.isControlDown(a)||c.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 d=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var a=d.apply(this,arguments);a.isDashed="1"==this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED];return a};mxConnectionHandler.prototype.updatePreview=function(a){};var b=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var a= -b.apply(this,arguments),c=a.getCell;a.getCell=mxUtils.bind(this,function(a){var b=c.apply(this,arguments);this.error=null;return b});return a};mxConnectionHandler.prototype.isCellEnabled=function(a){return!this.graph.isCellLocked(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+"/default.xml").getDocumentElement():null;null!=a&&(new mxCodec(a.ownerDocument)).decode(a,this.getStylesheet())}; -Graph.prototype.importGraphModel=function(a,b,c,d){b=null!=b?b:0;c=null!=c?c:0;var e=new mxCodec(a.ownerDocument),g=new mxGraphModel;e.decode(a,g);a=[];e=g.getChildren(this.cloneCell(g.root,this.isCloneInvalidEdges()));if(null!=e){e=e.slice();this.model.beginUpdate();try{if(1!=e.length||this.isCellLocked(this.getDefaultParent()))for(g=0;g<e.length;g++)a=a.concat(this.model.getChildren(this.moveCells([e[g]],b,c,!1,this.model.getRoot())[0]));else a=this.moveCells(g.getChildren(e[0]),b,c,!1,this.getDefaultParent()); -if(d){this.isGridEnabled()&&(b=this.snap(b),c=this.snap(c));var f=this.getBoundingBoxFromGeometry(a,!0);null!=f&&this.moveCells(a,b-f.x,c-f.y)}}finally{this.model.endUpdate()}}return a};Graph.prototype.getAllConnectionConstraints=function(a,b){if(null!=a){var c=mxUtils.getValue(a.style,"points",null);if(null!=c){var d=[];try{for(var e=JSON.parse(c),c=0;c<e.length;c++){var g=e[c];d.push(new mxConnectionConstraint(new mxPoint(g[0],g[1]),2<g.length?"0"!=g[2]:!0,null,3<g.length?g[3]:0,4<g.length?g[4]: -0))}}catch(U){}return d}if(null!=a.shape&&null!=a.shape.bounds){g=a.shape.direction;e=a.shape.bounds;c=a.shape.scale;d=e.width/c;e=e.height/c;if(g==mxConstants.DIRECTION_NORTH||g==mxConstants.DIRECTION_SOUTH)g=d,d=e,e=g;c=a.shape.getConstraints(a.style,d,e);if(null!=c)return c;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 b=this.view.getState(a), -b=null!=b?b.style:this.getCellStyle(a);null!=b&&(b=mxUtils.getValue(b,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL,this.setCellStyles(mxConstants.STYLE_ELBOW,b,[a]))}};Graph.prototype.isValidRoot=function(a){for(var b=this.model.getChildCount(a),c=0,d=0;d<b;d++){var e=this.model.getChildAt(a,d);this.model.isVertex(e)&&(e=this.getCellGeometry(e),null==e||e.relative||c++)}return 0<c||this.isContainer(a)}; -Graph.prototype.isValidDropTarget=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return"1"!=mxUtils.getValue(b,"part","0")&&(this.isContainer(a)||mxGraph.prototype.isValidDropTarget.apply(this,arguments)&&"0"!=mxUtils.getValue(b,"dropTarget","1"))};Graph.prototype.createGroupCell=function(){var a=mxGraph.prototype.createGroupCell.apply(this,arguments);a.setStyle("group");return a};Graph.prototype.isExtendParentsOnAdd=function(a){var b=mxGraph.prototype.isExtendParentsOnAdd.apply(this, -arguments);if(b&&null!=a&&null!=this.layoutManager){var c=this.model.getParent(a);null!=c&&(c=this.layoutManager.getLayout(c),null!=c&&c.constructor==mxStackLayout&&(b=!1))}return b};Graph.prototype.getPreferredSizeForCell=function(a){var b=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=b&&(b.width+=10,b.height+=4,this.gridEnabled&&(b.width=this.snap(b.width),b.height=this.snap(b.height)));return b};Graph.prototype.turnShapes=function(a){var b=this.getModel(),c=[];b.beginUpdate(); -try{for(var d=0;d<a.length;d++){var e=a[d];if(b.isEdge(e)){var g=b.getTerminal(e,!0),f=b.getTerminal(e,!1);b.setTerminal(e,f,!0);b.setTerminal(e,g,!1);var h=b.getGeometry(e);if(null!=h){h=h.clone();null!=h.points&&h.points.reverse();var k=h.getTerminalPoint(!0),l=h.getTerminalPoint(!1);h.setTerminalPoint(k,!1);h.setTerminalPoint(l,!0);b.setGeometry(e,h);var m=this.view.getState(e),B=this.view.getState(g),p=this.view.getState(f);if(null!=m){var n=null!=B?this.getConnectionConstraint(m,B,!0):null,r= -null!=p?this.getConnectionConstraint(m,p,!1):null;this.setConnectionConstraint(e,g,!0,r);this.setConnectionConstraint(e,f,!1,n)}c.push(e)}}else if(b.isVertex(e)&&(h=this.getCellGeometry(e),null!=h)){h=h.clone();h.x+=h.width/2-h.height/2;h.y+=h.height/2-h.width/2;var t=h.width;h.width=h.height;h.height=t;b.setGeometry(e,h);var w=this.view.getState(e);if(null!=w){var q=w.style[mxConstants.STYLE_DIRECTION]||"east";"east"==q?q="south":"south"==q?q="west":"west"==q?q="north":"north"==q&&(q="east");this.setCellStyles(mxConstants.STYLE_DIRECTION, -q,[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);if(a instanceof mxValueChange&&null!=a.cell&&null!=a.cell.value&&"object"==typeof a.cell.value){var b=this.model.getDescendants(a.cell);if(0<b.length)for(var c= -0;c<b.length;c++){var d=this.view.getState(b[c]);null!=d&&null!=d.shape&&null!=d.shape.stencil&&this.stencilHasPlaceholders(d.shape.stencil)?this.removeStateForCell(b[c]):this.isReplacePlaceholders(b[c])&&this.view.invalidate(b[c],!1,!1)}}};Graph.prototype.replaceElement=function(a,b){for(var c=a.ownerDocument.createElement(null!=b?b:"span"),d=Array.prototype.slice.call(a.attributes);attr=d.pop();)c.setAttribute(attr.nodeName,attr.nodeValue);c.innerHTML=a.innerHTML;a.parentNode.replaceChild(c,a)}; -Graph.prototype.processElements=function(a,b){for(var c=a.getElementsByTagName("*"),d=0;d<c.length;d++)b(c[d])};Graph.prototype.updateLabelElements=function(a,b,c){a=null!=a?a:this.getSelectionCells();for(var d=document.createElement("div"),e=0;e<a.length;e++)if(this.isHtmlLabel(a[e])){var g=this.convertValueToString(a[e]);if(null!=g&&0<g.length){d.innerHTML=g;for(var f=d.getElementsByTagName(null!=c?c:"*"),h=0;h<f.length;h++)b(f[h]);d.innerHTML!=g&&this.cellLabelChanged(a[e],d.innerHTML)}}};Graph.prototype.cellLabelChanged= -function(a,b,c){b=Graph.zapGremlins(b);this.model.beginUpdate();try{if(null!=a.value&&"object"==typeof a.value){if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder"))for(var d=a.getAttribute("placeholder"),e=a;null!=e;){if(e==this.model.getRoot()||null!=e.value&&"object"==typeof e.value&&e.hasAttribute(d)){this.setAttributeForCell(e,d,b);break}e=this.model.getParent(e)}var g=a.value.cloneNode(!0);g.setAttribute("label",b);b=g}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}}; -Graph.prototype.cellsRemoved=function(a){if(null!=a){for(var b=new mxDictionary,c=0;c<a.length;c++)b.put(a[c],!0);for(var d=[],c=0;c<a.length;c++){var e=this.model.getParent(a[c]);null==e||b.get(e)||(b.put(e,!0),d.push(e))}for(c=0;c<d.length;c++)if(e=this.view.getState(d[c]),null!=e&&(this.model.isEdge(e.cell)||this.model.isVertex(e.cell))&&this.isCellDeletable(e.cell)){var g=mxUtils.getValue(e.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),f=mxUtils.getValue(e.style,mxConstants.STYLE_FILLCOLOR, -mxConstants.NONE);if(g==mxConstants.NONE&&f==mxConstants.NONE){g=!0;for(f=0;f<this.model.getChildCount(e.cell)&&g;f++)b.get(this.model.getChildAt(e.cell,f))||(g=!1);g&&a.push(e.cell)}}}mxGraph.prototype.cellsRemoved.apply(this,arguments)};Graph.prototype.removeCellsAfterUngroup=function(a){for(var b=[],c=0;c<a.length;c++)if(this.isCellDeletable(a[c])){var d=this.view.getState(a[c]);if(null!=d){var e=mxUtils.getValue(d.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),d=mxUtils.getValue(d.style, -mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);e==mxConstants.NONE&&d==mxConstants.NONE&&b.push(a[c])}}a=b;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(a,b){this.setAttributeForCell(a,"link",b)};Graph.prototype.setTooltipForCell=function(a,b){this.setAttributeForCell(a,"tooltip",b)};Graph.prototype.getAttributeForCell=function(a,b,c){return null!=a.value&&"object"===typeof a.value?a.value.getAttribute(b)||c:c};Graph.prototype.setAttributeForCell= -function(a,b,c){var d;null!=a.value&&"object"==typeof a.value?d=a.value.cloneNode(!0):(d=mxUtils.createXmlDocument().createElement("UserObject"),d.setAttribute("label",a.value||""));null!=c?d.setAttribute(b,c):d.removeAttribute(b);this.model.setValue(a,d)};Graph.prototype.getDropTarget=function(a,b,c,d){this.getModel();if(mxEvent.isAltDown(b))return null;for(var e=0;e<a.length;e++)if(this.model.isEdge(this.model.getParent(a[e])))return null;return mxGraph.prototype.getDropTarget.apply(this,arguments)}; -Graph.prototype.click=function(a){mxGraph.prototype.click.call(this,a);this.firstClickState=a.getState();this.firstClickSource=a.getSource()};Graph.prototype.dblClick=function(a,b){if(this.isEnabled()){var c=mxUtils.convertPoint(this.container,mxEvent.getClientX(a),mxEvent.getClientY(a));if(null!=a&&!this.model.isVertex(b)){var d=this.model.isEdge(b)?this.view.getState(b):null,e=mxEvent.getSource(a);this.firstClickState!=d||this.firstClickSource!=e||null!=d&&null!=d.text&&null!=d.text.node&&null!= -d.text.boundingBox&&(mxUtils.contains(d.text.boundingBox,c.x,c.y)||mxUtils.isAncestorNode(d.text.node,mxEvent.getSource(a)))||(null!=d||this.isCellLocked(this.getDefaultParent()))&&(null==d||this.isCellLocked(d.cell))||!(null!=d||mxClient.IS_VML&&e==this.view.getCanvas()||mxClient.IS_SVG&&e==this.view.getCanvas().ownerSVGElement)||(b=this.addText(c.x,c.y,d))}mxGraph.prototype.dblClick.call(this,a,b)}};Graph.prototype.getInsertPoint=function(){var a=this.getGridSize(),b=this.container.scrollLeft/this.view.scale- -this.view.translate.x,c=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible)var d=this.getPageLayout(),e=this.getPageSize(),b=Math.max(b,d.x*e.width),c=Math.max(c,d.y*e.height);return new mxPoint(this.snap(b+a),this.snap(c+a))};Graph.prototype.getFreeInsertPoint=function(){var a=this.view,b=this.getGraphBounds(),c=this.getInsertPoint(),d=this.snap(Math.round(Math.max(c.x,b.x/a.scale-a.translate.x+(0==b.width?2*this.gridSize:0)))),a=this.snap(Math.round(Math.max(c.y, -(b.y+b.height)/a.scale-a.translate.y+2*this.gridSize)));return new mxPoint(d,a)};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.addText=function(a,b,c){var d=new mxCell;d.value="Text";d.style="text;html=1;resizable=0;points=[];";d.geometry=new mxGeometry(0,0,0,0);d.vertex=!0;if(null!=c){d.style+="align=center;verticalAlign=middle;labelBackgroundColor=#ffffff;";d.geometry.relative=!0;d.connectable=!1;var e=this.view.getRelativePoint(c,a,b);d.geometry.x=Math.round(1E4*e.x)/ -1E4;d.geometry.y=Math.round(e.y);d.geometry.offset=new mxPoint(0,0);var e=this.view.getPoint(c,d.geometry),g=this.view.scale;d.geometry.offset=new mxPoint(Math.round((a-e.x)/g),Math.round((b-e.y)/g))}else d.style+="autosize=1;align=left;verticalAlign=top;spacingTop=-4;",e=this.view.translate,d.geometry.width=40,d.geometry.height=20,d.geometry.x=Math.round(a/this.view.scale)-e.x,d.geometry.y=Math.round(b/this.view.scale)-e.y;this.getModel().beginUpdate();try{this.addCells([d],null!=c?c.cell:null), -this.fireEvent(new mxEventObject("textInserted","cells",[d])),this.autoSizeCell(d)}finally{this.getModel().endUpdate()}return d};Graph.prototype.addClickHandler=function(a,b,c){var d=mxUtils.bind(this,function(){var a=this.container.getElementsByTagName("a");if(null!=a)for(var c=0;c<a.length;c++){var d=this.getAbsoluteUrl(a[c].getAttribute("href"));null!=d&&(a[c].setAttribute("rel",this.linkRelation),a[c].setAttribute("href",d),null!=b&&mxEvent.addGestureListeners(a[c],null,null,b))}});this.model.addListener(mxEvent.CHANGE, -d);d();var e=this.container.style.cursor,g=this.getTolerance(),f=this,h={currentState:null,currentLink:null,highlight:null!=a&&""!=a&&a!=mxConstants.NONE?new mxCellHighlight(f,a,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(a){var b=a.sourceState;if(null==b||null==f.getLinkForCell(b.cell))a=f.getCellAt(a.getGraphX(),a.getGraphY(),null,null,null,function(a,b,c){return null==f.getLinkForCell(a.cell)}),b=f.view.getState(a);b!=this.currentState&&(null!=this.currentState&& -this.clear(),this.currentState=b,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(a,b){this.startX=b.getGraphX();this.startY=b.getGraphY();this.scrollLeft=f.container.scrollLeft;this.scrollTop=f.container.scrollTop;null==this.currentLink&&"auto"==f.container.style.overflow&&(f.container.style.cursor="move");this.updateCurrentState(b)},mouseMove:function(a,b){if(f.isMouseDown){if(null!=this.currentLink){var c=Math.abs(this.startX-b.getGraphX()),d=Math.abs(this.startY- -b.getGraphY());(c>g||d>g)&&this.clear()}}else{for(c=b.getSource();null!=c&&"a"!=c.nodeName.toLowerCase();)c=c.parentNode;null!=c?this.clear():(null!=f.tooltipHandler&&null!=this.currentLink&&null!=this.currentState&&f.tooltipHandler.reset(b,!0,this.currentState),(null==this.currentState||b.getState()!=this.currentState&&null!=b.sourceState||!f.intersects(this.currentState,b.getGraphX(),b.getGraphY()))&&this.updateCurrentState(b))}},mouseUp:function(a,d){for(var e=d.getSource(),h=d.getEvent();null!= -e&&"a"!=e.nodeName.toLowerCase();)e=e.parentNode;null==e&&Math.abs(this.scrollLeft-f.container.scrollLeft)<g&&Math.abs(this.scrollTop-f.container.scrollTop)<g&&(null==d.sourceState||!d.isSource(d.sourceState.control))&&((mxEvent.isLeftMouseButton(h)||mxEvent.isMiddleMouseButton(h))&&!mxEvent.isPopupTrigger(h)||mxEvent.isTouchEvent(h))&&(null!=this.currentLink?(e=f.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&e||null==b||b(h,this.currentLink),mxEvent.isConsumed(h)||(h=mxEvent.isMiddleMouseButton(h)? -"_blank":e?f.linkTarget:"_top",f.openLink(this.currentLink,h),d.consume())):null!=c&&!d.isConsumed()&&Math.abs(this.scrollLeft-f.container.scrollLeft)<g&&Math.abs(this.scrollTop-f.container.scrollTop)<g&&Math.abs(this.startX-d.getGraphX())<g&&Math.abs(this.startY-d.getGraphY())<g&&c(d.getEvent()));this.clear()},activate:function(a){this.currentLink=f.getAbsoluteUrl(f.getLinkForCell(a.cell));null!=this.currentLink&&(f.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(a))}, -clear:function(){null!=f.container&&(f.container.style.cursor=e);this.currentLink=this.currentState=null;null!=this.highlight&&this.highlight.hide();null!=f.tooltipHandler&&f.tooltipHandler.hide()}};f.click=function(a){};f.addMouseListener(h);mxEvent.addListener(document,"mouseleave",function(a){h.clear()})};Graph.prototype.duplicateCells=function(a,b){a=null!=a?a:this.getSelectionCells();b=null!=b?b:!0;a=this.model.getTopmostCells(a);var c=this.getModel(),d=this.gridSize,e=[];c.beginUpdate();try{for(var g= -this.cloneCells(a,!1,null,!0),f=0;f<a.length;f++){var h=c.getParent(a[f]),k=this.moveCells([g[f]],d,d,!1)[0];e.push(k);if(b)c.add(h,g[f]);else{var l=h.getIndex(a[f]);c.add(h,g[f],l+1)}}}finally{c.endUpdate()}return e};Graph.prototype.insertImage=function(a,b,c){if(null!=a&&null!=this.cellEditor.textarea){for(var d=this.cellEditor.textarea.getElementsByTagName("img"),e=[],g=0;g<d.length;g++)e.push(d[g]);document.execCommand("insertimage",!1,a);a=this.cellEditor.textarea.getElementsByTagName("img"); -if(a.length==e.length+1)for(g=a.length-1;0<=g;g--)if(0==g||a[g]!=e[g-1]){a[g].setAttribute("width",b);a[g].setAttribute("height",c);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 b=this.cellEditor.textarea.getElementsByTagName("a"),c=[],d=0;d<b.length;d++)c.push(b[d]);document.execCommand("createlink",!1,mxUtils.trim(a));b=this.cellEditor.textarea.getElementsByTagName("a");if(b.length== -c.length+1)for(d=b.length-1;0<=d;d--)if(b[d]!=c[d-1]){for(b=b[d].getElementsByTagName("a");0<b.length;){for(c=b[0].parentNode;null!=b[0].firstChild;)c.insertBefore(b[0].firstChild,b[0]);c.removeChild(b[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(a))};Graph.prototype.isCellResizable=function(a){var b=mxGraph.prototype.isCellResizable.apply(this,arguments),c=this.view.getState(a),c=null!=c?c.style:this.getCellStyle(a);return b||"0"!=mxUtils.getValue(c,mxConstants.STYLE_RESIZABLE, -"1")&&"wrap"==c[mxConstants.STYLE_WHITE_SPACE]};Graph.prototype.distributeCells=function(a,b){null==b&&(b=this.getSelectionCells());if(null!=b&&1<b.length){for(var c=[],d=null,e=null,g=0;g<b.length;g++)if(this.getModel().isVertex(b[g])){var f=this.view.getState(b[g]);if(null!=f){var h=a?f.getCenterX():f.getCenterY(),d=null!=d?Math.max(d,h):h,e=null!=e?Math.min(e,h):h;c.push(f)}}if(2<c.length){c.sort(function(b,c){return a?b.x-c.x:b.y-c.y});f=this.view.translate;h=this.view.scale;e=e/h-(a?f.x:f.y); -d=d/h-(a?f.x:f.y);this.getModel().beginUpdate();try{for(var k=(d-e)/(c.length-1),d=e,g=1;g<c.length-1;g++){var l=this.view.getState(this.model.getParent(c[g].cell)),m=this.getCellGeometry(c[g].cell),d=d+k;null!=m&&null!=l&&(m=m.clone(),a?m.x=Math.round(d-m.width/2)-l.origin.x:m.y=Math.round(d-m.height/2)-l.origin.y,this.getModel().setGeometry(c[g].cell,m))}}finally{this.getModel().endUpdate()}}}return b};Graph.prototype.isCloneEvent=function(a){return mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxEvent.isControlDown(a)}; -Graph.prototype.encodeCells=function(a){for(var b=this.cloneCells(a),c=new mxDictionary,d=0;d<a.length;d++)c.put(a[d],!0);for(d=0;d<b.length;d++){var e=this.view.getState(a[d]);if(null!=e){var g=this.getCellGeometry(b[d]);null==g||!g.relative||this.model.isEdge(a[d])||c.get(this.model.getParent(a[d]))||(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(d=0;d<a.length;d++)e.add(g,b[d]); -return c.encode(e)};Graph.prototype.createSvgImageExport=function(){var a=new mxImageExport;a.getLinkForCellState=mxUtils.bind(this,function(a,b){return this.getLinkForCell(a.cell)});return a};Graph.prototype.getSvg=function(a,b,c,d,e,g,f,h,k,l){var m=this.useCssTransforms;m&&(this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange());try{b=null!=b?b:1;c=null!=c?c:0;e=null!=e?e:!0;g=null!=g?g:!0;f=null!=f?f:!0;var p=g||d?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()); -if(null==p)throw Error(mxResources.get("drawingEmpty"));var C=this.view.scale,n=mxUtils.createXmlDocument(),B=null!=n.createElementNS?n.createElementNS(mxConstants.NS_SVG,"svg"):n.createElement("svg");null!=a&&(null!=B.style?B.style.backgroundColor=a:B.setAttribute("style","background-color:"+a));null==n.createElementNS?(B.setAttribute("xmlns",mxConstants.NS_SVG),B.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):B.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK); -a=b/C;var r=Math.max(1,Math.ceil(p.width*a)+2*c)+(l?5:0),t=Math.max(1,Math.ceil(p.height*a)+2*c)+(l?5:0);B.setAttribute("version","1.1");B.setAttribute("width",r+"px");B.setAttribute("height",t+"px");B.setAttribute("viewBox",(e?"-0.5 -0.5":"0 0")+" "+r+" "+t);n.appendChild(B);var I=null!=n.createElementNS?n.createElementNS(mxConstants.NS_SVG,"g"):n.createElement("g");B.appendChild(I);var q=this.createSvgCanvas(I);q.foOffset=e?-.5:0;q.textOffset=e?-.5:0;q.imageOffset=e?-.5:0;q.translate(Math.floor((c/ -b-p.x)/C),Math.floor((c/b-p.y)/C));var w=document.createElement("textarea"),u=q.createAlternateContent;q.createAlternateContent=function(a,b,c,d,e,g,f,h,k,l,m,p,C){var B=this.state;if(null!=this.foAltText&&(0==d||0!=B.fontSize&&g.length<5*d/B.fontSize)){var n=this.createElement("text");n.setAttribute("x",Math.round(d/2));n.setAttribute("y",Math.round((e+B.fontSize)/2));n.setAttribute("fill",B.fontColor||"black");n.setAttribute("text-anchor","middle");n.setAttribute("font-size",Math.round(B.fontSize)+ -"px");n.setAttribute("font-family",B.fontFamily);(B.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&n.setAttribute("font-weight","bold");(B.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&n.setAttribute("font-style","italic");(B.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&n.setAttribute("text-decoration","underline");try{return w.innerHTML=g,n.textContent=w.value,n}catch(ta){return u.apply(this,arguments)}}else return u.apply(this,arguments)};var y=this.backgroundImage; -if(null!=y){b=C/b;var v=this.view.translate,z=new mxRectangle(v.x*b,v.y*b,y.width*b,y.height*b);mxUtils.intersects(p,z)&&q.image(v.x,v.y,y.width,y.height,y.src,!0)}q.scale(a);q.textEnabled=f;h=null!=h?h:this.createSvgImageExport();var T=h.drawCellState,E=h.getLinkForCellState;h.getLinkForCellState=function(a,b){var c=E.apply(this,arguments);return null==c||a.view.graph.isCustomLink(c)?null:c};h.drawCellState=function(a,b){for(var c=a.view.graph,d=c.isCellSelected(a.cell),e=c.model.getParent(a.cell);!g&& -!d&&null!=e;)d=c.isCellSelected(e),e=c.model.getParent(e);(g||d)&&T.apply(this,arguments)};h.drawState(this.getView().getState(this.model.root),q);this.updateSvgLinks(B,k,!0);return B}finally{m&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.updateSvgLinks=function(a,b,c){a=a.getElementsByTagName("a");for(var d=0;d<a.length;d++){var e=a[d].getAttribute("href");null==e&&(e=a[d].getAttribute("xlink:href"));null!=e&&(null!=b&&/^https?:\/\//.test(e)?a[d].setAttribute("target", -b):c&&this.isCustomLink(e)&&a[d].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(a){return new mxSvgCanvas2D(a)};Graph.prototype.getSelectedElement=function(){var a=null;if(window.getSelection){var b=window.getSelection();b.getRangeAt&&b.rangeCount&&(a=b.getRangeAt(0).commonAncestorContainer)}else document.selection&&(a=document.selection.createRange().parentElement());return a};Graph.prototype.getParentByName=function(a,b,c){for(;null!=a&&a.nodeName!=b;){if(a== -c)return null;a=a.parentNode}return a};Graph.prototype.getParentByNames=function(a,b,c){for(;null!=a&&!(0<=mxUtils.indexOf(b,a.nodeName));){if(a==c)return null;a=a.parentNode}return a};Graph.prototype.selectNode=function(a){var b=null;if(window.getSelection){if(b=window.getSelection(),b.getRangeAt&&b.rangeCount){var c=document.createRange();c.selectNode(a);b.removeAllRanges();b.addRange(c)}}else(b=document.selection)&&"Control"!=b.type&&(a=b.createRange(),a.collapse(!0),c=b.createRange(),c.setEndPoint("StartToStart", -a),c.select())};Graph.prototype.insertRow=function(a,b){for(var c=a.tBodies[0],d=c.rows[0].cells,e=0,g=0;g<d.length;g++)var f=d[g].getAttribute("colspan"),e=e+(null!=f?parseInt(f):1);c=c.insertRow(b);for(g=0;g<e;g++)mxUtils.br(c.insertCell(-1));return c.cells[0]};Graph.prototype.deleteRow=function(a,b){a.tBodies[0].deleteRow(b)};Graph.prototype.insertColumn=function(a,b){var c=a.tHead;if(null!=c)for(var d=0;d<c.rows.length;d++){var e=document.createElement("th");c.rows[d].appendChild(e);mxUtils.br(e)}c= -a.tBodies[0];for(d=0;d<c.rows.length;d++)e=c.rows[d].insertCell(b),mxUtils.br(e);return c.rows[0].cells[0<=b?b:c.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(a,b){if(0<=b)for(var c=a.tBodies[0].rows,d=0;d<c.length;d++)c[d].cells.length>b&&c[d].deleteCell(b)};Graph.prototype.pasteHtmlAtCaret=function(a){var b;if(window.getSelection){if(b=window.getSelection(),b.getRangeAt&&b.rangeCount){b=b.getRangeAt(0);b.deleteContents();var c=document.createElement("div");c.innerHTML=a;a=document.createDocumentFragment(); -for(var d;d=c.firstChild;)lastNode=a.appendChild(d);b.insertNode(a)}}else(b=document.selection)&&"Control"!=b.type&&b.createRange().pasteHTML(a)};Graph.prototype.createLinkForHint=function(a,b){function c(a,b){a.length>b&&(a=a.substring(0,Math.round(b/2))+"..."+a.substring(a.length-Math.round(b/4)));return a}a=null!=a?a:"javascript:void(0);";if(null==b||0==b.length)b=this.isCustomLink(a)?this.getLinkTitle(a):a;var d=document.createElement("a");d.setAttribute("rel",this.linkRelation);d.setAttribute("href", -this.getAbsoluteUrl(a));d.setAttribute("title",c(this.isCustomLink(a)?this.getLinkTitle(a):a,80));null!=this.linkTarget&&d.setAttribute("target",this.linkTarget);mxUtils.write(d,c(b,40));this.isCustomLink(a)&&mxEvent.addListener(d,"click",mxUtils.bind(this,function(b){this.customLinkClicked(a);mxEvent.consume(b)}));return d};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING, -function(a,b){this.popupMenuHandler.hideMenu()});var a=this.updateMouseEvent;this.updateMouseEvent=function(b){b=a.apply(this,arguments);if(mxEvent.isTouchEvent(b.getEvent())&&null==b.getState()){var c=this.getCellAt(b.graphX,b.graphY);null!=c&&this.isSwimlane(c)&&this.hitsSwimlaneContent(c,b.graphX,b.graphY)||(b.state=this.view.getState(c),null!=b.state&&null!=b.state.shape&&(this.container.style.cursor=b.state.shape.node.style.cursor))}null==b.getState()&&this.isEnabled()&&(this.container.style.cursor= -"default");return b};var b=!1,c=!1,d=!1,e=this.fireMouseEvent;this.fireMouseEvent=function(a,g,f){a==mxEvent.MOUSE_DOWN&&(g=this.updateMouseEvent(g),b=this.isCellSelected(g.getCell()),c=this.isSelectionEmpty(),d=this.popupMenuHandler.isMenuShowing());e.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(a,e){this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==e.getState()||!e.isSource(e.getState().control))&&(this.popupMenuHandler.popupTrigger|| -!d&&!mxEvent.isMouseEvent(e.getEvent())&&(c&&null==e.getCell()&&this.isSelectionEmpty()||b&&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){!this.isTableSelected()==(null==b||!mxEvent.isShiftDown(b))&&(this.graph.cellEditor.setAlign(a),this.graph.processElements(this.textarea,function(a){a.removeAttribute("align");a.style.textAlign=null}));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(T){}};var f=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br", -"1"));f.apply(this,arguments)};var e=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(a,b){this.isKeepFocusEvent(a)||!mxEvent.isAltDown(a.getEvent())?e.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(a){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var h=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(a,b){h.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 g=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)}g.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){h=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<h.length&&"\n"==h.charAt(h.length-1)&&(h=h.substring(0,h.length-1));h=this.graph.sanitizeHtml(b?h.replace(/\n/g,"<br/>"):h,!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),g=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,f=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,a=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE;this.textarea.style.lineHeight= -mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(d*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(d)+"px";this.textarea.style.textDecoration=a?"underline":"";this.textarea.style.fontWeight=g?"bold":"normal";this.textarea.style.fontStyle=f?"italic":"";this.textarea.style.fontFamily=b;this.textarea.style.textAlign=e;this.textarea.style.padding="0px";this.textarea.innerHTML!=h&&(this.textarea.innerHTML=h,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML= -this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length));this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerHTML="");var h=mxUtils.htmlEntities(this.textarea.innerHTML);mxClient.IS_QUIRKS||8==document.documentMode||(h=mxUtils.replaceTrailingNewlines(h,"<div><br></div>"));h=this.graph.sanitizeHtml(b?h.replace(/\n/g,"").replace(/<br\s*.?>/g,"<br>"):h,!0);this.textarea.className="mxCellEditor mxPlainTextEditor"; -var d=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(d*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(d)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.padding="2px";this.textarea.innerHTML!=h&&(this.textarea.innerHTML= -h);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=c;this.resize()}};var k=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="",k.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,!0);return b="1"==mxUtils.getValue(a.style,"nl2Br","1")?b.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):b.replace(/\r\n/g, -"").replace(/\n/g,"")};var l=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(a){this.codeViewMode&&this.toggleViewMode();l.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(B){}};var m=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(a,b){this.graph.getModel().beginUpdate();try{if(m.apply(this,arguments),this.graph.isCellDeletable(a.cell)&&0==this.graph.model.getChildCount(a.cell)){var c= -mxUtils.getValue(a.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),d=mxUtils.getValue(a.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);""==b&&c==mxConstants.NONE&&d==mxConstants.NONE&&this.graph.removeCells([a.cell],!1)}}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(a){var b=mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);null!=b&&b!=mxConstants.NONE||!(null!=a.cell.geometry&&0<a.cell.geometry.width)||0==mxUtils.getValue(a.style, -mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(a.style,mxConstants.STYLE_HORIZONTAL,1)||(b=mxUtils.getValue(a.style,mxConstants.STYLE_FILLCOLOR,null));b==mxConstants.NONE&&(b=null);return b};mxCellEditor.prototype.getMinimumSize=function(a){var b=this.graph.getView().scale;return new mxRectangle(0,0,null==a.text?30:a.text.size*b+20,30)};var p=mxGraphHandler.prototype.moveCells;mxGraphHandler.prototype.moveCells=function(a,b,c,d,e,g){mxEvent.isAltDown(g)&&(e=null);p.apply(this,arguments)};mxGraphHandler.prototype.updateHint= -function(b){if(null!=this.shape){null==this.hint&&(this.hint=a(),this.graph.container.appendChild(this.hint));var c=this.graph.view.translate,d=this.graph.view.scale;b=this.roundLength((this.bounds.x+this.currentDx)/d-c.x);c=this.roundLength((this.bounds.y+this.currentDy)/d-c.y);this.hint.innerHTML=b+", "+c;this.hint.style.left=this.shape.bounds.x+Math.round((this.shape.bounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.shape.bounds.y+this.shape.bounds.height+12+"px"}};mxGraphHandler.prototype.removeHint= -function(){null!=this.hint&&(this.hint.parentNode.removeChild(this.hint),this.hint=null)};mxVertexHandler.prototype.isRecursiveResize=function(a,b){return!this.graph.isSwimlane(a.cell)&&0<this.graph.model.getChildCount(a.cell)&&!mxEvent.isControlDown(b.getEvent())&&!this.graph.isCellCollapsed(a.cell)&&"1"==mxUtils.getValue(a.style,"recursiveResize","1")&&null==mxUtils.getValue(a.style,"childLayout",null)};mxVertexHandler.prototype.isCenteredEvent=function(a,b){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(b.getEvent())||mxEvent.isMetaDown(b.getEvent())};var n=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var a=new mxPoint(0,0),b=this.tolerance;this.graph.cellEditor.getEditingCell()==this.state.cell&&null!=this.sizers&&0<this.sizers.length&&null!= -this.sizers[0]?(b/=2,a.x=this.sizers[0].bounds.width+b,a.y=this.sizers[0].bounds.height+b):a=n.apply(this,arguments);return a};mxVertexHandler.prototype.updateHint=function(b){this.index!=mxEvent.LABEL_HANDLE&&(null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint)),this.index==mxEvent.ROTATION_HANDLE?this.hint.innerHTML=this.currentAlpha+"°":(b=this.state.view.scale,this.hint.innerHTML=this.roundLength(this.bounds.width/b)+" x "+this.roundLength(this.bounds.height/ -b)),b=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0"),null==b&&(b=this.bounds),this.hint.style.left=b.x+Math.round((b.width-this.hint.clientWidth)/2)+"px",this.hint.style.top=b.y+b.height+12+"px",null!=this.linkHint&&(this.linkHint.style.display="none"))};mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint= -function(b,c){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));var d=this.graph.view.translate,e=this.graph.view.scale,g=this.roundLength(c.x/e-d.x),d=this.roundLength(c.y/e-d.y);this.hint.innerHTML=g+", "+d;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(b.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(b.getGraphY(),c.y)+this.state.view.graph.gridSize+"px";null!=this.linkHint&&(this.linkHint.style.display="none")};mxEdgeHandler.prototype.removeHint=mxVertexHandler.prototype.removeHint;HoverIcons.prototype.mainHandle=mxClient.IS_SVG?Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+ -HoverIcons.prototype.arrowFill+'" stroke-width="1"/>'):new mxImage(IMAGE_PATH+"/handle-main.png",17,17);HoverIcons.prototype.secondaryHandle=mxClient.IS_SVG?Graph.createSvgImage(16,16,'<path d="m 8 3 L 13 8 L 8 13 L 3 8 z" stroke="#fff" fill="#fca000"/>'):new mxImage(IMAGE_PATH+"/handle-secondary.png",17,17);HoverIcons.prototype.fixedHandle=mxClient.IS_SVG?Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'" stroke-width="1"/><path d="m 7 7 L 11 11 M 7 11 L 11 7" stroke="#fff"/>'): -new mxImage(IMAGE_PATH+"/handle-fixed.png",17,17);HoverIcons.prototype.terminalHandle=mxClient.IS_SVG?Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'" stroke-width="1"/><circle cx="9" cy="9" r="2" stroke="#fff" fill="transparent"/>'):new mxImage(IMAGE_PATH+"/handle-terminal.png",17,17);HoverIcons.prototype.rotationHandle=new mxImage(mxClient.IS_SVG?"data:image/png;base64,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": +"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.PIXELS:return a;case mxConstants.CENTIMETERS:return(a/mxConstants.PIXELS_PER_CM).toFixed(2);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 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};mxConnectionHandler.prototype.isCellEnabled=function(a){return!this.graph.isCellLocked(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+"/default.xml").getDocumentElement():null;null!=a&&(new mxCodec(a.ownerDocument)).decode(a,this.getStylesheet())};Graph.prototype.importGraphModel=function(a,b,c,d){b=null!=b?b:0;c=null!=c?c:0;var e=new mxCodec(a.ownerDocument),f=new mxGraphModel;e.decode(a,f);a=[];e=f.getChildren(this.cloneCell(f.root,this.isCloneInvalidEdges()));if(null!=e){e=e.slice();this.model.beginUpdate();try{if(1!=e.length|| +this.isCellLocked(this.getDefaultParent()))for(f=0;f<e.length;f++)a=a.concat(this.model.getChildren(this.moveCells([e[f]],b,c,!1,this.model.getRoot())[0]));else a=this.moveCells(f.getChildren(e[0]),b,c,!1,this.getDefaultParent());if(d){this.isGridEnabled()&&(b=this.snap(b),c=this.snap(c));var g=this.getBoundingBoxFromGeometry(a,!0);null!=g&&this.moveCells(a,b-g.x,c-g.y)}}finally{this.model.endUpdate()}}return a};Graph.prototype.getAllConnectionConstraints=function(a,b){if(null!=a){var c=mxUtils.getValue(a.style, +"points",null);if(null!=c){var d=[];try{for(var e=JSON.parse(c),c=0;c<e.length;c++){var f=e[c];d.push(new mxConnectionConstraint(new mxPoint(f[0],f[1]),2<f.length?"0"!=f[2]:!0,null,3<f.length?f[3]:0,4<f.length?f[4]:0))}}catch(Y){}return d}if(null!=a.shape&&null!=a.shape.bounds){f=a.shape.direction;e=a.shape.bounds;c=a.shape.scale;d=e.width/c;e=e.height/c;if(f==mxConstants.DIRECTION_NORTH||f==mxConstants.DIRECTION_SOUTH)f=d,d=e,e=f;c=a.shape.getConstraints(a.style,d,e);if(null!=c)return c;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 b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);null!=b&&(b=mxUtils.getValue(b,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL,this.setCellStyles(mxConstants.STYLE_ELBOW,b,[a]))}};Graph.prototype.isValidRoot= +function(a){for(var b=this.model.getChildCount(a),c=0,d=0;d<b;d++){var e=this.model.getChildAt(a,d);this.model.isVertex(e)&&(e=this.getCellGeometry(e),null==e||e.relative||c++)}return 0<c||this.isContainer(a)};Graph.prototype.isValidDropTarget=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return"1"!=mxUtils.getValue(b,"part","0")&&(this.isContainer(a)||mxGraph.prototype.isValidDropTarget.apply(this,arguments)&&"0"!=mxUtils.getValue(b,"dropTarget","1"))};Graph.prototype.createGroupCell= +function(){var a=mxGraph.prototype.createGroupCell.apply(this,arguments);a.setStyle("group");return a};Graph.prototype.isExtendParentsOnAdd=function(a){var b=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(b&&null!=a&&null!=this.layoutManager){var c=this.model.getParent(a);null!=c&&(c=this.layoutManager.getLayout(c),null!=c&&c.constructor==mxStackLayout&&(b=!1))}return b};Graph.prototype.getPreferredSizeForCell=function(a){var b=mxGraph.prototype.getPreferredSizeForCell.apply(this, +arguments);null!=b&&(b.width+=10,b.height+=4,this.gridEnabled&&(b.width=this.snap(b.width),b.height=this.snap(b.height)));return b};Graph.prototype.turnShapes=function(a){var b=this.getModel(),c=[];b.beginUpdate();try{for(var d=0;d<a.length;d++){var e=a[d];if(b.isEdge(e)){var f=b.getTerminal(e,!0),g=b.getTerminal(e,!1);b.setTerminal(e,g,!0);b.setTerminal(e,f,!1);var h=b.getGeometry(e);if(null!=h){h=h.clone();null!=h.points&&h.points.reverse();var k=h.getTerminalPoint(!0),l=h.getTerminalPoint(!1); +h.setTerminalPoint(k,!1);h.setTerminalPoint(l,!0);b.setGeometry(e,h);var m=this.view.getState(e),C=this.view.getState(f),n=this.view.getState(g);if(null!=m){var p=null!=C?this.getConnectionConstraint(m,C,!0):null,q=null!=n?this.getConnectionConstraint(m,n,!1):null;this.setConnectionConstraint(e,f,!0,q);this.setConnectionConstraint(e,g,!1,p)}c.push(e)}}else if(b.isVertex(e)&&(h=this.getCellGeometry(e),null!=h)){h=h.clone();h.x+=h.width/2-h.height/2;h.y+=h.height/2-h.width/2;var v=h.width;h.width=h.height; +h.height=v;b.setGeometry(e,h);var t=this.view.getState(e);if(null!=t){var r=t.style[mxConstants.STYLE_DIRECTION]||"east";"east"==r?r="south":"south"==r?r="west":"west"==r?r="north":"north"==r&&(r="east");this.setCellStyles(mxConstants.STYLE_DIRECTION,r,[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);if(a instanceof mxValueChange&&null!=a.cell&&null!=a.cell.value&&"object"==typeof a.cell.value){var b=this.model.getDescendants(a.cell);if(0<b.length)for(var c=0;c<b.length;c++){var d=this.view.getState(b[c]);null!=d&&null!=d.shape&&null!=d.shape.stencil&&this.stencilHasPlaceholders(d.shape.stencil)?this.removeStateForCell(b[c]):this.isReplacePlaceholders(b[c])&&this.view.invalidate(b[c],!1,!1)}}};Graph.prototype.replaceElement= +function(a,b){for(var c=a.ownerDocument.createElement(null!=b?b:"span"),d=Array.prototype.slice.call(a.attributes);attr=d.pop();)c.setAttribute(attr.nodeName,attr.nodeValue);c.innerHTML=a.innerHTML;a.parentNode.replaceChild(c,a)};Graph.prototype.processElements=function(a,b){for(var c=a.getElementsByTagName("*"),d=0;d<c.length;d++)b(c[d])};Graph.prototype.updateLabelElements=function(a,b,c){a=null!=a?a:this.getSelectionCells();for(var d=document.createElement("div"),e=0;e<a.length;e++)if(this.isHtmlLabel(a[e])){var f= +this.convertValueToString(a[e]);if(null!=f&&0<f.length){d.innerHTML=f;for(var g=d.getElementsByTagName(null!=c?c:"*"),h=0;h<g.length;h++)b(g[h]);d.innerHTML!=f&&this.cellLabelChanged(a[e],d.innerHTML)}}};Graph.prototype.cellLabelChanged=function(a,b,c){b=Graph.zapGremlins(b);this.model.beginUpdate();try{if(null!=a.value&&"object"==typeof a.value){if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder"))for(var d=a.getAttribute("placeholder"),e=a;null!=e;){if(e==this.model.getRoot()|| +null!=e.value&&"object"==typeof e.value&&e.hasAttribute(d)){this.setAttributeForCell(e,d,b);break}e=this.model.getParent(e)}var f=a.value.cloneNode(!0);f.setAttribute("label",b);b=f}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(a){if(null!=a){for(var b=new mxDictionary,c=0;c<a.length;c++)b.put(a[c],!0);for(var d=[],c=0;c<a.length;c++){var e=this.model.getParent(a[c]);null==e||b.get(e)||(b.put(e,!0),d.push(e))}for(c= +0;c<d.length;c++)if(e=this.view.getState(d[c]),null!=e&&(this.model.isEdge(e.cell)||this.model.isVertex(e.cell))&&this.isCellDeletable(e.cell)){var f=mxUtils.getValue(e.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),g=mxUtils.getValue(e.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);if(f==mxConstants.NONE&&g==mxConstants.NONE){f=!0;for(g=0;g<this.model.getChildCount(e.cell)&&f;g++)b.get(this.model.getChildAt(e.cell,g))||(f=!1);f&&a.push(e.cell)}}}mxGraph.prototype.cellsRemoved.apply(this, +arguments)};Graph.prototype.removeCellsAfterUngroup=function(a){for(var b=[],c=0;c<a.length;c++)if(this.isCellDeletable(a[c])){var d=this.view.getState(a[c]);if(null!=d){var e=mxUtils.getValue(d.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),d=mxUtils.getValue(d.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);e==mxConstants.NONE&&d==mxConstants.NONE&&b.push(a[c])}}a=b;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(a,b){this.setAttributeForCell(a, +"link",b)};Graph.prototype.setTooltipForCell=function(a,b){this.setAttributeForCell(a,"tooltip",b)};Graph.prototype.getAttributeForCell=function(a,b,c){return null!=a.value&&"object"===typeof a.value?a.value.getAttribute(b)||c:c};Graph.prototype.setAttributeForCell=function(a,b,c){var d;null!=a.value&&"object"==typeof a.value?d=a.value.cloneNode(!0):(d=mxUtils.createXmlDocument().createElement("UserObject"),d.setAttribute("label",a.value||""));null!=c?d.setAttribute(b,c):d.removeAttribute(b);this.model.setValue(a, +d)};Graph.prototype.getDropTarget=function(a,b,c,d){this.getModel();if(mxEvent.isAltDown(b))return null;for(var e=0;e<a.length;e++)if(this.model.isEdge(this.model.getParent(a[e])))return null;return mxGraph.prototype.getDropTarget.apply(this,arguments)};Graph.prototype.click=function(a){mxGraph.prototype.click.call(this,a);this.firstClickState=a.getState();this.firstClickSource=a.getSource()};Graph.prototype.dblClick=function(a,b){if(this.isEnabled()){var c=mxUtils.convertPoint(this.container,mxEvent.getClientX(a), +mxEvent.getClientY(a));if(null!=a&&!this.model.isVertex(b)){var d=this.model.isEdge(b)?this.view.getState(b):null,e=mxEvent.getSource(a);this.firstClickState!=d||this.firstClickSource!=e||null!=d&&null!=d.text&&null!=d.text.node&&null!=d.text.boundingBox&&(mxUtils.contains(d.text.boundingBox,c.x,c.y)||mxUtils.isAncestorNode(d.text.node,mxEvent.getSource(a)))||(null!=d||this.isCellLocked(this.getDefaultParent()))&&(null==d||this.isCellLocked(d.cell))||!(null!=d||mxClient.IS_VML&&e==this.view.getCanvas()|| +mxClient.IS_SVG&&e==this.view.getCanvas().ownerSVGElement)||(b=this.addText(c.x,c.y,d))}mxGraph.prototype.dblClick.call(this,a,b)}};Graph.prototype.getInsertPoint=function(){var a=this.getGridSize(),b=this.container.scrollLeft/this.view.scale-this.view.translate.x,c=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible)var d=this.getPageLayout(),e=this.getPageSize(),b=Math.max(b,d.x*e.width),c=Math.max(c,d.y*e.height);return new mxPoint(this.snap(b+a),this.snap(c+a))}; +Graph.prototype.getFreeInsertPoint=function(){var a=this.view,b=this.getGraphBounds(),c=this.getInsertPoint(),d=this.snap(Math.round(Math.max(c.x,b.x/a.scale-a.translate.x+(0==b.width?2*this.gridSize:0)))),a=this.snap(Math.round(Math.max(c.y,(b.y+b.height)/a.scale-a.translate.y+2*this.gridSize)));return new mxPoint(d,a)};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.addText=function(a,b,c){var d=new mxCell;d.value="Text";d.style="text;html=1;resizable=0;points=[];";d.geometry= +new mxGeometry(0,0,0,0);d.vertex=!0;if(null!=c){d.style+="align=center;verticalAlign=middle;labelBackgroundColor=#ffffff;";d.geometry.relative=!0;d.connectable=!1;var e=this.view.getRelativePoint(c,a,b);d.geometry.x=Math.round(1E4*e.x)/1E4;d.geometry.y=Math.round(e.y);d.geometry.offset=new mxPoint(0,0);var e=this.view.getPoint(c,d.geometry),f=this.view.scale;d.geometry.offset=new mxPoint(Math.round((a-e.x)/f),Math.round((b-e.y)/f))}else d.style+="autosize=1;align=left;verticalAlign=top;spacingTop=-4;", +e=this.view.translate,d.geometry.width=40,d.geometry.height=20,d.geometry.x=Math.round(a/this.view.scale)-e.x,d.geometry.y=Math.round(b/this.view.scale)-e.y;this.getModel().beginUpdate();try{this.addCells([d],null!=c?c.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[d])),this.autoSizeCell(d)}finally{this.getModel().endUpdate()}return d};Graph.prototype.addClickHandler=function(a,b,c){var d=mxUtils.bind(this,function(){var a=this.container.getElementsByTagName("a");if(null!=a)for(var c= +0;c<a.length;c++){var d=this.getAbsoluteUrl(a[c].getAttribute("href"));null!=d&&(a[c].setAttribute("rel",this.linkRelation),a[c].setAttribute("href",d),null!=b&&mxEvent.addGestureListeners(a[c],null,null,b))}});this.model.addListener(mxEvent.CHANGE,d);d();var e=this.container.style.cursor,f=this.getTolerance(),g=this,h={currentState:null,currentLink:null,highlight:null!=a&&""!=a&&a!=mxConstants.NONE?new mxCellHighlight(g,a,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(a){var b= +a.sourceState;if(null==b||null==g.getLinkForCell(b.cell))a=g.getCellAt(a.getGraphX(),a.getGraphY(),null,null,null,function(a,b,c){return null==g.getLinkForCell(a.cell)}),b=g.view.getState(a);b!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=b,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(a,b){this.startX=b.getGraphX();this.startY=b.getGraphY();this.scrollLeft=g.container.scrollLeft;this.scrollTop=g.container.scrollTop;null==this.currentLink&& +"auto"==g.container.style.overflow&&(g.container.style.cursor="move");this.updateCurrentState(b)},mouseMove:function(a,b){if(g.isMouseDown){if(null!=this.currentLink){var c=Math.abs(this.startX-b.getGraphX()),d=Math.abs(this.startY-b.getGraphY());(c>f||d>f)&&this.clear()}}else{for(c=b.getSource();null!=c&&"a"!=c.nodeName.toLowerCase();)c=c.parentNode;null!=c?this.clear():(null!=g.tooltipHandler&&null!=this.currentLink&&null!=this.currentState&&g.tooltipHandler.reset(b,!0,this.currentState),(null== +this.currentState||b.getState()!=this.currentState&&null!=b.sourceState||!g.intersects(this.currentState,b.getGraphX(),b.getGraphY()))&&this.updateCurrentState(b))}},mouseUp:function(a,d){for(var e=d.getSource(),h=d.getEvent();null!=e&&"a"!=e.nodeName.toLowerCase();)e=e.parentNode;null==e&&Math.abs(this.scrollLeft-g.container.scrollLeft)<f&&Math.abs(this.scrollTop-g.container.scrollTop)<f&&(null==d.sourceState||!d.isSource(d.sourceState.control))&&((mxEvent.isLeftMouseButton(h)||mxEvent.isMiddleMouseButton(h))&& +!mxEvent.isPopupTrigger(h)||mxEvent.isTouchEvent(h))&&(null!=this.currentLink?(e=g.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&e||null==b||b(h,this.currentLink),mxEvent.isConsumed(h)||(h=mxEvent.isMiddleMouseButton(h)?"_blank":e?g.linkTarget:"_top",g.openLink(this.currentLink,h),d.consume())):null!=c&&!d.isConsumed()&&Math.abs(this.scrollLeft-g.container.scrollLeft)<f&&Math.abs(this.scrollTop-g.container.scrollTop)<f&&Math.abs(this.startX-d.getGraphX())<f&&Math.abs(this.startY- +d.getGraphY())<f&&c(d.getEvent()));this.clear()},activate:function(a){this.currentLink=g.getAbsoluteUrl(g.getLinkForCell(a.cell));null!=this.currentLink&&(g.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(a))},clear:function(){null!=g.container&&(g.container.style.cursor=e);this.currentLink=this.currentState=null;null!=this.highlight&&this.highlight.hide();null!=g.tooltipHandler&&g.tooltipHandler.hide()}};g.click=function(a){};g.addMouseListener(h);mxEvent.addListener(document, +"mouseleave",function(a){h.clear()})};Graph.prototype.duplicateCells=function(a,b){a=null!=a?a:this.getSelectionCells();b=null!=b?b:!0;a=this.model.getTopmostCells(a);var c=this.getModel(),d=this.gridSize,e=[];c.beginUpdate();try{for(var f=this.cloneCells(a,!1,null,!0),g=0;g<a.length;g++){var h=c.getParent(a[g]),k=this.moveCells([f[g]],d,d,!1)[0];e.push(k);if(b)c.add(h,f[g]);else{var l=h.getIndex(a[g]);c.add(h,f[g],l+1)}}}finally{c.endUpdate()}return e};Graph.prototype.insertImage=function(a,b,c){if(null!= +a&&null!=this.cellEditor.textarea){for(var d=this.cellEditor.textarea.getElementsByTagName("img"),e=[],f=0;f<d.length;f++)e.push(d[f]);document.execCommand("insertimage",!1,a);a=this.cellEditor.textarea.getElementsByTagName("img");if(a.length==e.length+1)for(f=a.length-1;0<=f;f--)if(0==f||a[f]!=e[f-1]){a[f].setAttribute("width",b);a[f].setAttribute("height",c);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 b= +this.cellEditor.textarea.getElementsByTagName("a"),c=[],d=0;d<b.length;d++)c.push(b[d]);document.execCommand("createlink",!1,mxUtils.trim(a));b=this.cellEditor.textarea.getElementsByTagName("a");if(b.length==c.length+1)for(d=b.length-1;0<=d;d--)if(b[d]!=c[d-1]){for(b=b[d].getElementsByTagName("a");0<b.length;){for(c=b[0].parentNode;null!=b[0].firstChild;)c.insertBefore(b[0].firstChild,b[0]);c.removeChild(b[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(a))};Graph.prototype.isCellResizable= +function(a){var b=mxGraph.prototype.isCellResizable.apply(this,arguments),c=this.view.getState(a),c=null!=c?c.style:this.getCellStyle(a);return b||"0"!=mxUtils.getValue(c,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==c[mxConstants.STYLE_WHITE_SPACE]};Graph.prototype.distributeCells=function(a,b){null==b&&(b=this.getSelectionCells());if(null!=b&&1<b.length){for(var c=[],d=null,e=null,f=0;f<b.length;f++)if(this.getModel().isVertex(b[f])){var g=this.view.getState(b[f]);if(null!=g){var h=a?g.getCenterX(): +g.getCenterY(),d=null!=d?Math.max(d,h):h,e=null!=e?Math.min(e,h):h;c.push(g)}}if(2<c.length){c.sort(function(b,c){return a?b.x-c.x:b.y-c.y});g=this.view.translate;h=this.view.scale;e=e/h-(a?g.x:g.y);d=d/h-(a?g.x:g.y);this.getModel().beginUpdate();try{for(var k=(d-e)/(c.length-1),d=e,f=1;f<c.length-1;f++){var l=this.view.getState(this.model.getParent(c[f].cell)),m=this.getCellGeometry(c[f].cell),d=d+k;null!=m&&null!=l&&(m=m.clone(),a?m.x=Math.round(d-m.width/2)-l.origin.x:m.y=Math.round(d-m.height/ +2)-l.origin.y,this.getModel().setGeometry(c[f].cell,m))}}finally{this.getModel().endUpdate()}}}return b};Graph.prototype.isCloneEvent=function(a){return mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxEvent.isControlDown(a)};Graph.prototype.encodeCells=function(a){for(var b=this.cloneCells(a),c=new mxDictionary,d=0;d<a.length;d++)c.put(a[d],!0);for(d=0;d<b.length;d++){var e=this.view.getState(a[d]);if(null!=e){var f=this.getCellGeometry(b[d]);null==f||!f.relative||this.model.isEdge(a[d])||c.get(this.model.getParent(a[d]))|| +(f.relative=!1,f.x=e.x/e.view.scale-e.view.translate.x,f.y=e.y/e.view.scale-e.view.translate.y)}}c=new mxCodec;e=new mxGraphModel;f=e.getChildAt(e.getRoot(),0);for(d=0;d<a.length;d++)e.add(f,b[d]);return c.encode(e)};Graph.prototype.createSvgImageExport=function(){var a=new mxImageExport;a.getLinkForCellState=mxUtils.bind(this,function(a,b){return this.getLinkForCell(a.cell)});return a};Graph.prototype.getSvg=function(a,b,c,d,e,f,g,h,k,l){var m=this.useCssTransforms;m&&(this.useCssTransforms=!1,this.view.revalidate(), +this.sizeDidChange());try{b=null!=b?b:1;c=null!=c?c:0;e=null!=e?e:!0;f=null!=f?f:!0;g=null!=g?g:!0;var A=f||d?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==A)throw Error(mxResources.get("drawingEmpty"));var n=this.view.scale,p=mxUtils.createXmlDocument(),C=null!=p.createElementNS?p.createElementNS(mxConstants.NS_SVG,"svg"):p.createElement("svg");null!=a&&(null!=C.style?C.style.backgroundColor=a:C.setAttribute("style","background-color:"+a));null==p.createElementNS?(C.setAttribute("xmlns", +mxConstants.NS_SVG),C.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):C.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=b/n;var q=Math.max(1,Math.ceil(A.width*a)+2*c)+(l?5:0),v=Math.max(1,Math.ceil(A.height*a)+2*c)+(l?5:0);C.setAttribute("version","1.1");C.setAttribute("width",q+"px");C.setAttribute("height",v+"px");C.setAttribute("viewBox",(e?"-0.5 -0.5":"0 0")+" "+q+" "+v);p.appendChild(C);var L=null!=p.createElementNS?p.createElementNS(mxConstants.NS_SVG, +"g"):p.createElement("g");C.appendChild(L);var r=this.createSvgCanvas(L);r.foOffset=e?-.5:0;r.textOffset=e?-.5:0;r.imageOffset=e?-.5:0;r.translate(Math.floor((c/b-A.x)/n),Math.floor((c/b-A.y)/n));var t=document.createElement("textarea"),w=r.createAlternateContent;r.createAlternateContent=function(a,b,c,d,e,f,g,h,k,l,m,A,n){var p=this.state;if(null!=this.foAltText&&(0==d||0!=p.fontSize&&f.length<5*d/p.fontSize)){var C=this.createElement("text");C.setAttribute("x",Math.round(d/2));C.setAttribute("y", +Math.round((e+p.fontSize)/2));C.setAttribute("fill",p.fontColor||"black");C.setAttribute("text-anchor","middle");C.setAttribute("font-size",Math.round(p.fontSize)+"px");C.setAttribute("font-family",p.fontFamily);(p.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&C.setAttribute("font-weight","bold");(p.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&C.setAttribute("font-style","italic");(p.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&C.setAttribute("text-decoration", +"underline");try{return t.innerHTML=f,C.textContent=t.value,C}catch(ra){return w.apply(this,arguments)}}else return w.apply(this,arguments)};var u=this.backgroundImage;if(null!=u){b=n/b;var y=this.view.translate,D=new mxRectangle(y.x*b,y.y*b,u.width*b,u.height*b);mxUtils.intersects(A,D)&&r.image(y.x,y.y,u.width,u.height,u.src,!0)}r.scale(a);r.textEnabled=g;h=null!=h?h:this.createSvgImageExport();var z=h.drawCellState,x=h.getLinkForCellState;h.getLinkForCellState=function(a,b){var c=x.apply(this,arguments); +return null==c||a.view.graph.isCustomLink(c)?null:c};h.drawCellState=function(a,b){for(var c=a.view.graph,d=c.isCellSelected(a.cell),e=c.model.getParent(a.cell);!f&&!d&&null!=e;)d=c.isCellSelected(e),e=c.model.getParent(e);(f||d)&&z.apply(this,arguments)};h.drawState(this.getView().getState(this.model.root),r);this.updateSvgLinks(C,k,!0);return C}finally{m&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.updateSvgLinks=function(a,b,c){a=a.getElementsByTagName("a"); +for(var d=0;d<a.length;d++){var e=a[d].getAttribute("href");null==e&&(e=a[d].getAttribute("xlink:href"));null!=e&&(null!=b&&/^https?:\/\//.test(e)?a[d].setAttribute("target",b):c&&this.isCustomLink(e)&&a[d].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(a){return new mxSvgCanvas2D(a)};Graph.prototype.getSelectedElement=function(){var a=null;if(window.getSelection){var b=window.getSelection();b.getRangeAt&&b.rangeCount&&(a=b.getRangeAt(0).commonAncestorContainer)}else document.selection&& +(a=document.selection.createRange().parentElement());return a};Graph.prototype.getParentByName=function(a,b,c){for(;null!=a&&a.nodeName!=b;){if(a==c)return null;a=a.parentNode}return a};Graph.prototype.getParentByNames=function(a,b,c){for(;null!=a&&!(0<=mxUtils.indexOf(b,a.nodeName));){if(a==c)return null;a=a.parentNode}return a};Graph.prototype.selectNode=function(a){var b=null;if(window.getSelection){if(b=window.getSelection(),b.getRangeAt&&b.rangeCount){var c=document.createRange();c.selectNode(a); +b.removeAllRanges();b.addRange(c)}}else(b=document.selection)&&"Control"!=b.type&&(a=b.createRange(),a.collapse(!0),c=b.createRange(),c.setEndPoint("StartToStart",a),c.select())};Graph.prototype.insertRow=function(a,b){for(var c=a.tBodies[0],d=c.rows[0].cells,e=0,f=0;f<d.length;f++)var g=d[f].getAttribute("colspan"),e=e+(null!=g?parseInt(g):1);c=c.insertRow(b);for(f=0;f<e;f++)mxUtils.br(c.insertCell(-1));return c.cells[0]};Graph.prototype.deleteRow=function(a,b){a.tBodies[0].deleteRow(b)};Graph.prototype.insertColumn= +function(a,b){var c=a.tHead;if(null!=c)for(var d=0;d<c.rows.length;d++){var e=document.createElement("th");c.rows[d].appendChild(e);mxUtils.br(e)}c=a.tBodies[0];for(d=0;d<c.rows.length;d++)e=c.rows[d].insertCell(b),mxUtils.br(e);return c.rows[0].cells[0<=b?b:c.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(a,b){if(0<=b)for(var c=a.tBodies[0].rows,d=0;d<c.length;d++)c[d].cells.length>b&&c[d].deleteCell(b)};Graph.prototype.pasteHtmlAtCaret=function(a){var b;if(window.getSelection){if(b= +window.getSelection(),b.getRangeAt&&b.rangeCount){b=b.getRangeAt(0);b.deleteContents();var c=document.createElement("div");c.innerHTML=a;a=document.createDocumentFragment();for(var d;d=c.firstChild;)lastNode=a.appendChild(d);b.insertNode(a)}}else(b=document.selection)&&"Control"!=b.type&&b.createRange().pasteHTML(a)};Graph.prototype.createLinkForHint=function(a,b){function c(a,b){a.length>b&&(a=a.substring(0,Math.round(b/2))+"..."+a.substring(a.length-Math.round(b/4)));return a}a=null!=a?a:"javascript:void(0);"; +if(null==b||0==b.length)b=this.isCustomLink(a)?this.getLinkTitle(a):a;var d=document.createElement("a");d.setAttribute("rel",this.linkRelation);d.setAttribute("href",this.getAbsoluteUrl(a));d.setAttribute("title",c(this.isCustomLink(a)?this.getLinkTitle(a):a,80));null!=this.linkTarget&&d.setAttribute("target",this.linkTarget);mxUtils.write(d,c(b,40));this.isCustomLink(a)&&mxEvent.addListener(d,"click",mxUtils.bind(this,function(b){this.customLinkClicked(a);mxEvent.consume(b)}));return d};Graph.prototype.initTouch= +function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(a,b){this.popupMenuHandler.hideMenu()});var a=this.updateMouseEvent;this.updateMouseEvent=function(b){b=a.apply(this,arguments);if(mxEvent.isTouchEvent(b.getEvent())&&null==b.getState()){var c=this.getCellAt(b.graphX,b.graphY);null!=c&&this.isSwimlane(c)&&this.hitsSwimlaneContent(c,b.graphX,b.graphY)||(b.state=this.view.getState(c),null!=b.state&& +null!=b.state.shape&&(this.container.style.cursor=b.state.shape.node.style.cursor))}null==b.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return b};var b=!1,c=!1,d=!1,e=this.fireMouseEvent;this.fireMouseEvent=function(a,f,g){a==mxEvent.MOUSE_DOWN&&(f=this.updateMouseEvent(f),b=this.isCellSelected(f.getCell()),c=this.isSelectionEmpty(),d=this.popupMenuHandler.isMenuShowing());e.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(a,e){this.popupMenuHandler.popupTrigger= +!this.isEditing()&&this.isEnabled()&&(null==e.getState()||!e.isSource(e.getState().control))&&(this.popupMenuHandler.popupTrigger||!d&&!mxEvent.isMouseEvent(e.getEvent())&&(c&&null==e.getCell()&&this.isSelectionEmpty()||b&&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){!this.isTableSelected()==(null==b||!mxEvent.isShiftDown(b))&&(this.graph.cellEditor.setAlign(a),this.graph.processElements(this.textarea,function(a){a.removeAttribute("align");a.style.textAlign=null}));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(W){}};var e=mxCellRenderer.prototype.initializeLabel; +mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br","1"));e.apply(this,arguments)};var h=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(a,b){this.isKeepFocusEvent(a)||!mxEvent.isAltDown(a.getEvent())?h.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(a){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing= +!1;var g=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(a,b){g.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 k=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)}k.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){h=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<h.length&&"\n"==h.charAt(h.length-1)&&(h=h.substring(0,h.length-1));h=this.graph.sanitizeHtml(b?h.replace(/\n/g,"<br/>"):h,!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,a=(mxUtils.getValue(a.style, +mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(d*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(d)+"px";this.textarea.style.textDecoration=a?"underline":"";this.textarea.style.fontWeight=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!=h&&(this.textarea.innerHTML=h,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length));this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerHTML="");var h=mxUtils.htmlEntities(this.textarea.innerHTML);mxClient.IS_QUIRKS||8==document.documentMode||(h=mxUtils.replaceTrailingNewlines(h,"<div><br></div>")); +h=this.graph.sanitizeHtml(b?h.replace(/\n/g,"").replace(/<br\s*.?>/g,"<br>"):h,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var d=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(d*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(d)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily= +mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.padding="2px";this.textarea.innerHTML!=h&&(this.textarea.innerHTML=h);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=c;this.resize()}};var l=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="",l.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, +!0);return b="1"==mxUtils.getValue(a.style,"nl2Br","1")?b.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):b.replace(/\r\n/g,"").replace(/\n/g,"")};var m=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(a){this.codeViewMode&&this.toggleViewMode();m.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(C){}};var n=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(a, +b){this.graph.getModel().beginUpdate();try{if(n.apply(this,arguments),this.graph.isCellDeletable(a.cell)&&0==this.graph.model.getChildCount(a.cell)){var c=mxUtils.getValue(a.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),d=mxUtils.getValue(a.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);""==b&&c==mxConstants.NONE&&d==mxConstants.NONE&&this.graph.removeCells([a.cell],!1)}}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(a){var b=mxUtils.getValue(a.style, +mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);null!=b&&b!=mxConstants.NONE||!(null!=a.cell.geometry&&0<a.cell.geometry.width)||0==mxUtils.getValue(a.style,mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(a.style,mxConstants.STYLE_HORIZONTAL,1)||(b=mxUtils.getValue(a.style,mxConstants.STYLE_FILLCOLOR,null));b==mxConstants.NONE&&(b=null);return b};mxCellEditor.prototype.getMinimumSize=function(a){var b=this.graph.getView().scale;return new mxRectangle(0,0,null==a.text?30:a.text.size*b+20,30)};var p= +mxGraphHandler.prototype.moveCells;mxGraphHandler.prototype.moveCells=function(a,b,c,d,e,f){mxEvent.isAltDown(f)&&(e=null);p.apply(this,arguments)};mxGraphView.prototype.formatUnitText=function(a){return a?c(a,this.unit):a};mxGraphHandler.prototype.updateHint=function(b){if(null!=this.shape){null==this.hint&&(this.hint=a(),this.graph.container.appendChild(this.hint));var d=this.graph.view.translate,e=this.graph.view.scale;b=this.roundLength((this.bounds.x+this.currentDx)/e-d.x);d=this.roundLength((this.bounds.y+ +this.currentDy)/e-d.y);e=this.graph.view.unit;this.hint.innerHTML=c(b,e)+", "+c(d,e);this.hint.style.left=this.shape.bounds.x+Math.round((this.shape.bounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.shape.bounds.y+this.shape.bounds.height+12+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(this.hint.parentNode.removeChild(this.hint),this.hint=null)};mxVertexHandler.prototype.isRecursiveResize=function(a,b){return!this.graph.isSwimlane(a.cell)&&0<this.graph.model.getChildCount(a.cell)&& +!mxEvent.isControlDown(b.getEvent())&&!this.graph.isCellCollapsed(a.cell)&&"1"==mxUtils.getValue(a.style,"recursiveResize","1")&&null==mxUtils.getValue(a.style,"childLayout",null)};mxVertexHandler.prototype.isCenteredEvent=function(a,b){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(b.getEvent())||mxEvent.isMetaDown(b.getEvent())}; +var q=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var a=new mxPoint(0,0),b=this.tolerance;this.graph.cellEditor.getEditingCell()==this.state.cell&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(b/=2,a.x=this.sizers[0].bounds.width+b,a.y=this.sizers[0].bounds.height+b):a=q.apply(this,arguments);return a};mxVertexHandler.prototype.updateHint=function(b){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+"°";else{b=this.state.view.scale;var d=this.state.view.unit;this.hint.innerHTML=c(this.roundLength(this.bounds.width/b),d)+" x "+c(this.roundLength(this.bounds.height/b),d)}b=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0");null==b&&(b=this.bounds);this.hint.style.left=b.x+Math.round((b.width-this.hint.clientWidth)/2)+"px";this.hint.style.top= +b.y+b.height+12+"px";null!=this.linkHint&&(this.linkHint.style.display="none")}};mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(b,d){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));var e=this.graph.view.translate,f=this.graph.view.scale,g=this.roundLength(d.x/f-e.x),e=this.roundLength(d.y/f-e.y),f=this.graph.view.unit; +this.hint.innerHTML=c(g,f)+", "+c(e,f);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(b.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(b.getGraphY(), +d.y)+this.state.view.graph.gridSize+"px";null!=this.linkHint&&(this.linkHint.style.display="none")};mxEdgeHandler.prototype.removeHint=mxVertexHandler.prototype.removeHint;HoverIcons.prototype.mainHandle=mxClient.IS_SVG?Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'" stroke-width="1"/>'):new mxImage(IMAGE_PATH+"/handle-main.png",17,17);HoverIcons.prototype.secondaryHandle=mxClient.IS_SVG?Graph.createSvgImage(16,16,'<path d="m 8 3 L 13 8 L 8 13 L 3 8 z" stroke="#fff" fill="#fca000"/>'): +new mxImage(IMAGE_PATH+"/handle-secondary.png",17,17);HoverIcons.prototype.fixedHandle=mxClient.IS_SVG?Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'" stroke-width="1"/><path d="m 7 7 L 11 11 M 7 11 L 11 7" stroke="#fff"/>'):new mxImage(IMAGE_PATH+"/handle-fixed.png",17,17);HoverIcons.prototype.terminalHandle=mxClient.IS_SVG?Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'" stroke-width="1"/><circle cx="9" cy="9" r="2" stroke="#fff" fill="transparent"/>'): +new mxImage(IMAGE_PATH+"/handle-terminal.png",17,17);HoverIcons.prototype.rotationHandle=new mxImage(mxClient.IS_SVG?"data:image/png;base64,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": IMAGE_PATH+"/handle-rotate.png",19,21);mxClient.IS_SVG&&(mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="'+HoverIcons.prototype.arrowFill+'"/>'));mxVertexHandler.prototype.handleImage=HoverIcons.prototype.mainHandle;mxVertexHandler.prototype.secondaryHandleImage=HoverIcons.prototype.secondaryHandle;mxEdgeHandler.prototype.handleImage=HoverIcons.prototype.mainHandle;mxEdgeHandler.prototype.terminalHandleImage=HoverIcons.prototype.terminalHandle; mxEdgeHandler.prototype.fixedHandleImage=HoverIcons.prototype.fixedHandle;mxEdgeHandler.prototype.labelHandleImage=HoverIcons.prototype.secondaryHandle;mxOutline.prototype.sizerImage=HoverIcons.prototype.mainHandle;null!=window.Sidebar&&(Sidebar.prototype.triangleUp=HoverIcons.prototype.triangleUp,Sidebar.prototype.triangleRight=HoverIcons.prototype.triangleRight,Sidebar.prototype.triangleDown=HoverIcons.prototype.triangleDown,Sidebar.prototype.triangleLeft=HoverIcons.prototype.triangleLeft,Sidebar.prototype.refreshTarget= HoverIcons.prototype.refreshTarget,Sidebar.prototype.roundDrop=HoverIcons.prototype.roundDrop);mxClient.IS_SVG||((new Image).src=HoverIcons.prototype.mainHandle.src,(new Image).src=HoverIcons.prototype.fixedHandle.src,(new Image).src=HoverIcons.prototype.terminalHandle.src,(new Image).src=HoverIcons.prototype.secondaryHandle.src,(new Image).src=HoverIcons.prototype.rotationHandle.src,(new Image).src=HoverIcons.prototype.triangleUp.src,(new Image).src=HoverIcons.prototype.triangleRight.src,(new Image).src= HoverIcons.prototype.triangleDown.src,(new Image).src=HoverIcons.prototype.triangleLeft.src,(new Image).src=HoverIcons.prototype.refreshTarget.src,(new Image).src=HoverIcons.prototype.roundDrop.src);mxVertexHandler.prototype.rotationEnabled=!0;mxVertexHandler.prototype.manageSizers=!0;mxVertexHandler.prototype.livePreview=!0;mxRubberband.prototype.defaultOpacity=30;mxConnectionHandler.prototype.outlineConnect=!0;mxCellHighlight.prototype.keepOnTop=!0;mxVertexHandler.prototype.parentHighlightEnabled= !0;mxVertexHandler.prototype.rotationHandleVSpacing=-20;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=-24,mxConstraintHandler.prototype.getTolerance=function(a){return mxEvent.isMouseEvent(a.getEvent())?4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger= -function(a){var b=a.getEvent();return null==a.getState()&&!mxEvent.isMouseEvent(b)||mxEvent.isPopupTrigger(b)&&(null==a.getState()||mxEvent.isControlDown(b)||mxEvent.isShiftDown(b))};var t=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=function(a,b){t.apply(this,arguments);mxEvent.isTouchEvent(b.getEvent())&&this.graph.isCellSelected(b.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(a){var b= +function(a){var b=a.getEvent();return null==a.getState()&&!mxEvent.isMouseEvent(b)||mxEvent.isPopupTrigger(b)&&(null==a.getState()||mxEvent.isControlDown(b)||mxEvent.isShiftDown(b))};var v=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=function(a,b){v.apply(this,arguments);mxEvent.isTouchEvent(b.getEvent())&&this.graph.isCellSelected(b.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(a){var b= a.getEvent();return mxEvent.isLeftMouseButton(b)&&(this.useLeftButtonForPanning&&null==a.getState()||mxEvent.isControlDown(b)&&!mxEvent.isShiftDown(b))||this.usePopupTrigger&&mxEvent.isPopupTrigger(b)};mxRubberband.prototype.isSpaceEvent=function(a){return this.graph.isEnabled()&&!this.graph.isCellLocked(this.graph.getDefaultParent())&&mxEvent.isControlDown(a.getEvent())&&mxEvent.isShiftDown(a.getEvent())};mxRubberband.prototype.mouseUp=function(a,b){var c=null!=this.div&&"none"!=this.div.style.display, -d=null,e=null,g=null,f=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(d=this.first.x,e=this.first.y,g=(this.currentX-d)/this.graph.view.scale,f=(this.currentY-e)/this.graph.view.scale,mxEvent.isAltDown(b.getEvent())||(g=this.graph.snap(g),f=this.graph.snap(f),this.graph.isGridEnabled()||(Math.abs(g)<this.graph.tolerance&&(g=0),Math.abs(f)<this.graph.tolerance&&(f=0))));this.reset();if(c){if(mxEvent.isAltDown(b.getEvent())&&this.graph.isToggleEvent(b.getEvent())){var g=new mxRectangle(this.x, -this.y,this.width,this.height),h=this.graph.getCells(g.x,g.y,g.width,g.height);this.graph.removeSelectionCells(h)}else if(this.isSpaceEvent(b)){this.graph.model.beginUpdate();try{for(h=this.graph.getCellsBeyond(d,e,this.graph.getDefaultParent(),!0,!0),c=0;c<h.length;c++)if(this.graph.isCellMovable(h[c])){var k=this.graph.view.getState(h[c]),l=this.graph.getCellGeometry(h[c]);null!=k&&null!=l&&(l=l.clone(),l.translate(g,f),this.graph.model.setGeometry(h[c],l))}}finally{this.graph.model.endUpdate()}}else g= -new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(g,b.getEvent());b.consume()}};mxRubberband.prototype.mouseMove=function(a,b){if(!b.isConsumed()&&null!=this.first){var c=mxUtils.getScrollOrigin(this.graph.container),d=mxUtils.getOffset(this.graph.container);c.x-=d.x;c.y-=d.y;var d=b.getX()+c.x,c=b.getY()+c.y,e=this.first.x-d,g=this.first.y-c,f=this.graph.tolerance;if(null!=this.div||Math.abs(e)>f||Math.abs(g)>f)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(), +d=null,e=null,f=null,g=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(d=this.first.x,e=this.first.y,f=(this.currentX-d)/this.graph.view.scale,g=(this.currentY-e)/this.graph.view.scale,mxEvent.isAltDown(b.getEvent())||(f=this.graph.snap(f),g=this.graph.snap(g),this.graph.isGridEnabled()||(Math.abs(f)<this.graph.tolerance&&(f=0),Math.abs(g)<this.graph.tolerance&&(g=0))));this.reset();if(c){if(mxEvent.isAltDown(b.getEvent())&&this.graph.isToggleEvent(b.getEvent())){var f=new mxRectangle(this.x, +this.y,this.width,this.height),h=this.graph.getCells(f.x,f.y,f.width,f.height);this.graph.removeSelectionCells(h)}else if(this.isSpaceEvent(b)){this.graph.model.beginUpdate();try{for(h=this.graph.getCellsBeyond(d,e,this.graph.getDefaultParent(),!0,!0),c=0;c<h.length;c++)if(this.graph.isCellMovable(h[c])){var k=this.graph.view.getState(h[c]),l=this.graph.getCellGeometry(h[c]);null!=k&&null!=l&&(l=l.clone(),l.translate(f,g),this.graph.model.setGeometry(h[c],l))}}finally{this.graph.model.endUpdate()}}else f= +new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(f,b.getEvent());b.consume()}};mxRubberband.prototype.mouseMove=function(a,b){if(!b.isConsumed()&&null!=this.first){var c=mxUtils.getScrollOrigin(this.graph.container),d=mxUtils.getOffset(this.graph.container);c.x-=d.x;c.y-=d.y;var d=b.getX()+c.x,c=b.getY()+c.y,e=this.first.x-d,f=this.first.y-c,g=this.graph.tolerance;if(null!=this.div||Math.abs(e)>g||Math.abs(f)>g)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(), this.update(d,c),this.isSpaceEvent(b)?(d=this.x+this.width,c=this.y+this.height,e=this.graph.view.scale,mxEvent.isAltDown(b.getEvent())||(this.width=this.graph.snap(this.width/e)*e,this.height=this.graph.snap(this.height/e)*e,this.graph.isGridEnabled()||(this.width<this.graph.tolerance&&(this.width=0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=d-this.width),this.y<this.first.y&&(this.y=c-this.height)),this.div.style.borderStyle="dashed",this.div.style.backgroundColor= "white",this.div.style.left=this.x+"px",this.div.style.top=this.y+"px",this.div.style.width=Math.max(0,this.width)+"px",this.div.style.height=this.graph.container.clientHeight+"px",this.div.style.borderWidth=0>=this.width?"0px 1px 0px 0px":"0px 1px 0px 1px",null==this.secondDiv&&(this.secondDiv=this.div.cloneNode(!0),this.div.parentNode.appendChild(this.secondDiv)),this.secondDiv.style.left=this.x+"px",this.secondDiv.style.top=this.y+"px",this.secondDiv.style.width=this.graph.container.clientWidth+ -"px",this.secondDiv.style.height=Math.max(0,this.height)+"px",this.secondDiv.style.borderWidth=0>=this.height?"1px 0px 0px 0px":"1px 0px 1px 0px"):(this.div.style.backgroundColor="",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),b.consume()}};var r=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv), -this.secondDiv=null);r.apply(this,arguments)};var w=(new Date).getTime(),v=0,u=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,b,c,d){u.apply(this,arguments);c!=this.currentTerminalState?(w=(new Date).getTime(),v=0):v=(new Date).getTime()-w;this.currentTerminalState=c};var q=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&& -2E3<v||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&q.apply(this,arguments)};mxVertexHandler.prototype.isCustomHandleEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.createHandleShape=function(a,b){var c=null!=a&&0==a,d=this.state.getVisibleTerminalState(c),e=null!=a&&(0==a||a>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==a)?this.graph.getConnectionConstraint(this.state, -d,c):null,c=null!=(null!=e?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(c),e):null)?this.fixedHandleImage:null!=e&&null!=d?this.terminalHandleImage:this.handleImage;if(null!=c)return c=new mxImageShape(new mxRectangle(0,0,c.width,c.height),c.src),c.preserveImageAspect=!1,c;c=mxConstants.HANDLE_SIZE;this.preferHtml&&--c;return new mxRectangleShape(new mxRectangle(0,0,c,c),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var z=mxVertexHandler.prototype.createSizerShape; -mxVertexHandler.prototype.createSizerShape=function(a,b,c){this.handleImage=b==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:b==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return z.apply(this,arguments)};var y=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(a){if(null!=a&&1==a.length){var b=this.graph.getModel(),c=b.getParent(a[0]),d=this.graph.getCellGeometry(a[0]);if(b.isEdge(c)&&null!=d&&d.relative&&(b=this.graph.view.getState(a[0]), -null!=b&&2>b.width&&2>b.height&&null!=b.text&&null!=b.text.boundingBox))return mxRectangle.fromRectangle(b.text.boundingBox)}return y.apply(this,arguments)};var E=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(a){var b=this.graph.getModel(),c=b.getParent(a.cell),d=this.graph.getCellGeometry(a.cell);return b.isEdge(c)&&null!=d&&d.relative&&2>a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox?(b=a.text.unrotatedBoundingBox||a.text.boundingBox, -new mxRectangle(Math.round(b.x),Math.round(b.y),Math.round(b.width),Math.round(b.height))):E.apply(this,arguments)};var A=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(a,b){var c=this.graph.getModel(),d=c.getParent(this.state.cell),e=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(b)==mxEvent.ROTATION_HANDLE||!c.isEdge(d)||null==e||!e.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&A.apply(this,arguments)};mxVertexHandler.prototype.isRotationHandleVisible= -function(){return this.graph.isEnabled()&&this.rotationEnabled&&this.graph.isCellRotatable(this.state.cell)&&(0>=mxGraphHandler.prototype.maxCells||this.graph.getSelectionCount()<mxGraphHandler.prototype.maxCells)};mxVertexHandler.prototype.rotateClick=function(){this.state.view.graph.turnShapes([this.state.cell])};var D=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(a,b){D.apply(this,arguments);null!=this.graph.graphHandler.first&&null!=this.rotationShape&&null!= -this.rotationShape.node&&(this.rotationShape.node.style.display="none")};var F=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(a,b){F.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none")};var J=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){J.apply(this,arguments);var a=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title", +"px",this.secondDiv.style.height=Math.max(0,this.height)+"px",this.secondDiv.style.borderWidth=0>=this.height?"1px 0px 0px 0px":"1px 0px 1px 0px"):(this.div.style.backgroundColor="",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),b.consume()}};var w=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv), +this.secondDiv=null);w.apply(this,arguments)};var t=(new Date).getTime(),u=0,r=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,b,c,d){r.apply(this,arguments);c!=this.currentTerminalState?(t=(new Date).getTime(),u=0):u=(new Date).getTime()-t;this.currentTerminalState=c};var x=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&& +2E3<u||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&x.apply(this,arguments)};mxVertexHandler.prototype.isCustomHandleEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.createHandleShape=function(a,b){var c=null!=a&&0==a,d=this.state.getVisibleTerminalState(c),e=null!=a&&(0==a||a>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==a)?this.graph.getConnectionConstraint(this.state, +d,c):null,c=null!=(null!=e?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(c),e):null)?this.fixedHandleImage:null!=e&&null!=d?this.terminalHandleImage:this.handleImage;if(null!=c)return c=new mxImageShape(new mxRectangle(0,0,c.width,c.height),c.src),c.preserveImageAspect=!1,c;c=mxConstants.HANDLE_SIZE;this.preferHtml&&--c;return new mxRectangleShape(new mxRectangle(0,0,c,c),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var y=mxVertexHandler.prototype.createSizerShape; +mxVertexHandler.prototype.createSizerShape=function(a,b,c){this.handleImage=b==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:b==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return y.apply(this,arguments)};var D=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(a){if(null!=a&&1==a.length){var b=this.graph.getModel(),c=b.getParent(a[0]),d=this.graph.getCellGeometry(a[0]);if(b.isEdge(c)&&null!=d&&d.relative&&(b=this.graph.view.getState(a[0]), +null!=b&&2>b.width&&2>b.height&&null!=b.text&&null!=b.text.boundingBox))return mxRectangle.fromRectangle(b.text.boundingBox)}return D.apply(this,arguments)};var z=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(a){var b=this.graph.getModel(),c=b.getParent(a.cell),d=this.graph.getCellGeometry(a.cell);return b.isEdge(c)&&null!=d&&d.relative&&2>a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox?(b=a.text.unrotatedBoundingBox||a.text.boundingBox, +new mxRectangle(Math.round(b.x),Math.round(b.y),Math.round(b.width),Math.round(b.height))):z.apply(this,arguments)};var E=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(a,b){var c=this.graph.getModel(),d=c.getParent(this.state.cell),e=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(b)==mxEvent.ROTATION_HANDLE||!c.isEdge(d)||null==e||!e.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&E.apply(this,arguments)};mxVertexHandler.prototype.isRotationHandleVisible= +function(){return this.graph.isEnabled()&&this.rotationEnabled&&this.graph.isCellRotatable(this.state.cell)&&(0>=mxGraphHandler.prototype.maxCells||this.graph.getSelectionCount()<mxGraphHandler.prototype.maxCells)};mxVertexHandler.prototype.rotateClick=function(){this.state.view.graph.turnShapes([this.state.cell])};var F=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(a,b){F.apply(this,arguments);null!=this.graph.graphHandler.first&&null!=this.rotationShape&&null!= +this.rotationShape.node&&(this.rotationShape.node.style.display="none")};var I=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(a,b){I.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none")};var N=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){N.apply(this,arguments);var a=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title", mxResources.get("rotateTooltip"));var b=mxUtils.bind(this,function(){null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.specialHandle&&(this.specialHandle.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none");this.redrawHandles()});this.selectionHandler=mxUtils.bind(this,function(a,c){b()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE, this.selectionHandler);this.changeHandler=mxUtils.bind(this,function(a,c){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));b()});this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.editingHandler=mxUtils.bind(this,function(a,b){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,this.editingHandler);var c=this.graph.getLinkForCell(this.state.cell),d=this.graph.getLinksForState(this.state);this.updateLinkHint(c, d);if(null!=c||null!=d&&0<d.length)a=!0;a&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(b,c){if(null==b&&(null==c||0==c.length)||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);else if(null!=b||null!=c&&0<c.length){null==this.linkHint&&(this.linkHint=a(),this.linkHint.style.padding="6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint)); this.linkHint.innerHTML="";if(null!=b&&(this.linkHint.appendChild(this.graph.createLinkForHint(b)),this.graph.isEnabled()&&"function"===typeof this.graph.editLink)){var d=document.createElement("img");d.setAttribute("src",Editor.editImage);d.setAttribute("title",mxResources.get("editLink"));d.setAttribute("width","11");d.setAttribute("height","11");d.style.marginLeft="10px";d.style.marginBottom="-1px";d.style.cursor="pointer";this.linkHint.appendChild(d);mxEvent.addListener(d,"click",mxUtils.bind(this, function(a){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(a)}));d=document.createElement("img");d.setAttribute("src",Dialog.prototype.clearImage);d.setAttribute("title",mxResources.get("removeIt",[mxResources.get("link")]));d.setAttribute("width","13");d.setAttribute("height","10");d.style.marginLeft="4px";d.style.marginBottom="-1px";d.style.cursor="pointer";this.linkHint.appendChild(d);mxEvent.addListener(d,"click",mxUtils.bind(this,function(a){this.graph.setLinkForCell(this.state.cell, -null);mxEvent.consume(a)}))}if(null!=c)for(d=0;d<c.length;d++){var e=document.createElement("div");e.style.marginTop=null!=b||0<d?"6px":"0px";e.appendChild(this.graph.createLinkForHint(c[d].getAttribute("href"),mxUtils.getTextContent(c[d])));this.linkHint.appendChild(e)}}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var M=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){M.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this, +null);mxEvent.consume(a)}))}if(null!=c)for(d=0;d<c.length;d++){var e=document.createElement("div");e.style.marginTop=null!=b||0<d?"6px":"0px";e.appendChild(this.graph.createLinkForHint(c[d].getAttribute("href"),mxUtils.getTextContent(c[d])));this.linkHint.appendChild(e)}}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var J=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){J.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this, function(){return this.state.view.graph.connectionHandler.isEnabled()});var a=mxUtils.bind(this,function(){null!=this.linkHint&&(this.linkHint.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.labelShape&&(this.labelShape.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none")});this.selectionHandler=mxUtils.bind(this,function(b,c){a()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionHandler); -this.changeHandler=mxUtils.bind(this,function(b,c){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));a();this.redrawHandles()});this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var b=this.graph.getLinkForCell(this.state.cell),c=this.graph.getLinksForState(this.state);if(null!=b||null!=c&&0<c.length)this.updateLinkHint(b,c),this.redrawHandles()};var K=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){K.apply(this, -arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var G=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){G.apply(this);if(null!=this.state&&null!=this.linkHint){var a=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),b=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),c=mxUtils.getBoundingBox(b,this.state.style[mxConstants.STYLE_ROTATION]|| -"0",a),a=null!=c?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,b=null!=this.state.text?this.state.text.boundingBox:null;null==c&&(c=this.state);c=c.y+c.height;null!=b&&(c=Math.max(c,b.y+b.height));this.linkHint.style.left=Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(c+this.verticalOffset/2+6+this.state.view.graph.tolerance)+"px"}};var L=mxVertexHandler.prototype.reset;mxVertexHandler.prototype.reset= -function(){L.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none")};var O=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){O.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.selectionHandler&&(this.graph.getSelectionModel().removeListener(this.selectionHandler),this.selectionHandler= +this.changeHandler=mxUtils.bind(this,function(b,c){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));a();this.redrawHandles()});this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var b=this.graph.getLinkForCell(this.state.cell),c=this.graph.getLinksForState(this.state);if(null!=b||null!=c&&0<c.length)this.updateLinkHint(b,c),this.redrawHandles()};var G=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){G.apply(this, +arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var K=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){K.apply(this);if(null!=this.state&&null!=this.linkHint){var a=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),b=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),c=mxUtils.getBoundingBox(b,this.state.style[mxConstants.STYLE_ROTATION]|| +"0",a),a=null!=c?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,b=null!=this.state.text?this.state.text.boundingBox:null;null==c&&(c=this.state);c=c.y+c.height;null!=b&&(c=Math.max(c,b.y+b.height));this.linkHint.style.left=Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(c+this.verticalOffset/2+6+this.state.view.graph.tolerance)+"px"}};var P=mxVertexHandler.prototype.reset;mxVertexHandler.prototype.reset= +function(){P.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none")};var R=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){R.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.selectionHandler&&(this.graph.getSelectionModel().removeListener(this.selectionHandler),this.selectionHandler= null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var Q=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(Q.apply(this),null!=this.state&&null!=this.linkHint)){var a=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(a=new mxRectangle(a.x,a.y,a.width,a.height), -a.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(a.y+a.height+6+this.state.view.graph.tolerance)+"px"}};var P=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){P.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var H=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){H.apply(this,arguments);null!=this.linkHint&& +a.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(a.y+a.height+6+this.state.view.graph.tolerance)+"px"}};var H=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){H.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var M=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){M.apply(this,arguments);null!=this.linkHint&& (this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.selectionHandler&&(this.graph.getSelectionModel().removeListener(this.selectionHandler),this.selectionHandler=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null)}}();Format=function(a,c){this.editorUi=a;this.container=c};Format.prototype.labelIndex=0;Format.prototype.currentIndex=0;Format.prototype.showCloseButton=!0;Format.prototype.inactiveTabBackgroundColor="#f1f3f4";Format.prototype.roundableShapes="label rectangle internalStorage corner parallelogram swimlane triangle trapezoid ext step tee process link rhombus offPageConnector loopLimit hexagon manualInput curlyBracket singleArrow callout doubleArrow flexArrow card umlLifeline".split(" "); Format.prototype.init=function(){var a=this.editorUi.editor,c=a.graph;this.update=mxUtils.bind(this,function(a,b){this.clearSelectionState();this.refresh()});c.getSelectionModel().addListener(mxEvent.CHANGE,this.update);c.addListener(mxEvent.EDITING_STARTED,this.update);c.addListener(mxEvent.EDITING_STOPPED,this.update);c.getModel().addListener(mxEvent.CHANGE,this.update);c.addListener(mxEvent.ROOT,mxUtils.bind(this,function(){this.refresh()}));a.addListener("autosaveChanged",mxUtils.bind(this,function(){this.refresh()})); 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}; @@ -2721,26 +2727,26 @@ mxEvent.addListener(a,"click",d);mxEvent.addListener(a,mxClient.IS_POINTER?"poin 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,p=!1,n=mxUtils.bind(this,function(n){var r=g?parseFloat(a.value):parseInt(a.value);isNaN(r)||c!=mxConstants.STYLE_ROTATION||(r=mxUtils.mod(Math.round(100*r),36E3)/100);r=Math.min(f,Math.max(b,isNaN(r)?d:r));if(l.cellEditor.isContentEditing()&&h)p||(p=!0,null!=m&&(l.cellEditor.restoreSelection(m),m=null),h(r),a.value=r+e, -p=!1);else if(r!=mxUtils.getValue(this.format.getSelectionState().style,c,d)){l.isEditing()&&l.stopEditing(!0);l.getModel().beginUpdate();try{l.setCellStyles(c,r,l.getSelectionCells()),c==mxConstants.STYLE_FONTSIZE&&l.updateLabelElements(l.getSelectionCells(),function(a){a.style.fontSize=r+"px";a.removeAttribute("size")}),k.fireEvent(new mxEventObject("styleChanged","keys",[c],"values",[r],"cells",l.getSelectionCells()))}finally{l.getModel().endUpdate()}}a.value=r+e;mxEvent.consume(n)});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",n);mxEvent.addListener(a,"blur",n);return n};BaseFormatPanel.prototype.createPanel=function(){var a=document.createElement("div");a.className="geFormatSection";a.style.padding="12px 0px 12px 18px";return a}; +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{l.setCellStyles(c,q,l.getSelectionCells()),c==mxConstants.STYLE_FONTSIZE&&l.updateLabelElements(l.getSelectionCells(),function(a){a.style.fontSize=q+"px";a.removeAttribute("size")}),k.fireEvent(new mxEventObject("styleChanged","keys",[c],"values",[q],"cells",l.getSelectionCells()))}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,f,e){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 h=document.createElement("div");mxUtils.setPrefixedStyle(h.style,"borderRadius","3px");h.style.border="1px solid rgb(192, 192, 192)";h.style.position="absolute";var g=document.createElement("div");g.style.borderBottom="1px solid rgb(192, 192, 192)";g.style.position="relative";g.style.height=b+"px";g.style.width="10px";g.className= -"geBtnUp";h.appendChild(g);var k=g.cloneNode(!1);k.style.border="none";k.style.height=b+"px";k.className="geBtnDown";h.appendChild(k);mxEvent.addListener(k,"click",function(b){""==a.value&&(a.value=e||"2");var g=parseInt(a.value);isNaN(g)||(a.value=g-d,null!=c&&c(b));mxEvent.consume(b)});mxEvent.addListener(g,"click",function(b){""==a.value&&(a.value=e||"0");var g=parseInt(a.value);isNaN(g)||(a.value=g+d,null!=c&&c(b));mxEvent.consume(b)});if(f){var l=null;mxEvent.addGestureListeners(h,function(a){if(mxClient.IS_QUIRKS|| -8==document.documentMode)l=document.selection.createRange();mxEvent.consume(a)},null,function(a){if(null!=l){try{l.select()}catch(p){}l=null;mxEvent.consume(a)}})}return h}; +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(),p=!1,n=null,t=function(a,g,f){if(!p){p= -!0;a=/(^#?[a-zA-Z0-9]*$)/.test(a)?a:b;n.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)n.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);n.style.display=k.checked|| -h?"":"none";null!=e&&e(a);g||(m=a,(f||h||c()!=m)&&d(m));p=!1}},n=mxUtils.button("",mxUtils.bind(this,function(a){this.editorUi.pickColor(m,function(a){t(a,null,!0)});mxEvent.consume(a)}));n.style.position="absolute";n.style.marginTop="-4px";n.style.right=mxClient.IS_QUIRKS?"0px":"20px";n.style.height="22px";n.className="geColorBtn";n.style.display=k.checked||h?"":"none";g.appendChild(n);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),t(k.checked?b:mxConstants.NONE)});t(m,!0);null!=f&&(f.install(t),this.listeners.push(f));return g}; +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";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,f,e,h,g){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);b.style.marginTop=h-2+"px";b.style.right=d+"px";a.appendChild(b);return c}; +"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}; @@ -2767,79 +2773,82 @@ ArrangePanel.prototype.addDistribute=function(a){var c=this.editorUi.editor.grap 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 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;0==b.edges.length?(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()}),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}; -ArrangePanel.prototype.addGeometry=function(a){var c=this.editorUi,d=c.editor.graph,b=this.format.getSelectionState(),f=this.createPanel();f.style.paddingBottom="8px";var e=document.createElement("div");e.style.position="absolute";e.style.width="50px";e.style.marginTop="0px";e.style.fontWeight="bold";mxUtils.write(e,mxResources.get("size"));f.appendChild(e);var h,g,k,l,m=this.addUnitInput(f,"pt",84,44,function(){h.apply(this,arguments)}),p=this.addUnitInput(f,"pt",20,44,function(){g.apply(this,arguments)}), -n=document.createElement("div");n.className="geSprite geSprite-fit";n.setAttribute("title",mxResources.get("autosize")+" ("+this.editorUi.actions.get("autosize").shortcut+")");n.style.position="relative";n.style.cursor="pointer";n.style.marginTop="-3px";n.style.border="0px";n.style.left="52px";mxUtils.setOpacity(n,50);mxEvent.addListener(n,"mouseenter",function(){mxUtils.setOpacity(n,100)});mxEvent.addListener(n,"mouseleave",function(){mxUtils.setOpacity(n,50)});mxEvent.addListener(n,"click",function(){c.actions.get("autosize").funct()}); -f.appendChild(n);this.addLabel(f,mxResources.get("width"),84);this.addLabel(f,mxResources.get("height"),20);mxUtils.br(f);e=document.createElement("div");e.style.paddingTop="8px";e.style.paddingRight="20px";e.style.whiteSpace="nowrap";e.style.textAlign="right";var t=this.createCellOption(mxResources.get("constrainProportions"),mxConstants.STYLE_ASPECT,null,"fixed","null");t.style.width="100%";e.appendChild(t);f.appendChild(e);var r=t.getElementsByTagName("input")[0];this.addKeyHandler(m,q);this.addKeyHandler(p, -q);h=this.addGeometryHandler(m,function(a,b){0<a.width&&(b=Math.max(1,b),r.checked&&(a.height=Math.round(a.height*b*100/a.width)/100),a.width=b)});g=this.addGeometryHandler(p,function(a,b){0<a.height&&(b=Math.max(1,b),r.checked&&(a.width=Math.round(a.width*b*100/a.height)/100),a.height=b)});a.appendChild(f);var w=this.createPanel();w.style.paddingBottom="30px";e=document.createElement("div");e.style.position="absolute";e.style.width="70px";e.style.marginTop="0px";e.style.fontWeight="bold";mxUtils.write(e, -mxResources.get("position"));w.appendChild(e);var v=this.addUnitInput(w,"pt",84,44,function(){k.apply(this,arguments)}),u=this.addUnitInput(w,"pt",20,44,function(){l.apply(this,arguments)});mxUtils.br(w);this.addLabel(w,mxResources.get("left"),84);this.addLabel(w,mxResources.get("top"),20);var q=mxUtils.bind(this,function(a,c,e){b=this.format.getSelectionState();if(b.containsLabel||b.vertices.length!=d.getSelectionCount()||null==b.width||null==b.height)f.style.display="none";else{f.style.display= -"";if(e||document.activeElement!=m)m.value=b.width+(""==b.width?"":" pt");if(e||document.activeElement!=p)p.value=b.height+(""==b.height?"":" pt")}if(b.vertices.length==d.getSelectionCount()&&null!=b.x&&null!=b.y){w.style.display="";if(e||document.activeElement!=v)v.value=b.x+(""==b.x?"":" pt");if(e||document.activeElement!=u)u.value=b.y+(""==b.y?"":" pt")}else w.style.display="none"});this.addKeyHandler(v,q);this.addKeyHandler(u,q);d.getModel().addListener(mxEvent.CHANGE,q);this.listeners.push({destroy:function(){d.getModel().removeListener(q)}}); -q();k=this.addGeometryHandler(v,function(a,b){a.relative?a.offset.x=b:a.x=b});l=this.addGeometryHandler(u,function(a,b){a.relative?a.offset.y=b:a.y=b});a.appendChild(w)}; -ArrangePanel.prototype.addGeometryHandler=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().isVertex(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}; +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};ArrangePanel.prototype.getUnit=function(){switch(this.editorUi.editor.graph.view.unit){case mxConstants.PIXELS:return"pt";case mxConstants.INCHES:return'"';case mxConstants.CENTIMETERS:return"cm"}}; +ArrangePanel.prototype.inUnit=function(a){return this.editorUi.editor.graph.view.formatUnitText(a)};ArrangePanel.prototype.fromUnit=function(a){switch(this.editorUi.editor.graph.view.unit){case mxConstants.PIXELS:return a;case mxConstants.INCHES:return a*mxConstants.PIXELS_PER_INCH;case mxConstants.CENTIMETERS:return a*mxConstants.PIXELS_PER_CM}};ArrangePanel.prototype.isFloatUnit=function(){return this.editorUi.editor.graph.view.unit!=mxConstants.PIXELS}; +ArrangePanel.prototype.getUnitStep=function(){switch(this.editorUi.editor.graph.view.unit){case mxConstants.PIXELS:return 1;case mxConstants.INCHES:return.1;case mxConstants.CENTIMETERS:return.1}}; +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 v=this.createCellOption(mxResources.get("constrainProportions"),mxConstants.STYLE_ASPECT, +null,"fixed","null");v.style.width="100%";h.appendChild(v);e.appendChild(h);var w=v.getElementsByTagName("input")[0];this.addKeyHandler(n,x);this.addKeyHandler(p,x);g=this.addGeometryHandler(n,function(a,b){0<a.width&&(b=Math.max(1,c.fromUnit(b)),w.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)),w.checked&&(a.width=Math.round(a.width*b*100/a.height)/100),a.height=b)});a.appendChild(e);var t= +this.createPanel();t.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"));t.appendChild(h);var u=this.addUnitInput(t,this.getUnit(),84,44,function(){l.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),r=this.addUnitInput(t,this.getUnit(),20,44,function(){m.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()); +mxUtils.br(t);this.addLabel(t,mxResources.get("left"),84);this.addLabel(t,mxResources.get("top"),20);var x=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){t.style.display="";if(d||document.activeElement!=u)u.value=this.inUnit(f.x)+(""==f.x?"":" "+this.getUnit());if(d||document.activeElement!=r)r.value=this.inUnit(f.y)+(""==f.y?"":" "+this.getUnit())}else t.style.display="none"});this.addKeyHandler(u,x);this.addKeyHandler(r,x);b.getModel().addListener(mxEvent.CHANGE,x);this.listeners.push({destroy:function(){b.getModel().removeListener(x)}});x();l=this.addGeometryHandler(u,function(a,b){b=c.fromUnit(b);a.relative? +a.offset.x=b:a.x=b});m=this.addGeometryHandler(r,function(a,b){b=c.fromUnit(b);a.relative?a.offset.y=b:a.y=b});a.appendChild(t)}; +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]);null!=m&&(m=m.clone(),c(m,g),b.getModel().setGeometry(h[l],m))}}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(p.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())));p.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,p=this.addUnitInput(e,"pt",20,44,function(){c.apply(this,arguments)});mxUtils.br(e);this.addKeyHandler(p,q);mxEvent.addListener(p,"blur",c);mxEvent.addListener(p,"change",c);a.appendChild(e);var n=this.createPanel();n.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");n.appendChild(h);var t=this.addUnitInput(n,"pt",84,44,function(){l.apply(this,arguments)}),r=this.addUnitInput(n,"pt",20,44,function(){m.apply(this,arguments)});mxUtils.br(n);this.addLabel(n,mxResources.get("left"),84);this.addLabel(n,mxResources.get("top"),20);a.appendChild(n);this.addKeyHandler(t,q);this.addKeyHandler(r,q);var w=this.createPanel();w.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");w.appendChild(h);var v=this.addUnitInput(w,"pt",84,44,function(){g.apply(this,arguments)}),u=this.addUnitInput(w,"pt",20,44,function(){k.apply(this,arguments)});mxUtils.br(w);this.addLabel(w,mxResources.get("left"),84);this.addLabel(w,mxResources.get("top"),20);a.appendChild(w);this.addKeyHandler(v,q);this.addKeyHandler(u,q);var q=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!=p)d=mxUtils.getValue(f.style,"width",mxCellRenderer.defaultShapes.flexArrow.prototype.defaultWidth),p.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)?(t.value=d.sourcePoint.x,r.value=d.sourcePoint.y):n.style.display="none",null!=d.targetPoint&&null==b.model.getTerminal(a, -!1)?(v.value=d.targetPoint.x,u.value=d.targetPoint.y):w.style.display="none"):(n.style.display="none",w.style.display="none")});l=this.addEdgeGeometryHandler(t,function(a,b){a.sourcePoint.x=b});m=this.addEdgeGeometryHandler(r,function(a,b){a.sourcePoint.y=b});g=this.addEdgeGeometryHandler(v,function(a,b){a.targetPoint.x=b});k=this.addEdgeGeometryHandler(u,function(a,b){a.targetPoint.y=b});b.getModel().addListener(mxEvent.CHANGE,q);this.listeners.push({destroy:function(){b.getModel().removeListener(q)}}); -q()};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)}; +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,r);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)}),v=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,r);this.addKeyHandler(v,r);var w=this.createPanel();w.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");w.appendChild(h);var t=this.addUnitInput(w,"pt",84,44,function(){g.apply(this,arguments)}),u=this.addUnitInput(w,"pt",20,44,function(){k.apply(this,arguments)});mxUtils.br(w);this.addLabel(w,mxResources.get("left"),84);this.addLabel(w,mxResources.get("top"),20);a.appendChild(w);this.addKeyHandler(t,r);this.addKeyHandler(u,r);var r=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,v.value=d.sourcePoint.y):p.style.display="none",null!=d.targetPoint&&null==b.model.getTerminal(a, +!1)?(t.value=d.targetPoint.x,u.value=d.targetPoint.y):w.style.display="none"):(p.style.display="none",w.style.display="none")});l=this.addEdgeGeometryHandler(q,function(a,b){a.sourcePoint.x=b});m=this.addEdgeGeometryHandler(v,function(a,b){a.sourcePoint.y=b});g=this.addEdgeGeometryHandler(t,function(a,b){a.targetPoint.x=b});k=this.addEdgeGeometryHandler(u,function(a,b){a.targetPoint.y=b});b.getModel().addListener(mxEvent.CHANGE,r);this.listeners.push({destroy:function(){b.getModel().removeListener(r)}}); +r()};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,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 p=e.cloneNode(!1);p.style.marginLeft="-3px";p.style.paddingBottom="0px";var n=function(a){return function(){return a()}},t=this.editorUi.toolbar.addButton("geSprite-left",mxResources.get("left"),b.cellEditor.isContentEditing()?function(a){b.cellEditor.alignText(mxConstants.ALIGN_LEFT,a)}:n(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN], -[mxConstants.ALIGN_LEFT])),p),r=this.editorUi.toolbar.addButton("geSprite-center",mxResources.get("center"),b.cellEditor.isContentEditing()?function(a){b.cellEditor.alignText(mxConstants.ALIGN_CENTER,a)}:n(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_CENTER])),p),w=this.editorUi.toolbar.addButton("geSprite-right",mxResources.get("right"),b.cellEditor.isContentEditing()?function(a){b.cellEditor.alignText(mxConstants.ALIGN_RIGHT,a)}:n(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN], -[mxConstants.ALIGN_RIGHT])),p);this.styleButtons([t,r,w]);if(b.cellEditor.isContentEditing()){var v=this.editorUi.toolbar.addButton("geSprite-removeformat",mxResources.get("strikethrough"),function(){document.execCommand("strikeThrough",!1,null)},g);this.styleButtons([v]);v.firstChild.style.background="url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PGRlZnM+PHBhdGggaWQ9ImEiIGQ9Ik0wIDBoMjR2MjRIMFYweiIvPjwvZGVmcz48Y2xpcFBhdGggaWQ9ImIiPjx1c2UgeGxpbms6aHJlZj0iI2EiIG92ZXJmbG93PSJ2aXNpYmxlIi8+PC9jbGlwUGF0aD48cGF0aCBjbGlwLXBhdGg9InVybCgjYikiIGZpbGw9IiMwMTAxMDEiIGQ9Ik03LjI0IDguNzVjLS4yNi0uNDgtLjM5LTEuMDMtLjM5LTEuNjcgMC0uNjEuMTMtMS4xNi40LTEuNjcuMjYtLjUuNjMtLjkzIDEuMTEtMS4yOS40OC0uMzUgMS4wNS0uNjMgMS43LS44My42Ni0uMTkgMS4zOS0uMjkgMi4xOC0uMjkuODEgMCAxLjU0LjExIDIuMjEuMzQuNjYuMjIgMS4yMy41NCAxLjY5Ljk0LjQ3LjQuODMuODggMS4wOCAxLjQzLjI1LjU1LjM4IDEuMTUuMzggMS44MWgtMy4wMWMwLS4zMS0uMDUtLjU5LS4xNS0uODUtLjA5LS4yNy0uMjQtLjQ5LS40NC0uNjgtLjItLjE5LS40NS0uMzMtLjc1LS40NC0uMy0uMS0uNjYtLjE2LTEuMDYtLjE2LS4zOSAwLS43NC4wNC0xLjAzLjEzLS4yOS4wOS0uNTMuMjEtLjcyLjM2LS4xOS4xNi0uMzQuMzQtLjQ0LjU1LS4xLjIxLS4xNS40My0uMTUuNjYgMCAuNDguMjUuODguNzQgMS4yMS4zOC4yNS43Ny40OCAxLjQxLjdINy4zOWMtLjA1LS4wOC0uMTEtLjE3LS4xNS0uMjV6TTIxIDEydi0ySDN2Mmg5LjYyYy4xOC4wNy40LjE0LjU1LjIuMzcuMTcuNjYuMzQuODcuNTEuMjEuMTcuMzUuMzYuNDMuNTcuMDcuMi4xMS40My4xMS42OSAwIC4yMy0uMDUuNDUtLjE0LjY2LS4wOS4yLS4yMy4zOC0uNDIuNTMtLjE5LjE1LS40Mi4yNi0uNzEuMzUtLjI5LjA4LS42My4xMy0xLjAxLjEzLS40MyAwLS44My0uMDQtMS4xOC0uMTNzLS42Ni0uMjMtLjkxLS40MmMtLjI1LS4xOS0uNDUtLjQ0LS41OS0uNzUtLjE0LS4zMS0uMjUtLjc2LS4yNS0xLjIxSDYuNGMwIC41NS4wOCAxLjEzLjI0IDEuNTguMTYuNDUuMzcuODUuNjUgMS4yMS4yOC4zNS42LjY2Ljk4LjkyLjM3LjI2Ljc4LjQ4IDEuMjIuNjUuNDQuMTcuOS4zIDEuMzguMzkuNDguMDguOTYuMTMgMS40NC4xMy44IDAgMS41My0uMDkgMi4xOC0uMjhzMS4yMS0uNDUgMS42Ny0uNzljLjQ2LS4zNC44Mi0uNzcgMS4wNy0xLjI3cy4zOC0xLjA3LjM4LTEuNzFjMC0uNi0uMS0xLjE0LS4zMS0xLjYxLS4wNS0uMTEtLjExLS4yMy0uMTctLjMzSDIxeiIvPjwvc3ZnPg==)"; -v.firstChild.style.backgroundPosition="2px 2px";v.firstChild.style.backgroundSize="18px 18px";this.styleButtons([v])}var u=this.editorUi.toolbar.addButton("geSprite-top",mxResources.get("top"),n(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_TOP])),p),q=this.editorUi.toolbar.addButton("geSprite-middle",mxResources.get("middle"),n(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_MIDDLE])),p),z=this.editorUi.toolbar.addButton("geSprite-bottom", -mxResources.get("bottom"),n(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_BOTTOM])),p);this.styleButtons([u,q,z]);mxClient.IS_QUIRKS&&mxUtils.br(a);a.appendChild(p);var y,E,A,D,F,J,M;b.cellEditor.isContentEditing()?(u.style.display="none",q.style.display="none",z.style.display="none",m.style.display="none",A=this.editorUi.toolbar.addButton("geSprite-justifyfull",mxResources.get("block"),function(){1==A.style.opacity&&document.execCommand("justifyfull", -!1,null)},p),A.style.marginRight="9px",A.style.opacity=1,this.styleButtons([A,y=this.editorUi.toolbar.addButton("geSprite-subscript",mxResources.get("subscript")+" ("+Editor.ctrlKey+"+,)",function(){document.execCommand("subscript",!1,null)},p),E=this.editorUi.toolbar.addButton("geSprite-superscript",mxResources.get("superscript")+" ("+Editor.ctrlKey+"+.)",function(){document.execCommand("superscript",!1,null)},p)]),n=p.cloneNode(!1),n.style.paddingTop="4px",p=[this.editorUi.toolbar.addButton("geSprite-orderedlist", -mxResources.get("numberedList"),function(){document.execCommand("insertorderedlist",!1,null)},n),this.editorUi.toolbar.addButton("geSprite-unorderedlist",mxResources.get("bulletedList"),function(){document.execCommand("insertunorderedlist",!1,null)},n),this.editorUi.toolbar.addButton("geSprite-outdent",mxResources.get("decreaseIndent"),function(){document.execCommand("outdent",!1,null)},n),this.editorUi.toolbar.addButton("geSprite-indent",mxResources.get("increaseIndent"),function(){document.execCommand("indent", -!1,null)},n),this.editorUi.toolbar.addButton("geSprite-removeformat",mxResources.get("removeFormat"),function(){document.execCommand("removeformat",!1,null)},n),this.editorUi.toolbar.addButton("geSprite-code",mxResources.get("html"),function(){b.cellEditor.toggleViewMode()},n)],this.styleButtons(p),p[p.length-2].style.marginLeft="9px",mxClient.IS_QUIRKS&&(mxUtils.br(a),n.style.height="40"),a.appendChild(n)):(l[2].style.marginRight="9px",w.style.marginRight="9px");p=e.cloneNode(!1);p.style.marginLeft= -"0px";p.style.paddingTop="8px";p.style.paddingBottom="4px";p.style.fontWeight="normal";mxUtils.write(p,mxResources.get("position"));var K=document.createElement("select");K.style.position="absolute";K.style.right="20px";K.style.width="97px";K.style.marginTop="-2px";for(var v="topLeft top topRight left center right bottomLeft bottom bottomRight".split(" "),G={topLeft:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM],top:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP, +")");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),v=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),w=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,v,w]);if(b.cellEditor.isContentEditing()){var t=this.editorUi.toolbar.addButton("geSprite-removeformat",mxResources.get("strikethrough"),function(){document.execCommand("strikeThrough",!1,null)},g);this.styleButtons([t]);t.firstChild.style.background="url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PGRlZnM+PHBhdGggaWQ9ImEiIGQ9Ik0wIDBoMjR2MjRIMFYweiIvPjwvZGVmcz48Y2xpcFBhdGggaWQ9ImIiPjx1c2UgeGxpbms6aHJlZj0iI2EiIG92ZXJmbG93PSJ2aXNpYmxlIi8+PC9jbGlwUGF0aD48cGF0aCBjbGlwLXBhdGg9InVybCgjYikiIGZpbGw9IiMwMTAxMDEiIGQ9Ik03LjI0IDguNzVjLS4yNi0uNDgtLjM5LTEuMDMtLjM5LTEuNjcgMC0uNjEuMTMtMS4xNi40LTEuNjcuMjYtLjUuNjMtLjkzIDEuMTEtMS4yOS40OC0uMzUgMS4wNS0uNjMgMS43LS44My42Ni0uMTkgMS4zOS0uMjkgMi4xOC0uMjkuODEgMCAxLjU0LjExIDIuMjEuMzQuNjYuMjIgMS4yMy41NCAxLjY5Ljk0LjQ3LjQuODMuODggMS4wOCAxLjQzLjI1LjU1LjM4IDEuMTUuMzggMS44MWgtMy4wMWMwLS4zMS0uMDUtLjU5LS4xNS0uODUtLjA5LS4yNy0uMjQtLjQ5LS40NC0uNjgtLjItLjE5LS40NS0uMzMtLjc1LS40NC0uMy0uMS0uNjYtLjE2LTEuMDYtLjE2LS4zOSAwLS43NC4wNC0xLjAzLjEzLS4yOS4wOS0uNTMuMjEtLjcyLjM2LS4xOS4xNi0uMzQuMzQtLjQ0LjU1LS4xLjIxLS4xNS40My0uMTUuNjYgMCAuNDguMjUuODguNzQgMS4yMS4zOC4yNS43Ny40OCAxLjQxLjdINy4zOWMtLjA1LS4wOC0uMTEtLjE3LS4xNS0uMjV6TTIxIDEydi0ySDN2Mmg5LjYyYy4xOC4wNy40LjE0LjU1LjIuMzcuMTcuNjYuMzQuODcuNTEuMjEuMTcuMzUuMzYuNDMuNTcuMDcuMi4xMS40My4xMS42OSAwIC4yMy0uMDUuNDUtLjE0LjY2LS4wOS4yLS4yMy4zOC0uNDIuNTMtLjE5LjE1LS40Mi4yNi0uNzEuMzUtLjI5LjA4LS42My4xMy0xLjAxLjEzLS40MyAwLS44My0uMDQtMS4xOC0uMTNzLS42Ni0uMjMtLjkxLS40MmMtLjI1LS4xOS0uNDUtLjQ0LS41OS0uNzUtLjE0LS4zMS0uMjUtLjc2LS4yNS0xLjIxSDYuNGMwIC41NS4wOCAxLjEzLjI0IDEuNTguMTYuNDUuMzcuODUuNjUgMS4yMS4yOC4zNS42LjY2Ljk4LjkyLjM3LjI2Ljc4LjQ4IDEuMjIuNjUuNDQuMTcuOS4zIDEuMzguMzkuNDguMDguOTYuMTMgMS40NC4xMy44IDAgMS41My0uMDkgMi4xOC0uMjhzMS4yMS0uNDUgMS42Ny0uNzljLjQ2LS4zNC44Mi0uNzcgMS4wNy0xLjI3cy4zOC0xLjA3LjM4LTEuNzFjMC0uNi0uMS0xLjE0LS4zMS0xLjYxLS4wNS0uMTEtLjExLS4yMy0uMTctLjMzSDIxeiIvPjwvc3ZnPg==)"; +t.firstChild.style.backgroundPosition="2px 2px";t.firstChild.style.backgroundSize="18px 18px";this.styleButtons([t])}var u=this.editorUi.toolbar.addButton("geSprite-top",mxResources.get("top"),p(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_TOP])),n),r=this.editorUi.toolbar.addButton("geSprite-middle",mxResources.get("middle"),p(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_MIDDLE])),n),x=this.editorUi.toolbar.addButton("geSprite-bottom", +mxResources.get("bottom"),p(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_BOTTOM])),n);this.styleButtons([u,r,x]);mxClient.IS_QUIRKS&&mxUtils.br(a);a.appendChild(n);var y,D,z,E,F,I,N;b.cellEditor.isContentEditing()?(u.style.display="none",r.style.display="none",x.style.display="none",m.style.display="none",z=this.editorUi.toolbar.addButton("geSprite-justifyfull",mxResources.get("block"),function(){1==z.style.opacity&&document.execCommand("justifyfull", +!1,null)},n),z.style.marginRight="9px",z.style.opacity=1,this.styleButtons([z,y=this.editorUi.toolbar.addButton("geSprite-subscript",mxResources.get("subscript")+" ("+Editor.ctrlKey+"+,)",function(){document.execCommand("subscript",!1,null)},n),D=this.editorUi.toolbar.addButton("geSprite-superscript",mxResources.get("superscript")+" ("+Editor.ctrlKey+"+.)",function(){document.execCommand("superscript",!1,null)},n)]),y.style.marginLeft="9px",p=n.cloneNode(!1),p.style.paddingTop="4px",n=[this.editorUi.toolbar.addButton("geSprite-orderedlist", +mxResources.get("numberedList"),function(){document.execCommand("insertorderedlist",!1,null)},p),this.editorUi.toolbar.addButton("geSprite-unorderedlist",mxResources.get("bulletedList"),function(){document.execCommand("insertunorderedlist",!1,null)},p),this.editorUi.toolbar.addButton("geSprite-outdent",mxResources.get("decreaseIndent"),function(){document.execCommand("outdent",!1,null)},p),this.editorUi.toolbar.addButton("geSprite-indent",mxResources.get("increaseIndent"),function(){document.execCommand("indent", +!1,null)},p),this.editorUi.toolbar.addButton("geSprite-removeformat",mxResources.get("removeFormat"),function(){document.execCommand("removeformat",!1,null)},p),this.editorUi.toolbar.addButton("geSprite-code",mxResources.get("html"),function(){b.cellEditor.toggleViewMode()},p)],this.styleButtons(n),n[n.length-2].style.marginLeft="9px",mxClient.IS_QUIRKS&&(mxUtils.br(a),p.style.height="40"),a.appendChild(p)):(l[2].style.marginRight="9px",w.style.marginRight="9px");n=e.cloneNode(!1);n.style.marginLeft= +"0px";n.style.paddingTop="8px";n.style.paddingBottom="4px";n.style.fontWeight="normal";mxUtils.write(n,mxResources.get("position"));var J=document.createElement("select");J.style.position="absolute";J.style.right="20px";J.style.width="97px";J.style.marginTop="-2px";for(var t="topLeft top topRight left center right bottomLeft bottom bottomRight".split(" "),G={topLeft:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM],top:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP, mxConstants.ALIGN_CENTER,mxConstants.ALIGN_BOTTOM],topRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_TOP,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM],left:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_MIDDLE],center:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE],right:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE],bottomLeft:[mxConstants.ALIGN_LEFT, -mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_TOP],bottom:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP],bottomRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP]},n=0;n<v.length;n++){var L=document.createElement("option");L.setAttribute("value",v[n]);mxUtils.write(L,mxResources.get(v[n]));K.appendChild(L)}p.appendChild(K);v=e.cloneNode(!1);v.style.marginLeft="0px";v.style.paddingTop= -"4px";v.style.paddingBottom="4px";v.style.fontWeight="normal";mxUtils.write(v,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 L=["automatic","leftToRight","rightToLeft"],Q={automatic:null,leftToRight:mxConstants.TEXT_DIRECTION_LTR,rightToLeft:mxConstants.TEXT_DIRECTION_RTL},n=0;n<L.length;n++){var P=document.createElement("option");P.setAttribute("value",L[n]);mxUtils.write(P, -mxResources.get(L[n]));O.appendChild(P)}v.appendChild(O);b.isEditing()||(a.appendChild(p),mxEvent.addListener(K,"change",function(a){b.getModel().beginUpdate();try{var c=G[K.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(v),mxEvent.addListener(O,"change",function(a){b.setCellStyles(mxConstants.STYLE_TEXT_DIRECTION,Q[O.value],b.getSelectionCells());mxEvent.consume(a)}));var H=document.createElement("input");H.style.textAlign="right";H.style.marginTop="4px";mxClient.IS_QUIRKS||(H.style.position="absolute",H.style.right="32px");H.style.width="46px";H.style.height=mxClient.IS_QUIRKS?"21px":"17px";g.appendChild(H);var B=null,p=this.installInputHandler(H,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize, +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<t.length;p++){var K=document.createElement("option");K.setAttribute("value",t[p]);mxUtils.write(K,mxResources.get(t[p]));J.appendChild(K)}n.appendChild(J);t=e.cloneNode(!1);t.style.marginLeft="0px";t.style.paddingTop= +"4px";t.style.paddingBottom="4px";t.style.fontWeight="normal";mxUtils.write(t,mxResources.get("writingDirection"));var P=document.createElement("select");P.style.position="absolute";P.style.right="20px";P.style.width="97px";P.style.marginTop="-2px";for(var K=["automatic","leftToRight","rightToLeft"],R={automatic:null,leftToRight:mxConstants.TEXT_DIRECTION_LTR,rightToLeft:mxConstants.TEXT_DIRECTION_RTL},p=0;p<K.length;p++){var Q=document.createElement("option");Q.setAttribute("value",K[p]);mxUtils.write(Q, +mxResources.get(K[p]));P.appendChild(Q)}t.appendChild(P);b.isEditing()||(a.appendChild(n),mxEvent.addListener(J,"change",function(a){b.getModel().beginUpdate();try{var c=G[J.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(t),mxEvent.addListener(P,"change",function(a){b.setCellStyles(mxConstants.STYLE_TEXT_DIRECTION,R[P.value],b.getSelectionCells());mxEvent.consume(a)}));var H=document.createElement("input");H.style.textAlign="right";H.style.marginTop="4px";mxClient.IS_QUIRKS||(H.style.position="absolute",H.style.right="32px");H.style.width="46px";H.style.height=mxClient.IS_QUIRKS?"21px":"17px";g.appendChild(H);var M=null,n=this.installInputHandler(H,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 g=e.getElementsByTagName("*");c(e);for(e=0;e<g.length;e++)c(g[e])}H.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},g=null,document.selection?g=document.selection.createRange().parentElement(): -(d=window.getSelection(),0<d.rangeCount&&(g=d.getRangeAt(0).commonAncestorContainer)),null!=g&&c(b.cellEditor.textarea,g))for(B=a,document.execCommand("fontSize",!1,"4"),g=b.cellEditor.textarea.getElementsByTagName("font"),e=0;e<g.length;e++)if("4"==g[e].getAttribute("size")){g[e].removeAttribute("size");g[e].style.fontSize=B+"px";window.setTimeout(function(){H.value=B+" pt";B=null},0);break}},!0),p=this.createStepper(H,p,1,10,!0,Menus.prototype.defaultFontSize);p.style.display=H.style.display;p.style.marginTop= -"4px";mxClient.IS_QUIRKS||(p.style.right="20px");g.appendChild(p);g=k.getElementsByTagName("div")[0];g.style.cssFloat="right";var I=null,C="#ffffff",T=null,Z="#000000",W=b.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("backgroundColor"),function(){return C},function(a){document.execCommand("backcolor",!1,a!=mxConstants.NONE?a:"transparent")},"#ffffff",{install:function(a){I=a},destroy:function(){I=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})});W.style.fontWeight="bold";var U=this.createCellColorOption(mxResources.get("borderColor"),mxConstants.STYLE_LABEL_BORDERCOLOR,"#000000");U.style.fontWeight="bold";g=b.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("fontColor"),function(){return Z},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 g=c.nextSibling;a[e].appendChild(c); -c=g}d.appendChild(a[e])}break}}else document.execCommand("forecolor",!1,a!=mxConstants.NONE?a:"transparent")},"#000000",{install:function(a){T=a},destroy:function(){T=null}},null,!0):this.createCellColorOption(mxResources.get("fontColor"),mxConstants.STYLE_FONTCOLOR,"#000000",function(a){W.style.display=null==a||a==mxConstants.NONE?"none":"";U.style.display=W.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})});g.style.fontWeight="bold";h.appendChild(g);h.appendChild(W);b.cellEditor.isContentEditing()||h.appendChild(U);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";p=document.createElement("div");p.style.position="absolute";p.style.width="70px";p.style.marginTop="0px";p.style.fontWeight="bold";mxUtils.write(p,mxResources.get("spacing"));g.appendChild(p);var aa,ja,ba, -R,ka,ca=this.addUnitInput(g,"pt",91,44,function(){aa.apply(this,arguments)}),ea=this.addUnitInput(g,"pt",20,44,function(){ja.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 fa=this.addUnitInput(g,"pt",162,44,function(){ba.apply(this,arguments)}),X=this.addUnitInput(g,"pt",91,44,function(){R.apply(this,arguments)}),Y=this.addUnitInput(g,"pt",20,44,function(){ka.apply(this,arguments)});mxUtils.br(g); +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])}H.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(M=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=M+"px";window.setTimeout(function(){H.value=M+" pt";M=null},0);break}},!0),n=this.createStepper(H,n,1,10,!0,Menus.prototype.defaultFontSize);n.style.display=H.style.display;n.style.marginTop= +"4px";mxClient.IS_QUIRKS||(n.style.right="20px");g.appendChild(n);g=k.getElementsByTagName("div")[0];g.style.cssFloat="right";var C=null,A="#ffffff",L=null,W="#000000",X=b.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("backgroundColor"),function(){return A},function(a){document.execCommand("backcolor",!1,a!=mxConstants.NONE?a:"transparent")},"#ffffff",{install:function(a){C=a},destroy:function(){C=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 V=this.createCellColorOption(mxResources.get("borderColor"),mxConstants.STYLE_LABEL_BORDERCOLOR,"#000000");V.style.fontWeight="bold";g=b.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("fontColor"),function(){return W},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){L=a},destroy:function(){L=null}},null,!0):this.createCellColorOption(mxResources.get("fontColor"),mxConstants.STYLE_FONTCOLOR,"#000000",function(a){X.style.display=null==a||a==mxConstants.NONE?"none":"";V.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})});g.style.fontWeight="bold";h.appendChild(g);h.appendChild(X);b.cellEditor.isContentEditing()||h.appendChild(V);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 Y,ja,ba, +S,ka,ca=this.addUnitInput(g,"pt",91,44,function(){Y.apply(this,arguments)}),ea=this.addUnitInput(g,"pt",20,44,function(){ja.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 fa=this.addUnitInput(g,"pt",162,44,function(){ba.apply(this,arguments)}),Z=this.addUnitInput(g,"pt",91,44,function(){S.apply(this,arguments)}),aa=this.addUnitInput(g,"pt",20,44,function(){ka.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 da=null,ha=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!=da&&(b.cellEditor.restoreSelection(da),da=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){ha=a;mxEvent.addListener(a,"mousedown",function(){document.activeElement==b.cellEditor.textarea&&(da=b.cellEditor.saveSelection())}); -mxEvent.addListener(a,"touchstart",function(){document.activeElement==b.cellEditor.textarea&&(da=b.cellEditor.saveSelection())});a.value="120 %"}));h=e.cloneNode(!1);h.style.paddingLeft="0px";g=this.editorUi.toolbar.addItems(["link","image"],h,!0);p=[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(p);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";p=[this.editorUi.toolbar.addButton("geSprite-insertcolumnbefore",mxResources.get("insertColumnBefore"),mxUtils.bind(this,function(){try{null!= -F&&b.insertColumn(F,null!=J?J.cellIndex:0)}catch(S){this.editorUi.handleError(S)}}),g),this.editorUi.toolbar.addButton("geSprite-insertcolumnafter",mxResources.get("insertColumnAfter"),mxUtils.bind(this,function(){try{null!=F&&b.insertColumn(F,null!=J?J.cellIndex+1:-1)}catch(S){this.editorUi.handleError(S)}}),g),this.editorUi.toolbar.addButton("geSprite-deletecolumn",mxResources.get("deleteColumn"),mxUtils.bind(this,function(){try{null!=F&&null!=J&&b.deleteColumn(F,J.cellIndex)}catch(S){this.editorUi.handleError(S)}}), -g),this.editorUi.toolbar.addButton("geSprite-insertrowbefore",mxResources.get("insertRowBefore"),mxUtils.bind(this,function(){try{null!=F&&null!=M&&b.insertRow(F,M.sectionRowIndex)}catch(S){this.editorUi.handleError(S)}}),g),this.editorUi.toolbar.addButton("geSprite-insertrowafter",mxResources.get("insertRowAfter"),mxUtils.bind(this,function(){try{null!=F&&null!=M&&b.insertRow(F,M.sectionRowIndex+1)}catch(S){this.editorUi.handleError(S)}}),g),this.editorUi.toolbar.addButton("geSprite-deleterow",mxResources.get("deleteRow"), -mxUtils.bind(this,function(){try{null!=F&&null!=M&&b.deleteRow(F,M.sectionRowIndex)}catch(S){this.editorUi.handleError(S)}}),g)];this.styleButtons(p);p[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";p=[this.editorUi.toolbar.addButton("geSprite-strokecolor",mxResources.get("borderColor"), -mxUtils.bind(this,function(a){if(null!=F){var c=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(c,function(c){var d=null==J||null!=a&&mxEvent.isShiftDown(a)?F:J;b.processElements(d,function(a){a.style.border=null});null==c||c==mxConstants.NONE?(d.removeAttribute("border"),d.style.border="",d.style.borderCollapse= +mxEvent.addListener(a,"touchstart",function(){document.activeElement==b.cellEditor.textarea&&(da=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!= +F&&b.insertColumn(F,null!=I?I.cellIndex:0)}catch(T){this.editorUi.handleError(T)}}),g),this.editorUi.toolbar.addButton("geSprite-insertcolumnafter",mxResources.get("insertColumnAfter"),mxUtils.bind(this,function(){try{null!=F&&b.insertColumn(F,null!=I?I.cellIndex+1:-1)}catch(T){this.editorUi.handleError(T)}}),g),this.editorUi.toolbar.addButton("geSprite-deletecolumn",mxResources.get("deleteColumn"),mxUtils.bind(this,function(){try{null!=F&&null!=I&&b.deleteColumn(F,I.cellIndex)}catch(T){this.editorUi.handleError(T)}}), +g),this.editorUi.toolbar.addButton("geSprite-insertrowbefore",mxResources.get("insertRowBefore"),mxUtils.bind(this,function(){try{null!=F&&null!=N&&b.insertRow(F,N.sectionRowIndex)}catch(T){this.editorUi.handleError(T)}}),g),this.editorUi.toolbar.addButton("geSprite-insertrowafter",mxResources.get("insertRowAfter"),mxUtils.bind(this,function(){try{null!=F&&null!=N&&b.insertRow(F,N.sectionRowIndex+1)}catch(T){this.editorUi.handleError(T)}}),g),this.editorUi.toolbar.addButton("geSprite-deleterow",mxResources.get("deleteRow"), +mxUtils.bind(this,function(){try{null!=F&&null!=N&&b.deleteRow(F,N.sectionRowIndex)}catch(T){this.editorUi.handleError(T)}}),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!=F){var c=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(c,function(c){var d=null==I||null!=a&&mxEvent.isShiftDown(a)?F:I;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!=F){var c=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(c, -function(c){var d=null==J||null!=a&&mxEvent.isShiftDown(a)?F:J;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!=F){var a=F.getAttribute("cellPadding")||0,a=new FilenameDialog(d,a,mxResources.get("apply"),mxUtils.bind(this,function(a){null!=a&&0<a.length?F.setAttribute("cellPadding",a):F.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!=F&&F.setAttribute("align","left")},e),this.editorUi.toolbar.addButton("geSprite-center",mxResources.get("center"),function(){null!=F&&F.setAttribute("align","center")},e),this.editorUi.toolbar.addButton("geSprite-right",mxResources.get("right"),function(){null!=F&&F.setAttribute("align","right")},e)];this.styleButtons(p);p[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(g);var V=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!=H)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize)),H.value=isNaN(a)?"":a+" pt";a=mxUtils.getValue(f.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER);c(t,a==mxConstants.ALIGN_LEFT);c(r,a==mxConstants.ALIGN_CENTER);c(w,a==mxConstants.ALIGN_RIGHT); -a=mxUtils.getValue(f.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE);c(u,a==mxConstants.ALIGN_TOP);c(q,a==mxConstants.ALIGN_MIDDLE);c(z,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);K.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!=ea)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING,2)),ea.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=ca)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING_TOP,0)),ca.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=Y)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING_RIGHT,0)),Y.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!= -X)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING_BOTTOM,0)),X.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=fa)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING_LEFT,0)),fa.value=isNaN(a)?"":a+" pt"});ja=this.installInputHandler(ea,mxConstants.STYLE_SPACING,2,-999,999," pt");aa=this.installInputHandler(ca,mxConstants.STYLE_SPACING_TOP,0,-999,999," pt");ka=this.installInputHandler(Y,mxConstants.STYLE_SPACING_RIGHT,0,-999,999," pt");R=this.installInputHandler(X, -mxConstants.STYLE_SPACING_BOTTOM,0,-999,999," pt");ba=this.installInputHandler(fa,mxConstants.STYLE_SPACING_LEFT,0,-999,999," pt");this.addKeyHandler(H,V);this.addKeyHandler(ea,V);this.addKeyHandler(ca,V);this.addKeyHandler(Y,V);this.addKeyHandler(X,V);this.addKeyHandler(fa,V);b.getModel().addListener(mxEvent.CHANGE,V);this.listeners.push({destroy:function(){b.getModel().removeListener(V)}});V();if(b.cellEditor.isContentEditing()){var la=!1,e=function(){la||(la=!0,window.setTimeout(function(){for(var a= +function(c){var d=null==I||null!=a&&mxEvent.isShiftDown(a)?F:I;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!=F){var a=F.getAttribute("cellPadding")||0,a=new FilenameDialog(d,a,mxResources.get("apply"),mxUtils.bind(this,function(a){null!=a&&0<a.length?F.setAttribute("cellPadding",a):F.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!=F&&F.setAttribute("align","left")},e),this.editorUi.toolbar.addButton("geSprite-center",mxResources.get("center"),function(){null!=F&&F.setAttribute("align","center")},e),this.editorUi.toolbar.addButton("geSprite-right",mxResources.get("right"),function(){null!=F&&F.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);E=h}else a.appendChild(h),a.appendChild(this.createRelativeOption(mxResources.get("opacity"),mxConstants.STYLE_TEXT_OPACITY)),a.appendChild(g);var U=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!=H)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize)),H.value=isNaN(a)?"":a+" pt";a=mxUtils.getValue(f.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER);c(q,a==mxConstants.ALIGN_LEFT);c(v,a==mxConstants.ALIGN_CENTER);c(w,a==mxConstants.ALIGN_RIGHT); +a=mxUtils.getValue(f.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE);c(u,a==mxConstants.ALIGN_TOP);c(r,a==mxConstants.ALIGN_MIDDLE);c(x,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);J.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?P.value="rightToLeft":a==mxConstants.TEXT_DIRECTION_LTR? +P.value="leftToRight":a==mxConstants.TEXT_DIRECTION_AUTO&&(P.value="automatic");if(d||document.activeElement!=ea)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING,2)),ea.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=ca)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING_TOP,0)),ca.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=aa)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING_RIGHT,0)),aa.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!= +Z)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING_BOTTOM,0)),Z.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=fa)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING_LEFT,0)),fa.value=isNaN(a)?"":a+" pt"});ja=this.installInputHandler(ea,mxConstants.STYLE_SPACING,2,-999,999," pt");Y=this.installInputHandler(ca,mxConstants.STYLE_SPACING_TOP,0,-999,999," pt");ka=this.installInputHandler(aa,mxConstants.STYLE_SPACING_RIGHT,0,-999,999," pt");S=this.installInputHandler(Z, +mxConstants.STYLE_SPACING_BOTTOM,0,-999,999," pt");ba=this.installInputHandler(fa,mxConstants.STYLE_SPACING_LEFT,0,-999,999," pt");this.addKeyHandler(H,U);this.addKeyHandler(ea,U);this.addKeyHandler(ca,U);this.addKeyHandler(aa,U);this.addKeyHandler(Z,U);this.addKeyHandler(fa,U);b.getModel().addListener(mxEvent.CHANGE,U);this.listeners.push({destroy:function(){b.getModel().removeListener(U)}});U();if(b.cellEditor.isContentEditing()){var la=!1,e=function(){la||(la=!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},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), -p=g(m),n=h(p,m,a),q=a.getElementsByTagName("*");if(0<q.length&&window.getSelection&&!mxClient.IS_IE&&!mxClient.IS_IE11)for(var u=window.getSelection(),v=0;v<q.length;v++)if(u.containsNode(q[v],!0)){temp=mxUtils.getCurrentStyle(q[v]);var p=Math.max(g(temp),p),z=h(p,temp,q[v]);if(z!=n||isNaN(z))n=""}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(A,d(m.textAlign,"justify")),c(E,e("SUP")),c(y,e("SUB")),b.cellEditor.isTableSelected()? -(c(t,d(m.textAlign,"left")),c(r,d(m.textAlign,"center")),c(w,d(m.textAlign,"right")),A.style.opacity=1,A.style.cursor=""):(d=b.cellEditor.align||mxUtils.getValue(f.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),c(t,d==mxConstants.ALIGN_LEFT),c(r,d==mxConstants.ALIGN_CENTER),c(w,d==mxConstants.ALIGN_RIGHT),c(A,!1),A.style.opacity=.2,A.style.cursor="default"),F=b.getParentByName(a,"TABLE",b.cellEditor.textarea),M=null==F?null:b.getParentByName(a,"TR",F),J=null==F?null:b.getParentByNames(a, -["TD","TH"],F),D.style.display=null!=F?"":"none",document.activeElement!=H&&("FONT"==a.nodeName&&"4"==a.getAttribute("size")&&null!=B?(a.removeAttribute("size"),a.style.fontSize=B+" pt",B=null):H.value=isNaN(p)?"":p+" pt",z=parseFloat(n),isNaN(z)?ha.value="100 %":ha.value=Math.round(100*z)+" %"),p=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!=T&&(Z="#"==p.charAt(0)?p:"#000000",T(Z,!0)),null!=I&&(C="#"==n.charAt(0)?n:null,I(C,!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))}la=!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(){}});e()}return a}; -StyleFormatPanel=function(a,c,d){BaseFormatPanel.call(this,a,c,d);this.init()};mxUtils.extend(StyleFormatPanel,BaseFormatPanel);StyleFormatPanel.prototype.defaultStrokeColor="black"; +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(),u=0;u<r.length;u++)if(t.containsNode(r[u],!0)){temp=mxUtils.getCurrentStyle(r[u]);var n=Math.max(g(temp),n),x=h(n,temp,r[u]);if(x!=p||isNaN(x))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(D,e("SUP")),c(y,e("SUB")),b.cellEditor.isTableSelected()?(c(z, +d(m.textAlign,"justify")),c(q,d(m.textAlign,"left")),c(v,d(m.textAlign,"center")),c(w,d(m.textAlign,"right"))):(e=b.cellEditor.align||mxUtils.getValue(f.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),d(m.textAlign,"justify")?(c(z,d(m.textAlign,"justify")),c(q,!1),c(v,!1),c(w,!1)):(c(z,!1),c(q,e==mxConstants.ALIGN_LEFT),c(v,e==mxConstants.ALIGN_CENTER),c(w,e==mxConstants.ALIGN_RIGHT))),F=b.getParentByName(a,"TABLE",b.cellEditor.textarea),N=null==F?null:b.getParentByName(a,"TR",F),I=null== +F?null:b.getParentByNames(a,["TD","TH"],F),E.style.display=null!=F?"":"none",document.activeElement!=H&&("FONT"==a.nodeName&&"4"==a.getAttribute("size")&&null!=M?(a.removeAttribute("size"),a.style.fontSize=M+" pt",M=null):H.value=isNaN(n)?"":n+" pt",x=parseFloat(p),isNaN(x)?ha.value="100 %":ha.value=Math.round(100*x)+" %"),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!=L&&(W="#"==d.charAt(0)?d:"#000000",L(W,!0)),null!=C&&(A="#"==n.charAt(0)?n:null,C(A,!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))}la=!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(){}}); +e()}return a};StyleFormatPanel=function(a,c,d){BaseFormatPanel.call(this,a,c,d);this.init()};mxUtils.extend(StyleFormatPanel,BaseFormatPanel);StyleFormatPanel.prototype.defaultStrokeColor="black"; 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}; @@ -2854,24 +2863,24 @@ null==a||a==mxConstants.NONE?"none":""}),e="image"==d.style.shape?mxConstants.ST 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(v.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())));v.value=c+" pt";mxEvent.consume(a)}function d(a){var c=parseInt(u.value),c=Math.min(999,Math.max(1,isNaN(c)?1: +StyleFormatPanel.prototype.addStroke=function(a){function c(a){var c=parseInt(t.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())));t.value=c+" pt";mxEvent.consume(a)}function d(a){var c=parseInt(u.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())));u.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 p="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, -p,"#000000");k.appendChild(g);h.appendChild(k);var n=h.cloneNode(!1);n.style.fontWeight="normal";n.style.whiteSpace="nowrap";n.style.position="relative";n.style.paddingLeft="16px";n.style.marginBottom="2px";n.style.marginTop="2px";n.className="geToolbarContainer";var t=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(n,"geSprite-orthogonal",mxResources.get("pattern"),!1,mxUtils.bind(this,function(a){t(a,75,"solid",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],[null,null]).setAttribute("title",mxResources.get("solid"));t(a,75,"dashed",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1", -null]).setAttribute("title",mxResources.get("dashed"));t(a,75,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 1"]).setAttribute("title",mxResources.get("dotted")+" (1)");t(a,75,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 2"]).setAttribute("title",mxResources.get("dotted")+" (2)");t(a,75,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+" (3)")})),r=n.cloneNode(!1), -w=this.editorUi.toolbar.addMenuFunctionInContainer(r,"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"], +"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)")})),v=p.cloneNode(!1), +w=this.editorUi.toolbar.addMenuFunctionInContainer(v,"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"], ["link",null,null,null],"geIcon geSprite geSprite-linkedge",null,!0).setAttribute("title",mxResources.get("link"));this.editorUi.menus.styleChange(a,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["flexArrow",null,null,null],"geIcon geSprite geSprite-arrow",null,!0).setAttribute("title",mxResources.get("arrow"));this.editorUi.menus.styleChange(a,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["arrow",null,null, -null],"geIcon geSprite geSprite-simplearrow",null,!0).setAttribute("title",mxResources.get("simpleArrow"))})),m=this.editorUi.toolbar.addMenuFunctionInContainer(r,"geSprite-orthogonal",mxResources.get("pattern"),!1,mxUtils.bind(this,function(a){t(a,33,"solid",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],[null,null]).setAttribute("title",mxResources.get("solid"));t(a,33,"dashed",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1",null]).setAttribute("title",mxResources.get("dashed")); -t(a,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 1"]).setAttribute("title",mxResources.get("dotted")+" (1)");t(a,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 2"]).setAttribute("title",mxResources.get("dotted")+" (2)");t(a,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+" (3)")})),k=n.cloneNode(!1),v=document.createElement("input");v.style.textAlign="right"; -v.style.marginTop="2px";v.style.width="41px";v.setAttribute("title",mxResources.get("linewidth"));n.appendChild(v);var u=v.cloneNode(!0);r.appendChild(u);var q=this.createStepper(v,c,1,9);q.style.display=v.style.display;q.style.marginTop="2px";n.appendChild(q);var z=this.createStepper(u,d,1,9);z.style.display=u.style.display;z.style.marginTop="2px";r.appendChild(z);mxClient.IS_QUIRKS?(v.style.height="17px",u.style.height="17px"):(v.style.position="absolute",v.style.right="32px",v.style.height="15px", -q.style.right="20px",u.style.position="absolute",u.style.right="32px",u.style.height="15px",z.style.right="20px");mxEvent.addListener(v,"blur",c);mxEvent.addListener(v,"change",c);mxEvent.addListener(u,"blur",d);mxEvent.addListener(u,"change",d);mxClient.IS_QUIRKS&&(mxUtils.br(k),mxUtils.br(k));var y=this.editorUi.toolbar.addMenuFunctionInContainer(k,"geSprite-orthogonal",mxResources.get("waypoints"),!1,mxUtils.bind(this,function(a){"arrow"!=e.style.shape&&(this.editorUi.menus.edgeStyleChange(a,"", +null],"geIcon geSprite geSprite-simplearrow",null,!0).setAttribute("title",mxResources.get("simpleArrow"))})),m=this.editorUi.toolbar.addMenuFunctionInContainer(v,"geSprite-orthogonal",mxResources.get("pattern"),!1,mxUtils.bind(this,function(a){q(a,33,"solid",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],[null,null]).setAttribute("title",mxResources.get("solid"));q(a,33,"dashed",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1",null]).setAttribute("title",mxResources.get("dashed")); +q(a,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 1"]).setAttribute("title",mxResources.get("dotted")+" (1)");q(a,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 2"]).setAttribute("title",mxResources.get("dotted")+" (2)");q(a,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+" (3)")})),k=p.cloneNode(!1),t=document.createElement("input");t.style.textAlign="right"; +t.style.marginTop="2px";t.style.width="41px";t.setAttribute("title",mxResources.get("linewidth"));p.appendChild(t);var u=t.cloneNode(!0);v.appendChild(u);var r=this.createStepper(t,c,1,9);r.style.display=t.style.display;r.style.marginTop="2px";p.appendChild(r);var x=this.createStepper(u,d,1,9);x.style.display=u.style.display;x.style.marginTop="2px";v.appendChild(x);mxClient.IS_QUIRKS?(t.style.height="17px",u.style.height="17px"):(t.style.position="absolute",t.style.right="32px",t.style.height="15px", +r.style.right="20px",u.style.position="absolute",u.style.right="32px",u.style.height="15px",x.style.right="20px");mxEvent.addListener(t,"blur",c);mxEvent.addListener(t,"change",c);mxEvent.addListener(u,"blur",d);mxEvent.addListener(u,"change",d);mxClient.IS_QUIRKS&&(mxUtils.br(k),mxUtils.br(k));var y=this.editorUi.toolbar.addMenuFunctionInContainer(k,"geSprite-orthogonal",mxResources.get("waypoints"),!1,mxUtils.bind(this,function(a){"arrow"!=e.style.shape&&(this.editorUi.menus.edgeStyleChange(a,"", [mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],[null,null,null],"geIcon geSprite geSprite-straight",null,!0).setAttribute("title",mxResources.get("straight")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle",null,null],"geIcon geSprite geSprite-orthogonal",null,!0).setAttribute("title",mxResources.get("orthogonal")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE, mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle",null,null,null],"geIcon geSprite geSprite-horizontalelbow",null,!0).setAttribute("title",mxResources.get("simple")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle","vertical",null,null],"geIcon geSprite geSprite-verticalelbow",null,!0).setAttribute("title",mxResources.get("simple")),this.editorUi.menus.edgeStyleChange(a, "",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle",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")),"connector"==e.style.shape&&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")))})),E=this.editorUi.toolbar.addMenuFunctionInContainer(k,"geSprite-startclassic",mxResources.get("linestart"),!1,mxUtils.bind(this,function(a){if("connector"==e.style.shape||"flexArrow"==e.style.shape||"filledEdge"==e.style.shape){var b=this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.NONE,0],"geIcon",null,!1);b.setAttribute("title",mxResources.get("none"));b.firstChild.firstChild.innerHTML= +!0).setAttribute("title",mxResources.get("entityRelation")))})),D=this.editorUi.toolbar.addMenuFunctionInContainer(k,"geSprite-startclassic",mxResources.get("linestart"),!1,mxUtils.bind(this,function(a){if("connector"==e.style.shape||"flexArrow"==e.style.shape||"filledEdge"==e.style.shape){var b=this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.NONE,0],"geIcon",null,!1);b.setAttribute("title",mxResources.get("none"));b.firstChild.firstChild.innerHTML= '<font style="font-size:10px;">'+mxUtils.htmlEntities(mxResources.get("none"))+"</font>";"connector"==e.style.shape||"filledEdge"==e.style.shape?(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_CLASSIC,1],"geIcon geSprite geSprite-startclassic",null,!1).setAttribute("title",mxResources.get("classic")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_CLASSIC_THIN,1],"geIcon geSprite geSprite-startclassicthin", null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_OPEN,0],"geIcon geSprite geSprite-startopen",null,!1).setAttribute("title",mxResources.get("openArrow")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_OPEN_THIN,0],"geIcon geSprite geSprite-startopenthin",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["openAsync",0],"geIcon geSprite geSprite-startopenasync", null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_BLOCK,1],"geIcon geSprite geSprite-startblock",null,!1).setAttribute("title",mxResources.get("block")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_BLOCK_THIN,1],"geIcon geSprite geSprite-startblockthin",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["async",1],"geIcon geSprite geSprite-startasync", @@ -2882,7 +2891,7 @@ null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW, "startFill"],[mxConstants.ARROW_DIAMOND_THIN,0],"geIcon geSprite geSprite-startthindiamondtrans",null,!1).setAttribute("title",mxResources.get("diamondThin")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["dash",0],"geIcon geSprite geSprite-startdash",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["cross",0],"geIcon geSprite geSprite-startcross",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW, "startFill"],["circlePlus",0],"geIcon geSprite geSprite-startcircleplus",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["circle",1],"geIcon geSprite geSprite-startcircle",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERone",0],"geIcon geSprite geSprite-starterone",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERmandOne",0],"geIcon geSprite geSprite-starteronetoone", null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERmany",0],"geIcon geSprite geSprite-startermany",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERoneToMany",0],"geIcon geSprite geSprite-starteronetomany",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERzeroToOne",1],"geIcon geSprite geSprite-starteroneopt",null,!1),this.editorUi.menus.edgeStyleChange(a,"", -[mxConstants.STYLE_STARTARROW,"startFill"],["ERzeroToMany",1],"geIcon geSprite geSprite-startermanyopt",null,!1)):this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW],[mxConstants.ARROW_BLOCK],"geIcon geSprite geSprite-startblocktrans",null,!1).setAttribute("title",mxResources.get("block"))}})),A=this.editorUi.toolbar.addMenuFunctionInContainer(k,"geSprite-endclassic",mxResources.get("lineend"),!1,mxUtils.bind(this,function(a){if("connector"==e.style.shape||"flexArrow"==e.style.shape|| +[mxConstants.STYLE_STARTARROW,"startFill"],["ERzeroToMany",1],"geIcon geSprite geSprite-startermanyopt",null,!1)):this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW],[mxConstants.ARROW_BLOCK],"geIcon geSprite geSprite-startblocktrans",null,!1).setAttribute("title",mxResources.get("block"))}})),z=this.editorUi.toolbar.addMenuFunctionInContainer(k,"geSprite-endclassic",mxResources.get("lineend"),!1,mxUtils.bind(this,function(a){if("connector"==e.style.shape||"flexArrow"==e.style.shape|| "filledEdge"==e.style.shape){var b=this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.NONE,0],"geIcon",null,!1);b.setAttribute("title",mxResources.get("none"));b.firstChild.firstChild.innerHTML='<font style="font-size:10px;">'+mxUtils.htmlEntities(mxResources.get("none"))+"</font>";"connector"==e.style.shape||"filledEdge"==e.style.shape?(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_CLASSIC,1],"geIcon geSprite geSprite-endclassic", null,!1).setAttribute("title",mxResources.get("classic")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_CLASSIC_THIN,1],"geIcon geSprite geSprite-endclassicthin",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_OPEN,0],"geIcon geSprite geSprite-endopen",null,!1).setAttribute("title",mxResources.get("openArrow")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"], [mxConstants.ARROW_OPEN_THIN,0],"geIcon geSprite geSprite-endopenthin",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["openAsync",0],"geIcon geSprite geSprite-endopenasync",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_BLOCK,1],"geIcon geSprite geSprite-endblock",null,!1).setAttribute("title",mxResources.get("block")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"], @@ -2893,28 +2902,28 @@ mxResources.get("classic")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstant 0],"geIcon geSprite geSprite-enddiamondtrans",null,!1).setAttribute("title",mxResources.get("diamond")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_DIAMOND_THIN,0],"geIcon geSprite geSprite-endthindiamondtrans",null,!1).setAttribute("title",mxResources.get("diamondThin")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["dash",0],"geIcon geSprite geSprite-enddash",null,!1),this.editorUi.menus.edgeStyleChange(a, "",[mxConstants.STYLE_ENDARROW,"endFill"],["cross",0],"geIcon geSprite geSprite-endcross",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["circlePlus",0],"geIcon geSprite geSprite-endcircleplus",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["circle",1],"geIcon geSprite geSprite-endcircle",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERone",0],"geIcon geSprite geSprite-enderone", null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERmandOne",0],"geIcon geSprite geSprite-enderonetoone",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERmany",0],"geIcon geSprite geSprite-endermany",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERoneToMany",0],"geIcon geSprite geSprite-enderonetomany",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW, -"endFill"],["ERzeroToOne",1],"geIcon geSprite geSprite-enderoneopt",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERzeroToMany",1],"geIcon geSprite geSprite-endermanyopt",null,!1)):this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW],[mxConstants.ARROW_BLOCK],"geIcon geSprite geSprite-endblocktrans",null,!1).setAttribute("title",mxResources.get("block"))}}));this.addArrow(w,8);this.addArrow(y);this.addArrow(E);this.addArrow(A);q=this.addArrow(l, -9);q.className="geIcon";q.style.width="84px";z=this.addArrow(m,9);z.className="geIcon";z.style.width="22px";var D=document.createElement("div");D.style.width="85px";D.style.height="1px";D.style.borderBottom="1px solid "+this.defaultStrokeColor;D.style.marginBottom="9px";q.appendChild(D);var F=document.createElement("div");F.style.width="23px";F.style.height="1px";F.style.borderBottom="1px solid "+this.defaultStrokeColor;F.style.marginBottom="9px";z.appendChild(F);l.style.height="15px";m.style.height= -"15px";w.style.height="15px";y.style.height="17px";E.style.marginLeft="3px";E.style.height="17px";A.style.marginLeft="3px";A.style.height="17px";a.appendChild(h);a.appendChild(r);a.appendChild(n);l=n.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 J,M,K=this.addUnitInput(l,"pt",74,33,function(){J.apply(this,arguments)}),G=this.addUnitInput(l,"pt",20,33,function(){M.apply(this,arguments)});mxUtils.br(l);q=document.createElement("div");q.style.height="8px";l.appendChild(q);m=m.cloneNode(!1);mxUtils.write(m,mxResources.get("linestart"));l.appendChild(m);var L,O,Q=this.addUnitInput(l,"pt",74,33,function(){L.apply(this,arguments)}),P=this.addUnitInput(l,"pt",20,33,function(){O.apply(this,arguments)});mxUtils.br(l);this.addLabel(l, +"endFill"],["ERzeroToOne",1],"geIcon geSprite geSprite-enderoneopt",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERzeroToMany",1],"geIcon geSprite geSprite-endermanyopt",null,!1)):this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW],[mxConstants.ARROW_BLOCK],"geIcon geSprite geSprite-endblocktrans",null,!1).setAttribute("title",mxResources.get("block"))}}));this.addArrow(w,8);this.addArrow(y);this.addArrow(D);this.addArrow(z);r=this.addArrow(l, +9);r.className="geIcon";r.style.width="84px";x=this.addArrow(m,9);x.className="geIcon";x.style.width="22px";var E=document.createElement("div");E.style.width="85px";E.style.height="1px";E.style.borderBottom="1px solid "+this.defaultStrokeColor;E.style.marginBottom="9px";r.appendChild(E);var F=document.createElement("div");F.style.width="23px";F.style.height="1px";F.style.borderBottom="1px solid "+this.defaultStrokeColor;F.style.marginBottom="9px";x.appendChild(F);l.style.height="15px";m.style.height= +"15px";w.style.height="15px";y.style.height="17px";D.style.marginLeft="3px";D.style.height="17px";z.style.marginLeft="3px";z.style.height="17px";a.appendChild(h);a.appendChild(v);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 I,N,J=this.addUnitInput(l,"pt",74,33,function(){I.apply(this,arguments)}),G=this.addUnitInput(l,"pt",20,33,function(){N.apply(this,arguments)});mxUtils.br(l);r=document.createElement("div");r.style.height="8px";l.appendChild(r);m=m.cloneNode(!1);mxUtils.write(m,mxResources.get("linestart"));l.appendChild(m);var K,P,R=this.addUnitInput(l,"pt",74,33,function(){K.apply(this,arguments)}),Q=this.addUnitInput(l,"pt",20,33,function(){P.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 H,B=this.addUnitInput(h,"pt",20,41,function(){H.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 I=mxUtils.bind(this,function(a,c,d){function h(a,c,d,g){d=d.getElementsByTagName("div")[0];d.className=b.getCssClassForMarker(g,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,p,null);if(d||document.activeElement!=v)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_STROKEWIDTH,1)),v.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!= -u)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_STROKEWIDTH,1)),u.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;F.style.borderBottom=D.style.borderBottom;a=y.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|| +mxResources.get("perimeter"));h.appendChild(m);var H,M=this.addUnitInput(h,"pt",20,41,function(){H.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 C=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!=t)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_STROKEWIDTH,1)),t.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!= +u)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_STROKEWIDTH,1)),u.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)?E.style.borderBottom="1px dashed "+ +this.defaultStrokeColor:E.style.borderBottom="1px dotted "+this.defaultStrokeColor:E.style.borderBottom="1px solid "+this.defaultStrokeColor;F.style.borderBottom=E.style.borderBottom;a=y.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";w.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()?(r.style.display="",n.style.display="none"):(r.style.display="none",n.style.display="");a=h(mxUtils.getValue(e.style,mxConstants.STYLE_STARTARROW,null),mxUtils.getValue(e.style,"startFill","1"),E,"start");c=h(mxUtils.getValue(e.style,mxConstants.STYLE_ENDARROW,null),mxUtils.getValue(e.style, -"endFill","1"),A,"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(y,"arrow"==e.style.shape?30:100);"connector"!=e.style.shape&&"flexArrow"!=e.style.shape&&"filledEdge"!=e.style.shape?(mxUtils.setOpacity(E,30),mxUtils.setOpacity(A,30)):(mxUtils.setOpacity(E,100),mxUtils.setOpacity(A,100));if(d||document.activeElement!= -P)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE)),P.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!=G)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE)),G.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=Q)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING, -0)),K.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=B)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_PERIMETER_SPACING,0)),B.value=isNaN(a)?"":a+" pt"});O=this.installInputHandler(P,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");L=this.installInputHandler(Q,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0,-999,999," pt");M=this.installInputHandler(G,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");J=this.installInputHandler(K,mxConstants.STYLE_TARGET_PERIMETER_SPACING, -0,-999,999," pt");H=this.installInputHandler(B,mxConstants.STYLE_PERIMETER_SPACING,0,0,999," pt");this.addKeyHandler(v,I);this.addKeyHandler(P,I);this.addKeyHandler(Q,I);this.addKeyHandler(G,I);this.addKeyHandler(K,I);this.addKeyHandler(B,I);f.getModel().addListener(mxEvent.CHANGE,I);this.listeners.push({destroy:function(){f.getModel().removeListener(I)}});I();return a}; +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()?(v.style.display="",p.style.display="none"):(v.style.display="none",p.style.display="");a=h(mxUtils.getValue(e.style,mxConstants.STYLE_STARTARROW,null),mxUtils.getValue(e.style,"startFill","1"),D,"start");c=h(mxUtils.getValue(e.style,mxConstants.STYLE_ENDARROW,null),mxUtils.getValue(e.style, +"endFill","1"),z,"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(y,"arrow"==e.style.shape?30:100);"connector"!=e.style.shape&&"flexArrow"!=e.style.shape&&"filledEdge"!=e.style.shape?(mxUtils.setOpacity(D,30),mxUtils.setOpacity(z,30)):(mxUtils.setOpacity(D,100),mxUtils.setOpacity(z,100));if(d||document.activeElement!= +Q)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE)),Q.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=R)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0)),R.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=G)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE)),G.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=R)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING, +0)),J.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=M)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_PERIMETER_SPACING,0)),M.value=isNaN(a)?"":a+" pt"});P=this.installInputHandler(Q,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");K=this.installInputHandler(R,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0,-999,999," pt");N=this.installInputHandler(G,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");I=this.installInputHandler(J,mxConstants.STYLE_TARGET_PERIMETER_SPACING, +0,-999,999," pt");H=this.installInputHandler(M,mxConstants.STYLE_PERIMETER_SPACING,0,0,999," pt");this.addKeyHandler(t,C);this.addKeyHandler(Q,C);this.addKeyHandler(R,C);this.addKeyHandler(G,C);this.addKeyHandler(J,C);this.addKeyHandler(M,C);f.getModel().addListener(mxEvent.CHANGE,C);this.listeners.push({destroy:function(){f.getModel().removeListener(C)}});C();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,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 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++}),p=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,p);this.listeners.push({destroy:function(){c.getModel().removeListener(p)}});p();return a}; +"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)}})); @@ -2929,186 +2938,188 @@ function(a){13==a.keyCode?(b.container.focus(),mxEvent.consume(a)):27==a.keyCode f.style.right="32px",e.style.marginTop="2px",e.style.right="20px",a.appendChild(f),a.appendChild(e),a.appendChild(this.createOption(mxResources.get("grid"),function(){return b.isGridEnabled()},function(a){b.setGridEnabled(a);b.isGridEnabled()&&(b.view.gridColor="#e0e0e0");d.fireEvent(new mxEventObject("gridEnabledChanged"))},{install:function(a){this.listener=function(){f.style.display=b.isGridEnabled()?"":"none";e.style.display=f.style.display;a(b.isGridEnabled())};d.addListener("gridEnabledChanged", this.listener)},destroy:function(){d.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 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}; +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)}});if("1"==urlParams.ruler){a.appendChild(this.createTitle(mxResources.get("unit",null,"Unit")));var e=PageSetupDialog.addUnitPanel(a,d.view.unit,function(a){d.view.setUnit(a)}),h=function(a,b){e.value=b.getProperty("unit")}; +d.view.addListener("unitChanged",h);this.listeners.push({destroy:function(){d.view.removeListener(h)}})}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 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 p(){mxActor.call(this)}function n(){mxActor.call(this)}function t(){mxActor.call(this)}function r(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,r.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,r.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,r.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,r.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo; -this.canvas.curveTo=mxUtils.bind(this,r.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,r.prototype.arcTo)}function w(){mxRectangleShape.call(this)}function v(){mxRectangleShape.call(this)}function u(){mxActor.call(this)}function q(){mxActor.call(this)}function z(){mxActor.call(this)}function y(){mxRectangleShape.call(this)}function E(){mxRectangleShape.call(this)}function A(){mxCylinder.call(this)}function D(){mxShape.call(this)}function F(){mxShape.call(this)} -function J(){mxEllipse.call(this)}function M(){mxShape.call(this)}function K(){mxShape.call(this)}function G(){mxRectangleShape.call(this)}function L(){mxShape.call(this)}function O(){mxShape.call(this)}function Q(){mxShape.call(this)}function P(){mxShape.call(this)}function H(){mxShape.call(this)}function B(){mxCylinder.call(this)}function I(){mxDoubleEllipse.call(this)}function C(){mxDoubleEllipse.call(this)}function T(){mxArrowConnector.call(this);this.spacing=0}function Z(){mxArrowConnector.call(this); -this.spacing=0}function W(){mxActor.call(this)}function U(){mxRectangleShape.call(this)}function aa(){mxActor.call(this)}function ja(){mxActor.call(this)}function ba(){mxActor.call(this)}function R(){mxActor.call(this)}function ka(){mxActor.call(this)}function ca(){mxActor.call(this)}function ea(){mxActor.call(this)}function fa(){mxActor.call(this)}function X(){mxActor.call(this)}function Y(){mxActor.call(this)}function da(){mxEllipse.call(this)}function ha(){mxEllipse.call(this)}function V(){mxEllipse.call(this)} -function la(){mxRhombus.call(this)}function S(){mxEllipse.call(this)}function Ca(){mxEllipse.call(this)}function Da(){mxEllipse.call(this)}function ua(){mxEllipse.call(this)}function va(){mxActor.call(this)}function oa(){mxActor.call(this)}function pa(){mxActor.call(this)}function ma(){mxConnector.call(this)}function Fa(a,b,c,d,e,g,f,h,k,l){f+=k;var x=d.clone();d.x-=e*(2*f+k);d.y-=g*(2*f+k);e*=f+k;g*=f+k;return function(){a.ellipse(x.x-e-f,x.y-g-f,2*f,2*f);l?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,b,c,d,e){var g=Math.max(0,Math.min(d,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),f=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),x=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2))));a.translate(b,c);a.begin();a.moveTo(0,0);a.lineTo(d-g,0);a.lineTo(d, -g);a.lineTo(d,e);a.lineTo(g,e);a.lineTo(0,e-g);a.lineTo(0,0);a.close();a.end();a.fillAndStroke();this.outline||(a.setShadow(!1),0!=f&&(a.setFillAlpha(Math.abs(f)),a.setFillColor(0>f?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(d-g,0),a.lineTo(d,g),a.lineTo(g,g),a.close(),a.fill()),0!=x&&(a.setFillAlpha(Math.abs(x)),a.setFillColor(0>x?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(g,g),a.lineTo(g,e),a.lineTo(0,e-g),a.close(),a.fill()),a.begin(),a.moveTo(g,e),a.lineTo(g,g),a.lineTo(0, -0),a.moveTo(g,g),a.lineTo(d,g),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 Ba=Math.tan(mxUtils.toRadians(30)),na=(.5-Ba)/2;mxUtils.extend(c,mxActor);c.prototype.size=20;c.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d,e/Ba);a.translate((d-b)/2,(e-b)/2+b/4);a.moveTo(0,.25*b);a.lineTo(.5* -b,b*na);a.lineTo(b,.25*b);a.lineTo(.5*b,(.5-na)*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,g){b=Math.min(d,e/(.5+Ba));g?(a.moveTo(0,.25*b),a.lineTo(.5*b,(.5-na)*b),a.lineTo(b,.25*b),a.moveTo(.5*b,(.5-na)*b),a.lineTo(.5*b,(1-na)*b)):(a.translate((d-b)/2,(e-b)/2),a.moveTo(0,.25*b),a.lineTo(.5*b,b*na),a.lineTo(b,.25*b),a.lineTo(b,.75*b),a.lineTo(.5*b,(1-na)*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,g){b=Math.min(e/2,Math.round(e/8)+this.strokewidth-1);if(g&&null!=this.fill||!g&&null==this.fill)a.moveTo(0,b),a.curveTo(0,2*b,d,2*b,d,b),g||(a.stroke(),a.begin()),a.translate(0,b/2),a.moveTo(0,b),a.curveTo(0,2*b,d,2*b,d,b),g||(a.stroke(),a.begin()),a.translate(0,b/2),a.moveTo(0,b),a.curveTo(0,2*b,d,2*b,d,b),g||(a.stroke(),a.begin()),a.translate(0,-b);g||(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 g=Math.max(0,Math.min(d,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),f= -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-g,0);a.lineTo(d,g);a.lineTo(d,e);a.lineTo(0,e);a.lineTo(0,0);a.close();a.end();a.fillAndStroke();this.outline||(a.setShadow(!1),0!=f&&(a.setFillAlpha(Math.abs(f)),a.setFillColor(0>f?"#FFFFFF":"#000000"),a.begin(),a.moveTo(d-g,0),a.lineTo(d-g,g),a.lineTo(d,g),a.close(),a.fill()),a.begin(),a.moveTo(d-g,0),a.lineTo(d-g,g),a.lineTo(d,g),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,g){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 f=mxUtils.getValue(this.style,"tabPosition",this.tabPosition);g?"left"==f?(a.moveTo(0,c),a.lineTo(b,c)):(a.moveTo(d-b,c),a.lineTo(d,c)):("left"==f?(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(g,mxActor);g.prototype.size= +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 v(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,v.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,v.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,v.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,v.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo; +this.canvas.curveTo=mxUtils.bind(this,v.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,v.prototype.arcTo)}function w(){mxRectangleShape.call(this)}function t(){mxRectangleShape.call(this)}function u(){mxActor.call(this)}function r(){mxActor.call(this)}function x(){mxActor.call(this)}function y(){mxRectangleShape.call(this)}function D(){mxRectangleShape.call(this)}function z(){mxCylinder.call(this)}function E(){mxShape.call(this)}function F(){mxShape.call(this)} +function I(){mxEllipse.call(this)}function N(){mxShape.call(this)}function J(){mxShape.call(this)}function G(){mxRectangleShape.call(this)}function K(){mxShape.call(this)}function P(){mxShape.call(this)}function R(){mxShape.call(this)}function Q(){mxShape.call(this)}function H(){mxShape.call(this)}function M(){mxCylinder.call(this)}function C(){mxDoubleEllipse.call(this)}function A(){mxDoubleEllipse.call(this)}function L(){mxArrowConnector.call(this);this.spacing=0}function W(){mxArrowConnector.call(this); +this.spacing=0}function X(){mxActor.call(this)}function V(){mxRectangleShape.call(this)}function Y(){mxActor.call(this)}function ja(){mxActor.call(this)}function ba(){mxActor.call(this)}function S(){mxActor.call(this)}function ka(){mxActor.call(this)}function ca(){mxActor.call(this)}function ea(){mxActor.call(this)}function fa(){mxActor.call(this)}function Z(){mxActor.call(this)}function aa(){mxActor.call(this)}function da(){mxEllipse.call(this)}function ha(){mxEllipse.call(this)}function U(){mxEllipse.call(this)} +function la(){mxRhombus.call(this)}function T(){mxEllipse.call(this)}function Ca(){mxEllipse.call(this)}function Da(){mxEllipse.call(this)}function ua(){mxEllipse.call(this)}function va(){mxActor.call(this)}function pa(){mxActor.call(this)}function oa(){mxActor.call(this)}function ma(){mxConnector.call(this)}function Fa(a,b,c,d,e,f,g,h,k,l){g+=k;var B=d.clone();d.x-=e*(2*g+k);d.y-=f*(2*g+k);e*=g+k;f*=g+k;return function(){a.ellipse(B.x-e-g,B.y-f-g,2*g,2*g);l?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,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)))),B=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2))));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(f,e);a.lineTo(0,e-f);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(d-f,0),a.lineTo(d,f),a.lineTo(f,f),a.close(),a.fill()),0!=B&&(a.setFillAlpha(Math.abs(B)),a.setFillColor(0>B?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(f,f),a.lineTo(f,e),a.lineTo(0,e-f),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 Aa=Math.tan(mxUtils.toRadians(30)),na=(.5-Aa)/2;mxUtils.extend(c,mxActor);c.prototype.size=20;c.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d,e/Aa);a.translate((d-b)/2,(e-b)/2+b/4);a.moveTo(0,.25*b);a.lineTo(.5* +b,b*na);a.lineTo(b,.25*b);a.lineTo(.5*b,(.5-na)*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+Aa));f?(a.moveTo(0,.25*b),a.lineTo(.5*b,(.5-na)*b),a.lineTo(b,.25*b),a.moveTo(.5*b,(.5-na)*b),a.lineTo(.5*b,(1-na)*b)):(a.translate((d-b)/2,(e-b)/2),a.moveTo(0,.25*b),a.lineTo(.5*b,b*na),a.lineTo(b,.25*b),a.lineTo(b,.75*b),a.lineTo(.5*b,(1-na)*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(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",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(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 Ja=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)):Ja.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,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/ -2;this.addPoints(a,[new mxPoint(0,e),new mxPoint(b,0),new mxPoint(d,0),new mxPoint(d-b,e)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("parallelogram",m);mxUtils.extend(p,mxActor);p.prototype.size=.2;p.prototype.isRoundable=function(){return!0};p.prototype.redrawPath=function(a,b,c,d,e){b=d*Math.max(0,Math.min(.5,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(0, -e),new mxPoint(b,0),new mxPoint(d-b,0),new mxPoint(d,e)],this.isRounded,c,!0)};mxCellRenderer.registerShape("trapezoid",p);mxUtils.extend(n,mxActor);n.prototype.size=.5;n.prototype.redrawPath=function(a,b,c,d,e){a.setFillColor(null);b=d*Math.max(0,Math.min(1,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(d,0),new mxPoint(b,0),new mxPoint(b,e/2),new mxPoint(0,e/2),new mxPoint(b, -e/2),new mxPoint(b,e),new mxPoint(d,e)],this.isRounded,c,!1);a.end()};mxCellRenderer.registerShape("curlyBracket",n);mxUtils.extend(t,mxActor);t.prototype.redrawPath=function(a,b,c,d,e){a.setStrokeWidth(1);a.setFillColor(this.stroke);b=d/5;a.rect(0,0,b,e);a.fillAndStroke();a.rect(2*b,0,b,e);a.fillAndStroke();a.rect(4*b,0,b,e);a.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",t);r.prototype.moveTo=function(a,b){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=a;this.lastY= -b;this.firstX=a;this.firstY=b};r.prototype.close=function(){null!=this.firstX&&null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas,arguments));this.originalClose.apply(this.canvas,arguments)};r.prototype.quadTo=function(a,b,c,d){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=d};r.prototype.curveTo=function(a,b,c,d,e,g){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=e;this.lastY=g};r.prototype.arcTo=function(a,b,c,d, -e,g,f){this.originalArcTo.apply(this.canvas,arguments);this.lastX=g;this.lastY=f};r.prototype.lineTo=function(a,b){if(null!=this.lastX&&null!=this.lastY){var c=function(a){return"number"===typeof a?a?0>a?-1:1:a===a?0:NaN:NaN},d=Math.abs(a-this.lastX),e=Math.abs(b-this.lastY),g=Math.sqrt(d*d+e*e);if(2>g){this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=b;return}var f=Math.round(g/10),x=this.defaultVariation;5>f&&(f=5,x/=3);for(var h=c(a-this.lastX)*d/f,c=c(b-this.lastY)*e/f, -d=d/g,e=e/g,g=0;g<f;g++){var k=(Math.random()-.5)*x;this.originalLineTo.call(this.canvas,h*g+this.lastX-k*e,c*g+this.lastY-k*d)}this.originalLineTo.call(this.canvas,a,b)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=b};r.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo}; -var Ka=mxShape.prototype.paint;mxShape.prototype.defaultJiggle=1.5;mxShape.prototype.paint=function(a){null!=this.style&&"0"!=mxUtils.getValue(this.style,"comic","0")&&null==a.handHiggle&&(a.handJiggle=new r(a,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle)));Ka.apply(this,arguments);null!=a.handJiggle&&(a.handJiggle.destroy(),delete a.handJiggle)};mxRhombus.prototype.defaultJiggle=2;var La=mxRectangleShape.prototype.isHtmlAllowed;mxRectangleShape.prototype.isHtmlAllowed=function(){return(null== -this.style||"0"==mxUtils.getValue(this.style,"comic","0"))&&La.apply(this,arguments)};var Ma=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(a,b,c,d,e){if(null==a.handJiggle)Ma.apply(this,arguments);else{var g=!0;null!=this.style&&(g="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(g||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)g||null!=this.fill&&this.fill!=mxConstants.NONE|| -(a.pointerEvents=!1),a.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?g=Math.min(d/2,Math.min(e/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,g=Math.min(d*g,e*g)),a.moveTo(b+g,c),a.lineTo(b+d-g,c),a.quadTo(b+d,c,b+d,c+g),a.lineTo(b+d,c+e-g),a.quadTo(b+d,c+e,b+d-g,c+e),a.lineTo(b+g,c+e),a.quadTo(b,c+e,b,c+e-g), -a.lineTo(b,c+g),a.quadTo(b,c,b+g,c)):(a.moveTo(b,c),a.lineTo(b+d,c),a.lineTo(b+d,c+e),a.lineTo(b,c+e),a.lineTo(b,c)),a.close(),a.end(),a.fillAndStroke()}};var Na=mxRectangleShape.prototype.paintForeground;mxRectangleShape.prototype.paintForeground=function(a,b,c,d,e){null==a.handJiggle&&Na.apply(this,arguments)};mxUtils.extend(w,mxRectangleShape);w.prototype.size=.1;w.prototype.isHtmlAllowed=function(){return!1};w.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL, +2;this.addPoints(a,[new mxPoint(0,e),new mxPoint(b,0),new mxPoint(d,0),new mxPoint(d-b,e)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("parallelogram",m);mxUtils.extend(n,mxActor);n.prototype.size=.2;n.prototype.isRoundable=function(){return!0};n.prototype.redrawPath=function(a,b,c,d,e){b=d*Math.max(0,Math.min(.5,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(0, +e),new mxPoint(b,0),new mxPoint(d-b,0),new mxPoint(d,e)],this.isRounded,c,!0)};mxCellRenderer.registerShape("trapezoid",n);mxUtils.extend(p,mxActor);p.prototype.size=.5;p.prototype.redrawPath=function(a,b,c,d,e){a.setFillColor(null);b=d*Math.max(0,Math.min(1,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(d,0),new mxPoint(b,0),new mxPoint(b,e/2),new mxPoint(0,e/2),new mxPoint(b, +e/2),new mxPoint(b,e),new mxPoint(d,e)],this.isRounded,c,!1);a.end()};mxCellRenderer.registerShape("curlyBracket",p);mxUtils.extend(q,mxActor);q.prototype.redrawPath=function(a,b,c,d,e){a.setStrokeWidth(1);a.setFillColor(this.stroke);b=d/5;a.rect(0,0,b,e);a.fillAndStroke();a.rect(2*b,0,b,e);a.fillAndStroke();a.rect(4*b,0,b,e);a.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",q);v.prototype.moveTo=function(a,b){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=a;this.lastY= +b;this.firstX=a;this.firstY=b};v.prototype.close=function(){null!=this.firstX&&null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas,arguments));this.originalClose.apply(this.canvas,arguments)};v.prototype.quadTo=function(a,b,c,d){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=d};v.prototype.curveTo=function(a,b,c,d,e,f){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=e;this.lastY=f};v.prototype.arcTo=function(a,b,c,d, +e,f,g){this.originalArcTo.apply(this.canvas,arguments);this.lastX=f;this.lastY=g};v.prototype.lineTo=function(a,b){if(null!=this.lastX&&null!=this.lastY){var c=function(a){return"number"===typeof a?a?0>a?-1:1:a===a?0:NaN:NaN},d=Math.abs(a-this.lastX),e=Math.abs(b-this.lastY),f=Math.sqrt(d*d+e*e);if(2>f){this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=b;return}var g=Math.round(f/10),B=this.defaultVariation;5>g&&(g=5,B/=3);for(var h=c(a-this.lastX)*d/g,c=c(b-this.lastY)*e/g, +d=d/f,e=e/f,f=0;f<g;f++){var k=(Math.random()-.5)*B;this.originalLineTo.call(this.canvas,h*f+this.lastX-k*e,c*f+this.lastY-k*d)}this.originalLineTo.call(this.canvas,a,b)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=b};v.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo}; +var Ka=mxShape.prototype.paint;mxShape.prototype.defaultJiggle=1.5;mxShape.prototype.paint=function(a){null!=this.style&&"0"!=mxUtils.getValue(this.style,"comic","0")&&null==a.handHiggle&&(a.handJiggle=new v(a,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle)));Ka.apply(this,arguments);null!=a.handJiggle&&(a.handJiggle.destroy(),delete a.handJiggle)};mxRhombus.prototype.defaultJiggle=2;var La=mxRectangleShape.prototype.isHtmlAllowed;mxRectangleShape.prototype.isHtmlAllowed=function(){return(null== +this.style||"0"==mxUtils.getValue(this.style,"comic","0"))&&La.apply(this,arguments)};var Ma=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(a,b,c,d,e){if(null==a.handJiggle)Ma.apply(this,arguments);else{var f=!0;null!=this.style&&(f="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(f||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)f||null!=this.fill&&this.fill!=mxConstants.NONE|| +(a.pointerEvents=!1),a.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?f=Math.min(d/2,Math.min(e/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.min(d*f,e*f)),a.moveTo(b+f,c),a.lineTo(b+d-f,c),a.quadTo(b+d,c,b+d,c+f),a.lineTo(b+d,c+e-f),a.quadTo(b+d,c+e,b+d-f,c+e),a.lineTo(b+f,c+e),a.quadTo(b,c+e,b,c+e-f), +a.lineTo(b,c+f),a.quadTo(b,c,b+f,c)):(a.moveTo(b,c),a.lineTo(b+d,c),a.lineTo(b+d,c+e),a.lineTo(b,c+e),a.lineTo(b,c)),a.close(),a.end(),a.fillAndStroke()}};var Na=mxRectangleShape.prototype.paintForeground;mxRectangleShape.prototype.paintForeground=function(a,b,c,d,e){null==a.handJiggle&&Na.apply(this,arguments)};mxUtils.extend(w,mxRectangleShape);w.prototype.size=.1;w.prototype.isHtmlAllowed=function(){return!1};w.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 b=a.width,c=a.height;a=new mxRectangle(a.x,a.y,b,c);var d=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,d=Math.max(d,Math.min(b*e,c*e));a.x+=Math.round(d);a.width-=Math.round(2*d)}return a};w.prototype.paintForeground= -function(a,b,c,d,e){var g=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,g=Math.max(g,Math.min(d*f,e*f));g=Math.round(g);a.begin();a.moveTo(b+g,c);a.lineTo(b+g,c+e);a.moveTo(b+d-g,c);a.lineTo(b+d-g,c+e);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("process",w);mxUtils.extend(v, -mxRectangleShape);v.prototype.paintBackground=function(a,b,c,d,e){a.setFillColor(mxConstants.NONE);a.rect(b,c,d,e);a.fill()};v.prototype.paintForeground=function(a,b,c,d,e){};mxCellRenderer.registerShape("transparent",v);mxUtils.extend(u,mxHexagon);u.prototype.size=30;u.prototype.position=.5;u.prototype.position2=.5;u.prototype.base=20;u.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};u.prototype.isRoundable= -function(){return!0};u.prototype.redrawPath=function(a,b,c,d,e){b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var g=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),f=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),x=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"base",this.base)))); -this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,e-c),new mxPoint(Math.min(d,g+x),e-c),new mxPoint(f,e),new mxPoint(Math.max(0,g),e-c),new mxPoint(0,e-c)],this.isRounded,b,!0,[4])};mxCellRenderer.registerShape("callout",u);mxUtils.extend(q,mxActor);q.prototype.size=.2;q.prototype.fixedSize=20;q.prototype.isRoundable=function(){return!0};q.prototype.redrawPath=function(a,b,c,d,e){b="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style, -"size",this.fixedSize)))):d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d-b,0),new mxPoint(d,e/2),new mxPoint(d-b,e),new mxPoint(0,e),new mxPoint(b,e/2)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("step",q);mxUtils.extend(z,mxHexagon);z.prototype.size=.25;z.prototype.isRoundable=function(){return!0};z.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,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(b,0),new mxPoint(d-b,0),new mxPoint(d,.5*e),new mxPoint(d-b,e),new mxPoint(b,e),new mxPoint(0,.5*e)],this.isRounded,c,!0)};mxCellRenderer.registerShape("hexagon",z);mxUtils.extend(y,mxRectangleShape);y.prototype.isHtmlAllowed=function(){return!1};y.prototype.paintForeground=function(a, -b,c,d,e){var g=Math.min(d/5,e/5)+1;a.begin();a.moveTo(b+d/2,c+g);a.lineTo(b+d/2,c+e-g);a.moveTo(b+g,c+e/2);a.lineTo(b+d-g,c+e/2);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",y);var Ga=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var b=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+ -b,a.y+b,a.width-2*b,a.height-2*b)}return a};mxRhombus.prototype.paintVertexShape=function(a,b,c,d,e){Ga.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var g=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);b+=g;c+=g;d-=2*g;e-=2*g;0<d&&0<e&&(a.setShadow(!1),Ga.apply(this,[a,b,c,d,e]))}};mxUtils.extend(E,mxRectangleShape);E.prototype.isHtmlAllowed=function(){return!1};E.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var b=(Math.max(2, -this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+b,a.y+b,a.width-2*b,a.height-2*b)}return a};E.prototype.paintForeground=function(a,b,c,d,e){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var g=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);b+=g;c+=g;d-=2*g;e-=2*g;0<d&&0<e&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}a.setDashed(!1);var g=0,f;do{f=mxCellRenderer.defaultShapes[this.style["symbol"+ -g]];if(null!=f){var h=this.style["symbol"+g+"Align"],x=this.style["symbol"+g+"VerticalAlign"],k=this.style["symbol"+g+"Width"],l=this.style["symbol"+g+"Height"],wa=this.style["symbol"+g+"Spacing"]||0,Ea=this.style["symbol"+g+"VSpacing"]||wa,m=this.style["symbol"+g+"ArcSpacing"];null!=m&&(m*=this.getArcSize(d+this.strokewidth,e+this.strokewidth),wa+=m,Ea+=m);var m=b,ra=c,m=h==mxConstants.ALIGN_CENTER?m+(d-k)/2:h==mxConstants.ALIGN_RIGHT?m+(d-k-wa):m+wa,ra=x==mxConstants.ALIGN_MIDDLE?ra+(e-l)/2:x== -mxConstants.ALIGN_BOTTOM?ra+(e-l-Ea):ra+Ea;a.save();h=new f;h.style=this.style;f.prototype.paintVertexShape.call(h,a,m,ra,k,l);a.restore()}g++}while(null!=f)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",E);mxUtils.extend(A,mxCylinder);A.prototype.redrawPath=function(a,b,c,d,e,g){g?(a.moveTo(0,0),a.lineTo(d/2,e/2),a.lineTo(d,0),a.end()):(a.moveTo(0,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(0,e),a.close())};mxCellRenderer.registerShape("message", -A);mxUtils.extend(D,mxShape);D.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.ellipse(d/4,0,d/2,e/4);a.fillAndStroke();a.begin();a.moveTo(d/2,e/4);a.lineTo(d/2,2*e/3);a.moveTo(d/2,e/3);a.lineTo(0,e/3);a.moveTo(d/2,e/3);a.lineTo(d,e/3);a.moveTo(d/2,2*e/3);a.lineTo(0,e);a.moveTo(d/2,2*e/3);a.lineTo(d,e);a.end();a.stroke()};mxCellRenderer.registerShape("umlActor",D);mxUtils.extend(F,mxShape);F.prototype.getLabelMargins=function(a){return new mxRectangle(a.width/6,0,0,0)};F.prototype.paintBackground= -function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(0,e/4);a.lineTo(0,3*e/4);a.end();a.stroke();a.begin();a.moveTo(0,e/2);a.lineTo(d/6,e/2);a.end();a.stroke();a.ellipse(d/6,0,5*d/6,e);a.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",F);mxUtils.extend(J,mxEllipse);J.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(b+d/8,c+e);a.lineTo(b+7*d/8,c+e);a.end();a.stroke()};mxCellRenderer.registerShape("umlEntity", -J);mxUtils.extend(M,mxShape);M.prototype.paintVertexShape=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(d,0);a.lineTo(0,e);a.moveTo(0,0);a.lineTo(d,e);a.end();a.stroke()};mxCellRenderer.registerShape("umlDestroy",M);mxUtils.extend(K,mxShape);K.prototype.getLabelBounds=function(a){return new mxRectangle(a.x,a.y+a.height/8,a.width,7*a.height/8)};K.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(3*d/8,e/8*1.1);a.lineTo(5*d/8,0);a.end();a.stroke();a.ellipse(0, -e/8,d,7*e/8);a.fillAndStroke()};K.prototype.paintForeground=function(a,b,c,d,e){a.begin();a.moveTo(3*d/8,e/8*1.1);a.lineTo(5*d/8,e/4);a.end();a.stroke()};mxCellRenderer.registerShape("umlControl",K);mxUtils.extend(G,mxRectangleShape);G.prototype.size=40;G.prototype.isHtmlAllowed=function(){return!1};G.prototype.getLabelBounds=function(a){var b=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,b)};G.prototype.paintBackground= -function(a,b,c,d,e){var g=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),f=mxUtils.getValue(this.style,"participant");null==f||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,a,b,c,d,g):(f=this.state.view.graph.cellRenderer.getShape(f),null!=f&&f!=G&&(f=new f,f.apply(this.state),a.save(),f.paintVertexShape(a,b,c,d,g),a.restore()));g<e&&(a.setDashed(!0),a.begin(),a.moveTo(b+d/2,c+g),a.lineTo(b+d/2,c+e),a.end(),a.stroke())};G.prototype.paintForeground= -function(a,b,c,d,e){var g=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,a,b,c,d,Math.min(e,g))};mxCellRenderer.registerShape("umlLifeline",G);mxUtils.extend(L,mxShape);L.prototype.width=60;L.prototype.height=30;L.prototype.corner=10;L.prototype.getLabelMargins=function(a){return new mxRectangle(0,0,a.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),a.height-parseFloat(mxUtils.getValue(this.style, -"height",this.height)*this.scale))};L.prototype.paintBackground=function(a,b,c,d,e){var g=this.corner,f=Math.min(d,Math.max(g,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),h=Math.min(e,Math.max(1.5*g,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),x=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);x!=mxConstants.NONE&&(a.setFillColor(x),a.rect(b,c,d,e),a.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!= -mxConstants.NONE?(this.getGradientBounds(a,b,c,d,e),a.setGradient(this.fill,this.gradient,b,c,d,e,this.gradientDirection)):a.setFillColor(this.fill);a.begin();a.moveTo(b,c);a.lineTo(b+f,c);a.lineTo(b+f,c+Math.max(0,h-1.5*g));a.lineTo(b+Math.max(0,f-g),c+h);a.lineTo(b,c+h);a.close();a.fillAndStroke();a.begin();a.moveTo(b+f,c);a.lineTo(b+d,c);a.lineTo(b+d,c+e);a.lineTo(b,c+e);a.lineTo(b,c+h);a.stroke()};mxCellRenderer.registerShape("umlFrame",L);mxPerimeter.LifelinePerimeter=function(a,b,c,d){d=G.prototype.size; +function(a,b,c,d,e){var f=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.max(f,Math.min(d*g,e*g));f=Math.round(f);a.begin();a.moveTo(b+f,c);a.lineTo(b+f,c+e);a.moveTo(b+d-f,c);a.lineTo(b+d-f,c+e);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("process",w);mxUtils.extend(t, +mxRectangleShape);t.prototype.paintBackground=function(a,b,c,d,e){a.setFillColor(mxConstants.NONE);a.rect(b,c,d,e);a.fill()};t.prototype.paintForeground=function(a,b,c,d,e){};mxCellRenderer.registerShape("transparent",t);mxUtils.extend(u,mxHexagon);u.prototype.size=30;u.prototype.position=.5;u.prototype.position2=.5;u.prototype.base=20;u.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};u.prototype.isRoundable= +function(){return!0};u.prototype.redrawPath=function(a,b,c,d,e){b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var f=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),g=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),h=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"base",this.base)))); +this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,e-c),new mxPoint(Math.min(d,f+h),e-c),new mxPoint(g,e),new mxPoint(Math.max(0,f),e-c),new mxPoint(0,e-c)],this.isRounded,b,!0,[4])};mxCellRenderer.registerShape("callout",u);mxUtils.extend(r,mxActor);r.prototype.size=.2;r.prototype.fixedSize=20;r.prototype.isRoundable=function(){return!0};r.prototype.redrawPath=function(a,b,c,d,e){b="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style, +"size",this.fixedSize)))):d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d-b,0),new mxPoint(d,e/2),new mxPoint(d-b,e),new mxPoint(0,e),new mxPoint(b,e/2)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("step",r);mxUtils.extend(x,mxHexagon);x.prototype.size=.25;x.prototype.isRoundable=function(){return!0};x.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,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(b,0),new mxPoint(d-b,0),new mxPoint(d,.5*e),new mxPoint(d-b,e),new mxPoint(b,e),new mxPoint(0,.5*e)],this.isRounded,c,!0)};mxCellRenderer.registerShape("hexagon",x);mxUtils.extend(y,mxRectangleShape);y.prototype.isHtmlAllowed=function(){return!1};y.prototype.paintForeground=function(a, +b,c,d,e){var f=Math.min(d/5,e/5)+1;a.begin();a.moveTo(b+d/2,c+f);a.lineTo(b+d/2,c+e-f);a.moveTo(b+f,c+e/2);a.lineTo(b+d-f,c+e/2);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",y);var Ga=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var b=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+ +b,a.y+b,a.width-2*b,a.height-2*b)}return a};mxRhombus.prototype.paintVertexShape=function(a,b,c,d,e){Ga.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var f=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);b+=f;c+=f;d-=2*f;e-=2*f;0<d&&0<e&&(a.setShadow(!1),Ga.apply(this,[a,b,c,d,e]))}};mxUtils.extend(D,mxRectangleShape);D.prototype.isHtmlAllowed=function(){return!1};D.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var b=(Math.max(2, +this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+b,a.y+b,a.width-2*b,a.height-2*b)}return a};D.prototype.paintForeground=function(a,b,c,d,e){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var f=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);b+=f;c+=f;d-=2*f;e-=2*f;0<d&&0<e&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}a.setDashed(!1);var f=0,g;do{g=mxCellRenderer.defaultShapes[this.style["symbol"+ +f]];if(null!=g){var h=this.style["symbol"+f+"Align"],B=this.style["symbol"+f+"VerticalAlign"],k=this.style["symbol"+f+"Width"],l=this.style["symbol"+f+"Height"],wa=this.style["symbol"+f+"Spacing"]||0,Ea=this.style["symbol"+f+"VSpacing"]||wa,m=this.style["symbol"+f+"ArcSpacing"];null!=m&&(m*=this.getArcSize(d+this.strokewidth,e+this.strokewidth),wa+=m,Ea+=m);var m=b,sa=c,m=h==mxConstants.ALIGN_CENTER?m+(d-k)/2:h==mxConstants.ALIGN_RIGHT?m+(d-k-wa):m+wa,sa=B==mxConstants.ALIGN_MIDDLE?sa+(e-l)/2:B== +mxConstants.ALIGN_BOTTOM?sa+(e-l-Ea):sa+Ea;a.save();h=new g;h.style=this.style;g.prototype.paintVertexShape.call(h,a,m,sa,k,l);a.restore()}f++}while(null!=g)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",D);mxUtils.extend(z,mxCylinder);z.prototype.redrawPath=function(a,b,c,d,e,f){f?(a.moveTo(0,0),a.lineTo(d/2,e/2),a.lineTo(d,0),a.end()):(a.moveTo(0,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(0,e),a.close())};mxCellRenderer.registerShape("message", +z);mxUtils.extend(E,mxShape);E.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.ellipse(d/4,0,d/2,e/4);a.fillAndStroke();a.begin();a.moveTo(d/2,e/4);a.lineTo(d/2,2*e/3);a.moveTo(d/2,e/3);a.lineTo(0,e/3);a.moveTo(d/2,e/3);a.lineTo(d,e/3);a.moveTo(d/2,2*e/3);a.lineTo(0,e);a.moveTo(d/2,2*e/3);a.lineTo(d,e);a.end();a.stroke()};mxCellRenderer.registerShape("umlActor",E);mxUtils.extend(F,mxShape);F.prototype.getLabelMargins=function(a){return new mxRectangle(a.width/6,0,0,0)};F.prototype.paintBackground= +function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(0,e/4);a.lineTo(0,3*e/4);a.end();a.stroke();a.begin();a.moveTo(0,e/2);a.lineTo(d/6,e/2);a.end();a.stroke();a.ellipse(d/6,0,5*d/6,e);a.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",F);mxUtils.extend(I,mxEllipse);I.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(b+d/8,c+e);a.lineTo(b+7*d/8,c+e);a.end();a.stroke()};mxCellRenderer.registerShape("umlEntity", +I);mxUtils.extend(N,mxShape);N.prototype.paintVertexShape=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(d,0);a.lineTo(0,e);a.moveTo(0,0);a.lineTo(d,e);a.end();a.stroke()};mxCellRenderer.registerShape("umlDestroy",N);mxUtils.extend(J,mxShape);J.prototype.getLabelBounds=function(a){return new mxRectangle(a.x,a.y+a.height/8,a.width,7*a.height/8)};J.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(3*d/8,e/8*1.1);a.lineTo(5*d/8,0);a.end();a.stroke();a.ellipse(0, +e/8,d,7*e/8);a.fillAndStroke()};J.prototype.paintForeground=function(a,b,c,d,e){a.begin();a.moveTo(3*d/8,e/8*1.1);a.lineTo(5*d/8,e/4);a.end();a.stroke()};mxCellRenderer.registerShape("umlControl",J);mxUtils.extend(G,mxRectangleShape);G.prototype.size=40;G.prototype.isHtmlAllowed=function(){return!1};G.prototype.getLabelBounds=function(a){var b=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,b)};G.prototype.paintBackground= +function(a,b,c,d,e){var f=Math.max(0,Math.min(e,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,b,c,d,f):(g=this.state.view.graph.cellRenderer.getShape(g),null!=g&&g!=G&&(g=new g,g.apply(this.state),a.save(),g.paintVertexShape(a,b,c,d,f),a.restore()));f<e&&(a.setDashed(!0),a.begin(),a.moveTo(b+d/2,c+f),a.lineTo(b+d/2,c+e),a.end(),a.stroke())};G.prototype.paintForeground= +function(a,b,c,d,e){var f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,a,b,c,d,Math.min(e,f))};mxCellRenderer.registerShape("umlLifeline",G);mxUtils.extend(K,mxShape);K.prototype.width=60;K.prototype.height=30;K.prototype.corner=10;K.prototype.getLabelMargins=function(a){return new mxRectangle(0,0,a.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),a.height-parseFloat(mxUtils.getValue(this.style, +"height",this.height)*this.scale))};K.prototype.paintBackground=function(a,b,c,d,e){var f=this.corner,g=Math.min(d,Math.max(f,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),h=Math.min(e,Math.max(1.5*f,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),B=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);B!=mxConstants.NONE&&(a.setFillColor(B),a.rect(b,c,d,e),a.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!= +mxConstants.NONE?(this.getGradientBounds(a,b,c,d,e),a.setGradient(this.fill,this.gradient,b,c,d,e,this.gradientDirection)):a.setFillColor(this.fill);a.begin();a.moveTo(b,c);a.lineTo(b+g,c);a.lineTo(b+g,c+Math.max(0,h-1.5*f));a.lineTo(b+Math.max(0,g-f),c+h);a.lineTo(b,c+h);a.close();a.fillAndStroke();a.begin();a.moveTo(b+g,c);a.lineTo(b+d,c);a.lineTo(b+d,c+e);a.lineTo(b,c+e);a.lineTo(b,c+h);a.stroke()};mxCellRenderer.registerShape("umlFrame",K);mxPerimeter.LifelinePerimeter=function(a,b,c,d){d=G.prototype.size; null!=b&&(d=mxUtils.getValue(b.style,"size",d)*b.view.scale);b=parseFloat(b.style[mxConstants.STYLE_STROKEWIDTH]||1)*b.view.scale/2-1;c.x<a.getCenterX()&&(b=-1*(b+1));return new mxPoint(a.getCenterX()+b,Math.min(a.y+a.height,Math.max(a.y+d,c.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(a,b,c,d){d=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter); mxPerimeter.BackbonePerimeter=function(a,b,c,d){d=parseFloat(b.style[mxConstants.STYLE_STROKEWIDTH]||1)*b.view.scale/2-1;null!=b.style.backboneSize&&(d+=parseFloat(b.style.backboneSize)*b.view.scale/2-1);if("south"==b.style[mxConstants.STYLE_DIRECTION]||"north"==b.style[mxConstants.STYLE_DIRECTION])return c.x<a.getCenterX()&&(d=-1*(d+1)),new mxPoint(a.getCenterX()+d,Math.min(a.y+a.height,Math.max(a.y,c.y)));c.y<a.getCenterY()&&(d=-1*(d+1));return new mxPoint(Math.min(a.x+a.width,Math.max(a.x,c.x)), a.getCenterY()+d)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(a,b,c,d){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(a,new mxRectangle(0,0,0,Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(b.style,"size",u.prototype.size))*b.view.scale))),b.style),b,c,d)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(a,b,c,d){var e=m.prototype.size; -null!=b&&(e=mxUtils.getValue(b.style,"size",e));var g=a.x,f=a.y,h=a.width,x=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=x*Math.max(0,Math.min(1,e)),f=[new mxPoint(g,f),new mxPoint(g+h,f+e),new mxPoint(g+h,f+x),new mxPoint(g,f+x-e),new mxPoint(g,f)]):(e=h*Math.max(0,Math.min(1,e)),f=[new mxPoint(g+e,f),new mxPoint(g+h,f),new mxPoint(g+h-e,f+x),new mxPoint(g, -f+x),new mxPoint(g+e,f)]);x=a.getCenterX();a=a.getCenterY();a=new mxPoint(x,a);d&&(c.x<g||c.x>g+h?a.y=c.y:a.x=c.x);return mxUtils.getPerimeterPoint(f,a,c)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(a,b,c,d){var e=p.prototype.size;null!=b&&(e=mxUtils.getValue(b.style,"size",e));var g=a.x,f=a.y,h=a.width,x=a.height;b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST; -b==mxConstants.DIRECTION_EAST?(e=h*Math.max(0,Math.min(1,e)),f=[new mxPoint(g+e,f),new mxPoint(g+h-e,f),new mxPoint(g+h,f+x),new mxPoint(g,f+x),new mxPoint(g+e,f)]):b==mxConstants.DIRECTION_WEST?(e=h*Math.max(0,Math.min(1,e)),f=[new mxPoint(g,f),new mxPoint(g+h,f),new mxPoint(g+h-e,f+x),new mxPoint(g+e,f+x),new mxPoint(g,f)]):b==mxConstants.DIRECTION_NORTH?(e=x*Math.max(0,Math.min(1,e)),f=[new mxPoint(g,f+e),new mxPoint(g+h,f),new mxPoint(g+h,f+x),new mxPoint(g,f+x-e),new mxPoint(g,f+e)]):(e=x*Math.max(0, -Math.min(1,e)),f=[new mxPoint(g,f),new mxPoint(g+h,f+e),new mxPoint(g+h,f+x-e),new mxPoint(g,f+x),new mxPoint(g,f)]);x=a.getCenterX();a=a.getCenterY();a=new mxPoint(x,a);d&&(c.x<g||c.x>g+h?a.y=c.y:a.x=c.x);return mxUtils.getPerimeterPoint(f,a,c)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(a,b,c,d){var e="0"!=mxUtils.getValue(b.style,"fixedSize","0"),g=e?q.prototype.fixedSize:q.prototype.size;null!=b&&(g=mxUtils.getValue(b.style, -"size",g));var f=a.x,h=a.y,x=a.width,k=a.height,l=a.getCenterX();a=a.getCenterY();b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_EAST?(e=e?Math.max(0,Math.min(x,g)):x*Math.max(0,Math.min(1,g)),h=[new mxPoint(f,h),new mxPoint(f+x-e,h),new mxPoint(f+x,a),new mxPoint(f+x-e,h+k),new mxPoint(f,h+k),new mxPoint(f+e,a),new mxPoint(f,h)]):b==mxConstants.DIRECTION_WEST?(e=e?Math.max(0,Math.min(x,g)):x*Math.max(0, -Math.min(1,g)),h=[new mxPoint(f+e,h),new mxPoint(f+x,h),new mxPoint(f+x-e,a),new mxPoint(f+x,h+k),new mxPoint(f+e,h+k),new mxPoint(f,a),new mxPoint(f+e,h)]):b==mxConstants.DIRECTION_NORTH?(e=e?Math.max(0,Math.min(k,g)):k*Math.max(0,Math.min(1,g)),h=[new mxPoint(f,h+e),new mxPoint(l,h),new mxPoint(f+x,h+e),new mxPoint(f+x,h+k),new mxPoint(l,h+k-e),new mxPoint(f,h+k),new mxPoint(f,h+e)]):(e=e?Math.max(0,Math.min(k,g)):k*Math.max(0,Math.min(1,g)),h=[new mxPoint(f,h),new mxPoint(l,h+e),new mxPoint(f+ -x,h),new mxPoint(f+x,h+k-e),new mxPoint(l,h+k),new mxPoint(f,h+k-e),new mxPoint(f,h)]);l=new mxPoint(l,a);d&&(c.x<f||c.x>f+x?l.y=c.y:l.x=c.x);return mxUtils.getPerimeterPoint(h,l,c)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(a,b,c,d){var e=z.prototype.size;null!=b&&(e=mxUtils.getValue(b.style,"size",e));var g=a.x,f=a.y,h=a.width,x=a.height,k=a.getCenterX();a=a.getCenterY();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=x*Math.max(0,Math.min(1,e)),f=[new mxPoint(k,f),new mxPoint(g+h,f+e),new mxPoint(g+h,f+x-e),new mxPoint(k,f+x),new mxPoint(g,f+x-e),new mxPoint(g,f+e),new mxPoint(k,f)]):(e=h*Math.max(0,Math.min(1,e)),f=[new mxPoint(g+e,f),new mxPoint(g+h-e,f),new mxPoint(g+h,a),new mxPoint(g+h-e,f+x),new mxPoint(g+e,f+x),new mxPoint(g,a),new mxPoint(g+e,f)]);k=new mxPoint(k,a);d&&(c.x<g||c.x>g+ -h?k.y=c.y:k.x=c.x);return mxUtils.getPerimeterPoint(f,k,c)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(O,mxShape);O.prototype.size=10;O.prototype.paintBackground=function(a,b,c,d,e){var g=parseFloat(mxUtils.getValue(this.style,"size",this.size));a.translate(b,c);a.ellipse((d-g)/2,0,g,g);a.fillAndStroke();a.begin();a.moveTo(d/2,g);a.lineTo(d/2,e);a.end();a.stroke()};mxCellRenderer.registerShape("lollipop",O);mxUtils.extend(Q,mxShape);Q.prototype.size= -10;Q.prototype.inset=2;Q.prototype.paintBackground=function(a,b,c,d,e){var g=parseFloat(mxUtils.getValue(this.style,"size",this.size)),f=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(b,c);a.begin();a.moveTo(d/2,g+f);a.lineTo(d/2,e);a.end();a.stroke();a.begin();a.moveTo((d-g)/2-f,g/2);a.quadTo((d-g)/2-f,g+f,d/2,g+f);a.quadTo((d+g)/2+f,g+f,(d+g)/2+f,g/2);a.end();a.stroke()};mxCellRenderer.registerShape("requires",Q);mxUtils.extend(P,mxShape);P.prototype.paintBackground= -function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(0,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,0,e);a.end();a.stroke()};mxCellRenderer.registerShape("requiredInterface",P);mxUtils.extend(H,mxShape);H.prototype.inset=2;H.prototype.paintBackground=function(a,b,c,d,e){var g=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(b,c);a.ellipse(0,g,d-2*g,e-2*g);a.fillAndStroke();a.begin();a.moveTo(d/2,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,d/2,e);a.end();a.stroke()};mxCellRenderer.registerShape("providedRequiredInterface", -H);mxUtils.extend(B,mxCylinder);B.prototype.jettyWidth=32;B.prototype.jettyHeight=12;B.prototype.redrawPath=function(a,b,c,d,e,g){var f=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));b=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));c=f/2;var f=c+f/2,h=.3*e-b/2,k=.7*e-b/2;g?(a.moveTo(c,h),a.lineTo(f,h),a.lineTo(f,h+b),a.lineTo(c,h+b),a.moveTo(c,k),a.lineTo(f,k),a.lineTo(f,k+b),a.lineTo(c,k+b)):(a.moveTo(c,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(c,e), -a.lineTo(c,k+b),a.lineTo(0,k+b),a.lineTo(0,k),a.lineTo(c,k),a.lineTo(c,h+b),a.lineTo(0,h+b),a.lineTo(0,h),a.lineTo(c,h),a.close());a.end()};mxCellRenderer.registerShape("component",B);mxUtils.extend(I,mxDoubleEllipse);I.prototype.outerStroke=!0;I.prototype.paintVertexShape=function(a,b,c,d,e){var g=Math.min(4,Math.min(d/5,e/5));0<d&&0<e&&(a.ellipse(b+g,c+g,d-2*g,e-2*g),a.fillAndStroke());a.setShadow(!1);this.outerStroke&&(a.ellipse(b,c,d,e),a.stroke())};mxCellRenderer.registerShape("endState",I); -mxUtils.extend(C,I);C.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",C);mxUtils.extend(T,mxArrowConnector);T.prototype.defaultWidth=4;T.prototype.isOpenEnded=function(){return!0};T.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};T.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",T);mxUtils.extend(Z,mxArrowConnector);Z.prototype.defaultWidth=10;Z.prototype.defaultArrowWidth= -20;Z.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};Z.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};Z.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",Z);mxUtils.extend(W,mxActor);W.prototype.size=30;W.prototype.isRoundable= -function(){return!0};W.prototype.redrawPath=function(a,b,c,d,e){b=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(0,e),new mxPoint(0,b),new mxPoint(d,0),new mxPoint(d,e)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("manualInput",W);mxUtils.extend(U,mxRectangleShape);U.prototype.dx=20;U.prototype.dy=20;U.prototype.isHtmlAllowed=function(){return!1}; -U.prototype.paintForeground=function(a,b,c,d,e){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var g=0;if(this.isRounded)var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,g=Math.max(g,Math.min(d*f,e*f));f=Math.max(g,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));g=Math.max(g,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.begin();a.moveTo(b,c+g);a.lineTo(b+d,c+g);a.end();a.stroke(); -a.begin();a.moveTo(b+f,c);a.lineTo(b+f,c+e);a.end();a.stroke()};mxCellRenderer.registerShape("internalStorage",U);mxUtils.extend(aa,mxActor);aa.prototype.dx=20;aa.prototype.dy=20;aa.prototype.redrawPath=function(a,b,c,d,e){b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE, -mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,c),new mxPoint(b,c),new mxPoint(b,e),new mxPoint(0,e)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("corner",aa);mxUtils.extend(ja,mxActor);ja.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.lineTo(0,e);a.end();a.moveTo(d,0);a.lineTo(d,e);a.end();a.moveTo(0,e/2);a.lineTo(d,e/2);a.end()};mxCellRenderer.registerShape("crossbar",ja);mxUtils.extend(ba,mxActor);ba.prototype.dx=20;ba.prototype.dy= -20;ba.prototype.redrawPath=function(a,b,c,d,e){b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,c),new mxPoint((d+b)/2,c),new mxPoint((d+b)/2,e),new mxPoint((d-b)/2,e),new mxPoint((d- -b)/2,c),new mxPoint(0,c)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("tee",ba);mxUtils.extend(R,mxActor);R.prototype.arrowWidth=.3;R.prototype.arrowSize=.2;R.prototype.redrawPath=function(a,b,c,d,e){var g=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));c=(e-g)/2;var g=c+g,f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/ -2;this.addPoints(a,[new mxPoint(0,c),new mxPoint(d-b,c),new mxPoint(d-b,0),new mxPoint(d,e/2),new mxPoint(d-b,e),new mxPoint(d-b,g),new mxPoint(0,g)],this.isRounded,f,!0);a.end()};mxCellRenderer.registerShape("singleArrow",R);mxUtils.extend(ka,mxActor);ka.prototype.redrawPath=function(a,b,c,d,e){var g=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",R.prototype.arrowWidth))));b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",R.prototype.arrowSize)))); -c=(e-g)/2;var g=c+g,f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,e/2),new mxPoint(b,0),new mxPoint(b,c),new mxPoint(d-b,c),new mxPoint(d-b,0),new mxPoint(d,e/2),new mxPoint(d-b,e),new mxPoint(d-b,g),new mxPoint(b,g),new mxPoint(b,e)],this.isRounded,f,!0);a.end()};mxCellRenderer.registerShape("doubleArrow",ka);mxUtils.extend(ca,mxActor);ca.prototype.size=.1;ca.prototype.redrawPath=function(a,b,c,d,e){b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style, +null!=b&&(e=mxUtils.getValue(b.style,"size",e));var f=a.x,g=a.y,h=a.width,k=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=k*Math.max(0,Math.min(1,e)),g=[new mxPoint(f,g),new mxPoint(f+h,g+e),new mxPoint(f+h,g+k),new mxPoint(f,g+k-e),new mxPoint(f,g)]):(e=h*Math.max(0,Math.min(1,e)),g=[new mxPoint(f+e,g),new mxPoint(f+h,g),new mxPoint(f+h-e,g+k),new mxPoint(f, +g+k),new mxPoint(f+e,g)]);k=a.getCenterX();a=a.getCenterY();a=new mxPoint(k,a);d&&(c.x<f||c.x>f+h?a.y=c.y:a.x=c.x);return mxUtils.getPerimeterPoint(g,a,c)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(a,b,c,d){var e=n.prototype.size;null!=b&&(e=mxUtils.getValue(b.style,"size",e));var f=a.x,g=a.y,h=a.width,k=a.height;b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST; +b==mxConstants.DIRECTION_EAST?(e=h*Math.max(0,Math.min(1,e)),g=[new mxPoint(f+e,g),new mxPoint(f+h-e,g),new mxPoint(f+h,g+k),new mxPoint(f,g+k),new mxPoint(f+e,g)]):b==mxConstants.DIRECTION_WEST?(e=h*Math.max(0,Math.min(1,e)),g=[new mxPoint(f,g),new mxPoint(f+h,g),new mxPoint(f+h-e,g+k),new mxPoint(f+e,g+k),new mxPoint(f,g)]):b==mxConstants.DIRECTION_NORTH?(e=k*Math.max(0,Math.min(1,e)),g=[new mxPoint(f,g+e),new mxPoint(f+h,g),new mxPoint(f+h,g+k),new mxPoint(f,g+k-e),new mxPoint(f,g+e)]):(e=k*Math.max(0, +Math.min(1,e)),g=[new mxPoint(f,g),new mxPoint(f+h,g+e),new mxPoint(f+h,g+k-e),new mxPoint(f,g+k),new mxPoint(f,g)]);k=a.getCenterX();a=a.getCenterY();a=new mxPoint(k,a);d&&(c.x<f||c.x>f+h?a.y=c.y:a.x=c.x);return mxUtils.getPerimeterPoint(g,a,c)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(a,b,c,d){var e="0"!=mxUtils.getValue(b.style,"fixedSize","0"),f=e?r.prototype.fixedSize:r.prototype.size;null!=b&&(f=mxUtils.getValue(b.style, +"size",f));var g=a.x,h=a.y,k=a.width,B=a.height,l=a.getCenterX();a=a.getCenterY();b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_EAST?(e=e?Math.max(0,Math.min(k,f)):k*Math.max(0,Math.min(1,f)),h=[new mxPoint(g,h),new mxPoint(g+k-e,h),new mxPoint(g+k,a),new mxPoint(g+k-e,h+B),new mxPoint(g,h+B),new mxPoint(g+e,a),new mxPoint(g,h)]):b==mxConstants.DIRECTION_WEST?(e=e?Math.max(0,Math.min(k,f)):k*Math.max(0, +Math.min(1,f)),h=[new mxPoint(g+e,h),new mxPoint(g+k,h),new mxPoint(g+k-e,a),new mxPoint(g+k,h+B),new mxPoint(g+e,h+B),new mxPoint(g,a),new mxPoint(g+e,h)]):b==mxConstants.DIRECTION_NORTH?(e=e?Math.max(0,Math.min(B,f)):B*Math.max(0,Math.min(1,f)),h=[new mxPoint(g,h+e),new mxPoint(l,h),new mxPoint(g+k,h+e),new mxPoint(g+k,h+B),new mxPoint(l,h+B-e),new mxPoint(g,h+B),new mxPoint(g,h+e)]):(e=e?Math.max(0,Math.min(B,f)):B*Math.max(0,Math.min(1,f)),h=[new mxPoint(g,h),new mxPoint(l,h+e),new mxPoint(g+ +k,h),new mxPoint(g+k,h+B-e),new mxPoint(l,h+B),new mxPoint(g,h+B-e),new mxPoint(g,h)]);l=new mxPoint(l,a);d&&(c.x<g||c.x>g+k?l.y=c.y:l.x=c.x);return mxUtils.getPerimeterPoint(h,l,c)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(a,b,c,d){var e=x.prototype.size;null!=b&&(e=mxUtils.getValue(b.style,"size",e));var f=a.x,g=a.y,h=a.width,k=a.height,B=a.getCenterX();a=a.getCenterY();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=k*Math.max(0,Math.min(1,e)),g=[new mxPoint(B,g),new mxPoint(f+h,g+e),new mxPoint(f+h,g+k-e),new mxPoint(B,g+k),new mxPoint(f,g+k-e),new mxPoint(f,g+e),new mxPoint(B,g)]):(e=h*Math.max(0,Math.min(1,e)),g=[new mxPoint(f+e,g),new mxPoint(f+h-e,g),new mxPoint(f+h,a),new mxPoint(f+h-e,g+k),new mxPoint(f+e,g+k),new mxPoint(f,a),new mxPoint(f+e,g)]);B=new mxPoint(B,a);d&&(c.x<f||c.x>f+ +h?B.y=c.y:B.x=c.x);return mxUtils.getPerimeterPoint(g,B,c)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(P,mxShape);P.prototype.size=10;P.prototype.paintBackground=function(a,b,c,d,e){var f=parseFloat(mxUtils.getValue(this.style,"size",this.size));a.translate(b,c);a.ellipse((d-f)/2,0,f,f);a.fillAndStroke();a.begin();a.moveTo(d/2,f);a.lineTo(d/2,e);a.end();a.stroke()};mxCellRenderer.registerShape("lollipop",P);mxUtils.extend(R,mxShape);R.prototype.size= +10;R.prototype.inset=2;R.prototype.paintBackground=function(a,b,c,d,e){var f=parseFloat(mxUtils.getValue(this.style,"size",this.size)),g=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(b,c);a.begin();a.moveTo(d/2,f+g);a.lineTo(d/2,e);a.end();a.stroke();a.begin();a.moveTo((d-f)/2-g,f/2);a.quadTo((d-f)/2-g,f+g,d/2,f+g);a.quadTo((d+f)/2+g,f+g,(d+f)/2+g,f/2);a.end();a.stroke()};mxCellRenderer.registerShape("requires",R);mxUtils.extend(Q,mxShape);Q.prototype.paintBackground= +function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(0,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,0,e);a.end();a.stroke()};mxCellRenderer.registerShape("requiredInterface",Q);mxUtils.extend(H,mxShape);H.prototype.inset=2;H.prototype.paintBackground=function(a,b,c,d,e){var f=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(b,c);a.ellipse(0,f,d-2*f,e-2*f);a.fillAndStroke();a.begin();a.moveTo(d/2,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,d/2,e);a.end();a.stroke()};mxCellRenderer.registerShape("providedRequiredInterface", +H);mxUtils.extend(M,mxCylinder);M.prototype.jettyWidth=32;M.prototype.jettyHeight=12;M.prototype.redrawPath=function(a,b,c,d,e,f){var g=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));b=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));c=g/2;var g=c+g/2,h=.3*e-b/2,k=.7*e-b/2;f?(a.moveTo(c,h),a.lineTo(g,h),a.lineTo(g,h+b),a.lineTo(c,h+b),a.moveTo(c,k),a.lineTo(g,k),a.lineTo(g,k+b),a.lineTo(c,k+b)):(a.moveTo(c,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(c,e), +a.lineTo(c,k+b),a.lineTo(0,k+b),a.lineTo(0,k),a.lineTo(c,k),a.lineTo(c,h+b),a.lineTo(0,h+b),a.lineTo(0,h),a.lineTo(c,h),a.close());a.end()};mxCellRenderer.registerShape("component",M);mxUtils.extend(C,mxDoubleEllipse);C.prototype.outerStroke=!0;C.prototype.paintVertexShape=function(a,b,c,d,e){var f=Math.min(4,Math.min(d/5,e/5));0<d&&0<e&&(a.ellipse(b+f,c+f,d-2*f,e-2*f),a.fillAndStroke());a.setShadow(!1);this.outerStroke&&(a.ellipse(b,c,d,e),a.stroke())};mxCellRenderer.registerShape("endState",C); +mxUtils.extend(A,C);A.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",A);mxUtils.extend(L,mxArrowConnector);L.prototype.defaultWidth=4;L.prototype.isOpenEnded=function(){return!0};L.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};L.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",L);mxUtils.extend(W,mxArrowConnector);W.prototype.defaultWidth=10;W.prototype.defaultArrowWidth= +20;W.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};W.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};W.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",W);mxUtils.extend(X,mxActor);X.prototype.size=30;X.prototype.isRoundable= +function(){return!0};X.prototype.redrawPath=function(a,b,c,d,e){b=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(0,e),new mxPoint(0,b),new mxPoint(d,0),new mxPoint(d,e)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("manualInput",X);mxUtils.extend(V,mxRectangleShape);V.prototype.dx=20;V.prototype.dy=20;V.prototype.isHtmlAllowed=function(){return!1}; +V.prototype.paintForeground=function(a,b,c,d,e){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var f=0;if(this.isRounded)var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.max(f,Math.min(d*g,e*g));g=Math.max(f,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));f=Math.max(f,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.begin();a.moveTo(b,c+f);a.lineTo(b+d,c+f);a.end();a.stroke(); +a.begin();a.moveTo(b+g,c);a.lineTo(b+g,c+e);a.end();a.stroke()};mxCellRenderer.registerShape("internalStorage",V);mxUtils.extend(Y,mxActor);Y.prototype.dx=20;Y.prototype.dy=20;Y.prototype.redrawPath=function(a,b,c,d,e){b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/ +2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,c),new mxPoint(b,c),new mxPoint(b,e),new mxPoint(0,e)],this.isRounded,f,!0);a.end()};mxCellRenderer.registerShape("corner",Y);mxUtils.extend(ja,mxActor);ja.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.lineTo(0,e);a.end();a.moveTo(d,0);a.lineTo(d,e);a.end();a.moveTo(0,e/2);a.lineTo(d,e/2);a.end()};mxCellRenderer.registerShape("crossbar",ja);mxUtils.extend(ba,mxActor);ba.prototype.dx=20;ba.prototype.dy=20;ba.prototype.redrawPath= +function(a,b,c,d,e){b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,c),new mxPoint((d+b)/2,c),new mxPoint((d+b)/2,e),new mxPoint((d-b)/2,e),new mxPoint((d-b)/2,c),new mxPoint(0, +c)],this.isRounded,f,!0);a.end()};mxCellRenderer.registerShape("tee",ba);mxUtils.extend(S,mxActor);S.prototype.arrowWidth=.3;S.prototype.arrowSize=.2;S.prototype.redrawPath=function(a,b,c,d,e){var f=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));c=(e-f)/2;var f=c+f,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a, +[new mxPoint(0,c),new mxPoint(d-b,c),new mxPoint(d-b,0),new mxPoint(d,e/2),new mxPoint(d-b,e),new mxPoint(d-b,f),new mxPoint(0,f)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("singleArrow",S);mxUtils.extend(ka,mxActor);ka.prototype.redrawPath=function(a,b,c,d,e){var f=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",S.prototype.arrowWidth))));b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",S.prototype.arrowSize))));c=(e-f)/2;var f= +c+f,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,e/2),new mxPoint(b,0),new mxPoint(b,c),new mxPoint(d-b,c),new mxPoint(d-b,0),new mxPoint(d,e/2),new mxPoint(d-b,e),new mxPoint(d-b,f),new mxPoint(b,f),new mxPoint(b,e)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("doubleArrow",ka);mxUtils.extend(ca,mxActor);ca.prototype.size=.1;ca.prototype.redrawPath=function(a,b,c,d,e){b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style, "size",this.size))));a.moveTo(b,0);a.lineTo(d,0);a.quadTo(d-2*b,e/2,d,e);a.lineTo(b,e);a.quadTo(b-2*b,e/2,b,0);a.close();a.end()};mxCellRenderer.registerShape("dataStorage",ca);mxUtils.extend(ea,mxActor);ea.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,0,e);a.close();a.end()};mxCellRenderer.registerShape("or",ea);mxUtils.extend(fa,mxActor);fa.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,0,e);a.quadTo(d/2,e/2,0,0); -a.close();a.end()};mxCellRenderer.registerShape("xor",fa);mxUtils.extend(X,mxActor);X.prototype.size=20;X.prototype.isRoundable=function(){return!0};X.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d/2,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-b,0),new mxPoint(d,.8*b),new mxPoint(d,e),new mxPoint(0,e),new mxPoint(0,.8*b)],this.isRounded, -c,!0);a.end()};mxCellRenderer.registerShape("loopLimit",X);mxUtils.extend(Y,mxActor);Y.prototype.size=.375;Y.prototype.isRoundable=function(){return!0};Y.prototype.redrawPath=function(a,b,c,d,e){b=e*Math.max(0,Math.min(1,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(0,0),new mxPoint(d,0),new mxPoint(d,e-b),new mxPoint(d/2,e),new mxPoint(0,e-b)],this.isRounded,c,!0);a.end()}; -mxCellRenderer.registerShape("offPageConnector",Y);mxUtils.extend(da,mxEllipse);da.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(b+d/2,c+e);a.lineTo(b+d,c+e);a.end();a.stroke()};mxCellRenderer.registerShape("tapeData",da);mxUtils.extend(ha,mxEllipse);ha.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b,c+e/2);a.lineTo(b+d,c+e/2); -a.end();a.stroke();a.begin();a.moveTo(b+d/2,c);a.lineTo(b+d/2,c+e);a.end();a.stroke()};mxCellRenderer.registerShape("orEllipse",ha);mxUtils.extend(V,mxEllipse);V.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b+.145*d,c+.145*e);a.lineTo(b+.855*d,c+.855*e);a.end();a.stroke();a.begin();a.moveTo(b+.855*d,c+.145*e);a.lineTo(b+.145*d,c+.855*e);a.end();a.stroke()};mxCellRenderer.registerShape("sumEllipse",V);mxUtils.extend(la, -mxRhombus);la.prototype.paintVertexShape=function(a,b,c,d,e){mxRhombus.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b,c+e/2);a.lineTo(b+d,c+e/2);a.end();a.stroke()};mxCellRenderer.registerShape("sortShape",la);mxUtils.extend(S,mxEllipse);S.prototype.paintVertexShape=function(a,b,c,d,e){a.begin();a.moveTo(b,c);a.lineTo(b+d,c);a.lineTo(b+d/2,c+e/2);a.close();a.fillAndStroke();a.begin();a.moveTo(b,c+e);a.lineTo(b+d,c+e);a.lineTo(b+d/2,c+e/2);a.close();a.fillAndStroke()}; -mxCellRenderer.registerShape("collate",S);mxUtils.extend(Ca,mxEllipse);Ca.prototype.paintVertexShape=function(a,b,c,d,e){var g=c+e-5;a.begin();a.moveTo(b,c);a.lineTo(b,c+e);a.moveTo(b,g);a.lineTo(b+10,g-5);a.moveTo(b,g);a.lineTo(b+10,g+5);a.moveTo(b,g);a.lineTo(b+d,g);a.moveTo(b+d,c);a.lineTo(b+d,c+e);a.moveTo(b+d,g);a.lineTo(b+d-10,g-5);a.moveTo(b+d,g);a.lineTo(b+d-10,g+5);a.end();a.stroke()};mxCellRenderer.registerShape("dimension",Ca);mxUtils.extend(Da,mxEllipse);Da.prototype.paintVertexShape= +a.close();a.end()};mxCellRenderer.registerShape("xor",fa);mxUtils.extend(Z,mxActor);Z.prototype.size=20;Z.prototype.isRoundable=function(){return!0};Z.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d/2,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-b,0),new mxPoint(d,.8*b),new mxPoint(d,e),new mxPoint(0,e),new mxPoint(0,.8*b)],this.isRounded, +c,!0);a.end()};mxCellRenderer.registerShape("loopLimit",Z);mxUtils.extend(aa,mxActor);aa.prototype.size=.375;aa.prototype.isRoundable=function(){return!0};aa.prototype.redrawPath=function(a,b,c,d,e){b=e*Math.max(0,Math.min(1,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(0,0),new mxPoint(d,0),new mxPoint(d,e-b),new mxPoint(d/2,e),new mxPoint(0,e-b)],this.isRounded,c,!0);a.end()}; +mxCellRenderer.registerShape("offPageConnector",aa);mxUtils.extend(da,mxEllipse);da.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(b+d/2,c+e);a.lineTo(b+d,c+e);a.end();a.stroke()};mxCellRenderer.registerShape("tapeData",da);mxUtils.extend(ha,mxEllipse);ha.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b,c+e/2);a.lineTo(b+d,c+e/ +2);a.end();a.stroke();a.begin();a.moveTo(b+d/2,c);a.lineTo(b+d/2,c+e);a.end();a.stroke()};mxCellRenderer.registerShape("orEllipse",ha);mxUtils.extend(U,mxEllipse);U.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b+.145*d,c+.145*e);a.lineTo(b+.855*d,c+.855*e);a.end();a.stroke();a.begin();a.moveTo(b+.855*d,c+.145*e);a.lineTo(b+.145*d,c+.855*e);a.end();a.stroke()};mxCellRenderer.registerShape("sumEllipse",U); +mxUtils.extend(la,mxRhombus);la.prototype.paintVertexShape=function(a,b,c,d,e){mxRhombus.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b,c+e/2);a.lineTo(b+d,c+e/2);a.end();a.stroke()};mxCellRenderer.registerShape("sortShape",la);mxUtils.extend(T,mxEllipse);T.prototype.paintVertexShape=function(a,b,c,d,e){a.begin();a.moveTo(b,c);a.lineTo(b+d,c);a.lineTo(b+d/2,c+e/2);a.close();a.fillAndStroke();a.begin();a.moveTo(b,c+e);a.lineTo(b+d,c+e);a.lineTo(b+d/2,c+e/2);a.close(); +a.fillAndStroke()};mxCellRenderer.registerShape("collate",T);mxUtils.extend(Ca,mxEllipse);Ca.prototype.paintVertexShape=function(a,b,c,d,e){var f=c+e-5;a.begin();a.moveTo(b,c);a.lineTo(b,c+e);a.moveTo(b,f);a.lineTo(b+10,f-5);a.moveTo(b,f);a.lineTo(b+10,f+5);a.moveTo(b,f);a.lineTo(b+d,f);a.moveTo(b+d,c);a.lineTo(b+d,c+e);a.moveTo(b+d,f);a.lineTo(b+d-10,f-5);a.moveTo(b+d,f);a.lineTo(b+d-10,f+5);a.end();a.stroke()};mxCellRenderer.registerShape("dimension",Ca);mxUtils.extend(Da,mxEllipse);Da.prototype.paintVertexShape= function(a,b,c,d,e){this.outline||a.setStrokeColor(null);mxRectangleShape.prototype.paintBackground.apply(this,arguments);null!=this.style&&(a.setStrokeColor(this.stroke),a.rect(b,c,d,e),a.fill(),a.begin(),a.moveTo(b,c),"1"==mxUtils.getValue(this.style,"top","1")?a.lineTo(b+d,c):a.moveTo(b+d,c),"1"==mxUtils.getValue(this.style,"right","1")?a.lineTo(b+d,c+e):a.moveTo(b+d,c+e),"1"==mxUtils.getValue(this.style,"bottom","1")?a.lineTo(b,c+e):a.moveTo(b,c+e),"1"==mxUtils.getValue(this.style,"left","1")&& a.lineTo(b,c-this.strokewidth/2),a.end(),a.stroke())};mxCellRenderer.registerShape("partialRectangle",Da);mxUtils.extend(ua,mxEllipse);ua.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();"vertical"==mxUtils.getValue(this.style,"line")?(a.moveTo(b+d/2,c),a.lineTo(b+d/2,c+e)):(a.moveTo(b,c+e/2),a.lineTo(b+d,c+e/2));a.end();a.stroke()};mxCellRenderer.registerShape("lineEllipse",ua);mxUtils.extend(va,mxActor);va.prototype.redrawPath= -function(a,b,c,d,e){b=Math.min(d,e/2);a.moveTo(0,0);a.lineTo(d-b,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,d-b,e);a.lineTo(0,e);a.close();a.end()};mxCellRenderer.registerShape("delay",va);mxUtils.extend(oa,mxActor);oa.prototype.size=.2;oa.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(e,d);var g=Math.max(0,Math.min(b,b*parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=(e-g)/2;c=b+g;var f=(d-g)/2,g=f+g;a.moveTo(0,b);a.lineTo(f,b);a.lineTo(f,0);a.lineTo(g,0);a.lineTo(g,b);a.lineTo(d,b);a.lineTo(d, -c);a.lineTo(g,c);a.lineTo(g,e);a.lineTo(f,e);a.lineTo(f,c);a.lineTo(0,c);a.close();a.end()};mxCellRenderer.registerShape("cross",oa);mxUtils.extend(pa,mxActor);pa.prototype.size=.25;pa.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d,e/2);c=Math.min(d-b,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*d);a.moveTo(0,e/2);a.lineTo(c,0);a.lineTo(d-b,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,d-b,e);a.lineTo(c,e);a.close();a.end()};mxCellRenderer.registerShape("display",pa);mxUtils.extend(ma, -mxConnector);ma.prototype.origPaintEdgeShape=ma.prototype.paintEdgeShape;ma.prototype.paintEdgeShape=function(a,b,c){for(var d=[],e=0;e<b.length;e++)d.push(mxUtils.clone(b[e]));var e=a.state.dashed,g=a.state.fixDash;ma.prototype.origPaintEdgeShape.apply(this,[a,d,c]);3<=a.state.strokeWidth&&(d=mxUtils.getValue(this.style,"fillColor",null),null!=d&&(a.setStrokeColor(d),a.setStrokeWidth(a.state.strokeWidth-2),a.setDashed(e,g),ma.prototype.origPaintEdgeShape.apply(this,[a,b,c])))};mxCellRenderer.registerShape("filledEdge", -ma);"undefined"!==typeof StyleFormatPanel&&function(){var a=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var b=this.format.getSelectionState(),c=a.apply(this,arguments);"umlFrame"==b.style.shape&&c.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"#ffffff"});return c}}();mxMarker.addMarker("dash",function(a,b,c,d,e,g,f,h,k,l){var x=e*(f+k+1),m=g*(f+k+1);return function(){a.begin();a.moveTo(d.x-x/2-m/2,d.y-m/2+x/2);a.lineTo(d.x+ -m/2-3*x/2,d.y-3*m/2-x/2);a.stroke()}});mxMarker.addMarker("cross",function(a,b,c,d,e,g,f,h,k,l){var x=e*(f+k+1),m=g*(f+k+1);return function(){a.begin();a.moveTo(d.x-x/2-m/2,d.y-m/2+x/2);a.lineTo(d.x+m/2-3*x/2,d.y-3*m/2-x/2);a.moveTo(d.x-x/2+m/2,d.y-m/2-x/2);a.lineTo(d.x-m/2-3*x/2,d.y-3*m/2+x/2);a.stroke()}});mxMarker.addMarker("circle",Fa);mxMarker.addMarker("circlePlus",function(a,b,c,d,e,g,f,h,k,l){var x=d.clone(),m=Fa.apply(this,arguments),p=e*(f+2*k),n=g*(f+2*k);return function(){m.apply(this, -arguments);a.begin();a.moveTo(x.x-e*k,x.y-g*k);a.lineTo(x.x-2*p+e*k,x.y-2*n+g*k);a.moveTo(x.x-p-n+g*k,x.y-n+p-e*k);a.lineTo(x.x+n-p-g*k,x.y-n-p+e*k);a.stroke()}});mxMarker.addMarker("async",function(a,b,c,d,e,g,f,h,k,l){b=e*k*1.118;c=g*k*1.118;e*=f+k;g*=f+k;var x=d.clone();x.x-=b;x.y-=c;d.x+=1*-e-b;d.y+=1*-g-c;return function(){a.begin();a.moveTo(x.x,x.y);h?a.lineTo(x.x-e-g/2,x.y-g+e/2):a.lineTo(x.x+g/2-e,x.y-g-e/2);a.lineTo(x.x-e,x.y-g);a.close();l?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync", -function(a){a=null!=a?a:2;return function(b,c,d,e,g,f,h,k,l,x){g*=h+l;f*=h+l;var m=e.clone();return function(){b.begin();b.moveTo(m.x,m.y);k?b.lineTo(m.x-g-f/a,m.y-f+g/a):b.lineTo(m.x+f/a-g,m.y-f-g/a);b.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Ha=function(a,b,c){return qa(a,["width"],b,function(b,d,e,g,f){f=a.shape.getEdgeWidth()*a.view.scale+c;return new mxPoint(g.x+d*b/4+e*f/2,g.y+e*b/4-d*f/2)},function(b,d,e,g,f,h){b=Math.sqrt(mxUtils.ptSegDistSq(g.x,g.y,f.x,f.y,h.x,h.y));a.style.width= -Math.round(2*b)/a.view.scale-c})},qa=function(a,b,c,d,e){return N(a,b,function(b){var e=a.absolutePoints,g=e.length-1;b=a.view.translate;var f=a.view.scale,h=c?e[0]:e[g],e=c?e[1]:e[g-1],g=e.x-h.x,k=e.y-h.y,l=Math.sqrt(g*g+k*k),h=d.call(this,l,g/l,k/l,h,e);return new mxPoint(h.x/f-b.x,h.y/f-b.y)},function(b,d,g){var f=a.absolutePoints,h=f.length-1;b=a.view.translate;var k=a.view.scale,l=c?f[0]:f[h],f=c?f[1]:f[h-1],h=f.x-l.x,m=f.y-l.y,x=Math.sqrt(h*h+m*m);d.x=(d.x+b.x)*k;d.y=(d.y+b.y)*k;e.call(this, -x,h/x,m/x,l,f,d,g)})},ia=function(a){return function(b){return[N(b,["arrowWidth","arrowSize"],function(b){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",R.prototype.arrowWidth))),d=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",R.prototype.arrowSize)));return new mxPoint(b.x+(1-d)*b.width,b.y+(1-c)*b.height/2)},function(b,c){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(b.y+b.height/2-c.y)/b.height*2));this.state.style.arrowSize=Math.max(0, -Math.min(a,(b.x+b.width-c.x)/b.width))})]}},ta=function(a,b,c){return function(d){var e=[N(d,["size"],function(c){var d=Math.max(0,Math.min(c.width,Math.min(c.height,parseFloat(mxUtils.getValue(this.state.style,"size",b)))))*a;return new mxPoint(c.x+d,c.y+d)},function(b,c){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(b.width,c.x-b.x),Math.min(b.height,c.y-b.y)))/a)})];c&&mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&e.push(ga(d));return e}},xa=function(a,b,c,d,e){c=null!= -c?c:1;return function(g){var f=[N(g,["size"],function(b){var c=null!=e?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,d=parseFloat(mxUtils.getValue(this.state.style,"size",c?e:a));return new mxPoint(b.x+Math.max(0,Math.min(b.width,d*(c?1:b.width))),b.getCenterY())},function(a,b,d){var f=null!=e?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null;a=f?b.x-a.x:Math.max(0,Math.min(c,(b.x-a.x)/a.width));f&&!mxEvent.isAltDown(d.getEvent())&&(a=g.view.graph.snap(a));this.state.style.size= -a},null,d)];b&&mxUtils.getValue(g.style,mxConstants.STYLE_ROUNDED,!1)&&f.push(ga(g));return f}},Ia=function(a){return function(b){var c=[N(b,["size"],function(b){var c=Math.max(0,Math.min(a,parseFloat(mxUtils.getValue(this.state.style,"size",p.prototype.size))));return new mxPoint(b.x+c*b.width*.75,b.y+b.height/4)},function(b,c){this.state.style.size=Math.max(0,Math.min(a,(c.x-b.x)/(.75*b.width)))},null,!0)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(ga(b));return c}},sa=function(){return function(a){var b= -[];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ga(a));return b}},ga=function(a,b){return N(a,[mxConstants.STYLE_ARCSIZE],function(c){var d=null!=b?b:c.height/8;if("1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var e=mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(c.x+c.width-Math.min(c.width/2,e),c.y+d)}e=Math.max(0,parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/ -100;return new mxPoint(c.x+c.width-Math.min(Math.max(c.width/2,c.height/2),Math.min(c.width,c.height)*e),c.y+d)},function(b,c,d){"1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(b.width,2*(b.x+b.width-c.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(b.width-c.x+b.x)/Math.min(b.width,b.height))))})},N=function(a,b,c,d,e,g){var f=new mxHandle(a,null,mxVertexHandler.prototype.secondaryHandleImage); -f.execute=function(){for(var a=0;a<b.length;a++)this.copyStyle(b[a])};f.getPosition=c;f.setPosition=d;f.ignoreGrid=null!=e?e:!0;if(g){var h=f.positionChanged;f.positionChanged=function(){h.apply(this,arguments);a.view.invalidate(this.state.cell);a.view.validate()}}return f},ya={link:function(a){return[Ha(a,!0,10),Ha(a,!1,10)]},flexArrow:function(a){var b=a.view.graph.gridSize/a.view.scale,c=[];mxUtils.getValue(a.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(c.push(qa(a, -["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(b,c,d,e,g){b=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;g=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+c*(g+a.shape.strokewidth*a.view.scale)+d*b/2,e.y+d*(g+a.shape.strokewidth*a.view.scale)-c*b/2)},function(c,d,e,g,f,h,k){c=Math.sqrt(mxUtils.ptSegDistSq(g.x,g.y,f.x,f.y,h.x,h.y));d=mxUtils.ptLineDist(g.x,g.y,g.x+e,g.y-d,h.x,h.y);a.style[mxConstants.STYLE_STARTSIZE]= -Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*c)/a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]);mxEvent.isAltDown(k.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<b/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE])})),c.push(qa(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE], -!0,function(b,c,d,e,g){b=(a.shape.getStartArrowWidth()-a.shape.strokewidth)*a.view.scale;g=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+c*(g+a.shape.strokewidth*a.view.scale)+d*b/2,e.y+d*(g+a.shape.strokewidth*a.view.scale)-c*b/2)},function(c,d,e,g,f,h,k){c=Math.sqrt(mxUtils.ptSegDistSq(g.x,g.y,f.x,f.y,h.x,h.y));d=mxUtils.ptLineDist(g.x,g.y,g.x+e,g.y-d,h.x,h.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(d-a.shape.strokewidth)/ -3)/100/a.view.scale;a.style.startWidth=Math.max(0,Math.round(2*c)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE],a.style.endWidth=a.style.startWidth);mxEvent.isAltDown(k.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<b/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(a.style.startWidth)- -parseFloat(a.style.endWidth))<b&&(a.style.startWidth=a.style.endWidth))})));mxUtils.getValue(a.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(c.push(qa(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(b,c,d,e,g){b=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;g=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+c*(g+a.shape.strokewidth*a.view.scale)-d*b/2,e.y+d*(g+a.shape.strokewidth* -a.view.scale)+c*b/2)},function(c,d,e,g,f,h,k){c=Math.sqrt(mxUtils.ptSegDistSq(g.x,g.y,f.x,f.y,h.x,h.y));d=mxUtils.ptLineDist(g.x,g.y,g.x+e,g.y-d,h.x,h.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*c)/a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]);mxEvent.isAltDown(k.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))< -b/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE])})),c.push(qa(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(b,c,d,e,g){b=(a.shape.getEndArrowWidth()-a.shape.strokewidth)*a.view.scale;g=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+c*(g+a.shape.strokewidth*a.view.scale)-d*b/2,e.y+d*(g+a.shape.strokewidth*a.view.scale)+c*b/2)},function(c,d,e,g,f,h,k){c= -Math.sqrt(mxUtils.ptSegDistSq(g.x,g.y,f.x,f.y,h.x,h.y));d=mxUtils.ptLineDist(g.x,g.y,g.x+e,g.y-d,h.x,h.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.endWidth=Math.max(0,Math.round(2*c)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE],a.style.startWidth=a.style.endWidth);mxEvent.isAltDown(k.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])- -parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<b/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(a.style.endWidth)-parseFloat(a.style.startWidth))<b&&(a.style.endWidth=a.style.startWidth))})));return c},swimlane:function(a){var b=[N(a,[mxConstants.STYLE_STARTSIZE],function(b){var c=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(a.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(b.getCenterX(), -b.y+Math.max(0,Math.min(b.height,c))):new mxPoint(b.x+Math.max(0,Math.min(b.width,c)),b.getCenterY())},function(b,c){a.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(b.height,c.y-b.y))):Math.round(Math.max(0,Math.min(b.width,c.x-b.x)))})];if(mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED)){var c=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));b.push(ga(a,c/2))}return b}, -label:sa(),ext:sa(),rectangle:sa(),triangle:sa(),rhombus:sa(),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",G.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(L.prototype.corner,Math.min(a.width,mxUtils.getValue(this.state.style, -"width",L.prototype.width))),c=Math.max(1.5*L.prototype.corner,Math.min(a.height,mxUtils.getValue(this.state.style,"height",L.prototype.height)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.width=Math.round(Math.max(L.prototype.corner,Math.min(a.width,b.x-a.x)));this.state.style.height=Math.round(Math.max(1.5*L.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",w.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(ga(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",oa.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",W.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(ga(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",ca.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",u.prototype.size))),c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",u.prototype.position)));mxUtils.getValue(this.state.style,"base",u.prototype.base);return new mxPoint(a.x+c*a.width,a.y+a.height- -b)},function(a,b){mxUtils.getValue(this.state.style,"base",u.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",u.prototype.position2)));return new mxPoint(a.x+b*a.width,a.y+a.height)},function(a,b){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1, -(b.x-a.x)/a.width)))/100}),N(a,["base"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",u.prototype.size))),c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",u.prototype.position))),d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"base",u.prototype.base)));return new mxPoint(a.x+Math.min(a.width,c*a.width+d),a.y+a.height-b)},function(a,b){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",u.prototype.position))); -this.state.style.base=Math.round(Math.max(0,Math.min(a.width,b.x-a.x-c*a.width)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ga(a));return b},internalStorage:function(a){var b=[N(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",U.prototype.dx))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",U.prototype.dy)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width, -b.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ga(a));return b},corner:function(a){return[N(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",aa.prototype.dx))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",aa.prototype.dy)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width, -b.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})]},tee:function(a){return[N(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",ba.prototype.dx))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",ba.prototype.dy)));return new mxPoint(a.x+(a.width+b)/2,a.y+c)},function(a,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:ia(1),doubleArrow:ia(.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",Y.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:xa(q.prototype.size,!0,null,!0,q.prototype.fixedSize),hexagon:xa(z.prototype.size,!0,.5,!0),curlyBracket:xa(n.prototype.size,!1),display:xa(pa.prototype.size,!1),cube:ta(1,a.prototype.size,!1),card:ta(.5,g.prototype.size,!0),loopLimit:ta(.5,X.prototype.size,!0),trapezoid:Ia(.5),parallelogram:Ia(1)};Graph.createHandle=N;Graph.handleFactory=ya;mxVertexHandler.prototype.createCustomHandles= -function(){if(1==this.state.view.graph.getSelectionCount()&&this.graph.isCellRotatable(this.state.cell)){var a=this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_RECTANGLE);a=ya[a];null==a&&null!=this.state.shape&&this.state.shape.isRoundable()&&(a=ya[mxConstants.SHAPE_RECTANGLE]);if(null!=a)return a(this.state)}return null};mxEdgeHandler.prototype.createCustomHandles=function(){if(1==this.state.view.graph.getSelectionCount()){var a= -this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_CONNECTOR);a=ya[a];if(null!=a)return a(this.state)}return null}}else Graph.createHandle=function(){},Graph.handleFactory={};var za=new mxPoint(1,0),Aa=new mxPoint(1,0),ia=mxUtils.toRadians(-30),za=mxUtils.getRotatedPoint(za,Math.cos(ia),Math.sin(ia)),ia=mxUtils.toRadians(-150),Aa=mxUtils.getRotatedPoint(Aa,Math.cos(ia),Math.sin(ia));mxEdgeStyle.IsometricConnector=function(a,b, -c,d,e){var g=a.view;d=null!=d&&0<d.length?d[0]:null;var f=a.absolutePoints,h=f[0],f=f[f.length-1];null!=d&&(d=g.transformControlPoint(a,d));null==h&&null!=b&&(h=new mxPoint(b.getCenterX(),b.getCenterY()));null==f&&null!=c&&(f=new mxPoint(c.getCenterX(),c.getCenterY()));var k=za.x,l=za.y,m=Aa.x,p=Aa.y,n="horizontal"==mxUtils.getValue(a.style,"elbow","horizontal");if(null!=f&&null!=h){a=function(a,b,c){a-=x.x;var d=b-x.y;b=(p*a-m*d)/(k*p-l*m);a=(l*a-k*d)/(l*m-k*p);n?(c&&(x=new mxPoint(x.x+k*b,x.y+l* -b),e.push(x)),x=new mxPoint(x.x+m*a,x.y+p*a)):(c&&(x=new mxPoint(x.x+m*a,x.y+p*a),e.push(x)),x=new mxPoint(x.x+k*b,x.y+l*b));e.push(x)};var x=h;null==d&&(d=new mxPoint(h.x+(f.x-h.x)/2,h.y+(f.y-h.y)/2));a(d.x,d.y,!0);a(f.x,f.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Oa=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(a,b){if(b==mxEdgeStyle.IsometricConnector){var c=new mxElbowEdgeHandler(a);c.snapToTerminals=!1;return c}return Oa.apply(this, -arguments)};c.prototype.constraints=[];d.prototype.getConstraints=function(a,b,c){a=[];var d=Math.tan(mxUtils.toRadians(30)),e=(.5-d)/2,d=Math.min(b,c/(.5+d));b=(b-d)/2;c=(c-d)/2;a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,c+.25*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b+.5*d,c+d*e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b+d,c+.25*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b+d,c+.75*d));a.push(new mxConnectionConstraint(new mxPoint(0, -0),!1,null,b+.5*d,c+(1-e)*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,c+.75*d));return a};u.prototype.getConstraints=function(a,b,c){a=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var e=b*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,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(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5), -!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxEllipse.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0, -1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;y.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};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,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth)))),e=Math.max(0,Math.min(c,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*d,0)),a.push(new mxConnectionConstraint(new mxPoint(0, -0),!1,null,d,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+d),e))):(a.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-.5*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-d,e)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-d),e)));a.push(new mxConnectionConstraint(new mxPoint(0, -0),!1,null,b,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.25*(c-e)+e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.5*(c-e)+e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.75*(c-e)+e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(c-e)+e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null, -0,.5*(c-e)+e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.75*(c-e)+e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,c));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};U.prototype.constraints=mxRectangleShape.prototype.constraints;ca.prototype.constraints=mxRectangleShape.prototype.constraints;da.prototype.constraints=mxEllipse.prototype.constraints; -ha.prototype.constraints=mxEllipse.prototype.constraints;V.prototype.constraints=mxEllipse.prototype.constraints;ua.prototype.constraints=mxEllipse.prototype.constraints;W.prototype.constraints=mxRectangleShape.prototype.constraints;va.prototype.constraints=mxRectangleShape.prototype.constraints;pa.prototype.getConstraints=function(a,b,c){a=[];var d=Math.min(b,c/2),e=Math.min(b-d,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*b);a.push(new mxConnectionConstraint(new mxPoint(0, -.5),!1,null));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(e+b-d),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-d,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-d,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(e+b-d),c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,c));return a};X.prototype.constraints= -mxRectangleShape.prototype.constraints;Y.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)];D.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75,.1),!1),new mxConnectionConstraint(new mxPoint(0,1/3),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(1, -1/3),!1),new mxConnectionConstraint(new mxPoint(1,1),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1)];B.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1, -.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxActor.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.25,.2),!1),new mxConnectionConstraint(new mxPoint(.1,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.75,.25),!1),new mxConnectionConstraint(new mxPoint(.9,.5),!1),new mxConnectionConstraint(new mxPoint(1, -.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];e.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.5, -.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];k.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,.65),!1),new mxConnectionConstraint(new mxPoint(.25,1),!1),new mxConnectionConstraint(new mxPoint(.75,0),!1)];q.prototype.constraints= -[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1, -.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];O.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];mxDoubleEllipse.prototype.constraints=mxEllipse.prototype.constraints;mxRhombus.prototype.constraints= -mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0)];mxHexagon.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.375,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.625, -0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.375,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.625,1),!0)];mxCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25, -.25),!1),new mxConnectionConstraint(new mxPoint(.4,.1),!1),new mxConnectionConstraint(new mxPoint(.16,.55),!1),new mxConnectionConstraint(new mxPoint(.07,.4),!1),new mxConnectionConstraint(new mxPoint(.31,.8),!1),new mxConnectionConstraint(new mxPoint(.13,.77),!1),new mxConnectionConstraint(new mxPoint(.8,.8),!1),new mxConnectionConstraint(new mxPoint(.55,.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625, -.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];m.prototype.constraints=mxRectangleShape.prototype.constraints;p.prototype.constraints=mxRectangleShape.prototype.constraints;l.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0, -.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;ba.prototype.getConstraints=function(a,b,c){a=[];var d=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),e=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5, -0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.5*e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*b+.25*d,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+d),e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+d),.5*(c+e)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+d),c));a.push(new mxConnectionConstraint(new mxPoint(.5, -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,.5*(b-d),.5*(c+e)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-d),e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*b-.25*d,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*e));return a};aa.prototype.getConstraints=function(a,b,c){a=[];var d= -Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),e=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.5*e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,e));a.push(new mxConnectionConstraint(new mxPoint(0, -0),!1,null,.5*(b+d),e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*(c+e)));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));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));return a};ja.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0, -.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];R.prototype.getConstraints=function(a,b,c){a=[];var d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))), -e=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize)))),d=(c-d)/2;a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-e),d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-e,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-e,c));a.push(new mxConnectionConstraint(new mxPoint(0, -0),!1,null,.5*(b-e),c-d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,c-d));return a};ka.prototype.getConstraints=function(a,b,c){a=[];var d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",R.prototype.arrowWidth)))),e=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",R.prototype.arrowSize)))),d=(c-d)/2;a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,0));a.push(new mxConnectionConstraint(new mxPoint(0, -0),!1,null,.5*b,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-e,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-e,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*b,c-d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,c));return a};oa.prototype.getConstraints=function(a,b,c){a=[];var d=Math.min(c,b),e=Math.max(0,Math.min(d,d*parseFloat(mxUtils.getValue(this.style,"size",this.size)))), -d=(c-e)/2,g=d+e,f=(b-e)/2,e=f+e;a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,0));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,c-.5*d));a.push(new mxConnectionConstraint(new mxPoint(0, -0),!1,null,f,c));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,c-.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,g));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+e),d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,d));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0, -0),!1,null,b,g));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+e),g));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,g));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*f,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,g));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*f,g));a.push(new mxConnectionConstraint(new mxPoint(0, -0),!1,null,f,d));return a};G.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)];fa.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)];P.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];H.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()} +function(a,b,c,d,e){b=Math.min(d,e/2);a.moveTo(0,0);a.lineTo(d-b,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,d-b,e);a.lineTo(0,e);a.close();a.end()};mxCellRenderer.registerShape("delay",va);mxUtils.extend(pa,mxActor);pa.prototype.size=.2;pa.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(e,d);var f=Math.max(0,Math.min(b,b*parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=(e-f)/2;c=b+f;var g=(d-f)/2,f=g+f;a.moveTo(0,b);a.lineTo(g,b);a.lineTo(g,0);a.lineTo(f,0);a.lineTo(f,b);a.lineTo(d,b);a.lineTo(d, +c);a.lineTo(f,c);a.lineTo(f,e);a.lineTo(g,e);a.lineTo(g,c);a.lineTo(0,c);a.close();a.end()};mxCellRenderer.registerShape("cross",pa);mxUtils.extend(oa,mxActor);oa.prototype.size=.25;oa.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d,e/2);c=Math.min(d-b,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*d);a.moveTo(0,e/2);a.lineTo(c,0);a.lineTo(d-b,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,d-b,e);a.lineTo(c,e);a.close();a.end()};mxCellRenderer.registerShape("display",oa);mxUtils.extend(ma, +mxConnector);ma.prototype.origPaintEdgeShape=ma.prototype.paintEdgeShape;ma.prototype.paintEdgeShape=function(a,b,c){for(var d=[],e=0;e<b.length;e++)d.push(mxUtils.clone(b[e]));var e=a.state.dashed,f=a.state.fixDash;ma.prototype.origPaintEdgeShape.apply(this,[a,d,c]);3<=a.state.strokeWidth&&(d=mxUtils.getValue(this.style,"fillColor",null),null!=d&&(a.setStrokeColor(d),a.setStrokeWidth(a.state.strokeWidth-2),a.setDashed(e,f),ma.prototype.origPaintEdgeShape.apply(this,[a,b,c])))};mxCellRenderer.registerShape("filledEdge", +ma);"undefined"!==typeof StyleFormatPanel&&function(){var a=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var b=this.format.getSelectionState(),c=a.apply(this,arguments);"umlFrame"==b.style.shape&&c.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"#ffffff"});return c}}();mxMarker.addMarker("dash",function(a,b,c,d,e,f,g,h,k,l){var m=e*(g+k+1),B=f*(g+k+1);return function(){a.begin();a.moveTo(d.x-m/2-B/2,d.y-B/2+m/2);a.lineTo(d.x+ +B/2-3*m/2,d.y-3*B/2-m/2);a.stroke()}});mxMarker.addMarker("cross",function(a,b,c,d,e,f,g,h,k,l){var m=e*(g+k+1),B=f*(g+k+1);return function(){a.begin();a.moveTo(d.x-m/2-B/2,d.y-B/2+m/2);a.lineTo(d.x+B/2-3*m/2,d.y-3*B/2-m/2);a.moveTo(d.x-m/2+B/2,d.y-B/2-m/2);a.lineTo(d.x-B/2-3*m/2,d.y-3*B/2+m/2);a.stroke()}});mxMarker.addMarker("circle",Fa);mxMarker.addMarker("circlePlus",function(a,b,c,d,e,f,g,h,k,l){var m=d.clone(),B=Fa.apply(this,arguments),n=e*(g+2*k),p=f*(g+2*k);return function(){B.apply(this, +arguments);a.begin();a.moveTo(m.x-e*k,m.y-f*k);a.lineTo(m.x-2*n+e*k,m.y-2*p+f*k);a.moveTo(m.x-n-p+f*k,m.y-p+n-e*k);a.lineTo(m.x+p-n-f*k,m.y-p-n+e*k);a.stroke()}});mxMarker.addMarker("halfCircle",function(a,b,c,d,e,f,g,h,k,l){var m=e*(g+k+1),B=f*(g+k+1),n=d.clone();d.x-=m;d.y-=B;return function(){a.begin();a.moveTo(n.x-B,n.y+m);a.quadTo(d.x-B,d.y+m,d.x,d.y);a.quadTo(d.x+B,d.y-m,n.x+B,n.y-m);a.stroke()}});mxMarker.addMarker("async",function(a,b,c,d,e,f,g,h,k,l){b=e*k*1.118;c=f*k*1.118;e*=g+k;f*=g+k; +var m=d.clone();m.x-=b;m.y-=c;d.x+=1*-e-b;d.y+=1*-f-c;return function(){a.begin();a.moveTo(m.x,m.y);h?a.lineTo(m.x-e-f/2,m.y-f+e/2):a.lineTo(m.x+f/2-e,m.y-f-e/2);a.lineTo(m.x-e,m.y-f);a.close();l?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync",function(a){a=null!=a?a:2;return function(b,c,d,e,f,g,h,k,l,m){f*=h+l;g*=h+l;var B=e.clone();return function(){b.begin();b.moveTo(B.x,B.y);k?b.lineTo(B.x-f-g/a,B.y-g+f/a):b.lineTo(B.x+g/a-f,B.y-g-f/a);b.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Ha= +function(a,b,c){return qa(a,["width"],b,function(b,d,e,f,g){g=a.shape.getEdgeWidth()*a.view.scale+c;return new mxPoint(f.x+d*b/4+e*g/2,f.y+e*b/4-d*g/2)},function(b,d,e,f,g,h){b=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,h.x,h.y));a.style.width=Math.round(2*b)/a.view.scale-c})},qa=function(a,b,c,d,e){return O(a,b,function(b){var e=a.absolutePoints,f=e.length-1;b=a.view.translate;var g=a.view.scale,h=c?e[0]:e[f],e=c?e[1]:e[f-1],f=e.x-h.x,k=e.y-h.y,l=Math.sqrt(f*f+k*k),h=d.call(this,l,f/l,k/l,h,e); +return new mxPoint(h.x/g-b.x,h.y/g-b.y)},function(b,d,f){var g=a.absolutePoints,h=g.length-1;b=a.view.translate;var k=a.view.scale,l=c?g[0]:g[h],g=c?g[1]:g[h-1],h=g.x-l.x,m=g.y-l.y,B=Math.sqrt(h*h+m*m);d.x=(d.x+b.x)*k;d.y=(d.y+b.y)*k;e.call(this,B,h/B,m/B,l,g,d,f)})},ia=function(a){return function(b){return[O(b,["arrowWidth","arrowSize"],function(b){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",S.prototype.arrowWidth))),d=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style, +"arrowSize",S.prototype.arrowSize)));return new mxPoint(b.x+(1-d)*b.width,b.y+(1-c)*b.height/2)},function(b,c){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(b.y+b.height/2-c.y)/b.height*2));this.state.style.arrowSize=Math.max(0,Math.min(a,(b.x+b.width-c.x)/b.width))})]}},Ba=function(a,b,c){return function(d){var e=[O(d,["size"],function(c){var d=Math.max(0,Math.min(c.width,Math.min(c.height,parseFloat(mxUtils.getValue(this.state.style,"size",b)))))*a;return new mxPoint(c.x+d,c.y+d)}, +function(b,c){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(b.width,c.x-b.x),Math.min(b.height,c.y-b.y)))/a)})];c&&mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&e.push(ga(d));return e}},ra=function(a,b,c,d,e){c=null!=c?c:1;return function(f){var g=[O(f,["size"],function(b){var c=null!=e?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,d=parseFloat(mxUtils.getValue(this.state.style,"size",c?e:a));return new mxPoint(b.x+Math.max(0,Math.min(b.width,d*(c?1:b.width))), +b.getCenterY())},function(a,b,d){var g=null!=e?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null;a=g?b.x-a.x:Math.max(0,Math.min(c,(b.x-a.x)/a.width));g&&!mxEvent.isAltDown(d.getEvent())&&(a=f.view.graph.snap(a));this.state.style.size=a},null,d)];b&&mxUtils.getValue(f.style,mxConstants.STYLE_ROUNDED,!1)&&g.push(ga(f));return g}},Ia=function(a){return function(b){var c=[O(b,["size"],function(b){var c=Math.max(0,Math.min(a,parseFloat(mxUtils.getValue(this.state.style,"size",n.prototype.size)))); +return new mxPoint(b.x+c*b.width*.75,b.y+b.height/4)},function(b,c){this.state.style.size=Math.max(0,Math.min(a,(c.x-b.x)/(.75*b.width)))},null,!0)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(ga(b));return c}},ta=function(){return function(a){var b=[];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ga(a));return b}},ga=function(a,b){return O(a,[mxConstants.STYLE_ARCSIZE],function(c){var d=null!=b?b:c.height/8;if("1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE, +0)){var e=mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(c.x+c.width-Math.min(c.width/2,e),c.y+d)}e=Math.max(0,parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(c.x+c.width-Math.min(Math.max(c.width/2,c.height/2),Math.min(c.width,c.height)*e),c.y+d)},function(b,c,d){"1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]= +Math.round(Math.max(0,Math.min(b.width,2*(b.x+b.width-c.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(b.width-c.x+b.x)/Math.min(b.width,b.height))))})},O=function(a,b,c,d,e,f){var g=new mxHandle(a,null,mxVertexHandler.prototype.secondaryHandleImage);g.execute=function(){for(var a=0;a<b.length;a++)this.copyStyle(b[a])};g.getPosition=c;g.setPosition=d;g.ignoreGrid=null!=e?e:!0;if(f){var h=g.positionChanged;g.positionChanged=function(){h.apply(this,arguments); +a.view.invalidate(this.state.cell);a.view.validate()}}return g},xa={link:function(a){return[Ha(a,!0,10),Ha(a,!1,10)]},flexArrow:function(a){var b=a.view.graph.gridSize/a.view.scale,c=[];mxUtils.getValue(a.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(c.push(qa(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(b,c,d,e,f){b=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/ +5)*a.view.scale;return new mxPoint(e.x+c*(f+a.shape.strokewidth*a.view.scale)+d*b/2,e.y+d*(f+a.shape.strokewidth*a.view.scale)-c*b/2)},function(c,d,e,f,g,h,k){c=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,h.x,h.y));d=mxUtils.ptLineDist(f.x,f.y,f.x+e,f.y-d,h.x,h.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*c)/a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]); +mxEvent.isAltDown(k.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<b/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE])})),c.push(qa(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(b,c,d,e,f){b=(a.shape.getStartArrowWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+ +c*(f+a.shape.strokewidth*a.view.scale)+d*b/2,e.y+d*(f+a.shape.strokewidth*a.view.scale)-c*b/2)},function(c,d,e,f,g,h,k){c=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,h.x,h.y));d=mxUtils.ptLineDist(f.x,f.y,f.x+e,f.y-d,h.x,h.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.startWidth=Math.max(0,Math.round(2*c)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE], +a.style.endWidth=a.style.startWidth);mxEvent.isAltDown(k.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<b/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(a.style.startWidth)-parseFloat(a.style.endWidth))<b&&(a.style.startWidth=a.style.endWidth))})));mxUtils.getValue(a.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(c.push(qa(a,["width",mxConstants.STYLE_STARTSIZE, +mxConstants.STYLE_ENDSIZE],!1,function(b,c,d,e,f){b=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+c*(f+a.shape.strokewidth*a.view.scale)-d*b/2,e.y+d*(f+a.shape.strokewidth*a.view.scale)+c*b/2)},function(c,d,e,f,g,h,k){c=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,h.x,h.y));d=mxUtils.ptLineDist(f.x,f.y,f.x+e,f.y-d,h.x,h.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100* +(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*c)/a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]);mxEvent.isAltDown(k.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<b/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE])})),c.push(qa(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE], +!1,function(b,c,d,e,f){b=(a.shape.getEndArrowWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+c*(f+a.shape.strokewidth*a.view.scale)-d*b/2,e.y+d*(f+a.shape.strokewidth*a.view.scale)+c*b/2)},function(c,d,e,f,g,h,k){c=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,h.x,h.y));d=mxUtils.ptLineDist(f.x,f.y,f.x+e,f.y-d,h.x,h.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(d-a.shape.strokewidth)/ +3)/100/a.view.scale;a.style.endWidth=Math.max(0,Math.round(2*c)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE],a.style.startWidth=a.style.endWidth);mxEvent.isAltDown(k.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<b/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(a.style.endWidth)- +parseFloat(a.style.startWidth))<b&&(a.style.endWidth=a.style.startWidth))})));return c},swimlane:function(a){var b=[O(a,[mxConstants.STYLE_STARTSIZE],function(b){var c=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(a.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(b.getCenterX(),b.y+Math.max(0,Math.min(b.height,c))):new mxPoint(b.x+Math.max(0,Math.min(b.width,c)),b.getCenterY())},function(b,c){a.style[mxConstants.STYLE_STARTSIZE]= +1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(b.height,c.y-b.y))):Math.round(Math.max(0,Math.min(b.width,c.x-b.x)))})];if(mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED)){var c=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));b.push(ga(a,c/2))}return b},label:ta(),ext:ta(),rectangle:ta(),triangle:ta(),rhombus:ta(),umlLifeline:function(a){return[O(a,["size"],function(a){var b=Math.max(0,Math.min(a.height, +parseFloat(mxUtils.getValue(this.state.style,"size",G.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[O(a,["width","height"],function(a){var b=Math.max(K.prototype.corner,Math.min(a.width,mxUtils.getValue(this.state.style,"width",K.prototype.width))),c=Math.max(1.5*K.prototype.corner,Math.min(a.height,mxUtils.getValue(this.state.style,"height",K.prototype.height))); +return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.width=Math.round(Math.max(K.prototype.corner,Math.min(a.width,b.x-a.x)));this.state.style.height=Math.round(Math.max(1.5*K.prototype.corner,Math.min(a.height,b.y-a.y)))},!1)]},process:function(a){var b=[O(a,["size"],function(a){var b=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style,"size",w.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(ga(a));return b},cross:function(a){return[O(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[O(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=[O(a,["size"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",X.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(ga(a));return b},dataStorage:function(a){return[O(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",ca.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=[O(a,["size","position"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",u.prototype.size))),c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",u.prototype.position)));mxUtils.getValue(this.state.style,"base",u.prototype.base);return new mxPoint(a.x+c*a.width,a.y+a.height-b)},function(a,b){mxUtils.getValue(this.state.style,"base",u.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}),O(a,["position2"],function(a){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",u.prototype.position2)));return new mxPoint(a.x+b*a.width,a.y+a.height)},function(a,b){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(b.x-a.x)/a.width)))/100}),O(a,["base"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",u.prototype.size))), +c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",u.prototype.position))),d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"base",u.prototype.base)));return new mxPoint(a.x+Math.min(a.width,c*a.width+d),a.y+a.height-b)},function(a,b){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",u.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(a.width,b.x-a.x-c*a.width)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED, +!1)&&b.push(ga(a));return b},internalStorage:function(a){var b=[O(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",V.prototype.dx))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",V.prototype.dy)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,b.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED, +!1)&&b.push(ga(a));return b},corner:function(a){return[O(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",Y.prototype.dx))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",Y.prototype.dy)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,b.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})]},tee:function(a){return[O(a,["dx","dy"],function(a){var b= +Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",ba.prototype.dx))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",ba.prototype.dy)));return new mxPoint(a.x+(a.width+b)/2,a.y+c)},function(a,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:ia(1),doubleArrow:ia(.5),folder:function(a){return[O(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[O(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[O(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[O(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",aa.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:ra(r.prototype.size,!0,null,!0,r.prototype.fixedSize),hexagon:ra(x.prototype.size,!0,.5,!0),curlyBracket:ra(p.prototype.size,!1),display:ra(oa.prototype.size,!1),cube:Ba(1,a.prototype.size,!1),card:Ba(.5,g.prototype.size,!0),loopLimit:Ba(.5,Z.prototype.size,!0),trapezoid:Ia(.5),parallelogram:Ia(1)};Graph.createHandle=O;Graph.handleFactory=xa;mxVertexHandler.prototype.createCustomHandles=function(){if(1==this.state.view.graph.getSelectionCount()&&this.graph.isCellRotatable(this.state.cell)){var a= +this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_RECTANGLE);a=xa[a];null==a&&null!=this.state.shape&&this.state.shape.isRoundable()&&(a=xa[mxConstants.SHAPE_RECTANGLE]);if(null!=a)return a(this.state)}return null};mxEdgeHandler.prototype.createCustomHandles=function(){if(1==this.state.view.graph.getSelectionCount()){var a=this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a= +mxConstants.SHAPE_CONNECTOR);a=xa[a];if(null!=a)return a(this.state)}return null}}else Graph.createHandle=function(){},Graph.handleFactory={};var ya=new mxPoint(1,0),za=new mxPoint(1,0),ia=mxUtils.toRadians(-30),ya=mxUtils.getRotatedPoint(ya,Math.cos(ia),Math.sin(ia)),ia=mxUtils.toRadians(-150),za=mxUtils.getRotatedPoint(za,Math.cos(ia),Math.sin(ia));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","horizontal");if(null!=g&&null!=h){a=function(a,b,c){a-=q.x;var d=b-q.y;b=(n*a-m*d)/(k*n-l*m);a=(l*a-k*d)/(l*m-k*n);p?(c&&(q=new mxPoint(q.x+k*b,q.y+l*b),e.push(q)),q=new mxPoint(q.x+m*a,q.y+n*a)):(c&&(q=new mxPoint(q.x+m*a,q.y+n*a),e.push(q)),q=new mxPoint(q.x+ +k*b,q.y+l*b));e.push(q)};var q=h;null==d&&(d=new mxPoint(h.x+(g.x-h.x)/2,h.y+(g.y-h.y)/2));a(d.x,d.y,!0);a(g.x,g.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Oa=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(a,b){if(b==mxEdgeStyle.IsometricConnector){var c=new mxElbowEdgeHandler(a);c.snapToTerminals=!1;return c}return Oa.apply(this,arguments)};c.prototype.constraints=[];d.prototype.getConstraints=function(a,b,c){a=[];var d= +Math.tan(mxUtils.toRadians(30)),e=(.5-d)/2,d=Math.min(b,c/(.5+d));b=(b-d)/2;c=(c-d)/2;a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,c+.25*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b+.5*d,c+d*e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b+d,c+.25*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b+d,c+.75*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b+.5*d,c+(1-e)*d));a.push(new mxConnectionConstraint(new mxPoint(0, +0),!1,null,b,c+.75*d));return a};u.prototype.getConstraints=function(a,b,c){a=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var e=b*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,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(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1, +.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxEllipse.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(.5, +0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;y.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};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,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth)))),e=Math.max(0,Math.min(c,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*d,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,0)),a.push(new mxConnectionConstraint(new mxPoint(0, +0),!1,null,d,e)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+d),e))):(a.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-.5*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-d,e)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-d),e)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,e));a.push(new mxConnectionConstraint(new mxPoint(0, +0),!1,null,b,.25*(c-e)+e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.5*(c-e)+e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.75*(c-e)+e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(c-e)+e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(c-e)+e));a.push(new mxConnectionConstraint(new mxPoint(0, +0),!1,null,0,.75*(c-e)+e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,c));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};V.prototype.constraints=mxRectangleShape.prototype.constraints;ca.prototype.constraints=mxRectangleShape.prototype.constraints;da.prototype.constraints=mxEllipse.prototype.constraints;ha.prototype.constraints=mxEllipse.prototype.constraints; +U.prototype.constraints=mxEllipse.prototype.constraints;ua.prototype.constraints=mxEllipse.prototype.constraints;X.prototype.constraints=mxRectangleShape.prototype.constraints;va.prototype.constraints=mxRectangleShape.prototype.constraints;oa.prototype.getConstraints=function(a,b,c){a=[];var d=Math.min(b,c/2),e=Math.min(b-d,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*b);a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));a.push(new mxConnectionConstraint(new mxPoint(0, +0),!1,null,e,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(e+b-d),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-d,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-d,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(e+b-d),c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,c));return a};Z.prototype.constraints=mxRectangleShape.prototype.constraints;aa.prototype.constraints= +mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1, +.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];E.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75,.1),!1),new mxConnectionConstraint(new mxPoint(0,1/3),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1, +1),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1)];M.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25, +1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxActor.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.25,.2),!1),new mxConnectionConstraint(new mxPoint(.1,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.75,.25),!1),new mxConnectionConstraint(new mxPoint(.9,.5),!1),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25, +1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];e.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1, +1),!1)];k.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,.65),!1),new mxConnectionConstraint(new mxPoint(.25,1),!1),new mxConnectionConstraint(new mxPoint(.75,0),!1)];r.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0), +!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1, +.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];P.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];mxDoubleEllipse.prototype.constraints=mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints= +[new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0)];mxHexagon.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.375,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.625,0),!0),new mxConnectionConstraint(new mxPoint(0, +.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.375,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.625,1),!0)];mxCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.25),!1),new mxConnectionConstraint(new mxPoint(.4, +.1),!1),new mxConnectionConstraint(new mxPoint(.16,.55),!1),new mxConnectionConstraint(new mxPoint(.07,.4),!1),new mxConnectionConstraint(new mxPoint(.31,.8),!1),new mxConnectionConstraint(new mxPoint(.13,.77),!1),new mxConnectionConstraint(new mxPoint(.8,.8),!1),new mxConnectionConstraint(new mxPoint(.55,.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88, +.25),!1)];m.prototype.constraints=mxRectangleShape.prototype.constraints;n.prototype.constraints=mxRectangleShape.prototype.constraints;l.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25), +!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;ba.prototype.getConstraints=function(a,b,c){a=[];var d=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),e=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1, +0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.5*e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*b+.25*d,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+d),e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+d),.5*(c+e)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+d),c));a.push(new mxConnectionConstraint(new mxPoint(.5,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,.5*(b-d),.5*(c+e)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-d),e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*b-.25*d,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*e));return a};Y.prototype.getConstraints=function(a,b,c){a=[];var d=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style, +"dx",this.dx)))),e=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.5*e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+d),e));a.push(new mxConnectionConstraint(new mxPoint(0, +0),!1,null,d,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*(c+e)));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));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));return a};ja.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)];S.prototype.getConstraints=function(a,b,c){a=[];var d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),e=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style, +"arrowSize",this.arrowSize)))),d=(c-d)/2;a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-e),d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-e,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-e,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-e),c-d));a.push(new mxConnectionConstraint(new mxPoint(0, +0),!1,null,0,c-d));return a};ka.prototype.getConstraints=function(a,b,c){a=[];var d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",S.prototype.arrowWidth)))),e=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",S.prototype.arrowSize)))),d=(c-d)/2;a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*b,d));a.push(new mxConnectionConstraint(new mxPoint(0, +0),!1,null,b-e,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-e,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*b,c-d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,c));return a};pa.prototype.getConstraints=function(a,b,c){a=[];var d=Math.min(c,b),e=Math.max(0,Math.min(d,d*parseFloat(mxUtils.getValue(this.style,"size",this.size)))),d=(c-e)/2,f=d+e,g=(b-e)/2,e=g+e;a.push(new mxConnectionConstraint(new mxPoint(0, +0),!1,null,g,.5*d));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,e,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,c-.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,c));a.push(new mxConnectionConstraint(new mxPoint(.5, +1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,c-.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+e),d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,d));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,f));a.push(new mxConnectionConstraint(new mxPoint(0, +0),!1,null,.5*(b+e),f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*g,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,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};G.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)];fa.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)];Q.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];H.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,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=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,230,!0,!0)});this.addAction("editDiagram...",function(){var a=new EditDiagramDialog(c);c.showDialog(a.container, +": "+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,260,!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(){mxClipboard.copy(b)},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,g=b.view.scale,f=e.x,h=e.y,e=null;if(1==c.length&&a){var r=b.getCellGeometry(c[0]);null!=r&&(e=r.getTerminalPoint(!0))}e=null!=e?e:b.getBoundingBoxFromGeometry(c,a);if(null!=e){var w=Math.round(b.snap(b.popupMenuHandler.triggerX/g-f)),v=Math.round(b.snap(b.popupMenuHandler.triggerY/g-h));b.cellsMoved(c,w-e.x,v-e.y)}}}finally{b.getModel().endUpdate()}}});this.addAction("copySize", +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 v=b.getCellGeometry(c[0]);null!=v&&(e=v.getTerminalPoint(!0))}e=null!=e?e:b.getBoundingBoxFromGeometry(c,a);if(null!=e){var w=Math.round(b.snap(b.popupMenuHandler.triggerX/f-g)),t=Math.round(b.snap(b.popupMenuHandler.triggerY/f-h));b.cellsMoved(c,w-e.x,t-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+Shit+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+Shit+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(){b.setSelectionCells(b.duplicateCells())},null,null,Editor.ctrlKey+"+D");this.put("turn",new Action(mxResources.get("turn")+" / "+mxResources.get("reverse"),function(){b.turnShapes(b.getSelectionCells())}, null,null,Editor.ctrlKey+"+R"));this.addAction("selectVertices",function(){b.selectVertices()},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(); @@ -3118,9 +3129,9 @@ function(){1==b.getSelectionCount()?b.setCellStyles("container","1"):b.setSelect 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=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 g=b.getFreeInsertPoint(),d=new mxCell(e,new mxGeometry(g.x,g.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= -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 t=a.cellEditor.saveSelection();c.showLinkDialog(e,mxResources.get("apply"), -mxUtils.bind(this,function(b){a.cellEditor.restoreSelection(t);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&& +(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= +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){var d="1";b.stopEditing();b.getModel().beginUpdate();try{if("1"==a.style.html){var d=null,e=b.convertValueToString(a.cell);"0"!=mxUtils.getValue(a.style,"nl2Br","1")&&(e=e.replace(/\n/g, "").replace(/<br\s*.?>/g,"\n"));var f=document.createElement("div");f.innerHTML=e;e=mxUtils.extractTextWithWhitespace(f.childNodes);b.cellLabelChanged(a.cell,e)}else e=mxUtils.htmlEntities(b.convertValueToString(a.cell),!1),"0"!=mxUtils.getValue(a.style,"nl2Br","1")&&(e=e.replace(/\n/g,"<br/>")),b.cellLabelChanged(a.cell,b.sanitizeHtml(e));b.setCellStyles("html",d);c.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=d?d:"0"],"cells",b.getSelectionCells()))}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)}, @@ -3145,7 +3156,7 @@ null),c.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DAS "0":"1";b.setCellStyles(mxConstants.STYLE_ROUNDED,f);b.setCellStyles(mxConstants.STYLE_CURVED,null);c.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[f,"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,f=b.view.scale,h=e.x,e=e.y,a=b.getModel().getParent(a),n=b.getCellGeometry(a);b.getModel().isVertex(a)&&null!=n;)h+=n.x,e+=n.y,a=b.getModel().getParent(a),n=b.getCellGeometry(a);h=Math.round(b.snap(b.popupMenuHandler.triggerX/f-h)); +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,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+"+.");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(), @@ -3167,9 +3178,9 @@ null,mxUtils.bind(this,function(){this.customFontSizes=[]}),b);c.addSeparator(b) b);c.addItem(mxResources.get("middle"),null,function(){a.alignCells(mxConstants.ALIGN_MIDDLE)},b);c.addItem(mxResources.get("bottomAlign"),null,function(){a.alignCells(mxConstants.ALIGN_BOTTOM)},b)})));this.put("distribute",new Menu(mxUtils.bind(this,function(c,b){c.addItem(mxResources.get("horizontal"),null,function(){a.distributeCells(!0)},b);c.addItem(mxResources.get("vertical"),null,function(){a.distributeCells(!1)},b)})));this.put("layout",new Menu(mxUtils.bind(this,function(c,b){var d=mxUtils.bind(this, function(a,b){var c=new FilenameDialog(this.editorUi,a,mxResources.get("apply"),function(a){b(parseFloat(a))},mxResources.get("spacing"));this.editorUi.showDialog(c.container,300,80,!0,!0);c.init()});c.addItem(mxResources.get("horizontalFlow"),null,mxUtils.bind(this,function(){var b=new mxHierarchicalLayout(a,mxConstants.DIRECTION_WEST);this.editorUi.executeLayout(function(){var c=a.getSelectionCells();b.execute(a.getDefaultParent(),0==c.length?null:c)},!0)}),b);c.addItem(mxResources.get("verticalFlow"), null,mxUtils.bind(this,function(){var b=new mxHierarchicalLayout(a,mxConstants.DIRECTION_NORTH);this.editorUi.executeLayout(function(){var c=a.getSelectionCells();b.execute(a.getDefaultParent(),0==c.length?null:c)},!0)}),b);c.addSeparator(b);c.addItem(mxResources.get("horizontalTree"),null,mxUtils.bind(this,function(){var b=a.getSelectionCell(),c=null;null==b||0==a.getModel().getChildCount(b)?0==a.getModel().getEdgeCount(b)&&(c=a.findTreeRoots(a.getDefaultParent())):c=a.findTreeRoots(b);null!=c&& -0<c.length&&(b=c[0]);if(null!=b){var g=new mxCompactTreeLayout(a,!0);g.edgeRouting=!1;g.levelDistance=30;d(g.levelDistance,mxUtils.bind(this,function(c){g.levelDistance=c;this.editorUi.executeLayout(function(){g.execute(a.getDefaultParent(),b)},!0)}))}}),b);c.addItem(mxResources.get("verticalTree"),null,mxUtils.bind(this,function(){var b=a.getSelectionCell(),c=null;null==b||0==a.getModel().getChildCount(b)?0==a.getModel().getEdgeCount(b)&&(c=a.findTreeRoots(a.getDefaultParent())):c=a.findTreeRoots(b); -null!=c&&0<c.length&&(b=c[0]);if(null!=b){var g=new mxCompactTreeLayout(a,!1);g.edgeRouting=!1;g.levelDistance=30;d(g.levelDistance,mxUtils.bind(this,function(c){g.levelDistance=c;this.editorUi.executeLayout(function(){g.execute(a.getDefaultParent(),b)},!0)}))}}),b);c.addItem(mxResources.get("radialTree"),null,mxUtils.bind(this,function(){var b=a.getSelectionCell(),c=null;null==b||0==a.getModel().getChildCount(b)?0==a.getModel().getEdgeCount(b)&&(c=a.findTreeRoots(a.getDefaultParent())):c=a.findTreeRoots(b); -null!=c&&0<c.length&&(b=c[0]);if(null!=b){var g=new mxRadialTreeLayout(a,!1);g.levelDistance=80;g.autoRadius=!0;d(g.levelDistance,mxUtils.bind(this,function(c){g.levelDistance=c;this.editorUi.executeLayout(function(){g.execute(a.getDefaultParent(),b);a.isSelectionEmpty()||(b=a.getModel().getParent(b),a.getModel().isVertex(b)&&a.updateGroupBounds([b],2*a.gridSize,!0))},!0)}))}}),b);c.addSeparator(b);c.addItem(mxResources.get("organic"),null,mxUtils.bind(this,function(){var b=new mxFastOrganicLayout(a); +0<c.length&&(b=c[0]);if(null!=b){var f=new mxCompactTreeLayout(a,!0);f.edgeRouting=!1;f.levelDistance=30;d(f.levelDistance,mxUtils.bind(this,function(c){f.levelDistance=c;this.editorUi.executeLayout(function(){f.execute(a.getDefaultParent(),b)},!0)}))}}),b);c.addItem(mxResources.get("verticalTree"),null,mxUtils.bind(this,function(){var b=a.getSelectionCell(),c=null;null==b||0==a.getModel().getChildCount(b)?0==a.getModel().getEdgeCount(b)&&(c=a.findTreeRoots(a.getDefaultParent())):c=a.findTreeRoots(b); +null!=c&&0<c.length&&(b=c[0]);if(null!=b){var f=new mxCompactTreeLayout(a,!1);f.edgeRouting=!1;f.levelDistance=30;d(f.levelDistance,mxUtils.bind(this,function(c){f.levelDistance=c;this.editorUi.executeLayout(function(){f.execute(a.getDefaultParent(),b)},!0)}))}}),b);c.addItem(mxResources.get("radialTree"),null,mxUtils.bind(this,function(){var b=a.getSelectionCell(),c=null;null==b||0==a.getModel().getChildCount(b)?0==a.getModel().getEdgeCount(b)&&(c=a.findTreeRoots(a.getDefaultParent())):c=a.findTreeRoots(b); +null!=c&&0<c.length&&(b=c[0]);if(null!=b){var f=new mxRadialTreeLayout(a,!1);f.levelDistance=80;f.autoRadius=!0;d(f.levelDistance,mxUtils.bind(this,function(c){f.levelDistance=c;this.editorUi.executeLayout(function(){f.execute(a.getDefaultParent(),b);a.isSelectionEmpty()||(b=a.getModel().getParent(b),a.getModel().isVertex(b)&&a.updateGroupBounds([b],2*a.gridSize,!0))},!0)}))}}),b);c.addSeparator(b);c.addItem(mxResources.get("organic"),null,mxUtils.bind(this,function(){var b=new mxFastOrganicLayout(a); d(b.forceConstant,mxUtils.bind(this,function(c){b.forceConstant=c;this.editorUi.executeLayout(function(){var c=a.getSelectionCell();if(null==c||0==a.getModel().getChildCount(c))c=a.getDefaultParent();b.execute(c);a.getModel().isVertex(c)&&a.updateGroupBounds([c],2*a.gridSize,!0)},!0)}))}),b);c.addItem(mxResources.get("circle"),null,mxUtils.bind(this,function(){var b=new mxCircleLayout(a);this.editorUi.executeLayout(function(){var c=a.getSelectionCell();if(null==c||0==a.getModel().getChildCount(c))c= a.getDefaultParent();b.execute(c);a.getModel().isVertex(c)&&a.updateGroupBounds([c],2*a.gridSize,!0)},!0)}),b)})));this.put("navigation",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,"home - exitGroup enterGroup - expand collapse - collapsible".split(" "),b)})));this.put("arrange",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,["toFront","toBack","-"],b);this.addSubmenu("direction",a,b);this.addMenuItems(a,["turn","-"],b);this.addSubmenu("align",a,b);this.addSubmenu("distribute", 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(" "), @@ -3179,10 +3190,10 @@ b)})));this.put("file",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItem 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){function c(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("")}var d=this.editorUi.editor.graph;a=a.addItem("",null,mxUtils.bind(this,function(a){var b=d.getParentByName(mxEvent.getSource(a),"TD");if(null!=b&&null!=d.cellEditor.textarea){var e=d.getParentByName(b,"TR"),f=d.cellEditor.textarea.getElementsByTagName("table");a=[];for(var h=0;h<f.length;h++)a.push(f[h]); d.container.focus();d.pasteHtmlAtCaret(c(e.sectionRowIndex+1,b.cellIndex+1));b=d.cellEditor.textarea.getElementsByTagName("table");if(b.length==a.length+1)for(h=b.length-1;0<=h;h--)if(0==h||b[h]!=a[h-1]){d.selectNode(b[h].rows[0].cells[0]);break}}}));var b='<img src="'+mxClient.imageBasePath+'/transparent.gif" width="16" height="16"/>';a.firstChild.innerHTML="";var f=function(a,c){var d=document.createElement("table");d.setAttribute("border","1");d.style.borderCollapse="collapse";mxClient.IS_QUIRKS|| -d.setAttribute("cellPadding","8");for(var e=0;e<a;e++)for(var g=d.insertRow(e),f=0;f<c;f++){var h=g.insertCell(-1);mxClient.IS_QUIRKS&&(h.innerHTML=b)}return d}(5,5);a.firstChild.appendChild(f);var e=document.createElement("div");e.style.padding="4px";e.style.fontSize=Menus.prototype.defaultFontSize+"px";e.innerHTML="1x1";a.firstChild.appendChild(e);mxEvent.addListener(f,"mouseover",function(a){var c=d.getParentByName(mxEvent.getSource(a),"TD");if(null!=c){for(var h=d.getParentByName(c,"TR"),l=Math.min(20, -h.sectionRowIndex+2),m=Math.min(20,c.cellIndex+2),p=f.rows.length;p<l;p++)for(var n=f.insertRow(p),t=0;t<f.rows[0].cells.length;t++){var r=n.insertCell(-1);mxClient.IS_QUIRKS&&(r.innerHTML=b)}for(p=0;p<f.rows.length;p++)for(n=f.rows[p],t=n.cells.length;t<m;t++)r=n.insertCell(-1),mxClient.IS_QUIRKS&&(r.innerHTML=b);e.innerHTML=c.cellIndex+1+"x"+(h.sectionRowIndex+1);for(l=0;l<f.rows.length;l++)for(m=f.rows[l],p=0;p<m.cells.length;p++)m.cells[p].style.backgroundColor=l<=h.sectionRowIndex&&p<=c.cellIndex? +d.setAttribute("cellPadding","8");for(var e=0;e<a;e++)for(var f=d.insertRow(e),g=0;g<c;g++){var h=f.insertCell(-1);mxClient.IS_QUIRKS&&(h.innerHTML=b)}return d}(5,5);a.firstChild.appendChild(f);var e=document.createElement("div");e.style.padding="4px";e.style.fontSize=Menus.prototype.defaultFontSize+"px";e.innerHTML="1x1";a.firstChild.appendChild(e);mxEvent.addListener(f,"mouseover",function(a){var c=d.getParentByName(mxEvent.getSource(a),"TD");if(null!=c){for(var h=d.getParentByName(c,"TR"),l=Math.min(20, +h.sectionRowIndex+2),m=Math.min(20,c.cellIndex+2),n=f.rows.length;n<l;n++)for(var p=f.insertRow(n),q=0;q<f.rows[0].cells.length;q++){var v=p.insertCell(-1);mxClient.IS_QUIRKS&&(v.innerHTML=b)}for(n=0;n<f.rows.length;n++)for(p=f.rows[n],q=p.cells.length;q<m;q++)v=p.insertCell(-1),mxClient.IS_QUIRKS&&(v.innerHTML=b);e.innerHTML=c.cellIndex+1+"x"+(h.sectionRowIndex+1);for(l=0;l<f.rows.length;l++)for(m=f.rows[l],n=0;n<m.cells.length;n++)m.cells[n].style.backgroundColor=l<=h.sectionRowIndex&&n<=c.cellIndex? "blue":"white";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 p=c[f];if(a.getModel().isEdge(p)){if(h){var n=a.getCellGeometry(p);null!=n&&(n=n.clone(),n.points=null,a.getModel().setGeometry(p,n))}for(var t=0;t<d.length;t++)a.setCellStyles(d[t],b[t],[p]);e.push(p)}}this.editorUi.fireEvent(new mxEventObject("styleChanged","keys", +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=0;f<a.length;f++)b.setCellStyles(a[f],c[f]),a[f]==mxConstants.STYLE_ALIGN&&b.updateLabelElements(b.getSelectionCells(),function(a){a.removeAttribute("align");a.style.textAlign=null});null!=d&&d();this.editorUi.fireEvent(new mxEventObject("styleChanged","keys",a,"values",c,"cells",b.getSelectionCells()))}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?" "+ @@ -3247,59 +3258,62 @@ Toolbar.prototype.createLabel=function(a,c){var d=document.createElement("a");d. 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 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"),t=0;t<b;t++)(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+t]);k.appendChild(p)}d&&(a=document.createElement("td"),a.setAttribute("title",mxResources.get("reset")), +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 p=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=b&&b()});p.className="geBtn";a.editor.cancelFirst&&m.appendChild(p);var n=null!=d?d:this.createApplyFunction();d=mxUtils.button(mxResources.get("apply"),function(){var b=h.value;/(^#?[a-zA-Z0-9]*$)/.test(b)? -(ColorDialog.addRecentColor(b,12),"none"!=b&&"#"!=b.charAt(0)&&(b="#"+b),n(b),a.hideDialog()):a.handleError({message:mxResources.get("invalidInput")})});d.className="geBtn gePrimaryBtn";m.appendChild(d);a.editor.cancelFirst||m.appendChild(p);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}; +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)? +(ColorDialog.addRecentColor(b,12),"none"!=b&&"#"!=b.charAt(0)&&(b="#"+b),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},FilenameDialog=function(a,c,d,b,f,e,h,g,k,l,m,p){k=null!=k?k:!0;var n,t,r=document.createElement("table"),w=document.createElement("tbody");r.style.marginTop="8px";n=document.createElement("tr");t=document.createElement("td"); -t.style.whiteSpace="nowrap";t.style.fontSize="10pt";t.style.width="120px";mxUtils.write(t,(f||mxResources.get("filename"))+":");n.appendChild(t);var v=document.createElement("input");v.setAttribute("value",c||"");v.style.marginLeft="4px";v.style.width=null!=p?p+"px":"180px";var u=mxUtils.button(d,function(){if(null==e||e(v.value))k&&a.hideDialog(),b(v.value)});u.className="geBtn gePrimaryBtn";this.init=function(){if(null!=f||null==h)if(v.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode|| -mxClient.IS_QUIRKS?v.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var a=r.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=v,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")&&(v.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),u.click());a.stopPropagation();a.preventDefault()}))}}};t=document.createElement("td");t.appendChild(v);n.appendChild(t);if(null!=f||null==h)w.appendChild(n),null!=m&&t.appendChild(FilenameDialog.createTypeHint(a,v,m));null!=h&&(n=document.createElement("tr"),t=document.createElement("td"),t.colSpan=2,t.appendChild(h), -n.appendChild(t),w.appendChild(n));n=document.createElement("tr");t=document.createElement("td");t.colSpan=2;t.style.paddingTop="20px";t.style.whiteSpace="nowrap";t.setAttribute("align","right");c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=l&&l()});c.className="geBtn";a.editor.cancelFirst&&t.appendChild(c);null!=g&&(d=mxUtils.button(mxResources.get("help"),function(){a.editor.graph.openLink(g)}),d.className="geBtn",t.appendChild(d));mxEvent.addListener(v,"keypress",function(a){13== -a.keyCode&&u.click()});t.appendChild(u);a.editor.cancelFirst||t.appendChild(c);n.appendChild(t);w.appendChild(n);r.appendChild(w);this.container=r};FilenameDialog.filenameHelpLink=null; +"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},FilenameDialog=function(a,c,d,b,f,e,h,g,k,l,m,n){k=null!=k?k:!0;var p,q,v=document.createElement("table"),w=document.createElement("tbody");v.style.marginTop="8px";p=document.createElement("tr");q=document.createElement("td"); +q.style.whiteSpace="nowrap";q.style.fontSize="10pt";q.style.width="120px";mxUtils.write(q,(f||mxResources.get("filename"))+":");p.appendChild(q);var t=document.createElement("input");t.setAttribute("value",c||"");t.style.marginLeft="4px";t.style.width=null!=n?n+"px":"180px";var u=mxUtils.button(d,function(){if(null==e||e(t.value))k&&a.hideDialog(),b(t.value)});u.className="geBtn gePrimaryBtn";this.init=function(){if(null!=f||null==h)if(t.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode|| +mxClient.IS_QUIRKS?t.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var a=v.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=t,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")&&(t.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),u.click());a.stopPropagation();a.preventDefault()}))}}};q=document.createElement("td");q.style.whiteSpace="nowrap";q.appendChild(t);p.appendChild(q);if(null!=f||null==h)w.appendChild(p),null!=m&&q.appendChild(FilenameDialog.createTypeHint(a,t,m));null!=h&&(p=document.createElement("tr"),q=document.createElement("td"), +q.colSpan=2,q.appendChild(h),p.appendChild(q),w.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");c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=l&&l()});c.className="geBtn";a.editor.cancelFirst&&q.appendChild(c);null!=g&&(d=mxUtils.button(mxResources.get("help"),function(){a.editor.graph.openLink(g)}),d.className="geBtn",q.appendChild(d));mxEvent.addListener(t, +"keypress",function(a){13==a.keyCode&&u.click()});q.appendChild(u);a.editor.cancelFirst||q.appendChild(c);p.appendChild(q);w.appendChild(p);v.appendChild(w);this.container=v};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 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.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}; -var TextareaDialog=function(a,c,d,b,f,e,h,g,k,l,m,p,n){h=null!=h?h:300;g=null!=g?g:120;l=null!=l?l:!1;var t,r,w=document.createElement("table"),v=document.createElement("tbody");t=document.createElement("tr");r=document.createElement("td");r.style.fontSize="10pt";r.style.width="100px";mxUtils.write(r,c);t.appendChild(r);v.appendChild(t);t=document.createElement("tr");r=document.createElement("td");var u=document.createElement("textarea");m&&u.setAttribute("wrap","off");u.setAttribute("spellcheck", -"false");u.setAttribute("autocorrect","off");u.setAttribute("autocomplete","off");u.setAttribute("autocapitalize","off");mxUtils.write(u,d||"");u.style.resize="none";u.style.width=h+"px";u.style.height=g+"px";this.textarea=u;this.init=function(){u.focus();u.scrollTop=0};r.appendChild(u);t.appendChild(r);v.appendChild(t);t=document.createElement("tr");r=document.createElement("td");r.style.paddingTop="14px";r.style.whiteSpace="nowrap";r.setAttribute("align","right");null!=n&&(c=mxUtils.button(mxResources.get("help"), -function(){a.editor.graph.openLink(n)}),c.className="geBtn",r.appendChild(c));e=mxUtils.button(e||mxResources.get("cancel"),function(){a.hideDialog();null!=f&&f()});e.className="geBtn";a.editor.cancelFirst&&r.appendChild(e);null!=k&&k(r,u);null!=b&&(k=mxUtils.button(p||mxResources.get("apply"),function(){l||a.hideDialog();b(u.value)}),k.className="geBtn gePrimaryBtn",r.appendChild(k));a.editor.cancelFirst||r.appendChild(e);t.appendChild(r);v.appendChild(t);w.appendChild(v);this.container=w},EditDiagramDialog= +var TextareaDialog=function(a,c,d,b,f,e,h,g,k,l,m,n,p){h=null!=h?h:300;g=null!=g?g:120;l=null!=l?l:!1;var q,v,w=document.createElement("table"),t=document.createElement("tbody");q=document.createElement("tr");v=document.createElement("td");v.style.fontSize="10pt";v.style.width="100px";mxUtils.write(v,c);q.appendChild(v);t.appendChild(q);q=document.createElement("tr");v=document.createElement("td");var u=document.createElement("textarea");m&&u.setAttribute("wrap","off");u.setAttribute("spellcheck", +"false");u.setAttribute("autocorrect","off");u.setAttribute("autocomplete","off");u.setAttribute("autocapitalize","off");mxUtils.write(u,d||"");u.style.resize="none";u.style.width=h+"px";u.style.height=g+"px";this.textarea=u;this.init=function(){u.focus();u.scrollTop=0};v.appendChild(u);q.appendChild(v);t.appendChild(q);q=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));e=mxUtils.button(e||mxResources.get("cancel"),function(){a.hideDialog();null!=f&&f()});e.className="geBtn";a.editor.cancelFirst&&v.appendChild(e);null!=k&&k(v,u);null!=b&&(k=mxUtils.button(n||mxResources.get("apply"),function(){l||a.hideDialog();b(u.value)}),k.className="geBtn gePrimaryBtn",v.appendChild(k));a.editor.cancelFirst||v.appendChild(e);q.appendChild(v);t.appendChild(q);w.appendChild(t);this.container=w},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 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(p){c=p}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(p){c=p}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)+p.value:a+"."+p.value;"xml"===p.value?(n.setAttribute("disabled","true"),t.setAttribute("disabled","true"),r.setAttribute("disabled","true"),v.setAttribute("disabled","true")):(n.removeAttribute("disabled"),t.removeAttribute("disabled"),r.removeAttribute("disabled"),v.removeAttribute("disabled"));"png"===p.value||"svg"===p.value?w.removeAttribute("disabled"):w.setAttribute("disabled","disabled")} -function d(){t.style.backgroundColor=t.value*r.value>MAX_AREA||0>=t.value?"red":"";r.style.backgroundColor=t.value*r.value>MAX_AREA||0>=r.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 p=document.createElement("select");p.style.width="180px";k=document.createElement("option");k.setAttribute("value", -"png");mxUtils.write(k,mxResources.get("formatPng"));p.appendChild(k);k=document.createElement("option");ExportDialog.showGifOption&&(k.setAttribute("value","gif"),mxUtils.write(k,mxResources.get("formatGif")),p.appendChild(k));k=document.createElement("option");k.setAttribute("value","jpg");mxUtils.write(k,mxResources.get("formatJpg"));p.appendChild(k);k=document.createElement("option");k.setAttribute("value","pdf");mxUtils.write(k,mxResources.get("formatPdf"));p.appendChild(k);k=document.createElement("option"); -k.setAttribute("value","svg");mxUtils.write(k,mxResources.get("formatSvg"));p.appendChild(k);ExportDialog.showXmlOption&&(k=document.createElement("option"),k.setAttribute("value","xml"),mxUtils.write(k,mxResources.get("formatXml")),p.appendChild(k));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("zoom")+" (%):");f.appendChild(k);var n=document.createElement("input"); -n.setAttribute("type","number");n.setAttribute("value","100");n.style.width="180px";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("width")+":");f.appendChild(k);var t=document.createElement("input");t.setAttribute("value",h);t.style.width="180px";k=document.createElement("td");k.appendChild(t);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 r=document.createElement("input");r.setAttribute("value",g);r.style.width="180px";k=document.createElement("td");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 w=document.createElement("input");w.setAttribute("type", -"checkbox");w.checked=null==b.background||b.background==mxConstants.NONE;k=document.createElement("td");k.appendChild(w);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 v=document.createElement("input");v.setAttribute("type","number");v.setAttribute("value",ExportDialog.lastBorderValue);v.style.width="180px"; -k=document.createElement("td");k.appendChild(v);f.appendChild(k);l.appendChild(f);e.appendChild(l);mxEvent.addListener(p,"change",c);c();mxEvent.addListener(n,"change",function(){var a=Math.max(0,parseFloat(n.value)||100)/100;n.value=parseFloat((100*a).toFixed(2));0<h?(t.value=Math.floor(h*a),r.value=Math.floor(g*a)):(n.value="100",t.value=h,r.value=g);d()});mxEvent.addListener(t,"change",function(){var a=parseInt(t.value)/h;0<a?(n.value=parseFloat((100*a).toFixed(2)),r.value=Math.floor(g*a)):(n.value= -"100",t.value=h,r.value=g);d()});mxEvent.addListener(r,"change",function(){var a=parseInt(r.value)/g;0<a?(n.value=parseFloat((100*a).toFixed(2)),t.value=Math.floor(h*a)):(n.value="100",t.value=h,r.value=g);d()});f=document.createElement("tr");k=document.createElement("td");k.setAttribute("align","right");k.style.paddingTop="22px";k.colSpan=2;var u=mxUtils.button(mxResources.get("export"),mxUtils.bind(this,function(){if(0>=parseInt(n.value))mxUtils.alert(mxResources.get("drawingEmpty"));else{var c= -m.value,d=p.value,e=Math.max(0,parseFloat(n.value)||100)/100,g=Math.max(0,parseInt(v.value)),f=b.background;if(("svg"==d||"png"==d)&&w.checked)f=null;else if(null==f||f==mxConstants.NONE)f="#ffffff";ExportDialog.lastBorderValue=g;ExportDialog.exportFile(a,c,d,f,e,g)}}));u.className="geBtn gePrimaryBtn";var q=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});q.className="geBtn";a.editor.cancelFirst?(k.appendChild(q),k.appendChild(u)):(k.appendChild(u),k.appendChild(q));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){var h=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(h.getSvg(b,f,e)),c,d);else{var g=h.getGraphBounds(),k=mxUtils.createXmlDocument(),l=k.createElement("output");k.appendChild(l);k=new mxXmlCanvas2D(l);k.translate(Math.floor((e/f-g.x)/h.view.scale),Math.floor((e/f-g.y)/h.view.scale));k.scale(f/h.view.scale);(new mxImageExport).drawState(h.getView().getState(h.model.root), -k);l="xml="+encodeURIComponent(mxUtils.getXml(l));k=Math.ceil(g.width*f/h.view.scale+2*e);f=Math.ceil(g.height*f/h.view.scale+2*e);l.length<=MAX_REQUEST_SIZE&&k*f<MAX_AREA?(a.hideDialog(),(new mxXmlRequest(EXPORT_URL,"format="+d+"&filename="+encodeURIComponent(c)+"&bg="+(null!=b?b:"none")+"&w="+k+"&h="+f+"&"+l)).simulate(document,"_blank")):mxUtils.alert(mxResources.get("drawingTooLarge"))}}; +"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"),v.setAttribute("disabled","true"),x.setAttribute("disabled","true")):(p.removeAttribute("disabled"),q.removeAttribute("disabled"),v.removeAttribute("disabled"),x.removeAttribute("disabled"));"png"===n.value||"svg"===n.value?r.removeAttribute("disabled"):r.setAttribute("disabled","disabled"); +"png"===n.value?(w.removeAttribute("disabled"),t.removeAttribute("disabled")):(w.setAttribute("disabled","disabled"),t.setAttribute("disabled","disabled"))}function d(){q.style.backgroundColor=q.value*v.value>MAX_AREA||0>=q.value?"red":"";v.style.backgroundColor=q.value*v.value>MAX_AREA||0>=v.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 v=document.createElement("input");v.setAttribute("value",g);v.style.width="180px";k=document.createElement("td");k.appendChild(v);f.appendChild(k);l.appendChild(f);f=document.createElement("tr");k=document.createElement("td");k.style.fontSize= +"10pt";mxUtils.write(k,mxResources.get("dpi",null,"DPI")+":");f.appendChild(k);var w=document.createElement("select");w.style.width="180px";k=document.createElement("option");k.setAttribute("value","100");mxUtils.write(k,"100dpi");w.appendChild(k);k=document.createElement("option");k.setAttribute("value","200");mxUtils.write(k,"200dpi");w.appendChild(k);k=document.createElement("option");k.setAttribute("value","300");mxUtils.write(k,"300dpi");w.appendChild(k);k=document.createElement("option");k.setAttribute("value", +"400");mxUtils.write(k,"400dpi");w.appendChild(k);k=document.createElement("option");k.setAttribute("value","custom");mxUtils.write(k,mxResources.get("custom"));w.appendChild(k);var t=document.createElement("input");t.style.width="180px";t.style.display="none";t.setAttribute("value","100");t.setAttribute("type","number");t.setAttribute("min","50");t.setAttribute("step","50");var u=!1;mxEvent.addListener(w,"change",function(){"custom"==this.value?(this.style.display="none",t.style.display="",t.focus()): +(t.value=this.value,u||(p.value=this.value))});mxEvent.addListener(t,"change",function(){var a=parseInt(t.value);isNaN(a)||0>=a?t.style.backgroundColor="red":(t.style.backgroundColor="",u||(p.value=a))});k=document.createElement("td");k.appendChild(w);k.appendChild(t);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 r=document.createElement("input");r.setAttribute("type", +"checkbox");r.checked=null==b.background||b.background==mxConstants.NONE;k=document.createElement("td");k.appendChild(r);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 x=document.createElement("input");x.setAttribute("type","number");x.setAttribute("value",ExportDialog.lastBorderValue);x.style.width="180px"; +k=document.createElement("td");k.appendChild(x);f.appendChild(k);l.appendChild(f);e.appendChild(l);mxEvent.addListener(n,"change",c);c();mxEvent.addListener(p,"change",function(){u=!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),v.value=Math.floor(g*a)):(p.value="100",q.value=h,v.value=g);d()});mxEvent.addListener(q,"change",function(){var a=parseInt(q.value)/h;0<a?(p.value=parseFloat((100*a).toFixed(2)),v.value=Math.floor(g*a)): +(p.value="100",q.value=h,v.value=g);d()});mxEvent.addListener(v,"change",function(){var a=parseInt(v.value)/g;0<a?(p.value=parseFloat((100*a).toFixed(2)),q.value=Math.floor(h*a)):(p.value="100",q.value=h,v.value=g);d()});f=document.createElement("tr");k=document.createElement("td");k.setAttribute("align","right");k.style.paddingTop="22px";k.colSpan=2;var y=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(x.value)),g=b.background,h=Math.max(1,parseInt(t.value));if(("svg"==d||"png"==d)&&r.checked)g=null;else if(null==g||g==mxConstants.NONE)g="#ffffff";ExportDialog.lastBorderValue=f;ExportDialog.exportFile(a,c,d,g,e,f,h)}}));y.className="geBtn gePrimaryBtn";var D=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});D.className="geBtn";a.editor.cancelFirst?(k.appendChild(D),k.appendChild(y)):(k.appendChild(y), +k.appendChild(D));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<u.value.length?q.removeAttribute("disabled"):q.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=[],p=0,n=null!=EditDataDialog.getDisplayIdForCell?EditDataDialog.getDisplayIdForCell(a, -c):null,t=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;g.table.deleteRow(b+(null!=n?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[p]+":",c,2);m[a].style.width="100%";t(m[a],b)},r=[],w=f.getModel().getParent(c)==f.getModel().getRoot(),v=0;v<k.length;v++)!w&& -"label"==k[v].nodeName||"placeholders"==k[v].nodeName||r.push({name:k[v].nodeName,value:k[v].nodeValue});r.sort(function(a,b){return a.name<b.name?-1:a.name>b.name?1:0});null!=n&&(k=document.createElement("div"),k.style.width="100%",k.style.fontSize="11px",k.style.textAlign="center",mxUtils.write(k,n),g.addField(mxResources.get("id")+":",k));for(v=0;v<r.length;v++)h(p,r[v].name,r[v].value),p++;h=document.createElement("div");h.style.cssText="position:absolute;left:30px;right:30px;overflow-y:auto;top:30px;bottom:80px;"; -h.appendChild(g.table);r=document.createElement("div");r.style.boxSizing="border-box";r.style.paddingRight="160px";r.style.whiteSpace="nowrap";r.style.marginTop="6px";r.style.width="100%";var u=document.createElement("input");u.setAttribute("placeholder",mxResources.get("enterPropertyName"));u.setAttribute("type","text");u.setAttribute("size",mxClient.IS_IE||mxClient.IS_IE11?"36":"40");u.style.boxSizing="border-box";u.style.marginLeft="2px";u.style.width="100%";r.appendChild(u);h.appendChild(r);b.appendChild(h); -var q=mxUtils.button(mxResources.get("addProperty"),function(){var a=u.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);t(c,a);c.focus()}q.setAttribute("disabled","disabled");u.value=""}catch(D){mxUtils.alert(D)}else mxUtils.alert(mxResources.get("invalidName"))});this.init= -function(){0<m.length?m[0].focus():u.focus()};q.setAttribute("title",mxResources.get("addProperty"));q.setAttribute("disabled","disabled");q.style.textOverflow="ellipsis";q.style.position="absolute";q.style.overflow="hidden";q.style.width="144px";q.style.right="0px";q.className="geBtn";r.appendChild(q);h=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog.apply(a,arguments)});h.className="geBtn";r=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");f.getModel().setValue(c,e)}catch(A){mxUtils.alert(A)}});r.className="geBtn gePrimaryBtn";mxEvent.addListener(u,"keyup",d);mxEvent.addListener(u,"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)){w=document.createElement("span");w.style.marginRight="10px";v=document.createElement("input");v.setAttribute("type","checkbox");v.style.marginRight="6px";"1"==e.getAttribute("placeholders")&&(v.setAttribute("checked","checked"),v.defaultChecked=!0);mxEvent.addListener(v,"click",function(){"1"==e.getAttribute("placeholders")?e.removeAttribute("placeholders"):e.setAttribute("placeholders","1")});w.appendChild(v);mxUtils.write(w,mxResources.get("placeholders"));if(null!= -EditDataDialog.placeholderHelpLink){v=document.createElement("a");v.setAttribute("href",EditDataDialog.placeholderHelpLink);v.setAttribute("title",mxResources.get("help"));v.setAttribute("target","_blank");v.style.marginLeft="8px";v.style.cursor="help";var z=document.createElement("img");mxUtils.setOpacity(z,50);z.style.height="16px";z.style.width="16px";z.setAttribute("border","0");z.setAttribute("valign","middle");z.style.marginTop=mxClient.IS_IE11?"0px":"-4px";z.setAttribute("src",Editor.helpImage); -v.appendChild(z);w.appendChild(v)}k.appendChild(w)}a.editor.cancelFirst?(k.appendChild(h),k.appendChild(r)):(k.appendChild(r),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 EditDataDialog=function(a,c){function d(){0<u.value.length?r.removeAttribute("disabled"):r.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;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%";q(m[a],b)},v=[],w=f.getModel().getParent(c)==f.getModel().getRoot(),t=0;t<k.length;t++)!w&& +"label"==k[t].nodeName||"placeholders"==k[t].nodeName||v.push({name:k[t].nodeName,value:k[t].nodeValue});v.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(t=0;t<v.length;t++)h(n,v[t].name,v[t].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);v=document.createElement("div");v.style.boxSizing="border-box";v.style.paddingRight="160px";v.style.whiteSpace="nowrap";v.style.marginTop="6px";v.style.width="100%";var u=document.createElement("input");u.setAttribute("placeholder",mxResources.get("enterPropertyName"));u.setAttribute("type","text");u.setAttribute("size",mxClient.IS_IE||mxClient.IS_IE11?"36":"40");u.style.boxSizing="border-box";u.style.marginLeft="2px";u.style.width="100%";v.appendChild(u);h.appendChild(v);b.appendChild(h); +var r=mxUtils.button(mxResources.get("addProperty"),function(){var a=u.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()}r.setAttribute("disabled","disabled");u.value=""}catch(E){mxUtils.alert(E)}else mxUtils.alert(mxResources.get("invalidName"))});this.init= +function(){0<m.length?m[0].focus():u.focus()};r.setAttribute("title",mxResources.get("addProperty"));r.setAttribute("disabled","disabled");r.style.textOverflow="ellipsis";r.style.position="absolute";r.style.overflow="hidden";r.style.width="144px";r.style.right="0px";r.className="geBtn";v.appendChild(r);h=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog.apply(a,arguments)});h.className="geBtn";v=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");f.getModel().setValue(c,e)}catch(z){mxUtils.alert(z)}});v.className="geBtn gePrimaryBtn";mxEvent.addListener(u,"keyup",d);mxEvent.addListener(u,"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)){w=document.createElement("span");w.style.marginRight="10px";t=document.createElement("input");t.setAttribute("type","checkbox");t.style.marginRight="6px";"1"==e.getAttribute("placeholders")&&(t.setAttribute("checked","checked"),t.defaultChecked=!0);mxEvent.addListener(t,"click",function(){"1"==e.getAttribute("placeholders")?e.removeAttribute("placeholders"):e.setAttribute("placeholders","1")});w.appendChild(t);mxUtils.write(w,mxResources.get("placeholders"));if(null!= +EditDataDialog.placeholderHelpLink){t=document.createElement("a");t.setAttribute("href",EditDataDialog.placeholderHelpLink);t.setAttribute("title",mxResources.get("help"));t.setAttribute("target","_blank");t.style.marginLeft="8px";t.style.cursor="help";var x=document.createElement("img");mxUtils.setOpacity(x,50);x.style.height="16px";x.style.width="16px";x.setAttribute("border","0");x.setAttribute("valign","middle");x.style.marginTop=mxClient.IS_IE11?"0px":"-4px";x.setAttribute("src",Editor.helpImage); +t.appendChild(x);w.appendChild(t)}k.appendChild(w)}a.editor.cancelFirst?(k.appendChild(h),k.appendChild(v)):(k.appendChild(v),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 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);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(), @@ -3309,24 +3323,24 @@ g.style.overflow="hidden";this.window=new mxWindow(mxResources.get("outline"),g, 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);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 p=a.actions.get("zoomIn"),n=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?p.funct():n.funct(),mxEvent.consume(a))})}},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"), +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(),mxEvent.consume(a))})}},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";n=a;b.stopPropagation();b.preventDefault()});mxEvent.addListener(f,"dragstart",function(a){p=f;mxClient.IS_FF&&a.dataTransfer.setData("Text","<layer/>")}); -mxEvent.addListener(f,"dragend",function(a){null!=p&&null!=n&&g.addCell(c,g.model.root,n);n=p=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 q=g.view.getState(c),u=null!=q?q.style:g.getCellStyle(c);"1"==mxUtils.getValue(u,"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(u,"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", +"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.view.getState(c),t=null!=r?r.style:g.getCellStyle(c);"1"==mxUtils.getValue(t,"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(t,"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="▼",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<t-1&&(k=document.createElement("a"),k.setAttribute("title",mxResources.get("toFront")),k.className="geButton",k.style.cssFloat="none",k.innerHTML="▲",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":"",r=c):mxEvent.addListener(f,"click",function(a){g.isEnabled()&&(g.setDefaultParent(d),g.view.setCurrentRoot(null),h())});m.appendChild(f)}t=g.model.getChildCount(g.model.root); -m.innerHTML="";for(var b=t-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(r)||mxResources.get("background");v.setAttribute("title",mxResources.get("removeIt",[c]));z.setAttribute("title",mxResources.get("duplicateIt",[c]));q.setAttribute("title",mxResources.get("editData"));g.isSelectionEmpty()&&(u.className="geButton mxDisabled")}var g=a.editor.graph,k=document.createElement("div"); +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="▲",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":"",v=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(v)||mxResources.get("background");t.setAttribute("title",mxResources.get("removeIt",[c]));x.setAttribute("title",mxResources.get("duplicateIt",[c]));r.setAttribute("title",mxResources.get("editData"));g.isSelectionEmpty()&&(u.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 p=null,n=null;mxEvent.addListener(k,"dragover",function(a){a.dataTransfer.dropEffect="move";n=0;a.stopPropagation();a.preventDefault()});mxEvent.addListener(k,"drop",function(a){a.stopPropagation();a.preventDefault()});var t=null,r=null,w=document.createElement("div");w.className="geToolbarContainer";w.style.position="absolute";w.style.bottom="0px";w.style.left="0px";w.style.right="0px";w.style.height=l;w.style.overflow="hidden";w.style.padding=EditorUi.compactUi? -"4px 0px 3px 0px":"1px";w.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;w.style.borderWidth="1px 0px 0px 0px";w.style.borderColor="#c3c3c3";w.style.borderStyle="solid";w.style.display="block";w.style.whiteSpace="nowrap";mxClient.IS_QUIRKS&&(w.style.filter="none");l=document.createElement("a");l.className="geButton";mxClient.IS_QUIRKS&&(l.style.filter="none");var v=l.cloneNode();v.innerHTML='<div class="geSprite geSprite-delete" style="display:inline-block;"></div>'; -mxEvent.addListener(v,"click",function(a){if(g.isEnabled()){g.model.beginUpdate();try{var b=g.model.root.getIndex(r);g.removeCells([r],!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()||(v.className="geButton mxDisabled");w.appendChild(v);var u=l.cloneNode(); -u.setAttribute("title",mxUtils.trim(mxResources.get("moveSelectionTo",[""])));u.innerHTML='<div class="geSprite geSprite-insert" style="display:inline-block;"></div>';mxEvent.addListener(u,"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=t-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(u);c.popup(d.x,d.y+u.offsetHeight,null,b);a.setCurrentMenu(c)}});w.appendChild(u);var q=l.cloneNode();q.innerHTML='<div class="geSprite geSprite-dots" style="display:inline-block;"></div>'; -q.setAttribute("title",mxResources.get("rename"));mxEvent.addListener(q,"click",function(b){g.isEnabled()&&a.showDataDialog(r);mxEvent.consume(b)});g.isEnabled()||(q.className="geButton mxDisabled");w.appendChild(q);var z=l.cloneNode();z.innerHTML='<div class="geSprite geSprite-duplicate" style="display:inline-block;"></div>';mxEvent.addListener(z,"click",function(a){if(g.isEnabled()){a=null;g.model.beginUpdate();try{a=g.cloneCell(r),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()||(z.className="geButton mxDisabled");w.appendChild(z);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); +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,v=null,w=document.createElement("div");w.className="geToolbarContainer";w.style.position="absolute";w.style.bottom="0px";w.style.left="0px";w.style.right="0px";w.style.height=l;w.style.overflow="hidden";w.style.padding=EditorUi.compactUi? +"4px 0px 3px 0px":"1px";w.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;w.style.borderWidth="1px 0px 0px 0px";w.style.borderColor="#c3c3c3";w.style.borderStyle="solid";w.style.display="block";w.style.whiteSpace="nowrap";mxClient.IS_QUIRKS&&(w.style.filter="none");l=document.createElement("a");l.className="geButton";mxClient.IS_QUIRKS&&(l.style.filter="none");var t=l.cloneNode();t.innerHTML='<div class="geSprite geSprite-delete" style="display:inline-block;"></div>'; +mxEvent.addListener(t,"click",function(a){if(g.isEnabled()){g.model.beginUpdate();try{var b=g.model.root.getIndex(v);g.removeCells([v],!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()||(t.className="geButton mxDisabled");w.appendChild(t);var u=l.cloneNode(); +u.setAttribute("title",mxUtils.trim(mxResources.get("moveSelectionTo",[""])));u.innerHTML='<div class="geSprite geSprite-insert" style="display:inline-block;"></div>';mxEvent.addListener(u,"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(u);c.popup(d.x,d.y+u.offsetHeight,null,b);a.setCurrentMenu(c)}});w.appendChild(u);var r=l.cloneNode();r.innerHTML='<div class="geSprite geSprite-dots" style="display:inline-block;"></div>'; +r.setAttribute("title",mxResources.get("rename"));mxEvent.addListener(r,"click",function(b){g.isEnabled()&&a.showDataDialog(v);mxEvent.consume(b)});g.isEnabled()||(r.className="geButton mxDisabled");w.appendChild(r);var x=l.cloneNode();x.innerHTML='<div class="geSprite geSprite-duplicate" style="display:inline-block;"></div>';mxEvent.addListener(x,"click",function(a){if(g.isEnabled()){a=null;g.model.beginUpdate();try{a=g.cloneCell(v),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()||(x.className="geButton mxDisabled");w.appendChild(x);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");w.appendChild(l);k.appendChild(w);h();g.model.addListener(mxEvent.CHANGE,function(){h()});g.selectionModel.addListener(mxEvent.CHANGE,function(){g.isSelectionEmpty()?u.className="geButton mxDisabled":u.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.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 y=mxUtils.bind(this,function(){var a=this.window.getX(),b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window,"resize",y);this.destroy=function(){mxEvent.removeListener(window,"resize",y);this.window.destroy()}}; @@ -7942,22 +7956,22 @@ DrawioFile.prototype.maxAutosaveRevisionDelay=3E5;DrawioFile.prototype.inConflic DrawioFile.prototype.synchronizeFile=function(a,c){this.savingFile?null!=c&&c({message:mxResources.get("busy")}):null!=this.sync?this.sync.fileChanged(a,c):this.updateFile(a,c)}; DrawioFile.prototype.updateFile=function(a,c,b,d){null!=b&&b()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=c&&c():this.getLatestVersion(mxUtils.bind(this,function(g){try{null!=b&&b()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=c&&c():null!=g?this.mergeFile(g,a,c,d):this.reloadFile(a,c))}catch(e){null!=c&&c(e)}}),c))}; DrawioFile.prototype.mergeFile=function(a,c,b,d){var g=!0;try{this.stats.fileMerged++;var e=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(e,this.ui.pages):null;var m=[this.ui.diffPages(null!=d?d:e,this.shadowPages)];if(!this.ignorePatches(m)){var n=this.ui.patchPages(e, -m[0]);d={};var t=this.ui.getHashValueForPages(n,d),e={},f=this.ui.getHashValueForPages(this.shadowPages,e);"1"==urlParams.test&&EditorUi.debug("File.mergeFile",[this],"backup",this.backupPatch,"patches",m,"checksum",f==t,t);if(null!=t&&t!=f){var l=this.compressReportData(this.getAnonymizedXmlForPages(k)),p=this.compressReportData(this.getAnonymizedXmlForPages(n)),u=this.ui.hashValue(a.getCurrentEtag()),y=this.ui.hashValue(this.getCurrentEtag());this.checksumError(b,m,"Shadow Details: "+JSON.stringify(d)+ -"\nChecksum: "+t+"\nCurrent: "+f+"\nCurrent Details: "+JSON.stringify(e)+"\nFrom: "+u+"\nTo: "+y+"\n\nFile Data:\n"+l+"\nPatched Shadow:\n"+p,null,"mergeFile");return}this.patch(m,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!=c&&c()}catch(z){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged(); -null!=b&&b(z);try{if(g)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,z);else{var q=this.getCurrentUser(),A=null!=q?q.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),A,z)}}catch(C){}}}; +m[0]);d={};var q=this.ui.getHashValueForPages(n,d),e={},f=this.ui.getHashValueForPages(this.shadowPages,e);"1"==urlParams.test&&EditorUi.debug("File.mergeFile",[this],"backup",this.backupPatch,"patches",m,"checksum",f==q,q);if(null!=q&&q!=f){var l=this.compressReportData(this.getAnonymizedXmlForPages(k)),p=this.compressReportData(this.getAnonymizedXmlForPages(n)),u=this.ui.hashValue(a.getCurrentEtag()),v=this.ui.hashValue(this.getCurrentEtag());this.checksumError(b,m,"Shadow Details: "+JSON.stringify(d)+ +"\nChecksum: "+q+"\nCurrent: "+f+"\nCurrent Details: "+JSON.stringify(e)+"\nFrom: "+u+"\nTo: "+v+"\n\nFile Data:\n"+l+"\nPatched Shadow:\n"+p,null,"mergeFile");return}this.patch(m,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!=c&&c()}catch(y){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged(); +null!=b&&b(y);try{if(g)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,y);else{var t=this.getCurrentUser(),z=null!=t?t.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),z,y)}}catch(C){}}}; DrawioFile.prototype.getAnonymizedXmlForPages=function(a){var c=new mxCodec(mxUtils.createXmlDocument()),b=c.document.createElement("mxfile");if(null!=a)for(var d=0;d<a.length;d++){var g=c.encode(new mxGraphModel(a[d].root));"1"!=urlParams.dev&&(g=this.ui.anonymizeNode(g,!0));g.setAttribute("id",a[d].getId());a[d].viewState&&this.ui.editor.graph.saveViewState(a[d].viewState,g,!0);b.appendChild(g)}return mxUtils.getPrettyXml(b)}; DrawioFile.prototype.compressReportData=function(a,c,b){c=null!=c?c:1E4;null!=b&&null!=a&&a.length>b?a=a.substring(0,b)+"[...]":null!=a&&a.length>c&&(a=Graph.compress(a)+"\n");return a}; DrawioFile.prototype.checksumError=function(a,c,b,d,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!=c)for(a=0;a<c.length;a++)this.ui.anonymizePatch(c[a]);var e=mxUtils.bind(this,function(a){var d=this.compressReportData(JSON.stringify(c,null,2));a=null!=a?this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement)), 25E3):"n/a";this.sendErrorReport("Checksum Error in "+g+" "+this.getHash(),(null!=b?b:"")+"\n\nPatches:\n"+d+(null!=a?"\n\nRemote:\n"+a:""),null,7E4)});null==d?e(null):this.getLatestVersion(mxUtils.bind(this,function(a){null!=a&&a.getCurrentEtag()==d?e(a):e(null)}),function(){})}else{var k=this.getCurrentUser(),m=null!=k?k.id:"unknown";EditorUi.logError("Checksum Error in "+g+" "+this.getId(),null,this.getMode()+"."+this.getId(),"user_"+m+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")); try{EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+this.getHash(),action:g,label:"user_"+m+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")})}catch(n){}}}catch(n){}}; -DrawioFile.prototype.sendErrorReport=function(a,c,b,d){try{var g=this.compressReportData(this.getAnonymizedXmlForPages(this.shadowPages),25E3),e=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),k=this.getCurrentUser(),m=null!=k?this.ui.hashValue(k.id):"unknown",n=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",t=this.getTitle(),f=t.lastIndexOf("."),k="xml";0<f&&(k=t.substring(f));var l=null!=b?b.stack:Error().stack;EditorUi.sendReport(a+" "+(new Date).toISOString()+ +DrawioFile.prototype.sendErrorReport=function(a,c,b,d){try{var g=this.compressReportData(this.getAnonymizedXmlForPages(this.shadowPages),25E3),e=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),k=this.getCurrentUser(),m=null!=k?this.ui.hashValue(k.id):"unknown",n=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",q=this.getTitle(),f=q.lastIndexOf("."),k="xml";0<f&&(k=q.substring(f));var l=null!=b?b.stack:Error().stack;EditorUi.sendReport(a+" "+(new Date).toISOString()+ ":\n\nBrowser="+navigator.userAgent+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+k+")\nUser="+m+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!=c?"\n\n"+c:"")+ (null!=b?"\n\nError: "+b.message:"")+"\n\nStack:\n"+l+"\n\nShadow:\n"+g+"\n\nData:\n"+e,d)}catch(p){}}; DrawioFile.prototype.reloadFile=function(a,c){try{this.ui.spinner.stop();var b=mxUtils.bind(this,function(){this.stats.fileReloaded++;this.reportEnabled=!1;var b=this.ui.editor.graph.getViewState(),c=this.ui.editor.graph.getSelectionCells(),e=this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(e,b,c);null!=this.backupPatch&&this.patch([this.backupPatch]);var d=this.ui.getCurrentFile();null!=d&&(d.stats= this.stats);null!=a&&a()}}),!0)});this.isModified()&&null==this.backupPatch?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.handleFileSuccess("manual"==DrawioFile.SYNC)}),b,mxResources.get("cancel"),mxResources.get("discardChanges")):b()}catch(d){null!=c&&c(d)}};DrawioFile.prototype.copyFile=function(a,c){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))}; DrawioFile.prototype.ignorePatches=function(a){for(var c=!0,b=0;b<a.length&&c;b++)c=c&&0==Object.keys(a[b]).length;return c}; -DrawioFile.prototype.patch=function(a,c){var b=this.ui.editor.undoManager,d=b.history.slice(),g=b.indexOfNextAdd,e=this.ui.editor.graph;e.container.style.visibility="hidden";var k=this.changeListenerEnabled;this.changeListenerEnabled=!1;var m=e.foldingEnabled,n=e.mathEnabled,t=e.cellRenderer.redraw;e.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)};e.model.beginUpdate();try{for(var f= -0;f<a.length;f++)this.ui.pages=this.ui.patchPages(this.ui.pages,a[f],!0,c,this.isModified());0==this.ui.pages.length&&this.ui.pages.push(this.ui.createPage());0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{e.container.style.visibility="";e.model.endUpdate();e.cellRenderer.redraw=t;this.changeListenerEnabled=k;b.history=d;b.indexOfNextAdd=g;b.fireEvent(new mxEventObject(mxEvent.CLEAR));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)n!= +DrawioFile.prototype.patch=function(a,c){var b=this.ui.editor.undoManager,d=b.history.slice(),g=b.indexOfNextAdd,e=this.ui.editor.graph;e.container.style.visibility="hidden";var k=this.changeListenerEnabled;this.changeListenerEnabled=!1;var m=e.foldingEnabled,n=e.mathEnabled,q=e.cellRenderer.redraw;e.cellRenderer.redraw=function(a){a.view.graph.isEditing(a.cell)&&(a.view.graph.scrollCellToVisible(a.cell),a.view.graph.cellEditor.resize());q.apply(this,arguments)};e.model.beginUpdate();try{for(var f= +0;f<a.length;f++)this.ui.pages=this.ui.patchPages(this.ui.pages,a[f],!0,c,this.isModified());0==this.ui.pages.length&&this.ui.pages.push(this.ui.createPage());0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{e.container.style.visibility="";e.model.endUpdate();e.cellRenderer.redraw=q;this.changeListenerEnabled=k;b.history=d;b.indexOfNextAdd=g;b.fireEvent(new mxEventObject(mxEvent.CLEAR));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)n!= e.mathEnabled?(this.ui.editor.updateGraphComponents(),e.refresh()):(m!=e.foldingEnabled?e.view.revalidate():e.view.validate(),e.sizeDidChange());this.ui.updateTabContainer()}}; DrawioFile.prototype.save=function(a,c,b,d,g,e){try{if(this.isEditable())if(!g&&this.invalidChecksum)if(null!=b)b({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=c&&c();else if(null!=b)b({message:mxResources.get("readOnly")});else throw Error(mxResources.get("readOnly"));}catch(k){if(null!=b)b(k);else throw k;}}; DrawioFile.prototype.updateFileData=function(){var a=null!=this.ui.fileNode?"false"==this.ui.fileNode.getAttribute("compressed"):!1;this.setData(this.ui.getFileData(null,null,null,null,null,null,null,null,this,a))};DrawioFile.prototype.saveAs=function(a,c,b){};DrawioFile.prototype.saveFile=function(a,c,b,d){};DrawioFile.prototype.getPublicUrl=function(a){a(null)};DrawioFile.prototype.isRestricted=function(){return!1};DrawioFile.prototype.isModified=function(){return this.modified}; @@ -8008,23 +8022,23 @@ StorageFile.prototype.open=function(){DrawioFile.prototype.open.apply(this,argum StorageLibrary.prototype.isRenamable=function(a,c,b){return".scratchpad"!=this.title};StorageLibrary.prototype.open=function(){};RemoteFile=function(a,c,b){DrawioFile.call(this,a,c);this.title=b;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,c,b){RemoteFile.call(this,a,c,b.title);this.libObj=b};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,c,b){}; RemoteLibrary.prototype.saveAs=function(a,c,b){};RemoteLibrary.prototype.updateFileData=function(){};RemoteLibrary.prototype.open=function(){};UrlLibrary=function(a,c,b){StorageFile.call(this,a,c,b);a=b;c=a.lastIndexOf("/");0<=c&&(a=a.substring(c+1));this.fname=a};mxUtils.extend(UrlLibrary,StorageFile);UrlLibrary.prototype.getHash=function(){return"U"+encodeURIComponent(this.title)};UrlLibrary.prototype.getTitle=function(){return this.fname};UrlLibrary.prototype.isAutosave=function(){return!1};UrlLibrary.prototype.isEditable=function(a,c,b){return!1};UrlLibrary.prototype.saveAs=function(a,c,b){};UrlLibrary.prototype.open=function(){};/* mxClient.IS_IOS || */ -var StorageDialog=function(a,c,b){function d(d,p,e,q,g,k){function x(){mxEvent.addListener(v,"click",null!=k?k:function(){e!=App.MODE_GOOGLE||a.isDriveDomain()?e==App.MODE_GOOGLE&&a.spinner.spin(document.body,mxResources.get("authorizing"))?a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();a.setMode(e,n.checked);c()})):e==App.MODE_ONEDRIVE&&a.spinner.spin(document.body,mxResources.get("authorizing"))?a.oneDrive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();a.setMode(e,n.checked); -c()})):(a.setMode(e,n.checked),c()):window.location.hostname=DriveClient.prototype.newAppHostname})}++t>b&&(mxUtils.br(f),t=0);var v=document.createElement("a");v.style.overflow="hidden";v.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";v.className="geBaseButton";v.style.boxSizing="border-box";v.style.fontSize="11px";v.style.position="relative";v.style.margin="4px";v.style.marginTop="2px";v.style.padding="8px 10px 12px 10px";v.style.width="88px";v.style.height=StorageDialog.extended?"50px": -"100px";v.style.whiteSpace="nowrap";v.setAttribute("title",p);mxClient.IS_QUIRKS&&(v.style.cssFloat="left",v.style.zoom="1");var u=document.createElement("div");u.style.textOverflow="ellipsis";u.style.overflow="hidden";if(null!=d){var B=document.createElement("img");B.setAttribute("src",d);B.setAttribute("border","0");B.setAttribute("align","absmiddle");B.style.width=StorageDialog.extended?"24px":"60px";B.style.height=StorageDialog.extended?"24px":"60px";B.style.paddingBottom=StorageDialog.extended? -"4px":"6px";v.appendChild(B)}else u.style.paddingTop="5px",u.style.whiteSpace="normal",mxClient.IS_IOS?(v.style.padding="0px 10px 20px 10px",v.style.top="6px"):mxClient.IS_FF&&(u.style.paddingTop="0px",u.style.marginTop="-2px");StorageDialog.extended&&(v.style.paddingTop="4px",v.style.marginBottom="0px",u.display="inline-block",2==b&&(B.style.width="38px",B.style.height="38px",v.style.width="80px",v.style.height="68px"));v.appendChild(u);mxUtils.write(u,p);if(null!=g)for(d=0;d<g.length;d++)mxUtils.br(u), -mxUtils.write(u,g[d]);if(null!=q&&null==a[q]){B.style.visibility="hidden";mxUtils.setOpacity(u,10);var y=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});y.spin(v);var m=window.setTimeout(function(){null==a[q]&&(y.stop(),v.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(b,c){null!=a[q]&&c.getProperty("client")==a[q]&&(window.clearTimeout(m),mxUtils.setOpacity(u, -100),B.style.visibility="",y.stop(),x(),"drive"==q&&null!=l.parentNode&&l.parentNode.removeChild(l))}))}else x();f.appendChild(v)}b=null!=b?b:2;var g=document.createElement("div");g.style.textAlign="center";g.style.whiteSpace="nowrap";g.style.paddingTop="0px";g.style.paddingBottom="20px";var e=a.addLanguageMenu(g,!0);null!=e&&(e.style.bottom=parseInt("28px")-3+"px");if(!a.isOffline()&&1<a.getServiceCount()){e=document.createElement("a");e.setAttribute("href","https://about.draw.io/support/");e.setAttribute("title", +var StorageDialog=function(a,c,b){function d(d,p,e,t,A,g){function k(){mxEvent.addListener(B,"click",null!=g?g:function(){e!=App.MODE_GOOGLE||a.isDriveDomain()?e==App.MODE_GOOGLE&&a.spinner.spin(document.body,mxResources.get("authorizing"))?a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();a.setMode(e,n.checked);c()})):e==App.MODE_ONEDRIVE&&a.spinner.spin(document.body,mxResources.get("authorizing"))?a.oneDrive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();a.setMode(e,n.checked); +c()})):(a.setMode(e,n.checked),c()):window.location.hostname=DriveClient.prototype.newAppHostname})}++q>b&&(mxUtils.br(f),q=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 x=document.createElement("div");x.style.textOverflow="ellipsis";x.style.overflow="hidden";if(null!=d){var u=document.createElement("img");u.setAttribute("src",d);u.setAttribute("border","0");u.setAttribute("align","absmiddle");u.style.width=StorageDialog.extended?"24px":"60px";u.style.height=StorageDialog.extended?"24px":"60px";u.style.paddingBottom=StorageDialog.extended? +"4px":"6px";B.appendChild(u)}else x.style.paddingTop="5px",x.style.whiteSpace="normal",mxClient.IS_IOS?(B.style.padding="0px 10px 20px 10px",B.style.top="6px"):mxClient.IS_FF&&(x.style.paddingTop="0px",x.style.marginTop="-2px");StorageDialog.extended&&(B.style.paddingTop="4px",B.style.marginBottom="0px",x.display="inline-block",2==b&&(u.style.width="38px",u.style.height="38px",B.style.width="80px",B.style.height="68px"));B.appendChild(x);mxUtils.write(x,p);if(null!=A)for(d=0;d<A.length;d++)mxUtils.br(x), +mxUtils.write(x,A[d]);if(null!=t&&null==a[t]){u.style.visibility="hidden";mxUtils.setOpacity(x,10);var v=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});v.spin(B);var C=window.setTimeout(function(){null==a[t]&&(v.stop(),B.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(b,c){null!=a[t]&&c.getProperty("client")==a[t]&&(window.clearTimeout(C),mxUtils.setOpacity(x, +100),u.style.visibility="",v.stop(),k(),"drive"==t&&null!=l.parentNode&&l.parentNode.removeChild(l))}))}else k();f.appendChild(B)}b=null!=b?b:2;var g=document.createElement("div");g.style.textAlign="center";g.style.whiteSpace="nowrap";g.style.paddingTop="0px";g.style.paddingBottom="20px";var e=a.addLanguageMenu(g,!0);null!=e&&(e.style.bottom=parseInt("28px")-3+"px");if(!a.isOffline()&&1<a.getServiceCount()){e=document.createElement("a");e.setAttribute("href","https://about.draw.io/support/");e.setAttribute("title", mxResources.get("help"));e.setAttribute("target","_blank");e.style.position="absolute";e.style.userSelect="none";e.style.textDecoration="none";e.style.cursor="pointer";e.style.fontSize="12px";e.style.bottom="28px";e.style.left="26px";e.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";e.appendChild(k); mxUtils.write(e,mxResources.get("help"));g.appendChild(e)}var m=document.createElement("div");m.style.position="absolute";m.style.cursor="pointer";m.style.fontSize="12px";m.style.bottom="28px";m.style.color="gray";m.style.userSelect="none";mxUtils.write(m,mxResources.get("decideLater"));a.isOfflineApp()?m.style.right="20px":(mxUtils.setPrefixedStyle(m.style,"transform","translate(-50%,0)"),m.style.left="50%");this.init=function(){if(mxClient.IS_QUIRKS||8==document.documentMode)m.style.marginLeft= -Math.round(m.clientWidth/2)+"px"};g.appendChild(m);mxEvent.addListener(m,"click",function(){a.hideDialog();var b=Editor.useLocalStorage;a.createFile(a.defaultFilename,null,null,null,null,null,null,!0);Editor.useLocalStorage=b});e=document.createElement("div");mxClient.IS_QUIRKS&&(e.style.whiteSpace="nowrap",e.style.cssFloat="left");e.style.border="1px solid #d3d3d3";e.style.borderWidth="1px 0px 1px 0px";e.style.padding="12px 0px 12px 0px";var n=document.createElement("input");n.setAttribute("type", -"checkbox");n.setAttribute("checked","checked");n.defaultChecked=!0;var t=0,f=document.createElement("div");f.style.paddingTop="2px";e.appendChild(f);var l=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&&d(IMAGE_PATH+ +"checkbox");n.setAttribute("checked","checked");n.defaultChecked=!0;var q=0,f=document.createElement("div");f.style.paddingTop="2px";e.appendChild(f);var l=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(){q=0;"function"===typeof window.DriveClient&&d(IMAGE_PATH+ "/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive");"function"===typeof window.OneDriveClient&&d(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive");d(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);!isLocalStorage||"1"!=urlParams.browser&&"1"!=urlParams.offline||d(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER);StorageDialog.extended&&("function"===typeof window.DropboxClient&& -d(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox"),null!=a.gitHub&&d(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub"),null!=a.gitLab&&d(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab"))};g.appendChild(e);p();k=document.createElement("p");k.style.marginTop="8px";k.style.marginBottom="6px";var u=document.createElement("div");u.style.marginBottom="10px";var y=document.createElement("a");y.style.color= -"gray";y.style.fontSize="12px";y.style.cursor="pointer";y.style.userSelect="none";mxUtils.write(y,(StorageDialog.extended?mxResources.get("showLess"):mxResources.get("showMore"))+"...");u.appendChild(y);k.appendChild(u);k.appendChild(n);mxEvent.addListener(y,"click",function(a){f.innerHTML="";y.innerHTML="";StorageDialog.extended=!StorageDialog.extended;p();mxUtils.write(y,(StorageDialog.extended?mxResources.get("showLess"):mxResources.get("showMore"))+"...");mxEvent.consume(a)});var q=document.createElement("span"); -q.style.color="gray";q.style.fontSize="12px";q.style.userSelect="none";mxUtils.write(q," "+mxResources.get("rememberThisSetting"));k.appendChild(q);mxUtils.br(k);u=a.getRecent();if(null!=u&&0<u.length){var A=document.createElement("select");A.style.marginTop="8px";A.style.maxWidth="170px";var z=document.createElement("option");z.setAttribute("value","");z.setAttribute("selected","selected");z.style.textAlign="center";mxUtils.write(z,mxResources.get("openRecent")+"...");A.appendChild(z);for(z=0;z< -u.length;z++)(function(a){var b=a.mode;b==App.MODE_GOOGLE?b="googleDrive":b==App.MODE_ONEDRIVE&&(b="oneDrive");var c=document.createElement("option");c.setAttribute("value",a.id);mxUtils.write(c,a.title+" ("+mxResources.get(b)+")");A.appendChild(c)})(u[z]);k.appendChild(A);mxEvent.addListener(A,"change",function(b){""!=A.value&&a.loadFile(A.value)})}else k.style.marginTop="20px",e.style.padding="30px 0px 26px 0px";Graph.fileSupport&&(u=document.createElement("div"),u.style.marginBottom="10px",u.style.padding= -"18px 0px 6px 0px",z=document.createElement("a"),z.style.cursor="pointer",z.style.fontSize="12px",z.style.color="gray",z.style.userSelect="none",mxUtils.write(z,mxResources.get("import")+": "+mxResources.get("gliffy")+", "+mxResources.get("formatVssx")+", "+mxResources.get("formatVsdx")+", "+mxResources.get("lucidchart")+"..."),mxEvent.addListener(z,"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()}),u.appendChild(z),k.appendChild(u),e.style.paddingBottom="4px");e.appendChild(k);mxEvent.addListener(q,"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== +d(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox"),null!=a.gitHub&&d(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub"),null!=a.gitLab&&d(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab"))};g.appendChild(e);p();k=document.createElement("p");k.style.marginTop="8px";k.style.marginBottom="6px";var u=document.createElement("div");u.style.marginBottom="10px";var v=document.createElement("a");v.style.color= +"gray";v.style.fontSize="12px";v.style.cursor="pointer";v.style.userSelect="none";mxUtils.write(v,(StorageDialog.extended?mxResources.get("showLess"):mxResources.get("showMore"))+"...");u.appendChild(v);k.appendChild(u);k.appendChild(n);mxEvent.addListener(v,"click",function(a){f.innerHTML="";v.innerHTML="";StorageDialog.extended=!StorageDialog.extended;p();mxUtils.write(v,(StorageDialog.extended?mxResources.get("showLess"):mxResources.get("showMore"))+"...");mxEvent.consume(a)});var t=document.createElement("span"); +t.style.color="gray";t.style.fontSize="12px";t.style.userSelect="none";mxUtils.write(t," "+mxResources.get("rememberThisSetting"));k.appendChild(t);mxUtils.br(k);u=a.getRecent();if(null!=u&&0<u.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< +u.length;y++)(function(a){var b=a.mode;b==App.MODE_GOOGLE?b="googleDrive":b==App.MODE_ONEDRIVE&&(b="oneDrive");var c=document.createElement("option");c.setAttribute("value",a.id);mxUtils.write(c,a.title+" ("+mxResources.get(b)+")");z.appendChild(c)})(u[y]);k.appendChild(z);mxEvent.addListener(z,"change",function(b){""!=z.value&&a.loadFile(z.value)})}else k.style.marginTop="20px",e.style.padding="30px 0px 26px 0px";Graph.fileSupport&&(u=document.createElement("div"),u.style.marginBottom="10px",u.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()}),u.appendChild(y),k.appendChild(u),e.style.paddingBottom="4px");e.appendChild(k);mxEvent.addListener(t,"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&&(l.style.padding="8px",l.style.fontSize="9pt",l.style.marginTop="-14px",l.innerHTML='<a style="background-color:#dcdcdc;padding:5px;color:black;text-decoration:none;" href="https://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(l))},5E3);this.container=g};StorageDialog.extended=!1; var SplashDialog=function(a){var c=document.createElement("div");c.style.textAlign="center";var b=a.addLanguageMenu(c,!0);null!=b&&(b.style.bottom="19px");b=null;b=a.getServiceCount();if(!a.isOffline()&&1<b){b=document.createElement("a");b.setAttribute("href","https://about.draw.io/support/");b.setAttribute("title",mxResources.get("help"));b.setAttribute("target","_blank");b.style.position="absolute";b.style.fontSize="12px";b.style.textDecoration="none";b.style.cursor="pointer";b.style.bottom="22px"; b.style.left="26px";b.style.color="gray";var d=document.createElement("img");mxUtils.setOpacity(d,50);d.style.height="16px";d.style.width="16px";d.setAttribute("border","0");d.setAttribute("valign","bottom");d.setAttribute("src",Editor.helpImage);d.style.marginRight="2px";b.appendChild(d);mxUtils.write(b,mxResources.get("help"));c.appendChild(b)}b=document.createElement("p");b.style.fontSize="16pt";b.style.padding="0px";b.style.paddingTop="2px";b.style.margin="0px";b.style.color="gray";d=document.createElement("img"); @@ -8040,30 +8054,30 @@ mxUtils.br(e),d=document.createElement("a"),d.setAttribute("href","javascript:vo mxResources.get(5E5>c.length?k?"link":"mainEmbedNotice":"preview")+":");mxUtils.br(d);e=document.createElement("div");e.style.position="absolute";e.style.top="30px";e.style.right="30px";e.style.color="gray";mxUtils.write(e,a.formatFileSize(c.length));d.appendChild(e);var m=document.createElement("textarea");m.setAttribute("autocomplete","off");m.setAttribute("autocorrect","off");m.setAttribute("autocapitalize","off");m.setAttribute("spellcheck","false");m.style.marginTop="10px";m.style.resize="none"; m.style.height="150px";m.style.width="440px";m.style.border="1px solid gray";m.value=mxResources.get("updatingDocument");d.appendChild(m);mxUtils.br(d);this.init=function(){window.setTimeout(function(){5E5>c.length?(m.value=c,m.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?m.select():document.execCommand("selectAll",!1,null)):(m.setAttribute("readonly","true"),m.value=c.substring(0,340)+"... ("+mxResources.get("drawingTooLarge")+")")},0)};e=document.createElement("div"); e.style.position="absolute";e.style.bottom="36px";e.style.right="32px";var n=null;!EmbedDialog.showPreviewOption||mxClient.IS_CHROMEAPP&&!k||navigator.standalone||!(k||mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))||(n=mxUtils.button(mxResources.get(5E5>c.length?"preview":"openInNewWindow"),function(){var f=5E5>c.length?m.value:c;if(null!=g)g(f);else if(k)try{var d=a.openLink(f);null!=d&&(null==b||0<b)&&window.setTimeout(mxUtils.bind(this,function(){null!=d&&null!=d.location.href&& -d.location.href.substring(0,8)!=f.substring(0,8)&&(d.close(),a.handleError({message:mxResources.get("drawingTooLarge")}))}),b||500)}catch(y){a.handleError({message:y.message||mxResources.get("drawingTooLarge")})}else{var e=window.open(),e=null!=e?e.document:null;null!=e?(e.writeln("<html><head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head><body>'+c+"</body></html>"),e.close()):a.handleError({message:mxResources.get("errorUpdatingPreview")})}}),n.className= -"geBtn",e.appendChild(n));if(!k||7500<c.length){var t=mxUtils.button(mxResources.get("download"),function(){a.hideDialog();a.saveData("embed.txt","txt",c,"text/plain")});t.className="geBtn";e.appendChild(t)}if(k&&(!a.isOffline()||mxClient.IS_CHROMEAPP)){if(51200>c.length){var f=mxUtils.button("",function(){try{var b="https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(m.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");f.appendChild(t);f.setAttribute("title",mxResources.get("facebook")+" ("+a.formatFileSize(51200)+" max)");f.style.verticalAlign="bottom";f.style.paddingTop="4px";f.style.minWidth="46px";f.className="geBtn";e.appendChild(f)}7168>c.length&&(f=mxUtils.button("",function(){try{var b="https://twitter.com/intent/tweet?text="+encodeURIComponent("Check out the diagram I made using @drawio")+ -"&url="+encodeURIComponent(m.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",f.appendChild(t),f.setAttribute("title",mxResources.get("twitter")+" ("+a.formatFileSize(7168)+" max)"),f.style.verticalAlign="bottom",f.style.paddingTop="4px",f.style.minWidth="46px", -f.className="geBtn",e.appendChild(f))}t=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});e.appendChild(t);f=mxUtils.button(mxResources.get("copy"),function(){m.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?m.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");a.alert(mxResources.get("copiedToClipboard"))});5E5>c.length?mxClient.IS_SF||null!=document.documentMode?t.className="geBtn gePrimaryBtn":(e.appendChild(f), -f.className="geBtn gePrimaryBtn",t.className="geBtn"):(e.appendChild(n),t.className="geBtn",n.className="geBtn gePrimaryBtn");d.appendChild(e);this.container=d};EmbedDialog.showPreviewOption=!0; -var GoogleSitesDialog=function(a,c){function b(){var a=null!=x&&null!=x.getTitle()?x.getTitle():this.defaultFilename;if(B.checked&&""!=p.value){var b="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(p.value));null!=a&&(b+="&title="+encodeURIComponent(a));0<D.length&&(b+="&s="+D);""!=u.value&&"0"!=u.value&&(b+="&border="+u.value);""!=l.value&&(b+="&height="+l.value);b+="&pan="+(y.checked?"1":"0");b+="&zoom="+(q.checked?"1":"0");b+="&fit="+(v.checked?"1":"0"); -b+="&resize="+(C.checked?"1":"0");b+="&x0="+Number(f.value);b+="&y0="+n;g.mathEnabled&&(b+="&math=1");z.checked?b+="&edit=_blank":A.checked&&(b+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));t.value=b}else x.constructor==DriveFile||x.constructor==DropboxFile?(b="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=p.value?b+=encodeURIComponent(mxUtils.htmlEntities(p.value))+"&type=3":(b+=x.getHash().substring(1),b=x.constructor==DropboxFile?b+"&type=2":b+"&type=1"),null!= -a&&(b+="&title="+encodeURIComponent(a)),""!=l.value&&(a=parseInt(l.value)+parseInt(f.value),b+="&height="+a),t.value=b):t.value=""}var d=document.createElement("div"),g=a.editor.graph,e=g.getGraphBounds(),k=g.view.scale,m=Math.floor(e.x/k-g.view.translate.x),n=Math.floor(e.y/k-g.view.translate.y);mxUtils.write(d,mxResources.get("googleGadget")+":");mxUtils.br(d);var t=document.createElement("input");t.setAttribute("type","text");t.style.marginBottom="8px";t.style.marginTop="2px";t.style.width="410px"; -d.appendChild(t);mxUtils.br(d);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(d,mxResources.get("top")+":");var f=document.createElement("input");f.setAttribute("type","text");f.setAttribute("size","4");f.style.marginRight="16px";f.style.marginLeft="4px";f.value=m;d.appendChild(f);mxUtils.write(d,mxResources.get("height")+":");var l=document.createElement("input");l.setAttribute("type", +d.location.href.substring(0,8)!=f.substring(0,8)&&(d.close(),a.handleError({message:mxResources.get("drawingTooLarge")}))}),b||500)}catch(v){a.handleError({message:v.message||mxResources.get("drawingTooLarge")})}else{var e=window.open(),e=null!=e?e.document:null;null!=e?(e.writeln("<html><head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head><body>'+c+"</body></html>"),e.close()):a.handleError({message:mxResources.get("errorUpdatingPreview")})}}),n.className= +"geBtn",e.appendChild(n));if(!k||7500<c.length){var q=mxUtils.button(mxResources.get("download"),function(){a.hideDialog();a.saveData("embed.txt","txt",c,"text/plain")});q.className="geBtn";e.appendChild(q)}if(k&&(!a.isOffline()||mxClient.IS_CHROMEAPP)){if(51200>c.length){var f=mxUtils.button("",function(){try{var b="https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(m.value);a.openLink(b)}catch(p){a.handleError({message:p.message||mxResources.get("drawingTooLarge")})}}),q=document.createElement("img"); +q.setAttribute("src",Editor.facebookImage);q.setAttribute("width","18");q.setAttribute("height","18");q.setAttribute("border","0");f.appendChild(q);f.setAttribute("title",mxResources.get("facebook")+" ("+a.formatFileSize(51200)+" max)");f.style.verticalAlign="bottom";f.style.paddingTop="4px";f.style.minWidth="46px";f.className="geBtn";e.appendChild(f)}7168>c.length&&(f=mxUtils.button("",function(){try{var b="https://twitter.com/intent/tweet?text="+encodeURIComponent("Check out the diagram I made using @drawio")+ +"&url="+encodeURIComponent(m.value);a.openLink(b)}catch(p){a.handleError({message:p.message||mxResources.get("drawingTooLarge")})}}),q=document.createElement("img"),q.setAttribute("src",Editor.tweetImage),q.setAttribute("width","18"),q.setAttribute("height","18"),q.setAttribute("border","0"),q.style.marginBottom="5px",f.appendChild(q),f.setAttribute("title",mxResources.get("twitter")+" ("+a.formatFileSize(7168)+" max)"),f.style.verticalAlign="bottom",f.style.paddingTop="4px",f.style.minWidth="46px", +f.className="geBtn",e.appendChild(f))}q=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});e.appendChild(q);f=mxUtils.button(mxResources.get("copy"),function(){m.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?m.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");a.alert(mxResources.get("copiedToClipboard"))});5E5>c.length?mxClient.IS_SF||null!=document.documentMode?q.className="geBtn gePrimaryBtn":(e.appendChild(f), +f.className="geBtn gePrimaryBtn",q.className="geBtn"):(e.appendChild(n),q.className="geBtn",n.className="geBtn gePrimaryBtn");d.appendChild(e);this.container=d};EmbedDialog.showPreviewOption=!0; +var GoogleSitesDialog=function(a,c){function b(){var a=null!=A&&null!=A.getTitle()?A.getTitle():this.defaultFilename;if(x.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<D.length&&(b+="&s="+D);""!=u.value&&"0"!=u.value&&(b+="&border="+u.value);""!=l.value&&(b+="&height="+l.value);b+="&pan="+(v.checked?"1":"0");b+="&zoom="+(t.checked?"1":"0");b+="&fit="+(B.checked?"1":"0"); +b+="&resize="+(C.checked?"1":"0");b+="&x0="+Number(f.value);b+="&y0="+n;g.mathEnabled&&(b+="&math=1");y.checked?b+="&edit=_blank":z.checked&&(b+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));q.value=b}else A.constructor==DriveFile||A.constructor==DropboxFile?(b="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=p.value?b+=encodeURIComponent(mxUtils.htmlEntities(p.value))+"&type=3":(b+=A.getHash().substring(1),b=A.constructor==DropboxFile?b+"&type=2":b+"&type=1"),null!= +a&&(b+="&title="+encodeURIComponent(a)),""!=l.value&&(a=parseInt(l.value)+parseInt(f.value),b+="&height="+a),q.value=b):q.value=""}var d=document.createElement("div"),g=a.editor.graph,e=g.getGraphBounds(),k=g.view.scale,m=Math.floor(e.x/k-g.view.translate.x),n=Math.floor(e.y/k-g.view.translate.y);mxUtils.write(d,mxResources.get("googleGadget")+":");mxUtils.br(d);var q=document.createElement("input");q.setAttribute("type","text");q.style.marginBottom="8px";q.style.marginTop="2px";q.style.width="410px"; +d.appendChild(q);mxUtils.br(d);this.init=function(){q.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?q.select():document.execCommand("selectAll",!1,null)};mxUtils.write(d,mxResources.get("top")+":");var f=document.createElement("input");f.setAttribute("type","text");f.setAttribute("size","4");f.style.marginRight="16px";f.style.marginLeft="4px";f.value=m;d.appendChild(f);mxUtils.write(d,mxResources.get("height")+":");var l=document.createElement("input");l.setAttribute("type", "text");l.setAttribute("size","4");l.style.marginLeft="4px";l.value=Math.ceil(e.height/k);d.appendChild(l);mxUtils.br(d);e=document.createElement("hr");e.setAttribute("size","1");e.style.marginBottom="16px";e.style.marginTop="16px";d.appendChild(e);mxUtils.write(d,mxResources.get("publicDiagramUrl")+":");mxUtils.br(d);var p=document.createElement("input");p.setAttribute("type","text");p.setAttribute("size","28");p.style.marginBottom="8px";p.style.marginTop="2px";p.style.width="410px";p.value=c||""; -d.appendChild(p);mxUtils.br(d);mxUtils.write(d,mxResources.get("borderWidth")+":");var u=document.createElement("input");u.setAttribute("type","text");u.setAttribute("size","3");u.style.marginBottom="8px";u.style.marginLeft="4px";u.value="0";d.appendChild(u);mxUtils.br(d);var y=document.createElement("input");y.setAttribute("type","checkbox");y.setAttribute("checked","checked");y.defaultChecked=!0;y.style.marginLeft="16px";d.appendChild(y);mxUtils.write(d,mxResources.get("pan")+" ");var q=document.createElement("input"); -q.setAttribute("type","checkbox");q.setAttribute("checked","checked");q.defaultChecked=!0;q.style.marginLeft="8px";d.appendChild(q);mxUtils.write(d,mxResources.get("zoom")+" ");var A=document.createElement("input");A.setAttribute("type","checkbox");A.style.marginLeft="8px";A.setAttribute("title",window.location.href);d.appendChild(A);mxUtils.write(d,mxResources.get("edit")+" ");var z=document.createElement("input");z.setAttribute("type","checkbox");z.style.marginLeft="8px";d.appendChild(z);mxUtils.write(d, -mxResources.get("asNew")+" ");mxUtils.br(d);var C=document.createElement("input");C.setAttribute("type","checkbox");C.setAttribute("checked","checked");C.defaultChecked=!0;C.style.marginLeft="16px";d.appendChild(C);mxUtils.write(d,mxResources.get("resize")+" ");var v=document.createElement("input");v.setAttribute("type","checkbox");v.style.marginLeft="8px";d.appendChild(v);mxUtils.write(d,mxResources.get("fit")+" ");var B=document.createElement("input");B.setAttribute("type","checkbox");B.style.marginLeft= -"8px";d.appendChild(B);mxUtils.write(d,mxResources.get("embed")+" ");var D=a.getBasenames().join(";"),x=a.getCurrentFile();mxEvent.addListener(y,"change",b);mxEvent.addListener(q,"change",b);mxEvent.addListener(C,"change",b);mxEvent.addListener(v,"change",b);mxEvent.addListener(A,"change",b);mxEvent.addListener(z,"change",b);mxEvent.addListener(B,"change",b);mxEvent.addListener(l,"change",b);mxEvent.addListener(f,"change",b);mxEvent.addListener(u,"change",b);mxEvent.addListener(p,"change",b);b(); -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)});e=document.createElement("div");e.style.paddingTop="12px";e.style.textAlign="right";k=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});k.className="geBtn gePrimaryBtn";e.appendChild(k);d.appendChild(e);this.container=d},CreateGraphDialog=function(a,c,b){var d=document.createElement("div");d.style.textAlign= +d.appendChild(p);mxUtils.br(d);mxUtils.write(d,mxResources.get("borderWidth")+":");var u=document.createElement("input");u.setAttribute("type","text");u.setAttribute("size","3");u.style.marginBottom="8px";u.style.marginLeft="4px";u.value="0";d.appendChild(u);mxUtils.br(d);var v=document.createElement("input");v.setAttribute("type","checkbox");v.setAttribute("checked","checked");v.defaultChecked=!0;v.style.marginLeft="16px";d.appendChild(v);mxUtils.write(d,mxResources.get("pan")+" ");var t=document.createElement("input"); +t.setAttribute("type","checkbox");t.setAttribute("checked","checked");t.defaultChecked=!0;t.style.marginLeft="8px";d.appendChild(t);mxUtils.write(d,mxResources.get("zoom")+" ");var z=document.createElement("input");z.setAttribute("type","checkbox");z.style.marginLeft="8px";z.setAttribute("title",window.location.href);d.appendChild(z);mxUtils.write(d,mxResources.get("edit")+" ");var y=document.createElement("input");y.setAttribute("type","checkbox");y.style.marginLeft="8px";d.appendChild(y);mxUtils.write(d, +mxResources.get("asNew")+" ");mxUtils.br(d);var C=document.createElement("input");C.setAttribute("type","checkbox");C.setAttribute("checked","checked");C.defaultChecked=!0;C.style.marginLeft="16px";d.appendChild(C);mxUtils.write(d,mxResources.get("resize")+" ");var B=document.createElement("input");B.setAttribute("type","checkbox");B.style.marginLeft="8px";d.appendChild(B);mxUtils.write(d,mxResources.get("fit")+" ");var x=document.createElement("input");x.setAttribute("type","checkbox");x.style.marginLeft= +"8px";d.appendChild(x);mxUtils.write(d,mxResources.get("embed")+" ");var D=a.getBasenames().join(";"),A=a.getCurrentFile();mxEvent.addListener(v,"change",b);mxEvent.addListener(t,"change",b);mxEvent.addListener(C,"change",b);mxEvent.addListener(B,"change",b);mxEvent.addListener(z,"change",b);mxEvent.addListener(y,"change",b);mxEvent.addListener(x,"change",b);mxEvent.addListener(l,"change",b);mxEvent.addListener(f,"change",b);mxEvent.addListener(u,"change",b);mxEvent.addListener(p,"change",b);b(); +mxEvent.addListener(q,"click",function(){q.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?q.select():document.execCommand("selectAll",!1,null)});e=document.createElement("div");e.style.paddingTop="12px";e.style.textAlign="right";k=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});k.className="geBtn gePrimaryBtn";e.appendChild(k);d.appendChild(e);this.container=d},CreateGraphDialog=function(a,c,b){var d=document.createElement("div");d.style.textAlign= "right";this.init=function(){var c=document.createElement("div");c.style.position="relative";c.style.border="1px solid gray";c.style.width="100%";c.style.height="360px";c.style.overflow="hidden";c.style.marginBottom="16px";mxEvent.disableContextMenu(c);d.appendChild(c);var e=new Graph(c);e.setCellsCloneable(!0);e.setPanning(!0);e.setAllowDanglingEdges(!1);e.connectionHandler.select=!1;e.view.setTranslate(20,20);e.border=20;e.panningHandler.useLeftButtonForPanning=!0;var k="curved=1;";e.cellRenderer.installCellOverlayListeners= function(a,b,c){mxCellRenderer.prototype.installCellOverlayListeners.apply(this,arguments);mxEvent.addListener(c.node,mxClient.IS_POINTER?"pointerdown":"mousedown",function(c){b.fireEvent(new mxEventObject("pointerdown","event",c,"state",a))});!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&mxEvent.addListener(c.node,"touchstart",function(c){b.fireEvent(new mxEventObject("pointerdown","event",c,"state",a))})};e.getAllConnectionConstraints=function(){return null};e.connectionHandler.marker.highlight.keepOnTop= !1;e.connectionHandler.createEdgeState=function(a){a=e.createEdge(null,null,null,null,null,k);return new mxCellState(this.graph.view,a,this.graph.getCellStyle(a))};var m=e.getDefaultParent(),n=mxUtils.bind(this,function(a){var b=new mxCellOverlay(this.connectImage,"Add outgoing");b.cursor="hand";b.addListener(mxEvent.CLICK,function(b,c){e.connectionHandler.reset();e.clearSelection();var f=e.getCellGeometry(a),d;l(function(){d=e.insertVertex(m,null,"Entry",f.x,f.y,80,30,"rounded=1;");n(d);e.view.refresh(d); -e.insertEdge(m,null,"",a,d,k)},function(){e.scrollCellToVisible(d)})});b.addListener("pointerdown",function(a,b){var c=b.getProperty("event"),f=b.getProperty("state");e.popupMenuHandler.hideMenu();e.stopEditing(!1);var d=mxUtils.convertPoint(e.container,mxEvent.getClientX(c),mxEvent.getClientY(c));e.connectionHandler.start(f,d.x,d.y);e.isMouseDown=!0;e.isMouseTrigger=mxEvent.isMouseEvent(c);mxEvent.consume(c)});e.addCellOverlay(a,b)});e.getModel().beginUpdate();var t;try{t=e.insertVertex(m,null,"Start", -0,0,80,30,"ellipse"),n(t)}finally{e.getModel().endUpdate()}var f;"horizontalTree"==b?(f=new mxCompactTreeLayout(e),f.edgeRouting=!1,f.levelDistance=30,k="edgeStyle=elbowEdgeStyle;elbow=horizontal;"):"verticalTree"==b?(f=new mxCompactTreeLayout(e,!1),f.edgeRouting=!1,f.levelDistance=30,k="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"radialTree"==b?(f=new mxRadialTreeLayout(e,!1),f.edgeRouting=!1,f.levelDistance=80):"verticalFlow"==b?f=new mxHierarchicalLayout(e,mxConstants.DIRECTION_NORTH):"horizontalFlow"== -b?f=new mxHierarchicalLayout(e,mxConstants.DIRECTION_WEST):"organic"==b?(f=new mxFastOrganicLayout(e,!1),f.forceConstant=80):"circle"==b&&(f=new mxCircleLayout(e));if(null!=f){var l=function(a,b){e.getModel().beginUpdate();try{null!=a&&a(),f.execute(e.getDefaultParent(),t)}catch(C){throw C;}finally{var c=new mxMorphing(e);c.addListener(mxEvent.DONE,mxUtils.bind(this,function(){e.getModel().endUpdate();null!=b&&b()}));c.startAnimation()}},p=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect= -function(a,b,c,f,d){p.apply(this,arguments);l()};e.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);l()};e.connectionHandler.addListener(mxEvent.CONNECT,function(){l()})}var u=mxUtils.button(mxResources.get("close"),function(){a.confirm(mxResources.get("areYouSure"),function(){null!=c.parentNode&&(e.destroy(),c.parentNode.removeChild(c));a.hideDialog()})});u.className="geBtn";a.editor.cancelFirst&&d.appendChild(u);var y=mxUtils.button(mxResources.get("insert"),function(){e.clearCellOverlays(); -var b=a.editor.graph.getFreeInsertPoint(),b=a.editor.graph.importCells(e.getModel().getChildren(e.getDefaultParent()),b.x,b.y),f=a.editor.graph.view,d=f.getBounds(b);d.x-=f.translate.x;d.y-=f.translate.y;a.editor.graph.scrollRectToVisible(d);a.editor.graph.setSelectionCells(b);null!=c.parentNode&&(e.destroy(),c.parentNode.removeChild(c));a.hideDialog()});d.appendChild(y);y.className="geBtn gePrimaryBtn";a.editor.cancelFirst||d.appendChild(u)};this.container=d}; +e.insertEdge(m,null,"",a,d,k)},function(){e.scrollCellToVisible(d)})});b.addListener("pointerdown",function(a,b){var c=b.getProperty("event"),f=b.getProperty("state");e.popupMenuHandler.hideMenu();e.stopEditing(!1);var d=mxUtils.convertPoint(e.container,mxEvent.getClientX(c),mxEvent.getClientY(c));e.connectionHandler.start(f,d.x,d.y);e.isMouseDown=!0;e.isMouseTrigger=mxEvent.isMouseEvent(c);mxEvent.consume(c)});e.addCellOverlay(a,b)});e.getModel().beginUpdate();var q;try{q=e.insertVertex(m,null,"Start", +0,0,80,30,"ellipse"),n(q)}finally{e.getModel().endUpdate()}var f;"horizontalTree"==b?(f=new mxCompactTreeLayout(e),f.edgeRouting=!1,f.levelDistance=30,k="edgeStyle=elbowEdgeStyle;elbow=horizontal;"):"verticalTree"==b?(f=new mxCompactTreeLayout(e,!1),f.edgeRouting=!1,f.levelDistance=30,k="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"radialTree"==b?(f=new mxRadialTreeLayout(e,!1),f.edgeRouting=!1,f.levelDistance=80):"verticalFlow"==b?f=new mxHierarchicalLayout(e,mxConstants.DIRECTION_NORTH):"horizontalFlow"== +b?f=new mxHierarchicalLayout(e,mxConstants.DIRECTION_WEST):"organic"==b?(f=new mxFastOrganicLayout(e,!1),f.forceConstant=80):"circle"==b&&(f=new mxCircleLayout(e));if(null!=f){var l=function(a,b){e.getModel().beginUpdate();try{null!=a&&a(),f.execute(e.getDefaultParent(),q)}catch(C){throw C;}finally{var c=new mxMorphing(e);c.addListener(mxEvent.DONE,mxUtils.bind(this,function(){e.getModel().endUpdate();null!=b&&b()}));c.startAnimation()}},p=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect= +function(a,b,c,f,d){p.apply(this,arguments);l()};e.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);l()};e.connectionHandler.addListener(mxEvent.CONNECT,function(){l()})}var u=mxUtils.button(mxResources.get("close"),function(){a.confirm(mxResources.get("areYouSure"),function(){null!=c.parentNode&&(e.destroy(),c.parentNode.removeChild(c));a.hideDialog()})});u.className="geBtn";a.editor.cancelFirst&&d.appendChild(u);var v=mxUtils.button(mxResources.get("insert"),function(){e.clearCellOverlays(); +var b=a.editor.graph.getFreeInsertPoint(),b=a.editor.graph.importCells(e.getModel().getChildren(e.getDefaultParent()),b.x,b.y),f=a.editor.graph.view,d=f.getBounds(b);d.x-=f.translate.x;d.y-=f.translate.y;a.editor.graph.scrollRectToVisible(d);a.editor.graph.setSelectionCells(b);null!=c.parentNode&&(e.destroy(),c.parentNode.removeChild(c));a.hideDialog()});d.appendChild(v);v.className="geBtn gePrimaryBtn";a.editor.cancelFirst||d.appendChild(u)};this.container=d}; CreateGraphDialog.prototype.connectImage=new mxImage(mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RjQ3OTk0QjMyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RjQ3OTk0QjQyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDoyRjA0N0I2MjJENzExMUU1OEZBOEY0NUEyM0EyMUMzOSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpGNDc5OTRCMjJENzIxMUU1OEZBOEY0NUEyM0EyMUMzOSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PjIf+MgAAATlSURBVHjanFZraFxFFD735u4ru3ls0yZG26ShgmJoKK1J2vhIYzBgRdtIURHyw1hQUH9IxIgI2h8iCEUF/1RRlNQYCsYfCTHVhiTtNolpZCEStqSC22xIsrs1bDfu7t37Gs/cO3Ozxs1DBw73zpk555vzmHNGgJ0NYatFgmNLYUHYUoHASMz5ijmgVLmxgfKCUiBxC4ACJAeSG8nb1dVVOTc3dyoSibwWDofPBIPBJzo7O8vpGtvjpDICGztxkciECpF2LS0tvZtOpwNkk5FKpcYXFxffwL1+JuPgllPj8nk1F6RoaGjoKCqZ5ApljZDZO4SMRA0SuG2QUJIQRV8HxMOM9vf3H0ZZH9Nhg20MMl2QkFwjIyNHWlpahtADnuUMwLcRHX5aNSBjCJYEsSSLUeLEbhGe3ytCmQtA1/XY+Pj46dbW1iDuyCJp9BC5ycBj4hoeHq5ra2sbw0Xn1ZgBZ+dVkA1Lc+6p0Ck2p0QS4Ox9EhwpEylYcmBg4LH29vYQLilIOt0u5FhDfevNZDI/u93uw6PLOrwTUtjxrbPYbhD42WgMrF8JmR894ICmCgnQjVe8Xu8pXEkzMJKbuo5oNPomBbm1ZsD7s2kwFA1JZ6QBUXWT1nmGNc/qoMgavDcrQzxjQGFh4aOYIJ0sFAXcEtui4uLiVjr5KpSBVFYDDZVrWUaKRRWSAYeK0fmKykgDXbVoNaPChRuyqdDv97czL5nXxQbq6empQmsaklkDBiNpSwFVrmr2P6UyicD5piI4f8wHh0oEm8/p4h8pyGiEWvVQd3e3nxtjAzU1NR2jP7NRBWQ8GbdEzzJAmc0V3RR4cI8Dvmwuhc8fKUFA0d6/ltHg5p+Kuaejo6OeY0jcNJ/PV00ZS0nFUoZRvvFS1bZFsKHCCQ2Pl8H0chY+C96B6ZUsrCQ1qKtwQVFRURW/QhIXMAzDPAZ6BgOr8tTa8dDxCmiYGApaJbJMxSzV+brE8pdgWkcpY5dbMF1AR9XH8/xu2ilef48bvn92n82ZwHh+8ssqTEXS9p7dHisiiURikd8PbpExNTU1UVNTA3V3Y7lC16n0gpB/NwpNcZjfa7dScC4Qh0kOQCwnlEgi3F/hMVl9fX0zvKrzSk2lfXjRhj0eT/2rvWG4+Pta3oJY7XfC3hInXAv/ldeFLx8shQ+eqQL0UAAz7ylkpej5eNZRVBWL6BU6ef14OYiY1oqyTtmsavr/5koaRucT1pzx+ZpL1+GV5nLutksUgIcmtwTRiuuVZXnU5XId7A2swJkfFsymRWC91hHg1Viw6x23+7vn9sPJ+j20BE1hCXqSWaNSQ8ScbknRZWxub1PGCw/fBV+c3AeijlUbY5bBjEqr9GuYZP4jP41WudGSC6erTRCqdGZm5i1WvXWeDHnbBCZGc2Nj4wBl/hZOwrmBBfgmlID1HmGJutHaF+tKoevp/XCgstDkjo2NtWKLuc6AVN4mNjY+s1XQxoenOoFuDPHGtnRbJj9ej5GvL0dI7+giuRyMk1giazc+DP6vgUDgOJVlOv7R+PJ12QIeL6SyeDz+Kfp8ZrNWjgDTsVjsQ7qXyTjztXJhm9ePxFLfMTg4eG9tbe1RTP9KFFYQfHliYmIS69kCC7jKYmKwxxD5P88tkVkqbPPcIps9t4T/+HjcuJ/s5BFJgf4WYABCtxGuxIZ90gAAAABJRU5ErkJggg==": IMAGE_PATH+"/handle-connect.png",26,26); var BackgroundImageDialog=function(a,c){var b=document.createElement("div");b.style.whiteSpace="nowrap";var d=document.createElement("h2");mxUtils.write(d,mxResources.get("backgroundImage"));d.style.marginTop="0px";b.appendChild(d);mxUtils.write(b,mxResources.get("image")+" "+mxResources.get("url")+":");mxUtils.br(b);var d=a.editor.graph.backgroundImage,g=document.createElement("input");g.setAttribute("type","text");g.style.marginTop="4px";g.style.marginBottom="4px";g.style.width="350px";g.value= @@ -8071,71 +8085,71 @@ null!=d?d.src:"";var e=!1,k=function(){e||""==g.value||a.isOffline()?(m.value="" f&&(f.parentNode.removeChild(f),f=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(b){null==f&&(!mxClient.IS_IE||10<document.documentMode)&&(f=a.highlightElement(c));b.stopPropagation();b.preventDefault()}));mxEvent.addListener(c,"drop",mxUtils.bind(this,function(b){null!=f&&(f.parentNode.removeChild(f),f=null);if(0<b.dataTransfer.files.length)a.importFiles(b.dataTransfer.files,0,0,a.maxBackgroundSize,function(a,b,c,f,d,l){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);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)}};b.appendChild(g);mxUtils.br(b);mxUtils.br(b);mxUtils.write(b,mxResources.get("width")+":");var m=document.createElement("input"); m.setAttribute("type","text");m.style.width="60px";m.style.marginLeft="4px";m.style.marginRight="16px";m.value=null!=d?d.width:"";b.appendChild(m);mxUtils.write(b,mxResources.get("height")+":");var n=document.createElement("input");n.setAttribute("type","text");n.style.width="60px";n.style.marginLeft="4px";n.style.marginRight="16px";n.value=null!=d?d.height:"";b.appendChild(n);d=mxUtils.button(mxResources.get("reset"),function(){g.value="";m.value="";n.value="";e=!1});mxEvent.addListener(d,"mousedown", -function(){e=!0});mxEvent.addListener(d,"touchstart",function(){e=!0});d.className="geBtn";d.width="100";b.appendChild(d);mxUtils.br(b);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()};d=document.createElement("div");d.style.marginTop="40px";d.style.textAlign="right";var t=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()}); -t.className="geBtn";a.editor.cancelFirst&&d.appendChild(t);if(!a.isOffline()&&"undefined"!=typeof google&&"undefined"!=typeof google.picker&&window.self===window.top){var f=mxUtils.button(mxResources.get("search"),function(){if(null==a.imageSearchPicker){var b=(new google.picker.PickerBuilder).setLocale(mxLanguage).addView(google.picker.ViewId.IMAGE_SEARCH).enableFeature(google.picker.Feature.NAV_HIDDEN);a.imageSearchPicker=b.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.imageSearchPicker.setVisible(!0)}); +function(){e=!0});mxEvent.addListener(d,"touchstart",function(){e=!0});d.className="geBtn";d.width="100";b.appendChild(d);mxUtils.br(b);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()};d=document.createElement("div");d.style.marginTop="40px";d.style.textAlign="right";var q=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()}); +q.className="geBtn";a.editor.cancelFirst&&d.appendChild(q);if(!a.isOffline()&&"undefined"!=typeof google&&"undefined"!=typeof google.picker&&window.self===window.top){var f=mxUtils.button(mxResources.get("search"),function(){if(null==a.imageSearchPicker){var b=(new google.picker.PickerBuilder).setLocale(mxLanguage).addView(google.picker.ViewId.IMAGE_SEARCH).enableFeature(google.picker.Feature.NAV_HIDDEN);a.imageSearchPicker=b.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.imageSearchPicker.setVisible(!0)}); f.className="geBtn";d.appendChild(f);null!=a.drive&&"1"==urlParams.photos&&(f=mxUtils.button(mxResources.get("googlePlus"),function(){a.spinner.spin(document.body,mxResources.get("authorizing"))&&a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();if(null==a.photoPicker){var b=gapi.auth.getToken().access_token,b=(new google.picker.PickerBuilder).setAppId(a.drive.appId).setLocale(mxLanguage).setOAuthToken(b).addView(google.picker.ViewId.PHOTO_UPLOAD);a.photoPicker=b.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.photoPicker.setVisible(!0)}))}), -f.className="geBtn",d.appendChild(f))}f=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();c(""!=g.value?new mxImage(mxUtils.trim(g.value),m.value,n.value):null)});f.className="geBtn gePrimaryBtn";d.appendChild(f);a.editor.cancelFirst||d.appendChild(t);b.appendChild(d);this.container=b},ParseDialog=function(a,c,b){function d(b,c){var f=b.split("\n");if("plantUmlPng"==c||"plantUmlSvg"==c||"plantUmlTxt"==c){var f="plantUmlTxt"==c?PLANT_URL+"/txt/":"plantUmlPng"==c?PLANT_URL+"/png/":PLANT_URL+ -"/svg/",d=a.editor.graph;if(a.spinner.spin(document.body,mxResources.get("inserting"))){var l=function(a){if(10>a)return String.fromCharCode(48+a);a-=10;if(26>a)return String.fromCharCode(65+a);a-=26;if(26>a)return String.fromCharCode(97+a);a-=26;return 0==a?"-":1==a?"_":"?"},p=function(a,b,c){c1=a>>2;c2=(a&3)<<4|b>>4;c3=(b&15)<<2|c>>6;c4=c&63;r="";r+=l(c1&63);r+=l(c2&63);r+=l(c3&63);return r+=l(c4&63)},g=new XMLHttpRequest;g.open("GET",f+function(a){r="";for(x=0;x<a.length;x+=3)r=x+2==a.length?r+ -p(a.charCodeAt(x),a.charCodeAt(x+1),0):x+1==a.length?r+p(a.charCodeAt(x),0,0):r+p(a.charCodeAt(x),a.charCodeAt(x+1),a.charCodeAt(x+2));return r}(Graph.bytesToString(pako.deflateRaw(unescape(encodeURIComponent(b))))),!0);"plantUmlTxt"!=c&&(g.responseType="blob");g.onload=function(f){if(200<=this.status&&300>this.status)if("plantUmlTxt"==c)a.spinner.stop(),d.setSelectionCell(a.insertAsPreText(this.response,e.x,e.y)),d.scrollCellToVisible(d.getSelectionCell());else{var l=new FileReader;l.readAsDataURL(this.response); -l.onloadend=function(c){var f=new Image;f.onload=function(){a.spinner.stop();var c=f.width,p=f.height;if(0==c&&0==p){var g=l.result,x=g.indexOf(","),g=decodeURIComponent(escape(atob(g.substring(x+1)))),g=mxUtils.parseXml(g).getElementsByTagName("svg");0<g.length&&(c=parseFloat(g[0].getAttribute("width")),p=parseFloat(g[0].getAttribute("height")))}d.getModel().beginUpdate();try{cell=d.insertVertex(null,null,b,e.x,e.y,c,p,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a.convertDataUri(l.result)+ -";")}finally{d.getModel().endUpdate()}d.setSelectionCell(cell);d.scrollCellToVisible(d.getSelectionCell())};f.src=l.result};l.onerror=function(b){a.handleError(b)}}else a.spinner.stop(),a.handleError(f)};g.onerror=function(b){a.handleError(b)};g.send()}}else if("table"==c){for(var v=null,k=[],u=0,x=0;x<f.length;x++)if(g=mxUtils.trim(f[x]),"create table"==g.substring(0,12).toLowerCase())g=mxUtils.trim(g.substring(12)),"("==g.charAt(g.length-1)&&(g=g.substring(0,g.lastIndexOf(" "))),v=new mxCell(g, -new mxGeometry(u,0,160,26),"swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=26;fillColor=#e0e0e0;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;marginBottom=0;swimlaneFillColor=#ffffff;align=center;"),v.vertex=!0,k.push(v),g=a.editor.graph.getPreferredSizeForCell(n),null!=g&&(v.geometry.width=g.width+10);else if(null!=v&&")"==g.charAt(0))u+=v.geometry.width+40,v=null;else if("("!=g&&null!=v&&(g=g.substring(0,","==g.charAt(g.length-1)?g.length-1:g.length),"primary key"!= +f.className="geBtn",d.appendChild(f))}f=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();c(""!=g.value?new mxImage(mxUtils.trim(g.value),m.value,n.value):null)});f.className="geBtn gePrimaryBtn";d.appendChild(f);a.editor.cancelFirst||d.appendChild(q);b.appendChild(d);this.container=b},ParseDialog=function(a,c,b){function d(b,c){var f=b.split("\n");if("plantUmlPng"==c||"plantUmlSvg"==c||"plantUmlTxt"==c){var f="plantUmlTxt"==c?PLANT_URL+"/txt/":"plantUmlPng"==c?PLANT_URL+"/png/":PLANT_URL+ +"/svg/",d=a.editor.graph;if(a.spinner.spin(document.body,mxResources.get("inserting"))){var l=function(a){if(10>a)return String.fromCharCode(48+a);a-=10;if(26>a)return String.fromCharCode(65+a);a-=26;if(26>a)return String.fromCharCode(97+a);a-=26;return 0==a?"-":1==a?"_":"?"},p=function(a,b,c){c1=a>>2;c2=(a&3)<<4|b>>4;c3=(b&15)<<2|c>>6;c4=c&63;r="";r+=l(c1&63);r+=l(c2&63);r+=l(c3&63);return r+=l(c4&63)},g=new XMLHttpRequest;g.open("GET",f+function(a){r="";for(A=0;A<a.length;A+=3)r=A+2==a.length?r+ +p(a.charCodeAt(A),a.charCodeAt(A+1),0):A+1==a.length?r+p(a.charCodeAt(A),0,0):r+p(a.charCodeAt(A),a.charCodeAt(A+1),a.charCodeAt(A+2));return r}(Graph.bytesToString(pako.deflateRaw(unescape(encodeURIComponent(b))))),!0);"plantUmlTxt"!=c&&(g.responseType="blob");g.onload=function(f){if(200<=this.status&&300>this.status)if("plantUmlTxt"==c)a.spinner.stop(),d.setSelectionCell(a.insertAsPreText(this.response,e.x,e.y)),d.scrollCellToVisible(d.getSelectionCell());else{var l=new FileReader;l.readAsDataURL(this.response); +l.onloadend=function(c){var f=new Image;f.onload=function(){a.spinner.stop();var c=f.width,p=f.height;if(0==c&&0==p){var g=l.result,t=g.indexOf(","),g=decodeURIComponent(escape(atob(g.substring(t+1)))),g=mxUtils.parseXml(g).getElementsByTagName("svg");0<g.length&&(c=parseFloat(g[0].getAttribute("width")),p=parseFloat(g[0].getAttribute("height")))}d.getModel().beginUpdate();try{cell=d.insertVertex(null,null,b,e.x,e.y,c,p,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a.convertDataUri(l.result)+ +";")}finally{d.getModel().endUpdate()}d.setSelectionCell(cell);d.scrollCellToVisible(d.getSelectionCell())};f.src=l.result};l.onerror=function(b){a.handleError(b)}}else a.spinner.stop(),a.handleError(f)};g.onerror=function(b){a.handleError(b)};g.send()}}else if("table"==c){for(var k=null,x=[],u=0,A=0;A<f.length;A++)if(g=mxUtils.trim(f[A]),"create table"==g.substring(0,12).toLowerCase())g=mxUtils.trim(g.substring(12)),"("==g.charAt(g.length-1)&&(g=g.substring(0,g.lastIndexOf(" "))),k=new mxCell(g, +new mxGeometry(u,0,160,26),"swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=26;fillColor=#e0e0e0;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;marginBottom=0;swimlaneFillColor=#ffffff;align=center;"),k.vertex=!0,x.push(k),g=a.editor.graph.getPreferredSizeForCell(n),null!=g&&(k.geometry.width=g.width+10);else if(null!=k&&")"==g.charAt(0))u+=k.geometry.width+40,k=null;else if("("!=g&&null!=k&&(g=g.substring(0,","==g.charAt(g.length-1)?g.length-1:g.length),"primary key"!= g.substring(0,11).toLowerCase())){var m=g.toLowerCase().indexOf("primary key"),g=g.replace(/primary key/i,""),n=new mxCell(g,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;");n.vertex=!0;g=sb.cloneCell(n,0<m?"PK":"");g.connectable=!1;g.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;"; -g.geometry.width=30;g.geometry.height=26;n.insert(g);g=a.editor.graph.getPreferredSizeForCell(n);null!=g&&v.geometry.width<g.width+10&&(v.geometry.width=Math.min(220,g.width+10));v.insert(n);v.geometry.height+=26}0<k.length&&(d=a.editor.graph,f=d.view,g=d.getGraphBounds(),d.setSelectionCells(d.importCells(k,Math.ceil(Math.max(0,g.x/f.scale-f.translate.x)+4*d.gridSize),Math.ceil(Math.max(0,(g.y+g.height)/f.scale-f.translate.y)+4*d.gridSize))),d.scrollCellToVisible(d.getSelectionCell()))}else if("list"== -c){if(0<f.length){d=a.editor.graph;n=null;k=[];for(x=v=0;x<f.length;x++)";"!=f[x].charAt(0)&&(0==f[x].length?n=null:null==n?(n=new mxCell(f[x],new mxGeometry(v,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;marginBottom=0;swimlaneFillColor=#ffffff;"),n.vertex=!0,k.push(n),g=d.getPreferredSizeForCell(n),null!=g&&n.geometry.width<g.width+10&&(n.geometry.width=g.width+10),v+=n.geometry.width+40):"--"==f[x]? -(g=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;"),g.vertex=!0,n.geometry.height+=g.geometry.height,n.insert(g)):0<f[x].length&&(u=new mxCell(f[x],new mxGeometry(0,0,60,26),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"), -u.vertex=!0,g=d.getPreferredSizeForCell(u),null!=g&&u.geometry.width<g.width&&(u.geometry.width=g.width),n.geometry.width=Math.max(n.geometry.width,u.geometry.width),n.geometry.height+=u.geometry.height,n.insert(u)));if(0<k.length){d.getModel().beginUpdate();try{k=d.importCells(k,e.x,e.y);g=[];for(x=0;x<k.length;x++)g.push(k[x]),g=g.concat(k[x].children);d.fireEvent(new mxEventObject("cellsInserted","cells",g))}finally{d.getModel().endUpdate()}d.setSelectionCells(k);d.scrollCellToVisible(d.getSelectionCell())}}}else{for(var n= -function(a){var b=t[a];null==b&&(b=new mxCell(a,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),b.vertex=!0,t[a]=b,k.push(b));return b},t={},k=[],x=0;x<f.length;x++)if(";"!=f[x].charAt(0)){var I=f[x].split("->");if(2<=I.length){var m=n(I[0]),G=n(I[I.length-1]),I=new mxCell(2<I.length?I[1]:"",new mxGeometry);I.edge=!0;m.insertEdge(I,!0);G.insertEdge(I,!1);k.push(I)}}if(0<k.length){f=document.createElement("div");f.style.visibility="hidden";document.body.appendChild(f);d=new Graph(f);d.getModel().beginUpdate(); -try{k=d.importCells(k);for(x=0;x<k.length;x++)d.getModel().isVertex(k[x])&&(g=d.getPreferredSizeForCell(k[x]),k[x].geometry.width=Math.max(k[x].geometry.width,g.width),k[x].geometry.height=Math.max(k[x].geometry.height,g.height));v=new mxFastOrganicLayout(d);v.disableEdgeStyle=!1;v.forceConstant=120;v.execute(d.getDefaultParent());u=new mxParallelEdgeLayout(d);u.spacing=20;u.execute(d.getDefaultParent())}finally{d.getModel().endUpdate()}d.clearCellOverlays();g=[];a.editor.graph.getModel().beginUpdate(); +g.geometry.width=30;g.geometry.height=26;n.insert(g);g=a.editor.graph.getPreferredSizeForCell(n);null!=g&&k.geometry.width<g.width+10&&(k.geometry.width=Math.min(220,g.width+10));k.insert(n);k.geometry.height+=26}0<x.length&&(d=a.editor.graph,f=d.view,g=d.getGraphBounds(),d.setSelectionCells(d.importCells(x,Math.ceil(Math.max(0,g.x/f.scale-f.translate.x)+4*d.gridSize),Math.ceil(Math.max(0,(g.y+g.height)/f.scale-f.translate.y)+4*d.gridSize))),d.scrollCellToVisible(d.getSelectionCell()))}else if("list"== +c){if(0<f.length){d=a.editor.graph;n=null;x=[];for(A=k=0;A<f.length;A++)";"!=f[A].charAt(0)&&(0==f[A].length?n=null:null==n?(n=new mxCell(f[A],new mxGeometry(k,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;marginBottom=0;swimlaneFillColor=#ffffff;"),n.vertex=!0,x.push(n),g=d.getPreferredSizeForCell(n),null!=g&&n.geometry.width<g.width+10&&(n.geometry.width=g.width+10),k+=n.geometry.width+40):"--"==f[A]? +(g=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;"),g.vertex=!0,n.geometry.height+=g.geometry.height,n.insert(g)):0<f[A].length&&(u=new mxCell(f[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;"), +u.vertex=!0,g=d.getPreferredSizeForCell(u),null!=g&&u.geometry.width<g.width&&(u.geometry.width=g.width),n.geometry.width=Math.max(n.geometry.width,u.geometry.width),n.geometry.height+=u.geometry.height,n.insert(u)));if(0<x.length){d.getModel().beginUpdate();try{x=d.importCells(x,e.x,e.y);g=[];for(A=0;A<x.length;A++)g.push(x[A]),g=g.concat(x[A].children);d.fireEvent(new mxEventObject("cellsInserted","cells",g))}finally{d.getModel().endUpdate()}d.setSelectionCells(x);d.scrollCellToVisible(d.getSelectionCell())}}}else{for(var n= +function(a){var b=q[a];null==b&&(b=new mxCell(a,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),b.vertex=!0,q[a]=b,x.push(b));return b},q={},x=[],A=0;A<f.length;A++)if(";"!=f[A].charAt(0)){var G=f[A].split("->");if(2<=G.length){var m=n(G[0]),J=n(G[G.length-1]),G=new mxCell(2<G.length?G[1]:"",new mxGeometry);G.edge=!0;m.insertEdge(G,!0);J.insertEdge(G,!1);x.push(G)}}if(0<x.length){f=document.createElement("div");f.style.visibility="hidden";document.body.appendChild(f);d=new Graph(f);d.getModel().beginUpdate(); +try{x=d.importCells(x);for(A=0;A<x.length;A++)d.getModel().isVertex(x[A])&&(g=d.getPreferredSizeForCell(x[A]),x[A].geometry.width=Math.max(x[A].geometry.width,g.width),x[A].geometry.height=Math.max(x[A].geometry.height,g.height));k=new mxFastOrganicLayout(d);k.disableEdgeStyle=!1;k.forceConstant=120;k.execute(d.getDefaultParent());u=new mxParallelEdgeLayout(d);u.spacing=20;u.execute(d.getDefaultParent())}finally{d.getModel().endUpdate()}d.clearCellOverlays();g=[];a.editor.graph.getModel().beginUpdate(); try{g=a.editor.graph.importCells(d.getModel().getChildren(d.getDefaultParent()),e.x,e.y),a.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",g))}finally{a.editor.graph.getModel().endUpdate()}a.editor.graph.setSelectionCells(g);a.editor.graph.scrollCellToVisible(a.editor.graph.getSelectionCell());d.destroy();f.parentNode.removeChild(f)}}}function g(){return"list"==m.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": "table"==m.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"==m.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"==m.value||"plantUmlTxt"==m.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 e=a.editor.graph.getFreeInsertPoint();c=document.createElement("div");c.style.textAlign="right";var k=document.createElement("textarea");k.style.resize="none";k.style.width="100%";k.style.height= "354px";k.style.marginBottom="16px";var m=document.createElement("select");"formatSql"==b&&(m.style.display="none");var n=document.createElement("option");n.setAttribute("value","list");mxUtils.write(n,mxResources.get("list"));"plantUml"!=b&&m.appendChild(n);null!=b&&"fromText"!=b||n.setAttribute("selected","selected");n=document.createElement("option");n.setAttribute("value","table");mxUtils.write(n,mxResources.get("formatSql"));"formatSql"==b&&(m.appendChild(n),n.setAttribute("selected","selected")); -n=document.createElement("option");n.setAttribute("value","diagram");mxUtils.write(n,mxResources.get("diagram"));"plantUml"!=b&&m.appendChild(n);n=document.createElement("option");n.setAttribute("value","plantUmlSvg");mxUtils.write(n,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");"plantUml"==b&&n.setAttribute("selected","selected");var t=document.createElement("option");t.setAttribute("value","plantUmlPng");mxUtils.write(t,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+ -")");var f=document.createElement("option");f.setAttribute("value","plantUmlTxt");mxUtils.write(f,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!a.isOffline()&&"plantUml"==b&&(m.appendChild(n),m.appendChild(t),m.appendChild(f));var l=g();k.value=l;c.appendChild(k);this.init=function(){k.focus()};Graph.fileSupport&&(k.addEventListener("dragover",function(a){a.stopPropagation();a.preventDefault()},!1),k.addEventListener("drop",function(a){a.stopPropagation(); +n=document.createElement("option");n.setAttribute("value","diagram");mxUtils.write(n,mxResources.get("diagram"));"plantUml"!=b&&m.appendChild(n);n=document.createElement("option");n.setAttribute("value","plantUmlSvg");mxUtils.write(n,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");"plantUml"==b&&n.setAttribute("selected","selected");var q=document.createElement("option");q.setAttribute("value","plantUmlPng");mxUtils.write(q,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+ +")");var f=document.createElement("option");f.setAttribute("value","plantUmlTxt");mxUtils.write(f,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!a.isOffline()&&"plantUml"==b&&(m.appendChild(n),m.appendChild(q),m.appendChild(f));var l=g();k.value=l;c.appendChild(k);this.init=function(){k.focus()};Graph.fileSupport&&(k.addEventListener("dragover",function(a){a.stopPropagation();a.preventDefault()},!1),k.addEventListener("drop",function(a){a.stopPropagation(); a.preventDefault();if(0<a.dataTransfer.files.length){a=a.dataTransfer.files[0];var b=new FileReader;b.onload=function(a){k.value=a.target.result};b.readAsText(a)}},!1));c.appendChild(m);mxEvent.addListener(m,"change",function(){var a=g();if(0==k.value.length||k.value==l)l=a,k.value=l});b=mxUtils.button(mxResources.get("close"),function(){k.value==l?a.hideDialog():a.confirm(mxResources.get("areYouSure"),function(){a.hideDialog()})});b.className="geBtn";a.editor.cancelFirst&&c.appendChild(b);n=mxUtils.button(mxResources.get("insert"), -function(){a.hideDialog();d(k.value,m.value)});c.appendChild(n);n.className="geBtn gePrimaryBtn";a.editor.cancelFirst||c.appendChild(b);this.container=c},NewDialog=function(a,c,b,d,g,e,k,m,n,t,f,l,p,u,y,q,A){function z(){var a=!0;if(null!=U)for(;I<U.length&&(a||0!=mxUtils.mod(I,30));)a=U[I++],B(a.url,a.libs,a.title,a.tooltip?a.tooltip:a.title,a.select,a.imgUrl,a.info,a.onClick,a.preview,a.noImg,a.clibs),a=!1}function C(){if(V)b||a.hideDialog(),u(V,ba,F.value);else if(d)b||a.hideDialog(),d(fa,F.value); -else{var c=F.value;null!=c&&0<c.length&&a.pickFolder(a.mode,function(b){a.createFile(c,fa,null!=Z&&0<Z.length?Z:null,null,function(){a.hideDialog()},null,b,null,null!=ha&&0<ha.length?ha:null)},a.mode!=App.MODE_GOOGLE||null==a.stateArg||null==a.stateArg.folderId)}}function v(a,b,c,f,d,l){null!=da&&(da.style.backgroundColor="transparent",da.style.border="1px solid transparent");E.removeAttribute("disabled");fa=b;Z=c;ha=l;da=a;V=f;ba=d;da.style.backgroundColor=m;da.style.border=n}function B(b,c,f,d, -l,p,e,g,x,k,q){var u=document.createElement("div");u.className="geTemplate";u.style.height=Y+"px";u.style.width=ea+"px";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){v(u,null,null,b,e,q)}),mxEvent.addListener(u,"dblclick",function(a){C()});else if(!k&&null!=b&&0<b.length){f=x||TEMPLATE_PATH+"/"+b.substring(0, -b.length-4)+".png";u.style.backgroundImage="url("+f+")";u.style.backgroundPosition="center center";u.style.backgroundRepeat="no-repeat";var B=!1;mxEvent.addListener(u,"click",function(f){E.setAttribute("disabled","disabled");u.style.backgroundColor="transparent";u.style.border="1px solid transparent";f=b;f=/^https?:\/\//.test(f)&&!a.editor.isCorsEnabledForUrl(f)?PROXY_URL+"?url="+encodeURIComponent(f):TEMPLATE_PATH+"/"+f;G.spin(Q);mxUtils.get(f,mxUtils.bind(this,function(a){G.stop();200<=a.getStatus()&& -299>=a.getStatus()&&(v(u,a.getText(),c,null,null,q),B&&C())}))});mxEvent.addListener(u,"dblclick",function(a){B=!0})}else u.innerHTML='<table width="100%" height="100%" style="line-height:1em;word-break: break-all;"><tr><td align="center" valign="middle">'+mxResources.get(f,null,f)+"</td></tr></table>",l&&v(u),null!=g?mxEvent.addListener(u,"click",g):(mxEvent.addListener(u,"click",function(a){v(u,null,null,b,e)}),mxEvent.addListener(u,"dblclick",function(a){C()}));Q.appendChild(u)}function D(){S&& -(S=!1,mxEvent.addListener(Q,"scroll",function(a){Q.scrollTop+Q.clientHeight>=Q.scrollHeight&&(z(),mxEvent.consume(a))}));var a=null;if(0<ca){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"));aa.appendChild(b);for(var c in M){var f=document.createElement("div"),b=c,d=M[c];18<b.length&&(b=b.substring(0,18)+"…");f.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;"; -f.setAttribute("title",b+" ("+d.length+")");mxUtils.write(f,f.getAttribute("title"));null!=t&&(f.style.padding=t);aa.appendChild(f);(function(b,c){mxEvent.addListener(f,"click",function(){a!=c&&(a.style.backgroundColor="",a=c,a.style.backgroundColor=k,Q.scrollTop=0,Q.innerHTML="",I=0,U=M[b],N=null,z())})})(c,f)}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");aa.appendChild(b)}for(c in P)f=document.createElement("div"), -b=mxResources.get(c),d=P[c],null==b&&(b=c.substring(0,1).toUpperCase()+c.substring(1)),18<b.length&&(b=b.substring(0,18)+"…"),f.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;",f.setAttribute("title",b+" ("+d.length+")"),mxUtils.write(f,f.getAttribute("title")),null!=t&&(f.style.padding=t),aa.appendChild(f),null==a&&0<d.length&&(a=f,a.style.backgroundColor=k,U=d),function(b,c){mxEvent.addListener(f,"click", -function(){a!=c&&(a.style.backgroundColor="",a=c,a.style.backgroundColor=k,Q.scrollTop=0,Q.innerHTML="",I=0,U=P[b],N=null,z())})}(c,f);z()}b=null!=b?b:!0;g=null!=g?g:!1;k=null!=k?k:"#ebf2f9";m=null!=m?m:"#e6eff8";n=null!=n?n:"1px solid #ccd9ea";f=null!=f?f:EditorUi.templateFile;var x=document.createElement("div");x.style.height="100%";var J=document.createElement("div");J.style.whiteSpace="nowrap";J.style.height="46px";b&&x.appendChild(J);var H=document.createElement("img");H.setAttribute("border", +function(){a.hideDialog();d(k.value,m.value)});c.appendChild(n);n.className="geBtn gePrimaryBtn";a.editor.cancelFirst||c.appendChild(b);this.container=c},NewDialog=function(a,c,b,d,g,e,k,m,n,q,f,l,p,u,v,t,z){function y(){var a=!0;if(null!=U)for(;G<U.length&&(a||0!=mxUtils.mod(G,30));)a=U[G++],x(a.url,a.libs,a.title,a.tooltip?a.tooltip:a.title,a.select,a.imgUrl,a.info,a.onClick,a.preview,a.noImg,a.clibs),a=!1}function C(){if(V)b||a.hideDialog(),u(V,ba,F.value);else if(d)b||a.hideDialog(),d(fa,F.value); +else{var c=F.value;null!=c&&0<c.length&&a.pickFolder(a.mode,function(b){a.createFile(c,fa,null!=Z&&0<Z.length?Z:null,null,function(){a.hideDialog()},null,b,null,null!=ha&&0<ha.length?ha:null)},a.mode!=App.MODE_GOOGLE||null==a.stateArg||null==a.stateArg.folderId)}}function B(a,b,c,f,d,l){null!=da&&(da.style.backgroundColor="transparent",da.style.border="1px solid transparent");E.removeAttribute("disabled");fa=b;Z=c;ha=l;da=a;V=f;ba=d;da.style.backgroundColor=m;da.style.border=n}function x(b,c,f,d, +l,p,e,g,t,A,k){var x=document.createElement("div");x.className="geTemplate";x.style.height=Y+"px";x.style.width=ea+"px";null!=d&&0<d.length&&x.setAttribute("title",d);if(null!=p)x.style.backgroundImage="url("+p+")",x.style.backgroundSize="contain",x.style.backgroundPosition="center center",x.style.backgroundRepeat="no-repeat",mxEvent.addListener(x,"click",function(a){B(x,null,null,b,e,k)}),mxEvent.addListener(x,"dblclick",function(a){C()});else if(!A&&null!=b&&0<b.length){f=t||TEMPLATE_PATH+"/"+b.substring(0, +b.length-4)+".png";x.style.backgroundImage="url("+f+")";x.style.backgroundPosition="center center";x.style.backgroundRepeat="no-repeat";var u=!1;mxEvent.addListener(x,"click",function(f){E.setAttribute("disabled","disabled");x.style.backgroundColor="transparent";x.style.border="1px solid transparent";f=b;f=/^https?:\/\//.test(f)&&!a.editor.isCorsEnabledForUrl(f)?PROXY_URL+"?url="+encodeURIComponent(f):TEMPLATE_PATH+"/"+f;J.spin(Q);mxUtils.get(f,mxUtils.bind(this,function(a){J.stop();200<=a.getStatus()&& +299>=a.getStatus()&&(B(x,a.getText(),c,null,null,k),u&&C())}))});mxEvent.addListener(x,"dblclick",function(a){u=!0})}else x.innerHTML='<table width="100%" height="100%" style="line-height:1em;word-break: break-all;"><tr><td align="center" valign="middle">'+mxResources.get(f,null,f)+"</td></tr></table>",l&&B(x),null!=g?mxEvent.addListener(x,"click",g):(mxEvent.addListener(x,"click",function(a){B(x,null,null,b,e)}),mxEvent.addListener(x,"dblclick",function(a){C()}));Q.appendChild(x)}function D(){S&& +(S=!1,mxEvent.addListener(Q,"scroll",function(a){Q.scrollTop+Q.clientHeight>=Q.scrollHeight&&(y(),mxEvent.consume(a))}));var a=null;if(0<ca){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"));aa.appendChild(b);for(var c in N){var f=document.createElement("div"),b=c,d=N[c];18<b.length&&(b=b.substring(0,18)+"…");f.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;"; +f.setAttribute("title",b+" ("+d.length+")");mxUtils.write(f,f.getAttribute("title"));null!=q&&(f.style.padding=q);aa.appendChild(f);(function(b,c){mxEvent.addListener(f,"click",function(){a!=c&&(a.style.backgroundColor="",a=c,a.style.backgroundColor=k,Q.scrollTop=0,Q.innerHTML="",G=0,U=N[b],K=null,y())})})(c,f)}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");aa.appendChild(b)}for(c in P)f=document.createElement("div"), +b=mxResources.get(c),d=P[c],null==b&&(b=c.substring(0,1).toUpperCase()+c.substring(1)),18<b.length&&(b=b.substring(0,18)+"…"),f.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;",f.setAttribute("title",b+" ("+d.length+")"),mxUtils.write(f,f.getAttribute("title")),null!=q&&(f.style.padding=q),aa.appendChild(f),null==a&&0<d.length&&(a=f,a.style.backgroundColor=k,U=d),function(b,c){mxEvent.addListener(f,"click", +function(){a!=c&&(a.style.backgroundColor="",a=c,a.style.backgroundColor=k,Q.scrollTop=0,Q.innerHTML="",G=0,U=P[b],K=null,y())})}(c,f);y()}b=null!=b?b:!0;g=null!=g?g:!1;k=null!=k?k:"#ebf2f9";m=null!=m?m:"#e6eff8";n=null!=n?n:"1px solid #ccd9ea";f=null!=f?f:EditorUi.templateFile;var A=document.createElement("div");A.style.height="100%";var I=document.createElement("div");I.style.whiteSpace="nowrap";I.style.height="46px";b&&A.appendChild(I);var H=document.createElement("img");H.setAttribute("border", "0");H.setAttribute("align","absmiddle");H.style.width="40px";H.style.height="40px";H.style.marginRight="10px";H.style.paddingBottom="4px";H.src=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";!c&&b&&J.appendChild(H);b&&mxUtils.write(J,(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 F=document.createElement("input");F.setAttribute("value",a.defaultFilename+H);F.style.marginLeft="10px";F.style.width=c?"220px":"430px";this.init=function(){b&&(F.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?F.select():document.execCommand("selectAll",!1,null))};b&&(J.appendChild(F),null!=a.editor.fileExtensions&&(H=FilenameDialog.createTypeHint(a, -F,a.editor.fileExtensions),H.style.marginTop="12px",J.appendChild(H)));var J=!1,I=0,G=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(q||mxResources.get("create"),function(){E.setAttribute("disabled","disabled");C();E.removeAttribute("disabled")});E.className="geBtn gePrimaryBtn";if(l||p){var K=[],N=null,R=null,X=null,T=function(a){E.setAttribute("disabled","disabled");for(var b=0;b<K.length;b++)K[b].className= -b==a?"geBtn gePrimaryBtn":"geBtn"},J=!0;q=document.createElement("div");q.style.whiteSpace="nowrap";q.style.height="30px";x.appendChild(q);H=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){aa.style.display="";Q.style.left="160px";T(0);Q.scrollTop=0;Q.innerHTML="";I=0;N!=U&&(U=N,P=R,ca=X,aa.innerHTML="",D(),N=null)});K.push(H);q.appendChild(H);var L=function(a){aa.style.display="none";Q.style.left="30px";T(a?-1:1);null==N&&(N=U);Q.scrollTop=0;Q.innerHTML="";G.spin(Q);var b= -function(a,b,c){I=0;G.stop();U=a;c=c||{};var f=0,d;for(d in c)f+=c[d].length;if(b)Q.innerHTML=b;else if(0==a.length&&0==f)Q.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams",null,"No Diagrams Found"));else if(Q.innerHTML="",0<f){aa.style.display="";Q.style.left="160px";aa.innerHTML="";ca=0;P={"draw.io":a};for(d in c)P[d]=c[d];D()}else z()};a?p(W.value,b):l(b)};l&&(H=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){L()}),q.appendChild(H),K.push(H));if(p){H=document.createElement("span"); -H.style.marginLeft="10px";H.innerHTML=mxUtils.htmlEntities(mxResources.get("search")+":");q.appendChild(H);var W=document.createElement("input");W.style.marginRight="10px";W.style.marginLeft="10px";W.style.width="220px";mxEvent.addListener(W,"keypress",function(a){13==a.keyCode&&L(!0)});q.appendChild(W);H=mxUtils.button(mxResources.get("search"),function(){L(!0)});H.className="geBtn";q.appendChild(H)}T(0)}var Z=null,ha=null,fa=null,da=null,V=null,ba=null,Q=document.createElement("div");Q.style.border= -"1px solid #d3d3d3";Q.style.position="absolute";Q.style.left="160px";Q.style.right="34px";J=(b?72:40)+(J?30:0);Q.style.top=J+"px";Q.style.bottom="68px";Q.style.margin="6px 0 0 -1px";Q.style.padding="6px";Q.style.overflow="auto";var aa=document.createElement("div");aa.style.cssText="position:absolute;left:30px;width:128px;top:"+J+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";var Y=140,ea=140,P={},M={},ca=0,S=!0;P.basic=[{title:"blankDiagram",select:!0}];var U=P.basic;if(!c){var ja= +IMAGE_PATH+"/osa_database.png":IMAGE_PATH+"/osa_drive-harddisk.png";!c&&b&&I.appendChild(H);b&&mxUtils.write(I,(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 F=document.createElement("input");F.setAttribute("value",a.defaultFilename+H);F.style.marginLeft="10px";F.style.width=c?"220px":"430px";this.init=function(){b&&(F.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?F.select():document.execCommand("selectAll",!1,null))};b&&(I.appendChild(F),null!=a.editor.fileExtensions&&(H=FilenameDialog.createTypeHint(a, +F,a.editor.fileExtensions),H.style.marginTop="12px",I.appendChild(H)));var I=!1,G=0,J=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(t||mxResources.get("create"),function(){E.setAttribute("disabled","disabled");C();E.removeAttribute("disabled")});E.className="geBtn gePrimaryBtn";if(l||p){var L=[],K=null,R=null,X=null,T=function(a){E.setAttribute("disabled","disabled");for(var b=0;b<L.length;b++)L[b].className= +b==a?"geBtn gePrimaryBtn":"geBtn"},I=!0;t=document.createElement("div");t.style.whiteSpace="nowrap";t.style.height="30px";A.appendChild(t);H=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){aa.style.display="";Q.style.left="160px";T(0);Q.scrollTop=0;Q.innerHTML="";G=0;K!=U&&(U=K,P=R,ca=X,aa.innerHTML="",D(),K=null)});L.push(H);t.appendChild(H);var M=function(a){aa.style.display="none";Q.style.left="30px";T(a?-1:1);null==K&&(K=U);Q.scrollTop=0;Q.innerHTML="";J.spin(Q);var b= +function(a,b,c){G=0;J.stop();U=a;c=c||{};var f=0,d;for(d in c)f+=c[d].length;if(b)Q.innerHTML=b;else if(0==a.length&&0==f)Q.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams",null,"No Diagrams Found"));else if(Q.innerHTML="",0<f){aa.style.display="";Q.style.left="160px";aa.innerHTML="";ca=0;P={"draw.io":a};for(d in c)P[d]=c[d];D()}else y()};a?p(W.value,b):l(b)};l&&(H=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){M()}),t.appendChild(H),L.push(H));if(p){H=document.createElement("span"); +H.style.marginLeft="10px";H.innerHTML=mxUtils.htmlEntities(mxResources.get("search")+":");t.appendChild(H);var W=document.createElement("input");W.style.marginRight="10px";W.style.marginLeft="10px";W.style.width="220px";mxEvent.addListener(W,"keypress",function(a){13==a.keyCode&&M(!0)});t.appendChild(W);H=mxUtils.button(mxResources.get("search"),function(){M(!0)});H.className="geBtn";t.appendChild(H)}T(0)}var Z=null,ha=null,fa=null,da=null,V=null,ba=null,Q=document.createElement("div");Q.style.border= +"1px solid #d3d3d3";Q.style.position="absolute";Q.style.left="160px";Q.style.right="34px";I=(b?72:40)+(I?30:0);Q.style.top=I+"px";Q.style.bottom="68px";Q.style.margin="6px 0 0 -1px";Q.style.padding="6px";Q.style.overflow="auto";var aa=document.createElement("div");aa.style.cssText="position:absolute;left:30px;width:128px;top:"+I+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";var Y=140,ea=140,P={},N={},ca=0,S=!0;P.basic=[{title:"blankDiagram",select:!0}];var U=P.basic;if(!c){var ja= function(){mxUtils.get(O,function(a){if(!ka){ka=!0;a=a.getXml().documentElement.firstChild;for(var b={};null!=a;){if("undefined"!==typeof a.getAttribute)if("clibs"==a.nodeName){for(var c=a.getAttribute("name"),f=a.getElementsByTagName("add"),d=[],l=0;l<f.length;l++)d.push(encodeURIComponent(mxUtils.getTextContent(f[l])));null!=c&&0<d.length&&(b[c]=d.join(";"))}else c=a.getAttribute("url"),null!=c&&(f=a.getAttribute("section"),null==f&&(f=c.indexOf("/"),f=c.substring(0,f)),c=P[f],null==c&&(c=[],P[f]= -c),f=a.getAttribute("clibs"),null!=b[f]&&(f=b[f]),c.push({url:a.getAttribute("url"),libs:a.getAttribute("libs"),title:a.getAttribute("title"),tooltip:a.getAttribute("url"),preview:a.getAttribute("preview"),clibs:f}));a=a.nextSibling}G.stop();D()}})};x.appendChild(aa);x.appendChild(Q);var ka=!1,O=f;/^https?:\/\//.test(O)&&!a.editor.isCorsEnabledForUrl(O)&&(O=PROXY_URL+"?url="+encodeURIComponent(O));G.spin(Q);null!=A?A(function(a,b){M=a;X=ca=b;ja()},ja):ja();R=P}mxEvent.addListener(F,"keypress",function(b){a.dialog.container.firstChild== -x&&13==b.keyCode&&C()});f=document.createElement("div");f.style.marginTop=c?"4px":"16px";f.style.textAlign="right";f.style.position="absolute";f.style.left="40px";f.style.bottom="24px";f.style.right="40px";c||a.isOffline()||!b||null!=d||g||(A=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://support.draw.io/display/DO/Creating+and+Opening+Files")}),A.className="geBtn",f.appendChild(A));A=mxUtils.button(mxResources.get("cancel"),function(){null!=e&&e();a.hideDialog(!0)});A.className= -"geBtn";!a.editor.cancelFirst||g&&null==e||f.appendChild(A);c||"1"==urlParams.embed||g||(c=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var b=new FilenameDialog(a,"",mxResources.get("create"),function(b){null!=b&&0<b.length&&(b=a.getUrl(window.location.pathname+"?mode="+a.mode+"&title="+encodeURIComponent(F.value)+"&create="+encodeURIComponent(b)),null==a.getCurrentFile()?window.location.href=b:window.openWindow(b))},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()}), -c.className="geBtn",f.appendChild(c));Graph.fileSupport&&y&&(y=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(c){a.openFiles(b.files,!0);b.value=""});b.style.display="none";document.body.appendChild(b);a.newDlgFileInputElt=b}a.newDlgFileInputElt.click()}),y.className="geBtn",f.appendChild(y));f.appendChild(E);a.editor.cancelFirst|| -null!=d||g&&null==e||f.appendChild(A);x.appendChild(f);this.container=x},CreateDialog=function(a,c,b,d,g,e,k,m,n,t,f,l,p,u,y,q){function A(b,f,d,p){function e(){mxEvent.addListener(g,"click",function(){var b=d;if(k){var f=v.value,l=f.lastIndexOf(".");if(0>c.lastIndexOf(".")&&0>l){var b=null!=b?b:x.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<=l&&(f=f.substring(0,l));v.value=f+p}}z(d)})}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 u=document.createElement("div");g.appendChild(u);mxUtils.write(u,f);if(null!=p&&null==a[p]){q.style.visibility="hidden";mxUtils.setOpacity(u,10);var y=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});y.spin(g);var m=window.setTimeout(function(){null== -a[p]&&(y.stop(),g.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[p]&&(window.clearTimeout(m),mxUtils.setOpacity(u,100),q.style.visibility="",y.stop(),e())}))}else e();B.appendChild(g);++D==l&&(mxUtils.br(B),D=0)}function z(c){var f=v.value;if(null==c||null!=f&&0<f.length)a.hideDialog(),b(f,c)}k=null!=k?k:!0;m=null!=m?m:!0;l=null!=l?l:4;e=document.createElement("div");e.style.whiteSpace="nowrap";null==d&&a.addLanguageMenu(e);var C=document.createElement("h2"); -mxUtils.write(C,g||mxResources.get("create"));C.style.marginTop="0px";C.style.marginBottom="24px";e.appendChild(C);mxUtils.write(e,mxResources.get("filename")+":");var v=document.createElement("input");v.setAttribute("value",c);v.style.width="280px";v.style.marginLeft="10px";v.style.marginBottom="20px";v.style.maxWidth="70%";this.init=function(){v.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?v.select():document.execCommand("selectAll",!1,null)};e.appendChild(v); -null!=q&&e.appendChild(FilenameDialog.createTypeHint(a,v,q));null!=p&&null!=u&&"image/"==u.substring(0,6)&&(v.style.width="160px",g=null,"image/svg+xml"==u&&mxClient.IS_SVG?(g=document.createElement("div"),g.innerHTML=mxUtils.trim(p),p=g.getElementsByTagName("svg")[0],u=parseInt(p.getAttribute("width")),y=parseInt(p.getAttribute("height")),p.setAttribute("viewBox","0 0 "+u+" "+y),p.setAttribute("width","120px"),p.setAttribute("height","80px")):(g=document.createElement("img"),g.setAttribute("src", -"data:"+u+(y?";base64,":";utf8,")+p)),g.style.position="absolute",g.style.top="70px",g.style.right="100px",g.style.maxWidth="120px",g.style.maxHeight="80px",mxUtils.setPrefixedStyle(g.style,"transform","translate(50%,-50%)"),e.appendChild(g),n&&Editor.popupsAllowed&&(g.style.cursor="pointer",mxEvent.addListener(g,"click",function(){z("_blank")})));mxUtils.br(e);var B=document.createElement("div");B.style.textAlign="center";var D=0;B.style.marginTop="6px";e.appendChild(B);var x=document.createElement("select"); -x.style.marginLeft="10px";a.isOfflineApp()||a.isOffline()||("function"===typeof window.DriveClient&&(p=document.createElement("option"),p.setAttribute("value",App.MODE_GOOGLE),mxUtils.write(p,mxResources.get("googleDrive")),x.appendChild(p),A(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(p=document.createElement("option"),p.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(p,mxResources.get("oneDrive")), -x.appendChild(p),a.mode==App.MODE_ONEDRIVE&&p.setAttribute("selected","selected"),A(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive")),"function"===typeof window.DropboxClient&&(p=document.createElement("option"),p.setAttribute("value",App.MODE_DROPBOX),mxUtils.write(p,mxResources.get("dropbox")),x.appendChild(p),a.mode==App.MODE_DROPBOX&&p.setAttribute("selected","selected"),A(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")), -null!=a.gitHub&&(p=document.createElement("option"),p.setAttribute("value",App.MODE_GITHUB),mxUtils.write(p,mxResources.get("github")),x.appendChild(p),A(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),null!=a.gitLab&&(p=document.createElement("option"),p.setAttribute("value",App.MODE_GITLAB),mxUtils.write(p,mxResources.get("gitlab")),x.appendChild(p),A(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab")),"function"===typeof window.TrelloClient&& -(p=document.createElement("option"),p.setAttribute("value",App.MODE_TRELLO),mxUtils.write(p,mxResources.get("trello")),x.appendChild(p),A(IMAGE_PATH+"/trello-logo.svg",mxResources.get("trello"),App.MODE_TRELLO,"trello")));Editor.useLocalStorage&&"device"!=urlParams.storage&&null==a.getCurrentFile()||(p=document.createElement("option"),p.setAttribute("value",App.MODE_DEVICE),mxUtils.write(p,mxResources.get("device")),x.appendChild(p),a.mode!=App.MODE_DEVICE&&m||p.setAttribute("selected","selected"), -f&&A(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE));m&&isLocalStorage&&"0"!=urlParams.browser&&(m=document.createElement("option"),m.setAttribute("value",App.MODE_BROWSER),mxUtils.write(m,mxResources.get("browser")),x.appendChild(m),a.mode==App.MODE_BROWSER&&m.setAttribute("selected","selected"),A(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));m=document.createElement("div");m.style.marginTop="26px";m.style.textAlign="center";null!=t&& -(f=mxUtils.button(mxResources.get("help"),function(){a.openLink(t)}),f.className="geBtn",m.appendChild(f));f=mxUtils.button(mxResources.get("cancel"),function(){null!=d?d():(a.fileLoaded(null),a.hideDialog(),window.close(),window.location.href=a.getUrl())});f.className="geBtn";a.editor.cancelFirst&&m.appendChild(f);null==d&&(p=mxUtils.button(mxResources.get("decideLater"),function(){z(null)}),p.className="geBtn",m.appendChild(p));n&&Editor.popupsAllowed&&(n=mxUtils.button(mxResources.get("openInNewWindow"), -function(){z("_blank")}),n.className="geBtn",m.appendChild(n));CreateDialog.showDownloadButton&&(n=mxUtils.button(mxResources.get("download"),function(){z("download")}),n.className="geBtn",m.appendChild(n));a.editor.cancelFirst||m.appendChild(f);mxEvent.addListener(v,"keypress",function(b){13==b.keyCode?z(App.MODE_DEVICE):27==b.keyCode&&(a.fileLoaded(null),a.hideDialog(),window.close())});e.appendChild(m);this.container=e};CreateDialog.showDownloadButton=!0; +c),f=a.getAttribute("clibs"),null!=b[f]&&(f=b[f]),c.push({url:a.getAttribute("url"),libs:a.getAttribute("libs"),title:a.getAttribute("title"),tooltip:a.getAttribute("url"),preview:a.getAttribute("preview"),clibs:f}));a=a.nextSibling}J.stop();D()}})};A.appendChild(aa);A.appendChild(Q);var ka=!1,O=f;/^https?:\/\//.test(O)&&!a.editor.isCorsEnabledForUrl(O)&&(O=PROXY_URL+"?url="+encodeURIComponent(O));J.spin(Q);null!=z?z(function(a,b){N=a;X=ca=b;ja()},ja):ja();R=P}mxEvent.addListener(F,"keypress",function(b){a.dialog.container.firstChild== +A&&13==b.keyCode&&C()});f=document.createElement("div");f.style.marginTop=c?"4px":"16px";f.style.textAlign="right";f.style.position="absolute";f.style.left="40px";f.style.bottom="24px";f.style.right="40px";c||a.isOffline()||!b||null!=d||g||(z=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://support.draw.io/display/DO/Creating+and+Opening+Files")}),z.className="geBtn",f.appendChild(z));z=mxUtils.button(mxResources.get("cancel"),function(){null!=e&&e();a.hideDialog(!0)});z.className= +"geBtn";!a.editor.cancelFirst||g&&null==e||f.appendChild(z);c||"1"==urlParams.embed||g||(c=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var b=new FilenameDialog(a,"",mxResources.get("create"),function(b){null!=b&&0<b.length&&(b=a.getUrl(window.location.pathname+"?mode="+a.mode+"&title="+encodeURIComponent(F.value)+"&create="+encodeURIComponent(b)),null==a.getCurrentFile()?window.location.href=b:window.openWindow(b))},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()}), +c.className="geBtn",f.appendChild(c));Graph.fileSupport&&v&&(v=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(c){a.openFiles(b.files,!0);b.value=""});b.style.display="none";document.body.appendChild(b);a.newDlgFileInputElt=b}a.newDlgFileInputElt.click()}),v.className="geBtn",f.appendChild(v));f.appendChild(E);a.editor.cancelFirst|| +null!=d||g&&null==e||f.appendChild(z);A.appendChild(f);this.container=A},CreateDialog=function(a,c,b,d,g,e,k,m,n,q,f,l,p,u,v,t){function z(b,f,d,p){function e(){mxEvent.addListener(g,"click",function(){var b=d;if(k){var f=B.value,l=f.lastIndexOf(".");if(0>c.lastIndexOf(".")&&0>l){var b=null!=b?b:A.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<=l&&(f=f.substring(0,l));B.value=f+p}}y(d)})}var g=document.createElement("a");g.style.overflow="hidden";var t=document.createElement("img");t.src=b;t.setAttribute("border","0");t.setAttribute("align","absmiddle");t.style.width="60px";t.style.height="60px";t.style.paddingBottom="6px";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(t);mxClient.IS_QUIRKS&&(g.style.cssFloat="left",g.style.zoom="1");g.style.color="gray";g.style.fontSize="11px";var u=document.createElement("div");g.appendChild(u);mxUtils.write(u,f);if(null!=p&&null==a[p]){t.style.visibility="hidden";mxUtils.setOpacity(u,10);var v=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});v.spin(g);var m=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(m),mxUtils.setOpacity(u,100),t.style.visibility="",v.stop(),e())}))}else e();x.appendChild(g);++D==l&&(mxUtils.br(x),D=0)}function y(c){var f=B.value;if(null==c||null!=f&&0<f.length)a.hideDialog(),b(f,c)}k=null!=k?k:!0;m=null!=m?m:!0;l=null!=l?l:4;e=document.createElement("div");e.style.whiteSpace="nowrap";null==d&&a.addLanguageMenu(e);var C=document.createElement("h2"); +mxUtils.write(C,g||mxResources.get("create"));C.style.marginTop="0px";C.style.marginBottom="24px";e.appendChild(C);mxUtils.write(e,mxResources.get("filename")+":");var B=document.createElement("input");B.setAttribute("value",c);B.style.width="280px";B.style.marginLeft="10px";B.style.marginBottom="20px";B.style.maxWidth="70%";this.init=function(){B.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?B.select():document.execCommand("selectAll",!1,null)};e.appendChild(B); +null!=t&&e.appendChild(FilenameDialog.createTypeHint(a,B,t));null!=p&&null!=u&&"image/"==u.substring(0,6)&&(B.style.width="160px",g=null,"image/svg+xml"==u&&mxClient.IS_SVG?(g=document.createElement("div"),g.innerHTML=mxUtils.trim(p),p=g.getElementsByTagName("svg")[0],u=parseInt(p.getAttribute("width")),v=parseInt(p.getAttribute("height")),p.setAttribute("viewBox","0 0 "+u+" "+v),p.setAttribute("width","120px"),p.setAttribute("height","80px")):(g=document.createElement("img"),g.setAttribute("src", +"data:"+u+(v?";base64,":";utf8,")+p)),g.style.position="absolute",g.style.top="70px",g.style.right="100px",g.style.maxWidth="120px",g.style.maxHeight="80px",mxUtils.setPrefixedStyle(g.style,"transform","translate(50%,-50%)"),e.appendChild(g),n&&Editor.popupsAllowed&&(g.style.cursor="pointer",mxEvent.addListener(g,"click",function(){y("_blank")})));mxUtils.br(e);var x=document.createElement("div");x.style.textAlign="center";var D=0;x.style.marginTop="6px";e.appendChild(x);var A=document.createElement("select"); +A.style.marginLeft="10px";a.isOfflineApp()||a.isOffline()||("function"===typeof window.DriveClient&&(p=document.createElement("option"),p.setAttribute("value",App.MODE_GOOGLE),mxUtils.write(p,mxResources.get("googleDrive")),A.appendChild(p),z(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(p=document.createElement("option"),p.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(p,mxResources.get("oneDrive")), +A.appendChild(p),a.mode==App.MODE_ONEDRIVE&&p.setAttribute("selected","selected"),z(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive")),"function"===typeof window.DropboxClient&&(p=document.createElement("option"),p.setAttribute("value",App.MODE_DROPBOX),mxUtils.write(p,mxResources.get("dropbox")),A.appendChild(p),a.mode==App.MODE_DROPBOX&&p.setAttribute("selected","selected"),z(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")), +null!=a.gitHub&&(p=document.createElement("option"),p.setAttribute("value",App.MODE_GITHUB),mxUtils.write(p,mxResources.get("github")),A.appendChild(p),z(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),null!=a.gitLab&&(p=document.createElement("option"),p.setAttribute("value",App.MODE_GITLAB),mxUtils.write(p,mxResources.get("gitlab")),A.appendChild(p),z(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab")),"function"===typeof window.TrelloClient&& +(p=document.createElement("option"),p.setAttribute("value",App.MODE_TRELLO),mxUtils.write(p,mxResources.get("trello")),A.appendChild(p),z(IMAGE_PATH+"/trello-logo.svg",mxResources.get("trello"),App.MODE_TRELLO,"trello")));Editor.useLocalStorage&&"device"!=urlParams.storage&&null==a.getCurrentFile()||(p=document.createElement("option"),p.setAttribute("value",App.MODE_DEVICE),mxUtils.write(p,mxResources.get("device")),A.appendChild(p),a.mode!=App.MODE_DEVICE&&m||p.setAttribute("selected","selected"), +f&&z(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE));m&&isLocalStorage&&"0"!=urlParams.browser&&(m=document.createElement("option"),m.setAttribute("value",App.MODE_BROWSER),mxUtils.write(m,mxResources.get("browser")),A.appendChild(m),a.mode==App.MODE_BROWSER&&m.setAttribute("selected","selected"),z(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));m=document.createElement("div");m.style.marginTop="26px";m.style.textAlign="center";null!=q&& +(f=mxUtils.button(mxResources.get("help"),function(){a.openLink(q)}),f.className="geBtn",m.appendChild(f));f=mxUtils.button(mxResources.get("cancel"),function(){null!=d?d():(a.fileLoaded(null),a.hideDialog(),window.close(),window.location.href=a.getUrl())});f.className="geBtn";a.editor.cancelFirst&&m.appendChild(f);null==d&&(p=mxUtils.button(mxResources.get("decideLater"),function(){y(null)}),p.className="geBtn",m.appendChild(p));n&&Editor.popupsAllowed&&(n=mxUtils.button(mxResources.get("openInNewWindow"), +function(){y("_blank")}),n.className="geBtn",m.appendChild(n));CreateDialog.showDownloadButton&&(n=mxUtils.button(mxResources.get("download"),function(){y("download")}),n.className="geBtn",m.appendChild(n));a.editor.cancelFirst||m.appendChild(f);mxEvent.addListener(B,"keypress",function(b){13==b.keyCode?y(App.MODE_DEVICE):27==b.keyCode&&(a.fileLoaded(null),a.hideDialog(),window.close())});e.appendChild(m);this.container=e};CreateDialog.showDownloadButton=!0; var PopupDialog=function(a,c,b,d,g){g=null!=g?g:!0;var e=document.createElement("div");e.style.textAlign="left";mxUtils.write(e,mxResources.get("fileOpenLocation"));mxUtils.br(e);mxUtils.br(e);var k=mxUtils.button(mxResources.get("openInThisWindow"),function(){g&&a.hideDialog();null!=d&&d()});k.className="geBtn";k.style.marginBottom="8px";k.style.width="280px";e.appendChild(k);mxUtils.br(e);var m=mxUtils.button(mxResources.get("openInNewWindow"),function(){g&&a.hideDialog();null!=b&&b();a.openLink(c, null,!0)});m.className="geBtn gePrimaryBtn";m.style.width=k.style.width;e.appendChild(m);mxUtils.br(e);mxUtils.br(e);mxUtils.write(e,mxResources.get("allowPopups"));this.container=e},ImageDialog=function(a,c,b,d,g,e){e=null!=e?e:!0;var k=a.editor.graph,m=document.createElement("div");mxUtils.write(m,c);c=document.createElement("div");c.className="geTitle";c.style.backgroundColor="transparent";c.style.borderColor="transparent";c.style.whiteSpace="nowrap";c.style.textOverflow="clip";c.style.cursor= "default";mxClient.IS_VML||(c.style.paddingRight="20px");var n=document.createElement("input");n.setAttribute("value",b);n.setAttribute("type","text");n.setAttribute("spellcheck","false");n.setAttribute("autocorrect","off");n.setAttribute("autocomplete","off");n.setAttribute("autocapitalize","off");n.style.marginTop="6px";n.style.width=(Graph.fileSupport?420:340)+(mxClient.IS_QUIRKS?20:-20)+"px";n.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";n.style.backgroundRepeat="no-repeat"; n.style.backgroundPosition="100% 50%";n.style.paddingRight="14px";b=document.createElement("div");b.setAttribute("title",mxResources.get("reset"));b.style.position="relative";b.style.left="-16px";b.style.width="12px";b.style.height="14px";b.style.cursor="pointer";b.style.display=mxClient.IS_VML?"inline":"inline-block";b.style.top=(mxClient.IS_VML?0:3)+"px";b.style.background="url('"+a.editor.transparentImage+"')";mxEvent.addListener(b,"click",function(){n.value="";n.focus()});c.appendChild(n);c.appendChild(b); -m.appendChild(c);var t=function(b,c,f,l){var p="data:"==b.substring(0,5);!a.isOffline()||p&&"undefined"===typeof chrome?0<b.length&&a.spinner.spin(document.body,mxResources.get("inserting"))?a.loadImage(b,function(p){a.spinner.stop();a.hideDialog();var g=!1===l?1:null!=c&&null!=f?Math.max(c/p.width,f/p.height):Math.min(1,Math.min(520/p.width,520/p.height));e&&(b=a.convertDataUri(b));d(b,Math.round(Number(p.width)*g),Math.round(Number(p.height)*g))},function(){a.spinner.stop();d(null);a.showError(mxResources.get("error"), -mxResources.get("fileNotFound"),mxResources.get("ok"))}):(a.hideDialog(),d(b)):(b=a.convertDataUri(b),c=null==c?120:c,f=null==f?100:f,a.hideDialog(),d(b,c,f))},f=function(b,c){if(null!=b){var f=g?null:k.getModel().getGeometry(k.getSelectionCell());null!=f?t(b,f.width,f.height,c):t(b,null,null,c)}else a.hideDialog(),d(null)};this.init=function(){n.focus();if(Graph.fileSupport){n.setAttribute("placeholder",mxResources.get("dragImagesHere"));var b=m.parentNode,c=null;mxEvent.addListener(b,"dragleave", +m.appendChild(c);var q=function(b,c,f,l){var p="data:"==b.substring(0,5);!a.isOffline()||p&&"undefined"===typeof chrome?0<b.length&&a.spinner.spin(document.body,mxResources.get("inserting"))?a.loadImage(b,function(p){a.spinner.stop();a.hideDialog();var g=!1===l?1:null!=c&&null!=f?Math.max(c/p.width,f/p.height):Math.min(1,Math.min(520/p.width,520/p.height));e&&(b=a.convertDataUri(b));d(b,Math.round(Number(p.width)*g),Math.round(Number(p.height)*g))},function(){a.spinner.stop();d(null);a.showError(mxResources.get("error"), +mxResources.get("fileNotFound"),mxResources.get("ok"))}):(a.hideDialog(),d(b)):(b=a.convertDataUri(b),c=null==c?120:c,f=null==f?100:f,a.hideDialog(),d(b,c,f))},f=function(b,c){if(null!=b){var f=g?null:k.getModel().getGeometry(k.getSelectionCell());null!=f?q(b,f.width,f.height,c):q(b,null,null,c)}else a.hideDialog(),d(null)};this.init=function(){n.focus();if(Graph.fileSupport){n.setAttribute("placeholder",mxResources.get("dragImagesHere"));var b=m.parentNode,c=null;mxEvent.addListener(b,"dragleave", function(a){null!=c&&(c.parentNode.removeChild(c),c=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(b,"dragover",mxUtils.bind(this,function(f){null==c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=a.highlightElement(b));f.stopPropagation();f.preventDefault()}));mxEvent.addListener(b,"drop",mxUtils.bind(this,function(b){null!=c&&(c.parentNode.removeChild(c),c=null);if(0<b.dataTransfer.files.length)a.importFiles(b.dataTransfer.files,0,0,a.maxImageSize,function(a,b,c,d,l,p,e,g){f(a, g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},!mxEvent.isControlDown(b));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")){var d=b.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(d)&&f(decodeURIComponent(d))}b.stopPropagation();b.preventDefault()}),!1)}};b=document.createElement("div");b.style.marginTop=mxClient.IS_QUIRKS?"22px":"14px";b.style.textAlign="center";c=mxUtils.button(mxResources.get("cancel"), function(){a.spinner.stop();a.hideDialog()});c.className="geBtn";a.editor.cancelFirst&&b.appendChild(c);ImageDialog.filePicked=function(a){a.action==google.picker.Action.PICKED&&null!=a.docs[0].thumbnails&&(a=a.docs[0].thumbnails[a.docs[0].thumbnails.length-1],null!=a&&(n.value=a.url));n.focus()};if(Graph.fileSupport){if(null==a.imgDlgFileInputElt){var l=document.createElement("input");l.setAttribute("multiple","multiple");l.setAttribute("type","file");mxEvent.addListener(l,"change",function(b){null!= @@ -8144,21 +8158,21 @@ l.files&&(a.importFiles(l.files,0,0,a.maxImageSize,function(a,b,c,d,l,p){f(a)},f a.imageSearchPicker=b.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.imageSearchPicker.setVisible(!0)}),p.className="geBtn",b.appendChild(p),null!=a.drive&&"1"==urlParams.photos&&(p=mxUtils.button(mxResources.get("googlePlus"),function(){a.spinner.spin(document.body,mxResources.get("authorizing"))&&a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();if(null==a.photoPicker){var b=gapi.auth.getToken().access_token,b=(new google.picker.PickerBuilder).setAppId(a.drive.appId).setLocale(mxLanguage).setOAuthToken(b).addView(google.picker.ViewId.PHOTO_UPLOAD); a.photoPicker=b.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.photoPicker.setVisible(!0)}))}),p.className="geBtn",b.appendChild(p)));mxEvent.addListener(n,"keypress",function(a){13==a.keyCode&&f(n.value)});p=mxUtils.button(mxResources.get("apply"),function(){f(n.value)});p.className="geBtn gePrimaryBtn";b.appendChild(p);a.editor.cancelFirst||b.appendChild(c);Graph.fileSupport&&(b.style.marginTop="120px",m.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",m.style.backgroundPosition= "center 65%",m.style.backgroundRepeat="no-repeat",c=document.createElement("div"),c.style.position="absolute",c.style.width="420px",c.style.top="58%",c.style.textAlign="center",c.style.fontSize="18px",c.style.color="#a0c3ff",mxUtils.write(c,mxResources.get("dragImagesHere")),m.appendChild(c));m.appendChild(b);this.container=m},LinkDialog=function(a,c,b,d,g){function e(a,b,c){c=mxUtils.button("",c);c.className="geBtn";c.setAttribute("title",b);b=document.createElement("img");b.style.height="26px"; -b.style.width="26px";b.setAttribute("src",a);c.style.minWidth="42px";c.style.verticalAlign="middle";c.appendChild(b);A.appendChild(c)}var k=document.createElement("div");mxUtils.write(k,mxResources.get("editLink")+":");var m=document.createElement("div");m.className="geTitle";m.style.backgroundColor="transparent";m.style.borderColor="transparent";m.style.whiteSpace="nowrap";m.style.textOverflow="clip";m.style.cursor="default";mxClient.IS_VML||(m.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 f=document.createElement("input");f.style.cssText="margin-right:8px;margin-bottom:8px;";f.setAttribute("value","url");f.setAttribute("type","radio");f.setAttribute("name","current-linkdialog");var l=document.createElement("input");l.style.cssText="margin-right:8px;margin-bottom:8px;"; -l.setAttribute("value","url");l.setAttribute("type","radio");l.setAttribute("name","current-linkdialog");var p=document.createElement("select");p.style.width="100%";if(g&&null!=a.pages){null!=c&&"data:page/id,"==c.substring(0,13)?(l.setAttribute("checked","checked"),l.defaultChecked=!0):(n.setAttribute("value",c),f.setAttribute("checked","checked"),f.defaultChecked=!0);m.appendChild(f);m.appendChild(n);m.appendChild(t);mxUtils.br(m);m.appendChild(l);g=!1;for(t=0;t<a.pages.length;t++){var u=document.createElement("option"); -mxUtils.write(u,a.pages[t].getName()||mxResources.get("pageWithNumber",[t+1]));u.setAttribute("value","data:page/id,"+a.pages[t].getId());c==u.getAttribute("value")&&(u.setAttribute("selected","selected"),g=!0);p.appendChild(u)}if(!g&&l.checked){var y=document.createElement("option");mxUtils.write(y,mxResources.get("pageNotFound"));y.setAttribute("disabled","disabled");y.setAttribute("selected","selected");y.setAttribute("value","pageNotFound");p.appendChild(y);mxEvent.addListener(p,"change",function(){null== -y.parentNode||y.selected||y.parentNode.removeChild(y)})}m.appendChild(p)}else n.setAttribute("value",c),m.appendChild(n),m.appendChild(t);k.appendChild(m);var q=mxUtils.button(b,function(){a.hideDialog();d(l.checked?"pageNotFound"!==p.value?p.value:c:n.value,LinkDialog.selectedDocs)});q.style.verticalAlign="middle";q.className="geBtn gePrimaryBtn";this.init=function(){l.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);c.style.minWidth="42px";c.style.verticalAlign="middle";c.appendChild(b);z.appendChild(c)}var k=document.createElement("div");mxUtils.write(k,mxResources.get("editLink")+":");var m=document.createElement("div");m.className="geTitle";m.style.backgroundColor="transparent";m.style.borderColor="transparent";m.style.whiteSpace="nowrap";m.style.textOverflow="clip";m.style.cursor="default";mxClient.IS_VML||(m.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 q=document.createElement("div");q.setAttribute("title",mxResources.get("reset"));q.style.position="relative";q.style.left="-16px";q.style.width="12px";q.style.height= +"14px";q.style.cursor="pointer";q.style.display=mxClient.IS_VML?"inline":"inline-block";q.style.top=(mxClient.IS_VML?0:3)+"px";q.style.background="url('"+a.editor.transparentImage+"')";mxEvent.addListener(q,"click",function(){n.value="";n.focus()});var f=document.createElement("input");f.style.cssText="margin-right:8px;margin-bottom:8px;";f.setAttribute("value","url");f.setAttribute("type","radio");f.setAttribute("name","current-linkdialog");var l=document.createElement("input");l.style.cssText="margin-right:8px;margin-bottom:8px;"; +l.setAttribute("value","url");l.setAttribute("type","radio");l.setAttribute("name","current-linkdialog");var p=document.createElement("select");p.style.width="100%";if(g&&null!=a.pages){null!=c&&"data:page/id,"==c.substring(0,13)?(l.setAttribute("checked","checked"),l.defaultChecked=!0):(n.setAttribute("value",c),f.setAttribute("checked","checked"),f.defaultChecked=!0);m.appendChild(f);m.appendChild(n);m.appendChild(q);mxUtils.br(m);m.appendChild(l);g=!1;for(q=0;q<a.pages.length;q++){var u=document.createElement("option"); +mxUtils.write(u,a.pages[q].getName()||mxResources.get("pageWithNumber",[q+1]));u.setAttribute("value","data:page/id,"+a.pages[q].getId());c==u.getAttribute("value")&&(u.setAttribute("selected","selected"),g=!0);p.appendChild(u)}if(!g&&l.checked){var v=document.createElement("option");mxUtils.write(v,mxResources.get("pageNotFound"));v.setAttribute("disabled","disabled");v.setAttribute("selected","selected");v.setAttribute("value","pageNotFound");p.appendChild(v);mxEvent.addListener(p,"change",function(){null== +v.parentNode||v.selected||v.parentNode.removeChild(v)})}m.appendChild(p)}else n.setAttribute("value",c),m.appendChild(n),m.appendChild(q);k.appendChild(m);var t=mxUtils.button(b,function(){a.hideDialog();d(l.checked?"pageNotFound"!==p.value?p.value:c:n.value,LinkDialog.selectedDocs)});t.style.verticalAlign="middle";t.className="geBtn gePrimaryBtn";this.init=function(){l.checked?p.focus():(n.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?n.select():document.execCommand("selectAll", !1,null));mxEvent.addListener(p,"focus",function(){f.removeAttribute("checked");l.setAttribute("checked","checked");l.checked=!0});mxEvent.addListener(n,"focus",function(){l.removeAttribute("checked");f.setAttribute("checked","checked");f.checked=!0});if(Graph.fileSupport){var b=k.parentNode,c=null;mxEvent.addListener(b,"dragleave",function(a){null!=c&&(c.parentNode.removeChild(c),c=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(b,"dragover",mxUtils.bind(this,function(f){null== -c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=a.highlightElement(b));f.stopPropagation();f.preventDefault()}));mxEvent.addListener(b,"drop",mxUtils.bind(this,function(a){null!=c&&(c.parentNode.removeChild(c),c=null);0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")&&(n.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),f.setAttribute("checked","checked"),f.checked=!0,q.click());a.stopPropagation();a.preventDefault()}),!1)}};var A=document.createElement("div");A.style.marginTop= -"20px";A.style.textAlign="center";b=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/solution/articles/16000080137")});b.style.verticalAlign="middle";b.className="geBtn";A.appendChild(b);a.isOffline()&&!mxClient.IS_CHROMEAPP&&(b.style.display="none");b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});b.style.verticalAlign="middle";b.className="geBtn";a.editor.cancelFirst&&A.appendChild(b);LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(a){if(a.action== +c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=a.highlightElement(b));f.stopPropagation();f.preventDefault()}));mxEvent.addListener(b,"drop",mxUtils.bind(this,function(a){null!=c&&(c.parentNode.removeChild(c),c=null);0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")&&(n.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),f.setAttribute("checked","checked"),f.checked=!0,t.click());a.stopPropagation();a.preventDefault()}),!1)}};var z=document.createElement("div");z.style.marginTop= +"20px";z.style.textAlign="center";b=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/solution/articles/16000080137")});b.style.verticalAlign="middle";b.className="geBtn";z.appendChild(b);a.isOffline()&&!mxClient.IS_CHROMEAPP&&(b.style.display="none");b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});b.style.verticalAlign="middle";b.className="geBtn";a.editor.cancelFirst&&z.appendChild(b);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&& e(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googlePlus"),function(){a.spinner.spin(document.body,mxResources.get("authorizing"))&&a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();if(null==a.linkPicker){var b=gapi.auth.getToken().access_token,c=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0),f=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0),d=(new google.picker.DocsView).setIncludeFolders(!0).setEnableTeamDrives(!0).setSelectFolderEnabled(!0), b=(new google.picker.PickerBuilder).setAppId(a.drive.appId).setLocale(mxLanguage).setOAuthToken(b).enableFeature(google.picker.Feature.SUPPORT_TEAM_DRIVES).addView(c).addView(f).addView(d).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&&e(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&&e(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&&e(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),function(){a.gitHub.pickFile(function(a){if(null!= a){a=a.split("/");var b=a[0],c=a[1],f=a[2];a=a.slice(3,a.length).join("/");n.value="https://github.com/"+b+"/"+c+"/blob/"+f+"/"+a;n.focus()}})});null!=a.gitLab&&e(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),function(){a.gitLab.pickFile(function(a){if(null!=a){a=a.split("/");var b=a[0],c=a[1],f=a[2];a=a.slice(3,a.length).join("/");n.value=DRAWIO_GITLAB_URL+"/"+b+"/"+c+"/blob/"+f+"/"+a;n.focus()}})});mxEvent.addListener(n,"keypress",function(b){13==b.keyCode&&(a.hideDialog(),d(l.checked? -p.value:n.value,LinkDialog.selectedDocs))});A.appendChild(q);a.editor.cancelFirst||A.appendChild(b);k.appendChild(A);this.container=k},AboutDialog=function(a){var c=document.createElement("div");c.style.marginTop="6px";c.setAttribute("align","center");var b=document.createElement("img");b.style.border="0px";mxClient.IS_SVG?(b.setAttribute("width","164"),b.setAttribute("height","221"),b.style.width="164px",b.style.height="221px",b.setAttribute("src",IMAGE_PATH+"/drawlogo-text-bottom.svg")):(b.setAttribute("width", +p.value:n.value,LinkDialog.selectedDocs))});z.appendChild(t);a.editor.cancelFirst||z.appendChild(b);k.appendChild(z);this.container=k},AboutDialog=function(a){var c=document.createElement("div");c.style.marginTop="6px";c.setAttribute("align","center");var b=document.createElement("img");b.style.border="0px";mxClient.IS_SVG?(b.setAttribute("width","164"),b.setAttribute("height","221"),b.style.width="164px",b.style.height="221px",b.setAttribute("src",IMAGE_PATH+"/drawlogo-text-bottom.svg")):(b.setAttribute("width", "176"),b.setAttribute("height","219"),b.style.width="170px",b.style.height="219px",b.setAttribute("src",IMAGE_PATH+"/logo-flat.png"));"dark"==uiTheme&&(b.style.filter="grayscale(100%) invert(100%)");c.appendChild(b);mxUtils.br(c);var b="dark"==uiTheme?"#cccccc":"#505050",d=document.createElement("small");d.innerHTML="v "+EditorUi.VERSION;d.style.color=b;c.appendChild(d);mxUtils.br(c);mxUtils.br(c);d=document.createElement("small");d.style.color=b;d.innerHTML='© 2005-2019 <a href="https://about.draw.io/" style="color:inherit;" target="_blank">JGraph Ltd</a>.<br>All Rights Reserved.'; c.appendChild(d);mxEvent.addListener(c,"click",function(b){"A"!=mxEvent.getSource(b).nodeName&&a.hideDialog()});this.container=c},FeedbackDialog=function(a){var c=document.createElement("div"),b=document.createElement("div");mxUtils.write(b,mxResources.get("sendYourFeedbackToDrawIo"));b.style.fontSize="18px";b.style.marginBottom="18px";c.appendChild(b);b=document.createElement("div");mxUtils.write(b,mxResources.get("yourEmailAddress")+" ("+mxResources.get("required")+")");c.appendChild(b);var d=document.createElement("input"); d.setAttribute("type","text");d.style.marginTop="6px";d.style.width="600px";var g=mxUtils.button(mxResources.get("sendMessage"),function(){var b=n.value+(k.checked?"\nDiagram:\n"+mxUtils.getXml(a.getXmlFileData()):"")+"\nBrowser:\n"+navigator.userAgent;b.length>FeedbackDialog.maxAttachmentSize?a.alert(mxResources.get("drawingTooLarge")):(a.hideDialog(),a.spinner.spin(document.body)&&mxUtils.post(null!=FeedbackDialog.feedbackUrl?FeedbackDialog.feedbackUrl:"/email","email="+encodeURIComponent(d.value)+ @@ -8167,111 +8181,111 @@ mxEvent.addListener(d,"change",function(){0<d.value.length&&0<e.test(d.value)?g. "14px";b.appendChild(k);var m=document.createElement("span");mxUtils.write(m," "+mxResources.get("includeCopyOfMyDiagram"));b.appendChild(m);mxEvent.addListener(m,"click",function(a){k.checked=!k.checked;mxEvent.consume(a)});c.appendChild(b);b=document.createElement("div");mxUtils.write(b,mxResources.get("feedback"));c.appendChild(b);var n=document.createElement("textarea");n.style.resize="none";n.style.width="600px";n.style.height="140px";n.style.marginTop="6px";n.setAttribute("placeholder",mxResources.get("comments")); c.appendChild(n);b=document.createElement("div");b.style.marginTop="26px";b.style.textAlign="right";m=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});m.className="geBtn";a.editor.cancelFirst?(b.appendChild(m),b.appendChild(g)):(b.appendChild(g),b.appendChild(m));c.appendChild(b);this.container=c};FeedbackDialog.maxAttachmentSize=1E6; var RevisionDialog=function(a,c,b){var d=document.createElement("div"),g=document.createElement("h3");g.style.marginTop="0px";mxUtils.write(g,mxResources.get("revisionHistory"));d.appendChild(g);var e=document.createElement("div");e.style.position="absolute";e.style.overflow="auto";e.style.width="170px";e.style.height="378px";d.appendChild(e);var k=document.createElement("div");k.style.position="absolute";k.style.border="1px solid lightGray";k.style.left="199px";k.style.width="470px";k.style.height= -"376px";k.style.overflow="hidden";mxEvent.disableContextMenu(k);d.appendChild(k);var m=new Graph(k);m.setTooltips(!1);m.setEnabled(!1);m.setPanning(!0);m.panningHandler.ignoreCell=!0;m.panningHandler.useLeftButtonForPanning=!0;m.minFitScale=null;m.maxFitScale=null;m.centerZoom=!0;var n=0,t=null,f=0,l=m.getGlobalVariable;m.getGlobalVariable=function(a){return"page"==a&&null!=t&&null!=t[f]?t[f].getAttribute("name"):"pagenumber"==a?f+1:l.apply(this,arguments)};m.getLinkForCell=function(){return null}; -Editor.MathJaxRender&&m.addListener(mxEvent.SIZE,mxUtils.bind(this,function(b,c){a.editor.graph.mathEnabled&&Editor.MathJaxRender(m.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%"}),u=a.getCurrentFile(),y=null,q=null,A=null,z=null,C=mxUtils.button("",function(){null!=A&&m.zoomIn()});C.className="geSprite geSprite-zoomin";C.setAttribute("title", -mxResources.get("zoomIn"));C.style.outline="none";C.style.border="none";C.style.margin="2px";C.setAttribute("disabled","disabled");mxUtils.setOpacity(C,20);var v=mxUtils.button("",function(){null!=A&&m.zoomOut()});v.className="geSprite geSprite-zoomout";v.setAttribute("title",mxResources.get("zoomOut"));v.style.outline="none";v.style.border="none";v.style.margin="2px";v.setAttribute("disabled","disabled");mxUtils.setOpacity(v,20);var B=mxUtils.button("",function(){null!=A&&(m.maxFitScale=8,m.fit(8), -m.center())});B.className="geSprite geSprite-fit";B.setAttribute("title",mxResources.get("fit"));B.style.outline="none";B.style.border="none";B.style.margin="2px";B.setAttribute("disabled","disabled");mxUtils.setOpacity(B,20);var D=mxUtils.button("",function(){null!=A&&(m.zoomActual(),m.center())});D.className="geSprite geSprite-actualsize";D.setAttribute("title",mxResources.get("actualSize"));D.style.outline="none";D.style.border="none";D.style.margin="2px";D.setAttribute("disabled","disabled"); -mxUtils.setOpacity(D,20);var x=document.createElement("div");x.style.position="absolute";x.style.textAlign="right";x.style.color="gray";x.style.marginTop="10px";x.style.backgroundColor="transparent";x.style.top="440px";x.style.right="32px";x.style.maxWidth="380px";x.style.cursor="default";var J=mxUtils.button(mxResources.get("download"),function(){if(null!=A){var b=mxUtils.getXml(A.documentElement),c=a.getBaseFilename()+".drawio";a.isLocalFileSave()?a.saveLocalFile(b,c,"text/xml"):(b="undefined"=== -typeof pako?"&xml="+encodeURIComponent(b):"&data="+encodeURIComponent(Graph.compress(b)),(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(c)+"&format=xml"+b)).simulate(document,"_blank"))}});J.className="geBtn";J.setAttribute("disabled","disabled");var H=mxUtils.button(mxResources.get("restore"),function(){null!=A&&null!=z&&a.confirm(mxResources.get("areYouSure"),function(){null!=b?b(z):a.spinner.spin(document.body,mxResources.get("restoring"))&&u.save(!0,function(b){a.spinner.stop();a.replaceFileData(z); -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 F=document.createElement("select");F.setAttribute("disabled","disabled");F.style.maxWidth="80px";F.style.position="relative";F.style.top="-2px";F.style.verticalAlign="bottom";F.style.marginRight="6px";F.style.display="none";var I=null;mxEvent.addListener(F,"change",function(a){null!=I&&(I(a),mxEvent.consume(a))}); -var G=mxUtils.button(mxResources.get("edit"),function(){null!=A&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(A.documentElement)),a.openLink(a.getUrl(),null,!0))});G.className="geBtn";G.setAttribute("disabled","disabled");null!=b&&(G.style.display="none");var E=mxUtils.button(mxResources.get("show"),function(){null!=q&&a.openLink(q.getUrl(F.selectedIndex))});E.className="geBtn gePrimaryBtn";E.setAttribute("disabled","disabled");null!=b&&(E.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 N=null;if(null!=c&&0<c.length){k.style.cursor="move";var R=document.createElement("table");R.style.border="1px solid lightGray";R.style.borderCollapse= -"collapse";R.style.borderSpacing="0px";R.style.width="100%";var X=document.createElement("tbody"),T=(new Date).toDateString();null!=a.currentPage&&null!=a.pages&&(n=mxUtils.indexOf(a.pages,a.currentPage));for(var L=c.length-1;0<=L;L--){var W=function(b){var d=new Date(b.modifiedDate),l=null;if(0<=d.getTime()){var e=function(c){p.stop();var e=mxUtils.parseXml(c),g=a.editor.extractGraphModel(e.documentElement,!0);if(null!=g){var q=function(a){null!=a&&(a=y(mxUtils.parseXml(Graph.decompress(mxUtils.getTextContent(a))).documentElement)); -return a},y=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,m.getModel());m.maxFitScale=1;m.fit(8);m.center();return a};F.style.display="none";F.innerHTML="";A=e;z=c;t=parseSelectFunction=null;f=0;if("mxfile"==g.nodeName){e=g.getElementsByTagName("diagram");t=[];for(c=0;c<e.length;c++)t.push(e[c]);f=Math.min(n,t.length-1);0<t.length&&q(t[f]);if(1<t.length)for(F.removeAttribute("disabled"), -F.style.display="",c=0;c<t.length;c++)e=document.createElement("option"),mxUtils.write(e,t[c].getAttribute("name")||mxResources.get("pageWithNumber",[c+1])),e.setAttribute("value",c),c==f&&e.setAttribute("selected","selected"),F.appendChild(e);I=function(){try{var b=parseInt(F.value);q(t[b]);f=n=b}catch(M){F.value=n,a.handleError(M)}}}else y(g);c=b.lastModifyingUserName;null!=c&&20<c.length&&(c=c.substring(0,20)+"...");x.innerHTML="";mxUtils.write(x,(null!=c?c+" ":"")+d.toLocaleDateString()+" "+d.toLocaleTimeString()); -x.setAttribute("title",l.getAttribute("title"));C.removeAttribute("disabled");v.removeAttribute("disabled");B.removeAttribute("disabled");D.removeAttribute("disabled");null!=u&&u.isRestricted()||(a.editor.graph.isEnabled()&&H.removeAttribute("disabled"),J.removeAttribute("disabled"),E.removeAttribute("disabled"),G.removeAttribute("disabled"));mxUtils.setOpacity(C,60);mxUtils.setOpacity(v,60);mxUtils.setOpacity(B,60);mxUtils.setOpacity(D,60)}else F.style.display="none",F.innerHTML="",x.innerHTML="", -mxUtils.write(x,mxResources.get("errorLoadingFile"))},l=document.createElement("tr");l.style.borderBottom="1px solid lightGray";l.style.fontSize="12px";l.style.cursor="pointer";var g=document.createElement("td");g.style.padding="6px";g.style.whiteSpace="nowrap";b==c[c.length-1]?mxUtils.write(g,mxResources.get("current")):d.toDateString()===T?mxUtils.write(g,d.toLocaleTimeString()):mxUtils.write(g,d.toLocaleDateString()+" "+d.toLocaleTimeString());l.appendChild(g);l.setAttribute("title",d.toLocaleDateString()+ -" "+d.toLocaleTimeString()+(null!=b.fileSize?" "+a.formatFileSize(parseInt(b.fileSize)):"")+(null!=b.lastModifyingUserName?" "+b.lastModifyingUserName:""));mxEvent.addListener(l,"click",function(a){q!=b&&(p.stop(),null!=y&&(y.style.backgroundColor=""),q=b,y=l,y.style.backgroundColor="#ebf2f9",z=A=null,x.removeAttribute("title"),x.innerHTML=mxUtils.htmlEntities(mxResources.get("loading")+"..."),k.style.backgroundColor="#ffffff",m.getModel().clear(),H.setAttribute("disabled","disabled"),J.setAttribute("disabled", -"disabled"),C.setAttribute("disabled","disabled"),v.setAttribute("disabled","disabled"),D.setAttribute("disabled","disabled"),B.setAttribute("disabled","disabled"),G.setAttribute("disabled","disabled"),E.setAttribute("disabled","disabled"),F.setAttribute("disabled","disabled"),mxUtils.setOpacity(C,20),mxUtils.setOpacity(v,20),mxUtils.setOpacity(B,20),mxUtils.setOpacity(D,20),p.spin(k),b.getXml(function(a){if(q==b)try{e(a)}catch(aa){x.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+": "+aa.message)}}, -function(a){p.stop();F.style.display="none";F.innerHTML="";x.innerHTML="";mxUtils.write(x,mxResources.get("errorLoadingFile"))}),mxEvent.consume(a))});mxEvent.addListener(l,"dblclick",function(a){E.click();window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(a)},!1);X.appendChild(l)}return l}(c[L]);null!=W&&L==c.length-1&&(N=W)}R.appendChild(X);e.appendChild(R)}else null==u||null==a.drive&&u.constructor==window.DriveFile||null== -a.dropbox&&u.constructor==window.DropboxFile?(k.style.display="none",K.style.display="none",mxUtils.write(e,mxResources.get("notAvailable"))):(k.style.display="none",K.style.display="none",mxUtils.write(e,mxResources.get("noRevisions")));this.init=function(){null!=N&&N.click()};e=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});e.className="geBtn";K.appendChild(F);K.appendChild(C);K.appendChild(v);K.appendChild(D);K.appendChild(B);a.editor.cancelFirst?(g.appendChild(e),g.appendChild(J), -g.appendChild(G),g.appendChild(H),g.appendChild(E)):(g.appendChild(J),g.appendChild(G),g.appendChild(H),g.appendChild(E),g.appendChild(e));d.appendChild(g);d.appendChild(K);d.appendChild(x);this.container=d},DraftDialog=function(a,c,b,d,g,e,k,m){var n=document.createElement("div"),t=document.createElement("div");t.style.marginTop="0px";t.style.whiteSpace="nowrap";t.style.overflow="auto";mxUtils.write(t,c);n.appendChild(t);var f=document.createElement("div");f.style.position="absolute";f.style.border= -"1px solid lightGray";f.style.marginTop="10px";f.style.width="640px";f.style.top="46px";f.style.bottom="74px";f.style.overflow="hidden";mxEvent.disableContextMenu(f);n.appendChild(f);var l=new Graph(f);l.setEnabled(!1);l.setPanning(!0);l.panningHandler.ignoreCell=!0;l.panningHandler.useLeftButtonForPanning=!0;l.minFitScale=null;l.maxFitScale=null;l.centerZoom=!0;c=mxUtils.parseXml(b);var p=a.editor.extractGraphModel(c.documentElement,!0),u=0,y=null,q=l.getGlobalVariable;l.getGlobalVariable=function(a){return"page"== -a&&null!=y&&null!=y[u]?y[u].getAttribute("name"):"pagenumber"==a?u+1:q.apply(this,arguments)};l.getLinkForCell=function(){return null};c=mxUtils.button("",function(){l.zoomIn()});c.className="geSprite geSprite-zoomin";c.setAttribute("title",mxResources.get("zoomIn"));c.style.outline="none";c.style.border="none";c.style.margin="2px";mxUtils.setOpacity(c,60);b=mxUtils.button("",function(){l.zoomOut()});b.className="geSprite geSprite-zoomout";b.setAttribute("title",mxResources.get("zoomOut"));b.style.outline= -"none";b.style.border="none";b.style.margin="2px";mxUtils.setOpacity(b,60);t=mxUtils.button("",function(){l.maxFitScale=8;l.fit(8);l.center()});t.className="geSprite geSprite-fit";t.setAttribute("title",mxResources.get("fit"));t.style.outline="none";t.style.border="none";t.style.margin="2px";mxUtils.setOpacity(t,60);var A=mxUtils.button("",function(){l.zoomActual();l.center()});A.className="geSprite geSprite-actualsize";A.setAttribute("title",mxResources.get("actualSize"));A.style.outline="none"; -A.style.border="none";A.style.margin="2px";mxUtils.setOpacity(A,60);g=mxUtils.button(k||mxResources.get("discard"),g);g.className="geBtn";var z=document.createElement("select");z.style.maxWidth="80px";z.style.position="relative";z.style.top="-2px";z.style.verticalAlign="bottom";z.style.marginRight="6px";z.style.display="none";d=mxUtils.button(e||mxResources.get("edit"),d);d.className="geBtn gePrimaryBtn";e=document.createElement("div");e.style.position="absolute";e.style.bottom="30px";e.style.width= +"376px";k.style.overflow="hidden";mxEvent.disableContextMenu(k);d.appendChild(k);var m=new Graph(k);m.setTooltips(!1);m.setEnabled(!1);m.setPanning(!0);m.panningHandler.ignoreCell=!0;m.panningHandler.useLeftButtonForPanning=!0;m.minFitScale=null;m.maxFitScale=null;m.centerZoom=!0;var n=0,q=null,f=0,l=m.getGlobalVariable;m.getGlobalVariable=function(a){return"page"==a&&null!=q&&null!=q[f]?q[f].getAttribute("name"):"pagenumber"==a?f+1:l.apply(this,arguments)};m.getLinkForCell=function(){return null}; +Editor.MathJaxRender&&m.addListener(mxEvent.SIZE,mxUtils.bind(this,function(b,c){a.editor.graph.mathEnabled&&Editor.MathJaxRender(m.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%"}),u=a.getCurrentFile(),v=null,t=null,z=null,y=null,C=mxUtils.button("",function(){null!=z&&m.zoomIn()});C.className="geSprite geSprite-zoomin";C.setAttribute("title", +mxResources.get("zoomIn"));C.style.outline="none";C.style.border="none";C.style.margin="2px";C.setAttribute("disabled","disabled");mxUtils.setOpacity(C,20);var B=mxUtils.button("",function(){null!=z&&m.zoomOut()});B.className="geSprite geSprite-zoomout";B.setAttribute("title",mxResources.get("zoomOut"));B.style.outline="none";B.style.border="none";B.style.margin="2px";B.setAttribute("disabled","disabled");mxUtils.setOpacity(B,20);var x=mxUtils.button("",function(){null!=z&&(m.maxFitScale=8,m.fit(8), +m.center())});x.className="geSprite geSprite-fit";x.setAttribute("title",mxResources.get("fit"));x.style.outline="none";x.style.border="none";x.style.margin="2px";x.setAttribute("disabled","disabled");mxUtils.setOpacity(x,20);var D=mxUtils.button("",function(){null!=z&&(m.zoomActual(),m.center())});D.className="geSprite geSprite-actualsize";D.setAttribute("title",mxResources.get("actualSize"));D.style.outline="none";D.style.border="none";D.style.margin="2px";D.setAttribute("disabled","disabled"); +mxUtils.setOpacity(D,20);var A=document.createElement("div");A.style.position="absolute";A.style.textAlign="right";A.style.color="gray";A.style.marginTop="10px";A.style.backgroundColor="transparent";A.style.top="440px";A.style.right="32px";A.style.maxWidth="380px";A.style.cursor="default";var I=mxUtils.button(mxResources.get("download"),function(){if(null!=z){var b=mxUtils.getXml(z.documentElement),c=a.getBaseFilename()+".drawio";a.isLocalFileSave()?a.saveLocalFile(b,c,"text/xml"):(b="undefined"=== +typeof pako?"&xml="+encodeURIComponent(b):"&data="+encodeURIComponent(Graph.compress(b)),(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(c)+"&format=xml"+b)).simulate(document,"_blank"))}});I.className="geBtn";I.setAttribute("disabled","disabled");var H=mxUtils.button(mxResources.get("restore"),function(){null!=z&&null!=y&&a.confirm(mxResources.get("areYouSure"),function(){null!=b?b(y):a.spinner.spin(document.body,mxResources.get("restoring"))&&u.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 F=document.createElement("select");F.setAttribute("disabled","disabled");F.style.maxWidth="80px";F.style.position="relative";F.style.top="-2px";F.style.verticalAlign="bottom";F.style.marginRight="6px";F.style.display="none";var G=null;mxEvent.addListener(F,"change",function(a){null!=G&&(G(a),mxEvent.consume(a))}); +var J=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))});J.className="geBtn";J.setAttribute("disabled","disabled");null!=b&&(J.style.display="none");var E=mxUtils.button(mxResources.get("show"),function(){null!=t&&a.openLink(t.getUrl(F.selectedIndex))});E.className="geBtn gePrimaryBtn";E.setAttribute("disabled","disabled");null!=b&&(E.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 L=document.createElement("div");L.className="geToolbarContainer";L.style.backgroundColor="transparent";L.style.padding="2px";L.style.border="none";L.style.left="199px";L.style.top="442px";var K=null;if(null!=c&&0<c.length){k.style.cursor="move";var R=document.createElement("table");R.style.border="1px solid lightGray";R.style.borderCollapse= +"collapse";R.style.borderSpacing="0px";R.style.width="100%";var X=document.createElement("tbody"),T=(new Date).toDateString();null!=a.currentPage&&null!=a.pages&&(n=mxUtils.indexOf(a.pages,a.currentPage));for(var M=c.length-1;0<=M;M--){var W=function(b){var d=new Date(b.modifiedDate),l=null;if(0<=d.getTime()){var e=function(c){p.stop();var e=mxUtils.parseXml(c),g=a.editor.extractGraphModel(e.documentElement,!0);if(null!=g){var t=function(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,m.getModel());m.maxFitScale=1;m.fit(8);m.center();return a};F.style.display="none";F.innerHTML="";z=e;y=c;q=parseSelectFunction=null;f=0;if("mxfile"==g.nodeName){e=g.getElementsByTagName("diagram");q=[];for(c=0;c<e.length;c++)q.push(e[c]);f=Math.min(n,q.length-1);0<q.length&&t(q[f]);if(1<q.length)for(F.removeAttribute("disabled"), +F.style.display="",c=0;c<q.length;c++)e=document.createElement("option"),mxUtils.write(e,q[c].getAttribute("name")||mxResources.get("pageWithNumber",[c+1])),e.setAttribute("value",c),c==f&&e.setAttribute("selected","selected"),F.appendChild(e);G=function(){try{var b=parseInt(F.value);t(q[b]);f=n=b}catch(N){F.value=n,a.handleError(N)}}}else v(g);c=b.lastModifyingUserName;null!=c&&20<c.length&&(c=c.substring(0,20)+"...");A.innerHTML="";mxUtils.write(A,(null!=c?c+" ":"")+d.toLocaleDateString()+" "+d.toLocaleTimeString()); +A.setAttribute("title",l.getAttribute("title"));C.removeAttribute("disabled");B.removeAttribute("disabled");x.removeAttribute("disabled");D.removeAttribute("disabled");null!=u&&u.isRestricted()||(a.editor.graph.isEnabled()&&H.removeAttribute("disabled"),I.removeAttribute("disabled"),E.removeAttribute("disabled"),J.removeAttribute("disabled"));mxUtils.setOpacity(C,60);mxUtils.setOpacity(B,60);mxUtils.setOpacity(x,60);mxUtils.setOpacity(D,60)}else F.style.display="none",F.innerHTML="",A.innerHTML="", +mxUtils.write(A,mxResources.get("errorLoadingFile"))},l=document.createElement("tr");l.style.borderBottom="1px solid lightGray";l.style.fontSize="12px";l.style.cursor="pointer";var g=document.createElement("td");g.style.padding="6px";g.style.whiteSpace="nowrap";b==c[c.length-1]?mxUtils.write(g,mxResources.get("current")):d.toDateString()===T?mxUtils.write(g,d.toLocaleTimeString()):mxUtils.write(g,d.toLocaleDateString()+" "+d.toLocaleTimeString());l.appendChild(g);l.setAttribute("title",d.toLocaleDateString()+ +" "+d.toLocaleTimeString()+(null!=b.fileSize?" "+a.formatFileSize(parseInt(b.fileSize)):"")+(null!=b.lastModifyingUserName?" "+b.lastModifyingUserName:""));mxEvent.addListener(l,"click",function(a){t!=b&&(p.stop(),null!=v&&(v.style.backgroundColor=""),t=b,v=l,v.style.backgroundColor="#ebf2f9",y=z=null,A.removeAttribute("title"),A.innerHTML=mxUtils.htmlEntities(mxResources.get("loading")+"..."),k.style.backgroundColor="#ffffff",m.getModel().clear(),H.setAttribute("disabled","disabled"),I.setAttribute("disabled", +"disabled"),C.setAttribute("disabled","disabled"),B.setAttribute("disabled","disabled"),D.setAttribute("disabled","disabled"),x.setAttribute("disabled","disabled"),J.setAttribute("disabled","disabled"),E.setAttribute("disabled","disabled"),F.setAttribute("disabled","disabled"),mxUtils.setOpacity(C,20),mxUtils.setOpacity(B,20),mxUtils.setOpacity(x,20),mxUtils.setOpacity(D,20),p.spin(k),b.getXml(function(a){if(t==b)try{e(a)}catch(aa){A.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+": "+aa.message)}}, +function(a){p.stop();F.style.display="none";F.innerHTML="";A.innerHTML="";mxUtils.write(A,mxResources.get("errorLoadingFile"))}),mxEvent.consume(a))});mxEvent.addListener(l,"dblclick",function(a){E.click();window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(a)},!1);X.appendChild(l)}return l}(c[M]);null!=W&&M==c.length-1&&(K=W)}R.appendChild(X);e.appendChild(R)}else null==u||null==a.drive&&u.constructor==window.DriveFile||null== +a.dropbox&&u.constructor==window.DropboxFile?(k.style.display="none",L.style.display="none",mxUtils.write(e,mxResources.get("notAvailable"))):(k.style.display="none",L.style.display="none",mxUtils.write(e,mxResources.get("noRevisions")));this.init=function(){null!=K&&K.click()};e=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});e.className="geBtn";L.appendChild(F);L.appendChild(C);L.appendChild(B);L.appendChild(D);L.appendChild(x);a.editor.cancelFirst?(g.appendChild(e),g.appendChild(I), +g.appendChild(J),g.appendChild(H),g.appendChild(E)):(g.appendChild(I),g.appendChild(J),g.appendChild(H),g.appendChild(E),g.appendChild(e));d.appendChild(g);d.appendChild(L);d.appendChild(A);this.container=d},DraftDialog=function(a,c,b,d,g,e,k,m){var n=document.createElement("div"),q=document.createElement("div");q.style.marginTop="0px";q.style.whiteSpace="nowrap";q.style.overflow="auto";mxUtils.write(q,c);n.appendChild(q);var f=document.createElement("div");f.style.position="absolute";f.style.border= +"1px solid lightGray";f.style.marginTop="10px";f.style.width="640px";f.style.top="46px";f.style.bottom="74px";f.style.overflow="hidden";mxEvent.disableContextMenu(f);n.appendChild(f);var l=new Graph(f);l.setEnabled(!1);l.setPanning(!0);l.panningHandler.ignoreCell=!0;l.panningHandler.useLeftButtonForPanning=!0;l.minFitScale=null;l.maxFitScale=null;l.centerZoom=!0;c=mxUtils.parseXml(b);var p=a.editor.extractGraphModel(c.documentElement,!0),u=0,v=null,t=l.getGlobalVariable;l.getGlobalVariable=function(a){return"page"== +a&&null!=v&&null!=v[u]?v[u].getAttribute("name"):"pagenumber"==a?u+1:t.apply(this,arguments)};l.getLinkForCell=function(){return null};c=mxUtils.button("",function(){l.zoomIn()});c.className="geSprite geSprite-zoomin";c.setAttribute("title",mxResources.get("zoomIn"));c.style.outline="none";c.style.border="none";c.style.margin="2px";mxUtils.setOpacity(c,60);b=mxUtils.button("",function(){l.zoomOut()});b.className="geSprite geSprite-zoomout";b.setAttribute("title",mxResources.get("zoomOut"));b.style.outline= +"none";b.style.border="none";b.style.margin="2px";mxUtils.setOpacity(b,60);q=mxUtils.button("",function(){l.maxFitScale=8;l.fit(8);l.center()});q.className="geSprite geSprite-fit";q.setAttribute("title",mxResources.get("fit"));q.style.outline="none";q.style.border="none";q.style.margin="2px";mxUtils.setOpacity(q,60);var z=mxUtils.button("",function(){l.zoomActual();l.center()});z.className="geSprite geSprite-actualsize";z.setAttribute("title",mxResources.get("actualSize"));z.style.outline="none"; +z.style.border="none";z.style.margin="2px";mxUtils.setOpacity(z,60);g=mxUtils.button(k||mxResources.get("discard"),g);g.className="geBtn";var y=document.createElement("select");y.style.maxWidth="80px";y.style.position="relative";y.style.top="-2px";y.style.verticalAlign="bottom";y.style.marginRight="6px";y.style.display="none";d=mxUtils.button(e||mxResources.get("edit"),d);d.className="geBtn gePrimaryBtn";e=document.createElement("div");e.style.position="absolute";e.style.bottom="30px";e.style.width= "640px";e.style.textAlign="right";k=document.createElement("div");k.className="geToolbarContainer";k.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";this.init=function(){function a(a){if(null!=a){var b=a.getAttribute("background");if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";f.style.backgroundColor=b;(new mxCodec(a.ownerDocument)).decode(a,l.getModel());l.maxFitScale=1;l.fit(8);l.center()}}function b(b){null!=b&&(b= -a(mxUtils.parseXml(Graph.decompress(mxUtils.getTextContent(b))).documentElement));return b}mxEvent.addListener(z,"change",function(a){u=parseInt(z.value);b(y[u]);mxEvent.consume(a)});if("mxfile"==p.nodeName){var c=p.getElementsByTagName("diagram");y=[];for(var d=0;d<c.length;d++)y.push(c[d]);0<y.length&&b(y[u]);if(1<y.length)for(z.style.display="",d=0;d<y.length;d++)c=document.createElement("option"),mxUtils.write(c,y[d].getAttribute("name")||mxResources.get("pageWithNumber",[d+1])),c.setAttribute("value", -d),d==u&&c.setAttribute("selected","selected"),z.appendChild(c)}else a(p)};k.appendChild(z);k.appendChild(c);k.appendChild(b);k.appendChild(A);k.appendChild(t);c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});c.className="geBtn";m=null!=m?mxUtils.button(mxResources.get("ignore"),m):null;null!=m&&(m.className="geBtn");a.editor.cancelFirst?(e.appendChild(c),null!=m&&e.appendChild(m),e.appendChild(g),e.appendChild(d)):(e.appendChild(d),e.appendChild(g),null!=m&&e.appendChild(m), +a(mxUtils.parseXml(Graph.decompress(mxUtils.getTextContent(b))).documentElement));return b}mxEvent.addListener(y,"change",function(a){u=parseInt(y.value);b(v[u]);mxEvent.consume(a)});if("mxfile"==p.nodeName){var c=p.getElementsByTagName("diagram");v=[];for(var d=0;d<c.length;d++)v.push(c[d]);0<v.length&&b(v[u]);if(1<v.length)for(y.style.display="",d=0;d<v.length;d++)c=document.createElement("option"),mxUtils.write(c,v[d].getAttribute("name")||mxResources.get("pageWithNumber",[d+1])),c.setAttribute("value", +d),d==u&&c.setAttribute("selected","selected"),y.appendChild(c)}else a(p)};k.appendChild(y);k.appendChild(c);k.appendChild(b);k.appendChild(z);k.appendChild(q);c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});c.className="geBtn";m=null!=m?mxUtils.button(mxResources.get("ignore"),m):null;null!=m&&(m.className="geBtn");a.editor.cancelFirst?(e.appendChild(c),null!=m&&e.appendChild(m),e.appendChild(g),e.appendChild(d)):(e.appendChild(d),e.appendChild(g),null!=m&&e.appendChild(m), e.appendChild(c));n.appendChild(e);n.appendChild(k);this.container=n},FindWindow=function(a,c,b,d,g){function e(a,b,c){if("object"===typeof b.value&&null!=b.value.attributes){b=b.value.attributes;for(var f=0;f<b.length;f++)if("label"!=b[f].nodeName){var d=mxUtils.trim(b[f].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==a&&d.substring(0,c.length)===c||null!=a&&a.test(d))return!0}}return!1}function k(){var a=n.model.getDescendants(n.model.getRoot()),b=p.value.toLowerCase(), -c=u.checked?new RegExp(b):null,d=null;t!=b&&(t=b,f=null);var l=null==f;if(0<b.length)for(var g=0;g<a.length;g++){var k=n.view.getState(a[g]);if(null!=k&&null!=k.cell.value&&(l||null==d)&&(n.model.isVertex(k.cell)||n.model.isEdge(k.cell))&&(n.isHtmlLabel(k.cell)?(q.innerHTML=n.getLabel(k.cell),label=mxUtils.extractTextWithWhitespace([q])):label=n.getLabel(k.cell),label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase(),null==c&&(label.substring(0,b.length)===b||e(c,k.cell,b))|| -null!=c&&(c.test(label)||e(c,k.cell,b))))if(l){d=k;break}else null==d&&(d=k);l=l||k==f}null!=d?(f=d,n.scrollCellToVisible(f.cell),n.isEnabled()?n.setSelectionCell(f.cell):n.highlightCell(f.cell)):n.isEnabled()&&n.clearSelection();return 0==b.length||null!=d}var m=a.actions.get("find"),n=a.editor.graph,t=null,f=null,l=document.createElement("div");l.style.userSelect="none";l.style.overflow="hidden";l.style.padding="10px";l.style.height="100%";var p=document.createElement("input");p.setAttribute("placeholder", -mxResources.get("find"));p.setAttribute("type","text");p.style.marginTop="4px";p.style.marginBottom="6px";p.style.width="200px";p.style.fontSize="12px";p.style.borderRadius="4px";p.style.padding="6px";l.appendChild(p);mxUtils.br(l);var u=document.createElement("input");u.setAttribute("type","checkbox");u.style.marginRight="4px";l.appendChild(u);mxUtils.write(l,mxResources.get("regularExpression"));var y=a.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000088250");y.style.position= -"relative";y.style.marginLeft="6px";y.style.top="-1px";l.appendChild(y);var q=document.createElement("div");mxUtils.br(l);y=mxUtils.button(mxResources.get("reset"),function(){p.value="";p.style.backgroundColor="";t=f=null;p.focus()});y.setAttribute("title",mxResources.get("reset"));y.style.marginTop="6px";y.style.marginRight="4px";y.className="geBtn";l.appendChild(y);y=mxUtils.button(mxResources.get("find"),function(){try{p.style.backgroundColor=k()?"":"#ffcfcf"}catch(z){a.handleError(z)}});y.setAttribute("title", -mxResources.get("find")+" (Enter)");y.style.marginTop="6px";y.className="geBtn gePrimaryBtn";l.appendChild(y);mxEvent.addListener(p,"keyup",function(a){if(91==a.keyCode||17==a.keyCode)mxEvent.consume(a);else if(27==a.keyCode)m.funct();else if(t!=p.value.toLowerCase()||13==a.keyCode)try{p.style.backgroundColor=k()?"":"#ffcfcf"}catch(C){p.style.backgroundColor="#ffcfcf"}});mxEvent.addListener(l,"keydown",function(b){70==b.keyCode&&a.keyHandler.isControlDown(b)&&!mxEvent.isShiftDown(b)&&(m.funct(),mxEvent.consume(b))}); +c=u.checked?new RegExp(b):null,d=null;q!=b&&(q=b,f=null);var l=null==f;if(0<b.length)for(var g=0;g<a.length;g++){var k=n.view.getState(a[g]);if(null!=k&&null!=k.cell.value&&(l||null==d)&&(n.model.isVertex(k.cell)||n.model.isEdge(k.cell))&&(n.isHtmlLabel(k.cell)?(t.innerHTML=n.getLabel(k.cell),label=mxUtils.extractTextWithWhitespace([t])):label=n.getLabel(k.cell),label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase(),null==c&&(label.substring(0,b.length)===b||e(c,k.cell,b))|| +null!=c&&(c.test(label)||e(c,k.cell,b))))if(l){d=k;break}else null==d&&(d=k);l=l||k==f}null!=d?(f=d,n.scrollCellToVisible(f.cell),n.isEnabled()?n.setSelectionCell(f.cell):n.highlightCell(f.cell)):n.isEnabled()&&n.clearSelection();return 0==b.length||null!=d}var m=a.actions.get("find"),n=a.editor.graph,q=null,f=null,l=document.createElement("div");l.style.userSelect="none";l.style.overflow="hidden";l.style.padding="10px";l.style.height="100%";var p=document.createElement("input");p.setAttribute("placeholder", +mxResources.get("find"));p.setAttribute("type","text");p.style.marginTop="4px";p.style.marginBottom="6px";p.style.width="200px";p.style.fontSize="12px";p.style.borderRadius="4px";p.style.padding="6px";l.appendChild(p);mxUtils.br(l);var u=document.createElement("input");u.setAttribute("type","checkbox");u.style.marginRight="4px";l.appendChild(u);mxUtils.write(l,mxResources.get("regularExpression"));var v=a.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000088250");v.style.position= +"relative";v.style.marginLeft="6px";v.style.top="-1px";l.appendChild(v);var t=document.createElement("div");mxUtils.br(l);v=mxUtils.button(mxResources.get("reset"),function(){p.value="";p.style.backgroundColor="";q=f=null;p.focus()});v.setAttribute("title",mxResources.get("reset"));v.style.marginTop="6px";v.style.marginRight="4px";v.className="geBtn";l.appendChild(v);v=mxUtils.button(mxResources.get("find"),function(){try{p.style.backgroundColor=k()?"":"#ffcfcf"}catch(y){a.handleError(y)}});v.setAttribute("title", +mxResources.get("find")+" (Enter)");v.style.marginTop="6px";v.className="geBtn gePrimaryBtn";l.appendChild(v);mxEvent.addListener(p,"keyup",function(a){if(91==a.keyCode||17==a.keyCode)mxEvent.consume(a);else if(27==a.keyCode)m.funct();else if(q!=p.value.toLowerCase()||13==a.keyCode)try{p.style.backgroundColor=k()?"":"#ffcfcf"}catch(C){p.style.backgroundColor="#ffcfcf"}});mxEvent.addListener(l,"keydown",function(b){70==b.keyCode&&a.keyHandler.isControlDown(b)&&!mxEvent.isShiftDown(b)&&(m.funct(),mxEvent.consume(b))}); this.window=new mxWindow(mxResources.get("find"),l,c,b,d,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()?(p.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?p.select():document.execCommand("selectAll",!1,null)):n.container.focus()}));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 A=mxUtils.bind(this,function(){var a=this.window.getX(),b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window,"resize",A);this.destroy= -function(){mxEvent.removeListener(window,"resize",A);this.window.destroy()}},FreehandWindow=function(a,c,b,d,g){var e=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(){e.freehand.isDrawing()&&e.freehand.stopDrawing();e.freehand.startDrawing()});k.setAttribute("title",mxResources.get("startDrawing"));k.style.marginTop="8px";k.style.marginRight="4px";k.style.width="160px"; +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 z=mxUtils.bind(this,function(){var a=this.window.getX(),b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window,"resize",z);this.destroy= +function(){mxEvent.removeListener(window,"resize",z);this.window.destroy()}},FreehandWindow=function(a,c,b,d,g){var e=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(){e.freehand.isDrawing()&&e.freehand.stopDrawing();e.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 m=k.cloneNode(!1);mxUtils.write(m,mxResources.get("stopDrawing"));m.setAttribute("title",mxResources.get("stopDrawing"));m.style.marginTop="4px";mxEvent.addListener(m,"click",function(){e.freehand.stopDrawing()});a.appendChild(m);this.window=new mxWindow(mxResources.get("freehand"),a,c,b,d,g,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1); this.window.setClosable(!0);e.addListener("freehandStateChanged",mxUtils.bind(this,function(){m.className="geBtn"+(e.freehand.isDrawing()?" gePrimaryBtn":"")}));this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit()}));this.window.addListener("hide",mxUtils.bind(this,function(){e.freehand.isDrawing()&&e.freehand.stopDrawing()}));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 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,c,b,d,g){var e=a.editor.graph,k="tags",m=document.createElement("div");m.style.userSelect="none";m.style.overflow="hidden";m.style.padding="10px";m.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";m.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";m.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(m);t=mxUtils.button(mxResources.get("hide"), -function(){var a=e.getCellsForTags(n.value.split(" "),void 0,k,!0);e.setCellsVisible(a,!1)});t.setAttribute("title",mxResources.get("hide"));t.style.marginTop="8px";t.style.marginRight="4px";t.className="geBtn";m.appendChild(t);t=mxUtils.button(mxResources.get("show"),function(){var a=e.getCellsForTags(n.value.split(" "),void 0,k,!0);e.setCellsVisible(a,!0);if(e.isEnabled()){for(var b=[],c=0;c<a.length;c++)(e.model.isVertex(a[c])||e.model.isEdge(a[c]))&&b.push(a[c]);e.setSelectionCells(b)}else for(c= -0;c<a.length;c++)e.highlightCell(a[c])});t.setAttribute("title",mxResources.get("show"));t.style.marginTop="8px";t.style.marginRight="4px";t.className="geBtn";m.appendChild(t);var f=a.actions.get("tags"),t=mxUtils.button(mxResources.get("close"),function(){f.funct()});t.setAttribute("title",mxResources.get("close")+" (Enter/Esc)");t.style.marginTop="8px";t.className="geBtn gePrimaryBtn";m.appendChild(t);mxEvent.addListener(n,"keyup",function(a){13!=a.keyCode&&27!=a.keyCode||f.funct()});this.window= +var q=a.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000046966");q.firstChild.style.marginBottom="6px";q.style.marginLeft="6px";m.appendChild(q)}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(m);q=mxUtils.button(mxResources.get("hide"), +function(){var a=e.getCellsForTags(n.value.split(" "),void 0,k,!0);e.setCellsVisible(a,!1)});q.setAttribute("title",mxResources.get("hide"));q.style.marginTop="8px";q.style.marginRight="4px";q.className="geBtn";m.appendChild(q);q=mxUtils.button(mxResources.get("show"),function(){var a=e.getCellsForTags(n.value.split(" "),void 0,k,!0);e.setCellsVisible(a,!0);if(e.isEnabled()){for(var b=[],c=0;c<a.length;c++)(e.model.isVertex(a[c])||e.model.isEdge(a[c]))&&b.push(a[c]);e.setSelectionCells(b)}else for(c= +0;c<a.length;c++)e.highlightCell(a[c])});q.setAttribute("title",mxResources.get("show"));q.style.marginTop="8px";q.style.marginRight="4px";q.className="geBtn";m.appendChild(q);var f=a.actions.get("tags"),q=mxUtils.button(mxResources.get("close"),function(){f.funct()});q.setAttribute("title",mxResources.get("close")+" (Enter/Esc)");q.style.marginTop="8px";q.className="geBtn gePrimaryBtn";m.appendChild(q);mxEvent.addListener(n,"keyup",function(a){13!=a.keyCode&&27!=a.keyCode||f.funct()});this.window= new mxWindow(mxResources.get("tags"),m,c,b,d,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)):e.container.focus()}));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 l=mxUtils.bind(this,function(){var a=this.window.getX(),b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window,"resize",l);this.destroy= function(){mxEvent.removeListener(window,"resize",l);this.window.destroy()}},AuthDialog=function(a,c,b,d){var g=document.createElement("div");g.style.textAlign="center";var e=document.createElement("p");e.style.fontSize="16pt";e.style.padding="0px";e.style.margin="0px";e.style.color="gray";mxUtils.write(e,mxResources.get("authorizationRequired"));var k="Unknown",m=document.createElement("img");m.setAttribute("border","0");m.setAttribute("align","absmiddle");m.style.marginRight="10px";c==a.drive?(k= mxResources.get("googleDrive"),m.src=IMAGE_PATH+"/google-drive-logo-white.svg"):c==a.dropbox?(k=mxResources.get("dropbox"),m.src=IMAGE_PATH+"/dropbox-logo-white.svg"):c==a.oneDrive?(k=mxResources.get("oneDrive"),m.src=IMAGE_PATH+"/onedrive-logo-white.svg"):c==a.gitHub?(k=mxResources.get("github"),m.src=IMAGE_PATH+"/github-logo-white.svg"):c==a.gitLab?(k=mxResources.get("gitlab"),m.src=IMAGE_PATH+"/gitlab-logo.svg",m.style.width="32px"):c==a.trello&&(k=mxResources.get("trello"),m.src=IMAGE_PATH+"/trello-logo-white.svg"); a=document.createElement("p");mxUtils.write(a,mxResources.get("authorizeThisAppIn",[k]));var n=document.createElement("input");n.setAttribute("type","checkbox");k=mxUtils.button(mxResources.get("authorize"),function(){d(n.checked)});k.insertBefore(m,k.firstChild);k.style.marginTop="6px";k.className="geBigButton";g.appendChild(e);g.appendChild(a);g.appendChild(k);b&&(b=document.createElement("p"),b.style.marginTop="20px",b.appendChild(n),e=document.createElement("span"),mxUtils.write(e," "+mxResources.get("rememberMe")), -b.appendChild(e),g.appendChild(b),n.checked=!0,n.defaultChecked=!0,mxEvent.addListener(e,"click",function(a){n.checked=!n.checked;mxEvent.consume(a)}));this.container=g},MoreShapesDialog=function(a,c,b){b=null!=b?b:a.sidebar.entries;var d=document.createElement("div"),g=[];if(null!=a.sidebar.customEntries)for(var e=0;e<a.sidebar.customEntries.length;e++){for(var k=a.sidebar.customEntries[e],m={title:a.getResource(k.title),entries:[]},n=0;n<k.entries.length;n++){var t=k.entries[n];m.entries.push({id:t.id, -title:a.getResource(t.title),desc:a.getResource(t.desc),image:t.preview})}g.push(m)}for(e=0;e<b.length;e++)if(null==a.sidebar.enabledLibraries)g.push(b[e]);else{m={title:b[e].title,entries:[]};for(n=0;n<b[e].entries.length;n++)0<=mxUtils.indexOf(a.sidebar.enabledLibraries,b[e].entries[n].id)&&m.entries.push(b[e].entries[n]);0<m.entries.length&&g.push(m)}b=g;if(c){n=mxUtils.bind(this,function(b){for(var c=0;c<b.length;c++)(function(b){var d=y.cloneNode(!1);d.style.fontWeight="bold";d.style.backgroundColor= -"dark"==uiTheme?"#505759":"#e5e5e5";d.style.padding="6px 0px 6px 20px";mxUtils.write(d,b.title);f.appendChild(d);for(var e=0;e<b.entries.length;e++)(function(b){var d=y.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= +b.appendChild(e),g.appendChild(b),n.checked=!0,n.defaultChecked=!0,mxEvent.addListener(e,"click",function(a){n.checked=!n.checked;mxEvent.consume(a)}));this.container=g},MoreShapesDialog=function(a,c,b){b=null!=b?b:a.sidebar.entries;var d=document.createElement("div"),g=[];if(null!=a.sidebar.customEntries)for(var e=0;e<a.sidebar.customEntries.length;e++){for(var k=a.sidebar.customEntries[e],m={title:a.getResource(k.title),entries:[]},n=0;n<k.entries.length;n++){var q=k.entries[n];m.entries.push({id:q.id, +title:a.getResource(q.title),desc:a.getResource(q.desc),image:q.preview})}g.push(m)}for(e=0;e<b.length;e++)if(null==a.sidebar.enabledLibraries)g.push(b[e]);else{m={title:b[e].title,entries:[]};for(n=0;n<b[e].entries.length;n++)0<=mxUtils.indexOf(a.sidebar.enabledLibraries,b[e].entries[n].id)&&m.entries.push(b[e].entries[n]);0<m.entries.length&&g.push(m)}b=g;if(c){n=mxUtils.bind(this,function(b){for(var c=0;c<b.length;c++)(function(b){var d=v.cloneNode(!1);d.style.fontWeight="bold";d.style.backgroundColor= +"dark"==uiTheme?"#505759":"#e5e5e5";d.style.padding="6px 0px 6px 20px";mxUtils.write(d,b.title);f.appendChild(d);for(var e=0;e<b.entries.length;e++)(function(b){var d=v.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);f.appendChild(d);var k=function(a){if(null==a||"INPUT"!=mxEvent.getSource(a).nodeName){l.style.textAlign="center";l.style.padding="0px";l.style.color="";l.innerHTML="";if(null!=b.desc){var c=document.createElement("pre");c.style.boxSizing="border-box";c.style.fontFamily="inherit";c.style.margin="20px";c.style.right="0px";c.style.textAlign="left";mxUtils.write(c,b.desc);l.appendChild(c)}null!=b.imageCallback?b.imageCallback(l):null!=b.image?l.innerHTML+= '<img border="0" src="'+b.image+'"/>':null==b.desc&&(l.style.padding="20px",l.style.color="rgb(179, 179, 179)",mxUtils.write(l,mxResources.get("noPreview")));null!=p&&(p.style.backgroundColor="");p=d;p.style.backgroundColor="dark"==uiTheme?"#505759":"#ebf2f9";null!=a&&mxEvent.consume(a)}};mxEvent.addListener(d,"click",k);mxEvent.addListener(d,"dblclick",function(a){g.checked=!g.checked;mxEvent.consume(a)});u.push(function(){return g.checked?b.id:null});0==c&&0==e&&k()})(b.entries[e])})(b[c])});e= document.createElement("div");e.className="geDialogTitle";mxUtils.write(e,mxResources.get("shapes"));e.style.position="absolute";e.style.top="0px";e.style.left="0px";e.style.lineHeight="40px";e.style.height="40px";e.style.right="0px";mxClient.IS_QUIRKS&&(e.style.width="718px");var f=document.createElement("div"),l=document.createElement("div");f.style.position="absolute";f.style.top="40px";f.style.left="0px";f.style.width="202px";f.style.bottom="60px";f.style.overflow="auto";mxClient.IS_QUIRKS&&(f.style.height= -"437px",f.style.marginTop="1px");l.style.position="absolute";l.style.left="202px";l.style.right="0px";l.style.top="40px";l.style.bottom="60px";l.style.overflow="auto";l.style.borderLeft="1px solid rgb(211, 211, 211)";l.style.textAlign="center";mxClient.IS_QUIRKS&&(l.style.width=parseInt(e.style.width)-202+"px",l.style.height=f.style.height,l.style.marginTop=f.style.marginTop);var p=null,u=[],y=document.createElement("div");y.style.position="relative";y.style.left="0px";y.style.right="0px";n(b);d.style.padding= -"30px";d.appendChild(e);d.appendChild(f);d.appendChild(l);b=document.createElement("div");b.className="geDialogFooter";b.style.position="absolute";b.style.paddingRight="16px";b.style.color="gray";b.style.left="0px";b.style.right="0px";b.style.bottom="0px";b.style.height="60px";b.style.lineHeight="52px";mxClient.IS_QUIRKS&&(b.style.width=e.style.width,b.style.paddingTop="12px");var q=document.createElement("input");q.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)e=document.createElement("span"), -e.style.paddingRight="20px",e.appendChild(q),mxUtils.write(e," "+mxResources.get("rememberThisSetting")),q.checked=!0,q.defaultChecked=!0,mxEvent.addListener(e,"click",function(a){mxEvent.getSource(a)!=q&&(q.checked=!q.checked,mxEvent.consume(a))}),mxClient.IS_QUIRKS&&(e.style.position="relative",e.style.top="-6px"),b.appendChild(e);e=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});e.className="geBtn";n=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();for(var b= -[],c=0;c<u.length;c++){var f=u[c].apply(this,arguments);null!=f&&b.push(f)}a.sidebar.showEntries(b.join(";"),q.checked,!0)});n.className="geBtn gePrimaryBtn"}else{var A=document.createElement("table"),e=document.createElement("tbody");d.style.height="100%";d.style.overflow="auto";n=document.createElement("tr");A.style.width="100%";c=document.createElement("td");var g=document.createElement("td"),k=document.createElement("td"),z=mxUtils.bind(this,function(b,c,f){var d=document.createElement("input"); -d.type="checkbox";A.appendChild(d);d.checked=a.sidebar.isEntryVisible(f);var l=document.createElement("span");mxUtils.write(l,c);c=document.createElement("div");c.style.display="block";c.appendChild(d);c.appendChild(l);mxEvent.addListener(l,"click",function(a){d.checked=!d.checked;mxEvent.consume(a)});b.appendChild(c);return function(){return d.checked?f:null}});n.appendChild(c);n.appendChild(g);n.appendChild(k);e.appendChild(n);A.appendChild(e);for(var u=[],C=0,e=0;e<b.length;e++)for(n=0;n<b[e].entries.length;n++)C++; -for(var v=[c,g,k],B=0,e=0;e<b.length;e++)(function(a){for(var b=0;b<a.entries.length;b++){var c=a.entries[b];u.push(z(v[Math.floor(B/(C/3))],c.title,c.id));B++}})(b[e]);d.appendChild(A);b=document.createElement("div");b.style.marginTop="18px";b.style.textAlign="center";q=document.createElement("input");isLocalStorage&&(q.setAttribute("type","checkbox"),q.checked=!0,q.defaultChecked=!0,b.appendChild(q),e=document.createElement("span"),mxUtils.write(e," "+mxResources.get("rememberThisSetting")),b.appendChild(e), -mxEvent.addListener(e,"click",function(a){q.checked=!q.checked;mxEvent.consume(a)}));d.appendChild(b);e=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});e.className="geBtn";n=mxUtils.button(mxResources.get("apply"),function(){for(var b=["search"],c=0;c<u.length;c++){var f=u[c].apply(this,arguments);null!=f&&b.push(f)}a.sidebar.showEntries(0<b.length?b.join(";"):"",q.checked);a.hideDialog()});n.className="geBtn gePrimaryBtn";b=document.createElement("div");b.style.marginTop="26px"; +"437px",f.style.marginTop="1px");l.style.position="absolute";l.style.left="202px";l.style.right="0px";l.style.top="40px";l.style.bottom="60px";l.style.overflow="auto";l.style.borderLeft="1px solid rgb(211, 211, 211)";l.style.textAlign="center";mxClient.IS_QUIRKS&&(l.style.width=parseInt(e.style.width)-202+"px",l.style.height=f.style.height,l.style.marginTop=f.style.marginTop);var p=null,u=[],v=document.createElement("div");v.style.position="relative";v.style.left="0px";v.style.right="0px";n(b);d.style.padding= +"30px";d.appendChild(e);d.appendChild(f);d.appendChild(l);b=document.createElement("div");b.className="geDialogFooter";b.style.position="absolute";b.style.paddingRight="16px";b.style.color="gray";b.style.left="0px";b.style.right="0px";b.style.bottom="0px";b.style.height="60px";b.style.lineHeight="52px";mxClient.IS_QUIRKS&&(b.style.width=e.style.width,b.style.paddingTop="12px");var t=document.createElement("input");t.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)e=document.createElement("span"), +e.style.paddingRight="20px",e.appendChild(t),mxUtils.write(e," "+mxResources.get("rememberThisSetting")),t.checked=!0,t.defaultChecked=!0,mxEvent.addListener(e,"click",function(a){mxEvent.getSource(a)!=t&&(t.checked=!t.checked,mxEvent.consume(a))}),mxClient.IS_QUIRKS&&(e.style.position="relative",e.style.top="-6px"),b.appendChild(e);e=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});e.className="geBtn";n=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();for(var b= +[],c=0;c<u.length;c++){var f=u[c].apply(this,arguments);null!=f&&b.push(f)}a.sidebar.showEntries(b.join(";"),t.checked,!0)});n.className="geBtn gePrimaryBtn"}else{var z=document.createElement("table"),e=document.createElement("tbody");d.style.height="100%";d.style.overflow="auto";n=document.createElement("tr");z.style.width="100%";c=document.createElement("td");var g=document.createElement("td"),k=document.createElement("td"),y=mxUtils.bind(this,function(b,c,f){var d=document.createElement("input"); +d.type="checkbox";z.appendChild(d);d.checked=a.sidebar.isEntryVisible(f);var l=document.createElement("span");mxUtils.write(l,c);c=document.createElement("div");c.style.display="block";c.appendChild(d);c.appendChild(l);mxEvent.addListener(l,"click",function(a){d.checked=!d.checked;mxEvent.consume(a)});b.appendChild(c);return function(){return d.checked?f:null}});n.appendChild(c);n.appendChild(g);n.appendChild(k);e.appendChild(n);z.appendChild(e);for(var u=[],C=0,e=0;e<b.length;e++)for(n=0;n<b[e].entries.length;n++)C++; +for(var B=[c,g,k],x=0,e=0;e<b.length;e++)(function(a){for(var b=0;b<a.entries.length;b++){var c=a.entries[b];u.push(y(B[Math.floor(x/(C/3))],c.title,c.id));x++}})(b[e]);d.appendChild(z);b=document.createElement("div");b.style.marginTop="18px";b.style.textAlign="center";t=document.createElement("input");isLocalStorage&&(t.setAttribute("type","checkbox"),t.checked=!0,t.defaultChecked=!0,b.appendChild(t),e=document.createElement("span"),mxUtils.write(e," "+mxResources.get("rememberThisSetting")),b.appendChild(e), +mxEvent.addListener(e,"click",function(a){t.checked=!t.checked;mxEvent.consume(a)}));d.appendChild(b);e=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});e.className="geBtn";n=mxUtils.button(mxResources.get("apply"),function(){for(var b=["search"],c=0;c<u.length;c++){var f=u[c].apply(this,arguments);null!=f&&b.push(f)}a.sidebar.showEntries(0<b.length?b.join(";"):"",t.checked);a.hideDialog()});n.className="geBtn gePrimaryBtn";b=document.createElement("div");b.style.marginTop="26px"; b.style.textAlign="right"}a.editor.cancelFirst?(b.appendChild(e),b.appendChild(n)):(b.appendChild(n),b.appendChild(e));d.appendChild(b);this.container=d},PluginsDialog=function(a){function c(){if(0==g.length)d.innerHTML=mxUtils.htmlEntities(mxResources.get("noPlugins"));else{d.innerHTML="";for(var b=0;b<g.length;b++){var l=document.createElement("span");l.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";l.appendChild(p);mxUtils.write(l,g[b]);d.appendChild(l);mxUtils.br(d);mxEvent.addListener(p,"click",function(b){return function(){a.confirm(mxResources.get("delete")+' "'+g[b]+'"?',function(){g.splice(b,1);c()})}}(b))}}}var b=document.createElement("div"),d=document.createElement("div");d.style.height="120px";d.style.overflow="auto";var g=mxSettings.getPlugins().slice();b.appendChild(d);c();var e=mxUtils.button(mxResources.get("add"), function(){var b="",d=urlParams.p;if(null!=d&&0<d.length){for(var p=d.split(";"),d=0;d<p.length;d++){var e=App.pluginRegistry[p[d]];null!=e&&(b+=e+";")}";"==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],f=App.pluginRegistry[b];null!=f&&(b=f);0<b.length&&0>mxUtils.indexOf(g,b)&&g.push(b)}c()}},mxResources.get("enterValue")+" ("+mxResources.get("url")+")");a.showDialog(b.container, -300,80,!0,!0);b.init()});e.className="geBtn";var k=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});k.className="geBtn";var m=mxUtils.button(mxResources.get("apply"),function(){mxSettings.setPlugins(g);mxSettings.save();a.hideDialog();a.alert(mxResources.get("restartForChangeRequired"))});m.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(e),n.appendChild(m)):(n.appendChild(e),n.appendChild(m),n.appendChild(k));b.appendChild(n);this.container=b},CropImageDialog=function(a,c,b){var d=document.createElement("div"),g=document.createElement("table"),e=document.createElement("tbody"),k=document.createElement("tr"),m=document.createElement("td");m.style.whiteSpace="nowrap";m.setAttribute("colspan", -"2");mxUtils.write(m,mxResources.get("loading")+"...");k.appendChild(m);e.appendChild(k);var k=document.createElement("tr"),n=document.createElement("td"),t=document.createElement("td");g.style.paddingLeft="6px";mxUtils.write(n,mxResources.get("left")+":");var f=document.createElement("input");f.setAttribute("type","text");f.style.width="100px";f.value="0";this.init=function(){f.focus();f.select()};t.appendChild(f);k.appendChild(n);k.appendChild(t);e.appendChild(k);k=document.createElement("tr"); -n=document.createElement("td");t=document.createElement("td");mxUtils.write(n,mxResources.get("top")+":");var l=document.createElement("input");l.setAttribute("type","text");l.style.width="100px";l.value="0";t.appendChild(l);k.appendChild(n);k.appendChild(t);e.appendChild(k);k=document.createElement("tr");n=document.createElement("td");t=document.createElement("td");mxUtils.write(n,mxResources.get("right")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.width="100px"; -p.value="0";t.appendChild(p);k.appendChild(n);k.appendChild(t);e.appendChild(k);k=document.createElement("tr");n=document.createElement("td");t=document.createElement("td");mxUtils.write(n,mxResources.get("bottom")+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.width="100px";u.value="0";t.appendChild(u);k.appendChild(n);k.appendChild(t);e.appendChild(k);k=document.createElement("tr");n=document.createElement("td");t=document.createElement("td");mxUtils.write(n,mxResources.get("circle")+ -":");k.appendChild(n);var y=document.createElement("input");y.setAttribute("type","checkbox");t.appendChild(y);k.appendChild(t);e.appendChild(k);g.appendChild(e);d.appendChild(g);g=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});g.className="geBtn";var q=new Image,A=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var c=document.createElement("canvas"),d=c.getContext("2d"),e=q.width,g=q.height,k=parseInt(f.value),x=parseInt(l.value),e=Math.max(1,e-k-parseInt(p.value)), -g=Math.max(1,g-x-parseInt(u.value));c.width=e;c.height=g;y.checked&&(d.fillStyle="#000000",d.arc(e/2,g/2,Math.min(e/2,g/2),0,2*Math.PI),d.fill(),d.globalCompositeOperation="source-in");d.drawImage(q,k,x,e,g,0,0,e,g);b(c.toDataURL())});A.className="geBtn gePrimaryBtn";A.setAttribute("disabled","disabled");q.onload=function(){A.removeAttribute("disabled");m.innerHTML="";mxUtils.write(m,mxResources.get("width")+": "+q.width+" "+mxResources.get("height")+": "+q.height)};q.src=c;mxEvent.addListener(d, -"keypress",function(a){13==a.keyCode&&A.click()});c=document.createElement("div");c.style.marginTop="20px";c.style.textAlign="right";a.editor.cancelFirst?(c.appendChild(g),c.appendChild(A)):(c.appendChild(A),c.appendChild(g));d.appendChild(c);this.container=d},EditGeometryDialog=function(a,c){var b=a.editor.graph,d=1==c.length?b.getCellGeometry(c[0]):null,g=document.createElement("div"),e=document.createElement("table"),k=document.createElement("tbody"),m=document.createElement("tr"),n=document.createElement("td"), -t=document.createElement("td");e.style.paddingLeft="6px";mxUtils.write(n,mxResources.get("relative")+":");var f=document.createElement("input");f.setAttribute("type","checkbox");null!=d&&d.relative&&(f.setAttribute("checked","checked"),f.defaultChecked=!0);this.init=function(){f.focus()};t.appendChild(f);m.appendChild(n);m.appendChild(t);k.appendChild(m);m=document.createElement("tr");n=document.createElement("td");t=document.createElement("td");mxUtils.write(n,mxResources.get("left")+":");var l= -document.createElement("input");l.setAttribute("type","text");l.style.width="100px";l.value=null!=d?d.x:"";t.appendChild(l);m.appendChild(n);m.appendChild(t);k.appendChild(m);m=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!=d?d.y:"";t.appendChild(p);m.appendChild(n);m.appendChild(t);k.appendChild(m);m=document.createElement("tr"); -n=document.createElement("td");t=document.createElement("td");mxUtils.write(n,mxResources.get("dx")+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.width="100px";u.value=null!=d&&null!=d.offset?d.offset.x:"";t.appendChild(u);m.appendChild(n);m.appendChild(t);k.appendChild(m);m=document.createElement("tr");n=document.createElement("td");t=document.createElement("td");mxUtils.write(n,mxResources.get("dy")+":");var y=document.createElement("input");y.setAttribute("type", -"text");y.style.width="100px";y.value=null!=d&&null!=d.offset?d.offset.y:"";t.appendChild(y);m.appendChild(n);m.appendChild(t);k.appendChild(m);m=document.createElement("tr");n=document.createElement("td");t=document.createElement("td");mxUtils.write(n,mxResources.get("width")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.width="100px";q.value=null!=d?d.width:"";t.appendChild(q);m.appendChild(n);m.appendChild(t);k.appendChild(m);m=document.createElement("tr");n= -document.createElement("td");t=document.createElement("td");mxUtils.write(n,mxResources.get("height")+":");var A=document.createElement("input");A.setAttribute("type","text");A.style.width="100px";A.value=null!=d?d.height:"";t.appendChild(A);m.appendChild(n);m.appendChild(t);k.appendChild(m);m=document.createElement("tr");n=document.createElement("td");t=document.createElement("td");mxUtils.write(n,mxResources.get("rotation")+":");var z=document.createElement("input");z.setAttribute("type","text"); -z.style.width="100px";z.value=1==c.length?mxUtils.getValue(b.getCellStyle(c[0]),mxConstants.STYLE_ROTATION,0):"";t.appendChild(z);m.appendChild(n);m.appendChild(t);k.appendChild(m);e.appendChild(k);g.appendChild(e);d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});d.className="geBtn";var C=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();b.getModel().beginUpdate();try{for(var d=0;d<c.length;d++){var e=b.getCellGeometry(c[d]);null!=e&&(e=e.clone(),b.isCellMovable(c[d])&& -(e.relative=f.checked,0<mxUtils.trim(l.value).length&&(e.x=Number(l.value)),0<mxUtils.trim(p.value).length&&(e.y=Number(p.value)),0<mxUtils.trim(u.value).length&&(null==e.offset&&(e.offset=new mxPoint),e.offset.x=Number(u.value)),0<mxUtils.trim(y.value).length&&(null==e.offset&&(e.offset=new mxPoint),e.offset.y=Number(y.value))),b.isCellResizable(c[d])&&(0<mxUtils.trim(q.value).length&&(e.width=Number(q.value)),0<mxUtils.trim(A.value).length&&(e.height=Number(A.value))),b.getModel().setGeometry(c[d], -e));0<mxUtils.trim(z.value).length&&b.setCellStyles(mxConstants.STYLE_ROTATION,Number(z.value),[c[d]])}}finally{b.getModel().endUpdate()}});C.className="geBtn gePrimaryBtn";mxEvent.addListener(g,"keypress",function(a){13==a.keyCode&&C.click()});e=document.createElement("div");e.style.marginTop="20px";e.style.textAlign="right";a.editor.cancelFirst?(e.appendChild(d),e.appendChild(C)):(e.appendChild(C),e.appendChild(d));g.appendChild(e);this.container=g},LibraryDialog=function(a,c,b,d,g,e){function k(a){for(a= -document.elementFromPoint(a.clientX,a.clientY);null!=a&&a.parentNode!=u;)a=a.parentNode;var b=null;if(null!=a)for(var c=u.firstChild,b=0;null!=c&&c!=a;)c=c.nextSibling,b++;return b}function m(b,c,d,l,p,e,g,x,n){try{if(a.spinner.stop(),null==c||"image/"==c.substring(0,6))if(null==b&&null!=g||null==q[b]){var z=function(){G.innerHTML="";G.style.cursor="pointer";G.style.whiteSpace="nowrap";G.style.textOverflow="ellipsis";mxUtils.write(G,null!=N.title&&0<N.title.length?N.title:mxResources.get("untitled")); -G.style.color=null==N.title||0==N.title.length?"#d0d0d0":""};u.style.backgroundImage="";y.style.display="none";var J=p,E=e;if(p>a.maxImageSize||e>a.maxImageSize){var t=Math.min(1,Math.min(a.maxImageSize/Math.max(1,p)),a.maxImageSize/Math.max(1,e));p*=t;e*=t}J>E?(E=Math.round(100*E/J),J=100):(J=Math.round(100*J/E),E=100);var D=document.createElement("div");D.setAttribute("draggable","true");D.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";D.style.position="relative";D.style.cursor="move"; -mxUtils.setPrefixedStyle(D.style,"transition","transform .1s ease-in-out");if(null!=b){var I=document.createElement("img");I.setAttribute("src",v.convert(b));I.style.width=J+"px";I.style.height=E+"px";I.style.margin="10px";I.style.paddingBottom=Math.floor((100-E)/2)+"px";I.style.paddingLeft=Math.floor((100-J)/2)+"px";D.appendChild(I)}else if(null!=g){var H=a.stringToCells(Graph.decompress(g.xml));0<H.length&&(a.sidebar.createThumb(H,100,100,D,null,!0,!1),D.firstChild.style.display=mxClient.IS_QUIRKS? -"inline":"inline-block",D.firstChild.style.cursor="")}var F=document.createElement("img");F.setAttribute("src",Editor.closeImage);F.setAttribute("border","0");F.setAttribute("title",mxResources.get("delete"));F.setAttribute("align","top");F.style.paddingTop="4px";F.style.position="absolute";F.style.marginLeft="-12px";F.style.zIndex="1";F.style.cursor="pointer";mxEvent.addListener(F,"dragstart",function(a){mxEvent.consume(a)});(function(a,b,c){mxEvent.addListener(F,"click",function(d){q[b]=null;for(var l= -0;l<f.length;l++)if(null!=f[l].data&&f[l].data==b||null!=f[l].xml&&null!=c&&f[l].xml==c.xml){f.splice(l,1);break}D.parentNode.removeChild(a);0==f.length&&(u.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",y.style.display="");mxEvent.consume(d)});mxEvent.addListener(F,"dblclick",function(a){mxEvent.consume(a)})})(D,b,g);D.appendChild(F);D.style.marginBottom="30px";var G=document.createElement("div");G.style.position="absolute";G.style.boxSizing="border-box";G.style.bottom="-18px";G.style.left= -"10px";G.style.right="10px";G.style.backgroundColor="#ffffff";G.style.overflow="hidden";G.style.textAlign="center";var N=null;null!=b?(N={data:b,w:p,h:e,title:n},null!=x&&(N.aspect=x),q[b]=I,f.push(N)):null!=g&&(g.aspect="fixed",f.push(g),N=g);mxEvent.addListener(G,"keydown",function(a){13==a.keyCode&&null!=C&&(C(),C=null,mxEvent.consume(a))});z();D.appendChild(G);mxEvent.addListener(G,"mousedown",function(a){"true"!=G.getAttribute("contentEditable")&&mxEvent.consume(a)});H=function(b){if(mxClient.IS_IOS|| -mxClient.IS_QUIRKS||mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var c=new FilenameDialog(a,N.title||"",mxResources.get("ok"),function(a){null!=a&&(N.title=a,z())},mxResources.get("enterValue"));a.showDialog(c.container,300,80,!0,!0);c.init();mxEvent.consume(b)}else if("true"!=G.getAttribute("contentEditable")){null!=C&&(C(),C=null);if(null==N.title||0==N.title.length)G.innerHTML="";G.style.textOverflow="";G.style.whiteSpace="";G.style.cursor="text";G.style.color="";G.setAttribute("contentEditable", -"true");G.focus();document.execCommand("selectAll",!1,null);C=function(){G.removeAttribute("contentEditable");G.style.cursor="pointer";N.title=G.innerHTML;z()};mxEvent.consume(b)}};mxEvent.addListener(G,"click",H);mxEvent.addListener(D,"dblclick",H);u.appendChild(D);mxEvent.addListener(D,"dragstart",function(a){null==b&&null!=g&&(F.style.visibility="hidden",G.style.visibility="hidden");mxClient.IS_FF&&null!=g.xml&&a.dataTransfer.setData("Text",g.xml);A=k(a);mxClient.IS_GC&&(D.style.opacity="0.9"); -window.setTimeout(function(){mxUtils.setPrefixedStyle(D.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(D,30);F.style.visibility="";G.style.visibility=""},0)});mxEvent.addListener(D,"dragend",function(a){"hidden"==F.style.visibility&&(F.style.visibility="",G.style.visibility="");A=null;mxUtils.setOpacity(D,100);mxUtils.setPrefixedStyle(D.style,"transform",null)})}else B||(B=!0,a.handleError({message:mxResources.get("fileExists")}));else{p=!1;try{if(J=mxUtils.parseXml(b),"mxlibrary"==J.documentElement.nodeName){E= -JSON.parse(mxUtils.getTextContent(J.documentElement));if(null!=E&&0<E.length)for(var K=0;K<E.length;K++)null!=E[K].xml?m(null,null,0,0,0,0,E[K]):m(E[K].data,null,0,0,E[K].w,E[K].h,null,"fixed",E[K].title);p=!0}else if("mxfile"==J.documentElement.nodeName){for(var R=J.documentElement.getElementsByTagName("diagram"),K=0;K<R.length;K++){var E=mxUtils.getTextContent(R[K]),H=a.stringToCells(Graph.decompress(E)),Y=a.editor.graph.getBoundingBoxFromGeometry(H);m(null,null,0,0,0,0,{xml:E,w:Y.width,h:Y.height})}p= -!0}}catch(ea){}p||(a.spinner.stop(),a.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(ea){}return null}function n(a){a.dataTransfer.dropEffect=null!=A?"move":"copy";a.stopPropagation();a.preventDefault()}function t(b){b.stopPropagation();b.preventDefault();B=!1;z=k(b);if(null!=A)null!=z&&z<u.children.length?(f.splice(z>A?z-1:z,0,f.splice(A,1)[0]),u.insertBefore(u.children[A],u.children[z])):(f.push(f.splice(A,1)[0]),u.appendChild(u.children[A]));else if(0<b.dataTransfer.files.length)a.importFiles(b.dataTransfer.files, +300,80,!0,!0);b.init()});e.className="geBtn";var k=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});k.className="geBtn";var m=mxUtils.button(mxResources.get("apply"),function(){mxSettings.setPlugins(g);mxSettings.save();a.hideDialog();a.alert(mxResources.get("restartForChangeRequired"))});m.className="geBtn gePrimaryBtn";var n=document.createElement("div");n.style.marginTop="14px";n.style.textAlign="right";var q=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/support/solutions/articles/16000056430")}); +q.className="geBtn";a.isOffline()&&!mxClient.IS_CHROMEAPP&&(q.style.display="none");n.appendChild(q);a.editor.cancelFirst?(n.appendChild(k),n.appendChild(e),n.appendChild(m)):(n.appendChild(e),n.appendChild(m),n.appendChild(k));b.appendChild(n);this.container=b},CropImageDialog=function(a,c,b){var d=document.createElement("div"),g=document.createElement("table"),e=document.createElement("tbody"),k=document.createElement("tr"),m=document.createElement("td");m.style.whiteSpace="nowrap";m.setAttribute("colspan", +"2");mxUtils.write(m,mxResources.get("loading")+"...");k.appendChild(m);e.appendChild(k);var k=document.createElement("tr"),n=document.createElement("td"),q=document.createElement("td");g.style.paddingLeft="6px";mxUtils.write(n,mxResources.get("left")+":");var f=document.createElement("input");f.setAttribute("type","text");f.style.width="100px";f.value="0";this.init=function(){f.focus();f.select()};q.appendChild(f);k.appendChild(n);k.appendChild(q);e.appendChild(k);k=document.createElement("tr"); +n=document.createElement("td");q=document.createElement("td");mxUtils.write(n,mxResources.get("top")+":");var l=document.createElement("input");l.setAttribute("type","text");l.style.width="100px";l.value="0";q.appendChild(l);k.appendChild(n);k.appendChild(q);e.appendChild(k);k=document.createElement("tr");n=document.createElement("td");q=document.createElement("td");mxUtils.write(n,mxResources.get("right")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.width="100px"; +p.value="0";q.appendChild(p);k.appendChild(n);k.appendChild(q);e.appendChild(k);k=document.createElement("tr");n=document.createElement("td");q=document.createElement("td");mxUtils.write(n,mxResources.get("bottom")+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.width="100px";u.value="0";q.appendChild(u);k.appendChild(n);k.appendChild(q);e.appendChild(k);k=document.createElement("tr");n=document.createElement("td");q=document.createElement("td");mxUtils.write(n,mxResources.get("circle")+ +":");k.appendChild(n);var v=document.createElement("input");v.setAttribute("type","checkbox");q.appendChild(v);k.appendChild(q);e.appendChild(k);g.appendChild(e);d.appendChild(g);g=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});g.className="geBtn";var t=new Image,z=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var c=document.createElement("canvas"),d=c.getContext("2d"),e=t.width,g=t.height,k=parseInt(f.value),A=parseInt(l.value),e=Math.max(1,e-k-parseInt(p.value)), +g=Math.max(1,g-A-parseInt(u.value));c.width=e;c.height=g;v.checked&&(d.fillStyle="#000000",d.arc(e/2,g/2,Math.min(e/2,g/2),0,2*Math.PI),d.fill(),d.globalCompositeOperation="source-in");d.drawImage(t,k,A,e,g,0,0,e,g);b(c.toDataURL())});z.className="geBtn gePrimaryBtn";z.setAttribute("disabled","disabled");t.onload=function(){z.removeAttribute("disabled");m.innerHTML="";mxUtils.write(m,mxResources.get("width")+": "+t.width+" "+mxResources.get("height")+": "+t.height)};t.src=c;mxEvent.addListener(d, +"keypress",function(a){13==a.keyCode&&z.click()});c=document.createElement("div");c.style.marginTop="20px";c.style.textAlign="right";a.editor.cancelFirst?(c.appendChild(g),c.appendChild(z)):(c.appendChild(z),c.appendChild(g));d.appendChild(c);this.container=d},EditGeometryDialog=function(a,c){var b=a.editor.graph,d=1==c.length?b.getCellGeometry(c[0]):null,g=document.createElement("div"),e=document.createElement("table"),k=document.createElement("tbody"),m=document.createElement("tr"),n=document.createElement("td"), +q=document.createElement("td");e.style.paddingLeft="6px";mxUtils.write(n,mxResources.get("relative")+":");var f=document.createElement("input");f.setAttribute("type","checkbox");null!=d&&d.relative&&(f.setAttribute("checked","checked"),f.defaultChecked=!0);this.init=function(){f.focus()};q.appendChild(f);m.appendChild(n);m.appendChild(q);k.appendChild(m);m=document.createElement("tr");n=document.createElement("td");q=document.createElement("td");mxUtils.write(n,mxResources.get("left")+":");var l= +document.createElement("input");l.setAttribute("type","text");l.style.width="100px";l.value=null!=d?d.x:"";q.appendChild(l);m.appendChild(n);m.appendChild(q);k.appendChild(m);m=document.createElement("tr");n=document.createElement("td");q=document.createElement("td");mxUtils.write(n,mxResources.get("top")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.width="100px";p.value=null!=d?d.y:"";q.appendChild(p);m.appendChild(n);m.appendChild(q);k.appendChild(m);m=document.createElement("tr"); +n=document.createElement("td");q=document.createElement("td");mxUtils.write(n,mxResources.get("dx")+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.width="100px";u.value=null!=d&&null!=d.offset?d.offset.x:"";q.appendChild(u);m.appendChild(n);m.appendChild(q);k.appendChild(m);m=document.createElement("tr");n=document.createElement("td");q=document.createElement("td");mxUtils.write(n,mxResources.get("dy")+":");var v=document.createElement("input");v.setAttribute("type", +"text");v.style.width="100px";v.value=null!=d&&null!=d.offset?d.offset.y:"";q.appendChild(v);m.appendChild(n);m.appendChild(q);k.appendChild(m);m=document.createElement("tr");n=document.createElement("td");q=document.createElement("td");mxUtils.write(n,mxResources.get("width")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.width="100px";t.value=null!=d?d.width:"";q.appendChild(t);m.appendChild(n);m.appendChild(q);k.appendChild(m);m=document.createElement("tr");n= +document.createElement("td");q=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!=d?d.height:"";q.appendChild(z);m.appendChild(n);m.appendChild(q);k.appendChild(m);m=document.createElement("tr");n=document.createElement("td");q=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==c.length?mxUtils.getValue(b.getCellStyle(c[0]),mxConstants.STYLE_ROTATION,0):"";q.appendChild(y);m.appendChild(n);m.appendChild(q);k.appendChild(m);e.appendChild(k);g.appendChild(e);d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});d.className="geBtn";var C=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();b.getModel().beginUpdate();try{for(var d=0;d<c.length;d++){var e=b.getCellGeometry(c[d]);null!=e&&(e=e.clone(),b.isCellMovable(c[d])&& +(e.relative=f.checked,0<mxUtils.trim(l.value).length&&(e.x=Number(l.value)),0<mxUtils.trim(p.value).length&&(e.y=Number(p.value)),0<mxUtils.trim(u.value).length&&(null==e.offset&&(e.offset=new mxPoint),e.offset.x=Number(u.value)),0<mxUtils.trim(v.value).length&&(null==e.offset&&(e.offset=new mxPoint),e.offset.y=Number(v.value))),b.isCellResizable(c[d])&&(0<mxUtils.trim(t.value).length&&(e.width=Number(t.value)),0<mxUtils.trim(z.value).length&&(e.height=Number(z.value))),b.getModel().setGeometry(c[d], +e));0<mxUtils.trim(y.value).length&&b.setCellStyles(mxConstants.STYLE_ROTATION,Number(y.value),[c[d]])}}finally{b.getModel().endUpdate()}});C.className="geBtn gePrimaryBtn";mxEvent.addListener(g,"keypress",function(a){13==a.keyCode&&C.click()});e=document.createElement("div");e.style.marginTop="20px";e.style.textAlign="right";a.editor.cancelFirst?(e.appendChild(d),e.appendChild(C)):(e.appendChild(C),e.appendChild(d));g.appendChild(e);this.container=g},LibraryDialog=function(a,c,b,d,g,e){function k(a){for(a= +document.elementFromPoint(a.clientX,a.clientY);null!=a&&a.parentNode!=u;)a=a.parentNode;var b=null;if(null!=a)for(var c=u.firstChild,b=0;null!=c&&c!=a;)c=c.nextSibling,b++;return b}function m(b,c,d,l,p,e,g,A,n){try{if(a.spinner.stop(),null==c||"image/"==c.substring(0,6))if(null==b&&null!=g||null==t[b]){var y=function(){K.innerHTML="";K.style.cursor="pointer";K.style.whiteSpace="nowrap";K.style.textOverflow="ellipsis";mxUtils.write(K,null!=J.title&&0<J.title.length?J.title:mxResources.get("untitled")); +K.style.color=null==J.title||0==J.title.length?"#d0d0d0":""};u.style.backgroundImage="";v.style.display="none";var I=p,D=e;if(p>a.maxImageSize||e>a.maxImageSize){var q=Math.min(1,Math.min(a.maxImageSize/Math.max(1,p)),a.maxImageSize/Math.max(1,e));p*=q;e*=q}I>D?(D=Math.round(100*D/I),I=100):(I=Math.round(100*I/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 H=document.createElement("img");H.setAttribute("src",B.convert(b));H.style.width=I+"px";H.style.height=D+"px";H.style.margin="10px";H.style.paddingBottom=Math.floor((100-D)/2)+"px";H.style.paddingLeft=Math.floor((100-I)/2)+"px";E.appendChild(H)}else if(null!=g){var G=a.stringToCells(Graph.decompress(g.xml));0<G.length&&(a.sidebar.createThumb(G,100,100,E,null,!0,!1),E.firstChild.style.display=mxClient.IS_QUIRKS? +"inline":"inline-block",E.firstChild.style.cursor="")}var F=document.createElement("img");F.setAttribute("src",Editor.closeImage);F.setAttribute("border","0");F.setAttribute("title",mxResources.get("delete"));F.setAttribute("align","top");F.style.paddingTop="4px";F.style.position="absolute";F.style.marginLeft="-12px";F.style.zIndex="1";F.style.cursor="pointer";mxEvent.addListener(F,"dragstart",function(a){mxEvent.consume(a)});(function(a,b,c){mxEvent.addListener(F,"click",function(d){t[b]=null;for(var l= +0;l<f.length;l++)if(null!=f[l].data&&f[l].data==b||null!=f[l].xml&&null!=c&&f[l].xml==c.xml){f.splice(l,1);break}E.parentNode.removeChild(a);0==f.length&&(u.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",v.style.display="");mxEvent.consume(d)});mxEvent.addListener(F,"dblclick",function(a){mxEvent.consume(a)})})(E,b,g);E.appendChild(F);E.style.marginBottom="30px";var K=document.createElement("div");K.style.position="absolute";K.style.boxSizing="border-box";K.style.bottom="-18px";K.style.left= +"10px";K.style.right="10px";K.style.backgroundColor="#ffffff";K.style.overflow="hidden";K.style.textAlign="center";var J=null;null!=b?(J={data:b,w:p,h:e,title:n},null!=A&&(J.aspect=A),t[b]=H,f.push(J)):null!=g&&(g.aspect="fixed",f.push(g),J=g);mxEvent.addListener(K,"keydown",function(a){13==a.keyCode&&null!=C&&(C(),C=null,mxEvent.consume(a))});y();E.appendChild(K);mxEvent.addListener(K,"mousedown",function(a){"true"!=K.getAttribute("contentEditable")&&mxEvent.consume(a)});G=function(b){if(mxClient.IS_IOS|| +mxClient.IS_QUIRKS||mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var c=new FilenameDialog(a,J.title||"",mxResources.get("ok"),function(a){null!=a&&(J.title=a,y())},mxResources.get("enterValue"));a.showDialog(c.container,300,80,!0,!0);c.init();mxEvent.consume(b)}else if("true"!=K.getAttribute("contentEditable")){null!=C&&(C(),C=null);if(null==J.title||0==J.title.length)K.innerHTML="";K.style.textOverflow="";K.style.whiteSpace="";K.style.cursor="text";K.style.color="";K.setAttribute("contentEditable", +"true");K.focus();document.execCommand("selectAll",!1,null);C=function(){K.removeAttribute("contentEditable");K.style.cursor="pointer";J.title=K.innerHTML;y()};mxEvent.consume(b)}};mxEvent.addListener(K,"click",G);mxEvent.addListener(E,"dblclick",G);u.appendChild(E);mxEvent.addListener(E,"dragstart",function(a){null==b&&null!=g&&(F.style.visibility="hidden",K.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);F.style.visibility="";K.style.visibility=""},0)});mxEvent.addListener(E,"dragend",function(a){"hidden"==F.style.visibility&&(F.style.visibility="",K.style.visibility="");z=null;mxUtils.setOpacity(E,100);mxUtils.setPrefixedStyle(E.style,"transform",null)})}else x||(x=!0,a.handleError({message:mxResources.get("fileExists")}));else{p=!1;try{if(I=mxUtils.parseXml(b),"mxlibrary"==I.documentElement.nodeName){D= +JSON.parse(mxUtils.getTextContent(I.documentElement));if(null!=D&&0<D.length)for(var L=0;L<D.length;L++)null!=D[L].xml?m(null,null,0,0,0,0,D[L]):m(D[L].data,null,0,0,D[L].w,D[L].h,null,"fixed",D[L].title);p=!0}else if("mxfile"==I.documentElement.nodeName){for(var R=I.documentElement.getElementsByTagName("diagram"),L=0;L<R.length;L++){var D=mxUtils.getTextContent(R[L]),G=a.stringToCells(Graph.decompress(D)),Y=a.editor.graph.getBoundingBoxFromGeometry(G);m(null,null,0,0,0,0,{xml:D,w:Y.width,h:Y.height})}p= +!0}}catch(ea){}p||(a.spinner.stop(),a.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(ea){}return null}function n(a){a.dataTransfer.dropEffect=null!=z?"move":"copy";a.stopPropagation();a.preventDefault()}function q(b){b.stopPropagation();b.preventDefault();x=!1;y=k(b);if(null!=z)null!=y&&y<u.children.length?(f.splice(y>z?y-1:y,0,f.splice(z,1)[0]),u.insertBefore(u.children[z],u.children[y])):(f.push(f.splice(z,1)[0]),u.appendChild(u.children[z]));else if(0<b.dataTransfer.files.length)a.importFiles(b.dataTransfer.files, 0,0,a.maxImageSize,D(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){m(c,null,0,0,a.width,a.height);u.scrollTop=u.scrollHeight})}b.stopPropagation();b.preventDefault()}var f=[];b=document.createElement("div");b.style.height="100%";var l=document.createElement("div");l.style.whiteSpace= "nowrap";l.style.height="40px";b.appendChild(l);mxUtils.write(l,mxResources.get("filename")+":");null==c&&(c=a.defaultLibraryName+".xml");var p=document.createElement("input");p.setAttribute("value",c);p.style.marginRight="20px";p.style.marginLeft="10px";p.style.width="500px";null==g||g.isRenamable()||p.setAttribute("disabled","true");this.init=function(){if(null==g||g.isRenamable())p.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?p.select():document.execCommand("selectAll", -!1,null)};l.appendChild(p);var u=document.createElement("div");u.style.borderWidth="1px 0px 1px 0px";u.style.borderColor="#d3d3d3";u.style.borderStyle="solid";u.style.marginTop="6px";u.style.overflow="auto";u.style.height="340px";u.style.backgroundPosition="center center";u.style.backgroundRepeat="no-repeat";0==f.length&&Graph.fileSupport&&(u.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");var y=document.createElement("div");y.style.position="absolute";y.style.width="640px";y.style.top= -"260px";y.style.textAlign="center";y.style.fontSize="22px";y.style.color="#a0c3ff";mxUtils.write(y,mxResources.get("dragImagesHere"));b.appendChild(y);var q={},A=null,z=null,C=null;c=function(a){"true"!=mxEvent.getSource(a).getAttribute("contentEditable")&&null!=C&&(C(),C=null,mxEvent.consume(a))};mxEvent.addListener(u,"mousedown",c);mxEvent.addListener(u,"pointerdown",c);mxEvent.addListener(u,"touchstart",c);var v=new mxUrlConverter,B=!1;if(null!=d)for(c=0;c<d.length;c++)l=d[c],m(l.data,null,0,0, -l.w,l.h,l,l.aspect,l.title);mxEvent.addListener(u,"dragleave",function(a){y.style.cursor="";for(var b=mxEvent.getSource(a);null!=b;){if(b==u||b==y){a.stopPropagation();a.preventDefault();break}b=b.parentNode}});var D=function(b){return function(c,f,d,l,p,e,g,k,q){null!=q&&(/(\.vsdx)($|\?)/i.test(q.name)||/(\.vssx)($|\?)/i.test(q.name))?a.importVisio(q,mxUtils.bind(this,function(a){m(a,f,d,l,p,e,g,"fixed",mxEvent.isAltDown(b)?null:g.substring(0,g.lastIndexOf(".")).replace(/_/g," "))})):null!=q&&!a.isOffline()&& -(new XMLHttpRequest).upload&&a.isRemoteFileFormat(c,q.name)?a.parseFile(q,mxUtils.bind(this,function(c){4==c.readyState&&(a.spinner.stop(),200<=c.status&&299>=c.status&&(m(c.responseText,f,d,l,p,e,g,"fixed",mxEvent.isAltDown(b)?null:g.substring(0,g.lastIndexOf(".")).replace(/_/g," ")),u.scrollTop=u.scrollHeight))})):(m(c,f,d,l,p,e,g,"fixed",mxEvent.isAltDown(b)?null:g.substring(0,g.lastIndexOf(".")).replace(/_/g," ")),u.scrollTop=u.scrollHeight)}};mxEvent.addListener(u,"dragover",n);mxEvent.addListener(u, -"drop",t);mxEvent.addListener(y,"dragover",n);mxEvent.addListener(y,"drop",t);b.appendChild(u);d=document.createElement("div");d.style.textAlign="right";d.style.marginTop="20px";c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});c.setAttribute("id","btnCancel");c.className="geBtn";a.editor.cancelFirst&&d.appendChild(c);l=mxUtils.button(mxResources.get("export"),function(){var b=a.createLibraryDataFromImages(f),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")});l.setAttribute("id","btnDownload");l.className="geBtn";d.appendChild(l);if(Graph.fileSupport){if(null==a.libDlgFileInputElt){var x=document.createElement("input");x.setAttribute("multiple","multiple");x.setAttribute("type","file");mxEvent.addListener(x,"change",function(b){B=!1;a.importFiles(x.files,0,0,a.maxImageSize,function(a,c,f,d,l,p, -e,g,k){null!=x.files&&(D(b)(a,c,f,d,l,p,e,g,k),x.type="",x.type="file",x.value="")});u.scrollTop=u.scrollHeight});x.style.display="none";document.body.appendChild(x);a.libDlgFileInputElt=x}l=mxUtils.button(mxResources.get("import"),function(){null!=C&&(C(),C=null);a.libDlgFileInputElt.click()});l.setAttribute("id","btnAddImage");l.className="geBtn";d.appendChild(l)}l=mxUtils.button(mxResources.get("addImageUrl"),function(){null!=C&&(C(),C=null);a.showImageDialog(mxResources.get("addImageUrl"),"", -function(a,b,c){B=!1;if(null!=a){if("data:image/"==a.substring(0,11)){var f=a.indexOf(",");0<f&&(a=a.substring(0,f)+";base64,"+a.substring(f+1))}m(a,null,0,0,b,c);u.scrollTop=u.scrollHeight}})});l.setAttribute("id","btnAddImageUrl");l.className="geBtn";d.appendChild(l);this.saveBtnClickHandler=function(b,c,f,d){a.saveLibrary(b,c,f,d)};l=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(){null!=C&&(C(),C=null);this.saveBtnClickHandler(p.value,f,g,e)}));l.setAttribute("id","btnSave"); +!1,null)};l.appendChild(p);var u=document.createElement("div");u.style.borderWidth="1px 0px 1px 0px";u.style.borderColor="#d3d3d3";u.style.borderStyle="solid";u.style.marginTop="6px";u.style.overflow="auto";u.style.height="340px";u.style.backgroundPosition="center center";u.style.backgroundRepeat="no-repeat";0==f.length&&Graph.fileSupport&&(u.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");var v=document.createElement("div");v.style.position="absolute";v.style.width="640px";v.style.top= +"260px";v.style.textAlign="center";v.style.fontSize="22px";v.style.color="#a0c3ff";mxUtils.write(v,mxResources.get("dragImagesHere"));b.appendChild(v);var t={},z=null,y=null,C=null;c=function(a){"true"!=mxEvent.getSource(a).getAttribute("contentEditable")&&null!=C&&(C(),C=null,mxEvent.consume(a))};mxEvent.addListener(u,"mousedown",c);mxEvent.addListener(u,"pointerdown",c);mxEvent.addListener(u,"touchstart",c);var B=new mxUrlConverter,x=!1;if(null!=d)for(c=0;c<d.length;c++)l=d[c],m(l.data,null,0,0, +l.w,l.h,l,l.aspect,l.title);mxEvent.addListener(u,"dragleave",function(a){v.style.cursor="";for(var b=mxEvent.getSource(a);null!=b;){if(b==u||b==v){a.stopPropagation();a.preventDefault();break}b=b.parentNode}});var D=function(b){return function(c,f,d,l,p,e,g,k,t){null!=t&&(/(\.vsdx)($|\?)/i.test(t.name)||/(\.vssx)($|\?)/i.test(t.name))?a.importVisio(t,mxUtils.bind(this,function(a){m(a,f,d,l,p,e,g,"fixed",mxEvent.isAltDown(b)?null:g.substring(0,g.lastIndexOf(".")).replace(/_/g," "))})):null!=t&&!a.isOffline()&& +(new XMLHttpRequest).upload&&a.isRemoteFileFormat(c,t.name)?a.parseFile(t,mxUtils.bind(this,function(c){4==c.readyState&&(a.spinner.stop(),200<=c.status&&299>=c.status&&(m(c.responseText,f,d,l,p,e,g,"fixed",mxEvent.isAltDown(b)?null:g.substring(0,g.lastIndexOf(".")).replace(/_/g," ")),u.scrollTop=u.scrollHeight))})):(m(c,f,d,l,p,e,g,"fixed",mxEvent.isAltDown(b)?null:g.substring(0,g.lastIndexOf(".")).replace(/_/g," ")),u.scrollTop=u.scrollHeight)}};mxEvent.addListener(u,"dragover",n);mxEvent.addListener(u, +"drop",q);mxEvent.addListener(v,"dragover",n);mxEvent.addListener(v,"drop",q);b.appendChild(u);d=document.createElement("div");d.style.textAlign="right";d.style.marginTop="20px";c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});c.setAttribute("id","btnCancel");c.className="geBtn";a.editor.cancelFirst&&d.appendChild(c);l=mxUtils.button(mxResources.get("export"),function(){var b=a.createLibraryDataFromImages(f),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")});l.setAttribute("id","btnDownload");l.className="geBtn";d.appendChild(l);if(Graph.fileSupport){if(null==a.libDlgFileInputElt){var A=document.createElement("input");A.setAttribute("multiple","multiple");A.setAttribute("type","file");mxEvent.addListener(A,"change",function(b){x=!1;a.importFiles(A.files,0,0,a.maxImageSize,function(a,c,f,d,l,p, +e,g,k){null!=A.files&&(D(b)(a,c,f,d,l,p,e,g,k),A.type="",A.type="file",A.value="")});u.scrollTop=u.scrollHeight});A.style.display="none";document.body.appendChild(A);a.libDlgFileInputElt=A}l=mxUtils.button(mxResources.get("import"),function(){null!=C&&(C(),C=null);a.libDlgFileInputElt.click()});l.setAttribute("id","btnAddImage");l.className="geBtn";d.appendChild(l)}l=mxUtils.button(mxResources.get("addImageUrl"),function(){null!=C&&(C(),C=null);a.showImageDialog(mxResources.get("addImageUrl"),"", +function(a,b,c){x=!1;if(null!=a){if("data:image/"==a.substring(0,11)){var f=a.indexOf(",");0<f&&(a=a.substring(0,f)+";base64,"+a.substring(f+1))}m(a,null,0,0,b,c);u.scrollTop=u.scrollHeight}})});l.setAttribute("id","btnAddImageUrl");l.className="geBtn";d.appendChild(l);this.saveBtnClickHandler=function(b,c,f,d){a.saveLibrary(b,c,f,d)};l=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(){null!=C&&(C(),C=null);this.saveBtnClickHandler(p.value,f,g,e)}));l.setAttribute("id","btnSave"); l.className="geBtn gePrimaryBtn";d.appendChild(l);a.editor.cancelFirst||d.appendChild(c);b.appendChild(d);this.container=b},EditShapeDialog=function(a,c,b,d,g){d=null!=d?d:300;g=null!=g?g:120;var e,k,m=document.createElement("table"),n=document.createElement("tbody");m.style.cellPadding="4px";e=document.createElement("tr");k=document.createElement("td");k.setAttribute("colspan","2");k.style.fontSize="10pt";mxUtils.write(k,b);e.appendChild(k);n.appendChild(e);e=document.createElement("tr");k=document.createElement("td"); -var t=document.createElement("textarea");t.style.outline="none";t.style.resize="none";t.style.width=d-200+"px";t.style.height=g+"px";this.textarea=t;this.init=function(){t.focus();t.scrollTop=0};k.appendChild(t);e.appendChild(k);k=document.createElement("td");b=document.createElement("div");b.style.position="relative";b.style.border="1px solid gray";b.style.top="6px";b.style.width="200px";b.style.height=g+4+"px";b.style.overflow="hidden";b.style.marginBottom="16px";mxEvent.disableContextMenu(b);k.appendChild(b); -var f=new Graph(b);f.setEnabled(!1);var l=a.editor.graph.cloneCell(c);f.addCells([l]);b=f.view.getState(l);var p="";null!=b.shape&&null!=b.shape.stencil&&(p=mxUtils.getPrettyXml(b.shape.stencil.desc));mxUtils.write(t,p||"");b=f.getGraphBounds();g=Math.min(160/b.width,(g-40)/b.height);f.view.scaleAndTranslate(g,20/g-b.x,20/g-b.y);e.appendChild(k);n.appendChild(e);e=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 u=function(b,c,f){var d=t.value,l=mxUtils.parseXml(d),d=mxUtils.getPrettyXml(l.documentElement),l=l.documentElement.getElementsByTagName("parsererror"); -if(null!=l&&0<l.length)a.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(f&&a.hideDialog(),l=!b.model.contains(c),!f||l||d!=p){d=Graph.compress(d);b.getModel().beginUpdate();try{if(l){var e=a.editor.graph.getFreeInsertPoint();c.geometry.x=e.x;c.geometry.y=e.y;b.addCell(c)}b.setCellStyles(mxConstants.STYLE_SHAPE,"stencil("+d+")",[c])}catch(B){throw B;}finally{b.getModel().endUpdate()}l&&(b.setSelectionCell(c),b.scrollCellToVisible(c))}}; +var q=document.createElement("textarea");q.style.outline="none";q.style.resize="none";q.style.width=d-200+"px";q.style.height=g+"px";this.textarea=q;this.init=function(){q.focus();q.scrollTop=0};k.appendChild(q);e.appendChild(k);k=document.createElement("td");b=document.createElement("div");b.style.position="relative";b.style.border="1px solid gray";b.style.top="6px";b.style.width="200px";b.style.height=g+4+"px";b.style.overflow="hidden";b.style.marginBottom="16px";mxEvent.disableContextMenu(b);k.appendChild(b); +var f=new Graph(b);f.setEnabled(!1);var l=a.editor.graph.cloneCell(c);f.addCells([l]);b=f.view.getState(l);var p="";null!=b.shape&&null!=b.shape.stencil&&(p=mxUtils.getPrettyXml(b.shape.stencil.desc));mxUtils.write(q,p||"");b=f.getGraphBounds();g=Math.min(160/b.width,(g-40)/b.height);f.view.scaleAndTranslate(g,20/g-b.x,20/g-b.y);e.appendChild(k);n.appendChild(e);e=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 u=function(b,c,f){var d=q.value,l=mxUtils.parseXml(d),d=mxUtils.getPrettyXml(l.documentElement),l=l.documentElement.getElementsByTagName("parsererror"); +if(null!=l&&0<l.length)a.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(f&&a.hideDialog(),l=!b.model.contains(c),!f||l||d!=p){d=Graph.compress(d);b.getModel().beginUpdate();try{if(l){var e=a.editor.graph.getFreeInsertPoint();c.geometry.x=e.x;c.geometry.y=e.y;b.addCell(c)}b.setCellStyles(mxConstants.STYLE_SHAPE,"stencil("+d+")",[c])}catch(x){throw x;}finally{b.getModel().endUpdate()}l&&(b.setSelectionCell(c),b.scrollCellToVisible(c))}}; b=mxUtils.button(mxResources.get("preview"),function(){u(f,l,!1)});b.className="geBtn";k.appendChild(b);b=mxUtils.button(mxResources.get("apply"),function(){u(a.editor.graph,c,!0)});b.className="geBtn gePrimaryBtn";k.appendChild(b);a.editor.cancelFirst||k.appendChild(g);e.appendChild(k);n.appendChild(e);m.appendChild(n);this.container=m},CustomDialog=function(a,c,b,d,g,e,k,m){var n=document.createElement("div");n.appendChild(c);c=document.createElement("div");c.style.marginTop="16px";c.style.textAlign= "center";null!=k&&c.appendChild(k);a.isOffline()||null==e||(k=mxUtils.button(mxResources.get("help"),function(){a.openLink(e)}),k.className="geBtn",c.appendChild(k));k=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=d&&d()});k.className="geBtn";m&&(k.style.display="none");a.editor.cancelFirst&&c.appendChild(k);g=mxUtils.button(g||mxResources.get("ok"),function(){a.hideDialog();null!=b&&b()});c.appendChild(g);g.className="geBtn gePrimaryBtn";a.editor.cancelFirst||c.appendChild(k); n.appendChild(c);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", @@ -8279,27 +8293,27 @@ null,"Templates")+'</div></div><div class="geTempDlgContent"><div class="geTempD 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">🛈 '+ mxResources.get("linkToDiagramHint",null,"Add a link to this diagram. The diagram can only be edited from the page that owns it.")+'</span><button class="geTempDlgLinkToDiagram geTempDlgLinkToDiagramBtn">'+mxResources.get("linkToDiagram",null,"Link to Diagram")+'</button><div class="geTempDlgCreateBtn">'+mxResources.get("create",null,"Create")+'</div><div class="geTempDlgCancelBtn">'+mxResources.get("cancel",null,"Cancel")+"</div></div>",c=document.createElement("div");c.innerHTML=a;c.className="geTemplateDlg"; var a=window.innerWidth,b=window.innerHeight,d=987,g=712;.9*a<d&&(d=Math.max(.9*a,600),c.style.width=d+"px");.9*b<g&&(g=Math.max(.9*b,300),c.style.height=g+"px");this.width=d;this.height=g;this.container=c}; -TemplatesDialog.prototype.init=function(a,c,b,d,g,e,k,m,n,t){function f(){null!=H&&(H.style.fontWeight="normal",H.style.textDecoration="none",H=null)}function l(a,b,c,f,d,l,p){if(-1<a.className.indexOf("geTempDlgRadioBtnActive"))return!1;a.className+=" geTempDlgRadioBtnActive";D.querySelector(".geTempDlgRadioBtn[data-id="+f+"]").className="geTempDlgRadioBtn "+(p?"geTempDlgRadioBtnLarge":"geTempDlgRadioBtnSmall");D.querySelector("."+b).src="/images/"+c+"-sel.svg";D.querySelector("."+d).src="/images/"+ +TemplatesDialog.prototype.init=function(a,c,b,d,g,e,k,m,n,q){function f(){null!=H&&(H.style.fontWeight="normal",H.style.textDecoration="none",H=null)}function l(a,b,c,f,d,l,p){if(-1<a.className.indexOf("geTempDlgRadioBtnActive"))return!1;a.className+=" geTempDlgRadioBtnActive";D.querySelector(".geTempDlgRadioBtn[data-id="+f+"]").className="geTempDlgRadioBtn "+(p?"geTempDlgRadioBtnLarge":"geTempDlgRadioBtnSmall");D.querySelector("."+b).src="/images/"+c+"-sel.svg";D.querySelector("."+d).src="/images/"+ l+".svg";return!0}function p(a){function b(a){Z.removeChild(f);D.removeChild(c);Z.scrollTop=l}a=a.prevImgUrl||a.imgUrl||TEMPLATE_PATH+"/"+a.url.substring(0,a.url.length-4)+".png";var c=document.createElement("div");c.className="geTempDlgDialogMask";D.appendChild(c);var f=document.createElement("div");f.className="geTempDlgDiagramPreviewBox";var d=document.createElement("img");d.src=a;f.appendChild(d);a=document.createElement("img");a.src="/images/close.png";a.className="geTempDlgPreviewCloseBtn"; -a.setAttribute("title",mxResources.get("close"));f.appendChild(a);var l=Z.scrollTop;mxEvent.addListener(a,"click",b);mxEvent.addListener(c,"click",b);Z.appendChild(f);Z.scrollTop=0;f.style.lineHeight=f.clientHeight+"px"}function u(a,b,c){if(null!=F){for(var f=F.className.split(" "),d=0;d<f.length;d++)if(-1<f[d].indexOf("Active")){f.splice(d,1);break}F.className=f.join(" ")}null!=a?(F=a,F.className+=" "+b,I=c,V.className="geTempDlgCreateBtn"):(I=F=null,V.className="geTempDlgCreateBtn geTempDlgCreateBtnDisabled")} -function y(b){if(null!=I){var f=I;I=null;V.className="geTempDlgCreateBtn geTempDlgCreateBtnDisabled geTempDlgCreateBtnBusy";f.isExternal?(1==b?t(f.url,f,"nameInput.value"):n(f.url,f,"nameInput.value"),a.hideDialog(!0)):mxUtils.get(TEMPLATE_PATH+"/"+f.url,mxUtils.bind(this,function(b){200<=b.getStatus()&&299>=b.getStatus()&&(c(b.getText(),"nameInput.value"),a.hideDialog(!0))}))}}function q(a){a=a?"":"none";for(var b=D.querySelectorAll(".geTempDlgLinkToDiagram"),c=0;c<b.length;c++)b[c].style.display= -a}function A(a,b,c){function f(){V.innerHTML=b?mxUtils.htmlEntities(mxResources.get("create")):mxUtils.htmlEntities(mxResources.get("copy"));q(!b)}T.innerHTML="";u();N=a;var d=null;if(c){d=document.createElement("table");d.className="geTempDlgDiagramsListGrid";var l=document.createElement("tr"),e=document.createElement("th");e.style.width="50%";e.innerHTML=mxUtils.htmlEntities(mxResources.get("diagram",null,"Diagram"));l.appendChild(e);e=document.createElement("th");e.style.width="25%";e.innerHTML= -mxUtils.htmlEntities(mxResources.get("changedBy",null,"Changed By"));l.appendChild(e);e=document.createElement("th");e.style.width="25%";e.innerHTML=mxUtils.htmlEntities(mxResources.get("lastModifiedOn",null,"Last modified on"));l.appendChild(e);d.appendChild(l);T.appendChild(d)}for(l=0;l<a.length;l++){a[l].isExternal=!b;var g=a[l].url,e=mxUtils.htmlEntities(a[l].title),k=a[l].tooltip||a[l].title,x=a[l].imgUrl,v=mxUtils.htmlEntities(a[l].changedBy||""),B=mxUtils.htmlEntities(a[l].lastModifiedOn|| -"");x||(x=TEMPLATE_PATH+"/"+g.substring(0,g.length-4)+".png");g=c?50:15;null!=e&&e.length>g&&(e=e.substring(0,g)+"…");if(c){var m=document.createElement("tr"),x=document.createElement("td"),n=document.createElement("img");n.src="/images/icon-search.svg";n.className="geTempDlgDiagramListPreviewBtn";n.setAttribute("title",mxResources.get("preview"));x.appendChild(n);k=document.createElement("span");k.className="geTempDlgDiagramTitle";k.innerHTML=e;x.appendChild(k);m.appendChild(x);x=document.createElement("td"); -x.innerHTML=v;m.appendChild(x);x=document.createElement("td");x.innerHTML=B;m.appendChild(x);d.appendChild(m);null==F&&(f(),u(m,"geTempDlgDiagramsListGridActive",a[l]));(function(a,b){mxEvent.addListener(m,"click",function(){F!=b&&(f(),u(b,"geTempDlgDiagramsListGridActive",a))});mxEvent.addListener(m,"dblclick",y);mxEvent.addListener(n,"click",function(){p(a)})})(a[l],m)}else{var z=document.createElement("div");z.className="geTempDlgDiagramTile";z.setAttribute("title",k);null==F&&(f(),u(z,"geTempDlgDiagramTileActive", -a[l]));v=document.createElement("div");v.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgLoading";var A=document.createElement("img");A.style.display="none";(function(a,b){A.onload=function(){b.className="geTempDlgDiagramTileImg";a.style.display=""};A.onerror=function(){b.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgError"}})(A,v);A.src=x;v.appendChild(A);z.appendChild(v);v=document.createElement("div");v.className="geTempDlgDiagramTileLbl";v.innerHTML=null!=e?e:"";z.appendChild(v); -n=document.createElement("img");n.src="/images/icon-search.svg";n.className="geTempDlgDiagramPreviewBtn";n.setAttribute("title",mxResources.get("preview"));z.appendChild(n);(function(a,b){mxEvent.addListener(z,"click",function(){F!=b&&(f(),u(b,"geTempDlgDiagramTileActive",a))});mxEvent.addListener(z,"dblclick",y);mxEvent.addListener(n,"click",function(){p(a)})})(a[l],z);T.appendChild(z)}}}function z(a,b){da.innerHTML="";u();for(var c=!b&&5<a.length?5:a.length,f=0;f<c;f++){var d=a[f];d.isCategory= -!0;var l=document.createElement("div"),e=mxResources.get(d.title);null==e&&(e=d.title.substring(0,1).toUpperCase()+d.title.substring(1));l.className="geTempDlgNewDiagramCatItem";l.setAttribute("title",e);e=mxUtils.htmlEntities(e);15<e.length&&(e=e.substring(0,15)+"…");null==F&&(V.innerHTML=mxUtils.htmlEntities(mxResources.get("create")),q(),u(l,"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);l.appendChild(p);p=document.createElement("div");p.className="geTempDlgNewDiagramCatItemLbl";p.innerHTML=e;l.appendChild(p);da.appendChild(l);(function(a,b){mxEvent.addListener(l,"click",function(){F!=b&&(V.innerHTML=mxUtils.htmlEntities(mxResources.get("create")),q(),u(b,"geTempDlgNewDiagramCatItemActive",a))});mxEvent.addListener(l,"dblclick",y)})(d,l)}X.style.display=5>a.length?"none":""}function C(a){var b=D.querySelector(".geTemplatesList"), +a.setAttribute("title",mxResources.get("close"));f.appendChild(a);var l=Z.scrollTop;mxEvent.addListener(a,"click",b);mxEvent.addListener(c,"click",b);Z.appendChild(f);Z.scrollTop=0;f.style.lineHeight=f.clientHeight+"px"}function u(a,b,c){if(null!=F){for(var f=F.className.split(" "),d=0;d<f.length;d++)if(-1<f[d].indexOf("Active")){f.splice(d,1);break}F.className=f.join(" ")}null!=a?(F=a,F.className+=" "+b,G=c,V.className="geTempDlgCreateBtn"):(G=F=null,V.className="geTempDlgCreateBtn geTempDlgCreateBtnDisabled")} +function v(b){if(null!=G){var f=G;G=null;V.className="geTempDlgCreateBtn geTempDlgCreateBtnDisabled geTempDlgCreateBtnBusy";f.isExternal?(1==b?q(f.url,f,"nameInput.value"):n(f.url,f,"nameInput.value"),a.hideDialog(!0)):mxUtils.get(TEMPLATE_PATH+"/"+f.url,mxUtils.bind(this,function(b){200<=b.getStatus()&&299>=b.getStatus()&&(c(b.getText(),"nameInput.value"),a.hideDialog(!0))}))}}function t(a){a=a?"":"none";for(var b=D.querySelectorAll(".geTempDlgLinkToDiagram"),c=0;c<b.length;c++)b[c].style.display= +a}function z(a,b,c){function f(){V.innerHTML=b?mxUtils.htmlEntities(mxResources.get("create")):mxUtils.htmlEntities(mxResources.get("copy"));t(!b)}T.innerHTML="";u();K=a;var d=null;if(c){d=document.createElement("table");d.className="geTempDlgDiagramsListGrid";var l=document.createElement("tr"),e=document.createElement("th");e.style.width="50%";e.innerHTML=mxUtils.htmlEntities(mxResources.get("diagram",null,"Diagram"));l.appendChild(e);e=document.createElement("th");e.style.width="25%";e.innerHTML= +mxUtils.htmlEntities(mxResources.get("changedBy",null,"Changed By"));l.appendChild(e);e=document.createElement("th");e.style.width="25%";e.innerHTML=mxUtils.htmlEntities(mxResources.get("lastModifiedOn",null,"Last modified on"));l.appendChild(e);d.appendChild(l);T.appendChild(d)}for(l=0;l<a.length;l++){a[l].isExternal=!b;var g=a[l].url,e=mxUtils.htmlEntities(a[l].title),k=a[l].tooltip||a[l].title,A=a[l].imgUrl,x=mxUtils.htmlEntities(a[l].changedBy||""),B=mxUtils.htmlEntities(a[l].lastModifiedOn|| +"");A||(A=TEMPLATE_PATH+"/"+g.substring(0,g.length-4)+".png");g=c?50:15;null!=e&&e.length>g&&(e=e.substring(0,g)+"…");if(c){var m=document.createElement("tr"),A=document.createElement("td"),n=document.createElement("img");n.src="/images/icon-search.svg";n.className="geTempDlgDiagramListPreviewBtn";n.setAttribute("title",mxResources.get("preview"));A.appendChild(n);k=document.createElement("span");k.className="geTempDlgDiagramTitle";k.innerHTML=e;A.appendChild(k);m.appendChild(A);A=document.createElement("td"); +A.innerHTML=x;m.appendChild(A);A=document.createElement("td");A.innerHTML=B;m.appendChild(A);d.appendChild(m);null==F&&(f(),u(m,"geTempDlgDiagramsListGridActive",a[l]));(function(a,b){mxEvent.addListener(m,"click",function(){F!=b&&(f(),u(b,"geTempDlgDiagramsListGridActive",a))});mxEvent.addListener(m,"dblclick",v);mxEvent.addListener(n,"click",function(){p(a)})})(a[l],m)}else{var z=document.createElement("div");z.className="geTempDlgDiagramTile";z.setAttribute("title",k);null==F&&(f(),u(z,"geTempDlgDiagramTileActive", +a[l]));x=document.createElement("div");x.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgLoading";var y=document.createElement("img");y.style.display="none";(function(a,b){y.onload=function(){b.className="geTempDlgDiagramTileImg";a.style.display=""};y.onerror=function(){b.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgError"}})(y,x);y.src=A;x.appendChild(y);z.appendChild(x);x=document.createElement("div");x.className="geTempDlgDiagramTileLbl";x.innerHTML=null!=e?e:"";z.appendChild(x); +n=document.createElement("img");n.src="/images/icon-search.svg";n.className="geTempDlgDiagramPreviewBtn";n.setAttribute("title",mxResources.get("preview"));z.appendChild(n);(function(a,b){mxEvent.addListener(z,"click",function(){F!=b&&(f(),u(b,"geTempDlgDiagramTileActive",a))});mxEvent.addListener(z,"dblclick",v);mxEvent.addListener(n,"click",function(){p(a)})})(a[l],z);T.appendChild(z)}}}function y(a,b){da.innerHTML="";u();for(var c=!b&&5<a.length?5:a.length,f=0;f<c;f++){var d=a[f];d.isCategory= +!0;var l=document.createElement("div"),p=mxResources.get(d.title);null==p&&(p=d.title.substring(0,1).toUpperCase()+d.title.substring(1));l.className="geTempDlgNewDiagramCatItem";l.setAttribute("title",p);p=mxUtils.htmlEntities(p);15<p.length&&(p=p.substring(0,15)+"…");null==F&&(V.innerHTML=mxUtils.htmlEntities(mxResources.get("create")),t(),u(l,"geTempDlgNewDiagramCatItemActive",d));var e=document.createElement("div");e.className="geTempDlgNewDiagramCatItemImg";var g=document.createElement("img"); +g.src=NEW_DIAGRAM_CATS_PATH+"/"+d.img;e.appendChild(g);l.appendChild(e);e=document.createElement("div");e.className="geTempDlgNewDiagramCatItemLbl";e.innerHTML=p;l.appendChild(e);da.appendChild(l);(function(a,b){mxEvent.addListener(l,"click",function(){F!=b&&(V.innerHTML=mxUtils.htmlEntities(mxResources.get("create")),t(),u(b,"geTempDlgNewDiagramCatItemActive",a))});mxEvent.addListener(l,"dblclick",v)})(d,l)}X.style.display=5>a.length?"none":""}function C(a){var b=D.querySelector(".geTemplatesList"), c;for(c in a){var f=document.createElement("div"),d=mxResources.get(c),l=a[c];null==d&&(d=c.substring(0,1).toUpperCase()+c.substring(1));f.className="geTemplateCatLink";f.setAttribute("title",d+" ("+l.length+")");d=mxUtils.htmlEntities(d);15<d.length&&(d=d.substring(0,15)+"…");f.innerHTML=d+" ("+l.length+")";b.appendChild(f);(function(b,c,d){mxEvent.addListener(f,"click",function(){H!=d&&(null!=H?(H.style.fontWeight="normal",H.style.textDecoration="none"):(fa.style.display="none",ha.style.minHeight= -"100%"),H=d,H.style.fontWeight="bold",H.style.textDecoration="underline",Z.scrollTop=0,x&&(J=!0),L.innerHTML=c,W.style.display="none",A(a[b],!0))})})(c,d,f)}}function v(a){k&&(Z.scrollTop=0,T.innerHTML="",ba.spin(T),J=!1,x=!0,L.innerHTML=mxUtils.htmlEntities(mxResources.get("recentDiag",null,"Recent Diagrams")),R=null,k(M,a?null:e))}function B(a){f();Z.scrollTop=0;T.innerHTML="";ba.spin(T);J=!1;x=!0;ca=null;L.innerHTML=mxUtils.htmlEntities(mxResources.get("searchResults",null,"Search Results"))+' "'+ -mxUtils.htmlEntities(a)+'"';m(a,M,E?null:e);R=a}d=null!=d?d:TEMPLATE_PATH+"/index.xml";g=null!=g?g:NEW_DIAGRAM_CATS_PATH+"/index.xml";var D=this.container,x=!1,J=!1,H=null,F=null,I=null,G=!1,E=!0,K=!1,N=[],R,X=D.querySelector(".geTempDlgShowAllBtn"),T=D.querySelector(".geTempDlgDiagramsTiles"),L=D.querySelector(".geTempDlgDiagramsListTitle"),W=D.querySelector(".geTempDlgDiagramsListBtns"),Z=D.querySelector(".geTempDlgContent"),ha=D.querySelector(".geTempDlgDiagramsList"),fa=D.querySelector(".geTempDlgNewDiagramCat"), -da=D.querySelector(".geTempDlgNewDiagramCatList"),V=D.querySelector(".geTempDlgCreateBtn"),ba=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(D.querySelector(".geTempDlgNewDiagramlbl"),"click",function(){f();fa.style.display="";ha.style.minHeight="calc(100% - 280px)";v(E)});mxEvent.addListener(D.querySelector(".geTempDlgRadioBtn[data-id=allDiagramsBtn]"),"click",function(){l(this,"geTempDlgAllDiagramsBtnImg", -"all-diagrams","myDiagramsBtn","geTempDlgMyDiagramsBtnImg","my-diagrams",!0)&&(E=!0,null==R?v(E):B(R))});mxEvent.addListener(D.querySelector(".geTempDlgRadioBtn[data-id=myDiagramsBtn]"),"click",function(){l(this,"geTempDlgMyDiagramsBtnImg","my-diagrams","allDiagramsBtn","geTempDlgAllDiagramsBtnImg","all-diagrams",!0)&&(E=!1,null==R?v(E):B(R))});mxEvent.addListener(D.querySelector(".geTempDlgRadioBtn[data-id=listBtn]"),"click",function(){l(this,"geTempDlgListBtnImg","list","tilesBtn","geTempDlgTilesBtnImg", -"tiles",!1)&&(K=!0,A(N,!1,K))});mxEvent.addListener(D.querySelector(".geTempDlgRadioBtn[data-id=tilesBtn]"),"click",function(){l(this,"geTempDlgTilesBtnImg","tiles","listBtn","geTempDlgListBtnImg","list",!1)&&(K=!1,A(N,!1,K))});mxEvent.addListener(X,"click",function(){G?(fa.style.height="280px",da.style.height="190px",X.innerHTML=mxUtils.htmlEntities(mxResources.get("showAll",null,"+ Show all")),z(ea)):(fa.style.height="440px",da.style.height="355px",X.innerHTML=mxUtils.htmlEntities(mxResources.get("showLess", -null,"- Show less")),z(ea,!0));G=!G});var Q=!1,aa=!1,Y={},ea=[],P=1;mxUtils.get(d,function(a){if(!Q){Q=!0;for(a=a.getXml().documentElement.firstChild;null!=a;){if("undefined"!==typeof a.getAttribute){var b=a.getAttribute("url");if(null!=b){var c=b.indexOf("/"),b=b.substring(0,c),c=Y[b];null==c&&(P++,c=[],Y[b]=c);c.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(Y)}});mxUtils.get(g,function(a){if(!aa){aa=!0;for(a=a.getXml().documentElement.firstChild;null!=a;)"undefined"!==typeof a.getAttribute&&null!=a.getAttribute("title")&&ea.push({img:a.getAttribute("img"),libs:a.getAttribute("libs"),clibs:a.getAttribute("clibs"),title:a.getAttribute("title")}),a=a.nextSibling;z(ea)}});var M=function(a,b){W.style.display="";ba.stop();x=!1;J?J=!1:b?T.innerHTML=b:0==a.length?T.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams",null,"No Diagrams Found")): -A(a,!1,K)};v(E);var ca=null;m&&mxEvent.addListener(D.querySelector(".geTempDlgSearchBox"),"keyup",function(a){var b=this;null!=ca&&clearTimeout(ca);13==a.keyCode?B(b.value):ca=setTimeout(function(){B(b.value)},500)});mxEvent.addListener(V,"click",y);mxEvent.addListener(D.querySelector(".geTempDlgLinkToDiagramBtn"),"click",function(a){y(!0)});mxEvent.addListener(D.querySelector(".geTempDlgCancelBtn"),"click",function(){null!=b&&b();a.hideDialog(!0)})}; +"100%"),H=d,H.style.fontWeight="bold",H.style.textDecoration="underline",Z.scrollTop=0,A&&(I=!0),M.innerHTML=c,W.style.display="none",z(a[b],!0))})})(c,d,f)}}function B(a){k&&(Z.scrollTop=0,T.innerHTML="",ba.spin(T),I=!1,A=!0,M.innerHTML=mxUtils.htmlEntities(mxResources.get("recentDiag",null,"Recent Diagrams")),R=null,k(N,a?null:e))}function x(a){f();Z.scrollTop=0;T.innerHTML="";ba.spin(T);I=!1;A=!0;ca=null;M.innerHTML=mxUtils.htmlEntities(mxResources.get("searchResults",null,"Search Results"))+' "'+ +mxUtils.htmlEntities(a)+'"';m(a,N,E?null:e);R=a}d=null!=d?d:TEMPLATE_PATH+"/index.xml";g=null!=g?g:NEW_DIAGRAM_CATS_PATH+"/index.xml";var D=this.container,A=!1,I=!1,H=null,F=null,G=null,J=!1,E=!0,L=!1,K=[],R,X=D.querySelector(".geTempDlgShowAllBtn"),T=D.querySelector(".geTempDlgDiagramsTiles"),M=D.querySelector(".geTempDlgDiagramsListTitle"),W=D.querySelector(".geTempDlgDiagramsListBtns"),Z=D.querySelector(".geTempDlgContent"),ha=D.querySelector(".geTempDlgDiagramsList"),fa=D.querySelector(".geTempDlgNewDiagramCat"), +da=D.querySelector(".geTempDlgNewDiagramCatList"),V=D.querySelector(".geTempDlgCreateBtn"),ba=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(D.querySelector(".geTempDlgNewDiagramlbl"),"click",function(){f();fa.style.display="";ha.style.minHeight="calc(100% - 280px)";B(E)});mxEvent.addListener(D.querySelector(".geTempDlgRadioBtn[data-id=allDiagramsBtn]"),"click",function(){l(this,"geTempDlgAllDiagramsBtnImg", +"all-diagrams","myDiagramsBtn","geTempDlgMyDiagramsBtnImg","my-diagrams",!0)&&(E=!0,null==R?B(E):x(R))});mxEvent.addListener(D.querySelector(".geTempDlgRadioBtn[data-id=myDiagramsBtn]"),"click",function(){l(this,"geTempDlgMyDiagramsBtnImg","my-diagrams","allDiagramsBtn","geTempDlgAllDiagramsBtnImg","all-diagrams",!0)&&(E=!1,null==R?B(E):x(R))});mxEvent.addListener(D.querySelector(".geTempDlgRadioBtn[data-id=listBtn]"),"click",function(){l(this,"geTempDlgListBtnImg","list","tilesBtn","geTempDlgTilesBtnImg", +"tiles",!1)&&(L=!0,z(K,!1,L))});mxEvent.addListener(D.querySelector(".geTempDlgRadioBtn[data-id=tilesBtn]"),"click",function(){l(this,"geTempDlgTilesBtnImg","tiles","listBtn","geTempDlgListBtnImg","list",!1)&&(L=!1,z(K,!1,L))});mxEvent.addListener(X,"click",function(){J?(fa.style.height="280px",da.style.height="190px",X.innerHTML=mxUtils.htmlEntities(mxResources.get("showAll",null,"+ Show all")),y(ea)):(fa.style.height="440px",da.style.height="355px",X.innerHTML=mxUtils.htmlEntities(mxResources.get("showLess", +null,"- Show less")),y(ea,!0));J=!J});var Q=!1,aa=!1,Y={},ea=[],P=1;mxUtils.get(d,function(a){if(!Q){Q=!0;for(a=a.getXml().documentElement.firstChild;null!=a;){if("undefined"!==typeof a.getAttribute){var b=a.getAttribute("url");if(null!=b){var c=b.indexOf("/"),b=b.substring(0,c),c=Y[b];null==c&&(P++,c=[],Y[b]=c);c.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(Y)}});mxUtils.get(g,function(a){if(!aa){aa=!0;for(a=a.getXml().documentElement.firstChild;null!=a;)"undefined"!==typeof a.getAttribute&&null!=a.getAttribute("title")&&ea.push({img:a.getAttribute("img"),libs:a.getAttribute("libs"),clibs:a.getAttribute("clibs"),title:a.getAttribute("title")}),a=a.nextSibling;y(ea)}});var N=function(a,b){W.style.display="";ba.stop();A=!1;I?I=!1:b?T.innerHTML=b:0==a.length?T.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams",null,"No Diagrams Found")): +z(a,!1,L)};B(E);var ca=null;m&&mxEvent.addListener(D.querySelector(".geTempDlgSearchBox"),"keyup",function(a){var b=this;null!=ca&&clearTimeout(ca);13==a.keyCode?x(b.value):ca=setTimeout(function(){x(b.value)},500)});mxEvent.addListener(V,"click",v);mxEvent.addListener(D.querySelector(".geTempDlgLinkToDiagramBtn"),"click",function(a){v(!0)});mxEvent.addListener(D.querySelector(".geTempDlgCancelBtn"),"click",function(){null!=b&&b();a.hideDialog(!0)})}; var BtnDialog=function(a,c,b,d){var g=document.createElement("div");g.style.textAlign="center";var e=document.createElement("p");e.style.fontSize="16pt";e.style.padding="0px";e.style.margin="0px";e.style.color="gray";mxUtils.write(e,mxResources.get("done"));var k="Unknown",m=document.createElement("img");m.setAttribute("border","0");m.setAttribute("align","absmiddle");m.style.marginRight="10px";c==a.drive?(k=mxResources.get("googleDrive"),m.src=IMAGE_PATH+"/google-drive-logo-white.svg"):c==a.dropbox? (k=mxResources.get("dropbox"),m.src=IMAGE_PATH+"/dropbox-logo-white.svg"):c==a.oneDrive?(k=mxResources.get("oneDrive"),m.src=IMAGE_PATH+"/onedrive-logo-white.svg"):c==a.gitHub?(k=mxResources.get("github"),m.src=IMAGE_PATH+"/github-logo-white.svg"):c==a.gitLab?(k=mxResources.get("gitlab"),m.src=IMAGE_PATH+"/gitlab-logo.svg"):c==a.trello&&(k=mxResources.get("trello"),m.src=IMAGE_PATH+"/trello-logo-white.svg");a=document.createElement("p");mxUtils.write(a,mxResources.get("authorizedIn",[k],"You are now authorized in {1}")); b=mxUtils.button(b,d);b.insertBefore(m,b.firstChild);b.style.marginTop="6px";b.className="geBigButton";g.appendChild(e);g.appendChild(a);g.appendChild(b);this.container=g};(function(){Editor.prototype.appName="draw.io";Editor.prototype.fileExtensions=[{ext:"html",title:"filetypeHtml"},{ext:"png",title:"filetypePng"},{ext:"svg",title:"filetypeSvg"}];Editor.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAMAAADzN3VRAAAApVBMVEUAAAD////k5OT///8AAAB1dXXMzMz9/f39/f37+/v5+fn+/v7///9iYmJaWlqFhYWnp6ejo6OHh4f////////////////7+/v5+fnx8fH///8AAAD///8bGxv7+/v5+fkoKCghISFDQ0MYGBjh4eHY2Njb29tQUFBvb29HR0c/Pz82NjYrKyu/v78SEhLu7u7s7OzV1dVVVVU7OzsVFRXAv78QEBBzqehMAAAAG3RSTlMAA/7p/vz5xZlrTiPL/v78+/v7+OXd2TYQDs8L70ZbAAABKUlEQVQoz3VS13LCMBBUXHChd8iukDslQChJ/v/TchaG4cXS+OSb1c7trU7V60OpdRz2ZtNZL4zXNlcN8BEtSG6+NxIXkeRPoBuQ1cjvZ31/VJFB10ISli6diYfH8iYO3WUNCcNlB0gTrXOtkxTo0O1aKKiBBMhhv2MNBQKoiA5wxlZo0JDzD3AYKbWacyj3fs01wxey0pyEP+R8pWKWXoqtIZ0DDg5pbki9krEKOa6LVDQsdoXEsi46Zqh69KFz7B1u7Hb2yDV8firXDKBlZ4UFiswKGRhXTS93/ECK7yxnJ3+S3y/ThpO+cfSD017nqa18aasabU0/t7d+tk0/1oMEJ1NaD67iwdF68OabFSLn+eHb0+vjy+uk8br9fdrftH0O2menfd7+AQfYM/lNjoDHAAAAAElFTkSuQmCC": @@ -8320,16 +8334,16 @@ dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"startFill" type:"float",min:0,defVal:1.5,isVisible:function(a){return"1"==mxUtils.getValue(a.style,"comic","0")}},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"bendable",dispName:"Bendable",type:"bool",defVal:!0},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"orthogonalLoop", dispName:"Loop Routing",type:"bool",defVal:!1},{name:"noJump",dispName:"No Jumps",type:"bool",defVal:!1}];Editor.commonVertexProperties=[{type:"separator"},{name:"fillOpacity",dispName:"Fill Opacity",type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"overflow",dispName:"Text Overflow",defVal:"visible",type:"enum",enumList:[{val:"visible",dispName:"Visible"},{val:"hidden",dispName:"Hidden"},{val:"fill",dispName:"Fill"},{val:"width", dispName:"Width"}]},{name:"noLabel",dispName:"Hide Label",type:"bool",defVal:!1},{name:"labelPadding",dispName:"Label Padding",type:"float",defVal:0},{name:"direction",dispName:"Direction",type:"enum",defVal:"east",enumList:[{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraint",dispName:"Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"}, -{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraintRotation",dispName:"Rotate Constraint",type:"bool",defVal:!1},{name:"connectable",dispName:"Connectable",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"perimeter",dispName:"Perimeter",defVal:"none",type:"enum",enumList:[{val:"none",dispName:"None"},{val:"rectanglePerimeter",dispName:"Rectangle"},{val:"ellipsePerimeter",dispName:"Ellipse"},{val:"rhombusPerimeter",dispName:"Rhombus"}, -{val:"trianglePerimeter",dispName:"Triangle"},{val:"hexagonPerimeter2",dispName:"Hexagon"},{val:"lifelinePerimeter",dispName:"Lifeline"},{val:"orthogonalPerimeter",dispName:"Orthogonal"},{val:"backbonePerimeter",dispName:"Backbone"},{val:"calloutPerimeter",dispName:"Callout"},{val:"parallelogramPerimeter",dispName:"Parallelogram"},{val:"trapezoidPerimeter",dispName:"Trapezoid"},{val:"stepPerimeter",dispName:"Step"}]},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"jiggle",dispName:"Jiggle", -type:"float",min:0,defVal:1.5,isVisible:function(a){return"1"==mxUtils.getValue(a.style,"comic","0")}},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"collapsible",dispName:"Collapsible",type:"bool",defVal:!1},{name:"container",dispName:"Container",type:"bool",defVal:!1},{name:"recursiveResize",dispName:"Resize Children",type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"backgroundOutline", -dispName:"Background Outline",type:"bool",defVal:!1},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"resizable",dispName:"Resizable",type:"bool",defVal:!0},{name:"resizeWidth",dispName:"Resize Width",type:"bool",defVal:!1},{name:"resizeHeight",dispName:"Resize Height",type:"bool",defVal:!1},{name:"rotatable",dispName:"Rotatable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"treeFolding", -dispName:"Tree Folding",type:"bool",defVal:!1},{name:"treeMoving",dispName:"Tree Moving",type:"bool",defVal:!1}];Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## The label is concatenated in the form fromlabel + label + tolabel if all are defined.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle or a JSON string as used in Layout, Apply.\n## Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nEvan Miller,CFO,emi,Office 1,,me@example.com,#dae8fc,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Evan Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nRon Donovan,System Admin,rdo,Office 3,Evan Miller,me@example.com,#d5e8d4,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nTessa Valet,HR Director,tva,Office 4,Evan Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\n'; +{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraintRotation",dispName:"Rotate Constraint",type:"bool",defVal:!1},{name:"connectable",dispName:"Connectable",type:"bool",defVal:!0},{name:"allowArrows",dispName:"Allow Arrows",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"perimeter",dispName:"Perimeter",defVal:"none",type:"enum",enumList:[{val:"none",dispName:"None"},{val:"rectanglePerimeter",dispName:"Rectangle"},{val:"ellipsePerimeter", +dispName:"Ellipse"},{val:"rhombusPerimeter",dispName:"Rhombus"},{val:"trianglePerimeter",dispName:"Triangle"},{val:"hexagonPerimeter2",dispName:"Hexagon"},{val:"lifelinePerimeter",dispName:"Lifeline"},{val:"orthogonalPerimeter",dispName:"Orthogonal"},{val:"backbonePerimeter",dispName:"Backbone"},{val:"calloutPerimeter",dispName:"Callout"},{val:"parallelogramPerimeter",dispName:"Parallelogram"},{val:"trapezoidPerimeter",dispName:"Trapezoid"},{val:"stepPerimeter",dispName:"Step"}]},{name:"fixDash", +dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1.5,isVisible:function(a){return"1"==mxUtils.getValue(a.style,"comic","0")}},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"collapsible",dispName:"Collapsible",type:"bool",defVal:!1},{name:"container",dispName:"Container",type:"bool",defVal:!1},{name:"recursiveResize",dispName:"Resize Children",type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1},{name:"editable", +dispName:"Editable",type:"bool",defVal:!0},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"resizable",dispName:"Resizable",type:"bool",defVal:!0},{name:"resizeWidth",dispName:"Resize Width",type:"bool",defVal:!1},{name:"resizeHeight",dispName:"Resize Height",type:"bool",defVal:!1},{name:"rotatable",dispName:"Rotatable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0}, +{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"treeFolding",dispName:"Tree Folding",type:"bool",defVal:!1},{name:"treeMoving",dispName:"Tree Moving",type:"bool",defVal:!1}];Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## The label is concatenated in the form fromlabel + label + tolabel if all are defined.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle or a JSON string as used in Layout, Apply.\n## Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nEvan Miller,CFO,emi,Office 1,,me@example.com,#dae8fc,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Evan Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nRon Donovan,System Admin,rdo,Office 3,Evan Miller,me@example.com,#d5e8d4,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nTessa Valet,HR Director,tva,Office 4,Evan Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\n'; Editor.extractGraphModel=function(a,b){if(null!=a&&"undefined"!==typeof pako){var c=a.ownerDocument.getElementsByTagName("div"),f=[];if(null!=c&&0<c.length)for(var d=0;d<c.length;d++)if("mxgraph"==c[d].getAttribute("class")){f.push(c[d]);break}0<f.length&&(c=f[0].getAttribute("data-mxgraph"),null!=c?(f=JSON.parse(c),null!=f&&null!=f.xml&&(f=mxUtils.parseXml(f.xml),a=f.documentElement)):(f=f[0].getElementsByTagName("div"),0<f.length&&(c=mxUtils.getTextContent(f[0]),c=Graph.decompress(c),0<c.length&& (f=mxUtils.parseXml(c),a=f.documentElement))))}if(null!=a&&"svg"==a.nodeName)if(c=a.getAttribute("content"),null!=c&&"<"!=c.charAt(0)&&"%"!=c.charAt(0)&&(c=unescape(window.atob?atob(c):Base64.decode(cont,c))),null!=c&&"%"==c.charAt(0)&&(c=decodeURIComponent(c)),null!=c&&0<c.length)a=mxUtils.parseXml(c).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==a||b||(f=null,"diagram"==a.nodeName?f=a:"mxfile"==a.nodeName&&(c=a.getElementsByTagName("diagram"),0<c.length&&(f=c[Math.max(0, Math.min(c.length-1,urlParams.page||0))])),null!=f&&(a=Editor.parseDiagramNode(f)));null==a||"mxGraphModel"==a.nodeName||b&&"mxfile"==a.nodeName||(a=null);return a};Editor.parseDiagramNode=function(a){var b=mxUtils.trim(mxUtils.getTextContent(a)),c=null;0<b.length?(a=Graph.decompress(b),null!=a&&0<a.length&&(c=mxUtils.parseXml(a).documentElement)):(a=mxUtils.getChildNodes(a),0<a.length&&(c=mxUtils.createXmlDocument(),c.appendChild(c.importNode(a[0],!0)),c=c.documentElement));return c};Editor.getDiagramNodeXml= function(a){var b=mxUtils.getTextContent(a),c=null;0<b.length?c=Graph.decompress(b):null!=a.firstChild&&(c=mxUtils.getXml(a.firstChild));return c};Editor.extractGraphModelFromPng=function(a){var b=null;try{var c=a.substring(a.indexOf(",")+1),f=window.atob&&!mxClient.IS_SF?atob(c):Base64.decode(c,!0);EditorUi.parsePng(f,mxUtils.bind(this,function(a,c,d){a=f.substring(a+8,a+8+d);"zTXt"==c?(d=a.indexOf(String.fromCharCode(0)),"mxGraphModel"==a.substring(0,d)&&(a=Graph.bytesToString(pako.inflateRaw(a.substring(d+ -2))).replace(/\+/g," "),null!=a&&0<a.length&&(b=a))):"tEXt"==c&&(a=a.split(String.fromCharCode(0)),1<a.length&&("mxGraphModel"==a[0]||"mxfile"==a[0])&&(b=a[1]));if(null!=b||"IDAT"==c)return!0}))}catch(I){}null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));return b};Editor.shadowOptionEnabled=!0;Editor.config=null;Editor.configVersion=null;Editor.configure=function(a,b){if(null!=a){Editor.config=a;Editor.configVersion=a.version;Menus.prototype.defaultFonts= +2))).replace(/\+/g," "),null!=a&&0<a.length&&(b=a))):"tEXt"==c&&(a=a.split(String.fromCharCode(0)),1<a.length&&("mxGraphModel"==a[0]||"mxfile"==a[0])&&(b=a[1]));if(null!=b||"IDAT"==c)return!0}))}catch(G){}null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));return b};Editor.shadowOptionEnabled=!0;Editor.config=null;Editor.configVersion=null;Editor.configure=function(a,b){if(null!=a){Editor.config=a;Editor.configVersion=a.version;Menus.prototype.defaultFonts= a.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors=a.presetColors||ColorDialog.prototype.presetColors;ColorDialog.prototype.defaultColors=a.defaultColors||ColorDialog.prototype.defaultColors;StyleFormatPanel.prototype.defaultColorSchemes=a.defaultColorSchemes||StyleFormatPanel.prototype.defaultColorSchemes;Graph.prototype.defaultEdgeLength=a.defaultEdgeLength||Graph.prototype.defaultEdgeLength;DrawioFile.prototype.autosaveDelay=a.autosaveDelay||DrawioFile.prototype.autosaveDelay; null!=a.templateFile&&(EditorUi.templateFile=a.templateFile);a.customFonts&&(Menus.prototype.defaultFonts=a.customFonts.concat(Menus.prototype.defaultFonts));a.customPresetColors&&(ColorDialog.prototype.presetColors=a.customPresetColors.concat(ColorDialog.prototype.presetColors));null!=a.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=a.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));if(null!=a.css){var c=document.createElement("style");c.setAttribute("type", "text/css");c.appendChild(document.createTextNode(a.css));var f=document.getElementsByTagName("script")[0];f.parentNode.insertBefore(c,f)}null!=a.libraries&&(Sidebar.prototype.customEntries=a.libraries);null!=a.enabledLibraries&&(Sidebar.prototype.enabledLibraries=a.enabledLibraries);null!=a.defaultLibraries&&(Sidebar.prototype.defaultEntries=a.defaultLibraries);null!=a.defaultCustomLibraries&&(Editor.defaultCustomLibraries=a.defaultCustomLibraries);null!=a.enableCustomLibraries&&(Editor.enableCustomLibraries= @@ -8349,24 +8363,24 @@ d.type="text/javascript";d.src=a;f[0].parentNode.appendChild(d)}};Editor.prototy c?b.push(c.replace(/\\'/g,"'")):void 0!==f?b.push(f.replace(/\\"/g,'"')):void 0!==d&&b.push(d);return""});/,\s*$/.test(a)&&b.push("");return b};Editor.prototype.isCorsEnabledForUrl=function(a){null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(a)||"https://raw.githubusercontent.com/"===a.substring(0,34)||"https://cdn.rawgit.com/"===a.substring(0,23)||"https://rawgit.com/"===a.substring(0, 19)||/^https?:\/\/[^\/]*\.blob.core.windows.net\//.test(a)||/^https?:\/\/[^\/]*\.iconfinder.com\//.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,c=this;a.convert=function(f){if(null!=f){var d="http://"==f.substring(0,7)||"https://"==f.substring(0,8);d&&!navigator.onLine?f=EditorUi.prototype.svgBrokenImage.src:!d||f.substring(0,a.baseUrl.length)== a.baseUrl||EditorUi.prototype.crossOriginImages&&c.isCorsEnabledForUrl(f)?"chrome-extension://"!=f.substring(0,19)&&(f=b.apply(this,arguments)):f=PROXY_URL+"?url="+encodeURIComponent(f)}return f};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 c=new Image;EditorUi.prototype.crossOriginImages&&(c.crossOrigin="anonymous");c.onload=function(){var a=document.createElement("canvas"),f=a.getContext("2d");a.height=c.height;a.width=c.width;f.drawImage(c,0,0);try{b(a.toDataURL())}catch(G){b(EditorUi.prototype.svgBrokenImage.src)}};c.onerror=function(){b(EditorUi.prototype.svgBrokenImage.src)};c.src=a}};Editor.prototype.convertImages=function(a,b,c,f){null==f&&(f=this.createImageUrlConverter());var d=0,l=c||{};c=mxUtils.bind(this,function(c, -e){for(var p=a.getElementsByTagName(c),g=0;g<p.length;g++)mxUtils.bind(this,function(c){var p=f.convert(c.getAttribute(e));if(null!=p&&"data:"!=p.substring(0,5)){var g=l[p];null==g?(d++,this.convertImageToDataUri(p,function(f){null!=f&&(l[p]=f,c.setAttribute(e,f));d--;0==d&&b(a)})):c.setAttribute(e,g)}else null!=p&&c.setAttribute(e,p)})(p[g])});c("image","xlink:href");c("img","src");0==d&&b(a)};Editor.prototype.base64Encode=function(a){for(var b="",c=0,f=a.length,d,l,p;c<f;){d=a.charCodeAt(c++)&255; +else{var c=new Image;EditorUi.prototype.crossOriginImages&&(c.crossOrigin="anonymous");c.onload=function(){var a=document.createElement("canvas"),f=a.getContext("2d");a.height=c.height;a.width=c.width;f.drawImage(c,0,0);try{b(a.toDataURL())}catch(J){b(EditorUi.prototype.svgBrokenImage.src)}};c.onerror=function(){b(EditorUi.prototype.svgBrokenImage.src)};c.src=a}};Editor.prototype.convertImages=function(a,b,c,f){null==f&&(f=this.createImageUrlConverter());var d=0,l=c||{};c=mxUtils.bind(this,function(c, +p){for(var e=a.getElementsByTagName(c),g=0;g<e.length;g++)mxUtils.bind(this,function(c){var e=f.convert(c.getAttribute(p));if(null!=e&&"data:"!=e.substring(0,5)){var g=l[e];null==g?(d++,this.convertImageToDataUri(e,function(f){null!=f&&(l[e]=f,c.setAttribute(p,f));d--;0==d&&b(a)})):c.setAttribute(p,g)}else null!=e&&c.setAttribute(p,e)})(e[g])});c("image","xlink:href");c("img","src");0==d&&b(a)};Editor.prototype.base64Encode=function(a){for(var b="",c=0,f=a.length,d,l,p;c<f;){d=a.charCodeAt(c++)&255; if(c==f){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((d&3)<<4);b+="==";break}l=a.charCodeAt(c++);if(c==f){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((d&3)<<4|(l&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((l&15)<<2);b+="=";break}p= a.charCodeAt(c++);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((d&3)<<4|(l&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((l&15)<<2|(p&192)>>6);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(p&63)}return b};Editor.prototype.loadUrl=function(a,b,c,f,d,l){try{var p=f||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)|| /(\.gif)($|\?)/i.test(a);d=null!=d?d:!0;var e=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=b){var f=a.getText();if(p){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){a=mxUtilsBinaryToArray(a.request.responseBody).toArray();for(var f=Array(a.length),d=0;d<a.length;d++)f[d]=String.fromCharCode(a[d]);f=f.join("")}l=null!=l?l:"data:image/png;base64,";f=l+this.base64Encode(f)}b(f)}}else null!= -c&&c({code:App.ERROR_UNKNOWN},a)}),function(){null!=c&&c({code:App.ERROR_UNKNOWN})},p,this.timeout,function(){d&&null!=c&&c({code:App.ERROR_TIMEOUT,retry:e})})});e()}catch(N){null!=c&&c(N)}};Editor.prototype.loadFonts=function(a){if(null!=this.fontCss&&null==this.resolvedFontCss){var b=function(a){return a.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")},c=this.fontCss.split("url("),f=0,d={},l=mxUtils.bind(this,function(){if(0==f){for(var l=[c[0]],p=1;p<c.length;p++){var e= +c&&c({code:App.ERROR_UNKNOWN},a)}),function(){null!=c&&c({code:App.ERROR_UNKNOWN})},p,this.timeout,function(){d&&null!=c&&c({code:App.ERROR_TIMEOUT,retry:e})})});e()}catch(K){null!=c&&c(K)}};Editor.prototype.loadFonts=function(a){if(null!=this.fontCss&&null==this.resolvedFontCss){var b=function(a){return a.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")},c=this.fontCss.split("url("),f=0,d={},l=mxUtils.bind(this,function(){if(0==f){for(var l=[c[0]],p=1;p<c.length;p++){var e= c[p].indexOf(")");l.push('url("');l.push(d[b(c[p].substring(0,e))]);l.push('"'+c[p].substring(e))}this.resolvedFontCss=l.join("");a()}});if(0<c.length)for(var p=1;p<c.length;p++){var e=c[p].indexOf(")"),g=null,k=c[p].indexOf("format(",e);0<k&&(g=b(c[p].substring(k+7,c[p].indexOf(")",k))));mxUtils.bind(this,function(a){if(null==d[a]){d[a]=a;f++;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 c=a;/^https?:\/\//.test(c)&&!this.isCorsEnabledForUrl(c)&&(c=PROXY_URL+"?url="+encodeURIComponent(a));this.loadUrl(c,mxUtils.bind(this,function(b){d[a]=b;f--;l()}),mxUtils.bind(this, function(a){f--;l()}),!0,null,"data:"+b+";charset=utf-8;base64,")}})(b(c[p].substring(0,e)),g)}}else a()};Editor.prototype.convertMath=function(a,b,c,f){a.mathEnabled&&"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?(Editor.MathJaxRender(b),window.setTimeout(mxUtils.bind(this,function(){MathJax.Hub.Queue(mxUtils.bind(this,function(){f()}))}),0)):f()};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||!this.graph.mathEnabled&&this.useCanvasForExport};Editor.prototype.exportToCanvas= -function(a,b,c,f,d,l,p,e,g,k,q,v,u,B){l=null!=l?l:!0;v=null!=v?v:this.graph;u=null!=u?u:0;var x=g?null:v.background;x==mxConstants.NONE&&(x=null);null==x&&(x=f);null==x&&0==g&&(x=this.graph.defaultPageBackgroundColor);this.convertImages(v.getSvg(x,null,null,B,null,null!=p?p:!0,null,null,null,k),mxUtils.bind(this,function(c){var f=new Image;f.onload=mxUtils.bind(this,function(){try{var p=document.createElement("canvas"),g=parseInt(c.getAttribute("width")),k=parseInt(c.getAttribute("height"));e=null!= -e?e:1;null!=b&&(e=l?Math.min(1,Math.min(3*b/(4*k),b/g)):b/g);g=Math.ceil(e*g)+2*u;k=Math.ceil(e*k)+2*u;p.setAttribute("width",g);p.setAttribute("height",k);var q=p.getContext("2d");null!=x&&(q.beginPath(),q.rect(0,0,g,k),q.fillStyle=x,q.fill());q.scale(e,e);mxClient.IS_SF?window.setTimeout(function(){q.drawImage(f,u/e,u/e);a(p)},0):(q.drawImage(f,u/e,u/e),a(p))}catch(Y){null!=d&&d(Y)}});f.onerror=function(a){null!=d&&d(a)};try{k&&this.graph.addSvgShadow(c);var p=mxUtils.bind(this,function(){if(null!= -this.resolvedFontCss){var a=document.createElement("style");a.setAttribute("type","text/css");a.innerHTML=this.resolvedFontCss;c.getElementsByTagName("defs")[0].appendChild(a)}this.convertMath(v,c,!0,mxUtils.bind(this,function(){f.src=this.createSvgDataUri(mxUtils.getXml(c))}))});this.loadFonts(p)}catch(V){null!=d&&d(V)}}),c,q)};Editor.prototype.writeGraphModelToPng=function(a,b,c,f,d){function l(a,b){var c=g;g+=b;return a.substring(c,g)}function p(a){a=l(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<< +function(a,b,c,f,d,l,p,e,g,k,t,x,B,u){l=null!=l?l:!0;x=null!=x?x:this.graph;B=null!=B?B:0;var A=g?null:x.background;A==mxConstants.NONE&&(A=null);null==A&&(A=f);null==A&&0==g&&(A=this.graph.defaultPageBackgroundColor);this.convertImages(x.getSvg(A,null,null,u,null,null!=p?p:!0,null,null,null,k),mxUtils.bind(this,function(c){var f=new Image;f.onload=mxUtils.bind(this,function(){try{var p=document.createElement("canvas"),g=parseInt(c.getAttribute("width")),k=parseInt(c.getAttribute("height"));e=null!= +e?e:1;null!=b&&(e=l?Math.min(1,Math.min(3*b/(4*k),b/g)):b/g);g=Math.ceil(e*g)+2*B;k=Math.ceil(e*k)+2*B;p.setAttribute("width",g);p.setAttribute("height",k);var t=p.getContext("2d");null!=A&&(t.beginPath(),t.rect(0,0,g,k),t.fillStyle=A,t.fill());t.scale(e,e);mxClient.IS_SF?window.setTimeout(function(){t.drawImage(f,B/e,B/e);a(p)},0):(t.drawImage(f,B/e,B/e),a(p))}catch(Y){null!=d&&d(Y)}});f.onerror=function(a){null!=d&&d(a)};try{k&&this.graph.addSvgShadow(c);var p=mxUtils.bind(this,function(){if(null!= +this.resolvedFontCss){var a=document.createElement("style");a.setAttribute("type","text/css");a.innerHTML=this.resolvedFontCss;c.getElementsByTagName("defs")[0].appendChild(a)}this.convertMath(x,c,!0,mxUtils.bind(this,function(){f.src=this.createSvgDataUri(mxUtils.getXml(c))}))});this.loadFonts(p)}catch(V){null!=d&&d(V)}}),c,t)};Editor.prototype.writeGraphModelToPng=function(a,b,c,f,d){function l(a,b){var c=g;g+=b;return a.substring(c,g)}function p(a){a=l(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<< 8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function e(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(l(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=d&&d();else if(l(a,4),"IHDR"!=l(a,4))null!=d&&d();else{l(a,17);d=a.substring(0,g);do{var k=p(a);if("IDAT"==l(a,4)){d=a.substring(0,g-8);c=c+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+f;f=4294967295; f=EditorUi.prototype.updateCRC(f,b,0,4);f=EditorUi.prototype.updateCRC(f,c,0,c.length);d+=e(c.length)+b+c+e(f^4294967295);d+=a.substring(g-8,a.length);break}d+=a.substring(g-8,g-4+k);l(a,k);l(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 e=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){e.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(a,b){var c=null;null!=a.editor.graph.getModel().getParent(b)?c=b.getId():null!=a.currentPage&&(c=a.currentPage.getId());return c});if(null!=window.StyleFormatPanel){var k=Format.prototype.init;Format.prototype.init=function(){k.apply(this,arguments); this.editorUi.editor.addListener("fileLoaded",this.update)};var m=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?m.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var a=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=a&&a.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(a){return!1};var n=DiagramFormatPanel.prototype.addView; DiagramFormatPanel.prototype.addView=function(a){a=n.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var b=this.editorUi,c=b.editor.graph,f=this.createOption(mxResources.get("shadow"),function(){return c.shadowVisible},function(a){var f=new ChangePageSetup(b);f.ignoreColor=!0;f.ignoreImage=!0;f.shadowVisible=a;c.model.execute(f)},{install:function(a){this.listener=function(){a(c.shadowVisible)};b.addListener("shadowVisibleChanged",this.listener)}, -destroy:function(){b.removeListener(this.listener)}});Editor.shadowOptionEnabled||(f.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(f,60));a.appendChild(f)}return a};var t=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(a){a=t.apply(this,arguments);var b=this.editorUi,c=b.editor.graph;if(c.isEnabled()){var f=b.getCurrentFile();if(null!=f&&f.isAutosaveOptional()){var d=this.createOption(mxResources.get("autosave"),function(){return b.editor.autosave}, +destroy:function(){b.removeListener(this.listener)}});Editor.shadowOptionEnabled||(f.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(f,60));a.appendChild(f)}return a};var q=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(a){a=q.apply(this,arguments);var b=this.editorUi,c=b.editor.graph;if(c.isEnabled()){var f=b.getCurrentFile();if(null!=f&&f.isAutosaveOptional()){var d=this.createOption(mxResources.get("autosave"),function(){return b.editor.autosave}, function(a){b.editor.setAutosave(a);b.editor.autosave&&f.isModified()&&f.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()&&c.isEnabled()&&"undefined"!==typeof MathJax){d=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return c.mathEnabled},function(a){b.actions.get("mathematicalTypesetting").funct()}, {install:function(a){this.listener=function(){a(c.mathEnabled)};b.addListener("mathEnabledChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}});d.style.paddingTop="5px";a.appendChild(d);var l=b.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000032875");l.style.position="relative";l.style.marginLeft="6px";l.style.top="2px";d.appendChild(l)}return a};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size", type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"absoluteArcSize",dispName:"Abs. Arc Size",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, @@ -8390,24 +8404,24 @@ type:"float",min:0,defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,de stroke:"#B09500",font:"#ffffff"},{fill:"#6d8764",stroke:"#3A5431",font:"#ffffff"},{fill:"#647687",stroke:"#314354",font:"#ffffff"},{fill:"#76608a",stroke:"#432D57",font:"#ffffff"},{fill:"#a0522d",stroke:"#6D1F00",font:"#ffffff"}],[{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,c){if(null!=b){var f=function(a){if(null!=a)if(c)for(var f=0;f<a.length;f++)b[a[f].name]=a[f];else for(var d in b){for(var l=!1,f=0;f<a.length;f++)if(a[f].name==d&&a[f].type==b[d].type){l=!0;break}l||delete b[d]}},d=this.editorUi.editor.graph.view.getState(a);null!=d&& -null!=d.shape&&(d.shape.commonCustomPropAdded||(d.shape.commonCustomPropAdded=!0,d.shape.customProperties=d.shape.customProperties||[],d.cell.vertex?Array.prototype.push.apply(d.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(d.shape.customProperties,Editor.commonEdgeProperties)),f(d.shape.customProperties));a=a.getAttribute("customProperties");if(null!=a)try{f(JSON.parse(a))}catch(G){}}};var f=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var a= +null!=d.shape&&(d.shape.commonCustomPropAdded||(d.shape.commonCustomPropAdded=!0,d.shape.customProperties=d.shape.customProperties||[],d.cell.vertex?Array.prototype.push.apply(d.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(d.shape.customProperties,Editor.commonEdgeProperties)),f(d.shape.customProperties));a=a.getAttribute("customProperties");if(null!=a)try{f(JSON.parse(a))}catch(J){}}};var f=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()));f.apply(this,arguments);if(Editor.enableCustomProperties){for(var b={},c=a.vertices,d=a.edges,l=0;l<c.length;l++)this.findCommonProperties(c[l],b,0==l);for(l=0;l<d.length;l++)this.findCommonProperties(d[l],b,0==c.length&&0==l);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(b).length&&this.container.appendChild(this.addProperties(this.createPanel(), b,a))}};var l=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(a){var b=mxUtils.button(mxResources.get("copyStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("copyStyle").funct()}));b.setAttribute("title",mxResources.get("copyStyle")+" ("+this.editorUi.actions.get("copyStyle").shortcut+")");b.style.marginBottom="2px";b.style.width="100px";b.style.marginRight="2px";a.appendChild(b);b=mxUtils.button(mxResources.get("pasteStyle"),mxUtils.bind(this, -function(a){this.editorUi.actions.get("pasteStyle").funct()}));b.setAttribute("title",mxResources.get("pasteStyle")+" ("+this.editorUi.actions.get("pasteStyle").shortcut+")");b.style.marginBottom="2px";b.style.width="100px";a.appendChild(b);mxUtils.br(a);return l.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=function(a,b,c){function f(a,b,c,f){v.getModel().beginUpdate();try{var d=[],l=[];if(null!=c.index){for(var p=[],e=c.parentRow.nextSibling;e&& -e.getAttribute("data-pName")==a;)p.push(e.getAttribute("data-pValue")),e=e.nextSibling;c.index<p.length?null!=f?p.splice(f,1):p[c.index]=b:p.push(b);null!=c.size&&p.length>c.size&&(p=p.slice(0,c.size));b=p.join(",");null!=c.countProperty&&(v.setCellStyles(c.countProperty,p.length,v.getSelectionCells()),d.push(c.countProperty),l.push(p.length))}v.setCellStyles(a,b,v.getSelectionCells());d.push(a);l.push(b);if(null!=c.dependentProps)for(a=0;a<c.dependentProps.length;a++){var g=c.dependentPropsDefVal[a], -k=c.dependentPropsVals[a];if(k.length>b)k=k.slice(0,b);else for(var u=k.length;u<b;u++)k.push(g);k=k.join(",");v.setCellStyles(c.dependentProps[a],k,v.getSelectionCells());d.push(c.dependentProps[a]);l.push(k)}if("function"==typeof c.onChange)c.onChange(v,b);q.editorUi.fireEvent(new mxEventObject("styleChanged","keys",d,"values",l,"cells",v.getSelectionCells()))}finally{v.getModel().endUpdate()}}function d(b,c,f){var d=mxUtils.getOffset(a,!0),l=mxUtils.getOffset(b,!0);c.style.position="absolute"; -c.style.left=l.x-d.x+"px";c.style.top=l.y-d.y+"px";c.style.width=b.offsetWidth+"px";c.style.height=b.offsetHeight-(f?4:0)+"px";c.style.zIndex=5}function l(a,b,c){var d=document.createElement("div");d.style.width="32px";d.style.height="4px";d.style.margin="2px";d.style.border="1px solid black";d.style.background=b&&"none"!=b?b:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(q,function(l){this.editorUi.pickColor(b,function(b){d.style.background="none"==b?"url('"+Dialog.prototype.noColorImage+ -"')":b;f(a,b,c)});mxEvent.consume(l)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(d);return btn}function p(a,b,c,d,l,p,e){null!=b&&(b=b.split(","),u.push({name:a,values:b,type:c,defVal:d,countProperty:l,parentRow:p,isDeletable:!0,flipBkg:e}));btn=mxUtils.button("+",mxUtils.bind(q,function(b){for(var g=p,q=0;null!=g.nextSibling;)if(g.nextSibling.getAttribute("data-pName")==a)g=g.nextSibling,q++;else break;var v={type:c,parentRow:p,index:q,isDeletable:!0, -defVal:d,countProperty:l},q=k(a,"",v,0==q%2,e);f(a,d,v);g.parentNode.insertBefore(q,g.nextSibling);mxEvent.consume(b)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function e(a,b,c,f,d,l,p){if(0<d){var e=Array(d);b=null!=b?b.split(","):[];for(var g=0;g<d;g++)e[g]=null!=b[g]?b[g]:null!=f?f:"";u.push({name:a,values:e,type:c,defVal:f,parentRow:l,flipBkg:p,size:d})}return document.createElement("div")}function g(a,b,c){var d=document.createElement("input");d.type= -"checkbox";d.checked="1"==b;mxEvent.addListener(d,"change",function(){f(a,d.checked?"1":"0",c)});return d}function k(b,c,k,v,u){var m=k.dispName,B=k.type,n=document.createElement("tr");n.className="gePropRow"+(u?"Dark":"")+(v?"Alt":"")+" gePropNonHeaderRow";n.setAttribute("data-pName",b);n.setAttribute("data-pValue",c);v=!1;null!=k.index&&(n.setAttribute("data-index",k.index),m=(null!=m?m:"")+"["+k.index+"]",v=!0);var x=document.createElement("td");x.className="gePropRowCell";x.innerHTML=mxUtils.htmlEntities(mxResources.get(m, -null,m));v&&(x.style.textAlign="right");n.appendChild(x);x=document.createElement("td");x.className="gePropRowCell";if("color"==B)x.appendChild(l(b,c,k));else if("bool"==B||"boolean"==B)x.appendChild(g(b,c,k));else if("enum"==B){var y=k.enumList;for(u=0;u<y.length;u++)if(m=y[u],m.val==c){x.innerHTML=mxUtils.htmlEntities(mxResources.get(m.dispName,null,m.dispName));break}mxEvent.addListener(x,"click",mxUtils.bind(q,function(){var l=document.createElement("select");d(x,l);for(var p=0;p<y.length;p++){var e= -y[p],g=document.createElement("option");g.value=mxUtils.htmlEntities(e.val);g.innerHTML=mxUtils.htmlEntities(mxResources.get(e.dispName,null,e.dispName));l.appendChild(g)}l.value=c;a.appendChild(l);mxEvent.addListener(l,"change",function(){var a=mxUtils.htmlEntities(l.value);f(b,a,k)});l.focus();mxEvent.addListener(l,"blur",function(){a.removeChild(l)})}))}else"dynamicArr"==B?x.appendChild(p(b,c,k.subType,k.subDefVal,k.countProperty,n,u)):"staticArr"==B?x.appendChild(e(b,c,k.subType,k.subDefVal,k.size, -n,u)):(x.innerHTML=c,mxEvent.addListener(x,"click",mxUtils.bind(q,function(){function l(){var a=p.value,a=0==a.length&&"string"!=B?0:a;k.allowAuto&&("auto"==a.trim().toLowerCase()?(a="auto",B="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"==B?parseInt(a):a)+"");f(b,a,k)}var p=document.createElement("input");d(x,p,!0);p.value=c;p.className="gePropEditor";"int"!=B&&"float"!=B||k.allowAuto||(p.type="number",p.step= -"int"==B?"1":"any",null!=k.min&&(p.min=parseFloat(k.min)),null!=k.max&&(p.max=parseFloat(k.max)));a.appendChild(p);mxEvent.addListener(p,"keypress",function(a){13==a.keyCode&&l()});p.focus();mxEvent.addListener(p,"blur",function(){l()})})));k.isDeletable&&(u=mxUtils.button("-",mxUtils.bind(q,function(a){f(b,"",k,k.index);mxEvent.consume(a)})),u.style.height="16px",u.style.width="25px",u.style["float"]="right",u.className="geColorBtn",x.appendChild(u));n.appendChild(x);return n}var q=this,v=this.editorUi.editor.graph, -u=[];a.style.position="relative";a.style.padding="0";var B=document.createElement("table");B.style.whiteSpace="nowrap";B.style.width="100%";var m=document.createElement("tr");m.className="gePropHeader";var n=document.createElement("th");n.className="gePropHeaderCell";var x=document.createElement("img");x.src=Sidebar.prototype.expandedImage;n.appendChild(x);mxUtils.write(n,mxResources.get("property"));m.style.cursor="pointer";var y=function(){var b=B.querySelectorAll(".gePropNonHeaderRow"),c;if(q.editorUi.propertiesCollapsed){x.src= -Sidebar.prototype.collapsedImage;c="none";for(var f=a.childNodes.length-1;0<=f;f--)try{var d=a.childNodes[f],l=d.nodeName.toUpperCase();"INPUT"!=l&&"SELECT"!=l||a.removeChild(d)}catch(O){}}else x.src=Sidebar.prototype.expandedImage,c="";for(f=0;f<b.length;f++)b[f].style.display=c};mxEvent.addListener(m,"click",function(){q.editorUi.propertiesCollapsed=!q.editorUi.propertiesCollapsed;y()});m.appendChild(n);n=document.createElement("th");n.className="gePropHeaderCell";n.innerHTML=mxResources.get("value"); -m.appendChild(n);B.appendChild(m);var z=!1,A=!1,C;for(C in b)if(m=b[C],"function"!=typeof m.isVisible||m.isVisible(c)){var D=null!=c.style[C]?mxUtils.htmlEntities(c.style[C]+""):m.defVal;if("separator"==m.type)A=!A;else{if("staticArr"==m.type)m.size=parseInt(c.style[m.sizeProperty]||b[m.sizeProperty].defVal)||0;else if(null!=m.dependentProps){for(var t=m.dependentProps,J=[],H=[],n=0;n<t.length;n++){var M=c.style[t[n]];H.push(b[t[n]].subDefVal);J.push(null!=M?M.split(","):[])}m.dependentPropsDefVal= -H;m.dependentPropsVals=J}B.appendChild(k(C,D,m,z,A));z=!z}}for(n=0;n<u.length;n++)for(m=u[n],b=m.parentRow,c=0;c<m.values.length;c++)C=k(m.name,m.values[c],{type:m.type,parentRow:m.parentRow,isDeletable:m.isDeletable,index:c,defVal:m.defVal,countProperty:m.countProperty,size:m.size},0==c%2,m.flipBkg),b.parentNode.insertBefore(C,b.nextSibling),b=C;a.appendChild(B);y();return a};StyleFormatPanel.prototype.addStyles=function(a){function b(a){function b(a){var b=mxUtils.button("",function(b){f.getModel().beginUpdate(); +function(a){this.editorUi.actions.get("pasteStyle").funct()}));b.setAttribute("title",mxResources.get("pasteStyle")+" ("+this.editorUi.actions.get("pasteStyle").shortcut+")");b.style.marginBottom="2px";b.style.width="100px";a.appendChild(b);mxUtils.br(a);return l.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=function(a,b,c){function f(a,b,c,f){x.getModel().beginUpdate();try{var d=[],l=[];if(null!=c.index){for(var p=[],e=c.parentRow.nextSibling;e&& +e.getAttribute("data-pName")==a;)p.push(e.getAttribute("data-pValue")),e=e.nextSibling;c.index<p.length?null!=f?p.splice(f,1):p[c.index]=b:p.push(b);null!=c.size&&p.length>c.size&&(p=p.slice(0,c.size));b=p.join(",");null!=c.countProperty&&(x.setCellStyles(c.countProperty,p.length,x.getSelectionCells()),d.push(c.countProperty),l.push(p.length))}x.setCellStyles(a,b,x.getSelectionCells());d.push(a);l.push(b);if(null!=c.dependentProps)for(a=0;a<c.dependentProps.length;a++){var g=c.dependentPropsDefVal[a], +k=c.dependentPropsVals[a];if(k.length>b)k=k.slice(0,b);else for(var B=k.length;B<b;B++)k.push(g);k=k.join(",");x.setCellStyles(c.dependentProps[a],k,x.getSelectionCells());d.push(c.dependentProps[a]);l.push(k)}if("function"==typeof c.onChange)c.onChange(x,b);t.editorUi.fireEvent(new mxEventObject("styleChanged","keys",d,"values",l,"cells",x.getSelectionCells()))}finally{x.getModel().endUpdate()}}function d(b,c,f){var d=mxUtils.getOffset(a,!0),l=mxUtils.getOffset(b,!0);c.style.position="absolute"; +c.style.left=l.x-d.x+"px";c.style.top=l.y-d.y+"px";c.style.width=b.offsetWidth+"px";c.style.height=b.offsetHeight-(f?4:0)+"px";c.style.zIndex=5}function l(a,b,c){var d=document.createElement("div");d.style.width="32px";d.style.height="4px";d.style.margin="2px";d.style.border="1px solid black";d.style.background=b&&"none"!=b?b:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(t,function(l){this.editorUi.pickColor(b,function(b){d.style.background="none"==b?"url('"+Dialog.prototype.noColorImage+ +"')":b;f(a,b,c)});mxEvent.consume(l)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(d);return btn}function p(a,b,c,d,l,p,e){null!=b&&(b=b.split(","),B.push({name:a,values:b,type:c,defVal:d,countProperty:l,parentRow:p,isDeletable:!0,flipBkg:e}));btn=mxUtils.button("+",mxUtils.bind(t,function(b){for(var g=p,t=0;null!=g.nextSibling;)if(g.nextSibling.getAttribute("data-pName")==a)g=g.nextSibling,t++;else break;var x={type:c,parentRow:p,index:t,isDeletable:!0, +defVal:d,countProperty:l},t=k(a,"",x,0==t%2,e);f(a,d,x);g.parentNode.insertBefore(t,g.nextSibling);mxEvent.consume(b)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function e(a,b,c,f,d,l,p){if(0<d){var e=Array(d);b=null!=b?b.split(","):[];for(var g=0;g<d;g++)e[g]=null!=b[g]?b[g]:null!=f?f:"";B.push({name:a,values:e,type:c,defVal:f,parentRow:l,flipBkg:p,size:d})}return document.createElement("div")}function g(a,b,c){var d=document.createElement("input");d.type= +"checkbox";d.checked="1"==b;mxEvent.addListener(d,"change",function(){f(a,d.checked?"1":"0",c)});return d}function k(b,c,k,x,B){var u=k.dispName,m=k.type,v=document.createElement("tr");v.className="gePropRow"+(B?"Dark":"")+(x?"Alt":"")+" gePropNonHeaderRow";v.setAttribute("data-pName",b);v.setAttribute("data-pValue",c);x=!1;null!=k.index&&(v.setAttribute("data-index",k.index),u=(null!=u?u:"")+"["+k.index+"]",x=!0);var n=document.createElement("td");n.className="gePropRowCell";n.innerHTML=mxUtils.htmlEntities(mxResources.get(u, +null,u));x&&(n.style.textAlign="right");v.appendChild(n);n=document.createElement("td");n.className="gePropRowCell";if("color"==m)n.appendChild(l(b,c,k));else if("bool"==m||"boolean"==m)n.appendChild(g(b,c,k));else if("enum"==m){var A=k.enumList;for(B=0;B<A.length;B++)if(u=A[B],u.val==c){n.innerHTML=mxUtils.htmlEntities(mxResources.get(u.dispName,null,u.dispName));break}mxEvent.addListener(n,"click",mxUtils.bind(t,function(){var l=document.createElement("select");d(n,l);for(var p=0;p<A.length;p++){var e= +A[p],g=document.createElement("option");g.value=mxUtils.htmlEntities(e.val);g.innerHTML=mxUtils.htmlEntities(mxResources.get(e.dispName,null,e.dispName));l.appendChild(g)}l.value=c;a.appendChild(l);mxEvent.addListener(l,"change",function(){var a=mxUtils.htmlEntities(l.value);f(b,a,k)});l.focus();mxEvent.addListener(l,"blur",function(){a.removeChild(l)})}))}else"dynamicArr"==m?n.appendChild(p(b,c,k.subType,k.subDefVal,k.countProperty,v,B)):"staticArr"==m?n.appendChild(e(b,c,k.subType,k.subDefVal,k.size, +v,B)):(n.innerHTML=c,mxEvent.addListener(n,"click",mxUtils.bind(t,function(){function l(){var a=p.value,a=0==a.length&&"string"!=m?0:a;k.allowAuto&&("auto"==a.trim().toLowerCase()?(a="auto",m="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"==m?parseInt(a):a)+"");f(b,a,k)}var p=document.createElement("input");d(n,p,!0);p.value=c;p.className="gePropEditor";"int"!=m&&"float"!=m||k.allowAuto||(p.type="number",p.step= +"int"==m?"1":"any",null!=k.min&&(p.min=parseFloat(k.min)),null!=k.max&&(p.max=parseFloat(k.max)));a.appendChild(p);mxEvent.addListener(p,"keypress",function(a){13==a.keyCode&&l()});p.focus();mxEvent.addListener(p,"blur",function(){l()})})));k.isDeletable&&(B=mxUtils.button("-",mxUtils.bind(t,function(a){f(b,"",k,k.index);mxEvent.consume(a)})),B.style.height="16px",B.style.width="25px",B.style["float"]="right",B.className="geColorBtn",n.appendChild(B));v.appendChild(n);return v}var t=this,x=this.editorUi.editor.graph, +B=[];a.style.position="relative";a.style.padding="0";var u=document.createElement("table");u.style.whiteSpace="nowrap";u.style.width="100%";var m=document.createElement("tr");m.className="gePropHeader";var v=document.createElement("th");v.className="gePropHeaderCell";var n=document.createElement("img");n.src=Sidebar.prototype.expandedImage;v.appendChild(n);mxUtils.write(v,mxResources.get("property"));m.style.cursor="pointer";var A=function(){var b=u.querySelectorAll(".gePropNonHeaderRow"),c;if(t.editorUi.propertiesCollapsed){n.src= +Sidebar.prototype.collapsedImage;c="none";for(var f=a.childNodes.length-1;0<=f;f--)try{var d=a.childNodes[f],l=d.nodeName.toUpperCase();"INPUT"!=l&&"SELECT"!=l||a.removeChild(d)}catch(O){}}else n.src=Sidebar.prototype.expandedImage,c="";for(f=0;f<b.length;f++)b[f].style.display=c};mxEvent.addListener(m,"click",function(){t.editorUi.propertiesCollapsed=!t.editorUi.propertiesCollapsed;A()});m.appendChild(v);v=document.createElement("th");v.className="gePropHeaderCell";v.innerHTML=mxResources.get("value"); +m.appendChild(v);u.appendChild(m);var z=!1,y=!1,D;for(D in b)if(m=b[D],"function"!=typeof m.isVisible||m.isVisible(c)){var C=null!=c.style[D]?mxUtils.htmlEntities(c.style[D]+""):m.defVal;if("separator"==m.type)y=!y;else{if("staticArr"==m.type)m.size=parseInt(c.style[m.sizeProperty]||b[m.sizeProperty].defVal)||0;else if(null!=m.dependentProps){for(var q=m.dependentProps,I=[],H=[],v=0;v<q.length;v++){var N=c.style[q[v]];H.push(b[q[v]].subDefVal);I.push(null!=N?N.split(","):[])}m.dependentPropsDefVal= +H;m.dependentPropsVals=I}u.appendChild(k(D,C,m,z,y));z=!z}}for(v=0;v<B.length;v++)for(m=B[v],b=m.parentRow,c=0;c<m.values.length;c++)D=k(m.name,m.values[c],{type:m.type,parentRow:m.parentRow,isDeletable:m.isDeletable,index:c,defVal:m.defVal,countProperty:m.countProperty,size:m.size},0==c%2,m.flipBkg),b.parentNode.insertBefore(D,b.nextSibling),b=D;a.appendChild(u);A();return a};StyleFormatPanel.prototype.addStyles=function(a){function b(a){function b(a){var b=mxUtils.button("",function(b){f.getModel().beginUpdate(); try{var c=f.getSelectionCells();for(b=0;b<c.length;b++){for(var d=f.getModel().getStyle(c[b]),p=0;p<l.length;p++)d=mxUtils.removeStylename(d,l[p]);var e=f.getModel().isVertex(c[b])?f.defaultVertexStyle:f.defaultEdgeStyle;null!=a?(d=mxUtils.setStyle(d,mxConstants.STYLE_GRADIENTCOLOR,a.gradient||mxUtils.getValue(e,mxConstants.STYLE_GRADIENTCOLOR,null)),d=""==a.fill?mxUtils.setStyle(d,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(d,mxConstants.STYLE_FILLCOLOR,a.fill||mxUtils.getValue(e,mxConstants.STYLE_FILLCOLOR, null)),d=""==a.stroke?mxUtils.setStyle(d,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(d,mxConstants.STYLE_STROKECOLOR,a.stroke||mxUtils.getValue(e,mxConstants.STYLE_STROKECOLOR,null)),f.getModel().isVertex(c[b])&&(d=mxUtils.setStyle(d,mxConstants.STYLE_FONTCOLOR,a.font||mxUtils.getValue(e,mxConstants.STYLE_FONTCOLOR,null)))):(d=mxUtils.setStyle(d,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(e,mxConstants.STYLE_FILLCOLOR,"#ffffff")),d=mxUtils.setStyle(d,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(e, mxConstants.STYLE_STROKECOLOR,"#000000")),d=mxUtils.setStyle(d,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(e,mxConstants.STYLE_GRADIENTCOLOR,null)),f.getModel().isVertex(c[b])&&(d=mxUtils.setStyle(d,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(e,mxConstants.STYLE_FONTCOLOR,null))));f.getModel().setStyle(c[b],d)}}finally{f.getModel().endUpdate()}});b.className="geStyleButton";b.style.width="36px";b.style.height="30px";b.style.margin="0px 6px 6px 0px";if(null!=a)null!=a.gradient?mxClient.IS_IE&& @@ -8421,88 +8435,88 @@ mxEvent.addListener(p,"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==c?b.style.width="202px":(c.style.width="100px",b.style.width="100px",b.style.marginLeft="2px"),a.appendChild(b)):b.image&&(b=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(a){this.editorUi.actions.get("image").funct()})),b.setAttribute("title",mxResources.get("editImage")),b.style.marginBottom="2px",null==c?b.style.width="202px": (c.style.width="100px",b.style.width="100px",b.style.marginLeft="2px"),a.appendChild(b));return a}}Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize= "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(G){}}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 c=this.getInsertPoint;this.getInsertPoint=function(){return null!=b?this.getPointForEvent(b):c.apply(this,arguments)};var f=this.layoutManager.getLayout; +a.button,b.relatedTarget=a.relatedTarget}catch(J){}}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 c=this.getInsertPoint;this.getInsertPoint=function(){return null!=b?this.getPointForEvent(b):c.apply(this,arguments)};var f=this.layoutManager.getLayout; this.layoutManager.getLayout=function(a){var b=this.graph.getCellStyle(a);if(null!=b){if("rack"==b.childLayout){var c=new mxStackLayout(this.graph,!1);c.gridSize=null!=b.rackUnitSize?parseFloat(b.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;c.fill=!0;c.marginLeft=b.marginLeft||0;c.marginRight=b.marginRight||0;c.marginTop=b.marginTop||0;c.marginBottom=b.marginBottom||0;c.allowGaps=b.allowGaps||0;c.resizeParent=!1;return c}if("undefined"!==typeof mxTableLayout&&"tableLayout"== b.childLayout)return c=new mxTableLayout(this.graph),c.rows=b.tableRows||2,c.columns=b.tableColumns||2,c.colPercentages=b.colPercentages,c.rowPercentages=b.rowPercentages,c.equalColumns="1"==mxUtils.getValue(b,"equalColumns",c.colPercentages?"0":"1"),c.equalRows="1"==mxUtils.getValue(b,"equalRows",c.rowPercentages?"0":"1"),c.resizeParent="1"==mxUtils.getValue(b,"resizeParent","1"),c.border=b.tableBorder||c.border,c.marginLeft=b.marginLeft||0,c.marginRight=b.marginRight||0,c.marginTop=b.marginTop|| -0,c.marginBottom=b.marginBottom||0,c.autoAddCol="1"==mxUtils.getValue(b,"autoAddCol","0"),c.autoAddRow="1"==mxUtils.getValue(b,"autoAddRow",c.autoAddCol?"0":"1"),c.colWidths=b.colWidths||"100",c.rowHeights=b.rowHeights||"50",c}return f.apply(this,arguments)}};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};var u=Graph.prototype.getSvg; -Graph.prototype.getSvg=function(){var a=null;null!=this.themes&&"darkTheme"==this.defaultThemeName&&(a=this.stylesheet,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var b=u.apply(this,arguments);null!=a&&(this.stylesheet=a,this.refresh());return b};var y=Graph.prototype.isCssTransformsSupported;Graph.prototype.isCssTransformsSupported=function(){return y.apply(this,arguments)&&!mxClient.IS_SF};var q=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(a){var b= -q.apply(this,arguments);if(null==b){if(null==this.globalUrlVars&&null!=urlParams.vars)try{this.globalUrlVars=JSON.parse(decodeURIComponent(urlParams.vars))}catch(H){null!=window.console&&console.log("Error in vars URL parameter: "+H)}null!=this.globalUrlVars&&(b=this.globalUrlVars[a])}return b};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 z=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){z.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 c=a.actions[b];if(null!=c.open)if(this.isCustomLink(c.open)){if(!this.customLinkClicked(c.open))return}else this.openLink(c.open)}this.model.beginUpdate();try{for(b=0;b<a.actions.length;b++)c=a.actions[b],null!=c.toggle&&this.toggleCells(this.getCellsForAction(c.toggle,!0)),null!=c.show&&this.setCellsVisible(this.getCellsForAction(c.show,!0),!0),null!=c.hide&&this.setCellsVisible(this.getCellsForAction(c.hide,!0),!1)}finally{this.model.endUpdate()}for(b=0;b<a.actions.length;b++){var c= -a.actions[b],f=[];null!=c.select&&this.isEnabled()&&(f=this.getCellsForAction(c.select),this.setSelectionCells(f));null!=c.highlight&&(f=this.getCellsForAction(c.highlight),this.highlightCells(f,c.highlight.color,c.highlight.duration,c.highlight.opacity));null!=c.scroll&&(f=this.getCellsForAction(c.scroll));0<f.length&&this.scrollCellToVisible(f[0])}}};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 c=0;c<a.length;c++)if("*"==a[c])var f=this.getDefaultParent(),b=b.concat(this.model.filterDescendants(function(a){return a!=f},f));else{var d=this.model.getCell(a[c]);null!=d&&b.push(d)}return b};Graph.prototype.getCellsForTags=function(a,b,c,f){var d=[];if(null!=a){b=null!=b?b:this.model.getDescendants(this.model.getRoot());c=null!=c?c:"tags";for(var l=0,p={},e=0;e<a.length;e++)0<a[e].length&&(p[a[e].toLowerCase()]=!0,l++);for(e=0;e<b.length;e++)if(f&&this.model.getParent(b[e])== -this.model.root||this.model.isVertex(b[e])||this.model.isEdge(b[e])){var g=null!=b[e].value&&"object"==typeof b[e].value?mxUtils.trim(b[e].value.getAttribute(c)||""):"",k=!1;if(0<g.length){if(g=g.toLowerCase().split(" "),g.length>=a.length){for(var q=k=0;q<g.length&&k<l;q++)null!=p[g[q]]&&k++;k=k==l}}else k=0==a.length;k&&d.push(b[e])}}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 c=0;c<a.length;c++)this.model.setVisible(a[c],b)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(a,b,c,f){for(var d=0;d<a.length;d++)this.highlightCell(a[d],b,c,f)};Graph.prototype.highlightCell=function(a,b,c,f){b=null!=b?b:mxConstants.DEFAULT_VALID_COLOR;c=null!=c?c:1E3;a=this.view.getState(a);if(null!=a){var d=Math.max(5,mxUtils.getValue(a.style,mxConstants.STYLE_STROKEWIDTH,1)+4),l=new mxCellHighlight(this, -b,d,!1);null!=f&&(l.opacity=f);l.highlight(a);window.setTimeout(function(){null!=l.shape&&(mxUtils.setPrefixedStyle(l.shape.node.style,"transition","all 1200ms ease-in-out"),l.shape.node.style.opacity=0);window.setTimeout(function(){l.destroy()},1200)},c)}};Graph.prototype.addSvgShadow=function(a,b,c){c=null!=c?c:!1;var f=a.ownerDocument,d=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"filter"):f.createElement("filter");d.setAttribute("id",this.shadowId);var l=null!=f.createElementNS? -f.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):f.createElement("feGaussianBlur");l.setAttribute("in","SourceAlpha");l.setAttribute("stdDeviation",this.svgShadowBlur);l.setAttribute("result","blur");d.appendChild(l);l=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feOffset"):f.createElement("feOffset");l.setAttribute("in","blur");l.setAttribute("dx",this.svgShadowSize);l.setAttribute("dy",this.svgShadowSize);l.setAttribute("result","offsetBlur");d.appendChild(l);l=null!=f.createElementNS? -f.createElementNS(mxConstants.NS_SVG,"feFlood"):f.createElement("feFlood");l.setAttribute("flood-color",this.svgShadowColor);l.setAttribute("flood-opacity",this.svgShadowOpacity);l.setAttribute("result","offsetColor");d.appendChild(l);l=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feComposite"):f.createElement("feComposite");l.setAttribute("in","offsetColor");l.setAttribute("in2","offsetBlur");l.setAttribute("operator","in");l.setAttribute("result","offsetBlur");d.appendChild(l); -l=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feBlend"):f.createElement("feBlend");l.setAttribute("in","SourceGraphic");l.setAttribute("in2","offsetBlur");d.appendChild(l);l=a.getElementsByTagName("defs");0==l.length?(f=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"defs"):f.createElement("defs"),null!=a.firstChild?a.insertBefore(f,a.firstChild):a.appendChild(f)):f=l[0];f.appendChild(d);c||(b=null!=b?b:a.getElementsByTagName("g")[0],null!=b&&(b.setAttribute("filter", -"url(#"+this.shadowId+")"),isNaN(parseInt(a.getAttribute("width")))||(a.setAttribute("width",parseInt(a.getAttribute("width"))+6),a.setAttribute("height",parseInt(a.getAttribute("height"))+6),b=a.getAttribute("viewBox"),null!=b&&0<b.length&&(b=b.split(" "),3<b.length&&(w=parseFloat(b[2])+6,h=parseFloat(b[3])+6,a.setAttribute("viewBox",b[0]+" "+b[1]+" "+w+" "+h))))));return d};Graph.prototype.setShadowVisible=function(a,b){mxClient.IS_SVG&&(b=null!=b?b:!0,(this.shadowVisible=a)?this.view.getDrawPane().setAttribute("filter", -"url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),b&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var a=this.model.getChildCount(this.model.root),b,c=0;do b=this.model.getChildAt(this.model.root,c);while(c++<a&&"1"==mxUtils.getValue(this.getCellStyle(b),"locked","0"));null!=b&&this.setDefaultParent(b)}};mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"]; -mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.atlassian=[STENCIL_PATH+"/atlassian.xml",SHAPES_PATH+"/mxAtlassian.js"];mxStencilRegistry.libraries.bpmn=[SHAPES_PATH+"/bpmn/mxBpmnShape2.js",STENCIL_PATH+"/bpmn.xml"];mxStencilRegistry.libraries.dfd=[SHAPES_PATH+"/mxDFD.js"];mxStencilRegistry.libraries.er=[SHAPES_PATH+"/er/mxER.js"];mxStencilRegistry.libraries.flowchart=[SHAPES_PATH+"/mxFlowchart.js",STENCIL_PATH+"/flowchart.xml"];mxStencilRegistry.libraries.ios= -[SHAPES_PATH+"/mockup/mxMockupiOS.js"];mxStencilRegistry.libraries.rackGeneral=[SHAPES_PATH+"/rack/mxRack.js",STENCIL_PATH+"/rack/general.xml"];mxStencilRegistry.libraries.rackF5=[STENCIL_PATH+"/rack/f5.xml"];mxStencilRegistry.libraries.lean_mapping=[SHAPES_PATH+"/mxLeanMap.js",STENCIL_PATH+"/lean_mapping.xml"];mxStencilRegistry.libraries.basic=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/basic.xml"];mxStencilRegistry.libraries.ios7icons=[STENCIL_PATH+"/ios7/icons.xml"];mxStencilRegistry.libraries.ios7ui= -[SHAPES_PATH+"/ios7/mxIOS7Ui.js",STENCIL_PATH+"/ios7/misc.xml"];mxStencilRegistry.libraries.android=[SHAPES_PATH+"/mxAndroid.js",STENCIL_PATH+"/android/android.xml"];mxStencilRegistry.libraries["electrical/miscellaneous"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/miscellaneous.xml"];mxStencilRegistry.libraries["electrical/transmission"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/transmission.xml"];mxStencilRegistry.libraries["electrical/logic_gates"]=[SHAPES_PATH+"/mxElectrical.js", -STENCIL_PATH+"/electrical/logic_gates.xml"];mxStencilRegistry.libraries["electrical/abstract"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/abstract.xml"];mxStencilRegistry.libraries.infographic=[SHAPES_PATH+"/mxInfographic.js"];mxStencilRegistry.libraries["mockup/buttons"]=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries["mockup/containers"]=[SHAPES_PATH+"/mockup/mxMockupContainers.js"];mxStencilRegistry.libraries["mockup/forms"]=[SHAPES_PATH+"/mockup/mxMockupForms.js"]; -mxStencilRegistry.libraries["mockup/graphics"]=[SHAPES_PATH+"/mockup/mxMockupGraphics.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/markup"]=[SHAPES_PATH+"/mockup/mxMockupMarkup.js"];mxStencilRegistry.libraries["mockup/misc"]=[SHAPES_PATH+"/mockup/mxMockupMisc.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/navigation"]=[SHAPES_PATH+"/mockup/mxMockupNavigation.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/text"]=[SHAPES_PATH+ -"/mockup/mxMockupText.js"];mxStencilRegistry.libraries.floorplan=[SHAPES_PATH+"/mxFloorplan.js",STENCIL_PATH+"/floorplan.xml"];mxStencilRegistry.libraries.bootstrap=[SHAPES_PATH+"/mxBootstrap.js",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.xml"];mxStencilRegistry.libraries.gcp2=[SHAPES_PATH+"/mxGCP2.js",STENCIL_PATH+"/gcp2.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];mxStencilRegistry.libraries.archimate= -[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.aws4=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+ -"/aws4.xml"];mxStencilRegistry.libraries.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.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 C=mxMarker.createMarker;mxMarker.createMarker=function(a,b,c,f,d,l,p,e,g,k){if(null!=c&&null==mxMarker.markers[c]){var q=this.getPackageForType(c);null!=q&&mxStencilRegistry.getStencil(q)}return C.apply(this,arguments)};PrintDialog.prototype.create=function(a,b){function c(){m.value=Math.max(1, -Math.min(e,Math.max(parseInt(m.value),parseInt(u.value))));u.value=Math.max(1,Math.min(e,Math.min(parseInt(m.value),parseInt(u.value))))}function f(b){function c(b,c,d){var l=b.getGraphBounds(),p=0,e=0,g=ja.get(),k=1/b.pageScale,q=x.checked;if(q)var k=parseInt(S.value),v=parseInt(U.value),k=Math.min(g.height*v/(l.height/b.view.scale),g.width*k/(l.width/b.view.scale));else k=parseInt(y.value)/(100*b.pageScale),isNaN(k)&&(f=1/b.pageScale,y.value="100 %");g=mxRectangle.fromRectangle(g);g.width=Math.ceil(g.width* -f);g.height=Math.ceil(g.height*f);k*=f;!q&&b.pageVisible?(l=b.getPageLayout(),p-=l.x*g.width,e-=l.y*g.height):q=!0;if(null==c){c=PrintDialog.createPrintPreview(b,k,g,0,p,e,q);c.pageSelector=!1;c.mathEnabled=!1;b=a.getCurrentFile();null!=b&&(c.title=b.getTitle());var u=c.writeHead;c.writeHead=function(b){u.apply(this,arguments);null!=a.editor.fontCss&&(b.writeln('<style type="text/css">'),b.writeln(a.editor.fontCss),b.writeln("</style>"))};if("undefined"!==typeof MathJax){var B=c.renderPage;c.renderPage= -function(a,b,c,f,d,l){var p=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;var e=B.apply(this,arguments);mxClient.NO_FO=p;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:e.className="geDisableMathJax";return e}}c.open(null,null,d,!0)}else{g=b.background;if(null==g||""==g||g==mxConstants.NONE)g="#ffffff";c.backgroundColor=g;c.autoOrigin=q;c.appendGraph(b,k,p,e,d,!0)}return c}var f=parseInt(ka.value)/100;isNaN(f)&&(f= -1,ka.value="100 %");var f=.75*f,l=u.value,p=m.value,e=!q.checked,k=null;e&&(e=l==g&&p==g);if(!e&&null!=a.pages&&a.pages.length){var v=0,e=a.pages.length-1;q.checked||(v=parseInt(l)-1,e=parseInt(p)-1);for(var B=v;B<=e;B++){var n=a.pages[B],l=n==a.currentPage?d:null;if(null==l){var l=a.createTemporaryGraph(d.getStylesheet()),p=!0,v=!1,z=null,A=null;null==n.viewState&&null==n.root&&a.updatePageRoot(n);null!=n.viewState&&(p=n.viewState.pageVisible,v=n.viewState.mathEnabled,z=n.viewState.background,A= -n.viewState.backgroundImage);l.background=z;l.backgroundImage=null!=A?new mxImage(A.src,A.width,A.height):null;l.pageVisible=p;l.mathEnabled=v;var C=l.getGlobalVariable;l.getGlobalVariable=function(a){return"page"==a?n.getName():"pagenumber"==a?B+1:C.apply(this,arguments)};document.body.appendChild(l.container);a.updatePageRoot(n);l.model.setRoot(n.root)}k=c(l,k,B!=e);l!=d&&l.container.parentNode.removeChild(l.container)}}else k=c(d);null==k?a.handleError({message:mxResources.get("errorUpdatingPreview")}): +0,c.marginBottom=b.marginBottom||0,c.autoAddCol="1"==mxUtils.getValue(b,"autoAddCol","0"),c.autoAddRow="1"==mxUtils.getValue(b,"autoAddRow",c.autoAddCol?"0":"1"),c.colWidths=b.colWidths||"100",c.rowHeights=b.rowHeights||"50",c}return f.apply(this,arguments)};this.updateGlobalUrlVariables()};Graph.prototype.updateGlobalUrlVariables=function(){if(null!=urlParams.vars)try{this.globalUrlVars=JSON.parse(decodeURIComponent(urlParams.vars))}catch(A){null!=window.console&&console.log("Error in vars URL parameter: "+ +A)}};Graph.prototype.getExportVariables=function(){return null!=this.globalUrlVars?this.globalUrlVars:{}};var u=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(a){var b=u.apply(this,arguments);null==b&&null!=this.globalUrlVars&&(b=this.globalUrlVars[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}; +var v=Graph.prototype.getSvg;Graph.prototype.getSvg=function(){var a=null;null!=this.themes&&"darkTheme"==this.defaultThemeName&&(a=this.stylesheet,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var b=v.apply(this,arguments);null!=a&&(this.stylesheet=a,this.refresh());return b};var t=Graph.prototype.isCssTransformsSupported;Graph.prototype.isCssTransformsSupported=function(){return t.apply(this,arguments)&&!mxClient.IS_SF};var z=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage= +function(){z.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 y=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){y.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(a){if("data:action/json,"== +a.substring(0,17)&&(a=JSON.parse(a.substring(17)),null!=a.actions)){for(var b=0;b<a.actions.length;b++){var c=a.actions[b];if(null!=c.open)if(this.isCustomLink(c.open)){if(!this.customLinkClicked(c.open))return}else this.openLink(c.open)}this.model.beginUpdate();try{for(b=0;b<a.actions.length;b++)c=a.actions[b],null!=c.toggle&&this.toggleCells(this.getCellsForAction(c.toggle,!0)),null!=c.show&&this.setCellsVisible(this.getCellsForAction(c.show,!0),!0),null!=c.hide&&this.setCellsVisible(this.getCellsForAction(c.hide, +!0),!1)}finally{this.model.endUpdate()}for(b=0;b<a.actions.length;b++){var c=a.actions[b],f=[];null!=c.select&&this.isEnabled()&&(f=this.getCellsForAction(c.select),this.setSelectionCells(f));null!=c.highlight&&(f=this.getCellsForAction(c.highlight),this.highlightCells(f,c.highlight.color,c.highlight.duration,c.highlight.opacity));null!=c.scroll&&(f=this.getCellsForAction(c.scroll));0<f.length&&this.scrollCellToVisible(f[0])}}};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 c=0;c<a.length;c++)if("*"==a[c])var f=this.getDefaultParent(),b=b.concat(this.model.filterDescendants(function(a){return a!=f},f));else{var d=this.model.getCell(a[c]);null!=d&&b.push(d)}return b};Graph.prototype.getCellsForTags=function(a,b,c,f){var d=[];if(null!=a){b=null!=b?b:this.model.getDescendants(this.model.getRoot());c=null!=c?c:"tags";for(var l=0,p={},e=0;e<a.length;e++)0<a[e].length&&(p[a[e].toLowerCase()]= +!0,l++);for(e=0;e<b.length;e++)if(f&&this.model.getParent(b[e])==this.model.root||this.model.isVertex(b[e])||this.model.isEdge(b[e])){var g=null!=b[e].value&&"object"==typeof b[e].value?mxUtils.trim(b[e].value.getAttribute(c)||""):"",k=!1;if(0<g.length){if(g=g.toLowerCase().split(" "),g.length>=a.length){for(var t=k=0;t<g.length&&k<l;t++)null!=p[g[t]]&&k++;k=k==l}}else k=0==a.length;k&&d.push(b[e])}}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 c=0;c<a.length;c++)this.model.setVisible(a[c],b)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(a,b,c,f){for(var d=0;d<a.length;d++)this.highlightCell(a[d],b,c,f)};Graph.prototype.highlightCell=function(a,b,c,f){b=null!=b?b:mxConstants.DEFAULT_VALID_COLOR;c=null!=c?c:1E3;a=this.view.getState(a);if(null!=a){var d=Math.max(5,mxUtils.getValue(a.style, +mxConstants.STYLE_STROKEWIDTH,1)+4),l=new mxCellHighlight(this,b,d,!1);null!=f&&(l.opacity=f);l.highlight(a);window.setTimeout(function(){null!=l.shape&&(mxUtils.setPrefixedStyle(l.shape.node.style,"transition","all 1200ms ease-in-out"),l.shape.node.style.opacity=0);window.setTimeout(function(){l.destroy()},1200)},c)}};Graph.prototype.addSvgShadow=function(a,b,c){c=null!=c?c:!1;var f=a.ownerDocument,d=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"filter"):f.createElement("filter"); +d.setAttribute("id",this.shadowId);var l=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):f.createElement("feGaussianBlur");l.setAttribute("in","SourceAlpha");l.setAttribute("stdDeviation",this.svgShadowBlur);l.setAttribute("result","blur");d.appendChild(l);l=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feOffset"):f.createElement("feOffset");l.setAttribute("in","blur");l.setAttribute("dx",this.svgShadowSize);l.setAttribute("dy",this.svgShadowSize);l.setAttribute("result", +"offsetBlur");d.appendChild(l);l=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feFlood"):f.createElement("feFlood");l.setAttribute("flood-color",this.svgShadowColor);l.setAttribute("flood-opacity",this.svgShadowOpacity);l.setAttribute("result","offsetColor");d.appendChild(l);l=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feComposite"):f.createElement("feComposite");l.setAttribute("in","offsetColor");l.setAttribute("in2","offsetBlur");l.setAttribute("operator","in"); +l.setAttribute("result","offsetBlur");d.appendChild(l);l=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feBlend"):f.createElement("feBlend");l.setAttribute("in","SourceGraphic");l.setAttribute("in2","offsetBlur");d.appendChild(l);l=a.getElementsByTagName("defs");0==l.length?(f=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"defs"):f.createElement("defs"),null!=a.firstChild?a.insertBefore(f,a.firstChild):a.appendChild(f)):f=l[0];f.appendChild(d);c||(b=null!=b?b:a.getElementsByTagName("g")[0], +null!=b&&(b.setAttribute("filter","url(#"+this.shadowId+")"),isNaN(parseInt(a.getAttribute("width")))||(a.setAttribute("width",parseInt(a.getAttribute("width"))+6),a.setAttribute("height",parseInt(a.getAttribute("height"))+6),b=a.getAttribute("viewBox"),null!=b&&0<b.length&&(b=b.split(" "),3<b.length&&(w=parseFloat(b[2])+6,h=parseFloat(b[3])+6,a.setAttribute("viewBox",b[0]+" "+b[1]+" "+w+" "+h))))));return d};Graph.prototype.setShadowVisible=function(a,b){mxClient.IS_SVG&&(b=null!=b?b:!0,(this.shadowVisible= +a)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),b&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var a=this.model.getChildCount(this.model.root),b,c=0;do b=this.model.getChildAt(this.model.root,c);while(c++<a&&"1"==mxUtils.getValue(this.getCellStyle(b),"locked","0"));null!=b&&this.setDefaultParent(b)}};mxStencilRegistry.libraries.mockup= +[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.atlassian=[STENCIL_PATH+"/atlassian.xml",SHAPES_PATH+"/mxAtlassian.js"];mxStencilRegistry.libraries.bpmn=[SHAPES_PATH+"/bpmn/mxBpmnShape2.js",STENCIL_PATH+"/bpmn.xml"];mxStencilRegistry.libraries.dfd=[SHAPES_PATH+"/mxDFD.js"];mxStencilRegistry.libraries.er=[SHAPES_PATH+"/er/mxER.js"];mxStencilRegistry.libraries.flowchart=[SHAPES_PATH+"/mxFlowchart.js",STENCIL_PATH+ +"/flowchart.xml"];mxStencilRegistry.libraries.ios=[SHAPES_PATH+"/mockup/mxMockupiOS.js"];mxStencilRegistry.libraries.rackGeneral=[SHAPES_PATH+"/rack/mxRack.js",STENCIL_PATH+"/rack/general.xml"];mxStencilRegistry.libraries.rackF5=[STENCIL_PATH+"/rack/f5.xml"];mxStencilRegistry.libraries.lean_mapping=[SHAPES_PATH+"/mxLeanMap.js",STENCIL_PATH+"/lean_mapping.xml"];mxStencilRegistry.libraries.basic=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/basic.xml"];mxStencilRegistry.libraries.ios7icons=[STENCIL_PATH+ +"/ios7/icons.xml"];mxStencilRegistry.libraries.ios7ui=[SHAPES_PATH+"/ios7/mxIOS7Ui.js",STENCIL_PATH+"/ios7/misc.xml"];mxStencilRegistry.libraries.android=[SHAPES_PATH+"/mxAndroid.js",STENCIL_PATH+"/android/android.xml"];mxStencilRegistry.libraries["electrical/miscellaneous"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/miscellaneous.xml"];mxStencilRegistry.libraries["electrical/transmission"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/transmission.xml"];mxStencilRegistry.libraries["electrical/logic_gates"]= +[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/logic_gates.xml"];mxStencilRegistry.libraries["electrical/abstract"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/abstract.xml"];mxStencilRegistry.libraries.infographic=[SHAPES_PATH+"/mxInfographic.js"];mxStencilRegistry.libraries["mockup/buttons"]=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries["mockup/containers"]=[SHAPES_PATH+"/mockup/mxMockupContainers.js"];mxStencilRegistry.libraries["mockup/forms"]= +[SHAPES_PATH+"/mockup/mxMockupForms.js"];mxStencilRegistry.libraries["mockup/graphics"]=[SHAPES_PATH+"/mockup/mxMockupGraphics.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/markup"]=[SHAPES_PATH+"/mockup/mxMockupMarkup.js"];mxStencilRegistry.libraries["mockup/misc"]=[SHAPES_PATH+"/mockup/mxMockupMisc.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/navigation"]=[SHAPES_PATH+"/mockup/mxMockupNavigation.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/text"]= +[SHAPES_PATH+"/mockup/mxMockupText.js"];mxStencilRegistry.libraries.floorplan=[SHAPES_PATH+"/mxFloorplan.js",STENCIL_PATH+"/floorplan.xml"];mxStencilRegistry.libraries.bootstrap=[SHAPES_PATH+"/mxBootstrap.js",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.xml"];mxStencilRegistry.libraries.gcp2=[SHAPES_PATH+"/mxGCP2.js",STENCIL_PATH+"/gcp2.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"]; +mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.aws4= +[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.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.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 C=mxMarker.createMarker;mxMarker.createMarker=function(a,b,c,f,d,l,p,e,g,k){if(null!=c&&null==mxMarker.markers[c]){var t=this.getPackageForType(c);null!=t&&mxStencilRegistry.getStencil(t)}return C.apply(this,arguments)};PrintDialog.prototype.create= +function(a,b){function c(){u.value=Math.max(1,Math.min(e,Math.max(parseInt(u.value),parseInt(B.value))));B.value=Math.max(1,Math.min(e,Math.min(parseInt(u.value),parseInt(B.value))))}function f(b){function c(b,c,d){var l=b.getGraphBounds(),p=0,e=0,g=ja.get(),k=1/b.pageScale,t=z.checked;if(t)var k=parseInt(S.value),x=parseInt(U.value),k=Math.min(g.height*x/(l.height/b.view.scale),g.width*k/(l.width/b.view.scale));else k=parseInt(n.value)/(100*b.pageScale),isNaN(k)&&(f=1/b.pageScale,n.value="100 %"); +g=mxRectangle.fromRectangle(g);g.width=Math.ceil(g.width*f);g.height=Math.ceil(g.height*f);k*=f;!t&&b.pageVisible?(l=b.getPageLayout(),p-=l.x*g.width,e-=l.y*g.height):t=!0;if(null==c){c=PrintDialog.createPrintPreview(b,k,g,0,p,e,t);c.pageSelector=!1;c.mathEnabled=!1;b=a.getCurrentFile();null!=b&&(c.title=b.getTitle());var B=c.writeHead;c.writeHead=function(b){B.apply(this,arguments);null!=a.editor.fontCss&&(b.writeln('<style type="text/css">'),b.writeln(a.editor.fontCss),b.writeln("</style>"))};if("undefined"!== +typeof MathJax){var u=c.renderPage;c.renderPage=function(a,b,c,f,d,l){var p=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;var e=u.apply(this,arguments);mxClient.NO_FO=p;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:e.className="geDisableMathJax";return e}}c.open(null,null,d,!0)}else{g=b.background;if(null==g||""==g||g==mxConstants.NONE)g="#ffffff";c.backgroundColor=g;c.autoOrigin=t;c.appendGraph(b,k,p,e,d,!0)}return c} +var f=parseInt(ka.value)/100;isNaN(f)&&(f=1,ka.value="100 %");var f=.75*f,l=B.value,p=u.value,e=!t.checked,k=null;e&&(e=l==g&&p==g);if(!e&&null!=a.pages&&a.pages.length){var x=0,e=a.pages.length-1;t.checked||(x=parseInt(l)-1,e=parseInt(p)-1);for(var m=x;m<=e;m++){var v=a.pages[m],l=v==a.currentPage?d:null;if(null==l){var l=a.createTemporaryGraph(d.getStylesheet()),p=!0,x=!1,A=null,y=null;null==v.viewState&&null==v.root&&a.updatePageRoot(v);null!=v.viewState&&(p=v.viewState.pageVisible,x=v.viewState.mathEnabled, +A=v.viewState.background,y=v.viewState.backgroundImage);l.background=A;l.backgroundImage=null!=y?new mxImage(y.src,y.width,y.height):null;l.pageVisible=p;l.mathEnabled=x;var D=l.getGlobalVariable;l.getGlobalVariable=function(a){return"page"==a?v.getName():"pagenumber"==a?m+1:D.apply(this,arguments)};document.body.appendChild(l.container);a.updatePageRoot(v);l.model.setRoot(v.root)}k=c(l,k,m!=e);l!=d&&l.container.parentNode.removeChild(l.container)}}else k=c(d);null==k?a.handleError({message:mxResources.get("errorUpdatingPreview")}): (k.mathEnabled&&(e=k.wnd.document,e.writeln('<script type="text/x-mathjax-config">'),e.writeln("MathJax.Hub.Config({"),e.writeln("showMathMenu: false,"),e.writeln('messageStyle: "none",'),e.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],'),e.writeln('extensions: ["tex2jax.js", "mml2jax.js", "asciimath2jax.js"],'),e.writeln('"HTML-CSS": {'),e.writeln("imageFont: null"),e.writeln("},"),e.writeln("TeX: {"),e.writeln('extensions: ["AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js"]'), e.writeln("},"),e.writeln("tex2jax: {"),e.writeln('\tignoreClass: "geDisableMathJax"'),e.writeln("},"),e.writeln("asciimath2jax: {"),e.writeln('\tignoreClass: "geDisableMathJax"'),e.writeln("}"),e.writeln("});"),b&&(e.writeln("MathJax.Hub.Queue(function () {"),e.writeln("window.print();"),e.writeln("});")),e.writeln("\x3c/script>"),e.writeln('<script type="text/javascript" src="'+DRAW_MATH_URL+'/MathJax.js">\x3c/script>')),k.closeDocument(),!k.mathEnabled&&b&&PrintDialog.printPreview(k))}var d=a.editor.graph, -l=document.createElement("div"),p=document.createElement("h3");p.style.width="100%";p.style.textAlign="center";p.style.marginTop="0px";mxUtils.write(p,b||mxResources.get("print"));l.appendChild(p);var e=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);p=document.createElement("span");mxUtils.write(p,mxResources.get("printAllPages"));k.appendChild(p);mxUtils.br(k);var v=q.cloneNode(!0);q.setAttribute("checked","checked");v.setAttribute("value","range");k.appendChild(v);p=document.createElement("span");mxUtils.write(p,mxResources.get("pages")+":");k.appendChild(p);var u=document.createElement("input");u.style.cssText="margin:0 8px 0 8px;";u.setAttribute("value","1");u.setAttribute("type","number");u.setAttribute("min", -"1");u.style.width="50px";k.appendChild(u);p=document.createElement("span");mxUtils.write(p,mxResources.get("to"));k.appendChild(p);var m=u.cloneNode(!0);k.appendChild(m);mxEvent.addListener(u,"focus",function(){v.checked=!0});mxEvent.addListener(m,"focus",function(){v.checked=!0});mxEvent.addListener(u,"change",c);mxEvent.addListener(m,"change",c);if(null!=a.pages&&(e=a.pages.length,null!=a.currentPage))for(p=0;p<a.pages.length;p++)if(a.currentPage==a.pages[p]){g=p+1;u.value=g;m.value=g;break}u.setAttribute("max", -e);m.setAttribute("max",e);1<e&&l.appendChild(k);var B=document.createElement("div");B.style.marginBottom="10px";var n=document.createElement("input");n.style.marginRight="8px";n.setAttribute("value","adjust");n.setAttribute("type","radio");n.setAttribute("name","printZoom");B.appendChild(n);p=document.createElement("span");mxUtils.write(p,mxResources.get("adjustTo"));B.appendChild(p);var y=document.createElement("input");y.style.cssText="margin:0 8px 0 8px;";y.setAttribute("value","100 %");y.style.width= -"50px";B.appendChild(y);mxEvent.addListener(y,"focus",function(){n.checked=!0});l.appendChild(B);var k=k.cloneNode(!1),x=n.cloneNode(!0);x.setAttribute("value","fit");n.setAttribute("checked","checked");p=document.createElement("div");p.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";p.appendChild(x);k.appendChild(p);B=document.createElement("table");B.style.display="inline-block";var z=document.createElement("tbody"),A=document.createElement("tr"),C=A.cloneNode(!0), -D=document.createElement("td"),t=D.cloneNode(!0),J=D.cloneNode(!0),P=D.cloneNode(!0),M=D.cloneNode(!0),ca=D.cloneNode(!0);D.style.textAlign="right";P.style.textAlign="right";mxUtils.write(D,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);p=document.createElement("span");mxUtils.write(p,mxResources.get("fitToSheetsAcross")); -J.appendChild(p);mxUtils.write(P,mxResources.get("fitToBy"));var U=S.cloneNode(!0);M.appendChild(U);mxEvent.addListener(S,"focus",function(){x.checked=!0});mxEvent.addListener(U,"focus",function(){x.checked=!0});p=document.createElement("span");mxUtils.write(p,mxResources.get("fitToSheetsDown"));ca.appendChild(p);A.appendChild(D);A.appendChild(t);A.appendChild(J);C.appendChild(P);C.appendChild(M);C.appendChild(ca);z.appendChild(A);z.appendChild(C);B.appendChild(z);k.appendChild(B);l.appendChild(k); +l=document.createElement("div"),p=document.createElement("h3");p.style.width="100%";p.style.textAlign="center";p.style.marginTop="0px";mxUtils.write(p,b||mxResources.get("print"));l.appendChild(p);var e=1,g=1,k=document.createElement("div");k.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");k.appendChild(t);p=document.createElement("span");mxUtils.write(p,mxResources.get("printAllPages"));k.appendChild(p);mxUtils.br(k);var x=t.cloneNode(!0);t.setAttribute("checked","checked");x.setAttribute("value","range");k.appendChild(x);p=document.createElement("span");mxUtils.write(p,mxResources.get("pages")+":");k.appendChild(p);var B=document.createElement("input");B.style.cssText="margin:0 8px 0 8px;";B.setAttribute("value","1");B.setAttribute("type","number");B.setAttribute("min", +"1");B.style.width="50px";k.appendChild(B);p=document.createElement("span");mxUtils.write(p,mxResources.get("to"));k.appendChild(p);var u=B.cloneNode(!0);k.appendChild(u);mxEvent.addListener(B,"focus",function(){x.checked=!0});mxEvent.addListener(u,"focus",function(){x.checked=!0});mxEvent.addListener(B,"change",c);mxEvent.addListener(u,"change",c);if(null!=a.pages&&(e=a.pages.length,null!=a.currentPage))for(p=0;p<a.pages.length;p++)if(a.currentPage==a.pages[p]){g=p+1;B.value=g;u.value=g;break}B.setAttribute("max", +e);u.setAttribute("max",e);1<e&&l.appendChild(k);var m=document.createElement("div");m.style.marginBottom="10px";var v=document.createElement("input");v.style.marginRight="8px";v.setAttribute("value","adjust");v.setAttribute("type","radio");v.setAttribute("name","printZoom");m.appendChild(v);p=document.createElement("span");mxUtils.write(p,mxResources.get("adjustTo"));m.appendChild(p);var n=document.createElement("input");n.style.cssText="margin:0 8px 0 8px;";n.setAttribute("value","100 %");n.style.width= +"50px";m.appendChild(n);mxEvent.addListener(n,"focus",function(){v.checked=!0});l.appendChild(m);var k=k.cloneNode(!1),z=v.cloneNode(!0);z.setAttribute("value","fit");v.setAttribute("checked","checked");p=document.createElement("div");p.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";p.appendChild(z);k.appendChild(p);m=document.createElement("table");m.style.display="inline-block";var y=document.createElement("tbody"),A=document.createElement("tr"),D=A.cloneNode(!0), +C=document.createElement("td"),q=C.cloneNode(!0),I=C.cloneNode(!0),P=C.cloneNode(!0),N=C.cloneNode(!0),ca=C.cloneNode(!0);C.style.textAlign="right";P.style.textAlign="right";mxUtils.write(C,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";q.appendChild(S);p=document.createElement("span");mxUtils.write(p,mxResources.get("fitToSheetsAcross")); +I.appendChild(p);mxUtils.write(P,mxResources.get("fitToBy"));var U=S.cloneNode(!0);N.appendChild(U);mxEvent.addListener(S,"focus",function(){z.checked=!0});mxEvent.addListener(U,"focus",function(){z.checked=!0});p=document.createElement("span");mxUtils.write(p,mxResources.get("fitToSheetsDown"));ca.appendChild(p);A.appendChild(C);A.appendChild(q);A.appendChild(I);D.appendChild(P);D.appendChild(N);D.appendChild(ca);y.appendChild(A);y.appendChild(D);m.appendChild(y);k.appendChild(m);l.appendChild(k); k=document.createElement("div");p=document.createElement("div");p.style.fontWeight="bold";p.style.marginBottom="12px";mxUtils.write(p,mxResources.get("paperSize"));k.appendChild(p);p=document.createElement("div");p.style.marginBottom="12px";var ja=PageSetupDialog.addPageFormatPanel(p,"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);k.appendChild(p);p=document.createElement("span");mxUtils.write(p,mxResources.get("pageScale"));k.appendChild(p);var ka=document.createElement("input"); -ka.style.cssText="margin:0 8px 0 8px;";ka.setAttribute("value","100 %");ka.style.width="60px";k.appendChild(ka);l.appendChild(k);p=document.createElement("div");p.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&&p.appendChild(k);a.isOffline()||(B=mxUtils.button(mxResources.get("help"),function(){d.openLink("https://desk.draw.io/support/solutions/articles/16000048947")}),B.className= -"geBtn",p.appendChild(B));PrintDialog.previewEnabled&&(B=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();f(!1)}),B.className="geBtn",p.appendChild(B));B=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();f(!0)});B.className="geBtn gePrimaryBtn";p.appendChild(B);a.editor.cancelFirst||p.appendChild(k);l.appendChild(p);this.container=l};var v=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&& -(this.page=this.ui.currentPage);this.page!=this.ui.currentPage?null!=this.page.viewState&&(this.ignoreColor||(this.page.viewState.background=this.color),this.ignoreImage||(this.page.viewState.backgroundImage=this.image),null!=this.format&&(this.page.viewState.pageFormat=this.format),null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled),null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)):(v.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!= -this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible))};Editor.prototype.useCanvasForExport=!1;try{var B=document.createElement("canvas"),D=new Image;D.onload=function(){try{B.getContext("2d").drawImage(D,0,0);var a=B.toDataURL("image/png");Editor.prototype.useCanvasForExport= -null!=a&&6<a.length}catch(J){}};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(x){}})(); -(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,b,d){d.ui=a.ui;return b};a.afterDecode=function(a,b,d){d.previousColor=d.color;d.previousImage=d.image;d.previousFormat=d.format;null!=d.foldingEnabled&&(d.foldingEnabled=!d.foldingEnabled);null!=d.mathEnabled&&(d.mathEnabled=!d.mathEnabled);null!=d.shadowVisible&&(d.shadowVisible=!d.shadowVisible);return d};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="11.1.4";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.enableLogging="1"!=urlParams.stealth&&/.*\.draw\.io$/.test(window.location.hostname)&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost="https://www.draw.io";EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl="1"==urlParams.dev?"/cache":"https://rt.draw.io/cache";EditorUi.enablePlantUml= +ka.style.cssText="margin:0 8px 0 8px;";ka.setAttribute("value","100 %");ka.style.width="60px";k.appendChild(ka);l.appendChild(k);p=document.createElement("div");p.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&&p.appendChild(k);a.isOffline()||(m=mxUtils.button(mxResources.get("help"),function(){d.openLink("https://desk.draw.io/support/solutions/articles/16000048947")}),m.className= +"geBtn",p.appendChild(m));PrintDialog.previewEnabled&&(m=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();f(!1)}),m.className="geBtn",p.appendChild(m));m=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();f(!0)});m.className="geBtn gePrimaryBtn";p.appendChild(m);a.editor.cancelFirst||p.appendChild(k);l.appendChild(p);this.container=l};var B=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)):(B.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 x=document.createElement("canvas"),D=new Image;D.onload=function(){try{x.getContext("2d").drawImage(D,0,0);var a=x.toDataURL("image/png");Editor.prototype.useCanvasForExport= +null!=a&&6<a.length}catch(I){}};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(A){}})(); +(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,b,d){d.ui=a.ui;return b};a.afterDecode=function(a,b,d){d.previousColor=d.color;d.previousImage=d.image;d.previousFormat=d.format;null!=d.foldingEnabled&&(d.foldingEnabled=!d.foldingEnabled);null!=d.mathEnabled&&(d.mathEnabled=!d.mathEnabled);null!=d.shadowVisible&&(d.shadowVisible=!d.shadowVisible);return d};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="11.1.5";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.enableLogging="1"!=urlParams.stealth&&/.*\.draw\.io$/.test(window.location.hostname)&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost="https://www.draw.io";EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl="1"==urlParams.dev?"/cache":"https://rt.draw.io/cache";EditorUi.enablePlantUml= EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.scratchpadHelpLink="https://desk.draw.io/support/solutions/articles/16000042367";EditorUi.logError=function(a,b,c,d,e){if("1"==urlParams.dev)EditorUi.debug("logError",a,b,c,d,e);else if(EditorUi.enableLogging)try{if(a!=EditorUi.lastErrorMessage&&(null==a||null==b||-1==a.indexOf("Script error")&&-1==a.indexOf("extension"))&&null!=a&&0>a.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage= a;var f=0<=a.indexOf("NetworkError")||0<=a.indexOf("SecurityError")||0<=a.indexOf("NS_ERROR_FAILURE")||0<=a.indexOf("out of memory")?"CONFIG":"SEVERE",l=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";e=null!=e?e:Error(a);(new Image).src=l+"/log?severity="+f+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(a)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(c)+(null!=d?":colno:"+encodeURIComponent(d):"")+(null!=e&&null!=e.stack?"&stack="+ -encodeURIComponent(e.stack):"")}}catch(z){}};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: +encodeURIComponent(e.stack):"")}}catch(y){}};EditorUi.logEvent=function(a){if("1"==urlParams.dev)EditorUi.debug("logEvent",a);else if(EditorUi.enableLogging)try{var b=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=b+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=a?"&data="+encodeURIComponent(JSON.stringify(a)):"")}catch(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.dev){for(var a=[(new Date).toISOString()],b=0;b<arguments.length;b++)a.push(arguments[b]);console.log.apply(console,a)}}catch(p){}};EditorUi.parsePng=function(a,b,c){function f(a,b){var c=l;l+=b;return a.substring(c, l)}function d(a){a=f(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}var l=0;if(f(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=c&&c();else if(f(a,4),"IHDR"!=f(a,4))null!=c&&c();else{f(a,17);do{c=d(a);var p=f(a,4);if(null!=b&&b(l-8,p,c))break;value=f(a,c);f(a,4);if("IEND"==p)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(y){}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(q){}};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(y){}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(y){}})();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= +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(v){}try{var b=document.createElement("canvas"),c=new Image;c.onload=function(){try{b.getContext("2d").drawImage(c, +0,0);var a=b.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=a&&6<a.length}catch(t){}};c.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(v){}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(v){}})();EditorUi.prototype.openLink=function(a,b,c){return this.editor.graph.openLink(a,b,c)};EditorUi.prototype.showSplash=function(a){};EditorUi.prototype.getLocalData=function(a,b){b(localStorage.getItem(a))};EditorUi.prototype.setLocalData=function(a,b,c){localStorage.setItem(a,b);null!=c&&c()};EditorUi.prototype.removeLocalData=function(a,b){localStorage.removeItem(a);b()};EditorUi.prototype.setMathEnabled= function(a){this.editor.graph.mathEnabled=a;this.editor.updateGraphComponents();this.editor.graph.refresh();this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(a){return this.editor.graph.mathEnabled};EditorUi.prototype.isAppCache=function(){return"1"==urlParams.appcache||this.isOfflineApp()};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(a){return this.isOfflineApp()||!navigator.onLine|| -!a&&"1"==urlParams.stealth};EditorUi.prototype.createSpinner=function(a,b,c){c=null!=c?c:24;var f=new Spinner({lines:12,length:c,width:Math.round(c/3),radius:Math.round(c/2),rotate:0,color:"dark"==uiTheme?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),d=f.spin;f.spin=function(c,l){var e=!1;this.active||(d.call(this,c),this.active=!0,null!=l&&(e=document.createElement("div"),e.style.position="absolute",e.style.whiteSpace="nowrap",e.style.background="#4B4243",e.style.color="white", -e.style.fontFamily="Helvetica, Arial",e.style.fontSize="9pt",e.style.padding="6px",e.style.paddingLeft="10px",e.style.paddingRight="10px",e.style.zIndex=2E9,e.style.left=Math.max(0,a)+"px",e.style.top=Math.max(0,b+70)+"px",mxUtils.setPrefixedStyle(e.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(e.style,"transform","translate(-50%,-50%)"),"dark"!=uiTheme&&mxUtils.setPrefixedStyle(e.style,"boxShadow","2px 2px 3px 0px #ddd"),"..."!=l.substring(l.length-3,l.length)&&"!"!=l.charAt(l.length-1)&& -(l+="..."),e.innerHTML=l,c.appendChild(e),f.status=e,mxClient.IS_VML&&(null==document.documentMode||8>=document.documentMode)&&(e.style.left=Math.round(Math.max(0,a-e.offsetWidth/2))+"px",e.style.top=Math.round(Math.max(0,b+70-e.offsetHeight/2))+"px")),this.pause=mxUtils.bind(this,function(){var a=function(){};this.active&&(a=mxUtils.bind(this,function(){this.spin(c,l)}));this.stop();return a}),e=!0);return e};var l=f.stop;f.stop=function(){l.call(this);this.active=!1;null!=f.status&&(f.status.parentNode.removeChild(f.status), +!a&&"1"==urlParams.stealth};EditorUi.prototype.createSpinner=function(a,b,c){c=null!=c?c:24;var f=new Spinner({lines:12,length:c,width:Math.round(c/3),radius:Math.round(c/2),rotate:0,color:"dark"==uiTheme?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),d=f.spin;f.spin=function(c,l){var p=!1;this.active||(d.call(this,c),this.active=!0,null!=l&&(p=document.createElement("div"),p.style.position="absolute",p.style.whiteSpace="nowrap",p.style.background="#4B4243",p.style.color="white", +p.style.fontFamily="Helvetica, Arial",p.style.fontSize="9pt",p.style.padding="6px",p.style.paddingLeft="10px",p.style.paddingRight="10px",p.style.zIndex=2E9,p.style.left=Math.max(0,a)+"px",p.style.top=Math.max(0,b+70)+"px",mxUtils.setPrefixedStyle(p.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(p.style,"transform","translate(-50%,-50%)"),"dark"!=uiTheme&&mxUtils.setPrefixedStyle(p.style,"boxShadow","2px 2px 3px 0px #ddd"),"..."!=l.substring(l.length-3,l.length)&&"!"!=l.charAt(l.length-1)&& +(l+="..."),p.innerHTML=l,c.appendChild(p),f.status=p,mxClient.IS_VML&&(null==document.documentMode||8>=document.documentMode)&&(p.style.left=Math.round(Math.max(0,a-p.offsetWidth/2))+"px",p.style.top=Math.round(Math.max(0,b+70-p.offsetHeight/2))+"px")),this.pause=mxUtils.bind(this,function(){var a=function(){};this.active&&(a=mxUtils.bind(this,function(){this.spin(c,l)}));this.stop();return a}),p=!0);return p};var l=f.stop;f.stop=function(){l.call(this);this.active=!1;null!=f.status&&(f.status.parentNode.removeChild(f.status), f.status=null)};f.pause=function(){return function(){}};return f};EditorUi.prototype.isCompatibleString=function(a){try{var b=mxUtils.parseXml(a),c=this.editor.extractGraphModel(b.documentElement,!0);return null!=c&&0==c.getElementsByTagName("parsererror").length}catch(u){}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 c=a.apply(this,arguments);if(null==c)try{var f=b.indexOf("<mxfile ");if(0<=f){var d=b.lastIndexOf("</mxfile>");d>f&&(c=b.substring(f,d+15).replace(/>/g,">").replace(/</g,"<").replace(/\\"/g,'"').replace(/\n/g,""))}else var e=mxUtils.parseXml(b),g=this.editor.extractGraphModel(e.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility),c=null!=g?mxUtils.getXml(g):""}catch(A){}return c};EditorUi.prototype.validateFileData=function(a){if(null!= +function(b){var c=a.apply(this,arguments);if(null==c)try{var f=b.indexOf("<mxfile ");if(0<=f){var d=b.lastIndexOf("</mxfile>");d>f&&(c=b.substring(f,d+15).replace(/>/g,">").replace(/</g,"<").replace(/\\"/g,'"').replace(/\n/g,""))}else var e=mxUtils.parseXml(b),g=this.editor.extractGraphModel(e.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility),c=null!=g?mxUtils.getXml(g):""}catch(z){}return c};EditorUi.prototype.validateFileData=function(a){if(null!= a&&0<a.length){var b=a.indexOf('<meta charset="utf-8">');0<=b&&(a=a.slice(0,b)+'<meta charset="utf-8"/>'+a.slice(b+23-1,a.length));a=Graph.zapGremlins(a)}return a};EditorUi.prototype.replaceFileData=function(a){a=this.validateFileData(a);a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var b=null!=a?this.editor.extractGraphModel(a,!0):null;null!=b&&(a=b);if(null!=a){b=this.editor.graph;b.model.beginUpdate();try{var c=null!=this.pages?this.pages.slice():null,f=a.getElementsByTagName("diagram"); if("0"!=urlParams.pages||1<f.length||1==f.length&&f[0].hasAttribute("name")){this.fileNode=a;this.pages=null!=this.pages?this.pages:[];for(var d=f.length-1;0<=d;d--){var e=this.updatePageRoot(new DiagramPage(f[d]));null==e.getName()&&e.setName(mxResources.get("pageWithNumber",[d+1]));b.model.execute(new ChangePage(this,e,0==d?e:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=a.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")), -this.currentPage.setName(mxResources.get("pageWithNumber",[1])),b.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(a),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=c)for(d=0;d<c.length;d++)b.model.execute(new ChangePage(this,c[d],null))}finally{b.model.endUpdate()}}};EditorUi.prototype.createFileData=function(a,b,c,d,e,g,k,m,n,v,B){b=null!=b?b:this.editor.graph;e=null!=e?e:!1;n=null!=n?n:!0;var f,l=null;null== -c||c.getMode()==App.MODE_DEVICE||c.getMode()==App.MODE_BROWSER?f="_blank":l=f=d;if(null==a)return"";var p=a;if("mxfile"!=p.nodeName.toLowerCase()){if(B){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)}v? +this.currentPage.setName(mxResources.get("pageWithNumber",[1])),b.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(a),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=c)for(d=0;d<c.length;d++)b.model.execute(new ChangePage(this,c[d],null))}finally{b.model.endUpdate()}}};EditorUi.prototype.createFileData=function(a,b,c,d,e,g,k,m,n,B,x){b=null!=b?b:this.editor.graph;e=null!=e?e:!1;n=null!=n?n:!0;var f,l=null;null== +c||c.getMode()==App.MODE_DEVICE||c.getMode()==App.MODE_BROWSER?f="_blank":l=f=d;if(null==a)return"";var p=a;if("mxfile"!=p.nodeName.toLowerCase()){if(x){var t=a.ownerDocument.createElement("diagram");t.setAttribute("id",Editor.guid());t.appendChild(a)}else{t=Graph.zapGremlins(mxUtils.getXml(a));p=Graph.compress(t);if(Graph.decompress(p)!=t)return t;t=a.ownerDocument.createElement("diagram");t.setAttribute("id",Editor.guid());mxUtils.setTextContent(t,p)}p=a.ownerDocument.createElement("mxfile");p.appendChild(t)}B? (p=p.cloneNode(!0),p.removeAttribute("userAgent"),p.removeAttribute("version"),p.removeAttribute("editor"),p.removeAttribute("type")):(p.removeAttribute("userAgent"),p.removeAttribute("version"),p.removeAttribute("editor"),p.removeAttribute("type"),p.setAttribute("modified",(new Date).toISOString()),p.setAttribute("host",window.location.hostname),p.setAttribute("agent",navigator.userAgent),p.setAttribute("version",EditorUi.VERSION),p.setAttribute("etag",Editor.guid()),a=null!=c?c.getMode():this.mode, -null!=a&&p.setAttribute("type",a),B&&p.setAttribute("compressed","false"));B=B?mxUtils.getPrettyXml(p):mxUtils.getXml(p);if(!g&&!e&&(k||null!=c&&/(\.html)$/i.test(c.getTitle())))B=this.getHtml2(mxUtils.getXml(p),b,null!=c?c.getTitle():null,f,l);else if(g||!e&&null!=c&&/(\.svg)$/i.test(c.getTitle()))null==c||c.getMode()!=App.MODE_DEVICE&&c.getMode()!=App.MODE_BROWSER||(d=null),B=this.getEmbeddedSvg(B,b,d,null,m,n,l);return B};EditorUi.prototype.getXmlFileData=function(a,b,c){a=null!=a?a:!0;b=null!= -b?b:!1;var f=this.editor.getGraphXml(a);if(a&&null!=this.fileNode&&null!=this.currentPage)if(c?(EditorUi.removeChildNodes(this.currentPage.node),this.currentPage.node.appendChild(f)):(f=Graph.compressNode(f),mxUtils.setTextContent(this.currentPage.node,f)),f=this.fileNode.cloneNode(!1),b)f.appendChild(this.currentPage.node);else for(b=0;b<this.pages.length;b++)this.currentPage!=this.pages[b]&&(this.pages[b].needsUpdate?(a=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(this.pages[b].root)), +null!=a&&p.setAttribute("type",a),null!=this.pages&&p.setAttribute("pages",this.pages.length),x&&p.setAttribute("compressed","false"));x=x?mxUtils.getPrettyXml(p):mxUtils.getXml(p);if(!g&&!e&&(k||null!=c&&/(\.html)$/i.test(c.getTitle())))x=this.getHtml2(mxUtils.getXml(p),b,null!=c?c.getTitle():null,f,l);else if(g||!e&&null!=c&&/(\.svg)$/i.test(c.getTitle()))null==c||c.getMode()!=App.MODE_DEVICE&&c.getMode()!=App.MODE_BROWSER||(d=null),x=this.getEmbeddedSvg(x,b,d,null,m,n,l);return x};EditorUi.prototype.getXmlFileData= +function(a,b,c){a=null!=a?a:!0;b=null!=b?b:!1;var f=this.editor.getGraphXml(a);if(a&&null!=this.fileNode&&null!=this.currentPage)if(c?(EditorUi.removeChildNodes(this.currentPage.node),this.currentPage.node.appendChild(f)):(f=Graph.compressNode(f),mxUtils.setTextContent(this.currentPage.node,f)),f=this.fileNode.cloneNode(!1),b)f.appendChild(this.currentPage.node);else for(b=0;b<this.pages.length;b++)this.currentPage!=this.pages[b]&&(this.pages[b].needsUpdate?(a=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(this.pages[b].root)), this.editor.graph.saveViewState(this.pages[b].viewState,a),c?(EditorUi.removeChildNodes(this.pages[b].node),this.pages[b].node.appendChild(a)):mxUtils.setTextContent(this.pages[b].node,Graph.compressNode(a)),delete this.pages[b].needsUpdate):c&&(a=Editor.parseDiagramNode(this.pages[b].node),EditorUi.removeChildNodes(this.pages[b].node),this.pages[b].node.appendChild(a))),f.appendChild(this.pages[b].node);return f};EditorUi.prototype.anonymizeString=function(a,b){for(var c=[],f=0;f<a.length;f++){var d= a.charAt(f);0<=EditorUi.ignoredAnonymizedChars.indexOf(d)?c.push(d):isNaN(parseInt(d))?d.toLowerCase()!=d?c.push(String.fromCharCode(65+Math.round(25*Math.random()))):d.toUpperCase()!=d?c.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(d)?c.push(" "):c.push("?"):c.push(b?"0":Math.round(9*Math.random()))}return c.join("")};EditorUi.prototype.anonymizePatch=function(a){if(null!=a[EditorUi.DIFF_INSERT])for(var b=0;b<a[EditorUi.DIFF_INSERT].length;b++)try{var c=mxUtils.parseXml(a[EditorUi.DIFF_INSERT][b].data).documentElement.cloneNode(!1); -null!=c.getAttribute("name")&&c.setAttribute("name",this.anonymizeString(c.getAttribute("name")));a[EditorUi.DIFF_INSERT][b].data=mxUtils.getXml(c)}catch(q){a[EditorUi.DIFF_INSERT][b].data=q.message}if(null!=a[EditorUi.DIFF_UPDATE]){for(var f in a[EditorUi.DIFF_UPDATE]){var d=a[EditorUi.DIFF_UPDATE][f];null!=d.name&&(d.name=this.anonymizeString(d.name));null!=d.cells&&(b=mxUtils.bind(this,function(a){var b=d.cells[a];if(null!=b){for(var c in b)null!=b[c].value&&(b[c].value="["+b[c].value.length+"]"), +null!=c.getAttribute("name")&&c.setAttribute("name",this.anonymizeString(c.getAttribute("name")));a[EditorUi.DIFF_INSERT][b].data=mxUtils.getXml(c)}catch(t){a[EditorUi.DIFF_INSERT][b].data=t.message}if(null!=a[EditorUi.DIFF_UPDATE]){for(var f in a[EditorUi.DIFF_UPDATE]){var d=a[EditorUi.DIFF_UPDATE][f];null!=d.name&&(d.name=this.anonymizeString(d.name));null!=d.cells&&(b=mxUtils.bind(this,function(a){var b=d.cells[a];if(null!=b){for(var c in b)null!=b[c].value&&(b[c].value="["+b[c].value.length+"]"), null!=b[c].xmlValue&&(b[c].xmlValue="["+b[c].xmlValue.length+"]"),null!=b[c].style&&(b[c].style="["+b[c].style.length+"]"),0==Object.keys(b[c]).length&&delete b[c];0==Object.keys(b).length&&delete d.cells[a]}}),b(EditorUi.DIFF_INSERT),b(EditorUi.DIFF_UPDATE),0==Object.keys(d.cells).length&&delete d.cells);0==Object.keys(d).length&&delete a[EditorUi.DIFF_UPDATE][f]}0==Object.keys(a[EditorUi.DIFF_UPDATE]).length&&delete a[EditorUi.DIFF_UPDATE]}return a};EditorUi.prototype.anonymizeAttributes=function(a, b){if(null!=a.attributes)for(var c=0;c<a.attributes.length;c++)"as"!=a.attributes[c].name&&a.setAttribute(a.attributes[c].name,this.anonymizeString(a.attributes[c].value,b));if(null!=a.childNodes)for(c=0;c<a.childNodes.length;c++)this.anonymizeAttributes(a.childNodes[c],b)};EditorUi.prototype.anonymizeNode=function(a,b){for(var c=a.getElementsByTagName("mxCell"),f=0;f<c.length;f++)null!=c[f].getAttribute("value")&&c[f].setAttribute("value","["+c[f].getAttribute("value").length+"]"),null!=c[f].getAttribute("xmlValue")&& c[f].setAttribute("xmlValue","["+c[f].getAttribute("xmlValue").length+"]"),null!=c[f].getAttribute("style")&&c[f].setAttribute("style","["+c[f].getAttribute("style").length+"]"),null!=c[f].parentNode&&"root"!=c[f].parentNode.nodeName&&null!=c[f].parentNode.parentNode&&(c[f].setAttribute("id",c[f].parentNode.getAttribute("id")),c[f].parentNode.parentNode.replaceChild(c[f],c[f].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,e,g,k,m,n,v){e=null!=e?e:!0;k=null!=k?k:this.getXmlFileData(e,null!=g?g:!1,v);n=null!=n?n:this.getCurrentFile();g=this.editor.graph;if(null!=this.pages&&this.currentPage!=this.pages[0]&&(b||!a&&null!=n&&/(\.svg)$/i.test(n.getTitle()))){g=this.createTemporaryGraph(g.getStylesheet());var f=g.getGlobalVariable,l=this.pages[0];g.getGlobalVariable=function(a){return"page"==a?l.getName():"pagenumber"==a?1:f.apply(this,arguments)};document.body.appendChild(g.container); -g.model.setRoot(l.root)}a=this.createFileData(k,g,n,window.location.href,a,b,c,d,e,m,v);g!=this.editor.graph&&g.container.parentNode.removeChild(g.container);return a};EditorUi.prototype.getHtml=function(a,b,c,d,e,g){g=null!=g?g:!0;var f=null,l=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=b){var f=g?b.getGraphBounds():b.getBoundingBox(b.getSelectionCells()),p=b.view.scale;g=Math.floor(f.x/p-b.view.translate.x);p=Math.floor(f.y/p-b.view.translate.y);f=b.background;null==e&&(b=this.getBasenames().join(";"), +!0)}))))};EditorUi.prototype.getFileData=function(a,b,c,d,e,g,k,m,n,B){e=null!=e?e:!0;k=null!=k?k:this.getXmlFileData(e,null!=g?g:!1,B);n=null!=n?n:this.getCurrentFile();g=this.editor.graph;if(null!=this.pages&&this.currentPage!=this.pages[0]&&(b||!a&&null!=n&&/(\.svg)$/i.test(n.getTitle()))){g=this.createTemporaryGraph(g.getStylesheet());var f=g.getGlobalVariable,l=this.pages[0];g.getGlobalVariable=function(a){return"page"==a?l.getName():"pagenumber"==a?1:f.apply(this,arguments)};document.body.appendChild(g.container); +g.model.setRoot(l.root)}a=this.createFileData(k,g,n,window.location.href,a,b,c,d,e,m,B);g!=this.editor.graph&&g.container.parentNode.removeChild(g.container);return a};EditorUi.prototype.getHtml=function(a,b,c,d,e,g){g=null!=g?g:!0;var f=null,l=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=b){var f=g?b.getGraphBounds():b.getBoundingBox(b.getSelectionCells()),p=b.view.scale;g=Math.floor(f.x/p-b.view.translate.x);p=Math.floor(f.y/p-b.view.translate.y);f=b.background;null==e&&(b=this.getBasenames().join(";"), 0<b.length&&(l=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!=e&&(e=e.replace(/&/g,"&"));a=null!=a?Graph.zapGremlins(mxUtils.getXml(a)):"";d=Graph.compress(a);Graph.decompress(d)!=a&&(d=encodeURIComponent(a));return(null==e?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n': "")+"<!DOCTYPE html>\n<html"+(null!=e?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==e?null!=c?"<title>"+mxUtils.htmlEntities(c)+"</title>\n":"":"<title>Draw.io Diagram</title>\n")+(null!=e?'<meta http-equiv="refresh" content="0;URL=\''+e+"'\"/>\n":"")+"</head>\n<body"+(null==e&&null!=f&&f!=mxConstants.NONE?' style="background-color:'+f+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+d+ "</div>\n</div>\n"+(null==e?'<script type="text/javascript" src="'+l+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+e+'" 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,e){b=EditorUi.drawHost+"/js/viewer.min.js";null!=e&&(e=e.replace(/&/g,"&"));a={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:Graph.zapGremlins(a), @@ -8511,29 +8525,29 @@ toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&& this.validateFileData(a);this.pages=this.fileNode=this.currentPage=null;a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var b=null!=a?a.getElementsByTagName("parsererror"):null;if(null!=b&&0<b.length)throw a=mxResources.get("invalidOrMissingFile"),b=b[0].getElementsByTagName("div"),0<b.length&&(a=mxUtils.getTextContent(b[0])),Error(a);b=null!=a?this.editor.extractGraphModel(a,!0):null;null!=b&&(a=b);if(null!=a&&"mxfile"==a.nodeName&&(b=a.getElementsByTagName("diagram"),"0"!=urlParams.pages|| 1<b.length||1==b.length&&b[0].hasAttribute("name"))){var c=null;this.fileNode=a;this.pages=[];for(a=0;a<b.length;a++){null==b[a].getAttribute("id")&&b[a].setAttribute("id",a);var f=new DiagramPage(b[a]);null==f.getName()&&f.setName(mxResources.get("pageWithNumber",[a+1]));this.pages.push(f);null!=urlParams["page-id"]&&f.getId()==urlParams["page-id"]&&(c=f)}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)};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,e,g,k,m,n,v){try{d=null!=d?d:this.editor.graph.isSelectionEmpty();var f=this.getBaseFilename(!e),l=f+"."+a;if("xml"==a){var p='<?xml version="1.0" encoding="UTF-8"?>\n'+ +/(\.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,e,g,k,m,n,B){try{d=null!=d?d:this.editor.graph.isSelectionEmpty();var f=this.getBaseFilename(!e),l=f+"."+a;if("xml"==a){var p='<?xml version="1.0" encoding="UTF-8"?>\n'+ this.getFileData(!0,null,null,null,d,e,null,null,null,b);this.saveData(l,a,p,"text/xml")}else if("html"==a)p=this.getHtml2(this.getFileData(!0),this.editor.graph,f),this.saveData(l,a,p,"text/html");else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==a?l=f+".png":"jpeg"==a&&(l=f+".jpg"),this.saveRequest(l,a,mxUtils.bind(this,function(b,c){try{var f=this.editor.graph.pageVisible;null!=g&&(this.editor.graph.pageVisible=g);var l=this.createDownloadRequest(b, -a,d,c,k,e,m,n,v);this.editor.graph.pageVisible=f;return l}catch(R){this.handleError(R)}}));else{var q=null,u=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(l,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(q)}))});if("svg"==a){var y=this.editor.graph.background;if(k||y==mxConstants.NONE)y=null;var z=this.editor.graph.getSvg(y,null,null,null,null,d);c&&this.editor.graph.addSvgShadow(z); -this.convertImages(z,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();u('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a))})))}else l=f+".svg",q=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();u(a)}),d)}}catch(G){this.handleError(G)}};EditorUi.prototype.createDownloadRequest=function(a,b,c,d,e,g,k,m,n){var f=this.editor.graph.getGraphBounds(); -c=this.getFileData(!0,null,null,null,c,0==g?!1:"xmlpng"!=b);var l="",p="";if(f.width*f.height>MAX_AREA||c.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};f="0";"pdf"==b&&0==g&&(p="&allPages=1");if("xmlpng"==b&&(f="1",b="png",null!=this.pages&&null!=this.currentPage))for(g=0;g<this.pages.length;g++)if(this.pages[g]==this.currentPage){l="&from="+g;break}g=this.editor.graph.background;"png"==b&&e?g=mxConstants.NONE:e||null!=g&&g!=mxConstants.NONE||(g="#ffffff");return new mxXmlRequest(EXPORT_URL, -"format="+b+l+p+"&bg="+(null!=g?g:mxConstants.NONE)+"&base64="+d+"&embedXml="+f+"&xml="+encodeURIComponent(c)+(null!=a?"&filename="+encodeURIComponent(a):"")+(n?"&extras="+encodeURIComponent(JSON.stringify({grid:{size:this.editor.graph.gridSize,steps:this.editor.graph.view.gridSteps,color:this.editor.graph.view.gridColor}})):"")+(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 f=window.location.hash, +a,d,c,k,e,m,n,B);this.editor.graph.pageVisible=f;return l}catch(R){this.handleError(R)}}));else{var t=null,u=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(l,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(t)}))});if("svg"==a){var v=this.editor.graph.background;if(k||v==mxConstants.NONE)v=null;var z=this.editor.graph.getSvg(v,null,null,null,null,d);c&&this.editor.graph.addSvgShadow(z); +this.convertImages(z,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();u('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a))})))}else l=f+".svg",t=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();u(a)}),d)}}catch(J){this.handleError(J)}};EditorUi.prototype.createDownloadRequest=function(a,b,c,d,e,g,k,m,n){var f=this.editor.graph,l=f.getGraphBounds(); +c=this.getFileData(!0,null,null,null,c,0==g?!1:"xmlpng"!=b);var p="",t="";if(l.width*l.height>MAX_AREA||c.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};l="0";"pdf"==b&&0==g&&(t="&allPages=1");if("xmlpng"==b&&(l="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=f.background;"png"==b&&e?g=mxConstants.NONE:e||null!=g&&g!=mxConstants.NONE||(g="#ffffff");e={};e.globalVars=f.getExportVariables(); +n&&(e.grid={size:f.gridSize,steps:f.view.gridSteps,color:f.view.gridColor});return new mxXmlRequest(EXPORT_URL,"format="+b+p+t+"&bg="+(null!=g?g:mxConstants.NONE)+"&base64="+d+"&embedXml="+l+"&xml="+encodeURIComponent(c)+(null!=a?"&filename="+encodeURIComponent(a):"")+"&extras="+encodeURIComponent(JSON.stringify(e))+(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 f=window.location.hash, d=mxUtils.bind(this,function(c){var d=null!=a.data?a.data:"";null!=c&&0<c.length&&(0<d.length&&(d+="\n"),d+=c);c=new LocalFile(this,"csv"!=a.format&&0<d.length?d:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);c.getHash=function(){return f};this.fileLoaded(c);"csv"==a.format&&this.importCsv(d,mxUtils.bind(this,function(a){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=a.update){var l=null!=a.interval? -parseInt(a.interval):6E4,e=null,g=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()),p()):this.handleError({message:mxResources.get("error")+" "+a.getStatus()}))}),mxUtils.bind(this,function(a){this.handleError(a)}))}),p=mxUtils.bind(this,function(){window.clearTimeout(e);e=window.setTimeout(g, -l)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){p();g()}));p();g()}null!=b&&b()});if(null!=a.url&&0<a.url.length){var l=a.url;/^https?:\/\//.test(l)&&!this.editor.isCorsEnabledForUrl(l)&&(l=PROXY_URL+"?url="+encodeURIComponent(l));this.loadUrl(l,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||f.warningImage,a.tooltip,a.align,a.valign, -a.offset);b.addListener(mxEvent.CLICK,function(b,c){d.alert(a.tooltip)});return b}var c=null,d=this;if(null!=a&&0<a.length&&(c=mxUtils.parseXml(a),a=null!=c?c.documentElement:null,null!=a&&"updates"==a.nodeName)){var f=this.editor.graph,e=f.getModel();e.beginUpdate();var g=null;try{for(a=a.firstChild;null!=a;){if("update"==a.nodeName){var k=e.getCell(a.getAttribute("id"));if(null!=k){try{var m=a.getAttribute("value");if(null!=m){var v=mxUtils.parseXml(m).documentElement;if(null!=v)if("1"==v.getAttribute("replace-value"))e.setValue(k, -v);else for(var B=v.attributes,n=0;n<B.length;n++)f.setAttributeForCell(k,B[n].nodeName,0<B[n].nodeValue.length?B[n].nodeValue:null)}}catch(K){null!=window.console&&console.log("Error in value for "+k.id+": "+K)}try{var x=a.getAttribute("style");null!=x&&f.model.setStyle(k,x)}catch(K){null!=window.console&&console.log("Error in style for "+k.id+": "+K)}try{var t=a.getAttribute("icon");if(null!=t){var H=0<t.length?JSON.parse(t):null;null!=H&&H.append||f.removeCellOverlays(k);null!=H&&f.addCellOverlay(k, -b(H))}}catch(K){null!=window.console&&console.log("Error in icon for "+k.id+": "+K)}try{var F=a.getAttribute("geometry");if(null!=F){var F=JSON.parse(F),I=f.getCellGeometry(k);if(null!=I){I=I.clone();for(key in F){var G=parseFloat(F[key]);"dx"==key?I.x+=G:"dy"==key?I.y+=G:"dw"==key?I.width+=G:"dh"==key?I.height+=G:I[key]=parseFloat(F[key])}f.model.setGeometry(k,I)}}}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,e)}else if("view"==a.nodeName){if(a.hasAttribute("scale")&&(f.view.scale=parseFloat(a.getAttribute("scale"))),a.hasAttribute("dx")||a.hasAttribute("dy"))f.view.translate=new mxPoint(parseFloat(a.getAttribute("dx")||0),parseFloat(a.getAttribute("dy")||0))}else"fit"==a.nodeName&&(g=a.hasAttribute("max-scale")?parseFloat(a.getAttribute("max-scale")):1);a=a.nextSibling}}finally{e.endUpdate()}null!= -g&&this.chromelessResize&&this.chromelessResize(!0,g)}return c};EditorUi.prototype.getCopyFilename=function(a,b){var c=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename,d="",f=c.lastIndexOf(".");0<=f&&(d=c.substring(f),c=c.substring(0,f));if(b)var l=new Date,f=l.getFullYear(),e=l.getMonth()+1,g=l.getDate(),k=l.getHours(),v=l.getMinutes(),l=l.getSeconds(),c=c+(" "+(f+"-"+e+"-"+g+"-"+k+"-"+v+"-"+l));return c=mxResources.get("copyOf",[c])+d};EditorUi.prototype.fileLoaded=function(a,b){var c= +parseInt(a.interval):6E4,e=null,p=mxUtils.bind(this,function(){var b=this.currentPage;mxUtils.post(a.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(a){b===this.currentPage&&(200<=a.getStatus()&&300>=a.getStatus()?(this.updateDiagram(a.getText()),g()):this.handleError({message:mxResources.get("error")+" "+a.getStatus()}))}),mxUtils.bind(this,function(a){this.handleError(a)}))}),g=mxUtils.bind(this,function(){window.clearTimeout(e);e=window.setTimeout(p, +l)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){g();p()}));g();p()}null!=b&&b()});if(null!=a.url&&0<a.url.length){var l=a.url;/^https?:\/\//.test(l)&&!this.editor.isCorsEnabledForUrl(l)&&(l=PROXY_URL+"?url="+encodeURIComponent(l));this.loadUrl(l,mxUtils.bind(this,function(a){d(a)}),mxUtils.bind(this,function(a){null!=c&&c(a)}))}else d("")};EditorUi.prototype.updateDiagram=function(a){function b(a){var b=new mxCellOverlay(a.image||d.warningImage,a.tooltip,a.align,a.valign, +a.offset);b.addListener(mxEvent.CLICK,function(b,c){f.alert(a.tooltip)});return b}var c=null,f=this;if(null!=a&&0<a.length&&(c=mxUtils.parseXml(a),a=null!=c?c.documentElement:null,null!=a&&"updates"==a.nodeName)){var d=this.editor.graph,e=d.getModel();e.beginUpdate();var g=null;try{for(a=a.firstChild;null!=a;){if("update"==a.nodeName){var k=e.getCell(a.getAttribute("id"));if(null!=k){try{var m=a.getAttribute("value");if(null!=m){var B=mxUtils.parseXml(m).documentElement;if(null!=B)if("1"==B.getAttribute("replace-value"))e.setValue(k, +B);else for(var x=B.attributes,n=0;n<x.length;n++)d.setAttributeForCell(k,x[n].nodeName,0<x[n].nodeValue.length?x[n].nodeValue:null)}}catch(L){null!=window.console&&console.log("Error in value for "+k.id+": "+L)}try{var A=a.getAttribute("style");null!=A&&d.model.setStyle(k,A)}catch(L){null!=window.console&&console.log("Error in style for "+k.id+": "+L)}try{var q=a.getAttribute("icon");if(null!=q){var H=0<q.length?JSON.parse(q):null;null!=H&&H.append||d.removeCellOverlays(k);null!=H&&d.addCellOverlay(k, +b(H))}}catch(L){null!=window.console&&console.log("Error in icon for "+k.id+": "+L)}try{var F=a.getAttribute("geometry");if(null!=F){var F=JSON.parse(F),G=d.getCellGeometry(k);if(null!=G){G=G.clone();for(key in F){var J=parseFloat(F[key]);"dx"==key?G.x+=J:"dy"==key?G.y+=J:"dw"==key?G.width+=J:"dh"==key?G.height+=J:G[key]=parseFloat(F[key])}d.model.setGeometry(k,G)}}}catch(L){null!=window.console&&console.log("Error in icon for "+k.id+": "+L)}}}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,e)}else if("view"==a.nodeName){if(a.hasAttribute("scale")&&(d.view.scale=parseFloat(a.getAttribute("scale"))),a.hasAttribute("dx")||a.hasAttribute("dy"))d.view.translate=new mxPoint(parseFloat(a.getAttribute("dx")||0),parseFloat(a.getAttribute("dy")||0))}else"fit"==a.nodeName&&(g=a.hasAttribute("max-scale")?parseFloat(a.getAttribute("max-scale")):1);a=a.nextSibling}}finally{e.endUpdate()}null!= +g&&this.chromelessResize&&this.chromelessResize(!0,g)}return c};EditorUi.prototype.getCopyFilename=function(a,b){var c=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename,d="",f=c.lastIndexOf(".");0<=f&&(d=c.substring(f),c=c.substring(0,f));if(b)var l=new Date,f=l.getFullYear(),e=l.getMonth()+1,g=l.getDate(),k=l.getHours(),B=l.getMinutes(),l=l.getSeconds(),c=c+(" "+(f+"-"+e+"-"+g+"-"+k+"-"+B+"-"+l));return c=mxResources.get("copyOf",[c])+d};EditorUi.prototype.fileLoaded=function(a,b){var c= this.getCurrentFile();this.fileLoadedError=null;this.setCurrentFile(null);var d=!1;this.hideDialog();null!=c&&(c.removeListener(this.descriptorChangedListener),c.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var f=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"));d=!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")});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;null!=window.console&&(console.error(A),console.log("error in fileLoaded:",a,A));if(EditorUi.enableLogging&&!this.isOffline())try{(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?v="+encodeURIComponent(EditorUi.VERSION)+ -"&msg=errorInFileLoaded:url:"+encodeURIComponent(window.location.href)+(null!=A&&null!=A.message?":err:"+encodeURIComponent(A.message):"")+(null!=A&&null!=A.stack?"&stack="+encodeURIComponent(A.stack):"")}catch(z){}var l=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):f()});b?l():this.handleError(A,mxResources.get("errorLoadingFile"),l,!0)}else f();return d}; +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;null!=window.console&&(console.error(z),console.log("error in fileLoaded:",a,z));if(EditorUi.enableLogging&&!this.isOffline())try{(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?v="+encodeURIComponent(EditorUi.VERSION)+ +"&msg=errorInFileLoaded:url:"+encodeURIComponent(window.location.href)+(null!=z&&null!=z.message?":err:"+encodeURIComponent(z.message):"")+(null!=z&&null!=z.stack?"&stack="+encodeURIComponent(z.stack):"")}catch(y){}var l=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):f()});b?l():this.handleError(z,mxResources.get("errorLoadingFile"),l,!0)}else f();return d}; EditorUi.prototype.getHashValueForPages=function(a,b){var c=0,d=new mxGraphModel,f=new mxCodec;null!=b&&(b.byteCount=0,b.attrCount=0,b.eltCount=0,b.nodeCount=0);for(var l=0;l<a.length;l++){this.updatePageRoot(a[l]);var e=a[l].node.cloneNode(!1);e.removeAttribute("name");d.root=a[l].root;var g=f.encode(d);this.editor.graph.saveViewState(a[l].viewState,g,!0);g.removeAttribute("pageWidth");g.removeAttribute("pageHeight");e.appendChild(g);null!=b&&(b.eltCount+=e.getElementsByTagName("*").length,b.nodeCount+= e.getElementsByTagName("mxCell").length);c=(c<<5)-c+this.hashValue(e,function(a,b,c,d){return!d||"mxGeometry"!=a.nodeName&&"mxPoint"!=a.nodeName||"x"!=b&&"y"!=b&&"width"!=b&&"height"!=b?d&&"mxCell"==a.nodeName&&"previous"==b?null:c:Math.round(c)},b)<<0}return c};EditorUi.prototype.hashValue=function(a,b,c){var d=0;if(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,l=null!=b?b(a,e,a.attributes[f].value,!0):a.attributes[f].value;null!=l&&(d^=this.hashValue(e,b,c)+this.hashValue(l,b,c))}}if(null!=a.childNodes)for(f=0;f<a.childNodes.length;f++)d=(d<<5)-d+this.hashValue(a.childNodes[f],b,c)<<0}else if(null!=a&&"function"!==typeof a){a=String(a);b=0;null!=c&&(c.byteCount+=a.length);for(f=0;f<a.length;f++)b=(b<<5)-b+a.charCodeAt(f)<<0;d^=b}return d}; +a.attributes){null!=c&&(c.attrCount+=a.attributes.length);for(var f=0;f<a.attributes.length;f++){var l=a.attributes[f].name,e=null!=b?b(a,l,a.attributes[f].value,!0):a.attributes[f].value;null!=e&&(d^=this.hashValue(l,b,c)+this.hashValue(e,b,c))}}if(null!=a.childNodes)for(f=0;f<a.childNodes.length;f++)d=(d<<5)-d+this.hashValue(a.childNodes[f],b,c)<<0}else if(null!=a&&"function"!==typeof a){a=String(a);b=0;null!=c&&(c.byteCount+=a.length);for(f=0;f<a.length;f++)b=(b<<5)-b+a.charCodeAt(f)<<0;d^=b}return d}; EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(a,b,c,d,e,g,k){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?this.getLocalData(".scratchpad",mxUtils.bind(this,function(a){null==a&&(a=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,a,".scratchpad"))})): this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(a){var b=mxUtils.createXmlDocument(),c=b.createElement("mxlibrary");mxUtils.setTextContent(c,JSON.stringify(a));b.appendChild(c);return mxUtils.getXml(b)};EditorUi.prototype.closeLibrary=function(a){null!=a&&(this.removeLibrarySidebar(a.getHash()),a.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(a.getHash()),".scratchpad"==a.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar= function(a){var b=this.sidebar.palettes[a];if(null!=b){for(var c=0;c<b.length;c++)b[c].parentNode.removeChild(b[c]);delete this.sidebar.palettes[a]}};EditorUi.prototype.repositionLibrary=function(a){var b=this.sidebar.container;if(null==a){var c=this.sidebar.palettes["L.scratchpad"];null==c&&(c=this.sidebar.palettes.search);null!=c&&(a=c[c.length-1].nextSibling)}a=null!=a?a:b.firstChild.nextSibling.nextSibling;var c=b.lastChild,d=c.previousSibling;b.insertBefore(c,a);b.insertBefore(d,c)};EditorUi.prototype.loadLibrary= @@ -8541,20 +8555,20 @@ function(a){var b=mxUtils.parseXml(a.getData());if("mxlibrary"==b.documentElemen (this.scratchpad=a);var d=this.sidebar.palettes[a.getHash()],d=null!=d?d[d.length-1].nextSibling:null;this.removeLibrarySidebar(a.getHash());var f=null,e=mxUtils.bind(this,function(b,c){0==b.length&&a.isEditable()?(null==f&&(f=document.createElement("div"),f.className="geDropTarget",mxUtils.write(f,mxResources.get("dragElementsHere"))),c.appendChild(f)):this.addLibraryEntries(b,c)});if(null!=this.sidebar&&null!=b)for(var l=0;l<b.length;l++)mxUtils.bind(this,function(a){var b=a.data;null!=b&&null!= a.title?this.sidebar.addEntry(a.title,mxUtils.bind(this,function(){b=this.convertDataUri(b);var c="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==a.aspect&&(c+="aspect=fixed;");return this.sidebar.createVertexTemplate(c+"image="+b,a.w,a.h,"",a.title||"",!1,!1,!0)})):null!=a.xml&&null!=a.title&&this.sidebar.addEntry(a.title,mxUtils.bind(this,function(){var b=this.stringToCells(Graph.decompress(a.xml));return this.sidebar.createVertexTemplateFromCells(b,a.w,a.h, a.title||"",!0,!1,!0)}))})(b[l]);c=null!=c&&0<c.length?c:a.getTitle();var g=this.sidebar.addPalette(a.getHash(),c,!0,mxUtils.bind(this,function(a){e(b,a)}));this.repositionLibrary(d);var p=g.parentNode.previousSibling;c=p.getAttribute("title");null!=c&&0<c.length&&".scratchpad"!=a.title&&p.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+c);var k=document.createElement("div");k.style.position="absolute";k.style.right="0px";k.style.top="0px";k.style.padding="8px";mxClient.IS_QUIRKS||8==document.documentMode|| -(k.style.backgroundColor="inherit");p.style.position="relative";var m=document.createElement("img");m.setAttribute("src",Dialog.prototype.closeImage);m.setAttribute("title",mxResources.get("close"));m.setAttribute("valign","absmiddle");m.setAttribute("border","0");m.style.margin="0 3px";var n=null;if(".scratchpad"!=a.title||this.closableScratchpad)k.appendChild(m),mxEvent.addListener(m,"click",mxUtils.bind(this,function(b){if(!mxEvent.isConsumed(b)){var c=mxUtils.bind(this,function(){this.closeLibrary(a)}); -null!=n?this.confirm(mxResources.get("allChangesLost"),null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c();mxEvent.consume(b)}}));if(a.isEditable()){var x=this.editor.graph,t=null,H=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),g,b,a,a.getMode());mxEvent.consume(c)}),F=mxUtils.bind(this,function(c){a.setModified(!0);a.isAutosave()?(null!=t&&null!=t.parentNode&&t.parentNode.removeChild(t),t=m.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==n&&(n=m.cloneNode(!1),n.setAttribute("src",IMAGE_PATH+"/download.png"),n.setAttribute("title",mxResources.get("save")),k.insertBefore(n,k.firstChild), -mxEvent.addListener(n,"click",mxUtils.bind(this,function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==n||a.isModified()||(p.style.paddingRight=18*k.childNodes.length+"px",n.parentNode.removeChild(n),n=null)});mxEvent.consume(c)})),p.style.paddingRight=18*k.childNodes.length+"px")}),I=mxUtils.bind(this,function(a,c,d,e){a=x.cloneCells(mxUtils.sortCells(x.model.getTopmostCells(a)));for(var l=0;l<a.length;l++){var p=x.getCellGeometry(a[l]);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);F(d);null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)}),G=mxUtils.bind(this,function(a){if(x.isSelectionEmpty())x.getRubberband().isActive()?(x.getRubberband().execute(a),x.getRubberband().reset()):this.showError(mxResources.get("error"), -mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var b=x.getSelectionCells(),c=x.view.getBounds(b),d=x.view.scale;c.x/=d;c.y/=d;c.width/=d;c.height/=d;c.x-=x.view.translate.x;c.y-=x.view.translate.y;I(b,c)}mxEvent.consume(a)});mxEvent.addGestureListeners(g,function(){},mxUtils.bind(this,function(a){x.isMouseDown&&null!=x.panningManager&&null!=x.graphHandler.shape&&(x.graphHandler.shape.node.style.visibility="hidden",g.style.backgroundColor="#f1f3f4",g.style.cursor="copy",x.panningManager.stop(), -x.autoScroll=!1,null!=x.graphHandler.guide&&x.graphHandler.guide.setVisible(!1),null!=x.graphHandler.hint&&(x.graphHandler.hint.style.visibility="hidden"),mxEvent.consume(a))}),mxUtils.bind(this,function(a){x.isMouseDown&&null!=x.panningManager&&null!=x.graphHandler&&(g.style.backgroundColor="",g.style.cursor="default",this.sidebar.showTooltips=!0,x.panningManager.stop(),x.graphHandler.reset(),x.isMouseDown=!1,x.autoScroll=!0,G(a),mxEvent.consume(a))}));mxEvent.addListener(g,"mouseleave",mxUtils.bind(this, -function(a){x.isMouseDown&&null!=x.graphHandler.shape&&(x.graphHandler.shape.node.style.visibility="visible",g.style.backgroundColor="",g.style.cursor="",x.autoScroll=!0,null!=x.graphHandler.guide&&x.graphHandler.guide.setVisible(!0),null!=x.graphHandler.hint&&(x.graphHandler.hint.style.visibility="visible"))}));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,l,p,k,q,v,m,n){if(null!=c&&"image/"==d.substring(0,6))c="shape=image;verticalLabelPosition=bottom;verticalAlign=top;aspect=fixed;image="+this.convertDataUri(c),c=[new mxCell("",new mxGeometry(0,0,k,q),c)],c[0].vertex=!0,I(c,new mxRectangle(0, -0,k,q),a,mxEvent.isAltDown(a)?null:v.substring(0,v.lastIndexOf(".")).replace(/_/g," ")),null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null);else{var B=!1,u=mxUtils.bind(this,function(c,d){if(null!=c&&"text/xml"==d){var l=mxUtils.parseXml(c);if("mxlibrary"==l.documentElement.nodeName)try{var p=JSON.parse(mxUtils.getTextContent(l.documentElement));e(p,g);b=b.concat(p);F(a);this.spinner.stop();B=!0}catch(M){}else if("mxfile"==l.documentElement.nodeName)try{for(var k=l.documentElement.getElementsByTagName("diagram"), -l=0;l<k.length;l++){var q=this.stringToCells(Editor.getDiagramNodeXml(k[l])),v=this.editor.graph.getBoundingBoxFromGeometry(q);I(q,new mxRectangle(0,0,v.width,v.height),a)}B=!0}catch(M){null!=window.console&&console.log("error in drop handler:",M)}}B||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)});null!=n&&null!=v&&(/(\.v(dx|sdx?))($|\?)/i.test(v)||/(\.vs(x|sx?))($|\?)/i.test(v))? -this.importVisio(n,function(a){u(a,"text/xml")},null,v):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,v)&&null!=n?this.parseFile(n,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?u(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):u(c,d)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(g,"dragleave", -function(a){g.style.cursor="";g.style.backgroundColor="";a.stopPropagation();a.preventDefault()}));m=m.cloneNode(!1);m.setAttribute("src",Editor.editImage);m.setAttribute("title",mxResources.get("edit"));k.insertBefore(m,k.firstChild);mxEvent.addListener(m,"click",H);mxEvent.addListener(g,"dblclick",function(a){mxEvent.getSource(a)==g&&H(a)});c=m.cloneNode(!1);c.setAttribute("src",Editor.plusImage);c.setAttribute("title",mxResources.get("add"));k.insertBefore(c,k.firstChild);mxEvent.addListener(c, -"click",G);this.isOffline()||".scratchpad"!=a.title||null==EditorUi.scratchpadHelpLink||(c=document.createElement("span"),c.setAttribute("title",mxResources.get("help")),c.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;",mxUtils.write(c,"?"),mxEvent.addGestureListeners(c,mxUtils.bind(this,function(a){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(a)})),k.insertBefore(c,k.firstChild))}p.appendChild(k);p.style.paddingRight=18*k.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries= +(k.style.backgroundColor="inherit");p.style.position="relative";var x=document.createElement("img");x.setAttribute("src",Dialog.prototype.closeImage);x.setAttribute("title",mxResources.get("close"));x.setAttribute("valign","absmiddle");x.setAttribute("border","0");x.style.margin="0 3px";var m=null;if(".scratchpad"!=a.title||this.closableScratchpad)k.appendChild(x),mxEvent.addListener(x,"click",mxUtils.bind(this,function(b){if(!mxEvent.isConsumed(b)){var c=mxUtils.bind(this,function(){this.closeLibrary(a)}); +null!=m?this.confirm(mxResources.get("allChangesLost"),null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c();mxEvent.consume(b)}}));if(a.isEditable()){var n=this.editor.graph,q=null,H=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),g,b,a,a.getMode());mxEvent.consume(c)}),F=mxUtils.bind(this,function(c){a.setModified(!0);a.isAutosave()?(null!=q&&null!=q.parentNode&&q.parentNode.removeChild(q),q=x.cloneNode(!1),q.setAttribute("src",Editor.spinImage),q.setAttribute("title", +mxResources.get("saving")),q.style.cursor="default",q.style.marginRight="2px",q.style.marginTop="-2px",k.insertBefore(q,k.firstChild),p.style.paddingRight=18*k.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=q&&null!=q.parentNode&&(q.parentNode.removeChild(q),p.style.paddingRight=18*k.childNodes.length+"px")})):null==m&&(m=x.cloneNode(!1),m.setAttribute("src",IMAGE_PATH+"/download.png"),m.setAttribute("title",mxResources.get("save")),k.insertBefore(m,k.firstChild), +mxEvent.addListener(m,"click",mxUtils.bind(this,function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==m||a.isModified()||(p.style.paddingRight=18*k.childNodes.length+"px",m.parentNode.removeChild(m),m=null)});mxEvent.consume(c)})),p.style.paddingRight=18*k.childNodes.length+"px")}),G=mxUtils.bind(this,function(a,c,d,e){a=n.cloneCells(mxUtils.sortCells(n.model.getTopmostCells(a)));for(var l=0;l<a.length;l++){var p=n.getCellGeometry(a[l]);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);F(d);null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)}),J=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;G(b,c)}mxEvent.consume(a)});mxEvent.addGestureListeners(g,function(){},mxUtils.bind(this,function(a){n.isMouseDown&&null!=n.panningManager&&null!=n.graphHandler.shape&&(n.graphHandler.shape.node.style.visibility="hidden",g.style.backgroundColor="#f1f3f4",g.style.cursor="copy",n.panningManager.stop(), +n.autoScroll=!1,null!=n.graphHandler.guide&&n.graphHandler.guide.setVisible(!1),null!=n.graphHandler.hint&&(n.graphHandler.hint.style.visibility="hidden"),mxEvent.consume(a))}),mxUtils.bind(this,function(a){n.isMouseDown&&null!=n.panningManager&&null!=n.graphHandler&&(g.style.backgroundColor="",g.style.cursor="default",this.sidebar.showTooltips=!0,n.panningManager.stop(),n.graphHandler.reset(),n.isMouseDown=!1,n.autoScroll=!0,J(a),mxEvent.consume(a))}));mxEvent.addListener(g,"mouseleave",mxUtils.bind(this, +function(a){n.isMouseDown&&null!=n.graphHandler.shape&&(n.graphHandler.shape.node.style.visibility="visible",g.style.backgroundColor="",g.style.cursor="",n.autoScroll=!0,null!=n.graphHandler.guide&&n.graphHandler.guide.setVisible(!0),null!=n.graphHandler.hint&&(n.graphHandler.hint.style.visibility="visible"))}));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,l,p,k,t,x,B,m){if(null!=c&&"image/"==d.substring(0,6))c="shape=image;verticalLabelPosition=bottom;verticalAlign=top;aspect=fixed;image="+this.convertDataUri(c),c=[new mxCell("",new mxGeometry(0,0,k,t),c)],c[0].vertex=!0,G(c,new mxRectangle(0, +0,k,t),a,mxEvent.isAltDown(a)?null:x.substring(0,x.lastIndexOf(".")).replace(/_/g," ")),null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null);else{var n=!1,u=mxUtils.bind(this,function(c,d){if(null!=c&&"text/xml"==d){var l=mxUtils.parseXml(c);if("mxlibrary"==l.documentElement.nodeName)try{var p=JSON.parse(mxUtils.getTextContent(l.documentElement));e(p,g);b=b.concat(p);F(a);this.spinner.stop();n=!0}catch(N){}else if("mxfile"==l.documentElement.nodeName)try{for(var k=l.documentElement.getElementsByTagName("diagram"), +l=0;l<k.length;l++){var t=this.stringToCells(Editor.getDiagramNodeXml(k[l])),x=this.editor.graph.getBoundingBoxFromGeometry(t);G(t,new mxRectangle(0,0,x.width,x.height),a)}n=!0}catch(N){null!=window.console&&console.log("error in drop handler:",N)}}n||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)});null!=m&&null!=x&&(/(\.v(dx|sdx?))($|\?)/i.test(x)||/(\.vs(x|sx?))($|\?)/i.test(x))? +this.importVisio(m,function(a){u(a,"text/xml")},null,x):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,x)&&null!=m?this.parseFile(m,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?u(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):u(c,d)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(g,"dragleave", +function(a){g.style.cursor="";g.style.backgroundColor="";a.stopPropagation();a.preventDefault()}));x=x.cloneNode(!1);x.setAttribute("src",Editor.editImage);x.setAttribute("title",mxResources.get("edit"));k.insertBefore(x,k.firstChild);mxEvent.addListener(x,"click",H);mxEvent.addListener(g,"dblclick",function(a){mxEvent.getSource(a)==g&&H(a)});c=x.cloneNode(!1);c.setAttribute("src",Editor.plusImage);c.setAttribute("title",mxResources.get("add"));k.insertBefore(c,k.firstChild);mxEvent.addListener(c, +"click",J);this.isOffline()||".scratchpad"!=a.title||null==EditorUi.scratchpadHelpLink||(c=document.createElement("span"),c.setAttribute("title",mxResources.get("help")),c.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;",mxUtils.write(c,"?"),mxEvent.addGestureListeners(c,mxUtils.bind(this,function(a){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(a)})),k.insertBefore(c,k.firstChild))}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],f=d.data;if(null!=f){var f=this.convertDataUri(f),e="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==d.aspect&&(e+="aspect=fixed;");b.appendChild(this.sidebar.createVertexTemplate(e+"image="+f,d.w,d.h,"",d.title||"",!1,!1,!0))}else null!=d.xml&&(f=this.stringToCells(Graph.decompress(d.xml)),0<f.length&&b.appendChild(this.sidebar.createVertexTemplateFromCells(f,d.w,d.h,d.title||"",!0,!1,!0)))}};EditorUi.prototype.getResource= function(a){return null!=a?a[mxLanguage]||a.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.offline||EditorUi.isElectronApp||("1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64),EditorUi.prototype.createFooter=function(){return document.getElementById("geFooter")});EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground=mxClient.IS_QUIRKS? "none":"linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38):"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= @@ -8565,101 +8579,101 @@ Editor.checkmarkImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAM c.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="#188038";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,e){var f=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},l=null!=a&&null!=a.error?a.error:a;if(null!=l||null!= b){var g=mxUtils.htmlEntities(mxResources.get("unknownError")),p=mxResources.get("ok"),k=null;b=null!=b?b:mxResources.get("error");if(null!=l)if(null!=l.retry&&(p=mxResources.get("cancel"),k=function(){f();l.retry()}),404==l.code||404==l.status||403==l.code){var g=403==l.code?null!=l.message?mxUtils.htmlEntities(l.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=e?e:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+ -", "+this.drive.user.email+")":"")),m=window.location.hash;if(null!=m&&("#G"==m.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==m.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==l.code||404==l.status)){m="#U"==m.substring(0,2)?m.substring(45,m.lastIndexOf("%26ex")):m.substring(2);this.showError(b,g,mxResources.get("openInNewWindow"), -mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+m);this.handleError(a,b,c,d,e)}),k,mxResources.get("changeUser"),mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&(this.drive.clearUserId(),gapi.auth.signOut(),window.location.reload())}),mxResources.get("cancel"),mxUtils.bind(this,function(){window.location.hash=""}),480,150);return}}else null!=l.message?g=mxUtils.htmlEntities(l.message):null!=l.response&&null!=l.response.error? -g=mxUtils.htmlEntities(l.response.error):"undefined"!==typeof window.App&&(l.code==App.ERROR_TIMEOUT?g=mxUtils.htmlEntities(mxResources.get("timeout")):l.code==App.ERROR_BUSY&&(g=mxUtils.htmlEntities(mxResources.get("busy"))));var n=null,u=null;null!=l&&null!=l.helpLink&&(n=mxResources.get("help"),u=mxUtils.bind(this,function(){return this.editor.graph.openLink(l.helpLink)}));this.showError(b,g,p,c,k,null,null,n,u,null,null,null,d?c:null)}else null!=c&&c()};EditorUi.prototype.alert=function(a,b){var c= +", "+this.drive.user.email+")":"")),x=window.location.hash;if(null!=x&&("#G"==x.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==x.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==l.code||404==l.status)){x="#U"==x.substring(0,2)?x.substring(45,x.lastIndexOf("%26ex")):x.substring(2);this.showError(b,g,mxResources.get("openInNewWindow"), +mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+x);this.handleError(a,b,c,d,e)}),k,mxResources.get("changeUser"),mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&(this.drive.clearUserId(),gapi.auth.signOut(),window.location.reload())}),mxResources.get("cancel"),mxUtils.bind(this,function(){window.location.hash=""}),480,150);return}}else null!=l.message?g=mxUtils.htmlEntities(l.message):null!=l.response&&null!=l.response.error? +g=mxUtils.htmlEntities(l.response.error):"undefined"!==typeof window.App&&(l.code==App.ERROR_TIMEOUT?g=mxUtils.htmlEntities(mxResources.get("timeout")):l.code==App.ERROR_BUSY&&(g=mxUtils.htmlEntities(mxResources.get("busy"))));var m=null,n=null;null!=l&&null!=l.helpLink&&(m=mxResources.get("help"),n=mxUtils.bind(this,function(){return this.editor.graph.openLink(l.helpLink)}));this.showError(b,g,p,c,k,null,null,m,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,e,g){var f=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){};a=new ConfirmDialog(this,a,function(){f();null!=b&&b()},function(){f();null!=c&&c()},d,e);this.showDialog(a.container,340,90,!0,g);a.init()};EditorUi.prototype.setCurrentFile=function(a){null!=a&&(a.opened=new Date);this.currentFile=a};EditorUi.prototype.getCurrentFile= -function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||!this.editor.graph.mathEnabled&&this.useCanvasForExport};EditorUi.prototype.createSvgDataUri=function(a){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(a)))};EditorUi.prototype.createImageDataUri=function(a,b,c){var d=a.toDataURL("image/"+c);if(6>=d.length||d==a.cloneNode(!1).toDataURL("image/"+c))throw{message:"Invalid image"};null!=b&&(d=this.writeGraphModelToPng(d, -"tEXt","mxfile",encodeURIComponent(b)));return d};EditorUi.prototype.saveCanvas=function(a,b,c,d){var f="jpeg"==c?"jpg":c;d=this.getBaseFilename(d)+"."+f;a=this.createImageDataUri(a,b,c);this.saveData(d,f,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,e){if(window.Blob&&navigator.msSaveOrOpenBlob)a=d?this.base64ToBlob(a,c):new Blob([a],{type:c}),navigator.msSaveOrOpenBlob(a, -b);else if(mxClient.IS_IE)c=window.open("about:blank","_blank"),null==c?mxUtils.popup(a,!0):(c.document.write(a),c.document.close(),c.document.execCommand("SaveAs",!0,b),c.close());else{var f=document.createElement("a"),l=!mxClient.IS_SF&&0>navigator.userAgent.indexOf("PaleMoon/")&&"undefined"!==typeof f.download;if(mxClient.IS_GC)var g=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./),l=65==(g?parseInt(g[2],10):!1)?!1:l;if(l||this.isOffline()){f.href=URL.createObjectURL(d?this.base64ToBlob(a, -c):new Blob([a],{type:c}));l?f.download=b:f.setAttribute("target","_blank");document.body.appendChild(f);try{window.setTimeout(function(){URL.revokeObjectURL(f.href)},0),f.click(),f.parentNode.removeChild(f)}catch(C){}}else this.createEchoRequest(a,b,c,d,e).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,c,d,e,g){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=c?"&mime="+c:"")+(null!=e?"&format="+e:"")+(null!=g?"&base64="+g:"")+(null!=b?"&filename="+ -encodeURIComponent(b):"")+(d?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=b||"";for(var c=atob(a),d=c.length,f=Math.ceil(d/1024),e=Array(f),l=0;l<f;++l){for(var g=1024*l,k=Math.min(g+1024,d),v=Array(k-g),m=0;g<k;++m,++g)v[m]=c[g].charCodeAt(0);e[l]=new Uint8Array(v)}return new Blob(e,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,c,d,e,g,k){g=null!=g?g:!1;k=null!=k?k:"vsdx"!=e&&(!mxClient.IS_IOS||!navigator.standalone);e=this.getServiceCount(g);isLocalStorage&&e++;var f= -4>=e?2:6<e?4:3;b=new CreateDialog(this,b,mxUtils.bind(this,function(b,f){try{if("_blank"==f)if(null==c||"image/"!=c.substring(0,6)||"image/svg"==c.substring(0,9)&&!mxClient.IS_SVG){var e=window.open("about:blank");null==e?mxUtils.popup(a,!0):(e.document.write("<pre>"+mxUtils.htmlEntities(a,!1)+"<pre>"),e.document.close())}else this.openInNewWindow(a,c,d);else f==App.MODE_DEVICE||"download"==f?this.doSaveLocalFile(a,b,c,d):null!=b&&0<b.length&&this.pickFolder(f,mxUtils.bind(this,function(e){try{this.exportFile(a, -b,c,d,f,e)}catch(x){this.handleError(x)}}))}catch(D){this.handleError(D)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,g,k,null,1<e,f,a,c,d);g=this.isServices(e)?e>f?390:270:160;this.showDialog(b.container,400,g,!0,!0);b.init()};EditorUi.prototype.openInNewWindow=function(a,b,c){if(mxClient.IS_GC||mxClient.IS_EDGE||11==document.documentMode||10==document.documentMode){var d=window.open("about:blank");null==d||null==d.document?mxUtils.popup(a, -!0):("image/svg+xml"==b?d.document.write("<html>"+a+"</html>"):d.document.write('<html><img src="data:'+b+(c?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))+'"/></html>'),d.document.close())}else d=window.open("data:"+b+(c?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))),null!=d&&null!=d.document||mxUtils.popup(a,!0)};var b=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.addChromelessToolbarItems=function(a){if(this.isExportToCanvas()){this.exportDialog=null;var c=a(mxUtils.bind(this, -function(a){var b=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",b);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)b.apply(this);else{this.exportDialog=document.createElement("div");var d=c.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center"; -this.exportDialog.style.fontFamily="Helvetica,Arial";this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width="50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left=d.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";d=mxUtils.getCurrentStyle(this.editor.graph.container); -this.exportDialog.style.zIndex=d.zIndex;var f=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"#fff",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});f.spin(this.exportDialog);this.exportToCanvas(mxUtils.bind(this,function(a){f.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var c=this.createImageDataUri(a,null,"png");a=document.createElement("img");a.style.maxWidth="140px";a.style.maxHeight="140px"; -a.style.cursor="pointer";a.style.backgroundColor="white";a.setAttribute("title",mxResources.get("openInNewWindow"));a.setAttribute("border","0");a.setAttribute("src",c);this.exportDialog.appendChild(a);mxEvent.addListener(a,"click",mxUtils.bind(this,function(){this.openInNewWindow(c.substring(c.indexOf(",")+1),"image/png",!0);b.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}));mxEvent.addListener(this.editor.graph.container, -"click",b);document.body.appendChild(this.exportDialog)}mxEvent.consume(a)}),Editor.cameraLargeImage,mxResources.get("export"))}b.apply(this,arguments)};EditorUi.prototype.saveData=function(a,b,c,d,e){this.isLocalFileSave()?this.saveLocalFile(c,a,d,e,b):this.saveRequest(a,b,mxUtils.bind(this,function(a,f){return this.createEchoRequest(c,a,d,e,b,f)}),c,e,d)};EditorUi.prototype.saveRequest=function(a,b,c,d,e,g,k){k=null!=k?k:!mxClient.IS_IOS||!navigator.standalone;var f=this.getServiceCount(!1);isLocalStorage&& -f++;var l=4>=f?2:6<f?4:3;a=new CreateDialog(this,a,mxUtils.bind(this,function(a,f){if("_blank"==f||null!=a&&0<a.length){var e=c("_blank"==f?null:a,f==App.MODE_DEVICE||"download"==f||null==f||"_blank"==f?"0":"1");null!=e&&(f==App.MODE_DEVICE||"download"==f||"_blank"==f?e.simulate(document,"_blank"):this.pickFolder(f,mxUtils.bind(this,function(c){g=null!=g?g:"pdf"==b?"application/pdf":"image/"+b;if(null!=d)try{this.exportFile(d,a,g,!0,f,c)}catch(J){this.handleError(J)}else this.spinner.spin(document.body, -mxResources.get("saving"))&&e.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=e.getStatus()&&299>=e.getStatus())try{this.exportFile(e.getText(),a,g,!0,f,c)}catch(J){this.handleError(J)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(a){this.spinner.stop();this.handleError(a)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,k,null,1<f,l,d,g,e);f=this.isServices(f)?4<f?390:270:160;this.showDialog(a.container, -380,f,!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,e,g){};EditorUi.prototype.pickFolder=function(a,b,c){b(null)};EditorUi.prototype.exportSvg=function(a,b,c,d,e,g,k,m,n,v){if(this.spinner.spin(document.body,mxResources.get("export"))){var f=this.editor.graph.isSelectionEmpty();c=null!=c?c:f;f=b?null:this.editor.graph.background;f==mxConstants.NONE&&(f= -null);null==f&&0==b&&(f="#ffffff");var l=this.editor.graph.getSvg(f,a,k,m,null,c,null,null,"blank"==v?"_blank":"self"==v?"_top":null);d&&this.editor.graph.addSvgShadow(l);var p=this.getBaseFilename()+".svg",q=mxUtils.bind(this,function(a){this.spinner.stop();e&&a.setAttribute("content",this.getFileData(!0,null,null,null,c,n));if(null!=this.editor.fontCss){var b=a.ownerDocument,b=null!=b.createElementNS?b.createElementNS(mxConstants.NS_SVG,"style"):b.createElement("style");b.setAttribute("type","text/css"); -mxUtils.setTextContent(b,this.editor.fontCss);a.getElementsByTagName("defs")[0].appendChild(b)}var d='<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a);this.isLocalFileSave()||d.length<=MAX_REQUEST_SIZE?this.saveData(p,"svg",d,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(d)}))});this.convertMath(this.editor.graph,l,!1,mxUtils.bind(this, -function(){g?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.convertImages(l,q,this.thumbImageCache)):q(l)}))}};EditorUi.prototype.addRadiobox=function(a,b,c,d,e,g,k){return this.addCheckbox(a,c,d,e,g,k,!0,b)};EditorUi.prototype.addCheckbox=function(a,b,c,d,e,g,k,m){g=null!=g?g:!0;var f=document.createElement("input");f.style.marginRight="8px";f.style.marginTop="16px";f.setAttribute("type",k?"radio":"checkbox");k="geCheckbox-"+Editor.guid();f.id=k;null!=m&&f.setAttribute("name",m);c&& -(f.setAttribute("checked","checked"),f.defaultChecked=!0);d&&f.setAttribute("disabled","disabled");g&&(a.appendChild(f),c=document.createElement("label"),mxUtils.write(c,b),c.setAttribute("for",k),a.appendChild(c),e||mxUtils.br(a));return f};EditorUi.prototype.addEditButton=function(a,b){var c=this.addCheckbox(a,mxResources.get("edit")+":",!0,null,!0);c.style.marginLeft="24px";var d=this.getCurrentFile(),f="";null!=d&&d.getMode()!=App.MODE_DEVICE&&d.getMode()!=App.MODE_BROWSER&&(f=window.location.href); -var e=document.createElement("select");e.style.width="120px";e.style.marginLeft="8px";e.style.marginRight="10px";e.className="geBtn";d=document.createElement("option");d.setAttribute("value","blank");mxUtils.write(d,mxResources.get("makeCopy"));e.appendChild(d);d=document.createElement("option");d.setAttribute("value","custom");mxUtils.write(d,mxResources.get("custom")+"...");e.appendChild(d);a.appendChild(e);mxEvent.addListener(e,"change",mxUtils.bind(this,function(){if("custom"==e.value){var a= -new FilenameDialog(this,f,mxResources.get("ok"),function(a){null!=a?f=a:e.value="blank"},mxResources.get("url"),null,null,null,null,function(){e.value="blank"});this.showDialog(a.container,300,80,!0,!1);a.init()}}));mxEvent.addListener(c,"change",mxUtils.bind(this,function(){c.checked&&(null==b||b.checked)?e.removeAttribute("disabled"):e.setAttribute("disabled","disabled")}));mxUtils.br(a);return{getLink:function(){return c.checked?"blank"===e.value?"_blank":f:null},getEditInput:function(){return c}, -getEditSelect:function(){return e}}};EditorUi.prototype.addLinkSection=function(a,b){function c(){g.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=e&&e!=mxConstants.NONE?"border:1px solid black;background-color:"+e:"background-position:center center;background-repeat:no-repeat;background-image:url('"+Dialog.prototype.closeImage+"')")+';"></div>'}mxUtils.write(a,mxResources.get("links")+":");var d=document.createElement("select");d.style.width="100px";d.style.marginLeft= -"8px";d.style.marginRight="10px";d.className="geBtn";var f=document.createElement("option");f.setAttribute("value","auto");mxUtils.write(f,mxResources.get("automatic"));d.appendChild(f);f=document.createElement("option");f.setAttribute("value","blank");mxUtils.write(f,mxResources.get("openInNewWindow"));d.appendChild(f);f=document.createElement("option");f.setAttribute("value","self");mxUtils.write(f,mxResources.get("openInThisWindow"));d.appendChild(f);b&&(f=document.createElement("option"),f.setAttribute("value", -"frame"),mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),d.appendChild(f));a.appendChild(d);mxUtils.write(a,mxResources.get("borderColor")+":");var e="#0000ff",g=null,g=mxUtils.button("",mxUtils.bind(this,function(a){this.pickColor(e||"none",function(a){e=a;c()});mxEvent.consume(a)}));c();g.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";g.style.marginLeft="4px";g.style.height="22px";g.style.width="22px";g.style.position="relative";g.style.top=mxClient.IS_IE|| -mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";g.className="geColorBtn";a.appendChild(g);mxUtils.br(a);return{getColor:function(){return e},getTarget:function(){return d.value},focus:function(){d.focus()}}};EditorUi.prototype.createLink=function(a,b,c,d,e,g,k,m){var f=this.getCurrentFile(),l=[];d&&(l.push("lightbox=1"),"auto"!=a&&l.push("target="+a),null!=b&&b!=mxConstants.NONE&&l.push("highlight="+("#"==b.charAt(0)?b.substring(1):b)),null!=e&&0<e.length&&l.push("edit="+encodeURIComponent(e)),g&& -l.push("layers=1"),this.editor.graph.foldingEnabled&&l.push("nav=1"));c&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&l.push("page-id="+this.currentPage.getId());a=!0;null!=k?c="#U"+encodeURIComponent(k):(f=this.getCurrentFile(),m||null==f||f.constructor!=window.DriveFile?c="#R"+encodeURIComponent(c?this.getFileData(!0,null,null,null,null,null,null,!0):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(c="#"+f.getHash(),a=!1));a&&null!=f&&null!=f.getTitle()&& -f.getTitle()!=this.defaultFilename&&l.push("title="+encodeURIComponent(f.getTitle()));return(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host+"/")+(0<l.length?"?"+l.join("&"):"")+c};EditorUi.prototype.createHtml=function(a,b,c,d,e,g,k,m,n,v,B){this.getBasenames();var f={};""!=e&&e!=mxConstants.NONE&&(f.highlight=e);"auto"!==d&&(f.target=d);n||(f.lightbox=!1);f.nav=this.editor.graph.foldingEnabled;c=parseInt(c); -isNaN(c)||100==c||(f.zoom=c/100);c=[];k&&(c.push("pages"),f.resize=!0,null!=this.pages&&null!=this.currentPage&&(f.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(c.push("zoom"),f.resize=!0);m&&c.push("layers");0<c.length&&(n&&c.push("lightbox"),f.toolbar=c.join(" "));null!=v&&0<v.length&&(f.edit=v);null!=a?f.url=a:f.xml=this.getFileData(!0,null,null,null,null,!k);b='<div class="mxgraph" style="'+(g?"max-width:100%;":"")+(""!=c?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(f))+ -'"></div>';a=null!=a?"&fetch="+encodeURIComponent(a):"";B(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 f=document.createElement("div");f.style.whiteSpace="nowrap";var e=document.createElement("h3"); -mxUtils.write(e,mxResources.get("html"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";f.appendChild(e);var g=document.createElement("div");g.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var l=document.createElement("input");l.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";l.setAttribute("value","url");l.setAttribute("type","radio");l.setAttribute("name","type-embedhtmldialog");e=l.cloneNode(!0);e.setAttribute("value", -"copy");g.appendChild(e);var k=document.createElement("span");mxUtils.write(k,mxResources.get("includeCopyOfMyDiagram"));g.appendChild(k);mxUtils.br(g);g.appendChild(l);k=document.createElement("span");mxUtils.write(k,mxResources.get("publicDiagramUrl"));g.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")), -g.appendChild(k),mxEvent.addListener(k,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(p.getId())})));e.setAttribute("checked","checked");null==c&&l.setAttribute("disabled","disabled");f.appendChild(g);var m=this.addLinkSection(f),n=this.addCheckbox(f,mxResources.get("zoom"),!0,null,!0);mxUtils.write(f,":");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="100%";f.appendChild(u);var t=this.addCheckbox(f,mxResources.get("fit"),!0),g=null!=this.pages&&1<this.pages.length,H=H=this.addCheckbox(f,mxResources.get("allPages"),g,!g),F=this.addCheckbox(f,mxResources.get("layers"),!0),I=this.addCheckbox(f,mxResources.get("lightbox"),!0),G=this.addEditButton(f,I),E=G.getEditInput();E.style.marginBottom="16px";mxEvent.addListener(I,"change",function(){I.checked?E.removeAttribute("disabled"):E.setAttribute("disabled","disabled");E.checked&&I.checked? -G.getEditSelect().removeAttribute("disabled"):G.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,f,mxUtils.bind(this,function(){d(l.checked?c:null,n.checked,u.value,m.getTarget(),m.getColor(),t.checked,H.checked,F.checked,I.checked,G.getLink())}),null,a,b);this.showDialog(a.container,340,384,!0,!0);e.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,c,d,e,g){var f=document.createElement("div");f.style.whiteSpace="nowrap";var l=document.createElement("h3"); -mxUtils.write(l,a||mxResources.get("link"));l.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";f.appendChild(l);var k=this.getCurrentFile(),l="https://desk.draw.io/support/solutions/articles/16000051941";a=0;if(null!=k&&k.constructor==window.DriveFile&&!b){a=80;var l="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 m=document.createElement("div");m.style.whiteSpace="normal";mxUtils.write(m,mxResources.get("linkAccountRequired"));p.appendChild(m);m=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(k.getId())}));m.style.marginTop="12px";m.className="geBtn";p.appendChild(m);f.appendChild(p);m=document.createElement("a");m.style.paddingLeft="12px";m.style.color="gray";m.style.fontSize="11px";m.setAttribute("href","javascript:void(0);");mxUtils.write(m,mxResources.get("check")); -p.appendChild(m);mxEvent.addListener(m,"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(f,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%",f.appendChild(n),mxUtils.write(f,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",f.appendChild(q),mxUtils.br(f);var u=this.addLinkSection(f,g);c=null!=this.pages&&1<this.pages.length;var t=null; -if(null==k||k.constructor!=window.DriveFile||b)t=this.addCheckbox(f,mxResources.get("allPages"),c,!c);var y=this.addCheckbox(f,mxResources.get("lightbox"),!0),I=this.addEditButton(f,y),G=I.getEditInput(),E=this.addCheckbox(f,mxResources.get("layers"),!0);E.style.marginLeft=G.style.marginLeft;E.style.marginBottom="16px";E.style.marginTop="8px";mxEvent.addListener(y,"change",function(){y.checked?(E.removeAttribute("disabled"),G.removeAttribute("disabled")):(E.setAttribute("disabled","disabled"),G.setAttribute("disabled", -"disabled"));G.checked&&y.checked?I.getEditSelect().removeAttribute("disabled"):I.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,f,mxUtils.bind(this,function(){e(u.getTarget(),u.getColor(),null==t?!0:t.checked,y.checked,I.getLink(),E.checked,null!=n?n.value:null,null!=q?q.value:null)}),null,mxResources.get("create"),l);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)):u.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,c,d,e){var f=document.createElement("div");f.style.whiteSpace="nowrap";var g=document.createElement("h3");mxUtils.write(g,mxResources.get("image"));g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(e?"10":"4")+"px";f.appendChild(g);if(e){mxUtils.write(f,mxResources.get("zoom")+":");var l=document.createElement("input");l.setAttribute("type","text");l.style.marginRight= -"16px";l.style.width="60px";l.style.marginLeft="4px";l.style.marginRight="12px";l.value=this.lastExportZoom||"100%";f.appendChild(l);mxUtils.write(f,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";f.appendChild(k);mxUtils.br(f)}var p=this.addCheckbox(f,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),m=d?null:this.addCheckbox(f, -mxResources.get("includeCopyOfMyDiagram"),!0),g=this.editor.graph,n=d?null:this.addCheckbox(f,mxResources.get("transparentBackground"),g.background==mxConstants.NONE||null==g.background);null!=n&&(n.style.marginBottom="16px");a=new CustomDialog(this,f,mxUtils.bind(this,function(){var a=parseInt(l.value)/100||1,b=parseInt(k.value)||0;c(!p.checked,null!=m?m.checked:!1,null!=n?n.checked:!1,a,b)}),null,a,b);this.showDialog(a.container,300,(e?25:0)+(d?125:210),!0,!0)};EditorUi.prototype.showExportDialog= -function(a,b,c,d,e,g,k,m){k=null!=k?k:!0;var f=document.createElement("div");f.style.whiteSpace="nowrap";var l=this.editor.graph,p="jpeg"==m?196:300,n=document.createElement("h3");mxUtils.write(n,a);n.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";f.appendChild(n);mxUtils.write(f,mxResources.get("zoom")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.marginRight="16px";q.style.width="60px";q.style.marginLeft="4px";q.style.marginRight= -"12px";q.value=this.lastExportZoom||"100%";f.appendChild(q);mxUtils.write(f,mxResources.get("borderWidth")+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.marginRight="16px";u.style.width="60px";u.style.marginLeft="4px";u.value=this.lastExportBorder||"0";f.appendChild(u);mxUtils.br(f);var t=this.addCheckbox(f,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=m),y=this.addCheckbox(f,mxResources.get("selectionOnly"),!1,l.isSelectionEmpty()),z=document.createElement("input"); -z.style.marginTop="16px";z.style.marginRight="8px";z.style.marginLeft="24px";z.setAttribute("disabled","disabled");z.setAttribute("type","checkbox");g&&(f.appendChild(z),mxUtils.write(f,mxResources.get("crop")),mxUtils.br(f),p+=26,mxEvent.addListener(y,"change",function(){y.checked?z.removeAttribute("disabled"):z.setAttribute("disabled","disabled")}));l.isSelectionEmpty()||(z.setAttribute("checked","checked"),z.defaultChecked=!0);var A=this.addCheckbox(f,mxResources.get("shadow"),l.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&&(f.appendChild(E),mxUtils.write(f,mxResources.get("embedImages")),mxUtils.br(f),p+=26);var K=null;if("png"==m||"jpeg"==m)K=this.addCheckbox(f,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),p+=26;var N=this.addCheckbox(f,mxResources.get("includeCopyOfMyDiagram"),k,null,null, -"jpeg"!=m),R=null!=this.pages&&1<this.pages.length,X=this.addCheckbox(f,R?mxResources.get("allPages"):"",R,!R,null,"jpeg"!=m);X.style.marginLeft="24px";X.style.marginBottom="16px";R||(X.style.display="none");mxEvent.addListener(N,"change",function(){N.checked&&R?X.removeAttribute("disabled"):X.setAttribute("disabled","disabled")});k&&R||X.setAttribute("disabled","disabled");var T=document.createElement("select");T.style.maxWidth="260px";T.style.marginLeft="8px";T.style.marginRight="10px";T.className= -"geBtn";a=document.createElement("option");a.setAttribute("value","auto");mxUtils.write(a,mxResources.get("automatic"));T.appendChild(a);a=document.createElement("option");a.setAttribute("value","blank");mxUtils.write(a,mxResources.get("openInNewWindow"));T.appendChild(a);a=document.createElement("option");a.setAttribute("value","self");mxUtils.write(a,mxResources.get("openInThisWindow"));T.appendChild(a);"svg"==m&&(mxUtils.write(f,mxResources.get("links")+":"),f.appendChild(T),mxUtils.br(f),mxUtils.br(f), -p+=26);c=new CustomDialog(this,f,mxUtils.bind(this,function(){this.lastExportBorder=u.value;this.lastExportZoom=q.value;e(q.value,t.checked,!y.checked,A.checked,N.checked,E.checked,u.value,z.checked,!X.checked,T.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,e){var f=document.createElement("div");f.style.whiteSpace="nowrap";var g=this.editor.graph;if(null!=b){var l=document.createElement("h3");mxUtils.write(l,b);l.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";f.appendChild(l)}var k=this.addCheckbox(f,mxResources.get("fit"),!0),p=this.addCheckbox(f,mxResources.get("shadow"),g.shadowVisible&&d,!d),m=this.addCheckbox(f,c),n=this.addCheckbox(f,mxResources.get("lightbox"),!0),u=this.addEditButton(f,n),t=u.getEditInput(), -y=1<g.model.getChildCount(g.model.getRoot()),F=this.addCheckbox(f,mxResources.get("layers"),y,!y);F.style.marginLeft=t.style.marginLeft;F.style.marginBottom="12px";F.style.marginTop="8px";mxEvent.addListener(n,"change",function(){n.checked?(y&&F.removeAttribute("disabled"),t.removeAttribute("disabled")):(F.setAttribute("disabled","disabled"),t.setAttribute("disabled","disabled"));t.checked&&n.checked?u.getEditSelect().removeAttribute("disabled"):u.getEditSelect().setAttribute("disabled","disabled")}); -b=new CustomDialog(this,f,mxUtils.bind(this,function(){a(k.checked,p.checked,m.checked,n.checked,u.getLink(),F.checked)}),null,mxResources.get("embed"),e);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,c,d,e,g,k,m){function f(b){var f=" ",p="";d&&(f=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+ +function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||!this.editor.graph.mathEnabled&&this.useCanvasForExport};EditorUi.prototype.createSvgDataUri=function(a){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(a)))};EditorUi.prototype.createImageDataUri=function(a,b,c,d){var f=a.toDataURL("image/"+c);if(6>=f.length||f==a.cloneNode(!1).toDataURL("image/"+c))throw{message:"Invalid image"};null!=b&&(f=this.writeGraphModelToPng(f, +"tEXt","mxfile",encodeURIComponent(b)));0<d&&(f=this.writeGraphModelToPng(f,"pHYs","dpi",d));return f};EditorUi.prototype.saveCanvas=function(a,b,c,d,e){var f="jpeg"==c?"jpg":c;d=this.getBaseFilename(d)+"."+f;a=this.createImageDataUri(a,b,c,e);this.saveData(d,f,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,e){if(window.Blob&&navigator.msSaveOrOpenBlob)a= +d?this.base64ToBlob(a,c):new Blob([a],{type:c}),navigator.msSaveOrOpenBlob(a,b);else if(mxClient.IS_IE)c=window.open("about:blank","_blank"),null==c?mxUtils.popup(a,!0):(c.document.write(a),c.document.close(),c.document.execCommand("SaveAs",!0,b),c.close());else{var f=document.createElement("a"),l=!mxClient.IS_SF&&0>navigator.userAgent.indexOf("PaleMoon/")&&"undefined"!==typeof f.download;if(mxClient.IS_GC)var g=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./),l=65==(g?parseInt(g[2],10):!1)? +!1:l;if(l||this.isOffline()){f.href=URL.createObjectURL(d?this.base64ToBlob(a,c):new Blob([a],{type:c}));l?f.download=b:f.setAttribute("target","_blank");document.body.appendChild(f);try{window.setTimeout(function(){URL.revokeObjectURL(f.href)},0),f.click(),f.parentNode.removeChild(f)}catch(C){}}else this.createEchoRequest(a,b,c,d,e).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,c,d,e,g){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=c?"&mime="+ +c:"")+(null!=e?"&format="+e:"")+(null!=g?"&base64="+g:"")+(null!=b?"&filename="+encodeURIComponent(b):"")+(d?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=b||"";for(var c=atob(a),d=c.length,f=Math.ceil(d/1024),e=Array(f),l=0;l<f;++l){for(var g=1024*l,k=Math.min(g+1024,d),m=Array(k-g),x=0;g<k;++x,++g)m[x]=c[g].charCodeAt(0);e[l]=new Uint8Array(m)}return new Blob(e,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,c,d,e,g,k){g=null!=g?g:!1;k=null!=k?k:"vsdx"!=e&&(!mxClient.IS_IOS|| +!navigator.standalone);e=this.getServiceCount(g);isLocalStorage&&e++;var f=4>=e?2:6<e?4:3;b=new CreateDialog(this,b,mxUtils.bind(this,function(b,f){try{if("_blank"==f)if(null==c||"image/"!=c.substring(0,6)||"image/svg"==c.substring(0,9)&&!mxClient.IS_SVG){var e=window.open("about:blank");null==e?mxUtils.popup(a,!0):(e.document.write("<pre>"+mxUtils.htmlEntities(a,!1)+"<pre>"),e.document.close())}else this.openInNewWindow(a,c,d);else f==App.MODE_DEVICE||"download"==f?this.doSaveLocalFile(a,b,c,d): +null!=b&&0<b.length&&this.pickFolder(f,mxUtils.bind(this,function(e){try{this.exportFile(a,b,c,d,f,e)}catch(A){this.handleError(A)}}))}catch(D){this.handleError(D)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,g,k,null,1<e,f,a,c,d);g=this.isServices(e)?e>f?390:270:160;this.showDialog(b.container,400,g,!0,!0);b.init()};EditorUi.prototype.openInNewWindow=function(a,b,c){if(mxClient.IS_GC||mxClient.IS_EDGE||11==document.documentMode||10== +document.documentMode){var d=window.open("about:blank");null==d||null==d.document?mxUtils.popup(a,!0):("image/svg+xml"==b?d.document.write("<html>"+a+"</html>"):d.document.write('<html><img src="data:'+b+(c?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))+'"/></html>'),d.document.close())}else d=window.open("data:"+b+(c?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))),null!=d&&null!=d.document||mxUtils.popup(a,!0)};var b=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.addChromelessToolbarItems= +function(a){if(this.isExportToCanvas()){this.exportDialog=null;var c=a(mxUtils.bind(this,function(a){var b=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",b);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)b.apply(this);else{this.exportDialog=document.createElement("div");var d=c.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px"); +this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily="Helvetica,Arial";this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width="50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left=d.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+ +this.chromelessToolbar.offsetHeight+4+"px";d=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=d.zIndex;var f=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"#fff",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});f.spin(this.exportDialog);this.exportToCanvas(mxUtils.bind(this,function(a){f.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var c=this.createImageDataUri(a, +null,"png");a=document.createElement("img");a.style.maxWidth="140px";a.style.maxHeight="140px";a.style.cursor="pointer";a.style.backgroundColor="white";a.setAttribute("title",mxResources.get("openInNewWindow"));a.setAttribute("border","0");a.setAttribute("src",c);this.exportDialog.appendChild(a);mxEvent.addListener(a,"click",mxUtils.bind(this,function(){this.openInNewWindow(c.substring(c.indexOf(",")+1),"image/png",!0);b.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this, +function(a){this.spinner.stop();this.handleError(a)}));mxEvent.addListener(this.editor.graph.container,"click",b);document.body.appendChild(this.exportDialog)}mxEvent.consume(a)}),Editor.cameraLargeImage,mxResources.get("export"))}b.apply(this,arguments)};EditorUi.prototype.saveData=function(a,b,c,d,e){this.isLocalFileSave()?this.saveLocalFile(c,a,d,e,b):this.saveRequest(a,b,mxUtils.bind(this,function(a,f){return this.createEchoRequest(c,a,d,e,b,f)}),c,e,d)};EditorUi.prototype.saveRequest=function(a, +b,c,d,e,g,k){k=null!=k?k:!mxClient.IS_IOS||!navigator.standalone;var f=this.getServiceCount(!1);isLocalStorage&&f++;var l=4>=f?2:6<f?4:3;a=new CreateDialog(this,a,mxUtils.bind(this,function(a,f){if("_blank"==f||null!=a&&0<a.length){var e=c("_blank"==f?null:a,f==App.MODE_DEVICE||"download"==f||null==f||"_blank"==f?"0":"1");null!=e&&(f==App.MODE_DEVICE||"download"==f||"_blank"==f?e.simulate(document,"_blank"):this.pickFolder(f,mxUtils.bind(this,function(c){g=null!=g?g:"pdf"==b?"application/pdf":"image/"+ +b;if(null!=d)try{this.exportFile(d,a,g,!0,f,c)}catch(I){this.handleError(I)}else this.spinner.spin(document.body,mxResources.get("saving"))&&e.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=e.getStatus()&&299>=e.getStatus())try{this.exportFile(e.getText(),a,g,!0,f,c)}catch(I){this.handleError(I)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(a){this.spinner.stop();this.handleError(a)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"), +mxResources.get("download"),!1,!1,k,null,1<f,l,d,g,e);f=this.isServices(f)?4<f?390:270:160;this.showDialog(a.container,380,f,!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,e,g){};EditorUi.prototype.pickFolder=function(a,b,c){b(null)};EditorUi.prototype.exportSvg=function(a,b,c,d,e,g,k,m,n,B){if(this.spinner.spin(document.body,mxResources.get("export"))){var f= +this.editor.graph.isSelectionEmpty();c=null!=c?c:f;f=b?null:this.editor.graph.background;f==mxConstants.NONE&&(f=null);null==f&&0==b&&(f="#ffffff");var l=this.editor.graph.getSvg(f,a,k,m,null,c,null,null,"blank"==B?"_blank":"self"==B?"_top":null);d&&this.editor.graph.addSvgShadow(l);var p=this.getBaseFilename()+".svg",t=mxUtils.bind(this,function(a){this.spinner.stop();e&&a.setAttribute("content",this.getFileData(!0,null,null,null,c,n));if(null!=this.editor.fontCss){var b=a.ownerDocument,b=null!= +b.createElementNS?b.createElementNS(mxConstants.NS_SVG,"style"):b.createElement("style");b.setAttribute("type","text/css");mxUtils.setTextContent(b,this.editor.fontCss);a.getElementsByTagName("defs")[0].appendChild(b)}var d='<?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.convertMath(this.editor.graph,l,!1,mxUtils.bind(this,function(){g?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.convertImages(l,t,this.thumbImageCache)):t(l)}))}};EditorUi.prototype.addRadiobox=function(a,b,c,d,e,g,k){return this.addCheckbox(a,c,d,e,g,k,!0,b)};EditorUi.prototype.addCheckbox=function(a,b,c,d,e,g,k,m){g=null!=g?g:!0;var f=document.createElement("input");f.style.marginRight="8px";f.style.marginTop= +"16px";f.setAttribute("type",k?"radio":"checkbox");k="geCheckbox-"+Editor.guid();f.id=k;null!=m&&f.setAttribute("name",m);c&&(f.setAttribute("checked","checked"),f.defaultChecked=!0);d&&f.setAttribute("disabled","disabled");g&&(a.appendChild(f),c=document.createElement("label"),mxUtils.write(c,b),c.setAttribute("for",k),a.appendChild(c),e||mxUtils.br(a));return f};EditorUi.prototype.addEditButton=function(a,b){var c=this.addCheckbox(a,mxResources.get("edit")+":",!0,null,!0);c.style.marginLeft="24px"; +var d=this.getCurrentFile(),f="";null!=d&&d.getMode()!=App.MODE_DEVICE&&d.getMode()!=App.MODE_BROWSER&&(f=window.location.href);var e=document.createElement("select");e.style.width="120px";e.style.marginLeft="8px";e.style.marginRight="10px";e.className="geBtn";d=document.createElement("option");d.setAttribute("value","blank");mxUtils.write(d,mxResources.get("makeCopy"));e.appendChild(d);d=document.createElement("option");d.setAttribute("value","custom");mxUtils.write(d,mxResources.get("custom")+"..."); +e.appendChild(d);a.appendChild(e);mxEvent.addListener(e,"change",mxUtils.bind(this,function(){if("custom"==e.value){var a=new FilenameDialog(this,f,mxResources.get("ok"),function(a){null!=a?f=a:e.value="blank"},mxResources.get("url"),null,null,null,null,function(){e.value="blank"});this.showDialog(a.container,300,80,!0,!1);a.init()}}));mxEvent.addListener(c,"change",mxUtils.bind(this,function(){c.checked&&(null==b||b.checked)?e.removeAttribute("disabled"):e.setAttribute("disabled","disabled")})); +mxUtils.br(a);return{getLink:function(){return c.checked?"blank"===e.value?"_blank":f:null},getEditInput:function(){return c},getEditSelect:function(){return e}}};EditorUi.prototype.addLinkSection=function(a,b){function c(){l.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=e&&e!=mxConstants.NONE?"border:1px solid black;background-color:"+e:"background-position:center center;background-repeat:no-repeat;background-image:url('"+Dialog.prototype.closeImage+"')")+';"></div>'} +mxUtils.write(a,mxResources.get("links")+":");var d=document.createElement("select");d.style.width="100px";d.style.marginLeft="8px";d.style.marginRight="10px";d.className="geBtn";var f=document.createElement("option");f.setAttribute("value","auto");mxUtils.write(f,mxResources.get("automatic"));d.appendChild(f);f=document.createElement("option");f.setAttribute("value","blank");mxUtils.write(f,mxResources.get("openInNewWindow"));d.appendChild(f);f=document.createElement("option");f.setAttribute("value", +"self");mxUtils.write(f,mxResources.get("openInThisWindow"));d.appendChild(f);b&&(f=document.createElement("option"),f.setAttribute("value","frame"),mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),d.appendChild(f));a.appendChild(d);mxUtils.write(a,mxResources.get("borderColor")+":");var e="#0000ff",l=null,l=mxUtils.button("",mxUtils.bind(this,function(a){this.pickColor(e||"none",function(a){e=a;c()});mxEvent.consume(a)}));c();l.style.padding=mxClient.IS_FF? +"4px 2px 4px 2px":"4px";l.style.marginLeft="4px";l.style.height="22px";l.style.width="22px";l.style.position="relative";l.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";l.className="geColorBtn";a.appendChild(l);mxUtils.br(a);return{getColor:function(){return e},getTarget:function(){return d.value},focus:function(){d.focus()}}};EditorUi.prototype.createLink=function(a,b,c,d,e,g,k,m){var f=this.getCurrentFile(),l=[];d&&(l.push("lightbox=1"),"auto"!=a&&l.push("target="+a),null!= +b&&b!=mxConstants.NONE&&l.push("highlight="+("#"==b.charAt(0)?b.substring(1):b)),null!=e&&0<e.length&&l.push("edit="+encodeURIComponent(e)),g&&l.push("layers=1"),this.editor.graph.foldingEnabled&&l.push("nav=1"));c&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&l.push("page-id="+this.currentPage.getId());a=!0;null!=k?c="#U"+encodeURIComponent(k):(f=this.getCurrentFile(),m||null==f||f.constructor!=window.DriveFile?c="#R"+encodeURIComponent(c?this.getFileData(!0,null,null, +null,null,null,null,!0):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(c="#"+f.getHash(),a=!1));a&&null!=f&&null!=f.getTitle()&&f.getTitle()!=this.defaultFilename&&l.push("title="+encodeURIComponent(f.getTitle()));return(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host+"/")+(0<l.length?"?"+l.join("&"):"")+c};EditorUi.prototype.createHtml=function(a,b,c,d,e,g,k,m,n,B,x){this.getBasenames(); +var f={};""!=e&&e!=mxConstants.NONE&&(f.highlight=e);"auto"!==d&&(f.target=d);n||(f.lightbox=!1);f.nav=this.editor.graph.foldingEnabled;c=parseInt(c);isNaN(c)||100==c||(f.zoom=c/100);c=[];k&&(c.push("pages"),f.resize=!0,null!=this.pages&&null!=this.currentPage&&(f.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(c.push("zoom"),f.resize=!0);m&&c.push("layers");0<c.length&&(n&&c.push("lightbox"),f.toolbar=c.join(" "));null!=B&&0<B.length&&(f.edit=B);null!=a?f.url=a:f.xml=this.getFileData(!0, +null,null,null,null,!k);b='<div class="mxgraph" style="'+(g?"max-width:100%;":"")+(""!=c?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(f))+'"></div>';a=null!=a?"&fetch="+encodeURIComponent(a):"";x(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 f=document.createElement("div");f.style.whiteSpace="nowrap";var e=document.createElement("h3");mxUtils.write(e,mxResources.get("html"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";f.appendChild(e);var l=document.createElement("div");l.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var g=document.createElement("input");g.style.cssText= +"margin-right:8px;margin-top:8px;margin-bottom:8px;";g.setAttribute("value","url");g.setAttribute("type","radio");g.setAttribute("name","type-embedhtmldialog");e=g.cloneNode(!0);e.setAttribute("value","copy");l.appendChild(e);var k=document.createElement("span");mxUtils.write(k,mxResources.get("includeCopyOfMyDiagram"));l.appendChild(k);mxUtils.br(l);l.appendChild(g);k=document.createElement("span");mxUtils.write(k,mxResources.get("publicDiagramUrl"));l.appendChild(k);var 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")),l.appendChild(k),mxEvent.addListener(k,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(p.getId())})));e.setAttribute("checked","checked");null==c&&g.setAttribute("disabled","disabled");f.appendChild(l);var x=this.addLinkSection(f),m=this.addCheckbox(f, +mxResources.get("zoom"),!0,null,!0);mxUtils.write(f,":");var n=document.createElement("input");n.setAttribute("type","text");n.style.marginRight="16px";n.style.width="60px";n.style.marginLeft="4px";n.style.marginRight="12px";n.value="100%";f.appendChild(n);var u=this.addCheckbox(f,mxResources.get("fit"),!0),l=null!=this.pages&&1<this.pages.length,q=q=this.addCheckbox(f,mxResources.get("allPages"),l,!l),F=this.addCheckbox(f,mxResources.get("layers"),!0),G=this.addCheckbox(f,mxResources.get("lightbox"), +!0),J=this.addEditButton(f,G),E=J.getEditInput();E.style.marginBottom="16px";mxEvent.addListener(G,"change",function(){G.checked?E.removeAttribute("disabled"):E.setAttribute("disabled","disabled");E.checked&&G.checked?J.getEditSelect().removeAttribute("disabled"):J.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,f,mxUtils.bind(this,function(){d(g.checked?c:null,m.checked,n.value,x.getTarget(),x.getColor(),u.checked,q.checked,F.checked,G.checked,J.getLink())}),null,a, +b);this.showDialog(a.container,340,384,!0,!0);e.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,c,d,e,g){var f=document.createElement("div");f.style.whiteSpace="nowrap";var l=document.createElement("h3");mxUtils.write(l,a||mxResources.get("link"));l.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";f.appendChild(l);var k=this.getCurrentFile(),l="https://desk.draw.io/support/solutions/articles/16000051941";a=0;if(null!=k&&k.constructor==window.DriveFile&& +!b){a=80;var l="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 x=document.createElement("div");x.style.whiteSpace="normal";mxUtils.write(x,mxResources.get("linkAccountRequired"));p.appendChild(x);x=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(k.getId())}));x.style.marginTop= +"12px";x.className="geBtn";p.appendChild(x);f.appendChild(p);x=document.createElement("a");x.style.paddingLeft="12px";x.style.color="gray";x.style.fontSize="11px";x.setAttribute("href","javascript:void(0);");mxUtils.write(x,mxResources.get("check"));p.appendChild(x);mxEvent.addListener(x,"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 m=null,t=null;if(null!=c||null!=d)a+=30,mxUtils.write(f,mxResources.get("width")+":"),m=document.createElement("input"),m.setAttribute("type","text"),m.style.marginRight="16px",m.style.width="50px",m.style.marginLeft="6px",m.style.marginRight="16px",m.style.marginBottom="10px",m.value="100%",f.appendChild(m),mxUtils.write(f,mxResources.get("height")+":"), +t=document.createElement("input"),t.setAttribute("type","text"),t.style.width="50px",t.style.marginLeft="6px",t.style.marginBottom="10px",t.value=d+"px",f.appendChild(t),mxUtils.br(f);var n=this.addLinkSection(f,g);c=null!=this.pages&&1<this.pages.length;var u=null;if(null==k||k.constructor!=window.DriveFile||b)u=this.addCheckbox(f,mxResources.get("allPages"),c,!c);var q=this.addCheckbox(f,mxResources.get("lightbox"),!0),v=this.addEditButton(f,q),J=v.getEditInput(),E=this.addCheckbox(f,mxResources.get("layers"), +!0);E.style.marginLeft=J.style.marginLeft;E.style.marginBottom="16px";E.style.marginTop="8px";mxEvent.addListener(q,"change",function(){q.checked?(E.removeAttribute("disabled"),J.removeAttribute("disabled")):(E.setAttribute("disabled","disabled"),J.setAttribute("disabled","disabled"));J.checked&&q.checked?v.getEditSelect().removeAttribute("disabled"):v.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,f,mxUtils.bind(this,function(){e(n.getTarget(),n.getColor(),null==u? +!0:u.checked,q.checked,v.getLink(),E.checked,null!=m?m.value:null,null!=t?t.value:null)}),null,mxResources.get("create"),l);this.showDialog(b.container,340,254+a,!0,!0);null!=m?(m.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?m.select():document.execCommand("selectAll",!1,null)):n.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,c,d,e){var f=document.createElement("div");f.style.whiteSpace="nowrap";var l=document.createElement("h3");mxUtils.write(l, +mxResources.get("image"));l.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(e?"10":"4")+"px";f.appendChild(l);if(e){mxUtils.write(f,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%";f.appendChild(g);mxUtils.write(f,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";f.appendChild(k);mxUtils.br(f)}var p=this.addCheckbox(f,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),x=d?null:this.addCheckbox(f,mxResources.get("includeCopyOfMyDiagram"),!0),l=this.editor.graph,m=d?null:this.addCheckbox(f,mxResources.get("transparentBackground"),l.background==mxConstants.NONE||null==l.background);null!=m&&(m.style.marginBottom="16px");a= +new CustomDialog(this,f,mxUtils.bind(this,function(){var a=parseInt(g.value)/100||1,b=parseInt(k.value)||0;c(!p.checked,null!=x?x.checked:!1,null!=m?m.checked:!1,a,b)}),null,a,b);this.showDialog(a.container,300,(e?25:0)+(d?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,c,d,e,g,k,m){k=null!=k?k:!0;var f=document.createElement("div");f.style.whiteSpace="nowrap";var l=this.editor.graph,p="jpeg"==m?196:300,n=document.createElement("h3");mxUtils.write(n,a);n.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px"; +f.appendChild(n);mxUtils.write(f,mxResources.get("zoom")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.marginRight="16px";t.style.width="60px";t.style.marginLeft="4px";t.style.marginRight="12px";t.value=this.lastExportZoom||"100%";f.appendChild(t);mxUtils.write(f,mxResources.get("borderWidth")+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.marginRight="16px";u.style.width="60px";u.style.marginLeft="4px";u.value=this.lastExportBorder|| +"0";f.appendChild(u);mxUtils.br(f);var q=this.addCheckbox(f,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=m),v=this.addCheckbox(f,mxResources.get("selectionOnly"),!1,l.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&&(f.appendChild(y),mxUtils.write(f,mxResources.get("crop")),mxUtils.br(f),p+=26,mxEvent.addListener(v,"change",function(){v.checked? +y.removeAttribute("disabled"):y.setAttribute("disabled","disabled")}));l.isSelectionEmpty()||(y.setAttribute("checked","checked"),y.defaultChecked=!0);var z=this.addCheckbox(f,mxResources.get("shadow"),l.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&&(f.appendChild(E),mxUtils.write(f,mxResources.get("embedImages")),mxUtils.br(f),p+= +26);var L=null;if("png"==m||"jpeg"==m)L=this.addCheckbox(f,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),p+=26;var K=this.addCheckbox(f,mxResources.get("includeCopyOfMyDiagram"),k,null,null,"jpeg"!=m),R=null!=this.pages&&1<this.pages.length,X=this.addCheckbox(f,R?mxResources.get("allPages"):"",R,!R,null,"jpeg"!=m);X.style.marginLeft="24px";X.style.marginBottom="16px";R||(X.style.display="none");mxEvent.addListener(K,"change",function(){K.checked&&R?X.removeAttribute("disabled"): +X.setAttribute("disabled","disabled")});k&&R||X.setAttribute("disabled","disabled");var T=document.createElement("select");T.style.maxWidth="260px";T.style.marginLeft="8px";T.style.marginRight="10px";T.className="geBtn";a=document.createElement("option");a.setAttribute("value","auto");mxUtils.write(a,mxResources.get("automatic"));T.appendChild(a);a=document.createElement("option");a.setAttribute("value","blank");mxUtils.write(a,mxResources.get("openInNewWindow"));T.appendChild(a);a=document.createElement("option"); +a.setAttribute("value","self");mxUtils.write(a,mxResources.get("openInThisWindow"));T.appendChild(a);"svg"==m&&(mxUtils.write(f,mxResources.get("links")+":"),f.appendChild(T),mxUtils.br(f),mxUtils.br(f),p+=26);c=new CustomDialog(this,f,mxUtils.bind(this,function(){this.lastExportBorder=u.value;this.lastExportZoom=t.value;e(t.value,q.checked,!v.checked,z.checked,K.checked,E.checked,u.value,y.checked,!X.checked,T.value,null!=L?L.checked:null)}),null,c,d);this.showDialog(c.container,340,p,!0,!0,null, +null,null,null,!0);t.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?t.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,c,d,e){var f=document.createElement("div");f.style.whiteSpace="nowrap";var l=this.editor.graph;if(null!=b){var g=document.createElement("h3");mxUtils.write(g,b);g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";f.appendChild(g)}var k=this.addCheckbox(f,mxResources.get("fit"), +!0),p=this.addCheckbox(f,mxResources.get("shadow"),l.shadowVisible&&d,!d),m=this.addCheckbox(f,c),n=this.addCheckbox(f,mxResources.get("lightbox"),!0),u=this.addEditButton(f,n),q=u.getEditInput(),v=1<l.model.getChildCount(l.model.getRoot()),F=this.addCheckbox(f,mxResources.get("layers"),v,!v);F.style.marginLeft=q.style.marginLeft;F.style.marginBottom="12px";F.style.marginTop="8px";mxEvent.addListener(n,"change",function(){n.checked?(v&&F.removeAttribute("disabled"),q.removeAttribute("disabled")): +(F.setAttribute("disabled","disabled"),q.setAttribute("disabled","disabled"));q.checked&&n.checked?u.getEditSelect().removeAttribute("disabled"):u.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,f,mxUtils.bind(this,function(){a(k.checked,p.checked,m.checked,n.checked,u.getLink(),F.checked)}),null,mxResources.get("embed"),e);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,c,d,e,g,k,m){function f(b){var f=" ",p="";d&&(f=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+ EditorUi.drawHost+"/?client=1&lightbox=1"+(e?"&edit=_blank":"")+(g?"&layers=1":"")+"');}})(this);\"",p+="cursor:pointer;");a&&(p+="max-width:100%;");var m="";c&&(m=' width="'+Math.round(l.width)+'" height="'+Math.round(l.height)+'"');k('<img src="'+b+'"'+m+(""!=p?' style="'+p+'"':"")+f+"/>")}var l=this.editor.graph.getGraphBounds();if(this.isExportToCanvas())this.exportToCanvas(mxUtils.bind(this,function(a){var b=d?this.getFileData(!0):null;a=this.createImageDataUri(a,b,"png");f(a)}),null,null,null, mxUtils.bind(this,function(a){m({message:mxResources.get("unknownError")})}),null,!0,c?2:1,null,b);else if(b=this.getFileData(!0),l.width*l.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){var p="";c&&(p="&w="+Math.round(2*l.width)+"&h="+Math.round(2*l.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()?f("data:image/png;base64,"+n.getText()):m({message:mxResources.get("unknownError")})}))}else m({message:mxResources.get("drawingTooLarge")})}; -EditorUi.prototype.createEmbedSvg=function(a,b,c,d,e,g,k){var f=this.editor.graph.getSvg(),l=f.getElementsByTagName("a");if(null!=l)for(var p=0;p<l.length;p++){var m=l[p].getAttribute("href");null!=m&&"#"==m.charAt(0)&&"_blank"==l[p].getAttribute("target")&&l[p].removeAttribute("target")}d&&f.setAttribute("content",this.getFileData(!0));b&&this.editor.graph.addSvgShadow(f);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"+(e?"&edit=_blank":"")+(g?"&layers=1":"")+"');}})(this);\"",q+="cursor:pointer;");a&&(q+="max-width:100%;");this.convertImages(f,mxUtils.bind(this,function(a){k('<img src="'+this.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=q?' style="'+q+'"':"")+n+"/>")}))}else q="",d&&(f.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+ -EditorUi.drawHost+"/?client=1&lightbox=1"+(e?"&edit=_blank":"")+(g?"&layers=1":"")+"');}}})(this);"),q+="cursor:pointer;"),a&&(a=parseInt(f.getAttribute("width")),b=parseInt(f.getAttribute("height")),f.setAttribute("viewBox","-0.5 -0.5 "+a+" "+b),q+="max-width:100%;max-height:"+b+"px;",f.removeAttribute("height")),""!=q&&f.setAttribute("style",q),k(mxUtils.getXml(f))};EditorUi.prototype.timeSince=function(a){a=Math.floor((new Date-a)/1E3);var b=Math.floor(a/31536E3);if(1<b)return b+" "+mxResources.get("years"); +EditorUi.prototype.createEmbedSvg=function(a,b,c,d,e,g,k){var f=this.editor.graph.getSvg(),l=f.getElementsByTagName("a");if(null!=l)for(var p=0;p<l.length;p++){var m=l[p].getAttribute("href");null!=m&&"#"==m.charAt(0)&&"_blank"==l[p].getAttribute("target")&&l[p].removeAttribute("target")}d&&f.setAttribute("content",this.getFileData(!0));b&&this.editor.graph.addSvgShadow(f);if(c){var n=" ",t="";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"+(e?"&edit=_blank":"")+(g?"&layers=1":"")+"');}})(this);\"",t+="cursor:pointer;");a&&(t+="max-width:100%;");this.convertImages(f,mxUtils.bind(this,function(a){k('<img src="'+this.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=t?' style="'+t+'"':"")+n+"/>")}))}else t="",d&&(f.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+ +EditorUi.drawHost+"/?client=1&lightbox=1"+(e?"&edit=_blank":"")+(g?"&layers=1":"")+"');}}})(this);"),t+="cursor:pointer;"),a&&(a=parseInt(f.getAttribute("width")),b=parseInt(f.getAttribute("height")),f.setAttribute("viewBox","-0.5 -0.5 "+a+" "+b),t+="max-width:100%;max-height:"+b+"px;",f.removeAttribute("height")),""!=t&&f.setAttribute("style",t),k(mxUtils.getXml(f))};EditorUi.prototype.timeSince=function(a){a=Math.floor((new Date-a)/1E3);var b=Math.floor(a/31536E3);if(1<b)return b+" "+mxResources.get("years"); b=Math.floor(a/2592E3);if(1<b)return b+" "+mxResources.get("months");b=Math.floor(a/86400);if(1<b)return b+" "+mxResources.get("days");b=Math.floor(a/3600);if(1<b)return b+" "+mxResources.get("hours");b=Math.floor(a/60);return 1<b?b+" "+mxResources.get("minutes"):1==b?b+" "+mxResources.get("minute"):null};EditorUi.prototype.convertMath=function(a,b,c,d){a.mathEnabled&&"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?(Editor.MathJaxRender(b),window.setTimeout(mxUtils.bind(this,function(){MathJax.Hub.Queue(mxUtils.bind(this, -function(){d()}))}),0)):d()};EditorUi.prototype.decodeNodeIntoGraph=function(a,b){if(null!=a){var c=null;if("diagram"==a.nodeName)c=a;else if("mxfile"==a.nodeName){var d=a.getElementsByTagName("diagram");if(0<d.length){var c=d[0],f=b.getGlobalVariable;b.getGlobalVariable=function(a){return"page"==a?c.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==a?1:f.apply(this,arguments)}}}null!=c&&(a=Editor.parseDiagramNode(c))}d=this.editor.graph;try{this.editor.graph=b,this.editor.setGraphXml(a)}catch(q){}finally{this.editor.graph= +function(){d()}))}),0)):d()};EditorUi.prototype.decodeNodeIntoGraph=function(a,b){if(null!=a){var c=null;if("diagram"==a.nodeName)c=a;else if("mxfile"==a.nodeName){var d=a.getElementsByTagName("diagram");if(0<d.length){var c=d[0],f=b.getGlobalVariable;b.getGlobalVariable=function(a){return"page"==a?c.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==a?1:f.apply(this,arguments)}}}null!=c&&(a=Editor.parseDiagramNode(c))}d=this.editor.graph;try{this.editor.graph=b,this.editor.setGraphXml(a)}catch(t){}finally{this.editor.graph= d}return a};EditorUi.prototype.getEmbeddedPng=function(a,b,c){try{var d=this.editor.graph,f=null;if(null!=c&&0<c.length)d=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(d.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(c).documentElement,!0),d),f=c;else if(null!=this.pages&&this.currentPage!=this.pages[0]){var d=this.createTemporaryGraph(d.getStylesheet()),e=d.getGlobalVariable,g=this.pages[0];d.getGlobalVariable=function(a){return"page"== -a?g.getName():"pagenumber"==a?1:e.apply(this,arguments)};document.body.appendChild(d.container);d.model.setRoot(g.root)}this.exportToCanvas(mxUtils.bind(this,function(c){try{null==f&&(f=this.getFileData(!0));var e=c.toDataURL("image/png"),e=this.writeGraphModelToPng(e,"tEXt","mxfile",encodeURIComponent(f));a(e.substring(e.lastIndexOf(",")+1));d!=this.editor.graph&&d.container.parentNode.removeChild(d.container)}catch(v){null!=b&&b(v)}}),null,null,null,mxUtils.bind(this,function(a){null!=b&&b(a)}), -null,null,null,null,d.shadowVisible,null,d)}catch(z){null!=b&&b(z)}};EditorUi.prototype.getEmbeddedSvg=function(a,b,c,d,e,g,k){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!=e)this.convertImages(g,mxUtils.bind(this,function(a){e((d?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+ -mxUtils.getXml(a))}));else return(d?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(g)};EditorUi.prototype.exportImage=function(a,b,c,d,e,g,k,m,n,v){n=null!=n?n:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var f=this.editor.graph.isSelectionEmpty();c=null!=c?c:f;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop(); -try{this.saveCanvas(a,e?this.getFileData(!0,null,null,null,c,m):null,n,!m)}catch(x){"Invalid image"==x.message?this.downloadFile(n):this.handleError(x)}}),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,v)}catch(D){this.spinner.stop(),this.handleError(D)}}};EditorUi.prototype.loadFonts=function(a){if(null!=this.editor.fontCss&&null==this.editor.resolvedFontCss){var b=function(a){return a.replace(RegExp("^[\\s\"']+", +a?g.getName():"pagenumber"==a?1:e.apply(this,arguments)};document.body.appendChild(d.container);d.model.setRoot(g.root)}this.exportToCanvas(mxUtils.bind(this,function(c){try{null==f&&(f=this.getFileData(!0));var e=c.toDataURL("image/png"),e=this.writeGraphModelToPng(e,"tEXt","mxfile",encodeURIComponent(f));a(e.substring(e.lastIndexOf(",")+1));d!=this.editor.graph&&d.container.parentNode.removeChild(d.container)}catch(B){null!=b&&b(B)}}),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,e,g,k){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!=e)this.convertImages(g,mxUtils.bind(this,function(a){e((d?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+ +mxUtils.getXml(a))}));else return(d?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(g)};EditorUi.prototype.exportImage=function(a,b,c,d,e,g,k,m,n,B,x){n=null!=n?n:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var f=this.editor.graph.isSelectionEmpty();c=null!=c?c:f;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.exportToCanvas(mxUtils.bind(this, +function(a){this.spinner.stop();try{this.saveCanvas(a,e?this.getFileData(!0,null,null,null,c,m):null,n,!m,x)}catch(I){"Invalid image"==I.message?this.downloadFile(n):this.handleError(I)}}),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,B)}catch(A){this.spinner.stop(),this.handleError(A)}}};EditorUi.prototype.loadFonts=function(a){if(null!=this.editor.fontCss&&null==this.editor.resolvedFontCss){var b=function(a){return a.replace(RegExp("^[\\s\"']+", "g"),"").replace(RegExp("[\\s\"']+$","g"),"")},c=this.editor.fontCss.split("url("),d=0,f={},e=mxUtils.bind(this,function(){if(0==d){for(var e=[c[0]],g=1;g<c.length;g++){var l=c[g].indexOf(")");e.push('url("');e.push(f[b(c[g].substring(0,l))]);e.push('"'+c[g].substring(l))}this.editor.resolvedFontCss=e.join("");a()}});if(0<c.length)for(var g=1;g<c.length;g++){var k=c[g].indexOf(")"),m=null,n=c[g].indexOf("format(",k);0<n&&(m=b(c[g].substring(n+7,c[g].indexOf(")",n))));mxUtils.bind(this,function(a){if(null== f[a]){f[a]=a;d++;var b="application/x-font-ttf";if("svg"==m||/(\.svg)($|\?)/i.test(a))b="image/svg+xml";else if("otf"==m||"embedded-opentype"==m||/(\.otf)($|\?)/i.test(a))b="application/x-font-opentype";else if("woff"==m||/(\.woff)($|\?)/i.test(a))b="application/font-woff";else if("woff2"==m||/(\.woff2)($|\?)/i.test(a))b="application/font-woff2";else if("eot"==m||/(\.eot)($|\?)/i.test(a))b="application/vnd.ms-fontobject";else if("sfnt"==m||/(\.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){f[a]=b;d--;e()}),mxUtils.bind(this,function(a){d--;e()}),!0,null,"data:"+b+";charset=utf-8;base64,")}})(b(c[g].substring(0,k)),m)}}else a()};EditorUi.prototype.exportToCanvas=function(a,b,c,d,e,g,k,m,n,v,B,t,x,J,H){try{g=null!=g?g:!0;k=null!=k?k:!0;t=null!=t?t:this.editor.graph;x=null!=x?x:0;var f=n?null:t.background;f==mxConstants.NONE&&(f=null); -null==f&&(f=d);null==f&&0==n&&(f="#ffffff");this.convertImages(t.getSvg(null,null,null,J,null,k,null,null,null,v),mxUtils.bind(this,function(c){var d=new Image;d.onload=mxUtils.bind(this,function(){try{var l=function(){mxClient.IS_SF?window.setTimeout(function(){v.drawImage(d,x/m,x/m);a(k)},0):(v.drawImage(d,x/m,x/m),a(k))},k=document.createElement("canvas"),p=parseInt(c.getAttribute("width")),n=parseInt(c.getAttribute("height"));m=null!=m?m:1;null!=b&&(m=g?Math.min(1,Math.min(3*b/(4*n),b/p)):b/p); -p=Math.ceil(m*p)+2*x;n=Math.ceil(m*n)+2*x;k.setAttribute("width",p);k.setAttribute("height",n);var v=k.getContext("2d");null!=f&&(v.beginPath(),v.rect(0,0,p,n),v.fillStyle=f,v.fill());v.scale(m,m);if(H){var q=t.view,B=btoa(unescape(encodeURIComponent(q.createSvgGrid(q.gridColor)))),B="data:image/svg+xml;base64,"+B,u=t.gridSize*q.gridSteps*m,y=t.getGraphBounds(),z=y.x*m,D=y.y*m,A=new Image;A.src=B;A.onload=function(){for(var a=-Math.round(u-mxUtils.mod(q.translate.x*m-z,u)),b=-Math.round(u-mxUtils.mod(q.translate.y* -m-D,u));a<p;a+=u)for(var c=b;c<n;c+=u)v.drawImage(A,a/m,c/m);l()}}else l()}catch(ba){null!=e&&e(ba)}});d.onerror=function(a){null!=e&&e(a)};try{v&&this.editor.graph.addSvgShadow(c);var l=mxUtils.bind(this,function(){if(null!=this.editor.resolvedFontCss){var a=document.createElement("style");a.setAttribute("type","text/css");a.innerHTML=this.editor.resolvedFontCss;c.getElementsByTagName("defs")[0].appendChild(a)}this.convertMath(t,c,!0,mxUtils.bind(this,function(){d.src=this.createSvgDataUri(mxUtils.getXml(c))}))}); -this.loadFonts(l)}catch(K){null!=e&&e(K)}}),c,B)}catch(I){null!=e&&e(I)}};EditorUi.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var b=a.convert,c=this;a.convert=function(d){if(null!=d){var f="http://"==d.substring(0,7)||"https://"==d.substring(0,8);f&&!navigator.onLine?d=c.svgBrokenImage.src:!f||d.substring(0,a.baseUrl.length)==a.baseUrl||c.crossOriginImages&&c.editor.isCorsEnabledForUrl(d)?"chrome-extension://"!=d.substring(0,19)&&(d=b.apply(this,arguments)): +a;/^https?:\/\//.test(c)&&!this.editor.isCorsEnabledForUrl(c)&&(c=PROXY_URL+"?url="+encodeURIComponent(a));this.loadUrl(c,mxUtils.bind(this,function(b){f[a]=b;d--;e()}),mxUtils.bind(this,function(a){d--;e()}),!0,null,"data:"+b+";charset=utf-8;base64,")}})(b(c[g].substring(0,k)),m)}}else a()};EditorUi.prototype.exportToCanvas=function(a,b,c,d,e,g,k,m,n,B,x,q,A,I,H){try{g=null!=g?g:!0;k=null!=k?k:!0;q=null!=q?q:this.editor.graph;A=null!=A?A:0;var f=n?null:q.background;f==mxConstants.NONE&&(f=null); +null==f&&(f=d);null==f&&0==n&&(f="#ffffff");this.convertImages(q.getSvg(null,null,null,I,null,k,null,null,null,B),mxUtils.bind(this,function(c){var d=new Image;d.onload=mxUtils.bind(this,function(){try{var l=function(){mxClient.IS_SF?window.setTimeout(function(){x.drawImage(d,A/m,A/m);a(k)},0):(x.drawImage(d,A/m,A/m),a(k))},k=document.createElement("canvas"),p=parseInt(c.getAttribute("width")),n=parseInt(c.getAttribute("height"));m=null!=m?m:1;null!=b&&(m=g?Math.min(1,Math.min(3*b/(4*n),b/p)):b/p); +p=Math.ceil(m*p)+2*A;n=Math.ceil(m*n)+2*A;k.setAttribute("width",p);k.setAttribute("height",n);var x=k.getContext("2d");null!=f&&(x.beginPath(),x.rect(0,0,p,n),x.fillStyle=f,x.fill());x.scale(m,m);if(H){var t=q.view,B=btoa(unescape(encodeURIComponent(t.createSvgGrid(t.gridColor)))),B="data:image/svg+xml;base64,"+B,u=q.gridSize*t.gridSteps*m,v=q.getGraphBounds(),D=v.x*m,y=v.y*m,z=new Image;z.src=B;z.onload=function(){for(var a=-Math.round(u-mxUtils.mod(t.translate.x*m-D,u)),b=-Math.round(u-mxUtils.mod(t.translate.y* +m-y,u));a<p;a+=u)for(var c=b;c<n;c+=u)x.drawImage(z,a/m,c/m);l()}}else l()}catch(ba){null!=e&&e(ba)}});d.onerror=function(a){null!=e&&e(a)};try{B&&this.editor.graph.addSvgShadow(c);var l=mxUtils.bind(this,function(){if(null!=this.editor.resolvedFontCss){var a=document.createElement("style");a.setAttribute("type","text/css");a.innerHTML=this.editor.resolvedFontCss;c.getElementsByTagName("defs")[0].appendChild(a)}this.convertMath(q,c,!0,mxUtils.bind(this,function(){d.src=this.createSvgDataUri(mxUtils.getXml(c))}))}); +this.loadFonts(l)}catch(L){null!=e&&e(L)}}),c,x)}catch(G){null!=e&&e(G)}};EditorUi.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var b=a.convert,c=this;a.convert=function(d){if(null!=d){var f="http://"==d.substring(0,7)||"https://"==d.substring(0,8);f&&!navigator.onLine?d=c.svgBrokenImage.src:!f||d.substring(0,a.baseUrl.length)==a.baseUrl||c.crossOriginImages&&c.editor.isCorsEnabledForUrl(d)?"chrome-extension://"!=d.substring(0,19)&&(d=b.apply(this,arguments)): d=PROXY_URL+"?url="+encodeURIComponent(d)}return d};return a};EditorUi.prototype.convertImages=function(a,b,c,d){null==d&&(d=this.createImageUrlConverter());var f=0,e=c||{};c=mxUtils.bind(this,function(c,g){for(var l=a.getElementsByTagName(c),k=0;k<l.length;k++)mxUtils.bind(this,function(c){try{if(null!=c){var l=d.convert(c.getAttribute(g));if(null!=l&&"data:"!=l.substring(0,5)){var k=e[l];null==k?(f++,this.convertImageToDataUri(l,function(d){null!=d&&(e[l]=d,c.setAttribute(g,d));f--;0==f&&b(a)})): -c.setAttribute(g,k)}else null!=l&&c.setAttribute(g,l)}}catch(J){}})(l[k])});c("image","xlink:href");c("img","src");0==f&&b(a)};EditorUi.prototype.loadUrl=function(a,b,c,d,e,g,k){try{var f=!k&&(d||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||/(\.gif)($|\?)/i.test(a));e=null!=e?e:!0;var l=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=b){var d=a.getText();if(f){if((9==document.documentMode||10==document.documentMode)&& -"undefined"!==typeof window.mxUtilsBinaryToArray){a=mxUtilsBinaryToArray(a.request.responseBody).toArray();for(var d=Array(a.length),e=0;e<a.length;e++)d[e]=String.fromCharCode(a[e]);d=d.join("")}g=null!=g?g:"data:image/png;base64,";d=g+this.base64Encode(d)}b(d)}}else null!=c&&c({message:mxResources.get("error")+" "+a.getStatus()},a)}),function(a){null!=c&&c({message:mxResources.get("error")+" "+a.getStatus()})},f,this.timeout,function(){e&&null!=c&&c({code:App.ERROR_TIMEOUT,retry:l})})});l()}catch(v){null!= -c&&c(v)}};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 f=new Image,e=this;this.crossOriginImages&& -(f.crossOrigin="anonymous");f.onload=function(){window.clearTimeout(d);if(c)try{var a=document.createElement("canvas"),g=a.getContext("2d");a.height=f.height;a.width=f.width;g.drawImage(f,0,0);b(a.toDataURL())}catch(C){b(e.svgBrokenImage.src)}};f.onerror=function(){window.clearTimeout(d);c&&b(e.svgBrokenImage.src)};f.src=a}}catch(A){b(this.svgBrokenImage.src)}};EditorUi.prototype.importXml=function(a,b,c,d,e){b=null!=b?b:0;c=null!=c?c:0;var f=[];try{var g=this.editor.graph;if(null!=a&&0<a.length){g.model.beginUpdate(); -try{var l=mxUtils.parseXml(a),k=this.editor.extractGraphModel(l.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]);else if(1<p.length){a={};var l=[],m=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(k=Editor.parseDiagramNode(p[0]),d=!1,m=1);for(;m<p.length;m++){var n=p[m].getAttribute("id");p[m].removeAttribute("id");var u=this.updatePageRoot(new DiagramPage(p[m])); -a[n]=p[m].getAttribute("id");var t=this.pages.length;null==u.getName()&&u.setName(mxResources.get("pageWithNumber",[t+1]));g.model.execute(new ChangePage(this,u,u,t,!0));l.push(u)}this.updatePageLinks(a,l)}}null!=k&&"mxGraphModel"===k.nodeName&&(f=g.importGraphModel(k,b,c,d))}finally{g.model.endUpdate()}}}catch(H){if(e)throw H;this.handleError(H)}return f};EditorUi.prototype.updatePageLinks=function(a,b){for(var c=0;c<b.length;c++)this.updatePageLinksForCell(a,b[c].root)};EditorUi.prototype.updatePageLinksForCell= +c.setAttribute(g,k)}else null!=l&&c.setAttribute(g,l)}}catch(I){}})(l[k])});c("image","xlink:href");c("img","src");0==f&&b(a)};EditorUi.prototype.loadUrl=function(a,b,c,d,e,g,k){try{var f=!k&&(d||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||/(\.gif)($|\?)/i.test(a));e=null!=e?e:!0;var l=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=b){var d=a.getText();if(f){if((9==document.documentMode||10==document.documentMode)&& +"undefined"!==typeof window.mxUtilsBinaryToArray){a=mxUtilsBinaryToArray(a.request.responseBody).toArray();for(var d=Array(a.length),e=0;e<a.length;e++)d[e]=String.fromCharCode(a[e]);d=d.join("")}g=null!=g?g:"data:image/png;base64,";d=g+this.base64Encode(d)}b(d)}}else null!=c&&c({message:mxResources.get("error")+" "+a.getStatus()},a)}),function(a){null!=c&&c({message:mxResources.get("error")+" "+a.getStatus()})},f,this.timeout,function(){e&&null!=c&&c({code:App.ERROR_TIMEOUT,retry:l})})});l()}catch(B){null!= +c&&c(B)}};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 f=new Image,e=this;this.crossOriginImages&& +(f.crossOrigin="anonymous");f.onload=function(){window.clearTimeout(d);if(c)try{var a=document.createElement("canvas"),g=a.getContext("2d");a.height=f.height;a.width=f.width;g.drawImage(f,0,0);b(a.toDataURL())}catch(C){b(e.svgBrokenImage.src)}};f.onerror=function(){window.clearTimeout(d);c&&b(e.svgBrokenImage.src)};f.src=a}}catch(z){b(this.svgBrokenImage.src)}};EditorUi.prototype.importXml=function(a,b,c,d,e){b=null!=b?b:0;c=null!=c?c:0;var f=[];try{var g=this.editor.graph;if(null!=a&&0<a.length){g.model.beginUpdate(); +try{var l=mxUtils.parseXml(a),k=this.editor.extractGraphModel(l.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]);else if(1<p.length){a={};var l=[],m=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(k=Editor.parseDiagramNode(p[0]),d=!1,m=1);for(;m<p.length;m++){var n=p[m].getAttribute("id");p[m].removeAttribute("id");var q=this.updatePageRoot(new DiagramPage(p[m])); +a[n]=p[m].getAttribute("id");var u=this.pages.length;null==q.getName()&&q.setName(mxResources.get("pageWithNumber",[u+1]));g.model.execute(new ChangePage(this,q,q,u,!0));l.push(q)}this.updatePageLinks(a,l)}}null!=k&&"mxGraphModel"===k.nodeName&&(f=g.importGraphModel(k,b,c,d))}finally{g.model.endUpdate()}}}catch(H){if(e)throw H;this.handleError(H)}return f};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,f=d.getLinkForCell(b);null!=f&&"data:page/id,"==f.substring(0,13)&&d.setLinkForCell(b,this.updatePageLink(a,f));if(d.isHtmlLabel(b)){c.innerHTML=d.getLabel(b);for(var e=c.getElementsByTagName("a"),g=!1,l=0;l<e.length;l++)f=e[l].getAttribute("href"),null!=f&&"data:page/id,"==f.substring(0,13)&&(e[l].setAttribute("href",this.updatePageLink(a,f)),g=!0);g&&d.labelChanged(b,c.innerHTML)}for(l=0;l<d.model.getChildCount(b);l++)this.updatePageLinksForCell(a, d.model.getChildAt(b,l))};EditorUi.prototype.updatePageLink=function(a,b){var c=a[b.substring(b.indexOf(",")+1)];return null!=c?"data:page/id,"+c:null};EditorUi.prototype.isRemoteVisioFormat=function(a){return/(\.v(sd|dx))($|\?)/i.test(a)||/(\.vs(s|x))($|\?)/i.test(a)};EditorUi.prototype.importVisio=function(a,b,c,d){d=null!=d?d:a.name;c=null!=c?c:mxUtils.bind(this,function(a){this.handleError(a)});var f=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var f=this.isRemoteVisioFormat(d); -try{var e="UNKNOWN-VISIO",g=d.lastIndexOf(".");0<=g&&g<d.length&&(e=d.substring(g+1).toUpperCase());EditorUi.logEvent({category:e+"-MS-IMPORT-FILE",action:"filename_"+d,label:f?"remote":"local"})}catch(v){}if(f)if(null!=VSD_CONVERT_URL){f=new FormData;f.append("file1",a,d);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{this.doImportVisio(l.response, -b,c,d)}catch(v){c(v)}else c({})});l.send(f)}else c({message:"conf"==this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else try{this.doImportVisio(a,b,c,d)}catch(v){c(v)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?f():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",f))};EditorUi.prototype.importGraphML=function(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(y){c(y)}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= +try{var e="UNKNOWN-VISIO",g=d.lastIndexOf(".");0<=g&&g<d.length&&(e=d.substring(g+1).toUpperCase());EditorUi.logEvent({category:e+"-MS-IMPORT-FILE",action:"filename_"+d,label:f?"remote":"local"})}catch(B){}if(f)if(null!=VSD_CONVERT_URL){f=new FormData;f.append("file1",a,d);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{this.doImportVisio(l.response, +b,c,d)}catch(B){c(B)}else c({})});l.send(f)}else c({message:"conf"==this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else try{this.doImportVisio(a,b,c,d)}catch(B){c(B)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?f():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",f))};EditorUi.prototype.importGraphML=function(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(v){c(v)}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(l){this.handleError(l)}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})}catch(y){}try{b(LucidImporter.importState(JSON.parse(a)))}catch(y){c(y)}}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): +function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter){try{EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+a.length})}catch(v){}try{b(LucidImporter.importState(JSON.parse(a)))}catch(v){c(v)}}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.insertAsPreText=function(a,b,c){var d=this.editor.graph,f=null;d.getModel().beginUpdate();try{f=d.insertVertex(null,null,"<pre>"+a+"</pre>",b,c,1,1,"text;html=1;align=center;verticalAlign=middle;"),d.updateCellSize(f,!0)}finally{d.getModel().endUpdate()}return f};EditorUi.prototype.insertTextAt=function(a,b,c,d,e,g,k){g=null!=g?g:!0;k=null!=k?k:!0;if(null!=a)if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a))this.parseFile(new Blob([a.replace(/\s+/g, " ")],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&this.editor.graph.setSelectionCells(this.insertTextAt(a.responseText,b,c,!0))}));else if("data:"==a.substring(0,5)||!this.isOffline()&&(e||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var f=this.editor.graph;if("data:image/png;base64,"==a.substring(0,22)){var l=this.extractGraphModelFromPng(a),p=this.importXml(l,b,c,g,!0);if(0<p.length)return p}if("data:image/svg+xml;"==a.substring(0, -19))try{if(l=null,"data:image/svg+xml;base64,"==a.substring(0,26)?(l=a.substring(a.indexOf(",")+1),l=window.atob&&!mxClient.IS_SF?atob(l):Base64.decode(l,!0)):l=decodeURIComponent(a.substring(a.indexOf(",")+1)),p=this.importXml(l,b,c,g,!0),0<p.length)return p}catch(B){}this.loadImage(a,mxUtils.bind(this,function(d){if("data:"==a.substring(0,5))this.resizeImage(d,a,mxUtils.bind(this,function(a,d,e){f.setSelectionCell(f.insertVertex(null,null,"",f.snap(b),f.snap(c),d,e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+ +19))try{if(l=null,"data:image/svg+xml;base64,"==a.substring(0,26)?(l=a.substring(a.indexOf(",")+1),l=window.atob&&!mxClient.IS_SF?atob(l):Base64.decode(l,!0)):l=decodeURIComponent(a.substring(a.indexOf(",")+1)),p=this.importXml(l,b,c,g,!0),0<p.length)return p}catch(x){}this.loadImage(a,mxUtils.bind(this,function(d){if("data:"==a.substring(0,5))this.resizeImage(d,a,mxUtils.bind(this,function(a,d,e){f.setSelectionCell(f.insertVertex(null,null,"",f.snap(b),f.snap(c),d,e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+ this.convertDataUri(a)+";"))}),k,this.maxImageSize);else{var e=Math.min(1,Math.min(this.maxImageSize/d.width,this.maxImageSize/d.height)),g=Math.round(d.width*e);d=Math.round(d.height*e);f.setSelectionCell(f.insertVertex(null,null,"",f.snap(b),f.snap(c),g,d,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";"))}}),mxUtils.bind(this,function(){var e=null;f.getModel().beginUpdate();try{e=f.insertVertex(f.getDefaultParent(), null,a,f.snap(b),f.snap(c),1,1,"text;"+(d?"html=1;":"")),f.updateCellSize(e),f.fireEvent(new mxEventObject("textInserted","cells",[e]))}finally{f.getModel().endUpdate()}f.setSelectionCell(e)}))}else{a=Graph.zapGremlins(mxUtils.trim(a));if(this.isCompatibleString(a))return this.importXml(a,b,c,g);if(0<a.length)if(this.isLucidChartData(a))this.convertLucidChart(a,mxUtils.bind(this,function(a){this.editor.graph.setSelectionCells(this.importXml(a,b,c,g))}),mxUtils.bind(this,function(a){this.handleError(a)})); else{f=this.editor.graph;e=null;f.getModel().beginUpdate();try{e=f.insertVertex(f.getDefaultParent(),null,"",f.snap(b),f.snap(c),1,1,"text;"+(d?"html=1;":"")),f.fireEvent(new mxEventObject("textInserted","cells",[e])),"<"==a.charAt(0)&&a.indexOf(">")==a.length-1&&(a=mxUtils.htmlEntities(a)),a.length>this.maxTextBytes&&(a=a.substring(0,this.maxTextBytes)+"..."),e.value=a,f.updateCellSize(e),/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“â€â€˜â€™]))/i.test(e.value)&& @@ -8667,114 +8681,113 @@ f.setLinkForCell(e,e.value),e.geometry.width+=f.gridSize,e.geometry.height+=f.gr 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 f=this.dialog,e=f.close;this.dialog.close=mxUtils.bind(this,function(a){Editor.useLocalStorage=d;e.apply(f,arguments);a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importFile= -function(a,b,c,d,e,g,k,m,n,v,B){v=null!=v?v:!0;var f=!1,l=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,v);null!=m&&m(b)});"image"==b.substring(0,5)?(n=!1,"image/png"==b.substring(0,9)&&(b=B?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(l=this.importXml(b,c,d,v),n=!0)),n||(l=this.editor.graph,b=a.indexOf(";"),0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1))),v&&l.isGridEnabled()&& +function(a,b,c,d,e,g,k,m,n,B,x){B=null!=B?B:!0;var f=!1,l=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,B);null!=m&&m(b)});"image"==b.substring(0,5)?(n=!1,"image/png"==b.substring(0,9)&&(b=x?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(l=this.importXml(b,c,d,B),n=!0)),n||(l=this.editor.graph,b=a.indexOf(";"),0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1))),B&&l.isGridEnabled()&& (c=l.snap(c),d=l.snap(d)),l=[l.insertVertex(null,null,"",c,d,e,g,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";")])):/(\.*<graphml )/.test(a)?(f=!0,this.importGraphML(a,p)):null!=n&&null!=k&&(/(\.v(dx|sdx?))($|\?)/i.test(k)||/(\.vs(x|sx?))($|\?)/i.test(k))?(f=!0,this.importVisio(n,p)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,k)?(f=!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!=m&&m(null))}),k)):/(\.v(sd|dx))($|\?)/i.test(k)||/(\.vs(s|x))($|\?)/i.test(k)||(l=this.insertTextAt(this.validateFileData(a),c,d,!0,null,v));f||null==m||m(l);return l};EditorUi.prototype.base64Encode=function(a){for(var b="",c=0,d=a.length,f,e,g;c<d;){f=a.charCodeAt(c++)&255;if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f& +mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?p(a.responseText):null!=m&&m(null))}),k)):/(\.v(sd|dx))($|\?)/i.test(k)||/(\.vs(s|x))($|\?)/i.test(k)||(l=this.insertTextAt(this.validateFileData(a),c,d,!0,null,B));f||null==m||m(l);return l};EditorUi.prototype.base64Encode=function(a){for(var b="",c=0,d=a.length,f,e,g;c<d;){f=a.charCodeAt(c++)&255;if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f& 3)<<4);b+="==";break}e=a.charCodeAt(c++);if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&3)<<4|(e&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&15)<<2);b+="=";break}g=a.charCodeAt(c++);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f& -3)<<4|(e&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&15)<<2|(g&192)>>6);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g&63)}return b};EditorUi.prototype.importFiles=function(a,b,c,d,e,g,k,m,n,v,B,t){b=null!=b?b:0;c=null!=c?c:0;d=null!=d?d:this.maxImageSize;v=null!=v?v:this.maxImageBytes;var f=null!=b&&null!=c,l=!0,p=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var q=B||this.resampleThreshold,u=0;u<a.length;u++)if("image/"==a[u].type.substring(0, -6)&&a[u].size>q){p=!0;break}var D=mxUtils.bind(this,function(){var p=this.editor.graph,n=p.gridSize;e=null!=e?e:mxUtils.bind(this,function(a,b,c,d,e,g,l,k,p){return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,l)),null):this.importFile(a,b,c,d,e,g,l,k,p,f,t)});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,u=q,x=[],D=mxUtils.bind(this,function(a, -b){x[a]=b;if(0==--u){this.spinner.stop();if(null!=m)m(x);else{var c=[];p.getModel().beginUpdate();try{for(var d=0;d<x.length;d++){var f=x[d]();null!=f&&(c=c.concat(f))}}finally{p.getModel().endUpdate()}}g(c)}}),y=0;y<q;y++)mxUtils.bind(this,function(f){var g=a[f];if(null!=g){var m=new FileReader;m.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 m=a.target.result,q=m.indexOf(","),u=decodeURIComponent(escape(atob(m.substring(q+ -1)))),x=mxUtils.parseXml(u),u=x.getElementsByTagName("svg");if(0<u.length){var u=u[0],y=t?null:u.getAttribute("content");null!=y&&"<"!=y.charAt(0)&&"%"!=y.charAt(0)&&(y=unescape(window.atob?atob(y):Base64.decode(y,!0)));null!=y&&"%"==y.charAt(0)&&(y=decodeURIComponent(y));null==y||"<mxfile "!==y.substring(0,8)&&"<mxGraphModel "!==y.substring(0,14)?D(f,mxUtils.bind(this,function(){try{if(m.substring(0,q+1),null!=x){var a=x.getElementsByTagName("svg");if(0<a.length){var l=a[0],k=parseFloat(l.getAttribute("width")), -v=parseFloat(l.getAttribute("height")),B=l.getAttribute("viewBox");if(null==B||0==B.length)l.setAttribute("viewBox","0 0 "+k+" "+v);else if(isNaN(k)||isNaN(v)){var u=B.split(" ");3<u.length&&(k=parseFloat(u[2]),v=parseFloat(u[3]))}m=this.createSvgDataUri(mxUtils.getXml(l));var t=Math.min(1,Math.min(d/Math.max(1,k)),d/Math.max(1,v)),D=e(m,g.type,b+f*n,c+f*n,Math.max(1,Math.round(k*t)),Math.max(1,Math.round(v*t)),g.name);if(isNaN(k)||isNaN(v)){var y=new Image;y.onload=mxUtils.bind(this,function(){k= -Math.max(1,y.width);v=Math.max(1,y.height);D[0].geometry.width=k;D[0].geometry.height=v;l.setAttribute("viewBox","0 0 "+k+" "+v);m=this.createSvgDataUri(mxUtils.getXml(l));var a=m.indexOf(";");0<a&&(m=m.substring(0,a)+m.substring(m.indexOf(",",a+1)));p.setCellStyles("image",m,[D[0]])});y.src=this.createSvgDataUri(mxUtils.getXml(l))}return D}}}catch(ga){}return null})):D(f,mxUtils.bind(this,function(){return e(y,"text/xml",b+f*n,c+f*n,0,0,g.name)}))}else D(f,mxUtils.bind(this,function(){return null}))}else{u= -!1;if("image/png"==g.type){var z=t?null:this.extractGraphModelFromPng(a.target.result);if(null!=z&&0<z.length){var E=new Image;E.src=a.target.result;D(f,mxUtils.bind(this,function(){return e(z,"text/xml",b+f*n,c+f*n,E.width,E.height,g.name)}));u=!0}}u||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))): -this.loadImage(a.target.result,mxUtils.bind(this,function(k){this.resizeImage(k,a.target.result,mxUtils.bind(this,function(k,p,m){D(f,mxUtils.bind(this,function(){if(null!=k&&k.length<v){var q=l&&this.isResampleImage(a.target.result,B)?Math.min(1,Math.min(d/p,d/m)):1;return e(k,g.type,b+f*n,c+f*n,Math.round(p*q),Math.round(m*q),g.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),l,d,B)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else e(a.target.result, -g.type,b+f*n,c+f*n,240,160,g.name,function(a){D(f,function(){return a})})});/(\.v(dx|sdx?))($|\?)/i.test(g.name)||/(\.vs(x|sx?))($|\?)/i.test(g.name)?e(null,g.type,b+f*n,c+f*n,240,160,g.name,function(a){D(f,function(){return a})},g):"image"==g.type.substring(0,5)?m.readAsDataURL(g):m.readAsText(g)}})(y)});if(p){p=[];for(u=0;u<a.length;u++)p.push(a[u]);a=p;this.confirmImageResize(function(a){l=a;D()},n)}else D()};EditorUi.prototype.confirmImageResize=function(a,b){b=null!=b?b:!1;var c=null!=this.spinner&& +3)<<4|(e&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&15)<<2|(g&192)>>6);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g&63)}return b};EditorUi.prototype.importFiles=function(a,b,c,d,e,g,k,m,n,B,x,q){b=null!=b?b:0;c=null!=c?c:0;d=null!=d?d:this.maxImageSize;B=null!=B?B:this.maxImageBytes;var f=null!=b&&null!=c,l=!0,p=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var t=x||this.resampleThreshold,u=0;u<a.length;u++)if("image/"==a[u].type.substring(0, +6)&&a[u].size>t){p=!0;break}var v=mxUtils.bind(this,function(){var p=this.editor.graph,n=p.gridSize;e=null!=e?e:mxUtils.bind(this,function(a,b,c,d,e,g,l,k,p){return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,l)),null):this.importFile(a,b,c,d,e,g,l,k,p,f,q)});g=null!=g?g:mxUtils.bind(this,function(a){p.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var t=a.length,u=t,A=[],v=mxUtils.bind(this,function(a, +b){A[a]=b;if(0==--u){this.spinner.stop();if(null!=m)m(A);else{var c=[];p.getModel().beginUpdate();try{for(var d=0;d<A.length;d++){var f=A[d]();null!=f&&(c=c.concat(f))}}finally{p.getModel().endUpdate()}}g(c)}}),D=0;D<t;D++)mxUtils.bind(this,function(f){var g=a[f];if(null!=g){var m=new FileReader;m.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 m=a.target.result,t=m.indexOf(","),u=decodeURIComponent(escape(atob(m.substring(t+ +1)))),A=mxUtils.parseXml(u),u=A.getElementsByTagName("svg");if(0<u.length){var u=u[0],D=q?null:u.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)?v(f,mxUtils.bind(this,function(){try{if(m.substring(0,t+1),null!=A){var a=A.getElementsByTagName("svg");if(0<a.length){var l=a[0],k=parseFloat(l.getAttribute("width")), +x=parseFloat(l.getAttribute("height")),B=l.getAttribute("viewBox");if(null==B||0==B.length)l.setAttribute("viewBox","0 0 "+k+" "+x);else if(isNaN(k)||isNaN(x)){var q=B.split(" ");3<q.length&&(k=parseFloat(q[2]),x=parseFloat(q[3]))}m=this.createSvgDataUri(mxUtils.getXml(l));var u=Math.min(1,Math.min(d/Math.max(1,k)),d/Math.max(1,x)),v=e(m,g.type,b+f*n,c+f*n,Math.max(1,Math.round(k*u)),Math.max(1,Math.round(x*u)),g.name);if(isNaN(k)||isNaN(x)){var D=new Image;D.onload=mxUtils.bind(this,function(){k= +Math.max(1,D.width);x=Math.max(1,D.height);v[0].geometry.width=k;v[0].geometry.height=x;l.setAttribute("viewBox","0 0 "+k+" "+x);m=this.createSvgDataUri(mxUtils.getXml(l));var a=m.indexOf(";");0<a&&(m=m.substring(0,a)+m.substring(m.indexOf(",",a+1)));p.setCellStyles("image",m,[v[0]])});D.src=this.createSvgDataUri(mxUtils.getXml(l))}return v}}}catch(ga){}return null})):v(f,mxUtils.bind(this,function(){return e(D,"text/xml",b+f*n,c+f*n,0,0,g.name)}))}else v(f,mxUtils.bind(this,function(){return null}))}else{u= +!1;if("image/png"==g.type){var z=q?null:this.extractGraphModelFromPng(a.target.result);if(null!=z&&0<z.length){var y=new Image;y.src=a.target.result;v(f,mxUtils.bind(this,function(){return e(z,"text/xml",b+f*n,c+f*n,y.width,y.height,g.name)}));u=!0}}u||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))): +this.loadImage(a.target.result,mxUtils.bind(this,function(k){this.resizeImage(k,a.target.result,mxUtils.bind(this,function(k,p,m){v(f,mxUtils.bind(this,function(){if(null!=k&&k.length<B){var t=l&&this.isResampleImage(a.target.result,x)?Math.min(1,Math.min(d/p,d/m)):1;return e(k,g.type,b+f*n,c+f*n,Math.round(p*t),Math.round(m*t),g.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),l,d,x)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else e(a.target.result, +g.type,b+f*n,c+f*n,240,160,g.name,function(a){v(f,function(){return a})})});/(\.v(dx|sdx?))($|\?)/i.test(g.name)||/(\.vs(x|sx?))($|\?)/i.test(g.name)?e(null,g.type,b+f*n,c+f*n,240,160,g.name,function(a){v(f,function(){return a})},g):"image"==g.type.substring(0,5)?m.readAsDataURL(g):m.readAsText(g)}})(D)});if(p){p=[];for(u=0;u<a.length;u++)p.push(a[u]);a=p;this.confirmImageResize(function(a){l=a;v()},n)}else v()};EditorUi.prototype.confirmImageResize=function(a,b){b=null!=b?b:!1;var c=null!=this.spinner&& null!=this.spinner.pause?this.spinner.pause():function(){},d=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,f=function(d,f){if(d||b)mxSettings.setResizeImages(d?f:null),mxSettings.save();c();a(f)};null==d||b?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(a){f(a,!0)},function(a){f(a,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+ -Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,!0,!0):f(!1,d)};EditorUi.prototype.parseFile=function(a,b,c){c=null!=c?c:a.name;var d=new FormData;d.append("format","xml");d.append("upfile",a,c);var f=new XMLHttpRequest;f.open("POST",OPEN_URL);f.onreadystatechange=function(){b(f)};f.send(d);try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+a.size})}catch(q){}};EditorUi.prototype.isResampleImage=function(a, -b){b=null!=b?b:this.resampleThreshold;return a.length>b};EditorUi.prototype.resizeImage=function(a,b,c,d,e,g){e=null!=e?e:this.maxImageSize;var f=Math.max(1,a.width),k=Math.max(1,a.height);if(d&&this.isResampleImage(b,g))try{var l=Math.max(f/e,k/e);if(1<l){var p=Math.round(f/l),m=Math.round(k/l),n=document.createElement("canvas");n.width=p;n.height=m;n.getContext("2d").drawImage(a,0,0,p,m);var q=n.toDataURL();if(q.length<b.length){var u=document.createElement("canvas");u.width=p;u.height=m;var t= -u.toDataURL();q!==t&&(b=q,f=p,k=m)}}}catch(F){}c(b,f,k)};EditorUi.prototype.crcTable=[];for(var d=0;256>d;d++)for(var g=d,e=0;8>e;e++)g=1==(g&1)?3988292384^g>>>1:g>>>1,EditorUi.prototype.crcTable[d]=g;EditorUi.prototype.updateCRC=function(a,b,c,d){for(var f=0;f<d;f++)a=EditorUi.prototype.crcTable[(a^b.charCodeAt(c+f))&255]^a>>>8;return a};EditorUi.prototype.crc32=function(a){this.crcTable=this.crcTable||this.createCrcTable();for(var b=-1,c=0;c<a.length;c++)b=b>>>8^this.crcTable[(b^a.charCodeAt(c))& +Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,!0,!0):f(!1,d)};EditorUi.prototype.parseFile=function(a,b,c){c=null!=c?c:a.name;var d=new FormData;d.append("format","xml");d.append("upfile",a,c);var f=new XMLHttpRequest;f.open("POST",OPEN_URL);f.onreadystatechange=function(){b(f)};f.send(d);try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+a.size})}catch(t){}};EditorUi.prototype.isResampleImage=function(a, +b){b=null!=b?b:this.resampleThreshold;return a.length>b};EditorUi.prototype.resizeImage=function(a,b,c,d,e,g){e=null!=e?e:this.maxImageSize;var f=Math.max(1,a.width),k=Math.max(1,a.height);if(d&&this.isResampleImage(b,g))try{var l=Math.max(f/e,k/e);if(1<l){var p=Math.round(f/l),m=Math.round(k/l),n=document.createElement("canvas");n.width=p;n.height=m;n.getContext("2d").drawImage(a,0,0,p,m);var t=n.toDataURL();if(t.length<b.length){var q=document.createElement("canvas");q.width=p;q.height=m;var u= +q.toDataURL();t!==u&&(b=t,f=p,k=m)}}}catch(F){}c(b,f,k)};EditorUi.prototype.crcTable=[];for(var d=0;256>d;d++)for(var g=d,e=0;8>e;e++)g=1==(g&1)?3988292384^g>>>1:g>>>1,EditorUi.prototype.crcTable[d]=g;EditorUi.prototype.updateCRC=function(a,b,c,d){for(var f=0;f<d;f++)a=EditorUi.prototype.crcTable[(a^b.charCodeAt(c+f))&255]^a>>>8;return a};EditorUi.prototype.crc32=function(a){this.crcTable=this.crcTable||this.createCrcTable();for(var b=-1,c=0;c<a.length;c++)b=b>>>8^this.crcTable[(b^a.charCodeAt(c))& 255];return(b^-1)>>>0};EditorUi.prototype.writeGraphModelToPng=function(a,b,c,d,e){function f(a,b){var c=l;l+=b;return a.substring(c,l)}function g(a){a=f(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function k(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var l=0;if(f(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=e&&e();else if(f(a, -4),"IHDR"!=f(a,4))null!=e&&e();else{f(a,17);e=a.substring(0,l);do{var p=g(a);if("IDAT"==f(a,4)){e=a.substring(0,l-8);c=c+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+d;d=4294967295;d=this.updateCRC(d,b,0,4);d=this.updateCRC(d,c,0,c.length);e+=k(c.length)+b+c+k(d^4294967295);e+=a.substring(l-8,a.length);break}e+=a.substring(l-8,l-4+p);f(a,p);f(a,4)}while(p);return"data:image/png;base64,"+(window.btoa?btoa(e):Base64.encode(e,!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(){b(d)};null!=c&&(d.onerror=c);d.src=a}catch(y){if(null!=c)c(y);else throw y;}};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.getLinkTitle=function(b){return a.getLinkTitle(b)};b.customLinkClicked=function(b){var c= -!1;try{a.handleCustomLink(b),c=!0}catch(E){a.handleError(E)}return c};var c=this.clearDefaultStyle;this.clearDefaultStyle=function(){c.apply(this,arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://desk.draw.io/support/solutions/articles/16000051979");var d=a.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(b){b=null!=b?b:"";if(null!=a.pages&&null!=a.currentPage)for(var c=0;c<a.pages.length;c++)if(a.pages[c]==a.currentPage){0< -c&&(b+=(0<b.length?"&":"?")+"page="+c);break}"1"==urlParams.dev&&(b+=(0<b.length?"&":"?")+"dev=1&drawdev=1");return d.apply(this,arguments)};var e=b.addClickHandler;b.addClickHandler=function(a,c,d){var f=c;c=function(a,c){if(null==c){var d=mxEvent.getSource(a);"a"==d.nodeName.toLowerCase()&&(c=d.getAttribute("href"))}null!=c&&b.isCustomLink(c)&&(mxEvent.isTouchEvent(a)||!mxEvent.isPopupTrigger(a))&&b.customLinkClicked(c)&&mxEvent.consume(a);null!=f&&f(a,c)};e.call(this,a,c,d)};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?420:360,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var g=b.getGlobalVariable;b.getGlobalVariable=function(b){return"page"==b&&null!=a.currentPage?a.currentPage.getName():"pagenumber"==b?null!=a.currentPage&&null!=a.pages?mxUtils.indexOf(a.pages,a.currentPage)+1:1:g.apply(this, -arguments)};var m=b.labelLinkClicked;b.labelLinkClicked=function(a,c,d){var f=c.getAttribute("href");if(null==f||!b.isCustomLink(f)||!mxEvent.isTouchEvent(d)&&mxEvent.isPopupTrigger(d))m.apply(this,arguments);else{if(!b.isEnabled()||null!=a&&b.isCellLocked(a.cell))b.customLinkClicked(f),b.getRubberband().reset();mxEvent.consume(d)}};this.editor.getOrCreateFilename=function(){var b=a.defaultFilename,c=a.getCurrentFile();null!=c&&(b=null!=c.getTitle()?c.getTitle():b);return b};var n=this.actions.get("print"); -n.setEnabled(!mxClient.IS_IOS||!navigator.standalone);n.visible=n.isEnabled();if(!this.editor.chromeless||this.editor.editable){var t=function(){window.setTimeout(function(){v.innerHTML=" ";v.focus();document.execCommand("selectAll",!1,null)},0)};this.keyHandler.bindAction(70,!0,"find");this.keyHandler.bindAction(67,!0,"copyStyle",!0);this.keyHandler.bindAction(86,!0,"pasteStyle",!0);this.keyHandler.bindAction(77,!0,"editGeometry",!0);this.keyHandler.bindAction(88,!0,"insertText",!0);this.keyHandler.bindAction(75, -!0,"insertRectangle");this.keyHandler.bindAction(75,!0,"insertEllipse",!0);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(this.altShiftActions[83]="synchronize");mxClient.IS_IE||b.container.addEventListener("paste",mxUtils.bind(this,function(a){var b=this.editor.graph;if(!mxEvent.isConsumed(a))try{for(var c=a.clipboardData||a.originalEvent.clipboardData,d=!1,f=0;f<c.types.length;f++)if("text/"===c.types[f].substring(0,5)){d=!0;break}if(!d){var e=c.items;for(index in e){var g=e[index];if("file"=== -g.kind){if(b.isEditing())this.importFiles([g.getAsFile()],0,0,this.maxImageSize,function(a,c,d,f,e,g){b.insertImage(a,e,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(a)}break}}}}catch(L){}}),!1);var v=document.createElement("div");v.setAttribute("autocomplete","off");v.setAttribute("autocorrect","off");v.setAttribute("autocapitalize", -"off");v.setAttribute("spellcheck","false");v.style.position="absolute";v.style.whiteSpace="nowrap";v.style.overflow="hidden";v.style.display="block";v.contentEditable=!0;mxUtils.setOpacity(v,0);v.style.width="1px";v.style.height="1px";v.innerHTML=" ";var B=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(a){var c=mxEvent.getSource(a);null==b.container|| -!b.isEnabled()||b.isMouseDown||b.isEditing()||null!=this.dialog||"INPUT"==c.nodeName||"TEXTAREA"==c.nodeName||!(224==a.keyCode||!mxClient.IS_MAC&&17==a.keyCode||mxClient.IS_MAC&&91==a.keyCode)||B||(v.style.left=b.container.scrollLeft+10+"px",v.style.top=b.container.scrollTop+10+"px",b.container.appendChild(v),B=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){v.focus();document.execCommand("selectAll",!1,null)},0):(v.focus(),document.execCommand("selectAll",!1,null)))}));mxEvent.addListener(document, -"keyup",mxUtils.bind(this,function(a){var c=a.keyCode;window.setTimeout(mxUtils.bind(this,function(){!B||224!=c&&17!=c&&91!=c||(B=!1,b.isEditing()||null!=this.dialog||null==b.container||b.container.focus(),v.parentNode.removeChild(v),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(v,"copy",mxUtils.bind(this,function(a){if(b.isEnabled())try{mxClipboard.copy(b),this.copyCells(v),t()}catch(G){this.handleError(G)}}));mxEvent.addListener(v,"cut",mxUtils.bind(this,function(a){if(b.isEnabled())try{mxClipboard.copy(b), -this.copyCells(v,!0),t()}catch(G){this.handleError(G)}}));mxEvent.addListener(v,"paste",mxUtils.bind(this,function(a){b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(v.innerHTML=" ",v.focus(),window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,v);v.innerHTML=" "}),0))}),!0);var D=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==v?!0:D.apply(this,arguments)}}this.spinner=this.createSpinner(document.body.clientWidth/2-2,Math.max(document.body.clientHeight|| -0,document.documentElement.clientHeight||0)/2,24);Graph.fileSupport&&this.editor.graph.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(a){var b=this.editor.graph,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,f,e,g){b.insertImage(a,e,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 f=this.maxImageSize,f=Math.min(1,Math.min(f/Math.max(1,d)),f/Math.max(1,a));b.insertImage(decodeURIComponent(c),d*f,a*f)})):document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(a.dataTransfer.types, -"text/plain")&&document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"));a.stopPropagation();a.preventDefault()})))}));if("1"==urlParams.ruler&&"undefined"!==typeof mxRuler){n=document.createElement("div");n.style.position="absolute";n.style.top="95px";n.style.left="250px";n.style.width="2000px";n.style.height="30px";n.style.background="whiteSmoke";document.body.appendChild(n);var x=document.createElement("div");x.style.position="absolute";x.style.top="125px";x.style.left="220px"; -x.style.width="30px";x.style.height="1000px";x.style.background="whiteSmoke";document.body.appendChild(x);var J=document.createElement("div");J.style.position="absolute";J.style.top="95px";J.style.left="220px";J.style.width="30px";J.style.height="30px";J.style.background="whiteSmoke";document.body.appendChild(J);this.vRuler=new mxRuler(this.editor.graph,x,!0);this.hRuler=new mxRuler(this.editor.graph,n,!1)}if("1"==urlParams.styledev){n=document.getElementById("geFooter");null!=n&&(this.styleInput= -document.createElement("input"),this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),n.appendChild(this.styleInput), -this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){if(0<this.editor.graph.getSelectionCount()){var c=this.editor.graph.getSelectionCell(),c=this.editor.graph.getModel().getStyle(c);this.styleInput.value=c||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var H=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:H.apply(this,arguments)}}n=document.getElementById("geInfo"); -null!=n&&n.parentNode.removeChild(n);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var 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,f=b.view.scale,e=c.x/f-d.x,g=c.y/f-d.y;mxEvent.isAltDown(a)&&(g=e=0);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,e,g,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a));else{var k= -0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):null,c=this.extractGraphModelFromEvent(a,null!=this.pages);if(null!=c)b.setSelectionCells(this.importXml(c,e,g,!0));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")){var l=a.dataTransfer.getData("text/html"),c=document.createElement("div");c.innerHTML=l;var m=null,d=c.getElementsByTagName("img");null!=d&&1==d.length?(l=d[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(l)||(m= -!0)):(c=c.getElementsByTagName("a"),null!=c&&1==c.length&&(l=c[0].getAttribute("href")));var p=!0,n=mxUtils.bind(this,function(){b.setSelectionCells(this.insertTextAt(l,e,g,!0,m,null,p))});m&&l.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,"",e,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,e,g,!0))})):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&b.setSelectionCells(this.insertTextAt(a.dataTransfer.getData("text/plain"),e,g,!0))}}a.stopPropagation();a.preventDefault()}),!1)}this.initPages(); -this.editUpdateListener=mxUtils.bind(this,function(a,b){var c=b.getProperty("edit");null!=c&&this.updateEditReferences(c)});this.editor.undoManager.addListener(mxEvent.BEFORE_UNDO,this.editUpdateListener);this.editor.undoManager.addListener(mxEvent.BEFORE_REDO,this.editUpdateListener);"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.getLinkTitle=function(a){var b=Graph.prototype.getLinkTitle.apply(this,arguments);if("data:page/id,"==a.substring(0,13)){var c= -a.indexOf(",");0<c&&(b=this.getPageById(a.substring(c+1)),b=null!=b?b.getName():mxResources.get("pageNotFound"))}else"data:"==a.substring(0,5)&&(b=mxResources.get("action"));return b};EditorUi.prototype.handleCustomLink=function(a){if("data:page/id,"==a.substring(0,13)){var b=a.indexOf(",");if(a=this.getPageById(a.substring(b+1)))this.selectPage(a);else throw Error(mxResources.get("pageNotFound")||"Page not found");}else this.editor.graph.handleCustomLink(a)};EditorUi.prototype.isSettingsEnabled= -function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){ColorDialog.recentColors=mxSettings.getRecentColors();this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(a,b){mxSettings.setCustomFonts(this.menus.customFonts);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();this.addListener("gridColorChanged",mxUtils.bind(this,function(a,b){mxSettings.setGridColor(this.editor.graph.view.gridColor);mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(a,b){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&this.sidebar.showPalette("search",mxSettings.settings.search); -this.editor.chromeless&&!this.editor.editable||null==this.sidebar||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save());this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyCells=function(a,b){var c=this.editor.graph;if(c.isSelectionEmpty())a.innerHTML="";else{var d=mxUtils.sortCells(c.model.getTopmostCells(c.getSelectionCells())),f=mxUtils.getXml(this.editor.graph.encodeCells(d)); -mxUtils.setTextContent(a,encodeURIComponent(f));b?(c.removeCells(d,!1),c.lastPasteXml=null):(c.lastPasteXml=f,c.pasteCounter=0);a.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.pasteCells=function(a,b){if(!mxEvent.isConsumed(a)){var c=b.getElementsByTagName("span");if(null!=c&&0<c.length&&"application/vnd.lucid.chart.objects"===c[0].getAttribute("data-lucid-type")){var d=c[0].getAttribute("data-lucid-content");null!=d&&0<d.length&&(this.convertLucidChart(d,mxUtils.bind(this, -function(a){var b=this.editor.graph;b.setSelectionCells(this.importXml(a,0,0));b.scrollCellToVisible(b.getSelectionCell())}),mxUtils.bind(this,function(a){this.handleError(a)})),mxEvent.consume(a))}else{var d=this.editor.graph,f=mxUtils.trim(mxClient.IS_QUIRKS||8==document.documentMode?mxUtils.getTextContent(b):b.textContent),e=!1;try{var g=f.lastIndexOf("%3E");0<=g&&g<f.length-3&&(f=f.substring(0,g+3))}catch(C){}try{var c=b.getElementsByTagName("span"),k=null!=c&&0<c.length?mxUtils.trim(decodeURIComponent(c[0].textContent)): -decodeURIComponent(f);this.isCompatibleString(k)&&(e=!0,f=k)}catch(C){}d.lastPasteXml==f?d.pasteCounter++:(d.lastPasteXml=f,d.pasteCounter=0);c=d.pasteCounter*d.gridSize;if(null!=f&&0<f.length&&(e||this.isCompatibleString(f)?d.setSelectionCells(this.importXml(f,c,c)):(e=d.getInsertPoint(),d.isMouseInsertPoint()&&(c=0,d.lastPasteXml==f&&0<d.pasteCounter&&d.pasteCounter--),d.setSelectionCells(this.insertTextAt(f,e.x+c,e.y+c,!0))),!d.isSelectionEmpty())){d.scrollCellToVisible(d.getSelectionCell());null!= -this.hoverIcons&&this.hoverIcons.update(d.view.getState(d.getSelectionCell()));try{mxEvent.consume(a)}catch(C){}}}}};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,f;if(null==a){f=document.body;var e=document.documentElement;d=(f.clientWidth||e.clientWidth)-3;f=Math.max(f.clientHeight||0,e.clientHeight)-3}else b=a.offsetTop,c=a.offsetLeft,d=a.clientWidth, -f=a.clientHeight;e=document.createElement("div");e.style.zIndex=mxPopupMenu.prototype.zIndex+2;e.style.border="3px dotted rgb(254, 137, 12)";e.style.pointerEvents="none";e.style.position="absolute";e.style.top=b+"px";e.style.left=c+"px";e.style.width=Math.max(0,d-3)+"px";e.style.height=Math.max(0,f-3)+"px";null!=a&&a.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(e):document.body.appendChild(e);return e};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,f=a.name;if(null!= -f&&0<f.length){!this.useCanvasForExport&&/(\.png)$/i.test(f)&&(f=f.substring(0,f.length-4)+".drawio");var e=mxUtils.bind(this,function(a){f=0<=f.lastIndexOf(".")?f.substring(0,f.lastIndexOf("."))+".drawio":f+".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,f))}catch(B){this.handleError(B,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(a, -f,b)});if(/(\.v(dx|sdx?))($|\?)/i.test(f)||/(\.vs(x|sx?))($|\?)/i.test(f))this.importVisio(a,mxUtils.bind(this,function(a){this.spinner.stop();e(a)}));else if(/(\.*<graphml )/.test(d))this.importGraphML(d,mxUtils.bind(this,function(a){this.spinner.stop();e(a)}));else if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,f))this.parseFile(a,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?e(a.responseText):this.handleError({message:mxResources.get(413== -a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(d))/(\.json)$/i.test(f)&&(f=f.substring(0,f.length-5)+".drawio"),this.convertLucidChart(d,mxUtils.bind(this,function(a){this.spinner.stop();this.openLocalFile(a,f,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(v){this.handleError(v,mxResources.get("errorLoadingFile"))}}else"image/png"==a.type.substring(0,9)&&(d=this.extractGraphModelFromPng(d)),this.spinner.stop(),this.openLocalFile(d,f,b)}}catch(v){this.handleError(v)}});c.onerror=mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a);window.openFile=null});"image"===a.type.substring(0,5)&&"image/svg"!==a.type.substring(0,9)?c.readAsDataURL(a): -c.readAsText(a)})(a[c])};EditorUi.prototype.openLocalFile=function(a,b,c){var d=this.getCurrentFile(),f=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)?f(): -(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&null!=d&&d.isModified()?this.confirm(mxResources.get("allChangesLost"),null,f,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(a,b),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=d&&d.isModified()?this.confirm(mxResources.get("allChangesLost"),null,f,mxResources.get("cancel"),mxResources.get("discardChanges")):f()})));else throw Error(mxResources.get("notADiagramFile")); -};EditorUi.prototype.getBasenames=function(){var 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,f=d.getCellStyle(a); -c(mxStencilRegistry.getBasenameForStencil(f[mxConstants.STYLE_SHAPE]));d.model.isEdge(a)&&(c(mxMarker.getPackageForType(f[mxConstants.STYLE_STARTARROW])),c(mxMarker.getPackageForType(f[mxConstants.STYLE_ENDARROW])));for(var f=d.model.getChildCount(a),e=0;e<f;e++)this.addBasenamesForCell(d.model.getChildAt(a,e),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.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?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))}; -EditorUi.prototype.getPublicUrl=function(a,b){null!=a?a.getPublicUrl(b):b(null)};EditorUi.prototype.createLoadMessage=function(a){var b=this.editor.graph;return{event:a,pageVisible:b.pageVisible,translate:b.view.translate,bounds:b.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:b.view.scale,page:b.view.getBackgroundPageBounds()}};EditorUi.prototype.installMessageHandler=function(a){var b=null,c=!1,d=!1,f=null,e=mxUtils.bind(this,function(a,b){this.editor.modified&&"0"!=urlParams.modified? -null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,e);mxEvent.addListener(window,"message",mxUtils.bind(this,function(e){if(e.source==(window.opener||window.parent)){var k=e.data,l=mxUtils.bind(this,function(a){if(null!=a&&"function"===typeof a.charAt&&"<"!=a.charAt(0))try{"data:image/png;base64,"==a.substring(0,22)?a=this.extractGraphModelFromPng(a):"data:image/svg+xml;base64,"== -a.substring(0,26)?a=atob(a.substring(26)):"data:image/svg+xml;utf8,"==a.substring(0,24)&&(a=a.substring(24)),null!=a&&("%"==a.charAt(0)?a=decodeURIComponent(a):"<"!=a.charAt(0)&&(a=Graph.decompress(a)))}catch(R){}return a});if("json"==urlParams.proto){try{k=JSON.parse(k)}catch(N){k=null}if(null==k)return;if("dialog"==k.action){this.showError(null!=k.titleKey?mxResources.get(k.titleKey):k.title,null!=k.messageKey?mxResources.get(k.messageKey):k.message,null!=k.buttonKey?mxResources.get(k.buttonKey): -k.button);null!=k.modified&&(this.editor.modified=k.modified);return}if("prompt"==k.action){this.spinner.stop();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 m=l(k.xml);this.spinner.stop();l=new DraftDialog(this,mxResources.get("draftFound", -[k.name||this.defaultFilename]),m,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(N){g.postMessage(JSON.stringify({event:"draft",error:N.toString(),message:k}),"*")}return}if("template"==k.action){this.spinner.stop();var l=1==k.enableRecent,m=1==k.enableSearch,n=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,e,b!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,l?mxUtils.bind(this,function(a){this.remoteInvoke("getRecentDiagrams",null,null,a,function(){a(null,"Network Error!")})}):null,m?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,n?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){l=this.getDiagramTextContent();g.postMessage(JSON.stringify({event:"textContent",data:l,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 p=null!=k.messageKey?mxResources.get(k.messageKey):k.message;null==k.show||k.show?this.spinner.spin(document.body,p):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 q=null!=k.xml? -k.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var t=this.editor.graph,u=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(q);g.postMessage(JSON.stringify(b),"*")}),y=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);"xmlpng"==k.format&&(a=this.writeGraphModelToPng(a,"tEXt","mxfile",encodeURIComponent(q)));t!=this.editor.graph&&t.container.parentNode.removeChild(t.container); -u(a)});if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage!=this.pages[0]){var t=this.createTemporaryGraph(t.getStylesheet()),z=t.getGlobalVariable,E=this.pages[0];t.getGlobalVariable=function(a){return"page"==a?E.getName():"pagenumber"==a?1:z.apply(this,arguments)};document.body.appendChild(t.container);t.model.setRoot(E.root)}this.exportToCanvas(mxUtils.bind(this,function(a){y(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,function(){y(null)}),null,null,k.scale,null, -null,null,t)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==k.format?"1":"0")+(null!=k.scale?"&scale="+k.scale:"")+"&base64=1&xml="+encodeURIComponent(encodeURIComponent(q)))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?u("data:image/png;base64,"+a.getText()):y(null)}),mxUtils.bind(this,function(){y(null)}))}}else{null!=k.xml&&0<k.xml.length&&this.setFileData(k.xml);p=this.createLoadMessage("export");if("html2"==k.format||"html"==k.format&&("0"!=urlParams.pages|| -null!=this.pages&&1<this.pages.length))l=this.getXmlFileData(),p.xml=mxUtils.getXml(l),p.data=this.getFileData(null,null,!0,null,null,null,l),p.format=k.format;else if("html"==k.format)q=this.editor.getGraphXml(),p.data=this.getHtml(q,this.editor.graph),p.xml=mxUtils.getXml(q),p.format=k.format;else{mxSvgCanvas2D.prototype.foAltText=null;l=this.editor.graph.background;l==mxConstants.NONE&&(l=null);p.xml=this.getFileData(!0);p.format="svg";if(k.embedImages||null==k.embedImages){if(null==k.spin&&null== -k.spinKey||this.spinner.spin(document.body,null!=k.spinKey?mxResources.get(k.spinKey):k.spin))this.editor.graph.setEnabled(!1),"xmlsvg"==k.format?this.getEmbeddedSvg(p.xml,this.editor.graph,null,!0,mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();p.data=this.createSvgDataUri(a);g.postMessage(JSON.stringify(p),"*")})):this.convertImages(this.editor.graph.getSvg(l),mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();p.data=this.createSvgDataUri(mxUtils.getXml(a)); -g.postMessage(JSON.stringify(p),"*")}));return}l="xmlsvg"==k.format?this.getEmbeddedSvg(this.getFileData(!0),this.editor.graph,null,!0):mxUtils.getXml(this.editor.graph.getSvg(l));p.data=this.createSvgDataUri(l)}g.postMessage(JSON.stringify(p),"*")}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&& -(m=document.createElement("span"),mxUtils.write(m,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(m),this.embedFilenameSpan=m),k=null!=k.xmlpng?this.extractGraphModelFromPng(k.xmlpng): -k.xml;else{"remoteInvokeReady"==k.action?this.handleRemoteInvokeReady(g):"remoteInvoke"==k.action?this.handleRemoteInvoke(k):"remoteInvokeResponse"==k.action?this.handleRemoteInvokeResponse(k):g.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(k)}),"*");return}}var A=mxUtils.bind(this,function(e,k){c=!0;try{a(e,k)}catch(T){this.handleError(T)}c=!1;null!=urlParams.modified&&this.editor.setStatus("");var l=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&& -1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});f=l();d&&null==b&&(b=mxUtils.bind(this,function(a,b){var d=l();if(d!=f&&!c){var e=this.createLoadMessage("autosave");e.xml=d;d=JSON.stringify(e);(window.opener||window.parent).postMessage(d,"*")}f=d}),this.editor.graph.model.addListener(mxEvent.CHANGE,b),this.editor.graph.addListener("gridSizeChanged",b),this.editor.graph.addListener("shadowVisibleChanged",b),this.addListener("pageFormatChanged",b),this.addListener("pageScaleChanged", -b),this.addListener("backgroundColorChanged",b),this.addListener("backgroundImageChanged",b),this.addListener("foldingEnabledChanged",b),this.addListener("mathEnabledChanged",b),this.addListener("gridEnabledChanged",b),this.addListener("guidesEnabledChanged",b),this.addListener("pageViewChanged",b));"1"!=urlParams.returnbounds&&"json"!=urlParams.proto||g.postMessage(JSON.stringify(this.createLoadMessage("load")),"*")});null!=k&&"function"===typeof k.substring&&"data:application/vnd.visio;base64,"== -k.substring(0,34)?(l="0M8R4KGxGuE"==k.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(k.substring(k.indexOf(",")+1)),function(a){A(a,e)},mxUtils.bind(this,function(a){this.handleError(a)}),l)):null!=k&&"function"===typeof k.substring&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(k,"")?this.parseFile(new Blob([k],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&"<mxGraphModel"==a.responseText.substring(0, -13)&&A(a.responseText,e)}),""):null!=k&&"function"===typeof k.substring&&this.isLucidChartData(k)?this.convertLucidChart(k,mxUtils.bind(this,function(a){A(a)}),mxUtils.bind(this,function(a){this.handleError(a)})):(k=l(k),A(k,e))}}));var g=window.opener||window.parent,e="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";g.postMessage(e,"*")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar){var a=document.createElement("div");a.style.display="inline-block"; -a.style.position="absolute";a.style.paddingTop="atlas"==uiTheme?"2px":"3px";a.style.paddingLeft="8px";a.style.paddingBottom="2px";var b=document.createElement("button");b.className="geBigButton";b.style.fontSize="12px";b.style.padding="4px 6px 4px 6px";b.style.borderRadius="3px";"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.style.fontSize="12px",b.style.marginLeft="6px",b.style.padding="4px",b.style.cursor="pointer", -mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b)));b=document.createElement("a");mxUtils.write(b,mxResources.get("exit"));b.setAttribute("title",mxResources.get("exit"));b.style.fontSize="12px";b.style.marginLeft="6px";b.style.marginRight="20px";b.style.padding="4px";b.style.cursor="pointer";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()}));a.appendChild(b);this.toolbar.container.appendChild(a); -this.toolbar.staticElements.push(a);a.style.right="atlas"!=uiTheme?"52px":"42px"}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(a){this.importCsv(a)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.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,l=null,m=null,n=null, -t=null,x=null,J=null,H=null,F="",I="auto",G="auto",E=null,K=null,N=40,R=40,X=100,T=0,L=this.editor.graph;L.getGraphBounds();for(var W=function(){null!=b?b(la):(L.setSelectionCells(la),L.scrollCellToVisible(L.getSelectionCell()))},Z=L.getFreeInsertPoint(),ha=Z.x,fa=Z.y,Z=fa,da=null,V="auto",H=null,ba=[],Q=null,aa=null,Y=0;Y<c.length&&"#"==c[Y].charAt(0);){a=c[Y];for(Y++;Y<c.length&&"\\"==a.charAt(a.length-1)&&"#"==c[Y].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(c[Y].substring(1)),Y++;if("#"!= -a.charAt(1)){var ea=a.indexOf(":");if(0<ea){var P=mxUtils.trim(a.substring(1,ea)),M=mxUtils.trim(a.substring(ea+1));"label"==P?da=L.sanitizeHtml(M):"labelname"==P&&0<M.length&&"-"!=M?n=M:"labels"==P&&0<M.length&&"-"!=M?t=JSON.parse(M):"style"==P?k=M:"parentstyle"==P?x=M:"stylename"==P&&0<M.length&&"-"!=M?m=M:"styles"==P&&0<M.length&&"-"!=M?l=JSON.parse(M):"identity"==P&&0<M.length&&"-"!=M?J=M:"parent"==P&&0<M.length&&"-"!=M?H=M:"namespace"==P&&0<M.length&&"-"!=M?F=M:"width"==P?I=M:"height"==P?G=M: -"left"==P&&0<M.length?E=M:"top"==P&&0<M.length?K=M:"ignore"==P?aa=M.split(","):"connect"==P?ba.push(JSON.parse(M)):"link"==P?Q=M:"padding"==P?T=parseFloat(M):"edgespacing"==P?N=parseFloat(M):"nodespacing"==P?R=parseFloat(M):"levelspacing"==P?X=parseFloat(M):"layout"==P&&(V=M)}}}if(null==c[Y])throw Error(mxResources.get("invalidOrMissingFile"));var ca=this.editor.csvToArray(c[Y]),P=ea=null;if(null!=J||null!=H)for(var S=0;S<ca.length;S++)J==ca[S]&&(ea=S),H==ca[S]&&(P=S);null==da&&(da="%"+ca[0]+"%"); -if(null!=ba)for(var U=0;U<ba.length;U++)null==g[ba[U].to]&&(g[ba[U].to]={});L.model.beginUpdate();try{for(S=Y+1;S<c.length;S++){var ja=this.editor.csvToArray(c[S]);if(null==ja){var ka=40<c[S].length?c[S].substring(0,40)+"...":c[S];throw Error(S+" ("+ka+") "+mxResources.get("containsValidationErrors"));}if(ja.length==ca.length){var O=null,ma=null!=ea?F+ja[ea]:null;null!=ma&&(O=L.model.getCell(ma));var J=null!=O,ga=new mxCell(da,new mxGeometry(ha,Z,0,0),k||"whiteSpace=wrap;html=1;");ga.vertex=!0;ga.id= -ma;for(var ia=0;ia<ja.length;ia++)L.setAttributeForCell(ga,ca[ia],ja[ia]);if(null!=n&&null!=t){var ua=t[ga.getAttribute(n)];null!=ua&&L.labelChanged(ga,ua)}if(null!=m&&null!=l){var va=l[ga.getAttribute(m)];null!=va&&(ga.style=va)}L.setAttributeForCell(ga,"placeholders","1");ga.style=L.replacePlaceholders(ga,ga.style);J&&(L.model.setGeometry(O,ga.geometry),L.model.setStyle(O,ga.style),0>mxUtils.indexOf(e,O)&&e.push(O));O=ga;if(!J)for(U=0;U<ba.length;U++)g[ba[U].to][O.getAttribute(ba[U].to)]=O;null!= -Q&&"link"!=Q&&(L.setLinkForCell(O,O.getAttribute(Q)),L.setAttributeForCell(O,Q,null));L.fireEvent(new mxEventObject("cellsInserted","cells",[O]));var wa=this.editor.graph.getPreferredSizeForCell(O);O.vertex&&(null!=E&&null!=O.getAttribute(E)&&(O.geometry.x=ha+parseFloat(O.getAttribute(E))),null!=K&&null!=O.getAttribute(K)&&(O.geometry.y=fa+parseFloat(O.getAttribute(K))),"@"==I.charAt(0)&&null!=O.getAttribute(I.substring(1))?O.geometry.width=parseFloat(O.getAttribute(I.substring(1))):O.geometry.width= -"auto"==I?wa.width+T:parseFloat(I),"@"==G.charAt(0)&&null!=O.getAttribute(G.substring(1))?O.geometry.height=parseFloat(O.getAttribute(G.substring(1))):O.geometry.height="auto"==G?wa.height+T:parseFloat(G),Z+=O.geometry.height+R);J?(null==f[ma]&&(f[ma]=[]),f[ma].push(O)):(H=null!=P?L.model.getCell(F+ja[P]):null,d.push(O),null!=H?(H.style=L.replacePlaceholders(H,x),L.addCell(O,H)):e.push(L.addCell(O)))}}for(var na=e.slice(),la=e.slice(),U=0;U<ba.length;U++)for(var xa=ba[U],S=0;S<e.length;S++){var O= -e[S],ya=mxUtils.bind(this,function(a,b,c){var d=b.getAttribute(c.from);if(null!=d){L.setAttributeForCell(b,c.from,null);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)||""));la.push(L.insertEdge(null,null,k||"",c.invert?f:a,c.invert?a:f,c.style||L.createCurrentEdgeStyle()));mxUtils.remove(c.invert?a:f,na)}}}});ya(O,O,xa);if(null!=f[O.id])for(ia= -0;ia<f[O.id].length;ia++)ya(O,f[O.id][ia],xa)}if(null!=aa)for(S=0;S<d.length;S++)for(O=d[S],ia=0;ia<aa.length;ia++)L.setAttributeForCell(O,mxUtils.trim(aa[ia]),null);if(0<e.length){var oa=new mxParallelEdgeLayout(L);oa.spacing=N;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"==I&&(b.width=Math.round(L.snap(b.width)));"auto"==G&&(b.height=Math.round(L.snap(b.height)))}}; -if("["==V.charAt(0)){var za=W;L.view.validate();this.executeLayoutList(JSON.parse(V),function(){ta();za()});W=null}else if("circle"==V){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,W);W=null}else if("horizontaltree"==V||"verticaltree"==V||"auto"==V&&la.length==2*e.length-1&&1==na.length){L.view.validate();var sa= -new mxCompactTreeLayout(L,"horizontaltree"==V);sa.levelDistance=R;sa.edgeRouting=!1;sa.resetEdges=!1;this.executeLayout(function(){sa.execute(L.getDefaultParent(),0<na.length?na[0]:null)},!0,W);W=null}else if("horizontalflow"==V||"verticalflow"==V||"auto"==V&&1==na.length){L.view.validate();var pa=new mxHierarchicalLayout(L,"horizontalflow"==V?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);pa.intraCellSpacing=R;pa.parallelEdgeSpacing=N;pa.interRankCellSpacing=X;pa.disableEdgeStyle=!1;this.executeLayout(function(){pa.execute(L.getDefaultParent(), -la);L.moveCells(la,ha,fa)},!0,W);W=null}else if("organic"==V||"auto"==V&&la.length>e.length){L.view.validate();var qa=new mxFastOrganicLayout(L);qa.forceConstant=3*R;qa.resetEdges=!1;var Ba=qa.isVertexIgnored;qa.isVertexIgnored=function(a){return Ba.apply(this,arguments)||0>mxUtils.indexOf(e,a)};oa=new mxParallelEdgeLayout(L);oa.spacing=N;this.executeLayout(function(){qa.execute(L.getDefaultParent());ta()},!0,W);W=null}}this.hideDialog()}finally{L.model.endUpdate()}null!=W&&W()}}catch(Ca){this.handleError(Ca)}}; +4),"IHDR"!=f(a,4))null!=e&&e();else{f(a,17);e=a.substring(0,l);do{var p=g(a);if("IDAT"==f(a,4)){e=a.substring(0,l-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);e+=k(c.length)+b+c+k(d^4294967295);e+=a.substring(l-8,a.length);break}e+=a.substring(l-8,l-4+p);f(a,p);f(a,4)}while(p);return"data:image/png;base64,"+(window.btoa?btoa(e): +Base64.encode(e,!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(){b(d)};null!=c&&(d.onerror=c);d.src=a}catch(v){if(null!=c)c(v);else throw v;}};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.getLinkTitle=function(b){return a.getLinkTitle(b)};b.customLinkClicked=function(b){var c=!1;try{a.handleCustomLink(b),c=!0}catch(A){a.handleError(A)}return c};var c=this.clearDefaultStyle;this.clearDefaultStyle=function(){c.apply(this,arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://desk.draw.io/support/solutions/articles/16000051979");var d=a.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(b){b= +null!=b?b:"";if(null!=a.pages&&null!=a.currentPage)for(var c=0;c<a.pages.length;c++)if(a.pages[c]==a.currentPage){0<c&&(b+=(0<b.length?"&":"?")+"page="+c);break}"1"==urlParams.dev&&(b+=(0<b.length?"&":"?")+"dev=1&drawdev=1");return d.apply(this,arguments)};var e=b.addClickHandler;b.addClickHandler=function(a,c,d){var f=c;c=function(a,c){if(null==c){var d=mxEvent.getSource(a);"a"==d.nodeName.toLowerCase()&&(c=d.getAttribute("href"))}null!=c&&b.isCustomLink(c)&&(mxEvent.isTouchEvent(a)||!mxEvent.isPopupTrigger(a))&& +b.customLinkClicked(c)&&mxEvent.consume(a);null!=f&&f(a,c)};e.call(this,a,c,d)};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?420:360,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var g=b.getGlobalVariable;b.getGlobalVariable=function(b){return"page"==b&&null!=a.currentPage?a.currentPage.getName(): +"pagenumber"==b?null!=a.currentPage&&null!=a.pages?mxUtils.indexOf(a.pages,a.currentPage)+1:1:g.apply(this,arguments)};var m=b.labelLinkClicked;b.labelLinkClicked=function(a,c,d){var f=c.getAttribute("href");if(null==f||!b.isCustomLink(f)||!mxEvent.isTouchEvent(d)&&mxEvent.isPopupTrigger(d))m.apply(this,arguments);else{if(!b.isEnabled()||null!=a&&b.isCellLocked(a.cell))b.customLinkClicked(f),b.getRubberband().reset();mxEvent.consume(d)}};this.editor.getOrCreateFilename=function(){var b=a.defaultFilename, +c=a.getCurrentFile();null!=c&&(b=null!=c.getTitle()?c.getTitle():b);return b};var n=this.actions.get("print");n.setEnabled(!mxClient.IS_IOS||!navigator.standalone);n.visible=n.isEnabled();if(!this.editor.chromeless||this.editor.editable)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,f,e,g){b.insertImage(a,e,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 f=this.maxImageSize,f=Math.min(1, +Math.min(f/Math.max(1,d)),f/Math.max(1,a));b.insertImage(decodeURIComponent(c),d*f,a*f)})):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()})))}));"1"==urlParams.ruler&&"undefined"!== +typeof mxRuler&&(this.ruler=new mxDualRuler(this,this.editor.graph.view.unit));if("1"==urlParams.styledev){n=document.getElementById("geFooter");null!=n&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput, +"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),n.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){if(0<this.editor.graph.getSelectionCount()){var c=this.editor.graph.getSelectionCell(),c=this.editor.graph.getModel().getStyle(c);this.styleInput.value=c||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility= +"hidden"})));var q=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:q.apply(this,arguments)}}n=document.getElementById("geInfo");null!=n&&n.parentNode.removeChild(n);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var B=null;mxEvent.addListener(b.container,"dragleave",function(a){b.isEnabled()&&(null!=B&&(B.parentNode.removeChild(B),B=null),a.stopPropagation(),a.preventDefault())});mxEvent.addListener(b.container,"dragover", +mxUtils.bind(this,function(a){null==B&&(!mxClient.IS_IE||10<document.documentMode)&&(B=this.highlightElement(b.container));null!=this.sidebar&&this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()}));mxEvent.addListener(b.container,"drop",mxUtils.bind(this,function(a){null!=B&&(B.parentNode.removeChild(B),B=null);if(b.isEnabled()){var c=mxUtils.convertPoint(b.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),d=b.view.translate,f=b.view.scale,e=c.x/f-d.x,g=c.y/f-d.y;mxEvent.isAltDown(a)&& +(g=e=0);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,e,g,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a));else{var k=0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):null,c=this.extractGraphModelFromEvent(a,null!=this.pages);if(null!=c)b.setSelectionCells(this.importXml(c,e,g,!0));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")){var l=a.dataTransfer.getData("text/html"), +c=document.createElement("div");c.innerHTML=l;var p=null,d=c.getElementsByTagName("img");null!=d&&1==d.length?(l=d[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(l)||(p=!0)):(c=c.getElementsByTagName("a"),null!=c&&1==c.length&&(l=c[0].getAttribute("href")));var m=!0,n=mxUtils.bind(this,function(){b.setSelectionCells(this.insertTextAt(l,e,g,!0,p,null,m))});p&&l.length>this.resampleThreshold?this.confirmImageResize(function(a){m=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,"",e,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,e,g,!0))})):0<=mxUtils.indexOf(a.dataTransfer.types, +"text/plain")&&b.setSelectionCells(this.insertTextAt(a.dataTransfer.getData("text/plain"),e,g,!0))}}a.stopPropagation();a.preventDefault()}),!1)}this.initPages();this.editUpdateListener=mxUtils.bind(this,function(a,b){var c=b.getProperty("edit");null!=c&&this.updateEditReferences(c)});this.editor.undoManager.addListener(mxEvent.BEFORE_UNDO,this.editUpdateListener);this.editor.undoManager.addListener(mxEvent.BEFORE_REDO,this.editUpdateListener);"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()}; +EditorUi.prototype.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,f=0;f<c.types.length;f++)if("text/"===c.types[f].substring(0,5)){d=!0;break}if(!d){var e=c.items;for(index in e){var g=e[index];if("file"===g.kind){if(a.isEditing())this.importFiles([g.getAsFile()],0,0,this.maxImageSize,function(b,c,d,f,e,g){a.insertImage(b, +e,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=" ";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.position="absolute";c.style.whiteSpace="nowrap";c.style.overflow="hidden";c.style.display="block";c.contentEditable=!0;mxUtils.setOpacity(c,0);c.style.width="1px";c.style.height="1px";c.innerHTML=" ";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 f=mxEvent.getSource(a);null==b.container||!b.isEnabled()||b.isMouseDown||b.isEditing()||null!=this.dialog||"INPUT"==f.nodeName||"TEXTAREA"==f.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 f=a.keyCode;window.setTimeout(mxUtils.bind(this,function(){!d||224!=f&&17!=f&&91!=f||(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())&&(c.innerHTML=" ",c.focus(),window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,c);c.innerHTML=" "}),0))}),!0);var e=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==c? +!0:e.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();this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.menus.customFonts= +mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(a,b){mxSettings.setCustomFonts(this.menus.customFonts);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();this.addListener("gridColorChanged",mxUtils.bind(this,function(a,b){mxSettings.setGridColor(this.editor.graph.view.gridColor);mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(a,b){mxSettings.setAutosave(this.editor.autosave); +mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&this.sidebar.showPalette("search",mxSettings.settings.search);this.editor.chromeless&&!this.editor.editable||null==this.sidebar||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save());this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyCells=function(a,b){var c=this.editor.graph; +if(c.isSelectionEmpty())a.innerHTML="";else{var d=mxUtils.sortCells(c.model.getTopmostCells(c.getSelectionCells())),f=mxUtils.getXml(this.editor.graph.encodeCells(d));mxUtils.setTextContent(a,encodeURIComponent(f));b?(c.removeCells(d,!1),c.lastPasteXml=null):(c.lastPasteXml=f,c.pasteCounter=0);a.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.pasteCells=function(a,b){if(!mxEvent.isConsumed(a)){var c=b.getElementsByTagName("span");if(null!=c&&0<c.length&&"application/vnd.lucid.chart.objects"=== +c[0].getAttribute("data-lucid-type")){var d=c[0].getAttribute("data-lucid-content");null!=d&&0<d.length&&(this.convertLucidChart(d,mxUtils.bind(this,function(a){var b=this.editor.graph;b.setSelectionCells(this.importXml(a,0,0));b.scrollCellToVisible(b.getSelectionCell())}),mxUtils.bind(this,function(a){this.handleError(a)})),mxEvent.consume(a))}else{var d=this.editor.graph,f=mxUtils.trim(mxClient.IS_QUIRKS||8==document.documentMode?mxUtils.getTextContent(b):b.textContent),e=!1;try{var g=f.lastIndexOf("%3E"); +0<=g&&g<f.length-3&&(f=f.substring(0,g+3))}catch(C){}try{var c=b.getElementsByTagName("span"),k=null!=c&&0<c.length?mxUtils.trim(decodeURIComponent(c[0].textContent)):decodeURIComponent(f);this.isCompatibleString(k)&&(e=!0,f=k)}catch(C){}d.lastPasteXml==f?d.pasteCounter++:(d.lastPasteXml=f,d.pasteCounter=0);c=d.pasteCounter*d.gridSize;if(null!=f&&0<f.length&&(e||this.isCompatibleString(f)?d.setSelectionCells(this.importXml(f,c,c)):(e=d.getInsertPoint(),d.isMouseInsertPoint()&&(c=0,d.lastPasteXml== +f&&0<d.pasteCounter&&d.pasteCounter--),d.setSelectionCells(this.insertTextAt(f,e.x+c,e.y+c,!0))),!d.isSelectionEmpty())){d.scrollCellToVisible(d.getSelectionCell());null!=this.hoverIcons&&this.hoverIcons.update(d.view.getState(d.getSelectionCell()));try{mxEvent.consume(a)}catch(C){}}}}};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,f;if(null==a){f=document.body; +var e=document.documentElement;d=(f.clientWidth||e.clientWidth)-3;f=Math.max(f.clientHeight||0,e.clientHeight)-3}else b=a.offsetTop,c=a.offsetLeft,d=a.clientWidth,f=a.clientHeight;e=document.createElement("div");e.style.zIndex=mxPopupMenu.prototype.zIndex+2;e.style.border="3px dotted rgb(254, 137, 12)";e.style.pointerEvents="none";e.style.position="absolute";e.style.top=b+"px";e.style.left=c+"px";e.style.width=Math.max(0,d-3)+"px";e.style.height=Math.max(0,f-3)+"px";null!=a&&a.parentNode==this.editor.graph.container? +this.editor.graph.container.appendChild(e):document.body.appendChild(e);return e};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,f=a.name;if(null!=f&&0<f.length){!this.useCanvasForExport&&/(\.png)$/i.test(f)&&(f=f.substring(0,f.length-4)+".drawio");var e=mxUtils.bind(this,function(a){f=0<=f.lastIndexOf(".")?f.substring(0,f.lastIndexOf("."))+".drawio":f+".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,f))}catch(x){this.handleError(x,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(a,f,b)});if(/(\.v(dx|sdx?))($|\?)/i.test(f)||/(\.vs(x|sx?))($|\?)/i.test(f))this.importVisio(a,mxUtils.bind(this,function(a){this.spinner.stop();e(a)}));else if(/(\.*<graphml )/.test(d))this.importGraphML(d,mxUtils.bind(this,function(a){this.spinner.stop();e(a)}));else if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d, +f))this.parseFile(a,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?e(a.responseText):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(d))/(\.json)$/i.test(f)&&(f=f.substring(0,f.length-5)+".drawio"),this.convertLucidChart(d,mxUtils.bind(this,function(a){this.spinner.stop();this.openLocalFile(a,f,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(B){this.handleError(B,mxResources.get("errorLoadingFile"))}}else"image/png"==a.type.substring(0,9)&&(d=this.extractGraphModelFromPng(d)),this.spinner.stop(),this.openLocalFile(d,f,b)}}catch(B){this.handleError(B)}}); +c.onerror=mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a);window.openFile=null});"image"===a.type.substring(0,5)&&"image/svg"!==a.type.substring(0,9)?c.readAsDataURL(a):c.readAsText(a)})(a[c])};EditorUi.prototype.openLocalFile=function(a,b,c){var d=this.getCurrentFile(),f=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)?f():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&null!=d&&d.isModified()?this.confirm(mxResources.get("allChangesLost"),null,f,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(a,b),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=d&&d.isModified()? +this.confirm(mxResources.get("allChangesLost"),null,f,mxResources.get("cancel"),mxResources.get("discardChanges")):f()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var 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,f=d.getCellStyle(a);c(mxStencilRegistry.getBasenameForStencil(f[mxConstants.STYLE_SHAPE]));d.model.isEdge(a)&&(c(mxMarker.getPackageForType(f[mxConstants.STYLE_STARTARROW])),c(mxMarker.getPackageForType(f[mxConstants.STYLE_ENDARROW])));for(var f=d.model.getChildCount(a),e=0;e<f;e++)this.addBasenamesForCell(d.model.getChildAt(a,e),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.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?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(a,b){null!=a?a.getPublicUrl(b):b(null)};EditorUi.prototype.createLoadMessage=function(a){var b=this.editor.graph;return{event:a,pageVisible:b.pageVisible,translate:b.view.translate,bounds:b.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:b.view.scale,page:b.view.getBackgroundPageBounds()}};EditorUi.prototype.installMessageHandler= +function(a){var b=null,c=!1,d=!1,f=null,e=mxUtils.bind(this,function(a,b){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,e);mxEvent.addListener(window,"message",mxUtils.bind(this,function(e){if(e.source==(window.opener||window.parent)){var k=e.data,l=mxUtils.bind(this,function(a){if(null!=a&&"function"===typeof a.charAt&& +"<"!=a.charAt(0))try{"data:image/png;base64,"==a.substring(0,22)?a=this.extractGraphModelFromPng(a):"data:image/svg+xml;base64,"==a.substring(0,26)?a=atob(a.substring(26)):"data:image/svg+xml;utf8,"==a.substring(0,24)&&(a=a.substring(24)),null!=a&&("%"==a.charAt(0)?a=decodeURIComponent(a):"<"!=a.charAt(0)&&(a=Graph.decompress(a)))}catch(R){}return a});if("json"==urlParams.proto){try{k=JSON.parse(k)}catch(K){k=null}if(null==k)return;if("dialog"==k.action){this.showError(null!=k.titleKey?mxResources.get(k.titleKey): +k.title,null!=k.messageKey?mxResources.get(k.messageKey):k.message,null!=k.buttonKey?mxResources.get(k.buttonKey):k.button);null!=k.modified&&(this.editor.modified=k.modified);return}if("prompt"==k.action){this.spinner.stop();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 m=l(k.xml);this.spinner.stop();l=new DraftDialog(this,mxResources.get("draftFound",[k.name||this.defaultFilename]),m,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(K){g.postMessage(JSON.stringify({event:"draft",error:K.toString(),message:k}),"*")}return}if("template"==k.action){this.spinner.stop();var l=1==k.enableRecent,m=1==k.enableSearch,p=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,e,b!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,l?mxUtils.bind(this,function(a){this.remoteInvoke("getRecentDiagrams",null,null,a,function(){a(null,"Network Error!")})}):null,m?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,p?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){l=this.getDiagramTextContent();g.postMessage(JSON.stringify({event:"textContent",data:l, +message:k}),"*");return}if("status"==k.action){null!=k.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(k.messageKey))):null!=k.message&&this.editor.setStatus(mxUtils.htmlEntities(k.message));null!=k.modified&&(this.editor.modified=k.modified);return}if("spinner"==k.action){var n=null!=k.messageKey?mxResources.get(k.messageKey):k.message;null==k.show||k.show?this.spinner.spin(document.body,n):this.spinner.stop();return}if("export"==k.action){if("png"==k.format||"xmlpng"==k.format){if(null== +k.spin&&null==k.spinKey||this.spinner.spin(document.body,null!=k.spinKey?mxResources.get(k.spinKey):k.spin)){var t=null!=k.xml?k.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var q=this.editor.graph,u=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(t);g.postMessage(JSON.stringify(b),"*")}),v=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage); +"xmlpng"==k.format&&(a=this.writeGraphModelToPng(a,"tEXt","mxfile",encodeURIComponent(t)));q!=this.editor.graph&&q.container.parentNode.removeChild(q.container);u(a)});if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage!=this.pages[0]){var q=this.createTemporaryGraph(q.getStylesheet()),z=q.getGlobalVariable,E=this.pages[0];q.getGlobalVariable=function(a){return"page"==a?E.getName():"pagenumber"==a?1:z.apply(this,arguments)};document.body.appendChild(q.container);q.model.setRoot(E.root)}this.exportToCanvas(mxUtils.bind(this, +function(a){v(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,function(){v(null)}),null,null,k.scale,null,null,null,q)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==k.format?"1":"0")+(null!=k.scale?"&scale="+k.scale:"")+"&base64=1&xml="+encodeURIComponent(encodeURIComponent(t)))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?u("data:image/png;base64,"+a.getText()):v(null)}),mxUtils.bind(this,function(){v(null)}))}}else{null!=k.xml&&0<k.xml.length&& +this.setFileData(k.xml);n=this.createLoadMessage("export");if("html2"==k.format||"html"==k.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length))l=this.getXmlFileData(),n.xml=mxUtils.getXml(l),n.data=this.getFileData(null,null,!0,null,null,null,l),n.format=k.format;else if("html"==k.format)t=this.editor.getGraphXml(),n.data=this.getHtml(t,this.editor.graph),n.xml=mxUtils.getXml(t),n.format=k.format;else{mxSvgCanvas2D.prototype.foAltText=null;l=this.editor.graph.background;l==mxConstants.NONE&& +(l=null);n.xml=this.getFileData(!0);n.format="svg";if(k.embedImages||null==k.embedImages){if(null==k.spin&&null==k.spinKey||this.spinner.spin(document.body,null!=k.spinKey?mxResources.get(k.spinKey):k.spin))this.editor.graph.setEnabled(!1),"xmlsvg"==k.format?this.getEmbeddedSvg(n.xml,this.editor.graph,null,!0,mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();n.data=this.createSvgDataUri(a);g.postMessage(JSON.stringify(n),"*")})):this.convertImages(this.editor.graph.getSvg(l), +mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();n.data=this.createSvgDataUri(mxUtils.getXml(a));g.postMessage(JSON.stringify(n),"*")}));return}l="xmlsvg"==k.format?this.getEmbeddedSvg(this.getFileData(!0),this.editor.graph,null,!0):mxUtils.getXml(this.editor.graph.getSvg(l));n.data=this.createSvgDataUri(l)}g.postMessage(JSON.stringify(n),"*")}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&&(m=document.createElement("span"),mxUtils.write(m,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(m),this.embedFilenameSpan=m),k=null!=k.xmlpng?this.extractGraphModelFromPng(k.xmlpng):k.xml;else{"remoteInvokeReady"==k.action?this.handleRemoteInvokeReady(g):"remoteInvoke"==k.action?this.handleRemoteInvoke(k):"remoteInvokeResponse"==k.action?this.handleRemoteInvokeResponse(k):g.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(k)}),"*");return}}var y=mxUtils.bind(this,function(e,k){c=!0;try{a(e,k)}catch(T){this.handleError(T)}c=!1;null!=urlParams.modified&& +this.editor.setStatus("");var l=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});f=l();d&&null==b&&(b=mxUtils.bind(this,function(a,b){var d=l();if(d!=f&&!c){var e=this.createLoadMessage("autosave");e.xml=d;d=JSON.stringify(e);(window.opener||window.parent).postMessage(d,"*")}f=d}),this.editor.graph.model.addListener(mxEvent.CHANGE,b),this.editor.graph.addListener("gridSizeChanged",b),this.editor.graph.addListener("shadowVisibleChanged", +b),this.addListener("pageFormatChanged",b),this.addListener("pageScaleChanged",b),this.addListener("backgroundColorChanged",b),this.addListener("backgroundImageChanged",b),this.addListener("foldingEnabledChanged",b),this.addListener("mathEnabledChanged",b),this.addListener("gridEnabledChanged",b),this.addListener("guidesEnabledChanged",b),this.addListener("pageViewChanged",b));"1"!=urlParams.returnbounds&&"json"!=urlParams.proto||g.postMessage(JSON.stringify(this.createLoadMessage("load")),"*")}); +null!=k&&"function"===typeof k.substring&&"data:application/vnd.visio;base64,"==k.substring(0,34)?(l="0M8R4KGxGuE"==k.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(k.substring(k.indexOf(",")+1)),function(a){y(a,e)},mxUtils.bind(this,function(a){this.handleError(a)}),l)):null!=k&&"function"===typeof k.substring&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(k,"")?this.parseFile(new Blob([k],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4== +a.readyState&&200<=a.status&&299>=a.status&&"<mxGraphModel"==a.responseText.substring(0,13)&&y(a.responseText,e)}),""):null!=k&&"function"===typeof k.substring&&this.isLucidChartData(k)?this.convertLucidChart(k,mxUtils.bind(this,function(a){y(a)}),mxUtils.bind(this,function(a){this.handleError(a)})):(k=l(k),y(k,e))}}));var g=window.opener||window.parent,e="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";g.postMessage(e,"*")};EditorUi.prototype.addEmbedButtons=function(){if(null!= +this.menubar){var a=document.createElement("div");a.style.display="inline-block";a.style.position="absolute";a.style.paddingTop="atlas"==uiTheme?"2px":"3px";a.style.paddingLeft="8px";a.style.paddingBottom="2px";var b=document.createElement("button");b.className="geBigButton";b.style.fontSize="12px";b.style.padding="4px 6px 4px 6px";b.style.borderRadius="3px";"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.style.fontSize= +"12px",b.style.marginLeft="6px",b.style.padding="4px",b.style.cursor="pointer",mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b)));b=document.createElement("a");mxUtils.write(b,mxResources.get("exit"));b.setAttribute("title",mxResources.get("exit"));b.style.fontSize="12px";b.style.marginLeft="6px";b.style.marginRight="20px";b.style.padding="4px";b.style.cursor="pointer";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})); +a.appendChild(b);this.toolbar.container.appendChild(a);this.toolbar.staticElements.push(a);a.style.right="atlas"!=uiTheme?"52px":"42px"}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(a){this.importCsv(a)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.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(),f=0;f<a.length;f++){var e=new window[a[f].layout](c);if(null!=a[f].config)for(var g in a[f].config)e[g]=a[f].config[g];this.executeLayout(function(){e.execute(c.getDefaultParent(),0==d.length?null:d)},f==a.length-1,b)}};EditorUi.prototype.importCsv=function(a,b){try{var c=a.split("\n"),d=[],f=[],e={};if(0<c.length){var g={},k=null, +l=null,m=null,n=null,q=null,A=null,I=null,H=null,F="",G="auto",J="auto",E=null,L=null,K=40,R=40,X=100,T=0,M=this.editor.graph;M.getGraphBounds();for(var W=function(){null!=b?b(la):(M.setSelectionCells(la),M.scrollCellToVisible(M.getSelectionCell()))},Z=M.getFreeInsertPoint(),ha=Z.x,fa=Z.y,Z=fa,da=null,V="auto",H=null,ba=[],Q=null,aa=null,Y=0;Y<c.length&&"#"==c[Y].charAt(0);){a=c[Y];for(Y++;Y<c.length&&"\\"==a.charAt(a.length-1)&&"#"==c[Y].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(c[Y].substring(1)), +Y++;if("#"!=a.charAt(1)){var ea=a.indexOf(":");if(0<ea){var P=mxUtils.trim(a.substring(1,ea)),N=mxUtils.trim(a.substring(ea+1));"label"==P?da=M.sanitizeHtml(N):"labelname"==P&&0<N.length&&"-"!=N?n=N:"labels"==P&&0<N.length&&"-"!=N?q=JSON.parse(N):"style"==P?k=N:"parentstyle"==P?A=N:"stylename"==P&&0<N.length&&"-"!=N?m=N:"styles"==P&&0<N.length&&"-"!=N?l=JSON.parse(N):"identity"==P&&0<N.length&&"-"!=N?I=N:"parent"==P&&0<N.length&&"-"!=N?H=N:"namespace"==P&&0<N.length&&"-"!=N?F=N:"width"==P?G=N:"height"== +P?J=N:"left"==P&&0<N.length?E=N:"top"==P&&0<N.length?L=N:"ignore"==P?aa=N.split(","):"connect"==P?ba.push(JSON.parse(N)):"link"==P?Q=N:"padding"==P?T=parseFloat(N):"edgespacing"==P?K=parseFloat(N):"nodespacing"==P?R=parseFloat(N):"levelspacing"==P?X=parseFloat(N):"layout"==P&&(V=N)}}}if(null==c[Y])throw Error(mxResources.get("invalidOrMissingFile"));var ca=this.editor.csvToArray(c[Y]),P=ea=null;if(null!=I||null!=H)for(var S=0;S<ca.length;S++)I==ca[S]&&(ea=S),H==ca[S]&&(P=S);null==da&&(da="%"+ca[0]+ +"%");if(null!=ba)for(var U=0;U<ba.length;U++)null==g[ba[U].to]&&(g[ba[U].to]={});M.model.beginUpdate();try{for(S=Y+1;S<c.length;S++){var ja=this.editor.csvToArray(c[S]);if(null==ja){var ka=40<c[S].length?c[S].substring(0,40)+"...":c[S];throw Error(S+" ("+ka+") "+mxResources.get("containsValidationErrors"));}if(ja.length==ca.length){var O=null,ma=null!=ea?F+ja[ea]:null;null!=ma&&(O=M.model.getCell(ma));var I=null!=O,ga=new mxCell(da,new mxGeometry(ha,Z,0,0),k||"whiteSpace=wrap;html=1;");ga.vertex= +!0;ga.id=ma;for(var ia=0;ia<ja.length;ia++)M.setAttributeForCell(ga,ca[ia],ja[ia]);if(null!=n&&null!=q){var ua=q[ga.getAttribute(n)];null!=ua&&M.labelChanged(ga,ua)}if(null!=m&&null!=l){var va=l[ga.getAttribute(m)];null!=va&&(ga.style=va)}M.setAttributeForCell(ga,"placeholders","1");ga.style=M.replacePlaceholders(ga,ga.style);I&&(M.model.setGeometry(O,ga.geometry),M.model.setStyle(O,ga.style),0>mxUtils.indexOf(f,O)&&f.push(O));O=ga;if(!I)for(U=0;U<ba.length;U++)g[ba[U].to][O.getAttribute(ba[U].to)]= +O;null!=Q&&"link"!=Q&&(M.setLinkForCell(O,O.getAttribute(Q)),M.setAttributeForCell(O,Q,null));M.fireEvent(new mxEventObject("cellsInserted","cells",[O]));var wa=this.editor.graph.getPreferredSizeForCell(O);O.vertex&&(null!=E&&null!=O.getAttribute(E)&&(O.geometry.x=ha+parseFloat(O.getAttribute(E))),null!=L&&null!=O.getAttribute(L)&&(O.geometry.y=fa+parseFloat(O.getAttribute(L))),"@"==G.charAt(0)&&null!=O.getAttribute(G.substring(1))?O.geometry.width=parseFloat(O.getAttribute(G.substring(1))):O.geometry.width= +"auto"==G?wa.width+T:parseFloat(G),"@"==J.charAt(0)&&null!=O.getAttribute(J.substring(1))?O.geometry.height=parseFloat(O.getAttribute(J.substring(1))):O.geometry.height="auto"==J?wa.height+T:parseFloat(J),Z+=O.geometry.height+R);I?(null==e[ma]&&(e[ma]=[]),e[ma].push(O)):(H=null!=P?M.model.getCell(F+ja[P]):null,d.push(O),null!=H?(H.style=M.replacePlaceholders(H,A),M.addCell(O,H)):f.push(M.addCell(O)))}}for(var na=f.slice(),la=f.slice(),U=0;U<ba.length;U++)for(var xa=ba[U],S=0;S<f.length;S++){var O= +f[S],ya=mxUtils.bind(this,function(a,b,c){var d=b.getAttribute(c.from);if(null!=d){M.setAttributeForCell(b,c.from,null);for(var d=d.split(","),f=0;f<d.length;f++){var e=g[c.to][d[f]];if(null!=e){var k=c.label;null!=c.fromlabel&&(k=(b.getAttribute(c.fromlabel)||"")+(k||""));null!=c.tolabel&&(k=(k||"")+(e.getAttribute(c.tolabel)||""));la.push(M.insertEdge(null,null,k||"",c.invert?e:a,c.invert?a:e,c.style||M.createCurrentEdgeStyle()));mxUtils.remove(c.invert?a:e,na)}}}});ya(O,O,xa);if(null!=e[O.id])for(ia= +0;ia<e[O.id].length;ia++)ya(O,e[O.id][ia],xa)}if(null!=aa)for(S=0;S<d.length;S++)for(O=d[S],ia=0;ia<aa.length;ia++)M.setAttributeForCell(O,mxUtils.trim(aa[ia]),null);if(0<f.length){var oa=new mxParallelEdgeLayout(M);oa.spacing=K;var ta=function(){0<oa.spacing&&oa.execute(M.getDefaultParent());for(var a=0;a<f.length;a++){var b=M.getCellGeometry(f[a]);b.x=Math.round(M.snap(b.x));b.y=Math.round(M.snap(b.y));"auto"==G&&(b.width=Math.round(M.snap(b.width)));"auto"==J&&(b.height=Math.round(M.snap(b.height)))}}; +if("["==V.charAt(0)){var za=W;M.view.validate();this.executeLayoutList(JSON.parse(V),function(){ta();za()});W=null}else if("circle"==V){var ra=new mxCircleLayout(M);ra.resetEdges=!1;var Aa=ra.isVertexIgnored;ra.isVertexIgnored=function(a){return Aa.apply(this,arguments)||0>mxUtils.indexOf(f,a)};this.executeLayout(function(){ra.execute(M.getDefaultParent());ta()},!0,W);W=null}else if("horizontaltree"==V||"verticaltree"==V||"auto"==V&&la.length==2*f.length-1&&1==na.length){M.view.validate();var sa= +new mxCompactTreeLayout(M,"horizontaltree"==V);sa.levelDistance=R;sa.edgeRouting=!1;sa.resetEdges=!1;this.executeLayout(function(){sa.execute(M.getDefaultParent(),0<na.length?na[0]:null)},!0,W);W=null}else if("horizontalflow"==V||"verticalflow"==V||"auto"==V&&1==na.length){M.view.validate();var pa=new mxHierarchicalLayout(M,"horizontalflow"==V?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);pa.intraCellSpacing=R;pa.parallelEdgeSpacing=K;pa.interRankCellSpacing=X;pa.disableEdgeStyle=!1;this.executeLayout(function(){pa.execute(M.getDefaultParent(), +la);M.moveCells(la,ha,fa)},!0,W);W=null}else if("organic"==V||"auto"==V&&la.length>f.length){M.view.validate();var qa=new mxFastOrganicLayout(M);qa.forceConstant=3*R;qa.resetEdges=!1;var Ba=qa.isVertexIgnored;qa.isVertexIgnored=function(a){return Ba.apply(this,arguments)||0>mxUtils.indexOf(f,a)};oa=new mxParallelEdgeLayout(M);oa.spacing=K;this.executeLayout(function(){qa.execute(M.getDefaultParent());ta()},!0,W);W=null}}this.hideDialog()}finally{M.model.endUpdate()}null!=W&&W()}}catch(Ca){this.handleError(Ca)}}; EditorUi.prototype.getSearch=function(a){var b="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=a&&0<window.location.search.length){var c="?",d;for(d in urlParams)0>mxUtils.indexOf(a,d)&&null!=urlParams[d]&&(b+=c+d+"="+urlParams[d],c="&")}else b=window.location.search;return b};EditorUi.prototype.getUrl=function(a){a=null!=a?a:window.location.pathname;var b=0<a.indexOf("?")?1:0;if("1"==urlParams.offline)a+=window.location.search;else{var c="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "), d;for(d in urlParams)0>mxUtils.indexOf(c,d)&&(a=0==b?a+"?":a+"&",null!=urlParams[d]&&(a+=d+"="+urlParams[d],b++))}return a};EditorUi.prototype.showLinkDialog=function(a,b,c){a=new LinkDialog(this,a,b,c,!0);this.showDialog(a.container,560,130,!0,!0);a.init()};var m=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=m.apply(this,arguments),c=this.editor.graph,d=b.getSourceGraphBounds;b.getSourceGraphBounds=function(){if(mxUtils.hasScrollbars(c.container)&&c.pageVisible&& null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width-2*a.x/b),Math.ceil(this.source.minimumGraphSize.height-2*a.y/b))}return d.apply(this,arguments)};var e=b.getSourceContainerSize;b.getSourceContainerSize=function(){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width* @@ -8792,63 +8805,64 @@ function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.protot 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 t=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){this.editUpdateListener&&(this.editor.undoManager.removeListener(this.editUpdateListener),this.editUpdateListener=null);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);t.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,b,c,d,e,g){var f=a.editor.graph;if("xml"==c)a.hideDialog(), -a.saveData(b,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("svg"==c)a.hideDialog(),a.saveData(b,"svg",mxUtils.getXml(f.getSvg(d,e,g)),"image/svg+xml");else{var k=a.getFileData(!0,null,null,null,null,!0),l=f.getGraphBounds(),m=Math.floor(l.width*e/f.view.scale),n=Math.floor(l.height*e/f.view.scale);k.length<=MAX_REQUEST_SIZE&&m*n<MAX_AREA?(a.hideDialog(),"png"!=c&&"jpg"!=c&&"jpeg"!=c||!a.isExportToCanvas()?a.saveRequest(b,c,function(a,b){return new mxXmlRequest(EXPORT_URL,"format="+ -c+"&base64="+(b||"0")+(null!=a?"&filename="+encodeURIComponent(a):"")+"&bg="+(null!=d?d:"none")+"&w="+m+"&h="+n+"&border="+g+"&xml="+encodeURIComponent(k))}):"png"==c?a.exportImage(e,null==d||"none"==d,!0,!1,!1,g,!0,!1):a.exportImage(e,!1,!0,!1,!1,g,!0,!1,"jpeg")):mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.updateEditReferences=function(a){for(var b=0;b<a.changes.length;b++){var c=a.changes[b];if(null!=c&&c.constructor==mxChildChange&&null!=c.child){var d=c.child;if(null!= -d.source&&null!=d.source.id){var e=this.getFutureCellForEdit(c.model,a,d.source.id);e!=d.source&&(d.source=e)}null!=d.target&&null!=d.target.id&&(c=this.getFutureCellForEdit(c.model,a,d.target.id),c!=d.target&&(d.target=c))}}};EditorUi.prototype.getFutureCellForEdit=function(a,b,c){var d=a.getCell(c);if(null==d)for(var e=b.changes.length-1;0<=e;e--){var f=b.changes[e];if(f.constructor==mxChildChange&&null!=f.child&&f.child.id==c){a.contains(f.previous)&&(d=f.child);break}}return d};EditorUi.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()),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 m=JSON.parse(decodeURIComponent(k.substring(1))); -f[m[0]]={id:m[0],title:m[1],downloadUrl:m[2]}}}}catch(v){}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(J){this.handleError(J,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}};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]; -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,e){var f=!0,g=window.setTimeout(mxUtils.bind(this,function(){f=!1;e({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),k=mxUtils.bind(this,function(){window.clearTimeout(g);f&&d.apply(this,arguments)});c=c||{};c.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:k, -error:e});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){var b=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 c=a.funtionName,d=this.remoteInvokableFns[c];if(null!=d&&"function"=== -typeof this[c]){var e=a.functionArgs;Array.isArray(e)||(e=[]);if(d.isAsync)e.push(function(){b(Array.prototype.slice.apply(arguments))}),e.push(function(a){b(null,a||"Unkown Error")}),this[c].apply(this,e);else{var f=this[c].apply(this,e);b([f])}}else b(null,"Invalid Call: "+c+" is not found.")}catch(A){b(null,"Invalid Call: An error occured, "+A.message)}};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")}})(); -var CommentsWindow=function(a,c,b,d,g,e){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++;v.style.display=0==b?"block":"none"}function m(a,b,c,d){function e(){b.removeChild(l);b.removeChild(m);g.style.display="block";f.style.display="block"}q={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();q=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);q=null});mxEvent.addListener(l,"keydown",mxUtils.bind(this, +var q=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){this.editUpdateListener&&(this.editor.undoManager.removeListener(this.editUpdateListener),this.editUpdateListener=null);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);q.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,b,c,d,e,g,k){var f=a.editor.graph;if("xml"==c)a.hideDialog(), +a.saveData(b,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("svg"==c)a.hideDialog(),a.saveData(b,"svg",mxUtils.getXml(f.getSvg(d,e,g)),"image/svg+xml");else{var l=a.getFileData(!0,null,null,null,null,!0),m=f.getGraphBounds(),n=Math.floor(m.width*e/f.view.scale),p=Math.floor(m.height*e/f.view.scale);if(l.length<=MAX_REQUEST_SIZE&&n*p<MAX_AREA)if(a.hideDialog(),"png"!=c&&"jpg"!=c&&"jpeg"!=c||!a.isExportToCanvas()){var t={globalVars:f.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(t))+(0<k?"&dpi="+k:"")+"&bg="+(null!=d?d:"none")+"&w="+n+"&h="+p+"&border="+g+"&xml="+encodeURIComponent(l))})}else"png"==c?a.exportImage(e,null==d||"none"==d,!0,!1,!1,g,!0,!1,null,null,k):a.exportImage(e,!1,!0,!1,!1,g,!0,!1,"jpeg",null,k);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.updateEditReferences= +function(a){for(var b=0;b<a.changes.length;b++){var c=a.changes[b];if(null!=c&&c.constructor==mxChildChange&&null!=c.child){var d=c.child;if(null!=d.source&&null!=d.source.id){var e=this.getFutureCellForEdit(c.model,a,d.source.id);e!=d.source&&(d.source=e)}null!=d.target&&null!=d.target.id&&(c=this.getFutureCellForEdit(c.model,a,d.target.id),c!=d.target&&(d.target=c))}}};EditorUi.prototype.getFutureCellForEdit=function(a,b,c){var d=a.getCell(c);if(null==d)for(var e=b.changes.length-1;0<=e;e--){var f= +b.changes[e];if(f.constructor==mxChildChange&&null!=f.child&&f.child.id==c){a.contains(f.previous)&&(d=f.child);break}}return d};EditorUi.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()),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 m=JSON.parse(decodeURIComponent(k.substring(1)));f[m[0]]={id:m[0],title:m[1],downloadUrl:m[2]}}}}catch(B){}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(I){this.handleError(I,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}};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];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,e){var f=!0,g=window.setTimeout(mxUtils.bind(this,function(){f=!1;e({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),k=mxUtils.bind(this,function(){window.clearTimeout(g); +f&&d.apply(this,arguments)});c=c||{};c.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:k,error:e});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){var b=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 c=a.funtionName,d=this.remoteInvokableFns[c];if(null!=d&&"function"===typeof this[c]){var e=a.functionArgs;Array.isArray(e)||(e=[]);if(d.isAsync)e.push(function(){b(Array.prototype.slice.apply(arguments))}),e.push(function(a){b(null,a||"Unkown Error")}),this[c].apply(this,e);else{var f=this[c].apply(this,e);b([f])}}else b(null,"Invalid Call: "+c+" is not found.")}catch(z){b(null,"Invalid Call: An error occured, "+z.message)}};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")}})(); +var CommentsWindow=function(a,c,b,d,g,e){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++;B.style.display=0==b?"block":"none"}function m(a,b,c,d){function e(){b.removeChild(l);b.removeChild(m);g.style.display="block";f.style.display="block"}t={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();t=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);t=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=a.timeSince(new Date(b.modifiedDate));null==d&&(d=mxResources.get("lessThanAMinute"));mxUtils.write(c,mxResources.get("timeAgo", -[d],"{1} ago"))}function t(a){var b=document.createElement("img");b.className="geCommentBusyImg";b.src=IMAGE_PATH+"/spin.gif";a.appendChild(b);a.busyImg=b}function f(a){a.style.border="1px solid red";a.removeChild(a.busyImg)}function l(a){a.style.border="";a.removeChild(a.busyImg)}function p(b,c,d,e,g){function B(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)});I.appendChild(e);d&&(e.style.display="none")}function D(){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=z;a(b);return{pdiv:d,replies:c}}function E(c,d,g,k,n){function v(){t(u);b.addReply(x,function(a){x.id=a;b.replies.push(x);l(u);g&&g()},function(b){q();f(u);a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},k,n)}function q(){m(x, -u,function(a){v()},!0)}var B=D().pdiv,x=a.newComment(c,a.getCurrentUser());x.pCommentId=b.id;null==b.replies&&(b.replies=[]);var u=p(x,b.replies,B,e+1);d?q():v()}if(g||!b.isResolved){v.style.display="none";var z=document.createElement("div");z.className="geCommentContainer";z.setAttribute("data-commentId",b.id);z.style.marginLeft=20*e+5+"px";b.isResolved&&"dark"!=uiTheme&&(z.style.backgroundColor="ghostWhite");var A=document.createElement("div");A.className="geCommentHeader";var J=document.createElement("img"); -J.className="geCommentUserImg";J.src=b.user.pictureUrl||Editor.userImage;A.appendChild(J);J=document.createElement("div");J.className="geCommentHeaderTxt";A.appendChild(J);var F=document.createElement("div");F.className="geCommentUsername";mxUtils.write(F,b.user.displayName||"");J.appendChild(F);F=document.createElement("div");F.className="geCommentDate";F.setAttribute("data-commentId",b.id);n(b,F);J.appendChild(F);z.appendChild(A);A=document.createElement("div");A.className="geCommentTxt";mxUtils.write(A, -b.content||"");z.appendChild(A);A=document.createElement("div");A.className="geCommentActions";var I=document.createElement("ul");I.className="geCommentActionsList";A.appendChild(I);u||0!=e&&!y||B(mxResources.get("reply"),function(){E("",!0)},b.isResolved);J=a.getCurrentUser();null==J||J.id!=b.user.id||u||(B(mxResources.get("edit"),function(){function c(){m(b,z,function(){t(z);b.editComment(b.content,function(){l(z)},function(b){f(z);c();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})} -c()},b.isResolved),B(mxResources.get("delete"),function(){a.confirm(mxResources.get("areYouSure"),function(){t(z);b.deleteComment(function(){for(var a=D(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}v.style.display=0==C.getElementsByTagName("div").length?"block":"none"},function(b){f(z);a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},b.isResolved));u||0!=e||B(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=D(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);x||(e[g].style.display="none")}k()} -b.isResolved?E(mxResources.get("reOpened")+": ",!0,c,!1,!0):E(mxResources.get("markedAsResolved"),!1,c,!0)});z.appendChild(A);null!=d?C.insertBefore(z,d.nextSibling):C.appendChild(z);for(d=0;null!=b.replies&&d<b.replies.length;d++)A=b.replies[d],A.isResolved=b.isResolved,p(A,b.replies,null,e+1,g);null!=q&&(q.comment.id==b.id?(g=b.content,b.content=q.comment.content,m(b,z,q.saveCallback,q.deleteOnCancel),b.content=g):null==q.comment.id&&q.comment.pCommentId==b.id&&(C.appendChild(q.div),m(q.comment, -q.div,q.saveCallback,q.deleteOnCancel)));return z}}var u=!a.canComment(),y=a.canReplyToReplies(),q=null,A=document.createElement("div");A.className="geCommentsWin";A.style.background="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;var z=EditorUi.compactUi?"26px":"30px",C=document.createElement("div");C.className="geCommentsList";C.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;C.style.bottom=parseInt(z)+7+"px";A.appendChild(C);var v=document.createElement("span"); -v.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(v,mxResources.get("noCommentsFound"));var B=document.createElement("div");B.className="geToolbarContainer geCommentsToolbar";B.style.height=z;B.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";B.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;mxClient.IS_QUIRKS&&(B.style.filter="none");z=document.createElement("a");z.className="geButton";mxClient.IS_QUIRKS&&(z.style.filter= -"none");if(!u){var D=z.cloneNode();D.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';D.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(D,"click",function(b){function c(){m(d,e,function(b){t(e);a.addComment(b,function(a){b.id=a;J.push(b);l(e)},function(b){f(e);c();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var d=a.newComment("",a.getCurrentUser()),e=p(d,J,null,0);c();b.preventDefault(); -mxEvent.consume(b)});B.appendChild(D)}D=z.cloneNode();D.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';D.setAttribute("title",mxResources.get("showResolved"));var x=!1;"dark"==uiTheme&&(D.style.filter="invert(100%)");mxEvent.addListener(D,"click",function(a){this.className=(x=!x)?"geButton geCheckedBtn":"geButton";H();a.preventDefault();mxEvent.consume(a)});B.appendChild(D);a.commentsRefreshNeeded()&&(D=z.cloneNode(),D.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">', -D.setAttribute("title",mxResources.get("refresh")),"dark"==uiTheme&&(D.style.filter="invert(100%)"),mxEvent.addListener(D,"click",function(a){H();a.preventDefault();mxEvent.consume(a)}),B.appendChild(D));a.commentsSaveNeeded()&&(z=z.cloneNode(),z.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',z.setAttribute("title",mxResources.get("save")),"dark"==uiTheme&&(z.style.filter="invert(100%)"),mxEvent.addListener(z,"click",function(a){e();a.preventDefault();mxEvent.consume(a)}), -B.appendChild(z));A.appendChild(B);var J=[],H=mxUtils.bind(this,function(){this.hasError=!1;if(null!=q){q.div=q.div.cloneNode(!0);var b=q.div.querySelector(".geCommentEditTxtArea"),c=q.div.querySelector(".geCommentEditBtns");q.comment.content=b.value;b.parentNode.removeChild(b);c.parentNode.removeChild(c)}C.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";y=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(v);v.style.display="block";J=a;for(a=0;a<J.length;a++)b(J[a].replies),p(J[a],J,null,0,x);null!=q&&null==q.comment.id&&null==q.comment.pCommentId&&(C.appendChild(q.div),m(q.comment,q.div,q.saveCallback, -q.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;B=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<J.length;d++)a(J[d])}});setInterval(B,6E4);this.refreshCommentsTime=B;this.window=new mxWindow(mxResources.get("comments"),A,c,b,d,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, +[d],"{1} ago"))}function q(a){var b=document.createElement("img");b.className="geCommentBusyImg";b.src=IMAGE_PATH+"/spin.gif";a.appendChild(b);a.busyImg=b}function f(a){a.style.border="1px solid red";a.removeChild(a.busyImg)}function l(a){a.style.border="";a.removeChild(a.busyImg)}function p(b,c,d,e,g){function x(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)});F.appendChild(e);d&&(e.style.display="none")}function D(){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 x(){q(u);b.addReply(A,function(a){A.id=a;b.replies.push(A);l(u);g&&g()},function(b){t();f(u);a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},k,n)}function t(){m(A, +u,function(a){x()},!0)}var B=D().pdiv,A=a.newComment(c,a.getCurrentUser());A.pCommentId=b.id;null==b.replies&&(b.replies=[]);var u=p(A,b.replies,B,e+1);d?t():x()}if(g||!b.isResolved){B.style.display="none";var y=document.createElement("div");y.className="geCommentContainer";y.setAttribute("data-commentId",b.id);y.style.marginLeft=20*e+5+"px";b.isResolved&&"dark"!=uiTheme&&(y.style.backgroundColor="ghostWhite");var z=document.createElement("div");z.className="geCommentHeader";var I=document.createElement("img"); +I.className="geCommentUserImg";I.src=b.user.pictureUrl||Editor.userImage;z.appendChild(I);I=document.createElement("div");I.className="geCommentHeaderTxt";z.appendChild(I);var G=document.createElement("div");G.className="geCommentUsername";mxUtils.write(G,b.user.displayName||"");I.appendChild(G);G=document.createElement("div");G.className="geCommentDate";G.setAttribute("data-commentId",b.id);n(b,G);I.appendChild(G);y.appendChild(z);z=document.createElement("div");z.className="geCommentTxt";mxUtils.write(z, +b.content||"");y.appendChild(z);z=document.createElement("div");z.className="geCommentActions";var F=document.createElement("ul");F.className="geCommentActionsList";z.appendChild(F);u||0!=e&&!v||x(mxResources.get("reply"),function(){E("",!0)},b.isResolved);I=a.getCurrentUser();null==I||I.id!=b.user.id||u||(x(mxResources.get("edit"),function(){function c(){m(b,y,function(){q(y);b.editComment(b.content,function(){l(y)},function(b){f(y);c();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})} +c()},b.isResolved),x(mxResources.get("delete"),function(){a.confirm(mxResources.get("areYouSure"),function(){q(y);b.deleteComment(function(){for(var a=D(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}B.style.display=0==C.getElementsByTagName("div").length?"block":"none"},function(b){f(y);a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},b.isResolved));u||0!=e||x(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=D(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);A||(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(z);null!=d?C.insertBefore(y,d.nextSibling):C.appendChild(y);for(d=0;null!=b.replies&&d<b.replies.length;d++)z=b.replies[d],z.isResolved=b.isResolved,p(z,b.replies,null,e+1,g);null!=t&&(t.comment.id==b.id?(g=b.content,b.content=t.comment.content,m(b,y,t.saveCallback,t.deleteOnCancel),b.content=g):null==t.comment.id&&t.comment.pCommentId==b.id&&(C.appendChild(t.div),m(t.comment, +t.div,t.saveCallback,t.deleteOnCancel)));return y}}var u=!a.canComment(),v=a.canReplyToReplies(),t=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 B=document.createElement("span"); +B.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(B,mxResources.get("noCommentsFound"));var x=document.createElement("div");x.className="geToolbarContainer geCommentsToolbar";x.style.height=y;x.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";x.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;mxClient.IS_QUIRKS&&(x.style.filter="none");y=document.createElement("a");y.className="geButton";mxClient.IS_QUIRKS&&(y.style.filter= +"none");if(!u){var D=y.cloneNode();D.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';D.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(D,"click",function(b){function c(){m(d,e,function(b){q(e);a.addComment(b,function(a){b.id=a;I.push(b);l(e)},function(b){f(e);c();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var d=a.newComment("",a.getCurrentUser()),e=p(d,I,null,0);c();b.preventDefault(); +mxEvent.consume(b)});x.appendChild(D)}D=y.cloneNode();D.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';D.setAttribute("title",mxResources.get("showResolved"));var A=!1;"dark"==uiTheme&&(D.style.filter="invert(100%)");mxEvent.addListener(D,"click",function(a){this.className=(A=!A)?"geButton geCheckedBtn":"geButton";H();a.preventDefault();mxEvent.consume(a)});x.appendChild(D);a.commentsRefreshNeeded()&&(D=y.cloneNode(),D.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">', +D.setAttribute("title",mxResources.get("refresh")),"dark"==uiTheme&&(D.style.filter="invert(100%)"),mxEvent.addListener(D,"click",function(a){H();a.preventDefault();mxEvent.consume(a)}),x.appendChild(D));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){e();a.preventDefault();mxEvent.consume(a)}), +x.appendChild(y));z.appendChild(x);var I=[],H=mxUtils.bind(this,function(){this.hasError=!1;if(null!=t){t.div=t.div.cloneNode(!0);var b=t.div.querySelector(".geCommentEditTxtArea"),c=t.div.querySelector(".geCommentEditBtns");t.comment.content=b.value;b.parentNode.removeChild(b);c.parentNode.removeChild(c)}C.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";v=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(B);B.style.display="block";I=a;for(a=0;a<I.length;a++)b(I[a].replies),p(I[a],I,null,0,A);null!=t&&null==t.comment.id&&null==t.comment.pCommentId&&(C.appendChild(t.div),m(t.comment,t.div,t.saveCallback, +t.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;x=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<I.length;d++)a(I[d])}});setInterval(x,6E4);this.refreshCommentsTime=x;this.window=new mxWindow(mxResources.get("comments"),z,c,b,d,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 F=mxUtils.bind(this,function(){var a=this.window.getX(),b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window, -"resize",F);this.destroy=function(){mxEvent.removeListener(window,"resize",F);this.window.destroy()}},ConfirmDialog=function(a,c,b,d,g,e,k,m,n,t){var f=document.createElement("div");f.style.textAlign="center";var l=document.createElement("div");l.style.padding="6px";l.style.overflow="auto";l.style.maxHeight="44px";l.style.lineHeight="1.2em";mxClient.IS_QUIRKS&&(l.style.height="60px");mxUtils.write(l,c);f.appendChild(l);null!=t&&(l=document.createElement("div"),l.style.padding="6px 0 6px 0",c=document.createElement("img"), -c.setAttribute("src",t),l.appendChild(c),f.appendChild(l));t=document.createElement("div");t.style.textAlign="center";t.style.whiteSpace="nowrap";var p=document.createElement("input");p.setAttribute("type","checkbox");e=mxUtils.button(e||mxResources.get("cancel"),function(){a.hideDialog();null!=d&&d(p.checked)});e.className="geBtn";null!=m&&(e.innerHTML=m+"<br>"+e.innerHTML,e.style.paddingBottom="8px",e.style.paddingTop="8px",e.style.height="auto",e.style.width="40%");a.editor.cancelFirst&&t.appendChild(e); -var u=mxUtils.button(g||mxResources.get("ok"),function(){a.hideDialog();null!=b&&b(p.checked)});t.appendChild(u);null!=k?(u.innerHTML=k+"<br>"+u.innerHTML+"<br>",u.style.paddingBottom="8px",u.style.paddingTop="8px",u.style.height="auto",u.className="geBtn",u.style.width="40%"):u.className="geBtn gePrimaryBtn";a.editor.cancelFirst||t.appendChild(e);f.appendChild(t);n?(t.style.marginTop="10px",l=document.createElement("p"),l.style.marginTop="20px",l.appendChild(p),g=document.createElement("span"),mxUtils.write(g, -" "+mxResources.get("rememberThisSetting")),l.appendChild(g),f.appendChild(l),mxEvent.addListener(g,"click",function(a){p.checked=!p.checked;mxEvent.consume(a)})):t.style.marginTop="12px";this.init=function(){u.focus()};this.container=f};EditorUi.DIFF_INSERT="i";EditorUi.DIFF_REMOVE="r";EditorUi.DIFF_UPDATE="u";EditorUi.prototype.codec=new mxCodec;EditorUi.prototype.viewStateProperties={background:!0,backgroundImage:!0,shadowVisible:!0,foldingEnabled:!0,pageScale:!0,mathEnabled:!0,pageFormat:!0};EditorUi.prototype.cellProperties={id:!0,value:!0,xmlValue:!0,vertex:!0,edge:!0,visible:!0,collapsed:!0,connectable:!0,parent:!0,children:!0,previous:!0,source:!0,target:!0,edges:!0,geometry:!0,style:!0,mxObjectId:!0,mxTransient:!0}; -EditorUi.prototype.patchPages=function(a,c,b,d,g){var e={},k=[],m={},n={},t={},f={};if(null!=d&&null!=d[EditorUi.DIFF_UPDATE])for(var l in d[EditorUi.DIFF_UPDATE])e[l]=d[EditorUi.DIFF_UPDATE][l];if(null!=c[EditorUi.DIFF_REMOVE])for(d=0;d<c[EditorUi.DIFF_REMOVE].length;d++)n[c[EditorUi.DIFF_REMOVE][d]]=!0;if(null!=c[EditorUi.DIFF_INSERT])for(d=0;d<c[EditorUi.DIFF_INSERT].length;d++)m[c[EditorUi.DIFF_INSERT][d].previous]=c[EditorUi.DIFF_INSERT][d];if(null!=c[EditorUi.DIFF_UPDATE])for(l in c[EditorUi.DIFF_UPDATE])d= -c[EditorUi.DIFF_UPDATE][l],null!=d.previous&&(f[d.previous]=l);if(null!=a){var p="";for(d=0;d<a.length;d++){var u=a[d].getId();t[u]=a[d];null!=f[p]||n[u]||null!=c[EditorUi.DIFF_UPDATE]&&null!=c[EditorUi.DIFF_UPDATE][u]&&null!=c[EditorUi.DIFF_UPDATE][u].previous||(f[p]=u);p=u}}var y={},q=mxUtils.bind(this,function(a){var d=null!=a?a.getId():"";if(null!=a&&!y[d]){y[d]=!0;k.push(a);var l=null!=c[EditorUi.DIFF_UPDATE]?c[EditorUi.DIFF_UPDATE][d]:null;null!=l&&(this.updatePageRoot(a),null!=l.name&&a.setName(l.name), -null!=l.view&&this.patchViewState(a,l.view),null!=l.cells&&this.patchPage(a,l.cells,e[a.getId()],g),!b||null==l.cells&&null==l.view||(a.needsUpdate=!0))}a=f[d];null!=a&&(delete f[d],q(t[a]));a=m[d];null!=a&&(delete m[d],A(a))}),A=mxUtils.bind(this,function(a){a=mxUtils.parseXml(a.data).documentElement;a=new DiagramPage(a);this.updatePageRoot(a);var c=t[a.getId()];null==c?q(a):(c.root=a.root,this.currentPage==c?this.editor.graph.model.setRoot(c.root):b&&(c.needsUpdate=!0))});q();for(l in f)q(t[f[l]]), -delete f[l];for(l in m)A(m[l]),delete m[l];return k};EditorUi.prototype.patchViewState=function(a,c){if(null!=a.viewState&&null!=c){a==this.currentPage&&(a.viewState=this.editor.graph.getViewState());for(var b in c)a.viewState[b]=JSON.parse(c[b]);a==this.currentPage&&this.editor.graph.setViewState(a.viewState)}}; +"resize",F);this.destroy=function(){mxEvent.removeListener(window,"resize",F);this.window.destroy()}},ConfirmDialog=function(a,c,b,d,g,e,k,m,n,q){var f=document.createElement("div");f.style.textAlign="center";var l=document.createElement("div");l.style.padding="6px";l.style.overflow="auto";l.style.maxHeight="44px";l.style.lineHeight="1.2em";mxClient.IS_QUIRKS&&(l.style.height="60px");mxUtils.write(l,c);f.appendChild(l);null!=q&&(l=document.createElement("div"),l.style.padding="6px 0 6px 0",c=document.createElement("img"), +c.setAttribute("src",q),l.appendChild(c),f.appendChild(l));q=document.createElement("div");q.style.textAlign="center";q.style.whiteSpace="nowrap";var p=document.createElement("input");p.setAttribute("type","checkbox");e=mxUtils.button(e||mxResources.get("cancel"),function(){a.hideDialog();null!=d&&d(p.checked)});e.className="geBtn";null!=m&&(e.innerHTML=m+"<br>"+e.innerHTML,e.style.paddingBottom="8px",e.style.paddingTop="8px",e.style.height="auto",e.style.width="40%");a.editor.cancelFirst&&q.appendChild(e); +var u=mxUtils.button(g||mxResources.get("ok"),function(){a.hideDialog();null!=b&&b(p.checked)});q.appendChild(u);null!=k?(u.innerHTML=k+"<br>"+u.innerHTML+"<br>",u.style.paddingBottom="8px",u.style.paddingTop="8px",u.style.height="auto",u.className="geBtn",u.style.width="40%"):u.className="geBtn gePrimaryBtn";a.editor.cancelFirst||q.appendChild(e);f.appendChild(q);n?(q.style.marginTop="10px",l=document.createElement("p"),l.style.marginTop="20px",l.appendChild(p),g=document.createElement("span"),mxUtils.write(g, +" "+mxResources.get("rememberThisSetting")),l.appendChild(g),f.appendChild(l),mxEvent.addListener(g,"click",function(a){p.checked=!p.checked;mxEvent.consume(a)})):q.style.marginTop="12px";this.init=function(){u.focus()};this.container=f};EditorUi.DIFF_INSERT="i";EditorUi.DIFF_REMOVE="r";EditorUi.DIFF_UPDATE="u";EditorUi.prototype.codec=new mxCodec;EditorUi.prototype.viewStateProperties={background:!0,backgroundImage:!0,shadowVisible:!0,foldingEnabled:!0,pageScale:!0,mathEnabled:!0,pageFormat:!0};EditorUi.prototype.cellProperties={id:!0,value:!0,xmlValue:!0,vertex:!0,edge:!0,visible:!0,collapsed:!0,connectable:!0,parent:!0,children:!0,previous:!0,source:!0,target:!0,edges:!0,geometry:!0,style:!0,mxObjectId:!0,mxTransient:!0}; +EditorUi.prototype.patchPages=function(a,c,b,d,g){var e={},k=[],m={},n={},q={},f={};if(null!=d&&null!=d[EditorUi.DIFF_UPDATE])for(var l in d[EditorUi.DIFF_UPDATE])e[l]=d[EditorUi.DIFF_UPDATE][l];if(null!=c[EditorUi.DIFF_REMOVE])for(d=0;d<c[EditorUi.DIFF_REMOVE].length;d++)n[c[EditorUi.DIFF_REMOVE][d]]=!0;if(null!=c[EditorUi.DIFF_INSERT])for(d=0;d<c[EditorUi.DIFF_INSERT].length;d++)m[c[EditorUi.DIFF_INSERT][d].previous]=c[EditorUi.DIFF_INSERT][d];if(null!=c[EditorUi.DIFF_UPDATE])for(l in c[EditorUi.DIFF_UPDATE])d= +c[EditorUi.DIFF_UPDATE][l],null!=d.previous&&(f[d.previous]=l);if(null!=a){var p="";for(d=0;d<a.length;d++){var u=a[d].getId();q[u]=a[d];null!=f[p]||n[u]||null!=c[EditorUi.DIFF_UPDATE]&&null!=c[EditorUi.DIFF_UPDATE][u]&&null!=c[EditorUi.DIFF_UPDATE][u].previous||(f[p]=u);p=u}}var v={},t=mxUtils.bind(this,function(a){var d=null!=a?a.getId():"";if(null!=a&&!v[d]){v[d]=!0;k.push(a);var l=null!=c[EditorUi.DIFF_UPDATE]?c[EditorUi.DIFF_UPDATE][d]:null;null!=l&&(this.updatePageRoot(a),null!=l.name&&a.setName(l.name), +null!=l.view&&this.patchViewState(a,l.view),null!=l.cells&&this.patchPage(a,l.cells,e[a.getId()],g),!b||null==l.cells&&null==l.view||(a.needsUpdate=!0))}a=f[d];null!=a&&(delete f[d],t(q[a]));a=m[d];null!=a&&(delete m[d],z(a))}),z=mxUtils.bind(this,function(a){a=mxUtils.parseXml(a.data).documentElement;a=new DiagramPage(a);this.updatePageRoot(a);var c=q[a.getId()];null==c?t(a):(c.root=a.root,this.currentPage==c?this.editor.graph.model.setRoot(c.root):b&&(c.needsUpdate=!0))});t();for(l in f)t(q[f[l]]), +delete f[l];for(l in m)z(m[l]),delete m[l];return k};EditorUi.prototype.patchViewState=function(a,c){if(null!=a.viewState&&null!=c){a==this.currentPage&&(a.viewState=this.editor.graph.getViewState());for(var b in c)a.viewState[b]=JSON.parse(c[b]);a==this.currentPage&&this.editor.graph.setViewState(a.viewState)}}; EditorUi.prototype.createParentLookup=function(a,c){function b(a){var b=d[a];null==b&&(b={inserted:[],moved:{}},d[a]=b);return b}var d={};if(null!=c[EditorUi.DIFF_INSERT])for(var g=0;g<c[EditorUi.DIFF_INSERT].length;g++){var e=c[EditorUi.DIFF_INSERT][g],k=null!=e.parent?e.parent:"",m=null!=e.previous?e.previous:"";b(k).inserted[m]=e}if(null!=c[EditorUi.DIFF_UPDATE])for(var n in c[EditorUi.DIFF_UPDATE])e=c[EditorUi.DIFF_UPDATE][n],null!=e.previous&&(k=e.parent,null==k&&(g=a.getCell(n),null!=g&&(g= a.getParent(g),null!=g&&(k=g.getId()))),null!=k&&(b(k).moved[e.previous]=n));return d}; -EditorUi.prototype.patchPage=function(a,c,b,d){var g=a==this.currentPage?this.editor.graph.model:new mxGraphModel(a.root),e=this.createParentLookup(g,c);g.beginUpdate();try{var k=g.updateEdgeParent,m=new mxDictionary,n=[];g.updateEdgeParent=function(a,b){!m.get(a)&&d&&(m.put(a,!0),n.push(a))};var t=e[""],f=null!=t&&null!=t.inserted?t.inserted[""]:null,l=null;null!=f&&(l=this.getCellForJson(f));if(null==l){var p=null!=t&&null!=t.moved?t.moved[""]:null;null!=p&&(l=g.getCell(p))}null!=l&&(g.setRoot(l), -a.root=l);this.patchCellRecursive(a,g,g.root,e,c);if(null!=c[EditorUi.DIFF_REMOVE])for(var u=0;u<c[EditorUi.DIFF_REMOVE].length;u++){var y=g.getCell(c[EditorUi.DIFF_REMOVE][u]);null!=y&&g.remove(y)}if(null!=c[EditorUi.DIFF_UPDATE]){var q=null!=b&&null!=b.cells?b.cells[EditorUi.DIFF_UPDATE]:null;for(p in c[EditorUi.DIFF_UPDATE])this.patchCell(g,g.getCell(p),c[EditorUi.DIFF_UPDATE][p],null!=q?q[p]:null)}if(null!=c[EditorUi.DIFF_INSERT])for(u=0;u<c[EditorUi.DIFF_INSERT].length;u++)f=c[EditorUi.DIFF_INSERT][u], -y=g.getCell(f.id),null!=y&&(g.setTerminal(y,g.getCell(f.source),!0),g.setTerminal(y,g.getCell(f.target),!1));g.updateEdgeParent=k;if(d&&0<n.length)for(u=0;u<n.length;u++)g.contains(n[u])&&g.updateEdgeParent(n[u])}finally{g.endUpdate()}}; -EditorUi.prototype.patchCellRecursive=function(a,c,b,d,g){if(null!=b){for(var e=d[b.getId()],k=null!=e&&null!=e.inserted?e.inserted:{},e=null!=e&&null!=e.moved?e.moved:{},m=0,n=c.getChildCount(b),t="",f=0;f<n;f++){var l=c.getChildAt(b,f).getId();null==e[t]&&(null==g[EditorUi.DIFF_UPDATE]||null==g[EditorUi.DIFF_UPDATE][l]||null==g[EditorUi.DIFF_UPDATE][l].previous&&null==g[EditorUi.DIFF_UPDATE][l].parent)&&(e[t]=l);t=l}n=mxUtils.bind(this,function(e,f){var k=null!=e?e.getId():"";if(null!=e&&f){var l= -c.getCell(k);null!=l&&l!=e&&(e=null)}null!=e&&(c.getChildAt(b,m)!=e&&c.add(b,e,m),this.patchCellRecursive(a,c,e,d,g),m++);return k});for(t=[null];0<t.length;)if(f=t.shift(),f=n(null!=f?f.child:null,null!=f?f.insert:!1),l=e[f],null!=l&&(delete e[f],t.push({child:c.getCell(l)})),l=k[f],null!=l&&(delete k[f],t.push({child:this.getCellForJson(l),insert:!0})),0==t.length){for(f in e)t.push({child:c.getCell(e[f])}),delete e[f];for(f in k)t.push({child:this.getCellForJson(k[f]),insert:!0}),delete k[f]}}}; +EditorUi.prototype.patchPage=function(a,c,b,d){var g=a==this.currentPage?this.editor.graph.model:new mxGraphModel(a.root),e=this.createParentLookup(g,c);g.beginUpdate();try{var k=g.updateEdgeParent,m=new mxDictionary,n=[];g.updateEdgeParent=function(a,b){!m.get(a)&&d&&(m.put(a,!0),n.push(a))};var q=e[""],f=null!=q&&null!=q.inserted?q.inserted[""]:null,l=null;null!=f&&(l=this.getCellForJson(f));if(null==l){var p=null!=q&&null!=q.moved?q.moved[""]:null;null!=p&&(l=g.getCell(p))}null!=l&&(g.setRoot(l), +a.root=l);this.patchCellRecursive(a,g,g.root,e,c);if(null!=c[EditorUi.DIFF_REMOVE])for(var u=0;u<c[EditorUi.DIFF_REMOVE].length;u++){var v=g.getCell(c[EditorUi.DIFF_REMOVE][u]);null!=v&&g.remove(v)}if(null!=c[EditorUi.DIFF_UPDATE]){var t=null!=b&&null!=b.cells?b.cells[EditorUi.DIFF_UPDATE]:null;for(p in c[EditorUi.DIFF_UPDATE])this.patchCell(g,g.getCell(p),c[EditorUi.DIFF_UPDATE][p],null!=t?t[p]:null)}if(null!=c[EditorUi.DIFF_INSERT])for(u=0;u<c[EditorUi.DIFF_INSERT].length;u++)f=c[EditorUi.DIFF_INSERT][u], +v=g.getCell(f.id),null!=v&&(g.setTerminal(v,g.getCell(f.source),!0),g.setTerminal(v,g.getCell(f.target),!1));g.updateEdgeParent=k;if(d&&0<n.length)for(u=0;u<n.length;u++)g.contains(n[u])&&g.updateEdgeParent(n[u])}finally{g.endUpdate()}}; +EditorUi.prototype.patchCellRecursive=function(a,c,b,d,g){if(null!=b){for(var e=d[b.getId()],k=null!=e&&null!=e.inserted?e.inserted:{},e=null!=e&&null!=e.moved?e.moved:{},m=0,n=c.getChildCount(b),q="",f=0;f<n;f++){var l=c.getChildAt(b,f).getId();null==e[q]&&(null==g[EditorUi.DIFF_UPDATE]||null==g[EditorUi.DIFF_UPDATE][l]||null==g[EditorUi.DIFF_UPDATE][l].previous&&null==g[EditorUi.DIFF_UPDATE][l].parent)&&(e[q]=l);q=l}n=mxUtils.bind(this,function(e,f){var k=null!=e?e.getId():"";if(null!=e&&f){var l= +c.getCell(k);null!=l&&l!=e&&(e=null)}null!=e&&(c.getChildAt(b,m)!=e&&c.add(b,e,m),this.patchCellRecursive(a,c,e,d,g),m++);return k});for(q=[null];0<q.length;)if(f=q.shift(),f=n(null!=f?f.child:null,null!=f?f.insert:!1),l=e[f],null!=l&&(delete e[f],q.push({child:c.getCell(l)})),l=k[f],null!=l&&(delete k[f],q.push({child:this.getCellForJson(l),insert:!0})),0==q.length){for(f in e)q.push({child:c.getCell(e[f])}),delete e[f];for(f in k)q.push({child:this.getCellForJson(k[f]),insert:!0}),delete k[f]}}}; EditorUi.prototype.patchCell=function(a,c,b,d){if(null!=c&&null!=b){if(null==d||null==d.xmlValue&&(null==d.value||""==d.value))"value"in b?a.setValue(c,b.value):null!=b.xmlValue&&a.setValue(c,mxUtils.parseXml(b.xmlValue).documentElement);null!=d&&null!=d.style||null==b.style||a.setStyle(c,b.style);null!=b.visible&&a.setVisible(c,1==b.visible);null!=b.collapsed&&a.setCollapsed(c,1==b.collapsed);null!=b.vertex&&(c.vertex=1==b.vertex);null!=b.edge&&(c.edge=1==b.edge);null!=b.connectable&&(c.connectable= 1==b.connectable);null!=b.geometry&&a.setGeometry(c,this.codec.decode(mxUtils.parseXml(b.geometry).documentElement));null!=b.source&&a.setTerminal(c,a.getCell(b.source),!0);null!=b.target&&a.setTerminal(c,a.getCell(b.target),!1);for(var g in b)this.cellProperties[g]||(c[g]=b[g])}}; EditorUi.prototype.getPagesForNode=function(a,c){var b=this.editor.extractGraphModel(a,!0);null!=b&&(a=b);var b=a.getElementsByTagName(c||"diagram"),d=[];if(0<b.length)for(var g=0;g<b.length;g++){var e=new DiagramPage(b[g]);this.updatePageRoot(e);d.push(e)}else"mxGraphModel"==a.nodeName&&(e=new DiagramPage(a.ownerDocument.createElement("diagram")),e.setName(mxResources.get("pageWithNumber",[1])),mxUtils.setTextContent(e.node,Graph.compressNode(a)),d.push(e));return d}; -EditorUi.prototype.diffPages=function(a,c){for(var b=[],d=[],g={},e={},k={},m=null,n=0;n<c.length;n++)e[c[n].getId()]={page:c[n],prev:m},m=c[n];m=null;for(n=0;n<a.length;n++){var t=a[n].getId(),f=e[t];if(null==f)d.push(t);else{var l=this.diffPage(a[n],f.page),p={};0<Object.keys(l).length&&(p.cells=l);l=this.diffViewState(a[n],f.page);0<Object.keys(l).length&&(p.view=l);if((null!=f.prev?null==m:null!=m)||null!=m&&null!=f.prev&&m.getId()!=f.prev.getId())p.previous=null!=f.prev?f.prev.getId():"";null!= -f.page.getName()&&a[n].getName()!=f.page.getName()&&(p.name=f.page.getName());0<Object.keys(p).length&&(k[t]=p)}delete e[a[n].getId()];m=a[n]}for(t in e)f=e[t],b.push({data:mxUtils.getXml(f.page.node),previous:null!=f.prev?f.prev.getId():""});0<Object.keys(k).length&&(g[EditorUi.DIFF_UPDATE]=k);0<d.length&&(g[EditorUi.DIFF_REMOVE]=d);0<b.length&&(g[EditorUi.DIFF_INSERT]=b);return g}; +EditorUi.prototype.diffPages=function(a,c){for(var b=[],d=[],g={},e={},k={},m=null,n=0;n<c.length;n++)e[c[n].getId()]={page:c[n],prev:m},m=c[n];m=null;for(n=0;n<a.length;n++){var q=a[n].getId(),f=e[q];if(null==f)d.push(q);else{var l=this.diffPage(a[n],f.page),p={};0<Object.keys(l).length&&(p.cells=l);l=this.diffViewState(a[n],f.page);0<Object.keys(l).length&&(p.view=l);if((null!=f.prev?null==m:null!=m)||null!=m&&null!=f.prev&&m.getId()!=f.prev.getId())p.previous=null!=f.prev?f.prev.getId():"";null!= +f.page.getName()&&a[n].getName()!=f.page.getName()&&(p.name=f.page.getName());0<Object.keys(p).length&&(k[q]=p)}delete e[a[n].getId()];m=a[n]}for(q in e)f=e[q],b.push({data:mxUtils.getXml(f.page.node),previous:null!=f.prev?f.prev.getId():""});0<Object.keys(k).length&&(g[EditorUi.DIFF_UPDATE]=k);0<d.length&&(g[EditorUi.DIFF_REMOVE]=d);0<b.length&&(g[EditorUi.DIFF_INSERT]=b);return g}; EditorUi.prototype.createCellLookup=function(a,c,b){b=null!=b?b:{};b[a.getId()]={cell:a,prev:c};var d=a.getChildCount();c=null;for(var g=0;g<d;g++){var e=a.getChildAt(g);this.createCellLookup(e,c,b);c=e}return b}; EditorUi.prototype.diffCellRecursive=function(a,c,b,d,g){d=null!=d?d:{};var e=b[a.getId()];delete b[a.getId()];if(null==e)g.push(a.getId());else{var k=this.diffCell(a,e.cell);if(null!=k.parent||(null!=e.prev?null==c:null!=c)||null!=c&&null!=e.prev&&c.getId()!=e.prev.getId())k.previous=null!=e.prev?e.prev.getId():"";0<Object.keys(k).length&&(d[a.getId()]=k)}e=a.getChildCount();c=null;for(k=0;k<e;k++){var m=a.getChildAt(k);this.diffCellRecursive(m,c,b,d,g);c=m}return d}; EditorUi.prototype.diffPage=function(a,c){var b=[],d=[],g={};this.updatePageRoot(a);this.updatePageRoot(c);var e=this.createCellLookup(c.root),k=this.diffCellRecursive(a.root,null,e,k,d),m;for(m in e){var n=e[m];b.push(this.getJsonForCell(n.cell,n.prev))}0<Object.keys(k).length&&(g[EditorUi.DIFF_UPDATE]=k);0<d.length&&(g[EditorUi.DIFF_REMOVE]=d);0<b.length&&(g[EditorUi.DIFF_INSERT]=b);return g}; @@ -8891,14 +8905,14 @@ DrawioFileSync.prototype.isValidState=function(){return this.ui.getCurrentFile() DrawioFileSync.prototype.fileChangedNotify=function(){if(this.isValidState())if(this.file.savingFile)this.remoteFileChanged=!0;else var a=this.fileChanged(mxUtils.bind(this,function(a){this.updateStatus()}),mxUtils.bind(this,function(a){this.file.handleFileError(a)}),mxUtils.bind(this,function(){return!this.file.savingFile&&this.notifyThread!=a}))}; DrawioFileSync.prototype.fileChanged=function(a,c,b){var d=window.setTimeout(mxUtils.bind(this,function(){null!=b&&b()||(this.isValidState()?this.file.loadPatchDescriptor(mxUtils.bind(this,function(d){null!=b&&b()||(this.isValidState()?this.catchup(d,a,c,b):null!=c&&c())}),c):null!=c&&c())}),0);return this.notifyThread=d}; DrawioFileSync.prototype.reloadDescriptor=function(){this.file.loadDescriptor(mxUtils.bind(this,function(a){null!=a?(this.file.setDescriptorEtag(a,this.file.getCurrentEtag()),this.updateDescriptor(a),this.fileChangedNotify()):(this.file.inConflictState=!0,this.file.handleFileError())}),mxUtils.bind(this,function(a){this.file.inConflictState=!0;this.file.handleFileError(a)}))};DrawioFileSync.prototype.updateDescriptor=function(a){this.file.setDescriptor(a);this.file.descriptorChanged();this.start()}; -DrawioFileSync.prototype.catchup=function(a,c,b,d){if(null==d||!d()){var g=this.file.getDescriptorSecret(a),e=this.file.getDescriptorEtag(a),k=this.file.getCurrentEtag();if(k==e)null!=c&&c();else if(this.isValidState()){var m=0,n=!1,t=mxUtils.bind(this,function(){if(null==d||!d())if(k!=this.file.getCurrentEtag())null!=c&&c();else if(this.isValidState()){var f=!0,l=window.setTimeout(mxUtils.bind(this,function(){f=!1;this.reload(c,b,d)}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+ -"&from="+encodeURIComponent(k)+"&to="+encodeURIComponent(e)+(null!=g?"&secret="+encodeURIComponent(g):""),mxUtils.bind(this,function(e){this.file.stats.bytesReceived+=e.getText().length;window.clearTimeout(l);if(f&&(null==d||!d()))if(k!=this.file.getCurrentEtag())null!=c&&c();else if(this.isValidState()){var g=null,p=[];if(200<=e.getStatus()&&299>=e.getStatus()&&0<e.getText().length)try{var q=JSON.parse(e.getText());if(null!=q&&0<q.length)for(var A=0;A<q.length;A++){var z=this.stringToObject(q[A]); -if(z.v>DrawioFileSync.PROTOCOL){n=!0;p=[];break}else if(z.v===DrawioFileSync.PROTOCOL&&null!=z.d)g=z.d.checksum,p.push(z.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,g,a,c,b,d)):m<=this.maxCacheReadyRetries&&!n&&401!=e.getStatus()?(m++,this.file.stats.cacheMiss++,window.setTimeout(t,(m+1)*this.cacheReadyDelay)):(this.file.stats.cacheFail++,this.reload(c,b,d))}catch(C){null!=b&&b(C)}}else null!= -b&&b()}))}else null!=b&&b()});window.setTimeout(t,this.cacheReadyDelay)}else null!=b&&b()}};DrawioFileSync.prototype.reload=function(a,c,b,d){this.file.updateFile(mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.updateStatus();this.start();null!=a&&a()}),mxUtils.bind(this,function(a){null!=c&&c(a)}),b,d)}; +DrawioFileSync.prototype.catchup=function(a,c,b,d){if(null==d||!d()){var g=this.file.getDescriptorSecret(a),e=this.file.getDescriptorEtag(a),k=this.file.getCurrentEtag();if(k==e)null!=c&&c();else if(this.isValidState()){var m=0,n=!1,q=mxUtils.bind(this,function(){if(null==d||!d())if(k!=this.file.getCurrentEtag())null!=c&&c();else if(this.isValidState()){var f=!0,l=window.setTimeout(mxUtils.bind(this,function(){f=!1;this.reload(c,b,d)}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+ +"&from="+encodeURIComponent(k)+"&to="+encodeURIComponent(e)+(null!=g?"&secret="+encodeURIComponent(g):""),mxUtils.bind(this,function(e){this.file.stats.bytesReceived+=e.getText().length;window.clearTimeout(l);if(f&&(null==d||!d()))if(k!=this.file.getCurrentEtag())null!=c&&c();else if(this.isValidState()){var g=null,p=[];if(200<=e.getStatus()&&299>=e.getStatus()&&0<e.getText().length)try{var t=JSON.parse(e.getText());if(null!=t&&0<t.length)for(var z=0;z<t.length;z++){var y=this.stringToObject(t[z]); +if(y.v>DrawioFileSync.PROTOCOL){n=!0;p=[];break}else if(y.v===DrawioFileSync.PROTOCOL&&null!=y.d)g=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,g,a,c,b,d)):m<=this.maxCacheReadyRetries&&!n&&401!=e.getStatus()?(m++,this.file.stats.cacheMiss++,window.setTimeout(q,(m+1)*this.cacheReadyDelay)):(this.file.stats.cacheFail++,this.reload(c,b,d))}catch(C){null!=b&&b(C)}}else null!= +b&&b()}))}else null!=b&&b()});window.setTimeout(q,this.cacheReadyDelay)}else null!=b&&b()}};DrawioFileSync.prototype.reload=function(a,c,b,d){this.file.updateFile(mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.updateStatus();this.start();null!=a&&a()}),mxUtils.bind(this,function(a){null!=c&&c(a)}),b,d)}; DrawioFileSync.prototype.merge=function(a,c,b,d,g,e){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),m=this.file.getDescriptorEtag(b);if(!k){for(e=0;e<a.length;e++)this.file.shadowPages=this.ui.patchPages(this.file.shadowPages, -a[e]);var n=null!=c?this.ui.getHashValueForPages(this.file.shadowPages):null;"1"==urlParams.test&&EditorUi.debug("Sync.merge",[this],"from",this.file.getCurrentEtag(),"to",m,"backup",this.file.backupPatch,"attempt",this.catchupRetryCount,"patches",a,"checksum",c==n,c);if(null!=c&&c!=n){var t=this.ui.hashValue(this.file.getCurrentEtag()),f=this.ui.hashValue(m);this.file.checksumError(g,a,"From: "+t+"\nTo: "+f+"\nChecksum: "+c+"\nCurrent: "+n,m,"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(),b);this.file.backupPatch=null;null!=d&&d()}catch(u){this.file.inConflictState=!0;this.file.invalidChecksum=!0;this.file.descriptorChanged();null!=g&&g(u);try{if(this.file.errorReportsEnabled)t=this.ui.hashValue(this.file.getCurrentEtag()),f=this.ui.hashValue(m),this.file.sendErrorReport("Error in merge","From: "+t+"\nTo: "+f+"\nChecksum: "+c+"\nPatches:\n"+this.file.compressReportData(JSON.stringify(a, -null,2)),u);else{var l=this.file.getCurrentUser(),p=null!=l?l.id:"unknown";EditorUi.logError("Error in merge",null,this.file.getMode()+"."+this.file.getId(),p,u)}}catch(y){}}}; +a[e]);var n=null!=c?this.ui.getHashValueForPages(this.file.shadowPages):null;"1"==urlParams.test&&EditorUi.debug("Sync.merge",[this],"from",this.file.getCurrentEtag(),"to",m,"backup",this.file.backupPatch,"attempt",this.catchupRetryCount,"patches",a,"checksum",c==n,c);if(null!=c&&c!=n){var q=this.ui.hashValue(this.file.getCurrentEtag()),f=this.ui.hashValue(m);this.file.checksumError(g,a,"From: "+q+"\nTo: "+f+"\nChecksum: "+c+"\nCurrent: "+n,m,"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(),b);this.file.backupPatch=null;null!=d&&d()}catch(u){this.file.inConflictState=!0;this.file.invalidChecksum=!0;this.file.descriptorChanged();null!=g&&g(u);try{if(this.file.errorReportsEnabled)q=this.ui.hashValue(this.file.getCurrentEtag()),f=this.ui.hashValue(m),this.file.sendErrorReport("Error in merge","From: "+q+"\nTo: "+f+"\nChecksum: "+c+"\nPatches:\n"+this.file.compressReportData(JSON.stringify(a, +null,2)),u);else{var l=this.file.getCurrentUser(),p=null!=l?l.id:"unknown";EditorUi.logError("Error in merge",null,this.file.getMode()+"."+this.file.getId(),p,u)}}catch(v){}}}; DrawioFileSync.prototype.descriptorChanged=function(a){this.lastModified=this.file.getLastModifiedDate();if(null!=this.channelId){var c=this.objectToString(this.createMessage({a:"desc",m:this.lastModified.getTime()})),b=this.file.getCurrentEtag(),d=this.objectToString({});mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(a)+"&to="+encodeURIComponent(b)+"&msg="+encodeURIComponent(c)+"&data="+encodeURIComponent(d));this.file.stats.bytesSent+=d.length;this.file.stats.msgSent++}this.updateStatus()}; DrawioFileSync.prototype.objectToString=function(a){a=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,c,b,d){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);d=this.ui.getHashValueForPages(a);g=this.ui.diffPages(g,a);c=this.file.getDescriptorEtag(c); @@ -8914,7 +8928,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,c,b,d){};mxAsyncCanvas.prototype.roundrect=function(a,c,b,d,g,e){};mxAsyncCanvas.prototype.ellipse=function(a,c,b,d){};mxAsyncCanvas.prototype.rewriteImageSource=function(a){if("http://"==a.substring(0,7)||"https://"==a.substring(0,8))a="/proxy?url="+encodeURIComponent(a);return a}; mxAsyncCanvas.prototype.image=function(a,c,b,d,g,e,k,m){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,c,b,d,g,e,k,m,n,t,f,l){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,c,b,d,g,e,k,m,n,q,f,l){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,b,d,g){return b+b+d+d+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,c){this.state.dx+=a;this.state.dy+=c;this.ctx.translate(a,c)}; @@ -8929,9 +8943,9 @@ mxJsCanvas.prototype.setShadowOffset=function(a,c){this.state.shadowDx=a;this.st mxJsCanvas.prototype.arcTo=function(a,c,b,d,g,e,k){a=mxUtils.arcToCurves(this.lastMoveX,this.lastMoveY,a,c,b,d,g,e,k);if(null!=a)for(c=0;c<a.length;c+=6)this.curveTo(a[c],a[c+1],a[c+2],a[c+3],a[c+4],a[c+5])};mxJsCanvas.prototype.curveTo=function(a,c,b,d,g,e){this.ctx.bezierCurveTo(a,c,b,d,g,e);this.lastMoveX=g;this.lastMoveY=e};mxJsCanvas.prototype.rect=function(a,c,b,d){this.begin();this.moveTo(a,c);this.lineTo(a+b,c);this.lineTo(a+b,c+d);this.lineTo(a,c+d);this.close()}; mxJsCanvas.prototype.roundrect=function(a,c,b,d,g,e){this.begin();this.moveTo(a+g,c);this.lineTo(a+b-g,c);this.quadTo(a+b,c,a+b,c+e);this.lineTo(a+b,c+d-e);this.quadTo(a+b,c+d,a+b-g,c+d);this.lineTo(a+g,c+d);this.quadTo(a,c+d,a,c+d-e);this.lineTo(a,c+e);this.quadTo(a,c,a+g,c)};mxJsCanvas.prototype.ellipse=function(a,c,b,d){this.ctx.save();this.ctx.translate(a+b/2,c+d/2);this.ctx.scale(b/2,d/2);this.ctx.beginPath();this.ctx.arc(0,0,1,0,2*Math.PI,!1);this.ctx.restore()}; mxJsCanvas.prototype.rewriteImageSource=function(a){if("http://"==a.substring(0,7)||"https://"==a.substring(0,8))a="/proxy?url="+encodeURIComponent(a);return a}; -mxJsCanvas.prototype.image=function(a,c,b,d,g,e,k,m){g=this.rewriteImageSource(g);g=this.images[g];if(null!=g&&0<g.height&&0<g.width){var n=this.ctx;n.save();if(e){e=g.width;var t=g.height,f=Math.min(b/e,d/t);a+=(b-e*f)/2;c+=(d-t*f)/2;b=e*f;d=t*f}k&&(n.translate(2*a+b,0),n.scale(-1,1));m&&(n.translate(0,2*c+d),n.scale(1,-1));n.drawImage(g,a,c,b,d);n.restore()}};mxJsCanvas.prototype.begin=function(){this.ctx.beginPath()};mxJsCanvas.prototype.close=function(){this.ctx.closePath()}; +mxJsCanvas.prototype.image=function(a,c,b,d,g,e,k,m){g=this.rewriteImageSource(g);g=this.images[g];if(null!=g&&0<g.height&&0<g.width){var n=this.ctx;n.save();if(e){e=g.width;var q=g.height,f=Math.min(b/e,d/q);a+=(b-e*f)/2;c+=(d-q*f)/2;b=e*f;d=q*f}k&&(n.translate(2*a+b,0),n.scale(-1,1));m&&(n.translate(0,2*c+d),n.scale(1,-1));n.drawImage(g,a,c,b,d);n.restore()}};mxJsCanvas.prototype.begin=function(){this.ctx.beginPath()};mxJsCanvas.prototype.close=function(){this.ctx.closePath()}; mxJsCanvas.prototype.fill=function(){this.ctx.fill()};mxJsCanvas.prototype.stroke=function(){this.ctx.stroke()};mxJsCanvas.prototype.fillAndStroke=function(){if(this.state.shadow){this.ctx.stroke();this.ctx.fill();var a=this.ctx.shadowColor,c=this.ctx.shadowOffsetX,b=this.ctx.shadowOffsetY;this.ctx.shadowColor="transparent";this.ctx.shadowOffsetX=0;this.ctx.shadowOffsetY=0;this.ctx.stroke();this.ctx.shadowColor=a;this.ctx.shadowOffsetX=c;this.ctx.shadowOffsetY=b}else this.ctx.fill(),this.ctx.stroke()}; -mxJsCanvas.prototype.text=function(a,c,b,d,g,e,k,m,n,t,f,l){if(null!=g&&0!=g.length){b=this.state.scale;0!=l&&(this.ctx.translate(Math.round(a),Math.round(c)),this.ctx.rotate(l*Math.PI/180),this.ctx.translate(Math.round(-a),Math.round(-c)));if("html"==n){g=this.subCanvas[this.canvasIndex++];n=g.height;l=g.width;switch(k){case mxConstants.ALIGN_MIDDLE:c-=n/2/b;break;case mxConstants.ALIGN_BOTTOM:c-=n/b}switch(e){case mxConstants.ALIGN_CENTER:a-=l/2/b;break;case mxConstants.ALIGN_RIGHT:a-=l/b}this.ctx.save(); +mxJsCanvas.prototype.text=function(a,c,b,d,g,e,k,m,n,q,f,l){if(null!=g&&0!=g.length){b=this.state.scale;0!=l&&(this.ctx.translate(Math.round(a),Math.round(c)),this.ctx.rotate(l*Math.PI/180),this.ctx.translate(Math.round(-a),Math.round(-c)));if("html"==n){g=this.subCanvas[this.canvasIndex++];n=g.height;l=g.width;switch(k){case mxConstants.ALIGN_MIDDLE:c-=n/2/b;break;case mxConstants.ALIGN_BOTTOM:c-=n/b}switch(e){case mxConstants.ALIGN_CENTER:a-=l/2/b;break;case mxConstants.ALIGN_RIGHT:a-=l/b}this.ctx.save(); if(null!=this.state.fontBackgroundColor||null!=this.state.fontBorderColor)null!=this.state.fontBackgroundColor&&(this.ctx.fillStyle=this.state.fontBackgroundColor,this.ctx.fillRect(Math.round(a)-.5,Math.round(c)-.5,Math.round(g.width/b),Math.round(g.height/b))),null!=this.state.fontBorderColor&&(this.ctx.strokeStyle=this.state.fontBorderColor,this.ctx.lineWidth=1,this.ctx.strokeRect(Math.round(a)-.5,Math.round(c)-.5,Math.round(g.width/b),Math.round(g.height/b)));this.ctx.scale(1/b,1/b);this.ctx.drawImage(g, Math.round(a*b),Math.round(c*b))}else{this.ctx.save();this.updateFont();l=document.createElement("div");l.innerHTML=g;l.style.position="absolute";l.style.top="-9999px";l.style.left="-9999px";l.style.fontFamily=this.state.fontFamily;l.style.fontWeight="bold";l.style.fontSize=this.state.fontSize+"pt";document.body.appendChild(l);n=[l.offsetWidth,l.offsetHeight];document.body.removeChild(l);g=g.split("\n");l=n[1];this.ctx.textBaseline="top";n=c;switch(k){case mxConstants.ALIGN_MIDDLE:this.ctx.textBaseline= "middle";c-=(g.length-1)*l/2;n=c-this.state.fontSize/2;break;case mxConstants.ALIGN_BOTTOM:this.ctx.textBaseline="alphabetic",c-=l*(g.length-1),n=c-this.state.fontSize}k=[];l=[];for(b=0;b<g.length;b++)l[b]=a,k[b]=this.ctx.measureText(g[b]).width,null!=e&&e!=mxConstants.ALIGN_LEFT&&(l[b]-=k[b],e==mxConstants.ALIGN_CENTER&&(l[b]+=k[b]/2));if(null!=this.state.fontBackgroundColor||null!=this.state.fontBorderColor){a=l[0];e=k[0];for(b=1;b<g.length;b++)a=Math.min(a,l[b]),e=Math.max(e,k[b]);this.ctx.save(); @@ -8944,8 +8958,8 @@ DriveFile.prototype.isConflict=function(a){return null!=a&&null!=a.error&&412==a DriveFile.prototype.getPublicUrl=function(a){gapi.client.drive.permissions.list({fileId:this.desc.id}).execute(mxUtils.bind(this,function(c){if(null!=c&&null!=c.items)for(var b=0;b<c.items.length;b++)if("anyoneWithLink"===c.items[b].id||"anyone"===c.items[b].id){a(this.desc.webContentLink);return}a(null)}))};DriveFile.prototype.isAutosaveOptional=function(){return!0};DriveFile.prototype.isRenamable=function(){return this.isEditable()&&DrawioFile.prototype.isEditable.apply(this,arguments)}; DriveFile.prototype.isMovable=function(){return this.isEditable()};DriveFile.prototype.save=function(a,c,b,d,g){DrawioFile.prototype.save.apply(this,[a,mxUtils.bind(this,function(){this.saveFile(null,a,c,b,d,g)}),b,d,g])}; DriveFile.prototype.saveFile=function(a,c,b,d,g,e){try{if(!this.isEditable())null!=b&&b();else if(!this.savingFile){var k=mxUtils.bind(this,function(a,e){var m=null,f=null;try{m=this.isModified;f=this.isModified();this.setModified(!1);this.savingFileTime=new Date;this.savingFile=!0;this.isModified=function(){return!0};var l=this.desc;this.ui.drive.saveFile(this,e,mxUtils.bind(this,function(a,e){try{this.savingFile=!1,this.isModified=m,0!=a?(c&&(this.lastAutosaveRevision=(new Date).getTime()),this.autosaveDelay= -Math.min(8E3,Math.max(this.saveDelay+500,DriveFile.prototype.autosaveDelay)),this.desc=a,this.fileSaved(e,l,mxUtils.bind(this,function(){this.contentChanged();null!=b&&b(a)}),d)):(this.setModified(f||this.isModified()),null!=d&&d(a))}catch(y){if(this.setModified(f||this.isModified()),null!=d)d(y);else throw y;}}),mxUtils.bind(this,function(b,c){try{this.savingFile=!1,this.isModified=m,this.setModified(f||this.isModified()),this.isConflict(b)?(this.inConflictState=!0,null!=this.sync?(this.savingFile= -!0,this.savingFileTime=new Date,this.sync.fileConflict(c,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){this.updateFileData();k(a,!0)}),100+500*Math.random())}),mxUtils.bind(this,function(){this.savingFile=!1;null!=d&&d()}))):null!=d&&d()):null!=d&&d(b)}catch(y){if(this.setModified(f||this.isModified()),null!=d)d(y);else throw y;}}),g,g,a)}catch(p){if(this.savingFile=!1,null!=m&&(this.isModified=m),null!=f&&this.setModified(f||this.isModified()),null!=d)d(p);else throw p; +Math.min(8E3,Math.max(this.saveDelay+500,DriveFile.prototype.autosaveDelay)),this.desc=a,this.fileSaved(e,l,mxUtils.bind(this,function(){this.contentChanged();null!=b&&b(a)}),d)):(this.setModified(f||this.isModified()),null!=d&&d(a))}catch(v){if(this.setModified(f||this.isModified()),null!=d)d(v);else throw v;}}),mxUtils.bind(this,function(b,c){try{this.savingFile=!1,this.isModified=m,this.setModified(f||this.isModified()),this.isConflict(b)?(this.inConflictState=!0,null!=this.sync?(this.savingFile= +!0,this.savingFileTime=new Date,this.sync.fileConflict(c,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){this.updateFileData();k(a,!0)}),100+500*Math.random())}),mxUtils.bind(this,function(){this.savingFile=!1;null!=d&&d()}))):null!=d&&d()):null!=d&&d(b)}catch(v){if(this.setModified(f||this.isModified()),null!=d)d(v);else throw v;}}),g,g,a)}catch(p){if(this.savingFile=!1,null!=m&&(this.isModified=m),null!=f&&this.setModified(f||this.isModified()),null!=d)d(p);else throw p; }});k(e,c)}}catch(m){if(null!=d)d(m);else throw m;}};DriveFile.prototype.copyFile=function(a,c){this.isRestricted()?DrawioFile.prototype.copyFile.apply(this,arguments):this.makeCopy(mxUtils.bind(this,function(){if(this.ui.spinner.spin(document.body,mxResources.get("saving")))try{this.save(!0,a,c)}catch(b){c(b)}}),c,!0)}; DriveFile.prototype.makeCopy=function(a,c,b){this.ui.spinner.spin(document.body,mxResources.get("saving"))&&this.saveAs(this.ui.getCopyFilename(this,b),mxUtils.bind(this,function(b){this.desc=b;this.ui.spinner.stop();this.setModified(!1);this.backupPatch=null;this.inConflictState=this.invalidChecksum=!1;this.descriptorChanged();a()}),mxUtils.bind(this,function(){this.ui.spinner.stop();null!=c&&c()}))};DriveFile.prototype.saveAs=function(a,c,b){this.ui.drive.copyFile(this.getId(),a,c,b)}; DriveFile.prototype.rename=function(a,c,b){var d=this.getCurrentEtag();this.ui.drive.renameFile(this.getId(),a,mxUtils.bind(this,function(g){this.hasSameExtension(a,this.getTitle())?(this.desc=g,this.descriptorChanged(),null!=this.sync&&this.sync.descriptorChanged(d),null!=c&&c(g)):(this.desc=g,null!=this.sync&&this.sync.descriptorChanged(d),this.save(!0,c,b))}),b)}; @@ -8970,7 +8984,7 @@ DriveClient.prototype.getUserId=function(){var a=null;null!=this.user&&(a=this.u DriveClient.prototype.execute=function(a){var c=mxUtils.bind(this,function(b){this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(b,c){this.authorize(!1,mxUtils.bind(this,function(){null!=c&&c();a()}),mxUtils.bind(this,function(a){var b=mxResources.get("cannotLogin");null!=a&&null!=a.error&&403==a.error.code&&null!=a.error.data&&0<a.error.data.length&&"domainPolicy"==a.error.data[0].reason&&(b=a.error.message);this.ui.drive.clearUserId();this.ui.drive.setUser(null);gapi.auth.signOut();this.ui.showError(mxResources.get("error"), b,mxResources.get("help"),mxUtils.bind(this,function(){this.ui.openLink("https://desk.draw.io/support/solutions/articles/16000074659")}),null,mxResources.get("ok"))}),b)}))});this.authorize(!0,a,c)}; DriveClient.prototype.executeRequest=function(a,c,b){try{var d=!0,g=null,e=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(){d=!1;null!=b&&b({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:k})}),this.ui.timeout),a.execute(mxUtils.bind(this,function(m){try{if(window.clearTimeout(g),d)if(null!=m&&null== -m.error)null!=c&&c(m);else{var n=null!=m&&null!=m.error?null!=m.error.data?m.error.data:m.error.errors:null,t=null!=n&&0<n.length?n[0].reason:null;null==b||null==m||null==m.error||-1!=m.error.code&&(403!=m.error.code||"domainPolicy"!=t&&"The requested mime type change is forbidden."!=m.error.message)?null!=m&&null!=m.error&&(401==m.error.code||403==m.error.code&&"rateLimitExceeded"!=t)?403==m.error.code&&null!=this.user||401==m.error.code&&null!=this.user&&"authError"==t?null!=b&&b(m):this.execute(k): +m.error)null!=c&&c(m);else{var n=null!=m&&null!=m.error?null!=m.error.data?m.error.data:m.error.errors:null,q=null!=n&&0<n.length?n[0].reason:null;null==b||null==m||null==m.error||-1!=m.error.code&&(403!=m.error.code||"domainPolicy"!=q&&"The requested mime type change is forbidden."!=m.error.message)?null!=m&&null!=m.error&&(401==m.error.code||403==m.error.code&&"rateLimitExceeded"!=q)?403==m.error.code&&null!=this.user||401==m.error.code&&null!=this.user&&"authError"==q?null!=b&&b(m):this.execute(k): null!=m&&null!=m.error&&412!=m.error.code&&404!=m.error.code&&400!=m.error.code&&this.currentRequest==a&&e<this.maxRetries?(e++,this.requestThread=window.setTimeout(k,Math.round(Math.pow(2,e)*(1+.1*(Math.random()-.5))*this.coolOff))):null!=b&&b(m):b(m)}}catch(f){if(null!=b)b(f);else throw f;}}))}catch(m){if(null!=b)b(m);else throw m;}});null==gapi.auth.getToken()?this.execute(k):k()}catch(m){if(null!=b)b(m);else throw m;}}; DriveClient.prototype.authorize=function(a,c,b,d){try{var g=this.getUserId();null!=this.ui.stateArg&&null!=this.ui.stateArg.userId&&(g=this.ui.stateArg.userId);if(a&&null==g)null!=b&&b();else{var e={scope:this.scopes,client_id:this.clientId};a&&null!=g?(e.immediate=!0,e.user_id=g):(e.immediate=!1,e.authuser=-1);gapi.auth.authorize(e,mxUtils.bind(this,function(e){try{null!=e&&null==e.error?null!=this.user&&a&&this.user.id==g?null!=c&&c():this.updateUser(c,b,d):null!=b&&b(e),this.resetTokenRefresh(e)}catch(m){if(null!= b)b(m);else throw m;}}))}}catch(k){if(null!=b)b(k);else throw k;}}; @@ -8987,22 +9001,22 @@ DriveClient.prototype.getRealtimeData=function(a,c,b,d){0>App.GOOGLE_REALTIME_EO function(){this.getRealtimeData(a,c,b,d+1)}),100*(d+1)):null!=b&&b({message:"realtime.get failed for "+a})}))};DriveClient.prototype.loadRealtime=function(a,c,b){"1"==urlParams.ignoremime||"420247213240"!=this.appId||"application/vnd.jgraph.mxfile.realtime"!=a.mimeType&&"application/mxr"!=a.mimeType?c():this.redirectToNewApp(b,a.id)}; DriveClient.prototype.getXmlFile=function(a,c,b,d,g){try{var e=gapi.auth.getToken().access_token,k=a.downloadUrl+"&access_token="+e;this.ui.loadUrl(k,mxUtils.bind(this,function(d){try{if(null==d)b({message:mxResources.get("invalidOrMissingFile")});else if(a.mimeType==this.libraryMimeType||g)a.mimeType!=this.libraryMimeType||g?c(new DriveLibrary(this.ui,d,a)):b({message:mxResources.get("notADiagramFile")});else{var e=!1;if(/\.png$/i.test(a.title)){var m=d.lastIndexOf(",");if(0<m){var f=this.ui.extractGraphModelFromPng(d.substring(m+ 1));if(null!=f&&0<f.length)d=f;else try{var f=d.substring(m+1),l=!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(f):atob(f),p=this.ui.editor.extractGraphModel(mxUtils.parseXml(l).documentElement,!0);null==p||0<p.getElementsByTagName("parsererror").length?e=!0:d=l}catch(u){e=!0}}}else"data:image/png;base64,PG14ZmlsZS"==d.substring(0,32)&&(l=d.substring(22),d=window.atob&&!mxClient.IS_SF?atob(l):Base64.decode(l));Graph.fileSupport&&(new XMLHttpRequest).upload&&this.ui.isRemoteFileFormat(d, -k)?this.ui.parseFile(new Blob([d],{type:"application/octet-stream"}),mxUtils.bind(this,function(d){try{4==d.readyState&&(200<=d.status&&299>=d.status?c(new LocalFile(this.ui,d.responseText,a.title+this.extension,!0)):null!=b&&b({message:mxResources.get("errorLoadingFile")}))}catch(y){if(null!=b)b(y);else throw y;}}),a.title):c(e?new LocalFile(this.ui,d,a.title,!0):new DriveFile(this.ui,d,a))}}catch(u){if(null!=b)b(u);else throw u;}}),b,null!=a.mimeType&&"image/"==a.mimeType.substring(0,6)&&"image/svg"!= +k)?this.ui.parseFile(new Blob([d],{type:"application/octet-stream"}),mxUtils.bind(this,function(d){try{4==d.readyState&&(200<=d.status&&299>=d.status?c(new LocalFile(this.ui,d.responseText,a.title+this.extension,!0)):null!=b&&b({message:mxResources.get("errorLoadingFile")}))}catch(v){if(null!=b)b(v);else throw v;}}),a.title):c(e?new LocalFile(this.ui,d,a.title,!0):new DriveFile(this.ui,d,a))}}catch(u){if(null!=b)b(u);else throw u;}}),b,null!=a.mimeType&&"image/"==a.mimeType.substring(0,6)&&"image/svg"!= a.mimeType.substring(0,9)||/\.png$/i.test(a.title)||/\.jpe?g$/i.test(a.title))}catch(m){if(null!=b)b(m);else throw m;}}; DriveClient.prototype.saveFile=function(a,c,b,d,g,e,k,m){try{a.saveLevel=1;var n=mxUtils.bind(this,function(b){a.saveLevel=null;if(null!=d)d(b);else throw b;try{if(!a.isConflict(b)){var c="error_"+(a.getErrorMessage(b)||"unknown");null!=b&&null!=b.error&&null!=b.error.code&&(c+="-code_"+b.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:c,label:(null!=this.user?"user_"+this.user.id:"nouser")+(null!=a.sync?"-client_"+a.sync.clientId:"-nosync")})}}catch(v){}}),t=mxUtils.bind(this,function(b){n(b);try{EditorUi.logError(b.message,null,null,b),EditorUi.sendReport("Critical error in DriveClient.saveFile "+(new Date).toISOString()+":\n\nBrowser="+navigator.userAgent+"\nFile="+a.desc.id+"."+a.desc.headRevisionId+ -"\nUser="+(null!=this.user?this.user.id:"nouser")+(null!=a.sync?"-client_"+a.sync.clientId:"-nosync")+"\nMessage="+b.message+"\n\nStack:\n"+b.stack)}catch(C){}});if(a.isEditable()&&null!=a.desc){var f=(new Date).getTime(),l=a.desc.etag,p=a.desc.modifiedDate,u=a.desc.headRevisionId,y=this.ui.useCanvasForExport&&/(\.png)$/i.test(a.getTitle());g=null!=g?g:!this.ui.isLegacyDriveDomain()||"1"==urlParams.ignoremime;e=null!=e?e:!1;var q=mxUtils.bind(this,function(d,g,v){try{a.saveLevel=3;var q=null,D=!1, -x={mimeType:a.desc.mimeType,title:a.getTitle()};this.isGoogleRealtimeMimeType(a.desc.mimeType)?(x.mimeType=this.xmlMimeType,q=a.desc,D=c=!0):"application/octet-stream"==x.mimeType&&(x.mimeType=this.xmlMimeType);a.constructor==DriveFile&&(null==m&&(m=[]),null==a.getChannelId()&&m.push({key:"channel",value:Editor.guid(32)}),null==a.getChannelKey()&&m.push({key:"key",value:Editor.guid(32)}),m.push({key:"secret",value:Editor.guid(32)}));v||(null!=d||e||(d=this.placeholderThumbnail,g=this.placeholderMimeType), -null!=d&&null!=g&&(x.thumbnail={image:d,mimeType:g}));var A=a.getData(),z=mxUtils.bind(this,function(d){try{a.saveDelay=(new Date).getTime()-f;var e=(new Date(d.modifiedDate)).getTime()-(new Date(p)).getTime();if(0>=e||l==d.etag||c&&u==d.headRevisionId){var g=[];0>=e&&g.push("invalid modified time");l==d.etag&&g.push("stale etag");c&&u==d.headRevisionId&&g.push("stale revision");var k=g.join(", ");n({message:mxResources.get("errorSavingFile")+": "+k},d);try{EditorUi.sendReport("Critical: Error saving to Google Drive "+ +(a.isAutosave()?"":"-noauto")+(a.changeListenerEnabled?"":"-nolisten")+(a.inConflictState?"-conflict":"")+(a.invalidChecksum?"-invalid":""),action:c,label:(null!=this.user?"user_"+this.user.id:"nouser")+(null!=a.sync?"-client_"+a.sync.clientId:"-nosync")})}}catch(B){}}),q=mxUtils.bind(this,function(b){n(b);try{EditorUi.logError(b.message,null,null,b),EditorUi.sendReport("Critical error in DriveClient.saveFile "+(new Date).toISOString()+":\n\nBrowser="+navigator.userAgent+"\nFile="+a.desc.id+"."+a.desc.headRevisionId+ +"\nUser="+(null!=this.user?this.user.id:"nouser")+(null!=a.sync?"-client_"+a.sync.clientId:"-nosync")+"\nMessage="+b.message+"\n\nStack:\n"+b.stack)}catch(C){}});if(a.isEditable()&&null!=a.desc){var f=(new Date).getTime(),l=a.desc.etag,p=a.desc.modifiedDate,u=a.desc.headRevisionId,v=this.ui.useCanvasForExport&&/(\.png)$/i.test(a.getTitle());g=null!=g?g:!this.ui.isLegacyDriveDomain()||"1"==urlParams.ignoremime;e=null!=e?e:!1;var t=mxUtils.bind(this,function(d,g,t){try{a.saveLevel=3;var x=null,B=!1, +A={mimeType:a.desc.mimeType,title:a.getTitle()};this.isGoogleRealtimeMimeType(a.desc.mimeType)?(A.mimeType=this.xmlMimeType,x=a.desc,B=c=!0):"application/octet-stream"==A.mimeType&&(A.mimeType=this.xmlMimeType);a.constructor==DriveFile&&(null==m&&(m=[]),null==a.getChannelId()&&m.push({key:"channel",value:Editor.guid(32)}),null==a.getChannelKey()&&m.push({key:"key",value:Editor.guid(32)}),m.push({key:"secret",value:Editor.guid(32)}));t||(null!=d||e||(d=this.placeholderThumbnail,g=this.placeholderMimeType), +null!=d&&null!=g&&(A.thumbnail={image:d,mimeType:g}));var z=a.getData(),y=mxUtils.bind(this,function(d){try{a.saveDelay=(new Date).getTime()-f;var e=(new Date(d.modifiedDate)).getTime()-(new Date(p)).getTime();if(0>=e||l==d.etag||c&&u==d.headRevisionId){var g=[];0>=e&&g.push("invalid modified time");l==d.etag&&g.push("stale etag");c&&u==d.headRevisionId&&g.push("stale revision");var k=g.join(", ");n({message:mxResources.get("errorSavingFile")+": "+k},d);try{EditorUi.sendReport("Critical: Error saving to Google Drive "+ (new Date).toISOString()+":\n\nBrowser="+navigator.userAgent+"\nFile="+a.desc.id+" "+a.desc.mimeType+"\nUser="+(null!=this.user?this.user.id:"nouser")+(null!=a.sync?"-client_"+a.sync.clientId:"-nosync")+"\nErrors="+k+"\nOld="+u+" "+p+" etag-hash="+this.ui.hashValue(l)+"\nNew="+d.headRevisionId+" "+d.modifiedDate+" etag-hash="+this.ui.hashValue(d.etag)),EditorUi.logError("Critical: Error saving to Google Drive "+a.desc.id,null,"from-"+u+"."+p+"-"+this.ui.hashValue(l)+"-to-"+d.headRevisionId+"."+d.modifiedDate+ -"-"+this.ui.hashValue(d.etag)+(0<k.length?"-errors-"+k:""),"user-"+(null!=this.user?this.user.id:"nouser")+(null!=a.sync?"-client_"+a.sync.clientId:"-nosync"))}catch(N){}}else{a.saveLevel=null;b(d,A);if(null!=q){this.executeRequest(gapi.client.drive.revisions.get({fileId:q.id,revisionId:q.headRevisionId,supportsTeamDrives:!0}),mxUtils.bind(this,mxUtils.bind(this,function(a){a.pinned=!0;this.executeRequest(gapi.client.drive.revisions.update({fileId:q.id,revisionId:q.headRevisionId,resource:a}))}))); -try{EditorUi.logEvent({category:a.convertedFrom+"-CONVERT-FILE-"+a.getHash(),action:"from_"+q.id+"."+q.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(N){}}try{EditorUi.logEvent({category:"SUCCESS-SAVE-FILE-"+a.getHash()+"-rev0_"+u+"-mod0_"+p,action:"rev-"+d.headRevisionId+"-mod_"+d.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(N){}}}catch(N){t(N)}}),F=mxUtils.bind(this,function(b,e){a.saveLevel=4;try{null!=m&&(x.properties=m);var f=k||a.constructor!=DriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?null:a.getCurrentEtag(),g=0,l=mxUtils.bind(this,function(d){a.saveLevel= -5;try{var k=a.desc.mimeType!=this.xmlMimeType&&a.desc.mimeType!=this.mimeType&&a.desc.mimeType!=this.libraryMimeType,m=!0,p=window.setTimeout(mxUtils.bind(this,function(){m=!1;n({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),4*this.ui.timeout);this.executeRequest(this.createUploadRequest(a.getId(),x,b,c||d||k,e,d?null:f,D),mxUtils.bind(this,function(a){window.clearTimeout(p);m&&z(a)}),mxUtils.bind(this,function(b){window.clearTimeout(p);if(m){a.saveLevel=6;try{a.isConflict(b)?this.executeRequest(gapi.client.drive.files.get({fileId:a.getId(), -fields:this.catchupFields,supportsTeamDrives:!0}),mxUtils.bind(this,function(c){a.saveLevel=7;try{if(null!=c&&c.etag==f)if(g<this.maxRetries)g++,window.setTimeout(l,2*g*this.coolOff*(1+.1*(Math.random()-.5)));else{l(!0);try{EditorUi.logError("Warning: Stale Etag Overwrite "+a.getHash(),null,a.desc.id+"."+a.desc.headRevisionId,(null!=this.user?"user_"+this.user.id:"nouser")+(null!=a.sync?"-client_"+a.sync.clientId:"-nosync"))}catch(fa){}}else n(b,c)}catch(fa){t(fa)}}),mxUtils.bind(this,function(){n(b)})): -n(b)}catch(ha){t(ha)}}}))}catch(Z){t(Z)}});if(y&&null==d){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,"_");x.thumbnail={image:c,mimeType:"image/png"};l(!1)}catch(W){l(!1)}});p.src="data:image/png;base64,"+b}else l(!1)}catch(X){t(X)}}); -y?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){F(a,!0)}),n,this.ui.getCurrentFile()!=a?A:null):F(A,!1)}catch(I){t(I)}}),A=mxUtils.bind(this,function(){try{if(a.saveLevel=2,e||y||a.constructor==DriveLibrary||!this.enableThumbnails||"0"==urlParams.thumb||null!=a.desc.mimeType&&"application/vnd.jgraph.mxfile"!=a.desc.mimeType.substring(0,29)||!this.ui.getThumbnail(this.thumbnailWidth,mxUtils.bind(this,function(b){try{var c=a.thumbTime=null;try{null!=b&&(c=b.toDataURL("image/png")),null!=c&&(c= -c.length>this.maxThumbnailSize?null:c.substring(c.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_"))}catch(v){c=null}q(c,"image/png")}catch(v){t(v)}})))a.thumbTime=null,q(null,null,a.constructor!=DriveLibrary)}catch(z){t(z)}});g||!c?A():this.verifyMimeType(a.getId(),A,!0)}else this.ui.editor.graph.reset(),n({message:mxResources.get("readOnly")})}catch(z){t(z)}}; +"-"+this.ui.hashValue(d.etag)+(0<k.length?"-errors-"+k:""),"user-"+(null!=this.user?this.user.id:"nouser")+(null!=a.sync?"-client_"+a.sync.clientId:"-nosync"))}catch(K){}}else{a.saveLevel=null;b(d,z);if(null!=x){this.executeRequest(gapi.client.drive.revisions.get({fileId:x.id,revisionId:x.headRevisionId,supportsTeamDrives:!0}),mxUtils.bind(this,mxUtils.bind(this,function(a){a.pinned=!0;this.executeRequest(gapi.client.drive.revisions.update({fileId:x.id,revisionId:x.headRevisionId,resource:a}))}))); +try{EditorUi.logEvent({category:a.convertedFrom+"-CONVERT-FILE-"+a.getHash(),action:"from_"+x.id+"."+x.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(K){}}try{EditorUi.logEvent({category:"SUCCESS-SAVE-FILE-"+a.getHash()+"-rev0_"+u+"-mod0_"+p,action:"rev-"+d.headRevisionId+"-mod_"+d.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(K){}}}catch(K){q(K)}}),C=mxUtils.bind(this,function(b,e){a.saveLevel=4;try{null!=m&&(A.properties=m);var f=k||a.constructor!=DriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?null:a.getCurrentEtag(),g=0,l=mxUtils.bind(this,function(d){a.saveLevel= +5;try{var k=a.desc.mimeType!=this.xmlMimeType&&a.desc.mimeType!=this.mimeType&&a.desc.mimeType!=this.libraryMimeType,m=!0,p=window.setTimeout(mxUtils.bind(this,function(){m=!1;n({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),4*this.ui.timeout);this.executeRequest(this.createUploadRequest(a.getId(),A,b,c||d||k,e,d?null:f,B),mxUtils.bind(this,function(a){window.clearTimeout(p);m&&y(a)}),mxUtils.bind(this,function(b){window.clearTimeout(p);if(m){a.saveLevel=6;try{a.isConflict(b)?this.executeRequest(gapi.client.drive.files.get({fileId:a.getId(), +fields:this.catchupFields,supportsTeamDrives:!0}),mxUtils.bind(this,function(c){a.saveLevel=7;try{if(null!=c&&c.etag==f)if(g<this.maxRetries)g++,window.setTimeout(l,2*g*this.coolOff*(1+.1*(Math.random()-.5)));else{l(!0);try{EditorUi.logError("Warning: Stale Etag Overwrite "+a.getHash(),null,a.desc.id+"."+a.desc.headRevisionId,(null!=this.user?"user_"+this.user.id:"nouser")+(null!=a.sync?"-client_"+a.sync.clientId:"-nosync"))}catch(fa){}}else n(b,c)}catch(fa){q(fa)}}),mxUtils.bind(this,function(){n(b)})): +n(b)}catch(ha){q(ha)}}}))}catch(Z){q(Z)}});if(v&&null==d){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,"_");A.thumbnail={image:c,mimeType:"image/png"};l(!1)}catch(W){l(!1)}});p.src="data:image/png;base64,"+b}else l(!1)}catch(X){q(X)}}); +v?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){C(a,!0)}),n,this.ui.getCurrentFile()!=a?z:null):C(z,!1)}catch(G){q(G)}}),z=mxUtils.bind(this,function(){try{if(a.saveLevel=2,e||v||a.constructor==DriveLibrary||!this.enableThumbnails||"0"==urlParams.thumb||null!=a.desc.mimeType&&"application/vnd.jgraph.mxfile"!=a.desc.mimeType.substring(0,29)||!this.ui.getThumbnail(this.thumbnailWidth,mxUtils.bind(this,function(b){try{var c=a.thumbTime=null;try{null!=b&&(c=b.toDataURL("image/png")),null!=c&&(c= +c.length>this.maxThumbnailSize?null:c.substring(c.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_"))}catch(B){c=null}t(c,"image/png")}catch(B){q(B)}})))a.thumbTime=null,t(null,null,a.constructor!=DriveLibrary)}catch(y){q(y)}});g||!c?z():this.verifyMimeType(a.getId(),z,!0)}else this.ui.editor.graph.reset(),n({message:mxResources.get("readOnly")})}catch(y){q(y)}}; DriveClient.prototype.verifyMimeType=function(a,c,b,d){null==this.lastMimeCheck&&(this.lastMimeCheck=0);var g=(new Date).getTime();if(b||g-this.lastMimeCheck>this.mimeTypeCheckCoolOff)this.lastMimeCheck=g,this.checkingMimeType||(this.checkingMimeType=!0,this.executeRequest(gapi.client.drive.files.get({fileId:a,fields:"mimeType",supportsTeamDrives:!0}),mxUtils.bind(this,function(b){this.checkingMimeType=!1;null!=b&&"application/vnd.jgraph.mxfile.realtime"==b.mimeType?this.redirectToNewApp(d,a):null!= c&&c()})))}; DriveClient.prototype.redirectToNewApp=function(a,c){this.ui.spinner.stop();if(!this.redirectDialogShowing){this.redirectDialogShowing=!0;var b=window.location.protocol+"//"+this.newAppHostname+"/"+this.ui.getSearch("create title mode url drive splash state".split(" "))+"#G"+c,d=mxUtils.bind(this,function(){this.redirectDialogShowing=!1;window.location.href==b?window.location.reload():window.location.href=b});null!=a?this.ui.confirm(mxResources.get("redirectToNewApp"),d,mxUtils.bind(this,function(){this.redirectDialogShowing= @@ -9012,7 +9026,7 @@ DriveClient.prototype.createUploadRequest=function(a,c,b,d,g,e,k){g=null!=g?g:!1 DriveClient.prototype.pickFile=function(a,c){this.filePickerCallback=null!=a?a:mxUtils.bind(this,function(a){this.ui.loadFile("G"+a)});this.filePicked=mxUtils.bind(this,function(a){a.action==google.picker.Action.PICKED&&this.filePickerCallback(a.docs[0].id)});this.ui.spinner.spin(document.body,mxResources.get("authorizing"))&&this.execute(mxUtils.bind(this,function(){try{this.ui.spinner.stop();var a=gapi.auth.getToken().access_token,d=c?"genericPicker":"filePicker",g=mxUtils.bind(this,function(a){"picker modal-dialog-bg picker-dialog-bg"== mxEvent.getSource(a).className&&(mxEvent.removeListener(document,"click",g),this[d].setVisible(!1))});if(null==this[d]||this[d+"Token"]!=a){this[d+"Token"]=a;var e=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0),k=(new google.picker.DocsView).setIncludeFolders(!0),m=(new google.picker.DocsView).setEnableTeamDrives(!0).setIncludeFolders(!0),n=(new google.picker.DocsUploadView).setIncludeFolders(!0);c?(e.setMimeTypes("*/*"),k.setMimeTypes("*/*"),m.setMimeTypes("*/*")): (e.setMimeTypes(this.mimeTypes),k.setMimeTypes(this.mimeTypes),m.setMimeTypes(this.mimeTypes));this[d]=(new google.picker.PickerBuilder).setOAuthToken(this[d+"Token"]).setLocale(mxLanguage).setAppId(this.appId).enableFeature(google.picker.Feature.SUPPORT_TEAM_DRIVES).addView(e).addView(k).addView(m).addView(google.picker.ViewId.RECENTLY_PICKED).addView(n).setCallback(mxUtils.bind(this,function(a){a.action!=google.picker.Action.PICKED&&a.action!=google.picker.Action.CANCEL||mxEvent.removeListener(document, -"click",g);a.action==google.picker.Action.PICKED&&this.filePicked(a)})).build()}mxEvent.addListener(document,"click",g);this[d].setVisible(!0)}catch(t){this.ui.spinner.stop(),this.ui.handleError(t)}}))}; +"click",g);a.action==google.picker.Action.PICKED&&this.filePicked(a)})).build()}mxEvent.addListener(document,"click",g);this[d].setVisible(!0)}catch(q){this.ui.spinner.stop(),this.ui.handleError(q)}}))}; DriveClient.prototype.pickFolder=function(a,c){this.folderPickerCallback=a;var b=mxUtils.bind(this,function(){try{this.ui.spinner.spin(document.body,mxResources.get("authorizing"))&&this.execute(mxUtils.bind(this,function(){try{this.ui.spinner.stop();var a=gapi.auth.getToken().access_token,b=mxUtils.bind(this,function(a){"picker modal-dialog-bg picker-dialog-bg"==mxEvent.getSource(a).className&&(mxEvent.removeListener(document,"click",b),this.folderPicker.setVisible(!1))});if(null==this.folderPicker|| this.folderPickerToken!=a){this.folderPickerToken=a;var c=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0).setMimeTypes("application/vnd.google-apps.folder"),k=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0).setMimeTypes("application/vnd.google-apps.folder"),m=(new google.picker.DocsView).setIncludeFolders(!0).setEnableTeamDrives(!0).setSelectFolderEnabled(!0).setMimeTypes("application/vnd.google-apps.folder"); this.folderPicker=(new google.picker.PickerBuilder).setSelectableMimeTypes("application/vnd.google-apps.folder").setOAuthToken(this.folderPickerToken).setLocale(mxLanguage).setAppId(this.appId).enableFeature(google.picker.Feature.SUPPORT_TEAM_DRIVES).addView(c).addView(k).addView(m).addView(google.picker.ViewId.RECENTLY_PICKED).setTitle(mxResources.get("pickFolder")).setCallback(mxUtils.bind(this,function(a){a.action!=google.picker.Action.PICKED&&a.action!=google.picker.Action.CANCEL||mxEvent.removeListener(document, @@ -9034,23 +9048,23 @@ c.objects[a.ref]:null}; DriveClient.prototype.jsonToCell=function(a,c){var b=new mxCell;b.id=a.cellId.json;b.vertex="vertex"==a.type.json;b.edge="edge"==a.type.json;b.connectable="0"!=a.connectable.json;b.collapsed="1"==a.collapsed.json;b.visible="0"!=a.visible.json;b.style=null!=a.style?a.style.json:null;b.value=null!=a.xmlValue?mxUtils.parseXml(a.xmlValue.json).documentElement:null!=a.value?a.value.json:null;b.geometry=null!=a.geometry?c.decode(mxUtils.parseXml(a.geometry.json).documentElement):null;return b}; DriveClient.prototype.checkRealtimeFiles=function(a){var c=null!=this.user&&null!=this.user.email?this.user.email:null;this.executeRequest(gapi.client.drive.files.list({maxResults:1,q:"mimeType='application/vnd.jgraph.mxfile.realtime'"+(null!=c?" and '"+c+"' in writers":""),includeTeamDriveItems:!0,supportsTeamDrives:!0}),mxUtils.bind(this,function(b){null!=b&&(null!=b.nextPageToken||null!=b.items&&0<b.items.length)&&a()}))}; DriveClient.prototype.convertRealtimeFiles=function(){var a=document.createElement("div");a.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;padding:8px;background:#ffffff;z-index:2;overflow:auto;white-space:nowrap;line-height:1.5em;";document.body.appendChild(a);var c=Date.now(),b=mxUtils.bind(this,function(b,c){a.innerHTML+=b+(c?"":"<br>");a.scrollTop=a.scrollHeight});0>App.GOOGLE_REALTIME_EOL-Date.now()?b("draw.io ("+EditorUi.VERSION+"): Google Realtime API export endpoint no longer available"): -(b("draw.io ("+EditorUi.VERSION+") is searching files to be converted..."),b('<a href="https://desk.draw.io/support/solutions/articles/16000092210" target="_blank">Click here for help</a>'),this.ui.spinner.spin(document.body,"Searching files...")?this.checkToken(mxUtils.bind(this,function(){var a={},g=0,e=0,k=0,m=0,n=0,t=0,f=0,l=0,p=0,u=null!=this.user&&null!=this.user.email?this.user.email:null,y="mimeType='application/vnd.jgraph.mxfile.realtime'"+(null!=u?" and '"+u+"' in writers":""),q=mxUtils.bind(this, +(b("draw.io ("+EditorUi.VERSION+") is searching files to be converted..."),b('<a href="https://desk.draw.io/support/solutions/articles/16000092210" target="_blank">Click here for help</a>'),this.ui.spinner.spin(document.body,"Searching files...")?this.checkToken(mxUtils.bind(this,function(){var a={},g=0,e=0,k=0,m=0,n=0,q=0,f=0,l=0,p=0,u=null!=this.user&&null!=this.user.email?this.user.email:null,v="mimeType='application/vnd.jgraph.mxfile.realtime'"+(null!=u?" and '"+u+"' in writers":""),t=mxUtils.bind(this, function(){this.ui.spinner.stop();b("<br>Conversion complete. Successfully converted "+g+" file(s).",!0);0<f?b(" Failed to convert "+f+' file(s).<br><br><b>ACTION REQUIRED:</b><br><ul><li>Click <a target="_blank" href="https://drive.google.com/drive/u/0/search?q=type:application/vnd.jgraph.mxfile.realtime">here</a> to list all affected files</li><li>Open each file in turn by right-clicking the file and selecting open with draw.io</li><li>Open each file in turn. When loaded, select File->Save</li></ul>'): -b("<br><br>This window can now be closed.");try{var a=Date.now()-c;EditorUi.logEvent({category:"AUTO-CONVERT",action:"total_"+l+"-done_"+g+"-fail_"+f+"-xml_"+k+"-json_"+e+"-load_"+m+"-save_"+t+"-invalid_"+n+"-dt-"+Math.round(a/1E3),label:null!=this.user?"user_"+this.user.id:"-nouser"})}catch(D){}}),A=function(a){return null==a?"":null!=a.message?a.message:null!=a.error&&null!=a.error.message?a.error.message:""},z=mxUtils.bind(this,function(){if(this.ui.spinner.spin(document.body,"Converting "+l+" file(s)")){b("Found "+ -l+" file(s). This will take up to "+Math.ceil(5E3*l/6E4)+" minute(s). <b>Please do not close this window!</b><br>");var c=0,d=mxUtils.bind(this,function(v,B){var x={maxResults:1,q:y,includeTeamDriveItems:!0,supportsTeamDrives:!0};null!=v&&(x.pageToken=v);var u=!0,D=window.setTimeout(mxUtils.bind(this,function(){u=!1;d(v,B)}),this.ui.timeout);this.executeRequest(gapi.client.drive.files.list(x),mxUtils.bind(this,function(x){window.clearTimeout(D);if(u){var E=mxUtils.bind(this,function(){null!=x.nextPageToken? -d(x.nextPageToken):q()});if(null!=x&&null!=x.error)p++,4>p?d(v,B):(this.ui.spinner.stop(),b("Query for next file failed multiple times. Exiting.<br><br>This window can now be closed."));else if(null==x||null!=x.items&&0!=x.items.length||null==x.nextPageToken)if(null!=x&&null!=x.items&&0<x.items.length){var y=x.items[0].id;this.ui.spinner.stop();c++;this.ui.spinner.spin(document.body,"Converting file "+c+" of "+l)&&(b("Converting "+c+" of "+l+': "'+mxUtils.htmlEntities(x.items[0].title)+'" (<a href="https://drive.google.com/open?id='+ -y+'" target="_blank">'+y+"</a>)... ",!0),window.setTimeout(mxUtils.bind(this,function(){null==a[y]?(u=a[y]=!0,D=window.setTimeout(mxUtils.bind(this,function(){u=!1;f++;m++;b('<img src="'+this.ui.editor.graph.warningImage.src+'" border="0" valign="absmiddle"/> Timeout');E()}),this.ui.timeout),this.getFile(y,mxUtils.bind(this,function(a){window.clearTimeout(D);u&&(a.constructor==DriveFile?("json"==a.convertedFrom?e++:k++,u=!0,D=window.setTimeout(mxUtils.bind(this,function(){u=!1;f++;t++;b('<img src="'+ -this.ui.editor.graph.warningImage.src+'" border="0" valign="absmiddle"/> Timeout');E()}),this.ui.timeout),this.saveFile(a,null,mxUtils.bind(this,function(){window.clearTimeout(D);u&&(g++,b('OK <img src="'+Editor.checkmarkImage+'" border="0" valign="middle"/>'),E())}),mxUtils.bind(this,function(a){window.clearTimeout(D);u&&(a=A(a),f++,t++,b('<img src="'+this.ui.editor.graph.warningImage.src+'" border="0" valign="absmiddle"/> '+a),E())}))):(f++,n++,b('<img src="'+this.ui.editor.graph.warningImage.src+ -'" border="0" valign="absmiddle"/> Invalid file'),E()))}),mxUtils.bind(this,function(a){window.clearTimeout(D);u&&(a=A(a),f++,m++,b('<img src="'+this.ui.editor.graph.warningImage.src+'" border="0" valign="absmiddle"/> '+a),E())}))):(this.ui.spinner.stop(),b("Search returned duplicate file "+y+". Exiting.<br><br>This window can now be closed."))}),null!=B?B:2E3))}else q();else d(x.nextPageToken,1E4)}}))});d()}}),C={maxResults:1E4,q:y,includeTeamDriveItems:!0,supportsTeamDrives:!0},v=mxUtils.bind(this, -function(a){null!=a&&(C.pageToken=a);this.executeRequest(gapi.client.drive.files.list(C),mxUtils.bind(this,function(a){l+=null!=a&&null!=a.items?a.items.length:0;null!=a.nextPageToken?v(a.nextPageToken):(this.ui.spinner.stop(),this.ui.showError("Confirm","You are about to convert "+l+" file(s)","Cancel",mxUtils.bind(this,function(){b("Cancelled by user.<br><br>This window can now be closed.")}),null,"OK",z,"Help",function(){window.open("https://desk.draw.io/support/solutions/articles/16000092210")}, -340,120))}))});v()})):(this.ui.spinner.stop(),b("Busy. <br><br>This window can now be closed.")))};DropboxFile=function(a,c,b){DrawioFile.call(this,a,c);this.stat=b};mxUtils.extend(DropboxFile,DrawioFile);DropboxFile.prototype.getId=function(){return this.stat.path_display.substring(1)};DropboxFile.prototype.getHash=function(){return"D"+encodeURIComponent(this.getId())};DropboxFile.prototype.getMode=function(){return App.MODE_DROPBOX};DropboxFile.prototype.isAutosaveOptional=function(){return!0};DropboxFile.prototype.getTitle=function(){return this.stat.name}; +b("<br><br>This window can now be closed.");try{var a=Date.now()-c;EditorUi.logEvent({category:"AUTO-CONVERT",action:"total_"+l+"-done_"+g+"-fail_"+f+"-xml_"+k+"-json_"+e+"-load_"+m+"-save_"+q+"-invalid_"+n+"-dt-"+Math.round(a/1E3),label:null!=this.user?"user_"+this.user.id:"-nouser"})}catch(D){}}),z=function(a){return null==a?"":null!=a.message?a.message:null!=a.error&&null!=a.error.message?a.error.message:""},y=mxUtils.bind(this,function(){if(this.ui.spinner.spin(document.body,"Converting "+l+" file(s)")){b("Found "+ +l+" file(s). This will take up to "+Math.ceil(5E3*l/6E4)+" minute(s). <b>Please do not close this window!</b><br>");var c=0,d=mxUtils.bind(this,function(x,B){var A={maxResults:1,q:v,includeTeamDriveItems:!0,supportsTeamDrives:!0};null!=x&&(A.pageToken=x);var D=!0,u=window.setTimeout(mxUtils.bind(this,function(){D=!1;d(x,B)}),this.ui.timeout);this.executeRequest(gapi.client.drive.files.list(A),mxUtils.bind(this,function(A){window.clearTimeout(u);if(D){var v=mxUtils.bind(this,function(){null!=A.nextPageToken? +d(A.nextPageToken):t()});if(null!=A&&null!=A.error)p++,4>p?d(x,B):(this.ui.spinner.stop(),b("Query for next file failed multiple times. Exiting.<br><br>This window can now be closed."));else if(null==A||null!=A.items&&0!=A.items.length||null==A.nextPageToken)if(null!=A&&null!=A.items&&0<A.items.length){var y=A.items[0].id;this.ui.spinner.stop();c++;this.ui.spinner.spin(document.body,"Converting file "+c+" of "+l)&&(b("Converting "+c+" of "+l+': "'+mxUtils.htmlEntities(A.items[0].title)+'" (<a href="https://drive.google.com/open?id='+ +y+'" target="_blank">'+y+"</a>)... ",!0),window.setTimeout(mxUtils.bind(this,function(){null==a[y]?(D=a[y]=!0,u=window.setTimeout(mxUtils.bind(this,function(){D=!1;f++;m++;b('<img src="'+this.ui.editor.graph.warningImage.src+'" border="0" valign="absmiddle"/> Timeout');v()}),this.ui.timeout),this.getFile(y,mxUtils.bind(this,function(a){window.clearTimeout(u);D&&(a.constructor==DriveFile?("json"==a.convertedFrom?e++:k++,D=!0,u=window.setTimeout(mxUtils.bind(this,function(){D=!1;f++;q++;b('<img src="'+ +this.ui.editor.graph.warningImage.src+'" border="0" valign="absmiddle"/> Timeout');v()}),this.ui.timeout),this.saveFile(a,null,mxUtils.bind(this,function(){window.clearTimeout(u);D&&(g++,b('OK <img src="'+Editor.checkmarkImage+'" border="0" valign="middle"/>'),v())}),mxUtils.bind(this,function(a){window.clearTimeout(u);D&&(a=z(a),f++,q++,b('<img src="'+this.ui.editor.graph.warningImage.src+'" border="0" valign="absmiddle"/> '+a),v())}))):(f++,n++,b('<img src="'+this.ui.editor.graph.warningImage.src+ +'" border="0" valign="absmiddle"/> Invalid file'),v()))}),mxUtils.bind(this,function(a){window.clearTimeout(u);D&&(a=z(a),f++,m++,b('<img src="'+this.ui.editor.graph.warningImage.src+'" border="0" valign="absmiddle"/> '+a),v())}))):(this.ui.spinner.stop(),b("Search returned duplicate file "+y+". Exiting.<br><br>This window can now be closed."))}),null!=B?B:2E3))}else t();else d(A.nextPageToken,1E4)}}))});d()}}),C={maxResults:1E4,q:v,includeTeamDriveItems:!0,supportsTeamDrives:!0},B=mxUtils.bind(this, +function(a){null!=a&&(C.pageToken=a);this.executeRequest(gapi.client.drive.files.list(C),mxUtils.bind(this,function(a){l+=null!=a&&null!=a.items?a.items.length:0;null!=a.nextPageToken?B(a.nextPageToken):(this.ui.spinner.stop(),this.ui.showError("Confirm","You are about to convert "+l+" file(s)","Cancel",mxUtils.bind(this,function(){b("Cancelled by user.<br><br>This window can now be closed.")}),null,"OK",y,"Help",function(){window.open("https://desk.draw.io/support/solutions/articles/16000092210")}, +340,120))}))});B()})):(this.ui.spinner.stop(),b("Busy. <br><br>This window can now be closed.")))};DropboxFile=function(a,c,b){DrawioFile.call(this,a,c);this.stat=b};mxUtils.extend(DropboxFile,DrawioFile);DropboxFile.prototype.getId=function(){return this.stat.path_display.substring(1)};DropboxFile.prototype.getHash=function(){return"D"+encodeURIComponent(this.getId())};DropboxFile.prototype.getMode=function(){return App.MODE_DROPBOX};DropboxFile.prototype.isAutosaveOptional=function(){return!0};DropboxFile.prototype.getTitle=function(){return this.stat.name}; DropboxFile.prototype.isRenamable=function(){return!0};DropboxFile.prototype.getSize=function(){return this.stat.size};DropboxFile.prototype.isRevisionHistorySupported=function(){return!0}; DropboxFile.prototype.getRevisions=function(a,c){var b=this.ui.dropbox.client.filesListRevisions({path:this.stat.path_lower,limit:100});b.then(mxUtils.bind(this,function(b){try{for(var d=[],e=b.entries.length-1;0<=e;e--)mxUtils.bind(this,function(a){d.push({modifiedDate:a.client_modified,fileSize:a.size,getXml:mxUtils.bind(this,function(b,c){this.ui.dropbox.readFile({path:this.stat.path_lower,rev:a.rev},b,c)}),getUrl:mxUtils.bind(this,function(b){return this.ui.getUrl(window.location.pathname+"?rev="+ a.rev+"&chrome=0&nav=1&layers=1&edit=_blank"+(null!=b?"&page="+b:""))+window.location.hash})})})(b.entries[e]);a(d)}catch(k){c(k)}}));b["catch"](function(a){c(a)})};DropboxFile.prototype.getLatestVersion=function(a,c){this.ui.dropbox.getFile(this.getId(),a,c)};DropboxFile.prototype.updateDescriptor=function(a){this.stat=a.stat};DropboxFile.prototype.save=function(a,c,b,d,g){this.doSave(this.getTitle(),a,c,b,d,g)};DropboxFile.prototype.saveAs=function(a,c,b){this.doSave(a,!1,c,b)}; DropboxFile.prototype.doSave=function(a,c,b,d,g,e){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,c,b,d,g,e)}),d,g,e])}; DropboxFile.prototype.saveFile=function(a,c,b,d){this.isEditable()?this.savingFile?null!=d&&d({code:App.ERROR_BUSY}):(c=mxUtils.bind(this,function(c){if(c){var e=null,g=null;try{e=this.isModified;g=this.isModified();this.savingFile=!0;this.savingFileTime=new Date;var m=mxUtils.bind(this,function(){this.setModified(!1);this.isModified=function(){return g}});m();var n=mxUtils.bind(this,function(c){var f=this.stat.path_display.lastIndexOf("/"),f=1<f?this.stat.path_display.substring(1,f+1):null;this.ui.dropbox.saveFile(a, c,mxUtils.bind(this,function(a){this.savingFile=!1;this.isModified=e;this.stat=a;this.contentChanged();null!=b&&b()}),mxUtils.bind(this,function(a){this.savingFile=!1;this.isModified=e;this.setModified(g||this.isModified());if(null!=d){if(null!=a&&null!=a.retry){var b=a.retry;a.retry=function(){m();b()}}d(a)}}),f)});this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle())?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){n(this.ui.base64ToBlob(a,"image/png"))}),d,this.ui.getCurrentFile()!= -this?this.getData():null):n(this.getData())}catch(t){if(this.savingFile=!1,null!=e&&(this.isModified=e),null!=g&&this.setModified(g||this.isModified()),null!=d)d(t);else throw t;}}else null!=d&&d()}),this.getTitle()==a?c(!0):this.ui.dropbox.checkExists(a,c)):null!=b&&b()}; +this?this.getData():null):n(this.getData())}catch(q){if(this.savingFile=!1,null!=e&&(this.isModified=e),null!=g&&this.setModified(g||this.isModified()),null!=d)d(q);else throw q;}}else null!=d&&d()}),this.getTitle()==a?c(!0):this.ui.dropbox.checkExists(a,c)):null!=b&&b()}; DropboxFile.prototype.rename=function(a,c,b){this.ui.dropbox.renameFile(this,a,mxUtils.bind(this,function(d){this.hasSameExtension(a,this.getTitle())?(this.stat=d,this.descriptorChanged(),null!=c&&c()):(this.stat=d,this.descriptorChanged(),this.save(!0,c,b))}),b)};DropboxLibrary=function(a,c,b){DropboxFile.call(this,a,c,b)};mxUtils.extend(DropboxLibrary,DropboxFile);DropboxLibrary.prototype.isAutosave=function(){return!0};DropboxLibrary.prototype.doSave=function(a,c,b){this.saveFile(a,!1,c,b)};DropboxLibrary.prototype.open=function(){};DropboxClient=function(a){DrawioClient.call(this,a,"dbauth");this.client=new Dropbox({clientId:App.DROPBOX_APPKEY});this.client.setAccessToken(this.token)};mxUtils.extend(DropboxClient,DrawioClient);DropboxClient.prototype.appPath="/drawio/";DropboxClient.prototype.extension=".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,c,b){var d=!0,g=window.setTimeout(mxUtils.bind(this,function(){d=!1;c({code:App.ERROR_TIMEOUT})}),this.ui.timeout),e=this.client.usersGetCurrentAccount();e.then(mxUtils.bind(this,function(b){window.clearTimeout(g);d&&(this.setUser(new DrawioUser(b.account_id,b.email,b.name.display_name)),a())}));e["catch"](mxUtils.bind(this,function(e){window.clearTimeout(g);d&&(null==e||401!==e.status||b?c({message:mxResources.get("accessDenied")}):(this.setUser(null), @@ -9061,8 +9075,8 @@ DropboxClient.prototype.executePromise=function(a,c,b){var d=mxUtils.bind(this,f e?b({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){g(!0)},b)})}):this.authenticate(function(){d(!0)},b)))}))}),g=mxUtils.bind(this,function(a){null==this.user?this.updateUser(function(){g(!0)},b,a):d(a)});null===this.client.getAccessToken()?this.authenticate(function(){g(!0)},b):g(!1)};DropboxClient.prototype.getLibrary=function(a,c,b){this.getFile(a,c,b,!0)}; DropboxClient.prototype.getFile=function(a,c,b,d){d=null!=d?d:!1;var g=/\.png$/i.test(a);if(/^https:\/\//i.test(a)||/\.v(dx|sdx?)$/i.test(a)||/\.gliffy$/i.test(a)||!this.ui.useCanvasForExport&&g){var e=mxUtils.bind(this,function(){var d=a.split("/");this.ui.convertFile(a,0<d.length?d[d.length-1]:a,null,this.extension,c,b)});null!=this.token?e():this.authenticate(e,b)}else e={path:"/"+a},null!=urlParams.rev&&(e.rev=urlParams.rev),this.readFile(e,mxUtils.bind(this,function(b,e){var k=g?b.lastIndexOf(","): -1,m=null;0<k&&(k=this.ui.extractGraphModelFromPng(b.substring(k+1)),null!=k&&0<k.length?b=k:m=new LocalFile(this,b,a,!0));c(null!=m?m:d?new DropboxLibrary(this.ui,b,e):new DropboxFile(this.ui,b,e))}),b,g)}; -DropboxClient.prototype.readFile=function(a,c,b,d){var g=mxUtils.bind(this,function(k){var m=!0,n=window.setTimeout(mxUtils.bind(this,function(){m=!1;b({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);m&&null!=a&&409==a.status&&(m=!1,b({message:mxResources.get("fileNotFound")}))});t=this.client.filesDownload(a);t.then(mxUtils.bind(this, -function(a){window.clearTimeout(n);if(m){m=!1;try{var e=new FileReader;e.onload=mxUtils.bind(this,function(b){c(e.result,a)});d?e.readAsDataURL(a.fileBlob):e.readAsText(a.fileBlob)}catch(p){b(p)}}}));t["catch"](mxUtils.bind(this,function(a){window.clearTimeout(n);m&&(m=!1,null==a||500!=a.status&&400!=a.status&&401!=a.status?b({message:mxResources.get("error")+" "+a.status}):(this.client.setAccessToken(null),this.setUser(null),k?b({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){e(!0)}, +DropboxClient.prototype.readFile=function(a,c,b,d){var g=mxUtils.bind(this,function(k){var m=!0,n=window.setTimeout(mxUtils.bind(this,function(){m=!1;b({code:App.ERROR_TIMEOUT})}),this.ui.timeout),q=this.client.filesGetMetadata({path:"/"+a.path.substring(1),include_deleted:!1});q.then(mxUtils.bind(this,function(a){}));q["catch"](function(a){window.clearTimeout(n);m&&null!=a&&409==a.status&&(m=!1,b({message:mxResources.get("fileNotFound")}))});q=this.client.filesDownload(a);q.then(mxUtils.bind(this, +function(a){window.clearTimeout(n);if(m){m=!1;try{var e=new FileReader;e.onload=mxUtils.bind(this,function(b){c(e.result,a)});d?e.readAsDataURL(a.fileBlob):e.readAsText(a.fileBlob)}catch(p){b(p)}}}));q["catch"](mxUtils.bind(this,function(a){window.clearTimeout(n);m&&(m=!1,null==a||500!=a.status&&400!=a.status&&401!=a.status?b({message:mxResources.get("error")+" "+a.status}):(this.client.setAccessToken(null),this.setUser(null),k?b({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){e(!0)}, b)})}):this.authenticate(function(){g(!0)},b)))}))}),e=mxUtils.bind(this,function(a){null==this.user?this.updateUser(function(){e(!0)},b,a):g(a)});null===this.client.getAccessToken()?this.authenticate(function(){e(!0)},b):e(!1)}; DropboxClient.prototype.checkExists=function(a,c,b){var d=this.client.filesGetMetadata({path:"/"+a.toLowerCase(),include_deleted:!1});this.executePromise(d,mxUtils.bind(this,function(d){b?c(!1,!0,d):this.ui.confirm(mxResources.get("replaceIt",[a]),function(){c(!0,!0,d)},function(){c(!1,!0,d)})}),function(a){c(!0,!1)})}; DropboxClient.prototype.renameFile=function(a,c,b,d){if(/[\\\/:\?\*"\|]/.test(c))d({message:mxResources.get("dropboxCharsNotAllowed")});else{if(null!=a&&null!=c){var g=a.stat.path_display.substring(1),e=g.lastIndexOf("/");0<e&&(c=g.substring(0,e+1)+c)}null!=a&&null!=c&&a.stat.path_lower.substring(1)!==c.toLowerCase()?this.checkExists(c,mxUtils.bind(this,function(e,g,n){e?(e=mxUtils.bind(this,function(e){e=this.client.filesMove({from_path:a.stat.path_display,to_path:"/"+c,autorename:!1});this.executePromise(e, @@ -9103,18 +9117,18 @@ OneDriveClient.prototype.getAccountTypeAndEndpoint=function(a,c){this.get(this.b OneDriveClient.prototype.executeRequest=function(a,c,b){var d=mxUtils.bind(this,function(g){var e=!0,k=window.setTimeout(mxUtils.bind(this,function(){e=!1;b({code:App.ERROR_TIMEOUT,retry:d})}),this.ui.timeout);this.get(a,mxUtils.bind(this,function(a){window.clearTimeout(k);e&&(200<=a.getStatus()&&299>=a.getStatus()||404==a.getStatus()?(null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0),c(a)):g||401!==a.getStatus()&&400!==a.getStatus()?b(this.parseRequestText(a)):this.authenticate(function(){d(!0)}, b,g))}),b)});null==this.token||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){d(!0)},b):d(!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 c=a.split("/");return 1<c.length?{driveId:c[0],id:c[1]}:{id:a}}; OneDriveClient.prototype.getItemURL=function(a,c){var b=a.split("/");return 1<b.length?(c?"":this.baseUrl)+"/drives/"+b[0]+"/items/"+b[1]:(c?"":this.baseUrl)+"/me/drive/items/"+a};OneDriveClient.prototype.getLibrary=function(a,c,b){this.getFile(a,c,b,!1,!0)}; -OneDriveClient.prototype.getFile=function(a,c,b,d,g){g=null!=g?g:!1;this.executeRequest(this.getItemURL(a),mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){var d=JSON.parse(a.getText()),e=/\.png$/i.test(d.name);if(/\.v(dx|sdx?)$/i.test(d.name)||/\.gliffy$/i.test(d.name)||!this.ui.useCanvasForExport&&e)this.ui.convertFile(d["@microsoft.graph.downloadUrl"],d.name,null!=d.file?d.file.mimeType:null,this.extension,c,b);else{var n=!0,t=window.setTimeout(mxUtils.bind(this,function(){n= -!1;b({code:App.ERROR_TIMEOUT})}),this.ui.timeout);this.ui.loadUrl(d["@microsoft.graph.downloadUrl"],mxUtils.bind(this,function(a){try{if(window.clearTimeout(t),n){var f=e?a.lastIndexOf(","):-1,k=null;if(0<f){var m=this.ui.extractGraphModelFromPng(a.substring(f+1));null!=m&&0<m.length?a=m:k=new LocalFile(this.ui,a,d.name,!0)}else if("data:image/png;base64,PG14ZmlsZS"==a.substring(0,32)){var y=a.substring(22);a=window.atob&&!mxClient.IS_SF?atob(y):Base64.decode(y)}Graph.fileSupport&&(new XMLHttpRequest).upload&& -this.ui.isRemoteFileFormat(a,d["@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?c(new LocalFile(this.ui,a.responseText,d.name+this.extension,!0)):null!=b&&b({message:mxResources.get("errorLoadingFile")}))}catch(A){if(null!=b)b(A);else throw A;}}),d.name):null!=k?c(k):g?c(new OneDriveLibrary(this.ui,a,d)):c(new OneDriveFile(this.ui,a,d))}}catch(q){if(null!=b)b(q);else throw q; -}}),mxUtils.bind(this,function(a){window.clearTimeout(t);n&&b(this.parseRequestText(a))}),e||null!=d.file&&null!=d.file.mimeType&&"image/"==d.file.mimeType.substring(0,6))}}else b(this.parseRequestText(a))}),b)}; +OneDriveClient.prototype.getFile=function(a,c,b,d,g){g=null!=g?g:!1;this.executeRequest(this.getItemURL(a),mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){var d=JSON.parse(a.getText()),e=/\.png$/i.test(d.name);if(/\.v(dx|sdx?)$/i.test(d.name)||/\.gliffy$/i.test(d.name)||!this.ui.useCanvasForExport&&e)this.ui.convertFile(d["@microsoft.graph.downloadUrl"],d.name,null!=d.file?d.file.mimeType:null,this.extension,c,b);else{var n=!0,q=window.setTimeout(mxUtils.bind(this,function(){n= +!1;b({code:App.ERROR_TIMEOUT})}),this.ui.timeout);this.ui.loadUrl(d["@microsoft.graph.downloadUrl"],mxUtils.bind(this,function(a){try{if(window.clearTimeout(q),n){var f=e?a.lastIndexOf(","):-1,k=null;if(0<f){var m=this.ui.extractGraphModelFromPng(a.substring(f+1));null!=m&&0<m.length?a=m:k=new LocalFile(this.ui,a,d.name,!0)}else if("data:image/png;base64,PG14ZmlsZS"==a.substring(0,32)){var v=a.substring(22);a=window.atob&&!mxClient.IS_SF?atob(v):Base64.decode(v)}Graph.fileSupport&&(new XMLHttpRequest).upload&& +this.ui.isRemoteFileFormat(a,d["@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?c(new LocalFile(this.ui,a.responseText,d.name+this.extension,!0)):null!=b&&b({message:mxResources.get("errorLoadingFile")}))}catch(z){if(null!=b)b(z);else throw z;}}),d.name):null!=k?c(k):g?c(new OneDriveLibrary(this.ui,a,d)):c(new OneDriveFile(this.ui,a,d))}}catch(t){if(null!=b)b(t);else throw t; +}}),mxUtils.bind(this,function(a){window.clearTimeout(q);n&&b(this.parseRequestText(a))}),e||null!=d.file&&null!=d.file.mimeType&&"image/"==d.file.mimeType.substring(0,6))}}else b(this.parseRequestText(a))}),b)}; OneDriveClient.prototype.renameFile=function(a,c,b,d){null!=a&&null!=c&&(this.isValidFilename(c)?this.checkExists(a.getParentId(),c,!1,mxUtils.bind(this,function(g){g?this.writeFile(this.getItemURL(a.getId()),JSON.stringify({name:c}),"PATCH","application/json",b,d):d()})):d({message:this.invalidFilenameRegExs[0].test(c)?mxResources.get("oneDriveCharsNotAllowed"):mxResources.get("oneDriveInvalidDeviceName")}))}; OneDriveClient.prototype.moveFile=function(a,c,b,d){c=this.getItemRef(c);var g=this.getItemRef(a);c.driveId!=g.driveId?d({message:mxResources.get("cannotMoveOneDrive",null,"Moving a file between accounts is not supported yet.")}):this.writeFile(this.getItemURL(a),JSON.stringify({parentReference:c}),"PATCH","application/json",b,d)};OneDriveClient.prototype.insertLibrary=function(a,c,b,d,g){this.insertFile(a,c,b,d,!0,g)}; OneDriveClient.prototype.insertFile=function(a,c,b,d,g,e){this.isValidFilename(a)?(g=null!=g?g:!1,this.checkExists(e,a,!0,mxUtils.bind(this,function(k){k?(k="/me/drive/root",null!=e&&(k=this.getItemURL(e,!0)),k=this.baseUrl+k+"/children/"+encodeURIComponent(a)+"/content",this.writeFile(k,c,"PUT",null,mxUtils.bind(this,function(a){g?b(new OneDriveLibrary(this.ui,c,a)):b(new OneDriveFile(this.ui,c,a))}),d)):d()}))):d({message:this.invalidFilenameRegExs[0].test(a)?mxResources.get("oneDriveCharsNotAllowed"): mxResources.get("oneDriveInvalidDeviceName")})}; OneDriveClient.prototype.checkExists=function(a,c,b,d){var g="/me/drive/root";null!=a&&(g=this.getItemURL(a,!0));this.executeRequest(this.baseUrl+g+"/children/"+encodeURIComponent(c),mxUtils.bind(this,function(a){404==a.getStatus()?d(!0):b?(this.ui.spinner.stop(),this.ui.confirm(mxResources.get("replaceIt",[c]),function(){d(!0)},function(){d(!1)})):(this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){d(!1)}))}),function(a){d(!1)}, !0)};OneDriveClient.prototype.saveFile=function(a,c,b,d){try{var g=a.getData(),e=mxUtils.bind(this,function(e){var k=this.getItemURL(a.getId());this.writeFile(k+"/content/",e,"PUT",null,mxUtils.bind(this,function(a){c(a,g)}),b,d)});this.ui.useCanvasForExport&&/(\.png)$/i.test(a.meta.name)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){e(this.ui.base64ToBlob(a,"image/png"))}),b,this.ui.getCurrentFile()!=a?g:null):e(g)}catch(k){b(k)}}; -OneDriveClient.prototype.writeFile=function(a,c,b,d,g,e,k){try{if(null!=a&&null!=c){var m=mxUtils.bind(this,function(n){try{var t=!0,f=window.setTimeout(mxUtils.bind(this,function(){t=!1;e({code:App.ERROR_TIMEOUT,retry:m})}),this.ui.timeout),l=new mxXmlRequest(a,c,b);l.setRequestHeaders=mxUtils.bind(this,function(a,b){a.setRequestHeader("Content-Type",d||" ");a.setRequestHeader("Authorization","Bearer "+this.token);null!=k&&a.setRequestHeader("If-Match",k)});l.send(mxUtils.bind(this,function(a){window.clearTimeout(f); -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()?e(this.parseRequestText(a),a):this.authenticate(function(){m(!0)},e,n))}),mxUtils.bind(this,function(a){window.clearTimeout(f);t&&e(this.parseRequestText(a))}))}catch(p){e(p)}});null==this.token||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){m(!0)},e):m(!1)}else e({message:mxResources.get("unknownError")})}catch(n){e(n)}}; +OneDriveClient.prototype.writeFile=function(a,c,b,d,g,e,k){try{if(null!=a&&null!=c){var m=mxUtils.bind(this,function(n){try{var q=!0,f=window.setTimeout(mxUtils.bind(this,function(){q=!1;e({code:App.ERROR_TIMEOUT,retry:m})}),this.ui.timeout),l=new mxXmlRequest(a,c,b);l.setRequestHeaders=mxUtils.bind(this,function(a,b){a.setRequestHeader("Content-Type",d||" ");a.setRequestHeader("Authorization","Bearer "+this.token);null!=k&&a.setRequestHeader("If-Match",k)});l.send(mxUtils.bind(this,function(a){window.clearTimeout(f); +q&&(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()?e(this.parseRequestText(a),a):this.authenticate(function(){m(!0)},e,n))}),mxUtils.bind(this,function(a){window.clearTimeout(f);q&&e(this.parseRequestText(a))}))}catch(p){e(p)}});null==this.token||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){m(!0)},e):m(!1)}else e({message:mxResources.get("unknownError")})}catch(n){e(n)}}; OneDriveClient.prototype.parseRequestText=function(a){var c={message:mxResources.get("unknownError")};try{c=JSON.parse(a.getText())}catch(b){}return c};OneDriveClient.prototype.pickLibrary=function(a){this.pickFile(function(c){a(c)})}; OneDriveClient.prototype.pickFolder=function(a,c){var b=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(){b(!1)}),this.emptyFn):b(c)}; @@ -9125,15 +9139,15 @@ GitHubFile.prototype.getPublicUrl=function(a){null!=this.meta.download_url?mxUti GitHubFile.prototype.isRenamable=function(){return!1};GitHubFile.prototype.getLatestVersion=function(a,c){this.peer.getFile(this.getId(),a,c)};GitHubFile.prototype.getDescriptor=function(){return this.meta};GitHubFile.prototype.setDescriptor=function(a){this.meta=a};GitHubFile.prototype.getDescriptorEtag=function(a){return a.sha};GitHubFile.prototype.setDescriptorEtag=function(a,c){a.sha=c};GitHubFile.prototype.save=function(a,c,b,d,g,e){this.doSave(this.getTitle(),c,b,d,g,e)}; GitHubFile.prototype.saveAs=function(a,c,b){this.doSave(a,c,b)};GitHubFile.prototype.doSave=function(a,c,b,d,g,e){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,c,b,d,g,e)}),b,d,g])}; GitHubFile.prototype.saveFile=function(a,c,b,d,g,e,k){if(this.isEditable())if(this.savingFile)null!=d&&d({code:App.ERROR_BUSY});else{var m=mxUtils.bind(this,function(c){if(this.getTitle()==a){var g=null,f=null;try{g=this.isModified;f=this.isModified();this.savingFile=!0;this.savingFileTime=new Date;var k=mxUtils.bind(this,function(){this.setModified(!1);this.isModified=function(){return f}}),m=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,m,mxUtils.bind(this,function(){this.contentChanged();null!=b&&b()}),d)}),mxUtils.bind(this,function(a){this.savingFile=!1;this.isModified=g;this.setModified(f||this.isModified());if(this.isConflict(a))this.inConflictState=!0,null!=d&&d({commitMessage:c});else if(null!=d){if(null!=a&&null!=a.retry){var b=a.retry;a.retry=function(){k();b()}}d(a)}}),e,c)}catch(y){if(this.savingFile=!1,null!=g&&(this.isModified=g),null!=f&&this.setModified(f|| -this.isModified()),null!=d)d(y);else throw y;}}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!=b&&b();this.ui.fileLoaded(a)}),mxUtils.bind(this,function(){this.savingFile=!1;null!=d&&d()}),!1,e,c)}))});null!=k?m(k):this.peer.showCommitDialog(this.meta.name,null==this.getDescriptorEtag(this.meta)||this.meta.isNew,mxUtils.bind(this,function(a){m(a)}), +!1;this.isModified=g;this.setDescriptorEtag(this.meta,a);this.fileSaved(n,m,mxUtils.bind(this,function(){this.contentChanged();null!=b&&b()}),d)}),mxUtils.bind(this,function(a){this.savingFile=!1;this.isModified=g;this.setModified(f||this.isModified());if(this.isConflict(a))this.inConflictState=!0,null!=d&&d({commitMessage:c});else if(null!=d){if(null!=a&&null!=a.retry){var b=a.retry;a.retry=function(){k();b()}}d(a)}}),e,c)}catch(v){if(this.savingFile=!1,null!=g&&(this.isModified=g),null!=f&&this.setModified(f|| +this.isModified()),null!=d)d(v);else throw v;}}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!=b&&b();this.ui.fileLoaded(a)}),mxUtils.bind(this,function(){this.savingFile=!1;null!=d&&d()}),!1,e,c)}))});null!=k?m(k):this.peer.showCommitDialog(this.meta.name,null==this.getDescriptorEtag(this.meta)||this.meta.isNew,mxUtils.bind(this,function(a){m(a)}), d)}else null!=b&&b()};GitHubLibrary=function(a,c,b){GitHubFile.call(this,a,c,b)};mxUtils.extend(GitHubLibrary,GitHubFile);GitHubLibrary.prototype.doSave=function(a,c,b){this.saveFile(a,!1,c,b)};GitHubLibrary.prototype.open=function(){};GitHubClient=function(a,c){DrawioClient.call(this,a,c||"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.updateUser=function(a,c,b){var d=!0,g=window.setTimeout(mxUtils.bind(this,function(){d=!1;c({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.get(this.baseUrl+"/user?access_token="+this.token,mxUtils.bind(this,function(e){window.clearTimeout(g);d&&(401===e.getStatus()?b?c({message:mxResources.get("accessDenied")}):(this.logout(),this.authenticate(mxUtils.bind(this,function(){this.updateUser(a,c,!0)}),c)):200>e.getStatus()||300<=e.getStatus()? c({message:mxResources.get("accessDenied")}):(this.setUser(this.createUser(JSON.parse(e.getText()))),a()))}))};GitHubClient.prototype.createUser=function(a){return new DrawioUser(a.id,a.email,a.name)}; GitHubClient.prototype.authenticate=function(a,c){if(null==window.onGitHubCallback){var b=mxUtils.bind(this,function(){var d=!0;this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(g,e){null!=window.open("https://github.com/login/oauth/authorize?client_id="+this.clientId+"&scope="+this.scope,"ghauth")?window.onGitHubCallback=mxUtils.bind(this,function(k,m){if(d)if(window.onGitHubCallback=null,d=!1,null==k)c({message:mxResources.get("accessDenied"),retry:b});else{var n=mxUtils.bind(this,function(){var b= !0,d=window.setTimeout(mxUtils.bind(this,function(){b=!1;c({code:App.ERROR_TIMEOUT,retry:n})}),this.ui.timeout);mxUtils.get("/github?client_id="+this.clientId+"&code="+k,mxUtils.bind(this,function(f){window.clearTimeout(d);if(b)try{if(200>f.getStatus()||300<=f.getStatus())c({message:mxResources.get("cannotLogin")});else{null!=e&&e();var k=f.getText();this.token=k.substring(k.indexOf("=")+1,k.indexOf("&"));this.setUser(null);g&&this.setPersistentToken(this.token);a()}}catch(u){c(u)}finally{null!=m&& m.close()}}))});n()}else null!=m&&m.close()}):c({message:mxResources.get("serviceUnavailableOrBlocked"),retry:b})}),mxUtils.bind(this,function(){d&&(window.onGitHubCallback=null,d=!1,c({message:mxResources.get("accessDenied"),retry:b}))}))});b()}else c({code:App.ERROR_BUSY})};GitHubClient.prototype.getErrorMessage=function(a,c){try{var b=JSON.parse(a.getText());null!=b&&null!=b.message&&(c=b.message)}catch(d){}return c}; -GitHubClient.prototype.executeRequest=function(a,c,b,d){var g=mxUtils.bind(this,function(k){var m=!0,n=window.setTimeout(mxUtils.bind(this,function(){m=!1;b({code:App.ERROR_TIMEOUT,retry:e})}),this.ui.timeout),t=this.token;a.setRequestHeaders=function(a,b){a.setRequestHeader("Authorization","token "+t)};a.send(mxUtils.bind(this,function(){window.clearTimeout(n);if(m)if(200<=a.getStatus()&&299>=a.getStatus()||d&&404==a.getStatus())c(a);else if(401===a.getStatus())k?b({code:a.getStatus(),message:mxResources.get("accessDenied"), +GitHubClient.prototype.executeRequest=function(a,c,b,d){var g=mxUtils.bind(this,function(k){var m=!0,n=window.setTimeout(mxUtils.bind(this,function(){m=!1;b({code:App.ERROR_TIMEOUT,retry:e})}),this.ui.timeout),q=this.token;a.setRequestHeaders=function(a,b){a.setRequestHeader("Authorization","token "+q)};a.send(mxUtils.bind(this,function(){window.clearTimeout(n);if(m)if(200<=a.getStatus()&&299>=a.getStatus()||d&&404==a.getStatus())c(a);else if(401===a.getStatus())k?b({code:a.getStatus(),message:mxResources.get("accessDenied"), retry:mxUtils.bind(this,function(){this.authenticate(function(){e(!0)},b)})}):this.authenticate(function(){g(!0)},b);else if(403===a.getStatus()){var f=!1;try{var l=JSON.parse(a.getText());null!=l&&null!=l.errors&&0<l.errors.length&&(f="too_large"==l.errors[0].code)}catch(p){}b({message:mxResources.get(f?"drawingTooLarge":"forbidden")})}else 404===a.getStatus()?b({code:a.getStatus(),message:this.getErrorMessage(a,mxResources.get("fileNotFound"))}):409===a.getStatus()?b({code:a.getStatus(),status:409}): b({code:a.getStatus(),message:this.getErrorMessage(a,mxResources.get("error")+" "+a.getStatus())})}),b)}),e=mxUtils.bind(this,function(a){null==this.user?this.updateUser(function(){e(!0)},b,a):g(a)});null==this.token?this.authenticate(function(){e(!0)},b):e(!1)};GitHubClient.prototype.getLibrary=function(a,c,b){this.getFile(a,c,b,!0)}; GitHubClient.prototype.getSha=function(a,c,b,d,g,e){var k="&t="+(new Date).getTime();a=new mxXmlRequest(this.baseUrl+"/repos/"+a+"/"+c+"/contents/"+b+"?ref="+d+k,null,"HEAD");this.executeRequest(a,mxUtils.bind(this,function(a){try{g(a.request.getResponseHeader("Etag").match(/"([^"]+)"/)[1])}catch(n){e(n)}}),e)}; @@ -9141,26 +9155,26 @@ GitHubClient.prototype.getFile=function(a,c,b,d,g){d=null!=d?d:!1;var e=a.split( a=new mxXmlRequest(this.baseUrl+"/repos/"+k+"/"+m+"/contents/"+a+"?ref="+n+g,null,"GET"),this.executeRequest(a,mxUtils.bind(this,function(a){try{c(this.createGitHubFile(k,m,n,JSON.parse(a.getText()),d))}catch(f){b(f)}}),b))}; GitHubClient.prototype.createGitHubFile=function(a,c,b,d,g){a={org:a,repo:c,ref:b,name:d.name,path:d.path,sha:d.sha,html_url:d.html_url,download_url:d.download_url};c=d.content;"base64"===d.encoding&&(/\.jpe?g$/i.test(d.name)?c="data:image/jpeg;base64,"+c:/\.gif$/i.test(d.name)?c="data:image/gif;base64,"+c:/\.png$/i.test(d.name)?(d=this.ui.extractGraphModelFromPng(c),c=null!=d&&0<d.length?d:"data:image/png;base64,"+c):c=Base64.decode(c));return g?new GitHubLibrary(this.ui,c,a):new GitHubFile(this.ui, c,a)};GitHubClient.prototype.insertLibrary=function(a,c,b,d,g){this.insertFile(a,c,b,d,!0,g,!1)}; -GitHubClient.prototype.insertFile=function(a,c,b,d,g,e,k){g=null!=g?g:!1;e=e.split("/");var m=e[0],n=e[1],t=e[2],f=e.slice(3,e.length).join("/");0<f.length&&(f+="/");f+=a;this.checkExists(m+"/"+n+"/"+t+"/"+f,!0,mxUtils.bind(this,function(e,p){e?g?(k||(c=Base64.encode(c)),this.showCommitDialog(a,!0,mxUtils.bind(this,function(a){this.writeFile(m,n,t,f,a,c,p,mxUtils.bind(this,function(a){try{var c=JSON.parse(a.getText());b(this.createGitHubFile(m,n,t,c.content,g))}catch(A){d(A)}}),d)}),d)):b(new GitHubFile(this.ui, -c,{org:m,repo:n,ref:t,name:a,path:f,sha:p,isNew:!0})):d()}))};GitHubClient.prototype.showCommitDialog=function(a,c,b,d){var g=this.ui.spinner.pause();a=new FilenameDialog(this.ui,mxResources.get(c?"addedFile":"updateFile",[a]),mxResources.get("ok"),mxUtils.bind(this,function(a){g();b(a)}),mxResources.get("commitMessage"),null,null,null,null,mxUtils.bind(this,function(){d()}),null,280);this.ui.showDialog(a.container,400,80,!0,!1);a.init()}; +GitHubClient.prototype.insertFile=function(a,c,b,d,g,e,k){g=null!=g?g:!1;e=e.split("/");var m=e[0],n=e[1],q=e[2],f=e.slice(3,e.length).join("/");0<f.length&&(f+="/");f+=a;this.checkExists(m+"/"+n+"/"+q+"/"+f,!0,mxUtils.bind(this,function(e,p){e?g?(k||(c=Base64.encode(c)),this.showCommitDialog(a,!0,mxUtils.bind(this,function(a){this.writeFile(m,n,q,f,a,c,p,mxUtils.bind(this,function(a){try{var c=JSON.parse(a.getText());b(this.createGitHubFile(m,n,q,c.content,g))}catch(z){d(z)}}),d)}),d)):b(new GitHubFile(this.ui, +c,{org:m,repo:n,ref:q,name:a,path:f,sha:p,isNew:!0})):d()}))};GitHubClient.prototype.showCommitDialog=function(a,c,b,d){var g=this.ui.spinner.pause();a=new FilenameDialog(this.ui,mxResources.get(c?"addedFile":"updateFile",[a]),mxResources.get("ok"),mxUtils.bind(this,function(a){g();b(a)}),mxResources.get("commitMessage"),null,null,null,null,mxUtils.bind(this,function(){d()}),null,280);this.ui.showDialog(a.container,400,80,!0,!1);a.init()}; GitHubClient.prototype.writeFile=function(a,c,b,d,g,e,k,m,n){e.length>=this.maxFileSize?n({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(e.length)+" / 1 MB)"}):(b={path:d,branch:decodeURIComponent(b),message:g,content:e},null!=k&&(b.sha=k),a=new mxXmlRequest(this.baseUrl+"/repos/"+a+"/"+c+"/contents/"+d,JSON.stringify(b),"PUT"),this.executeRequest(a,mxUtils.bind(this,function(a){m(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,c,b){var d=a.split("/"),g=d[0],e=d[1],k=d[2];a=d.slice(3,d.length).join("/");this.getSha(g,e,a,k,mxUtils.bind(this,function(d){if(c){var e=this.ui.spinner.pause();this.ui.confirm(mxResources.get("replaceIt",[a]),function(){e();b(!0,d)},function(){e();b(!1)})}else this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){b(!1)})}),mxUtils.bind(this,function(a){b(!0)}),null,!0)}; -GitHubClient.prototype.saveFile=function(a,c,b,d,g){var e=a.meta.org,k=a.meta.repo,m=a.meta.ref,n=a.meta.path,t=mxUtils.bind(this,function(d,f){this.writeFile(e,k,m,n,g,f,d,mxUtils.bind(this,function(b){delete a.meta.isNew;c(JSON.parse(b.getText()).content.sha)}),mxUtils.bind(this,function(a){b(a)}))}),f=mxUtils.bind(this,function(){this.ui.useCanvasForExport&&/(\.png)$/i.test(n)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(b){t(a.meta.sha,b)}),b,this.ui.getCurrentFile()!=a?a.getData():null): -t(a.meta.sha,Base64.encode(a.getData()))});d?this.getSha(e,k,n,m,mxUtils.bind(this,function(b){a.meta.sha=b;f()}),b):f()};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,c,b,d,g){var e=a.meta.org,k=a.meta.repo,m=a.meta.ref,n=a.meta.path,q=mxUtils.bind(this,function(d,f){this.writeFile(e,k,m,n,g,f,d,mxUtils.bind(this,function(b){delete a.meta.isNew;c(JSON.parse(b.getText()).content.sha)}),mxUtils.bind(this,function(a){b(a)}))}),f=mxUtils.bind(this,function(){this.ui.useCanvasForExport&&/(\.png)$/i.test(n)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(b){q(a.meta.sha,b)}),b,this.ui.getCurrentFile()!=a?a.getData():null): +q(a.meta.sha,Base64.encode(a.getData()))});d?this.getSha(e,k,n,m,mxUtils.bind(this,function(b){a.meta.sha=b;f()}),b):f()};GitHubClient.prototype.pickLibrary=function(a){this.pickFile(a)};GitHubClient.prototype.pickFolder=function(a){this.showGitHubDialog(!1,a)};GitHubClient.prototype.pickFile=function(a){a=null!=a?a:mxUtils.bind(this,function(a){this.ui.loadFile("H"+encodeURIComponent(a))});this.showGitHubDialog(!0,a)}; GitHubClient.prototype.showGitHubDialog=function(a,c){var b=null,d=null,g=null,e=null,k=document.createElement("div");k.style.whiteSpace="nowrap";k.style.overflow="hidden";k.style.height="224px";var m=document.createElement("h3");mxUtils.write(m,mxResources.get(a?"selectFile":"selectFolder"));m.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";k.appendChild(m);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="194px";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 f=new CustomDialog(this.ui,k,mxUtils.bind(this,function(){c(b+"/"+d+"/"+encodeURIComponent(g)+"/"+e)}));this.ui.showDialog(f.container,340,270,!0,!0);a&&f.okButton.parentNode.removeChild(f.okButton);var l= -mxUtils.bind(this,function(a,b,c){var d=document.createElement("a");d.setAttribute("href","javascript:void(0);");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 c=document.createElement("div");c.style.marginBottom="8px";c.appendChild(l(b+"/"+d,mxUtils.bind(this,function(){e=null;C()})));a||(mxUtils.write(c," / "),c.appendChild(l(decodeURIComponent(g),mxUtils.bind(this,function(){e= -null;z()}))));if(null!=e&&0<e.length){var f=e.split("/");for(a=0;a<f.length;a++)(function(a){mxUtils.write(c," / ");c.appendChild(l(f[a],mxUtils.bind(this,function(){e=f.slice(0,a+1).join("/");y()})))})(a)}n.appendChild(c)}),u=mxUtils.bind(this,function(a){this.ui.handleError(a,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(e=g=d=b=null,C()):this.ui.hideDialog()}))}),y=mxUtils.bind(this,function(){var k=new mxXmlRequest(this.baseUrl+"/repos/"+b+"/"+d+"/contents/"+e+ -"?ref="+encodeURIComponent(g),null,"GET");f.okButton.removeAttribute("disabled");n.innerHTML="";this.ui.spinner.spin(n,mxResources.get("loading"));this.executeRequest(k,mxUtils.bind(this,function(f){p();this.ui.spinner.stop();var k=JSON.parse(f.getText());n.appendChild(l("../ [Up]",mxUtils.bind(this,function(){if(""==e)e=null,C();else{var a=e.split("/");e=a.slice(0,a.length-1).join("/");y()}}),"4px"));if(null==k||0==k.length)mxUtils.write(n,mxResources.get("noFiles"));else{var m=!0;f=mxUtils.bind(this, -function(f){for(var p=0;p<k.length;p++)mxUtils.bind(this,function(k,p){if(f==("dir"==k.type)){var v=t.cloneNode();v.style.backgroundColor=m?"#eeeeee":"";m=!m;var q=document.createElement("img");q.src=IMAGE_PATH+"/"+("dir"==k.type?"folder.png":"file.png");q.setAttribute("align","absmiddle");q.style.marginRight="4px";q.style.marginTop="-4px";q.width=20;v.appendChild(q);v.appendChild(l(k.name+("dir"==k.type?"/":""),mxUtils.bind(this,function(){"dir"==k.type?(e=k.path,y()):a&&"file"==k.type&&(this.ui.hideDialog(), -c(b+"/"+d+"/"+encodeURIComponent(g)+"/"+k.path))})));n.appendChild(v)}})(k[p],p)});f(!0);a&&f(!1)}}),u,!0)}),q=null,A=null,z=mxUtils.bind(this,function(a){null==a&&(n.innerHTML="",a=1);var c=new mxXmlRequest(this.baseUrl+"/repos/"+b+"/"+d+"/branches?per_page=100&page="+a,null,"GET");f.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(n,mxResources.get("loading"));null!=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(){mxEvent.removeListener(n,"scroll",A);z(a+1)});mxEvent.addListener(q,"click",k);this.executeRequest(c,mxUtils.bind(this,function(b){this.ui.spinner.stop();1==a&&(p(!0),n.appendChild(l("../ [Up]",mxUtils.bind(this,function(){e=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=t.cloneNode();c.style.backgroundColor=0==b%2?"#eeeeee":"";c.appendChild(l(a.name,mxUtils.bind(this,function(){g=a.name;e="";y()})));n.appendChild(c)})(b[c],c);100==b.length&&(n.appendChild(q),A=function(){n.scrollTop>=n.scrollHeight-n.offsetHeight&&k()},mxEvent.addListener(n,"scroll",A))}}),u)}),C=mxUtils.bind(this,function(a){null==a&&(n.innerHTML="",a=1);var c=new mxXmlRequest(this.baseUrl+"/user/repos?per_page=100&page="+a,null,"GET");f.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(n, -mxResources.get("loading"));null!=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(){mxEvent.removeListener(n,"scroll",A);C(a+1)});mxEvent.addListener(q,"click",k);this.executeRequest(c,mxUtils.bind(this,function(c){this.ui.spinner.stop();c=JSON.parse(c.getText());if(null==c||0==c.length)mxUtils.write(n,mxResources.get("noFiles")); -else{1==a&&(n.appendChild(l(mxResources.get("enterValue")+"...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.ui,"org/repo/ref",mxResources.get("ok"),mxUtils.bind(this,function(a){if(null!=a){var c=a.split("/");if(1<c.length){a=c[0];var f=c[1];3>c.length?(b=a,d=f,e=g=null,z()):this.ui.spinner.spin(n,mxResources.get("loading"))&&(c=encodeURIComponent(c.slice(2,c.length).join("/")),this.getFile(a+"/"+f+"/"+c,mxUtils.bind(this,function(a){this.ui.spinner.stop();b=a.meta.org;d=a.meta.repo; -g=decodeURIComponent(a.meta.ref);e="";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 f=0;f<c.length;f++)mxUtils.bind(this,function(a,c){var f=t.cloneNode();f.style.backgroundColor=0==c%2?"#eeeeee":"";f.appendChild(l(a.full_name, -mxUtils.bind(this,function(){b=a.owner.login;d=a.name;g=a.default_branch;e="";y()})));n.appendChild(f)})(c[f],f)}100==c.length&&(n.appendChild(q),A=function(){n.scrollTop>=n.scrollHeight-n.offsetHeight&&k()},mxEvent.addListener(n,"scroll",A))}),u)});C()};GitHubClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);this.token=null};TrelloFile=function(a,c,b){DrawioFile.call(this,a,c);this.meta=b;this.saveNeededCounter=0};mxUtils.extend(TrelloFile,DrawioFile);TrelloFile.prototype.getHash=function(){return"T"+encodeURIComponent(this.meta.compoundId)};TrelloFile.prototype.getMode=function(){return App.MODE_TRELLO};TrelloFile.prototype.isAutosave=function(){return!0};TrelloFile.prototype.getTitle=function(){return this.meta.name};TrelloFile.prototype.isRenamable=function(){return!1};TrelloFile.prototype.getSize=function(){return this.meta.bytes}; +"border-box";n.style.padding="4px";n.style.overflow="auto";n.style.lineHeight="1.2em";n.style.height="194px";k.appendChild(n);var q=document.createElement("div");q.style.textOverflow="ellipsis";q.style.boxSizing="border-box";q.style.overflow="hidden";q.style.padding="4px";q.style.width="100%";var f=new CustomDialog(this.ui,k,mxUtils.bind(this,function(){c(b+"/"+d+"/"+encodeURIComponent(g)+"/"+e)}));this.ui.showDialog(f.container,340,270,!0,!0);a&&f.okButton.parentNode.removeChild(f.okButton);var l= +mxUtils.bind(this,function(a,b,c){var d=document.createElement("a");d.setAttribute("href","javascript:void(0);");mxUtils.write(d,a);mxEvent.addListener(d,"click",b);null!=c&&(a=q.cloneNode(),a.style.padding=c,a.appendChild(d),d=a);return d}),p=mxUtils.bind(this,function(a){var c=document.createElement("div");c.style.marginBottom="8px";c.appendChild(l(b+"/"+d,mxUtils.bind(this,function(){e=null;C()})));a||(mxUtils.write(c," / "),c.appendChild(l(decodeURIComponent(g),mxUtils.bind(this,function(){e= +null;y()}))));if(null!=e&&0<e.length){var f=e.split("/");for(a=0;a<f.length;a++)(function(a){mxUtils.write(c," / ");c.appendChild(l(f[a],mxUtils.bind(this,function(){e=f.slice(0,a+1).join("/");v()})))})(a)}n.appendChild(c)}),u=mxUtils.bind(this,function(a){this.ui.handleError(a,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(e=g=d=b=null,C()):this.ui.hideDialog()}))}),v=mxUtils.bind(this,function(){var k=new mxXmlRequest(this.baseUrl+"/repos/"+b+"/"+d+"/contents/"+e+ +"?ref="+encodeURIComponent(g),null,"GET");f.okButton.removeAttribute("disabled");n.innerHTML="";this.ui.spinner.spin(n,mxResources.get("loading"));this.executeRequest(k,mxUtils.bind(this,function(f){p();this.ui.spinner.stop();var k=JSON.parse(f.getText());n.appendChild(l("../ [Up]",mxUtils.bind(this,function(){if(""==e)e=null,C();else{var a=e.split("/");e=a.slice(0,a.length-1).join("/");v()}}),"4px"));if(null==k||0==k.length)mxUtils.write(n,mxResources.get("noFiles"));else{var m=!0;f=mxUtils.bind(this, +function(f){for(var p=0;p<k.length;p++)mxUtils.bind(this,function(k,p){if(f==("dir"==k.type)){var x=q.cloneNode();x.style.backgroundColor=m?"#eeeeee":"";m=!m;var t=document.createElement("img");t.src=IMAGE_PATH+"/"+("dir"==k.type?"folder.png":"file.png");t.setAttribute("align","absmiddle");t.style.marginRight="4px";t.style.marginTop="-4px";t.width=20;x.appendChild(t);x.appendChild(l(k.name+("dir"==k.type?"/":""),mxUtils.bind(this,function(){"dir"==k.type?(e=k.path,v()):a&&"file"==k.type&&(this.ui.hideDialog(), +c(b+"/"+d+"/"+encodeURIComponent(g)+"/"+k.path))})));n.appendChild(x)}})(k[p],p)});f(!0);a&&f(!1)}}),u,!0)}),t=null,z=null,y=mxUtils.bind(this,function(a){null==a&&(n.innerHTML="",a=1);var c=new mxXmlRequest(this.baseUrl+"/repos/"+b+"/"+d+"/branches?per_page=100&page="+a,null,"GET");f.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(n,mxResources.get("loading"));null!=t&&null!=t.parentNode&&t.parentNode.removeChild(t);t=document.createElement("a");t.style.display="block";t.setAttribute("href", +"javascript:void(0);");mxUtils.write(t,mxResources.get("more")+"...");var k=mxUtils.bind(this,function(){mxEvent.removeListener(n,"scroll",z);y(a+1)});mxEvent.addListener(t,"click",k);this.executeRequest(c,mxUtils.bind(this,function(b){this.ui.spinner.stop();1==a&&(p(!0),n.appendChild(l("../ [Up]",mxUtils.bind(this,function(){e=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=q.cloneNode();c.style.backgroundColor=0==b%2?"#eeeeee":"";c.appendChild(l(a.name,mxUtils.bind(this,function(){g=a.name;e="";v()})));n.appendChild(c)})(b[c],c);100==b.length&&(n.appendChild(t),z=function(){n.scrollTop>=n.scrollHeight-n.offsetHeight&&k()},mxEvent.addListener(n,"scroll",z))}}),u)}),C=mxUtils.bind(this,function(a){null==a&&(n.innerHTML="",a=1);var c=new mxXmlRequest(this.baseUrl+"/user/repos?per_page=100&page="+a,null,"GET");f.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(n, +mxResources.get("loading"));null!=t&&null!=t.parentNode&&t.parentNode.removeChild(t);t=document.createElement("a");t.style.display="block";t.setAttribute("href","javascript:void(0);");mxUtils.write(t,mxResources.get("more")+"...");var k=mxUtils.bind(this,function(){mxEvent.removeListener(n,"scroll",z);C(a+1)});mxEvent.addListener(t,"click",k);this.executeRequest(c,mxUtils.bind(this,function(c){this.ui.spinner.stop();c=JSON.parse(c.getText());if(null==c||0==c.length)mxUtils.write(n,mxResources.get("noFiles")); +else{1==a&&(n.appendChild(l(mxResources.get("enterValue")+"...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.ui,"org/repo/ref",mxResources.get("ok"),mxUtils.bind(this,function(a){if(null!=a){var c=a.split("/");if(1<c.length){a=c[0];var f=c[1];3>c.length?(b=a,d=f,e=g=null,y()):this.ui.spinner.spin(n,mxResources.get("loading"))&&(c=encodeURIComponent(c.slice(2,c.length).join("/")),this.getFile(a+"/"+f+"/"+c,mxUtils.bind(this,function(a){this.ui.spinner.stop();b=a.meta.org;d=a.meta.repo; +g=decodeURIComponent(a.meta.ref);e="";v()}),mxUtils.bind(this,function(a){this.ui.spinner.stop();this.ui.handleError({message:mxResources.get("fileNotFound")})})))}else this.ui.spinner.stop(),this.ui.handleError({message:mxResources.get("invalidName")})}}),mxResources.get("enterValue"));this.ui.showDialog(a.container,300,80,!0,!1);a.init()}))),mxUtils.br(n),mxUtils.br(n));for(var f=0;f<c.length;f++)mxUtils.bind(this,function(a,c){var f=q.cloneNode();f.style.backgroundColor=0==c%2?"#eeeeee":"";f.appendChild(l(a.full_name, +mxUtils.bind(this,function(){b=a.owner.login;d=a.name;g=a.default_branch;e="";v()})));n.appendChild(f)})(c[f],f)}100==c.length&&(n.appendChild(t),z=function(){n.scrollTop>=n.scrollHeight-n.offsetHeight&&k()},mxEvent.addListener(n,"scroll",z))}),u)});C()};GitHubClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);this.token=null};TrelloFile=function(a,c,b){DrawioFile.call(this,a,c);this.meta=b;this.saveNeededCounter=0};mxUtils.extend(TrelloFile,DrawioFile);TrelloFile.prototype.getHash=function(){return"T"+encodeURIComponent(this.meta.compoundId)};TrelloFile.prototype.getMode=function(){return App.MODE_TRELLO};TrelloFile.prototype.isAutosave=function(){return!0};TrelloFile.prototype.getTitle=function(){return this.meta.name};TrelloFile.prototype.isRenamable=function(){return!1};TrelloFile.prototype.getSize=function(){return this.meta.bytes}; TrelloFile.prototype.save=function(a,c,b){this.doSave(this.getTitle(),c,b)};TrelloFile.prototype.saveAs=function(a,c,b){this.doSave(a,c,b)};TrelloFile.prototype.doSave=function(a,c,b){var d=this.meta.name;this.meta.name=a;DrawioFile.prototype.save.apply(this,arguments);this.meta.name=d;this.saveFile(a,!1,c,b)}; TrelloFile.prototype.saveFile=function(a,c,b,d){if(this.isEditable())if(this.savingFile)null!=d&&(this.saveNeededCounter++,d({code:App.ERROR_BUSY}));else if(this.savingFile=!0,this.savingFileTime=new Date,this.getTitle()==a){var g=this.isModified,e=this.isModified(),k=mxUtils.bind(this,function(){this.setModified(!1);this.isModified=function(){return e}});k();this.ui.trello.saveFile(this,mxUtils.bind(this,function(e){this.savingFile=!1;this.isModified=g;this.meta=e;this.contentChanged();null!=b&& b();0<this.saveNeededCounter&&(this.saveNeededCounter--,this.saveFile(a,c,b,d))}),mxUtils.bind(this,function(a){this.savingFile=!1;this.isModified=g;this.setModified(e||this.isModified());if(null!=d){if(null!=a&&null!=a.retry){var b=a.retry;a.retry=function(){k();b()}}d(a)}}))}else this.ui.pickFolder(App.MODE_TRELLO,mxUtils.bind(this,function(e){this.ui.trello.insertFile(a,this.getData(),mxUtils.bind(this,function(e){this.savingFile=!1;null!=b&&b();this.ui.fileLoaded(e);0<this.saveNeededCounter&& @@ -9173,50 +9187,50 @@ TrelloClient.prototype.insertFile=function(a,c,b,d,g,e){g=null!=g?g:!1;var k=mxU TrelloClient.prototype.saveFile=function(a,c,b){var d=a.meta.compoundId.split(this.SEPARATOR),g=mxUtils.bind(this,function(g){this.writeFile(a.meta.name,g,d[0],function(a){Trello.del("cards/"+d[0]+"/attachments/"+d[1],mxUtils.bind(this,function(){c(a)}),mxUtils.bind(this,function(a){null!=a&&401==a.status?this.authenticate(e,b,!0):b()}))},b)}),e=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"))}),b,this.ui.getCurrentFile()!=a?a.getData():null):g(a.getData())});this.authenticate(e,b)}; TrelloClient.prototype.writeFile=function(a,c,b,d,g){if(null!=a&&null!=c)if(c.length>=this.maxFileSize)g({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(c.length)+" / 10 MB)"});else{var e=mxUtils.bind(this,function(){var k=!0,m=window.setTimeout(mxUtils.bind(this,function(){k=!1;g({code:App.ERROR_TIMEOUT,retry:e})}),this.ui.timeout),n=new FormData;n.append("key",Trello.key());n.append("token",Trello.token());n.append("file","string"===typeof c?new Blob([c]):c,a);n.append("name", -a);var t=new XMLHttpRequest;t.responseType="json";t.onreadystatechange=mxUtils.bind(this,function(){if(4===t.readyState&&(window.clearTimeout(m),k))if(200==t.status){var a=t.response;a.compoundId=b+this.SEPARATOR+a.id;d(a)}else 401==t.status?this.authenticate(e,g,!0):g()});t.open("POST",this.baseUrl+"cards/"+b+"/attachments");t.send(n)});this.authenticate(e,g)}else g({message:mxResources.get("unknownError")})};TrelloClient.prototype.pickLibrary=function(a){this.pickFile(a)}; +a);var q=new XMLHttpRequest;q.responseType="json";q.onreadystatechange=mxUtils.bind(this,function(){if(4===q.readyState&&(window.clearTimeout(m),k))if(200==q.status){var a=q.response;a.compoundId=b+this.SEPARATOR+a.id;d(a)}else 401==q.status?this.authenticate(e,g,!0):g()});q.open("POST",this.baseUrl+"cards/"+b+"/attachments");q.send(n)});this.authenticate(e,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,c){a=null!=a?a:mxUtils.bind(this,function(a){this.ui.loadFile("T"+encodeURIComponent(a))});this.authenticate(mxUtils.bind(this,function(){this.showTrelloDialog(!0,a)}),mxUtils.bind(this,function(a){this.ui.showError(mxResources.get("error"),a,mxResources.get("ok"))}))}; TrelloClient.prototype.showTrelloDialog=function(a,c){var b=null,d="@me",g=0,e=document.createElement("div");e.style.whiteSpace="nowrap";e.style.overflow="hidden";e.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";e.appendChild(k);var m=document.createElement("div");m.style.whiteSpace="nowrap";m.style.overflow="auto";m.style.height= "194px";e.appendChild(m);e=new CustomDialog(this.ui,e);this.ui.showDialog(e.container,340,270,!0,!0);e.okButton.parentNode.removeChild(e.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}),t=mxUtils.bind(this,function(a){this.ui.handleError(a,null,mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.hideDialog()}))}),f=mxUtils.bind(this,function(){g=0;m.innerHTML="";this.ui.spinner.spin(m,mxResources.get("loading"));var a=mxUtils.bind(this,function(){Trello.cards.get(b+"/attachments",{fields:"id,name,previews"}, -mxUtils.bind(this,function(a){this.ui.spinner.stop();m.appendChild(n("../ [Up]",mxUtils.bind(this,function(){u()})));mxUtils.br(m);null==a||0==a.length?mxUtils.write(m,mxResources.get("noFiles")):mxUtils.bind(this,function(){for(var d=0;d<a.length;d++)mxUtils.bind(this,function(a){m.appendChild(n(a.name,mxUtils.bind(this,function(){this.ui.hideDialog();c(b+this.SEPARATOR+a.id)}),null!=a.previews?a.previews[0]:null))})(a[d])})()}),mxUtils.bind(this,function(b){401==b.status?this.authenticate(a,t,!0): -null!=t&&t(b)}))});a()}),l=null,p=null,u=mxUtils.bind(this,function(e){null==e&&(g=0,m.innerHTML="",e=1);this.ui.spinner.spin(m,mxResources.get("loading"));null!=l&&null!=l.parentNode&&l.parentNode.removeChild(l);l=document.createElement("a");l.style.display="block";l.setAttribute("href","javascript:void(0);");mxUtils.write(l,mxResources.get("more")+"...");var k=mxUtils.bind(this,function(){mxEvent.removeListener(m,"scroll",p);u(e+1)});mxEvent.addListener(l,"click",k);var A=mxUtils.bind(this,function(){Trello.get("search", +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}),q=mxUtils.bind(this,function(a){this.ui.handleError(a,null,mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.hideDialog()}))}),f=mxUtils.bind(this,function(){g=0;m.innerHTML="";this.ui.spinner.spin(m,mxResources.get("loading"));var a=mxUtils.bind(this,function(){Trello.cards.get(b+"/attachments",{fields:"id,name,previews"}, +mxUtils.bind(this,function(a){this.ui.spinner.stop();m.appendChild(n("../ [Up]",mxUtils.bind(this,function(){u()})));mxUtils.br(m);null==a||0==a.length?mxUtils.write(m,mxResources.get("noFiles")):mxUtils.bind(this,function(){for(var d=0;d<a.length;d++)mxUtils.bind(this,function(a){m.appendChild(n(a.name,mxUtils.bind(this,function(){this.ui.hideDialog();c(b+this.SEPARATOR+a.id)}),null!=a.previews?a.previews[0]:null))})(a[d])})()}),mxUtils.bind(this,function(b){401==b.status?this.authenticate(a,q,!0): +null!=q&&q(b)}))});a()}),l=null,p=null,u=mxUtils.bind(this,function(e){null==e&&(g=0,m.innerHTML="",e=1);this.ui.spinner.spin(m,mxResources.get("loading"));null!=l&&null!=l.parentNode&&l.parentNode.removeChild(l);l=document.createElement("a");l.style.display="block";l.setAttribute("href","javascript:void(0);");mxUtils.write(l,mxResources.get("more")+"...");var k=mxUtils.bind(this,function(){mxEvent.removeListener(m,"scroll",p);u(e+1)});mxEvent.addListener(l,"click",k);var v=mxUtils.bind(this,function(){Trello.get("search", {query:""==mxUtils.trim(d)?"is:open":d,cards_limit:100,cards_page:e-1},mxUtils.bind(this,function(g){this.ui.spinner.stop();g=null!=g?g.cards:null;if(null==g||0==g.length)mxUtils.write(m,mxResources.get("noFiles"));else{1==e&&(m.appendChild(n(mxResources.get("filterCards")+"...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.ui,d,mxResources.get("ok"),mxUtils.bind(this,function(a){null!=a&&(d=a,u())}),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(m));for(var q=0;q<g.length;q++)mxUtils.bind(this,function(d){m.appendChild(n(d.name,mxUtils.bind(this,function(){a?(b=d.id,f()):(this.ui.hideDialog(),c(d.id))})))})(g[q]);100==g.length&&(m.appendChild(l),p=function(){m.scrollTop>=m.scrollHeight-m.offsetHeight&&k()},mxEvent.addListener(m,"scroll",p))}}),mxUtils.bind(this,function(a){401==a.status?this.authenticate(A,t,!0):null!=t&&t({message:a.responseText})}))});A()});u()}; +this.ui.showDialog(a.container,300,80,!0,!1);a.init()}))),mxUtils.br(m));for(var t=0;t<g.length;t++)mxUtils.bind(this,function(d){m.appendChild(n(d.name,mxUtils.bind(this,function(){a?(b=d.id,f()):(this.ui.hideDialog(),c(d.id))})))})(g[t]);100==g.length&&(m.appendChild(l),p=function(){m.scrollTop>=m.scrollHeight-m.offsetHeight&&k()},mxEvent.addListener(m,"scroll",p))}}),mxUtils.bind(this,function(a){401==a.status?this.authenticate(v,q,!0):null!=q&&q({message:a.responseText})}))});v()});u()}; 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,c,b){GitHubFile.call(this,a,c,b);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,c){a.last_commit_id=c};GitLabLibrary=function(a,c,b){GitLabFile.call(this,a,c,b)};mxUtils.extend(GitLabLibrary,GitLabFile);GitLabLibrary.prototype.doSave=function(a,c,b){this.saveFile(a,!1,c,b)};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.authenticate=function(a,c){if(null==window.onGitLabCallback){var b=mxUtils.bind(this,function(){var d=!0;this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(g,e){var k=encodeURIComponent(window.location.origin+"/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){d?(window.onGitLabCallback= null,d=!1,null==k?c({message:mxResources.get("accessDenied"),retry:b}):(null!=e&&e(),this.token=k,this.setUser(null),g&&this.setPersistentToken(this.token),a())):null!=n&&n.close()}):c({message:mxResources.get("serviceUnavailableOrBlocked"),retry:b})}),mxUtils.bind(this,function(){d&&(window.onGitLabCallback=null,d=!1,c({message:mxResources.get("accessDenied"),retry:b}))}))});b()}else c({code:App.ERROR_BUSY})}; -GitLabClient.prototype.executeRequest=function(a,c,b,d){var g=mxUtils.bind(this,function(k){var m=!0,n=window.setTimeout(mxUtils.bind(this,function(){m=!1;b({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout),t=this.token;a.setRequestHeaders=function(a,b){a.setRequestHeader("Authorization","Bearer "+t);a.setRequestHeader("PRIVATE_TOKEN",t);a.setRequestHeader("Content-Type","application/json")};a.send(mxUtils.bind(this,function(){window.clearTimeout(n);if(m)if(200<=a.getStatus()&& +GitLabClient.prototype.executeRequest=function(a,c,b,d){var g=mxUtils.bind(this,function(k){var m=!0,n=window.setTimeout(mxUtils.bind(this,function(){m=!1;b({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout),q=this.token;a.setRequestHeaders=function(a,b){a.setRequestHeader("Authorization","Bearer "+q);a.setRequestHeader("PRIVATE_TOKEN",q);a.setRequestHeader("Content-Type","application/json")};a.send(mxUtils.bind(this,function(){window.clearTimeout(n);if(m)if(200<=a.getStatus()&& 299>=a.getStatus()||d&&404==a.getStatus())c(a);else if(401===a.getStatus())k?b({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){e(!0)},b)})}):this.authenticate(function(){g(!0)},b);else if(403===a.getStatus()){var f=!1;try{var l=JSON.parse(a.getText());null!=l&&null!=l.errors&&0<l.errors.length&&(f="too_large"==l.errors[0].code)}catch(p){}b({message:mxResources.get(f?"drawingTooLarge":"forbidden")})}else 404===a.getStatus()?b({message:this.getErrorMessage(a, mxResources.get("fileNotFound"))}):400===a.getStatus()?b({status:400}):b({status:a.getStatus(),message:this.getErrorMessage(a,mxResources.get("error")+" "+a.getStatus())})}),b)}),e=mxUtils.bind(this,function(a){null==this.user?this.updateUser(function(){e(!0)},b,a):g(a)});null==this.token?this.authenticate(function(){e(!0)},b):e(!1)}; -GitLabClient.prototype.getRefIndex=function(a,c,b,d,g){if(null!=g)b(a,g);else{var e=a.length-2,k=mxUtils.bind(this,function(){if(2>e)d({message:mxResources.get("fileNotFound")});else{var g=Math.max(e-1,0),n=a.slice(0,g).join("/"),g=a[g],t=a[e],f=a.slice(e+1,a.length).join("/"),n=this.baseUrl+"/projects/"+encodeURIComponent(n+"/"+g)+"/repository/"+(c?"tree?path="+f+"&ref="+t:"files/"+encodeURIComponent(f)+"?ref="+t),l=new mxXmlRequest(n,null,"HEAD");this.executeRequest(l,mxUtils.bind(this,function(){200== +GitLabClient.prototype.getRefIndex=function(a,c,b,d,g){if(null!=g)b(a,g);else{var e=a.length-2,k=mxUtils.bind(this,function(){if(2>e)d({message:mxResources.get("fileNotFound")});else{var g=Math.max(e-1,0),n=a.slice(0,g).join("/"),g=a[g],q=a[e],f=a.slice(e+1,a.length).join("/"),n=this.baseUrl+"/projects/"+encodeURIComponent(n+"/"+g)+"/repository/"+(c?"tree?path="+f+"&ref="+q:"files/"+encodeURIComponent(f)+"?ref="+q),l=new mxXmlRequest(n,null,"HEAD");this.executeRequest(l,mxUtils.bind(this,function(){200== l.getStatus()?b(a,e):d({message:mxResources.get("fileNotFound")})}),mxUtils.bind(this,function(){404==l.getStatus()?(e--,k()):d({message:mxResources.get("fileNotFound")})}))}});k()}}; -GitLabClient.prototype.getFile=function(a,c,b,d,g,e){d=null!=d?d:!1;this.getRefIndex(a.split("/"),!1,mxUtils.bind(this,function(e,m){var k=Math.max(m-1,0),t=e.slice(0,k).join("/"),f=e[k],l=e[m];a=e.slice(m+1,e.length).join("/");k=/\.png$/i.test(a);if(!g&&(/\.v(dx|sdx?)$/i.test(a)||/\.gliffy$/i.test(a)||!this.ui.useCanvasForExport&&k))null!=this.token?(k=this.baseUrl+"/projects/"+encodeURIComponent(t+"/"+f)+"/repository/files/"+encodeURIComponent(l),e=a.split("/"),this.ui.convertFile(k,0<e.length? -e[e.length-1]:a,null,this.extension,c,b)):b({message:mxResources.get("accessDenied")});else{var p="&t="+(new Date).getTime(),k=this.baseUrl+"/projects/"+encodeURIComponent(t+"/"+f)+"/repository/files/"+encodeURIComponent(a)+"?ref="+l,k=new mxXmlRequest(k+p,null,"GET");this.executeRequest(k,mxUtils.bind(this,function(a){try{c(this.createGitLabFile(t,f,l,JSON.parse(a.getText()),d,m))}catch(y){b(y)}}),b)}}),b,e)}; +GitLabClient.prototype.getFile=function(a,c,b,d,g,e){d=null!=d?d:!1;this.getRefIndex(a.split("/"),!1,mxUtils.bind(this,function(e,m){var k=Math.max(m-1,0),q=e.slice(0,k).join("/"),f=e[k],l=e[m];a=e.slice(m+1,e.length).join("/");k=/\.png$/i.test(a);if(!g&&(/\.v(dx|sdx?)$/i.test(a)||/\.gliffy$/i.test(a)||!this.ui.useCanvasForExport&&k))null!=this.token?(k=this.baseUrl+"/projects/"+encodeURIComponent(q+"/"+f)+"/repository/files/"+encodeURIComponent(l),e=a.split("/"),this.ui.convertFile(k,0<e.length? +e[e.length-1]:a,null,this.extension,c,b)):b({message:mxResources.get("accessDenied")});else{var p="&t="+(new Date).getTime(),k=this.baseUrl+"/projects/"+encodeURIComponent(q+"/"+f)+"/repository/files/"+encodeURIComponent(a)+"?ref="+l,k=new mxXmlRequest(k+p,null,"GET");this.executeRequest(k,mxUtils.bind(this,function(a){try{c(this.createGitLabFile(q,f,l,JSON.parse(a.getText()),d,m))}catch(v){b(v)}}),b)}}),b,e)}; GitLabClient.prototype.createGitLabFile=function(a,c,b,d,g,e){var k=DRAWIO_GITLAB_URL+"/",m=d.file_name;a={org:a,repo:c,ref:b,name:m,path:d.file_path,html_url:k+a+"/"+c+"/blob/"+b+"/"+d.file_path,download_url:k+a+"/"+c+"/raw/"+b+"/"+d.file_path+"?inline=false",last_commit_id:d.last_commit_id,refPos:e};c=d.content;"base64"===d.encoding&&(/\.jpe?g$/i.test(m)?c="data:image/jpeg;base64,"+c:/\.gif$/i.test(m)?c="data:image/gif;base64,"+c:/\.png$/i.test(m)?(d=this.ui.extractGraphModelFromPng(c),c=null!= d&&0<d.length?d:"data:image/png;base64,"+c):c=Base64.decode(c));return g?new GitLabLibrary(this.ui,c,a):new GitLabFile(this.ui,c,a)}; GitLabClient.prototype.insertFile=function(a,c,b,d,g,e,k){g=null!=g?g:!1;this.getRefIndex(e.split("/"),!0,mxUtils.bind(this,function(e,n){var m=Math.max(n-1,0),f=e.slice(0,m).join("/"),l=e[m],p=e[n];path=e.slice(n+1,e.length).join("/");0<path.length&&(path+="/");path+=a;this.checkExists(f+"/"+l+"/"+p+"/"+path,!0,mxUtils.bind(this,function(e,m){if(e)if(g)k||(c=Base64.encode(c)),this.showCommitDialog(a,!0,mxUtils.bind(this,function(a){this.writeFile(f,l,p,path,a,c,m,mxUtils.bind(this,function(a){try{var c= -JSON.parse(a.getText());b(this.createGitLabFile(f,l,p,c.content,g,n))}catch(v){d(v)}}),d)}),d);else{var q=DRAWIO_GITLAB_URL+"/";b(new GitLabFile(this.ui,c,{org:f,repo:l,ref:p,name:a,path:path,html_url:q+f+"/"+l+"/blob/"+p+"/"+path,download_url:q+f+"/"+l+"/raw/"+p+"/"+path+"?inline=false",refPos:n,last_commit_id:m,isNew:!0}))}else d()}))}),d)}; +JSON.parse(a.getText());b(this.createGitLabFile(f,l,p,c.content,g,n))}catch(B){d(B)}}),d)}),d);else{var t=DRAWIO_GITLAB_URL+"/";b(new GitLabFile(this.ui,c,{org:f,repo:l,ref:p,name:a,path:path,html_url:t+f+"/"+l+"/blob/"+p+"/"+path,download_url:t+f+"/"+l+"/raw/"+p+"/"+path+"?inline=false",refPos:n,last_commit_id:m,isNew:!0}))}else d()}))}),d)}; GitLabClient.prototype.checkExists=function(a,c,b){this.getFile(a,mxUtils.bind(this,function(d){if(c){var g=this.ui.spinner.pause();this.ui.confirm(mxResources.get("replaceIt",[a]),function(){g();b(!0,d.getCurrentEtag())},function(){g();b(!1)})}else this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){b(!1)})}),mxUtils.bind(this,function(a){b(!0)}),null,!0)}; -GitLabClient.prototype.writeFile=function(a,c,b,d,g,e,k,m,n){if(e.length>=this.maxFileSize)n({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(e.length)+" / 1 MB)"});else{var t="POST";b={path:encodeURIComponent(d),branch:decodeURIComponent(b),commit_message:g,content:e,encoding:"base64"};null!=k&&(b.last_commit_id=k,t="PUT");a=this.baseUrl+"/projects/"+encodeURIComponent(a+"/"+c)+"/repository/files/"+encodeURIComponent(d);t=new mxXmlRequest(a,JSON.stringify(b),t);this.executeRequest(t, +GitLabClient.prototype.writeFile=function(a,c,b,d,g,e,k,m,n){if(e.length>=this.maxFileSize)n({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(e.length)+" / 1 MB)"});else{var q="POST";b={path:encodeURIComponent(d),branch:decodeURIComponent(b),commit_message:g,content:e,encoding:"base64"};null!=k&&(b.last_commit_id=k,q="PUT");a=this.baseUrl+"/projects/"+encodeURIComponent(a+"/"+c)+"/repository/files/"+encodeURIComponent(d);q=new mxXmlRequest(a,JSON.stringify(b),q);this.executeRequest(q, mxUtils.bind(this,function(a){m(a)}),n)}}; -GitLabClient.prototype.saveFile=function(a,c,b,d,g){var e=a.meta.org,k=a.meta.repo,m=a.meta.ref,n=a.meta.path,t=mxUtils.bind(this,function(d,f){this.writeFile(e,k,m,n,g,f,d,mxUtils.bind(this,function(d){delete a.meta.isNew;this.getFile(e+"/"+k+"/"+m+"/"+n,mxUtils.bind(this,function(b){b.getData()==a.getData()?c(b.getCurrentEtag()):c({content:a.getCurrentEtag()})}),b,null,null,a.meta.refPos)}),b)}),f=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)}),b,this.ui.getCurrentFile()!=a?a.getData():null):t(a.meta.last_commit_id,Base64.encode(a.getData()))});d?this.getFile(e+"/"+k+"/"+m+"/"+n,mxUtils.bind(this,function(b){a.meta.last_commit_id=b.meta.last_commit_id;f()}),b):f()};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,c,b,d,g){var e=a.meta.org,k=a.meta.repo,m=a.meta.ref,n=a.meta.path,q=mxUtils.bind(this,function(d,f){this.writeFile(e,k,m,n,g,f,d,mxUtils.bind(this,function(d){delete a.meta.isNew;this.getFile(e+"/"+k+"/"+m+"/"+n,mxUtils.bind(this,function(b){b.getData()==a.getData()?c(b.getCurrentEtag()):c({content:a.getCurrentEtag()})}),b,null,null,a.meta.refPos)}),b)}),f=mxUtils.bind(this,function(){this.ui.useCanvasForExport&&/(\.png)$/i.test(n)?this.ui.getEmbeddedPng(mxUtils.bind(this, +function(b){q(a.meta.last_commit_id,b)}),b,this.ui.getCurrentFile()!=a?a.getData():null):q(a.meta.last_commit_id,Base64.encode(a.getData()))});d?this.getFile(e+"/"+k+"/"+m+"/"+n,mxUtils.bind(this,function(b){a.meta.last_commit_id=b.meta.last_commit_id;f()}),b):f()};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,c){var b=null,d=null,g=null,e=null,k=document.createElement("div");k.style.whiteSpace="nowrap";k.style.overflow="hidden";k.style.height="224px";var m=document.createElement("h3");mxUtils.write(m,mxResources.get(a?"selectFile":"selectFolder"));m.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";k.appendChild(m);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="194px";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 f=new CustomDialog(this.ui,k,mxUtils.bind(this,function(){c(b+"/"+d+"/"+encodeURIComponent(g)+"/"+e)}));this.ui.showDialog(f.container,340,270,!0,!0);a&&f.okButton.parentNode.removeChild(f.okButton);var l= -mxUtils.bind(this,function(a,b,c){var d=document.createElement("a");d.setAttribute("href","javascript:void(0);");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 c=document.createElement("div");c.style.marginBottom="8px";c.appendChild(l(b+"/"+d,mxUtils.bind(this,function(){e=null;C()})));a||(mxUtils.write(c," / "),c.appendChild(l(decodeURIComponent(g),mxUtils.bind(this,function(){e= -null;z()}))));if(null!=e&&0<e.length){var f=e.split("/");for(a=0;a<f.length;a++)(function(a){mxUtils.write(c," / ");c.appendChild(l(f[a],mxUtils.bind(this,function(){e=f.slice(0,a+1).join("/");y()})))})(a)}n.appendChild(c)}),u=mxUtils.bind(this,function(a){this.ui.handleError(a,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(e=g=d=b=null,C()):this.ui.hideDialog()}))}),y=mxUtils.bind(this,function(){var k=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(b+ -"/"+d)+"/repository/tree?path="+e+"&ref="+g,null,"GET");f.okButton.removeAttribute("disabled");n.innerHTML="";this.ui.spinner.spin(n,mxResources.get("loading"));this.executeRequest(k,mxUtils.bind(this,function(f){p(!g);this.ui.spinner.stop();var k=JSON.parse(f.getText());n.appendChild(l("../ [Up]",mxUtils.bind(this,function(){if(""==e)e=null,C();else{var a=e.split("/");e=a.slice(0,a.length-1).join("/");y()}}),"4px"));if(null==k||0==k.length)mxUtils.write(n,mxResources.get("noFiles"));else{var m=!0; -f=mxUtils.bind(this,function(f){for(var p=0;p<k.length;p++)mxUtils.bind(this,function(k){if(f==("tree"==k.type)){var p=t.cloneNode();p.style.backgroundColor=m?"#eeeeee":"";m=!m;var v=document.createElement("img");v.src=IMAGE_PATH+"/"+("tree"==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(l(k.name+("tree"==k.type?"/":""),mxUtils.bind(this,function(){"tree"==k.type?(e=k.path,y()):a&&"blob"== -k.type&&(this.ui.hideDialog(),c(b+"/"+d+"/"+g+"/"+k.path))})));n.appendChild(p)}})(k[p])});f(!0);a&&f(!1)}}),u,!0)}),q=null,A=null,z=mxUtils.bind(this,function(a){null==a&&(n.innerHTML="",a=1);var c=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(b+"/"+d)+"/repository/branches?per_page=100&page="+a,null,"GET");f.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(n,mxResources.get("loading"));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(){mxEvent.removeListener(n,"scroll",A);z(a+1)});mxEvent.addListener(q,"click",k);this.executeRequest(c,mxUtils.bind(this,function(b){this.ui.spinner.stop();1==a&&(p(!0),n.appendChild(l("../ [Up]",mxUtils.bind(this,function(){e=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=t.cloneNode();c.style.backgroundColor=0==b%2?"#eeeeee":"";c.appendChild(l(a.name,mxUtils.bind(this,function(){g=encodeURIComponent(a.name);e="";y()})));n.appendChild(c)})(b[c],c);100==b.length&&(n.appendChild(q),A=function(){n.scrollTop>=n.scrollHeight-n.offsetHeight&&k()},mxEvent.addListener(n,"scroll",A))}}),u)});f.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!=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 c=mxUtils.bind(this,function(){mxEvent.removeListener(n,"scroll",A);C(a+1)});mxEvent.addListener(q,"click",c);var f=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"); +"border-box";n.style.padding="4px";n.style.overflow="auto";n.style.lineHeight="1.2em";n.style.height="194px";k.appendChild(n);var q=document.createElement("div");q.style.textOverflow="ellipsis";q.style.boxSizing="border-box";q.style.overflow="hidden";q.style.padding="4px";q.style.width="100%";var f=new CustomDialog(this.ui,k,mxUtils.bind(this,function(){c(b+"/"+d+"/"+encodeURIComponent(g)+"/"+e)}));this.ui.showDialog(f.container,340,270,!0,!0);a&&f.okButton.parentNode.removeChild(f.okButton);var l= +mxUtils.bind(this,function(a,b,c){var d=document.createElement("a");d.setAttribute("href","javascript:void(0);");mxUtils.write(d,a);mxEvent.addListener(d,"click",b);null!=c&&(a=q.cloneNode(),a.style.padding=c,a.appendChild(d),d=a);return d}),p=mxUtils.bind(this,function(a){var c=document.createElement("div");c.style.marginBottom="8px";c.appendChild(l(b+"/"+d,mxUtils.bind(this,function(){e=null;C()})));a||(mxUtils.write(c," / "),c.appendChild(l(decodeURIComponent(g),mxUtils.bind(this,function(){e= +null;y()}))));if(null!=e&&0<e.length){var f=e.split("/");for(a=0;a<f.length;a++)(function(a){mxUtils.write(c," / ");c.appendChild(l(f[a],mxUtils.bind(this,function(){e=f.slice(0,a+1).join("/");v()})))})(a)}n.appendChild(c)}),u=mxUtils.bind(this,function(a){this.ui.handleError(a,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(e=g=d=b=null,C()):this.ui.hideDialog()}))}),v=mxUtils.bind(this,function(){var k=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(b+ +"/"+d)+"/repository/tree?path="+e+"&ref="+g,null,"GET");f.okButton.removeAttribute("disabled");n.innerHTML="";this.ui.spinner.spin(n,mxResources.get("loading"));this.executeRequest(k,mxUtils.bind(this,function(f){p(!g);this.ui.spinner.stop();var k=JSON.parse(f.getText());n.appendChild(l("../ [Up]",mxUtils.bind(this,function(){if(""==e)e=null,C();else{var a=e.split("/");e=a.slice(0,a.length-1).join("/");v()}}),"4px"));if(null==k||0==k.length)mxUtils.write(n,mxResources.get("noFiles"));else{var m=!0; +f=mxUtils.bind(this,function(f){for(var p=0;p<k.length;p++)mxUtils.bind(this,function(k){if(f==("tree"==k.type)){var p=q.cloneNode();p.style.backgroundColor=m?"#eeeeee":"";m=!m;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;p.appendChild(x);p.appendChild(l(k.name+("tree"==k.type?"/":""),mxUtils.bind(this,function(){"tree"==k.type?(e=k.path,v()):a&&"blob"== +k.type&&(this.ui.hideDialog(),c(b+"/"+d+"/"+g+"/"+k.path))})));n.appendChild(p)}})(k[p])});f(!0);a&&f(!1)}}),u,!0)}),t=null,z=null,y=mxUtils.bind(this,function(a){null==a&&(n.innerHTML="",a=1);var c=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(b+"/"+d)+"/repository/branches?per_page=100&page="+a,null,"GET");f.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(n,mxResources.get("loading"));null!=t&&null!=t.parentNode&&t.parentNode.removeChild(t);t=document.createElement("a"); +t.style.display="block";t.setAttribute("href","javascript:void(0);");mxUtils.write(t,mxResources.get("more")+"...");var k=mxUtils.bind(this,function(){mxEvent.removeListener(n,"scroll",z);y(a+1)});mxEvent.addListener(t,"click",k);this.executeRequest(c,mxUtils.bind(this,function(b){this.ui.spinner.stop();1==a&&(p(!0),n.appendChild(l("../ [Up]",mxUtils.bind(this,function(){e=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=q.cloneNode();c.style.backgroundColor=0==b%2?"#eeeeee":"";c.appendChild(l(a.name,mxUtils.bind(this,function(){g=encodeURIComponent(a.name);e="";v()})));n.appendChild(c)})(b[c],c);100==b.length&&(n.appendChild(t),z=function(){n.scrollTop>=n.scrollHeight-n.offsetHeight&&k()},mxEvent.addListener(n,"scroll",z))}}),u)});f.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!=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 c=mxUtils.bind(this,function(){mxEvent.removeListener(n,"scroll",z);C(a+1)});mxEvent.addListener(t,"click",c);var f=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()))}),u)}),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()))}),u)});f(mxUtils.bind(this,function(f){var m=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(m,mxUtils.bind(this,function(m){this.ui.spinner.stop();m=JSON.parse(m.getText());if(null!=m&&0!=m.length||null!=f&&0!=f.length){1==a&&(n.appendChild(l(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?(b=a[0],d=a[1],g="master",e=null,2<a.length&&(e=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,v=0;v<m.length;v++)mxUtils.bind(this,function(a,c){var f=t.cloneNode();f.style.backgroundColor=p?"#eeeeee":"";p=!p;f.appendChild(l(a.name_with_namespace,mxUtils.bind(this,function(){b=a.owner.username;d=a.path;g=a.default_branch||"master";e="";y()})));n.appendChild(f)})(m[v], -v);for(v=0;v<f.length;v++)k(f[v],mxUtils.bind(this,function(a,c){for(var f=0;f<c.length;f++){var k=t.cloneNode();k.style.backgroundColor=p?"#eeeeee":"";p=!p;mxUtils.bind(this,function(c){k.appendChild(l(c.name_with_namespace,mxUtils.bind(this,function(){b=a.full_path;d=c.path;g=c.default_branch||"master";e="";y()})));n.appendChild(k)})(c[f])}}))}else mxUtils.write(n,mxResources.get("noFiles"));100==m.length&&(n.appendChild(q),A=function(){n.scrollTop>=n.scrollHeight-n.offsetHeight&&c()},mxEvent.addListener(n, -"scroll",A))}),u)}))});this.token?this.user?C():this.updateUser(function(){C()},u,!0):this.authenticate(mxUtils.bind(this,function(){this.updateUser(function(){C()},u,!0)}),u)};GitLabClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);this.token=null};DrawioComment=function(a,c,b,d,g,e,k){this.file=a;this.id=c;this.content=b;this.modifiedDate=d;this.createdDate=g;this.isResolved=e;this.user=k;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(a){null!=a&&this.replies.push(a)};DrawioComment.prototype.addReply=function(a,c,b,d,g){c()};DrawioComment.prototype.editComment=function(a,c,b){c()};DrawioComment.prototype.deleteComment=function(a,c){a()};DriveComment=function(a,c,b,d,g,e,k,m){DrawioComment.call(this,a,c,b,d,g,e,k);this.pCommentId=m};mxUtils.extend(DriveComment,DrawioComment);DriveComment.prototype.addReply=function(a,c,b,d,g){a={content:a.content};d?a.verb="resolve":g&&(a.verb="reopen");this.file.ui.drive.executeRequest(gapi.client.drive.replies.insert({fileId:this.file.getId(),commentId:this.id,resource:a}),mxUtils.bind(this,function(a){c(a.replyId)}),b)}; +a.length).join("/"))),v()):(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<m.length;x++)mxUtils.bind(this,function(a,c){var f=q.cloneNode();f.style.backgroundColor=p?"#eeeeee":"";p=!p;f.appendChild(l(a.name_with_namespace,mxUtils.bind(this,function(){b=a.owner.username;d=a.path;g=a.default_branch||"master";e="";v()})));n.appendChild(f)})(m[x], +x);for(x=0;x<f.length;x++)k(f[x],mxUtils.bind(this,function(a,c){for(var f=0;f<c.length;f++){var k=q.cloneNode();k.style.backgroundColor=p?"#eeeeee":"";p=!p;mxUtils.bind(this,function(c){k.appendChild(l(c.name_with_namespace,mxUtils.bind(this,function(){b=a.full_path;d=c.path;g=c.default_branch||"master";e="";v()})));n.appendChild(k)})(c[f])}}))}else mxUtils.write(n,mxResources.get("noFiles"));100==m.length&&(n.appendChild(t),z=function(){n.scrollTop>=n.scrollHeight-n.offsetHeight&&c()},mxEvent.addListener(n, +"scroll",z))}),u)}))});this.token?this.user?C():this.updateUser(function(){C()},u,!0):this.authenticate(mxUtils.bind(this,function(){this.updateUser(function(){C()},u,!0)}),u)};GitLabClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);this.token=null};DrawioComment=function(a,c,b,d,g,e,k){this.file=a;this.id=c;this.content=b;this.modifiedDate=d;this.createdDate=g;this.isResolved=e;this.user=k;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(a){null!=a&&this.replies.push(a)};DrawioComment.prototype.addReply=function(a,c,b,d,g){c()};DrawioComment.prototype.editComment=function(a,c,b){c()};DrawioComment.prototype.deleteComment=function(a,c){a()};DriveComment=function(a,c,b,d,g,e,k,m){DrawioComment.call(this,a,c,b,d,g,e,k);this.pCommentId=m};mxUtils.extend(DriveComment,DrawioComment);DriveComment.prototype.addReply=function(a,c,b,d,g){a={content:a.content};d?a.verb="resolve":g&&(a.verb="reopen");this.file.ui.drive.executeRequest(gapi.client.drive.replies.insert({fileId:this.file.getId(),commentId:this.id,resource:a}),mxUtils.bind(this,function(a){c(a.replyId)}),b)}; DriveComment.prototype.editComment=function(a,c,b){this.content=a;a={content:a};this.file.ui.drive.executeRequest(this.pCommentId?gapi.client.drive.replies.patch({fileId:this.file.getId(),commentId:this.pCommentId,replyId:this.id,resource:a}):gapi.client.drive.comments.patch({fileId:this.file.getId(),commentId:this.id,resource:a}),c,b)}; DriveComment.prototype.deleteComment=function(a,c){this.file.ui.drive.executeRequest(this.pCommentId?gapi.client.drive.replies["delete"]({fileId:this.file.getId(),commentId:this.pCommentId,replyId:this.id}):gapi.client.drive.comments["delete"]({fileId:this.file.getId(),commentId:this.id}),a,c)};App=function(a,c,b){EditorUi.call(this,a,c,null!=b?b:"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 b={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"}; @@ -9243,8 +9257,8 @@ null!=a&&(a.innerHTML="Error loading page. <a>Please try refreshing.</a>",a.getE App.initPluginCallback();null!=e&&App.loadPlugins(e.split(";"));if(null!=g&&0<g.length&&"0"!=urlParams.plugins){for(var e=window.location.protocol+"//"+window.location.host,k=!0,m=0;m<g.length&&k;m++)"/"!=g[m].charAt(0)&&g[m].substring(0,e.length)!=e&&(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(m=0;m<g.length;m++)try{null==App.pluginsLoaded[g[m]]&&(App.pluginsLoaded[g[m]]=!0,App.embedModePluginsCount++,"/"==g[m].charAt(0)&&(g[m]=PLUGINS_BASE_PATH+g[m]),mxscript(g[m]))}catch(l){}}}"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();try{if(null!=mxSettings.settings){if(null!=mxSettings.settings.autosaveDelay){var n=parseInt(mxSettings.settings.autosaveDelay);!isNaN(n)&&0<n?(DrawioFile.prototype.autosaveDelay=n,null!=window.console&&console.log("Setting autosaveDelay to "+DrawioFile.prototype.autosaveDelay)):null!=window.console&&console.log("Invalid value for autosaveDelay")}null!=mxSettings.settings.defaultEdgeLength&& -(n=parseInt(mxSettings.settings.defaultEdgeLength),!isNaN(n)&&0<n?(Graph.prototype.defaultEdgeLength=n,null!=window.console&&console.log("Setting defaultEdgeLength to "+Graph.prototype.defaultEdgeLength)):null!=window.console&&console.log("Invalid value for defaultEdgeLength"))}}catch(l){null!=window.console&&console.error(l)}if("1"==urlParams.configure){var t=window.opener||window.parent,f=function(a){if(a.source==t)try{var b=JSON.parse(a.data);null!=b&&"configure"==b.action&&(mxEvent.removeListener(window, -"message",f),Editor.configure(b.config,!0),mxSettings.load(),d())}catch(u){null!=window.console&&console.log("Error in configuration: "+u)}};mxEvent.addListener(window,"message",f);t.postMessage(JSON.stringify({event:"configure"}),"*")}else d()};mxUtils.extend(App,EditorUi);App.prototype.defaultUserPicture="https://lh3.googleusercontent.com/-HIzvXUy6QUY/AAAAAAAAAAI/AAAAAAAAAAA/giuR7PQyjEk/photo.jpg?sz=30";App.prototype.shareImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2RpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDowOTgwMTE3NDA3MjA2ODExODhDNkFGMDBEQkQ0RTgwOSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDoxMjU2NzdEMTcwRDIxMUUxQjc0MDkxRDhCNUQzOEFGRCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDoxMjU2NzdEMDcwRDIxMUUxQjc0MDkxRDhCNUQzOEFGRCIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowNjgwMTE3NDA3MjA2ODExODcxRkM4MUY1OTFDMjQ5OCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowNzgwMTE3NDA3MjA2ODExODhDNkFGMDBEQkQ0RTgwOSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PrM/fs0AAADgSURBVHjaYmDAA/7//88MwgzkAKDGFiD+BsQ/QWxSNaf9RwN37twpI8WAS+gGfP78+RpQSoRYA36iG/D379+vQClNdLVMOMz4gi7w79+/n0CKg1gD9qELvH379hzIHGK9oA508ieY8//8+fO5rq4uFCilRKwL1JmYmNhhHEZGRiZ+fn6Q2meEbDYG4u3/cYCfP38uA7kOm0ZOIJ7zn0jw48ePPiDFhmzArv8kgi9fvuwB+w5qwH9ykjswbFSZyM4sEMDPBDTlL5BxkFSd7969OwZ2BZKYGhDzkmjOJ4AAAwBhpRqGnEFb8QAAAABJRU5ErkJggg=="; +(n=parseInt(mxSettings.settings.defaultEdgeLength),!isNaN(n)&&0<n?(Graph.prototype.defaultEdgeLength=n,null!=window.console&&console.log("Setting defaultEdgeLength to "+Graph.prototype.defaultEdgeLength)):null!=window.console&&console.log("Invalid value for defaultEdgeLength"))}}catch(l){null!=window.console&&console.error(l)}if("1"==urlParams.configure){var q=window.opener||window.parent,f=function(a){if(a.source==q)try{var b=JSON.parse(a.data);null!=b&&"configure"==b.action&&(mxEvent.removeListener(window, +"message",f),Editor.configure(b.config,!0),mxSettings.load(),d())}catch(u){null!=window.console&&console.log("Error in configuration: "+u)}};mxEvent.addListener(window,"message",f);q.postMessage(JSON.stringify({event:"configure"}),"*")}else d()};mxUtils.extend(App,EditorUi);App.prototype.defaultUserPicture="https://lh3.googleusercontent.com/-HIzvXUy6QUY/AAAAAAAAAAI/AAAAAAAAAAA/giuR7PQyjEk/photo.jpg?sz=30";App.prototype.shareImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2RpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDowOTgwMTE3NDA3MjA2ODExODhDNkFGMDBEQkQ0RTgwOSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDoxMjU2NzdEMTcwRDIxMUUxQjc0MDkxRDhCNUQzOEFGRCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDoxMjU2NzdEMDcwRDIxMUUxQjc0MDkxRDhCNUQzOEFGRCIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowNjgwMTE3NDA3MjA2ODExODcxRkM4MUY1OTFDMjQ5OCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowNzgwMTE3NDA3MjA2ODExODhDNkFGMDBEQkQ0RTgwOSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PrM/fs0AAADgSURBVHjaYmDAA/7//88MwgzkAKDGFiD+BsQ/QWxSNaf9RwN37twpI8WAS+gGfP78+RpQSoRYA36iG/D379+vQClNdLVMOMz4gi7w79+/n0CKg1gD9qELvH379hzIHGK9oA508ieY8//8+fO5rq4uFCilRKwL1JmYmNhhHEZGRiZ+fn6Q2meEbDYG4u3/cYCfP38uA7kOm0ZOIJ7zn0jw48ePPiDFhmzArv8kgi9fvuwB+w5qwH9ykjswbFSZyM4sEMDPBDTlL5BxkFSd7969OwZ2BZKYGhDzkmjOJ4AAAwBhpRqGnEFb8QAAAABJRU5ErkJggg=="; App.prototype.chevronUpImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NDg2NEE3NUY1MUVBMTFFM0I3MUVEMTc0N0YyOUI4QzEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NDg2NEE3NjA1MUVBMTFFM0I3MUVEMTc0N0YyOUI4QzEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo0ODY0QTc1RDUxRUExMUUzQjcxRUQxNzQ3RjI5QjhDMSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo0ODY0QTc1RTUxRUExMUUzQjcxRUQxNzQ3RjI5QjhDMSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pg+qUokAAAAMUExURQAAANnZ2b+/v////5bgre4AAAAEdFJOU////wBAKqn0AAAAL0lEQVR42mJgRgMMRAswMKAKMDDARBjg8lARBoR6KImkH0wTbygT6YaS4DmAAAMAYPkClOEDDD0AAAAASUVORK5CYII=": IMAGE_PATH+"/chevron-up.png"; App.prototype.chevronDownImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NDg2NEE3NUI1MUVBMTFFM0I3MUVEMTc0N0YyOUI4QzEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NDg2NEE3NUM1MUVBMTFFM0I3MUVEMTc0N0YyOUI4QzEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo0ODY0QTc1OTUxRUExMUUzQjcxRUQxNzQ3RjI5QjhDMSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo0ODY0QTc1QTUxRUExMUUzQjcxRUQxNzQ3RjI5QjhDMSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PsCtve8AAAAMUExURQAAANnZ2b+/v////5bgre4AAAAEdFJOU////wBAKqn0AAAALUlEQVR42mJgRgMMRAkwQEXBNAOcBSPhclB1cNVwfcxI+vEZykSpoSR6DiDAAF23ApT99bZ+AAAAAElFTkSuQmCC":IMAGE_PATH+ @@ -9262,7 +9276,7 @@ e+'" target="_blank" style="display:inline;text-decoration:none;font-weight:700; typeof OneDrive?(this.oneDrive=new OneDriveClient(this),this.oneDrive.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()})),this.fireEvent(new mxEventObject("clientLoaded","client",this.oneDrive))):null==window.DrawOneDriveClientCallback&&(window.DrawOneDriveClientCallback=c)});c()}if("1"!=urlParams.embed||"1"==urlParams.tr){var b=mxUtils.bind(this,function(){"undefined"!==typeof window.Trello?(this.trello=new TrelloClient(this),this.trello.addListener("userChanged", mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()})),this.fireEvent(new mxEventObject("clientLoaded","client",this.trello))):null==window.DrawTrelloClientCallback&&(window.DrawTrelloClientCallback=b)});b()}if("1"!=urlParams.embed||"1"==urlParams.gapi){var d=mxUtils.bind(this,function(){if("undefined"!==typeof gapi){var b=mxUtils.bind(this,function(){this.drive=new DriveClient(this);"420247213240"==this.drive.appId&&this.editor.addListener("fileLoaded",mxUtils.bind(this, function(){var a=this.getCurrentFile();null!=a&&a.constructor==DriveFile&&(a=document.getElementById("geFooterItem2"),null!=a&&(a.innerHTML='<a href="https://support.draw.io/display/DO/2014/11/27/Switching+application+in+Google+Drive" target="_blank" title="IMPORTANT NOTICE">IMPORTANT NOTICE</a>'))}));this.drive.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries();this.checkLicense();0<=App.GOOGLE_REALTIME_EOL-Date.now()&&(null==this.drive.user|| -isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings.closeRealtimeWarning&&!(mxSettings.settings.closeRealtimeWarning<(new Date).getTime()-3456E5)||this.editor.chromeless&&!this.editor.editable||this.drive.checkRealtimeFiles(mxUtils.bind(this,function(){var b=a("You need to take action to convert legacy files. Click here.","https://desk.draw.io/support/solutions/articles/16000092210","geStatusAlert",mxUtils.bind(this,function(){b.parentNode.removeChild(b);this.hideFooter();isLocalStorage&& +isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings.closeRealtimeWarning&&!(mxSettings.settings.closeRealtimeWarning<(new Date).getTime()-1728E5)||this.editor.chromeless&&!this.editor.editable||this.drive.checkRealtimeFiles(mxUtils.bind(this,function(){var b=a("You need to take action to convert legacy files. Click here.","https://desk.draw.io/support/solutions/articles/16000092210","geStatusAlert",mxUtils.bind(this,function(){b.parentNode.removeChild(b);this.hideFooter();isLocalStorage&& null!=mxSettings.settings&&(mxSettings.settings.closeRealtimeWarning=Date.now(),mxSettings.save())}));document.body.appendChild(b);window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(b.style,"transform","translate(-50%,0%)")}),1500)})))}));this.fireEvent(new mxEventObject("clientLoaded","client",this.drive))});null!=window.DrawGapiClientCallback?(gapi.load(("0"!=urlParams.picker?"picker,":"")+"auth:"+App.GOOGLE_APIS,mxUtils.bind(this,function(a){null!=gapi.client&&gapi.client.load("drive", "v2",mxUtils.bind(this,function(){gapi.auth.init(mxUtils.bind(this,function(){null!=gapi.client.drive&&b()}))}))})),window.DrawGapiClientCallback=null):b()}else null==window.DrawGapiClientCallback&&(window.DrawGapiClientCallback=d)});d()}if("1"!=urlParams.embed||"1"==urlParams.db){var g=mxUtils.bind(this,function(){"function"===typeof Dropbox&&"undefined"!==typeof Dropbox.choose?(window.DrawDropboxClientCallback=null,this.dropbox=new DropboxClient(this),this.dropbox.addListener("userChanged",mxUtils.bind(this, function(){this.updateUserElement();this.restoreLibraries()})),this.fireEvent(new mxEventObject("clientLoaded","client",this.dropbox))):null==window.DrawDropboxClientCallback&&(window.DrawDropboxClientCallback=g)});g()}if("1"!=urlParams.embed){if(this.bg=this.createBackground(),document.body.appendChild(this.bg),this.diagramContainer.style.visibility="hidden",this.formatContainer.style.visibility="hidden",this.hsplit.style.display="none",this.sidebarContainer.style.display="none",this.sidebarFooterContainer.style.display= @@ -9284,11 +9298,11 @@ App.prototype.addRecent=function(a){if(isLocalStorage&&null!=localStorage){var c App.prototype.resetRecent=function(a){if(isLocalStorage&&null!=localStorage)try{localStorage.removeItem(".recent")}catch(c){}};App.prototype.removeDraft=function(){if(isLocalStorage&&null!=localStorage&&"0"==urlParams.splash)try{localStorage.removeItem(".draft")}catch(a){}}; App.prototype.onBeforeUnload=function(){if("1"==urlParams.embed&&this.editor.modified)return mxResources.get("allChangesLost");var a=this.getCurrentFile();if(null!=a)if(a.constructor!=LocalFile||""!=a.getHash()||a.isModified()||"1"==urlParams.nowarn||this.isDiagramEmpty()||null!=urlParams.url||this.editor.isChromelessView()){if(a.isModified())return mxResources.get("allChangesLost");a.close(!0)}else return mxResources.get("ensureDataSaved")}; App.prototype.updateDocumentTitle=function(){if(!this.editor.graph.isLightboxView()){var a=this.editor.appName,c=this.getCurrentFile();this.isOfflineApp()&&(a+=" app");null!=c&&(a=(null!=c.getTitle()?c.getTitle():this.defaultFilename)+" - "+a);document.title=a}};App.prototype.createCrcTable=function(){for(var a=[],c,b=0;256>b;b++){c=b;for(var d=0;8>d;d++)c=c&1?3988292384^c>>>1:c>>>1;a[b]=c}return a}; -App.prototype.getThumbnail=function(a,c){var b=!1;try{var d=!0,g=window.setTimeout(mxUtils.bind(this,function(){d=!1;c(null)}),this.timeout),e=mxUtils.bind(this,function(a){window.clearTimeout(g);d&&c(a)});null==this.thumbImageCache&&(this.thumbImageCache={});var k=this.editor.graph,m=null!=k.themes&&"darkTheme"==k.defaultThemeName;if(null!=this.pages&&(this.currentPage!=this.pages[0]||m)){var k=this.createTemporaryGraph(m?k.getDefaultStylesheet():k.getStylesheet()),n=k.getGlobalVariable,t=this.pages[0]; -m&&(k.defaultThemeName="default");k.getGlobalVariable=function(a){return"page"==a?t.getName():"pagenumber"==a?1:n.apply(this,arguments)};document.body.appendChild(k.container);k.model.setRoot(t.root)}if(mxClient.IS_CHROMEAPP||!k.mathEnabled&&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(D){a=null}e(a)}),a,this.thumbImageCache,"#ffffff",function(){e()},null,null, -null,null,null,null,k),b=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var f=document.createElement("canvas"),l=k.getGraphBounds(),p=a/l.width,p=Math.min(1,Math.min(3*a/(4*l.height),p)),u=Math.floor(l.x),y=Math.floor(l.y);f.setAttribute("width",Math.ceil(p*(l.width+4)));f.setAttribute("height",Math.ceil(p*(l.height+4)));var q=f.getContext("2d");q.scale(p,p);q.translate(-u,-y);var A=k.background;if(null==A||""==A||A==mxConstants.NONE)A="#ffffff";q.save();q.fillStyle=A;q.fillRect(u, -y,Math.ceil(l.width+4),Math.ceil(l.height+4));q.restore();var z=new mxJsCanvas(f),C=new mxAsyncCanvas(this.thumbImageCache);z.images=this.thumbImageCache.images;var v=new mxImageExport;v.drawShape=function(a,b){a.shape instanceof mxShape&&a.shape.checkBounds()&&(b.save(),b.translate(.5,.5),a.shape.paint(b),b.translate(-.5,-.5),b.restore())};v.drawText=function(a,b){};v.drawState(k.getView().getState(k.model.root),C);C.finish(mxUtils.bind(this,function(){try{v.drawState(k.getView().getState(k.model.root), -z),k!=this.editor.graph&&null!=k.container.parentNode&&k.container.parentNode.removeChild(k.container)}catch(B){f=null}e(f)}));b=!0}}catch(B){b=!1,null!=k&&k!=this.editor.graph&&null!=k.container.parentNode&&k.container.parentNode.removeChild(k.container)}return b}; +App.prototype.getThumbnail=function(a,c){var b=!1;try{var d=!0,g=window.setTimeout(mxUtils.bind(this,function(){d=!1;c(null)}),this.timeout),e=mxUtils.bind(this,function(a){window.clearTimeout(g);d&&c(a)});null==this.thumbImageCache&&(this.thumbImageCache={});var k=this.editor.graph,m=null!=k.themes&&"darkTheme"==k.defaultThemeName;if(null!=this.pages&&(this.currentPage!=this.pages[0]||m)){var k=this.createTemporaryGraph(m?k.getDefaultStylesheet():k.getStylesheet()),n=k.getGlobalVariable,q=this.pages[0]; +m&&(k.defaultThemeName="default");k.getGlobalVariable=function(a){return"page"==a?q.getName():"pagenumber"==a?1:n.apply(this,arguments)};document.body.appendChild(k.container);k.model.setRoot(q.root)}if(mxClient.IS_CHROMEAPP||!k.mathEnabled&&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(D){a=null}e(a)}),a,this.thumbImageCache,"#ffffff",function(){e()},null,null, +null,null,null,null,k),b=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var f=document.createElement("canvas"),l=k.getGraphBounds(),p=a/l.width,p=Math.min(1,Math.min(3*a/(4*l.height),p)),u=Math.floor(l.x),v=Math.floor(l.y);f.setAttribute("width",Math.ceil(p*(l.width+4)));f.setAttribute("height",Math.ceil(p*(l.height+4)));var t=f.getContext("2d");t.scale(p,p);t.translate(-u,-v);var z=k.background;if(null==z||""==z||z==mxConstants.NONE)z="#ffffff";t.save();t.fillStyle=z;t.fillRect(u, +v,Math.ceil(l.width+4),Math.ceil(l.height+4));t.restore();var y=new mxJsCanvas(f),C=new mxAsyncCanvas(this.thumbImageCache);y.images=this.thumbImageCache.images;var B=new mxImageExport;B.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())};B.drawText=function(a,b){};B.drawState(k.getView().getState(k.model.root),C);C.finish(mxUtils.bind(this,function(){try{B.drawState(k.getView().getState(k.model.root), +y),k!=this.editor.graph&&null!=k.container.parentNode&&k.container.parentNode.removeChild(k.container)}catch(x){f=null}e(f)}));b=!0}}catch(x){b=!1,null!=k&&k!=this.editor.graph&&null!=k.container.parentNode&&k.container.parentNode.removeChild(k.container)}return b}; App.prototype.createBackground=function(){var a=this.createDiv("background");a.style.position="absolute";a.style.background="white";a.style.left="0px";a.style.top="0px";a.style.bottom="0px";a.style.right="0px";mxUtils.setOpacity(a,100);mxClient.IS_QUIRKS&&new mxDivResizer(a);return a}; (function(){var a=EditorUi.prototype.setMode;App.prototype.setMode=function(c,b){a.apply(this,arguments);null!=this.mode&&(Editor.useLocalStorage=this.mode==App.MODE_BROWSER);if(null!=this.appIcon){var d=this.getCurrentFile();c=null!=d?d.getMode():c;c==App.MODE_GOOGLE?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("googleDrive")])),this.appIcon.style.cursor="pointer"):c==App.MODE_DROPBOX?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("dropbox")])), this.appIcon.style.cursor="pointer"):c==App.MODE_ONEDRIVE?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("oneDrive")])),this.appIcon.style.cursor="pointer"):(this.appIcon.removeAttribute("title"),this.appIcon.style.cursor=c==App.MODE_DEVICE?"pointer":"default")}if(b)try{if(isLocalStorage)localStorage.setItem(".mode",c);else if("undefined"!=typeof Storage){var g=new Date;g.setYear(g.getFullYear()+1);document.cookie="MODE="+c+"; expires="+g.toUTCString()}}catch(e){}}})(); @@ -9307,7 +9321,7 @@ mxResources.get("close");c.appendChild(a);mxEvent.addListener(a,"click",function App.prototype.start=function(){this.bg.parentNode.removeChild(this.bg);this.restoreLibraries();this.spinner.stop();try{if("1"!=urlParams.client&&"1"!=urlParams.embed&&mxEvent.addListener(window,"hashchange",mxUtils.bind(this,function(a){try{this.hideDialog();var b=this.getDiagramId(),c=this.getCurrentFile();null!=c&&c.getHash()==b||this.loadFile(b,!0)}catch(m){null!=document.body&&this.handleError(m,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash= null!=a?a.getHash():""}))}})),(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.url)this.loadFile("U"+urlParams.url,!0);else if(null==this.getCurrentFile()){var a=mxUtils.bind(this,function(){if("1"==urlParams.client&&(null==window.location.hash||0==window.location.hash.length||"#P"==window.location.hash.substring(0,2))){var a=mxUtils.bind(this,function(a){"data:image/png;base64,"==a.substring(0,22)&&(a=this.extractGraphModelFromPng(a));var b=urlParams.title,b=null!=b? decodeURIComponent(b):this.defaultFilename;a=new LocalFile(this,a,b,!0);null!=window.location.hash&&"#P"==window.location.hash.substring(0,2)&&(a.getHash=function(){return window.location.hash.substring(1)});this.fileLoaded(a);this.getCurrentFile().setModified(!this.editor.chromeless)}),b=window.opener||window.parent;if(b!=window){var c=urlParams.create;null!=c?a(b[decodeURIComponent(c)]):(c=urlParams.data,null!=c?a(decodeURIComponent(c)):this.installMessageHandler(mxUtils.bind(this,function(c,d){d.source== -b&&a(c)})))}}else if(null==this.dialog)if("1"==urlParams.demo)c=Editor.useLocalStorage,this.createFile(this.defaultFilename,null,null,null,null,null,null,!0),Editor.useLocalStorage=c;else{c=!1;try{c=null!=window.opener&&null!=window.opener.openFile}catch(t){}if(c)this.spinner.spin(document.body,mxResources.get("loading"));else if(c=this.getDiagramId(),"0"!=urlParams.splash||null!=c&&0!=c.length)this.loadFile(c);else if(!mxClient.IS_CHROMEAPP){var d=this.getDraft(),n=null!=d?d.data:this.getFileData(), +b&&a(c)})))}}else if(null==this.dialog)if("1"==urlParams.demo)c=Editor.useLocalStorage,this.createFile(this.defaultFilename,null,null,null,null,null,null,!0),Editor.useLocalStorage=c;else{c=!1;try{c=null!=window.opener&&null!=window.opener.openFile}catch(q){}if(c)this.spinner.spin(document.body,mxResources.get("loading"));else if(c=this.getDiagramId(),"0"!=urlParams.splash||null!=c&&0!=c.length)this.loadFile(c);else if(!mxClient.IS_CHROMEAPP){var d=this.getDraft(),n=null!=d?d.data:this.getFileData(), c=Editor.useLocalStorage;this.createFile(this.defaultFilename,n,null,null,null,null,null,!0);Editor.useLocalStorage=c;null!=d&&(c=this.getCurrentFile(),null!=c&&c.addUnsavedStatus())}}}),c=decodeURIComponent(urlParams.create||"");if((null==window.location.hash||1>=window.location.hash.length)&&null!=c&&0<c.length&&this.spinner.spin(document.body,mxResources.get("loading"))){var b=mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("reconnecting"))&&(window.location.search= this.getSearch(["create","title"]))}),d=mxUtils.bind(this,function(a){this.spinner.stop();if("0"!=urlParams.splash){this.fileLoaded(new LocalFile(this,a,null));this.editor.graph.setEnabled(!1);this.mode=urlParams.mode;var b=urlParams.title,b=null!=b?decodeURIComponent(b):this.defaultFilename;a=this.getServiceCount(!0);isLocalStorage&&a++;var c=4>=a?2:6<a?4:3,b=new CreateDialog(this,b,mxUtils.bind(this,function(a,b){if(null==b){this.hideDialog();var c=Editor.useLocalStorage;this.createFile(0<a.length? a:this.defaultFilename,this.getFileData(),null,null,null,!0,null,!0);Editor.useLocalStorage=c}else this.pickFolder(b,mxUtils.bind(this,function(c){this.createFile(a,this.getFileData(!0),null,b,null,!0,c)}))}),null,null,null,null,"1"==urlParams.browser,null,null,!0,c,null,null,null,this.editor.fileExtensions);this.showDialog(b.container,400,a>c?390:270,!0,!1,mxUtils.bind(this,function(a){a&&null==this.getCurrentFile()&&this.showSplash()}));b.init()}}),c=decodeURIComponent(c);if("http://"!=c.substring(0, @@ -9330,20 +9344,20 @@ App.prototype.saveLibrary=function(a,c,b,d,g,e,k){try{d=null!=d?d:this.mode;g=nu m,b,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,c)}),n,this.drive.libraryMimeType):d==App.MODE_GITHUB&&null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitHub.insertLibrary(a,m,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,c)}),n,b):d==App.MODE_GITLAB&&null!=this.gitLab&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitLab.insertLibrary(a,m,mxUtils.bind(this, function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,c)}),n,b):d==App.MODE_TRELLO&&null!=this.trello&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.trello.insertLibrary(a,m,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,c)}),n,b):d==App.MODE_DROPBOX&&null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.dropbox.insertLibrary(a,m,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0); this.libraryLoaded(a,c)}),n,b):d==App.MODE_ONEDRIVE&&null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.oneDrive.insertLibrary(a,m,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,c)}),n,b):d==App.MODE_BROWSER?(b=mxUtils.bind(this,function(){var b=new StorageLibrary(this,m,a);b.saveFile(a,!1,mxUtils.bind(this,function(){this.hideDialog(!0);this.libraryLoaded(b,c)}),n)}),null==localStorage.getItem(a)?b():this.confirm(mxResources.get("replaceIt", -[a]),b)):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})}));else if(g||this.spinner.spin(document.body,mxResources.get("saving"))){b.setData(m);var t=mxUtils.bind(this,function(){b.save(!0,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);e||this.libraryLoaded(b,c);null!=k&&k()}),n)});if(a!=b.getTitle()){var f=b.getHash();b.rename(a,mxUtils.bind(this,function(a){b.constructor!=LocalLibrary&&f!=b.getHash()&&(mxSettings.removeCustomLibrary(f),mxSettings.addCustomLibrary(b.getHash())); -this.removeLibrarySidebar(f);t()}),n)}else t()}}catch(l){this.handleError(l)}}; +[a]),b)):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})}));else if(g||this.spinner.spin(document.body,mxResources.get("saving"))){b.setData(m);var q=mxUtils.bind(this,function(){b.save(!0,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);e||this.libraryLoaded(b,c);null!=k&&k()}),n)});if(a!=b.getTitle()){var f=b.getHash();b.rename(a,mxUtils.bind(this,function(a){b.constructor!=LocalLibrary&&f!=b.getHash()&&(mxSettings.removeCustomLibrary(f),mxSettings.addCustomLibrary(b.getHash())); +this.removeLibrarySidebar(f);q()}),n)}else q()}}catch(l){this.handleError(l)}}; App.prototype.saveFile=function(a,c){var b=this.getCurrentFile();if(null!=b){var d=mxUtils.bind(this,function(){this.removeDraft();this.getCurrentFile()==b||b.isModified()||(b.getMode()!=App.MODE_DEVICE?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved"))):this.editor.setStatus(""));null!=c&&c()});if(a||null==b.getTitle()||null==this.mode){var g=null!=b.getTitle()?b.getTitle():this.defaultFilename,e=!mxClient.IS_IOS||!navigator.standalone,k=this.mode,m=this.getServiceCount(!0); isLocalStorage&&m++;var n=4>=m?2:6<m?4:3,g=new CreateDialog(this,g,mxUtils.bind(this,function(a,b){null!=a&&0<a.length&&(null==k&&b==App.MODE_DEVICE?(this.setMode(App.MODE_DEVICE),this.save(a,d)):"download"==b?(new LocalFile(this,null,a)).save():"_blank"==b?(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(this.getFileData(!0)),this.openLink(this.getUrl(window.location.pathname),null,!0)):k!=b?this.pickFolder(b,mxUtils.bind(this,function(c){this.createFile(a, this.getFileData(/(\.xml)$/i.test(a)||0>a.indexOf(".")||/(\.drawio)$/i.test(a),/(\.svg)$/i.test(a),/(\.html)$/i.test(a)),null,b,d,null==this.mode,c)})):null!=b&&this.save(a,d))}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),null,null,e,null,!0,n,null,null,null,this.editor.fileExtensions);this.showDialog(g.container,400,m>n?390:270,!0,!0);g.init()}else this.save(b.getTitle(),d)}}; App.prototype.loadTemplate=function(a,c,b,d){var g=!1,e=a;this.editor.isCorsEnabledForUrl(e)||(e="t="+(new Date).getTime(),e=PROXY_URL+"?url="+encodeURIComponent(a)+"&base64=1&"+e,g=!0);var k=null!=d?d:a;this.loadUrl(e,mxUtils.bind(this,function(d){try{var e=g?!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(d):atob(d):d;if(/(\.v(dx|sdx?))($|\?)/i.test(k)||this.isVisioData(e))this.importVisio(this.base64ToBlob(d.substring(d.indexOf(",")+1)),function(a){c(a)},b,k);else if(!this.isOffline()&& -(new XMLHttpRequest).upload&&this.isRemoteFileFormat(e,k))this.parseFile(new Blob([e],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&"<mxGraphModel"==a.responseText.substring(0,13)&&c(a.responseText)}),a);else if(this.isLucidChartData(e))this.convertLucidChart(e,mxUtils.bind(this,function(a){c(a)}),mxUtils.bind(this,function(a){b(a)}));else{if(/(\.png)($|\?)/i.test(k)||this.isPngData(e))e=this.extractGraphModelFromPng(d);c(e)}}catch(t){b(t)}}), +(new XMLHttpRequest).upload&&this.isRemoteFileFormat(e,k))this.parseFile(new Blob([e],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&"<mxGraphModel"==a.responseText.substring(0,13)&&c(a.responseText)}),a);else if(this.isLucidChartData(e))this.convertLucidChart(e,mxUtils.bind(this,function(a){c(a)}),mxUtils.bind(this,function(a){b(a)}));else{if(/(\.png)($|\?)/i.test(k)||this.isPngData(e))e=this.extractGraphModelFromPng(d);c(e)}}catch(q){b(q)}}), b,/(\.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,c,b,d,g,e,k,m,n){d=m?null:null!=d?d:this.mode;if(null!=a&&this.spinner.spin(document.body,mxResources.get("inserting"))){c=null!=c?c:this.emptyDiagramXml;var t=mxUtils.bind(this,function(){this.spinner.stop()}),f=mxUtils.bind(this,function(a){t();null==a&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():null!=a&&this.handleError(a)});try{if(d==App.MODE_GOOGLE&&null!=this.drive)null==k&&null!=this.stateArg&&null!=this.stateArg.folderId&&(k=this.stateArg.folderId), -this.drive.insertFile(a,c,k,mxUtils.bind(this,function(a){t();this.fileCreated(a,b,e,g,n)}),f);else if(d==App.MODE_GITHUB&&null!=this.gitHub)this.gitHub.insertFile(a,c,mxUtils.bind(this,function(a){t();this.fileCreated(a,b,e,g,n)}),f,!1,k);else if(d==App.MODE_GITLAB&&null!=this.gitLab)this.gitLab.insertFile(a,c,mxUtils.bind(this,function(a){t();this.fileCreated(a,b,e,g,n)}),f,!1,k);else if(d==App.MODE_TRELLO&&null!=this.trello)this.trello.insertFile(a,c,mxUtils.bind(this,function(a){t();this.fileCreated(a, -b,e,g,n)}),f,!1,k);else if(d==App.MODE_DROPBOX&&null!=this.dropbox)this.dropbox.insertFile(a,c,mxUtils.bind(this,function(a){t();this.fileCreated(a,b,e,g,n)}),f);else if(d==App.MODE_ONEDRIVE&&null!=this.oneDrive)this.oneDrive.insertFile(a,c,mxUtils.bind(this,function(a){t();this.fileCreated(a,b,e,g,n)}),f,!1,k);else if(d==App.MODE_BROWSER){t();var l=mxUtils.bind(this,function(){var d=new StorageFile(this,c,a);d.saveFile(a,!1,mxUtils.bind(this,function(){this.fileCreated(d,b,e,g,n)}),f)});null==localStorage.getItem(a)? -l():this.confirm(mxResources.get("replaceIt",[a]),l,mxUtils.bind(this,function(){null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))}else t(),this.fileCreated(new LocalFile(this,c,a,null==d),b,e,g,n)}catch(p){t(),this.handleError(p)}}}; -App.prototype.fileCreated=function(a,c,b,d,g){var e=window.location.pathname;null!=c&&0<c.length&&(e+="?libs="+c);null!=g&&0<g.length&&(e+="?clibs="+g);e=this.getUrl(e);a.getMode()!=App.MODE_DEVICE&&(e+="#"+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,m=window.location.protocol+"//"+window.location.hostname+e,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,m));null!=t&&t.container.parentNode.removeChild(t.container);var f=mxUtils.bind(this,function(){this.spinner.stop()}),l=mxUtils.bind(this,function(){f();var k=this.getCurrentFile();null==b&&null!=k&&(b=!k.isModified()&&null==k.getMode());var l=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(a);b&&a.addAllSavedStatus(); +App.prototype.createFile=function(a,c,b,d,g,e,k,m,n){d=m?null:null!=d?d:this.mode;if(null!=a&&this.spinner.spin(document.body,mxResources.get("inserting"))){c=null!=c?c:this.emptyDiagramXml;var q=mxUtils.bind(this,function(){this.spinner.stop()}),f=mxUtils.bind(this,function(a){q();null==a&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():null!=a&&this.handleError(a)});try{if(d==App.MODE_GOOGLE&&null!=this.drive)null==k&&null!=this.stateArg&&null!=this.stateArg.folderId&&(k=this.stateArg.folderId), +this.drive.insertFile(a,c,k,mxUtils.bind(this,function(a){q();this.fileCreated(a,b,e,g,n)}),f);else if(d==App.MODE_GITHUB&&null!=this.gitHub)this.gitHub.insertFile(a,c,mxUtils.bind(this,function(a){q();this.fileCreated(a,b,e,g,n)}),f,!1,k);else if(d==App.MODE_GITLAB&&null!=this.gitLab)this.gitLab.insertFile(a,c,mxUtils.bind(this,function(a){q();this.fileCreated(a,b,e,g,n)}),f,!1,k);else if(d==App.MODE_TRELLO&&null!=this.trello)this.trello.insertFile(a,c,mxUtils.bind(this,function(a){q();this.fileCreated(a, +b,e,g,n)}),f,!1,k);else if(d==App.MODE_DROPBOX&&null!=this.dropbox)this.dropbox.insertFile(a,c,mxUtils.bind(this,function(a){q();this.fileCreated(a,b,e,g,n)}),f);else if(d==App.MODE_ONEDRIVE&&null!=this.oneDrive)this.oneDrive.insertFile(a,c,mxUtils.bind(this,function(a){q();this.fileCreated(a,b,e,g,n)}),f,!1,k);else if(d==App.MODE_BROWSER){q();var l=mxUtils.bind(this,function(){var d=new StorageFile(this,c,a);d.saveFile(a,!1,mxUtils.bind(this,function(){this.fileCreated(d,b,e,g,n)}),f)});null==localStorage.getItem(a)? +l():this.confirm(mxResources.get("replaceIt",[a]),l,mxUtils.bind(this,function(){null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))}else q(),this.fileCreated(new LocalFile(this,c,a,null==d),b,e,g,n)}catch(p){q(),this.handleError(p)}}}; +App.prototype.fileCreated=function(a,c,b,d,g){var e=window.location.pathname;null!=c&&0<c.length&&(e+="?libs="+c);null!=g&&0<g.length&&(e+="?clibs="+g);e=this.getUrl(e);a.getMode()!=App.MODE_DEVICE&&(e+="#"+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,m=window.location.protocol+"//"+window.location.hostname+e,n=k,q=null;null!=k&&/\.svg$/i.test(a.getTitle())&& +(q=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(q.container),n=this.decodeNodeIntoGraph(n,q));a.setData(this.createFileData(k,q,a,m));null!=q&&q.container.parentNode.removeChild(q.container);var f=mxUtils.bind(this,function(){this.spinner.stop()}),l=mxUtils.bind(this,function(){f();var k=this.getCurrentFile();null==b&&null!=k&&(b=!k.isModified()&&null==k.getMode());var l=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(a);b&&a.addAllSavedStatus(); null!=c&&this.sidebar.showEntries(c);if(null!=g){for(var d=[],e=g.split(";"),f=0;f<e.length;f++)d.push(decodeURIComponent(e[f]));this.loadLibraries(d)}}),m=mxUtils.bind(this,function(){b||null==k||!k.isModified()?l():this.confirm(mxResources.get("allChangesLost"),null,l,mxResources.get("cancel"),mxResources.get("discardChanges"))});null!=d&&d();null==b||b?m():(a.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(a.getData(),a.getTitle(), null==a.getMode())),null!=d&&d(),window.openWindow(e,null,m))});a.constructor==LocalFile?l():a.saveFile(a.getTitle(),!1,mxUtils.bind(this,function(){l()}),mxUtils.bind(this,function(a){f();this.handleError(a)}))}}; App.prototype.loadFile=function(a,c,b,d,g){this.hideDialog();var e=mxUtils.bind(this,function(){if(null==a||0==a.length)this.editor.setStatus(""),this.fileLoaded(null);else if(this.spinner.spin(document.body,mxResources.get("loading")))if("L"==a.charAt(0))if(this.spinner.stop(),isLocalStorage)try{a=decodeURIComponent(a.substring(1));var e=localStorage.getItem(a);if(null!=e)this.fileLoaded(new StorageFile(this,e,a)),null!=d&&d();else throw{message:mxResources.get("fileNotFound")};}catch(p){this.handleError(p, @@ -9360,9 +9374,9 @@ App.prototype.getLibraryStorageHint=function(a){var c=a.getTitle();a.constructor mxResources.get("browser")+")":a.constructor==LocalLibrary&&(c+=" ("+mxResources.get("device")+")");return c};App.prototype.restoreLibraries=function(){this.loadLibraries(mxSettings.getCustomLibraries(),mxUtils.bind(this,function(){this.loadLibraries((urlParams.clibs||"").split(";"))}))}; App.prototype.loadLibraries=function(a,c){if(null!=this.sidebar){null==this.pendingLibraries&&(this.pendingLibraries={});var b=mxUtils.bind(this,function(a,b){b||mxSettings.removeCustomLibrary(a);delete this.pendingLibraries[a]}),d=0,g=[],e=mxUtils.bind(this,function(){if(0==d){if(null!=a)for(var b=a.length-1;0<=b;b--)null!=g[b]&&this.loadLibrary(g[b]);null!=c&&c()}});if(null!=a)for(var k=0;k<a.length;k++){var m=encodeURIComponent(decodeURIComponent(a[k]));mxUtils.bind(this,function(a,c){if(null!= a&&0<a.length&&null==this.pendingLibraries[a]&&null==this.sidebar.palettes[a]){d++;var f=mxUtils.bind(this,function(b){delete this.pendingLibraries[a];g[c]=b;d--;e()}),k=mxUtils.bind(this,function(c){b(a,c);d--;e()});this.pendingLibraries[a]=!0;var m=a.substring(0,1);if("L"==m)(isLocalStorage||mxClient.IS_CHROMEAPP)&&window.setTimeout(mxUtils.bind(this,function(){try{var b=decodeURIComponent(a.substring(1));this.getLocalData(b,mxUtils.bind(this,function(a){".scratchpad"==b&&null==a&&(a=this.emptyLibraryXml); -null!=a?f(new StorageLibrary(this,a,b)):k()}))}catch(z){k()}}),0);else if("U"==m){var n=decodeURIComponent(a.substring(1));if(!this.isOffline()){m=n;this.editor.isCorsEnabledForUrl(m)||(m="t="+(new Date).getTime(),m=PROXY_URL+"?url="+encodeURIComponent(n)+"&"+m);try{mxUtils.get(m,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus())try{f(new UrlLibrary(this,a.getText(),n))}catch(z){k()}else k()}),function(){k()})}catch(A){k()}}}else if("R"==m){if(m=decodeURIComponent(a.substring(1)), -!this.isOffline())try{var m=JSON.parse(m),t={id:m[0],title:m[1],downloadUrl:m[2]};this.remoteInvoke("getFileContent",[t.downloadUrl],null,mxUtils.bind(this,function(a){try{f(new RemoteLibrary(this,a,t))}catch(z){k()}}),function(){k()})}catch(A){k()}}else if("S"==m&&null!=this.loadDesktopLib)try{this.loadDesktopLib(decodeURIComponent(a.substring(1)),function(a){f(a)},k)}catch(A){k()}else{var q=null;"G"==m?null!=this.drive&&null!=this.drive.user&&(q=this.drive):"H"==m?null!=this.gitHub&&null!=this.gitHub.getUser()&& -(q=this.gitHub):"T"==m?null!=this.trello&&this.trello.isAuthorized()&&(q=this.trello):"D"==m?null!=this.dropbox&&null!=this.dropbox.getUser()&&(q=this.dropbox):"W"==m&&null!=this.oneDrive&&null!=this.oneDrive.getUser()&&(q=this.oneDrive);null!=q?q.getLibrary(decodeURIComponent(a.substring(1)),mxUtils.bind(this,function(a){try{f(a)}catch(z){k()}}),function(a){k()}):k(!0)}}})(m,k)}e()}}; +null!=a?f(new StorageLibrary(this,a,b)):k()}))}catch(y){k()}}),0);else if("U"==m){var n=decodeURIComponent(a.substring(1));if(!this.isOffline()){m=n;this.editor.isCorsEnabledForUrl(m)||(m="t="+(new Date).getTime(),m=PROXY_URL+"?url="+encodeURIComponent(n)+"&"+m);try{mxUtils.get(m,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus())try{f(new UrlLibrary(this,a.getText(),n))}catch(y){k()}else k()}),function(){k()})}catch(z){k()}}}else if("R"==m){if(m=decodeURIComponent(a.substring(1)), +!this.isOffline())try{var m=JSON.parse(m),q={id:m[0],title:m[1],downloadUrl:m[2]};this.remoteInvoke("getFileContent",[q.downloadUrl],null,mxUtils.bind(this,function(a){try{f(new RemoteLibrary(this,a,q))}catch(y){k()}}),function(){k()})}catch(z){k()}}else if("S"==m&&null!=this.loadDesktopLib)try{this.loadDesktopLib(decodeURIComponent(a.substring(1)),function(a){f(a)},k)}catch(z){k()}else{var t=null;"G"==m?null!=this.drive&&null!=this.drive.user&&(t=this.drive):"H"==m?null!=this.gitHub&&null!=this.gitHub.getUser()&& +(t=this.gitHub):"T"==m?null!=this.trello&&this.trello.isAuthorized()&&(t=this.trello):"D"==m?null!=this.dropbox&&null!=this.dropbox.getUser()&&(t=this.dropbox):"W"==m&&null!=this.oneDrive&&null!=this.oneDrive.getUser()&&(t=this.oneDrive);null!=t?t.getLibrary(decodeURIComponent(a.substring(1)),mxUtils.bind(this,function(a){try{f(a)}catch(y){k()}}),function(a){k()}):k(!0)}}})(m,k)}e()}}; 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"),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.padding="0 10px 0 10px",this.shareButton.style.marginTop="-4px",this.shareButton.style.height="28px",this.shareButton.style.lineHeight="28px",this.shareButton.style.minWidth="0px",this.shareButton.style.cssFloat="right",this.shareButton.setAttribute("title",mxResources.get("share")), @@ -9378,9 +9392,9 @@ App.prototype.descriptorChanged=function(){var a=this.getCurrentFile();if(null!= 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,c,b,d){var g=this.spinner.pause();this.showDialog((new AuthDialog(this,a,c,mxUtils.bind(this,function(a){try{null!=b&&b(a,mxUtils.bind(this,function(){this.hideDialog();g()}))}catch(k){this.editor.setStatus(mxUtils.htmlEntities(k.message))}}))).container,300,c?180:140,!0,!0,mxUtils.bind(this,function(a){null!=d&&d();a&&null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))}; App.prototype.convertFile=function(a,c,b,d,g,e){var k=c;/\.svg$/i.test(k)||(k=k.substring(0,c.lastIndexOf("."))+d);var m=!1;null!=this.gitHub&&a.substring(0,this.gitHub.baseUrl.length)==this.gitHub.baseUrl&&(m=!0);if(/\.v(dx|sdx?)$/i.test(c)&&Graph.fileSupport&&(new XMLHttpRequest).upload&&"string"===typeof(new XMLHttpRequest).responseType){var n=new XMLHttpRequest;n.open("GET",a,!0);m||(n.responseType="blob");n.onload=mxUtils.bind(this,function(){if(200<=n.status&&299>=n.status){var a=null;m?(a= -JSON.parse(n.responseText),a=this.base64ToBlob(a.content,"application/octet-stream")):a=new Blob([n.response],{type:"application/octet-stream"});this.importVisio(a,mxUtils.bind(this,function(a){g(new LocalFile(this,a,k,!0))}),e,c)}else null!=e&&e({message:mxResources.get("errorLoadingFile")})});n.onerror=e;n.send()}else{var t=mxUtils.bind(this,function(b){try{/\.png$/i.test(c)?(temp=this.extractGraphModelFromPng(b),null!=temp?g(new LocalFile(this,temp,k,!0)):g(new LocalFile(this,b,c,!0))):Graph.fileSupport&& +JSON.parse(n.responseText),a=this.base64ToBlob(a.content,"application/octet-stream")):a=new Blob([n.response],{type:"application/octet-stream"});this.importVisio(a,mxUtils.bind(this,function(a){g(new LocalFile(this,a,k,!0))}),e,c)}else null!=e&&e({message:mxResources.get("errorLoadingFile")})});n.onerror=e;n.send()}else{var q=mxUtils.bind(this,function(b){try{/\.png$/i.test(c)?(temp=this.extractGraphModelFromPng(b),null!=temp?g(new LocalFile(this,temp,k,!0)):g(new LocalFile(this,b,c,!0))):Graph.fileSupport&& (new XMLHttpRequest).upload&&this.isRemoteFileFormat(b,a)?this.parseFile(new Blob([b],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?g(new LocalFile(this,a.responseText,k,!0)):null!=e&&e({message:mxResources.get("errorLoadingFile")}))}),c):g(new LocalFile(this,b,k,!0))}catch(l){null!=e&&e(l)}});b=/\.png$/i.test(c)||/\.jpe?g$/i.test(c)||null!=b&&"image/"==b.substring(0,6);m?mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&& -299>=a.getStatus()){if(null!=g){a=JSON.parse(a.getText());var b=a.content;"base64"===a.encoding&&(b=/\.png$/i.test(c)?"data:image/png;base64,"+b:!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(b):atob(b));t(b)}}else null!=e&&e({code:App.ERROR_UNKNOWN})}),function(){null!=e&&e({code:App.ERROR_UNKNOWN})},!1,this.timeout,function(){null!=e&&e({code:App.ERROR_TIMEOUT,retry:fn})}):this.loadUrl(a,t,e,b)}}; +299>=a.getStatus()){if(null!=g){a=JSON.parse(a.getText());var b=a.content;"base64"===a.encoding&&(b=/\.png$/i.test(c)?"data:image/png;base64,"+b:!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(b):atob(b));q(b)}}else null!=e&&e({code:App.ERROR_UNKNOWN})}),function(){null!=e&&e({code:App.ERROR_UNKNOWN})},!1,this.timeout,function(){null!=e&&e({code:App.ERROR_TIMEOUT,retry:fn})}):this.loadUrl(a,q,e,b)}}; App.prototype.updateHeader=function(){if(null!=this.menubar){this.appIcon=document.createElement("a");this.appIcon.style.display="block";this.appIcon.style.position="absolute";this.appIcon.style.width="40px";this.appIcon.style.height=this.menubarHeight-16+"px";this.appIcon.style.margin="8px 0px 8px 8px";this.appIcon.style.borderRadius="4px";"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?"url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIKICAgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMzA2LjE4NSAxMjAuMjk2IgogICB2aWV3Qm94PSIyNCAyNiA2OCA2OCIKICAgeT0iMHB4IgogICB4PSIwcHgiCiAgIHZlcnNpb249IjEuMSI+CiAgIAkgPGc+PGxpbmUKICAgICAgIHkyPSI3Mi4zOTQiCiAgICAgICB4Mj0iNDEuMDYxIgogICAgICAgeTE9IjQzLjM4NCIKICAgICAgIHgxPSI1OC4wNjkiCiAgICAgICBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiCiAgICAgICBzdHJva2Utd2lkdGg9IjMuNTUyOCIKICAgICAgIHN0cm9rZT0iI0ZGRkZGRiIKICAgICAgIGZpbGw9Im5vbmUiIC8+PGxpbmUKICAgICAgIHkyPSI3Mi4zOTQiCiAgICAgICB4Mj0iNzUuMDc2IgogICAgICAgeTE9IjQzLjM4NCIKICAgICAgIHgxPSI1OC4wNjgiCiAgICAgICBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiCiAgICAgICBzdHJva2Utd2lkdGg9IjMuNTAwOCIKICAgICAgIHN0cm9rZT0iI0ZGRkZGRiIKICAgICAgIGZpbGw9Im5vbmUiIC8+PGc+PHBhdGgKICAgICAgICAgZD0iTTUyLjc3Myw3Ny4wODRjMCwxLjk1NC0xLjU5OSwzLjU1My0zLjU1MywzLjU1M0gzNi45OTljLTEuOTU0LDAtMy41NTMtMS41OTktMy41NTMtMy41NTN2LTkuMzc5ICAgIGMwLTEuOTU0LDEuNTk5LTMuNTUzLDMuNTUzLTMuNTUzaDEyLjIyMmMxLjk1NCwwLDMuNTUzLDEuNTk5LDMuNTUzLDMuNTUzVjc3LjA4NHoiCiAgICAgICAgIGZpbGw9IiNGRkZGRkYiIC8+PC9nPjxnCiAgICAgICBpZD0iZzM0MTkiPjxwYXRoCiAgICAgICAgIGQ9Ik02Ny43NjIsNDguMDc0YzAsMS45NTQtMS41OTksMy41NTMtMy41NTMsMy41NTNINTEuOTg4Yy0xLjk1NCwwLTMuNTUzLTEuNTk5LTMuNTUzLTMuNTUzdi05LjM3OSAgICBjMC0xLjk1NCwxLjU5OS0zLjU1MywzLjU1My0zLjU1M0g2NC4yMWMxLjk1NCwwLDMuNTUzLDEuNTk5LDMuNTUzLDMuNTUzVjQ4LjA3NHoiCiAgICAgICAgIGZpbGw9IiNGRkZGRkYiIC8+PC9nPjxnPjxwYXRoCiAgICAgICAgIGQ9Ik04Mi43NTIsNzcuMDg0YzAsMS45NTQtMS41OTksMy41NTMtMy41NTMsMy41NTNINjYuOTc3Yy0xLjk1NCwwLTMuNTUzLTEuNTk5LTMuNTUzLTMuNTUzdi05LjM3OSAgICBjMC0xLjk1NCwxLjU5OS0zLjU1MywzLjU1My0zLjU1M2gxMi4yMjJjMS45NTQsMCwzLjU1MywxLjU5OSwzLjU1MywzLjU1M1Y3Ny4wODR6IgogICAgICAgICBmaWxsPSIjRkZGRkZGIiAvPjwvZz48L2c+PC9zdmc+)": "url('"+IMAGE_PATH+"/logo-white.png')";this.appIcon.style.backgroundImage=a;this.appIcon.style.backgroundPosition="center center";this.appIcon.style.backgroundRepeat="no-repeat";mxUtils.setPrefixedStyle(this.appIcon.style,"transition","all 125ms linear");mxEvent.addListener(this.appIcon,"mouseover",mxUtils.bind(this,function(){var a=this.getCurrentFile();null!=a&&(a=a.getMode(),a==App.MODE_GOOGLE?this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/google-drive-logo-white.svg)":a==App.MODE_DROPBOX? @@ -9432,104 +9446,103 @@ e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px"; !1,!0),m=a.addCheckbox(c,mxResources.get("grid"),!1,!1);mxEvent.addListener(g,"change",e);mxEvent.addListener(f,"change",e);mxEvent.addListener(k,"change",e);f=231}else k=a.addCheckbox(c,mxResources.get("selectionOnly"),!1,d.isSelectionEmpty()),l=a.addCheckbox(c,mxResources.get("crop"),!d.pageVisible||!a.pdfPageExport,!a.pdfPageExport),m=a.addCheckbox(c,mxResources.get("grid"),!1,!1),a.pdfPageExport||mxEvent.addListener(k,"change",e);c=new CustomDialog(a,c,mxUtils.bind(this,function(){a.downloadFile("pdf", null,null,!k.checked,b?!0:!g.checked,!l.checked,null,null,null,m.checked)}),null,mxResources.get("export"));a.showDialog(c.container,300,f,!0,!0)}else a.showDialog((new PrintDialog(a,mxResources.get("formatPdf"))).container,360,null!=a.pages&&1<a.pages.length?420:360,!0,!0)}));a.actions.addAction("open...",function(){a.pickFile()});a.actions.addAction("close",function(){function b(){a.fileLoaded(null)}var c=a.getCurrentFile();null!=c&&c.isModified()?a.confirm(mxResources.get("allChangesLost"),null, b,mxResources.get("cancel"),mxResources.get("discardChanges")):b()});a.actions.addAction("editShape...",mxUtils.bind(this,function(){d.getSelectionCells();if(1==d.getSelectionCount()){var b=d.getSelectionCell(),c=d.view.getState(b);null!=c&&null!=c.shape&&null!=c.shape.stencil&&(b=new EditShapeDialog(a,b,mxResources.get("editShape")+":",630,400),a.showDialog(b.container,640,480,!0,!1),b.init())}}));a.actions.addAction("revisionHistory...",function(){a.isRevisionHistorySupported()?a.spinner.spin(document.body, -mxResources.get("loading"))&&a.getRevisions(mxUtils.bind(this,function(b,c){a.spinner.stop();var d=new RevisionDialog(a,b,c);a.showDialog(d.container,640,480,!0,!0);d.init()}),mxUtils.bind(this,function(b){a.handleError(b)})):a.showError(mxResources.get("error"),mxResources.get("notAvailable"),mxResources.get("ok"))});a.actions.addAction("createRevision",function(){a.actions.get("save").funct()},null,null,Editor.ctrlKey+"+S");var t=a.actions.addAction("synchronize",function(){a.synchronizeCurrentFile("none"== -DrawioFile.SYNC)},null,null,"Alt+Shift+S");"none"==DrawioFile.SYNC&&(t.label=mxResources.get("refresh"));a.actions.addAction("upload...",function(){var b=a.getCurrentFile();null!=b&&(window.drawdata=a.getFileData(),b=null!=b.getTitle()?b.getTitle():a.defaultFilename,a.openLink(window.location.protocol+"//"+window.location.host+"/?create=drawdata&"+(a.mode==App.MODE_DROPBOX?"mode=dropbox&":"")+"title="+encodeURIComponent(b),null,!0))});"undefined"!==typeof MathJax&&(t=a.actions.addAction("mathematicalTypesetting", -function(){var b=new ChangePageSetup(a);b.ignoreColor=!0;b.ignoreImage=!0;b.mathEnabled=!a.isMathEnabled();d.model.execute(b)}),t.setToggleAction(!0),t.setSelectedCallback(function(){return a.isMathEnabled()}),t.isEnabled=g);if(isLocalStorage||mxClient.IS_CHROMEAPP)t=a.actions.addAction("showStartScreen",function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen());mxSettings.save()}),t.setToggleAction(!0),t.setSelectedCallback(function(){return mxSettings.getShowStartScreen()});var f= +mxResources.get("loading"))&&a.getRevisions(mxUtils.bind(this,function(b,c){a.spinner.stop();var d=new RevisionDialog(a,b,c);a.showDialog(d.container,640,480,!0,!0);d.init()}),mxUtils.bind(this,function(b){a.handleError(b)})):a.showError(mxResources.get("error"),mxResources.get("notAvailable"),mxResources.get("ok"))});a.actions.addAction("createRevision",function(){a.actions.get("save").funct()},null,null,Editor.ctrlKey+"+S");var q=a.actions.addAction("synchronize",function(){a.synchronizeCurrentFile("none"== +DrawioFile.SYNC)},null,null,"Alt+Shift+S");"none"==DrawioFile.SYNC&&(q.label=mxResources.get("refresh"));a.actions.addAction("upload...",function(){var b=a.getCurrentFile();null!=b&&(window.drawdata=a.getFileData(),b=null!=b.getTitle()?b.getTitle():a.defaultFilename,a.openLink(window.location.protocol+"//"+window.location.host+"/?create=drawdata&"+(a.mode==App.MODE_DROPBOX?"mode=dropbox&":"")+"title="+encodeURIComponent(b),null,!0))});"undefined"!==typeof MathJax&&(q=a.actions.addAction("mathematicalTypesetting", +function(){var b=new ChangePageSetup(a);b.ignoreColor=!0;b.ignoreImage=!0;b.mathEnabled=!a.isMathEnabled();d.model.execute(b)}),q.setToggleAction(!0),q.setSelectedCallback(function(){return a.isMathEnabled()}),q.isEnabled=g);if(isLocalStorage||mxClient.IS_CHROMEAPP)q=a.actions.addAction("showStartScreen",function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen());mxSettings.save()}),q.setToggleAction(!0),q.setSelectedCallback(function(){return mxSettings.getShowStartScreen()});var f= a.actions.addAction("autosave",function(){a.editor.setAutosave(!a.editor.autosave)});f.setToggleAction(!0);f.setSelectedCallback(function(){return f.isEnabled()&&a.editor.autosave});a.actions.addAction("editGeometry...",function(){for(var b=d.getSelectionCells(),c=[],e=0;e<b.length;e++)d.getModel().isVertex(b[e])&&c.push(b[e]);0<c.length&&(b=new EditGeometryDialog(a,c),a.showDialog(b.container,200,250,!0,!0),b.init())},null,null,Editor.ctrlKey+"+Shift+M");var l="rounded shadow dashed dashPattern fontFamily fontSize fontColor fontStyle align verticalAlign strokeColor strokeWidth fillColor gradientColor swimlaneFillColor textOpacity gradientDirection glass labelBackgroundColor labelBorderColor opacity spacing spacingTop spacingLeft spacingBottom spacingRight endFill endArrow endSize targetPerimeterSpacing startFill startArrow startSize sourcePerimeterSpacing arcSize".split(" "); a.actions.addAction("copyStyle",function(){var b=d.view.getState(d.getSelectionCell());if(d.isEnabled()&&null!=b){a.copiedStyle=mxUtils.clone(b.style);for(var b=d.getModel().getStyle(b.cell),b=null!=b?b.split(";"):[],c=0;c<b.length;c++){var e=b[c],f=e.indexOf("=");if(0<=f){var g=e.substring(0,f),e=e.substring(f+1);null==a.copiedStyle[g]&&"none"==e&&(a.copiedStyle[g]="none")}}}},null,null,Editor.ctrlKey+"+Shift+C");a.actions.addAction("pasteStyle",function(){if(d.isEnabled()&&!d.isSelectionEmpty()&& null!=a.copiedStyle){d.getModel().beginUpdate();try{for(var b=d.getSelectionCells(),c=0;c<b.length;c++)for(var e=d.view.getState(b[c]),f=0;f<l.length;f++){var g=l[f],k=a.copiedStyle[g];e.style[g]!=k&&d.setCellStyles(g,k,[b[c]])}}finally{d.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+V");a.actions.put("pageBackgroundImage",new Action(mxResources.get("backgroundImage")+"...",function(){if(!a.isOffline()){var b=new BackgroundImageDialog(a,function(b){a.setBackgroundImage(b)});a.showDialog(b.container, 320,170,!0,!0);b.init()}}));a.actions.put("exportPng",new Action(mxResources.get("formatPng")+"...",function(){a.isExportToCanvas()?a.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(b,c,d,e,f,g,k,l,m,n,p){b=parseInt(b);!isNaN(b)&&0<b&&a.exportImage(b/100,c,d,e,f,k,!l,m,null,p)}),!0,!0,"png"):a.isOffline()||mxClient.IS_IOS&&navigator.standalone||a.showRemoteExportDialog(mxResources.get("export"), null,mxUtils.bind(this,function(b,c,d,e,f){a.downloadFile(c?"xmlpng":"png",null,null,b,null,null,d,e,f)}),!1,!0)}));a.actions.put("exportJpg",new Action(mxResources.get("formatJpg")+"...",function(){a.isExportToCanvas()?a.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(b,c,d,e,f,g,k,l,m,n,p){b=parseInt(b);!isNaN(b)&&0<b&&a.exportImage(b/100,!1,d,e,!1,k,!l,!1,"jpeg",p)}),!0,!1,"jpeg"):a.isOffline()|| -mxClient.IS_IOS&&navigator.standalone||a.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(b,c,d,e,f){a.downloadFile("jpeg",null,null,b,null,null,null,e,f)}),!0,!0)}));t=a.actions.put("shadowVisible",new Action(mxResources.get("shadow"),function(){d.setShadowVisible(!d.shadowVisible)}));t.setToggleAction(!0);t.setSelectedCallback(function(){return d.shadowVisible});var p=!1;a.actions.put("about",new Action(mxResources.get("aboutDrawio")+"...",function(){p||(a.showDialog((new AboutDialog(a)).container, +mxClient.IS_IOS&&navigator.standalone||a.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(b,c,d,e,f){a.downloadFile("jpeg",null,null,b,null,null,null,e,f)}),!0,!0)}));q=a.actions.put("shadowVisible",new Action(mxResources.get("shadow"),function(){d.setShadowVisible(!d.shadowVisible)}));q.setToggleAction(!0);q.setSelectedCallback(function(){return d.shadowVisible});var p=!1;a.actions.put("about",new Action(mxResources.get("aboutDrawio")+"...",function(){p||(a.showDialog((new AboutDialog(a)).container, 220,300,!0,!0,function(){p=!1}),p=!0)},null,null,"F1"));a.actions.addAction("userManual...",function(){a.openLink("https://support.draw.io/display/DO/Draw.io+Online+User+Manual")});a.actions.addAction("support...",function(){a.openLink("https://about.draw.io/support/")});a.actions.addAction("exportOptionsDisabled...",function(){a.handleError({message:mxResources.get("exportOptionsDisabledDetails")},mxResources.get("exportOptionsDisabled"))});a.actions.addAction("keyboardShortcuts...",function(){mxClient.IS_CHROMEAPP|| -EditorUi.isElectronApp?a.openLink("https://www.draw.io/shortcuts.svg"):mxClient.IS_SVG?a.openLink("shortcuts.svg"):a.openLink("https://www.draw.io/?lightbox=1#Uhttps%3A%2F%2Fwww.draw.io%2Fshortcuts.svg")});a.actions.addAction("feedback...",function(){var b=new FeedbackDialog(a);a.showDialog(b.container,610,360,!0,!0);b.init()});a.actions.addAction("quickStart...",function(){a.openLink("https://www.youtube.com/watch?v=Z0D96ZikMkc")});t=a.actions.addAction("tags...",mxUtils.bind(this,function(){null== -this.tagsWindow?(this.tagsWindow=new TagsWindow(a,document.body.offsetWidth-380,230,300,120),this.tagsWindow.window.addListener("show",function(){a.fireEvent(new mxEventObject("tags"))}),this.tagsWindow.window.addListener("hide",function(){a.fireEvent(new mxEventObject("tags"))}),this.tagsWindow.window.setVisible(!0),a.fireEvent(new mxEventObject("tags"))):this.tagsWindow.window.setVisible(!this.tagsWindow.window.isVisible())}));t.setToggleAction(!0);t.setSelectedCallback(mxUtils.bind(this,function(){return null!= -this.tagsWindow&&this.tagsWindow.window.isVisible()}));t=a.actions.addAction("find...",mxUtils.bind(this,function(){null==this.findWindow?(this.findWindow=new FindWindow(a,document.body.offsetWidth-300,110,240,140),this.findWindow.window.addListener("show",function(){a.fireEvent(new mxEventObject("find"))}),this.findWindow.window.addListener("hide",function(){a.fireEvent(new mxEventObject("find"))}),this.findWindow.window.setVisible(!0),a.fireEvent(new mxEventObject("find"))):this.findWindow.window.setVisible(!this.findWindow.window.isVisible())})); -t.setToggleAction(!0);t.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.findWindow&&this.findWindow.window.isVisible()}));a.actions.put("exportVsdx",new Action(mxResources.get("formatVsdx")+" (beta)...",function(){a.exportVisio()}));if(mxClient.IS_CHROMEAPP||isLocalStorage&&"1"!=urlParams.offline){this.put("language",new Menu(mxUtils.bind(this,function(b,c){var d=mxUtils.bind(this,function(d){var e=""==d?mxResources.get("automatic"):mxLanguageMap[d],f=null;""!=e&&(f=b.addItem(e, +EditorUi.isElectronApp?a.openLink("https://www.draw.io/shortcuts.svg"):mxClient.IS_SVG?a.openLink("shortcuts.svg"):a.openLink("https://www.draw.io/?lightbox=1#Uhttps%3A%2F%2Fwww.draw.io%2Fshortcuts.svg")});a.actions.addAction("feedback...",function(){var b=new FeedbackDialog(a);a.showDialog(b.container,610,360,!0,!0);b.init()});a.actions.addAction("quickStart...",function(){a.openLink("https://www.youtube.com/watch?v=Z0D96ZikMkc")});q=a.actions.addAction("tags...",mxUtils.bind(this,function(){null== +this.tagsWindow?(this.tagsWindow=new TagsWindow(a,document.body.offsetWidth-380,230,300,120),this.tagsWindow.window.addListener("show",function(){a.fireEvent(new mxEventObject("tags"))}),this.tagsWindow.window.addListener("hide",function(){a.fireEvent(new mxEventObject("tags"))}),this.tagsWindow.window.setVisible(!0),a.fireEvent(new mxEventObject("tags"))):this.tagsWindow.window.setVisible(!this.tagsWindow.window.isVisible())}));q.setToggleAction(!0);q.setSelectedCallback(mxUtils.bind(this,function(){return null!= +this.tagsWindow&&this.tagsWindow.window.isVisible()}));q=a.actions.addAction("find...",mxUtils.bind(this,function(){null==this.findWindow?(this.findWindow=new FindWindow(a,document.body.offsetWidth-300,110,240,140),this.findWindow.window.addListener("show",function(){a.fireEvent(new mxEventObject("find"))}),this.findWindow.window.addListener("hide",function(){a.fireEvent(new mxEventObject("find"))}),this.findWindow.window.setVisible(!0),a.fireEvent(new mxEventObject("find"))):this.findWindow.window.setVisible(!this.findWindow.window.isVisible())})); +q.setToggleAction(!0);q.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.findWindow&&this.findWindow.window.isVisible()}));a.actions.put("exportVsdx",new Action(mxResources.get("formatVsdx")+" (beta)...",function(){a.exportVisio()}));if(mxClient.IS_CHROMEAPP||isLocalStorage&&"1"!=urlParams.offline){this.put("language",new Menu(mxUtils.bind(this,function(b,c){var d=mxUtils.bind(this,function(d){var e=""==d?mxResources.get("automatic"):mxLanguageMap[d],f=null;""!=e&&(f=b.addItem(e, null,mxUtils.bind(this,function(){mxSettings.setLanguage(d);mxSettings.save();mxClient.language=d;mxResources.loadDefaultBundle=!1;mxResources.add(RESOURCE_BASE);a.alert(mxResources.get("restartForChangeRequired"))}),c),(d==mxLanguage||""==d&&null==mxLanguage)&&b.addCheckmark(f,Editor.checkmarkImage));return f});d("");b.addSeparator(c);for(var e in mxLanguageMap)d(e)})));var u=Menus.prototype.createMenubar;Menus.prototype.createMenubar=function(a){var b=u.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}}a.customLayoutConfig=[{layout:"mxHierarchicalLayout",config:{orientation:"west", -intraCellSpacing:30,interRankCellSpacing:100,interHierarchySpacing:60,parallelEdgeSpacing:10}}];a.actions.addAction("runLayout",function(){var b=new TextareaDialog(a,"Run Layouts:",JSON.stringify(a.customLayoutConfig,null,2),function(b){if(0<b.length)try{var c=JSON.parse(b);a.executeLayoutList(c);a.customLayoutConfig=c}catch(x){a.handleError(x),console.error(x)}});b.textarea.style.width="600px";b.textarea.style.height="380px";a.showDialog(b.container,620,460,!0,!0);b.init()});var t=this.get("layout"), -y=t.funct;t.funct=function(b,c){y.apply(this,arguments);b.addSeparator(c);a.menus.addMenuItem(b,"runLayout",c,null,null,mxResources.get("apply")+"...")};this.put("help",new Menu(mxUtils.bind(this,function(b,c){if(!mxClient.IS_CHROMEAPP&&a.isOffline())this.addMenuItems(b,["about"],c);else{var d=b.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", +intraCellSpacing:30,interRankCellSpacing:100,interHierarchySpacing:60,parallelEdgeSpacing:10}}];a.actions.addAction("runLayout",function(){var b=new TextareaDialog(a,"Run Layouts:",JSON.stringify(a.customLayoutConfig,null,2),function(b){if(0<b.length)try{var c=JSON.parse(b);a.executeLayoutList(c);a.customLayoutConfig=c}catch(A){a.handleError(A),console.error(A)}});b.textarea.style.width="600px";b.textarea.style.height="380px";a.showDialog(b.container,620,460,!0,!0);b.init()});var q=this.get("layout"), +v=q.funct;q.funct=function(b,c){v.apply(this,arguments);b.addSeparator(c);a.menus.addMenuItem(b,"runLayout",c,null,null,mxResources.get("apply")+"...")};this.put("help",new Menu(mxUtils.bind(this,function(b,c){if(!mxClient.IS_CHROMEAPP&&a.isOffline())this.addMenuItems(b,["about"],c);else{var d=b.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(b,["-","quickStart","userManual","keyboardShortcuts","-"],c);mxClient.IS_CHROMEAPP||this.addMenuItems(b,["feedback"],c);this.addMenuItems(b,["support","-"],c);EditorUi.isElectronApp||navigator.standalone||"1"==urlParams.embed||this.addMenuItems(b,["downloadDesktop"],c);navigator.standalone|| -"1"==urlParams.embed||this.addMenuItems(b,["useOffline"],c);this.addMenuItems(b,["-","about"],c)}"1"==urlParams.test&&(b.addSeparator(c),this.addSubmenu("testDevelop",b,c));"1"==urlParams.ruler&&(mxResources.parse("rulerInch=Ruler unit: Inches"),a.actions.addAction("rulerInch",mxUtils.bind(this,function(){a.vRuler.setUnit(mxRuler.prototype.INCHES);a.hRuler.setUnit(mxRuler.prototype.INCHES);a.vRuler.drawRuler(!0);a.hRuler.drawRuler(!0)})),mxResources.parse("rulerCM=Ruler unit: CMs"),a.actions.addAction("rulerCM", -mxUtils.bind(this,function(){a.vRuler.setUnit(mxRuler.prototype.CENTIMETER);a.hRuler.setUnit(mxRuler.prototype.CENTIMETER);a.vRuler.drawRuler(!0);a.hRuler.drawRuler(!0)})),mxResources.parse("rulerPixel=Ruler unit: Pixels"),a.actions.addAction("rulerPixel",mxUtils.bind(this,function(){a.vRuler.setUnit(mxRuler.prototype.PIXELS);a.hRuler.setUnit(mxRuler.prototype.PIXELS);a.vRuler.drawRuler(!0);a.hRuler.drawRuler(!0)})),this.addMenuItems(b,["-","rulerInch","rulerCM","rulerPixel"],c))})));"1"==urlParams.test&& -(mxResources.parse("testDevelop=Develop"),mxResources.parse("showBoundingBox=Show bounding box"),mxResources.parse("createSidebarEntry=Create Sidebar Entry"),mxResources.parse("testCheckFile=Check File"),mxResources.parse("testDiff=Diff"),mxResources.parse("testInspect=Inspect"),mxResources.parse("testShowConsole=Show Console"),mxResources.parse("testXmlImageExport=XML Image Export"),mxResources.parse("testDownloadRtModel=Export RT model"),mxResources.parse("testImportRtModel=Import RT model"),a.actions.addAction("createSidebarEntry", -mxUtils.bind(this,function(){d.isSelectionEmpty()||a.showTextDialog("Create Sidebar Entry","sb.createVertexTemplateFromData('"+Graph.compress(mxUtils.getXml(d.encodeCells(d.getSelectionCells())))+"', width, height, 'Title');")})),a.actions.addAction("showBoundingBox",mxUtils.bind(this,function(){var a=d.getGraphBounds(),b=d.view.translate,c=d.view.scale;d.insertVertex(d.getDefaultParent(),null,"",a.x/c-b.x,a.y/c-b.y,a.width/c,a.height/c,"fillColor=none;strokeColor=red;")})),a.actions.addAction("testCheckFile", -mxUtils.bind(this,function(){var b=null!=a.pages&&null!=a.getCurrentFile()?a.getCurrentFile().getAnonymizedXmlForPages(a.pages):"",b=new TextareaDialog(a,"Paste Data:",b,function(b){if(0<b.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)))};"<"!= -b.charAt(0)&&(b=Graph.decompress(b),mxLog.debug("See console for uncompressed XML"),console.log("xml",b));var d=mxUtils.parseXml(b),e=a.getPagesForNode(d.documentElement,"mxGraphModel");if(null!=e&&0<e.length)try{var f=a.getHashValueForPages(e);mxLog.debug("Checksum: ",f)}catch(I){mxLog.debug("Error: ",I.message)}else mxLog.debug("No pages found for checksum");var g=d.getElementsByTagName("root");for(b=0;b<g.length;b++)c(g[b]);mxLog.show()}catch(I){a.handleError(I),console.error(I)}});b.textarea.style.width= -"600px";b.textarea.style.height="380px";a.showDialog(b.container,620,460,!0,!0);b.init()})),a.actions.addAction("testDiff",mxUtils.bind(this,function(){if(null!=a.pages){var b=new TextareaDialog(a,"Paste Data:","",function(b){if(0<b.length)try{console.log(JSON.stringify(a.diffPages(a.pages,a.getPagesForNode(mxUtils.parseXml(b).documentElement)),null,2))}catch(D){a.handleError(D),console.error(D)}});b.textarea.style.width="600px";b.textarea.style.height="380px";a.showDialog(b.container,620,460,!0, -!0);b.init()}else a.alert("No pages")})),a.actions.addAction("testInspect",mxUtils.bind(this,function(){console.log(a,d.getModel())})),a.actions.addAction("testXmlImageExport",mxUtils.bind(this,function(){var a=new mxImageExport,b=d.getGraphBounds(),c=d.view.scale,e=mxUtils.createXmlDocument(),f=e.createElement("output");e.appendChild(f);e=new mxXmlCanvas2D(f);e.translate(Math.floor((1-b.x)/c),Math.floor((1-b.y)/c));e.scale(1/c);var g=0,k=e.save;e.save=function(){g++;k.apply(this,arguments)};var l= -e.restore;e.restore=function(){g--;l.apply(this,arguments)};var m=a.drawShape;a.drawShape=function(a){mxLog.debug("entering shape",a,g);m.apply(this,arguments);mxLog.debug("leaving shape",a,g)};a.drawState(d.getView().getState(d.model.root),e);mxLog.show();mxLog.debug(mxUtils.getXml(f));mxLog.debug("stateCounter",g)})),a.actions.addAction("testDownloadRtModel...",mxUtils.bind(this,function(){null==a.drive?a.handleError({message:mxResources.get("serviceUnavailableOrBlocked")}):a.drive.execute(mxUtils.bind(this, -function(){var b=prompt("File ID","");if(null!=b&&0<b.length&&a.spinner.spin(document.body,mxResources.get("export"))){var c=new mxXmlRequest("https://www.googleapis.com/drive/v2/files/"+b+"/realtime?supportsTeamDrives=true",null,"GET");c.setRequestHeaders=function(a){mxXmlRequest.prototype.setRequestHeaders.apply(this,arguments);var b=gapi.auth.getToken().access_token;a.setRequestHeader("authorization","Bearer "+b)};c.send(function(c){a.spinner.stop();200<=c.getStatus()&&299>=c.getStatus()?a.saveLocalFile(c.getText(), -"json-"+b+".txt","text/plain"):a.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))})}}))})),a.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(b,c){this.addMenuItems(b,"createSidebarEntry showBoundingBox - testCheckFile testDiff - testInspect - testXmlImageExport - testDownloadRtModel".split(" "), -c);b.addItem(mxResources.get("testImportRtModel")+"...",null,function(){var b=document.createElement("input");b.setAttribute("type","file");mxEvent.addListener(b,"change",mxUtils.bind(this,function(){if(null!=b.files){var c=new FileReader;c.onload=mxUtils.bind(this,function(c){try{a.openLocalFile(mxUtils.getXml(a.drive.convertJsonToXml(JSON.parse(c.target.result).data)),b.files[0].name,!0)}catch(H){a.handleError(H,mxResources.get("errorLoadingFile"))}});c.readAsText(b.files[0])}}));b.click()},c); -this.addMenuItems(b,["-","testShowConsole"],c)}))));a.actions.addAction("shapes...",function(){mxClient.IS_CHROMEAPP||!a.isOffline()?a.showDialog((new MoreShapesDialog(a,!0)).container,640,isLocalStorage?mxClient.IS_IOS?480:460:440,!0,!0):a.showDialog((new MoreShapesDialog(a,!1)).container,360,isLocalStorage?mxClient.IS_IOS?300:280:260,!0,!0)});a.actions.put("createShape",new Action(mxResources.get("shape")+"...",function(b){d.isEnabled()&&(b=new mxCell("",new mxGeometry(0,0,120,120),a.defaultCustomShapeStyle), -b.vertex=!0,b=new EditShapeDialog(a,b,mxResources.get("editShape")+":",630,400),a.showDialog(b.container,640,480,!0,!1),b.init())})).isEnabled=g;a.actions.put("embedHtml",new Action(mxResources.get("html")+"...",function(){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(b){a.spinner.stop();a.showHtmlDialog(mxResources.get("create"),"https://desk.draw.io/support/solutions/articles/16000042542",b,function(b,c,d,e,f,g,k,l,m,n){a.createHtml(b,c,d,e, -f,g,k,l,m,n,mxUtils.bind(this,function(b,c){var d=new EmbedDialog(a,b+"\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(b);var f=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;f&&e.writeln(c);e.writeln("</body>");e.writeln("</html>"); -e.close();if(!f){var g=d.document.createElement("div");g.marginLeft="26px";g.marginTop="26px";mxUtils.write(g,mxResources.get("updatingDocument"));f=d.document.createElement("img");f.setAttribute("src",window.location.protocol+"//"+window.location.hostname+"/"+IMAGE_PATH+"/spin.gif");f.style.marginLeft="6px";g.appendChild(f);d.document.body.insertBefore(g,d.document.body.firstChild);window.setTimeout(function(){var a=document.createElement("script");a.type="text/javascript";a.src=/<script.*?src="(.*?)"/.exec(c)[1]; -e.body.appendChild(a);g.parentNode.removeChild(g)},20)}}else a.handleError({message:mxResources.get("errorUpdatingPreview")})});a.showDialog(d.container,440,240,!0,!0);d.init()}))})})}));a.actions.put("liveImage",new Action("Live image...",function(){var b=a.getCurrentFile();null!=b&&a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(c){a.spinner.stop();null!=c?(c=new EmbedDialog(a,'<img src="'+(b.constructor!=DriveFile?c:"https://drive.google.com/uc?id="+ -b.getId())+'"/>'),a.showDialog(c.container,440,240,!0,!0),c.init()):a.handleError({message:mxResources.get("invalidPublicUrl")})})}));a.actions.put("embedImage",new Action(mxResources.get("image")+"...",function(){a.showEmbedImageDialog(function(b,c,d,e,f,g){a.spinner.spin(document.body,mxResources.get("loading"))&&a.createEmbedImage(b,c,d,e,f,g,function(b){a.spinner.stop();b=new EmbedDialog(a,b);a.showDialog(b.container,440,240,!0,!0);b.init()},function(b){a.spinner.stop();a.handleError(b)})},mxResources.get("image"), -mxResources.get("retina"),a.isExportToCanvas())}));a.actions.put("embedSvg",new Action(mxResources.get("formatSvg")+"...",function(){a.showEmbedImageDialog(function(b,c,d,e,f,g){a.spinner.spin(document.body,mxResources.get("loading"))&&a.createEmbedSvg(b,c,d,e,f,g,function(b){a.spinner.stop();b=new EmbedDialog(a,b);a.showDialog(b.container,440,240,!0,!0);b.init()},function(b){a.spinner.stop();a.handleError(b)})},mxResources.get("formatSvg"),mxResources.get("image"),!0,"https://desk.draw.io/support/solutions/articles/16000042548")})); -a.actions.put("embedIframe",new Action(mxResources.get("iframe")+"...",function(){var b=d.getGraphBounds();a.showPublishLinkDialog(mxResources.get("iframe"),null,"100%",Math.ceil((b.y+b.height-d.view.translate.y)/d.view.scale)+2,function(b,c,d,e,f,g,k,l){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(m){a.spinner.stop();m=new EmbedDialog(a,'<iframe frameborder="0" style="width:'+k+";height:"+l+';" src="'+a.createLink(b,c,d,e,f,g,m)+'"></iframe>'); -a.showDialog(m.container,440,240,!0,!0);m.init()})},!0)}));a.actions.put("publishLink",new Action(mxResources.get("link")+"...",function(){a.showPublishLinkDialog(null,null,null,null,function(b,c,d,e,f,g){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(k){a.spinner.stop();k=new EmbedDialog(a,a.createLink(b,c,d,e,f,g,k));a.showDialog(k.container,440,240,!0,!0);k.init()})})}));a.actions.addAction("microsoftOffice...",function(){a.openLink("https://office.draw.io")}); -a.actions.addAction("googleDocs...",function(){a.openLink("http://docsaddon.draw.io")});a.actions.addAction("googleSlides...",function(){a.openLink("https://slidesaddon.draw.io")});a.actions.addAction("googleSites...",function(){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(b){a.spinner.stop();b=new GoogleSitesDialog(a,b);a.showDialog(b.container,420,256,!0,!0);b.init()})});if(isLocalStorage||mxClient.IS_CHROMEAPP)t=a.actions.addAction("scratchpad", -function(){a.toggleScratchpad()}),t.setToggleAction(!0),t.setSelectedCallback(function(){return null!=a.scratchpad}),a.actions.addAction("plugins...",function(){a.showDialog((new PluginsDialog(a)).container,360,170,!0,!1)});t=a.actions.addAction("search",function(){var b=a.sidebar.isEntryVisible("search");a.sidebar.showPalette("search",!b);isLocalStorage&&(mxSettings.settings.search=!b,mxSettings.save())});t.setToggleAction(!0);t.setSelectedCallback(function(){return a.sidebar.isEntryVisible("search")}); -"1"==urlParams.embed&&(a.actions.get("save").funct=function(b){d.isEditing()&&d.stopEditing();var c="0"!=urlParams.pages||null!=a.pages&&1<a.pages.length?a.getFileData(!0):mxUtils.getXml(a.editor.getGraphXml());if("json"==urlParams.proto){var e=a.createLoadMessage("save");e.xml=c;b&&(e.exit=!0);c=JSON.stringify(e)}(window.opener||window.parent).postMessage(c,"*");"0"!=urlParams.modified&&"1"!=urlParams.keepmodified&&(a.editor.modified=!1,a.editor.setStatus(""));null!=a.getCurrentFile()&&a.saveFile()}, -a.actions.addAction("saveAndExit",function(){a.actions.get("save").funct(!0)}),a.actions.addAction("exit",function(){var b=function(){a.editor.modified=!1;var b="json"==urlParams.proto?JSON.stringify({event:"exit",modified:a.editor.modified}):"";(window.opener||window.parent).postMessage(b,"*")};a.editor.modified?a.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b()}));this.put("exportAs",new Menu(mxUtils.bind(this,function(b,c){a.isExportToCanvas()? -(this.addMenuItems(b,["exportPng"],c),a.jpgSupported&&this.addMenuItems(b,["exportJpg"],c)):a.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(b,["exportPng","exportJpg"],c);this.addMenuItems(b,["exportSvg","-"],c);a.isOffline()||a.printPdfExport?this.addMenuItems(b,["exportPdf"],c):a.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(b,["exportPdf"],c);mxClient.IS_IE||"undefined"===typeof VsdxExport&&a.isOffline()||this.addMenuItems(b,["exportVsdx"],c);this.addMenuItems(b, -["-","exportHtml","exportXml","exportUrl"],c);a.isOffline()||(b.addSeparator(c),this.addMenuItem(b,"export",c).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...")})));this.put("importFrom",new Menu(mxUtils.bind(this,function(b,c){function f(b){b.pickFile(function(c){a.spinner.spin(document.body,mxResources.get("loading"))&&b.getFile(c,function(b){var c="data:image/"==b.getData().substring(0,11)?l(b.getTitle()):"text/xml";/\.svg$/i.test(b.getTitle())&&!a.editor.isDataSvg(b.getData())&& -(b.setData(a.createSvgDataUri(b.getData())),c="image/svg+xml");g(b.getData(),c,b.getTitle())},function(b){a.handleError(b,null!=b?mxResources.get("errorLoadingFile"):null)},b==a.drive)},!0)}var g=mxUtils.bind(this,function(b,c,e){var f=d.view,g=d.getGraphBounds(),k=d.snap(Math.ceil(Math.max(0,g.x/f.scale-f.translate.x)+4*d.gridSize)),l=d.snap(Math.ceil(Math.max(0,(g.y+g.height)/f.scale-f.translate.y)+4*d.gridSize));"data:image/"==b.substring(0,11)?a.loadImage(b,mxUtils.bind(this,function(f){var g= -!0,m=mxUtils.bind(this,function(){a.resizeImage(f,b,mxUtils.bind(this,function(f,m,n){f=g?Math.min(1,Math.min(a.maxImageSize/m,a.maxImageSize/n)):1;a.importFile(b,c,k,l,Math.round(m*f),Math.round(n*f),e,function(b){a.spinner.stop();d.setSelectionCells(b);d.scrollCellToVisible(d.getSelectionCell())})}),g)});b.length>a.resampleThreshold?a.confirmImageResize(function(a){g=a;m()}):m()}),mxUtils.bind(this,function(){a.handleError({message:mxResources.get("cannotOpenFile")})})):a.importFile(b,c,k,l,0,0, -e,function(b){a.spinner.stop();d.setSelectionCells(b);d.scrollCellToVisible(d.getSelectionCell())})}),l=mxUtils.bind(this,function(a){var b="text/xml";/\.png$/i.test(a)?b="image/png":/\.jpe?g$/i.test(a)?b="image/jpg":/\.gif$/i.test(a)&&(b="image/gif");return b});"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){f(a.drive)},c):e&&"function"===typeof window.DriveClient&&b.addItem(mxResources.get("googleDrive")+ -" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1));null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){f(a.oneDrive)},c):m&&"function"===typeof window.OneDriveClient&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){f(a.dropbox)},c):k&&"function"===typeof window.DropboxClient&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+ -"...)",null,function(){},c,null,!1);b.addSeparator(c);null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){f(a.gitHub)},c);null!=a.gitLab&&b.addItem(mxResources.get("gitlab")+"...",null,function(){f(a.gitLab)},c);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){f(a.trello)},c):n&&"function"===typeof window.TrelloClient&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&& -"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.importLocalFile(!1)},c);b.addItem(mxResources.get("device")+"...",null,function(){a.importLocalFile(!0)},c);a.isOffline()||(b.addSeparator(c),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(a,"",mxResources.get("import"),function(b){if(null!=b&&0<b.length&&a.spinner.spin(document.body,mxResources.get("loading"))){var c=/(\.png)($|\?)/i.test(b)?"image/png":"text/xml";a.loadUrl(PROXY_URL+ -"?url="+encodeURIComponent(b),function(a){g(a,c,b)},function(){a.spinner.stop();a.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==c)}},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},c))}))).isEnabled=g;this.put("theme",new Menu(mxUtils.bind(this,function(b,c){var d=mxSettings.getUi(),e=b.addItem(mxResources.get("automatic"),null,function(){mxSettings.setUi("");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"kennedy"!=d&&"atlas"!= -d&&"dark"!=d&&"min"!=d&&b.addCheckmark(e,Editor.checkmarkImage);b.addSeparator(c);e=b.addItem(mxResources.get("kennedy"),null,function(){mxSettings.setUi("kennedy");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"kennedy"==d&&b.addCheckmark(e,Editor.checkmarkImage);e=b.addItem(mxResources.get("minimal"),null,function(){mxSettings.setUi("min");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"min"==d&&b.addCheckmark(e,Editor.checkmarkImage);e=b.addItem(mxResources.get("atlas"), -null,function(){mxSettings.setUi("atlas");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"atlas"==d&&b.addCheckmark(e,Editor.checkmarkImage);e=b.addItem(mxResources.get("dark"),null,function(){mxSettings.setUi("dark");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"dark"==d&&b.addCheckmark(e,Editor.checkmarkImage)})));t=this.editorUi.actions.addAction("rename...",mxUtils.bind(this,function(){var b=this.editorUi.getCurrentFile();if(null!=b){var c= -null!=b.getTitle()?b.getTitle():this.editorUi.defaultFilename,c=new FilenameDialog(this.editorUi,c,mxResources.get("rename"),mxUtils.bind(this,function(a){null!=a&&0<a.length&&null!=b&&a!=b.getTitle()&&this.editorUi.spinner.spin(document.body,mxResources.get("renaming"))&&b.rename(a,mxUtils.bind(this,function(a){this.editorUi.spinner.stop()}),mxUtils.bind(this,function(a){this.editorUi.handleError(a,null!=a?mxResources.get("errorRenamingFile"):null)}))}),b.constructor==DriveFile||b.constructor==StorageFile? -mxResources.get("diagramName"):null,function(b){if(null!=b&&0<b.length)return!0;a.showError(mxResources.get("error"),mxResources.get("invalidName"),mxResources.get("ok"));return!1},null,null,null,null,a.editor.fileExtensions);this.editorUi.showDialog(c.container,340,90,!0,!0);c.init()}}));t.isEnabled=function(){return this.enabled&&g.apply(this,arguments)};t.visible="1"!=urlParams.embed;a.actions.addAction("makeCopy...",mxUtils.bind(this,function(){var b=a.getCurrentFile();if(null!=b){var c=a.getCopyFilename(b); -b.constructor==DriveFile?(c=new CreateDialog(a,c,mxUtils.bind(this,function(c,d){"download"==d&&(d=App.MODE_GOOGLE);null!=c&&0<c.length&&(d==App.MODE_GOOGLE?a.spinner.spin(document.body,mxResources.get("saving"))&&b.saveAs(c,mxUtils.bind(this,function(c){b.desc=c;b.save(!1,mxUtils.bind(this,function(){a.spinner.stop();b.setModified(!1);b.addAllSavedStatus()}),mxUtils.bind(this,function(b){a.handleError(b)}))}),mxUtils.bind(this,function(b){a.handleError(b)})):a.createFile(c,a.getFileData(!0),null, -d))}),mxUtils.bind(this,function(){a.hideDialog()}),mxResources.get("makeCopy"),mxResources.get("create"),null,null,null,null,!0,null,null,null,null,a.editor.fileExtensions),a.showDialog(c.container,420,380,!0,!0),c.init()):a.editor.editAsNew(this.editorUi.getFileData(!0),c)}}));a.actions.addAction("moveToFolder...",mxUtils.bind(this,function(){var b=a.getCurrentFile();if(b.getMode()==App.MODE_GOOGLE||b.getMode()==App.MODE_ONEDRIVE){var c=!1;if(b.getMode()==App.MODE_GOOGLE&&null!=b.desc.parents)for(var d= -0;d<b.desc.parents.length;d++)if(b.desc.parents[d].isRoot){c=!0;break}a.pickFolder(b.getMode(),mxUtils.bind(this,function(c){a.spinner.spin(document.body,mxResources.get("moving"))&&b.move(c,mxUtils.bind(this,function(b){a.spinner.stop()}),mxUtils.bind(this,function(b){a.handleError(b)}))}),null,!0,c)}}));this.put("publish",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,["publishLink"],b)})));a.actions.put("useOffline",new Action(mxResources.get("useOffline")+"...",function(){a.openLink("https://app.draw.io/")})); -a.actions.put("downloadDesktop",new Action(mxResources.get("downloadDesktop")+"...",function(){a.openLink("https://get.draw.io/")}));this.editorUi.actions.addAction("share...",mxUtils.bind(this,function(){try{var b=a.getCurrentFile();null!=b&&a.drive.showPermissions(b.getId())}catch(B){a.handleError(B)}}));this.put("embed",new Menu(mxUtils.bind(this,function(b,c){var d=a.getCurrentFile();null==d||d.getMode()!=App.MODE_GOOGLE&&d.getMode()!=App.MODE_GITHUB||!/(\.png)$/i.test(d.getTitle())||this.addMenuItems(b, -["liveImage","-"],c);this.addMenuItems(b,["embedImage","embedSvg","-","embedHtml"],c);navigator.standalone||a.isOffline()||this.addMenuItems(b,["embedIframe"],c);"1"==urlParams.embed||a.isOffline()||this.addMenuItems(b,["-","googleDocs","googleSlides","-","microsoftOffice"],c)})));var q=function(b,c,d,e){("plantUml"!=e||EditorUi.enablePlantUml&&!a.isOffline())&&b.addItem(d,null,mxUtils.bind(this,function(){if("fromText"==e||"formatSql"==e||"plantUml"==e){var b=new ParseDialog(a,d,e);a.showDialog(b.container, -620,420,!0,!1);a.dialog.container.style.overflow="auto"}else b=new CreateGraphDialog(a,d,e),a.showDialog(b.container,620,420,!0,!1);b.init()}),c,null,g())},A=function(a,b,c,e){var f=d.isMouseInsertPoint()?d.getInsertPoint():d.getFreeInsertPoint();a=new mxCell(a,new mxGeometry(f.x,f.y,b,c),e);a.vertex=!0;d.getModel().beginUpdate();try{a=d.addCell(a),d.fireEvent(new mxEventObject("cellsInserted","cells",[a]))}finally{d.getModel().endUpdate()}d.scrollCellToVisible(a);d.setSelectionCell(a);d.container.focus(); -d.editAfterInsert&&d.startEditing(a);return a};a.actions.put("exportSvg",new Action(mxResources.get("formatSvg")+"...",function(){a.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(b,c,d,e,f,g,k,l,m,n){b=parseInt(b);!isNaN(b)&&0<b&&a.exportSvg(b/100,c,d,e,f,g,k,!l,m,n)}),!0,null,"svg")}));a.actions.put("insertText",new Action(mxResources.get("text"),function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&& -d.startEditingAtCell(A("Text",40,20,"text;html=1;resizable=0;autosize=1;align=center;verticalAlign=middle;points=[];fillColor=none;strokeColor=none;rounded=0;"))}),null,null,Editor.ctrlKey+"+Shift+X").isEnabled=g;a.actions.put("insertRectangle",new Action(mxResources.get("rectangle"),function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&A("",120,60,"whiteSpace=wrap;html=1;")}),null,null,Editor.ctrlKey+"+K").isEnabled=g;a.actions.put("insertEllipse",new Action(mxResources.get("ellipse"), -function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&A("",80,80,"ellipse;whiteSpace=wrap;html=1;")}),null,null,Editor.ctrlKey+"+Shift+K").isEnabled=g;a.actions.put("insertRhombus",new Action(mxResources.get("rhombus"),function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&A("",80,80,"rhombus;whiteSpace=wrap;html=1;")})).isEnabled=g;var z=mxUtils.bind(this,function(a,b,c){for(var d=0;d<c.length;d++)"-"==c[d]?a.addSeparator(b):q(a,b,mxResources.get(c[d])+"...",c[d])});this.put("insert", -new Menu(mxUtils.bind(this,function(b,c){this.addMenuItems(b,"insertRectangle insertEllipse insertRhombus - insertText insertLink - insertImage".split(" "),c);a.insertTemplateEnabled&&!a.isOffline()&&this.addMenuItems(b,["insertTemplate","-"],c);this.addMenuItems(b,["createShape","insertFreehand","-"],c);this.addSubmenu("insertLayout",b,c,mxResources.get("layout"));this.addSubmenu("insertAdvanced",b,c,mxResources.get("advanced"))})));this.put("insertLayout",new Menu(mxUtils.bind(this,function(a,b){z(a, -b,"horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "))})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(b,c){z(b,c,["fromText","plantUml","-","formatSql"]);b.addItem(mxResources.get("csv")+"...",null,function(){a.showImportCsvDialog()},c,null,g())})));this.put("openRecent",new Menu(function(b,c){var d=a.getRecent();if(null!=d){for(var e=0;e<d.length;e++)(function(d){var e=d.mode;e==App.MODE_GOOGLE?e="googleDrive":e==App.MODE_ONEDRIVE&& -(e="oneDrive");b.addItem(d.title+" ("+mxResources.get(e)+")",null,function(){a.loadFile(d.id)},c)})(d[e]);b.addSeparator(c)}b.addItem(mxResources.get("reset"),null,function(){a.resetRecent()},c)}));this.put("openFrom",new Menu(function(b,c){null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.pickFile(App.MODE_GOOGLE)},c):e&&"function"===typeof window.DriveClient&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1); -null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.pickFile(App.MODE_ONEDRIVE)},c):m&&"function"===typeof window.OneDriveClient&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.pickFile(App.MODE_DROPBOX)},c):k&&"function"===typeof window.DropboxClient&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){}, -c,null,!1);b.addSeparator(c);null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){a.pickFile(App.MODE_GITHUB)},c);null!=a.gitLab&&b.addItem(mxResources.get("gitlab")+"...",null,function(){a.pickFile(App.MODE_GITLAB)},c);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){a.pickFile(App.MODE_TRELLO)},c):n&&"function"===typeof window.TrelloClient&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c); -isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.pickFile(App.MODE_BROWSER)},c);b.addItem(mxResources.get("device")+"...",null,function(){a.pickFile(App.MODE_DEVICE)},c);a.isOffline()||(b.addSeparator(c),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(a,"",mxResources.get("open"),function(b){null!=b&&0<b.length&&(null==a.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(b):window.openWindow((mxClient.IS_CHROMEAPP? -"https://www.draw.io/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(b)))},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},c))}));Editor.enableCustomLibraries&&(this.put("newLibrary",new Menu(function(b,c){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_GOOGLE)},c):e&&"function"===typeof window.DriveClient&& -b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1));null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_ONEDRIVE)},c):m&&"function"===typeof window.OneDriveClient&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.showLibraryDialog(null, -null,null,null,App.MODE_DROPBOX)},c):k&&"function"===typeof window.DropboxClient&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_GITHUB)},c);null!=a.gitLab&&b.addItem(mxResources.get("gitlab")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_GITLAB)},c);null!=a.trello?b.addItem(mxResources.get("trello")+ -"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_TRELLO)},c):n&&"function"===typeof window.TrelloClient&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_BROWSER)},c);b.addItem(mxResources.get("device")+"...",null,function(){a.showLibraryDialog(null,null,null, -null,App.MODE_DEVICE)},c)})),this.put("openLibraryFrom",new Menu(function(b,c){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.pickLibrary(App.MODE_GOOGLE)},c):e&&"function"===typeof window.DriveClient&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1));null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.pickLibrary(App.MODE_ONEDRIVE)}, -c):m&&"function"===typeof window.OneDriveClient&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.pickLibrary(App.MODE_DROPBOX)},c):k&&"function"===typeof window.DropboxClient&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){a.pickLibrary(App.MODE_GITHUB)}, -c);null!=a.gitLab&&b.addItem(mxResources.get("gitlab")+"...",null,function(){a.pickLibrary(App.MODE_GITLAB)},c);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){a.pickLibrary(App.MODE_TRELLO)},c):n&&"function"===typeof window.TrelloClient&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.pickLibrary(App.MODE_BROWSER)}, -c);b.addItem(mxResources.get("device")+"...",null,function(){a.pickLibrary(App.MODE_DEVICE)},c);a.isOffline()||(b.addSeparator(c),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(a,"",mxResources.get("open"),function(b){if(null!=b&&0<b.length&&a.spinner.spin(document.body,mxResources.get("loading"))){var c=b;a.editor.isCorsEnabledForUrl(b)||(c=PROXY_URL+"?url="+encodeURIComponent(b));mxUtils.get(c,function(c){if(200<=c.getStatus()&&299>=c.getStatus()){a.spinner.stop(); -try{a.loadLibrary(new UrlLibrary(this,c.getText(),b))}catch(F){a.handleError(F,mxResources.get("errorLoadingFile"))}}else a.spinner.stop(),a.handleError(null,mxResources.get("errorLoadingFile"))},function(){a.spinner.stop();a.handleError(null,mxResources.get("errorLoadingFile"))})}},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},c));"1"==urlParams.confLib&&(b.addSeparator(c),b.addItem(mxResources.get("confluenceCloud")+"...",null,function(){a.showRemotelyStoredLibrary(mxResources.get("libraries"))}, -c))})));this.put("edit",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,"undo redo - cut copy paste delete - duplicate - find - editData editTooltip - editStyle editGeometry - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));t=a.actions.addAction("comments",mxUtils.bind(this,function(){if(null==this.commentsWindow)this.commentsWindow=new CommentsWindow(a,document.body.offsetWidth-380,120,300,350),this.commentsWindow.window.addListener("show", -function(){a.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.addListener("hide",function(){a.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.setVisible(!0),a.fireEvent(new mxEventObject("comments"));else{var b=!this.commentsWindow.window.isVisible();this.commentsWindow.window.setVisible(b);this.commentsWindow.refreshCommentsTime();b&&this.commentsWindow.hasError&&this.commentsWindow.refreshComments()}}));t.setToggleAction(!0);t.setSelectedCallback(mxUtils.bind(this, -function(){return null!=this.commentsWindow&&this.commentsWindow.window.isVisible()}));a.editor.addListener("fileLoaded",mxUtils.bind(this,function(){null!=this.commentsWindow&&(this.commentsWindow.destroy(),this.commentsWindow=null)}));var t=this.get("viewPanels"),C=t.funct;t.funct=function(b,c){C.apply(this,arguments);a.commentsSupported()&&a.menus.addMenuItems(b,["comments"],c)};this.put("view",new Menu(mxUtils.bind(this,function(b,c){this.addMenuItems(b,(null!=this.editorUi.format?["formatPanel"]: -[]).concat(["outline","layers"]).concat(a.commentsSupported()?["comments","-"]:["-"]));this.addMenuItems(b,["-","search"],c);if(isLocalStorage||mxClient.IS_CHROMEAPP){var d=this.addMenuItem(b,"scratchpad",c);(!a.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000042367")}this.addMenuItems(b,"shapes - pageView pageScale - scrollbars tooltips - grid guides".split(" "),c);mxClient.IS_SVG&&(null==document.documentMode|| -9<document.documentMode)&&this.addMenuItem(b,"shadowVisible",c);this.addMenuItems(b,"- connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),c)})));this.put("extras",new Menu(mxUtils.bind(this,function(b,c){"1"!=urlParams.embed&&(this.addSubmenu("theme",b,c),b.addSeparator(c));this.addMenuItems(b,["copyConnect","collapseExpand","-"],c);if("undefined"!==typeof MathJax){var d=this.addMenuItem(b,"mathematicalTypesetting",c);(!a.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&& -this.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000032875")}"1"!=urlParams.embed&&this.addMenuItems(b,["autosave"],c);this.addMenuItems(b,["-","editDiagram"],c);b.addSeparator(c);"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&this.addMenuItems(b,["showStartScreen"],c);!a.isOfflineApp()&&isLocalStorage&&this.addMenuItem(b,"plugins",c);b.addSeparator(c);this.addMenuItem(b,"tags",c);b.addSeparator(c);"1"==urlParams.newTempDlg&&(a.actions.addAction("templates", -function(){var b=new TemplatesDialog;a.showDialog(b.container,b.width,b.height,!0,!1,null,!1,!0);b.init(a,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"},{url:"123",title:"Test 2",imgUrl:"https://www.google.com.eg/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png"},{url:"123",title:"Test 3",changedBy:"Ashraf Teleb",lastModifiedOn:"Yesterday"}, -{url:"123",title:"Test 4"},{url:"123",title:"Test 5"},{url:"123",title:"Test 6"}]):a([{url:"123",title:"Test 4",imgUrl:"https://images.pexels.com/photos/459225/pexels-photo-459225.jpeg"},{url:"123",title:"Test 5"},{url:"123",title:"Test 6"},{url:"123",title:"Test 1Test 1Test 1Test 1Test 1Test 1Test 11Test 1Test 11Test 1Test 1dgdsgdfg fdg dfgdfg dfg dfg"},{url:"123",title:"Test 2",imgUrl:"https://www.google.com.eg/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png"},{url:"123",title:"Test 3", -changedBy:"Ashraf Teleb",lastModifiedOn:"Yesterday"}]);console.log(b)},1E3)},function(a,b,c){setTimeout(function(){b(c?[{url:"123",title:a+"Test 1Test 1Test 1Test 1Test 1Test 1Test 1"},{url:"123",title:a+"Test 2"},{url:"123",title:a+"Test 3"},{url:"123",title:a+"Test 4"},{url:"123",title:a+"Test 5"},{url:"123",title:a+"Test 6"}]:[{url:"123",title:a+"Test 5"},{url:"123",title:a+"Test 6"},{url:"123",title:a+"Test 1Test 1Test 1Test 1Test 1Test 1Test 1"},{url:"123",title:a+"Test 2"},{url:"123",title:a+ -"Test 3"},{url:"123",title:a+"Test 4"}])},2E3)},null)}),this.addMenuItem(b,"templates",c))})));this.put("file",new Menu(mxUtils.bind(this,function(b,c){if("1"==urlParams.embed)this.addSubmenu("importFrom",b,c),this.addSubmenu("exportAs",b,c),this.addSubmenu("embed",b,c),"1"==urlParams.libraries&&(this.addMenuItems(b,["-"],c),this.addSubmenu("newLibrary",b,c),this.addSubmenu("openLibraryFrom",b,c)),a.isRevisionHistorySupported()&&this.addMenuItems(b,["-","revisionHistory"],c),this.addMenuItems(b,"- pageSetup print - rename save".split(" "), -c),"1"==urlParams.saveAndExit&&this.addMenuItems(b,["saveAndExit"],c),this.addMenuItems(b,["exit"],c);else{var d=this.editorUi.getCurrentFile();if(null!=d&&d.constructor==DriveFile){d.isRestricted()&&this.addMenuItems(b,["exportOptionsDisabled"],c);this.addMenuItems(b,["save","-","share"],c);var e=this.addMenuItem(b,"synchronize",c);(!a.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(e,"https://desk.draw.io/support/solutions/articles/16000087947");b.addSeparator(c)}else this.addMenuItems(b, -["new"],c);this.addSubmenu("openFrom",b,c);isLocalStorage&&this.addSubmenu("openRecent",b,c);null!=d&&d.constructor==DriveFile?this.addMenuItems(b,["new","-","rename","makeCopy","moveToFolder"],c):(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==d||d.constructor==LocalFile||(b.addSeparator(c),e=this.addMenuItem(b,"synchronize",c),(!a.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(e,"https://desk.draw.io/support/solutions/articles/16000087947")),this.addMenuItems(b, -["-","save","saveAs"],c),this.addMenuItems(b,["-","rename"],c),a.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&this.addMenuItems(b,["upload"],c):(this.addMenuItems(b,["makeCopy"],c),null!=d&&d.constructor==OneDriveFile&&this.addMenuItems(b,["moveToFolder"],c)));b.addSeparator(c);this.addSubmenu("importFrom",b,c);this.addSubmenu("exportAs",b,c);b.addSeparator(c);this.addSubmenu("embed",b,c);this.addSubmenu("publish",b,c);b.addSeparator(c);this.addSubmenu("newLibrary",b,c);this.addSubmenu("openLibraryFrom", -b,c);a.isRevisionHistorySupported()&&this.addMenuItems(b,["-","revisionHistory"],c);this.addMenuItems(b,["-","pageSetup"],c);mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(b,["print"],c);this.addMenuItems(b,["-","close"])}})))}})();function DiagramPage(a,c){this.node=a;null!=c?this.node.setAttribute("id",c):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")}; +"1"==urlParams.embed||this.addMenuItems(b,["useOffline"],c);this.addMenuItems(b,["-","about"],c)}"1"==urlParams.test&&(b.addSeparator(c),this.addSubmenu("testDevelop",b,c))})));"1"==urlParams.test&&(mxResources.parse("testDevelop=Develop"),mxResources.parse("showBoundingBox=Show bounding box"),mxResources.parse("createSidebarEntry=Create Sidebar Entry"),mxResources.parse("testCheckFile=Check File"),mxResources.parse("testDiff=Diff"),mxResources.parse("testInspect=Inspect"),mxResources.parse("testShowConsole=Show Console"), +mxResources.parse("testXmlImageExport=XML Image Export"),mxResources.parse("testDownloadRtModel=Export RT model"),mxResources.parse("testImportRtModel=Import RT model"),a.actions.addAction("createSidebarEntry",mxUtils.bind(this,function(){d.isSelectionEmpty()||a.showTextDialog("Create Sidebar Entry","sb.createVertexTemplateFromData('"+Graph.compress(mxUtils.getXml(d.encodeCells(d.getSelectionCells())))+"', width, height, 'Title');")})),a.actions.addAction("showBoundingBox",mxUtils.bind(this,function(){var a= +d.getGraphBounds(),b=d.view.translate,c=d.view.scale;d.insertVertex(d.getDefaultParent(),null,"",a.x/c-b.x,a.y/c-b.y,a.width/c,a.height/c,"fillColor=none;strokeColor=red;")})),a.actions.addAction("testCheckFile",mxUtils.bind(this,function(){var b=null!=a.pages&&null!=a.getCurrentFile()?a.getCurrentFile().getAnonymizedXmlForPages(a.pages):"",b=new TextareaDialog(a,"Paste Data:",b,function(b){if(0<b.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)))};"<"!=b.charAt(0)&&(b=Graph.decompress(b),mxLog.debug("See console for uncompressed XML"),console.log("xml",b));var d=mxUtils.parseXml(b),e=a.getPagesForNode(d.documentElement,"mxGraphModel");if(null!=e&&0<e.length)try{var f=a.getHashValueForPages(e);mxLog.debug("Checksum: ",f)}catch(G){mxLog.debug("Error: ", +G.message)}else mxLog.debug("No pages found for checksum");var g=d.getElementsByTagName("root");for(b=0;b<g.length;b++)c(g[b]);mxLog.show()}catch(G){a.handleError(G),console.error(G)}});b.textarea.style.width="600px";b.textarea.style.height="380px";a.showDialog(b.container,620,460,!0,!0);b.init()})),a.actions.addAction("testDiff",mxUtils.bind(this,function(){if(null!=a.pages){var b=new TextareaDialog(a,"Paste Data:","",function(b){if(0<b.length)try{console.log(JSON.stringify(a.diffPages(a.pages,a.getPagesForNode(mxUtils.parseXml(b).documentElement)), +null,2))}catch(D){a.handleError(D),console.error(D)}});b.textarea.style.width="600px";b.textarea.style.height="380px";a.showDialog(b.container,620,460,!0,!0);b.init()}else a.alert("No pages")})),a.actions.addAction("testInspect",mxUtils.bind(this,function(){console.log(a,d.getModel())})),a.actions.addAction("testXmlImageExport",mxUtils.bind(this,function(){var a=new mxImageExport,b=d.getGraphBounds(),c=d.view.scale,e=mxUtils.createXmlDocument(),f=e.createElement("output");e.appendChild(f);e=new mxXmlCanvas2D(f); +e.translate(Math.floor((1-b.x)/c),Math.floor((1-b.y)/c));e.scale(1/c);var g=0,k=e.save;e.save=function(){g++;k.apply(this,arguments)};var l=e.restore;e.restore=function(){g--;l.apply(this,arguments)};var m=a.drawShape;a.drawShape=function(a){mxLog.debug("entering shape",a,g);m.apply(this,arguments);mxLog.debug("leaving shape",a,g)};a.drawState(d.getView().getState(d.model.root),e);mxLog.show();mxLog.debug(mxUtils.getXml(f));mxLog.debug("stateCounter",g)})),a.actions.addAction("testDownloadRtModel...", +mxUtils.bind(this,function(){null==a.drive?a.handleError({message:mxResources.get("serviceUnavailableOrBlocked")}):a.drive.execute(mxUtils.bind(this,function(){var b=prompt("File ID","");if(null!=b&&0<b.length&&a.spinner.spin(document.body,mxResources.get("export"))){var c=new mxXmlRequest("https://www.googleapis.com/drive/v2/files/"+b+"/realtime?supportsTeamDrives=true",null,"GET");c.setRequestHeaders=function(a){mxXmlRequest.prototype.setRequestHeaders.apply(this,arguments);var b=gapi.auth.getToken().access_token; +a.setRequestHeader("authorization","Bearer "+b)};c.send(function(c){a.spinner.stop();200<=c.getStatus()&&299>=c.getStatus()?a.saveLocalFile(c.getText(),"json-"+b+".txt","text/plain"):a.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))})}}))})),a.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(b, +c){this.addMenuItems(b,"createSidebarEntry showBoundingBox - testCheckFile testDiff - testInspect - testXmlImageExport - testDownloadRtModel".split(" "),c);b.addItem(mxResources.get("testImportRtModel")+"...",null,function(){var b=document.createElement("input");b.setAttribute("type","file");mxEvent.addListener(b,"change",mxUtils.bind(this,function(){if(null!=b.files){var c=new FileReader;c.onload=mxUtils.bind(this,function(c){try{a.openLocalFile(mxUtils.getXml(a.drive.convertJsonToXml(JSON.parse(c.target.result).data)), +b.files[0].name,!0)}catch(H){a.handleError(H,mxResources.get("errorLoadingFile"))}});c.readAsText(b.files[0])}}));b.click()},c);this.addMenuItems(b,["-","testShowConsole"],c)}))));a.actions.addAction("shapes...",function(){mxClient.IS_CHROMEAPP||!a.isOffline()?a.showDialog((new MoreShapesDialog(a,!0)).container,640,isLocalStorage?mxClient.IS_IOS?480:460:440,!0,!0):a.showDialog((new MoreShapesDialog(a,!1)).container,360,isLocalStorage?mxClient.IS_IOS?300:280:260,!0,!0)});a.actions.put("createShape", +new Action(mxResources.get("shape")+"...",function(b){d.isEnabled()&&(b=new mxCell("",new mxGeometry(0,0,120,120),a.defaultCustomShapeStyle),b.vertex=!0,b=new EditShapeDialog(a,b,mxResources.get("editShape")+":",630,400),a.showDialog(b.container,640,480,!0,!1),b.init())})).isEnabled=g;a.actions.put("embedHtml",new Action(mxResources.get("html")+"...",function(){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(b){a.spinner.stop();a.showHtmlDialog(mxResources.get("create"), +"https://desk.draw.io/support/solutions/articles/16000042542",b,function(b,c,d,e,f,g,k,l,m,n){a.createHtml(b,c,d,e,f,g,k,l,m,n,mxUtils.bind(this,function(b,c){var d=new EmbedDialog(a,b+"\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(b);var f=mxClient.IS_IE|| +mxClient.IS_EDGE||null!=document.documentMode;f&&e.writeln(c);e.writeln("</body>");e.writeln("</html>");e.close();if(!f){var g=d.document.createElement("div");g.marginLeft="26px";g.marginTop="26px";mxUtils.write(g,mxResources.get("updatingDocument"));f=d.document.createElement("img");f.setAttribute("src",window.location.protocol+"//"+window.location.hostname+"/"+IMAGE_PATH+"/spin.gif");f.style.marginLeft="6px";g.appendChild(f);d.document.body.insertBefore(g,d.document.body.firstChild);window.setTimeout(function(){var a= +document.createElement("script");a.type="text/javascript";a.src=/<script.*?src="(.*?)"/.exec(c)[1];e.body.appendChild(a);g.parentNode.removeChild(g)},20)}}else a.handleError({message:mxResources.get("errorUpdatingPreview")})});a.showDialog(d.container,440,240,!0,!0);d.init()}))})})}));a.actions.put("liveImage",new Action("Live image...",function(){var b=a.getCurrentFile();null!=b&&a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(c){a.spinner.stop(); +null!=c?(c=new EmbedDialog(a,'<img src="'+(b.constructor!=DriveFile?c:"https://drive.google.com/uc?id="+b.getId())+'"/>'),a.showDialog(c.container,440,240,!0,!0),c.init()):a.handleError({message:mxResources.get("invalidPublicUrl")})})}));a.actions.put("embedImage",new Action(mxResources.get("image")+"...",function(){a.showEmbedImageDialog(function(b,c,d,e,f,g){a.spinner.spin(document.body,mxResources.get("loading"))&&a.createEmbedImage(b,c,d,e,f,g,function(b){a.spinner.stop();b=new EmbedDialog(a, +b);a.showDialog(b.container,440,240,!0,!0);b.init()},function(b){a.spinner.stop();a.handleError(b)})},mxResources.get("image"),mxResources.get("retina"),a.isExportToCanvas())}));a.actions.put("embedSvg",new Action(mxResources.get("formatSvg")+"...",function(){a.showEmbedImageDialog(function(b,c,d,e,f,g){a.spinner.spin(document.body,mxResources.get("loading"))&&a.createEmbedSvg(b,c,d,e,f,g,function(b){a.spinner.stop();b=new EmbedDialog(a,b);a.showDialog(b.container,440,240,!0,!0);b.init()},function(b){a.spinner.stop(); +a.handleError(b)})},mxResources.get("formatSvg"),mxResources.get("image"),!0,"https://desk.draw.io/support/solutions/articles/16000042548")}));a.actions.put("embedIframe",new Action(mxResources.get("iframe")+"...",function(){var b=d.getGraphBounds();a.showPublishLinkDialog(mxResources.get("iframe"),null,"100%",Math.ceil((b.y+b.height-d.view.translate.y)/d.view.scale)+2,function(b,c,d,e,f,g,k,l){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(m){a.spinner.stop(); +m=new EmbedDialog(a,'<iframe frameborder="0" style="width:'+k+";height:"+l+';" src="'+a.createLink(b,c,d,e,f,g,m)+'"></iframe>');a.showDialog(m.container,440,240,!0,!0);m.init()})},!0)}));a.actions.put("publishLink",new Action(mxResources.get("link")+"...",function(){a.showPublishLinkDialog(null,null,null,null,function(b,c,d,e,f,g){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(k){a.spinner.stop();k=new EmbedDialog(a,a.createLink(b,c,d,e,f,g,k)); +a.showDialog(k.container,440,240,!0,!0);k.init()})})}));a.actions.addAction("microsoftOffice...",function(){a.openLink("https://office.draw.io")});a.actions.addAction("googleDocs...",function(){a.openLink("http://docsaddon.draw.io")});a.actions.addAction("googleSlides...",function(){a.openLink("https://slidesaddon.draw.io")});a.actions.addAction("googleSites...",function(){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(b){a.spinner.stop();b=new GoogleSitesDialog(a, +b);a.showDialog(b.container,420,256,!0,!0);b.init()})});if(isLocalStorage||mxClient.IS_CHROMEAPP)q=a.actions.addAction("scratchpad",function(){a.toggleScratchpad()}),q.setToggleAction(!0),q.setSelectedCallback(function(){return null!=a.scratchpad}),a.actions.addAction("plugins...",function(){a.showDialog((new PluginsDialog(a)).container,360,170,!0,!1)});q=a.actions.addAction("search",function(){var b=a.sidebar.isEntryVisible("search");a.sidebar.showPalette("search",!b);isLocalStorage&&(mxSettings.settings.search= +!b,mxSettings.save())});q.setToggleAction(!0);q.setSelectedCallback(function(){return a.sidebar.isEntryVisible("search")});"1"==urlParams.embed&&(a.actions.get("save").funct=function(b){d.isEditing()&&d.stopEditing();var c="0"!=urlParams.pages||null!=a.pages&&1<a.pages.length?a.getFileData(!0):mxUtils.getXml(a.editor.getGraphXml());if("json"==urlParams.proto){var e=a.createLoadMessage("save");e.xml=c;b&&(e.exit=!0);c=JSON.stringify(e)}(window.opener||window.parent).postMessage(c,"*");"0"!=urlParams.modified&& +"1"!=urlParams.keepmodified&&(a.editor.modified=!1,a.editor.setStatus(""));null!=a.getCurrentFile()&&a.saveFile()},a.actions.addAction("saveAndExit",function(){a.actions.get("save").funct(!0)}),a.actions.addAction("exit",function(){var b=function(){a.editor.modified=!1;var b="json"==urlParams.proto?JSON.stringify({event:"exit",modified:a.editor.modified}):"";(window.opener||window.parent).postMessage(b,"*")};a.editor.modified?a.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"), +mxResources.get("discardChanges")):b()}));this.put("exportAs",new Menu(mxUtils.bind(this,function(b,c){a.isExportToCanvas()?(this.addMenuItems(b,["exportPng"],c),a.jpgSupported&&this.addMenuItems(b,["exportJpg"],c)):a.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(b,["exportPng","exportJpg"],c);this.addMenuItems(b,["exportSvg","-"],c);a.isOffline()||a.printPdfExport?this.addMenuItems(b,["exportPdf"],c):a.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(b, +["exportPdf"],c);mxClient.IS_IE||"undefined"===typeof VsdxExport&&a.isOffline()||this.addMenuItems(b,["exportVsdx"],c);this.addMenuItems(b,["-","exportHtml","exportXml","exportUrl"],c);a.isOffline()||(b.addSeparator(c),this.addMenuItem(b,"export",c).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...")})));this.put("importFrom",new Menu(mxUtils.bind(this,function(b,c){function f(b){b.pickFile(function(c){a.spinner.spin(document.body,mxResources.get("loading"))&&b.getFile(c,function(b){var c= +"data:image/"==b.getData().substring(0,11)?l(b.getTitle()):"text/xml";/\.svg$/i.test(b.getTitle())&&!a.editor.isDataSvg(b.getData())&&(b.setData(a.createSvgDataUri(b.getData())),c="image/svg+xml");g(b.getData(),c,b.getTitle())},function(b){a.handleError(b,null!=b?mxResources.get("errorLoadingFile"):null)},b==a.drive)},!0)}var g=mxUtils.bind(this,function(b,c,e){var f=d.view,g=d.getGraphBounds(),k=d.snap(Math.ceil(Math.max(0,g.x/f.scale-f.translate.x)+4*d.gridSize)),l=d.snap(Math.ceil(Math.max(0,(g.y+ +g.height)/f.scale-f.translate.y)+4*d.gridSize));"data:image/"==b.substring(0,11)?a.loadImage(b,mxUtils.bind(this,function(f){var g=!0,m=mxUtils.bind(this,function(){a.resizeImage(f,b,mxUtils.bind(this,function(f,m,n){f=g?Math.min(1,Math.min(a.maxImageSize/m,a.maxImageSize/n)):1;a.importFile(b,c,k,l,Math.round(m*f),Math.round(n*f),e,function(b){a.spinner.stop();d.setSelectionCells(b);d.scrollCellToVisible(d.getSelectionCell())})}),g)});b.length>a.resampleThreshold?a.confirmImageResize(function(a){g= +a;m()}):m()}),mxUtils.bind(this,function(){a.handleError({message:mxResources.get("cannotOpenFile")})})):a.importFile(b,c,k,l,0,0,e,function(b){a.spinner.stop();d.setSelectionCells(b);d.scrollCellToVisible(d.getSelectionCell())})}),l=mxUtils.bind(this,function(a){var b="text/xml";/\.png$/i.test(a)?b="image/png":/\.jpe?g$/i.test(a)?b="image/jpg":/\.gif$/i.test(a)&&(b="image/gif");return b});"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=a.drive?b.addItem(mxResources.get("googleDrive")+ +"...",null,function(){f(a.drive)},c):e&&"function"===typeof window.DriveClient&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1));null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){f(a.oneDrive)},c):m&&"function"===typeof window.OneDriveClient&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null, +function(){f(a.dropbox)},c):k&&"function"===typeof window.DropboxClient&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){f(a.gitHub)},c);null!=a.gitLab&&b.addItem(mxResources.get("gitlab")+"...",null,function(){f(a.gitLab)},c);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){f(a.trello)},c):n&&"function"===typeof window.TrelloClient&& +b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.importLocalFile(!1)},c);b.addItem(mxResources.get("device")+"...",null,function(){a.importLocalFile(!0)},c);a.isOffline()||(b.addSeparator(c),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(a,"",mxResources.get("import"),function(b){if(null!=b&&0< +b.length&&a.spinner.spin(document.body,mxResources.get("loading"))){var c=/(\.png)($|\?)/i.test(b)?"image/png":"text/xml";a.loadUrl(PROXY_URL+"?url="+encodeURIComponent(b),function(a){g(a,c,b)},function(){a.spinner.stop();a.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==c)}},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},c))}))).isEnabled=g;this.put("theme",new Menu(mxUtils.bind(this,function(b,c){var d=mxSettings.getUi(),e=b.addItem(mxResources.get("automatic"), +null,function(){mxSettings.setUi("");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"kennedy"!=d&&"atlas"!=d&&"dark"!=d&&"min"!=d&&b.addCheckmark(e,Editor.checkmarkImage);b.addSeparator(c);e=b.addItem(mxResources.get("kennedy"),null,function(){mxSettings.setUi("kennedy");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"kennedy"==d&&b.addCheckmark(e,Editor.checkmarkImage);e=b.addItem(mxResources.get("minimal"),null,function(){mxSettings.setUi("min"); +mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"min"==d&&b.addCheckmark(e,Editor.checkmarkImage);e=b.addItem(mxResources.get("atlas"),null,function(){mxSettings.setUi("atlas");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"atlas"==d&&b.addCheckmark(e,Editor.checkmarkImage);e=b.addItem(mxResources.get("dark"),null,function(){mxSettings.setUi("dark");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"dark"==d&&b.addCheckmark(e, +Editor.checkmarkImage)})));q=this.editorUi.actions.addAction("rename...",mxUtils.bind(this,function(){var b=this.editorUi.getCurrentFile();if(null!=b){var c=null!=b.getTitle()?b.getTitle():this.editorUi.defaultFilename,c=new FilenameDialog(this.editorUi,c,mxResources.get("rename"),mxUtils.bind(this,function(a){null!=a&&0<a.length&&null!=b&&a!=b.getTitle()&&this.editorUi.spinner.spin(document.body,mxResources.get("renaming"))&&b.rename(a,mxUtils.bind(this,function(a){this.editorUi.spinner.stop()}), +mxUtils.bind(this,function(a){this.editorUi.handleError(a,null!=a?mxResources.get("errorRenamingFile"):null)}))}),b.constructor==DriveFile||b.constructor==StorageFile?mxResources.get("diagramName"):null,function(b){if(null!=b&&0<b.length)return!0;a.showError(mxResources.get("error"),mxResources.get("invalidName"),mxResources.get("ok"));return!1},null,null,null,null,a.editor.fileExtensions);this.editorUi.showDialog(c.container,340,90,!0,!0);c.init()}}));q.isEnabled=function(){return this.enabled&& +g.apply(this,arguments)};q.visible="1"!=urlParams.embed;a.actions.addAction("makeCopy...",mxUtils.bind(this,function(){var b=a.getCurrentFile();if(null!=b){var c=a.getCopyFilename(b);b.constructor==DriveFile?(c=new CreateDialog(a,c,mxUtils.bind(this,function(c,d){"download"==d&&(d=App.MODE_GOOGLE);null!=c&&0<c.length&&(d==App.MODE_GOOGLE?a.spinner.spin(document.body,mxResources.get("saving"))&&b.saveAs(c,mxUtils.bind(this,function(c){b.desc=c;b.save(!1,mxUtils.bind(this,function(){a.spinner.stop(); +b.setModified(!1);b.addAllSavedStatus()}),mxUtils.bind(this,function(b){a.handleError(b)}))}),mxUtils.bind(this,function(b){a.handleError(b)})):a.createFile(c,a.getFileData(!0),null,d))}),mxUtils.bind(this,function(){a.hideDialog()}),mxResources.get("makeCopy"),mxResources.get("create"),null,null,null,null,!0,null,null,null,null,a.editor.fileExtensions),a.showDialog(c.container,420,380,!0,!0),c.init()):a.editor.editAsNew(this.editorUi.getFileData(!0),c)}}));a.actions.addAction("moveToFolder...",mxUtils.bind(this, +function(){var b=a.getCurrentFile();if(b.getMode()==App.MODE_GOOGLE||b.getMode()==App.MODE_ONEDRIVE){var c=!1;if(b.getMode()==App.MODE_GOOGLE&&null!=b.desc.parents)for(var d=0;d<b.desc.parents.length;d++)if(b.desc.parents[d].isRoot){c=!0;break}a.pickFolder(b.getMode(),mxUtils.bind(this,function(c){a.spinner.spin(document.body,mxResources.get("moving"))&&b.move(c,mxUtils.bind(this,function(b){a.spinner.stop()}),mxUtils.bind(this,function(b){a.handleError(b)}))}),null,!0,c)}}));this.put("publish",new Menu(mxUtils.bind(this, +function(a,b){this.addMenuItems(a,["publishLink"],b)})));a.actions.put("useOffline",new Action(mxResources.get("useOffline")+"...",function(){a.openLink("https://app.draw.io/")}));a.actions.put("downloadDesktop",new Action(mxResources.get("downloadDesktop")+"...",function(){a.openLink("https://get.draw.io/")}));this.editorUi.actions.addAction("share...",mxUtils.bind(this,function(){try{var b=a.getCurrentFile();null!=b&&a.drive.showPermissions(b.getId())}catch(x){a.handleError(x)}}));this.put("embed", +new Menu(mxUtils.bind(this,function(b,c){var d=a.getCurrentFile();null==d||d.getMode()!=App.MODE_GOOGLE&&d.getMode()!=App.MODE_GITHUB||!/(\.png)$/i.test(d.getTitle())||this.addMenuItems(b,["liveImage","-"],c);this.addMenuItems(b,["embedImage","embedSvg","-","embedHtml"],c);navigator.standalone||a.isOffline()||this.addMenuItems(b,["embedIframe"],c);"1"==urlParams.embed||a.isOffline()||this.addMenuItems(b,["-","googleDocs","googleSlides","-","microsoftOffice"],c)})));var t=function(b,c,d,e){("plantUml"!= +e||EditorUi.enablePlantUml&&!a.isOffline())&&b.addItem(d,null,mxUtils.bind(this,function(){if("fromText"==e||"formatSql"==e||"plantUml"==e){var b=new ParseDialog(a,d,e);a.showDialog(b.container,620,420,!0,!1);a.dialog.container.style.overflow="auto"}else b=new CreateGraphDialog(a,d,e),a.showDialog(b.container,620,420,!0,!1);b.init()}),c,null,g())},z=function(a,b,c,e){var f=d.isMouseInsertPoint()?d.getInsertPoint():d.getFreeInsertPoint();a=new mxCell(a,new mxGeometry(f.x,f.y,b,c),e);a.vertex=!0;d.getModel().beginUpdate(); +try{a=d.addCell(a),d.fireEvent(new mxEventObject("cellsInserted","cells",[a]))}finally{d.getModel().endUpdate()}d.scrollCellToVisible(a);d.setSelectionCell(a);d.container.focus();d.editAfterInsert&&d.startEditing(a);return a};a.actions.put("exportSvg",new Action(mxResources.get("formatSvg")+"...",function(){a.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(b,c,d,e,f,g,k,l,m,n){b=parseInt(b); +!isNaN(b)&&0<b&&a.exportSvg(b/100,c,d,e,f,g,k,!l,m,n)}),!0,null,"svg")}));a.actions.put("insertText",new Action(mxResources.get("text"),function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&d.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=g;a.actions.put("insertRectangle",new Action(mxResources.get("rectangle"),function(){d.isEnabled()&& +!d.isCellLocked(d.getDefaultParent())&&z("",120,60,"whiteSpace=wrap;html=1;")}),null,null,Editor.ctrlKey+"+K").isEnabled=g;a.actions.put("insertEllipse",new Action(mxResources.get("ellipse"),function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&z("",80,80,"ellipse;whiteSpace=wrap;html=1;")}),null,null,Editor.ctrlKey+"+Shift+K").isEnabled=g;a.actions.put("insertRhombus",new Action(mxResources.get("rhombus"),function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&z("",80,80,"rhombus;whiteSpace=wrap;html=1;")})).isEnabled= +g;var y=mxUtils.bind(this,function(a,b,c){for(var d=0;d<c.length;d++)"-"==c[d]?a.addSeparator(b):t(a,b,mxResources.get(c[d])+"...",c[d])});this.put("insert",new Menu(mxUtils.bind(this,function(b,c){this.addMenuItems(b,"insertRectangle insertEllipse insertRhombus - insertText insertLink - insertImage".split(" "),c);a.insertTemplateEnabled&&!a.isOffline()&&this.addMenuItems(b,["insertTemplate","-"],c);this.addMenuItems(b,["createShape","insertFreehand","-"],c);this.addSubmenu("insertLayout",b,c,mxResources.get("layout")); +this.addSubmenu("insertAdvanced",b,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(b,c){y(b,c,["fromText","plantUml","-","formatSql"]);b.addItem(mxResources.get("csv")+"...",null,function(){a.showImportCsvDialog()},c,null,g())})));this.put("openRecent",new Menu(function(b,c){var d= +a.getRecent();if(null!=d){for(var e=0;e<d.length;e++)(function(d){var e=d.mode;e==App.MODE_GOOGLE?e="googleDrive":e==App.MODE_ONEDRIVE&&(e="oneDrive");b.addItem(d.title+" ("+mxResources.get(e)+")",null,function(){a.loadFile(d.id)},c)})(d[e]);b.addSeparator(c)}b.addItem(mxResources.get("reset"),null,function(){a.resetRecent()},c)}));this.put("openFrom",new Menu(function(b,c){null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.pickFile(App.MODE_GOOGLE)},c):e&&"function"=== +typeof window.DriveClient&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.pickFile(App.MODE_ONEDRIVE)},c):m&&"function"===typeof window.OneDriveClient&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.pickFile(App.MODE_DROPBOX)}, +c):k&&"function"===typeof window.DropboxClient&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){a.pickFile(App.MODE_GITHUB)},c);null!=a.gitLab&&b.addItem(mxResources.get("gitlab")+"...",null,function(){a.pickFile(App.MODE_GITLAB)},c);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){a.pickFile(App.MODE_TRELLO)},c):n&&"function"=== +typeof window.TrelloClient&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.pickFile(App.MODE_BROWSER)},c);b.addItem(mxResources.get("device")+"...",null,function(){a.pickFile(App.MODE_DEVICE)},c);a.isOffline()||(b.addSeparator(c),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(a,"",mxResources.get("open"), +function(b){null!=b&&0<b.length&&(null==a.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(b):window.openWindow((mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(b)))},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},c))}));Editor.enableCustomLibraries&&(this.put("newLibrary",new Menu(function(b,c){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=a.drive?b.addItem(mxResources.get("googleDrive")+ +"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_GOOGLE)},c):e&&"function"===typeof window.DriveClient&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1));null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_ONEDRIVE)},c):m&&"function"===typeof window.OneDriveClient&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null, +function(){},c,null,!1);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_DROPBOX)},c):k&&"function"===typeof window.DropboxClient&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_GITHUB)},c);null!=a.gitLab&&b.addItem(mxResources.get("gitlab")+ +"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_GITLAB)},c);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_TRELLO)},c):n&&"function"===typeof window.TrelloClient&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.showLibraryDialog(null, +null,null,null,App.MODE_BROWSER)},c);b.addItem(mxResources.get("device")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_DEVICE)},c)})),this.put("openLibraryFrom",new Menu(function(b,c){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.pickLibrary(App.MODE_GOOGLE)},c):e&&"function"===typeof window.DriveClient&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+ +"...)",null,function(){},c,null,!1));null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.pickLibrary(App.MODE_ONEDRIVE)},c):m&&"function"===typeof window.OneDriveClient&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.pickLibrary(App.MODE_DROPBOX)},c):k&&"function"===typeof window.DropboxClient&&b.addItem(mxResources.get("dropbox")+" ("+ +mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){a.pickLibrary(App.MODE_GITHUB)},c);null!=a.gitLab&&b.addItem(mxResources.get("gitlab")+"...",null,function(){a.pickLibrary(App.MODE_GITLAB)},c);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){a.pickLibrary(App.MODE_TRELLO)},c):n&&"function"===typeof window.TrelloClient&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+ +"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.pickLibrary(App.MODE_BROWSER)},c);b.addItem(mxResources.get("device")+"...",null,function(){a.pickLibrary(App.MODE_DEVICE)},c);a.isOffline()||(b.addSeparator(c),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(a,"",mxResources.get("open"),function(b){if(null!=b&&0<b.length&&a.spinner.spin(document.body,mxResources.get("loading"))){var c= +b;a.editor.isCorsEnabledForUrl(b)||(c=PROXY_URL+"?url="+encodeURIComponent(b));mxUtils.get(c,function(c){if(200<=c.getStatus()&&299>=c.getStatus()){a.spinner.stop();try{a.loadLibrary(new UrlLibrary(this,c.getText(),b))}catch(F){a.handleError(F,mxResources.get("errorLoadingFile"))}}else a.spinner.stop(),a.handleError(null,mxResources.get("errorLoadingFile"))},function(){a.spinner.stop();a.handleError(null,mxResources.get("errorLoadingFile"))})}},mxResources.get("url"));a.showDialog(b.container,300, +80,!0,!0);b.init()},c));"1"==urlParams.confLib&&(b.addSeparator(c),b.addItem(mxResources.get("confluenceCloud")+"...",null,function(){a.showRemotelyStoredLibrary(mxResources.get("libraries"))},c))})));this.put("edit",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,"undo redo - cut copy paste delete - duplicate - find - editData editTooltip - editStyle editGeometry - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));q=a.actions.addAction("comments", +mxUtils.bind(this,function(){if(null==this.commentsWindow)this.commentsWindow=new CommentsWindow(a,document.body.offsetWidth-380,120,300,350),this.commentsWindow.window.addListener("show",function(){a.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.addListener("hide",function(){a.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.setVisible(!0),a.fireEvent(new mxEventObject("comments"));else{var b=!this.commentsWindow.window.isVisible();this.commentsWindow.window.setVisible(b); +this.commentsWindow.refreshCommentsTime();b&&this.commentsWindow.hasError&&this.commentsWindow.refreshComments()}}));q.setToggleAction(!0);q.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.commentsWindow&&this.commentsWindow.window.isVisible()}));a.editor.addListener("fileLoaded",mxUtils.bind(this,function(){null!=this.commentsWindow&&(this.commentsWindow.destroy(),this.commentsWindow=null)}));var q=this.get("viewPanels"),C=q.funct;q.funct=function(b,c){C.apply(this,arguments); +a.commentsSupported()&&a.menus.addMenuItems(b,["comments"],c)};this.put("view",new Menu(mxUtils.bind(this,function(b,c){this.addMenuItems(b,(null!=this.editorUi.format?["formatPanel"]:[]).concat(["outline","layers"]).concat(a.commentsSupported()?["comments","-"]:["-"]));this.addMenuItems(b,["-","search"],c);if(isLocalStorage||mxClient.IS_CHROMEAPP){var d=this.addMenuItem(b,"scratchpad",c);(!a.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000042367")}this.addMenuItems(b, +"shapes - pageView pageScale - scrollbars tooltips - grid guides".split(" "),c);"1"==urlParams.ruler&&(mxResources.parse("ruler=Ruler"),d=a.actions.addAction("ruler",function(){null!=a.ruler?(a.ruler.destroy(),a.ruler=null):a.ruler=new mxDualRuler(a,a.editor.graph.view.unit)}),d.setToggleAction(!0),d.setSelectedCallback(function(){return null!=a.ruler}),this.addMenuItem(b,"ruler",c));mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode)&&this.addMenuItem(b,"shadowVisible",c);this.addMenuItems(b, +"- connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),c)})));this.put("extras",new Menu(mxUtils.bind(this,function(b,c){"1"!=urlParams.embed&&(this.addSubmenu("theme",b,c),b.addSeparator(c));this.addMenuItems(b,["copyConnect","collapseExpand","-"],c);if("undefined"!==typeof MathJax){var d=this.addMenuItem(b,"mathematicalTypesetting",c);(!a.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000032875")}"1"!= +urlParams.embed&&this.addMenuItems(b,["autosave"],c);this.addMenuItems(b,["-","editDiagram"],c);b.addSeparator(c);"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&this.addMenuItems(b,["showStartScreen"],c);!a.isOfflineApp()&&isLocalStorage&&this.addMenuItem(b,"plugins",c);b.addSeparator(c);this.addMenuItem(b,"tags",c);b.addSeparator(c);"1"==urlParams.newTempDlg&&(a.actions.addAction("templates",function(){var b=new TemplatesDialog;a.showDialog(b.container,b.width,b.height,!0,!1,null, +!1,!0);b.init(a,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"},{url:"123",title:"Test 2",imgUrl:"https://www.google.com.eg/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png"},{url:"123",title:"Test 3",changedBy:"Ashraf Teleb",lastModifiedOn:"Yesterday"},{url:"123",title:"Test 4"},{url:"123",title:"Test 5"},{url:"123",title:"Test 6"}]): +a([{url:"123",title:"Test 4",imgUrl:"https://images.pexels.com/photos/459225/pexels-photo-459225.jpeg"},{url:"123",title:"Test 5"},{url:"123",title:"Test 6"},{url:"123",title:"Test 1Test 1Test 1Test 1Test 1Test 1Test 11Test 1Test 11Test 1Test 1dgdsgdfg fdg dfgdfg dfg dfg"},{url:"123",title:"Test 2",imgUrl:"https://www.google.com.eg/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png"},{url:"123",title:"Test 3",changedBy:"Ashraf Teleb",lastModifiedOn:"Yesterday"}]);console.log(b)},1E3)},function(a, +b,c){setTimeout(function(){b(c?[{url:"123",title:a+"Test 1Test 1Test 1Test 1Test 1Test 1Test 1"},{url:"123",title:a+"Test 2"},{url:"123",title:a+"Test 3"},{url:"123",title:a+"Test 4"},{url:"123",title:a+"Test 5"},{url:"123",title:a+"Test 6"}]:[{url:"123",title:a+"Test 5"},{url:"123",title:a+"Test 6"},{url:"123",title:a+"Test 1Test 1Test 1Test 1Test 1Test 1Test 1"},{url:"123",title:a+"Test 2"},{url:"123",title:a+"Test 3"},{url:"123",title:a+"Test 4"}])},2E3)},null)}),this.addMenuItem(b,"templates", +c))})));this.put("file",new Menu(mxUtils.bind(this,function(b,c){if("1"==urlParams.embed)this.addSubmenu("importFrom",b,c),this.addSubmenu("exportAs",b,c),this.addSubmenu("embed",b,c),"1"==urlParams.libraries&&(this.addMenuItems(b,["-"],c),this.addSubmenu("newLibrary",b,c),this.addSubmenu("openLibraryFrom",b,c)),a.isRevisionHistorySupported()&&this.addMenuItems(b,["-","revisionHistory"],c),this.addMenuItems(b,"- pageSetup print - rename save".split(" "),c),"1"==urlParams.saveAndExit&&this.addMenuItems(b, +["saveAndExit"],c),this.addMenuItems(b,["exit"],c);else{var d=this.editorUi.getCurrentFile();if(null!=d&&d.constructor==DriveFile){d.isRestricted()&&this.addMenuItems(b,["exportOptionsDisabled"],c);this.addMenuItems(b,["save","-","share"],c);var e=this.addMenuItem(b,"synchronize",c);(!a.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(e,"https://desk.draw.io/support/solutions/articles/16000087947");b.addSeparator(c)}else this.addMenuItems(b,["new"],c);this.addSubmenu("openFrom", +b,c);isLocalStorage&&this.addSubmenu("openRecent",b,c);null!=d&&d.constructor==DriveFile?this.addMenuItems(b,["new","-","rename","makeCopy","moveToFolder"],c):(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==d||d.constructor==LocalFile||(b.addSeparator(c),e=this.addMenuItem(b,"synchronize",c),(!a.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(e,"https://desk.draw.io/support/solutions/articles/16000087947")),this.addMenuItems(b,["-","save","saveAs"],c),this.addMenuItems(b, +["-","rename"],c),a.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&this.addMenuItems(b,["upload"],c):(this.addMenuItems(b,["makeCopy"],c),null!=d&&d.constructor==OneDriveFile&&this.addMenuItems(b,["moveToFolder"],c)));b.addSeparator(c);this.addSubmenu("importFrom",b,c);this.addSubmenu("exportAs",b,c);b.addSeparator(c);this.addSubmenu("embed",b,c);this.addSubmenu("publish",b,c);b.addSeparator(c);this.addSubmenu("newLibrary",b,c);this.addSubmenu("openLibraryFrom",b,c);a.isRevisionHistorySupported()&& +this.addMenuItems(b,["-","revisionHistory"],c);this.addMenuItems(b,["-","pageSetup"],c);mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(b,["print"],c);this.addMenuItems(b,["-","close"])}})))}})();function DiagramPage(a,c){this.node=a;null!=c?this.node.setAttribute("id",c):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")}; DiagramPage.prototype.setName=function(a){null==a?this.node.removeAttribute("name"):this.node.setAttribute("name",a)};function RenamePage(a,c,b){this.ui=a;this.page=c;this.previous=this.name=b}RenamePage.prototype.execute=function(){var a=this.page.getName();this.page.setName(this.previous);this.name=this.previous;this.previous=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))}; function MovePage(a,c,b){this.ui=a;this.oldIndex=c;this.newIndex=b}MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var a=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))}; function SelectPage(a,c,b){this.ui=a;this.previousPage=this.page=c;this.neverShown=!0;null!=c&&(this.neverShown=null==c.viewState,this.ui.updatePageRoot(c),null!=b&&(c.viewState=b,this.neverShown=!1))} @@ -9587,38 +9600,38 @@ mxResources.get("copyOf",[a.getName()]))}),d)})};(function(){var a=EditorUi.prot a)?b:void 0})),null!=d.relatedPage.root&&a.encodeCell(d.relatedPage.root,g));return g};a.beforeDecode=function(a,c,g){g.ui=a.ui;g.relatedPage=g.ui.getPageById(c.getAttribute("relatedPage"));if(null==g.relatedPage){var b=c.ownerDocument.createElement("diagram");b.setAttribute("id",c.getAttribute("relatedPage"));b.setAttribute("name",c.getAttribute("name"));g.relatedPage=new DiagramPage(b);b=c.getAttribute("viewState");null!=b&&(g.relatedPage.viewState=JSON.parse(b),c.removeAttribute("viewState")); c=c.cloneNode(!0);b=c.firstChild;if(null!=b)for(g.relatedPage.root=a.decodeCell(b,!1),g=b.nextSibling,b.parentNode.removeChild(b),b=g;null!=b;){g=b.nextSibling;if(b.nodeType==mxConstants.NODETYPE_ELEMENT){var d=b.getAttribute("id");null==a.lookup(d)&&a.decodeCell(b)}b.parentNode.removeChild(b);b=g}}return c};a.afterDecode=function(a,c,g){g.index=g.previousIndex;return g};mxCodecRegistry.register(a)})();(function(){var a=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAASFBMVEUAAAAAAAB/f3/9/f319fUfHx/7+/s+Pj69vb0AAAAAAAAAAAAAAAAAAAAAAAAAAAB2dnZ1dXUAAAAAAAAVFRX///8ZGRkGBgbOcI1hAAAAE3RSTlMA+vr9/f38+fb1893Bo00u+/tFvPJUBQAAAIRJREFUGNM0jEcSxCAQAxlydGqD///TNWxZBx1aXVIrWysplbapL3sFxgDq/idXBnHgBPK1nIxwc55vCXl6dRFtrV6svs/A/UjsPcpzA5tqyByD92HqQlMFh45BG6ND1DiKSoPDdm96N77bg5F+wyaEqRGb8ZiOwHQqdg9hehszcLAEIQB2lQ4p/sEpnAAAAABJRU5ErkJggg==":IMAGE_PATH+"/move.png";EditorUi.prototype.altShiftActions[68]= "selectDescendants";var c=Graph.prototype.foldCells;Graph.prototype.foldCells=function(a,b,d,m,n){b=null!=b?b:!1;null==d&&(d=this.getFoldableCells(this.getSelectionCells(),a));this.stopEditing();this.model.beginUpdate();try{for(var e=d.slice(),f=[],g=0;g<d.length;g++){var k=this.view.getState(d[g]),u=null!=k?k.style:this.getCellStyle(d[g]);"1"==mxUtils.getValue(u,"treeFolding","0")&&(this.traverse(d[g],!0,mxUtils.bind(this,function(a,b){null!=b&&f.push(b);a!=d[g]&&f.push(a);return a==d[g]||!this.model.isCollapsed(a)})), -this.model.setCollapsed(d[g],a))}for(g=0;g<f.length;g++)this.model.setVisible(f[g],!a);d=e;d=c.apply(this,arguments)}finally{this.model.endUpdate()}return d};var b=EditorUi.prototype.init;EditorUi.prototype.init=function(){b.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function b(a){return A.isVertex(a)&&d(a)}function c(a){var b=!1;null!=a&&(b=q.view.getState(a),b="1"==(null!=b?b.style:q.getCellStyle(a)).treeMoving); -return b}function d(a){var b=!1;null!=a&&(a=A.getParent(a),b=q.view.getState(a),b="tree"==(null!=b?b.style:q.getCellStyle(a)).containerType);return b}function m(a){var b=!1;null!=a&&(a=A.getParent(a),b=q.view.getState(a),q.view.getState(a),b=null!=(null!=b?b.style:q.getCellStyle(a)).childLayout);return b}function n(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 t(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=n(a),g=c.geometry;f==mxConstants.DIRECTION_SOUTH|| -f==mxConstants.DIRECTION_NORTH?e[1].geometry.x+=b?a.geometry.width+10:-e[1].geometry.width-10:e[1].geometry.y+=b?a.geometry.height+10:-e[1].geometry.height-10;q.view.currentRoot!=c&&(e[1].geometry.x-=g.x,e[1].geometry.y-=g.y);var k=q.view.getState(a),l=q.view.scale;if(null!=k){var m=mxRectangle.fromRectangle(k);f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?m.x+=(b?a.geometry.width+10:-e[1].geometry.width-10)*l:m.y+=(b?a.geometry.height+10:-e[1].geometry.height-10)*l;var p=q.getOutgoingEdges(q.model.getTerminal(d[0], -!0));if(null!=p){for(var t=f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH,u=g=d=0;u<p.length;u++){var x=q.model.getTerminal(p[u],!1);if(f==n(x)){var v=q.view.getState(x);x!=a&&null!=v&&(t&&b!=v.getCenterX()<k.getCenterX()||!t&&b!=v.getCenterY()<k.getCenterY())&&mxUtils.intersects(m,v)&&(d=10+Math.max(d,(Math.min(m.x+m.width,v.x+v.width)-Math.max(m.x,v.x))/l),g=10+Math.max(g,(Math.min(m.y+m.height,v.y+v.height)-Math.max(m.y,v.y))/l))}}t?g=0:d=0;for(u=0;u<p.length;u++)if(x=q.model.getTerminal(p[u], -!1),f==n(x)&&(v=q.view.getState(x),x!=a&&null!=v&&(t&&b!=v.getCenterX()<k.getCenterX()||!t&&b!=v.getCenterY()<k.getCenterY()))){var A=[];q.traverse(v.cell,!0,function(a,b){null!=b&&A.push(b);A.push(a);return!0});q.moveCells(A,(b?1:-1)*d,(b?1:-1)*g)}}}return q.addCells(e,c)}finally{q.model.endUpdate()}}function f(a){q.model.beginUpdate();try{var b=n(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,l=a.geometry.height+40;b==mxConstants.DIRECTION_SOUTH?k=0:b==mxConstants.DIRECTION_NORTH?(k=0,l=-l):b==mxConstants.DIRECTION_WEST?(k=-k,l=0):b==mxConstants.DIRECTION_EAST&&(l=0);q.moveCells(g,k,l);return q.addCells(d,e)}finally{q.model.endUpdate()}}function l(a){q.model.beginUpdate();try{var b= -q.model.getParent(a),c=q.getIncomingEdges(a),d=q.cloneCells([c[0],a]);q.model.setTerminal(d[0],a,!0);var c=q.getOutgoingEdges(a),e=b.geometry,f=[];q.view.currentRoot==b&&(e=new mxRectangle);for(var g=0;g<c.length;g++){var k=q.model.getTerminal(c[g],!1);null!=k&&f.push(k)}var l=q.view.getBounds(f),m=n(a),p=q.view.translate,t=q.view.scale;m==mxConstants.DIRECTION_SOUTH?(d[1].geometry.x=null==l?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(l.x+l.width)/t-p.x-e.x+10,d[1].geometry.y+=d[1].geometry.height- -e.y+40):m==mxConstants.DIRECTION_NORTH?(d[1].geometry.x=null==l?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(l.x+l.width)/t-p.x+-e.x+10,d[1].geometry.y-=d[1].geometry.height+e.y+40):(d[1].geometry.x=m==mxConstants.DIRECTION_WEST?d[1].geometry.x-(d[1].geometry.width+e.x+40):d[1].geometry.x+(d[1].geometry.width-e.x+40),d[1].geometry.y=null==l?a.geometry.y+(a.geometry.height-d[1].geometry.height)/2:(l.y+l.height)/t-p.y+-e.y+10);return q.addCells(d,b)}finally{q.model.endUpdate()}}function p(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 u(a,b){var c=n(a),d=b==mxConstants.DIRECTION_EAST||b==mxConstants.DIRECTION_WEST;(c==mxConstants.DIRECTION_EAST|| -c==mxConstants.DIRECTION_WEST)==d&&c!=b?y.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=p(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 y=this,q=y.editor.graph,A=q.getModel(),z=y.menus.createPopupMenu; -y.menus.createPopupMenu=function(a,c,d){z.apply(this,arguments);if(1==q.getSelectionCount()){c=q.getSelectionCell();var e=q.getOutgoingEdges(c);a.addSeparator();null!=e&&0<e.length&&(b(q.getSelectionCell())&&this.addMenuItems(a,["selectChildren"],null,d),this.addMenuItems(a,["selectDescendants"],null,d));b(q.getSelectionCell())&&(a.addSeparator(),0<q.getIncomingEdges(c).length&&this.addMenuItems(a,["selectSiblings","selectParent"],null,d))}};y.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");y.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");y.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");y.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 C=q.removeCells;q.removeCells=function(a,c){c=null!=c?c:!0;null==a&&(a=this.getDeletableCells(this.getSelectionCells()));c&&(a=this.getDeletableCells(this.addAllEdges(a)));for(var e=[],f=0;f<a.length;f++){var g=a[f];A.isEdge(g)&&d(g)&&(e.push(g),g=A.getTerminal(g,!1));b(g)?(q.traverse(g,!0,function(a,b){null!=b&&e.push(b);e.push(a);return!0}),g=q.getIncomingEdges(a[f]),a=a.concat(g)):e.push(a[f])}a=e;return C.apply(this,arguments)};y.hoverIcons.getStateAt=function(a,c, -d){return b(a.cell)?null:this.graph.view.getState(this.graph.getCellAt(c,d))};var v=q.duplicateCells;q.duplicateCells=function(a,c){a=null!=a?a:this.getSelectionCells();for(var d=a.slice(0),e=0;e<d.length;e++){var f=q.view.getState(d[e]);if(null!=f&&b(f.cell))for(var g=q.getIncomingEdges(f.cell),f=0;f<g.length;f++)mxUtils.remove(g[f],a)}this.model.beginUpdate();try{var k=v.call(this,a,c);if(k.length==a.length)for(e=0;e<a.length;e++)if(b(a[e])){var l=q.getIncomingEdges(k[e]),g=q.getIncomingEdges(a[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 B=q.moveCells;q.moveCells=function(a,c,d,e,f,g,k){var l=null;this.model.beginUpdate();try{var m=f,n=this.view.getState(f),p=null!=n?n.style:this.getCellStyle(f);if(null!=a&&b(f)&&"1"==mxUtils.getValue(p,"treeFolding","0")){for(var t=0;t<a.length;t++)if(b(a[t])||q.model.isEdge(a[t])&&null==q.model.getTerminal(a[t],!0)){f=q.model.getParent(a[t]); -break}if(null!=m&&f!=m&&null!=this.view.getState(a[0])){var u=q.getIncomingEdges(a[0]);if(0<u.length){var x=q.view.getState(q.model.getTerminal(u[0],!0));if(null!=x){var v=q.view.getState(m);null!=v&&(c=(v.getCenterX()-x.getCenterX())/q.view.scale,d=(v.getCenterY()-x.getCenterY())/q.view.scale)}}}}l=B.apply(this,arguments);if(null!=l&&null!=a&&l.length==a.length)for(t=0;t<l.length;t++)if(this.model.isEdge(l[t]))b(m)&&0>mxUtils.indexOf(l,this.model.getTerminal(l[t],!0))&&this.model.setTerminal(l[t], -m,!0);else if(b(a[t])&&(u=q.getIncomingEdges(a[t]),0<u.length))if(!e)b(m)&&0>mxUtils.indexOf(a,this.model.getTerminal(u[0],!0))&&this.model.setTerminal(u[0],m,!0);else if(0==q.getIncomingEdges(l[t]).length){n=m;if(null==n||n==q.model.getParent(a[t]))n=q.model.getTerminal(u[0],!0);e=this.cloneCell(u[0]);this.addEdge(e,q.getDefaultParent(),n,l[t])}}finally{this.model.endUpdate()}return l};if(null!=y.sidebar){var D=y.sidebar.dropAndConnect;y.sidebar.dropAndConnect=function(a,c,d,e){var f=q.model,g=null; -f.beginUpdate();try{if(g=D.apply(this,arguments),b(a))for(var k=0;k<g.length;k++)if(f.isEdge(g[k])&&null==f.getTerminal(g[k],!0)){f.setTerminal(g[k],a,!0);var l=q.getCellGeometry(g[k]);l.points=null;null!=l.getTerminalPoint(!0)&&l.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return g}}var x={88:y.actions.get("selectChildren"),84:y.actions.get("selectSubtree"),80:y.actions.get("selectParent"),83:y.actions.get("selectSiblings")},J=y.onKeyDown;y.onKeyDown=function(a){try{if(q.isEnabled()&&!q.isEditing()&& -b(q.getSelectionCell())&&1==q.getSelectionCount()){var c=null;0<q.getIncomingEdges(q.getSelectionCell()).length&&(9==a.which?c=mxEvent.isShiftDown(a)?f(q.getSelectionCell()):l(q.getSelectionCell()):13==a.which&&(c=t(q.getSelectionCell(),!mxEvent.isShiftDown(a))));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!=y.hoverIcons&&y.hoverIcons.update(q.view.getState(q.getSelectionCell())),q.startEditingAtCell(q.getSelectionCell()), -mxEvent.consume(a);else if(mxEvent.isAltDown(a)&&mxEvent.isShiftDown(a)){var d=x[a.keyCode];null!=d&&(d.funct(a),mxEvent.consume(a))}else 37==a.keyCode?(u(q.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(a)):38==a.keyCode?(u(q.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(a)):39==a.keyCode?(u(q.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(a)):40==a.keyCode&&(u(q.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(a))}}catch(R){console.log("error", -R)}mxEvent.isConsumed(a)||J.apply(this,arguments)};var H=q.connectVertex;q.connectVertex=function(a,c,d,e,g,k){var m=q.getIncomingEdges(a);return b(a)&&0<m.length?(d=n(a),e=d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST,g=c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST,d==c?l(a):e==g?f(a):t(a,c!=mxConstants.DIRECTION_NORTH&&c!=mxConstants.DIRECTION_WEST)):H.call(this,a,c,d,e,g,k)};q.getSubtree=function(a){var d=[a];!c(a)&&!b(a)||m(a)||q.traverse(a,!0,function(a,b){null!= +this.model.setCollapsed(d[g],a))}for(g=0;g<f.length;g++)this.model.setVisible(f[g],!a);d=e;d=c.apply(this,arguments)}finally{this.model.endUpdate()}return d};var b=EditorUi.prototype.init;EditorUi.prototype.init=function(){b.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function b(a){return z.isVertex(a)&&d(a)}function c(a){var b=!1;null!=a&&(b=t.view.getState(a),b="1"==(null!=b?b.style:t.getCellStyle(a)).treeMoving); +return b}function d(a){var b=!1;null!=a&&(a=z.getParent(a),b=t.view.getState(a),b="tree"==(null!=b?b.style:t.getCellStyle(a)).containerType);return b}function m(a){var b=!1;null!=a&&(a=z.getParent(a),b=t.view.getState(a),t.view.getState(a),b=null!=(null!=b?b.style:t.getCellStyle(a)).childLayout);return b}function n(a){a=t.view.getState(a);if(null!=a){var b=t.getIncomingEdges(a.cell);if(0<b.length&&(b=t.view.getState(b[0]),null!=b&&(b=b.absolutePoints,null!=b&&0<b.length&&(b=b[b.length-1],null!=b)))){if(b.y== +a.y&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_SOUTH;if(b.y==a.y+a.height&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_NORTH;if(b.x>a.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function q(a,b){b=null!=b?b:!0;t.model.beginUpdate();try{var c=t.model.getParent(a),d=t.getIncomingEdges(a),e=t.cloneCells([d[0],a]);t.model.setTerminal(e[0],t.model.getTerminal(d[0],!0),!0);var f=n(a),g=c.geometry;f==mxConstants.DIRECTION_SOUTH|| +f==mxConstants.DIRECTION_NORTH?e[1].geometry.x+=b?a.geometry.width+10:-e[1].geometry.width-10:e[1].geometry.y+=b?a.geometry.height+10:-e[1].geometry.height-10;t.view.currentRoot!=c&&(e[1].geometry.x-=g.x,e[1].geometry.y-=g.y);var k=t.view.getState(a),l=t.view.scale;if(null!=k){var m=mxRectangle.fromRectangle(k);f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?m.x+=(b?a.geometry.width+10:-e[1].geometry.width-10)*l:m.y+=(b?a.geometry.height+10:-e[1].geometry.height-10)*l;var p=t.getOutgoingEdges(t.model.getTerminal(d[0], +!0));if(null!=p){for(var q=f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH,x=g=d=0;x<p.length;x++){var u=t.model.getTerminal(p[x],!1);if(f==n(u)){var v=t.view.getState(u);u!=a&&null!=v&&(q&&b!=v.getCenterX()<k.getCenterX()||!q&&b!=v.getCenterY()<k.getCenterY())&&mxUtils.intersects(m,v)&&(d=10+Math.max(d,(Math.min(m.x+m.width,v.x+v.width)-Math.max(m.x,v.x))/l),g=10+Math.max(g,(Math.min(m.y+m.height,v.y+v.height)-Math.max(m.y,v.y))/l))}}q?g=0:d=0;for(x=0;x<p.length;x++)if(u=t.model.getTerminal(p[x], +!1),f==n(u)&&(v=t.view.getState(u),u!=a&&null!=v&&(q&&b!=v.getCenterX()<k.getCenterX()||!q&&b!=v.getCenterY()<k.getCenterY()))){var A=[];t.traverse(v.cell,!0,function(a,b){null!=b&&A.push(b);A.push(a);return!0});t.moveCells(A,(b?1:-1)*d,(b?1:-1)*g)}}}return t.addCells(e,c)}finally{t.model.endUpdate()}}function f(a){t.model.beginUpdate();try{var b=n(a),c=t.getIncomingEdges(a),d=t.cloneCells([c[0],a]);t.model.setTerminal(c[0],d[1],!1);t.model.setTerminal(d[0],d[1],!0);t.model.setTerminal(d[0],a,!1); +var e=t.model.getParent(a),f=e.geometry,g=[];t.view.currentRoot!=e&&(d[1].geometry.x-=f.x,d[1].geometry.y-=f.y);t.traverse(a,!0,function(a,b){null!=b&&g.push(b);g.push(a);return!0});var k=a.geometry.width+40,l=a.geometry.height+40;b==mxConstants.DIRECTION_SOUTH?k=0:b==mxConstants.DIRECTION_NORTH?(k=0,l=-l):b==mxConstants.DIRECTION_WEST?(k=-k,l=0):b==mxConstants.DIRECTION_EAST&&(l=0);t.moveCells(g,k,l);return t.addCells(d,e)}finally{t.model.endUpdate()}}function l(a){t.model.beginUpdate();try{var b= +t.model.getParent(a),c=t.getIncomingEdges(a),d=t.cloneCells([c[0],a]);t.model.setTerminal(d[0],a,!0);var c=t.getOutgoingEdges(a),e=b.geometry,f=[];t.view.currentRoot==b&&(e=new mxRectangle);for(var g=0;g<c.length;g++){var k=t.model.getTerminal(c[g],!1);null!=k&&f.push(k)}var l=t.view.getBounds(f),m=n(a),p=t.view.translate,q=t.view.scale;m==mxConstants.DIRECTION_SOUTH?(d[1].geometry.x=null==l?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(l.x+l.width)/q-p.x-e.x+10,d[1].geometry.y+=d[1].geometry.height- +e.y+40):m==mxConstants.DIRECTION_NORTH?(d[1].geometry.x=null==l?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(l.x+l.width)/q-p.x+-e.x+10,d[1].geometry.y-=d[1].geometry.height+e.y+40):(d[1].geometry.x=m==mxConstants.DIRECTION_WEST?d[1].geometry.x-(d[1].geometry.width+e.x+40):d[1].geometry.x+(d[1].geometry.width-e.x+40),d[1].geometry.y=null==l?a.geometry.y+(a.geometry.height-d[1].geometry.height)/2:(l.y+l.height)/q-p.y+-e.y+10);return t.addCells(d,b)}finally{t.model.endUpdate()}}function p(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 u(a,b){var c=n(a),d=b==mxConstants.DIRECTION_EAST||b==mxConstants.DIRECTION_WEST;(c==mxConstants.DIRECTION_EAST|| +c==mxConstants.DIRECTION_WEST)==d&&c!=b?v.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=p(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 v=this,t=v.editor.graph,z=t.getModel(),y=v.menus.createPopupMenu; +v.menus.createPopupMenu=function(a,c,d){y.apply(this,arguments);if(1==t.getSelectionCount()){c=t.getSelectionCell();var e=t.getOutgoingEdges(c);a.addSeparator();null!=e&&0<e.length&&(b(t.getSelectionCell())&&this.addMenuItems(a,["selectChildren"],null,d),this.addMenuItems(a,["selectDescendants"],null,d));b(t.getSelectionCell())&&(a.addSeparator(),0<t.getIncomingEdges(c).length&&this.addMenuItems(a,["selectSiblings","selectParent"],null,d))}};v.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");v.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");v.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");v.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 C=t.removeCells;t.removeCells=function(a,c){c=null!=c?c:!0;null==a&&(a=this.getDeletableCells(this.getSelectionCells()));c&&(a=this.getDeletableCells(this.addAllEdges(a)));for(var e=[],f=0;f<a.length;f++){var g=a[f];z.isEdge(g)&&d(g)&&(e.push(g),g=z.getTerminal(g,!1));b(g)?(t.traverse(g,!0,function(a,b){null!=b&&e.push(b);e.push(a);return!0}),g=t.getIncomingEdges(a[f]),a=a.concat(g)):e.push(a[f])}a=e;return C.apply(this,arguments)};v.hoverIcons.getStateAt=function(a,c, +d){return b(a.cell)?null:this.graph.view.getState(this.graph.getCellAt(c,d))};var B=t.duplicateCells;t.duplicateCells=function(a,c){a=null!=a?a:this.getSelectionCells();for(var d=a.slice(0),e=0;e<d.length;e++){var f=t.view.getState(d[e]);if(null!=f&&b(f.cell))for(var g=t.getIncomingEdges(f.cell),f=0;f<g.length;f++)mxUtils.remove(g[f],a)}this.model.beginUpdate();try{var k=B.call(this,a,c);if(k.length==a.length)for(e=0;e<a.length;e++)if(b(a[e])){var l=t.getIncomingEdges(k[e]),g=t.getIncomingEdges(a[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(a,c,d,e,f,g,k){var l=null;this.model.beginUpdate();try{var m=f,n=this.view.getState(f),p=null!=n?n.style:this.getCellStyle(f);if(null!=a&&b(f)&&"1"==mxUtils.getValue(p,"treeFolding","0")){for(var q=0;q<a.length;q++)if(b(a[q])||t.model.isEdge(a[q])&&null==t.model.getTerminal(a[q],!0)){f=t.model.getParent(a[q]); +break}if(null!=m&&f!=m&&null!=this.view.getState(a[0])){var u=t.getIncomingEdges(a[0]);if(0<u.length){var v=t.view.getState(t.model.getTerminal(u[0],!0));if(null!=v){var A=t.view.getState(m);null!=A&&(c=(A.getCenterX()-v.getCenterX())/t.view.scale,d=(A.getCenterY()-v.getCenterY())/t.view.scale)}}}}l=x.apply(this,arguments);if(null!=l&&null!=a&&l.length==a.length)for(q=0;q<l.length;q++)if(this.model.isEdge(l[q]))b(m)&&0>mxUtils.indexOf(l,this.model.getTerminal(l[q],!0))&&this.model.setTerminal(l[q], +m,!0);else if(b(a[q])&&(u=t.getIncomingEdges(a[q]),0<u.length))if(!e)b(m)&&0>mxUtils.indexOf(a,this.model.getTerminal(u[0],!0))&&this.model.setTerminal(u[0],m,!0);else if(0==t.getIncomingEdges(l[q]).length){n=m;if(null==n||n==t.model.getParent(a[q]))n=t.model.getTerminal(u[0],!0);e=this.cloneCell(u[0]);this.addEdge(e,t.getDefaultParent(),n,l[q])}}finally{this.model.endUpdate()}return l};if(null!=v.sidebar){var D=v.sidebar.dropAndConnect;v.sidebar.dropAndConnect=function(a,c,d,e){var f=t.model,g=null; +f.beginUpdate();try{if(g=D.apply(this,arguments),b(a))for(var k=0;k<g.length;k++)if(f.isEdge(g[k])&&null==f.getTerminal(g[k],!0)){f.setTerminal(g[k],a,!0);var l=t.getCellGeometry(g[k]);l.points=null;null!=l.getTerminalPoint(!0)&&l.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return g}}var A={88:v.actions.get("selectChildren"),84:v.actions.get("selectSubtree"),80:v.actions.get("selectParent"),83:v.actions.get("selectSiblings")},I=v.onKeyDown;v.onKeyDown=function(a){try{if(t.isEnabled()&&!t.isEditing()&& +b(t.getSelectionCell())&&1==t.getSelectionCount()){var c=null;0<t.getIncomingEdges(t.getSelectionCell()).length&&(9==a.which?c=mxEvent.isShiftDown(a)?f(t.getSelectionCell()):l(t.getSelectionCell()):13==a.which&&(c=q(t.getSelectionCell(),!mxEvent.isShiftDown(a))));if(null!=c&&0<c.length)1==c.length&&t.model.isEdge(c[0])?t.setSelectionCell(t.model.getTerminal(c[0],!1)):t.setSelectionCell(c[c.length-1]),null!=v.hoverIcons&&v.hoverIcons.update(t.view.getState(t.getSelectionCell())),t.startEditingAtCell(t.getSelectionCell()), +mxEvent.consume(a);else if(mxEvent.isAltDown(a)&&mxEvent.isShiftDown(a)){var d=A[a.keyCode];null!=d&&(d.funct(a),mxEvent.consume(a))}else 37==a.keyCode?(u(t.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(a)):38==a.keyCode?(u(t.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(a)):39==a.keyCode?(u(t.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(a)):40==a.keyCode&&(u(t.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(a))}}catch(R){console.log("error", +R)}mxEvent.isConsumed(a)||I.apply(this,arguments)};var H=t.connectVertex;t.connectVertex=function(a,c,d,e,g,k){var m=t.getIncomingEdges(a);return b(a)&&0<m.length?(d=n(a),e=d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST,g=c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST,d==c?l(a):e==g?f(a):q(a,c!=mxConstants.DIRECTION_NORTH&&c!=mxConstants.DIRECTION_WEST)):H.call(this,a,c,d,e,g,k)};t.getSubtree=function(a){var d=[a];!c(a)&&!b(a)||m(a)||t.traverse(a,!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 F=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){F.apply(this,arguments);(c(this.state.cell)||b(this.state.cell))&&0<this.graph.getOutgoingEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(a),this.moveHandle.setAttribute("title","Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="18px", this.moveHandle.style.height="18px",this.graph.container.appendChild(this.moveHandle),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(a){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(a),mxEvent.getClientY(a));this.graph.graphHandler.cells=this.graph.getSubtree(this.state.cell);this.graph.graphHandler.bounds=this.state.view.getBounds(this.graph.graphHandler.cells);this.graph.graphHandler.pBounds=this.graph.graphHandler.getPreviewBounds(this.graph.graphHandler.cells); -this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(a);this.graph.isMouseDown=!0;mxEvent.consume(a)})))};var I=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){I.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var G=mxVertexHandler.prototype.destroy; -mxVertexHandler.prototype.destroy=function(a,b){G.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var d=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var a=d.apply(this,arguments),b=this.graph;return a.concat([this.addEntry("tree container",function(){var a=new mxCell("Tree Container",new mxGeometry(0,0,220,160),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;"); +this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(a);this.graph.isMouseDown=!0;mxEvent.consume(a)})))};var G=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){G.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var J=mxVertexHandler.prototype.destroy; +mxVertexHandler.prototype.destroy=function(a,b){J.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var d=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var a=d.apply(this,arguments),b=this.graph;return a.concat([this.addEntry("tree container",function(){var a=new mxCell("Tree Container",new mxGeometry(0,0,220,160),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;"); a.vertex=!0;return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap central idea branch topic",function(){var a=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");a.vertex=!0;var b=new mxCell("Central Idea",new mxGeometry(160,60,100,40),"ellipse;whiteSpace=wrap;html=1;align=center;container=1;recursiveResize=0;treeFolding=1;treeMoving=1;");b.vertex=!0;var c=new mxCell("Topic", new mxGeometry(320,40,80,20),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;");c.vertex=!0;var d=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");d.geometry.relative=!0;d.edge=!0;b.insertEdge(d,!0);c.insertEdge(d,!1);var e=new mxCell("Branch",new mxGeometry(320,80,72,26),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;"); e.vertex=!0;var g=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");g.geometry.relative=!0;g.edge=!0;b.insertEdge(g,!0);e.insertEdge(g,!1);var p=new mxCell("Topic",new mxGeometry(20,40,80,20),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;");p.vertex=!0;var u=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;"); -u.geometry.relative=!0;u.edge=!0;b.insertEdge(u,!0);p.insertEdge(u,!1);var y=new mxCell("Branch",new mxGeometry(20,80,72,26),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;");y.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);y.insertEdge(q,!1);a.insert(d);a.insert(g);a.insert(u);a.insert(q);a.insert(b);a.insert(c);a.insert(e);a.insert(p);a.insert(y);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap central idea",function(){var a=new mxCell("Central Idea",new mxGeometry(0,0,100,40),"ellipse;whiteSpace=wrap;html=1;align=center;container=1;recursiveResize=0;treeFolding=1;treeMoving=1;");a.vertex=!0;return sb.createVertexTemplateFromCells([a], +u.geometry.relative=!0;u.edge=!0;b.insertEdge(u,!0);p.insertEdge(u,!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;container=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;");v.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);v.insertEdge(t,!1);a.insert(d);a.insert(g);a.insert(u);a.insert(t);a.insert(b);a.insert(c);a.insert(e);a.insert(p);a.insert(v);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap central idea",function(){var a=new mxCell("Central Idea",new mxGeometry(0,0,100,40),"ellipse;whiteSpace=wrap;html=1;align=center;container=1;recursiveResize=0;treeFolding=1;treeMoving=1;");a.vertex=!0;return sb.createVertexTemplateFromCells([a], a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap branch",function(){var a=new mxCell("Branch",new mxGeometry(0,0,80,20),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;");a.vertex=!0;var b=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;"); b.geometry.setTerminalPoint(new mxPoint(-40,40),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);return sb.createVertexTemplateFromCells([a,b],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap sub topic",function(){var a=new mxCell("Sub Topic",new mxGeometry(0,0,72,26),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;");a.vertex=!0;var b=new mxCell("", new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");b.geometry.setTerminalPoint(new mxPoint(-40,40),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);return sb.createVertexTemplateFromCells([a,b],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree orgchart organization division",function(){var a=new mxCell("Orgchart",new mxGeometry(0,0,280,220),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");a.vertex= @@ -9636,7 +9649,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 b=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth; try{var d=document.createElement("style");d.type="text/css";d.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 * { 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; }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; }.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:2px; 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:lightgray !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.5) !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(d)}catch(q){}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(d)}catch(t){}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= @@ -9644,7 +9657,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=!0;Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var e=EditorUi.prototype.updateTabContainer;EditorUi.prototype.updateTabContainer= function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom=this.tabContainerHeight+"px");e.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 m=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(a,c){null!=c.shortcut&&900>b&&!mxClient.IS_IOS?a.firstChild.nextSibling.setAttribute("title", c.shortcut):m.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 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= +"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 q=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){q.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="2px";var b=document.createElement("button");mxUtils.write(b,mxResources.get("save"));b.setAttribute("title",mxResources.get("save")+ " ("+Editor.ctrlKey+"+S)");b.className="1"==urlParams.saveAndExit?"geMenuItem":"geMenuItem gePrimaryBtn";b.style.fontSize="14px";b.style.padding="6px";b.style.borderRadius="3px";b.style.marginLeft="8px";b.style.cursor="pointer";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()}));a.appendChild(b);"1"==urlParams.saveAndExit&&(b=document.createElement("a"),mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",mxResources.get("saveAndExit")), b.className="geMenuItem gePrimaryBtn",b.style.fontSize="14px",b.style.marginLeft="6px",b.style.padding="6px",b.style.cursor="pointer",mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b));b=document.createElement("a");mxUtils.write(b,mxResources.get("exit"));b.setAttribute("title",mxResources.get("exit"));b.className="geMenuItem";b.style.fontSize="14px";b.style.marginLeft="6px";b.style.padding="6px";b.style.cursor="pointer";mxEvent.addListener(b, @@ -9664,7 +9677,7 @@ a,c)})));var f=this.get("language");this.put("extras",new Menu(mxUtils.bind(this this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(a,c){b.menus.addMenuItems(a,"importText plantUml - formatSql importCsv - createShape editDiagram".split(" "),c)})));this.put("insert",new Menu(mxUtils.bind(this,function(a,c){b.menus.addMenuItems(a,"insertRectangle insertEllipse insertRhombus - insertText insertLink - insertImage".split(" "),c);b.insertTemplateEnabled&&!b.isOffline()&&b.menus.addMenuItems(a,["insertTemplate"],c);a.addSeparator(c);this.addMenuItems(a,["createShape","insertFreehand", "-"],c);this.addSubmenu("insertLayout",a,c,mxResources.get("layout"));this.addSubmenu("insertAdvanced",a,c,mxResources.get("advanced"));a.addSeparator(c);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?b.menus.addMenuItems(a,["import"],c):b.menus.addSubmenu("importFrom",a,c)})));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 - 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 y=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", +["copyConnect","collapseExpand","-","pageScale"],c)})))};var v=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 d(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= @@ -9677,29 +9690,40 @@ c.funct,null,mxResources.get("redo")+" ("+c.shortcut+")",c,"data:image/svg+xml;b e([d("",function(){l.popupMenuHandler.hideMenu();var a=l.view.scale,b=l.view.translate.x,c=l.view.translate.y;k.actions.get("resetView").funct();1E-5>Math.abs(a-l.view.scale)&&b==l.view.translate.x&&c==l.view.translate.y&&k.actions.get(l.pageVisible?"fitPage":"fitWindow").funct()},!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",g,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMyA1djRoMlY1aDRWM0g1Yy0xLjEgMC0yIC45LTIgMnptMiAxMEgzdjRjMCAxLjEuOSAyIDIgMmg0di0ySDV2LTR6bTE0IDRoLTR2Mmg0YzEuMSAwIDItLjkgMi0ydi00aC0ydjR6bTAtMTZoLTR2Mmg0djRoMlY1YzAtMS4xLS45LTItMi0yeiIvPjwvc3ZnPg=="), 640<=b?d("",c.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",c,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHptMi41LTRoLTJ2Mkg5di0ySDdWOWgyVjdoMXYyaDJ2MXoiLz48L3N2Zz4="): null,640<=b?d("",f.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",f,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHpNNyA5aDV2MUg3eiIvPjwvc3ZnPg=="): -null],60)}c=k.menus.get("language");null!=c&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=b?(null==N&&(f=p.addMenu("",c.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?"13px":"11px",m.appendChild(f),N=f),k.buttonContainer.style.paddingRight="34px"):(k.buttonContainer.style.paddingRight="4px",null!=N&&(N.parentNode.removeChild(N),N=null))}y.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],60)}c=k.menus.get("language");null!=c&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=b?(null==K&&(f=p.addMenu("",c.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?"13px":"11px",m.appendChild(f),K=f),k.buttonContainer.style.paddingRight="34px"):(k.buttonContainer.style.paddingRight="4px",null!=K&&(K.parentNode.removeChild(K),K=null))}v.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||c(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 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": +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": "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 G=k.menus.get("viewZoom"); -if(null!=G){this.tabContainer.style.right="70px";var E=p.addMenu("100%",G.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";u.appendChild(E);G=mxUtils.bind(this,function(){E.innerHTML=Math.round(100* -k.editor.graph.view.scale)+"%"});k.editor.graph.view.addListener(mxEvent.EVENT_SCALE,G);k.editor.addListener("resetGraphView",G);k.editor.addListener("pageSelected",G);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")}}u.appendChild(k.tabContainer);u.appendChild(m);u.appendChild(k.diagramContainer); -g.appendChild(u);k.updateTabContainer();var N=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 c=EditorUi.initTheme;EditorUi.initTheme=function(){c.apply(this,arguments);"min"!=uiTheme||a||(this.initMinimalTheme(),a=!0)}})();(function(){var a=mxGuide.prototype.move;mxGuide.prototype.move=function(b,c,e,k){var d=c.y,g=c.x,t=!1,f=!1;if(null!=this.states&&null!=b&&null!=c){var l=this,p=new mxCellState,u=this.graph.getView().scale,y=Math.max(2,this.getGuideTolerance()/2);p.x=b.x+g;p.y=b.y+d;p.width=b.width;p.height=b.height;for(var q=[],A=[],z=0;z<this.states.length;z++){var C=this.states[z];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)?q.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)&&A.push(C))}var v=0,B=0,D=C=0,x=0,J=0,H=0,F=0,I=5*u;if(1<q.length){q.push(p);q.sort(function(a,b){return a.y-b.y});var G=!1,z=p==q[0],u=p==q[q.length-1];if(!z&&!u)for(z=1;z<q.length-1;z++)if(p==q[z]){u=q[z-1];z=q[z+1];C=B=D=(z.y-u.y-u.height-p.height)/2;break}for(z=0;z<q.length-1;z++){var u=q[z],E=q[z+1],K=p==u||p==E,E=E.y-u.y-u.height,G=G|p==u;if(0==B&& -0==v)B=E,v=1;else if(Math.abs(B-E)<=(K||1==z&&G?y:0))v+=1;else if(1<v&&G){q=q.slice(0,z+1);break}else if(3<=q.length-z&&!G)v=0,C=B=0!=D?D:0,q.splice(0,0==z?1:z),z=-1;else break;0!=C||K||(B=C=E)}3==q.length&&q[1]==p&&(C=0)}if(1<A.length){A.push(p);A.sort(function(a,b){return a.x-b.x});G=!1;z=p==A[0];u=p==A[A.length-1];if(!z&&!u)for(z=1;z<A.length-1;z++)if(p==A[z]){u=A[z-1];z=A[z+1];H=J=F=(z.x-u.x-u.width-p.width)/2;break}for(z=0;z<A.length-1;z++){u=A[z];E=A[z+1];K=p==u||p==E;E=E.x-u.x-u.width;G|=p== -u;if(0==J&&0==x)J=E,x=1;else if(Math.abs(J-E)<=(K||1==z&&G?y:0))x+=1;else if(1<x&&G){A=A.slice(0,z+1);break}else if(3<=A.length-z&&!G)x=0,H=J=0!=F?F:0,A.splice(0,0==z?1:z),z=-1;else break;0!=H||K||(J=H=E)}3==A.length&&A[1]==p&&(H=0)}y=function(a,b,c,d){var e=[],f;d?(d=I,f=0):(d=0,f=I);e.push(new mxPoint(a.x-d,a.y-f));e.push(new mxPoint(a.x+d,a.y+f));e.push(a);e.push(b);e.push(new mxPoint(b.x-d,b.y-f));e.push(new mxPoint(b.x+d,b.y+f));if(null!=c)return c.points=e,c;a=new mxPolyline(e,mxConstants.GUIDE_COLOR, -mxConstants.GUIDE_STROKEWIDTH);a.dialect=mxConstants.DIALECT_SVG;a.pointerEvents=!1;a.init(l.graph.getView().getOverlayPane());return a};J=function(a,b){if(a&&null!=l.guidesArrHor)for(var c=0;c<l.guidesArrHor.length;c++)l.guidesArrHor[c].node.style.visibility="hidden";if(b&&null!=l.guidesArrVer)for(c=0;c<l.guidesArrVer.length;c++)l.guidesArrVer[c].node.style.visibility="hidden"};if(1<x&&x==A.length-1){x=[];F=l.guidesArrHor;t=[];g=0;z=A[0]==p?1:0;G=A[z].y+A[z].height;if(0<H)for(z=0;z<A.length-1;z++)u= -A[z],E=A[z+1],p==u?(g=E.x-u.width-H,t.push(new mxPoint(g+u.width+I,G)),t.push(new mxPoint(E.x-I,G))):p==E?(t.push(new mxPoint(u.x+u.width+I,G)),g=u.x+u.width+H,t.push(new mxPoint(g-I,G))):(t.push(new mxPoint(u.x+u.width+I,G)),t.push(new mxPoint(E.x-I,G)));else u=A[0],z=A[2],g=u.x+u.width+(z.x-u.x-u.width-p.width)/2,t.push(new mxPoint(u.x+u.width+I,G)),t.push(new mxPoint(g-I,G)),t.push(new mxPoint(g+p.width+I,G)),t.push(new mxPoint(z.x-I,G));for(z=0;z<t.length;z+=2)A=t[z],H=t[z+1],A=y(A,H,null!=F? -F[z/2]:null),A.node.style.visibility="visible",A.redraw(),x.push(A);for(z=t.length/2;null!=F&&z<F.length;z++)F[z].destroy();l.guidesArrHor=x;g-=b.x;t=!0}else J(!0);if(1<v&&v==q.length-1){x=[];F=l.guidesArrVer;f=[];d=0;z=q[0]==p?1:0;v=q[z].x+q[z].width;if(0<C)for(z=0;z<q.length-1;z++)u=q[z],E=q[z+1],p==u?(d=E.y-u.height-C,f.push(new mxPoint(v,d+u.height+I)),f.push(new mxPoint(v,E.y-I))):p==E?(f.push(new mxPoint(v,u.y+u.height+I)),d=u.y+u.height+C,f.push(new mxPoint(v,d-I))):(f.push(new mxPoint(v,u.y+ -u.height+I)),f.push(new mxPoint(v,E.y-I)));else u=q[0],z=q[2],d=u.y+u.height+(z.y-u.y-u.height-p.height)/2,f.push(new mxPoint(v,u.y+u.height+I)),f.push(new mxPoint(v,d-I)),f.push(new mxPoint(v,d+p.height+I)),f.push(new mxPoint(v,z.y-I));for(z=0;z<f.length;z+=2)A=f[z],H=f[z+1],A=y(A,H,null!=F?F[z/2]:null,!0),A.node.style.visibility="visible",A.redraw(),x.push(A);for(z=f.length/2;null!=F&&z<F.length;z++)F[z].destroy();l.guidesArrVer=x;d-=b.y;f=!0}else J(!1,!0)}if(t||f)return p=new mxPoint(g,d),q=a.call(this, -b,p,e,k),t&&!f?p.y=q.y:f&&!t&&(p.x=q.x),q.y!=p.y&&null!=this.guideY&&null!=this.guideY.node&&(this.guideY.node.style.visibility="hidden"),q.x!=p.x&&null!=this.guideX&&null!=this.guideX.node&&(this.guideX.node.style.visibility="hidden"),p;J(!0,!0);return a.apply(this,arguments)};var c=mxGuide.prototype.setVisible;mxGuide.prototype.setVisible=function(a){c.call(this,a);var b=this.guidesArrVer,d=this.guidesArrHor;if(null!=b)for(var k=0;k<b.length;k++)b[k].node.style.visibility=a?"visible":"hidden";if(null!= -d)for(k=0;k<d.length;k++)d[k].node.style.visibility=a?"visible":"hidden"};var b=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){b.call(this);var a=this.guidesArrVer,c=this.guidesArrHor;if(null!=a){for(var e=0;e<a.length;e++)a[e].destroy();this.guidesArrVer=null}if(null!=c){for(e=0;e<c.length;e++)c[e].destroy();this.guidesArrHor=null}}})();function mxFreehand(a){if(null!=a.container&&null!=a.container.querySelector("svg")){var c=a.container.querySelector("svg"),b=mxFreehand.prototype.NORMAL_SMOOTHING,d=null,g=[],e,k=[],m,n=!1,t=!0,f=[],l=!1,p=!1;this.setClosedPath=function(a){n=a};this.setAutoClose=function(a){t=a};this.setStopClickEnabled=function(a){p=a};this.setSmoothing=function(a){b=a};var u=function(b){l=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(){u(!0)};this.isDrawing=function(){return l};var y=mxUtils.bind(this,function(a){if(d){var b=p&&0<k.length&&null!=m&&2>m.length;b||k.push.apply(k,m);m=[];k.push(null);g.push(d);d=null;b&&this.stopDrawing();mxEvent.consume(a)}});this.stopDrawing=function(){if(0<g.length){for(var b=k[0].x,c=k[0].x,e=k[0].y,f=k[0].y,l=1;l<k.length;l++)null!=k[l]&&(b=Math.max(b,k[l].x),c=Math.min(c,k[l].x),e=Math.max(e, -k[l].y),f=Math.min(f,k[l].y));b-=c;e-=f;if(0<b&&0<e){var m=100/b,p=100/e;k.map(function(a){if(null==a)return a;a.x=(a.x-c)*m;a.y=(a.y-f)*p;return a});for(var q='<shape strokewidth="inherit"><foreground>',y=0,l=0;l<k.length;l++){var z=k[l];if(null==z){var z=!1,y=k[y],A=k[l-1];!n&&t&&(z=y.x-A.x,A=y.y-A.y,z=Math.sqrt(z*z+A*A)<=a.tolerance);if(n||z)q+='<line x="'+y.x.toFixed(2)+'" y="'+y.y.toFixed(2)+'"/>';q+="</path>"+(n||z?"<fillstroke/>":"<stroke/>");y=l+1}else q=l==y?q+('<path><move x="'+z.x.toFixed(2)+ -'" y="'+z.y.toFixed(2)+'"/>'):q+('<line x="'+z.x.toFixed(2)+'" y="'+z.y.toFixed(2)+'"/>')}var l=mxConstants.STYLE_SHAPE+"=stencil("+Graph.compress(q+"</foreground></shape>")+");fillColor=none;",q=a.view.scale,y=a.view.translate,K=new mxCell("",new mxGeometry(c/q-y.x,f/q-y.y,b/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])}, +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 J=k.menus.get("viewZoom"); +if(null!=J){this.tabContainer.style.right="70px";var E=p.addMenu("100%",J.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";u.appendChild(E);J=mxUtils.bind(this,function(){E.innerHTML=Math.round(100* +k.editor.graph.view.scale)+"%"});k.editor.graph.view.addListener(mxEvent.EVENT_SCALE,J);k.editor.addListener("resetGraphView",J);k.editor.addListener("pageSelected",J);var L=k.setGraphEnabled;k.setGraphEnabled=function(){L.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")}}u.appendChild(k.tabContainer);u.appendChild(m);u.appendChild(k.diagramContainer); +g.appendChild(u);k.updateTabContainer();var K=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 c=EditorUi.initTheme;EditorUi.initTheme=function(){c.apply(this,arguments);"min"!=uiTheme||a||(this.initMinimalTheme(),a=!0)}})();(function(){var a=mxGuide.prototype.move;mxGuide.prototype.move=function(b,c,e,k){var d=c.y,g=c.x,q=!1,f=!1;if(null!=this.states&&null!=b&&null!=c){var l=this,p=new mxCellState,u=this.graph.getView().scale,v=Math.max(2,this.getGuideTolerance()/2);p.x=b.x+g;p.y=b.y+d;p.width=b.width;p.height=b.height;for(var t=[],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)?t.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 B=0,x=0,D=C=0,A=0,I=0,H=0,F=0,G=5*u;if(1<t.length){t.push(p);t.sort(function(a,b){return a.y-b.y});var J=!1,y=p==t[0],u=p==t[t.length-1];if(!y&&!u)for(y=1;y<t.length-1;y++)if(p==t[y]){u=t[y-1];y=t[y+1];C=x=D=(y.y-u.y-u.height-p.height)/2;break}for(y=0;y<t.length-1;y++){var u=t[y],E=t[y+1],L=p==u||p==E,E=E.y-u.y-u.height,J=J|p==u;if(0==x&& +0==B)x=E,B=1;else if(Math.abs(x-E)<=(L||1==y&&J?v:0))B+=1;else if(1<B&&J){t=t.slice(0,y+1);break}else if(3<=t.length-y&&!J)B=0,C=x=0!=D?D:0,t.splice(0,0==y?1:y),y=-1;else break;0!=C||L||(x=C=E)}3==t.length&&t[1]==p&&(C=0)}if(1<z.length){z.push(p);z.sort(function(a,b){return a.x-b.x});J=!1;y=p==z[0];u=p==z[z.length-1];if(!y&&!u)for(y=1;y<z.length-1;y++)if(p==z[y]){u=z[y-1];y=z[y+1];H=I=F=(y.x-u.x-u.width-p.width)/2;break}for(y=0;y<z.length-1;y++){u=z[y];E=z[y+1];L=p==u||p==E;E=E.x-u.x-u.width;J|=p== +u;if(0==I&&0==A)I=E,A=1;else if(Math.abs(I-E)<=(L||1==y&&J?v:0))A+=1;else if(1<A&&J){z=z.slice(0,y+1);break}else if(3<=z.length-y&&!J)A=0,H=I=0!=F?F:0,z.splice(0,0==y?1:y),y=-1;else break;0!=H||L||(I=H=E)}3==z.length&&z[1]==p&&(H=0)}v=function(a,b,c,d){var e=[],f;d?(d=G,f=0):(d=0,f=G);e.push(new mxPoint(a.x-d,a.y-f));e.push(new mxPoint(a.x+d,a.y+f));e.push(a);e.push(b);e.push(new mxPoint(b.x-d,b.y-f));e.push(new mxPoint(b.x+d,b.y+f));if(null!=c)return c.points=e,c;a=new mxPolyline(e,mxConstants.GUIDE_COLOR, +mxConstants.GUIDE_STROKEWIDTH);a.dialect=mxConstants.DIALECT_SVG;a.pointerEvents=!1;a.init(l.graph.getView().getOverlayPane());return a};I=function(a,b){if(a&&null!=l.guidesArrHor)for(var c=0;c<l.guidesArrHor.length;c++)l.guidesArrHor[c].node.style.visibility="hidden";if(b&&null!=l.guidesArrVer)for(c=0;c<l.guidesArrVer.length;c++)l.guidesArrVer[c].node.style.visibility="hidden"};if(1<A&&A==z.length-1){A=[];F=l.guidesArrHor;q=[];g=0;y=z[0]==p?1:0;J=z[y].y+z[y].height;if(0<H)for(y=0;y<z.length-1;y++)u= +z[y],E=z[y+1],p==u?(g=E.x-u.width-H,q.push(new mxPoint(g+u.width+G,J)),q.push(new mxPoint(E.x-G,J))):p==E?(q.push(new mxPoint(u.x+u.width+G,J)),g=u.x+u.width+H,q.push(new mxPoint(g-G,J))):(q.push(new mxPoint(u.x+u.width+G,J)),q.push(new mxPoint(E.x-G,J)));else u=z[0],y=z[2],g=u.x+u.width+(y.x-u.x-u.width-p.width)/2,q.push(new mxPoint(u.x+u.width+G,J)),q.push(new mxPoint(g-G,J)),q.push(new mxPoint(g+p.width+G,J)),q.push(new mxPoint(y.x-G,J));for(y=0;y<q.length;y+=2)z=q[y],H=q[y+1],z=v(z,H,null!=F? +F[y/2]:null),z.node.style.visibility="visible",z.redraw(),A.push(z);for(y=q.length/2;null!=F&&y<F.length;y++)F[y].destroy();l.guidesArrHor=A;g-=b.x;q=!0}else I(!0);if(1<B&&B==t.length-1){A=[];F=l.guidesArrVer;f=[];d=0;y=t[0]==p?1:0;B=t[y].x+t[y].width;if(0<C)for(y=0;y<t.length-1;y++)u=t[y],E=t[y+1],p==u?(d=E.y-u.height-C,f.push(new mxPoint(B,d+u.height+G)),f.push(new mxPoint(B,E.y-G))):p==E?(f.push(new mxPoint(B,u.y+u.height+G)),d=u.y+u.height+C,f.push(new mxPoint(B,d-G))):(f.push(new mxPoint(B,u.y+ +u.height+G)),f.push(new mxPoint(B,E.y-G)));else u=t[0],y=t[2],d=u.y+u.height+(y.y-u.y-u.height-p.height)/2,f.push(new mxPoint(B,u.y+u.height+G)),f.push(new mxPoint(B,d-G)),f.push(new mxPoint(B,d+p.height+G)),f.push(new mxPoint(B,y.y-G));for(y=0;y<f.length;y+=2)z=f[y],H=f[y+1],z=v(z,H,null!=F?F[y/2]:null,!0),z.node.style.visibility="visible",z.redraw(),A.push(z);for(y=f.length/2;null!=F&&y<F.length;y++)F[y].destroy();l.guidesArrVer=A;d-=b.y;f=!0}else I(!1,!0)}if(q||f)return p=new mxPoint(g,d),t=a.call(this, +b,p,e,k),q&&!f?p.y=t.y:f&&!q&&(p.x=t.x),t.y!=p.y&&null!=this.guideY&&null!=this.guideY.node&&(this.guideY.node.style.visibility="hidden"),t.x!=p.x&&null!=this.guideX&&null!=this.guideX.node&&(this.guideX.node.style.visibility="hidden"),p;I(!0,!0);return a.apply(this,arguments)};var c=mxGuide.prototype.setVisible;mxGuide.prototype.setVisible=function(a){c.call(this,a);var b=this.guidesArrVer,d=this.guidesArrHor;if(null!=b)for(var k=0;k<b.length;k++)b[k].node.style.visibility=a?"visible":"hidden";if(null!= +d)for(k=0;k<d.length;k++)d[k].node.style.visibility=a?"visible":"hidden"};var b=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){b.call(this);var a=this.guidesArrVer,c=this.guidesArrHor;if(null!=a){for(var e=0;e<a.length;e++)a[e].destroy();this.guidesArrVer=null}if(null!=c){for(e=0;e<c.length;e++)c[e].destroy();this.guidesArrHor=null}}})();function mxRuler(a,c,b,d){function g(){m.style.top=a.origContTop+"px";m.style.left=a.origContLeft+"px";m.style.width=(b?30:a.origContWidth)+"px";m.style.height=(b?a.origContHeight:30)+"px"}function e(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;this.unit=c;var m=document.createElement("div");m.style.position="absolute";m.style.background="whiteSmoke";document.body.appendChild(m);mxEvent.disableContextMenu(m); +this.editorUiRefresh=a.refresh;a.refresh=function(c){1!=c&&k.editorUiRefresh.apply(a,arguments);var e=a.diagramContainer;d||(a.origContTop=e.offsetTop,a.origContLeft=e.offsetLeft,a.origContWidth=e.offsetWidth,a.origContHeight=e.offsetHeight);g();b?e.style.left=e.offsetLeft+30+"px":e.style.top=e.offsetTop+30+"px"};g();var n=document.createElement("canvas");n.width=m.offsetWidth;n.height=m.offsetHeight;m.style.overflow="hidden";n.style.position="relative";m.appendChild(n);var q=n.getContext("2d","dark"== +window.uiTheme?{alpha:!1}:null);this.ui=a;var f=a.editor.graph;this.graph=f;this.container=m;this.canvas=n;var l=function(a,c,d,e,f){a=Math.round(a);c=Math.round(c);d=Math.round(d);e=Math.round(e);q.beginPath();q.moveTo(a+.5,c+.5);q.lineTo(d+.5,e+.5);q.stroke();f&&(b?(c-=3,d=q.measureText(f),q.save(),d=a+d.width/2+8,e=c+5,q.translate(d,e),q.rotate(-Math.PI/2),q.translate(-d,-e),q.fillText(f,a,c),q.restore()):q.fillText(f,b?a:a+3,b?c-3:c+9))},p=function(){q.clearRect(0,0,n.width,n.height);q.beginPath(); +q.lineWidth=.7;q.strokeStyle="#BBBBBB";q.setLineDash([]);q.font="9px Arial";q.fillStyle="#BBBBBB";q.beginPath();q.moveTo(0,0);q.lineTo(30,30);q.stroke();var a=f.view.scale,c=f.view.getBackgroundPageBounds(),d=f.view.translate,e=f.view.getGraphBounds(),c=b?c.y-f.container.scrollTop:c.x-f.container.scrollLeft;b?(d=e.y/a-d.y,-1>=d&&(c+=Math.ceil(Math.abs(d)/f.pageFormat.height)*f.pageFormat.height*a)):(d=e.x/a-d.x,-1>=d&&(c+=Math.ceil(Math.abs(d)/f.pageFormat.width)*f.pageFormat.width*a));var c=c+(b? +f.container.offsetTop-k.container.offsetTop:f.container.offsetLeft-k.container.offsetLeft),g,m,p;switch(k.unit){case mxConstants.PIXELS:g=p=10;m=[25,5,5,5,5,10,5,5,5,5];break;case mxConstants.CENTIMETERS:p=10;g=mxConstants.PIXELS_PER_CM/p;m=[25,5,5,5,5,10,5,5,5,5];break;case mxConstants.INCHES:p=.5>=a||4<=a?8:16,g=mxConstants.PIXELS_PER_INCH/p,m=[25,5,8,5,12,5,8,5,15,5,8,5,12,5,8,5]}d=g;if(k.unit!=mxConstants.INCHES||2<a||.25>a)d=1<=a?g/Math.floor(a):10*Math.floor(10/a/10);for(g=30+c%(d*a);g<=(b? +n.height:n.width);g+=d*a){var e=Math.round((g-c)/a/d),u=null;0==e%p&&(u=k.formatText(e*d)+"");b?l(30-m[Math.abs(e)%p],g,30,g,u):l(g,30-m[Math.abs(e)%p],g,30,u)}};this.drawRuler=p;this.sizeListener=c=e(function(){var a=f.container;b?(a=a.offsetHeight+30,n.height!=a&&(n.height=a,m.style.height=a+"px",p())):(a=a.offsetWidth+30,n.width!=a&&(n.width=a,m.style.width=a+"px",p()))},10);var u=e(function(){var a=b?f.container.scrollTop:f.container.scrollLeft;k.lastScroll!=a&&(k.lastScroll=a,p())},10);this.scrollListener= +u;this.unitListener=function(a,b){k.setUnit(b.getProperty("unit"))};f.addListener(mxEvent.SIZE,c);f.container.addEventListener("scroll",u);f.view.addListener("unitChanged",this.unitListener);this.origGuideMove=mxGuide.prototype.move;mxGuide.prototype.move=function(a,c,d,e){null!=k.guidePart&&q.putImageData(k.guidePart.imgData,k.guidePart.x,k.guidePart.y);var f=k.origGuideMove.apply(this,arguments),g,m,n;q.lineWidth=.5;q.strokeStyle="#0000BB";q.setLineDash([2]);b?(m=a.y+f.y+30-this.graph.container.scrollTop, +g=0,n=q.getImageData(g,m,30,5),l(g,m,30,m)):(m=0,g=a.x+f.x+30-this.graph.container.scrollLeft,n=q.getImageData(g,m,5,30),l(g,m,g,30));if(null==k.guidePart||k.guidePart.x!=g||k.guidePart.y!=m)k.guidePart={imgData:n,x:g,y:m};return f};this.origGuideDestroy=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){var a=k.origGuideDestroy.apply(this,arguments);null!=k.guidePart&&q.putImageData(k.guidePart.imgData,k.guidePart.x,k.guidePart.y);return a};p();a.refresh(!0)}mxRuler.prototype.unit=mxConstants.PIXELS; +mxRuler.prototype.setUnit=function(a){this.unit=a;this.drawRuler()};mxRuler.prototype.formatText=function(a){switch(this.unit){case mxConstants.PIXELS:return Math.round(a);case mxConstants.CENTIMETERS:return(a/mxConstants.PIXELS_PER_CM).toFixed(2);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);null!=this.container&&this.container.parentNode.removeChild(this.container);this.ui.diagramContainer.style.left=this.ui.origContLeft+"px";this.ui.diagramContainer.style.top= +this.ui.origContTop+"px"};function mxDualRuler(a,c){this.editorUiRefresh=a.refresh;this.ui=a;this.origGuideMove=mxGuide.prototype.move;this.origGuideDestroy=mxGuide.prototype.destroy;this.vRuler=new mxRuler(a,c,!0);this.hRuler=new mxRuler(a,c,!1,!0)}mxDualRuler.prototype.setUnit=function(a){this.vRuler.setUnit(a);this.hRuler.setUnit(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};function mxFreehand(a){if(null!=a.container&&null!=a.container.querySelector("svg")){var c=a.container.querySelector("svg"),b=mxFreehand.prototype.NORMAL_SMOOTHING,d=null,g=[],e,k=[],m,n=!1,q=!0,f=[],l=!1,p=!1;this.setClosedPath=function(a){n=a};this.setAutoClose=function(a){q=a};this.setStopClickEnabled=function(a){p=a};this.setSmoothing=function(a){b=a};var u=function(b){l=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(){u(!0)};this.isDrawing=function(){return l};var v=mxUtils.bind(this,function(a){if(d){var b=p&&0<k.length&&null!=m&&2>m.length;b||k.push.apply(k,m);m=[];k.push(null);g.push(d);d=null;b&&this.stopDrawing();mxEvent.consume(a)}});this.stopDrawing=function(){if(0<g.length){for(var b=k[0].x,c=k[0].x,e=k[0].y,f=k[0].y,l=1;l<k.length;l++)null!=k[l]&&(b=Math.max(b,k[l].x),c=Math.min(c,k[l].x),e=Math.max(e, +k[l].y),f=Math.min(f,k[l].y));b-=c;e-=f;if(0<b&&0<e){var m=100/b,p=100/e;k.map(function(a){if(null==a)return a;a.x=(a.x-c)*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&&q&&(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,L=new mxCell("",new mxGeometry(c/t-v.x,f/t-v.y,b/t,e/t),l);L.vertex=1;a.model.beginUpdate();try{L=a.addCell(L)}finally{a.model.endUpdate()}a.fireEvent(new mxEventObject("cellsInserted","cells",[L]));a.fireEvent(new mxEventObject("freehandInserted","cell",L));setTimeout(function(){a.setSelectionCells([L])}, 10)}for(l=0;l<g.length;l++)g[l].parentNode.removeChild(g[l]);d=null;g=[];k=[]}u(!1)};mxEvent.addGestureListeners(c,function(b){if(l){var g=parseFloat(a.currentVertexStyle[mxConstants.STYLE_STROKEWIDTH]||1),g=Math.max(1,g*a.view.scale);d=document.createElementNS("http://www.w3.org/2000/svg","path");d.setAttribute("fill","none");d.setAttribute("stroke",a.currentVertexStyle[mxConstants.STYLE_STROKECOLOR]||"#000");d.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(" ");d.setAttribute("stroke-dasharray",n)}f=[];n=q(b);A(n);e="M"+n.x+" "+n.y;k.push(n);m=[];d.setAttribute("d",e);c.appendChild(d);mxEvent.consume(b)}},function(a){if(d){A(q(a));var b=z(0);if(b){e+=" L"+b.x+" "+b.y;k.push(b);var c="";m=[];for(var g=2;g<f.length;g+=2)b=z(g),c+=" L"+b.x+" "+b.y,m.push(b);d.setAttribute("d",e+c)}mxEvent.consume(a)}},y);var q=function(b){return mxUtils.convertPoint(a.container, -mxEvent.getClientX(b),mxEvent.getClientY(b))},A=function(a){for(f.push(a);f.length>b;)f.shift()},z=function(a){var c=f.length;if(1===c%2||c>=b){var d=0,e=0,g,k=0;for(g=a;g<c;g++)k++,a=f[g],d+=a.x,e+=a.y;return{x:d/k,y:e/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; +a.currentVertexStyle[mxConstants.STYLE_DASH_PATTERN]||"3 3",n=n.split(" ").map(function(a){return parseFloat(a)*g}).join(" ");d.setAttribute("stroke-dasharray",n)}f=[];n=t(b);z(n);e="M"+n.x+" "+n.y;k.push(n);m=[];d.setAttribute("d",e);c.appendChild(d);mxEvent.consume(b)}},function(a){if(d){z(t(a));var b=y(0);if(b){e+=" L"+b.x+" "+b.y;k.push(b);var c="";m=[];for(var g=2;g<f.length;g+=2)b=y(g),c+=" L"+b.x+" "+b.y,m.push(b);d.setAttribute("d",e+c)}mxEvent.consume(a)}},v);var t=function(b){return mxUtils.convertPoint(a.container, +mxEvent.getClientX(b),mxEvent.getClientY(b))},z=function(a){for(f.push(a);f.length>b;)f.shift()},y=function(a){var c=f.length;if(1===c%2||c>=b){var d=0,e=0,g,k=0;for(g=a;g<c;g++)k++,a=f[g],d+=a.x,e+=a.y;return{x:d/k,y:e/k}}return null}}}mxFreehand.prototype.NO_SMOOTHING=1;mxFreehand.prototype.MILD_SMOOTHING=4;mxFreehand.prototype.NORMAL_SMOOTHING=8;mxFreehand.prototype.VERY_SMOOTH_SMOOTHING=12;mxFreehand.prototype.SUPER_SMOOTH_SMOOTHING=16;mxFreehand.prototype.HYPER_SMOOTH_SMOOTHING=20; diff --git a/src/main/webapp/js/diagramly/App.js b/src/main/webapp/js/diagramly/App.js index 98a48ab72..0fb590259 100644 --- a/src/main/webapp/js/diagramly/App.js +++ b/src/main/webapp/js/diagramly/App.js @@ -1266,7 +1266,7 @@ App.prototype.init = function() { if (this.drive.user != null && (!isLocalStorage || mxSettings.settings == null || mxSettings.settings.closeRealtimeWarning == null || mxSettings.settings.closeRealtimeWarning < - new Date().getTime() - (4 * 24 * 60 * 60 * 1000)) && + new Date().getTime() - (2 * 24 * 60 * 60 * 1000)) && (!this.editor.chromeless || this.editor.editable)) { this.drive.checkRealtimeFiles(mxUtils.bind(this, function() diff --git a/src/main/webapp/js/diagramly/DevTools.js b/src/main/webapp/js/diagramly/DevTools.js index 04f586398..205799552 100644 --- a/src/main/webapp/js/diagramly/DevTools.js +++ b/src/main/webapp/js/diagramly/DevTools.js @@ -51,6 +51,8 @@ if (urlParams['dev'] == '1') } else { +// tip += 'pos=' + this.view.formatUnitText(parseFloat(geo.x)) + ',' + this.view.formatUnitText(parseFloat(geo.y)) + '<br>' + +// 'size=' + this.view.formatUnitText(parseFloat(geo.width)) + 'x' + this.view.formatUnitText(parseFloat(geo.height)); tip += 'pos=' + parseFloat(geo.x) + ',' + parseFloat(geo.y) + '<br>' + 'size=' + parseFloat(geo.width) + 'x' + parseFloat(geo.height); } diff --git a/src/main/webapp/js/diagramly/Devel.js b/src/main/webapp/js/diagramly/Devel.js index 1c44ecef1..c1c6103a3 100644 --- a/src/main/webapp/js/diagramly/Devel.js +++ b/src/main/webapp/js/diagramly/Devel.js @@ -126,6 +126,8 @@ mxscript(drawDevUrl + 'js/diagramly/Pages.js'); mxscript(drawDevUrl + 'js/diagramly/Trees.js'); mxscript(drawDevUrl + 'js/diagramly/Minimal.js'); mxscript(drawDevUrl + 'js/diagramly/DistanceGuides.js'); +mxscript(drawDevUrl + 'js/diagramly/mxRuler.js'); +mxscript(drawDevUrl + 'js/diagramly/mxFreehand.js'); mxscript(drawDevUrl + 'js/diagramly/DevTools.js'); // Vsdx/vssx support @@ -135,9 +137,6 @@ mxscript(drawDevUrl + 'js/diagramly/vsdx/bmpDecoder.js'); mxscript(drawDevUrl + 'js/diagramly/vsdx/importer.js'); mxscript(drawDevUrl + 'js/jszip/jszip.min.js'); -// mxRuler -mxscript(drawDevUrl + 'js/diagramly/ruler/mxRuler.js'); - //GraphMl Import mxscript(drawDevUrl + 'js/diagramly/graphml/mxGraphMlCodec.js'); @@ -146,5 +145,3 @@ if (urlParams['tableLayout'] == '1') { mxscript(drawDevUrl + 'js/diagramly/mxTableLayout.js'); } - -mxscript(drawDevUrl + 'js/diagramly/mxFreehand.js'); diff --git a/src/main/webapp/js/diagramly/Editor.js b/src/main/webapp/js/diagramly/Editor.js index 7e29f0ad0..4a753f8aa 100644 --- a/src/main/webapp/js/diagramly/Editor.js +++ b/src/main/webapp/js/diagramly/Editor.js @@ -175,6 +175,7 @@ }, {name: 'portConstraintRotation', dispName: 'Rotate Constraint', type: 'bool', defVal: false}, {name: 'connectable', dispName: 'Connectable', type: 'bool', defVal: true}, + {name: 'allowArrows', dispName: 'Allow Arrows', type: 'bool', defVal: true}, {name: 'snapToPoint', dispName: 'Snap to Point', type: 'bool', defVal: false}, {name: 'perimeter', dispName: 'Perimeter', defVal: 'none', type: 'enum', enumList: [{val: 'none', dispName: 'None'}, @@ -3716,6 +3717,55 @@ return layoutManagerGetLayout.apply(this, arguments); } + + this.updateGlobalUrlVariables(); + }; + + /** + * Updates the global variables from the vars URL parameter. + */ + Graph.prototype.updateGlobalUrlVariables = function() + { + if (urlParams['vars'] != null) + { + try + { + this.globalUrlVars = JSON.parse(decodeURIComponent(urlParams['vars'])); + } + catch (e) + { + if (window.console != null) + { + console.log('Error in vars URL parameter: ' + e); + } + } + } + }; + + /** + * Returns all global variables used for export. This function never returns null. + * This can be overridden by plugins to return global variables for export. + */ + Graph.prototype.getExportVariables = function() + { + return (this.globalUrlVars != null) ? this.globalUrlVars : {}; + }; + + /** + * Adds support for vars URL parameter. + */ + var graphGetGlobalVariable = Graph.prototype.getGlobalVariable; + + Graph.prototype.getGlobalVariable = function(name) + { + var val = graphGetGlobalVariable.apply(this, arguments); + + if (val == null && this.globalUrlVars != null) + { + val = this.globalUrlVars[name]; + } + + return val; }; /** @@ -3771,41 +3821,6 @@ return graphIsCssTransformsSupported.apply(this, arguments) && !mxClient.IS_SF; }; - /** - * Adds support for vars URL parameter. - */ - var graphGetGlobalVariable = Graph.prototype.getGlobalVariable; - - Graph.prototype.getGlobalVariable = function(name) - { - var val = graphGetGlobalVariable.apply(this, arguments); - - if (val == null) - { - if (this.globalUrlVars == null && urlParams['vars'] != null) - { - try - { - this.globalUrlVars = JSON.parse(decodeURIComponent(urlParams['vars'])); - } - catch (e) - { - if (window.console != null) - { - console.log('Error in vars URL parameter: ' + e); - } - } - } - - if (this.globalUrlVars != null) - { - val = this.globalUrlVars[name]; - } - } - - return val; - }; - /** * Adds workaround for math rendering in Chrome. * diff --git a/src/main/webapp/js/diagramly/EditorUi.js b/src/main/webapp/js/diagramly/EditorUi.js index b57e8440c..40cc8d332 100644 --- a/src/main/webapp/js/diagramly/EditorUi.js +++ b/src/main/webapp/js/diagramly/EditorUi.js @@ -931,6 +931,11 @@ fileNode.setAttribute('type', md); } + if (this.pages != null) + { + fileNode.setAttribute('pages', this.pages.length); + } + if (nonCompressed) { fileNode.setAttribute('compressed', 'false'); @@ -1742,7 +1747,8 @@ */ EditorUi.prototype.createDownloadRequest = function(filename, format, ignoreSelection, base64, transparent, currentPage, scale, border, grid) { - var bounds = this.editor.graph.getGraphBounds(); + var graph = this.editor.graph; + var bounds = graph.getGraphBounds(); // Exports only current page for images that does not contain file data, but for // the other formats with XML included or pdf with all pages, we need to send the complete data and use @@ -1782,7 +1788,7 @@ } } - var bg = this.editor.graph.background; + var bg = graph.background; if (format == 'png' && transparent) { @@ -1793,18 +1799,24 @@ bg = '#ffffff'; } + var extras = {}; + extras.globalVars = graph.getExportVariables(); + + if (grid) + { + extras.grid = { + size: graph.gridSize, + steps: graph.view.gridSteps, + color: graph.view.gridColor + } + } + return new mxXmlRequest(EXPORT_URL, 'format=' + format + range + allPages + '&bg=' + ((bg != null) ? bg : mxConstants.NONE) + '&base64=' + base64 + '&embedXml=' + embed + '&xml=' + encodeURIComponent(data) + ((filename != null) ? '&filename=' + encodeURIComponent(filename) : '') + - (grid? '&extras=' + encodeURIComponent(JSON.stringify({ - grid: { - size: this.editor.graph.gridSize, - steps: this.editor.graph.view.gridSteps, - color: this.editor.graph.view.gridColor - } - })) : '') + + '&extras=' + encodeURIComponent(JSON.stringify(extras)) + (scale != null? '&scale=' + scale : '') + (border != null? '&border=' + border : '')); }; @@ -3827,7 +3839,7 @@ /** * */ - EditorUi.prototype.createImageDataUri = function(canvas, xml, format) + EditorUi.prototype.createImageDataUri = function(canvas, xml, format, dpi) { var data = canvas.toDataURL('image/' + format); @@ -3842,17 +3854,22 @@ data = this.writeGraphModelToPng(data, 'tEXt', 'mxfile', encodeURIComponent(xml)); } + if (dpi > 0) + { + data = this.writeGraphModelToPng(data, 'pHYs', 'dpi', dpi); + } + return data; }; /** * */ - EditorUi.prototype.saveCanvas = function(canvas, xml, format, ignorePageName) + EditorUi.prototype.saveCanvas = function(canvas, xml, format, ignorePageName, dpi) { var ext = ((format == 'jpeg') ? 'jpg' : format); var filename = this.getBaseFilename(ignorePageName) + '.' + ext; - var data = this.createImageDataUri(canvas, xml, format); + var data = this.createImageDataUri(canvas, xml, format, dpi); this.saveData(filename, ext, data.substring(data.lastIndexOf(',') + 1), 'image/' + format, true); }; @@ -4476,7 +4493,8 @@ svgRoot.getElementsByTagName('defs')[0].appendChild(style); } - var svg = '<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n' + + var svg = '<?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(svgRoot); if (this.isLocalFileSave() || svg.length <= MAX_REQUEST_SIZE) @@ -6016,7 +6034,7 @@ /** * */ - EditorUi.prototype.exportImage = function(scale, transparentBackground, ignoreSelection, addShadow, editable, border, noCrop, currentPage, format, grid) + EditorUi.prototype.exportImage = function(scale, transparentBackground, ignoreSelection, addShadow, editable, border, noCrop, currentPage, format, grid, dpi) { format = (format != null) ? format : 'png'; @@ -6041,7 +6059,7 @@ { this.saveCanvas(canvas, (editable) ? this.getFileData(true, null, null, null, ignoreSelection, currentPage) : null, - format, !currentPage); + format, !currentPage, dpi); } catch (e) { @@ -8280,9 +8298,17 @@ { result = f.substring(0, pos - 8); - var chunkData = key + String.fromCharCode(0) + - ((type == 'zTXt') ? String.fromCharCode(0) : '') + - value; + if (type == 'pHYs' && key == 'dpi') + { + var dpm = Math.round(value / 0.0254); //One inch is equal to exactly 0.0254 meters. + var chunkData = writeInt(dpm) + writeInt(dpm) + String.fromCharCode(1); + } + else + { + var chunkData = key + String.fromCharCode(0) + + ((type == 'zTXt') ? String.fromCharCode(0) : '') + + value; + } var crc = 0xffffffff; crc = this.updateCRC(crc, type, 0, 4); @@ -8301,7 +8327,7 @@ while (n); return 'data:image/png;base64,' + ((window.btoa) ? btoa(result) : Base64.encode(result, true)); - } + }; /** * Extracts the XML from the compressed or non-compressed text chunk. @@ -8562,7 +8588,7 @@ printAction.setEnabled(!mxClient.IS_IOS || !navigator.standalone); printAction.visible = printAction.isEnabled(); - // Scales pages/graph to fit available size + // Installs additional keyboard shortcuts for editor if (!this.editor.chromeless || this.editor.editable) { // Defines additional hotkeys @@ -8579,249 +8605,8 @@ this.altShiftActions[83] = 'synchronize'; // Alt+Shift+S } - // Handles copy paste of images from clipboard - if (!mxClient.IS_IE) - { - graph.container.addEventListener('paste', mxUtils.bind(this, function(evt) - { - var graph = this.editor.graph; - - if (!mxEvent.isConsumed(evt)) - { - try - { - var data = (evt.clipboardData || evt.originalEvent.clipboardData); - var containsText = false; - - // Workaround for asynchronous paste event processing in textInput - // is to ignore this event if it contains text/html/rtf (see below). - // NOTE: Image is not pasted into textInput so can't listen there. - for (var i = 0; i < data.types.length; i++) - { - if (data.types[i].substring(0, 5) === 'text/') - { - containsText = true; - break; - } - } - - if (!containsText) - { - var items = data.items; - - for (index in items) - { - var item = items[index]; - - if (item.kind === 'file') - { - if (graph.isEditing()) - { - this.importFiles([item.getAsFile()], 0, 0, this.maxImageSize, function(data, mimeType, x, y, w, h) - { - // Inserts image into current text box - graph.insertImage(data, w, h); - }, function() - { - // No post processing - }, function(file) - { - // Handles only images - return file.type.substring(0, 6) == 'image/'; - }, function(queue) - { - // Invokes elements of queue in order - for (var i = 0; i < queue.length; i++) - { - queue[i](); - } - }); - } - else - { - var pt = this.editor.graph.getInsertPoint(); - this.importFiles([item.getAsFile()], pt.x, pt.y, this.maxImageSize); - mxEvent.consume(evt); - } - - break; - } - } - } - } - catch (e) - { - // ignore - } - } - }), false); - } - - // Focused but invisible textarea during control or meta key events - var textInput = document.createElement('div'); - textInput.setAttribute('autocomplete', 'off'); - textInput.setAttribute('autocorrect', 'off'); - textInput.setAttribute('autocapitalize', 'off'); - textInput.setAttribute('spellcheck', 'false'); - textInput.style.position = 'absolute'; - textInput.style.whiteSpace = 'nowrap'; - textInput.style.overflow = 'hidden'; - textInput.style.display = 'block'; - textInput.contentEditable = true; - mxUtils.setOpacity(textInput, 0); - textInput.style.width = '1px'; - textInput.style.height = '1px'; - textInput.innerHTML = ' '; - - var restoreFocus = false; - - // Disables built-in cut, copy and paste shortcuts - this.keyHandler.bindControlKey(88, null); - this.keyHandler.bindControlKey(67, null); - this.keyHandler.bindControlKey(86, null); - - // Shows a textare when control/cmd is pressed to handle native clipboard actions - mxEvent.addListener(document, 'keydown', mxUtils.bind(this, function(evt) - { - // No dialog visible - var source = mxEvent.getSource(evt); - - if (graph.container != null && graph.isEnabled() && !graph.isMouseDown && !graph.isEditing() && - this.dialog == null && source.nodeName != 'INPUT' && source.nodeName != 'TEXTAREA') - { - if (evt.keyCode == 224 /* FF */ || (!mxClient.IS_MAC && evt.keyCode == 17 /* Control */) || - (mxClient.IS_MAC && evt.keyCode == 91 /* Meta */)) - { - // Cannot use parentNode for check in IE - if (!restoreFocus) - { - // Avoid autoscroll but allow handling of all pass-through ctrl shortcuts - textInput.style.left = (graph.container.scrollLeft + 10) + 'px'; - textInput.style.top = (graph.container.scrollTop + 10) + 'px'; - - graph.container.appendChild(textInput); - restoreFocus = true; - - // Workaround for selected document content in quirks mode - if (mxClient.IS_QUIRKS) - { - window.setTimeout(function() - { - textInput.focus(); - document.execCommand('selectAll', false, null); - }, 0); - } - else - { - textInput.focus(); - document.execCommand('selectAll', false, null); - } - } - } - } - })); - - // Clears input and restores focus and selection - function clearInput() - { - window.setTimeout(function() - { - textInput.innerHTML = ' '; - textInput.focus(); - document.execCommand('selectAll', false, null); - }, 0); - }; - - mxEvent.addListener(document, 'keyup', mxUtils.bind(this, function(evt) - { - // Workaround for asynchronous event read invalid in IE quirks mode - var keyCode = evt.keyCode; - - // Asynchronous workaround for scroll to origin after paste if the - // Ctrl-key is not pressed for long enough in FF on Windows - window.setTimeout(mxUtils.bind(this, function() - { - if (restoreFocus && (keyCode == 224 /* FF */ || keyCode == 17 /* Control */ || - keyCode == 91 /* Meta */)) - { - restoreFocus = false; - - if (!graph.isEditing() && this.dialog == null && graph.container != null) - { - graph.container.focus(); - } - - textInput.parentNode.removeChild(textInput); - - // Workaround for lost cursor in focused element - if (this.dialog == null) - { - mxUtils.clearSelection(); - } - } - }), 0); - })); - - mxEvent.addListener(textInput, 'copy', mxUtils.bind(this, function(evt) - { - if (graph.isEnabled()) - { - try - { - mxClipboard.copy(graph); - this.copyCells(textInput); - clearInput(); - } - catch (e) - { - this.handleError(e); - } - } - })); - - mxEvent.addListener(textInput, 'cut', mxUtils.bind(this, function(evt) - { - if (graph.isEnabled()) - { - try - { - mxClipboard.copy(graph); - this.copyCells(textInput, true); - clearInput(); - } - catch (e) - { - this.handleError(e); - } - } - })); - - mxEvent.addListener(textInput, 'paste', mxUtils.bind(this, function(evt) - { - if (graph.isEnabled() && !graph.isCellLocked(graph.getDefaultParent())) - { - textInput.innerHTML = ' '; - textInput.focus(); - - window.setTimeout(mxUtils.bind(this, function() - { - this.pasteCells(evt, textInput); - textInput.innerHTML = ' '; - }), 0); - } - }), true); - - // Needed for IE11 - var isSelectionAllowed2 = this.isSelectionAllowed; - this.isSelectionAllowed = function(evt) - { - if (mxEvent.getSource(evt) == textInput) - { - return true; - } - - return isSelectionAllowed2.apply(this, arguments); - }; + this.installImagePasteHandler(); + this.installNativeClipboardHandler(); }; var y = Math.max(document.body.clientHeight || 0, document.documentElement.clientHeight || 0) / 2; @@ -8936,39 +8721,10 @@ })); } - //Add ruler in test mode only - //TODO add the ruler containers correctly and make the vertical one dynamic as the side panel size can change + //Add ruler with url only if (urlParams['ruler'] == '1' && typeof mxRuler !== 'undefined') { - var hRulerDiv = document.createElement('div'); - hRulerDiv.style.position = 'absolute'; - hRulerDiv.style.top = '95px'; - hRulerDiv.style.left = '250px'; - hRulerDiv.style.width = '2000px'; - hRulerDiv.style.height = '30px'; - hRulerDiv.style.background = 'whiteSmoke'; - document.body.appendChild(hRulerDiv); - - var vRulerDiv = document.createElement('div'); - vRulerDiv.style.position = 'absolute'; - vRulerDiv.style.top = '125px'; - vRulerDiv.style.left = '220px'; - vRulerDiv.style.width = '30px'; - vRulerDiv.style.height = '1000px'; - vRulerDiv.style.background = 'whiteSmoke'; - document.body.appendChild(vRulerDiv); - - var square = document.createElement('div'); - square.style.position = 'absolute'; - square.style.top = '95px'; - square.style.left = '220px'; - square.style.width = '30px'; - square.style.height = '30px'; - square.style.background = 'whiteSmoke'; - document.body.appendChild(square); - - this.vRuler = new mxRuler(this.editor.graph, vRulerDiv, true); - this.hRuler = new mxRuler(this.editor.graph, hRulerDiv, false); + this.ruler = new mxDualRuler(this, this.editor.graph.view.unit); } // Adds an element to edit the style in the footer in test mode @@ -9217,6 +8973,263 @@ this.installSettings(); }; + + /** + * Installs handler for pasting image from clipboard. + */ + EditorUi.prototype.installImagePasteHandler = function() + { + if (!mxClient.IS_IE) + { + var graph = this.editor.graph; + + graph.container.addEventListener('paste', mxUtils.bind(this, function(evt) + { + if (!mxEvent.isConsumed(evt)) + { + try + { + var data = (evt.clipboardData || evt.originalEvent.clipboardData); + var containsText = false; + + // Workaround for asynchronous paste event processing in textInput + // is to ignore this event if it contains text/html/rtf (see below). + // NOTE: Image is not pasted into textInput so can't listen there. + for (var i = 0; i < data.types.length; i++) + { + if (data.types[i].substring(0, 5) === 'text/') + { + containsText = true; + break; + } + } + + if (!containsText) + { + var items = data.items; + + for (index in items) + { + var item = items[index]; + + if (item.kind === 'file') + { + if (graph.isEditing()) + { + this.importFiles([item.getAsFile()], 0, 0, this.maxImageSize, function(data, mimeType, x, y, w, h) + { + // Inserts image into current text box + graph.insertImage(data, w, h); + }, function() + { + // No post processing + }, function(file) + { + // Handles only images + return file.type.substring(0, 6) == 'image/'; + }, function(queue) + { + // Invokes elements of queue in order + for (var i = 0; i < queue.length; i++) + { + queue[i](); + } + }); + } + else + { + var pt = this.editor.graph.getInsertPoint(); + this.importFiles([item.getAsFile()], pt.x, pt.y, this.maxImageSize); + mxEvent.consume(evt); + } + + break; + } + } + } + } + catch (e) + { + // ignore + } + } + }), false); + } + }; + + /** + * Installs the native clipboard support. + */ + EditorUi.prototype.installNativeClipboardHandler = function() + { + var graph = this.editor.graph; + + // Focused but invisible textarea during control or meta key events + var textInput = document.createElement('div'); + textInput.setAttribute('autocomplete', 'off'); + textInput.setAttribute('autocorrect', 'off'); + textInput.setAttribute('autocapitalize', 'off'); + textInput.setAttribute('spellcheck', 'false'); + textInput.style.position = 'absolute'; + textInput.style.whiteSpace = 'nowrap'; + textInput.style.overflow = 'hidden'; + textInput.style.display = 'block'; + textInput.contentEditable = true; + mxUtils.setOpacity(textInput, 0); + textInput.style.width = '1px'; + textInput.style.height = '1px'; + textInput.innerHTML = ' '; + + var restoreFocus = false; + + // Disables built-in cut, copy and paste shortcuts + this.keyHandler.bindControlKey(88, null); + this.keyHandler.bindControlKey(67, null); + this.keyHandler.bindControlKey(86, null); + + // Shows a textare when control/cmd is pressed to handle native clipboard actions + mxEvent.addListener(document, 'keydown', mxUtils.bind(this, function(evt) + { + // No dialog visible + var source = mxEvent.getSource(evt); + + if (graph.container != null && graph.isEnabled() && !graph.isMouseDown && !graph.isEditing() && + this.dialog == null && source.nodeName != 'INPUT' && source.nodeName != 'TEXTAREA') + { + if (evt.keyCode == 224 /* FF */ || (!mxClient.IS_MAC && evt.keyCode == 17 /* Control */) || + (mxClient.IS_MAC && evt.keyCode == 91 /* Meta */)) + { + // Cannot use parentNode for check in IE + if (!restoreFocus) + { + // Avoid autoscroll but allow handling of all pass-through ctrl shortcuts + textInput.style.left = (graph.container.scrollLeft + 10) + 'px'; + textInput.style.top = (graph.container.scrollTop + 10) + 'px'; + + graph.container.appendChild(textInput); + restoreFocus = true; + + // Workaround for selected document content in quirks mode + if (mxClient.IS_QUIRKS) + { + window.setTimeout(function() + { + textInput.focus(); + document.execCommand('selectAll', false, null); + }, 0); + } + else + { + textInput.focus(); + document.execCommand('selectAll', false, null); + } + } + } + } + })); + + // Clears input and restores focus and selection + function clearInput() + { + window.setTimeout(function() + { + textInput.innerHTML = ' '; + textInput.focus(); + document.execCommand('selectAll', false, null); + }, 0); + }; + + mxEvent.addListener(document, 'keyup', mxUtils.bind(this, function(evt) + { + // Workaround for asynchronous event read invalid in IE quirks mode + var keyCode = evt.keyCode; + + // Asynchronous workaround for scroll to origin after paste if the + // Ctrl-key is not pressed for long enough in FF on Windows + window.setTimeout(mxUtils.bind(this, function() + { + if (restoreFocus && (keyCode == 224 /* FF */ || keyCode == 17 /* Control */ || + keyCode == 91 /* Meta */)) + { + restoreFocus = false; + + if (!graph.isEditing() && this.dialog == null && graph.container != null) + { + graph.container.focus(); + } + + textInput.parentNode.removeChild(textInput); + + // Workaround for lost cursor in focused element + if (this.dialog == null) + { + mxUtils.clearSelection(); + } + } + }), 0); + })); + + mxEvent.addListener(textInput, 'copy', mxUtils.bind(this, function(evt) + { + if (graph.isEnabled()) + { + try + { + mxClipboard.copy(graph); + this.copyCells(textInput); + clearInput(); + } + catch (e) + { + this.handleError(e); + } + } + })); + + mxEvent.addListener(textInput, 'cut', mxUtils.bind(this, function(evt) + { + if (graph.isEnabled()) + { + try + { + mxClipboard.copy(graph); + this.copyCells(textInput, true); + clearInput(); + } + catch (e) + { + this.handleError(e); + } + } + })); + + mxEvent.addListener(textInput, 'paste', mxUtils.bind(this, function(evt) + { + if (graph.isEnabled() && !graph.isCellLocked(graph.getDefaultParent())) + { + textInput.innerHTML = ' '; + textInput.focus(); + + window.setTimeout(mxUtils.bind(this, function() + { + this.pasteCells(evt, textInput); + textInput.innerHTML = ' '; + }), 0); + } + }), true); + + // Needed for IE11 + var isSelectionAllowed2 = this.isSelectionAllowed; + this.isSelectionAllowed = function(evt) + { + if (mxEvent.getSource(evt) == textInput) + { + return true; + } + + return isSelectionAllowed2.apply(this, arguments); + }; + }; /** * @@ -12177,7 +12190,7 @@ ExportDialog.showXmlOption = false; ExportDialog.showGifOption = false; - ExportDialog.exportFile = function(editorUi, name, format, bg, s, b) + ExportDialog.exportFile = function(editorUi, name, format, bg, s, b, dpi) { var graph = editorUi.editor.graph; @@ -12207,21 +12220,27 @@ if (format == 'png') { editorUi.exportImage(s, bg == null || bg == 'none', true, - false, false, b, true, false); + false, false, b, true, false, null, null, dpi); } else { editorUi.exportImage(s, false, true, - false, false, b, true, false, 'jpeg'); + false, false, b, true, false, 'jpeg', null, dpi); } } else { + var extras = { + globalVars: graph.getExportVariables() + }; + editorUi.saveRequest(name, format, function(newTitle, base64) { return new mxXmlRequest(EXPORT_URL, 'format=' + format + '&base64=' + (base64 || '0') + ((newTitle != null) ? '&filename=' + encodeURIComponent(newTitle) : '') + + '&extras=' + encodeURIComponent(JSON.stringify(extras)) + + (dpi > 0? '&dpi=' + dpi : '') + '&bg=' + ((bg != null) ? bg : 'none') + '&w=' + w + '&h=' + h + '&border=' + b + '&xml=' + encodeURIComponent(data)); }); diff --git a/src/main/webapp/js/diagramly/Menus.js b/src/main/webapp/js/diagramly/Menus.js index 325132495..021865eb0 100644 --- a/src/main/webapp/js/diagramly/Menus.js +++ b/src/main/webapp/js/diagramly/Menus.js @@ -981,41 +981,6 @@ menu.addSeparator(parent); this.addSubmenu('testDevelop', menu, parent); } - - if (urlParams['ruler'] == '1') - { - mxResources.parse('rulerInch=Ruler unit: Inches'); - - editorUi.actions.addAction('rulerInch', mxUtils.bind(this, function() - { - editorUi.vRuler.setUnit(mxRuler.prototype.INCHES); - editorUi.hRuler.setUnit(mxRuler.prototype.INCHES); - editorUi.vRuler.drawRuler(true); - editorUi.hRuler.drawRuler(true); - })); - - mxResources.parse('rulerCM=Ruler unit: CMs'); - - editorUi.actions.addAction('rulerCM', mxUtils.bind(this, function() - { - editorUi.vRuler.setUnit(mxRuler.prototype.CENTIMETER); - editorUi.hRuler.setUnit(mxRuler.prototype.CENTIMETER); - editorUi.vRuler.drawRuler(true); - editorUi.hRuler.drawRuler(true); - })); - - mxResources.parse('rulerPixel=Ruler unit: Pixels'); - - editorUi.actions.addAction('rulerPixel', mxUtils.bind(this, function() - { - editorUi.vRuler.setUnit(mxRuler.prototype.PIXELS); - editorUi.hRuler.setUnit(mxRuler.prototype.PIXELS); - editorUi.vRuler.drawRuler(true); - editorUi.hRuler.drawRuler(true); - })); - - this.addMenuItems(menu, ['-', 'rulerInch', 'rulerCM', 'rulerPixel'], parent); - } }))); // Only visible in test mode @@ -2991,6 +2956,28 @@ 'scrollbars', 'tooltips', '-', 'grid', 'guides'], parent); + if (urlParams['ruler'] == '1') + { + mxResources.parse('ruler=Ruler'); + + var rulerAction = editorUi.actions.addAction('ruler', function() + { + if (editorUi.ruler != null) + { + editorUi.ruler.destroy(); + editorUi.ruler = null; + } + else + { + editorUi.ruler = new mxDualRuler(editorUi, editorUi.editor.graph.view.unit); + } + }); + rulerAction.setToggleAction(true); + rulerAction.setSelectedCallback(function() { return editorUi.ruler != null; }); + + this.addMenuItem(menu, 'ruler', parent); + } + if (mxClient.IS_SVG && (document.documentMode == null || document.documentMode > 9)) { this.addMenuItem(menu, 'shadowVisible', parent); diff --git a/src/main/webapp/js/diagramly/mxRuler.js b/src/main/webapp/js/diagramly/mxRuler.js new file mode 100644 index 000000000..a54179d6e --- /dev/null +++ b/src/main/webapp/js/diagramly/mxRuler.js @@ -0,0 +1,420 @@ +/** + * Copyright (c) 2017, CTI LOGIC + * Copyright (c) 2006-2017, JGraph Ltd + * Copyright (c) 2006-2017, Gaudenz Alder + * + * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +function mxRuler(editorUi, unit, isVertical, isSecondery) +{ + var RULER_THIKNESS = 30; + var ruler = this; + this.unit = unit; + //create the container + var container = document.createElement('div'); + container.style.position = 'absolute'; + container.style.background = 'whiteSmoke'; + document.body.appendChild(container); + mxEvent.disableContextMenu(container); + + function resizeRulerContainer() + { + container.style.top = editorUi.origContTop + 'px'; + container.style.left = editorUi.origContLeft + 'px'; + container.style.width = (isVertical? RULER_THIKNESS : editorUi.origContWidth) + 'px'; + container.style.height = (isVertical? editorUi.origContHeight : RULER_THIKNESS) + 'px'; + }; + + this.editorUiRefresh = editorUi.refresh; + + editorUi.refresh = function(minor) + { + //If it is called with true, then only our added code is executed + if (minor != true) + { + ruler.editorUiRefresh.apply(editorUi, arguments); + } + + var cont = editorUi.diagramContainer; + + if (!isSecondery) + { + editorUi.origContTop = cont.offsetTop; + editorUi.origContLeft = cont.offsetLeft; + editorUi.origContWidth = cont.offsetWidth; + editorUi.origContHeight = cont.offsetHeight; + } + + resizeRulerContainer(); + + if (isVertical) + { + cont.style.left = (cont.offsetLeft + RULER_THIKNESS) + 'px'; + } + else + { + cont.style.top = (cont.offsetTop + RULER_THIKNESS) + 'px'; + } + }; + + resizeRulerContainer(); + + var canvas = document.createElement("canvas"); + //initial sizing which is corrected by the graph size event + canvas.width = container.offsetWidth; + canvas.height = container.offsetHeight; + container.style.overflow = 'hidden'; + canvas.style.position = "relative"; + container.appendChild(canvas); + //Disable alpha to improve performance as we don't need it + var ctx = canvas.getContext("2d", window.uiTheme == 'dark'? {alpha: false} : null); + this.ui = editorUi; + var graph = editorUi.editor.graph; + this.graph = graph; + this.container = container; + this.canvas = canvas; + + var drawLine = function (x1, y1, x2, y2, text) + { + //remove all fractions + x1 = Math.round(x1); y1 = Math.round(y1); x2 = Math.round(x2); y2 = Math.round(y2); + //adding the 0.5 is necessary to prevent anti-aliasing from making lines thicker! + ctx.beginPath(); + ctx.moveTo(x1 + 0.5, y1 + 0.5); + ctx.lineTo(x2 + 0.5, y2 + 0.5); + ctx.stroke(); + + if (text) + { + if (isVertical) + { + var x = x1; + var y = y1 - 3; + var metric = ctx.measureText(text); + + ctx.save(); + + // We want to find the center of the text (or whatever point you want) and rotate about it + var tx = x + (metric.width / 2) + 8; + var ty = y + 5; + + // Translate to near the center to rotate about the center + ctx.translate(tx, ty); + // Then rotate... + ctx.rotate(-Math.PI / 2); + // Then translate back to draw in the right place! + ctx.translate(-tx, -ty); + ctx.fillText(text, x, y); + ctx.restore(); + } + else + { + ctx.fillText(text, isVertical? x1 : x1 + 3, isVertical? y1 - 3 : y1 + 9); + } + } + }; + + var drawRuler = function() + { + ctx.clearRect(0, 0, canvas.width, canvas.height); + + ctx.beginPath(); + ctx.lineWidth = 0.7; + ctx.strokeStyle = "#BBBBBB"; + ctx.setLineDash([]); + ctx.font = "9px Arial"; + ctx.fillStyle = '#BBBBBB'; + + ctx.beginPath(); + ctx.moveTo(0, 0); + ctx.lineTo(RULER_THIKNESS, RULER_THIKNESS); + ctx.stroke(); + + var scale = graph.view.scale; + var bgPages = graph.view.getBackgroundPageBounds(); + var t = graph.view.translate; + var bounds = graph.view.getGraphBounds(); + + var rStart = (isVertical? bgPages.y - graph.container.scrollTop : bgPages.x - graph.container.scrollLeft); + + //handle negative pages + if (isVertical) + { + var y = ((bounds.y) / scale - t.y); + + if (y <= -1) + { + rStart += Math.ceil(Math.abs(y) / graph.pageFormat.height) * graph.pageFormat.height * scale; + } + } + else + { + var x = ((bounds.x) / scale - t.x); + + if (x <= -1) + { + rStart += Math.ceil(Math.abs(x) / graph.pageFormat.width) * graph.pageFormat.width * scale; + } + } + + rStart += isVertical? (graph.container.offsetTop - ruler.container.offsetTop) : (graph.container.offsetLeft - ruler.container.offsetLeft); + + var tickStep, tickSize, len; + + switch(ruler.unit) + { + case mxConstants.PIXELS: + len = 10; + tickStep = 10; + tickSize = [25,5,5,5,5,10,5,5,5,5]; + break; + case mxConstants.CENTIMETERS: + len = 10; + tickStep = mxConstants.PIXELS_PER_CM / len; + tickSize = [25,5,5,5,5,10,5,5,5,5]; + break; + case mxConstants.INCHES: + if (scale <=0.5 || scale >=4) + len = 8; + else + len = 16; + + tickStep = mxConstants.PIXELS_PER_INCH / len; + tickSize = [25,5,8,5,12,5,8,5,15,5,8,5,12,5,8,5]; + break; + } + + var step = tickStep; + + if (ruler.unit != mxConstants.INCHES || (scale > 2 || scale < 0.25)) + step = scale>= 1 ? (tickStep / Math.floor(scale)) : Math.floor(10 / scale / 10) * 10; + + for (var i = RULER_THIKNESS + rStart % (step * scale); i <= (isVertical? canvas.height : canvas.width); i += step * scale) + { + var current = Math.round((i - rStart) / scale / step); + var text = null; + + if (current % len == 0) + { + text = ruler.formatText(current * step) + ""; + } + + if (isVertical) + { + drawLine(RULER_THIKNESS - tickSize[Math.abs(current) % len], i, RULER_THIKNESS, i, text); + } + else + { + drawLine(i, RULER_THIKNESS - tickSize[Math.abs(current) % len], i, RULER_THIKNESS, text); + } + } + }; + + var sizeListener = function() + { + var div = graph.container; + + if (isVertical) + { + var newH = div.offsetHeight + RULER_THIKNESS; + + if (canvas.height != newH) + { + canvas.height = newH; + container.style.height = newH + 'px'; + drawRuler(); + } + } + else + { + var newW = div.offsetWidth + RULER_THIKNESS; + + if (canvas.width != newW) + { + canvas.width = newW; + container.style.width = newW + 'px'; + drawRuler(); + } + } + }; + + this.drawRuler = drawRuler; + + var efficientSizeListener = debounce(sizeListener, 10); + this.sizeListener = efficientSizeListener; + + var efficientScrollListener = debounce(function() + { + var newScroll = isVertical? graph.container.scrollTop : graph.container.scrollLeft; + + if (ruler.lastScroll != newScroll) + { + ruler.lastScroll = newScroll; + drawRuler(); + } + }, 10); + + this.scrollListener = efficientScrollListener; + this.unitListener = function(sender, evt) + { + ruler.setUnit(evt.getProperty('unit')); + }; + + graph.addListener(mxEvent.SIZE, efficientSizeListener); + graph.container.addEventListener("scroll", efficientScrollListener); + graph.view.addListener("unitChanged", this.unitListener); + + function debounce(func, wait, immediate) + { + var timeout; + return function() { + var context = this, args = arguments; + var later = function() { + timeout = null; + if (!immediate) func.apply(context, args); + }; + var callNow = immediate && !timeout; + clearTimeout(timeout); + timeout = setTimeout(later, wait); + if (callNow) func.apply(context, args); + }; + }; + + //Showing guides on cell move + this.origGuideMove = mxGuide.prototype.move; + + mxGuide.prototype.move = function (bounds, delta, gridEnabled, clone) + { + if (ruler.guidePart != null) + { + ctx.putImageData(ruler.guidePart.imgData, ruler.guidePart.x, ruler.guidePart.y); + } + + var ret = ruler.origGuideMove.apply(this, arguments); + + var x, y, imgData; + ctx.lineWidth = 0.5; + ctx.strokeStyle = "#0000BB"; + ctx.setLineDash([2]); + + if (isVertical) + { + y = bounds.y + ret.y + RULER_THIKNESS - this.graph.container.scrollTop; + x = 0; + imgData = ctx.getImageData(x, y, RULER_THIKNESS, 5); + drawLine(x, y, RULER_THIKNESS, y); + } + else + { + var y = 0; + var x = bounds.x + ret.x + RULER_THIKNESS - this.graph.container.scrollLeft; + imgData = ctx.getImageData(x , y, 5, RULER_THIKNESS); + drawLine(x, y, x, RULER_THIKNESS); + } + + if (ruler.guidePart == null || ruler.guidePart.x != x || ruler.guidePart.y != y) + { + ruler.guidePart = { + imgData: imgData, + x: x, + y: y + } + } + + return ret; + } + + this.origGuideDestroy = mxGuide.prototype.destroy; + + mxGuide.prototype.destroy = function() + { + var ret = ruler.origGuideDestroy.apply(this, arguments); + + if (ruler.guidePart != null) + { + ctx.putImageData(ruler.guidePart.imgData, ruler.guidePart.x, ruler.guidePart.y); + } + + return ret; + }; + + drawRuler(); + editorUi.refresh(true); +}; + +mxRuler.prototype.unit = mxConstants.PIXELS; + +mxRuler.prototype.setUnit = function(unit) +{ + this.unit = unit; + this.drawRuler(); +}; + +mxRuler.prototype.formatText = function(pixels) +{ + switch(this.unit) + { + case mxConstants.PIXELS: + return Math.round(pixels); + case mxConstants.CENTIMETERS: + return (pixels / mxConstants.PIXELS_PER_CM).toFixed(2); + case mxConstants.INCHES: + return (pixels / 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); + + if (this.container != null) + { + this.container.parentNode.removeChild(this.container); + } + + this.ui.diagramContainer.style.left = this.ui.origContLeft + 'px'; + this.ui.diagramContainer.style.top = this.ui.origContTop + 'px'; +}; + +function mxDualRuler(editorUi, unit) +{ + this.editorUiRefresh = editorUi.refresh; + this.ui = editorUi; + this.origGuideMove = mxGuide.prototype.move; + this.origGuideDestroy = mxGuide.prototype.destroy; + + this.vRuler = new mxRuler(editorUi, unit, true); + this.hRuler = new mxRuler(editorUi, unit, false, true); +}; + +mxDualRuler.prototype.setUnit = function(unit) +{ + this.vRuler.setUnit(unit); + this.hRuler.setUnit(unit); +}; + +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; +}; \ No newline at end of file diff --git a/src/main/webapp/js/diagramly/vsdx/VsdxExport.js b/src/main/webapp/js/diagramly/vsdx/VsdxExport.js index 6d7b2d5ae..a8df6d0cd 100644 --- a/src/main/webapp/js/diagramly/vsdx/VsdxExport.js +++ b/src/main/webapp/js/diagramly/vsdx/VsdxExport.js @@ -686,7 +686,7 @@ function VsdxExport(editorUi) function writeXmlDoc2Zip(zip, name, xmlDoc, noHeader) { - zip.file(name, (noHeader? "" : "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>") + mxUtils.getXml(xmlDoc)); + zip.file(name, (noHeader? "" : "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>") + mxUtils.getXml(xmlDoc, '\n')); }; function addPagesXML(zip, pages, modelsAttr) diff --git a/src/main/webapp/js/diagramly/vsdx/mxVsdxCanvas2D.js b/src/main/webapp/js/diagramly/vsdx/mxVsdxCanvas2D.js index 34dc77ed5..e7fc1424a 100644 --- a/src/main/webapp/js/diagramly/vsdx/mxVsdxCanvas2D.js +++ b/src/main/webapp/js/diagramly/vsdx/mxVsdxCanvas2D.js @@ -877,7 +877,9 @@ mxVsdxCanvas2D.prototype.text = function(x, y, w, h, str, align, valign, wrap, f pStyle = pStyle || {}; for (var i=0; i<ch.length; i++) { - if (ch[i].nodeType == 3) + var curCh = ch[i]; + + if (curCh.nodeType == 3) { //#text var fontStyle = that.cellState.style["fontStyle"]; var styleMap = { @@ -890,14 +892,22 @@ mxVsdxCanvas2D.prototype.text = function(x, y, w, h, str, align, valign, wrap, f underline: pStyle['underline'] || (fontStyle & 4) }; + var brNext = false; + + if (i + 1 < ch.length && ch[i + 1].nodeName.toUpperCase() == 'BR') + { + brNext = true; + i++; + } + //VSDX doesn't have numbered list! - createTextRow(styleMap, charSect, pSect, text, (pStyle['OL']? pStyle['LiIndex'] + '. ' : '') + ch[i].textContent); + createTextRow(styleMap, charSect, pSect, text, (pStyle['OL']? pStyle['LiIndex'] + '. ' : '') + curCh.textContent + (brNext? '\n' : '')); } - else if (ch[i].nodeType == 1) + else if (curCh.nodeType == 1) { //element - var nodeName = ch[i].nodeName.toUpperCase(); - var chLen = ch[i].childNodes.length; - var style = window.getComputedStyle(ch[i], null); + var nodeName = curCh.nodeName.toUpperCase(); + var chLen = curCh.childNodes.length; + var style = window.getComputedStyle(curCh, null); var styleMap = { bold: style.getPropertyValue('font-weight') == 'bold' || pStyle['bold'], italic: style.getPropertyValue('font-style') == 'italic' || pStyle['italic'], @@ -936,7 +946,7 @@ mxVsdxCanvas2D.prototype.text = function(x, y, w, h, str, align, valign, wrap, f if (chLen > 0) { - processNodeChildren(ch[i].childNodes, styleMap); + processNodeChildren(curCh.childNodes, styleMap); //Close the UL by adding another pp with no Vullets if (nodeName == "UL") @@ -957,7 +967,7 @@ mxVsdxCanvas2D.prototype.text = function(x, y, w, h, str, align, valign, wrap, f else { //VSDX doesn't have numbered list! - createTextRow(styleMap, charSect, pSect, text, (pStyle['OL']? pStyle['LiIndex'] + '. ' : '') + ch[i].textContent); + createTextRow(styleMap, charSect, pSect, text, (pStyle['OL']? pStyle['LiIndex'] + '. ' : '') + curCh.textContent); } } } diff --git a/src/main/webapp/js/extensions.min.js b/src/main/webapp/js/extensions.min.js index 0e8629b1f..35dafa59e 100644 --- a/src/main/webapp/js/extensions.min.js +++ b/src/main/webapp/js/extensions.min.js @@ -1,78 +1,78 @@ LucidImporter={}; (function(){function c(a){var b=null!=a.Text?a.Text:null!=a.Value?a.Value:a.Lane_0;null==b&&null!=a.State?null!=a.State.t&&(b=a.State):null==b&&null!=a.Note?null!=a.Note.t&&(b=a.Note):null==b&&null!=a.Title?null!=a.Title.t&&(b=a.Title):null!=a.t&&(b=a);null==b&&null!=a.TextAreas&&null!=a.TextAreas.Text&&null!=a.TextAreas.Text.Value&&null!=a.TextAreas.Text.Value.t&&(b=a.TextAreas.Text.Value);if(null!=b){if(null!=b.t)return b.t=b.t.replace(/</g,"<"),b.t=b.t.replace(/>/g,">"),b.t;if(null!=b.Value&& -null!=b.Value.t)return b.Value.t=b.Value.t.replace(/</g,"<"),b.Value.t=b.Value.t.replace(/>/g,">"),b.Value.t}return""}function n(a){return null!=a.Action?a.Action:a}function m(a){if(null!=a.Text){if(null!=a.Text.m)return a.Text.m}else if(null!=a.TextAreas){if(null!=a.TextAreas.Text&&null!=a.TextAreas.Text.Value&&null!=a.TextAreas.Text.Value.m)return a.TextAreas.Text.Value.m}else if(null!=a.m)return a.m;return null}function k(c){return b(c)+a(c)+d(c)+h(c)+p(c)+z(c)+y(c)+x(c)+C(c)+F(c)}function f(a, +null!=b.Value.t)return b.Value.t=b.Value.t.replace(/</g,"<"),b.Value.t=b.Value.t.replace(/>/g,">"),b.Value.t}return""}function n(a){return null!=a.Action?a.Action:a}function m(a){if(null!=a.Text){if(null!=a.Text.m)return a.Text.m}else if(null!=a.TextAreas){if(null!=a.TextAreas.Text&&null!=a.TextAreas.Text.Value&&null!=a.TextAreas.Text.Value.m)return a.TextAreas.Text.Value.m}else if(null!=a.m)return a.m;return null}function k(c){return b(c)+a(c)+d(c)+h(c)+p(c)+y(c)+z(c)+x(c)+C(c)+F(c)}function f(a, b,d,h){var p="";null==a||""==a||a.endsWith(";")||(p=";");return p+=e(mxConstants.STYLE_FONTSIZE,a,b,d,h)+e(mxConstants.STYLE_FONTCOLOR,a,b,d,h)+e(mxConstants.STYLE_FONTSTYLE,a,b,d,h)+e(mxConstants.STYLE_ALIGN,a,b,d,h)+e(mxConstants.STYLE_SPACING_LEFT,a,b,d,h)+e(mxConstants.STYLE_SPACING_RIGHT,a,b,d,h)+e(mxConstants.STYLE_SPACING_TOP,a,b,d,h)+e(mxConstants.STYLE_SPACING_BOTTOM,a,b,d,h)+e(mxConstants.STYLE_SPACING,a,b,d,h)+e(mxConstants.STYLE_VERTICAL_ALIGN,a,b,d,h)+e(mxConstants.STYLE_STROKECOLOR, a,b,d,h)+e(mxConstants.STYLE_OPACITY,a,b,d,h)+e(mxConstants.STYLE_ROUNDED,a,b,d,h)+e(mxConstants.STYLE_ROTATION,a,b,d,h)+e(mxConstants.STYLE_FLIPH,a,b,d,h)+e(mxConstants.STYLE_FLIPV,a,b,d,h)+e(mxConstants.STYLE_SHADOW,a,b,d,h)+e(mxConstants.STYLE_FILLCOLOR,a,b,d,h)+e(mxConstants.STYLE_DASHED,a,b,d,h)+e(mxConstants.STYLE_STROKEWIDTH,a,b,d,h)+e(mxConstants.STYLE_IMAGE,a,b,d,h)}function e(c,e,f,k,g){a:{if(null!=e&&null!=c){if(e.includes(";"+c+"=")){e=!0;break a}if(e.substring(0,c.length+1)==c+"="){e= -!0;break a}}e=!1}if(!e)switch(c){case mxConstants.STYLE_FONTSIZE:return b(f);case mxConstants.STYLE_FONTCOLOR:return a(f);case mxConstants.STYLE_FONTSTYLE:return d(f);case mxConstants.STYLE_ALIGN:return h(f);case mxConstants.STYLE_SPACING_LEFT:return p(f);case mxConstants.STYLE_SPACING_RIGHT:return z(f);case mxConstants.STYLE_SPACING_TOP:return y(f);case mxConstants.STYLE_SPACING_BOTTOM:return x(f);case mxConstants.STYLE_SPACING:return C(f);case mxConstants.STYLE_VERTICAL_ALIGN:return F(f);case mxConstants.STYLE_STROKECOLOR:return A(f, -k);case mxConstants.STYLE_OPACITY:return B(f,k,g);case mxConstants.STYLE_ROUNDED:return k=!g.edge&&null!=f.Rounding&&0<f.Rounding?"rounded=1;absoluteArcSize=1;arcSize="+.6*f.Rounding+";":"",k;case mxConstants.STYLE_ROTATION:a:{if(null!=f.Rotation&&(c=mxUtils.toDegree(parseFloat(f.Rotation)),"AdvancedSwimLaneBlockRotated"==k.Class?(c+=90,g.geometry.rotate90()):0<=mxUtils.indexOf(Xb,k.Class)?(c-=90,g.geometry.rotate90(),g.geometry.rotate90(),g.geometry.rotate90()):0<=mxUtils.indexOf(La,k.Class)&&(c+= +!0;break a}}e=!1}if(!e)switch(c){case mxConstants.STYLE_FONTSIZE:return b(f);case mxConstants.STYLE_FONTCOLOR:return a(f);case mxConstants.STYLE_FONTSTYLE:return d(f);case mxConstants.STYLE_ALIGN:return h(f);case mxConstants.STYLE_SPACING_LEFT:return p(f);case mxConstants.STYLE_SPACING_RIGHT:return y(f);case mxConstants.STYLE_SPACING_TOP:return z(f);case mxConstants.STYLE_SPACING_BOTTOM:return x(f);case mxConstants.STYLE_SPACING:return C(f);case mxConstants.STYLE_VERTICAL_ALIGN:return F(f);case mxConstants.STYLE_STROKECOLOR:return A(f, +k);case mxConstants.STYLE_OPACITY:return B(f,k,g);case mxConstants.STYLE_ROUNDED:return k=!g.edge&&null!=f.Rounding&&0<f.Rounding?"rounded=1;absoluteArcSize=1;arcSize="+.6*f.Rounding+";":"",k;case mxConstants.STYLE_ROTATION:a:{if(null!=f.Rotation&&(c=mxUtils.toDegree(parseFloat(f.Rotation)),"AdvancedSwimLaneBlockRotated"==k.Class?(c+=90,g.geometry.rotate90()):0<=mxUtils.indexOf(Xb,k.Class)?(c-=90,g.geometry.rotate90(),g.geometry.rotate90(),g.geometry.rotate90()):0<=mxUtils.indexOf(bb,k.Class)&&(c+= 180,g.geometry.rotate90(),g.geometry.rotate90()),0!=c)){k="rotation="+c+";";break a}k=""}return k;case mxConstants.STYLE_FLIPH:return k=f.FlipX?"flipH=1;":"",k;case mxConstants.STYLE_FLIPV:return k=f.FlipY?"flipV=1;":"",k;case mxConstants.STYLE_SHADOW:return G(f);case mxConstants.STYLE_FILLCOLOR:return D(f,k);case mxConstants.STYLE_DASHED:return Z(f);case mxConstants.STYLE_STROKEWIDTH:return X(f);case mxConstants.STYLE_IMAGE:return k="ImageSearchBlock2"==k.Class?"image="+f.URL+";":"UserImage2Block"== k.Class&&null!=f.ImageFillProps&&null!=f.ImageFillProps.url?"image="+f.ImageFillProps.url+";":"",k}return""}function b(a){a=m(a);if(null!=a)for(var b=0;b<a.length;){var d=a[b];if("s"==d.n&&null!=d.v)return"fontSize="+Math.round(.6*d.v)+";";b++}return"fontSize=11;"}function a(a){a=m(a);if(null!=a)for(var b=0;b<a.length;){var d=a[b];if("c"==d.n&&null!=d.v)return a=d.v,"#"!=a.charAt(0)&&(a="#"+a),a=a.substring(0,7),mxConstants.STYLE_FONTCOLOR+"="+a+";";b++}return""}function d(a){a=m(a);if(null!=a){var b= 0,d=!1;if(null!=a)for(var h=0;!d&&h<a.length;){var p=a[h];"b"==p.n&&null!=p.v&&p.v&&(d=!0,b+=1);h++}d=!1;if(null!=a)for(h=0;!d&&h<a.length;)p=a[h],"i"==p.n&&null!=p.v&&p.v&&(d=!0,b+=2),h++;d=!1;if(null!=a)for(h=0;!d&&h<a.length;)p=a[h],"u"==p.n&&null!=p.v&&p.v&&(d=!0,b+=4),h++;if(0<b)return"fontStyle="+b+";"}return""}function h(a){a=m(a);if(null!=a)for(var b=0;b<a.length;){var d=a[b];if("a"==d.n&&null!=d.v)return"align="+d.v+";";b++}return""}function p(a){var b=m(a);if(null!=b)for(var d=0;d<b.length;){var p= -b[d];if(null!=p.v){if("il"==p.n)return"spacingLeft="+.6*p.v+";";h(a)}d++}return""}function z(a){a=m(a);if(null!=a)for(var b=0;b<a.length;){var d=a[b];if("ir"==d.n&&null!=d.v)return"spacingRight="+d.v+";";b++}return""}function y(a){a=m(a);if(null!=a)for(var b=0;b<a.length;){var d=a[b];if("mt"==d.n&&null!=d.v)return"spacingTop="+d.v+";";b++}return""}function x(a){a=m(a);if(null!=a)for(var b=0;b<a.length;){var d=a[b];if("mb"==d.n&&null!=d.v)return"spacingBottom="+d.v+";";b++}return""}function C(a){return"number"=== +b[d];if(null!=p.v){if("il"==p.n)return"spacingLeft="+.6*p.v+";";h(a)}d++}return""}function y(a){a=m(a);if(null!=a)for(var b=0;b<a.length;){var d=a[b];if("ir"==d.n&&null!=d.v)return"spacingRight="+d.v+";";b++}return""}function z(a){a=m(a);if(null!=a)for(var b=0;b<a.length;){var d=a[b];if("mt"==d.n&&null!=d.v)return"spacingTop="+d.v+";";b++}return""}function x(a){a=m(a);if(null!=a)for(var b=0;b<a.length;){var d=a[b];if("mb"==d.n&&null!=d.v)return"spacingBottom="+d.v+";";b++}return""}function C(a){return"number"=== typeof a.InsetMargin?"spacing="+parseInt(a.InsetMargin)+";":""}function F(a){return null!=a.Text_VAlign&&"string"===typeof a.Text_VAlign?"verticalAlign="+a.Text_VAlign+";":V(mxConstants.STYLE_VERTICAL_ALIGN,a.TextVAlign,"middle")}function A(a,b){return 0==a.LineWidth?mxConstants.STYLE_STROKECOLOR+"=none;":V(mxConstants.STYLE_STROKECOLOR,a.LineColor.substring(0,7),"#000000")}function B(a,b,d){b="";if("string"===typeof a.LineColor&&7<a.LineColor.length){var h="0x"+a.LineColor.substring(a.LineColor.length- 2,a.LineColor.length);b+="strokeOpacity="+Math.round(parseInt(h)/2.55)+";"}"string"===typeof a.FillColor&&7<a.FillColor.length&&(a="0x"+a.FillColor.substring(a.FillColor.length-2,a.FillColor.length),d.style.includes("fillOpacity")||(b+="fillOpacity="+Math.round(parseInt(a)/2.55)+";"));return b}function G(a){return null!=a.Shadow?mxConstants.STYLE_SHADOW+"=1;":""}function D(a,b){if(null!=a.FillColor)if("object"===typeof a.FillColor){if(null!=a.FillColor.cs&&1<a.FillColor.cs.length)return V(mxConstants.STYLE_FILLCOLOR, a.FillColor.cs[0].c.substring(0,7))+V(mxConstants.STYLE_GRADIENTCOLOR,a.FillColor.cs[1].c.substring(0,7))}else return"string"===typeof a.FillColor?V(mxConstants.STYLE_FILLCOLOR,a.FillColor.substring(0,7),"#FFFFFF"):V(mxConstants.STYLE_FILLCOLOR,"none");return""}function Z(a){return"dashed"==a.StrokeStyle?"dashed=1;":"dotted"==a.StrokeStyle?"dashed=1;dashPattern=1 4;":"dashdot"==a.StrokeStyle?"dashed=1;dashPattern=10 5 1 5;":"dotdotdot"==a.StrokeStyle?"dashed=1;dashPattern=1 1;":""}function X(a){return V(mxConstants.STYLE_STROKEWIDTH, .6*parseFloat(a.LineWidth),"1")}function aa(a,b){var d=n(b);if(null!=d){var h=cb[d.Class];null!=h&&(a.style+=h+";");h=null!=d.Properties?d.Properties:d;if(null!=h&&(a.value=c(h),a.style+=f(a.style,h,d,a),a.style.includes("strokeColor")||(a.style+=A(h,d)),a.edge)){a.style=null!=h.Rounding?a.style+("rounded=1;arcSize="+h.Rounding+";"):a.style+"rounded=0;";if("diagonal"!=h.Shape)if(null!=h.ElbowPoints)for(a.geometry.points=[],d=0;d<h.ElbowPoints.length;d++)a.geometry.points.push(new mxPoint(Math.round(.6* h.ElbowPoints[d].x+0),Math.round(.6*h.ElbowPoints[d].y+0)));else"elbow"==h.Shape?a.style=null!=h.Endpoint1.Block&&null!=h.Endpoint1.Block?a.style+"edgeStyle=orthogonalEdgeStyle;":a.style+"edgeStyle=elbowEdgeStyle;":null!=h.Endpoint1.Block&&null!=h.Endpoint1.Block&&(a.style+="edgeStyle=orthogonalEdgeStyle;","curve"==h.Shape&&(a.style+="curved=1;"));null!=h.Endpoint1.Style&&(a.style+="startArrow="+la[h.Endpoint1.Style]+";");null!=h.Endpoint2.Style&&(a.style+="endArrow="+la[h.Endpoint2.Style].replace(/startSize/g, "endSize")+";");da(a,h.Endpoint1,!0);da(a,h.Endpoint2,!1)}}}function L(a){var b=n(a).Properties.BoundingBox;null==a.Class||"AWS"!==a.Class.substring(0,3)&&"Amazon"!==a.Class.substring(0,6)||a.Class.includes("AWS19")||(b.h-=20);v=new mxCell("",new mxGeometry(Math.round(.6*b.x+0),Math.round(.6*b.y+0),Math.round(.6*b.w),Math.round(.6*b.h)),"html=1;whiteSpace=wrap;");v.vertex=!0;aa(v,a);return v}function T(a,b,d){d=2*(parseFloat(a.Location)-.5);a=new mxCell(c(a),new mxGeometry(d,0,0,0),"text;html=1;resizable=0;labelBackgroundColor=#ffffff;align=center;verticalAlign=middle;"); -a.geometry.relative=!0;a.vertex=!0;b.insert(a);return b}function V(a,b,d,h){null!=b&&null!=h&&(b=h(b));return null!=b&&b!=d?a+"="+b+";":""}function da(a,b,d){null!=b&&null!=b.LinkX&&null!=b.LinkY&&(a.style+=(d?"exitX":"entryX")+"="+b.LinkX+";"+(d?"exitY":"entryY")+"="+b.LinkY+";"+(d?"exitPerimeter":"entryPerimeter")+"=1;")}function ka(a,b,d,h,p,c){a.getModel().beginUpdate();try{var e=function(b,d){var h=null!=d.Endpoint1.Block?z[d.Endpoint1.Block]:null,p=null!=d.Endpoint2.Block?z[d.Endpoint2.Block]: -null,c;c=new mxCell("",new mxGeometry(0,0,100,100),"html=1;jettySize=18;");c.geometry.relative=!0;c.edge=!0;aa(c,b);var e=n(b).Properties,f=null!=e?e.TextAreas:b.TextAreas;if(null!=f){for(var l=0;null!=f["t"+l];){var y=f["t"+l];c=T(y,c);l++}for(l=1;null!=f["m"+l];)y=f["m"+l],c=T(y,c,b),l++;null!=f.Text&&(c=T(f,c,b));f=null!=e?e.TextAreas:b.TextAreas;null!=f.Message&&(c=T(f.Message,c,b))}null==h&&null!=d.Endpoint1&&c.geometry.setTerminalPoint(new mxPoint(Math.round(.6*d.Endpoint1.x),Math.round(.6* -d.Endpoint1.y)),!0);null==p&&null!=d.Endpoint2&&c.geometry.setTerminalPoint(new mxPoint(Math.round(.6*d.Endpoint2.x),Math.round(.6*d.Endpoint2.y)),!1);g.push(a.addCell(c,null,null,h,p))},g=[],z={},f=[],y=[],x=0;if(null!=b.Groups)for(var k in b.Groups){var m=b.Groups[k];m.id=k;if(1==m.Hidden&&null!=m.Members){0>mxUtils.indexOf(y,k)&&y.push(k);for(var C in m.Members)y=Db(C,b.Groups,y)}}if(null!=b.Blocks)for(k in b.Blocks)m=b.Blocks[k],m.id=k,0>mxUtils.indexOf(y,k)&&(C=!1,null!=cb[m.Class]&&"mxCompositeShape"== -cb[m.Class]&&(z[m.id]=jb(m,g,a),f.push(m),C=!0),C||(z[m.id]=L(m),f.push(m)));else for(x=0;x<b.Objects.length;x++)m=b.Objects[x],null!=m.Action&&"mxCompositeShape"==cb[m.Action.Class]?z[m.id]=jb(m,g,a):m.IsBlock&&null!=m.Action&&null!=m.Action.Properties&&(z[m.id]=L(m)),f.push(m);f.sort(function(a,b){a=n(a);b=n(b);return null!=a.Properties&&null!=b.Properties?a.Properties.ZOrder-b.Properties.ZOrder:0});for(x=0;x<f.length;x++){var m=f[x],u=z[m.id];null!=u?g.push(a.addCell(u)):m.IsLine&&null!=m.Action&& -null!=m.Action.Properties&&e(m,m.Action.Properties)}if(null!=b.Lines)for(k in b.Lines)0>mxUtils.indexOf(y,k)&&(m=b.Lines[k],e(m,m));if(p&&null!=d&&null!=h){a.isGridEnabled()&&(d=a.snap(d),h=a.snap(h));var l=a.getBoundingBoxFromGeometry(g,!0);null!=l&&a.moveCells(g,d-l.x,h-l.y)}c||a.setSelectionCells(g)}finally{a.getModel().endUpdate()}}function ba(){var a=new Graph;a.setExtendParents(!1);a.setExtendParentsOnAdd(!1);a.setConstrainChildren(!1);a.setHtmlLabels(!0);a.getModel().maintainEdgeParent=!1; -return a}function Da(a,b,d,h,p,c,e,z){a=new mxCell("",new mxGeometry(a,b,0,0),"strokeColor=none;fillColor=none;");a.vertex=!0;e.insert(a);c=[a];d=sb.cloneCell(d);z.insertEdge(d,!1);a.insertEdge(d,!0);c.push(d);h.push(p.addCell(d,null,null,null,null))}function ga(a,b,d,h,p,c,e,z,f){a=new mxCell("",new mxGeometry(a,b,0,0),"strokeColor=none;fillColor=none;");a.vertex=!0;f.insert(a);d=new mxCell("",new mxGeometry(d,h,0,0),"strokeColor=none;fillColor=none;");d.vertex=!0;f.insert(d);z=[d];p=sb.cloneCell(p); -a.insertEdge(p,!0);d.insertEdge(p,!1);z.push(p);c.push(e.addCell(p,null,null,null,null))}function ea(a,b,d,h,p,e){h.style="rounded=1;absoluteArcSize=1;fillColor=#ffffff;arcSize=2;strokeColor=#dddddd;";h.style+=f(h.style,p,e,h);b=c(p);h.vertex=!0;a=new mxCell(b,new mxGeometry(0,.5,24,24),"dashed=0;connectable=0;html=1;strokeColor=none;"+mxConstants.STYLE_SHAPE+"=mxgraph.gcp2."+a+";part=1;shadow=0;labelPosition=right;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=5;");a.style+= -f(a.style,p,e,a);a.geometry.relative=!0;a.geometry.offset=new mxPoint(5,-12);a.vertex=!0;h.insert(a)}function ia(a,b,d,h,p,e,z,y){p="transparent"!=a?mxConstants.STYLE_SHAPE+"=mxgraph.gcp2.":mxConstants.STYLE_SHAPE+"=";e.style="rounded=1;absoluteArcSize=1;arcSize=2;verticalAlign=bottom;fillColor=#ffffff;strokeColor=#dddddd;whiteSpace=wrap;";e.style+=f(e.style,z,y,e);e.value=c(z);e.vertex=!0;a=new mxCell(null,new mxGeometry(.5,0,.7*h*b,.7*h*d),p+a+";part=1;dashed=0;connectable=0;html=1;strokeColor=none;shadow=0;"); -a.geometry.relative=!0;a.geometry.offset=new mxPoint(-b*h*.35,10+(1-d)*h*.35);a.vertex=!0;a.style+=f(a.style,z,y,a);e.insert(a)}function jb(e,m,L){var u=n(e),g=u.Properties,T=g.BoundingBox,t=Math.round(.6*T.w),r=Math.round(.6*T.h),V=Math.round(.6*T.x+0),ba=Math.round(.6*T.y+0);null==e.Class||"GCPInputDatabase"!==e.Class&&"GCPInputRecord"!==e.Class&&"GCPInputPayment"!==e.Class&&"GCPInputGateway"!==e.Class&&"GCPInputLocalCompute"!==e.Class&&"GCPInputBeacon"!==e.Class&&"GCPInputStorage"!==e.Class&&"GCPInputList"!== +a.geometry.relative=!0;a.vertex=!0;b.insert(a);return b}function V(a,b,d,h){null!=b&&null!=h&&(b=h(b));return null!=b&&b!=d?a+"="+b+";":""}function da(a,b,d){null!=b&&null!=b.LinkX&&null!=b.LinkY&&(a.style+=(d?"exitX":"entryX")+"="+b.LinkX+";"+(d?"exitY":"entryY")+"="+b.LinkY+";"+(d?"exitPerimeter":"entryPerimeter")+"=1;")}function ka(a,b,d,h,p,c){a.getModel().beginUpdate();try{var e=function(b,d){var h=null!=d.Endpoint1.Block?y[d.Endpoint1.Block]:null,p=null!=d.Endpoint2.Block?y[d.Endpoint2.Block]: +null,c;c=new mxCell("",new mxGeometry(0,0,100,100),"html=1;jettySize=18;");c.geometry.relative=!0;c.edge=!0;aa(c,b);var e=n(b).Properties,f=null!=e?e.TextAreas:b.TextAreas;if(null!=f){for(var l=0;null!=f["t"+l];){var z=f["t"+l];c=T(z,c);l++}for(l=1;null!=f["m"+l];)z=f["m"+l],c=T(z,c,b),l++;null!=f.Text&&(c=T(f,c,b));f=null!=e?e.TextAreas:b.TextAreas;null!=f.Message&&(c=T(f.Message,c,b))}null==h&&null!=d.Endpoint1&&c.geometry.setTerminalPoint(new mxPoint(Math.round(.6*d.Endpoint1.x),Math.round(.6* +d.Endpoint1.y)),!0);null==p&&null!=d.Endpoint2&&c.geometry.setTerminalPoint(new mxPoint(Math.round(.6*d.Endpoint2.x),Math.round(.6*d.Endpoint2.y)),!1);g.push(a.addCell(c,null,null,h,p))},g=[],y={},f=[],z=[],x=0;if(null!=b.Groups)for(var k in b.Groups){var m=b.Groups[k];m.id=k;if(1==m.Hidden&&null!=m.Members){0>mxUtils.indexOf(z,k)&&z.push(k);for(var C in m.Members)z=Db(C,b.Groups,z)}}if(null!=b.Blocks)for(k in b.Blocks)m=b.Blocks[k],m.id=k,0>mxUtils.indexOf(z,k)&&(C=!1,null!=cb[m.Class]&&"mxCompositeShape"== +cb[m.Class]&&(y[m.id]=jb(m,g,a),f.push(m),C=!0),C||(y[m.id]=L(m),f.push(m)));else for(x=0;x<b.Objects.length;x++)m=b.Objects[x],null!=m.Action&&"mxCompositeShape"==cb[m.Action.Class]?y[m.id]=jb(m,g,a):m.IsBlock&&null!=m.Action&&null!=m.Action.Properties&&(y[m.id]=L(m)),f.push(m);f.sort(function(a,b){a=n(a);b=n(b);return null!=a.Properties&&null!=b.Properties?a.Properties.ZOrder-b.Properties.ZOrder:0});for(x=0;x<f.length;x++){var m=f[x],u=y[m.id];null!=u?g.push(a.addCell(u)):m.IsLine&&null!=m.Action&& +null!=m.Action.Properties&&e(m,m.Action.Properties)}if(null!=b.Lines)for(k in b.Lines)0>mxUtils.indexOf(z,k)&&(m=b.Lines[k],e(m,m));if(p&&null!=d&&null!=h){a.isGridEnabled()&&(d=a.snap(d),h=a.snap(h));var l=a.getBoundingBoxFromGeometry(g,!0);null!=l&&a.moveCells(g,d-l.x,h-l.y)}c||a.setSelectionCells(g)}finally{a.getModel().endUpdate()}}function ba(){var a=new Graph;a.setExtendParents(!1);a.setExtendParentsOnAdd(!1);a.setConstrainChildren(!1);a.setHtmlLabels(!0);a.getModel().maintainEdgeParent=!1; +return a}function Da(a,b,d,h,p,c,e,y){a=new mxCell("",new mxGeometry(a,b,0,0),"strokeColor=none;fillColor=none;");a.vertex=!0;e.insert(a);c=[a];d=sb.cloneCell(d);y.insertEdge(d,!1);a.insertEdge(d,!0);c.push(d);h.push(p.addCell(d,null,null,null,null))}function ga(a,b,d,h,p,c,e,y,f){a=new mxCell("",new mxGeometry(a,b,0,0),"strokeColor=none;fillColor=none;");a.vertex=!0;f.insert(a);d=new mxCell("",new mxGeometry(d,h,0,0),"strokeColor=none;fillColor=none;");d.vertex=!0;f.insert(d);y=[d];p=sb.cloneCell(p); +a.insertEdge(p,!0);d.insertEdge(p,!1);y.push(p);c.push(e.addCell(p,null,null,null,null))}function ea(a,b,d,h,p,e){h.style="rounded=1;absoluteArcSize=1;fillColor=#ffffff;arcSize=2;strokeColor=#dddddd;";h.style+=f(h.style,p,e,h);b=c(p);h.vertex=!0;a=new mxCell(b,new mxGeometry(0,.5,24,24),"dashed=0;connectable=0;html=1;strokeColor=none;"+mxConstants.STYLE_SHAPE+"=mxgraph.gcp2."+a+";part=1;shadow=0;labelPosition=right;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=5;");a.style+= +f(a.style,p,e,a);a.geometry.relative=!0;a.geometry.offset=new mxPoint(5,-12);a.vertex=!0;h.insert(a)}function ia(a,b,d,h,p,e,y,z){p="transparent"!=a?mxConstants.STYLE_SHAPE+"=mxgraph.gcp2.":mxConstants.STYLE_SHAPE+"=";e.style="rounded=1;absoluteArcSize=1;arcSize=2;verticalAlign=bottom;fillColor=#ffffff;strokeColor=#dddddd;whiteSpace=wrap;";e.style+=f(e.style,y,z,e);e.value=c(y);e.vertex=!0;a=new mxCell(null,new mxGeometry(.5,0,.7*h*b,.7*h*d),p+a+";part=1;dashed=0;connectable=0;html=1;strokeColor=none;shadow=0;"); +a.geometry.relative=!0;a.geometry.offset=new mxPoint(-b*h*.35,10+(1-d)*h*.35);a.vertex=!0;a.style+=f(a.style,y,z,a);e.insert(a)}function jb(e,m,L){var u=n(e),g=u.Properties,T=g.BoundingBox,t=Math.round(.6*T.w),r=Math.round(.6*T.h),V=Math.round(.6*T.x+0),ba=Math.round(.6*T.y+0);null==e.Class||"GCPInputDatabase"!==e.Class&&"GCPInputRecord"!==e.Class&&"GCPInputPayment"!==e.Class&&"GCPInputGateway"!==e.Class&&"GCPInputLocalCompute"!==e.Class&&"GCPInputBeacon"!==e.Class&&"GCPInputStorage"!==e.Class&&"GCPInputList"!== e.Class&&"GCPInputStream"!==e.Class&&"GCPInputMobileDevices"!==e.Class&&"GCPInputCircuitBoard"!==e.Class&&"GCPInputLive"!==e.Class&&"GCPInputUsers"!==e.Class&&"GCPInputLaptop"!==e.Class&&"GCPInputApplication"!==e.Class&&"GCPInputLightbulb"!==e.Class&&"GCPInputGame"!==e.Class&&"GCPInputDesktop"!==e.Class&&"GCPInputDesktopAndMobile"!==e.Class&&"GCPInputWebcam"!==e.Class&&"GCPInputSpeaker"!==e.Class&&"GCPInputRetail"!==e.Class&&"GCPInputReport"!==e.Class&&"GCPInputPhone"!==e.Class&&"GCPInputBlank"!== e.Class||(r+=20);v=new mxCell("",new mxGeometry(V,ba,t,r),"html=1;whiteSpace=wrap;");v.vertex=!0;switch(null!=e.Class?e.Class:null!=u?u.Class:null){case "BraceNoteBlock":case "UI2BraceNoteBlock":var ka=!1;null!=g.BraceDirection&&"Right"==g.BraceDirection&&(ka=!0);var da=null,la=null;ka?(da=new mxCell("",new mxGeometry(t-.125*r,0,.125*r,r),"shape=curlyBracket;rounded=1;"),la=new mxCell("",new mxGeometry(0,0,t-.125*r,r),"strokeColor=none;fillColor=none;")):(da=new mxCell("",new mxGeometry(0,0,.125* -r,r),"shape=curlyBracket;rounded=1;flipH=1;"),la=new mxCell("",new mxGeometry(.125*r,0,t-.125*r,r),"strokeColor=none;fillColor=none;"));v.style="strokeColor=none;fillColor=none;";v.style+=f(v.style,g,u,v);da.vertex=!0;v.insert(da);da.style+=f(da.style,g,u,da);la.vertex=!0;la.value=c(g);v.insert(la);la.style+=f(la.style,g,u,la);break;case "AdvancedSwimLaneBlockRotated":case "AdvancedSwimLaneBlock":var jb=0;null!=g.Lanes&&(jb=g.Lanes.length);v.style="strokeColor=none;fillColor=none;";v.style+=f(v.style, -g,u,v);for(var Xb=0,La=[],l=0;l<jb;l++){var jc=parseFloat(g.Lanes[l].p);La.push(new mxCell("",new mxGeometry(t*Xb,0,t*jc,r),"shape=swimlane;startSize=25;"));La[l].vertex=!0;v.insert(La[l]);La[l].value=c(g["Lane_"+l]);La[l].style+=b(g["Lane_"+l])+a(g["Lane_"+l])+d(g["Lane_"+l])+h(g["Lane_"+l],La[l])+p(g["Lane_"+l])+z(g["Lane_"+l])+y(g["Lane_"+l])+x(g["Lane_"+l])+C(g["Lane_"+l])+F(g["Lane_"+l]);f(La[l].style,g,u,La[l]);Xb+=jc}break;case "AndroidDevice":if(null!=g.AndroidDeviceName){v.style="fillColor=#000000;strokeColor=#000000;"; -var ib=null,Bb=null,cb=null;if("Tablet"==g.AndroidDeviceName||"Mini Tablet"==g.AndroidDeviceName)v.style+="shape=mxgraph.android.tab2;",ib=new mxCell("",new mxGeometry(.112*t,.077*r,.77*t,.85*r),""),g.KeyboardShown&&(Bb=new mxCell("",new mxGeometry(.112*t,.727*r,.77*t,.2*r),"shape=mxgraph.android.keyboard;")),g.FullScreen||(cb=new mxCell("",new mxGeometry(.112*t,.077*r,.77*t,.03*r),"shape=mxgraph.android.statusBar;strokeColor=#33b5e5;fillColor=#000000;fontColor=#33b5e5;fontSize="+.015*r+";"));else if("Large Phone"== -g.AndroidDeviceName||"Phone"==g.AndroidDeviceName)v.style+="shape=mxgraph.android.phone2;",ib=new mxCell("",new mxGeometry(.04*t,.092*r,.92*t,.816*r),""),g.KeyboardShown&&(Bb=new mxCell("",new mxGeometry(.04*t,.708*r,.92*t,.2*r),"shape=mxgraph.android.keyboard;")),g.FullScreen||(cb=new mxCell("",new mxGeometry(.04*t,.092*r,.92*t,.03*r),"shape=mxgraph.android.statusBar;strokeColor=#33b5e5;fillColor=#000000;fontColor=#33b5e5;fontSize="+.015*r+";"));ib.vertex=!0;v.insert(ib);"Dark"==g.Scheme?ib.style+= -"fillColor=#111111;":"Light"==g.Scheme&&(ib.style+="fillColor=#ffffff;");null!=Bb&&(Bb.vertex=!0,v.insert(Bb));null!=cb&&(cb.vertex=!0,v.insert(cb))}v.style+=f(v.style,g,u,v);break;case "AndroidAlertDialog":var Ma=new mxCell("",new mxGeometry(0,0,t,30),"strokeColor=none;fillColor=none;spacingLeft=9;");Ma.vertex=!0;v.insert(Ma);var na=new mxCell("",new mxGeometry(0,25,t,10),"shape=line;strokeColor=#33B5E5;");na.vertex=!0;v.insert(na);var Cb=new mxCell("",new mxGeometry(0,30,t,r-30),"strokeColor=none;fillColor=none;verticalAlign=top;"); -Cb.vertex=!0;v.insert(Cb);var qa=new mxCell("",new mxGeometry(0,r-25,.5*t,25),"fillColor=none;");qa.vertex=!0;v.insert(qa);var ra=new mxCell("",new mxGeometry(.5*t,r-25,.5*t,25),"fillColor=none;");ra.vertex=!0;v.insert(ra);Ma.value=c(g.DialogTitle);Ma.style+=k(g.DialogTitle);Cb.value=c(g.DialogText);Cb.style+=k(g.DialogText);qa.value=c(g.Button_0);qa.style+=k(g.Button_0);ra.value=c(g.Button_1);ra.style+=k(g.Button_1);"Dark"==g.Scheme?(v.style+="strokeColor=#353535;fillColor=#282828;shadow=1;",qa.style+= -"strokeColor=#353535;",ra.style+="strokeColor=#353535;"):(v.style+="strokeColor=none;fillColor=#ffffff;shadow=1;",qa.style+="strokeColor=#E2E2E2;",ra.style+="strokeColor=#E2E2E2;");v.style+=f(v.style,g,u,v);break;case "AndroidDateDialog":case "AndroidTimeDialog":Ma=new mxCell("",new mxGeometry(0,0,t,30),"strokeColor=none;fillColor=none;spacingLeft=9;");Ma.vertex=!0;v.insert(Ma);Ma.value=c(g.DialogTitle);Ma.style+=k(g.DialogTitle);na=new mxCell("",new mxGeometry(0,25,t,10),"shape=line;strokeColor=#33B5E5;"); +r,r),"shape=curlyBracket;rounded=1;flipH=1;"),la=new mxCell("",new mxGeometry(.125*r,0,t-.125*r,r),"strokeColor=none;fillColor=none;"));v.style="strokeColor=none;fillColor=none;";v.style+=f(v.style,g,u,v);da.vertex=!0;v.insert(da);da.style+=f(da.style,g,u,da);la.vertex=!0;la.value=c(g);v.insert(la);la.style+=f(la.style,g,u,la);break;case "AdvancedSwimLaneBlockRotated":case "AdvancedSwimLaneBlock":var Xb=0;null!=g.Lanes&&(Xb=g.Lanes.length);v.style="strokeColor=none;fillColor=none;";v.style+=f(v.style, +g,u,v);for(var jb=0,eb=[],l=0;l<Xb;l++){var jc=parseFloat(g.Lanes[l].p);eb.push(new mxCell("",new mxGeometry(t*jb,0,t*jc,r),"shape=swimlane;startSize=25;"));eb[l].vertex=!0;v.insert(eb[l]);eb[l].value=c(g["Lane_"+l]);eb[l].style+=b(g["Lane_"+l])+a(g["Lane_"+l])+d(g["Lane_"+l])+h(g["Lane_"+l],eb[l])+p(g["Lane_"+l])+y(g["Lane_"+l])+z(g["Lane_"+l])+x(g["Lane_"+l])+C(g["Lane_"+l])+F(g["Lane_"+l]);f(eb[l].style,g,u,eb[l]);jb+=jc}break;case "AndroidDevice":if(null!=g.AndroidDeviceName){v.style="fillColor=#000000;strokeColor=#000000;"; +var bb=null,Bb=null,cb=null;if("Tablet"==g.AndroidDeviceName||"Mini Tablet"==g.AndroidDeviceName)v.style+="shape=mxgraph.android.tab2;",bb=new mxCell("",new mxGeometry(.112*t,.077*r,.77*t,.85*r),""),g.KeyboardShown&&(Bb=new mxCell("",new mxGeometry(.112*t,.727*r,.77*t,.2*r),"shape=mxgraph.android.keyboard;")),g.FullScreen||(cb=new mxCell("",new mxGeometry(.112*t,.077*r,.77*t,.03*r),"shape=mxgraph.android.statusBar;strokeColor=#33b5e5;fillColor=#000000;fontColor=#33b5e5;fontSize="+.015*r+";"));else if("Large Phone"== +g.AndroidDeviceName||"Phone"==g.AndroidDeviceName)v.style+="shape=mxgraph.android.phone2;",bb=new mxCell("",new mxGeometry(.04*t,.092*r,.92*t,.816*r),""),g.KeyboardShown&&(Bb=new mxCell("",new mxGeometry(.04*t,.708*r,.92*t,.2*r),"shape=mxgraph.android.keyboard;")),g.FullScreen||(cb=new mxCell("",new mxGeometry(.04*t,.092*r,.92*t,.03*r),"shape=mxgraph.android.statusBar;strokeColor=#33b5e5;fillColor=#000000;fontColor=#33b5e5;fontSize="+.015*r+";"));bb.vertex=!0;v.insert(bb);"Dark"==g.Scheme?bb.style+= +"fillColor=#111111;":"Light"==g.Scheme&&(bb.style+="fillColor=#ffffff;");null!=Bb&&(Bb.vertex=!0,v.insert(Bb));null!=cb&&(cb.vertex=!0,v.insert(cb))}v.style+=f(v.style,g,u,v);break;case "AndroidAlertDialog":var La=new mxCell("",new mxGeometry(0,0,t,30),"strokeColor=none;fillColor=none;spacingLeft=9;");La.vertex=!0;v.insert(La);var na=new mxCell("",new mxGeometry(0,25,t,10),"shape=line;strokeColor=#33B5E5;");na.vertex=!0;v.insert(na);var Cb=new mxCell("",new mxGeometry(0,30,t,r-30),"strokeColor=none;fillColor=none;verticalAlign=top;"); +Cb.vertex=!0;v.insert(Cb);var qa=new mxCell("",new mxGeometry(0,r-25,.5*t,25),"fillColor=none;");qa.vertex=!0;v.insert(qa);var ra=new mxCell("",new mxGeometry(.5*t,r-25,.5*t,25),"fillColor=none;");ra.vertex=!0;v.insert(ra);La.value=c(g.DialogTitle);La.style+=k(g.DialogTitle);Cb.value=c(g.DialogText);Cb.style+=k(g.DialogText);qa.value=c(g.Button_0);qa.style+=k(g.Button_0);ra.value=c(g.Button_1);ra.style+=k(g.Button_1);"Dark"==g.Scheme?(v.style+="strokeColor=#353535;fillColor=#282828;shadow=1;",qa.style+= +"strokeColor=#353535;",ra.style+="strokeColor=#353535;"):(v.style+="strokeColor=none;fillColor=#ffffff;shadow=1;",qa.style+="strokeColor=#E2E2E2;",ra.style+="strokeColor=#E2E2E2;");v.style+=f(v.style,g,u,v);break;case "AndroidDateDialog":case "AndroidTimeDialog":La=new mxCell("",new mxGeometry(0,0,t,30),"strokeColor=none;fillColor=none;spacingLeft=9;");La.vertex=!0;v.insert(La);La.value=c(g.DialogTitle);La.style+=k(g.DialogTitle);na=new mxCell("",new mxGeometry(0,25,t,10),"shape=line;strokeColor=#33B5E5;"); na.vertex=!0;v.insert(na);qa=new mxCell("",new mxGeometry(0,r-25,.5*t,25),"fillColor=none;");qa.vertex=!0;v.insert(qa);qa.value=c(g.Button_0);qa.style+=k(g.Button_0);ra=new mxCell("",new mxGeometry(.5*t,r-25,.5*t,25),"fillColor=none;");ra.vertex=!0;v.insert(ra);ra.value=c(g.Button_1);ra.style+=k(g.Button_1);var qb=new mxCell("",new mxGeometry(.5*t-4,41,8,4),"shape=triangle;direction=north;");qb.vertex=!0;v.insert(qb);var rb=new mxCell("",new mxGeometry(.25*t-4,41,8,4),"shape=triangle;direction=north;"); rb.vertex=!0;v.insert(rb);var tb=new mxCell("",new mxGeometry(.75*t-4,41,8,4),"shape=triangle;direction=north;");tb.vertex=!0;v.insert(tb);var Eb=new mxCell("",new mxGeometry(.375*t,50,.2*t,15),"strokeColor=none;fillColor=none;");Eb.vertex=!0;v.insert(Eb);Eb.value=c(g.Label_1);Eb.style+=k(g.Label_1);var Fb=new mxCell("",new mxGeometry(.125*t,50,.2*t,15),"strokeColor=none;fillColor=none;");Fb.vertex=!0;v.insert(Fb);Fb.value=c(g.Label_0);Fb.style+=k(g.Label_0);var ub=null;"AndroidDateDialog"==e.Class&& -(ub=new mxCell("",new mxGeometry(.625*t,50,.2*t,15),"strokeColor=none;fillColor=none;"),ub.vertex=!0,v.insert(ub),ub.value=c(g.Label_2),ub.style+=k(g.Label_2));var Na=new mxCell("",new mxGeometry(.43*t,60,.14*t,10),"shape=line;strokeColor=#33B5E5;");Na.vertex=!0;v.insert(Na);var Oa=new mxCell("",new mxGeometry(.18*t,60,.14*t,10),"shape=line;strokeColor=#33B5E5;");Oa.vertex=!0;v.insert(Oa);var Db=new mxCell("",new mxGeometry(.68*t,60,.14*t,10),"shape=line;strokeColor=#33B5E5;");Db.vertex=!0;v.insert(Db); +(ub=new mxCell("",new mxGeometry(.625*t,50,.2*t,15),"strokeColor=none;fillColor=none;"),ub.vertex=!0,v.insert(ub),ub.value=c(g.Label_2),ub.style+=k(g.Label_2));var Ma=new mxCell("",new mxGeometry(.43*t,60,.14*t,10),"shape=line;strokeColor=#33B5E5;");Ma.vertex=!0;v.insert(Ma);var Na=new mxCell("",new mxGeometry(.18*t,60,.14*t,10),"shape=line;strokeColor=#33B5E5;");Na.vertex=!0;v.insert(Na);var Db=new mxCell("",new mxGeometry(.68*t,60,.14*t,10),"shape=line;strokeColor=#33B5E5;");Db.vertex=!0;v.insert(Db); var Gb=new mxCell("",new mxGeometry(.375*t,65,.2*t,15),"strokeColor=none;fillColor=none;");Gb.vertex=!0;v.insert(Gb);Gb.value=c(g.Label_4);Gb.style+=k(g.Label_4);var vb=null;"AndroidTimeDialog"==e.Class&&(vb=new mxCell("",new mxGeometry(.3*t,65,.1*t,15),"strokeColor=none;fillColor=none;"),vb.vertex=!0,v.insert(vb),vb.value=c(g.Label_Colon),vb.style+=k(g.Label_Colon));var Hb=new mxCell("",new mxGeometry(.125*t,65,.2*t,15),"strokeColor=none;fillColor=none;");Hb.vertex=!0;v.insert(Hb);Hb.value=c(g.Label_3); Hb.style+=k(g.Label_3);var Ib=new mxCell("",new mxGeometry(.625*t,65,.2*t,15),"strokeColor=none;fillColor=none;");Ib.vertex=!0;v.insert(Ib);Ib.value=c(g.Label_5);Ib.style+=k(g.Label_5);var kc=new mxCell("",new mxGeometry(.43*t,75,.14*t,10),"shape=line;strokeColor=#33B5E5;");kc.vertex=!0;v.insert(kc);var lc=new mxCell("",new mxGeometry(.18*t,75,.14*t,10),"shape=line;strokeColor=#33B5E5;");lc.vertex=!0;v.insert(lc);var mc=new mxCell("",new mxGeometry(.68*t,75,.14*t,10),"shape=line;strokeColor=#33B5E5;"); mc.vertex=!0;v.insert(mc);var Jb=new mxCell("",new mxGeometry(.375*t,80,.2*t,15),"strokeColor=none;fillColor=none;");Jb.vertex=!0;v.insert(Jb);Jb.value=c(g.Label_7);Jb.style+=k(g.Label_7);var Kb=new mxCell("",new mxGeometry(.125*t,80,.2*t,15),"strokeColor=none;fillColor=none;");Kb.vertex=!0;v.insert(Kb);Kb.value=c(g.Label_6);Kb.style+=k(g.Label_6);var Lb=new mxCell("",new mxGeometry(.625*t,80,.2*t,15),"strokeColor=none;fillColor=none;");Lb.vertex=!0;v.insert(Lb);Lb.value=c(g.Label_8);Lb.style+=k(g.Label_8); var wb=new mxCell("",new mxGeometry(.5*t-4,99,8,4),"shape=triangle;direction=south;");wb.vertex=!0;v.insert(wb);var xb=new mxCell("",new mxGeometry(.25*t-4,99,8,4),"shape=triangle;direction=south;");xb.vertex=!0;v.insert(xb);var yb=new mxCell("",new mxGeometry(.75*t-4,99,8,4),"shape=triangle;direction=south;");yb.vertex=!0;v.insert(yb);"Dark"==g.Scheme?(v.style+="strokeColor=#353535;fillColor=#282828;shadow=1;",qa.style+="strokeColor=#353535;",ra.style+="strokeColor=#353535;",qb.style+="strokeColor=none;fillColor=#7E7E7E;", rb.style+="strokeColor=none;fillColor=#7E7E7E;",tb.style+="strokeColor=none;fillColor=#7E7E7E;",wb.style+="strokeColor=none;fillColor=#7E7E7E;",xb.style+="strokeColor=none;fillColor=#7E7E7E;",yb.style+="strokeColor=none;fillColor=#7E7E7E;"):(v.style+="strokeColor=none;fillColor=#ffffff;shadow=1;",qa.style+="strokeColor=#E2E2E2;",ra.style+="strokeColor=#E2E2E2;",qb.style+="strokeColor=none;fillColor=#939393;",rb.style+="strokeColor=none;fillColor=#939393;",tb.style+="strokeColor=none;fillColor=#939393;", -wb.style+="strokeColor=none;fillColor=#939393;",xb.style+="strokeColor=none;fillColor=#939393;",yb.style+="strokeColor=none;fillColor=#939393;");v.style+=f(v.style,g,u,v);break;case "AndroidListItems":var xa=r,eb=0;if(g.ShowHeader){var eb=8,Mb=new mxCell("",new mxGeometry(0,0,t,eb),"strokeColor=none;fillColor=none;");Mb.vertex=!0;v.insert(Mb);Mb.value=c(g.Header);Mb.style+=k(g.Header);var xa=xa-eb,nc=new mxCell("",new mxGeometry(0,eb-2,t,4),"shape=line;strokeColor=#999999;");nc.vertex=!0;v.insert(nc)}var Pa= -parseInt(g.Items);0<Pa&&(xa/=Pa);for(var H=[],na=[],l=0;l<Pa;l++)H[l]=new mxCell("",new mxGeometry(0,eb+l*xa,t,xa),"strokeColor=none;fillColor=none;"),H[l].vertex=!0,v.insert(H[l]),H[l].value=c(g["Item_"+l]),H[l].style+=k(g["Item_"+l]),0<l&&(na[l]=new mxCell("",new mxGeometry(0,eb+l*xa-2,t,4),"shape=line;"),na[l].vertex=!0,v.insert(na[l]),na[l].style="Dark"==g.Scheme?na[l].style+"strokeColor=#ffffff;":na[l].style+"strokeColor=#D9D9D9;");v.style="Dark"==g.Scheme?v.style+"strokeColor=none;fillColor=#111111;": -v.style+"strokeColor=none;fillColor=#ffffff;";v.style+=f(v.style,g,u,v);break;case "AndroidTabs":var Qa=parseInt(g.Tabs),Ea=t;0<Qa&&(Ea/=Qa);for(var fa=[],na=[],l=0;l<Qa;l++)fa[l]=new mxCell("",new mxGeometry(l*Ea,0,Ea,r),"strokeColor=none;fillColor=none;"),fa[l].vertex=!0,v.insert(fa[l]),fa[l].value=c(g["Tab_"+l]),fa[l].style+=k(g["Tab_"+l]),0<l&&(na[l]=new mxCell("",new mxGeometry(l*Ea-2,.2*r,4,.6*r),"shape=line;direction=north;"),na[l].vertex=!0,v.insert(na[l]),na[l].style="Dark"==g.Scheme?na[l].style+ +wb.style+="strokeColor=none;fillColor=#939393;",xb.style+="strokeColor=none;fillColor=#939393;",yb.style+="strokeColor=none;fillColor=#939393;");v.style+=f(v.style,g,u,v);break;case "AndroidListItems":var xa=r,fb=0;if(g.ShowHeader){var fb=8,Mb=new mxCell("",new mxGeometry(0,0,t,fb),"strokeColor=none;fillColor=none;");Mb.vertex=!0;v.insert(Mb);Mb.value=c(g.Header);Mb.style+=k(g.Header);var xa=xa-fb,nc=new mxCell("",new mxGeometry(0,fb-2,t,4),"shape=line;strokeColor=#999999;");nc.vertex=!0;v.insert(nc)}var Oa= +parseInt(g.Items);0<Oa&&(xa/=Oa);for(var H=[],na=[],l=0;l<Oa;l++)H[l]=new mxCell("",new mxGeometry(0,fb+l*xa,t,xa),"strokeColor=none;fillColor=none;"),H[l].vertex=!0,v.insert(H[l]),H[l].value=c(g["Item_"+l]),H[l].style+=k(g["Item_"+l]),0<l&&(na[l]=new mxCell("",new mxGeometry(0,fb+l*xa-2,t,4),"shape=line;"),na[l].vertex=!0,v.insert(na[l]),na[l].style="Dark"==g.Scheme?na[l].style+"strokeColor=#ffffff;":na[l].style+"strokeColor=#D9D9D9;");v.style="Dark"==g.Scheme?v.style+"strokeColor=none;fillColor=#111111;": +v.style+"strokeColor=none;fillColor=#ffffff;";v.style+=f(v.style,g,u,v);break;case "AndroidTabs":var Pa=parseInt(g.Tabs),Ea=t;0<Pa&&(Ea/=Pa);for(var fa=[],na=[],l=0;l<Pa;l++)fa[l]=new mxCell("",new mxGeometry(l*Ea,0,Ea,r),"strokeColor=none;fillColor=none;"),fa[l].vertex=!0,v.insert(fa[l]),fa[l].value=c(g["Tab_"+l]),fa[l].style+=k(g["Tab_"+l]),0<l&&(na[l]=new mxCell("",new mxGeometry(l*Ea-2,.2*r,4,.6*r),"shape=line;direction=north;"),na[l].vertex=!0,v.insert(na[l]),na[l].style="Dark"==g.Scheme?na[l].style+ "strokeColor=#484848;":na[l].style+"strokeColor=#CCCCCC;");var oc=new mxCell("",new mxGeometry(g.Selected*Ea+2,r-3,Ea-4,3),"strokeColor=none;fillColor=#33B5E5;");oc.vertex=!0;v.insert(oc);v.style="Dark"==g.Scheme?v.style+"strokeColor=none;fillColor=#333333;":v.style+"strokeColor=none;fillColor=#DDDDDD;";v.style+=f(v.style,g,u,v);break;case "AndroidProgressBar":v=new mxCell("",new mxGeometry(Math.round(V),Math.round(ba+.25*r),Math.round(t),Math.round(.5*r)),"html=1;whiteSpace=wrap;");v.vertex=!0;var Nb= new mxCell("",new mxGeometry(0,0,t*g.BarPosition,Math.round(.5*r)),"strokeColor=none;fillColor=#33B5E5;");Nb.vertex=!0;v.insert(Nb);v.style="Dark"==g.Scheme?v.style+"strokeColor=none;fillColor=#474747;":v.style+"strokeColor=none;fillColor=#BBBBBB;";v.style+=f(v.style,g,u,v);break;case "AndroidImageBlock":v.style="Dark"==g.Scheme?v.style+"shape=mxgraph.mockup.graphics.simpleIcon;strokeColor=#7E7E7E;fillColor=#111111;":v.style+"shape=mxgraph.mockup.graphics.simpleIcon;strokeColor=#939393;fillColor=#ffffff;"; v.style+=f(v.style,g,u,v);break;case "AndroidTextBlock":v.style="Dark"==g.Scheme?g.ShowBorder?v.style+"fillColor=#111111;strokeColor=#ffffff;":v.style+"fillColor=#111111;strokeColor=none;":g.ShowBorder?v.style+"fillColor=#ffffff;strokeColor=#000000;":v.style+"fillColor=#ffffff;strokeColor=none;";v.value=c(g.Label);v.style+=k(g.Label);v.style+=f(v.style,g,u,v);break;case "AndroidActionBar":v.style+="strokeColor=none;";switch(g.BarBackground){case "Blue":v.style+="fillColor=#002E3E;";break;case "Gray":v.style+= -"fillColor=#DDDDDD;";break;case "Dark Gray":v.style+="fillColor=#474747;";break;case "White":v.style+="fillColor=#ffffff;"}if(g.HighlightShow){var fb=null,fb=g.HighlightTop?new mxCell("",new mxGeometry(0,0,t,2),"strokeColor=none;"):new mxCell("",new mxGeometry(0,r-2,t,2),"strokeColor=none;");fb.vertex=!0;v.insert(fb);switch(g.HighlightColor){case "Blue":fb.style+="fillColor=#33B5E5;";break;case "Dark Gray":fb.style+="fillColor=#B0B0B0;";break;case "White":fb.style+="fillColor=#ffffff;"}}if(g.VlignShow){var zb= +"fillColor=#DDDDDD;";break;case "Dark Gray":v.style+="fillColor=#474747;";break;case "White":v.style+="fillColor=#ffffff;"}if(g.HighlightShow){var gb=null,gb=g.HighlightTop?new mxCell("",new mxGeometry(0,0,t,2),"strokeColor=none;"):new mxCell("",new mxGeometry(0,r-2,t,2),"strokeColor=none;");gb.vertex=!0;v.insert(gb);switch(g.HighlightColor){case "Blue":gb.style+="fillColor=#33B5E5;";break;case "Dark Gray":gb.style+="fillColor=#B0B0B0;";break;case "White":gb.style+="fillColor=#ffffff;"}}if(g.VlignShow){var zb= new mxCell("",new mxGeometry(20,5,2,r-10),"shape=line;direction=north;");zb.vertex=!0;v.insert(zb);switch(g.VlignColor){case "Blue":zb.style+="strokeColor=#244C5A;";break;case "White":zb.style+="strokeColor=#ffffff;"}}v.style+=f(v.style,g,u,v);break;case "AndroidButton":v.value=c(g.Label);v.style+=k(g.Label)+"shape=partialRectangle;left=0;right=0;";v.style="Dark"==g.Scheme?v.style+"fillColor=#474747;strokeColor=#C6C5C6;bottom=0;":v.style+"fillColor=#DFE0DF;strokeColor=#C6C5C6;top=0;";v.style+=f(v.style, g,u,v);break;case "AndroidTextBox":v.value=c(g.Label);v.style+=k(g.Label);var Ob=new mxCell("",new mxGeometry(2,r-6,t-4,4),"shape=partialRectangle;top=0;fillColor=none;");Ob.vertex=!0;v.insert(Ob);v.style="Dark"==g.Scheme?v.style+"fillColor=#111111;strokeColor=none;":v.style+"fillColor=#ffffff;strokeColor=none;";Ob.style=g.TextFocused?Ob.style+"strokeColor=#33B5E5;":Ob.style+"strokeColor=#A9A9A9;";v.style+=f(v.style,g,u,v);break;case "AndroidRadioButton":var ob=null;g.Checked&&(ob=new mxCell("",new mxGeometry(.15* t,.15*r,.7*t,.7*r),"shape=ellipse;fillColor=#33B5E5;strokeWidth=0.6;"),ob.vertex=!0,v.insert(ob));"Dark"==g.Scheme?(v.style+="shape=ellipse;strokeWidth=0.6;strokeColor=#272727;",g.Checked?(ob.style+="strokeColor=#1F5C73;",v.style+="fillColor=#193C49;"):v.style+="fillColor=#111111;"):(v.style+="shape=ellipse;strokeWidth=0.6;fillColor=#ffffff;strokeColor=#5C5C5C;",g.Checked&&(ob.style+="strokeColor=#999999;"));v.style+=f(v.style,g,u,v);break;case "AndroidCheckBox":var cc=null;g.Checked&&(cc=new mxCell("", new mxGeometry(.25*t,.05*-r,t,.8*r),"shape=mxgraph.ios7.misc.check;strokeColor=#33B5E5;strokeWidth=2;"),cc.vertex=!0,v.insert(cc));v.style="Dark"==g.Scheme?v.style+"strokeWidth=0.6;strokeColor=#272727;fillColor=#111111;":v.style+"strokeWidth=0.6;strokeColor=#5C5C5C;fillColor=#ffffff;";v.style+=f(v.style,g,u,v);break;case "AndroidToggle":v.style="Dark"==g.Scheme?g.Checked?v.style+"shape=mxgraph.android.switch_on;fillColor=#666666;":v.style+"shape=mxgraph.android.switch_off;fillColor=#666666;":g.Checked? -v.style+"shape=mxgraph.android.switch_on;fillColor=#E6E6E6;":v.style+"shape=mxgraph.android.switch_off;fillColor=#E6E6E6;";v.style+=f(v.style,g,u,v);break;case "AndroidSlider":v.style+="shape=mxgraph.android.progressScrubberFocused;dx="+g.BarPosition+";fillColor=#33b5e5;";v.style+=f(v.style,g,u,v);break;case "iOSSegmentedControl":Qa=parseInt(g.Tabs);Ea=t;v.style+="strokeColor=none;fillColor=none;";0<Qa&&(Ea/=Qa);fa=[];na=[];for(l=0;l<Qa;l++)fa[l]=new mxCell("",new mxGeometry(l*Ea,0,Ea,r),"strokeColor="+ +v.style+"shape=mxgraph.android.switch_on;fillColor=#E6E6E6;":v.style+"shape=mxgraph.android.switch_off;fillColor=#E6E6E6;";v.style+=f(v.style,g,u,v);break;case "AndroidSlider":v.style+="shape=mxgraph.android.progressScrubberFocused;dx="+g.BarPosition+";fillColor=#33b5e5;";v.style+=f(v.style,g,u,v);break;case "iOSSegmentedControl":Pa=parseInt(g.Tabs);Ea=t;v.style+="strokeColor=none;fillColor=none;";0<Pa&&(Ea/=Pa);fa=[];na=[];for(l=0;l<Pa;l++)fa[l]=new mxCell("",new mxGeometry(l*Ea,0,Ea,r),"strokeColor="+ g.FillColor+";"),fa[l].vertex=!0,v.insert(fa[l]),fa[l].value=c(g["Tab_"+l]),fa[l].style+=k(g["Tab_"+l]),fa[l].style=g.Selected==l?fa[l].style+D(g,u):fa[l].style+"fillColor=none;";v.style+=f(v.style,g,u,v);break;case "iOSSlider":v.style+="shape=mxgraph.ios7ui.slider;strokeColor="+g.FillColor+";fillColor=#ffffff;strokeWidth=2;barPos="+100*g.BarPosition+";";v.style+=f(v.style,g,u,v);break;case "iOSProgressBar":v=new mxCell("",new mxGeometry(Math.round(V),Math.round(ba+.25*r),Math.round(t),Math.round(.5* r)),"html=1;whiteSpace=wrap;strokeColor=none;fillColor=#B5B5B5;");v.vertex=!0;Nb=new mxCell("",new mxGeometry(0,0,t*g.BarPosition,Math.round(.5*r)),"strokeColor=none;"+D(g,u));Nb.vertex=!0;v.insert(Nb);v.style+=f(v.style,g,u,v);break;case "iOSPageControls":v.style+="shape=mxgraph.ios7ui.pageControl;strokeColor=#D6D6D6;";v.style+=f(v.style,g,u,v);break;case "iOSStatusBar":v.style+="shape=mxgraph.ios7ui.appBar;strokeColor=#000000;";var R=new mxCell(c(g.Text),new mxGeometry(.35*t,0,.3*t,r),"strokeColor=none;fillColor=none;"); R.vertex=!0;v.insert(R);R.style+=k(g.Text);var za=new mxCell(c(g.Carrier),new mxGeometry(.09*t,0,.2*t,r),"strokeColor=none;fillColor=none;");za.vertex=!0;v.insert(za);za.style+=k(g.Carrier);v.style+=f(v.style,g,u,v);break;case "iOSSearchBar":v.style+="strokeColor=none;";v.style+=f(v.style,g,u,v)+k(g.Search);v.value=c(g.Search);var W=new mxCell("",new mxGeometry(.3*t,.3*r,.4*r,.4*r),"shape=mxgraph.ios7.icons.looking_glass;strokeColor=#000000;fillColor=none;");W.vertex=!0;v.insert(W);break;case "iOSNavBar":v.style+= "shape=partialRectangle;top=0;right=0;left=0;strokeColor=#979797;";+k(g.Title);v.style+=f(v.style,g,u,v);v.value=c(g.Title);R=new mxCell(c(g.LeftText),new mxGeometry(.03*t,0,.3*t,r),"strokeColor=none;fillColor=none;");R.vertex=!0;v.insert(R);R.style+=k(g.LeftText);za=new mxCell(c(g.RightText),new mxGeometry(.65*t,0,.3*t,r),"strokeColor=none;fillColor=none;");za.vertex=!0;v.insert(za);za.style+=k(g.RightText);W=new mxCell("",new mxGeometry(.02*t,.2*r,.3*r,.5*r),"shape=mxgraph.ios7.misc.left;strokeColor=#007AFF;strokeWidth=2;"); -W.vertex=!0;v.insert(W);break;case "iOSTabs":Qa=parseInt(g.Tabs);Ea=t;v.style+="shape=partialRectangle;right=0;left=0;bottom=0;strokeColor=#979797;";v.style+=f(v.style,g,u,v);0<Qa&&(Ea/=Qa);fa=[];na=[];for(l=0;l<Qa;l++)fa[l]=new mxCell("",new mxGeometry(l*Ea,0,Ea,r),"strokeColor=none;"),fa[l].vertex=!0,v.insert(fa[l]),fa[l].value=c(g["Tab_"+l]),fa[l].style+=b(g["Tab_"+l]),fa[l].style+=a(g["Tab_"+l])+d(g["Tab_"+l])+h(g["Tab_"+l])+p(g["Tab_"+l])+z(g["Tab_"+l])+y(g["Tab_"+l])+x(g["Tab_"+l])+C(g["Tab_"+ -l]),fa[l].style+="verticalAlign=bottom;",fa[l].style=g.Selected==l?fa[l].style+"fillColor=#BBBBBB;":fa[l].style+"fillColor=none;";break;case "iOSDatePicker":var Ra=new mxCell("",new mxGeometry(0,0,.5*t,.2*r),"strokeColor=none;fillColor=none;");Ra.vertex=!0;v.insert(Ra);Ra.value=c(g.Option11);Ra.style+=k(g.Option11);var Sa=new mxCell("",new mxGeometry(.5*t,0,.15*t,.2*r),"strokeColor=none;fillColor=none;");Sa.vertex=!0;v.insert(Sa);Sa.value=c(g.Option21);Sa.style+=k(g.Option21);var Ta=new mxCell("", -new mxGeometry(.65*t,0,.15*t,.2*r),"strokeColor=none;fillColor=none;");Ta.vertex=!0;v.insert(Ta);Ta.value=c(g.Option31);Ta.style+=k(g.Option31);var Ua=new mxCell("",new mxGeometry(0,.2*r,.5*t,.2*r),"strokeColor=none;fillColor=none;");Ua.vertex=!0;v.insert(Ua);Ua.value=c(g.Option12);Ua.style+=k(g.Option12);var Va=new mxCell("",new mxGeometry(.5*t,.2*r,.15*t,.2*r),"strokeColor=none;fillColor=none;");Va.vertex=!0;v.insert(Va);Va.value=c(g.Option22);Va.style+=k(g.Option22);var Wa=new mxCell("",new mxGeometry(.65* -t,.2*r,.15*t,.2*r),"strokeColor=none;fillColor=none;");Wa.vertex=!0;v.insert(Wa);Wa.value=c(g.Option32);Wa.style+=k(g.Option32);var sa=new mxCell("",new mxGeometry(0,.4*r,.5*t,.2*r),"strokeColor=none;fillColor=none;");sa.vertex=!0;v.insert(sa);sa.value=c(g.Option13);sa.style+=k(g.Option13);var ta=new mxCell("",new mxGeometry(.5*t,.4*r,.15*t,.2*r),"strokeColor=none;fillColor=none;");ta.vertex=!0;v.insert(ta);ta.value=c(g.Option23);ta.style+=k(g.Option23);var Xa=new mxCell("",new mxGeometry(.65*t,.4* -r,.15*t,.2*r),"strokeColor=none;fillColor=none;");Xa.vertex=!0;v.insert(Xa);Xa.value=c(g.Option33);Xa.style+=k(g.Option33);var ua=new mxCell("",new mxGeometry(.8*t,.4*r,.15*t,.2*r),"strokeColor=none;fillColor=none;");ua.vertex=!0;v.insert(ua);ua.value=c(g.Option43);ua.style+=k(g.Option43);var va=new mxCell("",new mxGeometry(0,.6*r,.5*t,.2*r),"strokeColor=none;fillColor=none;");va.vertex=!0;v.insert(va);va.value=c(g.Option14);va.style+=k(g.Option14);var Ya=new mxCell("",new mxGeometry(.5*t,.6*r,.15* -t,.2*r),"strokeColor=none;fillColor=none;");Ya.vertex=!0;v.insert(Ya);Ya.value=c(g.Option24);Ya.style+=k(g.Option24);var Za=new mxCell("",new mxGeometry(.65*t,.6*r,.15*t,.2*r),"strokeColor=none;fillColor=none;");Za.vertex=!0;v.insert(Za);Za.value=c(g.Option34);Za.style+=k(g.Option34);var $a=new mxCell("",new mxGeometry(.8*t,.6*r,.15*t,.2*r),"strokeColor=none;fillColor=none;");$a.vertex=!0;v.insert($a);$a.value=c(g.Option44);$a.style+=k(g.Option44);var wa=new mxCell("",new mxGeometry(0,.8*r,.5*t,.2* -r),"strokeColor=none;fillColor=none;");wa.vertex=!0;v.insert(wa);wa.value=c(g.Option15);wa.style+=k(g.Option15);var ab=new mxCell("",new mxGeometry(.5*t,.8*r,.15*t,.2*r),"strokeColor=none;fillColor=none;");ab.vertex=!0;v.insert(ab);ab.value=c(g.Option25);ab.style+=k(g.Option25);var bb=new mxCell("",new mxGeometry(.65*t,.8*r,.15*t,.2*r),"strokeColor=none;fillColor=none;");bb.vertex=!0;v.insert(bb);bb.value=c(g.Option35);bb.style+=k(g.Option35);Na=new mxCell("",new mxGeometry(0,.4*r-2,t,4),"shape=line;strokeColor=#888888;"); -Na.vertex=!0;v.insert(Na);Oa=new mxCell("",new mxGeometry(0,.6*r-2,t,4),"shape=line;strokeColor=#888888;");Oa.vertex=!0;v.insert(Oa);v.style+="strokeColor=none;";v.style+=f(v.style,g,u,v);break;case "iOSTimePicker":Ra=new mxCell("",new mxGeometry(0,0,.25*t,.2*r),"strokeColor=none;fillColor=none;");Ra.vertex=!0;v.insert(Ra);Ra.value=c(g.Option11);Ra.style+=k(g.Option11);Sa=new mxCell("",new mxGeometry(.25*t,0,.3*t,.2*r),"strokeColor=none;fillColor=none;");Sa.vertex=!0;v.insert(Sa);Sa.value=c(g.Option21); -Sa.style+=k(g.Option21);Ua=new mxCell("",new mxGeometry(0,.2*r,.25*t,.2*r),"strokeColor=none;fillColor=none;");Ua.vertex=!0;v.insert(Ua);Ua.value=c(g.Option12);Ua.style+=k(g.Option12);Va=new mxCell("",new mxGeometry(.25*t,.2*r,.3*t,.2*r),"strokeColor=none;fillColor=none;");Va.vertex=!0;v.insert(Va);Va.value=c(g.Option22);Va.style+=k(g.Option22);sa=new mxCell("",new mxGeometry(0,.4*r,.25*t,.2*r),"strokeColor=none;fillColor=none;");sa.vertex=!0;v.insert(sa);sa.value=c(g.Option13);sa.style+=k(g.Option13); -ta=new mxCell("",new mxGeometry(.25*t,.4*r,.3*t,.2*r),"strokeColor=none;fillColor=none;");ta.vertex=!0;v.insert(ta);ta.value=c(g.Option23);ta.style+=k(g.Option23);ua=new mxCell("",new mxGeometry(.7*t,.4*r,.15*t,.2*r),"strokeColor=none;fillColor=none;");ua.vertex=!0;v.insert(ua);ua.value=c(g.Option33);ua.style+=k(g.Option33);va=new mxCell("",new mxGeometry(0,.6*r,.25*t,.2*r),"strokeColor=none;fillColor=none;");va.vertex=!0;v.insert(va);va.value=c(g.Option14);va.style+=k(g.Option14);Ya=new mxCell("", -new mxGeometry(.25*t,.6*r,.3*t,.2*r),"strokeColor=none;fillColor=none;");Ya.vertex=!0;v.insert(Ya);Ya.value=c(g.Option24);Ya.style+=k(g.Option24);$a=new mxCell("",new mxGeometry(.7*t,.6*r,.15*t,.2*r),"strokeColor=none;fillColor=none;");$a.vertex=!0;v.insert($a);$a.value=c(g.Option34);$a.style+=k(g.Option34);wa=new mxCell("",new mxGeometry(0,.8*r,.25*t,.2*r),"strokeColor=none;fillColor=none;");wa.vertex=!0;v.insert(wa);wa.value=c(g.Option15);wa.style+=k(g.Option15);ab=new mxCell("",new mxGeometry(.25* -t,.8*r,.3*t,.2*r),"strokeColor=none;fillColor=none;");ab.vertex=!0;v.insert(ab);ab.value=c(g.Option25);ab.style+=k(g.Option25);Na=new mxCell("",new mxGeometry(0,.4*r-2,t,4),"shape=line;strokeColor=#888888;");Na.vertex=!0;v.insert(Na);Oa=new mxCell("",new mxGeometry(0,.6*r-2,t,4),"shape=line;strokeColor=#888888;");Oa.vertex=!0;v.insert(Oa);v.style+="strokeColor=none;";v.style+=f(v.style,g,u,v);break;case "iOSCountdownPicker":Ta=new mxCell("",new mxGeometry(.45*t,0,.2*t,.2*r),"strokeColor=none;fillColor=none;"); -Ta.vertex=!0;v.insert(Ta);Ta.value=c(g.Option31);Ta.style+=k(g.Option31);Wa=new mxCell("",new mxGeometry(.45*t,.2*r,.2*t,.2*r),"strokeColor=none;fillColor=none;");Wa.vertex=!0;v.insert(Wa);Wa.value=c(g.Option32);Wa.style+=k(g.Option32);sa=new mxCell("",new mxGeometry(0,.4*r,.25*t,.2*r),"strokeColor=none;fillColor=none;");sa.vertex=!0;v.insert(sa);sa.value=c(g.Option13);sa.style+=k(g.Option13);ta=new mxCell("",new mxGeometry(.2*t,.4*r,.25*t,.2*r),"strokeColor=none;fillColor=none;");ta.vertex=!0;v.insert(ta); -ta.value=c(g.Option23);ta.style+=k(g.Option23);Xa=new mxCell("",new mxGeometry(.45*t,.4*r,.2*t,.2*r),"strokeColor=none;fillColor=none;");Xa.vertex=!0;v.insert(Xa);Xa.value=c(g.Option33);Xa.style+=k(g.Option33);ua=new mxCell("",new mxGeometry(.6*t,.4*r,.2*t,.2*r),"strokeColor=none;fillColor=none;");ua.vertex=!0;v.insert(ua);ua.value=c(g.Option43);ua.style+=k(g.Option43);va=new mxCell("",new mxGeometry(0,.6*r,.25*t,.2*r),"strokeColor=none;fillColor=none;");va.vertex=!0;v.insert(va);va.value=c(g.Option14); -va.style+=k(g.Option14);Za=new mxCell("",new mxGeometry(.45*t,.6*r,.2*t,.2*r),"strokeColor=none;fillColor=none;");Za.vertex=!0;v.insert(Za);Za.value=c(g.Option34);Za.style+=k(g.Option34);wa=new mxCell("",new mxGeometry(0,.8*r,.25*t,.2*r),"strokeColor=none;fillColor=none;");wa.vertex=!0;v.insert(wa);wa.value=c(g.Option15);wa.style+=k(g.Option15);bb=new mxCell("",new mxGeometry(.45*t,.8*r,.2*t,.2*r),"strokeColor=none;fillColor=none;");bb.vertex=!0;v.insert(bb);bb.value=c(g.Option35);bb.style+=k(g.Option35); -Na=new mxCell("",new mxGeometry(0,.4*r-2,t,4),"shape=line;strokeColor=#888888;");Na.vertex=!0;v.insert(Na);Oa=new mxCell("",new mxGeometry(0,.6*r-2,t,4),"shape=line;strokeColor=#888888;");Oa.vertex=!0;v.insert(Oa);v.style+="strokeColor=none;";v.style+=f(v.style,g,u,v);break;case "iOSBasicCell":v.style+="shape=partialRectangle;left=0;top=0;right=0;fillColor=#ffffff;strokeColor=#C8C7CC;spacing=0;align=left;spacingLeft="+.6*g.SeparatorInset+";";v.style+=b(g.text)+a(g.text)+d(g.text)+F(g.text);v.style+= +W.vertex=!0;v.insert(W);break;case "iOSTabs":Pa=parseInt(g.Tabs);Ea=t;v.style+="shape=partialRectangle;right=0;left=0;bottom=0;strokeColor=#979797;";v.style+=f(v.style,g,u,v);0<Pa&&(Ea/=Pa);fa=[];na=[];for(l=0;l<Pa;l++)fa[l]=new mxCell("",new mxGeometry(l*Ea,0,Ea,r),"strokeColor=none;"),fa[l].vertex=!0,v.insert(fa[l]),fa[l].value=c(g["Tab_"+l]),fa[l].style+=b(g["Tab_"+l]),fa[l].style+=a(g["Tab_"+l])+d(g["Tab_"+l])+h(g["Tab_"+l])+p(g["Tab_"+l])+y(g["Tab_"+l])+z(g["Tab_"+l])+x(g["Tab_"+l])+C(g["Tab_"+ +l]),fa[l].style+="verticalAlign=bottom;",fa[l].style=g.Selected==l?fa[l].style+"fillColor=#BBBBBB;":fa[l].style+"fillColor=none;";break;case "iOSDatePicker":var Qa=new mxCell("",new mxGeometry(0,0,.5*t,.2*r),"strokeColor=none;fillColor=none;");Qa.vertex=!0;v.insert(Qa);Qa.value=c(g.Option11);Qa.style+=k(g.Option11);var Ra=new mxCell("",new mxGeometry(.5*t,0,.15*t,.2*r),"strokeColor=none;fillColor=none;");Ra.vertex=!0;v.insert(Ra);Ra.value=c(g.Option21);Ra.style+=k(g.Option21);var Sa=new mxCell("", +new mxGeometry(.65*t,0,.15*t,.2*r),"strokeColor=none;fillColor=none;");Sa.vertex=!0;v.insert(Sa);Sa.value=c(g.Option31);Sa.style+=k(g.Option31);var Ta=new mxCell("",new mxGeometry(0,.2*r,.5*t,.2*r),"strokeColor=none;fillColor=none;");Ta.vertex=!0;v.insert(Ta);Ta.value=c(g.Option12);Ta.style+=k(g.Option12);var Ua=new mxCell("",new mxGeometry(.5*t,.2*r,.15*t,.2*r),"strokeColor=none;fillColor=none;");Ua.vertex=!0;v.insert(Ua);Ua.value=c(g.Option22);Ua.style+=k(g.Option22);var Va=new mxCell("",new mxGeometry(.65* +t,.2*r,.15*t,.2*r),"strokeColor=none;fillColor=none;");Va.vertex=!0;v.insert(Va);Va.value=c(g.Option32);Va.style+=k(g.Option32);var sa=new mxCell("",new mxGeometry(0,.4*r,.5*t,.2*r),"strokeColor=none;fillColor=none;");sa.vertex=!0;v.insert(sa);sa.value=c(g.Option13);sa.style+=k(g.Option13);var ta=new mxCell("",new mxGeometry(.5*t,.4*r,.15*t,.2*r),"strokeColor=none;fillColor=none;");ta.vertex=!0;v.insert(ta);ta.value=c(g.Option23);ta.style+=k(g.Option23);var Wa=new mxCell("",new mxGeometry(.65*t,.4* +r,.15*t,.2*r),"strokeColor=none;fillColor=none;");Wa.vertex=!0;v.insert(Wa);Wa.value=c(g.Option33);Wa.style+=k(g.Option33);var ua=new mxCell("",new mxGeometry(.8*t,.4*r,.15*t,.2*r),"strokeColor=none;fillColor=none;");ua.vertex=!0;v.insert(ua);ua.value=c(g.Option43);ua.style+=k(g.Option43);var va=new mxCell("",new mxGeometry(0,.6*r,.5*t,.2*r),"strokeColor=none;fillColor=none;");va.vertex=!0;v.insert(va);va.value=c(g.Option14);va.style+=k(g.Option14);var Xa=new mxCell("",new mxGeometry(.5*t,.6*r,.15* +t,.2*r),"strokeColor=none;fillColor=none;");Xa.vertex=!0;v.insert(Xa);Xa.value=c(g.Option24);Xa.style+=k(g.Option24);var Ya=new mxCell("",new mxGeometry(.65*t,.6*r,.15*t,.2*r),"strokeColor=none;fillColor=none;");Ya.vertex=!0;v.insert(Ya);Ya.value=c(g.Option34);Ya.style+=k(g.Option34);var Za=new mxCell("",new mxGeometry(.8*t,.6*r,.15*t,.2*r),"strokeColor=none;fillColor=none;");Za.vertex=!0;v.insert(Za);Za.value=c(g.Option44);Za.style+=k(g.Option44);var wa=new mxCell("",new mxGeometry(0,.8*r,.5*t,.2* +r),"strokeColor=none;fillColor=none;");wa.vertex=!0;v.insert(wa);wa.value=c(g.Option15);wa.style+=k(g.Option15);var $a=new mxCell("",new mxGeometry(.5*t,.8*r,.15*t,.2*r),"strokeColor=none;fillColor=none;");$a.vertex=!0;v.insert($a);$a.value=c(g.Option25);$a.style+=k(g.Option25);var ab=new mxCell("",new mxGeometry(.65*t,.8*r,.15*t,.2*r),"strokeColor=none;fillColor=none;");ab.vertex=!0;v.insert(ab);ab.value=c(g.Option35);ab.style+=k(g.Option35);Ma=new mxCell("",new mxGeometry(0,.4*r-2,t,4),"shape=line;strokeColor=#888888;"); +Ma.vertex=!0;v.insert(Ma);Na=new mxCell("",new mxGeometry(0,.6*r-2,t,4),"shape=line;strokeColor=#888888;");Na.vertex=!0;v.insert(Na);v.style+="strokeColor=none;";v.style+=f(v.style,g,u,v);break;case "iOSTimePicker":Qa=new mxCell("",new mxGeometry(0,0,.25*t,.2*r),"strokeColor=none;fillColor=none;");Qa.vertex=!0;v.insert(Qa);Qa.value=c(g.Option11);Qa.style+=k(g.Option11);Ra=new mxCell("",new mxGeometry(.25*t,0,.3*t,.2*r),"strokeColor=none;fillColor=none;");Ra.vertex=!0;v.insert(Ra);Ra.value=c(g.Option21); +Ra.style+=k(g.Option21);Ta=new mxCell("",new mxGeometry(0,.2*r,.25*t,.2*r),"strokeColor=none;fillColor=none;");Ta.vertex=!0;v.insert(Ta);Ta.value=c(g.Option12);Ta.style+=k(g.Option12);Ua=new mxCell("",new mxGeometry(.25*t,.2*r,.3*t,.2*r),"strokeColor=none;fillColor=none;");Ua.vertex=!0;v.insert(Ua);Ua.value=c(g.Option22);Ua.style+=k(g.Option22);sa=new mxCell("",new mxGeometry(0,.4*r,.25*t,.2*r),"strokeColor=none;fillColor=none;");sa.vertex=!0;v.insert(sa);sa.value=c(g.Option13);sa.style+=k(g.Option13); +ta=new mxCell("",new mxGeometry(.25*t,.4*r,.3*t,.2*r),"strokeColor=none;fillColor=none;");ta.vertex=!0;v.insert(ta);ta.value=c(g.Option23);ta.style+=k(g.Option23);ua=new mxCell("",new mxGeometry(.7*t,.4*r,.15*t,.2*r),"strokeColor=none;fillColor=none;");ua.vertex=!0;v.insert(ua);ua.value=c(g.Option33);ua.style+=k(g.Option33);va=new mxCell("",new mxGeometry(0,.6*r,.25*t,.2*r),"strokeColor=none;fillColor=none;");va.vertex=!0;v.insert(va);va.value=c(g.Option14);va.style+=k(g.Option14);Xa=new mxCell("", +new mxGeometry(.25*t,.6*r,.3*t,.2*r),"strokeColor=none;fillColor=none;");Xa.vertex=!0;v.insert(Xa);Xa.value=c(g.Option24);Xa.style+=k(g.Option24);Za=new mxCell("",new mxGeometry(.7*t,.6*r,.15*t,.2*r),"strokeColor=none;fillColor=none;");Za.vertex=!0;v.insert(Za);Za.value=c(g.Option34);Za.style+=k(g.Option34);wa=new mxCell("",new mxGeometry(0,.8*r,.25*t,.2*r),"strokeColor=none;fillColor=none;");wa.vertex=!0;v.insert(wa);wa.value=c(g.Option15);wa.style+=k(g.Option15);$a=new mxCell("",new mxGeometry(.25* +t,.8*r,.3*t,.2*r),"strokeColor=none;fillColor=none;");$a.vertex=!0;v.insert($a);$a.value=c(g.Option25);$a.style+=k(g.Option25);Ma=new mxCell("",new mxGeometry(0,.4*r-2,t,4),"shape=line;strokeColor=#888888;");Ma.vertex=!0;v.insert(Ma);Na=new mxCell("",new mxGeometry(0,.6*r-2,t,4),"shape=line;strokeColor=#888888;");Na.vertex=!0;v.insert(Na);v.style+="strokeColor=none;";v.style+=f(v.style,g,u,v);break;case "iOSCountdownPicker":Sa=new mxCell("",new mxGeometry(.45*t,0,.2*t,.2*r),"strokeColor=none;fillColor=none;"); +Sa.vertex=!0;v.insert(Sa);Sa.value=c(g.Option31);Sa.style+=k(g.Option31);Va=new mxCell("",new mxGeometry(.45*t,.2*r,.2*t,.2*r),"strokeColor=none;fillColor=none;");Va.vertex=!0;v.insert(Va);Va.value=c(g.Option32);Va.style+=k(g.Option32);sa=new mxCell("",new mxGeometry(0,.4*r,.25*t,.2*r),"strokeColor=none;fillColor=none;");sa.vertex=!0;v.insert(sa);sa.value=c(g.Option13);sa.style+=k(g.Option13);ta=new mxCell("",new mxGeometry(.2*t,.4*r,.25*t,.2*r),"strokeColor=none;fillColor=none;");ta.vertex=!0;v.insert(ta); +ta.value=c(g.Option23);ta.style+=k(g.Option23);Wa=new mxCell("",new mxGeometry(.45*t,.4*r,.2*t,.2*r),"strokeColor=none;fillColor=none;");Wa.vertex=!0;v.insert(Wa);Wa.value=c(g.Option33);Wa.style+=k(g.Option33);ua=new mxCell("",new mxGeometry(.6*t,.4*r,.2*t,.2*r),"strokeColor=none;fillColor=none;");ua.vertex=!0;v.insert(ua);ua.value=c(g.Option43);ua.style+=k(g.Option43);va=new mxCell("",new mxGeometry(0,.6*r,.25*t,.2*r),"strokeColor=none;fillColor=none;");va.vertex=!0;v.insert(va);va.value=c(g.Option14); +va.style+=k(g.Option14);Ya=new mxCell("",new mxGeometry(.45*t,.6*r,.2*t,.2*r),"strokeColor=none;fillColor=none;");Ya.vertex=!0;v.insert(Ya);Ya.value=c(g.Option34);Ya.style+=k(g.Option34);wa=new mxCell("",new mxGeometry(0,.8*r,.25*t,.2*r),"strokeColor=none;fillColor=none;");wa.vertex=!0;v.insert(wa);wa.value=c(g.Option15);wa.style+=k(g.Option15);ab=new mxCell("",new mxGeometry(.45*t,.8*r,.2*t,.2*r),"strokeColor=none;fillColor=none;");ab.vertex=!0;v.insert(ab);ab.value=c(g.Option35);ab.style+=k(g.Option35); +Ma=new mxCell("",new mxGeometry(0,.4*r-2,t,4),"shape=line;strokeColor=#888888;");Ma.vertex=!0;v.insert(Ma);Na=new mxCell("",new mxGeometry(0,.6*r-2,t,4),"shape=line;strokeColor=#888888;");Na.vertex=!0;v.insert(Na);v.style+="strokeColor=none;";v.style+=f(v.style,g,u,v);break;case "iOSBasicCell":v.style+="shape=partialRectangle;left=0;top=0;right=0;fillColor=#ffffff;strokeColor=#C8C7CC;spacing=0;align=left;spacingLeft="+.6*g.SeparatorInset+";";v.style+=b(g.text)+a(g.text)+d(g.text)+F(g.text);v.style+= f(v.style,g,u,v);v.value=c(g.text);switch(g.AccessoryIndicatorType){case "Disclosure":W=new mxCell("",new mxGeometry(.91*t,.35*r,.15*r,.3*r),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");W.vertex=!0;v.insert(W);break;case "DetailDisclosure":W=new mxCell("",new mxGeometry(.91*t,.35*r,.15*r,.3*r),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");W.vertex=!0;v.insert(W);var ma=new mxCell("",new mxGeometry(.79*t,.25*r,.5*r,.5*r),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;"); ma.vertex=!0;v.insert(ma);break;case "DetailIndicator":ma=new mxCell("",new mxGeometry(.87*t,.25*r,.5*r,.5*r),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");ma.vertex=!0;v.insert(ma);break;case "CheckMark":W=new mxCell("",new mxGeometry(.89*t,.37*r,.4*r,.26*r),"shape=mxgraph.ios7.misc.check;strokeColor=#007AFF;strokeWidth=2;"),W.vertex=!0,v.insert(W)}break;case "iOSSubtitleCell":v.style+="shape=partialRectangle;left=0;top=0;right=0;fillColor=#ffffff;strokeColor=#C8C7CC;align=left;spacing=0;verticalAlign=top;spacingLeft="+ .6*g.SeparatorInset+";";v.style+=b(g.subtext)+a(g.subtext)+d(g.subtext);v.style+=f(v.style,g,u,v);v.value=c(g.subtext);var oa=new mxCell("",new mxGeometry(0,.4*r,t,.6*r),"fillColor=none;strokeColor=none;spacing=0;align=left;verticalAlign=bottom;spacingLeft="+.6*g.SeparatorInset+";");oa.vertex=!0;v.insert(oa);oa.style+=b(g.text)+a(g.text)+d(g.text);oa.value=c(g.text);switch(g.AccessoryIndicatorType){case "Disclosure":W=new mxCell("",new mxGeometry(.91*t,.35*r,.15*r,.3*r),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;"); @@ -92,8 +92,8 @@ break;case "SMSitemap":q=new mxCell("",new mxGeometry(.5*t-.35*r,.2*r,.7*r,.6*r) break;case "SMAudio":q=new mxCell("",new mxGeometry(.5*t-.3*r,.2*r,.6*r,.6*r),"part=1;shape=mxgraph.mscae.general.audio;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMCalendar":q=new mxCell("",new mxGeometry(.5*t-.4*r,.15*r,.8*r,.7*r),"part=1;shape=mxgraph.office.concepts.form;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMChart":var I=D(g,u),I=""==I?"#ffffff;":I.replace("fillColor=",""),q=new mxCell("",new mxGeometry(.5*t-.35*r,.15*r,.7*r,.7*r),"part=1;shape=mxgraph.ios7.icons.pie_chart;fillColor=#e6e6e6;fillOpacity=50;strokeWidth=4;strokeColor="+ I);break;case "SMCloud":q=new mxCell("",new mxGeometry(.5*t-.4*r,.27*r,.8*r,.46*r),"part=1;shape=mxgraph.networks.cloud;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMDocument":q=new mxCell("",new mxGeometry(.5*t-.25*r,.15*r,.5*r,.7*r),"part=1;shape=mxgraph.mscae.enterprise.document;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMForm":q=new mxCell("",new mxGeometry(.5*t-.4*r,.15*r,.8*r,.7*r),"part=1;shape=mxgraph.office.concepts.form;fillColor=#e6e6e6;opacity=50;strokeColor=none;"); break;case "SMGame":q=new mxCell("",new mxGeometry(.5*t-.4*r,.2*r,.8*r,.6*r),"part=1;shape=mxgraph.mscae.general.game_controller;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMUpload":q=new mxCell("",new mxGeometry(.5*t-.4*r,.2*r,.8*r,.6*r),"part=1;shape=mxgraph.mscae.enterprise.backup_online;fillColor=#e6e6e6;opacity=50;strokeColor=none;")}q.vertex=!0;v.insert(q);q.style+=k(g);q.value=c(g.Text);v.style+=f(v.style,g,u,v);break;case "UMLMultiplicityBlock":v.style+="strokeColor=none;fillColor=none;"; -q=new mxCell("",new mxGeometry(.1*t,0,.9*t,.9*r),"part=1;");q.vertex=!0;v.insert(q);q.style+=f(q.style,g,u,q);w=new mxCell("",new mxGeometry(0,.1*r,.9*t,.9*r),"part=1;");w.vertex=!0;v.insert(w);w.style+=k(g.Text);w.style+=f(w.style,g,u,w);w.value=c(g.Text);break;case "UMLConstraintBlock":var gb=new mxCell("",new mxGeometry(0,0,.25*r,r),"shape=curlyBracket;rounded=1;");gb.vertex=!0;v.insert(gb);var hb=new mxCell("",new mxGeometry(t-.25*r,0,.25*r,r),"shape=curlyBracket;rounded=1;flipH=1;");hb.vertex= -!0;v.insert(hb);la=new mxCell("",new mxGeometry(.25*r,0,t-.5*r,r),"strokeColor=none;fillColor=none;");la.vertex=!0;la.value=c(g);v.insert(la);v.style="strokeColor=none;fillColor=none;";v.style+=f(v.style,g,u,v);gb.style+=B(g,u,gb);hb.style+=B(g,u,hb);la.style+=a(g,la);gb.style+=f(gb.style,g,u,gb);hb.style+=f(hb.style,g,u,hb);la.style+=f(la.style,g,u,la);break;case "UMLTextBlock":v.style+="strokeColor=none;"+k(g.Text);v.style+=f(v.style,g,u,v);v.value=c(g.Text);break;case "BPMNActivity":switch(g.bpmnActivityType){case 1:v.style+= +q=new mxCell("",new mxGeometry(.1*t,0,.9*t,.9*r),"part=1;");q.vertex=!0;v.insert(q);q.style+=f(q.style,g,u,q);w=new mxCell("",new mxGeometry(0,.1*r,.9*t,.9*r),"part=1;");w.vertex=!0;v.insert(w);w.style+=k(g.Text);w.style+=f(w.style,g,u,w);w.value=c(g.Text);break;case "UMLConstraintBlock":var hb=new mxCell("",new mxGeometry(0,0,.25*r,r),"shape=curlyBracket;rounded=1;");hb.vertex=!0;v.insert(hb);var ib=new mxCell("",new mxGeometry(t-.25*r,0,.25*r,r),"shape=curlyBracket;rounded=1;flipH=1;");ib.vertex= +!0;v.insert(ib);la=new mxCell("",new mxGeometry(.25*r,0,t-.5*r,r),"strokeColor=none;fillColor=none;");la.vertex=!0;la.value=c(g);v.insert(la);v.style="strokeColor=none;fillColor=none;";v.style+=f(v.style,g,u,v);hb.style+=B(g,u,hb);ib.style+=B(g,u,ib);la.style+=a(g,la);hb.style+=f(hb.style,g,u,hb);ib.style+=f(ib.style,g,u,ib);la.style+=f(la.style,g,u,la);break;case "UMLTextBlock":v.style+="strokeColor=none;"+k(g.Text);v.style+=f(v.style,g,u,v);v.value=c(g.Text);break;case "BPMNActivity":switch(g.bpmnActivityType){case 1:v.style+= k(g.Text);v.value=c(g.Text);break;case 2:v.style+="shape=ext;double=1;"+k(g.Text);v.value=c(g.Text);break;case 3:v.style+="shape=ext;dashed=1;dashPattern=2 1;"+k(g.Text);v.value=c(g.Text);break;case 4:v.style+="shape=ext;strokeWidth=2;"+k(g.Text),v.value=c(g.Text)}if(0!=g.bpmnTaskType){switch(g.bpmnTaskType){case 1:q=new mxCell("",new mxGeometry(0,0,19,12),"shape=message;");q.geometry.offset=new mxPoint(4,7);break;case 2:q=new mxCell("",new mxGeometry(0,0,19,12),"shape=message;");q.geometry.offset= new mxPoint(4,7);break;case 3:q=new mxCell("",new mxGeometry(0,0,15,15),"shape=mxgraph.bpmn.user_task;");q.geometry.offset=new mxPoint(4,5);break;case 4:q=new mxCell("",new mxGeometry(0,0,15,10),"shape=mxgraph.bpmn.manual_task;");q.geometry.offset=new mxPoint(4,7);break;case 5:q=new mxCell("",new mxGeometry(0,0,18,13),"shape=mxgraph.bpmn.business_rule_task;");q.geometry.offset=new mxPoint(4,7);break;case 6:q=new mxCell("",new mxGeometry(0,0,15,15),"shape=mxgraph.bpmn.service_task;");q.geometry.offset= new mxPoint(4,5);break;case 7:q=new mxCell("",new mxGeometry(0,0,15,15),"shape=mxgraph.bpmn.script_task;"),q.geometry.offset=new mxPoint(4,5)}if(1==g.bpmnTaskType){var Pb=D(g,u),I=A(g,u),I=I.replace("strokeColor","fillColor"),Pb=Pb.replace("fillColor","strokeColor");""==I&&(I="fillColor=#000000;");""==Pb&&(Pb="strokeColor=#ffffff;");q.style+=Pb+I+"part=1;"}else q.style+=D(g,u)+A(g,u)+"part=1;";q.geometry.relative=!0;q.vertex=!0;v.insert(q)}var Qb=0;0!=g.bpmnActivityMarker1&&Qb++;0!=g.bpmnActivityMarker2&& @@ -111,9 +111,9 @@ q.geometry.offset=new mxPoint(3,3),q.style+=A(g,u),q.geometry.relative=!0,q.vert 0,t,r),"fillColor=#000000;strokeColor=none;opacity=30;");q.vertex=!0;v.insert(q);break;case "DFDExternalEntityBlock":v.style+="strokeColor=none;fillColor=none;";v.style+=f(v.style,g,u,v);q=new mxCell("",new mxGeometry(0,0,.95*t,.95*r),"part=1;");q.vertex=!0;v.insert(q);q.style+=f(q.style,g,u,q);w=new mxCell("",new mxGeometry(.05*t,.05*r,.95*t,.95*r),"part=1;");w.vertex=!0;v.insert(w);w.style+=k(g.Text);w.style+=f(w.style,g,u,w);w.value=c(g.Text);break;case "GSDFDDataStoreBlock":v.style+="shape=partialRectangle;right=0;"+ k(g.Text);v.style+=f(v.style,g,u,v);v.value=c(g.Text);q=new mxCell("",new mxGeometry(0,0,.2*t,r),"part=1;");q.vertex=!0;v.insert(q);q.style+=k(g.Number);q.style+=f(q.style,g,u,q);q.value=c(g.Number);break;case "VSMDedicatedProcessBlock":case "VSMProductionControlBlock":v.style+="shape=mxgraph.lean_mapping.manufacturing_process;spacingTop=15;";"VSMDedicatedProcessBlock"==e.Class?v.value=c(g.Text):"VSMProductionControlBlock"==e.Class&&(v.value=c(g.Resources));v.style+=f(v.style,g,u,v);"VSMDedicatedProcessBlock"== e.Class&&(q=new mxCell("",new mxGeometry(0,1,11,9),"part=1;shape=mxgraph.lean_mapping.operator;"),q.geometry.relative=!0,q.geometry.offset=new mxPoint(4,-13),q.vertex=!0,v.insert(q),q.style+=f(q.style,g,u,q));R=new mxCell("",new mxGeometry(0,0,t,15),"strokeColor=none;fillColor=none;part=1;");R.vertex=!0;v.insert(R);R.value=c(g.Title);R.style+=k(g.Title);break;case "VSMSharedProcessBlock":v.style+="shape=mxgraph.lean_mapping.manufacturing_process_shared;spacingTop=-5;verticalAlign=top;";v.value=c(g.Text); -v.style+=f(v.style,g,u,v);R=new mxCell("",new mxGeometry(.1*t,.3*r,.8*t,.6*r),"part=1;");R.vertex=!0;v.insert(R);R.value=c(g.Resource);R.style+=k(g.Resource);R.style+=f(R.style,g,u,R);break;case "VSMWorkcellBlock":v.style+="shape=mxgraph.lean_mapping.work_cell;verticalAlign=top;spacingTop=-2;";v.style+=f(v.style,g,u,v);v.value=c(g.Text);break;case "VSMSafetyBufferStockBlock":case "VSMDatacellBlock":v.style+="strokeColor=none;fillColor=none;";v.style+=f(v.style,g,u,v);var xa=r,Pa=parseInt(g.Cells), -N=f("part=1;",g,u,v);0<Pa&&(xa/=Pa);H=[];na=[];for(l=1;l<=Pa;l++)H[l]=new mxCell("",new mxGeometry(0,(l-1)*xa,t,xa),N),H[l].vertex=!0,v.insert(H[l]),H[l].value=c(g["cell_"+l]),H[l].style+=k(g["cell_"+l]);break;case "VSMInventoryBlock":v.style+="shape=mxgraph.lean_mapping.inventory_box;verticalLabelPosition=bottom;verticalAlign=top;";v.style+=f(v.style,g,u,v);v.value=c(g.Text);break;case "VSMSupermarketBlock":v.style+="strokeColor=none;";v.style+=f(v.style,g,u,v);xa=r;Pa=parseInt(g.Cells);N=f("part=1;fillColor=none;", -g,u,v);0<Pa&&(xa/=Pa);H=[];Ja=[];for(l=1;l<=Pa;l++)H[l]=new mxCell("",new mxGeometry(.5*t,(l-1)*xa,.5*t,xa),"shape=partialRectangle;left=0;"+N),H[l].vertex=!0,v.insert(H[l]),Ja[l]=new mxCell("",new mxGeometry(0,(l-1)*xa,t,xa),"strokeColor=none;fillColor=none;part=1;"),Ja[l].vertex=!0,v.insert(Ja[l]),Ja[l].value=c(g["cell_"+l]),Ja[l].style+=k(g["cell_"+l]);break;case "VSMFIFOLaneBlock":v.style+="shape=mxgraph.lean_mapping.fifo_sequence_flow;fontStyle=0;fontSize=18";v.style+=f(v.style,g,u,v);v.value= +v.style+=f(v.style,g,u,v);R=new mxCell("",new mxGeometry(.1*t,.3*r,.8*t,.6*r),"part=1;");R.vertex=!0;v.insert(R);R.value=c(g.Resource);R.style+=k(g.Resource);R.style+=f(R.style,g,u,R);break;case "VSMWorkcellBlock":v.style+="shape=mxgraph.lean_mapping.work_cell;verticalAlign=top;spacingTop=-2;";v.style+=f(v.style,g,u,v);v.value=c(g.Text);break;case "VSMSafetyBufferStockBlock":case "VSMDatacellBlock":v.style+="strokeColor=none;fillColor=none;";v.style+=f(v.style,g,u,v);var xa=r,Oa=parseInt(g.Cells), +N=f("part=1;",g,u,v);0<Oa&&(xa/=Oa);H=[];na=[];for(l=1;l<=Oa;l++)H[l]=new mxCell("",new mxGeometry(0,(l-1)*xa,t,xa),N),H[l].vertex=!0,v.insert(H[l]),H[l].value=c(g["cell_"+l]),H[l].style+=k(g["cell_"+l]);break;case "VSMInventoryBlock":v.style+="shape=mxgraph.lean_mapping.inventory_box;verticalLabelPosition=bottom;verticalAlign=top;";v.style+=f(v.style,g,u,v);v.value=c(g.Text);break;case "VSMSupermarketBlock":v.style+="strokeColor=none;";v.style+=f(v.style,g,u,v);xa=r;Oa=parseInt(g.Cells);N=f("part=1;fillColor=none;", +g,u,v);0<Oa&&(xa/=Oa);H=[];Ja=[];for(l=1;l<=Oa;l++)H[l]=new mxCell("",new mxGeometry(.5*t,(l-1)*xa,.5*t,xa),"shape=partialRectangle;left=0;"+N),H[l].vertex=!0,v.insert(H[l]),Ja[l]=new mxCell("",new mxGeometry(0,(l-1)*xa,t,xa),"strokeColor=none;fillColor=none;part=1;"),Ja[l].vertex=!0,v.insert(Ja[l]),Ja[l].value=c(g["cell_"+l]),Ja[l].style+=k(g["cell_"+l]);break;case "VSMFIFOLaneBlock":v.style+="shape=mxgraph.lean_mapping.fifo_sequence_flow;fontStyle=0;fontSize=18";v.style+=f(v.style,g,u,v);v.value= "FIFO";break;case "VSMGoSeeProductionBlock":v.style+="shape=ellipse;";v.style+=f(v.style,g,u,v);v.value=c(g.Text);q=new mxCell("",new mxGeometry(.17*t,.2*r,13,6),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;whiteSpace=wrap;html=1;");q.vertex=!0;v.insert(q);q.style+=f(q.style,g,u,q);break;case "VSMProductionKanbanBatchBlock":v.style+="strokeColor=none;fillColor=none;";N="shape=card;size=18;flipH=1;part=1;";q=new mxCell("",new mxGeometry(.1*t,0,.9*t,.8*r),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;"+ N);q.vertex=!0;v.insert(q);q.style+=f(q.style,g,u,q);w=new mxCell("",new mxGeometry(.05*t,.1*r,.9*t,.8*r),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;"+N);w.vertex=!0;v.insert(w);w.style+=f(w.style,g,u,w);var E=new mxCell("",new mxGeometry(0,.2*r,.9*t,.8*r),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;whiteSpace=wrap;html=1;spacing=2;"+N);E.vertex=!0;v.insert(E);E.style+=f(E.style,g,u,E);E.value=c(g.Text);break;case "AWSRoundedRectangleContainerBlock2":v.style+= "strokeColor=none;fillColor=none;";g.Spotfleet?(q=new mxCell("",new mxGeometry(0,0,t,r-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),q.geometry.offset=new mxPoint(0,20),q.geometry.relative=!0,q.vertex=!0,v.insert(q),q.style+=f(q.style,g,u,q),q.value=c(g.Title),w=new mxCell("",new mxGeometry(0,0,35,40),"strokeColor=none;shape=mxgraph.aws3.spot_instance;fillColor=#f58536;"),w.geometry.relative=!0,w.geometry.offset=new mxPoint(30, @@ -173,7 +173,7 @@ break;case "PESharedIndicatorBlock":v.style+="shape=mxgraph.pid2inst.sharedCont; q.vertex=!0,v.insert(q),q.style+=k(g.TopText),q.style+=f(q.style,g,u,q),q.value=c(g.TopText),w=new mxCell("",new mxGeometry(0,.5*t,t,.5*t),"part=1;strokeColor=none;fillColor=none;")):(q=new mxCell("",new mxGeometry(0,0,t,.5*r),"part=1;strokeColor=none;fillColor=none;"),q.vertex=!0,v.insert(q),q.style+=k(g.TopText),q.style+=f(q.style,g,u,q),q.value=c(g.TopText),w=new mxCell("",new mxGeometry(0,.5*r,t,.5*r),"part=1;strokeColor=none;fillColor=none;"));w.vertex=!0;v.insert(w);w.style+=k(g.BotText);w.style+= f(w.style,g,u,w);w.value=c(g.BotText);switch(g.instrumentLocation){case 0:v.style+="mounting=field;";break;case 1:v.style+="mounting=inaccessible;";break;case 2:v.style+="mounting=room;";break;case 3:v.style+="mounting=local;"}break;case "PEGateValveBlock":case "PEGlobeValveBlock":case "PEAngleValveBlock":case "PEAngleGlobeValveBlock":case "PEPoweredValveBlock":var hc=!1;"PEPoweredValveBlock"==e.Class?1!=g.poweredHandOperated&&(hc=!0):1!=g.handOperated&&(hc=!0);if(hc){var g=n(e).Properties,T=g.BoundingBox, tc=T.h;T.h="PEAngleValveBlock"==e.Class||"PEAngleGlobeValveBlock"==e.Class?.7*T.h:.6*T.h;v=new mxCell("",new mxGeometry(Math.round(.6*T.x+0),Math.round(.6*(T.y+tc-T.h)+0),Math.round(.6*T.w),Math.round(.6*T.h)),"");v.vertex=!0;aa(v,e)}if("PEPoweredValveBlock"==e.Class)v.style+="shape=mxgraph.pid2valves.valve;verticalLabelPosition=bottom;verticalAlign=top;",v.style+=f(v.style,g,u,v),1==g.poweredHandOperated?(v.style+="valveType=gate;actuator=powered;",q=new mxCell("",new mxGeometry(.325*t,0,.35*t,.35* -r),"part=1;strokeColor=none;fillColor=none;spacingTop=2;"),q.vertex=!0,v.insert(q),q.style+="fontSize=6;"+a(g.PoweredText)+d(g.PoweredText)+h(g.PoweredText)+p(g.PoweredText)+z(g.PoweredText)+x(g.PoweredText)+C(g.PoweredText)+F(g.PoweredText),q.style+=f(q.style,g,u,q),q.value=c(g.PoweredText)):v.style+="valveType=gate;";else{v.style+="verticalLabelPosition=bottom;verticalAlign=top;shape=mxgraph.pid2valves.valve;";v.value=c(g.Text);switch(e.Class){case "PEGateValveBlock":v.style+="valveType=gate;"; +r),"part=1;strokeColor=none;fillColor=none;spacingTop=2;"),q.vertex=!0,v.insert(q),q.style+="fontSize=6;"+a(g.PoweredText)+d(g.PoweredText)+h(g.PoweredText)+p(g.PoweredText)+y(g.PoweredText)+x(g.PoweredText)+C(g.PoweredText)+F(g.PoweredText),q.style+=f(q.style,g,u,q),q.value=c(g.PoweredText)):v.style+="valveType=gate;";else{v.style+="verticalLabelPosition=bottom;verticalAlign=top;shape=mxgraph.pid2valves.valve;";v.value=c(g.Text);switch(e.Class){case "PEGateValveBlock":v.style+="valveType=gate;"; break;case "PEGlobeValveBlock":v.style+="valveType=globe;";break;case "PEAngleValveBlock":v.style+="valveType=angle;";break;case "PEAngleGlobeValveBlock":v.style+="valveType=angleGlobe;flipH=1;"}1==g.handOperated&&(v.style+="actuator=man;")}v.style+=f(v.style,g,u,v);break;case "UI2BrowserBlock":v.style+="shape=mxgraph.mockup.containers.browserWindow;mainText=;";1==g.vScroll&&(E=1==g.hScroll?new mxCell("",new mxGeometry(1,0,20,r-130),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"): new mxCell("",new mxGeometry(1,0,20,r-110),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),E.geometry.relative=!0,E.geometry.offset=new mxPoint(-20,110),E.vertex=!0,v.insert(E),v.style+="spacingRight=20;");1==g.hScroll&&(O=1==g.vScroll?new mxCell("",new mxGeometry(0,1,t-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,t,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"), O.geometry.relative=!0,O.geometry.offset=new mxPoint(0,-20),O.vertex=!0,v.insert(O));v.style+=f(v.style,g,u,v);break;case "UI2WindowBlock":v.style+="shape=mxgraph.mockup.containers.window;mainText=;align=center;verticalAlign=top;spacing=5;"+b(g.Title)+a(g.Title)+d(g.Title);v.value=c(g.Title);1==g.vScroll&&(E=1==g.hScroll?new mxCell("",new mxGeometry(1,0,20,r-50),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,r-30), @@ -191,7 +191,7 @@ O.vertex=!0;v.insert(O);O.style+=k(g.Content_1);0>O.style.indexOf(";align=")&&(O new mxGeometry(0,M,t,r-M),"part=1;");pa.vertex=!0;v.insert(pa);pa.style+=f(pa.style,g,u,pa);for(l=0;l<=g.Tabs-1;l++)l==g.Selected-1?(w[l]=new mxCell("",new mxGeometry(l*U,0,U-Fa,M),""),w[l].vertex=!0,v.insert(w[l])):(q[l]=new mxCell("",new mxGeometry(l*U,0,U-Fa,M),"strokeColor=none;"),q[l].vertex=!0,v.insert(q[l]),q[l].style+=f(q[l].style,g,u,q[l]),w[l]=new mxCell("",new mxGeometry(0,0,U-Fa,M),"fillColor=#000000;fillOpacity=25;"),w[l].vertex=!0,q[l].insert(w[l])),w[l].style+=k(g["Tab_"+(l+1)]),w[l].style+= f(w[l].style,g,u,w[l]),w[l].value=c(g["Tab_"+(l+1)]),0>w[l].style.indexOf(";align=")&&(w[l].style+="align=left;spacingLeft=2;");ha=A(g,u);ha=ha.replace("strokeColor","fillColor2");""==ha&&(ha="fillColor2=#000000;");1==g.vScroll&&(w=1==g.hScroll?new mxCell("",new mxGeometry(1,0,20,r-20-M),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,r-M),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"), w.geometry.relative=!0,w.geometry.offset=new mxPoint(-20,M),w.vertex=!0,v.insert(w),v.style+="spacingRight=20;",w.style+=ha,w.style+=f(w.style,g,u,w));1==g.hScroll&&(E=1==g.vScroll?new mxCell("",new mxGeometry(0,1,t-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,t,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),E.geometry.relative=!0,E.geometry.offset=new mxPoint(0,-20),E.vertex=!0,v.insert(E),E.style+= -ha,E.style+=f(E.style,g,u,E));break;case "UI2VTabBarContainerBlock":v.style+="strokeColor=none;fillColor=none;";q=[];w=[];Fa=3;M=25+Fa;U=80;eb=10;pa=new mxCell("",new mxGeometry(U,0,t-U,r),"part=1;");pa.vertex=!0;v.insert(pa);pa.style+=f(pa.style,g,u,pa);for(l=0;l<=g.Tabs-1;l++)l==g.Selected-1?(w[l]=new mxCell("",new mxGeometry(0,eb+l*M,U,M-Fa),""),w[l].vertex=!0,v.insert(w[l]),w[l].style+=k(g["Tab_"+(l+1)]),w[l].style+=f(w[l].style,g,u,w[l])):(q[l]=new mxCell("",new mxGeometry(0,eb+l*M,U,M-Fa),"strokeColor=none;"), +ha,E.style+=f(E.style,g,u,E));break;case "UI2VTabBarContainerBlock":v.style+="strokeColor=none;fillColor=none;";q=[];w=[];Fa=3;M=25+Fa;U=80;fb=10;pa=new mxCell("",new mxGeometry(U,0,t-U,r),"part=1;");pa.vertex=!0;v.insert(pa);pa.style+=f(pa.style,g,u,pa);for(l=0;l<=g.Tabs-1;l++)l==g.Selected-1?(w[l]=new mxCell("",new mxGeometry(0,fb+l*M,U,M-Fa),""),w[l].vertex=!0,v.insert(w[l]),w[l].style+=k(g["Tab_"+(l+1)]),w[l].style+=f(w[l].style,g,u,w[l])):(q[l]=new mxCell("",new mxGeometry(0,fb+l*M,U,M-Fa),"strokeColor=none;"), q[l].vertex=!0,v.insert(q[l]),q[l].style+=f(q[l].style,g,u,q[l]),w[l]=new mxCell("",new mxGeometry(0,0,U,M-Fa),"fillColor=#000000;fillOpacity=25;"),w[l].vertex=!0,q[l].insert(w[l]),w[l].style+=k(g["Tab_"+(l+1)])),w[l].value=c(g["Tab_"+(l+1)]),0>w[l].style.indexOf(";align=")&&(w[l].style+="align=left;spacingLeft=2;"),w[l].style+=f(w[l].style,g,u,w[l]);ha=A(g,u);ha=ha.replace("strokeColor","fillColor2");""==ha&&(ha="fillColor2=#000000;");1==g.vScroll&&(w=1==g.hScroll?new mxCell("",new mxGeometry(1, 0,20,r-20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,r),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),w.geometry.relative=!0,w.geometry.offset=new mxPoint(-20,0),w.vertex=!0,v.insert(w),v.style+="spacingRight=20;",w.style+=ha,w.style+=f(w.style,g,u,w));1==g.hScroll&&(E=1==g.vScroll?new mxCell("",new mxGeometry(U,1,t-20-U,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"): new mxCell("",new mxGeometry(U,1,t-U,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),E.geometry.relative=!0,E.geometry.offset=new mxPoint(0,-20),E.vertex=!0,v.insert(E),E.style+=ha,E.style+=f(E.style,g,u,E));break;case "UI2CheckBoxBlock":v.style+="strokeColor=none;fillColor=none;";M=r/g.Options;q=[];w=[];for(l=0;l<g.Options;l++)q[l]=new mxCell("",new mxGeometry(0,l*M+.5*M-5,10,10),"labelPosition=right;part=1;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=3;"), @@ -234,7 +234,7 @@ g,u);break;case "GCPServiceCardLocalStorageBlock":ea("persistent_disk_snapshot", t,r,v,g,u);break;case "GCPServiceCardServiceDiscoveryBlock":ea("service_discovery",t,r,v,g,u);break;case "GCPServiceCardSquidProxyBlock":ea("squid_proxy",t,r,v,g,u);break;case "GCPServiceCardTaskQueuesBlock":ea("task_queues",t,r,v,g,u);break;case "GCPServiceCardVirtualFileSystemBlock":ea("virtual_file_system",t,r,v,g,u);break;case "GCPServiceCardVPNGatewayBlock":ea("gateway",t,r,v,g,u);break;case "GCPInputDatabase":ia("database",1,.9,t,r,v,g,u);break;case "GCPInputRecord":ia("record",1,.66,t,r,v, g,u);break;case "GCPInputPayment":ia("payment",1,.8,t,r,v,g,u);break;case "GCPInputGateway":ia("gateway_icon",1,.44,t,r,v,g,u);break;case "GCPInputLocalCompute":ia("compute_engine_icon",1,.89,t,r,v,g,u);break;case "GCPInputBeacon":ia("beacon",.73,1,t,r,v,g,u);break;case "GCPInputStorage":ia("storage",1,.8,t,r,v,g,u);break;case "GCPInputList":ia("list",.89,1,t,r,v,g,u);break;case "GCPInputStream":ia("stream",1,.82,t,r,v,g,u);break;case "GCPInputMobileDevices":ia("mobile_devices",1,.73,t,r,v,g,u);break; case "GCPInputCircuitBoard":ia("circuit_board",1,.9,t,r,v,g,u);break;case "GCPInputLive":ia("live",.74,1,t,r,v,g,u);break;case "GCPInputUsers":ia("users",1,.63,t,r,v,g,u);break;case "GCPInputLaptop":ia("laptop",1,.66,t,r,v,g,u);break;case "GCPInputApplication":ia("application",1,.8,t,r,v,g,u);break;case "GCPInputLightbulb":ia("lightbulb",.7,1,t,r,v,g,u);break;case "GCPInputGame":ia("game",1,.54,t,r,v,g,u);break;case "GCPInputDesktop":ia("desktop",1,.9,t,r,v,g,u);break;case "GCPInputDesktopAndMobile":ia("desktop_and_mobile", -1,.66,t,r,v,g,u);break;case "GCPInputWebcam":ia("webcam",.5,1,t,r,v,g,u);break;case "GCPInputSpeaker":ia("speaker",.7,1,t,r,v,g,u);break;case "GCPInputRetail":ia("retail",1,.89,t,r,v,g,u);break;case "GCPInputReport":ia("report",1,1,t,r,v,g,u);break;case "GCPInputPhone":ia("phone",.64,1,t,r,v,g,u);break;case "GCPInputBlank":ia("transparent",1,1,t,r,v,g,u)}return v}var Xb=["AEUSBBlock","AGSCutandpasteBlock","iOSDeviceiPadLandscape","iOSDeviceiPadProLandscape"],La=["fpDoor"],la={None:"none",Arrow:"block;endFill=1", +1,.66,t,r,v,g,u);break;case "GCPInputWebcam":ia("webcam",.5,1,t,r,v,g,u);break;case "GCPInputSpeaker":ia("speaker",.7,1,t,r,v,g,u);break;case "GCPInputRetail":ia("retail",1,.89,t,r,v,g,u);break;case "GCPInputReport":ia("report",1,1,t,r,v,g,u);break;case "GCPInputPhone":ia("phone",.64,1,t,r,v,g,u);break;case "GCPInputBlank":ia("transparent",1,1,t,r,v,g,u)}return v}var Xb=["AEUSBBlock","AGSCutandpasteBlock","iOSDeviceiPadLandscape","iOSDeviceiPadProLandscape"],bb=["fpDoor"],la={None:"none",Arrow:"block;endFill=1", "Hollow Arrow":"block;endFill=0","Open Arrow":"open;","CFN ERD Zero Or More Arrow":"ERzeroToMany;startSize=10","CFN ERD One Or More Arrow":"ERoneToMany;startSize=10","CFN ERD Many Arrow":"ERmany;startSize=10","CFN ERD Exactly One Arrow":"ERmandOne;startSize=10","CFN ERD Zero Or One Arrow":"ERzeroToOne;startSize=10","CFN ERD One Arrow":"ERone;startSize=16",Generalization:"block;endFill=0;startSize=12","Big Open Arrow":"open;startSize=10",Asynch1:"openAsync;flipH=1;startSize=10",Asynch2:"openAsync;startSize=10", Aggregation:"diamond;endFill=0;startSize=16",Composition:"diamond;endFill=1;startSize=16",BlockEnd:"none;endFill=1;startSize=16"},cb={DefaultTextBlockNew:"text;strokeColor=none;fillColor=none",DefaultTextBlock:"text;strokeColor=none;fillColor=none",DefaultSquareBlock:"",DefaultNoteBlock:"shape=note;size=15",DefaultNoteBlockV2:"shape=note;size=15",HotspotBlock:"strokeColor=none;opacity=50",ImageSearchBlock2:"shape=image",UserImage2Block:"shape=image",ProcessBlock:"",DecisionBlock:"rhombus",TerminatorBlock:"rounded=1;arcSize=50", PredefinedProcessBlock:"shape=process",DocumentBlock:"shape=document",MultiDocumentBlock:"shape=mxgraph.flowchart.multi-document",ManualInputBlock:"shape=manualInput;size=15",PreparationBlock:"shape=hexagon;perimeter=hexagonPerimeter2",DataBlock:"shape=parallelogram;perimeter=parallelogramPerimeter;anchorPointDirection=0",DataBlockNew:"shape=parallelogram;perimeter=parallelogramPerimeter;anchorPointDirection=0",DatabaseBlock:"shape=cylinder;size=0.1;anchorPointDirection=0;boundedLbl=1;",DirectAccessStorageBlock:"shape=cylinder;direction=south;size=0.1;anchorPointDirection=0;boundedLbl=1;", @@ -712,36 +712,36 @@ mxUtils.htmlEntities(h[c].Properties.Title)+'"');ka(a,h[c],null,null,null,!0);va "visio/windows.xml":"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><Windows ClientWidth='0' ClientHeight='0' xmlns='http://schemas.microsoft.com/office/visio/2012/main' xmlns:r='http://schemas.openxmlformats.org/officeDocument/2006/relationships' xml:space='preserve' />","visio/_rels/document.xml.rels":"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><Relationships xmlns='http://schemas.openxmlformats.org/package/2006/relationships'><Relationship Id='rId1' Type='http://schemas.microsoft.com/visio/2010/relationships/masters' Target='masters/masters.xml' /><Relationship Id='rId2' Type='http://schemas.microsoft.com/visio/2010/relationships/pages' Target='pages/pages.xml' /><Relationship Id='rId3' Type='http://schemas.microsoft.com/visio/2010/relationships/windows' Target='windows.xml' /></Relationships>", "visio/masters/_rels/masters.xml.rels":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId1" Type="http://schemas.microsoft.com/visio/2010/relationships/master" Target="master1.xml"/></Relationships>',"visio/masters/masters.xml":"<?xml version='1.0' encoding='utf-8' ?><Masters xmlns='http://schemas.microsoft.com/office/visio/2012/main' xmlns:r='http://schemas.openxmlformats.org/officeDocument/2006/relationships' xml:space='preserve'><Master ID='4' NameU='Dynamic connector' IsCustomNameU='1' Name='Dynamic connector' IsCustomName='1' Prompt='This connector automatically routes between the shapes it connects.' IconSize='1' AlignName='2' MatchByName='1' IconUpdate='0' UniqueID='{002A9108-0000-0000-8E40-00608CF305B2}' BaseID='{F7290A45-E3AD-11D2-AE4F-006008C9F5A9}' PatternFlags='0' Hidden='0' MasterType='0'><PageSheet LineStyle='0' FillStyle='0' TextStyle='0'><Cell N='PageWidth' V='3'/><Cell N='PageHeight' V='3'/><Cell N='ShdwOffsetX' V='0.125'/><Cell N='ShdwOffsetY' V='-0.125'/><Cell N='PageScale' V='1' U='IN_F'/><Cell N='DrawingScale' V='1' U='IN_F'/><Cell N='DrawingSizeType' V='4'/><Cell N='DrawingScaleType' V='0'/><Cell N='InhibitSnap' V='0'/><Cell N='PageLockReplace' V='0' U='BOOL'/><Cell N='PageLockDuplicate' V='0' U='BOOL'/><Cell N='UIVisibility' V='0'/><Cell N='ShdwType' V='0'/><Cell N='ShdwObliqueAngle' V='0'/><Cell N='ShdwScaleFactor' V='1'/><Cell N='DrawingResizeType' V='0'/><Section N='Layer'><Row IX='0'><Cell N='Name' V='Connector'/><Cell N='Color' V='255'/><Cell N='Status' V='0'/><Cell N='Visible' V='1'/><Cell N='Print' V='1'/><Cell N='Active' V='0'/><Cell N='Lock' V='0'/><Cell N='Snap' V='1'/><Cell N='Glue' V='1'/><Cell N='NameUniv' V='Connector'/><Cell N='ColorTrans' V='0'/></Row></Section></PageSheet><Rel r:id='rId1'/></Master></Masters>", "visio/masters/master1.xml":"<?xml version='1.0' encoding='utf-8' ?><MasterContents xmlns='http://schemas.microsoft.com/office/visio/2012/main' xmlns:r='http://schemas.openxmlformats.org/officeDocument/2006/relationships' xml:space='preserve'><Shapes><Shape ID='5' OriginalID='0' Type='Shape' LineStyle='7' FillStyle='7' TextStyle='7'><Cell N='PinX' V='1.5' F='GUARD((BeginX+EndX)/2)'/><Cell N='PinY' V='1.5' F='GUARD((BeginY+EndY)/2)'/><Cell N='Width' V='1' F='GUARD(EndX-BeginX)'/><Cell N='Height' V='-1' F='GUARD(EndY-BeginY)'/><Cell N='LocPinX' V='0.5' F='GUARD(Width*0.5)'/><Cell N='LocPinY' V='-0.5' F='GUARD(Height*0.5)'/><Cell N='Angle' V='0' F='GUARD(0DA)'/><Cell N='FlipX' V='0' F='GUARD(FALSE)'/><Cell N='FlipY' V='0' F='GUARD(FALSE)'/><Cell N='ResizeMode' V='0'/><Cell N='BeginX' V='1'/><Cell N='BeginY' V='2'/><Cell N='EndX' V='2'/><Cell N='EndY' V='1'/><Cell N='TxtPinX' V='0' F='SETATREF(Controls.TextPosition)'/><Cell N='TxtPinY' V='-1' F='SETATREF(Controls.TextPosition.Y)'/><Cell N='TxtWidth' V='0.5555555555555556' F='MAX(TEXTWIDTH(TheText),5*Char.Size)'/><Cell N='TxtHeight' V='0.2444444444444444' F='TEXTHEIGHT(TheText,TxtWidth)'/><Cell N='TxtLocPinX' V='0.2777777777777778' F='TxtWidth*0.5'/><Cell N='TxtLocPinY' V='0.1222222222222222' F='TxtHeight*0.5'/><Cell N='TxtAngle' V='0'/><Cell N='LockHeight' V='1'/><Cell N='LockCalcWH' V='1'/><Cell N='HelpTopic' V='Vis_SE.chm!#20000'/><Cell N='Copyright' V='Copyright 2001 Microsoft Corporation. All rights reserved.'/><Cell N='NoAlignBox' V='1'/><Cell N='DynFeedback' V='2'/><Cell N='GlueType' V='2'/><Cell N='ObjType' V='2'/><Cell N='NoLiveDynamics' V='1'/><Cell N='ShapeSplittable' V='1'/><Cell N='LayerMember' V='0'/><Section N='Control'><Row N='TextPosition'><Cell N='X' V='0'/><Cell N='Y' V='-1'/><Cell N='XDyn' V='0' F='Controls.TextPosition'/><Cell N='YDyn' V='-1' F='Controls.TextPosition.Y'/><Cell N='XCon' V='5' F='IF(OR(STRSAME(SHAPETEXT(TheText),\"\"),HideText),5,0)'/><Cell N='YCon' V='0'/><Cell N='CanGlue' V='0'/><Cell N='Prompt' V='Reposition Text'/></Row></Section><Section N='Geometry' IX='0'><Cell N='NoFill' V='1'/><Cell N='NoLine' V='0'/><Cell N='NoShow' V='0'/><Cell N='NoSnap' V='0'/><Cell N='NoQuickDrag' V='0'/><Row T='MoveTo' IX='1'><Cell N='X' V='0'/><Cell N='Y' V='0'/></Row><Row T='LineTo' IX='2'><Cell N='X' V='0'/><Cell N='Y' V='-1'/></Row></Section></Shape></Shapes></MasterContents>"}, -h;for(h in d)if(1<b&&h==G.CONTENT_TYPES_XML){for(var p=mxUtils.parseXml(d[h]),c=p.documentElement,e=c.children,z=null,f=0;f<e.length;f++){var y=e[f];"/visio/pages/page1.xml"==y.getAttribute(G.PART_NAME)&&(z=y)}for(f=2;f<=b;f++)e=z.cloneNode(),e.setAttribute(G.PART_NAME,"/visio/pages/page"+f+".xml"),c.appendChild(e);F(a,h,p,!0)}else a.file(h,d[h])}function m(a,b,d){return null!=a.createElementNS?a.createElementNS(b,d):a.createElement(d)}function k(a){var b=Z[a];null==b&&(b=X++,Z[a]=b);return b}function f(a){var b= -{};try{var d=a.getGraphBounds().clone(),h=a.view.scale,p=a.view.translate,c=Math.round(d.x/h)-p.x,e=Math.round(d.y/h)-p.y,z=a.pageFormat.width,f=a.pageFormat.height;0>c&&(c+=Math.ceil((p.x-d.x/h)/z)*z);0>e&&(e+=Math.ceil((p.y-d.y/h)/f)*f);var y=Math.max(1,Math.ceil((d.width/h+c)/z)),x=Math.max(1,Math.ceil((d.height/h+e)/f));b.gridEnabled=a.gridEnabled;b.gridSize=a.gridSize;b.guidesEnabled=a.graphHandler.guidesEnabled;b.pageVisible=a.pageVisible;b.pageScale=a.pageScale;b.pageWidth=a.pageFormat.width* -y;b.pageHeight=a.pageFormat.height*x;b.backgroundClr=a.background;b.mathEnabled=a.mathEnabled;b.shadowVisible=a.shadowVisible}catch(jb){}return b}function e(a,d,h,p){return b(a,d/G.CONVERSION_FACTOR,h,p)}function b(a,b,d,h){d=m(d,G.XMLNS,"Cell");d.setAttribute("N",a);d.setAttribute("V",b);h&&d.setAttribute("F",h);return d}function a(a,b,d,h,p){var c=m(p,G.XMLNS,"Row");c.setAttribute("T",a);c.setAttribute("IX",b);c.appendChild(e("X",d,p));c.appendChild(e("Y",h,p));return c}function d(a,d,h){var p= +h;for(h in d)if(1<b&&h==G.CONTENT_TYPES_XML){for(var p=mxUtils.parseXml(d[h]),c=p.documentElement,e=c.children,y=null,f=0;f<e.length;f++){var z=e[f];"/visio/pages/page1.xml"==z.getAttribute(G.PART_NAME)&&(y=z)}for(f=2;f<=b;f++)e=y.cloneNode(),e.setAttribute(G.PART_NAME,"/visio/pages/page"+f+".xml"),c.appendChild(e);F(a,h,p,!0)}else a.file(h,d[h])}function m(a,b,d){return null!=a.createElementNS?a.createElementNS(b,d):a.createElement(d)}function k(a){var b=Z[a];null==b&&(b=X++,Z[a]=b);return b}function f(a){var b= +{};try{var d=a.getGraphBounds().clone(),h=a.view.scale,p=a.view.translate,c=Math.round(d.x/h)-p.x,e=Math.round(d.y/h)-p.y,y=a.pageFormat.width,f=a.pageFormat.height;0>c&&(c+=Math.ceil((p.x-d.x/h)/y)*y);0>e&&(e+=Math.ceil((p.y-d.y/h)/f)*f);var z=Math.max(1,Math.ceil((d.width/h+c)/y)),x=Math.max(1,Math.ceil((d.height/h+e)/f));b.gridEnabled=a.gridEnabled;b.gridSize=a.gridSize;b.guidesEnabled=a.graphHandler.guidesEnabled;b.pageVisible=a.pageVisible;b.pageScale=a.pageScale;b.pageWidth=a.pageFormat.width* +z;b.pageHeight=a.pageFormat.height*x;b.backgroundClr=a.background;b.mathEnabled=a.mathEnabled;b.shadowVisible=a.shadowVisible}catch(jb){}return b}function e(a,d,h,p){return b(a,d/G.CONVERSION_FACTOR,h,p)}function b(a,b,d,h){d=m(d,G.XMLNS,"Cell");d.setAttribute("N",a);d.setAttribute("V",b);h&&d.setAttribute("F",h);return d}function a(a,b,d,h,p){var c=m(p,G.XMLNS,"Row");c.setAttribute("T",a);c.setAttribute("IX",b);c.appendChild(e("X",d,p));c.appendChild(e("Y",h,p));return c}function d(a,d,h){var p= a.style[mxConstants.STYLE_FILLCOLOR];if(p&&"none"!=p){if(d.appendChild(b("FillForegnd",p,h)),(p=a.style[mxConstants.STYLE_GRADIENTCOLOR])&&"none"!=p){d.appendChild(b("FillBkgnd",p,h));var p=a.style[mxConstants.STYLE_GRADIENT_DIRECTION],c=28;if(p)switch(p){case mxConstants.DIRECTION_EAST:c=25;break;case mxConstants.DIRECTION_WEST:c=27;break;case mxConstants.DIRECTION_NORTH:c=30}d.appendChild(b("FillPattern",c,h))}}else d.appendChild(b("FillPattern",0,h));(p=a.style[mxConstants.STYLE_STROKECOLOR])&& "none"!=p?d.appendChild(b("LineColor",p,h)):d.appendChild(b("LinePattern",0,h));(p=a.style[mxConstants.STYLE_STROKEWIDTH])&&d.appendChild(e("LineWeight",p,h));(c=a.style[mxConstants.STYLE_OPACITY])?p=c:(p=a.style[mxConstants.STYLE_FILL_OPACITY],c=a.style[mxConstants.STYLE_STROKE_OPACITY]);p&&d.appendChild(b("FillForegndTrans",1-parseInt(p)/100,h));c&&d.appendChild(b("LineColorTrans",1-parseInt(c)/100,h));if(1==a.style[mxConstants.STYLE_DASHED]){p=a.style[mxConstants.STYLE_DASH_PATTERN];c=9;if(p)switch(p){case "1 1":c= 10;break;case "1 2":c=3;break;case "1 4":c=17}d.appendChild(b("LinePattern",c,h))}1==a.style[mxConstants.STYLE_SHADOW]&&(d.appendChild(b("ShdwPattern",1,h)),d.appendChild(b("ShdwForegnd","#000000",h)),d.appendChild(b("ShdwForegndTrans",.6,h)),d.appendChild(b("ShapeShdwType",1,h)),d.appendChild(b("ShapeShdwOffsetX","0.02946278254943948",h)),d.appendChild(b("ShapeShdwOffsetY","-0.02946278254943948",h)),d.appendChild(b("ShapeShdwScaleFactor","1",h)),d.appendChild(b("ShapeShdwBlur","0.05555555555555555", h)),d.appendChild(b("ShapeShdwShow",2,h)));1==a.style[mxConstants.STYLE_FLIPH]&&d.appendChild(b("FlipX",1,h));1==a.style[mxConstants.STYLE_FLIPV]&&d.appendChild(b("FlipY",1,h));1==a.style[mxConstants.STYLE_ROUNDED]&&d.appendChild(e("Rounding",.1*a.cell.geometry.width,h));(a=a.style[mxConstants.STYLE_LABEL_BACKGROUNDCOLOR])&&d.appendChild(b("TextBkgnd",a,h))}function h(a,b,d,h,p){var c=m(d,G.XMLNS,"Shape");c.setAttribute("ID",a);c.setAttribute("NameU","Shape"+a);c.setAttribute("LineStyle","0");c.setAttribute("FillStyle", -"0");c.setAttribute("TextStyle","0");a=b.width/2;var z=b.height/2;c.appendChild(e("PinX",b.x+a+(p?0:D.shiftX),d));c.appendChild(e("PinY",h-b.y-z-(p?0:D.shiftY),d));c.appendChild(e("Width",b.width,d));c.appendChild(e("Height",b.height,d));c.appendChild(e("LocPinX",a,d));c.appendChild(e("LocPinY",z,d));return c}function p(a,b){var d=G.ARROWS_MAP[(null==a?"none":a)+"|"+(null==b?"1":b)];return null!=d?d:1}function z(a){return null==a?2:2>=a?0:3>=a?1:5>=a?2:7>=a?3:9>=a?4:22>=a?5:6}function y(h,c,f,y,x){var n= -c.view.getState(h,!0);if(null==n||null==n.absolutePoints||null==n.cellBounds)return null;c=m(f,G.XMLNS,"Shape");var C=k(h.id);c.setAttribute("ID",C);c.setAttribute("NameU","Dynamic connector."+C);c.setAttribute("Name","Dynamic connector."+C);c.setAttribute("Type","Shape");c.setAttribute("Master","4");var F=D.state,C=n.absolutePoints,A=n.cellBounds,B=A.width/2,aa=A.height/2;c.appendChild(e("PinX",A.x+B,f));c.appendChild(e("PinY",y-A.y-aa,f));c.appendChild(e("Width",A.width,f));c.appendChild(e("Height", -A.height,f));c.appendChild(e("LocPinX",B,f));c.appendChild(e("LocPinY",aa,f));D.newEdge(c,n,f);B=function(a,b){var d=a.x,h=a.y,d=d*F.scale-A.x+F.dx+(x?0:D.shiftX),h=(b?0:A.height)-h*F.scale+A.y-F.dy-(x?0:D.shiftY);return{x:d,y:h}};aa=B(C[0],!0);c.appendChild(e("BeginX",A.x+aa.x,f,"_WALKGLUE(BegTrigger,EndTrigger,WalkPreference)"));c.appendChild(e("BeginY",y-A.y+aa.y,f,"_WALKGLUE(BegTrigger,EndTrigger,WalkPreference)"));aa=B(C[C.length-1],!0);c.appendChild(e("EndX",A.x+aa.x,f,"_WALKGLUE(EndTrigger,BegTrigger,WalkPreference)")); -c.appendChild(e("EndY",y-A.y+aa.y,f,"_WALKGLUE(EndTrigger,BegTrigger,WalkPreference)"));c.appendChild(b("BegTrigger","2",f,h.source?"_XFTRIGGER(Sheet."+k(h.source.id)+"!EventXFMod)":null));c.appendChild(b("EndTrigger","2",f,h.target?"_XFTRIGGER(Sheet."+k(h.target.id)+"!EventXFMod)":null));c.appendChild(b("ConFixedCode","6",f));c.appendChild(b("LayerMember","0",f));d(n,c,f);y=n.style[mxConstants.STYLE_STARTSIZE];h=p(n.style[mxConstants.STYLE_STARTARROW],n.style[mxConstants.STYLE_STARTFILL]);c.appendChild(b("BeginArrow", -h,f));c.appendChild(b("BeginArrowSize",z(y),f));y=n.style[mxConstants.STYLE_ENDSIZE];h=p(n.style[mxConstants.STYLE_ENDARROW],n.style[mxConstants.STYLE_ENDFILL]);c.appendChild(b("EndArrow",h,f));c.appendChild(b("EndArrowSize",z(y),f));null!=n.text&&n.text.checkBounds()&&(D.save(),n.text.paint(D),D.restore());n=m(f,G.XMLNS,"Section");n.setAttribute("N","Geometry");n.setAttribute("IX","0");for(h=0;h<C.length;h++)y=B(C[h]),n.appendChild(a(0==h?"MoveTo":"LineTo",h+1,y.x,y.y,f));n.appendChild(b("NoFill", -"1",f));n.appendChild(b("NoLine","0",f));c.appendChild(n);return c}function x(a,b,p,c,e,z){var f=a.geometry;if(null!=f){f.relative&&e&&(f=f.clone(),f.x*=e.width,f.y*=e.height,f.relative=0);e=k(a.id);if(!a.treatAsSingle&&0<a.getChildCount()){c=h(e+"10000",f,p,c,z);c.setAttribute("Type","Group");z=m(p,G.XMLNS,"Shapes");D.save();D.translate(-f.x,-f.y);e=f.clone();e.x=0;e.y=0;a.setGeometry(e);a.treatAsSingle=!0;e=x(a,b,p,f.height,f,!0);a.treatAsSingle=!1;a.setGeometry(f);null!=e&&z.appendChild(e);for(var n= -0;n<a.getChildCount();n++)e=x(a.children[n],b,p,f.height,f,!0),null!=e&&z.appendChild(e);c.appendChild(z);D.restore();return c}return a.vertex?(c=h(e,f,p,c,z),a=b.view.getState(a,!0),d(a,c,p),D.newShape(c,a,p),null!=a.text&&a.text.checkBounds()&&(D.save(),a.text.paint(D),D.restore()),null!=a.shape&&a.shape.checkBounds()&&(D.save(),a.shape.paint(D),D.restore()),c.appendChild(D.getShapeGeo()),D.endShape(),c.setAttribute("Type",D.getShapeType()),c):y(a,b,p,c,z)}return null}function C(a,b){var d=mxUtils.createXmlDocument(), -h=m(d,G.XMLNS,"PageContents");h.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns",G.XMLNS);h.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:r",G.XMLNS_R);var p=m(d,G.XMLNS,"Shapes");h.appendChild(p);var c=a.model,e=a.view.translate,z=a.view.scale,f=a.getGraphBounds();D.shiftX=0;D.shiftY=0;if(f.x/z<e.x||f.y/z<e.y)D.shiftX=Math.ceil((e.x-f.x/z)/a.pageFormat.width)*a.pageFormat.width,D.shiftY=Math.ceil((e.y-f.y/z)/a.pageFormat.height)*a.pageFormat.height;D.save();D.translate(-e.x,-e.y);D.scale(1/ -z);D.newPage();var z=a.getDefaultParent(),y;for(y in c.cells)e=c.cells[y],e.parent==z&&(e=x(e,a,d,b.pageHeight),null!=e&&p.appendChild(e));p=m(d,G.XMLNS,"Connects");h.appendChild(p);for(y in c.cells)e=c.cells[y],e.edge&&(e.source&&(z=m(d,G.XMLNS,"Connect"),z.setAttribute("FromSheet",k(e.id)),z.setAttribute("FromCell","BeginX"),z.setAttribute("ToSheet",k(e.source.id)),p.appendChild(z)),e.target&&(z=m(d,G.XMLNS,"Connect"),z.setAttribute("FromSheet",k(e.id)),z.setAttribute("FromCell","EndX"),z.setAttribute("ToSheet", -k(e.target.id)),p.appendChild(z)));d.appendChild(h);D.restore();return d}function F(a,b,d,h){a.file(b,(h?"":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?>')+mxUtils.getXml(d))}function A(a,d,h){var p=mxUtils.createXmlDocument(),c=mxUtils.createXmlDocument(),z=m(p,G.XMLNS,"Pages");z.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns",G.XMLNS);z.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:r",G.XMLNS_R);var f=m(c,G.RELS_XMLNS,"Relationships"),y=1,x;for(x in d){var k="page"+y+".xml", -n=m(p,G.XMLNS,"Page");n.setAttribute("ID",y-1);n.setAttribute("NameU",x);n.setAttribute("Name",x);var C=m(p,G.XMLNS,"PageSheet"),A=h[x];C.appendChild(e("PageWidth",A.pageWidth,p));C.appendChild(e("PageHeight",A.pageHeight,p));C.appendChild(b("PageScale",A.pageScale,p));C.appendChild(b("DrawingScale",1,p));A=m(p,G.XMLNS,"Rel");A.setAttributeNS(G.XMLNS_R,"r:id","rId"+y);var B=m(p,G.XMLNS,"Section");B.setAttribute("N","Layer");var D=m(p,G.XMLNS,"Row");D.setAttribute("IX","0");B.appendChild(D);D.appendChild(b("Name", -"Connector",p));D.appendChild(b("Color","255",p));D.appendChild(b("Status","0",p));D.appendChild(b("Visible","1",p));D.appendChild(b("Print","1",p));D.appendChild(b("Active","0",p));D.appendChild(b("Lock","0",p));D.appendChild(b("Snap","1",p));D.appendChild(b("Glue","1",p));D.appendChild(b("NameUniv","Connector",p));D.appendChild(b("ColorTrans","0",p));C.appendChild(B);n.appendChild(C);n.appendChild(A);z.appendChild(n);n=m(c,G.RELS_XMLNS,"Relationship");n.setAttribute("Id","rId"+y);n.setAttribute("Type", -G.PAGES_TYPE);n.setAttribute("Target",k);f.appendChild(n);F(a,G.VISIO_PAGES+k,d[x]);y++}p.appendChild(z);c.appendChild(f);F(a,G.VISIO_PAGES+"pages.xml",p);F(a,G.VISIO_PAGES+"_rels/pages.xml.rels",c)}function B(a,b){var d=G.VISIO_PAGES_RELS+"page"+b+".xml.rels",h=mxUtils.createXmlDocument(),p=m(h,G.RELS_XMLNS,"Relationships"),c=m(h,G.RELS_XMLNS,"Relationship");c.setAttribute("Type","http://schemas.microsoft.com/visio/2010/relationships/master");c.setAttribute("Id","rId1");c.setAttribute("Target","../masters/master1.xml"); -p.appendChild(c);var e=D.images;if(0<e.length)for(var z=0;z<e.length;z++)c=m(h,G.RELS_XMLNS,"Relationship"),c.setAttribute("Type",G.XMLNS_R+"/image"),c.setAttribute("Id","rId"+(z+2)),c.setAttribute("Target","../media/"+e[z]),p.appendChild(c);h.appendChild(p);F(a,d,h)}var G=this,D=new mxVsdxCanvas2D,Z={},X=1;this.exportCurrentDiagrams=function(){try{if(c.spinner.spin(document.body,mxResources.get("exporting"))){var a=new JSZip;D.init(a);Z={};X=1;var b={},d={},h=null!=c.pages?c.pages.length:1;if(null!= -c.pages){for(var p=c.editor.graph.getSelectionCells(),e=c.currentPage,z=0;z<c.pages.length;z++){var y=c.pages[z];c.currentPage!=y&&c.selectPage(y,!0);var x=y.getName(),k=c.editor.graph,m=f(k);b[x]=C(k,m);B(a,z+1);d[x]=m}e!=c.currentPage&&c.selectPage(e,!0);c.editor.graph.setSelectionCells(p)}else k=c.editor.graph,m=f(k),x="Page1",b[x]=C(k,m),B(a,1),d[x]=m;n(a,h);A(a,b,d);b=function(){a.generateAsync({type:"base64"}).then(function(a){c.spinner.stop();var b=c.getBaseFilename();c.saveData(b+".vsdx", -"vsdx",a,"application/vnd.visio2013",!0)})};0<D.filesLoading?D.onFilesLoaded=b:b()}return!0}catch(jb){return console.log(jb),c.spinner.stop(),!1}}}VsdxExport.prototype.CONVERSION_FACTOR=101.6;VsdxExport.prototype.PAGES_TYPE="http://schemas.microsoft.com/visio/2010/relationships/page";VsdxExport.prototype.RELS_XMLNS="http://schemas.openxmlformats.org/package/2006/relationships";VsdxExport.prototype.XML_SPACE="preserve";VsdxExport.prototype.XMLNS_R="http://schemas.openxmlformats.org/officeDocument/2006/relationships"; +"0");c.setAttribute("TextStyle","0");a=b.width/2;var y=b.height/2;c.appendChild(e("PinX",b.x+a+(p?0:D.shiftX),d));c.appendChild(e("PinY",h-b.y-y-(p?0:D.shiftY),d));c.appendChild(e("Width",b.width,d));c.appendChild(e("Height",b.height,d));c.appendChild(e("LocPinX",a,d));c.appendChild(e("LocPinY",y,d));return c}function p(a,b){var d=G.ARROWS_MAP[(null==a?"none":a)+"|"+(null==b?"1":b)];return null!=d?d:1}function y(a){return null==a?2:2>=a?0:3>=a?1:5>=a?2:7>=a?3:9>=a?4:22>=a?5:6}function z(h,c,f,z,x){var n= +c.view.getState(h,!0);if(null==n||null==n.absolutePoints||null==n.cellBounds)return null;c=m(f,G.XMLNS,"Shape");var C=k(h.id);c.setAttribute("ID",C);c.setAttribute("NameU","Dynamic connector."+C);c.setAttribute("Name","Dynamic connector."+C);c.setAttribute("Type","Shape");c.setAttribute("Master","4");var F=D.state,C=n.absolutePoints,A=n.cellBounds,B=A.width/2,aa=A.height/2;c.appendChild(e("PinX",A.x+B,f));c.appendChild(e("PinY",z-A.y-aa,f));c.appendChild(e("Width",A.width,f));c.appendChild(e("Height", +A.height,f));c.appendChild(e("LocPinX",B,f));c.appendChild(e("LocPinY",aa,f));D.newEdge(c,n,f);B=function(a,b){var d=a.x,h=a.y,d=d*F.scale-A.x+F.dx+(x?0:D.shiftX),h=(b?0:A.height)-h*F.scale+A.y-F.dy-(x?0:D.shiftY);return{x:d,y:h}};aa=B(C[0],!0);c.appendChild(e("BeginX",A.x+aa.x,f,"_WALKGLUE(BegTrigger,EndTrigger,WalkPreference)"));c.appendChild(e("BeginY",z-A.y+aa.y,f,"_WALKGLUE(BegTrigger,EndTrigger,WalkPreference)"));aa=B(C[C.length-1],!0);c.appendChild(e("EndX",A.x+aa.x,f,"_WALKGLUE(EndTrigger,BegTrigger,WalkPreference)")); +c.appendChild(e("EndY",z-A.y+aa.y,f,"_WALKGLUE(EndTrigger,BegTrigger,WalkPreference)"));c.appendChild(b("BegTrigger","2",f,h.source?"_XFTRIGGER(Sheet."+k(h.source.id)+"!EventXFMod)":null));c.appendChild(b("EndTrigger","2",f,h.target?"_XFTRIGGER(Sheet."+k(h.target.id)+"!EventXFMod)":null));c.appendChild(b("ConFixedCode","6",f));c.appendChild(b("LayerMember","0",f));d(n,c,f);z=n.style[mxConstants.STYLE_STARTSIZE];h=p(n.style[mxConstants.STYLE_STARTARROW],n.style[mxConstants.STYLE_STARTFILL]);c.appendChild(b("BeginArrow", +h,f));c.appendChild(b("BeginArrowSize",y(z),f));z=n.style[mxConstants.STYLE_ENDSIZE];h=p(n.style[mxConstants.STYLE_ENDARROW],n.style[mxConstants.STYLE_ENDFILL]);c.appendChild(b("EndArrow",h,f));c.appendChild(b("EndArrowSize",y(z),f));null!=n.text&&n.text.checkBounds()&&(D.save(),n.text.paint(D),D.restore());n=m(f,G.XMLNS,"Section");n.setAttribute("N","Geometry");n.setAttribute("IX","0");for(h=0;h<C.length;h++)z=B(C[h]),n.appendChild(a(0==h?"MoveTo":"LineTo",h+1,z.x,z.y,f));n.appendChild(b("NoFill", +"1",f));n.appendChild(b("NoLine","0",f));c.appendChild(n);return c}function x(a,b,p,c,e,y){var f=a.geometry;if(null!=f){f.relative&&e&&(f=f.clone(),f.x*=e.width,f.y*=e.height,f.relative=0);e=k(a.id);if(!a.treatAsSingle&&0<a.getChildCount()){c=h(e+"10000",f,p,c,y);c.setAttribute("Type","Group");y=m(p,G.XMLNS,"Shapes");D.save();D.translate(-f.x,-f.y);e=f.clone();e.x=0;e.y=0;a.setGeometry(e);a.treatAsSingle=!0;e=x(a,b,p,f.height,f,!0);a.treatAsSingle=!1;a.setGeometry(f);null!=e&&y.appendChild(e);for(var n= +0;n<a.getChildCount();n++)e=x(a.children[n],b,p,f.height,f,!0),null!=e&&y.appendChild(e);c.appendChild(y);D.restore();return c}return a.vertex?(c=h(e,f,p,c,y),a=b.view.getState(a,!0),d(a,c,p),D.newShape(c,a,p),null!=a.text&&a.text.checkBounds()&&(D.save(),a.text.paint(D),D.restore()),null!=a.shape&&a.shape.checkBounds()&&(D.save(),a.shape.paint(D),D.restore()),c.appendChild(D.getShapeGeo()),D.endShape(),c.setAttribute("Type",D.getShapeType()),c):z(a,b,p,c,y)}return null}function C(a,b){var d=mxUtils.createXmlDocument(), +h=m(d,G.XMLNS,"PageContents");h.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns",G.XMLNS);h.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:r",G.XMLNS_R);var p=m(d,G.XMLNS,"Shapes");h.appendChild(p);var c=a.model,e=a.view.translate,y=a.view.scale,f=a.getGraphBounds();D.shiftX=0;D.shiftY=0;if(f.x/y<e.x||f.y/y<e.y)D.shiftX=Math.ceil((e.x-f.x/y)/a.pageFormat.width)*a.pageFormat.width,D.shiftY=Math.ceil((e.y-f.y/y)/a.pageFormat.height)*a.pageFormat.height;D.save();D.translate(-e.x,-e.y);D.scale(1/ +y);D.newPage();var y=a.getDefaultParent(),z;for(z in c.cells)e=c.cells[z],e.parent==y&&(e=x(e,a,d,b.pageHeight),null!=e&&p.appendChild(e));p=m(d,G.XMLNS,"Connects");h.appendChild(p);for(z in c.cells)e=c.cells[z],e.edge&&(e.source&&(y=m(d,G.XMLNS,"Connect"),y.setAttribute("FromSheet",k(e.id)),y.setAttribute("FromCell","BeginX"),y.setAttribute("ToSheet",k(e.source.id)),p.appendChild(y)),e.target&&(y=m(d,G.XMLNS,"Connect"),y.setAttribute("FromSheet",k(e.id)),y.setAttribute("FromCell","EndX"),y.setAttribute("ToSheet", +k(e.target.id)),p.appendChild(y)));d.appendChild(h);D.restore();return d}function F(a,b,d,h){a.file(b,(h?"":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?>')+mxUtils.getXml(d,"\n"))}function A(a,d,h){var p=mxUtils.createXmlDocument(),c=mxUtils.createXmlDocument(),y=m(p,G.XMLNS,"Pages");y.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns",G.XMLNS);y.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:r",G.XMLNS_R);var f=m(c,G.RELS_XMLNS,"Relationships"),z=1,x;for(x in d){var k="page"+ +z+".xml",n=m(p,G.XMLNS,"Page");n.setAttribute("ID",z-1);n.setAttribute("NameU",x);n.setAttribute("Name",x);var C=m(p,G.XMLNS,"PageSheet"),A=h[x];C.appendChild(e("PageWidth",A.pageWidth,p));C.appendChild(e("PageHeight",A.pageHeight,p));C.appendChild(b("PageScale",A.pageScale,p));C.appendChild(b("DrawingScale",1,p));A=m(p,G.XMLNS,"Rel");A.setAttributeNS(G.XMLNS_R,"r:id","rId"+z);var B=m(p,G.XMLNS,"Section");B.setAttribute("N","Layer");var D=m(p,G.XMLNS,"Row");D.setAttribute("IX","0");B.appendChild(D); +D.appendChild(b("Name","Connector",p));D.appendChild(b("Color","255",p));D.appendChild(b("Status","0",p));D.appendChild(b("Visible","1",p));D.appendChild(b("Print","1",p));D.appendChild(b("Active","0",p));D.appendChild(b("Lock","0",p));D.appendChild(b("Snap","1",p));D.appendChild(b("Glue","1",p));D.appendChild(b("NameUniv","Connector",p));D.appendChild(b("ColorTrans","0",p));C.appendChild(B);n.appendChild(C);n.appendChild(A);y.appendChild(n);n=m(c,G.RELS_XMLNS,"Relationship");n.setAttribute("Id", +"rId"+z);n.setAttribute("Type",G.PAGES_TYPE);n.setAttribute("Target",k);f.appendChild(n);F(a,G.VISIO_PAGES+k,d[x]);z++}p.appendChild(y);c.appendChild(f);F(a,G.VISIO_PAGES+"pages.xml",p);F(a,G.VISIO_PAGES+"_rels/pages.xml.rels",c)}function B(a,b){var d=G.VISIO_PAGES_RELS+"page"+b+".xml.rels",h=mxUtils.createXmlDocument(),p=m(h,G.RELS_XMLNS,"Relationships"),c=m(h,G.RELS_XMLNS,"Relationship");c.setAttribute("Type","http://schemas.microsoft.com/visio/2010/relationships/master");c.setAttribute("Id","rId1"); +c.setAttribute("Target","../masters/master1.xml");p.appendChild(c);var e=D.images;if(0<e.length)for(var y=0;y<e.length;y++)c=m(h,G.RELS_XMLNS,"Relationship"),c.setAttribute("Type",G.XMLNS_R+"/image"),c.setAttribute("Id","rId"+(y+2)),c.setAttribute("Target","../media/"+e[y]),p.appendChild(c);h.appendChild(p);F(a,d,h)}var G=this,D=new mxVsdxCanvas2D,Z={},X=1;this.exportCurrentDiagrams=function(){try{if(c.spinner.spin(document.body,mxResources.get("exporting"))){var a=new JSZip;D.init(a);Z={};X=1;var b= +{},d={},h=null!=c.pages?c.pages.length:1;if(null!=c.pages){for(var p=c.editor.graph.getSelectionCells(),e=c.currentPage,y=0;y<c.pages.length;y++){var z=c.pages[y];c.currentPage!=z&&c.selectPage(z,!0);var x=z.getName(),k=c.editor.graph,m=f(k);b[x]=C(k,m);B(a,y+1);d[x]=m}e!=c.currentPage&&c.selectPage(e,!0);c.editor.graph.setSelectionCells(p)}else k=c.editor.graph,m=f(k),x="Page1",b[x]=C(k,m),B(a,1),d[x]=m;n(a,h);A(a,b,d);b=function(){a.generateAsync({type:"base64"}).then(function(a){c.spinner.stop(); +var b=c.getBaseFilename();c.saveData(b+".vsdx","vsdx",a,"application/vnd.visio2013",!0)})};0<D.filesLoading?D.onFilesLoaded=b:b()}return!0}catch(jb){return console.log(jb),c.spinner.stop(),!1}}}VsdxExport.prototype.CONVERSION_FACTOR=101.6;VsdxExport.prototype.PAGES_TYPE="http://schemas.microsoft.com/visio/2010/relationships/page";VsdxExport.prototype.RELS_XMLNS="http://schemas.openxmlformats.org/package/2006/relationships";VsdxExport.prototype.XML_SPACE="preserve";VsdxExport.prototype.XMLNS_R="http://schemas.openxmlformats.org/officeDocument/2006/relationships"; VsdxExport.prototype.XMLNS="http://schemas.microsoft.com/office/visio/2012/main";VsdxExport.prototype.VISIO_PAGES="visio/pages/";VsdxExport.prototype.PREFEX="com/mxgraph/io/vsdx/resources/export/";VsdxExport.prototype.VSDX_ENC="ISO-8859-1";VsdxExport.prototype.PART_NAME="PartName";VsdxExport.prototype.CONTENT_TYPES_XML="[Content_Types].xml";VsdxExport.prototype.VISIO_PAGES_RELS="visio/pages/_rels/"; VsdxExport.prototype.ARROWS_MAP={"none|1":0,"none|0":0,"open|1":1,"open|0":1,"block|1":4,"block|0":14,"classic|1":5,"classic|0":17,"oval|1":10,"oval|0":20,"diamond|1":11,"diamond|0":22,"blockThin|1":2,"blockThin|0":15,"dash|1":23,"dash|0":23,"ERone|1":24,"ERone|0":24,"ERmandOne|1":25,"ERmandOne|0":25,"ERmany|1":27,"ERmany|0":27,"ERoneToMany|1":28,"ERoneToMany|0":28,"ERzeroToMany|1":29,"ERzeroToMany|0":29,"ERzeroToOne|1":30,"ERzeroToOne|0":30,"openAsync|1":9,"openAsync|0":9};function mxVsdxCanvas2D(){mxAbstractCanvas2D.call(this)}mxUtils.extend(mxVsdxCanvas2D,mxAbstractCanvas2D);mxVsdxCanvas2D.prototype.textEnabled=!0;mxVsdxCanvas2D.prototype.init=function(c){this.filesLoading=0;this.zip=c};mxVsdxCanvas2D.prototype.onFilesLoaded=function(){};mxVsdxCanvas2D.prototype.createElt=function(c){return null!=this.xmlDoc.createElementNS?this.xmlDoc.createElementNS(VsdxExport.prototype.XMLNS,c):this.xmlDoc.createElement(c)}; mxVsdxCanvas2D.prototype.createGeoSec=function(){null!=this.geoSec&&this.shape.appendChild(this.geoSec);var c=this.createElt("Section");c.setAttribute("N","Geometry");c.setAttribute("IX",this.geoIndex++);this.geoSec=c;this.geoStepIndex=1;this.lastMoveToY=this.lastMoveToX=this.lastY=this.lastX=0};mxVsdxCanvas2D.prototype.newShape=function(c,n,m){this.geoIndex=0;this.shape=c;this.cellState=n;this.xmGeo=n.cell.geometry;this.xmlDoc=m;this.shapeImg=this.geoSec=null;this.shapeType="Shape";this.createGeoSec()}; mxVsdxCanvas2D.prototype.newEdge=function(c,n,m){this.shape=c;this.cellState=n;this.xmGeo=n.cellBounds;this.xmlDoc=m};mxVsdxCanvas2D.prototype.endShape=function(){null!=this.shapeImg&&this.addForeignData(this.shapeImg.type,this.shapeImg.id)};mxVsdxCanvas2D.prototype.newPage=function(){this.images=[]};mxVsdxCanvas2D.prototype.getShapeType=function(){return this.shapeType};mxVsdxCanvas2D.prototype.getShapeGeo=function(){return this.geoSec}; mxVsdxCanvas2D.prototype.createCellElemScaled=function(c,n,m){return this.createCellElem(c,n/VsdxExport.prototype.CONVERSION_FACTOR,m)};mxVsdxCanvas2D.prototype.createCellElem=function(c,n,m){var k=this.createElt("Cell");k.setAttribute("N",c);k.setAttribute("V",n);m&&k.setAttribute("F",m);return k}; -mxVsdxCanvas2D.prototype.createRowScaled=function(c,n,m,k,f,e,b,a,d,h,p,z,y,x){return this.createRowRel(c,n,m/VsdxExport.prototype.CONVERSION_FACTOR,k/VsdxExport.prototype.CONVERSION_FACTOR,f/VsdxExport.prototype.CONVERSION_FACTOR,e/VsdxExport.prototype.CONVERSION_FACTOR,b/VsdxExport.prototype.CONVERSION_FACTOR,a/VsdxExport.prototype.CONVERSION_FACTOR,d,h,p,z,y,x)}; -mxVsdxCanvas2D.prototype.createRowRel=function(c,n,m,k,f,e,b,a,d,h,p,z,y,x){var C=this.createElt("Row");C.setAttribute("T",c);C.setAttribute("IX",n);C.appendChild(this.createCellElem("X",m,d));C.appendChild(this.createCellElem("Y",k,h));null!=f&&C.appendChild(this.createCellElem("A",f,p));null!=e&&C.appendChild(this.createCellElem("B",e,z));null!=b&&C.appendChild(this.createCellElem("C",b,y));null!=a&&C.appendChild(this.createCellElem("D",a,x));return C}; +mxVsdxCanvas2D.prototype.createRowScaled=function(c,n,m,k,f,e,b,a,d,h,p,y,z,x){return this.createRowRel(c,n,m/VsdxExport.prototype.CONVERSION_FACTOR,k/VsdxExport.prototype.CONVERSION_FACTOR,f/VsdxExport.prototype.CONVERSION_FACTOR,e/VsdxExport.prototype.CONVERSION_FACTOR,b/VsdxExport.prototype.CONVERSION_FACTOR,a/VsdxExport.prototype.CONVERSION_FACTOR,d,h,p,y,z,x)}; +mxVsdxCanvas2D.prototype.createRowRel=function(c,n,m,k,f,e,b,a,d,h,p,y,z,x){var C=this.createElt("Row");C.setAttribute("T",c);C.setAttribute("IX",n);C.appendChild(this.createCellElem("X",m,d));C.appendChild(this.createCellElem("Y",k,h));null!=f&&C.appendChild(this.createCellElem("A",f,p));null!=e&&C.appendChild(this.createCellElem("B",e,y));null!=b&&C.appendChild(this.createCellElem("C",b,z));null!=a&&C.appendChild(this.createCellElem("D",a,x));return C}; mxVsdxCanvas2D.prototype.begin=function(){1<this.geoStepIndex&&this.createGeoSec()}; mxVsdxCanvas2D.prototype.rect=function(c,n,m,k){1<this.geoStepIndex&&this.createGeoSec();var f=this.state;m*=f.scale;k*=f.scale;var e=this.xmGeo;c=(c-e.x+f.dx)*f.scale/m;n=(e.height-n+e.y-f.dy)*f.scale/k;this.geoSec.appendChild(this.createRowRel("RelMoveTo",this.geoStepIndex++,c,n));this.geoSec.appendChild(this.createRowRel("RelLineTo",this.geoStepIndex++,c+1,n));this.geoSec.appendChild(this.createRowRel("RelLineTo",this.geoStepIndex++,c+1,n-1));this.geoSec.appendChild(this.createRowRel("RelLineTo", this.geoStepIndex++,c,n-1));this.geoSec.appendChild(this.createRowRel("RelLineTo",this.geoStepIndex++,c,n))};mxVsdxCanvas2D.prototype.roundrect=function(c,n,m,k,f,e){this.rect(c,n,m,k);this.shape.appendChild(this.createCellElemScaled("Rounding",f))}; @@ -753,21 +753,21 @@ mxVsdxCanvas2D.prototype.curveTo=function(c,n,m,k,f,e){this.lastX=f;this.lastY=e mxVsdxCanvas2D.prototype.close=function(){this.lastMoveToX==this.lastX&&this.lastMoveToY==this.lastY||this.lineTo(this.lastMoveToX,this.lastMoveToY)};mxVsdxCanvas2D.prototype.addForeignData=function(c,n){var m=this.createElt("ForeignData");m.setAttribute("ForeignType","Bitmap");c=c.toUpperCase();"BMP"!=c&&m.setAttribute("CompressionType",c);var k=this.createElt("Rel");k.setAttribute("r:id","rId"+n);m.appendChild(k);this.shape.appendChild(m);this.shapeType="Foreign"}; mxVsdxCanvas2D.prototype.convertSvg2Png=function(c,n,m){var k=this;this.filesLoading++;try{var f=document.createElement("canvas"),e=f.getContext("2d");n||(c=String.fromCharCode.apply(null,new Uint8Array(c)),c=window.btoa?btoa(c):Base64.encode(c,!0));n="data:image/svg+xml;base64,"+c;img=new Image;img.onload=function(){f.width=this.width;f.height=this.height;e.drawImage(this,0,0);try{m(f.toDataURL("image/png"))}catch(b){}k.filesLoading--;if(0==k.filesLoading)k.onFilesLoaded()};img.onerror=function(){console.log("SVG2PNG conversion failed"); try{m(c)}catch(b){}k.filesLoading--;if(0==k.filesLoading)k.onFilesLoaded()};img.src=n}catch(b){console.log("SVG2PNG conversion failed"+b.message);try{m(c)}catch(a){}this.filesLoading--;if(0==k.filesLoading)k.onFilesLoaded()}}; -mxVsdxCanvas2D.prototype.image=function(c,n,m,k,f,e,b,a){var d=this,h="image"+(this.images.length+1)+".",p;if(0==f.indexOf("data:"))p=f.indexOf("base64,"),e=f.substring(p+7),p=f.substring(11,p-1),0==p.indexOf("svg")?(p="png",h+=p,this.convertSvg2Png(e,!0,function(a){d.zip.file("visio/media/"+h,a.substring(22),{base64:!0})})):(h+=p,this.zip.file("visio/media/"+h,e,{base64:!0}));else if(window.XMLHttpRequest){f=this.converter.convert(f);this.filesLoading++;p=f.lastIndexOf(".");p=f.substring(p+1);var z= -!1;0==p.indexOf("svg")&&(p="png",z=!0);h+=p;e=new XMLHttpRequest;e.open("GET",f,!0);e.responseType="arraybuffer";e.onreadystatechange=function(a){if(4==this.readyState&&(200==this.status&&(z?d.convertSvg2Png(this.response,!1,function(a){d.zip.file("visio/media/"+h,a.substring(22),{base64:!0})}):d.zip.file("visio/media/"+h,this.response)),d.filesLoading--,0==d.filesLoading))d.onFilesLoaded()};e.send()}this.images.push(h);this.shapeImg={type:p,id:this.images.length+1};f=this.state;m*=f.scale;k*=f.scale; +mxVsdxCanvas2D.prototype.image=function(c,n,m,k,f,e,b,a){var d=this,h="image"+(this.images.length+1)+".",p;if(0==f.indexOf("data:"))p=f.indexOf("base64,"),e=f.substring(p+7),p=f.substring(11,p-1),0==p.indexOf("svg")?(p="png",h+=p,this.convertSvg2Png(e,!0,function(a){d.zip.file("visio/media/"+h,a.substring(22),{base64:!0})})):(h+=p,this.zip.file("visio/media/"+h,e,{base64:!0}));else if(window.XMLHttpRequest){f=this.converter.convert(f);this.filesLoading++;p=f.lastIndexOf(".");p=f.substring(p+1);var y= +!1;0==p.indexOf("svg")&&(p="png",y=!0);h+=p;e=new XMLHttpRequest;e.open("GET",f,!0);e.responseType="arraybuffer";e.onreadystatechange=function(a){if(4==this.readyState&&(200==this.status&&(y?d.convertSvg2Png(this.response,!1,function(a){d.zip.file("visio/media/"+h,a.substring(22),{base64:!0})}):d.zip.file("visio/media/"+h,this.response)),d.filesLoading--,0==d.filesLoading))d.onFilesLoaded()};e.send()}this.images.push(h);this.shapeImg={type:p,id:this.images.length+1};f=this.state;m*=f.scale;k*=f.scale; p=this.xmGeo;c=(c-p.x+f.dx)*f.scale;n=(p.height-n+p.y-f.dy)*f.scale;this.shape.appendChild(this.createCellElemScaled("ImgOffsetX",c));this.shape.appendChild(this.createCellElemScaled("ImgOffsetY",n-k));this.shape.appendChild(this.createCellElemScaled("ImgWidth",m));this.shape.appendChild(this.createCellElemScaled("ImgHeight",k))}; -mxVsdxCanvas2D.prototype.text=function(c,n,m,k,f,e,b,a,d,h,p,z,y){var x=this;if(this.textEnabled&&null!=f){mxUtils.isNode(f)&&(f=mxUtils.getOuterHtml(f));0==m&&0==k&&(k=mxUtils.getSizeForString(f,x.cellState.style.fontSize,x.cellState.style.fontFamily),m=1.2*k.width,k=1.2*k.height);"html"==d&&("0"!=mxUtils.getValue(this.cellState.style,"nl2Br","1")&&(f=f.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n")),null==this.html2txtDiv&&(this.html2txtDiv=document.createElement("div")),this.html2txtDiv.innerHTML= -f,f=mxUtils.extractTextWithWhitespace(this.html2txtDiv.childNodes));h=this.state;p=this.xmGeo;m*=h.scale;k*=h.scale;var C=this.createElt("Section");C.setAttribute("N","Character");var F=this.createElt("Section");F.setAttribute("N","Paragraph");var A=this.createElt("Text"),B=0,G=0,D=0,Z=0,X=0,aa=0,L=0,T=function(b,d,h,p,c){var e=b.fontSize,z=b.fontFamily,f=mxUtils.getSizeForString(c,e,z);a&&f.width>m&&(f=mxUtils.getSizeForString(c,e,z,m));b.blockElem?(X+=f.width,D=Math.min(Math.max(D,X),m),X=0,aa= -Math.max(aa,f.height),Z+=aa+L,L=aa,aa=0):(X+=f.width,D=Math.min(Math.max(D,X),m),aa=Math.max(aa,f.height),Z=Math.max(Z,aa));f=x.createElt("Row");f.setAttribute("IX",B);b.fontColor&&f.appendChild(x.createCellElem("Color",b.fontColor));e&&f.appendChild(x.createCellElemScaled("Size",.97*e));z&&f.appendChild(x.createCellElem("Font",z));e=0;b.bold&&(e|=17);b.italic&&(e|=34);b.underline&&(e|=4);f.appendChild(x.createCellElem("Style",e));f.appendChild(x.createCellElem("Case","0"));f.appendChild(x.createCellElem("Pos", +mxVsdxCanvas2D.prototype.text=function(c,n,m,k,f,e,b,a,d,h,p,y,z){var x=this;if(this.textEnabled&&null!=f){mxUtils.isNode(f)&&(f=mxUtils.getOuterHtml(f));0==m&&0==k&&(k=mxUtils.getSizeForString(f,x.cellState.style.fontSize,x.cellState.style.fontFamily),m=1.2*k.width,k=1.2*k.height);"html"==d&&("0"!=mxUtils.getValue(this.cellState.style,"nl2Br","1")&&(f=f.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n")),null==this.html2txtDiv&&(this.html2txtDiv=document.createElement("div")),this.html2txtDiv.innerHTML= +f,f=mxUtils.extractTextWithWhitespace(this.html2txtDiv.childNodes));h=this.state;p=this.xmGeo;m*=h.scale;k*=h.scale;var C=this.createElt("Section");C.setAttribute("N","Character");var F=this.createElt("Section");F.setAttribute("N","Paragraph");var A=this.createElt("Text"),B=0,G=0,D=0,Z=0,X=0,aa=0,L=0,T=function(b,d,h,p,c){var e=b.fontSize,y=b.fontFamily,f=mxUtils.getSizeForString(c,e,y);a&&f.width>m&&(f=mxUtils.getSizeForString(c,e,y,m));b.blockElem?(X+=f.width,D=Math.min(Math.max(D,X),m),X=0,aa= +Math.max(aa,f.height),Z+=aa+L,L=aa,aa=0):(X+=f.width,D=Math.min(Math.max(D,X),m),aa=Math.max(aa,f.height),Z=Math.max(Z,aa));f=x.createElt("Row");f.setAttribute("IX",B);b.fontColor&&f.appendChild(x.createCellElem("Color",b.fontColor));e&&f.appendChild(x.createCellElemScaled("Size",.97*e));y&&f.appendChild(x.createCellElem("Font",y));e=0;b.bold&&(e|=17);b.italic&&(e|=34);b.underline&&(e|=4);f.appendChild(x.createCellElem("Style",e));f.appendChild(x.createCellElem("Case","0"));f.appendChild(x.createCellElem("Pos", "0"));f.appendChild(x.createCellElem("FontScale","1"));f.appendChild(x.createCellElem("Letterspace","0"));d.appendChild(f);d=x.createElt("Row");d.setAttribute("IX",G);switch(b.align){case "left":e=0;break;case "center":e=1;break;case "right":e=2;break;case "start":e=0;break;case "end":e=2;break;case "justify":e=0;break;default:e=1}d.appendChild(x.createCellElem("HorzAlign",e));h.appendChild(d);h=x.createElt("cp");h.setAttribute("IX",B++);p.appendChild(h);b=x.xmlDoc.createTextNode(c+(b.blockElem?"\n": -""));p.appendChild(b)},V=function(a,b){b=b||{};for(var d=0;d<a.length;d++)if(3==a[d].nodeType){var h=x.cellState.style.fontStyle,p={fontColor:b.fontColor||x.cellState.style.fontColor,fontSize:b.fontSize||x.cellState.style.fontSize,fontFamily:b.fontFamily||x.cellState.style.fontFamily,align:b.align||x.cellState.style.align,bold:b.bold||h&1,italic:b.italic||h&2,underline:b.underline||h&4};T(p,C,F,A,(b.OL?b.LiIndex+". ":"")+a[d].textContent)}else if(1==a[d].nodeType){var h=a[d].nodeName.toUpperCase(), -c=a[d].childNodes.length,p=window.getComputedStyle(a[d],null),e="bold"==p.getPropertyValue("font-weight")||b.bold,z="italic"==p.getPropertyValue("font-style")||b.italic,f=0<=p.getPropertyValue("text-decoration").indexOf("underline")||b.underline,y=p.getPropertyValue("text-align"),k;k=p.getPropertyValue("color");k=(k=k.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i))&&4===k.length?"#"+("0"+parseInt(k[1],10).toString(16)).slice(-2)+("0"+parseInt(k[2],10).toString(16)).slice(-2)+ -("0"+parseInt(k[3],10).toString(16)).slice(-2):"";p={bold:e,italic:z,underline:f,align:y,fontColor:k,fontSize:parseFloat(p.getPropertyValue("font-size")),fontFamily:p.getPropertyValue("font-family").replace(/"/g,""),blockElem:"block"==p.getPropertyValue("display")||"BR"==h||"LI"==h,OL:b.OL,LiIndex:b.LiIndex};"UL"==h?(e=x.createElt("Row"),e.setAttribute("IX",G),e.appendChild(x.createCellElem("HorzAlign","0")),e.appendChild(x.createCellElem("Bullet","1")),F.appendChild(e),e=x.createElt("pp"),e.setAttribute("IX", -G++),A.appendChild(e)):"OL"==h?p.OL=!0:"LI"==h&&(p.LiIndex=d+1);0<c?(V(a[d].childNodes,p),"UL"==h&&(e=x.createElt("Row"),e.setAttribute("IX",G),e.appendChild(x.createCellElem("Bullet","0")),F.appendChild(e),e=x.createElt("pp"),e.setAttribute("IX",G++),A.appendChild(e)),T(p,C,F,A,"")):T(p,C,F,A,(b.OL?b.LiIndex+". ":"")+a[d].textContent)}};"html"==d&&mxClient.IS_SVG?(f=this.cellState.text.node.getElementsByTagName("div")[mxClient.NO_FO?0:1],null!=f&&V(f.childNodes,{})):T({fontColor:x.cellState.style.fontColor, -fontSize:x.cellState.style.fontSize,fontFamily:x.cellState.style.fontFamily},C,F,A,f);d=f=0;k=Math.max(k,Z);m=Math.max(m,D);y=m/2;var da=k/2,ka=parseInt(mxUtils.getValue(this.cellState.style,"rotation","0")),ba=ka*Math.PI/180;switch(e){case "right":0!=ka?(c-=y*Math.cos(ba),n-=y*Math.sin(ba)):f=D/2;break;case "left":0!=ka?(c+=y*Math.cos(ba),n+=y*Math.sin(ba)):f=-D/2}switch(b){case "top":0!=ka?(c+=da*Math.sin(ba),n+=da*Math.cos(ba)):d=Z/2;break;case "bottom":0!=ka?(c-=da*Math.sin(ba),n-=da*Math.cos(ba)): -d=-Z/2}c=(c-p.x+h.dx)*h.scale;n=(p.height-n+p.y-h.dy)*h.scale;this.shape.appendChild(this.createCellElemScaled("TxtPinX",c));this.shape.appendChild(this.createCellElemScaled("TxtPinY",n));this.shape.appendChild(this.createCellElemScaled("TxtWidth",m));this.shape.appendChild(this.createCellElemScaled("TxtHeight",k));this.shape.appendChild(this.createCellElemScaled("TxtLocPinX",y+f));this.shape.appendChild(this.createCellElemScaled("TxtLocPinY",da+d));z-=ka;0!=z&&this.shape.appendChild(this.createCellElem("TxtAngle", -(360-z)*Math.PI/180));this.shape.appendChild(C);this.shape.appendChild(F);this.shape.appendChild(A)}};mxVsdxCanvas2D.prototype.rotate=function(c,n,m,k,f){0!=c&&(n=this.state,k+=n.dx,f+=n.dy,k*=n.scale,f*=n.scale,this.shape.appendChild(this.createCellElem("Angle",(360-c)*Math.PI/180)),n.rotation+=c,n.rotationCx=k,n.rotationCy=f)};mxVsdxCanvas2D.prototype.stroke=function(){this.geoSec.appendChild(this.createCellElem("NoFill","1"));this.geoSec.appendChild(this.createCellElem("NoLine","0"))}; -mxVsdxCanvas2D.prototype.fill=function(){this.geoSec.appendChild(this.createCellElem("NoFill","0"));this.geoSec.appendChild(this.createCellElem("NoLine","1"))};mxVsdxCanvas2D.prototype.fillAndStroke=function(){this.geoSec.appendChild(this.createCellElem("NoFill","0"));this.geoSec.appendChild(this.createCellElem("NoLine","0"))};function BmpDecoder(c,n){this.pos=0;this.buffer=c;this.is_with_alpha=!!n;if(66!=this.buffer[0]&&77!=this.buffer[1])throw Error("Invalid BMP File");this.pos+=2;this.parseHeader();this.parseBGR()} +""));p.appendChild(b)},V=function(a,b){b=b||{};for(var d=0;d<a.length;d++){var h=a[d];if(3==h.nodeType){var p=x.cellState.style.fontStyle,c={fontColor:b.fontColor||x.cellState.style.fontColor,fontSize:b.fontSize||x.cellState.style.fontSize,fontFamily:b.fontFamily||x.cellState.style.fontFamily,align:b.align||x.cellState.style.align,bold:b.bold||p&1,italic:b.italic||p&2,underline:b.underline||p&4},p=!1;d+1<a.length&&"BR"==a[d+1].nodeName.toUpperCase()&&(p=!0,d++);T(c,C,F,A,(b.OL?b.LiIndex+". ":"")+ +h.textContent+(p?"\n":""))}else if(1==h.nodeType){var p=h.nodeName.toUpperCase(),e=h.childNodes.length,c=window.getComputedStyle(h,null),y="bold"==c.getPropertyValue("font-weight")||b.bold,f="italic"==c.getPropertyValue("font-style")||b.italic,z=0<=c.getPropertyValue("text-decoration").indexOf("underline")||b.underline,k=c.getPropertyValue("text-align"),m;m=c.getPropertyValue("color");m=(m=m.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i))&&4===m.length?"#"+("0"+parseInt(m[1], +10).toString(16)).slice(-2)+("0"+parseInt(m[2],10).toString(16)).slice(-2)+("0"+parseInt(m[3],10).toString(16)).slice(-2):"";c={bold:y,italic:f,underline:z,align:k,fontColor:m,fontSize:parseFloat(c.getPropertyValue("font-size")),fontFamily:c.getPropertyValue("font-family").replace(/"/g,""),blockElem:"block"==c.getPropertyValue("display")||"BR"==p||"LI"==p,OL:b.OL,LiIndex:b.LiIndex};"UL"==p?(y=x.createElt("Row"),y.setAttribute("IX",G),y.appendChild(x.createCellElem("HorzAlign","0")),y.appendChild(x.createCellElem("Bullet", +"1")),F.appendChild(y),y=x.createElt("pp"),y.setAttribute("IX",G++),A.appendChild(y)):"OL"==p?c.OL=!0:"LI"==p&&(c.LiIndex=d+1);0<e?(V(h.childNodes,c),"UL"==p&&(y=x.createElt("Row"),y.setAttribute("IX",G),y.appendChild(x.createCellElem("Bullet","0")),F.appendChild(y),y=x.createElt("pp"),y.setAttribute("IX",G++),A.appendChild(y)),T(c,C,F,A,"")):T(c,C,F,A,(b.OL?b.LiIndex+". ":"")+h.textContent)}}};"html"==d&&mxClient.IS_SVG?(f=this.cellState.text.node.getElementsByTagName("div")[mxClient.NO_FO?0:1], +null!=f&&V(f.childNodes,{})):T({fontColor:x.cellState.style.fontColor,fontSize:x.cellState.style.fontSize,fontFamily:x.cellState.style.fontFamily},C,F,A,f);d=f=0;k=Math.max(k,Z);m=Math.max(m,D);z=m/2;var da=k/2,ka=parseInt(mxUtils.getValue(this.cellState.style,"rotation","0")),ba=ka*Math.PI/180;switch(e){case "right":0!=ka?(c-=z*Math.cos(ba),n-=z*Math.sin(ba)):f=D/2;break;case "left":0!=ka?(c+=z*Math.cos(ba),n+=z*Math.sin(ba)):f=-D/2}switch(b){case "top":0!=ka?(c+=da*Math.sin(ba),n+=da*Math.cos(ba)): +d=Z/2;break;case "bottom":0!=ka?(c-=da*Math.sin(ba),n-=da*Math.cos(ba)):d=-Z/2}c=(c-p.x+h.dx)*h.scale;n=(p.height-n+p.y-h.dy)*h.scale;this.shape.appendChild(this.createCellElemScaled("TxtPinX",c));this.shape.appendChild(this.createCellElemScaled("TxtPinY",n));this.shape.appendChild(this.createCellElemScaled("TxtWidth",m));this.shape.appendChild(this.createCellElemScaled("TxtHeight",k));this.shape.appendChild(this.createCellElemScaled("TxtLocPinX",z+f));this.shape.appendChild(this.createCellElemScaled("TxtLocPinY", +da+d));y-=ka;0!=y&&this.shape.appendChild(this.createCellElem("TxtAngle",(360-y)*Math.PI/180));this.shape.appendChild(C);this.shape.appendChild(F);this.shape.appendChild(A)}};mxVsdxCanvas2D.prototype.rotate=function(c,n,m,k,f){0!=c&&(n=this.state,k+=n.dx,f+=n.dy,k*=n.scale,f*=n.scale,this.shape.appendChild(this.createCellElem("Angle",(360-c)*Math.PI/180)),n.rotation+=c,n.rotationCx=k,n.rotationCy=f)}; +mxVsdxCanvas2D.prototype.stroke=function(){this.geoSec.appendChild(this.createCellElem("NoFill","1"));this.geoSec.appendChild(this.createCellElem("NoLine","0"))};mxVsdxCanvas2D.prototype.fill=function(){this.geoSec.appendChild(this.createCellElem("NoFill","0"));this.geoSec.appendChild(this.createCellElem("NoLine","1"))};mxVsdxCanvas2D.prototype.fillAndStroke=function(){this.geoSec.appendChild(this.createCellElem("NoFill","0"));this.geoSec.appendChild(this.createCellElem("NoLine","0"))};function BmpDecoder(c,n){this.pos=0;this.buffer=c;this.is_with_alpha=!!n;if(66!=this.buffer[0]&&77!=this.buffer[1])throw Error("Invalid BMP File");this.pos+=2;this.parseHeader();this.parseBGR()} BmpDecoder.prototype.parseHeader=function(){var c=this.buffer;this.fileSize=c[this.pos+3]<<24|c[this.pos+2]<<16|c[this.pos+1]<<8|c[this.pos];this.pos+=4;this.reserved=c[this.pos+3]<<24|c[this.pos+2]<<16|c[this.pos+1]<<8|c[this.pos];this.pos+=4;this.offset=c[this.pos+3]<<24|c[this.pos+2]<<16|c[this.pos+1]<<8|c[this.pos];this.pos+=4;this.headerSize=c[this.pos+3]<<24|c[this.pos+2]<<16|c[this.pos+1]<<8|c[this.pos];this.pos+=4;this.width=c[this.pos+3]<<24|c[this.pos+2]<<16|c[this.pos+1]<<8|c[this.pos]; this.pos+=4;this.height=c[this.pos+3]<<24|c[this.pos+2]<<16|c[this.pos+1]<<8|c[this.pos];this.pos+=4;this.planes=c[this.pos+1]<<8|c[this.pos];this.pos+=2;this.bitPP=c[this.pos+1]<<8|c[this.pos];this.pos+=2;this.compress=c[this.pos+3]<<24|c[this.pos+2]<<16|c[this.pos+1]<<8|c[this.pos];this.pos+=4;this.rawSize=c[this.pos+3]<<24|c[this.pos+2]<<16|c[this.pos+1]<<8|c[this.pos];this.pos+=4;this.hr=c[this.pos+3]<<24|c[this.pos+2]<<16|c[this.pos+1]<<8|c[this.pos];this.pos+=4;this.vr=c[this.pos+3]<<24|c[this.pos+ 2]<<16|c[this.pos+1]<<8|c[this.pos];this.pos+=4;this.colors=c[this.pos+3]<<24|c[this.pos+2]<<16|c[this.pos+1]<<8|c[this.pos];this.pos+=4;this.importantColors=c[this.pos+3]<<24|c[this.pos+2]<<16|c[this.pos+1]<<8|c[this.pos];this.pos+=4;16===this.bitPP&&this.is_with_alpha&&(this.bitPP=15);if(15>this.bitPP){c=0===this.colors?1<<this.bitPP:this.colors;this.palette=Array(c);for(var n=0;n<c;n++){var m=this.buffer[this.pos++],k=this.buffer[this.pos++],f=this.buffer[this.pos++],e=this.buffer[this.pos++]; @@ -782,11 +782,11 @@ BmpDecoder.prototype.bit32=function(){for(var c=this.height-1;0<=c;c--)for(var n (function(c){(function(n){(function(m){var k=function(){function f(c){this.RESPONSE_END="</mxfile>";this.RESPONSE_DIAGRAM_START="";this.RESPONSE_DIAGRAM_END="</diagram>";this.RESPONSE_HEADER='<?xml version="1.0" encoding="UTF-8"?><mxfile>';this.vertexMap={};this.edgeShapeMap={};this.vertexShapeMap={};this.parentsMap={};this.layersMap={};this.debugPaths=!1;this.vsdxModel=null;this.editorUi=c}f.vsdxPlaceholder_$LI$=function(){null==f.vsdxPlaceholder&&(f.vsdxPlaceholder=window.atob?atob("dmlzaW8="): Base64.decode("dmlzaW8=",!0));return f.vsdxPlaceholder};f.parsererrorNS_$LI$=function(){if(null==f.parsererrorNS&&(f.parsererrorNS="",window.DOMParser)){var c=new DOMParser;try{f.parsererrorNS=c.parseFromString("<","text/xml").getElementsByTagName("parsererror")[0].namespaceURI}catch(b){}}return f.parsererrorNS};f.parseXml=function(c){try{var b=mxUtils.parseXml(c);return 0<b.getElementsByTagNameNS(f.parsererrorNS,"parsererror").length?null:b}catch(a){return null}};f.decodeUTF16LE=function(c){for(var b= "",a=0;a<c.length;a+=2)b+=String.fromCharCode(c.charCodeAt(a)|c.charCodeAt(a+1)<<8);return b};f.prototype.scaleGraph=function(c,b){if(1!==b){var a=c.getModel(),d;for(d in a.cells){var h=a.cells[d],p=a.getGeometry(h);if(null!=p&&(this.scaleRect(p,b),this.scaleRect(p.alternateBounds,b),a.isEdge(h)&&(this.scalePoint(p.sourcePoint,b),this.scalePoint(p.targetPoint,b),this.scalePoint(p.offset,b),h=p.points,null!=h)))for(p=0;p<h.length;p++)this.scalePoint(h[p],b)}}};f.prototype.decodeVsdx=function(e,b,a, -d){var h=this,p={},z={},y=function(){for(var a=f.vsdxPlaceholder+"/document.xml",d=p[a]?p[a]:null,e=d.firstChild;null!=e&&1!=e.nodeType;)e=e.nextSibling;if(null!=e&&1==e.nodeType)h.importNodes(d,e,a,p);else return null;h.vsdxModel=new c.mxgraph.io.vsdx.mxVsdxModel(d,p,z);for(var a=h.vsdxModel.getPages(),y=h.RESPONSE_HEADER,x=function(a){null==a.entries&&(a.entries=[]);return a.entries}(a),a=function(a){a=x[a].getValue();var b=k.createMxGraph();b.getModel().beginUpdate();k.importPage(a,b,b.getDefaultParent()); -k.scaleGraph(b,a.getPageScale()/a.getDrawingScale());b.getModel().endUpdate();y=y.concat(h.RESPONSE_DIAGRAM_START);y=y.concat(h.processPage(b,a));y=y.concat(h.RESPONSE_DIAGRAM_END)},k=h,d=0;d<x.length;d++)a(d);y=y.concat(h.RESPONSE_END);b&&b(y)},x=0,k=0,m=function(){if(k==x)try{y()}catch(A){console.log(A),null!=d?d():b("")}};JSZip.loadAsync(e).then(function(a){0==Object.keys(a.files).length?null!=d&&d():a.forEach(function(a,b){var d=b.name,c=d.toLowerCase(),e=c.length;c.indexOf(".xml")==e-4||c.indexOf(".xml.rels")== +d){var h=this,p={},y={},z=function(){for(var a=f.vsdxPlaceholder+"/document.xml",d=p[a]?p[a]:null,e=d.firstChild;null!=e&&1!=e.nodeType;)e=e.nextSibling;if(null!=e&&1==e.nodeType)h.importNodes(d,e,a,p);else return null;h.vsdxModel=new c.mxgraph.io.vsdx.mxVsdxModel(d,p,y);for(var a=h.vsdxModel.getPages(),z=h.RESPONSE_HEADER,x=function(a){null==a.entries&&(a.entries=[]);return a.entries}(a),a=function(a){a=x[a].getValue();var b=k.createMxGraph();b.getModel().beginUpdate();k.importPage(a,b,b.getDefaultParent()); +k.scaleGraph(b,a.getPageScale()/a.getDrawingScale());b.getModel().endUpdate();z=z.concat(h.RESPONSE_DIAGRAM_START);z=z.concat(h.processPage(b,a));z=z.concat(h.RESPONSE_DIAGRAM_END)},k=h,d=0;d<x.length;d++)a(d);z=z.concat(h.RESPONSE_END);b&&b(z)},x=0,k=0,m=function(){if(k==x)try{z()}catch(A){console.log(A),null!=d?d():b("")}};JSZip.loadAsync(e).then(function(a){0==Object.keys(a.files).length?null!=d&&d():a.forEach(function(a,b){var d=b.name,c=d.toLowerCase(),e=c.length;c.indexOf(".xml")==e-4||c.indexOf(".xml.rels")== e-9?(x++,b.async("string").then(function(a){if(0!==a.length){65279==a.charCodeAt(0)&&(a=a.substring(1));var b=f.parseXml(a);null==b&&0===a.charCodeAt(1)&&0===a.charCodeAt(3)&&0===a.charCodeAt(5)&&(b=f.parseXml(f.decodeUTF16LE(a)));null!=b&&(b.vsdxFileName=d,p[d]=b)}k++;m()})):0===c.indexOf(f.vsdxPlaceholder+"/media")&&(x++,function(a,b){var d=a.length-b.length,h=a.indexOf(b,d);return-1!==h&&h===d}(c,".emf")?JSZip.support.blob&&window.EMF_CONVERT_URL?b.async("blob").then(function(a){var b=new FormData; -b.append("img",a,c);b.append("inputformat","emf");b.append("outputformat","png");var p=new XMLHttpRequest;p.open("POST",EMF_CONVERT_URL);p.responseType="blob";h.editorUi.addRemoteServiceSecurityCheck(p);p.onreadystatechange=mxUtils.bind(this,function(){if(4==p.readyState)if(200<=p.status&&299>=p.status)try{var a=new FileReader;a.readAsDataURL(p.response);a.onloadend=function(){var b=a.result.indexOf(",")+1;z[d]=a.result.substr(b);k++;m()}}catch(da){console.log(da),k++,m()}else k++,m()});p.send(b)}): -(k++,m()):function(a,b){var d=a.length-b.length,h=a.indexOf(b,d);return-1!==h&&h===d}(c,".bmp")?JSZip.support.uint8array&&b.async("uint8array").then(function(a){a=new BmpDecoder(a);var b=document.createElement("canvas");b.width=a.width;b.height=a.height;b.getContext("2d").putImageData(a.imageData,0,0);a=b.toDataURL("image/jpeg");z[d]=a.substr(23);k++;m()}):b.async("base64").then(function(a){z[d]=a;k++;m()}))})},function(a){null!=d&&d(a)})};f.prototype.createMxGraph=function(){var c=new Graph;c.setExtendParents(!1); +b.append("img",a,c);b.append("inputformat","emf");b.append("outputformat","png");var p=new XMLHttpRequest;p.open("POST",EMF_CONVERT_URL);p.responseType="blob";h.editorUi.addRemoteServiceSecurityCheck(p);p.onreadystatechange=mxUtils.bind(this,function(){if(4==p.readyState)if(200<=p.status&&299>=p.status)try{var a=new FileReader;a.readAsDataURL(p.response);a.onloadend=function(){var b=a.result.indexOf(",")+1;y[d]=a.result.substr(b);k++;m()}}catch(da){console.log(da),k++,m()}else k++,m()});p.send(b)}): +(k++,m()):function(a,b){var d=a.length-b.length,h=a.indexOf(b,d);return-1!==h&&h===d}(c,".bmp")?JSZip.support.uint8array&&b.async("uint8array").then(function(a){a=new BmpDecoder(a);var b=document.createElement("canvas");b.width=a.width;b.height=a.height;b.getContext("2d").putImageData(a.imageData,0,0);a=b.toDataURL("image/jpeg");y[d]=a.substr(23);k++;m()}):b.async("base64").then(function(a){y[d]=a;k++;m()}))})},function(a){null!=d&&d(a)})};f.prototype.createMxGraph=function(){var c=new Graph;c.setExtendParents(!1); c.setExtendParentsOnAdd(!1);c.setConstrainChildren(!1);c.setHtmlLabels(!0);c.getModel().maintainEdgeParent=!1;return c};f.prototype.processPage=function(c,b){var a=(new mxCodec).encode(c.getModel());a.setAttribute("style","default-style2");var a=mxUtils.getXml(a),d="";if(null!=b)var h=mxUtils.htmlEntities(b.getPageName())+(b.isBackground()?" (Background)":""),d=d+('<diagram name="'+h+'" id="'+h+'">');return d+=Graph.compress(a)};f.prototype.scalePoint=function(c,b){null!=c&&(c.x*=b,c.y*=b);return c}; f.prototype.scaleRect=function(c,b){null!=c&&(c.x*=b,c.y*=b,c.height*=b,c.width*=b);return c};f.prototype.importNodes=function(c,b,a,d){var h=a.lastIndexOf("/"),p=a,e=a;if(-1!==h&&(p=a.substring(0,h),e=a.substring(h+1,a.length),a=function(a,b){return a[b]?a[b]:null}(d,p+"/_rels/"+e+".rels"),null!=a)){var f=a.getElementsByTagName("Relationship");a={};for(h=0;h<f.length;h++){var e=f.item(h),x=e.getAttribute("Id"),e=e.getAttribute("Target");a[x]=e}b=b.getElementsByTagName("Rel");for(h=0;h<b.length;h++)if(f= b.item(h),e=function(a,b){return a[b]?a[b]:null}(a,f.getAttribute("r:id")),e=p+"/"+e,null!=e&&(x=d[e]?d[e]:null,null!=x)){f=f.parentNode;for(x=x.firstChild;null!=x&&1!=x.nodeType;)x=x.nextSibling;if(null!=x&&1==x.nodeType)for(x=x.firstChild;null!=x;){if(null!=x&&1==x.nodeType){var k=f.appendChild(c.importNode(x,!0));this.importNodes(c,k,e,d)}x=x.nextSibling}}}};f.prototype.importPage=function(c,b,a){var d=c.getBackPage();if(null!=d){b.getModel().setValue(b.getDefaultParent(),c.getPageName());var h= @@ -794,39 +794,39 @@ new mxCell(d.getPageName());b.addCell(h,b.getModel().getRoot(),0,null,null);this (a.entries=[]);return a.entries}(c.getShapes()));d=c.getPageDimensions().y;for(h=c.getId();p.hasNext();){var e=p.next(),e=e.getValue(),f=this.layersMap[e.layerMember];this.addShape(b,e,f?f:a,h,d)}for(c=function(a){var b=0;return{next:function(){return b<a.length?a[b++]:null},hasNext:function(){return b<a.length}}}(function(a){null==a.entries&&(a.entries=[]);return a.entries}(c.getConnects()));c.hasNext();)e=c.next(),a=this.addConnectedEdge(b,e.getValue(),h,d),null!=a&&function(a,b){null==a.entries&& (a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b)return a.entries.splice(d,1)[0]}(this.edgeShapeMap,a);for(c=function(a){var b=0;return{next:function(){return b<a.length?a[b++]:null},hasNext:function(){return b<a.length}}}(function(a){null==a.entries&&(a.entries=[]);return a.entries}(this.edgeShapeMap));c.hasNext();)a=c.next(),a.getKey().getPageNumber()===h&&this.addUnconnectedEdge(b,function(a,b){null==a.entries&& (a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b)return a.entries[d].value;return null}(this.parentsMap,a.getKey()),a.getValue(),d);this.sanitiseGraph(b);return d};f.prototype.addShape=function(e,b,a,d,h){b.parentHeight=h;var p=c.mxgraph.io.vsdx.VsdxShape.getType(b.getShape());if(null!=p&&(function(a,b){return a&&a.equals?a.equals(b):a===b}(p,c.mxgraph.io.vsdx.mxVsdxConstants.TYPE_SHAPE)||function(a,b){return a&&a.equals? -a.equals(b):a===b}(p,c.mxgraph.io.vsdx.mxVsdxConstants.TYPE_GROUP)||function(a,b){return a&&a.equals?a.equals(b):a===b}(p,c.mxgraph.io.vsdx.mxVsdxConstants.FOREIGN))){var z=b.getId();if(b.isVertex())return p=null,p=b.isGroup()?this.addGroup(e,b,a,d,h):this.addVertex(e,b,a,d,h),function(a,b,d){null==a.entries&&(a.entries=[]);for(var h=0;h<a.entries.length;h++)if(null!=a.entries[h].key.equals&&a.entries[h].key.equals(b)||a.entries[h].key===b){a.entries[h].value=d;return}a.entries.push({key:b,value:d, -getKey:function(){return this.key},getValue:function(){return this.value}})}(this.vertexShapeMap,new c.mxgraph.io.vsdx.ShapePageId(d,z),b),b=b.getHyperlink(),b.extLink?e.setLinkForCell(p,b.extLink):b.pageLink&&e.setLinkForCell(p,"data:page/id,"+b.pageLink),p;b.setShapeIndex(e.getModel().getChildCount(a));(function(a,b,d){null==a.entries&&(a.entries=[]);for(var h=0;h<a.entries.length;h++)if(null!=a.entries[h].key.equals&&a.entries[h].key.equals(b)||a.entries[h].key===b){a.entries[h].value=d;return}a.entries.push({key:b, -value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(this.edgeShapeMap,new c.mxgraph.io.vsdx.ShapePageId(d,z),b);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var h=0;h<a.entries.length;h++)if(null!=a.entries[h].key.equals&&a.entries[h].key.equals(b)||a.entries[h].key===b){a.entries[h].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(this.parentsMap,new c.mxgraph.io.vsdx.ShapePageId(d, -z),a)}return null};f.prototype.addGroup=function(e,b,a,d,h){var p=b.getDimensions(),z=b.getMaster(),f=b.getStyleFromShape(),x=b.getGeomList();x.isNoFill()&&(f[mxConstants.STYLE_FILLCOLOR]="none",f[mxConstants.STYLE_GRADIENTCOLOR]="none");x.isNoLine()&&(f[mxConstants.STYLE_STROKECOLOR]="none");f.html="1";f[mxConstants.STYLE_WHITE_SPACE]="wrap";var k=c.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(f,"="),f=null,m=b.getChildShapes(),f=null!=m&&0<function(a){null==a.entries&&(a.entries=[]);return a.entries.length}(m), +a.equals(b):a===b}(p,c.mxgraph.io.vsdx.mxVsdxConstants.TYPE_GROUP)||function(a,b){return a&&a.equals?a.equals(b):a===b}(p,c.mxgraph.io.vsdx.mxVsdxConstants.FOREIGN))){var y=b.getId();if(b.isVertex())return p=null,p=b.isGroup()?this.addGroup(e,b,a,d,h):this.addVertex(e,b,a,d,h),function(a,b,d){null==a.entries&&(a.entries=[]);for(var h=0;h<a.entries.length;h++)if(null!=a.entries[h].key.equals&&a.entries[h].key.equals(b)||a.entries[h].key===b){a.entries[h].value=d;return}a.entries.push({key:b,value:d, +getKey:function(){return this.key},getValue:function(){return this.value}})}(this.vertexShapeMap,new c.mxgraph.io.vsdx.ShapePageId(d,y),b),b=b.getHyperlink(),b.extLink?e.setLinkForCell(p,b.extLink):b.pageLink&&e.setLinkForCell(p,"data:page/id,"+b.pageLink),p;b.setShapeIndex(e.getModel().getChildCount(a));(function(a,b,d){null==a.entries&&(a.entries=[]);for(var h=0;h<a.entries.length;h++)if(null!=a.entries[h].key.equals&&a.entries[h].key.equals(b)||a.entries[h].key===b){a.entries[h].value=d;return}a.entries.push({key:b, +value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(this.edgeShapeMap,new c.mxgraph.io.vsdx.ShapePageId(d,y),b);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var h=0;h<a.entries.length;h++)if(null!=a.entries[h].key.equals&&a.entries[h].key.equals(b)||a.entries[h].key===b){a.entries[h].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(this.parentsMap,new c.mxgraph.io.vsdx.ShapePageId(d, +y),a)}return null};f.prototype.addGroup=function(e,b,a,d,h){var p=b.getDimensions(),y=b.getMaster(),f=b.getStyleFromShape(),x=b.getGeomList();x.isNoFill()&&(f[mxConstants.STYLE_FILLCOLOR]="none",f[mxConstants.STYLE_GRADIENTCOLOR]="none");x.isNoLine()&&(f[mxConstants.STYLE_STROKECOLOR]="none");f.html="1";f[mxConstants.STYLE_WHITE_SPACE]="wrap";var k=c.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(f,"="),f=null,m=b.getChildShapes(),f=null!=m&&0<function(a){null==a.entries&&(a.entries=[]);return a.entries.length}(m), x=b.isDisplacedLabel()||b.isRotatedLabel()||f,f=b.getOriginPoint(h,!0);if(x)f=e.insertVertex(a,null,null,Math.floor(Math.round(100*f.x)/100),Math.floor(Math.round(100*f.y)/100),Math.floor(Math.round(100*p.x)/100),Math.floor(Math.round(100*p.y)/100),k);else var n=b.getTextLabel(),f=e.insertVertex(a,null,n,Math.floor(Math.round(100*f.x)/100),Math.floor(Math.round(100*f.y)/100),Math.floor(Math.round(100*p.x)/100),Math.floor(Math.round(100*p.y)/100),k);for(a=function(a){var b=0;return{next:function(){return b< a.length?a[b++]:null},hasNext:function(){return b<a.length}}}(function(a){null==a.entries&&(a.entries=[]);return a.entries}(m));a.hasNext();)k=a.next().getValue(),m=k.getId(),k.isVertex()?(n=c.mxgraph.io.vsdx.VsdxShape.getType(k.getShape()),null!=n&&(function(a,b){return a&&a.equals?a.equals(b):a===b}(n,c.mxgraph.io.vsdx.mxVsdxConstants.TYPE_SHAPE)||function(a,b){return a&&a.equals?a.equals(b):a===b}(n,c.mxgraph.io.vsdx.mxVsdxConstants.TYPE_GROUP)||function(a,b){return a&&a.equals?a.equals(b):a=== -b}(n,c.mxgraph.io.vsdx.mxVsdxConstants.FOREIGN))&&k.isVertex()&&(k.propagateRotation(b.getRotation()),k.isGroup()?this.addGroup(e,k,f,d,p.y):this.addVertex(e,k,f,d,p.y)),null==z&&function(a,b,d){null==a.entries&&(a.entries=[]);for(var h=0;h<a.entries.length;h++)if(null!=a.entries[h].key.equals&&a.entries[h].key.equals(b)||a.entries[h].key===b){a.entries[h].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.vertexShapeMap, -new c.mxgraph.io.vsdx.ShapePageId(d,m),k)):null==z?(function(a,b,d){null==a.entries&&(a.entries=[]);for(var h=0;h<a.entries.length;h++)if(null!=a.entries[h].key.equals&&a.entries[h].key.equals(b)||a.entries[h].key===b){a.entries[h].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.edgeShapeMap,new c.mxgraph.io.vsdx.ShapePageId(d,m),k),function(a,b,d){null==a.entries&&(a.entries=[]);for(var h=0;h<a.entries.length;h++)if(null!= -a.entries[h].key.equals&&a.entries[h].key.equals(b)||a.entries[h].key===b){a.entries[h].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.parentsMap,new c.mxgraph.io.vsdx.ShapePageId(d,m),f)):this.addUnconnectedEdge(e,f,k,h);x&&b.createLabelSubShape(e,f);e=b.getRotation();if(0!==e)for(p=f.getGeometry(),h=p.width/2,p=p.height/2,z=0;z<f.getChildCount();z++)x=f.getChildAt(z),c.mxgraph.online.Utils.rotatedGeometry(x.getGeometry(), +b}(n,c.mxgraph.io.vsdx.mxVsdxConstants.FOREIGN))&&k.isVertex()&&(k.propagateRotation(b.getRotation()),k.isGroup()?this.addGroup(e,k,f,d,p.y):this.addVertex(e,k,f,d,p.y)),null==y&&function(a,b,d){null==a.entries&&(a.entries=[]);for(var h=0;h<a.entries.length;h++)if(null!=a.entries[h].key.equals&&a.entries[h].key.equals(b)||a.entries[h].key===b){a.entries[h].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.vertexShapeMap, +new c.mxgraph.io.vsdx.ShapePageId(d,m),k)):null==y?(function(a,b,d){null==a.entries&&(a.entries=[]);for(var h=0;h<a.entries.length;h++)if(null!=a.entries[h].key.equals&&a.entries[h].key.equals(b)||a.entries[h].key===b){a.entries[h].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.edgeShapeMap,new c.mxgraph.io.vsdx.ShapePageId(d,m),k),function(a,b,d){null==a.entries&&(a.entries=[]);for(var h=0;h<a.entries.length;h++)if(null!= +a.entries[h].key.equals&&a.entries[h].key.equals(b)||a.entries[h].key===b){a.entries[h].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.parentsMap,new c.mxgraph.io.vsdx.ShapePageId(d,m),f)):this.addUnconnectedEdge(e,f,k,h);x&&b.createLabelSubShape(e,f);e=b.getRotation();if(0!==e)for(p=f.getGeometry(),h=p.width/2,p=p.height/2,y=0;y<f.getChildCount();y++)x=f.getChildAt(y),c.mxgraph.online.Utils.rotatedGeometry(x.getGeometry(), e,h,p);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var h=0;h<a.entries.length;h++)if(null!=a.entries[h].key.equals&&a.entries[h].key.equals(b)||a.entries[h].key===b){a.entries[h].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(this.vertexMap,new c.mxgraph.io.vsdx.ShapePageId(d,b.getId()),f);return f};f.rotatedEdgePoint=function(c,b,a,d){b=b*Math.PI/180;var h=Math.cos(b);b=Math.sin(b);var p=c.x-a,e=c.y-d;c.x=Math.round(p* -h-e*b+a);c.y=Math.round(e*h+p*b+d)};f.prototype.addVertex=function(e,b,a,d,h){var p="",f=b.isDisplacedLabel()||b.isRotatedLabel();f||(p=b.getTextLabel());var y=b.getDimensions(),x=b.getStyleFromShape();x.html="1";var k=x.hasOwnProperty(mxConstants.STYLE_SHAPE)||x.hasOwnProperty("stencil");x.hasOwnProperty(mxConstants.STYLE_FILLCOLOR)&&k||(x[mxConstants.STYLE_FILLCOLOR]="none");k||(x[mxConstants.STYLE_STROKECOLOR]="none");x.hasOwnProperty(mxConstants.STYLE_GRADIENTCOLOR)&&k||(x[mxConstants.STYLE_GRADIENTCOLOR]= -"none");x[mxConstants.STYLE_WHITE_SPACE]="wrap";h=b.getOriginPoint(h,!0);return k||null!=p?(x=c.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(x,"="),k=null,k=f?e.insertVertex(a,null,null,Math.floor(Math.round(100*h.x)/100),Math.floor(Math.round(100*h.y)/100),Math.floor(Math.round(100*y.x)/100),Math.floor(Math.round(100*y.y)/100),x):e.insertVertex(a,null,p,Math.floor(Math.round(100*h.x)/100),Math.floor(Math.round(100*h.y)/100),Math.floor(Math.round(100*y.x)/100),Math.floor(Math.round(100*y.y)/100),x), -function(a,b,d){null==a.entries&&(a.entries=[]);for(var h=0;h<a.entries.length;h++)if(null!=a.entries[h].key.equals&&a.entries[h].key.equals(b)||a.entries[h].key===b){a.entries[h].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.vertexMap,new c.mxgraph.io.vsdx.ShapePageId(d,b.getId()),k),b.setLabelOffset(k,x),f&&b.createLabelSubShape(e,k),k):null};f.calculateAbsolutePoint=function(c){for(var b=0,a=0;null!=c;){var d=c.geometry; -null!=d&&(b+=d.x,a+=d.y);c=c.parent}return new mxPoint(b,a)};f.prototype.addConnectedEdge=function(e,b,a,d){var h=b.getFromSheet(),h=new c.mxgraph.io.vsdx.ShapePageId(a,h),p=function(a,b){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b)return a.entries[d].value;return null}(this.edgeShapeMap,h);if(null==p)return null;var z=function(a,b){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!= -a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b)return a.entries[d].value;return null}(this.parentsMap,new c.mxgraph.io.vsdx.ShapePageId(a,p.getId()));if(null!=z){var y=e.getModel().getGeometry(z);null!=y&&(d=y.height)}var x=p.getStartXY(d),k=p.getEndXY(d),y=p.getRoutingPoints(d,x,p.getRotation());this.rotateChildEdge(e.getModel(),z,x,k,y);var m=null,n=b.getSourceToSheet(),n=null!=n?function(a,b){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!= -a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b)return a.entries[d].value;return null}(this.vertexMap,new c.mxgraph.io.vsdx.ShapePageId(a,n)):null,B=!0;if(null==n)n=e.insertVertex(z,null,null,Math.floor(Math.round(100*x.x)/100),Math.floor(Math.round(100*x.y)/100),0,0);else if(n.style&&-1==n.style.indexOf(";rotation="))var m=f.calculateAbsolutePoint(n),G=f.calculateAbsolutePoint(z),D=n.geometry,m=new mxPoint((G.x+x.x-m.x)/D.width,(G.y+x.y-m.y)/D.height);else B=!1;x=null;b= -b.getTargetToSheet();b=null!=b?function(a,b){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b)return a.entries[d].value;return null}(this.vertexMap,new c.mxgraph.io.vsdx.ShapePageId(a,b)):null;G=!0;null==b?b=e.insertVertex(z,null,null,Math.floor(Math.round(100*k.x)/100),Math.floor(Math.round(100*k.y)/100),0,0):b.style&&-1==b.style.indexOf(";rotation=")?(a=f.calculateAbsolutePoint(b),x=f.calculateAbsolutePoint(z), -D=b.geometry,x=new mxPoint((x.x+k.x-a.x)/D.width,(x.y+k.y-a.y)/D.height)):G=!1;k=p.getStyleFromEdgeShape(d);D=p.getRotation();0!==D?(a=e.insertEdge(z,null,null,n,b,c.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(k,"=")),B=p.createLabelSubShape(e,a),null!=B&&(B.setStyle(B.getStyle()+";rotation="+(60<D&&240>D?(D+180)%360:D)),B=B.getGeometry(),B.x=0,B.y=0,B.relative=!0,B.offset=new mxPoint(-B.width/2,-B.height/2))):(a=e.insertEdge(z,null,p.getTextLabel(),n,b,c.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(k, -"=")),D=p.getLblEdgeOffset(e.getView(),y),a.getGeometry().offset=D,null!=m&&e.setConnectionConstraint(a,n,!0,new mxConnectionConstraint(m,!1)),B&&y.shift(),null!=x&&e.setConnectionConstraint(a,b,!1,new mxConnectionConstraint(x,!1)),G&&y.pop());B=e.getModel().getGeometry(a);if(n.parent!=b.parent&&null!=z&&1!=z.id&&1==n.parent.id){b=m=0;do x=z.geometry,null!=x&&(m+=x.x,b+=x.y),z=z.parent;while(null!=z);a.parent=n.parent;for(z=0;z<y.length;z++)y[z].x+=m,y[z].y+=b}B.points=y;k.hasOwnProperty("curved")&& -function(a,b){return a&&a.equals?a.equals(b):a===b}(function(a,b){return a[b]?a[b]:null}(k,"curved"),"1")&&(B=e.getModel().getGeometry(a),e=p.getControlPoints(d),B.points=e);return h};f.prototype.addUnconnectedEdge=function(e,b,a,d){if(null!=b){var h=e.getModel().getGeometry(b);null!=h&&(d=h.height)}var p=a.getStartXY(d),f=a.getEndXY(d),y=a.getStyleFromEdgeShape(d),x=a.getRoutingPoints(d,p,a.getRotation()),k=a.getRotation();if(0!==k){0===a.getShapeIndex()?h=e.insertEdge(b,null,null,null,null,c.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(y, -"=")):(h=e.createEdge(b,null,null,null,null,c.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(y,"=")),h=e.addEdge(h,b,null,null,a.getShapeIndex()));var m=a.createLabelSubShape(e,h);null!=m&&(m.setStyle(m.getStyle()+";rotation="+(60<k&&240>k?(k+180)%360:k)),k=m.getGeometry(),k.x=0,k.y=0,k.relative=!0,k.offset=new mxPoint(-k.width/2,-k.height/2))}else 0===a.getShapeIndex()?h=e.insertEdge(b,null,a.getTextLabel(),null,null,c.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(y,"=")):(h=e.createEdge(b,null,a.getTextLabel(), -null,null,c.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(y,"=")),h=e.addEdge(h,b,null,null,a.getShapeIndex())),k=a.getLblEdgeOffset(e.getView(),x),h.getGeometry().offset=k;this.rotateChildEdge(e.getModel(),b,p,f,x);b=e.getModel().getGeometry(h);x.pop();x.shift();b.points=x;b.setTerminalPoint(p,!0);b.setTerminalPoint(f,!1);y.hasOwnProperty("curved")&&function(a,b){return a&&a.equals?a.equals(b):a===b}(function(a,b){return a[b]?a[b]:null}(y,"curved"),"1")&&(b=e.getModel().getGeometry(h),e=a.getControlPoints(d), +h-e*b+a);c.y=Math.round(e*h+p*b+d)};f.prototype.addVertex=function(e,b,a,d,h){var p="",y=b.isDisplacedLabel()||b.isRotatedLabel();y||(p=b.getTextLabel());var f=b.getDimensions(),x=b.getStyleFromShape();x.html="1";var k=x.hasOwnProperty(mxConstants.STYLE_SHAPE)||x.hasOwnProperty("stencil");x.hasOwnProperty(mxConstants.STYLE_FILLCOLOR)&&k||(x[mxConstants.STYLE_FILLCOLOR]="none");k||(x[mxConstants.STYLE_STROKECOLOR]="none");x.hasOwnProperty(mxConstants.STYLE_GRADIENTCOLOR)&&k||(x[mxConstants.STYLE_GRADIENTCOLOR]= +"none");x[mxConstants.STYLE_WHITE_SPACE]="wrap";h=b.getOriginPoint(h,!0);return k||null!=p?(x=c.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(x,"="),k=null,k=y?e.insertVertex(a,null,null,Math.floor(Math.round(100*h.x)/100),Math.floor(Math.round(100*h.y)/100),Math.floor(Math.round(100*f.x)/100),Math.floor(Math.round(100*f.y)/100),x):e.insertVertex(a,null,p,Math.floor(Math.round(100*h.x)/100),Math.floor(Math.round(100*h.y)/100),Math.floor(Math.round(100*f.x)/100),Math.floor(Math.round(100*f.y)/100),x), +function(a,b,d){null==a.entries&&(a.entries=[]);for(var h=0;h<a.entries.length;h++)if(null!=a.entries[h].key.equals&&a.entries[h].key.equals(b)||a.entries[h].key===b){a.entries[h].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.vertexMap,new c.mxgraph.io.vsdx.ShapePageId(d,b.getId()),k),b.setLabelOffset(k,x),y&&b.createLabelSubShape(e,k),k):null};f.calculateAbsolutePoint=function(c){for(var b=0,a=0;null!=c;){var d=c.geometry; +null!=d&&(b+=d.x,a+=d.y);c=c.parent}return new mxPoint(b,a)};f.prototype.addConnectedEdge=function(e,b,a,d){var h=b.getFromSheet(),h=new c.mxgraph.io.vsdx.ShapePageId(a,h),p=function(a,b){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b)return a.entries[d].value;return null}(this.edgeShapeMap,h);if(null==p)return null;var y=function(a,b){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!= +a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b)return a.entries[d].value;return null}(this.parentsMap,new c.mxgraph.io.vsdx.ShapePageId(a,p.getId()));if(null!=y){var z=e.getModel().getGeometry(y);null!=z&&(d=z.height)}var x=p.getStartXY(d),k=p.getEndXY(d),z=p.getRoutingPoints(d,x,p.getRotation());this.rotateChildEdge(e.getModel(),y,x,k,z);var m=null,n=b.getSourceToSheet(),n=null!=n?function(a,b){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!= +a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b)return a.entries[d].value;return null}(this.vertexMap,new c.mxgraph.io.vsdx.ShapePageId(a,n)):null,B=!0;if(null==n)n=e.insertVertex(y,null,null,Math.floor(Math.round(100*x.x)/100),Math.floor(Math.round(100*x.y)/100),0,0);else if(n.style&&-1==n.style.indexOf(";rotation="))var m=f.calculateAbsolutePoint(n),G=f.calculateAbsolutePoint(y),D=n.geometry,m=new mxPoint((G.x+x.x-m.x)/D.width,(G.y+x.y-m.y)/D.height);else B=!1;x=null;b= +b.getTargetToSheet();b=null!=b?function(a,b){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b)return a.entries[d].value;return null}(this.vertexMap,new c.mxgraph.io.vsdx.ShapePageId(a,b)):null;G=!0;null==b?b=e.insertVertex(y,null,null,Math.floor(Math.round(100*k.x)/100),Math.floor(Math.round(100*k.y)/100),0,0):b.style&&-1==b.style.indexOf(";rotation=")?(a=f.calculateAbsolutePoint(b),x=f.calculateAbsolutePoint(y), +D=b.geometry,x=new mxPoint((x.x+k.x-a.x)/D.width,(x.y+k.y-a.y)/D.height)):G=!1;k=p.getStyleFromEdgeShape(d);D=p.getRotation();0!==D?(a=e.insertEdge(y,null,null,n,b,c.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(k,"=")),B=p.createLabelSubShape(e,a),null!=B&&(B.setStyle(B.getStyle()+";rotation="+(60<D&&240>D?(D+180)%360:D)),B=B.getGeometry(),B.x=0,B.y=0,B.relative=!0,B.offset=new mxPoint(-B.width/2,-B.height/2))):(a=e.insertEdge(y,null,p.getTextLabel(),n,b,c.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(k, +"=")),D=p.getLblEdgeOffset(e.getView(),z),a.getGeometry().offset=D,null!=m&&e.setConnectionConstraint(a,n,!0,new mxConnectionConstraint(m,!1)),B&&z.shift(),null!=x&&e.setConnectionConstraint(a,b,!1,new mxConnectionConstraint(x,!1)),G&&z.pop());B=e.getModel().getGeometry(a);if(n.parent!=b.parent&&null!=y&&1!=y.id&&1==n.parent.id){b=m=0;do x=y.geometry,null!=x&&(m+=x.x,b+=x.y),y=y.parent;while(null!=y);a.parent=n.parent;for(y=0;y<z.length;y++)z[y].x+=m,z[y].y+=b}B.points=z;k.hasOwnProperty("curved")&& +function(a,b){return a&&a.equals?a.equals(b):a===b}(function(a,b){return a[b]?a[b]:null}(k,"curved"),"1")&&(B=e.getModel().getGeometry(a),e=p.getControlPoints(d),B.points=e);return h};f.prototype.addUnconnectedEdge=function(e,b,a,d){if(null!=b){var h=e.getModel().getGeometry(b);null!=h&&(d=h.height)}var p=a.getStartXY(d),f=a.getEndXY(d),z=a.getStyleFromEdgeShape(d),x=a.getRoutingPoints(d,p,a.getRotation()),k=a.getRotation();if(0!==k){0===a.getShapeIndex()?h=e.insertEdge(b,null,null,null,null,c.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(z, +"=")):(h=e.createEdge(b,null,null,null,null,c.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(z,"=")),h=e.addEdge(h,b,null,null,a.getShapeIndex()));var m=a.createLabelSubShape(e,h);null!=m&&(m.setStyle(m.getStyle()+";rotation="+(60<k&&240>k?(k+180)%360:k)),k=m.getGeometry(),k.x=0,k.y=0,k.relative=!0,k.offset=new mxPoint(-k.width/2,-k.height/2))}else 0===a.getShapeIndex()?h=e.insertEdge(b,null,a.getTextLabel(),null,null,c.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(z,"=")):(h=e.createEdge(b,null,a.getTextLabel(), +null,null,c.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(z,"=")),h=e.addEdge(h,b,null,null,a.getShapeIndex())),k=a.getLblEdgeOffset(e.getView(),x),h.getGeometry().offset=k;this.rotateChildEdge(e.getModel(),b,p,f,x);b=e.getModel().getGeometry(h);x.pop();x.shift();b.points=x;b.setTerminalPoint(p,!0);b.setTerminalPoint(f,!1);z.hasOwnProperty("curved")&&function(a,b){return a&&a.equals?a.equals(b):a===b}(function(a,b){return a[b]?a[b]:null}(z,"curved"),"1")&&(b=e.getModel().getGeometry(h),e=a.getControlPoints(d), b.points=e);return h};f.prototype.rotateChildEdge=function(c,b,a,d,h){if(null!=b){var p=c.getGeometry(b);c=c.getStyle(b);if(null!=p&&null!=c&&(b=c.indexOf("rotation="),-1<b))for(c=parseFloat(c.substring(b+9,c.indexOf(";",b))),b=p.width/2,p=p.height/2,f.rotatedEdgePoint(a,c,b,p),f.rotatedEdgePoint(d,c,b,p),a=0;a<h.length;a++)f.rotatedEdgePoint(h[a],c,b,p)}};f.prototype.sanitiseGraph=function(c){var b=c.getModel().getRoot();this.sanitiseCell(c,b)};f.prototype.sanitiseCell=function(c,b){for(var a=c.getModel(), d=a.getChildCount(b),h=[],p=0;p<d;p++){var e=a.getChildAt(b,p);this.sanitiseCell(c,e)&&0<h.push(e)}for(p=0;p<h.length;p++)a.remove(h[p]);0<d&&(d=a.getChildCount(b));h=(new String(a.getValue(b))).toString();p=a.getStyle(b);return 0!==d||!a.isVertex(b)||null!=a.getValue(b)&&0!==h.length||null==p||-1==p.indexOf(mxConstants.STYLE_FILLCOLOR+"=none")||-1==p.indexOf(mxConstants.STYLE_STROKECOLOR+"=none")||-1!=p.indexOf("image=")?!1:!0};return f}();m.mxVsdxCodec=k;k.__class="com.mxgraph.io.mxVsdxCodec"})(n.io|| (n.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); -(function(c){(function(n){(function(m){var k=function(f){function e(b){var a=f.call(this)||this;a.RESPONSE_END="";a.RESPONSE_DIAGRAM_START="";a.RESPONSE_DIAGRAM_END="";a.RESPONSE_HEADER="";a.editorUi=b;return a}__extends(e,f);e.prototype.decodeVssx=function(b,a,d,h){var p=this,e="<mxlibrary>[";this.decodeVsdx(b,function(b){e=e.concat(b);var d=p.vsdxModel.getMasterShapes(),z=function(a){var b=0;return{next:function(){return b<a.length?a[b++]:null},hasNext:function(){return b<a.length}}}(function(a){var b= -[];null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)b.push(a.entries[d].value);return b}(p.vsdxModel.getPages())).next();if(null!=d){var y={str:"",toString:function(){return this.str}},k=0===b.length?"":",",m=function(a){return Object.keys(a).map(function(b){return a[b]})}(d);b=function(a){a=m[a];var b=n.createMxGraph(),h=a.getMasterShape().getShape(),h=new c.mxgraph.io.vsdx.VsdxShape(z,h,!z.isEdge(h),d,null,n.vsdxModel),p=1;if(null!=a.pageSheet){var e=p=1,x=a.pageSheet.DrawingScale; +(function(c){(function(n){(function(m){var k=function(f){function e(b){var a=f.call(this)||this;a.RESPONSE_END="";a.RESPONSE_DIAGRAM_START="";a.RESPONSE_DIAGRAM_END="";a.RESPONSE_HEADER="";a.editorUi=b;return a}__extends(e,f);e.prototype.decodeVssx=function(b,a,d,h){var p=this,e="<mxlibrary>[";this.decodeVsdx(b,function(b){e=e.concat(b);var d=p.vsdxModel.getMasterShapes(),y=function(a){var b=0;return{next:function(){return b<a.length?a[b++]:null},hasNext:function(){return b<a.length}}}(function(a){var b= +[];null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)b.push(a.entries[d].value);return b}(p.vsdxModel.getPages())).next();if(null!=d){var z={str:"",toString:function(){return this.str}},k=0===b.length?"":",",m=function(a){return Object.keys(a).map(function(b){return a[b]})}(d);b=function(a){a=m[a];var b=n.createMxGraph(),h=a.getMasterShape().getShape(),h=new c.mxgraph.io.vsdx.VsdxShape(y,h,!y.isEdge(h),d,null,n.vsdxModel),p=1;if(null!=a.pageSheet){var e=p=1,x=a.pageSheet.DrawingScale; null!=x&&(p=parseFloat(x.getAttribute("V"))||1);x=a.pageSheet.PageScale;null!=x&&(e=parseFloat(x.getAttribute("V"))||1);p=e/p}e=null;if(h.isVertex())for(n.edgeShapeMap.entries=[],n.parentsMap.entries=[],e=n.addShape(b,h,b.getDefaultParent(),0,1169),h=function(a){null==a.entries&&(a.entries=[]);return a.entries}(n.edgeShapeMap),x=0;x<h.length;x++){var C=h[x],A=function(a,b){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)|| -a.entries[d].key===b)return a.entries[d].value;return null}(n.parentsMap,C.getKey());n.addUnconnectedEdge(b,A,C.getValue(),1169)}else e=n.addUnconnectedEdge(b,null,h,1169);if(null!=e){n.scaleGraph(b,p);h=n.normalizeGeo(e);n.sanitiseGraph(b);if(0===b.getModel().getChildCount(b.getDefaultParent()))return"continue";y.str=y.str.concat(k);y.str=y.str.concat('{"xml":"');b=f.prototype.processPage.call(n,b,null);y.str=y.str.concat(b);y.str=y.str.concat('","w":');y.str=y.str.concat(h.width);y.str=y.str.concat(',"h":'); -y.str=y.str.concat(h.height);y.str=y.str.concat(',"title":');a=a.getName();null==a&&(a="");a=JSON.stringify(mxUtils.htmlEntities(a));y.str=y.str.concat(a);y.str=y.str.concat("}");k=","}};for(var n=p,D=0;D<m.length;D++)b(D);e=e.concat(y)}e=e.concat("]</mxlibrary>");if(a)try{a(e)}catch(Z){null!=h?h(Z):a("")}},d)};e.prototype.normalizeGeo=function(b){var a=b.getGeometry();a.x=0;a.y=0;var d=a.sourcePoint;if(b.isEdge()&&null!=d){this.transPoint(a.targetPoint,d);this.transPoint(a.offset,d);b=a.points;if(null!= -b)for(var h=0;h<b.length;h++)this.transPoint(b[h],d);this.transPoint(d,d)}return a};e.prototype.transPoint=function(b,a){null!=b&&(b.x-=a.x,b.y-=a.y)};e.prototype.processPage=function(b,a){var d=b.getModel(),h="",p="",e;for(e in d.cells){var y=d.cells[e];if(b.getDefaultParent()===d.getParent(y)){var h=h.concat(p),h=h.concat('{"xml":"'),x=this.createMxGraph();x.addCell(y);this.sanitiseGraph(x);if(0===x.getModel().getChildCount(x.getDefaultParent()))return"continue";p=this.normalizeGeo(y);x=f.prototype.processPage.call(this, -x,null);h=h.concat(x);h=h.concat('","w":');h=h.concat(p.width);h=h.concat(',"h":');h=h.concat(p.height);h=h.concat(',"title":"');p=d.getStyle(y);y="";if(null!=p&&(x=p.indexOf(c.mxgraph.io.vsdx.mxVsdxConstants.VSDX_ID),0<=x)){x+=c.mxgraph.io.vsdx.mxVsdxConstants.VSDX_ID.length+1;e=parseInt(p.substring(x,p.indexOf(";",x)));a:{p=this.vertexShapeMap;x=new c.mxgraph.io.vsdx.ShapePageId(a.getId(),e);null==p.entries&&(p.entries=[]);for(var k=0;k<p.entries.length;k++)if(null!=p.entries[k].key.equals&&p.entries[k].key.equals(x)|| -p.entries[k].key===x){p=p.entries[k].value;break a}p=null}null!=p&&(y=p.getName())}h=h.concat(y);h=h.concat('"}');p=","}}this.RESPONSE_DIAGRAM_START=0<h.length?",":"";return h};return e}(c.mxgraph.io.mxVsdxCodec);m.mxVssxCodec=k;k.__class="com.mxgraph.io.mxVssxCodec"})(n.io||(n.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +a.entries[d].key===b)return a.entries[d].value;return null}(n.parentsMap,C.getKey());n.addUnconnectedEdge(b,A,C.getValue(),1169)}else e=n.addUnconnectedEdge(b,null,h,1169);if(null!=e){n.scaleGraph(b,p);h=n.normalizeGeo(e);n.sanitiseGraph(b);if(0===b.getModel().getChildCount(b.getDefaultParent()))return"continue";z.str=z.str.concat(k);z.str=z.str.concat('{"xml":"');b=f.prototype.processPage.call(n,b,null);z.str=z.str.concat(b);z.str=z.str.concat('","w":');z.str=z.str.concat(h.width);z.str=z.str.concat(',"h":'); +z.str=z.str.concat(h.height);z.str=z.str.concat(',"title":');a=a.getName();null==a&&(a="");a=JSON.stringify(mxUtils.htmlEntities(a));z.str=z.str.concat(a);z.str=z.str.concat("}");k=","}};for(var n=p,D=0;D<m.length;D++)b(D);e=e.concat(z)}e=e.concat("]</mxlibrary>");if(a)try{a(e)}catch(Z){null!=h?h(Z):a("")}},d)};e.prototype.normalizeGeo=function(b){var a=b.getGeometry();a.x=0;a.y=0;var d=a.sourcePoint;if(b.isEdge()&&null!=d){this.transPoint(a.targetPoint,d);this.transPoint(a.offset,d);b=a.points;if(null!= +b)for(var h=0;h<b.length;h++)this.transPoint(b[h],d);this.transPoint(d,d)}return a};e.prototype.transPoint=function(b,a){null!=b&&(b.x-=a.x,b.y-=a.y)};e.prototype.processPage=function(b,a){var d=b.getModel(),h="",p="",e;for(e in d.cells){var z=d.cells[e];if(b.getDefaultParent()===d.getParent(z)){var h=h.concat(p),h=h.concat('{"xml":"'),x=this.createMxGraph();x.addCell(z);this.sanitiseGraph(x);if(0===x.getModel().getChildCount(x.getDefaultParent()))return"continue";p=this.normalizeGeo(z);x=f.prototype.processPage.call(this, +x,null);h=h.concat(x);h=h.concat('","w":');h=h.concat(p.width);h=h.concat(',"h":');h=h.concat(p.height);h=h.concat(',"title":"');p=d.getStyle(z);z="";if(null!=p&&(x=p.indexOf(c.mxgraph.io.vsdx.mxVsdxConstants.VSDX_ID),0<=x)){x+=c.mxgraph.io.vsdx.mxVsdxConstants.VSDX_ID.length+1;e=parseInt(p.substring(x,p.indexOf(";",x)));a:{p=this.vertexShapeMap;x=new c.mxgraph.io.vsdx.ShapePageId(a.getId(),e);null==p.entries&&(p.entries=[]);for(var k=0;k<p.entries.length;k++)if(null!=p.entries[k].key.equals&&p.entries[k].key.equals(x)|| +p.entries[k].key===x){p=p.entries[k].value;break a}p=null}null!=p&&(z=p.getName())}h=h.concat(z);h=h.concat('"}');p=","}}this.RESPONSE_DIAGRAM_START=0<h.length?",":"";return h};return e}(c.mxgraph.io.mxVsdxCodec);m.mxVssxCodec=k;k.__class="com.mxgraph.io.mxVssxCodec"})(n.io||(n.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); (function(c){(function(c){(function(c){(function(c){(function(c){var e=function(){function b(a,b,h){this.formulaE=this.formulaA=this.d=this.c=this.b=this.a=this.y=this.x=null;this.index=0;this.index=a;this.x=b;this.y=h}b.prototype.getX=function(){return this.x};b.prototype.getY=function(){return this.y};b.prototype.getA=function(){return this.a};b.prototype.getB=function(){return this.b};b.prototype.getC=function(){return this.c};b.prototype.getD=function(){return this.d};b.prototype.getFormulaA= function(){return this.formulaA};b.prototype.getFormulaE=function(){return this.formulaE};b.prototype.getIndex=function(){return this.index};return b}();c.Row=e;e.__class="com.mxgraph.io.vsdx.geometry.Row"})(c.geometry||(c.geometry={}))})(c.vsdx||(c.vsdx={}))})(c.io||(c.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); (function(c){(function(n){(function(m){(function(k){(function(f){var e=function(){function b(){}b.getIndex=function(a){try{return parseInt(a.getAttribute("IX"))||1}catch(d){return 1}};b.getDoubleVal=function(a){try{if(null!=a&&0!==a.length){var b=parseFloat(a);if(isFinite(b))return b}}catch(h){}return null};b.getRowObj=function(a,d){var h=a.getAttribute("T"),p=b.getIndex(a),e;e=(e=a.getAttribute("Del"))&&e.equals?e.equals("1"):"1"===e;if(!e){var f=null;p<=d.length&&(f=d[p-1]);var x=e=null,k=null, @@ -859,9 +859,9 @@ e.prototype.isNoLine=function(){return this.noLine};e.prototype.isNoShow=functio function(){function a(a){this.__parent=a}a.prototype.compare=function(a,b){return a.getIndex()-b.getIndex()};return a}();c.mxVsdxGeometry$0=b;b.__interfaces=["java.util.Comparator"]})(f=k.mxVsdxGeometry||(k.mxVsdxGeometry={}))})(m.vsdx||(m.vsdx={}))})(n.io||(n.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); (function(c){(function(n){(function(m){(function(k){var f=function(){function e(b){this.geomList=[];this.parentGeomList=null;this.sortNeeded=!1;if(null!=b){this.parentGeomList=b.geomList;var a=this.geomList;a.push.apply(a,b.geomList)}}e.prototype.addGeometry=function(b){b=new c.mxgraph.io.vsdx.mxVsdxGeometry(b,this.parentGeomList);b.getIndex()<this.geomList.length?this.geomList[b.getIndex()]=b:(0<this.geomList.push(b),this.sortNeeded=!0)};e.prototype.sort=function(){this.sortNeeded&&(function(b,a){a.compare? b.sort(function(b,h){return a.compare(b,h)}):b.sort(a)}(this.geomList,new e.mxVsdxGeometryList$0(this)),this.sortNeeded=!1)};e.prototype.isNoShow=function(){for(var b=0;b<this.geomList.length;b++)if(!this.geomList[b].isNoShow())return!1;return!0};e.prototype.isNoFill=function(){for(var b=0;b<this.geomList.length;b++){var a=this.geomList[b];if(!a.isNoShow()&&!a.isNoFill())return!1}return!0};e.prototype.isNoLine=function(){for(var b=0;b<this.geomList.length;b++){var a=this.geomList[b];if(!a.isNoShow()&& -!a.isNoLine())return!1}return!0};e.prototype.hasGeom=function(){return 0!=this.geomList.length};e.prototype.getGeoCount=function(){for(var b=0,a=0;a<this.geomList.length;a++)this.geomList[a].isNoShow()||b++;return b};e.prototype.rotatedPoint=function(b,a,d){var h=b.y*a+b.x*d;b.x=b.x*a-b.y*d;b.y=h};e.prototype.getRoutingPoints=function(b,a,d){this.sort();b=[];0<b.push(a.clone());for(var h=0,p=0,e=0;e<this.geomList.length;e++){var f=this.geomList[e];if(!f.isNoShow())for(var f=f.getRows(),k=0;k<f.length;k++){var m= -f[k];if(0==k&&null!=m&&m instanceof c.mxgraph.io.vsdx.geometry.MoveTo)h=null!=m.x?m.x:0,p=null!=m.y?m.y:0;else if(null!=m&&m instanceof c.mxgraph.io.vsdx.geometry.LineTo){var n=null!=m.x?m.x:0,m=null!=m.y?m.y:0,A=new mxPoint(n,m);0!==d&&(d=(360-d)*Math.PI/180,this.rotatedPoint(A,Math.cos(d),Math.sin(d)));n=(A.x-h)*c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();n+=a.x;m=(A.y-p)*c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$()*-1;m+=a.y;n=Math.round(100*n)/100;m=Math.round(100*m)/100;A.x= -n;A.y=m;0<b.push(A)}}}return b};e.prototype.getShapeXML=function(b){var a=new mxPoint(0,0),d={str:'<shape strokewidth="inherit"><foreground>',toString:function(){return this.str}},h=d.str.length,p;p=this.processGeo(b,a,d,-1,!0);p=this.processGeo(b,a,d,p,!1);if(d.str.length===h)return"";this.closePath(d,p);d.str=d.str.concat("</foreground></shape>");return d.str};e.prototype.processGeo=function(b,a,d,h,p){var e=b.getRounding(),f="";0<e&&(f=' rounded="1" arcSize="'+e*c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor+ +!a.isNoLine())return!1}return!0};e.prototype.hasGeom=function(){return 0!=this.geomList.length};e.prototype.getGeoCount=function(){for(var b=0,a=0;a<this.geomList.length;a++)this.geomList[a].isNoShow()||b++;return b};e.prototype.rotatedPoint=function(b,a,d){var h=b.y*a+b.x*d;b.x=b.x*a-b.y*d;b.y=h};e.prototype.getRoutingPoints=function(b,a,d){this.sort();b=[];0<b.push(a.clone());for(var h=0,p=0,e=0;e<this.geomList.length;e++){var f=this.geomList[e];if(!f.isNoShow())for(var f=f.getRows(),x=0;x<f.length;x++){var k= +f[x];if(0==x&&null!=k&&k instanceof c.mxgraph.io.vsdx.geometry.MoveTo)h=null!=k.x?k.x:0,p=null!=k.y?k.y:0;else if(null!=k&&k instanceof c.mxgraph.io.vsdx.geometry.LineTo){var m=null!=k.x?k.x:0,k=null!=k.y?k.y:0,n=new mxPoint(m,k);0!==d&&(d=(360-d)*Math.PI/180,this.rotatedPoint(n,Math.cos(d),Math.sin(d)));m=(n.x-h)*c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();m+=a.x;k=(n.y-p)*c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$()*-1;k+=a.y;m=Math.round(100*m)/100;k=Math.round(100*k)/100;n.x= +m;n.y=k;0<b.push(n)}}}return b};e.prototype.getShapeXML=function(b){var a=new mxPoint(0,0),d={str:'<shape strokewidth="inherit"><foreground>',toString:function(){return this.str}},h=d.str.length,p;p=this.processGeo(b,a,d,-1,!0);p=this.processGeo(b,a,d,p,!1);if(d.str.length===h)return"";this.closePath(d,p);d.str=d.str.concat("</foreground></shape>");return d.str};e.prototype.processGeo=function(b,a,d,h,p){var e=b.getRounding(),f="";0<e&&(f=' rounded="1" arcSize="'+e*c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor+ '" ');for(e=0;e<this.geomList.length;e++){var k=this.geomList[e];if(p!==k.isNoFill()){var m=k.getPathXML(a,b);0!==m.length&&(k=this.getGeoStyle(k),-1===h?d.str=d.str.concat("<path"+f+">"):h!==k&&(this.closePath(d,h),d.str=d.str.concat("<path"+f+">")),d.str=d.str.concat(m),h=k)}}return h};e.prototype.getGeoStyle=function(b){var a=0;b.isNoLine()||b.isNoFill()?b.isNoFill()?b.isNoLine()||(a=3):a=2:a=1;return a};e.prototype.closePath=function(b,a){b.str=b.str.concat("</path>");1===a?b.str=b.str.concat("<fillstroke/>"): 2===a?b.str=b.str.concat("<fill/>"):3===a&&(b.str=b.str.concat("<stroke/>"))};return e}();k.mxVsdxGeometryList=f;f.__class="com.mxgraph.io.vsdx.mxVsdxGeometryList";(function(c){var b=function(){function a(a){this.__parent=a}a.prototype.compare=function(a,b){return a.getIndex()-b.getIndex()};return a}();c.mxVsdxGeometryList$0=b;b.__interfaces=["java.util.Comparator"]})(f=k.mxVsdxGeometryList||(k.mxVsdxGeometryList={}))})(m.vsdx||(m.vsdx={}))})(n.io||(n.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com= {})); @@ -1028,11 +1028,11 @@ b.setLastMoveY(h);return'<move x="'+(new String(d)).toString()+'" y="'+(new Stri (function(c){(function(n){(function(m){(function(k){(function(f){var e=function(b){function a(a,h,c,e,f,k,m,n){a=b.call(this,a,h,c)||this;a.a=e;a.b=f;a.c=k;a.d=m;a.formulaE=n;return a}__extends(a,b);a.prototype.handle=function(b,h){if(null!=this.x&&null!=this.y&&null!=this.formulaE){var d=h.getHeight(),e=h.getWidth(),f=this.x*c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),k=this.y*c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),m=this.formulaE.split("NURBS(").join(""),m=m.split(")").join(""), m=new a.Nurbs(this,m,e,d);if(2<=m.getSize()){var n=m.getX(0),A=m.getY(0),B=m.getX(1),G=m.getY(1),f=Math.round(100*f/e*100)/100,k=Math.round(100*(100-100*k/d))/100,n=Math.round(100*n)/100,A=Math.round(100*A)/100,B=Math.round(100*B)/100,G=Math.round(100*G)/100;h.setLastX(f);h.setLastY(k);if(3===m.getDegree()&&m.isOrderedByThree(this.getA())){d=[];e=[];n=[];B=m.getSize();for(A=0;A<B-1;A+=3)0<d.push(new mxPoint(m.getX(A),m.getY(A))),0<e.push(new mxPoint(m.getX(A+1),m.getY(A+1))),A<B-2?0<n.push(new mxPoint(m.getX(A+ 2),m.getY(A+2))):0<n.push(new mxPoint(f,k));f="";for(A=0;A<d.length;A++)f+='<curve x1="'+d[A].x+'" y1="'+d[A].y+'" x2="'+e[A].x+'" y2="'+e[A].y+'" x3="'+n[A].x+'" y3="'+n[A].y+'"/>\n';return f}return'<curve x1="'+(new String(n)).toString()+'" y1="'+(new String(A)).toString()+'" x2="'+(new String(B)).toString()+'" y2="'+(new String(G)).toString()+'" x3="'+(new String(f)).toString()+'" y3="'+(new String(k)).toString()+'"/>'}}return""};return a}(c.mxgraph.io.vsdx.geometry.Row);f.NURBSTo=e;e.__class= -"com.mxgraph.io.vsdx.geometry.NURBSTo";(function(b){var a=function(){function a(a,b,d,c){this.__parent=a;this.nurbsValues=[];a=b.split(/\s*,\s*/).slice(0);for(b=0;b<a.length;b++)3<b&&0===b%4?0<this.nurbsValues.push(100*parseFloat(a[b])):3<b&&1===b%4?0<this.nurbsValues.push(100-100*parseFloat(a[b])):0<this.nurbsValues.push(parseFloat(a[b]))}a.prototype.isOrderedByThree=function(a){for(var b=0;b+2<this.getSize();b+=3){var d=Math.round(100*this.getKnot(b))/100,h=Math.round(100*this.getKnot(b+1))/100, -c=Math.round(100*this.getKnot(b+2))/100;if(d!==h||d!==c||h!==c)return!1}b=Math.round(10*this.getKnot(this.getSize()-2))/10;d=Math.round(10*this.getKnot(this.getSize()-1))/10;a=Math.round(10*a)/10;return b!==d||b!==a||d!==a?!1:!0};a.prototype.getSize=function(){return(this.nurbsValues.length/4|0)-1};a.prototype.getKnotLast=function(){return this.nurbsValues[0]};a.prototype.getDegree=function(){return this.nurbsValues[1]};a.prototype.getXType=function(){return this.nurbsValues[2]};a.prototype.getYType= +"com.mxgraph.io.vsdx.geometry.NURBSTo";(function(b){var a=function(){function a(a,b,d,c){this.__parent=a;this.nurbsValues=[];a=b.split(/\s*,\s*/).slice(0);for(b=0;b<a.length;b++)3<b&&0===b%4?0<this.nurbsValues.push(100*parseFloat(a[b])):3<b&&1===b%4?0<this.nurbsValues.push(100-100*parseFloat(a[b])):0<this.nurbsValues.push(parseFloat(a[b]))}a.prototype.isOrderedByThree=function(a){for(var b=0;b+2<this.getSize();b+=3){var d=Math.round(100*this.getKnot(b))/100,c=Math.round(100*this.getKnot(b+1))/100, +h=Math.round(100*this.getKnot(b+2))/100;if(d!==c||d!==h||c!==h)return!1}b=Math.round(10*this.getKnot(this.getSize()-2))/10;d=Math.round(10*this.getKnot(this.getSize()-1))/10;a=Math.round(10*a)/10;return b!==d||b!==a||d!==a?!1:!0};a.prototype.getSize=function(){return(this.nurbsValues.length/4|0)-1};a.prototype.getKnotLast=function(){return this.nurbsValues[0]};a.prototype.getDegree=function(){return this.nurbsValues[1]};a.prototype.getXType=function(){return this.nurbsValues[2]};a.prototype.getYType= function(){return this.nurbsValues[3]};a.prototype.getX=function(a){return this.nurbsValues[4*(a+1)]};a.prototype.getY=function(a){return this.nurbsValues[4*(a+1)+1]};a.prototype.getKnot=function(a){return this.nurbsValues[4*(a+1)+2]};a.prototype.getWeight=function(a){return this.nurbsValues[4*(a+1)+3]};return a}();b.Nurbs=a;a.__class="com.mxgraph.io.vsdx.geometry.NURBSTo.Nurbs"})(e=f.NURBSTo||(f.NURBSTo={}))})(k.geometry||(k.geometry={}))})(m.vsdx||(m.vsdx={}))})(n.io||(n.io={}))})(c.mxgraph||(c.mxgraph= {}))})(com||(com={})); -(function(c){(function(n){(function(m){(function(k){(function(f){var e=function(b){function a(a,h,c,e){a=b.call(this,a,h,c)||this;a.formulaA=e;return a}__extends(a,b);a.prototype.handle=function(a,b){var d="";if(null!=this.x&&null!=this.y&&null!=this.formulaA){var h=b.getHeight(),e=b.getWidth(),f=this.x*c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),k=this.y*c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),f=Math.round(100*f/e*100)/100,k=Math.round(100*(100-100*k/h))/100,m=this.formulaA.replace(RegExp("\\s", +(function(c){(function(n){(function(m){(function(k){(function(f){var e=function(b){function a(a,c,e,f){a=b.call(this,a,c,e)||this;a.formulaA=f;return a}__extends(a,b);a.prototype.handle=function(a,b){var d="";if(null!=this.x&&null!=this.y&&null!=this.formulaA){var h=b.getHeight(),e=b.getWidth(),f=this.x*c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),k=this.y*c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),f=Math.round(100*f/e*100)/100,k=Math.round(100*(100-100*k/h))/100,m=this.formulaA.replace(RegExp("\\s", "g"),"").toLowerCase().replace(RegExp("polyline\\(","g"),"").replace(RegExp("\\)","g"),""),n;n=m&&m.equals?m.equals("inh"):"inh"===m;if(n)throw Object.defineProperty(Error(),"__classes",{configurable:!0,value:["java.lang.Throwable","java.lang.Object","java.lang.RuntimeException","java.lang.IllegalArgumentException","java.lang.Exception"]});m=m.split(",").slice(0).slice(0);n=parseFloat(m.splice(0,1));parseFloat(m.splice(0,1));for(var B,G;0<m.length;)B=parseFloat(m.splice(0,1))*c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(), G=parseFloat(m.splice(0,1))*c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),1===n&&(B=100*B/e),1===n&&(G=100*G/h),G=100-G,B=Math.round(100*B)/100,G=Math.round(100*G)/100,b.setLastX(B),b.setLastY(G),d+='<line x="'+(new String(B)).toString()+'" y="'+(new String(G)).toString()+'"/>';d+='<line x="'+(new String(f)).toString()+'" y="'+(new String(k)).toString()+'"/>';b.getLastMoveX()===f&&b.getLastMoveY()===k&&(d+="<close/>")}return d};return a}(c.mxgraph.io.vsdx.geometry.Row);f.PolylineTo=e;e.__class= "com.mxgraph.io.vsdx.geometry.PolylineTo"})(k.geometry||(k.geometry={}))})(m.vsdx||(m.vsdx={}))})(n.io||(n.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); @@ -1188,8 +1188,8 @@ e);b=Math.round(this.getLineWidth())|0;1!==b&&(this.styleMap[mxConstants.STYLE_S a.equals(b):a===b})("1",b)&&(this.styleMap[mxConstants.STYLE_FLIPV]="1");this.resolveCommonStyles();return this.styleMap};b.prototype.getDashPattern=function(){var a=null,b=this.getValue(this.getCellElement$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.LINE_PATTERN),"0");(b&&b.equals?b.equals("Themed"):"Themed"===b)?(b=this.getTheme(),null!=b&&(a=this.isVertex()?b.getLineDashPattern$com_mxgraph_io_vsdx_theme_QuickStyleVals(this.getQuickStyleVals()):b.getConnLineDashPattern(this.getQuickStyleVals()))): a=k.Style.getLineDashPattern(parseInt(b));if(null!=a&&0!=a.length){for(var b="",e=0;e<a.length;e++)b=b.concat(a[e].toFixed(2)+" ");return b.trim()}return null};b.prototype.isDashed=function(){var a=this.getValue(this.getCellElement$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.LINE_PATTERN),"0");if(function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"Themed")){if(a=this.getTheme(),null!=a)return this.isVertex()?a.isLineDashed$com_mxgraph_io_vsdx_theme_QuickStyleVals(this.getQuickStyleVals()): a.isConnLineDashed(this.getQuickStyleVals())}else if(!function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"0")&&!function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"1"))return!0;return!1};b.prototype.getLineWidth=function(){var a=this.getValue(this.getCellElement$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.LINE_WEIGHT),"1"),b=1;try{var e;e=a&&a.equals?a.equals("Themed"):"Themed"===a;if(e){var f=this.getTheme();null!=f&&(b=(this.isVertex()?f.getLineWidth$com_mxgraph_io_vsdx_theme_QuickStyleVals(this.getQuickStyleVals()): -f.getConnLineWidth(this.getQuickStyleVals()))/1E4)}else b=parseFloat(a),b=this.getScreenNumericalValue$double(b)}catch(z){}1>b&&(b*=2);return b};b.prototype.getStartArrowSize=function(){var a=this.getValue(this.getCellElement$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_ARROW_SIZE),"4");try{var d=4,e;e=a&&a.equals?a.equals("Themed"):"Themed"===a;if(e){var f=this.getTheme();null!=f&&(d=this.isVertex()?f.getStartSize(this.getQuickStyleVals()):f.getConnStartSize(this.getQuickStyleVals()))}else d= -parseFloat(a);return b.arrowSizes_$LI$()[d]}catch(z){}return 4};b.prototype.getFinalArrowSize=function(){var a=this.getValue(this.getCellElement$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.END_ARROW_SIZE),"4");try{var d=4,e;e=a&&a.equals?a.equals("Themed"):"Themed"===a;if(e){var f=this.getTheme();null!=f&&(d=this.isVertex()?f.getEndSize(this.getQuickStyleVals()):f.getConnEndSize(this.getQuickStyleVals()))}else d=parseFloat(a);return b.arrowSizes_$LI$()[d]}catch(z){}return 4};b.prototype.getRounding= +f.getConnLineWidth(this.getQuickStyleVals()))/1E4)}else b=parseFloat(a),b=this.getScreenNumericalValue$double(b)}catch(y){}1>b&&(b*=2);return b};b.prototype.getStartArrowSize=function(){var a=this.getValue(this.getCellElement$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_ARROW_SIZE),"4");try{var d=4,e;e=a&&a.equals?a.equals("Themed"):"Themed"===a;if(e){var f=this.getTheme();null!=f&&(d=this.isVertex()?f.getStartSize(this.getQuickStyleVals()):f.getConnStartSize(this.getQuickStyleVals()))}else d= +parseFloat(a);return b.arrowSizes_$LI$()[d]}catch(y){}return 4};b.prototype.getFinalArrowSize=function(){var a=this.getValue(this.getCellElement$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.END_ARROW_SIZE),"4");try{var d=4,e;e=a&&a.equals?a.equals("Themed"):"Themed"===a;if(e){var f=this.getTheme();null!=f&&(d=this.isVertex()?f.getEndSize(this.getQuickStyleVals()):f.getConnEndSize(this.getQuickStyleVals()))}else d=parseFloat(a);return b.arrowSizes_$LI$()[d]}catch(y){}return 4};b.prototype.getRounding= function(){var a=this.getValue(this.getCellElement$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.ROUNDING),"0"),b;b=a;b="Themed".equals?"Themed".equals(b):"Themed"===b;b&&(a="0");return parseFloat(a)};b.prototype.isShadow=function(){var a=this.getValue(this.getCellElement$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.SHDW_PATTERN),"0");return function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"Themed")||function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"0")?!1:!0};b.prototype.getEdgeStyle$java_util_Map= function(a){var b={};(function(a,b){return a&&a.equals?a.equals(b):a===b})(function(a,b){return a[b]?a[b]:null}(a,mxConstants.STYLE_SHAPE),"mxgraph.lean_mapping.electronic_info_flow_edge")?b[mxConstants.STYLE_EDGE]=mxConstants.NONE:b[mxConstants.STYLE_EDGE]=mxConstants.EDGESTYLE_ELBOW;return b};b.prototype.getEdgeStyle=function(a){if(null!=a&&a instanceof Object||null===a)return this.getEdgeStyle$java_util_Map(a);if(void 0===a)return this.getEdgeStyle$();throw Error("invalid overload");};b.prototype.getMasterId= function(){return this.shape.hasAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.MASTER)?this.shape.getAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.MASTER):null};b.prototype.getShapeMasterId=function(){return this.shape.hasAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.MASTER_SHAPE)?this.shape.getAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.MASTER_SHAPE):null};b.prototype.isGroup=function(){var a;a=(a=this.shape.getAttribute("Type"))&&a.equals?a.equals("Group"):"Group"===a;return a};b.getType=function(a){return a.getAttribute("Type")}; @@ -1206,8 +1206,8 @@ if(null!=a&&!function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"0")&&!functi (a=this.shapeName)&&a.equals?a.equals("Subproces"):"Subproces"===a;return a};b.prototype.getEdgeStyle$=function(){return{edgeStyle:"none"}};b.prototype.getChildShapes=function(){return this.childShapes};b.prototype.setChildShapes=function(a){this.childShapes=a};b.prototype.isDisplacedLabel=function(){var a=this.getAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_X,"F",""),b=this.getAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_Y,"F",""),e=this.getAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.TXT_WIDTH, "F",""),f=this.getAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.TXT_HEIGHT,"F","");if(null!=this.masterShape){if(""===a||function(a,b){return a&&a.equals?a.equals(b):a===b}(a.toLowerCase(),"inh"))a=this.masterShape.getAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_X,"F","");if(""===b||function(a,b){return a&&a.equals?a.equals(b):a===b}(b.toLowerCase(),"inh"))b=this.masterShape.getAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_Y,"F","");if(""===e||function(a,b){return a&&a.equals?a.equals(b): a===b}(e.toLowerCase(),"inh"))e=this.masterShape.getAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.TXT_WIDTH,"F","");if(""===f||function(a,b){return a&&a.equals?a.equals(b):a===b}(f.toLowerCase(),"inh"))f=this.masterShape.getAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.TXT_HEIGHT,"F","")}return function(a,b){return a&&a.equals?a.equals(b):a===b}(a.toLowerCase(),"width*0.5")&&function(a,b){return a&&a.equals?a.equals(b):a===b}(b.toLowerCase(),"height*0.5")&&function(a,b){return a&&a.equals?a.equals(b): -a===b}(e.toLowerCase(),"width*1")&&function(a,b){return a&&a.equals?a.equals(b):a===b}(f.toLowerCase(),"height*1")||!(function(a,b,d){void 0===d&&(d=0);return a.substr(d,b.length)===b}(a.toLowerCase(),"width*")&&function(a,b,d){void 0===d&&(d=0);return a.substr(d,b.length)===b}(b.toLowerCase(),"height*")&&function(a,b,d){void 0===d&&(d=0);return a.substr(d,b.length)===b}(e.toLowerCase(),"width*")&&function(a,b,d){void 0===d&&(d=0);return a.substr(d,b.length)===b}(f.toLowerCase(),"height*")||function(a, -b,d){void 0===d&&(d=0);return a.substr(d,b.length)===b}(a.toLowerCase(),"controls.row_")||function(a,b,d){void 0===d&&(d=0);return a.substr(d,b.length)===b}(b.toLowerCase(),"controls.row_"))?!1:!0};b.prototype.isVerticalLabel=function(){var a=this.getAttribute("TextDirection","V","");a||null==this.masterShape||(a=this.masterShape.getAttribute("TextDirection","V",""));return"1"==a};b.prototype.isRotatedLabel=function(){if(this.isVerticalLabel())return!0;var a=this.getAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.TXT_ANGLE, +a===b}(e.toLowerCase(),"width*1")&&function(a,b){return a&&a.equals?a.equals(b):a===b}(f.toLowerCase(),"height*1")||!(function(a,b,c){void 0===c&&(c=0);return a.substr(c,b.length)===b}(a.toLowerCase(),"width*")&&function(a,b,c){void 0===c&&(c=0);return a.substr(c,b.length)===b}(b.toLowerCase(),"height*")&&function(a,b,c){void 0===c&&(c=0);return a.substr(c,b.length)===b}(e.toLowerCase(),"width*")&&function(a,b,c){void 0===c&&(c=0);return a.substr(c,b.length)===b}(f.toLowerCase(),"height*")||function(a, +b,c){void 0===c&&(c=0);return a.substr(c,b.length)===b}(a.toLowerCase(),"controls.row_")||function(a,b,c){void 0===c&&(c=0);return a.substr(c,b.length)===b}(b.toLowerCase(),"controls.row_"))?!1:!0};b.prototype.isVerticalLabel=function(){var a=this.getAttribute("TextDirection","V","");a||null==this.masterShape||(a=this.masterShape.getAttribute("TextDirection","V",""));return"1"==a};b.prototype.isRotatedLabel=function(){if(this.isVerticalLabel())return!0;var a=this.getAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.TXT_ANGLE, "V","");null!=this.masterShape&&function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"")&&(a=this.masterShape.getAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.TXT_ANGLE,"V",""));return function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"0")||function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"0.0")||function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"")?!1:!0};b.prototype.setRootShape=function(a){this.rootShape=a};b.prototype.getRootShape=function(){return this.rootShape};b.prototype.getStartXY= function(a){var b=Math.floor(Math.round(100*this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_X),0))/100);a=Math.floor(Math.round(100*(a-this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_Y),0)))/100);return new mxPoint(b,a)};b.prototype.getEndXY=function(a){var b=Math.floor(Math.round(100*this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.END_X), 0))/100);a=Math.floor(Math.round(100*(a-this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.END_Y),0)))/100);return new mxPoint(b,a)};b.prototype.getRoutingPoints=function(a,b,c){return null!=this.geomList?this.geomList.getRoutingPoints(a,b,c):null};b.prototype.getControlPoints=function(a){var b=this.getStartXY(a);a=this.getEndXY(a);var e=[];if(null!=this.shape){var f=this.shape.getElementsByTagName(c.mxgraph.io.vsdx.mxVsdxConstants.GEOM); @@ -1218,7 +1218,7 @@ d);d=Math.round(this.getStartArrowSize())|0;6!==d&&(this.styleMap[mxConstants.ST this.isConnectorBigNameU(this.getNameU())&&(this.styleMap[mxConstants.STYLE_SHAPE]=mxConstants.SHAPE_ARROW,d=this.getFillColor(),function(a,b){return a&&a.equals?a.equals(b):a===b}(d,"")||(this.styleMap[mxConstants.STYLE_FILLCOLOR]=d));d=Math.round(this.getTopSpacing())|0;this.styleMap[mxConstants.STYLE_SPACING_TOP]=""+d;d=Math.round(this.getBottomSpacing())|0;this.styleMap[mxConstants.STYLE_SPACING_BOTTOM]=""+d;d=Math.round(this.getLeftSpacing())|0;this.styleMap[mxConstants.STYLE_SPACING_LEFT]=""+ d;d=Math.round(this.getRightSpacing())|0;this.styleMap[mxConstants.STYLE_SPACING_RIGHT]=""+d;d=this.getAlignVertical();this.styleMap[mxConstants.STYLE_VERTICAL_ALIGN]=d;this.styleMap.html="1";this.resolveCommonStyles();return this.styleMap};b.prototype.resolveCommonStyles=function(){var a=this.getTextBkgndColor(this.getCellElement$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.TEXT_BKGND)),b;b=a&&a.equals?a.equals(""):""===a;b||(this.styleMap[mxConstants.STYLE_LABEL_BACKGROUNDCOLOR]=a);this.styleMap[mxConstants.STYLE_ROUNDED]= 0<this.getRounding()?c.mxgraph.io.vsdx.mxVsdxConstants.TRUE:c.mxgraph.io.vsdx.mxVsdxConstants.FALSE;return this.styleMap};b.prototype.getEdgeMarker=function(a){var d=this.getValue(this.getCellElement$java_lang_String(a?c.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_ARROW:c.mxgraph.io.vsdx.mxVsdxConstants.END_ARROW),"0"),e=0;try{if(function(a,b){return a&&a.equals?a.equals(b):a===b}(d,"Themed")){var f=this.getTheme();null!=f&&(e=this.isVertex()?f.getEdgeMarker(a,this.getQuickStyleVals()):f.getConnEdgeMarker(a, -this.getQuickStyleVals()))}else e=parseInt(d)}catch(z){}a=function(a,b){null==a.entries&&(a.entries=[]);for(var c=0;c<a.entries.length;c++)if(null!=a.entries[c].key.equals&&a.entries[c].key.equals(b)||a.entries[c].key===b)return a.entries[c].value;return null}(b.arrowTypes_$LI$(),e);0<e&&null==a&&(a=function(a,b){null==a.entries&&(a.entries=[]);for(var c=0;c<a.entries.length;c++)if(null!=a.entries[c].key.equals&&a.entries[c].key.equals(b)||a.entries[c].key===b)return a.entries[c].value;return null}(b.arrowTypes_$LI$(), +this.getQuickStyleVals()))}else e=parseInt(d)}catch(y){}a=function(a,b){null==a.entries&&(a.entries=[]);for(var c=0;c<a.entries.length;c++)if(null!=a.entries[c].key.equals&&a.entries[c].key.equals(b)||a.entries[c].key===b)return a.entries[c].value;return null}(b.arrowTypes_$LI$(),e);0<e&&null==a&&(a=function(a,b){null==a.entries&&(a.entries=[]);for(var c=0;c<a.entries.length;c++)if(null!=a.entries[c].key.equals&&a.entries[c].key.equals(b)||a.entries[c].key===b)return a.entries[c].value;return null}(b.arrowTypes_$LI$(), 1));return a};b.prototype.getCellElement$java_lang_String=function(a){var b=e.prototype.getCellElement$java_lang_String.call(this,a);return null==b&&null!=this.masterShape?this.masterShape.getCellElement$java_lang_String(a):b};b.prototype.getCellElement$java_lang_String$java_lang_String$java_lang_String=function(a,b,c){var d=e.prototype.getCellElement$java_lang_String$java_lang_String$java_lang_String.call(this,a,b,c);return null==d&&null!=this.masterShape?this.masterShape.getCellElement$java_lang_String$java_lang_String$java_lang_String(a, b,c):d};b.prototype.getCellElement=function(a,b,c){if("string"!==typeof a&&null!==a||"string"!==typeof b&&null!==b||"string"!==typeof c&&null!==c){if("string"!==typeof a&&null!==a||void 0!==b||void 0!==c)throw Error("invalid overload");return this.getCellElement$java_lang_String(a)}return this.getCellElement$java_lang_String$java_lang_String$java_lang_String(a,b,c)};b.prototype.createLabelSubShape=function(a,b){var d=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(c.mxgraph.io.vsdx.mxVsdxConstants.TXT_WIDTH), this.getWidth()),e=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(c.mxgraph.io.vsdx.mxVsdxConstants.TXT_HEIGHT),this.getHeight()),f=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(c.mxgraph.io.vsdx.mxVsdxConstants.TXT_LOC_PIN_X),d/2),k=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(c.mxgraph.io.vsdx.mxVsdxConstants.TXT_LOC_PIN_Y),e/2),m=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(c.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_X), @@ -1245,8 +1245,8 @@ F|0;0<m&&19===++x&&(a+=2,x=0)}if(n<k){for(m=F=0;a<=d-e;m++)F|=f.IA_$LI$()[c.char com.mxgraph.io.vsdx.VsdxShape.arrowTypes_$LI$();com.mxgraph.io.vsdx.VsdxShape.arrowSizes_$LI$();com.mxgraph.io.vsdx.VsdxShape.OFFSET_ARRAY_$LI$();com.mxgraph.io.vsdx.VsdxShape.__static_initialize();com.mxgraph.io.vsdx.Shape.UNICODE_LINE_SEP_$LI$();com.mxgraph.io.vsdx.Style.lineDashPatterns_$LI$();com.mxgraph.io.vsdx.Style.styleTypes_$LI$();com.mxgraph.io.vsdx.Style.__static_initialize();com.mxgraph.online.Constants.MAX_AREA_$LI$();com.mxgraph.io.vsdx.theme.Color.NONE_$LI$();com.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(); com.mxgraph.io.vsdx.mxVsdxTheme.colorIds_$LI$();com.mxgraph.io.vsdx.mxVsdxTheme.themesIds_$LI$();com.mxgraph.io.vsdx.mxVsdxTheme.__static_initialize();com.mxgraph.io.vsdx.mxVsdxConstants.MY_SET_$LI$();com.mxgraph.io.vsdx.mxVsdxConstants.SET_VALUES_$LI$();com.mxgraph.io.vsdx.mxPropertiesManager.defaultColors_$LI$();com.mxgraph.io.vsdx.mxPropertiesManager.__static_initialize();com.mxgraph.io.mxVsdxCodec.vsdxPlaceholder_$LI$();com.mxgraph.io.mxVsdxCodec.parsererrorNS_$LI$(); EditorUi.prototype.doImportVisio=function(c,n,m,k){k=k||c.name;null!=k&&/(\.vs(x|sx?))($|\?)/i.test(k)?(new com.mxgraph.io.mxVssxCodec(this)).decodeVssx(c,n,null,m):(new com.mxgraph.io.mxVsdxCodec(this)).decodeVsdx(c,n,null,m)};function mxGraphMlCodec(){this.cachedRefObj={}}mxGraphMlCodec.prototype.refRegexp=/^\{y\:GraphMLReference\s+(\d+)\}$/;mxGraphMlCodec.prototype.staticRegexp=/^\{x\:Static\s+(.+)\.(.+)\}$/; -mxGraphMlCodec.prototype.decode=function(c,n,m){try{var k=mxUtils.parseXml(c),f=this.getDirectChildNamedElements(k.documentElement,mxGraphMlConstants.GRAPH);this.initializeKeys(k.documentElement);c='<?xml version="1.0" encoding="UTF-8"?><mxfile>';for(k=0;k<f.length;k++){var e=f[k],b=this.createMxGraph(),a=b.getModel();a.beginUpdate();try{for(this.nodesMap={},this.edges=[],this.importGraph(e,b,b.getDefaultParent()),k=0;k<this.edges.length;k++)for(var d=this.edges[k],h=d.edges,p=d.parent,z=d.dx,y=d.dy, -x=0;x<h.length;x++)this.importEdge(h[x],b,p,z,y)}catch(ba){throw console.log(ba),ba;}finally{a.endUpdate()}a.beginUpdate();try{var C=b.getModel().cells,F;for(F in C){var A=C[F];if(A.edge&&0<A.getChildCount())for(k=0;k<A.getChildCount();k++){var B=A.children[k].geometry;if(B.adjustIt){var G=b.view.getState(A),D=G.absolutePoints,Z=D[0],X=D[D.length-1],aa=B.x,L=B.y,z=X.x-Z.x,y=X.y-Z.y,T=Z.x+aa*z,V=Z.y+aa*y,da=Math.sqrt(z*z+y*y),z=z/da,y=y/da,T=T-L*y,V=V+L*z,ka=b.view.getRelativePoint(G,T,V);B.x=ka.x; +mxGraphMlCodec.prototype.decode=function(c,n,m){try{var k=mxUtils.parseXml(c),f=this.getDirectChildNamedElements(k.documentElement,mxGraphMlConstants.GRAPH);this.initializeKeys(k.documentElement);c='<?xml version="1.0" encoding="UTF-8"?><mxfile>';for(k=0;k<f.length;k++){var e=f[k],b=this.createMxGraph(),a=b.getModel();a.beginUpdate();try{for(this.nodesMap={},this.edges=[],this.importGraph(e,b,b.getDefaultParent()),k=0;k<this.edges.length;k++)for(var d=this.edges[k],h=d.edges,p=d.parent,y=d.dx,z=d.dy, +x=0;x<h.length;x++)this.importEdge(h[x],b,p,y,z)}catch(ba){throw console.log(ba),ba;}finally{a.endUpdate()}a.beginUpdate();try{var C=b.getModel().cells,F;for(F in C){var A=C[F];if(A.edge&&0<A.getChildCount())for(k=0;k<A.getChildCount();k++){var B=A.children[k].geometry;if(B.adjustIt){var G=b.view.getState(A),D=G.absolutePoints,Z=D[0],X=D[D.length-1],aa=B.x,L=B.y,y=X.x-Z.x,z=X.y-Z.y,T=Z.x+aa*y,V=Z.y+aa*z,da=Math.sqrt(y*y+z*z),y=y/da,z=z/da,T=T-L*z,V=V+L*y,ka=b.view.getRelativePoint(G,T,V);B.x=ka.x; B.y=ka.y}}}}catch(ba){throw console.log(ba),ba;}finally{a.endUpdate()}c+=this.processPage(b,k+1)}n&&n(c+"</mxfile>")}catch(ba){m&&m(ba)}}; mxGraphMlCodec.prototype.initializeKeys=function(c){var n=this.getDirectChildNamedElements(c,mxGraphMlConstants.KEY);this.nodesKeys={};this.edgesKeys={};this.portsKeys={};this.sharedData={};this.nodesKeys[mxGraphMlConstants.NODE_GEOMETRY]={};this.nodesKeys[mxGraphMlConstants.USER_TAGS]={};this.nodesKeys[mxGraphMlConstants.NODE_STYLE]={};this.nodesKeys[mxGraphMlConstants.NODE_LABELS]={};this.nodesKeys[mxGraphMlConstants.NODE_GRAPHICS]={};this.edgesKeys[mxGraphMlConstants.EDGE_GEOMETRY]={};this.edgesKeys[mxGraphMlConstants.EDGE_STYLE]= {};this.edgesKeys[mxGraphMlConstants.EDGE_LABELS]={};this.portsKeys[mxGraphMlConstants.PORT_LOCATION_PARAMETER]={};this.portsKeys[mxGraphMlConstants.PORT_STYLE]={};this.portsKeys[mxGraphMlConstants.PORT_VIEW_STATE]={};for(var m,k=0;k<n.length;k++){var f=this.dataElem2Obj(n[k]),e=f[mxGraphMlConstants.ID],b=f[mxGraphMlConstants.KEY_FOR],a=f[mxGraphMlConstants.KEY_NAME],d=f[mxGraphMlConstants.KEY_YTYPE];a==mxGraphMlConstants.SHARED_DATA&&(m=e);a=a?a:d;switch(b){case mxGraphMlConstants.NODE:this.nodesKeys[a]= @@ -1261,22 +1261,22 @@ break;case "bpmnOutline":b=mxGraphMlShapesMap.bpmnOutline[e.toLowerCase()];break mxGraphMlCodec.prototype.importGraph=function(c,n,m){for(var k=this.getDirectChildNamedElements(c,mxGraphMlConstants.NODE),f=m,e=0,b=0;f&&f.geometry;)e+=f.geometry.x,b+=f.geometry.y,f=f.parent;for(f=0;f<k.length;f++)this.importNode(k[f],n,m,e,b);this.edges.push({edges:this.getDirectChildNamedElements(c,mxGraphMlConstants.EDGE),parent:m,dx:e,dy:b})}; mxGraphMlCodec.prototype.importPort=function(c,n){for(var m=c.getAttribute(mxGraphMlConstants.PORT_NAME),k={},f=this.getDirectChildNamedElements(c,mxGraphMlConstants.DATA),e=0;e<f.length;e++){var b=f[e];b.getAttribute(mxGraphMlConstants.KEY);b=this.dataElem2Obj(b);b.key==this.portsKeys[mxGraphMlConstants.PORT_LOCATION_PARAMETER].key&&this.mapObject(b,{"y:FreeNodePortLocationModelParameter.Ratio":function(a,b){var c=a.split(",");b.pos={x:c[0],y:c[1]}}},k)}n[m]=k}; mxGraphMlCodec.prototype.styleMap2Str=function(c){var n="",m="",k;for(k in c)m+=n+k+"="+c[k],n=";";return m}; -mxGraphMlCodec.prototype.importNode=function(c,n,m,k,f){var e=this.getDirectChildNamedElements(c,mxGraphMlConstants.DATA),b=c.getAttribute(mxGraphMlConstants.ID),a=new mxCell;a.vertex=!0;a.geometry=new mxGeometry(0,0,30,30);n.addCell(a,m);m={graphMlID:b};for(var d=null,h=null,p=null,z=null,y=0;y<e.length;y++){var x=this.dataElem2Obj(e[y]);if(x.key)if(x.key==this.nodesKeys[mxGraphMlConstants.NODE_GEOMETRY].key)this.addNodeGeo(a,x,k,f);else if(x.key==this.nodesKeys[mxGraphMlConstants.USER_TAGS].key)p= -x;else if(x.key==this.nodesKeys[mxGraphMlConstants.NODE_STYLE].key)d=x,x["yjs:StringTemplateNodeStyle"]?h=x["yjs:StringTemplateNodeStyle"]["#text"]:this.addNodeStyle(a,x,m);else if(x.key==this.nodesKeys[mxGraphMlConstants.NODE_LABELS].key)z=x;else if(x.key==this.nodesKeys[mxGraphMlConstants.NODE_GRAPHICS].key){var C=d=null;for(C in x)if("key"!=C&&"#text"!=C){if("y:ProxyAutoBoundsNode"==C){if(C=x[C]["y:Realizers"])for(var F in C)if("active"!=F&&"#text"!=F){d=C[F][C.active];x={};x[F]=d;break}}else d= -x[C];break}d&&(d[mxGraphMlConstants.GEOMETRY]&&this.addNodeGeo(a,d[mxGraphMlConstants.GEOMETRY],k,f),d[mxGraphMlConstants.NODE_LABEL]&&(z=d[mxGraphMlConstants.NODE_LABEL]));d=x;this.addNodeStyle(a,x,m)}}f=this.getDirectChildNamedElements(c,mxGraphMlConstants.PORT);k={};for(y=0;y<f.length;y++)this.importPort(f[y],k);h&&this.handleTemplates(h,p,a,m);this.handleFixedRatio(a,m);this.handleCompoundShape(a,m,d,null);0==m.strokeWidth&&(m.strokeColor="none");a.style=this.styleMap2Str(m);c=this.getDirectChildNamedElements(c, -mxGraphMlConstants.GRAPH);for(y=0;y<c.length;y++)this.importGraph(c[y],n,a,k);z&&this.addLabels(a,z,m,n);this.nodesMap[b]={node:a,ports:k}}; +mxGraphMlCodec.prototype.importNode=function(c,n,m,k,f){var e=this.getDirectChildNamedElements(c,mxGraphMlConstants.DATA),b=c.getAttribute(mxGraphMlConstants.ID),a=new mxCell;a.vertex=!0;a.geometry=new mxGeometry(0,0,30,30);n.addCell(a,m);m={graphMlID:b};for(var d=null,h=null,p=null,y=null,z=0;z<e.length;z++){var x=this.dataElem2Obj(e[z]);if(x.key)if(x.key==this.nodesKeys[mxGraphMlConstants.NODE_GEOMETRY].key)this.addNodeGeo(a,x,k,f);else if(x.key==this.nodesKeys[mxGraphMlConstants.USER_TAGS].key)p= +x;else if(x.key==this.nodesKeys[mxGraphMlConstants.NODE_STYLE].key)d=x,x["yjs:StringTemplateNodeStyle"]?h=x["yjs:StringTemplateNodeStyle"]["#text"]:this.addNodeStyle(a,x,m);else if(x.key==this.nodesKeys[mxGraphMlConstants.NODE_LABELS].key)y=x;else if(x.key==this.nodesKeys[mxGraphMlConstants.NODE_GRAPHICS].key){var C=d=null;for(C in x)if("key"!=C&&"#text"!=C){if("y:ProxyAutoBoundsNode"==C){if(C=x[C]["y:Realizers"])for(var F in C)if("active"!=F&&"#text"!=F){d=C[F][C.active];x={};x[F]=d;break}}else d= +x[C];break}d&&(d[mxGraphMlConstants.GEOMETRY]&&this.addNodeGeo(a,d[mxGraphMlConstants.GEOMETRY],k,f),d[mxGraphMlConstants.NODE_LABEL]&&(y=d[mxGraphMlConstants.NODE_LABEL]));d=x;this.addNodeStyle(a,x,m)}}f=this.getDirectChildNamedElements(c,mxGraphMlConstants.PORT);k={};for(z=0;z<f.length;z++)this.importPort(f[z],k);h&&this.handleTemplates(h,p,a,m);this.handleFixedRatio(a,m);this.handleCompoundShape(a,m,d,null);0==m.strokeWidth&&(m.strokeColor="none");a.style=this.styleMap2Str(m);c=this.getDirectChildNamedElements(c, +mxGraphMlConstants.GRAPH);for(z=0;z<c.length;z++)this.importGraph(c[z],n,a,k);y&&this.addLabels(a,y,m,n);this.nodesMap[b]={node:a,ports:k}}; mxGraphMlCodec.prototype.addNodeStyle=function(c,n,m){c=function(a,b){if("line"!=a){b.dashed=1;var c;switch(a){case "DashDot":c="3 1 1 1";break;case "Dot":c="1 1";break;case "DashDotDot":c="3 1 1 1 1 1";break;case "Dash":c="3 1";break;case "dotted":c="1 3";break;case "dashed":c="5 2";break;default:c=a.replace(/0/g,"1")}c&&(0>c.indexOf(" ")&&(c=c+" "+c),b.dashPattern=c)}};c={shape:{key:"shape",mod:"shape"},"y:Shape.type":{key:"shape",mod:"shape"},configuration:{key:"shape",mod:"shape"},type:{key:"shape", mod:"shape"},assetName:{key:"shape",mod:"shape"},activityType:{key:"shape",mod:"shape"},fill:{key:"fillColor",mod:"color"},"fill.yjs:SolidColorFill.color":{key:"fillColor",mod:"color"},"fill.yjs:SolidColorFill.color.yjs:Color.value":{key:"fillColor",mod:"color"},"y:Fill":{color:{key:"fillColor",mod:"color"},transparent:function(a,b){"true"==a&&(b.fillColor="none")}},"y:BorderStyle":{color:{key:"strokeColor",mod:"color"},width:"strokeWidth",hasColor:function(a,b){"false"==a&&(b.strokeColor="none")}, type:c},stroke:{key:"strokeColor",mod:"color"},"stroke.yjs:Stroke":{dashStyle:c,"dashStyle.yjs:DashStyle.dashes":c,fill:{key:"strokeColor",mod:"color"},"fill.yjs:SolidColorFill.color":{key:"strokeColor",mod:"color"},"thickness.sys:Double":"strokeWidth",thickness:"strokeWidth"}};var k=mxUtils.clone(c);k.defaults={fillColor:"#CCCCCC",strokeColor:"#6881B3"};var f=mxUtils.clone(c);f.defaults={shape:"ext;rounded=1",fillColor:"#FFFFFF",strokeColor:"#000090"};var e=mxUtils.clone(c);e.defaults={shape:"rhombus;fillColor=#FFFFFF;strokeColor=#FFCD28"}; -var b=mxUtils.clone(c);b.defaults={shape:"hexagon",strokeColor:"#007000"};var a=mxUtils.clone(c);a.defaults={shape:"mxgraph.bpmn.shape;perimeter=ellipsePerimeter;symbol=general",outline:"standard"};a.characteristic={key:"outline",mod:"bpmnOutline"};var d=mxUtils.clone(c);d.defaults={shape:"js:bpmnDataObject"};var h=mxUtils.clone(c);h.defaults={shape:"datastore"};var p=mxUtils.clone(c);p.defaults={shape:"swimlane;swimlaneLine=0;startSize=20;dashed=1;dashPattern=3 1 1 1;collapsible=0;rounded=1"};var z= -mxUtils.clone(c);z.defaults={shape:"js:BpmnChoreography"};var y=mxUtils.clone(c);y.defaults={rounded:"1",glass:"1",strokeColor:"#FFFFFF"};y.inset="strokeWidth";y.radius="arcSize";y.drawShadow={key:"shadow",mod:"bool"};y.color={key:"fillColor",mod:"color",addGradient:"north"};y["color.yjs:Color.value"]=y.color;var x=mxUtils.clone(c);x.defaults={rounded:"1",arcSize:10,glass:"1",shadow:"1",strokeColor:"none"};x.drawShadow={key:"shadow",mod:"bool"};var C=mxUtils.clone(c);C.defaults={shape:"swimlane", +var b=mxUtils.clone(c);b.defaults={shape:"hexagon",strokeColor:"#007000"};var a=mxUtils.clone(c);a.defaults={shape:"mxgraph.bpmn.shape;perimeter=ellipsePerimeter;symbol=general",outline:"standard"};a.characteristic={key:"outline",mod:"bpmnOutline"};var d=mxUtils.clone(c);d.defaults={shape:"js:bpmnDataObject"};var h=mxUtils.clone(c);h.defaults={shape:"datastore"};var p=mxUtils.clone(c);p.defaults={shape:"swimlane;swimlaneLine=0;startSize=20;dashed=1;dashPattern=3 1 1 1;collapsible=0;rounded=1"};var y= +mxUtils.clone(c);y.defaults={shape:"js:BpmnChoreography"};var z=mxUtils.clone(c);z.defaults={rounded:"1",glass:"1",strokeColor:"#FFFFFF"};z.inset="strokeWidth";z.radius="arcSize";z.drawShadow={key:"shadow",mod:"bool"};z.color={key:"fillColor",mod:"color",addGradient:"north"};z["color.yjs:Color.value"]=z.color;var x=mxUtils.clone(c);x.defaults={rounded:"1",arcSize:10,glass:"1",shadow:"1",strokeColor:"none"};x.drawShadow={key:"shadow",mod:"bool"};var C=mxUtils.clone(c);C.defaults={shape:"swimlane", startSize:20,strokeWidth:4,spacingLeft:10};C.isCollapsible={key:"collapsible",mod:"bool"};C.borderColor={key:"strokeColor",mod:"color"};C.folderFrontColor={key:"fillColor",mod:"color"};var F=mxUtils.clone(c);F.defaults={shape:"swimlane",startSize:20,spacingLeft:10};F["yjs:PanelNodeStyle"]={color:{key:"swimlaneFillColor",mod:"color"},"color.yjs:Color.value":{key:"swimlaneFillColor",mod:"color"},labelInsetsColor:{key:"fillColor",mod:"color"},"labelInsetsColor.yjs:Color.value":{key:"fillColor",mod:"color"}}; var A=mxUtils.clone(c);A.defaults={shape:"js:table"};var B=mxUtils.clone(c);B.defaults={shape:"image"};B.image=function(a,b){b.image=a};var G=mxUtils.clone(c);G.defaults={shape:"image"};G["y:SVGModel.y:SVGContent.y:Resource.#text"]=function(a,b){b.image="data:image/svg+xml,"+(window.btoa?btoa(a):Base64.encode(a))};var D=mxUtils.clone(c);D.defaults={shape:"swimlane",startSize:20};D["y:Shape.type"]=function(a,b){"roundrectangle"==a&&(b.rounded=1,b.arcSize=5)};var Z=mxUtils.clone(c);Z.defaults={shape:"js:table2"}; var X=mxUtils.clone(c);X.defaults={gradientDirection:"east"};X["y:Fill"].color2={key:"gradientColor",mod:"color"};X["y:StyleProperties.y:Property"]={"com.yworks.bpmn.characteristic":{key:"outline",mod:"bpmnOutline"},"com.yworks.bpmn.icon.fill":{key:"gradientColor",mod:"color"},"com.yworks.bpmn.icon.fill2":{key:"fillColor",mod:"color"},"com.yworks.bpmn.type":{key:"symbol",mod:"bpmnSymbol"},"y.view.ShadowNodePainter.SHADOW_PAINTING":{key:"shadow",mod:"bool"},doubleBorder:{key:"double",mod:"bool"},"com.yworks.sbgn.style.radius":{key:"arcSize", -mod:"scale",scale:2},"com.yworks.sbgn.style.inverse":{key:"flipV",mod:"bool"}};this.mapObject(n,{"yjs:ShapeNodeStyle":c,"demostyle:FlowchartNodeStyle":c,"demostyle:AssetNodeStyle":k,"bpmn:ActivityNodeStyle":f,"bpmn:GatewayNodeStyle":e,"bpmn:ConversationNodeStyle":b,"bpmn:EventNodeStyle":a,"bpmn:DataObjectNodeStyle":d,"bpmn:DataStoreNodeStyle":h,"bpmn:GroupNodeStyle":p,"bpmn:ChoreographyNodeStyle":z,"yjs:BevelNodeStyle":y,"yjs:ShinyPlateNodeStyle":x,"demostyle:DemoGroupStyle":C,"yjs:CollapsibleNodeStyleDecorator":F, +mod:"scale",scale:2},"com.yworks.sbgn.style.inverse":{key:"flipV",mod:"bool"}};this.mapObject(n,{"yjs:ShapeNodeStyle":c,"demostyle:FlowchartNodeStyle":c,"demostyle:AssetNodeStyle":k,"bpmn:ActivityNodeStyle":f,"bpmn:GatewayNodeStyle":e,"bpmn:ConversationNodeStyle":b,"bpmn:EventNodeStyle":a,"bpmn:DataObjectNodeStyle":d,"bpmn:DataStoreNodeStyle":h,"bpmn:GroupNodeStyle":p,"bpmn:ChoreographyNodeStyle":y,"yjs:BevelNodeStyle":z,"yjs:ShinyPlateNodeStyle":x,"demostyle:DemoGroupStyle":C,"yjs:CollapsibleNodeStyleDecorator":F, "bpmn:PoolNodeStyle":A,"yjs:TableNodeStyle":A,"demotablestyle:DemoTableStyle":A,"yjs:ImageNodeStyle":B,"y:ShapeNode":c,"y:GenericNode":X,"y:GenericGroupNode":X,"y:TableNode":Z,"y:SVGNode":G,"y:GroupNode":D},m)}; mxGraphMlCodec.prototype.handleTemplates=function(c,n,m,k){if(c){for(var f=m.geometry.width,e=m.geometry.height,b='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 '+f+" "+e+'"><g>',a,d=[],h=/\{TemplateBinding\s+([^}]+)\}/g;null!=(a=h.exec(c));){var p="";switch(a[1]){case "width":p=f;break;case "height":p=e}d.push({match:a[0],repl:p})}if(n&&n["y:Json"])for(e=JSON.parse(n["y:Json"]["#text"]),h=/\{Binding\s+([^}]+)\}/g;null!=(a=h.exec(c));)if(p=a[1].split(","), -f=e[p[0]]){if(1<p.length&&p[1].indexOf("Converter=")){var z=mxGraphMlConverters[p[1].substr(11)];z&&(arguments=[f],p[2]&&arguments.push(p[2].substr(11)),f=z.apply(null,arguments))}d.push({match:a[0],repl:mxUtils.htmlEntities(f)})}for(a=0;a<d.length;a++)c=c.replace(d[a].match,d[a].repl);d=[];for(e=/\<text.+data-content="([^"]+).+\<\/text\>/g;null!=(a=e.exec(c));)f=a[0].substr(0,a[0].length-7)+a[1]+"</text>",d.push({match:a[0],repl:f});for(a=0;a<d.length;a++)c=c.replace(d[a].match,d[a].repl);b=b+c+ +f=e[p[0]]){if(1<p.length&&p[1].indexOf("Converter=")){var y=mxGraphMlConverters[p[1].substr(11)];y&&(arguments=[f],p[2]&&arguments.push(p[2].substr(11)),f=y.apply(null,arguments))}d.push({match:a[0],repl:mxUtils.htmlEntities(f)})}for(a=0;a<d.length;a++)c=c.replace(d[a].match,d[a].repl);d=[];for(e=/\<text.+data-content="([^"]+).+\<\/text\>/g;null!=(a=e.exec(c));)f=a[0].substr(0,a[0].length-7)+a[1]+"</text>",d.push({match:a[0],repl:f});for(a=0;a<d.length;a++)c=c.replace(d[a].match,d[a].repl);b=b+c+ "</g></svg>";k.shape="image";k.image="data:image/svg+xml,"+(window.btoa?btoa(b):Base64.encode(b))}}; mxGraphMlCodec.prototype.handleCompoundShape=function(c,n,m,k){var f=n.shape;if(f&&0==f.indexOf("js:")){switch(f){case "js:bpmnArtifactShadow":n.shadow="1";case "js:bpmnArtifact":n.shape=n.symbol;delete n.fillColor;delete n.strokeColor;delete n.gradientColor;this.handleCompoundShape(c,n,m,k);break;case "js:bpmnDataObjectShadow":case "js:bpmnDataObject":n.shape="note;size=16";m=m["bpmn:DataObjectNodeStyle"]||m["y:GenericNode"]||m["y:GenericGroupNode"];k={};this.mapObject(m,{"y:StyleProperties.y:Property":{"com.yworks.bpmn.dataObjectType":"dataObjectType", "com.yworks.bpmn.marker1":"marker1"}},k);if("true"==m.collection||"bpmn_marker_parallel"==k.marker1){var e=new mxCell("",new mxGeometry(.5,1,10,10),"html=1;whiteSpace=wrap;shape=parallelMarker;");e.vertex=!0;e.geometry.relative=!0;e.geometry.offset=new mxPoint(-5,-10);c.insert(e)}if("INPUT"==m.type||"data_object_type_input"==k.dataObjectType)e=new mxCell("",new mxGeometry(0,0,10,10),"html=1;shape=singleArrow;arrowWidth=0.4;arrowSize=0.4;"),e.vertex=!0,e.geometry.relative=!0,e.geometry.offset=new mxPoint(2, @@ -1288,28 +1288,28 @@ new mxCell("",new mxGeometry(0,0,15,15),"shape=mxgraph.bpmn.script_task;"),b.geo new mxPoint(m,-20);var d=new mxCell("",new mxGeometry(.5,.5,8,1),"shape=rect;part=1;");d.geometry.offset=new mxPoint(-4,-1);d.geometry.relative=!0;d.vertex=!0;b.insert(d);break;case "bpmn_marker_loop":b=new mxCell("",new mxGeometry(.5,1,15,15),"shape=mxgraph.bpmn.loop;part=1;");b.geometry.offset=new mxPoint(m,-20);break;case "bpmn_marker_parallel":b=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;part=1;");b.geometry.offset=new mxPoint(m,-20);break;case "bpmn_marker_sequential":b=new mxCell("", new mxGeometry(.5,1,15,15),"shape=parallelMarker;direction=south;part=1;");b.geometry.offset=new mxPoint(m,-20);break;case "bpmn_marker_ad_hoc":b=new mxCell("",new mxGeometry(.5,1,15,10),"shape=mxgraph.bpmn.ad_hoc;strokeColor=none;flipH=1;part=1;fillColor=#000000");b.geometry.offset=new mxPoint(m,-17);break;case "bpmn_marker_compensation":b=new mxCell("",new mxGeometry(.5,1,15,11),"shape=mxgraph.bpmn.compensation;part=1;"),b.geometry.offset=new mxPoint(m,-18)}b.geometry.relative=!0;b.vertex=!0;c.insert(b); m+=20}break;case "js:table":n.shape="swimlane;collapsible=0;swimlaneLine=0";k=m["yjs:TableNodeStyle"]||m["demotablestyle:DemoTableStyle"];!k&&m["bpmn:PoolNodeStyle"]&&(k=m["bpmn:PoolNodeStyle"]["yjs:TableNodeStyle"]);this.mapObject(k,{"backgroundStyle.demotablestyle:TableBackgroundStyle":{"insetFill.yjs:SolidColorFill.color.yjs:Color.value":{key:"fillColor",mod:"color"},"tableBackgroundFill.yjs:SolidColorFill.color.yjs:Color.value":{key:"swimlaneFillColor",mod:"color"},"tableBackgroundStroke.yjs:Stroke":{fill:{key:"strokeColor", -mod:"color"},thickness:"strokeWidth"}},"backgroundStyle.yjs:ShapeNodeStyle.fill":{key:"fillColor",mod:"color"},"backgroundStyle.yjs:ShapeNodeStyle.fill.yjs:SolidColorFill.color":{key:"fillColor",mod:"color"}},n);n.swimlaneFillColor=n.fillColor;k=k.table["y:Table"];var h=a=0,p={x:0};m=0;(e=k.Insets)?(e=e.split(","),"0"!=e[0]?(n.startSize=e[0],p.x=parseFloat(e[0]),n.horizontal="0"):"0"!=e[1]&&(n.startSize=e[1],m=parseFloat(e[1]),h+=m)):n.startSize="0";var z={},y={Insets:function(a,b){b.startSize=a.split(",")[0]}, +mod:"color"},thickness:"strokeWidth"}},"backgroundStyle.yjs:ShapeNodeStyle.fill":{key:"fillColor",mod:"color"},"backgroundStyle.yjs:ShapeNodeStyle.fill.yjs:SolidColorFill.color":{key:"fillColor",mod:"color"}},n);n.swimlaneFillColor=n.fillColor;k=k.table["y:Table"];var h=a=0,p={x:0};m=0;(e=k.Insets)?(e=e.split(","),"0"!=e[0]?(n.startSize=e[0],p.x=parseFloat(e[0]),n.horizontal="0"):"0"!=e[1]&&(n.startSize=e[1],m=parseFloat(e[1]),h+=m)):n.startSize="0";var y={},z={Insets:function(a,b){b.startSize=a.split(",")[0]}, "Style.bpmn:AlternatingLeafStripeStyle":{"evenLeafDescriptor.bpmn:StripeDescriptor":{insetFill:{key:"evenFill",mod:"color"},backgroundFill:{key:"evenLaneFill",mod:"color"}},"oddLeafDescriptor.bpmn:StripeDescriptor":{insetFill:{key:"oddFill",mod:"color"},backgroundFill:{key:"oddLaneFill",mod:"color"}}},"Style.yjs:NodeStyleStripeStyleAdapter":{"demotablestyle:DemoStripeStyle":{"stripeInsetFill.yjs:SolidColorFill.color.yjs:Color.value":{key:"fillColor",mod:"color"},"tableLineFill.yjs:SolidColorFill.color.yjs:Color.value":{key:"strokeColor", -mod:"color"}},"yjs:ShapeNodeStyle":{fill:{key:"swimlaneFillColor",mod:"color"}}},Size:"height"};this.mapObject(k.RowDefaults,{defaults:{shape:"swimlane;collapsible=0;horizontal=0",startSize:"0"},"y:StripeDefaults":y},z);b={};d={Insets:function(a,b){b.startSize=a.split(",")[1]},"Style.bpmn:AlternatingLeafStripeStyle":{"evenLeafDescriptor.bpmn:StripeDescriptor":{insetFill:{key:"evenFill",mod:"color"},backgroundFill:{key:"evenLaneFill",mod:"color"}},"oddLeafDescriptor.bpmn:StripeDescriptor":{insetFill:{key:"oddFill", +mod:"color"}},"yjs:ShapeNodeStyle":{fill:{key:"swimlaneFillColor",mod:"color"}}},Size:"height"};this.mapObject(k.RowDefaults,{defaults:{shape:"swimlane;collapsible=0;horizontal=0",startSize:"0"},"y:StripeDefaults":z},y);b={};d={Insets:function(a,b){b.startSize=a.split(",")[1]},"Style.bpmn:AlternatingLeafStripeStyle":{"evenLeafDescriptor.bpmn:StripeDescriptor":{insetFill:{key:"evenFill",mod:"color"},backgroundFill:{key:"evenLaneFill",mod:"color"}},"oddLeafDescriptor.bpmn:StripeDescriptor":{insetFill:{key:"oddFill", mod:"color"},backgroundFill:{key:"oddLaneFill",mod:"color"}}},"Style.yjs:NodeStyleStripeStyleAdapter":{"demotablestyle:DemoStripeStyle":{"stripeInsetFill.yjs:SolidColorFill.color.yjs:Color.value":{key:"fillColor",mod:"color"},"tableLineFill.yjs:SolidColorFill.color.yjs:Color.value":{key:"strokeColor",mod:"color"}},"yjs:ShapeNodeStyle":{fill:{key:"swimlaneFillColor",mod:"color"}}},Size:"width"};this.mapObject(k.ColumnDefaults,{defaults:{shape:"swimlane;collapsible=0",startSize:"0",fillColor:"none"}, -"y:StripeDefaults":d},b);var e=c.geometry,a=k.Rows["y:Row"],h=h+parseFloat(b.startSize),x=p.x,C=p.x;p.lx=p.x;if(a)for(a instanceof Array||(a=[a]),e=0;e<a.length;e++)p.x=C,p.lx=C,h=this.addRow(a[e],c,e&1,h,p,y,z),x=Math.max(p.x,x);k=k.Columns["y:Column"];a=x;if(k)for(k instanceof Array||(k=[k]),e=0;e<k.length;e++)a=this.addColumn(k[e],c,e&1,a,m,d,b);break;case "js:table2":n.shape="swimlane;collapsible=0;swimlaneLine=0";k={};this.mapObject(m,{"y:TableNode":{"y:StyleProperties.y:Property":{"yed.table.section.color":{key:"secColor", +"y:StripeDefaults":d},b);var e=c.geometry,a=k.Rows["y:Row"],h=h+parseFloat(b.startSize),x=p.x,C=p.x;p.lx=p.x;if(a)for(a instanceof Array||(a=[a]),e=0;e<a.length;e++)p.x=C,p.lx=C,h=this.addRow(a[e],c,e&1,h,p,z,y),x=Math.max(p.x,x);k=k.Columns["y:Column"];a=x;if(k)for(k instanceof Array||(k=[k]),e=0;e<k.length;e++)a=this.addColumn(k[e],c,e&1,a,m,d,b);break;case "js:table2":n.shape="swimlane;collapsible=0;swimlaneLine=0";k={};this.mapObject(m,{"y:TableNode":{"y:StyleProperties.y:Property":{"yed.table.section.color":{key:"secColor", mod:"color"},"yed.table.header.height":"headerH","yed.table.header.color.main":{key:"headerColor",mod:"color"},"yed.table.header.color.alternating":{key:"headerColorAlt",mod:"color"},"yed.table.lane.color.main":{key:"laneColor",mod:"color"},"yed.table.lane.color.alternating":{key:"laneColorAlt",mod:"color"},"yed.table.lane.style":"laneStyle","com.yworks.bpmn.type":"isHorz",POOL_LANE_COLOR_ALTERNATING:{key:"laneColorAlt",mod:"color"},POOL_LANE_COLOR_MAIN:{key:"laneColor",mod:"color"},POOL_LANE_STYLE:"laneStyle", -POOL_HEADER_COLOR_MAIN:{key:"headerColor",mod:"color"},POOL_HEADER_COLOR_ALTERNATING:{key:"headerColorAlt",mod:"color"},POOL_TABLE_SECTION_COLOR:{key:"secColor",mod:"color"}},"y:Table":{"y:DefaultColumnInsets.top":"colHHeight","y:DefaultRowInsets.left":"rowHWidth","y:Insets":{top:"tblHHeight",left:"tblHWidth"}}}},k);n.swimlaneFillColor=n.fillColor;y=b=0;"pool_type_lane_and_column"==k.isHorz||"pool_type_empty"==k.isHorz||"pool_type_lane"==k.isHorz?y=parseFloat(k.tblHWidth):b=parseFloat(k.tblHHeight); -n.startSize=b?b:y;try{a=m["y:TableNode"]["y:Table"]["y:Rows"]["y:Row"];d=m["y:TableNode"]["y:Table"]["y:Columns"]["y:Column"];h="lane.style.rows"==k.laneStyle||"lane_style_rows"==k.laneStyle;a instanceof Array||(a=[a]);d instanceof Array||(d=[d]);p=parseFloat(k.rowHWidth);for(e=0;e<a.length;e++)a[e]["y:Insets"]&&(p=Math.max(p,parseFloat(a[e]["y:Insets"].left)+parseFloat(a[e]["y:Insets"].right)));z=parseFloat(k.colHHeight);for(e=0;e<d.length;e++)d[e]["y:Insets"]&&(z=Math.max(z,parseFloat(d[e]["y:Insets"].top)+ -parseFloat(d[e]["y:Insets"].bottom)));h?(this.addTbl2Rows(c,a,b,y,p,z,h,k),this.addTbl2Cols(c,d,b,y,p,z,h,k)):(this.addTbl2Cols(c,d,b,y,p,z,h,k),this.addTbl2Rows(c,a,b,y,p,z,h,k))}catch(F){}break;case "js:relationship_big_entity":n.shape="swimlane;startSize=30;rounded=1;arcSize=5;collapsible=0";if(c=m["y:GenericNode"]["y:Fill"])n.fillColor=c.color2,n.swimlaneFillColor=c.color;break;case "js:relationship_attribute":n.shape="1"==n["double"]?"doubleEllipse":"ellipse"}0<f.indexOf("Shadow")&&(n.shadow= +POOL_HEADER_COLOR_MAIN:{key:"headerColor",mod:"color"},POOL_HEADER_COLOR_ALTERNATING:{key:"headerColorAlt",mod:"color"},POOL_TABLE_SECTION_COLOR:{key:"secColor",mod:"color"}},"y:Table":{"y:DefaultColumnInsets.top":"colHHeight","y:DefaultRowInsets.left":"rowHWidth","y:Insets":{top:"tblHHeight",left:"tblHWidth"}}}},k);n.swimlaneFillColor=n.fillColor;z=b=0;"pool_type_lane_and_column"==k.isHorz||"pool_type_empty"==k.isHorz||"pool_type_lane"==k.isHorz?z=parseFloat(k.tblHWidth):b=parseFloat(k.tblHHeight); +n.startSize=b?b:z;try{a=m["y:TableNode"]["y:Table"]["y:Rows"]["y:Row"];d=m["y:TableNode"]["y:Table"]["y:Columns"]["y:Column"];h="lane.style.rows"==k.laneStyle||"lane_style_rows"==k.laneStyle;a instanceof Array||(a=[a]);d instanceof Array||(d=[d]);p=parseFloat(k.rowHWidth);for(e=0;e<a.length;e++)a[e]["y:Insets"]&&(p=Math.max(p,parseFloat(a[e]["y:Insets"].left)+parseFloat(a[e]["y:Insets"].right)));y=parseFloat(k.colHHeight);for(e=0;e<d.length;e++)d[e]["y:Insets"]&&(y=Math.max(y,parseFloat(d[e]["y:Insets"].top)+ +parseFloat(d[e]["y:Insets"].bottom)));h?(this.addTbl2Rows(c,a,b,z,p,y,h,k),this.addTbl2Cols(c,d,b,z,p,y,h,k)):(this.addTbl2Cols(c,d,b,z,p,y,h,k),this.addTbl2Rows(c,a,b,z,p,y,h,k))}catch(F){}break;case "js:relationship_big_entity":n.shape="swimlane;startSize=30;rounded=1;arcSize=5;collapsible=0";if(c=m["y:GenericNode"]["y:Fill"])n.fillColor=c.color2,n.swimlaneFillColor=c.color;break;case "js:relationship_attribute":n.shape="1"==n["double"]?"doubleEllipse":"ellipse"}0<f.indexOf("Shadow")&&(n.shadow= "1")}}; -mxGraphMlCodec.prototype.addTbl2Rows=function(c,n,m,k,f,e,b,a){m+=e;for(var d=null!=a.isHorz,h=0;h<n.length;h++){var p=h&1,z=new mxCell;z.vertex=!0;var y={shape:"swimlane;collapsible=0;horizontal=0",startSize:f,fillColor:a.secColor||"none",swimlaneLine:d?"0":"1"};0==parseFloat(y.startSize)&&(y.fillColor="none",y.swimlaneLine="0");if(b){var x=p?a.headerColorAlt:a.headerColor;y.swimlaneFillColor=p?a.laneColorAlt:a.laneColor;y.fillColor=x?x:y.swimlaneFillColor}p=parseFloat(n[h].height);x=d&&0==h?e:0; -z.geometry=new mxGeometry(k,m-x,c.geometry.width-k,p+x);m+=p;z.style=this.styleMap2Str(y);c.insert(z)}}; -mxGraphMlCodec.prototype.addTbl2Cols=function(c,n,m,k,f,e,b,a){k=f+k;for(var d=null!=a.isHorz,h=0;h<n.length;h++){var p=h&1,z=new mxCell;z.vertex=!0;var y={shape:"swimlane;collapsible=0",startSize:e,fillColor:a.secColor||"none",swimlaneLine:d?"0":"1"};0==parseFloat(y.startSize)&&(y.fillColor="none");if(!b){var x=p?a.headerColorAlt:a.headerColor;y.swimlaneFillColor=p?a.laneColorAlt:a.laneColor;y.fillColor=x?x:y.swimlaneFillColor}p=parseFloat(n[h].width);x=d&&0==h?f:0;z.geometry=new mxGeometry(k-x, -m,p+x,c.geometry.height-m);k+=p;z.style=this.styleMap2Str(y);c.insert(z)}}; +mxGraphMlCodec.prototype.addTbl2Rows=function(c,n,m,k,f,e,b,a){m+=e;for(var d=null!=a.isHorz,h=0;h<n.length;h++){var p=h&1,y=new mxCell;y.vertex=!0;var z={shape:"swimlane;collapsible=0;horizontal=0",startSize:f,fillColor:a.secColor||"none",swimlaneLine:d?"0":"1"};0==parseFloat(z.startSize)&&(z.fillColor="none",z.swimlaneLine="0");if(b){var x=p?a.headerColorAlt:a.headerColor;z.swimlaneFillColor=p?a.laneColorAlt:a.laneColor;z.fillColor=x?x:z.swimlaneFillColor}p=parseFloat(n[h].height);x=d&&0==h?e:0; +y.geometry=new mxGeometry(k,m-x,c.geometry.width-k,p+x);m+=p;y.style=this.styleMap2Str(z);c.insert(y)}}; +mxGraphMlCodec.prototype.addTbl2Cols=function(c,n,m,k,f,e,b,a){k=f+k;for(var d=null!=a.isHorz,h=0;h<n.length;h++){var p=h&1,y=new mxCell;y.vertex=!0;var z={shape:"swimlane;collapsible=0",startSize:e,fillColor:a.secColor||"none",swimlaneLine:d?"0":"1"};0==parseFloat(z.startSize)&&(z.fillColor="none");if(!b){var x=p?a.headerColorAlt:a.headerColor;z.swimlaneFillColor=p?a.laneColorAlt:a.laneColor;z.fillColor=x?x:z.swimlaneFillColor}p=parseFloat(n[h].width);x=d&&0==h?f:0;y.geometry=new mxGeometry(k-x, +m,p+x,c.geometry.height-m);k+=p;y.style=this.styleMap2Str(z);c.insert(y)}}; mxGraphMlCodec.prototype.addRow=function(c,n,m,k,f,e,b){var a=new mxCell;a.vertex=!0;var d=mxUtils.clone(b);this.mapObject(c,e,d);m?(d.oddFill&&(d.fillColor=d.oddFill),d.oddLaneFill&&(d.swimlaneFillColor=d.oddLaneFill)):(d.evenFill&&(d.fillColor=d.evenFill),d.evenLaneFill&&(d.swimlaneFillColor=d.evenLaneFill));m=parseFloat(d.height);a.geometry=new mxGeometry(f.lx,k,n.geometry.width-f.lx,m);var h=c.Labels;h&&this.addLabels(a,h,d);a.style=this.styleMap2Str(d);n.insert(a);c=c["y:Row"];f.lx=0;d.startSize&& -(f.lx=parseFloat(d.startSize),f.x+=f.lx);n=d=f.x;var h=f.lx,p=0;if(c){c instanceof Array||(c=[c]);for(var z=0;z<c.length;z++)f.x=d,f.lx=h,p=this.addRow(c[z],a,z&1,p,f,e,b),n=Math.max(f.x,n)}f.x=n;m=Math.max(m,p);a.geometry.height=m;return k+m}; +(f.lx=parseFloat(d.startSize),f.x+=f.lx);n=d=f.x;var h=f.lx,p=0;if(c){c instanceof Array||(c=[c]);for(var y=0;y<c.length;y++)f.x=d,f.lx=h,p=this.addRow(c[y],a,y&1,p,f,e,b),n=Math.max(f.x,n)}f.x=n;m=Math.max(m,p);a.geometry.height=m;return k+m}; mxGraphMlCodec.prototype.addColumn=function(c,n,m,k,f,e,b){var a=new mxCell;a.vertex=!0;var d=mxUtils.clone(b);this.mapObject(c,e,d);m?(d.oddFill&&(d.fillColor=d.oddFill),d.oddLaneFill&&(d.swimlaneFillColor=d.oddLaneFill)):(d.evenFill&&(d.fillColor=d.evenFill),d.evenLaneFill&&(d.swimlaneFillColor=d.evenLaneFill));m=parseFloat(d.width);a.geometry=new mxGeometry(k,f,m,n.geometry.height-f);var h=c.Labels;h&&this.addLabels(a,h,d);a.style=this.styleMap2Str(d);n.insert(a);c=c["y:Column"];n=0;if(c)for(c instanceof Array||(c=[c]),d=0;d<c.length;d++)n=this.addColumn(c[d],a,d&1,n,f,e,b);m=Math.max(m,n);a.geometry.width=m;return k+m};mxGraphMlCodec.prototype.handleFixedRatio=function(c,n){var m=n.shape,k=c.geometry;if(m&&k)if(0<m.indexOf(";aspect=fixed"))m=Math.min(k.height,k.width),m==k.height&&(k.x+=(k.width-m)/2),k.height=m,k.width=m;else if(0<m.indexOf(";rotation=90")||0<m.indexOf(";rotation=-90")){var m=k.height,f=k.width;k.height=f;k.width=m;m=(m-f)/2;k.x-=m;k.y+=m}}; mxGraphMlCodec.prototype.addNodeGeo=function(c,n,m,k){var f=n[mxGraphMlConstants.RECT],e=0,b=0,a=30,d=30;f?(e=f[mxGraphMlConstants.X],b=f[mxGraphMlConstants.Y],a=f[mxGraphMlConstants.WIDTH],d=f[mxGraphMlConstants.HEIGHT]):(e=n[mxGraphMlConstants.X_L]||e,b=n[mxGraphMlConstants.Y_L]||b,a=n[mxGraphMlConstants.WIDTH_L]||a,d=n[mxGraphMlConstants.HEIGHT_L]||d);c=c.geometry;c.x=parseFloat(e)-m;c.y=parseFloat(b)-k;c.width=parseFloat(a);c.height=parseFloat(d)}; -mxGraphMlCodec.prototype.importEdge=function(c,n,m,k,f){var e=this.getDirectChildNamedElements(c,mxGraphMlConstants.DATA),b=c.getAttribute(mxGraphMlConstants.ID),a=c.getAttribute(mxGraphMlConstants.EDGE_SOURCE),d=c.getAttribute(mxGraphMlConstants.EDGE_TARGET),h=c.getAttribute(mxGraphMlConstants.EDGE_SOURCE_PORT);c=c.getAttribute(mxGraphMlConstants.EDGE_TARGET_PORT);a=this.nodesMap[a];d=this.nodesMap[d];m=n.insertEdge(m,null,"",a.node,d.node,"graphMLId="+b);for(var b={graphMlID:b},p=0;p<e.length;p++){var z= -this.dataElem2Obj(e[p]),y=z["y:PolyLineEdge"]||z["y:GenericEdge"]||z["y:ArcEdge"]||z["y:BezierEdge"]||z["y:QuadCurveEdge"]||z["y:SplineEdge"];z.key==this.edgesKeys[mxGraphMlConstants.EDGE_GEOMETRY].key?this.addEdgeGeo(m,z,k,f):z.key==this.edgesKeys[mxGraphMlConstants.EDGE_STYLE].key?this.addEdgeStyle(m,z,b):z.key==this.edgesKeys[mxGraphMlConstants.EDGE_LABELS].key?this.addLabels(m,z,b,n):y&&(this.addEdgeStyle(m,z,b),z=this.addEdgePath(m,y["y:Path"],b,k,f),y["y:EdgeLabel"]&&this.addLabels(m,y["y:EdgeLabel"], -b,n,z),null!=b.shape&&0==b.shape.indexOf("link")&&(b.width=b.strokeWidth,b.strokeWidth=1))}a.ports&&h&&(n=a.ports[h],n.pos&&(b.exitX=n.pos.x,b.exitY=n.pos.y));d.ports&&c&&(n=d.ports[c],n.pos&&(b.entryX=n.pos.x,b.entryY=n.pos.y));m.style=this.styleMap2Str(b);return m}; +mxGraphMlCodec.prototype.importEdge=function(c,n,m,k,f){var e=this.getDirectChildNamedElements(c,mxGraphMlConstants.DATA),b=c.getAttribute(mxGraphMlConstants.ID),a=c.getAttribute(mxGraphMlConstants.EDGE_SOURCE),d=c.getAttribute(mxGraphMlConstants.EDGE_TARGET),h=c.getAttribute(mxGraphMlConstants.EDGE_SOURCE_PORT);c=c.getAttribute(mxGraphMlConstants.EDGE_TARGET_PORT);a=this.nodesMap[a];d=this.nodesMap[d];m=n.insertEdge(m,null,"",a.node,d.node,"graphMLId="+b);for(var b={graphMlID:b},p=0;p<e.length;p++){var y= +this.dataElem2Obj(e[p]),z=y["y:PolyLineEdge"]||y["y:GenericEdge"]||y["y:ArcEdge"]||y["y:BezierEdge"]||y["y:QuadCurveEdge"]||y["y:SplineEdge"];y.key==this.edgesKeys[mxGraphMlConstants.EDGE_GEOMETRY].key?this.addEdgeGeo(m,y,k,f):y.key==this.edgesKeys[mxGraphMlConstants.EDGE_STYLE].key?this.addEdgeStyle(m,y,b):y.key==this.edgesKeys[mxGraphMlConstants.EDGE_LABELS].key?this.addLabels(m,y,b,n):z&&(this.addEdgeStyle(m,y,b),y=this.addEdgePath(m,z["y:Path"],b,k,f),z["y:EdgeLabel"]&&this.addLabels(m,z["y:EdgeLabel"], +b,n,y),null!=b.shape&&0==b.shape.indexOf("link")&&(b.width=b.strokeWidth,b.strokeWidth=1))}a.ports&&h&&(n=a.ports[h],n.pos&&(b.exitX=n.pos.x,b.exitY=n.pos.y));d.ports&&c&&(n=d.ports[c],n.pos&&(b.entryX=n.pos.x,b.entryY=n.pos.y));m.style=this.styleMap2Str(b);return m}; mxGraphMlCodec.prototype.addEdgeGeo=function(c,n,m,k){if(n=n[mxGraphMlConstants.Y_BEND]){for(var f=[],e=0;e<n.length;e++){var b=n[e][mxGraphMlConstants.LOCATION];b&&(b=b.split(","),f.push(new mxPoint(parseFloat(b[0])-m,parseFloat(b[1])-k)))}c.geometry.points=f}}; mxGraphMlCodec.prototype.addEdgePath=function(c,n,m,k,f){var e=[];if(n){var b=parseFloat(n.sx),a=parseFloat(n.sy),d=parseFloat(n.tx),h=parseFloat(n.ty),p=c.source.geometry;0!=b||0!=a?(m.exitX=(b+p.width/2)/p.width,m.exitY=(a+p.height/2)/p.height,e.push(new mxPoint(p.x+m.exitX*p.width-k,p.y+m.exitY*p.height-f))):e.push(new mxPoint(p.x+p.width/2-k,p.y+p.height/2-f));b=c.target.geometry;0!=d||0!=h?(m.entryX=(d+b.width/2)/b.width,m.entryY=(h+b.height/2)/b.height,m=new mxPoint(b.x+m.entryX*b.width-k,b.y+ m.entryY*b.height-f)):m=new mxPoint(b.x+b.width/2-k,b.y+b.height/2-f);if(n=n["y:Point"]){n instanceof Array||(n=[n]);d=[];for(h=0;h<n.length;h++)b=new mxPoint(parseFloat(n[h].x)-k,parseFloat(n[h].y)-f),d.push(b),e.push(b);c.geometry.points=d}e.push(m)}return e}; @@ -1317,16 +1317,16 @@ mxGraphMlCodec.prototype.addEdgeStyle=function(c,n,m){c=function(a,b){b.dashed=1 "1"},e={defaults:{rounded:0,endArrow:"none"},configuration:{key:"shape",mod:"shape"},"y:LineStyle":{color:{key:"strokeColor",mod:"color"},type:function(a,b){"line"!=a&&(b.dashed=1);var c=null;switch(a){case "dashed":c="3 1";break;case "dotted":c="1 1";break;case "dashed_dotted":c="3 2 1 2"}c&&(b.dashPattern=c)},width:"strokeWidth"},"y:Arrows":{source:function(a,b){b.startArrow=mxGraphMlArrowsMap[a]||"classic";f(a,b)},target:function(a,b){b.endArrow=mxGraphMlArrowsMap[a]||"classic";k(a,b)}},"y:BendStyle":{smoothed:{key:"rounded", mod:"bool"}}},b=mxUtils.clone(e);b.defaults.curved="1";this.mapObject(n,{"yjs:PolylineEdgeStyle":{defaults:{endArrow:"none",rounded:0},smoothingLength:function(a,b){b.rounded=a&&0<parseFloat(a)?"1":"0"},stroke:{key:"strokeColor",mod:"color"},"stroke.yjs:Stroke":{dashStyle:c,"dashStyle.yjs:DashStyle.dashes":c,fill:{key:"strokeColor",mod:"color"},"fill.yjs:SolidColorFill.color":{key:"strokeColor",mod:"color"},"thickness.sys:Double":"strokeWidth",thickness:"strokeWidth"},targetArrow:{key:"endArrow", mod:"arrow"},"targetArrow.yjs:Arrow":{defaults:{endArrow:"classic",endFill:"1",endSize:"6"},fill:k,scale:{key:"endSize",mod:"scale",scale:5},type:{key:"endArrow",mod:"arrow"}},sourceArrow:{key:"startArrow",mod:"arrow"},"sourceArrow.yjs:Arrow":{defaults:{startArrow:"classic",startFill:"1",startSize:"6"},fill:f,scale:{key:"startSize",mod:"scale",scale:5},type:{key:"startArrow",mod:"arrow"}}},"y:PolyLineEdge":e,"y:GenericEdge":e,"y:ArcEdge":b,"y:BezierEdge":b,"y:QuadCurveEdge":b,"y:SplineEdge":b},m)}; -mxGraphMlCodec.prototype.addLabels=function(c,n,m,k,f){m=c.getChildCount();var e=n[mxGraphMlConstants.Y_LABEL]||n;n=[];var b=[],a=[];if(e){e instanceof Array||(e=[e]);for(var d=0;d<e.length;d++){var h=e[d],p={},z=h[mxGraphMlConstants.TEXT]||h;z&&(z=z["#text"]);var y=h[mxGraphMlConstants.LAYOUTPARAMETER]||h||{},x=function(a,b){a&&(a=a.toUpperCase());var c=b.fontStyle||0;switch(a){case "ITALIC":c|=2;break;case "BOLD":c|=1;break;case "UNDERLINE":c|=4}b.fontStyle=c};this.mapObject(h,{"Style.yjs:DefaultLabelStyle":{backgroundFill:{key:"labelBackgroundColor", +mxGraphMlCodec.prototype.addLabels=function(c,n,m,k,f){m=c.getChildCount();var e=n[mxGraphMlConstants.Y_LABEL]||n;n=[];var b=[],a=[];if(e){e instanceof Array||(e=[e]);for(var d=0;d<e.length;d++){var h=e[d],p={},y=h[mxGraphMlConstants.TEXT]||h;y&&(y=y["#text"]);var z=h[mxGraphMlConstants.LAYOUTPARAMETER]||h||{},x=function(a,b){a&&(a=a.toUpperCase());var c=b.fontStyle||0;switch(a){case "ITALIC":c|=2;break;case "BOLD":c|=1;break;case "UNDERLINE":c|=4}b.fontStyle=c};this.mapObject(h,{"Style.yjs:DefaultLabelStyle":{backgroundFill:{key:"labelBackgroundColor", mod:"color"},"backgroundFill.yjs:SolidColorFill.color":{key:"labelBackgroundColor",mod:"color"},backgroundStroke:{key:"labelBorderColor",mod:"color"},"backgroundStroke.yjs:Stroke.fill":{key:"labelBorderColor",mod:"color"},textFill:{key:"fontColor",mod:"color"},"textFill.yjs:SolidColorFill.color":{key:"fontColor",mod:"color"},textSize:"fontSize",horizontalTextAlignment:"align",verticalTextAlignment:"verticalAlign",wrapping:function(a,b){a&&(b.whiteSpace="wrap")},"font.yjs:Font":{fontFamily:"fontFamily", -fontSize:"fontSize",fontStyle:x,fontWeight:x,textDecoration:x}},"Style.y:VoidLabelStyle":function(a,b){b.VoidLbl=!0},alignment:"align",fontFamily:"fontFamily",fontSize:"fontSize",fontStyle:x,underlinedText:function(a,b){var c=b.fontStyle||0;"true"==a&&(c|=4);b.fontStyle=c},horizontalTextPosition:"",textColor:{key:"fontColor",mod:"color"},verticalTextPosition:"verticalAlign",hasText:{key:"hasText",mod:"bool"},rotationAngle:"rotation"},p);p.VoidLbl||"0"==p.hasText||(n.push(z),b.push(p),a.push(y))}}for(d= -0;d<n.length;d++)if(n[d]&&(!a[d]||!a[d]["bpmn:ParticipantParameter"])){n[d]=mxUtils.htmlEntities(n[d],!1).replace(/\n/g,"<br/>");y=c.geometry;p=new mxCell(n[d],new mxGeometry(0,0,y.width,y.height),"text;html=1;spacing=0;"+this.styleMap2Str(b[d]));p.vertex=!0;c.insert(p,m);e=p.geometry;if(a[d]["y:RatioAnchoredLabelModelParameter"])y=mxUtils.getSizeForString(n[d],b[d].fontSize,b[d].fontFamily),(h=a[d]["y:RatioAnchoredLabelModelParameter"].LayoutOffset)?(h=h.split(","),e.x=parseFloat(h[0]),e.y=parseFloat(h[1]), -e.width=y.width,e.height=y.height,p.style+=";spacingTop=-4;"):p.style+=";align=center;";else if(a[d]["y:InteriorLabelModel"]){switch(a[d]["y:InteriorLabelModel"]){case "Center":p.style+=";verticalAlign=middle;";break;case "North":e.height=1;break;case "West":e.width=y.height,e.height=y.width,e.y=y.height/2-y.width/2,e.x=-e.y,p.style+=";rotation=-90"}p.style+=";align=center;"}else if(a[d]["y:StretchStripeLabelModel"]||a[d]["y:StripeLabelModelParameter"])switch(a[d]["y:StretchStripeLabelModel"]||a[d]["y:StripeLabelModelParameter"].Position){case "North":e.height= -1;break;case "West":e.width=y.height,e.height=y.width,e.y=y.height/2-y.width/2,e.x=-e.y,p.style+=";rotation=-90;"}else if(a[d]["bpmn:PoolHeaderLabelModel"]){switch(a[d]["bpmn:PoolHeaderLabelModel"]){case "NORTH":e.height=1;break;case "WEST":e.width=y.height,e.height=y.width,e.y=y.height/2-y.width/2,e.x=-e.y,p.style+=";rotation=-90;"}p.style+=";align=center;"}else if(a[d]["y:InteriorStretchLabelModelParameter"])p.style+=";align=center;";else if(a[d]["y:ExteriorLabelModel"])switch(a[d]["y:ExteriorLabelModel"]){case "East":p.style+= -";labelPosition=right;verticalLabelPosition=middle;align=left;verticalAlign=middle;";break;case "South":p.style+=";labelPosition=center;verticalLabelPosition=bottom;align=center;verticalAlign=top;";break;case "North":p.style+=";labelPosition=center;verticalLabelPosition=top;align=center;verticalAlign=bottom;";break;case "West":p.style+=";labelPosition=left;verticalLabelPosition=middle;align=right;verticalAlign=middle;"}else if(a[d]["y:FreeEdgeLabelModelParameter"]){e.relative=!0;e.adjustIt=!0;var y= -a[d]["y:FreeEdgeLabelModelParameter"],h=y.Ratio,x=y.Distance,C=y.Angle;h&&(e.x=parseFloat(h));x&&(e.y=parseFloat(x));C&&(p.style+=";rotation="+parseFloat(C)*(180/Math.PI));p.style+=";verticalAlign=middle;"}else if(a[d]["y:EdgePathLabelModelParameter"]){e.relative=!0;y=a[d]["y:EdgePathLabelModelParameter"];z=y.SideOfEdge;h=y.SegmentRatio;e.x=h?2*parseFloat(h)-1:0;if(z)switch(z){case "RightOfEdge":e.y=-15;break;case "LeftOfEdge":e.y=15}p.style+=";verticalAlign=middle;"}else if(y=parseFloat(a[d].x), -h=parseFloat(a[d].y),a[d].width&&(e.width=parseFloat(a[d].width)),a[d].height&&(e.height=parseFloat(a[d].height)),c.edge)if(e.relative=!0,e.x=0,e.y=0,p=c.source.geometry.getCenterX()-c.target.geometry.getCenterX(),z=c.source.geometry.getCenterY()-c.target.geometry.getCenterY(),k&&f&&a[d]["y:ModelParameter"]&&a[d]["y:ModelParameter"]["y:SmartEdgeLabelModelParameter"]){var y=a[d]["y:ModelParameter"]["y:SmartEdgeLabelModelParameter"],C=parseFloat(y.angle),x=parseFloat(y.distance),F=y.position,h=parseFloat(y.ratio), -y=parseFloat(y.segment),A=new mxCellState;A.absolutePoints=f;k.view.updateEdgeBounds(A);var B="left"==F?1:-1;if(-1==y&&6.283185307179586==C)e.offset=new mxPoint(1>Math.abs(h)?A.segments[0]*h:h,B*x);else{-1==y&&(y=0);for(var G=C=0;G<y;G++)C+=A.segments[G];C+=A.segments[y]*h;e.x=C/A.length*2-1;e.y=(("center"==F?0:x)+e.height/2*B*(Math.abs(p)>Math.abs(z)?1:-1))*B}}else isNaN(y)||isNaN(h)||(e.offset=new mxPoint(y+p/2+(0<p?-e.width:e.width),h));else e.x=y||0,e.y=h||0;b[d].rotation&&270==b[d].rotation&& +fontSize:"fontSize",fontStyle:x,fontWeight:x,textDecoration:x}},"Style.y:VoidLabelStyle":function(a,b){b.VoidLbl=!0},alignment:"align",fontFamily:"fontFamily",fontSize:"fontSize",fontStyle:x,underlinedText:function(a,b){var c=b.fontStyle||0;"true"==a&&(c|=4);b.fontStyle=c},horizontalTextPosition:"",textColor:{key:"fontColor",mod:"color"},verticalTextPosition:"verticalAlign",hasText:{key:"hasText",mod:"bool"},rotationAngle:"rotation"},p);p.VoidLbl||"0"==p.hasText||(n.push(y),b.push(p),a.push(z))}}for(d= +0;d<n.length;d++)if(n[d]&&(!a[d]||!a[d]["bpmn:ParticipantParameter"])){n[d]=mxUtils.htmlEntities(n[d],!1).replace(/\n/g,"<br/>");z=c.geometry;p=new mxCell(n[d],new mxGeometry(0,0,z.width,z.height),"text;html=1;spacing=0;"+this.styleMap2Str(b[d]));p.vertex=!0;c.insert(p,m);e=p.geometry;if(a[d]["y:RatioAnchoredLabelModelParameter"])z=mxUtils.getSizeForString(n[d],b[d].fontSize,b[d].fontFamily),(h=a[d]["y:RatioAnchoredLabelModelParameter"].LayoutOffset)?(h=h.split(","),e.x=parseFloat(h[0]),e.y=parseFloat(h[1]), +e.width=z.width,e.height=z.height,p.style+=";spacingTop=-4;"):p.style+=";align=center;";else if(a[d]["y:InteriorLabelModel"]){switch(a[d]["y:InteriorLabelModel"]){case "Center":p.style+=";verticalAlign=middle;";break;case "North":e.height=1;break;case "West":e.width=z.height,e.height=z.width,e.y=z.height/2-z.width/2,e.x=-e.y,p.style+=";rotation=-90"}p.style+=";align=center;"}else if(a[d]["y:StretchStripeLabelModel"]||a[d]["y:StripeLabelModelParameter"])switch(a[d]["y:StretchStripeLabelModel"]||a[d]["y:StripeLabelModelParameter"].Position){case "North":e.height= +1;break;case "West":e.width=z.height,e.height=z.width,e.y=z.height/2-z.width/2,e.x=-e.y,p.style+=";rotation=-90;"}else if(a[d]["bpmn:PoolHeaderLabelModel"]){switch(a[d]["bpmn:PoolHeaderLabelModel"]){case "NORTH":e.height=1;break;case "WEST":e.width=z.height,e.height=z.width,e.y=z.height/2-z.width/2,e.x=-e.y,p.style+=";rotation=-90;"}p.style+=";align=center;"}else if(a[d]["y:InteriorStretchLabelModelParameter"])p.style+=";align=center;";else if(a[d]["y:ExteriorLabelModel"])switch(a[d]["y:ExteriorLabelModel"]){case "East":p.style+= +";labelPosition=right;verticalLabelPosition=middle;align=left;verticalAlign=middle;";break;case "South":p.style+=";labelPosition=center;verticalLabelPosition=bottom;align=center;verticalAlign=top;";break;case "North":p.style+=";labelPosition=center;verticalLabelPosition=top;align=center;verticalAlign=bottom;";break;case "West":p.style+=";labelPosition=left;verticalLabelPosition=middle;align=right;verticalAlign=middle;"}else if(a[d]["y:FreeEdgeLabelModelParameter"]){e.relative=!0;e.adjustIt=!0;var z= +a[d]["y:FreeEdgeLabelModelParameter"],h=z.Ratio,x=z.Distance,C=z.Angle;h&&(e.x=parseFloat(h));x&&(e.y=parseFloat(x));C&&(p.style+=";rotation="+parseFloat(C)*(180/Math.PI));p.style+=";verticalAlign=middle;"}else if(a[d]["y:EdgePathLabelModelParameter"]){e.relative=!0;z=a[d]["y:EdgePathLabelModelParameter"];y=z.SideOfEdge;h=z.SegmentRatio;e.x=h?2*parseFloat(h)-1:0;if(y)switch(y){case "RightOfEdge":e.y=-15;break;case "LeftOfEdge":e.y=15}p.style+=";verticalAlign=middle;"}else if(z=parseFloat(a[d].x), +h=parseFloat(a[d].y),a[d].width&&(e.width=parseFloat(a[d].width)),a[d].height&&(e.height=parseFloat(a[d].height)),c.edge)if(e.relative=!0,e.x=0,e.y=0,p=c.source.geometry.getCenterX()-c.target.geometry.getCenterX(),y=c.source.geometry.getCenterY()-c.target.geometry.getCenterY(),k&&f&&a[d]["y:ModelParameter"]&&a[d]["y:ModelParameter"]["y:SmartEdgeLabelModelParameter"]){var z=a[d]["y:ModelParameter"]["y:SmartEdgeLabelModelParameter"],C=parseFloat(z.angle),x=parseFloat(z.distance),F=z.position,h=parseFloat(z.ratio), +z=parseFloat(z.segment),A=new mxCellState;A.absolutePoints=f;k.view.updateEdgeBounds(A);var B="left"==F?1:-1;if(-1==z&&6.283185307179586==C)e.offset=new mxPoint(1>Math.abs(h)?A.segments[0]*h:h,B*x);else{-1==z&&(z=0);for(var G=C=0;G<z;G++)C+=A.segments[G];C+=A.segments[z]*h;e.x=C/A.length*2-1;e.y=(("center"==F?0:x)+e.height/2*B*(Math.abs(p)>Math.abs(y)?1:-1))*B}}else isNaN(z)||isNaN(h)||(e.offset=new mxPoint(z+p/2+(0<p?-e.width:e.width),h));else e.x=z||0,e.y=h||0;b[d].rotation&&270==b[d].rotation&& (e.x-=e.height/2)}return{lblTxts:n,lblStyles:b}};mxGraphMlCodec.prototype.processPage=function(c,n){var m=(new mxCodec).encode(c.getModel());m.setAttribute("style","default-style2");m=mxUtils.getXml(m);m='<diagram name="Page '+n+'">'+Graph.compress(m);return m+"</diagram>"};mxGraphMlCodec.prototype.getDirectChildNamedElements=function(c,n){for(var m=[],k=c.firstChild;null!=k;k=k.nextSibling)null!=k&&1==k.nodeType&&n==k.nodeName&&0<m.push(k);return m}; mxGraphMlCodec.prototype.getDirectFirstChildNamedElements=function(c,n){for(var m=c.firstChild;null!=m;m=m.nextSibling)if(null!=m&&1==m.nodeType&&n==m.nodeName)return m;return null};mxGraphMlCodec.prototype.getDirectChildElements=function(c){var n=[];for(c=c.firstChild;null!=c;c=c.nextSibling)null!=c&&1==c.nodeType&&0<n.push(c);return n};mxGraphMlCodec.prototype.getDirectFirstChildElement=function(c){for(c=c.firstChild;null!=c;c=c.nextSibling)if(null!=c&&1==c.nodeType)return c;return null}; var mxGraphMlConverters={"orgchartconverters.linebreakconverter":function(c,n){if("string"===typeof c){for(var m=c;20<m.length&&-1<m.indexOf(" ");)m=m.substring(0,m.lastIndexOf(" "));return"true"===n?m:c.substring(m.length)}return""},"orgchartconverters.borderconverter":function(c,n){return"boolean"===typeof c?c?"#FFBB33":"rgba(0,0,0,0)":"#FFF"},"orgchartconverters.addhashconverter":function(c,n){return"string"===typeof c?"string"===typeof n?"#"+c+n:"#"+c:c},"orgchartconverters.intermediateconverter":function(c, diff --git a/src/main/webapp/js/mxgraph/Actions.js b/src/main/webapp/js/mxgraph/Actions.js index 0c8930a14..edff7a72a 100644 --- a/src/main/webapp/js/mxgraph/Actions.js +++ b/src/main/webapp/js/mxgraph/Actions.js @@ -65,7 +65,7 @@ Actions.prototype.init = function() }).isEnabled = isGraphEnabled; this.addAction('save', function() { ui.saveFile(false); }, null, null, Editor.ctrlKey + '+S').isEnabled = isGraphEnabled; this.addAction('saveAs...', function() { ui.saveFile(true); }, null, null, Editor.ctrlKey + '+Shift+S').isEnabled = isGraphEnabled; - this.addAction('export...', function() { ui.showDialog(new ExportDialog(ui).container, 300, 230, true, true); }); + this.addAction('export...', function() { ui.showDialog(new ExportDialog(ui).container, 300, 260, true, true); }); this.addAction('editDiagram...', function() { var dlg = new EditDiagramDialog(ui); diff --git a/src/main/webapp/js/mxgraph/Dialogs.js b/src/main/webapp/js/mxgraph/Dialogs.js index 5fdc583f3..42ffba7fe 100644 --- a/src/main/webapp/js/mxgraph/Dialogs.js +++ b/src/main/webapp/js/mxgraph/Dialogs.js @@ -488,6 +488,7 @@ var FilenameDialog = function(editorUi, filename, buttonText, fn, label, validat }; td = document.createElement('td'); + td.style.whiteSpace = 'nowrap'; td.appendChild(nameInput); row.appendChild(td); @@ -1077,6 +1078,97 @@ var ExportDialog = function(editorUi) row = document.createElement('tr'); + td = document.createElement('td'); + td.style.fontSize = '10pt'; + mxUtils.write(td, mxResources.get('dpi', null, 'DPI') + ':'); + + row.appendChild(td); + + var dpiSelect = document.createElement('select'); + dpiSelect.style.width = '180px'; + + var dpi100Option = document.createElement('option'); + dpi100Option.setAttribute('value', '100'); + mxUtils.write(dpi100Option, '100dpi'); + dpiSelect.appendChild(dpi100Option); + + var dpi200Option = document.createElement('option'); + dpi200Option.setAttribute('value', '200'); + mxUtils.write(dpi200Option, '200dpi'); + dpiSelect.appendChild(dpi200Option); + + var dpi300Option = document.createElement('option'); + dpi300Option.setAttribute('value', '300'); + mxUtils.write(dpi300Option, '300dpi'); + dpiSelect.appendChild(dpi300Option); + + var dpi400Option = document.createElement('option'); + dpi400Option.setAttribute('value', '400'); + mxUtils.write(dpi400Option, '400dpi'); + dpiSelect.appendChild(dpi400Option); + + var dpiCustOption = document.createElement('option'); + dpiCustOption.setAttribute('value', 'custom'); + mxUtils.write(dpiCustOption, mxResources.get('custom')); + dpiSelect.appendChild(dpiCustOption); + + var customDpi = document.createElement('input'); + customDpi.style.width = '180px'; + customDpi.style.display = 'none'; + customDpi.setAttribute('value', '100'); + customDpi.setAttribute('type', 'number'); + customDpi.setAttribute('min', '50'); + customDpi.setAttribute('step', '50'); + + var zoomUserChanged = false; + + mxEvent.addListener(dpiSelect, 'change', function() + { + if (this.value == 'custom') + { + this.style.display = 'none'; + customDpi.style.display = ''; + customDpi.focus(); + } + else + { + customDpi.value = this.value; + + if (!zoomUserChanged) + { + zoomInput.value = this.value; + } + } + }); + + mxEvent.addListener(customDpi, 'change', function() + { + var dpi = parseInt(customDpi.value); + + if (isNaN(dpi) || dpi <= 0) + { + customDpi.style.backgroundColor = 'red'; + } + else + { + customDpi.style.backgroundColor = ''; + + if (!zoomUserChanged) + { + zoomInput.value = dpi; + } + } + }); + + td = document.createElement('td'); + td.appendChild(dpiSelect); + td.appendChild(customDpi); + row.appendChild(td); + + tbody.appendChild(row); + + row = document.createElement('tr'); + td = document.createElement('td'); td.style.fontSize = '10pt'; mxUtils.write(td, mxResources.get('background') + ':'); @@ -1153,6 +1245,17 @@ var ExportDialog = function(editorUi) { transparentCheckbox.setAttribute('disabled', 'disabled'); } + + if (imageFormatSelect.value === 'png') + { + dpiSelect.removeAttribute('disabled'); + customDpi.removeAttribute('disabled'); + } + else + { + dpiSelect.setAttribute('disabled', 'disabled'); + customDpi.setAttribute('disabled', 'disabled'); + } }; mxEvent.addListener(imageFormatSelect, 'change', formatChanged); @@ -1181,6 +1284,7 @@ var ExportDialog = function(editorUi) mxEvent.addListener(zoomInput, 'change', function() { + zoomUserChanged = true; var s = Math.max(0, parseFloat(zoomInput.value) || 100) / 100; zoomInput.value = parseFloat((s * 100).toFixed(2)); @@ -1256,6 +1360,7 @@ var ExportDialog = function(editorUi) var s = Math.max(0, parseFloat(zoomInput.value) || 100) / 100; var b = Math.max(0, parseInt(borderInput.value)); var bg = graph.background; + var dpi = Math.max(1, parseInt(customDpi.value)); if ((format == 'svg' || format == 'png') && transparentCheckbox.checked) { @@ -1267,7 +1372,7 @@ var ExportDialog = function(editorUi) } ExportDialog.lastBorderValue = b; - ExportDialog.exportFile(editorUi, name, format, bg, s, b); + ExportDialog.exportFile(editorUi, name, format, bg, s, b, dpi); } })); saveBtn.className = 'geBtn gePrimaryBtn'; @@ -1316,7 +1421,7 @@ ExportDialog.showXmlOption = true; * parameter and value to be used in the request in the form * key=value, where value should be URL encoded. */ -ExportDialog.exportFile = function(editorUi, name, format, bg, s, b) +ExportDialog.exportFile = function(editorUi, name, format, bg, s, b, dpi) { var graph = editorUi.editor.graph; @@ -1358,7 +1463,8 @@ ExportDialog.exportFile = function(editorUi, name, format, bg, s, b) var req = new mxXmlRequest(EXPORT_URL, 'format=' + format + '&filename=' + encodeURIComponent(name) + '&bg=' + ((bg != null) ? bg : 'none') + - '&w=' + w + '&h=' + h + '&' + param); + '&w=' + w + '&h=' + h + '&' + param + + '&dpi=' + dpi); req.simulate(document, '_blank'); } else diff --git a/src/main/webapp/js/mxgraph/Editor.js b/src/main/webapp/js/mxgraph/Editor.js index ad3c05a38..9d6910f4c 100644 --- a/src/main/webapp/js/mxgraph/Editor.js +++ b/src/main/webapp/js/mxgraph/Editor.js @@ -1429,6 +1429,27 @@ var PageSetupDialog = function(editorUi) row.appendChild(td); tbody.appendChild(row); + if (urlParams['ruler'] == '1') + { + row = document.createElement('tr'); + + td = document.createElement('td'); + td.style.verticalAlign = 'top'; + td.style.fontSize = '10pt'; + mxUtils.write(td, mxResources.get('unit', null, 'Unit') + ':'); + + row.appendChild(td); + + td = document.createElement('td'); + td.style.verticalAlign = 'top'; + td.style.fontSize = '10pt'; + + var unitSelect = PageSetupDialog.addUnitPanel(td, graph.view.unit); + + row.appendChild(td); + tbody.appendChild(row); + } + row = document.createElement('tr'); td = document.createElement('td'); @@ -1589,6 +1610,11 @@ var PageSetupDialog = function(editorUi) { graph.model.execute(change); } + + if (unitSelect != null) + { + graph.view.setUnit(parseInt(unitSelect.value)); + } }); applyBtn.className = 'geBtn gePrimaryBtn'; td.appendChild(applyBtn); @@ -1899,6 +1925,46 @@ PageSetupDialog.getFormats = function() {key: 'custom', title: mxResources.get('custom'), format: null}]; }; +PageSetupDialog.addUnitPanel = function(div, unit, unitListener) +{ + var unitSelect = document.createElement('select'); + unitSelect.style.marginBottom = '8px'; + unitSelect.style.width = '202px'; + + var units = PageSetupDialog.getUnits(); + + for (var i = 0; i < units.length; i++) + { + var u = units[i]; + + var unitOption = document.createElement('option'); + unitOption.setAttribute('value', u.unit); + mxUtils.write(unitOption, mxResources.get(u.key, null, u.title)); + unitSelect.appendChild(unitOption); + } + + div.appendChild(unitSelect); + + unitSelect.value = unit; + + if (unitListener != null) + { + mxEvent.addListener(unitSelect, 'change', function(evt) + { + unitListener(parseInt(unitSelect.value)); + }); + } + + return unitSelect; +}; + +PageSetupDialog.getUnits = function() +{ + return [{key: 'pixel', title: 'Pixel', unit: mxConstants.PIXELS}, + {key: 'inch', title: 'Inch', unit: mxConstants.INCHES}, + {key: 'cm', title: 'CM', unit: mxConstants.CENTIMETERS}]; +}; + /** * Static overrides */ diff --git a/src/main/webapp/js/mxgraph/Format.js b/src/main/webapp/js/mxgraph/Format.js index 6e93c47d7..83c7280df 100644 --- a/src/main/webapp/js/mxgraph/Format.js +++ b/src/main/webapp/js/mxgraph/Format.js @@ -725,7 +725,7 @@ BaseFormatPanel.prototype.createTitle = function(title) /** * */ -BaseFormatPanel.prototype.createStepper = function(input, update, step, height, disableFocus, defaultValue) +BaseFormatPanel.prototype.createStepper = function(input, update, step, height, disableFocus, defaultValue, isFloat) { step = (step != null) ? step : 1; height = (height != null) ? height : 8; @@ -765,7 +765,7 @@ BaseFormatPanel.prototype.createStepper = function(input, update, step, height, input.value = defaultValue || '2'; } - var val = parseInt(input.value); + var val = isFloat? parseFloat(input.value) : parseInt(input.value); if (!isNaN(val)) { @@ -787,7 +787,7 @@ BaseFormatPanel.prototype.createStepper = function(input, update, step, height, input.value = defaultValue || '0'; } - var val = parseInt(input.value); + var val = isFloat? parseFloat(input.value) : parseInt(input.value); if (!isNaN(val)) { @@ -1264,7 +1264,7 @@ BaseFormatPanel.prototype.addArrow = function(elt, height) /** * */ -BaseFormatPanel.prototype.addUnitInput = function(container, unit, right, width, update, step, marginTop, disableFocus) +BaseFormatPanel.prototype.addUnitInput = function(container, unit, right, width, update, step, marginTop, disableFocus, isFloat) { marginTop = (marginTop != null) ? marginTop : 0; @@ -1276,7 +1276,7 @@ BaseFormatPanel.prototype.addUnitInput = function(container, unit, right, width, input.style.width = width + 'px'; container.appendChild(input); - var stepper = this.createStepper(input, update, step, null, disableFocus); + var stepper = this.createStepper(input, update, step, null, disableFocus, null, isFloat); stepper.style.marginTop = (marginTop - 2) + 'px'; stepper.style.right = right + 'px'; container.appendChild(stepper); @@ -1909,11 +1909,67 @@ ArrangePanel.prototype.addAngle = function(div) return div; }; +ArrangePanel.prototype.getUnit = function() +{ + var unit = this.editorUi.editor.graph.view.unit; + + switch(unit) + { + case mxConstants.PIXELS: + return 'pt'; + case mxConstants.INCHES: + return '"'; + case mxConstants.CENTIMETERS: + return 'cm'; + } +}; + +ArrangePanel.prototype.inUnit = function(pixels) +{ + return this.editorUi.editor.graph.view.formatUnitText(pixels); +}; + +ArrangePanel.prototype.fromUnit = function(value) +{ + var unit = this.editorUi.editor.graph.view.unit; + + switch(unit) + { + case mxConstants.PIXELS: + return value; + case mxConstants.INCHES: + return value * mxConstants.PIXELS_PER_INCH; + case mxConstants.CENTIMETERS: + return value * mxConstants.PIXELS_PER_CM; + } +}; + +ArrangePanel.prototype.isFloatUnit = function() +{ + return this.editorUi.editor.graph.view.unit != mxConstants.PIXELS; +}; + +ArrangePanel.prototype.getUnitStep = function() +{ + var unit = this.editorUi.editor.graph.view.unit; + + switch(unit) + { + case mxConstants.PIXELS: + return 1; + case mxConstants.INCHES: + return 0.1; + case mxConstants.CENTIMETERS: + return 0.1; + } +}; + /** * */ ArrangePanel.prototype.addGeometry = function(container) { + var panel = this; var ui = this.editorUi; var graph = ui.editor.graph; var rect = this.format.getSelectionState(); @@ -1930,14 +1986,14 @@ ArrangePanel.prototype.addGeometry = function(container) div.appendChild(span); var widthUpdate, heightUpdate, leftUpdate, topUpdate; - var width = this.addUnitInput(div, 'pt', 84, 44, function() + var width = this.addUnitInput(div, this.getUnit(), 84, 44, function() { widthUpdate.apply(this, arguments); - }); - var height = this.addUnitInput(div, 'pt', 20, 44, function() + }, this.getUnitStep(), null, null, this.isFloatUnit()); + var height = this.addUnitInput(div, this.getUnit(), 20, 44, function() { heightUpdate.apply(this, arguments); - }); + }, this.getUnitStep(), null, null, this.isFloatUnit()); var autosizeBtn = document.createElement('div'); autosizeBtn.className = 'geSprite geSprite-fit'; @@ -1988,7 +2044,7 @@ ArrangePanel.prototype.addGeometry = function(container) { if (geo.width > 0) { - var value = Math.max(1, value); + var value = Math.max(1, panel.fromUnit(value)); if (constrainCheckbox.checked) { @@ -2002,7 +2058,7 @@ ArrangePanel.prototype.addGeometry = function(container) { if (geo.height > 0) { - var value = Math.max(1, value); + var value = Math.max(1, panel.fromUnit(value)); if (constrainCheckbox.checked) { @@ -2026,14 +2082,14 @@ ArrangePanel.prototype.addGeometry = function(container) mxUtils.write(span, mxResources.get('position')); div2.appendChild(span); - var left = this.addUnitInput(div2, 'pt', 84, 44, function() + var left = this.addUnitInput(div2, this.getUnit(), 84, 44, function() { leftUpdate.apply(this, arguments); - }); - var top = this.addUnitInput(div2, 'pt', 20, 44, function() + }, this.getUnitStep(), null, null, this.isFloatUnit()); + var top = this.addUnitInput(div2, this.getUnit(), 20, 44, function() { topUpdate.apply(this, arguments); - }); + }, this.getUnitStep(), null, null, this.isFloatUnit()); mxUtils.br(div2); this.addLabel(div2, mxResources.get('left'), 84); @@ -2050,12 +2106,12 @@ ArrangePanel.prototype.addGeometry = function(container) if (force || document.activeElement != width) { - width.value = rect.width + ((rect.width == '') ? '' : ' pt'); + width.value = this.inUnit(rect.width) + ((rect.width == '') ? '' : ' ' + this.getUnit()); } if (force || document.activeElement != height) { - height.value = rect.height + ((rect.height == '') ? '' : ' pt'); + height.value = this.inUnit(rect.height) + ((rect.height == '') ? '' : ' ' + this.getUnit()); } } else @@ -2070,12 +2126,12 @@ ArrangePanel.prototype.addGeometry = function(container) if (force || document.activeElement != left) { - left.value = rect.x + ((rect.x == '') ? '' : ' pt'); + left.value = this.inUnit(rect.x) + ((rect.x == '') ? '' : ' ' + this.getUnit()); } if (force || document.activeElement != top) { - top.value = rect.y + ((rect.y == '') ? '' : ' pt'); + top.value = this.inUnit(rect.y) + ((rect.y == '') ? '' : ' ' + this.getUnit()); } } else @@ -2093,6 +2149,8 @@ ArrangePanel.prototype.addGeometry = function(container) leftUpdate = this.addGeometryHandler(left, function(geo, value) { + value = panel.fromUnit(value); + if (geo.relative) { geo.offset.x = value; @@ -2104,6 +2162,8 @@ ArrangePanel.prototype.addGeometry = function(container) }); topUpdate = this.addGeometryHandler(top, function(geo, value) { + value = panel.fromUnit(value); + if (geo.relative) { geo.offset.y = value; @@ -2125,6 +2185,7 @@ ArrangePanel.prototype.addGeometryHandler = function(input, fn) var ui = this.editorUi; var graph = ui.editor.graph; var initialValue = null; + var panel = this; function update(evt) { @@ -2134,7 +2195,7 @@ ArrangePanel.prototype.addGeometryHandler = function(input, fn) if (isNaN(value)) { - input.value = initialValue + ' pt'; + input.value = initialValue + ' ' + panel.getUnit(); } else if (value != initialValue) { @@ -2165,7 +2226,7 @@ ArrangePanel.prototype.addGeometryHandler = function(input, fn) } initialValue = value; - input.value = value + ' pt'; + input.value = value + ' ' + panel.getUnit(); } } @@ -2633,6 +2694,7 @@ TextFormatPanel.prototype.addFont = function(container) { document.execCommand('superscript', false, null); }, stylePanel3)]); + sub.style.marginLeft = '9px'; var tmp = stylePanel3.cloneNode(false); tmp.style.paddingTop = '4px'; @@ -3789,29 +3851,34 @@ TextFormatPanel.prototype.addFont = function(container) setSelected(fontStyleItems[1], css.fontStyle == 'italic' || hasParentOrOnlyChild('I') || hasParentOrOnlyChild('EM')); setSelected(fontStyleItems[2], hasParentOrOnlyChild('U')); - setSelected(full, isEqualOrPrefixed(css.textAlign, 'justify')); setSelected(sup, hasParentOrOnlyChild('SUP')); setSelected(sub, hasParentOrOnlyChild('SUB')); if (!graph.cellEditor.isTableSelected()) { var align = graph.cellEditor.align || mxUtils.getValue(ss.style, mxConstants.STYLE_ALIGN, mxConstants.ALIGN_CENTER); - setSelected(left, align == mxConstants.ALIGN_LEFT); - setSelected(center, align == mxConstants.ALIGN_CENTER); - setSelected(right, align == mxConstants.ALIGN_RIGHT); - - setSelected(full, false); - full.style.opacity = 0.2; - full.style.cursor = 'default'; + + if (isEqualOrPrefixed(css.textAlign, 'justify')) + { + setSelected(full, isEqualOrPrefixed(css.textAlign, 'justify')); + setSelected(left, false); + setSelected(center, false); + setSelected(right, false); + } + else + { + setSelected(full, false); + setSelected(left, align == mxConstants.ALIGN_LEFT); + setSelected(center, align == mxConstants.ALIGN_CENTER); + setSelected(right, align == mxConstants.ALIGN_RIGHT); + } } else { + setSelected(full, isEqualOrPrefixed(css.textAlign, 'justify')); setSelected(left, isEqualOrPrefixed(css.textAlign, 'left')); setSelected(center, isEqualOrPrefixed(css.textAlign, 'center')); setSelected(right, isEqualOrPrefixed(css.textAlign, 'right')); - - full.style.opacity = 1; - full.style.cursor = ''; } currentTable = graph.getParentByName(node, 'TABLE', graph.cellEditor.textarea); @@ -5644,6 +5711,24 @@ DiagramFormatPanel.prototype.addPaperSize = function(div) graph.getModel().addListener(mxEvent.CHANGE, listener); this.listeners.push({destroy: function() { graph.getModel().removeListener(listener); }}); + if (urlParams['ruler'] == '1') + { + div.appendChild(this.createTitle(mxResources.get('unit', null, 'Unit'))); + + var unitSelect = PageSetupDialog.addUnitPanel(div, graph.view.unit, function(unit) + { + graph.view.setUnit(unit); + }); + + var unitChangeListener = function(sender, evt) + { + unitSelect.value = evt.getProperty('unit'); + }; + + graph.view.addListener('unitChanged', unitChangeListener); + this.listeners.push({destroy: function() { graph.view.removeListener(unitChangeListener); }}); + } + return div; }; diff --git a/src/main/webapp/js/mxgraph/Graph.js b/src/main/webapp/js/mxgraph/Graph.js index 1bf77f6c6..e81f08b8c 100644 --- a/src/main/webapp/js/mxgraph/Graph.js +++ b/src/main/webapp/js/mxgraph/Graph.js @@ -95,6 +95,19 @@ mxGraphView.prototype.minGridSize = 4; // UrlParams is null in embed mode mxGraphView.prototype.gridColor = '#e0e0e0'; +//Units +mxGraphView.prototype.unit = mxConstants.PIXELS; + +mxGraphView.prototype.setUnit = function(unit) +{ + if (this.unit != unit) + { + this.unit = unit; + + this.fireEvent(new mxEventObject('unitChanged', 'unit', unit)); + } +}; + // Alternative text for unsupported foreignObjects mxSvgCanvas2D.prototype.foAltText = '[Not supported by viewer]'; @@ -3928,7 +3941,8 @@ HoverIcons.prototype.getState = function(state) */ HoverIcons.prototype.update = function(state, x, y) { - if (!this.graph.connectionArrowsEnabled) + if (!this.graph.connectionArrowsEnabled || (state != null && + mxUtils.getValue(state.style, 'allowArrows', '1') == '0')) { this.reset(); } @@ -7714,6 +7728,28 @@ if (typeof mxVertexHandler != 'undefined') return hint; }; + /** + * Format pixels in the given unit + */ + function formatHintText(pixels, unit) + { + switch(unit) + { + case mxConstants.PIXELS: + return pixels; + case mxConstants.CENTIMETERS: + return (pixels / mxConstants.PIXELS_PER_CM).toFixed(2); + case mxConstants.INCHES: + return (pixels / mxConstants.PIXELS_PER_INCH).toFixed(2); + } + }; + + + mxGraphView.prototype.formatUnitText = function(pixels) + { + return pixels? formatHintText(pixels, this.unit) : pixels; + }; + /** * Updates the hint for the current operation. */ @@ -7731,8 +7767,9 @@ if (typeof mxVertexHandler != 'undefined') var s = this.graph.view.scale; var x = this.roundLength((this.bounds.x + this.currentDx) / s - t.x); var y = this.roundLength((this.bounds.y + this.currentDy) / s - t.y); + var unit = this.graph.view.unit; - this.hint.innerHTML = x + ', ' + y; + this.hint.innerHTML = formatHintText(x, unit) + ', ' + formatHintText(y, unit); this.hint.style.left = (this.shape.bounds.x + Math.round((this.shape.bounds.width - this.hint.clientWidth) / 2)) + 'px'; this.hint.style.top = (this.shape.bounds.y + this.shape.bounds.height + 12) + 'px'; @@ -7817,7 +7854,9 @@ if (typeof mxVertexHandler != 'undefined') else { var s = this.state.view.scale; - this.hint.innerHTML = this.roundLength(this.bounds.width / s) + ' x ' + this.roundLength(this.bounds.height / s); + var unit = this.state.view.unit; + this.hint.innerHTML = formatHintText(this.roundLength(this.bounds.width / s), unit) + ' x ' + + formatHintText(this.roundLength(this.bounds.height / s), unit); } var rot = (this.currentAlpha != null) ? this.currentAlpha : this.state.style[mxConstants.STYLE_ROTATION] || '0'; @@ -7866,8 +7905,9 @@ if (typeof mxVertexHandler != 'undefined') var s = this.graph.view.scale; var x = this.roundLength(point.x / s - t.x); var y = this.roundLength(point.y / s - t.y); + var unit = this.graph.view.unit; - this.hint.innerHTML = x + ', ' + y; + this.hint.innerHTML = formatHintText(x, unit) + ', ' + formatHintText(y, unit); this.hint.style.visibility = 'visible'; if (this.isSource || this.isTarget) diff --git a/src/main/webapp/js/mxgraph/Shapes.js b/src/main/webapp/js/mxgraph/Shapes.js index d73f65070..0e76130c1 100644 --- a/src/main/webapp/js/mxgraph/Shapes.js +++ b/src/main/webapp/js/mxgraph/Shapes.js @@ -2801,6 +2801,26 @@ }; }); + // Registers and defines the custom marker + mxMarker.addMarker('halfCircle', function(c, shape, type, pe, unitX, unitY, size, source, sw, filled) + { + var nx = unitX * (size + sw + 1); + var ny = unitY * (size + sw + 1); + var pt = pe.clone(); + + pe.x -= nx; + pe.y -= ny; + + return function() + { + c.begin(); + c.moveTo(pt.x - ny, pt.y + nx); + c.quadTo(pe.x - ny, pe.y + nx, pe.x, pe.y); + c.quadTo(pe.x + ny, pe.y - nx, pt.x + ny, pt.y - nx); + c.stroke(); + }; + }); + mxMarker.addMarker('async', function(c, shape, type, pe, unitX, unitY, size, source, sw, filled) { // The angle of the forward facing arrow sides against the x axis is diff --git a/src/main/webapp/js/mxgraph/Sidebar.js b/src/main/webapp/js/mxgraph/Sidebar.js index 7fae4e8dc..1500c9246 100644 --- a/src/main/webapp/js/mxgraph/Sidebar.js +++ b/src/main/webapp/js/mxgraph/Sidebar.js @@ -1329,8 +1329,13 @@ Sidebar.prototype.addUmlPalette = function(expand) return sb.createVertexTemplateFromCells([cell.clone()], cell.geometry.width, cell.geometry.height, 'Interface 2'); }), - this.createVertexTemplateEntry('shape=providedRequiredInterface;html=1;verticalLabelPosition=bottom;', 20, 20, '', 'Provided/Required Interface', null, null, dt + 'provided required interface'), - this.createVertexTemplateEntry('shape=requiredInterface;html=1;verticalLabelPosition=bottom;', 10, 20, '', 'Required Interface', null, null, dt + 'required interface'), + this.createVertexTemplateEntry('shape=providedRequiredInterface;html=1;verticalLabelPosition=bottom;', 20, 20, '', 'Provided Required Interface', null, null, 'uml provided required interface lollipop'), + this.createVertexTemplateEntry('shape=requiredInterface;html=1;verticalLabelPosition=bottom;', 10, 20, '', 'Required Interface', null, null, 'uml required interface lollipop'), + this.addEntry('uml lollipop provided required interface', function() + { + return sb.createVertexTemplateFromData('zVTBTuMwEP0aH0FpQrnTlLKHRULiAHv0JpPE4GSiybRN+HrGsWka0QoOaLWWIuW9mfFo3rOtkrTu70i31T3mYFVyq5KUENn/1X0K1qo4MrlK1iqOI/lUvDkTXYzRqNUEDX+nIPYFO2234BlPdDzYQBBumxxcfqSSFRJXWGKj7W/EVsiFkC/APDyaN1eht4xCVVzbEIUmvyHCvcAGG/DMxlgbtvQdIS9hNgRrKiEMcfV5rjErDHUHWAPTICkEVrPZzbfSnYflIe9Q+oBGdpxSOtxSBoGdhJOfozYTNcp5Wtrk30pbaVukhjL7WWDRjIZnBy6XH/DPHK7749z1cEB56H0tqGPCV3gyOVeh/39hXR8aRfOKn3Py6msnpcC0nZN+XxmGx1ZnLrKXiz13rMCGN7o21kn8C+wO2GQ6BILWizjgFC3S2CCJxiW8tqZshMtETqCDK6dSCzkCR3wxLuFbp8mo0nKllmu3addC5twpTO/O44qgM2/67zjedEd3QAz92afmjK8fBUtfMXh4EeA+HCeXERyswJQVz7lT52Bm6eSfwOkB9XYfv6/v', + 50, 20, 'Lollipop Notation'); + }), this.createVertexTemplateEntry('shape=umlBoundary;whiteSpace=wrap;html=1;', 100, 80, 'Boundary Object', 'Boundary Object', null, null, 'uml boundary object'), this.createVertexTemplateEntry('ellipse;shape=umlEntity;whiteSpace=wrap;html=1;', 80, 80, 'Entity Object', 'Entity Object', null, null, 'uml entity object'), this.createVertexTemplateEntry('ellipse;shape=umlControl;whiteSpace=wrap;html=1;', 70, 80, 'Control Object', 'Control Object', null, null, 'uml control object'), diff --git a/src/main/webapp/js/viewer.min.js b/src/main/webapp/js/viewer.min.js index d998d241f..af7e0aa00 100644 --- a/src/main/webapp/js/viewer.min.js +++ b/src/main/webapp/js/viewer.min.js @@ -1974,7 +1974,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,A=!1,z=1,v=2,B=4,C=8;u&&(q=function(){r.fromString(u.value,z);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,b,e,d,l){mxEventSource.call(this);this.chromeless=null!=a?a:this.chromeless;this.initStencilRegistry();this.graph=d||this.createGraph(b,e);this.editable=null!=l?l:!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,b,e,d,k){mxEventSource.call(this);this.chromeless=null!=a?a:this.chromeless;this.initStencilRegistry();this.graph=d||this.createGraph(b,e);this.editable=null!=k?k:!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 d=null!=b?b.getProperty("edit"):null;null!=d&&d.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(b){}})();Editor.useLocalStorage="undefined"!=typeof Storage&&mxClient.IS_IOS; Editor.helpImage=mxClient.IS_SVG?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBmaWxsPSJub25lIiBkPSJNMCAwaDI0djI0SDB6Ii8+PHBhdGggZD0iTTExIDE4aDJ2LTJoLTJ2MnptMS0xNkM2LjQ4IDIgMiA2LjQ4IDIgMTJzNC40OCAxMCAxMCAxMCAxMC00LjQ4IDEwLTEwUzE3LjUyIDIgMTIgMnptMCAxOGMtNC40MSAwLTgtMy41OS04LThzMy41OS04IDgtOCA4IDMuNTkgOCA4LTMuNTkgOC04IDh6bTAtMTRjLTIuMjEgMC00IDEuNzktNCA0aDJjMC0xLjEuOS0yIDItMnMyIC45IDIgMmMwIDItMyAxLjc1LTMgNWgyYzAtMi4yNSAzLTIuNSAzLTUgMC0yLjIxLTEuNzktNC00LTR6Ii8+PC9zdmc+":IMAGE_PATH+ @@ -2011,14 +2011,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,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(b,e){var d=a.getSelectionCellsForChanges(e.getProperty("edit").changes);a.getModel();for(var l=[],u=0;u<d.length;u++)null!=a.view.getState(d[u])&&l.push(d[u]);a.setSelectionCells(l)}; +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(b,e){var d=a.getSelectionCellsForChanges(e.getProperty("edit").changes);a.getModel();for(var k=[],u=0;u<d.length;u++)null!=a.view.getState(d[u])&&k.push(d[u]);a.setSelectionCells(k)}; b.addListener(mxEvent.UNDO,e);b.addListener(mxEvent.REDO,e);return b};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(a){this.consumer=this.producer=null;this.done=a;this.args=null};OpenFile.prototype.setConsumer=function(a){this.consumer=a;this.execute()};OpenFile.prototype.setData=function(){this.args=arguments;this.execute()};OpenFile.prototype.error=function(a){this.cancel(!0);mxUtils.alert(a)}; OpenFile.prototype.execute=function(){null!=this.consumer&&null!=this.args&&(this.cancel(!1),this.consumer.apply(this,this.args))};OpenFile.prototype.cancel=function(a){null!=this.done&&this.done(null!=a?a:!0)}; -function Dialog(a,b,e,d,l,m,r,u,y,A,c){var f=0;mxClient.IS_VML&&(null==document.documentMode||8>document.documentMode)&&(f=80);e+=f;d+=f;var k=e,q=d,n=mxUtils.getDocumentSize(),g=n.height,x=Math.max(1,Math.round((n.width-e-64)/2)),z=Math.max(1,Math.round((g-d-a.footerHeight)/3));mxClient.IS_QUIRKS||(b.style.maxHeight="100%");e=null!=document.body?Math.min(e,document.body.scrollWidth-64):e;d=Math.min(d,g-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=g+"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));n=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=n.x+"px";this.bg.style.top=n.y+"px";x+=n.x;z+=n.y;l&&document.body.appendChild(this.bg);var t=a.createDiv(y?"geTransDialog":"geDialog");l=this.getPosition(x,z,e,d);x=l.x;z=l.y;t.style.width= -e+"px";t.style.height=d+"px";t.style.left=x+"px";t.style.top=z+"px";t.style.zIndex=this.zIndex;t.appendChild(b);document.body.appendChild(t);!u&&b.clientHeight>t.clientHeight-64&&(b.style.overflowY="auto");m&&(m=document.createElement("img"),m.setAttribute("src",Dialog.prototype.closeImage),m.setAttribute("title",mxResources.get("close")),m.className="geDialogClose",m.style.top=z+14+"px",m.style.left=x+e+38-f+"px",m.style.zIndex=this.zIndex,mxEvent.addListener(m,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})), -document.body.appendChild(m),this.dialogImg=m,c||mxEvent.addGestureListeners(this.bg,null,null,mxUtils.bind(this,function(c){a.hideDialog(!0)})));this.resizeListener=mxUtils.bind(this,function(){if(null!=A){var c=A();null!=c&&(k=e=c.w,q=d=c.h)}c=mxUtils.getDocumentSize();g=c.height;this.bg.style.height=g+"px";x=Math.max(1,Math.round((c.width-e-64)/2));z=Math.max(1,Math.round((g-d-a.footerHeight)/3));e=null!=document.body?Math.min(k,document.body.scrollWidth-64):k;d=Math.min(q,g-64);c=this.getPosition(x, -z,e,d);x=c.x;z=c.y;t.style.left=x+"px";t.style.top=z+"px";t.style.width=e+"px";t.style.height=d+"px";!u&&b.clientHeight>t.clientHeight-64&&(b.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=z+14+"px",this.dialogImg.style.left=x+e+38-f+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=r;this.container=t;a.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-1; +function Dialog(a,b,e,d,k,m,r,u,y,z,c){var f=0;mxClient.IS_VML&&(null==document.documentMode||8>document.documentMode)&&(f=80);e+=f;d+=f;var g=e,q=d,n=mxUtils.getDocumentSize(),l=n.height,x=Math.max(1,Math.round((n.width-e-64)/2)),A=Math.max(1,Math.round((l-d-a.footerHeight)/3));mxClient.IS_QUIRKS||(b.style.maxHeight="100%");e=null!=document.body?Math.min(e,document.body.scrollWidth-64):e;d=Math.min(d,l-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=l+"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));n=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=n.x+"px";this.bg.style.top=n.y+"px";x+=n.x;A+=n.y;k&&document.body.appendChild(this.bg);var t=a.createDiv(y?"geTransDialog":"geDialog");k=this.getPosition(x,A,e,d);x=k.x;A=k.y;t.style.width= +e+"px";t.style.height=d+"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");m&&(m=document.createElement("img"),m.setAttribute("src",Dialog.prototype.closeImage),m.setAttribute("title",mxResources.get("close")),m.className="geDialogClose",m.style.top=A+14+"px",m.style.left=x+e+38-f+"px",m.style.zIndex=this.zIndex,mxEvent.addListener(m,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})), +document.body.appendChild(m),this.dialogImg=m,c||mxEvent.addGestureListeners(this.bg,null,null,mxUtils.bind(this,function(c){a.hideDialog(!0)})));this.resizeListener=mxUtils.bind(this,function(){if(null!=z){var c=z();null!=c&&(g=e=c.w,q=d=c.h)}c=mxUtils.getDocumentSize();l=c.height;this.bg.style.height=l+"px";x=Math.max(1,Math.round((c.width-e-64)/2));A=Math.max(1,Math.round((l-d-a.footerHeight)/3));e=null!=document.body?Math.min(g,document.body.scrollWidth-64):g;d=Math.min(q,l-64);c=this.getPosition(x, +A,e,d);x=c.x;A=c.y;t.style.left=x+"px";t.style.top=A+"px";t.style.width=e+"px";t.style.height=d+"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=r;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"; Dialog.prototype.clearImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDQAKAIABAMDAwP///yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OUIzOEM1NzI4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OUIzOEM1NzM4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo5QjM4QzU3MDg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo5QjM4QzU3MTg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAEAAAEALAAAAAANAAoAAAIXTGCJebD9jEOTqRlttXdrB32PJ2ncyRQAOw==":IMAGE_PATH+ @@ -2027,69 +2027,72 @@ 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,b){return new mxPoint(a,b)};Dialog.prototype.close=function(a,b){if(null!=this.onDialogClose){if(0==this.onDialogClose(a,b))return!1;this.onDialogClose=null}null!=this.dialogImg&&(this.dialogImg.parentNode.removeChild(this.dialogImg),this.dialogImg=null);null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);mxEvent.removeListener(window,"resize",this.resizeListener);this.container.parentNode.removeChild(this.container)}; -var ErrorDialog=function(a,b,e,d,l,m,r,u,y,A,c){y=null!=y?y:!0;var f=document.createElement("div");f.style.textAlign="center";if(null!=b){var k=document.createElement("div");k.style.padding="0px";k.style.margin="0px";k.style.fontSize="18px";k.style.paddingBottom="16px";k.style.marginBottom="10px";k.style.borderBottom="1px solid #c0c0c0";k.style.color="gray";k.style.whiteSpace="nowrap";k.style.textOverflow="ellipsis";k.style.overflow="hidden";mxUtils.write(k,b);k.setAttribute("title",b);f.appendChild(k)}b= -document.createElement("div");b.style.lineHeight="1.2em";b.style.padding="6px";b.innerHTML=e;f.appendChild(b);e=document.createElement("div");e.style.marginTop="12px";e.style.textAlign="center";null!=m&&(b=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();m()}),b.className="geBtn",e.appendChild(b),e.style.textAlign="center");null!=A&&(A=mxUtils.button(A,function(){null!=c&&c()}),A.className="geBtn",e.appendChild(A));var q=mxUtils.button(d,function(){y&&a.hideDialog();null!=l&&l()}); +var ErrorDialog=function(a,b,e,d,k,m,r,u,y,z,c){y=null!=y?y:!0;var f=document.createElement("div");f.style.textAlign="center";if(null!=b){var g=document.createElement("div");g.style.padding="0px";g.style.margin="0px";g.style.fontSize="18px";g.style.paddingBottom="16px";g.style.marginBottom="10px";g.style.borderBottom="1px solid #c0c0c0";g.style.color="gray";g.style.whiteSpace="nowrap";g.style.textOverflow="ellipsis";g.style.overflow="hidden";mxUtils.write(g,b);g.setAttribute("title",b);f.appendChild(g)}b= +document.createElement("div");b.style.lineHeight="1.2em";b.style.padding="6px";b.innerHTML=e;f.appendChild(b);e=document.createElement("div");e.style.marginTop="12px";e.style.textAlign="center";null!=m&&(b=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();m()}),b.className="geBtn",e.appendChild(b),e.style.textAlign="center");null!=z&&(z=mxUtils.button(z,function(){null!=c&&c()}),z.className="geBtn",e.appendChild(z));var q=mxUtils.button(d,function(){y&&a.hideDialog();null!=k&&k()}); q.className="geBtn";e.appendChild(q);null!=r&&(d=mxUtils.button(r,function(){y&&a.hideDialog();null!=u&&u()}),d.className="geBtn gePrimaryBtn",e.appendChild(d));this.init=function(){q.focus()};f.appendChild(e);this.container=f},PrintDialog=function(a,b){this.create(a,b)}; -PrintDialog.prototype.create=function(a){function b(a){var b=u.checked||A.checked,d=parseInt(f.value)/100;isNaN(d)&&(d=1,f.value="100%");var d=.75*d,k=e.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,q=1/e.pageScale;if(b){var t=u.checked?1:parseInt(c.value);isNaN(t)||(q=mxUtils.getScaleForPageCount(t,e,k))}e.getGraphBounds();var l=t=0,k=mxRectangle.fromRectangle(k);k.width=Math.ceil(k.width*d);k.height=Math.ceil(k.height*d);q*=d;!b&&e.pageVisible?(d=e.getPageLayout(),t-=d.x*k.width,l-=d.y*k.height): -b=!0;b=PrintDialog.createPrintPreview(e,q,k,0,t,l,b);b.open();a&&PrintDialog.printPreview(b)}var e=a.editor.graph,d,l,m=document.createElement("table");m.style.width="100%";m.style.height="100%";var r=document.createElement("tbody");d=document.createElement("tr");var u=document.createElement("input");u.setAttribute("type","checkbox");l=document.createElement("td");l.setAttribute("colspan","2");l.style.fontSize="10pt";l.appendChild(u);var y=document.createElement("span");mxUtils.write(y," "+mxResources.get("fitPage")); -l.appendChild(y);mxEvent.addListener(y,"click",function(a){u.checked=!u.checked;A.checked=!u.checked;mxEvent.consume(a)});mxEvent.addListener(u,"change",function(){A.checked=!u.checked});d.appendChild(l);r.appendChild(d);d=d.cloneNode(!1);var A=document.createElement("input");A.setAttribute("type","checkbox");l=document.createElement("td");l.style.fontSize="10pt";l.appendChild(A);y=document.createElement("span");mxUtils.write(y," "+mxResources.get("posterPrint")+":");l.appendChild(y);mxEvent.addListener(y, -"click",function(a){A.checked=!A.checked;u.checked=!A.checked;mxEvent.consume(a)});d.appendChild(l);var c=document.createElement("input");c.setAttribute("value","1");c.setAttribute("type","number");c.setAttribute("min","1");c.setAttribute("size","4");c.setAttribute("disabled","disabled");c.style.width="50px";l=document.createElement("td");l.style.fontSize="10pt";l.appendChild(c);mxUtils.write(l," "+mxResources.get("pages")+" (max)");d.appendChild(l);r.appendChild(d);mxEvent.addListener(A,"change", -function(){A.checked?c.removeAttribute("disabled"):c.setAttribute("disabled","disabled");u.checked=!A.checked});d=d.cloneNode(!1);l=document.createElement("td");mxUtils.write(l,mxResources.get("pageScale")+":");d.appendChild(l);l=document.createElement("td");var f=document.createElement("input");f.setAttribute("value","100 %");f.setAttribute("size","5");f.style.width="50px";l.appendChild(f);d.appendChild(l);r.appendChild(d);d=document.createElement("tr");l=document.createElement("td");l.colSpan=2; -l.style.paddingTop="20px";l.setAttribute("align","right");y=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});y.className="geBtn";a.editor.cancelFirst&&l.appendChild(y);if(PrintDialog.previewEnabled){var k=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();b(!1)});k.className="geBtn";l.appendChild(k)}k=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();b(!0)});k.className="geBtn gePrimaryBtn";l.appendChild(k);a.editor.cancelFirst|| -l.appendChild(y);d.appendChild(l);r.appendChild(d);m.appendChild(r);this.container=m};PrintDialog.printPreview=function(a){try{if(null!=a.wnd){var b=function(){a.wnd.focus();a.wnd.print();a.wnd.close()};mxClient.IS_GC?window.setTimeout(b,500):b()}}catch(e){}}; -PrintDialog.createPrintPreview=function(a,b,e,d,l,m,r){b=new mxPrintPreview(a,b,e,d,l,m);b.title=mxResources.get("preview");b.printBackgroundImage=!0;b.autoOrigin=r;a=a.background;if(null==a||""==a||a==mxConstants.NONE)a="#ffffff";b.backgroundColor=a;var u=b.writeHead;b.writeHead=function(a){u.apply(this,arguments);a.writeln('<style type="text/css">');a.writeln("@media screen {");a.writeln(" body > div { padding:30px;box-sizing:content-box; }");a.writeln("}");a.writeln("</style>")};return b}; +PrintDialog.prototype.create=function(a){function b(a){var b=u.checked||z.checked,d=parseInt(f.value)/100;isNaN(d)&&(d=1,f.value="100%");var d=.75*d,g=e.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,q=1/e.pageScale;if(b){var t=u.checked?1:parseInt(c.value);isNaN(t)||(q=mxUtils.getScaleForPageCount(t,e,g))}e.getGraphBounds();var k=t=0,g=mxRectangle.fromRectangle(g);g.width=Math.ceil(g.width*d);g.height=Math.ceil(g.height*d);q*=d;!b&&e.pageVisible?(d=e.getPageLayout(),t-=d.x*g.width,k-=d.y*g.height): +b=!0;b=PrintDialog.createPrintPreview(e,q,g,0,t,k,b);b.open();a&&PrintDialog.printPreview(b)}var e=a.editor.graph,d,k,m=document.createElement("table");m.style.width="100%";m.style.height="100%";var r=document.createElement("tbody");d=document.createElement("tr");var u=document.createElement("input");u.setAttribute("type","checkbox");k=document.createElement("td");k.setAttribute("colspan","2");k.style.fontSize="10pt";k.appendChild(u);var y=document.createElement("span");mxUtils.write(y," "+mxResources.get("fitPage")); +k.appendChild(y);mxEvent.addListener(y,"click",function(a){u.checked=!u.checked;z.checked=!u.checked;mxEvent.consume(a)});mxEvent.addListener(u,"change",function(){z.checked=!u.checked});d.appendChild(k);r.appendChild(d);d=d.cloneNode(!1);var z=document.createElement("input");z.setAttribute("type","checkbox");k=document.createElement("td");k.style.fontSize="10pt";k.appendChild(z);y=document.createElement("span");mxUtils.write(y," "+mxResources.get("posterPrint")+":");k.appendChild(y);mxEvent.addListener(y, +"click",function(a){z.checked=!z.checked;u.checked=!z.checked;mxEvent.consume(a)});d.appendChild(k);var c=document.createElement("input");c.setAttribute("value","1");c.setAttribute("type","number");c.setAttribute("min","1");c.setAttribute("size","4");c.setAttribute("disabled","disabled");c.style.width="50px";k=document.createElement("td");k.style.fontSize="10pt";k.appendChild(c);mxUtils.write(k," "+mxResources.get("pages")+" (max)");d.appendChild(k);r.appendChild(d);mxEvent.addListener(z,"change", +function(){z.checked?c.removeAttribute("disabled"):c.setAttribute("disabled","disabled");u.checked=!z.checked});d=d.cloneNode(!1);k=document.createElement("td");mxUtils.write(k,mxResources.get("pageScale")+":");d.appendChild(k);k=document.createElement("td");var f=document.createElement("input");f.setAttribute("value","100 %");f.setAttribute("size","5");f.style.width="50px";k.appendChild(f);d.appendChild(k);r.appendChild(d);d=document.createElement("tr");k=document.createElement("td");k.colSpan=2; +k.style.paddingTop="20px";k.setAttribute("align","right");y=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});y.className="geBtn";a.editor.cancelFirst&&k.appendChild(y);if(PrintDialog.previewEnabled){var g=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();b(!1)});g.className="geBtn";k.appendChild(g)}g=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();b(!0)});g.className="geBtn gePrimaryBtn";k.appendChild(g);a.editor.cancelFirst|| +k.appendChild(y);d.appendChild(k);r.appendChild(d);m.appendChild(r);this.container=m};PrintDialog.printPreview=function(a){try{if(null!=a.wnd){var b=function(){a.wnd.focus();a.wnd.print();a.wnd.close()};mxClient.IS_GC?window.setTimeout(b,500):b()}}catch(e){}}; +PrintDialog.createPrintPreview=function(a,b,e,d,k,m,r){b=new mxPrintPreview(a,b,e,d,k,m);b.title=mxResources.get("preview");b.printBackgroundImage=!0;b.autoOrigin=r;a=a.background;if(null==a||""==a||a==mxConstants.NONE)a="#ffffff";b.backgroundColor=a;var u=b.writeHead;b.writeHead=function(a){u.apply(this,arguments);a.writeln('<style type="text/css">');a.writeln("@media screen {");a.writeln(" body > div { padding:30px;box-sizing:content-box; }");a.writeln("}");a.writeln("</style>")};return b}; PrintDialog.previewEnabled=!0; -var PageSetupDialog=function(a){function b(){null==c||c==mxConstants.NONE?(A.style.backgroundColor="",A.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(A.style.backgroundColor=c,A.style.backgroundImage="")}function e(){null==q?(k.removeAttribute("title"),k.style.fontSize="",k.innerHTML=mxResources.get("change")+"..."):(k.setAttribute("title",q.src),k.style.fontSize="11px",k.innerHTML=q.src.substring(0,42)+"...")}var d=a.editor.graph,l,m,r=document.createElement("table");r.style.width= -"100%";r.style.height="100%";var u=document.createElement("tbody");l=document.createElement("tr");m=document.createElement("td");m.style.verticalAlign="top";m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("paperSize")+":");l.appendChild(m);m=document.createElement("td");m.style.verticalAlign="top";m.style.fontSize="10pt";var y=PageSetupDialog.addPageFormatPanel(m,"pagesetupdialog",d.pageFormat);l.appendChild(m);u.appendChild(l);l=document.createElement("tr");m=document.createElement("td"); -mxUtils.write(m,mxResources.get("background")+":");l.appendChild(m);m=document.createElement("td");m.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var A=document.createElement("button");A.style.width="18px";A.style.height="18px";A.style.marginRight="20px";A.style.backgroundPosition="center center";A.style.backgroundRepeat="no-repeat";var c=d.background;b();mxEvent.addListener(A,"click",function(f){a.pickColor(c||"none",function(a){c=a;b()});mxEvent.consume(f)}); -m.appendChild(A);mxUtils.write(m,mxResources.get("gridSize")+":");var f=document.createElement("input");f.setAttribute("type","number");f.setAttribute("min","0");f.style.width="40px";f.style.marginLeft="6px";f.value=d.getGridSize();m.appendChild(f);mxEvent.addListener(f,"change",function(){var a=parseInt(f.value);f.value=Math.max(1,isNaN(a)?d.getGridSize():a)});l.appendChild(m);u.appendChild(l);l=document.createElement("tr");m=document.createElement("td");mxUtils.write(m,mxResources.get("image")+ -":");l.appendChild(m);m=document.createElement("td");var k=document.createElement("a");k.style.textDecoration="underline";k.style.cursor="pointer";k.style.color="#a0a0a0";var q=d.backgroundImage;mxEvent.addListener(k,"click",function(c){a.showBackgroundImageDialog(function(a){q=a;e()});mxEvent.consume(c)});e();m.appendChild(k);l.appendChild(m);u.appendChild(l);l=document.createElement("tr");m=document.createElement("td");m.colSpan=2;m.style.paddingTop="16px";m.setAttribute("align","right");var n= -mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});n.className="geBtn";a.editor.cancelFirst&&m.appendChild(n);var g=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();d.gridSize!==f.value&&d.setGridSize(parseInt(f.value));var b=new ChangePageSetup(a,c,q,y.get());b.ignoreColor=d.background==c;b.ignoreImage=(null!=d.backgroundImage?d.backgroundImage.src:null)===(null!=q?q.src:null);d.pageFormat.width==b.previousFormat.width&&d.pageFormat.height==b.previousFormat.height&& -b.ignoreColor&&b.ignoreImage||d.model.execute(b)});g.className="geBtn gePrimaryBtn";m.appendChild(g);a.editor.cancelFirst||m.appendChild(n);l.appendChild(m);u.appendChild(l);r.appendChild(u);this.container=r}; -PageSetupDialog.addPageFormatPanel=function(a,b,e,d){function l(a,b,d){if(d||f!=document.activeElement&&k!=document.activeElement){a=!1;for(b=0;b<n.length;b++)d=n[b],t?"custom"==d.key&&(u.value=d.key,t=!1):null!=d.format&&("a4"==d.key?826==e.width?(e=mxRectangle.fromRectangle(e),e.width=827):826==e.height&&(e=mxRectangle.fromRectangle(e),e.height=827):"a5"==d.key&&(584==e.width?(e=mxRectangle.fromRectangle(e),e.width=583):584==e.height&&(e=mxRectangle.fromRectangle(e),e.height=583)),e.width==d.format.width&& -e.height==d.format.height?(u.value=d.key,m.setAttribute("checked","checked"),m.defaultChecked=!0,m.checked=!0,r.removeAttribute("checked"),r.defaultChecked=!1,r.checked=!1,a=!0):e.width==d.format.height&&e.height==d.format.width&&(u.value=d.key,m.removeAttribute("checked"),m.defaultChecked=!1,m.checked=!1,r.setAttribute("checked","checked"),r.defaultChecked=!0,a=r.checked=!0));a?(y.style.display="",c.style.display="none"):(f.value=e.width/100,k.value=e.height/100,m.setAttribute("checked","checked"), +var PageSetupDialog=function(a){function b(){null==f||f==mxConstants.NONE?(c.style.backgroundColor="",c.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(c.style.backgroundColor=f,c.style.backgroundImage="")}function e(){null==n?(q.removeAttribute("title"),q.style.fontSize="",q.innerHTML=mxResources.get("change")+"..."):(q.setAttribute("title",n.src),q.style.fontSize="11px",q.innerHTML=n.src.substring(0,42)+"...")}var d=a.editor.graph,k,m,r=document.createElement("table");r.style.width= +"100%";r.style.height="100%";var u=document.createElement("tbody");k=document.createElement("tr");m=document.createElement("td");m.style.verticalAlign="top";m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("paperSize")+":");k.appendChild(m);m=document.createElement("td");m.style.verticalAlign="top";m.style.fontSize="10pt";var y=PageSetupDialog.addPageFormatPanel(m,"pagesetupdialog",d.pageFormat);k.appendChild(m);u.appendChild(k);if("1"==urlParams.ruler){k=document.createElement("tr");m=document.createElement("td"); +m.style.verticalAlign="top";m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("unit",null,"Unit")+":");k.appendChild(m);m=document.createElement("td");m.style.verticalAlign="top";m.style.fontSize="10pt";var z=PageSetupDialog.addUnitPanel(m,d.view.unit);k.appendChild(m);u.appendChild(k)}k=document.createElement("tr");m=document.createElement("td");mxUtils.write(m,mxResources.get("background")+":");k.appendChild(m);m=document.createElement("td");m.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type", +"text");var c=document.createElement("button");c.style.width="18px";c.style.height="18px";c.style.marginRight="20px";c.style.backgroundPosition="center center";c.style.backgroundRepeat="no-repeat";var f=d.background;b();mxEvent.addListener(c,"click",function(c){a.pickColor(f||"none",function(a){f=a;b()});mxEvent.consume(c)});m.appendChild(c);mxUtils.write(m,mxResources.get("gridSize")+":");var g=document.createElement("input");g.setAttribute("type","number");g.setAttribute("min","0");g.style.width= +"40px";g.style.marginLeft="6px";g.value=d.getGridSize();m.appendChild(g);mxEvent.addListener(g,"change",function(){var a=parseInt(g.value);g.value=Math.max(1,isNaN(a)?d.getGridSize():a)});k.appendChild(m);u.appendChild(k);k=document.createElement("tr");m=document.createElement("td");mxUtils.write(m,mxResources.get("image")+":");k.appendChild(m);m=document.createElement("td");var q=document.createElement("a");q.style.textDecoration="underline";q.style.cursor="pointer";q.style.color="#a0a0a0";var n= +d.backgroundImage;mxEvent.addListener(q,"click",function(c){a.showBackgroundImageDialog(function(a){n=a;e()});mxEvent.consume(c)});e();m.appendChild(q);k.appendChild(m);u.appendChild(k);k=document.createElement("tr");m=document.createElement("td");m.colSpan=2;m.style.paddingTop="16px";m.setAttribute("align","right");var l=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});l.className="geBtn";a.editor.cancelFirst&&m.appendChild(l);var x=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog(); +d.gridSize!==g.value&&d.setGridSize(parseInt(g.value));var c=new ChangePageSetup(a,f,n,y.get());c.ignoreColor=d.background==f;c.ignoreImage=(null!=d.backgroundImage?d.backgroundImage.src:null)===(null!=n?n.src:null);d.pageFormat.width==c.previousFormat.width&&d.pageFormat.height==c.previousFormat.height&&c.ignoreColor&&c.ignoreImage||d.model.execute(c);null!=z&&d.view.setUnit(parseInt(z.value))});x.className="geBtn gePrimaryBtn";m.appendChild(x);a.editor.cancelFirst||m.appendChild(l);k.appendChild(m); +u.appendChild(k);r.appendChild(u);this.container=r}; +PageSetupDialog.addPageFormatPanel=function(a,b,e,d){function k(a,b,d){if(d||f!=document.activeElement&&g!=document.activeElement){a=!1;for(b=0;b<n.length;b++)d=n[b],t?"custom"==d.key&&(u.value=d.key,t=!1):null!=d.format&&("a4"==d.key?826==e.width?(e=mxRectangle.fromRectangle(e),e.width=827):826==e.height&&(e=mxRectangle.fromRectangle(e),e.height=827):"a5"==d.key&&(584==e.width?(e=mxRectangle.fromRectangle(e),e.width=583):584==e.height&&(e=mxRectangle.fromRectangle(e),e.height=583)),e.width==d.format.width&& +e.height==d.format.height?(u.value=d.key,m.setAttribute("checked","checked"),m.defaultChecked=!0,m.checked=!0,r.removeAttribute("checked"),r.defaultChecked=!1,r.checked=!1,a=!0):e.width==d.format.height&&e.height==d.format.width&&(u.value=d.key,m.removeAttribute("checked"),m.defaultChecked=!1,m.checked=!1,r.setAttribute("checked","checked"),r.defaultChecked=!0,a=r.checked=!0));a?(y.style.display="",c.style.display="none"):(f.value=e.width/100,g.value=e.height/100,m.setAttribute("checked","checked"), u.value="custom",y.style.display="none",c.style.display="")}}b="format-"+b;var m=document.createElement("input");m.setAttribute("name",b);m.setAttribute("type","radio");m.setAttribute("value","portrait");var r=document.createElement("input");r.setAttribute("name",b);r.setAttribute("type","radio");r.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";m.style.marginRight="6px";y.appendChild(m);b=document.createElement("span");b.style.maxWidth="100px";mxUtils.write(b,mxResources.get("portrait"));y.appendChild(b);r.style.marginLeft="10px";r.style.marginRight="6px";y.appendChild(r);var A=document.createElement("span");A.style.width="100px";mxUtils.write(A,mxResources.get("landscape"));y.appendChild(A);var c=document.createElement("div");c.style.marginLeft="4px";c.style.width="210px";c.style.height="24px";var f=document.createElement("input"); -f.setAttribute("size","7");f.style.textAlign="right";c.appendChild(f);mxUtils.write(c," in x ");var k=document.createElement("input");k.setAttribute("size","7");k.style.textAlign="right";c.appendChild(k);mxUtils.write(c," in");y.style.display="none";c.style.display="none";for(var q={},n=PageSetupDialog.getFormats(),g=0;g<n.length;g++){var x=n[g];q[x.key]=x;var z=document.createElement("option");z.setAttribute("value",x.key);mxUtils.write(z,x.title);u.appendChild(z)}var t=!1;l();a.appendChild(u);mxUtils.br(a); -a.appendChild(y);a.appendChild(c);var F=e,v=function(a,b){var g=q[u.value];null!=g.format?(f.value=g.format.width/100,k.value=g.format.height/100,c.style.display="none",y.style.display=""):(y.style.display="none",c.style.display="");g=parseFloat(f.value);if(isNaN(g)||0>=g)f.value=e.width/100;g=parseFloat(k.value);if(isNaN(g)||0>=g)k.value=e.height/100;g=new mxRectangle(0,0,Math.floor(100*parseFloat(f.value)),Math.floor(100*parseFloat(k.value)));"custom"!=u.value&&r.checked&&(g=new mxRectangle(0,0, -g.height,g.width));b&&t||g.width==F.width&&g.height==F.height||(F=g,null!=d&&d(F))};mxEvent.addListener(b,"click",function(a){m.checked=!0;v(a);mxEvent.consume(a)});mxEvent.addListener(A,"click",function(a){r.checked=!0;v(a);mxEvent.consume(a)});mxEvent.addListener(f,"blur",v);mxEvent.addListener(f,"click",v);mxEvent.addListener(k,"blur",v);mxEvent.addListener(k,"click",v);mxEvent.addListener(r,"change",v);mxEvent.addListener(m,"change",v);mxEvent.addListener(u,"change",function(a){t="custom"==u.value; -v(a,!0)});v();return{set:function(a){e=a;l(null,null,!0)},get:function(){return F},widthInput:f,heightInput:k}}; +y.style.height="24px";m.style.marginRight="6px";y.appendChild(m);b=document.createElement("span");b.style.maxWidth="100px";mxUtils.write(b,mxResources.get("portrait"));y.appendChild(b);r.style.marginLeft="10px";r.style.marginRight="6px";y.appendChild(r);var z=document.createElement("span");z.style.width="100px";mxUtils.write(z,mxResources.get("landscape"));y.appendChild(z);var c=document.createElement("div");c.style.marginLeft="4px";c.style.width="210px";c.style.height="24px";var f=document.createElement("input"); +f.setAttribute("size","7");f.style.textAlign="right";c.appendChild(f);mxUtils.write(c," in x ");var g=document.createElement("input");g.setAttribute("size","7");g.style.textAlign="right";c.appendChild(g);mxUtils.write(c," in");y.style.display="none";c.style.display="none";for(var q={},n=PageSetupDialog.getFormats(),l=0;l<n.length;l++){var x=n[l];q[x.key]=x;var A=document.createElement("option");A.setAttribute("value",x.key);mxUtils.write(A,x.title);u.appendChild(A)}var t=!1;k();a.appendChild(u);mxUtils.br(a); +a.appendChild(y);a.appendChild(c);var E=e,v=function(a,b){var l=q[u.value];null!=l.format?(f.value=l.format.width/100,g.value=l.format.height/100,c.style.display="none",y.style.display=""):(y.style.display="none",c.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&&r.checked&&(l=new mxRectangle(0,0, +l.height,l.width));b&&t||l.width==E.width&&l.height==E.height||(E=l,null!=d&&d(E))};mxEvent.addListener(b,"click",function(a){m.checked=!0;v(a);mxEvent.consume(a)});mxEvent.addListener(z,"click",function(a){r.checked=!0;v(a);mxEvent.consume(a)});mxEvent.addListener(f,"blur",v);mxEvent.addListener(f,"click",v);mxEvent.addListener(g,"blur",v);mxEvent.addListener(g,"click",v);mxEvent.addListener(r,"change",v);mxEvent.addListener(m,"change",v);mxEvent.addListener(u,"change",function(a){t="custom"==u.value; +v(a,!0)});v();return{set:function(a){e=a;k(null,null,!0)},get:function(){return E},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 (279 mm x 432 mm)",format:new mxRectangle(0,0,1100,1700)},{key:"a0",title:"A0 (841 mm x 1189 mm)",format:new mxRectangle(0,0,3300,4681)},{key:"a1",title:"A1 (594 mm x 841 mm)",format:new mxRectangle(0,0,2339,3300)},{key:"a2",title:"A2 (420 mm x 594 mm)", format:new mxRectangle(0,0,1654,2336)},{key:"a3",title:"A3 (297 mm x 420 mm)",format:new mxRectangle(0,0,1169,1654)},{key:"a4",title:"A4 (210 mm x 297 mm)",format:mxConstants.PAGE_FORMAT_A4_PORTRAIT},{key:"a5",title:"A5 (148 mm x 210 mm)",format:new mxRectangle(0,0,583,827)},{key:"a6",title:"A6 (105 mm x 148 mm)",format:new mxRectangle(0,0,413,583)},{key:"a7",title:"A7 (74 mm x 105 mm)",format:new mxRectangle(0,0,291,413)},{key:"custom",title:mxResources.get("custom"),format:null}]}; +PageSetupDialog.addUnitPanel=function(a,b,e){var d=document.createElement("select");d.style.marginBottom="8px";d.style.width="202px";for(var k=PageSetupDialog.getUnits(),m=0;m<k.length;m++){var r=k[m],u=document.createElement("option");u.setAttribute("value",r.unit);mxUtils.write(u,mxResources.get(r.key,null,r.title));d.appendChild(u)}a.appendChild(d);d.value=b;null!=e&&mxEvent.addListener(d,"change",function(a){e(parseInt(d.value))});return d}; +PageSetupDialog.getUnits=function(){return[{key:"pixel",title:"Pixel",unit:mxConstants.PIXELS},{key:"inch",title:"Inch",unit:mxConstants.INCHES},{key:"cm",title:"CM",unit:mxConstants.CENTIMETERS}]}; (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 d=a.container.firstChild;null!=d&&d.nodeType!=mxConstants.NODETYPE_ELEMENT;)d=d.nextSibling;null!=d&&(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),d.style.position="absolute",a.container.insertBefore(this.backgroundPageShape.node,d),this.backgroundPageShape.redraw(),this.backgroundPageShape.node.className="geBackgroundPage",mxEvent.addListener(this.backgroundPageShape.node,"dblclick",mxUtils.bind(this,function(c){a.dblClick(c)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(c){a.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(c))}), mxUtils.bind(this,function(c){null!=a.tooltipHandler&&a.tooltipHandler.isHideOnHover()&&a.tooltipHandler.hide();a.isMouseDown&&!mxEvent.isConsumed(c)&&a.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(c))}),mxUtils.bind(this,function(c){a.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(c))})))}else this.backgroundPageShape.scale=1,this.backgroundPageShape.bounds=b,this.backgroundPageShape.redraw()}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape= null);this.validateBackgroundStyles()}};mxGraphView.prototype.validateBackgroundStyles=function(){var a=this.graph,b=null==a.background||a.background==mxConstants.NONE?a.defaultPageBackgroundColor:a.background,d=null!=b&&this.gridColor!=b.toLowerCase()?this.gridColor:"#ffffff",c="none",f="";if(a.isGridEnabled()){f=10;mxClient.IS_SVG?(c=unescape(encodeURIComponent(this.createSvgGrid(d))),c=window.btoa?btoa(c):Base64.encode(c,!0),c="url(data:image/svg+xml;base64,"+c+")",f=a.gridSize*this.scale*this.gridSteps): -c="url("+this.gridImage+")";var k=d=0;null!=a.view.backgroundPageShape&&(k=this.getBackgroundPageBounds(),d=1+k.x,k=1+k.y);f=-Math.round(f-mxUtils.mod(this.translate.x*this.scale-d,f))+"px "+-Math.round(f-mxUtils.mod(this.translate.y*this.scale-k,f))+"px"}d=a.view.canvas;null!=d.ownerSVGElement&&(d=d.ownerSVGElement);null!=a.view.backgroundPageShape?(a.view.backgroundPageShape.node.style.backgroundPosition=f,a.view.backgroundPageShape.node.style.backgroundImage=c,a.view.backgroundPageShape.node.style.backgroundColor= -b,a.container.className="geDiagramContainer geDiagramBackdrop",d.style.backgroundImage="none",d.style.backgroundColor=""):(a.container.className="geDiagramContainer",d.style.backgroundPosition=f,d.style.backgroundColor=b,d.style.backgroundImage=c)};mxGraphView.prototype.createSvgGrid=function(a){for(var b=this.graph.gridSize*this.scale;b<this.minGridSize;)b*=2;for(var d=this.gridSteps*b,c=[],f=1;f<this.gridSteps;f++){var k=f*b;c.push("M 0 "+k+" L "+d+" "+k+" M "+k+" 0 L "+k+" "+d)}return'<svg width="'+ +c="url("+this.gridImage+")";var g=d=0;null!=a.view.backgroundPageShape&&(g=this.getBackgroundPageBounds(),d=1+g.x,g=1+g.y);f=-Math.round(f-mxUtils.mod(this.translate.x*this.scale-d,f))+"px "+-Math.round(f-mxUtils.mod(this.translate.y*this.scale-g,f))+"px"}d=a.view.canvas;null!=d.ownerSVGElement&&(d=d.ownerSVGElement);null!=a.view.backgroundPageShape?(a.view.backgroundPageShape.node.style.backgroundPosition=f,a.view.backgroundPageShape.node.style.backgroundImage=c,a.view.backgroundPageShape.node.style.backgroundColor= +b,a.container.className="geDiagramContainer geDiagramBackdrop",d.style.backgroundImage="none",d.style.backgroundColor=""):(a.container.className="geDiagramContainer",d.style.backgroundPosition=f,d.style.backgroundColor=b,d.style.backgroundImage=c)};mxGraphView.prototype.createSvgGrid=function(a){for(var b=this.graph.gridSize*this.scale;b<this.minGridSize;)b*=2;for(var d=this.gridSteps*b,c=[],f=1;f<this.gridSteps;f++){var g=f*b;c.push("M 0 "+g+" L "+d+" "+g+" M "+g+" 0 L "+g+" "+d)}return'<svg width="'+ d+'" height="'+d+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+d+'" height="'+d+'" patternUnits="userSpaceOnUse"><path d="'+c.join(" ")+'" fill="none" stroke="'+a+'" opacity="0.2" stroke-width="1"/><path d="M '+d+" 0 L 0 0 0 "+d+'" fill="none" stroke="'+a+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var a=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(b,d){a.apply(this,arguments);if(null!=this.shiftPreview1){var e= -this.view.canvas;null!=e.ownerSVGElement&&(e=e.ownerSVGElement);var c=this.gridSize*this.view.scale*this.view.gridSteps,c=-Math.round(c-mxUtils.mod(this.view.translate.x*this.view.scale+b,c))+"px "+-Math.round(c-mxUtils.mod(this.view.translate.y*this.view.scale+d,c))+"px";e.style.backgroundPosition=c}};mxGraph.prototype.updatePageBreaks=function(a,b,d){var c=this.view.scale,f=this.view.translate,k=this.pageFormat,e=c*this.pageScale,n=this.view.getBackgroundPageBounds();b=n.width;d=n.height;var g= -new mxRectangle(c*f.x,c*f.y,k.width*e,k.height*e),x=(a=a&&Math.min(g.width,g.height)>this.minPageBreakDist)?Math.ceil(d/g.height)-1:0,l=a?Math.ceil(b/g.width)-1:0,t=n.x+b,u=n.y+d;null==this.horizontalPageBreaks&&0<x&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<l&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var c=a==this.horizontalPageBreaks?x:l,f=0;f<=c;f++){var b=a==this.horizontalPageBreaks?[new mxPoint(Math.round(n.x),Math.round(n.y+(f+1)*g.height)), -new mxPoint(Math.round(t),Math.round(n.y+(f+1)*g.height))]:[new mxPoint(Math.round(n.x+(f+1)*g.width),Math.round(n.y)),new mxPoint(Math.round(n.x+(f+1)*g.width),Math.round(u))];null!=a[f]?(a[f].points=b,a[f].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[f]=b)}for(f=c;f<a.length;f++)a[f].destroy();a.splice(c,a.length-c)}});a(this.horizontalPageBreaks);a(this.verticalPageBreaks)}; +this.view.canvas;null!=e.ownerSVGElement&&(e=e.ownerSVGElement);var c=this.gridSize*this.view.scale*this.view.gridSteps,c=-Math.round(c-mxUtils.mod(this.view.translate.x*this.view.scale+b,c))+"px "+-Math.round(c-mxUtils.mod(this.view.translate.y*this.view.scale+d,c))+"px";e.style.backgroundPosition=c}};mxGraph.prototype.updatePageBreaks=function(a,b,d){var c=this.view.scale,f=this.view.translate,g=this.pageFormat,e=c*this.pageScale,n=this.view.getBackgroundPageBounds();b=n.width;d=n.height;var l= +new mxRectangle(c*f.x,c*f.y,g.width*e,g.height*e),x=(a=a&&Math.min(l.width,l.height)>this.minPageBreakDist)?Math.ceil(d/l.height)-1:0,k=a?Math.ceil(b/l.width)-1:0,t=n.x+b,u=n.y+d;null==this.horizontalPageBreaks&&0<x&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<k&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var c=a==this.horizontalPageBreaks?x:k,f=0;f<=c;f++){var b=a==this.horizontalPageBreaks?[new mxPoint(Math.round(n.x),Math.round(n.y+(f+1)*l.height)), +new mxPoint(Math.round(t),Math.round(n.y+(f+1)*l.height))]:[new mxPoint(Math.round(n.x+(f+1)*l.width),Math.round(n.y)),new mxPoint(Math.round(n.x+(f+1)*l.width),Math.round(u))];null!=a[f]?(a[f].points=b,a[f].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[f]=b)}for(f=c;f<a.length;f++)a[f].destroy();a.splice(c,a.length-c)}});a(this.horizontalPageBreaks);a(this.verticalPageBreaks)}; var b=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(a,d,e){for(var c=0;c<d.length;c++)if(this.graph.getModel().isVertex(d[c])){var f=this.graph.getCellGeometry(d[c]);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(b,d){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,d=0<a.height?a.y/this.scale-this.translate.y:0,c=this.graph.pageFormat,f=this.graph.pageScale,k=c.width*f,c=c.height*f,f=Math.floor(Math.min(0,b)/k),e=Math.floor(Math.min(0, -d)/c);return new mxRectangle(this.scale*(this.translate.x+f*k),this.scale*(this.translate.y+e*c),this.scale*(Math.ceil(Math.max(1,b+a.width/this.scale)/k)-f)*k,this.scale*(Math.ceil(Math.max(1,d+a.height/this.scale)/c)-e)*c)};var d=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(a,b){d.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft= -a+"px",this.view.backgroundPageShape.node.style.marginTop=b+"px")};var l=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(a,b,d,c,f,k){var e=l.apply(this,arguments);null==k||k||mxEvent.addListener(e,"mousedown",function(a){mxEvent.consume(a)});return e};var m=mxGraphHandler.prototype.getInitialCellForEvent;mxGraphHandler.prototype.getInitialCellForEvent=function(a){var b=this.graph.getModel(),d=b.getParent(this.graph.getSelectionCell()),c=m.apply(this,arguments),f=b.getParent(c); +!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,d=0<a.height?a.y/this.scale-this.translate.y:0,c=this.graph.pageFormat,f=this.graph.pageScale,g=c.width*f,c=c.height*f,f=Math.floor(Math.min(0,b)/g),e=Math.floor(Math.min(0, +d)/c);return new mxRectangle(this.scale*(this.translate.x+f*g),this.scale*(this.translate.y+e*c),this.scale*(Math.ceil(Math.max(1,b+a.width/this.scale)/g)-f)*g,this.scale*(Math.ceil(Math.max(1,d+a.height/this.scale)/c)-e)*c)};var d=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(a,b){d.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft= +a+"px",this.view.backgroundPageShape.node.style.marginTop=b+"px")};var k=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(a,b,d,c,f,g){var e=k.apply(this,arguments);null==g||g||mxEvent.addListener(e,"mousedown",function(a){mxEvent.consume(a)});return e};var m=mxGraphHandler.prototype.getInitialCellForEvent;mxGraphHandler.prototype.getInitialCellForEvent=function(a){var b=this.graph.getModel(),d=b.getParent(this.graph.getSelectionCell()),c=m.apply(this,arguments),f=b.getParent(c); if(null==d||d!=c&&d!=f)for(;!this.graph.isCellSelected(c)&&!this.graph.isCellSelected(f)&&b.isVertex(f)&&!this.graph.isContainer(f);)c=f,f=this.graph.getModel().getParent(c);return c};var r=mxGraphHandler.prototype.isDelayedSelection;mxGraphHandler.prototype.isDelayedSelection=function(a,b){var d=r.apply(this,arguments);if(!d)for(var c=this.graph.getModel(),f=c.getParent(a);null!=f;){if(this.graph.isCellSelected(f)&&c.isVertex(f)){d=!0;break}f=c.getParent(f)}return d};mxGraphHandler.prototype.selectDelayed= function(a){if(!this.graph.popupMenuHandler.isPopupTrigger(a)){var b=a.getCell();null==b&&(b=this.cell);var d=this.graph.view.getState(b);if(null==d||!a.isSource(d.control))for(var d=this.graph.getModel(),c=d.getParent(b);!this.graph.isCellSelected(c)&&d.isVertex(c);)b=c,c=d.getParent(b);this.graph.selectCellForEvent(b,a.getEvent())}};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(a){a=a.getCell();for(var b=this.graph.getModel(),d=b.getParent(a);b.isVertex(d)&&!this.graph.isContainer(d);)this.graph.isCellSelected(d)&& (a=d),d=b.getParent(d);return a}})();EditorUi=function(a,b,e){mxEventSource.call(this);this.destroyFunctions=[];this.editor=a||new Editor;this.container=b||document.body;var d=this.editor.graph;d.lightbox=e;d.useCssTransforms&&(this.lazyZoomDelay=0);mxClient.IS_SVG?mxPopupMenu.prototype.submenuImage="data:image/gif;base64,R0lGODlhCQAJAIAAAP///zMzMyH5BAEAAAAALAAAAAAJAAkAAAIPhI8WebHsHopSOVgb26AAADs=":(new Image).src=mxPopupMenu.prototype.submenuImage;mxClient.IS_SVG||null==mxConnectionHandler.prototype.connectImage||((new Image).src=mxConnectionHandler.prototype.connectImage.src); -this.editor.chromeless&&!this.editor.editable&&(this.footerHeight=0,d.isEnabled=function(){return!1},d.panningHandler.isForcePanningEvent=function(a){return!mxEvent.isPopupTrigger(a.getEvent())});this.actions=new Actions(this);this.menus=this.createMenus();this.createDivs();this.createUi();this.refresh();var l=mxUtils.bind(this,function(a){null==a&&(a=window.event);return d.isEditing()||null!=a&&this.isSelectionAllowed(a)});this.container==document.body&&(this.menubarContainer.onselectstart=l,this.menubarContainer.onmousedown= -l,this.toolbarContainer.onselectstart=l,this.toolbarContainer.onmousedown=l,this.diagramContainer.onselectstart=l,this.diagramContainer.onmousedown=l,this.sidebarContainer.onselectstart=l,this.sidebarContainer.onmousedown=l,this.formatContainer.onselectstart=l,this.formatContainer.onmousedown=l,this.footerContainer.onselectstart=l,this.footerContainer.onmousedown=l,null!=this.tabContainer&&(this.tabContainer.onselectstart=l));!this.editor.chromeless||this.editor.editable?(b=function(a){if(null!=a){var c= -mxEvent.getSource(a);if("A"==c.nodeName)for(;null!=c;){if("geHint"==c.className)return!0;c=c.parentNode}}return l(a)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",b):this.diagramContainer.oncontextmenu=b):d.panningHandler.usePopupTrigger=!1;d.init(this.diagramContainer);mxClient.IS_SVG&&null!=d.view.getDrawPane()&&(b=d.view.getDrawPane().ownerSVGElement,null!=b&&(b.style.position="absolute"));this.hoverIcons= +this.editor.chromeless&&!this.editor.editable&&(this.footerHeight=0,d.isEnabled=function(){return!1},d.panningHandler.isForcePanningEvent=function(a){return!mxEvent.isPopupTrigger(a.getEvent())});this.actions=new Actions(this);this.menus=this.createMenus();this.createDivs();this.createUi();this.refresh();var k=mxUtils.bind(this,function(a){null==a&&(a=window.event);return d.isEditing()||null!=a&&this.isSelectionAllowed(a)});this.container==document.body&&(this.menubarContainer.onselectstart=k,this.menubarContainer.onmousedown= +k,this.toolbarContainer.onselectstart=k,this.toolbarContainer.onmousedown=k,this.diagramContainer.onselectstart=k,this.diagramContainer.onmousedown=k,this.sidebarContainer.onselectstart=k,this.sidebarContainer.onmousedown=k,this.formatContainer.onselectstart=k,this.formatContainer.onmousedown=k,this.footerContainer.onselectstart=k,this.footerContainer.onmousedown=k,null!=this.tabContainer&&(this.tabContainer.onselectstart=k));!this.editor.chromeless||this.editor.editable?(b=function(a){if(null!=a){var c= +mxEvent.getSource(a);if("A"==c.nodeName)for(;null!=c;){if("geHint"==c.className)return!0;c=c.parentNode}}return k(a)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",b):this.diagramContainer.oncontextmenu=b):d.panningHandler.usePopupTrigger=!1;d.init(this.diagramContainer);mxClient.IS_SVG&&null!=d.view.getDrawPane()&&(b=d.view.getDrawPane().ownerSVGElement,null!=b&&(b.style.position="absolute"));this.hoverIcons= this.createHoverIcons();mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(a){var c=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(a)-c.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(a)-c.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var m=!1,r=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(a,c){return m||r.apply(this, arguments)};this.keydownHandler=mxUtils.bind(this,function(a){32==a.which?(m=!0,this.hoverIcons.reset(),d.container.style.cursor="move",d.isEditing()||mxEvent.getSource(a)!=d.container||mxEvent.consume(a)):mxEvent.isConsumed(a)||27!=a.keyCode||this.hideDialog(null,!0)});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(a){d.container.style.cursor="";m=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var u=d.panningHandler.isForcePanningEvent; d.panningHandler.isForcePanningEvent=function(a){return u.apply(this,arguments)||m||mxEvent.isMouseEvent(a.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(a.getEvent()))&&(!mxEvent.isControlDown(a.getEvent())&&mxEvent.isRightMouseButton(a.getEvent())||mxEvent.isMiddleMouseButton(a.getEvent()))};var y=d.cellEditor.isStopEditingEvent;d.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 A=!1,c=null,f=null,k=null,q=mxUtils.bind(this,function(){if(null!=this.toolbar&&A!=d.cellEditor.isContentEditing()){for(var a=this.toolbar.container.firstChild,b=[];null!=a;){var e=a.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,a)&&(a.parentNode.removeChild(a),b.push(a));a=e}a=this.toolbar.fontMenu;e=this.toolbar.sizeMenu;if(null==k)this.toolbar.createTextToolbar();else{for(var g=0;g<k.length;g++)this.toolbar.container.appendChild(k[g]);this.toolbar.fontMenu= -c;this.toolbar.sizeMenu=f}A=d.cellEditor.isContentEditing();c=a;f=e;k=b}}),n=this,g=d.cellEditor.startEditing;d.cellEditor.startEditing=function(){g.apply(this,arguments);q();if(d.cellEditor.isContentEditing()){var a=!1,c=function(){a||(a=!0,window.setTimeout(function(){for(var c=d.getSelectedElement();null!=c&&c.nodeType!=mxConstants.NODETYPE_ELEMENT;)c=c.parentNode;if(null!=c&&(c=mxUtils.getCurrentStyle(c),null!=c&&null!=n.toolbar)){var f=c.fontFamily;"'"==f.charAt(0)&&(f=f.substring(1));"'"==f.charAt(f.length- +mxClient.IS_SF&&mxEvent.isShiftDown(a))};var z=!1,c=null,f=null,g=null,q=mxUtils.bind(this,function(){if(null!=this.toolbar&&z!=d.cellEditor.isContentEditing()){for(var a=this.toolbar.container.firstChild,b=[];null!=a;){var e=a.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,a)&&(a.parentNode.removeChild(a),b.push(a));a=e}a=this.toolbar.fontMenu;e=this.toolbar.sizeMenu;if(null==g)this.toolbar.createTextToolbar();else{for(var l=0;l<g.length;l++)this.toolbar.container.appendChild(g[l]);this.toolbar.fontMenu= +c;this.toolbar.sizeMenu=f}z=d.cellEditor.isContentEditing();c=a;f=e;g=b}}),n=this,l=d.cellEditor.startEditing;d.cellEditor.startEditing=function(){l.apply(this,arguments);q();if(d.cellEditor.isContentEditing()){var a=!1,c=function(){a||(a=!0,window.setTimeout(function(){for(var c=d.getSelectedElement();null!=c&&c.nodeType!=mxConstants.NODETYPE_ELEMENT;)c=c.parentNode;if(null!=c&&(c=mxUtils.getCurrentStyle(c),null!=c&&null!=n.toolbar)){var f=c.fontFamily;"'"==f.charAt(0)&&(f=f.substring(1));"'"==f.charAt(f.length- 1)&&(f=f.substring(0,f.length-1));n.toolbar.setFontName(f);n.toolbar.setFontSize(parseInt(c.fontSize))}a=!1},0))};mxEvent.addListener(d.cellEditor.textarea,"input",c);mxEvent.addListener(d.cellEditor.textarea,"touchend",c);mxEvent.addListener(d.cellEditor.textarea,"mouseup",c);mxEvent.addListener(d.cellEditor.textarea,"keyup",c);c()}};var x=d.cellEditor.stopEditing;d.cellEditor.stopEditing=function(a,c){x.apply(this,arguments);q()};d.container.setAttribute("tabindex","0");d.container.style.cursor= -"default";if(window.self===window.top&&null!=d.container.parentNode)try{d.container.focus()}catch(K){}var z=d.fireMouseEvent;d.fireMouseEvent=function(a,c,f){a==mxEvent.MOUSE_DOWN&&this.container.focus();z.apply(this,arguments)};d.popupMenuHandler.autoExpand=!0;null!=this.menus&&(d.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(a,c,f){this.menus.createPopupMenu(a,c,f)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(a){d.popupMenuHandler.hideMenu()}));this.keyHandler= -this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};var t="rounded shadow glass dashed dashPattern comic labelBackgroundColor".split(" "),F="shape edgeStyle curved rounded elbow comic jumpStyle jumpSize".split(" ");this.setDefaultStyle=function(a){try{var c=d.view.getState(a);if(null!=c){var f=a.clone();f.style="";var b=d.getCellStyle(f);a=[];var f=[],k;for(k in c.style)b[k]!=c.style[k]&&(a.push(c.style[k]),f.push(k));for(var e=d.getModel().getStyle(c.cell),g=null!=e?e.split(";"): -[],e=0;e<g.length;e++){var n=g[e],p=n.indexOf("=");if(0<=p){k=n.substring(0,p);var q=n.substring(p+1);null!=b[k]&&"none"==q&&(a.push(q),f.push(k))}}d.getModel().isEdge(c.cell)?d.currentEdgeStyle={}:d.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",f,"values",a,"cells",[c.cell]))}}catch(E){this.handleError(E)}};this.clearDefaultStyle=function(){d.currentEdgeStyle=mxUtils.clone(d.defaultEdgeStyle);d.currentVertexStyle=mxUtils.clone(d.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged", -"keys",[],"values",[],"cells",[]))};var v=["fontFamily","fontSize","fontColor"],D="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),p=["startArrow startFill startSize sourcePerimeterSpacing endArrow endFill endSize targetPerimeterSpacing".split(" "),["strokeColor","strokeWidth"],["fillColor","gradientColor"],v,["opacity"],["align"],["html"]];for(a=0;a<p.length;a++)for(b=0;b<p[a].length;b++)t.push(p[a][b]);for(a=0;a<F.length;a++)0>mxUtils.indexOf(t,F[a])&&t.push(F[a]); -var C=function(a,c){var f=d.getModel();f.beginUpdate();try{if(c)for(var b=f.isEdge(n),k=b?d.currentEdgeStyle:d.currentVertexStyle,b=["fontSize","fontFamily","fontColor"],e=0;e<b.length;e++){var g=k[b[e]];null!=g&&d.setCellStyles(b[e],g,a)}else for(g=0;g<a.length;g++){for(var n=a[g],q=f.getStyle(n),C=null!=q?q.split(";"):[],E=t.slice(),e=0;e<C.length;e++){var x=C[e],l=x.indexOf("=");if(0<=l){var z=x.substring(0,l),K=mxUtils.indexOf(E,z);0<=K&&E.splice(K,1);for(var v=0;v<p.length;v++){var m=p[v];if(0<= -mxUtils.indexOf(m,z))for(var u=0;u<m.length;u++){var r=mxUtils.indexOf(E,m[u]);0<=r&&E.splice(r,1)}}}}for(var k=(b=f.isEdge(n))?d.currentEdgeStyle:d.currentVertexStyle,P=f.getStyle(n),e=0;e<E.length;e++){var z=E[e],D=k[z];null==D||"shape"==z&&!b||b&&!(0>mxUtils.indexOf(F,z))||(P=mxUtils.setStyle(P,z,D))}f.setStyle(n,P)}}finally{f.endUpdate()}};d.addListener("cellsInserted",function(a,c){C(c.getProperty("cells"))});d.addListener("textInserted",function(a,c){C(c.getProperty("cells"),!0)});d.connectionHandler.addListener(mxEvent.CONNECT, -function(a,c){var f=[c.getProperty("cell")];c.getProperty("terminalInserted")&&f.push(c.getProperty("terminal"));C(f)});this.addListener("styleChanged",mxUtils.bind(this,function(a,c){var f=c.getProperty("cells"),b=!1,k=!1;if(0<f.length)for(var e=0;e<f.length&&(b=d.getModel().isVertex(f[e])||b,!(k=d.getModel().isEdge(f[e])||k)||!b);e++);else k=b=!0;for(var f=c.getProperty("keys"),g=c.getProperty("values"),e=0;e<f.length;e++){var n=0<=mxUtils.indexOf(v,f[e]);if("strokeColor"!=f[e]||null!=g[e]&&"none"!= -g[e])if(0<=mxUtils.indexOf(F,f[e]))k||0<=mxUtils.indexOf(D,f[e])?null==g[e]?delete d.currentEdgeStyle[f[e]]:d.currentEdgeStyle[f[e]]=g[e]:b&&0<=mxUtils.indexOf(t,f[e])&&(null==g[e]?delete d.currentVertexStyle[f[e]]:d.currentVertexStyle[f[e]]=g[e]);else if(0<=mxUtils.indexOf(t,f[e])){if(b||n)null==g[e]?delete d.currentVertexStyle[f[e]]:d.currentVertexStyle[f[e]]=g[e];if(k||n||0<=mxUtils.indexOf(D,f[e]))null==g[e]?delete d.currentEdgeStyle[f[e]]:d.currentEdgeStyle[f[e]]=g[e]}}null!=this.toolbar&&(this.toolbar.setFontName(d.currentVertexStyle.fontFamily|| +"default";if(window.self===window.top&&null!=d.container.parentNode)try{d.container.focus()}catch(K){}var A=d.fireMouseEvent;d.fireMouseEvent=function(a,c,f){a==mxEvent.MOUSE_DOWN&&this.container.focus();A.apply(this,arguments)};d.popupMenuHandler.autoExpand=!0;null!=this.menus&&(d.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(a,c,f){this.menus.createPopupMenu(a,c,f)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(a){d.popupMenuHandler.hideMenu()}));this.keyHandler= +this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};var t="rounded shadow glass dashed dashPattern comic labelBackgroundColor".split(" "),E="shape edgeStyle curved rounded elbow comic jumpStyle jumpSize".split(" ");this.setDefaultStyle=function(a){try{var c=d.view.getState(a);if(null!=c){var f=a.clone();f.style="";var b=d.getCellStyle(f);a=[];var f=[],g;for(g in c.style)b[g]!=c.style[g]&&(a.push(c.style[g]),f.push(g));for(var e=d.getModel().getStyle(c.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 q=n.substring(p+1);null!=b[g]&&"none"==q&&(a.push(q),f.push(g))}}d.getModel().isEdge(c.cell)?d.currentEdgeStyle={}:d.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",f,"values",a,"cells",[c.cell]))}}catch(F){this.handleError(F)}};this.clearDefaultStyle=function(){d.currentEdgeStyle=mxUtils.clone(d.defaultEdgeStyle);d.currentVertexStyle=mxUtils.clone(d.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged", +"keys",[],"values",[],"cells",[]))};var v=["fontFamily","fontSize","fontColor"],D="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),p=["startArrow startFill startSize sourcePerimeterSpacing endArrow endFill endSize targetPerimeterSpacing".split(" "),["strokeColor","strokeWidth"],["fillColor","gradientColor"],v,["opacity"],["align"],["html"]];for(a=0;a<p.length;a++)for(b=0;b<p[a].length;b++)t.push(p[a][b]);for(a=0;a<E.length;a++)0>mxUtils.indexOf(t,E[a])&&t.push(E[a]); +var C=function(a,c){var f=d.getModel();f.beginUpdate();try{if(c)for(var b=f.isEdge(n),g=b?d.currentEdgeStyle:d.currentVertexStyle,b=["fontSize","fontFamily","fontColor"],e=0;e<b.length;e++){var l=g[b[e]];null!=l&&d.setCellStyles(b[e],l,a)}else for(l=0;l<a.length;l++){for(var n=a[l],q=f.getStyle(n),C=null!=q?q.split(";"):[],x=t.slice(),e=0;e<C.length;e++){var M=C[e],K=M.indexOf("=");if(0<=K){var v=M.substring(0,K),k=mxUtils.indexOf(x,v);0<=k&&x.splice(k,1);for(var A=0;A<p.length;A++){var m=p[A];if(0<= +mxUtils.indexOf(m,v))for(var u=0;u<m.length;u++){var r=mxUtils.indexOf(x,m[u]);0<=r&&x.splice(r,1)}}}}for(var g=(b=f.isEdge(n))?d.currentEdgeStyle:d.currentVertexStyle,Y=f.getStyle(n),e=0;e<x.length;e++){var v=x[e],D=g[v];null==D||"shape"==v&&!b||b&&!(0>mxUtils.indexOf(E,v))||(Y=mxUtils.setStyle(Y,v,D))}f.setStyle(n,Y)}}finally{f.endUpdate()}};d.addListener("cellsInserted",function(a,c){C(c.getProperty("cells"))});d.addListener("textInserted",function(a,c){C(c.getProperty("cells"),!0)});d.connectionHandler.addListener(mxEvent.CONNECT, +function(a,c){var f=[c.getProperty("cell")];c.getProperty("terminalInserted")&&f.push(c.getProperty("terminal"));C(f)});this.addListener("styleChanged",mxUtils.bind(this,function(a,c){var f=c.getProperty("cells"),b=!1,g=!1;if(0<f.length)for(var e=0;e<f.length&&(b=d.getModel().isVertex(f[e])||b,!(g=d.getModel().isEdge(f[e])||g)||!b);e++);else g=b=!0;for(var f=c.getProperty("keys"),l=c.getProperty("values"),e=0;e<f.length;e++){var n=0<=mxUtils.indexOf(v,f[e]);if("strokeColor"!=f[e]||null!=l[e]&&"none"!= +l[e])if(0<=mxUtils.indexOf(E,f[e]))g||0<=mxUtils.indexOf(D,f[e])?null==l[e]?delete d.currentEdgeStyle[f[e]]:d.currentEdgeStyle[f[e]]=l[e]:b&&0<=mxUtils.indexOf(t,f[e])&&(null==l[e]?delete d.currentVertexStyle[f[e]]:d.currentVertexStyle[f[e]]=l[e]);else if(0<=mxUtils.indexOf(t,f[e])){if(b||n)null==l[e]?delete d.currentVertexStyle[f[e]]:d.currentVertexStyle[f[e]]=l[e];if(g||n||0<=mxUtils.indexOf(D,f[e]))null==l[e]?delete d.currentEdgeStyle[f[e]]:d.currentEdgeStyle[f[e]]=l[e]}}null!=this.toolbar&&(this.toolbar.setFontName(d.currentVertexStyle.fontFamily|| Menus.prototype.defaultFont),this.toolbar.setFontSize(d.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==d.currentEdgeStyle.edgeStyle&&"1"==d.currentEdgeStyle.curved?"geSprite geSprite-curved":"straight"==d.currentEdgeStyle.edgeStyle||"none"==d.currentEdgeStyle.edgeStyle||null==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-straight":"entityRelationEdgeStyle"== d.currentEdgeStyle.edgeStyle?"geSprite geSprite-entity":"elbowEdgeStyle"==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==d.currentEdgeStyle.elbow?"verticalelbow":"horizontalelbow"):"isometricEdgeStyle"==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==d.currentEdgeStyle.elbow?"verticalisometric":"horizontalisometric"):"geSprite geSprite-orthogonal"),null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==d.currentEdgeStyle.shape? "geSprite geSprite-linkedge":"flexArrow"==d.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==d.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"),null!=this.toolbar.lineStartMenu&&(this.toolbar.lineStartMenu.getElementsByTagName("div")[0].className=this.getCssClassForMarker("start",d.currentEdgeStyle.shape,d.currentEdgeStyle[mxConstants.STYLE_STARTARROW],mxUtils.getValue(d.currentEdgeStyle,"startFill","1"))),null!=this.toolbar.lineEndMenu&&(this.toolbar.lineEndMenu.getElementsByTagName("div")[0].className= @@ -2109,29 +2112,29 @@ a+"openthin":e==mxConstants.ARROW_BLOCK?"1"==d?"geSprite geSprite-"+a+"block":"g a+"ermany":"ERoneToMany"==e?"geSprite geSprite-"+a+"eronetomany":"ERzeroToOne"==e?"geSprite geSprite-"+a+"eroneopt":"ERzeroToMany"==e?"geSprite geSprite-"+a+"ermanyopt":"geSprite geSprite-noarrow"};EditorUi.prototype.createMenus=function(){return null}; EditorUi.prototype.updatePasteActionStates=function(){var a=this.editor.graph,b=this.actions.get("paste"),e=this.actions.get("pasteHere");b.setEnabled(this.editor.graph.cellEditor.isContentEditing()||!mxClipboard.isEmpty()&&a.isEnabled()&&!a.isCellLocked(a.getDefaultParent()));e.setEnabled(b.isEnabled())}; EditorUi.prototype.initClipboard=function(){var a=this,b=mxClipboard.cut;mxClipboard.cut=function(d){d.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):b.apply(this,arguments);a.updatePasteActionStates()};var e=mxClipboard.copy;mxClipboard.copy=function(b){b.cellEditor.isContentEditing()?document.execCommand("copy",!1,null):e.apply(this,arguments);a.updatePasteActionStates()};var d=mxClipboard.paste;mxClipboard.paste=function(b){var e=null;b.cellEditor.isContentEditing()?document.execCommand("paste", -!1,null):e=d.apply(this,arguments);a.updatePasteActionStates();return e};var l=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){l.apply(this,arguments);a.updatePasteActionStates()};var m=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(b,d){m.apply(this,arguments);a.updatePasteActionStates()};this.updatePasteActionStates()};EditorUi.prototype.lazyZoomDelay=20; +!1,null):e=d.apply(this,arguments);a.updatePasteActionStates();return e};var k=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){k.apply(this,arguments);a.updatePasteActionStates()};var m=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(b,d){m.apply(this,arguments);a.updatePasteActionStates()};this.updatePasteActionStates()};EditorUi.prototype.lazyZoomDelay=20; EditorUi.prototype.initCanvas=function(){var a=this.editor.graph;a.timerAutoScroll=!0;a.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((a.container.offsetWidth-34)/a.view.scale)),Math.max(0,Math.round((a.container.offsetHeight-34)/a.view.scale)))};a.view.getBackgroundPageBounds=function(){var a=this.graph.getPageLayout(),c=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*c.width),this.scale*(this.translate.y+a.y*c.height),this.scale*a.width*c.width, -this.scale*a.height*c.height)};a.getPreferredPageSize=function(a,c,f){a=this.getPageLayout();c=this.getPageSize();return new mxRectangle(0,0,a.width*c.width,a.height*c.height)};var b=null,e=this;if(this.editor.isChromelessView()){this.chromelessResize=b=mxUtils.bind(this,function(c,f,b,d){if(null!=a.container){b=null!=b?b:0;d=null!=d?d:0;var e=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),k=mxUtils.hasScrollbars(a.container),g=a.view.translate,n=a.view.scale,p=mxRectangle.fromRectangle(e); -p.x=p.x/n-g.x;p.y=p.y/n-g.y;p.width/=n;p.height/=n;var g=a.container.scrollTop,q=a.container.scrollLeft,C=mxClient.IS_QUIRKS||8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)C+=3;var E=a.container.offsetWidth-C,C=a.container.offsetHeight-C;c=c?Math.max(.3,Math.min(f||1,E/p.width)):n;f=(E-c*p.width)/2/c;var t=0==this.lightboxVerticalDivider?0:(C-c*p.height)/this.lightboxVerticalDivider/c;k&&(f=Math.max(f,0),t=Math.max(t,0));if(k||e.width<E||e.height<C)a.view.scaleAndTranslate(c, -Math.floor(f-p.x),Math.floor(t-p.y)),a.container.scrollTop=g*c/n,a.container.scrollLeft=q*c/n;else if(0!=b||0!=d)e=a.view.translate,a.view.setTranslate(Math.floor(e.x+b/n),Math.floor(e.y+d/n))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var d=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",d);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",d)});this.editor.addListener("resetGraphView", -mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(c){a.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(c){a.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var l=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*c.height)};a.getPreferredPageSize=function(a,c,f){a=this.getPageLayout();c=this.getPageSize();return new mxRectangle(0,0,a.width*c.width,a.height*c.height)};var b=null,e=this;if(this.editor.isChromelessView()){this.chromelessResize=b=mxUtils.bind(this,function(c,f,b,d){if(null!=a.container){b=null!=b?b:0;d=null!=d?d: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,q=a.container.scrollLeft,C=mxClient.IS_QUIRKS||8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)C+=3;var t=a.container.offsetWidth-C,C=a.container.offsetHeight-C;c=c?Math.max(.3,Math.min(f||1,t/p.width)):n;f=(t-c*p.width)/2/c;var M=0==this.lightboxVerticalDivider?0:(C-c*p.height)/this.lightboxVerticalDivider/c;e&&(f=Math.max(f,0),M=Math.max(M,0));if(e||g.width<t||g.height<C)a.view.scaleAndTranslate(c, +Math.floor(f-p.x),Math.floor(M-p.y)),a.container.scrollTop=l*c/n,a.container.scrollLeft=q*c/n;else if(0!=b||0!=d)g=a.view.translate,a.view.setTranslate(Math.floor(g.x+b/n),Math.floor(g.y+d/n))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var d=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",d);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",d)});this.editor.addListener("resetGraphView", +mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(c){a.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(c){a.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var k=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="50%";mxClient.IS_VML||(mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"borderRadius","20px"),mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out"));var m=mxUtils.bind(this,function(){var c=mxUtils.getCurrentStyle(a.container); this.chromelessToolbar.style.bottom=(null!=c?parseInt(c["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",m);m();var r=0,m=mxUtils.bind(this,function(a,c,f){r++;var b=document.createElement("span");b.style.paddingLeft="8px";b.style.paddingRight="8px";b.style.cursor="pointer";mxEvent.addListener(b,"click",a);null!=f&&b.setAttribute("title",f);a=document.createElement("img");a.setAttribute("border","0");a.setAttribute("src", -c);b.appendChild(a);this.chromelessToolbar.appendChild(b);return b});null!=l.backBtn&&m(mxUtils.bind(this,function(a){window.location.href=l.backBtn.url;mxEvent.consume(a)}),Editor.backLargeImage,mxResources.get("back",null,"Back"));var u=m(mxUtils.bind(this,function(a){this.actions.get("previousPage").funct();mxEvent.consume(a)}),Editor.previousLargeImage,mxResources.get("previousPage")),y=document.createElement("div");y.style.display="inline-block";y.style.verticalAlign="top";y.style.fontFamily= -"Helvetica,Arial";y.style.marginTop="8px";y.style.fontSize="14px";y.style.color="#ffffff";this.chromelessToolbar.appendChild(y);var A=m(mxUtils.bind(this,function(a){this.actions.get("nextPage").funct();mxEvent.consume(a)}),Editor.nextLargeImage,mxResources.get("nextPage")),c=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(y.innerHTML="",mxUtils.write(y,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});u.style.paddingLeft="0px"; -u.style.paddingRight="4px";A.style.paddingLeft="4px";A.style.paddingRight="0px";var f=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(A.style.display="",u.style.display="",y.style.display="inline-block"):(A.style.display="none",u.style.display="none",y.style.display="none");c()});this.editor.addListener("resetGraphView",f);this.editor.addListener("pageSelected",c);m(mxUtils.bind(this,function(a){this.actions.get("zoomOut").funct();mxEvent.consume(a)}),Editor.zoomOutLargeImage, -mxResources.get("zoomOut")+" (Alt+Mousewheel)");m(mxUtils.bind(this,function(a){this.actions.get("zoomIn").funct();mxEvent.consume(a)}),Editor.zoomInLargeImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");m(mxUtils.bind(this,function(c){a.isLightboxView()?(1==a.view.scale?this.lightboxFit():a.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(c)}),Editor.actualSizeLargeImage,mxResources.get("fit"));var k=null,q=null,n=mxUtils.bind(this,function(a){null!=k&&(window.clearTimeout(k), -fadeThead=null);null!=q&&(window.clearTimeout(q),fadeThead2=null);k=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);k=null;q=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";q=null}),600)}),a||200)}),g=mxUtils.bind(this,function(a){null!=k&&(window.clearTimeout(k),fadeThead=null);null!=q&&(window.clearTimeout(q),fadeThead2=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,a|| +c);b.appendChild(a);this.chromelessToolbar.appendChild(b);return b});null!=k.backBtn&&m(mxUtils.bind(this,function(a){window.location.href=k.backBtn.url;mxEvent.consume(a)}),Editor.backLargeImage,mxResources.get("back",null,"Back"));var u=m(mxUtils.bind(this,function(a){this.actions.get("previousPage").funct();mxEvent.consume(a)}),Editor.previousLargeImage,mxResources.get("previousPage")),y=document.createElement("div");y.style.display="inline-block";y.style.verticalAlign="top";y.style.fontFamily= +"Helvetica,Arial";y.style.marginTop="8px";y.style.fontSize="14px";y.style.color="#ffffff";this.chromelessToolbar.appendChild(y);var z=m(mxUtils.bind(this,function(a){this.actions.get("nextPage").funct();mxEvent.consume(a)}),Editor.nextLargeImage,mxResources.get("nextPage")),c=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(y.innerHTML="",mxUtils.write(y,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});u.style.paddingLeft="0px"; +u.style.paddingRight="4px";z.style.paddingLeft="4px";z.style.paddingRight="0px";var f=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(z.style.display="",u.style.display="",y.style.display="inline-block"):(z.style.display="none",u.style.display="none",y.style.display="none");c()});this.editor.addListener("resetGraphView",f);this.editor.addListener("pageSelected",c);m(mxUtils.bind(this,function(a){this.actions.get("zoomOut").funct();mxEvent.consume(a)}),Editor.zoomOutLargeImage, +mxResources.get("zoomOut")+" (Alt+Mousewheel)");m(mxUtils.bind(this,function(a){this.actions.get("zoomIn").funct();mxEvent.consume(a)}),Editor.zoomInLargeImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");m(mxUtils.bind(this,function(c){a.isLightboxView()?(1==a.view.scale?this.lightboxFit():a.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(c)}),Editor.actualSizeLargeImage,mxResources.get("fit"));var g=null,q=null,n=mxUtils.bind(this,function(a){null!=g&&(window.clearTimeout(g), +fadeThead=null);null!=q&&(window.clearTimeout(q),fadeThead2=null);g=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);g=null;q=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";q=null}),600)}),a||200)}),l=mxUtils.bind(this,function(a){null!=g&&(window.clearTimeout(g),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 x=m(mxUtils.bind(this,function(c){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=a.createLayersDialog();mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var f=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=f.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";f=mxUtils.getCurrentStyle(this.editor.graph.container); -this.layersDialog.style.zIndex=f.zIndex;document.body.appendChild(this.layersDialog)}mxEvent.consume(c)}),Editor.layersLargeImage,mxResources.get("layers")),z=a.getModel();z.addListener(mxEvent.CHANGE,function(){x.style.display=1<z.getChildCount(z.root)?"":"none"})}this.addChromelessToolbarItems(m);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||m(mxUtils.bind(this,function(c){null!=this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()): -a.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(c)}),Editor.editLargeImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(f=0;f<this.lightboxToolbarActions.length;f++){var t=this.lightboxToolbarActions[f];m(t.fn,t.icon,t.tooltip)}null!=l.refreshBtn&&m(mxUtils.bind(this,function(a){l.refreshBtn.url?window.location.href=l.refreshBtn.url:window.location.reload();mxEvent.consume(a)}),Editor.refreshLargeImage,mxResources.get("refresh",null,"Refresh"));null!=l.fullscreenBtn&& -window.self!==window.top&&m(mxUtils.bind(this,function(c){l.fullscreenBtn.url?a.openLink(l.fullscreenBtn.url):a.openLink(window.location.href);mxEvent.consume(c)}),Editor.fullscreenLargeImage,mxResources.get("openInNewWindow",null,"Open in New Window"));(l.closeBtn&&window.self===window.top||a.lightbox&&("1"==urlParams.close||this.container!=document.body))&&m(mxUtils.bind(this,function(a){"1"==urlParams.close||l.closeBtn?window.close():(this.destroy(),mxEvent.consume(a))}),Editor.closeLargeImage, -mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");a.container.appendChild(this.chromelessToolbar);mxEvent.addListener(a.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(mxEvent.isShiftDown(a)||g(30),n())}));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)?n():g(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?n():g(100);mxEvent.consume(a)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||g(30)}));var F=a.getTolerance();a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(c,f){this.startX= -f.getGraphX();this.startY=f.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(a,c){},mouseUp:function(c,f){mxEvent.isTouchEvent(f.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<F&&Math.abs(this.scrollTop-a.container.scrollTop)<F&&Math.abs(this.startX-f.getGraphX())<F&&Math.abs(this.startY-f.getGraphY())<F&&(0<parseFloat(e.chromelessToolbar.style.opacity||0)?n():g(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var v= +this.layersDialog.style.zIndex=f.zIndex;document.body.appendChild(this.layersDialog)}mxEvent.consume(c)}),Editor.layersLargeImage,mxResources.get("layers")),A=a.getModel();A.addListener(mxEvent.CHANGE,function(){x.style.display=1<A.getChildCount(A.root)?"":"none"})}this.addChromelessToolbarItems(m);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||m(mxUtils.bind(this,function(c){null!=this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()): +a.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(c)}),Editor.editLargeImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(f=0;f<this.lightboxToolbarActions.length;f++){var t=this.lightboxToolbarActions[f];m(t.fn,t.icon,t.tooltip)}null!=k.refreshBtn&&m(mxUtils.bind(this,function(a){k.refreshBtn.url?window.location.href=k.refreshBtn.url:window.location.reload();mxEvent.consume(a)}),Editor.refreshLargeImage,mxResources.get("refresh",null,"Refresh"));null!=k.fullscreenBtn&& +window.self!==window.top&&m(mxUtils.bind(this,function(c){k.fullscreenBtn.url?a.openLink(k.fullscreenBtn.url):a.openLink(window.location.href);mxEvent.consume(c)}),Editor.fullscreenLargeImage,mxResources.get("openInNewWindow",null,"Open in New Window"));(k.closeBtn&&window.self===window.top||a.lightbox&&("1"==urlParams.close||this.container!=document.body))&&m(mxUtils.bind(this,function(a){"1"==urlParams.close||k.closeBtn?window.close():(this.destroy(),mxEvent.consume(a))}),Editor.closeLargeImage, +mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");a.container.appendChild(this.chromelessToolbar);mxEvent.addListener(a.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(mxEvent.isShiftDown(a)||l(30),n())}));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)?n():l(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?n():l(100);mxEvent.consume(a)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||l(30)}));var E=a.getTolerance();a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(c,f){this.startX= +f.getGraphX();this.startY=f.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(a,c){},mouseUp:function(c,f){mxEvent.isTouchEvent(f.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<E&&Math.abs(this.scrollTop-a.container.scrollTop)<E&&Math.abs(this.startX-f.getGraphX())<E&&Math.abs(this.startY-f.getGraphY())<E&&(0<parseFloat(e.chromelessToolbar.style.opacity||0)?n():l(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var v= a.view.validate;a.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var a=this.graph.getPagePadding(),c=this.graph.getPageSize();this.translate.x=a.x-(this.x0||0)*c.width;this.translate.y=a.y-(this.y0||0)*c.height}v.apply(this,arguments)};var D=a.sizeDidChange;a.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var c=this.getPageLayout(),f=this.getPagePadding(),b=this.getPageSize(),d=Math.ceil(2*f.x+c.width* -b.width),e=Math.ceil(2*f.y+c.height*b.height),k=a.minimumGraphSize;if(null==k||k.width!=d||k.height!=e)a.minimumGraphSize=new mxRectangle(0,0,d,e);d=f.x-c.x*b.width;f=f.y-c.y*b.height;this.autoTranslate||this.view.translate.x==d&&this.view.translate.y==f?D.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=c.x,this.view.y0=c.y,c=a.view.translate.x,b=a.view.translate.y,a.view.setTranslate(d,f),a.container.scrollLeft+=Math.round((d-c)*a.view.scale),a.container.scrollTop+=Math.round((f-b)*a.view.scale), +b.width),g=Math.ceil(2*f.y+c.height*b.height),e=a.minimumGraphSize;if(null==e||e.width!=d||e.height!=g)a.minimumGraphSize=new mxRectangle(0,0,d,g);d=f.x-c.x*b.width;f=f.y-c.y*b.height;this.autoTranslate||this.view.translate.x==d&&this.view.translate.y==f?D.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=c.x,this.view.y0=c.y,c=a.view.translate.x,b=a.view.translate.y,a.view.setTranslate(d,f),a.container.scrollLeft+=Math.round((d-c)*a.view.scale),a.container.scrollTop+=Math.round((f-b)*a.view.scale), this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}a.updateZoomTimeout=null;a.cumulativeZoomFactor=1;var p=null;a.lazyZoom=function(c){null!=this.updateZoomTimeout&&window.clearTimeout(this.updateZoomTimeout);c?.15>this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor=(this.view.scale+.01)/this.view.scale:(this.cumulativeZoomFactor*=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor* 20)/20/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor=(this.view.scale-.01)/this.view.scale:(this.cumulativeZoomFactor/=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale);this.cumulativeZoomFactor=Math.max(.01,Math.min(this.view.scale*this.cumulativeZoomFactor,160)/this.view.scale);this.updateZoomTimeout=window.setTimeout(mxUtils.bind(this,function(){var c=mxUtils.getOffset(a.container), f=0,d=0;null!=p&&(f=a.container.offsetWidth/2-p.x+c.x,d=a.container.offsetHeight/2-p.y+c.y);c=this.view.scale;this.zoom(this.cumulativeZoomFactor);this.view.scale!=c&&(null!=b&&e.chromelessResize(!1,null,f*(this.cumulativeZoomFactor-1),d*(this.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(a.container)||0==f&&0==d||(a.container.scrollLeft-=f*(this.cumulativeZoomFactor-1),a.container.scrollTop-=d*(this.cumulativeZoomFactor-1)));this.cumulativeZoomFactor=1;this.updateZoomTimeout=null}),this.lazyZoomDelay)}; @@ -2151,28 +2154,28 @@ EditorUi.prototype.resetScrollbars=function(){var a=this.editor.graph;if(!this.e 1;b=a.getGraphBounds();0<b.width&&0<b.height&&(b.x>a.container.scrollLeft+.9*a.container.clientWidth&&(a.container.scrollLeft=Math.min(b.x+b.width-a.container.clientWidth,b.x-10)),b.y>a.container.scrollTop+.9*a.container.clientHeight&&(a.container.scrollTop=Math.min(b.y+b.height-a.container.clientHeight,b.y-10)))}else{var b=a.getGraphBounds(),e=Math.max(b.width,a.scrollTileSize.width*a.view.scale);a.container.scrollTop=Math.floor(Math.max(0,b.y-Math.max(20,(a.container.clientHeight-Math.max(b.height, a.scrollTileSize.height*a.view.scale))/4)));a.container.scrollLeft=Math.floor(Math.max(0,b.x-Math.max(0,(a.container.clientWidth-e)/2)))}else a.pageVisible?(b=a.view.getBackgroundPageBounds(),a.view.setTranslate(Math.floor(Math.max(0,(a.container.clientWidth-b.width)/2)-b.x),Math.floor(Math.max(0,(a.container.clientHeight-b.height)/2)-b.y))):(b=a.getGraphBounds(),a.view.setTranslate(Math.floor(Math.max(0,Math.max(0,(a.container.clientWidth-b.width)/2)-b.x)),Math.floor(Math.max(0,Math.max(20,(a.container.clientHeight- b.height)/4))-b.y)))}; -EditorUi.prototype.setPageVisible=function(a){var b=this.editor.graph,e=mxUtils.hasScrollbars(b.container),d=0,l=0;e&&(d=b.view.translate.x*b.view.scale-b.container.scrollLeft,l=b.view.translate.y*b.view.scale-b.container.scrollTop);b.pageVisible=a;b.pageBreaksVisible=a;b.preferPageSize=a;b.view.validateBackground();e&&(a=b.getSelectionCells(),b.clearSelection(),b.setSelectionCells(a));b.sizeDidChange();e&&(b.container.scrollLeft=b.view.translate.x*b.view.scale-d,b.container.scrollTop=b.view.translate.y* -b.view.scale-l);this.fireEvent(new mxEventObject("pageViewChanged"))};function ChangePageSetup(a,b,e,d){this.ui=a;this.previousColor=this.color=b;this.previousImage=this.image=e;this.previousFormat=this.format=d;this.ignoreImage=this.ignoreColor=!1} +EditorUi.prototype.setPageVisible=function(a){var b=this.editor.graph,e=mxUtils.hasScrollbars(b.container),d=0,k=0;e&&(d=b.view.translate.x*b.view.scale-b.container.scrollLeft,k=b.view.translate.y*b.view.scale-b.container.scrollTop);b.pageVisible=a;b.pageBreaksVisible=a;b.preferPageSize=a;b.view.validateBackground();e&&(a=b.getSelectionCells(),b.clearSelection(),b.setSelectionCells(a));b.sizeDidChange();e&&(b.container.scrollLeft=b.view.translate.x*b.view.scale-d,b.container.scrollTop=b.view.translate.y* +b.view.scale-k);this.fireEvent(new mxEventObject("pageViewChanged"))};function ChangePageSetup(a,b,e,d){this.ui=a;this.previousColor=this.color=b;this.previousImage=this.image=e;this.previousFormat=this.format=d;this.ignoreImage=this.ignoreColor=!1} ChangePageSetup.prototype.execute=function(){var a=this.ui.editor.graph;if(!this.ignoreColor){this.color=this.previousColor;var b=a.background;this.ui.setBackgroundColor(this.previousColor);this.previousColor=b}this.ignoreImage||(this.image=this.previousImage,b=a.backgroundImage,this.ui.setBackgroundImage(this.previousImage),this.previousImage=b);null!=this.previousFormat&&(this.format=this.previousFormat,b=a.pageFormat,this.previousFormat.width!=b.width||this.previousFormat.height!=b.height)&&(this.ui.setPageFormat(this.previousFormat), this.previousFormat=b);null!=this.foldingEnabled&&this.foldingEnabled!=this.ui.editor.graph.foldingEnabled&&(this.ui.setFoldingEnabled(this.foldingEnabled),this.foldingEnabled=!this.foldingEnabled)};(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.afterDecode=function(a,e,d){d.previousColor=d.color;d.previousImage=d.image;d.previousFormat=d.format;null!=d.foldingEnabled&&(d.foldingEnabled=!d.foldingEnabled);return d};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"),b=this.actions.get("redo"),e=this.editor.undoManager,d=mxUtils.bind(this,function(){a.setEnabled(this.canUndo());b.setEnabled(this.canRedo())});e.addListener(mxEvent.ADD,d);e.addListener(mxEvent.UNDO,d);e.addListener(mxEvent.REDO,d);e.addListener(mxEvent.CLEAR,d);var l=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){l.apply(this,arguments);d()};var m=this.editor.graph.cellEditor.stopEditing; +EditorUi.prototype.addUndoListener=function(){var a=this.actions.get("undo"),b=this.actions.get("redo"),e=this.editor.undoManager,d=mxUtils.bind(this,function(){a.setEnabled(this.canUndo());b.setEnabled(this.canRedo())});e.addListener(mxEvent.ADD,d);e.addListener(mxEvent.UNDO,d);e.addListener(mxEvent.REDO,d);e.addListener(mxEvent.CLEAR,d);var k=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){k.apply(this,arguments);d()};var m=this.editor.graph.cellEditor.stopEditing; this.editor.graph.cellEditor.stopEditing=function(a,b){m.apply(this,arguments);d()};d()}; -EditorUi.prototype.updateActionStates=function(){var a=this.editor.graph,b=!a.isSelectionEmpty(),e=!1,d=!1,l=a.getSelectionCells();if(null!=l)for(var m=0;m<l.length;m++){var r=l[m];a.getModel().isEdge(r)&&(d=!0);a.getModel().isVertex(r)&&(e=!0);if(d&&e)break}l="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(m= -0;m<l.length;m++)this.actions.get(l[m]).setEnabled(b);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(d);this.actions.get("rotation").setEnabled(e);this.actions.get("wordWrap").setEnabled(e);this.actions.get("autosize").setEnabled(e);d=e&&1== +EditorUi.prototype.updateActionStates=function(){var a=this.editor.graph,b=!a.isSelectionEmpty(),e=!1,d=!1,k=a.getSelectionCells();if(null!=k)for(var m=0;m<k.length;m++){var r=k[m];a.getModel().isEdge(r)&&(d=!0);a.getModel().isVertex(r)&&(e=!0);if(d&&e)break}k="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(m= +0;m<k.length;m++)this.actions.get(k[m]).setEnabled(b);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(d);this.actions.get("rotation").setEnabled(e);this.actions.get("wordWrap").setEnabled(e);this.actions.get("autosize").setEnabled(e);d=e&&1== a.getSelectionCount();this.actions.get("group").setEnabled(1<a.getSelectionCount()||d&&!a.isContainer(a.getSelectionCell()));this.actions.get("ungroup").setEnabled(1==a.getSelectionCount()&&(0<a.getModel().getChildCount(a.getSelectionCell())||d&&a.isContainer(a.getSelectionCell())));this.actions.get("removeFromGroup").setEnabled(d&&a.getModel().isVertex(a.getModel().getParent(a.getSelectionCell())));a.view.getState(a.getSelectionCell());this.menus.get("navigation").setEnabled(b||null!=a.view.currentRoot); this.actions.get("collapsible").setEnabled(e&&(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()));b=1==a.getSelectionCount()&&a.isCellFoldable(a.getSelectionCell());this.actions.get("expand").setEnabled(b);this.actions.get("collapse").setEnabled(b); this.actions.get("editLink").setEnabled(1==a.getSelectionCount());this.actions.get("openLink").setEnabled(1==a.getSelectionCount()&&null!=a.getLinkForCell(a.getSelectionCell()));this.actions.get("guides").setEnabled(a.isEnabled());this.actions.get("grid").setEnabled(!this.editor.chromeless||this.editor.editable);b=a.isEnabled()&&!a.isCellLocked(a.getDefaultParent());this.menus.get("layout").setEnabled(b);this.menus.get("insert").setEnabled(b);this.menus.get("direction").setEnabled(b&&e);this.menus.get("align").setEnabled(b&& e&&1<a.getSelectionCount());this.menus.get("distribute").setEnabled(b&&e&&1<a.getSelectionCount());this.actions.get("selectVertices").setEnabled(b);this.actions.get("selectEdges").setEnabled(b);this.actions.get("selectAll").setEnabled(b);this.actions.get("selectNone").setEnabled(b);this.updatePasteActionStates()}; -EditorUi.prototype.refresh=function(a){a=null!=a?a:!0;var b=mxClient.IS_IE&&(null==document.documentMode||5==document.documentMode),e=this.container.clientWidth,d=this.container.clientHeight;this.container==document.body&&(e=document.body.clientWidth||document.documentElement.clientWidth,d=b?document.body.clientHeight||document.documentElement.clientHeight:document.documentElement.clientHeight);var l=0;mxClient.IS_IOS&&!window.navigator.standalone&&window.innerHeight!=document.documentElement.clientHeight&& -(l=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var m=Math.max(0,Math.min(this.hsplitPosition,e-this.splitSize-20)),r=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",r+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",r+=this.toolbarHeight);0<r&&!mxClient.IS_QUIRKS&&(r+=1);var u=0;if(null!=this.sidebarFooterContainer){var y= -this.footerHeight+l,u=Math.max(0,Math.min(d-r-y,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=m+"px";this.sidebarFooterContainer.style.height=u+"px";this.sidebarFooterContainer.style.bottom=y+"px"}y=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=r+"px";this.sidebarContainer.style.width=m+"px";this.formatContainer.style.top=r+"px";this.formatContainer.style.width=y+"px";this.formatContainer.style.display=null!=this.format?"":"none";this.diagramContainer.style.left= -null!=this.hsplit.parentNode?m+this.splitSize+"px":"0px";this.diagramContainer.style.top=this.sidebarContainer.style.top;this.footerContainer.style.height=this.footerHeight+"px";this.hsplit.style.top=this.sidebarContainer.style.top;this.hsplit.style.bottom=this.footerHeight+l+"px";this.hsplit.style.left=m+"px";this.footerContainer.style.display=0==this.footerHeight?"none":"";null!=this.tabContainer&&(this.tabContainer.style.left=this.diagramContainer.style.left);b?(this.menubarContainer.style.width= +EditorUi.prototype.refresh=function(a){a=null!=a?a:!0;var b=mxClient.IS_IE&&(null==document.documentMode||5==document.documentMode),e=this.container.clientWidth,d=this.container.clientHeight;this.container==document.body&&(e=document.body.clientWidth||document.documentElement.clientWidth,d=b?document.body.clientHeight||document.documentElement.clientHeight:document.documentElement.clientHeight);var k=0;mxClient.IS_IOS&&!window.navigator.standalone&&window.innerHeight!=document.documentElement.clientHeight&& +(k=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var m=Math.max(0,Math.min(this.hsplitPosition,e-this.splitSize-20)),r=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",r+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",r+=this.toolbarHeight);0<r&&!mxClient.IS_QUIRKS&&(r+=1);var u=0;if(null!=this.sidebarFooterContainer){var y= +this.footerHeight+k,u=Math.max(0,Math.min(d-r-y,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=m+"px";this.sidebarFooterContainer.style.height=u+"px";this.sidebarFooterContainer.style.bottom=y+"px"}y=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=r+"px";this.sidebarContainer.style.width=m+"px";this.formatContainer.style.top=r+"px";this.formatContainer.style.width=y+"px";this.formatContainer.style.display=null!=this.format?"":"none";this.diagramContainer.style.left= +null!=this.hsplit.parentNode?m+this.splitSize+"px":"0px";this.diagramContainer.style.top=this.sidebarContainer.style.top;this.footerContainer.style.height=this.footerHeight+"px";this.hsplit.style.top=this.sidebarContainer.style.top;this.hsplit.style.bottom=this.footerHeight+k+"px";this.hsplit.style.left=m+"px";this.footerContainer.style.display=0==this.footerHeight?"none":"";null!=this.tabContainer&&(this.tabContainer.style.left=this.diagramContainer.style.left);b?(this.menubarContainer.style.width= e+"px",this.toolbarContainer.style.width=this.menubarContainer.style.width,b=Math.max(0,d-this.footerHeight-this.menubarHeight-this.toolbarHeight),this.sidebarContainer.style.height=b-u+"px",this.formatContainer.style.height=b+"px",this.diagramContainer.style.width=null!=this.hsplit.parentNode?Math.max(0,e-m-this.splitSize-y)+"px":e+"px",this.footerContainer.style.width=this.menubarContainer.style.width,u=Math.max(0,d-this.footerHeight-this.menubarHeight-this.toolbarHeight),null!=this.tabContainer&& -(this.tabContainer.style.width=this.diagramContainer.style.width,this.tabContainer.style.bottom=this.footerHeight+l+"px",u-=this.tabContainer.clientHeight),this.diagramContainer.style.height=u+"px",this.hsplit.style.height=u+"px"):(0<this.footerHeight&&(this.footerContainer.style.bottom=l+"px"),this.diagramContainer.style.right=y+"px",e=0,null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+l+"px",this.tabContainer.style.right=this.diagramContainer.style.right,e=this.tabContainer.clientHeight), -this.sidebarContainer.style.bottom=this.footerHeight+u+l+"px",this.formatContainer.style.bottom=this.footerHeight+l+"px",this.diagramContainer.style.bottom=this.footerHeight+l+e+"px");a&&this.editor.graph.sizeDidChange()};EditorUi.prototype.createTabContainer=function(){return null}; +(this.tabContainer.style.width=this.diagramContainer.style.width,this.tabContainer.style.bottom=this.footerHeight+k+"px",u-=this.tabContainer.clientHeight),this.diagramContainer.style.height=u+"px",this.hsplit.style.height=u+"px"):(0<this.footerHeight&&(this.footerContainer.style.bottom=k+"px"),this.diagramContainer.style.right=y+"px",e=0,null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+k+"px",this.tabContainer.style.right=this.diagramContainer.style.right,e=this.tabContainer.clientHeight), +this.sidebarContainer.style.bottom=this.footerHeight+u+k+"px",this.formatContainer.style.bottom=this.footerHeight+k+"px",this.diagramContainer.style.bottom=this.footerHeight+k+e+"px");a&&this.editor.graph.sizeDidChange()};EditorUi.prototype.createTabContainer=function(){return null}; EditorUi.prototype.createDivs=function(){this.menubarContainer=this.createDiv("geMenubarContainer");this.toolbarContainer=this.createDiv("geToolbarContainer");this.sidebarContainer=this.createDiv("geSidebarContainer");this.formatContainer=this.createDiv("geSidebarContainer geFormatContainer");this.diagramContainer=this.createDiv("geDiagramContainer");this.footerContainer=this.createDiv("geFooterContainer");this.hsplit=this.createDiv("geHsplit");this.hsplit.setAttribute("title",mxResources.get("collapseExpand")); this.menubarContainer.style.top="0px";this.menubarContainer.style.left="0px";this.menubarContainer.style.right="0px";this.toolbarContainer.style.left="0px";this.toolbarContainer.style.right="0px";this.sidebarContainer.style.left="0px";this.formatContainer.style.right="0px";this.formatContainer.style.zIndex="1";this.diagramContainer.style.right=(null!=this.format?this.formatWidth:0)+"px";this.footerContainer.style.left="0px";this.footerContainer.style.right="0px";this.footerContainer.style.bottom= "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}; @@ -2181,59 +2184,59 @@ this.sidebar=this.editor.chromeless?null:this.createSidebar(this.sidebarContaine this.container.appendChild(this.sidebarFooterContainer);this.container.appendChild(this.diagramContainer);null!=this.container&&null!=this.tabContainer&&this.container.appendChild(this.tabContainer);this.toolbar=this.editor.chromeless?null:this.createToolbar(this.createDiv("geToolbar"));null!=this.toolbar&&(this.toolbarContainer.appendChild(this.toolbar.container),this.container.appendChild(this.toolbarContainer));null!=this.sidebar&&(this.container.appendChild(this.hsplit),this.addSplitHandler(this.hsplit, !0,0,mxUtils.bind(this,function(a){this.hsplitPosition=a;this.refresh()})))};EditorUi.prototype.createStatusContainer=function(){var a=document.createElement("a");a.className="geItem geStatus";420>screen.width&&(a.style.maxWidth=Math.max(20,screen.width-320)+"px",a.style.overflow="hidden");return a};EditorUi.prototype.setStatusText=function(a){this.statusContainer.innerHTML=a};EditorUi.prototype.createToolbar=function(a){return new Toolbar(this,a)}; EditorUi.prototype.createSidebar=function(a){return new Sidebar(this,a)};EditorUi.prototype.createFormat=function(a){return new Format(this,a)};EditorUi.prototype.createFooter=function(){return this.createDiv("geFooter")};EditorUi.prototype.createDiv=function(a){var b=document.createElement("div");b.className=a;return b}; -EditorUi.prototype.addSplitHandler=function(a,b,e,d){function l(a){if(null!=r){var f=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a));d(Math.max(0,u+(b?f.x-r.x:r.y-f.y)-e));mxEvent.consume(a);u!=c()&&(y=!0,A=null)}}function m(a){l(a);r=u=null}var r=null,u=null,y=!0,A=null;mxClient.IS_POINTER&&(a.style.touchAction="none");var c=mxUtils.bind(this,function(){var c=parseInt(b?a.style.left:a.style.bottom);b||(c=c+e-this.footerHeight);return c});mxEvent.addGestureListeners(a,function(a){r=new mxPoint(mxEvent.getClientX(a), -mxEvent.getClientY(a));u=c();y=!1;mxEvent.consume(a)});mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){if(!y&&this.hsplitClickEnabled){var f=null!=A?A-e:0;A=c();d(f);mxEvent.consume(a)}}));mxEvent.addGestureListeners(document,null,l,m);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,l,m)})}; -EditorUi.prototype.handleError=function(a,b,e,d,l){a=null!=a&&null!=a.error?a.error:a;if(null!=a||null!=b){l=mxUtils.htmlEntities(mxResources.get("unknownError"));var m=mxResources.get("ok");b=null!=b?b:mxResources.get("error");null!=a&&null!=a.message&&(l=mxUtils.htmlEntities(a.message));this.showError(b,l,m,e,null,null,null,null,null,null,null,null,d?e:null)}else null!=e&&e()}; -EditorUi.prototype.showError=function(a,b,e,d,l,m,r,u,y,A,c,f,k){a=new ErrorDialog(this,a,b,e||mxResources.get("ok"),d,l,m,r,f,u,y);b=Math.ceil(null!=b?b.length/50:1);this.showDialog(a.container,A||340,c||100+20*b,!0,!1,k);a.init()};EditorUi.prototype.showDialog=function(a,b,e,d,l,m,r,u,y,A){this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,a,b,e,d,l,m,r,u,y,A);this.dialogs.push(this.dialog)}; +EditorUi.prototype.addSplitHandler=function(a,b,e,d){function k(a){if(null!=r){var f=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a));d(Math.max(0,u+(b?f.x-r.x:r.y-f.y)-e));mxEvent.consume(a);u!=c()&&(y=!0,z=null)}}function m(a){k(a);r=u=null}var r=null,u=null,y=!0,z=null;mxClient.IS_POINTER&&(a.style.touchAction="none");var c=mxUtils.bind(this,function(){var c=parseInt(b?a.style.left:a.style.bottom);b||(c=c+e-this.footerHeight);return c});mxEvent.addGestureListeners(a,function(a){r=new mxPoint(mxEvent.getClientX(a), +mxEvent.getClientY(a));u=c();y=!1;mxEvent.consume(a)});mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){if(!y&&this.hsplitClickEnabled){var f=null!=z?z-e:0;z=c();d(f);mxEvent.consume(a)}}));mxEvent.addGestureListeners(document,null,k,m);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,k,m)})}; +EditorUi.prototype.handleError=function(a,b,e,d,k){a=null!=a&&null!=a.error?a.error:a;if(null!=a||null!=b){k=mxUtils.htmlEntities(mxResources.get("unknownError"));var m=mxResources.get("ok");b=null!=b?b:mxResources.get("error");null!=a&&null!=a.message&&(k=mxUtils.htmlEntities(a.message));this.showError(b,k,m,e,null,null,null,null,null,null,null,null,d?e:null)}else null!=e&&e()}; +EditorUi.prototype.showError=function(a,b,e,d,k,m,r,u,y,z,c,f,g){a=new ErrorDialog(this,a,b,e||mxResources.get("ok"),d,k,m,r,f,u,y);b=Math.ceil(null!=b?b.length/50:1);this.showDialog(a.container,z||340,c||100+20*b,!0,!1,g);a.init()};EditorUi.prototype.showDialog=function(a,b,e,d,k,m,r,u,y,z){this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,a,b,e,d,k,m,r,u,y,z);this.dialogs.push(this.dialog)}; EditorUi.prototype.hideDialog=function(a,b){if(null!=this.dialogs&&0<this.dialogs.length){var e=this.dialogs.pop();0==e.close(a,b)?this.dialogs.push(e):(this.dialog=0<this.dialogs.length?this.dialogs[this.dialogs.length-1]:null,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,b){var e=this.editor.graph,d=e.cellEditor.saveSelection(),l=226+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12)),m=new ColorDialog(this,a||"none",function(a){e.cellEditor.restoreSelection(d);b(a)},function(){e.cellEditor.restoreSelection(d)});this.showDialog(m.container,230,l,!0,!1);m.init()}; +(mxUtils.clearSelection(),this.editor.graph.container.focus())}),0))}};EditorUi.prototype.pickColor=function(a,b){var e=this.editor.graph,d=e.cellEditor.saveSelection(),k=226+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12)),m=new ColorDialog(this,a||"none",function(a){e.cellEditor.restoreSelection(d);b(a)},function(){e.cellEditor.restoreSelection(d)});this.showDialog(m.container,230,k,!0,!1);m.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 b=null;try{var e=a.indexOf("<mxGraphModel ");if(0<=e){var d=a.lastIndexOf("</mxGraphModel>");d>e&&(b=a.substring(e,d+21).replace(/>/g,">").replace(/</g,"<").replace(/\\"/g,'"').replace(/\n/g,""))}}catch(l){}return b}; +EditorUi.prototype.extractGraphModelFromHtml=function(a){var b=null;try{var e=a.indexOf("<mxGraphModel ");if(0<=e){var d=a.lastIndexOf("</mxGraphModel>");d>e&&(b=a.substring(e,d+21).replace(/>/g,">").replace(/</g,"<").replace(/\\"/g,'"').replace(/\n/g,""))}}catch(k){}return b}; EditorUi.prototype.extractGraphModelFromEvent=function(a){var b=null,e=null;null!=a&&(a=null!=a.dataTransfer?a.dataTransfer:a.clipboardData,null!=a&&(10==document.documentMode||11==document.documentMode?e=a.getData("Text"):(e=0<=mxUtils.indexOf(a.types,"text/html")?a.getData("text/html"):null,mxUtils.indexOf(a.types,null==e||0==e.length)&&(e=a.getData("text/plain"))),null!=e&&(e=Graph.zapGremlins(mxUtils.trim(e)),a=this.extractGraphModelFromHtml(e),null!=a&&(e=a))));null!=e&&this.isCompatibleString(e)&& (b=e);return b};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 b=mxUtils.getXml(this.editor.getGraphXml());try{if(Editor.useLocalStorage){if(null!=localStorage.getItem(a)&&!mxUtils.confirm(mxResources.get("replaceIt",[a])))return;localStorage.setItem(a,b);this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("saved"))+" "+new Date)}else if(b.length<MAX_REQUEST_SIZE)(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(a)+"&xml="+encodeURIComponent(b))).simulate(document, "_blank");else{mxUtils.alert(mxResources.get("drawingTooLarge"));mxUtils.popup(b);return}this.editor.setModified(!1);this.editor.setFilename(a);this.updateDocumentTitle()}catch(e){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("errorSavingFile")))}}}; -EditorUi.prototype.executeLayout=function(a,b,e){var d=this.editor.graph;if(d.isEnabled()){d.getModel().beginUpdate();try{a()}catch(l){throw l;}finally{this.allowAnimation&&b&&0>navigator.userAgent.indexOf("Camino")?(a=new mxMorphing(d),a.addListener(mxEvent.DONE,mxUtils.bind(this,function(){d.getModel().endUpdate();null!=e&&e()})),a.startAnimation()):(d.getModel().endUpdate(),null!=e&&e())}}}; -EditorUi.prototype.showImageDialog=function(a,b,e,d){d=this.editor.graph.cellEditor;var l=d.saveSelection(),m=mxUtils.prompt(a,b);d.restoreSelection(l);if(null!=m&&0<m.length){var r=new Image;r.onload=function(){e(m,r.width,r.height)};r.onerror=function(){e(null);mxUtils.alert(mxResources.get("fileNotFound"))};r.src=m}else e(null)};EditorUi.prototype.showLinkDialog=function(a,b,e){a=new LinkDialog(this,a,b,e);this.showDialog(a.container,420,90,!0,!0);a.init()}; +EditorUi.prototype.executeLayout=function(a,b,e){var d=this.editor.graph;if(d.isEnabled()){d.getModel().beginUpdate();try{a()}catch(k){throw k;}finally{this.allowAnimation&&b&&0>navigator.userAgent.indexOf("Camino")?(a=new mxMorphing(d),a.addListener(mxEvent.DONE,mxUtils.bind(this,function(){d.getModel().endUpdate();null!=e&&e()})),a.startAnimation()):(d.getModel().endUpdate(),null!=e&&e())}}}; +EditorUi.prototype.showImageDialog=function(a,b,e,d){d=this.editor.graph.cellEditor;var k=d.saveSelection(),m=mxUtils.prompt(a,b);d.restoreSelection(k);if(null!=m&&0<m.length){var r=new Image;r.onload=function(){e(m,r.width,r.height)};r.onerror=function(){e(null);mxUtils.alert(mxResources.get("fileNotFound"))};r.src=m}else e(null)};EditorUi.prototype.showLinkDialog=function(a,b,e){a=new LinkDialog(this,a,b,e);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 b=mxUtils.prompt(mxResources.get("backgroundImage"),"");if(null!=b&&0<b.length){var e=new Image;e.onload=function(){a(new mxImage(b,e.width,e.height))};e.onerror=function(){a(null);mxUtils.alert(mxResources.get("fileNotFound"))};e.src=b}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,b,e){mxUtils.confirm(a)?null!=b&&b():null!=e&&e()}; EditorUi.prototype.createOutline=function(a){var b=new mxOutline(this.editor.graph);b.border=20;mxEvent.addListener(window,"resize",function(){b.update()});this.addListener("pageFormatChanged",function(){b.update()});return b};EditorUi.prototype.altShiftActions={67:"clearWaypoints",65:"connectionArrows",76:"editLink",80:"connectionPoints",84:"editTooltip",86:"pasteSize",88:"copySize"}; -EditorUi.prototype.createKeyHandler=function(a){function b(a,c,b){r.push(function(){if(!d.isSelectionEmpty()&&d.isEnabled())if(c=null!=c?c:1,b){d.getModel().beginUpdate();try{for(var f=d.getSelectionCells(),e=0;e<f.length;e++)if(d.getModel().isVertex(f[e])&&d.isCellResizable(f[e])){var k=d.getCellGeometry(f[e]);null!=k&&(k=k.clone(),37==a?k.width=Math.max(0,k.width-c):38==a?k.height=Math.max(0,k.height-c):39==a?k.width+=c:40==a&&(k.height+=c),d.getModel().setGeometry(f[e],k))}}finally{d.getModel().endUpdate()}}else f= -d.getSelectionCell(),e=d.model.getParent(f),k=null,1==d.getSelectionCount()&&d.model.isVertex(f)&&null!=d.layoutManager&&!d.isCellLocked(f)&&(k=d.layoutManager.getLayout(e)),null!=k&&k.constructor==mxStackLayout?(k=e.getIndex(f),37==a||38==a?d.model.add(e,f,Math.max(0,k-1)):39!=a&&40!=a||d.model.add(e,f,Math.min(d.model.getChildCount(e),k+1))):(e=f=0,37==a?f=-c:38==a?e=-c:39==a?f=c:40==a&&(e=c),d.moveCells(d.getMovableCells(d.getSelectionCells()),f,e))});null!=u&&window.clearTimeout(u);u=window.setTimeout(function(){if(0< -r.length){d.getModel().beginUpdate();try{for(var a=0;a<r.length;a++)r[a]();r=[]}finally{d.getModel().endUpdate()}d.scrollCellToVisible(d.getSelectionCell())}},200)}var e=this,d=this.editor.graph,l=new mxKeyHandler(d),m=l.isEventIgnored;l.isEventIgnored=function(a){return(!this.isControlDown(a)||mxEvent.isShiftDown(a)||90!=a.keyCode&&89!=a.keyCode&&188!=a.keyCode&&190!=a.keyCode&&85!=a.keyCode)&&(66!=a.keyCode&&73!=a.keyCode||!this.isControlDown(a)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&& -!mxClient.IS_SF)&&m.apply(this,arguments)};l.isEnabledForEvent=function(a){return!mxEvent.isConsumed(a)&&this.isGraphEvent(a)&&this.isEnabled()&&(null==e.dialogs||0==e.dialogs.length)};l.isControlDown=function(a){return mxEvent.isControlDown(a)||mxClient.IS_MAC&&a.metaKey};var r=[],u=null,y={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},A=l.getFunction;mxKeyHandler.prototype.getFunction=function(a){if(d.isEnabled()){if(mxEvent.isShiftDown(a)&& +EditorUi.prototype.createKeyHandler=function(a){function b(a,c,b){r.push(function(){if(!d.isSelectionEmpty()&&d.isEnabled())if(c=null!=c?c:1,b){d.getModel().beginUpdate();try{for(var f=d.getSelectionCells(),g=0;g<f.length;g++)if(d.getModel().isVertex(f[g])&&d.isCellResizable(f[g])){var e=d.getCellGeometry(f[g]);null!=e&&(e=e.clone(),37==a?e.width=Math.max(0,e.width-c):38==a?e.height=Math.max(0,e.height-c):39==a?e.width+=c:40==a&&(e.height+=c),d.getModel().setGeometry(f[g],e))}}finally{d.getModel().endUpdate()}}else f= +d.getSelectionCell(),g=d.model.getParent(f),e=null,1==d.getSelectionCount()&&d.model.isVertex(f)&&null!=d.layoutManager&&!d.isCellLocked(f)&&(e=d.layoutManager.getLayout(g)),null!=e&&e.constructor==mxStackLayout?(e=g.getIndex(f),37==a||38==a?d.model.add(g,f,Math.max(0,e-1)):39!=a&&40!=a||d.model.add(g,f,Math.min(d.model.getChildCount(g),e+1))):(g=f=0,37==a?f=-c:38==a?g=-c:39==a?f=c:40==a&&(g=c),d.moveCells(d.getMovableCells(d.getSelectionCells()),f,g))});null!=u&&window.clearTimeout(u);u=window.setTimeout(function(){if(0< +r.length){d.getModel().beginUpdate();try{for(var a=0;a<r.length;a++)r[a]();r=[]}finally{d.getModel().endUpdate()}d.scrollCellToVisible(d.getSelectionCell())}},200)}var e=this,d=this.editor.graph,k=new mxKeyHandler(d),m=k.isEventIgnored;k.isEventIgnored=function(a){return(!this.isControlDown(a)||mxEvent.isShiftDown(a)||90!=a.keyCode&&89!=a.keyCode&&188!=a.keyCode&&190!=a.keyCode&&85!=a.keyCode)&&(66!=a.keyCode&&73!=a.keyCode||!this.isControlDown(a)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&& +!mxClient.IS_SF)&&m.apply(this,arguments)};k.isEnabledForEvent=function(a){return!mxEvent.isConsumed(a)&&this.isGraphEvent(a)&&this.isEnabled()&&(null==e.dialogs||0==e.dialogs.length)};k.isControlDown=function(a){return mxEvent.isControlDown(a)||mxClient.IS_MAC&&a.metaKey};var r=[],u=null,y={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},z=k.getFunction;mxKeyHandler.prototype.getFunction=function(a){if(d.isEnabled()){if(mxEvent.isShiftDown(a)&& mxEvent.isAltDown(a)){var c=e.actions.get(e.altShiftActions[a.keyCode]);if(null!=c)return c.funct}if(9==a.keyCode&&mxEvent.isAltDown(a))return mxEvent.isShiftDown(a)?function(){d.selectParentCell()}:function(){d.selectChildCell()};if(null!=y[a.keyCode]&&!d.isSelectionEmpty())if(mxEvent.isShiftDown(a)&&mxEvent.isAltDown(a)){if(d.model.isVertex(d.getSelectionCell()))return function(){var c=d.connectVertex(d.getSelectionCell(),y[a.keyCode],d.defaultEdgeLength,a,!0);null!=c&&0<c.length&&(1==c.length&& -d.model.isEdge(c[0])?d.setSelectionCell(d.model.getTerminal(c[0],!1)):d.setSelectionCell(c[c.length-1]),d.scrollCellToVisible(d.getSelectionCell()),null!=e.hoverIcons&&e.hoverIcons.update(d.view.getState(d.getSelectionCell())))}}else return this.isControlDown(a)?function(){b(a.keyCode,mxEvent.isShiftDown(a)?d.gridSize:null,!0)}:function(){b(a.keyCode,mxEvent.isShiftDown(a)?d.gridSize:null)}}return A.apply(this,arguments)};l.bindAction=mxUtils.bind(this,function(a,c,b,d){var f=this.actions.get(b); -null!=f&&(b=function(){f.isEnabled()&&f.funct()},c?d?l.bindControlShiftKey(a,b):l.bindControlKey(a,b):d?l.bindShiftKey(a,b):l.bindKey(a,b))});var c=l.escape;l.escape=function(a){c.apply(this,arguments)};l.enter=function(){};l.bindControlShiftKey(36,function(){d.exitGroup()});l.bindControlShiftKey(35,function(){d.enterGroup()});l.bindKey(36,function(){d.home()});l.bindKey(35,function(){d.refresh()});l.bindAction(107,!0,"zoomIn");l.bindAction(109,!0,"zoomOut");l.bindAction(80,!0,"print");l.bindAction(79, -!0,"outline",!0);l.bindAction(112,!1,"about");if(!this.editor.chromeless||this.editor.editable)l.bindControlKey(36,function(){d.isEnabled()&&d.foldCells(!0)}),l.bindControlKey(35,function(){d.isEnabled()&&d.foldCells(!1)}),l.bindControlKey(13,function(){d.isEnabled()&&d.setSelectionCells(d.duplicateCells(d.getSelectionCells(),!1))}),l.bindAction(8,!1,"delete"),l.bindAction(8,!0,"deleteAll"),l.bindAction(46,!1,"delete"),l.bindAction(46,!0,"deleteAll"),l.bindAction(72,!0,"resetView"),l.bindAction(72, -!0,"fitWindow",!0),l.bindAction(74,!0,"fitPage"),l.bindAction(74,!0,"fitTwoPages",!0),l.bindAction(48,!0,"customZoom"),l.bindAction(82,!0,"turn"),l.bindAction(82,!0,"clearDefaultStyle",!0),l.bindAction(83,!0,"save"),l.bindAction(83,!0,"saveAs",!0),l.bindAction(65,!0,"selectAll"),l.bindAction(65,!0,"selectNone",!0),l.bindAction(73,!0,"selectVertices",!0),l.bindAction(69,!0,"selectEdges",!0),l.bindAction(69,!0,"editStyle"),l.bindAction(66,!0,"bold"),l.bindAction(66,!0,"toBack",!0),l.bindAction(70,!0, -"toFront",!0),l.bindAction(68,!0,"duplicate"),l.bindAction(68,!0,"setAsDefaultStyle",!0),l.bindAction(90,!0,"undo"),l.bindAction(89,!0,"autosize",!0),l.bindAction(88,!0,"cut"),l.bindAction(67,!0,"copy"),l.bindAction(86,!0,"paste"),l.bindAction(71,!0,"group"),l.bindAction(77,!0,"editData"),l.bindAction(71,!0,"grid",!0),l.bindAction(73,!0,"italic"),l.bindAction(76,!0,"lockUnlock"),l.bindAction(76,!0,"layers",!0),l.bindAction(80,!0,"formatPanel",!0),l.bindAction(85,!0,"underline"),l.bindAction(85,!0, -"ungroup",!0),l.bindAction(190,!0,"superscript"),l.bindAction(188,!0,"subscript"),l.bindKey(13,function(){d.isEnabled()&&d.startEditingAtCell()}),l.bindKey(113,function(){d.isEnabled()&&d.startEditingAtCell()});mxClient.IS_WIN?l.bindAction(89,!0,"redo"):l.bindAction(90,!0,"redo",!0);return l}; +d.model.isEdge(c[0])?d.setSelectionCell(d.model.getTerminal(c[0],!1)):d.setSelectionCell(c[c.length-1]),d.scrollCellToVisible(d.getSelectionCell()),null!=e.hoverIcons&&e.hoverIcons.update(d.view.getState(d.getSelectionCell())))}}else return this.isControlDown(a)?function(){b(a.keyCode,mxEvent.isShiftDown(a)?d.gridSize:null,!0)}:function(){b(a.keyCode,mxEvent.isShiftDown(a)?d.gridSize:null)}}return z.apply(this,arguments)};k.bindAction=mxUtils.bind(this,function(a,c,b,d){var f=this.actions.get(b); +null!=f&&(b=function(){f.isEnabled()&&f.funct()},c?d?k.bindControlShiftKey(a,b):k.bindControlKey(a,b):d?k.bindShiftKey(a,b):k.bindKey(a,b))});var c=k.escape;k.escape=function(a){c.apply(this,arguments)};k.enter=function(){};k.bindControlShiftKey(36,function(){d.exitGroup()});k.bindControlShiftKey(35,function(){d.enterGroup()});k.bindKey(36,function(){d.home()});k.bindKey(35,function(){d.refresh()});k.bindAction(107,!0,"zoomIn");k.bindAction(109,!0,"zoomOut");k.bindAction(80,!0,"print");k.bindAction(79, +!0,"outline",!0);k.bindAction(112,!1,"about");if(!this.editor.chromeless||this.editor.editable)k.bindControlKey(36,function(){d.isEnabled()&&d.foldCells(!0)}),k.bindControlKey(35,function(){d.isEnabled()&&d.foldCells(!1)}),k.bindControlKey(13,function(){d.isEnabled()&&d.setSelectionCells(d.duplicateCells(d.getSelectionCells(),!1))}),k.bindAction(8,!1,"delete"),k.bindAction(8,!0,"deleteAll"),k.bindAction(46,!1,"delete"),k.bindAction(46,!0,"deleteAll"),k.bindAction(72,!0,"resetView"),k.bindAction(72, +!0,"fitWindow",!0),k.bindAction(74,!0,"fitPage"),k.bindAction(74,!0,"fitTwoPages",!0),k.bindAction(48,!0,"customZoom"),k.bindAction(82,!0,"turn"),k.bindAction(82,!0,"clearDefaultStyle",!0),k.bindAction(83,!0,"save"),k.bindAction(83,!0,"saveAs",!0),k.bindAction(65,!0,"selectAll"),k.bindAction(65,!0,"selectNone",!0),k.bindAction(73,!0,"selectVertices",!0),k.bindAction(69,!0,"selectEdges",!0),k.bindAction(69,!0,"editStyle"),k.bindAction(66,!0,"bold"),k.bindAction(66,!0,"toBack",!0),k.bindAction(70,!0, +"toFront",!0),k.bindAction(68,!0,"duplicate"),k.bindAction(68,!0,"setAsDefaultStyle",!0),k.bindAction(90,!0,"undo"),k.bindAction(89,!0,"autosize",!0),k.bindAction(88,!0,"cut"),k.bindAction(67,!0,"copy"),k.bindAction(86,!0,"paste"),k.bindAction(71,!0,"group"),k.bindAction(77,!0,"editData"),k.bindAction(71,!0,"grid",!0),k.bindAction(73,!0,"italic"),k.bindAction(76,!0,"lockUnlock"),k.bindAction(76,!0,"layers",!0),k.bindAction(80,!0,"formatPanel",!0),k.bindAction(85,!0,"underline"),k.bindAction(85,!0, +"ungroup",!0),k.bindAction(190,!0,"superscript"),k.bindAction(188,!0,"subscript"),k.bindKey(13,function(){d.isEnabled()&&d.startEditingAtCell()}),k.bindKey(113,function(){d.isEnabled()&&d.startEditingAtCell()});mxClient.IS_WIN?k.bindAction(89,!0,"redo"):k.bindAction(90,!0,"redo",!0);return k}; 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 b=[this.menubarContainer,this.toolbarContainer,this.sidebarContainer,this.formatContainer,this.diagramContainer,this.footerContainer,this.chromelessToolbar,this.hsplit,this.sidebarFooterContainer,this.layersDialog],a=0;a<b.length;a++)null!=b[a]&&null!=b[a].parentNode&&b[a].parentNode.removeChild(b[a])};"undefined"!==typeof html4&&(html4.ATTRIBS["a::target"]=0,html4.ATTRIBS["source::src"]=0,html4.ATTRIBS["video::src"]=0);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.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(b){}})(); -mxText.prototype.baseSpacingTop=5;mxText.prototype.baseSpacingBottom=1;mxGraphModel.prototype.ignoreRelativeEdgeParent=!1;mxGraphView.prototype.gridImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhCgAKAJEAAAAAAP///8zMzP///yH5BAEAAAMALAAAAAAKAAoAAAIJ1I6py+0Po2wFADs=":IMAGE_PATH+"/grid.gif";mxGraphView.prototype.gridSteps=4;mxGraphView.prototype.minGridSize=4;mxGraphView.prototype.gridColor="#e0e0e0";mxSvgCanvas2D.prototype.foAltText="[Not supported by viewer]"; -mxShape.prototype.getConstraints=function(a,b,e){return null}; -Graph=function(a,b,e,d,l){mxGraph.call(this,a,b,e,d);this.themes=l||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);a=this.baseUrl;b=a.indexOf("//");this.domainPathUrl=this.domainUrl="";0<b&&(b=a.indexOf("/",b+2),0<b&&(this.domainUrl=a.substring(0,b)),b=a.lastIndexOf("/"),0<b&&(this.domainPathUrl=a.substring(0,b+1)));this.isHtmlLabel=function(a){var c=this.view.getState(a);a=null!=c?c.style:this.getCellStyle(a); -return null!=a?"1"==a.html||"wrap"==a[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var m=null,r=null,u=null,y=null,A=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,c){if("mouseDown"==c.getProperty("eventName")&&this.isEnabled()){var f=c.getProperty("event");if(!mxEvent.isControlDown(f.getEvent())&&!mxEvent.isShiftDown(f.getEvent())){var b=f.getState();null!=b&&this.model.isEdge(b.cell)&&(m=new mxPoint(f.getGraphX(),f.getGraphY()),A=this.isCellSelected(b.cell),u= +mxText.prototype.baseSpacingTop=5;mxText.prototype.baseSpacingBottom=1;mxGraphModel.prototype.ignoreRelativeEdgeParent=!1;mxGraphView.prototype.gridImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhCgAKAJEAAAAAAP///8zMzP///yH5BAEAAAMALAAAAAAKAAoAAAIJ1I6py+0Po2wFADs=":IMAGE_PATH+"/grid.gif";mxGraphView.prototype.gridSteps=4;mxGraphView.prototype.minGridSize=4;mxGraphView.prototype.gridColor="#e0e0e0";mxGraphView.prototype.unit=mxConstants.PIXELS; +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,b,e){return null}; +Graph=function(a,b,e,d,k){mxGraph.call(this,a,b,e,d);this.themes=k||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);a=this.baseUrl;b=a.indexOf("//");this.domainPathUrl=this.domainUrl="";0<b&&(b=a.indexOf("/",b+2),0<b&&(this.domainUrl=a.substring(0,b)),b=a.lastIndexOf("/"),0<b&&(this.domainPathUrl=a.substring(0,b+1)));this.isHtmlLabel=function(a){var c=this.view.getState(a);a=null!=c?c.style:this.getCellStyle(a); +return null!=a?"1"==a.html||"wrap"==a[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var m=null,r=null,u=null,y=null,z=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,c){if("mouseDown"==c.getProperty("eventName")&&this.isEnabled()){var f=c.getProperty("event");if(!mxEvent.isControlDown(f.getEvent())&&!mxEvent.isShiftDown(f.getEvent())){var b=f.getState();null!=b&&this.model.isEdge(b.cell)&&(m=new mxPoint(f.getGraphX(),f.getGraphY()),z=this.isCellSelected(b.cell),u= b,r=f,null!=b.text&&null!=b.text.boundingBox&&mxUtils.contains(b.text.boundingBox,f.getGraphX(),f.getGraphY())?y=mxEvent.LABEL_HANDLE:(b=this.selectionCellsHandler.getHandler(b.cell),null!=b&&null!=b.bends&&0<b.bends.length&&(y=b.getHandleForEvent(f))))}}}));this.addMouseListener({mouseDown:function(a,c){},mouseMove:mxUtils.bind(this,function(a,c){var f=this.selectionCellsHandler.handlers.map,b;for(b in f)if(null!=f[b].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isControlDown(c.getEvent())&& -!mxEvent.isShiftDown(c.getEvent())&&!mxEvent.isAltDown(c.getEvent()))if(b=this.tolerance,null!=m&&null!=u&&null!=r){if(f=u,Math.abs(m.x-c.getGraphX())>b||Math.abs(m.y-c.getGraphY())>b){this.isCellSelected(f.cell)||this.setSelectionCell(f.cell);var d=this.selectionCellsHandler.getHandler(f.cell);if(null!=d&&null!=d.bends&&0<d.bends.length){var e=d.getHandleForEvent(r),k=this.view.getEdgeStyle(f);b=k==mxEdgeStyle.EntityRelation;A||y!=mxEvent.LABEL_HANDLE||(e=y);if(b&&0!=e&&e!=d.bends.length-1&&e!=mxEvent.LABEL_HANDLE)!b|| -null==f.visibleSourceState&&null==f.visibleTargetState||(this.graphHandler.reset(),c.consume());else if(e==mxEvent.LABEL_HANDLE||0==e||null!=f.visibleSourceState||e==d.bends.length-1||null!=f.visibleTargetState)b||e==mxEvent.LABEL_HANDLE||(b=f.absolutePoints,null!=b&&(null==k&&null==e||k==mxEdgeStyle.OrthConnector)&&(e=y,null==e&&(e=new mxRectangle(m.x,m.y),e.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(e,b[0].x,b[0].y)?e=0:mxUtils.contains(e,b[b.length-1].x,b[b.length-1].y)? -e=d.bends.length-1:null!=k&&(2==b.length||3==b.length&&(0==Math.round(b[0].x-b[1].x)&&0==Math.round(b[1].x-b[2].x)||0==Math.round(b[0].y-b[1].y)&&0==Math.round(b[1].y-b[2].y)))?e=2:(e=mxUtils.findNearestSegment(f,m.x,m.y),e=null==k?mxEvent.VIRTUAL_HANDLE-e:e+1))),null==e&&(e=mxEvent.VIRTUAL_HANDLE)),d.start(c.getGraphX(),c.getGraphX(),e),y=m=r=u=null,A=!1,c.consume(),this.graphHandler.reset()}}}else if(f=c.getState(),null!=f&&this.model.isEdge(f.cell)){d=null;b=f.absolutePoints;if(null!=b)if(e=new mxRectangle(c.getGraphX(), -c.getGraphY()),e.grow(mxEdgeHandler.prototype.handleImage.width/2),null!=f.text&&null!=f.text.boundingBox&&mxUtils.contains(f.text.boundingBox,c.getGraphX(),c.getGraphY()))d="move";else if(mxUtils.contains(e,b[0].x,b[0].y)||mxUtils.contains(e,b[b.length-1].x,b[b.length-1].y))d="pointer";else if(null!=f.visibleSourceState||null!=f.visibleTargetState)k=this.view.getEdgeStyle(f),d="crosshair",k!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(f)&&(k=mxUtils.findNearestSegment(f,c.getGraphX(),c.getGraphY()), -k<b.length-1&&0<=k&&(d=0==Math.round(b[k].x-b[k+1].x)?"col-resize":"row-resize"));null!=d&&f.setCursor(d)}}),mouseUp:mxUtils.bind(this,function(a,c){y=m=r=u=null})})}this.cellRenderer.getLabelValue=function(a){var c=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);a.view.graph.isHtmlLabel(a.cell)&&(c=1!=a.style.html?mxUtils.htmlEntities(c,!1):a.view.graph.sanitizeHtml(c));return c};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0);this.setDropEnabled(!0);this.setPanning(!0); +!mxEvent.isShiftDown(c.getEvent())&&!mxEvent.isAltDown(c.getEvent()))if(b=this.tolerance,null!=m&&null!=u&&null!=r){if(f=u,Math.abs(m.x-c.getGraphX())>b||Math.abs(m.y-c.getGraphY())>b){this.isCellSelected(f.cell)||this.setSelectionCell(f.cell);var d=this.selectionCellsHandler.getHandler(f.cell);if(null!=d&&null!=d.bends&&0<d.bends.length){var g=d.getHandleForEvent(r),e=this.view.getEdgeStyle(f);b=e==mxEdgeStyle.EntityRelation;z||y!=mxEvent.LABEL_HANDLE||(g=y);if(b&&0!=g&&g!=d.bends.length-1&&g!=mxEvent.LABEL_HANDLE)!b|| +null==f.visibleSourceState&&null==f.visibleTargetState||(this.graphHandler.reset(),c.consume());else if(g==mxEvent.LABEL_HANDLE||0==g||null!=f.visibleSourceState||g==d.bends.length-1||null!=f.visibleTargetState)b||g==mxEvent.LABEL_HANDLE||(b=f.absolutePoints,null!=b&&(null==e&&null==g||e==mxEdgeStyle.OrthConnector)&&(g=y,null==g&&(g=new mxRectangle(m.x,m.y),g.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(g,b[0].x,b[0].y)?g=0:mxUtils.contains(g,b[b.length-1].x,b[b.length-1].y)? +g=d.bends.length-1:null!=e&&(2==b.length||3==b.length&&(0==Math.round(b[0].x-b[1].x)&&0==Math.round(b[1].x-b[2].x)||0==Math.round(b[0].y-b[1].y)&&0==Math.round(b[1].y-b[2].y)))?g=2:(g=mxUtils.findNearestSegment(f,m.x,m.y),g=null==e?mxEvent.VIRTUAL_HANDLE-g:g+1))),null==g&&(g=mxEvent.VIRTUAL_HANDLE)),d.start(c.getGraphX(),c.getGraphX(),g),y=m=r=u=null,z=!1,c.consume(),this.graphHandler.reset()}}}else if(f=c.getState(),null!=f&&this.model.isEdge(f.cell)){d=null;b=f.absolutePoints;if(null!=b)if(g=new mxRectangle(c.getGraphX(), +c.getGraphY()),g.grow(mxEdgeHandler.prototype.handleImage.width/2),null!=f.text&&null!=f.text.boundingBox&&mxUtils.contains(f.text.boundingBox,c.getGraphX(),c.getGraphY()))d="move";else if(mxUtils.contains(g,b[0].x,b[0].y)||mxUtils.contains(g,b[b.length-1].x,b[b.length-1].y))d="pointer";else if(null!=f.visibleSourceState||null!=f.visibleTargetState)e=this.view.getEdgeStyle(f),d="crosshair",e!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(f)&&(e=mxUtils.findNearestSegment(f,c.getGraphX(),c.getGraphY()), +e<b.length-1&&0<=e&&(d=0==Math.round(b[e].x-b[e+1].x)?"col-resize":"row-resize"));null!=d&&f.setCursor(d)}}),mouseUp:mxUtils.bind(this,function(a,c){y=m=r=u=null})})}this.cellRenderer.getLabelValue=function(a){var c=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);a.view.graph.isHtmlLabel(a.cell)&&(c=1!=a.style.html?mxUtils.htmlEntities(c,!1):a.view.graph.sanitizeHtml(c));return c};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0);this.setDropEnabled(!0);this.setPanning(!0); this.setTooltips(!0);this.setAllowLoops(!0);this.allowAutoPanning=!0;this.constrainChildren=this.resetEdgesOnConnect=!1;this.constrainRelativeChildren=!0;this.graphHandler.scrollOnMove=!1;this.graphHandler.scaleGrid=!0;this.connectionHandler.setCreateTarget(!1);this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(a,c){return!1};this.alternateEdgeStyle="vertical";null==d&&this.loadStylesheet();var c=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates= -function(){var a=c.apply(this,arguments);if(this.graph.pageVisible){for(var b=[],f=this.graph.pageFormat,d=this.graph.pageScale,e=f.width*d,f=f.height*d,d=this.graph.view.translate,k=this.graph.view.scale,g=this.graph.getPageLayout(),p=0;p<g.width;p++)b.push(new mxRectangle(((g.x+p)*e+d.x)*k,(g.y*f+d.y)*k,e*k,f*k));for(p=0;p<g.height;p++)b.push(new mxRectangle((g.x*e+d.x)*k,((g.y+p)*f+d.y)*k,e*k,f*k));a=b.concat(a)}return a};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor= +function(){var a=c.apply(this,arguments);if(this.graph.pageVisible){for(var b=[],f=this.graph.pageFormat,d=this.graph.pageScale,g=f.width*d,f=f.height*d,d=this.graph.view.translate,e=this.graph.view.scale,l=this.graph.getPageLayout(),p=0;p<l.width;p++)b.push(new mxRectangle(((l.x+p)*g+d.x)*e,(l.y*f+d.y)*e,g*e,f*e));for(p=0;p<l.height;p++)b.push(new mxRectangle((l.x*g+d.x)*e,((l.y+p)*f+d.y)*e,g*e,f*e));a=b.concat(a)}return a};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor= function(a,c){return null==a.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(a){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};this.graphHandler.getCells=function(a){for(var c=mxGraphHandler.prototype.getCells.apply(this,arguments),b=[],f=0;f<c.length;f++){var d=this.graph.view.getState(c[f]),d=null!=d?d.style:this.graph.getCellStyle(c[f]); "1"==mxUtils.getValue(d,"part","0")?(d=this.graph.model.getParent(c[f]),this.graph.model.isVertex(d)&&0>mxUtils.indexOf(c,d)&&b.push(d)):b.push(c[f])}return b};this.connectionHandler.createTargetVertex=function(a,c){var f=this.graph.view.getState(c),f=null!=f?f.style:this.graph.getCellStyle(c);mxUtils.getValue(f,"part",!1)&&(f=this.graph.model.getParent(c),this.graph.model.isVertex(f)&&(c=f));return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var f=new mxRubberband(this); -this.getRubberband=function(){return f};var k=(new Date).getTime(),q=0,n=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var a=this.currentState;n.apply(this,arguments);a!=this.currentState?(k=(new Date).getTime(),q=0):q=(new Date).getTime()-k};var g=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=this.currentState&&a.getState()==this.currentState&&2E3<q||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style, -"outlineConnect","1"))&&g.apply(this,arguments)};var x=this.isToggleEvent;this.isToggleEvent=function(a){return x.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(a)};var z=f.isForceRubberbandEvent;f.isForceRubberbandEvent=function(a){return z.apply(this,arguments)||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 t=null;this.panningHandler.addListener(mxEvent.PAN_START, -mxUtils.bind(this,function(){this.isEnabled()&&(t=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=t)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(a){return mxEvent.isMouseEvent(a.getEvent())};var F=this.click;this.click=function(a){var c=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);if(this.isEnabled()&& -!c||a.isConsumed())return F.apply(this,arguments);var f=c?a.sourceState.cell:a.getCell();null!=f&&(f=this.getLinkForCell(f),null!=f&&(this.isCustomLink(f)?this.customLinkClicked(f):this.openLink(f)));this.isEnabled()&&c&&this.clearSelection()};this.tooltipHandler.getStateForEvent=function(a){return a.sourceState};this.getCursorForMouseEvent=function(a){var c=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);return this.getCursorForCell(c?a.sourceState.cell:a.getCell())};var v= -this.getCursorForCell;this.getCursorForCell=function(a){if(!this.isEnabled()||this.isCellLocked(a)){if(null!=this.getLinkForCell(a))return"pointer";if(this.isCellLocked(a))return"default"}return v.apply(this,arguments)};this.selectRegion=function(a,c){var f=this.getAllCells(a.x,a.y,a.width,a.height);this.selectCellsForEvent(f,c);return f};this.getAllCells=function(a,c,f,b,d,e){e=null!=e?e:[];if(0<f||0<b){var k=this.getModel(),g=a+f,p=c+b;null==d&&(d=this.getCurrentRoot(),null==d&&(d=k.getRoot())); -if(null!=d)for(var n=k.getChildCount(d),E=0;E<n;E++){var q=k.getChildAt(d,E),t=this.view.getState(q);if(null!=t&&this.isCellVisible(q)&&"1"!=mxUtils.getValue(t.style,"locked","0")){var l=mxUtils.getValue(t.style,mxConstants.STYLE_ROTATION)||0;0!=l&&(t=mxUtils.getBoundingBox(t,l));(k.isEdge(q)||k.isVertex(q))&&t.x>=a&&t.y+t.height<=p&&t.y>=c&&t.x+t.width<=g&&e.push(q);this.getAllCells(a,c,f,b,q,e)}}}return e};var D=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent= +this.getRubberband=function(){return f};var g=(new Date).getTime(),q=0,n=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var a=this.currentState;n.apply(this,arguments);a!=this.currentState?(g=(new Date).getTime(),q=0):q=(new Date).getTime()-g};var l=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=this.currentState&&a.getState()==this.currentState&&2E3<q||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style, +"outlineConnect","1"))&&l.apply(this,arguments)};var x=this.isToggleEvent;this.isToggleEvent=function(a){return x.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(a)};var A=f.isForceRubberbandEvent;f.isForceRubberbandEvent=function(a){return A.apply(this,arguments)||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 t=null;this.panningHandler.addListener(mxEvent.PAN_START, +mxUtils.bind(this,function(){this.isEnabled()&&(t=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=t)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(a){return mxEvent.isMouseEvent(a.getEvent())};var E=this.click;this.click=function(a){var c=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);if(this.isEnabled()&& +!c||a.isConsumed())return E.apply(this,arguments);var f=c?a.sourceState.cell:a.getCell();null!=f&&(f=this.getLinkForCell(f),null!=f&&(this.isCustomLink(f)?this.customLinkClicked(f):this.openLink(f)));this.isEnabled()&&c&&this.clearSelection()};this.tooltipHandler.getStateForEvent=function(a){return a.sourceState};this.getCursorForMouseEvent=function(a){var c=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);return this.getCursorForCell(c?a.sourceState.cell:a.getCell())};var v= +this.getCursorForCell;this.getCursorForCell=function(a){if(!this.isEnabled()||this.isCellLocked(a)){if(null!=this.getLinkForCell(a))return"pointer";if(this.isCellLocked(a))return"default"}return v.apply(this,arguments)};this.selectRegion=function(a,c){var f=this.getAllCells(a.x,a.y,a.width,a.height);this.selectCellsForEvent(f,c);return f};this.getAllCells=function(a,c,f,b,d,g){g=null!=g?g:[];if(0<f||0<b){var e=this.getModel(),l=a+f,p=c+b;null==d&&(d=this.getCurrentRoot(),null==d&&(d=e.getRoot())); +if(null!=d)for(var n=e.getChildCount(d),q=0;q<n;q++){var M=e.getChildAt(d,q),t=this.view.getState(M);if(null!=t&&this.isCellVisible(M)&&"1"!=mxUtils.getValue(t.style,"locked","0")){var v=mxUtils.getValue(t.style,mxConstants.STYLE_ROTATION)||0;0!=v&&(t=mxUtils.getBoundingBox(t,v));(e.isEdge(M)||e.isVertex(M))&&t.x>=a&&t.y+t.height<=p&&t.y>=c&&t.x+t.width<=l&&g.push(M);this.getAllCells(a,c,f,b,M,g)}}}return g};var D=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent= function(a,c,f){return this.graph.isCellSelected(a)?!1:D.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 p=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,c){if("mouseDown"==c.getProperty("eventName")){var f=c.getProperty("event").getState();p=null==f||this.isSelectionEmpty()||this.isCellSelected(f.cell)?null: this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(a,c){if(!mxEvent.isMultiTouchEvent(c)){var b=c.getProperty("event"),d=c.getProperty("cell");null==d?(b=mxUtils.convertPoint(this.container,mxEvent.getClientX(b),mxEvent.getClientY(b)),f.start(b.x,b.y)):null!=p?this.addSelectionCells(p):1<this.getSelectionCount()&&this.isCellSelected(d)&&this.removeSelectionCell(d);p=null;c.consume()}}));this.connectionHandler.selectCells=function(a,c){this.graph.setSelectionCell(c|| a)};this.connectionHandler.constraintHandler.isStateIgnored=function(a,c){return c&&a.view.graph.isCellSelected(a.cell)};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var a=this.connectionHandler.constraintHandler;null!=a.currentFocus&&a.isStateIgnored(a.currentFocus,!0)&&(a.currentFocus=null,a.constraints=null,a.destroyIcons());a.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var C=this.updateMouseEvent;this.updateMouseEvent=function(a){a=C.apply(this, @@ -2244,59 +2247,59 @@ Graph.compress=function(a,b){if(null==a||0==a.length||"undefined"===typeof pako) 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.init=function(a){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(a,e){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var b=a.view.graph.tolerance,l=!0,m=null,r=mxUtils.bind(this,function(a){l=!0;m=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a))}),u=mxUtils.bind(this,function(a){l=l&&null!=m&&Math.abs(m.x-mxEvent.getClientX(a))<b&&Math.abs(m.y-mxEvent.getClientY(a))<b}),y=mxUtils.bind(this,function(b){if(l)for(var c=mxEvent.getSource(b);null!= +Graph.prototype.init=function(a){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(a,e){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var b=a.view.graph.tolerance,k=!0,m=null,r=mxUtils.bind(this,function(a){k=!0;m=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a))}),u=mxUtils.bind(this,function(a){k=k&&null!=m&&Math.abs(m.x-mxEvent.getClientX(a))<b&&Math.abs(m.y-mxEvent.getClientY(a))<b}),y=mxUtils.bind(this,function(b){if(k)for(var c=mxEvent.getSource(b);null!= c&&c!=e.node;){if("a"==c.nodeName.toLowerCase()){a.view.graph.labelLinkClicked(a,c,b);break}c=c.parentNode}});mxEvent.addGestureListeners(e.node,r,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.isCssTransformsSupported=function(){return this.dialect==mxConstants.DIALECT_SVG&&!mxClient.NO_FO};Graph.prototype.getCellAt=function(a,b,e,r,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,r,u,y){r=null!=r?r:!0;u=null!=u?u:!0;null==e&&(e=this.getCurrentRoot(),null==e&&(e=this.getModel().getRoot()));if(null!=e)for(var d=this.model.getChildCount(e)-1;0<=d;d--){var c=this.model.getChildAt(e,d),f=this.getScaledCellAt(a,b,c,r,u,y);if(null!=f)return f;if(this.isCellVisible(c)&&(u&&this.model.isEdge(c)||r&&this.model.isVertex(c))&&(f=this.view.getState(c),null!=f&&(null==y||!y(f,a,b))&&this.intersects(f,a,b)))return c}return null};mxCellHighlight.prototype.getStrokeWidth=function(a){a= this.strokeWidth;this.graph.useCssTransforms&&(a/=this.graph.currentScale);return a};mxGraphView.prototype.getGraphBounds=function(){var a=this.graphBounds;if(this.graph.useCssTransforms)var b=this.graph.currentTranslate,e=this.graph.currentScale,a=new mxRectangle((a.x+b.x)*e,(a.y+b.y)*e,a.width*e,a.height*e);return a};mxGraphView.prototype.viewStateChanged=function(){this.graph.useCssTransforms?this.validate():this.revalidate();this.graph.sizeDidChange()};var a=mxGraphView.prototype.validate;mxGraphView.prototype.validate= function(b){this.graph.useCssTransforms&&(this.graph.currentScale=this.scale,this.graph.currentTranslate.x=this.translate.x,this.graph.currentTranslate.y=this.translate.y,this.scale=1,this.translate.x=0,this.translate.y=0);a.apply(this,arguments);this.graph.useCssTransforms&&(this.graph.updateCssTransform(),this.scale=this.graph.currentScale,this.translate.x=this.graph.currentTranslate.x,this.translate.y=this.graph.currentTranslate.y)};Graph.prototype.updateCssTransform=function(){var a=this.view.getDrawPane(); if(null!=a)if(a=a.parentNode,this.useCssTransforms){var b=a.getAttribute("transform");a.setAttribute("transformOrigin","0 0");a.setAttribute("transform","scale("+this.currentScale+","+this.currentScale+")translate("+this.currentTranslate.x+","+this.currentTranslate.y+")");if(b!=a.getAttribute("transform"))try{if(mxClient.IS_EDGE){var e=a.style.display;a.style.display="none";a.getBBox();a.style.display=e}}catch(r){}}else a.removeAttribute("transformOrigin"),a.removeAttribute("transform")};var b=mxGraphView.prototype.validateBackgroundPage; -mxGraphView.prototype.validateBackgroundPage=function(){var a=this.graph.useCssTransforms,e=this.scale,m=this.translate;a&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);b.apply(this,arguments);a&&(this.scale=e,this.translate=m)};var e=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(a,b,m){var d=this.useCssTransforms,l=this.view.scale,y=this.view.translate;d&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms= -!1);e.apply(this,arguments);d&&(this.view.scale=l,this.view.translate=y,this.useCssTransforms=!0)}})();Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.labelLinkClicked=function(a,b,e){b=b.getAttribute("href");if(null!=b&&!this.isCustomLink(b)&&mxEvent.isLeftMouseButton(e)&&!mxEvent.isPopupTrigger(e)||mxEvent.isTouchEvent(e)){if(!this.isEnabled()||this.isCellLocked(a.cell))a=this.isBlankLink(b)?this.linkTarget:"_top",this.openLink(this.getAbsoluteUrl(b),a);mxEvent.consume(e)}}; -Graph.prototype.openLink=function(a,b,e){var d=window;try{if("_self"==b&&window!=window.top)window.location.href=a;else if(a.substring(0,this.baseUrl.length)==this.baseUrl&&"#"==a.charAt(this.baseUrl.length)&&"_top"==b&&window==window.top){var l=a.split("#")[1];window.location.hash=="#"+l&&(window.location.hash="");window.location.hash=l}else d=window.open(a,b),null==d||e||(d.opener=null)}catch(m){}return d};Graph.prototype.getLinkTitle=function(a){return a.substring(a.lastIndexOf("/")+1)}; +mxGraphView.prototype.validateBackgroundPage=function(){var a=this.graph.useCssTransforms,e=this.scale,m=this.translate;a&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);b.apply(this,arguments);a&&(this.scale=e,this.translate=m)};var e=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(a,b,m){var d=this.useCssTransforms,k=this.view.scale,y=this.view.translate;d&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms= +!1);e.apply(this,arguments);d&&(this.view.scale=k,this.view.translate=y,this.useCssTransforms=!0)}})();Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.labelLinkClicked=function(a,b,e){b=b.getAttribute("href");if(null!=b&&!this.isCustomLink(b)&&mxEvent.isLeftMouseButton(e)&&!mxEvent.isPopupTrigger(e)||mxEvent.isTouchEvent(e)){if(!this.isEnabled()||this.isCellLocked(a.cell))a=this.isBlankLink(b)?this.linkTarget:"_top",this.openLink(this.getAbsoluteUrl(b),a);mxEvent.consume(e)}}; +Graph.prototype.openLink=function(a,b,e){var d=window;try{if("_self"==b&&window!=window.top)window.location.href=a;else if(a.substring(0,this.baseUrl.length)==this.baseUrl&&"#"==a.charAt(this.baseUrl.length)&&"_top"==b&&window==window.top){var k=a.split("#")[1];window.location.hash=="#"+k&&(window.location.hash="");window.location.hash=k}else d=window.open(a,b),null==d||e||(d.opener=null)}catch(m){}return d};Graph.prototype.getLinkTitle=function(a){return a.substring(a.lastIndexOf("/")+1)}; Graph.prototype.isCustomLink=function(a){return"data:"==a.substring(0,5)};Graph.prototype.customLinkClicked=function(a){return!1};Graph.prototype.isExternalProtocol=function(a){return"mailto:"===a.substring(0,7)};Graph.prototype.isBlankLink=function(a){return!this.isExternalProtocol(a)&&("blank"===this.linkPolicy||"self"!==this.linkPolicy&&!this.isRelativeUrl(a)&&a.substring(0,this.domainUrl.length)!==this.domainUrl)}; Graph.prototype.isRelativeUrl=function(a){return null!=a&&!this.absoluteUrlPattern.test(a)&&"data:"!==a.substring(0,5)&&!this.isExternalProtocol(a)};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){a=this.graph.getCellStyle(a);if(null!=a){if("stackLayout"==a.childLayout){var b=new mxStackLayout(this.graph,!0);b.resizeParentMax="1"==mxUtils.getValue(a,"resizeParentMax","1");b.horizontal="1"==mxUtils.getValue(a,"horizontalStack","1");b.resizeParent="1"==mxUtils.getValue(a,"resizeParent","1");b.resizeLast="1"==mxUtils.getValue(a,"resizeLast","0");b.spacing=a.stackSpacing|| b.spacing;b.border=a.stackBorder||b.border;b.marginLeft=a.marginLeft||0;b.marginRight=a.marginRight||0;b.marginTop=a.marginTop||0;b.marginBottom=a.marginBottom||0;b.fill=!0;return b}if("treeLayout"==a.childLayout)return b=new mxCompactTreeLayout(this.graph),b.horizontal="1"==mxUtils.getValue(a,"horizontalTree","1"),b.resizeParent="1"==mxUtils.getValue(a,"resizeParent","1"),b.groupPadding=mxUtils.getValue(a,"parentPadding",20),b.levelDistance=mxUtils.getValue(a,"treeLevelDistance",30),b.maintainParentLocation= !0,b.edgeRouting=!1,b.resetEdges=!1,b;if("flowLayout"==a.childLayout)return b=new mxHierarchicalLayout(this.graph,mxUtils.getValue(a,"flowOrientation",mxConstants.DIRECTION_EAST)),b.resizeParent="1"==mxUtils.getValue(a,"resizeParent","1"),b.parentBorder=mxUtils.getValue(a,"parentPadding",20),b.maintainParentLocation=!0,b.intraCellSpacing=mxUtils.getValue(a,"intraCellSpacing",mxHierarchicalLayout.prototype.intraCellSpacing),b.interRankCellSpacing=mxUtils.getValue(a,"interRankCellSpacing",mxHierarchicalLayout.prototype.interRankCellSpacing), b.interHierarchySpacing=mxUtils.getValue(a,"interHierarchySpacing",mxHierarchicalLayout.prototype.interHierarchySpacing),b.parallelEdgeSpacing=mxUtils.getValue(a,"parallelEdgeSpacing",mxHierarchicalLayout.prototype.parallelEdgeSpacing),b}return null}};Graph.prototype.getPageSize=function(){return this.pageVisible?new mxRectangle(0,0,this.pageFormat.width*this.pageScale,this.pageFormat.height*this.pageScale):this.scrollTileSize}; -Graph.prototype.getPageLayout=function(){var a=this.getPageSize(),b=this.getGraphBounds();if(0==b.width||0==b.height)return new mxRectangle(0,0,1,1);var e=Math.ceil(b.x/this.view.scale-this.view.translate.x),d=Math.ceil(b.y/this.view.scale-this.view.translate.y),l=Math.floor(e/a.width),m=Math.floor(d/a.height);return new mxRectangle(l,m,Math.ceil((e+Math.floor(b.width/this.view.scale))/a.width)-l,Math.ceil((d+Math.floor(b.height/this.view.scale))/a.height)-m)}; +Graph.prototype.getPageLayout=function(){var a=this.getPageSize(),b=this.getGraphBounds();if(0==b.width||0==b.height)return new mxRectangle(0,0,1,1);var e=Math.ceil(b.x/this.view.scale-this.view.translate.x),d=Math.ceil(b.y/this.view.scale-this.view.translate.y),k=Math.floor(e/a.width),m=Math.floor(d/a.height);return new mxRectangle(k,m,Math.ceil((e+Math.floor(b.width/this.view.scale))/a.width)-k,Math.ceil((d+Math.floor(b.height/this.view.scale))/a.height)-m)}; Graph.prototype.sanitizeHtml=function(a,b){return html_sanitize(a,function(a){return null!=a&&"javascript:"!==a.toString().toLowerCase().substring(0,11)?a:null},function(a){return a})};Graph.prototype.updatePlaceholders=function(){var a=!1,b;for(b in this.model.cells){var e=this.model.cells[b];this.isReplacePlaceholders(e)&&(this.view.invalidate(e,!1,!1),a=!0)}a&&this.view.validate()};Graph.prototype.isReplacePlaceholders=function(a){return null!=a.value&&"object"==typeof a.value&&"1"==a.value.getAttribute("placeholders")}; Graph.prototype.isZoomWheelEvent=function(a){return mxEvent.isAltDown(a)||mxEvent.isMetaDown(a)&&mxClient.IS_MAC||mxEvent.isControlDown(a)&&!mxClient.IS_MAC};Graph.prototype.isTransparentClickEvent=function(a){return mxEvent.isAltDown(a)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(a)};Graph.prototype.isIgnoreTerminalEvent=function(a){return mxEvent.isShiftDown(a)&&mxEvent.isControlDown(a)}; Graph.prototype.isSplitTarget=function(a,b,e){return!this.model.isEdge(b[0])&&!mxEvent.isAltDown(e)&&!mxEvent.isShiftDown(e)&&mxGraph.prototype.isSplitTarget.apply(this,arguments)};Graph.prototype.getLabel=function(a){var b=mxGraph.prototype.getLabel.apply(this,arguments);null!=b&&this.isReplacePlaceholders(a)&&null==a.getAttribute("placeholder")&&(b=this.replacePlaceholders(a,b));return b}; Graph.prototype.isLabelMovable=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return!this.isCellLocked(a)&&(this.model.isEdge(a)&&this.edgeLabelsMovable||this.model.isVertex(a)&&(this.vertexLabelsMovable||"1"==mxUtils.getValue(b,"labelMovable","0")))};Graph.prototype.setGridSize=function(a){this.gridSize=a;this.fireEvent(new mxEventObject("gridSizeChanged"))}; Graph.prototype.getGlobalVariable=function(a){var b=null;"date"==a?b=(new Date).toLocaleDateString():"time"==a?b=(new Date).toLocaleTimeString():"timestamp"==a?b=(new Date).toLocaleString():"date{"==a.substring(0,5)&&(a=a.substring(5,a.length-1),b=this.formatDate(new Date,a));return b}; Graph.prototype.formatDate=function(a,b,e){null==this.dateFormatCache&&(this.dateFormatCache={i18n:{dayNames:"Sun Mon Tue Wed Thu Fri Sat Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),monthNames:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec January February March April May June July August September October November December".split(" ")},masks:{"default":"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy", -shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var d=this.dateFormatCache,l=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,m=/[^-+\dA-Z]/g,r=function(a,c){a=String(a);for(c=c||2;a.length<c;)a="0"+a;return a};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(a)|| -/\d/.test(a)||(b=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");b=String(d.masks[b]||b||d.masks["default"]);"UTC:"==b.slice(0,4)&&(b=b.slice(4),e=!0);var u=e?"getUTC":"get",y=a[u+"Date"](),A=a[u+"Day"](),c=a[u+"Month"](),f=a[u+"FullYear"](),k=a[u+"Hours"](),q=a[u+"Minutes"](),n=a[u+"Seconds"](),u=a[u+"Milliseconds"](),g=e?0:a.getTimezoneOffset(),x={d:y,dd:r(y),ddd:d.i18n.dayNames[A],dddd:d.i18n.dayNames[A+7],m:c+1,mm:r(c+1),mmm:d.i18n.monthNames[c],mmmm:d.i18n.monthNames[c+ -12],yy:String(f).slice(2),yyyy:f,h:k%12||12,hh:r(k%12||12),H:k,HH:r(k),M:q,MM:r(q),s:n,ss:r(n),l:r(u,3),L:r(99<u?Math.round(u/10):u),t:12>k?"a":"p",tt:12>k?"am":"pm",T:12>k?"A":"P",TT:12>k?"AM":"PM",Z:e?"UTC":(String(a).match(l)||[""]).pop().replace(m,""),o:(0<g?"-":"+")+r(100*Math.floor(Math.abs(g)/60)+Math.abs(g)%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, +shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var d=this.dateFormatCache,k=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,m=/[^-+\dA-Z]/g,r=function(a,c){a=String(a);for(c=c||2;a.length<c;)a="0"+a;return a};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(a)|| +/\d/.test(a)||(b=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");b=String(d.masks[b]||b||d.masks["default"]);"UTC:"==b.slice(0,4)&&(b=b.slice(4),e=!0);var u=e?"getUTC":"get",y=a[u+"Date"](),z=a[u+"Day"](),c=a[u+"Month"](),f=a[u+"FullYear"](),g=a[u+"Hours"](),q=a[u+"Minutes"](),n=a[u+"Seconds"](),u=a[u+"Milliseconds"](),l=e?0:a.getTimezoneOffset(),x={d:y,dd:r(y),ddd:d.i18n.dayNames[z],dddd:d.i18n.dayNames[z+7],m:c+1,mm:r(c+1),mmm:d.i18n.monthNames[c],mmmm:d.i18n.monthNames[c+ +12],yy:String(f).slice(2),yyyy:f,h:g%12||12,hh:r(g%12||12),H:g,HH:r(g),M:q,MM:r(q),s:n,ss:r(n),l:r(u,3),L:r(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(k)||[""]).pop().replace(m,""),o:(0<l?"-":"+")+r(100*Math.floor(Math.abs(l)/60)+Math.abs(l)%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),d=0;d<e;d++)mxUtils.bind(this,function(d){var e=document.createElement("div");e.style.overflow="hidden";e.style.textOverflow="ellipsis";e.style.padding="2px";e.style.whiteSpace="nowrap";var l=document.createElement("input");l.style.display="inline-block";l.setAttribute("type","checkbox");b.isVisible(d)&&(l.setAttribute("checked","checked"), -l.defaultChecked=!0);e.appendChild(l);var u=this.convertValueToString(d)||mxResources.get("background")||"Background";e.setAttribute("title",u);mxUtils.write(e,u);a.appendChild(e);mxEvent.addListener(l,"click",function(){null!=l.getAttribute("checked")?l.removeAttribute("checked"):l.setAttribute("checked","checked");b.setVisible(d,l.checked)})})(b.getChildAt(b.root,d));return a}; -Graph.prototype.replacePlaceholders=function(a,b){var e=[];if(null!=b){for(var d=0;match=this.placeholderPattern.exec(b);){var l=match[0];if(2<l.length&&"%label%"!=l&&"%tooltip%"!=l){var m=null;if(match.index>d&&"%"==b.charAt(match.index-1))m=l.substring(1);else{var r=l.substring(1,l.length-1);if(0>r.indexOf("{"))for(var u=a;null==m&&null!=u;)null!=u.value&&"object"==typeof u.value&&(m=u.hasAttribute(r)?null!=u.getAttribute(r)?u.getAttribute(r):"":null),u=this.model.getParent(u);null==m&&(m=this.getGlobalVariable(r))}e.push(b.substring(d, -match.index)+(null!=m?m:l));d=match.index+l.length}}e.push(b.substring(d))}return e.join("")};Graph.prototype.restoreSelection=function(a){if(null!=a&&0<a.length){for(var b=[],e=0;e<a.length;e++){var d=this.model.getCell(a[e].id);null!=d&&b.push(d)}this.setSelectionCells(b)}else this.clearSelection()}; +Graph.prototype.createLayersDialog=function(){var a=document.createElement("div");a.style.position="absolute";for(var b=this.getModel(),e=b.getChildCount(b.root),d=0;d<e;d++)mxUtils.bind(this,function(d){var e=document.createElement("div");e.style.overflow="hidden";e.style.textOverflow="ellipsis";e.style.padding="2px";e.style.whiteSpace="nowrap";var k=document.createElement("input");k.style.display="inline-block";k.setAttribute("type","checkbox");b.isVisible(d)&&(k.setAttribute("checked","checked"), +k.defaultChecked=!0);e.appendChild(k);var u=this.convertValueToString(d)||mxResources.get("background")||"Background";e.setAttribute("title",u);mxUtils.write(e,u);a.appendChild(e);mxEvent.addListener(k,"click",function(){null!=k.getAttribute("checked")?k.removeAttribute("checked"):k.setAttribute("checked","checked");b.setVisible(d,k.checked)})})(b.getChildAt(b.root,d));return a}; +Graph.prototype.replacePlaceholders=function(a,b){var e=[];if(null!=b){for(var d=0;match=this.placeholderPattern.exec(b);){var k=match[0];if(2<k.length&&"%label%"!=k&&"%tooltip%"!=k){var m=null;if(match.index>d&&"%"==b.charAt(match.index-1))m=k.substring(1);else{var r=k.substring(1,k.length-1);if(0>r.indexOf("{"))for(var u=a;null==m&&null!=u;)null!=u.value&&"object"==typeof u.value&&(m=u.hasAttribute(r)?null!=u.getAttribute(r)?u.getAttribute(r):"":null),u=this.model.getParent(u);null==m&&(m=this.getGlobalVariable(r))}e.push(b.substring(d, +match.index)+(null!=m?m:k));d=match.index+k.length}}e.push(b.substring(d))}return e.join("")};Graph.prototype.restoreSelection=function(a){if(null!=a&&0<a.length){for(var b=[],e=0;e<a.length;e++){var d=this.model.getCell(a[e].id);null!=d&&b.push(d)}this.setSelectionCells(b)}else this.clearSelection()}; Graph.prototype.selectCellsForConnectVertex=function(a,b,e){2==a.length&&this.model.isVertex(a[1])?(this.setSelectionCell(a[1]),null!=e&&(mxEvent.isTouchEvent(b)?e.update(e.getState(this.view.getState(a[1]))):e.reset()),this.scrollCellToVisible(a[1])):this.setSelectionCells(a)}; -Graph.prototype.connectVertex=function(a,b,e,d,l,m){if(a.geometry.relative&&this.model.isEdge(a.parent))return[];m=m?m:!1;var r=a.geometry.relative&&null!=a.parent.geometry?new mxPoint(a.parent.geometry.width*a.geometry.x,a.parent.geometry.height*a.geometry.y):new mxPoint(a.geometry.x,a.geometry.y);b==mxConstants.DIRECTION_NORTH?(r.x+=a.geometry.width/2,r.y-=e):b==mxConstants.DIRECTION_SOUTH?(r.x+=a.geometry.width/2,r.y+=a.geometry.height+e):(r.x=b==mxConstants.DIRECTION_WEST?r.x-e:r.x+(a.geometry.width+ -e),r.y+=a.geometry.height/2);e=this.view.getState(this.model.getParent(a));var u=this.view.scale,y=this.view.translate,A=y.x*u,y=y.y*u;null!=e&&this.model.isVertex(e.cell)&&(A=e.x,y=e.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(r.x+=a.parent.geometry.x,r.y+=a.parent.geometry.y);m=m||mxEvent.isControlDown(d)&&!l?null:this.getCellAt(A+r.x*u,y+r.y*u);this.model.isAncestor(m,a)&&(m=null);for(e=m;null!=e;){if(this.isCellLocked(e)){m=null;break}e=this.model.getParent(e)}null!=m&&(e=this.view.getState(a), -u=this.view.getState(m),null!=e&&null!=u&&mxUtils.intersects(e,u)&&(m=null));if(l=!mxEvent.isShiftDown(d)||l)b==mxConstants.DIRECTION_NORTH?r.y-=a.geometry.height/2:b==mxConstants.DIRECTION_SOUTH?r.y+=a.geometry.height/2:r.x=b==mxConstants.DIRECTION_WEST?r.x-a.geometry.width/2:r.x+a.geometry.width/2;null==m||this.isCellConnectable(m)||(e=this.getModel().getParent(m),this.getModel().isVertex(e)&&this.isCellConnectable(e)&&(m=e));if(m==a||this.model.isEdge(m)||!this.isCellConnectable(m))m=null;e=[]; -this.model.beginUpdate();try{u=m;if(null==u&&l){for(var A=a,c=this.getCellGeometry(a);null!=c&&c.relative;)A=this.getModel().getParent(A),c=this.getCellGeometry(A);var f=this.view.getState(A),k=null!=f?f.style:this.getCellStyle(A);if(mxUtils.getValue(k,"part",!1)){var q=this.model.getParent(A);this.model.isVertex(q)&&(A=q)}u=this.duplicateCells([A],!1)[0];c=this.getCellGeometry(u);null!=c&&(c.x=r.x-c.width/2,c.y=r.y-c.height/2)}c=null;null!=this.layoutManager&&(c=this.layoutManager.getLayout(this.model.getParent(a))); -var n=mxEvent.isControlDown(d)&&l||null==m&&null!=c&&c.constructor==mxStackLayout?null:this.insertEdge(this.model.getParent(a),null,"",a,u,this.createCurrentEdgeStyle());if(null!=n&&this.connectionHandler.insertBeforeSource){var g=null;for(d=a;null!=d.parent&&null!=d.geometry&&d.geometry.relative&&d.parent!=n.parent;)d=this.model.getParent(d);null!=d&&null!=d.parent&&d.parent==n.parent&&(g=d.parent.getIndex(d),this.model.add(d.parent,n,g))}null==m&&null!=u&&null!=c&&null!=a.parent&&c.constructor== -mxStackLayout&&b==mxConstants.DIRECTION_WEST&&(g=a.parent.getIndex(a),this.model.add(a.parent,u,g));null!=n&&e.push(n);null==m&&null!=u&&e.push(u);null==u&&null!=n&&n.geometry.setTerminalPoint(r,!1);null!=n&&this.fireEvent(new mxEventObject("cellsInserted","cells",[n]))}finally{this.model.endUpdate()}return e}; +Graph.prototype.connectVertex=function(a,b,e,d,k,m){if(a.geometry.relative&&this.model.isEdge(a.parent))return[];m=m?m:!1;var r=a.geometry.relative&&null!=a.parent.geometry?new mxPoint(a.parent.geometry.width*a.geometry.x,a.parent.geometry.height*a.geometry.y):new mxPoint(a.geometry.x,a.geometry.y);b==mxConstants.DIRECTION_NORTH?(r.x+=a.geometry.width/2,r.y-=e):b==mxConstants.DIRECTION_SOUTH?(r.x+=a.geometry.width/2,r.y+=a.geometry.height+e):(r.x=b==mxConstants.DIRECTION_WEST?r.x-e:r.x+(a.geometry.width+ +e),r.y+=a.geometry.height/2);e=this.view.getState(this.model.getParent(a));var u=this.view.scale,y=this.view.translate,z=y.x*u,y=y.y*u;null!=e&&this.model.isVertex(e.cell)&&(z=e.x,y=e.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(r.x+=a.parent.geometry.x,r.y+=a.parent.geometry.y);m=m||mxEvent.isControlDown(d)&&!k?null:this.getCellAt(z+r.x*u,y+r.y*u);this.model.isAncestor(m,a)&&(m=null);for(e=m;null!=e;){if(this.isCellLocked(e)){m=null;break}e=this.model.getParent(e)}null!=m&&(e=this.view.getState(a), +u=this.view.getState(m),null!=e&&null!=u&&mxUtils.intersects(e,u)&&(m=null));if(k=!mxEvent.isShiftDown(d)||k)b==mxConstants.DIRECTION_NORTH?r.y-=a.geometry.height/2:b==mxConstants.DIRECTION_SOUTH?r.y+=a.geometry.height/2:r.x=b==mxConstants.DIRECTION_WEST?r.x-a.geometry.width/2:r.x+a.geometry.width/2;null==m||this.isCellConnectable(m)||(e=this.getModel().getParent(m),this.getModel().isVertex(e)&&this.isCellConnectable(e)&&(m=e));if(m==a||this.model.isEdge(m)||!this.isCellConnectable(m))m=null;e=[]; +this.model.beginUpdate();try{u=m;if(null==u&&k){for(var z=a,c=this.getCellGeometry(a);null!=c&&c.relative;)z=this.getModel().getParent(z),c=this.getCellGeometry(z);var f=this.view.getState(z),g=null!=f?f.style:this.getCellStyle(z);if(mxUtils.getValue(g,"part",!1)){var q=this.model.getParent(z);this.model.isVertex(q)&&(z=q)}u=this.duplicateCells([z],!1)[0];c=this.getCellGeometry(u);null!=c&&(c.x=r.x-c.width/2,c.y=r.y-c.height/2)}c=null;null!=this.layoutManager&&(c=this.layoutManager.getLayout(this.model.getParent(a))); +var n=mxEvent.isControlDown(d)&&k||null==m&&null!=c&&c.constructor==mxStackLayout?null:this.insertEdge(this.model.getParent(a),null,"",a,u,this.createCurrentEdgeStyle());if(null!=n&&this.connectionHandler.insertBeforeSource){var l=null;for(d=a;null!=d.parent&&null!=d.geometry&&d.geometry.relative&&d.parent!=n.parent;)d=this.model.getParent(d);null!=d&&null!=d.parent&&d.parent==n.parent&&(l=d.parent.getIndex(d),this.model.add(d.parent,n,l))}null==m&&null!=u&&null!=c&&null!=a.parent&&c.constructor== +mxStackLayout&&b==mxConstants.DIRECTION_WEST&&(l=a.parent.getIndex(a),this.model.add(a.parent,u,l));null!=n&&e.push(n);null==m&&null!=u&&e.push(u);null==u&&null!=n&&n.geometry.setTerminalPoint(r,!1);null!=n&&this.fireEvent(new mxEventObject("cellsInserted","cells",[n]))}finally{this.model.endUpdate()}return e}; Graph.prototype.getIndexableText=function(){var a=document.createElement("div"),b=[],e,d;for(d in this.model.cells)if(e=this.model.cells[d],this.model.isVertex(e)||this.model.isEdge(e))this.isHtmlLabel(e)?(a.innerHTML=this.getLabel(e),e=mxUtils.extractTextWithWhitespace([a])):e=this.getLabel(e),e=mxUtils.trim(e.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<e.length&&b.push(e);return b.join(" ")}; Graph.prototype.convertValueToString=function(a){if(null!=a.value&&"object"==typeof a.value){if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder")){for(var b=a.getAttribute("placeholder"),e=a,d=null;null==d&&null!=e;)null!=e.value&&"object"==typeof e.value&&(d=e.hasAttribute(b)?null!=e.getAttribute(b)?e.getAttribute(b):"":null),e=this.model.getParent(e);return d||""}return a.value.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 b=mxGraph.prototype.getCellStyle.apply(this,arguments);if(null!=a&&null!=this.layoutManager){var e=this.model.getParent(a);this.model.isVertex(e)&&this.isCellCollapsed(a)&&(e=this.layoutManager.getLayout(e),null!=e&&e.constructor==mxStackLayout&&(b[mxConstants.STYLE_HORIZONTAL]=!e.horizontal))}return b}; Graph.prototype.updateAlternateBounds=function(a,b,e){if(null!=a&&null!=b&&null!=this.layoutManager&&null!=b.alternateBounds){var d=this.layoutManager.getLayout(this.model.getParent(a));null!=d&&d.constructor==mxStackLayout&&(d.horizontal?b.alternateBounds.height=0:b.alternateBounds.width=0)}mxGraph.prototype.updateAlternateBounds.apply(this,arguments)};Graph.prototype.isMoveCellsEvent=function(a){return mxEvent.isShiftDown(a)}; -Graph.prototype.foldCells=function(a,b,e,d,l){b=null!=b?b:!1;null==e&&(e=this.getFoldableCells(this.getSelectionCells(),a));if(null!=e){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var m=0;m<e.length;m++){var r=this.view.getState(e[m]),u=this.getCellGeometry(e[m]);if(null!=r&&null!=u){var y=Math.round(u.width-r.width/this.view.scale),A=Math.round(u.height-r.height/this.view.scale);if(0!=A||0!=y){var c=this.model.getParent(e[m]),f=this.layoutManager.getLayout(c); -null==f?null!=l&&this.isMoveCellsEvent(l)&&this.moveSiblings(r,c,y,A):null!=l&&mxEvent.isAltDown(l)||f.constructor!=mxStackLayout||f.resizeLast||this.resizeParentStacks(c,f,y,A)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(e)}}; -Graph.prototype.moveSiblings=function(a,b,e,d){this.model.beginUpdate();try{var l=this.getCellsBeyond(a.x,a.y,b,!0,!0);for(b=0;b<l.length;b++)if(l[b]!=a.cell){var m=this.view.getState(l[b]),r=this.getCellGeometry(l[b]);null!=m&&null!=r&&(r=r.clone(),r.translate(Math.round(e*Math.max(0,Math.min(1,(m.x-a.x)/a.width))),Math.round(d*Math.max(0,Math.min(1,(m.y-a.y)/a.height)))),this.model.setGeometry(l[b],r))}}finally{this.model.endUpdate()}}; -Graph.prototype.resizeParentStacks=function(a,b,e,d){if(null!=this.layoutManager&&null!=b&&b.constructor==mxStackLayout&&!b.resizeLast){this.model.beginUpdate();try{for(var l=b.horizontal;null!=a&&null!=b&&b.constructor==mxStackLayout&&b.horizontal==l&&!b.resizeLast;){var m=this.getCellGeometry(a),r=this.view.getState(a);null!=r&&null!=m&&(m=m.clone(),b.horizontal?m.width+=e+Math.min(0,r.width/this.view.scale-m.width):m.height+=d+Math.min(0,r.height/this.view.scale-m.height),this.model.setGeometry(a, +Graph.prototype.foldCells=function(a,b,e,d,k){b=null!=b?b:!1;null==e&&(e=this.getFoldableCells(this.getSelectionCells(),a));if(null!=e){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var m=0;m<e.length;m++){var r=this.view.getState(e[m]),u=this.getCellGeometry(e[m]);if(null!=r&&null!=u){var y=Math.round(u.width-r.width/this.view.scale),z=Math.round(u.height-r.height/this.view.scale);if(0!=z||0!=y){var c=this.model.getParent(e[m]),f=this.layoutManager.getLayout(c); +null==f?null!=k&&this.isMoveCellsEvent(k)&&this.moveSiblings(r,c,y,z):null!=k&&mxEvent.isAltDown(k)||f.constructor!=mxStackLayout||f.resizeLast||this.resizeParentStacks(c,f,y,z)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(e)}}; +Graph.prototype.moveSiblings=function(a,b,e,d){this.model.beginUpdate();try{var k=this.getCellsBeyond(a.x,a.y,b,!0,!0);for(b=0;b<k.length;b++)if(k[b]!=a.cell){var m=this.view.getState(k[b]),r=this.getCellGeometry(k[b]);null!=m&&null!=r&&(r=r.clone(),r.translate(Math.round(e*Math.max(0,Math.min(1,(m.x-a.x)/a.width))),Math.round(d*Math.max(0,Math.min(1,(m.y-a.y)/a.height)))),this.model.setGeometry(k[b],r))}}finally{this.model.endUpdate()}}; +Graph.prototype.resizeParentStacks=function(a,b,e,d){if(null!=this.layoutManager&&null!=b&&b.constructor==mxStackLayout&&!b.resizeLast){this.model.beginUpdate();try{for(var k=b.horizontal;null!=a&&null!=b&&b.constructor==mxStackLayout&&b.horizontal==k&&!b.resizeLast;){var m=this.getCellGeometry(a),r=this.view.getState(a);null!=r&&null!=m&&(m=m.clone(),b.horizontal?m.width+=e+Math.min(0,r.width/this.view.scale-m.width):m.height+=d+Math.min(0,r.height/this.view.scale-m.height),this.model.setGeometry(a, m));a=this.model.getParent(a);b=this.layoutManager.getLayout(a)}}finally{this.model.endUpdate()}}};Graph.prototype.isContainer=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return this.isSwimlane(a)?"0"!=b.container:"1"==b.container};Graph.prototype.isCellConnectable=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return null!=b&&null!=b.connectable?"0"!=b.connectable:mxGraph.prototype.isCellConnectable.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,b,e){e=e||this.getDefaultParent();this.isCellLocked(e)||mxGraph.prototype.selectCells.apply(this,arguments)};Graph.prototype.getSwimlaneAt=function(a,b,e){e=e||this.getDefaultParent();return this.isCellLocked(e)?null:mxGraph.prototype.getSwimlaneAt.apply(this,arguments)}; Graph.prototype.isCellFoldable=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return this.foldingEnabled&&("1"==b.treeFolding||!this.isCellLocked(a)&&(this.isContainer(a)&&"0"!=b.collapsible||!this.isContainer(a)&&"1"==b.collapsible))};Graph.prototype.reset=function(){this.isEditing()&&this.stopEditing(!0);this.escape();this.isSelectionEmpty()||this.clearSelection()}; Graph.prototype.zoom=function(a,b){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 b="";if(mxUtils.isNode(a.value)){var e=a.value.getAttribute("tooltip");if(null!=e)null!=e&&this.isReplacePlaceholders(a)&&(e=this.replacePlaceholders(a,e)),b=this.sanitizeHtml(e);else{e=this.builtInProperties;a=a.value.attributes;var d=[];this.isEnabled()&&e.push("link");for(var l=0;l<a.length;l++)0>mxUtils.indexOf(e,a[l].nodeName)&&0<a[l].nodeValue.length&&d.push({name:a[l].nodeName,value:a[l].nodeValue});d.sort(function(a,b){return a.name<b.name? --1:a.name>b.name?1:0});for(l=0;l<d.length;l++)"link"==d[l].name&&this.isCustomLink(d[l].value)||(b+=("link"!=d[l].name?"<b>"+d[l].name+":</b> ":"")+mxUtils.htmlEntities(d[l].value)+"\n");0<b.length&&(b=b.substring(0,b.length-1),mxClient.IS_SVG&&(b='<div style="max-width:360px;">'+b+"</div>"))}}return b};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 b="";if(mxUtils.isNode(a.value)){var e=a.value.getAttribute("tooltip");if(null!=e)null!=e&&this.isReplacePlaceholders(a)&&(e=this.replacePlaceholders(a,e)),b=this.sanitizeHtml(e);else{e=this.builtInProperties;a=a.value.attributes;var d=[];this.isEnabled()&&e.push("link");for(var k=0;k<a.length;k++)0>mxUtils.indexOf(e,a[k].nodeName)&&0<a[k].nodeValue.length&&d.push({name:a[k].nodeName,value:a[k].nodeValue});d.sort(function(a,b){return a.name<b.name? +-1:a.name>b.name?1:0});for(k=0;k<d.length;k++)"link"==d[k].name&&this.isCustomLink(d[k].value)||(b+=("link"!=d[k].name?"<b>"+d[k].name+":</b> ":"")+mxUtils.htmlEntities(d[k].value)+"\n");0<b.length&&(b=b.substring(0,b.length-1),mxClient.IS_SVG&&(b='<div style="max-width:360px;">'+b+"</div>"))}}return b};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,b){return Graph.compress(a,b)};Graph.prototype.decompress=function(a,b){return Graph.decompress(a,b)};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); @@ -2316,355 +2319,357 @@ this.resetActiveArrow()}));return e};HoverIcons.prototype.resetActiveArrow=funct HoverIcons.prototype.visitNodes=function(a){for(var b=0;b<this.elts.length;b++)null!=this.elts[b]&&a(this.elts[b])};HoverIcons.prototype.removeNodes=function(){this.visitNodes(function(a){null!=a.parentNode&&a.parentNode.removeChild(a)})};HoverIcons.prototype.setDisplay=function(a){this.visitNodes(function(b){b.style.display=a})};HoverIcons.prototype.isActive=function(){return null!=this.activeArrow&&null!=this.currentState}; HoverIcons.prototype.drag=function(a,b,e){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);null!=this.currentState&&(this.graph.connectionHandler.start(this.currentState,b,e),this.graph.isMouseTrigger=mxEvent.isMouseEvent(a),this.graph.isMouseDown=!0,b=this.graph.selectionCellsHandler.getHandler(this.currentState.cell),null!=b&&b.setHandlesVisible(!1),b=this.graph.connectionHandler.edgeState,null!=a&&mxEvent.isShiftDown(a)&&mxEvent.isControlDown(a)&&null!=b&&"orthogonalEdgeStyle"=== mxUtils.getValue(b.style,mxConstants.STYLE_EDGE,null)&&(a=this.getDirection(),b.cell.style=mxUtils.setStyle(b.cell.style,"sourcePortConstraint",a),b.style.sourcePortConstraint=a))};HoverIcons.prototype.getStateAt=function(a,b,e){return this.graph.view.getState(this.graph.getCellAt(b,e))}; -HoverIcons.prototype.click=function(a,b,e){var d=e.getEvent(),l=e.getGraphX(),m=e.getGraphY(),l=this.getStateAt(a,l,m);null==l||!this.graph.model.isEdge(l.cell)||mxEvent.isControlDown(d)||l.getVisibleTerminalState(!0)!=a&&l.getVisibleTerminalState(!1)!=a?null!=a&&(a=this.graph.connectVertex(a.cell,b,this.graph.defaultEdgeLength,d),this.graph.selectCellsForConnectVertex(a,d,this),2==a.length&&this.graph.model.isVertex(a[1])?(this.graph.setSelectionCell(a[1]),mxEvent.isTouchEvent(d)?this.update(this.getState(this.graph.view.getState(a[1]))): -this.reset(),this.graph.scrollCellToVisible(a[1])):this.graph.setSelectionCells(a)):(this.graph.setSelectionCell(l.cell),this.reset());e.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.click=function(a,b,e){var d=e.getEvent(),k=e.getGraphX(),m=e.getGraphY(),k=this.getStateAt(a,k,m);null==k||!this.graph.model.isEdge(k.cell)||mxEvent.isControlDown(d)||k.getVisibleTerminalState(!0)!=a&&k.getVisibleTerminalState(!1)!=a?null!=a&&(a=this.graph.connectVertex(a.cell,b,this.graph.defaultEdgeLength,d),this.graph.selectCellsForConnectVertex(a,d,this),2==a.length&&this.graph.model.isVertex(a[1])?(this.graph.setSelectionCell(a[1]),mxEvent.isTouchEvent(d)?this.update(this.getState(this.graph.view.getState(a[1]))): +this.reset(),this.graph.scrollCellToVisible(a[1])):this.graph.setSelectionCells(a)):(this.graph.setSelectionCell(k.cell),this.reset());e.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 b=this.graph.selectionCellsHandler.getHandler(this.currentState.cell);null!=b&&(a.x-=b.horizontalOffset/2,a.y-=b.verticalOffset/2,a.width+=b.horizontalOffset,a.height+=b.verticalOffset,null!=b.rotationShape&&null!=b.rotationShape.node&&"hidden"!=b.rotationShape.node.style.visibility&&"none"!=b.rotationShape.node.style.display&&null!=b.rotationShape.boundingBox&&a.add(b.rotationShape.boundingBox));this.arrowUp.style.left=Math.round(this.currentState.getCenterX()-this.triangleUp.width/2-this.tolerance)+ "px";this.arrowUp.style.top=Math.round(a.y-this.triangleUp.height-this.tolerance)+"px";mxUtils.setOpacity(this.arrowUp,this.inactiveOpacity);this.arrowRight.style.left=Math.round(a.x+a.width-this.tolerance)+"px";this.arrowRight.style.top=Math.round(this.currentState.getCenterY()-this.triangleRight.height/2-this.tolerance)+"px";mxUtils.setOpacity(this.arrowRight,this.inactiveOpacity);this.arrowDown.style.left=this.arrowUp.style.left;this.arrowDown.style.top=Math.round(a.y+a.height-this.tolerance)+ "px";mxUtils.setOpacity(this.arrowDown,this.inactiveOpacity);this.arrowLeft.style.left=Math.round(a.x-this.triangleLeft.width-this.tolerance)+"px";this.arrowLeft.style.top=this.arrowRight.style.top;mxUtils.setOpacity(this.arrowLeft,this.inactiveOpacity);if(this.checkCollisions){var b=this.graph.getCellAt(a.x+a.width+this.triangleRight.width/2,this.currentState.getCenterY()),e=this.graph.getCellAt(a.x-this.triangleLeft.width/2,this.currentState.getCenterY()),d=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!=b&&b==e&&e==d&&d==a&&(a=d=e=b=null);var l=this.graph.getCellGeometry(this.currentState.cell),m=mxUtils.bind(this,function(a,b){var d=this.graph.model.isVertex(a)&&this.graph.getCellGeometry(a);null!=a&&!this.graph.model.isAncestor(a,this.currentState.cell)&&(null==d||null==l||d.height<6*l.height&&d.width<6*l.width)?b.style.visibility="hidden":b.style.visibility="visible"}); +a.y-this.triangleUp.height/2),a=this.graph.getCellAt(this.currentState.getCenterX(),a.y+a.height+this.triangleDown.height/2);null!=b&&b==e&&e==d&&d==a&&(a=d=e=b=null);var k=this.graph.getCellGeometry(this.currentState.cell),m=mxUtils.bind(this,function(a,b){var d=this.graph.model.isVertex(a)&&this.graph.getCellGeometry(a);null!=a&&!this.graph.model.isAncestor(a,this.currentState.cell)&&(null==d||null==k||d.height<6*k.height&&d.width<6*k.width)?b.style.visibility="hidden":b.style.visibility="visible"}); m(b,this.arrowRight);m(e,this.arrowLeft);m(d,this.arrowUp);m(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(b){null!=b.parentNode&&(b=new mxRectangle(b.offsetLeft,b.offsetTop,b.offsetWidth,b.offsetHeight),null==a?a=b:a.add(b))});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 b=this.graph.getModel().getParent(a);this.graph.getModel().isVertex(b)&&this.graph.isCellConnectable(b)&&(a=b)}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,b,e){if(this.graph.connectionArrowsEnabled){null!=a&&null!=a.cell.geometry&&a.cell.geometry.relative&&this.graph.model.isEdge(a.cell.parent)&&(a=null);var d=null;this.prev!=a||this.isActive()?(this.startTime=(new Date).getTime(),this.prev=a,d=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=a&&(this.updateThread=window.setTimeout(mxUtils.bind(this,function(){this.isActive()||this.graph.isMouseDown||this.graph.panningHandler.isActive()|| -(this.prev=a,this.update(a,b,e))}),this.updateDelay+10))):null!=this.startTime&&(d=(new Date).getTime()-this.startTime);this.setDisplay("");null!=this.currentState&&this.currentState!=a&&d<this.activationDelay&&null!=this.bbox&&!mxUtils.contains(this.bbox,b,e)?this.reset(!1):(null!=this.currentState||d>this.activationDelay)&&this.currentState!=a&&(d>this.updateDelay&&null!=a||null==this.bbox||null==b||null==e||!mxUtils.contains(this.bbox,b,e))&&(null!=a&&this.graph.isEnabled()?(this.removeNodes(), -this.setCurrentState(a),this.repaint(),this.graph.connectionHandler.constraintHandler.currentFocus!=a&&this.graph.connectionHandler.constraintHandler.reset()):this.reset())}else this.reset()};HoverIcons.prototype.setCurrentState=function(a){"eastwest"!=a.style.portConstraint&&(this.graph.container.appendChild(this.arrowUp),this.graph.container.appendChild(this.arrowDown));this.graph.container.appendChild(this.arrowRight);this.graph.container.appendChild(this.arrowLeft);this.currentState=a}; +HoverIcons.prototype.update=function(a,b,e){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 d=null;this.prev!=a||this.isActive()?(this.startTime=(new Date).getTime(),this.prev=a,d=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=a&&(this.updateThread=window.setTimeout(mxUtils.bind(this,function(){this.isActive()|| +this.graph.isMouseDown||this.graph.panningHandler.isActive()||(this.prev=a,this.update(a,b,e))}),this.updateDelay+10))):null!=this.startTime&&(d=(new Date).getTime()-this.startTime);this.setDisplay("");null!=this.currentState&&this.currentState!=a&&d<this.activationDelay&&null!=this.bbox&&!mxUtils.contains(this.bbox,b,e)?this.reset(!1):(null!=this.currentState||d>this.activationDelay)&&this.currentState!=a&&(d>this.updateDelay&&null!=a||null==this.bbox||null==b||null==e||!mxUtils.contains(this.bbox, +b,e))&&(null!=a&&this.graph.isEnabled()?(this.removeNodes(),this.setCurrentState(a),this.repaint(),this.graph.connectionHandler.constraintHandler.currentFocus!=a&&this.graph.connectionHandler.constraintHandler.reset()):this.reset())}}; +HoverIcons.prototype.setCurrentState=function(a){"eastwest"!=a.style.portConstraint&&(this.graph.container.appendChild(this.arrowUp),this.graph.container.appendChild(this.arrowDown));this.graph.container.appendChild(this.arrowRight);this.graph.container.appendChild(this.arrowLeft);this.currentState=a}; (function(){var a=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){a.apply(this,arguments);this.validEdges=[]};var b=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(a,d){d=null!=d?d:!0;var c=this.getState(a);null!=c&&d&&this.graph.model.isEdge(c.cell)&&null!=c.style&&1!=c.style[mxConstants.STYLE_CURVED]&&!c.invalid&&this.updateLineJumps(c)&&this.graph.cellRenderer.redraw(c,!1,this.isRendering());c=b.apply(this, arguments);null!=c&&d&&this.graph.model.isEdge(c.cell)&&null!=c.style&&1!=c.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(c);return c};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 d=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=function(a){d.apply(this,arguments);this.graph.model.isEdge(a.cell)&& -1!=a.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(a)};mxGraphView.prototype.updateLineJumps=function(a){var b=a.absolutePoints;if(Graph.lineJumpsEnabled){var c=null!=a.routedPoints,f=null;if(null!=b&&null!=this.validEdges&&"none"!==mxUtils.getValue(a.style,"jumpStyle","none")){for(var d=function(c,b,d){var e=new mxPoint(b,d);e.type=c;f.push(e);e=null!=a.routedPoints?a.routedPoints[f.length-1]:null;return null==e||e.type!=c||e.x!=b||e.y!=d},e=.5*this.scale,c=!1,f=[],n=0;n<b.length-1;n++){for(var g= -b[n+1],x=b[n],l=[],t=b[n+2];n<b.length-2&&mxUtils.ptSegDistSq(x.x,x.y,t.x,t.y,g.x,g.y)<1*this.scale*this.scale;)g=t,n++,t=b[n+2];for(var c=d(0,x.x,x.y)||c,u=0;u<this.validEdges.length;u++){var v=this.validEdges[u],m=v.absolutePoints;if(null!=m&&mxUtils.intersects(a,v)&&"1"!=v.style.noJump)for(v=0;v<m.length-1;v++){for(var p=m[v+1],C=m[v],t=m[v+2];v<m.length-2&&mxUtils.ptSegDistSq(C.x,C.y,t.x,t.y,p.x,p.y)<1*this.scale*this.scale;)p=t,v++,t=m[v+2];t=mxUtils.intersection(x.x,x.y,g.x,g.y,C.x,C.y,p.x, -p.y);if(null!=t&&(Math.abs(t.x-x.x)>e||Math.abs(t.y-x.y)>e)&&(Math.abs(t.x-g.x)>e||Math.abs(t.y-g.y)>e)&&(Math.abs(t.x-C.x)>e||Math.abs(t.y-C.y)>e)&&(Math.abs(t.x-p.x)>e||Math.abs(t.y-p.y)>e)){p=t.x-x.x;C=t.y-x.y;t={distSq:p*p+C*C,x:t.x,y:t.y};for(p=0;p<l.length;p++)if(l[p].distSq>t.distSq){l.splice(p,0,t);t=null;break}null==t||0!=l.length&&l[l.length-1].x===t.x&&l[l.length-1].y===t.y||l.push(t)}}}for(v=0;v<l.length;v++)c=d(1,l[v].x,l[v].y)||c}t=b[b.length-1];c=d(0,t.x,t.y)||c}a.routedPoints=f;return c}return!1}; -var l=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)l.apply(this,arguments);else{var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,d=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,e=mxUtils.getValue(this.style, -"jumpStyle","none"),n,g=!0,x=null,z=null;n=[];var t=null;a.begin();for(var u=0;u<this.state.routedPoints.length;u++){var v=this.state.routedPoints[u],m=new mxPoint(v.x/this.scale,v.y/this.scale);0==u?m=b[0]:u==this.state.routedPoints.length-1&&(m=b[b.length-1]);var p=!1;if(null!=x&&1==v.type){var C=this.state.routedPoints[u+1],v=C.x/this.scale-m.x,C=C.y/this.scale-m.y,v=v*v+C*C;null==t&&(t=new mxPoint(m.x-x.x,m.y-x.y),z=Math.sqrt(t.x*t.x+t.y*t.y),0<z?(t.x=t.x*d/z,t.y=t.y*d/z):t=null);v>d*d&&0<z&& -(v=x.x-m.x,C=x.y-m.y,v=v*v+C*C,v>d*d&&(p=new mxPoint(m.x-t.x,m.y-t.y),v=new mxPoint(m.x+t.x,m.y+t.y),n.push(p),this.addPoints(a,n,c,f,!1,null,g),n=0>Math.round(t.x)||0==Math.round(t.x)&&0>=Math.round(t.y)?1:-1,g=!1,"sharp"==e?(a.lineTo(p.x-t.y*n,p.y+t.x*n),a.lineTo(v.x-t.y*n,v.y+t.x*n),a.lineTo(v.x,v.y)):"arc"==e?(n*=1.3,a.curveTo(p.x-t.y*n,p.y+t.x*n,v.x-t.y*n,v.y+t.x*n,v.x,v.y)):(a.moveTo(v.x,v.y),g=!0),n=[v],p=!0))}else t=null;p||(n.push(m),x=m)}this.addPoints(a,n,c,f,!1,null,g);a.stroke()}};var m= -mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(a,b,c,f){if(null==b||null==a||"1"!=b.style.snapToPoint&&"1"!=a.style.snapToPoint)m.apply(this,arguments);else{b=this.getTerminalPort(a,b,f);var d=this.getNextPoint(a,c,f),e=this.graph.isOrthogonal(a),n=mxUtils.toRadians(Number(b.style[mxConstants.STYLE_ROTATION]||"0")),g=new mxPoint(b.getCenterX(),b.getCenterY());if(0!=n)var x=Math.cos(-n),l=Math.sin(-n),d=mxUtils.getRotatedPoint(d,x,l,g); -x=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]||0);x+=parseFloat(a.style[f?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);d=this.getPerimeterPoint(b,d,0==n&&e,x);0!=n&&(x=Math.cos(n),l=Math.sin(n),d=mxUtils.getRotatedPoint(d,x,l,g));a.setAbsoluteTerminalPoint(this.snapToAnchorPoint(a,b,c,f,d),f)}};mxGraphView.prototype.snapToAnchorPoint=function(a,b,c,f,d){if(null!=b&&null!=a){a=this.graph.getAllConnectionConstraints(b);f=c=null;if(null!=a)for(var e= -0;e<a.length;e++){var k=this.graph.getConnectionPoint(b,a[e]);if(null!=k){var g=(k.x-d.x)*(k.x-d.x)+(k.y-d.y)*(k.y-d.y);if(null==f||g<f)c=k,f=g}}null!=c&&(d=c)}return d};var r=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(a,b,c){var f=r.apply(this,arguments);"1"==a.getAttribute("placeholders")&&null!=c.state&&(f=c.state.view.graph.replacePlaceholders(c.state.cell,f));return f};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 c=b.substring(8,b.length-1),f=mxUtils.parseXml(Graph.decompress(c));return new mxShape(new mxStencil(f.documentElement))}catch(k){null!=window.console&&console.log("Error in shape: "+k)}}return u.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0; +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,f=null;if(null!=b&&null!=this.validEdges&&"none"!==mxUtils.getValue(a.style,"jumpStyle","none")){for(var d=function(c,b,d){var e=new mxPoint(b,d);e.type=c;f.push(e);e=null!=a.routedPoints?a.routedPoints[f.length-1]:null;return null==e||e.type!=c||e.x!=b||e.y!=d},e=.5*this.scale,c=!1,f=[],n=0;n<b.length-1;n++){for(var l= +b[n+1],x=b[n],k=[],t=b[n+2];n<b.length-2&&mxUtils.ptSegDistSq(x.x,x.y,t.x,t.y,l.x,l.y)<1*this.scale*this.scale;)l=t,n++,t=b[n+2];for(var c=d(0,x.x,x.y)||c,m=0;m<this.validEdges.length;m++){var v=this.validEdges[m],u=v.absolutePoints;if(null!=u&&mxUtils.intersects(a,v)&&"1"!=v.style.noJump)for(v=0;v<u.length-1;v++){for(var p=u[v+1],C=u[v],t=u[v+2];v<u.length-2&&mxUtils.ptSegDistSq(C.x,C.y,t.x,t.y,p.x,p.y)<1*this.scale*this.scale;)p=t,v++,t=u[v+2];t=mxUtils.intersection(x.x,x.y,l.x,l.y,C.x,C.y,p.x, +p.y);if(null!=t&&(Math.abs(t.x-x.x)>e||Math.abs(t.y-x.y)>e)&&(Math.abs(t.x-l.x)>e||Math.abs(t.y-l.y)>e)&&(Math.abs(t.x-C.x)>e||Math.abs(t.y-C.y)>e)&&(Math.abs(t.x-p.x)>e||Math.abs(t.y-p.y)>e)){p=t.x-x.x;C=t.y-x.y;t={distSq:p*p+C*C,x:t.x,y:t.y};for(p=0;p<k.length;p++)if(k[p].distSq>t.distSq){k.splice(p,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(v=0;v<k.length;v++)c=d(1,k[v].x,k[v].y)||c}t=b[b.length-1];c=d(0,t.x,t.y)||c}a.routedPoints=f;return c}return!1}; +var k=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)k.apply(this,arguments);else{var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,d=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,e=mxUtils.getValue(this.style, +"jumpStyle","none"),n,l=!0,x=null,A=null;n=[];var t=null;a.begin();for(var u=0;u<this.state.routedPoints.length;u++){var v=this.state.routedPoints[u],m=new mxPoint(v.x/this.scale,v.y/this.scale);0==u?m=b[0]:u==this.state.routedPoints.length-1&&(m=b[b.length-1]);var p=!1;if(null!=x&&1==v.type){var C=this.state.routedPoints[u+1],v=C.x/this.scale-m.x,C=C.y/this.scale-m.y,v=v*v+C*C;null==t&&(t=new mxPoint(m.x-x.x,m.y-x.y),A=Math.sqrt(t.x*t.x+t.y*t.y),0<A?(t.x=t.x*d/A,t.y=t.y*d/A):t=null);v>d*d&&0<A&& +(v=x.x-m.x,C=x.y-m.y,v=v*v+C*C,v>d*d&&(p=new mxPoint(m.x-t.x,m.y-t.y),v=new mxPoint(m.x+t.x,m.y+t.y),n.push(p),this.addPoints(a,n,c,f,!1,null,l),n=0>Math.round(t.x)||0==Math.round(t.x)&&0>=Math.round(t.y)?1:-1,l=!1,"sharp"==e?(a.lineTo(p.x-t.y*n,p.y+t.x*n),a.lineTo(v.x-t.y*n,v.y+t.x*n),a.lineTo(v.x,v.y)):"arc"==e?(n*=1.3,a.curveTo(p.x-t.y*n,p.y+t.x*n,v.x-t.y*n,v.y+t.x*n,v.x,v.y)):(a.moveTo(v.x,v.y),l=!0),n=[v],p=!0))}else t=null;p||(n.push(m),x=m)}this.addPoints(a,n,c,f,!1,null,l);a.stroke()}};var m= +mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(a,b,c,f){if(null==b||null==a||"1"!=b.style.snapToPoint&&"1"!=a.style.snapToPoint)m.apply(this,arguments);else{b=this.getTerminalPort(a,b,f);var d=this.getNextPoint(a,c,f),e=this.graph.isOrthogonal(a),n=mxUtils.toRadians(Number(b.style[mxConstants.STYLE_ROTATION]||"0")),l=new mxPoint(b.getCenterX(),b.getCenterY());if(0!=n)var x=Math.cos(-n),k=Math.sin(-n),d=mxUtils.getRotatedPoint(d,x,k,l); +x=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]||0);x+=parseFloat(a.style[f?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);d=this.getPerimeterPoint(b,d,0==n&&e,x);0!=n&&(x=Math.cos(n),k=Math.sin(n),d=mxUtils.getRotatedPoint(d,x,k,l));a.setAbsoluteTerminalPoint(this.snapToAnchorPoint(a,b,c,f,d),f)}};mxGraphView.prototype.snapToAnchorPoint=function(a,b,c,f,d){if(null!=b&&null!=a){a=this.graph.getAllConnectionConstraints(b);f=c=null;if(null!=a)for(var e= +0;e<a.length;e++){var g=this.graph.getConnectionPoint(b,a[e]);if(null!=g){var l=(g.x-d.x)*(g.x-d.x)+(g.y-d.y)*(g.y-d.y);if(null==f||l<f)c=g,f=l}}null!=c&&(d=c)}return d};var r=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(a,b,c){var f=r.apply(this,arguments);"1"==a.getAttribute("placeholders")&&null!=c.state&&(f=c.state.view.graph.replacePlaceholders(c.state.cell,f));return f};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 c=b.substring(8,b.length-1),f=mxUtils.parseXml(Graph.decompress(c));return new mxShape(new mxStencil(f.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 d=0;d<b.length;d++){var l=b[d];if(".xml"==l.toLowerCase().substring(l.length-4,l.length))mxStencilRegistry.loadStencilSet(l,null);else if(".js"==l.toLowerCase().substring(l.length-3,l.length))try{if(mxStencilRegistry.allowEval){var m= -mxUtils.load(l);null!=m&&200<=m.getStatus()&&299>=m.getStatus()&&eval.call(window,m.getText())}}catch(r){null!=window.console&&console.log("error in getStencil:",l,r)}}mxStencilRegistry.packages[e]=1}}else e=e.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+e+".xml",null);b=mxStencilRegistry.stencils[a]}}return b}; +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 d=0;d<b.length;d++){var k=b[d];if(".xml"==k.toLowerCase().substring(k.length-4,k.length))mxStencilRegistry.loadStencilSet(k,null);else if(".js"==k.toLowerCase().substring(k.length-3,k.length))try{if(mxStencilRegistry.allowEval){var m= +mxUtils.load(k);null!=m&&200<=m.getStatus()&&299>=m.getStatus()&&eval.call(window,m.getText())}}catch(r){null!=window.console&&console.log("error in getStencil:",k,r)}}mxStencilRegistry.packages[e]=1}}else e=e.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+e+".xml",null);b=mxStencilRegistry.stencils[a]}}return b}; mxStencilRegistry.getBasenameForStencil=function(a){var b=null;if(null!=a&&"string"===typeof a&&(a=a.split("."),0<a.length&&"mxgraph"==a[0]))for(var b=a[1],e=2;e<a.length-1;e++)b+="/"+a[e];return b}; -mxStencilRegistry.loadStencilSet=function(a,b,e,d){var l=mxStencilRegistry.packages[a];if(null!=e&&e||null==l){var m=!1;if(null==l)try{if(d){mxStencilRegistry.loadStencil(a,mxUtils.bind(this,function(d){null!=d&&null!=d.documentElement&&(mxStencilRegistry.packages[a]=d,m=!0,mxStencilRegistry.parseStencilSet(d.documentElement,b,m))}));return}l=mxStencilRegistry.loadStencil(a);mxStencilRegistry.packages[a]=l;m=!0}catch(r){null!=window.console&&console.log("error in loadStencilSet:",a,r)}null!=l&&null!= -l.documentElement&&mxStencilRegistry.parseStencilSet(l.documentElement,b,m)}};mxStencilRegistry.loadStencil=function(a,b){if(null!=b)mxUtils.get(a,mxUtils.bind(this,function(a){b(200<=a.getStatus()&&299>=a.getStatus()?a.getXml():null)}));else return mxUtils.load(a).getXml()};mxStencilRegistry.parseStencilSets=function(a){for(var b=0;b<a.length;b++)mxStencilRegistry.parseStencilSet(mxUtils.parseXml(a[b]).documentElement)}; -mxStencilRegistry.parseStencilSet=function(a,b,e){if("stencils"==a.nodeName)for(var d=a.firstChild;null!=d;)"shapes"==d.nodeName&&mxStencilRegistry.parseStencilSet(d,b,e),d=d.nextSibling;else{e=null!=e?e:!0;var d=a.firstChild,l="";a=a.getAttribute("name");for(null!=a&&(l=a+".");null!=d;){if(d.nodeType==mxConstants.NODETYPE_ELEMENT&&(a=d.getAttribute("name"),null!=a)){var l=l.toLowerCase(),m=a.replace(/ /g,"_");e&&mxStencilRegistry.addStencil(l+m.toLowerCase(),new mxStencil(d));if(null!=b){var r=d.getAttribute("w"), -u=d.getAttribute("h"),r=null==r?80:parseInt(r,10),u=null==u?80:parseInt(u,10);b(l,m,a,r,u)}}d=d.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}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 b=mxConnectionHandler.prototype.isCreateTarget;mxConnectionHandler.prototype.isCreateTarget= -function(a){return mxEvent.isControlDown(a)||b.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 c in this.graph.currentEdgeStyle)a.style[c]=this.graph.currentEdgeStyle[c];return a};var e=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var a=e.apply(this,arguments);a.isDashed="1"==this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED];return a};mxConnectionHandler.prototype.updatePreview=function(a){};var d=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var a= -d.apply(this,arguments),c=a.getCell;a.getCell=mxUtils.bind(this,function(a){var b=c.apply(this,arguments);this.error=null;return b});return a};mxConnectionHandler.prototype.isCellEnabled=function(a){return!this.graph.isCellLocked(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+"/default.xml").getDocumentElement():null;null!=a&&(new mxCodec(a.ownerDocument)).decode(a,this.getStylesheet())}; -Graph.prototype.importGraphModel=function(a,c,b,f){c=null!=c?c:0;b=null!=b?b:0;var d=new mxCodec(a.ownerDocument),e=new mxGraphModel;d.decode(a,e);a=[];d=e.getChildren(this.cloneCell(e.root,this.isCloneInvalidEdges()));if(null!=d){d=d.slice();this.model.beginUpdate();try{if(1!=d.length||this.isCellLocked(this.getDefaultParent()))for(e=0;e<d.length;e++)a=a.concat(this.model.getChildren(this.moveCells([d[e]],c,b,!1,this.model.getRoot())[0]));else a=this.moveCells(e.getChildren(d[0]),c,b,!1,this.getDefaultParent()); -if(f){this.isGridEnabled()&&(c=this.snap(c),b=this.snap(b));var k=this.getBoundingBoxFromGeometry(a,!0);null!=k&&this.moveCells(a,c-k.x,b-k.y)}}finally{this.model.endUpdate()}}return a};Graph.prototype.getAllConnectionConstraints=function(a,c){if(null!=a){var b=mxUtils.getValue(a.style,"points",null);if(null!=b){var f=[];try{for(var d=JSON.parse(b),b=0;b<d.length;b++){var e=d[b];f.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(Q){}return f}if(null!=a.shape&&null!=a.shape.bounds){e=a.shape.direction;d=a.shape.bounds;b=a.shape.scale;f=d.width/b;d=d.height/b;if(e==mxConstants.DIRECTION_NORTH||e==mxConstants.DIRECTION_SOUTH)e=f,f=d,d=e;b=a.shape.getConstraints(a.style,f,d);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 c=this.view.getState(a), -c=null!=c?c.style:this.getCellStyle(a);null!=c&&(c=mxUtils.getValue(c,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL,this.setCellStyles(mxConstants.STYLE_ELBOW,c,[a]))}};Graph.prototype.isValidRoot=function(a){for(var c=this.model.getChildCount(a),b=0,f=0;f<c;f++){var d=this.model.getChildAt(a,f);this.model.isVertex(d)&&(d=this.getCellGeometry(d),null==d||d.relative||b++)}return 0<b||this.isContainer(a)}; -Graph.prototype.isValidDropTarget=function(a){var c=this.view.getState(a),c=null!=c?c.style:this.getCellStyle(a);return"1"!=mxUtils.getValue(c,"part","0")&&(this.isContainer(a)||mxGraph.prototype.isValidDropTarget.apply(this,arguments)&&"0"!=mxUtils.getValue(c,"dropTarget","1"))};Graph.prototype.createGroupCell=function(){var a=mxGraph.prototype.createGroupCell.apply(this,arguments);a.setStyle("group");return a};Graph.prototype.isExtendParentsOnAdd=function(a){var c=mxGraph.prototype.isExtendParentsOnAdd.apply(this, -arguments);if(c&&null!=a&&null!=this.layoutManager){var b=this.model.getParent(a);null!=b&&(b=this.layoutManager.getLayout(b),null!=b&&b.constructor==mxStackLayout&&(c=!1))}return c};Graph.prototype.getPreferredSizeForCell=function(a){var c=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=c&&(c.width+=10,c.height+=4,this.gridEnabled&&(c.width=this.snap(c.width),c.height=this.snap(c.height)));return c};Graph.prototype.turnShapes=function(a){var c=this.getModel(),b=[];c.beginUpdate(); -try{for(var f=0;f<a.length;f++){var d=a[f];if(c.isEdge(d)){var e=c.getTerminal(d,!0),k=c.getTerminal(d,!1);c.setTerminal(d,k,!0);c.setTerminal(d,e,!1);var g=c.getGeometry(d);if(null!=g){g=g.clone();null!=g.points&&g.points.reverse();var p=g.getTerminalPoint(!0),n=g.getTerminalPoint(!1);g.setTerminalPoint(p,!1);g.setTerminalPoint(n,!0);c.setGeometry(d,g);var q=this.view.getState(d),E=this.view.getState(e),t=this.view.getState(k);if(null!=q){var l=null!=E?this.getConnectionConstraint(q,E,!0):null,x= -null!=t?this.getConnectionConstraint(q,t,!1):null;this.setConnectionConstraint(d,e,!0,x);this.setConnectionConstraint(d,k,!1,l)}b.push(d)}}else if(c.isVertex(d)&&(g=this.getCellGeometry(d),null!=g)){g=g.clone();g.x+=g.width/2-g.height/2;g.y+=g.height/2-g.width/2;var B=g.width;g.width=g.height;g.height=B;c.setGeometry(d,g);var C=this.view.getState(d);if(null!=C){var v=C.style[mxConstants.STYLE_DIRECTION]||"east";"east"==v?v="south":"south"==v?v="west":"west"==v?v="north":"north"==v&&(v="east");this.setCellStyles(mxConstants.STYLE_DIRECTION, -v,[d])}b.push(d)}}}finally{c.endUpdate()}return b};Graph.prototype.stencilHasPlaceholders=function(a){if(null!=a&&null!=a.fgNode)for(a=a.fgNode.firstChild;null!=a;){if("text"==a.nodeName&&"1"==a.getAttribute("placeholders"))return!0;a=a.nextSibling}return!1};Graph.prototype.processChange=function(a){mxGraph.prototype.processChange.apply(this,arguments);if(a instanceof mxValueChange&&null!=a.cell&&null!=a.cell.value&&"object"==typeof a.cell.value){var c=this.model.getDescendants(a.cell);if(0<c.length)for(var b= -0;b<c.length;b++){var f=this.view.getState(c[b]);null!=f&&null!=f.shape&&null!=f.shape.stencil&&this.stencilHasPlaceholders(f.shape.stencil)?this.removeStateForCell(c[b]):this.isReplacePlaceholders(c[b])&&this.view.invalidate(c[b],!1,!1)}}};Graph.prototype.replaceElement=function(a,c){for(var b=a.ownerDocument.createElement(null!=c?c:"span"),f=Array.prototype.slice.call(a.attributes);attr=f.pop();)b.setAttribute(attr.nodeName,attr.nodeValue);b.innerHTML=a.innerHTML;a.parentNode.replaceChild(b,a)}; -Graph.prototype.processElements=function(a,c){for(var b=a.getElementsByTagName("*"),f=0;f<b.length;f++)c(b[f])};Graph.prototype.updateLabelElements=function(a,c,b){a=null!=a?a:this.getSelectionCells();for(var f=document.createElement("div"),d=0;d<a.length;d++)if(this.isHtmlLabel(a[d])){var e=this.convertValueToString(a[d]);if(null!=e&&0<e.length){f.innerHTML=e;for(var k=f.getElementsByTagName(null!=b?b:"*"),g=0;g<k.length;g++)c(k[g]);f.innerHTML!=e&&this.cellLabelChanged(a[d],f.innerHTML)}}};Graph.prototype.cellLabelChanged= -function(a,c,b){c=Graph.zapGremlins(c);this.model.beginUpdate();try{if(null!=a.value&&"object"==typeof a.value){if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder"))for(var f=a.getAttribute("placeholder"),d=a;null!=d;){if(d==this.model.getRoot()||null!=d.value&&"object"==typeof d.value&&d.hasAttribute(f)){this.setAttributeForCell(d,f,c);break}d=this.model.getParent(d)}var e=a.value.cloneNode(!0);e.setAttribute("label",c);c=e}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}}; -Graph.prototype.cellsRemoved=function(a){if(null!=a){for(var c=new mxDictionary,b=0;b<a.length;b++)c.put(a[b],!0);for(var f=[],b=0;b<a.length;b++){var d=this.model.getParent(a[b]);null==d||c.get(d)||(c.put(d,!0),f.push(d))}for(b=0;b<f.length;b++)if(d=this.view.getState(f[b]),null!=d&&(this.model.isEdge(d.cell)||this.model.isVertex(d.cell))&&this.isCellDeletable(d.cell)){var e=mxUtils.getValue(d.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),k=mxUtils.getValue(d.style,mxConstants.STYLE_FILLCOLOR, -mxConstants.NONE);if(e==mxConstants.NONE&&k==mxConstants.NONE){e=!0;for(k=0;k<this.model.getChildCount(d.cell)&&e;k++)c.get(this.model.getChildAt(d.cell,k))||(e=!1);e&&a.push(d.cell)}}}mxGraph.prototype.cellsRemoved.apply(this,arguments)};Graph.prototype.removeCellsAfterUngroup=function(a){for(var c=[],b=0;b<a.length;b++)if(this.isCellDeletable(a[b])){var f=this.view.getState(a[b]);if(null!=f){var d=mxUtils.getValue(f.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),f=mxUtils.getValue(f.style, -mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);d==mxConstants.NONE&&f==mxConstants.NONE&&c.push(a[b])}}a=c;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(a,c){this.setAttributeForCell(a,"link",c)};Graph.prototype.setTooltipForCell=function(a,c){this.setAttributeForCell(a,"tooltip",c)};Graph.prototype.getAttributeForCell=function(a,c,b){return null!=a.value&&"object"===typeof a.value?a.value.getAttribute(c)||b:b};Graph.prototype.setAttributeForCell= -function(a,c,b){var f;null!=a.value&&"object"==typeof a.value?f=a.value.cloneNode(!0):(f=mxUtils.createXmlDocument().createElement("UserObject"),f.setAttribute("label",a.value||""));null!=b?f.setAttribute(c,b):f.removeAttribute(c);this.model.setValue(a,f)};Graph.prototype.getDropTarget=function(a,c,b,f){this.getModel();if(mxEvent.isAltDown(c))return null;for(var d=0;d<a.length;d++)if(this.model.isEdge(this.model.getParent(a[d])))return null;return mxGraph.prototype.getDropTarget.apply(this,arguments)}; -Graph.prototype.click=function(a){mxGraph.prototype.click.call(this,a);this.firstClickState=a.getState();this.firstClickSource=a.getSource()};Graph.prototype.dblClick=function(a,c){if(this.isEnabled()){var b=mxUtils.convertPoint(this.container,mxEvent.getClientX(a),mxEvent.getClientY(a));if(null!=a&&!this.model.isVertex(c)){var f=this.model.isEdge(c)?this.view.getState(c):null,d=mxEvent.getSource(a);this.firstClickState!=f||this.firstClickSource!=d||null!=f&&null!=f.text&&null!=f.text.node&&null!= -f.text.boundingBox&&(mxUtils.contains(f.text.boundingBox,b.x,b.y)||mxUtils.isAncestorNode(f.text.node,mxEvent.getSource(a)))||(null!=f||this.isCellLocked(this.getDefaultParent()))&&(null==f||this.isCellLocked(f.cell))||!(null!=f||mxClient.IS_VML&&d==this.view.getCanvas()||mxClient.IS_SVG&&d==this.view.getCanvas().ownerSVGElement)||(c=this.addText(b.x,b.y,f))}mxGraph.prototype.dblClick.call(this,a,c)}};Graph.prototype.getInsertPoint=function(){var a=this.getGridSize(),c=this.container.scrollLeft/this.view.scale- -this.view.translate.x,b=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible)var f=this.getPageLayout(),d=this.getPageSize(),c=Math.max(c,f.x*d.width),b=Math.max(b,f.y*d.height);return new mxPoint(this.snap(c+a),this.snap(b+a))};Graph.prototype.getFreeInsertPoint=function(){var a=this.view,c=this.getGraphBounds(),b=this.getInsertPoint(),f=this.snap(Math.round(Math.max(b.x,c.x/a.scale-a.translate.x+(0==c.width?2*this.gridSize:0)))),a=this.snap(Math.round(Math.max(b.y, -(c.y+c.height)/a.scale-a.translate.y+2*this.gridSize)));return new mxPoint(f,a)};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.addText=function(a,c,b){var f=new mxCell;f.value="Text";f.style="text;html=1;resizable=0;points=[];";f.geometry=new mxGeometry(0,0,0,0);f.vertex=!0;if(null!=b){f.style+="align=center;verticalAlign=middle;labelBackgroundColor=#ffffff;";f.geometry.relative=!0;f.connectable=!1;var d=this.view.getRelativePoint(b,a,c);f.geometry.x=Math.round(1E4*d.x)/ -1E4;f.geometry.y=Math.round(d.y);f.geometry.offset=new mxPoint(0,0);var d=this.view.getPoint(b,f.geometry),e=this.view.scale;f.geometry.offset=new mxPoint(Math.round((a-d.x)/e),Math.round((c-d.y)/e))}else f.style+="autosize=1;align=left;verticalAlign=top;spacingTop=-4;",d=this.view.translate,f.geometry.width=40,f.geometry.height=20,f.geometry.x=Math.round(a/this.view.scale)-d.x,f.geometry.y=Math.round(c/this.view.scale)-d.y;this.getModel().beginUpdate();try{this.addCells([f],null!=b?b.cell:null), -this.fireEvent(new mxEventObject("textInserted","cells",[f])),this.autoSizeCell(f)}finally{this.getModel().endUpdate()}return f};Graph.prototype.addClickHandler=function(a,c,b){var f=mxUtils.bind(this,function(){var a=this.container.getElementsByTagName("a");if(null!=a)for(var b=0;b<a.length;b++){var f=this.getAbsoluteUrl(a[b].getAttribute("href"));null!=f&&(a[b].setAttribute("rel",this.linkRelation),a[b].setAttribute("href",f),null!=c&&mxEvent.addGestureListeners(a[b],null,null,c))}});this.model.addListener(mxEvent.CHANGE, -f);f();var d=this.container.style.cursor,e=this.getTolerance(),k=this,g={currentState:null,currentLink:null,highlight:null!=a&&""!=a&&a!=mxConstants.NONE?new mxCellHighlight(k,a,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(a){var c=a.sourceState;if(null==c||null==k.getLinkForCell(c.cell))a=k.getCellAt(a.getGraphX(),a.getGraphY(),null,null,null,function(a,c,b){return null==k.getLinkForCell(a.cell)}),c=k.view.getState(a);c!=this.currentState&&(null!=this.currentState&& -this.clear(),this.currentState=c,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(a,c){this.startX=c.getGraphX();this.startY=c.getGraphY();this.scrollLeft=k.container.scrollLeft;this.scrollTop=k.container.scrollTop;null==this.currentLink&&"auto"==k.container.style.overflow&&(k.container.style.cursor="move");this.updateCurrentState(c)},mouseMove:function(a,c){if(k.isMouseDown){if(null!=this.currentLink){var b=Math.abs(this.startX-c.getGraphX()),f=Math.abs(this.startY- -c.getGraphY());(b>e||f>e)&&this.clear()}}else{for(b=c.getSource();null!=b&&"a"!=b.nodeName.toLowerCase();)b=b.parentNode;null!=b?this.clear():(null!=k.tooltipHandler&&null!=this.currentLink&&null!=this.currentState&&k.tooltipHandler.reset(c,!0,this.currentState),(null==this.currentState||c.getState()!=this.currentState&&null!=c.sourceState||!k.intersects(this.currentState,c.getGraphX(),c.getGraphY()))&&this.updateCurrentState(c))}},mouseUp:function(a,f){for(var d=f.getSource(),g=f.getEvent();null!= -d&&"a"!=d.nodeName.toLowerCase();)d=d.parentNode;null==d&&Math.abs(this.scrollLeft-k.container.scrollLeft)<e&&Math.abs(this.scrollTop-k.container.scrollTop)<e&&(null==f.sourceState||!f.isSource(f.sourceState.control))&&((mxEvent.isLeftMouseButton(g)||mxEvent.isMiddleMouseButton(g))&&!mxEvent.isPopupTrigger(g)||mxEvent.isTouchEvent(g))&&(null!=this.currentLink?(d=k.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&d||null==c||c(g,this.currentLink),mxEvent.isConsumed(g)||(g=mxEvent.isMiddleMouseButton(g)? -"_blank":d?k.linkTarget:"_top",k.openLink(this.currentLink,g),f.consume())):null!=b&&!f.isConsumed()&&Math.abs(this.scrollLeft-k.container.scrollLeft)<e&&Math.abs(this.scrollTop-k.container.scrollTop)<e&&Math.abs(this.startX-f.getGraphX())<e&&Math.abs(this.startY-f.getGraphY())<e&&b(f.getEvent()));this.clear()},activate:function(a){this.currentLink=k.getAbsoluteUrl(k.getLinkForCell(a.cell));null!=this.currentLink&&(k.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(a))}, -clear:function(){null!=k.container&&(k.container.style.cursor=d);this.currentLink=this.currentState=null;null!=this.highlight&&this.highlight.hide();null!=k.tooltipHandler&&k.tooltipHandler.hide()}};k.click=function(a){};k.addMouseListener(g);mxEvent.addListener(document,"mouseleave",function(a){g.clear()})};Graph.prototype.duplicateCells=function(a,c){a=null!=a?a:this.getSelectionCells();c=null!=c?c:!0;a=this.model.getTopmostCells(a);var b=this.getModel(),f=this.gridSize,d=[];b.beginUpdate();try{for(var e= -this.cloneCells(a,!1,null,!0),k=0;k<a.length;k++){var g=b.getParent(a[k]),p=this.moveCells([e[k]],f,f,!1)[0];d.push(p);if(c)b.add(g,e[k]);else{var n=g.getIndex(a[k]);b.add(g,e[k],n+1)}}}finally{b.endUpdate()}return d};Graph.prototype.insertImage=function(a,c,b){if(null!=a&&null!=this.cellEditor.textarea){for(var f=this.cellEditor.textarea.getElementsByTagName("img"),d=[],e=0;e<f.length;e++)d.push(f[e]);document.execCommand("insertimage",!1,a);a=this.cellEditor.textarea.getElementsByTagName("img"); -if(a.length==d.length+1)for(e=a.length-1;0<=e;e--)if(0==e||a[e]!=d[e-1]){a[e].setAttribute("width",c);a[e].setAttribute("height",b);break}}};Graph.prototype.insertLink=function(a){if(null!=this.cellEditor.textarea)if(0==a.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var c=this.cellEditor.textarea.getElementsByTagName("a"),b=[],f=0;f<c.length;f++)b.push(c[f]);document.execCommand("createlink",!1,mxUtils.trim(a));c=this.cellEditor.textarea.getElementsByTagName("a");if(c.length== -b.length+1)for(f=c.length-1;0<=f;f--)if(c[f]!=b[f-1]){for(c=c[f].getElementsByTagName("a");0<c.length;){for(b=c[0].parentNode;null!=c[0].firstChild;)b.insertBefore(c[0].firstChild,c[0]);b.removeChild(c[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(a))};Graph.prototype.isCellResizable=function(a){var c=mxGraph.prototype.isCellResizable.apply(this,arguments),b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return c||"0"!=mxUtils.getValue(b,mxConstants.STYLE_RESIZABLE, -"1")&&"wrap"==b[mxConstants.STYLE_WHITE_SPACE]};Graph.prototype.distributeCells=function(a,c){null==c&&(c=this.getSelectionCells());if(null!=c&&1<c.length){for(var b=[],f=null,d=null,e=0;e<c.length;e++)if(this.getModel().isVertex(c[e])){var k=this.view.getState(c[e]);if(null!=k){var g=a?k.getCenterX():k.getCenterY(),f=null!=f?Math.max(f,g):g,d=null!=d?Math.min(d,g):g;b.push(k)}}if(2<b.length){b.sort(function(c,b){return a?c.x-b.x:c.y-b.y});k=this.view.translate;g=this.view.scale;d=d/g-(a?k.x:k.y); -f=f/g-(a?k.x:k.y);this.getModel().beginUpdate();try{for(var p=(f-d)/(b.length-1),f=d,e=1;e<b.length-1;e++){var n=this.view.getState(this.model.getParent(b[e].cell)),q=this.getCellGeometry(b[e].cell),f=f+p;null!=q&&null!=n&&(q=q.clone(),a?q.x=Math.round(f-q.width/2)-n.origin.x:q.y=Math.round(f-q.height/2)-n.origin.y,this.getModel().setGeometry(b[e].cell,q))}}finally{this.getModel().endUpdate()}}}return c};Graph.prototype.isCloneEvent=function(a){return mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxEvent.isControlDown(a)}; -Graph.prototype.encodeCells=function(a){for(var c=this.cloneCells(a),b=new mxDictionary,f=0;f<a.length;f++)b.put(a[f],!0);for(f=0;f<c.length;f++){var d=this.view.getState(a[f]);if(null!=d){var e=this.getCellGeometry(c[f]);null==e||!e.relative||this.model.isEdge(a[f])||b.get(this.model.getParent(a[f]))||(e.relative=!1,e.x=d.x/d.view.scale-d.view.translate.x,e.y=d.y/d.view.scale-d.view.translate.y)}}b=new mxCodec;d=new mxGraphModel;e=d.getChildAt(d.getRoot(),0);for(f=0;f<a.length;f++)d.add(e,c[f]); -return b.encode(d)};Graph.prototype.createSvgImageExport=function(){var a=new mxImageExport;a.getLinkForCellState=mxUtils.bind(this,function(a,c){return this.getLinkForCell(a.cell)});return a};Graph.prototype.getSvg=function(a,c,b,f,d,e,k,g,p,n){var q=this.useCssTransforms;q&&(this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange());try{c=null!=c?c:1;b=null!=b?b:0;d=null!=d?d:!0;e=null!=e?e:!0;k=null!=k?k:!0;var t=e||f?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()); -if(null==t)throw Error(mxResources.get("drawingEmpty"));var l=this.view.scale,x=mxUtils.createXmlDocument(),B=null!=x.createElementNS?x.createElementNS(mxConstants.NS_SVG,"svg"):x.createElement("svg");null!=a&&(null!=B.style?B.style.backgroundColor=a:B.setAttribute("style","background-color:"+a));null==x.createElementNS?(B.setAttribute("xmlns",mxConstants.NS_SVG),B.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):B.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK); -a=c/l;var C=Math.max(1,Math.ceil(t.width*a)+2*b)+(n?5:0),v=Math.max(1,Math.ceil(t.height*a)+2*b)+(n?5:0);B.setAttribute("version","1.1");B.setAttribute("width",C+"px");B.setAttribute("height",v+"px");B.setAttribute("viewBox",(d?"-0.5 -0.5":"0 0")+" "+C+" "+v);x.appendChild(B);var z=null!=x.createElementNS?x.createElementNS(mxConstants.NS_SVG,"g"):x.createElement("g");B.appendChild(z);var E=this.createSvgCanvas(z);E.foOffset=d?-.5:0;E.textOffset=d?-.5:0;E.imageOffset=d?-.5:0;E.translate(Math.floor((b/ -c-t.x)/l),Math.floor((b/c-t.y)/l));var m=document.createElement("textarea"),u=E.createAlternateContent;E.createAlternateContent=function(a,c,b,f,d,e,k,g,p,n,q,t,B){var x=this.state;if(null!=this.foAltText&&(0==f||0!=x.fontSize&&e.length<5*f/x.fontSize)){var l=this.createElement("text");l.setAttribute("x",Math.round(f/2));l.setAttribute("y",Math.round((d+x.fontSize)/2));l.setAttribute("fill",x.fontColor||"black");l.setAttribute("text-anchor","middle");l.setAttribute("font-size",Math.round(x.fontSize)+ -"px");l.setAttribute("font-family",x.fontFamily);(x.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&l.setAttribute("font-weight","bold");(x.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&l.setAttribute("font-style","italic");(x.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&l.setAttribute("text-decoration","underline");try{return m.innerHTML=e,l.textContent=m.value,l}catch(Fa){return u.apply(this,arguments)}}else return u.apply(this,arguments)};var G=this.backgroundImage; -if(null!=G){c=l/c;var r=this.view.translate,F=new mxRectangle(r.x*c,r.y*c,G.width*c,G.height*c);mxUtils.intersects(t,F)&&E.image(r.x,r.y,G.width,G.height,G.src,!0)}E.scale(a);E.textEnabled=k;g=null!=g?g:this.createSvgImageExport();var K=g.drawCellState,Y=g.getLinkForCellState;g.getLinkForCellState=function(a,c){var b=Y.apply(this,arguments);return null==b||a.view.graph.isCustomLink(b)?null:b};g.drawCellState=function(a,c){for(var b=a.view.graph,f=b.isCellSelected(a.cell),d=b.model.getParent(a.cell);!e&& -!f&&null!=d;)f=b.isCellSelected(d),d=b.model.getParent(d);(e||f)&&K.apply(this,arguments)};g.drawState(this.getView().getState(this.model.root),E);this.updateSvgLinks(B,p,!0);return B}finally{q&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.updateSvgLinks=function(a,c,b){a=a.getElementsByTagName("a");for(var f=0;f<a.length;f++){var d=a[f].getAttribute("href");null==d&&(d=a[f].getAttribute("xlink:href"));null!=d&&(null!=c&&/^https?:\/\//.test(d)?a[f].setAttribute("target", -c):b&&this.isCustomLink(d)&&a[f].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(a){return new mxSvgCanvas2D(a)};Graph.prototype.getSelectedElement=function(){var a=null;if(window.getSelection){var c=window.getSelection();c.getRangeAt&&c.rangeCount&&(a=c.getRangeAt(0).commonAncestorContainer)}else document.selection&&(a=document.selection.createRange().parentElement());return a};Graph.prototype.getParentByName=function(a,c,b){for(;null!=a&&a.nodeName!=c;){if(a== -b)return null;a=a.parentNode}return a};Graph.prototype.getParentByNames=function(a,c,b){for(;null!=a&&!(0<=mxUtils.indexOf(c,a.nodeName));){if(a==b)return null;a=a.parentNode}return a};Graph.prototype.selectNode=function(a){var c=null;if(window.getSelection){if(c=window.getSelection(),c.getRangeAt&&c.rangeCount){var b=document.createRange();b.selectNode(a);c.removeAllRanges();c.addRange(b)}}else(c=document.selection)&&"Control"!=c.type&&(a=c.createRange(),a.collapse(!0),b=c.createRange(),b.setEndPoint("StartToStart", -a),b.select())};Graph.prototype.insertRow=function(a,c){for(var b=a.tBodies[0],f=b.rows[0].cells,d=0,e=0;e<f.length;e++)var k=f[e].getAttribute("colspan"),d=d+(null!=k?parseInt(k):1);b=b.insertRow(c);for(e=0;e<d;e++)mxUtils.br(b.insertCell(-1));return b.cells[0]};Graph.prototype.deleteRow=function(a,c){a.tBodies[0].deleteRow(c)};Graph.prototype.insertColumn=function(a,c){var b=a.tHead;if(null!=b)for(var f=0;f<b.rows.length;f++){var d=document.createElement("th");b.rows[f].appendChild(d);mxUtils.br(d)}b= -a.tBodies[0];for(f=0;f<b.rows.length;f++)d=b.rows[f].insertCell(c),mxUtils.br(d);return b.rows[0].cells[0<=c?c:b.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(a,c){if(0<=c)for(var b=a.tBodies[0].rows,f=0;f<b.length;f++)b[f].cells.length>c&&b[f].deleteCell(c)};Graph.prototype.pasteHtmlAtCaret=function(a){var c;if(window.getSelection){if(c=window.getSelection(),c.getRangeAt&&c.rangeCount){c=c.getRangeAt(0);c.deleteContents();var b=document.createElement("div");b.innerHTML=a;a=document.createDocumentFragment(); -for(var f;f=b.firstChild;)lastNode=a.appendChild(f);c.insertNode(a)}}else(c=document.selection)&&"Control"!=c.type&&c.createRange().pasteHTML(a)};Graph.prototype.createLinkForHint=function(a,c){function b(a,c){a.length>c&&(a=a.substring(0,Math.round(c/2))+"..."+a.substring(a.length-Math.round(c/4)));return a}a=null!=a?a:"javascript:void(0);";if(null==c||0==c.length)c=this.isCustomLink(a)?this.getLinkTitle(a):a;var f=document.createElement("a");f.setAttribute("rel",this.linkRelation);f.setAttribute("href", -this.getAbsoluteUrl(a));f.setAttribute("title",b(this.isCustomLink(a)?this.getLinkTitle(a):a,80));null!=this.linkTarget&&f.setAttribute("target",this.linkTarget);mxUtils.write(f,b(c,40));this.isCustomLink(a)&&mxEvent.addListener(f,"click",mxUtils.bind(this,function(c){this.customLinkClicked(a);mxEvent.consume(c)}));return f};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING, -function(a,c){this.popupMenuHandler.hideMenu()});var a=this.updateMouseEvent;this.updateMouseEvent=function(c){c=a.apply(this,arguments);if(mxEvent.isTouchEvent(c.getEvent())&&null==c.getState()){var b=this.getCellAt(c.graphX,c.graphY);null!=b&&this.isSwimlane(b)&&this.hitsSwimlaneContent(b,c.graphX,c.graphY)||(c.state=this.view.getState(b),null!=c.state&&null!=c.state.shape&&(this.container.style.cursor=c.state.shape.node.style.cursor))}null==c.getState()&&this.isEnabled()&&(this.container.style.cursor= -"default");return c};var c=!1,b=!1,f=!1,d=this.fireMouseEvent;this.fireMouseEvent=function(a,e,k){a==mxEvent.MOUSE_DOWN&&(e=this.updateMouseEvent(e),c=this.isCellSelected(e.getCell()),b=this.isSelectionEmpty(),f=this.popupMenuHandler.isMenuShowing());d.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(a,d){this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==d.getState()||!d.isSource(d.getState().control))&&(this.popupMenuHandler.popupTrigger|| -!f&&!mxEvent.isMouseEvent(d.getEvent())&&(b&&null==d.getCell()&&this.isSelectionEmpty()||c&&this.isCellSelected(d.getCell())));mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,arguments)})};mxCellEditor.prototype.isContentEditing=function(){var a=this.graph.view.getState(this.editingCell);return null!=a&&1==a.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.alignText= -function(a,c){!this.isTableSelected()==(null==c||!mxEvent.isShiftDown(c))&&(this.graph.cellEditor.setAlign(a),this.graph.processElements(this.textarea,function(a){a.removeAttribute("align");a.style.textAlign=null}));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 c=[],b=0,f=a.rangeCount;b<f;++b)c.push(a.getRangeAt(b));return c}}else if(document.selection&& -document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(a){try{if(a)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var c=0,b=a.length;c<b;++c)sel.addRange(a[c])}else document.selection&&a.select&&a.select()}catch(ja){}};var l=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br", -"1"));l.apply(this,arguments)};var m=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(a,c){this.isKeepFocusEvent(a)||!mxEvent.isAltDown(a.getEvent())?m.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(a){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var r=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(a,c){r.apply(this, -arguments);var b=this.graph.view.getState(a);this.textarea.className=null!=b&&1==b.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(a);var b=this.graph.getModel().getParent(a),f=this.graph.getCellGeometry(a);this.graph.getModel().isEdge(b)&&null!=f&&f.relative||this.graph.getModel().isEdge(a)?mxClient.IS_QUIRKS?this.textarea.style.border="gray dotted 1px":this.textarea.style.outline=mxClient.IS_IE|| -mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":"":mxClient.IS_QUIRKS&&(this.textarea.style.outline="none",this.textarea.style.border="")};var u=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(a){function c(a,b){b.originalNode=a;a=a.firstChild;for(var f=b.firstChild;null!=a&&null!=f;)c(a,f),a=a.nextSibling,f=f.nextSibling;return b}function b(a,c){if(null!=a)if(c.originalNode!=a)f(a);else for(a=a.firstChild,c=c.firstChild;null!=a;){var d= -a.nextSibling;null==c?f(a):(b(a,c),c=c.nextSibling);a=d}}function f(a){for(var c=a.firstChild;null!=c;){var b=c.nextSibling;f(c);c=b}1==a.nodeType&&("BR"===a.nodeName||null!=a.firstChild)||3==a.nodeType&&0!=mxUtils.trim(mxUtils.getTextContent(a)).length?(3==a.nodeType&&mxUtils.setTextContent(a,mxUtils.getTextContent(a).replace(/\n|\r/g,"")),1==a.nodeType&&(a.removeAttribute("style"),a.removeAttribute("class"),a.removeAttribute("width"),a.removeAttribute("cellpadding"),a.removeAttribute("cellspacing"), -a.removeAttribute("border"))):a.parentNode.removeChild(a)}u.apply(this,arguments);mxClient.IS_QUIRKS||7===document.documentMode||8===document.documentMode||mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(a){var f=c(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,function(){null!=this.textarea&&(0<=this.textarea.innerHTML.indexOf("<o:OfficeDocumentSettings>")||0<=this.textarea.innerHTML.indexOf("\x3c!--[if !mso]>"))&&b(this.textarea,f)}),0)}))};mxCellEditor.prototype.toggleViewMode= -function(){var a=this.graph.view.getState(this.editingCell);if(null!=a){var c=null!=a&&"0"!=mxUtils.getValue(a.style,"nl2Br","1"),b=this.saveSelection();if(this.codeViewMode){g=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<g.length&&"\n"==g.charAt(g.length-1)&&(g=g.substring(0,g.length-1));g=this.graph.sanitizeHtml(c?g.replace(/\n/g,"<br/>"):g,!0);this.textarea.className="mxCellEditor geContentEditable";var f=mxUtils.getValue(a.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE), -c=mxUtils.getValue(a.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),d=mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),e=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,k=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,a=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE;this.textarea.style.lineHeight= -mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(f*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(f)+"px";this.textarea.style.textDecoration=a?"underline":"";this.textarea.style.fontWeight=e?"bold":"normal";this.textarea.style.fontStyle=k?"italic":"";this.textarea.style.fontFamily=c;this.textarea.style.textAlign=d;this.textarea.style.padding="0px";this.textarea.innerHTML!=g&&(this.textarea.innerHTML=g,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 g=mxUtils.htmlEntities(this.textarea.innerHTML);mxClient.IS_QUIRKS||8==document.documentMode||(g=mxUtils.replaceTrailingNewlines(g,"<div><br></div>"));g=this.graph.sanitizeHtml(c?g.replace(/\n/g,"").replace(/<br\s*.?>/g,"<br>"):g,!0);this.textarea.className="mxCellEditor mxPlainTextEditor"; -var f=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(f*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(f)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.padding="2px";this.textarea.innerHTML!=g&&(this.textarea.innerHTML= -g);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=b;this.resize()}};var y=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(a,c){if(null!=this.textarea)if(a=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=a){var b=a.view.scale;this.bounds=mxRectangle.fromRectangle(a);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*b;this.bounds.height= -60*b;var f=null!=a.text?a.text.margin:null;null==f&&(f=mxUtils.getAlignmentAsPoint(mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(a.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=f.x*this.bounds.width;this.bounds.y+=f.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/b)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/b)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight< -this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/b)+(this.textarea.offsetHeight-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*b);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/b)+(this.textarea.offsetWidth-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*b);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top= -Math.round(this.bounds.y)+"px";mxClient.IS_VML?this.textarea.style.zoom=b:mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+b+","+b+")")}else this.textarea.style.height="",this.textarea.style.overflow="",y.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(a,c){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var b=this.graph.getEditingValue(a.cell, -c);"1"==mxUtils.getValue(a.style,"nl2Br","1")&&(b=b.replace(/\n/g,"<br/>"));return b=this.graph.sanitizeHtml(b,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(a){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var c=this.graph.sanitizeHtml(this.textarea.innerHTML,!0);return c="1"==mxUtils.getValue(a.style,"nl2Br","1")?c.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):c.replace(/\r\n/g, -"").replace(/\n/g,"")};var A=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(a){this.codeViewMode&&this.toggleViewMode();A.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(E){}};var c=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(a,b){this.graph.getModel().beginUpdate();try{if(c.apply(this,arguments),this.graph.isCellDeletable(a.cell)&&0==this.graph.model.getChildCount(a.cell)){var f= -mxUtils.getValue(a.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),d=mxUtils.getValue(a.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);""==b&&f==mxConstants.NONE&&d==mxConstants.NONE&&this.graph.removeCells([a.cell],!1)}}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(a){var c=mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);null!=c&&c!=mxConstants.NONE||!(null!=a.cell.geometry&&0<a.cell.geometry.width)||0==mxUtils.getValue(a.style, -mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(a.style,mxConstants.STYLE_HORIZONTAL,1)||(c=mxUtils.getValue(a.style,mxConstants.STYLE_FILLCOLOR,null));c==mxConstants.NONE&&(c=null);return c};mxCellEditor.prototype.getMinimumSize=function(a){var c=this.graph.getView().scale;return new mxRectangle(0,0,null==a.text?30:a.text.size*c+20,30)};var f=mxGraphHandler.prototype.moveCells;mxGraphHandler.prototype.moveCells=function(a,c,b,d,e,k){mxEvent.isAltDown(k)&&(e=null);f.apply(this,arguments)};mxGraphHandler.prototype.updateHint= -function(c){if(null!=this.shape){null==this.hint&&(this.hint=a(),this.graph.container.appendChild(this.hint));var b=this.graph.view.translate,f=this.graph.view.scale;c=this.roundLength((this.bounds.x+this.currentDx)/f-b.x);b=this.roundLength((this.bounds.y+this.currentDy)/f-b.y);this.hint.innerHTML=c+", "+b;this.hint.style.left=this.shape.bounds.x+Math.round((this.shape.bounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.shape.bounds.y+this.shape.bounds.height+12+"px"}};mxGraphHandler.prototype.removeHint= -function(){null!=this.hint&&(this.hint.parentNode.removeChild(this.hint),this.hint=null)};mxVertexHandler.prototype.isRecursiveResize=function(a,c){return!this.graph.isSwimlane(a.cell)&&0<this.graph.model.getChildCount(a.cell)&&!mxEvent.isControlDown(c.getEvent())&&!this.graph.isCellCollapsed(a.cell)&&"1"==mxUtils.getValue(a.style,"recursiveResize","1")&&null==mxUtils.getValue(a.style,"childLayout",null)};mxVertexHandler.prototype.isCenteredEvent=function(a,c){return!(!this.graph.isSwimlane(a.cell)&& -0<this.graph.model.getChildCount(a.cell)&&!this.graph.isCellCollapsed(a.cell)&&"1"==mxUtils.getValue(a.style,"recursiveResize","1")&&null==mxUtils.getValue(a.style,"childLayout",null))&&mxEvent.isControlDown(c.getEvent())||mxEvent.isMetaDown(c.getEvent())};var k=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var a=new mxPoint(0,0),c=this.tolerance;this.graph.cellEditor.getEditingCell()==this.state.cell&&null!=this.sizers&&0<this.sizers.length&&null!= -this.sizers[0]?(c/=2,a.x=this.sizers[0].bounds.width+c,a.y=this.sizers[0].bounds.height+c):a=k.apply(this,arguments);return a};mxVertexHandler.prototype.updateHint=function(c){this.index!=mxEvent.LABEL_HANDLE&&(null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint)),this.index==mxEvent.ROTATION_HANDLE?this.hint.innerHTML=this.currentAlpha+"°":(c=this.state.view.scale,this.hint.innerHTML=this.roundLength(this.bounds.width/c)+" x "+this.roundLength(this.bounds.height/ -c)),c=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0"),null==c&&(c=this.bounds),this.hint.style.left=c.x+Math.round((c.width-this.hint.clientWidth)/2)+"px",this.hint.style.top=c.y+c.height+12+"px",null!=this.linkHint&&(this.linkHint.style.display="none"))};mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint= -function(c,b){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));var f=this.graph.view.translate,d=this.graph.view.scale,e=this.roundLength(b.x/d-f.x),f=this.roundLength(b.y/d-f.y);this.hint.innerHTML=e+", "+f;this.hint.style.visibility="visible";if(this.isSource||this.isTarget)null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(e=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*e.x)+"%, "+ -Math.round(100*e.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(c.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(c.getGraphY(),b.y)+this.state.view.graph.gridSize+"px";null!=this.linkHint&&(this.linkHint.style.display="none")};mxEdgeHandler.prototype.removeHint=mxVertexHandler.prototype.removeHint;HoverIcons.prototype.mainHandle=mxClient.IS_SVG?Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+ -HoverIcons.prototype.arrowFill+'" stroke-width="1"/>'):new mxImage(IMAGE_PATH+"/handle-main.png",17,17);HoverIcons.prototype.secondaryHandle=mxClient.IS_SVG?Graph.createSvgImage(16,16,'<path d="m 8 3 L 13 8 L 8 13 L 3 8 z" stroke="#fff" fill="#fca000"/>'):new mxImage(IMAGE_PATH+"/handle-secondary.png",17,17);HoverIcons.prototype.fixedHandle=mxClient.IS_SVG?Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'" stroke-width="1"/><path d="m 7 7 L 11 11 M 7 11 L 11 7" stroke="#fff"/>'): -new mxImage(IMAGE_PATH+"/handle-fixed.png",17,17);HoverIcons.prototype.terminalHandle=mxClient.IS_SVG?Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'" stroke-width="1"/><circle cx="9" cy="9" r="2" stroke="#fff" fill="transparent"/>'):new mxImage(IMAGE_PATH+"/handle-terminal.png",17,17);HoverIcons.prototype.rotationHandle=new mxImage(mxClient.IS_SVG?"data:image/png;base64,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": +mxStencilRegistry.loadStencilSet=function(a,b,e,d){var k=mxStencilRegistry.packages[a];if(null!=e&&e||null==k){var m=!1;if(null==k)try{if(d){mxStencilRegistry.loadStencil(a,mxUtils.bind(this,function(d){null!=d&&null!=d.documentElement&&(mxStencilRegistry.packages[a]=d,m=!0,mxStencilRegistry.parseStencilSet(d.documentElement,b,m))}));return}k=mxStencilRegistry.loadStencil(a);mxStencilRegistry.packages[a]=k;m=!0}catch(r){null!=window.console&&console.log("error in loadStencilSet:",a,r)}null!=k&&null!= +k.documentElement&&mxStencilRegistry.parseStencilSet(k.documentElement,b,m)}};mxStencilRegistry.loadStencil=function(a,b){if(null!=b)mxUtils.get(a,mxUtils.bind(this,function(a){b(200<=a.getStatus()&&299>=a.getStatus()?a.getXml():null)}));else return mxUtils.load(a).getXml()};mxStencilRegistry.parseStencilSets=function(a){for(var b=0;b<a.length;b++)mxStencilRegistry.parseStencilSet(mxUtils.parseXml(a[b]).documentElement)}; +mxStencilRegistry.parseStencilSet=function(a,b,e){if("stencils"==a.nodeName)for(var d=a.firstChild;null!=d;)"shapes"==d.nodeName&&mxStencilRegistry.parseStencilSet(d,b,e),d=d.nextSibling;else{e=null!=e?e:!0;var d=a.firstChild,k="";a=a.getAttribute("name");for(null!=a&&(k=a+".");null!=d;){if(d.nodeType==mxConstants.NODETYPE_ELEMENT&&(a=d.getAttribute("name"),null!=a)){var k=k.toLowerCase(),m=a.replace(/ /g,"_");e&&mxStencilRegistry.addStencil(k+m.toLowerCase(),new mxStencil(d));if(null!=b){var r=d.getAttribute("w"), +u=d.getAttribute("h"),r=null==r?80:parseInt(r,10),u=null==u?80:parseInt(u,10);b(k,m,a,r,u)}}d=d.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 b(a,c){switch(c){case mxConstants.PIXELS:return a;case mxConstants.CENTIMETERS:return(a/mxConstants.PIXELS_PER_CM).toFixed(2);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 e=mxConnectionHandler.prototype.isCreateTarget;mxConnectionHandler.prototype.isCreateTarget=function(a){return mxEvent.isControlDown(a)||e.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 c in this.graph.currentEdgeStyle)a.style[c]=this.graph.currentEdgeStyle[c];return a};var d=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var a=d.apply(this,arguments);a.isDashed="1"== +this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED];return a};mxConnectionHandler.prototype.updatePreview=function(a){};var k=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var a=k.apply(this,arguments),c=a.getCell;a.getCell=mxUtils.bind(this,function(a){var b=c.apply(this,arguments);this.error=null;return b});return a};mxConnectionHandler.prototype.isCellEnabled=function(a){return!this.graph.isCellLocked(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+"/default.xml").getDocumentElement():null;null!=a&&(new mxCodec(a.ownerDocument)).decode(a,this.getStylesheet())};Graph.prototype.importGraphModel=function(a,c,b,f){c=null!=c?c:0;b=null!=b?b:0;var d=new mxCodec(a.ownerDocument),e=new mxGraphModel;d.decode(a,e);a=[];d=e.getChildren(this.cloneCell(e.root,this.isCloneInvalidEdges()));if(null!=d){d=d.slice();this.model.beginUpdate();try{if(1!=d.length|| +this.isCellLocked(this.getDefaultParent()))for(e=0;e<d.length;e++)a=a.concat(this.model.getChildren(this.moveCells([d[e]],c,b,!1,this.model.getRoot())[0]));else a=this.moveCells(e.getChildren(d[0]),c,b,!1,this.getDefaultParent());if(f){this.isGridEnabled()&&(c=this.snap(c),b=this.snap(b));var g=this.getBoundingBoxFromGeometry(a,!0);null!=g&&this.moveCells(a,c-g.x,b-g.y)}}finally{this.model.endUpdate()}}return a};Graph.prototype.getAllConnectionConstraints=function(a,c){if(null!=a){var b=mxUtils.getValue(a.style, +"points",null);if(null!=b){var f=[];try{for(var d=JSON.parse(b),b=0;b<d.length;b++){var e=d[b];f.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(W){}return f}if(null!=a.shape&&null!=a.shape.bounds){e=a.shape.direction;d=a.shape.bounds;b=a.shape.scale;f=d.width/b;d=d.height/b;if(e==mxConstants.DIRECTION_NORTH||e==mxConstants.DIRECTION_SOUTH)e=f,f=d,d=e;b=a.shape.getConstraints(a.style,f,d);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 c=this.view.getState(a),c=null!=c?c.style:this.getCellStyle(a);null!=c&&(c=mxUtils.getValue(c,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL,this.setCellStyles(mxConstants.STYLE_ELBOW,c,[a]))}};Graph.prototype.isValidRoot= +function(a){for(var c=this.model.getChildCount(a),b=0,f=0;f<c;f++){var d=this.model.getChildAt(a,f);this.model.isVertex(d)&&(d=this.getCellGeometry(d),null==d||d.relative||b++)}return 0<b||this.isContainer(a)};Graph.prototype.isValidDropTarget=function(a){var c=this.view.getState(a),c=null!=c?c.style:this.getCellStyle(a);return"1"!=mxUtils.getValue(c,"part","0")&&(this.isContainer(a)||mxGraph.prototype.isValidDropTarget.apply(this,arguments)&&"0"!=mxUtils.getValue(c,"dropTarget","1"))};Graph.prototype.createGroupCell= +function(){var a=mxGraph.prototype.createGroupCell.apply(this,arguments);a.setStyle("group");return a};Graph.prototype.isExtendParentsOnAdd=function(a){var c=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(c&&null!=a&&null!=this.layoutManager){var b=this.model.getParent(a);null!=b&&(b=this.layoutManager.getLayout(b),null!=b&&b.constructor==mxStackLayout&&(c=!1))}return c};Graph.prototype.getPreferredSizeForCell=function(a){var c=mxGraph.prototype.getPreferredSizeForCell.apply(this, +arguments);null!=c&&(c.width+=10,c.height+=4,this.gridEnabled&&(c.width=this.snap(c.width),c.height=this.snap(c.height)));return c};Graph.prototype.turnShapes=function(a){var c=this.getModel(),b=[];c.beginUpdate();try{for(var f=0;f<a.length;f++){var d=a[f];if(c.isEdge(d)){var e=c.getTerminal(d,!0),g=c.getTerminal(d,!1);c.setTerminal(d,g,!0);c.setTerminal(d,e,!1);var l=c.getGeometry(d);if(null!=l){l=l.clone();null!=l.points&&l.points.reverse();var p=l.getTerminalPoint(!0),n=l.getTerminalPoint(!1); +l.setTerminalPoint(p,!1);l.setTerminalPoint(n,!0);c.setGeometry(d,l);var q=this.view.getState(d),t=this.view.getState(e),M=this.view.getState(g);if(null!=q){var v=null!=t?this.getConnectionConstraint(q,t,!0):null,x=null!=M?this.getConnectionConstraint(q,M,!1):null;this.setConnectionConstraint(d,e,!0,x);this.setConnectionConstraint(d,g,!1,v)}b.push(d)}}else if(c.isVertex(d)&&(l=this.getCellGeometry(d),null!=l)){l=l.clone();l.x+=l.width/2-l.height/2;l.y+=l.height/2-l.width/2;var C=l.width;l.width=l.height; +l.height=C;c.setGeometry(d,l);var k=this.view.getState(d);if(null!=k){var B=k.style[mxConstants.STYLE_DIRECTION]||"east";"east"==B?B="south":"south"==B?B="west":"west"==B?B="north":"north"==B&&(B="east");this.setCellStyles(mxConstants.STYLE_DIRECTION,B,[d])}b.push(d)}}}finally{c.endUpdate()}return b};Graph.prototype.stencilHasPlaceholders=function(a){if(null!=a&&null!=a.fgNode)for(a=a.fgNode.firstChild;null!=a;){if("text"==a.nodeName&&"1"==a.getAttribute("placeholders"))return!0;a=a.nextSibling}return!1}; +Graph.prototype.processChange=function(a){mxGraph.prototype.processChange.apply(this,arguments);if(a instanceof mxValueChange&&null!=a.cell&&null!=a.cell.value&&"object"==typeof a.cell.value){var c=this.model.getDescendants(a.cell);if(0<c.length)for(var b=0;b<c.length;b++){var f=this.view.getState(c[b]);null!=f&&null!=f.shape&&null!=f.shape.stencil&&this.stencilHasPlaceholders(f.shape.stencil)?this.removeStateForCell(c[b]):this.isReplacePlaceholders(c[b])&&this.view.invalidate(c[b],!1,!1)}}};Graph.prototype.replaceElement= +function(a,c){for(var b=a.ownerDocument.createElement(null!=c?c:"span"),f=Array.prototype.slice.call(a.attributes);attr=f.pop();)b.setAttribute(attr.nodeName,attr.nodeValue);b.innerHTML=a.innerHTML;a.parentNode.replaceChild(b,a)};Graph.prototype.processElements=function(a,c){for(var b=a.getElementsByTagName("*"),f=0;f<b.length;f++)c(b[f])};Graph.prototype.updateLabelElements=function(a,c,b){a=null!=a?a:this.getSelectionCells();for(var f=document.createElement("div"),d=0;d<a.length;d++)if(this.isHtmlLabel(a[d])){var e= +this.convertValueToString(a[d]);if(null!=e&&0<e.length){f.innerHTML=e;for(var g=f.getElementsByTagName(null!=b?b:"*"),l=0;l<g.length;l++)c(g[l]);f.innerHTML!=e&&this.cellLabelChanged(a[d],f.innerHTML)}}};Graph.prototype.cellLabelChanged=function(a,c,b){c=Graph.zapGremlins(c);this.model.beginUpdate();try{if(null!=a.value&&"object"==typeof a.value){if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder"))for(var f=a.getAttribute("placeholder"),d=a;null!=d;){if(d==this.model.getRoot()|| +null!=d.value&&"object"==typeof d.value&&d.hasAttribute(f)){this.setAttributeForCell(d,f,c);break}d=this.model.getParent(d)}var e=a.value.cloneNode(!0);e.setAttribute("label",c);c=e}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(a){if(null!=a){for(var c=new mxDictionary,b=0;b<a.length;b++)c.put(a[b],!0);for(var f=[],b=0;b<a.length;b++){var d=this.model.getParent(a[b]);null==d||c.get(d)||(c.put(d,!0),f.push(d))}for(b= +0;b<f.length;b++)if(d=this.view.getState(f[b]),null!=d&&(this.model.isEdge(d.cell)||this.model.isVertex(d.cell))&&this.isCellDeletable(d.cell)){var e=mxUtils.getValue(d.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),g=mxUtils.getValue(d.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);if(e==mxConstants.NONE&&g==mxConstants.NONE){e=!0;for(g=0;g<this.model.getChildCount(d.cell)&&e;g++)c.get(this.model.getChildAt(d.cell,g))||(e=!1);e&&a.push(d.cell)}}}mxGraph.prototype.cellsRemoved.apply(this, +arguments)};Graph.prototype.removeCellsAfterUngroup=function(a){for(var c=[],b=0;b<a.length;b++)if(this.isCellDeletable(a[b])){var f=this.view.getState(a[b]);if(null!=f){var d=mxUtils.getValue(f.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),f=mxUtils.getValue(f.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);d==mxConstants.NONE&&f==mxConstants.NONE&&c.push(a[b])}}a=c;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(a,c){this.setAttributeForCell(a, +"link",c)};Graph.prototype.setTooltipForCell=function(a,c){this.setAttributeForCell(a,"tooltip",c)};Graph.prototype.getAttributeForCell=function(a,c,b){return null!=a.value&&"object"===typeof a.value?a.value.getAttribute(c)||b:b};Graph.prototype.setAttributeForCell=function(a,c,b){var f;null!=a.value&&"object"==typeof a.value?f=a.value.cloneNode(!0):(f=mxUtils.createXmlDocument().createElement("UserObject"),f.setAttribute("label",a.value||""));null!=b?f.setAttribute(c,b):f.removeAttribute(c);this.model.setValue(a, +f)};Graph.prototype.getDropTarget=function(a,c,b,f){this.getModel();if(mxEvent.isAltDown(c))return null;for(var d=0;d<a.length;d++)if(this.model.isEdge(this.model.getParent(a[d])))return null;return mxGraph.prototype.getDropTarget.apply(this,arguments)};Graph.prototype.click=function(a){mxGraph.prototype.click.call(this,a);this.firstClickState=a.getState();this.firstClickSource=a.getSource()};Graph.prototype.dblClick=function(a,c){if(this.isEnabled()){var b=mxUtils.convertPoint(this.container,mxEvent.getClientX(a), +mxEvent.getClientY(a));if(null!=a&&!this.model.isVertex(c)){var f=this.model.isEdge(c)?this.view.getState(c):null,d=mxEvent.getSource(a);this.firstClickState!=f||this.firstClickSource!=d||null!=f&&null!=f.text&&null!=f.text.node&&null!=f.text.boundingBox&&(mxUtils.contains(f.text.boundingBox,b.x,b.y)||mxUtils.isAncestorNode(f.text.node,mxEvent.getSource(a)))||(null!=f||this.isCellLocked(this.getDefaultParent()))&&(null==f||this.isCellLocked(f.cell))||!(null!=f||mxClient.IS_VML&&d==this.view.getCanvas()|| +mxClient.IS_SVG&&d==this.view.getCanvas().ownerSVGElement)||(c=this.addText(b.x,b.y,f))}mxGraph.prototype.dblClick.call(this,a,c)}};Graph.prototype.getInsertPoint=function(){var a=this.getGridSize(),c=this.container.scrollLeft/this.view.scale-this.view.translate.x,b=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible)var f=this.getPageLayout(),d=this.getPageSize(),c=Math.max(c,f.x*d.width),b=Math.max(b,f.y*d.height);return new mxPoint(this.snap(c+a),this.snap(b+a))}; +Graph.prototype.getFreeInsertPoint=function(){var a=this.view,c=this.getGraphBounds(),b=this.getInsertPoint(),f=this.snap(Math.round(Math.max(b.x,c.x/a.scale-a.translate.x+(0==c.width?2*this.gridSize:0)))),a=this.snap(Math.round(Math.max(b.y,(c.y+c.height)/a.scale-a.translate.y+2*this.gridSize)));return new mxPoint(f,a)};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.addText=function(a,c,b){var f=new mxCell;f.value="Text";f.style="text;html=1;resizable=0;points=[];";f.geometry= +new mxGeometry(0,0,0,0);f.vertex=!0;if(null!=b){f.style+="align=center;verticalAlign=middle;labelBackgroundColor=#ffffff;";f.geometry.relative=!0;f.connectable=!1;var d=this.view.getRelativePoint(b,a,c);f.geometry.x=Math.round(1E4*d.x)/1E4;f.geometry.y=Math.round(d.y);f.geometry.offset=new mxPoint(0,0);var d=this.view.getPoint(b,f.geometry),e=this.view.scale;f.geometry.offset=new mxPoint(Math.round((a-d.x)/e),Math.round((c-d.y)/e))}else f.style+="autosize=1;align=left;verticalAlign=top;spacingTop=-4;", +d=this.view.translate,f.geometry.width=40,f.geometry.height=20,f.geometry.x=Math.round(a/this.view.scale)-d.x,f.geometry.y=Math.round(c/this.view.scale)-d.y;this.getModel().beginUpdate();try{this.addCells([f],null!=b?b.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[f])),this.autoSizeCell(f)}finally{this.getModel().endUpdate()}return f};Graph.prototype.addClickHandler=function(a,c,b){var f=mxUtils.bind(this,function(){var a=this.container.getElementsByTagName("a");if(null!=a)for(var b= +0;b<a.length;b++){var f=this.getAbsoluteUrl(a[b].getAttribute("href"));null!=f&&(a[b].setAttribute("rel",this.linkRelation),a[b].setAttribute("href",f),null!=c&&mxEvent.addGestureListeners(a[b],null,null,c))}});this.model.addListener(mxEvent.CHANGE,f);f();var d=this.container.style.cursor,e=this.getTolerance(),g=this,l={currentState:null,currentLink:null,highlight:null!=a&&""!=a&&a!=mxConstants.NONE?new mxCellHighlight(g,a,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(a){var c= +a.sourceState;if(null==c||null==g.getLinkForCell(c.cell))a=g.getCellAt(a.getGraphX(),a.getGraphY(),null,null,null,function(a,c,b){return null==g.getLinkForCell(a.cell)}),c=g.view.getState(a);c!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=c,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(a,c){this.startX=c.getGraphX();this.startY=c.getGraphY();this.scrollLeft=g.container.scrollLeft;this.scrollTop=g.container.scrollTop;null==this.currentLink&& +"auto"==g.container.style.overflow&&(g.container.style.cursor="move");this.updateCurrentState(c)},mouseMove:function(a,c){if(g.isMouseDown){if(null!=this.currentLink){var b=Math.abs(this.startX-c.getGraphX()),f=Math.abs(this.startY-c.getGraphY());(b>e||f>e)&&this.clear()}}else{for(b=c.getSource();null!=b&&"a"!=b.nodeName.toLowerCase();)b=b.parentNode;null!=b?this.clear():(null!=g.tooltipHandler&&null!=this.currentLink&&null!=this.currentState&&g.tooltipHandler.reset(c,!0,this.currentState),(null== +this.currentState||c.getState()!=this.currentState&&null!=c.sourceState||!g.intersects(this.currentState,c.getGraphX(),c.getGraphY()))&&this.updateCurrentState(c))}},mouseUp:function(a,f){for(var d=f.getSource(),l=f.getEvent();null!=d&&"a"!=d.nodeName.toLowerCase();)d=d.parentNode;null==d&&Math.abs(this.scrollLeft-g.container.scrollLeft)<e&&Math.abs(this.scrollTop-g.container.scrollTop)<e&&(null==f.sourceState||!f.isSource(f.sourceState.control))&&((mxEvent.isLeftMouseButton(l)||mxEvent.isMiddleMouseButton(l))&& +!mxEvent.isPopupTrigger(l)||mxEvent.isTouchEvent(l))&&(null!=this.currentLink?(d=g.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&d||null==c||c(l,this.currentLink),mxEvent.isConsumed(l)||(l=mxEvent.isMiddleMouseButton(l)?"_blank":d?g.linkTarget:"_top",g.openLink(this.currentLink,l),f.consume())):null!=b&&!f.isConsumed()&&Math.abs(this.scrollLeft-g.container.scrollLeft)<e&&Math.abs(this.scrollTop-g.container.scrollTop)<e&&Math.abs(this.startX-f.getGraphX())<e&&Math.abs(this.startY- +f.getGraphY())<e&&b(f.getEvent()));this.clear()},activate:function(a){this.currentLink=g.getAbsoluteUrl(g.getLinkForCell(a.cell));null!=this.currentLink&&(g.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(a))},clear:function(){null!=g.container&&(g.container.style.cursor=d);this.currentLink=this.currentState=null;null!=this.highlight&&this.highlight.hide();null!=g.tooltipHandler&&g.tooltipHandler.hide()}};g.click=function(a){};g.addMouseListener(l);mxEvent.addListener(document, +"mouseleave",function(a){l.clear()})};Graph.prototype.duplicateCells=function(a,c){a=null!=a?a:this.getSelectionCells();c=null!=c?c:!0;a=this.model.getTopmostCells(a);var b=this.getModel(),f=this.gridSize,d=[];b.beginUpdate();try{for(var e=this.cloneCells(a,!1,null,!0),g=0;g<a.length;g++){var l=b.getParent(a[g]),p=this.moveCells([e[g]],f,f,!1)[0];d.push(p);if(c)b.add(l,e[g]);else{var n=l.getIndex(a[g]);b.add(l,e[g],n+1)}}}finally{b.endUpdate()}return d};Graph.prototype.insertImage=function(a,c,b){if(null!= +a&&null!=this.cellEditor.textarea){for(var f=this.cellEditor.textarea.getElementsByTagName("img"),d=[],e=0;e<f.length;e++)d.push(f[e]);document.execCommand("insertimage",!1,a);a=this.cellEditor.textarea.getElementsByTagName("img");if(a.length==d.length+1)for(e=a.length-1;0<=e;e--)if(0==e||a[e]!=d[e-1]){a[e].setAttribute("width",c);a[e].setAttribute("height",b);break}}};Graph.prototype.insertLink=function(a){if(null!=this.cellEditor.textarea)if(0==a.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var c= +this.cellEditor.textarea.getElementsByTagName("a"),b=[],f=0;f<c.length;f++)b.push(c[f]);document.execCommand("createlink",!1,mxUtils.trim(a));c=this.cellEditor.textarea.getElementsByTagName("a");if(c.length==b.length+1)for(f=c.length-1;0<=f;f--)if(c[f]!=b[f-1]){for(c=c[f].getElementsByTagName("a");0<c.length;){for(b=c[0].parentNode;null!=c[0].firstChild;)b.insertBefore(c[0].firstChild,c[0]);b.removeChild(c[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(a))};Graph.prototype.isCellResizable= +function(a){var c=mxGraph.prototype.isCellResizable.apply(this,arguments),b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return c||"0"!=mxUtils.getValue(b,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==b[mxConstants.STYLE_WHITE_SPACE]};Graph.prototype.distributeCells=function(a,c){null==c&&(c=this.getSelectionCells());if(null!=c&&1<c.length){for(var b=[],f=null,d=null,e=0;e<c.length;e++)if(this.getModel().isVertex(c[e])){var g=this.view.getState(c[e]);if(null!=g){var l=a?g.getCenterX(): +g.getCenterY(),f=null!=f?Math.max(f,l):l,d=null!=d?Math.min(d,l):l;b.push(g)}}if(2<b.length){b.sort(function(c,b){return a?c.x-b.x:c.y-b.y});g=this.view.translate;l=this.view.scale;d=d/l-(a?g.x:g.y);f=f/l-(a?g.x:g.y);this.getModel().beginUpdate();try{for(var p=(f-d)/(b.length-1),f=d,e=1;e<b.length-1;e++){var n=this.view.getState(this.model.getParent(b[e].cell)),q=this.getCellGeometry(b[e].cell),f=f+p;null!=q&&null!=n&&(q=q.clone(),a?q.x=Math.round(f-q.width/2)-n.origin.x:q.y=Math.round(f-q.height/ +2)-n.origin.y,this.getModel().setGeometry(b[e].cell,q))}}finally{this.getModel().endUpdate()}}}return c};Graph.prototype.isCloneEvent=function(a){return mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxEvent.isControlDown(a)};Graph.prototype.encodeCells=function(a){for(var c=this.cloneCells(a),b=new mxDictionary,f=0;f<a.length;f++)b.put(a[f],!0);for(f=0;f<c.length;f++){var d=this.view.getState(a[f]);if(null!=d){var e=this.getCellGeometry(c[f]);null==e||!e.relative||this.model.isEdge(a[f])||b.get(this.model.getParent(a[f]))|| +(e.relative=!1,e.x=d.x/d.view.scale-d.view.translate.x,e.y=d.y/d.view.scale-d.view.translate.y)}}b=new mxCodec;d=new mxGraphModel;e=d.getChildAt(d.getRoot(),0);for(f=0;f<a.length;f++)d.add(e,c[f]);return b.encode(d)};Graph.prototype.createSvgImageExport=function(){var a=new mxImageExport;a.getLinkForCellState=mxUtils.bind(this,function(a,c){return this.getLinkForCell(a.cell)});return a};Graph.prototype.getSvg=function(a,c,b,f,d,e,g,l,p,n){var q=this.useCssTransforms;q&&(this.useCssTransforms=!1,this.view.revalidate(), +this.sizeDidChange());try{c=null!=c?c:1;b=null!=b?b:0;d=null!=d?d:!0;e=null!=e?e:!0;g=null!=g?g:!0;var t=e||f?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==t)throw Error(mxResources.get("drawingEmpty"));var v=this.view.scale,x=mxUtils.createXmlDocument(),C=null!=x.createElementNS?x.createElementNS(mxConstants.NS_SVG,"svg"):x.createElement("svg");null!=a&&(null!=C.style?C.style.backgroundColor=a:C.setAttribute("style","background-color:"+a));null==x.createElementNS?(C.setAttribute("xmlns", +mxConstants.NS_SVG),C.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):C.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=c/v;var k=Math.max(1,Math.ceil(t.width*a)+2*b)+(n?5:0),B=Math.max(1,Math.ceil(t.height*a)+2*b)+(n?5:0);C.setAttribute("version","1.1");C.setAttribute("width",k+"px");C.setAttribute("height",B+"px");C.setAttribute("viewBox",(d?"-0.5 -0.5":"0 0")+" "+k+" "+B);x.appendChild(C);var A=null!=x.createElementNS?x.createElementNS(mxConstants.NS_SVG, +"g"):x.createElement("g");C.appendChild(A);var m=this.createSvgCanvas(A);m.foOffset=d?-.5:0;m.textOffset=d?-.5:0;m.imageOffset=d?-.5:0;m.translate(Math.floor((b/c-t.x)/v),Math.floor((b/c-t.y)/v));var u=document.createElement("textarea"),M=m.createAlternateContent;m.createAlternateContent=function(a,c,b,f,d,e,g,l,p,n,q,t,C){var x=this.state;if(null!=this.foAltText&&(0==f||0!=x.fontSize&&e.length<5*f/x.fontSize)){var v=this.createElement("text");v.setAttribute("x",Math.round(f/2));v.setAttribute("y", +Math.round((d+x.fontSize)/2));v.setAttribute("fill",x.fontColor||"black");v.setAttribute("text-anchor","middle");v.setAttribute("font-size",Math.round(x.fontSize)+"px");v.setAttribute("font-family",x.fontFamily);(x.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&v.setAttribute("font-weight","bold");(x.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&v.setAttribute("font-style","italic");(x.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&v.setAttribute("text-decoration", +"underline");try{return u.innerHTML=e,v.textContent=u.value,v}catch(Da){return M.apply(this,arguments)}}else return M.apply(this,arguments)};var K=this.backgroundImage;if(null!=K){c=v/c;var r=this.view.translate,D=new mxRectangle(r.x*c,r.y*c,K.width*c,K.height*c);mxUtils.intersects(t,D)&&m.image(r.x,r.y,K.width,K.height,K.src,!0)}m.scale(a);m.textEnabled=g;l=null!=l?l:this.createSvgImageExport();var H=l.drawCellState,E=l.getLinkForCellState;l.getLinkForCellState=function(a,c){var b=E.apply(this,arguments); +return null==b||a.view.graph.isCustomLink(b)?null:b};l.drawCellState=function(a,c){for(var b=a.view.graph,f=b.isCellSelected(a.cell),d=b.model.getParent(a.cell);!e&&!f&&null!=d;)f=b.isCellSelected(d),d=b.model.getParent(d);(e||f)&&H.apply(this,arguments)};l.drawState(this.getView().getState(this.model.root),m);this.updateSvgLinks(C,p,!0);return C}finally{q&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.updateSvgLinks=function(a,c,b){a=a.getElementsByTagName("a"); +for(var f=0;f<a.length;f++){var d=a[f].getAttribute("href");null==d&&(d=a[f].getAttribute("xlink:href"));null!=d&&(null!=c&&/^https?:\/\//.test(d)?a[f].setAttribute("target",c):b&&this.isCustomLink(d)&&a[f].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(a){return new mxSvgCanvas2D(a)};Graph.prototype.getSelectedElement=function(){var a=null;if(window.getSelection){var c=window.getSelection();c.getRangeAt&&c.rangeCount&&(a=c.getRangeAt(0).commonAncestorContainer)}else document.selection&& +(a=document.selection.createRange().parentElement());return a};Graph.prototype.getParentByName=function(a,c,b){for(;null!=a&&a.nodeName!=c;){if(a==b)return null;a=a.parentNode}return a};Graph.prototype.getParentByNames=function(a,c,b){for(;null!=a&&!(0<=mxUtils.indexOf(c,a.nodeName));){if(a==b)return null;a=a.parentNode}return a};Graph.prototype.selectNode=function(a){var c=null;if(window.getSelection){if(c=window.getSelection(),c.getRangeAt&&c.rangeCount){var b=document.createRange();b.selectNode(a); +c.removeAllRanges();c.addRange(b)}}else(c=document.selection)&&"Control"!=c.type&&(a=c.createRange(),a.collapse(!0),b=c.createRange(),b.setEndPoint("StartToStart",a),b.select())};Graph.prototype.insertRow=function(a,c){for(var b=a.tBodies[0],f=b.rows[0].cells,d=0,e=0;e<f.length;e++)var g=f[e].getAttribute("colspan"),d=d+(null!=g?parseInt(g):1);b=b.insertRow(c);for(e=0;e<d;e++)mxUtils.br(b.insertCell(-1));return b.cells[0]};Graph.prototype.deleteRow=function(a,c){a.tBodies[0].deleteRow(c)};Graph.prototype.insertColumn= +function(a,c){var b=a.tHead;if(null!=b)for(var f=0;f<b.rows.length;f++){var d=document.createElement("th");b.rows[f].appendChild(d);mxUtils.br(d)}b=a.tBodies[0];for(f=0;f<b.rows.length;f++)d=b.rows[f].insertCell(c),mxUtils.br(d);return b.rows[0].cells[0<=c?c:b.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(a,c){if(0<=c)for(var b=a.tBodies[0].rows,f=0;f<b.length;f++)b[f].cells.length>c&&b[f].deleteCell(c)};Graph.prototype.pasteHtmlAtCaret=function(a){var c;if(window.getSelection){if(c= +window.getSelection(),c.getRangeAt&&c.rangeCount){c=c.getRangeAt(0);c.deleteContents();var b=document.createElement("div");b.innerHTML=a;a=document.createDocumentFragment();for(var f;f=b.firstChild;)lastNode=a.appendChild(f);c.insertNode(a)}}else(c=document.selection)&&"Control"!=c.type&&c.createRange().pasteHTML(a)};Graph.prototype.createLinkForHint=function(a,c){function b(a,c){a.length>c&&(a=a.substring(0,Math.round(c/2))+"..."+a.substring(a.length-Math.round(c/4)));return a}a=null!=a?a:"javascript:void(0);"; +if(null==c||0==c.length)c=this.isCustomLink(a)?this.getLinkTitle(a):a;var f=document.createElement("a");f.setAttribute("rel",this.linkRelation);f.setAttribute("href",this.getAbsoluteUrl(a));f.setAttribute("title",b(this.isCustomLink(a)?this.getLinkTitle(a):a,80));null!=this.linkTarget&&f.setAttribute("target",this.linkTarget);mxUtils.write(f,b(c,40));this.isCustomLink(a)&&mxEvent.addListener(f,"click",mxUtils.bind(this,function(c){this.customLinkClicked(a);mxEvent.consume(c)}));return f};Graph.prototype.initTouch= +function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(a,c){this.popupMenuHandler.hideMenu()});var a=this.updateMouseEvent;this.updateMouseEvent=function(c){c=a.apply(this,arguments);if(mxEvent.isTouchEvent(c.getEvent())&&null==c.getState()){var b=this.getCellAt(c.graphX,c.graphY);null!=b&&this.isSwimlane(b)&&this.hitsSwimlaneContent(b,c.graphX,c.graphY)||(c.state=this.view.getState(b),null!=c.state&& +null!=c.state.shape&&(this.container.style.cursor=c.state.shape.node.style.cursor))}null==c.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return c};var c=!1,b=!1,f=!1,d=this.fireMouseEvent;this.fireMouseEvent=function(a,e,g){a==mxEvent.MOUSE_DOWN&&(e=this.updateMouseEvent(e),c=this.isCellSelected(e.getCell()),b=this.isSelectionEmpty(),f=this.popupMenuHandler.isMenuShowing());d.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(a,d){this.popupMenuHandler.popupTrigger= +!this.isEditing()&&this.isEnabled()&&(null==d.getState()||!d.isSource(d.getState().control))&&(this.popupMenuHandler.popupTrigger||!f&&!mxEvent.isMouseEvent(d.getEvent())&&(b&&null==d.getCell()&&this.isSelectionEmpty()||c&&this.isCellSelected(d.getCell())));mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,arguments)})};mxCellEditor.prototype.isContentEditing=function(){var a=this.graph.view.getState(this.editingCell);return null!=a&&1==a.style.html};mxCellEditor.prototype.isTableSelected= +function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.alignText=function(a,c){!this.isTableSelected()==(null==c||!mxEvent.isShiftDown(c))&&(this.graph.cellEditor.setAlign(a),this.graph.processElements(this.textarea,function(a){a.removeAttribute("align");a.style.textAlign=null}));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 c=[],b=0,f=a.rangeCount;b<f;++b)c.push(a.getRangeAt(b));return c}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(a){try{if(a)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var c=0,b=a.length;c<b;++c)sel.addRange(a[c])}else document.selection&&a.select&&a.select()}catch(ga){}};var m=mxCellRenderer.prototype.initializeLabel; +mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br","1"));m.apply(this,arguments)};var r=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(a,c){this.isKeepFocusEvent(a)||!mxEvent.isAltDown(a.getEvent())?r.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(a){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing= +!1;var u=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(a,c){u.apply(this,arguments);var b=this.graph.view.getState(a);this.textarea.className=null!=b&&1==b.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(a);var b=this.graph.getModel().getParent(a),f=this.graph.getCellGeometry(a);this.graph.getModel().isEdge(b)&&null!=f&&f.relative||this.graph.getModel().isEdge(a)? +mxClient.IS_QUIRKS?this.textarea.style.border="gray dotted 1px":this.textarea.style.outline=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":"":mxClient.IS_QUIRKS&&(this.textarea.style.outline="none",this.textarea.style.border="")};var y=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(a){function c(a,b){b.originalNode=a;a=a.firstChild;for(var f=b.firstChild;null!=a&&null!=f;)c(a,f),a=a.nextSibling,f=f.nextSibling;return b} +function b(a,c){if(null!=a)if(c.originalNode!=a)f(a);else for(a=a.firstChild,c=c.firstChild;null!=a;){var d=a.nextSibling;null==c?f(a):(b(a,c),c=c.nextSibling);a=d}}function f(a){for(var c=a.firstChild;null!=c;){var b=c.nextSibling;f(c);c=b}1==a.nodeType&&("BR"===a.nodeName||null!=a.firstChild)||3==a.nodeType&&0!=mxUtils.trim(mxUtils.getTextContent(a)).length?(3==a.nodeType&&mxUtils.setTextContent(a,mxUtils.getTextContent(a).replace(/\n|\r/g,"")),1==a.nodeType&&(a.removeAttribute("style"),a.removeAttribute("class"), +a.removeAttribute("width"),a.removeAttribute("cellpadding"),a.removeAttribute("cellspacing"),a.removeAttribute("border"))):a.parentNode.removeChild(a)}y.apply(this,arguments);mxClient.IS_QUIRKS||7===document.documentMode||8===document.documentMode||mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(a){var f=c(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,function(){null!=this.textarea&&(0<=this.textarea.innerHTML.indexOf("<o:OfficeDocumentSettings>")|| +0<=this.textarea.innerHTML.indexOf("\x3c!--[if !mso]>"))&&b(this.textarea,f)}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var a=this.graph.view.getState(this.editingCell);if(null!=a){var c=null!=a&&"0"!=mxUtils.getValue(a.style,"nl2Br","1"),b=this.saveSelection();if(this.codeViewMode){l=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<l.length&&"\n"==l.charAt(l.length-1)&&(l=l.substring(0,l.length-1));l=this.graph.sanitizeHtml(c?l.replace(/\n/g,"<br/>"):l,!0);this.textarea.className= +"mxCellEditor geContentEditable";var f=mxUtils.getValue(a.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE),c=mxUtils.getValue(a.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),d=mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),e=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,g=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,a=(mxUtils.getValue(a.style, +mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(f*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(f)+"px";this.textarea.style.textDecoration=a?"underline":"";this.textarea.style.fontWeight=e?"bold":"normal";this.textarea.style.fontStyle=g?"italic":"";this.textarea.style.fontFamily=c;this.textarea.style.textAlign=d;this.textarea.style.padding= +"0px";this.textarea.innerHTML!=l&&(this.textarea.innerHTML=l,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 l=mxUtils.htmlEntities(this.textarea.innerHTML);mxClient.IS_QUIRKS||8==document.documentMode||(l=mxUtils.replaceTrailingNewlines(l,"<div><br></div>")); +l=this.graph.sanitizeHtml(c?l.replace(/\n/g,"").replace(/<br\s*.?>/g,"<br>"):l,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var f=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(f*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(f)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily= +mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.padding="2px";this.textarea.innerHTML!=l&&(this.textarea.innerHTML=l);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=b;this.resize()}};var z=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(a,c){if(null!=this.textarea)if(a=this.graph.getView().getState(this.editingCell),this.codeViewMode&& +null!=a){var b=a.view.scale;this.bounds=mxRectangle.fromRectangle(a);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*b;this.bounds.height=60*b;var f=null!=a.text?a.text.margin:null;null==f&&(f=mxUtils.getAlignmentAsPoint(mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(a.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=f.x*this.bounds.width;this.bounds.y+=f.y*this.bounds.height}this.textarea.style.width= +Math.round((this.bounds.width-4)/b)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/b)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/b)+(this.textarea.offsetHeight-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*b);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/b)+(this.textarea.offsetWidth- +this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*b);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=Math.round(this.bounds.y)+"px";mxClient.IS_VML?this.textarea.style.zoom=b:mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+b+","+b+")")}else this.textarea.style.height="",this.textarea.style.overflow="",z.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue= +function(a,c){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var b=this.graph.getEditingValue(a.cell,c);"1"==mxUtils.getValue(a.style,"nl2Br","1")&&(b=b.replace(/\n/g,"<br/>"));return b=this.graph.sanitizeHtml(b,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(a){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var c=this.graph.sanitizeHtml(this.textarea.innerHTML, +!0);return c="1"==mxUtils.getValue(a.style,"nl2Br","1")?c.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):c.replace(/\r\n/g,"").replace(/\n/g,"")};var c=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(a){this.codeViewMode&&this.toggleViewMode();c.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(M){}};var f=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(a, +c){this.graph.getModel().beginUpdate();try{if(f.apply(this,arguments),this.graph.isCellDeletable(a.cell)&&0==this.graph.model.getChildCount(a.cell)){var b=mxUtils.getValue(a.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),d=mxUtils.getValue(a.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);""==c&&b==mxConstants.NONE&&d==mxConstants.NONE&&this.graph.removeCells([a.cell],!1)}}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(a){var c=mxUtils.getValue(a.style, +mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);null!=c&&c!=mxConstants.NONE||!(null!=a.cell.geometry&&0<a.cell.geometry.width)||0==mxUtils.getValue(a.style,mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(a.style,mxConstants.STYLE_HORIZONTAL,1)||(c=mxUtils.getValue(a.style,mxConstants.STYLE_FILLCOLOR,null));c==mxConstants.NONE&&(c=null);return c};mxCellEditor.prototype.getMinimumSize=function(a){var c=this.graph.getView().scale;return new mxRectangle(0,0,null==a.text?30:a.text.size*c+20,30)};var g= +mxGraphHandler.prototype.moveCells;mxGraphHandler.prototype.moveCells=function(a,c,b,f,d,e){mxEvent.isAltDown(e)&&(d=null);g.apply(this,arguments)};mxGraphView.prototype.formatUnitText=function(a){return a?b(a,this.unit):a};mxGraphHandler.prototype.updateHint=function(c){if(null!=this.shape){null==this.hint&&(this.hint=a(),this.graph.container.appendChild(this.hint));var f=this.graph.view.translate,d=this.graph.view.scale;c=this.roundLength((this.bounds.x+this.currentDx)/d-f.x);f=this.roundLength((this.bounds.y+ +this.currentDy)/d-f.y);d=this.graph.view.unit;this.hint.innerHTML=b(c,d)+", "+b(f,d);this.hint.style.left=this.shape.bounds.x+Math.round((this.shape.bounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.shape.bounds.y+this.shape.bounds.height+12+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(this.hint.parentNode.removeChild(this.hint),this.hint=null)};mxVertexHandler.prototype.isRecursiveResize=function(a,c){return!this.graph.isSwimlane(a.cell)&&0<this.graph.model.getChildCount(a.cell)&& +!mxEvent.isControlDown(c.getEvent())&&!this.graph.isCellCollapsed(a.cell)&&"1"==mxUtils.getValue(a.style,"recursiveResize","1")&&null==mxUtils.getValue(a.style,"childLayout",null)};mxVertexHandler.prototype.isCenteredEvent=function(a,c){return!(!this.graph.isSwimlane(a.cell)&&0<this.graph.model.getChildCount(a.cell)&&!this.graph.isCellCollapsed(a.cell)&&"1"==mxUtils.getValue(a.style,"recursiveResize","1")&&null==mxUtils.getValue(a.style,"childLayout",null))&&mxEvent.isControlDown(c.getEvent())||mxEvent.isMetaDown(c.getEvent())}; +var q=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var a=new mxPoint(0,0),c=this.tolerance;this.graph.cellEditor.getEditingCell()==this.state.cell&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(c/=2,a.x=this.sizers[0].bounds.width+c,a.y=this.sizers[0].bounds.height+c):a=q.apply(this,arguments);return a};mxVertexHandler.prototype.updateHint=function(c){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+"°";else{c=this.state.view.scale;var f=this.state.view.unit;this.hint.innerHTML=b(this.roundLength(this.bounds.width/c),f)+" x "+b(this.roundLength(this.bounds.height/c),f)}c=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0");null==c&&(c=this.bounds);this.hint.style.left=c.x+Math.round((c.width-this.hint.clientWidth)/2)+"px";this.hint.style.top= +c.y+c.height+12+"px";null!=this.linkHint&&(this.linkHint.style.display="none")}};mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(c,f){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));var d=this.graph.view.translate,e=this.graph.view.scale,g=this.roundLength(f.x/e-d.x),d=this.roundLength(f.y/e-d.y),e=this.graph.view.unit; +this.hint.innerHTML=b(g,e)+", "+b(d,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(c.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(c.getGraphY(), +f.y)+this.state.view.graph.gridSize+"px";null!=this.linkHint&&(this.linkHint.style.display="none")};mxEdgeHandler.prototype.removeHint=mxVertexHandler.prototype.removeHint;HoverIcons.prototype.mainHandle=mxClient.IS_SVG?Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'" stroke-width="1"/>'):new mxImage(IMAGE_PATH+"/handle-main.png",17,17);HoverIcons.prototype.secondaryHandle=mxClient.IS_SVG?Graph.createSvgImage(16,16,'<path d="m 8 3 L 13 8 L 8 13 L 3 8 z" stroke="#fff" fill="#fca000"/>'): +new mxImage(IMAGE_PATH+"/handle-secondary.png",17,17);HoverIcons.prototype.fixedHandle=mxClient.IS_SVG?Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'" stroke-width="1"/><path d="m 7 7 L 11 11 M 7 11 L 11 7" stroke="#fff"/>'):new mxImage(IMAGE_PATH+"/handle-fixed.png",17,17);HoverIcons.prototype.terminalHandle=mxClient.IS_SVG?Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'" stroke-width="1"/><circle cx="9" cy="9" r="2" stroke="#fff" fill="transparent"/>'): +new mxImage(IMAGE_PATH+"/handle-terminal.png",17,17);HoverIcons.prototype.rotationHandle=new mxImage(mxClient.IS_SVG?"data:image/png;base64,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": IMAGE_PATH+"/handle-rotate.png",19,21);mxClient.IS_SVG&&(mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="'+HoverIcons.prototype.arrowFill+'"/>'));mxVertexHandler.prototype.handleImage=HoverIcons.prototype.mainHandle;mxVertexHandler.prototype.secondaryHandleImage=HoverIcons.prototype.secondaryHandle;mxEdgeHandler.prototype.handleImage=HoverIcons.prototype.mainHandle;mxEdgeHandler.prototype.terminalHandleImage=HoverIcons.prototype.terminalHandle; mxEdgeHandler.prototype.fixedHandleImage=HoverIcons.prototype.fixedHandle;mxEdgeHandler.prototype.labelHandleImage=HoverIcons.prototype.secondaryHandle;mxOutline.prototype.sizerImage=HoverIcons.prototype.mainHandle;null!=window.Sidebar&&(Sidebar.prototype.triangleUp=HoverIcons.prototype.triangleUp,Sidebar.prototype.triangleRight=HoverIcons.prototype.triangleRight,Sidebar.prototype.triangleDown=HoverIcons.prototype.triangleDown,Sidebar.prototype.triangleLeft=HoverIcons.prototype.triangleLeft,Sidebar.prototype.refreshTarget= HoverIcons.prototype.refreshTarget,Sidebar.prototype.roundDrop=HoverIcons.prototype.roundDrop);mxClient.IS_SVG||((new Image).src=HoverIcons.prototype.mainHandle.src,(new Image).src=HoverIcons.prototype.fixedHandle.src,(new Image).src=HoverIcons.prototype.terminalHandle.src,(new Image).src=HoverIcons.prototype.secondaryHandle.src,(new Image).src=HoverIcons.prototype.rotationHandle.src,(new Image).src=HoverIcons.prototype.triangleUp.src,(new Image).src=HoverIcons.prototype.triangleRight.src,(new Image).src= HoverIcons.prototype.triangleDown.src,(new Image).src=HoverIcons.prototype.triangleLeft.src,(new Image).src=HoverIcons.prototype.refreshTarget.src,(new Image).src=HoverIcons.prototype.roundDrop.src);mxVertexHandler.prototype.rotationEnabled=!0;mxVertexHandler.prototype.manageSizers=!0;mxVertexHandler.prototype.livePreview=!0;mxRubberband.prototype.defaultOpacity=30;mxConnectionHandler.prototype.outlineConnect=!0;mxCellHighlight.prototype.keepOnTop=!0;mxVertexHandler.prototype.parentHighlightEnabled= !0;mxVertexHandler.prototype.rotationHandleVSpacing=-20;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=-24,mxConstraintHandler.prototype.getTolerance=function(a){return mxEvent.isMouseEvent(a.getEvent())?4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger= -function(a){var c=a.getEvent();return null==a.getState()&&!mxEvent.isMouseEvent(c)||mxEvent.isPopupTrigger(c)&&(null==a.getState()||mxEvent.isControlDown(c)||mxEvent.isShiftDown(c))};var q=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=function(a,c){q.apply(this,arguments);mxEvent.isTouchEvent(c.getEvent())&&this.graph.isCellSelected(c.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(a){var c= +function(a){var c=a.getEvent();return null==a.getState()&&!mxEvent.isMouseEvent(c)||mxEvent.isPopupTrigger(c)&&(null==a.getState()||mxEvent.isControlDown(c)||mxEvent.isShiftDown(c))};var n=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=function(a,c){n.apply(this,arguments);mxEvent.isTouchEvent(c.getEvent())&&this.graph.isCellSelected(c.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(a){var c= a.getEvent();return mxEvent.isLeftMouseButton(c)&&(this.useLeftButtonForPanning&&null==a.getState()||mxEvent.isControlDown(c)&&!mxEvent.isShiftDown(c))||this.usePopupTrigger&&mxEvent.isPopupTrigger(c)};mxRubberband.prototype.isSpaceEvent=function(a){return this.graph.isEnabled()&&!this.graph.isCellLocked(this.graph.getDefaultParent())&&mxEvent.isControlDown(a.getEvent())&&mxEvent.isShiftDown(a.getEvent())};mxRubberband.prototype.mouseUp=function(a,c){var b=null!=this.div&&"none"!=this.div.style.display, -f=null,d=null,e=null,k=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(f=this.first.x,d=this.first.y,e=(this.currentX-f)/this.graph.view.scale,k=(this.currentY-d)/this.graph.view.scale,mxEvent.isAltDown(c.getEvent())||(e=this.graph.snap(e),k=this.graph.snap(k),this.graph.isGridEnabled()||(Math.abs(e)<this.graph.tolerance&&(e=0),Math.abs(k)<this.graph.tolerance&&(k=0))));this.reset();if(b){if(mxEvent.isAltDown(c.getEvent())&&this.graph.isToggleEvent(c.getEvent())){var e=new mxRectangle(this.x, -this.y,this.width,this.height),g=this.graph.getCells(e.x,e.y,e.width,e.height);this.graph.removeSelectionCells(g)}else if(this.isSpaceEvent(c)){this.graph.model.beginUpdate();try{for(g=this.graph.getCellsBeyond(f,d,this.graph.getDefaultParent(),!0,!0),b=0;b<g.length;b++)if(this.graph.isCellMovable(g[b])){var p=this.graph.view.getState(g[b]),n=this.graph.getCellGeometry(g[b]);null!=p&&null!=n&&(n=n.clone(),n.translate(e,k),this.graph.model.setGeometry(g[b],n))}}finally{this.graph.model.endUpdate()}}else e= -new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(e,c.getEvent());c.consume()}};mxRubberband.prototype.mouseMove=function(a,c){if(!c.isConsumed()&&null!=this.first){var b=mxUtils.getScrollOrigin(this.graph.container),f=mxUtils.getOffset(this.graph.container);b.x-=f.x;b.y-=f.y;var f=c.getX()+b.x,b=c.getY()+b.y,d=this.first.x-f,e=this.first.y-b,k=this.graph.tolerance;if(null!=this.div||Math.abs(d)>k||Math.abs(e)>k)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(), +f=null,d=null,e=null,g=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(f=this.first.x,d=this.first.y,e=(this.currentX-f)/this.graph.view.scale,g=(this.currentY-d)/this.graph.view.scale,mxEvent.isAltDown(c.getEvent())||(e=this.graph.snap(e),g=this.graph.snap(g),this.graph.isGridEnabled()||(Math.abs(e)<this.graph.tolerance&&(e=0),Math.abs(g)<this.graph.tolerance&&(g=0))));this.reset();if(b){if(mxEvent.isAltDown(c.getEvent())&&this.graph.isToggleEvent(c.getEvent())){var e=new mxRectangle(this.x, +this.y,this.width,this.height),l=this.graph.getCells(e.x,e.y,e.width,e.height);this.graph.removeSelectionCells(l)}else if(this.isSpaceEvent(c)){this.graph.model.beginUpdate();try{for(l=this.graph.getCellsBeyond(f,d,this.graph.getDefaultParent(),!0,!0),b=0;b<l.length;b++)if(this.graph.isCellMovable(l[b])){var p=this.graph.view.getState(l[b]),n=this.graph.getCellGeometry(l[b]);null!=p&&null!=n&&(n=n.clone(),n.translate(e,g),this.graph.model.setGeometry(l[b],n))}}finally{this.graph.model.endUpdate()}}else e= +new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(e,c.getEvent());c.consume()}};mxRubberband.prototype.mouseMove=function(a,c){if(!c.isConsumed()&&null!=this.first){var b=mxUtils.getScrollOrigin(this.graph.container),f=mxUtils.getOffset(this.graph.container);b.x-=f.x;b.y-=f.y;var f=c.getX()+b.x,b=c.getY()+b.y,d=this.first.x-f,e=this.first.y-b,g=this.graph.tolerance;if(null!=this.div||Math.abs(d)>g||Math.abs(e)>g)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(), this.update(f,b),this.isSpaceEvent(c)?(f=this.x+this.width,b=this.y+this.height,d=this.graph.view.scale,mxEvent.isAltDown(c.getEvent())||(this.width=this.graph.snap(this.width/d)*d,this.height=this.graph.snap(this.height/d)*d,this.graph.isGridEnabled()||(this.width<this.graph.tolerance&&(this.width=0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=f-this.width),this.y<this.first.y&&(this.y=b-this.height)),this.div.style.borderStyle="dashed",this.div.style.backgroundColor= "white",this.div.style.left=this.x+"px",this.div.style.top=this.y+"px",this.div.style.width=Math.max(0,this.width)+"px",this.div.style.height=this.graph.container.clientHeight+"px",this.div.style.borderWidth=0>=this.width?"0px 1px 0px 0px":"0px 1px 0px 1px",null==this.secondDiv&&(this.secondDiv=this.div.cloneNode(!0),this.div.parentNode.appendChild(this.secondDiv)),this.secondDiv.style.left=this.x+"px",this.secondDiv.style.top=this.y+"px",this.secondDiv.style.width=this.graph.container.clientWidth+ -"px",this.secondDiv.style.height=Math.max(0,this.height)+"px",this.secondDiv.style.borderWidth=0>=this.height?"1px 0px 0px 0px":"1px 0px 1px 0px"):(this.div.style.backgroundColor="",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),c.consume()}};var n=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv), -this.secondDiv=null);n.apply(this,arguments)};var g=(new Date).getTime(),x=0,z=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,c,b,f){z.apply(this,arguments);b!=this.currentTerminalState?(g=(new Date).getTime(),x=0):x=(new Date).getTime()-g;this.currentTerminalState=b};var t=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&& -2E3<x||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&t.apply(this,arguments)};mxVertexHandler.prototype.isCustomHandleEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.createHandleShape=function(a,c){var b=null!=a&&0==a,f=this.state.getVisibleTerminalState(b),d=null!=a&&(0==a||a>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==a)?this.graph.getConnectionConstraint(this.state, -f,b):null,b=null!=(null!=d?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(b),d):null)?this.fixedHandleImage:null!=d&&null!=f?this.terminalHandleImage:this.handleImage;if(null!=b)return b=new mxImageShape(new mxRectangle(0,0,b.width,b.height),b.src),b.preserveImageAspect=!1,b;b=mxConstants.HANDLE_SIZE;this.preferHtml&&--b;return new mxRectangleShape(new mxRectangle(0,0,b,b),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var F=mxVertexHandler.prototype.createSizerShape; -mxVertexHandler.prototype.createSizerShape=function(a,c,b){this.handleImage=c==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:c==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return F.apply(this,arguments)};var v=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(a){if(null!=a&&1==a.length){var c=this.graph.getModel(),b=c.getParent(a[0]),f=this.graph.getCellGeometry(a[0]);if(c.isEdge(b)&&null!=f&&f.relative&&(c=this.graph.view.getState(a[0]), -null!=c&&2>c.width&&2>c.height&&null!=c.text&&null!=c.text.boundingBox))return mxRectangle.fromRectangle(c.text.boundingBox)}return v.apply(this,arguments)};var D=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(a){var c=this.graph.getModel(),b=c.getParent(a.cell),f=this.graph.getCellGeometry(a.cell);return c.isEdge(b)&&null!=f&&f.relative&&2>a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox?(c=a.text.unrotatedBoundingBox||a.text.boundingBox, -new mxRectangle(Math.round(c.x),Math.round(c.y),Math.round(c.width),Math.round(c.height))):D.apply(this,arguments)};var p=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(a,c){var b=this.graph.getModel(),f=b.getParent(this.state.cell),d=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(c)==mxEvent.ROTATION_HANDLE||!b.isEdge(f)||null==d||!d.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&p.apply(this,arguments)};mxVertexHandler.prototype.isRotationHandleVisible= -function(){return this.graph.isEnabled()&&this.rotationEnabled&&this.graph.isCellRotatable(this.state.cell)&&(0>=mxGraphHandler.prototype.maxCells||this.graph.getSelectionCount()<mxGraphHandler.prototype.maxCells)};mxVertexHandler.prototype.rotateClick=function(){this.state.view.graph.turnShapes([this.state.cell])};var C=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(a,c){C.apply(this,arguments);null!=this.graph.graphHandler.first&&null!=this.rotationShape&&null!= -this.rotationShape.node&&(this.rotationShape.node.style.display="none")};var K=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(a,c){K.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none")};var P=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){P.apply(this,arguments);var a=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title", +"px",this.secondDiv.style.height=Math.max(0,this.height)+"px",this.secondDiv.style.borderWidth=0>=this.height?"1px 0px 0px 0px":"1px 0px 1px 0px"):(this.div.style.backgroundColor="",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),c.consume()}};var l=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv), +this.secondDiv=null);l.apply(this,arguments)};var x=(new Date).getTime(),A=0,t=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,c,b,f){t.apply(this,arguments);b!=this.currentTerminalState?(x=(new Date).getTime(),A=0):A=(new Date).getTime()-x;this.currentTerminalState=b};var E=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&& +2E3<A||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&E.apply(this,arguments)};mxVertexHandler.prototype.isCustomHandleEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.createHandleShape=function(a,c){var b=null!=a&&0==a,f=this.state.getVisibleTerminalState(b),d=null!=a&&(0==a||a>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==a)?this.graph.getConnectionConstraint(this.state, +f,b):null,b=null!=(null!=d?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(b),d):null)?this.fixedHandleImage:null!=d&&null!=f?this.terminalHandleImage:this.handleImage;if(null!=b)return b=new mxImageShape(new mxRectangle(0,0,b.width,b.height),b.src),b.preserveImageAspect=!1,b;b=mxConstants.HANDLE_SIZE;this.preferHtml&&--b;return new mxRectangleShape(new mxRectangle(0,0,b,b),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var v=mxVertexHandler.prototype.createSizerShape; +mxVertexHandler.prototype.createSizerShape=function(a,c,b){this.handleImage=c==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:c==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return v.apply(this,arguments)};var D=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(a){if(null!=a&&1==a.length){var c=this.graph.getModel(),b=c.getParent(a[0]),f=this.graph.getCellGeometry(a[0]);if(c.isEdge(b)&&null!=f&&f.relative&&(c=this.graph.view.getState(a[0]), +null!=c&&2>c.width&&2>c.height&&null!=c.text&&null!=c.text.boundingBox))return mxRectangle.fromRectangle(c.text.boundingBox)}return D.apply(this,arguments)};var p=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(a){var c=this.graph.getModel(),b=c.getParent(a.cell),f=this.graph.getCellGeometry(a.cell);return c.isEdge(b)&&null!=f&&f.relative&&2>a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox?(c=a.text.unrotatedBoundingBox||a.text.boundingBox, +new mxRectangle(Math.round(c.x),Math.round(c.y),Math.round(c.width),Math.round(c.height))):p.apply(this,arguments)};var C=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(a,c){var b=this.graph.getModel(),f=b.getParent(this.state.cell),d=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(c)==mxEvent.ROTATION_HANDLE||!b.isEdge(f)||null==d||!d.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&C.apply(this,arguments)};mxVertexHandler.prototype.isRotationHandleVisible= +function(){return this.graph.isEnabled()&&this.rotationEnabled&&this.graph.isCellRotatable(this.state.cell)&&(0>=mxGraphHandler.prototype.maxCells||this.graph.getSelectionCount()<mxGraphHandler.prototype.maxCells)};mxVertexHandler.prototype.rotateClick=function(){this.state.view.graph.turnShapes([this.state.cell])};var K=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(a,c){K.apply(this,arguments);null!=this.graph.graphHandler.first&&null!=this.rotationShape&&null!= +this.rotationShape.node&&(this.rotationShape.node.style.display="none")};var Y=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(a,c){Y.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none")};var H=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){H.apply(this,arguments);var a=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title", mxResources.get("rotateTooltip"));var c=mxUtils.bind(this,function(){null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.specialHandle&&(this.specialHandle.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none");this.redrawHandles()});this.selectionHandler=mxUtils.bind(this,function(a,b){c()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE, this.selectionHandler);this.changeHandler=mxUtils.bind(this,function(a,b){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));c()});this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.editingHandler=mxUtils.bind(this,function(a,c){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,this.editingHandler);var b=this.graph.getLinkForCell(this.state.cell),f=this.graph.getLinksForState(this.state);this.updateLinkHint(b, f);if(null!=b||null!=f&&0<f.length)a=!0;a&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(c,b){if(null==c&&(null==b||0==b.length)||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);else if(null!=c||null!=b&&0<b.length){null==this.linkHint&&(this.linkHint=a(),this.linkHint.style.padding="6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint)); this.linkHint.innerHTML="";if(null!=c&&(this.linkHint.appendChild(this.graph.createLinkForHint(c)),this.graph.isEnabled()&&"function"===typeof this.graph.editLink)){var f=document.createElement("img");f.setAttribute("src",Editor.editImage);f.setAttribute("title",mxResources.get("editLink"));f.setAttribute("width","11");f.setAttribute("height","11");f.style.marginLeft="10px";f.style.marginBottom="-1px";f.style.cursor="pointer";this.linkHint.appendChild(f);mxEvent.addListener(f,"click",mxUtils.bind(this, function(a){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(a)}));f=document.createElement("img");f.setAttribute("src",Dialog.prototype.clearImage);f.setAttribute("title",mxResources.get("removeIt",[mxResources.get("link")]));f.setAttribute("width","13");f.setAttribute("height","10");f.style.marginLeft="4px";f.style.marginBottom="-1px";f.style.cursor="pointer";this.linkHint.appendChild(f);mxEvent.addListener(f,"click",mxUtils.bind(this,function(a){this.graph.setLinkForCell(this.state.cell, -null);mxEvent.consume(a)}))}if(null!=b)for(f=0;f<b.length;f++){var d=document.createElement("div");d.style.marginTop=null!=c||0<f?"6px":"0px";d.appendChild(this.graph.createLinkForHint(b[f].getAttribute("href"),mxUtils.getTextContent(b[f])));this.linkHint.appendChild(d)}}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var G=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){G.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this, +null);mxEvent.consume(a)}))}if(null!=b)for(f=0;f<b.length;f++){var d=document.createElement("div");d.style.marginTop=null!=c||0<f?"6px":"0px";d.appendChild(this.graph.createLinkForHint(b[f].getAttribute("href"),mxUtils.getTextContent(b[f])));this.linkHint.appendChild(d)}}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var O=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){O.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this, function(){return this.state.view.graph.connectionHandler.isEnabled()});var a=mxUtils.bind(this,function(){null!=this.linkHint&&(this.linkHint.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.labelShape&&(this.labelShape.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none")});this.selectionHandler=mxUtils.bind(this,function(c,b){a()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionHandler); -this.changeHandler=mxUtils.bind(this,function(c,b){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));a();this.redrawHandles()});this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var c=this.graph.getLinkForCell(this.state.cell),b=this.graph.getLinksForState(this.state);if(null!=c||null!=b&&0<b.length)this.updateLinkHint(c,b),this.redrawHandles()};var M=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){M.apply(this, -arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var B=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){B.apply(this);if(null!=this.state&&null!=this.linkHint){var a=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),c=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),b=mxUtils.getBoundingBox(c,this.state.style[mxConstants.STYLE_ROTATION]|| -"0",a),a=null!=b?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,c=null!=this.state.text?this.state.text.boundingBox:null;null==b&&(b=this.state);b=b.y+b.height;null!=c&&(b=Math.max(b,c.y+c.height));this.linkHint.style.left=Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(b+this.verticalOffset/2+6+this.state.view.graph.tolerance)+"px"}};var J=mxVertexHandler.prototype.reset;mxVertexHandler.prototype.reset= -function(){J.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none")};var O=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){O.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.selectionHandler&&(this.graph.getSelectionModel().removeListener(this.selectionHandler),this.selectionHandler= -null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var S=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(S.apply(this),null!=this.state&&null!=this.linkHint)){var a=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(a=new mxRectangle(a.x,a.y,a.width,a.height), -a.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(a.y+a.height+6+this.state.view.graph.tolerance)+"px"}};var pa=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){pa.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var W=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){W.apply(this,arguments);null!=this.linkHint&& -(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.selectionHandler&&(this.graph.getSelectionModel().removeListener(this.selectionHandler),this.selectionHandler=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function a(){mxCylinder.call(this)}function b(){mxActor.call(this)}function e(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function l(){mxCylinder.call(this)}function m(){mxActor.call(this)}function r(){mxCylinder.call(this)}function u(){mxActor.call(this)}function y(){mxActor.call(this)}function A(){mxActor.call(this)}function c(){mxActor.call(this)}function f(){mxActor.call(this)}function k(){mxActor.call(this)}function q(){mxActor.call(this)}function n(a,c){this.canvas= +this.changeHandler=mxUtils.bind(this,function(c,b){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));a();this.redrawHandles()});this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var c=this.graph.getLinkForCell(this.state.cell),b=this.graph.getLinksForState(this.state);if(null!=c||null!=b&&0<b.length)this.updateLinkHint(c,b),this.redrawHandles()};var B=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){B.apply(this, +arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var J=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){J.apply(this);if(null!=this.state&&null!=this.linkHint){var a=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),c=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),b=mxUtils.getBoundingBox(c,this.state.style[mxConstants.STYLE_ROTATION]|| +"0",a),a=null!=b?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,c=null!=this.state.text?this.state.text.boundingBox:null;null==b&&(b=this.state);b=b.y+b.height;null!=c&&(b=Math.max(b,c.y+c.height));this.linkHint.style.left=Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(b+this.verticalOffset/2+6+this.state.view.graph.tolerance)+"px"}};var P=mxVertexHandler.prototype.reset;mxVertexHandler.prototype.reset= +function(){P.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none")};var S=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){S.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.selectionHandler&&(this.graph.getSelectionModel().removeListener(this.selectionHandler),this.selectionHandler= +null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var pa=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(pa.apply(this),null!=this.state&&null!=this.linkHint)){var a=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(a=new mxRectangle(a.x,a.y,a.width,a.height), +a.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(a.y+a.height+6+this.state.view.graph.tolerance)+"px"}};var V=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){V.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var F=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){F.apply(this,arguments);null!=this.linkHint&& +(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.selectionHandler&&(this.graph.getSelectionModel().removeListener(this.selectionHandler),this.selectionHandler=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function a(){mxCylinder.call(this)}function b(){mxActor.call(this)}function e(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function k(){mxCylinder.call(this)}function m(){mxActor.call(this)}function r(){mxCylinder.call(this)}function u(){mxActor.call(this)}function y(){mxActor.call(this)}function z(){mxActor.call(this)}function c(){mxActor.call(this)}function f(){mxActor.call(this)}function g(){mxActor.call(this)}function q(){mxActor.call(this)}function n(a,c){this.canvas= a;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=c;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,n.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,n.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,n.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,n.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo; -this.canvas.curveTo=mxUtils.bind(this,n.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,n.prototype.arcTo)}function g(){mxRectangleShape.call(this)}function x(){mxRectangleShape.call(this)}function z(){mxActor.call(this)}function t(){mxActor.call(this)}function F(){mxActor.call(this)}function v(){mxRectangleShape.call(this)}function D(){mxRectangleShape.call(this)}function p(){mxCylinder.call(this)}function C(){mxShape.call(this)}function K(){mxShape.call(this)} -function P(){mxEllipse.call(this)}function G(){mxShape.call(this)}function M(){mxShape.call(this)}function B(){mxRectangleShape.call(this)}function J(){mxShape.call(this)}function O(){mxShape.call(this)}function S(){mxShape.call(this)}function pa(){mxShape.call(this)}function W(){mxShape.call(this)}function E(){mxCylinder.call(this)}function Y(){mxDoubleEllipse.call(this)}function qa(){mxDoubleEllipse.call(this)}function ja(){mxArrowConnector.call(this);this.spacing=0}function ka(){mxArrowConnector.call(this); -this.spacing=0}function ga(){mxActor.call(this)}function Q(){mxRectangleShape.call(this)}function X(){mxActor.call(this)}function ma(){mxActor.call(this)}function da(){mxActor.call(this)}function R(){mxActor.call(this)}function ha(){mxActor.call(this)}function N(){mxActor.call(this)}function H(){mxActor.call(this)}function ba(){mxActor.call(this)}function L(){mxActor.call(this)}function T(){mxActor.call(this)}function ea(){mxEllipse.call(this)}function fa(){mxEllipse.call(this)}function I(){mxEllipse.call(this)} -function na(){mxRhombus.call(this)}function Z(){mxEllipse.call(this)}function aa(){mxEllipse.call(this)}function Ba(){mxEllipse.call(this)}function xa(){mxEllipse.call(this)}function ya(){mxActor.call(this)}function ia(){mxActor.call(this)}function ca(){mxActor.call(this)}function oa(){mxConnector.call(this)}function Ca(a,c,b,f,d,e,k,g,p,n){k+=p;var V=f.clone();f.x-=d*(2*k+p);f.y-=e*(2*k+p);d*=k+p;e*=k+p;return function(){a.ellipse(V.x-d-k,V.y-e-k,2*k,2*k);n?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,c,b,f,d){var e=Math.max(0,Math.min(f,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),V=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),k=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2))));a.translate(c,b);a.begin();a.moveTo(0,0);a.lineTo(f-e,0);a.lineTo(f, -e);a.lineTo(f,d);a.lineTo(e,d);a.lineTo(0,d-e);a.lineTo(0,0);a.close();a.end();a.fillAndStroke();this.outline||(a.setShadow(!1),0!=V&&(a.setFillAlpha(Math.abs(V)),a.setFillColor(0>V?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(f-e,0),a.lineTo(f,e),a.lineTo(e,e),a.close(),a.fill()),0!=k&&(a.setFillAlpha(Math.abs(k)),a.setFillColor(0>k?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(e,e),a.lineTo(e,d),a.lineTo(0,d-e),a.close(),a.fill()),a.begin(),a.moveTo(e,d),a.lineTo(e,e),a.lineTo(0, -0),a.moveTo(e,e),a.lineTo(f,e),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 ra=Math.tan(mxUtils.toRadians(30)),la=(.5-ra)/2;mxUtils.extend(b,mxActor);b.prototype.size=20;b.prototype.redrawPath=function(a,c,b,f,d){c=Math.min(f,d/ra);a.translate((f-c)/2,(d-c)/2+c/4);a.moveTo(0,.25*c);a.lineTo(.5* -c,c*la);a.lineTo(c,.25*c);a.lineTo(.5*c,(.5-la)*c);a.lineTo(0,.25*c);a.close();a.end()};mxCellRenderer.registerShape("isoRectangle",b);mxUtils.extend(e,mxCylinder);e.prototype.size=20;e.prototype.redrawPath=function(a,c,b,f,d,e){c=Math.min(f,d/(.5+ra));e?(a.moveTo(0,.25*c),a.lineTo(.5*c,(.5-la)*c),a.lineTo(c,.25*c),a.moveTo(.5*c,(.5-la)*c),a.lineTo(.5*c,(1-la)*c)):(a.translate((f-c)/2,(d-c)/2),a.moveTo(0,.25*c),a.lineTo(.5*c,c*la),a.lineTo(c,.25*c),a.lineTo(c,.75*c),a.lineTo(.5*c,(1-la)*c),a.lineTo(0, +this.canvas.curveTo=mxUtils.bind(this,n.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,n.prototype.arcTo)}function l(){mxRectangleShape.call(this)}function x(){mxRectangleShape.call(this)}function A(){mxActor.call(this)}function t(){mxActor.call(this)}function E(){mxActor.call(this)}function v(){mxRectangleShape.call(this)}function D(){mxRectangleShape.call(this)}function p(){mxCylinder.call(this)}function C(){mxShape.call(this)}function K(){mxShape.call(this)} +function Y(){mxEllipse.call(this)}function H(){mxShape.call(this)}function O(){mxShape.call(this)}function B(){mxRectangleShape.call(this)}function J(){mxShape.call(this)}function P(){mxShape.call(this)}function S(){mxShape.call(this)}function pa(){mxShape.call(this)}function V(){mxShape.call(this)}function F(){mxCylinder.call(this)}function M(){mxDoubleEllipse.call(this)}function qa(){mxDoubleEllipse.call(this)}function la(){mxArrowConnector.call(this);this.spacing=0}function ga(){mxArrowConnector.call(this); +this.spacing=0}function ha(){mxActor.call(this)}function Q(){mxRectangleShape.call(this)}function W(){mxActor.call(this)}function ma(){mxActor.call(this)}function da(){mxActor.call(this)}function R(){mxActor.call(this)}function ia(){mxActor.call(this)}function N(){mxActor.call(this)}function G(){mxActor.call(this)}function ba(){mxActor.call(this)}function L(){mxActor.call(this)}function T(){mxActor.call(this)}function ea(){mxEllipse.call(this)}function fa(){mxEllipse.call(this)}function I(){mxEllipse.call(this)} +function na(){mxRhombus.call(this)}function Z(){mxEllipse.call(this)}function aa(){mxEllipse.call(this)}function Ba(){mxEllipse.call(this)}function xa(){mxEllipse.call(this)}function ya(){mxActor.call(this)}function ja(){mxActor.call(this)}function ca(){mxActor.call(this)}function oa(){mxConnector.call(this)}function Ca(a,c,b,f,d,e,g,l,p,n){g+=p;var X=f.clone();f.x-=d*(2*g+p);f.y-=e*(2*g+p);d*=g+p;e*=g+p;return function(){a.ellipse(X.x-d-g,X.y-e-g,2*g,2*g);n?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,c,b,f,d){var e=Math.max(0,Math.min(f,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),X=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),g=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2))));a.translate(c,b);a.begin();a.moveTo(0,0);a.lineTo(f-e,0);a.lineTo(f, +e);a.lineTo(f,d);a.lineTo(e,d);a.lineTo(0,d-e);a.lineTo(0,0);a.close();a.end();a.fillAndStroke();this.outline||(a.setShadow(!1),0!=X&&(a.setFillAlpha(Math.abs(X)),a.setFillColor(0>X?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(f-e,0),a.lineTo(f,e),a.lineTo(e,e),a.close(),a.fill()),0!=g&&(a.setFillAlpha(Math.abs(g)),a.setFillColor(0>g?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(e,e),a.lineTo(e,d),a.lineTo(0,d-e),a.close(),a.fill()),a.begin(),a.moveTo(e,d),a.lineTo(e,e),a.lineTo(0, +0),a.moveTo(e,e),a.lineTo(f,e),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 ra=Math.tan(mxUtils.toRadians(30)),ka=(.5-ra)/2;mxUtils.extend(b,mxActor);b.prototype.size=20;b.prototype.redrawPath=function(a,c,b,f,d){c=Math.min(f,d/ra);a.translate((f-c)/2,(d-c)/2+c/4);a.moveTo(0,.25*c);a.lineTo(.5* +c,c*ka);a.lineTo(c,.25*c);a.lineTo(.5*c,(.5-ka)*c);a.lineTo(0,.25*c);a.close();a.end()};mxCellRenderer.registerShape("isoRectangle",b);mxUtils.extend(e,mxCylinder);e.prototype.size=20;e.prototype.redrawPath=function(a,c,b,f,d,e){c=Math.min(f,d/(.5+ra));e?(a.moveTo(0,.25*c),a.lineTo(.5*c,(.5-ka)*c),a.lineTo(c,.25*c),a.moveTo(.5*c,(.5-ka)*c),a.lineTo(.5*c,(1-ka)*c)):(a.translate((f-c)/2,(d-c)/2),a.moveTo(0,.25*c),a.lineTo(.5*c,c*ka),a.lineTo(c,.25*c),a.lineTo(c,.75*c),a.lineTo(.5*c,(1-ka)*c),a.lineTo(0, .75*c),a.close());a.end()};mxCellRenderer.registerShape("isoCube",e);mxUtils.extend(d,mxCylinder);d.prototype.redrawPath=function(a,c,b,f,d,e){c=Math.min(d/2,Math.round(d/8)+this.strokewidth-1);if(e&&null!=this.fill||!e&&null==this.fill)a.moveTo(0,c),a.curveTo(0,2*c,f,2*c,f,c),e||(a.stroke(),a.begin()),a.translate(0,c/2),a.moveTo(0,c),a.curveTo(0,2*c,f,2*c,f,c),e||(a.stroke(),a.begin()),a.translate(0,c/2),a.moveTo(0,c),a.curveTo(0,2*c,f,2*c,f,c),e||(a.stroke(),a.begin()),a.translate(0,-c);e||(a.moveTo(0, -c),a.curveTo(0,-c/3,f,-c/3,f,c),a.lineTo(f,d-c),a.curveTo(f,d+c/3,0,d+c/3,0,d-c),a.close())};d.prototype.getLabelMargins=function(a){return new mxRectangle(0,2.5*Math.min(a.height/2,Math.round(a.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",d);mxUtils.extend(l,mxCylinder);l.prototype.size=30;l.prototype.darkOpacity=0;l.prototype.paintVertexShape=function(a,c,b,f,d){var e=Math.max(0,Math.min(f,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),k= -Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));a.translate(c,b);a.begin();a.moveTo(0,0);a.lineTo(f-e,0);a.lineTo(f,e);a.lineTo(f,d);a.lineTo(0,d);a.lineTo(0,0);a.close();a.end();a.fillAndStroke();this.outline||(a.setShadow(!1),0!=k&&(a.setFillAlpha(Math.abs(k)),a.setFillColor(0>k?"#FFFFFF":"#000000"),a.begin(),a.moveTo(f-e,0),a.lineTo(f-e,e),a.lineTo(f,e),a.close(),a.fill()),a.begin(),a.moveTo(f-e,0),a.lineTo(f-e,e),a.lineTo(f,e),a.end(),a.stroke())}; -mxCellRenderer.registerShape("note",l);mxUtils.extend(m,mxActor);m.prototype.redrawPath=function(a,c,b,f,d){a.moveTo(0,0);a.quadTo(f/2,.5*d,f,0);a.quadTo(.5*f,d/2,f,d);a.quadTo(f/2,.5*d,0,d);a.quadTo(.5*f,d/2,0,0);a.end()};mxCellRenderer.registerShape("switch",m);mxUtils.extend(r,mxCylinder);r.prototype.tabWidth=60;r.prototype.tabHeight=20;r.prototype.tabPosition="right";r.prototype.redrawPath=function(a,c,b,f,d,e){c=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth)))); -b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var k=mxUtils.getValue(this.style,"tabPosition",this.tabPosition);e?"left"==k?(a.moveTo(0,b),a.lineTo(c,b)):(a.moveTo(f-c,b),a.lineTo(f,b)):("left"==k?(a.moveTo(0,0),a.lineTo(c,0),a.lineTo(c,b),a.lineTo(f,b)):(a.moveTo(0,b),a.lineTo(f-c,b),a.lineTo(f-c,0),a.lineTo(f,0)),a.lineTo(f,d),a.lineTo(0,d),a.lineTo(0,b),a.close());a.end()};mxCellRenderer.registerShape("folder",r);mxUtils.extend(u,mxActor);u.prototype.size= +c),a.curveTo(0,-c/3,f,-c/3,f,c),a.lineTo(f,d-c),a.curveTo(f,d+c/3,0,d+c/3,0,d-c),a.close())};d.prototype.getLabelMargins=function(a){return new mxRectangle(0,2.5*Math.min(a.height/2,Math.round(a.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",d);mxUtils.extend(k,mxCylinder);k.prototype.size=30;k.prototype.darkOpacity=0;k.prototype.paintVertexShape=function(a,c,b,f,d){var e=Math.max(0,Math.min(f,Math.min(d,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(c,b);a.begin();a.moveTo(0,0);a.lineTo(f-e,0);a.lineTo(f,e);a.lineTo(f,d);a.lineTo(0,d);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(f-e,0),a.lineTo(f-e,e),a.lineTo(f,e),a.close(),a.fill()),a.begin(),a.moveTo(f-e,0),a.lineTo(f-e,e),a.lineTo(f,e),a.end(),a.stroke())}; +mxCellRenderer.registerShape("note",k);mxUtils.extend(m,mxActor);m.prototype.redrawPath=function(a,c,b,f,d){a.moveTo(0,0);a.quadTo(f/2,.5*d,f,0);a.quadTo(.5*f,d/2,f,d);a.quadTo(f/2,.5*d,0,d);a.quadTo(.5*f,d/2,0,0);a.end()};mxCellRenderer.registerShape("switch",m);mxUtils.extend(r,mxCylinder);r.prototype.tabWidth=60;r.prototype.tabHeight=20;r.prototype.tabPosition="right";r.prototype.redrawPath=function(a,c,b,f,d,e){c=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth)))); +b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var g=mxUtils.getValue(this.style,"tabPosition",this.tabPosition);e?"left"==g?(a.moveTo(0,b),a.lineTo(c,b)):(a.moveTo(f-c,b),a.lineTo(f,b)):("left"==g?(a.moveTo(0,0),a.lineTo(c,0),a.lineTo(c,b),a.lineTo(f,b)):(a.moveTo(0,b),a.lineTo(f-c,b),a.lineTo(f-c,0),a.lineTo(f,0)),a.lineTo(f,d),a.lineTo(0,d),a.lineTo(0,b),a.close());a.end()};mxCellRenderer.registerShape("folder",r);mxUtils.extend(u,mxActor);u.prototype.size= 30;u.prototype.isRoundable=function(){return!0};u.prototype.redrawPath=function(a,c,b,f,d){c=Math.max(0,Math.min(f,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(c,0),new mxPoint(f,0),new mxPoint(f,d),new mxPoint(0,d),new mxPoint(0,c)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("card",u);mxUtils.extend(y,mxActor);y.prototype.size=.4;y.prototype.redrawPath= function(a,c,b,f,d){c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,c/2);a.quadTo(f/4,1.4*c,f/2,c/2);a.quadTo(3*f/4,c*(1-1.4),f,c/2);a.lineTo(f,d-c/2);a.quadTo(3*f/4,d-1.4*c,f/2,d-c/2);a.quadTo(f/4,d-c*(1-1.4),0,d-c/2);a.lineTo(0,c/2);a.close();a.end()};y.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var c=mxUtils.getValue(this.style,"size",this.size),b=a.width,f=a.height;if(null==this.direction||this.direction== -mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return c*=f,new mxRectangle(a.x,a.y+c,b,f-2*c);c*=b;return new mxRectangle(a.x+c,a.y,b-2*c,f)}return a};mxCellRenderer.registerShape("tape",y);mxUtils.extend(A,mxActor);A.prototype.size=.3;A.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};A.prototype.redrawPath=function(a,c,b,f,d){c=d*Math.max(0, -Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,0);a.lineTo(f,0);a.lineTo(f,d-c/2);a.quadTo(3*f/4,d-1.4*c,f/2,d-c/2);a.quadTo(f/4,d-c*(1-1.4),0,d-c/2);a.lineTo(0,c/2);a.close();a.end()};mxCellRenderer.registerShape("document",A);var Ka=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(a,c,b,f){var d=mxUtils.getValue(this.style,"size");return null!=d?f*Math.max(0,Math.min(1,d)):Ka.apply(this,arguments)};mxCylinder.prototype.getLabelMargins= +mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return c*=f,new mxRectangle(a.x,a.y+c,b,f-2*c);c*=b;return new mxRectangle(a.x+c,a.y,b-2*c,f)}return a};mxCellRenderer.registerShape("tape",y);mxUtils.extend(z,mxActor);z.prototype.size=.3;z.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};z.prototype.redrawPath=function(a,c,b,f,d){c=d*Math.max(0, +Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,0);a.lineTo(f,0);a.lineTo(f,d-c/2);a.quadTo(3*f/4,d-1.4*c,f/2,d-c/2);a.quadTo(f/4,d-c*(1-1.4),0,d-c/2);a.lineTo(0,c/2);a.close();a.end()};mxCellRenderer.registerShape("document",z);var Ja=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(a,c,b,f){var d=mxUtils.getValue(this.style,"size");return null!=d?f*Math.max(0,Math.min(1,d)):Ja.apply(this,arguments)};mxCylinder.prototype.getLabelMargins= function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var c=2*mxUtils.getValue(this.style,"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,a.height*c),0,0)}return null};mxUtils.extend(c,mxActor);c.prototype.size=.2;c.prototype.isRoundable=function(){return!0};c.prototype.redrawPath=function(a,c,b,f,d){c=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/ 2;this.addPoints(a,[new mxPoint(0,d),new mxPoint(c,0),new mxPoint(f,0),new mxPoint(f-c,d)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("parallelogram",c);mxUtils.extend(f,mxActor);f.prototype.size=.2;f.prototype.isRoundable=function(){return!0};f.prototype.redrawPath=function(a,c,b,f,d){c=f*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0, -d),new mxPoint(c,0),new mxPoint(f-c,0),new mxPoint(f,d)],this.isRounded,b,!0)};mxCellRenderer.registerShape("trapezoid",f);mxUtils.extend(k,mxActor);k.prototype.size=.5;k.prototype.redrawPath=function(a,c,b,f,d){a.setFillColor(null);c=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(f,0),new mxPoint(c,0),new mxPoint(c,d/2),new mxPoint(0,d/2),new mxPoint(c, -d/2),new mxPoint(c,d),new mxPoint(f,d)],this.isRounded,b,!1);a.end()};mxCellRenderer.registerShape("curlyBracket",k);mxUtils.extend(q,mxActor);q.prototype.redrawPath=function(a,c,b,f,d){a.setStrokeWidth(1);a.setFillColor(this.stroke);c=f/5;a.rect(0,0,c,d);a.fillAndStroke();a.rect(2*c,0,c,d);a.fillAndStroke();a.rect(4*c,0,c,d);a.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",q);n.prototype.moveTo=function(a,c){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=a;this.lastY= +d),new mxPoint(c,0),new mxPoint(f-c,0),new mxPoint(f,d)],this.isRounded,b,!0)};mxCellRenderer.registerShape("trapezoid",f);mxUtils.extend(g,mxActor);g.prototype.size=.5;g.prototype.redrawPath=function(a,c,b,f,d){a.setFillColor(null);c=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(f,0),new mxPoint(c,0),new mxPoint(c,d/2),new mxPoint(0,d/2),new mxPoint(c, +d/2),new mxPoint(c,d),new mxPoint(f,d)],this.isRounded,b,!1);a.end()};mxCellRenderer.registerShape("curlyBracket",g);mxUtils.extend(q,mxActor);q.prototype.redrawPath=function(a,c,b,f,d){a.setStrokeWidth(1);a.setFillColor(this.stroke);c=f/5;a.rect(0,0,c,d);a.fillAndStroke();a.rect(2*c,0,c,d);a.fillAndStroke();a.rect(4*c,0,c,d);a.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",q);n.prototype.moveTo=function(a,c){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=a;this.lastY= c;this.firstX=a;this.firstY=c};n.prototype.close=function(){null!=this.firstX&&null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas,arguments));this.originalClose.apply(this.canvas,arguments)};n.prototype.quadTo=function(a,c,b,f){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=b;this.lastY=f};n.prototype.curveTo=function(a,c,b,f,d,e){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=d;this.lastY=e};n.prototype.arcTo=function(a,c,b,f, -d,e,k){this.originalArcTo.apply(this.canvas,arguments);this.lastX=e;this.lastY=k};n.prototype.lineTo=function(a,c){if(null!=this.lastX&&null!=this.lastY){var b=function(a){return"number"===typeof a?a?0>a?-1:1:a===a?0:NaN:NaN},f=Math.abs(a-this.lastX),d=Math.abs(c-this.lastY),e=Math.sqrt(f*f+d*d);if(2>e){this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=c;return}var k=Math.round(e/10),g=this.defaultVariation;5>k&&(k=5,g/=3);for(var V=b(a-this.lastX)*f/k,b=b(c-this.lastY)*d/k, -f=f/e,d=d/e,e=0;e<k;e++){var p=(Math.random()-.5)*g;this.originalLineTo.call(this.canvas,V*e+this.lastX-p*d,b*e+this.lastY-p*f)}this.originalLineTo.call(this.canvas,a,c)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=c};n.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo}; -var za=mxShape.prototype.paint;mxShape.prototype.defaultJiggle=1.5;mxShape.prototype.paint=function(a){null!=this.style&&"0"!=mxUtils.getValue(this.style,"comic","0")&&null==a.handHiggle&&(a.handJiggle=new n(a,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle)));za.apply(this,arguments);null!=a.handJiggle&&(a.handJiggle.destroy(),delete a.handJiggle)};mxRhombus.prototype.defaultJiggle=2;var La=mxRectangleShape.prototype.isHtmlAllowed;mxRectangleShape.prototype.isHtmlAllowed=function(){return(null== -this.style||"0"==mxUtils.getValue(this.style,"comic","0"))&&La.apply(this,arguments)};var Aa=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(a,c,b,f,d){if(null==a.handJiggle)Aa.apply(this,arguments);else{var e=!0;null!=this.style&&(e="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(e||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)e||null!=this.fill&&this.fill!=mxConstants.NONE|| +d,e,g){this.originalArcTo.apply(this.canvas,arguments);this.lastX=e;this.lastY=g};n.prototype.lineTo=function(a,c){if(null!=this.lastX&&null!=this.lastY){var b=function(a){return"number"===typeof a?a?0>a?-1:1:a===a?0:NaN:NaN},f=Math.abs(a-this.lastX),d=Math.abs(c-this.lastY),e=Math.sqrt(f*f+d*d);if(2>e){this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=c;return}var g=Math.round(e/10),l=this.defaultVariation;5>g&&(g=5,l/=3);for(var X=b(a-this.lastX)*f/g,b=b(c-this.lastY)*d/g, +f=f/e,d=d/e,e=0;e<g;e++){var p=(Math.random()-.5)*l;this.originalLineTo.call(this.canvas,X*e+this.lastX-p*d,b*e+this.lastY-p*f)}this.originalLineTo.call(this.canvas,a,c)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=c};n.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo}; +var za=mxShape.prototype.paint;mxShape.prototype.defaultJiggle=1.5;mxShape.prototype.paint=function(a){null!=this.style&&"0"!=mxUtils.getValue(this.style,"comic","0")&&null==a.handHiggle&&(a.handJiggle=new n(a,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle)));za.apply(this,arguments);null!=a.handJiggle&&(a.handJiggle.destroy(),delete a.handJiggle)};mxRhombus.prototype.defaultJiggle=2;var Ka=mxRectangleShape.prototype.isHtmlAllowed;mxRectangleShape.prototype.isHtmlAllowed=function(){return(null== +this.style||"0"==mxUtils.getValue(this.style,"comic","0"))&&Ka.apply(this,arguments)};var Aa=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(a,c,b,f,d){if(null==a.handJiggle)Aa.apply(this,arguments);else{var e=!0;null!=this.style&&(e="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(e||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)e||null!=this.fill&&this.fill!=mxConstants.NONE|| (a.pointerEvents=!1),a.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?e=Math.min(f/2,Math.min(d/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,e=Math.min(f*e,d*e)),a.moveTo(c+e,b),a.lineTo(c+f-e,b),a.quadTo(c+f,b,c+f,b+e),a.lineTo(c+f,b+d-e),a.quadTo(c+f,b+d,c+f-e,b+d),a.lineTo(c+e,b+d),a.quadTo(c,b+d,c,b+d-e), -a.lineTo(c,b+e),a.quadTo(c,b,c+e,b)):(a.moveTo(c,b),a.lineTo(c+f,b),a.lineTo(c+f,b+d),a.lineTo(c,b+d),a.lineTo(c,b)),a.close(),a.end(),a.fillAndStroke()}};var va=mxRectangleShape.prototype.paintForeground;mxRectangleShape.prototype.paintForeground=function(a,c,b,f,d){null==a.handJiggle&&va.apply(this,arguments)};mxUtils.extend(g,mxRectangleShape);g.prototype.size=.1;g.prototype.isHtmlAllowed=function(){return!1};g.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL, -!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var c=a.width,b=a.height;a=new mxRectangle(a.x,a.y,c,b);var f=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.max(f,Math.min(c*d,b*d));a.x+=Math.round(f);a.width-=Math.round(2*f)}return a};g.prototype.paintForeground= -function(a,c,b,f,d){var e=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var k=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,e=Math.max(e,Math.min(f*k,d*k));e=Math.round(e);a.begin();a.moveTo(c+e,b);a.lineTo(c+e,b+d);a.moveTo(c+f-e,b);a.lineTo(c+f-e,b+d);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("process",g);mxUtils.extend(x, -mxRectangleShape);x.prototype.paintBackground=function(a,c,b,f,d){a.setFillColor(mxConstants.NONE);a.rect(c,b,f,d);a.fill()};x.prototype.paintForeground=function(a,c,b,f,d){};mxCellRenderer.registerShape("transparent",x);mxUtils.extend(z,mxHexagon);z.prototype.size=30;z.prototype.position=.5;z.prototype.position2=.5;z.prototype.base=20;z.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};z.prototype.isRoundable= -function(){return!0};z.prototype.redrawPath=function(a,c,b,f,d){c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var e=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),k=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),g=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"base",this.base)))); -this.addPoints(a,[new mxPoint(0,0),new mxPoint(f,0),new mxPoint(f,d-b),new mxPoint(Math.min(f,e+g),d-b),new mxPoint(k,d),new mxPoint(Math.max(0,e),d-b),new mxPoint(0,d-b)],this.isRounded,c,!0,[4])};mxCellRenderer.registerShape("callout",z);mxUtils.extend(t,mxActor);t.prototype.size=.2;t.prototype.fixedSize=20;t.prototype.isRoundable=function(){return!0};t.prototype.redrawPath=function(a,c,b,f,d){c="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style, -"size",this.fixedSize)))):f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(f-c,0),new mxPoint(f,d/2),new mxPoint(f-c,d),new mxPoint(0,d),new mxPoint(c,d/2)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("step",t);mxUtils.extend(F,mxHexagon);F.prototype.size=.25;F.prototype.isRoundable=function(){return!0};F.prototype.redrawPath= -function(a,c,b,f,d){c=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(c,0),new mxPoint(f-c,0),new mxPoint(f,.5*d),new mxPoint(f-c,d),new mxPoint(c,d),new mxPoint(0,.5*d)],this.isRounded,b,!0)};mxCellRenderer.registerShape("hexagon",F);mxUtils.extend(v,mxRectangleShape);v.prototype.isHtmlAllowed=function(){return!1};v.prototype.paintForeground=function(a, +a.lineTo(c,b+e),a.quadTo(c,b,c+e,b)):(a.moveTo(c,b),a.lineTo(c+f,b),a.lineTo(c+f,b+d),a.lineTo(c,b+d),a.lineTo(c,b)),a.close(),a.end(),a.fillAndStroke()}};var va=mxRectangleShape.prototype.paintForeground;mxRectangleShape.prototype.paintForeground=function(a,c,b,f,d){null==a.handJiggle&&va.apply(this,arguments)};mxUtils.extend(l,mxRectangleShape);l.prototype.size=.1;l.prototype.isHtmlAllowed=function(){return!1};l.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL, +!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var c=a.width,b=a.height;a=new mxRectangle(a.x,a.y,c,b);var f=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.max(f,Math.min(c*d,b*d));a.x+=Math.round(f);a.width-=Math.round(2*f)}return a};l.prototype.paintForeground= +function(a,c,b,f,d){var e=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,e=Math.max(e,Math.min(f*g,d*g));e=Math.round(e);a.begin();a.moveTo(c+e,b);a.lineTo(c+e,b+d);a.moveTo(c+f-e,b);a.lineTo(c+f-e,b+d);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("process",l);mxUtils.extend(x, +mxRectangleShape);x.prototype.paintBackground=function(a,c,b,f,d){a.setFillColor(mxConstants.NONE);a.rect(c,b,f,d);a.fill()};x.prototype.paintForeground=function(a,c,b,f,d){};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,c,b,f,d){c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var e=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),g=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),l=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"base",this.base)))); +this.addPoints(a,[new mxPoint(0,0),new mxPoint(f,0),new mxPoint(f,d-b),new mxPoint(Math.min(f,e+l),d-b),new mxPoint(g,d),new mxPoint(Math.max(0,e),d-b),new mxPoint(0,d-b)],this.isRounded,c,!0,[4])};mxCellRenderer.registerShape("callout",A);mxUtils.extend(t,mxActor);t.prototype.size=.2;t.prototype.fixedSize=20;t.prototype.isRoundable=function(){return!0};t.prototype.redrawPath=function(a,c,b,f,d){c="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style, +"size",this.fixedSize)))):f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(f-c,0),new mxPoint(f,d/2),new mxPoint(f-c,d),new mxPoint(0,d),new mxPoint(c,d/2)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("step",t);mxUtils.extend(E,mxHexagon);E.prototype.size=.25;E.prototype.isRoundable=function(){return!0};E.prototype.redrawPath= +function(a,c,b,f,d){c=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(c,0),new mxPoint(f-c,0),new mxPoint(f,.5*d),new mxPoint(f-c,d),new mxPoint(c,d),new mxPoint(0,.5*d)],this.isRounded,b,!0)};mxCellRenderer.registerShape("hexagon",E);mxUtils.extend(v,mxRectangleShape);v.prototype.isHtmlAllowed=function(){return!1};v.prototype.paintForeground=function(a, c,b,f,d){var e=Math.min(f/5,d/5)+1;a.begin();a.moveTo(c+f/2,b+e);a.lineTo(c+f/2,b+d-e);a.moveTo(c+e,b+d/2);a.lineTo(c+f-e,b+d/2);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",v);var ta=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var c=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+ c,a.y+c,a.width-2*c,a.height-2*c)}return a};mxRhombus.prototype.paintVertexShape=function(a,c,b,f,d){ta.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var e=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);c+=e;b+=e;f-=2*e;d-=2*e;0<f&&0<d&&(a.setShadow(!1),ta.apply(this,[a,c,b,f,d]))}};mxUtils.extend(D,mxRectangleShape);D.prototype.isHtmlAllowed=function(){return!1};D.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var c=(Math.max(2, -this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+c,a.y+c,a.width-2*c,a.height-2*c)}return a};D.prototype.paintForeground=function(a,c,b,f,d){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var e=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);c+=e;b+=e;f-=2*e;d-=2*e;0<f&&0<d&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}a.setDashed(!1);var e=0,k;do{k=mxCellRenderer.defaultShapes[this.style["symbol"+ -e]];if(null!=k){var g=this.style["symbol"+e+"Align"],V=this.style["symbol"+e+"VerticalAlign"],p=this.style["symbol"+e+"Width"],n=this.style["symbol"+e+"Height"],q=this.style["symbol"+e+"Spacing"]||0,t=this.style["symbol"+e+"VSpacing"]||q,l=this.style["symbol"+e+"ArcSpacing"];null!=l&&(l*=this.getArcSize(f+this.strokewidth,d+this.strokewidth),q+=l,t+=l);var l=c,x=b,l=g==mxConstants.ALIGN_CENTER?l+(f-p)/2:g==mxConstants.ALIGN_RIGHT?l+(f-p-q):l+q,x=V==mxConstants.ALIGN_MIDDLE?x+(d-n)/2:V==mxConstants.ALIGN_BOTTOM? -x+(d-n-t):x+t;a.save();g=new k;g.style=this.style;k.prototype.paintVertexShape.call(g,a,l,x,p,n);a.restore()}e++}while(null!=k)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",D);mxUtils.extend(p,mxCylinder);p.prototype.redrawPath=function(a,c,b,f,d,e){e?(a.moveTo(0,0),a.lineTo(f/2,d/2),a.lineTo(f,0),a.end()):(a.moveTo(0,0),a.lineTo(f,0),a.lineTo(f,d),a.lineTo(0,d),a.close())};mxCellRenderer.registerShape("message",p);mxUtils.extend(C,mxShape); +this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+c,a.y+c,a.width-2*c,a.height-2*c)}return a};D.prototype.paintForeground=function(a,c,b,f,d){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var e=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);c+=e;b+=e;f-=2*e;d-=2*e;0<f&&0<d&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}a.setDashed(!1);var e=0,g;do{g=mxCellRenderer.defaultShapes[this.style["symbol"+ +e]];if(null!=g){var l=this.style["symbol"+e+"Align"],X=this.style["symbol"+e+"VerticalAlign"],p=this.style["symbol"+e+"Width"],n=this.style["symbol"+e+"Height"],q=this.style["symbol"+e+"Spacing"]||0,t=this.style["symbol"+e+"VSpacing"]||q,v=this.style["symbol"+e+"ArcSpacing"];null!=v&&(v*=this.getArcSize(f+this.strokewidth,d+this.strokewidth),q+=v,t+=v);var v=c,x=b,v=l==mxConstants.ALIGN_CENTER?v+(f-p)/2:l==mxConstants.ALIGN_RIGHT?v+(f-p-q):v+q,x=X==mxConstants.ALIGN_MIDDLE?x+(d-n)/2:X==mxConstants.ALIGN_BOTTOM? +x+(d-n-t):x+t;a.save();l=new g;l.style=this.style;g.prototype.paintVertexShape.call(l,a,v,x,p,n);a.restore()}e++}while(null!=g)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",D);mxUtils.extend(p,mxCylinder);p.prototype.redrawPath=function(a,c,b,f,d,e){e?(a.moveTo(0,0),a.lineTo(f/2,d/2),a.lineTo(f,0),a.end()):(a.moveTo(0,0),a.lineTo(f,0),a.lineTo(f,d),a.lineTo(0,d),a.close())};mxCellRenderer.registerShape("message",p);mxUtils.extend(C,mxShape); C.prototype.paintBackground=function(a,c,b,f,d){a.translate(c,b);a.ellipse(f/4,0,f/2,d/4);a.fillAndStroke();a.begin();a.moveTo(f/2,d/4);a.lineTo(f/2,2*d/3);a.moveTo(f/2,d/3);a.lineTo(0,d/3);a.moveTo(f/2,d/3);a.lineTo(f,d/3);a.moveTo(f/2,2*d/3);a.lineTo(0,d);a.moveTo(f/2,2*d/3);a.lineTo(f,d);a.end();a.stroke()};mxCellRenderer.registerShape("umlActor",C);mxUtils.extend(K,mxShape);K.prototype.getLabelMargins=function(a){return new mxRectangle(a.width/6,0,0,0)};K.prototype.paintBackground=function(a, -c,b,f,d){a.translate(c,b);a.begin();a.moveTo(0,d/4);a.lineTo(0,3*d/4);a.end();a.stroke();a.begin();a.moveTo(0,d/2);a.lineTo(f/6,d/2);a.end();a.stroke();a.ellipse(f/6,0,5*f/6,d);a.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",K);mxUtils.extend(P,mxEllipse);P.prototype.paintVertexShape=function(a,c,b,f,d){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(c+f/8,b+d);a.lineTo(c+7*f/8,b+d);a.end();a.stroke()};mxCellRenderer.registerShape("umlEntity",P);mxUtils.extend(G, -mxShape);G.prototype.paintVertexShape=function(a,c,b,f,d){a.translate(c,b);a.begin();a.moveTo(f,0);a.lineTo(0,d);a.moveTo(0,0);a.lineTo(f,d);a.end();a.stroke()};mxCellRenderer.registerShape("umlDestroy",G);mxUtils.extend(M,mxShape);M.prototype.getLabelBounds=function(a){return new mxRectangle(a.x,a.y+a.height/8,a.width,7*a.height/8)};M.prototype.paintBackground=function(a,c,b,f,d){a.translate(c,b);a.begin();a.moveTo(3*f/8,d/8*1.1);a.lineTo(5*f/8,0);a.end();a.stroke();a.ellipse(0,d/8,f,7*d/8);a.fillAndStroke()}; -M.prototype.paintForeground=function(a,c,b,f,d){a.begin();a.moveTo(3*f/8,d/8*1.1);a.lineTo(5*f/8,d/4);a.end();a.stroke()};mxCellRenderer.registerShape("umlControl",M);mxUtils.extend(B,mxRectangleShape);B.prototype.size=40;B.prototype.isHtmlAllowed=function(){return!1};B.prototype.getLabelBounds=function(a){var c=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(a.x,a.y,a.width,c)};B.prototype.paintBackground=function(a,c,b,f, -d){var e=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),k=mxUtils.getValue(this.style,"participant");null==k||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,a,c,b,f,e):(k=this.state.view.graph.cellRenderer.getShape(k),null!=k&&k!=B&&(k=new k,k.apply(this.state),a.save(),k.paintVertexShape(a,c,b,f,e),a.restore()));e<d&&(a.setDashed(!0),a.begin(),a.moveTo(c+f/2,b+e),a.lineTo(c+f/2,b+d),a.end(),a.stroke())};B.prototype.paintForeground=function(a, +c,b,f,d){a.translate(c,b);a.begin();a.moveTo(0,d/4);a.lineTo(0,3*d/4);a.end();a.stroke();a.begin();a.moveTo(0,d/2);a.lineTo(f/6,d/2);a.end();a.stroke();a.ellipse(f/6,0,5*f/6,d);a.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",K);mxUtils.extend(Y,mxEllipse);Y.prototype.paintVertexShape=function(a,c,b,f,d){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(c+f/8,b+d);a.lineTo(c+7*f/8,b+d);a.end();a.stroke()};mxCellRenderer.registerShape("umlEntity",Y);mxUtils.extend(H, +mxShape);H.prototype.paintVertexShape=function(a,c,b,f,d){a.translate(c,b);a.begin();a.moveTo(f,0);a.lineTo(0,d);a.moveTo(0,0);a.lineTo(f,d);a.end();a.stroke()};mxCellRenderer.registerShape("umlDestroy",H);mxUtils.extend(O,mxShape);O.prototype.getLabelBounds=function(a){return new mxRectangle(a.x,a.y+a.height/8,a.width,7*a.height/8)};O.prototype.paintBackground=function(a,c,b,f,d){a.translate(c,b);a.begin();a.moveTo(3*f/8,d/8*1.1);a.lineTo(5*f/8,0);a.end();a.stroke();a.ellipse(0,d/8,f,7*d/8);a.fillAndStroke()}; +O.prototype.paintForeground=function(a,c,b,f,d){a.begin();a.moveTo(3*f/8,d/8*1.1);a.lineTo(5*f/8,d/4);a.end();a.stroke()};mxCellRenderer.registerShape("umlControl",O);mxUtils.extend(B,mxRectangleShape);B.prototype.size=40;B.prototype.isHtmlAllowed=function(){return!1};B.prototype.getLabelBounds=function(a){var c=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(a.x,a.y,a.width,c)};B.prototype.paintBackground=function(a,c,b,f, +d){var e=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),g=mxUtils.getValue(this.style,"participant");null==g||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,a,c,b,f,e):(g=this.state.view.graph.cellRenderer.getShape(g),null!=g&&g!=B&&(g=new g,g.apply(this.state),a.save(),g.paintVertexShape(a,c,b,f,e),a.restore()));e<d&&(a.setDashed(!0),a.begin(),a.moveTo(c+f/2,b+e),a.lineTo(c+f/2,b+d),a.end(),a.stroke())};B.prototype.paintForeground=function(a, c,b,f,d){var e=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,a,c,b,f,Math.min(d,e))};mxCellRenderer.registerShape("umlLifeline",B);mxUtils.extend(J,mxShape);J.prototype.width=60;J.prototype.height=30;J.prototype.corner=10;J.prototype.getLabelMargins=function(a){return new mxRectangle(0,0,a.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),a.height-parseFloat(mxUtils.getValue(this.style, -"height",this.height)*this.scale))};J.prototype.paintBackground=function(a,c,b,f,d){var e=this.corner,k=Math.min(f,Math.max(e,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),g=Math.min(d,Math.max(1.5*e,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),V=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);V!=mxConstants.NONE&&(a.setFillColor(V),a.rect(c,b,f,d),a.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!= -mxConstants.NONE?(this.getGradientBounds(a,c,b,f,d),a.setGradient(this.fill,this.gradient,c,b,f,d,this.gradientDirection)):a.setFillColor(this.fill);a.begin();a.moveTo(c,b);a.lineTo(c+k,b);a.lineTo(c+k,b+Math.max(0,g-1.5*e));a.lineTo(c+Math.max(0,k-e),b+g);a.lineTo(c,b+g);a.close();a.fillAndStroke();a.begin();a.moveTo(c+k,b);a.lineTo(c+f,b);a.lineTo(c+f,b+d);a.lineTo(c,b+d);a.lineTo(c,b+g);a.stroke()};mxCellRenderer.registerShape("umlFrame",J);mxPerimeter.LifelinePerimeter=function(a,c,b,f){f=B.prototype.size; +"height",this.height)*this.scale))};J.prototype.paintBackground=function(a,c,b,f,d){var e=this.corner,g=Math.min(f,Math.max(e,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),l=Math.min(d,Math.max(1.5*e,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),p=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);p!=mxConstants.NONE&&(a.setFillColor(p),a.rect(c,b,f,d),a.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!= +mxConstants.NONE?(this.getGradientBounds(a,c,b,f,d),a.setGradient(this.fill,this.gradient,c,b,f,d,this.gradientDirection)):a.setFillColor(this.fill);a.begin();a.moveTo(c,b);a.lineTo(c+g,b);a.lineTo(c+g,b+Math.max(0,l-1.5*e));a.lineTo(c+Math.max(0,g-e),b+l);a.lineTo(c,b+l);a.close();a.fillAndStroke();a.begin();a.moveTo(c+g,b);a.lineTo(c+f,b);a.lineTo(c+f,b+d);a.lineTo(c,b+d);a.lineTo(c,b+l);a.stroke()};mxCellRenderer.registerShape("umlFrame",J);mxPerimeter.LifelinePerimeter=function(a,c,b,f){f=B.prototype.size; null!=c&&(f=mxUtils.getValue(c.style,"size",f)*c.view.scale);c=parseFloat(c.style[mxConstants.STYLE_STROKEWIDTH]||1)*c.view.scale/2-1;b.x<a.getCenterX()&&(c=-1*(c+1));return new mxPoint(a.getCenterX()+c,Math.min(a.y+a.height,Math.max(a.y+f,b.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(a,c,b,f){f=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter); mxPerimeter.BackbonePerimeter=function(a,c,b,f){f=parseFloat(c.style[mxConstants.STYLE_STROKEWIDTH]||1)*c.view.scale/2-1;null!=c.style.backboneSize&&(f+=parseFloat(c.style.backboneSize)*c.view.scale/2-1);if("south"==c.style[mxConstants.STYLE_DIRECTION]||"north"==c.style[mxConstants.STYLE_DIRECTION])return b.x<a.getCenterX()&&(f=-1*(f+1)),new mxPoint(a.getCenterX()+f,Math.min(a.y+a.height,Math.max(a.y,b.y)));b.y<a.getCenterY()&&(f=-1*(f+1));return new mxPoint(Math.min(a.x+a.width,Math.max(a.x,b.x)), -a.getCenterY()+f)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(a,c,b,f){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(a,new mxRectangle(0,0,0,Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(c.style,"size",z.prototype.size))*c.view.scale))),c.style),c,b,f)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(a,b,f,d){var e=c.prototype.size; -null!=b&&(e=mxUtils.getValue(b.style,"size",e));var k=a.x,g=a.y,p=a.width,n=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=n*Math.max(0,Math.min(1,e)),g=[new mxPoint(k,g),new mxPoint(k+p,g+e),new mxPoint(k+p,g+n),new mxPoint(k,g+n-e),new mxPoint(k,g)]):(e=p*Math.max(0,Math.min(1,e)),g=[new mxPoint(k+e,g),new mxPoint(k+p,g),new mxPoint(k+p-e,g+n),new mxPoint(k, -g+n),new mxPoint(k+e,g)]);n=a.getCenterX();a=a.getCenterY();a=new mxPoint(n,a);d&&(f.x<k||f.x>k+p?a.y=f.y:a.x=f.x);return mxUtils.getPerimeterPoint(g,a,f)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(a,c,b,d){var e=f.prototype.size;null!=c&&(e=mxUtils.getValue(c.style,"size",e));var k=a.x,g=a.y,p=a.width,n=a.height;c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST; -c==mxConstants.DIRECTION_EAST?(e=p*Math.max(0,Math.min(1,e)),g=[new mxPoint(k+e,g),new mxPoint(k+p-e,g),new mxPoint(k+p,g+n),new mxPoint(k,g+n),new mxPoint(k+e,g)]):c==mxConstants.DIRECTION_WEST?(e=p*Math.max(0,Math.min(1,e)),g=[new mxPoint(k,g),new mxPoint(k+p,g),new mxPoint(k+p-e,g+n),new mxPoint(k+e,g+n),new mxPoint(k,g)]):c==mxConstants.DIRECTION_NORTH?(e=n*Math.max(0,Math.min(1,e)),g=[new mxPoint(k,g+e),new mxPoint(k+p,g),new mxPoint(k+p,g+n),new mxPoint(k,g+n-e),new mxPoint(k,g+e)]):(e=n*Math.max(0, -Math.min(1,e)),g=[new mxPoint(k,g),new mxPoint(k+p,g+e),new mxPoint(k+p,g+n-e),new mxPoint(k,g+n),new mxPoint(k,g)]);n=a.getCenterX();a=a.getCenterY();a=new mxPoint(n,a);d&&(b.x<k||b.x>k+p?a.y=b.y:a.x=b.x);return mxUtils.getPerimeterPoint(g,a,b)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(a,c,b,f){var d="0"!=mxUtils.getValue(c.style,"fixedSize","0"),e=d?t.prototype.fixedSize:t.prototype.size;null!=c&&(e=mxUtils.getValue(c.style, -"size",e));var k=a.x,g=a.y,p=a.width,n=a.height,V=a.getCenterX();a=a.getCenterY();c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_EAST?(d=d?Math.max(0,Math.min(p,e)):p*Math.max(0,Math.min(1,e)),g=[new mxPoint(k,g),new mxPoint(k+p-d,g),new mxPoint(k+p,a),new mxPoint(k+p-d,g+n),new mxPoint(k,g+n),new mxPoint(k+d,a),new mxPoint(k,g)]):c==mxConstants.DIRECTION_WEST?(d=d?Math.max(0,Math.min(p,e)):p*Math.max(0, -Math.min(1,e)),g=[new mxPoint(k+d,g),new mxPoint(k+p,g),new mxPoint(k+p-d,a),new mxPoint(k+p,g+n),new mxPoint(k+d,g+n),new mxPoint(k,a),new mxPoint(k+d,g)]):c==mxConstants.DIRECTION_NORTH?(d=d?Math.max(0,Math.min(n,e)):n*Math.max(0,Math.min(1,e)),g=[new mxPoint(k,g+d),new mxPoint(V,g),new mxPoint(k+p,g+d),new mxPoint(k+p,g+n),new mxPoint(V,g+n-d),new mxPoint(k,g+n),new mxPoint(k,g+d)]):(d=d?Math.max(0,Math.min(n,e)):n*Math.max(0,Math.min(1,e)),g=[new mxPoint(k,g),new mxPoint(V,g+d),new mxPoint(k+ -p,g),new mxPoint(k+p,g+n-d),new mxPoint(V,g+n),new mxPoint(k,g+n-d),new mxPoint(k,g)]);V=new mxPoint(V,a);f&&(b.x<k||b.x>k+p?V.y=b.y:V.x=b.x);return mxUtils.getPerimeterPoint(g,V,b)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(a,c,b,f){var d=F.prototype.size;null!=c&&(d=mxUtils.getValue(c.style,"size",d));var e=a.x,k=a.y,g=a.width,p=a.height,n=a.getCenterX();a=a.getCenterY();c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION, -mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_NORTH||c==mxConstants.DIRECTION_SOUTH?(d=p*Math.max(0,Math.min(1,d)),k=[new mxPoint(n,k),new mxPoint(e+g,k+d),new mxPoint(e+g,k+p-d),new mxPoint(n,k+p),new mxPoint(e,k+p-d),new mxPoint(e,k+d),new mxPoint(n,k)]):(d=g*Math.max(0,Math.min(1,d)),k=[new mxPoint(e+d,k),new mxPoint(e+g-d,k),new mxPoint(e+g,a),new mxPoint(e+g-d,k+p),new mxPoint(e+d,k+p),new mxPoint(e,a),new mxPoint(e+d,k)]);n=new mxPoint(n,a);f&&(b.x<e||b.x>e+ -g?n.y=b.y:n.x=b.x);return mxUtils.getPerimeterPoint(k,n,b)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(O,mxShape);O.prototype.size=10;O.prototype.paintBackground=function(a,c,b,f,d){var e=parseFloat(mxUtils.getValue(this.style,"size",this.size));a.translate(c,b);a.ellipse((f-e)/2,0,e,e);a.fillAndStroke();a.begin();a.moveTo(f/2,e);a.lineTo(f/2,d);a.end();a.stroke()};mxCellRenderer.registerShape("lollipop",O);mxUtils.extend(S,mxShape);S.prototype.size= -10;S.prototype.inset=2;S.prototype.paintBackground=function(a,c,b,f,d){var e=parseFloat(mxUtils.getValue(this.style,"size",this.size)),k=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(c,b);a.begin();a.moveTo(f/2,e+k);a.lineTo(f/2,d);a.end();a.stroke();a.begin();a.moveTo((f-e)/2-k,e/2);a.quadTo((f-e)/2-k,e+k,f/2,e+k);a.quadTo((f+e)/2+k,e+k,(f+e)/2+k,e/2);a.end();a.stroke()};mxCellRenderer.registerShape("requires",S);mxUtils.extend(pa,mxShape);pa.prototype.paintBackground= -function(a,c,b,f,d){a.translate(c,b);a.begin();a.moveTo(0,0);a.quadTo(f,0,f,d/2);a.quadTo(f,d,0,d);a.end();a.stroke()};mxCellRenderer.registerShape("requiredInterface",pa);mxUtils.extend(W,mxShape);W.prototype.inset=2;W.prototype.paintBackground=function(a,c,b,f,d){var e=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(c,b);a.ellipse(0,e,f-2*e,d-2*e);a.fillAndStroke();a.begin();a.moveTo(f/2,0);a.quadTo(f,0,f,d/2);a.quadTo(f,d,f/2,d);a.end();a.stroke()};mxCellRenderer.registerShape("providedRequiredInterface", -W);mxUtils.extend(E,mxCylinder);E.prototype.jettyWidth=32;E.prototype.jettyHeight=12;E.prototype.redrawPath=function(a,c,b,f,d,e){var k=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));c=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));b=k/2;var k=b+k/2,g=.3*d-c/2,p=.7*d-c/2;e?(a.moveTo(b,g),a.lineTo(k,g),a.lineTo(k,g+c),a.lineTo(b,g+c),a.moveTo(b,p),a.lineTo(k,p),a.lineTo(k,p+c),a.lineTo(b,p+c)):(a.moveTo(b,0),a.lineTo(f,0),a.lineTo(f,d),a.lineTo(b,d), -a.lineTo(b,p+c),a.lineTo(0,p+c),a.lineTo(0,p),a.lineTo(b,p),a.lineTo(b,g+c),a.lineTo(0,g+c),a.lineTo(0,g),a.lineTo(b,g),a.close());a.end()};mxCellRenderer.registerShape("component",E);mxUtils.extend(Y,mxDoubleEllipse);Y.prototype.outerStroke=!0;Y.prototype.paintVertexShape=function(a,c,b,f,d){var e=Math.min(4,Math.min(f/5,d/5));0<f&&0<d&&(a.ellipse(c+e,b+e,f-2*e,d-2*e),a.fillAndStroke());a.setShadow(!1);this.outerStroke&&(a.ellipse(c,b,f,d),a.stroke())};mxCellRenderer.registerShape("endState",Y); -mxUtils.extend(qa,Y);qa.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",qa);mxUtils.extend(ja,mxArrowConnector);ja.prototype.defaultWidth=4;ja.prototype.isOpenEnded=function(){return!0};ja.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};ja.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",ja);mxUtils.extend(ka,mxArrowConnector);ka.prototype.defaultWidth= -10;ka.prototype.defaultArrowWidth=20;ka.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};ka.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};ka.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",ka);mxUtils.extend(ga, -mxActor);ga.prototype.size=30;ga.prototype.isRoundable=function(){return!0};ga.prototype.redrawPath=function(a,c,b,f,d){c=Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size)));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,d),new mxPoint(0,c),new mxPoint(f,0),new mxPoint(f,d)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("manualInput",ga);mxUtils.extend(Q,mxRectangleShape);Q.prototype.dx=20;Q.prototype.dy= -20;Q.prototype.isHtmlAllowed=function(){return!1};Q.prototype.paintForeground=function(a,c,b,f,d){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var e=0;if(this.isRounded)var k=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,e=Math.max(e,Math.min(f*k,d*k));k=Math.max(e,Math.min(f,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));e=Math.max(e,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.begin();a.moveTo(c, -b+e);a.lineTo(c+f,b+e);a.end();a.stroke();a.begin();a.moveTo(c+k,b);a.lineTo(c+k,b+d);a.end();a.stroke()};mxCellRenderer.registerShape("internalStorage",Q);mxUtils.extend(X,mxActor);X.prototype.dx=20;X.prototype.dy=20;X.prototype.redrawPath=function(a,c,b,f,d){c=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var e=mxUtils.getValue(this.style, -mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(f,0),new mxPoint(f,b),new mxPoint(c,b),new mxPoint(c,d),new mxPoint(0,d)],this.isRounded,e,!0);a.end()};mxCellRenderer.registerShape("corner",X);mxUtils.extend(ma,mxActor);ma.prototype.redrawPath=function(a,c,b,f,d){a.moveTo(0,0);a.lineTo(0,d);a.end();a.moveTo(f,0);a.lineTo(f,d);a.end();a.moveTo(0,d/2);a.lineTo(f,d/2);a.end()};mxCellRenderer.registerShape("crossbar",ma);mxUtils.extend(da,mxActor); +a.getCenterY()+f)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(a,c,b,f){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(a,new mxRectangle(0,0,0,Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(c.style,"size",A.prototype.size))*c.view.scale))),c.style),c,b,f)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(a,b,f,d){var e=c.prototype.size; +null!=b&&(e=mxUtils.getValue(b.style,"size",e));var g=a.x,l=a.y,p=a.width,n=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=n*Math.max(0,Math.min(1,e)),l=[new mxPoint(g,l),new mxPoint(g+p,l+e),new mxPoint(g+p,l+n),new mxPoint(g,l+n-e),new mxPoint(g,l)]):(e=p*Math.max(0,Math.min(1,e)),l=[new mxPoint(g+e,l),new mxPoint(g+p,l),new mxPoint(g+p-e,l+n),new mxPoint(g, +l+n),new mxPoint(g+e,l)]);n=a.getCenterX();a=a.getCenterY();a=new mxPoint(n,a);d&&(f.x<g||f.x>g+p?a.y=f.y:a.x=f.x);return mxUtils.getPerimeterPoint(l,a,f)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(a,c,b,d){var e=f.prototype.size;null!=c&&(e=mxUtils.getValue(c.style,"size",e));var g=a.x,l=a.y,p=a.width,n=a.height;c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST; +c==mxConstants.DIRECTION_EAST?(e=p*Math.max(0,Math.min(1,e)),l=[new mxPoint(g+e,l),new mxPoint(g+p-e,l),new mxPoint(g+p,l+n),new mxPoint(g,l+n),new mxPoint(g+e,l)]):c==mxConstants.DIRECTION_WEST?(e=p*Math.max(0,Math.min(1,e)),l=[new mxPoint(g,l),new mxPoint(g+p,l),new mxPoint(g+p-e,l+n),new mxPoint(g+e,l+n),new mxPoint(g,l)]):c==mxConstants.DIRECTION_NORTH?(e=n*Math.max(0,Math.min(1,e)),l=[new mxPoint(g,l+e),new mxPoint(g+p,l),new mxPoint(g+p,l+n),new mxPoint(g,l+n-e),new mxPoint(g,l+e)]):(e=n*Math.max(0, +Math.min(1,e)),l=[new mxPoint(g,l),new mxPoint(g+p,l+e),new mxPoint(g+p,l+n-e),new mxPoint(g,l+n),new mxPoint(g,l)]);n=a.getCenterX();a=a.getCenterY();a=new mxPoint(n,a);d&&(b.x<g||b.x>g+p?a.y=b.y:a.x=b.x);return mxUtils.getPerimeterPoint(l,a,b)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(a,c,b,f){var d="0"!=mxUtils.getValue(c.style,"fixedSize","0"),e=d?t.prototype.fixedSize:t.prototype.size;null!=c&&(e=mxUtils.getValue(c.style, +"size",e));var g=a.x,l=a.y,p=a.width,n=a.height,X=a.getCenterX();a=a.getCenterY();c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_EAST?(d=d?Math.max(0,Math.min(p,e)):p*Math.max(0,Math.min(1,e)),l=[new mxPoint(g,l),new mxPoint(g+p-d,l),new mxPoint(g+p,a),new mxPoint(g+p-d,l+n),new mxPoint(g,l+n),new mxPoint(g+d,a),new mxPoint(g,l)]):c==mxConstants.DIRECTION_WEST?(d=d?Math.max(0,Math.min(p,e)):p*Math.max(0, +Math.min(1,e)),l=[new mxPoint(g+d,l),new mxPoint(g+p,l),new mxPoint(g+p-d,a),new mxPoint(g+p,l+n),new mxPoint(g+d,l+n),new mxPoint(g,a),new mxPoint(g+d,l)]):c==mxConstants.DIRECTION_NORTH?(d=d?Math.max(0,Math.min(n,e)):n*Math.max(0,Math.min(1,e)),l=[new mxPoint(g,l+d),new mxPoint(X,l),new mxPoint(g+p,l+d),new mxPoint(g+p,l+n),new mxPoint(X,l+n-d),new mxPoint(g,l+n),new mxPoint(g,l+d)]):(d=d?Math.max(0,Math.min(n,e)):n*Math.max(0,Math.min(1,e)),l=[new mxPoint(g,l),new mxPoint(X,l+d),new mxPoint(g+ +p,l),new mxPoint(g+p,l+n-d),new mxPoint(X,l+n),new mxPoint(g,l+n-d),new mxPoint(g,l)]);X=new mxPoint(X,a);f&&(b.x<g||b.x>g+p?X.y=b.y:X.x=b.x);return mxUtils.getPerimeterPoint(l,X,b)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(a,c,b,f){var d=E.prototype.size;null!=c&&(d=mxUtils.getValue(c.style,"size",d));var e=a.x,g=a.y,l=a.width,p=a.height,n=a.getCenterX();a=a.getCenterY();c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION, +mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_NORTH||c==mxConstants.DIRECTION_SOUTH?(d=p*Math.max(0,Math.min(1,d)),g=[new mxPoint(n,g),new mxPoint(e+l,g+d),new mxPoint(e+l,g+p-d),new mxPoint(n,g+p),new mxPoint(e,g+p-d),new mxPoint(e,g+d),new mxPoint(n,g)]):(d=l*Math.max(0,Math.min(1,d)),g=[new mxPoint(e+d,g),new mxPoint(e+l-d,g),new mxPoint(e+l,a),new mxPoint(e+l-d,g+p),new mxPoint(e+d,g+p),new mxPoint(e,a),new mxPoint(e+d,g)]);n=new mxPoint(n,a);f&&(b.x<e||b.x>e+ +l?n.y=b.y:n.x=b.x);return mxUtils.getPerimeterPoint(g,n,b)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(P,mxShape);P.prototype.size=10;P.prototype.paintBackground=function(a,c,b,f,d){var e=parseFloat(mxUtils.getValue(this.style,"size",this.size));a.translate(c,b);a.ellipse((f-e)/2,0,e,e);a.fillAndStroke();a.begin();a.moveTo(f/2,e);a.lineTo(f/2,d);a.end();a.stroke()};mxCellRenderer.registerShape("lollipop",P);mxUtils.extend(S,mxShape);S.prototype.size= +10;S.prototype.inset=2;S.prototype.paintBackground=function(a,c,b,f,d){var e=parseFloat(mxUtils.getValue(this.style,"size",this.size)),g=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(c,b);a.begin();a.moveTo(f/2,e+g);a.lineTo(f/2,d);a.end();a.stroke();a.begin();a.moveTo((f-e)/2-g,e/2);a.quadTo((f-e)/2-g,e+g,f/2,e+g);a.quadTo((f+e)/2+g,e+g,(f+e)/2+g,e/2);a.end();a.stroke()};mxCellRenderer.registerShape("requires",S);mxUtils.extend(pa,mxShape);pa.prototype.paintBackground= +function(a,c,b,f,d){a.translate(c,b);a.begin();a.moveTo(0,0);a.quadTo(f,0,f,d/2);a.quadTo(f,d,0,d);a.end();a.stroke()};mxCellRenderer.registerShape("requiredInterface",pa);mxUtils.extend(V,mxShape);V.prototype.inset=2;V.prototype.paintBackground=function(a,c,b,f,d){var e=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(c,b);a.ellipse(0,e,f-2*e,d-2*e);a.fillAndStroke();a.begin();a.moveTo(f/2,0);a.quadTo(f,0,f,d/2);a.quadTo(f,d,f/2,d);a.end();a.stroke()};mxCellRenderer.registerShape("providedRequiredInterface", +V);mxUtils.extend(F,mxCylinder);F.prototype.jettyWidth=32;F.prototype.jettyHeight=12;F.prototype.redrawPath=function(a,c,b,f,d,e){var g=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));c=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));b=g/2;var g=b+g/2,l=.3*d-c/2,p=.7*d-c/2;e?(a.moveTo(b,l),a.lineTo(g,l),a.lineTo(g,l+c),a.lineTo(b,l+c),a.moveTo(b,p),a.lineTo(g,p),a.lineTo(g,p+c),a.lineTo(b,p+c)):(a.moveTo(b,0),a.lineTo(f,0),a.lineTo(f,d),a.lineTo(b,d), +a.lineTo(b,p+c),a.lineTo(0,p+c),a.lineTo(0,p),a.lineTo(b,p),a.lineTo(b,l+c),a.lineTo(0,l+c),a.lineTo(0,l),a.lineTo(b,l),a.close());a.end()};mxCellRenderer.registerShape("component",F);mxUtils.extend(M,mxDoubleEllipse);M.prototype.outerStroke=!0;M.prototype.paintVertexShape=function(a,c,b,f,d){var e=Math.min(4,Math.min(f/5,d/5));0<f&&0<d&&(a.ellipse(c+e,b+e,f-2*e,d-2*e),a.fillAndStroke());a.setShadow(!1);this.outerStroke&&(a.ellipse(c,b,f,d),a.stroke())};mxCellRenderer.registerShape("endState",M); +mxUtils.extend(qa,M);qa.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",qa);mxUtils.extend(la,mxArrowConnector);la.prototype.defaultWidth=4;la.prototype.isOpenEnded=function(){return!0};la.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};la.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",la);mxUtils.extend(ga,mxArrowConnector);ga.prototype.defaultWidth= +10;ga.prototype.defaultArrowWidth=20;ga.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};ga.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};ga.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",ga);mxUtils.extend(ha, +mxActor);ha.prototype.size=30;ha.prototype.isRoundable=function(){return!0};ha.prototype.redrawPath=function(a,c,b,f,d){c=Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size)));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,d),new mxPoint(0,c),new mxPoint(f,0),new mxPoint(f,d)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("manualInput",ha);mxUtils.extend(Q,mxRectangleShape);Q.prototype.dx=20;Q.prototype.dy= +20;Q.prototype.isHtmlAllowed=function(){return!1};Q.prototype.paintForeground=function(a,c,b,f,d){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var e=0;if(this.isRounded)var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,e=Math.max(e,Math.min(f*g,d*g));g=Math.max(e,Math.min(f,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));e=Math.max(e,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.begin();a.moveTo(c, +b+e);a.lineTo(c+f,b+e);a.end();a.stroke();a.begin();a.moveTo(c+g,b);a.lineTo(c+g,b+d);a.end();a.stroke()};mxCellRenderer.registerShape("internalStorage",Q);mxUtils.extend(W,mxActor);W.prototype.dx=20;W.prototype.dy=20;W.prototype.redrawPath=function(a,c,b,f,d){c=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var e=mxUtils.getValue(this.style, +mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(f,0),new mxPoint(f,b),new mxPoint(c,b),new mxPoint(c,d),new mxPoint(0,d)],this.isRounded,e,!0);a.end()};mxCellRenderer.registerShape("corner",W);mxUtils.extend(ma,mxActor);ma.prototype.redrawPath=function(a,c,b,f,d){a.moveTo(0,0);a.lineTo(0,d);a.end();a.moveTo(f,0);a.lineTo(f,d);a.end();a.moveTo(0,d/2);a.lineTo(f,d/2);a.end()};mxCellRenderer.registerShape("crossbar",ma);mxUtils.extend(da,mxActor); da.prototype.dx=20;da.prototype.dy=20;da.prototype.redrawPath=function(a,c,b,f,d){c=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(f,0),new mxPoint(f,b),new mxPoint((f+c)/2,b),new mxPoint((f+c)/2,d), -new mxPoint((f-c)/2,d),new mxPoint((f-c)/2,b),new mxPoint(0,b)],this.isRounded,e,!0);a.end()};mxCellRenderer.registerShape("tee",da);mxUtils.extend(R,mxActor);R.prototype.arrowWidth=.3;R.prototype.arrowSize=.2;R.prototype.redrawPath=function(a,c,b,f,d){var e=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));c=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));b=(d-e)/2;var e=b+e,k=mxUtils.getValue(this.style, -mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,b),new mxPoint(f-c,b),new mxPoint(f-c,0),new mxPoint(f,d/2),new mxPoint(f-c,d),new mxPoint(f-c,e),new mxPoint(0,e)],this.isRounded,k,!0);a.end()};mxCellRenderer.registerShape("singleArrow",R);mxUtils.extend(ha,mxActor);ha.prototype.redrawPath=function(a,c,b,f,d){var e=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",R.prototype.arrowWidth))));c=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style, -"arrowSize",R.prototype.arrowSize))));b=(d-e)/2;var e=b+e,k=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,d/2),new mxPoint(c,0),new mxPoint(c,b),new mxPoint(f-c,b),new mxPoint(f-c,0),new mxPoint(f,d/2),new mxPoint(f-c,d),new mxPoint(f-c,e),new mxPoint(c,e),new mxPoint(c,d)],this.isRounded,k,!0);a.end()};mxCellRenderer.registerShape("doubleArrow",ha);mxUtils.extend(N,mxActor);N.prototype.size=.1;N.prototype.redrawPath=function(a,c, -b,f,d){c=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(c,0);a.lineTo(f,0);a.quadTo(f-2*c,d/2,f,d);a.lineTo(c,d);a.quadTo(c-2*c,d/2,c,0);a.close();a.end()};mxCellRenderer.registerShape("dataStorage",N);mxUtils.extend(H,mxActor);H.prototype.redrawPath=function(a,c,b,f,d){a.moveTo(0,0);a.quadTo(f,0,f,d/2);a.quadTo(f,d,0,d);a.close();a.end()};mxCellRenderer.registerShape("or",H);mxUtils.extend(ba,mxActor);ba.prototype.redrawPath=function(a,c,b,f,d){a.moveTo(0, -0);a.quadTo(f,0,f,d/2);a.quadTo(f,d,0,d);a.quadTo(f/2,d/2,0,0);a.close();a.end()};mxCellRenderer.registerShape("xor",ba);mxUtils.extend(L,mxActor);L.prototype.size=20;L.prototype.isRoundable=function(){return!0};L.prototype.redrawPath=function(a,c,b,f,d){c=Math.min(f/2,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(c,0),new mxPoint(f-c,0),new mxPoint(f,.8*c),new mxPoint(f, -d),new mxPoint(0,d),new mxPoint(0,.8*c)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("loopLimit",L);mxUtils.extend(T,mxActor);T.prototype.size=.375;T.prototype.isRoundable=function(){return!0};T.prototype.redrawPath=function(a,c,b,f,d){c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(f,0),new mxPoint(f,d-c),new mxPoint(f/ -2,d),new mxPoint(0,d-c)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("offPageConnector",T);mxUtils.extend(ea,mxEllipse);ea.prototype.paintVertexShape=function(a,c,b,f,d){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(c+f/2,b+d);a.lineTo(c+f,b+d);a.end();a.stroke()};mxCellRenderer.registerShape("tapeData",ea);mxUtils.extend(fa,mxEllipse);fa.prototype.paintVertexShape=function(a,c,b,f,d){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1); +new mxPoint((f-c)/2,d),new mxPoint((f-c)/2,b),new mxPoint(0,b)],this.isRounded,e,!0);a.end()};mxCellRenderer.registerShape("tee",da);mxUtils.extend(R,mxActor);R.prototype.arrowWidth=.3;R.prototype.arrowSize=.2;R.prototype.redrawPath=function(a,c,b,f,d){var e=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));c=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));b=(d-e)/2;var e=b+e,g=mxUtils.getValue(this.style, +mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,b),new mxPoint(f-c,b),new mxPoint(f-c,0),new mxPoint(f,d/2),new mxPoint(f-c,d),new mxPoint(f-c,e),new mxPoint(0,e)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("singleArrow",R);mxUtils.extend(ia,mxActor);ia.prototype.redrawPath=function(a,c,b,f,d){var e=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",R.prototype.arrowWidth))));c=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style, +"arrowSize",R.prototype.arrowSize))));b=(d-e)/2;var e=b+e,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,d/2),new mxPoint(c,0),new mxPoint(c,b),new mxPoint(f-c,b),new mxPoint(f-c,0),new mxPoint(f,d/2),new mxPoint(f-c,d),new mxPoint(f-c,e),new mxPoint(c,e),new mxPoint(c,d)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("doubleArrow",ia);mxUtils.extend(N,mxActor);N.prototype.size=.1;N.prototype.redrawPath=function(a,c, +b,f,d){c=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(c,0);a.lineTo(f,0);a.quadTo(f-2*c,d/2,f,d);a.lineTo(c,d);a.quadTo(c-2*c,d/2,c,0);a.close();a.end()};mxCellRenderer.registerShape("dataStorage",N);mxUtils.extend(G,mxActor);G.prototype.redrawPath=function(a,c,b,f,d){a.moveTo(0,0);a.quadTo(f,0,f,d/2);a.quadTo(f,d,0,d);a.close();a.end()};mxCellRenderer.registerShape("or",G);mxUtils.extend(ba,mxActor);ba.prototype.redrawPath=function(a,c,f,b,d){a.moveTo(0, +0);a.quadTo(b,0,b,d/2);a.quadTo(b,d,0,d);a.quadTo(b/2,d/2,0,0);a.close();a.end()};mxCellRenderer.registerShape("xor",ba);mxUtils.extend(L,mxActor);L.prototype.size=20;L.prototype.isRoundable=function(){return!0};L.prototype.redrawPath=function(a,c,b,f,d){c=Math.min(f/2,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(c,0),new mxPoint(f-c,0),new mxPoint(f,.8*c),new mxPoint(f, +d),new mxPoint(0,d),new mxPoint(0,.8*c)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("loopLimit",L);mxUtils.extend(T,mxActor);T.prototype.size=.375;T.prototype.isRoundable=function(){return!0};T.prototype.redrawPath=function(a,c,f,b,d){c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(b,0),new mxPoint(b,d-c),new mxPoint(b/ +2,d),new mxPoint(0,d-c)],this.isRounded,f,!0);a.end()};mxCellRenderer.registerShape("offPageConnector",T);mxUtils.extend(ea,mxEllipse);ea.prototype.paintVertexShape=function(a,c,b,f,d){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(c+f/2,b+d);a.lineTo(c+f,b+d);a.end();a.stroke()};mxCellRenderer.registerShape("tapeData",ea);mxUtils.extend(fa,mxEllipse);fa.prototype.paintVertexShape=function(a,c,b,f,d){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1); a.begin();a.moveTo(c,b+d/2);a.lineTo(c+f,b+d/2);a.end();a.stroke();a.begin();a.moveTo(c+f/2,b);a.lineTo(c+f/2,b+d);a.end();a.stroke()};mxCellRenderer.registerShape("orEllipse",fa);mxUtils.extend(I,mxEllipse);I.prototype.paintVertexShape=function(a,c,b,f,d){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(c+.145*f,b+.145*d);a.lineTo(c+.855*f,b+.855*d);a.end();a.stroke();a.begin();a.moveTo(c+.855*f,b+.145*d);a.lineTo(c+.145*f,b+.855*d);a.end();a.stroke()}; mxCellRenderer.registerShape("sumEllipse",I);mxUtils.extend(na,mxRhombus);na.prototype.paintVertexShape=function(a,c,b,f,d){mxRhombus.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(c,b+d/2);a.lineTo(c+f,b+d/2);a.end();a.stroke()};mxCellRenderer.registerShape("sortShape",na);mxUtils.extend(Z,mxEllipse);Z.prototype.paintVertexShape=function(a,c,b,f,d){a.begin();a.moveTo(c,b);a.lineTo(c+f,b);a.lineTo(c+f/2,b+d/2);a.close();a.fillAndStroke();a.begin();a.moveTo(c,b+ d);a.lineTo(c+f,b+d);a.lineTo(c+f/2,b+d/2);a.close();a.fillAndStroke()};mxCellRenderer.registerShape("collate",Z);mxUtils.extend(aa,mxEllipse);aa.prototype.paintVertexShape=function(a,c,b,f,d){var e=b+d-5;a.begin();a.moveTo(c,b);a.lineTo(c,b+d);a.moveTo(c,e);a.lineTo(c+10,e-5);a.moveTo(c,e);a.lineTo(c+10,e+5);a.moveTo(c,e);a.lineTo(c+f,e);a.moveTo(c+f,b);a.lineTo(c+f,b+d);a.moveTo(c+f,e);a.lineTo(c+f-10,e-5);a.moveTo(c+f,e);a.lineTo(c+f-10,e+5);a.end();a.stroke()};mxCellRenderer.registerShape("dimension", aa);mxUtils.extend(Ba,mxEllipse);Ba.prototype.paintVertexShape=function(a,c,b,f,d){this.outline||a.setStrokeColor(null);mxRectangleShape.prototype.paintBackground.apply(this,arguments);null!=this.style&&(a.setStrokeColor(this.stroke),a.rect(c,b,f,d),a.fill(),a.begin(),a.moveTo(c,b),"1"==mxUtils.getValue(this.style,"top","1")?a.lineTo(c+f,b):a.moveTo(c+f,b),"1"==mxUtils.getValue(this.style,"right","1")?a.lineTo(c+f,b+d):a.moveTo(c+f,b+d),"1"==mxUtils.getValue(this.style,"bottom","1")?a.lineTo(c,b+ d):a.moveTo(c,b+d),"1"==mxUtils.getValue(this.style,"left","1")&&a.lineTo(c,b-this.strokewidth/2),a.end(),a.stroke())};mxCellRenderer.registerShape("partialRectangle",Ba);mxUtils.extend(xa,mxEllipse);xa.prototype.paintVertexShape=function(a,c,b,f,d){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();"vertical"==mxUtils.getValue(this.style,"line")?(a.moveTo(c+f/2,b),a.lineTo(c+f/2,b+d)):(a.moveTo(c,b+d/2),a.lineTo(c+f,b+d/2));a.end();a.stroke()};mxCellRenderer.registerShape("lineEllipse", -xa);mxUtils.extend(ya,mxActor);ya.prototype.redrawPath=function(a,c,b,f,d){c=Math.min(f,d/2);a.moveTo(0,0);a.lineTo(f-c,0);a.quadTo(f,0,f,d/2);a.quadTo(f,d,f-c,d);a.lineTo(0,d);a.close();a.end()};mxCellRenderer.registerShape("delay",ya);mxUtils.extend(ia,mxActor);ia.prototype.size=.2;ia.prototype.redrawPath=function(a,c,b,f,d){c=Math.min(d,f);var e=Math.max(0,Math.min(c,c*parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=(d-e)/2;b=c+e;var k=(f-e)/2,e=k+e;a.moveTo(0,c);a.lineTo(k,c);a.lineTo(k, -0);a.lineTo(e,0);a.lineTo(e,c);a.lineTo(f,c);a.lineTo(f,b);a.lineTo(e,b);a.lineTo(e,d);a.lineTo(k,d);a.lineTo(k,b);a.lineTo(0,b);a.close();a.end()};mxCellRenderer.registerShape("cross",ia);mxUtils.extend(ca,mxActor);ca.prototype.size=.25;ca.prototype.redrawPath=function(a,c,b,f,d){c=Math.min(f,d/2);b=Math.min(f-c,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*f);a.moveTo(0,d/2);a.lineTo(b,0);a.lineTo(f-c,0);a.quadTo(f,0,f,d/2);a.quadTo(f,d,f-c,d);a.lineTo(b,d);a.close();a.end()}; +xa);mxUtils.extend(ya,mxActor);ya.prototype.redrawPath=function(a,c,b,f,d){c=Math.min(f,d/2);a.moveTo(0,0);a.lineTo(f-c,0);a.quadTo(f,0,f,d/2);a.quadTo(f,d,f-c,d);a.lineTo(0,d);a.close();a.end()};mxCellRenderer.registerShape("delay",ya);mxUtils.extend(ja,mxActor);ja.prototype.size=.2;ja.prototype.redrawPath=function(a,c,b,f,d){c=Math.min(d,f);var e=Math.max(0,Math.min(c,c*parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=(d-e)/2;b=c+e;var g=(f-e)/2,e=g+e;a.moveTo(0,c);a.lineTo(g,c);a.lineTo(g, +0);a.lineTo(e,0);a.lineTo(e,c);a.lineTo(f,c);a.lineTo(f,b);a.lineTo(e,b);a.lineTo(e,d);a.lineTo(g,d);a.lineTo(g,b);a.lineTo(0,b);a.close();a.end()};mxCellRenderer.registerShape("cross",ja);mxUtils.extend(ca,mxActor);ca.prototype.size=.25;ca.prototype.redrawPath=function(a,c,b,f,d){c=Math.min(f,d/2);b=Math.min(f-c,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*f);a.moveTo(0,d/2);a.lineTo(b,0);a.lineTo(f-c,0);a.quadTo(f,0,f,d/2);a.quadTo(f,d,f-c,d);a.lineTo(b,d);a.close();a.end()}; mxCellRenderer.registerShape("display",ca);mxUtils.extend(oa,mxConnector);oa.prototype.origPaintEdgeShape=oa.prototype.paintEdgeShape;oa.prototype.paintEdgeShape=function(a,c,f){for(var b=[],d=0;d<c.length;d++)b.push(mxUtils.clone(c[d]));var d=a.state.dashed,e=a.state.fixDash;oa.prototype.origPaintEdgeShape.apply(this,[a,b,f]);3<=a.state.strokeWidth&&(b=mxUtils.getValue(this.style,"fillColor",null),null!=b&&(a.setStrokeColor(b),a.setStrokeWidth(a.state.strokeWidth-2),a.setDashed(d,e),oa.prototype.origPaintEdgeShape.apply(this, -[a,c,f])))};mxCellRenderer.registerShape("filledEdge",oa);"undefined"!==typeof StyleFormatPanel&&function(){var a=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var c=this.format.getSelectionState(),b=a.apply(this,arguments);"umlFrame"==c.style.shape&&b.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"#ffffff"});return b}}();mxMarker.addMarker("dash",function(a,c,b,f,d,e,k,g,p,n){var q=d*(k+p+1),t=e*(k+p+1);return function(){a.begin(); -a.moveTo(f.x-q/2-t/2,f.y-t/2+q/2);a.lineTo(f.x+t/2-3*q/2,f.y-3*t/2-q/2);a.stroke()}});mxMarker.addMarker("cross",function(a,c,b,f,d,e,k,g,p,n){var q=d*(k+p+1),t=e*(k+p+1);return function(){a.begin();a.moveTo(f.x-q/2-t/2,f.y-t/2+q/2);a.lineTo(f.x+t/2-3*q/2,f.y-3*t/2-q/2);a.moveTo(f.x-q/2+t/2,f.y-t/2-q/2);a.lineTo(f.x-t/2-3*q/2,f.y-3*t/2+q/2);a.stroke()}});mxMarker.addMarker("circle",Ca);mxMarker.addMarker("circlePlus",function(a,c,f,b,d,e,k,g,p,n){var q=b.clone(),t=Ca.apply(this,arguments),l=d*(k+ -2*p),x=e*(k+2*p);return function(){t.apply(this,arguments);a.begin();a.moveTo(q.x-d*p,q.y-e*p);a.lineTo(q.x-2*l+d*p,q.y-2*x+e*p);a.moveTo(q.x-l-x+e*p,q.y-x+l-d*p);a.lineTo(q.x+x-l-e*p,q.y-x-l+d*p);a.stroke()}});mxMarker.addMarker("async",function(a,c,f,b,d,e,k,g,p,n){c=d*p*1.118;f=e*p*1.118;d*=k+p;e*=k+p;var q=b.clone();q.x-=c;q.y-=f;b.x+=1*-d-c;b.y+=1*-e-f;return function(){a.begin();a.moveTo(q.x,q.y);g?a.lineTo(q.x-d-e/2,q.y-e+d/2):a.lineTo(q.x+e/2-d,q.y-e-d/2);a.lineTo(q.x-d,q.y-e);a.close();n? -a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync",function(a){a=null!=a?a:2;return function(c,f,b,d,e,k,g,p,n,q){e*=g+n;k*=g+n;var t=d.clone();return function(){c.begin();c.moveTo(t.x,t.y);p?c.lineTo(t.x-e-k/a,t.y-k+e/a):c.lineTo(t.x+k/a-e,t.y-k-e/a);c.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Ea=function(a,c,f){return wa(a,["width"],c,function(c,b,d,e,k){k=a.shape.getEdgeWidth()*a.view.scale+f;return new mxPoint(e.x+b*c/4+d*k/2,e.y+d*c/4-b*k/2)},function(c,b,d,e,k, -g){c=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,k.x,k.y,g.x,g.y));a.style.width=Math.round(2*c)/a.view.scale-f})},wa=function(a,c,f,b,d){return U(a,c,function(c){var d=a.absolutePoints,e=d.length-1;c=a.view.translate;var k=a.view.scale,g=f?d[0]:d[e],d=f?d[1]:d[e-1],e=d.x-g.x,p=d.y-g.y,n=Math.sqrt(e*e+p*p),g=b.call(this,n,e/n,p/n,g,d);return new mxPoint(g.x/k-c.x,g.y/k-c.y)},function(c,b,e){var k=a.absolutePoints,g=k.length-1;c=a.view.translate;var p=a.view.scale,n=f?k[0]:k[g],k=f?k[1]:k[g-1],g=k.x-n.x, -q=k.y-n.y,t=Math.sqrt(g*g+q*q);b.x=(b.x+c.x)*p;b.y=(b.y+c.y)*p;d.call(this,t,g/t,q/t,n,k,b,e)})},ua=function(a){return function(c){return[U(c,["arrowWidth","arrowSize"],function(c){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",R.prototype.arrowWidth))),f=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",R.prototype.arrowSize)));return new mxPoint(c.x+(1-f)*c.width,c.y+(1-b)*c.height/2)},function(c,b){this.state.style.arrowWidth=Math.max(0,Math.min(1, -Math.abs(c.y+c.height/2-b.y)/c.height*2));this.state.style.arrowSize=Math.max(0,Math.min(a,(c.x+c.width-b.x)/c.width))})]}},Fa=function(a,c,b){return function(f){var d=[U(f,["size"],function(b){var f=Math.max(0,Math.min(b.width,Math.min(b.height,parseFloat(mxUtils.getValue(this.state.style,"size",c)))))*a;return new mxPoint(b.x+f,b.y+f)},function(c,b){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(c.width,b.x-c.x),Math.min(c.height,b.y-c.y)))/a)})];b&&mxUtils.getValue(f.style,mxConstants.STYLE_ROUNDED, -!1)&&d.push(sa(f));return d}},Ga=function(a,c,b,f,d){b=null!=b?b:1;return function(e){var k=[U(e,["size"],function(c){var b=null!=d?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,f=parseFloat(mxUtils.getValue(this.state.style,"size",b?d:a));return new mxPoint(c.x+Math.max(0,Math.min(c.width,f*(b?1:c.width))),c.getCenterY())},function(a,c,f){var k=null!=d?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null;a=k?c.x-a.x:Math.max(0,Math.min(b,(c.x-a.x)/a.width));k&&!mxEvent.isAltDown(f.getEvent())&& -(a=e.view.graph.snap(a));this.state.style.size=a},null,f)];c&&mxUtils.getValue(e.style,mxConstants.STYLE_ROUNDED,!1)&&k.push(sa(e));return k}},Ma=function(a){return function(c){var b=[U(c,["size"],function(c){var b=Math.max(0,Math.min(a,parseFloat(mxUtils.getValue(this.state.style,"size",f.prototype.size))));return new mxPoint(c.x+b*c.width*.75,c.y+c.height/4)},function(c,b){this.state.style.size=Math.max(0,Math.min(a,(b.x-c.x)/(.75*c.width)))},null,!0)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED, -!1)&&b.push(sa(c));return b}},Da=function(){return function(a){var c=[];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(sa(a));return c}},sa=function(a,c){return U(a,[mxConstants.STYLE_ARCSIZE],function(b){var f=null!=c?c:b.height/8;if("1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var d=mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(b.x+b.width-Math.min(b.width/2,d),b.y+f)}d=Math.max(0,parseFloat(mxUtils.getValue(a.style, -mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(b.x+b.width-Math.min(Math.max(b.width/2,b.height/2),Math.min(b.width,b.height)*d),b.y+f)},function(c,b,f){"1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(c.width,2*(c.x+c.width-b.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(c.width-b.x+c.x)/Math.min(c.width,c.height))))})}, -U=function(a,c,b,f,d,e){var k=new mxHandle(a,null,mxVertexHandler.prototype.secondaryHandleImage);k.execute=function(){for(var a=0;a<c.length;a++)this.copyStyle(c[a])};k.getPosition=b;k.setPosition=f;k.ignoreGrid=null!=d?d:!0;if(e){var g=k.positionChanged;k.positionChanged=function(){g.apply(this,arguments);a.view.invalidate(this.state.cell);a.view.validate()}}return k},Ha={link:function(a){return[Ea(a,!0,10),Ea(a,!1,10)]},flexArrow:function(a){var c=a.view.graph.gridSize/a.view.scale,b=[];mxUtils.getValue(a.style, -mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(b.push(wa(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(c,b,f,d,e){c=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(d.x+b*(e+a.shape.strokewidth*a.view.scale)+f*c/2,d.y+f*(e+a.shape.strokewidth*a.view.scale)-b*c/2)},function(b,f,d,e,k,g,p){b=Math.sqrt(mxUtils.ptSegDistSq(e.x, -e.y,k.x,k.y,g.x,g.y));f=mxUtils.ptLineDist(e.x,e.y,e.x+d,e.y-f,g.x,g.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(f-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*b)/a.view.scale;mxEvent.isControlDown(p.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]);mxEvent.isAltDown(p.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<c/6&&(a.style[mxConstants.STYLE_STARTSIZE]= -a.style[mxConstants.STYLE_ENDSIZE])})),b.push(wa(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(c,b,f,d,e){c=(a.shape.getStartArrowWidth()-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(d.x+b*(e+a.shape.strokewidth*a.view.scale)+f*c/2,d.y+f*(e+a.shape.strokewidth*a.view.scale)-b*c/2)},function(b,f,d,e,k,g,p){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,k.x, -k.y,g.x,g.y));f=mxUtils.ptLineDist(e.x,e.y,e.x+d,e.y-f,g.x,g.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(f-a.shape.strokewidth)/3)/100/a.view.scale;a.style.startWidth=Math.max(0,Math.round(2*b)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(p.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE],a.style.endWidth=a.style.startWidth);mxEvent.isAltDown(p.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))< -c/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(a.style.startWidth)-parseFloat(a.style.endWidth))<c&&(a.style.startWidth=a.style.endWidth))})));mxUtils.getValue(a.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(b.push(wa(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(c,b,f,d,e){c=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/ -5)*a.view.scale;return new mxPoint(d.x+b*(e+a.shape.strokewidth*a.view.scale)-f*c/2,d.y+f*(e+a.shape.strokewidth*a.view.scale)+b*c/2)},function(b,f,d,e,k,g,p){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,k.x,k.y,g.x,g.y));f=mxUtils.ptLineDist(e.x,e.y,e.x+d,e.y-f,g.x,g.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(f-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*b)/a.view.scale;mxEvent.isControlDown(p.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]); -mxEvent.isAltDown(p.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<c/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE])})),b.push(wa(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(c,b,f,d,e){c=(a.shape.getEndArrowWidth()-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(d.x+ -b*(e+a.shape.strokewidth*a.view.scale)-f*c/2,d.y+f*(e+a.shape.strokewidth*a.view.scale)+b*c/2)},function(b,f,d,e,k,g,p){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,k.x,k.y,g.x,g.y));f=mxUtils.ptLineDist(e.x,e.y,e.x+d,e.y-f,g.x,g.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(f-a.shape.strokewidth)/3)/100/a.view.scale;a.style.endWidth=Math.max(0,Math.round(2*b)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(p.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE], -a.style.startWidth=a.style.endWidth);mxEvent.isAltDown(p.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<c/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(a.style.endWidth)-parseFloat(a.style.startWidth))<c&&(a.style.endWidth=a.style.startWidth))})));return b},swimlane:function(a){var c=[U(a,[mxConstants.STYLE_STARTSIZE],function(c){var b=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE, -mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(a.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(c.getCenterX(),c.y+Math.max(0,Math.min(c.height,b))):new mxPoint(c.x+Math.max(0,Math.min(c.width,b)),c.getCenterY())},function(c,b){a.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(c.height,b.y-c.y))):Math.round(Math.max(0,Math.min(c.width,b.x-c.x)))})];if(mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED)){var b= -parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));c.push(sa(a,b/2))}return c},label:Da(),ext:Da(),rectangle:Da(),triangle:Da(),rhombus:Da(),umlLifeline:function(a){return[U(a,["size"],function(a){var c=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",B.prototype.size))));return new mxPoint(a.getCenterX(),a.y+c)},function(a,c){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))},!1)]},umlFrame:function(a){return[U(a, -["width","height"],function(a){var c=Math.max(J.prototype.corner,Math.min(a.width,mxUtils.getValue(this.state.style,"width",J.prototype.width))),b=Math.max(1.5*J.prototype.corner,Math.min(a.height,mxUtils.getValue(this.state.style,"height",J.prototype.height)));return new mxPoint(a.x+c,a.y+b)},function(a,c){this.state.style.width=Math.round(Math.max(J.prototype.corner,Math.min(a.width,c.x-a.x)));this.state.style.height=Math.round(Math.max(1.5*J.prototype.corner,Math.min(a.height,c.y-a.y)))},!1)]}, -process:function(a){var c=[U(a,["size"],function(a){var c=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style,"size",g.prototype.size))));return new mxPoint(a.x+a.width*c,a.y+a.height/4)},function(a,c){this.state.style.size=Math.max(0,Math.min(.5,(c.x-a.x)/a.width))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(sa(a));return c},cross:function(a){return[U(a,["size"],function(a){var c=Math.min(a.width,a.height),c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style, -"size",ia.prototype.size)))*c/2;return new mxPoint(a.getCenterX()-c,a.getCenterY()-c)},function(a,c){var b=Math.min(a.width,a.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,a.getCenterY()-c.y)/b*2,Math.max(0,a.getCenterX()-c.x)/b*2)))})]},note:function(a){return[U(a,["size"],function(a){var c=Math.max(0,Math.min(a.width,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",l.prototype.size)))));return new mxPoint(a.x+a.width-c,a.y+c)},function(a,c){this.state.style.size= -Math.round(Math.max(0,Math.min(Math.min(a.width,a.x+a.width-c.x),Math.min(a.height,c.y-a.y))))})]},manualInput:function(a){var c=[U(a,["size"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",ga.prototype.size)));return new mxPoint(a.x+a.width/4,a.y+3*c/4)},function(a,c){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,4*(c.y-a.y)/3)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(sa(a));return c},dataStorage:function(a){return[U(a, -["size"],function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",N.prototype.size))));return new mxPoint(a.x+(1-c)*a.width,a.getCenterY())},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(a.x+a.width-c.x)/a.width))})]},callout:function(a){var c=[U(a,["size","position"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",z.prototype.size))),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",z.prototype.position))); -mxUtils.getValue(this.state.style,"base",z.prototype.base);return new mxPoint(a.x+b*a.width,a.y+a.height-c)},function(a,c){mxUtils.getValue(this.state.style,"base",z.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(a.height,a.y+a.height-c.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(c.x-a.x)/a.width)))/100}),U(a,["position2"],function(a){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",z.prototype.position2)));return new mxPoint(a.x+ -c*a.width,a.y+a.height)},function(a,c){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(c.x-a.x)/a.width)))/100}),U(a,["base"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",z.prototype.size))),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",z.prototype.position))),f=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"base",z.prototype.base)));return new mxPoint(a.x+Math.min(a.width,b*a.width+f),a.y+a.height- -c)},function(a,c){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",z.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(a.width,c.x-a.x-b*a.width)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(sa(a));return c},internalStorage:function(a){var c=[U(a,["dx","dy"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",Q.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy", -Q.prototype.dy)));return new mxPoint(a.x+c,a.y+b)},function(a,c){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,c.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(sa(a));return c},corner:function(a){return[U(a,["dx","dy"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",X.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy", -X.prototype.dy)));return new mxPoint(a.x+c,a.y+b)},function(a,c){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,c.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))})]},tee:function(a){return[U(a,["dx","dy"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",da.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",da.prototype.dy)));return new mxPoint(a.x+(a.width+c)/2,a.y+b)},function(a,c){this.state.style.dx= -Math.round(Math.max(0,2*Math.min(a.width/2,c.x-a.x-a.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))})]},singleArrow:ua(1),doubleArrow:ua(.5),folder:function(a){return[U(a,["tabWidth","tabHeight"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"tabWidth",r.prototype.tabWidth))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"tabHeight",r.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",r.prototype.tabPosition)== -mxConstants.ALIGN_RIGHT&&(c=a.width-c);return new mxPoint(a.x+c,a.y+b)},function(a,c){var b=Math.max(0,Math.min(a.width,c.x-a.x));mxUtils.getValue(this.state.style,"tabPosition",r.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(b=a.width-b);this.state.style.tabWidth=Math.round(b);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))})]},document:function(a){return[U(a,["size"],function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",A.prototype.size)))); -return new mxPoint(a.x+3*a.width/4,a.y+(1-c)*a.height)},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-c.y)/a.height))})]},tape:function(a){return[U(a,["size"],function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",y.prototype.size))));return new mxPoint(a.getCenterX(),a.y+c*a.height/2)},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(c.y-a.y)/a.height*2))})]},offPageConnector:function(a){return[U(a,["size"],function(a){var c= -Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",T.prototype.size))));return new mxPoint(a.getCenterX(),a.y+(1-c)*a.height)},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-c.y)/a.height))})]},step:Ga(t.prototype.size,!0,null,!0,t.prototype.fixedSize),hexagon:Ga(F.prototype.size,!0,.5,!0),curlyBracket:Ga(k.prototype.size,!1),display:Ga(ca.prototype.size,!1),cube:Fa(1,a.prototype.size,!1),card:Fa(.5,u.prototype.size,!0),loopLimit:Fa(.5,L.prototype.size, -!0),trapezoid:Ma(.5),parallelogram:Ma(1)};Graph.createHandle=U;Graph.handleFactory=Ha;mxVertexHandler.prototype.createCustomHandles=function(){if(1==this.state.view.graph.getSelectionCount()&&this.graph.isCellRotatable(this.state.cell)){var a=this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_RECTANGLE);a=Ha[a];null==a&&null!=this.state.shape&&this.state.shape.isRoundable()&&(a=Ha[mxConstants.SHAPE_RECTANGLE]);if(null!=a)return a(this.state)}return null}; -mxEdgeHandler.prototype.createCustomHandles=function(){if(1==this.state.view.graph.getSelectionCount()){var a=this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_CONNECTOR);a=Ha[a];if(null!=a)return a(this.state)}return null}}else Graph.createHandle=function(){},Graph.handleFactory={};var Ia=new mxPoint(1,0),Ja=new mxPoint(1,0),ua=mxUtils.toRadians(-30),Ia=mxUtils.getRotatedPoint(Ia,Math.cos(ua),Math.sin(ua)),ua=mxUtils.toRadians(-150), -Ja=mxUtils.getRotatedPoint(Ja,Math.cos(ua),Math.sin(ua));mxEdgeStyle.IsometricConnector=function(a,c,b,f,d){var e=a.view;f=null!=f&&0<f.length?f[0]:null;var k=a.absolutePoints,g=k[0],k=k[k.length-1];null!=f&&(f=e.transformControlPoint(a,f));null==g&&null!=c&&(g=new mxPoint(c.getCenterX(),c.getCenterY()));null==k&&null!=b&&(k=new mxPoint(b.getCenterX(),b.getCenterY()));var p=Ia.x,n=Ia.y,q=Ja.x,t=Ja.y,l="horizontal"==mxUtils.getValue(a.style,"elbow","horizontal");if(null!=k&&null!=g){a=function(a,c, -b){a-=x.x;var f=c-x.y;c=(t*a-q*f)/(p*t-n*q);a=(n*a-p*f)/(n*q-p*t);l?(b&&(x=new mxPoint(x.x+p*c,x.y+n*c),d.push(x)),x=new mxPoint(x.x+q*a,x.y+t*a)):(b&&(x=new mxPoint(x.x+q*a,x.y+t*a),d.push(x)),x=new mxPoint(x.x+p*c,x.y+n*c));d.push(x)};var x=g;null==f&&(f=new mxPoint(g.x+(k.x-g.x)/2,g.y+(k.y-g.y)/2));a(f.x,f.y,!0);a(k.x,k.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Na=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(a,c){if(c== -mxEdgeStyle.IsometricConnector){var b=new mxElbowEdgeHandler(a);b.snapToTerminals=!1;return b}return Na.apply(this,arguments)};b.prototype.constraints=[];e.prototype.getConstraints=function(a,c,b){a=[];var f=Math.tan(mxUtils.toRadians(30)),d=(.5-f)/2,f=Math.min(c,b/(.5+f));c=(c-f)/2;b=(b-f)/2;a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,b+.25*f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c+.5*f,b+f*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c+f, -b+.25*f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c+f,b+.75*f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c+.5*f,b+(1-d)*f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,b+.75*f));return a};z.prototype.getConstraints=function(a,c,b){a=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var f=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position", -this.position));var d=c*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,c,.5*(b-f)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,b-f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,b-f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(b-f)));c>=2*f&&a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return a};mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5, -0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)]; -mxEllipse.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints= -mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;v.prototype.constraints=mxRectangleShape.prototype.constraints;l.prototype.getConstraints=function(a,c,b){a=[];var f=Math.max(0,Math.min(c,Math.min(b,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*(c-f),0));a.push(new mxConnectionConstraint(new mxPoint(0,0), -!1,null,c-f,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-.5*f,.5*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(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));c>=2*f&&a.push(new mxConnectionConstraint(new mxPoint(.5, -0),!1));return a};u.prototype.getConstraints=function(a,c,b){a=[];var f=Math.max(0,Math.min(c,Math.min(b,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*(c+f),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*f,.5*f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,f));a.push(new mxConnectionConstraint(new mxPoint(0, -0),!1,null,0,.5*(b+f)));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));c>=2*f&&a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return a};a.prototype.getConstraints=function(a,c,b){a=[];var f=Math.max(0,Math.min(c,Math.min(b,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*(c-f),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-f,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-.5*f,.5*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(1,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+f),b));a.push(new mxConnectionConstraint(new mxPoint(0, -0),!1,null,f,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*f,b-.5*f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,b-f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(b-f)));return a};r.prototype.getConstraints=function(a,c,b){a=[];var f=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth)))),d=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*f,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,d)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+f),d))):(a.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-.5*f,0)),a.push(new mxConnectionConstraint(new mxPoint(0, -0),!1,null,c-f,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-f,d)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-f),d)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.25*(b-d)+d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.5*(b-d)+d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.75*(b-d)+d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1, -null,c,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(b-d)+d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(b-d)+d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.75*(b-d)+d));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};Q.prototype.constraints=mxRectangleShape.prototype.constraints;N.prototype.constraints=mxRectangleShape.prototype.constraints;ea.prototype.constraints=mxEllipse.prototype.constraints;fa.prototype.constraints=mxEllipse.prototype.constraints;I.prototype.constraints=mxEllipse.prototype.constraints;xa.prototype.constraints=mxEllipse.prototype.constraints;ga.prototype.constraints=mxRectangleShape.prototype.constraints;ya.prototype.constraints=mxRectangleShape.prototype.constraints;ca.prototype.getConstraints= -function(a,c,b){a=[];var f=Math.min(c,b/2),d=Math.min(c-f,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*c);a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+c-f),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-f,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));a.push(new mxConnectionConstraint(new mxPoint(0, -0),!1,null,c-f,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+c-f),b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,b));return a};L.prototype.constraints=mxRectangleShape.prototype.constraints;T.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)];C.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5, -0),!1),new mxConnectionConstraint(new mxPoint(.75,.1),!1),new mxConnectionConstraint(new mxPoint(0,1/3),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1,1),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1)];E.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0, -.3),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxActor.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.25,.2),!1),new mxConnectionConstraint(new mxPoint(.1, -.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.75,.25),!1),new mxConnectionConstraint(new mxPoint(.9,.5),!1),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];m.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1, -0),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];y.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1, -.5),!1),new mxConnectionConstraint(new mxPoint(1,.65),!1),new mxConnectionConstraint(new mxPoint(.25,1),!1),new mxConnectionConstraint(new mxPoint(.75,0),!1)];t.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(0, -.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];O.prototype.constraints= -[new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];mxDoubleEllipse.prototype.constraints=mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5, -1),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0)];mxHexagon.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.375,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.625,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1, -.75),!0),new mxConnectionConstraint(new mxPoint(.375,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.625,1),!0)];mxCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.25),!1),new mxConnectionConstraint(new mxPoint(.4,.1),!1),new mxConnectionConstraint(new mxPoint(.16,.55),!1),new mxConnectionConstraint(new mxPoint(.07,.4),!1),new mxConnectionConstraint(new mxPoint(.31,.8),!1),new mxConnectionConstraint(new mxPoint(.13,.77),!1),new mxConnectionConstraint(new mxPoint(.8, -.8),!1),new mxConnectionConstraint(new mxPoint(.55,.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];c.prototype.constraints=mxRectangleShape.prototype.constraints;f.prototype.constraints=mxRectangleShape.prototype.constraints;A.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5, -0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;da.prototype.getConstraints=function(a,c,b){a=[];var f=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style, -"dx",this.dx)))),d=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*c+.25*f,d));a.push(new mxConnectionConstraint(new mxPoint(0, -0),!1,null,.5*(c+f),d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+f),.5*(b+d)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+f),b));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-f),b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-f),.5*(b+d)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-f),d));a.push(new mxConnectionConstraint(new mxPoint(0, -0),!1,null,.25*c-.25*f,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*d));return a};X.prototype.getConstraints=function(a,c,b){a=[];var f=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),d=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1, -0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+f),d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,.5*(b+d)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*f,b));a.push(new mxConnectionConstraint(new mxPoint(0, -.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));return a};ma.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1, -1),!1)];R.prototype.getConstraints=function(a,c,b){a=[];var f=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize)))),f=(b-f)/2;a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-d),f));a.push(new mxConnectionConstraint(new mxPoint(0, -0),!1,null,c-d,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-d,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-d),b-f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,b-f));return a};ha.prototype.getConstraints=function(a,c,b){a=[];var f=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",R.prototype.arrowWidth)))),d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style, -"arrowSize",R.prototype.arrowSize)))),f=(b-f)/2;a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-d,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-d,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,b-f));a.push(new mxConnectionConstraint(new mxPoint(0, -0),!1,null,d,b));return a};ia.prototype.getConstraints=function(a,c,b){a=[];var f=Math.min(b,c),d=Math.max(0,Math.min(f,f*parseFloat(mxUtils.getValue(this.style,"size",this.size)))),f=(b-d)/2,e=f+d,k=(c-d)/2,d=k+d;a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,k,.5*f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,k,0));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,0));a.push(new mxConnectionConstraint(new mxPoint(0, -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,k,b-.5*f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,k,b));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,b-.5*f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e));a.push(new mxConnectionConstraint(new mxPoint(0, -0),!1,null,.5*(c+d),f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,f));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+d),e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,k,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*k,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,f));a.push(new mxConnectionConstraint(new mxPoint(0, -.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*k,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,k,f));return a};B.prototype.constraints=null;H.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)];ba.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)];pa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1, -.5),!1)];W.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})();function Actions(a){this.editorUi=a;this.actions={};this.init()} -Actions.prototype.init=function(){function a(a){d.escape();var b=d.getDeletableCells(d.getSelectionCells());if(null!=b&&0<b.length){var e=d.selectParentAfterDelete?d.model.getParents(b):null;d.removeCells(b,a);if(null!=e){a=[];for(b=0;b<e.length;b++)d.model.contains(e[b])&&(d.model.isVertex(e[b])||d.model.isEdge(e[b]))&&a.push(e[b]);d.setSelectionCells(a)}}}var b=this.editorUi,e=b.editor,d=e.graph,l=function(){return Action.prototype.isEnabled.apply(this,arguments)&&d.isEnabled()};this.addAction("new...", +[a,c,f])))};mxCellRenderer.registerShape("filledEdge",oa);"undefined"!==typeof StyleFormatPanel&&function(){var a=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var c=this.format.getSelectionState(),b=a.apply(this,arguments);"umlFrame"==c.style.shape&&b.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"#ffffff"});return b}}();mxMarker.addMarker("dash",function(a,c,b,f,d,e,g,l,p,n){var q=d*(g+p+1),t=e*(g+p+1);return function(){a.begin(); +a.moveTo(f.x-q/2-t/2,f.y-t/2+q/2);a.lineTo(f.x+t/2-3*q/2,f.y-3*t/2-q/2);a.stroke()}});mxMarker.addMarker("cross",function(a,c,f,b,d,e,g,l,p,n){var q=d*(g+p+1),t=e*(g+p+1);return function(){a.begin();a.moveTo(b.x-q/2-t/2,b.y-t/2+q/2);a.lineTo(b.x+t/2-3*q/2,b.y-3*t/2-q/2);a.moveTo(b.x-q/2+t/2,b.y-t/2-q/2);a.lineTo(b.x-t/2-3*q/2,b.y-3*t/2+q/2);a.stroke()}});mxMarker.addMarker("circle",Ca);mxMarker.addMarker("circlePlus",function(a,c,b,f,d,e,g,l,p,n){var q=f.clone(),t=Ca.apply(this,arguments),v=d*(g+ +2*p),x=e*(g+2*p);return function(){t.apply(this,arguments);a.begin();a.moveTo(q.x-d*p,q.y-e*p);a.lineTo(q.x-2*v+d*p,q.y-2*x+e*p);a.moveTo(q.x-v-x+e*p,q.y-x+v-d*p);a.lineTo(q.x+x-v-e*p,q.y-x-v+d*p);a.stroke()}});mxMarker.addMarker("halfCircle",function(a,c,b,f,d,e,g,l,p,n){var q=d*(g+p+1),t=e*(g+p+1),v=f.clone();f.x-=q;f.y-=t;return function(){a.begin();a.moveTo(v.x-t,v.y+q);a.quadTo(f.x-t,f.y+q,f.x,f.y);a.quadTo(f.x+t,f.y-q,v.x+t,v.y-q);a.stroke()}});mxMarker.addMarker("async",function(a,c,f,b,d, +e,g,l,p,n){c=d*p*1.118;f=e*p*1.118;d*=g+p;e*=g+p;var q=b.clone();q.x-=c;q.y-=f;b.x+=1*-d-c;b.y+=1*-e-f;return function(){a.begin();a.moveTo(q.x,q.y);l?a.lineTo(q.x-d-e/2,q.y-e+d/2):a.lineTo(q.x+e/2-d,q.y-e-d/2);a.lineTo(q.x-d,q.y-e);a.close();n?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync",function(a){a=null!=a?a:2;return function(c,f,b,d,e,g,l,p,n,q){e*=l+n;g*=l+n;var t=d.clone();return function(){c.begin();c.moveTo(t.x,t.y);p?c.lineTo(t.x-e-g/a,t.y-g+e/a):c.lineTo(t.x+g/a-e,t.y- +g-e/a);c.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Fa=function(a,c,f){return wa(a,["width"],c,function(c,b,d,e,g){g=a.shape.getEdgeWidth()*a.view.scale+f;return new mxPoint(e.x+b*c/4+d*g/2,e.y+d*c/4-b*g/2)},function(c,b,d,e,g,l){c=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,l.x,l.y));a.style.width=Math.round(2*c)/a.view.scale-f})},wa=function(a,c,f,b,d){return U(a,c,function(c){var d=a.absolutePoints,e=d.length-1;c=a.view.translate;var g=a.view.scale,l=f?d[0]:d[e],d=f?d[1]:d[e- +1],e=d.x-l.x,p=d.y-l.y,n=Math.sqrt(e*e+p*p),l=b.call(this,n,e/n,p/n,l,d);return new mxPoint(l.x/g-c.x,l.y/g-c.y)},function(c,b,e){var g=a.absolutePoints,l=g.length-1;c=a.view.translate;var p=a.view.scale,n=f?g[0]:g[l],g=f?g[1]:g[l-1],l=g.x-n.x,q=g.y-n.y,t=Math.sqrt(l*l+q*q);b.x=(b.x+c.x)*p;b.y=(b.y+c.y)*p;d.call(this,t,l/t,q/t,n,g,b,e)})},ua=function(a){return function(c){return[U(c,["arrowWidth","arrowSize"],function(c){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",R.prototype.arrowWidth))), +f=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",R.prototype.arrowSize)));return new mxPoint(c.x+(1-f)*c.width,c.y+(1-b)*c.height/2)},function(c,b){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(c.y+c.height/2-b.y)/c.height*2));this.state.style.arrowSize=Math.max(0,Math.min(a,(c.x+c.width-b.x)/c.width))})]}},La=function(a,c,b){return function(f){var d=[U(f,["size"],function(b){var f=Math.max(0,Math.min(b.width,Math.min(b.height,parseFloat(mxUtils.getValue(this.state.style, +"size",c)))))*a;return new mxPoint(b.x+f,b.y+f)},function(c,b){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(c.width,b.x-c.x),Math.min(c.height,b.y-c.y)))/a)})];b&&mxUtils.getValue(f.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(sa(f));return d}},Da=function(a,c,b,f,d){b=null!=b?b:1;return function(e){var g=[U(e,["size"],function(c){var b=null!=d?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,f=parseFloat(mxUtils.getValue(this.state.style,"size",b?d:a));return new mxPoint(c.x+ +Math.max(0,Math.min(c.width,f*(b?1:c.width))),c.getCenterY())},function(a,c,f){var g=null!=d?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null;a=g?c.x-a.x:Math.max(0,Math.min(b,(c.x-a.x)/a.width));g&&!mxEvent.isAltDown(f.getEvent())&&(a=e.view.graph.snap(a));this.state.style.size=a},null,f)];c&&mxUtils.getValue(e.style,mxConstants.STYLE_ROUNDED,!1)&&g.push(sa(e));return g}},Ma=function(a){return function(c){var b=[U(c,["size"],function(c){var b=Math.max(0,Math.min(a,parseFloat(mxUtils.getValue(this.state.style, +"size",f.prototype.size))));return new mxPoint(c.x+b*c.width*.75,c.y+c.height/4)},function(c,b){this.state.style.size=Math.max(0,Math.min(a,(b.x-c.x)/(.75*c.width)))},null,!0)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(sa(c));return b}},Ea=function(){return function(a){var c=[];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(sa(a));return c}},sa=function(a,c){return U(a,[mxConstants.STYLE_ARCSIZE],function(b){var f=null!=c?c:b.height/8;if("1"==mxUtils.getValue(a.style, +mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var d=mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(b.x+b.width-Math.min(b.width/2,d),b.y+f)}d=Math.max(0,parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(b.x+b.width-Math.min(Math.max(b.width/2,b.height/2),Math.min(b.width,b.height)*d),b.y+f)},function(c,b,f){"1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)? +this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(c.width,2*(c.x+c.width-b.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(c.width-b.x+c.x)/Math.min(c.width,c.height))))})},U=function(a,c,b,f,d,e){var g=new mxHandle(a,null,mxVertexHandler.prototype.secondaryHandleImage);g.execute=function(){for(var a=0;a<c.length;a++)this.copyStyle(c[a])};g.getPosition=b;g.setPosition=f;g.ignoreGrid=null!=d?d:!0;if(e){var l=g.positionChanged;g.positionChanged= +function(){l.apply(this,arguments);a.view.invalidate(this.state.cell);a.view.validate()}}return g},Ga={link:function(a){return[Fa(a,!0,10),Fa(a,!1,10)]},flexArrow:function(a){var c=a.view.graph.gridSize/a.view.scale,b=[];mxUtils.getValue(a.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(b.push(wa(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(c,b,f,d,e){c=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style, +mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(d.x+b*(e+a.shape.strokewidth*a.view.scale)+f*c/2,d.y+f*(e+a.shape.strokewidth*a.view.scale)-b*c/2)},function(b,f,d,e,g,l,p){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,l.x,l.y));f=mxUtils.ptLineDist(e.x,e.y,e.x+d,e.y-f,l.x,l.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(f-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*b)/a.view.scale;mxEvent.isControlDown(p.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]= +a.style[mxConstants.STYLE_STARTSIZE]);mxEvent.isAltDown(p.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<c/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE])})),b.push(wa(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(c,b,f,d,e){c=(a.shape.getStartArrowWidth()-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/ +5)*a.view.scale;return new mxPoint(d.x+b*(e+a.shape.strokewidth*a.view.scale)+f*c/2,d.y+f*(e+a.shape.strokewidth*a.view.scale)-b*c/2)},function(b,f,d,e,g,l,p){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,l.x,l.y));f=mxUtils.ptLineDist(e.x,e.y,e.x+d,e.y-f,l.x,l.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(f-a.shape.strokewidth)/3)/100/a.view.scale;a.style.startWidth=Math.max(0,Math.round(2*b)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(p.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]= +a.style[mxConstants.STYLE_STARTSIZE],a.style.endWidth=a.style.startWidth);mxEvent.isAltDown(p.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<c/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(a.style.startWidth)-parseFloat(a.style.endWidth))<c&&(a.style.startWidth=a.style.endWidth))})));mxUtils.getValue(a.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(b.push(wa(a, +["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(c,b,f,d,e){c=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(d.x+b*(e+a.shape.strokewidth*a.view.scale)-f*c/2,d.y+f*(e+a.shape.strokewidth*a.view.scale)+b*c/2)},function(b,f,d,e,g,l,p){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,l.x,l.y));f=mxUtils.ptLineDist(e.x,e.y,e.x+d,e.y-f,l.x,l.y);a.style[mxConstants.STYLE_ENDSIZE]= +Math.round(100*(f-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*b)/a.view.scale;mxEvent.isControlDown(p.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]);mxEvent.isAltDown(p.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<c/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE])})),b.push(wa(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE], +!1,function(c,b,f,d,e){c=(a.shape.getEndArrowWidth()-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(d.x+b*(e+a.shape.strokewidth*a.view.scale)-f*c/2,d.y+f*(e+a.shape.strokewidth*a.view.scale)+b*c/2)},function(b,f,d,e,g,l,p){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,l.x,l.y));f=mxUtils.ptLineDist(e.x,e.y,e.x+d,e.y-f,l.x,l.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(f-a.shape.strokewidth)/ +3)/100/a.view.scale;a.style.endWidth=Math.max(0,Math.round(2*b)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(p.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE],a.style.startWidth=a.style.endWidth);mxEvent.isAltDown(p.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<c/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(a.style.endWidth)- +parseFloat(a.style.startWidth))<c&&(a.style.endWidth=a.style.startWidth))})));return b},swimlane:function(a){var c=[U(a,[mxConstants.STYLE_STARTSIZE],function(c){var b=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(a.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(c.getCenterX(),c.y+Math.max(0,Math.min(c.height,b))):new mxPoint(c.x+Math.max(0,Math.min(c.width,b)),c.getCenterY())},function(c,b){a.style[mxConstants.STYLE_STARTSIZE]= +1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(c.height,b.y-c.y))):Math.round(Math.max(0,Math.min(c.width,b.x-c.x)))})];if(mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED)){var b=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));c.push(sa(a,b/2))}return c},label:Ea(),ext:Ea(),rectangle:Ea(),triangle:Ea(),rhombus:Ea(),umlLifeline:function(a){return[U(a,["size"],function(a){var c=Math.max(0,Math.min(a.height, +parseFloat(mxUtils.getValue(this.state.style,"size",B.prototype.size))));return new mxPoint(a.getCenterX(),a.y+c)},function(a,c){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))},!1)]},umlFrame:function(a){return[U(a,["width","height"],function(a){var c=Math.max(J.prototype.corner,Math.min(a.width,mxUtils.getValue(this.state.style,"width",J.prototype.width))),b=Math.max(1.5*J.prototype.corner,Math.min(a.height,mxUtils.getValue(this.state.style,"height",J.prototype.height))); +return new mxPoint(a.x+c,a.y+b)},function(a,c){this.state.style.width=Math.round(Math.max(J.prototype.corner,Math.min(a.width,c.x-a.x)));this.state.style.height=Math.round(Math.max(1.5*J.prototype.corner,Math.min(a.height,c.y-a.y)))},!1)]},process:function(a){var c=[U(a,["size"],function(a){var c=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style,"size",l.prototype.size))));return new mxPoint(a.x+a.width*c,a.y+a.height/4)},function(a,c){this.state.style.size=Math.max(0,Math.min(.5, +(c.x-a.x)/a.width))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(sa(a));return c},cross:function(a){return[U(a,["size"],function(a){var c=Math.min(a.width,a.height),c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",ja.prototype.size)))*c/2;return new mxPoint(a.getCenterX()-c,a.getCenterY()-c)},function(a,c){var b=Math.min(a.width,a.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,a.getCenterY()-c.y)/b*2,Math.max(0,a.getCenterX()-c.x)/b*2)))})]}, +note:function(a){return[U(a,["size"],function(a){var c=Math.max(0,Math.min(a.width,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",k.prototype.size)))));return new mxPoint(a.x+a.width-c,a.y+c)},function(a,c){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(a.width,a.x+a.width-c.x),Math.min(a.height,c.y-a.y))))})]},manualInput:function(a){var c=[U(a,["size"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",ha.prototype.size))); +return new mxPoint(a.x+a.width/4,a.y+3*c/4)},function(a,c){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,4*(c.y-a.y)/3)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(sa(a));return c},dataStorage:function(a){return[U(a,["size"],function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",N.prototype.size))));return new mxPoint(a.x+(1-c)*a.width,a.getCenterY())},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(a.x+a.width- +c.x)/a.width))})]},callout:function(a){var c=[U(a,["size","position"],function(a){var c=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-c)},function(a,c){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-c.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(c.x-a.x)/a.width)))/100}),U(a,["position2"],function(a){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",A.prototype.position2)));return new mxPoint(a.x+c*a.width,a.y+a.height)},function(a,c){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(c.x-a.x)/a.width)))/100}),U(a,["base"],function(a){var c=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))),f=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+f),a.y+a.height-c)},function(a,c){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,c.x-a.x-b*a.width)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED, +!1)&&c.push(sa(a));return c},internalStorage:function(a){var c=[U(a,["dx","dy"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",Q.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",Q.prototype.dy)));return new mxPoint(a.x+c,a.y+b)},function(a,c){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,c.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED, +!1)&&c.push(sa(a));return c},corner:function(a){return[U(a,["dx","dy"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",W.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",W.prototype.dy)));return new mxPoint(a.x+c,a.y+b)},function(a,c){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,c.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))})]},tee:function(a){return[U(a,["dx","dy"],function(a){var c= +Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",da.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",da.prototype.dy)));return new mxPoint(a.x+(a.width+c)/2,a.y+b)},function(a,c){this.state.style.dx=Math.round(Math.max(0,2*Math.min(a.width/2,c.x-a.x-a.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))})]},singleArrow:ua(1),doubleArrow:ua(.5),folder:function(a){return[U(a,["tabWidth","tabHeight"],function(a){var c= +Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"tabWidth",r.prototype.tabWidth))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"tabHeight",r.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",r.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(c=a.width-c);return new mxPoint(a.x+c,a.y+b)},function(a,c){var b=Math.max(0,Math.min(a.width,c.x-a.x));mxUtils.getValue(this.state.style,"tabPosition",r.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&& +(b=a.width-b);this.state.style.tabWidth=Math.round(b);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))})]},document:function(a){return[U(a,["size"],function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",z.prototype.size))));return new mxPoint(a.x+3*a.width/4,a.y+(1-c)*a.height)},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-c.y)/a.height))})]},tape:function(a){return[U(a,["size"],function(a){var c=Math.max(0, +Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",y.prototype.size))));return new mxPoint(a.getCenterX(),a.y+c*a.height/2)},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(c.y-a.y)/a.height*2))})]},offPageConnector:function(a){return[U(a,["size"],function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",T.prototype.size))));return new mxPoint(a.getCenterX(),a.y+(1-c)*a.height)},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(a.y+ +a.height-c.y)/a.height))})]},step:Da(t.prototype.size,!0,null,!0,t.prototype.fixedSize),hexagon:Da(E.prototype.size,!0,.5,!0),curlyBracket:Da(g.prototype.size,!1),display:Da(ca.prototype.size,!1),cube:La(1,a.prototype.size,!1),card:La(.5,u.prototype.size,!0),loopLimit:La(.5,L.prototype.size,!0),trapezoid:Ma(.5),parallelogram:Ma(1)};Graph.createHandle=U;Graph.handleFactory=Ga;mxVertexHandler.prototype.createCustomHandles=function(){if(1==this.state.view.graph.getSelectionCount()&&this.graph.isCellRotatable(this.state.cell)){var a= +this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_RECTANGLE);a=Ga[a];null==a&&null!=this.state.shape&&this.state.shape.isRoundable()&&(a=Ga[mxConstants.SHAPE_RECTANGLE]);if(null!=a)return a(this.state)}return null};mxEdgeHandler.prototype.createCustomHandles=function(){if(1==this.state.view.graph.getSelectionCount()){var a=this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a= +mxConstants.SHAPE_CONNECTOR);a=Ga[a];if(null!=a)return a(this.state)}return null}}else Graph.createHandle=function(){},Graph.handleFactory={};var Ha=new mxPoint(1,0),Ia=new mxPoint(1,0),ua=mxUtils.toRadians(-30),Ha=mxUtils.getRotatedPoint(Ha,Math.cos(ua),Math.sin(ua)),ua=mxUtils.toRadians(-150),Ia=mxUtils.getRotatedPoint(Ia,Math.cos(ua),Math.sin(ua));mxEdgeStyle.IsometricConnector=function(a,c,b,f,d){var e=a.view;f=null!=f&&0<f.length?f[0]:null;var g=a.absolutePoints,l=g[0],g=g[g.length-1];null!= +f&&(f=e.transformControlPoint(a,f));null==l&&null!=c&&(l=new mxPoint(c.getCenterX(),c.getCenterY()));null==g&&null!=b&&(g=new mxPoint(b.getCenterX(),b.getCenterY()));var p=Ha.x,n=Ha.y,q=Ia.x,t=Ia.y,v="horizontal"==mxUtils.getValue(a.style,"elbow","horizontal");if(null!=g&&null!=l){a=function(a,c,b){a-=x.x;var f=c-x.y;c=(t*a-q*f)/(p*t-n*q);a=(n*a-p*f)/(n*q-p*t);v?(b&&(x=new mxPoint(x.x+p*c,x.y+n*c),d.push(x)),x=new mxPoint(x.x+q*a,x.y+t*a)):(b&&(x=new mxPoint(x.x+q*a,x.y+t*a),d.push(x)),x=new mxPoint(x.x+ +p*c,x.y+n*c));d.push(x)};var x=l;null==f&&(f=new mxPoint(l.x+(g.x-l.x)/2,l.y+(g.y-l.y)/2));a(f.x,f.y,!0);a(g.x,g.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Na=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(a,c){if(c==mxEdgeStyle.IsometricConnector){var b=new mxElbowEdgeHandler(a);b.snapToTerminals=!1;return b}return Na.apply(this,arguments)};b.prototype.constraints=[];e.prototype.getConstraints=function(a,c,b){a=[];var f= +Math.tan(mxUtils.toRadians(30)),d=(.5-f)/2,f=Math.min(c,b/(.5+f));c=(c-f)/2;b=(b-f)/2;a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,b+.25*f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c+.5*f,b+f*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c+f,b+.25*f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c+f,b+.75*f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c+.5*f,b+(1-d)*f));a.push(new mxConnectionConstraint(new mxPoint(0, +0),!1,null,c,b+.75*f));return a};A.prototype.getConstraints=function(a,c,b){a=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var f=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var d=c*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,c,.5*(b-f)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,b-f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0, +b-f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(b-f)));c>=2*f&&a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return a};mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1, +.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxEllipse.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(.5, +0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;v.prototype.constraints=mxRectangleShape.prototype.constraints;k.prototype.getConstraints=function(a,c,b){a=[];var f=Math.max(0,Math.min(c, +Math.min(b,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*(c-f),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-f,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-.5*f,.5*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(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));c>=2*f&&a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return a};u.prototype.getConstraints=function(a,c,b){a=[];var f=Math.max(0,Math.min(c,Math.min(b,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*(c+f),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*f,.5*f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(b+f)));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));c>=2*f&&a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return a};a.prototype.getConstraints=function(a,c,b){a=[];var f=Math.max(0,Math.min(c,Math.min(b,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*(c-f),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-f,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-.5*f,.5*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(1,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+f),b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*f,b-.5*f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,b-f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(b-f)));return a}; +r.prototype.getConstraints=function(a,c,b){a=[];var f=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth)))),d=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*f,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,0)),a.push(new mxConnectionConstraint(new mxPoint(0, +0),!1,null,f,d)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+f),d))):(a.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-.5*f,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-f,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-f,d)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-f),d)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,d));a.push(new mxConnectionConstraint(new mxPoint(0, +0),!1,null,c,.25*(b-d)+d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.5*(b-d)+d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.75*(b-d)+d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(b-d)+d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(b-d)+d));a.push(new mxConnectionConstraint(new mxPoint(0, +0),!1,null,0,.75*(b-d)+d));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};Q.prototype.constraints=mxRectangleShape.prototype.constraints;N.prototype.constraints=mxRectangleShape.prototype.constraints;ea.prototype.constraints=mxEllipse.prototype.constraints;fa.prototype.constraints=mxEllipse.prototype.constraints; +I.prototype.constraints=mxEllipse.prototype.constraints;xa.prototype.constraints=mxEllipse.prototype.constraints;ha.prototype.constraints=mxRectangleShape.prototype.constraints;ya.prototype.constraints=mxRectangleShape.prototype.constraints;ca.prototype.getConstraints=function(a,c,b){a=[];var f=Math.min(c,b/2),d=Math.min(c-f,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*c);a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));a.push(new mxConnectionConstraint(new mxPoint(0, +0),!1,null,d,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+c-f),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-f,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-f,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+c-f),b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,b));return a};L.prototype.constraints=mxRectangleShape.prototype.constraints;T.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)];C.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75,.1),!1),new mxConnectionConstraint(new mxPoint(0,1/3),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1, +1),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1)];F.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25, +1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxActor.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.25,.2),!1),new mxConnectionConstraint(new mxPoint(.1,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.75,.25),!1),new mxConnectionConstraint(new mxPoint(.9,.5),!1),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25, +1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];m.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1, +1),!1)];y.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,.65),!1),new mxConnectionConstraint(new mxPoint(.25,1),!1),new mxConnectionConstraint(new mxPoint(.75,0),!1)];t.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0), +!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1, +.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];P.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];mxDoubleEllipse.prototype.constraints=mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints= +[new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0)];mxHexagon.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.375,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.625,0),!0),new mxConnectionConstraint(new mxPoint(0, +.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.375,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.625,1),!0)];mxCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.25),!1),new mxConnectionConstraint(new mxPoint(.4, +.1),!1),new mxConnectionConstraint(new mxPoint(.16,.55),!1),new mxConnectionConstraint(new mxPoint(.07,.4),!1),new mxConnectionConstraint(new mxPoint(.31,.8),!1),new mxConnectionConstraint(new mxPoint(.13,.77),!1),new mxConnectionConstraint(new mxPoint(.8,.8),!1),new mxConnectionConstraint(new mxPoint(.55,.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88, +.25),!1)];c.prototype.constraints=mxRectangleShape.prototype.constraints;f.prototype.constraints=mxRectangleShape.prototype.constraints;z.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25), +!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;da.prototype.getConstraints=function(a,c,b){a=[];var f=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),d=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1, +0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*c+.25*f,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+f),d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+f),.5*(b+d)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+f),b));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0, +0),!1,null,.5*(c-f),b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-f),.5*(b+d)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-f),d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*c-.25*f,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*d));return a};W.prototype.getConstraints=function(a,c,b){a=[];var f=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style, +"dx",this.dx)))),d=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+f),d));a.push(new mxConnectionConstraint(new mxPoint(0, +0),!1,null,f,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,.5*(b+d)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*f,b));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));return a};ma.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0, +1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];R.prototype.getConstraints=function(a,c,b){a=[];var f=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style, +"arrowSize",this.arrowSize)))),f=(b-f)/2;a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-d),f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-d,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-d,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-d),b-f));a.push(new mxConnectionConstraint(new mxPoint(0, +0),!1,null,0,b-f));return a};ia.prototype.getConstraints=function(a,c,b){a=[];var f=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",R.prototype.arrowWidth)))),d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",R.prototype.arrowSize)))),f=(b-f)/2;a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,f));a.push(new mxConnectionConstraint(new mxPoint(0, +0),!1,null,c-d,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-d,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,b-f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,b));return a};ja.prototype.getConstraints=function(a,c,b){a=[];var f=Math.min(b,c),d=Math.max(0,Math.min(f,f*parseFloat(mxUtils.getValue(this.style,"size",this.size)))),f=(b-d)/2,e=f+d,g=(c-d)/2,d=g+d;a.push(new mxConnectionConstraint(new mxPoint(0, +0),!1,null,g,.5*f));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,d,0));a.push(new mxConnectionConstraint(new mxPoint(0,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,g,b-.5*f));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,d,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,b-.5*f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+d),f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,f));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,e));a.push(new mxConnectionConstraint(new mxPoint(0, +0),!1,null,.5*(c+d),e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*g,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,f));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*g,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,f));return a};B.prototype.constraints= +null;G.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)];ba.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)];pa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];V.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})();function Actions(a){this.editorUi=a;this.actions={};this.init()} +Actions.prototype.init=function(){function a(a){d.escape();var b=d.getDeletableCells(d.getSelectionCells());if(null!=b&&0<b.length){var e=d.selectParentAfterDelete?d.model.getParents(b):null;d.removeCells(b,a);if(null!=e){a=[];for(b=0;b<e.length;b++)d.model.contains(e[b])&&(d.model.isVertex(e[b])||d.model.isEdge(e[b]))&&a.push(e[b]);d.setSelectionCells(a)}}}var b=this.editorUi,e=b.editor,d=e.graph,k=function(){return Action.prototype.isEnabled.apply(this,arguments)&&d.isEnabled()};this.addAction("new...", function(){d.openLink(b.getUrl())});this.addAction("open...",function(){window.openNew=!0;window.openKey="open";b.openFile()});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){b.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(a,b){try{var d=mxUtils.parseXml(a);e.graph.setSelectionCells(e.graph.importGraphModel(d.documentElement))}catch(c){mxUtils.alert(mxResources.get("invalidOrMissingFile")+ -": "+c.message)}}));b.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=null})}).isEnabled=l;this.addAction("save",function(){b.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=l;this.addAction("saveAs...",function(){b.saveFile(!0)},null,null,Editor.ctrlKey+"+Shift+S").isEnabled=l;this.addAction("export...",function(){b.showDialog((new ExportDialog(b)).container,300,230,!0,!0)});this.addAction("editDiagram...",function(){var a=new EditDiagramDialog(b);b.showDialog(a.container, -620,420,!0,!1);a.init()});this.addAction("pageSetup...",function(){b.showDialog((new PageSetupDialog(b)).container,320,220,!0,!0)}).isEnabled=l;this.addAction("print...",function(){b.showDialog((new PrintDialog(b)).container,300,180,!0,!0)},null,"sprite-print",Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(d,null,10,10)});this.addAction("undo",function(){b.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){b.redo()},null,"sprite-redo",mxClient.IS_WIN? +": "+c.message)}}));b.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=null})}).isEnabled=k;this.addAction("save",function(){b.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=k;this.addAction("saveAs...",function(){b.saveFile(!0)},null,null,Editor.ctrlKey+"+Shift+S").isEnabled=k;this.addAction("export...",function(){b.showDialog((new ExportDialog(b)).container,300,260,!0,!0)});this.addAction("editDiagram...",function(){var a=new EditDiagramDialog(b);b.showDialog(a.container, +620,420,!0,!1);a.init()});this.addAction("pageSetup...",function(){b.showDialog((new PageSetupDialog(b)).container,320,220,!0,!0)}).isEnabled=k;this.addAction("print...",function(){b.showDialog((new PrintDialog(b)).container,300,180,!0,!0)},null,"sprite-print",Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(d,null,10,10)});this.addAction("undo",function(){b.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){b.redo()},null,"sprite-redo",mxClient.IS_WIN? Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){mxClipboard.cut(d)},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){mxClipboard.copy(d)},null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&mxClipboard.paste(d)},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(a){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){d.getModel().beginUpdate(); -try{var b=mxClipboard.paste(d);if(null!=b){a=!0;for(var e=0;e<b.length&&a;e++)a=a&&d.model.isEdge(b[e]);var c=d.view.translate,f=d.view.scale,k=c.x,q=c.y,c=null;if(1==b.length&&a){var n=d.getCellGeometry(b[0]);null!=n&&(c=n.getTerminalPoint(!0))}c=null!=c?c:d.getBoundingBoxFromGeometry(b,a);if(null!=c){var g=Math.round(d.snap(d.popupMenuHandler.triggerX/f-k)),x=Math.round(d.snap(d.popupMenuHandler.triggerY/f-q));d.cellsMoved(b,g-c.x,x-c.y)}}}finally{d.getModel().endUpdate()}}});this.addAction("copySize", -function(a){a=d.getSelectionCell();d.isEnabled()&&null!=a&&d.getModel().isVertex(a)&&(a=d.getCellGeometry(a),null!=a&&(b.copiedSize=new mxRectangle(a.x,a.y,a.width,a.height)))},null,null,"Alt+Shit+X");this.addAction("pasteSize",function(a){if(d.isEnabled()&&!d.isSelectionEmpty()&&null!=b.copiedSize){d.getModel().beginUpdate();try{var e=d.getSelectionCells();for(a=0;a<e.length;a++)if(d.getModel().isVertex(e[a])){var l=d.getCellGeometry(e[a]);null!=l&&(l=l.clone(),l.width=b.copiedSize.width,l.height= -b.copiedSize.height,d.getModel().setGeometry(e[a],l))}}finally{d.getModel().endUpdate()}}},null,null,"Alt+Shit+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(){d.setSelectionCells(d.duplicateCells())},null,null,Editor.ctrlKey+"+D");this.put("turn",new Action(mxResources.get("turn")+" / "+mxResources.get("reverse"),function(){d.turnShapes(d.getSelectionCells())}, +try{var b=mxClipboard.paste(d);if(null!=b){a=!0;for(var e=0;e<b.length&&a;e++)a=a&&d.model.isEdge(b[e]);var c=d.view.translate,f=d.view.scale,g=c.x,q=c.y,c=null;if(1==b.length&&a){var n=d.getCellGeometry(b[0]);null!=n&&(c=n.getTerminalPoint(!0))}c=null!=c?c:d.getBoundingBoxFromGeometry(b,a);if(null!=c){var l=Math.round(d.snap(d.popupMenuHandler.triggerX/f-g)),x=Math.round(d.snap(d.popupMenuHandler.triggerY/f-q));d.cellsMoved(b,l-c.x,x-c.y)}}}finally{d.getModel().endUpdate()}}});this.addAction("copySize", +function(a){a=d.getSelectionCell();d.isEnabled()&&null!=a&&d.getModel().isVertex(a)&&(a=d.getCellGeometry(a),null!=a&&(b.copiedSize=new mxRectangle(a.x,a.y,a.width,a.height)))},null,null,"Alt+Shit+X");this.addAction("pasteSize",function(a){if(d.isEnabled()&&!d.isSelectionEmpty()&&null!=b.copiedSize){d.getModel().beginUpdate();try{var e=d.getSelectionCells();for(a=0;a<e.length;a++)if(d.getModel().isVertex(e[a])){var k=d.getCellGeometry(e[a]);null!=k&&(k=k.clone(),k.width=b.copiedSize.width,k.height= +b.copiedSize.height,d.getModel().setGeometry(e[a],k))}}finally{d.getModel().endUpdate()}}},null,null,"Alt+Shit+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(){d.setSelectionCells(d.duplicateCells())},null,null,Editor.ctrlKey+"+D");this.put("turn",new Action(mxResources.get("turn")+" / "+mxResources.get("reverse"),function(){d.turnShapes(d.getSelectionCells())}, null,null,Editor.ctrlKey+"+R"));this.addAction("selectVertices",function(){d.selectVertices()},null,null,Editor.ctrlKey+"+Shift+I");this.addAction("selectEdges",function(){d.selectEdges()},null,null,Editor.ctrlKey+"+Shift+E");this.addAction("selectAll",function(){d.selectAll(null,!0)},null,null,Editor.ctrlKey+"+A");this.addAction("selectNone",function(){d.clearSelection()},null,null,Editor.ctrlKey+"+Shift+A");this.addAction("lockUnlock",function(){if(!d.isSelectionEmpty()){d.getModel().beginUpdate(); try{var a=d.isCellMovable(d.getSelectionCell())?1:0;d.toggleCellStyles(mxConstants.STYLE_MOVABLE,a);d.toggleCellStyles(mxConstants.STYLE_RESIZABLE,a);d.toggleCellStyles(mxConstants.STYLE_ROTATABLE,a);d.toggleCellStyles(mxConstants.STYLE_DELETABLE,a);d.toggleCellStyles(mxConstants.STYLE_EDITABLE,a);d.toggleCellStyles("connectable",a)}finally{d.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+L");this.addAction("home",function(){d.home()},null,null,"Home");this.addAction("exitGroup",function(){d.exitGroup()}, null,null,Editor.ctrlKey+"+Shift+Home");this.addAction("enterGroup",function(){d.enterGroup()},null,null,Editor.ctrlKey+"+Shift+End");this.addAction("collapse",function(){d.foldCells(!0)},null,null,Editor.ctrlKey+"+Home");this.addAction("expand",function(){d.foldCells(!1)},null,null,Editor.ctrlKey+"+End");this.addAction("toFront",function(){d.orderCells(!1)},null,null,Editor.ctrlKey+"+Shift+F");this.addAction("toBack",function(){d.orderCells(!0)},null,null,Editor.ctrlKey+"+Shift+B");this.addAction("group", function(){1==d.getSelectionCount()?d.setCellStyles("container","1"):d.setSelectionCell(d.groupCells(null,0))},null,null,Editor.ctrlKey+"+G");this.addAction("ungroup",function(){1==d.getSelectionCount()&&0==d.getModel().getChildCount(d.getSelectionCell())?d.setCellStyles("container","0"):d.setSelectionCells(d.ungroupCells())},null,null,Editor.ctrlKey+"+Shift+U");this.addAction("removeFromGroup",function(){d.removeCellsFromParent()});this.addAction("edit",function(){d.isEnabled()&&d.startEditingAtCell()}, null,null,"F2/Enter");this.addAction("editData...",function(){var a=d.getSelectionCell()||d.getModel().getRoot();b.showDataDialog(a)},null,null,Editor.ctrlKey+"+M");this.addAction("editTooltip...",function(){var a=b.editor.graph;if(a.isEnabled()&&!a.isSelectionEmpty()){var d=a.getSelectionCell(),e="";if(mxUtils.isNode(d.value)){var c=d.value.getAttribute("tooltip");null!=c&&(e=c)}e=new TextareaDialog(b,mxResources.get("editTooltip")+":",e,function(c){a.setTooltipForCell(d,c)});b.showDialog(e.container, 320,200,!0,!0);e.init()}},null,null,"Alt+Shift+T");this.addAction("openLink",function(){var a=d.getLinkForCell(d.getSelectionCell());null!=a&&d.openLink(a)});this.addAction("editLink...",function(){var a=b.editor.graph;if(a.isEnabled()&&!a.isSelectionEmpty()){var d=a.getSelectionCell(),e=a.getLinkForCell(d)||"";b.showLinkDialog(e,mxResources.get("apply"),function(c){c=mxUtils.trim(c);a.setLinkForCell(d,0<c.length?c:null)})}},null,null,"Alt+Shift+L");this.put("insertImage",new Action(mxResources.get("image")+ -"...",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&(d.clearSelection(),b.actions.get("image").funct())})).isEnabled=l;this.put("insertLink",new Action(mxResources.get("link")+"...",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&b.showLinkDialog("",mxResources.get("insert"),function(a,b){a=mxUtils.trim(a);if(0<a.length){var e=null,c=d.getLinkTitle(a);null!=b&&0<b.length&&(e=b[0].iconUrl,c=b[0].name||b[0].type,c=c.charAt(0).toUpperCase()+c.substring(1),30<c.length&& +"...",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&(d.clearSelection(),b.actions.get("image").funct())})).isEnabled=k;this.put("insertLink",new Action(mxResources.get("link")+"...",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&b.showLinkDialog("",mxResources.get("insert"),function(a,b){a=mxUtils.trim(a);if(0<a.length){var e=null,c=d.getLinkTitle(a);null!=b&&0<b.length&&(e=b[0].iconUrl,c=b[0].name||b[0].type,c=c.charAt(0).toUpperCase()+c.substring(1),30<c.length&& (c=c.substring(0,30)+"..."));var f=d.getFreeInsertPoint(),e=new mxCell(c,new mxGeometry(f.x,f.y,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=e?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+e:"spacing=10;"));e.vertex=!0;d.setLinkForCell(e,a);d.cellSizeUpdated(e,!0);d.getModel().beginUpdate();try{e=d.addCell(e),d.fireEvent(new mxEventObject("cellsInserted","cells",[e]))}finally{d.getModel().endUpdate()}d.setSelectionCell(e);d.scrollCellToVisible(d.getSelectionCell())}})})).isEnabled= -l;this.addAction("link...",mxUtils.bind(this,function(){var a=b.editor.graph;if(a.isEnabled())if(a.cellEditor.isContentEditing()){var d=a.getSelectedElement(),e=a.getParentByName(d,"A",a.cellEditor.textarea),c="";if(null==e&&null!=d&&null!=d.getElementsByTagName)for(var f=d.getElementsByTagName("a"),k=0;k<f.length&&null==e;k++)f[k].textContent==d.textContent&&(e=f[k]);null!=e&&"A"==e.nodeName&&(c=e.getAttribute("href")||"",a.selectNode(e));var q=a.cellEditor.saveSelection();b.showLinkDialog(c,mxResources.get("apply"), -mxUtils.bind(this,function(c){a.cellEditor.restoreSelection(q);null!=c&&a.insertLink(c)}))}else a.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=l;this.addAction("autosize",function(){var a=d.getSelectionCells();if(null!=a){d.getModel().beginUpdate();try{for(var b=0;b<a.length;b++){var e=a[b];if(d.getModel().getChildCount(e))d.updateGroupBounds([e],20);else{var c=d.view.getState(e),f=d.getCellGeometry(e);d.getModel().isVertex(e)&&null!=c&&null!=c.text&& -null!=f&&d.isWrapping(e)?(f=f.clone(),f.height=c.text.boundingBox.height/d.view.scale,d.getModel().setGeometry(e,f)):d.updateCellSize(e)}}}finally{d.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("formattedText",function(){var a=d.getView().getState(d.getSelectionCell());if(null!=a){var e="1";d.stopEditing();d.getModel().beginUpdate();try{if("1"==a.style.html){var e=null,l=d.convertValueToString(a.cell);"0"!=mxUtils.getValue(a.style,"nl2Br","1")&&(l=l.replace(/\n/g, -"").replace(/<br\s*.?>/g,"\n"));var c=document.createElement("div");c.innerHTML=l;l=mxUtils.extractTextWithWhitespace(c.childNodes);d.cellLabelChanged(a.cell,l)}else l=mxUtils.htmlEntities(d.convertValueToString(a.cell),!1),"0"!=mxUtils.getValue(a.style,"nl2Br","1")&&(l=l.replace(/\n/g,"<br/>")),d.cellLabelChanged(a.cell,d.sanitizeHtml(l));d.setCellStyles("html",e);b.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=e?e:"0"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}}}); +k;this.addAction("link...",mxUtils.bind(this,function(){var a=b.editor.graph;if(a.isEnabled())if(a.cellEditor.isContentEditing()){var d=a.getSelectedElement(),e=a.getParentByName(d,"A",a.cellEditor.textarea),c="";if(null==e&&null!=d&&null!=d.getElementsByTagName)for(var f=d.getElementsByTagName("a"),g=0;g<f.length&&null==e;g++)f[g].textContent==d.textContent&&(e=f[g]);null!=e&&"A"==e.nodeName&&(c=e.getAttribute("href")||"",a.selectNode(e));var q=a.cellEditor.saveSelection();b.showLinkDialog(c,mxResources.get("apply"), +mxUtils.bind(this,function(c){a.cellEditor.restoreSelection(q);null!=c&&a.insertLink(c)}))}else a.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=k;this.addAction("autosize",function(){var a=d.getSelectionCells();if(null!=a){d.getModel().beginUpdate();try{for(var b=0;b<a.length;b++){var e=a[b];if(d.getModel().getChildCount(e))d.updateGroupBounds([e],20);else{var c=d.view.getState(e),f=d.getCellGeometry(e);d.getModel().isVertex(e)&&null!=c&&null!=c.text&& +null!=f&&d.isWrapping(e)?(f=f.clone(),f.height=c.text.boundingBox.height/d.view.scale,d.getModel().setGeometry(e,f)):d.updateCellSize(e)}}}finally{d.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("formattedText",function(){var a=d.getView().getState(d.getSelectionCell());if(null!=a){var e="1";d.stopEditing();d.getModel().beginUpdate();try{if("1"==a.style.html){var e=null,k=d.convertValueToString(a.cell);"0"!=mxUtils.getValue(a.style,"nl2Br","1")&&(k=k.replace(/\n/g, +"").replace(/<br\s*.?>/g,"\n"));var c=document.createElement("div");c.innerHTML=k;k=mxUtils.extractTextWithWhitespace(c.childNodes);d.cellLabelChanged(a.cell,k)}else k=mxUtils.htmlEntities(d.convertValueToString(a.cell),!1),"0"!=mxUtils.getValue(a.style,"nl2Br","1")&&(k=k.replace(/\n/g,"<br/>")),d.cellLabelChanged(a.cell,d.sanitizeHtml(k));d.setCellStyles("html",e);b.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=e?e:"0"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}}}); this.addAction("wordWrap",function(){var a=d.getView().getState(d.getSelectionCell()),b="wrap";d.stopEditing();null!=a&&"wrap"==a.style[mxConstants.STYLE_WHITE_SPACE]&&(b=null);d.setCellStyles(mxConstants.STYLE_WHITE_SPACE,b)});this.addAction("rotation",function(){var a="0",e=d.getView().getState(d.getSelectionCell());null!=e&&(a=e.style[mxConstants.STYLE_ROTATION]||a);a=new FilenameDialog(b,a,mxResources.get("apply"),function(a){null!=a&&0<a.length&&d.setCellStyles(mxConstants.STYLE_ROTATION,a)}, mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");b.showDialog(a.container,375,80,!0,!0);a.init()});this.addAction("resetView",function(){d.zoomTo(1);b.resetScrollbars()},null,null,Editor.ctrlKey+"+H");this.addAction("zoomIn",function(a){d.zoomIn()},null,null,Editor.ctrlKey+" + (Numpad) / Alt+Mousewheel");this.addAction("zoomOut",function(a){d.zoomOut()},null,null,Editor.ctrlKey+" - (Numpad) / Alt+Mousewheel");this.addAction("fitWindow",function(){d.fit()},null,null,Editor.ctrlKey+ "+Shift+H");this.addAction("fitPage",mxUtils.bind(this,function(){d.pageVisible||this.get("pageView").funct();var a=d.pageFormat,b=d.pageScale;d.zoomTo(Math.floor(20*Math.min((d.container.clientWidth-10)/a.width/b,(d.container.clientHeight-10)/a.height/b))/20);mxUtils.hasScrollbars(d.container)&&(a=d.getPagePadding(),d.container.scrollTop=a.y*d.view.scale-1,d.container.scrollLeft=Math.min(a.x*d.view.scale,(d.container.scrollWidth-d.container.clientWidth)/2)-1)}),null,null,Editor.ctrlKey+"+J");this.addAction("fitTwoPages", @@ -2673,9 +2678,9 @@ this.addAction("fitPageWidth",mxUtils.bind(this,function(){d.pageVisible||this.g d.getView().getScale()),mxResources.get("apply"),mxUtils.bind(this,function(a){a=parseInt(a);!isNaN(a)&&0<a&&d.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*d.pageScale),mxResources.get("apply"),mxUtils.bind(this,function(a){a=parseInt(a);!isNaN(a)&&0<a&&b.setPageScale(a/100)}),mxResources.get("pageScale")+ " (%)");this.editorUi.showDialog(a.container,300,80,!0,!0);a.init()}));var m=null,m=this.addAction("grid",function(){d.setGridEnabled(!d.isGridEnabled());b.fireEvent(new mxEventObject("gridEnabledChanged"))},null,null,Editor.ctrlKey+"+Shift+G");m.setToggleAction(!0);m.setSelectedCallback(function(){return d.isGridEnabled()});m.setEnabled(!1);m=this.addAction("guides",function(){d.graphHandler.guidesEnabled=!d.graphHandler.guidesEnabled;b.fireEvent(new mxEventObject("guidesEnabledChanged"))});m.setToggleAction(!0); m.setSelectedCallback(function(){return d.graphHandler.guidesEnabled});m.setEnabled(!1);m=this.addAction("tooltips",function(){d.tooltipHandler.setEnabled(!d.tooltipHandler.isEnabled())});m.setToggleAction(!0);m.setSelectedCallback(function(){return d.tooltipHandler.isEnabled()});m=this.addAction("collapseExpand",function(){var a=new ChangePageSetup(b);a.ignoreColor=!0;a.ignoreImage=!0;a.foldingEnabled=!d.foldingEnabled;d.model.execute(a)});m.setToggleAction(!0);m.setSelectedCallback(function(){return d.foldingEnabled}); -m.isEnabled=l;m=this.addAction("scrollbars",function(){b.setScrollbars(!b.hasScrollbars())});m.setToggleAction(!0);m.setSelectedCallback(function(){return d.scrollbars});m=this.addAction("pageView",mxUtils.bind(this,function(){b.setPageVisible(!d.pageVisible)}));m.setToggleAction(!0);m.setSelectedCallback(function(){return d.pageVisible});m=this.addAction("connectionArrows",function(){d.connectionArrowsEnabled=!d.connectionArrowsEnabled;b.fireEvent(new mxEventObject("connectionArrowsChanged"))},null, +m.isEnabled=k;m=this.addAction("scrollbars",function(){b.setScrollbars(!b.hasScrollbars())});m.setToggleAction(!0);m.setSelectedCallback(function(){return d.scrollbars});m=this.addAction("pageView",mxUtils.bind(this,function(){b.setPageVisible(!d.pageVisible)}));m.setToggleAction(!0);m.setSelectedCallback(function(){return d.pageVisible});m=this.addAction("connectionArrows",function(){d.connectionArrowsEnabled=!d.connectionArrowsEnabled;b.fireEvent(new mxEventObject("connectionArrowsChanged"))},null, null,"Alt+Shift+A");m.setToggleAction(!0);m.setSelectedCallback(function(){return d.connectionArrowsEnabled});m=this.addAction("connectionPoints",function(){d.setConnectable(!d.connectionHandler.isEnabled());b.fireEvent(new mxEventObject("connectionPointsChanged"))},null,null,"Alt+Shift+P");m.setToggleAction(!0);m.setSelectedCallback(function(){return d.connectionHandler.isEnabled()});m=this.addAction("copyConnect",function(){d.connectionHandler.setCreateTarget(!d.connectionHandler.isCreateTarget()); -b.fireEvent(new mxEventObject("copyConnectChanged"))});m.setToggleAction(!0);m.setSelectedCallback(function(){return d.connectionHandler.isCreateTarget()});m.isEnabled=l;m=this.addAction("autosave",function(){b.editor.setAutosave(!b.editor.autosave)});m.setToggleAction(!0);m.setSelectedCallback(function(){return b.editor.autosave});m.isEnabled=l;m.visible=!1;this.addAction("help",function(){var a="";mxResources.isLanguageSupported(mxClient.language)&&(a="_"+mxClient.language);d.openLink(RESOURCES_PATH+ +b.fireEvent(new mxEventObject("copyConnectChanged"))});m.setToggleAction(!0);m.setSelectedCallback(function(){return d.connectionHandler.isCreateTarget()});m.isEnabled=k;m=this.addAction("autosave",function(){b.editor.setAutosave(!b.editor.autosave)});m.setToggleAction(!0);m.setSelectedCallback(function(){return b.editor.autosave});m.isEnabled=k;m.visible=!1;this.addAction("help",function(){var a="";mxResources.isLanguageSupported(mxClient.language)&&(a="_"+mxClient.language);d.openLink(RESOURCES_PATH+ "/help"+a+".html")});var r=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){r||(b.showDialog((new AboutDialog(b)).container,320,280,!0,!0,function(){r=!1}),r=!0)},null,null,"F1"));m=mxUtils.bind(this,function(a,b,e,c){return this.addAction(a,function(){if(null!=e&&d.cellEditor.isContentEditing())e();else{d.stopEditing(!1);d.getModel().beginUpdate();try{d.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,b),(b&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD?d.updateLabelElements(d.getSelectionCells(), function(a){a.style.fontWeight=null;"B"==a.nodeName&&d.replaceElement(a)}):(b&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?d.updateLabelElements(d.getSelectionCells(),function(a){a.style.fontStyle=null;"I"==a.nodeName&&d.replaceElement(a)}):(b&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&d.updateLabelElements(d.getSelectionCells(),function(a){a.style.textDecoration=null;"U"==a.nodeName&&d.replaceElement(a)})}finally{d.getModel().endUpdate()}}},null,null,c)});m("bold",mxConstants.FONT_BOLD, function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");m("italic",mxConstants.FONT_ITALIC,function(){document.execCommand("italic",!1,null)},Editor.ctrlKey+"+I");m("underline",mxConstants.FONT_UNDERLINE,function(){document.execCommand("underline",!1,null)},Editor.ctrlKey+"+U");this.addAction("fontColor...",function(){b.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000")});this.addAction("strokeColor...",function(){b.menus.pickColor(mxConstants.STYLE_STROKECOLOR)});this.addAction("fillColor...", @@ -2683,44 +2688,44 @@ function(){b.menus.pickColor(mxConstants.STYLE_FILLCOLOR)});this.addAction("grad this.addAction("solid",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_DASHED,null),d.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",[null,null],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("dashed",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_DASHED,"1"),d.setCellStyles(mxConstants.STYLE_DASH_PATTERN, null),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1",null],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("dotted",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_DASHED,"1"),d.setCellStyles(mxConstants.STYLE_DASH_PATTERN,"1 4"),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1","1 4"], "cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("sharp",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),d.setCellStyles(mxConstants.STYLE_CURVED,"0"),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","0"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("rounded",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_ROUNDED, -"1"),d.setCellStyles(mxConstants.STYLE_CURVED,"0"),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["1","0"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("toggleRounded",function(){if(!d.isSelectionEmpty()&&d.isEnabled()){d.getModel().beginUpdate();try{var a=d.getSelectionCells(),e=d.view.getState(a[0]),l=null!=e?e.style:d.getCellStyle(a[0]),c="1"==mxUtils.getValue(l,mxConstants.STYLE_ROUNDED,"0")? +"1"),d.setCellStyles(mxConstants.STYLE_CURVED,"0"),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["1","0"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("toggleRounded",function(){if(!d.isSelectionEmpty()&&d.isEnabled()){d.getModel().beginUpdate();try{var a=d.getSelectionCells(),e=d.view.getState(a[0]),k=null!=e?e.style:d.getCellStyle(a[0]),c="1"==mxUtils.getValue(k,mxConstants.STYLE_ROUNDED,"0")? "0":"1";d.setCellStyles(mxConstants.STYLE_ROUNDED,c);d.setCellStyles(mxConstants.STYLE_CURVED,null);b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[c,"0"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}}});this.addAction("curved",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),d.setCellStyles(mxConstants.STYLE_CURVED,"1"),b.fireEvent(new mxEventObject("styleChanged","keys", [mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","1"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("collapsible",function(){var a=d.view.getState(d.getSelectionCell()),e="1";null!=a&&null!=d.getFoldingImage(a)&&(e="0");d.setCellStyles("collapsible",e);b.fireEvent(new mxEventObject("styleChanged","keys",["collapsible"],"values",[e],"cells",d.getSelectionCells()))});this.addAction("editStyle...",mxUtils.bind(this,function(){var a=d.getSelectionCells(); if(null!=a&&0<a.length){var b=d.getModel(),b=new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",b.getStyle(a[0])||"",function(b){null!=b&&d.setCellStyle(mxUtils.trim(b),a)},null,null,400,220);this.editorUi.showDialog(b.container,420,300,!0,!0);b.init()}}),null,null,Editor.ctrlKey+"+E");this.addAction("setAsDefaultStyle",function(){d.isEnabled()&&!d.isSelectionEmpty()&&b.setDefaultStyle(d.getSelectionCell())},null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function(){d.isEnabled()&& -b.clearDefaultStyle()},null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var a=d.getSelectionCell();if(null!=a&&d.getModel().isEdge(a)){var b=e.graph.selectionCellsHandler.getHandler(a);if(b instanceof mxEdgeHandler){for(var l=d.view.translate,c=d.view.scale,f=l.x,l=l.y,a=d.getModel().getParent(a),k=d.getCellGeometry(a);d.getModel().isVertex(a)&&null!=k;)f+=k.x,l+=k.y,a=d.getModel().getParent(a),k=d.getCellGeometry(a);f=Math.round(d.snap(d.popupMenuHandler.triggerX/c-f)); -c=Math.round(d.snap(d.popupMenuHandler.triggerY/c-l));b.addPointAt(b.state,f,c)}}});this.addAction("removeWaypoint",function(){var a=b.actions.get("removeWaypoint");null!=a.handler&&a.handler.removePoint(a.handler.state,a.index)});this.addAction("clearWaypoints",function(){var a=d.getSelectionCells();if(null!=a){a=d.addAllEdges(a);d.getModel().beginUpdate();try{for(var b=0;b<a.length;b++){var e=a[b];if(d.getModel().isEdge(e)){var c=d.getCellGeometry(e);null!=c&&(c=c.clone(),c.points=null,d.getModel().setGeometry(e, +b.clearDefaultStyle()},null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var a=d.getSelectionCell();if(null!=a&&d.getModel().isEdge(a)){var b=e.graph.selectionCellsHandler.getHandler(a);if(b instanceof mxEdgeHandler){for(var k=d.view.translate,c=d.view.scale,f=k.x,k=k.y,a=d.getModel().getParent(a),g=d.getCellGeometry(a);d.getModel().isVertex(a)&&null!=g;)f+=g.x,k+=g.y,a=d.getModel().getParent(a),g=d.getCellGeometry(a);f=Math.round(d.snap(d.popupMenuHandler.triggerX/c-f)); +c=Math.round(d.snap(d.popupMenuHandler.triggerY/c-k));b.addPointAt(b.state,f,c)}}});this.addAction("removeWaypoint",function(){var a=b.actions.get("removeWaypoint");null!=a.handler&&a.handler.removePoint(a.handler.state,a.index)});this.addAction("clearWaypoints",function(){var a=d.getSelectionCells();if(null!=a){a=d.addAllEdges(a);d.getModel().beginUpdate();try{for(var b=0;b<a.length;b++){var e=a[b];if(d.getModel().isEdge(e)){var c=d.getCellGeometry(e);null!=c&&(c=c.clone(),c.points=null,d.getModel().setGeometry(e, c))}}}finally{d.getModel().endUpdate()}}},null,null,"Alt+Shift+C");m=this.addAction("subscript",mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");m=this.addAction("superscript",mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");this.addAction("image...",function(){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){var a= -mxResources.get("image")+" ("+mxResources.get("url")+"):",e=d.getView().getState(d.getSelectionCell()),l="";null!=e&&(l=e.style[mxConstants.STYLE_IMAGE]||l);var c=d.cellEditor.saveSelection();b.showImageDialog(a,l,function(a,b,e){if(d.cellEditor.isContentEditing())d.cellEditor.restoreSelection(c),d.insertImage(a,b,e);else{var f=d.getSelectionCells();if(null!=a&&(0<a.length||0<f.length)){var k=null;d.getModel().beginUpdate();try{if(0==f.length){var q=d.getFreeInsertPoint(),k=f=[d.insertVertex(d.getDefaultParent(), -null,"",q.x,q.y,b,e,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];d.fireEvent(new mxEventObject("cellsInserted","cells",k))}d.setCellStyles(mxConstants.STYLE_IMAGE,0<a.length?a:null,f);var l=d.view.getState(f[0]),t=null!=l?l.style:d.getCellStyle(f[0]);"image"!=t[mxConstants.STYLE_SHAPE]&&"label"!=t[mxConstants.STYLE_SHAPE]?d.setCellStyles(mxConstants.STYLE_SHAPE,"image",f):0==a.length&&d.setCellStyles(mxConstants.STYLE_SHAPE,null,f);if(1==d.getSelectionCount()&& -null!=b&&null!=e){var m=f[0],v=d.getModel().getGeometry(m);null!=v&&(v=v.clone(),v.width=b,v.height=e,d.getModel().setGeometry(m,v))}}finally{d.getModel().endUpdate()}null!=k&&(d.setSelectionCells(k),d.scrollCellToVisible(k[0]))}}},d.cellEditor.isContentEditing(),!d.cellEditor.isContentEditing())}}).isEnabled=l;m=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(b,document.body.offsetWidth-280,120,220,180),this.layersWindow.window.addListener("show", +mxResources.get("image")+" ("+mxResources.get("url")+"):",e=d.getView().getState(d.getSelectionCell()),k="";null!=e&&(k=e.style[mxConstants.STYLE_IMAGE]||k);var c=d.cellEditor.saveSelection();b.showImageDialog(a,k,function(a,b,e){if(d.cellEditor.isContentEditing())d.cellEditor.restoreSelection(c),d.insertImage(a,b,e);else{var f=d.getSelectionCells();if(null!=a&&(0<a.length||0<f.length)){var g=null;d.getModel().beginUpdate();try{if(0==f.length){var q=d.getFreeInsertPoint(),g=f=[d.insertVertex(d.getDefaultParent(), +null,"",q.x,q.y,b,e,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];d.fireEvent(new mxEventObject("cellsInserted","cells",g))}d.setCellStyles(mxConstants.STYLE_IMAGE,0<a.length?a:null,f);var k=d.view.getState(f[0]),t=null!=k?k.style:d.getCellStyle(f[0]);"image"!=t[mxConstants.STYLE_SHAPE]&&"label"!=t[mxConstants.STYLE_SHAPE]?d.setCellStyles(mxConstants.STYLE_SHAPE,"image",f):0==a.length&&d.setCellStyles(mxConstants.STYLE_SHAPE,null,f);if(1==d.getSelectionCount()&& +null!=b&&null!=e){var m=f[0],v=d.getModel().getGeometry(m);null!=v&&(v=v.clone(),v.width=b,v.height=e,d.getModel().setGeometry(m,v))}}finally{d.getModel().endUpdate()}null!=g&&(d.setSelectionCells(g),d.scrollCellToVisible(g[0]))}}},d.cellEditor.isContentEditing(),!d.cellEditor.isContentEditing())}}).isEnabled=k;m=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(b,document.body.offsetWidth-280,120,220,180),this.layersWindow.window.addListener("show", function(){b.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.addListener("hide",function(){b.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),b.fireEvent(new mxEventObject("layers"))):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+L");m.setToggleAction(!0);m.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));m=this.addAction("formatPanel", mxUtils.bind(this,function(){b.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");m.setToggleAction(!0);m.setSelectedCallback(mxUtils.bind(this,function(){return 0<b.formatWidth}));m=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(b,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",function(){b.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.addListener("hide",function(){b.fireEvent(new mxEventObject("outline"))}), this.outlineWindow.window.setVisible(!0),b.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+O");m.setToggleAction(!0);m.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}))}; -Actions.prototype.addAction=function(a,b,e,d,l){var m;"..."==a.substring(a.length-3)?(a=a.substring(0,a.length-3),m=mxResources.get(a)+"..."):m=mxResources.get(a);return this.put(a,new Action(m,b,e,d,l))};Actions.prototype.put=function(a,b){return this.actions[a]=b};Actions.prototype.get=function(a){return this.actions[a]};function Action(a,b,e,d,l){mxEventSource.call(this);this.label=a;this.funct=this.createFunction(b);this.enabled=null!=e?e:!0;this.iconCls=d;this.shortcut=l;this.visible=!0} +Actions.prototype.addAction=function(a,b,e,d,k){var m;"..."==a.substring(a.length-3)?(a=a.substring(0,a.length-3),m=mxResources.get(a)+"..."):m=mxResources.get(a);return this.put(a,new Action(m,b,e,d,k))};Actions.prototype.put=function(a,b){return this.actions[a]=b};Actions.prototype.get=function(a){return this.actions[a]};function Action(a,b,e,d,k){mxEventSource.call(this);this.label=a;this.funct=this.createFunction(b);this.enabled=null!=e?e:!0;this.iconCls=d;this.shortcut=k;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()};DrawioFile=function(a,b){mxEventSource.call(this);this.ui=a;this.shadowData=this.data=b||"";this.shadowPages=null;this.stats={opened:0,merged:0,fileMerged:0,fileReloaded:0,conflicts:0,timeouts:0,saved:0,closed:0,destroyed:0,joined:0,checksumErrors:0,bytesSent:0,bytesReceived:0,msgSent:0,msgReceived:0,cacheHits:0,cacheMiss:0,cacheFail:0}};DrawioFile.SYNC=urlParams.sync||"auto";DrawioFile.LAST_WRITE_WINS=!0;mxUtils.extend(DrawioFile,mxEventSource);DrawioFile.prototype.allChangesSavedKey="allChangesSaved"; DrawioFile.prototype.autosaveDelay=1500;DrawioFile.prototype.maxAutosaveDelay=3E4;DrawioFile.prototype.autosaveThread=null;DrawioFile.prototype.lastAutosave=null;DrawioFile.prototype.lastSaved=null;DrawioFile.prototype.lastChanged=null;DrawioFile.prototype.opened=null;DrawioFile.prototype.modified=!1;DrawioFile.prototype.data=null;DrawioFile.prototype.shadowData=null;DrawioFile.prototype.shadowPages=null;DrawioFile.prototype.changeListenerEnabled=!0;DrawioFile.prototype.lastAutosaveRevision=null; DrawioFile.prototype.maxAutosaveRevisionDelay=3E5;DrawioFile.prototype.inConflictState=!1;DrawioFile.prototype.invalidChecksum=!1;DrawioFile.prototype.errorReportsEnabled=!1;DrawioFile.prototype.reportEnabled=!0;DrawioFile.prototype.ageStart=null;DrawioFile.prototype.getSize=function(){return null!=this.data?this.data.length:0}; DrawioFile.prototype.synchronizeFile=function(a,b){this.savingFile?null!=b&&b({message:mxResources.get("busy")}):null!=this.sync?this.sync.fileChanged(a,b):this.updateFile(a,b)}; -DrawioFile.prototype.updateFile=function(a,b,e,d){null!=e&&e()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=b&&b():this.getLatestVersion(mxUtils.bind(this,function(l){try{null!=e&&e()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=b&&b():null!=l?this.mergeFile(l,a,b,d):this.reloadFile(a,b))}catch(m){null!=b&&b(m)}}),b))}; -DrawioFile.prototype.mergeFile=function(a,b,e,d){var l=!0;try{this.stats.fileMerged++;var m=null!=this.shadowPages?this.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.shadowData).documentElement),r=this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement);if(null!=r&&0<r.length){this.shadowPages=r;this.backupPatch=this.isModified()?this.ui.diffPages(m,this.ui.pages):null;var u=[this.ui.diffPages(null!=d?d:m,this.shadowPages)];if(!this.ignorePatches(u)){var y=this.ui.patchPages(m, -u[0]);d={};var A=this.ui.getHashValueForPages(y,d),m={},c=this.ui.getHashValueForPages(this.shadowPages,m);"1"==urlParams.test&&EditorUi.debug("File.mergeFile",[this],"backup",this.backupPatch,"patches",u,"checksum",c==A,A);if(null!=A&&A!=c){var f=this.compressReportData(this.getAnonymizedXmlForPages(r)),k=this.compressReportData(this.getAnonymizedXmlForPages(y)),q=this.ui.hashValue(a.getCurrentEtag()),n=this.ui.hashValue(this.getCurrentEtag());this.checksumError(e,u,"Shadow Details: "+JSON.stringify(d)+ -"\nChecksum: "+A+"\nCurrent: "+c+"\nCurrent Details: "+JSON.stringify(m)+"\nFrom: "+q+"\nTo: "+n+"\n\nFile Data:\n"+f+"\nPatched Shadow:\n"+k,null,"mergeFile");return}this.patch(u,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw l=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(a.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=b&&b()}catch(z){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged(); -null!=e&&e(z);try{if(l)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,z);else{var g=this.getCurrentUser(),x=null!=g?g.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),x,z)}}catch(t){}}}; -DrawioFile.prototype.getAnonymizedXmlForPages=function(a){var b=new mxCodec(mxUtils.createXmlDocument()),e=b.document.createElement("mxfile");if(null!=a)for(var d=0;d<a.length;d++){var l=b.encode(new mxGraphModel(a[d].root));"1"!=urlParams.dev&&(l=this.ui.anonymizeNode(l,!0));l.setAttribute("id",a[d].getId());a[d].viewState&&this.ui.editor.graph.saveViewState(a[d].viewState,l,!0);e.appendChild(l)}return mxUtils.getPrettyXml(e)}; +DrawioFile.prototype.updateFile=function(a,b,e,d){null!=e&&e()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=b&&b():this.getLatestVersion(mxUtils.bind(this,function(k){try{null!=e&&e()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=b&&b():null!=k?this.mergeFile(k,a,b,d):this.reloadFile(a,b))}catch(m){null!=b&&b(m)}}),b))}; +DrawioFile.prototype.mergeFile=function(a,b,e,d){var k=!0;try{this.stats.fileMerged++;var m=null!=this.shadowPages?this.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.shadowData).documentElement),r=this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement);if(null!=r&&0<r.length){this.shadowPages=r;this.backupPatch=this.isModified()?this.ui.diffPages(m,this.ui.pages):null;var u=[this.ui.diffPages(null!=d?d:m,this.shadowPages)];if(!this.ignorePatches(u)){var y=this.ui.patchPages(m, +u[0]);d={};var z=this.ui.getHashValueForPages(y,d),m={},c=this.ui.getHashValueForPages(this.shadowPages,m);"1"==urlParams.test&&EditorUi.debug("File.mergeFile",[this],"backup",this.backupPatch,"patches",u,"checksum",c==z,z);if(null!=z&&z!=c){var f=this.compressReportData(this.getAnonymizedXmlForPages(r)),g=this.compressReportData(this.getAnonymizedXmlForPages(y)),q=this.ui.hashValue(a.getCurrentEtag()),n=this.ui.hashValue(this.getCurrentEtag());this.checksumError(e,u,"Shadow Details: "+JSON.stringify(d)+ +"\nChecksum: "+z+"\nCurrent: "+c+"\nCurrent Details: "+JSON.stringify(m)+"\nFrom: "+q+"\nTo: "+n+"\n\nFile Data:\n"+f+"\nPatched Shadow:\n"+g,null,"mergeFile");return}this.patch(u,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw k=!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(k)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,A);else{var l=this.getCurrentUser(),x=null!=l?l.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 d=0;d<a.length;d++){var k=b.encode(new mxGraphModel(a[d].root));"1"!=urlParams.dev&&(k=this.ui.anonymizeNode(k,!0));k.setAttribute("id",a[d].getId());a[d].viewState&&this.ui.editor.graph.saveViewState(a[d].viewState,k,!0);e.appendChild(k)}return mxUtils.getPrettyXml(e)}; DrawioFile.prototype.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,d,l){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 m=mxUtils.bind(this,function(a){var d=this.compressReportData(JSON.stringify(b,null,2));a=null!=a?this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement)), -25E3):"n/a";this.sendErrorReport("Checksum Error in "+l+" "+this.getHash(),(null!=e?e:"")+"\n\nPatches:\n"+d+(null!=a?"\n\nRemote:\n"+a:""),null,7E4)});null==d?m(null):this.getLatestVersion(mxUtils.bind(this,function(a){null!=a&&a.getCurrentEtag()==d?m(a):m(null)}),function(){})}else{var r=this.getCurrentUser(),u=null!=r?r.id:"unknown";EditorUi.logError("Checksum Error in "+l+" "+this.getId(),null,this.getMode()+"."+this.getId(),"user_"+u+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")); -try{EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+this.getHash(),action:l,label:"user_"+u+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")})}catch(y){}}}catch(y){}}; -DrawioFile.prototype.sendErrorReport=function(a,b,e,d){try{var l=this.compressReportData(this.getAnonymizedXmlForPages(this.shadowPages),25E3),m=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),r=this.getCurrentUser(),u=null!=r?this.ui.hashValue(r.id):"unknown",y=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",A=this.getTitle(),c=A.lastIndexOf("."),r="xml";0<c&&(r=A.substring(c));var f=null!=e?e.stack:Error().stack;EditorUi.sendReport(a+" "+(new Date).toISOString()+ +DrawioFile.prototype.checksumError=function(a,b,e,d,k){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 m=mxUtils.bind(this,function(a){var d=this.compressReportData(JSON.stringify(b,null,2));a=null!=a?this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement)), +25E3):"n/a";this.sendErrorReport("Checksum Error in "+k+" "+this.getHash(),(null!=e?e:"")+"\n\nPatches:\n"+d+(null!=a?"\n\nRemote:\n"+a:""),null,7E4)});null==d?m(null):this.getLatestVersion(mxUtils.bind(this,function(a){null!=a&&a.getCurrentEtag()==d?m(a):m(null)}),function(){})}else{var r=this.getCurrentUser(),u=null!=r?r.id:"unknown";EditorUi.logError("Checksum Error in "+k+" "+this.getId(),null,this.getMode()+"."+this.getId(),"user_"+u+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")); +try{EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+this.getHash(),action:k,label:"user_"+u+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")})}catch(y){}}}catch(y){}}; +DrawioFile.prototype.sendErrorReport=function(a,b,e,d){try{var k=this.compressReportData(this.getAnonymizedXmlForPages(this.shadowPages),25E3),m=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),r=this.getCurrentUser(),u=null!=r?this.ui.hashValue(r.id):"unknown",y=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",z=this.getTitle(),c=z.lastIndexOf("."),r="xml";0<c&&(r=z.substring(c));var f=null!=e?e.stack:Error().stack;EditorUi.sendReport(a+" "+(new Date).toISOString()+ ":\n\nBrowser="+navigator.userAgent+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+r+")\nUser="+u+y+"\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!=b?"\n\n"+b:"")+ -(null!=e?"\n\nError: "+e.message:"")+"\n\nStack:\n"+f+"\n\nShadow:\n"+l+"\n\nData:\n"+m,d)}catch(k){}}; +(null!=e?"\n\nError: "+e.message:"")+"\n\nStack:\n"+f+"\n\nShadow:\n"+k+"\n\nData:\n"+m,d)}catch(g){}}; DrawioFile.prototype.reloadFile=function(a,b){try{this.ui.spinner.stop();var e=mxUtils.bind(this,function(){this.stats.fileReloaded++;this.reportEnabled=!1;var b=this.ui.editor.graph.getViewState(),e=this.ui.editor.graph.getSelectionCells(),m=this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(m,b,e);null!=this.backupPatch&&this.patch([this.backupPatch]);var d=this.ui.getCurrentFile();null!=d&&(d.stats= this.stats);null!=a&&a()}}),!0)});this.isModified()&&null==this.backupPatch?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.handleFileSuccess("manual"==DrawioFile.SYNC)}),e,mxResources.get("cancel"),mxResources.get("discardChanges")):e()}catch(d){null!=b&&b(d)}};DrawioFile.prototype.copyFile=function(a,b){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))}; DrawioFile.prototype.ignorePatches=function(a){for(var b=!0,e=0;e<a.length&&b;e++)b=b&&0==Object.keys(a[e]).length;return b}; -DrawioFile.prototype.patch=function(a,b){var e=this.ui.editor.undoManager,d=e.history.slice(),l=e.indexOfNextAdd,m=this.ui.editor.graph;m.container.style.visibility="hidden";var r=this.changeListenerEnabled;this.changeListenerEnabled=!1;var u=m.foldingEnabled,y=m.mathEnabled,A=m.cellRenderer.redraw;m.cellRenderer.redraw=function(a){a.view.graph.isEditing(a.cell)&&(a.view.graph.scrollCellToVisible(a.cell),a.view.graph.cellEditor.resize());A.apply(this,arguments)};m.model.beginUpdate();try{for(var c= -0;c<a.length;c++)this.ui.pages=this.ui.patchPages(this.ui.pages,a[c],!0,b,this.isModified());0==this.ui.pages.length&&this.ui.pages.push(this.ui.createPage());0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{m.container.style.visibility="";m.model.endUpdate();m.cellRenderer.redraw=A;this.changeListenerEnabled=r;e.history=d;e.indexOfNextAdd=l;e.fireEvent(new mxEventObject(mxEvent.CLEAR));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)y!= +DrawioFile.prototype.patch=function(a,b){var e=this.ui.editor.undoManager,d=e.history.slice(),k=e.indexOfNextAdd,m=this.ui.editor.graph;m.container.style.visibility="hidden";var r=this.changeListenerEnabled;this.changeListenerEnabled=!1;var u=m.foldingEnabled,y=m.mathEnabled,z=m.cellRenderer.redraw;m.cellRenderer.redraw=function(a){a.view.graph.isEditing(a.cell)&&(a.view.graph.scrollCellToVisible(a.cell),a.view.graph.cellEditor.resize());z.apply(this,arguments)};m.model.beginUpdate();try{for(var c= +0;c<a.length;c++)this.ui.pages=this.ui.patchPages(this.ui.pages,a[c],!0,b,this.isModified());0==this.ui.pages.length&&this.ui.pages.push(this.ui.createPage());0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{m.container.style.visibility="";m.model.endUpdate();m.cellRenderer.redraw=z;this.changeListenerEnabled=r;e.history=d;e.indexOfNextAdd=k;e.fireEvent(new mxEventObject(mxEvent.CLEAR));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)y!= m.mathEnabled?(this.ui.editor.updateGraphComponents(),m.refresh()):(u!=m.foldingEnabled?m.view.revalidate():m.view.validate(),m.sizeDidChange());this.ui.updateTabContainer()}}; -DrawioFile.prototype.save=function(a,b,e,d,l,m){try{if(this.isEditable())if(!l&&this.invalidChecksum)if(null!=e)e({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=b&&b();else if(null!=e)e({message:mxResources.get("readOnly")});else throw Error(mxResources.get("readOnly"));}catch(r){if(null!=e)e(r);else throw r;}}; +DrawioFile.prototype.save=function(a,b,e,d,k,m){try{if(this.isEditable())if(!k&&this.invalidChecksum)if(null!=e)e({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=b&&b();else if(null!=e)e({message:mxResources.get("readOnly")});else throw Error(mxResources.get("readOnly"));}catch(r){if(null!=e)e(r);else throw r;}}; DrawioFile.prototype.updateFileData=function(){var a=null!=this.ui.fileNode?"false"==this.ui.fileNode.getAttribute("compressed"):!1;this.setData(this.ui.getFileData(null,null,null,null,null,null,null,null,this,a))};DrawioFile.prototype.saveAs=function(a,b,e){};DrawioFile.prototype.saveFile=function(a,b,e,d){};DrawioFile.prototype.getPublicUrl=function(a){a(null)};DrawioFile.prototype.isRestricted=function(){return!1};DrawioFile.prototype.isModified=function(){return this.modified}; DrawioFile.prototype.setModified=function(a){this.modified=a};DrawioFile.prototype.isAutosaveOptional=function(){return!1};DrawioFile.prototype.isAutosave=function(){return!this.inConflictState&&this.ui.editor.autosave};DrawioFile.prototype.isRenamable=function(){return!1};DrawioFile.prototype.rename=function(a,b,e){};DrawioFile.prototype.isMovable=function(){return!1};DrawioFile.prototype.move=function(a,b,e){};DrawioFile.prototype.getHash=function(){return""};DrawioFile.prototype.getId=function(){return""}; DrawioFile.prototype.isEditable=function(){return!this.ui.editor.isChromelessView()||this.ui.editor.editable};DrawioFile.prototype.getUi=function(){return this.ui};DrawioFile.prototype.getTitle=function(){return""};DrawioFile.prototype.setData=function(a){this.data=a};DrawioFile.prototype.getData=function(){return this.data}; @@ -2746,21 +2751,21 @@ mxUtils.bind(this,function(){this.redirectDialogShowing=!1}),d,mxResources.get(" e)}};DrawioFile.prototype.handleFileSuccess=function(a){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(this.isModified()?this.fileChanged():a?(this.addAllSavedStatus(),null!=this.sync&&(this.sync.resetUpdateStatusThread(),this.sync.remoteFileChanged&&(this.sync.remoteFileChanged=!1,this.sync.fileChangedNotify()))):this.ui.editor.setStatus(""))}; DrawioFile.prototype.handleFileError=function(a,b){this.ui.spinner.stop();if(this.ui.getCurrentFile()==this)if(this.inConflictState)this.handleConflictError(a,b);else if(this.isModified()&&this.addUnsavedStatus(a),b)this.ui.handleError(a,null!=a?mxResources.get("errorSavingFile"):null);else if(!this.isModified()){var e=null!=a?null!=a.error?a.error.message:a.message:null;null!=e&&60<e.length&&(e=e.substring(0,60)+"...");this.ui.editor.setStatus('<div class="geStatusAlert" style="cursor:pointer;overflow:hidden;">'+ mxUtils.htmlEntities(mxResources.get("error"))+(null!=e?" ("+mxUtils.htmlEntities(e)+")":"")+"</div>")}}; -DrawioFile.prototype.handleConflictError=function(a,b){var e=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),d=mxUtils.bind(this,function(a){this.handleFileError(a,!0)}),l=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("saving"))&&(this.ui.editor.setStatus(""),this.save(!0,e,d,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==a?null:a.commitMessage))}),m=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("updatingDocument"))&& -this.synchronizeFile(mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.spinner.spin(document.body,mxResources.get("saving"))&&this.save(!0,e,d,null,null,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==a?null:a.commitMessage)}),d)});"none"==DrawioFile.SYNC?this.showCopyDialog(e,d,l):this.invalidChecksum?this.showRefreshDialog(e,d,this.getErrorMessage(a)):b?this.showConflictDialog(l,m):this.addConflictStatus(mxUtils.bind(this,function(){this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("updatingDocument"))); +DrawioFile.prototype.handleConflictError=function(a,b){var e=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),d=mxUtils.bind(this,function(a){this.handleFileError(a,!0)}),k=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("saving"))&&(this.ui.editor.setStatus(""),this.save(!0,e,d,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==a?null:a.commitMessage))}),m=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("updatingDocument"))&& +this.synchronizeFile(mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.spinner.spin(document.body,mxResources.get("saving"))&&this.save(!0,e,d,null,null,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==a?null:a.commitMessage)}),d)});"none"==DrawioFile.SYNC?this.showCopyDialog(e,d,k):this.invalidChecksum?this.showRefreshDialog(e,d,this.getErrorMessage(a)):b?this.showConflictDialog(k,m):this.addConflictStatus(mxUtils.bind(this,function(){this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("updatingDocument"))); this.synchronizeFile(e,d)}),this.getErrorMessage(a))};DrawioFile.prototype.getErrorMessage=function(a){return null!=a?null!=a.error?a.error.message:a.message:null};DrawioFile.prototype.isOverdue=function(){return null!=this.ageStart&&Date.now()-this.ageStart.getTime()>=this.ui.warnInterval}; DrawioFile.prototype.fileChanged=function(){this.lastChanged=new Date;this.setModified(!0);this.isAutosave()?(this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get("saving"))+"..."),this.ui.scheduleSanityCheck(),null==this.ageStart&&(this.ageStart=new Date),this.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(a){this.ui.stopSanityCheck();null==this.autosaveThread?(this.handleFileSuccess(!0),this.ageStart=null):this.isModified()&&(this.ui.scheduleSanityCheck(),this.ageStart= this.lastChanged)}),mxUtils.bind(this,function(a){this.handleFileError(a)}))):(this.ageStart=null,this.isAutosaveOptional()&&this.ui.editor.autosave||this.inConflictState||this.addUnsavedStatus())}; -DrawioFile.prototype.fileSaved=function(a,b,e,d){this.lastSaved=new Date;this.ageStart=null;try{this.stats.saved++,this.invalidChecksum=this.inConflictState=!1,null==this.sync?(this.shadowData=a,this.shadowPages=null,null!=e&&e()):this.sync.fileSaved(this.ui.getPagesForNode(mxUtils.parseXml(a).documentElement),b,e,d,a)}catch(r){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=d&&d(r);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,r);else{var l= -this.getCurrentUser(),m=null!=l?l.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),m,r)}}catch(u){}}}; -DrawioFile.prototype.autosave=function(a,b,e,d){null==this.lastAutosave&&(this.lastAutosave=Date.now());a=Date.now()-this.lastAutosave<b?a:0;this.clearAutosave();var l=window.setTimeout(mxUtils.bind(this,function(){this.lastAutosave=null;this.autosaveThread==l&&(this.autosaveThread=null);if(this.isModified()&&this.isAutosaveNow()){var a=this.isAutosaveRevision();a&&(this.lastAutosaveRevision=(new Date).getTime());this.save(a,mxUtils.bind(this,function(a){this.autosaveCompleted();null!=e&&e(a)}),mxUtils.bind(this, -function(a){null!=d&&d(a)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=e&&e(null)}),a);this.autosaveThread=l};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){};DrawioFile.prototype.clearAutosave=function(){null!=this.autosaveThread&&(window.clearTimeout(this.autosaveThread),this.autosaveThread=null)}; +DrawioFile.prototype.fileSaved=function(a,b,e,d){this.lastSaved=new Date;this.ageStart=null;try{this.stats.saved++,this.invalidChecksum=this.inConflictState=!1,null==this.sync?(this.shadowData=a,this.shadowPages=null,null!=e&&e()):this.sync.fileSaved(this.ui.getPagesForNode(mxUtils.parseXml(a).documentElement),b,e,d,a)}catch(r){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=d&&d(r);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,r);else{var k= +this.getCurrentUser(),m=null!=k?k.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),m,r)}}catch(u){}}}; +DrawioFile.prototype.autosave=function(a,b,e,d){null==this.lastAutosave&&(this.lastAutosave=Date.now());a=Date.now()-this.lastAutosave<b?a:0;this.clearAutosave();var k=window.setTimeout(mxUtils.bind(this,function(){this.lastAutosave=null;this.autosaveThread==k&&(this.autosaveThread=null);if(this.isModified()&&this.isAutosaveNow()){var a=this.isAutosaveRevision();a&&(this.lastAutosaveRevision=(new Date).getTime());this.save(a,mxUtils.bind(this,function(a){this.autosaveCompleted();null!=e&&e(a)}),mxUtils.bind(this, +function(a){null!=d&&d(a)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=e&&e(null)}),a);this.autosaveThread=k};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){};DrawioFile.prototype.clearAutosave=function(){null!=this.autosaveThread&&(window.clearTimeout(this.autosaveThread),this.autosaveThread=null)}; DrawioFile.prototype.isAutosaveRevision=function(){var a=(new Date).getTime();return null==this.lastAutosaveRevision||a-this.lastAutosaveRevision>this.maxAutosaveRevisionDelay};DrawioFile.prototype.descriptorChanged=function(){this.fireEvent(new mxEventObject("descriptorChanged"))};DrawioFile.prototype.contentChanged=function(){this.fireEvent(new mxEventObject("contentChanged"))}; DrawioFile.prototype.close=function(a){this.updateFileData();this.stats.closed++;this.isAutosave()&&this.isModified()&&this.save(this.isAutosaveRevision(),null,null,a);this.destroy()};DrawioFile.prototype.hasSameExtension=function(a,b){if(null!=a&&null!=b){var e=a.lastIndexOf("."),d=0<e?a.substring(e):"",e=b.lastIndexOf(".");return d===(0<e?b.substring(e):"")}return a==b}; DrawioFile.prototype.removeListeners=function(){null!=this.changeListener&&(this.ui.editor.graph.model.removeListener(this.changeListener),this.ui.editor.graph.removeListener(this.changeListener),this.ui.removeListener(this.changeListener),this.changeListener=null)};DrawioFile.prototype.destroy=function(){this.stats.destroyed++;this.clearAutosave();this.removeListeners();null!=this.sync&&(this.sync.destroy(),this.sync=null)};DrawioFile.prototype.commentsSupported=function(){return!1}; DrawioFile.prototype.commentsRefreshNeeded=function(){return!0};DrawioFile.prototype.commentsSaveNeeded=function(){return!1};DrawioFile.prototype.getComments=function(a,b){a([])};DrawioFile.prototype.addComment=function(a,b,e){b(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(a,b){return new DrawioComment(this,null,a,Date.now(),Date.now(),!1,b)};LocalFile=function(a,b,e,d){DrawioFile.call(this,a,b);this.title=e;this.mode=d?null:App.MODE_DEVICE};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return!1};LocalFile.prototype.getMode=function(){return this.mode};LocalFile.prototype.getTitle=function(){return this.title};LocalFile.prototype.isRenamable=function(){return!0};LocalFile.prototype.save=function(a,b,e){this.saveAs(this.title,b,e)};LocalFile.prototype.saveAs=function(a,b,e){this.saveFile(a,!1,b,e)}; -LocalFile.prototype.saveFile=function(a,b,e,d){this.title=a;this.updateFileData();b=this.getData();var l=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle()),m=mxUtils.bind(this,function(b){if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(b,a,l?"image/png":"text/xml",l);else if(b.length<MAX_REQUEST_SIZE){var d=a.lastIndexOf("."),d=0<d?a.substring(d+1):"xml";(new mxXmlRequest(SAVE_URL,"format="+d+"&xml="+encodeURIComponent(b)+"&filename="+encodeURIComponent(a)+ -(l?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}));this.setModified(!1);this.contentChanged();null!=e&&e()});l?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){m(a)}),d,this.ui.getCurrentFile()!=this?this.getData():null):m(b)};LocalFile.prototype.rename=function(a,b,e){this.title=a;this.descriptorChanged();null!=b&&b()}; +LocalFile.prototype.saveFile=function(a,b,e,d){this.title=a;this.updateFileData();b=this.getData();var k=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle()),m=mxUtils.bind(this,function(b){if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(b,a,k?"image/png":"text/xml",k);else if(b.length<MAX_REQUEST_SIZE){var d=a.lastIndexOf("."),d=0<d?a.substring(d+1):"xml";(new mxXmlRequest(SAVE_URL,"format="+d+"&xml="+encodeURIComponent(b)+"&filename="+encodeURIComponent(a)+ +(k?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}));this.setModified(!1);this.contentChanged();null!=e&&e()});k?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){m(a)}),d,this.ui.getCurrentFile()!=this?this.getData():null):m(b)};LocalFile.prototype.rename=function(a,b,e){this.title=a;this.descriptorChanged();null!=b&&b()}; LocalFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};(function(){Editor.prototype.appName="draw.io";Editor.prototype.fileExtensions=[{ext:"html",title:"filetypeHtml"},{ext:"png",title:"filetypePng"},{ext:"svg",title:"filetypeSvg"}];Editor.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAMAAADzN3VRAAAApVBMVEUAAAD////k5OT///8AAAB1dXXMzMz9/f39/f37+/v5+fn+/v7///9iYmJaWlqFhYWnp6ejo6OHh4f////////////////7+/v5+fnx8fH///8AAAD///8bGxv7+/v5+fkoKCghISFDQ0MYGBjh4eHY2Njb29tQUFBvb29HR0c/Pz82NjYrKyu/v78SEhLu7u7s7OzV1dVVVVU7OzsVFRXAv78QEBBzqehMAAAAG3RSTlMAA/7p/vz5xZlrTiPL/v78+/v7+OXd2TYQDs8L70ZbAAABKUlEQVQoz3VS13LCMBBUXHChd8iukDslQChJ/v/TchaG4cXS+OSb1c7trU7V60OpdRz2ZtNZL4zXNlcN8BEtSG6+NxIXkeRPoBuQ1cjvZ31/VJFB10ISli6diYfH8iYO3WUNCcNlB0gTrXOtkxTo0O1aKKiBBMhhv2MNBQKoiA5wxlZo0JDzD3AYKbWacyj3fs01wxey0pyEP+R8pWKWXoqtIZ0DDg5pbki9krEKOa6LVDQsdoXEsi46Zqh69KFz7B1u7Hb2yDV8firXDKBlZ4UFiswKGRhXTS93/ECK7yxnJ3+S3y/ThpO+cfSD017nqa18aasabU0/t7d+tk0/1oMEJ1NaD67iwdF68OabFSLn+eHb0+vjy+uk8br9fdrftH0O2menfd7+AQfYM/lNjoDHAAAAAElFTkSuQmCC": IMAGE_PATH+"/delete.png";Editor.plusImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MDdCMTdENjVCOEM4MTFFNDlCRjVBNDdCODU5NjNBNUMiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MDdCMTdENjZCOEM4MTFFNDlCRjVBNDdCODU5NjNBNUMiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowN0IxN0Q2M0I4QzgxMUU0OUJGNUE0N0I4NTk2M0E1QyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowN0IxN0Q2NEI4QzgxMUU0OUJGNUE0N0I4NTk2M0E1QyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PtjrjmgAAAAtSURBVHjaYvz//z8DMigvLwcLdHZ2MiKLMzEQCaivkLGsrOw/dU0cAr4GCDAARQsQbTFrv10AAAAASUVORK5CYII=": IMAGE_PATH+"/plus.png";Editor.spinImage=mxClient.IS_SVG?"data:image/gif;base64,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": @@ -2779,16 +2784,16 @@ dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"startFill" type:"float",min:0,defVal:1.5,isVisible:function(a){return"1"==mxUtils.getValue(a.style,"comic","0")}},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"bendable",dispName:"Bendable",type:"bool",defVal:!0},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"orthogonalLoop", dispName:"Loop Routing",type:"bool",defVal:!1},{name:"noJump",dispName:"No Jumps",type:"bool",defVal:!1}];Editor.commonVertexProperties=[{type:"separator"},{name:"fillOpacity",dispName:"Fill Opacity",type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"overflow",dispName:"Text Overflow",defVal:"visible",type:"enum",enumList:[{val:"visible",dispName:"Visible"},{val:"hidden",dispName:"Hidden"},{val:"fill",dispName:"Fill"},{val:"width", dispName:"Width"}]},{name:"noLabel",dispName:"Hide Label",type:"bool",defVal:!1},{name:"labelPadding",dispName:"Label Padding",type:"float",defVal:0},{name:"direction",dispName:"Direction",type:"enum",defVal:"east",enumList:[{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraint",dispName:"Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"}, -{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraintRotation",dispName:"Rotate Constraint",type:"bool",defVal:!1},{name:"connectable",dispName:"Connectable",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"perimeter",dispName:"Perimeter",defVal:"none",type:"enum",enumList:[{val:"none",dispName:"None"},{val:"rectanglePerimeter",dispName:"Rectangle"},{val:"ellipsePerimeter",dispName:"Ellipse"},{val:"rhombusPerimeter",dispName:"Rhombus"}, -{val:"trianglePerimeter",dispName:"Triangle"},{val:"hexagonPerimeter2",dispName:"Hexagon"},{val:"lifelinePerimeter",dispName:"Lifeline"},{val:"orthogonalPerimeter",dispName:"Orthogonal"},{val:"backbonePerimeter",dispName:"Backbone"},{val:"calloutPerimeter",dispName:"Callout"},{val:"parallelogramPerimeter",dispName:"Parallelogram"},{val:"trapezoidPerimeter",dispName:"Trapezoid"},{val:"stepPerimeter",dispName:"Step"}]},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"jiggle",dispName:"Jiggle", -type:"float",min:0,defVal:1.5,isVisible:function(a){return"1"==mxUtils.getValue(a.style,"comic","0")}},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"collapsible",dispName:"Collapsible",type:"bool",defVal:!1},{name:"container",dispName:"Container",type:"bool",defVal:!1},{name:"recursiveResize",dispName:"Resize Children",type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"backgroundOutline", -dispName:"Background Outline",type:"bool",defVal:!1},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"resizable",dispName:"Resizable",type:"bool",defVal:!0},{name:"resizeWidth",dispName:"Resize Width",type:"bool",defVal:!1},{name:"resizeHeight",dispName:"Resize Height",type:"bool",defVal:!1},{name:"rotatable",dispName:"Rotatable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"treeFolding", -dispName:"Tree Folding",type:"bool",defVal:!1},{name:"treeMoving",dispName:"Tree Moving",type:"bool",defVal:!1}];Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## The label is concatenated in the form fromlabel + label + tolabel if all are defined.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle or a JSON string as used in Layout, Apply.\n## Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nEvan Miller,CFO,emi,Office 1,,me@example.com,#dae8fc,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Evan Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nRon Donovan,System Admin,rdo,Office 3,Evan Miller,me@example.com,#d5e8d4,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nTessa Valet,HR Director,tva,Office 4,Evan Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\n'; +{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraintRotation",dispName:"Rotate Constraint",type:"bool",defVal:!1},{name:"connectable",dispName:"Connectable",type:"bool",defVal:!0},{name:"allowArrows",dispName:"Allow Arrows",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"perimeter",dispName:"Perimeter",defVal:"none",type:"enum",enumList:[{val:"none",dispName:"None"},{val:"rectanglePerimeter",dispName:"Rectangle"},{val:"ellipsePerimeter", +dispName:"Ellipse"},{val:"rhombusPerimeter",dispName:"Rhombus"},{val:"trianglePerimeter",dispName:"Triangle"},{val:"hexagonPerimeter2",dispName:"Hexagon"},{val:"lifelinePerimeter",dispName:"Lifeline"},{val:"orthogonalPerimeter",dispName:"Orthogonal"},{val:"backbonePerimeter",dispName:"Backbone"},{val:"calloutPerimeter",dispName:"Callout"},{val:"parallelogramPerimeter",dispName:"Parallelogram"},{val:"trapezoidPerimeter",dispName:"Trapezoid"},{val:"stepPerimeter",dispName:"Step"}]},{name:"fixDash", +dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1.5,isVisible:function(a){return"1"==mxUtils.getValue(a.style,"comic","0")}},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"collapsible",dispName:"Collapsible",type:"bool",defVal:!1},{name:"container",dispName:"Container",type:"bool",defVal:!1},{name:"recursiveResize",dispName:"Resize Children",type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1},{name:"editable", +dispName:"Editable",type:"bool",defVal:!0},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"resizable",dispName:"Resizable",type:"bool",defVal:!0},{name:"resizeWidth",dispName:"Resize Width",type:"bool",defVal:!1},{name:"resizeHeight",dispName:"Resize Height",type:"bool",defVal:!1},{name:"rotatable",dispName:"Rotatable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0}, +{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"treeFolding",dispName:"Tree Folding",type:"bool",defVal:!1},{name:"treeMoving",dispName:"Tree Moving",type:"bool",defVal:!1}];Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## The label is concatenated in the form fromlabel + label + tolabel if all are defined.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle or a JSON string as used in Layout, Apply.\n## Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nEvan Miller,CFO,emi,Office 1,,me@example.com,#dae8fc,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Evan Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nRon Donovan,System Admin,rdo,Office 3,Evan Miller,me@example.com,#d5e8d4,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nTessa Valet,HR Director,tva,Office 4,Evan Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\n'; Editor.extractGraphModel=function(a,c){if(null!=a&&"undefined"!==typeof pako){var b=a.ownerDocument.getElementsByTagName("div"),f=[];if(null!=b&&0<b.length)for(var d=0;d<b.length;d++)if("mxgraph"==b[d].getAttribute("class")){f.push(b[d]);break}0<f.length&&(b=f[0].getAttribute("data-mxgraph"),null!=b?(f=JSON.parse(b),null!=f&&null!=f.xml&&(f=mxUtils.parseXml(f.xml),a=f.documentElement)):(f=f[0].getElementsByTagName("div"),0<f.length&&(b=mxUtils.getTextContent(f[0]),b=Graph.decompress(b),0<b.length&& (f=mxUtils.parseXml(b),a=f.documentElement))))}if(null!=a&&"svg"==a.nodeName)if(b=a.getAttribute("content"),null!=b&&"<"!=b.charAt(0)&&"%"!=b.charAt(0)&&(b=unescape(window.atob?atob(b):Base64.decode(cont,b))),null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b)),null!=b&&0<b.length)a=mxUtils.parseXml(b).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==a||c||(f=null,"diagram"==a.nodeName?f=a:"mxfile"==a.nodeName&&(b=a.getElementsByTagName("diagram"),0<b.length&&(f=b[Math.max(0, Math.min(b.length-1,urlParams.page||0))])),null!=f&&(a=Editor.parseDiagramNode(f)));null==a||"mxGraphModel"==a.nodeName||c&&"mxfile"==a.nodeName||(a=null);return a};Editor.parseDiagramNode=function(a){var c=mxUtils.trim(mxUtils.getTextContent(a)),b=null;0<c.length?(a=Graph.decompress(c),null!=a&&0<a.length&&(b=mxUtils.parseXml(a).documentElement)):(a=mxUtils.getChildNodes(a),0<a.length&&(b=mxUtils.createXmlDocument(),b.appendChild(b.importNode(a[0],!0)),b=b.documentElement));return b};Editor.getDiagramNodeXml= function(a){var c=mxUtils.getTextContent(a),b=null;0<c.length?b=Graph.decompress(c):null!=a.firstChild&&(b=mxUtils.getXml(a.firstChild));return b};Editor.extractGraphModelFromPng=function(a){var c=null;try{var b=a.substring(a.indexOf(",")+1),f=window.atob&&!mxClient.IS_SF?atob(b):Base64.decode(b,!0);EditorUi.parsePng(f,mxUtils.bind(this,function(a,b,d){a=f.substring(a+8,a+8+d);"zTXt"==b?(d=a.indexOf(String.fromCharCode(0)),"mxGraphModel"==a.substring(0,d)&&(a=Graph.bytesToString(pako.inflateRaw(a.substring(d+ -2))).replace(/\+/g," "),null!=a&&0<a.length&&(c=a))):"tEXt"==b&&(a=a.split(String.fromCharCode(0)),1<a.length&&("mxGraphModel"==a[0]||"mxfile"==a[0])&&(c=a[1]));if(null!=c||"IDAT"==b)return!0}))}catch(G){}null!=c&&"%"==c.charAt(0)&&(c=decodeURIComponent(c));null!=c&&"%"==c.charAt(0)&&(c=decodeURIComponent(c));return c};Editor.shadowOptionEnabled=!0;Editor.config=null;Editor.configVersion=null;Editor.configure=function(a,c){if(null!=a){Editor.config=a;Editor.configVersion=a.version;Menus.prototype.defaultFonts= +2))).replace(/\+/g," "),null!=a&&0<a.length&&(c=a))):"tEXt"==b&&(a=a.split(String.fromCharCode(0)),1<a.length&&("mxGraphModel"==a[0]||"mxfile"==a[0])&&(c=a[1]));if(null!=c||"IDAT"==b)return!0}))}catch(H){}null!=c&&"%"==c.charAt(0)&&(c=decodeURIComponent(c));null!=c&&"%"==c.charAt(0)&&(c=decodeURIComponent(c));return c};Editor.shadowOptionEnabled=!0;Editor.config=null;Editor.configVersion=null;Editor.configure=function(a,c){if(null!=a){Editor.config=a;Editor.configVersion=a.version;Menus.prototype.defaultFonts= a.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors=a.presetColors||ColorDialog.prototype.presetColors;ColorDialog.prototype.defaultColors=a.defaultColors||ColorDialog.prototype.defaultColors;StyleFormatPanel.prototype.defaultColorSchemes=a.defaultColorSchemes||StyleFormatPanel.prototype.defaultColorSchemes;Graph.prototype.defaultEdgeLength=a.defaultEdgeLength||Graph.prototype.defaultEdgeLength;DrawioFile.prototype.autosaveDelay=a.autosaveDelay||DrawioFile.prototype.autosaveDelay; null!=a.templateFile&&(EditorUi.templateFile=a.templateFile);a.customFonts&&(Menus.prototype.defaultFonts=a.customFonts.concat(Menus.prototype.defaultFonts));a.customPresetColors&&(ColorDialog.prototype.presetColors=a.customPresetColors.concat(ColorDialog.prototype.presetColors));null!=a.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=a.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));if(null!=a.css){var b=document.createElement("style");b.setAttribute("type", "text/css");b.appendChild(document.createTextNode(a.css));var f=document.getElementsByTagName("script")[0];f.parentNode.insertBefore(b,f)}null!=a.libraries&&(Sidebar.prototype.customEntries=a.libraries);null!=a.enabledLibraries&&(Sidebar.prototype.enabledLibraries=a.enabledLibraries);null!=a.defaultLibraries&&(Sidebar.prototype.defaultEntries=a.defaultLibraries);null!=a.defaultCustomLibraries&&(Editor.defaultCustomLibraries=a.defaultCustomLibraries);null!=a.enableCustomLibraries&&(Editor.enableCustomLibraries= @@ -2799,7 +2804,7 @@ if(null!=b&&0<b.length){var b=b[0],f=b.getElementsByTagName("div");null!=f&&0<f. this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement(),null!=f){var d=new mxCodec(f.ownerDocument);d.decode(f,this.graph.getStylesheet())}this.graph.currentStyle=b;this.graph.mathEnabled="1"==urlParams.math||"1"==c.getAttribute("math");b=c.getAttribute("backgroundImage");null!=b?(b=JSON.parse(b),this.graph.setBackgroundImage(new mxImage(b.src,b.width,b.height))):this.graph.setBackgroundImage(null);mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath? !0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==c.getAttribute("shadow"),!1)}a.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var b=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(a){a=null!=a?a:!0;var c=b.apply(this,arguments);null!=this.graph.currentStyle&& "default-style2"!=this.graph.currentStyle&&c.setAttribute("style",this.graph.currentStyle);null!=this.graph.backgroundImage&&c.setAttribute("backgroundImage",JSON.stringify(this.graph.backgroundImage));c.setAttribute("math",this.graph.mathEnabled?"1":"0");c.setAttribute("shadow",this.graph.shadowVisible?"1":"0");return c};Editor.prototype.isDataSvg=function(a){try{var c=mxUtils.parseXml(a).documentElement.getAttribute("content");if(null!=c&&(null!=c&&"<"!=c.charAt(0)&&"%"!=c.charAt(0)&&(c=unescape(window.atob? -atob(c):Base64.decode(cont,c))),null!=c&&"%"==c.charAt(0)&&(c=decodeURIComponent(c)),null!=c&&0<c.length)){var b=mxUtils.parseXml(c).documentElement;return"mxfile"==b.nodeName||"mxGraphModel"==b.nodeName}}catch(P){}return!1};Editor.prototype.extractGraphModel=function(a,c){return Editor.extractGraphModel.apply(this,arguments)};var e=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=null;this.graph.view.y0=null;mxClient.NO_FO= +atob(c):Base64.decode(cont,c))),null!=c&&"%"==c.charAt(0)&&(c=decodeURIComponent(c)),null!=c&&0<c.length)){var b=mxUtils.parseXml(c).documentElement;return"mxfile"==b.nodeName||"mxGraphModel"==b.nodeName}}catch(Y){}return!1};Editor.prototype.extractGraphModel=function(a,c){return Editor.extractGraphModel.apply(this,arguments)};var e=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=null;this.graph.view.y0=null;mxClient.NO_FO= this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();e.apply(this,arguments)};var d=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){d.apply(this,arguments);mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath&&null!=Editor.MathJaxRender?!0:this.originalNoForeignObject;this.graph.useCssTransforms= !mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=function(a,c){a=null!=a?a:DRAW_MATH_URL+"/MathJax.js?config=TeX-MML-AM_HTMLorMML";Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(a){window.setTimeout(function(){"hidden"!=a.style.visibility&&MathJax.Hub.Queue(["Typeset",MathJax.Hub,a])},0)};window.MathJax={skipStartupTypeset:!0,showMathMenu:!1,messageStyle:"none",AuthorInit:function(){MathJax.Hub.Config(c||{jax:["input/TeX", "input/MathML","input/AsciiMath","output/HTML-CSS"],extensions:["tex2jax.js","mml2jax.js","asciimath2jax.js"],"HTML-CSS":{imageFont:null},TeX:{extensions:["AMSmath.js","AMSsymbols.js","noErrors.js","noUndefined.js"]},tex2jax:{ignoreClass:"mxCellEditor"},asciimath2jax:{ignoreClass:"mxCellEditor"}});MathJax.Hub.Register.StartupHook("Begin",function(){for(var a=0;a<Editor.mathJaxQueue.length;a++)Editor.doMathJaxRender(Editor.mathJaxQueue[a])})}};Editor.MathJaxRender=function(a){"undefined"!==typeof MathJax&& @@ -2808,24 +2813,24 @@ d.type="text/javascript";d.src=a;f[0].parentNode.appendChild(d)}};Editor.prototy b?c.push(b.replace(/\\'/g,"'")):void 0!==f?c.push(f.replace(/\\"/g,'"')):void 0!==d&&c.push(d);return""});/,\s*$/.test(a)&&c.push("");return c};Editor.prototype.isCorsEnabledForUrl=function(a){null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(a)||"https://raw.githubusercontent.com/"===a.substring(0,34)||"https://cdn.rawgit.com/"===a.substring(0,23)||"https://rawgit.com/"===a.substring(0, 19)||/^https?:\/\/[^\/]*\.blob.core.windows.net\//.test(a)||/^https?:\/\/[^\/]*\.iconfinder.com\//.test(a)||/^https?:\/\/[^\/]*\.draw\.io\/proxy/.test(a)||/^https?:\/\/[^\/]*\.github\.io\//.test(a)};Editor.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var c=a.convert,b=this;a.convert=function(f){if(null!=f){var d="http://"==f.substring(0,7)||"https://"==f.substring(0,8);d&&!navigator.onLine?f=EditorUi.prototype.svgBrokenImage.src:!d||f.substring(0,a.baseUrl.length)== a.baseUrl||EditorUi.prototype.crossOriginImages&&b.isCorsEnabledForUrl(f)?"chrome-extension://"!=f.substring(0,19)&&(f=c.apply(this,arguments)):f=PROXY_URL+"?url="+encodeURIComponent(f)}return f};return a};Editor.prototype.createSvgDataUri=function(a){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(a)))};Editor.prototype.convertImageToDataUri=function(a,c){if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){c(this.createSvgDataUri(a.getText()))}),function(){c(EditorUi.prototype.svgBrokenImage.src)}); -else{var b=new Image;EditorUi.prototype.crossOriginImages&&(b.crossOrigin="anonymous");b.onload=function(){var a=document.createElement("canvas"),f=a.getContext("2d");a.height=b.height;a.width=b.width;f.drawImage(b,0,0);try{c(a.toDataURL())}catch(M){c(EditorUi.prototype.svgBrokenImage.src)}};b.onerror=function(){c(EditorUi.prototype.svgBrokenImage.src)};b.src=a}};Editor.prototype.convertImages=function(a,c,b,f){null==f&&(f=this.createImageUrlConverter());var d=0,e=b||{};b=mxUtils.bind(this,function(b, -k){for(var g=a.getElementsByTagName(b),n=0;n<g.length;n++)mxUtils.bind(this,function(b){var g=f.convert(b.getAttribute(k));if(null!=g&&"data:"!=g.substring(0,5)){var n=e[g];null==n?(d++,this.convertImageToDataUri(g,function(f){null!=f&&(e[g]=f,b.setAttribute(k,f));d--;0==d&&c(a)})):b.setAttribute(k,n)}else null!=g&&b.setAttribute(k,g)})(g[n])});b("image","xlink:href");b("img","src");0==d&&c(a)};Editor.prototype.base64Encode=function(a){for(var c="",b=0,f=a.length,d,e,k;b<f;){d=a.charCodeAt(b++)&255; -if(b==f){c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((d&3)<<4);c+="==";break}e=a.charCodeAt(b++);if(b==f){c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((d&3)<<4|(e&240)>>4);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&15)<<2);c+="=";break}k= -a.charCodeAt(b++);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((d&3)<<4|(e&240)>>4);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&15)<<2|(k&192)>>6);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(k&63)}return c};Editor.prototype.loadUrl=function(a,c,b,f,d,e){try{var k=f||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)|| -/(\.gif)($|\?)/i.test(a);d=null!=d?d:!0;var g=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=c){var f=a.getText();if(k){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){a=mxUtilsBinaryToArray(a.request.responseBody).toArray();for(var f=Array(a.length),d=0;d<a.length;d++)f[d]=String.fromCharCode(a[d]);f=f.join("")}e=null!=e?e:"data:image/png;base64,";f=e+this.base64Encode(f)}c(f)}}else null!= -b&&b({code:App.ERROR_UNKNOWN},a)}),function(){null!=b&&b({code:App.ERROR_UNKNOWN})},k,this.timeout,function(){d&&null!=b&&b({code:App.ERROR_TIMEOUT,retry:g})})});g()}catch(O){null!=b&&b(O)}};Editor.prototype.loadFonts=function(a){if(null!=this.fontCss&&null==this.resolvedFontCss){var c=function(a){return a.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")},b=this.fontCss.split("url("),f=0,d={},e=mxUtils.bind(this,function(){if(0==f){for(var e=[b[0]],k=1;k<b.length;k++){var g= -b[k].indexOf(")");e.push('url("');e.push(d[c(b[k].substring(0,g))]);e.push('"'+b[k].substring(g))}this.resolvedFontCss=e.join("");a()}});if(0<b.length)for(var k=1;k<b.length;k++){var g=b[k].indexOf(")"),n=null,q=b[k].indexOf("format(",g);0<q&&(n=c(b[k].substring(q+7,b[k].indexOf(")",q))));mxUtils.bind(this,function(a){if(null==d[a]){d[a]=a;f++;var c="application/x-font-ttf";if("svg"==n||/(\.svg)($|\?)/i.test(a))c="image/svg+xml";else if("otf"==n||"embedded-opentype"==n||/(\.otf)($|\?)/i.test(a))c= +else{var b=new Image;EditorUi.prototype.crossOriginImages&&(b.crossOrigin="anonymous");b.onload=function(){var a=document.createElement("canvas"),f=a.getContext("2d");a.height=b.height;a.width=b.width;f.drawImage(b,0,0);try{c(a.toDataURL())}catch(O){c(EditorUi.prototype.svgBrokenImage.src)}};b.onerror=function(){c(EditorUi.prototype.svgBrokenImage.src)};b.src=a}};Editor.prototype.convertImages=function(a,c,b,f){null==f&&(f=this.createImageUrlConverter());var d=0,e=b||{};b=mxUtils.bind(this,function(b, +g){for(var l=a.getElementsByTagName(b),n=0;n<l.length;n++)mxUtils.bind(this,function(b){var l=f.convert(b.getAttribute(g));if(null!=l&&"data:"!=l.substring(0,5)){var n=e[l];null==n?(d++,this.convertImageToDataUri(l,function(f){null!=f&&(e[l]=f,b.setAttribute(g,f));d--;0==d&&c(a)})):b.setAttribute(g,n)}else null!=l&&b.setAttribute(g,l)})(l[n])});b("image","xlink:href");b("img","src");0==d&&c(a)};Editor.prototype.base64Encode=function(a){for(var c="",b=0,f=a.length,d,e,g;b<f;){d=a.charCodeAt(b++)&255; +if(b==f){c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((d&3)<<4);c+="==";break}e=a.charCodeAt(b++);if(b==f){c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((d&3)<<4|(e&240)>>4);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&15)<<2);c+="=";break}g= +a.charCodeAt(b++);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((d&3)<<4|(e&240)>>4);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&15)<<2|(g&192)>>6);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g&63)}return c};Editor.prototype.loadUrl=function(a,c,b,f,d,e){try{var g=f||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)|| +/(\.gif)($|\?)/i.test(a);d=null!=d?d:!0;var l=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=c){var f=a.getText();if(g){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){a=mxUtilsBinaryToArray(a.request.responseBody).toArray();for(var f=Array(a.length),d=0;d<a.length;d++)f[d]=String.fromCharCode(a[d]);f=f.join("")}e=null!=e?e:"data:image/png;base64,";f=e+this.base64Encode(f)}c(f)}}else null!= +b&&b({code:App.ERROR_UNKNOWN},a)}),function(){null!=b&&b({code:App.ERROR_UNKNOWN})},g,this.timeout,function(){d&&null!=b&&b({code:App.ERROR_TIMEOUT,retry:l})})});l()}catch(P){null!=b&&b(P)}};Editor.prototype.loadFonts=function(a){if(null!=this.fontCss&&null==this.resolvedFontCss){var c=function(a){return a.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")},b=this.fontCss.split("url("),f=0,d={},e=mxUtils.bind(this,function(){if(0==f){for(var e=[b[0]],g=1;g<b.length;g++){var l= +b[g].indexOf(")");e.push('url("');e.push(d[c(b[g].substring(0,l))]);e.push('"'+b[g].substring(l))}this.resolvedFontCss=e.join("");a()}});if(0<b.length)for(var g=1;g<b.length;g++){var l=b[g].indexOf(")"),n=null,q=b[g].indexOf("format(",l);0<q&&(n=c(b[g].substring(q+7,b[g].indexOf(")",q))));mxUtils.bind(this,function(a){if(null==d[a]){d[a]=a;f++;var c="application/x-font-ttf";if("svg"==n||/(\.svg)($|\?)/i.test(a))c="image/svg+xml";else if("otf"==n||"embedded-opentype"==n||/(\.otf)($|\?)/i.test(a))c= "application/x-font-opentype";else if("woff"==n||/(\.woff)($|\?)/i.test(a))c="application/font-woff";else if("woff2"==n||/(\.woff2)($|\?)/i.test(a))c="application/font-woff2";else if("eot"==n||/(\.eot)($|\?)/i.test(a))c="application/vnd.ms-fontobject";else if("sfnt"==n||/(\.sfnt)($|\?)/i.test(a))c="application/font-sfnt";var b=a;/^https?:\/\//.test(b)&&!this.isCorsEnabledForUrl(b)&&(b=PROXY_URL+"?url="+encodeURIComponent(a));this.loadUrl(b,mxUtils.bind(this,function(c){d[a]=c;f--;e()}),mxUtils.bind(this, -function(a){f--;e()}),!0,null,"data:"+c+";charset=utf-8;base64,")}})(c(b[k].substring(0,g)),n)}}else a()};Editor.prototype.convertMath=function(a,c,b,f){a.mathEnabled&&"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?(Editor.MathJaxRender(c),window.setTimeout(mxUtils.bind(this,function(){MathJax.Hub.Queue(mxUtils.bind(this,function(){f()}))}),0)):f()};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||!this.graph.mathEnabled&&this.useCanvasForExport};Editor.prototype.exportToCanvas= -function(a,c,b,f,d,e,k,g,n,q,t,l,x,v){e=null!=e?e:!0;l=null!=l?l:this.graph;x=null!=x?x:0;var p=n?null:l.background;p==mxConstants.NONE&&(p=null);null==p&&(p=f);null==p&&0==n&&(p=this.graph.defaultPageBackgroundColor);this.convertImages(l.getSvg(p,null,null,v,null,null!=k?k:!0,null,null,null,q),mxUtils.bind(this,function(b){var f=new Image;f.onload=mxUtils.bind(this,function(){try{var k=document.createElement("canvas"),n=parseInt(b.getAttribute("width")),q=parseInt(b.getAttribute("height"));g=null!= -g?g:1;null!=c&&(g=e?Math.min(1,Math.min(3*c/(4*q),c/n)):c/n);n=Math.ceil(g*n)+2*x;q=Math.ceil(g*q)+2*x;k.setAttribute("width",n);k.setAttribute("height",q);var t=k.getContext("2d");null!=p&&(t.beginPath(),t.rect(0,0,n,q),t.fillStyle=p,t.fill());t.scale(g,g);mxClient.IS_SF?window.setTimeout(function(){t.drawImage(f,x/g,x/g);a(k)},0):(t.drawImage(f,x/g,x/g),a(k))}catch(R){null!=d&&d(R)}});f.onerror=function(a){null!=d&&d(a)};try{q&&this.graph.addSvgShadow(b);var k=mxUtils.bind(this,function(){if(null!= -this.resolvedFontCss){var a=document.createElement("style");a.setAttribute("type","text/css");a.innerHTML=this.resolvedFontCss;b.getElementsByTagName("defs")[0].appendChild(a)}this.convertMath(l,b,!0,mxUtils.bind(this,function(){f.src=this.createSvgDataUri(mxUtils.getXml(b))}))});this.loadFonts(k)}catch(Q){null!=d&&d(Q)}}),b,t)};Editor.prototype.writeGraphModelToPng=function(a,c,b,f,d){function e(a,c){var b=n;n+=c;return a.substring(b,n)}function k(a){a=e(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 n=0;if(e(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=d&&d();else if(e(a,4),"IHDR"!=e(a,4))null!=d&&d();else{e(a,17);d=a.substring(0,n);do{var q=k(a);if("IDAT"==e(a,4)){d=a.substring(0,n-8);b=b+String.fromCharCode(0)+("zTXt"==c?String.fromCharCode(0):"")+f;f=4294967295; -f=EditorUi.prototype.updateCRC(f,c,0,4);f=EditorUi.prototype.updateCRC(f,b,0,b.length);d+=g(b.length)+c+b+g(f^4294967295);d+=a.substring(n-8,a.length);break}d+=a.substring(n-8,n-4+q);e(a,q);e(a,4)}while(q);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 l=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(a,c){l.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors); +function(a){f--;e()}),!0,null,"data:"+c+";charset=utf-8;base64,")}})(c(b[g].substring(0,l)),n)}}else a()};Editor.prototype.convertMath=function(a,c,b,f){a.mathEnabled&&"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?(Editor.MathJaxRender(c),window.setTimeout(mxUtils.bind(this,function(){MathJax.Hub.Queue(mxUtils.bind(this,function(){f()}))}),0)):f()};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||!this.graph.mathEnabled&&this.useCanvasForExport};Editor.prototype.exportToCanvas= +function(a,c,b,f,d,e,g,l,n,q,t,x,v,k){e=null!=e?e:!0;x=null!=x?x:this.graph;v=null!=v?v:0;var p=n?null:x.background;p==mxConstants.NONE&&(p=null);null==p&&(p=f);null==p&&0==n&&(p=this.graph.defaultPageBackgroundColor);this.convertImages(x.getSvg(p,null,null,k,null,null!=g?g:!0,null,null,null,q),mxUtils.bind(this,function(b){var f=new Image;f.onload=mxUtils.bind(this,function(){try{var g=document.createElement("canvas"),n=parseInt(b.getAttribute("width")),q=parseInt(b.getAttribute("height"));l=null!= +l?l:1;null!=c&&(l=e?Math.min(1,Math.min(3*c/(4*q),c/n)):c/n);n=Math.ceil(l*n)+2*v;q=Math.ceil(l*q)+2*v;g.setAttribute("width",n);g.setAttribute("height",q);var t=g.getContext("2d");null!=p&&(t.beginPath(),t.rect(0,0,n,q),t.fillStyle=p,t.fill());t.scale(l,l);mxClient.IS_SF?window.setTimeout(function(){t.drawImage(f,v/l,v/l);a(g)},0):(t.drawImage(f,v/l,v/l),a(g))}catch(R){null!=d&&d(R)}});f.onerror=function(a){null!=d&&d(a)};try{q&&this.graph.addSvgShadow(b);var g=mxUtils.bind(this,function(){if(null!= +this.resolvedFontCss){var a=document.createElement("style");a.setAttribute("type","text/css");a.innerHTML=this.resolvedFontCss;b.getElementsByTagName("defs")[0].appendChild(a)}this.convertMath(x,b,!0,mxUtils.bind(this,function(){f.src=this.createSvgDataUri(mxUtils.getXml(b))}))});this.loadFonts(g)}catch(Q){null!=d&&d(Q)}}),b,t)};Editor.prototype.writeGraphModelToPng=function(a,c,b,f,d){function e(a,c){var b=n;n+=c;return a.substring(b,n)}function g(a){a=e(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<< +8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function l(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var n=0;if(e(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=d&&d();else if(e(a,4),"IHDR"!=e(a,4))null!=d&&d();else{e(a,17);d=a.substring(0,n);do{var q=g(a);if("IDAT"==e(a,4)){d=a.substring(0,n-8);b=b+String.fromCharCode(0)+("zTXt"==c?String.fromCharCode(0):"")+f;f=4294967295; +f=EditorUi.prototype.updateCRC(f,c,0,4);f=EditorUi.prototype.updateCRC(f,b,0,b.length);d+=l(b.length)+c+b+l(f^4294967295);d+=a.substring(n-8,a.length);break}d+=a.substring(n-8,n-4+q);e(a,q);e(a,4)}while(q);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 k=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(a,c){k.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors); mxSettings.save()};var m=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){m.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(a,c){var b=null;null!=a.editor.graph.getModel().getParent(c)?b=c.getId():null!=a.currentPage&&(b=a.currentPage.getId());return b});if(null!=window.StyleFormatPanel){var r=Format.prototype.init;Format.prototype.init=function(){r.apply(this,arguments); this.editorUi.editor.addListener("fileLoaded",this.update)};var u=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?u.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 y=DiagramFormatPanel.prototype.addView; DiagramFormatPanel.prototype.addView=function(a){a=y.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var c=this.editorUi,b=c.editor.graph,f=this.createOption(mxResources.get("shadow"),function(){return b.shadowVisible},function(a){var f=new ChangePageSetup(c);f.ignoreColor=!0;f.ignoreImage=!0;f.shadowVisible=a;b.model.execute(f)},{install:function(a){this.listener=function(){a(b.shadowVisible)};c.addListener("shadowVisibleChanged",this.listener)}, -destroy:function(){c.removeListener(this.listener)}});Editor.shadowOptionEnabled||(f.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(f,60));a.appendChild(f)}return a};var A=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(a){a=A.apply(this,arguments);var c=this.editorUi,b=c.editor.graph;if(b.isEnabled()){var f=c.getCurrentFile();if(null!=f&&f.isAutosaveOptional()){var d=this.createOption(mxResources.get("autosave"),function(){return c.editor.autosave}, +destroy:function(){c.removeListener(this.listener)}});Editor.shadowOptionEnabled||(f.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(f,60));a.appendChild(f)}return a};var z=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(a){a=z.apply(this,arguments);var c=this.editorUi,b=c.editor.graph;if(b.isEnabled()){var f=c.getCurrentFile();if(null!=f&&f.isAutosaveOptional()){var d=this.createOption(mxResources.get("autosave"),function(){return c.editor.autosave}, function(a){c.editor.setAutosave(a);c.editor.autosave&&f.isModified()&&f.fileChanged()},{install:function(a){this.listener=function(){a(c.editor.autosave)};c.editor.addListener("autosaveChanged",this.listener)},destroy:function(){c.editor.removeListener(this.listener)}});a.appendChild(d)}}if(this.isMathOptionVisible()&&b.isEnabled()&&"undefined"!==typeof MathJax){d=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return b.mathEnabled},function(a){c.actions.get("mathematicalTypesetting").funct()}, {install:function(a){this.listener=function(){a(b.mathEnabled)};c.addListener("mathEnabledChanged",this.listener)},destroy:function(){c.removeListener(this.listener)}});d.style.paddingTop="5px";a.appendChild(d);var e=c.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000032875");e.style.position="relative";e.style.marginLeft="6px";e.style.top="2px";d.appendChild(e)}return a};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size", type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"absoluteArcSize",dispName:"Abs. Arc Size",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, @@ -2849,120 +2854,120 @@ type:"float",min:0,defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,de stroke:"#B09500",font:"#ffffff"},{fill:"#6d8764",stroke:"#3A5431",font:"#ffffff"},{fill:"#647687",stroke:"#314354",font:"#ffffff"},{fill:"#76608a",stroke:"#432D57",font:"#ffffff"},{fill:"#a0522d",stroke:"#6D1F00",font:"#ffffff"}],[{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,c,b){if(null!=c){var f=function(a){if(null!=a)if(b)for(var f=0;f<a.length;f++)c[a[f].name]=a[f];else for(var d in c){for(var e=!1,f=0;f<a.length;f++)if(a[f].name==d&&a[f].type==c[d].type){e=!0;break}e||delete c[d]}},d=this.editorUi.editor.graph.view.getState(a);null!=d&& -null!=d.shape&&(d.shape.commonCustomPropAdded||(d.shape.commonCustomPropAdded=!0,d.shape.customProperties=d.shape.customProperties||[],d.cell.vertex?Array.prototype.push.apply(d.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(d.shape.customProperties,Editor.commonEdgeProperties)),f(d.shape.customProperties));a=a.getAttribute("customProperties");if(null!=a)try{f(JSON.parse(a))}catch(M){}}};var c=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var a= +null!=d.shape&&(d.shape.commonCustomPropAdded||(d.shape.commonCustomPropAdded=!0,d.shape.customProperties=d.shape.customProperties||[],d.cell.vertex?Array.prototype.push.apply(d.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(d.shape.customProperties,Editor.commonEdgeProperties)),f(d.shape.customProperties));a=a.getAttribute("customProperties");if(null!=a)try{f(JSON.parse(a))}catch(O){}}};var c=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()));c.apply(this,arguments);if(Editor.enableCustomProperties){for(var b={},f=a.vertices,d=a.edges,e=0;e<f.length;e++)this.findCommonProperties(f[e],b,0==e);for(e=0;e<d.length;e++)this.findCommonProperties(d[e],b,0==f.length&&0==e);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(b).length&&this.container.appendChild(this.addProperties(this.createPanel(), b,a))}};var f=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(a){var c=mxUtils.button(mxResources.get("copyStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("copyStyle").funct()}));c.setAttribute("title",mxResources.get("copyStyle")+" ("+this.editorUi.actions.get("copyStyle").shortcut+")");c.style.marginBottom="2px";c.style.width="100px";c.style.marginRight="2px";a.appendChild(c);c=mxUtils.button(mxResources.get("pasteStyle"),mxUtils.bind(this, -function(a){this.editorUi.actions.get("pasteStyle").funct()}));c.setAttribute("title",mxResources.get("pasteStyle")+" ("+this.editorUi.actions.get("pasteStyle").shortcut+")");c.style.marginBottom="2px";c.style.width="100px";a.appendChild(c);mxUtils.br(a);return f.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=function(a,c,b){function f(a,c,b,f){p.getModel().beginUpdate();try{var d=[],e=[];if(null!=b.index){for(var k=[],g=b.parentRow.nextSibling;g&& -g.getAttribute("data-pName")==a;)k.push(g.getAttribute("data-pValue")),g=g.nextSibling;b.index<k.length?null!=f?k.splice(f,1):k[b.index]=c:k.push(c);null!=b.size&&k.length>b.size&&(k=k.slice(0,b.size));c=k.join(",");null!=b.countProperty&&(p.setCellStyles(b.countProperty,k.length,p.getSelectionCells()),d.push(b.countProperty),e.push(k.length))}p.setCellStyles(a,c,p.getSelectionCells());d.push(a);e.push(c);if(null!=b.dependentProps)for(a=0;a<b.dependentProps.length;a++){var n=b.dependentPropsDefVal[a], -q=b.dependentPropsVals[a];if(q.length>c)q=q.slice(0,c);else for(var l=q.length;l<c;l++)q.push(n);q=q.join(",");p.setCellStyles(b.dependentProps[a],q,p.getSelectionCells());d.push(b.dependentProps[a]);e.push(q)}if("function"==typeof b.onChange)b.onChange(p,c);t.editorUi.fireEvent(new mxEventObject("styleChanged","keys",d,"values",e,"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}}function d(c,b,f){var d=mxUtils.getOffset(a,!0),e=mxUtils.getOffset(c,!0);b.style.position="absolute"; -b.style.left=e.x-d.x+"px";b.style.top=e.y-d.y+"px";b.style.width=c.offsetWidth+"px";b.style.height=c.offsetHeight-(f?4:0)+"px";b.style.zIndex=5}function e(a,c,b){var d=document.createElement("div");d.style.width="32px";d.style.height="4px";d.style.margin="2px";d.style.border="1px solid black";d.style.background=c&&"none"!=c?c:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(t,function(e){this.editorUi.pickColor(c,function(c){d.style.background="none"==c?"url('"+Dialog.prototype.noColorImage+ -"')":c;f(a,c,b)});mxEvent.consume(e)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(d);return btn}function k(a,c,b,d,e,k,g){null!=c&&(c=c.split(","),l.push({name:a,values:c,type:b,defVal:d,countProperty:e,parentRow:k,isDeletable:!0,flipBkg:g}));btn=mxUtils.button("+",mxUtils.bind(t,function(c){for(var n=k,t=0;null!=n.nextSibling;)if(n.nextSibling.getAttribute("data-pName")==a)n=n.nextSibling,t++;else break;var p={type:b,parentRow:k,index:t,isDeletable:!0, -defVal:d,countProperty:e},t=q(a,"",p,0==t%2,g);f(a,d,p);n.parentNode.insertBefore(t,n.nextSibling);mxEvent.consume(c)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function g(a,c,b,f,d,e,k){if(0<d){var g=Array(d);c=null!=c?c.split(","):[];for(var n=0;n<d;n++)g[n]=null!=c[n]?c[n]:null!=f?f:"";l.push({name:a,values:g,type:b,defVal:f,parentRow:e,flipBkg:k,size:d})}return document.createElement("div")}function n(a,c,b){var d=document.createElement("input");d.type= -"checkbox";d.checked="1"==c;mxEvent.addListener(d,"change",function(){f(a,d.checked?"1":"0",b)});return d}function q(c,b,q,p,l){var x=q.dispName,v=q.type,z=document.createElement("tr");z.className="gePropRow"+(l?"Dark":"")+(p?"Alt":"")+" gePropNonHeaderRow";z.setAttribute("data-pName",c);z.setAttribute("data-pValue",b);p=!1;null!=q.index&&(z.setAttribute("data-index",q.index),x=(null!=x?x:"")+"["+q.index+"]",p=!0);var B=document.createElement("td");B.className="gePropRowCell";B.innerHTML=mxUtils.htmlEntities(mxResources.get(x, -null,x));p&&(B.style.textAlign="right");z.appendChild(B);B=document.createElement("td");B.className="gePropRowCell";if("color"==v)B.appendChild(e(c,b,q));else if("bool"==v||"boolean"==v)B.appendChild(n(c,b,q));else if("enum"==v){var m=q.enumList;for(l=0;l<m.length;l++)if(x=m[l],x.val==b){B.innerHTML=mxUtils.htmlEntities(mxResources.get(x.dispName,null,x.dispName));break}mxEvent.addListener(B,"click",mxUtils.bind(t,function(){var e=document.createElement("select");d(B,e);for(var k=0;k<m.length;k++){var g= -m[k],n=document.createElement("option");n.value=mxUtils.htmlEntities(g.val);n.innerHTML=mxUtils.htmlEntities(mxResources.get(g.dispName,null,g.dispName));e.appendChild(n)}e.value=b;a.appendChild(e);mxEvent.addListener(e,"change",function(){var a=mxUtils.htmlEntities(e.value);f(c,a,q)});e.focus();mxEvent.addListener(e,"blur",function(){a.removeChild(e)})}))}else"dynamicArr"==v?B.appendChild(k(c,b,q.subType,q.subDefVal,q.countProperty,z,l)):"staticArr"==v?B.appendChild(g(c,b,q.subType,q.subDefVal,q.size, -z,l)):(B.innerHTML=b,mxEvent.addListener(B,"click",mxUtils.bind(t,function(){function e(){var a=k.value,a=0==a.length&&"string"!=v?0:a;q.allowAuto&&("auto"==a.trim().toLowerCase()?(a="auto",v="string"):(a=parseFloat(a),a=isNaN(a)?0:a));null!=q.min&&a<q.min?a=q.min:null!=q.max&&a>q.max&&(a=q.max);a=mxUtils.htmlEntities(("int"==v?parseInt(a):a)+"");f(c,a,q)}var k=document.createElement("input");d(B,k,!0);k.value=b;k.className="gePropEditor";"int"!=v&&"float"!=v||q.allowAuto||(k.type="number",k.step= -"int"==v?"1":"any",null!=q.min&&(k.min=parseFloat(q.min)),null!=q.max&&(k.max=parseFloat(q.max)));a.appendChild(k);mxEvent.addListener(k,"keypress",function(a){13==a.keyCode&&e()});k.focus();mxEvent.addListener(k,"blur",function(){e()})})));q.isDeletable&&(l=mxUtils.button("-",mxUtils.bind(t,function(a){f(c,"",q,q.index);mxEvent.consume(a)})),l.style.height="16px",l.style.width="25px",l.style["float"]="right",l.className="geColorBtn",B.appendChild(l));z.appendChild(B);return z}var t=this,p=this.editorUi.editor.graph, -l=[];a.style.position="relative";a.style.padding="0";var x=document.createElement("table");x.style.whiteSpace="nowrap";x.style.width="100%";var v=document.createElement("tr");v.className="gePropHeader";var z=document.createElement("th");z.className="gePropHeaderCell";var m=document.createElement("img");m.src=Sidebar.prototype.expandedImage;z.appendChild(m);mxUtils.write(z,mxResources.get("property"));v.style.cursor="pointer";var r=function(){var c=x.querySelectorAll(".gePropNonHeaderRow"),b;if(t.editorUi.propertiesCollapsed){m.src= -Sidebar.prototype.collapsedImage;b="none";for(var f=a.childNodes.length-1;0<=f;f--)try{var d=a.childNodes[f],e=d.nodeName.toUpperCase();"INPUT"!=e&&"SELECT"!=e||a.removeChild(d)}catch(I){}}else m.src=Sidebar.prototype.expandedImage,b="";for(f=0;f<c.length;f++)c[f].style.display=b};mxEvent.addListener(v,"click",function(){t.editorUi.propertiesCollapsed=!t.editorUi.propertiesCollapsed;r()});v.appendChild(z);z=document.createElement("th");z.className="gePropHeaderCell";z.innerHTML=mxResources.get("value"); -v.appendChild(z);x.appendChild(v);var C=!1,F=!1,D;for(D in c)if(v=c[D],"function"!=typeof v.isVisible||v.isVisible(b)){var u=null!=b.style[D]?mxUtils.htmlEntities(b.style[D]+""):v.defVal;if("separator"==v.type)F=!F;else{if("staticArr"==v.type)v.size=parseInt(b.style[v.sizeProperty]||c[v.sizeProperty].defVal)||0;else if(null!=v.dependentProps){for(var K=v.dependentProps,y=[],A=[],z=0;z<K.length;z++){var H=b.style[K[z]];A.push(c[K[z]].subDefVal);y.push(null!=H?H.split(","):[])}v.dependentPropsDefVal= -A;v.dependentPropsVals=y}x.appendChild(q(D,u,v,C,F));C=!C}}for(z=0;z<l.length;z++)for(v=l[z],c=v.parentRow,b=0;b<v.values.length;b++)D=q(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),c.parentNode.insertBefore(D,c.nextSibling),c=D;a.appendChild(x);r();return a};StyleFormatPanel.prototype.addStyles=function(a){function c(a){function c(a){var c=mxUtils.button("",function(c){f.getModel().beginUpdate(); -try{var b=f.getSelectionCells();for(c=0;c<b.length;c++){for(var d=f.getModel().getStyle(b[c]),k=0;k<e.length;k++)d=mxUtils.removeStylename(d,e[k]);var g=f.getModel().isVertex(b[c])?f.defaultVertexStyle:f.defaultEdgeStyle;null!=a?(d=mxUtils.setStyle(d,mxConstants.STYLE_GRADIENTCOLOR,a.gradient||mxUtils.getValue(g,mxConstants.STYLE_GRADIENTCOLOR,null)),d=""==a.fill?mxUtils.setStyle(d,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(d,mxConstants.STYLE_FILLCOLOR,a.fill||mxUtils.getValue(g,mxConstants.STYLE_FILLCOLOR, -null)),d=""==a.stroke?mxUtils.setStyle(d,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(d,mxConstants.STYLE_STROKECOLOR,a.stroke||mxUtils.getValue(g,mxConstants.STYLE_STROKECOLOR,null)),f.getModel().isVertex(b[c])&&(d=mxUtils.setStyle(d,mxConstants.STYLE_FONTCOLOR,a.font||mxUtils.getValue(g,mxConstants.STYLE_FONTCOLOR,null)))):(d=mxUtils.setStyle(d,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(g,mxConstants.STYLE_FILLCOLOR,"#ffffff")),d=mxUtils.setStyle(d,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(g, -mxConstants.STYLE_STROKECOLOR,"#000000")),d=mxUtils.setStyle(d,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(g,mxConstants.STYLE_GRADIENTCOLOR,null)),f.getModel().isVertex(b[c])&&(d=mxUtils.setStyle(d,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(g,mxConstants.STYLE_FONTCOLOR,null))));f.getModel().setStyle(b[c],d)}}finally{f.getModel().endUpdate()}});c.className="geStyleButton";c.style.width="36px";c.style.height="30px";c.style.margin="0px 6px 6px 0px";if(null!=a)null!=a.gradient?mxClient.IS_IE&& +function(a){this.editorUi.actions.get("pasteStyle").funct()}));c.setAttribute("title",mxResources.get("pasteStyle")+" ("+this.editorUi.actions.get("pasteStyle").shortcut+")");c.style.marginBottom="2px";c.style.width="100px";a.appendChild(c);mxUtils.br(a);return f.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=function(a,c,b){function f(a,c,b,f){t.getModel().beginUpdate();try{var d=[],e=[];if(null!=b.index){for(var g=[],l=b.parentRow.nextSibling;l&& +l.getAttribute("data-pName")==a;)g.push(l.getAttribute("data-pValue")),l=l.nextSibling;b.index<g.length?null!=f?g.splice(f,1):g[b.index]=c:g.push(c);null!=b.size&&g.length>b.size&&(g=g.slice(0,b.size));c=g.join(",");null!=b.countProperty&&(t.setCellStyles(b.countProperty,g.length,t.getSelectionCells()),d.push(b.countProperty),e.push(g.length))}t.setCellStyles(a,c,t.getSelectionCells());d.push(a);e.push(c);if(null!=b.dependentProps)for(a=0;a<b.dependentProps.length;a++){var n=b.dependentPropsDefVal[a], +q=b.dependentPropsVals[a];if(q.length>c)q=q.slice(0,c);else for(var v=q.length;v<c;v++)q.push(n);q=q.join(",");t.setCellStyles(b.dependentProps[a],q,t.getSelectionCells());d.push(b.dependentProps[a]);e.push(q)}if("function"==typeof b.onChange)b.onChange(t,c);p.editorUi.fireEvent(new mxEventObject("styleChanged","keys",d,"values",e,"cells",t.getSelectionCells()))}finally{t.getModel().endUpdate()}}function d(c,b,f){var d=mxUtils.getOffset(a,!0),e=mxUtils.getOffset(c,!0);b.style.position="absolute"; +b.style.left=e.x-d.x+"px";b.style.top=e.y-d.y+"px";b.style.width=c.offsetWidth+"px";b.style.height=c.offsetHeight-(f?4:0)+"px";b.style.zIndex=5}function e(a,c,b){var d=document.createElement("div");d.style.width="32px";d.style.height="4px";d.style.margin="2px";d.style.border="1px solid black";d.style.background=c&&"none"!=c?c:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(p,function(e){this.editorUi.pickColor(c,function(c){d.style.background="none"==c?"url('"+Dialog.prototype.noColorImage+ +"')":c;f(a,c,b)});mxEvent.consume(e)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(d);return btn}function g(a,c,b,d,e,g,l){null!=c&&(c=c.split(","),v.push({name:a,values:c,type:b,defVal:d,countProperty:e,parentRow:g,isDeletable:!0,flipBkg:l}));btn=mxUtils.button("+",mxUtils.bind(p,function(c){for(var n=g,p=0;null!=n.nextSibling;)if(n.nextSibling.getAttribute("data-pName")==a)n=n.nextSibling,p++;else break;var t={type:b,parentRow:g,index:p,isDeletable:!0, +defVal:d,countProperty:e},p=q(a,"",t,0==p%2,l);f(a,d,t);n.parentNode.insertBefore(p,n.nextSibling);mxEvent.consume(c)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function l(a,c,b,f,d,e,g){if(0<d){var l=Array(d);c=null!=c?c.split(","):[];for(var n=0;n<d;n++)l[n]=null!=c[n]?c[n]:null!=f?f:"";v.push({name:a,values:l,type:b,defVal:f,parentRow:e,flipBkg:g,size:d})}return document.createElement("div")}function n(a,c,b){var d=document.createElement("input");d.type= +"checkbox";d.checked="1"==c;mxEvent.addListener(d,"change",function(){f(a,d.checked?"1":"0",b)});return d}function q(c,b,q,t,v){var x=q.dispName,k=q.type,A=document.createElement("tr");A.className="gePropRow"+(v?"Dark":"")+(t?"Alt":"")+" gePropNonHeaderRow";A.setAttribute("data-pName",c);A.setAttribute("data-pValue",b);t=!1;null!=q.index&&(A.setAttribute("data-index",q.index),x=(null!=x?x:"")+"["+q.index+"]",t=!0);var m=document.createElement("td");m.className="gePropRowCell";m.innerHTML=mxUtils.htmlEntities(mxResources.get(x, +null,x));t&&(m.style.textAlign="right");A.appendChild(m);m=document.createElement("td");m.className="gePropRowCell";if("color"==k)m.appendChild(e(c,b,q));else if("bool"==k||"boolean"==k)m.appendChild(n(c,b,q));else if("enum"==k){var B=q.enumList;for(v=0;v<B.length;v++)if(x=B[v],x.val==b){m.innerHTML=mxUtils.htmlEntities(mxResources.get(x.dispName,null,x.dispName));break}mxEvent.addListener(m,"click",mxUtils.bind(p,function(){var e=document.createElement("select");d(m,e);for(var g=0;g<B.length;g++){var l= +B[g],n=document.createElement("option");n.value=mxUtils.htmlEntities(l.val);n.innerHTML=mxUtils.htmlEntities(mxResources.get(l.dispName,null,l.dispName));e.appendChild(n)}e.value=b;a.appendChild(e);mxEvent.addListener(e,"change",function(){var a=mxUtils.htmlEntities(e.value);f(c,a,q)});e.focus();mxEvent.addListener(e,"blur",function(){a.removeChild(e)})}))}else"dynamicArr"==k?m.appendChild(g(c,b,q.subType,q.subDefVal,q.countProperty,A,v)):"staticArr"==k?m.appendChild(l(c,b,q.subType,q.subDefVal,q.size, +A,v)):(m.innerHTML=b,mxEvent.addListener(m,"click",mxUtils.bind(p,function(){function e(){var a=g.value,a=0==a.length&&"string"!=k?0:a;q.allowAuto&&("auto"==a.trim().toLowerCase()?(a="auto",k="string"):(a=parseFloat(a),a=isNaN(a)?0:a));null!=q.min&&a<q.min?a=q.min:null!=q.max&&a>q.max&&(a=q.max);a=mxUtils.htmlEntities(("int"==k?parseInt(a):a)+"");f(c,a,q)}var g=document.createElement("input");d(m,g,!0);g.value=b;g.className="gePropEditor";"int"!=k&&"float"!=k||q.allowAuto||(g.type="number",g.step= +"int"==k?"1":"any",null!=q.min&&(g.min=parseFloat(q.min)),null!=q.max&&(g.max=parseFloat(q.max)));a.appendChild(g);mxEvent.addListener(g,"keypress",function(a){13==a.keyCode&&e()});g.focus();mxEvent.addListener(g,"blur",function(){e()})})));q.isDeletable&&(v=mxUtils.button("-",mxUtils.bind(p,function(a){f(c,"",q,q.index);mxEvent.consume(a)})),v.style.height="16px",v.style.width="25px",v.style["float"]="right",v.className="geColorBtn",m.appendChild(v));A.appendChild(m);return A}var p=this,t=this.editorUi.editor.graph, +v=[];a.style.position="relative";a.style.padding="0";var x=document.createElement("table");x.style.whiteSpace="nowrap";x.style.width="100%";var k=document.createElement("tr");k.className="gePropHeader";var A=document.createElement("th");A.className="gePropHeaderCell";var m=document.createElement("img");m.src=Sidebar.prototype.expandedImage;A.appendChild(m);mxUtils.write(A,mxResources.get("property"));k.style.cursor="pointer";var C=function(){var c=x.querySelectorAll(".gePropNonHeaderRow"),b;if(p.editorUi.propertiesCollapsed){m.src= +Sidebar.prototype.collapsedImage;b="none";for(var f=a.childNodes.length-1;0<=f;f--)try{var d=a.childNodes[f],e=d.nodeName.toUpperCase();"INPUT"!=e&&"SELECT"!=e||a.removeChild(d)}catch(I){}}else m.src=Sidebar.prototype.expandedImage,b="";for(f=0;f<c.length;f++)c[f].style.display=b};mxEvent.addListener(k,"click",function(){p.editorUi.propertiesCollapsed=!p.editorUi.propertiesCollapsed;C()});k.appendChild(A);A=document.createElement("th");A.className="gePropHeaderCell";A.innerHTML=mxResources.get("value"); +k.appendChild(A);x.appendChild(k);var r=!1,D=!1,E;for(E in c)if(k=c[E],"function"!=typeof k.isVisible||k.isVisible(b)){var u=null!=b.style[E]?mxUtils.htmlEntities(b.style[E]+""):k.defVal;if("separator"==k.type)D=!D;else{if("staticArr"==k.type)k.size=parseInt(b.style[k.sizeProperty]||c[k.sizeProperty].defVal)||0;else if(null!=k.dependentProps){for(var K=k.dependentProps,y=[],z=[],A=0;A<K.length;A++){var G=b.style[K[A]];z.push(c[K[A]].subDefVal);y.push(null!=G?G.split(","):[])}k.dependentPropsDefVal= +z;k.dependentPropsVals=y}x.appendChild(q(E,u,k,r,D));r=!r}}for(A=0;A<v.length;A++)for(k=v[A],c=k.parentRow,b=0;b<k.values.length;b++)E=q(k.name,k.values[b],{type:k.type,parentRow:k.parentRow,isDeletable:k.isDeletable,index:b,defVal:k.defVal,countProperty:k.countProperty,size:k.size},0==b%2,k.flipBkg),c.parentNode.insertBefore(E,c.nextSibling),c=E;a.appendChild(x);C();return a};StyleFormatPanel.prototype.addStyles=function(a){function c(a){function c(a){var c=mxUtils.button("",function(c){f.getModel().beginUpdate(); +try{var b=f.getSelectionCells();for(c=0;c<b.length;c++){for(var d=f.getModel().getStyle(b[c]),g=0;g<e.length;g++)d=mxUtils.removeStylename(d,e[g]);var l=f.getModel().isVertex(b[c])?f.defaultVertexStyle:f.defaultEdgeStyle;null!=a?(d=mxUtils.setStyle(d,mxConstants.STYLE_GRADIENTCOLOR,a.gradient||mxUtils.getValue(l,mxConstants.STYLE_GRADIENTCOLOR,null)),d=""==a.fill?mxUtils.setStyle(d,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(d,mxConstants.STYLE_FILLCOLOR,a.fill||mxUtils.getValue(l,mxConstants.STYLE_FILLCOLOR, +null)),d=""==a.stroke?mxUtils.setStyle(d,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(d,mxConstants.STYLE_STROKECOLOR,a.stroke||mxUtils.getValue(l,mxConstants.STYLE_STROKECOLOR,null)),f.getModel().isVertex(b[c])&&(d=mxUtils.setStyle(d,mxConstants.STYLE_FONTCOLOR,a.font||mxUtils.getValue(l,mxConstants.STYLE_FONTCOLOR,null)))):(d=mxUtils.setStyle(d,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(l,mxConstants.STYLE_FILLCOLOR,"#ffffff")),d=mxUtils.setStyle(d,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(l, +mxConstants.STYLE_STROKECOLOR,"#000000")),d=mxUtils.setStyle(d,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(l,mxConstants.STYLE_GRADIENTCOLOR,null)),f.getModel().isVertex(b[c])&&(d=mxUtils.setStyle(d,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(l,mxConstants.STYLE_FONTCOLOR,null))));f.getModel().setStyle(b[c],d)}}finally{f.getModel().endUpdate()}});c.className="geStyleButton";c.style.width="36px";c.style.height="30px";c.style.margin="0px 6px 6px 0px";if(null!=a)null!=a.gradient?mxClient.IS_IE&& (mxClient.IS_QUIRKS||10>document.documentMode)?c.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+a.fill+"', EndColorStr='"+a.gradient+"', GradientType=0)":c.style.backgroundImage="linear-gradient("+a.fill+" 0px,"+a.gradient+" 100%)":a.fill==mxConstants.NONE?c.style.background="url('"+Dialog.prototype.noColorImage+"')":c.style.backgroundColor=""==a.fill?mxUtils.getValue(f.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"dark"==uiTheme?"#000000":"#ffffff"):a.fill||mxUtils.getValue(f.defaultVertexStyle, -mxConstants.STYLE_FILLCOLOR,"dark"==uiTheme?"#000000":"#ffffff"),c.style.border=a.stroke==mxConstants.NONE?"1px solid transparent":""==a.stroke?"1px solid "+mxUtils.getValue(f.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"dark"!=uiTheme?"#000000":"#ffffff"):"1px solid "+(a.stroke||mxUtils.getValue(f.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"dark"!=uiTheme?"#000000":"#ffffff"));else{var b=mxUtils.getValue(f.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff"),k=mxUtils.getValue(f.defaultVertexStyle, -mxConstants.STYLE_STROKECOLOR,"#000000");c.style.backgroundColor=b;c.style.border="1px solid "+k}d.appendChild(c)}d.innerHTML="";for(var b=0;b<a.length;b++)0<b&&0==mxUtils.mod(b,4)&&mxUtils.br(d),c(a[b])}function b(a){mxEvent.addListener(a,"mouseenter",function(){a.style.opacity="1"});mxEvent.addListener(a,"mouseleave",function(){a.style.opacity="0.5"})}var f=this.editorUi.editor.graph,d=document.createElement("div");d.style.whiteSpace="nowrap";d.style.paddingLeft="24px";d.style.paddingRight="20px"; -a.style.paddingLeft="16px";a.style.paddingBottom="6px";a.style.position="relative";a.appendChild(d);var e="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" ");null==this.editorUi.currentScheme&&(this.editorUi.currentScheme=0);var k=document.createElement("div");k.style.cssText="position:absolute;left:10px;top:8px;bottom:8px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);"; -mxEvent.addListener(k,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme-1,this.defaultColorSchemes.length);c(this.defaultColorSchemes[this.editorUi.currentScheme])}));var g=document.createElement("div");g.style.cssText="position:absolute;left:202px;top:8px;bottom:8px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);"; -1<this.defaultColorSchemes.length&&(a.appendChild(k),a.appendChild(g));mxEvent.addListener(g,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme+1,this.defaultColorSchemes.length);c(this.defaultColorSchemes[this.editorUi.currentScheme])}));b(k);b(g);c(this.defaultColorSchemes[this.editorUi.currentScheme]);return a};StyleFormatPanel.prototype.addEditOps=function(a){var c=this.format.getSelectionState(),b=null;1==this.editorUi.editor.graph.getSelectionCount()&& +mxConstants.STYLE_FILLCOLOR,"dark"==uiTheme?"#000000":"#ffffff"),c.style.border=a.stroke==mxConstants.NONE?"1px solid transparent":""==a.stroke?"1px solid "+mxUtils.getValue(f.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"dark"!=uiTheme?"#000000":"#ffffff"):"1px solid "+(a.stroke||mxUtils.getValue(f.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"dark"!=uiTheme?"#000000":"#ffffff"));else{var b=mxUtils.getValue(f.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff"),g=mxUtils.getValue(f.defaultVertexStyle, +mxConstants.STYLE_STROKECOLOR,"#000000");c.style.backgroundColor=b;c.style.border="1px solid "+g}d.appendChild(c)}d.innerHTML="";for(var b=0;b<a.length;b++)0<b&&0==mxUtils.mod(b,4)&&mxUtils.br(d),c(a[b])}function b(a){mxEvent.addListener(a,"mouseenter",function(){a.style.opacity="1"});mxEvent.addListener(a,"mouseleave",function(){a.style.opacity="0.5"})}var f=this.editorUi.editor.graph,d=document.createElement("div");d.style.whiteSpace="nowrap";d.style.paddingLeft="24px";d.style.paddingRight="20px"; +a.style.paddingLeft="16px";a.style.paddingBottom="6px";a.style.position="relative";a.appendChild(d);var e="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" ");null==this.editorUi.currentScheme&&(this.editorUi.currentScheme=0);var g=document.createElement("div");g.style.cssText="position:absolute;left:10px;top:8px;bottom:8px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);"; +mxEvent.addListener(g,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme-1,this.defaultColorSchemes.length);c(this.defaultColorSchemes[this.editorUi.currentScheme])}));var l=document.createElement("div");l.style.cssText="position:absolute;left:202px;top:8px;bottom:8px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);"; +1<this.defaultColorSchemes.length&&(a.appendChild(g),a.appendChild(l));mxEvent.addListener(l,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme+1,this.defaultColorSchemes.length);c(this.defaultColorSchemes[this.editorUi.currentScheme])}));b(g);b(l);c(this.defaultColorSchemes[this.editorUi.currentScheme]);return a};StyleFormatPanel.prototype.addEditOps=function(a){var c=this.format.getSelectionState(),b=null;1==this.editorUi.editor.graph.getSelectionCount()&& (b=mxUtils.button(mxResources.get("editStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("editStyle").funct()})),b.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),b.style.width="202px",b.style.marginBottom="2px",a.appendChild(b));var f=this.editorUi.editor.graph,d=f.view.getState(f.getSelectionCell());1==f.getSelectionCount()&&null!=d&&null!=d.shape&&null!=d.shape.stencil?(c=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this, function(a){this.editorUi.actions.get("editShape").funct()})),c.setAttribute("title",mxResources.get("editShape")),c.style.marginBottom="2px",null==b?c.style.width="202px":(b.style.width="100px",c.style.width="100px",c.style.marginLeft="2px"),a.appendChild(c)):c.image&&(c=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(a){this.editorUi.actions.get("image").funct()})),c.setAttribute("title",mxResources.get("editImage")),c.style.marginBottom="2px",null==b?c.style.width="202px": (b.style.width="100px",c.style.width="100px",c.style.marginLeft="2px"),a.appendChild(c));return a}}Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize= -"3";Graph.prototype.edgeMode="move"!=urlParams.edge;var k=Graph.prototype.init;Graph.prototype.init=function(){function a(a){c=a;try{if(mxClient.IS_QUIRKS||7==document.documentMode||8==document.documentMode)c=document.createEventObject(a),c.type=a.type,c.canBubble=a.canBubble,c.cancelable=a.cancelable,c.view=a.view,c.detail=a.detail,c.screenX=a.screenX,c.screenY=a.screenY,c.clientX=a.clientX,c.clientY=a.clientY,c.ctrlKey=a.ctrlKey,c.altKey=a.altKey,c.shiftKey=a.shiftKey,c.metaKey=a.metaKey,c.button= -a.button,c.relatedTarget=a.relatedTarget}catch(M){}}k.apply(this,arguments);window.mxFreehand&&(this.freehand=new mxFreehand(this));var c=null;mxEvent.addListener(this.container,"mouseenter",a);mxEvent.addListener(this.container,"mousemove",a);mxEvent.addListener(this.container,"mouseleave",function(a){c=null});this.isMouseInsertPoint=function(){return null!=c};var b=this.getInsertPoint;this.getInsertPoint=function(){return null!=c?this.getPointForEvent(c):b.apply(this,arguments)};var f=this.layoutManager.getLayout; +"3";Graph.prototype.edgeMode="move"!=urlParams.edge;var g=Graph.prototype.init;Graph.prototype.init=function(){function a(a){c=a;try{if(mxClient.IS_QUIRKS||7==document.documentMode||8==document.documentMode)c=document.createEventObject(a),c.type=a.type,c.canBubble=a.canBubble,c.cancelable=a.cancelable,c.view=a.view,c.detail=a.detail,c.screenX=a.screenX,c.screenY=a.screenY,c.clientX=a.clientX,c.clientY=a.clientY,c.ctrlKey=a.ctrlKey,c.altKey=a.altKey,c.shiftKey=a.shiftKey,c.metaKey=a.metaKey,c.button= +a.button,c.relatedTarget=a.relatedTarget}catch(O){}}g.apply(this,arguments);window.mxFreehand&&(this.freehand=new mxFreehand(this));var c=null;mxEvent.addListener(this.container,"mouseenter",a);mxEvent.addListener(this.container,"mousemove",a);mxEvent.addListener(this.container,"mouseleave",function(a){c=null});this.isMouseInsertPoint=function(){return null!=c};var b=this.getInsertPoint;this.getInsertPoint=function(){return null!=c?this.getPointForEvent(c):b.apply(this,arguments)};var f=this.layoutManager.getLayout; this.layoutManager.getLayout=function(a){var c=this.graph.getCellStyle(a);if(null!=c){if("rack"==c.childLayout){var b=new mxStackLayout(this.graph,!1);b.gridSize=null!=c.rackUnitSize?parseFloat(c.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;b.fill=!0;b.marginLeft=c.marginLeft||0;b.marginRight=c.marginRight||0;b.marginTop=c.marginTop||0;b.marginBottom=c.marginBottom||0;b.allowGaps=c.allowGaps||0;b.resizeParent=!1;return b}if("undefined"!==typeof mxTableLayout&&"tableLayout"== c.childLayout)return b=new mxTableLayout(this.graph),b.rows=c.tableRows||2,b.columns=c.tableColumns||2,b.colPercentages=c.colPercentages,b.rowPercentages=c.rowPercentages,b.equalColumns="1"==mxUtils.getValue(c,"equalColumns",b.colPercentages?"0":"1"),b.equalRows="1"==mxUtils.getValue(c,"equalRows",b.rowPercentages?"0":"1"),b.resizeParent="1"==mxUtils.getValue(c,"resizeParent","1"),b.border=c.tableBorder||b.border,b.marginLeft=c.marginLeft||0,b.marginRight=c.marginRight||0,b.marginTop=c.marginTop|| -0,b.marginBottom=c.marginBottom||0,b.autoAddCol="1"==mxUtils.getValue(c,"autoAddCol","0"),b.autoAddRow="1"==mxUtils.getValue(c,"autoAddRow",b.autoAddCol?"0":"1"),b.colWidths=c.colWidths||"100",b.rowHeights=c.rowHeights||"50",b}return f.apply(this,arguments)}};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};var q=Graph.prototype.getSvg; -Graph.prototype.getSvg=function(){var a=null;null!=this.themes&&"darkTheme"==this.defaultThemeName&&(a=this.stylesheet,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var c=q.apply(this,arguments);null!=a&&(this.stylesheet=a,this.refresh());return c};var n=Graph.prototype.isCssTransformsSupported;Graph.prototype.isCssTransformsSupported=function(){return n.apply(this,arguments)&&!mxClient.IS_SF};var g=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(a){var c= -g.apply(this,arguments);if(null==c){if(null==this.globalUrlVars&&null!=urlParams.vars)try{this.globalUrlVars=JSON.parse(decodeURIComponent(urlParams.vars))}catch(K){null!=window.console&&console.log("Error in vars URL parameter: "+K)}null!=this.globalUrlVars&&(c=this.globalUrlVars[a])}return c};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 z=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){z.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(a){if("data:action/json,"==a.substring(0,17)&&(a=JSON.parse(a.substring(17)),null!=a.actions)){for(var c=0;c< -a.actions.length;c++){var b=a.actions[c];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(c=0;c<a.actions.length;c++)b=a.actions[c],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(c=0;c<a.actions.length;c++){var b= -a.actions[c],f=[];null!=b.select&&this.isEnabled()&&(f=this.getCellsForAction(b.select),this.setSelectionCells(f));null!=b.highlight&&(f=this.getCellsForAction(b.highlight),this.highlightCells(f,b.highlight.color,b.highlight.duration,b.highlight.opacity));null!=b.scroll&&(f=this.getCellsForAction(b.scroll));0<f.length&&this.scrollCellToVisible(f[0])}}};Graph.prototype.getCellsForAction=function(a,c){return this.getCellsById(a.cells).concat(this.getCellsForTags(a.tags,null,null,c))};Graph.prototype.getCellsById= -function(a){var c=[];if(null!=a)for(var b=0;b<a.length;b++)if("*"==a[b])var f=this.getDefaultParent(),c=c.concat(this.model.filterDescendants(function(a){return a!=f},f));else{var d=this.model.getCell(a[b]);null!=d&&c.push(d)}return c};Graph.prototype.getCellsForTags=function(a,c,b,f){var d=[];if(null!=a){c=null!=c?c:this.model.getDescendants(this.model.getRoot());b=null!=b?b:"tags";for(var e=0,k={},g=0;g<a.length;g++)0<a[g].length&&(k[a[g].toLowerCase()]=!0,e++);for(g=0;g<c.length;g++)if(f&&this.model.getParent(c[g])== -this.model.root||this.model.isVertex(c[g])||this.model.isEdge(c[g])){var n=null!=c[g].value&&"object"==typeof c[g].value?mxUtils.trim(c[g].value.getAttribute(b)||""):"",q=!1;if(0<n.length){if(n=n.toLowerCase().split(" "),n.length>=a.length){for(var t=q=0;t<n.length&&q<e;t++)null!=k[n[t]]&&q++;q=q==e}}else q=0==a.length;q&&d.push(c[g])}}return d};Graph.prototype.toggleCells=function(a){this.model.beginUpdate();try{for(var c=0;c<a.length;c++)this.model.setVisible(a[c],!this.model.isVisible(a[c]))}finally{this.model.endUpdate()}}; -Graph.prototype.setCellsVisible=function(a,c){this.model.beginUpdate();try{for(var b=0;b<a.length;b++)this.model.setVisible(a[b],c)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(a,c,b,f){for(var d=0;d<a.length;d++)this.highlightCell(a[d],c,b,f)};Graph.prototype.highlightCell=function(a,c,b,f){c=null!=c?c:mxConstants.DEFAULT_VALID_COLOR;b=null!=b?b:1E3;a=this.view.getState(a);if(null!=a){var d=Math.max(5,mxUtils.getValue(a.style,mxConstants.STYLE_STROKEWIDTH,1)+4),e=new mxCellHighlight(this, -c,d,!1);null!=f&&(e.opacity=f);e.highlight(a);window.setTimeout(function(){null!=e.shape&&(mxUtils.setPrefixedStyle(e.shape.node.style,"transition","all 1200ms ease-in-out"),e.shape.node.style.opacity=0);window.setTimeout(function(){e.destroy()},1200)},b)}};Graph.prototype.addSvgShadow=function(a,c,b){b=null!=b?b:!1;var f=a.ownerDocument,d=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"filter"):f.createElement("filter");d.setAttribute("id",this.shadowId);var e=null!=f.createElementNS? -f.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):f.createElement("feGaussianBlur");e.setAttribute("in","SourceAlpha");e.setAttribute("stdDeviation",this.svgShadowBlur);e.setAttribute("result","blur");d.appendChild(e);e=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feOffset"):f.createElement("feOffset");e.setAttribute("in","blur");e.setAttribute("dx",this.svgShadowSize);e.setAttribute("dy",this.svgShadowSize);e.setAttribute("result","offsetBlur");d.appendChild(e);e=null!=f.createElementNS? -f.createElementNS(mxConstants.NS_SVG,"feFlood"):f.createElement("feFlood");e.setAttribute("flood-color",this.svgShadowColor);e.setAttribute("flood-opacity",this.svgShadowOpacity);e.setAttribute("result","offsetColor");d.appendChild(e);e=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feComposite"):f.createElement("feComposite");e.setAttribute("in","offsetColor");e.setAttribute("in2","offsetBlur");e.setAttribute("operator","in");e.setAttribute("result","offsetBlur");d.appendChild(e); -e=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feBlend"):f.createElement("feBlend");e.setAttribute("in","SourceGraphic");e.setAttribute("in2","offsetBlur");d.appendChild(e);e=a.getElementsByTagName("defs");0==e.length?(f=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"defs"):f.createElement("defs"),null!=a.firstChild?a.insertBefore(f,a.firstChild):a.appendChild(f)):f=e[0];f.appendChild(d);b||(c=null!=c?c:a.getElementsByTagName("g")[0],null!=c&&(c.setAttribute("filter", -"url(#"+this.shadowId+")"),isNaN(parseInt(a.getAttribute("width")))||(a.setAttribute("width",parseInt(a.getAttribute("width"))+6),a.setAttribute("height",parseInt(a.getAttribute("height"))+6),c=a.getAttribute("viewBox"),null!=c&&0<c.length&&(c=c.split(" "),3<c.length&&(w=parseFloat(c[2])+6,h=parseFloat(c[3])+6,a.setAttribute("viewBox",c[0]+" "+c[1]+" "+w+" "+h))))));return d};Graph.prototype.setShadowVisible=function(a,c){mxClient.IS_SVG&&(c=null!=c?c:!0,(this.shadowVisible=a)?this.view.getDrawPane().setAttribute("filter", -"url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),c&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var a=this.model.getChildCount(this.model.root),c,b=0;do c=this.model.getChildAt(this.model.root,b);while(b++<a&&"1"==mxUtils.getValue(this.getCellStyle(c),"locked","0"));null!=c&&this.setDefaultParent(c)}};mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"]; -mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.atlassian=[STENCIL_PATH+"/atlassian.xml",SHAPES_PATH+"/mxAtlassian.js"];mxStencilRegistry.libraries.bpmn=[SHAPES_PATH+"/bpmn/mxBpmnShape2.js",STENCIL_PATH+"/bpmn.xml"];mxStencilRegistry.libraries.dfd=[SHAPES_PATH+"/mxDFD.js"];mxStencilRegistry.libraries.er=[SHAPES_PATH+"/er/mxER.js"];mxStencilRegistry.libraries.flowchart=[SHAPES_PATH+"/mxFlowchart.js",STENCIL_PATH+"/flowchart.xml"];mxStencilRegistry.libraries.ios= -[SHAPES_PATH+"/mockup/mxMockupiOS.js"];mxStencilRegistry.libraries.rackGeneral=[SHAPES_PATH+"/rack/mxRack.js",STENCIL_PATH+"/rack/general.xml"];mxStencilRegistry.libraries.rackF5=[STENCIL_PATH+"/rack/f5.xml"];mxStencilRegistry.libraries.lean_mapping=[SHAPES_PATH+"/mxLeanMap.js",STENCIL_PATH+"/lean_mapping.xml"];mxStencilRegistry.libraries.basic=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/basic.xml"];mxStencilRegistry.libraries.ios7icons=[STENCIL_PATH+"/ios7/icons.xml"];mxStencilRegistry.libraries.ios7ui= -[SHAPES_PATH+"/ios7/mxIOS7Ui.js",STENCIL_PATH+"/ios7/misc.xml"];mxStencilRegistry.libraries.android=[SHAPES_PATH+"/mxAndroid.js",STENCIL_PATH+"/android/android.xml"];mxStencilRegistry.libraries["electrical/miscellaneous"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/miscellaneous.xml"];mxStencilRegistry.libraries["electrical/transmission"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/transmission.xml"];mxStencilRegistry.libraries["electrical/logic_gates"]=[SHAPES_PATH+"/mxElectrical.js", -STENCIL_PATH+"/electrical/logic_gates.xml"];mxStencilRegistry.libraries["electrical/abstract"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/abstract.xml"];mxStencilRegistry.libraries.infographic=[SHAPES_PATH+"/mxInfographic.js"];mxStencilRegistry.libraries["mockup/buttons"]=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries["mockup/containers"]=[SHAPES_PATH+"/mockup/mxMockupContainers.js"];mxStencilRegistry.libraries["mockup/forms"]=[SHAPES_PATH+"/mockup/mxMockupForms.js"]; -mxStencilRegistry.libraries["mockup/graphics"]=[SHAPES_PATH+"/mockup/mxMockupGraphics.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/markup"]=[SHAPES_PATH+"/mockup/mxMockupMarkup.js"];mxStencilRegistry.libraries["mockup/misc"]=[SHAPES_PATH+"/mockup/mxMockupMisc.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/navigation"]=[SHAPES_PATH+"/mockup/mxMockupNavigation.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/text"]=[SHAPES_PATH+ -"/mockup/mxMockupText.js"];mxStencilRegistry.libraries.floorplan=[SHAPES_PATH+"/mxFloorplan.js",STENCIL_PATH+"/floorplan.xml"];mxStencilRegistry.libraries.bootstrap=[SHAPES_PATH+"/mxBootstrap.js",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.xml"];mxStencilRegistry.libraries.gcp2=[SHAPES_PATH+"/mxGCP2.js",STENCIL_PATH+"/gcp2.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];mxStencilRegistry.libraries.archimate= -[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.aws4=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+ -"/aws4.xml"];mxStencilRegistry.libraries.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.pid2inst=[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors= -[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(a){var c=null;null!=a&&0<a.length&&("ER"==a.substring(0,2)?c="mxgraph.er":"sysML"==a.substring(0,5)&&(c="mxgraph.sysml"));return c};var t=mxMarker.createMarker;mxMarker.createMarker=function(a,c,b,f,d,e,k,g,n,q){if(null!=b&&null==mxMarker.markers[b]){var l=this.getPackageForType(b);null!=l&&mxStencilRegistry.getStencil(l)}return t.apply(this,arguments)};PrintDialog.prototype.create=function(a,c){function b(){v.value=Math.max(1, -Math.min(g,Math.max(parseInt(v.value),parseInt(x.value))));x.value=Math.max(1,Math.min(g,Math.min(parseInt(v.value),parseInt(x.value))))}function f(c){function b(c,b,d){var e=c.getGraphBounds(),k=0,g=0,n=ea.get(),q=1/c.pageScale,t=r.checked;if(t)var q=parseInt(L.value),l=parseInt(T.value),q=Math.min(n.height*l/(e.height/c.view.scale),n.width*q/(e.width/c.view.scale));else q=parseInt(m.value)/(100*c.pageScale),isNaN(q)&&(f=1/c.pageScale,m.value="100 %");n=mxRectangle.fromRectangle(n);n.width=Math.ceil(n.width* -f);n.height=Math.ceil(n.height*f);q*=f;!t&&c.pageVisible?(e=c.getPageLayout(),k-=e.x*n.width,g-=e.y*n.height):t=!0;if(null==b){b=PrintDialog.createPrintPreview(c,q,n,0,k,g,t);b.pageSelector=!1;b.mathEnabled=!1;c=a.getCurrentFile();null!=c&&(b.title=c.getTitle());var x=b.writeHead;b.writeHead=function(c){x.apply(this,arguments);null!=a.editor.fontCss&&(c.writeln('<style type="text/css">'),c.writeln(a.editor.fontCss),c.writeln("</style>"))};if("undefined"!==typeof MathJax){var v=b.renderPage;b.renderPage= -function(a,c,b,f,d,e){var k=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;var g=v.apply(this,arguments);mxClient.NO_FO=k;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:g.className="geDisableMathJax";return g}}b.open(null,null,d,!0)}else{n=c.background;if(null==n||""==n||n==mxConstants.NONE)n="#ffffff";b.backgroundColor=n;b.autoOrigin=t;b.appendGraph(c,q,k,g,d,!0)}return b}var f=parseInt(fa.value)/100;isNaN(f)&&(f= -1,fa.value="100 %");var f=.75*f,e=x.value,k=v.value,g=!t.checked,q=null;g&&(g=e==n&&k==n);if(!g&&null!=a.pages&&a.pages.length){var l=0,g=a.pages.length-1;t.checked||(l=parseInt(e)-1,g=parseInt(k)-1);for(var p=l;p<=g;p++){var z=a.pages[p],e=z==a.currentPage?d:null;if(null==e){var e=a.createTemporaryGraph(d.getStylesheet()),k=!0,l=!1,B=null,F=null;null==z.viewState&&null==z.root&&a.updatePageRoot(z);null!=z.viewState&&(k=z.viewState.pageVisible,l=z.viewState.mathEnabled,B=z.viewState.background,F= -z.viewState.backgroundImage);e.background=B;e.backgroundImage=null!=F?new mxImage(F.src,F.width,F.height):null;e.pageVisible=k;e.mathEnabled=l;var D=e.getGlobalVariable;e.getGlobalVariable=function(a){return"page"==a?z.getName():"pagenumber"==a?p+1:D.apply(this,arguments)};document.body.appendChild(e.container);a.updatePageRoot(z);e.model.setRoot(z.root)}q=b(e,q,p!=g);e!=d&&e.container.parentNode.removeChild(e.container)}}else q=b(d);null==q?a.handleError({message:mxResources.get("errorUpdatingPreview")}): -(q.mathEnabled&&(g=q.wnd.document,g.writeln('<script type="text/x-mathjax-config">'),g.writeln("MathJax.Hub.Config({"),g.writeln("showMathMenu: false,"),g.writeln('messageStyle: "none",'),g.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],'),g.writeln('extensions: ["tex2jax.js", "mml2jax.js", "asciimath2jax.js"],'),g.writeln('"HTML-CSS": {'),g.writeln("imageFont: null"),g.writeln("},"),g.writeln("TeX: {"),g.writeln('extensions: ["AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js"]'), -g.writeln("},"),g.writeln("tex2jax: {"),g.writeln('\tignoreClass: "geDisableMathJax"'),g.writeln("},"),g.writeln("asciimath2jax: {"),g.writeln('\tignoreClass: "geDisableMathJax"'),g.writeln("}"),g.writeln("});"),c&&(g.writeln("MathJax.Hub.Queue(function () {"),g.writeln("window.print();"),g.writeln("});")),g.writeln("\x3c/script>"),g.writeln('<script type="text/javascript" src="'+DRAW_MATH_URL+'/MathJax.js">\x3c/script>')),q.closeDocument(),!q.mathEnabled&&c&&PrintDialog.printPreview(q))}var d=a.editor.graph, -e=document.createElement("div"),k=document.createElement("h3");k.style.width="100%";k.style.textAlign="center";k.style.marginTop="0px";mxUtils.write(k,c||mxResources.get("print"));e.appendChild(k);var g=1,n=1,q=document.createElement("div");q.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");q.appendChild(t);k=document.createElement("span");mxUtils.write(k,mxResources.get("printAllPages"));q.appendChild(k);mxUtils.br(q);var l=t.cloneNode(!0);t.setAttribute("checked","checked");l.setAttribute("value","range");q.appendChild(l);k=document.createElement("span");mxUtils.write(k,mxResources.get("pages")+":");q.appendChild(k);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";q.appendChild(x);k=document.createElement("span");mxUtils.write(k,mxResources.get("to"));q.appendChild(k);var v=x.cloneNode(!0);q.appendChild(v);mxEvent.addListener(x,"focus",function(){l.checked=!0});mxEvent.addListener(v,"focus",function(){l.checked=!0});mxEvent.addListener(x,"change",b);mxEvent.addListener(v,"change",b);if(null!=a.pages&&(g=a.pages.length,null!=a.currentPage))for(k=0;k<a.pages.length;k++)if(a.currentPage==a.pages[k]){n=k+1;x.value=n;v.value=n;break}x.setAttribute("max", -g);v.setAttribute("max",g);1<g&&e.appendChild(q);var p=document.createElement("div");p.style.marginBottom="10px";var z=document.createElement("input");z.style.marginRight="8px";z.setAttribute("value","adjust");z.setAttribute("type","radio");z.setAttribute("name","printZoom");p.appendChild(z);k=document.createElement("span");mxUtils.write(k,mxResources.get("adjustTo"));p.appendChild(k);var m=document.createElement("input");m.style.cssText="margin:0 8px 0 8px;";m.setAttribute("value","100 %");m.style.width= -"50px";p.appendChild(m);mxEvent.addListener(m,"focus",function(){z.checked=!0});e.appendChild(p);var q=q.cloneNode(!1),r=z.cloneNode(!0);r.setAttribute("value","fit");z.setAttribute("checked","checked");k=document.createElement("div");k.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";k.appendChild(r);q.appendChild(k);p=document.createElement("table");p.style.display="inline-block";var F=document.createElement("tbody"),D=document.createElement("tr"),u=D.cloneNode(!0), -C=document.createElement("td"),y=C.cloneNode(!0),A=C.cloneNode(!0),N=C.cloneNode(!0),H=C.cloneNode(!0),ba=C.cloneNode(!0);C.style.textAlign="right";N.style.textAlign="right";mxUtils.write(C,mxResources.get("fitTo"));var L=document.createElement("input");L.style.cssText="margin:0 8px 0 8px;";L.setAttribute("value","1");L.setAttribute("min","1");L.setAttribute("type","number");L.style.width="40px";y.appendChild(L);k=document.createElement("span");mxUtils.write(k,mxResources.get("fitToSheetsAcross")); -A.appendChild(k);mxUtils.write(N,mxResources.get("fitToBy"));var T=L.cloneNode(!0);H.appendChild(T);mxEvent.addListener(L,"focus",function(){r.checked=!0});mxEvent.addListener(T,"focus",function(){r.checked=!0});k=document.createElement("span");mxUtils.write(k,mxResources.get("fitToSheetsDown"));ba.appendChild(k);D.appendChild(C);D.appendChild(y);D.appendChild(A);u.appendChild(N);u.appendChild(H);u.appendChild(ba);F.appendChild(D);F.appendChild(u);p.appendChild(F);q.appendChild(p);e.appendChild(q); -q=document.createElement("div");k=document.createElement("div");k.style.fontWeight="bold";k.style.marginBottom="12px";mxUtils.write(k,mxResources.get("paperSize"));q.appendChild(k);k=document.createElement("div");k.style.marginBottom="12px";var ea=PageSetupDialog.addPageFormatPanel(k,"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);q.appendChild(k);k=document.createElement("span");mxUtils.write(k,mxResources.get("pageScale"));q.appendChild(k);var fa=document.createElement("input"); -fa.style.cssText="margin:0 8px 0 8px;";fa.setAttribute("value","100 %");fa.style.width="60px";q.appendChild(fa);e.appendChild(q);k=document.createElement("div");k.style.cssText="text-align:right;margin:48px 0 0 0;";q=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});q.className="geBtn";a.editor.cancelFirst&&k.appendChild(q);a.isOffline()||(p=mxUtils.button(mxResources.get("help"),function(){d.openLink("https://desk.draw.io/support/solutions/articles/16000048947")}),p.className= -"geBtn",k.appendChild(p));PrintDialog.previewEnabled&&(p=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();f(!1)}),p.className="geBtn",k.appendChild(p));p=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();f(!0)});p.className="geBtn gePrimaryBtn";k.appendChild(p);a.editor.cancelFirst||k.appendChild(q);e.appendChild(k);this.container=e};var F=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)):(F.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!= +0,b.marginBottom=c.marginBottom||0,b.autoAddCol="1"==mxUtils.getValue(c,"autoAddCol","0"),b.autoAddRow="1"==mxUtils.getValue(c,"autoAddRow",b.autoAddCol?"0":"1"),b.colWidths=c.colWidths||"100",b.rowHeights=c.rowHeights||"50",b}return f.apply(this,arguments)};this.updateGlobalUrlVariables()};Graph.prototype.updateGlobalUrlVariables=function(){if(null!=urlParams.vars)try{this.globalUrlVars=JSON.parse(decodeURIComponent(urlParams.vars))}catch(p){null!=window.console&&console.log("Error in vars URL parameter: "+ +p)}};Graph.prototype.getExportVariables=function(){return null!=this.globalUrlVars?this.globalUrlVars:{}};var q=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(a){var c=q.apply(this,arguments);null==c&&null!=this.globalUrlVars&&(c=this.globalUrlVars[a]);return c};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}; +var n=Graph.prototype.getSvg;Graph.prototype.getSvg=function(){var a=null;null!=this.themes&&"darkTheme"==this.defaultThemeName&&(a=this.stylesheet,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var c=n.apply(this,arguments);null!=a&&(this.stylesheet=a,this.refresh());return c};var l=Graph.prototype.isCssTransformsSupported;Graph.prototype.isCssTransformsSupported=function(){return l.apply(this,arguments)&&!mxClient.IS_SF};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 A=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){A.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(a){if("data:action/json,"== +a.substring(0,17)&&(a=JSON.parse(a.substring(17)),null!=a.actions)){for(var c=0;c<a.actions.length;c++){var b=a.actions[c];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(c=0;c<a.actions.length;c++)b=a.actions[c],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(c=0;c<a.actions.length;c++){var b=a.actions[c],f=[];null!=b.select&&this.isEnabled()&&(f=this.getCellsForAction(b.select),this.setSelectionCells(f));null!=b.highlight&&(f=this.getCellsForAction(b.highlight),this.highlightCells(f,b.highlight.color,b.highlight.duration,b.highlight.opacity));null!=b.scroll&&(f=this.getCellsForAction(b.scroll));0<f.length&&this.scrollCellToVisible(f[0])}}};Graph.prototype.getCellsForAction=function(a,c){return this.getCellsById(a.cells).concat(this.getCellsForTags(a.tags, +null,null,c))};Graph.prototype.getCellsById=function(a){var c=[];if(null!=a)for(var b=0;b<a.length;b++)if("*"==a[b])var f=this.getDefaultParent(),c=c.concat(this.model.filterDescendants(function(a){return a!=f},f));else{var d=this.model.getCell(a[b]);null!=d&&c.push(d)}return c};Graph.prototype.getCellsForTags=function(a,c,b,f){var d=[];if(null!=a){c=null!=c?c:this.model.getDescendants(this.model.getRoot());b=null!=b?b:"tags";for(var e=0,g={},l=0;l<a.length;l++)0<a[l].length&&(g[a[l].toLowerCase()]= +!0,e++);for(l=0;l<c.length;l++)if(f&&this.model.getParent(c[l])==this.model.root||this.model.isVertex(c[l])||this.model.isEdge(c[l])){var n=null!=c[l].value&&"object"==typeof c[l].value?mxUtils.trim(c[l].value.getAttribute(b)||""):"",q=!1;if(0<n.length){if(n=n.toLowerCase().split(" "),n.length>=a.length){for(var t=q=0;t<n.length&&q<e;t++)null!=g[n[t]]&&q++;q=q==e}}else q=0==a.length;q&&d.push(c[l])}}return d};Graph.prototype.toggleCells=function(a){this.model.beginUpdate();try{for(var c=0;c<a.length;c++)this.model.setVisible(a[c], +!this.model.isVisible(a[c]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(a,c){this.model.beginUpdate();try{for(var b=0;b<a.length;b++)this.model.setVisible(a[b],c)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(a,c,b,f){for(var d=0;d<a.length;d++)this.highlightCell(a[d],c,b,f)};Graph.prototype.highlightCell=function(a,c,b,f){c=null!=c?c:mxConstants.DEFAULT_VALID_COLOR;b=null!=b?b:1E3;a=this.view.getState(a);if(null!=a){var d=Math.max(5,mxUtils.getValue(a.style, +mxConstants.STYLE_STROKEWIDTH,1)+4),e=new mxCellHighlight(this,c,d,!1);null!=f&&(e.opacity=f);e.highlight(a);window.setTimeout(function(){null!=e.shape&&(mxUtils.setPrefixedStyle(e.shape.node.style,"transition","all 1200ms ease-in-out"),e.shape.node.style.opacity=0);window.setTimeout(function(){e.destroy()},1200)},b)}};Graph.prototype.addSvgShadow=function(a,c,b){b=null!=b?b:!1;var f=a.ownerDocument,d=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"filter"):f.createElement("filter"); +d.setAttribute("id",this.shadowId);var e=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):f.createElement("feGaussianBlur");e.setAttribute("in","SourceAlpha");e.setAttribute("stdDeviation",this.svgShadowBlur);e.setAttribute("result","blur");d.appendChild(e);e=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feOffset"):f.createElement("feOffset");e.setAttribute("in","blur");e.setAttribute("dx",this.svgShadowSize);e.setAttribute("dy",this.svgShadowSize);e.setAttribute("result", +"offsetBlur");d.appendChild(e);e=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feFlood"):f.createElement("feFlood");e.setAttribute("flood-color",this.svgShadowColor);e.setAttribute("flood-opacity",this.svgShadowOpacity);e.setAttribute("result","offsetColor");d.appendChild(e);e=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feComposite"):f.createElement("feComposite");e.setAttribute("in","offsetColor");e.setAttribute("in2","offsetBlur");e.setAttribute("operator","in"); +e.setAttribute("result","offsetBlur");d.appendChild(e);e=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feBlend"):f.createElement("feBlend");e.setAttribute("in","SourceGraphic");e.setAttribute("in2","offsetBlur");d.appendChild(e);e=a.getElementsByTagName("defs");0==e.length?(f=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"defs"):f.createElement("defs"),null!=a.firstChild?a.insertBefore(f,a.firstChild):a.appendChild(f)):f=e[0];f.appendChild(d);b||(c=null!=c?c:a.getElementsByTagName("g")[0], +null!=c&&(c.setAttribute("filter","url(#"+this.shadowId+")"),isNaN(parseInt(a.getAttribute("width")))||(a.setAttribute("width",parseInt(a.getAttribute("width"))+6),a.setAttribute("height",parseInt(a.getAttribute("height"))+6),c=a.getAttribute("viewBox"),null!=c&&0<c.length&&(c=c.split(" "),3<c.length&&(w=parseFloat(c[2])+6,h=parseFloat(c[3])+6,a.setAttribute("viewBox",c[0]+" "+c[1]+" "+w+" "+h))))));return d};Graph.prototype.setShadowVisible=function(a,c){mxClient.IS_SVG&&(c=null!=c?c:!0,(this.shadowVisible= +a)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),c&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var a=this.model.getChildCount(this.model.root),c,b=0;do c=this.model.getChildAt(this.model.root,b);while(b++<a&&"1"==mxUtils.getValue(this.getCellStyle(c),"locked","0"));null!=c&&this.setDefaultParent(c)}};mxStencilRegistry.libraries.mockup= +[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.atlassian=[STENCIL_PATH+"/atlassian.xml",SHAPES_PATH+"/mxAtlassian.js"];mxStencilRegistry.libraries.bpmn=[SHAPES_PATH+"/bpmn/mxBpmnShape2.js",STENCIL_PATH+"/bpmn.xml"];mxStencilRegistry.libraries.dfd=[SHAPES_PATH+"/mxDFD.js"];mxStencilRegistry.libraries.er=[SHAPES_PATH+"/er/mxER.js"];mxStencilRegistry.libraries.flowchart=[SHAPES_PATH+"/mxFlowchart.js",STENCIL_PATH+ +"/flowchart.xml"];mxStencilRegistry.libraries.ios=[SHAPES_PATH+"/mockup/mxMockupiOS.js"];mxStencilRegistry.libraries.rackGeneral=[SHAPES_PATH+"/rack/mxRack.js",STENCIL_PATH+"/rack/general.xml"];mxStencilRegistry.libraries.rackF5=[STENCIL_PATH+"/rack/f5.xml"];mxStencilRegistry.libraries.lean_mapping=[SHAPES_PATH+"/mxLeanMap.js",STENCIL_PATH+"/lean_mapping.xml"];mxStencilRegistry.libraries.basic=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/basic.xml"];mxStencilRegistry.libraries.ios7icons=[STENCIL_PATH+ +"/ios7/icons.xml"];mxStencilRegistry.libraries.ios7ui=[SHAPES_PATH+"/ios7/mxIOS7Ui.js",STENCIL_PATH+"/ios7/misc.xml"];mxStencilRegistry.libraries.android=[SHAPES_PATH+"/mxAndroid.js",STENCIL_PATH+"/android/android.xml"];mxStencilRegistry.libraries["electrical/miscellaneous"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/miscellaneous.xml"];mxStencilRegistry.libraries["electrical/transmission"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/transmission.xml"];mxStencilRegistry.libraries["electrical/logic_gates"]= +[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/logic_gates.xml"];mxStencilRegistry.libraries["electrical/abstract"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/abstract.xml"];mxStencilRegistry.libraries.infographic=[SHAPES_PATH+"/mxInfographic.js"];mxStencilRegistry.libraries["mockup/buttons"]=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries["mockup/containers"]=[SHAPES_PATH+"/mockup/mxMockupContainers.js"];mxStencilRegistry.libraries["mockup/forms"]= +[SHAPES_PATH+"/mockup/mxMockupForms.js"];mxStencilRegistry.libraries["mockup/graphics"]=[SHAPES_PATH+"/mockup/mxMockupGraphics.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/markup"]=[SHAPES_PATH+"/mockup/mxMockupMarkup.js"];mxStencilRegistry.libraries["mockup/misc"]=[SHAPES_PATH+"/mockup/mxMockupMisc.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/navigation"]=[SHAPES_PATH+"/mockup/mxMockupNavigation.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/text"]= +[SHAPES_PATH+"/mockup/mxMockupText.js"];mxStencilRegistry.libraries.floorplan=[SHAPES_PATH+"/mxFloorplan.js",STENCIL_PATH+"/floorplan.xml"];mxStencilRegistry.libraries.bootstrap=[SHAPES_PATH+"/mxBootstrap.js",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.xml"];mxStencilRegistry.libraries.gcp2=[SHAPES_PATH+"/mxGCP2.js",STENCIL_PATH+"/gcp2.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"]; +mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.aws4= +[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.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.pid2inst=[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"]; +mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(a){var c=null;null!=a&&0<a.length&&("ER"==a.substring(0,2)?c="mxgraph.er":"sysML"==a.substring(0,5)&&(c="mxgraph.sysml"));return c};var t=mxMarker.createMarker;mxMarker.createMarker=function(a,c,b,f,d,e,g,l,n,q){if(null!=b&&null==mxMarker.markers[b]){var v=this.getPackageForType(b);null!=v&&mxStencilRegistry.getStencil(v)}return t.apply(this,arguments)};PrintDialog.prototype.create= +function(a,c){function b(){k.value=Math.max(1,Math.min(l,Math.max(parseInt(k.value),parseInt(x.value))));x.value=Math.max(1,Math.min(l,Math.min(parseInt(k.value),parseInt(x.value))))}function f(c){function b(c,b,d){var e=c.getGraphBounds(),g=0,l=0,n=ea.get(),q=1/c.pageScale,t=r.checked;if(t)var q=parseInt(L.value),v=parseInt(T.value),q=Math.min(n.height*v/(e.height/c.view.scale),n.width*q/(e.width/c.view.scale));else q=parseInt(m.value)/(100*c.pageScale),isNaN(q)&&(f=1/c.pageScale,m.value="100 %"); +n=mxRectangle.fromRectangle(n);n.width=Math.ceil(n.width*f);n.height=Math.ceil(n.height*f);q*=f;!t&&c.pageVisible?(e=c.getPageLayout(),g-=e.x*n.width,l-=e.y*n.height):t=!0;if(null==b){b=PrintDialog.createPrintPreview(c,q,n,0,g,l,t);b.pageSelector=!1;b.mathEnabled=!1;c=a.getCurrentFile();null!=c&&(b.title=c.getTitle());var x=b.writeHead;b.writeHead=function(c){x.apply(this,arguments);null!=a.editor.fontCss&&(c.writeln('<style type="text/css">'),c.writeln(a.editor.fontCss),c.writeln("</style>"))};if("undefined"!== +typeof MathJax){var k=b.renderPage;b.renderPage=function(a,c,b,f,d,e){var g=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;var l=k.apply(this,arguments);mxClient.NO_FO=g;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:l.className="geDisableMathJax";return l}}b.open(null,null,d,!0)}else{n=c.background;if(null==n||""==n||n==mxConstants.NONE)n="#ffffff";b.backgroundColor=n;b.autoOrigin=t;b.appendGraph(c,q,g,l,d,!0)}return b} +var f=parseInt(fa.value)/100;isNaN(f)&&(f=1,fa.value="100 %");var f=.75*f,e=x.value,g=k.value,l=!t.checked,q=null;l&&(l=e==n&&g==n);if(!l&&null!=a.pages&&a.pages.length){var v=0,l=a.pages.length-1;t.checked||(v=parseInt(e)-1,l=parseInt(g)-1);for(var p=v;p<=l;p++){var A=a.pages[p],e=A==a.currentPage?d:null;if(null==e){var e=a.createTemporaryGraph(d.getStylesheet()),g=!0,v=!1,B=null,D=null;null==A.viewState&&null==A.root&&a.updatePageRoot(A);null!=A.viewState&&(g=A.viewState.pageVisible,v=A.viewState.mathEnabled, +B=A.viewState.background,D=A.viewState.backgroundImage);e.background=B;e.backgroundImage=null!=D?new mxImage(D.src,D.width,D.height):null;e.pageVisible=g;e.mathEnabled=v;var E=e.getGlobalVariable;e.getGlobalVariable=function(a){return"page"==a?A.getName():"pagenumber"==a?p+1:E.apply(this,arguments)};document.body.appendChild(e.container);a.updatePageRoot(A);e.model.setRoot(A.root)}q=b(e,q,p!=l);e!=d&&e.container.parentNode.removeChild(e.container)}}else q=b(d);null==q?a.handleError({message:mxResources.get("errorUpdatingPreview")}): +(q.mathEnabled&&(l=q.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("});"),c&&(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>')),q.closeDocument(),!q.mathEnabled&&c&&PrintDialog.printPreview(q))}var d=a.editor.graph, +e=document.createElement("div"),g=document.createElement("h3");g.style.width="100%";g.style.textAlign="center";g.style.marginTop="0px";mxUtils.write(g,c||mxResources.get("print"));e.appendChild(g);var l=1,n=1,q=document.createElement("div");q.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");q.appendChild(t);g=document.createElement("span");mxUtils.write(g,mxResources.get("printAllPages"));q.appendChild(g);mxUtils.br(q);var v=t.cloneNode(!0);t.setAttribute("checked","checked");v.setAttribute("value","range");q.appendChild(v);g=document.createElement("span");mxUtils.write(g,mxResources.get("pages")+":");q.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";q.appendChild(x);g=document.createElement("span");mxUtils.write(g,mxResources.get("to"));q.appendChild(g);var k=x.cloneNode(!0);q.appendChild(k);mxEvent.addListener(x,"focus",function(){v.checked=!0});mxEvent.addListener(k,"focus",function(){v.checked=!0});mxEvent.addListener(x,"change",b);mxEvent.addListener(k,"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;k.value=n;break}x.setAttribute("max", +l);k.setAttribute("max",l);1<l&&e.appendChild(q);var p=document.createElement("div");p.style.marginBottom="10px";var A=document.createElement("input");A.style.marginRight="8px";A.setAttribute("value","adjust");A.setAttribute("type","radio");A.setAttribute("name","printZoom");p.appendChild(A);g=document.createElement("span");mxUtils.write(g,mxResources.get("adjustTo"));p.appendChild(g);var m=document.createElement("input");m.style.cssText="margin:0 8px 0 8px;";m.setAttribute("value","100 %");m.style.width= +"50px";p.appendChild(m);mxEvent.addListener(m,"focus",function(){A.checked=!0});e.appendChild(p);var q=q.cloneNode(!1),r=A.cloneNode(!0);r.setAttribute("value","fit");A.setAttribute("checked","checked");g=document.createElement("div");g.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";g.appendChild(r);q.appendChild(g);p=document.createElement("table");p.style.display="inline-block";var D=document.createElement("tbody"),E=document.createElement("tr"),u=E.cloneNode(!0), +C=document.createElement("td"),y=C.cloneNode(!0),z=C.cloneNode(!0),N=C.cloneNode(!0),G=C.cloneNode(!0),ba=C.cloneNode(!0);C.style.textAlign="right";N.style.textAlign="right";mxUtils.write(C,mxResources.get("fitTo"));var L=document.createElement("input");L.style.cssText="margin:0 8px 0 8px;";L.setAttribute("value","1");L.setAttribute("min","1");L.setAttribute("type","number");L.style.width="40px";y.appendChild(L);g=document.createElement("span");mxUtils.write(g,mxResources.get("fitToSheetsAcross")); +z.appendChild(g);mxUtils.write(N,mxResources.get("fitToBy"));var T=L.cloneNode(!0);G.appendChild(T);mxEvent.addListener(L,"focus",function(){r.checked=!0});mxEvent.addListener(T,"focus",function(){r.checked=!0});g=document.createElement("span");mxUtils.write(g,mxResources.get("fitToSheetsDown"));ba.appendChild(g);E.appendChild(C);E.appendChild(y);E.appendChild(z);u.appendChild(N);u.appendChild(G);u.appendChild(ba);D.appendChild(E);D.appendChild(u);p.appendChild(D);q.appendChild(p);e.appendChild(q); +q=document.createElement("div");g=document.createElement("div");g.style.fontWeight="bold";g.style.marginBottom="12px";mxUtils.write(g,mxResources.get("paperSize"));q.appendChild(g);g=document.createElement("div");g.style.marginBottom="12px";var ea=PageSetupDialog.addPageFormatPanel(g,"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);q.appendChild(g);g=document.createElement("span");mxUtils.write(g,mxResources.get("pageScale"));q.appendChild(g);var fa=document.createElement("input"); +fa.style.cssText="margin:0 8px 0 8px;";fa.setAttribute("value","100 %");fa.style.width="60px";q.appendChild(fa);e.appendChild(q);g=document.createElement("div");g.style.cssText="text-align:right;margin:48px 0 0 0;";q=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});q.className="geBtn";a.editor.cancelFirst&&g.appendChild(q);a.isOffline()||(p=mxUtils.button(mxResources.get("help"),function(){d.openLink("https://desk.draw.io/support/solutions/articles/16000048947")}),p.className= +"geBtn",g.appendChild(p));PrintDialog.previewEnabled&&(p=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();f(!1)}),p.className="geBtn",g.appendChild(p));p=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();f(!0)});p.className="geBtn gePrimaryBtn";g.appendChild(p);a.editor.cancelFirst||g.appendChild(q);e.appendChild(g);this.container=e};var E=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&& +(this.page=this.ui.currentPage);this.page!=this.ui.currentPage?null!=this.page.viewState&&(this.ignoreColor||(this.page.viewState.background=this.color),this.ignoreImage||(this.page.viewState.backgroundImage=this.image),null!=this.format&&(this.page.viewState.pageFormat=this.format),null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled),null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)):(E.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!= this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible))};Editor.prototype.useCanvasForExport=!1;try{var v=document.createElement("canvas"),D=new Image;D.onload=function(){try{v.getContext("2d").drawImage(D,0,0);var a=v.toDataURL("image/png");Editor.prototype.useCanvasForExport= null!=a&&6<a.length}catch(C){}};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(p){}})(); (function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,e,d){d.ui=a.ui;return e};a.afterDecode=function(a,e,d){d.previousColor=d.color;d.previousImage=d.image;d.previousFormat=d.format;null!=d.foldingEnabled&&(d.foldingEnabled=!d.foldingEnabled);null!=d.mathEnabled&&(d.mathEnabled=!d.mathEnabled);null!=d.shadowVisible&&(d.shadowVisible=!d.shadowVisible);return d};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="@DRAWIO-VERSION@";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.enableLogging="1"!=urlParams.stealth&&/.*\.draw\.io$/.test(window.location.hostname)&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost="https://www.draw.io";EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl="1"==urlParams.dev?"/cache":"https://rt.draw.io/cache";EditorUi.enablePlantUml= EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.scratchpadHelpLink="https://desk.draw.io/support/solutions/articles/16000042367";EditorUi.logError=function(a,b,d,e,n){if("1"==urlParams.dev)EditorUi.debug("logError",a,b,d,e,n);else if(EditorUi.enableLogging)try{if(a!=EditorUi.lastErrorMessage&&(null==a||null==b||-1==a.indexOf("Script error")&&-1==a.indexOf("extension"))&&null!=a&&0>a.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage= a;var c=0<=a.indexOf("NetworkError")||0<=a.indexOf("SecurityError")||0<=a.indexOf("NS_ERROR_FAILURE")||0<=a.indexOf("out of memory")?"CONFIG":"SEVERE",f=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";n=null!=n?n:Error(a);(new Image).src=f+"/log?severity="+c+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(a)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(d)+(null!=e?":colno:"+encodeURIComponent(e):"")+(null!=n&&null!=n.stack?"&stack="+ -encodeURIComponent(n.stack):"")}}catch(z){}};EditorUi.logEvent=function(a){if("1"==urlParams.dev)EditorUi.debug("logEvent",a);else if(EditorUi.enableLogging)try{var c=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=c+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=a?"&data="+encodeURIComponent(JSON.stringify(a)):"")}catch(k){}};EditorUi.sendReport=function(a,b){if("1"==urlParams.dev)EditorUi.debug("sendReport",a);else if(EditorUi.enableLogging)try{b=null!=b?b: -5E4,a.length>b&&(a=a.substring(0,b)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(a))}catch(k){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.dev){for(var a=[(new Date).toISOString()],b=0;b<arguments.length;b++)a.push(arguments[b]);console.log.apply(console,a)}}catch(k){}};EditorUi.parsePng=function(a,b,d){function c(a,c){var b=e;e+=c;return a.substring(b, -e)}function f(a){a=c(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}var e=0;if(c(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=d&&d();else if(c(a,4),"IHDR"!=c(a,4))null!=d&&d();else{c(a,17);do{d=f(a);var k=c(a,4);if(null!=b&&b(e-8,k,d))break;value=c(a,d);c(a,4);if("IEND"==k)break}while(d)}};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>'; +encodeURIComponent(n.stack):"")}}catch(A){}};EditorUi.logEvent=function(a){if("1"==urlParams.dev)EditorUi.debug("logEvent",a);else if(EditorUi.enableLogging)try{var c=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=c+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=a?"&data="+encodeURIComponent(JSON.stringify(a)):"")}catch(g){}};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(g){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.dev){for(var a=[(new Date).toISOString()],b=0;b<arguments.length;b++)a.push(arguments[b]);console.log.apply(console,a)}}catch(g){}};EditorUi.parsePng=function(a,b,d){function c(a,c){var b=e;e+=c;return a.substring(b, +e)}function f(a){a=c(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}var e=0;if(c(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=d&&d();else if(c(a,4),"IHDR"!=c(a,4))null!=d&&d();else{c(a,17);do{d=f(a);var g=c(a,4);if(null!=b&&b(e-8,g,d))break;value=c(a,d);c(a,4);if("IEND"==g)break}while(d)}};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(n){}try{var b=document.createElement("canvas"),d=new Image;d.onload=function(){try{b.getContext("2d").drawImage(d, -0,0);var a=b.toDataURL("image/png");EditorUi.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(n){}try{b=document.createElement("canvas");b.width=b.height=1;var e= +0,0);var a=b.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=a&&6<a.length}catch(l){}};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(n){}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(n){}})();EditorUi.prototype.openLink=function(a,b,d){return this.editor.graph.openLink(a,b,d)};EditorUi.prototype.showSplash=function(a){};EditorUi.prototype.getLocalData=function(a,b){b(localStorage.getItem(a))};EditorUi.prototype.setLocalData=function(a,b,d){localStorage.setItem(a,b);null!=d&&d()};EditorUi.prototype.removeLocalData=function(a,b){localStorage.removeItem(a);b()};EditorUi.prototype.setMathEnabled= function(a){this.editor.graph.mathEnabled=a;this.editor.updateGraphComponents();this.editor.graph.refresh();this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(a){return this.editor.graph.mathEnabled};EditorUi.prototype.isAppCache=function(){return"1"==urlParams.appcache||this.isOfflineApp()};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(a){return this.isOfflineApp()||!navigator.onLine|| -!a&&"1"==urlParams.stealth};EditorUi.prototype.createSpinner=function(a,b,d){d=null!=d?d:24;var c=new Spinner({lines:12,length:d,width:Math.round(d/3),radius:Math.round(d/2),rotate:0,color:"dark"==uiTheme?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),f=c.spin;c.spin=function(d,e){var k=!1;this.active||(f.call(this,d),this.active=!0,null!=e&&(k=document.createElement("div"),k.style.position="absolute",k.style.whiteSpace="nowrap",k.style.background="#4B4243",k.style.color="white", -k.style.fontFamily="Helvetica, Arial",k.style.fontSize="9pt",k.style.padding="6px",k.style.paddingLeft="10px",k.style.paddingRight="10px",k.style.zIndex=2E9,k.style.left=Math.max(0,a)+"px",k.style.top=Math.max(0,b+70)+"px",mxUtils.setPrefixedStyle(k.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(k.style,"transform","translate(-50%,-50%)"),"dark"!=uiTheme&&mxUtils.setPrefixedStyle(k.style,"boxShadow","2px 2px 3px 0px #ddd"),"..."!=e.substring(e.length-3,e.length)&&"!"!=e.charAt(e.length-1)&& -(e+="..."),k.innerHTML=e,d.appendChild(k),c.status=k,mxClient.IS_VML&&(null==document.documentMode||8>=document.documentMode)&&(k.style.left=Math.round(Math.max(0,a-k.offsetWidth/2))+"px",k.style.top=Math.round(Math.max(0,b+70-k.offsetHeight/2))+"px")),this.pause=mxUtils.bind(this,function(){var a=function(){};this.active&&(a=mxUtils.bind(this,function(){this.spin(d,e)}));this.stop();return a}),k=!0);return k};var e=c.stop;c.stop=function(){e.call(this);this.active=!1;null!=c.status&&(c.status.parentNode.removeChild(c.status), +!a&&"1"==urlParams.stealth};EditorUi.prototype.createSpinner=function(a,b,d){d=null!=d?d:24;var c=new Spinner({lines:12,length:d,width:Math.round(d/3),radius:Math.round(d/2),rotate:0,color:"dark"==uiTheme?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),f=c.spin;c.spin=function(d,e){var g=!1;this.active||(f.call(this,d),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,d.appendChild(g),c.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(d,e)}));this.stop();return a}),g=!0);return g};var e=c.stop;c.stop=function(){e.call(this);this.active=!1;null!=c.status&&(c.status.parentNode.removeChild(c.status), c.status=null)};c.pause=function(){return function(){}};return c};EditorUi.prototype.isCompatibleString=function(a){try{var c=mxUtils.parseXml(a),b=this.editor.extractGraphModel(c.documentElement,!0);return null!=b&&0==b.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(c){var b=a.apply(this,arguments);if(null==b)try{var d=c.indexOf("<mxfile ");if(0<=d){var e=c.lastIndexOf("</mxfile>");e>d&&(b=c.substring(d,e+15).replace(/>/g,">").replace(/</g,"<").replace(/\\"/g,'"').replace(/\n/g,""))}else var n=mxUtils.parseXml(c),g=this.editor.extractGraphModel(n.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility),b=null!=g?mxUtils.getXml(g):""}catch(x){}return b};EditorUi.prototype.validateFileData=function(a){if(null!= +function(c){var b=a.apply(this,arguments);if(null==b)try{var d=c.indexOf("<mxfile ");if(0<=d){var e=c.lastIndexOf("</mxfile>");e>d&&(b=c.substring(d,e+15).replace(/>/g,">").replace(/</g,"<").replace(/\\"/g,'"').replace(/\n/g,""))}else var n=mxUtils.parseXml(c),l=this.editor.extractGraphModel(n.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility),b=null!=l?mxUtils.getXml(l):""}catch(x){}return b};EditorUi.prototype.validateFileData=function(a){if(null!= a&&0<a.length){var c=a.indexOf('<meta charset="utf-8">');0<=c&&(a=a.slice(0,c)+'<meta charset="utf-8"/>'+a.slice(c+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 c=null!=a?this.editor.extractGraphModel(a,!0):null;null!=c&&(a=c);if(null!=a){c=this.editor.graph;c.model.beginUpdate();try{var b=null!=this.pages?this.pages.slice():null,d=a.getElementsByTagName("diagram"); -if("0"!=urlParams.pages||1<d.length||1==d.length&&d[0].hasAttribute("name")){this.fileNode=a;this.pages=null!=this.pages?this.pages:[];for(var e=d.length-1;0<=e;e--){var g=this.updatePageRoot(new DiagramPage(d[e]));null==g.getName()&&g.setName(mxResources.get("pageWithNumber",[e+1]));c.model.execute(new ChangePage(this,g,0==e?g:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=a.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")), -this.currentPage.setName(mxResources.get("pageWithNumber",[1])),c.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++)c.model.execute(new ChangePage(this,b[e],null))}finally{c.model.endUpdate()}}};EditorUi.prototype.createFileData=function(a,b,d,e,n,g,l,z,t,m,v){b=null!=b?b:this.editor.graph;n=null!=n?n:!1;t=null!=t?t:!0;var c,f=null;null== -d||d.getMode()==App.MODE_DEVICE||d.getMode()==App.MODE_BROWSER?c="_blank":f=c=e;if(null==a)return"";var k=a;if("mxfile"!=k.nodeName.toLowerCase()){if(v){var q=a.ownerDocument.createElement("diagram");q.setAttribute("id",Editor.guid());q.appendChild(a)}else{q=Graph.zapGremlins(mxUtils.getXml(a));k=Graph.compress(q);if(Graph.decompress(k)!=q)return q;q=a.ownerDocument.createElement("diagram");q.setAttribute("id",Editor.guid());mxUtils.setTextContent(q,k)}k=a.ownerDocument.createElement("mxfile");k.appendChild(q)}m? -(k=k.cloneNode(!0),k.removeAttribute("userAgent"),k.removeAttribute("version"),k.removeAttribute("editor"),k.removeAttribute("type")):(k.removeAttribute("userAgent"),k.removeAttribute("version"),k.removeAttribute("editor"),k.removeAttribute("type"),k.setAttribute("modified",(new Date).toISOString()),k.setAttribute("host",window.location.hostname),k.setAttribute("agent",navigator.userAgent),k.setAttribute("version",EditorUi.VERSION),k.setAttribute("etag",Editor.guid()),a=null!=d?d.getMode():this.mode, -null!=a&&k.setAttribute("type",a),v&&k.setAttribute("compressed","false"));v=v?mxUtils.getPrettyXml(k):mxUtils.getXml(k);if(!g&&!n&&(l||null!=d&&/(\.html)$/i.test(d.getTitle())))v=this.getHtml2(mxUtils.getXml(k),b,null!=d?d.getTitle():null,c,f);else if(g||!n&&null!=d&&/(\.svg)$/i.test(d.getTitle()))null==d||d.getMode()!=App.MODE_DEVICE&&d.getMode()!=App.MODE_BROWSER||(e=null),v=this.getEmbeddedSvg(v,b,e,null,z,t,f);return v};EditorUi.prototype.getXmlFileData=function(a,b,d){a=null!=a?a:!0;b=null!= -b?b:!1;var c=this.editor.getGraphXml(a);if(a&&null!=this.fileNode&&null!=this.currentPage)if(d?(EditorUi.removeChildNodes(this.currentPage.node),this.currentPage.node.appendChild(c)):(c=Graph.compressNode(c),mxUtils.setTextContent(this.currentPage.node,c)),c=this.fileNode.cloneNode(!1),b)c.appendChild(this.currentPage.node);else for(b=0;b<this.pages.length;b++)this.currentPage!=this.pages[b]&&(this.pages[b].needsUpdate?(a=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(this.pages[b].root)), +if("0"!=urlParams.pages||1<d.length||1==d.length&&d[0].hasAttribute("name")){this.fileNode=a;this.pages=null!=this.pages?this.pages:[];for(var e=d.length-1;0<=e;e--){var l=this.updatePageRoot(new DiagramPage(d[e]));null==l.getName()&&l.setName(mxResources.get("pageWithNumber",[e+1]));c.model.execute(new ChangePage(this,l,0==e?l: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])),c.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++)c.model.execute(new ChangePage(this,b[e],null))}finally{c.model.endUpdate()}}};EditorUi.prototype.createFileData=function(a,b,d,e,n,l,k,A,t,m,v){b=null!=b?b:this.editor.graph;n=null!=n?n:!1;t=null!=t?t:!0;var c,f=null;null== +d||d.getMode()==App.MODE_DEVICE||d.getMode()==App.MODE_BROWSER?c="_blank":f=c=e;if(null==a)return"";var g=a;if("mxfile"!=g.nodeName.toLowerCase()){if(v){var q=a.ownerDocument.createElement("diagram");q.setAttribute("id",Editor.guid());q.appendChild(a)}else{q=Graph.zapGremlins(mxUtils.getXml(a));g=Graph.compress(q);if(Graph.decompress(g)!=q)return q;q=a.ownerDocument.createElement("diagram");q.setAttribute("id",Editor.guid());mxUtils.setTextContent(q,g)}g=a.ownerDocument.createElement("mxfile");g.appendChild(q)}m? +(g=g.cloneNode(!0),g.removeAttribute("userAgent"),g.removeAttribute("version"),g.removeAttribute("editor"),g.removeAttribute("type")):(g.removeAttribute("userAgent"),g.removeAttribute("version"),g.removeAttribute("editor"),g.removeAttribute("type"),g.setAttribute("modified",(new Date).toISOString()),g.setAttribute("host",window.location.hostname),g.setAttribute("agent",navigator.userAgent),g.setAttribute("version",EditorUi.VERSION),g.setAttribute("etag",Editor.guid()),a=null!=d?d.getMode():this.mode, +null!=a&&g.setAttribute("type",a),null!=this.pages&&g.setAttribute("pages",this.pages.length),v&&g.setAttribute("compressed","false"));v=v?mxUtils.getPrettyXml(g):mxUtils.getXml(g);if(!l&&!n&&(k||null!=d&&/(\.html)$/i.test(d.getTitle())))v=this.getHtml2(mxUtils.getXml(g),b,null!=d?d.getTitle():null,c,f);else if(l||!n&&null!=d&&/(\.svg)$/i.test(d.getTitle()))null==d||d.getMode()!=App.MODE_DEVICE&&d.getMode()!=App.MODE_BROWSER||(e=null),v=this.getEmbeddedSvg(v,b,e,null,A,t,f);return v};EditorUi.prototype.getXmlFileData= +function(a,b,d){a=null!=a?a:!0;b=null!=b?b:!1;var c=this.editor.getGraphXml(a);if(a&&null!=this.fileNode&&null!=this.currentPage)if(d?(EditorUi.removeChildNodes(this.currentPage.node),this.currentPage.node.appendChild(c)):(c=Graph.compressNode(c),mxUtils.setTextContent(this.currentPage.node,c)),c=this.fileNode.cloneNode(!1),b)c.appendChild(this.currentPage.node);else for(b=0;b<this.pages.length;b++)this.currentPage!=this.pages[b]&&(this.pages[b].needsUpdate?(a=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(this.pages[b].root)), this.editor.graph.saveViewState(this.pages[b].viewState,a),d?(EditorUi.removeChildNodes(this.pages[b].node),this.pages[b].node.appendChild(a)):mxUtils.setTextContent(this.pages[b].node,Graph.compressNode(a)),delete this.pages[b].needsUpdate):d&&(a=Editor.parseDiagramNode(this.pages[b].node),EditorUi.removeChildNodes(this.pages[b].node),this.pages[b].node.appendChild(a))),c.appendChild(this.pages[b].node);return c};EditorUi.prototype.anonymizeString=function(a,b){for(var c=[],f=0;f<a.length;f++){var d= a.charAt(f);0<=EditorUi.ignoredAnonymizedChars.indexOf(d)?c.push(d):isNaN(parseInt(d))?d.toLowerCase()!=d?c.push(String.fromCharCode(65+Math.round(25*Math.random()))):d.toUpperCase()!=d?c.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(d)?c.push(" "):c.push("?"):c.push(b?"0":Math.round(9*Math.random()))}return c.join("")};EditorUi.prototype.anonymizePatch=function(a){if(null!=a[EditorUi.DIFF_INSERT])for(var c=0;c<a[EditorUi.DIFF_INSERT].length;c++)try{var b=mxUtils.parseXml(a[EditorUi.DIFF_INSERT][c].data).documentElement.cloneNode(!1); -null!=b.getAttribute("name")&&b.setAttribute("name",this.anonymizeString(b.getAttribute("name")));a[EditorUi.DIFF_INSERT][c].data=mxUtils.getXml(b)}catch(g){a[EditorUi.DIFF_INSERT][c].data=g.message}if(null!=a[EditorUi.DIFF_UPDATE]){for(var d in a[EditorUi.DIFF_UPDATE]){var e=a[EditorUi.DIFF_UPDATE][d];null!=e.name&&(e.name=this.anonymizeString(e.name));null!=e.cells&&(c=mxUtils.bind(this,function(a){var c=e.cells[a];if(null!=c){for(var b in c)null!=c[b].value&&(c[b].value="["+c[b].value.length+"]"), +null!=b.getAttribute("name")&&b.setAttribute("name",this.anonymizeString(b.getAttribute("name")));a[EditorUi.DIFF_INSERT][c].data=mxUtils.getXml(b)}catch(l){a[EditorUi.DIFF_INSERT][c].data=l.message}if(null!=a[EditorUi.DIFF_UPDATE]){for(var d in a[EditorUi.DIFF_UPDATE]){var e=a[EditorUi.DIFF_UPDATE][d];null!=e.name&&(e.name=this.anonymizeString(e.name));null!=e.cells&&(c=mxUtils.bind(this,function(a){var c=e.cells[a];if(null!=c){for(var b in c)null!=c[b].value&&(c[b].value="["+c[b].value.length+"]"), null!=c[b].xmlValue&&(c[b].xmlValue="["+c[b].xmlValue.length+"]"),null!=c[b].style&&(c[b].style="["+c[b].style.length+"]"),0==Object.keys(c[b]).length&&delete c[b];0==Object.keys(c).length&&delete e.cells[a]}}),c(EditorUi.DIFF_INSERT),c(EditorUi.DIFF_UPDATE),0==Object.keys(e.cells).length&&delete e.cells);0==Object.keys(e).length&&delete a[EditorUi.DIFF_UPDATE][d]}0==Object.keys(a[EditorUi.DIFF_UPDATE]).length&&delete a[EditorUi.DIFF_UPDATE]}return a};EditorUi.prototype.anonymizeAttributes=function(a, b){if(null!=a.attributes)for(var c=0;c<a.attributes.length;c++)"as"!=a.attributes[c].name&&a.setAttribute(a.attributes[c].name,this.anonymizeString(a.attributes[c].value,b));if(null!=a.childNodes)for(c=0;c<a.childNodes.length;c++)this.anonymizeAttributes(a.childNodes[c],b)};EditorUi.prototype.anonymizeNode=function(a,b){for(var c=a.getElementsByTagName("mxCell"),f=0;f<c.length;f++)null!=c[f].getAttribute("value")&&c[f].setAttribute("value","["+c[f].getAttribute("value").length+"]"),null!=c[f].getAttribute("xmlValue")&& c[f].setAttribute("xmlValue","["+c[f].getAttribute("xmlValue").length+"]"),null!=c[f].getAttribute("style")&&c[f].setAttribute("style","["+c[f].getAttribute("style").length+"]"),null!=c[f].parentNode&&"root"!=c[f].parentNode.nodeName&&null!=c[f].parentNode.parentNode&&(c[f].setAttribute("id",c[f].parentNode.getAttribute("id")),c[f].parentNode.parentNode.replaceChild(c[f],c[f].parentNode));return a};EditorUi.prototype.synchronizeCurrentFile=function(a){var c=this.getCurrentFile();null!=c&&(c.savingFile? this.handleError({message:mxResources.get("busy")}):!a&&c.invalidChecksum?c.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(c.clearAutosave(),this.editor.setStatus(""),a?c.reloadFile(mxUtils.bind(this,function(){c.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){c.handleFileError(a,!0)})):c.synchronizeFile(mxUtils.bind(this,function(){c.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){c.handleFileError(a, -!0)}))))};EditorUi.prototype.getFileData=function(a,b,d,e,n,g,l,z,t,m){n=null!=n?n:!0;l=null!=l?l:this.getXmlFileData(n,null!=g?g:!1,m);t=null!=t?t:this.getCurrentFile();g=this.editor.graph;if(null!=this.pages&&this.currentPage!=this.pages[0]&&(b||!a&&null!=t&&/(\.svg)$/i.test(t.getTitle()))){g=this.createTemporaryGraph(g.getStylesheet());var c=g.getGlobalVariable,f=this.pages[0];g.getGlobalVariable=function(a){return"page"==a?f.getName():"pagenumber"==a?1:c.apply(this,arguments)};document.body.appendChild(g.container); -g.model.setRoot(f.root)}a=this.createFileData(l,g,t,window.location.href,a,b,d,e,n,z,m);g!=this.editor.graph&&g.container.parentNode.removeChild(g.container);return a};EditorUi.prototype.getHtml=function(a,b,d,e,n,g){g=null!=g?g:!0;var c=null,f=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=b){var c=g?b.getGraphBounds():b.getBoundingBox(b.getSelectionCells()),k=b.view.scale;g=Math.floor(c.x/k-b.view.translate.x);k=Math.floor(c.y/k-b.view.translate.y);c=b.background;null==n&&(b=this.getBasenames().join(";"), -0<b.length&&(f=EditorUi.drawHost+"/embed.js?s="+b));a.setAttribute("x0",g);a.setAttribute("y0",k)}null!=a&&(a.setAttribute("pan","1"),a.setAttribute("zoom","1"),a.setAttribute("resize","0"),a.setAttribute("fit","0"),a.setAttribute("border","20"),a.setAttribute("links","1"),null!=e&&a.setAttribute("edit",e));null!=n&&(n=n.replace(/&/g,"&"));a=null!=a?Graph.zapGremlins(mxUtils.getXml(a)):"";e=Graph.compress(a);Graph.decompress(e)!=a&&(e=encodeURIComponent(a));return(null==n?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n': +!0)}))))};EditorUi.prototype.getFileData=function(a,b,d,e,n,l,k,m,t,r){n=null!=n?n:!0;k=null!=k?k:this.getXmlFileData(n,null!=l?l:!1,r);t=null!=t?t:this.getCurrentFile();l=this.editor.graph;if(null!=this.pages&&this.currentPage!=this.pages[0]&&(b||!a&&null!=t&&/(\.svg)$/i.test(t.getTitle()))){l=this.createTemporaryGraph(l.getStylesheet());var c=l.getGlobalVariable,f=this.pages[0];l.getGlobalVariable=function(a){return"page"==a?f.getName():"pagenumber"==a?1:c.apply(this,arguments)};document.body.appendChild(l.container); +l.model.setRoot(f.root)}a=this.createFileData(k,l,t,window.location.href,a,b,d,e,n,m,r);l!=this.editor.graph&&l.container.parentNode.removeChild(l.container);return a};EditorUi.prototype.getHtml=function(a,b,d,e,n,l){l=null!=l?l:!0;var c=null,f=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=b){var c=l?b.getGraphBounds():b.getBoundingBox(b.getSelectionCells()),g=b.view.scale;l=Math.floor(c.x/g-b.view.translate.x);g=Math.floor(c.y/g-b.view.translate.y);c=b.background;null==n&&(b=this.getBasenames().join(";"), +0<b.length&&(f=EditorUi.drawHost+"/embed.js?s="+b));a.setAttribute("x0",l);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!=n&&(n=n.replace(/&/g,"&"));a=null!=a?Graph.zapGremlins(mxUtils.getXml(a)):"";e=Graph.compress(a);Graph.decompress(e)!=a&&(e=encodeURIComponent(a));return(null==n?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n': "")+"<!DOCTYPE html>\n<html"+(null!=n?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==n?null!=d?"<title>"+mxUtils.htmlEntities(d)+"</title>\n":"":"<title>Draw.io Diagram</title>\n")+(null!=n?'<meta http-equiv="refresh" content="0;URL=\''+n+"'\"/>\n":"")+"</head>\n<body"+(null==n&&null!=c&&c!=mxConstants.NONE?' style="background-color:'+c+';">':">")+'\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==n?'<script type="text/javascript" src="'+f+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+n+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(a,b,d,e,n){b=EditorUi.drawHost+"/js/viewer.min.js";null!=n&&(n=n.replace(/&/g,"&"));a={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:Graph.zapGremlins(a), toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(a.page=mxUtils.indexOf(this.pages,this.currentPage));return(null==n?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=n?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==n?null!=d?"<title>"+mxUtils.htmlEntities(d)+"</title>\n":"":"<title>Draw.io Diagram</title>\n")+(null!=n?'<meta http-equiv="refresh" content="0;URL=\''+n+"'\"/>\n": @@ -2970,50 +2975,50 @@ toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&& this.validateFileData(a);this.pages=this.fileNode=this.currentPage=null;a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var c=null!=a?a.getElementsByTagName("parsererror"):null;if(null!=c&&0<c.length)throw a=mxResources.get("invalidOrMissingFile"),c=c[0].getElementsByTagName("div"),0<c.length&&(a=mxUtils.getTextContent(c[0])),Error(a);c=null!=a?this.editor.extractGraphModel(a,!0):null;null!=c&&(a=c);if(null!=a&&"mxfile"==a.nodeName&&(c=a.getElementsByTagName("diagram"),"0"!=urlParams.pages|| 1<c.length||1==c.length&&c[0].hasAttribute("name"))){var b=null;this.fileNode=a;this.pages=[];for(a=0;a<c.length;a++){null==c[a].getAttribute("id")&&c[a].setAttribute("id",a);var d=new DiagramPage(c[a]);null==d.getName()&&d.setName(mxResources.get("pageWithNumber",[a+1]));this.pages.push(d);null!=urlParams["page-id"]&&d.getId()==urlParams["page-id"]&&(b=d)}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)};EditorUi.prototype.getBaseFilename=function(a){var c=this.getCurrentFile(),c=null!=c&&null!=c.getTitle()?c.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(c)|| -/(\.html)$/i.test(c)||/(\.svg)$/i.test(c)||/(\.png)$/i.test(c)||/(\.drawio)$/i.test(c))c=c.substring(0,c.lastIndexOf("."));!a&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(c=c+"-"+this.currentPage.getName());return c};EditorUi.prototype.downloadFile=function(a,b,d,e,n,g,l,z,t,m){try{e=null!=e?e:this.editor.graph.isSelectionEmpty();var c=this.getBaseFilename(!n),f=c+"."+a;if("xml"==a){var k='<?xml version="1.0" encoding="UTF-8"?>\n'+ -this.getFileData(!0,null,null,null,e,n,null,null,null,b);this.saveData(f,a,k,"text/xml")}else if("html"==a)k=this.getHtml2(this.getFileData(!0),this.editor.graph,c),this.saveData(f,a,k,"text/html");else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==a?f=c+".png":"jpeg"==a&&(f=c+".jpg"),this.saveRequest(f,a,mxUtils.bind(this,function(c,b){try{var f=this.editor.graph.pageVisible;null!=g&&(this.editor.graph.pageVisible=g);var d=this.createDownloadRequest(c, -a,e,b,l,n,z,t,m);this.editor.graph.pageVisible=f;return d}catch(S){this.handleError(S)}}));else{var q=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(q)}))});if("svg"==a){var r=this.editor.graph.background;if(l||r==mxConstants.NONE)r=null;var F=this.editor.graph.getSvg(r,null,null,null,null,e);d&&this.editor.graph.addSvgShadow(F); -this.convertImages(F,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=c+".svg",q=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();x(a)}),e)}}catch(M){this.handleError(M)}};EditorUi.prototype.createDownloadRequest=function(a,b,d,e,n,g,l,z,t){var c=this.editor.graph.getGraphBounds(); -d=this.getFileData(!0,null,null,null,d,0==g?!1:"xmlpng"!=b);var f="",k="";if(c.width*c.height>MAX_AREA||d.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};c="0";"pdf"==b&&0==g&&(k="&allPages=1");if("xmlpng"==b&&(c="1",b="png",null!=this.pages&&null!=this.currentPage))for(g=0;g<this.pages.length;g++)if(this.pages[g]==this.currentPage){f="&from="+g;break}g=this.editor.graph.background;"png"==b&&n?g=mxConstants.NONE:n||null!=g&&g!=mxConstants.NONE||(g="#ffffff");return new mxXmlRequest(EXPORT_URL, -"format="+b+f+k+"&bg="+(null!=g?g:mxConstants.NONE)+"&base64="+e+"&embedXml="+c+"&xml="+encodeURIComponent(d)+(null!=a?"&filename="+encodeURIComponent(a):"")+(t?"&extras="+encodeURIComponent(JSON.stringify({grid:{size:this.editor.graph.gridSize,steps:this.editor.graph.view.gridSteps,color:this.editor.graph.view.gridColor}})):"")+(null!=l?"&scale="+l:"")+(null!=z?"&border="+z:""))};EditorUi.prototype.setMode=function(a,b){this.mode=a};EditorUi.prototype.loadDescriptor=function(a,b,d){var c=window.location.hash, +/(\.html)$/i.test(c)||/(\.svg)$/i.test(c)||/(\.png)$/i.test(c)||/(\.drawio)$/i.test(c))c=c.substring(0,c.lastIndexOf("."));!a&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(c=c+"-"+this.currentPage.getName());return c};EditorUi.prototype.downloadFile=function(a,b,d,e,n,l,k,m,t,r){try{e=null!=e?e:this.editor.graph.isSelectionEmpty();var c=this.getBaseFilename(!n),f=c+"."+a;if("xml"==a){var g='<?xml version="1.0" encoding="UTF-8"?>\n'+ +this.getFileData(!0,null,null,null,e,n,null,null,null,b);this.saveData(f,a,g,"text/xml")}else if("html"==a)g=this.getHtml2(this.getFileData(!0),this.editor.graph,c),this.saveData(f,a,g,"text/html");else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==a?f=c+".png":"jpeg"==a&&(f=c+".jpg"),this.saveRequest(f,a,mxUtils.bind(this,function(c,b){try{var f=this.editor.graph.pageVisible;null!=l&&(this.editor.graph.pageVisible=l);var d=this.createDownloadRequest(c, +a,e,b,k,n,m,t,r);this.editor.graph.pageVisible=f;return d}catch(S){this.handleError(S)}}));else{var q=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(q)}))});if("svg"==a){var A=this.editor.graph.background;if(k||A==mxConstants.NONE)A=null;var E=this.editor.graph.getSvg(A,null,null,null,null,e);d&&this.editor.graph.addSvgShadow(E); +this.convertImages(E,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=c+".svg",q=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();x(a)}),e)}}catch(O){this.handleError(O)}};EditorUi.prototype.createDownloadRequest=function(a,b,d,e,n,l,k,m,t){var c=this.editor.graph,f=c.getGraphBounds(); +d=this.getFileData(!0,null,null,null,d,0==l?!1:"xmlpng"!=b);var g="",q="";if(f.width*f.height>MAX_AREA||d.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};f="0";"pdf"==b&&0==l&&(q="&allPages=1");if("xmlpng"==b&&(f="1",b="png",null!=this.pages&&null!=this.currentPage))for(l=0;l<this.pages.length;l++)if(this.pages[l]==this.currentPage){g="&from="+l;break}l=c.background;"png"==b&&n?l=mxConstants.NONE:n||null!=l&&l!=mxConstants.NONE||(l="#ffffff");n={};n.globalVars=c.getExportVariables(); +t&&(n.grid={size:c.gridSize,steps:c.view.gridSteps,color:c.view.gridColor});return new mxXmlRequest(EXPORT_URL,"format="+b+g+q+"&bg="+(null!=l?l:mxConstants.NONE)+"&base64="+e+"&embedXml="+f+"&xml="+encodeURIComponent(d)+(null!=a?"&filename="+encodeURIComponent(a):"")+"&extras="+encodeURIComponent(JSON.stringify(n))+(null!=k?"&scale="+k:"")+(null!=m?"&border="+m:""))};EditorUi.prototype.setMode=function(a,b){this.mode=a};EditorUi.prototype.loadDescriptor=function(a,b,d){var c=window.location.hash, f=mxUtils.bind(this,function(f){var d=null!=a.data?a.data:"";null!=f&&0<f.length&&(0<d.length&&(d+="\n"),d+=f);f=new LocalFile(this,"csv"!=a.format&&0<d.length?d:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);f.getHash=function(){return c};this.fileLoaded(f);"csv"==a.format&&this.importCsv(d,mxUtils.bind(this,function(a){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=a.update){var e=null!=a.interval? -parseInt(a.interval):6E4,k=null,g=mxUtils.bind(this,function(){var c=this.currentPage;mxUtils.post(a.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(a){c===this.currentPage&&(200<=a.getStatus()&&300>=a.getStatus()?(this.updateDiagram(a.getText()),n()):this.handleError({message:mxResources.get("error")+" "+a.getStatus()}))}),mxUtils.bind(this,function(a){this.handleError(a)}))}),n=mxUtils.bind(this,function(){window.clearTimeout(k);k=window.setTimeout(g, -e)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){n();g()}));n();g()}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!=d&&d(a)}))}else f("")};EditorUi.prototype.updateDiagram=function(a){function c(a){var c=new mxCellOverlay(a.image||e.warningImage,a.tooltip,a.align,a.valign, -a.offset);c.addListener(mxEvent.CLICK,function(c,b){d.alert(a.tooltip)});return c}var b=null,d=this;if(null!=a&&0<a.length&&(b=mxUtils.parseXml(a),a=null!=b?b.documentElement:null,null!=a&&"updates"==a.nodeName)){var e=this.editor.graph,g=e.getModel();g.beginUpdate();var l=null;try{for(a=a.firstChild;null!=a;){if("update"==a.nodeName){var z=g.getCell(a.getAttribute("id"));if(null!=z){try{var t=a.getAttribute("value");if(null!=t){var m=mxUtils.parseXml(t).documentElement;if(null!=m)if("1"==m.getAttribute("replace-value"))g.setValue(z, -m);else for(var v=m.attributes,r=0;r<v.length;r++)e.setAttributeForCell(z,v[r].nodeName,0<v[r].nodeValue.length?v[r].nodeValue:null)}}catch(J){null!=window.console&&console.log("Error in value for "+z.id+": "+J)}try{var p=a.getAttribute("style");null!=p&&e.model.setStyle(z,p)}catch(J){null!=window.console&&console.log("Error in style for "+z.id+": "+J)}try{var u=a.getAttribute("icon");if(null!=u){var y=0<u.length?JSON.parse(u):null;null!=y&&y.append||e.removeCellOverlays(z);null!=y&&e.addCellOverlay(z, -c(y))}}catch(J){null!=window.console&&console.log("Error in icon for "+z.id+": "+J)}try{var A=a.getAttribute("geometry");if(null!=A){var A=JSON.parse(A),G=e.getCellGeometry(z);if(null!=G){G=G.clone();for(key in A){var M=parseFloat(A[key]);"dx"==key?G.x+=M:"dy"==key?G.y+=M:"dw"==key?G.width+=M:"dh"==key?G.height+=M:G[key]=parseFloat(A[key])}e.model.setGeometry(z,G)}}}catch(J){null!=window.console&&console.log("Error in icon for "+z.id+": "+J)}}}else if("model"==a.nodeName){for(var B=a.firstChild;null!= -B&&B.nodeType!=mxConstants.NODETYPE_ELEMENT;)B=B.nextSibling;null!=B&&(new mxCodec(a.firstChild)).decode(B,g)}else if("view"==a.nodeName){if(a.hasAttribute("scale")&&(e.view.scale=parseFloat(a.getAttribute("scale"))),a.hasAttribute("dx")||a.hasAttribute("dy"))e.view.translate=new mxPoint(parseFloat(a.getAttribute("dx")||0),parseFloat(a.getAttribute("dy")||0))}else"fit"==a.nodeName&&(l=a.hasAttribute("max-scale")?parseFloat(a.getAttribute("max-scale")):1);a=a.nextSibling}}finally{g.endUpdate()}null!= -l&&this.chromelessResize&&this.chromelessResize(!0,l)}return b};EditorUi.prototype.getCopyFilename=function(a,b){var c=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename,f="",d=c.lastIndexOf(".");0<=d&&(f=c.substring(d),c=c.substring(0,d));if(b)var e=new Date,d=e.getFullYear(),l=e.getMonth()+1,z=e.getDate(),t=e.getHours(),m=e.getMinutes(),e=e.getSeconds(),c=c+(" "+(d+"-"+l+"-"+z+"-"+t+"-"+m+"-"+e));return c=mxResources.get("copyOf",[c])+f};EditorUi.prototype.fileLoaded=function(a,b){var c= +parseInt(a.interval):6E4,g=null,l=mxUtils.bind(this,function(){var c=this.currentPage;mxUtils.post(a.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(a){c===this.currentPage&&(200<=a.getStatus()&&300>=a.getStatus()?(this.updateDiagram(a.getText()),n()):this.handleError({message:mxResources.get("error")+" "+a.getStatus()}))}),mxUtils.bind(this,function(a){this.handleError(a)}))}),n=mxUtils.bind(this,function(){window.clearTimeout(g);g=window.setTimeout(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!=d&&d(a)}))}else f("")};EditorUi.prototype.updateDiagram=function(a){function c(a){var c=new mxCellOverlay(a.image||e.warningImage,a.tooltip,a.align,a.valign, +a.offset);c.addListener(mxEvent.CLICK,function(c,b){d.alert(a.tooltip)});return c}var b=null,d=this;if(null!=a&&0<a.length&&(b=mxUtils.parseXml(a),a=null!=b?b.documentElement:null,null!=a&&"updates"==a.nodeName)){var e=this.editor.graph,l=e.getModel();l.beginUpdate();var k=null;try{for(a=a.firstChild;null!=a;){if("update"==a.nodeName){var m=l.getCell(a.getAttribute("id"));if(null!=m){try{var t=a.getAttribute("value");if(null!=t){var r=mxUtils.parseXml(t).documentElement;if(null!=r)if("1"==r.getAttribute("replace-value"))l.setValue(m, +r);else for(var v=r.attributes,D=0;D<v.length;D++)e.setAttributeForCell(m,v[D].nodeName,0<v[D].nodeValue.length?v[D].nodeValue:null)}}catch(J){null!=window.console&&console.log("Error in value for "+m.id+": "+J)}try{var p=a.getAttribute("style");null!=p&&e.model.setStyle(m,p)}catch(J){null!=window.console&&console.log("Error in style for "+m.id+": "+J)}try{var u=a.getAttribute("icon");if(null!=u){var y=0<u.length?JSON.parse(u):null;null!=y&&y.append||e.removeCellOverlays(m);null!=y&&e.addCellOverlay(m, +c(y))}}catch(J){null!=window.console&&console.log("Error in icon for "+m.id+": "+J)}try{var z=a.getAttribute("geometry");if(null!=z){var z=JSON.parse(z),H=e.getCellGeometry(m);if(null!=H){H=H.clone();for(key in z){var O=parseFloat(z[key]);"dx"==key?H.x+=O:"dy"==key?H.y+=O:"dw"==key?H.width+=O:"dh"==key?H.height+=O:H[key]=parseFloat(z[key])}e.model.setGeometry(m,H)}}}catch(J){null!=window.console&&console.log("Error in icon for "+m.id+": "+J)}}}else if("model"==a.nodeName){for(var B=a.firstChild;null!= +B&&B.nodeType!=mxConstants.NODETYPE_ELEMENT;)B=B.nextSibling;null!=B&&(new mxCodec(a.firstChild)).decode(B,l)}else if("view"==a.nodeName){if(a.hasAttribute("scale")&&(e.view.scale=parseFloat(a.getAttribute("scale"))),a.hasAttribute("dx")||a.hasAttribute("dy"))e.view.translate=new mxPoint(parseFloat(a.getAttribute("dx")||0),parseFloat(a.getAttribute("dy")||0))}else"fit"==a.nodeName&&(k=a.hasAttribute("max-scale")?parseFloat(a.getAttribute("max-scale")):1);a=a.nextSibling}}finally{l.endUpdate()}null!= +k&&this.chromelessResize&&this.chromelessResize(!0,k)}return b};EditorUi.prototype.getCopyFilename=function(a,b){var c=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename,f="",d=c.lastIndexOf(".");0<=d&&(f=c.substring(d),c=c.substring(0,d));if(b)var e=new Date,d=e.getFullYear(),k=e.getMonth()+1,m=e.getDate(),t=e.getHours(),r=e.getMinutes(),e=e.getSeconds(),c=c+(" "+(d+"-"+k+"-"+m+"-"+t+"-"+r+"-"+e));return c=mxResources.get("copyOf",[c])+f};EditorUi.prototype.fileLoaded=function(a,b){var c= this.getCurrentFile();this.fileLoadedError=null;this.setCurrentFile(null);var f=!1;this.hideDialog();null!=c&&(c.removeListener(this.descriptorChangedListener),c.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var d=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=c&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);!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"));f=!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")});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;null!=window.console&&(console.error(x),console.log("error in fileLoaded:",a,x));if(EditorUi.enableLogging&&!this.isOffline())try{(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?v="+encodeURIComponent(EditorUi.VERSION)+ -"&msg=errorInFileLoaded:url:"+encodeURIComponent(window.location.href)+(null!=x&&null!=x.message?":err:"+encodeURIComponent(x.message):"")+(null!=x&&null!=x.stack?"&stack="+encodeURIComponent(x.stack):"")}catch(z){}var e=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?e():this.handleError(x,mxResources.get("errorLoadingFile"),e,!0)}else d();return f}; -EditorUi.prototype.getHashValueForPages=function(a,b){var c=0,f=new mxGraphModel,d=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 l=a[e].node.cloneNode(!1);l.removeAttribute("name");f.root=a[e].root;var z=d.encode(f);this.editor.graph.saveViewState(a[e].viewState,z,!0);z.removeAttribute("pageWidth");z.removeAttribute("pageHeight");l.appendChild(z);null!=b&&(b.eltCount+=l.getElementsByTagName("*").length,b.nodeCount+= -l.getElementsByTagName("mxCell").length);c=(c<<5)-c+this.hashValue(l,function(a,c,b,f){return!f||"mxGeometry"!=a.nodeName&&"mxPoint"!=a.nodeName||"x"!=c&&"y"!=c&&"width"!=c&&"height"!=c?f&&"mxCell"==a.nodeName&&"previous"==c?null:b:Math.round(b)},b)<<0}return c};EditorUi.prototype.hashValue=function(a,b,d){var c=0;if(null!=a&&"object"===typeof a&&"number"===typeof a.nodeType&&"string"===typeof a.nodeName&&"function"===typeof a.getAttribute){null!=a.nodeName&&(c^=this.hashValue(a.nodeName,b,d));if(null!= -a.attributes){null!=d&&(d.attrCount+=a.attributes.length);for(var f=0;f<a.attributes.length;f++){var e=a.attributes[f].name,k=null!=b?b(a,e,a.attributes[f].value,!0):a.attributes[f].value;null!=k&&(c^=this.hashValue(e,b,d)+this.hashValue(k,b,d))}}if(null!=a.childNodes)for(f=0;f<a.childNodes.length;f++)c=(c<<5)-c+this.hashValue(a.childNodes[f],b,d)<<0}else if(null!=a&&"function"!==typeof a){a=String(a);b=0;null!=d&&(d.byteCount+=a.length);for(f=0;f<a.length;f++)b=(b<<5)-b+a.charCodeAt(f)<<0;c^=b}return c}; -EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(a,b,d,e,n,g,l){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?this.getLocalData(".scratchpad",mxUtils.bind(this,function(a){null==a&&(a=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,a,".scratchpad"))})): +"&msg=errorInFileLoaded:url:"+encodeURIComponent(window.location.href)+(null!=x&&null!=x.message?":err:"+encodeURIComponent(x.message):"")+(null!=x&&null!=x.stack?"&stack="+encodeURIComponent(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!=c?this.fileLoaded(c):d()});b?e():this.handleError(x,mxResources.get("errorLoadingFile"),e,!0)}else d();return f}; +EditorUi.prototype.getHashValueForPages=function(a,b){var c=0,f=new mxGraphModel,d=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");f.root=a[e].root;var m=d.encode(f);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);c=(c<<5)-c+this.hashValue(k,function(a,c,b,f){return!f||"mxGeometry"!=a.nodeName&&"mxPoint"!=a.nodeName||"x"!=c&&"y"!=c&&"width"!=c&&"height"!=c?f&&"mxCell"==a.nodeName&&"previous"==c?null:b:Math.round(b)},b)<<0}return c};EditorUi.prototype.hashValue=function(a,b,d){var c=0;if(null!=a&&"object"===typeof a&&"number"===typeof a.nodeType&&"string"===typeof a.nodeName&&"function"===typeof a.getAttribute){null!=a.nodeName&&(c^=this.hashValue(a.nodeName,b,d));if(null!= +a.attributes){null!=d&&(d.attrCount+=a.attributes.length);for(var f=0;f<a.attributes.length;f++){var e=a.attributes[f].name,g=null!=b?b(a,e,a.attributes[f].value,!0):a.attributes[f].value;null!=g&&(c^=this.hashValue(e,b,d)+this.hashValue(g,b,d))}}if(null!=a.childNodes)for(f=0;f<a.childNodes.length;f++)c=(c<<5)-c+this.hashValue(a.childNodes[f],b,d)<<0}else if(null!=a&&"function"!==typeof a){a=String(a);b=0;null!=d&&(d.byteCount+=a.length);for(f=0;f<a.length;f++)b=(b<<5)-b+a.charCodeAt(f)<<0;c^=b}return c}; +EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(a,b,d,e,n,l,k){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?this.getLocalData(".scratchpad",mxUtils.bind(this,function(a){null==a&&(a=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,a,".scratchpad"))})): this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(a){var c=mxUtils.createXmlDocument(),b=c.createElement("mxlibrary");mxUtils.setTextContent(b,JSON.stringify(a));c.appendChild(b);return mxUtils.getXml(c)};EditorUi.prototype.closeLibrary=function(a){null!=a&&(this.removeLibrarySidebar(a.getHash()),a.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(a.getHash()),".scratchpad"==a.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar= function(a){var c=this.sidebar.palettes[a];if(null!=c){for(var b=0;b<c.length;b++)c[b].parentNode.removeChild(c[b]);delete this.sidebar.palettes[a]}};EditorUi.prototype.repositionLibrary=function(a){var c=this.sidebar.container;if(null==a){var b=this.sidebar.palettes["L.scratchpad"];null==b&&(b=this.sidebar.palettes.search);null!=b&&(a=b[b.length-1].nextSibling)}a=null!=a?a:c.firstChild.nextSibling.nextSibling;var b=c.lastChild,d=b.previousSibling;c.insertBefore(b,a);c.insertBefore(d,b)};EditorUi.prototype.loadLibrary= function(a){var c=mxUtils.parseXml(a.getData());if("mxlibrary"==c.documentElement.nodeName){var b=JSON.parse(mxUtils.getTextContent(c.documentElement));this.libraryLoaded(a,b,c.documentElement.getAttribute("title"))}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(a){return""};EditorUi.prototype.libraryLoaded=function(a,b,d){if(null!=this.sidebar){a.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(a.getHash());".scratchpad"==a.title&& -(this.scratchpad=a);var c=this.sidebar.palettes[a.getHash()],c=null!=c?c[c.length-1].nextSibling:null;this.removeLibrarySidebar(a.getHash());var f=null,e=mxUtils.bind(this,function(c,b){0==c.length&&a.isEditable()?(null==f&&(f=document.createElement("div"),f.className="geDropTarget",mxUtils.write(f,mxResources.get("dragElementsHere"))),b.appendChild(f)):this.addLibraryEntries(c,b)});if(null!=this.sidebar&&null!=b)for(var k=0;k<b.length;k++)mxUtils.bind(this,function(a){var c=a.data;null!=c&&null!= +(this.scratchpad=a);var c=this.sidebar.palettes[a.getHash()],c=null!=c?c[c.length-1].nextSibling:null;this.removeLibrarySidebar(a.getHash());var f=null,e=mxUtils.bind(this,function(c,b){0==c.length&&a.isEditable()?(null==f&&(f=document.createElement("div"),f.className="geDropTarget",mxUtils.write(f,mxResources.get("dragElementsHere"))),b.appendChild(f)):this.addLibraryEntries(c,b)});if(null!=this.sidebar&&null!=b)for(var g=0;g<b.length;g++)mxUtils.bind(this,function(a){var c=a.data;null!=c&&null!= a.title?this.sidebar.addEntry(a.title,mxUtils.bind(this,function(){c=this.convertDataUri(c);var b="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==a.aspect&&(b+="aspect=fixed;");return this.sidebar.createVertexTemplate(b+"image="+c,a.w,a.h,"",a.title||"",!1,!1,!0)})):null!=a.xml&&null!=a.title&&this.sidebar.addEntry(a.title,mxUtils.bind(this,function(){var c=this.stringToCells(Graph.decompress(a.xml));return this.sidebar.createVertexTemplateFromCells(c,a.w,a.h, -a.title||"",!0,!1,!0)}))})(b[k]);d=null!=d&&0<d.length?d:a.getTitle();var l=this.sidebar.addPalette(a.getHash(),d,!0,mxUtils.bind(this,function(a){e(b,a)}));this.repositionLibrary(c);var t=l.parentNode.previousSibling;d=t.getAttribute("title");null!=d&&0<d.length&&".scratchpad"!=a.title&&t.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+d);var m=document.createElement("div");m.style.position="absolute";m.style.right="0px";m.style.top="0px";m.style.padding="8px";mxClient.IS_QUIRKS||8==document.documentMode|| +a.title||"",!0,!1,!0)}))})(b[g]);d=null!=d&&0<d.length?d:a.getTitle();var k=this.sidebar.addPalette(a.getHash(),d,!0,mxUtils.bind(this,function(a){e(b,a)}));this.repositionLibrary(c);var t=k.parentNode.previousSibling;d=t.getAttribute("title");null!=d&&0<d.length&&".scratchpad"!=a.title&&t.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+d);var m=document.createElement("div");m.style.position="absolute";m.style.right="0px";m.style.top="0px";m.style.padding="8px";mxClient.IS_QUIRKS||8==document.documentMode|| (m.style.backgroundColor="inherit");t.style.position="relative";var v=document.createElement("img");v.setAttribute("src",Dialog.prototype.closeImage);v.setAttribute("title",mxResources.get("close"));v.setAttribute("valign","absmiddle");v.setAttribute("border","0");v.style.margin="0 3px";var r=null;if(".scratchpad"!=a.title||this.closableScratchpad)m.appendChild(v),mxEvent.addListener(v,"click",mxUtils.bind(this,function(c){if(!mxEvent.isConsumed(c)){var b=mxUtils.bind(this,function(){this.closeLibrary(a)}); -null!=r?this.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b();mxEvent.consume(c)}}));if(a.isEditable()){var p=this.editor.graph,u=null,y=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),l,b,a,a.getMode());mxEvent.consume(c)}),A=mxUtils.bind(this,function(c){a.setModified(!0);a.isAutosave()?(null!=u&&null!=u.parentNode&&u.parentNode.removeChild(u),u=v.cloneNode(!1),u.setAttribute("src",Editor.spinImage),u.setAttribute("title", +null!=r?this.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b();mxEvent.consume(c)}}));if(a.isEditable()){var p=this.editor.graph,u=null,y=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),k,b,a,a.getMode());mxEvent.consume(c)}),z=mxUtils.bind(this,function(c){a.setModified(!0);a.isAutosave()?(null!=u&&null!=u.parentNode&&u.parentNode.removeChild(u),u=v.cloneNode(!1),u.setAttribute("src",Editor.spinImage),u.setAttribute("title", mxResources.get("saving")),u.style.cursor="default",u.style.marginRight="2px",u.style.marginTop="-2px",m.insertBefore(u,m.firstChild),t.style.paddingRight=18*m.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=u&&null!=u.parentNode&&(u.parentNode.removeChild(u),t.style.paddingRight=18*m.childNodes.length+"px")})):null==r&&(r=v.cloneNode(!1),r.setAttribute("src",IMAGE_PATH+"/download.png"),r.setAttribute("title",mxResources.get("save")),m.insertBefore(r,m.firstChild), -mxEvent.addListener(r,"click",mxUtils.bind(this,function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==r||a.isModified()||(t.style.paddingRight=18*m.childNodes.length+"px",r.parentNode.removeChild(r),r=null)});mxEvent.consume(c)})),t.style.paddingRight=18*m.childNodes.length+"px")}),G=mxUtils.bind(this,function(a,c,d,e){a=p.cloneCells(mxUtils.sortCells(p.model.getTopmostCells(a)));for(var k=0;k<a.length;k++){var g=p.getCellGeometry(a[k]);null!=g&& -g.translate(-c.x,-c.y)}l.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);A(d);null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)}),M=mxUtils.bind(this,function(a){if(p.isSelectionEmpty())p.getRubberband().isActive()?(p.getRubberband().execute(a),p.getRubberband().reset()):this.showError(mxResources.get("error"), -mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var c=p.getSelectionCells(),b=p.view.getBounds(c),f=p.view.scale;b.x/=f;b.y/=f;b.width/=f;b.height/=f;b.x-=p.view.translate.x;b.y-=p.view.translate.y;G(c,b)}mxEvent.consume(a)});mxEvent.addGestureListeners(l,function(){},mxUtils.bind(this,function(a){p.isMouseDown&&null!=p.panningManager&&null!=p.graphHandler.shape&&(p.graphHandler.shape.node.style.visibility="hidden",l.style.backgroundColor="#f1f3f4",l.style.cursor="copy",p.panningManager.stop(), -p.autoScroll=!1,null!=p.graphHandler.guide&&p.graphHandler.guide.setVisible(!1),null!=p.graphHandler.hint&&(p.graphHandler.hint.style.visibility="hidden"),mxEvent.consume(a))}),mxUtils.bind(this,function(a){p.isMouseDown&&null!=p.panningManager&&null!=p.graphHandler&&(l.style.backgroundColor="",l.style.cursor="default",this.sidebar.showTooltips=!0,p.panningManager.stop(),p.graphHandler.reset(),p.isMouseDown=!1,p.autoScroll=!0,M(a),mxEvent.consume(a))}));mxEvent.addListener(l,"mouseleave",mxUtils.bind(this, -function(a){p.isMouseDown&&null!=p.graphHandler.shape&&(p.graphHandler.shape.node.style.visibility="visible",l.style.backgroundColor="",l.style.cursor="",p.autoScroll=!0,null!=p.graphHandler.guide&&p.graphHandler.guide.setVisible(!0),null!=p.graphHandler.hint&&(p.graphHandler.hint.style.visibility="visible"))}));Graph.fileSupport&&(mxEvent.addListener(l,"dragover",mxUtils.bind(this,function(a){l.style.backgroundColor="#f1f3f4";a.dataTransfer.dropEffect="copy";l.style.cursor="copy";this.sidebar.hideTooltip(); -a.stopPropagation();a.preventDefault()})),mxEvent.addListener(l,"drop",mxUtils.bind(this,function(a){l.style.cursor="";l.style.backgroundColor="";0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(c,d,k,g,n,q,t,v,x){if(null!=c&&"image/"==d.substring(0,6))c="shape=image;verticalLabelPosition=bottom;verticalAlign=top;aspect=fixed;image="+this.convertDataUri(c),c=[new mxCell("",new mxGeometry(0,0,n,q),c)],c[0].vertex=!0,G(c,new mxRectangle(0, -0,n,q),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 p=!1,m=mxUtils.bind(this,function(c,d){if(null!=c&&"text/xml"==d){var k=mxUtils.parseXml(c);if("mxlibrary"==k.documentElement.nodeName)try{var g=JSON.parse(mxUtils.getTextContent(k.documentElement));e(g,l);b=b.concat(g);A(a);this.spinner.stop();p=!0}catch(H){}else if("mxfile"==k.documentElement.nodeName)try{for(var n=k.documentElement.getElementsByTagName("diagram"), -k=0;k<n.length;k++){var q=this.stringToCells(Editor.getDiagramNodeXml(n[k])),t=this.editor.graph.getBoundingBoxFromGeometry(q);G(q,new mxRectangle(0,0,t.width,t.height),a)}p=!0}catch(H){null!=window.console&&console.log("error in drop handler:",H)}}p||(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){m(a,"text/xml")},null,t):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,t)&&null!=x?this.parseFile(x,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?m(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):m(c,d)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(l,"dragleave", -function(a){l.style.cursor="";l.style.backgroundColor="";a.stopPropagation();a.preventDefault()}));v=v.cloneNode(!1);v.setAttribute("src",Editor.editImage);v.setAttribute("title",mxResources.get("edit"));m.insertBefore(v,m.firstChild);mxEvent.addListener(v,"click",y);mxEvent.addListener(l,"dblclick",function(a){mxEvent.getSource(a)==l&&y(a)});d=v.cloneNode(!1);d.setAttribute("src",Editor.plusImage);d.setAttribute("title",mxResources.get("add"));m.insertBefore(d,m.firstChild);mxEvent.addListener(d, -"click",M);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)})),m.insertBefore(d,m.firstChild))}t.appendChild(m);t.style.paddingRight=18*m.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries= +mxEvent.addListener(r,"click",mxUtils.bind(this,function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==r||a.isModified()||(t.style.paddingRight=18*m.childNodes.length+"px",r.parentNode.removeChild(r),r=null)});mxEvent.consume(c)})),t.style.paddingRight=18*m.childNodes.length+"px")}),H=mxUtils.bind(this,function(a,c,d,e){a=p.cloneCells(mxUtils.sortCells(p.model.getTopmostCells(a)));for(var g=0;g<a.length;g++){var l=p.getCellGeometry(a[g]);null!=l&& +l.translate(-c.x,-c.y)}k.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);z(d);null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)}),O=mxUtils.bind(this,function(a){if(p.isSelectionEmpty())p.getRubberband().isActive()?(p.getRubberband().execute(a),p.getRubberband().reset()):this.showError(mxResources.get("error"), +mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var c=p.getSelectionCells(),b=p.view.getBounds(c),f=p.view.scale;b.x/=f;b.y/=f;b.width/=f;b.height/=f;b.x-=p.view.translate.x;b.y-=p.view.translate.y;H(c,b)}mxEvent.consume(a)});mxEvent.addGestureListeners(k,function(){},mxUtils.bind(this,function(a){p.isMouseDown&&null!=p.panningManager&&null!=p.graphHandler.shape&&(p.graphHandler.shape.node.style.visibility="hidden",k.style.backgroundColor="#f1f3f4",k.style.cursor="copy",p.panningManager.stop(), +p.autoScroll=!1,null!=p.graphHandler.guide&&p.graphHandler.guide.setVisible(!1),null!=p.graphHandler.hint&&(p.graphHandler.hint.style.visibility="hidden"),mxEvent.consume(a))}),mxUtils.bind(this,function(a){p.isMouseDown&&null!=p.panningManager&&null!=p.graphHandler&&(k.style.backgroundColor="",k.style.cursor="default",this.sidebar.showTooltips=!0,p.panningManager.stop(),p.graphHandler.reset(),p.isMouseDown=!1,p.autoScroll=!0,O(a),mxEvent.consume(a))}));mxEvent.addListener(k,"mouseleave",mxUtils.bind(this, +function(a){p.isMouseDown&&null!=p.graphHandler.shape&&(p.graphHandler.shape.node.style.visibility="visible",k.style.backgroundColor="",k.style.cursor="",p.autoScroll=!0,null!=p.graphHandler.guide&&p.graphHandler.guide.setVisible(!0),null!=p.graphHandler.hint&&(p.graphHandler.hint.style.visibility="visible"))}));Graph.fileSupport&&(mxEvent.addListener(k,"dragover",mxUtils.bind(this,function(a){k.style.backgroundColor="#f1f3f4";a.dataTransfer.dropEffect="copy";k.style.cursor="copy";this.sidebar.hideTooltip(); +a.stopPropagation();a.preventDefault()})),mxEvent.addListener(k,"drop",mxUtils.bind(this,function(a){k.style.cursor="";k.style.backgroundColor="";0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(c,d,g,l,n,q,t,v,x){if(null!=c&&"image/"==d.substring(0,6))c="shape=image;verticalLabelPosition=bottom;verticalAlign=top;aspect=fixed;image="+this.convertDataUri(c),c=[new mxCell("",new mxGeometry(0,0,n,q),c)],c[0].vertex=!0,H(c,new mxRectangle(0, +0,n,q),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 m=!1,p=mxUtils.bind(this,function(c,d){if(null!=c&&"text/xml"==d){var g=mxUtils.parseXml(c);if("mxlibrary"==g.documentElement.nodeName)try{var l=JSON.parse(mxUtils.getTextContent(g.documentElement));e(l,k);b=b.concat(l);z(a);this.spinner.stop();m=!0}catch(G){}else if("mxfile"==g.documentElement.nodeName)try{for(var n=g.documentElement.getElementsByTagName("diagram"), +g=0;g<n.length;g++){var q=this.stringToCells(Editor.getDiagramNodeXml(n[g])),t=this.editor.graph.getBoundingBoxFromGeometry(q);H(q,new mxRectangle(0,0,t.width,t.height),a)}m=!0}catch(G){null!=window.console&&console.log("error in drop handler:",G)}}m||(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){p(a,"text/xml")},null,t):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,t)&&null!=x?this.parseFile(x,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?p(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):p(c,d)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(k,"dragleave", +function(a){k.style.cursor="";k.style.backgroundColor="";a.stopPropagation();a.preventDefault()}));v=v.cloneNode(!1);v.setAttribute("src",Editor.editImage);v.setAttribute("title",mxResources.get("edit"));m.insertBefore(v,m.firstChild);mxEvent.addListener(v,"click",y);mxEvent.addListener(k,"dblclick",function(a){mxEvent.getSource(a)==k&&y(a)});d=v.cloneNode(!1);d.setAttribute("src",Editor.plusImage);d.setAttribute("title",mxResources.get("add"));m.insertBefore(d,m.firstChild);mxEvent.addListener(d, +"click",O);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)})),m.insertBefore(d,m.firstChild))}t.appendChild(m);t.style.paddingRight=18*m.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries= function(a,b){for(var c=0;c<a.length;c++){var f=a[c],d=f.data;if(null!=d){var d=this.convertDataUri(d),e="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==f.aspect&&(e+="aspect=fixed;");b.appendChild(this.sidebar.createVertexTemplate(e+"image="+d,f.w,f.h,"",f.title||"",!1,!1,!0))}else null!=f.xml&&(d=this.stringToCells(Graph.decompress(f.xml)),0<d.length&&b.appendChild(this.sidebar.createVertexTemplateFromCells(d,f.w,f.h,f.title||"",!0,!1,!0)))}};EditorUi.prototype.getResource= function(a){return null!=a?a[mxLanguage]||a.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.offline||EditorUi.isElectronApp||("1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64),EditorUi.prototype.createFooter=function(){return document.getElementById("geFooter")});EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground=mxClient.IS_QUIRKS? "none":"linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38):"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= @@ -3023,290 +3028,290 @@ Editor.checkmarkImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAM !0;this.editor.graph.model.execute(a)});var c=new BackgroundImageDialog(this,mxUtils.bind(this,function(c){a(c)}));this.showDialog(c.container,360,200,!0,!0);c.init()};EditorUi.prototype.showLibraryDialog=function(a,b,d,e,n){a=new LibraryDialog(this,a,b,d,e,n);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 b=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(a){var c= b.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(a){this.editor.graph.isSelectionEmpty()&&c.refresh()}));return c};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="#188038";b.style.height="100%";b.style.paddingTop="9px";b.innerHTML='<span style="font-size:18px;margin-right:5px;">+</span>'; mxUtils.write(b,mxResources.get("moreShapes")+"...");mxEvent.addListener(b,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(a){a.preventDefault()}));mxEvent.addListener(b,"click",mxUtils.bind(this,function(a){this.actions.get("shapes").funct();mxEvent.consume(a)}));a.appendChild(b);return a};EditorUi.prototype.handleError=function(a,b,d,e,n){var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},f=null!=a&&null!=a.error?a.error:a;if(null!=f||null!= -b){var k=mxUtils.htmlEntities(mxResources.get("unknownError")),q=mxResources.get("ok"),l=null;b=null!=b?b:mxResources.get("error");if(null!=f)if(null!=f.retry&&(q=mxResources.get("cancel"),l=function(){c();f.retry()}),404==f.code||404==f.status||403==f.code){var k=403==f.code?null!=f.message?mxUtils.htmlEntities(f.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=n?n:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+ -", "+this.drive.user.email+")":"")),v=window.location.hash;if(null!=v&&("#G"==v.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==v.substring(0,45))&&(null!=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==f.code||404==f.status)){v="#U"==v.substring(0,2)?v.substring(45,v.lastIndexOf("%26ex")):v.substring(2);this.showError(b,k,mxResources.get("openInNewWindow"), -mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+v);this.handleError(a,b,d,e,n)}),l,mxResources.get("changeUser"),mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&(this.drive.clearUserId(),gapi.auth.signOut(),window.location.reload())}),mxResources.get("cancel"),mxUtils.bind(this,function(){window.location.hash=""}),480,150);return}}else 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 m=null,p=null;null!=f&&null!=f.helpLink&&(m=mxResources.get("help"),p=mxUtils.bind(this,function(){return this.editor.graph.openLink(f.helpLink)}));this.showError(b,k,q,d,l,null,null,m,p,null,null,null,e?d:null)}else null!=d&&d()};EditorUi.prototype.alert=function(a,b){var c= -new ErrorDialog(this,null,a,mxResources.get("ok"),b);this.showDialog(c.container,340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(a,b,d,e,n,g){var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){};a=new ConfirmDialog(this,a,function(){c();null!=b&&b()},function(){c();null!=d&&d()},e,n);this.showDialog(a.container,340,90,!0,g);a.init()};EditorUi.prototype.setCurrentFile=function(a){null!=a&&(a.opened=new Date);this.currentFile=a};EditorUi.prototype.getCurrentFile= -function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||!this.editor.graph.mathEnabled&&this.useCanvasForExport};EditorUi.prototype.createSvgDataUri=function(a){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(a)))};EditorUi.prototype.createImageDataUri=function(a,b,d){var c=a.toDataURL("image/"+d);if(6>=c.length||c==a.cloneNode(!1).toDataURL("image/"+d))throw{message:"Invalid image"};null!=b&&(c=this.writeGraphModelToPng(c, -"tEXt","mxfile",encodeURIComponent(b)));return c};EditorUi.prototype.saveCanvas=function(a,b,d,e){var c="jpeg"==d?"jpg":d;e=this.getBaseFilename(e)+"."+c;a=this.createImageDataUri(a,b,d);this.saveData(e,c,a.substring(a.lastIndexOf(",")+1),"image/"+d,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode&&!mxClient.IS_QUIRKS|| -this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(a,b){var c=new TextareaDialog(this,a,b,null,null,mxResources.get("close"));c.textarea.style.width="600px";c.textarea.style.height="380px";this.showDialog(c.container,620,460,!0,!0,null,null,null,null,!0);c.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(a,b,d,e,n){if(window.Blob&&navigator.msSaveOrOpenBlob)a=e?this.base64ToBlob(a,d):new Blob([a],{type:d}),navigator.msSaveOrOpenBlob(a, -b);else if(mxClient.IS_IE)d=window.open("about:blank","_blank"),null==d?mxUtils.popup(a,!0):(d.document.write(a),d.document.close(),d.document.execCommand("SaveAs",!0,b),d.close());else{var c=document.createElement("a"),f=!mxClient.IS_SF&&0>navigator.userAgent.indexOf("PaleMoon/")&&"undefined"!==typeof c.download;if(mxClient.IS_GC)var k=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./),f=65==(k?parseInt(k[2],10):!1)?!1:f;if(f||this.isOffline()){c.href=URL.createObjectURL(e?this.base64ToBlob(a, -d):new Blob([a],{type:d}));f?c.download=b:c.setAttribute("target","_blank");document.body.appendChild(c);try{window.setTimeout(function(){URL.revokeObjectURL(c.href)},0),c.click(),c.parentNode.removeChild(c)}catch(t){}}else this.createEchoRequest(a,b,d,e,n).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,d,e,n,g){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=d?"&mime="+d:"")+(null!=n?"&format="+n:"")+(null!=g?"&base64="+g:"")+(null!=b?"&filename="+ -encodeURIComponent(b):"")+(e?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=b||"";for(var c=atob(a),d=c.length,f=Math.ceil(d/1024),e=Array(f),l=0;l<f;++l){for(var m=1024*l,t=Math.min(m+1024,d),r=Array(t-m),v=0;m<t;++v,++m)r[v]=c[m].charCodeAt(0);e[l]=new Uint8Array(r)}return new Blob(e,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,d,e,n,g,l){g=null!=g?g:!1;l=null!=l?l:"vsdx"!=n&&(!mxClient.IS_IOS||!navigator.standalone);n=this.getServiceCount(g);isLocalStorage&&n++;var c= -4>=n?2:6<n?4:3;b=new CreateDialog(this,b,mxUtils.bind(this,function(c,b){try{if("_blank"==b)if(null==d||"image/"!=d.substring(0,6)||"image/svg"==d.substring(0,9)&&!mxClient.IS_SVG){var f=window.open("about:blank");null==f?mxUtils.popup(a,!0):(f.document.write("<pre>"+mxUtils.htmlEntities(a,!1)+"<pre>"),f.document.close())}else this.openInNewWindow(a,d,e);else b==App.MODE_DEVICE||"download"==b?this.doSaveLocalFile(a,c,d,e):null!=c&&0<c.length&&this.pickFolder(b,mxUtils.bind(this,function(f){try{this.exportFile(a, -c,d,e,b,f)}catch(p){this.handleError(p)}}))}catch(D){this.handleError(D)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,g,l,null,1<n,c,a,d,e);g=this.isServices(n)?n>c?390:270:160;this.showDialog(b.container,400,g,!0,!0);b.init()};EditorUi.prototype.openInNewWindow=function(a,b,d){if(mxClient.IS_GC||mxClient.IS_EDGE||11==document.documentMode||10==document.documentMode){var c=window.open("about:blank");null==c||null==c.document?mxUtils.popup(a, -!0):("image/svg+xml"==b?c.document.write("<html>"+a+"</html>"):c.document.write('<html><img src="data:'+b+(d?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))+'"/></html>'),c.document.close())}else c=window.open("data:"+b+(d?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))),null!=c&&null!=c.document||mxUtils.popup(a,!0)};var e=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.addChromelessToolbarItems=function(a){if(this.isExportToCanvas()){this.exportDialog=null;var c=a(mxUtils.bind(this, -function(a){var b=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",b);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)b.apply(this);else{this.exportDialog=document.createElement("div");var d=c.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center"; -this.exportDialog.style.fontFamily="Helvetica,Arial";this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width="50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left=d.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";d=mxUtils.getCurrentStyle(this.editor.graph.container); -this.exportDialog.style.zIndex=d.zIndex;var f=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"#fff",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});f.spin(this.exportDialog);this.exportToCanvas(mxUtils.bind(this,function(a){f.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var c=this.createImageDataUri(a,null,"png");a=document.createElement("img");a.style.maxWidth="140px";a.style.maxHeight="140px"; -a.style.cursor="pointer";a.style.backgroundColor="white";a.setAttribute("title",mxResources.get("openInNewWindow"));a.setAttribute("border","0");a.setAttribute("src",c);this.exportDialog.appendChild(a);mxEvent.addListener(a,"click",mxUtils.bind(this,function(){this.openInNewWindow(c.substring(c.indexOf(",")+1),"image/png",!0);b.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}));mxEvent.addListener(this.editor.graph.container, -"click",b);document.body.appendChild(this.exportDialog)}mxEvent.consume(a)}),Editor.cameraLargeImage,mxResources.get("export"))}e.apply(this,arguments)};EditorUi.prototype.saveData=function(a,b,d,e,n){this.isLocalFileSave()?this.saveLocalFile(d,a,e,n,b):this.saveRequest(a,b,mxUtils.bind(this,function(a,c){return this.createEchoRequest(d,a,e,n,b,c)}),d,n,e)};EditorUi.prototype.saveRequest=function(a,b,d,e,n,g,l){l=null!=l?l:!mxClient.IS_IOS||!navigator.standalone;var c=this.getServiceCount(!1);isLocalStorage&& -c++;var f=4>=c?2:6<c?4:3;a=new CreateDialog(this,a,mxUtils.bind(this,function(a,c){if("_blank"==c||null!=a&&0<a.length){var f=d("_blank"==c?null:a,c==App.MODE_DEVICE||"download"==c||null==c||"_blank"==c?"0":"1");null!=f&&(c==App.MODE_DEVICE||"download"==c||"_blank"==c?f.simulate(document,"_blank"):this.pickFolder(c,mxUtils.bind(this,function(d){g=null!=g?g:"pdf"==b?"application/pdf":"image/"+b;if(null!=e)try{this.exportFile(e,a,g,!0,c,d)}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,c,d)}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,l,null,1<c,f,e,g,n);c=this.isServices(c)?4<c?390:270:160;this.showDialog(a.container, -380,c,!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,d,e,n,g){};EditorUi.prototype.pickFolder=function(a,b,d){b(null)};EditorUi.prototype.exportSvg=function(a,b,d,e,n,g,l,m,t,r){if(this.spinner.spin(document.body,mxResources.get("export"))){var c=this.editor.graph.isSelectionEmpty();d=null!=d?d:c;c=b?null:this.editor.graph.background;c==mxConstants.NONE&&(c= -null);null==c&&0==b&&(c="#ffffff");var f=this.editor.graph.getSvg(c,a,l,m,null,d,null,null,"blank"==r?"_blank":"self"==r?"_top":null);e&&this.editor.graph.addSvgShadow(f);var k=this.getBaseFilename()+".svg",q=mxUtils.bind(this,function(a){this.spinner.stop();n&&a.setAttribute("content",this.getFileData(!0,null,null,null,d,t));if(null!=this.editor.fontCss){var c=a.ownerDocument,c=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"style"):c.createElement("style");c.setAttribute("type","text/css"); -mxUtils.setTextContent(c,this.editor.fontCss);a.getElementsByTagName("defs")[0].appendChild(c)}var b='<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a);this.isLocalFileSave()||b.length<=MAX_REQUEST_SIZE?this.saveData(k,"svg",b,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}))});this.convertMath(this.editor.graph,f,!1,mxUtils.bind(this, -function(){g?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.convertImages(f,q,this.thumbImageCache)):q(f)}))}};EditorUi.prototype.addRadiobox=function(a,b,d,e,n,g,l){return this.addCheckbox(a,d,e,n,g,l,!0,b)};EditorUi.prototype.addCheckbox=function(a,b,d,e,n,g,l,m){g=null!=g?g:!0;var c=document.createElement("input");c.style.marginRight="8px";c.style.marginTop="16px";c.setAttribute("type",l?"radio":"checkbox");l="geCheckbox-"+Editor.guid();c.id=l;null!=m&&c.setAttribute("name",m);d&& -(c.setAttribute("checked","checked"),c.defaultChecked=!0);e&&c.setAttribute("disabled","disabled");g&&(a.appendChild(c),d=document.createElement("label"),mxUtils.write(d,b),d.setAttribute("for",l),a.appendChild(d),n||mxUtils.br(a));return c};EditorUi.prototype.addEditButton=function(a,b){var c=this.addCheckbox(a,mxResources.get("edit")+":",!0,null,!0);c.style.marginLeft="24px";var d=this.getCurrentFile(),f="";null!=d&&d.getMode()!=App.MODE_DEVICE&&d.getMode()!=App.MODE_BROWSER&&(f=window.location.href); -var e=document.createElement("select");e.style.width="120px";e.style.marginLeft="8px";e.style.marginRight="10px";e.className="geBtn";d=document.createElement("option");d.setAttribute("value","blank");mxUtils.write(d,mxResources.get("makeCopy"));e.appendChild(d);d=document.createElement("option");d.setAttribute("value","custom");mxUtils.write(d,mxResources.get("custom")+"...");e.appendChild(d);a.appendChild(e);mxEvent.addListener(e,"change",mxUtils.bind(this,function(){if("custom"==e.value){var a= -new FilenameDialog(this,f,mxResources.get("ok"),function(a){null!=a?f=a:e.value="blank"},mxResources.get("url"),null,null,null,null,function(){e.value="blank"});this.showDialog(a.container,300,80,!0,!1);a.init()}}));mxEvent.addListener(c,"change",mxUtils.bind(this,function(){c.checked&&(null==b||b.checked)?e.removeAttribute("disabled"):e.setAttribute("disabled","disabled")}));mxUtils.br(a);return{getLink:function(){return c.checked?"blank"===e.value?"_blank":f:null},getEditInput:function(){return c}, -getEditSelect:function(){return e}}};EditorUi.prototype.addLinkSection=function(a,b){function c(){l.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=e&&e!=mxConstants.NONE?"border:1px solid black;background-color:"+e:"background-position:center center;background-repeat:no-repeat;background-image:url('"+Dialog.prototype.closeImage+"')")+';"></div>'}mxUtils.write(a,mxResources.get("links")+":");var d=document.createElement("select");d.style.width="100px";d.style.marginLeft= -"8px";d.style.marginRight="10px";d.className="geBtn";var f=document.createElement("option");f.setAttribute("value","auto");mxUtils.write(f,mxResources.get("automatic"));d.appendChild(f);f=document.createElement("option");f.setAttribute("value","blank");mxUtils.write(f,mxResources.get("openInNewWindow"));d.appendChild(f);f=document.createElement("option");f.setAttribute("value","self");mxUtils.write(f,mxResources.get("openInThisWindow"));d.appendChild(f);b&&(f=document.createElement("option"),f.setAttribute("value", -"frame"),mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),d.appendChild(f));a.appendChild(d);mxUtils.write(a,mxResources.get("borderColor")+":");var e="#0000ff",l=null,l=mxUtils.button("",mxUtils.bind(this,function(a){this.pickColor(e||"none",function(a){e=a;c()});mxEvent.consume(a)}));c();l.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";l.style.marginLeft="4px";l.style.height="22px";l.style.width="22px";l.style.position="relative";l.style.top=mxClient.IS_IE|| -mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";l.className="geColorBtn";a.appendChild(l);mxUtils.br(a);return{getColor:function(){return e},getTarget:function(){return d.value},focus:function(){d.focus()}}};EditorUi.prototype.createLink=function(a,b,d,e,n,g,l,m){var c=this.getCurrentFile(),f=[];e&&(f.push("lightbox=1"),"auto"!=a&&f.push("target="+a),null!=b&&b!=mxConstants.NONE&&f.push("highlight="+("#"==b.charAt(0)?b.substring(1):b)),null!=n&&0<n.length&&f.push("edit="+encodeURIComponent(n)),g&& -f.push("layers=1"),this.editor.graph.foldingEnabled&&f.push("nav=1"));d&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&f.push("page-id="+this.currentPage.getId());a=!0;null!=l?d="#U"+encodeURIComponent(l):(c=this.getCurrentFile(),m||null==c||c.constructor!=window.DriveFile?d="#R"+encodeURIComponent(d?this.getFileData(!0,null,null,null,null,null,null,!0):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(d="#"+c.getHash(),a=!1));a&&null!=c&&null!=c.getTitle()&& -c.getTitle()!=this.defaultFilename&&f.push("title="+encodeURIComponent(c.getTitle()));return(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host+"/")+(0<f.length?"?"+f.join("&"):"")+d};EditorUi.prototype.createHtml=function(a,b,d,e,n,g,l,m,t,r,v){this.getBasenames();var c={};""!=n&&n!=mxConstants.NONE&&(c.highlight=n);"auto"!==e&&(c.target=e);t||(c.lightbox=!1);c.nav=this.editor.graph.foldingEnabled;d=parseInt(d); -isNaN(d)||100==d||(c.zoom=d/100);d=[];l&&(d.push("pages"),c.resize=!0,null!=this.pages&&null!=this.currentPage&&(c.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(d.push("zoom"),c.resize=!0);m&&d.push("layers");0<d.length&&(t&&d.push("lightbox"),c.toolbar=d.join(" "));null!=r&&0<r.length&&(c.edit=r);null!=a?c.url=a:c.xml=this.getFileData(!0,null,null,null,null,!l);b='<div class="mxgraph" style="'+(g?"max-width:100%;":"")+(""!=d?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(c))+ -'"></div>';a=null!=a?"&fetch="+encodeURIComponent(a):"";v(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,d,e){var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=document.createElement("h3"); -mxUtils.write(f,mxResources.get("html"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(f);var k=document.createElement("div");k.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var l=document.createElement("input");l.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";l.setAttribute("value","url");l.setAttribute("type","radio");l.setAttribute("name","type-embedhtmldialog");f=l.cloneNode(!0);f.setAttribute("value", -"copy");k.appendChild(f);var q=document.createElement("span");mxUtils.write(q,mxResources.get("includeCopyOfMyDiagram"));k.appendChild(q);mxUtils.br(k);k.appendChild(l);q=document.createElement("span");mxUtils.write(q,mxResources.get("publicDiagramUrl"));k.appendChild(q);var m=this.getCurrentFile();null==d&&null!=m&&m.constructor==window.DriveFile&&(q=document.createElement("a"),q.style.paddingLeft="12px",q.style.color="gray",q.setAttribute("href","javascript:void(0);"),mxUtils.write(q,mxResources.get("share")), -k.appendChild(q),mxEvent.addListener(q,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(m.getId())})));f.setAttribute("checked","checked");null==d&&l.setAttribute("disabled","disabled");c.appendChild(k);var v=this.addLinkSection(c),r=this.addCheckbox(c,mxResources.get("zoom"),!0,null,!0);mxUtils.write(c,":");var p=document.createElement("input");p.setAttribute("type","text");p.style.marginRight="16px";p.style.width="60px";p.style.marginLeft="4px";p.style.marginRight= -"12px";p.value="100%";c.appendChild(p);var u=this.addCheckbox(c,mxResources.get("fit"),!0),k=null!=this.pages&&1<this.pages.length,y=y=this.addCheckbox(c,mxResources.get("allPages"),k,!k),A=this.addCheckbox(c,mxResources.get("layers"),!0),G=this.addCheckbox(c,mxResources.get("lightbox"),!0),M=this.addEditButton(c,G),B=M.getEditInput();B.style.marginBottom="16px";mxEvent.addListener(G,"change",function(){G.checked?B.removeAttribute("disabled"):B.setAttribute("disabled","disabled");B.checked&&G.checked? -M.getEditSelect().removeAttribute("disabled"):M.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,c,mxUtils.bind(this,function(){e(l.checked?d:null,r.checked,p.value,v.getTarget(),v.getColor(),u.checked,y.checked,A.checked,G.checked,M.getLink())}),null,a,b);this.showDialog(a.container,340,384,!0,!0);f.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,d,e,l,g){var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=document.createElement("h3"); -mxUtils.write(f,a||mxResources.get("link"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(f);var k=this.getCurrentFile(),f="https://desk.draw.io/support/solutions/articles/16000051941";a=0;if(null!=k&&k.constructor==window.DriveFile&&!b){a=80;var f="https://desk.draw.io/support/solutions/articles/16000039384",n=document.createElement("div");n.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;"; -var q=document.createElement("div");q.style.whiteSpace="normal";mxUtils.write(q,mxResources.get("linkAccountRequired"));n.appendChild(q);q=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(k.getId())}));q.style.marginTop="12px";q.className="geBtn";n.appendChild(q);c.appendChild(n);q=document.createElement("a");q.style.paddingLeft="12px";q.style.color="gray";q.style.fontSize="11px";q.setAttribute("href","javascript:void(0);");mxUtils.write(q,mxResources.get("check")); -n.appendChild(q);mxEvent.addListener(q,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(a){this.spinner.stop();a=new ErrorDialog(this,null,mxResources.get(null!=a?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(a.container,300,80,!0,!1);a.init()}))}))}var m=null,p=null;if(null!=d||null!=e)a+=30,mxUtils.write(c,mxResources.get("width")+":"),m=document.createElement("input"), -m.setAttribute("type","text"),m.style.marginRight="16px",m.style.width="50px",m.style.marginLeft="6px",m.style.marginRight="16px",m.style.marginBottom="10px",m.value="100%",c.appendChild(m),mxUtils.write(c,mxResources.get("height")+":"),p=document.createElement("input"),p.setAttribute("type","text"),p.style.width="50px",p.style.marginLeft="6px",p.style.marginBottom="10px",p.value=e+"px",c.appendChild(p),mxUtils.br(c);var r=this.addLinkSection(c,g);d=null!=this.pages&&1<this.pages.length;var u=null; -if(null==k||k.constructor!=window.DriveFile||b)u=this.addCheckbox(c,mxResources.get("allPages"),d,!d);var y=this.addCheckbox(c,mxResources.get("lightbox"),!0),G=this.addEditButton(c,y),A=G.getEditInput(),B=this.addCheckbox(c,mxResources.get("layers"),!0);B.style.marginLeft=A.style.marginLeft;B.style.marginBottom="16px";B.style.marginTop="8px";mxEvent.addListener(y,"change",function(){y.checked?(B.removeAttribute("disabled"),A.removeAttribute("disabled")):(B.setAttribute("disabled","disabled"),A.setAttribute("disabled", -"disabled"));A.checked&&y.checked?G.getEditSelect().removeAttribute("disabled"):G.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,c,mxUtils.bind(this,function(){l(r.getTarget(),r.getColor(),null==u?!0:u.checked,y.checked,G.getLink(),B.checked,null!=m?m.value:null,null!=p?p.value:null)}),null,mxResources.get("create"),f);this.showDialog(b.container,340,254+a,!0,!0);null!=m?(m.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?m.select(): -document.execCommand("selectAll",!1,null)):r.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,d,e,l){var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("image"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(l?"10":"4")+"px";c.appendChild(f);if(l){mxUtils.write(c,mxResources.get("zoom")+":");var k=document.createElement("input");k.setAttribute("type","text");k.style.marginRight= -"16px";k.style.width="60px";k.style.marginLeft="4px";k.style.marginRight="12px";k.value=this.lastExportZoom||"100%";c.appendChild(k);mxUtils.write(c,mxResources.get("borderWidth")+":");var n=document.createElement("input");n.setAttribute("type","text");n.style.marginRight="16px";n.style.width="60px";n.style.marginLeft="4px";n.value=this.lastExportBorder||"0";c.appendChild(n);mxUtils.br(c)}var q=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),m=e?null:this.addCheckbox(c, -mxResources.get("includeCopyOfMyDiagram"),!0),f=this.editor.graph,r=e?null:this.addCheckbox(c,mxResources.get("transparentBackground"),f.background==mxConstants.NONE||null==f.background);null!=r&&(r.style.marginBottom="16px");a=new CustomDialog(this,c,mxUtils.bind(this,function(){var a=parseInt(k.value)/100||1,c=parseInt(n.value)||0;d(!q.checked,null!=m?m.checked:!1,null!=r?r.checked:!1,a,c)}),null,a,b);this.showDialog(a.container,300,(l?25:0)+(e?125:210),!0,!0)};EditorUi.prototype.showExportDialog= -function(a,b,d,e,l,g,m,r){m=null!=m?m:!0;var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=this.editor.graph,k="jpeg"==r?196:300,n=document.createElement("h3");mxUtils.write(n,a);n.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";c.appendChild(n);mxUtils.write(c,mxResources.get("zoom")+":");var 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%";c.appendChild(q);mxUtils.write(c,mxResources.get("borderWidth")+":");var x=document.createElement("input");x.setAttribute("type","text");x.style.marginRight="16px";x.style.width="60px";x.style.marginLeft="4px";x.value=this.lastExportBorder||"0";c.appendChild(x);mxUtils.br(c);var z=this.addCheckbox(c,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=r),u=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,f.isSelectionEmpty()),G=document.createElement("input"); -G.style.marginTop="16px";G.style.marginRight="8px";G.style.marginLeft="24px";G.setAttribute("disabled","disabled");G.setAttribute("type","checkbox");g&&(c.appendChild(G),mxUtils.write(c,mxResources.get("crop")),mxUtils.br(c),k+=26,mxEvent.addListener(u,"change",function(){u.checked?G.removeAttribute("disabled"):G.setAttribute("disabled","disabled")}));f.isSelectionEmpty()||(G.setAttribute("checked","checked"),G.defaultChecked=!0);var y=this.addCheckbox(c,mxResources.get("shadow"),f.shadowVisible), -B=document.createElement("input");B.style.marginTop="16px";B.style.marginRight="8px";B.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||B.setAttribute("disabled","disabled");b&&(c.appendChild(B),mxUtils.write(c,mxResources.get("embedImages")),mxUtils.br(c),k+=26);var J=null;if("png"==r||"jpeg"==r)J=this.addCheckbox(c,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),k+=26;var O=this.addCheckbox(c,mxResources.get("includeCopyOfMyDiagram"),m,null,null, -"jpeg"!=r),S=null!=this.pages&&1<this.pages.length,A=this.addCheckbox(c,S?mxResources.get("allPages"):"",S,!S,null,"jpeg"!=r);A.style.marginLeft="24px";A.style.marginBottom="16px";S||(A.style.display="none");mxEvent.addListener(O,"change",function(){O.checked&&S?A.removeAttribute("disabled"):A.setAttribute("disabled","disabled")});m&&S||A.setAttribute("disabled","disabled");var W=document.createElement("select");W.style.maxWidth="260px";W.style.marginLeft="8px";W.style.marginRight="10px";W.className= -"geBtn";a=document.createElement("option");a.setAttribute("value","auto");mxUtils.write(a,mxResources.get("automatic"));W.appendChild(a);a=document.createElement("option");a.setAttribute("value","blank");mxUtils.write(a,mxResources.get("openInNewWindow"));W.appendChild(a);a=document.createElement("option");a.setAttribute("value","self");mxUtils.write(a,mxResources.get("openInThisWindow"));W.appendChild(a);"svg"==r&&(mxUtils.write(c,mxResources.get("links")+":"),c.appendChild(W),mxUtils.br(c),mxUtils.br(c), -k+=26);d=new CustomDialog(this,c,mxUtils.bind(this,function(){this.lastExportBorder=x.value;this.lastExportZoom=q.value;l(q.value,z.checked,!u.checked,y.checked,O.checked,B.checked,x.value,G.checked,!A.checked,W.value,null!=J?J.checked:null)}),null,d,e);this.showDialog(d.container,340,k,!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,d,e,l){var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=this.editor.graph;if(null!=b){var k=document.createElement("h3");mxUtils.write(k,b);k.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";c.appendChild(k)}var n=this.addCheckbox(c,mxResources.get("fit"),!0),q=this.addCheckbox(c,mxResources.get("shadow"),f.shadowVisible&&e,!e),m=this.addCheckbox(c,d),r=this.addCheckbox(c,mxResources.get("lightbox"),!0),p=this.addEditButton(c,r),u=p.getEditInput(), -y=1<f.model.getChildCount(f.model.getRoot()),A=this.addCheckbox(c,mxResources.get("layers"),y,!y);A.style.marginLeft=u.style.marginLeft;A.style.marginBottom="12px";A.style.marginTop="8px";mxEvent.addListener(r,"change",function(){r.checked?(y&&A.removeAttribute("disabled"),u.removeAttribute("disabled")):(A.setAttribute("disabled","disabled"),u.setAttribute("disabled","disabled"));u.checked&&r.checked?p.getEditSelect().removeAttribute("disabled"):p.getEditSelect().setAttribute("disabled","disabled")}); -b=new CustomDialog(this,c,mxUtils.bind(this,function(){a(n.checked,q.checked,m.checked,r.checked,p.getLink(),A.checked)}),null,mxResources.get("embed"),l);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,d,e,l,g,m,r){function c(c){var b=" ",k="";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":"")+(g?"&layers=1":"")+"');}})(this);\"",k+="cursor:pointer;");a&&(k+="max-width:100%;");var n="";d&&(n=' width="'+Math.round(f.width)+'" height="'+Math.round(f.height)+'"');m('<img src="'+c+'"'+n+(""!=k?' style="'+k+'"':"")+b+"/>")}var f=this.editor.graph.getGraphBounds();if(this.isExportToCanvas())this.exportToCanvas(mxUtils.bind(this,function(a){var b=e?this.getFileData(!0):null;a=this.createImageDataUri(a,b,"png");c(a)}),null,null,null, -mxUtils.bind(this,function(a){r({message:mxResources.get("unknownError")})}),null,!0,d?2:1,null,b);else if(b=this.getFileData(!0),f.width*f.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){var k="";d&&(k="&w="+Math.round(2*f.width)+"&h="+Math.round(2*f.height));var n=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(e?"1":"0")+k+"&xml="+encodeURIComponent(b));n.send(mxUtils.bind(this,function(){200<=n.getStatus()&&299>=n.getStatus()?c("data:image/png;base64,"+n.getText()):r({message:mxResources.get("unknownError")})}))}else r({message:mxResources.get("drawingTooLarge")})}; -EditorUi.prototype.createEmbedSvg=function(a,b,d,e,l,g,m){var c=this.editor.graph.getSvg(),f=c.getElementsByTagName("a");if(null!=f)for(var k=0;k<f.length;k++){var n=f[k].getAttribute("href");null!=n&&"#"==n.charAt(0)&&"_blank"==f[k].getAttribute("target")&&f[k].removeAttribute("target")}e&&c.setAttribute("content",this.getFileData(!0));b&&this.editor.graph.addSvgShadow(c);if(d){var q=" ",p="";e&&(q="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+ -EditorUi.drawHost+"/?client=1&lightbox=1"+(l?"&edit=_blank":"")+(g?"&layers=1":"")+"');}})(this);\"",p+="cursor:pointer;");a&&(p+="max-width:100%;");this.convertImages(c,mxUtils.bind(this,function(a){m('<img src="'+this.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=p?' style="'+p+'"':"")+q+"/>")}))}else p="",e&&(c.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+ -EditorUi.drawHost+"/?client=1&lightbox=1"+(l?"&edit=_blank":"")+(g?"&layers=1":"")+"');}}})(this);"),p+="cursor:pointer;"),a&&(a=parseInt(c.getAttribute("width")),b=parseInt(c.getAttribute("height")),c.setAttribute("viewBox","-0.5 -0.5 "+a+" "+b),p+="max-width:100%;max-height:"+b+"px;",c.removeAttribute("height")),""!=p&&c.setAttribute("style",p),m(mxUtils.getXml(c))};EditorUi.prototype.timeSince=function(a){a=Math.floor((new Date-a)/1E3);var c=Math.floor(a/31536E3);if(1<c)return c+" "+mxResources.get("years"); +b){var g=mxUtils.htmlEntities(mxResources.get("unknownError")),q=mxResources.get("ok"),k=null;b=null!=b?b:mxResources.get("error");if(null!=f)if(null!=f.retry&&(q=mxResources.get("cancel"),k=function(){c();f.retry()}),404==f.code||404==f.status||403==f.code){var g=403==f.code?null!=f.message?mxUtils.htmlEntities(f.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=n?n:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+ +", "+this.drive.user.email+")":"")),v=window.location.hash;if(null!=v&&("#G"==v.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==v.substring(0,45))&&(null!=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==f.code||404==f.status)){v="#U"==v.substring(0,2)?v.substring(45,v.lastIndexOf("%26ex")):v.substring(2);this.showError(b,g,mxResources.get("openInNewWindow"), +mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+v);this.handleError(a,b,d,e,n)}),k,mxResources.get("changeUser"),mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&(this.drive.clearUserId(),gapi.auth.signOut(),window.location.reload())}),mxResources.get("cancel"),mxUtils.bind(this,function(){window.location.hash=""}),480,150);return}}else null!=f.message?g=mxUtils.htmlEntities(f.message):null!=f.response&&null!=f.response.error? +g=mxUtils.htmlEntities(f.response.error):"undefined"!==typeof window.App&&(f.code==App.ERROR_TIMEOUT?g=mxUtils.htmlEntities(mxResources.get("timeout")):f.code==App.ERROR_BUSY&&(g=mxUtils.htmlEntities(mxResources.get("busy"))));var m=null,p=null;null!=f&&null!=f.helpLink&&(m=mxResources.get("help"),p=mxUtils.bind(this,function(){return this.editor.graph.openLink(f.helpLink)}));this.showError(b,g,q,d,k,null,null,m,p,null,null,null,e?d:null)}else null!=d&&d()};EditorUi.prototype.alert=function(a,b){var c= +new ErrorDialog(this,null,a,mxResources.get("ok"),b);this.showDialog(c.container,340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(a,b,d,e,n,l){var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){};a=new ConfirmDialog(this,a,function(){c();null!=b&&b()},function(){c();null!=d&&d()},e,n);this.showDialog(a.container,340,90,!0,l);a.init()};EditorUi.prototype.setCurrentFile=function(a){null!=a&&(a.opened=new Date);this.currentFile=a};EditorUi.prototype.getCurrentFile= +function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||!this.editor.graph.mathEnabled&&this.useCanvasForExport};EditorUi.prototype.createSvgDataUri=function(a){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(a)))};EditorUi.prototype.createImageDataUri=function(a,b,d,e){var c=a.toDataURL("image/"+d);if(6>=c.length||c==a.cloneNode(!1).toDataURL("image/"+d))throw{message:"Invalid image"};null!=b&&(c=this.writeGraphModelToPng(c, +"tEXt","mxfile",encodeURIComponent(b)));0<e&&(c=this.writeGraphModelToPng(c,"pHYs","dpi",e));return c};EditorUi.prototype.saveCanvas=function(a,b,d,e,n){var c="jpeg"==d?"jpg":d;e=this.getBaseFilename(e)+"."+c;a=this.createImageDataUri(a,b,d,n);this.saveData(e,c,a.substring(a.lastIndexOf(",")+1),"image/"+d,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&& +8!=document.documentMode&&7!=document.documentMode&&!mxClient.IS_QUIRKS||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(a,b){var c=new TextareaDialog(this,a,b,null,null,mxResources.get("close"));c.textarea.style.width="600px";c.textarea.style.height="380px";this.showDialog(c.container,620,460,!0,!0,null,null,null,null,!0);c.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(a,b,d,e,n){if(window.Blob&&navigator.msSaveOrOpenBlob)a= +e?this.base64ToBlob(a,d):new Blob([a],{type:d}),navigator.msSaveOrOpenBlob(a,b);else if(mxClient.IS_IE)d=window.open("about:blank","_blank"),null==d?mxUtils.popup(a,!0):(d.document.write(a),d.document.close(),d.document.execCommand("SaveAs",!0,b),d.close());else{var c=document.createElement("a"),f=!mxClient.IS_SF&&0>navigator.userAgent.indexOf("PaleMoon/")&&"undefined"!==typeof c.download;if(mxClient.IS_GC)var g=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./),f=65==(g?parseInt(g[2],10):!1)? +!1:f;if(f||this.isOffline()){c.href=URL.createObjectURL(e?this.base64ToBlob(a,d):new Blob([a],{type:d}));f?c.download=b:c.setAttribute("target","_blank");document.body.appendChild(c);try{window.setTimeout(function(){URL.revokeObjectURL(c.href)},0),c.click(),c.parentNode.removeChild(c)}catch(t){}}else this.createEchoRequest(a,b,d,e,n).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,d,e,n,l){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=d?"&mime="+ +d:"")+(null!=n?"&format="+n:"")+(null!=l?"&base64="+l:"")+(null!=b?"&filename="+encodeURIComponent(b):"")+(e?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=b||"";for(var c=atob(a),d=c.length,f=Math.ceil(d/1024),e=Array(f),k=0;k<f;++k){for(var m=1024*k,t=Math.min(m+1024,d),r=Array(t-m),v=0;m<t;++v,++m)r[v]=c[m].charCodeAt(0);e[k]=new Uint8Array(r)}return new Blob(e,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,d,e,n,l,k){l=null!=l?l:!1;k=null!=k?k:"vsdx"!=n&&(!mxClient.IS_IOS|| +!navigator.standalone);n=this.getServiceCount(l);isLocalStorage&&n++;var c=4>=n?2:6<n?4:3;b=new CreateDialog(this,b,mxUtils.bind(this,function(c,b){try{if("_blank"==b)if(null==d||"image/"!=d.substring(0,6)||"image/svg"==d.substring(0,9)&&!mxClient.IS_SVG){var f=window.open("about:blank");null==f?mxUtils.popup(a,!0):(f.document.write("<pre>"+mxUtils.htmlEntities(a,!1)+"<pre>"),f.document.close())}else this.openInNewWindow(a,d,e);else b==App.MODE_DEVICE||"download"==b?this.doSaveLocalFile(a,c,d,e): +null!=c&&0<c.length&&this.pickFolder(b,mxUtils.bind(this,function(f){try{this.exportFile(a,c,d,e,b,f)}catch(p){this.handleError(p)}}))}catch(D){this.handleError(D)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,l,k,null,1<n,c,a,d,e);l=this.isServices(n)?n>c?390:270:160;this.showDialog(b.container,400,l,!0,!0);b.init()};EditorUi.prototype.openInNewWindow=function(a,b,d){if(mxClient.IS_GC||mxClient.IS_EDGE||11==document.documentMode||10== +document.documentMode){var c=window.open("about:blank");null==c||null==c.document?mxUtils.popup(a,!0):("image/svg+xml"==b?c.document.write("<html>"+a+"</html>"):c.document.write('<html><img src="data:'+b+(d?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))+'"/></html>'),c.document.close())}else c=window.open("data:"+b+(d?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))),null!=c&&null!=c.document||mxUtils.popup(a,!0)};var e=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.addChromelessToolbarItems= +function(a){if(this.isExportToCanvas()){this.exportDialog=null;var c=a(mxUtils.bind(this,function(a){var b=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",b);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)b.apply(this);else{this.exportDialog=document.createElement("div");var d=c.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px"); +this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily="Helvetica,Arial";this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width="50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left=d.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+ +this.chromelessToolbar.offsetHeight+4+"px";d=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=d.zIndex;var f=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"#fff",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});f.spin(this.exportDialog);this.exportToCanvas(mxUtils.bind(this,function(a){f.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var c=this.createImageDataUri(a, +null,"png");a=document.createElement("img");a.style.maxWidth="140px";a.style.maxHeight="140px";a.style.cursor="pointer";a.style.backgroundColor="white";a.setAttribute("title",mxResources.get("openInNewWindow"));a.setAttribute("border","0");a.setAttribute("src",c);this.exportDialog.appendChild(a);mxEvent.addListener(a,"click",mxUtils.bind(this,function(){this.openInNewWindow(c.substring(c.indexOf(",")+1),"image/png",!0);b.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this, +function(a){this.spinner.stop();this.handleError(a)}));mxEvent.addListener(this.editor.graph.container,"click",b);document.body.appendChild(this.exportDialog)}mxEvent.consume(a)}),Editor.cameraLargeImage,mxResources.get("export"))}e.apply(this,arguments)};EditorUi.prototype.saveData=function(a,b,d,e,n){this.isLocalFileSave()?this.saveLocalFile(d,a,e,n,b):this.saveRequest(a,b,mxUtils.bind(this,function(a,c){return this.createEchoRequest(d,a,e,n,b,c)}),d,n,e)};EditorUi.prototype.saveRequest=function(a, +b,d,e,n,l,k){k=null!=k?k:!mxClient.IS_IOS||!navigator.standalone;var c=this.getServiceCount(!1);isLocalStorage&&c++;var f=4>=c?2:6<c?4:3;a=new CreateDialog(this,a,mxUtils.bind(this,function(a,c){if("_blank"==c||null!=a&&0<a.length){var f=d("_blank"==c?null:a,c==App.MODE_DEVICE||"download"==c||null==c||"_blank"==c?"0":"1");null!=f&&(c==App.MODE_DEVICE||"download"==c||"_blank"==c?f.simulate(document,"_blank"):this.pickFolder(c,mxUtils.bind(this,function(d){l=null!=l?l:"pdf"==b?"application/pdf":"image/"+ +b;if(null!=e)try{this.exportFile(e,a,l,!0,c,d)}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,l,!0,c,d)}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<c,f,e,l,n);c=this.isServices(c)?4<c?390:270:160;this.showDialog(a.container,380,c,!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,d,e,n,l){};EditorUi.prototype.pickFolder=function(a,b,d){b(null)};EditorUi.prototype.exportSvg=function(a,b,d,e,n,l,k,m,t,r){if(this.spinner.spin(document.body,mxResources.get("export"))){var c= +this.editor.graph.isSelectionEmpty();d=null!=d?d:c;c=b?null:this.editor.graph.background;c==mxConstants.NONE&&(c=null);null==c&&0==b&&(c="#ffffff");var f=this.editor.graph.getSvg(c,a,k,m,null,d,null,null,"blank"==r?"_blank":"self"==r?"_top":null);e&&this.editor.graph.addSvgShadow(f);var g=this.getBaseFilename()+".svg",q=mxUtils.bind(this,function(a){this.spinner.stop();n&&a.setAttribute("content",this.getFileData(!0,null,null,null,d,t));if(null!=this.editor.fontCss){var c=a.ownerDocument,c=null!= +c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"style"):c.createElement("style");c.setAttribute("type","text/css");mxUtils.setTextContent(c,this.editor.fontCss);a.getElementsByTagName("defs")[0].appendChild(c)}var b='<?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(g,"svg",b,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")}, +mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}))});this.convertMath(this.editor.graph,f,!1,mxUtils.bind(this,function(){l?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.convertImages(f,q,this.thumbImageCache)):q(f)}))}};EditorUi.prototype.addRadiobox=function(a,b,d,e,n,l,k){return this.addCheckbox(a,d,e,n,l,k,!0,b)};EditorUi.prototype.addCheckbox=function(a,b,d,e,n,l,k,m){l=null!=l?l:!0;var c=document.createElement("input");c.style.marginRight="8px";c.style.marginTop= +"16px";c.setAttribute("type",k?"radio":"checkbox");k="geCheckbox-"+Editor.guid();c.id=k;null!=m&&c.setAttribute("name",m);d&&(c.setAttribute("checked","checked"),c.defaultChecked=!0);e&&c.setAttribute("disabled","disabled");l&&(a.appendChild(c),d=document.createElement("label"),mxUtils.write(d,b),d.setAttribute("for",k),a.appendChild(d),n||mxUtils.br(a));return c};EditorUi.prototype.addEditButton=function(a,b){var c=this.addCheckbox(a,mxResources.get("edit")+":",!0,null,!0);c.style.marginLeft="24px"; +var d=this.getCurrentFile(),f="";null!=d&&d.getMode()!=App.MODE_DEVICE&&d.getMode()!=App.MODE_BROWSER&&(f=window.location.href);var e=document.createElement("select");e.style.width="120px";e.style.marginLeft="8px";e.style.marginRight="10px";e.className="geBtn";d=document.createElement("option");d.setAttribute("value","blank");mxUtils.write(d,mxResources.get("makeCopy"));e.appendChild(d);d=document.createElement("option");d.setAttribute("value","custom");mxUtils.write(d,mxResources.get("custom")+"..."); +e.appendChild(d);a.appendChild(e);mxEvent.addListener(e,"change",mxUtils.bind(this,function(){if("custom"==e.value){var a=new FilenameDialog(this,f,mxResources.get("ok"),function(a){null!=a?f=a:e.value="blank"},mxResources.get("url"),null,null,null,null,function(){e.value="blank"});this.showDialog(a.container,300,80,!0,!1);a.init()}}));mxEvent.addListener(c,"change",mxUtils.bind(this,function(){c.checked&&(null==b||b.checked)?e.removeAttribute("disabled"):e.setAttribute("disabled","disabled")})); +mxUtils.br(a);return{getLink:function(){return c.checked?"blank"===e.value?"_blank":f:null},getEditInput:function(){return c},getEditSelect:function(){return e}}};EditorUi.prototype.addLinkSection=function(a,b){function c(){k.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=e&&e!=mxConstants.NONE?"border:1px solid black;background-color:"+e:"background-position:center center;background-repeat:no-repeat;background-image:url('"+Dialog.prototype.closeImage+"')")+';"></div>'} +mxUtils.write(a,mxResources.get("links")+":");var d=document.createElement("select");d.style.width="100px";d.style.marginLeft="8px";d.style.marginRight="10px";d.className="geBtn";var f=document.createElement("option");f.setAttribute("value","auto");mxUtils.write(f,mxResources.get("automatic"));d.appendChild(f);f=document.createElement("option");f.setAttribute("value","blank");mxUtils.write(f,mxResources.get("openInNewWindow"));d.appendChild(f);f=document.createElement("option");f.setAttribute("value", +"self");mxUtils.write(f,mxResources.get("openInThisWindow"));d.appendChild(f);b&&(f=document.createElement("option"),f.setAttribute("value","frame"),mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),d.appendChild(f));a.appendChild(d);mxUtils.write(a,mxResources.get("borderColor")+":");var e="#0000ff",k=null,k=mxUtils.button("",mxUtils.bind(this,function(a){this.pickColor(e||"none",function(a){e=a;c()});mxEvent.consume(a)}));c();k.style.padding=mxClient.IS_FF? +"4px 2px 4px 2px":"4px";k.style.marginLeft="4px";k.style.height="22px";k.style.width="22px";k.style.position="relative";k.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";k.className="geColorBtn";a.appendChild(k);mxUtils.br(a);return{getColor:function(){return e},getTarget:function(){return d.value},focus:function(){d.focus()}}};EditorUi.prototype.createLink=function(a,b,d,e,n,l,k,m){var c=this.getCurrentFile(),f=[];e&&(f.push("lightbox=1"),"auto"!=a&&f.push("target="+a),null!= +b&&b!=mxConstants.NONE&&f.push("highlight="+("#"==b.charAt(0)?b.substring(1):b)),null!=n&&0<n.length&&f.push("edit="+encodeURIComponent(n)),l&&f.push("layers=1"),this.editor.graph.foldingEnabled&&f.push("nav=1"));d&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&f.push("page-id="+this.currentPage.getId());a=!0;null!=k?d="#U"+encodeURIComponent(k):(c=this.getCurrentFile(),m||null==c||c.constructor!=window.DriveFile?d="#R"+encodeURIComponent(d?this.getFileData(!0,null,null, +null,null,null,null,!0):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(d="#"+c.getHash(),a=!1));a&&null!=c&&null!=c.getTitle()&&c.getTitle()!=this.defaultFilename&&f.push("title="+encodeURIComponent(c.getTitle()));return(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host+"/")+(0<f.length?"?"+f.join("&"):"")+d};EditorUi.prototype.createHtml=function(a,b,d,e,n,l,k,m,t,r,v){this.getBasenames(); +var c={};""!=n&&n!=mxConstants.NONE&&(c.highlight=n);"auto"!==e&&(c.target=e);t||(c.lightbox=!1);c.nav=this.editor.graph.foldingEnabled;d=parseInt(d);isNaN(d)||100==d||(c.zoom=d/100);d=[];k&&(d.push("pages"),c.resize=!0,null!=this.pages&&null!=this.currentPage&&(c.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(d.push("zoom"),c.resize=!0);m&&d.push("layers");0<d.length&&(t&&d.push("lightbox"),c.toolbar=d.join(" "));null!=r&&0<r.length&&(c.edit=r);null!=a?c.url=a:c.xml=this.getFileData(!0, +null,null,null,null,!k);b='<div class="mxgraph" style="'+(l?"max-width:100%;":"")+(""!=d?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(c))+'"></div>';a=null!=a?"&fetch="+encodeURIComponent(a):"";v(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,d,e){var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("html"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(f);var g=document.createElement("div");g.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var k=document.createElement("input");k.style.cssText= +"margin-right:8px;margin-top:8px;margin-bottom:8px;";k.setAttribute("value","url");k.setAttribute("type","radio");k.setAttribute("name","type-embedhtmldialog");f=k.cloneNode(!0);f.setAttribute("value","copy");g.appendChild(f);var q=document.createElement("span");mxUtils.write(q,mxResources.get("includeCopyOfMyDiagram"));g.appendChild(q);mxUtils.br(g);g.appendChild(k);q=document.createElement("span");mxUtils.write(q,mxResources.get("publicDiagramUrl"));g.appendChild(q);var m=this.getCurrentFile(); +null==d&&null!=m&&m.constructor==window.DriveFile&&(q=document.createElement("a"),q.style.paddingLeft="12px",q.style.color="gray",q.setAttribute("href","javascript:void(0);"),mxUtils.write(q,mxResources.get("share")),g.appendChild(q),mxEvent.addListener(q,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(m.getId())})));f.setAttribute("checked","checked");null==d&&k.setAttribute("disabled","disabled");c.appendChild(g);var v=this.addLinkSection(c),r=this.addCheckbox(c, +mxResources.get("zoom"),!0,null,!0);mxUtils.write(c,":");var p=document.createElement("input");p.setAttribute("type","text");p.style.marginRight="16px";p.style.width="60px";p.style.marginLeft="4px";p.style.marginRight="12px";p.value="100%";c.appendChild(p);var u=this.addCheckbox(c,mxResources.get("fit"),!0),g=null!=this.pages&&1<this.pages.length,y=y=this.addCheckbox(c,mxResources.get("allPages"),g,!g),z=this.addCheckbox(c,mxResources.get("layers"),!0),H=this.addCheckbox(c,mxResources.get("lightbox"), +!0),O=this.addEditButton(c,H),B=O.getEditInput();B.style.marginBottom="16px";mxEvent.addListener(H,"change",function(){H.checked?B.removeAttribute("disabled"):B.setAttribute("disabled","disabled");B.checked&&H.checked?O.getEditSelect().removeAttribute("disabled"):O.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,c,mxUtils.bind(this,function(){e(k.checked?d:null,r.checked,p.value,v.getTarget(),v.getColor(),u.checked,y.checked,z.checked,H.checked,O.getLink())}),null,a, +b);this.showDialog(a.container,340,384,!0,!0);f.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,d,e,n,l){var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,a||mxResources.get("link"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(f);var g=this.getCurrentFile(),f="https://desk.draw.io/support/solutions/articles/16000051941";a=0;if(null!=g&&g.constructor==window.DriveFile&& +!b){a=80;var f="https://desk.draw.io/support/solutions/articles/16000039384",k=document.createElement("div");k.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var q=document.createElement("div");q.style.whiteSpace="normal";mxUtils.write(q,mxResources.get("linkAccountRequired"));k.appendChild(q);q=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(g.getId())}));q.style.marginTop= +"12px";q.className="geBtn";k.appendChild(q);c.appendChild(k);q=document.createElement("a");q.style.paddingLeft="12px";q.style.color="gray";q.style.fontSize="11px";q.setAttribute("href","javascript:void(0);");mxUtils.write(q,mxResources.get("check"));k.appendChild(q);mxEvent.addListener(q,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(a){this.spinner.stop();a=new ErrorDialog(this,null, +mxResources.get(null!=a?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(a.container,300,80,!0,!1);a.init()}))}))}var m=null,p=null;if(null!=d||null!=e)a+=30,mxUtils.write(c,mxResources.get("width")+":"),m=document.createElement("input"),m.setAttribute("type","text"),m.style.marginRight="16px",m.style.width="50px",m.style.marginLeft="6px",m.style.marginRight="16px",m.style.marginBottom="10px",m.value="100%",c.appendChild(m),mxUtils.write(c,mxResources.get("height")+":"), +p=document.createElement("input"),p.setAttribute("type","text"),p.style.width="50px",p.style.marginLeft="6px",p.style.marginBottom="10px",p.value=e+"px",c.appendChild(p),mxUtils.br(c);var r=this.addLinkSection(c,l);d=null!=this.pages&&1<this.pages.length;var u=null;if(null==g||g.constructor!=window.DriveFile||b)u=this.addCheckbox(c,mxResources.get("allPages"),d,!d);var y=this.addCheckbox(c,mxResources.get("lightbox"),!0),H=this.addEditButton(c,y),z=H.getEditInput(),B=this.addCheckbox(c,mxResources.get("layers"), +!0);B.style.marginLeft=z.style.marginLeft;B.style.marginBottom="16px";B.style.marginTop="8px";mxEvent.addListener(y,"change",function(){y.checked?(B.removeAttribute("disabled"),z.removeAttribute("disabled")):(B.setAttribute("disabled","disabled"),z.setAttribute("disabled","disabled"));z.checked&&y.checked?H.getEditSelect().removeAttribute("disabled"):H.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,c,mxUtils.bind(this,function(){n(r.getTarget(),r.getColor(),null==u? +!0:u.checked,y.checked,H.getLink(),B.checked,null!=m?m.value:null,null!=p?p.value:null)}),null,mxResources.get("create"),f);this.showDialog(b.container,340,254+a,!0,!0);null!=m?(m.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?m.select():document.execCommand("selectAll",!1,null)):r.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,d,e,n){var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f, +mxResources.get("image"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(n?"10":"4")+"px";c.appendChild(f);if(n){mxUtils.write(c,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%";c.appendChild(g);mxUtils.write(c,mxResources.get("borderWidth")+":");var k=document.createElement("input");k.setAttribute("type", +"text");k.style.marginRight="16px";k.style.width="60px";k.style.marginLeft="4px";k.value=this.lastExportBorder||"0";c.appendChild(k);mxUtils.br(c)}var q=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),m=e?null:this.addCheckbox(c,mxResources.get("includeCopyOfMyDiagram"),!0),f=this.editor.graph,r=e?null:this.addCheckbox(c,mxResources.get("transparentBackground"),f.background==mxConstants.NONE||null==f.background);null!=r&&(r.style.marginBottom="16px");a= +new CustomDialog(this,c,mxUtils.bind(this,function(){var a=parseInt(g.value)/100||1,c=parseInt(k.value)||0;d(!q.checked,null!=m?m.checked:!1,null!=r?r.checked:!1,a,c)}),null,a,b);this.showDialog(a.container,300,(n?25:0)+(e?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,d,e,n,l,k,m){k=null!=k?k:!0;var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=this.editor.graph,g="jpeg"==m?196:300,q=document.createElement("h3");mxUtils.write(q,a);q.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px"; +c.appendChild(q);mxUtils.write(c,mxResources.get("zoom")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.marginRight="16px";p.style.width="60px";p.style.marginLeft="4px";p.style.marginRight="12px";p.value=this.lastExportZoom||"100%";c.appendChild(p);mxUtils.write(c,mxResources.get("borderWidth")+":");var x=document.createElement("input");x.setAttribute("type","text");x.style.marginRight="16px";x.style.width="60px";x.style.marginLeft="4px";x.value=this.lastExportBorder|| +"0";c.appendChild(x);mxUtils.br(c);var r=this.addCheckbox(c,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=m),A=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,f.isSelectionEmpty()),u=document.createElement("input");u.style.marginTop="16px";u.style.marginRight="8px";u.style.marginLeft="24px";u.setAttribute("disabled","disabled");u.setAttribute("type","checkbox");l&&(c.appendChild(u),mxUtils.write(c,mxResources.get("crop")),mxUtils.br(c),g+=26,mxEvent.addListener(A,"change",function(){A.checked? +u.removeAttribute("disabled"):u.setAttribute("disabled","disabled")}));f.isSelectionEmpty()||(u.setAttribute("checked","checked"),u.defaultChecked=!0);var y=this.addCheckbox(c,mxResources.get("shadow"),f.shadowVisible),B=document.createElement("input");B.style.marginTop="16px";B.style.marginRight="8px";B.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||B.setAttribute("disabled","disabled");b&&(c.appendChild(B),mxUtils.write(c,mxResources.get("embedImages")),mxUtils.br(c),g+= +26);var J=null;if("png"==m||"jpeg"==m)J=this.addCheckbox(c,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),g+=26;var P=this.addCheckbox(c,mxResources.get("includeCopyOfMyDiagram"),k,null,null,"jpeg"!=m),S=null!=this.pages&&1<this.pages.length,z=this.addCheckbox(c,S?mxResources.get("allPages"):"",S,!S,null,"jpeg"!=m);z.style.marginLeft="24px";z.style.marginBottom="16px";S||(z.style.display="none");mxEvent.addListener(P,"change",function(){P.checked&&S?z.removeAttribute("disabled"): +z.setAttribute("disabled","disabled")});k&&S||z.setAttribute("disabled","disabled");var V=document.createElement("select");V.style.maxWidth="260px";V.style.marginLeft="8px";V.style.marginRight="10px";V.className="geBtn";a=document.createElement("option");a.setAttribute("value","auto");mxUtils.write(a,mxResources.get("automatic"));V.appendChild(a);a=document.createElement("option");a.setAttribute("value","blank");mxUtils.write(a,mxResources.get("openInNewWindow"));V.appendChild(a);a=document.createElement("option"); +a.setAttribute("value","self");mxUtils.write(a,mxResources.get("openInThisWindow"));V.appendChild(a);"svg"==m&&(mxUtils.write(c,mxResources.get("links")+":"),c.appendChild(V),mxUtils.br(c),mxUtils.br(c),g+=26);d=new CustomDialog(this,c,mxUtils.bind(this,function(){this.lastExportBorder=x.value;this.lastExportZoom=p.value;n(p.value,r.checked,!A.checked,y.checked,P.checked,B.checked,x.value,u.checked,!z.checked,V.value,null!=J?J.checked:null)}),null,d,e);this.showDialog(d.container,340,g,!0,!0,null, +null,null,null,!0);p.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?p.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,d,e,n){var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=this.editor.graph;if(null!=b){var g=document.createElement("h3");mxUtils.write(g,b);g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";c.appendChild(g)}var k=this.addCheckbox(c,mxResources.get("fit"), +!0),q=this.addCheckbox(c,mxResources.get("shadow"),f.shadowVisible&&e,!e),m=this.addCheckbox(c,d),r=this.addCheckbox(c,mxResources.get("lightbox"),!0),p=this.addEditButton(c,r),u=p.getEditInput(),y=1<f.model.getChildCount(f.model.getRoot()),z=this.addCheckbox(c,mxResources.get("layers"),y,!y);z.style.marginLeft=u.style.marginLeft;z.style.marginBottom="12px";z.style.marginTop="8px";mxEvent.addListener(r,"change",function(){r.checked?(y&&z.removeAttribute("disabled"),u.removeAttribute("disabled")): +(z.setAttribute("disabled","disabled"),u.setAttribute("disabled","disabled"));u.checked&&r.checked?p.getEditSelect().removeAttribute("disabled"):p.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,c,mxUtils.bind(this,function(){a(k.checked,q.checked,m.checked,r.checked,p.getLink(),z.checked)}),null,mxResources.get("embed"),n);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,d,e,n,l,k,m){function c(c){var b=" ",g="";e&&(b=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+ +EditorUi.drawHost+"/?client=1&lightbox=1"+(n?"&edit=_blank":"")+(l?"&layers=1":"")+"');}})(this);\"",g+="cursor:pointer;");a&&(g+="max-width:100%;");var q="";d&&(q=' width="'+Math.round(f.width)+'" height="'+Math.round(f.height)+'"');k('<img src="'+c+'"'+q+(""!=g?' style="'+g+'"':"")+b+"/>")}var f=this.editor.graph.getGraphBounds();if(this.isExportToCanvas())this.exportToCanvas(mxUtils.bind(this,function(a){var b=e?this.getFileData(!0):null;a=this.createImageDataUri(a,b,"png");c(a)}),null,null,null, +mxUtils.bind(this,function(a){m({message:mxResources.get("unknownError")})}),null,!0,d?2:1,null,b);else if(b=this.getFileData(!0),f.width*f.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){var g="";d&&(g="&w="+Math.round(2*f.width)+"&h="+Math.round(2*f.height));var q=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(e?"1":"0")+g+"&xml="+encodeURIComponent(b));q.send(mxUtils.bind(this,function(){200<=q.getStatus()&&299>=q.getStatus()?c("data:image/png;base64,"+q.getText()):m({message:mxResources.get("unknownError")})}))}else m({message:mxResources.get("drawingTooLarge")})}; +EditorUi.prototype.createEmbedSvg=function(a,b,d,e,k,l,m){var c=this.editor.graph.getSvg(),f=c.getElementsByTagName("a");if(null!=f)for(var g=0;g<f.length;g++){var n=f[g].getAttribute("href");null!=n&&"#"==n.charAt(0)&&"_blank"==f[g].getAttribute("target")&&f[g].removeAttribute("target")}e&&c.setAttribute("content",this.getFileData(!0));b&&this.editor.graph.addSvgShadow(c);if(d){var q=" ",p="";e&&(q="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+ +EditorUi.drawHost+"/?client=1&lightbox=1"+(k?"&edit=_blank":"")+(l?"&layers=1":"")+"');}})(this);\"",p+="cursor:pointer;");a&&(p+="max-width:100%;");this.convertImages(c,mxUtils.bind(this,function(a){m('<img src="'+this.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=p?' style="'+p+'"':"")+q+"/>")}))}else p="",e&&(c.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+ +EditorUi.drawHost+"/?client=1&lightbox=1"+(k?"&edit=_blank":"")+(l?"&layers=1":"")+"');}}})(this);"),p+="cursor:pointer;"),a&&(a=parseInt(c.getAttribute("width")),b=parseInt(c.getAttribute("height")),c.setAttribute("viewBox","-0.5 -0.5 "+a+" "+b),p+="max-width:100%;max-height:"+b+"px;",c.removeAttribute("height")),""!=p&&c.setAttribute("style",p),m(mxUtils.getXml(c))};EditorUi.prototype.timeSince=function(a){a=Math.floor((new Date-a)/1E3);var c=Math.floor(a/31536E3);if(1<c)return c+" "+mxResources.get("years"); c=Math.floor(a/2592E3);if(1<c)return c+" "+mxResources.get("months");c=Math.floor(a/86400);if(1<c)return c+" "+mxResources.get("days");c=Math.floor(a/3600);if(1<c)return c+" "+mxResources.get("hours");c=Math.floor(a/60);return 1<c?c+" "+mxResources.get("minutes"):1==c?c+" "+mxResources.get("minute"):null};EditorUi.prototype.convertMath=function(a,b,d,e){a.mathEnabled&&"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?(Editor.MathJaxRender(b),window.setTimeout(mxUtils.bind(this,function(){MathJax.Hub.Queue(mxUtils.bind(this, -function(){e()}))}),0)):e()};EditorUi.prototype.decodeNodeIntoGraph=function(a,b){if(null!=a){var c=null;if("diagram"==a.nodeName)c=a;else if("mxfile"==a.nodeName){var d=a.getElementsByTagName("diagram");if(0<d.length){var c=d[0],f=b.getGlobalVariable;b.getGlobalVariable=function(a){return"page"==a?c.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==a?1:f.apply(this,arguments)}}}null!=c&&(a=Editor.parseDiagramNode(c))}d=this.editor.graph;try{this.editor.graph=b,this.editor.setGraphXml(a)}catch(g){}finally{this.editor.graph= -d}return a};EditorUi.prototype.getEmbeddedPng=function(a,b,d){try{var c=this.editor.graph,f=null;if(null!=d&&0<d.length)c=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(c.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(d).documentElement,!0),c),f=d;else if(null!=this.pages&&this.currentPage!=this.pages[0]){var c=this.createTemporaryGraph(c.getStylesheet()),e=c.getGlobalVariable,k=this.pages[0];c.getGlobalVariable=function(a){return"page"== -a?k.getName():"pagenumber"==a?1:e.apply(this,arguments)};document.body.appendChild(c.container);c.model.setRoot(k.root)}this.exportToCanvas(mxUtils.bind(this,function(d){try{null==f&&(f=this.getFileData(!0));var e=d.toDataURL("image/png"),e=this.writeGraphModelToPng(e,"tEXt","mxfile",encodeURIComponent(f));a(e.substring(e.lastIndexOf(",")+1));c!=this.editor.graph&&c.container.parentNode.removeChild(c.container)}catch(F){null!=b&&b(F)}}),null,null,null,mxUtils.bind(this,function(a){null!=b&&b(a)}), -null,null,null,null,c.shadowVisible,null,c)}catch(z){null!=b&&b(z)}};EditorUi.prototype.getEmbeddedSvg=function(a,b,d,e,l,g,m){m=b.background;m==mxConstants.NONE&&(m=null);g=b.getSvg(m,null,null,null,null,g);b.shadowVisible&&b.addSvgShadow(g);null!=a&&g.setAttribute("content",a);null!=d&&g.setAttribute("resource",d);if(null!=l)this.convertImages(g,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))}));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(g)};EditorUi.prototype.exportImage=function(a,b,d,e,l,g,m,r,t,u){t=null!=t?t:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var c=this.editor.graph.isSelectionEmpty();d=null!=d?d:c;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop(); -try{this.saveCanvas(a,l?this.getFileData(!0,null,null,null,d,r):null,t,!r)}catch(p){"Invalid image"==p.message?this.downloadFile(t):this.handleError(p)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,d,a||1,b,e,null,null,g,m,u)}catch(D){this.spinner.stop(),this.handleError(D)}}};EditorUi.prototype.loadFonts=function(a){if(null!=this.editor.fontCss&&null==this.editor.resolvedFontCss){var c=function(a){return a.replace(RegExp("^[\\s\"']+", -"g"),"").replace(RegExp("[\\s\"']+$","g"),"")},b=this.editor.fontCss.split("url("),d=0,e={},g=mxUtils.bind(this,function(){if(0==d){for(var f=[b[0]],k=1;k<b.length;k++){var g=b[k].indexOf(")");f.push('url("');f.push(e[c(b[k].substring(0,g))]);f.push('"'+b[k].substring(g))}this.editor.resolvedFontCss=f.join("");a()}});if(0<b.length)for(var l=1;l<b.length;l++){var m=b[l].indexOf(")"),t=null,r=b[l].indexOf("format(",m);0<r&&(t=c(b[l].substring(r+7,b[l].indexOf(")",r))));mxUtils.bind(this,function(a){if(null== +function(){e()}))}),0)):e()};EditorUi.prototype.decodeNodeIntoGraph=function(a,b){if(null!=a){var c=null;if("diagram"==a.nodeName)c=a;else if("mxfile"==a.nodeName){var d=a.getElementsByTagName("diagram");if(0<d.length){var c=d[0],f=b.getGlobalVariable;b.getGlobalVariable=function(a){return"page"==a?c.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==a?1:f.apply(this,arguments)}}}null!=c&&(a=Editor.parseDiagramNode(c))}d=this.editor.graph;try{this.editor.graph=b,this.editor.setGraphXml(a)}catch(l){}finally{this.editor.graph= +d}return a};EditorUi.prototype.getEmbeddedPng=function(a,b,d){try{var c=this.editor.graph,f=null;if(null!=d&&0<d.length)c=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(c.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(d).documentElement,!0),c),f=d;else if(null!=this.pages&&this.currentPage!=this.pages[0]){var c=this.createTemporaryGraph(c.getStylesheet()),e=c.getGlobalVariable,g=this.pages[0];c.getGlobalVariable=function(a){return"page"== +a?g.getName():"pagenumber"==a?1:e.apply(this,arguments)};document.body.appendChild(c.container);c.model.setRoot(g.root)}this.exportToCanvas(mxUtils.bind(this,function(d){try{null==f&&(f=this.getFileData(!0));var e=d.toDataURL("image/png"),e=this.writeGraphModelToPng(e,"tEXt","mxfile",encodeURIComponent(f));a(e.substring(e.lastIndexOf(",")+1));c!=this.editor.graph&&c.container.parentNode.removeChild(c.container)}catch(E){null!=b&&b(E)}}),null,null,null,mxUtils.bind(this,function(a){null!=b&&b(a)}), +null,null,null,null,c.shadowVisible,null,c)}catch(A){null!=b&&b(A)}};EditorUi.prototype.getEmbeddedSvg=function(a,b,d,e,k,l,m){m=b.background;m==mxConstants.NONE&&(m=null);l=b.getSvg(m,null,null,null,null,l);b.shadowVisible&&b.addSvgShadow(l);null!=a&&l.setAttribute("content",a);null!=d&&l.setAttribute("resource",d);if(null!=k)this.convertImages(l,mxUtils.bind(this,function(a){k((e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+ +mxUtils.getXml(a))}));else return(e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(l)};EditorUi.prototype.exportImage=function(a,b,d,e,k,l,m,r,t,u,v){t=null!=t?t:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var c=this.editor.graph.isSelectionEmpty();d=null!=d?d:c;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.exportToCanvas(mxUtils.bind(this, +function(a){this.spinner.stop();try{this.saveCanvas(a,k?this.getFileData(!0,null,null,null,d,r):null,t,!r,v)}catch(C){"Invalid image"==C.message?this.downloadFile(t):this.handleError(C)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,d,a||1,b,e,null,null,l,m,u)}catch(p){this.spinner.stop(),this.handleError(p)}}};EditorUi.prototype.loadFonts=function(a){if(null!=this.editor.fontCss&&null==this.editor.resolvedFontCss){var c=function(a){return a.replace(RegExp("^[\\s\"']+", +"g"),"").replace(RegExp("[\\s\"']+$","g"),"")},b=this.editor.fontCss.split("url("),d=0,e={},l=mxUtils.bind(this,function(){if(0==d){for(var f=[b[0]],g=1;g<b.length;g++){var l=b[g].indexOf(")");f.push('url("');f.push(e[c(b[g].substring(0,l))]);f.push('"'+b[g].substring(l))}this.editor.resolvedFontCss=f.join("");a()}});if(0<b.length)for(var k=1;k<b.length;k++){var m=b[k].indexOf(")"),t=null,r=b[k].indexOf("format(",m);0<r&&(t=c(b[k].substring(r+7,b[k].indexOf(")",r))));mxUtils.bind(this,function(a){if(null== e[a]){e[a]=a;d++;var c="application/x-font-ttf";if("svg"==t||/(\.svg)($|\?)/i.test(a))c="image/svg+xml";else if("otf"==t||"embedded-opentype"==t||/(\.otf)($|\?)/i.test(a))c="application/x-font-opentype";else if("woff"==t||/(\.woff)($|\?)/i.test(a))c="application/font-woff";else if("woff2"==t||/(\.woff2)($|\?)/i.test(a))c="application/font-woff2";else if("eot"==t||/(\.eot)($|\?)/i.test(a))c="application/vnd.ms-fontobject";else if("sfnt"==t||/(\.sfnt)($|\?)/i.test(a))c="application/font-sfnt";var b= -a;/^https?:\/\//.test(b)&&!this.editor.isCorsEnabledForUrl(b)&&(b=PROXY_URL+"?url="+encodeURIComponent(a));this.loadUrl(b,mxUtils.bind(this,function(c){e[a]=c;d--;g()}),mxUtils.bind(this,function(a){d--;g()}),!0,null,"data:"+c+";charset=utf-8;base64,")}})(c(b[l].substring(0,m)),t)}}else a()};EditorUi.prototype.exportToCanvas=function(a,b,d,e,l,g,m,r,t,u,v,D,p,y,A){try{g=null!=g?g:!0;m=null!=m?m:!0;D=null!=D?D:this.editor.graph;p=null!=p?p:0;var c=t?null:D.background;c==mxConstants.NONE&&(c=null); -null==c&&(c=e);null==c&&0==t&&(c="#ffffff");this.convertImages(D.getSvg(null,null,null,y,null,m,null,null,null,u),mxUtils.bind(this,function(d){var f=new Image;f.onload=mxUtils.bind(this,function(){try{var e=function(){mxClient.IS_SF?window.setTimeout(function(){m.drawImage(f,p/r,p/r);a(k)},0):(m.drawImage(f,p/r,p/r),a(k))},k=document.createElement("canvas"),n=parseInt(d.getAttribute("width")),q=parseInt(d.getAttribute("height"));r=null!=r?r:1;null!=b&&(r=g?Math.min(1,Math.min(3*b/(4*q),b/n)):b/n); -n=Math.ceil(r*n)+2*p;q=Math.ceil(r*q)+2*p;k.setAttribute("width",n);k.setAttribute("height",q);var m=k.getContext("2d");null!=c&&(m.beginPath(),m.rect(0,0,n,q),m.fillStyle=c,m.fill());m.scale(r,r);if(A){var t=D.view,v=btoa(unescape(encodeURIComponent(t.createSvgGrid(t.gridColor)))),v="data:image/svg+xml;base64,"+v,x=D.gridSize*t.gridSteps*r,B=D.getGraphBounds(),z=B.x*r,u=B.y*r,F=new Image;F.src=v;F.onload=function(){for(var a=-Math.round(x-mxUtils.mod(t.translate.x*r-z,x)),c=-Math.round(x-mxUtils.mod(t.translate.y* -r-u,x));a<n;a+=x)for(var b=c;b<q;b+=x)m.drawImage(F,a/r,b/r);e()}}else e()}catch(X){null!=l&&l(X)}});f.onerror=function(a){null!=l&&l(a)};try{u&&this.editor.graph.addSvgShadow(d);var e=mxUtils.bind(this,function(){if(null!=this.editor.resolvedFontCss){var a=document.createElement("style");a.setAttribute("type","text/css");a.innerHTML=this.editor.resolvedFontCss;d.getElementsByTagName("defs")[0].appendChild(a)}this.convertMath(D,d,!0,mxUtils.bind(this,function(){f.src=this.createSvgDataUri(mxUtils.getXml(d))}))}); -this.loadFonts(e)}catch(J){null!=l&&l(J)}}),d,v)}catch(G){null!=l&&l(G)}};EditorUi.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var b=a.convert,d=this;a.convert=function(c){if(null!=c){var f="http://"==c.substring(0,7)||"https://"==c.substring(0,8);f&&!navigator.onLine?c=d.svgBrokenImage.src:!f||c.substring(0,a.baseUrl.length)==a.baseUrl||d.crossOriginImages&&d.editor.isCorsEnabledForUrl(c)?"chrome-extension://"!=c.substring(0,19)&&(c=b.apply(this,arguments)): -c=PROXY_URL+"?url="+encodeURIComponent(c)}return c};return a};EditorUi.prototype.convertImages=function(a,b,d,e){null==e&&(e=this.createImageUrlConverter());var c=0,f=d||{};d=mxUtils.bind(this,function(d,k){for(var g=a.getElementsByTagName(d),l=0;l<g.length;l++)mxUtils.bind(this,function(d){try{if(null!=d){var g=e.convert(d.getAttribute(k));if(null!=g&&"data:"!=g.substring(0,5)){var l=f[g];null==l?(c++,this.convertImageToDataUri(g,function(e){null!=e&&(f[g]=e,d.setAttribute(k,e));c--;0==c&&b(a)})): -d.setAttribute(k,l)}else null!=g&&d.setAttribute(k,g)}}catch(C){}})(g[l])});d("image","xlink:href");d("img","src");0==c&&b(a)};EditorUi.prototype.loadUrl=function(a,b,d,e,l,g,m){try{var c=!m&&(e||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||/(\.gif)($|\?)/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 f=a.getText();if(c){if((9==document.documentMode||10==document.documentMode)&& -"undefined"!==typeof window.mxUtilsBinaryToArray){a=mxUtilsBinaryToArray(a.request.responseBody).toArray();for(var f=Array(a.length),e=0;e<a.length;e++)f[e]=String.fromCharCode(a[e]);f=f.join("")}g=null!=g?g:"data:image/png;base64,";f=g+this.base64Encode(f)}b(f)}}else null!=d&&d({message:mxResources.get("error")+" "+a.getStatus()},a)}),function(a){null!=d&&d({message:mxResources.get("error")+" "+a.getStatus()})},c,this.timeout,function(){l&&null!=d&&d({code:App.ERROR_TIMEOUT,retry:f})})});f()}catch(F){null!= -d&&d(F)}};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 f=new Image,e=this;this.crossOriginImages&& -(f.crossOrigin="anonymous");f.onload=function(){window.clearTimeout(d);if(c)try{var a=document.createElement("canvas"),k=a.getContext("2d");a.height=f.height;a.width=f.width;k.drawImage(f,0,0);b(a.toDataURL())}catch(t){b(e.svgBrokenImage.src)}};f.onerror=function(){window.clearTimeout(d);c&&b(e.svgBrokenImage.src)};f.src=a}}catch(x){b(this.svgBrokenImage.src)}};EditorUi.prototype.importXml=function(a,b,d,e,l){b=null!=b?b:0;d=null!=d?d:0;var c=[];try{var f=this.editor.graph;if(null!=a&&0<a.length){f.model.beginUpdate(); -try{var k=mxUtils.parseXml(a),n=this.editor.extractGraphModel(k.documentElement,null!=this.pages);if(null!=n&&"mxfile"==n.nodeName&&null!=this.pages){var m=n.getElementsByTagName("diagram");if(1==m.length)n=Editor.parseDiagramNode(m[0]);else if(1<m.length){a={};var k=[],q=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(n=Editor.parseDiagramNode(m[0]),e=!1,q=1);for(;q<m.length;q++){var r=m[q].getAttribute("id");m[q].removeAttribute("id");var p=this.updatePageRoot(new DiagramPage(m[q])); -a[r]=m[q].getAttribute("id");var u=this.pages.length;null==p.getName()&&p.setName(mxResources.get("pageWithNumber",[u+1]));f.model.execute(new ChangePage(this,p,p,u,!0));k.push(p)}this.updatePageLinks(a,k)}}null!=n&&"mxGraphModel"===n.nodeName&&(c=f.importGraphModel(n,b,d,e))}finally{f.model.endUpdate()}}}catch(K){if(l)throw K;this.handleError(K)}return c};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,f=d.getLinkForCell(b);null!=f&&"data:page/id,"==f.substring(0,13)&&d.setLinkForCell(b,this.updatePageLink(a,f));if(d.isHtmlLabel(b)){c.innerHTML=d.getLabel(b);for(var e=c.getElementsByTagName("a"),l=!1,m=0;m<e.length;m++)f=e[m].getAttribute("href"),null!=f&&"data:page/id,"==f.substring(0,13)&&(e[m].setAttribute("href",this.updatePageLink(a,f)),l=!0);l&&d.labelChanged(b,c.innerHTML)}for(m=0;m<d.model.getChildCount(b);m++)this.updatePageLinksForCell(a, +a;/^https?:\/\//.test(b)&&!this.editor.isCorsEnabledForUrl(b)&&(b=PROXY_URL+"?url="+encodeURIComponent(a));this.loadUrl(b,mxUtils.bind(this,function(c){e[a]=c;d--;l()}),mxUtils.bind(this,function(a){d--;l()}),!0,null,"data:"+c+";charset=utf-8;base64,")}})(c(b[k].substring(0,m)),t)}}else a()};EditorUi.prototype.exportToCanvas=function(a,b,d,e,k,l,m,r,t,u,v,D,p,y,z){try{l=null!=l?l:!0;m=null!=m?m:!0;D=null!=D?D:this.editor.graph;p=null!=p?p:0;var c=t?null:D.background;c==mxConstants.NONE&&(c=null); +null==c&&(c=e);null==c&&0==t&&(c="#ffffff");this.convertImages(D.getSvg(null,null,null,y,null,m,null,null,null,u),mxUtils.bind(this,function(d){var f=new Image;f.onload=mxUtils.bind(this,function(){try{var e=function(){mxClient.IS_SF?window.setTimeout(function(){q.drawImage(f,p/r,p/r);a(g)},0):(q.drawImage(f,p/r,p/r),a(g))},g=document.createElement("canvas"),n=parseInt(d.getAttribute("width")),m=parseInt(d.getAttribute("height"));r=null!=r?r:1;null!=b&&(r=l?Math.min(1,Math.min(3*b/(4*m),b/n)):b/n); +n=Math.ceil(r*n)+2*p;m=Math.ceil(r*m)+2*p;g.setAttribute("width",n);g.setAttribute("height",m);var q=g.getContext("2d");null!=c&&(q.beginPath(),q.rect(0,0,n,m),q.fillStyle=c,q.fill());q.scale(r,r);if(z){var t=D.view,v=btoa(unescape(encodeURIComponent(t.createSvgGrid(t.gridColor)))),v="data:image/svg+xml;base64,"+v,x=D.gridSize*t.gridSteps*r,u=D.getGraphBounds(),A=u.x*r,B=u.y*r,E=new Image;E.src=v;E.onload=function(){for(var a=-Math.round(x-mxUtils.mod(t.translate.x*r-A,x)),c=-Math.round(x-mxUtils.mod(t.translate.y* +r-B,x));a<n;a+=x)for(var b=c;b<m;b+=x)q.drawImage(E,a/r,b/r);e()}}else e()}catch(W){null!=k&&k(W)}});f.onerror=function(a){null!=k&&k(a)};try{u&&this.editor.graph.addSvgShadow(d);var e=mxUtils.bind(this,function(){if(null!=this.editor.resolvedFontCss){var a=document.createElement("style");a.setAttribute("type","text/css");a.innerHTML=this.editor.resolvedFontCss;d.getElementsByTagName("defs")[0].appendChild(a)}this.convertMath(D,d,!0,mxUtils.bind(this,function(){f.src=this.createSvgDataUri(mxUtils.getXml(d))}))}); +this.loadFonts(e)}catch(J){null!=k&&k(J)}}),d,v)}catch(H){null!=k&&k(H)}};EditorUi.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var b=a.convert,d=this;a.convert=function(c){if(null!=c){var f="http://"==c.substring(0,7)||"https://"==c.substring(0,8);f&&!navigator.onLine?c=d.svgBrokenImage.src:!f||c.substring(0,a.baseUrl.length)==a.baseUrl||d.crossOriginImages&&d.editor.isCorsEnabledForUrl(c)?"chrome-extension://"!=c.substring(0,19)&&(c=b.apply(this,arguments)): +c=PROXY_URL+"?url="+encodeURIComponent(c)}return c};return a};EditorUi.prototype.convertImages=function(a,b,d,e){null==e&&(e=this.createImageUrlConverter());var c=0,f=d||{};d=mxUtils.bind(this,function(d,g){for(var l=a.getElementsByTagName(d),k=0;k<l.length;k++)mxUtils.bind(this,function(d){try{if(null!=d){var l=e.convert(d.getAttribute(g));if(null!=l&&"data:"!=l.substring(0,5)){var k=f[l];null==k?(c++,this.convertImageToDataUri(l,function(e){null!=e&&(f[l]=e,d.setAttribute(g,e));c--;0==c&&b(a)})): +d.setAttribute(g,k)}else null!=l&&d.setAttribute(g,l)}}catch(C){}})(l[k])});d("image","xlink:href");d("img","src");0==c&&b(a)};EditorUi.prototype.loadUrl=function(a,b,d,e,k,l,m){try{var c=!m&&(e||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||/(\.gif)($|\?)/i.test(a));k=null!=k?k:!0;var f=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=b){var f=a.getText();if(c){if((9==document.documentMode||10==document.documentMode)&& +"undefined"!==typeof window.mxUtilsBinaryToArray){a=mxUtilsBinaryToArray(a.request.responseBody).toArray();for(var f=Array(a.length),e=0;e<a.length;e++)f[e]=String.fromCharCode(a[e]);f=f.join("")}l=null!=l?l:"data:image/png;base64,";f=l+this.base64Encode(f)}b(f)}}else null!=d&&d({message:mxResources.get("error")+" "+a.getStatus()},a)}),function(a){null!=d&&d({message:mxResources.get("error")+" "+a.getStatus()})},c,this.timeout,function(){k&&null!=d&&d({code:App.ERROR_TIMEOUT,retry:f})})});f()}catch(E){null!= +d&&d(E)}};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 f=new Image,e=this;this.crossOriginImages&& +(f.crossOrigin="anonymous");f.onload=function(){window.clearTimeout(d);if(c)try{var a=document.createElement("canvas"),g=a.getContext("2d");a.height=f.height;a.width=f.width;g.drawImage(f,0,0);b(a.toDataURL())}catch(t){b(e.svgBrokenImage.src)}};f.onerror=function(){window.clearTimeout(d);c&&b(e.svgBrokenImage.src)};f.src=a}}catch(x){b(this.svgBrokenImage.src)}};EditorUi.prototype.importXml=function(a,b,d,e,k){b=null!=b?b:0;d=null!=d?d:0;var c=[];try{var f=this.editor.graph;if(null!=a&&0<a.length){f.model.beginUpdate(); +try{var g=mxUtils.parseXml(a),n=this.editor.extractGraphModel(g.documentElement,null!=this.pages);if(null!=n&&"mxfile"==n.nodeName&&null!=this.pages){var m=n.getElementsByTagName("diagram");if(1==m.length)n=Editor.parseDiagramNode(m[0]);else if(1<m.length){a={};var g=[],q=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(n=Editor.parseDiagramNode(m[0]),e=!1,q=1);for(;q<m.length;q++){var r=m[q].getAttribute("id");m[q].removeAttribute("id");var p=this.updatePageRoot(new DiagramPage(m[q])); +a[r]=m[q].getAttribute("id");var u=this.pages.length;null==p.getName()&&p.setName(mxResources.get("pageWithNumber",[u+1]));f.model.execute(new ChangePage(this,p,p,u,!0));g.push(p)}this.updatePageLinks(a,g)}}null!=n&&"mxGraphModel"===n.nodeName&&(c=f.importGraphModel(n,b,d,e))}finally{f.model.endUpdate()}}}catch(K){if(k)throw K;this.handleError(K)}return c};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,f=d.getLinkForCell(b);null!=f&&"data:page/id,"==f.substring(0,13)&&d.setLinkForCell(b,this.updatePageLink(a,f));if(d.isHtmlLabel(b)){c.innerHTML=d.getLabel(b);for(var e=c.getElementsByTagName("a"),k=!1,m=0;m<e.length;m++)f=e[m].getAttribute("href"),null!=f&&"data:page/id,"==f.substring(0,13)&&(e[m].setAttribute("href",this.updatePageLink(a,f)),k=!0);k&&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){var c=a[b.substring(b.indexOf(",")+1)];return null!=c?"data:page/id,"+c:null};EditorUi.prototype.isRemoteVisioFormat=function(a){return/(\.v(sd|dx))($|\?)/i.test(a)||/(\.vs(s|x))($|\?)/i.test(a)};EditorUi.prototype.importVisio=function(a,b,d,e){e=null!=e?e:a.name;d=null!=d?d:mxUtils.bind(this,function(a){this.handleError(a)});var c=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var c=this.isRemoteVisioFormat(e); -try{var f="UNKNOWN-VISIO",k=e.lastIndexOf(".");0<=k&&k<e.length&&(f=e.substring(k+1).toUpperCase());EditorUi.logEvent({category:f+"-MS-IMPORT-FILE",action:"filename_"+e,label:c?"remote":"local"})}catch(F){}if(c)if(null!=VSD_CONVERT_URL){c=new FormData;c.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{this.doImportVisio(l.response, -b,d,e)}catch(F){d(F)}else d({})});l.send(c)}else d({message:"conf"==this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else try{this.doImportVisio(a,b,d,e)}catch(F){d(F)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?c():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",c))};EditorUi.prototype.importGraphML=function(a,b, +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:c?"remote":"local"})}catch(E){}if(c)if(null!=VSD_CONVERT_URL){c=new FormData;c.append("file1",a,e);var k=new XMLHttpRequest;k.open("POST",VSD_CONVERT_URL);k.responseType="blob";this.addRemoteServiceSecurityCheck(k);k.onreadystatechange=mxUtils.bind(this,function(){if(4==k.readyState)if(200<=k.status&&299>=k.status)try{this.doImportVisio(k.response, +b,d,e)}catch(E){d(E)}else d({})});k.send(c)}else d({message:"conf"==this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else try{this.doImportVisio(a,b,d,e)}catch(E){d(E)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?c():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",c))};EditorUi.prototype.importGraphML=function(a,b, d){d=null!=d?d:mxUtils.bind(this,function(a){this.handleError(a)});var c=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(a,b,d)}catch(n){d(n)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?c():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",c))};EditorUi.prototype.exportVisio=function(){var a=mxUtils.bind(this,function(){this.loadingExtensions= !1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams()||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,d){var c=mxUtils.bind(this, function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter){try{EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+a.length})}catch(n){}try{b(LucidImporter.importState(JSON.parse(a)))}catch(n){d(n)}}else d({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(c,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",c): -mxscript("js/extensions.min.js",c))};EditorUi.prototype.insertAsPreText=function(a,b,d){var c=this.editor.graph,f=null;c.getModel().beginUpdate();try{f=c.insertVertex(null,null,"<pre>"+a+"</pre>",b,d,1,1,"text;html=1;align=center;verticalAlign=middle;"),c.updateCellSize(f,!0)}finally{c.getModel().endUpdate()}return f};EditorUi.prototype.insertTextAt=function(a,b,d,e,l,g,m){g=null!=g?g:!0;m=null!=m?m:!0;if(null!=a)if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a))this.parseFile(new Blob([a.replace(/\s+/g, -" ")],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&this.editor.graph.setSelectionCells(this.insertTextAt(a.responseText,b,d,!0))}));else if("data:"==a.substring(0,5)||!this.isOffline()&&(l||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var c=this.editor.graph;if("data:image/png;base64,"==a.substring(0,22)){var f=this.extractGraphModelFromPng(a),k=this.importXml(f,b,d,g,!0);if(0<k.length)return k}if("data:image/svg+xml;"==a.substring(0, -19))try{if(f=null,"data:image/svg+xml;base64,"==a.substring(0,26)?(f=a.substring(a.indexOf(",")+1),f=window.atob&&!mxClient.IS_SF?atob(f):Base64.decode(f,!0)):f=decodeURIComponent(a.substring(a.indexOf(",")+1)),k=this.importXml(f,b,d,g,!0),0<k.length)return k}catch(v){}this.loadImage(a,mxUtils.bind(this,function(f){if("data:"==a.substring(0,5))this.resizeImage(f,a,mxUtils.bind(this,function(a,f,e){c.setSelectionCell(c.insertVertex(null,null,"",c.snap(b),c.snap(d),f,e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+ -this.convertDataUri(a)+";"))}),m,this.maxImageSize);else{var e=Math.min(1,Math.min(this.maxImageSize/f.width,this.maxImageSize/f.height)),k=Math.round(f.width*e);f=Math.round(f.height*e);c.setSelectionCell(c.insertVertex(null,null,"",c.snap(b),c.snap(d),k,f,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";"))}}),mxUtils.bind(this,function(){var f=null;c.getModel().beginUpdate();try{f=c.insertVertex(c.getDefaultParent(), -null,a,c.snap(b),c.snap(d),1,1,"text;"+(e?"html=1;":"")),c.updateCellSize(f),c.fireEvent(new mxEventObject("textInserted","cells",[f]))}finally{c.getModel().endUpdate()}c.setSelectionCell(f)}))}else{a=Graph.zapGremlins(mxUtils.trim(a));if(this.isCompatibleString(a))return this.importXml(a,b,d,g);if(0<a.length)if(this.isLucidChartData(a))this.convertLucidChart(a,mxUtils.bind(this,function(a){this.editor.graph.setSelectionCells(this.importXml(a,b,d,g))}),mxUtils.bind(this,function(a){this.handleError(a)})); -else{c=this.editor.graph;l=null;c.getModel().beginUpdate();try{l=c.insertVertex(c.getDefaultParent(),null,"",c.snap(b),c.snap(d),1,1,"text;"+(e?"html=1;":"")),c.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,c.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)&& -c.setLinkForCell(l,l.value),l.geometry.width+=c.gridSize,l.geometry.height+=c.gridSize}finally{c.getModel().endUpdate()}return[l]}}return[]};EditorUi.prototype.formatFileSize=function(a){var c=-1;do a/=1024,c++;while(1024<a);return Math.max(a,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[c]};EditorUi.prototype.convertDataUri=function(a){if("data:"==a.substring(0,5)){var c=a.indexOf(";");0<c&&(a=a.substring(0,c)+a.substring(a.indexOf(",",c+1)))}return a};EditorUi.prototype.isRemoteFileFormat= +mxscript("js/extensions.min.js",c))};EditorUi.prototype.insertAsPreText=function(a,b,d){var c=this.editor.graph,f=null;c.getModel().beginUpdate();try{f=c.insertVertex(null,null,"<pre>"+a+"</pre>",b,d,1,1,"text;html=1;align=center;verticalAlign=middle;"),c.updateCellSize(f,!0)}finally{c.getModel().endUpdate()}return f};EditorUi.prototype.insertTextAt=function(a,b,d,e,k,l,m){l=null!=l?l:!0;m=null!=m?m:!0;if(null!=a)if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a))this.parseFile(new Blob([a.replace(/\s+/g, +" ")],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&this.editor.graph.setSelectionCells(this.insertTextAt(a.responseText,b,d,!0))}));else if("data:"==a.substring(0,5)||!this.isOffline()&&(k||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var c=this.editor.graph;if("data:image/png;base64,"==a.substring(0,22)){var f=this.extractGraphModelFromPng(a),g=this.importXml(f,b,d,l,!0);if(0<g.length)return g}if("data:image/svg+xml;"==a.substring(0, +19))try{if(f=null,"data:image/svg+xml;base64,"==a.substring(0,26)?(f=a.substring(a.indexOf(",")+1),f=window.atob&&!mxClient.IS_SF?atob(f):Base64.decode(f,!0)):f=decodeURIComponent(a.substring(a.indexOf(",")+1)),g=this.importXml(f,b,d,l,!0),0<g.length)return g}catch(v){}this.loadImage(a,mxUtils.bind(this,function(f){if("data:"==a.substring(0,5))this.resizeImage(f,a,mxUtils.bind(this,function(a,f,e){c.setSelectionCell(c.insertVertex(null,null,"",c.snap(b),c.snap(d),f,e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+ +this.convertDataUri(a)+";"))}),m,this.maxImageSize);else{var e=Math.min(1,Math.min(this.maxImageSize/f.width,this.maxImageSize/f.height)),g=Math.round(f.width*e);f=Math.round(f.height*e);c.setSelectionCell(c.insertVertex(null,null,"",c.snap(b),c.snap(d),g,f,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";"))}}),mxUtils.bind(this,function(){var f=null;c.getModel().beginUpdate();try{f=c.insertVertex(c.getDefaultParent(), +null,a,c.snap(b),c.snap(d),1,1,"text;"+(e?"html=1;":"")),c.updateCellSize(f),c.fireEvent(new mxEventObject("textInserted","cells",[f]))}finally{c.getModel().endUpdate()}c.setSelectionCell(f)}))}else{a=Graph.zapGremlins(mxUtils.trim(a));if(this.isCompatibleString(a))return this.importXml(a,b,d,l);if(0<a.length)if(this.isLucidChartData(a))this.convertLucidChart(a,mxUtils.bind(this,function(a){this.editor.graph.setSelectionCells(this.importXml(a,b,d,l))}),mxUtils.bind(this,function(a){this.handleError(a)})); +else{c=this.editor.graph;k=null;c.getModel().beginUpdate();try{k=c.insertVertex(c.getDefaultParent(),null,"",c.snap(b),c.snap(d),1,1,"text;"+(e?"html=1;":"")),c.fireEvent(new mxEventObject("textInserted","cells",[k])),"<"==a.charAt(0)&&a.indexOf(">")==a.length-1&&(a=mxUtils.htmlEntities(a)),a.length>this.maxTextBytes&&(a=a.substring(0,this.maxTextBytes)+"..."),k.value=a,c.updateCellSize(k),/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“â€â€˜â€™]))/i.test(k.value)&& +c.setLinkForCell(k,k.value),k.geometry.width+=c.gridSize,k.geometry.height+=c.gridSize}finally{c.getModel().endUpdate()}return[k]}}return[]};EditorUi.prototype.formatFileSize=function(a){var c=-1;do a/=1024,c++;while(1024<a);return Math.max(a,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[c]};EditorUi.prototype.convertDataUri=function(a){if("data:"==a.substring(0,5)){var c=a.indexOf(";");0<c&&(a=a.substring(0,c)+a.substring(a.indexOf(",",c+1)))}return a};EditorUi.prototype.isRemoteFileFormat= function(a,b){return/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(a)};EditorUi.prototype.isLucidChartData=function(a){return null!=a&&('{"state":"{\\"Properties\\":'==a.substring(0,26)||'{"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,c){if(null!=c&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(c)){var b=new Blob([a], {type:"application/octet-stream"});this.importVisio(b,mxUtils.bind(this,function(a){this.importXml(a,0,0,!0)}),null,c)}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 f=this.dialog,e=f.close;this.dialog.close=mxUtils.bind(this,function(a){Editor.useLocalStorage=d;e.apply(f,arguments);a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importFile= -function(a,b,d,e,l,g,m,r,t,u,v){u=null!=u?u:!0;var c=!1,f=null,k=mxUtils.bind(this,function(a){var c=null;null!=a&&"<mxlibrary"==a.substring(0,10)?this.loadLibrary(new LocalLibrary(this,a,m)):c=this.importXml(a,d,e,u);null!=r&&r(c)});"image"==b.substring(0,5)?(t=!1,"image/png"==b.substring(0,9)&&(b=v?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(f=this.importXml(b,d,e,u),t=!0)),t||(f=this.editor.graph,b=a.indexOf(";"),0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1))),u&&f.isGridEnabled()&& -(d=f.snap(d),e=f.snap(e)),f=[f.insertVertex(null,null,"",d,e,l,g,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";")])):/(\.*<graphml )/.test(a)?(c=!0,this.importGraphML(a,k)):null!=t&&null!=m&&(/(\.v(dx|sdx?))($|\?)/i.test(m)||/(\.vs(x|sx?))($|\?)/i.test(m))?(c=!0,this.importVisio(t,k)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,m)?(c=!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?k(a.responseText):null!=r&&r(null))}),m)):/(\.v(sd|dx))($|\?)/i.test(m)||/(\.vs(s|x))($|\?)/i.test(m)||(f=this.insertTextAt(this.validateFileData(a),d,e,!0,null,u));c||null==r||r(f);return f};EditorUi.prototype.base64Encode=function(a){for(var c="",b=0,d=a.length,e,g,l;b<d;){e=a.charCodeAt(b++)&255;if(b==d){c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e& -3)<<4);c+="==";break}g=a.charCodeAt(b++);if(b==d){c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(g&240)>>4);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((g&15)<<2);c+="=";break}l=a.charCodeAt(b++);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e& -3)<<4|(g&240)>>4);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((g&15)<<2|(l&192)>>6);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(l&63)}return c};EditorUi.prototype.importFiles=function(a,b,d,e,l,g,m,r,t,u,v,y){b=null!=b?b:0;d=null!=d?d:0;e=null!=e?e:this.maxImageSize;u=null!=u?u:this.maxImageBytes;var c=null!=b&&null!=d,f=!0,k=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var n=v||this.resampleThreshold,q=0;q<a.length;q++)if("image/"==a[q].type.substring(0, -6)&&a[q].size>n){k=!0;break}var x=mxUtils.bind(this,function(){var k=this.editor.graph,n=k.gridSize;l=null!=l?l:mxUtils.bind(this,function(a,b,d,f,e,k,g,l,n){return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,g)),null):this.importFile(a,b,d,f,e,k,g,l,n,c,y)});g=null!=g?g:mxUtils.bind(this,function(a){k.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var q=a.length,t=q,p=[],x=mxUtils.bind(this,function(a, -b){p[a]=b;if(0==--t){this.spinner.stop();if(null!=r)r(p);else{var c=[];k.getModel().beginUpdate();try{for(var d=0;d<p.length;d++){var f=p[d]();null!=f&&(c=c.concat(f))}}finally{k.getModel().endUpdate()}}g(c)}}),z=0;z<q;z++)mxUtils.bind(this,function(c){var g=a[c];if(null!=g){var q=new FileReader;q.onload=mxUtils.bind(this,function(a){if(null==m||m(g))if("image/"==g.type.substring(0,6))if("image/svg"==g.type.substring(0,9)){var q=a.target.result,t=q.indexOf(","),p=decodeURIComponent(escape(atob(q.substring(t+ -1)))),r=mxUtils.parseXml(p),p=r.getElementsByTagName("svg");if(0<p.length){var p=p[0],B=y?null:p.getAttribute("content");null!=B&&"<"!=B.charAt(0)&&"%"!=B.charAt(0)&&(B=unescape(window.atob?atob(B):Base64.decode(B,!0)));null!=B&&"%"==B.charAt(0)&&(B=decodeURIComponent(B));null==B||"<mxfile "!==B.substring(0,8)&&"<mxGraphModel "!==B.substring(0,14)?x(c,mxUtils.bind(this,function(){try{if(q.substring(0,t+1),null!=r){var a=r.getElementsByTagName("svg");if(0<a.length){var f=a[0],m=parseFloat(f.getAttribute("width")), -p=parseFloat(f.getAttribute("height")),v=f.getAttribute("viewBox");if(null==v||0==v.length)f.setAttribute("viewBox","0 0 "+m+" "+p);else if(isNaN(m)||isNaN(p)){var B=v.split(" ");3<B.length&&(m=parseFloat(B[2]),p=parseFloat(B[3]))}q=this.createSvgDataUri(mxUtils.getXml(f));var x=Math.min(1,Math.min(e/Math.max(1,m)),e/Math.max(1,p)),u=l(q,g.type,b+c*n,d+c*n,Math.max(1,Math.round(m*x)),Math.max(1,Math.round(p*x)),g.name);if(isNaN(m)||isNaN(p)){var z=new Image;z.onload=mxUtils.bind(this,function(){m= -Math.max(1,z.width);p=Math.max(1,z.height);u[0].geometry.width=m;u[0].geometry.height=p;f.setAttribute("viewBox","0 0 "+m+" "+p);q=this.createSvgDataUri(mxUtils.getXml(f));var a=q.indexOf(";");0<a&&(q=q.substring(0,a)+q.substring(q.indexOf(",",a+1)));k.setCellStyles("image",q,[u[0]])});z.src=this.createSvgDataUri(mxUtils.getXml(f))}return u}}}catch(Z){}return null})):x(c,mxUtils.bind(this,function(){return l(B,"text/xml",b+c*n,d+c*n,0,0,g.name)}))}else x(c,mxUtils.bind(this,function(){return null}))}else{p= -!1;if("image/png"==g.type){var z=y?null:this.extractGraphModelFromPng(a.target.result);if(null!=z&&0<z.length){var G=new Image;G.src=a.target.result;x(c,mxUtils.bind(this,function(){return l(z,"text/xml",b+c*n,d+c*n,G.width,G.height,g.name)}));p=!0}}p||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))): -this.loadImage(a.target.result,mxUtils.bind(this,function(k){this.resizeImage(k,a.target.result,mxUtils.bind(this,function(k,m,q){x(c,mxUtils.bind(this,function(){if(null!=k&&k.length<u){var t=f&&this.isResampleImage(a.target.result,v)?Math.min(1,Math.min(e/m,e/q)):1;return l(k,g.type,b+c*n,d+c*n,Math.round(m*t),Math.round(q*t),g.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),f,e,v)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else l(a.target.result, -g.type,b+c*n,d+c*n,240,160,g.name,function(a){x(c,function(){return a})})});/(\.v(dx|sdx?))($|\?)/i.test(g.name)||/(\.vs(x|sx?))($|\?)/i.test(g.name)?l(null,g.type,b+c*n,d+c*n,240,160,g.name,function(a){x(c,function(){return a})},g):"image"==g.type.substring(0,5)?q.readAsDataURL(g):q.readAsText(g)}})(z)});if(k){k=[];for(q=0;q<a.length;q++)k.push(a[q]);a=k;this.confirmImageResize(function(a){f=a;x()},t)}else x()};EditorUi.prototype.confirmImageResize=function(a,b){b=null!=b?b:!1;var c=null!=this.spinner&& +function(a,b,d,e,k,l,m,r,t,u,v){u=null!=u?u:!0;var c=!1,f=null,g=mxUtils.bind(this,function(a){var c=null;null!=a&&"<mxlibrary"==a.substring(0,10)?this.loadLibrary(new LocalLibrary(this,a,m)):c=this.importXml(a,d,e,u);null!=r&&r(c)});"image"==b.substring(0,5)?(t=!1,"image/png"==b.substring(0,9)&&(b=v?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(f=this.importXml(b,d,e,u),t=!0)),t||(f=this.editor.graph,b=a.indexOf(";"),0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1))),u&&f.isGridEnabled()&& +(d=f.snap(d),e=f.snap(e)),f=[f.insertVertex(null,null,"",d,e,k,l,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";")])):/(\.*<graphml )/.test(a)?(c=!0,this.importGraphML(a,g)):null!=t&&null!=m&&(/(\.v(dx|sdx?))($|\?)/i.test(m)||/(\.vs(x|sx?))($|\?)/i.test(m))?(c=!0,this.importVisio(t,g)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,m)?(c=!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!=r&&r(null))}),m)):/(\.v(sd|dx))($|\?)/i.test(m)||/(\.vs(s|x))($|\?)/i.test(m)||(f=this.insertTextAt(this.validateFileData(a),d,e,!0,null,u));c||null==r||r(f);return f};EditorUi.prototype.base64Encode=function(a){for(var c="",b=0,d=a.length,e,l,k;b<d;){e=a.charCodeAt(b++)&255;if(b==d){c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e& +3)<<4);c+="==";break}l=a.charCodeAt(b++);if(b==d){c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(l&240)>>4);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((l&15)<<2);c+="=";break}k=a.charCodeAt(b++);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e& +3)<<4|(l&240)>>4);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((l&15)<<2|(k&192)>>6);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(k&63)}return c};EditorUi.prototype.importFiles=function(a,b,d,e,k,l,m,r,t,u,v,D){b=null!=b?b:0;d=null!=d?d:0;e=null!=e?e:this.maxImageSize;u=null!=u?u:this.maxImageBytes;var c=null!=b&&null!=d,f=!0,g=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var n=v||this.resampleThreshold,q=0;q<a.length;q++)if("image/"==a[q].type.substring(0, +6)&&a[q].size>n){g=!0;break}var x=mxUtils.bind(this,function(){var g=this.editor.graph,n=g.gridSize;k=null!=k?k:mxUtils.bind(this,function(a,b,d,f,e,g,l,k,n){return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,l)),null):this.importFile(a,b,d,f,e,g,l,k,n,c,D)});l=null!=l?l:mxUtils.bind(this,function(a){g.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var q=a.length,t=q,p=[],x=mxUtils.bind(this,function(a, +c){p[a]=c;if(0==--t){this.spinner.stop();if(null!=r)r(p);else{var b=[];g.getModel().beginUpdate();try{for(var d=0;d<p.length;d++){var f=p[d]();null!=f&&(b=b.concat(f))}}finally{g.getModel().endUpdate()}}l(b)}}),A=0;A<q;A++)mxUtils.bind(this,function(c){var l=a[c];if(null!=l){var q=new FileReader;q.onload=mxUtils.bind(this,function(a){if(null==m||m(l))if("image/"==l.type.substring(0,6))if("image/svg"==l.type.substring(0,9)){var q=a.target.result,t=q.indexOf(","),p=decodeURIComponent(escape(atob(q.substring(t+ +1)))),r=mxUtils.parseXml(p),p=r.getElementsByTagName("svg");if(0<p.length){var p=p[0],B=D?null:p.getAttribute("content");null!=B&&"<"!=B.charAt(0)&&"%"!=B.charAt(0)&&(B=unescape(window.atob?atob(B):Base64.decode(B,!0)));null!=B&&"%"==B.charAt(0)&&(B=decodeURIComponent(B));null==B||"<mxfile "!==B.substring(0,8)&&"<mxGraphModel "!==B.substring(0,14)?x(c,mxUtils.bind(this,function(){try{if(q.substring(0,t+1),null!=r){var a=r.getElementsByTagName("svg");if(0<a.length){var f=a[0],m=parseFloat(f.getAttribute("width")), +p=parseFloat(f.getAttribute("height")),v=f.getAttribute("viewBox");if(null==v||0==v.length)f.setAttribute("viewBox","0 0 "+m+" "+p);else if(isNaN(m)||isNaN(p)){var x=v.split(" ");3<x.length&&(m=parseFloat(x[2]),p=parseFloat(x[3]))}q=this.createSvgDataUri(mxUtils.getXml(f));var u=Math.min(1,Math.min(e/Math.max(1,m)),e/Math.max(1,p)),B=k(q,l.type,b+c*n,d+c*n,Math.max(1,Math.round(m*u)),Math.max(1,Math.round(p*u)),l.name);if(isNaN(m)||isNaN(p)){var A=new Image;A.onload=mxUtils.bind(this,function(){m= +Math.max(1,A.width);p=Math.max(1,A.height);B[0].geometry.width=m;B[0].geometry.height=p;f.setAttribute("viewBox","0 0 "+m+" "+p);q=this.createSvgDataUri(mxUtils.getXml(f));var a=q.indexOf(";");0<a&&(q=q.substring(0,a)+q.substring(q.indexOf(",",a+1)));g.setCellStyles("image",q,[B[0]])});A.src=this.createSvgDataUri(mxUtils.getXml(f))}return B}}}catch(Z){}return null})):x(c,mxUtils.bind(this,function(){return k(B,"text/xml",b+c*n,d+c*n,0,0,l.name)}))}else x(c,mxUtils.bind(this,function(){return null}))}else{p= +!1;if("image/png"==l.type){var A=D?null:this.extractGraphModelFromPng(a.target.result);if(null!=A&&0<A.length){var y=new Image;y.src=a.target.result;x(c,mxUtils.bind(this,function(){return k(A,"text/xml",b+c*n,d+c*n,y.width,y.height,l.name)}));p=!0}}p||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))): +this.loadImage(a.target.result,mxUtils.bind(this,function(g){this.resizeImage(g,a.target.result,mxUtils.bind(this,function(g,m,q){x(c,mxUtils.bind(this,function(){if(null!=g&&g.length<u){var p=f&&this.isResampleImage(a.target.result,v)?Math.min(1,Math.min(e/m,e/q)):1;return k(g,l.type,b+c*n,d+c*n,Math.round(m*p),Math.round(q*p),l.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),f,e,v)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else k(a.target.result, +l.type,b+c*n,d+c*n,240,160,l.name,function(a){x(c,function(){return a})})});/(\.v(dx|sdx?))($|\?)/i.test(l.name)||/(\.vs(x|sx?))($|\?)/i.test(l.name)?k(null,l.type,b+c*n,d+c*n,240,160,l.name,function(a){x(c,function(){return a})},l):"image"==l.type.substring(0,5)?q.readAsDataURL(l):q.readAsText(l)}})(A)});if(g){g=[];for(q=0;q<a.length;q++)g.push(a[q]);a=g;this.confirmImageResize(function(a){f=a;x()},t)}else x()};EditorUi.prototype.confirmImageResize=function(a,b){b=null!=b?b:!1;var c=null!=this.spinner&& null!=this.spinner.pause?this.spinner.pause():function(){},d=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,f=function(d,f){if(d||b)mxSettings.setResizeImages(d?f:null),mxSettings.save();c();a(f)};null==d||b?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(a){f(a,!0)},function(a){f(a,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+ -Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,!0,!0):f(!1,d)};EditorUi.prototype.parseFile=function(a,b,d){d=null!=d?d:a.name;var c=new FormData;c.append("format","xml");c.append("upfile",a,d);var f=new XMLHttpRequest;f.open("POST",OPEN_URL);f.onreadystatechange=function(){b(f)};f.send(c);try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+a.size})}catch(g){}};EditorUi.prototype.isResampleImage=function(a, -b){b=null!=b?b:this.resampleThreshold;return a.length>b};EditorUi.prototype.resizeImage=function(a,b,d,e,l,g){l=null!=l?l:this.maxImageSize;var c=Math.max(1,a.width),f=Math.max(1,a.height);if(e&&this.isResampleImage(b,g))try{var k=Math.max(c/l,f/l);if(1<k){var n=Math.round(c/k),m=Math.round(f/k),q=document.createElement("canvas");q.width=n;q.height=m;q.getContext("2d").drawImage(a,0,0,n,m);var p=q.toDataURL();if(p.length<b.length){var r=document.createElement("canvas");r.width=n;r.height=m;var u= -r.toDataURL();p!==u&&(b=p,c=n,f=m)}}}catch(P){}d(b,c,f)};EditorUi.prototype.crcTable=[];for(var d=0;256>d;d++)for(var l=d,m=0;8>m;m++)l=1==(l&1)?3988292384^l>>>1:l>>>1,EditorUi.prototype.crcTable[d]=l;EditorUi.prototype.updateCRC=function(a,b,d,e){for(var c=0;c<e;c++)a=EditorUi.prototype.crcTable[(a^b.charCodeAt(d+c))&255]^a>>>8;return a};EditorUi.prototype.crc32=function(a){this.crcTable=this.crcTable||this.createCrcTable();for(var b=-1,c=0;c<a.length;c++)b=b>>>8^this.crcTable[(b^a.charCodeAt(c))& -255];return(b^-1)>>>0};EditorUi.prototype.writeGraphModelToPng=function(a,b,d,e,l){function c(a,b){var c=n;n+=b;return a.substring(c,n)}function f(a){a=c(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 n=0;if(c(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=l&&l();else if(c(a, -4),"IHDR"!=c(a,4))null!=l&&l();else{c(a,17);l=a.substring(0,n);do{var m=f(a);if("IDAT"==c(a,4)){l=a.substring(0,n-8);d=d+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+e;e=4294967295;e=this.updateCRC(e,b,0,4);e=this.updateCRC(e,d,0,d.length);l+=k(d.length)+b+d+k(e^4294967295);l+=a.substring(n-8,a.length);break}l+=a.substring(n-8,n-4+m);c(a,m);c(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,d){try{var c=new Image;c.onload=function(){b(c)};null!=d&&(c.onerror=d);c.src=a}catch(n){if(null!=d)d(n);else throw n;}};var r=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();"undefined"!==typeof window.mxSettings&&(this.formatWidth=mxSettings.getFormatWidth());var a=this,b=this.editor.graph;b.getLinkTitle=function(b){return a.getLinkTitle(b)};b.customLinkClicked=function(b){var c= -!1;try{a.handleCustomLink(b),c=!0}catch(B){a.handleError(B)}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 e=a.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(b){b=null!=b?b:"";if(null!=a.pages&&null!=a.currentPage)for(var c=0;c<a.pages.length;c++)if(a.pages[c]==a.currentPage){0< -c&&(b+=(0<b.length?"&":"?")+"page="+c);break}"1"==urlParams.dev&&(b+=(0<b.length?"&":"?")+"dev=1&drawdev=1");return e.apply(this,arguments)};var l=b.addClickHandler;b.addClickHandler=function(a,c,d){var f=c;c=function(a,c){if(null==c){var d=mxEvent.getSource(a);"a"==d.nodeName.toLowerCase()&&(c=d.getAttribute("href"))}null!=c&&b.isCustomLink(c)&&(mxEvent.isTouchEvent(a)||!mxEvent.isPopupTrigger(a))&&b.customLinkClicked(c)&&mxEvent.consume(a);null!=f&&f(a,c)};l.call(this,a,c,d)};r.apply(this,arguments); -mxClient.IS_SVG&&this.editor.graph.addSvgShadow(b.view.canvas.ownerSVGElement,null,!0);a.actions.get("print").funct=function(){a.showDialog((new PrintDialog(a)).container,360,null!=a.pages&&1<a.pages.length?420:360,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var g=b.getGlobalVariable;b.getGlobalVariable=function(b){return"page"==b&&null!=a.currentPage?a.currentPage.getName():"pagenumber"==b?null!=a.currentPage&&null!=a.pages?mxUtils.indexOf(a.pages,a.currentPage)+1:1:g.apply(this, -arguments)};var m=b.labelLinkClicked;b.labelLinkClicked=function(a,c,d){var f=c.getAttribute("href");if(null==f||!b.isCustomLink(f)||!mxEvent.isTouchEvent(d)&&mxEvent.isPopupTrigger(d))m.apply(this,arguments);else{if(!b.isEnabled()||null!=a&&b.isCellLocked(a.cell))b.customLinkClicked(f),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 u=this.actions.get("print"); -u.setEnabled(!mxClient.IS_IOS||!navigator.standalone);u.visible=u.isEnabled();if(!this.editor.chromeless||this.editor.editable){var t=function(){window.setTimeout(function(){y.innerHTML=" ";y.focus();document.execCommand("selectAll",!1,null)},0)};this.keyHandler.bindAction(70,!0,"find");this.keyHandler.bindAction(67,!0,"copyStyle",!0);this.keyHandler.bindAction(86,!0,"pasteStyle",!0);this.keyHandler.bindAction(77,!0,"editGeometry",!0);this.keyHandler.bindAction(88,!0,"insertText",!0);this.keyHandler.bindAction(75, -!0,"insertRectangle");this.keyHandler.bindAction(75,!0,"insertEllipse",!0);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(this.altShiftActions[83]="synchronize");mxClient.IS_IE||b.container.addEventListener("paste",mxUtils.bind(this,function(a){var b=this.editor.graph;if(!mxEvent.isConsumed(a))try{for(var c=a.clipboardData||a.originalEvent.clipboardData,d=!1,f=0;f<c.types.length;f++)if("text/"===c.types[f].substring(0,5)){d=!0;break}if(!d){var e=c.items;for(index in e){var k=e[index];if("file"=== -k.kind){if(b.isEditing())this.importFiles([k.getAsFile()],0,0,this.maxImageSize,function(a,c,d,f,e,k){b.insertImage(a,e,k)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()});else{var g=this.editor.graph.getInsertPoint();this.importFiles([k.getAsFile()],g.x,g.y,this.maxImageSize);mxEvent.consume(a)}break}}}}catch(E){}}),!1);var y=document.createElement("div");y.setAttribute("autocomplete","off");y.setAttribute("autocorrect","off");y.setAttribute("autocapitalize", -"off");y.setAttribute("spellcheck","false");y.style.position="absolute";y.style.whiteSpace="nowrap";y.style.overflow="hidden";y.style.display="block";y.contentEditable=!0;mxUtils.setOpacity(y,0);y.style.width="1px";y.style.height="1px";y.innerHTML=" ";var v=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(a){var c=mxEvent.getSource(a);null==b.container|| -!b.isEnabled()||b.isMouseDown||b.isEditing()||null!=this.dialog||"INPUT"==c.nodeName||"TEXTAREA"==c.nodeName||!(224==a.keyCode||!mxClient.IS_MAC&&17==a.keyCode||mxClient.IS_MAC&&91==a.keyCode)||v||(y.style.left=b.container.scrollLeft+10+"px",y.style.top=b.container.scrollTop+10+"px",b.container.appendChild(y),v=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){y.focus();document.execCommand("selectAll",!1,null)},0):(y.focus(),document.execCommand("selectAll",!1,null)))}));mxEvent.addListener(document, -"keyup",mxUtils.bind(this,function(a){var c=a.keyCode;window.setTimeout(mxUtils.bind(this,function(){!v||224!=c&&17!=c&&91!=c||(v=!1,b.isEditing()||null!=this.dialog||null==b.container||b.container.focus(),y.parentNode.removeChild(y),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(y,"copy",mxUtils.bind(this,function(a){if(b.isEnabled())try{mxClipboard.copy(b),this.copyCells(y),t()}catch(M){this.handleError(M)}}));mxEvent.addListener(y,"cut",mxUtils.bind(this,function(a){if(b.isEnabled())try{mxClipboard.copy(b), -this.copyCells(y,!0),t()}catch(M){this.handleError(M)}}));mxEvent.addListener(y,"paste",mxUtils.bind(this,function(a){b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(y.innerHTML=" ",y.focus(),window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,y);y.innerHTML=" "}),0))}),!0);var A=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==y?!0:A.apply(this,arguments)}}this.spinner=this.createSpinner(document.body.clientWidth/2-2,Math.max(document.body.clientHeight|| -0,document.documentElement.clientHeight||0)/2,24);Graph.fileSupport&&this.editor.graph.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(a){var b=this.editor.graph,c=b.cellEditor.text2,d=null;null!=c&&(mxEvent.addListener(c,"dragleave",function(a){null!=d&&(d.parentNode.removeChild(d),d=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(a){null==d&&(!mxClient.IS_IE||10<document.documentMode)&&(d=this.highlightElement(c));a.stopPropagation(); -a.preventDefault()})),mxEvent.addListener(c,"drop",mxUtils.bind(this,function(a){null!=d&&(d.parentNode.removeChild(d),d=null);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,function(a,c,d,f,e,k){b.insertImage(a,e,k)},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 f=this.maxImageSize,f=Math.min(1,Math.min(f/Math.max(1,d)),f/Math.max(1,a));b.insertImage(decodeURIComponent(c),d*f,a*f)})):document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(a.dataTransfer.types, -"text/plain")&&document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"));a.stopPropagation();a.preventDefault()})))}));if("1"==urlParams.ruler&&"undefined"!==typeof mxRuler){u=document.createElement("div");u.style.position="absolute";u.style.top="95px";u.style.left="250px";u.style.width="2000px";u.style.height="30px";u.style.background="whiteSmoke";document.body.appendChild(u);var p=document.createElement("div");p.style.position="absolute";p.style.top="125px";p.style.left="220px"; -p.style.width="30px";p.style.height="1000px";p.style.background="whiteSmoke";document.body.appendChild(p);var C=document.createElement("div");C.style.position="absolute";C.style.top="95px";C.style.left="220px";C.style.width="30px";C.style.height="30px";C.style.background="whiteSmoke";document.body.appendChild(C);this.vRuler=new mxRuler(this.editor.graph,p,!0);this.hRuler=new mxRuler(this.editor.graph,u,!1)}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 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 K=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:K.apply(this,arguments)}}u=document.getElementById("geInfo"); -null!=u&&u.parentNode.removeChild(u);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var P=null;mxEvent.addListener(b.container,"dragleave",function(a){b.isEnabled()&&(null!=P&&(P.parentNode.removeChild(P),P=null),a.stopPropagation(),a.preventDefault())});mxEvent.addListener(b.container,"dragover",mxUtils.bind(this,function(a){null==P&&(!mxClient.IS_IE||10<document.documentMode)&&(P=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!=P&&(P.parentNode.removeChild(P),P=null);if(b.isEnabled()){var c=mxUtils.convertPoint(b.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),d=b.view.translate,f=b.view.scale,e=c.x/f-d.x,k=c.y/f-d.y;mxEvent.isAltDown(a)&&(k=e=0);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,e,k,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a));else{var g= -0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):null,c=this.extractGraphModelFromEvent(a,null!=this.pages);if(null!=c)b.setSelectionCells(this.importXml(c,e,k,!0));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")){var l=a.dataTransfer.getData("text/html"),c=document.createElement("div");c.innerHTML=l;var n=null,d=c.getElementsByTagName("img");null!=d&&1==d.length?(l=d[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(l)||(n= -!0)):(c=c.getElementsByTagName("a"),null!=c&&1==c.length&&(l=c[0].getAttribute("href")));var m=!0,q=mxUtils.bind(this,function(){b.setSelectionCells(this.insertTextAt(l,e,k,!0,n,null,m))});n&&l.length>this.resampleThreshold?this.confirmImageResize(function(a){m=a;q()},mxEvent.isControlDown(a)):q()}else null!=g&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(g)?this.loadImage(decodeURIComponent(g),mxUtils.bind(this,function(a){var 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,"",e,k,c*d,a*d,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+g+";"))}),mxUtils.bind(this,function(a){b.setSelectionCells(this.insertTextAt(g,e,k,!0))})):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&b.setSelectionCells(this.insertTextAt(a.dataTransfer.getData("text/plain"),e,k,!0))}}a.stopPropagation();a.preventDefault()}),!1)}this.initPages(); -this.editUpdateListener=mxUtils.bind(this,function(a,b){var c=b.getProperty("edit");null!=c&&this.updateEditReferences(c)});this.editor.undoManager.addListener(mxEvent.BEFORE_UNDO,this.editUpdateListener);this.editor.undoManager.addListener(mxEvent.BEFORE_REDO,this.editUpdateListener);"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.getLinkTitle=function(a){var b=Graph.prototype.getLinkTitle.apply(this,arguments);if("data:page/id,"==a.substring(0,13)){var c= -a.indexOf(",");0<c&&(b=this.getPageById(a.substring(c+1)),b=null!=b?b.getName():mxResources.get("pageNotFound"))}else"data:"==a.substring(0,5)&&(b=mxResources.get("action"));return b};EditorUi.prototype.handleCustomLink=function(a){if("data:page/id,"==a.substring(0,13)){var b=a.indexOf(",");if(a=this.getPageById(a.substring(b+1)))this.selectPage(a);else throw Error(mxResources.get("pageNotFound")||"Page not found");}else this.editor.graph.handleCustomLink(a)};EditorUi.prototype.isSettingsEnabled= -function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){ColorDialog.recentColors=mxSettings.getRecentColors();this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(a,b){mxSettings.setCustomFonts(this.menus.customFonts);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();this.addListener("gridColorChanged",mxUtils.bind(this,function(a,b){mxSettings.setGridColor(this.editor.graph.view.gridColor);mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(a,b){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&this.sidebar.showPalette("search",mxSettings.settings.search); -this.editor.chromeless&&!this.editor.editable||null==this.sidebar||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save());this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyCells=function(a,b){var c=this.editor.graph;if(c.isSelectionEmpty())a.innerHTML="";else{var d=mxUtils.sortCells(c.model.getTopmostCells(c.getSelectionCells())),f=mxUtils.getXml(this.editor.graph.encodeCells(d)); -mxUtils.setTextContent(a,encodeURIComponent(f));b?(c.removeCells(d,!1),c.lastPasteXml=null):(c.lastPasteXml=f,c.pasteCounter=0);a.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.pasteCells=function(a,b){if(!mxEvent.isConsumed(a)){var c=b.getElementsByTagName("span");if(null!=c&&0<c.length&&"application/vnd.lucid.chart.objects"===c[0].getAttribute("data-lucid-type")){var d=c[0].getAttribute("data-lucid-content");null!=d&&0<d.length&&(this.convertLucidChart(d,mxUtils.bind(this, -function(a){var b=this.editor.graph;b.setSelectionCells(this.importXml(a,0,0));b.scrollCellToVisible(b.getSelectionCell())}),mxUtils.bind(this,function(a){this.handleError(a)})),mxEvent.consume(a))}else{var d=this.editor.graph,f=mxUtils.trim(mxClient.IS_QUIRKS||8==document.documentMode?mxUtils.getTextContent(b):b.textContent),e=!1;try{var l=f.lastIndexOf("%3E");0<=l&&l<f.length-3&&(f=f.substring(0,l+3))}catch(t){}try{var c=b.getElementsByTagName("span"),m=null!=c&&0<c.length?mxUtils.trim(decodeURIComponent(c[0].textContent)): -decodeURIComponent(f);this.isCompatibleString(m)&&(e=!0,f=m)}catch(t){}d.lastPasteXml==f?d.pasteCounter++:(d.lastPasteXml=f,d.pasteCounter=0);c=d.pasteCounter*d.gridSize;if(null!=f&&0<f.length&&(e||this.isCompatibleString(f)?d.setSelectionCells(this.importXml(f,c,c)):(e=d.getInsertPoint(),d.isMouseInsertPoint()&&(c=0,d.lastPasteXml==f&&0<d.pasteCounter&&d.pasteCounter--),d.setSelectionCells(this.insertTextAt(f,e.x+c,e.y+c,!0))),!d.isSelectionEmpty())){d.scrollCellToVisible(d.getSelectionCell());null!= -this.hoverIcons&&this.hoverIcons.update(d.view.getState(d.getSelectionCell()));try{mxEvent.consume(a)}catch(t){}}}}};EditorUi.prototype.addFileDropHandler=function(a){if(Graph.fileSupport)for(var b=null,c=0;c<a.length;c++)mxEvent.addListener(a[c],"dragleave",function(a){null!=b&&(b.parentNode.removeChild(b),b=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(a[c],"dragover",mxUtils.bind(this,function(a){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==b&&(!mxClient.IS_IE|| -10<document.documentMode&&12>document.documentMode)&&(b=this.highlightElement());a.stopPropagation();a.preventDefault()})),mxEvent.addListener(a[c],"drop",mxUtils.bind(this,function(a){null!=b&&(b.parentNode.removeChild(b),b=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<a.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(a)&&!mxEvent.isShiftDown(a)):this.openFiles(a.dataTransfer.files, -!0);else{var c=this.extractGraphModelFromEvent(a);if(null==c){var d=null!=a.dataTransfer?a.dataTransfer:a.clipboardData;null!=d&&(10==document.documentMode||11==document.documentMode?c=d.getData("Text"):(c=null,c=0<=mxUtils.indexOf(d.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(d.types,"text/html")?d.getData("text/html"):null,null!=c&&0<c.length?(d=document.createElement("div"),d.innerHTML=c,d=d.getElementsByTagName("img"),0<d.length&&(c=d[0].getAttribute("src"))): -0<=mxUtils.indexOf(d.types,"text/plain")&&(c=d.getData("text/plain"))),null!=c&&("data:image/png;base64,"==c.substring(0,22)?(c=this.extractGraphModelFromPng(c),null!=c&&0<c.length&&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 g=document.documentElement;d=(e.clientWidth||g.clientWidth)-3;e=Math.max(e.clientHeight||0,g.clientHeight)-3}else b=a.offsetTop,c=a.offsetLeft,d=a.clientWidth, -e=a.clientHeight;g=document.createElement("div");g.style.zIndex=mxPopupMenu.prototype.zIndex+2;g.style.border="3px dotted rgb(254, 137, 12)";g.style.pointerEvents="none";g.style.position="absolute";g.style.top=b+"px";g.style.left=c+"px";g.style.width=Math.max(0,d-3)+"px";g.style.height=Math.max(0,e-3)+"px";null!=a&&a.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(g):document.body.appendChild(g);return g};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,f=a.name;if(null!= -f&&0<f.length){!this.useCanvasForExport&&/(\.png)$/i.test(f)&&(f=f.substring(0,f.length-4)+".drawio");var e=mxUtils.bind(this,function(a){f=0<=f.lastIndexOf(".")?f.substring(0,f.lastIndexOf("."))+".drawio":f+".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,f))}catch(v){this.handleError(v,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(a, -f,b)});if(/(\.v(dx|sdx?))($|\?)/i.test(f)||/(\.vs(x|sx?))($|\?)/i.test(f))this.importVisio(a,mxUtils.bind(this,function(a){this.spinner.stop();e(a)}));else if(/(\.*<graphml )/.test(d))this.importGraphML(d,mxUtils.bind(this,function(a){this.spinner.stop();e(a)}));else if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,f))this.parseFile(a,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?e(a.responseText):this.handleError({message:mxResources.get(413== -a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(d))/(\.json)$/i.test(f)&&(f=f.substring(0,f.length-5)+".drawio"),this.convertLucidChart(d,mxUtils.bind(this,function(a){this.spinner.stop();this.openLocalFile(a,f,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(F){this.handleError(F,mxResources.get("errorLoadingFile"))}}else"image/png"==a.type.substring(0,9)&&(d=this.extractGraphModelFromPng(d)),this.spinner.stop(),this.openLocalFile(d,f,b)}}catch(F){this.handleError(F)}});c.onerror=mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a);window.openFile=null});"image"===a.type.substring(0,5)&&"image/svg"!==a.type.substring(0,9)?c.readAsDataURL(a): -c.readAsText(a)})(a[c])};EditorUi.prototype.openLocalFile=function(a,b,d){var c=this.getCurrentFile(),f=mxUtils.bind(this,function(){window.openFile=null;if(null==b&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var c=mxUtils.parseXml(a);null!=c&&(this.editor.setGraphXml(c.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,a,b||this.defaultFilename,d))});if(null!=a&&0<a.length)null==c||!c.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)?f(): -(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&null!=c&&c.isModified()?this.confirm(mxResources.get("allChangesLost"),null,f,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(a,b),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=c&&c.isModified()?this.confirm(mxResources.get("allChangesLost"),null,f,mxResources.get("cancel"),mxResources.get("discardChanges")):f()})));else throw Error(mxResources.get("notADiagramFile")); -};EditorUi.prototype.getBasenames=function(){var 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=[],d;for(d in a)b.push(d);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,f=d.getCellStyle(a); -c(mxStencilRegistry.getBasenameForStencil(f[mxConstants.STYLE_SHAPE]));d.model.isEdge(a)&&(c(mxMarker.getPackageForType(f[mxConstants.STYLE_STARTARROW])),c(mxMarker.getPackageForType(f[mxConstants.STYLE_ENDARROW])));for(var f=d.model.getChildCount(a),e=0;e<f;e++)this.addBasenamesForCell(d.model.getChildAt(a,e),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.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,d){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!=d?d:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))}; -EditorUi.prototype.getPublicUrl=function(a,b){null!=a?a.getPublicUrl(b):b(null)};EditorUi.prototype.createLoadMessage=function(a){var b=this.editor.graph;return{event:a,pageVisible:b.pageVisible,translate:b.view.translate,bounds:b.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:b.view.scale,page:b.view.getBackgroundPageBounds()}};EditorUi.prototype.installMessageHandler=function(a){var b=null,c=!1,d=!1,e=null,g=mxUtils.bind(this,function(a,b){this.editor.modified&&"0"!=urlParams.modified? -null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,g);mxEvent.addListener(window,"message",mxUtils.bind(this,function(f){if(f.source==(window.opener||window.parent)){var g=f.data,k=mxUtils.bind(this,function(a){if(null!=a&&"function"===typeof a.charAt&&"<"!=a.charAt(0))try{"data:image/png;base64,"==a.substring(0,22)?a=this.extractGraphModelFromPng(a):"data:image/svg+xml;base64,"== -a.substring(0,26)?a=atob(a.substring(26)):"data:image/svg+xml;utf8,"==a.substring(0,24)&&(a=a.substring(24)),null!=a&&("%"==a.charAt(0)?a=decodeURIComponent(a):"<"!=a.charAt(0)&&(a=Graph.decompress(a)))}catch(S){}return a});if("json"==urlParams.proto){try{g=JSON.parse(g)}catch(O){g=null}if(null==g)return;if("dialog"==g.action){this.showError(null!=g.titleKey?mxResources.get(g.titleKey):g.title,null!=g.messageKey?mxResources.get(g.messageKey):g.message,null!=g.buttonKey?mxResources.get(g.buttonKey): -g.button);null!=g.modified&&(this.editor.modified=g.modified);return}if("prompt"==g.action){this.spinner.stop();k=new FilenameDialog(this,g.defaultValue||"",null!=g.okKey?mxResources.get(g.okKey):null,function(a){null!=a&&l.postMessage(JSON.stringify({event:"prompt",value:a,message:g}),"*")},null!=g.titleKey?mxResources.get(g.titleKey):g.title);this.showDialog(k.container,300,80,!0,!1);k.init();return}if("draft"==g.action){var m=k(g.xml);this.spinner.stop();k=new DraftDialog(this,mxResources.get("draftFound", -[g.name||this.defaultFilename]),m,mxUtils.bind(this,function(){this.hideDialog();l.postMessage(JSON.stringify({event:"draft",result:"edit",message:g}),"*")}),mxUtils.bind(this,function(){this.hideDialog();l.postMessage(JSON.stringify({event:"draft",result:"discard",message:g}),"*")}),g.editKey?mxResources.get(g.editKey):null,g.discardKey?mxResources.get(g.discardKey):null,g.ignore?mxUtils.bind(this,function(){this.hideDialog();l.postMessage(JSON.stringify({event:"draft",result:"ignore",message:g}), -"*")}):null);this.showDialog(k.container,640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{k.init()}catch(O){l.postMessage(JSON.stringify({event:"draft",error:O.toString(),message:g}),"*")}return}if("template"==g.action){this.spinner.stop();var k=1==g.enableRecent,m=1==g.enableSearch,n=1==g.enableCustomTemp,k=new NewDialog(this,!1,null!=g.callback,mxUtils.bind(this,function(b,c){b=b||this.emptyDiagramXml;null!=g.callback?l.postMessage(JSON.stringify({event:"template", -xml:b,blank:b==this.emptyDiagramXml,name:c}),"*"):(a(b,f,b!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,k?mxUtils.bind(this,function(a){this.remoteInvoke("getRecentDiagrams",null,null,a,function(){a(null,"Network Error!")})}):null,m?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){l.postMessage(JSON.stringify({event:"template", -docUrl:a,info:b,name:c}),"*")}),null,null,n?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){k=this.getDiagramTextContent();l.postMessage(JSON.stringify({event:"textContent",data:k,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 p=null!=g.messageKey?mxResources.get(g.messageKey):g.message;null==g.show||g.show?this.spinner.spin(document.body,p):this.spinner.stop();return}if("export"==g.action){if("png"==g.format||"xmlpng"==g.format){if(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin)){var q=null!=g.xml? -g.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var r=this.editor.graph,u=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();var b=this.createLoadMessage("export");b.format=g.format;b.message=g;b.data=a;b.xml=encodeURIComponent(q);l.postMessage(JSON.stringify(b),"*")}),x=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);"xmlpng"==g.format&&(a=this.writeGraphModelToPng(a,"tEXt","mxfile",encodeURIComponent(q)));r!=this.editor.graph&&r.container.parentNode.removeChild(r.container); -u(a)});if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage!=this.pages[0]){var r=this.createTemporaryGraph(r.getStylesheet()),y=r.getGlobalVariable,B=this.pages[0];r.getGlobalVariable=function(a){return"page"==a?B.getName():"pagenumber"==a?1:y.apply(this,arguments)};document.body.appendChild(r.container);r.model.setRoot(B.root)}this.exportToCanvas(mxUtils.bind(this,function(a){x(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,function(){x(null)}),null,null,g.scale,null, -null,null,r)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==g.format?"1":"0")+(null!=g.scale?"&scale="+g.scale:"")+"&base64=1&xml="+encodeURIComponent(encodeURIComponent(q)))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?u("data:image/png;base64,"+a.getText()):x(null)}),mxUtils.bind(this,function(){x(null)}))}}else{null!=g.xml&&0<g.xml.length&&this.setFileData(g.xml);p=this.createLoadMessage("export");if("html2"==g.format||"html"==g.format&&("0"!=urlParams.pages|| -null!=this.pages&&1<this.pages.length))k=this.getXmlFileData(),p.xml=mxUtils.getXml(k),p.data=this.getFileData(null,null,!0,null,null,null,k),p.format=g.format;else if("html"==g.format)q=this.editor.getGraphXml(),p.data=this.getHtml(q,this.editor.graph),p.xml=mxUtils.getXml(q),p.format=g.format;else{mxSvgCanvas2D.prototype.foAltText=null;k=this.editor.graph.background;k==mxConstants.NONE&&(k=null);p.xml=this.getFileData(!0);p.format="svg";if(g.embedImages||null==g.embedImages){if(null==g.spin&&null== -g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin))this.editor.graph.setEnabled(!1),"xmlsvg"==g.format?this.getEmbeddedSvg(p.xml,this.editor.graph,null,!0,mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();p.data=this.createSvgDataUri(a);l.postMessage(JSON.stringify(p),"*")})):this.convertImages(this.editor.graph.getSvg(k),mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();p.data=this.createSvgDataUri(mxUtils.getXml(a)); -l.postMessage(JSON.stringify(p),"*")}));return}k="xmlsvg"==g.format?this.getEmbeddedSvg(this.getFileData(!0),this.editor.graph,null,!0):mxUtils.getXml(this.editor.graph.getSvg(k));p.data=this.createSvgDataUri(k)}l.postMessage(JSON.stringify(p),"*")}return}if("load"==g.action)d=1==g.autosave,this.hideDialog(),null!=g.modified&&null==urlParams.modified&&(urlParams.modified=g.modified),null!=g.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=g.saveAndExit),null!=g.title&&null!=this.buttonContainer&& -(m=document.createElement("span"),mxUtils.write(m,g.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(m),this.embedFilenameSpan=m),g=null!=g.xmlpng?this.extractGraphModelFromPng(g.xmlpng): -g.xml;else{"remoteInvokeReady"==g.action?this.handleRemoteInvokeReady(l):"remoteInvoke"==g.action?this.handleRemoteInvoke(g):"remoteInvokeResponse"==g.action?this.handleRemoteInvokeResponse(g):l.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(g)}),"*");return}}var z=mxUtils.bind(this,function(f,g){c=!0;try{a(f,g)}catch(W){this.handleError(W)}c=!1;null!=urlParams.modified&&this.editor.setStatus("");var k=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&& -1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});e=k();d&&null==b&&(b=mxUtils.bind(this,function(a,b){var d=k();if(d!=e&&!c){var f=this.createLoadMessage("autosave");f.xml=d;d=JSON.stringify(f);(window.opener||window.parent).postMessage(d,"*")}e=d}),this.editor.graph.model.addListener(mxEvent.CHANGE,b),this.editor.graph.addListener("gridSizeChanged",b),this.editor.graph.addListener("shadowVisibleChanged",b),this.addListener("pageFormatChanged",b),this.addListener("pageScaleChanged", -b),this.addListener("backgroundColorChanged",b),this.addListener("backgroundImageChanged",b),this.addListener("foldingEnabledChanged",b),this.addListener("mathEnabledChanged",b),this.addListener("gridEnabledChanged",b),this.addListener("guidesEnabledChanged",b),this.addListener("pageViewChanged",b));"1"!=urlParams.returnbounds&&"json"!=urlParams.proto||l.postMessage(JSON.stringify(this.createLoadMessage("load")),"*")});null!=g&&"function"===typeof g.substring&&"data:application/vnd.visio;base64,"== -g.substring(0,34)?(k="0M8R4KGxGuE"==g.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(g.substring(g.indexOf(",")+1)),function(a){z(a,f)},mxUtils.bind(this,function(a){this.handleError(a)}),k)):null!=g&&"function"===typeof g.substring&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(g,"")?this.parseFile(new Blob([g],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&"<mxGraphModel"==a.responseText.substring(0, -13)&&z(a.responseText,f)}),""):null!=g&&"function"===typeof g.substring&&this.isLucidChartData(g)?this.convertLucidChart(g,mxUtils.bind(this,function(a){z(a)}),mxUtils.bind(this,function(a){this.handleError(a)})):(g=k(g),z(g,f))}}));var l=window.opener||window.parent,g="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";l.postMessage(g,"*")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar){var a=document.createElement("div");a.style.display="inline-block"; -a.style.position="absolute";a.style.paddingTop="atlas"==uiTheme?"2px":"3px";a.style.paddingLeft="8px";a.style.paddingBottom="2px";var b=document.createElement("button");b.className="geBigButton";b.style.fontSize="12px";b.style.padding="4px 6px 4px 6px";b.style.borderRadius="3px";"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.style.fontSize="12px",b.style.marginLeft="6px",b.style.padding="4px",b.style.cursor="pointer", -mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b)));b=document.createElement("a");mxUtils.write(b,mxResources.get("exit"));b.setAttribute("title",mxResources.get("exit"));b.style.fontSize="12px";b.style.marginLeft="6px";b.style.marginRight="20px";b.style.padding="4px";b.style.cursor="pointer";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()}));a.appendChild(b);this.toolbar.container.appendChild(a); -this.toolbar.staticElements.push(a);a.style.right="atlas"!=uiTheme?"52px":"42px"}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(a){this.importCsv(a)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.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(),f=0;f<a.length;f++){var e=new window[a[f].layout](c);if(null!=a[f].config)for(var l in a[f].config)e[l]=a[f].config[l];this.executeLayout(function(){e.execute(c.getDefaultParent(),0==d.length?null:d)},f==a.length-1,b)}};EditorUi.prototype.importCsv=function(a,b){try{var c=a.split("\n"),d=[],f=[],e={};if(0<c.length){var l={},m=null,r=null,u=null,v=null, -y=null,p=null,A=null,K=null,P="",G="auto",M="auto",B=null,J=null,O=40,S=40,pa=100,W=0,E=this.editor.graph;E.getGraphBounds();for(var Y=function(){null!=b?b(ca):(E.setSelectionCells(ca),E.scrollCellToVisible(E.getSelectionCell()))},qa=E.getFreeInsertPoint(),ja=qa.x,ka=qa.y,qa=ka,ga=null,Q="auto",K=null,X=[],ma=null,da=null,R=0;R<c.length&&"#"==c[R].charAt(0);){a=c[R];for(R++;R<c.length&&"\\"==a.charAt(a.length-1)&&"#"==c[R].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(c[R].substring(1)),R++; -if("#"!=a.charAt(1)){var ha=a.indexOf(":");if(0<ha){var N=mxUtils.trim(a.substring(1,ha)),H=mxUtils.trim(a.substring(ha+1));"label"==N?ga=E.sanitizeHtml(H):"labelname"==N&&0<H.length&&"-"!=H?v=H:"labels"==N&&0<H.length&&"-"!=H?y=JSON.parse(H):"style"==N?m=H:"parentstyle"==N?p=H:"stylename"==N&&0<H.length&&"-"!=H?u=H:"styles"==N&&0<H.length&&"-"!=H?r=JSON.parse(H):"identity"==N&&0<H.length&&"-"!=H?A=H:"parent"==N&&0<H.length&&"-"!=H?K=H:"namespace"==N&&0<H.length&&"-"!=H?P=H:"width"==N?G=H:"height"== -N?M=H:"left"==N&&0<H.length?B=H:"top"==N&&0<H.length?J=H:"ignore"==N?da=H.split(","):"connect"==N?X.push(JSON.parse(H)):"link"==N?ma=H:"padding"==N?W=parseFloat(H):"edgespacing"==N?O=parseFloat(H):"nodespacing"==N?S=parseFloat(H):"levelspacing"==N?pa=parseFloat(H):"layout"==N&&(Q=H)}}}if(null==c[R])throw Error(mxResources.get("invalidOrMissingFile"));var ba=this.editor.csvToArray(c[R]),N=ha=null;if(null!=A||null!=K)for(var L=0;L<ba.length;L++)A==ba[L]&&(ha=L),K==ba[L]&&(N=L);null==ga&&(ga="%"+ba[0]+ -"%");if(null!=X)for(var T=0;T<X.length;T++)null==l[X[T].to]&&(l[X[T].to]={});E.model.beginUpdate();try{for(L=R+1;L<c.length;L++){var ea=this.editor.csvToArray(c[L]);if(null==ea){var fa=40<c[L].length?c[L].substring(0,40)+"...":c[L];throw Error(L+" ("+fa+") "+mxResources.get("containsValidationErrors"));}if(ea.length==ba.length){var I=null,na=null!=ha?P+ea[ha]:null;null!=na&&(I=E.model.getCell(na));var A=null!=I,Z=new mxCell(ga,new mxGeometry(ja,qa,0,0),m||"whiteSpace=wrap;html=1;");Z.vertex=!0;Z.id= -na;for(var aa=0;aa<ea.length;aa++)E.setAttributeForCell(Z,ba[aa],ea[aa]);if(null!=v&&null!=y){var Ba=y[Z.getAttribute(v)];null!=Ba&&E.labelChanged(Z,Ba)}if(null!=u&&null!=r){var xa=r[Z.getAttribute(u)];null!=xa&&(Z.style=xa)}E.setAttributeForCell(Z,"placeholders","1");Z.style=E.replacePlaceholders(Z,Z.style);A&&(E.model.setGeometry(I,Z.geometry),E.model.setStyle(I,Z.style),0>mxUtils.indexOf(f,I)&&f.push(I));I=Z;if(!A)for(T=0;T<X.length;T++)l[X[T].to][I.getAttribute(X[T].to)]=I;null!=ma&&"link"!=ma&& -(E.setLinkForCell(I,I.getAttribute(ma)),E.setAttributeForCell(I,ma,null));E.fireEvent(new mxEventObject("cellsInserted","cells",[I]));var ya=this.editor.graph.getPreferredSizeForCell(I);I.vertex&&(null!=B&&null!=I.getAttribute(B)&&(I.geometry.x=ja+parseFloat(I.getAttribute(B))),null!=J&&null!=I.getAttribute(J)&&(I.geometry.y=ka+parseFloat(I.getAttribute(J))),"@"==G.charAt(0)&&null!=I.getAttribute(G.substring(1))?I.geometry.width=parseFloat(I.getAttribute(G.substring(1))):I.geometry.width="auto"== -G?ya.width+W:parseFloat(G),"@"==M.charAt(0)&&null!=I.getAttribute(M.substring(1))?I.geometry.height=parseFloat(I.getAttribute(M.substring(1))):I.geometry.height="auto"==M?ya.height+W:parseFloat(M),qa+=I.geometry.height+S);A?(null==e[na]&&(e[na]=[]),e[na].push(I)):(K=null!=N?E.model.getCell(P+ea[N]):null,d.push(I),null!=K?(K.style=E.replacePlaceholders(K,p),E.addCell(I,K)):f.push(E.addCell(I)))}}for(var ia=f.slice(),ca=f.slice(),T=0;T<X.length;T++)for(var oa=X[T],L=0;L<f.length;L++){var I=f[L],Ca= -mxUtils.bind(this,function(a,b,c){var d=b.getAttribute(c.from);if(null!=d){E.setAttributeForCell(b,c.from,null);for(var d=d.split(","),f=0;f<d.length;f++){var e=l[c.to][d[f]];if(null!=e){var g=c.label;null!=c.fromlabel&&(g=(b.getAttribute(c.fromlabel)||"")+(g||""));null!=c.tolabel&&(g=(g||"")+(e.getAttribute(c.tolabel)||""));ca.push(E.insertEdge(null,null,g||"",c.invert?e:a,c.invert?a:e,c.style||E.createCurrentEdgeStyle()));mxUtils.remove(c.invert?a:e,ia)}}}});Ca(I,I,oa);if(null!=e[I.id])for(aa=0;aa< -e[I.id].length;aa++)Ca(I,e[I.id][aa],oa)}if(null!=da)for(L=0;L<d.length;L++)for(I=d[L],aa=0;aa<da.length;aa++)E.setAttributeForCell(I,mxUtils.trim(da[aa]),null);if(0<f.length){var ra=new mxParallelEdgeLayout(E);ra.spacing=O;var la=function(){0<ra.spacing&&ra.execute(E.getDefaultParent());for(var a=0;a<f.length;a++){var b=E.getCellGeometry(f[a]);b.x=Math.round(E.snap(b.x));b.y=Math.round(E.snap(b.y));"auto"==G&&(b.width=Math.round(E.snap(b.width)));"auto"==M&&(b.height=Math.round(E.snap(b.height)))}}; -if("["==Q.charAt(0)){var Ka=Y;E.view.validate();this.executeLayoutList(JSON.parse(Q),function(){la();Ka()});Y=null}else if("circle"==Q){var za=new mxCircleLayout(E);za.resetEdges=!1;var La=za.isVertexIgnored;za.isVertexIgnored=function(a){return La.apply(this,arguments)||0>mxUtils.indexOf(f,a)};this.executeLayout(function(){za.execute(E.getDefaultParent());la()},!0,Y);Y=null}else if("horizontaltree"==Q||"verticaltree"==Q||"auto"==Q&&ca.length==2*f.length-1&&1==ia.length){E.view.validate();var Aa= -new mxCompactTreeLayout(E,"horizontaltree"==Q);Aa.levelDistance=S;Aa.edgeRouting=!1;Aa.resetEdges=!1;this.executeLayout(function(){Aa.execute(E.getDefaultParent(),0<ia.length?ia[0]:null)},!0,Y);Y=null}else if("horizontalflow"==Q||"verticalflow"==Q||"auto"==Q&&1==ia.length){E.view.validate();var va=new mxHierarchicalLayout(E,"horizontalflow"==Q?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);va.intraCellSpacing=S;va.parallelEdgeSpacing=O;va.interRankCellSpacing=pa;va.disableEdgeStyle=!1;this.executeLayout(function(){va.execute(E.getDefaultParent(), -ca);E.moveCells(ca,ja,ka)},!0,Y);Y=null}else if("organic"==Q||"auto"==Q&&ca.length>f.length){E.view.validate();var ta=new mxFastOrganicLayout(E);ta.forceConstant=3*S;ta.resetEdges=!1;var Ea=ta.isVertexIgnored;ta.isVertexIgnored=function(a){return Ea.apply(this,arguments)||0>mxUtils.indexOf(f,a)};ra=new mxParallelEdgeLayout(E);ra.spacing=O;this.executeLayout(function(){ta.execute(E.getDefaultParent());la()},!0,Y);Y=null}}this.hideDialog()}finally{E.model.endUpdate()}null!=Y&&Y()}}catch(wa){this.handleError(wa)}}; +Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,!0,!0):f(!1,d)};EditorUi.prototype.parseFile=function(a,b,d){d=null!=d?d:a.name;var c=new FormData;c.append("format","xml");c.append("upfile",a,d);var f=new XMLHttpRequest;f.open("POST",OPEN_URL);f.onreadystatechange=function(){b(f)};f.send(c);try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+a.size})}catch(l){}};EditorUi.prototype.isResampleImage=function(a, +b){b=null!=b?b:this.resampleThreshold;return a.length>b};EditorUi.prototype.resizeImage=function(a,b,d,e,k,l){k=null!=k?k:this.maxImageSize;var c=Math.max(1,a.width),f=Math.max(1,a.height);if(e&&this.isResampleImage(b,l))try{var g=Math.max(c/k,f/k);if(1<g){var m=Math.round(c/g),n=Math.round(f/g),q=document.createElement("canvas");q.width=m;q.height=n;q.getContext("2d").drawImage(a,0,0,m,n);var p=q.toDataURL();if(p.length<b.length){var r=document.createElement("canvas");r.width=m;r.height=n;var u= +r.toDataURL();p!==u&&(b=p,c=m,f=n)}}}catch(Y){}d(b,c,f)};EditorUi.prototype.crcTable=[];for(var d=0;256>d;d++)for(var k=d,m=0;8>m;m++)k=1==(k&1)?3988292384^k>>>1:k>>>1,EditorUi.prototype.crcTable[d]=k;EditorUi.prototype.updateCRC=function(a,b,d,e){for(var c=0;c<e;c++)a=EditorUi.prototype.crcTable[(a^b.charCodeAt(d+c))&255]^a>>>8;return a};EditorUi.prototype.crc32=function(a){this.crcTable=this.crcTable||this.createCrcTable();for(var c=-1,b=0;b<a.length;b++)c=c>>>8^this.crcTable[(c^a.charCodeAt(b))& +255];return(c^-1)>>>0};EditorUi.prototype.writeGraphModelToPng=function(a,b,d,e,k){function c(a,c){var b=m;m+=c;return a.substring(b,m)}function f(a){a=c(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function g(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var m=0;if(c(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=k&&k();else if(c(a, +4),"IHDR"!=c(a,4))null!=k&&k();else{c(a,17);k=a.substring(0,m);do{var n=f(a);if("IDAT"==c(a,4)){k=a.substring(0,m-8);"pHYs"==b&&"dpi"==d?(d=Math.round(e/.0254),d=g(d)+g(d)+String.fromCharCode(1)):d=d+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+e;e=4294967295;e=this.updateCRC(e,b,0,4);e=this.updateCRC(e,d,0,d.length);k+=g(d.length)+b+d+g(e^4294967295);k+=a.substring(m-8,a.length);break}k+=a.substring(m-8,m-4+n);c(a,n);c(a,4)}while(n);return"data:image/png;base64,"+(window.btoa?btoa(k): +Base64.encode(k,!0))}};EditorUi.prototype.extractGraphModelFromPng=function(a){return Editor.extractGraphModelFromPng(a)};EditorUi.prototype.loadImage=function(a,b,d){try{var c=new Image;c.onload=function(){b(c)};null!=d&&(c.onerror=d);c.src=a}catch(n){if(null!=d)d(n);else throw n;}};var r=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();"undefined"!==typeof window.mxSettings&&(this.formatWidth=mxSettings.getFormatWidth()); +var a=this,b=this.editor.graph;b.getLinkTitle=function(b){return a.getLinkTitle(b)};b.customLinkClicked=function(b){var c=!1;try{a.handleCustomLink(b),c=!0}catch(p){a.handleError(p)}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 e=a.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(b){b= +null!=b?b:"";if(null!=a.pages&&null!=a.currentPage)for(var c=0;c<a.pages.length;c++)if(a.pages[c]==a.currentPage){0<c&&(b+=(0<b.length?"&":"?")+"page="+c);break}"1"==urlParams.dev&&(b+=(0<b.length?"&":"?")+"dev=1&drawdev=1");return e.apply(this,arguments)};var k=b.addClickHandler;b.addClickHandler=function(a,c,d){var f=c;c=function(a,c){if(null==c){var d=mxEvent.getSource(a);"a"==d.nodeName.toLowerCase()&&(c=d.getAttribute("href"))}null!=c&&b.isCustomLink(c)&&(mxEvent.isTouchEvent(a)||!mxEvent.isPopupTrigger(a))&& +b.customLinkClicked(c)&&mxEvent.consume(a);null!=f&&f(a,c)};k.call(this,a,c,d)};r.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(b.view.canvas.ownerSVGElement,null,!0);a.actions.get("print").funct=function(){a.showDialog((new PrintDialog(a)).container,360,null!=a.pages&&1<a.pages.length?420:360,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var l=b.getGlobalVariable;b.getGlobalVariable=function(b){return"page"==b&&null!=a.currentPage?a.currentPage.getName(): +"pagenumber"==b?null!=a.currentPage&&null!=a.pages?mxUtils.indexOf(a.pages,a.currentPage)+1:1:l.apply(this,arguments)};var m=b.labelLinkClicked;b.labelLinkClicked=function(a,c,d){var f=c.getAttribute("href");if(null==f||!b.isCustomLink(f)||!mxEvent.isTouchEvent(d)&&mxEvent.isPopupTrigger(d))m.apply(this,arguments);else{if(!b.isEnabled()||null!=a&&b.isCellLocked(a.cell))b.customLinkClicked(f),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 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",!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,f,e,g){b.insertImage(a,e,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 f=this.maxImageSize,f=Math.min(1, +Math.min(f/Math.max(1,d)),f/Math.max(1,a));b.insertImage(decodeURIComponent(c),d*f,a*f)})):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()})))}));"1"==urlParams.ruler&&"undefined"!== +typeof mxRuler&&(this.ruler=new mxDualRuler(this,this.editor.graph.view.unit));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 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 t=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:t.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 c=mxUtils.convertPoint(b.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),d=b.view.translate,f=b.view.scale,e=c.x/f-d.x,g=c.y/f-d.y;mxEvent.isAltDown(a)&& +(g=e=0);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,e,g,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a));else{var l=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,e,g,!0));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")){var k=a.dataTransfer.getData("text/html"), +c=document.createElement("div");c.innerHTML=k;var m=null,d=c.getElementsByTagName("img");null!=d&&1==d.length?(k=d[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)||(m=!0)):(c=c.getElementsByTagName("a"),null!=c&&1==c.length&&(k=c[0].getAttribute("href")));var n=!0,q=mxUtils.bind(this,function(){b.setSelectionCells(this.insertTextAt(k,e,g,!0,m,null,n))});m&&k.length>this.resampleThreshold?this.confirmImageResize(function(a){n=a;q()},mxEvent.isControlDown(a)):q()}else null!=l&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(l)? +this.loadImage(decodeURIComponent(l),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,"",e,g,c*d,a*d,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+l+";"))}),mxUtils.bind(this,function(a){b.setSelectionCells(this.insertTextAt(l,e,g,!0))})):0<=mxUtils.indexOf(a.dataTransfer.types, +"text/plain")&&b.setSelectionCells(this.insertTextAt(a.dataTransfer.getData("text/plain"),e,g,!0))}}a.stopPropagation();a.preventDefault()}),!1)}this.initPages();this.editUpdateListener=mxUtils.bind(this,function(a,b){var c=b.getProperty("edit");null!=c&&this.updateEditReferences(c)});this.editor.undoManager.addListener(mxEvent.BEFORE_UNDO,this.editUpdateListener);this.editor.undoManager.addListener(mxEvent.BEFORE_REDO,this.editUpdateListener);"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()}; +EditorUi.prototype.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,f=0;f<c.types.length;f++)if("text/"===c.types[f].substring(0,5)){d=!0;break}if(!d){var e=c.items;for(index in e){var k=e[index];if("file"===k.kind){if(a.isEditing())this.importFiles([k.getAsFile()],0,0,this.maxImageSize,function(b,c,d,f,e,g){a.insertImage(b, +e,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 m=this.editor.graph.getInsertPoint();this.importFiles([k.getAsFile()],m.x,m.y,this.maxImageSize);mxEvent.consume(b)}break}}}}catch(t){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function a(){window.setTimeout(function(){d.innerHTML=" ";d.focus();document.execCommand("selectAll",!1,null)},0)}var b=this.editor.graph,d=document.createElement("div"); +d.setAttribute("autocomplete","off");d.setAttribute("autocorrect","off");d.setAttribute("autocapitalize","off");d.setAttribute("spellcheck","false");d.style.position="absolute";d.style.whiteSpace="nowrap";d.style.overflow="hidden";d.style.display="block";d.contentEditable=!0;mxUtils.setOpacity(d,0);d.style.width="1px";d.style.height="1px";d.innerHTML=" ";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 c=mxEvent.getSource(a);null==b.container||!b.isEnabled()||b.isMouseDown||b.isEditing()||null!=this.dialog||"INPUT"==c.nodeName||"TEXTAREA"==c.nodeName||!(224==a.keyCode||!mxClient.IS_MAC&&17==a.keyCode||mxClient.IS_MAC&&91==a.keyCode)||e||(d.style.left=b.container.scrollLeft+10+"px",d.style.top=b.container.scrollTop+10+"px",b.container.appendChild(d),e=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){d.focus();document.execCommand("selectAll",!1,null)}, +0):(d.focus(),document.execCommand("selectAll",!1,null)))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(a){var c=a.keyCode;window.setTimeout(mxUtils.bind(this,function(){!e||224!=c&&17!=c&&91!=c||(e=!1,b.isEditing()||null!=this.dialog||null==b.container||b.container.focus(),d.parentNode.removeChild(d),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(d,"copy",mxUtils.bind(this,function(c){if(b.isEnabled())try{mxClipboard.copy(b),this.copyCells(d),a()}catch(x){this.handleError(x)}})); +mxEvent.addListener(d,"cut",mxUtils.bind(this,function(c){if(b.isEnabled())try{mxClipboard.copy(b),this.copyCells(d,!0),a()}catch(x){this.handleError(x)}}));mxEvent.addListener(d,"paste",mxUtils.bind(this,function(a){b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(d.innerHTML=" ",d.focus(),window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,d);d.innerHTML=" "}),0))}),!0);var k=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==d? +!0:k.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();this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.menus.customFonts= +mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(a,b){mxSettings.setCustomFonts(this.menus.customFonts);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();this.addListener("gridColorChanged",mxUtils.bind(this,function(a,b){mxSettings.setGridColor(this.editor.graph.view.gridColor);mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(a,b){mxSettings.setAutosave(this.editor.autosave); +mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&this.sidebar.showPalette("search",mxSettings.settings.search);this.editor.chromeless&&!this.editor.editable||null==this.sidebar||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save());this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyCells=function(a,b){var c=this.editor.graph; +if(c.isSelectionEmpty())a.innerHTML="";else{var d=mxUtils.sortCells(c.model.getTopmostCells(c.getSelectionCells())),f=mxUtils.getXml(this.editor.graph.encodeCells(d));mxUtils.setTextContent(a,encodeURIComponent(f));b?(c.removeCells(d,!1),c.lastPasteXml=null):(c.lastPasteXml=f,c.pasteCounter=0);a.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.pasteCells=function(a,b){if(!mxEvent.isConsumed(a)){var c=b.getElementsByTagName("span");if(null!=c&&0<c.length&&"application/vnd.lucid.chart.objects"=== +c[0].getAttribute("data-lucid-type")){var d=c[0].getAttribute("data-lucid-content");null!=d&&0<d.length&&(this.convertLucidChart(d,mxUtils.bind(this,function(a){var b=this.editor.graph;b.setSelectionCells(this.importXml(a,0,0));b.scrollCellToVisible(b.getSelectionCell())}),mxUtils.bind(this,function(a){this.handleError(a)})),mxEvent.consume(a))}else{var d=this.editor.graph,f=mxUtils.trim(mxClient.IS_QUIRKS||8==document.documentMode?mxUtils.getTextContent(b):b.textContent),e=!1;try{var k=f.lastIndexOf("%3E"); +0<=k&&k<f.length-3&&(f=f.substring(0,k+3))}catch(t){}try{var c=b.getElementsByTagName("span"),m=null!=c&&0<c.length?mxUtils.trim(decodeURIComponent(c[0].textContent)):decodeURIComponent(f);this.isCompatibleString(m)&&(e=!0,f=m)}catch(t){}d.lastPasteXml==f?d.pasteCounter++:(d.lastPasteXml=f,d.pasteCounter=0);c=d.pasteCounter*d.gridSize;if(null!=f&&0<f.length&&(e||this.isCompatibleString(f)?d.setSelectionCells(this.importXml(f,c,c)):(e=d.getInsertPoint(),d.isMouseInsertPoint()&&(c=0,d.lastPasteXml== +f&&0<d.pasteCounter&&d.pasteCounter--),d.setSelectionCells(this.insertTextAt(f,e.x+c,e.y+c,!0))),!d.isSelectionEmpty())){d.scrollCellToVisible(d.getSelectionCell());null!=this.hoverIcons&&this.hoverIcons.update(d.view.getState(d.getSelectionCell()));try{mxEvent.consume(a)}catch(t){}}}}};EditorUi.prototype.addFileDropHandler=function(a){if(Graph.fileSupport)for(var b=null,c=0;c<a.length;c++)mxEvent.addListener(a[c],"dragleave",function(a){null!=b&&(b.parentNode.removeChild(b),b=null);a.stopPropagation(); +a.preventDefault()}),mxEvent.addListener(a[c],"dragover",mxUtils.bind(this,function(a){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==b&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(b=this.highlightElement());a.stopPropagation();a.preventDefault()})),mxEvent.addListener(a[c],"drop",mxUtils.bind(this,function(a){null!=b&&(b.parentNode.removeChild(b),b=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<a.dataTransfer.files.length)this.hideDialog(), +"1"==urlParams.embed?this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(a)&&!mxEvent.isShiftDown(a)):this.openFiles(a.dataTransfer.files,!0);else{var c=this.extractGraphModelFromEvent(a);if(null==c){var d=null!=a.dataTransfer?a.dataTransfer:a.clipboardData;null!=d&&(10==document.documentMode||11==document.documentMode?c=d.getData("Text"):(c=null,c=0<=mxUtils.indexOf(d.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(d.types, +"text/html")?d.getData("text/html"):null,null!=c&&0<c.length?(d=document.createElement("div"),d.innerHTML=c,d=d.getElementsByTagName("img"),0<d.length&&(c=d[0].getAttribute("src"))):0<=mxUtils.indexOf(d.types,"text/plain")&&(c=d.getData("text/plain"))),null!=c&&("data:image/png;base64,"==c.substring(0,22)?(c=this.extractGraphModelFromPng(c),null!=c&&0<c.length&&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 l=document.documentElement;d=(e.clientWidth||l.clientWidth)-3;e=Math.max(e.clientHeight||0,l.clientHeight)-3}else b=a.offsetTop,c=a.offsetLeft,d=a.clientWidth,e=a.clientHeight;l=document.createElement("div");l.style.zIndex=mxPopupMenu.prototype.zIndex+2;l.style.border="3px dotted rgb(254, 137, 12)";l.style.pointerEvents="none";l.style.position="absolute";l.style.top=b+"px";l.style.left=c+"px";l.style.width=Math.max(0,d-3)+"px";l.style.height=Math.max(0,e-3)+"px";null!=a&&a.parentNode==this.editor.graph.container? +this.editor.graph.container.appendChild(l):document.body.appendChild(l);return l};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,f=a.name;if(null!=f&&0<f.length){!this.useCanvasForExport&&/(\.png)$/i.test(f)&&(f=f.substring(0,f.length-4)+".drawio");var e=mxUtils.bind(this,function(a){f=0<=f.lastIndexOf(".")?f.substring(0,f.lastIndexOf("."))+".drawio":f+".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,f))}catch(v){this.handleError(v,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(a,f,b)});if(/(\.v(dx|sdx?))($|\?)/i.test(f)||/(\.vs(x|sx?))($|\?)/i.test(f))this.importVisio(a,mxUtils.bind(this,function(a){this.spinner.stop();e(a)}));else if(/(\.*<graphml )/.test(d))this.importGraphML(d,mxUtils.bind(this,function(a){this.spinner.stop();e(a)}));else if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d, +f))this.parseFile(a,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?e(a.responseText):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(d))/(\.json)$/i.test(f)&&(f=f.substring(0,f.length-5)+".drawio"),this.convertLucidChart(d,mxUtils.bind(this,function(a){this.spinner.stop();this.openLocalFile(a,f,b)}),mxUtils.bind(this,function(a){this.spinner.stop(); +this.handleError(a)}));else if("<mxlibrary"==c.target.result.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,b);try{this.loadLibrary(new LocalLibrary(this,c.target.result,a.name))}catch(E){this.handleError(E,mxResources.get("errorLoadingFile"))}}else"image/png"==a.type.substring(0,9)&&(d=this.extractGraphModelFromPng(d)),this.spinner.stop(),this.openLocalFile(d,f,b)}}catch(E){this.handleError(E)}}); +c.onerror=mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a);window.openFile=null});"image"===a.type.substring(0,5)&&"image/svg"!==a.type.substring(0,9)?c.readAsDataURL(a):c.readAsText(a)})(a[c])};EditorUi.prototype.openLocalFile=function(a,b,d){var c=this.getCurrentFile(),f=mxUtils.bind(this,function(){window.openFile=null;if(null==b&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var c=mxUtils.parseXml(a);null!=c&&(this.editor.setGraphXml(c.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this, +a,b||this.defaultFilename,d))});if(null!=a&&0<a.length)null==c||!c.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)?f():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&null!=c&&c.isModified()?this.confirm(mxResources.get("allChangesLost"),null,f,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(a,b),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=c&&c.isModified()? +this.confirm(mxResources.get("allChangesLost"),null,f,mxResources.get("cancel"),mxResources.get("discardChanges")):f()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var 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=[],d;for(d in a)b.push(d);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,f=d.getCellStyle(a);c(mxStencilRegistry.getBasenameForStencil(f[mxConstants.STYLE_SHAPE]));d.model.isEdge(a)&&(c(mxMarker.getPackageForType(f[mxConstants.STYLE_STARTARROW])),c(mxMarker.getPackageForType(f[mxConstants.STYLE_ENDARROW])));for(var f=d.model.getChildCount(a),e=0;e<f;e++)this.addBasenamesForCell(d.model.getChildAt(a,e),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.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,d){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!=d?d:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&& +(null==this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(a,b){null!=a?a.getPublicUrl(b):b(null)};EditorUi.prototype.createLoadMessage=function(a){var b=this.editor.graph;return{event:a,pageVisible:b.pageVisible,translate:b.view.translate,bounds:b.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:b.view.scale,page:b.view.getBackgroundPageBounds()}};EditorUi.prototype.installMessageHandler= +function(a){var b=null,c=!1,d=!1,e=null,l=mxUtils.bind(this,function(a,b){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,l);mxEvent.addListener(window,"message",mxUtils.bind(this,function(f){if(f.source==(window.opener||window.parent)){var g=f.data,l=mxUtils.bind(this,function(a){if(null!=a&&"function"===typeof a.charAt&& +"<"!=a.charAt(0))try{"data:image/png;base64,"==a.substring(0,22)?a=this.extractGraphModelFromPng(a):"data:image/svg+xml;base64,"==a.substring(0,26)?a=atob(a.substring(26)):"data:image/svg+xml;utf8,"==a.substring(0,24)&&(a=a.substring(24)),null!=a&&("%"==a.charAt(0)?a=decodeURIComponent(a):"<"!=a.charAt(0)&&(a=Graph.decompress(a)))}catch(S){}return a});if("json"==urlParams.proto){try{g=JSON.parse(g)}catch(P){g=null}if(null==g)return;if("dialog"==g.action){this.showError(null!=g.titleKey?mxResources.get(g.titleKey): +g.title,null!=g.messageKey?mxResources.get(g.messageKey):g.message,null!=g.buttonKey?mxResources.get(g.buttonKey):g.button);null!=g.modified&&(this.editor.modified=g.modified);return}if("prompt"==g.action){this.spinner.stop();l=new FilenameDialog(this,g.defaultValue||"",null!=g.okKey?mxResources.get(g.okKey):null,function(a){null!=a&&k.postMessage(JSON.stringify({event:"prompt",value:a,message:g}),"*")},null!=g.titleKey?mxResources.get(g.titleKey):g.title);this.showDialog(l.container,300,80,!0,!1); +l.init();return}if("draft"==g.action){var m=l(g.xml);this.spinner.stop();l=new DraftDialog(this,mxResources.get("draftFound",[g.name||this.defaultFilename]),m,mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"edit",message:g}),"*")}),mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"discard",message:g}),"*")}),g.editKey?mxResources.get(g.editKey):null,g.discardKey?mxResources.get(g.discardKey):null,g.ignore? +mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"ignore",message:g}),"*")}):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){k.postMessage(JSON.stringify({event:"draft",error:P.toString(),message:g}),"*")}return}if("template"==g.action){this.spinner.stop();var l=1==g.enableRecent,m=1==g.enableSearch,n=1==g.enableCustomTemp,l=new NewDialog(this,!1,null!=g.callback, +mxUtils.bind(this,function(b,c){b=b||this.emptyDiagramXml;null!=g.callback?k.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,l?mxUtils.bind(this,function(a){this.remoteInvoke("getRecentDiagrams",null,null,a,function(){a(null,"Network Error!")})}):null,m?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){k.postMessage(JSON.stringify({event:"template",docUrl:a,info:b,name:c}),"*")}),null,null,n?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"==g.action){l=this.getDiagramTextContent();k.postMessage(JSON.stringify({event:"textContent",data:l, +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 p=null!=g.messageKey?mxResources.get(g.messageKey):g.message;null==g.show||g.show?this.spinner.spin(document.body,p):this.spinner.stop();return}if("export"==g.action){if("png"==g.format||"xmlpng"==g.format){if(null== +g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin)){var q=null!=g.xml?g.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var r=this.editor.graph,u=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();var b=this.createLoadMessage("export");b.format=g.format;b.message=g;b.data=a;b.xml=encodeURIComponent(q);k.postMessage(JSON.stringify(b),"*")}),x=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage); +"xmlpng"==g.format&&(a=this.writeGraphModelToPng(a,"tEXt","mxfile",encodeURIComponent(q)));r!=this.editor.graph&&r.container.parentNode.removeChild(r.container);u(a)});if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage!=this.pages[0]){var r=this.createTemporaryGraph(r.getStylesheet()),y=r.getGlobalVariable,B=this.pages[0];r.getGlobalVariable=function(a){return"page"==a?B.getName():"pagenumber"==a?1:y.apply(this,arguments)};document.body.appendChild(r.container);r.model.setRoot(B.root)}this.exportToCanvas(mxUtils.bind(this, +function(a){x(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,function(){x(null)}),null,null,g.scale,null,null,null,r)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==g.format?"1":"0")+(null!=g.scale?"&scale="+g.scale:"")+"&base64=1&xml="+encodeURIComponent(encodeURIComponent(q)))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?u("data:image/png;base64,"+a.getText()):x(null)}),mxUtils.bind(this,function(){x(null)}))}}else{null!=g.xml&&0<g.xml.length&& +this.setFileData(g.xml);p=this.createLoadMessage("export");if("html2"==g.format||"html"==g.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length))l=this.getXmlFileData(),p.xml=mxUtils.getXml(l),p.data=this.getFileData(null,null,!0,null,null,null,l),p.format=g.format;else if("html"==g.format)q=this.editor.getGraphXml(),p.data=this.getHtml(q,this.editor.graph),p.xml=mxUtils.getXml(q),p.format=g.format;else{mxSvgCanvas2D.prototype.foAltText=null;l=this.editor.graph.background;l==mxConstants.NONE&& +(l=null);p.xml=this.getFileData(!0);p.format="svg";if(g.embedImages||null==g.embedImages){if(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin))this.editor.graph.setEnabled(!1),"xmlsvg"==g.format?this.getEmbeddedSvg(p.xml,this.editor.graph,null,!0,mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();p.data=this.createSvgDataUri(a);k.postMessage(JSON.stringify(p),"*")})):this.convertImages(this.editor.graph.getSvg(l), +mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();p.data=this.createSvgDataUri(mxUtils.getXml(a));k.postMessage(JSON.stringify(p),"*")}));return}l="xmlsvg"==g.format?this.getEmbeddedSvg(this.getFileData(!0),this.editor.graph,null,!0):mxUtils.getXml(this.editor.graph.getSvg(l));p.data=this.createSvgDataUri(l)}k.postMessage(JSON.stringify(p),"*")}return}if("load"==g.action)d=1==g.autosave,this.hideDialog(),null!=g.modified&&null==urlParams.modified&&(urlParams.modified= +g.modified),null!=g.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=g.saveAndExit),null!=g.title&&null!=this.buttonContainer&&(m=document.createElement("span"),mxUtils.write(m,g.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(m),this.embedFilenameSpan=m),g=null!=g.xmlpng?this.extractGraphModelFromPng(g.xmlpng):g.xml;else{"remoteInvokeReady"==g.action?this.handleRemoteInvokeReady(k):"remoteInvoke"==g.action?this.handleRemoteInvoke(g):"remoteInvokeResponse"==g.action?this.handleRemoteInvokeResponse(g):k.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(g)}),"*");return}}var A=mxUtils.bind(this,function(f,g){c=!0;try{a(f,g)}catch(V){this.handleError(V)}c=!1;null!=urlParams.modified&& +this.editor.setStatus("");var l=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});e=l();d&&null==b&&(b=mxUtils.bind(this,function(a,b){var d=l();if(d!=e&&!c){var f=this.createLoadMessage("autosave");f.xml=d;d=JSON.stringify(f);(window.opener||window.parent).postMessage(d,"*")}e=d}),this.editor.graph.model.addListener(mxEvent.CHANGE,b),this.editor.graph.addListener("gridSizeChanged",b),this.editor.graph.addListener("shadowVisibleChanged", +b),this.addListener("pageFormatChanged",b),this.addListener("pageScaleChanged",b),this.addListener("backgroundColorChanged",b),this.addListener("backgroundImageChanged",b),this.addListener("foldingEnabledChanged",b),this.addListener("mathEnabledChanged",b),this.addListener("gridEnabledChanged",b),this.addListener("guidesEnabledChanged",b),this.addListener("pageViewChanged",b));"1"!=urlParams.returnbounds&&"json"!=urlParams.proto||k.postMessage(JSON.stringify(this.createLoadMessage("load")),"*")}); +null!=g&&"function"===typeof g.substring&&"data:application/vnd.visio;base64,"==g.substring(0,34)?(l="0M8R4KGxGuE"==g.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(g.substring(g.indexOf(",")+1)),function(a){A(a,f)},mxUtils.bind(this,function(a){this.handleError(a)}),l)):null!=g&&"function"===typeof g.substring&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(g,"")?this.parseFile(new Blob([g],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4== +a.readyState&&200<=a.status&&299>=a.status&&"<mxGraphModel"==a.responseText.substring(0,13)&&A(a.responseText,f)}),""):null!=g&&"function"===typeof g.substring&&this.isLucidChartData(g)?this.convertLucidChart(g,mxUtils.bind(this,function(a){A(a)}),mxUtils.bind(this,function(a){this.handleError(a)})):(g=l(g),A(g,f))}}));var k=window.opener||window.parent,l="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";k.postMessage(l,"*")};EditorUi.prototype.addEmbedButtons=function(){if(null!= +this.menubar){var a=document.createElement("div");a.style.display="inline-block";a.style.position="absolute";a.style.paddingTop="atlas"==uiTheme?"2px":"3px";a.style.paddingLeft="8px";a.style.paddingBottom="2px";var b=document.createElement("button");b.className="geBigButton";b.style.fontSize="12px";b.style.padding="4px 6px 4px 6px";b.style.borderRadius="3px";"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.style.fontSize= +"12px",b.style.marginLeft="6px",b.style.padding="4px",b.style.cursor="pointer",mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b)));b=document.createElement("a");mxUtils.write(b,mxResources.get("exit"));b.setAttribute("title",mxResources.get("exit"));b.style.fontSize="12px";b.style.marginLeft="6px";b.style.marginRight="20px";b.style.padding="4px";b.style.cursor="pointer";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})); +a.appendChild(b);this.toolbar.container.appendChild(a);this.toolbar.staticElements.push(a);a.style.right="atlas"!=uiTheme?"52px":"42px"}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(a){this.importCsv(a)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.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(),f=0;f<a.length;f++){var e=new window[a[f].layout](c);if(null!=a[f].config)for(var k in a[f].config)e[k]=a[f].config[k];this.executeLayout(function(){e.execute(c.getDefaultParent(),0==d.length?null:d)},f==a.length-1,b)}};EditorUi.prototype.importCsv=function(a,b){try{var c=a.split("\n"),d=[],f=[],e={};if(0<c.length){var k={},m=null, +r=null,u=null,v=null,y=null,p=null,z=null,K=null,Y="",H="auto",O="auto",B=null,J=null,P=40,S=40,pa=100,V=0,F=this.editor.graph;F.getGraphBounds();for(var M=function(){null!=b?b(ca):(F.setSelectionCells(ca),F.scrollCellToVisible(F.getSelectionCell()))},qa=F.getFreeInsertPoint(),la=qa.x,ga=qa.y,qa=ga,ha=null,Q="auto",K=null,W=[],ma=null,da=null,R=0;R<c.length&&"#"==c[R].charAt(0);){a=c[R];for(R++;R<c.length&&"\\"==a.charAt(a.length-1)&&"#"==c[R].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(c[R].substring(1)), +R++;if("#"!=a.charAt(1)){var ia=a.indexOf(":");if(0<ia){var N=mxUtils.trim(a.substring(1,ia)),G=mxUtils.trim(a.substring(ia+1));"label"==N?ha=F.sanitizeHtml(G):"labelname"==N&&0<G.length&&"-"!=G?v=G:"labels"==N&&0<G.length&&"-"!=G?y=JSON.parse(G):"style"==N?m=G:"parentstyle"==N?p=G:"stylename"==N&&0<G.length&&"-"!=G?u=G:"styles"==N&&0<G.length&&"-"!=G?r=JSON.parse(G):"identity"==N&&0<G.length&&"-"!=G?z=G:"parent"==N&&0<G.length&&"-"!=G?K=G:"namespace"==N&&0<G.length&&"-"!=G?Y=G:"width"==N?H=G:"height"== +N?O=G:"left"==N&&0<G.length?B=G:"top"==N&&0<G.length?J=G:"ignore"==N?da=G.split(","):"connect"==N?W.push(JSON.parse(G)):"link"==N?ma=G:"padding"==N?V=parseFloat(G):"edgespacing"==N?P=parseFloat(G):"nodespacing"==N?S=parseFloat(G):"levelspacing"==N?pa=parseFloat(G):"layout"==N&&(Q=G)}}}if(null==c[R])throw Error(mxResources.get("invalidOrMissingFile"));var ba=this.editor.csvToArray(c[R]),N=ia=null;if(null!=z||null!=K)for(var L=0;L<ba.length;L++)z==ba[L]&&(ia=L),K==ba[L]&&(N=L);null==ha&&(ha="%"+ba[0]+ +"%");if(null!=W)for(var T=0;T<W.length;T++)null==k[W[T].to]&&(k[W[T].to]={});F.model.beginUpdate();try{for(L=R+1;L<c.length;L++){var ea=this.editor.csvToArray(c[L]);if(null==ea){var fa=40<c[L].length?c[L].substring(0,40)+"...":c[L];throw Error(L+" ("+fa+") "+mxResources.get("containsValidationErrors"));}if(ea.length==ba.length){var I=null,na=null!=ia?Y+ea[ia]:null;null!=na&&(I=F.model.getCell(na));var z=null!=I,Z=new mxCell(ha,new mxGeometry(la,qa,0,0),m||"whiteSpace=wrap;html=1;");Z.vertex=!0;Z.id= +na;for(var aa=0;aa<ea.length;aa++)F.setAttributeForCell(Z,ba[aa],ea[aa]);if(null!=v&&null!=y){var Ba=y[Z.getAttribute(v)];null!=Ba&&F.labelChanged(Z,Ba)}if(null!=u&&null!=r){var xa=r[Z.getAttribute(u)];null!=xa&&(Z.style=xa)}F.setAttributeForCell(Z,"placeholders","1");Z.style=F.replacePlaceholders(Z,Z.style);z&&(F.model.setGeometry(I,Z.geometry),F.model.setStyle(I,Z.style),0>mxUtils.indexOf(f,I)&&f.push(I));I=Z;if(!z)for(T=0;T<W.length;T++)k[W[T].to][I.getAttribute(W[T].to)]=I;null!=ma&&"link"!=ma&& +(F.setLinkForCell(I,I.getAttribute(ma)),F.setAttributeForCell(I,ma,null));F.fireEvent(new mxEventObject("cellsInserted","cells",[I]));var ya=this.editor.graph.getPreferredSizeForCell(I);I.vertex&&(null!=B&&null!=I.getAttribute(B)&&(I.geometry.x=la+parseFloat(I.getAttribute(B))),null!=J&&null!=I.getAttribute(J)&&(I.geometry.y=ga+parseFloat(I.getAttribute(J))),"@"==H.charAt(0)&&null!=I.getAttribute(H.substring(1))?I.geometry.width=parseFloat(I.getAttribute(H.substring(1))):I.geometry.width="auto"== +H?ya.width+V:parseFloat(H),"@"==O.charAt(0)&&null!=I.getAttribute(O.substring(1))?I.geometry.height=parseFloat(I.getAttribute(O.substring(1))):I.geometry.height="auto"==O?ya.height+V:parseFloat(O),qa+=I.geometry.height+S);z?(null==e[na]&&(e[na]=[]),e[na].push(I)):(K=null!=N?F.model.getCell(Y+ea[N]):null,d.push(I),null!=K?(K.style=F.replacePlaceholders(K,p),F.addCell(I,K)):f.push(F.addCell(I)))}}for(var ja=f.slice(),ca=f.slice(),T=0;T<W.length;T++)for(var oa=W[T],L=0;L<f.length;L++){var I=f[L],Ca= +mxUtils.bind(this,function(a,b,c){var d=b.getAttribute(c.from);if(null!=d){F.setAttributeForCell(b,c.from,null);for(var d=d.split(","),f=0;f<d.length;f++){var e=k[c.to][d[f]];if(null!=e){var g=c.label;null!=c.fromlabel&&(g=(b.getAttribute(c.fromlabel)||"")+(g||""));null!=c.tolabel&&(g=(g||"")+(e.getAttribute(c.tolabel)||""));ca.push(F.insertEdge(null,null,g||"",c.invert?e:a,c.invert?a:e,c.style||F.createCurrentEdgeStyle()));mxUtils.remove(c.invert?a:e,ja)}}}});Ca(I,I,oa);if(null!=e[I.id])for(aa=0;aa< +e[I.id].length;aa++)Ca(I,e[I.id][aa],oa)}if(null!=da)for(L=0;L<d.length;L++)for(I=d[L],aa=0;aa<da.length;aa++)F.setAttributeForCell(I,mxUtils.trim(da[aa]),null);if(0<f.length){var ra=new mxParallelEdgeLayout(F);ra.spacing=P;var ka=function(){0<ra.spacing&&ra.execute(F.getDefaultParent());for(var a=0;a<f.length;a++){var b=F.getCellGeometry(f[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"==O&&(b.height=Math.round(F.snap(b.height)))}}; +if("["==Q.charAt(0)){var Ja=M;F.view.validate();this.executeLayoutList(JSON.parse(Q),function(){ka();Ja()});M=null}else if("circle"==Q){var za=new mxCircleLayout(F);za.resetEdges=!1;var Ka=za.isVertexIgnored;za.isVertexIgnored=function(a){return Ka.apply(this,arguments)||0>mxUtils.indexOf(f,a)};this.executeLayout(function(){za.execute(F.getDefaultParent());ka()},!0,M);M=null}else if("horizontaltree"==Q||"verticaltree"==Q||"auto"==Q&&ca.length==2*f.length-1&&1==ja.length){F.view.validate();var Aa= +new mxCompactTreeLayout(F,"horizontaltree"==Q);Aa.levelDistance=S;Aa.edgeRouting=!1;Aa.resetEdges=!1;this.executeLayout(function(){Aa.execute(F.getDefaultParent(),0<ja.length?ja[0]:null)},!0,M);M=null}else if("horizontalflow"==Q||"verticalflow"==Q||"auto"==Q&&1==ja.length){F.view.validate();var va=new mxHierarchicalLayout(F,"horizontalflow"==Q?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);va.intraCellSpacing=S;va.parallelEdgeSpacing=P;va.interRankCellSpacing=pa;va.disableEdgeStyle=!1;this.executeLayout(function(){va.execute(F.getDefaultParent(), +ca);F.moveCells(ca,la,ga)},!0,M);M=null}else if("organic"==Q||"auto"==Q&&ca.length>f.length){F.view.validate();var ta=new mxFastOrganicLayout(F);ta.forceConstant=3*S;ta.resetEdges=!1;var Fa=ta.isVertexIgnored;ta.isVertexIgnored=function(a){return Fa.apply(this,arguments)||0>mxUtils.indexOf(f,a)};ra=new mxParallelEdgeLayout(F);ra.spacing=P;this.executeLayout(function(){ta.execute(F.getDefaultParent());ka()},!0,M);M=null}}this.hideDialog()}finally{F.model.endUpdate()}null!=M&&M()}}catch(wa){this.handleError(wa)}}; EditorUi.prototype.getSearch=function(a){var b="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=a&&0<window.location.search.length){var c="?",d;for(d in urlParams)0>mxUtils.indexOf(a,d)&&null!=urlParams[d]&&(b+=c+d+"="+urlParams[d],c="&")}else b=window.location.search;return b};EditorUi.prototype.getUrl=function(a){a=null!=a?a:window.location.pathname;var b=0<a.indexOf("?")?1:0;if("1"==urlParams.offline)a+=window.location.search;else{var c="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "), d;for(d in urlParams)0>mxUtils.indexOf(c,d)&&(a=0==b?a+"?":a+"&",null!=urlParams[d]&&(a+=d+"="+urlParams[d],b++))}return a};EditorUi.prototype.showLinkDialog=function(a,b,d){a=new LinkDialog(this,a,b,d,!0);this.showDialog(a.container,560,130,!0,!0);a.init()};var u=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=u.apply(this,arguments),c=this.editor.graph,d=b.getSourceGraphBounds;b.getSourceGraphBounds=function(){if(mxUtils.hasScrollbars(c.container)&&c.pageVisible&& null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width-2*a.x/b),Math.ceil(this.source.minimumGraphSize.height-2*a.y/b))}return d.apply(this,arguments)};var e=b.getSourceContainerSize;b.getSourceContainerSize=function(){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width* b-2*a.x),Math.ceil(this.source.minimumGraphSize.height*b-2*a.y))}return e.apply(this,arguments)};b.getOutlineOffset=function(a){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var d=this.source.getPagePadding();return new mxPoint(Math.round(Math.max(0,(b.outline.container.clientWidth/a-(this.source.minimumGraphSize.width-2*d.x))/2)-d.x),Math.round(Math.max(0,(b.outline.container.clientHeight/a-(this.source.minimumGraphSize.height-2*d.y))/2)-d.y-5/a))}return new mxPoint(8/ -a,8/a)};var g=b.init;b.init=function(){g.apply(this,arguments);b.outline.view.getBackgroundPageBounds=function(){var a=c.getPageLayout(),b=c.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*b.width),this.scale*(this.translate.y+a.y*b.height),this.scale*a.width*b.width,this.scale*a.height*b.height)};b.outline.view.validateBackgroundPage()};this.editor.addListener("pageSelected",function(a,c){var d=c.getProperty("change"),f=b.source,e=b.outline;e.pageScale=f.pageScale;e.pageFormat= +a,8/a)};var l=b.init;b.init=function(){l.apply(this,arguments);b.outline.view.getBackgroundPageBounds=function(){var a=c.getPageLayout(),b=c.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*b.width),this.scale*(this.translate.y+a.y*b.height),this.scale*a.width*b.width,this.scale*a.height*b.height)};b.outline.view.validateBackgroundPage()};this.editor.addListener("pageSelected",function(a,c){var d=c.getProperty("change"),f=b.source,e=b.outline;e.pageScale=f.pageScale;e.pageFormat= f.pageFormat;e.background=f.background;e.pageVisible=f.pageVisible;e.background=f.background;var g=mxUtils.getCurrentStyle(f.container);e.container.style.backgroundColor=g.backgroundColor;null!=f.view.backgroundPageShape&&null!=e.view.backgroundPageShape&&(e.view.backgroundPageShape.fill=f.view.backgroundPageShape.fill);b.outline.view.clear(d.previousPage.root,!0);b.outline.view.validate()});return b};EditorUi.prototype.getServiceCount=function(a,b){var c=1;null==this.drive&&"function"!==typeof window.DriveClient|| c++;b||null==this.dropbox&&"function"!==typeof window.DropboxClient||c++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||c++;b||null==this.gitHub||c++;b||null==this.gitLab||c++;b&&a&&isLocalStorage&&"1"==urlParams.browser&&c++;return c};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var a=this.getCurrentFile(),b=null!=a||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(b);this.menus.get("viewZoom").setEnabled(b); var d=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==a||a.isRestricted());this.actions.get("makeCopy").setEnabled(!d);this.actions.get("print").setEnabled(!d);this.menus.get("exportAs").setEnabled(!d);this.menus.get("embed").setEnabled(!d);d="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(d);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(d),this.menus.get("newLibrary").setEnabled(d));a="1"==urlParams.embed&&this.editor.graph.isEnabled()|| null!=a&&a.isEditable();this.actions.get("image").setEnabled(b);this.actions.get("zoomIn").setEnabled(b);this.actions.get("zoomOut").setEnabled(b);this.actions.get("resetView").setEnabled(b);this.actions.get("undo").setEnabled(this.canUndo()&&a);this.actions.get("redo").setEnabled(this.canRedo()&&a);this.menus.get("edit").setEnabled(b);this.menus.get("view").setEnabled(b);this.menus.get("importFrom").setEnabled(a);this.menus.get("arrange").setEnabled(a);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&& this.toolbar.edgeShapeMenu.setEnabled(a),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(a));if(this.isAppCache()){var e=applicationCache;if(null!=e&&null==this.offlineStatus){this.offlineStatus=document.createElement("div");this.offlineStatus.className="geItem";this.offlineStatus.style.position="absolute";this.offlineStatus.style.fontSize="8pt";this.offlineStatus.style.top="2px";this.offlineStatus.style.right="12px";this.offlineStatus.style.color="#666";this.offlineStatus.style.margin= -"4px";this.offlineStatus.style.padding="2px";this.offlineStatus.style.verticalAlign="middle";this.offlineStatus.innerHTML="";this.menubarContainer.appendChild(this.offlineStatus);mxEvent.addListener(this.offlineStatus,"click",mxUtils.bind(this,function(){var a=this.offlineStatus.getElementsByTagName("img");null!=a&&0<a.length&&this.alert(a[0].getAttribute("title"))}));var e=window.applicationCache,l=null,b=mxUtils.bind(this,function(){var a=e.status,b;a==e.CHECKING&&(a=e.DOWNLOADING);switch(a){case e.UNCACHED:b= +"4px";this.offlineStatus.style.padding="2px";this.offlineStatus.style.verticalAlign="middle";this.offlineStatus.innerHTML="";this.menubarContainer.appendChild(this.offlineStatus);mxEvent.addListener(this.offlineStatus,"click",mxUtils.bind(this,function(){var a=this.offlineStatus.getElementsByTagName("img");null!=a&&0<a.length&&this.alert(a[0].getAttribute("title"))}));var e=window.applicationCache,k=null,b=mxUtils.bind(this,function(){var a=e.status,b;a==e.CHECKING&&(a=e.DOWNLOADING);switch(a){case e.UNCACHED:b= "";break;case e.IDLE:b="min"==uiTheme?"":'<img title="draw.io is up to date." border="0" src="'+IMAGE_PATH+'/checkmark.gif"/>';break;case e.DOWNLOADING:b='<img title="Downloading new version..." border="0" src="'+IMAGE_PATH+'/spin.gif"/>';break;case e.UPDATEREADY:b='<img title="'+mxUtils.htmlEntities(mxResources.get("restartForChangeRequired"))+'" border="0" src="'+IMAGE_PATH+'/download.png"/>';break;case e.OBSOLETE:b='<img title="Obsolete" border="0" src="'+IMAGE_PATH+'/clear.gif"/>';break;default:b= -'<img title="Unknown" border="0" src="'+IMAGE_PATH+'/clear.gif"/>'}a!=l&&(this.offlineStatus.innerHTML=b,l=a)});mxEvent.addListener(e,"checking",b);mxEvent.addListener(e,"noupdate",b);mxEvent.addListener(e,"downloading",b);mxEvent.addListener(e,"progress",b);mxEvent.addListener(e,"cached",b);mxEvent.addListener(e,"updateready",b);mxEvent.addListener(e,"obsolete",b);mxEvent.addListener(e,"error",b);b()}}else this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement= +'<img title="Unknown" border="0" src="'+IMAGE_PATH+'/clear.gif"/>'}a!=k&&(this.offlineStatus.innerHTML=b,k=a)});mxEvent.addListener(e,"checking",b);mxEvent.addListener(e,"noupdate",b);mxEvent.addListener(e,"downloading",b);mxEvent.addListener(e,"progress",b);mxEvent.addListener(e,"cached",b);mxEvent.addListener(e,"updateready",b);mxEvent.addListener(e,"obsolete",b);mxEvent.addListener(e,"error",b);b()}}else this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement= function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var a=this.getCurrentFile();return null!=a&&a.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var y=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){y.apply(this,arguments);var a=this.editor.graph,b=this.isDiagramActive(),d=this.getCurrentFile();this.actions.get("pageSetup").setEnabled(b); this.actions.get("autosave").setEnabled(null!=d&&d.isEditable()&&d.isAutosaveOptional());this.actions.get("guides").setEnabled(b);this.actions.get("editData").setEnabled(b);this.actions.get("shadowVisible").setEnabled(b);this.actions.get("connectionArrows").setEnabled(b);this.actions.get("connectionPoints").setEnabled(b);this.actions.get("copyStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("editGeometry").setEnabled(a.getModel().isVertex(a.getSelectionCell())); this.actions.get("createShape").setEnabled(b);this.actions.get("createRevision").setEnabled(b);this.actions.get("moveToFolder").setEnabled(null!=d);this.actions.get("makeCopy").setEnabled(null!=d&&!d.isRestricted());this.actions.get("editDiagram").setEnabled(b&&(null==d||!d.isRestricted()));this.actions.get("publishLink").setEnabled(null!=d&&!d.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("find").setEnabled("hidden"!=this.diagramContainer.style.visibility); this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=d&&d.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=d);this.menus.get("publish").setEnabled(null!=d&&!d.isRestricted());a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(b&&null!=a&&null!=a.shape&&null!=a.shape.stencil)}; -var A=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){this.editUpdateListener&&(this.editor.undoManager.removeListener(this.editUpdateListener),this.editUpdateListener=null);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);A.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,b,d,e,l,g){var c=a.editor.graph;if("xml"==d)a.hideDialog(), -a.saveData(b,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("svg"==d)a.hideDialog(),a.saveData(b,"svg",mxUtils.getXml(c.getSvg(e,l,g)),"image/svg+xml");else{var f=a.getFileData(!0,null,null,null,null,!0),k=c.getGraphBounds(),m=Math.floor(k.width*l/c.view.scale),n=Math.floor(k.height*l/c.view.scale);f.length<=MAX_REQUEST_SIZE&&m*n<MAX_AREA?(a.hideDialog(),"png"!=d&&"jpg"!=d&&"jpeg"!=d||!a.isExportToCanvas()?a.saveRequest(b,d,function(a,b){return new mxXmlRequest(EXPORT_URL,"format="+ -d+"&base64="+(b||"0")+(null!=a?"&filename="+encodeURIComponent(a):"")+"&bg="+(null!=e?e:"none")+"&w="+m+"&h="+n+"&border="+g+"&xml="+encodeURIComponent(f))}):"png"==d?a.exportImage(l,null==e||"none"==e,!0,!1,!1,g,!0,!1):a.exportImage(l,!1,!0,!1,!1,g,!0,!1,"jpeg")):mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.updateEditReferences=function(a){for(var b=0;b<a.changes.length;b++){var c=a.changes[b];if(null!=c&&c.constructor==mxChildChange&&null!=c.child){var d=c.child;if(null!= -d.source&&null!=d.source.id){var e=this.getFutureCellForEdit(c.model,a,d.source.id);e!=d.source&&(d.source=e)}null!=d.target&&null!=d.target.id&&(c=this.getFutureCellForEdit(c.model,a,d.target.id),c!=d.target&&(d.target=c))}}};EditorUi.prototype.getFutureCellForEdit=function(a,b,d){var c=a.getCell(d);if(null==c)for(var e=b.changes.length-1;0<=e;e--){var f=b.changes[e];if(f.constructor==mxChildChange&&null!=f.child&&f.child.id==d){a.contains(f.previous)&&(c=f.child);break}}return c};EditorUi.prototype.getDiagramTextContent= -function(){this.editor.graph.setEnabled(!1);var a=this.editor.graph,b="";if(null!=this.pages)for(var d=0;d<this.pages.length;d++){var e=a;this.currentPage!=this.pages[d]&&(e=this.createTemporaryGraph(a.getStylesheet()),e.model.setRoot(this.pages[d].root));b+=this.pages[d].getName()+" "+e.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 g={};try{var l=mxSettings.getCustomLibraries();for(a=0;a<l.length;a++){var m=l[a];if("R"==m.substring(0,1)){var r=JSON.parse(decodeURIComponent(m.substring(1))); -g[r[0]]={id:r[0],title:r[1],downloadUrl:r[2]}}}}catch(F){}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];g[d.id]&&(b[d.id]=d);var f=this.addCheckbox(e,d.title,g[d.id]);(function(a,c){mxEvent.addListener(c,"change",function(){this.checked?b[a.id]=a:delete b[a.id]})})(d,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)}));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==g[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 g)b[c]||this.closeLibrary(new RemoteLibrary(this,null,g[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}};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]; -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,d,e,l){var c=!0,f=window.setTimeout(mxUtils.bind(this,function(){c=!1;l({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),k=mxUtils.bind(this,function(){window.clearTimeout(f);c&&e.apply(this,arguments)});d=d||{};d.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:k, -error:l});a=JSON.stringify({event:"remoteInvoke",funtionName:a,functionArgs:b,msgMarkers:d});null!=this.remoteWin?this.remoteWin.postMessage(a,"*"):this.remoteInvokeQueue.push(a)};EditorUi.prototype.handleRemoteInvoke=function(a){var b=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 c=a.funtionName,d=this.remoteInvokableFns[c];if(null!=d&&"function"=== -typeof this[c]){var e=a.functionArgs;Array.isArray(e)||(e=[]);if(d.isAsync)e.push(function(){b(Array.prototype.slice.apply(arguments))}),e.push(function(a){b(null,a||"Unkown Error")}),this[c].apply(this,e);else{var g=this[c].apply(this,e);b([g])}}else b(null,"Invalid Call: "+c+" is not found.")}catch(x){b(null,"Invalid Call: An error occured, "+x.message)}};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,d){var c=this.getCurrentFile();null!=c?c.addComment(a,b,d):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")}})(); -var CommentsWindow=function(a,b,e,d,l,m){function r(){for(var a=t.getElementsByTagName("div"),b=0,c=0;c<a.length;c++)"none"!=a[c].style.display&&a[c].parentNode==t&&b++;F.style.display=0==b?"block":"none"}function u(a,b,c,d){function e(){b.removeChild(l);b.removeChild(m);k.style.display="block";f.style.display="block"}g={div:b,comment:a,saveCallback:c,deleteOnCancel:d};var f=b.querySelector(".geCommentTxt"),k=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),r()):e();g=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);g=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);k.style.display="none";f.style.display="none";l.focus()}function y(b,c){c.innerHTML="";var d=a.timeSince(new Date(b.modifiedDate));null==d&&(d=mxResources.get("lessThanAMinute"));mxUtils.write(c,mxResources.get("timeAgo", -[d],"{1} ago"))}function A(a){var b=document.createElement("img");b.className="geCommentBusyImg";b.src=IMAGE_PATH+"/spin.gif";a.appendChild(b);a.busyImg=b}function c(a){a.style.border="1px solid red";a.removeChild(a.busyImg)}function f(a){a.style.border="";a.removeChild(a.busyImg)}function k(b,d,e,l,m){function v(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)});O.appendChild(e);d&&(e.style.display="none")}function B(){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=z;a(b);return{pdiv:d,replies:c}}function x(d,e,g,m,n){function p(){A(t);b.addReply(v,function(a){v.id=a;b.replies.push(v);f(t);g&&g()},function(b){r();c(t);a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},m,n)}function r(){u(v, -t,function(a){p()},!0)}var q=B().pdiv,v=a.newComment(d,a.getCurrentUser());v.pCommentId=b.id;null==b.replies&&(b.replies=[]);var t=k(v,b.replies,q,l+1);e?r():p()}if(m||!b.isResolved){F.style.display="none";var z=document.createElement("div");z.className="geCommentContainer";z.setAttribute("data-commentId",b.id);z.style.marginLeft=20*l+5+"px";b.isResolved&&"dark"!=uiTheme&&(z.style.backgroundColor="ghostWhite");var D=document.createElement("div");D.className="geCommentHeader";var J=document.createElement("img"); -J.className="geCommentUserImg";J.src=b.user.pictureUrl||Editor.userImage;D.appendChild(J);J=document.createElement("div");J.className="geCommentHeaderTxt";D.appendChild(J);var C=document.createElement("div");C.className="geCommentUsername";mxUtils.write(C,b.user.displayName||"");J.appendChild(C);C=document.createElement("div");C.className="geCommentDate";C.setAttribute("data-commentId",b.id);y(b,C);J.appendChild(C);z.appendChild(D);D=document.createElement("div");D.className="geCommentTxt";mxUtils.write(D, -b.content||"");z.appendChild(D);D=document.createElement("div");D.className="geCommentActions";var O=document.createElement("ul");O.className="geCommentActionsList";D.appendChild(O);q||0!=l&&!n||v(mxResources.get("reply"),function(){x("",!0)},b.isResolved);J=a.getCurrentUser();null==J||J.id!=b.user.id||q||(v(mxResources.get("edit"),function(){function d(){u(b,z,function(){A(z);b.editComment(b.content,function(){f(z)},function(b){c(z);d();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})} -d()},b.isResolved),v(mxResources.get("delete"),function(){a.confirm(mxResources.get("areYouSure"),function(){A(z);b.deleteComment(function(){for(var a=B(b).replies,c=0;c<a.length;c++)t.removeChild(a[c]);for(c=0;c<d.length;c++)if(d[c]==b){d.splice(c,1);break}F.style.display=0==t.getElementsByTagName("div").length?"block":"none"},function(b){c(z);a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},b.isResolved));q||0!=l||v(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=B(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]!=c.parentNode&&(k[l].style.display=d);p||(e[g].style.display="none")}r()} -b.isResolved?x(mxResources.get("reOpened")+": ",!0,c,!1,!0):x(mxResources.get("markedAsResolved"),!1,c,!0)});z.appendChild(D);null!=e?t.insertBefore(z,e.nextSibling):t.appendChild(z);for(e=0;null!=b.replies&&e<b.replies.length;e++)D=b.replies[e],D.isResolved=b.isResolved,k(D,b.replies,null,l+1,m);null!=g&&(g.comment.id==b.id?(m=b.content,b.content=g.comment.content,u(b,z,g.saveCallback,g.deleteOnCancel),b.content=m):null==g.comment.id&&g.comment.pCommentId==b.id&&(t.appendChild(g.div),u(g.comment, -g.div,g.saveCallback,g.deleteOnCancel)));return z}}var q=!a.canComment(),n=a.canReplyToReplies(),g=null,x=document.createElement("div");x.className="geCommentsWin";x.style.background="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;var z=EditorUi.compactUi?"26px":"30px",t=document.createElement("div");t.className="geCommentsList";t.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;t.style.bottom=parseInt(z)+7+"px";x.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 v=document.createElement("div");v.className="geToolbarContainer geCommentsToolbar";v.style.height=z;v.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";v.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;mxClient.IS_QUIRKS&&(v.style.filter="none");z=document.createElement("a");z.className="geButton";mxClient.IS_QUIRKS&&(z.style.filter= -"none");if(!q){var D=z.cloneNode();D.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';D.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(D,"click",function(b){function d(){u(e,g,function(b){A(g);a.addComment(b,function(a){b.id=a;C.push(b);f(g)},function(b){c(g);d();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var e=a.newComment("",a.getCurrentUser()),g=k(e,C,null,0);d();b.preventDefault(); -mxEvent.consume(b)});v.appendChild(D)}D=z.cloneNode();D.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';D.setAttribute("title",mxResources.get("showResolved"));var p=!1;"dark"==uiTheme&&(D.style.filter="invert(100%)");mxEvent.addListener(D,"click",function(a){this.className=(p=!p)?"geButton geCheckedBtn":"geButton";K();a.preventDefault();mxEvent.consume(a)});v.appendChild(D);a.commentsRefreshNeeded()&&(D=z.cloneNode(),D.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">', -D.setAttribute("title",mxResources.get("refresh")),"dark"==uiTheme&&(D.style.filter="invert(100%)"),mxEvent.addListener(D,"click",function(a){K();a.preventDefault();mxEvent.consume(a)}),v.appendChild(D));a.commentsSaveNeeded()&&(z=z.cloneNode(),z.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',z.setAttribute("title",mxResources.get("save")),"dark"==uiTheme&&(z.style.filter="invert(100%)"),mxEvent.addListener(z,"click",function(a){m();a.preventDefault();mxEvent.consume(a)}), -v.appendChild(z));x.appendChild(v);var C=[],K=mxUtils.bind(this,function(){this.hasError=!1;if(null!=g){g.div=g.div.cloneNode(!0);var b=g.div.querySelector(".geCommentEditTxtArea"),c=g.div.querySelector(".geCommentEditBtns");g.comment.content=b.value;b.parentNode.removeChild(b);c.parentNode.removeChild(c)}t.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";n=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)});t.innerHTML="";t.appendChild(F);F.style.display="block";C=a;for(a=0;a<C.length;a++)b(C[a].replies),k(C[a],C,null,0,p);null!=g&&null==g.comment.id&&null==g.comment.pCommentId&&(t.appendChild(g.div),u(g.comment,g.div,g.saveCallback, -g.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"))});K();this.refreshComments=K;v=mxUtils.bind(this,function(){function a(b){var d=c[b.id];if(null!=d)for(y(b,d),d=0;null!=b.replies&&d<b.replies.length;d++)a(b.replies[d])}if(this.window.isVisible()){for(var b=t.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(v,6E4);this.refreshCommentsTime=v;this.window=new mxWindow(mxResources.get("comments"),x,b,e,d,l,!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 P=mxUtils.bind(this,function(){var a=this.window.getX(),b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window, -"resize",P);this.destroy=function(){mxEvent.removeListener(window,"resize",P);this.window.destroy()}},ConfirmDialog=function(a,b,e,d,l,m,r,u,y,A){var c=document.createElement("div");c.style.textAlign="center";var f=document.createElement("div");f.style.padding="6px";f.style.overflow="auto";f.style.maxHeight="44px";f.style.lineHeight="1.2em";mxClient.IS_QUIRKS&&(f.style.height="60px");mxUtils.write(f,b);c.appendChild(f);null!=A&&(f=document.createElement("div"),f.style.padding="6px 0 6px 0",b=document.createElement("img"), -b.setAttribute("src",A),f.appendChild(b),c.appendChild(f));A=document.createElement("div");A.style.textAlign="center";A.style.whiteSpace="nowrap";var k=document.createElement("input");k.setAttribute("type","checkbox");m=mxUtils.button(m||mxResources.get("cancel"),function(){a.hideDialog();null!=d&&d(k.checked)});m.className="geBtn";null!=u&&(m.innerHTML=u+"<br>"+m.innerHTML,m.style.paddingBottom="8px",m.style.paddingTop="8px",m.style.height="auto",m.style.width="40%");a.editor.cancelFirst&&A.appendChild(m); -var q=mxUtils.button(l||mxResources.get("ok"),function(){a.hideDialog();null!=e&&e(k.checked)});A.appendChild(q);null!=r?(q.innerHTML=r+"<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||A.appendChild(m);c.appendChild(A);y?(A.style.marginTop="10px",f=document.createElement("p"),f.style.marginTop="20px",f.appendChild(k),l=document.createElement("span"),mxUtils.write(l, -" "+mxResources.get("rememberThisSetting")),f.appendChild(l),c.appendChild(f),mxEvent.addListener(l,"click",function(a){k.checked=!k.checked;mxEvent.consume(a)})):A.style.marginTop="12px";this.init=function(){q.focus()};this.container=c};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")}; +var z=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){this.editUpdateListener&&(this.editor.undoManager.removeListener(this.editUpdateListener),this.editUpdateListener=null);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);z.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,b,d,e,k,l,m){var c=a.editor.graph;if("xml"==d)a.hideDialog(), +a.saveData(b,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("svg"==d)a.hideDialog(),a.saveData(b,"svg",mxUtils.getXml(c.getSvg(e,k,l)),"image/svg+xml");else{var f=a.getFileData(!0,null,null,null,null,!0),g=c.getGraphBounds(),n=Math.floor(g.width*k/c.view.scale),r=Math.floor(g.height*k/c.view.scale);if(f.length<=MAX_REQUEST_SIZE&&n*r<MAX_AREA)if(a.hideDialog(),"png"!=d&&"jpg"!=d&&"jpeg"!=d||!a.isExportToCanvas()){var p={globalVars:c.getExportVariables()};a.saveRequest(b,d,function(a, +b){return new mxXmlRequest(EXPORT_URL,"format="+d+"&base64="+(b||"0")+(null!=a?"&filename="+encodeURIComponent(a):"")+"&extras="+encodeURIComponent(JSON.stringify(p))+(0<m?"&dpi="+m:"")+"&bg="+(null!=e?e:"none")+"&w="+n+"&h="+r+"&border="+l+"&xml="+encodeURIComponent(f))})}else"png"==d?a.exportImage(k,null==e||"none"==e,!0,!1,!1,l,!0,!1,null,null,m):a.exportImage(k,!1,!0,!1,!1,l,!0,!1,"jpeg",null,m);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.updateEditReferences= +function(a){for(var b=0;b<a.changes.length;b++){var c=a.changes[b];if(null!=c&&c.constructor==mxChildChange&&null!=c.child){var d=c.child;if(null!=d.source&&null!=d.source.id){var e=this.getFutureCellForEdit(c.model,a,d.source.id);e!=d.source&&(d.source=e)}null!=d.target&&null!=d.target.id&&(c=this.getFutureCellForEdit(c.model,a,d.target.id),c!=d.target&&(d.target=c))}}};EditorUi.prototype.getFutureCellForEdit=function(a,b,d){var c=a.getCell(d);if(null==c)for(var e=b.changes.length-1;0<=e;e--){var f= +b.changes[e];if(f.constructor==mxChildChange&&null!=f.child&&f.child.id==d){a.contains(f.previous)&&(c=f.child);break}}return c};EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var a=this.editor.graph,b="";if(null!=this.pages)for(var d=0;d<this.pages.length;d++){var e=a;this.currentPage!=this.pages[d]&&(e=this.createTemporaryGraph(a.getStylesheet()),e.model.setRoot(this.pages[d].root));b+=this.pages[d].getName()+" "+e.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 l={};try{var k=mxSettings.getCustomLibraries();for(a=0;a<k.length;a++){var m=k[a];if("R"==m.substring(0,1)){var r=JSON.parse(decodeURIComponent(m.substring(1)));l[r[0]]={id:r[0],title:r[1],downloadUrl:r[2]}}}}catch(E){}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];l[d.id]&& +(b[d.id]=d);var f=this.addCheckbox(e,d.title,l[d.id]);(function(a,c){mxEvent.addListener(c,"change",function(){this.checked?b[a.id]=a:delete b[a.id]})})(d,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)}));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==l[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 l)b[c]||this.closeLibrary(new RemoteLibrary(this,null,l[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}};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];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,d,e,k){var c=!0,f=window.setTimeout(mxUtils.bind(this,function(){c=!1;k({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),g=mxUtils.bind(this,function(){window.clearTimeout(f); +c&&e.apply(this,arguments)});d=d||{};d.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:g,error:k});a=JSON.stringify({event:"remoteInvoke",funtionName:a,functionArgs:b,msgMarkers:d});null!=this.remoteWin?this.remoteWin.postMessage(a,"*"):this.remoteInvokeQueue.push(a)};EditorUi.prototype.handleRemoteInvoke=function(a){var b=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 c=a.funtionName,d=this.remoteInvokableFns[c];if(null!=d&&"function"===typeof this[c]){var e=a.functionArgs;Array.isArray(e)||(e=[]);if(d.isAsync)e.push(function(){b(Array.prototype.slice.apply(arguments))}),e.push(function(a){b(null,a||"Unkown Error")}),this[c].apply(this,e);else{var l=this[c].apply(this,e);b([l])}}else b(null,"Invalid Call: "+c+" is not found.")}catch(x){b(null,"Invalid Call: An error occured, "+x.message)}};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,d){var c=this.getCurrentFile(); +null!=c?c.addComment(a,b,d):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")}})(); +var CommentsWindow=function(a,b,e,d,k,m){function r(){for(var a=t.getElementsByTagName("div"),b=0,c=0;c<a.length;c++)"none"!=a[c].style.display&&a[c].parentNode==t&&b++;E.style.display=0==b?"block":"none"}function u(a,b,c,d){function e(){b.removeChild(k);b.removeChild(m);g.style.display="block";f.style.display="block"}l={div:b,comment:a,saveCallback:c,deleteOnCancel:d};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 m=document.createElement("div");m.className="geCommentEditBtns";var n=mxUtils.button(mxResources.get("cancel"),function(){d?(b.parentNode.removeChild(b),r()):e();l=null});n.className="geCommentEditBtn";m.appendChild(n);var p=mxUtils.button(mxResources.get("save"),function(){f.innerHTML="";a.content=k.value;mxUtils.write(f,a.content);e();c(a);l=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&&(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";k.focus()}function y(b,c){c.innerHTML="";var d=a.timeSince(new Date(b.modifiedDate));null==d&&(d=mxResources.get("lessThanAMinute"));mxUtils.write(c,mxResources.get("timeAgo", +[d],"{1} ago"))}function z(a){var b=document.createElement("img");b.className="geCommentBusyImg";b.src=IMAGE_PATH+"/spin.gif";a.appendChild(b);a.busyImg=b}function c(a){a.style.border="1px solid red";a.removeChild(a.busyImg)}function f(a){a.style.border="";a.removeChild(a.busyImg)}function g(b,d,e,k,m){function v(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)});P.appendChild(e);d&&(e.style.display="none")}function B(){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=A;a(b);return{pdiv:d,replies:c}}function x(d,e,l,m,n){function p(){z(t);b.addReply(v,function(a){v.id=a;b.replies.push(v);f(t);l&&l()},function(b){r();c(t);a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},m,n)}function r(){u(v, +t,function(a){p()},!0)}var q=B().pdiv,v=a.newComment(d,a.getCurrentUser());v.pCommentId=b.id;null==b.replies&&(b.replies=[]);var t=g(v,b.replies,q,k+1);e?r():p()}if(m||!b.isResolved){E.style.display="none";var A=document.createElement("div");A.className="geCommentContainer";A.setAttribute("data-commentId",b.id);A.style.marginLeft=20*k+5+"px";b.isResolved&&"dark"!=uiTheme&&(A.style.backgroundColor="ghostWhite");var D=document.createElement("div");D.className="geCommentHeader";var J=document.createElement("img"); +J.className="geCommentUserImg";J.src=b.user.pictureUrl||Editor.userImage;D.appendChild(J);J=document.createElement("div");J.className="geCommentHeaderTxt";D.appendChild(J);var C=document.createElement("div");C.className="geCommentUsername";mxUtils.write(C,b.user.displayName||"");J.appendChild(C);C=document.createElement("div");C.className="geCommentDate";C.setAttribute("data-commentId",b.id);y(b,C);J.appendChild(C);A.appendChild(D);D=document.createElement("div");D.className="geCommentTxt";mxUtils.write(D, +b.content||"");A.appendChild(D);D=document.createElement("div");D.className="geCommentActions";var P=document.createElement("ul");P.className="geCommentActionsList";D.appendChild(P);q||0!=k&&!n||v(mxResources.get("reply"),function(){x("",!0)},b.isResolved);J=a.getCurrentUser();null==J||J.id!=b.user.id||q||(v(mxResources.get("edit"),function(){function d(){u(b,A,function(){z(A);b.editComment(b.content,function(){f(A)},function(b){c(A);d();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})} +d()},b.isResolved),v(mxResources.get("delete"),function(){a.confirm(mxResources.get("areYouSure"),function(){z(A);b.deleteComment(function(){for(var a=B(b).replies,c=0;c<a.length;c++)t.removeChild(a[c]);for(c=0;c<d.length;c++)if(d[c]==b){d.splice(c,1);break}E.style.display=0==t.getElementsByTagName("div").length?"block":"none"},function(b){c(A);a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},b.isResolved));q||0!=k||v(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=B(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"),k=0;k<l.length;k++)l[k]!=c.parentNode&&(l[k].style.display=d);p||(e[g].style.display="none")}r()} +b.isResolved?x(mxResources.get("reOpened")+": ",!0,c,!1,!0):x(mxResources.get("markedAsResolved"),!1,c,!0)});A.appendChild(D);null!=e?t.insertBefore(A,e.nextSibling):t.appendChild(A);for(e=0;null!=b.replies&&e<b.replies.length;e++)D=b.replies[e],D.isResolved=b.isResolved,g(D,b.replies,null,k+1,m);null!=l&&(l.comment.id==b.id?(m=b.content,b.content=l.comment.content,u(b,A,l.saveCallback,l.deleteOnCancel),b.content=m):null==l.comment.id&&l.comment.pCommentId==b.id&&(t.appendChild(l.div),u(l.comment, +l.div,l.saveCallback,l.deleteOnCancel)));return A}}var q=!a.canComment(),n=a.canReplyToReplies(),l=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 E=document.createElement("span"); +E.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(E,mxResources.get("noCommentsFound"));var v=document.createElement("div");v.className="geToolbarContainer geCommentsToolbar";v.style.height=A;v.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";v.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;mxClient.IS_QUIRKS&&(v.style.filter="none");A=document.createElement("a");A.className="geButton";mxClient.IS_QUIRKS&&(A.style.filter= +"none");if(!q){var D=A.cloneNode();D.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';D.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(D,"click",function(b){function d(){u(e,l,function(b){z(l);a.addComment(b,function(a){b.id=a;C.push(b);f(l)},function(b){c(l);d();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var e=a.newComment("",a.getCurrentUser()),l=g(e,C,null,0);d();b.preventDefault(); +mxEvent.consume(b)});v.appendChild(D)}D=A.cloneNode();D.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';D.setAttribute("title",mxResources.get("showResolved"));var p=!1;"dark"==uiTheme&&(D.style.filter="invert(100%)");mxEvent.addListener(D,"click",function(a){this.className=(p=!p)?"geButton geCheckedBtn":"geButton";K();a.preventDefault();mxEvent.consume(a)});v.appendChild(D);a.commentsRefreshNeeded()&&(D=A.cloneNode(),D.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">', +D.setAttribute("title",mxResources.get("refresh")),"dark"==uiTheme&&(D.style.filter="invert(100%)"),mxEvent.addListener(D,"click",function(a){K();a.preventDefault();mxEvent.consume(a)}),v.appendChild(D));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){m();a.preventDefault();mxEvent.consume(a)}), +v.appendChild(A));x.appendChild(v);var C=[],K=mxUtils.bind(this,function(){this.hasError=!1;if(null!=l){l.div=l.div.cloneNode(!0);var b=l.div.querySelector(".geCommentEditTxtArea"),c=l.div.querySelector(".geCommentEditBtns");l.comment.content=b.value;b.parentNode.removeChild(b);c.parentNode.removeChild(c)}t.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";n=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)});t.innerHTML="";t.appendChild(E);E.style.display="block";C=a;for(a=0;a<C.length;a++)b(C[a].replies),g(C[a],C,null,0,p);null!=l&&null==l.comment.id&&null==l.comment.pCommentId&&(t.appendChild(l.div),u(l.comment,l.div,l.saveCallback, +l.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"))});K();this.refreshComments=K;v=mxUtils.bind(this,function(){function a(b){var d=c[b.id];if(null!=d)for(y(b,d),d=0;null!=b.replies&&d<b.replies.length;d++)a(b.replies[d])}if(this.window.isVisible()){for(var b=t.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(v,6E4);this.refreshCommentsTime=v;this.window=new mxWindow(mxResources.get("comments"),x,b,e,d,k,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));this.window.setLocation=function(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 Y=mxUtils.bind(this,function(){var a=this.window.getX(),b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window, +"resize",Y);this.destroy=function(){mxEvent.removeListener(window,"resize",Y);this.window.destroy()}},ConfirmDialog=function(a,b,e,d,k,m,r,u,y,z){var c=document.createElement("div");c.style.textAlign="center";var f=document.createElement("div");f.style.padding="6px";f.style.overflow="auto";f.style.maxHeight="44px";f.style.lineHeight="1.2em";mxClient.IS_QUIRKS&&(f.style.height="60px");mxUtils.write(f,b);c.appendChild(f);null!=z&&(f=document.createElement("div"),f.style.padding="6px 0 6px 0",b=document.createElement("img"), +b.setAttribute("src",z),f.appendChild(b),c.appendChild(f));z=document.createElement("div");z.style.textAlign="center";z.style.whiteSpace="nowrap";var g=document.createElement("input");g.setAttribute("type","checkbox");m=mxUtils.button(m||mxResources.get("cancel"),function(){a.hideDialog();null!=d&&d(g.checked)});m.className="geBtn";null!=u&&(m.innerHTML=u+"<br>"+m.innerHTML,m.style.paddingBottom="8px",m.style.paddingTop="8px",m.style.height="auto",m.style.width="40%");a.editor.cancelFirst&&z.appendChild(m); +var q=mxUtils.button(k||mxResources.get("ok"),function(){a.hideDialog();null!=e&&e(g.checked)});z.appendChild(q);null!=r?(q.innerHTML=r+"<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||z.appendChild(m);c.appendChild(z);y?(z.style.marginTop="10px",f=document.createElement("p"),f.style.marginTop="20px",f.appendChild(g),k=document.createElement("span"),mxUtils.write(k, +" "+mxResources.get("rememberThisSetting")),f.appendChild(k),c.appendChild(f),mxEvent.addListener(k,"click",function(a){g.checked=!g.checked;mxEvent.consume(a)})):z.style.marginTop="12px";this.init=function(){q.focus()};this.container=c};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")}; DiagramPage.prototype.setName=function(a){null==a?this.node.removeAttribute("name"):this.node.setAttribute("name",a)};function RenamePage(a,b,e){this.ui=a;this.page=b;this.previous=this.name=e}RenamePage.prototype.execute=function(){var a=this.page.getName();this.page.setName(this.previous);this.name=this.previous;this.previous=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))}; function MovePage(a,b,e){this.ui=a;this.oldIndex=b;this.newIndex=e}MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var a=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))}; function SelectPage(a,b,e){this.ui=a;this.previousPage=this.page=b;this.neverShown=!0;null!=b&&(this.neverShown=null==b.viewState,this.ui.updatePageRoot(b),null!=e&&(b.viewState=e,this.neverShown=!1))} SelectPage.prototype.execute=function(){var a=mxUtils.indexOf(this.ui.pages,this.previousPage);if(null!=this.page&&0<=a){var a=this.ui.currentPage,b=this.ui.editor,e=b.graph,d=Graph.compressNode(b.getGraphXml(!0));mxUtils.setTextContent(a.node,d);a.viewState=e.getViewState();a.root=e.model.root;null!=a.model&&a.model.rootChanged(a.root);e.view.clear(a.root,!0);e.clearSelection();this.ui.currentPage=this.previousPage;this.previousPage=a;a=this.ui.currentPage;e.model.prefix=Editor.guid()+"-";e.model.rootChanged(a.root); e.setViewState(a.viewState);e.gridEnabled=e.gridEnabled&&(!this.ui.editor.isChromelessView()||"1"==urlParams.grid);b.updateGraphComponents();e.view.validate();e.blockMathRender=!0;e.sizeDidChange();e.blockMathRender=!1;this.neverShown&&(this.neverShown=!1,e.selectUnlockedLayer());b.graph.fireEvent(new mxEventObject(mxEvent.ROOT));b.fireEvent(new mxEventObject("pageSelected","change",this))}}; -function ChangePage(a,b,e,d,l){SelectPage.call(this,a,e);this.relatedPage=b;this.index=d;this.previousIndex=null;this.noSelect=l}mxUtils.extend(ChangePage,SelectPage); +function ChangePage(a,b,e,d,k){SelectPage.call(this,a,e);this.relatedPage=b;this.index=d;this.previousIndex=null;this.noSelect=k}mxUtils.extend(ChangePage,SelectPage); ChangePage.prototype.execute=function(){this.ui.editor.fireEvent(new mxEventObject("beforePageChange","change",this));this.previousIndex=this.index;if(null==this.index){var a=mxUtils.indexOf(this.ui.pages,this.relatedPage);this.ui.pages.splice(a,1);this.index=a}else this.ui.pages.splice(this.index,0,this.relatedPage),this.index=null;this.noSelect||SelectPage.prototype.execute.apply(this,arguments)};EditorUi.prototype.tabContainerHeight=38; EditorUi.prototype.getSelectedPageIndex=function(){var a=null;if(null!=this.pages&&null!=this.currentPage)for(var b=0;b<this.pages.length;b++)if(this.pages[b]==this.currentPage){a=b;break}return a};EditorUi.prototype.getPageById=function(a){if(null!=this.pages)for(var b=0;b<this.pages.length;b++)if(this.pages[b].getId()==a)return this.pages[b];return null}; EditorUi.prototype.initPages=function(){this.actions.addAction("previousPage",mxUtils.bind(this,function(){this.selectNextPage(!1)}));this.actions.addAction("nextPage",mxUtils.bind(this,function(){this.selectNextPage(!0)}));this.keyHandler.bindAction(33,!0,"previousPage",!0);this.keyHandler.bindAction(34,!0,"nextPage",!0);var a=this.editor.graph,b=a.view.validateBackground;a.view.validateBackground=mxUtils.bind(this,function(){if(null!=this.tabContainer){var d=this.tabContainer.style.height;this.tabContainer.style.height= null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.pages?"0px":this.tabContainerHeight+"px";d!=this.tabContainer.style.height&&this.refresh(!1)}b.apply(a.view,arguments)});var e=null,d=mxUtils.bind(this,function(){this.updateTabContainer();var b=this.currentPage;null!=b&&b!=e&&(null==b.viewState||null==b.viewState.scrollLeft?(this.resetScrollbars(),a.isLightboxView()&&this.lightboxFit(),null!=this.chromelessResize&&(a.container.scrollLeft=0,a.container.scrollTop=0,this.chromelessResize())): (a.container.scrollLeft=a.view.translate.x*a.view.scale+b.viewState.scrollLeft,a.container.scrollTop=a.view.translate.y*a.view.scale+b.viewState.scrollTop),e=b);null!=this.actions.layersWindow&&this.actions.layersWindow.refreshLayers();"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?1!=MathJax.Hub.queue.pending||null==this.editor||this.editor.graph.mathEnabled||MathJax.Hub.Queue(mxUtils.bind(this,function(){null!=this.editor&&this.editor.graph.refresh()})):"undefined"===typeof Editor.MathJaxClear|| -null!=this.editor&&this.editor.graph.mathEnabled||Editor.MathJaxClear()});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){for(var e=b.getProperty("edit").changes,l=0;l<e.length;l++)if(e[l]instanceof SelectPage||e[l]instanceof RenamePage||e[l]instanceof MovePage||e[l]instanceof mxRootChange){d();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)}; +null!=this.editor&&this.editor.graph.mathEnabled||Editor.MathJaxClear()});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){for(var e=b.getProperty("edit").changes,k=0;k<e.length;k++)if(e[k]instanceof SelectPage||e[k]instanceof RenamePage||e[k]instanceof MovePage||e[k]instanceof mxRootChange){d();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)}; EditorUi.prototype.restoreViewState=function(a,b,e){a=null!=a?this.getPageById(a.getId()):null;var d=this.editor.graph;null!=a&&null!=this.currentPage&&null!=this.pages&&(a!=this.currentPage?this.selectPage(a,!0,b):(d.setViewState(b),this.editor.updateGraphComponents(),d.view.revalidate(),d.sizeDidChange()),d.container.scrollLeft=d.view.translate.x*d.view.scale+b.scrollLeft,d.container.scrollTop=d.view.translate.y*d.view.scale+b.scrollTop,d.restoreSelection(e))}; -Graph.prototype.createViewState=function(a){var b=a.getAttribute("page"),e=parseFloat(a.getAttribute("pageScale")),d=parseFloat(a.getAttribute("pageWidth")),l=parseFloat(a.getAttribute("pageHeight")),m=a.getAttribute("background"),r=a.getAttribute("backgroundImage"),r=null!=r&&0<r.length?JSON.parse(r):null;return{gridEnabled:"0"!=a.getAttribute("grid"),gridSize:parseFloat(a.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=a.getAttribute("guides"),foldingEnabled:"0"!=a.getAttribute("fold"), -shadowVisible:"1"==a.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=b?"0"!=b:this.defaultPageVisible,background:null!=m&&0<m.length?m:null,backgroundImage:null!=r?new mxImage(r.src,r.width,r.height):null,pageScale:isNaN(e)?mxGraph.prototype.pageScale:e,pageFormat:isNaN(d)||isNaN(l)?mxSettings.getPageFormat():new mxRectangle(0,0,d,l),tooltips:"0"!=a.getAttribute("tooltips"),connect:"0"!=a.getAttribute("connect"),arrows:"0"!=a.getAttribute("arrows"),mathEnabled:"1"==a.getAttribute("math"), +Graph.prototype.createViewState=function(a){var b=a.getAttribute("page"),e=parseFloat(a.getAttribute("pageScale")),d=parseFloat(a.getAttribute("pageWidth")),k=parseFloat(a.getAttribute("pageHeight")),m=a.getAttribute("background"),r=a.getAttribute("backgroundImage"),r=null!=r&&0<r.length?JSON.parse(r):null;return{gridEnabled:"0"!=a.getAttribute("grid"),gridSize:parseFloat(a.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=a.getAttribute("guides"),foldingEnabled:"0"!=a.getAttribute("fold"), +shadowVisible:"1"==a.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=b?"0"!=b:this.defaultPageVisible,background:null!=m&&0<m.length?m:null,backgroundImage:null!=r?new mxImage(r.src,r.width,r.height):null,pageScale:isNaN(e)?mxGraph.prototype.pageScale:e,pageFormat:isNaN(d)||isNaN(k)?mxSettings.getPageFormat():new mxRectangle(0,0,d,k),tooltips:"0"!=a.getAttribute("tooltips"),connect:"0"!=a.getAttribute("connect"),arrows:"0"!=a.getAttribute("arrows"),mathEnabled:"1"==a.getAttribute("math"), selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1}}; Graph.prototype.saveViewState=function(a,b,e){e||(b.setAttribute("grid",null==a||a.gridEnabled?"1":"0"),b.setAttribute("gridSize",null!=a?a.gridSize:mxGraph.prototype.gridSize),b.setAttribute("guides",null==a||a.guidesEnabled?"1":"0"),b.setAttribute("tooltips",null==a||a.tooltips?"1":"0"),b.setAttribute("connect",null==a||a.connect?"1":"0"),b.setAttribute("arrows",null==a||a.arrows?"1":"0"),b.setAttribute("page",null==a&&this.defaultPageVisible||null!=a&&a.pageVisible?"1":"0"),b.setAttribute("fold", null==a||a.foldingEnabled?"1":"0"));b.setAttribute("pageScale",null!=a&&null!=a.pageScale?a.pageScale:mxGraph.prototype.pageScale);e=null!=a?a.pageFormat:mxSettings.getPageFormat();null!=e&&(b.setAttribute("pageWidth",e.width),b.setAttribute("pageHeight",e.height));null!=a&&null!=a.background&&b.setAttribute("background",a.background);null!=a&&null!=a.backgroundImage&&b.setAttribute("backgroundImage",JSON.stringify(a.backgroundImage));b.setAttribute("math",null!=a&&a.mathEnabled?"1":"0");b.setAttribute("shadow", @@ -3318,17 +3323,17 @@ a.pageFormat,this.view.currentRoot=a.currentRoot,this.defaultParent=a.defaultPar (this.view.currentRoot=null,this.view.scale=1,this.gridEnabled=!0,this.gridSize=mxGraph.prototype.gridSize,this.pageScale=mxGraph.prototype.pageScale,this.pageFormat=mxSettings.getPageFormat(),this.pageVisible=this.defaultPageVisible,this.backgroundImage=this.background=null,this.scrollbars=this.defaultScrollbars,this.foldingEnabled=this.graphHandler.guidesEnabled=!0,this.setShadowVisible(!1,!1),this.defaultParent=null,this.setTooltips(!0),this.setConnectable(!0),this.lastPasteXml=null,this.pasteCounter= 0,this.mathEnabled=!1,this.connectionArrowsEnabled=!0);this.preferPageSize=this.pageBreaksVisible=this.pageVisible;this.fireEvent(new mxEventObject("viewStateChanged","state",a))}; EditorUi.prototype.updatePageRoot=function(a){if(null==a.root){var b=this.editor.extractGraphModel(a.node);if(null!=b){a.graphModelNode=b;a.viewState=this.editor.graph.createViewState(b);var e=new mxCodec(b.ownerDocument);a.root=e.decode(b).root}else a.root=this.editor.graph.model.createRoot()}else null==a.viewState&&(null==a.graphModelNode&&(b=this.editor.extractGraphModel(a.node),null!=b&&(a.graphModelNode=b)),null!=a.graphModelNode&&(a.viewState=this.editor.graph.createViewState(a.graphModelNode))); -return a};EditorUi.prototype.selectPage=function(a,b,e){try{this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);b=null!=b?b:!1;this.editor.graph.isMouseDown=!1;this.editor.graph.reset();var d=this.editor.graph.model.createUndoableEdit();d.ignoreEdit=!0;var l=new SelectPage(this,a,e);l.execute();d.add(l);d.notify();this.editor.graph.tooltipHandler.hide();b||this.editor.graph.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",d))}catch(m){this.handleError(m)}}; +return a};EditorUi.prototype.selectPage=function(a,b,e){try{this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);b=null!=b?b:!1;this.editor.graph.isMouseDown=!1;this.editor.graph.reset();var d=this.editor.graph.model.createUndoableEdit();d.ignoreEdit=!0;var k=new SelectPage(this,a,e);k.execute();d.add(k);d.notify();this.editor.graph.tooltipHandler.hide();b||this.editor.graph.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",d))}catch(m){this.handleError(m)}}; EditorUi.prototype.selectNextPage=function(a){var b=this.currentPage;null!=b&&null!=this.pages&&(b=mxUtils.indexOf(this.pages,b),a?this.selectPage(this.pages[mxUtils.mod(b+1,this.pages.length)]):a||this.selectPage(this.pages[mxUtils.mod(b-1,this.pages.length)]))}; EditorUi.prototype.insertPage=function(a,b){if(this.editor.graph.isEnabled()){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);a=null!=a?a:this.createPage(null,this.createPageId());b=null!=b?b:this.pages.length;var e=new ChangePage(this,a,a,b);this.editor.graph.model.execute(e)}return a};EditorUi.prototype.createPageId=function(){var a;do a=Editor.guid();while(null!=this.getPageById(a));return a}; EditorUi.prototype.createPage=function(a,b){var e=new DiagramPage(this.fileNode.ownerDocument.createElement("diagram"),b);e.setName(null!=a?a:this.createPageName());return e};EditorUi.prototype.createPageName=function(){for(var a={},b=0;b<this.pages.length;b++){var e=this.pages[b].getName();null!=e&&0<e.length&&(a[e]=e)}b=this.pages.length;do e=mxResources.get("pageWithNumber",[++b]);while(null!=a[e]);return e}; -EditorUi.prototype.removePage=function(a){try{var b=this.editor.graph,e=mxUtils.indexOf(this.pages,a);if(b.isEnabled()&&0<=e){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);b.model.beginUpdate();try{var d=this.currentPage;d==a&&1<this.pages.length?(e==this.pages.length-1?e--:e++,d=this.pages[e]):1>=this.pages.length&&(d=this.insertPage(),b.model.execute(new RenamePage(this,d,mxResources.get("pageWithNumber",[1]))));b.model.execute(new ChangePage(this,a,d))}finally{b.model.endUpdate()}}}catch(l){this.handleError(l)}return a}; -EditorUi.prototype.duplicatePage=function(a,b){var e=null;try{var d=this.editor.graph;if(d.isEnabled()){d.isEditing()&&d.stopEditing();var l=a.node.cloneNode(!1);l.removeAttribute("id");e=new DiagramPage(l);e.root=d.cloneCell(d.model.root);e.viewState=d.getViewState();e.viewState.scale=1;e.viewState.scrollLeft=null;e.viewState.scrollTop=null;e.viewState.currentRoot=null;e.viewState.defaultParent=null;e.setName(b);e=this.insertPage(e,mxUtils.indexOf(this.pages,a)+1)}}catch(m){this.handleError(m)}return e}; +EditorUi.prototype.removePage=function(a){try{var b=this.editor.graph,e=mxUtils.indexOf(this.pages,a);if(b.isEnabled()&&0<=e){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);b.model.beginUpdate();try{var d=this.currentPage;d==a&&1<this.pages.length?(e==this.pages.length-1?e--:e++,d=this.pages[e]):1>=this.pages.length&&(d=this.insertPage(),b.model.execute(new RenamePage(this,d,mxResources.get("pageWithNumber",[1]))));b.model.execute(new ChangePage(this,a,d))}finally{b.model.endUpdate()}}}catch(k){this.handleError(k)}return a}; +EditorUi.prototype.duplicatePage=function(a,b){var e=null;try{var d=this.editor.graph;if(d.isEnabled()){d.isEditing()&&d.stopEditing();var k=a.node.cloneNode(!1);k.removeAttribute("id");e=new DiagramPage(k);e.root=d.cloneCell(d.model.root);e.viewState=d.getViewState();e.viewState.scale=1;e.viewState.scrollLeft=null;e.viewState.scrollTop=null;e.viewState.currentRoot=null;e.viewState.defaultParent=null;e.setName(b);e=this.insertPage(e,mxUtils.indexOf(this.pages,a)+1)}}catch(m){this.handleError(m)}return e}; EditorUi.prototype.renamePage=function(a){if(this.editor.graph.isEnabled()){var b=new FilenameDialog(this,a.getName(),mxResources.get("rename"),mxUtils.bind(this,function(b){null!=b&&0<b.length&&this.editor.graph.model.execute(new RenamePage(this,a,b))}),mxResources.get("rename"));this.showDialog(b.container,300,80,!0,!0);b.init()}return a};EditorUi.prototype.movePage=function(a,b){this.editor.graph.model.execute(new MovePage(this,a,b))}; EditorUi.prototype.createTabContainer=function(){var a=document.createElement("div");a.className="geTabContainer";a.style.position="absolute";a.style.whiteSpace="nowrap";a.style.overflow="hidden";a.style.height="0px";return a}; EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var a=this.editor.graph,b=document.createElement("div");b.style.position="relative";b.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";b.style.verticalAlign="top";b.style.height=this.tabContainer.style.height;b.style.whiteSpace="nowrap";b.style.overflow="hidden";b.style.fontSize="13px";b.style.marginLeft="30px";for(var e=this.editor.isChromelessView()?29:59,d=Math.min(140,Math.max(20,(this.tabContainer.clientWidth- -e)/this.pages.length)+1),l=null,m=0;m<this.pages.length;m++)mxUtils.bind(this,function(d,c){this.pages[d]==this.currentPage?(c.className="geActivePage",c.style.backgroundColor="dark"==uiTheme?"#2a2a2a":"#fff"):c.className="geInactivePage";c.setAttribute("draggable","true");mxEvent.addListener(c,"dragstart",mxUtils.bind(this,function(b){a.isEnabled()?(mxClient.IS_FF&&b.dataTransfer.setData("Text","<diagram/>"),l=d):mxEvent.consume(b)}));mxEvent.addListener(c,"dragend",mxUtils.bind(this,function(a){l= -null;a.stopPropagation();a.preventDefault()}));mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(a){null!=l&&(a.dataTransfer.dropEffect="move");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(c,"drop",mxUtils.bind(this,function(a){null!=l&&d!=l&&this.movePage(l,d);a.stopPropagation();a.preventDefault()}));b.appendChild(c)})(m,this.createTabForPage(this.pages[m],d,this.pages[m]!=this.currentPage,m+1));this.tabContainer.innerHTML="";this.tabContainer.appendChild(b);d=this.createPageMenuTab(); +e)/this.pages.length)+1),k=null,m=0;m<this.pages.length;m++)mxUtils.bind(this,function(d,c){this.pages[d]==this.currentPage?(c.className="geActivePage",c.style.backgroundColor="dark"==uiTheme?"#2a2a2a":"#fff"):c.className="geInactivePage";c.setAttribute("draggable","true");mxEvent.addListener(c,"dragstart",mxUtils.bind(this,function(b){a.isEnabled()?(mxClient.IS_FF&&b.dataTransfer.setData("Text","<diagram/>"),k=d):mxEvent.consume(b)}));mxEvent.addListener(c,"dragend",mxUtils.bind(this,function(a){k= +null;a.stopPropagation();a.preventDefault()}));mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(a){null!=k&&(a.dataTransfer.dropEffect="move");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(c,"drop",mxUtils.bind(this,function(a){null!=k&&d!=k&&this.movePage(k,d);a.stopPropagation();a.preventDefault()}));b.appendChild(c)})(m,this.createTabForPage(this.pages[m],d,this.pages[m]!=this.currentPage,m+1));this.tabContainer.innerHTML="";this.tabContainer.appendChild(b);d=this.createPageMenuTab(); this.tabContainer.appendChild(d);d=null;this.isPageInsertTabVisible()&&(d=this.createPageInsertTab(),this.tabContainer.appendChild(d));if(b.clientWidth>this.tabContainer.clientWidth-e){null!=d&&(d.style.position="absolute",d.style.right="0px",b.style.marginRight="30px");var r=this.createControlTab(4," ❮ ");r.style.position="absolute";r.style.right=this.editor.chromeless?"29px":"55px";r.style.fontSize="13pt";this.tabContainer.appendChild(r);var u=this.createControlTab(4," ❯"); u.style.position="absolute";u.style.right=this.editor.chromeless?"0px":"29px";u.style.fontSize="13pt";this.tabContainer.appendChild(u);var y=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));b.style.width=y+"px";mxEvent.addListener(r,"click",mxUtils.bind(this,function(a){b.scrollLeft-=Math.max(20,y-20);mxUtils.setOpacity(r,0<b.scrollLeft?100:50);mxUtils.setOpacity(u,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.consume(a)}));mxUtils.setOpacity(r,0<b.scrollLeft?100: 50);mxUtils.setOpacity(u,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.addListener(u,"click",mxUtils.bind(this,function(a){b.scrollLeft+=Math.max(20,y-20);mxUtils.setOpacity(r,0<b.scrollLeft?100:50);mxUtils.setOpacity(u,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.consume(a)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()}; @@ -3338,67 +3343,67 @@ EditorUi.prototype.createControlTab=function(a,b){var e=this.createTab(!0);e.sty EditorUi.prototype.createPageMenuTab=function(){var a=this.createControlTab(3,'<div class="geSprite geSprite-dots" style="display:inline-block;margin-top:5px;width:21px;height:21px;"></div>');a.setAttribute("title",mxResources.get("pages"));a.style.position="absolute";a.style.marginLeft="0px";a.style.top="0px";a.style.left="1px";mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){this.editor.graph.popupMenuHandler.hideMenu();var b=new mxPopupMenu(mxUtils.bind(this,function(a,b){for(var d= 0;d<this.pages.length;d++)mxUtils.bind(this,function(d){var c=a.addItem(this.pages[d].getName(),null,mxUtils.bind(this,function(){this.selectPage(this.pages[d])}),b);this.pages[d]==this.currentPage&&a.addCheckmark(c,Editor.checkmarkImage)})(d);if(this.editor.graph.isEnabled()){a.addSeparator(b);a.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){this.insertPage()}),b);var e=this.currentPage;null!=e&&(a.addSeparator(b),a.addItem(mxResources.get("delete"),null,mxUtils.bind(this, function(){this.removePage(e)}),b),a.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(e,e.getName())}),b),a.addSeparator(b),a.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(e,mxResources.get("copyOf",[e.getName()]))}),b))}}));b.div.className+=" geMenubarMenu";b.smartSeparators=!0;b.showDisabled=!0;b.autoExpand=!0;b.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(b,arguments);b.destroy()});var d= -mxEvent.getClientX(a),l=mxEvent.getClientY(a);b.popup(d,l,null,a);this.setCurrentMenu(b);mxEvent.consume(a)}));return a};EditorUi.prototype.createPageInsertTab=function(){var a=this.createControlTab(4,'<div class="geSprite geSprite-plus" style="display:inline-block;width:21px;height:21px;"></div>');a.setAttribute("title",mxResources.get("insertPage"));mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){this.insertPage();mxEvent.consume(a)}));return a}; -EditorUi.prototype.createTabForPage=function(a,b,e,d){e=this.createTab(e);var l=a.getName()||mxResources.get("untitled"),m=a.getId();e.setAttribute("title",l+(null!=m?" ("+m+")":"")+" ["+d+"]");mxUtils.write(e,l);e.style.maxWidth=b+"px";e.style.width=b+"px";this.addTabListeners(a,e);42<b&&(e.style.textOverflow="ellipsis");return e}; -EditorUi.prototype.addTabListeners=function(a,b){mxEvent.disableContextMenu(b);var e=this.editor.graph;mxEvent.addListener(b,"dblclick",mxUtils.bind(this,function(b){this.renamePage(a);mxEvent.consume(b)}));var d=!1,l=!1;mxEvent.addGestureListeners(b,mxUtils.bind(this,function(b){d=null!=this.currentMenu;l=a==this.currentPage;e.isMouseDown||l||this.selectPage(a)}),null,mxUtils.bind(this,function(m){if(e.isEnabled()&&!e.isMouseDown&&(mxEvent.isTouchEvent(m)&&l||mxEvent.isPopupTrigger(m))){e.popupMenuHandler.hideMenu(); +mxEvent.getClientX(a),k=mxEvent.getClientY(a);b.popup(d,k,null,a);this.setCurrentMenu(b);mxEvent.consume(a)}));return a};EditorUi.prototype.createPageInsertTab=function(){var a=this.createControlTab(4,'<div class="geSprite geSprite-plus" style="display:inline-block;width:21px;height:21px;"></div>');a.setAttribute("title",mxResources.get("insertPage"));mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){this.insertPage();mxEvent.consume(a)}));return a}; +EditorUi.prototype.createTabForPage=function(a,b,e,d){e=this.createTab(e);var k=a.getName()||mxResources.get("untitled"),m=a.getId();e.setAttribute("title",k+(null!=m?" ("+m+")":"")+" ["+d+"]");mxUtils.write(e,k);e.style.maxWidth=b+"px";e.style.width=b+"px";this.addTabListeners(a,e);42<b&&(e.style.textOverflow="ellipsis");return e}; +EditorUi.prototype.addTabListeners=function(a,b){mxEvent.disableContextMenu(b);var e=this.editor.graph;mxEvent.addListener(b,"dblclick",mxUtils.bind(this,function(b){this.renamePage(a);mxEvent.consume(b)}));var d=!1,k=!1;mxEvent.addGestureListeners(b,mxUtils.bind(this,function(b){d=null!=this.currentMenu;k=a==this.currentPage;e.isMouseDown||k||this.selectPage(a)}),null,mxUtils.bind(this,function(m){if(e.isEnabled()&&!e.isMouseDown&&(mxEvent.isTouchEvent(m)&&k||mxEvent.isPopupTrigger(m))){e.popupMenuHandler.hideMenu(); this.hideCurrentMenu();if(!mxEvent.isTouchEvent(m)||!d){var r=new mxPopupMenu(this.createPageMenu(a));r.div.className+=" geMenubarMenu";r.smartSeparators=!0;r.showDisabled=!0;r.autoExpand=!0;r.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(r,arguments);this.resetCurrentMenu();r.destroy()});var u=mxEvent.getClientX(m),y=mxEvent.getClientY(m);r.popup(u,y,null,m);this.setCurrentMenu(r,b)}mxEvent.consume(m)}}))}; EditorUi.prototype.createPageMenu=function(a,b){return mxUtils.bind(this,function(e,d){e.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,a)+1)}),d);e.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(a)}),d);e.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(a,b)}),d);e.addSeparator(d);e.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(a, mxResources.get("copyOf",[a.getName()]))}),d)})};(function(){var a=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(b){a.apply(this,arguments);this.updateTabContainer()}})();(function(){mxCodecRegistry.getCodec(ChangePageSetup).exclude.push("page")})();(function(){var a=new mxObjectCodec(new MovePage,["ui"]);a.beforeDecode=function(a,e,d){d.ui=a.ui;return e};a.afterDecode=function(a,e,d){a=d.oldIndex;d.oldIndex=d.newIndex;d.newIndex=a;return d};mxCodecRegistry.register(a)})(); (function(){var a=new mxObjectCodec(new RenamePage,["ui","page"]);a.beforeDecode=function(a,e,d){d.ui=a.ui;return e};a.afterDecode=function(a,e,d){a=d.previous;d.previous=d.name;d.name=a;return d};mxCodecRegistry.register(a)})(); -(function(){var a=new mxObjectCodec(new ChangePage,"ui relatedPage index neverShown page previousPage".split(" ")),b="defaultParent currentRoot scrollLeft scrollTop scale translate lastPasteXml pasteCounter".split(" ");a.afterEncode=function(a,d,l){l.setAttribute("relatedPage",d.relatedPage.getId());null==d.index&&(l.setAttribute("name",d.relatedPage.getName()),null!=d.relatedPage.viewState&&l.setAttribute("viewState",JSON.stringify(d.relatedPage.viewState,function(a,d){return 0>mxUtils.indexOf(b, -a)?d:void 0})),null!=d.relatedPage.root&&a.encodeCell(d.relatedPage.root,l));return l};a.beforeDecode=function(a,b,l){l.ui=a.ui;l.relatedPage=l.ui.getPageById(b.getAttribute("relatedPage"));if(null==l.relatedPage){var d=b.ownerDocument.createElement("diagram");d.setAttribute("id",b.getAttribute("relatedPage"));d.setAttribute("name",b.getAttribute("name"));l.relatedPage=new DiagramPage(d);d=b.getAttribute("viewState");null!=d&&(l.relatedPage.viewState=JSON.parse(d),b.removeAttribute("viewState")); -b=b.cloneNode(!0);d=b.firstChild;if(null!=d)for(l.relatedPage.root=a.decodeCell(d,!1),l=d.nextSibling,d.parentNode.removeChild(d),d=l;null!=d;){l=d.nextSibling;if(d.nodeType==mxConstants.NODETYPE_ELEMENT){var e=d.getAttribute("id");null==a.lookup(e)&&a.decodeCell(d)}d.parentNode.removeChild(d);d=l}}return b};a.afterDecode=function(a,b,l){l.index=l.previousIndex;return l};mxCodecRegistry.register(a)})();(function(){var a=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAASFBMVEUAAAAAAAB/f3/9/f319fUfHx/7+/s+Pj69vb0AAAAAAAAAAAAAAAAAAAAAAAAAAAB2dnZ1dXUAAAAAAAAVFRX///8ZGRkGBgbOcI1hAAAAE3RSTlMA+vr9/f38+fb1893Bo00u+/tFvPJUBQAAAIRJREFUGNM0jEcSxCAQAxlydGqD///TNWxZBx1aXVIrWysplbapL3sFxgDq/idXBnHgBPK1nIxwc55vCXl6dRFtrV6svs/A/UjsPcpzA5tqyByD92HqQlMFh45BG6ND1DiKSoPDdm96N77bg5F+wyaEqRGb8ZiOwHQqdg9hehszcLAEIQB2lQ4p/sEpnAAAAABJRU5ErkJggg==":IMAGE_PATH+"/move.png";EditorUi.prototype.altShiftActions[68]= -"selectDescendants";var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(a,d,e,u,y){d=null!=d?d:!1;null==e&&(e=this.getFoldableCells(this.getSelectionCells(),a));this.stopEditing();this.model.beginUpdate();try{for(var l=e.slice(),c=[],f=0;f<e.length;f++){var k=this.view.getState(e[f]),m=null!=k?k.style:this.getCellStyle(e[f]);"1"==mxUtils.getValue(m,"treeFolding","0")&&(this.traverse(e[f],!0,mxUtils.bind(this,function(a,b){null!=b&&c.push(b);a!=e[f]&&c.push(a);return a==e[f]||!this.model.isCollapsed(a)})), -this.model.setCollapsed(e[f],a))}for(f=0;f<c.length;f++)this.model.setVisible(c[f],!a);e=l;e=b.apply(this,arguments)}finally{this.model.endUpdate()}return e};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function b(a){return x.isVertex(a)&&e(a)}function d(a){var b=!1;null!=a&&(b=g.view.getState(a),b="1"==(null!=b?b.style:g.getCellStyle(a)).treeMoving); -return b}function e(a){var b=!1;null!=a&&(a=x.getParent(a),b=g.view.getState(a),b="tree"==(null!=b?b.style:g.getCellStyle(a)).containerType);return b}function u(a){var b=!1;null!=a&&(a=x.getParent(a),b=g.view.getState(a),g.view.getState(a),b=null!=(null!=b?b.style:g.getCellStyle(a)).childLayout);return b}function y(a){a=g.view.getState(a);if(null!=a){var b=g.getIncomingEdges(a.cell);if(0<b.length&&(b=g.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 A(a,b){b=null!=b?b:!0;g.model.beginUpdate();try{var c=g.model.getParent(a),d=g.getIncomingEdges(a),e=g.cloneCells([d[0],a]);g.model.setTerminal(e[0],g.model.getTerminal(d[0],!0),!0);var f=y(a),k=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;g.view.currentRoot!=c&&(e[1].geometry.x-=k.x,e[1].geometry.y-=k.y);var l=g.view.getState(a),m=g.view.scale;if(null!=l){var n=mxRectangle.fromRectangle(l);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=g.getOutgoingEdges(g.model.getTerminal(d[0], -!0));if(null!=p){for(var r=f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH,q=k=d=0;q<p.length;q++){var v=g.model.getTerminal(p[q],!1);if(f==y(v)){var u=g.view.getState(v);v!=a&&null!=u&&(r&&b!=u.getCenterX()<l.getCenterX()||!r&&b!=u.getCenterY()<l.getCenterY())&&mxUtils.intersects(n,u)&&(d=10+Math.max(d,(Math.min(n.x+n.width,u.x+u.width)-Math.max(n.x,u.x))/m),k=10+Math.max(k,(Math.min(n.y+n.height,u.y+u.height)-Math.max(n.y,u.y))/m))}}r?k=0:d=0;for(q=0;q<p.length;q++)if(v=g.model.getTerminal(p[q], -!1),f==y(v)&&(u=g.view.getState(v),v!=a&&null!=u&&(r&&b!=u.getCenterX()<l.getCenterX()||!r&&b!=u.getCenterY()<l.getCenterY()))){var t=[];g.traverse(u.cell,!0,function(a,b){null!=b&&t.push(b);t.push(a);return!0});g.moveCells(t,(b?1:-1)*d,(b?1:-1)*k)}}}return g.addCells(e,c)}finally{g.model.endUpdate()}}function c(a){g.model.beginUpdate();try{var b=y(a),c=g.getIncomingEdges(a),d=g.cloneCells([c[0],a]);g.model.setTerminal(c[0],d[1],!1);g.model.setTerminal(d[0],d[1],!0);g.model.setTerminal(d[0],a,!1); -var e=g.model.getParent(a),f=e.geometry,k=[];g.view.currentRoot!=e&&(d[1].geometry.x-=f.x,d[1].geometry.y-=f.y);g.traverse(a,!0,function(a,b){null!=b&&k.push(b);k.push(a);return!0});var l=a.geometry.width+40,m=a.geometry.height+40;b==mxConstants.DIRECTION_SOUTH?l=0:b==mxConstants.DIRECTION_NORTH?(l=0,m=-m):b==mxConstants.DIRECTION_WEST?(l=-l,m=0):b==mxConstants.DIRECTION_EAST&&(m=0);g.moveCells(k,l,m);return g.addCells(d,e)}finally{g.model.endUpdate()}}function f(a){g.model.beginUpdate();try{var b= -g.model.getParent(a),c=g.getIncomingEdges(a),d=g.cloneCells([c[0],a]);g.model.setTerminal(d[0],a,!0);var c=g.getOutgoingEdges(a),e=b.geometry,f=[];g.view.currentRoot==b&&(e=new mxRectangle);for(var k=0;k<c.length;k++){var l=g.model.getTerminal(c[k],!1);null!=l&&f.push(l)}var m=g.view.getBounds(f),n=y(a),p=g.view.translate,r=g.view.scale;n==mxConstants.DIRECTION_SOUTH?(d[1].geometry.x=null==m?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(m.x+m.width)/r-p.x-e.x+10,d[1].geometry.y+=d[1].geometry.height- -e.y+40):n==mxConstants.DIRECTION_NORTH?(d[1].geometry.x=null==m?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(m.x+m.width)/r-p.x+-e.x+10,d[1].geometry.y-=d[1].geometry.height+e.y+40):(d[1].geometry.x=n==mxConstants.DIRECTION_WEST?d[1].geometry.x-(d[1].geometry.width+e.x+40):d[1].geometry.x+(d[1].geometry.width-e.x+40),d[1].geometry.y=null==m?a.geometry.y+(a.geometry.height-d[1].geometry.height)/2:(m.y+m.height)/r-p.y+-e.y+10);return g.addCells(d,b)}finally{g.model.endUpdate()}}function k(a, -b,c){a=g.getOutgoingEdges(a);c=g.view.getState(c);var d=[];if(null!=c&&null!=a){for(var e=0;e<a.length;e++){var f=g.view.getState(g.model.getTerminal(a[e],!1));null!=f&&(!b&&Math.min(f.x+f.width,c.x+c.width)>=Math.max(f.x,c.x)||b&&Math.min(f.y+f.height,c.y+c.height)>=Math.max(f.y,c.y))&&d.push(f)}d.sort(function(a,c){return b?a.x+a.width-c.x-c.width:a.y+a.height-c.y-c.height})}return d}function q(a,b){var c=y(a),d=b==mxConstants.DIRECTION_EAST||b==mxConstants.DIRECTION_WEST;(c==mxConstants.DIRECTION_EAST|| -c==mxConstants.DIRECTION_WEST)==d&&c!=b?n.actions.get("selectParent").funct():c==b?(d=g.getOutgoingEdges(a),null!=d&&0<d.length&&g.setSelectionCell(g.model.getTerminal(d[0],!1))):(c=g.getIncomingEdges(a),null!=c&&0<c.length&&(d=k(g.model.getTerminal(c[0],!0),d,a),c=g.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&&g.setSelectionCell(d[c].cell)))))}var n=this,g=n.editor.graph,x=g.getModel(),z=n.menus.createPopupMenu; -n.menus.createPopupMenu=function(a,c,d){z.apply(this,arguments);if(1==g.getSelectionCount()){c=g.getSelectionCell();var e=g.getOutgoingEdges(c);a.addSeparator();null!=e&&0<e.length&&(b(g.getSelectionCell())&&this.addMenuItems(a,["selectChildren"],null,d),this.addMenuItems(a,["selectDescendants"],null,d));b(g.getSelectionCell())&&(a.addSeparator(),0<g.getIncomingEdges(c).length&&this.addMenuItems(a,["selectSiblings","selectParent"],null,d))}};n.actions.addAction("selectChildren",function(){if(g.isEnabled()&& -1==g.getSelectionCount()){var a=g.getSelectionCell(),a=g.getOutgoingEdges(a);if(null!=a){for(var b=[],c=0;c<a.length;c++)b.push(g.model.getTerminal(a[c],!1));g.setSelectionCells(b)}}},null,null,"Alt+Shift+X");n.actions.addAction("selectSiblings",function(){if(g.isEnabled()&&1==g.getSelectionCount()){var a=g.getSelectionCell(),a=g.getIncomingEdges(a);if(null!=a&&0<a.length&&(a=g.getOutgoingEdges(g.model.getTerminal(a[0],!0)),null!=a)){for(var b=[],c=0;c<a.length;c++)b.push(g.model.getTerminal(a[c], -!1));g.setSelectionCells(b)}}},null,null,"Alt+Shift+S");n.actions.addAction("selectParent",function(){if(g.isEnabled()&&1==g.getSelectionCount()){var a=g.getSelectionCell(),a=g.getIncomingEdges(a);null!=a&&0<a.length&&g.setSelectionCell(g.model.getTerminal(a[0],!0))}},null,null,"Alt+Shift+P");n.actions.addAction("selectDescendants",function(){if(g.isEnabled()&&1==g.getSelectionCount()){var a=g.getSelectionCell(),b=[];g.traverse(a,!0,function(a,c){null!=c&&b.push(c);b.push(a);return!0});g.setSelectionCells(b)}}, -null,null,"Alt+Shift+D");var t=g.removeCells;g.removeCells=function(a,c){c=null!=c?c:!0;null==a&&(a=this.getDeletableCells(this.getSelectionCells()));c&&(a=this.getDeletableCells(this.addAllEdges(a)));for(var d=[],f=0;f<a.length;f++){var k=a[f];x.isEdge(k)&&e(k)&&(d.push(k),k=x.getTerminal(k,!1));b(k)?(g.traverse(k,!0,function(a,b){null!=b&&d.push(b);d.push(a);return!0}),k=g.getIncomingEdges(a[f]),a=a.concat(k)):d.push(a[f])}a=d;return t.apply(this,arguments)};n.hoverIcons.getStateAt=function(a,c, -d){return b(a.cell)?null:this.graph.view.getState(this.graph.getCellAt(c,d))};var F=g.duplicateCells;g.duplicateCells=function(a,c){a=null!=a?a:this.getSelectionCells();for(var d=a.slice(0),e=0;e<d.length;e++){var f=g.view.getState(d[e]);if(null!=f&&b(f.cell))for(var k=g.getIncomingEdges(f.cell),f=0;f<k.length;f++)mxUtils.remove(k[f],a)}this.model.beginUpdate();try{var l=F.call(this,a,c);if(l.length==a.length)for(e=0;e<a.length;e++)if(b(a[e])){var m=g.getIncomingEdges(l[e]),k=g.getIncomingEdges(a[e]); -if(0==m.length&&0<k.length){var n=this.cloneCell(k[0]);this.addEdge(n,g.getDefaultParent(),this.model.getTerminal(k[0],!0),l[e])}}}finally{this.model.endUpdate()}return l};var v=g.moveCells;g.moveCells=function(a,c,d,e,f,k,l){var m=null;this.model.beginUpdate();try{var n=f,p=this.view.getState(f),r=null!=p?p.style:this.getCellStyle(f);if(null!=a&&b(f)&&"1"==mxUtils.getValue(r,"treeFolding","0")){for(var q=0;q<a.length;q++)if(b(a[q])||g.model.isEdge(a[q])&&null==g.model.getTerminal(a[q],!0)){f=g.model.getParent(a[q]); -break}if(null!=n&&f!=n&&null!=this.view.getState(a[0])){var u=g.getIncomingEdges(a[0]);if(0<u.length){var t=g.view.getState(g.model.getTerminal(u[0],!0));if(null!=t){var x=g.view.getState(n);null!=x&&(c=(x.getCenterX()-t.getCenterX())/g.view.scale,d=(x.getCenterY()-t.getCenterY())/g.view.scale)}}}}m=v.apply(this,arguments);if(null!=m&&null!=a&&m.length==a.length)for(q=0;q<m.length;q++)if(this.model.isEdge(m[q]))b(n)&&0>mxUtils.indexOf(m,this.model.getTerminal(m[q],!0))&&this.model.setTerminal(m[q], -n,!0);else if(b(a[q])&&(u=g.getIncomingEdges(a[q]),0<u.length))if(!e)b(n)&&0>mxUtils.indexOf(a,this.model.getTerminal(u[0],!0))&&this.model.setTerminal(u[0],n,!0);else if(0==g.getIncomingEdges(m[q]).length){p=n;if(null==p||p==g.model.getParent(a[q]))p=g.model.getTerminal(u[0],!0);e=this.cloneCell(u[0]);this.addEdge(e,g.getDefaultParent(),p,m[q])}}finally{this.model.endUpdate()}return m};if(null!=n.sidebar){var D=n.sidebar.dropAndConnect;n.sidebar.dropAndConnect=function(a,c,d,e){var f=g.model,k=null; -f.beginUpdate();try{if(k=D.apply(this,arguments),b(a))for(var l=0;l<k.length;l++)if(f.isEdge(k[l])&&null==f.getTerminal(k[l],!0)){f.setTerminal(k[l],a,!0);var m=g.getCellGeometry(k[l]);m.points=null;null!=m.getTerminalPoint(!0)&&m.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return k}}var p={88:n.actions.get("selectChildren"),84:n.actions.get("selectSubtree"),80:n.actions.get("selectParent"),83:n.actions.get("selectSiblings")},C=n.onKeyDown;n.onKeyDown=function(a){try{if(g.isEnabled()&&!g.isEditing()&& -b(g.getSelectionCell())&&1==g.getSelectionCount()){var d=null;0<g.getIncomingEdges(g.getSelectionCell()).length&&(9==a.which?d=mxEvent.isShiftDown(a)?c(g.getSelectionCell()):f(g.getSelectionCell()):13==a.which&&(d=A(g.getSelectionCell(),!mxEvent.isShiftDown(a))));if(null!=d&&0<d.length)1==d.length&&g.model.isEdge(d[0])?g.setSelectionCell(g.model.getTerminal(d[0],!1)):g.setSelectionCell(d[d.length-1]),null!=n.hoverIcons&&n.hoverIcons.update(g.view.getState(g.getSelectionCell())),g.startEditingAtCell(g.getSelectionCell()), -mxEvent.consume(a);else if(mxEvent.isAltDown(a)&&mxEvent.isShiftDown(a)){var e=p[a.keyCode];null!=e&&(e.funct(a),mxEvent.consume(a))}else 37==a.keyCode?(q(g.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(a)):38==a.keyCode?(q(g.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(a)):39==a.keyCode?(q(g.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(a)):40==a.keyCode&&(q(g.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(a))}}catch(S){console.log("error", -S)}mxEvent.isConsumed(a)||C.apply(this,arguments)};var K=g.connectVertex;g.connectVertex=function(a,d,e,k,l,m){var n=g.getIncomingEdges(a);return b(a)&&0<n.length?(e=y(a),k=e==mxConstants.DIRECTION_EAST||e==mxConstants.DIRECTION_WEST,l=d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST,e==d?f(a):k==l?c(a):A(a,d!=mxConstants.DIRECTION_NORTH&&d!=mxConstants.DIRECTION_WEST)):K.call(this,a,d,e,k,l,m)};g.getSubtree=function(a){var c=[a];!d(a)&&!b(a)||u(a)||g.traverse(a,!0,function(a,b){null!= -b&&0>mxUtils.indexOf(c,b)&&c.push(b);0>mxUtils.indexOf(c,a)&&c.push(a);return!0});return c};var P=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){P.apply(this,arguments);(d(this.state.cell)||b(this.state.cell))&&0<this.graph.getOutgoingEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(a),this.moveHandle.setAttribute("title","Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="18px", +(function(){var a=new mxObjectCodec(new ChangePage,"ui relatedPage index neverShown page previousPage".split(" ")),b="defaultParent currentRoot scrollLeft scrollTop scale translate lastPasteXml pasteCounter".split(" ");a.afterEncode=function(a,d,k){k.setAttribute("relatedPage",d.relatedPage.getId());null==d.index&&(k.setAttribute("name",d.relatedPage.getName()),null!=d.relatedPage.viewState&&k.setAttribute("viewState",JSON.stringify(d.relatedPage.viewState,function(a,d){return 0>mxUtils.indexOf(b, +a)?d:void 0})),null!=d.relatedPage.root&&a.encodeCell(d.relatedPage.root,k));return k};a.beforeDecode=function(a,b,k){k.ui=a.ui;k.relatedPage=k.ui.getPageById(b.getAttribute("relatedPage"));if(null==k.relatedPage){var d=b.ownerDocument.createElement("diagram");d.setAttribute("id",b.getAttribute("relatedPage"));d.setAttribute("name",b.getAttribute("name"));k.relatedPage=new DiagramPage(d);d=b.getAttribute("viewState");null!=d&&(k.relatedPage.viewState=JSON.parse(d),b.removeAttribute("viewState")); +b=b.cloneNode(!0);d=b.firstChild;if(null!=d)for(k.relatedPage.root=a.decodeCell(d,!1),k=d.nextSibling,d.parentNode.removeChild(d),d=k;null!=d;){k=d.nextSibling;if(d.nodeType==mxConstants.NODETYPE_ELEMENT){var e=d.getAttribute("id");null==a.lookup(e)&&a.decodeCell(d)}d.parentNode.removeChild(d);d=k}}return b};a.afterDecode=function(a,b,k){k.index=k.previousIndex;return k};mxCodecRegistry.register(a)})();(function(){var a=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAASFBMVEUAAAAAAAB/f3/9/f319fUfHx/7+/s+Pj69vb0AAAAAAAAAAAAAAAAAAAAAAAAAAAB2dnZ1dXUAAAAAAAAVFRX///8ZGRkGBgbOcI1hAAAAE3RSTlMA+vr9/f38+fb1893Bo00u+/tFvPJUBQAAAIRJREFUGNM0jEcSxCAQAxlydGqD///TNWxZBx1aXVIrWysplbapL3sFxgDq/idXBnHgBPK1nIxwc55vCXl6dRFtrV6svs/A/UjsPcpzA5tqyByD92HqQlMFh45BG6ND1DiKSoPDdm96N77bg5F+wyaEqRGb8ZiOwHQqdg9hehszcLAEIQB2lQ4p/sEpnAAAAABJRU5ErkJggg==":IMAGE_PATH+"/move.png";EditorUi.prototype.altShiftActions[68]= +"selectDescendants";var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(a,d,e,u,y){d=null!=d?d:!1;null==e&&(e=this.getFoldableCells(this.getSelectionCells(),a));this.stopEditing();this.model.beginUpdate();try{for(var k=e.slice(),c=[],f=0;f<e.length;f++){var g=this.view.getState(e[f]),m=null!=g?g.style:this.getCellStyle(e[f]);"1"==mxUtils.getValue(m,"treeFolding","0")&&(this.traverse(e[f],!0,mxUtils.bind(this,function(a,b){null!=b&&c.push(b);a!=e[f]&&c.push(a);return a==e[f]||!this.model.isCollapsed(a)})), +this.model.setCollapsed(e[f],a))}for(f=0;f<c.length;f++)this.model.setVisible(c[f],!a);e=k;e=b.apply(this,arguments)}finally{this.model.endUpdate()}return e};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function b(a){return x.isVertex(a)&&e(a)}function d(a){var b=!1;null!=a&&(b=l.view.getState(a),b="1"==(null!=b?b.style:l.getCellStyle(a)).treeMoving); +return b}function e(a){var b=!1;null!=a&&(a=x.getParent(a),b=l.view.getState(a),b="tree"==(null!=b?b.style:l.getCellStyle(a)).containerType);return b}function u(a){var b=!1;null!=a&&(a=x.getParent(a),b=l.view.getState(a),l.view.getState(a),b=null!=(null!=b?b.style:l.getCellStyle(a)).childLayout);return b}function y(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 z(a,b){b=null!=b?b:!0;l.model.beginUpdate();try{var c=l.model.getParent(a),d=l.getIncomingEdges(a),e=l.cloneCells([d[0],a]);l.model.setTerminal(e[0],l.model.getTerminal(d[0],!0),!0);var f=y(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;l.view.currentRoot!=c&&(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(d[0], +!0));if(null!=p){for(var r=f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH,q=g=d=0;q<p.length;q++){var v=l.model.getTerminal(p[q],!1);if(f==y(v)){var u=l.view.getState(v);v!=a&&null!=u&&(r&&b!=u.getCenterX()<k.getCenterX()||!r&&b!=u.getCenterY()<k.getCenterY())&&mxUtils.intersects(n,u)&&(d=10+Math.max(d,(Math.min(n.x+n.width,u.x+u.width)-Math.max(n.x,u.x))/m),g=10+Math.max(g,(Math.min(n.y+n.height,u.y+u.height)-Math.max(n.y,u.y))/m))}}r?g=0:d=0;for(q=0;q<p.length;q++)if(v=l.model.getTerminal(p[q], +!1),f==y(v)&&(u=l.view.getState(v),v!=a&&null!=u&&(r&&b!=u.getCenterX()<k.getCenterX()||!r&&b!=u.getCenterY()<k.getCenterY()))){var t=[];l.traverse(u.cell,!0,function(a,b){null!=b&&t.push(b);t.push(a);return!0});l.moveCells(t,(b?1:-1)*d,(b?1:-1)*g)}}}return l.addCells(e,c)}finally{l.model.endUpdate()}}function c(a){l.model.beginUpdate();try{var b=y(a),c=l.getIncomingEdges(a),d=l.cloneCells([c[0],a]);l.model.setTerminal(c[0],d[1],!1);l.model.setTerminal(d[0],d[1],!0);l.model.setTerminal(d[0],a,!1); +var e=l.model.getParent(a),f=e.geometry,g=[];l.view.currentRoot!=e&&(d[1].geometry.x-=f.x,d[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(d,e)}finally{l.model.endUpdate()}}function f(a){l.model.beginUpdate();try{var b= +l.model.getParent(a),c=l.getIncomingEdges(a),d=l.cloneCells([c[0],a]);l.model.setTerminal(d[0],a,!0);var c=l.getOutgoingEdges(a),e=b.geometry,f=[];l.view.currentRoot==b&&(e=new mxRectangle);for(var g=0;g<c.length;g++){var k=l.model.getTerminal(c[g],!1);null!=k&&f.push(k)}var m=l.view.getBounds(f),n=y(a),p=l.view.translate,r=l.view.scale;n==mxConstants.DIRECTION_SOUTH?(d[1].geometry.x=null==m?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(m.x+m.width)/r-p.x-e.x+10,d[1].geometry.y+=d[1].geometry.height- +e.y+40):n==mxConstants.DIRECTION_NORTH?(d[1].geometry.x=null==m?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(m.x+m.width)/r-p.x+-e.x+10,d[1].geometry.y-=d[1].geometry.height+e.y+40):(d[1].geometry.x=n==mxConstants.DIRECTION_WEST?d[1].geometry.x-(d[1].geometry.width+e.x+40):d[1].geometry.x+(d[1].geometry.width-e.x+40),d[1].geometry.y=null==m?a.geometry.y+(a.geometry.height-d[1].geometry.height)/2:(m.y+m.height)/r-p.y+-e.y+10);return l.addCells(d,b)}finally{l.model.endUpdate()}}function g(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 q(a,b){var c=y(a),d=b==mxConstants.DIRECTION_EAST||b==mxConstants.DIRECTION_WEST;(c==mxConstants.DIRECTION_EAST|| +c==mxConstants.DIRECTION_WEST)==d&&c!=b?n.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=g(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 n=this,l=n.editor.graph,x=l.getModel(),A=n.menus.createPopupMenu; +n.menus.createPopupMenu=function(a,c,d){A.apply(this,arguments);if(1==l.getSelectionCount()){c=l.getSelectionCell();var e=l.getOutgoingEdges(c);a.addSeparator();null!=e&&0<e.length&&(b(l.getSelectionCell())&&this.addMenuItems(a,["selectChildren"],null,d),this.addMenuItems(a,["selectDescendants"],null,d));b(l.getSelectionCell())&&(a.addSeparator(),0<l.getIncomingEdges(c).length&&this.addMenuItems(a,["selectSiblings","selectParent"],null,d))}};n.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");n.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");n.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");n.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 t=l.removeCells;l.removeCells=function(a,c){c=null!=c?c:!0;null==a&&(a=this.getDeletableCells(this.getSelectionCells()));c&&(a=this.getDeletableCells(this.addAllEdges(a)));for(var d=[],f=0;f<a.length;f++){var g=a[f];x.isEdge(g)&&e(g)&&(d.push(g),g=x.getTerminal(g,!1));b(g)?(l.traverse(g,!0,function(a,b){null!=b&&d.push(b);d.push(a);return!0}),g=l.getIncomingEdges(a[f]),a=a.concat(g)):d.push(a[f])}a=d;return t.apply(this,arguments)};n.hoverIcons.getStateAt=function(a,c, +d){return b(a.cell)?null:this.graph.view.getState(this.graph.getCellAt(c,d))};var E=l.duplicateCells;l.duplicateCells=function(a,c){a=null!=a?a:this.getSelectionCells();for(var d=a.slice(0),e=0;e<d.length;e++){var f=l.view.getState(d[e]);if(null!=f&&b(f.cell))for(var g=l.getIncomingEdges(f.cell),f=0;f<g.length;f++)mxUtils.remove(g[f],a)}this.model.beginUpdate();try{var k=E.call(this,a,c);if(k.length==a.length)for(e=0;e<a.length;e++)if(b(a[e])){var m=l.getIncomingEdges(k[e]),g=l.getIncomingEdges(a[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 v=l.moveCells;l.moveCells=function(a,c,d,e,f,g,k){var m=null;this.model.beginUpdate();try{var n=f,p=this.view.getState(f),r=null!=p?p.style:this.getCellStyle(f);if(null!=a&&b(f)&&"1"==mxUtils.getValue(r,"treeFolding","0")){for(var q=0;q<a.length;q++)if(b(a[q])||l.model.isEdge(a[q])&&null==l.model.getTerminal(a[q],!0)){f=l.model.getParent(a[q]); +break}if(null!=n&&f!=n&&null!=this.view.getState(a[0])){var u=l.getIncomingEdges(a[0]);if(0<u.length){var t=l.view.getState(l.model.getTerminal(u[0],!0));if(null!=t){var x=l.view.getState(n);null!=x&&(c=(x.getCenterX()-t.getCenterX())/l.view.scale,d=(x.getCenterY()-t.getCenterY())/l.view.scale)}}}}m=v.apply(this,arguments);if(null!=m&&null!=a&&m.length==a.length)for(q=0;q<m.length;q++)if(this.model.isEdge(m[q]))b(n)&&0>mxUtils.indexOf(m,this.model.getTerminal(m[q],!0))&&this.model.setTerminal(m[q], +n,!0);else if(b(a[q])&&(u=l.getIncomingEdges(a[q]),0<u.length))if(!e)b(n)&&0>mxUtils.indexOf(a,this.model.getTerminal(u[0],!0))&&this.model.setTerminal(u[0],n,!0);else if(0==l.getIncomingEdges(m[q]).length){p=n;if(null==p||p==l.model.getParent(a[q]))p=l.model.getTerminal(u[0],!0);e=this.cloneCell(u[0]);this.addEdge(e,l.getDefaultParent(),p,m[q])}}finally{this.model.endUpdate()}return m};if(null!=n.sidebar){var D=n.sidebar.dropAndConnect;n.sidebar.dropAndConnect=function(a,c,d,e){var f=l.model,g=null; +f.beginUpdate();try{if(g=D.apply(this,arguments),b(a))for(var k=0;k<g.length;k++)if(f.isEdge(g[k])&&null==f.getTerminal(g[k],!0)){f.setTerminal(g[k],a,!0);var m=l.getCellGeometry(g[k]);m.points=null;null!=m.getTerminalPoint(!0)&&m.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return g}}var p={88:n.actions.get("selectChildren"),84:n.actions.get("selectSubtree"),80:n.actions.get("selectParent"),83:n.actions.get("selectSiblings")},C=n.onKeyDown;n.onKeyDown=function(a){try{if(l.isEnabled()&&!l.isEditing()&& +b(l.getSelectionCell())&&1==l.getSelectionCount()){var d=null;0<l.getIncomingEdges(l.getSelectionCell()).length&&(9==a.which?d=mxEvent.isShiftDown(a)?c(l.getSelectionCell()):f(l.getSelectionCell()):13==a.which&&(d=z(l.getSelectionCell(),!mxEvent.isShiftDown(a))));if(null!=d&&0<d.length)1==d.length&&l.model.isEdge(d[0])?l.setSelectionCell(l.model.getTerminal(d[0],!1)):l.setSelectionCell(d[d.length-1]),null!=n.hoverIcons&&n.hoverIcons.update(l.view.getState(l.getSelectionCell())),l.startEditingAtCell(l.getSelectionCell()), +mxEvent.consume(a);else if(mxEvent.isAltDown(a)&&mxEvent.isShiftDown(a)){var e=p[a.keyCode];null!=e&&(e.funct(a),mxEvent.consume(a))}else 37==a.keyCode?(q(l.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(a)):38==a.keyCode?(q(l.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(a)):39==a.keyCode?(q(l.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(a)):40==a.keyCode&&(q(l.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(a))}}catch(S){console.log("error", +S)}mxEvent.isConsumed(a)||C.apply(this,arguments)};var K=l.connectVertex;l.connectVertex=function(a,d,e,g,k,m){var n=l.getIncomingEdges(a);return b(a)&&0<n.length?(e=y(a),g=e==mxConstants.DIRECTION_EAST||e==mxConstants.DIRECTION_WEST,k=d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST,e==d?f(a):g==k?c(a):z(a,d!=mxConstants.DIRECTION_NORTH&&d!=mxConstants.DIRECTION_WEST)):K.call(this,a,d,e,g,k,m)};l.getSubtree=function(a){var c=[a];!d(a)&&!b(a)||u(a)||l.traverse(a,!0,function(a,b){null!= +b&&0>mxUtils.indexOf(c,b)&&c.push(b);0>mxUtils.indexOf(c,a)&&c.push(a);return!0});return c};var Y=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){Y.apply(this,arguments);(d(this.state.cell)||b(this.state.cell))&&0<this.graph.getOutgoingEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(a),this.moveHandle.setAttribute("title","Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="18px", this.moveHandle.style.height="18px",this.graph.container.appendChild(this.moveHandle),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(a){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(a),mxEvent.getClientY(a));this.graph.graphHandler.cells=this.graph.getSubtree(this.state.cell);this.graph.graphHandler.bounds=this.state.view.getBounds(this.graph.graphHandler.cells);this.graph.graphHandler.pBounds=this.graph.graphHandler.getPreviewBounds(this.graph.graphHandler.cells); -this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(a);this.graph.isMouseDown=!0;mxEvent.consume(a)})))};var G=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){G.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var M=mxVertexHandler.prototype.destroy; -mxVertexHandler.prototype.destroy=function(a,b){M.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var d=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var a=d.apply(this,arguments),b=this.graph;return a.concat([this.addEntry("tree container",function(){var a=new mxCell("Tree Container",new mxGeometry(0,0,220,160),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;"); +this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(a);this.graph.isMouseDown=!0;mxEvent.consume(a)})))};var 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 O=mxVertexHandler.prototype.destroy; +mxVertexHandler.prototype.destroy=function(a,b){O.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var d=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var a=d.apply(this,arguments),b=this.graph;return a.concat([this.addEntry("tree container",function(){var a=new mxCell("Tree Container",new mxGeometry(0,0,220,160),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;"); a.vertex=!0;return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap central idea branch topic",function(){var a=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");a.vertex=!0;var b=new mxCell("Central Idea",new mxGeometry(160,60,100,40),"ellipse;whiteSpace=wrap;html=1;align=center;container=1;recursiveResize=0;treeFolding=1;treeMoving=1;");b.vertex=!0;var d=new mxCell("Topic", new mxGeometry(320,40,80,20),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;");d.vertex=!0;var e=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");e.geometry.relative=!0;e.edge=!0;b.insertEdge(e,!0);d.insertEdge(e,!1);var c=new mxCell("Branch",new mxGeometry(320,80,72,26),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;"); -c.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");f.geometry.relative=!0;f.edge=!0;b.insertEdge(f,!0);c.insertEdge(f,!1);var k=new mxCell("Topic",new mxGeometry(20,40,80,20),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;");k.vertex=!0;var l=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;"); -l.geometry.relative=!0;l.edge=!0;b.insertEdge(l,!0);k.insertEdge(l,!1);var m=new mxCell("Branch",new mxGeometry(20,80,72,26),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;");m.vertex=!0;var g=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;"); -g.geometry.relative=!0;g.edge=!0;b.insertEdge(g,!0);m.insertEdge(g,!1);a.insert(e);a.insert(f);a.insert(l);a.insert(g);a.insert(b);a.insert(d);a.insert(c);a.insert(k);a.insert(m);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap central idea",function(){var a=new mxCell("Central Idea",new mxGeometry(0,0,100,40),"ellipse;whiteSpace=wrap;html=1;align=center;container=1;recursiveResize=0;treeFolding=1;treeMoving=1;");a.vertex=!0;return sb.createVertexTemplateFromCells([a], +c.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");f.geometry.relative=!0;f.edge=!0;b.insertEdge(f,!0);c.insertEdge(f,!1);var g=new mxCell("Topic",new mxGeometry(20,40,80,20),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;");g.vertex=!0;var k=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;"); +k.geometry.relative=!0;k.edge=!0;b.insertEdge(k,!0);g.insertEdge(k,!1);var m=new mxCell("Branch",new mxGeometry(20,80,72,26),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;");m.vertex=!0;var l=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;"); +l.geometry.relative=!0;l.edge=!0;b.insertEdge(l,!0);m.insertEdge(l,!1);a.insert(e);a.insert(f);a.insert(k);a.insert(l);a.insert(b);a.insert(d);a.insert(c);a.insert(g);a.insert(m);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap central idea",function(){var a=new mxCell("Central Idea",new mxGeometry(0,0,100,40),"ellipse;whiteSpace=wrap;html=1;align=center;container=1;recursiveResize=0;treeFolding=1;treeMoving=1;");a.vertex=!0;return sb.createVertexTemplateFromCells([a], a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap branch",function(){var a=new mxCell("Branch",new mxGeometry(0,0,80,20),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;");a.vertex=!0;var b=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;"); b.geometry.setTerminalPoint(new mxPoint(-40,40),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);return sb.createVertexTemplateFromCells([a,b],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap sub topic",function(){var a=new mxCell("Sub Topic",new mxGeometry(0,0,72,26),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;");a.vertex=!0;var b=new mxCell("", new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");b.geometry.setTerminalPoint(new mxPoint(-40,40),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);return sb.createVertexTemplateFromCells([a,b],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree orgchart organization division",function(){var a=new mxCell("Orgchart",new mxGeometry(0,0,280,220),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");a.vertex= -!0;var d=new mxCell("Organization",new mxGeometry(80,40,120,60),"whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;container=1;recursiveResize=0;");b.setAttributeForCell(d,"treeRoot","1");d.vertex=!0;var e=new mxCell("Division",new mxGeometry(20,140,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;treeMoving=1;");e.vertex=!0;var l=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;"); -l.geometry.relative=!0;l.edge=!0;d.insertEdge(l,!0);e.insertEdge(l,!1);var c=new mxCell("Division",new mxGeometry(160,140,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;treeMoving=1;");c.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");f.geometry.relative=!0;f.edge=!0;d.insertEdge(f,!0);c.insertEdge(f,!1);a.insert(l);a.insert(f);a.insert(d);a.insert(e); +!0;var d=new mxCell("Organization",new mxGeometry(80,40,120,60),"whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;container=1;recursiveResize=0;");b.setAttributeForCell(d,"treeRoot","1");d.vertex=!0;var e=new mxCell("Division",new mxGeometry(20,140,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;treeMoving=1;");e.vertex=!0;var k=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;"); +k.geometry.relative=!0;k.edge=!0;d.insertEdge(k,!0);e.insertEdge(k,!1);var c=new mxCell("Division",new mxGeometry(160,140,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;treeMoving=1;");c.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");f.geometry.relative=!0;f.edge=!0;d.insertEdge(f,!0);c.insertEdge(f,!1);a.insert(k);a.insert(f);a.insert(d);a.insert(e); a.insert(c);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;container=1;recursiveResize=0;");b.setAttributeForCell(a,"treeRoot","1");a.vertex=!0;return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree division",function(){var a=new mxCell("Division", new mxGeometry(20,40,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;treeMoving=1;");a.vertex=!0;var b=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");b.geometry.setTerminalPoint(new mxPoint(0,0),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);return sb.createVertexTemplateFromCells([a,b],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree sub sections", function(){var a=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;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 d=new mxCell("Sub Section", new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;treeMoving=1;");d.vertex=!0;var e=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");e.geometry.setTerminalPoint(new mxPoint(110,-40),!0);e.geometry.relative=!0;e.edge=!0;d.insertEdge(e,!1);return sb.createVertexTemplateFromCells([b,e,a,d],220,60, -"Sub Sections")})])}}})();EditorUi.initMinimalTheme=function(){function a(a){var b=a.editor.graph;b.popupMenuHandler.hideMenu();null==a.formatWindow?(a.formatWindow=new l(a,mxResources.get("format"),Math.max(20,a.diagramContainer.clientWidth-240-12),56,240,Math.min(566,b.container.clientHeight-10),function(b){b=a.createFormat(b);b.init();return b}),a.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80),a.formatWindow.window.setVisible(!0)):a.formatWindow.window.setVisible(!a.formatWindow.window.isVisible());a.formatWindow.window.isVisible()&& -a.formatWindow.window.fit()}function b(a){var b=a.editor.graph;b.popupMenuHandler.hideMenu();new mxRectangle;if(null==a.sidebarWindow){var c=Math.min(b.container.clientWidth-10,218);a.sidebarWindow=new l(a,mxResources.get("shapes"),10,56,c-6,Math.min(650,b.container.clientHeight-30),function(b){function c(c,d){var f=a.menus.get(c),g=e.addMenu(d,mxUtils.bind(this,function(){f.funct.apply(this,arguments)}));g.style.cssText="position:absolute;border-top:1px solid lightgray;width:50%;height:24px;bottom:0px;text-align:center;cursor:pointer;padding:6px 0 0 0;cusor:pointer;"; +"Sub Sections")})])}}})();EditorUi.initMinimalTheme=function(){function a(a){var b=a.editor.graph;b.popupMenuHandler.hideMenu();null==a.formatWindow?(a.formatWindow=new k(a,mxResources.get("format"),Math.max(20,a.diagramContainer.clientWidth-240-12),56,240,Math.min(566,b.container.clientHeight-10),function(b){b=a.createFormat(b);b.init();return b}),a.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80),a.formatWindow.window.setVisible(!0)):a.formatWindow.window.setVisible(!a.formatWindow.window.isVisible());a.formatWindow.window.isVisible()&& +a.formatWindow.window.fit()}function b(a){var b=a.editor.graph;b.popupMenuHandler.hideMenu();new mxRectangle;if(null==a.sidebarWindow){var c=Math.min(b.container.clientWidth-10,218);a.sidebarWindow=new k(a,mxResources.get("shapes"),10,56,c-6,Math.min(650,b.container.clientHeight-30),function(b){function c(c,d){var f=a.menus.get(c),g=e.addMenu(d,mxUtils.bind(this,function(){f.funct.apply(this,arguments)}));g.style.cssText="position:absolute;border-top:1px solid lightgray;width:50%;height:24px;bottom:0px;text-align:center;cursor:pointer;padding:6px 0 0 0;cusor:pointer;"; g.className="geTitle";b.appendChild(g);return g}var d=document.createElement("div");d.style.cssText="position:absolute;left:0;right:0;border-top:1px solid lightgray;height:24px;bottom:31px;text-align:center;cursor:pointer;padding:6px 0 0 0;";d.className="geTitle";d.innerHTML='<span style="font-size:18px;margin-right:5px;">+</span>';mxUtils.write(d,mxResources.get("moreShapes"));b.appendChild(d);mxEvent.addListener(d,"click",function(){a.actions.get("shapes").funct()});var e=new Menubar(a,b);if(!Editor.enableCustomLibraries|| "1"==urlParams.embed&&"1"!=urlParams.libraries)d.style.bottom="0";else if(null!=a.actions.get("newLibrary")){d=document.createElement("div");d.style.cssText="position:absolute;left:0px;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;";d.className="geTitle";var f=document.createElement("span");f.style.cssText="position:relative;top:6px;";mxUtils.write(f,mxResources.get("newLibrary"));d.appendChild(f);b.appendChild(d);mxEvent.addListener(d, "click",a.actions.get("newLibrary").funct);d=document.createElement("div");d.style.cssText="position:absolute;left:50%;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;border-left: 1px solid lightgray;";d.className="geTitle";f=document.createElement("span");f.style.cssText="position:relative;top:6px;";mxUtils.write(f,mxResources.get("openLibrary"));d.appendChild(f);b.appendChild(d);mxEvent.addListener(d,"click",a.actions.get("openLibrary").funct)}else d= 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 e=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth; try{var d=document.createElement("style");d.type="text/css";d.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 * { 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; }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; }.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:2px; 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:lightgray !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.5) !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(d)}catch(g){}var l=function(a,b,c,d,e,f,k){var g=document.createElement("div");g.className="geSidebarContainer";g.style.position="absolute";g.style.width="100%";g.style.height="100%";g.style.border="1px solid whiteSmoke";g.style.overflowX="hidden";g.style.overflowY="auto";k(g);this.window=new mxWindow(b,g,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(d)}catch(l){}var k=function(a,b,c,d,e,f,g){var l=document.createElement("div");l.className="geSidebarContainer";l.style.position="absolute";l.style.width="100%";l.style.height="100%";l.style.border="1px solid whiteSmoke";l.style.overflowX="hidden";l.style.overflowY="auto";g(l);this.window=new mxWindow(b,l,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= @@ -3406,7 +3411,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=!0;Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var m=EditorUi.prototype.updateTabContainer;EditorUi.prototype.updateTabContainer= function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom=this.tabContainerHeight+"px");m.apply(this,arguments)};var r=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){r.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var u=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(a,b){null!=b.shortcut&&900>e&&!mxClient.IS_IOS?a.firstChild.nextSibling.setAttribute("title", b.shortcut):u.apply(this,arguments)};var y=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){y.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 A=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){A.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= +"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 z=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){z.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="2px";var b=document.createElement("button");mxUtils.write(b,mxResources.get("save"));b.setAttribute("title",mxResources.get("save")+ " ("+Editor.ctrlKey+"+S)");b.className="1"==urlParams.saveAndExit?"geMenuItem":"geMenuItem gePrimaryBtn";b.style.fontSize="14px";b.style.padding="6px";b.style.borderRadius="3px";b.style.marginLeft="8px";b.style.cursor="pointer";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()}));a.appendChild(b);"1"==urlParams.saveAndExit&&(b=document.createElement("a"),mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",mxResources.get("saveAndExit")), b.className="geMenuItem gePrimaryBtn",b.style.fontSize="14px",b.style.marginLeft="6px",b.style.padding="6px",b.style.cursor="pointer",mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b));b=document.createElement("a");mxUtils.write(b,mxResources.get("exit"));b.setAttribute("title",mxResources.get("exit"));b.className="geMenuItem";b.style.fontSize="14px";b.style.marginLeft="6px";b.style.padding="6px";b.style.cursor="pointer";mxEvent.addListener(b, @@ -3414,8 +3419,8 @@ b.className="geMenuItem gePrimaryBtn",b.style.fontSize="14px",b.style.marginLeft a,mxResources.get("apply"),function(a){b(parseFloat(a))},mxResources.get("spacing"));this.editorUi.showDialog(c.container,300,80,!0,!0);c.init()});1==e.getSelectionCount()?(this.addMenuItems(a,["editTooltip","-","editStyle","editGeometry","-"],null,d),e.isCellFoldable(e.getSelectionCell())&&this.addMenuItems(a,e.isCellCollapsed(b)?["expand"]:["collapse"],null,d),this.addMenuItems(a,["collapsible","-","lockUnlock","enterGroup"],null,d),a.addSeparator(),this.addSubmenu("layout",a)):e.isSelectionEmpty()&& e.isEnabled()?(a.addSeparator(),this.addMenuItems(a,["editData"],null,d),a.addSeparator(),this.addSubmenu("layout",a),this.addSubmenu("view",a,null,mxResources.get("options")),this.addMenuItems(a,["-","exitGroup"],null,d)):e.isEnabled()&&this.addMenuItems(a,["-","lockUnlock"],null,d)};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 f=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);f.apply(this,arguments)};var k=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled= -function(a){k.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 c=this.editorUi,d=c.editor.graph;c.actions.get("editDiagram").label=mxResources.get("formatXml")+"...";c.actions.get("createShape").label=mxResources.get("shape")+"...";c.actions.get("outline").label= +(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);f.apply(this,arguments)};var g=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled= +function(a){g.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 c=this.editorUi,d=c.editor.graph;c.actions.get("editDiagram").label=mxResources.get("formatXml")+"...";c.actions.get("createShape").label=mxResources.get("shape")+"...";c.actions.get("outline").label= mxResources.get("outline")+"...";c.actions.get("layers").label=mxResources.get("layers")+"...";c.actions.put("importCsv",new Action(mxResources.get("csv")+"...",function(){d.popupMenuHandler.hideMenu();c.showImportCsvDialog()}));c.actions.put("importText",new Action(mxResources.get("text")+"...",function(){var a=new ParseDialog(c,"Insert from Text");c.showDialog(a.container,620,420,!0,!1);a.init()}));c.actions.put("formatSql",new Action(mxResources.get("formatSql")+"...",function(){var a=new ParseDialog(c, "Insert from Text","formatSql");c.showDialog(a.container,620,420,!0,!1);a.init()}));c.actions.put("toggleShapes",new Action(mxResources.get("shapes")+"...",function(){b(c)}));c.actions.put("toggleFormat",new Action(mxResources.get("format")+"...",function(){a(c)}));EditorUi.enablePlantUml&&!c.isOffline()&&c.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var a=new ParseDialog(c,"Insert from Text","plantUml");c.showDialog(a.container,620,420,!0,!1);a.init()}));this.put("diagram", new Menu(mxUtils.bind(this,function(a,b){var d=c.getCurrentFile();c.menus.addSubmenu("extras",a,b,mxResources.get("preferences"));a.addSeparator(b);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?(c.menus.addMenuItems(a,["new","open","-"],b),EditorUi.isElectronApp&&c.menus.addMenuItems(a,["synchronize","-"],b),c.menus.addMenuItems(a,["save","saveAs","-"],b)):"1"==urlParams.embed?(c.menus.addMenuItems(a,["-","save"],b),"1"==urlParams.saveAndExit&&c.menus.addMenuItems(a,["saveAndExit"],b),a.addSeparator(b)): @@ -3424,71 +3429,71 @@ new Menu(mxUtils.bind(this,function(a,b){var d=c.getCurrentFile();c.menus.addSub "-","rename"],b),c.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&this.addMenuItems(a,["upload"],b):c.menus.addMenuItems(a,["makeCopy"],b));c.menus.addMenuItems(a,["-","autosave"],b);null!=d&&d.isRevisionHistorySupported()&&c.menus.addMenuItems(a,["-","revisionHistory"],b)})));var e=this.get("exportAs");this.put("exportAs",new Menu(mxUtils.bind(this,function(a,b){e.funct(a,b);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||c.menus.addMenuItems(a,["publishLink"],b);a.addSeparator(b);c.menus.addSubmenu("embed", a,b)})));var f=this.get("language");this.put("extras",new Menu(mxUtils.bind(this,function(a,b){"1"!=urlParams.embed&&c.menus.addSubmenu("theme",a,b);null!=f&&c.menus.addSubmenu("language",a,b);a.addSeparator(b);c.menus.addMenuItems(a,["scrollbars","tooltips"],b);"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&c.menus.addMenuItems(a,["-","search","scratchpad","-","showStartScreen"],b);!c.isOfflineApp()&&isLocalStorage&&(a.addSeparator(b),c.menus.addMenuItem(a,"plugins",b));a.addSeparator(b)}))); this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(a,b){c.menus.addMenuItems(a,"importText plantUml - formatSql importCsv - createShape editDiagram".split(" "),b)})));this.put("insert",new Menu(mxUtils.bind(this,function(a,b){c.menus.addMenuItems(a,"insertRectangle insertEllipse insertRhombus - insertText insertLink - insertImage".split(" "),b);c.insertTemplateEnabled&&!c.isOffline()&&c.menus.addMenuItems(a,["insertTemplate"],b);a.addSeparator(b);this.addMenuItems(a,["createShape","insertFreehand", -"-"],b);this.addSubmenu("insertLayout",a,b,mxResources.get("layout"));this.addSubmenu("insertAdvanced",a,b,mxResources.get("advanced"));a.addSeparator(b);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?c.menus.addMenuItems(a,["import"],b):c.menus.addSubmenu("importFrom",a,b)})));var k="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),l=function(a,b,d,e){a.addItem(d,null,mxUtils.bind(this,function(){var a=new CreateGraphDialog(c,d,e);c.showDialog(a.container, -620,420,!0,!1);a.init()}),b)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(a,b){for(var c=0;c<k.length;c++)"-"==k[c]?a.addSeparator(b):l(a,b,mxResources.get(k[c])+"...",k[c])})));this.put("view",new Menu(mxUtils.bind(this,function(a,b){c.menus.addMenuItems(a,"grid guides - connectionArrows connectionPoints -".split(" "),b);if("undefined"!==typeof MathJax){var d=c.menus.addMenuItem(a,"mathematicalTypesetting",b);c.menus.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000032875")}c.menus.addMenuItems(a, -["copyConnect","collapseExpand","-","pageScale"],b)})))};var n=EditorUi.prototype.init;EditorUi.prototype.init=function(){function a(a,b,c){var d=l.menus.get(a),e=r.addMenu(mxResources.get(a),mxUtils.bind(this,function(){d.funct.apply(this,arguments)}),q);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));l.menus.menuCreated(d,e,"geMenuItem");null!=c?(e.style.backgroundImage="url("+c+")",e.style.backgroundPosition="center center",e.style.backgroundRepeat="no-repeat",e.style.backgroundSize="24px 24px",e.style.width="34px",e.innerHTML=""):b||(e.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",e.style.backgroundPosition="right 6px center",e.style.backgroundRepeat="no-repeat",e.style.paddingRight="22px");return e}function c(a,b,c,d,e,f){var 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!=l.statusContainer?p.insertBefore(g,l.statusContainer):p.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, +"-"],b);this.addSubmenu("insertLayout",a,b,mxResources.get("layout"));this.addSubmenu("insertAdvanced",a,b,mxResources.get("advanced"));a.addSeparator(b);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?c.menus.addMenuItems(a,["import"],b):c.menus.addSubmenu("importFrom",a,b)})));var g="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),k=function(a,b,d,e){a.addItem(d,null,mxUtils.bind(this,function(){var a=new CreateGraphDialog(c,d,e);c.showDialog(a.container, +620,420,!0,!1);a.init()}),b)};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,b){c.menus.addMenuItems(a,"grid guides - connectionArrows connectionPoints -".split(" "),b);if("undefined"!==typeof MathJax){var d=c.menus.addMenuItem(a,"mathematicalTypesetting",b);c.menus.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000032875")}c.menus.addMenuItems(a, +["copyConnect","collapseExpand","-","pageScale"],b)})))};var n=EditorUi.prototype.init;EditorUi.prototype.init=function(){function a(a,b,c){var d=k.menus.get(a),e=r.addMenu(mxResources.get(a),mxUtils.bind(this,function(){d.funct.apply(this,arguments)}),q);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 c(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?p.insertBefore(g,k.statusContainer):p.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 d(a,b){var c= -document.createElement("div");c.className="geMenuItem";c.style.display="inline-block";c.style.verticalAlign="top";c.style.marginRight="6px";c.style.padding="0 4px 0 4px";c.style.height="30px";c.style.position="relative";c.style.top="0px";for(var d=0;d<a.length;d++)null!=a[d]&&(a[d].style.margin="0px",a[d].style.boxShadow="none",c.appendChild(a[d]));null!=b&&mxUtils.setOpacity(c,b);null!=l.statusContainer?p.insertBefore(c,l.statusContainer):p.appendChild(c);return c}function f(){for(var b=p.firstChild;null!= -b;){var f=b.nextSibling;"geMenuItem"!=b.className&&"geItem"!=b.className||b.parentNode.removeChild(b);b=f}q=p.firstChild;e=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;(b=1E3>e)||a("diagram");d([b?a("diagram",null,IMAGE_PATH+"/drawlogo.svg"):null,c(mxResources.get("shapes"),l.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),l.actions.get("image"),b?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTMgMTN2OGg4di04aC04ek0zIDIxaDh2LThIM3Y4ek0zIDN2OGg4VjNIM3ptMTMuNjYtMS4zMUwxMSA3LjM0IDE2LjY2IDEzbDUuNjYtNS42Ni01LjY2LTUuNjV6Ii8+PC9zdmc+": -null),c(mxResources.get("format"),l.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+l.actions.get("formatPanel").shortcut+")",l.actions.get("image"),b?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgM2MtNC45NyAwLTkgNC4wMy05IDlzNC4wMyA5IDkgOWMuODMgMCAxLjUtLjY3IDEuNS0xLjUgMC0uMzktLjE1LS43NC0uMzktMS4wMS0uMjMtLjI2LS4zOC0uNjEtLjM4LS45OSAwLS44My42Ny0xLjUgMS41LTEuNUgxNmMyLjc2IDAgNS0yLjI0IDUtNSAwLTQuNDItNC4wMy04LTktOHptLTUuNSA5Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTNS42NyA5IDYuNSA5IDggOS42NyA4IDEwLjUgNy4zMyAxMiA2LjUgMTJ6bTMtNEM4LjY3IDggOCA3LjMzIDggNi41UzguNjcgNSA5LjUgNXMxLjUuNjcgMS41IDEuNVMxMC4zMyA4IDkuNSA4em01IDBjLS44MyAwLTEuNS0uNjctMS41LTEuNVMxMy42NyA1IDE0LjUgNXMxLjUuNjcgMS41IDEuNVMxNS4zMyA4IDE0LjUgOHptMyA0Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTMTYuNjcgOSAxNy41IDlzMS41LjY3IDEuNSAxLjUtLjY3IDEuNS0xLjUgMS41eiIvPjwvc3ZnPg==": -null)],b?60:null);f=a("insert",!0,b?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTkgMTNoLTZ2NmgtMnYtNkg1di0yaDZWNWgydjZoNnYyeiIvPjwvc3ZnPg==":null);d([f,c(mxResources.get("delete"),l.actions.get("delete").funct,null,mxResources.get("delete"),l.actions.get("delete"),b?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNNiAxOWMwIDEuMS45IDIgMiAyaDhjMS4xIDAgMi0uOSAyLTJWN0g2djEyek0xOSA0aC0zLjVsLTEtMWgtNWwtMSAxSDV2MmgxNFY0eiIvPjwvc3ZnPg==": -null)],b?60:null);if(411<=e&&(f=l.actions.get("undo"),b=l.actions.get("redo"),f=c("",f.funct,null,mxResources.get("undo")+" ("+f.shortcut+")",f,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIuNSA4Yy0yLjY1IDAtNS4wNS45OS02LjkgMi42TDIgN3Y5aDlsLTMuNjItMy42MmMxLjM5LTEuMTYgMy4xNi0xLjg4IDUuMTItMS44OCAzLjU0IDAgNi41NSAyLjMxIDcuNiA1LjVsMi4zNy0uNzhDMjEuMDggMTEuMDMgMTcuMTUgOCAxMi41IDh6Ii8+PC9zdmc+"),b=c("", -b.funct,null,mxResources.get("redo")+" ("+b.shortcut+")",b,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTguNCAxMC42QzE2LjU1IDguOTkgMTQuMTUgOCAxMS41IDhjLTQuNjUgMC04LjU4IDMuMDMtOS45NiA3LjIyTDMuOSAxNmMxLjA1LTMuMTkgNC4wNS01LjUgNy42LTUuNSAxLjk1IDAgMy43My43MiA1LjEyIDEuODhMMTMgMTZoOVY3bC0zLjYgMy42eiIvPjwvc3ZnPg=="),d([f,b],60),480<=e)){var b=l.actions.get("zoomIn"),f=l.actions.get("zoomOut"),g=l.actions.get("resetView"); -d([c("",function(){m.popupMenuHandler.hideMenu();var a=m.view.scale,b=m.view.translate.x,c=m.view.translate.y;l.actions.get("resetView").funct();1E-5>Math.abs(a-m.view.scale)&&b==m.view.translate.x&&c==m.view.translate.y&&l.actions.get(m.pageVisible?"fitPage":"fitWindow").funct()},!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",g,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMyA1djRoMlY1aDRWM0g1Yy0xLjEgMC0yIC45LTIgMnptMiAxMEgzdjRjMCAxLjEuOSAyIDIgMmg0di0ySDV2LTR6bTE0IDRoLTR2Mmg0YzEuMSAwIDItLjkgMi0ydi00aC0ydjR6bTAtMTZoLTR2Mmg0djRoMlY1YzAtMS4xLS45LTItMi0yeiIvPjwvc3ZnPg=="), +document.createElement("div");c.className="geMenuItem";c.style.display="inline-block";c.style.verticalAlign="top";c.style.marginRight="6px";c.style.padding="0 4px 0 4px";c.style.height="30px";c.style.position="relative";c.style.top="0px";for(var d=0;d<a.length;d++)null!=a[d]&&(a[d].style.margin="0px",a[d].style.boxShadow="none",c.appendChild(a[d]));null!=b&&mxUtils.setOpacity(c,b);null!=k.statusContainer?p.insertBefore(c,k.statusContainer):p.appendChild(c);return c}function f(){for(var b=p.firstChild;null!= +b;){var f=b.nextSibling;"geMenuItem"!=b.className&&"geItem"!=b.className||b.parentNode.removeChild(b);b=f}q=p.firstChild;e=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;(b=1E3>e)||a("diagram");d([b?a("diagram",null,IMAGE_PATH+"/drawlogo.svg"):null,c(mxResources.get("shapes"),k.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),k.actions.get("image"),b?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTMgMTN2OGg4di04aC04ek0zIDIxaDh2LThIM3Y4ek0zIDN2OGg4VjNIM3ptMTMuNjYtMS4zMUwxMSA3LjM0IDE2LjY2IDEzbDUuNjYtNS42Ni01LjY2LTUuNjV6Ii8+PC9zdmc+": +null),c(mxResources.get("format"),k.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+k.actions.get("formatPanel").shortcut+")",k.actions.get("image"),b?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgM2MtNC45NyAwLTkgNC4wMy05IDlzNC4wMyA5IDkgOWMuODMgMCAxLjUtLjY3IDEuNS0xLjUgMC0uMzktLjE1LS43NC0uMzktMS4wMS0uMjMtLjI2LS4zOC0uNjEtLjM4LS45OSAwLS44My42Ny0xLjUgMS41LTEuNUgxNmMyLjc2IDAgNS0yLjI0IDUtNSAwLTQuNDItNC4wMy04LTktOHptLTUuNSA5Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTNS42NyA5IDYuNSA5IDggOS42NyA4IDEwLjUgNy4zMyAxMiA2LjUgMTJ6bTMtNEM4LjY3IDggOCA3LjMzIDggNi41UzguNjcgNSA5LjUgNXMxLjUuNjcgMS41IDEuNVMxMC4zMyA4IDkuNSA4em01IDBjLS44MyAwLTEuNS0uNjctMS41LTEuNVMxMy42NyA1IDE0LjUgNXMxLjUuNjcgMS41IDEuNVMxNS4zMyA4IDE0LjUgOHptMyA0Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTMTYuNjcgOSAxNy41IDlzMS41LjY3IDEuNSAxLjUtLjY3IDEuNS0xLjUgMS41eiIvPjwvc3ZnPg==": +null)],b?60:null);f=a("insert",!0,b?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTkgMTNoLTZ2NmgtMnYtNkg1di0yaDZWNWgydjZoNnYyeiIvPjwvc3ZnPg==":null);d([f,c(mxResources.get("delete"),k.actions.get("delete").funct,null,mxResources.get("delete"),k.actions.get("delete"),b?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNNiAxOWMwIDEuMS45IDIgMiAyaDhjMS4xIDAgMi0uOSAyLTJWN0g2djEyek0xOSA0aC0zLjVsLTEtMWgtNWwtMSAxSDV2MmgxNFY0eiIvPjwvc3ZnPg==": +null)],b?60:null);if(411<=e&&(f=k.actions.get("undo"),b=k.actions.get("redo"),f=c("",f.funct,null,mxResources.get("undo")+" ("+f.shortcut+")",f,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIuNSA4Yy0yLjY1IDAtNS4wNS45OS02LjkgMi42TDIgN3Y5aDlsLTMuNjItMy42MmMxLjM5LTEuMTYgMy4xNi0xLjg4IDUuMTItMS44OCAzLjU0IDAgNi41NSAyLjMxIDcuNiA1LjVsMi4zNy0uNzhDMjEuMDggMTEuMDMgMTcuMTUgOCAxMi41IDh6Ii8+PC9zdmc+"),b=c("", +b.funct,null,mxResources.get("redo")+" ("+b.shortcut+")",b,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTguNCAxMC42QzE2LjU1IDguOTkgMTQuMTUgOCAxMS41IDhjLTQuNjUgMC04LjU4IDMuMDMtOS45NiA3LjIyTDMuOSAxNmMxLjA1LTMuMTkgNC4wNS01LjUgNy42LTUuNSAxLjk1IDAgMy43My43MiA1LjEyIDEuODhMMTMgMTZoOVY3bC0zLjYgMy42eiIvPjwvc3ZnPg=="),d([f,b],60),480<=e)){var b=k.actions.get("zoomIn"),f=k.actions.get("zoomOut"),g=k.actions.get("resetView"); +d([c("",function(){m.popupMenuHandler.hideMenu();var a=m.view.scale,b=m.view.translate.x,c=m.view.translate.y;k.actions.get("resetView").funct();1E-5>Math.abs(a-m.view.scale)&&b==m.view.translate.x&&c==m.view.translate.y&&k.actions.get(m.pageVisible?"fitPage":"fitWindow").funct()},!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",g,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMyA1djRoMlY1aDRWM0g1Yy0xLjEgMC0yIC45LTIgMnptMiAxMEgzdjRjMCAxLjEuOSAyIDIgMmg0di0ySDV2LTR6bTE0IDRoLTR2Mmg0YzEuMSAwIDItLjkgMi0ydi00aC0ydjR6bTAtMTZoLTR2Mmg0djRoMlY1YzAtMS4xLS45LTItMi0yeiIvPjwvc3ZnPg=="), 640<=e?c("",b.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",b,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHptMi41LTRoLTJ2Mkg5di0ySDdWOWgyVjdoMXYyaDJ2MXoiLz48L3N2Zz4="): null,640<=e?c("",f.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",f,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHpNNyA5aDV2MUg3eiIvPjwvc3ZnPg=="): -null],60)}b=l.menus.get("language");null!=b&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=e?(null==O&&(f=r.addMenu("",b.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?"13px":"11px",p.appendChild(f),O=f),l.buttonContainer.style.paddingRight="34px"):(l.buttonContainer.style.paddingRight="4px",null!=O&&(O.parentNode.removeChild(O),O=null))}n.apply(this,arguments);var k=document.createElement("div");k.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";k.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(k);null==urlParams.clibs&& -null==urlParams.libs||b(this);var l=this,m=l.editor.graph;l.toolbar=this.createToolbar(l.createDiv("geToolbar"));l.defaultLibraryName=mxResources.get("untitledLibrary");var p=document.createElement("div");p.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 q=null,r=new Menubar(l,p);l.statusContainer=l.createStatusContainer();l.statusContainer.style.position="relative"; -l.statusContainer.style.maxWidth="";l.statusContainer.style.marginTop="7px";l.statusContainer.style.marginLeft="6px";l.statusContainer.style.color="gray";l.statusContainer.style.cursor="default";l.editor.addListener("statusChanged",mxUtils.bind(this,function(){l.setStatusText(l.editor.getStatus())}));var u=l.descriptorChanged;l.descriptorChanged=function(){u.apply(this,arguments);var a=l.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);p.setAttribute("title",a.getTitle()+(null!=b?" ("+b+")":""))}else p.removeAttribute("title")};l.setStatusText(l.editor.getStatus());p.appendChild(l.statusContainer);l.buttonContainer=document.createElement("div");l.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";p.appendChild(l.buttonContainer);l.menubarContainer=l.buttonContainer; -l.tabContainer=document.createElement("div");l.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 k=l.diagramContainer.parentNode,y=document.createElement("div");y.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";l.diagramContainer.style.top="47px";var A=l.menus.get("viewZoom"); -if(null!=A){this.tabContainer.style.right="70px";var B=r.addMenu("100%",A.funct);B.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");B.style.whiteSpace="nowrap";B.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";B.style.backgroundPosition="right 6px center";B.style.backgroundRepeat="no-repeat";B.style.backgroundColor="#ffffff";B.style.paddingRight="10px";B.style.display="block";B.style.position="absolute";B.style.textDecoration="none";B.style.textDecoration="none"; -B.style.right="0px";B.style.bottom="0px";B.style.overflow="hidden";B.style.visibility="hidden";B.style.textAlign="center";B.style.color="#000";B.style.fontSize="12px";B.style.color="#707070";B.style.width="59px";B.style.cursor="pointer";B.style.borderTop="1px solid lightgray";B.style.borderLeft="1px solid lightgray";B.style.height=parseInt(l.tabContainerHeight)-1+"px";B.style.lineHeight=parseInt(l.tabContainerHeight)+1+"px";y.appendChild(B);A=mxUtils.bind(this,function(){B.innerHTML=Math.round(100* -l.editor.graph.view.scale)+"%"});l.editor.graph.view.addListener(mxEvent.EVENT_SCALE,A);l.editor.addListener("resetGraphView",A);l.editor.addListener("pageSelected",A);var J=l.setGraphEnabled;l.setGraphEnabled=function(){J.apply(this,arguments);null!=this.tabContainer&&(B.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility?this.tabContainerHeight+"px":"0px")}}y.appendChild(l.tabContainer);y.appendChild(p);y.appendChild(l.diagramContainer); -k.appendChild(y);l.updateTabContainer();var O=null;f();mxEvent.addListener(window,"resize",function(){f();null!=l.sidebarWindow&&l.sidebarWindow.window.fit();null!=l.formatWindow&&l.formatWindow.window.fit();null!=l.actions.outlineWindow&&l.actions.outlineWindow.window.fit();null!=l.actions.layersWindow&&l.actions.layersWindow.window.fit();null!=l.menus.tagsWindow&&l.menus.tagsWindow.window.fit();null!=l.menus.findWindow&&l.menus.findWindow.window.fit()})}}}; -(function(){var a=!1;"min"!=uiTheme||a||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),a=!0);var b=EditorUi.initTheme;EditorUi.initTheme=function(){b.apply(this,arguments);"min"!=uiTheme||a||(this.initMinimalTheme(),a=!0)}})();DrawioComment=function(a,b,e,d,l,m,r){this.file=a;this.id=b;this.content=e;this.modifiedDate=d;this.createdDate=l;this.isResolved=m;this.user=r;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(a){null!=a&&this.replies.push(a)};DrawioComment.prototype.addReply=function(a,b,e,d,l){b()};DrawioComment.prototype.editComment=function(a,b,e){b()};DrawioComment.prototype.deleteComment=function(a,b){a()};DrawioUser=function(a,b,e,d,l){this.id=a;this.email=b;this.displayName=e;this.pictureUrl=d;this.locale=l};mxResources.parse('# *DO NOT DIRECTLY EDIT THIS FILE, IT IS AUTOMATICALLY GENERATED AND IT IS BASED ON:*\n# https://docs.google.com/spreadsheet/ccc?key=0AmQEO36liL4FdDJLWVNMaVV2UmRKSnpXU09MYkdGbEE\naboutDrawio=About draw.io\naccessDenied=Access Denied\naction=Action\nactualSize=Actual Size\nadd=Add\naddedFile=Added {1}\naddImages=Add Images\naddImageUrl=Add Image URL\naddLayer=Add Layer\naddProperty=Add Property\naddress=Address\naddToExistingDrawing=Add to Existing Drawing\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nalign=Align\nalignment=Alignment\nallChangesLost=All changes will be lost!\nallPages=All Pages\nallProjects=All Projects\nallSpaces=All Spaces\nallTags=All Tags\nanchor=Anchor\nandroid=Android\nangle=Angle\narc=Arc\nareYouSure=Are you sure?\nensureDataSaved=Please ensure your data is saved before closing.\nallChangesSaved=All changes saved\nallChangesSavedInDrive=All changes saved in Drive\nallowPopups=Allow pop-ups to avoid this dialog.\nallowRelativeUrl=Allow relative URL\nalreadyConnected=Nodes already connected\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\nasNew=As New\natlas=Atlas\nauthor=Author\nauthorizationRequired=Authorization required\nauthorizeThisAppIn=Authorize this app in {1}:\nauthorize=Authorize\nauthorizing=Authorizing\nautomatic=Automatic\nautosave=Autosave\nautosize=Autosize\nattachments=Attachments\naws=AWS\naws3d=AWS 3D\nazure=Azure\nback=Back\nbackground=Background\nbackgroundColor=Background Color\nbackgroundImage=Background Image\nbasic=Basic\nblankDrawing=Blank Drawing\nblankDiagram=Blank Diagram\nblock=Block\nblockquote=Blockquote\nblog=Blog\nbold=Bold\nbootstrap=Bootstrap\nborder=Border\nborderColor=Border Color\nborderWidth=Borderwidth\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\nbrowser=Browser\nbulletedList=Bulleted List\nbusiness=Business\nbusy=Operation in progress\ncabinets=Cabinets\ncancel=Cancel\ncenter=Center\ncannotLoad=Load attempts failed. Please try again later.\ncannotLogin=Log in attempts failed. Please try again later.\ncannotOpenFile=Cannot open file\nchange=Change\nchangeOrientation=Change Orientation\nchangeUser=Change user\nchangeStorage=Change storage\nchangesNotSaved=Changes have not been saved\nuserJoined={1} has joined\nuserLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\ncollaborativeEditingNotice=Important Notice for Collaborative Editing\ncompressed=Compressed\ncommitMessage=Commit Message\ncsv=CSV\ndark=Dark\ndraftFound=A draft for \'{1}\' has been found. Load it into the editor or discard it to continue.\ndragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?\ndropboxCharsNotAllowed=The following characters are not allowed: / : ? * " |\ncheck=Check\nchecksum=Checksum\ncircle=Circle\ncisco=Cisco\nclassic=Classic\nclearDefaultStyle=Clear Default Style\nclearWaypoints=Clear Waypoints\nclipart=Clipart\nclose=Close\ncollaborator=Collaborator\ncollaborators=Collaborators\ncollapse=Collapse\ncollapseExpand=Collapse/Expand\ncollapse-expand=Click to collapse/expand\nShift-click to move neighbors \nAlt-click to protect group size\ncollapsible=Collapsible\ncomic=Comic\ncomment=Comment\ncommentsNotes=Comments/Notes\ncompress=Compress\nconnect=Connect\nconnecting=Connecting\nconnectWithDrive=Connect with Google Drive\nconnection=Connection\nconnectionArrows=Connection Arrows\nconnectionPoints=Connection Points\nconstrainProportions=Constrain Proportions\ncontainsValidationErrors=Contains validation errors\ncopiedToClipboard=Copied to clipboard\ncopy=Copy\ncopyConnect=Copy on connect\ncopyCreated=A copy of the file was created.\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopySize=Copy Size\ncopyStyle=Copy Style\ncreate=Create\ncreateNewDiagram=Create New Diagram\ncreateRevision=Create Revision\ncreateShape=Create Shape\ncrop=Crop\ncurved=Curved\ncustom=Custom\ncurrent=Current\ncut=Cut\ndashed=Dashed\ndecideLater=Decide later\ndefault=Default\ndelete=Delete\ndeleteColumn=Delete Column\ndeleteLibrary401=Insufficient permissions to delete this library\ndeleteLibrary404=Selected library could not be found\ndeleteLibrary500=Error deleting library\ndeleteLibraryConfirm=You are about to permanently delete this library. Are you sure you want to do this?\ndeleteRow=Delete Row\ndescription=Description\ndevice=Device\ndiagram=Diagram\ndiagramContent=Diagram Content\ndiagramLocked=Diagram has been locked to prevent further data loss.\ndiagramLockedBySince=The diagram is locked by {1} since {2} ago\ndiagramName=Diagram Name\ndiagramIsPublic=Diagram is public\ndiagramIsNotPublic=Diagram is not public\ndiamond=Diamond\ndiamondThin=Diamond (thin)\ndidYouKnow=Did you know...\ndirection=Direction\ndiscard=Discard\ndiscardChangesAndReconnect=Discard Changes and Reconnect\ngoogleDriveMissingClickHere=Google Drive missing? Click here!\ndiscardChanges=Discard Changes\ndisconnected=Disconnected\ndistribute=Distribute\ndone=Done\ndotted=Dotted\ndoubleClickOrientation=Doubleclick to change orientation\ndoubleClickTooltip=Doubleclick to insert text\ndoubleClickChangeProperty=Doubleclick to change property name\ndownload=Download\ndownloadDesktop=Download draw.io Desktop\ndownloadAs=Download as\nclickHereToSave=Click here to save.\ndraftDiscarded=Draft discarded\ndraftSaved=Draft saved\ndragElementsHere=Drag elements here\ndragImagesHere=Drag images or URLs here\ndragUrlsHere=Drag URLs here\ndraw.io=draw.io\ndrawing=Drawing{1}\ndrawingEmpty=Drawing is empty\ndrawingTooLarge=Drawing is too large\ndrawioForWork=Draw.io for GSuite\ndropbox=Dropbox\nduplicate=Duplicate\nduplicateIt=Duplicate {1}\ndivider=Divider\ndx=Dx\ndy=Dy\neast=East\nedit=Edit\neditData=Edit Data\neditDiagram=Edit Diagram\neditGeometry=Edit Geometry\neditImage=Edit Image\neditImageUrl=Edit Image URL\neditLink=Edit Link\neditShape=Edit Shape\neditStyle=Edit Style\neditText=Edit Text\neditTooltip=Edit Tooltip\nglass=Glass\ngoogleImages=Google Images\nimageSearch=Image Search\neip=EIP\nembed=Embed\nembedImages=Embed Images\nmainEmbedNotice=Paste this into the page\nelectrical=Electrical\nellipse=Ellipse\nembedNotice=Paste this once at the end of the page\nenterGroup=Enter Group\nenterName=Enter Name\nenterPropertyName=Enter Property Name\nenterValue=Enter Value\nentityRelation=Entity Relation\nerror=Error\nerrorDeletingFile=Error deleting file\nerrorLoadingFile=Error loading file\nerrorRenamingFile=Error renaming file\nerrorRenamingFileNotFound=Error renaming file. File was not found.\nerrorRenamingFileForbidden=Error renaming file. Insufficient access rights.\nerrorSavingDraft=Error saving draft\nerrorSavingFile=Error saving file\nerrorSavingFileUnknown=Error authorizing with Google\'s servers. Please refresh the page to re-attempt.\nerrorSavingFileForbidden=Error saving file. Insufficient access rights.\nerrorSavingFileNameConflict=Could not save diagram. Current page already contains file named \'{1}\'.\nerrorSavingFileNotFound=Error saving file. File was not found.\nerrorSavingFileReadOnlyMode=Could not save diagram while read-only mode is active.\nerrorSavingFileSessionTimeout=Your session has ended. Please <a target=\'_blank\' href=\'{1}\'>{2}</a> and return to this tab to try to save again.\nerrorSendingFeedback=Error sending feedback.\nerrorUpdatingPreview=Error updating preview.\nexit=Exit\nexitGroup=Exit Group\nexpand=Expand\nexport=Export\nexporting=Exporting\nexportAs=Export as\nexportOptionsDisabled=Export options disabled\nexportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.\nexternalChanges=External Changes\nextras=Extras\nfacebook=Facebook\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwriteDialog=The file has been modified. Do you want to save the file and overwrite those changes?\nfileChangedSyncDialog=The file has been modified. Do you want to synchronize those changes?\nfileChangedSync=The file has been modified. Click here to synchronize.\noverwrite=Overwrite\nsynchronize=Synchronize\nfilename=Filename\nfileExists=File already exists\nfileNearlyFullSeeFaq=File nearly full, please see FAQ\nfileNotFound=File not found\nrepositoryNotFound=Repository not found\nfileNotFoundOrDenied=The file was not found. It does not exist or you do not have read access.\nfileNotLoaded=File not loaded\nfileNotSaved=File not saved\nfileOpenLocation=How would you like to open these file(s)?\nfiletypeHtml=.html causes file to save as HTML with redirect to cloud URL\nfiletypePng=.png causes file to save as PNG with embedded data\nfiletypeSvg=.svg causes file to save as SVG with embedded data\nfileWillBeSavedInAppFolder={1} will be saved in the app folder.\nfill=Fill\nfillColor=Fill Color\nfilterCards=Filter Cards\nfind=Find\nfit=Fit\nfitContainer=Resize Container\nfitIntoContainer=Fit into Container\nfitPage=Fit Page\nfitPageWidth=Fit Page Width\nfitTo=Fit to\nfitToSheetsAcross=sheet(s) across\nfitToBy=by\nfitToSheetsDown=sheet(s) down\nfitTwoPages=Two Pages\nfitWindow=Fit Window\nflip=Flip\nflipH=Flip Horizontal\nflipV=Flip Vertical\nflowchart=Flowchart\nfolder=Folder\nfont=Font\nfontColor=Font Color\nfontFamily=Font Family\nfontSize=Font Size\nforbidden=You are not authorized to access this file\nformat=Format\nformatPanel=Format Panel\nformatted=Formatted\nformattedText=Formatted Text\nformatPng=PNG\nformatGif=GIF\nformatJpg=JPEG\nformatPdf=PDF\nformatSql=SQL\nformatSvg=SVG\nformatHtmlEmbedded=HTML\nformatSvgEmbedded=SVG (with XML)\nformatVsdx=VSDX\nformatVssx=VSSX\nformatXmlPlain=XML (Plain)\nformatXml=XML\nforum=Discussion/Help Forums\nfreehand=Freehand\nfromTemplate=From Template\nfromTemplateUrl=From Template URL\nfromText=From Text\nfromUrl=From URL\nfromThisPage=From this page\nfullscreen=Fullscreen\ngap=Gap\ngcp=GCP\ngeneral=General\ngithub=GitHub\ngitlab=GitLab\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\ngooglePlus=Google+\ngoogleSharingNotAvailable=Sharing is only available via Google Drive. Please click Open below and share from the more actions menu:\ngoogleSlides=Google Slides\ngoogleSites=Google Sites\ngradient=Gradient\ngradientColor=Color\ngrid=Grid\ngridColor=Grid Color\ngridSize=Grid Size\ngroup=Group\nguides=Guides\nhateApp=I hate draw.io\nheading=Heading\nheight=Height\nhelp=Help\nhelpTranslate=Help us translate this application\nhide=Hide\nhideIt=Hide {1}\nhidden=Hidden\nhome=Home\nhorizontal=Horizontal\nhorizontalFlow=Horizontal Flow\nhorizontalTree=Horizontal Tree\nhowTranslate=How good is the translation in your language?\nhtml=HTML\nhtmlText=HTML Text\nid=ID\niframe=IFrame\nignore=Ignore\nimage=Image\nimageUrl=Image URL\nimages=Images\nimagePreviewError=This image couldn\'t be loaded for preview. Please check the URL.\nimageTooBig=Image too big\nimgur=Imgur\nimport=Import\nimportFrom=Import from\nincludeCopyOfMyDiagram=Include a copy of my diagram\nincreaseIndent=Increase Indent\ndecreaseIndent=Decrease Indent\ninsert=Insert\ninsertColumnBefore=Insert Column Left\ninsertColumnAfter=Insert Column Right\ninsertEllipse=Insert Ellipse\ninsertImage=Insert Image\ninsertHorizontalRule=Insert Horizontal Rule\ninsertLink=Insert Link\ninsertPage=Insert Page\ninsertRectangle=Insert Rectangle\ninsertRhombus=Insert Rhombus\ninsertRowBefore=Insert Row Above\ninsertRowAfter=Insert Row After\ninsertText=Insert Text\ninserting=Inserting\ninvalidFilename=Diagram names must not contain the following characters: / | : ; { } < > & + ? = "\ninvalidLicenseSeeThisPage=Your license is invalid, please see this <a target="_blank" href="https://support.draw.io/display/DFCS/Licensing+your+draw.io+plugin">page</a>.\ninvalidInput=Invalid input\ninvalidName=Invalid name\ninvalidOrMissingFile=Invalid or missing file\ninvalidPublicUrl=Invalid public URL\nisometric=Isometric\nios=iOS\nitalic=Italic\nkennedy=Kennedy\nkeyboardShortcuts=Keyboard Shortcuts\nlayers=Layers\nlandscape=Landscape\nlanguage=Language\nleanMapping=Lean Mapping\nlastChange=Last change {1} ago\nlessThanAMinute=less than a minute\nlicensingError=Licensing Error\nlicenseHasExpired=The license for {1} has expired on {2}. Click here.\nlicenseWillExpire=The license for {1} will expire on {2}. Click here.\nlineJumps=Line jumps\nlinkAccountRequired=If the diagram is not public a Google account is required to view the link.\nlinkText=Link Text\nlist=List\nminute=minute\nminutes=minutes\nhours=hours\ndays=days\nmonths=months\nyears=years\nrestartForChangeRequired=Changes will take effect after page refresh.\nlaneColor=Lanecolor\nlastModified=Last modified\nlayout=Layout\nleft=Left\nleftAlign=Left Align\nleftToRight=Left to right\nlibraryTooltip=Drag and drop shapes here or click + to insert. Double click to edit.\nlightbox=Lightbox\nline=Line\nlineend=Line end\nlineheight=Line Height\nlinestart=Line start\nlinewidth=Linewidth\nlink=Link\nlinks=Links\nloading=Loading\nlockUnlock=Lock/Unlock\nloggedOut=Logged Out\nlogIn=log in\nloveIt=I love {1}\nlucidchart=Lucidchart\nmaps=Maps\nmathematicalTypesetting=Mathematical Typesetting\nmakeCopy=Make a Copy\nmanual=Manual\nmicrosoftOffice=Microsoft Office\nmicrosoftExcel=Microsoft Excel\nmicrosoftPowerPoint=Microsoft PowerPoint\nmicrosoftWord=Microsoft Word\nmiddle=Middle\nminimal=Minimal\nmisc=Misc\nmockups=Mockups\nmodificationDate=Modification date\nmodifiedBy=Modified by\nmore=More\nmoreResults=More Results\nmoreShapes=More Shapes\nmove=Move\nmoveToFolder=Move to Folder\nmoving=Moving\nmoveSelectionTo=Move selection to {1}\nname=Name\nnavigation=Navigation\nnetwork=Network\nnetworking=Networking\nnew=New\nnewLibrary=New Library\nnextPage=Next Page\nno=No\nnoPickFolder=No, pick folder\nnoAttachments=No attachments found\nnoColor=No Color\nnoFiles=No Files\nnoFileSelected=No file selected\nnoLibraries=No libraries found\nnoMoreResults=No more results\nnone=None\nnoOtherViewers=No other viewers\nnoPlugins=No plugins\nnoPreview=No preview\nnoResponse=No response from server\nnoResultsFor=No results for \'{1}\'\nnoRevisions=No revisions\nnoSearchResults=No search results found\nnoPageContentOrNotSaved=No anchors found on this page or it hasn\'t been saved yet\nnormal=Normal\nnorth=North\nnotADiagramFile=Not a diagram file\nnotALibraryFile=Not a library file\nnotAvailable=Not available\nnotAUtf8File=Not a UTF-8 file\nnotConnected=Not connected\nnote=Note\nnotUsingService=Not using {1}?\nnumberedList=Numbered list\noffline=Offline\nok=OK\noneDrive=OneDrive\nonline=Online\nopacity=Opacity\nopen=Open\nopenArrow=Open Arrow\nopenExistingDiagram=Open Existing Diagram\nopenFile=Open File\nopenFrom=Open from\nopenLibrary=Open Library\nopenLibraryFrom=Open Library from\nopenLink=Open Link\nopenInNewWindow=Open in New Window\nopenInThisWindow=Open in This Window\nopenIt=Open {1}\nopenRecent=Open Recent\nopenSupported=Supported formats are files saved from this software (.xml), .vsdx and .gliffy\noptions=Options\norganic=Organic\northogonal=Orthogonal\notherViewer=other viewer\notherViewers=other viewers\noutline=Outline\noval=Oval\npage=Page\npageContent=Page Content\npageNotFound=Page not found\npageWithNumber=Page-{1}\npages=Pages\npageView=Page View\npageSetup=Page Setup\npageScale=Page Scale\npan=Pan\npanTooltip=Space+Drag to pan\npaperSize=Paper Size\npattern=Pattern\npaste=Paste\npasteHere=Paste here\npasteSize=Paste Size\npasteStyle=Paste Style\nperimeter=Perimeter\npermissionAnyone=Anyone can edit\npermissionAuthor=Owner and admins can edit\npickFolder=Pick a folder\npickLibraryDialogTitle=Select Library\npublicDiagramUrl=Public URL of the diagram\nplaceholders=Placeholders\nplantUml=PlantUML\nplugins=Plugins\npluginUrl=Plugin URL\npluginWarning=The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n\nplusTooltip=Click to connect and clone (ctrl+click to clone, shift+click to connect). Drag to connect (ctrl+drag to clone).\nportrait=Portrait\nposition=Position\nposterPrint=Poster Print\npreferences=Preferences\npreview=Preview\npreviousPage=Previous Page\nprint=Print\nprintAllPages=Print All Pages\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nproperties=Properties\npublish=Publish\nquickStart=Quick Start Video\nrack=Rack\nradialTree=Radial Tree\nreadOnly=Read-only\nreconnecting=Reconnecting\nrecentlyUpdated=Recently Updated\nrecentlyViewed=Recently Viewed\nrectangle=Rectangle\nredirectToNewApp=This file was created or modified in a newer version of this app. You will be redirected now.\nrealtimeTimeout=It looks like you\'ve made a few changes while offline. We\'re sorry, these changes cannot be saved.\nredo=Redo\nrefresh=Refresh\nregularExpression=Regular Expression\nrelative=Relative\nrelativeUrlNotAllowed=Relative URL not allowed\nrememberMe=Remember me\nrememberThisSetting=Remember this setting\nremoveFormat=Clear Formatting\nremoveFromGroup=Remove from Group\nremoveIt=Remove {1}\nremoveWaypoint=Remove Waypoint\nrename=Rename\nrenamed=Renamed\nrenameIt=Rename {1}\nrenaming=Renaming\nreplace=Replace\nreplaceIt={1} already exists. Do you want to replace it?\nreplaceExistingDrawing=Replace existing drawing\nrequired=required\nreset=Reset\nresetView=Reset View\nresize=Resize\nresizeLargeImages=Do you want to resize large images to make the application run faster?\nretina=Retina\nresponsive=Responsive\nrestore=Restore\nrestoring=Restoring\nretryingIn=Retrying in {1} second(s)\nretryingLoad=Load failed. Retrying...\nretryingLogin=Login time out. Retrying...\nreverse=Reverse\nrevision=Revision\nrevisionHistory=Revision History\nrhombus=Rhombus\nright=Right\nrightAlign=Right Align\nrightToLeft=Right to left\nrotate=Rotate\nrotateTooltip=Click and drag to rotate, click to turn shape only by 90 degrees\nrotation=Rotation\nrounded=Rounded\nsave=Save\nsaveAndExit=Save & Exit\nsaveAs=Save as\nsaveAsXmlFile=Save as XML file?\nsaved=Saved\nsaveDiagramFirst=Please save the diagram first\nsaveDiagramsTo=Save diagrams to\nsaveLibrary403=Insufficient permissions to edit this library\nsaveLibrary500=There was an error while saving the library\nsaving=Saving\nscratchpad=Scratchpad\nscrollbars=Scrollbars\nsearch=Search\nsearchShapes=Search Shapes\nselectAll=Select All\nselectionOnly=Selection Only\nselectCard=Select Card\nselectEdges=Select Edges\nselectFile=Select File\nselectFolder=Select Folder\nselectFont=Select Font\nselectNone=Select None\nselectTemplate=Select Template\nselectVertices=Select Vertices\nsendMessage=Send\nsendYourFeedbackToDrawIo=Send your feedback to draw.io\nserviceUnavailableOrBlocked=Service unavailable or blocked\nsessionExpired=Your session has expired. Please refresh the browser window.\nsessionTimeoutOnSave=Your session has timed out and you have been disconnected from the Google Drive. Press OK to login and save. \nsetAsDefaultStyle=Set as Default Style\nshadow=Shadow\nshape=Shape\nshapes=Shapes\nshare=Share\nshareLink=Link for shared editing\nsharp=Sharp\nshow=Show\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click to expand. Drag and drop shapes into the diagram. Shift+click to change selection. Alt+click to insert and connect.\nsigns=Signs\nsignOut=Sign out\nsimple=Simple\nsimpleArrow=Simple Arrow\nsimpleViewer=Simple Viewer\nsize=Size\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstandard=Standard\nstartDrawing=Start drawing\nstopDrawing=Stop drawing\nstarting=Starting\nstraight=Straight\nstrikethrough=Strikethrough\nstrokeColor=Line Color\nstyle=Style\nsubscript=Subscript\nsummary=Summary\nsuperscript=Superscript\nsupport=Support\nsysml=SysML\ntags=Tags\ntable=Table\ntables=Tables\ntakeOver=Take Over\ntargetSpacing=Target Spacing\ntemplate=Template\ntemplates=Templates\ntext=Text\ntextAlignment=Text Alignment\ntextOpacity=Text Opacity\ntheme=Theme\ntimeout=Timeout\ntitle=Title\nto=to\ntoBack=To Back\ntoFront=To Front\ntoolbar=Toolbar\ntooltips=Tooltips\ntop=Top\ntopAlign=Top Align\ntopLeft=Top Left\ntopRight=Top Right\ntransparent=Transparent\ntransparentBackground=Transparent Background\ntrello=Trello\ntryAgain=Try again\ntryOpeningViaThisPage=Try opening via this page\nturn=Rotate shape only by 90°\ntype=Type\ntwitter=Twitter\numl=UML\nunderline=Underline\nundo=Undo\nungroup=Ungroup\nunsavedChanges=Unsaved changes\nunsavedChangesClickHereToSave=Unsaved changes. Click here to save.\nuntitled=Untitled\nuntitledDiagram=Untitled Diagram\nuntitledLayer=Untitled Layer\nuntitledLibrary=Untitled Library\nunknownError=Unknown error\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuseOffline=Use Offline\nuseRootFolder=Use root folder?\nuserManual=User Manual\nvertical=Vertical\nverticalFlow=Vertical Flow\nverticalTree=Vertical Tree\nview=View\nviewerSettings=Viewer Settings\nviewUrl=Link to view: {1}\nvoiceAssistant=Voice Assistant (beta)\nwarning=Warning\nwaypoints=Waypoints\nwest=West\nwidth=Width\nwiki=Wiki\nwordWrap=Word Wrap\nwritingDirection=Writing Direction\nyes=Yes\nyourEmailAddress=Your email address\nzoom=Zoom\nzoomIn=Zoom In\nzoomOut=Zoom Out\nbasic=Basic\nbusinessprocess=Business Processes\ncharts=Charts\nengineering=Engineering\nflowcharts=Flowcharts\ngmdl=Material Design\nmindmaps=Mindmaps\nmockups=Mockups\nnetworkdiagrams=Network Diagrams\nnothingIsSelected=Nothing is selected\nother=Other\nsoftwaredesign=Software Design\nvenndiagrams=Venn Diagrams\nwebEmailOrOther=Web, email or any other internet address\nwebLink=Web Link\nwireframes=Wireframes\nproperty=Property\nvalue=Value\nshowMore=Show More\nshowLess=Show Less\nmyDiagrams=My Diagrams\nallDiagrams=All Diagrams\nrecentlyUsed=Recently used\nlistView=List view\ngridView=Grid view\nresultsFor=Results for \'{1}\'\noneDriveCharsNotAllowed=The following characters are not allowed: ~ " # % * : < > ? / { | }\noneDriveInvalidDeviceName=The specified device name is invalid\nofficeNotLoggedOD=You are not logged in to OneDrive. Please open draw.io task pane and login first.\nofficeSelectSingleDiag=Please select a single draw.io diagram only without other contents.\nofficeSelectDiag=Please select a draw.io diagram.\nofficeCannotFindDiagram=Cannot find a draw.io diagram in the selection\nnoDiagrams=No diagrams found\nauthFailed=Authentication failed\nofficeFailedAuthMsg=Unable to successfully authenticate user or authorize application.\nconvertingDiagramFailed=Converting diagram failed\nofficeCopyImgErrMsg=Due to some limitations in the host application, the image could not be inserted. Please manually copy the image then paste it to the document.\ninsertingImageFailed=Inserting image failed\nofficeCopyImgInst=Instructions: Right-click the image below. Select "Copy image" from the context menu. Then, in the document, right-click and select "Paste" from the context menu.\nfolderEmpty=Folder is empty\nrecent=Recent\nsharedWithMe=Shared With Me\nsharepointSites=Sharepoint Sites\nerrorFetchingFolder=Error fetching folder items\nerrorAuthOD=Error authenticating to OneDrive\nofficeMainHeader=Adds draw.io diagrams to your document.\nofficeStepsHeader=This add-in performs the following steps:\nofficeStep1=Connects to Microsoft OneDrive, Google Drive or your device.\nofficeStep2=Select a draw.io diagram.\nofficeStep3=Insert the diagram into the document.\nofficeAuthPopupInfo=Please complete the authentication in the pop-up window.\nofficeSelDiag=Select draw.io Diagram:\nfiles=Files\nshared=Shared\nsharepoint=Sharepoint\nofficeManualUpdateInst=Instructions: Copy draw.io diagram from the document. Then, in the box below, right-click and select "Paste" from the context menu.\nofficeClickToEdit=Click icon to start editing:\npasteDiagram=Paste draw.io diagram here\nconnectOD=Connect to OneDrive\nselectChildren=Select Children\nselectSiblings=Select Siblings\nselectParent=Select Parent\nselectDescendants=Select Descendants\nlastSaved=Last saved {1} ago\nresolve=Resolve\nreopen=Re-open\nshowResolved=Show Resolved\nreply=Reply\nobjectNotFound=Object not found\nreOpened=Re-opened\nmarkedAsResolved=Marked as resolved\nnoCommentsFound=No comments found\ncomments=Comments\ntimeAgo={1} ago\nconfluenceCloud=Confluence Cloud\nlibraries=Libraries\nconfAnchor=Confluence Page Anchor\nconfTimeout=The connection has timed out\nconfSrvTakeTooLong=The server at {1} is taking too long to respond.\nconfCannotInsertNew=Cannot insert draw.io diagram to a new Confluence page\nconfSaveTry=Please save the page and try again.\nconfCannotGetID=Unable to determine page ID\nconfContactAdmin=Please contact your Confluence administrator.\nreadErr=Read Error\neditingErr=Editing Error\nconfExtEditNotPossible=This diagram cannot be edited externally. Please try editing it while editing the page\nconfEditedExt=Diagram/Page edited externally\ndiagNotFound=Diagram Not Found\nconfEditedExtRefresh=Diagram/Page is edited externally. Please refresh the page.\nconfCannotEditDraftDelOrExt=Cannot edit diagrams in a draft page, diagram is deleted from the page, or diagram is edited externally. Please, check the page.\nretBack=Return back\nconfDiagNotPublished=The diagram does not belong to a published page\ncreatedByDraw=Created by draw.io\nfilenameShort=Filename too short\ninvalidChars=Invalid characters\nalreadyExst={1} already exists\ndraftReadErr=Draft Read Error\ndiagCantLoad=Diagram cannot be loaded\ndraftWriteErr=Draft Write Error\ndraftCantCreate=Draft could not be created\nconfDuplName=Duplicate diagram name detected. Please pick another name.\nconfSessionExpired=Looks like your session expired. Log in again to keep working.\nlogin=Login\ndrawPrev=draw.io preview\ndrwaDiag=draw.io diagram\nunknownErr=Unkown Error\ninvalidCallFnNotFound=Invalid Call: {1} not found\ninvalidCallErrOccured=Invalid Call: An error occured, {1}\nanonymous=Anonymous\nconfGotoPage=Go to containing page\nshowComments=Show Comments\nconfError=Error: {1}\ngliffyImport=Gliffy Import\ngliffyImportInst1=Click the "Start Import" button to import all Gliffy diagrams to draw.io.\ngliffyImportInst2=Please note that the import procedure will take some time and the browser window must remain open until the import is completed.\nstartImport=Start Import\ndrawConfig=draw.io Configuration\ncustomLib=Custom Libraries\ncustomTemp=Custom Templates\npageIdsExp=Page IDs Export\ndrawReindex=draw.io re-indexing (beta)\nworking=Working\ndrawConfigNotFoundInst=draw.io Configuration Space (DRAWIOCONFIG) does not exist. This space is needed to store draw.io configuration files and custom libraries/templates.\ncreateConfSp=Create Config Space\nunexpErrRefresh=Unexpected error, please refresh the page and try again.\nconfigJSONInst=Write draw.io JSON configuration in the editor below then click save. If you need help, please refer to\nthisPage=this page\ncurCustLib=Current Custom Libraries\nlibName=Library Name\naction=Action\ndrawConfID=draw.io Config ID\naddLibInst=Click the "Add Library" button to upload a new library.\naddLib=Add Library\ncustomTempInst1=Custom templates are draw.io diagrams saved in children pages of\ncustomTempInst2=For more details, please refer to\ntempsPage=Templates page\npageIdsExpInst1=Click the "Start Export" button to export all pages IDs.\npageIdsExpInst2=Please note that the export procedure will take some time and the browser window must remain open until the export is completed.\nstartExp=Start Export\nrefreshDrawIndex=Refresh draw.io Diagrams Index\nreindexInst1=Click the "Start Indexing" button to refresh draw.io diagrams index.\nreindexInst2=Please note that the indexing procedure will take some time and the browser window must remain open until the indexing is completed.\nstartIndexing=Start Indexing\nconfAPageFoundFetch=Page "{1}" found. Fetching\nconfAAllDiagDone=All {1} diagrams processed. Process finished.\nconfAStartedProcessing=Started processing page "{1}"\nconfAAllDiagInPageDone=All {1} diagrams in page "{2}" processed successfully.\nconfAPartialDiagDone={1} out of {2} {3} diagrams in page "{4}" processed successfully.\nconfAUpdatePageFailed=Updating page "{1}" failed.\nconfANoDiagFoundInPage=No {1} diagrams found in page "{2}".\nconfAFetchPageFailed=Fetching the page failed.\nconfANoDiagFound=No {1} diagrams found. Process finished.\nconfASearchFailed=Searching for {1} diagrams failed. Please try again later.\nconfAGliffyDiagFound=Gliffy diagram "{1}" found. Importing\nconfAGliffyDiagImported=Gliffy diagram "{1}" imported successfully.\nconfASavingImpGliffyFailed=Saving imported Gliffy diagram "{1}" failed.\nconfAImportedFromByDraw=Imported from "{1}" by draw.io\nconfAImportGliffyFailed=Importing Gliffy diagram "{1}" failed.\nconfAFetchGliffyFailed=Fetching Gliffy diagram "{1}" failed.\nconfACheckBrokenDiagLnk=Checking for broken diagrams links.\nconfADelDiagLinkOf=Deleting diagram link of "{1}"\nconfADupLnk=(duplicate link)\nconfADelDiagLnkFailed=Deleting diagram link of "{1}" failed.\nconfAUnexpErrProcessPage=Unexpected error during processing the page with id: {1}\nconfADiagFoundIndex=Diagram "{1}" found. Indexing\nconfADiagIndexSucc=Diagram "{1}" indexed successfully.\nconfAIndexDiagFailed=Indexing diagram "{1}" failed.\nconfASkipDiagOtherPage=Skipped "{1}" as it belongs to another page!\nconfADiagUptoDate=Diagram "{1}" is up to date.\nconfACheckPagesWDraw=Checking pages having draw.io diagrams.\nconfAErrOccured=An error occured!\nsavedSucc=Saved successfully\nconfASaveFailedErr=Saving Failed (Unexpected Error)\ncharacter=Character\nconfAConfPageDesc=This page contains draw.io configuration file (configuration.json) as attachment\nconfALibPageDesc=This page contains draw.io custom libraries as attachments\nconfATempPageDesc=This page contains draw.io custom templates as attachments\nworking=Working\nconfAConfSpaceDesc=This space is used to store draw.io configuration files and custom libraries/templates\nconfANoCustLib=No Custom Libraries\ndelFailed=Delete failed!\nshowID=Show ID\nconfAIncorrectLibFileType=Incorrect file type. Libraries should be XML files.\nuploading=Uploading\nconfALibExist=This library already exists\nconfAUploadSucc=Uploaded successfully\nconfAUploadFailErr=Upload Failed (Unexpected Error)\nhiResPreview=High Res Preview\nofficeNotLoggedGD=You are not logged in to Google Drive. Please open draw.io task pane and login first.\nofficePopupInfo=Please complete the process in the pop-up window.\npickODFile=Pick OneDrive File\npickGDriveFile=Pick Google Drive File\npickDeviceFile=Pick Device File\nvsdNoConfig="vsdurl" is not configured\n');Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#ffffff"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#ffffff"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="white"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#ffffff"/></add></mxStylesheet>').documentElement; +null],60)}b=k.menus.get("language");null!=b&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=e?(null==P&&(f=r.addMenu("",b.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?"13px":"11px",p.appendChild(f),P=f),k.buttonContainer.style.paddingRight="34px"):(k.buttonContainer.style.paddingRight="4px",null!=P&&(P.parentNode.removeChild(P),P=null))}n.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||b(this);var k=this,m=k.editor.graph;k.toolbar=this.createToolbar(k.createDiv("geToolbar"));k.defaultLibraryName=mxResources.get("untitledLibrary");var p=document.createElement("div");p.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 q=null,r=new Menubar(k,p);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 u=k.descriptorChanged;k.descriptorChanged=function(){u.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);p.setAttribute("title",a.getTitle()+(null!=b?" ("+b+")":""))}else p.removeAttribute("title")};k.setStatusText(k.editor.getStatus());p.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;";p.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,y=document.createElement("div");y.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";k.diagramContainer.style.top="47px";var z=k.menus.get("viewZoom"); +if(null!=z){this.tabContainer.style.right="70px";var B=r.addMenu("100%",z.funct);B.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");B.style.whiteSpace="nowrap";B.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";B.style.backgroundPosition="right 6px center";B.style.backgroundRepeat="no-repeat";B.style.backgroundColor="#ffffff";B.style.paddingRight="10px";B.style.display="block";B.style.position="absolute";B.style.textDecoration="none";B.style.textDecoration="none"; +B.style.right="0px";B.style.bottom="0px";B.style.overflow="hidden";B.style.visibility="hidden";B.style.textAlign="center";B.style.color="#000";B.style.fontSize="12px";B.style.color="#707070";B.style.width="59px";B.style.cursor="pointer";B.style.borderTop="1px solid lightgray";B.style.borderLeft="1px solid lightgray";B.style.height=parseInt(k.tabContainerHeight)-1+"px";B.style.lineHeight=parseInt(k.tabContainerHeight)+1+"px";y.appendChild(B);z=mxUtils.bind(this,function(){B.innerHTML=Math.round(100* +k.editor.graph.view.scale)+"%"});k.editor.graph.view.addListener(mxEvent.EVENT_SCALE,z);k.editor.addListener("resetGraphView",z);k.editor.addListener("pageSelected",z);var J=k.setGraphEnabled;k.setGraphEnabled=function(){J.apply(this,arguments);null!=this.tabContainer&&(B.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility?this.tabContainerHeight+"px":"0px")}}y.appendChild(k.tabContainer);y.appendChild(p);y.appendChild(k.diagramContainer); +g.appendChild(y);k.updateTabContainer();var P=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 b=EditorUi.initTheme;EditorUi.initTheme=function(){b.apply(this,arguments);"min"!=uiTheme||a||(this.initMinimalTheme(),a=!0)}})();DrawioComment=function(a,b,e,d,k,m,r){this.file=a;this.id=b;this.content=e;this.modifiedDate=d;this.createdDate=k;this.isResolved=m;this.user=r;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(a){null!=a&&this.replies.push(a)};DrawioComment.prototype.addReply=function(a,b,e,d,k){b()};DrawioComment.prototype.editComment=function(a,b,e){b()};DrawioComment.prototype.deleteComment=function(a,b){a()};DrawioUser=function(a,b,e,d,k){this.id=a;this.email=b;this.displayName=e;this.pictureUrl=d;this.locale=k};mxResources.parse('# *DO NOT DIRECTLY EDIT THIS FILE, IT IS AUTOMATICALLY GENERATED AND IT IS BASED ON:*\n# https://docs.google.com/spreadsheet/ccc?key=0AmQEO36liL4FdDJLWVNMaVV2UmRKSnpXU09MYkdGbEE\naboutDrawio=About draw.io\naccessDenied=Access Denied\naction=Action\nactualSize=Actual Size\nadd=Add\naddedFile=Added {1}\naddImages=Add Images\naddImageUrl=Add Image URL\naddLayer=Add Layer\naddProperty=Add Property\naddress=Address\naddToExistingDrawing=Add to Existing Drawing\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nalign=Align\nalignment=Alignment\nallChangesLost=All changes will be lost!\nallPages=All Pages\nallProjects=All Projects\nallSpaces=All Spaces\nallTags=All Tags\nanchor=Anchor\nandroid=Android\nangle=Angle\narc=Arc\nareYouSure=Are you sure?\nensureDataSaved=Please ensure your data is saved before closing.\nallChangesSaved=All changes saved\nallChangesSavedInDrive=All changes saved in Drive\nallowPopups=Allow pop-ups to avoid this dialog.\nallowRelativeUrl=Allow relative URL\nalreadyConnected=Nodes already connected\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\nasNew=As New\natlas=Atlas\nauthor=Author\nauthorizationRequired=Authorization required\nauthorizeThisAppIn=Authorize this app in {1}:\nauthorize=Authorize\nauthorizing=Authorizing\nautomatic=Automatic\nautosave=Autosave\nautosize=Autosize\nattachments=Attachments\naws=AWS\naws3d=AWS 3D\nazure=Azure\nback=Back\nbackground=Background\nbackgroundColor=Background Color\nbackgroundImage=Background Image\nbasic=Basic\nblankDrawing=Blank Drawing\nblankDiagram=Blank Diagram\nblock=Block\nblockquote=Blockquote\nblog=Blog\nbold=Bold\nbootstrap=Bootstrap\nborder=Border\nborderColor=Border Color\nborderWidth=Borderwidth\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\nbrowser=Browser\nbulletedList=Bulleted List\nbusiness=Business\nbusy=Operation in progress\ncabinets=Cabinets\ncancel=Cancel\ncenter=Center\ncannotLoad=Load attempts failed. Please try again later.\ncannotLogin=Log in attempts failed. Please try again later.\ncannotOpenFile=Cannot open file\nchange=Change\nchangeOrientation=Change Orientation\nchangeUser=Change user\nchangeStorage=Change storage\nchangesNotSaved=Changes have not been saved\nuserJoined={1} has joined\nuserLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\ncollaborativeEditingNotice=Important Notice for Collaborative Editing\ncompressed=Compressed\ncommitMessage=Commit Message\ncsv=CSV\ndark=Dark\ndraftFound=A draft for \'{1}\' has been found. Load it into the editor or discard it to continue.\ndragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?\ndropboxCharsNotAllowed=The following characters are not allowed: / : ? * " |\ncheck=Check\nchecksum=Checksum\ncircle=Circle\ncisco=Cisco\nclassic=Classic\nclearDefaultStyle=Clear Default Style\nclearWaypoints=Clear Waypoints\nclipart=Clipart\nclose=Close\ncollaborator=Collaborator\ncollaborators=Collaborators\ncollapse=Collapse\ncollapseExpand=Collapse/Expand\ncollapse-expand=Click to collapse/expand\nShift-click to move neighbors \nAlt-click to protect group size\ncollapsible=Collapsible\ncomic=Comic\ncomment=Comment\ncommentsNotes=Comments/Notes\ncompress=Compress\nconnect=Connect\nconnecting=Connecting\nconnectWithDrive=Connect with Google Drive\nconnection=Connection\nconnectionArrows=Connection Arrows\nconnectionPoints=Connection Points\nconstrainProportions=Constrain Proportions\ncontainsValidationErrors=Contains validation errors\ncopiedToClipboard=Copied to clipboard\ncopy=Copy\ncopyConnect=Copy on connect\ncopyCreated=A copy of the file was created.\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopySize=Copy Size\ncopyStyle=Copy Style\ncreate=Create\ncreateNewDiagram=Create New Diagram\ncreateRevision=Create Revision\ncreateShape=Create Shape\ncrop=Crop\ncurved=Curved\ncustom=Custom\ncurrent=Current\ncut=Cut\ndashed=Dashed\ndecideLater=Decide later\ndefault=Default\ndelete=Delete\ndeleteColumn=Delete Column\ndeleteLibrary401=Insufficient permissions to delete this library\ndeleteLibrary404=Selected library could not be found\ndeleteLibrary500=Error deleting library\ndeleteLibraryConfirm=You are about to permanently delete this library. Are you sure you want to do this?\ndeleteRow=Delete Row\ndescription=Description\ndevice=Device\ndiagram=Diagram\ndiagramContent=Diagram Content\ndiagramLocked=Diagram has been locked to prevent further data loss.\ndiagramLockedBySince=The diagram is locked by {1} since {2} ago\ndiagramName=Diagram Name\ndiagramIsPublic=Diagram is public\ndiagramIsNotPublic=Diagram is not public\ndiamond=Diamond\ndiamondThin=Diamond (thin)\ndidYouKnow=Did you know...\ndirection=Direction\ndiscard=Discard\ndiscardChangesAndReconnect=Discard Changes and Reconnect\ngoogleDriveMissingClickHere=Google Drive missing? Click here!\ndiscardChanges=Discard Changes\ndisconnected=Disconnected\ndistribute=Distribute\ndone=Done\ndotted=Dotted\ndoubleClickOrientation=Doubleclick to change orientation\ndoubleClickTooltip=Doubleclick to insert text\ndoubleClickChangeProperty=Doubleclick to change property name\ndownload=Download\ndownloadDesktop=Download draw.io Desktop\ndownloadAs=Download as\nclickHereToSave=Click here to save.\ndraftDiscarded=Draft discarded\ndraftSaved=Draft saved\ndragElementsHere=Drag elements here\ndragImagesHere=Drag images or URLs here\ndragUrlsHere=Drag URLs here\ndraw.io=draw.io\ndrawing=Drawing{1}\ndrawingEmpty=Drawing is empty\ndrawingTooLarge=Drawing is too large\ndrawioForWork=Draw.io for GSuite\ndropbox=Dropbox\nduplicate=Duplicate\nduplicateIt=Duplicate {1}\ndivider=Divider\ndx=Dx\ndy=Dy\neast=East\nedit=Edit\neditData=Edit Data\neditDiagram=Edit Diagram\neditGeometry=Edit Geometry\neditImage=Edit Image\neditImageUrl=Edit Image URL\neditLink=Edit Link\neditShape=Edit Shape\neditStyle=Edit Style\neditText=Edit Text\neditTooltip=Edit Tooltip\nglass=Glass\ngoogleImages=Google Images\nimageSearch=Image Search\neip=EIP\nembed=Embed\nembedImages=Embed Images\nmainEmbedNotice=Paste this into the page\nelectrical=Electrical\nellipse=Ellipse\nembedNotice=Paste this once at the end of the page\nenterGroup=Enter Group\nenterName=Enter Name\nenterPropertyName=Enter Property Name\nenterValue=Enter Value\nentityRelation=Entity Relation\nerror=Error\nerrorDeletingFile=Error deleting file\nerrorLoadingFile=Error loading file\nerrorRenamingFile=Error renaming file\nerrorRenamingFileNotFound=Error renaming file. File was not found.\nerrorRenamingFileForbidden=Error renaming file. Insufficient access rights.\nerrorSavingDraft=Error saving draft\nerrorSavingFile=Error saving file\nerrorSavingFileUnknown=Error authorizing with Google\'s servers. Please refresh the page to re-attempt.\nerrorSavingFileForbidden=Error saving file. Insufficient access rights.\nerrorSavingFileNameConflict=Could not save diagram. Current page already contains file named \'{1}\'.\nerrorSavingFileNotFound=Error saving file. File was not found.\nerrorSavingFileReadOnlyMode=Could not save diagram while read-only mode is active.\nerrorSavingFileSessionTimeout=Your session has ended. Please <a target=\'_blank\' href=\'{1}\'>{2}</a> and return to this tab to try to save again.\nerrorSendingFeedback=Error sending feedback.\nerrorUpdatingPreview=Error updating preview.\nexit=Exit\nexitGroup=Exit Group\nexpand=Expand\nexport=Export\nexporting=Exporting\nexportAs=Export as\nexportOptionsDisabled=Export options disabled\nexportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.\nexternalChanges=External Changes\nextras=Extras\nfacebook=Facebook\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwriteDialog=The file has been modified. Do you want to save the file and overwrite those changes?\nfileChangedSyncDialog=The file has been modified. Do you want to synchronize those changes?\nfileChangedSync=The file has been modified. Click here to synchronize.\noverwrite=Overwrite\nsynchronize=Synchronize\nfilename=Filename\nfileExists=File already exists\nfileNearlyFullSeeFaq=File nearly full, please see FAQ\nfileNotFound=File not found\nrepositoryNotFound=Repository not found\nfileNotFoundOrDenied=The file was not found. It does not exist or you do not have read access.\nfileNotLoaded=File not loaded\nfileNotSaved=File not saved\nfileOpenLocation=How would you like to open these file(s)?\nfiletypeHtml=.html causes file to save as HTML with redirect to cloud URL\nfiletypePng=.png causes file to save as PNG with embedded data\nfiletypeSvg=.svg causes file to save as SVG with embedded data\nfileWillBeSavedInAppFolder={1} will be saved in the app folder.\nfill=Fill\nfillColor=Fill Color\nfilterCards=Filter Cards\nfind=Find\nfit=Fit\nfitContainer=Resize Container\nfitIntoContainer=Fit into Container\nfitPage=Fit Page\nfitPageWidth=Fit Page Width\nfitTo=Fit to\nfitToSheetsAcross=sheet(s) across\nfitToBy=by\nfitToSheetsDown=sheet(s) down\nfitTwoPages=Two Pages\nfitWindow=Fit Window\nflip=Flip\nflipH=Flip Horizontal\nflipV=Flip Vertical\nflowchart=Flowchart\nfolder=Folder\nfont=Font\nfontColor=Font Color\nfontFamily=Font Family\nfontSize=Font Size\nforbidden=You are not authorized to access this file\nformat=Format\nformatPanel=Format Panel\nformatted=Formatted\nformattedText=Formatted Text\nformatPng=PNG\nformatGif=GIF\nformatJpg=JPEG\nformatPdf=PDF\nformatSql=SQL\nformatSvg=SVG\nformatHtmlEmbedded=HTML\nformatSvgEmbedded=SVG (with XML)\nformatVsdx=VSDX\nformatVssx=VSSX\nformatXmlPlain=XML (Plain)\nformatXml=XML\nforum=Discussion/Help Forums\nfreehand=Freehand\nfromTemplate=From Template\nfromTemplateUrl=From Template URL\nfromText=From Text\nfromUrl=From URL\nfromThisPage=From this page\nfullscreen=Fullscreen\ngap=Gap\ngcp=GCP\ngeneral=General\ngithub=GitHub\ngitlab=GitLab\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\ngooglePlus=Google+\ngoogleSharingNotAvailable=Sharing is only available via Google Drive. Please click Open below and share from the more actions menu:\ngoogleSlides=Google Slides\ngoogleSites=Google Sites\ngradient=Gradient\ngradientColor=Color\ngrid=Grid\ngridColor=Grid Color\ngridSize=Grid Size\ngroup=Group\nguides=Guides\nhateApp=I hate draw.io\nheading=Heading\nheight=Height\nhelp=Help\nhelpTranslate=Help us translate this application\nhide=Hide\nhideIt=Hide {1}\nhidden=Hidden\nhome=Home\nhorizontal=Horizontal\nhorizontalFlow=Horizontal Flow\nhorizontalTree=Horizontal Tree\nhowTranslate=How good is the translation in your language?\nhtml=HTML\nhtmlText=HTML Text\nid=ID\niframe=IFrame\nignore=Ignore\nimage=Image\nimageUrl=Image URL\nimages=Images\nimagePreviewError=This image couldn\'t be loaded for preview. Please check the URL.\nimageTooBig=Image too big\nimgur=Imgur\nimport=Import\nimportFrom=Import from\nincludeCopyOfMyDiagram=Include a copy of my diagram\nincreaseIndent=Increase Indent\ndecreaseIndent=Decrease Indent\ninsert=Insert\ninsertColumnBefore=Insert Column Left\ninsertColumnAfter=Insert Column Right\ninsertEllipse=Insert Ellipse\ninsertImage=Insert Image\ninsertHorizontalRule=Insert Horizontal Rule\ninsertLink=Insert Link\ninsertPage=Insert Page\ninsertRectangle=Insert Rectangle\ninsertRhombus=Insert Rhombus\ninsertRowBefore=Insert Row Above\ninsertRowAfter=Insert Row After\ninsertText=Insert Text\ninserting=Inserting\ninvalidFilename=Diagram names must not contain the following characters: / | : ; { } < > & + ? = "\ninvalidLicenseSeeThisPage=Your license is invalid, please see this <a target="_blank" href="https://support.draw.io/display/DFCS/Licensing+your+draw.io+plugin">page</a>.\ninvalidInput=Invalid input\ninvalidName=Invalid name\ninvalidOrMissingFile=Invalid or missing file\ninvalidPublicUrl=Invalid public URL\nisometric=Isometric\nios=iOS\nitalic=Italic\nkennedy=Kennedy\nkeyboardShortcuts=Keyboard Shortcuts\nlayers=Layers\nlandscape=Landscape\nlanguage=Language\nleanMapping=Lean Mapping\nlastChange=Last change {1} ago\nlessThanAMinute=less than a minute\nlicensingError=Licensing Error\nlicenseHasExpired=The license for {1} has expired on {2}. Click here.\nlicenseWillExpire=The license for {1} will expire on {2}. Click here.\nlineJumps=Line jumps\nlinkAccountRequired=If the diagram is not public a Google account is required to view the link.\nlinkText=Link Text\nlist=List\nminute=minute\nminutes=minutes\nhours=hours\ndays=days\nmonths=months\nyears=years\nrestartForChangeRequired=Changes will take effect after page refresh.\nlaneColor=Lanecolor\nlastModified=Last modified\nlayout=Layout\nleft=Left\nleftAlign=Left Align\nleftToRight=Left to right\nlibraryTooltip=Drag and drop shapes here or click + to insert. Double click to edit.\nlightbox=Lightbox\nline=Line\nlineend=Line end\nlineheight=Line Height\nlinestart=Line start\nlinewidth=Linewidth\nlink=Link\nlinks=Links\nloading=Loading\nlockUnlock=Lock/Unlock\nloggedOut=Logged Out\nlogIn=log in\nloveIt=I love {1}\nlucidchart=Lucidchart\nmaps=Maps\nmathematicalTypesetting=Mathematical Typesetting\nmakeCopy=Make a Copy\nmanual=Manual\nmicrosoftOffice=Microsoft Office\nmicrosoftExcel=Microsoft Excel\nmicrosoftPowerPoint=Microsoft PowerPoint\nmicrosoftWord=Microsoft Word\nmiddle=Middle\nminimal=Minimal\nmisc=Misc\nmockups=Mockups\nmodificationDate=Modification date\nmodifiedBy=Modified by\nmore=More\nmoreResults=More Results\nmoreShapes=More Shapes\nmove=Move\nmoveToFolder=Move to Folder\nmoving=Moving\nmoveSelectionTo=Move selection to {1}\nname=Name\nnavigation=Navigation\nnetwork=Network\nnetworking=Networking\nnew=New\nnewLibrary=New Library\nnextPage=Next Page\nno=No\nnoPickFolder=No, pick folder\nnoAttachments=No attachments found\nnoColor=No Color\nnoFiles=No Files\nnoFileSelected=No file selected\nnoLibraries=No libraries found\nnoMoreResults=No more results\nnone=None\nnoOtherViewers=No other viewers\nnoPlugins=No plugins\nnoPreview=No preview\nnoResponse=No response from server\nnoResultsFor=No results for \'{1}\'\nnoRevisions=No revisions\nnoSearchResults=No search results found\nnoPageContentOrNotSaved=No anchors found on this page or it hasn\'t been saved yet\nnormal=Normal\nnorth=North\nnotADiagramFile=Not a diagram file\nnotALibraryFile=Not a library file\nnotAvailable=Not available\nnotAUtf8File=Not a UTF-8 file\nnotConnected=Not connected\nnote=Note\nnotUsingService=Not using {1}?\nnumberedList=Numbered list\noffline=Offline\nok=OK\noneDrive=OneDrive\nonline=Online\nopacity=Opacity\nopen=Open\nopenArrow=Open Arrow\nopenExistingDiagram=Open Existing Diagram\nopenFile=Open File\nopenFrom=Open from\nopenLibrary=Open Library\nopenLibraryFrom=Open Library from\nopenLink=Open Link\nopenInNewWindow=Open in New Window\nopenInThisWindow=Open in This Window\nopenIt=Open {1}\nopenRecent=Open Recent\nopenSupported=Supported formats are files saved from this software (.xml), .vsdx and .gliffy\noptions=Options\norganic=Organic\northogonal=Orthogonal\notherViewer=other viewer\notherViewers=other viewers\noutline=Outline\noval=Oval\npage=Page\npageContent=Page Content\npageNotFound=Page not found\npageWithNumber=Page-{1}\npages=Pages\npageView=Page View\npageSetup=Page Setup\npageScale=Page Scale\npan=Pan\npanTooltip=Space+Drag to pan\npaperSize=Paper Size\npattern=Pattern\npaste=Paste\npasteHere=Paste here\npasteSize=Paste Size\npasteStyle=Paste Style\nperimeter=Perimeter\npermissionAnyone=Anyone can edit\npermissionAuthor=Owner and admins can edit\npickFolder=Pick a folder\npickLibraryDialogTitle=Select Library\npublicDiagramUrl=Public URL of the diagram\nplaceholders=Placeholders\nplantUml=PlantUML\nplugins=Plugins\npluginUrl=Plugin URL\npluginWarning=The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n\nplusTooltip=Click to connect and clone (ctrl+click to clone, shift+click to connect). Drag to connect (ctrl+drag to clone).\nportrait=Portrait\nposition=Position\nposterPrint=Poster Print\npreferences=Preferences\npreview=Preview\npreviousPage=Previous Page\nprint=Print\nprintAllPages=Print All Pages\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nproperties=Properties\npublish=Publish\nquickStart=Quick Start Video\nrack=Rack\nradialTree=Radial Tree\nreadOnly=Read-only\nreconnecting=Reconnecting\nrecentlyUpdated=Recently Updated\nrecentlyViewed=Recently Viewed\nrectangle=Rectangle\nredirectToNewApp=This file was created or modified in a newer version of this app. You will be redirected now.\nrealtimeTimeout=It looks like you\'ve made a few changes while offline. We\'re sorry, these changes cannot be saved.\nredo=Redo\nrefresh=Refresh\nregularExpression=Regular Expression\nrelative=Relative\nrelativeUrlNotAllowed=Relative URL not allowed\nrememberMe=Remember me\nrememberThisSetting=Remember this setting\nremoveFormat=Clear Formatting\nremoveFromGroup=Remove from Group\nremoveIt=Remove {1}\nremoveWaypoint=Remove Waypoint\nrename=Rename\nrenamed=Renamed\nrenameIt=Rename {1}\nrenaming=Renaming\nreplace=Replace\nreplaceIt={1} already exists. Do you want to replace it?\nreplaceExistingDrawing=Replace existing drawing\nrequired=required\nreset=Reset\nresetView=Reset View\nresize=Resize\nresizeLargeImages=Do you want to resize large images to make the application run faster?\nretina=Retina\nresponsive=Responsive\nrestore=Restore\nrestoring=Restoring\nretryingIn=Retrying in {1} second(s)\nretryingLoad=Load failed. Retrying...\nretryingLogin=Login time out. Retrying...\nreverse=Reverse\nrevision=Revision\nrevisionHistory=Revision History\nrhombus=Rhombus\nright=Right\nrightAlign=Right Align\nrightToLeft=Right to left\nrotate=Rotate\nrotateTooltip=Click and drag to rotate, click to turn shape only by 90 degrees\nrotation=Rotation\nrounded=Rounded\nsave=Save\nsaveAndExit=Save & Exit\nsaveAs=Save as\nsaveAsXmlFile=Save as XML file?\nsaved=Saved\nsaveDiagramFirst=Please save the diagram first\nsaveDiagramsTo=Save diagrams to\nsaveLibrary403=Insufficient permissions to edit this library\nsaveLibrary500=There was an error while saving the library\nsaving=Saving\nscratchpad=Scratchpad\nscrollbars=Scrollbars\nsearch=Search\nsearchShapes=Search Shapes\nselectAll=Select All\nselectionOnly=Selection Only\nselectCard=Select Card\nselectEdges=Select Edges\nselectFile=Select File\nselectFolder=Select Folder\nselectFont=Select Font\nselectNone=Select None\nselectTemplate=Select Template\nselectVertices=Select Vertices\nsendMessage=Send\nsendYourFeedbackToDrawIo=Send your feedback to draw.io\nserviceUnavailableOrBlocked=Service unavailable or blocked\nsessionExpired=Your session has expired. Please refresh the browser window.\nsessionTimeoutOnSave=Your session has timed out and you have been disconnected from the Google Drive. Press OK to login and save. \nsetAsDefaultStyle=Set as Default Style\nshadow=Shadow\nshape=Shape\nshapes=Shapes\nshare=Share\nshareLink=Link for shared editing\nsharp=Sharp\nshow=Show\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click to expand. Drag and drop shapes into the diagram. Shift+click to change selection. Alt+click to insert and connect.\nsigns=Signs\nsignOut=Sign out\nsimple=Simple\nsimpleArrow=Simple Arrow\nsimpleViewer=Simple Viewer\nsize=Size\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstandard=Standard\nstartDrawing=Start drawing\nstopDrawing=Stop drawing\nstarting=Starting\nstraight=Straight\nstrikethrough=Strikethrough\nstrokeColor=Line Color\nstyle=Style\nsubscript=Subscript\nsummary=Summary\nsuperscript=Superscript\nsupport=Support\nsysml=SysML\ntags=Tags\ntable=Table\ntables=Tables\ntakeOver=Take Over\ntargetSpacing=Target Spacing\ntemplate=Template\ntemplates=Templates\ntext=Text\ntextAlignment=Text Alignment\ntextOpacity=Text Opacity\ntheme=Theme\ntimeout=Timeout\ntitle=Title\nto=to\ntoBack=To Back\ntoFront=To Front\ntoolbar=Toolbar\ntooltips=Tooltips\ntop=Top\ntopAlign=Top Align\ntopLeft=Top Left\ntopRight=Top Right\ntransparent=Transparent\ntransparentBackground=Transparent Background\ntrello=Trello\ntryAgain=Try again\ntryOpeningViaThisPage=Try opening via this page\nturn=Rotate shape only by 90°\ntype=Type\ntwitter=Twitter\numl=UML\nunderline=Underline\nundo=Undo\nungroup=Ungroup\nunsavedChanges=Unsaved changes\nunsavedChangesClickHereToSave=Unsaved changes. Click here to save.\nuntitled=Untitled\nuntitledDiagram=Untitled Diagram\nuntitledLayer=Untitled Layer\nuntitledLibrary=Untitled Library\nunknownError=Unknown error\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuseOffline=Use Offline\nuseRootFolder=Use root folder?\nuserManual=User Manual\nvertical=Vertical\nverticalFlow=Vertical Flow\nverticalTree=Vertical Tree\nview=View\nviewerSettings=Viewer Settings\nviewUrl=Link to view: {1}\nvoiceAssistant=Voice Assistant (beta)\nwarning=Warning\nwaypoints=Waypoints\nwest=West\nwidth=Width\nwiki=Wiki\nwordWrap=Word Wrap\nwritingDirection=Writing Direction\nyes=Yes\nyourEmailAddress=Your email address\nzoom=Zoom\nzoomIn=Zoom In\nzoomOut=Zoom Out\nbasic=Basic\nbusinessprocess=Business Processes\ncharts=Charts\nengineering=Engineering\nflowcharts=Flowcharts\ngmdl=Material Design\nmindmaps=Mindmaps\nmockups=Mockups\nnetworkdiagrams=Network Diagrams\nnothingIsSelected=Nothing is selected\nother=Other\nsoftwaredesign=Software Design\nvenndiagrams=Venn Diagrams\nwebEmailOrOther=Web, email or any other internet address\nwebLink=Web Link\nwireframes=Wireframes\nproperty=Property\nvalue=Value\nshowMore=Show More\nshowLess=Show Less\nmyDiagrams=My Diagrams\nallDiagrams=All Diagrams\nrecentlyUsed=Recently used\nlistView=List view\ngridView=Grid view\nresultsFor=Results for \'{1}\'\noneDriveCharsNotAllowed=The following characters are not allowed: ~ " # % * : < > ? / { | }\noneDriveInvalidDeviceName=The specified device name is invalid\nofficeNotLoggedOD=You are not logged in to OneDrive. Please open draw.io task pane and login first.\nofficeSelectSingleDiag=Please select a single draw.io diagram only without other contents.\nofficeSelectDiag=Please select a draw.io diagram.\nofficeCannotFindDiagram=Cannot find a draw.io diagram in the selection\nnoDiagrams=No diagrams found\nauthFailed=Authentication failed\nofficeFailedAuthMsg=Unable to successfully authenticate user or authorize application.\nconvertingDiagramFailed=Converting diagram failed\nofficeCopyImgErrMsg=Due to some limitations in the host application, the image could not be inserted. Please manually copy the image then paste it to the document.\ninsertingImageFailed=Inserting image failed\nofficeCopyImgInst=Instructions: Right-click the image below. Select "Copy image" from the context menu. Then, in the document, right-click and select "Paste" from the context menu.\nfolderEmpty=Folder is empty\nrecent=Recent\nsharedWithMe=Shared With Me\nsharepointSites=Sharepoint Sites\nerrorFetchingFolder=Error fetching folder items\nerrorAuthOD=Error authenticating to OneDrive\nofficeMainHeader=Adds draw.io diagrams to your document.\nofficeStepsHeader=This add-in performs the following steps:\nofficeStep1=Connects to Microsoft OneDrive, Google Drive or your device.\nofficeStep2=Select a draw.io diagram.\nofficeStep3=Insert the diagram into the document.\nofficeAuthPopupInfo=Please complete the authentication in the pop-up window.\nofficeSelDiag=Select draw.io Diagram:\nfiles=Files\nshared=Shared\nsharepoint=Sharepoint\nofficeManualUpdateInst=Instructions: Copy draw.io diagram from the document. Then, in the box below, right-click and select "Paste" from the context menu.\nofficeClickToEdit=Click icon to start editing:\npasteDiagram=Paste draw.io diagram here\nconnectOD=Connect to OneDrive\nselectChildren=Select Children\nselectSiblings=Select Siblings\nselectParent=Select Parent\nselectDescendants=Select Descendants\nlastSaved=Last saved {1} ago\nresolve=Resolve\nreopen=Re-open\nshowResolved=Show Resolved\nreply=Reply\nobjectNotFound=Object not found\nreOpened=Re-opened\nmarkedAsResolved=Marked as resolved\nnoCommentsFound=No comments found\ncomments=Comments\ntimeAgo={1} ago\nconfluenceCloud=Confluence Cloud\nlibraries=Libraries\nconfAnchor=Confluence Page Anchor\nconfTimeout=The connection has timed out\nconfSrvTakeTooLong=The server at {1} is taking too long to respond.\nconfCannotInsertNew=Cannot insert draw.io diagram to a new Confluence page\nconfSaveTry=Please save the page and try again.\nconfCannotGetID=Unable to determine page ID\nconfContactAdmin=Please contact your Confluence administrator.\nreadErr=Read Error\neditingErr=Editing Error\nconfExtEditNotPossible=This diagram cannot be edited externally. Please try editing it while editing the page\nconfEditedExt=Diagram/Page edited externally\ndiagNotFound=Diagram Not Found\nconfEditedExtRefresh=Diagram/Page is edited externally. Please refresh the page.\nconfCannotEditDraftDelOrExt=Cannot edit diagrams in a draft page, diagram is deleted from the page, or diagram is edited externally. Please, check the page.\nretBack=Return back\nconfDiagNotPublished=The diagram does not belong to a published page\ncreatedByDraw=Created by draw.io\nfilenameShort=Filename too short\ninvalidChars=Invalid characters\nalreadyExst={1} already exists\ndraftReadErr=Draft Read Error\ndiagCantLoad=Diagram cannot be loaded\ndraftWriteErr=Draft Write Error\ndraftCantCreate=Draft could not be created\nconfDuplName=Duplicate diagram name detected. Please pick another name.\nconfSessionExpired=Looks like your session expired. Log in again to keep working.\nlogin=Login\ndrawPrev=draw.io preview\ndrwaDiag=draw.io diagram\nunknownErr=Unkown Error\ninvalidCallFnNotFound=Invalid Call: {1} not found\ninvalidCallErrOccured=Invalid Call: An error occured, {1}\nanonymous=Anonymous\nconfGotoPage=Go to containing page\nshowComments=Show Comments\nconfError=Error: {1}\ngliffyImport=Gliffy Import\ngliffyImportInst1=Click the "Start Import" button to import all Gliffy diagrams to draw.io.\ngliffyImportInst2=Please note that the import procedure will take some time and the browser window must remain open until the import is completed.\nstartImport=Start Import\ndrawConfig=draw.io Configuration\ncustomLib=Custom Libraries\ncustomTemp=Custom Templates\npageIdsExp=Page IDs Export\ndrawReindex=draw.io re-indexing (beta)\nworking=Working\ndrawConfigNotFoundInst=draw.io Configuration Space (DRAWIOCONFIG) does not exist. This space is needed to store draw.io configuration files and custom libraries/templates.\ncreateConfSp=Create Config Space\nunexpErrRefresh=Unexpected error, please refresh the page and try again.\nconfigJSONInst=Write draw.io JSON configuration in the editor below then click save. If you need help, please refer to\nthisPage=this page\ncurCustLib=Current Custom Libraries\nlibName=Library Name\naction=Action\ndrawConfID=draw.io Config ID\naddLibInst=Click the "Add Library" button to upload a new library.\naddLib=Add Library\ncustomTempInst1=Custom templates are draw.io diagrams saved in children pages of\ncustomTempInst2=For more details, please refer to\ntempsPage=Templates page\npageIdsExpInst1=Click the "Start Export" button to export all pages IDs.\npageIdsExpInst2=Please note that the export procedure will take some time and the browser window must remain open until the export is completed.\nstartExp=Start Export\nrefreshDrawIndex=Refresh draw.io Diagrams Index\nreindexInst1=Click the "Start Indexing" button to refresh draw.io diagrams index.\nreindexInst2=Please note that the indexing procedure will take some time and the browser window must remain open until the indexing is completed.\nstartIndexing=Start Indexing\nconfAPageFoundFetch=Page "{1}" found. Fetching\nconfAAllDiagDone=All {1} diagrams processed. Process finished.\nconfAStartedProcessing=Started processing page "{1}"\nconfAAllDiagInPageDone=All {1} diagrams in page "{2}" processed successfully.\nconfAPartialDiagDone={1} out of {2} {3} diagrams in page "{4}" processed successfully.\nconfAUpdatePageFailed=Updating page "{1}" failed.\nconfANoDiagFoundInPage=No {1} diagrams found in page "{2}".\nconfAFetchPageFailed=Fetching the page failed.\nconfANoDiagFound=No {1} diagrams found. Process finished.\nconfASearchFailed=Searching for {1} diagrams failed. Please try again later.\nconfAGliffyDiagFound=Gliffy diagram "{1}" found. Importing\nconfAGliffyDiagImported=Gliffy diagram "{1}" imported successfully.\nconfASavingImpGliffyFailed=Saving imported Gliffy diagram "{1}" failed.\nconfAImportedFromByDraw=Imported from "{1}" by draw.io\nconfAImportGliffyFailed=Importing Gliffy diagram "{1}" failed.\nconfAFetchGliffyFailed=Fetching Gliffy diagram "{1}" failed.\nconfACheckBrokenDiagLnk=Checking for broken diagrams links.\nconfADelDiagLinkOf=Deleting diagram link of "{1}"\nconfADupLnk=(duplicate link)\nconfADelDiagLnkFailed=Deleting diagram link of "{1}" failed.\nconfAUnexpErrProcessPage=Unexpected error during processing the page with id: {1}\nconfADiagFoundIndex=Diagram "{1}" found. Indexing\nconfADiagIndexSucc=Diagram "{1}" indexed successfully.\nconfAIndexDiagFailed=Indexing diagram "{1}" failed.\nconfASkipDiagOtherPage=Skipped "{1}" as it belongs to another page!\nconfADiagUptoDate=Diagram "{1}" is up to date.\nconfACheckPagesWDraw=Checking pages having draw.io diagrams.\nconfAErrOccured=An error occured!\nsavedSucc=Saved successfully\nconfASaveFailedErr=Saving Failed (Unexpected Error)\ncharacter=Character\nconfAConfPageDesc=This page contains draw.io configuration file (configuration.json) as attachment\nconfALibPageDesc=This page contains draw.io custom libraries as attachments\nconfATempPageDesc=This page contains draw.io custom templates as attachments\nworking=Working\nconfAConfSpaceDesc=This space is used to store draw.io configuration files and custom libraries/templates\nconfANoCustLib=No Custom Libraries\ndelFailed=Delete failed!\nshowID=Show ID\nconfAIncorrectLibFileType=Incorrect file type. Libraries should be XML files.\nuploading=Uploading\nconfALibExist=This library already exists\nconfAUploadSucc=Uploaded successfully\nconfAUploadFailErr=Upload Failed (Unexpected Error)\nhiResPreview=High Res Preview\nofficeNotLoggedGD=You are not logged in to Google Drive. Please open draw.io task pane and login first.\nofficePopupInfo=Please complete the process in the pop-up window.\npickODFile=Pick OneDrive File\npickGDriveFile=Pick Google Drive File\npickDeviceFile=Pick Device File\nvsdNoConfig="vsdurl" is not configured\n');Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#ffffff"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#ffffff"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="white"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#ffffff"/></add></mxStylesheet>').documentElement; Graph.prototype.defaultThemes.darkTheme=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#2a2a2a"/><add as="strokeColor" value="#f0f0f0"/><add as="fontColor" value="#f0f0f0"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#f0f0f0"/><add as="fontColor" value="#f0f0f0"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#2a2a2a"/></add></mxStylesheet>').documentElement;GraphViewer=function(a,b,e){this.init(a,b,e)};mxUtils.extend(GraphViewer,mxEventSource);GraphViewer.prototype.editBlankUrl="https://www.draw.io/";GraphViewer.prototype.imageBaseUrl="https://www.draw.io/";GraphViewer.prototype.toolbarHeight="BackCompat"==document.compatMode?28:30;GraphViewer.prototype.lightboxChrome=!0;GraphViewer.prototype.lightboxZIndex=999;GraphViewer.prototype.toolbarZIndex=999;GraphViewer.prototype.autoFit=!0;GraphViewer.prototype.allowZoomIn=!1; GraphViewer.prototype.showTitleAsTooltip=!1;GraphViewer.prototype.checkVisibleState=!0;GraphViewer.prototype.minHeight=28;GraphViewer.prototype.minWidth=100; GraphViewer.prototype.init=function(a,b,e){this.graphConfig=null!=e?e:{};this.autoFit=null!=this.graphConfig["auto-fit"]?this.graphConfig["auto-fit"]:this.autoFit;this.allowZoomIn=null!=this.graphConfig["allow-zoom-in"]?this.graphConfig["allow-zoom-in"]:this.allowZoomIn;this.checkVisibleState=null!=this.graphConfig["check-visible-state"]?this.graphConfig["check-visible-state"]:this.checkVisibleState;this.toolbarItems=null!=this.graphConfig.toolbar?this.graphConfig.toolbar.split(" "):[];this.zoomEnabled= 0<=mxUtils.indexOf(this.toolbarItems,"zoom");this.layersEnabled=0<=mxUtils.indexOf(this.toolbarItems,"layers");this.lightboxEnabled=0<=mxUtils.indexOf(this.toolbarItems,"lightbox");this.lightboxClickEnabled=0!=this.graphConfig.lightbox;this.initialWidth=null!=a?a.style.width:null;this.widthIsEmpty=null!=this.initialWidth?""==this.initialWidth:!0;this.currentPage=parseInt(this.graphConfig.page)||0;this.pageId=this.graphConfig.pageId;this.editor=null;"inline"==this.graphConfig["toolbar-position"]&& (this.minHeight+=this.toolbarHeight);if(null!=b&&(this.xmlDocument=b.ownerDocument,this.xmlNode=b,this.xml=mxUtils.getXml(b),null!=a)){var d=mxUtils.bind(this,function(){this.graph=new Graph(a);this.graph.defaultPageBackgroundColor="transparent";this.graph.transparentBackground=!1;this.graphConfig.move&&(this.graph.isMoveCellsEvent=function(a){return!0});this.lightboxClickEnabled&&(a.style.cursor="pointer");this.editor=new Editor(!0,null,null,this.graph);this.editor.editBlankUrl=this.editBlankUrl; this.graph.lightbox=!0;this.graph.centerZoom=!1;this.graph.autoExtend=!1;this.graph.autoScroll=!1;this.graph.setEnabled(!1);1==this.graphConfig["toolbar-nohide"]&&(this.editor.defaultGraphOverflow="visible");this.xmlNode=this.editor.extractGraphModel(this.xmlNode,!0);var d=this;this.graph.getImageFromBundles=function(a){return d.getImageUrl(a)};mxClient.IS_SVG&&this.editor.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement,null,!0);if("mxfile"==b.nodeName){var e=b.getElementsByTagName("diagram"); -if(0<e.length){if(null!=this.pageId)for(var l=0;l<e.length;l++)if(this.pageId==e[l].getAttribute("id")){this.currentPage=l;break}var m=this.graph.getGlobalVariable,d=this;this.graph.getGlobalVariable=function(a){var b=e[d.currentPage];return"page"==a?b.getAttribute("name")||"Page-"+(d.currentPage+1):"pagenumber"==a?d.currentPage+1:m.apply(this,arguments)}}}this.diagrams=[];var c=null;this.selectPage=function(a){this.handlingResize||(this.currentPage=mxUtils.mod(a,this.diagrams.length),this.updateGraphXml(Editor.parseDiagramNode(this.diagrams[this.currentPage])))}; -this.selectPageById=function(a){for(var b=!1,c=0;c<this.diagrams.length;c++)if(this.diagrams[c].getAttribute("id")==a){this.selectPage(c);b=!0;break}return b};l=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)this.diagrams=[];this.xmlNode!=c&&(this.diagrams=this.xmlNode.getElementsByTagName("diagram"),c=this.xmlNode)});this.addListener("xmlNodeChanged",l);l();urlParams.page=d.currentPage;this.graph.getModel().beginUpdate();try{urlParams.nav=0!=this.graphConfig.nav? +if(0<e.length){if(null!=this.pageId)for(var k=0;k<e.length;k++)if(this.pageId==e[k].getAttribute("id")){this.currentPage=k;break}var m=this.graph.getGlobalVariable,d=this;this.graph.getGlobalVariable=function(a){var b=e[d.currentPage];return"page"==a?b.getAttribute("name")||"Page-"+(d.currentPage+1):"pagenumber"==a?d.currentPage+1:m.apply(this,arguments)}}}this.diagrams=[];var c=null;this.selectPage=function(a){this.handlingResize||(this.currentPage=mxUtils.mod(a,this.diagrams.length),this.updateGraphXml(Editor.parseDiagramNode(this.diagrams[this.currentPage])))}; +this.selectPageById=function(a){for(var b=!1,c=0;c<this.diagrams.length;c++)if(this.diagrams[c].getAttribute("id")==a){this.selectPage(c);b=!0;break}return b};k=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)this.diagrams=[];this.xmlNode!=c&&(this.diagrams=this.xmlNode.getElementsByTagName("diagram"),c=this.xmlNode)});this.addListener("xmlNodeChanged",k);k();urlParams.page=d.currentPage;this.graph.getModel().beginUpdate();try{urlParams.nav=0!=this.graphConfig.nav? "1":"0",this.editor.setGraphXml(this.xmlNode),this.graph.border=null!=this.graphConfig.border?this.graphConfig.border:8,this.graph.view.scale=this.graphConfig.zoom||1}finally{this.graph.getModel().endUpdate()}this.graph.panningHandler.useLeftButtonForPanning=!0;this.graph.panningHandler.isForcePanningEvent=function(a){return!mxEvent.isPopupTrigger(a.getEvent())&&"auto"==this.graph.container.style.overflow};this.graph.panningHandler.usePopupTrigger=!1;this.graph.panningHandler.pinchEnabled=!1;this.graph.panningHandler.ignoreCell= !0;this.graph.setPanning(!1);this.addSizeHandler();this.showLayers(this.graph);this.addClickHandler(this.graph);this.graph.setTooltips(0!=this.graphConfig.tooltips);this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};d=this;this.graph.customLinkClicked=function(a){var b=!0;if("data:page/id,"==a.substring(0,13)){var c=a.indexOf(",");d.selectPageById(a.substring(c+1))||(b=!1,alert(mxResources.get("pageNotFound")||"Page not found"))}else this.handleCustomLink(a); -return b};null!=this.graphConfig.toolbar?this.addToolbar():null!=this.graphConfig.title&&this.showTitleAsTooltip&&a.setAttribute("title",this.graphConfig.title);this.fireEvent(new mxEventObject("render"))});e=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(this.checkVisibleState&&0==a.offsetWidth&&"undefined"!==typeof e){var l=this.getObservableParent(a),m=new e(mxUtils.bind(this,function(b){0<a.offsetWidth&&(m.disconnect(),d())}));m.observe(l,{attributes:!0})}else d()}}; +return b};null!=this.graphConfig.toolbar?this.addToolbar():null!=this.graphConfig.title&&this.showTitleAsTooltip&&a.setAttribute("title",this.graphConfig.title);this.fireEvent(new mxEventObject("render"))});e=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(this.checkVisibleState&&0==a.offsetWidth&&"undefined"!==typeof e){var k=this.getObservableParent(a),m=new e(mxUtils.bind(this,function(b){0<a.offsetWidth&&(m.disconnect(),d())}));m.observe(k,{attributes:!0})}else d()}}; GraphViewer.prototype.getObservableParent=function(a){for(a=a.parentNode;a!=document.body&&null!=a.parentNode&&"none"!==mxUtils.getCurrentStyle(a).display;)a=a.parentNode;return a};GraphViewer.prototype.getImageUrl=function(a){null!=a&&"http://"!=a.substring(0,7)&&"https://"!=a.substring(0,8)&&"data:image"!=a.substring(0,10)&&("/"==a.charAt(0)&&(a=a.substring(1,a.length)),a=this.imageBaseUrl+a);return a}; GraphViewer.prototype.setXmlNode=function(a){this.xmlDocument=a.ownerDocument;this.xml=mxUtils.getXml(a);this.xmlNode=a;this.updateGraphXml(a);this.fireEvent(new mxEventObject("xmlNodeChanged"))};GraphViewer.prototype.setFileNode=function(a){null==this.xmlNode&&(this.xmlDocument=a.ownerDocument,this.xml=mxUtils.getXml(a),this.xmlNode=a);this.setGraphXml(a)};GraphViewer.prototype.updateGraphXml=function(a){this.setGraphXml(a);this.fireEvent(new mxEventObject("graphChanged"))}; GraphViewer.prototype.setGraphXml=function(a){null!=this.graph&&(this.graph.view.translate=new mxPoint,this.graph.view.scale=1,this.graph.getModel().clear(),this.editor.setGraphXml(a),this.widthIsEmpty?(this.graph.container.style.width="",this.graph.container.style.height=""):this.graph.container.style.width=this.initialWidth,this.positionGraph(),this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale})}; GraphViewer.prototype.addSizeHandler=function(){var a=this.graph.container,b=this.graph.getGraphBounds(),e=!1;a.style.overflow=1!=this.graphConfig["toolbar-nohide"]?"hidden":"visible";var d=mxUtils.bind(this,function(){if(!e){e=!0;var b=this.graph.getGraphBounds();a.style.overflow=1!=this.graphConfig["toolbar-nohide"]?a.offsetWidth<=b.width+2*this.graph.border*this.graph.view.scale?"auto":"hidden":"visible";if(null!=this.toolbar&&1!=this.graphConfig["toolbar-nohide"]){var b=a.getBoundingClientRect(), d=mxUtils.getScrollOrigin(document.body),d="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-d.x,top:-d.y},b={left:b.left-d.left,top:b.top-d.top,bottom:b.bottom-d.top,right:b.right-d.left};this.toolbar.style.left=b.left+"px";"bottom"==this.graphConfig["toolbar-position"]?this.toolbar.style.top=b.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(this.toolbar.style.width=Math.max(this.minToolbarWidth,a.offsetWidth)+"px",this.toolbar.style.top=b.top+1+ -"px"):this.toolbar.style.top=b.top+"px"}e=!1}}),l=null;this.handlingResize=!1;this.fitGraph=mxUtils.bind(this,function(b){var d=a.offsetWidth;d==l||this.handlingResize||(this.handlingResize=!0,this.graph.maxFitScale=null!=b?b:this.graphConfig.zoom||(this.allowZoomIn?null:1),this.graph.fit(null,null,null,null,!1,!0),this.graph.maxFitScale=null,b=this.graph.getGraphBounds(),this.updateContainerHeight(a,Math.max(this.minHeight,b.height+2*this.graph.border+1)),this.graph.initialViewState={translate:this.graph.view.translate.clone(), -scale:this.graph.view.scale},l=d,window.setTimeout(mxUtils.bind(this,function(){this.handlingResize=!1}),0))});GraphViewer.useResizeSensor&&(mxClient.IS_QUIRKS||9>=document.documentMode?(mxEvent.addListener(window,"resize",d),this.graph.addListener("size",d)):new ResizeSensor(this.graph.container,d));if(this.graphConfig.resize||(this.zoomEnabled||!this.autoFit)&&0!=this.graphConfig.resize)this.graph.minimumContainerSize=new mxRectangle(0,0,this.minWidth,this.minHeight),this.graph.resizeContainer= -!0;else if(this.widthIsEmpty&&this.updateContainerWidth(a,b.width+2*this.graph.border),this.updateContainerHeight(a,Math.max(this.minHeight,b.height+2*this.graph.border+1)),!this.zoomEnabled&&this.autoFit){var m=l=null,d=mxUtils.bind(this,function(){window.clearTimeout(m);this.handlingResize||(m=window.setTimeout(mxUtils.bind(this,this.fitGraph),100))});GraphViewer.useResizeSensor&&(mxClient.IS_QUIRKS||9>=document.documentMode?mxEvent.addListener(window,"resize",d):new ResizeSensor(this.graph.container, +"px"):this.toolbar.style.top=b.top+"px"}e=!1}}),k=null;this.handlingResize=!1;this.fitGraph=mxUtils.bind(this,function(b){var d=a.offsetWidth;d==k||this.handlingResize||(this.handlingResize=!0,this.graph.maxFitScale=null!=b?b:this.graphConfig.zoom||(this.allowZoomIn?null:1),this.graph.fit(null,null,null,null,!1,!0),this.graph.maxFitScale=null,b=this.graph.getGraphBounds(),this.updateContainerHeight(a,Math.max(this.minHeight,b.height+2*this.graph.border+1)),this.graph.initialViewState={translate:this.graph.view.translate.clone(), +scale:this.graph.view.scale},k=d,window.setTimeout(mxUtils.bind(this,function(){this.handlingResize=!1}),0))});GraphViewer.useResizeSensor&&(mxClient.IS_QUIRKS||9>=document.documentMode?(mxEvent.addListener(window,"resize",d),this.graph.addListener("size",d)):new ResizeSensor(this.graph.container,d));if(this.graphConfig.resize||(this.zoomEnabled||!this.autoFit)&&0!=this.graphConfig.resize)this.graph.minimumContainerSize=new mxRectangle(0,0,this.minWidth,this.minHeight),this.graph.resizeContainer= +!0;else if(this.widthIsEmpty&&this.updateContainerWidth(a,b.width+2*this.graph.border),this.updateContainerHeight(a,Math.max(this.minHeight,b.height+2*this.graph.border+1)),!this.zoomEnabled&&this.autoFit){var m=k=null,d=mxUtils.bind(this,function(){window.clearTimeout(m);this.handlingResize||(m=window.setTimeout(mxUtils.bind(this,this.fitGraph),100))});GraphViewer.useResizeSensor&&(mxClient.IS_QUIRKS||9>=document.documentMode?mxEvent.addListener(window,"resize",d):new ResizeSensor(this.graph.container, d))}else mxClient.IS_QUIRKS||9>=document.documentMode||this.graph.addListener("size",d);var r=mxUtils.bind(this,function(){var d=a.style.minWidth;this.widthIsEmpty&&(a.style.minWidth="100%");if(0<a.offsetWidth&&(this.allowZoomIn||b.width+2*this.graph.border>a.offsetWidth||b.height+2*this.graph.border>this.graphConfig["max-height"])){var e=null;null!=this.graphConfig["max-height"]&&(e=this.graphConfig["max-height"]/(b.height+2*this.graph.border));this.fitGraph(e)}else this.graph.view.setTranslate(Math.floor((this.graph.border- -b.x)/this.graph.view.scale),Math.floor((this.graph.border-b.y)/this.graph.view.scale)),l=a.offsetWidth;a.style.minWidth=d});mxClient.IS_QUIRKS||8==document.documentMode?window.setTimeout(r,0):r();this.positionGraph=function(){b=this.graph.getGraphBounds();l=null;r()}};GraphViewer.prototype.updateContainerWidth=function(a,b){a.style.width=b+"px"}; +b.x)/this.graph.view.scale),Math.floor((this.graph.border-b.y)/this.graph.view.scale)),k=a.offsetWidth;a.style.minWidth=d});mxClient.IS_QUIRKS||8==document.documentMode?window.setTimeout(r,0):r();this.positionGraph=function(){b=this.graph.getGraphBounds();k=null;r()}};GraphViewer.prototype.updateContainerWidth=function(a,b){a.style.width=b+"px"}; GraphViewer.prototype.updateContainerHeight=function(a,b){if(this.zoomEnabled||!this.autoFit||"BackCompat"==document.compatMode||mxClient.IS_QUIRKS||8==document.documentMode)a.style.height=b+"px"}; -GraphViewer.prototype.showLayers=function(a,b){var e=this.graphConfig.layers;if(null!=e||null!=b)if(e=null!=e?e.split(" "):null,null!=b||0<e.length){var d=null!=b?b.getModel():null,l=a.getModel();l.beginUpdate();try{for(var m=l.getChildCount(l.root),r=0;r<m;r++)l.setVisible(l.getChildAt(l.root,r),null!=b?d.isVisible(d.getChildAt(d.root,r)):!1);if(null==d)for(r=0;r<e.length;r++)l.setVisible(l.getChildAt(l.root,parseInt(e[r])),!0)}finally{l.endUpdate()}}}; +GraphViewer.prototype.showLayers=function(a,b){var e=this.graphConfig.layers;if(null!=e||null!=b)if(e=null!=e?e.split(" "):null,null!=b||0<e.length){var d=null!=b?b.getModel():null,k=a.getModel();k.beginUpdate();try{for(var m=k.getChildCount(k.root),r=0;r<m;r++)k.setVisible(k.getChildAt(k.root,r),null!=b?d.isVisible(d.getChildAt(d.root,r)):!1);if(null==d)for(r=0;r<e.length;r++)k.setVisible(k.getChildAt(k.root,parseInt(e[r])),!0)}finally{k.endUpdate()}}}; GraphViewer.prototype.addToolbar=function(){function a(a,b,d,f){var g=document.createElement("div");g.style.borderRight="1px solid #d0d0d0";g.style.padding="3px 6px 3px 6px";mxEvent.addListener(g,"click",a);null!=d&&g.setAttribute("title",d);g.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";a=document.createElement("img");a.setAttribute("border","0");a.setAttribute("src",b);null==f||f?(mxEvent.addListener(g,"mouseenter",function(){g.style.backgroundColor="#ddd"}),mxEvent.addListener(g,"mouseleave", function(){g.style.backgroundColor="#eee"}),mxUtils.setOpacity(a,60),g.style.cursor="pointer"):mxUtils.setOpacity(g,30);g.appendChild(a);e.appendChild(g);c++;return g}var b=this.graph.container;"bottom"==this.graphConfig["toolbar-position"]?b.style.marginBottom=this.toolbarHeight+"px":"inline"!=this.graphConfig["toolbar-position"]&&(b.style.marginTop=this.toolbarHeight+"px");var e=b.ownerDocument.createElement("div");e.style.position="absolute";e.style.overflow="hidden";e.style.boxSizing="border-box"; -e.style.whiteSpace="nowrap";e.style.textAlign="left";e.style.zIndex=this.toolbarZIndex;e.style.backgroundColor="#eee";e.style.height=this.toolbarHeight+"px";this.toolbar=e;if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(e.style,"transition","opacity 100ms ease-in-out");mxUtils.setOpacity(e,30);var d=null,l=null,m=mxUtils.bind(this,function(a){null!=d&&(window.clearTimeout(d),fadeThead=null);null!=l&&(window.clearTimeout(l),fadeThead2=null);d=window.setTimeout(mxUtils.bind(this, -function(){mxUtils.setOpacity(e,0);d=null;l=window.setTimeout(mxUtils.bind(this,function(){e.style.display="none";l=null}),100)}),a||200)}),r=mxUtils.bind(this,function(a){null!=d&&(window.clearTimeout(d),fadeThead=null);null!=l&&(window.clearTimeout(l),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)||(r(30),m())}));mxEvent.addListener(e,mxClient.IS_POINTER? +e.style.whiteSpace="nowrap";e.style.textAlign="left";e.style.zIndex=this.toolbarZIndex;e.style.backgroundColor="#eee";e.style.height=this.toolbarHeight+"px";this.toolbar=e;if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(e.style,"transition","opacity 100ms ease-in-out");mxUtils.setOpacity(e,30);var d=null,k=null,m=mxUtils.bind(this,function(a){null!=d&&(window.clearTimeout(d),fadeThead=null);null!=k&&(window.clearTimeout(k),fadeThead2=null);d=window.setTimeout(mxUtils.bind(this, +function(){mxUtils.setOpacity(e,0);d=null;k=window.setTimeout(mxUtils.bind(this,function(){e.style.display="none";k=null}),100)}),a||200)}),r=mxUtils.bind(this,function(a){null!=d&&(window.clearTimeout(d),fadeThead=null);null!=k&&(window.clearTimeout(k),fadeThead2=null);e.style.display="";mxUtils.setOpacity(e,a||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(r(30),m())}));mxEvent.addListener(e,mxClient.IS_POINTER? "pointermove":"mousemove",function(a){mxEvent.consume(a)});mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(a){r(100)}));mxEvent.addListener(e,"mousemove",mxUtils.bind(this,function(a){r(100);mxEvent.consume(a)}));mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||r(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)?m():r(30))}})}for(var A=this.toolbarItems,c=0,f=null,k=null,q=0;q<A.length;q++){var n=A[q];if("pages"==n){k=b.ownerDocument.createElement("div"); -k.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(k,70);var g=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");g.style.borderRightStyle="none";g.style.paddingLeft="0px";g.style.paddingRight="0px";e.appendChild(k);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";n=mxUtils.bind(this,function(){k.innerHTML="";mxUtils.write(k,this.currentPage+1+" / "+this.diagrams.length);k.style.display=1<this.diagrams.length?"inline-block":"none";g.style.display=k.style.display;x.style.display=k.style.display});this.addListener("graphChanged",n);n()}else if("zoom"==n)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"==n){if(this.layersEnabled){var z=this.graph.getModel(),t=a(mxUtils.bind(this,function(a){if(null!=f)f.parentNode.removeChild(f), +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)?m():r(30))}})}for(var z=this.toolbarItems,c=0,f=null,g=null,q=0;q<z.length;q++){var n=z[q];if("pages"==n){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 l=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");l.style.borderRightStyle="none";l.style.paddingLeft="0px";l.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";n=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";l.style.display=g.style.display;x.style.display=g.style.display});this.addListener("graphChanged",n);n()}else if("zoom"==n)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"==n){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");z.addListener(mxEvent.CHANGE,function(){t.style.display=1<z.getChildCount(z.root)?"inline-block":"none"});t.style.display=1<z.getChildCount(z.root)?"inline-block":"none"}}else"lightbox"==n?this.lightboxEnabled&&a(mxUtils.bind(this,function(){this.showLightbox()}),Editor.maximizeImage,mxResources.get("show")||"Show"):null!=this.graphConfig["toolbar-buttons"]&&(n=this.graphConfig["toolbar-buttons"][n], -null!=n&&a(null==n.enabled||n.enabled?n.handler:function(){},n.image,n.title,n.enabled))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*c);null!=this.graphConfig.title&&(A=b.ownerDocument.createElement("div"),A.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;",A.setAttribute("title",this.graphConfig.title),mxUtils.write(A,this.graphConfig.title),mxUtils.setOpacity(A, -70),e.appendChild(A));this.minToolbarWidth=34*c;var F=b.style.border,A=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",A):A()}; -GraphViewer.prototype.addClickHandler=function(a,b){a.linkPolicy=this.graphConfig.target||a.linkPolicy;a.addClickHandler(this.graphConfig.highlight,mxUtils.bind(this,function(e,d){if(null==d){var l=mxEvent.getSource(e);"a"==l.nodeName.toLowerCase()&&(d=l.getAttribute("href"))}null!=b?null==d||a.isExternalProtocol(d)||a.isBlankLink(d)||window.setTimeout(function(){b.destroy()},0):null!=d&&null==b&&a.isCustomLink(d)&&(mxEvent.isTouchEvent(e)||!mxEvent.isPopupTrigger(e))&&a.customLinkClicked(d)&&mxEvent.consume(e)}), +"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"==n?this.lightboxEnabled&&a(mxUtils.bind(this,function(){this.showLightbox()}),Editor.maximizeImage,mxResources.get("show")||"Show"):null!=this.graphConfig["toolbar-buttons"]&&(n=this.graphConfig["toolbar-buttons"][n], +null!=n&&a(null==n.enabled||n.enabled?n.handler:function(){},n.image,n.title,n.enabled))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*c);null!=this.graphConfig.title&&(z=b.ownerDocument.createElement("div"),z.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;",z.setAttribute("title",this.graphConfig.title),mxUtils.write(z,this.graphConfig.title),mxUtils.setOpacity(z, +70),e.appendChild(z));this.minToolbarWidth=34*c;var E=b.style.border,z=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"==E&&(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=E});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",z):z()}; +GraphViewer.prototype.addClickHandler=function(a,b){a.linkPolicy=this.graphConfig.target||a.linkPolicy;a.addClickHandler(this.graphConfig.highlight,mxUtils.bind(this,function(e,d){if(null==d){var k=mxEvent.getSource(e);"a"==k.nodeName.toLowerCase()&&(d=k.getAttribute("href"))}null!=b?null==d||a.isExternalProtocol(d)||a.isBlankLink(d)||window.setTimeout(function(){b.destroy()},0):null!=d&&null==b&&a.isCustomLink(d)&&(mxEvent.isTouchEvent(e)||!mxEvent.isPopupTrigger(e))&&a.customLinkClicked(d)&&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&& (e.highlight=this.graphConfig.highlight.substring(1));null!=this.currentPage&&0<this.currentPage&&(e.page=this.currentPage);"undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)?null==this.lightboxWindow&&mxEvent.addListener(window,"message",mxUtils.bind(this,function(a){"ready"==a.data&&a.source==this.lightboxWindow&&this.lightboxWindow.postMessage(this.xml,"*")})):e.data=encodeURIComponent(this.xml);a="www.draw.io";"1"==urlParams.dev&&(e.dev="1",e.drawdev= @@ -3496,18 +3501,18 @@ GraphViewer.prototype.showLightbox=function(a,b,e){if("open"==this.graphConfig.l GraphViewer.prototype.showLocalLightbox=function(){var a=mxUtils.getDocumentScrollOrigin(document),b=document.createElement("div");mxClient.IS_QUIRKS?(b.style.position="absolute",b.style.left=a.x+"px",b.style.top=a.y+"px",b.style.width=document.body.offsetWidth+"px",b.style.height=document.body.offsetHeight+"px"):b.style.cssText="position:fixed;top:0;left:0;bottom:0;right:0;";b.style.zIndex=this.lightboxZIndex;b.style.backgroundColor="#000000";mxUtils.setOpacity(b,70);document.body.appendChild(b); var e=document.createElement("img");e.setAttribute("border","0");e.setAttribute("src",Editor.closeImage);mxClient.IS_QUIRKS?(e.style.position="absolute",e.style.right="32px",e.style.top=a.y+32+"px"):e.style.cssText="position:fixed;top:32px;right:32px;";e.style.cursor="pointer";mxEvent.addListener(e,"click",function(){d.destroy()});urlParams.pages="1";urlParams.page=this.currentPage;urlParams.nav=0!=this.graphConfig.nav?"1":"0";urlParams.layers=this.layersEnabled?"1":"0";if(null==document.documentMode|| 10<=document.documentMode)Editor.prototype.editButtonLink=this.graphConfig.edit,Editor.prototype.editButtonFunc=this.graphConfig.editFunc;EditorUi.prototype.updateActionStates=function(){};EditorUi.prototype.addBeforeUnloadListener=function(){};EditorUi.prototype.addChromelessClickHandler=function(){};Graph.prototype.shadowId="lightboxDropShadow";var d=new EditorUi(new Editor(!0),document.createElement("div"),!0);d.editor.editBlankUrl=this.editBlankUrl;Graph.prototype.shadowId="dropShadow";d.refresh= -function(){};var l=mxUtils.bind(this,function(a){27==a.keyCode&&d.destroy()}),m=d.destroy;d.destroy=function(){mxEvent.removeListener(document.documentElement,"keydown",l);document.body.removeChild(b);document.body.removeChild(e);document.body.style.overflow="auto";GraphViewer.resizeSensorEnabled=!0;m.apply(this,arguments)};var r=d.editor.graph,u=r.container;u.style.overflow="hidden";this.lightboxChrome?(u.style.border="1px solid #c0c0c0",u.style.margin="40px",mxEvent.addListener(document.documentElement, -"keydown",l)):(b.style.display="none",e.style.display="none");var y=this;r.getImageFromBundles=function(a){return y.getImageUrl(a)};var A=d.createTemporaryGraph;d.createTemporaryGraph=function(){var a=A.apply(this,arguments);a.getImageFromBundles=function(a){return y.getImageUrl(a)};return a};this.graphConfig.move&&(r.isMoveCellsEvent=function(a){return!0});mxClient.IS_QUIRKS||(mxUtils.setPrefixedStyle(u.style,"border-radius","4px"),u.style.position="fixed");GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow= +function(){};var k=mxUtils.bind(this,function(a){27==a.keyCode&&d.destroy()}),m=d.destroy;d.destroy=function(){mxEvent.removeListener(document.documentElement,"keydown",k);document.body.removeChild(b);document.body.removeChild(e);document.body.style.overflow="auto";GraphViewer.resizeSensorEnabled=!0;m.apply(this,arguments)};var r=d.editor.graph,u=r.container;u.style.overflow="hidden";this.lightboxChrome?(u.style.border="1px solid #c0c0c0",u.style.margin="40px",mxEvent.addListener(document.documentElement, +"keydown",k)):(b.style.display="none",e.style.display="none");var y=this;r.getImageFromBundles=function(a){return y.getImageUrl(a)};var z=d.createTemporaryGraph;d.createTemporaryGraph=function(){var a=z.apply(this,arguments);a.getImageFromBundles=function(a){return y.getImageUrl(a)};return a};this.graphConfig.move&&(r.isMoveCellsEvent=function(a){return!0});mxClient.IS_QUIRKS||(mxUtils.setPrefixedStyle(u.style,"border-radius","4px"),u.style.position="fixed");GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow= "hidden";mxClient.IS_SF||mxClient.IS_EDGE||(mxUtils.setPrefixedStyle(u.style,"transform","rotateY(90deg)"),mxUtils.setPrefixedStyle(u.style,"transition","all .25s ease-in-out"));this.addClickHandler(r,d);window.setTimeout(mxUtils.bind(this,function(){u.style.outline="none";u.style.zIndex=this.lightboxZIndex;e.style.zIndex=this.lightboxZIndex;document.body.appendChild(u);document.body.appendChild(e);d.setFileData(this.xml);mxUtils.setPrefixedStyle(u.style,"transform","rotateY(0deg)");d.chromelessToolbar.style.bottom= "60px";d.chromelessToolbar.style.zIndex=this.lightboxZIndex;document.body.appendChild(d.chromelessToolbar);d.getEditBlankXml=mxUtils.bind(this,function(){return this.xml});mxClient.IS_QUIRKS&&(u.style.position="absolute",u.style.display="block",u.style.left=a.x+"px",u.style.top=a.y+"px",u.style.width=document.body.clientWidth-80+"px",u.style.height=document.body.clientHeight-80+"px",u.style.backgroundColor="white",d.chromelessToolbar.style.display="block",d.chromelessToolbar.style.position="absolute", d.chromelessToolbar.style.bottom="",d.chromelessToolbar.style.top=a.y+document.body.clientHeight-100+"px");d.lightboxFit();d.chromelessResize();this.showLayers(r,this.graph);mxEvent.addListener(b,"click",function(){d.destroy()})}),0);return d};GraphViewer.processElements=function(a){mxUtils.forEach(GraphViewer.getElementsByClassName(a||"mxgraph"),function(a){try{a.innerHTML="",GraphViewer.createViewerForElement(a)}catch(e){throw a.innerHTML=e.message,e;}})}; -GraphViewer.getElementsByClassName=function(a){if(document.getElementsByClassName){var b=document.getElementsByClassName(a);a=[];for(var e=0;e<b.length;e++)a.push(b[e]);return a}for(var d=document.getElementsByTagName("*"),b=[],e=0;e<d.length;e++){var l=d[e].className;null!=l&&0<l.length&&(l=l.split(" "),0<=mxUtils.indexOf(l,a)&&b.push(d[e]))}return b}; -GraphViewer.createViewerForElement=function(a,b){var e=a.getAttribute("data-mxgraph");if(null!=e){var d=JSON.parse(e),l=function(e){e=mxUtils.parseXml(e);e=new GraphViewer(a,e.documentElement,d);null!=b&&b(e)};null!=d.url?GraphViewer.getUrl(d.url,function(a){l(a)}):l(d.xml)}}; +GraphViewer.getElementsByClassName=function(a){if(document.getElementsByClassName){var b=document.getElementsByClassName(a);a=[];for(var e=0;e<b.length;e++)a.push(b[e]);return a}for(var d=document.getElementsByTagName("*"),b=[],e=0;e<d.length;e++){var k=d[e].className;null!=k&&0<k.length&&(k=k.split(" "),0<=mxUtils.indexOf(k,a)&&b.push(d[e]))}return b}; +GraphViewer.createViewerForElement=function(a,b){var e=a.getAttribute("data-mxgraph");if(null!=e){var d=JSON.parse(e),k=function(e){e=mxUtils.parseXml(e);e=new GraphViewer(a,e.documentElement,d);null!=b&&b(e)};null!=d.url?GraphViewer.getUrl(d.url,function(a){k(a)}):k(d.xml)}}; GraphViewer.initCss=function(){try{var a=document.createElement("style");a.type="text/css";a.innerHTML="div.mxTooltip {\n-webkit-box-shadow: 3px 3px 12px #C0C0C0;\n-moz-box-shadow: 3px 3px 12px #C0C0C0;\nbox-shadow: 3px 3px 12px #C0C0C0;\nbackground: #FFFFCC;\nborder-style: solid;\nborder-width: 1px;\nborder-color: black;\nfont-family: Arial;\nfont-size: 8pt;\nposition: absolute;\ncursor: default;\npadding: 4px;\ncolor: black;}\ntd.mxPopupMenuIcon div {\nwidth:16px;\nheight:16px;}\nhtml div.mxPopupMenu {\n-webkit-box-shadow:2px 2px 3px #d5d5d5;\n-moz-box-shadow:2px 2px 3px #d5d5d5;\nbox-shadow:2px 2px 3px #d5d5d5;\n_filter:progid:DXImageTransform.Microsoft.DropShadow(OffX=2, OffY=2, Color='#d0d0d0',Positive='true');\nbackground:white;\nposition:absolute;\nborder:3px solid #e7e7e7;\npadding:3px;}\nhtml table.mxPopupMenu {\nborder-collapse:collapse;\nmargin:0px;}\nhtml td.mxPopupMenuItem {\npadding:7px 30px 7px 30px;\nfont-family:Helvetica Neue,Helvetica,Arial Unicode MS,Arial;\nfont-size:10pt;}\nhtml td.mxPopupMenuIcon {\nbackground-color:white;\npadding:0px;}\ntd.mxPopupMenuIcon .geIcon {\npadding:2px;\npadding-bottom:4px;\nmargin:2px;\nborder:1px solid transparent;\nopacity:0.5;\n_width:26px;\n_height:26px;}\ntd.mxPopupMenuIcon .geIcon:hover {\nborder:1px solid gray;\nborder-radius:2px;\nopacity:1;}\nhtml tr.mxPopupMenuItemHover {\nbackground-color: #eeeeee;\ncolor: black;}\ntable.mxPopupMenu hr {\ncolor:#cccccc;\nbackground-color:#cccccc;\nborder:none;\nheight:1px;}\ntable.mxPopupMenu tr {\tfont-size:4pt;}\n.geDialog { font-family:Helvetica Neue,Helvetica,Arial Unicode MS,Arial;\nfont-size:10pt;\nborder:none;\nmargin:0px;}\n.geDialog {\tposition:absolute;\tbackground:white;\toverflow:hidden;\tpadding:30px;\tborder:1px solid #acacac;\t-webkit-box-shadow:0px 0px 2px 2px #d5d5d5;\t-moz-box-shadow:0px 0px 2px 2px #d5d5d5;\tbox-shadow:0px 0px 2px 2px #d5d5d5;\t_filter:progid:DXImageTransform.Microsoft.DropShadow(OffX=2, OffY=2, Color='#d5d5d5', Positive='true');\tz-index: 2;}.geDialogClose {\tposition:absolute;\twidth:9px;\theight:9px;\topacity:0.5;\tcursor:pointer;\t_filter:alpha(opacity=50);}.geDialogClose:hover {\topacity:1;}.geDialogTitle {\tbox-sizing:border-box;\twhite-space:nowrap;\tbackground:rgb(229, 229, 229);\tborder-bottom:1px solid rgb(192, 192, 192);\tfont-size:15px;\tfont-weight:bold;\ttext-align:center;\tcolor:rgb(35, 86, 149);}.geDialogFooter {\tbackground:whiteSmoke;\twhite-space:nowrap;\ttext-align:right;\tbox-sizing:border-box;\tborder-top:1px solid #e5e5e5;\tcolor:darkGray;}\n.geBtn {\tbackground-color: #f5f5f5;\tborder-radius: 2px;\tborder: 1px solid #d8d8d8;\tcolor: #333;\tcursor: default;\tfont-size: 11px;\tfont-weight: bold;\theight: 29px;\tline-height: 27px;\tmargin: 0 0 0 8px;\tmin-width: 72px;\toutline: 0;\tpadding: 0 8px;\tcursor: pointer;}.geBtn:hover, .geBtn:focus {\t-webkit-box-shadow: 0px 1px 1px rgba(0,0,0,0.1);\t-moz-box-shadow: 0px 1px 1px rgba(0,0,0,0.1);\tbox-shadow: 0px 1px 1px rgba(0,0,0,0.1);\tborder: 1px solid #c6c6c6;\tbackground-color: #f8f8f8;\tbackground-image: linear-gradient(#f8f8f8 0px,#f1f1f1 100%);\tcolor: #111;}.geBtn:disabled {\topacity: .5;}.gePrimaryBtn {\tbackground-color: #4d90fe;\tbackground-image: linear-gradient(#4d90fe 0px,#4787ed 100%);\tborder: 1px solid #3079ed;\tcolor: #fff;}.gePrimaryBtn:hover, .gePrimaryBtn:focus {\tbackground-color: #357ae8;\tbackground-image: linear-gradient(#4d90fe 0px,#357ae8 100%);\tborder: 1px solid #2f5bb7;\tcolor: #fff;}.gePrimaryBtn:disabled {\topacity: .5;}";document.getElementsByTagName("head")[0].appendChild(a)}catch(b){}}; GraphViewer.cachedUrls={};GraphViewer.getUrl=function(a,b,e){if(null!=GraphViewer.cachedUrls[a])b(GraphViewer.cachedUrls[a]);else{var d=0<navigator.userAgent.indexOf("MSIE 9")?new XDomainRequest:new XMLHttpRequest;d.open("GET",a);d.onload=function(){b(null!=d.getText?d.getText():d.responseText)};d.onerror=e;d.send()}};GraphViewer.resizeSensorEnabled=!0;GraphViewer.useResizeSensor=!0; -(function(){var a=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(a){return window.setTimeout(a,20)},b=function(e,d){function l(){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 m(a,b){return a.currentStyle?a.currentStyle[b]:window.getComputedStyle?window.getComputedStyle(a,null).getPropertyValue(b):a.style[b]}function r(b,c){if(!b.resizedAttached)b.resizedAttached= -new l,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"==m(b,"position")&&(b.style.position="relative");var d=b.resizeSensor.childNodes[0],e=d.childNodes[0],f=b.resizeSensor.childNodes[1],k=function(){e.style.width="100000px";e.style.height="100000px";d.scrollLeft=1E5;d.scrollTop=1E5;f.scrollLeft=1E5;f.scrollTop=1E5};k();var r=!1,t=function(){b.resizedAttached&&(r&&(b.resizedAttached.call(),r=!1),a(t))};a(t);var u,v,y,p,A=function(){if((y=b.offsetWidth)!=u||(p=b.offsetHeight)!=v)r=!0,u=y,v=p;k()},K=function(a,b,c){a.attachEvent? -a.attachEvent("on"+b,c):a.addEventListener(b,c)};K(d,"scroll",A);K(f,"scroll",A)}var u=function(){GraphViewer.resizeSensorEnabled&&d()},y=Object.prototype.toString.call(e),A="[object Array]"===y||"[object NodeList]"===y||"[object HTMLCollection]"===y||"undefined"!==typeof jQuery&&e instanceof jQuery||"undefined"!==typeof Elements&&e instanceof Elements;if(A)for(var y=0,c=e.length;y<c;y++)r(e[y],u);else r(e,u);this.detach=function(){if(A)for(var a=0,c=e.length;a<c;a++)b.detach(e[a]);else b.detach(e)}}; +(function(){var a=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(a){return window.setTimeout(a,20)},b=function(e,d){function k(){this.q=[];this.add=function(a){this.q.push(a)};var a,b;this.call=function(){a=0;for(b=this.q.length;a<b;a++)this.q[a].call()}}function m(a,b){return a.currentStyle?a.currentStyle[b]:window.getComputedStyle?window.getComputedStyle(a,null).getPropertyValue(b):a.style[b]}function r(b,c){if(!b.resizedAttached)b.resizedAttached= +new k,b.resizedAttached.add(c);else if(b.resizedAttached){b.resizedAttached.add(c);return}b.resizeSensor=document.createElement("div");b.resizeSensor.className="resize-sensor";b.resizeSensor.style.cssText="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;";b.resizeSensor.innerHTML='<div class="resize-sensor-expand" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s;"></div></div><div class="resize-sensor-shrink" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s; width: 200%; height: 200%"></div></div>'; +b.appendChild(b.resizeSensor);"static"==m(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 r=!1,t=function(){b.resizedAttached&&(r&&(b.resizedAttached.call(),r=!1),a(t))};a(t);var u,v,y,p,z=function(){if((y=b.offsetWidth)!=u||(p=b.offsetHeight)!=v)r=!0,u=y,v=p;g()},K=function(a,b,c){a.attachEvent? +a.attachEvent("on"+b,c):a.addEventListener(b,c)};K(d,"scroll",z);K(f,"scroll",z)}var u=function(){GraphViewer.resizeSensorEnabled&&d()},y=Object.prototype.toString.call(e),z="[object Array]"===y||"[object NodeList]"===y||"[object HTMLCollection]"===y||"undefined"!==typeof jQuery&&e instanceof jQuery||"undefined"!==typeof Elements&&e instanceof Elements;if(z)for(var y=0,c=e.length;y<c;y++)r(e[y],u);else r(e,u);this.detach=function(){if(z)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/plugins/cConf-1-4-8.js b/src/main/webapp/plugins/cConf-1-4-8.js index f9c7cec5a..1217f1082 100644 --- a/src/main/webapp/plugins/cConf-1-4-8.js +++ b/src/main/webapp/plugins/cConf-1-4-8.js @@ -369,7 +369,7 @@ Draw.loadPlugin(function(ui) ui.showLinkDialog = function(value, btnLabel, fn) { var dlg = new LinkDialog(this, value, btnLabel, fn, true); - this.showDialog(dlg.container, 480, 165, true, true); + this.showDialog(dlg.container, 500, 180, true, true); dlg.init(); }; @@ -401,7 +401,8 @@ Draw.loadPlugin(function(ui) url = url.substring(0, hash); } - newWin.location = url + '#' + encodeURI(info.title.replace(/\s/g, '') + '-' + anchor.replace(/\s/g, '')); + //When page title has a [ at the beginning, conf adds id- to anchor name + newWin.location = url + '#' + (info.title.indexOf('[') == 0? 'id-' : '') + encodeURI(info.title.replace(/\s/g, '') + '-' + anchor.replace(/\s/g, '')); } }, function() { diff --git a/src/main/webapp/plugins/p1.js b/src/main/webapp/plugins/p1.js index 537e1efca..9619b7f84 100644 --- a/src/main/webapp/plugins/p1.js +++ b/src/main/webapp/plugins/p1.js @@ -20,26 +20,42 @@ Draw.loadPlugin(function(ui) { // Adds logo to footer ui.footerContainer.innerHTML = '<img width=50px height=17px align="right" style="margin-top:14px;margin-right:12px;" ' + 'src="http://download.esolia.net.s3.amazonaws.com/img/eSolia-Logo-Color.svg"/>'; - - // Adds variables in labels (%today, %filename%) - var superGetLabel = ui.editor.graph.getLabel; - ui.editor.graph.getLabel = function(cell) + // Adds placeholder for %today% and %filename% + var graph = ui.editor.graph; + var graphGetGlobalVariable = graph.getGlobalVariable; + + graph.getGlobalVariable = function(name) { - var result = superGetLabel.apply(this, arguments); - - if (result != null) + if (name == 'today') + { + return new Date().toLocaleString(); + } + else if (name == 'filename') { - var today = new Date().toLocaleString(); var file = ui.getCurrentFile(); - var filename = (file != null && file.getTitle() != null) ? file.getTitle() : ''; - result = result.replace('%today%', today).replace('%filename%', filename); + return (file != null && file.getTitle() != null) ? file.getTitle() : ''; } - return result; + return graphGetGlobalVariable.apply(this, arguments); }; - + + // Adds support for exporting PDF with placeholders + var graphGetExportVariables = graph.getExportVariables; + + Graph.prototype.getExportVariables = function() + { + var vars = graphGetExportVariables; + + var file = ui.getCurrentFile(); + + vars['today'] = new Date().toLocaleString(); + vars['filename'] = (file != null && file.getTitle() != null) ? file.getTitle() : ''; + + return vars; + }; + // // Adds resource for action // mxResources.parse('helloWorldAction=Hello, World!'); // diff --git a/src/main/webapp/shortcuts.svg b/src/main/webapp/shortcuts.svg index bc5e6a79d..5c5b88ac9 100644 --- a/src/main/webapp/shortcuts.svg +++ b/src/main/webapp/shortcuts.svg @@ -1,3 +1,3 @@ <?xml version="1.0" encoding="UTF-8"?> <!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" version="1.1" width="1428px" height="1140px" viewBox="-0.5 -0.5 1428 1140" content="<mxfile modified="2019-03-23T07:01:01.346Z" host="www.draw.io" agent="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.75 Safari/537.36" etag="nmKSL3_deXw1uXFqD1Bo" version="10.5.4" type="device"><diagram name="Page-1" id="150dc974-5404-6732-309c-fd6db42db779">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</diagram></mxfile>" style="background-color: rgb(238, 238, 238);"><defs><clipPath id="mx-clip-25-150-112-26-0"><rect x="25" y="150" width="112" height="26"/></clipPath><clipPath id="mx-clip-25-182-112-26-0"><rect x="25" y="182" width="112" height="26"/></clipPath><clipPath id="mx-clip-25-214-112-26-0"><rect x="25" y="214" width="112" height="26"/></clipPath><clipPath id="mx-clip-25-247-132-26-0"><rect x="25" y="247" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-279-112-26-0"><rect x="25" y="279" width="112" height="26"/></clipPath><clipPath id="mx-clip-25-311-112-26-0"><rect x="25" y="311" width="112" height="26"/></clipPath><clipPath id="mx-clip-25-343-112-26-0"><rect x="25" y="343" width="112" height="26"/></clipPath><clipPath id="mx-clip-102-241-10-20-0"><rect x="102" y="241" width="10" height="20"/></clipPath><clipPath id="mx-clip-120-150-192-26-0"><rect x="120" y="150" width="192" height="26"/></clipPath><clipPath id="mx-clip-120-182-202-26-0"><rect x="120" y="182" width="202" height="26"/></clipPath><clipPath id="mx-clip-120-214-192-26-0"><rect x="120" y="214" width="192" height="26"/></clipPath><clipPath id="mx-clip-120-247-192-26-0"><rect x="120" y="247" width="192" height="26"/></clipPath><clipPath id="mx-clip-120-279-192-26-0"><rect x="120" y="279" width="192" height="26"/></clipPath><clipPath id="mx-clip-120-311-192-26-0"><rect x="120" y="311" width="192" height="26"/></clipPath><clipPath id="mx-clip-120-343-211-26-0"><rect x="120" y="343" width="211" height="26"/></clipPath><clipPath id="mx-clip-385-118-82-26-0"><rect x="385" y="118" width="82" height="26"/></clipPath><clipPath id="mx-clip-385-150-92-26-0"><rect x="385" y="150" width="92" height="26"/></clipPath><clipPath id="mx-clip-385-182-82-26-0"><rect x="385" y="182" width="82" height="26"/></clipPath><clipPath id="mx-clip-385-214-92-26-0"><rect x="385" y="214" width="92" height="26"/></clipPath><clipPath id="mx-clip-385-247-82-26-0"><rect x="385" y="247" width="82" height="26"/></clipPath><clipPath id="mx-clip-385-279-92-26-0"><rect x="385" y="279" width="92" height="26"/></clipPath><clipPath id="mx-clip-385-311-99-26-0"><rect x="385" y="311" width="99" height="26"/></clipPath><clipPath id="mx-clip-385-343-102-26-0"><rect x="385" y="343" width="102" height="26"/></clipPath><clipPath id="mx-clip-506-118-147-26-0"><rect x="506" y="118" width="147" height="26"/></clipPath><clipPath id="mx-clip-506-150-147-26-0"><rect x="506" y="150" width="147" height="26"/></clipPath><clipPath id="mx-clip-506-182-147-26-0"><rect x="506" y="182" width="147" height="26"/></clipPath><clipPath id="mx-clip-506-214-147-26-0"><rect x="506" y="214" width="147" height="26"/></clipPath><clipPath id="mx-clip-506-247-102-26-0"><rect x="506" y="247" width="102" height="26"/></clipPath><clipPath id="mx-clip-506-279-138-26-0"><rect x="506" y="279" width="138" height="26"/></clipPath><clipPath id="mx-clip-506-311-137-26-0"><rect x="506" y="311" width="137" height="26"/></clipPath><clipPath id="mx-clip-506-343-128-26-0"><rect x="506" y="343" width="128" height="26"/></clipPath><clipPath id="mx-clip-378-438-158-26-0"><rect x="378" y="438" width="158" height="26"/></clipPath><clipPath id="mx-clip-378-502-122-26-0"><rect x="378" y="502" width="122" height="26"/></clipPath><clipPath id="mx-clip-378-534-122-26-0"><rect x="378" y="534" width="122" height="26"/></clipPath><clipPath id="mx-clip-378-567-122-26-0"><rect x="378" y="567" width="122" height="26"/></clipPath><clipPath id="mx-clip-378-599-152-26-0"><rect x="378" y="599" width="152" height="26"/></clipPath><clipPath id="mx-clip-378-631-122-26-0"><rect x="378" y="631" width="122" height="26"/></clipPath><clipPath id="mx-clip-378-664-122-26-0"><rect x="378" y="664" width="122" height="26"/></clipPath><clipPath id="mx-clip-378-696-122-26-0"><rect x="378" y="696" width="122" height="26"/></clipPath><clipPath id="mx-clip-378-728-122-26-0"><rect x="378" y="728" width="122" height="26"/></clipPath><clipPath id="mx-clip-378-760-122-26-0"><rect x="378" y="760" width="122" height="26"/></clipPath><clipPath id="mx-clip-378-793-122-26-0"><rect x="378" y="793" width="122" height="26"/></clipPath><clipPath id="mx-clip-378-825-122-26-0"><rect x="378" y="825" width="122" height="26"/></clipPath><clipPath id="mx-clip-378-857-122-26-0"><rect x="378" y="857" width="122" height="26"/></clipPath><clipPath id="mx-clip-378-921-122-26-0"><rect x="378" y="921" width="122" height="26"/></clipPath><clipPath id="mx-clip-378-954-122-26-0"><rect x="378" y="954" width="122" height="26"/></clipPath><clipPath id="mx-clip-378-889-122-26-0"><rect x="378" y="889" width="122" height="26"/></clipPath><clipPath id="mx-clip-548-438-117-26-0"><rect x="548" y="438" width="117" height="26"/></clipPath><clipPath id="mx-clip-548-502-144-26-0"><rect x="548" y="502" width="144" height="26"/></clipPath><clipPath id="mx-clip-548-535-142-26-0"><rect x="548" y="535" width="142" height="26"/></clipPath><clipPath id="mx-clip-548-567-142-26-0"><rect x="548" y="567" width="142" height="26"/></clipPath><clipPath id="mx-clip-548-599-122-26-0"><rect x="548" y="599" width="122" height="26"/></clipPath><clipPath id="mx-clip-548-631-142-26-0"><rect x="548" y="631" width="142" height="26"/></clipPath><clipPath id="mx-clip-548-664-142-26-0"><rect x="548" y="664" width="142" height="26"/></clipPath><clipPath id="mx-clip-548-696-142-26-0"><rect x="548" y="696" width="142" height="26"/></clipPath><clipPath id="mx-clip-548-728-142-26-0"><rect x="548" y="728" width="142" height="26"/></clipPath><clipPath id="mx-clip-548-760-142-26-0"><rect x="548" y="760" width="142" height="26"/></clipPath><clipPath id="mx-clip-548-793-142-26-0"><rect x="548" y="793" width="142" height="26"/></clipPath><clipPath id="mx-clip-548-825-142-26-0"><rect x="548" y="825" width="142" height="26"/></clipPath><clipPath id="mx-clip-548-857-142-26-0"><rect x="548" y="857" width="142" height="26"/></clipPath><clipPath id="mx-clip-548-889-142-26-0"><rect x="548" y="889" width="142" height="26"/></clipPath><clipPath id="mx-clip-548-921-142-26-0"><rect x="548" y="921" width="142" height="26"/></clipPath><clipPath id="mx-clip-548-954-142-26-0"><rect x="548" y="954" width="142" height="26"/></clipPath><clipPath id="mx-clip-405-1073-239-20-0"><rect x="405" y="1073" width="239" height="20"/></clipPath><clipPath id="mx-clip-405-1111-258-20-0"><rect x="405" y="1111" width="258" height="20"/></clipPath><clipPath id="mx-clip-745-118-92-26-0"><rect x="745" y="118" width="92" height="26"/></clipPath><clipPath id="mx-clip-745-150-92-26-0"><rect x="745" y="150" width="92" height="26"/></clipPath><clipPath id="mx-clip-745-182-72-26-0"><rect x="745" y="182" width="72" height="26"/></clipPath><clipPath id="mx-clip-745-214-92-26-0"><rect x="745" y="214" width="92" height="26"/></clipPath><clipPath id="mx-clip-745-247-92-26-0"><rect x="745" y="247" width="92" height="26"/></clipPath><clipPath id="mx-clip-745-279-72-26-0"><rect x="745" y="279" width="72" height="26"/></clipPath><clipPath id="mx-clip-745-343-72-26-0"><rect x="745" y="343" width="72" height="26"/></clipPath><clipPath id="mx-clip-834-118-162-26-0"><rect x="834" y="118" width="162" height="26"/></clipPath><clipPath id="mx-clip-834-150-162-26-0"><rect x="834" y="150" width="162" height="26"/></clipPath><clipPath id="mx-clip-834-182-162-26-0"><rect x="834" y="182" width="162" height="26"/></clipPath><clipPath id="mx-clip-834-214-162-26-0"><rect x="834" y="214" width="162" height="26"/></clipPath><clipPath id="mx-clip-834-247-162-26-0"><rect x="834" y="247" width="162" height="26"/></clipPath><clipPath id="mx-clip-834-279-152-26-0"><rect x="834" y="279" width="152" height="26"/></clipPath><clipPath id="mx-clip-834-343-85-26-0"><rect x="834" y="343" width="85" height="26"/></clipPath><clipPath id="mx-clip-745-438-222-26-0"><rect x="745" y="438" width="222" height="26"/></clipPath><clipPath id="mx-clip-745-470-232-26-0"><rect x="745" y="470" width="232" height="26"/></clipPath><clipPath id="mx-clip-745-502-222-26-0"><rect x="745" y="502" width="222" height="26"/></clipPath><clipPath id="mx-clip-745-535-222-26-0"><rect x="745" y="535" width="222" height="26"/></clipPath><clipPath id="mx-clip-745-567-222-26-0"><rect x="745" y="567" width="222" height="26"/></clipPath><clipPath id="mx-clip-1005-438-408-26-0"><rect x="1005" y="438" width="408" height="26"/></clipPath><clipPath id="mx-clip-1005-470-408-26-0"><rect x="1005" y="470" width="408" height="26"/></clipPath><clipPath id="mx-clip-1005-502-262-26-0"><rect x="1005" y="502" width="262" height="26"/></clipPath><clipPath id="mx-clip-1005-534-262-26-0"><rect x="1005" y="534" width="262" height="26"/></clipPath><clipPath id="mx-clip-1005-567-262-26-0"><rect x="1005" y="567" width="262" height="26"/></clipPath><clipPath id="mx-clip-745-664-82-26-0"><rect x="745" y="664" width="82" height="26"/></clipPath><clipPath id="mx-clip-745-696-82-26-0"><rect x="745" y="696" width="82" height="26"/></clipPath><clipPath id="mx-clip-745-728-82-26-0"><rect x="745" y="728" width="82" height="26"/></clipPath><clipPath id="mx-clip-745-760-82-26-0"><rect x="745" y="760" width="82" height="26"/></clipPath><clipPath id="mx-clip-745-825-82-27-0"><rect x="745" y="825" width="82" height="27"/></clipPath><clipPath id="mx-clip-745-857-82-26-0"><rect x="745" y="857" width="82" height="26"/></clipPath><clipPath id="mx-clip-745-889-82-26-0"><rect x="745" y="889" width="82" height="26"/></clipPath><clipPath id="mx-clip-745-922-82-26-0"><rect x="745" y="922" width="82" height="26"/></clipPath><clipPath id="mx-clip-745-954-82-26-0"><rect x="745" y="954" width="82" height="26"/></clipPath><clipPath id="mx-clip-745-986-82-26-0"><rect x="745" y="986" width="82" height="26"/></clipPath><clipPath id="mx-clip-745-1018-82-26-0"><rect x="745" y="1018" width="82" height="26"/></clipPath><clipPath id="mx-clip-745-1051-82-26-0"><rect x="745" y="1051" width="82" height="26"/></clipPath><clipPath id="mx-clip-745-1083-82-26-0"><rect x="745" y="1083" width="82" height="26"/></clipPath><clipPath id="mx-clip-745-1115-98-26-0"><rect x="745" y="1115" width="98" height="26"/></clipPath><clipPath id="mx-clip-845-696-132-26-0"><rect x="845" y="696" width="132" height="26"/></clipPath><clipPath id="mx-clip-845-664-132-26-0"><rect x="845" y="664" width="132" height="26"/></clipPath><clipPath id="mx-clip-845-728-132-26-0"><rect x="845" y="728" width="132" height="26"/></clipPath><clipPath id="mx-clip-845-760-132-26-0"><rect x="845" y="760" width="132" height="26"/></clipPath><clipPath id="mx-clip-845-824-195-28-0"><rect x="845" y="824" width="195" height="28"/></clipPath><clipPath id="mx-clip-845-857-132-26-0"><rect x="845" y="857" width="132" height="26"/></clipPath><clipPath id="mx-clip-845-889-132-26-0"><rect x="845" y="889" width="132" height="26"/></clipPath><clipPath id="mx-clip-845-922-132-26-0"><rect x="845" y="922" width="132" height="26"/></clipPath><clipPath id="mx-clip-845-954-132-26-0"><rect x="845" y="954" width="132" height="26"/></clipPath><clipPath id="mx-clip-845-986-132-26-0"><rect x="845" y="986" width="132" height="26"/></clipPath><clipPath id="mx-clip-845-1019-132-26-0"><rect x="845" y="1019" width="132" height="26"/></clipPath><clipPath id="mx-clip-845-1051-132-26-0"><rect x="845" y="1051" width="132" height="26"/></clipPath><clipPath id="mx-clip-845-1083-132-26-0"><rect x="845" y="1083" width="132" height="26"/></clipPath><clipPath id="mx-clip-845-1115-208-26-0"><rect x="845" y="1115" width="208" height="26"/></clipPath><clipPath id="mx-clip-1105-899-102-26-0"><rect x="1105" y="899" width="102" height="26"/></clipPath><clipPath id="mx-clip-1105-932-102-26-0"><rect x="1105" y="932" width="102" height="26"/></clipPath><clipPath id="mx-clip-1105-964-102-26-0"><rect x="1105" y="964" width="102" height="26"/></clipPath><clipPath id="mx-clip-1105-996-102-26-0"><rect x="1105" y="996" width="102" height="26"/></clipPath><clipPath id="mx-clip-1215-899-132-26-0"><rect x="1215" y="899" width="132" height="26"/></clipPath><clipPath id="mx-clip-1215-932-188-26-0"><rect x="1215" y="932" width="188" height="26"/></clipPath><clipPath id="mx-clip-1215-964-112-26-0"><rect x="1215" y="964" width="112" height="26"/></clipPath><clipPath id="mx-clip-1215-996-112-26-0"><rect x="1215" y="996" width="112" height="26"/></clipPath><clipPath id="mx-clip-1105-118-112-26-0"><rect x="1105" y="118" width="112" height="26"/></clipPath><clipPath id="mx-clip-1105-150-112-26-0"><rect x="1105" y="150" width="112" height="26"/></clipPath><clipPath id="mx-clip-1105-182-112-26-0"><rect x="1105" y="182" width="112" height="26"/></clipPath><clipPath id="mx-clip-1105-214-112-26-0"><rect x="1105" y="214" width="112" height="26"/></clipPath><clipPath id="mx-clip-1105-247-112-26-0"><rect x="1105" y="247" width="112" height="26"/></clipPath><clipPath id="mx-clip-1105-279-112-26-0"><rect x="1105" y="279" width="112" height="26"/></clipPath><clipPath id="mx-clip-1105-311-112-26-0"><rect x="1105" y="311" width="112" height="26"/></clipPath><clipPath id="mx-clip-1105-343-132-26-0"><rect x="1105" y="343" width="132" height="26"/></clipPath><clipPath id="mx-clip-1245-118-141-26-0"><rect x="1245" y="118" width="141" height="26"/></clipPath><clipPath id="mx-clip-1245-150-141-26-0"><rect x="1245" y="150" width="141" height="26"/></clipPath><clipPath id="mx-clip-1245-182-141-26-0"><rect x="1245" y="182" width="141" height="26"/></clipPath><clipPath id="mx-clip-1245-214-141-26-0"><rect x="1245" y="214" width="141" height="26"/></clipPath><clipPath id="mx-clip-1245-247-141-26-0"><rect x="1245" y="247" width="141" height="26"/></clipPath><clipPath id="mx-clip-1245-279-141-26-0"><rect x="1245" y="279" width="141" height="26"/></clipPath><clipPath id="mx-clip-1245-311-122-26-0"><rect x="1245" y="311" width="122" height="26"/></clipPath><clipPath id="mx-clip-1245-343-132-26-0"><rect x="1245" y="343" width="132" height="26"/></clipPath><clipPath id="mx-clip-1105-663-92-26-0"><rect x="1105" y="663" width="92" height="26"/></clipPath><clipPath id="mx-clip-1105-696-92-26-0"><rect x="1105" y="696" width="92" height="26"/></clipPath><clipPath id="mx-clip-1105-728-92-26-0"><rect x="1105" y="728" width="92" height="26"/></clipPath><clipPath id="mx-clip-1105-760-92-26-0"><rect x="1105" y="760" width="92" height="26"/></clipPath><clipPath id="mx-clip-1105-793-92-26-0"><rect x="1105" y="793" width="92" height="26"/></clipPath><clipPath id="mx-clip-1215-663-112-26-0"><rect x="1215" y="663" width="112" height="26"/></clipPath><clipPath id="mx-clip-1215-696-112-26-0"><rect x="1215" y="696" width="112" height="26"/></clipPath><clipPath id="mx-clip-1215-728-112-26-0"><rect x="1215" y="728" width="112" height="26"/></clipPath><clipPath id="mx-clip-1215-760-112-26-0"><rect x="1215" y="760" width="112" height="26"/></clipPath><clipPath id="mx-clip-1215-793-112-26-0"><rect x="1215" y="793" width="112" height="26"/></clipPath><clipPath id="mx-clip-1084-82-165-26-0"><rect x="1084" y="82" width="165" height="26"/></clipPath><clipPath id="mx-clip-725-82-165-26-0"><rect x="725" y="82" width="165" height="26"/></clipPath><clipPath id="mx-clip-369-82-165-26-0"><rect x="369" y="82" width="165" height="26"/></clipPath><clipPath id="mx-clip-5-82-165-26-0"><rect x="5" y="82" width="165" height="26"/></clipPath><clipPath id="mx-clip-4-403-165-26-0"><rect x="4" y="403" width="165" height="26"/></clipPath><clipPath id="mx-clip-365-403-165-26-0"><rect x="365" y="403" width="165" height="26"/></clipPath><clipPath id="mx-clip-725-403-165-26-0"><rect x="725" y="403" width="165" height="26"/></clipPath><clipPath id="mx-clip-1085-627-165-26-0"><rect x="1085" y="627" width="165" height="26"/></clipPath><clipPath id="mx-clip-725-627-165-26-0"><rect x="725" y="627" width="165" height="26"/></clipPath><clipPath id="mx-clip-178-5-273-59-0"><rect x="178" y="5" width="273" height="59"/></clipPath><clipPath id="mx-clip-165-1115-142-26-0"><rect x="165" y="1115" width="142" height="26"/></clipPath><clipPath id="mx-clip-25-1115-132-26-0"><rect x="25" y="1115" width="132" height="26"/></clipPath><clipPath id="mx-clip-745-311-72-26-0"><rect x="745" y="311" width="72" height="26"/></clipPath><clipPath id="mx-clip-834-311-152-26-0"><rect x="834" y="311" width="152" height="26"/></clipPath><clipPath id="mx-clip-378-470-142-26-0"><rect x="378" y="470" width="142" height="26"/></clipPath><clipPath id="mx-clip-548-470-115-26-0"><rect x="548" y="470" width="115" height="26"/></clipPath><clipPath id="mx-clip-845-793-132-26-0"><rect x="845" y="793" width="132" height="26"/></clipPath><clipPath id="mx-clip-745-792-82-26-0"><rect x="745" y="792" width="82" height="26"/></clipPath><clipPath id="mx-clip-120-118-192-26-0"><rect x="120" y="118" width="192" height="26"/></clipPath><clipPath id="mx-clip-25-118-112-26-0"><rect x="25" y="118" width="112" height="26"/></clipPath><clipPath id="mx-clip-130-787-10-20-0"><rect x="130" y="787" width="10" height="20"/></clipPath><clipPath id="mx-clip-91-147-10-20-0"><rect x="91" y="147" width="10" height="20"/></clipPath><clipPath id="mx-clip-25-438-132-26-0"><rect x="25" y="438" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-470-132-26-0"><rect x="25" y="470" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-502-132-26-0"><rect x="25" y="502" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-535-132-26-0"><rect x="25" y="535" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-567-132-26-0"><rect x="25" y="567" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-599-132-26-0"><rect x="25" y="599" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-631-132-26-0"><rect x="25" y="631" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-664-132-26-0"><rect x="25" y="664" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-696-132-26-0"><rect x="25" y="696" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-728-132-26-0"><rect x="25" y="728" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-760-132-26-0"><rect x="25" y="760" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-793-132-26-0"><rect x="25" y="793" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-825-132-26-0"><rect x="25" y="825" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-857-132-26-0"><rect x="25" y="857" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-889-132-26-0"><rect x="25" y="889" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-922-132-26-0"><rect x="25" y="922" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-954-132-26-0"><rect x="25" y="954" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-986-132-26-0"><rect x="25" y="986" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-1019-132-26-0"><rect x="25" y="1019" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-1051-132-26-0"><rect x="25" y="1051" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-1083-132-26-0"><rect x="25" y="1083" width="132" height="26"/></clipPath><clipPath id="mx-clip-165-438-142-26-0"><rect x="165" y="438" width="142" height="26"/></clipPath><clipPath id="mx-clip-165-470-142-26-0"><rect x="165" y="470" width="142" height="26"/></clipPath><clipPath id="mx-clip-165-502-142-26-0"><rect x="165" y="502" width="142" height="26"/></clipPath><clipPath id="mx-clip-165-535-142-26-0"><rect x="165" y="535" width="142" height="26"/></clipPath><clipPath id="mx-clip-165-567-142-26-0"><rect x="165" y="567" width="142" height="26"/></clipPath><clipPath id="mx-clip-165-599-142-26-0"><rect x="165" y="599" width="142" height="26"/></clipPath><clipPath id="mx-clip-165-631-142-26-0"><rect x="165" y="631" width="142" height="26"/></clipPath><clipPath id="mx-clip-165-664-142-26-0"><rect x="165" y="664" width="142" height="26"/></clipPath><clipPath id="mx-clip-165-696-142-26-0"><rect x="165" y="696" width="142" height="26"/></clipPath><clipPath id="mx-clip-165-728-151-26-0"><rect x="165" y="728" width="151" height="26"/></clipPath><clipPath id="mx-clip-165-760-142-26-0"><rect x="165" y="760" width="142" height="26"/></clipPath><clipPath id="mx-clip-165-954-142-26-0"><rect x="165" y="954" width="142" height="26"/></clipPath><clipPath id="mx-clip-165-825-142-26-0"><rect x="165" y="825" width="142" height="26"/></clipPath><clipPath id="mx-clip-165-857-142-26-0"><rect x="165" y="857" width="142" height="26"/></clipPath><clipPath id="mx-clip-165-889-142-26-0"><rect x="165" y="889" width="142" height="26"/></clipPath><clipPath id="mx-clip-165-922-142-26-0"><rect x="165" y="922" width="142" height="26"/></clipPath><clipPath id="mx-clip-165-986-142-26-0"><rect x="165" y="986" width="142" height="26"/></clipPath><clipPath id="mx-clip-165-793-142-26-0"><rect x="165" y="793" width="142" height="26"/></clipPath><clipPath id="mx-clip-165-1019-168-26-0"><rect x="165" y="1019" width="168" height="26"/></clipPath><clipPath id="mx-clip-165-1051-142-26-0"><rect x="165" y="1051" width="142" height="26"/></clipPath><clipPath id="mx-clip-165-1083-148-26-0"><rect x="165" y="1083" width="148" height="26"/></clipPath><clipPath id="mx-clip-485-16-388-26-0"><rect x="485" y="16" width="388" height="26"/></clipPath><clipPath id="mx-clip-1105-825-92-26-0"><rect x="1105" y="825" width="92" height="26"/></clipPath><clipPath id="mx-clip-1105-858-92-26-0"><rect x="1105" y="858" width="92" height="26"/></clipPath><clipPath id="mx-clip-1215-825-112-26-0"><rect x="1215" y="825" width="112" height="26"/></clipPath><clipPath id="mx-clip-1215-858-112-26-0"><rect x="1215" y="858" width="112" height="26"/></clipPath></defs><g><rect x="7" y="431" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="7" y="463" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="7" y="527" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="7" y="495" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="7" y="560" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="7" y="592" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="7" y="656" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="7" y="624" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="7" y="689" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="7" y="721" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="7" y="753" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="7" y="785" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="7" y="818" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="7" y="850" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="7" y="882" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="7" y="914" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="7" y="1108" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="7" y="1076" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="7" y="1044" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="7" y="1011" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="7" y="979" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="7" y="947" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="367" y="431" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="367" y="527" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="367" y="560" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="367" y="592" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="367" y="656" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="367" y="624" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="367" y="495" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="367" y="463" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="367" y="689" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="367" y="721" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="367" y="753" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="367" y="785" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="367" y="818" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="367" y="850" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="367" y="882" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="367" y="914" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="367" y="947" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="367" y="111" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="367" y="143" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="367" y="175" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="367" y="207" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="367" y="239" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="367" y="304" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="367" y="272" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="367" y="336" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="7" y="111" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="7" y="143" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="7" y="175" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="7" y="207" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="7" y="239" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="7" y="272" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="7" y="304" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="7" y="336" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="727" y="111" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="727" y="143" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="727" y="175" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="727" y="207" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="727" y="239" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="727" y="272" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="727" y="304" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="727" y="336" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="1087" y="336" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="1087" y="304" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="1087" y="272" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="1087" y="239" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="1087" y="207" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="1087" y="175" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="1087" y="143" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="1087" y="111" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="727" y="431" width="700" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="727" y="463" width="700" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="727" y="495" width="700" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="727" y="527" width="700" height="31" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="727" y="560" width="700" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="727" y="656" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="727" y="689" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="727" y="753" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="727" y="721" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="727" y="785" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="727" y="818" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="727" y="850" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="727" y="882" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="727" y="914" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="727" y="947" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="727" y="1011" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="727" y="979" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="727" y="1044" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="727" y="1076" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="727" y="1108" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="1087" y="656" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="1087" y="689" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="1087" y="721" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="1087" y="753" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="1087" y="785" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="1087" y="892" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="1087" y="924" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="1087" y="957" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="1087" y="989" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-150-112-26-0)" font-size="12px"><text x="26.5" y="162.5">Shift+Enter</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-182-112-26-0)" font-size="12px"><text x="26.5" y="194.5">Enter</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-214-112-26-0)" font-size="12px"><text x="26.5" y="226.5">F2 / Enter</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-247-132-26-0)" font-size="12px"><text x="26.5" y="259">F2 / Tab / Esc</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-279-112-26-0)" font-size="12px"><text x="26.5" y="291.5">Ctrl+B / I</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-311-112-26-0)" font-size="12px"><text x="26.5" y="323.5">Ctrl+U</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-343-112-26-0)" font-size="12px"><text x="26.5" y="355.5">Ctrl+. / ,</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-102-241-10-20-0)" font-size="10px"><text x="103.5" y="251.5">1</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-120-150-192-26-0)" font-size="12px"><text x="121.5" y="162.5">New Line in Formatted Labels</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-120-182-202-26-0)" font-size="12px"><text x="121.5" y="194.5">New Paragraph in Formatted Labels</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-120-214-192-26-0)" font-size="12px"><text x="121.5" y="226.5">Start Editing Label of Selected Cell</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-120-247-192-26-0)" font-size="12px"><text x="121.5" y="259">Stop Editing and Apply Value</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-120-279-192-26-0)" font-size="12px"><text x="121.5" y="291.5">Toggle Bold/Italic on Selected Text</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-120-311-192-26-0)" font-size="12px"><text x="121.5" y="323.5">Toggle Underline on Selected Text</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-120-343-211-26-0)" font-size="12px"><text x="121.5" y="355.5">Superscript/Subscript on Selected Text</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-385-118-82-26-0)" font-size="12px"><text x="386.5" y="130.5">(Shift+)Tab</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-385-150-92-26-0)" font-size="12px"><text x="386.5" y="162.5">Alt+(Shift+)Tab</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-385-182-82-26-0)" font-size="12px"><text x="386.5" y="194.5">Shift+Drag</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-385-214-92-26-0)" font-size="12px"><text x="386.5" y="226.5">Alt+Shift+Drag</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-385-247-82-26-0)" font-size="12px"><text x="386.5" y="259">Ctrl+(Shift+)A</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-385-279-92-26-0)" font-size="12px"><text x="386.5" y="291.5">Ctrl+Shift+I / E</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-385-311-99-26-0)" font-size="12px"><text x="386.5" y="323.5">Ctrl / Shift+Click</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-385-343-102-26-0)" font-size="12px"><text x="386.5" y="355.5">Alt+Click</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-506-118-147-26-0)" font-size="12px"><text x="507.5" y="130.5">Select Next / Previous</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-506-150-147-26-0)" font-size="12px"><text x="507.5" y="162.5">Select Child / Parent</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-506-182-147-26-0)" font-size="12px"><text x="507.5" y="194.5">Add to Selection</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-506-214-147-26-0)" font-size="12px"><text x="507.5" y="226.5">Remove from Selection</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-506-247-102-26-0)" font-size="12px"><text x="507.5" y="259">Select All / None</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-506-279-138-26-0)" font-size="12px"><text x="507.5" y="291.5">Select Vertices / Edges</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-506-311-137-26-0)" font-size="12px"><text x="507.5" y="323.5">Toggle Selection State</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-506-343-128-26-0)" font-size="12px"><text x="507.5" y="355.5">Select Cell Below</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-378-438-158-26-0)" font-size="12px"><text x="379.5" y="450.5">Alt+Mouse wheel</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-378-502-122-26-0)" font-size="12px"><text x="379.5" y="514.5">Ctrl+Mouse wheel</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-378-534-122-26-0)" font-size="12px"><text x="379.5" y="547">Mouse wheel</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-378-567-122-26-0)" font-size="12px"><text x="379.5" y="579.5">Shift+Mouse wheel</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-378-599-152-26-0)" font-size="12px"><text x="379.5" y="611.5">Space / Right mouse Drag</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-378-631-122-26-0)" font-size="12px"><text x="379.5" y="643.5">Ctrl+Shift+Drag</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-378-664-122-26-0)" font-size="12px"><text x="379.5" y="676">Ctrl+Shift+Connect</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-378-696-122-26-0)" font-size="12px"><text x="379.5" y="708.5">Home</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-378-728-122-26-0)" font-size="12px"><text x="379.5" y="740.5">End</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-378-760-122-26-0)" font-size="12px"><text x="379.5" y="772.5">Ctrl+H</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-378-793-122-26-0)" font-size="12px"><text x="379.5" y="805">Ctrl+Shift+H</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-378-825-122-26-0)" font-size="12px"><text x="379.5" y="837.5">Ctrl+J</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-378-857-122-26-0)" font-size="12px"><text x="379.5" y="869.5">Ctrl+Shift+J</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-378-921-122-26-0)" font-size="12px"><text x="379.5" y="934">Ctrl + (Numpad)</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-378-954-122-26-0)" font-size="12px"><text x="379.5" y="966.5">Ctrl - (Numpad)</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-378-889-122-26-0)" font-size="12px"><text x="379.5" y="901.5">Ctrl+0</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-548-438-117-26-0)" font-size="12px"><text x="549.5" y="450.5">Canvas Zoom In/Out</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-548-502-144-26-0)" font-size="12px"><text x="549.5" y="514.5">Screen Zoom In/Out (Mac)</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-548-535-142-26-0)" font-size="12px"><text x="549.5" y="547">Canvas Vertical Scroll</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-548-567-142-26-0)" font-size="12px"><text x="549.5" y="579.5">Canvas Horizontal Scroll</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-548-599-122-26-0)" font-size="12px"><text x="549.5" y="611.5">Pan Canvas</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-548-631-142-26-0)" font-size="12px"><text x="549.5" y="643.5">Create / Remove Space</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-548-664-142-26-0)" font-size="12px"><text x="549.5" y="676">Disable Connections</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-548-696-142-26-0)" font-size="12px"><text x="549.5" y="708.5">Home</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-548-728-142-26-0)" font-size="12px"><text x="549.5" y="740.5">Refresh</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-548-760-142-26-0)" font-size="12px"><text x="549.5" y="772.5">Reset View</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-548-793-142-26-0)" font-size="12px"><text x="549.5" y="805">Fit Window</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-548-825-142-26-0)" font-size="12px"><text x="549.5" y="837.5">Fit Page</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-548-857-142-26-0)" font-size="12px"><text x="549.5" y="869.5">Fit Two Pages</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-548-889-142-26-0)" font-size="12px"><text x="549.5" y="901.5">Custom Zoom</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-548-921-142-26-0)" font-size="12px"><text x="549.5" y="934">Zoom In</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-548-954-142-26-0)" font-size="12px"><text x="549.5" y="966.5">Zoom Out</text></g><g fill="#333333" font-family="Helvetica" font-size="12px"><text x="406.5" y="1026.5">Click to connect and clone (ctrl+click to clone,</text><text x="406.5" y="1040.5">shift+click to connect). Drag to connect</text><text x="406.5" y="1054.5">(ctrl+drag to clone).</text></g><image x="382.5" y="1018.5" width="20" height="20" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAaCAYAAACHD21cAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NThDQzc5RTU5NjZGMTFFNTg5NTRDNzQwMTgwNDlEQzQiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NThDQzc5RTY5NjZGMTFFNTg5NTRDNzQwMTgwNDlEQzQiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo1OENDNzlFMzk2NkYxMUU1ODk1NEM3NDAxODA0OURDNCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo1OENDNzlFNDk2NkYxMUU1ODk1NEM3NDAxODA0OURDNCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PrHdKTUAAADDSURBVHjanNTBCgFRFIfxMeTZyEKkiBSRxbwREZGiNFZKWSnvY6OUUv6n7ilZaL459XVXv6a5c+cWovQeaSZqFoGJwzpVozzQZq4GeSDCv7AYcJ9Cx0vVpdDxWrUpdLxVLQr/4jjDBpYDblDoeKdqFDpOHRP4jSsU2rzVg8KnqqpbDFFdXck7vlRTXciuOjqT72ioo07k5Nju9dSRnFVHB/J3GBqqPf0fx2pDbwBDK3Ln2MdN1CLraSiFNcn6JJ+PAAMAbnMl1tyDPD8AAAAASUVORK5CYII=" pointer-events="none"/><image x="384.33" y="1108.5" width="15" height="25" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAAZAgMAAACTN5xfAAAACVBMVEX///////8AAACO9MPsAAAAAXRSTlMAQObYZgAAAFRJREFUeF5VyjEKgDAQRNGPRSA38AB6JEWsUkggt9hLGDbdlh5Tp7R5DPzBAEK46OI2UcQhdrGZKB/nA13B9Q5hqwEij+akVi/yFDMJFjL8VlUdw1+gHxbW+YsglAAAAABJRU5ErkJggg==" pointer-events="none"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-405-1073-239-20-0)" font-size="12px"><text x="406.5" y="1086.5">Click to rotate 90° clockwise. Drag to rotate.</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-405-1111-258-20-0)" font-size="12px"><text x="406.5" y="1124.5">Ctrl: Show Dialog, Alt: Origin, Shift: Ignore XML</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-118-92-26-0)" font-size="12px"><text x="746.5" y="130.5">Ctrl+Shift+L</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-150-92-26-0)" font-size="12px"><text x="746.5" y="162.5">Ctrl+Shift+O</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-182-72-26-0)" font-size="12px"><text x="746.5" y="194.5">Ctrl+M</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-214-92-26-0)" font-size="12px"><text x="746.5" y="226.5">Ctrl+Shift+P</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-247-92-26-0)" font-size="12px"><text x="746.5" y="259">Ctrl+Shift+M</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-279-72-26-0)" font-size="12px"><text x="746.5" y="291.5">Rightclick</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-343-72-26-0)" font-size="12px"><text x="746.5" y="355.5">F1</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-834-118-162-26-0)" font-size="12px"><text x="835.5" y="130.5">Toggle Layers Window</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-834-150-162-26-0)" font-size="12px"><text x="835.5" y="162.5">Toggle Outline Window</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-834-182-162-26-0)" font-size="12px"><text x="835.5" y="194.5">Edit Metadata</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-834-214-162-26-0)" font-size="12px"><text x="835.5" y="226.5">Toggle Format Panel</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-834-247-162-26-0)" font-size="12px"><text x="835.5" y="259">Edit Vertex Geometry</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-834-279-152-26-0)" font-size="12px"><text x="835.5" y="291.5">Context Menu</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-834-343-85-26-0)" font-size="12px"><text x="835.5" y="355.5">About</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-438-222-26-0)" font-size="12px"><text x="746.5" y="450.5">Alt+(Shift+)Drag from sidebar</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-470-232-26-0)" font-size="12px"><text x="746.5" y="482.5">Alt+(Shift / Ctrl)+Click on a sidebar item</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-502-222-26-0)" font-size="12px"><text x="746.5" y="514.5">Shift+Click on a sidebar item</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-535-222-26-0)" font-size="12px"><text x="746.5" y="547">Click on a sidebar item</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-567-222-26-0)" font-size="12px"><text x="746.5" y="579.5">Ctrl+Shift+Move Endpoint</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1005-438-408-26-0)" font-size="12px"><text x="1006.5" y="450.5">Disable replace, connect on drop (drop targets), Shift ignores current style</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1005-470-408-26-0)" font-size="12px"><text x="1006.5" y="482.5">Inserts and connects the selected item (Shift ignores current style)</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1005-502-262-26-0)" font-size="12px"><text x="1006.5" y="514.5">Replaces the selected item with the clicked one</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1005-534-262-26-0)" font-size="12px"><text x="1006.5" y="547">Connects unconnected side of selected edge</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1005-567-262-26-0)" font-size="12px"><text x="1006.5" y="579.5">Disables connections</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-664-82-26-0)" font-size="12px"><text x="746.5" y="676">Ctrl+S</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-696-82-26-0)" font-size="12px"><text x="746.5" y="708.5">Ctrl+Shift+S</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-728-82-26-0)" font-size="12px"><text x="746.5" y="740.5">Ctrl+Z</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-760-82-26-0)" font-size="12px"><text x="746.5" y="772.5">Alt+Shift+A</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-825-82-27-0)" font-size="12px"><text x="746.5" y="837">Hold Alt</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-857-82-26-0)" font-size="12px"><text x="746.5" y="869.5">Ctrl+Shift+G</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-889-82-26-0)" font-size="12px"><text x="746.5" y="901.5">Ctrl+P</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-922-82-26-0)" font-size="12px"><text x="746.5" y="934">Ctrl+Y</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-954-82-26-0)" font-size="12px"><text x="746.5" y="966.5">Ctrl+Shift+Z</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-986-82-26-0)" font-size="12px"><text x="746.5" y="998.5">Ctrl+Shift+X</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-1018-82-26-0)" font-size="12px"><text x="746.5" y="1031">Ctrl+K</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-1051-82-26-0)" font-size="12px"><text x="746.5" y="1063.5">Ctrl+Shift+K</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-1083-82-26-0)" font-size="12px"><text x="746.5" y="1095.5">Esc</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-1115-98-26-0)" font-size="12px"><text x="746.5" y="1127.5">Alt+Drag / Drop</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-845-696-132-26-0)" font-size="12px"><text x="846.5" y="708.5">Save as</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-845-664-132-26-0)" font-size="12px"><text x="846.5" y="676">Save</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-845-728-132-26-0)" font-size="12px"><text x="846.5" y="740.5">Undo</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-845-760-132-26-0)" font-size="12px"><text x="846.5" y="772.5">Connection Arrows</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-845-824-195-28-0)" font-size="12px"><text x="846.5" y="836.5">Ignores handles under the mouse</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-845-857-132-26-0)" font-size="12px"><text x="846.5" y="869.5">Toggle grid</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-845-889-132-26-0)" font-size="12px"><text x="846.5" y="901.5">Print</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-845-922-132-26-0)" font-size="12px"><text x="846.5" y="934">Redo (Windows)</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-845-954-132-26-0)" font-size="12px"><text x="846.5" y="966.5">Redo (Linux/Mac)</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-845-986-132-26-0)" font-size="12px"><text x="846.5" y="998.5">Insert Text</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-845-1019-132-26-0)" font-size="12px"><text x="846.5" y="1031">Insert Rectangle</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-845-1051-132-26-0)" font-size="12px"><text x="846.5" y="1063.5">Insert Ellipse</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-845-1083-132-26-0)" font-size="12px"><text x="846.5" y="1095.5">Cancel Action</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-845-1115-208-26-0)" font-size="12px"><text x="846.5" y="1127.5">Force Rubberband / Ignore Group</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-1105-899-102-26-0)" font-size="12px"><text x="1106.5" y="911.5">Drag</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-1105-932-102-26-0)" font-size="12px"><text x="1106.5" y="944">Tap and hold</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-1105-964-102-26-0)" font-size="12px"><text x="1106.5" y="976.5">Pinch</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-1105-996-102-26-0)" font-size="12px"><text x="1106.5" y="1008.5">Tap selected cell</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1215-899-132-26-0)" font-size="12px"><text x="1216.5" y="911.5">Move Cell / Pan Canvas</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1215-932-188-26-0)" font-size="12px"><text x="1216.5" y="944.5">Toggle Selection / Rubberband</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1215-964-112-26-0)" font-size="12px"><text x="1216.5" y="976.5">Zoom</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1215-996-112-26-0)" font-size="12px"><text x="1216.5" y="1008.5">Context Menu</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-1105-118-112-26-0)" font-size="12px"><text x="1106.5" y="130.5">Cursor</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-1105-150-112-26-0)" font-size="12px"><text x="1106.5" y="162.5">Shift+Cursor</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-1105-182-112-26-0)" font-size="12px"><text x="1106.5" y="194.5">Ctrl+Cursor</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-1105-214-112-26-0)" font-size="12px"><text x="1106.5" y="226.5">Ctrl+Shift+Cursor</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-1105-247-112-26-0)" font-size="12px"><text x="1106.5" y="259">Alt+Shift+Cursor</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-1105-279-112-26-0)" font-size="12px"><text x="1106.5" y="291.5">Alt+Cursor</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-1105-311-112-26-0)" font-size="12px"><text x="1106.5" y="323.5">Ctrl+Shift+Pg Up</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-1105-343-132-26-0)" font-size="12px"><text x="1106.5" y="355.5">Ctrl+Shift+Pg Down</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1245-118-141-26-0)" font-size="12px"><text x="1246.5" y="130.5">Scroll / Move cell (1px)</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1245-150-141-26-0)" font-size="12px"><text x="1246.5" y="162.5">Move cell (grid size)</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1245-182-141-26-0)" font-size="12px"><text x="1246.5" y="194.5">Resize cell (1px)</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1245-214-141-26-0)" font-size="12px"><text x="1246.5" y="226.5">Resize cell (grid size)</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1245-247-141-26-0)" font-size="12px"><text x="1246.5" y="259">Clone and connect</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1245-279-141-26-0)" font-size="12px"><text x="1246.5" y="291.5">Scroll Page</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1245-311-122-26-0)" font-size="12px"><text x="1246.5" y="323.5">Previous Page</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1245-343-132-26-0)" font-size="12px"><text x="1246.5" y="355.5">Next Page</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-1105-663-92-26-0)" font-size="12px"><text x="1106.5" y="675.5">Ctrl+Shift+R</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-1105-696-92-26-0)" font-size="12px"><text x="1106.5" y="708.5">Ctrl+E</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-1105-728-92-26-0)" font-size="12px"><text x="1106.5" y="740.5">Ctrl+Shift+D</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-1105-760-92-26-0)" font-size="12px"><text x="1106.5" y="772.5">Ctrl+Shift+C</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-1105-793-92-26-0)" font-size="12px"><text x="1106.5" y="805">Ctrl+Shift+V</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1215-663-112-26-0)" font-size="12px"><text x="1216.5" y="675.5">Clear Default Style</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1215-696-112-26-0)" font-size="12px"><text x="1216.5" y="708.5">Edit Style</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1215-728-112-26-0)" font-size="12px"><text x="1216.5" y="740.5">Set as Default Style</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1215-760-112-26-0)" font-size="12px"><text x="1216.5" y="772.5">Copy Style</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1215-793-112-26-0)" font-size="12px"><text x="1216.5" y="805">Paste Style</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-1084-82-165-26-0)" font-size="14px"><text x="1085.5" y="96.5">CURSOR / PAGE KEYS</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-725-82-165-26-0)" font-size="14px"><text x="726.5" y="96.5">TOOLS</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-369-82-165-26-0)" font-size="14px"><text x="370.5" y="96.5">SELECTION</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-5-82-165-26-0)" font-size="14px"><text x="6.5" y="96.5">LABELS</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-4-403-165-26-0)" font-size="14px"><text x="5.5" y="417.5">CANVAS</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-365-403-165-26-0)" font-size="14px"><text x="366.5" y="417.5">VIEW</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-725-403-165-26-0)" font-size="14px"><text x="726.5" y="417.5">SIDEBAR / CONNECT</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-1085-627-165-26-0)" font-size="14px"><text x="1086.5" y="641.5">STYLES</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-725-627-165-26-0)" font-size="14px"><text x="726.5" y="641.5">DOCUMENT</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-178-5-273-59-0)" font-size="30px"><text x="179.5" y="35.5">Keyboard Shortcuts</text></g><image x="365.5" y="1064.5" width="39" height="37" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADYAAAA0CAYAAADBjcvWAAAMKWlDQ1BJQ0MgUHJvZmlsZQAASImVVwdYU8kWnluSkJDQAqFICb2JUqRLDS2CgFTBRkgCCSWGhCBiRxYVXAsqFqzoqohtLYAsNixYEez9oQiKsi7qYgPlTRJAV7/33vfO9829/z1z5pz/nDsz3wwA6tEcsTgL1QAgW5QriQkNZE5MSmaSngIE4IAGtADgcKXigOjoCABl6P1PeX8bWkO54SD39XP/fxVNHl/KBQCJhjiVJ+VmQ3wEANyNK5bkAkDohnrzGbliiImQJdCWQIIQW8hxuhJ7yHGqEkcobOJiWBCnAKBC5XAk6QCoyXkx87jp0I/aUogdRTyhCOIGiH25Ag4P4n6IR2ZnT4dY3QZim9Tv/KT/w2fqsE8OJ30YK3NRiEqQUCrO4sz8P8vxvyU7SzYUwxw2qkASFiPPWV63zOnhckyF+IIoNTIKYvgHkZtCnsJejjsFsrD4QfuPXCkL1gwwAECpPE5QOMSGEJuJsiIjBvW+acIQNsSw9micMJcdpxyL8iTTYwb9o/l8aXDsEOZIFLHkNiWyzPiAQZ+bBXz2kM/6AkFcopIn2pInTIiEWA3ih9LM2PBBm5cFAlbkkI1EFiPnDP85BtIkITFKG8wiWzqUF+YlELIjB3FEriAuTDkWm8rlKLjpQZzBl06MGOLJ4wcFK/PCCvmi+EH+WJk4NzBm0H6HOCt60B5r4GeFyvVmEDdL82KHxvbkwsmmzBcH4tzoOCU3XDuDMy5ayQG3AxGABYIAE8hgSwXTQQYQNnfXdsMvZU8I4AAJSAd84DCoGRqRqOgRwWcsKAB/QsQH0uFxgYpePsiD+i/DWuXTAaQpevMUIzJBJ8TZIBxkwW+ZYpRoOFoCeAY1wp+icyHXLNjkfT/pmOpDOmIwMYgYRgwh2uIGuC/ujUfApz9szrgH7jnE65s9oZPQSnhKuEVoI9ybJiyU/MCcCcaDNsgxZDC71O+zw62gV1c8EPeB/qFvnIEbAAd8DIwUgPvB2K5Q+z1X2XDG32o56IvsSEbJumR/ss2PDNTs1FyHvcgr9X0tlLxSh6vFGu75MQ/Wd/XjwXf4j5bYYuww1oSdxi5iDVgtYGInsTrsCnZcjofnxjPF3BiKFqPgkwn9CH+KxxmMKa+a1LHascuxf7AP5PLzc+WLhTVdPFMiTBfkMgPgbs1nskXcUSOZzo5OcBeV7/3KreUdQ7GnI4xL33Q5pwDwLIHK9G86DtyDjnUCQH//TWf+Fk77FQAcb+HKJHlKHS5/EAAFqMOVog+M4d5lAzNyBm7AG/iDYDAORIE4kASmwjoL4DyVgBlgNlgAikEpWAHWgA1gC9gOdoN94BCoBQ3gNDgPLoMWcAs8gHOlA7wCPeA96EMQhITQEDqij5gglog94ox4IL5IMBKBxCBJSAqSjogQGTIbWYiUImXIBmQbUoX8jhxDTiMXkVbkHvIE6ULeIp9RDKWi2qgRaoWORj3QADQcjUOnoOloDlqAFqHL0HVoJboXrUFPo5fRW2gb+grtxQCmijEwU8wB88BYWBSWjKVhEmwuVoKVY5XYfqwe/ukbWBvWjX3CiTgdZ+IOcL6G4fE4F8/B5+JL8Q34brwGP4vfwJ/gPfhXAo1gSLAneBHYhImEdMIMQjGhnLCTcJRwDq6dDsJ7IpHIIFoT3eHaSyJmEGcRlxI3EQ8QTxFbie3EXhKJpE+yJ/mQokgcUi6pmLSetJd0knSd1EH6qKKqYqLirBKikqwiUilUKVfZo3JC5brKc5U+sgbZkuxFjiLzyDPJy8k7yPXka+QOch9Fk2JN8aHEUTIoCyjrKPsp5ygPKe9UVVXNVD1VJ6gKVeerrlM9qHpB9YnqJ6oW1Y7Kok6myqjLqLuop6j3qO9oNJoVzZ+WTMulLaNV0c7QHtM+qtHVRqmx1Xhq89Qq1GrUrqu9VierW6oHqE9VL1AvVz+sfk29W4OsYaXB0uBozNWo0DimcUejV5Ou6aQZpZmtuVRzj+ZFzRdaJC0rrWAtnlaR1natM1rtdIxuTmfRufSF9B30c/QObaK2tTZbO0O7VHufdrN2j46WzhidBJ18nQqd4zptDIxhxWAzshjLGYcYtxmfdY10A3T5ukt09+te1/2gN0LPX4+vV6J3QO+W3md9pn6wfqb+Sv1a/UcGuIGdwQSDGQabDc4ZdI/QHuE9gjuiZMShEfcNUUM7wxjDWYbbDa8Y9hoZG4UaiY3WG50x6jZmGPsbZxivNj5h3GVCN/E1EZqsNjlp8pKpwwxgZjHXMc8ye0wNTcNMZabbTJtN+8yszeLNCs0OmD0yp5h7mKeZrzZvNO+xMLEYbzHbotriviXZ0sNSYLnWssnyg5W1VaLVIqtaqxfWetZs6wLrauuHNjQbP5scm0qbm7ZEWw/bTNtNti12qJ2rncCuwu6aPWrvZi+032TfOpIw0nOkaGTlyDsOVIcAhzyHaocnoxijIkYVjqod9Xq0xejk0StHN43+6ujqmOW4w/GBk5bTOKdCp3qnt852zlznCuebLjSXEJd5LnUub8bYj+GP2TzmrivddbzrItdG1y9u7m4St/1uXe4W7inuG93veGh7RHss9bjgSfAM9Jzn2eD5ycvNK9frkNdf3g7emd57vF+MtR7LH7tjbLuPmQ/HZ5tPmy/TN8V3q2+bn6kfx6/S76m/uT/Pf6f/8wDbgIyAvQGvAx0DJYFHAz+wvFhzWKeCsKDQoJKg5mCt4PjgDcGPQ8xC0kOqQ3pCXUNnhZ4KI4SFh60Mu8M2YnPZVeyece7j5ow7G04Njw3fEP40wi5CElE/Hh0/bvyq8Q8jLSNFkbVRIIodtSrqUbR1dE70HxOIE6InVEzojHGKmR3TFEuPnRa7J/Z9XGDc8rgH8TbxsvjGBPWEyQlVCR8SgxLLEtsmjp44Z+LlJIMkYVJdMik5IXlncu+k4ElrJnVMdp1cPPn2FOsp+VMuTjWYmjX1+DT1aZxph1MIKYkpe1L6OVGcSk5vKjt1Y2oPl8Vdy33F8+et5nXxffhl/OdpPmllaS/SfdJXpXcJ/ATlgm4hS7hB+CYjLGNLxofMqMxdmQNZiVkHslWyU7KPibREmaKz042n509vFduLi8VtOV45a3J6JOGSnVJEOkVal6sND9lXZDayX2RP8nzzKvI+zkiYcThfM1+Uf2Wm3cwlM58XhBT8NgufxZ3VONt09oLZT+YEzNk2F5mbOrdxnvm8onkd80Pn715AWZC54GqhY2FZ4d8LExfWFxkVzS9q/yX0l+pitWJJ8Z1F3ou2LMYXCxc3L3FZsn7J1xJeyaVSx9Ly0v6l3KWXfnX6dd2vA8vSljUvd1u+eQVxhWjF7ZV+K3eXaZYVlLWvGr+qZjVzdcnqv9dMW3OxfEz5lrWUtbK1besi1tWtt1i/Yn3/BsGGWxWBFQc2Gm5csvHDJt6m65v9N+/fYrSldMvnrcKtd7eFbquptKos307cnre9c0fCjqbfPH6r2mmws3Tnl12iXW27Y3afrXKvqtpjuGd5NVotq+7aO3lvy76gfXX7HfZvO8A4UHoQHJQdfPl7yu+3D4UfajzscXj/EcsjG4/Sj5bUIDUza3pqBbVtdUl1rcfGHWus964/+seoP3Y1mDZUHNc5vvwE5UTRiYGTBSd7T4lPdZ9OP93eOK3xwZmJZ26enXC2+Vz4uQvnQ86faQpoOnnB50LDRa+Lxy55XKq97Ha55orrlaNXXa8ebXZrrrnmfq2uxbOlvnVs64nrftdP3wi6cf4m++blW5G3Wm/H3757Z/Kdtru8uy/uZd17cz/vft+D+Q8JD0seaTwqf2z4uPJftv860ObWdvxJ0JMrT2OfPmjntr96Jn3W31HUSessf27yvOqF84uGrpCulpeTXna8Er/q6y7+U/PPja9tXh/5y/+vKz0TezreSN4MvF36Tv/drr/H/N3YG937+H32+74PJR/1P+7+5PGp6XPi5+d9M/pJ/eu+2H6p/xr+9eFA9sCAmCPhKI4CGGxoWhoAb3cBQEuCZ4cWACiTlHczhSDK+6QCgf+Elfc3hbgBsMsfgPj5AETAM8pm2CwhpsK3/Age5w9QF5fhNijSNBdnpS8qvLEQPg4MvDMCgFQPwBfJwEDfpoGBLzsg2XsAnMpR3gnlIr+DblWcc66aLwI/yr8BH+JvypGFQfQAAAAJcEhZcwAAFiUAABYlAUlSJPAAAAGbaVRYdFhNTDpjb20uYWRvYmUueG1wAAAAAAA8eDp4bXBtZXRhIHhtbG5zOng9ImFkb2JlOm5zOm1ldGEvIiB4OnhtcHRrPSJYTVAgQ29yZSA1LjQuMCI+CiAgIDxyZGY6UkRGIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyI+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmV4aWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20vZXhpZi8xLjAvIj4KICAgICAgICAgPGV4aWY6UGl4ZWxYRGltZW5zaW9uPjU0PC9leGlmOlBpeGVsWERpbWVuc2lvbj4KICAgICAgICAgPGV4aWY6UGl4ZWxZRGltZW5zaW9uPjUyPC9leGlmOlBpeGVsWURpbWVuc2lvbj4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgIDwvcmRmOlJERj4KPC94OnhtcG1ldGE+CkxC9mIAAAAcaURPVAAAAAIAAAAAAAAAGgAAACgAAAAaAAAAGgAAA9XQWsNlAAADoUlEQVRoBexYTShsYRh+zviXnyEGKdwUG4VSyt8oFjLEgrJTFpSVKVlQbklJQpeFzVAoWbOQFUXZsLKzUH7GRYz8zJ+/uZ73dqa7MPe6bmeG23zT1zlzznfOvM/7PO/zfig2m82D/3AoQWCfjNUgY5+MMAQZCzL2QTIQlOIHIeLNYQScMY/n58YnNDRUgn58fJSjoihvBvHawoACI6jn52cQhMvlgk6nQ0REhFzj+b+ACxgwBk12CC48PBxzc3NIT0+HyWTC9fW1gAoJCXk3uIAAU1kiK2FhYTLHxsawubmJzs5OlJaWCmsPDw+gRN/DnP+AvZSS5+XDQUD39/e4vb3F3d0d3G43FhcXMT4+jvr6evT09CA7OxtRUVEguPcw5zdgZIlTravLy0vs7u5iZWVFZPirAcTExMj1vLw8SQAT8bc15xdgBPT09CTGQEBLS0vY3t7G+vo6rFarF1N0dDQcDod8LygoQG9vL2pqauB2uaHoFAHnXfyHE82BERRNIjIyEoeHhwJmdHQUBoMBtbW1yM3NlRpaXl7GwsKCN9ypqSlUVVUhIyNDkkKmmRxK+C3saQpMlR0Dop2vrq6io6MDjY2NaGpqQmZmJvR6PRITEzFtmUb/134xjubmZllDSe7v73udMzY2FnFxcV5gvzMVTYGRKWaXANfW1jA/Py9G0dbWBqPRiCvbFU6+n6CoqAgWiwXd3d0YHBxEe3u7yHZnZwd9fX3Y2tpCa2srCLikpESYIyi+29fQFBhlo8pncnISGxsbEmB1dTXsdjsuLi7E+fLz8zEyMiLstbS04OXfFeKEbAV0RAJgr6OceY3P8hrPfQ3NgLG2aNUOuwNn52cYGBiQIMlWcXExzs/O4XA6QLklJSXh4OBAQKYYUmA9sUrgrMP4+Hjs7e3JfSaJTZwSZisga77kqBkwdc9HVuiA7FGVlZWoM9Uh60uWV05qj0pOThZjOD09lXtkhC7JwPk8J9cyKWSYCaHEfclRE2D8QbLFrNLOWVtDQ0OY+DaBCmOFBEgj4K6CgVFi6iDTlBoBsXHTdFJTU2Ut38vJ+wTJfaXfgTEgZvXo6EjqZ3Z2FpxlZWUSWII+QWqE/YkB0jzS0tLQ0NCAm5sbCZjJUd9DA+GWKycnR3obE0Npqn8VqIlRj5ox5nQ6wR8/Pj7G8PCw7C5mZmZQXl4ukqPNq0ERGIPm+sLCQi8jDJwNm0dukumYXV1dMJvNspaM8tnXxg8AAAD///Sk9d4AAAOsSURBVO2WOUskURSFT1Xv7qj4A0zUVgNRBEHMNFEZEUwEl0gQI8Ef4J4YKaL+AwcNBTUxcpwGUTFQUAMxccetV+11+tzhDYN06wx0tUm/pru6ql69d7577ruvtMfHxxhS3GKxGAKBABwOB25vb7GysoLR0VFMTU2hubkZxcXFyMrKklnZ12KxwGq1gv+DwSDC4TB0XZdzn88nY6yurso4IyMj6OzslOdDwRDsDntC9ZpRYG9vbwiFQnh+fsb5+Tnm5uZQUFCAnp4eNDY2iuhoNCqiCMKvpmkwm80CSkjCvb6+wvXTheXvy7i5uUF/fz9aWlqQnZ2NSCQCuz3NYBT68vIiDlDA5OQkGPWZmRl0d3eLm7zOfoRQkCaTSQDpIiHdbjcWFxcxPT2NwcFB9PX1ITc3V8AIRacTNUMc40QUHc8GEUkhS0tLGBsbQ2trK3p7e1FfXy8Osh+hCMdG1+gUj/f399jf38f8/DxcLhdmZ2fR1dWFh4cHCUx+fj4YiETNMDCKZbQpmGmzt7eH9fV1LCwsiI61tTU4nU7YbDYRR4HiXCSKSDQCj9uD7R/bGBgYkP5DQ0Nob29HTU0Nnp6eBCwnJ0cCkFYwTsZ1xjXm8XhQWlqK3d1dDA8P4/T0FA0NDWhqakJdXR0qKyvFPbpEN46OjsShjY0NnJ2die6trS2UlZXh6uoKdIpZwKDwmUTNMMc4GdPM6/UKHEVw3dzd3WFzcxMTExOip+NbByqcFcjLy5NzunxycgKC8H95eTnGx8dRVVUlILxWWFgoVTFZGnIgQ8GYWqyMLNl0guK5BbC60ZXDw0McHBxgZ2dHoP7+aWtrQ21tLaqrqwVKjcVtgqnNopHMLcPBOAHXGvcmv9+P6+trWU90gecXFxc4Pj7G5eWluMrUpbNFRUUoKSkRMKYfA8H+vMctg85/5FZawKQgxOFY1v0+P7w+r+xNFMrIE4IuavFPLP5hY1VkCrOq0m2uKRYKumWz2qCbfldN6Zzkx9BUVHMSjl/CccOl6IA/AE3XJKUYfVXyCWXSTVIZmcZcp0xhgYo7prYCNXayY1rA1OTiXrych8IhSU++dtER9RrF+7qmw2wxyxsFHaWbKvX+FYrzpRVMAdIdNrqhNmh1jddZFOgiv4T5HyA+z/YlYL+nxp+3DTr1vqmKp47v7392/qVgFPeR8ETAnwGp+18OpoSk+pgBS3VEjR4v45jREU71+BnHUh1Ro8fLOGZ0hFM9fsaxVEfU6PF+AZyhTkW8YOrsAAAAAElFTkSuQmCC" preserveAspectRatio="none" pointer-events="none"/><image x="375.5" y="1067.5" width="29" height="31" xlink:href="data:image/png;base64,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" preserveAspectRatio="none" opacity="0.7" pointer-events="none"/><image x="3.5" y="0.5" width="159" height="42" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAe4AAACCCAYAAACAVivDAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyhpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTM4IDc5LjE1OTgyNCwgMjAxNi8wOS8xNC0wMTowOTowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTcgKE1hY2ludG9zaCkiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NDc3MUZCMDdFQzgwMTFFNjkyQ0M4QTZGMTk4QjM2MUYiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NDc3MUZCMDhFQzgwMTFFNjkyQ0M4QTZGMTk4QjM2MUYiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo0NzcxRkIwNUVDODAxMUU2OTJDQzhBNkYxOThCMzYxRiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo0NzcxRkIwNkVDODAxMUU2OTJDQzhBNkYxOThCMzYxRiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PqCt2j8AACJxSURBVHja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" preserveAspectRatio="none" pointer-events="none"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-1115-142-26-0)" font-size="12px"><text x="166.5" y="1127.5">Connect to a Fixed Point</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-1115-132-26-0)" font-size="12px"><text x="26.5" y="1127.5">Alt+Connect</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-311-72-26-0)" font-size="12px"><text x="746.5" y="323.5">Ctrl+Click</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-834-311-152-26-0)" font-size="12px"><text x="835.5" y="323.5">Context Menu</text></g><a xlink:href="https://www.draw.io/?url=https%3A%2F%2Fwww.draw.io%2Fshortcuts.svg"><rect x="1111.67" y="1117" width="114" height="18" fill="none" stroke="none"/><g fill="#F08705" font-family="Helvetica" text-decoration="underline" font-size="12px"><text x="1113.17" y="1129.5">Open in draw.io...</text></g></a><rect x="374" y="465" width="150" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-378-470-142-26-0)" font-size="12px"><text x="379.5" y="482.5">Ctrl+Shift+Mouse wheel</text></g><rect x="544" y="465" width="123" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-548-470-115-26-0)" font-size="12px"><text x="549.5" y="482.5">Canvas Zoom In/Out</text></g><rect x="841" y="787.5" width="140" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-845-793-132-26-0)" font-size="12px"><text x="846.5" y="805">Connection Points</text></g><rect x="741" y="787.5" width="90" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-792-82-26-0)" font-size="12px"><text x="746.5" y="805">Alt+Shift+P</text></g><rect x="116" y="113" width="200" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-120-118-192-26-0)" font-size="12px"><text x="121.5" y="130.5">Insert text or add an edge label</text></g><rect x="21" y="113" width="120" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-118-112-26-0)" font-size="12px"><text x="26.5" y="130.5">Double click</text></g><rect x="130.28" y="786" width="10" height="16" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-130-787-10-20-0)" font-size="10px"><text x="131.78" y="797.5">2</text></g><rect x="1112" y="1083" width="255" height="29" rx="4.35" ry="4.35" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" font-size="12px"><text x="1113.5" y="1094">Ctrl+Resize for non-recursive group resize</text><text x="1113.5" y="1108">Ctrl+Meta+Resize for centered group resize</text></g><rect x="1105.33" y="1075" width="20" height="10" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" font-size="10px"><text x="1106.83" y="1086.5">2</text></g><rect x="91" y="146" width="10" height="16" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-91-147-10-20-0)" font-size="10px"><text x="92.5" y="157.5">1</text></g><rect x="1112" y="1044" width="255" height="29" rx="4.35" ry="4.35" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" font-size="12px"><text x="1113.5" y="1055">Ctrl / Shift+Enter: New Line / Apply in Safari</text><text x="1113.5" y="1069">Ctrl / Shift+Esc: Cancel Editing</text></g><rect x="1105.33" y="1036" width="20" height="10" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" font-size="10px"><text x="1106.83" y="1047.5">1</text></g><rect x="21" y="433" width="140" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-438-132-26-0)" font-size="12px"><text x="26.5" y="450.5">Ctrl+X</text></g><rect x="21" y="465" width="140" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-470-132-26-0)" font-size="12px"><text x="26.5" y="482.5">Ctrl+C</text></g><rect x="21" y="497" width="140" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-502-132-26-0)" font-size="12px"><text x="26.5" y="514.5">Ctrl+V</text></g><rect x="21" y="529.5" width="140" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-535-132-26-0)" font-size="12px"><text x="26.5" y="547">Ctrl+G</text></g><rect x="21" y="562" width="140" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-567-132-26-0)" font-size="12px"><text x="26.5" y="579.5">Ctrl+Shift+U</text></g><rect x="21" y="594" width="140" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-599-132-26-0)" font-size="12px"><text x="26.5" y="611.5">Ctrl+L / Alt+Shift+L</text></g><rect x="21" y="626" width="140" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-631-132-26-0)" font-size="12px"><text x="26.5" y="643.5">Ctrl+Enter / D</text></g><rect x="21" y="658.5" width="140" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-664-132-26-0)" font-size="12px"><text x="26.5" y="676">Backspace or Delete</text></g><rect x="21" y="691" width="140" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-696-132-26-0)" font-size="12px"><text x="26.5" y="708.5">Ctrl+Delete</text></g><rect x="21" y="723" width="140" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-728-132-26-0)" font-size="12px"><text x="26.5" y="740.5">Ctrl+R</text></g><rect x="21" y="755" width="140" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-760-132-26-0)" font-size="12px"><text x="26.5" y="772.5">Shift+Resize</text></g><rect x="21" y="787.5" width="140" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-793-132-26-0)" font-size="12px"><text x="26.5" y="805">Ctrl / Meta+Resize</text></g><rect x="21" y="820" width="140" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-825-132-26-0)" font-size="12px"><text x="26.5" y="837.5">Ctrl+Home</text></g><rect x="21" y="852" width="140" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-857-132-26-0)" font-size="12px"><text x="26.5" y="869.5">Ctrl+End</text></g><rect x="21" y="884" width="140" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-889-132-26-0)" font-size="12px"><text x="26.5" y="901.5">Ctrl+Shift+Home</text></g><rect x="21" y="916.5" width="140" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-922-132-26-0)" font-size="12px"><text x="26.5" y="934">Ctrl+Shift+End</text></g><rect x="21" y="949" width="140" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-954-132-26-0)" font-size="12px"><text x="26.5" y="966.5">Ctrl+Shift+B</text></g><rect x="21" y="981" width="140" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-986-132-26-0)" font-size="12px"><text x="26.5" y="998.5">Ctrl+Shift+F</text></g><rect x="21" y="1013.5" width="140" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-1019-132-26-0)" font-size="12px"><text x="26.5" y="1031">Alt+Shift+C/T</text></g><rect x="21" y="1046" width="140" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-1051-132-26-0)" font-size="12px"><text x="26.5" y="1063.5">Ctrl+Shift+Y</text></g><rect x="21" y="1078" width="140" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-1083-132-26-0)" font-size="12px"><text x="26.5" y="1095.5">Ctrl / Shift+Drag</text></g><rect x="161" y="433" width="150" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-438-142-26-0)" font-size="12px"><text x="166.5" y="450.5">Cut</text></g><rect x="161" y="465" width="150" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-470-142-26-0)" font-size="12px"><text x="166.5" y="482.5">Copy</text></g><rect x="161" y="497" width="150" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-502-142-26-0)" font-size="12px"><text x="166.5" y="514.5">Paste</text></g><rect x="161" y="529.5" width="150" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-535-142-26-0)" font-size="12px"><text x="166.5" y="547">Group</text></g><rect x="161" y="562" width="150" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-567-142-26-0)" font-size="12px"><text x="166.5" y="579.5">Ungroup</text></g><rect x="161" y="594" width="150" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-599-142-26-0)" font-size="12px"><text x="166.5" y="611.5">Lock/Unlock / Edit Link</text></g><rect x="161" y="626" width="150" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-631-142-26-0)" font-size="12px"><text x="166.5" y="643.5">Duplicate</text></g><rect x="161" y="658.5" width="150" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-664-142-26-0)" font-size="12px"><text x="166.5" y="676">Delete Selected Cells</text></g><rect x="161" y="691" width="150" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-696-142-26-0)" font-size="12px"><text x="166.5" y="708.5">Delete with Connections</text></g><rect x="161" y="723" width="159" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-728-151-26-0)" font-size="12px"><text x="166.5" y="740.5">Turn / Rotate 90° Clockwise</text></g><rect x="161" y="755" width="150" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-760-142-26-0)" font-size="12px"><text x="166.5" y="772.5">Maintain Proportions</text></g><rect x="161" y="949" width="150" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-954-142-26-0)" font-size="12px"><text x="166.5" y="966.5">Send to Back</text></g><rect x="161" y="820" width="150" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-825-142-26-0)" font-size="12px"><text x="166.5" y="837.5">Collapse Container</text></g><rect x="161" y="852" width="150" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-857-142-26-0)" font-size="12px"><text x="166.5" y="869.5">Expand Container</text></g><rect x="161" y="884" width="150" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-889-142-26-0)" font-size="12px"><text x="166.5" y="901.5">Exit Group</text></g><rect x="161" y="916.5" width="150" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-922-142-26-0)" font-size="12px"><text x="166.5" y="934">Enter Group</text></g><rect x="161" y="981" width="150" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-986-142-26-0)" font-size="12px"><text x="166.5" y="998.5">Bring to Front</text></g><rect x="161" y="787.5" width="150" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-793-142-26-0)" font-size="12px"><text x="166.5" y="805">Centered / Group Resize</text></g><rect x="161" y="1014" width="176" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-1019-168-26-0)" font-size="12px"><text x="166.5" y="1031.5">Clear Waypoints / Edit Tooltip</text></g><rect x="161" y="1046" width="150" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-1051-142-26-0)" font-size="12px"><text x="166.5" y="1063.5">Autosize</text></g><rect x="161" y="1078" width="156" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-1083-148-26-0)" font-size="12px"><text x="166.5" y="1095.5">Clone cell/Disconnect edge</text></g><rect x="481" y="11" width="396" height="26" fill="none" stroke="none"/><g fill="#777777" font-family="Helvetica" clip-path="url(#mx-clip-485-16-388-26-0)" font-size="18px"><text x="486.5" y="34.5">cmd instead of ctrl, option instead of alt for Mac </text></g><rect x="1087" y="818" width="340" height="30" fill="#ffffff" stroke="none"/><rect x="1087" y="850" width="340" height="31" fill="#ffffff" stroke="none"/><rect x="1101" y="820" width="100" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-1105-825-92-26-0)" font-size="12px"><text x="1106.5" y="837.5">Alt+Shift+X</text></g><rect x="1101" y="852.5" width="100" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-1105-858-92-26-0)" font-size="12px"><text x="1106.5" y="870">Alt+Shift+V</text></g><rect x="1211" y="820" width="120" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1215-825-112-26-0)" font-size="12px"><text x="1216.5" y="837.5">Copy Size</text></g><rect x="1211" y="852.5" width="120" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1215-858-112-26-0)" font-size="12px"><text x="1216.5" y="870">Paste Size</text></g></g></svg> \ No newline at end of file +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="1428px" height="1140px" viewBox="-0.5 -0.5 1428 1140" content="<mxfile modified="2019-08-19T07:08:07.995Z" host="test.draw.io" agent="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.100 Safari/537.36" etag="b0NOZQecq4uQNKvgTWjt" version="@DRAWIO-VERSION@" type="device"><diagram name="Page-1" id="150dc974-5404-6732-309c-fd6db42db779">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</diagram></mxfile>" style="background-color: rgb(238, 238, 238);"><defs><clipPath id="mx-clip-25-150-112-26-0"><rect x="25" y="150" width="112" height="26"/></clipPath><clipPath id="mx-clip-25-182-112-26-0"><rect x="25" y="182" width="112" height="26"/></clipPath><clipPath id="mx-clip-25-214-112-26-0"><rect x="25" y="214" width="112" height="26"/></clipPath><clipPath id="mx-clip-25-247-132-26-0"><rect x="25" y="247" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-279-112-26-0"><rect x="25" y="279" width="112" height="26"/></clipPath><clipPath id="mx-clip-25-311-112-26-0"><rect x="25" y="311" width="112" height="26"/></clipPath><clipPath id="mx-clip-25-343-112-26-0"><rect x="25" y="343" width="112" height="26"/></clipPath><clipPath id="mx-clip-102-241-10-20-0"><rect x="102" y="241" width="10" height="20"/></clipPath><clipPath id="mx-clip-120-150-192-26-0"><rect x="120" y="150" width="192" height="26"/></clipPath><clipPath id="mx-clip-120-182-202-26-0"><rect x="120" y="182" width="202" height="26"/></clipPath><clipPath id="mx-clip-120-214-192-26-0"><rect x="120" y="214" width="192" height="26"/></clipPath><clipPath id="mx-clip-120-247-192-26-0"><rect x="120" y="247" width="192" height="26"/></clipPath><clipPath id="mx-clip-120-279-192-26-0"><rect x="120" y="279" width="192" height="26"/></clipPath><clipPath id="mx-clip-120-311-192-26-0"><rect x="120" y="311" width="192" height="26"/></clipPath><clipPath id="mx-clip-120-343-211-26-0"><rect x="120" y="343" width="211" height="26"/></clipPath><clipPath id="mx-clip-385-118-82-26-0"><rect x="385" y="118" width="82" height="26"/></clipPath><clipPath id="mx-clip-385-150-92-26-0"><rect x="385" y="150" width="92" height="26"/></clipPath><clipPath id="mx-clip-385-182-82-26-0"><rect x="385" y="182" width="82" height="26"/></clipPath><clipPath id="mx-clip-385-214-92-26-0"><rect x="385" y="214" width="92" height="26"/></clipPath><clipPath id="mx-clip-385-247-82-26-0"><rect x="385" y="247" width="82" height="26"/></clipPath><clipPath id="mx-clip-385-279-92-26-0"><rect x="385" y="279" width="92" height="26"/></clipPath><clipPath id="mx-clip-385-311-99-26-0"><rect x="385" y="311" width="99" height="26"/></clipPath><clipPath id="mx-clip-385-343-102-26-0"><rect x="385" y="343" width="102" height="26"/></clipPath><clipPath id="mx-clip-506-118-147-26-0"><rect x="506" y="118" width="147" height="26"/></clipPath><clipPath id="mx-clip-506-150-147-26-0"><rect x="506" y="150" width="147" height="26"/></clipPath><clipPath id="mx-clip-506-182-147-26-0"><rect x="506" y="182" width="147" height="26"/></clipPath><clipPath id="mx-clip-506-214-147-26-0"><rect x="506" y="214" width="147" height="26"/></clipPath><clipPath id="mx-clip-506-247-102-26-0"><rect x="506" y="247" width="102" height="26"/></clipPath><clipPath id="mx-clip-506-279-138-26-0"><rect x="506" y="279" width="138" height="26"/></clipPath><clipPath id="mx-clip-506-311-137-26-0"><rect x="506" y="311" width="137" height="26"/></clipPath><clipPath id="mx-clip-506-343-128-26-0"><rect x="506" y="343" width="128" height="26"/></clipPath><clipPath id="mx-clip-378-438-158-26-0"><rect x="378" y="438" width="158" height="26"/></clipPath><clipPath id="mx-clip-378-502-122-26-0"><rect x="378" y="502" width="122" height="26"/></clipPath><clipPath id="mx-clip-378-534-122-26-0"><rect x="378" y="534" width="122" height="26"/></clipPath><clipPath id="mx-clip-378-567-122-26-0"><rect x="378" y="567" width="122" height="26"/></clipPath><clipPath id="mx-clip-378-599-152-26-0"><rect x="378" y="599" width="152" height="26"/></clipPath><clipPath id="mx-clip-378-631-122-26-0"><rect x="378" y="631" width="122" height="26"/></clipPath><clipPath id="mx-clip-378-664-122-26-0"><rect x="378" y="664" width="122" height="26"/></clipPath><clipPath id="mx-clip-378-696-122-26-0"><rect x="378" y="696" width="122" height="26"/></clipPath><clipPath id="mx-clip-378-728-122-26-0"><rect x="378" y="728" width="122" height="26"/></clipPath><clipPath id="mx-clip-378-760-122-26-0"><rect x="378" y="760" width="122" height="26"/></clipPath><clipPath id="mx-clip-378-793-122-26-0"><rect x="378" y="793" width="122" height="26"/></clipPath><clipPath id="mx-clip-378-825-122-26-0"><rect x="378" y="825" width="122" height="26"/></clipPath><clipPath id="mx-clip-378-857-122-26-0"><rect x="378" y="857" width="122" height="26"/></clipPath><clipPath id="mx-clip-378-921-122-26-0"><rect x="378" y="921" width="122" height="26"/></clipPath><clipPath id="mx-clip-378-954-122-26-0"><rect x="378" y="954" width="122" height="26"/></clipPath><clipPath id="mx-clip-378-889-122-26-0"><rect x="378" y="889" width="122" height="26"/></clipPath><clipPath id="mx-clip-548-438-117-26-0"><rect x="548" y="438" width="117" height="26"/></clipPath><clipPath id="mx-clip-548-502-144-26-0"><rect x="548" y="502" width="144" height="26"/></clipPath><clipPath id="mx-clip-548-535-142-26-0"><rect x="548" y="535" width="142" height="26"/></clipPath><clipPath id="mx-clip-548-567-142-26-0"><rect x="548" y="567" width="142" height="26"/></clipPath><clipPath id="mx-clip-548-599-122-26-0"><rect x="548" y="599" width="122" height="26"/></clipPath><clipPath id="mx-clip-548-631-142-26-0"><rect x="548" y="631" width="142" height="26"/></clipPath><clipPath id="mx-clip-548-664-142-26-0"><rect x="548" y="664" width="142" height="26"/></clipPath><clipPath id="mx-clip-548-696-142-26-0"><rect x="548" y="696" width="142" height="26"/></clipPath><clipPath id="mx-clip-548-728-142-26-0"><rect x="548" y="728" width="142" height="26"/></clipPath><clipPath id="mx-clip-548-760-142-26-0"><rect x="548" y="760" width="142" height="26"/></clipPath><clipPath id="mx-clip-548-793-142-26-0"><rect x="548" y="793" width="142" height="26"/></clipPath><clipPath id="mx-clip-548-825-142-26-0"><rect x="548" y="825" width="142" height="26"/></clipPath><clipPath id="mx-clip-548-857-142-26-0"><rect x="548" y="857" width="142" height="26"/></clipPath><clipPath id="mx-clip-548-889-142-26-0"><rect x="548" y="889" width="142" height="26"/></clipPath><clipPath id="mx-clip-548-921-142-26-0"><rect x="548" y="921" width="142" height="26"/></clipPath><clipPath id="mx-clip-548-954-142-26-0"><rect x="548" y="954" width="142" height="26"/></clipPath><clipPath id="mx-clip-405-1073-239-20-0"><rect x="405" y="1073" width="239" height="20"/></clipPath><clipPath id="mx-clip-405-1111-258-20-0"><rect x="405" y="1111" width="258" height="20"/></clipPath><clipPath id="mx-clip-745-118-92-26-0"><rect x="745" y="118" width="92" height="26"/></clipPath><clipPath id="mx-clip-745-150-92-26-0"><rect x="745" y="150" width="92" height="26"/></clipPath><clipPath id="mx-clip-745-182-72-26-0"><rect x="745" y="182" width="72" height="26"/></clipPath><clipPath id="mx-clip-745-214-92-26-0"><rect x="745" y="214" width="92" height="26"/></clipPath><clipPath id="mx-clip-745-247-92-26-0"><rect x="745" y="247" width="92" height="26"/></clipPath><clipPath id="mx-clip-745-279-72-26-0"><rect x="745" y="279" width="72" height="26"/></clipPath><clipPath id="mx-clip-745-343-72-26-0"><rect x="745" y="343" width="72" height="26"/></clipPath><clipPath id="mx-clip-834-118-162-26-0"><rect x="834" y="118" width="162" height="26"/></clipPath><clipPath id="mx-clip-834-150-162-26-0"><rect x="834" y="150" width="162" height="26"/></clipPath><clipPath id="mx-clip-834-182-162-26-0"><rect x="834" y="182" width="162" height="26"/></clipPath><clipPath id="mx-clip-834-214-162-26-0"><rect x="834" y="214" width="162" height="26"/></clipPath><clipPath id="mx-clip-834-247-162-26-0"><rect x="834" y="247" width="162" height="26"/></clipPath><clipPath id="mx-clip-834-279-152-26-0"><rect x="834" y="279" width="152" height="26"/></clipPath><clipPath id="mx-clip-834-343-85-26-0"><rect x="834" y="343" width="85" height="26"/></clipPath><clipPath id="mx-clip-745-438-222-26-0"><rect x="745" y="438" width="222" height="26"/></clipPath><clipPath id="mx-clip-745-470-232-26-0"><rect x="745" y="470" width="232" height="26"/></clipPath><clipPath id="mx-clip-745-502-222-26-0"><rect x="745" y="502" width="222" height="26"/></clipPath><clipPath id="mx-clip-745-535-222-26-0"><rect x="745" y="535" width="222" height="26"/></clipPath><clipPath id="mx-clip-745-567-222-26-0"><rect x="745" y="567" width="222" height="26"/></clipPath><clipPath id="mx-clip-1005-438-408-26-0"><rect x="1005" y="438" width="408" height="26"/></clipPath><clipPath id="mx-clip-1005-470-408-26-0"><rect x="1005" y="470" width="408" height="26"/></clipPath><clipPath id="mx-clip-1005-502-262-26-0"><rect x="1005" y="502" width="262" height="26"/></clipPath><clipPath id="mx-clip-1005-534-262-26-0"><rect x="1005" y="534" width="262" height="26"/></clipPath><clipPath id="mx-clip-1005-567-262-26-0"><rect x="1005" y="567" width="262" height="26"/></clipPath><clipPath id="mx-clip-745-664-82-26-0"><rect x="745" y="664" width="82" height="26"/></clipPath><clipPath id="mx-clip-745-696-82-26-0"><rect x="745" y="696" width="82" height="26"/></clipPath><clipPath id="mx-clip-745-728-82-26-0"><rect x="745" y="728" width="82" height="26"/></clipPath><clipPath id="mx-clip-745-760-82-26-0"><rect x="745" y="760" width="82" height="26"/></clipPath><clipPath id="mx-clip-745-825-82-27-0"><rect x="745" y="825" width="82" height="27"/></clipPath><clipPath id="mx-clip-745-857-82-26-0"><rect x="745" y="857" width="82" height="26"/></clipPath><clipPath id="mx-clip-745-889-82-26-0"><rect x="745" y="889" width="82" height="26"/></clipPath><clipPath id="mx-clip-745-922-82-26-0"><rect x="745" y="922" width="82" height="26"/></clipPath><clipPath id="mx-clip-745-954-82-26-0"><rect x="745" y="954" width="82" height="26"/></clipPath><clipPath id="mx-clip-745-986-82-26-0"><rect x="745" y="986" width="82" height="26"/></clipPath><clipPath id="mx-clip-745-1018-82-26-0"><rect x="745" y="1018" width="82" height="26"/></clipPath><clipPath id="mx-clip-745-1051-82-26-0"><rect x="745" y="1051" width="82" height="26"/></clipPath><clipPath id="mx-clip-745-1083-82-26-0"><rect x="745" y="1083" width="82" height="26"/></clipPath><clipPath id="mx-clip-745-1115-98-26-0"><rect x="745" y="1115" width="98" height="26"/></clipPath><clipPath id="mx-clip-845-696-132-26-0"><rect x="845" y="696" width="132" height="26"/></clipPath><clipPath id="mx-clip-845-664-132-26-0"><rect x="845" y="664" width="132" height="26"/></clipPath><clipPath id="mx-clip-845-728-132-26-0"><rect x="845" y="728" width="132" height="26"/></clipPath><clipPath id="mx-clip-845-760-132-26-0"><rect x="845" y="760" width="132" height="26"/></clipPath><clipPath id="mx-clip-845-824-195-28-0"><rect x="845" y="824" width="195" height="28"/></clipPath><clipPath id="mx-clip-845-857-132-26-0"><rect x="845" y="857" width="132" height="26"/></clipPath><clipPath id="mx-clip-845-889-132-26-0"><rect x="845" y="889" width="132" height="26"/></clipPath><clipPath id="mx-clip-845-922-132-26-0"><rect x="845" y="922" width="132" height="26"/></clipPath><clipPath id="mx-clip-845-954-132-26-0"><rect x="845" y="954" width="132" height="26"/></clipPath><clipPath id="mx-clip-845-986-132-26-0"><rect x="845" y="986" width="132" height="26"/></clipPath><clipPath id="mx-clip-845-1019-132-26-0"><rect x="845" y="1019" width="132" height="26"/></clipPath><clipPath id="mx-clip-845-1051-132-26-0"><rect x="845" y="1051" width="132" height="26"/></clipPath><clipPath id="mx-clip-845-1083-132-26-0"><rect x="845" y="1083" width="132" height="26"/></clipPath><clipPath id="mx-clip-845-1115-208-26-0"><rect x="845" y="1115" width="208" height="26"/></clipPath><clipPath id="mx-clip-1105-899-102-26-0"><rect x="1105" y="899" width="102" height="26"/></clipPath><clipPath id="mx-clip-1105-932-102-26-0"><rect x="1105" y="932" width="102" height="26"/></clipPath><clipPath id="mx-clip-1105-964-102-26-0"><rect x="1105" y="964" width="102" height="26"/></clipPath><clipPath id="mx-clip-1105-996-102-26-0"><rect x="1105" y="996" width="102" height="26"/></clipPath><clipPath id="mx-clip-1215-899-132-26-0"><rect x="1215" y="899" width="132" height="26"/></clipPath><clipPath id="mx-clip-1215-932-188-26-0"><rect x="1215" y="932" width="188" height="26"/></clipPath><clipPath id="mx-clip-1215-964-112-26-0"><rect x="1215" y="964" width="112" height="26"/></clipPath><clipPath id="mx-clip-1215-996-112-26-0"><rect x="1215" y="996" width="112" height="26"/></clipPath><clipPath id="mx-clip-1105-118-112-26-0"><rect x="1105" y="118" width="112" height="26"/></clipPath><clipPath id="mx-clip-1105-150-112-26-0"><rect x="1105" y="150" width="112" height="26"/></clipPath><clipPath id="mx-clip-1105-182-112-26-0"><rect x="1105" y="182" width="112" height="26"/></clipPath><clipPath id="mx-clip-1105-214-112-26-0"><rect x="1105" y="214" width="112" height="26"/></clipPath><clipPath id="mx-clip-1105-247-112-26-0"><rect x="1105" y="247" width="112" height="26"/></clipPath><clipPath id="mx-clip-1105-279-112-26-0"><rect x="1105" y="279" width="112" height="26"/></clipPath><clipPath id="mx-clip-1105-311-112-26-0"><rect x="1105" y="311" width="112" height="26"/></clipPath><clipPath id="mx-clip-1105-343-132-26-0"><rect x="1105" y="343" width="132" height="26"/></clipPath><clipPath id="mx-clip-1245-118-141-26-0"><rect x="1245" y="118" width="141" height="26"/></clipPath><clipPath id="mx-clip-1245-150-141-26-0"><rect x="1245" y="150" width="141" height="26"/></clipPath><clipPath id="mx-clip-1245-182-141-26-0"><rect x="1245" y="182" width="141" height="26"/></clipPath><clipPath id="mx-clip-1245-214-141-26-0"><rect x="1245" y="214" width="141" height="26"/></clipPath><clipPath id="mx-clip-1245-247-141-26-0"><rect x="1245" y="247" width="141" height="26"/></clipPath><clipPath id="mx-clip-1245-279-141-26-0"><rect x="1245" y="279" width="141" height="26"/></clipPath><clipPath id="mx-clip-1245-311-122-26-0"><rect x="1245" y="311" width="122" height="26"/></clipPath><clipPath id="mx-clip-1245-343-132-26-0"><rect x="1245" y="343" width="132" height="26"/></clipPath><clipPath id="mx-clip-1105-663-92-26-0"><rect x="1105" y="663" width="92" height="26"/></clipPath><clipPath id="mx-clip-1105-696-92-26-0"><rect x="1105" y="696" width="92" height="26"/></clipPath><clipPath id="mx-clip-1105-728-92-26-0"><rect x="1105" y="728" width="92" height="26"/></clipPath><clipPath id="mx-clip-1105-760-92-26-0"><rect x="1105" y="760" width="92" height="26"/></clipPath><clipPath id="mx-clip-1105-793-92-26-0"><rect x="1105" y="793" width="92" height="26"/></clipPath><clipPath id="mx-clip-1215-663-112-26-0"><rect x="1215" y="663" width="112" height="26"/></clipPath><clipPath id="mx-clip-1215-696-112-26-0"><rect x="1215" y="696" width="112" height="26"/></clipPath><clipPath id="mx-clip-1215-728-112-26-0"><rect x="1215" y="728" width="112" height="26"/></clipPath><clipPath id="mx-clip-1215-760-112-26-0"><rect x="1215" y="760" width="112" height="26"/></clipPath><clipPath id="mx-clip-1215-793-112-26-0"><rect x="1215" y="793" width="112" height="26"/></clipPath><clipPath id="mx-clip-1084-82-165-26-0"><rect x="1084" y="82" width="165" height="26"/></clipPath><clipPath id="mx-clip-725-82-165-26-0"><rect x="725" y="82" width="165" height="26"/></clipPath><clipPath id="mx-clip-369-82-165-26-0"><rect x="369" y="82" width="165" height="26"/></clipPath><clipPath id="mx-clip-5-82-165-26-0"><rect x="5" y="82" width="165" height="26"/></clipPath><clipPath id="mx-clip-4-403-165-26-0"><rect x="4" y="403" width="165" height="26"/></clipPath><clipPath id="mx-clip-365-403-165-26-0"><rect x="365" y="403" width="165" height="26"/></clipPath><clipPath id="mx-clip-725-403-165-26-0"><rect x="725" y="403" width="165" height="26"/></clipPath><clipPath id="mx-clip-1085-627-165-26-0"><rect x="1085" y="627" width="165" height="26"/></clipPath><clipPath id="mx-clip-725-627-165-26-0"><rect x="725" y="627" width="165" height="26"/></clipPath><clipPath id="mx-clip-178-5-273-59-0"><rect x="178" y="5" width="273" height="59"/></clipPath><clipPath id="mx-clip-165-1115-142-26-0"><rect x="165" y="1115" width="142" height="26"/></clipPath><clipPath id="mx-clip-25-1115-132-26-0"><rect x="25" y="1115" width="132" height="26"/></clipPath><clipPath id="mx-clip-745-311-72-26-0"><rect x="745" y="311" width="72" height="26"/></clipPath><clipPath id="mx-clip-834-311-152-26-0"><rect x="834" y="311" width="152" height="26"/></clipPath><clipPath id="mx-clip-378-470-142-26-0"><rect x="378" y="470" width="142" height="26"/></clipPath><clipPath id="mx-clip-548-470-115-26-0"><rect x="548" y="470" width="115" height="26"/></clipPath><clipPath id="mx-clip-845-793-132-26-0"><rect x="845" y="793" width="132" height="26"/></clipPath><clipPath id="mx-clip-745-792-82-26-0"><rect x="745" y="792" width="82" height="26"/></clipPath><clipPath id="mx-clip-120-118-192-26-0"><rect x="120" y="118" width="192" height="26"/></clipPath><clipPath id="mx-clip-25-118-112-26-0"><rect x="25" y="118" width="112" height="26"/></clipPath><clipPath id="mx-clip-130-787-10-20-0"><rect x="130" y="787" width="10" height="20"/></clipPath><clipPath id="mx-clip-91-147-10-20-0"><rect x="91" y="147" width="10" height="20"/></clipPath><clipPath id="mx-clip-25-438-132-26-0"><rect x="25" y="438" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-470-132-26-0"><rect x="25" y="470" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-502-132-26-0"><rect x="25" y="502" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-535-132-26-0"><rect x="25" y="535" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-567-132-26-0"><rect x="25" y="567" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-599-132-26-0"><rect x="25" y="599" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-631-132-26-0"><rect x="25" y="631" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-664-132-26-0"><rect x="25" y="664" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-696-132-26-0"><rect x="25" y="696" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-728-132-26-0"><rect x="25" y="728" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-760-132-26-0"><rect x="25" y="760" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-793-132-26-0"><rect x="25" y="793" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-825-132-26-0"><rect x="25" y="825" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-857-132-26-0"><rect x="25" y="857" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-889-132-26-0"><rect x="25" y="889" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-922-132-26-0"><rect x="25" y="922" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-954-132-26-0"><rect x="25" y="954" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-986-132-26-0"><rect x="25" y="986" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-1019-132-26-0"><rect x="25" y="1019" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-1051-132-26-0"><rect x="25" y="1051" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-1083-132-26-0"><rect x="25" y="1083" width="132" height="26"/></clipPath><clipPath id="mx-clip-165-438-142-26-0"><rect x="165" y="438" width="142" height="26"/></clipPath><clipPath id="mx-clip-165-470-142-26-0"><rect x="165" y="470" width="142" height="26"/></clipPath><clipPath id="mx-clip-165-502-142-26-0"><rect x="165" y="502" width="142" height="26"/></clipPath><clipPath id="mx-clip-165-535-142-26-0"><rect x="165" y="535" width="142" height="26"/></clipPath><clipPath id="mx-clip-165-567-142-26-0"><rect x="165" y="567" width="142" height="26"/></clipPath><clipPath id="mx-clip-165-599-142-26-0"><rect x="165" y="599" width="142" height="26"/></clipPath><clipPath id="mx-clip-165-631-142-26-0"><rect x="165" y="631" width="142" height="26"/></clipPath><clipPath id="mx-clip-165-664-142-26-0"><rect x="165" y="664" width="142" height="26"/></clipPath><clipPath id="mx-clip-165-696-142-26-0"><rect x="165" y="696" width="142" height="26"/></clipPath><clipPath id="mx-clip-165-728-151-26-0"><rect x="165" y="728" width="151" height="26"/></clipPath><clipPath id="mx-clip-165-760-142-26-0"><rect x="165" y="760" width="142" height="26"/></clipPath><clipPath id="mx-clip-165-954-142-26-0"><rect x="165" y="954" width="142" height="26"/></clipPath><clipPath id="mx-clip-165-825-142-26-0"><rect x="165" y="825" width="142" height="26"/></clipPath><clipPath id="mx-clip-165-857-142-26-0"><rect x="165" y="857" width="142" height="26"/></clipPath><clipPath id="mx-clip-165-889-142-26-0"><rect x="165" y="889" width="142" height="26"/></clipPath><clipPath id="mx-clip-165-922-142-26-0"><rect x="165" y="922" width="142" height="26"/></clipPath><clipPath id="mx-clip-165-986-142-26-0"><rect x="165" y="986" width="142" height="26"/></clipPath><clipPath id="mx-clip-165-793-142-26-0"><rect x="165" y="793" width="142" height="26"/></clipPath><clipPath id="mx-clip-165-1019-168-26-0"><rect x="165" y="1019" width="168" height="26"/></clipPath><clipPath id="mx-clip-165-1051-142-26-0"><rect x="165" y="1051" width="142" height="26"/></clipPath><clipPath id="mx-clip-165-1083-148-26-0"><rect x="165" y="1083" width="148" height="26"/></clipPath><clipPath id="mx-clip-485-16-388-26-0"><rect x="485" y="16" width="388" height="26"/></clipPath><clipPath id="mx-clip-1105-825-92-26-0"><rect x="1105" y="825" width="92" height="26"/></clipPath><clipPath id="mx-clip-1105-858-92-26-0"><rect x="1105" y="858" width="92" height="26"/></clipPath><clipPath id="mx-clip-1215-825-112-26-0"><rect x="1215" y="825" width="112" height="26"/></clipPath><clipPath id="mx-clip-1215-858-112-26-0"><rect x="1215" y="858" width="112" height="26"/></clipPath></defs><g><rect x="7" y="431" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="7" y="463" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="7" y="527" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="7" y="495" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="7" y="560" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="7" y="592" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="7" y="656" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="7" y="624" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="7" y="689" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="7" y="721" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="7" y="753" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="7" y="785" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="7" y="818" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="7" y="850" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="7" y="882" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="7" y="914" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="7" y="1108" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="7" y="1076" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="7" y="1044" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="7" y="1011" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="7" y="979" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="7" y="947" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="367" y="431" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="367" y="527" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="367" y="560" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="367" y="592" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="367" y="656" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="367" y="624" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="367" y="495" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="367" y="463" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="367" y="689" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="367" y="721" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="367" y="753" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="367" y="785" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="367" y="818" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="367" y="850" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="367" y="882" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="367" y="914" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="367" y="947" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="367" y="111" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="367" y="143" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="367" y="175" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="367" y="207" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="367" y="239" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="367" y="304" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="367" y="272" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="367" y="336" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="7" y="111" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="7" y="143" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="7" y="175" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="7" y="207" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="7" y="239" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="7" y="272" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="7" y="304" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="7" y="336" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="727" y="111" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="727" y="143" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="727" y="175" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="727" y="207" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="727" y="239" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="727" y="272" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="727" y="304" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="727" y="336" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="1087" y="336" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="1087" y="304" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="1087" y="272" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="1087" y="239" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="1087" y="207" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="1087" y="175" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="1087" y="143" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="1087" y="111" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="727" y="431" width="700" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="727" y="463" width="700" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="727" y="495" width="700" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="727" y="527" width="700" height="31" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="727" y="560" width="700" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="727" y="656" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="727" y="689" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="727" y="753" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="727" y="721" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="727" y="785" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="727" y="818" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="727" y="850" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="727" y="882" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="727" y="914" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="727" y="947" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="727" y="1011" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="727" y="979" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="727" y="1044" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="727" y="1076" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="727" y="1108" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="1087" y="656" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="1087" y="689" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="1087" y="721" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="1087" y="753" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="1087" y="785" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="1087" y="892" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="1087" y="924" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="1087" y="957" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><rect x="1087" y="989" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="none"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-150-112-26-0)" font-size="12px"><text x="26.5" y="162.5">Shift+Enter</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-182-112-26-0)" font-size="12px"><text x="26.5" y="194.5">Enter</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-214-112-26-0)" font-size="12px"><text x="26.5" y="226.5">F2 / Enter</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-247-132-26-0)" font-size="12px"><text x="26.5" y="259">F2 / Tab / Esc</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-279-112-26-0)" font-size="12px"><text x="26.5" y="291.5">Ctrl+B / I</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-311-112-26-0)" font-size="12px"><text x="26.5" y="323.5">Ctrl+U</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-343-112-26-0)" font-size="12px"><text x="26.5" y="355.5">Ctrl+. / ,</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-102-241-10-20-0)" font-size="10px"><text x="103.5" y="251.5">1</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-120-150-192-26-0)" font-size="12px"><text x="121.5" y="162.5">New Line in Formatted Labels</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-120-182-202-26-0)" font-size="12px"><text x="121.5" y="194.5">New Paragraph in Formatted Labels</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-120-214-192-26-0)" font-size="12px"><text x="121.5" y="226.5">Start Editing Label of Selected Cell</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-120-247-192-26-0)" font-size="12px"><text x="121.5" y="259">Stop Editing and Apply Value</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-120-279-192-26-0)" font-size="12px"><text x="121.5" y="291.5">Toggle Bold/Italic on Selected Text</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-120-311-192-26-0)" font-size="12px"><text x="121.5" y="323.5">Toggle Underline on Selected Text</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-120-343-211-26-0)" font-size="12px"><text x="121.5" y="355.5">Superscript/Subscript on Selected Text</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-385-118-82-26-0)" font-size="12px"><text x="386.5" y="130.5">(Shift+)Tab</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-385-150-92-26-0)" font-size="12px"><text x="386.5" y="162.5">Alt+(Shift+)Tab</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-385-182-82-26-0)" font-size="12px"><text x="386.5" y="194.5">Shift+Drag</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-385-214-92-26-0)" font-size="12px"><text x="386.5" y="226.5">Alt+Shift+Drag</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-385-247-82-26-0)" font-size="12px"><text x="386.5" y="259">Ctrl+(Shift+)A</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-385-279-92-26-0)" font-size="12px"><text x="386.5" y="291.5">Ctrl+Shift+I / E</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-385-311-99-26-0)" font-size="12px"><text x="386.5" y="323.5">Ctrl / Shift+Click</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-385-343-102-26-0)" font-size="12px"><text x="386.5" y="355.5">Alt+Click</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-506-118-147-26-0)" font-size="12px"><text x="507.5" y="130.5">Select Next / Previous</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-506-150-147-26-0)" font-size="12px"><text x="507.5" y="162.5">Select Child / Parent</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-506-182-147-26-0)" font-size="12px"><text x="507.5" y="194.5">Add to Selection</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-506-214-147-26-0)" font-size="12px"><text x="507.5" y="226.5">Remove from Selection</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-506-247-102-26-0)" font-size="12px"><text x="507.5" y="259">Select All / None</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-506-279-138-26-0)" font-size="12px"><text x="507.5" y="291.5">Select Vertices / Edges</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-506-311-137-26-0)" font-size="12px"><text x="507.5" y="323.5">Toggle Selection State</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-506-343-128-26-0)" font-size="12px"><text x="507.5" y="355.5">Select Cell Below</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-378-438-158-26-0)" font-size="12px"><text x="379.5" y="450.5">Alt+Mouse wheel</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-378-502-122-26-0)" font-size="12px"><text x="379.5" y="514.5">Ctrl+Mouse wheel</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-378-534-122-26-0)" font-size="12px"><text x="379.5" y="547">Mouse wheel</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-378-567-122-26-0)" font-size="12px"><text x="379.5" y="579.5">Shift+Mouse wheel</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-378-599-152-26-0)" font-size="12px"><text x="379.5" y="611.5">Space / Right mouse Drag</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-378-631-122-26-0)" font-size="12px"><text x="379.5" y="643.5">Ctrl+Shift+Drag</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-378-664-122-26-0)" font-size="12px"><text x="379.5" y="676">Ctrl+Shift+Connect</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-378-696-122-26-0)" font-size="12px"><text x="379.5" y="708.5">Home</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-378-728-122-26-0)" font-size="12px"><text x="379.5" y="740.5">End</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-378-760-122-26-0)" font-size="12px"><text x="379.5" y="772.5">Ctrl+H</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-378-793-122-26-0)" font-size="12px"><text x="379.5" y="805">Ctrl+Shift+H</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-378-825-122-26-0)" font-size="12px"><text x="379.5" y="837.5">Ctrl+J</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-378-857-122-26-0)" font-size="12px"><text x="379.5" y="869.5">Ctrl+Shift+J</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-378-921-122-26-0)" font-size="12px"><text x="379.5" y="934">Ctrl + (Numpad)</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-378-954-122-26-0)" font-size="12px"><text x="379.5" y="966.5">Ctrl - (Numpad)</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-378-889-122-26-0)" font-size="12px"><text x="379.5" y="901.5">Ctrl+0</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-548-438-117-26-0)" font-size="12px"><text x="549.5" y="450.5">Canvas Zoom In/Out</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-548-502-144-26-0)" font-size="12px"><text x="549.5" y="514.5">Screen Zoom In/Out (Mac)</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-548-535-142-26-0)" font-size="12px"><text x="549.5" y="547">Canvas Vertical Scroll</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-548-567-142-26-0)" font-size="12px"><text x="549.5" y="579.5">Canvas Horizontal Scroll</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-548-599-122-26-0)" font-size="12px"><text x="549.5" y="611.5">Pan Canvas</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-548-631-142-26-0)" font-size="12px"><text x="549.5" y="643.5">Create / Remove Space</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-548-664-142-26-0)" font-size="12px"><text x="549.5" y="676">Disable Connections</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-548-696-142-26-0)" font-size="12px"><text x="549.5" y="708.5">Home</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-548-728-142-26-0)" font-size="12px"><text x="549.5" y="740.5">Refresh</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-548-760-142-26-0)" font-size="12px"><text x="549.5" y="772.5">Reset View</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-548-793-142-26-0)" font-size="12px"><text x="549.5" y="805">Fit Window</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-548-825-142-26-0)" font-size="12px"><text x="549.5" y="837.5">Fit Page</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-548-857-142-26-0)" font-size="12px"><text x="549.5" y="869.5">Fit Two Pages</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-548-889-142-26-0)" font-size="12px"><text x="549.5" y="901.5">Custom Zoom</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-548-921-142-26-0)" font-size="12px"><text x="549.5" y="934">Zoom In</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-548-954-142-26-0)" font-size="12px"><text x="549.5" y="966.5">Zoom Out</text></g><g fill="#333333" font-family="Helvetica" font-size="12px"><text x="406.5" y="1026.5">Click to connect and clone (ctrl+click to clone,</text><text x="406.5" y="1040.5">shift+click to connect). Drag to connect</text><text x="406.5" y="1054.5">(ctrl+drag to clone).</text></g><image x="384.33" y="1108.5" width="15" height="25" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAAZAgMAAACTN5xfAAAACVBMVEX///////8AAACO9MPsAAAAAXRSTlMAQObYZgAAAFRJREFUeF5VyjEKgDAQRNGPRSA38AB6JEWsUkggt9hLGDbdlh5Tp7R5DPzBAEK46OI2UcQhdrGZKB/nA13B9Q5hqwEij+akVi/yFDMJFjL8VlUdw1+gHxbW+YsglAAAAABJRU5ErkJggg==" pointer-events="none"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-405-1073-239-20-0)" font-size="12px"><text x="406.5" y="1086.5">Click to rotate 90° clockwise. Drag to rotate.</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-405-1111-258-20-0)" font-size="12px"><text x="406.5" y="1124.5">Ctrl: Show Dialog, Alt: Origin, Shift: Ignore XML</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-118-92-26-0)" font-size="12px"><text x="746.5" y="130.5">Ctrl+Shift+L</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-150-92-26-0)" font-size="12px"><text x="746.5" y="162.5">Ctrl+Shift+O</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-182-72-26-0)" font-size="12px"><text x="746.5" y="194.5">Ctrl+M</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-214-92-26-0)" font-size="12px"><text x="746.5" y="226.5">Ctrl+Shift+P</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-247-92-26-0)" font-size="12px"><text x="746.5" y="259">Ctrl+Shift+M</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-279-72-26-0)" font-size="12px"><text x="746.5" y="291.5">Rightclick</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-343-72-26-0)" font-size="12px"><text x="746.5" y="355.5">F1</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-834-118-162-26-0)" font-size="12px"><text x="835.5" y="130.5">Toggle Layers Window</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-834-150-162-26-0)" font-size="12px"><text x="835.5" y="162.5">Toggle Outline Window</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-834-182-162-26-0)" font-size="12px"><text x="835.5" y="194.5">Edit Metadata</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-834-214-162-26-0)" font-size="12px"><text x="835.5" y="226.5">Toggle Format Panel</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-834-247-162-26-0)" font-size="12px"><text x="835.5" y="259">Edit Vertex Geometry</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-834-279-152-26-0)" font-size="12px"><text x="835.5" y="291.5">Context Menu</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-834-343-85-26-0)" font-size="12px"><text x="835.5" y="355.5">About</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-438-222-26-0)" font-size="12px"><text x="746.5" y="450.5">Alt+(Shift+)Drag from sidebar</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-470-232-26-0)" font-size="12px"><text x="746.5" y="482.5">Alt+(Shift / Ctrl)+Click on a sidebar item</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-502-222-26-0)" font-size="12px"><text x="746.5" y="514.5">Shift+Click on a sidebar item</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-535-222-26-0)" font-size="12px"><text x="746.5" y="547">Click on a sidebar item</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-567-222-26-0)" font-size="12px"><text x="746.5" y="579.5">Ctrl+Shift+Move Endpoint</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1005-438-408-26-0)" font-size="12px"><text x="1006.5" y="450.5">Disable replace, connect on drop (drop targets), Shift ignores current style</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1005-470-408-26-0)" font-size="12px"><text x="1006.5" y="482.5">Inserts and connects the selected item (Shift ignores current style)</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1005-502-262-26-0)" font-size="12px"><text x="1006.5" y="514.5">Replaces the selected item with the clicked one</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1005-534-262-26-0)" font-size="12px"><text x="1006.5" y="547">Connects unconnected side of selected edge</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1005-567-262-26-0)" font-size="12px"><text x="1006.5" y="579.5">Disables connections</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-664-82-26-0)" font-size="12px"><text x="746.5" y="676">Ctrl+S</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-696-82-26-0)" font-size="12px"><text x="746.5" y="708.5">Ctrl+Shift+S</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-728-82-26-0)" font-size="12px"><text x="746.5" y="740.5">Ctrl+Z</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-760-82-26-0)" font-size="12px"><text x="746.5" y="772.5">Alt+Shift+A</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-825-82-27-0)" font-size="12px"><text x="746.5" y="837">Hold Alt</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-857-82-26-0)" font-size="12px"><text x="746.5" y="869.5">Ctrl+Shift+G</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-889-82-26-0)" font-size="12px"><text x="746.5" y="901.5">Ctrl+P</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-922-82-26-0)" font-size="12px"><text x="746.5" y="934">Ctrl+Y</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-954-82-26-0)" font-size="12px"><text x="746.5" y="966.5">Ctrl+Shift+Z</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-986-82-26-0)" font-size="12px"><text x="746.5" y="998.5">Ctrl+Shift+X</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-1018-82-26-0)" font-size="12px"><text x="746.5" y="1031">Ctrl+K</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-1051-82-26-0)" font-size="12px"><text x="746.5" y="1063.5">Ctrl+Shift+K</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-1083-82-26-0)" font-size="12px"><text x="746.5" y="1095.5">Esc</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-1115-98-26-0)" font-size="12px"><text x="746.5" y="1127.5">Alt+Drag / Drop</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-845-696-132-26-0)" font-size="12px"><text x="846.5" y="708.5">Save as</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-845-664-132-26-0)" font-size="12px"><text x="846.5" y="676">Save</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-845-728-132-26-0)" font-size="12px"><text x="846.5" y="740.5">Undo</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-845-760-132-26-0)" font-size="12px"><text x="846.5" y="772.5">Connection Arrows</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-845-824-195-28-0)" font-size="12px"><text x="846.5" y="836.5">Ignores handles under the mouse</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-845-857-132-26-0)" font-size="12px"><text x="846.5" y="869.5">Toggle grid</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-845-889-132-26-0)" font-size="12px"><text x="846.5" y="901.5">Print</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-845-922-132-26-0)" font-size="12px"><text x="846.5" y="934">Redo (Windows)</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-845-954-132-26-0)" font-size="12px"><text x="846.5" y="966.5">Redo (Linux/Mac)</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-845-986-132-26-0)" font-size="12px"><text x="846.5" y="998.5">Insert Text</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-845-1019-132-26-0)" font-size="12px"><text x="846.5" y="1031">Insert Rectangle</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-845-1051-132-26-0)" font-size="12px"><text x="846.5" y="1063.5">Insert Ellipse</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-845-1083-132-26-0)" font-size="12px"><text x="846.5" y="1095.5">Cancel Action</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-845-1115-208-26-0)" font-size="12px"><text x="846.5" y="1127.5">Force Rubberband / Ignore Group</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-1105-899-102-26-0)" font-size="12px"><text x="1106.5" y="911.5">Drag</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-1105-932-102-26-0)" font-size="12px"><text x="1106.5" y="944">Tap and hold</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-1105-964-102-26-0)" font-size="12px"><text x="1106.5" y="976.5">Pinch</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-1105-996-102-26-0)" font-size="12px"><text x="1106.5" y="1008.5">Tap selected cell</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1215-899-132-26-0)" font-size="12px"><text x="1216.5" y="911.5">Move Cell / Pan Canvas</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1215-932-188-26-0)" font-size="12px"><text x="1216.5" y="944.5">Toggle Selection / Rubberband</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1215-964-112-26-0)" font-size="12px"><text x="1216.5" y="976.5">Zoom</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1215-996-112-26-0)" font-size="12px"><text x="1216.5" y="1008.5">Context Menu</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-1105-118-112-26-0)" font-size="12px"><text x="1106.5" y="130.5">Cursor</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-1105-150-112-26-0)" font-size="12px"><text x="1106.5" y="162.5">Shift+Cursor</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-1105-182-112-26-0)" font-size="12px"><text x="1106.5" y="194.5">Ctrl+Cursor</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-1105-214-112-26-0)" font-size="12px"><text x="1106.5" y="226.5">Ctrl+Shift+Cursor</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-1105-247-112-26-0)" font-size="12px"><text x="1106.5" y="259">Alt+Shift+Cursor</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-1105-279-112-26-0)" font-size="12px"><text x="1106.5" y="291.5">Alt+Cursor</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-1105-311-112-26-0)" font-size="12px"><text x="1106.5" y="323.5">Ctrl+Shift+Pg Up</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-1105-343-132-26-0)" font-size="12px"><text x="1106.5" y="355.5">Ctrl+Shift+Pg Down</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1245-118-141-26-0)" font-size="12px"><text x="1246.5" y="130.5">Scroll / Move cell (1px)</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1245-150-141-26-0)" font-size="12px"><text x="1246.5" y="162.5">Move cell (grid size)</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1245-182-141-26-0)" font-size="12px"><text x="1246.5" y="194.5">Resize cell (1px)</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1245-214-141-26-0)" font-size="12px"><text x="1246.5" y="226.5">Resize cell (grid size)</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1245-247-141-26-0)" font-size="12px"><text x="1246.5" y="259">Clone and connect</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1245-279-141-26-0)" font-size="12px"><text x="1246.5" y="291.5">Scroll Page</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1245-311-122-26-0)" font-size="12px"><text x="1246.5" y="323.5">Previous Page</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1245-343-132-26-0)" font-size="12px"><text x="1246.5" y="355.5">Next Page</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-1105-663-92-26-0)" font-size="12px"><text x="1106.5" y="675.5">Ctrl+Shift+R</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-1105-696-92-26-0)" font-size="12px"><text x="1106.5" y="708.5">Ctrl+E</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-1105-728-92-26-0)" font-size="12px"><text x="1106.5" y="740.5">Ctrl+Shift+D</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-1105-760-92-26-0)" font-size="12px"><text x="1106.5" y="772.5">Ctrl+Shift+C</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-1105-793-92-26-0)" font-size="12px"><text x="1106.5" y="805">Ctrl+Shift+V</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1215-663-112-26-0)" font-size="12px"><text x="1216.5" y="675.5">Clear Default Style</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1215-696-112-26-0)" font-size="12px"><text x="1216.5" y="708.5">Edit Style</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1215-728-112-26-0)" font-size="12px"><text x="1216.5" y="740.5">Set as Default Style</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1215-760-112-26-0)" font-size="12px"><text x="1216.5" y="772.5">Copy Style</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1215-793-112-26-0)" font-size="12px"><text x="1216.5" y="805">Paste Style</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-1084-82-165-26-0)" font-size="14px"><text x="1085.5" y="96.5">CURSOR / PAGE KEYS</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-725-82-165-26-0)" font-size="14px"><text x="726.5" y="96.5">TOOLS</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-369-82-165-26-0)" font-size="14px"><text x="370.5" y="96.5">SELECTION</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-5-82-165-26-0)" font-size="14px"><text x="6.5" y="96.5">LABELS</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-4-403-165-26-0)" font-size="14px"><text x="5.5" y="417.5">CANVAS</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-365-403-165-26-0)" font-size="14px"><text x="366.5" y="417.5">VIEW</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-725-403-165-26-0)" font-size="14px"><text x="726.5" y="417.5">SIDEBAR / CONNECT</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-1085-627-165-26-0)" font-size="14px"><text x="1086.5" y="641.5">STYLES</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-725-627-165-26-0)" font-size="14px"><text x="726.5" y="641.5">DOCUMENT</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-178-5-273-59-0)" font-size="30px"><text x="179.5" y="35.5">Keyboard Shortcuts</text></g><image x="365.5" y="1064.5" width="39" height="37" xlink:href="data:image/png;base64,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" preserveAspectRatio="none" pointer-events="none"/><image x="375.5" y="1067.5" width="29" height="31" xlink:href="data:image/png;base64,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" preserveAspectRatio="none" opacity="0.7" pointer-events="none"/><image x="3.5" y="0.5" width="159" height="42" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAe4AAACCCAYAAACAVivDAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyhpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTM4IDc5LjE1OTgyNCwgMjAxNi8wOS8xNC0wMTowOTowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTcgKE1hY2ludG9zaCkiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NDc3MUZCMDdFQzgwMTFFNjkyQ0M4QTZGMTk4QjM2MUYiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NDc3MUZCMDhFQzgwMTFFNjkyQ0M4QTZGMTk4QjM2MUYiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo0NzcxRkIwNUVDODAxMUU2OTJDQzhBNkYxOThCMzYxRiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo0NzcxRkIwNkVDODAxMUU2OTJDQzhBNkYxOThCMzYxRiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PqCt2j8AACJxSURBVHja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" preserveAspectRatio="none" pointer-events="none"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-1115-142-26-0)" font-size="12px"><text x="166.5" y="1127.5">Connect to a Fixed Point</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-1115-132-26-0)" font-size="12px"><text x="26.5" y="1127.5">Alt+Connect</text></g><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-311-72-26-0)" font-size="12px"><text x="746.5" y="323.5">Ctrl+Click</text></g><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-834-311-152-26-0)" font-size="12px"><text x="835.5" y="323.5">Context Menu</text></g><a xlink:href="https://www.draw.io/?url=https%3A%2F%2Fwww.draw.io%2Fshortcuts.svg"><rect x="1111.67" y="1117" width="114" height="18" fill="none" stroke="none"/><g fill="#F08705" font-family="Helvetica" text-decoration="underline" font-size="12px"><text x="1113.17" y="1129.5">Open in draw.io...</text></g></a><rect x="374" y="465" width="150" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-378-470-142-26-0)" font-size="12px"><text x="379.5" y="482.5">Ctrl+Shift+Mouse wheel</text></g><rect x="544" y="465" width="123" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-548-470-115-26-0)" font-size="12px"><text x="549.5" y="482.5">Canvas Zoom In/Out</text></g><rect x="841" y="787.5" width="140" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-845-793-132-26-0)" font-size="12px"><text x="846.5" y="805">Connection Points</text></g><rect x="741" y="787.5" width="90" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-792-82-26-0)" font-size="12px"><text x="746.5" y="805">Alt+Shift+P</text></g><rect x="116" y="113" width="200" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-120-118-192-26-0)" font-size="12px"><text x="121.5" y="130.5">Insert text or add an edge label</text></g><rect x="21" y="113" width="120" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-118-112-26-0)" font-size="12px"><text x="26.5" y="130.5">Double click</text></g><rect x="130.28" y="786" width="10" height="16" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-130-787-10-20-0)" font-size="10px"><text x="131.78" y="797.5">2</text></g><rect x="1112" y="1083" width="255" height="29" rx="4.35" ry="4.35" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" font-size="12px"><text x="1113.5" y="1094">Ctrl+Resize for non-recursive group resize</text><text x="1113.5" y="1108">Ctrl+Meta+Resize for centered group resize</text></g><rect x="1105.33" y="1075" width="20" height="10" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" font-size="10px"><text x="1106.83" y="1086.5">2</text></g><rect x="91" y="146" width="10" height="16" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-91-147-10-20-0)" font-size="10px"><text x="92.5" y="157.5">1</text></g><rect x="1112" y="1044" width="255" height="29" rx="4.35" ry="4.35" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" font-size="12px"><text x="1113.5" y="1055">Ctrl / Shift+Enter: New Line / Apply in Safari</text><text x="1113.5" y="1069">Ctrl / Shift+Esc: Cancel Editing</text></g><rect x="1105.33" y="1036" width="20" height="10" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" font-size="10px"><text x="1106.83" y="1047.5">1</text></g><rect x="21" y="433" width="140" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-438-132-26-0)" font-size="12px"><text x="26.5" y="450.5">Ctrl+X</text></g><rect x="21" y="465" width="140" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-470-132-26-0)" font-size="12px"><text x="26.5" y="482.5">Ctrl+C</text></g><rect x="21" y="497" width="140" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-502-132-26-0)" font-size="12px"><text x="26.5" y="514.5">Ctrl+V</text></g><rect x="21" y="529.5" width="140" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-535-132-26-0)" font-size="12px"><text x="26.5" y="547">Ctrl+G</text></g><rect x="21" y="562" width="140" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-567-132-26-0)" font-size="12px"><text x="26.5" y="579.5">Ctrl+Shift+U</text></g><rect x="21" y="594" width="140" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-599-132-26-0)" font-size="12px"><text x="26.5" y="611.5">Ctrl+L / Alt+Shift+L</text></g><rect x="21" y="626" width="140" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-631-132-26-0)" font-size="12px"><text x="26.5" y="643.5">Ctrl+Enter / D</text></g><rect x="21" y="658.5" width="140" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-664-132-26-0)" font-size="12px"><text x="26.5" y="676">Backspace or Delete</text></g><rect x="21" y="691" width="140" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-696-132-26-0)" font-size="12px"><text x="26.5" y="708.5">Ctrl+Delete</text></g><rect x="21" y="723" width="140" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-728-132-26-0)" font-size="12px"><text x="26.5" y="740.5">Ctrl+R</text></g><rect x="21" y="755" width="140" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-760-132-26-0)" font-size="12px"><text x="26.5" y="772.5">Shift+Resize</text></g><rect x="21" y="787.5" width="140" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-793-132-26-0)" font-size="12px"><text x="26.5" y="805">Ctrl / Meta+Resize</text></g><rect x="21" y="820" width="140" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-825-132-26-0)" font-size="12px"><text x="26.5" y="837.5">Ctrl+Home</text></g><rect x="21" y="852" width="140" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-857-132-26-0)" font-size="12px"><text x="26.5" y="869.5">Ctrl+End</text></g><rect x="21" y="884" width="140" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-889-132-26-0)" font-size="12px"><text x="26.5" y="901.5">Ctrl+Shift+Home</text></g><rect x="21" y="916.5" width="140" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-922-132-26-0)" font-size="12px"><text x="26.5" y="934">Ctrl+Shift+End</text></g><rect x="21" y="949" width="140" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-954-132-26-0)" font-size="12px"><text x="26.5" y="966.5">Ctrl+Shift+B</text></g><rect x="21" y="981" width="140" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-986-132-26-0)" font-size="12px"><text x="26.5" y="998.5">Ctrl+Shift+F</text></g><rect x="21" y="1013.5" width="140" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-1019-132-26-0)" font-size="12px"><text x="26.5" y="1031">Alt+Shift+C/T</text></g><rect x="21" y="1046" width="140" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-1051-132-26-0)" font-size="12px"><text x="26.5" y="1063.5">Ctrl+Shift+Y</text></g><rect x="21" y="1078" width="140" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-1083-132-26-0)" font-size="12px"><text x="26.5" y="1095.5">Ctrl / Shift+Drag</text></g><rect x="161" y="433" width="150" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-438-142-26-0)" font-size="12px"><text x="166.5" y="450.5">Cut</text></g><rect x="161" y="465" width="150" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-470-142-26-0)" font-size="12px"><text x="166.5" y="482.5">Copy</text></g><rect x="161" y="497" width="150" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-502-142-26-0)" font-size="12px"><text x="166.5" y="514.5">Paste</text></g><rect x="161" y="529.5" width="150" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-535-142-26-0)" font-size="12px"><text x="166.5" y="547">Group</text></g><rect x="161" y="562" width="150" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-567-142-26-0)" font-size="12px"><text x="166.5" y="579.5">Ungroup</text></g><rect x="161" y="594" width="150" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-599-142-26-0)" font-size="12px"><text x="166.5" y="611.5">Lock/Unlock / Edit Link</text></g><rect x="161" y="626" width="150" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-631-142-26-0)" font-size="12px"><text x="166.5" y="643.5">Duplicate</text></g><rect x="161" y="658.5" width="150" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-664-142-26-0)" font-size="12px"><text x="166.5" y="676">Delete Selected Cells</text></g><rect x="161" y="691" width="150" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-696-142-26-0)" font-size="12px"><text x="166.5" y="708.5">Delete with Connections</text></g><rect x="161" y="723" width="159" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-728-151-26-0)" font-size="12px"><text x="166.5" y="740.5">Turn / Rotate 90° Clockwise</text></g><rect x="161" y="755" width="150" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-760-142-26-0)" font-size="12px"><text x="166.5" y="772.5">Maintain Proportions</text></g><rect x="161" y="949" width="150" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-954-142-26-0)" font-size="12px"><text x="166.5" y="966.5">Send to Back</text></g><rect x="161" y="820" width="150" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-825-142-26-0)" font-size="12px"><text x="166.5" y="837.5">Collapse Container</text></g><rect x="161" y="852" width="150" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-857-142-26-0)" font-size="12px"><text x="166.5" y="869.5">Expand Container</text></g><rect x="161" y="884" width="150" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-889-142-26-0)" font-size="12px"><text x="166.5" y="901.5">Exit Group</text></g><rect x="161" y="916.5" width="150" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-922-142-26-0)" font-size="12px"><text x="166.5" y="934">Enter Group</text></g><rect x="161" y="981" width="150" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-986-142-26-0)" font-size="12px"><text x="166.5" y="998.5">Bring to Front</text></g><rect x="161" y="787.5" width="150" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-793-142-26-0)" font-size="12px"><text x="166.5" y="805">Centered / Group Resize</text></g><rect x="161" y="1014" width="176" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-1019-168-26-0)" font-size="12px"><text x="166.5" y="1031.5">Clear Waypoints / Edit Tooltip</text></g><rect x="161" y="1046" width="150" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-1051-142-26-0)" font-size="12px"><text x="166.5" y="1063.5">Autosize</text></g><rect x="161" y="1078" width="156" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-1083-148-26-0)" font-size="12px"><text x="166.5" y="1095.5">Clone cell/Disconnect edge</text></g><rect x="481" y="11" width="396" height="26" fill="none" stroke="none"/><g fill="#777777" font-family="Helvetica" clip-path="url(#mx-clip-485-16-388-26-0)" font-size="18px"><text x="486.5" y="34.5">cmd instead of ctrl, option instead of alt for Mac </text></g><rect x="1087" y="818" width="340" height="30" fill="#ffffff" stroke="none"/><rect x="1087" y="850" width="340" height="31" fill="#ffffff" stroke="none"/><rect x="1101" y="820" width="100" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-1105-825-92-26-0)" font-size="12px"><text x="1106.5" y="837.5">Alt+Shift+X</text></g><rect x="1101" y="852.5" width="100" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-1105-858-92-26-0)" font-size="12px"><text x="1106.5" y="870">Alt+Shift+V</text></g><rect x="1211" y="820" width="120" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1215-825-112-26-0)" font-size="12px"><text x="1216.5" y="837.5">Copy Size</text></g><rect x="1211" y="852.5" width="120" height="26" fill="none" stroke="none"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1215-858-112-26-0)" font-size="12px"><text x="1216.5" y="870">Paste Size</text></g><image x="376.5" y="1018.5" width="26" height="18" xlink:href="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjZweCIgaGVpZ2h0PSIxOHB4IiB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyNiAxOCI+PHBhdGggZD0ibSAxIDYgTCAxNCA2IEwgMTQgMSBMIDI2IDkgTCAxNCAxOCBMIDE0IDEyIEwgMSAxMiB6IiBzdHJva2U9IiNmZmYiIGZpbGw9IiMyOWI2ZjIiLz48L3N2Zz4=" preserveAspectRatio="none" pointer-events="none"/></g></svg> \ No newline at end of file -- GitLab