From 26502a63638590ed358031ac5011e69c6c8276a8 Mon Sep 17 00:00:00 2001 From: Gaudenz Alder Date: Thu, 28 Sep 2017 21:37:32 +0200 Subject: [PATCH] 7.4.8 release Former-commit-id: b9640539704d5bcddc999d1a8b194ed5a2db07af --- ChangeLog | 7 + VERSION | 2 +- etc/mxgraph/mxClient.js | 9 +- .../importer/GliffyDiagramConverter.java | 7 +- .../mxgraph/io/gliffy/model/GliffyObject.java | 21 +- src/com/mxgraph/io/gliffy/model/Graphic.java | 13 + src/com/mxgraph/online/ProxyServlet.java | 4 + war/cache.manifest | 2 +- war/index.html | 18 + war/js/app.min.js | 308 ++-- war/js/atlas-viewer.min.js | 1133 ++++++------- war/js/atlas.min.js | 1395 +++++++++-------- war/js/diagramly/App.js | 37 +- war/js/diagramly/Dialogs.js | 8 +- war/js/diagramly/EditorUi.js | 1 - war/js/diagramly/Extensions.js | 971 +++++++++++- war/js/diagramly/GraphViewer.js | 83 +- war/js/diagramly/Init.js | 54 +- war/js/diagramly/Menus.js | 2 +- war/js/diagramly/StorageFile.js | 35 +- war/js/diagramly/Trees.js | 8 +- war/js/embed-static.min.js | 11 +- war/js/extensions.min.js | 531 ++++--- war/js/reader.min.js | 11 +- war/js/viewer.min.js | 1133 ++++++------- 25 files changed, 3408 insertions(+), 2396 deletions(-) diff --git a/ChangeLog b/ChangeLog index b634df133..7450f3958 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +28-SEP-2017: 7.4.8 + +- Adds #P for URL parameters (beta) +- Bypasses caches for proxy servlet +- Uses mxGraph 3.7.6 beta 2 +- Checks existing storage file before rename + 26-SEP-2017: 7.4.7 - Adds components for Trello Power-Up diff --git a/VERSION b/VERSION index b86d43fa2..9d986751a 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -7.4.7 \ No newline at end of file +7.4.8 \ No newline at end of file diff --git a/etc/mxgraph/mxClient.js b/etc/mxgraph/mxClient.js index 949242149..200c1d04c 100644 --- a/etc/mxgraph/mxClient.js +++ b/etc/mxgraph/mxClient.js @@ -910,8 +910,9 @@ mxCellRenderer.registerShape(mxConstants.SHAPE_LABEL,mxLabel);mxCellRenderer.pro mxCellRenderer.prototype.createIndicatorShape=function(a){a.shape.indicatorShape=this.getShape(a.view.graph.getIndicatorShape(a))};mxCellRenderer.prototype.getShape=function(a){return null!=a?mxCellRenderer.prototype.defaultShapes[a]:null};mxCellRenderer.prototype.getShapeConstructor=function(a){var b=this.getShape(a.style[mxConstants.STYLE_SHAPE]);null==b&&(b=a.view.graph.getModel().isEdge(a.cell)?this.defaultEdgeShape:this.defaultVertexShape);return b}; mxCellRenderer.prototype.configureShape=function(a){a.shape.apply(a);a.shape.image=a.view.graph.getImage(a);a.shape.indicatorColor=a.view.graph.getIndicatorColor(a);a.shape.indicatorStrokeColor=a.style[mxConstants.STYLE_INDICATOR_STROKECOLOR];a.shape.indicatorGradientColor=a.view.graph.getIndicatorGradientColor(a);a.shape.indicatorDirection=a.style[mxConstants.STYLE_INDICATOR_DIRECTION];a.shape.indicatorImage=a.view.graph.getIndicatorImage(a);this.postConfigureShape(a)}; mxCellRenderer.prototype.postConfigureShape=function(a){null!=a.shape&&(this.resolveColor(a,"indicatorColor",mxConstants.STYLE_FILLCOLOR),this.resolveColor(a,"indicatorGradientColor",mxConstants.STYLE_GRADIENTCOLOR),this.resolveColor(a,"fill",mxConstants.STYLE_FILLCOLOR),this.resolveColor(a,"stroke",mxConstants.STYLE_STROKECOLOR),this.resolveColor(a,"gradient",mxConstants.STYLE_GRADIENTCOLOR))}; -mxCellRenderer.prototype.resolveColor=function(a,b,c){var d=a.shape[b],e=a.view.graph,f=null;"inherit"==d?f=e.model.getParent(a.cell):"swimlane"==d?(f=null!=e.model.getTerminal(a.cell,!1)?e.model.getTerminal(a.cell,!1):a.cell,f=e.getSwimlane(f),c=e.swimlaneIndicatorColorAttribute):"indicated"==d&&(a.shape[b]=a.shape.indicatorColor);null!=f&&(d=e.getView().getState(f),a.shape[b]=null,null!=d&&(a.shape[b]=null!=d.shape&&"indicatorColor"!=b?d.shape[b]:d.style[c]))}; -mxCellRenderer.prototype.getLabelValue=function(a){return a.view.graph.getLabel(a.cell)}; +mxCellRenderer.prototype.checkPlaceholderStyles=function(a){if(null!=a.style)for(var b=["inherit","swimlane","indicated"],c=[mxConstants.STYLE_FILLCOLOR,mxConstants.STYLE_STROKECOLOR,mxConstants.STYLE_GRADIENTCOLOR],d=0;d=l.x:null!=c&&(k=c.x+c.width=a.x:null!=b&&(l=b.x+b.width linkMap; - public mxCell mxObject;// the mxCell this gliffy object got converted into public GliffyObject parent = null; @@ -228,8 +227,17 @@ public String getText() public String getLink() { - if (linkMap != null && !linkMap.isEmpty()) - return linkMap.get(0).url; + if(children == null || children.isEmpty()) + return null; + + Iterator it = children.iterator(); + + while(it.hasNext()) + { + GliffyObject child = it.next(); + if(child.isLink()) + return child.graphic.getLink().href; + } return null; } @@ -265,6 +273,11 @@ public boolean isLine() { return graphic != null && graphic.getType().equals(Graphic.Type.LINE); } + + public boolean isLink() + { + return graphic != null && graphic.getType().equals(Graphic.Type.LINK); + } private boolean isUml() { diff --git a/src/com/mxgraph/io/gliffy/model/Graphic.java b/src/com/mxgraph/io/gliffy/model/Graphic.java index 44e859217..dc1501165 100644 --- a/src/com/mxgraph/io/gliffy/model/Graphic.java +++ b/src/com/mxgraph/io/gliffy/model/Graphic.java @@ -90,12 +90,20 @@ public static class GliffyPopupNote extends GliffyShape { public String text; } + + public static class GliffyLink + { + String href; + boolean renderIcon; + } public Type type; public GliffyText Text; public GliffyLine Line; + + public GliffyLink Link; public GliffyShape Shape; @@ -126,6 +134,11 @@ public GliffyLine getLine() { return Line; } + + public GliffyLink getLink() + { + return Link; + } public GliffyShape getShape() { diff --git a/src/com/mxgraph/online/ProxyServlet.java b/src/com/mxgraph/online/ProxyServlet.java index 98002028d..a186339c9 100644 --- a/src/com/mxgraph/online/ProxyServlet.java +++ b/src/com/mxgraph/online/ProxyServlet.java @@ -50,6 +50,10 @@ protected void doGet(HttpServletRequest request, URL url = new URL(urlParam); URLConnection connection = url.openConnection(); + response.setHeader("Pragma", "no-cache"); // HTTP 1.0 + response.setHeader("Cache-control", "private, no-cache, no-store"); + response.setHeader("Expires", "0"); + // Status code pass-through if (connection instanceof HttpURLConnection) { diff --git a/war/cache.manifest b/war/cache.manifest index 993c25f16..7836aa8a1 100644 --- a/war/cache.manifest +++ b/war/cache.manifest @@ -1,7 +1,7 @@ CACHE MANIFEST # THIS FILE WAS GENERATED. DO NOT MODIFY! -# 09/26/2017 04:27 PM +# 09/28/2017 09:30 PM app.html index.html?offline=1 diff --git a/war/index.html b/war/index.html index d5dbd97c0..b9692d6d4 100644 --- a/war/index.html +++ b/war/index.html @@ -55,6 +55,24 @@ return result; })(); + // Forces CDN caches by passing URL parameters via URL hash + if (window.location.hash != null && window.location.hash.substring(0, 2) == '#P') + { + try + { + urlParams = JSON.parse(decodeURIComponent(window.location.hash.substring(2))); + + if (urlParams.hash != null) + { + window.location.hash = urlParams.hash; + } + } + catch (e) + { + // ignore + } + } + // Redirects page if required if (urlParams['dev'] != '1') { diff --git a/war/js/app.min.js b/war/js/app.min.js index 3254d1ed0..643edea64 100644 --- a/war/js/app.min.js +++ b/war/js/app.min.js @@ -97,13 +97,13 @@ l--,_+=n[s++]<>>=5,u-=5,a.ndist=(31&_)+1,_>>>=5,u var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(a,b){var c="",d,e,f,g,k,l,m=0;for(null!=b&&b||(a=Base64._utf8_encode(a));m>2,d=(d&3)<<4|e>>4,k=(e&15)<<2|f>>6,l=f&63,isNaN(e)?k=l=64:isNaN(f)&&(l=64),c=c+this._keyStr.charAt(g)+this._keyStr.charAt(d)+this._keyStr.charAt(k)+this._keyStr.charAt(l);return c},decode:function(a,b){b=null!=b?b:!1;var c="",d,e,f,g,k,l=0;for(a=a.replace(/[^A-Za-z0-9\+\/\=]/g, "");l>4,e=(e&15)<<4|g>>2,f=(g&3)<<6|k,c+=String.fromCharCode(d),64!=g&&(c+=String.fromCharCode(e)),64!=k&&(c+=String.fromCharCode(f));b||(c=Base64._utf8_decode(c));return c},_utf8_encode:function(a){a=a.replace(/\r\n/g,"\n");for(var b="",c=0;cd?b+=String.fromCharCode(d):(127d?b+= String.fromCharCode(d>>6|192):(b+=String.fromCharCode(d>>12|224),b+=String.fromCharCode(d>>6&63|128)),b+=String.fromCharCode(d&63|128))}return b},_utf8_decode:function(a){var b="",c=0,d;for(c1=c2=0;cd?(b+=String.fromCharCode(d),c++):191d?(c2=a.charCodeAt(c+1),b+=String.fromCharCode((d&31)<<6|c2&63),c+=2):(c2=a.charCodeAt(c+1),c3=a.charCodeAt(c+2),b+=String.fromCharCode((d&15)<<12|(c2&63)<<6|c3&63),c+=3);return b}};window.urlParams=window.urlParams||{};window.isLocalStorage=window.isLocalStorage||!1;window.isSvgBrowser=window.isSvgBrowser||0>navigator.userAgent.indexOf("MSIE")||9<=document.documentMode;window.EXPORT_URL=window.EXPORT_URL||"https://exp.draw.io/ImageExport4/export";window.SAVE_URL=window.SAVE_URL||"save";window.OPEN_URL=window.OPEN_URL||"open";window.PROXY_URL=window.PROXY_URL||"proxy";window.SHAPES_PATH=window.SHAPES_PATH||"shapes";window.GRAPH_IMAGE_PATH=window.GRAPH_IMAGE_PATH||"img"; -window.ICONSEARCH_PATH=window.ICONSEARCH_PATH||(0<=navigator.userAgent.indexOf("MSIE")||urlParams.dev)&&"file:"!=window.location.protocol?"iconSearch":"https://www.draw.io/iconSearch";window.TEMPLATE_PATH=window.TEMPLATE_PATH||"/templates";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||RESOURCES_PATH+"/dia";window.DRAWIO_LOG_URL=window.DRAWIO_LOG_URL||"";window.mxLoadResources=window.mxLoadResources||!1; +window.ICONSEARCH_PATH=window.ICONSEARCH_PATH||(0<=navigator.userAgent.indexOf("MSIE")||urlParams.dev)&&"file:"!=window.location.protocol?"iconSearch":"https://www.draw.io/iconSearch";window.TEMPLATE_PATH=window.TEMPLATE_PATH||"/templates";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||RESOURCES_PATH+"/dia";window.mxLoadResources=window.mxLoadResources||!1; window.mxLanguage=window.mxLanguage||function(){var a="1"==urlParams.offline?"en":urlParams.lang;if(null==a&&"undefined"!=typeof JSON&&isLocalStorage)try{var b=localStorage.getItem(".drawio-config");null!=b&&(a=JSON.parse(b).language||null)}catch(c){isLocalStorage=!1}return a}(); window.mxLanguageMap=window.mxLanguageMap||{i18n:"",id:"Bahasa Indonesia",ms:"Bahasa Melayu",bs:"Bosanski",bg:"Bulgarian",ca:"Català",cs:"Čeština",da:"Dansk",de:"Deutsch",et:"Eesti",en:"English",es:"Español",fil:"Filipino",fr:"Français",it:"Italiano",hu:"Magyar",nl:"Nederlands",no:"Norsk",pl:"Polski","pt-br":"Português (Brasil)",pt:"Português (Portugal)",ro:"Română",fi:"Suomi",sv:"Svenska",vi:"Tiếng Việt",tr:"Türkçe",el:"Ελληνικά",ru:"Русский",sr:"Српски",uk:"Українська",he:"עברית",ar:"العربية",th:"ไทย", ko:"한국어",ja:"日本語",zh:"中文(中国)","zh-tw":"中文(台灣)"};"undefined"===typeof window.mxBasePath&&(window.mxBasePath="mxgraph");if(null==window.mxLanguages){window.mxLanguages=[];for(var lang in mxLanguageMap)"en"!=lang&&window.mxLanguages.push(lang)}window.uiTheme=window.uiTheme||function(){var a=urlParams.ui;if(null==a&&"undefined"!==typeof JSON&&isLocalStorage)try{var b=localStorage.getItem(".drawio-config");null!=b&&(a=JSON.parse(b).ui||null)}catch(c){isLocalStorage=!1}return a}(); -function setCurrentXml(a,b){null!=window.parent&&null!=window.parent.openFile&&window.parent.openFile.setData(a,b)}(function(){if("undefined"!==typeof JSON&&isLocalStorage)try{var a=localStorage.getItem(".drawio-config"),b=!0;null!=a&&(b=JSON.parse(a).showStartScreen);0==b&&(urlParams.splash="0")}catch(c){}})();var ex=urlParams["export"];null!=ex&&("http://"!=ex.substring(0,7)&&"https://"!=ex.substring(0,8)&&(ex="http://"+ex),EXPORT_URL=ex); -if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==urlParams.local)urlParams.analytics="0",urlParams.picker="0",urlParams.gapi="0",urlParams.db="0",urlParams.od="0",urlParams.gh="0";if("1"==urlParams.offline||"1"==urlParams.local)urlParams.math="0";"1"==urlParams.lightbox&&(urlParams.chrome="0");var host=window.location.host,searchString="draw.io",position=host.length-searchString.length,lastIndex=host.lastIndexOf(searchString,position); --1!==lastIndex&&lastIndex===position&&"test.draw.io"!=host&&(window.DRAWIO_LOG_URL="https://log.draw.io");window.urlParams=window.urlParams||{};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images"; +function setCurrentXml(a,b){null!=window.parent&&null!=window.parent.openFile&&window.parent.openFile.setData(a,b)} +(function(){if("undefined"!==typeof JSON&&isLocalStorage)try{var a=localStorage.getItem(".drawio-config"),b=!0;null!=a&&(b=JSON.parse(a).showStartScreen);0==b&&(urlParams.splash="0")}catch(c){}a=urlParams["export"];null!=a&&("http://"!=a.substring(0,7)&&"https://"!=a.substring(0,8)&&(a="http://"+a),EXPORT_URL=a);window.DRAWIO_LOG_URL=window.DRAWIO_LOG_URL||"";b=window.location.host;"test.draw.io"!=b&&(a=b.length-7,b=b.lastIndexOf("draw.io",a),-1!==b&&b===a&&(window.DRAWIO_LOG_URL="https://log.draw.io"))})(); +if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==urlParams.local)urlParams.analytics="0",urlParams.picker="0",urlParams.gapi="0",urlParams.db="0",urlParams.od="0",urlParams.gh="0";if("1"==urlParams.offline||"1"==urlParams.local)urlParams.math="0";"1"==urlParams.lightbox&&(urlParams.chrome="0");window.urlParams=window.urlParams||{};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images"; window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"../../../src";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de"];var mxClient={VERSION:"3.7.6",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&& 0>navigator.userAgent.indexOf("Edge/"),IS_OP:0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/"),IS_OT:0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:0<=navigator.userAgent.indexOf("AppleWebKit/")&& 0>navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_IOS:navigator.userAgent.match(/(iPad|iPhone|iPod)/g)?!0:!1,IS_GC:0<=navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:0<=navigator.userAgent.indexOf("Firefox/"),IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&& @@ -1016,8 +1016,9 @@ mxCellRenderer.registerShape(mxConstants.SHAPE_LABEL,mxLabel);mxCellRenderer.pro mxCellRenderer.prototype.createIndicatorShape=function(a){a.shape.indicatorShape=this.getShape(a.view.graph.getIndicatorShape(a))};mxCellRenderer.prototype.getShape=function(a){return null!=a?mxCellRenderer.prototype.defaultShapes[a]:null};mxCellRenderer.prototype.getShapeConstructor=function(a){var b=this.getShape(a.style[mxConstants.STYLE_SHAPE]);null==b&&(b=a.view.graph.getModel().isEdge(a.cell)?this.defaultEdgeShape:this.defaultVertexShape);return b}; mxCellRenderer.prototype.configureShape=function(a){a.shape.apply(a);a.shape.image=a.view.graph.getImage(a);a.shape.indicatorColor=a.view.graph.getIndicatorColor(a);a.shape.indicatorStrokeColor=a.style[mxConstants.STYLE_INDICATOR_STROKECOLOR];a.shape.indicatorGradientColor=a.view.graph.getIndicatorGradientColor(a);a.shape.indicatorDirection=a.style[mxConstants.STYLE_INDICATOR_DIRECTION];a.shape.indicatorImage=a.view.graph.getIndicatorImage(a);this.postConfigureShape(a)}; mxCellRenderer.prototype.postConfigureShape=function(a){null!=a.shape&&(this.resolveColor(a,"indicatorColor",mxConstants.STYLE_FILLCOLOR),this.resolveColor(a,"indicatorGradientColor",mxConstants.STYLE_GRADIENTCOLOR),this.resolveColor(a,"fill",mxConstants.STYLE_FILLCOLOR),this.resolveColor(a,"stroke",mxConstants.STYLE_STROKECOLOR),this.resolveColor(a,"gradient",mxConstants.STYLE_GRADIENTCOLOR))}; -mxCellRenderer.prototype.resolveColor=function(a,b,c){var d=a.shape[b],e=a.view.graph,f=null;"inherit"==d?f=e.model.getParent(a.cell):"swimlane"==d?(f=null!=e.model.getTerminal(a.cell,!1)?e.model.getTerminal(a.cell,!1):a.cell,f=e.getSwimlane(f),c=e.swimlaneIndicatorColorAttribute):"indicated"==d&&(a.shape[b]=a.shape.indicatorColor);null!=f&&(d=e.getView().getState(f),a.shape[b]=null,null!=d&&(a.shape[b]=null!=d.shape&&"indicatorColor"!=b?d.shape[b]:d.style[c]))}; -mxCellRenderer.prototype.getLabelValue=function(a){return a.view.graph.getLabel(a.cell)}; +mxCellRenderer.prototype.checkPlaceholderStyles=function(a){if(null!=a.style)for(var b=["inherit","swimlane","indicated"],c=[mxConstants.STYLE_FILLCOLOR,mxConstants.STYLE_STROKECOLOR,mxConstants.STYLE_GRADIENTCOLOR],d=0;d=l.x:null!=c&&(k=c.x+c.width=a.x:null!=b&&(l=b.x+b.width=d&&(mxUtils.br(e),k=0)}d=null!=d?d:3;var f=document.createElement("div");f.style.textAlign="center";f.style.whiteSpace="nowrap";f.style.paddingTop="0px";f.style.paddingBottom="20px";var g=a.addLanguageMenu(f);null!=g&&(g.style.bottom="28px");if(!a.isOffline()&&1 '+mxResources.get("googleDriveMissingClickHere")+"",f.appendChild(n))},5E3);this.container=f},SplashDialog=function(a){var b=document.createElement("div");b.style.textAlign="center";a.addLanguageMenu(b);var d=null,c=a.getServiceCount();!a.isOffline()&&1"+g.innerHTML,g.style.paddingBottom="8px",g.style.paddingTop="8px",g.style.height="auto",g.style.width="40%");a.editor.cancelFirst&&k.appendChild(g);f=mxUtils.button(f||mxResources.get("ok"),function(){a.hideDialog();null!=d&&d(n.checked)});k.appendChild(f);null!=h?(f.innerHTML=h+"
"+f.innerHTML+"
",f.style.paddingBottom="8px",f.style.paddingTop="8px",f.style.height="auto",f.className="geBtn", -f.style.width="40%"):f.className="geBtn gePrimaryBtn";a.editor.cancelFirst||k.appendChild(g);m.appendChild(k);e?(k.style.marginTop="10px",k=document.createElement("p"),k.style.marginTop="20px",k.appendChild(n),h=document.createElement("span"),mxUtils.write(h," "+mxResources.get("rememberThisSetting")),k.appendChild(h),m.appendChild(k),mxEvent.addListener(h,"click",function(a){n.checked=!n.checked;mxEvent.consume(a)})):k.style.marginTop="16px";this.container=m},ErrorDialog=function(a,b,d,c,f,g,h,l, -e){e=null!=e?e:!0;var m=document.createElement("div");m.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="16px";k.style.borderBottom="1px solid #c0c0c0";k.style.color="gray";mxUtils.write(k,b);m.appendChild(k)}b=document.createElement("div");b.style.padding="6px";b.innerHTML=d;m.appendChild(b);d=document.createElement("div");d.style.marginTop="16px";d.style.textAlign= -"right";null!=g&&(b=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();g()}),b.className="geBtn",d.appendChild(b),d.style.textAlign="center");var n=mxUtils.button(c,function(){e&&a.hideDialog();null!=f&&f()});n.className="geBtn";d.appendChild(n);null!=h&&(c=mxUtils.button(h,function(){e&&a.hideDialog();null!=l&&l()}),c.className="geBtn gePrimaryBtn",d.appendChild(c));this.init=function(){n.focus()};m.appendChild(d);this.container=m},EmbedDialog=function(a,b,d,c,f){c=document.createElement("div"); -var g=/^https?:\/\//.test(b)||/^mailto:\/\//.test(b);mxUtils.write(c,mxResources.get(5E5>b.length?g?"link":"mainEmbedNotice":"preview")+":");mxUtils.br(c);var h=document.createElement("div");h.style.position="absolute";h.style.top="30px";h.style.right="30px";h.style.color="gray";mxUtils.write(h,a.formatFileSize(b.length));c.appendChild(h);var l=document.createElement("textarea");l.setAttribute("autocomplete","off");l.setAttribute("autocorrect","off");l.setAttribute("autocapitalize","off");l.setAttribute("spellcheck", -"false");l.style.marginTop="10px";l.style.resize="none";l.style.height="150px";l.style.width="440px";l.style.border="1px solid gray";l.value=mxResources.get("updatingDocument");c.appendChild(l);mxUtils.br(c);this.init=function(){window.setTimeout(function(){5E5>b.length?(l.value=b,l.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?l.select():document.execCommand("selectAll",!1,null)):(l.setAttribute("readonly","true"),l.value=b.substring(0,340)+"... ("+mxResources.get("drawingTooLarge")+ -")")},0)};h=document.createElement("div");h.style.position="absolute";h.style.bottom="36px";h.style.right="32px";var e=null;mxClient.IS_CHROMEAPP&&!g||navigator.standalone||!(g||mxClient.IS_SVG&&(null==document.documentMode||9b.length?"preview":"openInNewWindow"),function(){var c=5E5>b.length?l.value:b;if(null!=f)f(c);else if(g)try{var e=window.open(c);(null==d||0"+encodeURIComponent(mxResources.get("preview"))+''+b+"");m.close()}}),e.className="geBtn",h.appendChild(e));if(!g||7500b.length){var k=mxUtils.button("",function(){try{var b="https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(l.value);window.open(b)}catch(p){a.handleError({message:p.message||mxResources.get("drawingTooLarge")})}}),m=document.createElement("img");m.setAttribute("src",Editor.facebookImage);m.setAttribute("width","18");m.setAttribute("height", -"18");m.setAttribute("border","0");k.appendChild(m);k.setAttribute("title",mxResources.get("facebook")+" ("+a.formatFileSize(51200)+" max)");k.style.verticalAlign="bottom";k.style.paddingTop="4px";k.style.minWidth="46px";k.className="geBtn";h.appendChild(k)}7168>b.length&&(k=mxUtils.button("",function(){try{var b="https://twitter.com/intent/tweet?text="+encodeURIComponent("Check out the diagram I made using @drawio")+"&url="+encodeURIComponent(l.value);window.open(b)}catch(p){a.handleError({message:p.message|| -mxResources.get("drawingTooLarge")})}}),m=document.createElement("img"),m.setAttribute("src",Editor.tweetImage),m.setAttribute("width","18"),m.setAttribute("height","18"),m.setAttribute("border","0"),m.style.marginBottom="5px",k.appendChild(m),k.setAttribute("title",mxResources.get("twitter")+" ("+a.formatFileSize(7168)+" max)"),k.style.verticalAlign="bottom",k.style.paddingTop="4px",k.style.minWidth="46px",k.className="geBtn",h.appendChild(k))}m=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()}); -h.appendChild(m);k=mxUtils.button(mxResources.get("copy"),function(){l.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?l.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");a.alert(mxResources.get("copiedToClipboard"))});5E5>b.length?mxClient.IS_SF||null!=document.documentMode?m.className="geBtn gePrimaryBtn":(h.appendChild(k),k.className="geBtn gePrimaryBtn",m.className="geBtn"):(h.appendChild(e),m.className="geBtn",e.className="geBtn gePrimaryBtn"); -c.appendChild(h);this.container=c},GoogleSitesDialog=function(a,b){function d(){var a=null!=D.getTitle()?D.getTitle():this.defaultFilename;if(A.checked&&""!=p.value){var b="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(p.value));null!=a&&(b+="&title="+encodeURIComponent(a));0=d&&(mxUtils.br(e),k=0)}d=null!=d?d:3;var f=document.createElement("div");f.style.textAlign="center";f.style.whiteSpace="nowrap";f.style.paddingTop="0px";f.style.paddingBottom="20px";var g=a.addLanguageMenu(f,!0);null!=g&&(g.style.bottom=parseInt("28px")-2+"px");if(!a.isOffline()&&1 '+mxResources.get("googleDriveMissingClickHere")+"",f.appendChild(n))},5E3);this.container=f},SplashDialog=function(a){var b=document.createElement("div");b.style.textAlign="center";a.addLanguageMenu(b,!0);var d=null,c=a.getServiceCount();!a.isOffline()&&1"+g.innerHTML,g.style.paddingBottom="8px",g.style.paddingTop="8px",g.style.height="auto",g.style.width="40%");a.editor.cancelFirst&&k.appendChild(g);f=mxUtils.button(f||mxResources.get("ok"),function(){a.hideDialog(); +null!=d&&d(n.checked)});k.appendChild(f);null!=h?(f.innerHTML=h+"
"+f.innerHTML+"
",f.style.paddingBottom="8px",f.style.paddingTop="8px",f.style.height="auto",f.className="geBtn",f.style.width="40%"):f.className="geBtn gePrimaryBtn";a.editor.cancelFirst||k.appendChild(g);m.appendChild(k);e?(k.style.marginTop="10px",k=document.createElement("p"),k.style.marginTop="20px",k.appendChild(n),h=document.createElement("span"),mxUtils.write(h," "+mxResources.get("rememberThisSetting")),k.appendChild(h), +m.appendChild(k),mxEvent.addListener(h,"click",function(a){n.checked=!n.checked;mxEvent.consume(a)})):k.style.marginTop="16px";this.container=m},ErrorDialog=function(a,b,d,c,f,g,h,l,e){e=null!=e?e:!0;var m=document.createElement("div");m.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="16px";k.style.borderBottom="1px solid #c0c0c0";k.style.color="gray";mxUtils.write(k, +b);m.appendChild(k)}b=document.createElement("div");b.style.padding="6px";b.innerHTML=d;m.appendChild(b);d=document.createElement("div");d.style.marginTop="16px";d.style.textAlign="right";null!=g&&(b=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();g()}),b.className="geBtn",d.appendChild(b),d.style.textAlign="center");var n=mxUtils.button(c,function(){e&&a.hideDialog();null!=f&&f()});n.className="geBtn";d.appendChild(n);null!=h&&(c=mxUtils.button(h,function(){e&&a.hideDialog(); +null!=l&&l()}),c.className="geBtn gePrimaryBtn",d.appendChild(c));this.init=function(){n.focus()};m.appendChild(d);this.container=m},EmbedDialog=function(a,b,d,c,f){c=document.createElement("div");var g=/^https?:\/\//.test(b)||/^mailto:\/\//.test(b);mxUtils.write(c,mxResources.get(5E5>b.length?g?"link":"mainEmbedNotice":"preview")+":");mxUtils.br(c);var h=document.createElement("div");h.style.position="absolute";h.style.top="30px";h.style.right="30px";h.style.color="gray";mxUtils.write(h,a.formatFileSize(b.length)); +c.appendChild(h);var l=document.createElement("textarea");l.setAttribute("autocomplete","off");l.setAttribute("autocorrect","off");l.setAttribute("autocapitalize","off");l.setAttribute("spellcheck","false");l.style.marginTop="10px";l.style.resize="none";l.style.height="150px";l.style.width="440px";l.style.border="1px solid gray";l.value=mxResources.get("updatingDocument");c.appendChild(l);mxUtils.br(c);this.init=function(){window.setTimeout(function(){5E5>b.length?(l.value=b,l.focus(),mxClient.IS_GC|| +mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?l.select():document.execCommand("selectAll",!1,null)):(l.setAttribute("readonly","true"),l.value=b.substring(0,340)+"... ("+mxResources.get("drawingTooLarge")+")")},0)};h=document.createElement("div");h.style.position="absolute";h.style.bottom="36px";h.style.right="32px";var e=null;mxClient.IS_CHROMEAPP&&!g||navigator.standalone||!(g||mxClient.IS_SVG&&(null==document.documentMode||9 +b.length?"preview":"openInNewWindow"),function(){var c=5E5>b.length?l.value:b;if(null!=f)f(c);else if(g)try{var e=window.open(c);(null==d||0"+ +encodeURIComponent(mxResources.get("preview"))+''+b+"");m.close()}}),e.className="geBtn",h.appendChild(e));if(!g||7500b.length){var k=mxUtils.button("",function(){try{var b="https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(l.value); +window.open(b)}catch(p){a.handleError({message:p.message||mxResources.get("drawingTooLarge")})}}),m=document.createElement("img");m.setAttribute("src",Editor.facebookImage);m.setAttribute("width","18");m.setAttribute("height","18");m.setAttribute("border","0");k.appendChild(m);k.setAttribute("title",mxResources.get("facebook")+" ("+a.formatFileSize(51200)+" max)");k.style.verticalAlign="bottom";k.style.paddingTop="4px";k.style.minWidth="46px";k.className="geBtn";h.appendChild(k)}7168>b.length&&(k= +mxUtils.button("",function(){try{var b="https://twitter.com/intent/tweet?text="+encodeURIComponent("Check out the diagram I made using @drawio")+"&url="+encodeURIComponent(l.value);window.open(b)}catch(p){a.handleError({message:p.message||mxResources.get("drawingTooLarge")})}}),m=document.createElement("img"),m.setAttribute("src",Editor.tweetImage),m.setAttribute("width","18"),m.setAttribute("height","18"),m.setAttribute("border","0"),m.style.marginBottom="5px",k.appendChild(m),k.setAttribute("title", +mxResources.get("twitter")+" ("+a.formatFileSize(7168)+" max)"),k.style.verticalAlign="bottom",k.style.paddingTop="4px",k.style.minWidth="46px",k.className="geBtn",h.appendChild(k))}m=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});h.appendChild(m);k=mxUtils.button(mxResources.get("copy"),function(){l.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?l.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");a.alert(mxResources.get("copiedToClipboard"))}); +5E5>b.length?mxClient.IS_SF||null!=document.documentMode?m.className="geBtn gePrimaryBtn":(h.appendChild(k),k.className="geBtn gePrimaryBtn",m.className="geBtn"):(h.appendChild(e),m.className="geBtn",e.className="geBtn gePrimaryBtn");c.appendChild(h);this.container=c},GoogleSitesDialog=function(a,b){function d(){var a=null!=D.getTitle()?D.getTitle():this.defaultFilename;if(A.checked&&""!=p.value){var b="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(p.value)); +null!=a&&(b+="&title="+encodeURIComponent(a));0JGraph Ltd.
All Rights Reserved.';b.appendChild(d);mxEvent.addListener(b,"click",function(b){"A"!=mxEvent.getSource(b).nodeName&&a.hideDialog()});this.container=b},FeedbackDialog=function(a){var b= +mxUtils.br(b);d=document.createElement("small");d.innerHTML="v "+EditorUi.VERSION;d.style.color="#505050";b.appendChild(d);mxUtils.br(b);mxUtils.br(b);d=document.createElement("small");d.style.color="#505050";d.innerHTML='© 2005-2017 JGraph Ltd.
All Rights Reserved.';b.appendChild(d);mxEvent.addListener(b,"click",function(b){"A"!=mxEvent.getSource(b).nodeName&&a.hideDialog()});this.container=b},FeedbackDialog=function(a){var b= document.createElement("div"),d=document.createElement("div");mxUtils.write(d,mxResources.get("sendYourFeedbackToDrawIo"));d.style.fontSize="18px";d.style.marginBottom="18px";b.appendChild(d);d=document.createElement("div");mxUtils.write(d,mxResources.get("yourEmailAddress")+" ("+mxResources.get("required")+")");b.appendChild(d);var c=document.createElement("input");c.setAttribute("type","text");c.style.marginTop="6px";c.style.width="600px";var f=mxUtils.button(mxResources.get("sendMessage"),function(){var b= (h.checked?"\nDiagram:\n"+a.getFileData():"")+"\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(c.value)+"&version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&body="+encodeURIComponent("Feedback:\n"+e.value+b),function(b){a.spinner.stop(); 200<=b.getStatus()&&299>=b.getStatus()?a.alert(mxResources.get("feedbackSent")):a.alert(mxResources.get("errorSendingFeedback"))},function(){a.spinner.stop();a.alert(mxResources.get("errorSendingFeedback"))}))});f.className="geBtn gePrimaryBtn";f.setAttribute("disabled","disabled");var g=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;mxEvent.addListener(c,"change",function(){0';EditorUi.prototype.emptyLibraryXml="[]";EditorUi.prototype.mode=null;EditorUi.prototype.sidebarFooterHeight= +m.appendChild(k);this.container=m}})();(function(){EditorUi.VERSION="7.4.8";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.enableLogging=/.*\.draw\.io$/.test(window.location.hostname);EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.prototype.emptyDiagramXml='';EditorUi.prototype.emptyLibraryXml="[]";EditorUi.prototype.mode=null;EditorUi.prototype.sidebarFooterHeight= 36;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=520;EditorUi.prototype.resampleThreshold= 1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.printPdfExport=!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var a=document.createElement("canvas"),b=new Image;b.onload=function(){try{a.getContext("2d").drawImage(b,0,0);var c=a.toDataURL("image/png");EditorUi.prototype.useCanvasForExport= null!=c&&6
')))}catch(n){}try{a=document.createElement("canvas");a.width=a.height=1;var c=a.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=null!==c.match("image/jpeg")}catch(n){}})(); @@ -6270,7 +6272,7 @@ null!=e&&(e.style.border="3px dotted lightGray"),k.style.cursor="default",this.s null!=l.graphHandler.hint&&(l.graphHandler.hint.style.visibility="visible"),null!=e&&(e.style.border="3px dotted lightGray"))}));Graph.fileSupport&&(mxEvent.addListener(k,"dragover",mxUtils.bind(this,function(a){null!=e?e.style.border="3px dotted rgb(254, 137, 12)":k.style.border="3px dotted rgb(254, 137, 12)";a.dataTransfer.dropEffect="copy";k.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(k,"drop",mxUtils.bind(this,function(a){k.style.border= "3px solid transparent";k.style.cursor="";null!=e&&(e.style.border="3px dotted lightGray");0=a.status?x(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):x(c,d)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(k,"dragleave",function(a){null!=e?e.style.border="3px dotted lightGray":(k.style.border="3px solid transparent",k.style.cursor="");a.stopPropagation(); a.preventDefault()}));u=u.cloneNode(!1);u.setAttribute("src",IMAGE_PATH+"/edit.gif");u.setAttribute("title",mxResources.get("edit"));g.insertBefore(u,g.firstChild);mxEvent.addListener(u,"click",A);mxEvent.addListener(k,"dblclick",function(a){mxEvent.getSource(a)==k&&A(a)});u=u.cloneNode(!1);u.setAttribute("src",Editor.plusImage);u.setAttribute("title",mxResources.get("add"));g.insertBefore(u,g.firstChild);this.isOffline()||".scratchpad"!=a.title||(c=document.createElement("span"),c.setAttribute("title", mxResources.get("help")),c.style.cssText="color:gray;text-decoration:none;",c.className="geButton",mxUtils.write(c,"?"),mxEvent.addGestureListeners(c,mxUtils.bind(this,function(a){window.open("https://desk.draw.io/support/solutions/articles/16000042367");mxEvent.consume(a)})),g.insertBefore(c,g.firstChild));var y=null;mxEvent.addListener(u,"click",F)}f.appendChild(g);f.style.paddingRight=18*g.childNodes.length+"px"};"1"==urlParams.offline?EditorUi.prototype.footerHeight=4:("atlas"==uiTheme?("undefined"!== @@ -6279,9 +6281,9 @@ typeof Toolbar&&(Toolbar.prototype.unselectedBackground=mxClient.IS_QUIRKS?"none "relative",b.style.styleFloat="right",b.style.top="-30px",b.style.left="164px",b.style.cursor="pointer");mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.hideFooter()}))}return a});EditorUi.prototype.hideFooter=function(){var a=document.getElementById("geFooter");null!=a&&(this.footerHeight=0,a.style.display="none",this.refresh())};EditorUi.prototype.showImageDialog=function(a,b,c,d,f){a=new ImageDialog(this,a,b,c,d,f);this.showDialog(a.container,Graph.fileSupport?440:360,Graph.fileSupport? 200:90,!0,!0);a.init()};EditorUi.prototype.showBackgroundImageDialog=function(a){a=null!=a?a:mxUtils.bind(this,function(a){a=new ChangePageSetup(this,null,a);a.ignoreColor=!0;this.editor.graph.model.execute(a)});var b=new BackgroundImageDialog(this,mxUtils.bind(this,function(b){a(b)}));this.showDialog(b.container,360,200,!0,!0);b.init()};EditorUi.prototype.showLibraryDialog=function(a,b,c,d,f){a=new LibraryDialog(this,a,b,c,d,f);this.showDialog(a.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&& null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));a.init()};EditorUi.prototype.createSidebarFooterContainer=function(){var a=this.createDiv("geSidebarContainer");a.style.position="absolute";a.style.overflow="hidden";a.style.borderWidth="3px";var b=document.createElement("a");b.setAttribute("href","javascript:void(0);");b.className="geTitle";b.style.height="100%";b.style.paddingTop="9px";mxUtils.write(b,mxResources.get("moreShapes")+"...");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){var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},e=null!=a&&null!=a.error?a.error:a;if(null!=e||null!=b){a=mxUtils.htmlEntities(mxResources.get("unknownError"));var f=mxResources.get("ok"),k=null;b=null!=b?b:mxResources.get("error");if(null!=e)if(null!=e.retry&&(f=mxResources.get("cancel"),k=function(){d();e.retry()}),"undefined"!= +function(a){this.actions.get("shapes").funct();mxEvent.consume(a)}));a.appendChild(b);return a};EditorUi.prototype.handleError=function(a,b,c){var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},e=null!=a&&null!=a.error?a.error:a;if(null!=e||null!=b){a=mxUtils.htmlEntities(mxResources.get("unknownError"));var k=mxResources.get("ok"),f=null;b=null!=b?b:mxResources.get("error");if(null!=e)if(null!=e.retry&&(k=mxResources.get("cancel"),f=function(){d();e.retry()}),"undefined"!= typeof gapi&&"undefined"!=typeof gapi.drive&&"undefined"!=typeof gapi.drive.realtime&&e.type==gapi.drive.realtime.ErrorType.FORBIDDEN)a=mxUtils.htmlEntities(mxResources.get("forbidden"));else if(404==e.code||404==e.status||"undefined"!=typeof gapi&&"undefined"!=typeof gapi.drive&&"undefined"!=typeof gapi.drive.realtime&&e.type==gapi.drive.realtime.ErrorType.NOT_FOUND){a=mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied"));var m=window.location.hash;null!=m&&"#G"==m.substring(0,2)&&(m=m.substring(2), -a+=' '+mxUtils.htmlEntities(mxResources.get("tryOpeningViaThisPage"))+"")}else e.code==App.ERROR_TIMEOUT?a=mxUtils.htmlEntities(mxResources.get("timeout")):e.code==App.ERROR_BUSY?a=mxUtils.htmlEntities(mxResources.get("busy")):null!=e.message?a=mxUtils.htmlEntities(e.message):null!=e.response&&null!=e.response.error&&(a=mxUtils.htmlEntities(e.response.error));this.showError(b,a,f,c,k)}else null!=c&&c()};EditorUi.prototype.showError= +a+=' '+mxUtils.htmlEntities(mxResources.get("tryOpeningViaThisPage"))+"")}else e.code==App.ERROR_TIMEOUT?a=mxUtils.htmlEntities(mxResources.get("timeout")):e.code==App.ERROR_BUSY?a=mxUtils.htmlEntities(mxResources.get("busy")):null!=e.message?a=mxUtils.htmlEntities(e.message):null!=e.response&&null!=e.response.error&&(a=mxUtils.htmlEntities(e.response.error));this.showError(b,a,k,c,f)}else null!=c&&c()};EditorUi.prototype.showError= function(a,b,c,d,f,g,h){a=new ErrorDialog(this,a,b,c,d,f,g,h);this.showDialog(a.container,340,150,!0,!1);a.init()};EditorUi.prototype.alert=function(a,b){var c=new ErrorDialog(this,null,a,mxResources.get("ok"),b);this.showDialog(c.container,340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(a,b,c,d,f){var e=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){};this.showDialog((new ConfirmDialog(this,a,function(){e();null!=b&&b()},function(){e();null!=c&&c()},d,f)).container, 340,90,!0,!1)};EditorUi.prototype.setCurrentFile=function(a){this.currentFile=a};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isDiagramEmpty=function(){var a=this.editor.graph.getModel();return 1==a.getChildCount(a.root)&&0==a.getChildCount(a.getChildAt(a.root,0))};EditorUi.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||!this.editor.graph.mathEnabled&&this.useCanvasForExport};EditorUi.prototype.createSvgDataUri=function(a){return"data:image/svg+xml;base64,"+ btoa(unescape(encodeURIComponent(a)))};EditorUi.prototype.createImageDataUri=function(a,b,c){var d=a.toDataURL("image/"+c);if(6>=d.length||d==a.cloneNode(!1).toDataURL("image/"+c))throw{message:"Invalid image"};null!=b&&(d=this.writeGraphModelToPng(d,"zTXt","mxGraphModel",atob(this.editor.graph.compress(b))));return d};EditorUi.prototype.saveCanvas=function(a,b,c){var d="jpeg"==c?"jpg":c,e=this.getBaseFilename()+"."+d;a=this.createImageDataUri(a,b,c);this.saveData(e,d,a.substring(a.lastIndexOf(",")+ @@ -6416,67 +6418,66 @@ null!=this.hoverIcons&&this.hoverIcons.update(d.view.getState(d.getSelectionCell 10document.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.getStatus()&&this.openLocalFile(a.getText(),null,!0)})):/^https?:\/\//.test(c)&&(null==this.getCurrentFile()?window.location.hash= -"#U"+encodeURIComponent(c):window.openWindow((mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(c)))))}else this.openLocalFile(c,null,!0)}a.stopPropagation();a.preventDefault()}))};EditorUi.prototype.highlightElement=function(a){console.trace("here");var b=0,c=0,d,e;if(null==a){e=document.body;var f=document.documentElement;d=(e.clientWidth||f.clientWidth)-3;e=Math.max(e.clientHeight||0,f.clientHeight)-3}else b=a.offsetTop,c= -a.offsetLeft,d=a.clientWidth,e=a.clientHeight;f=document.createElement("div");f.style.zIndex=mxPopupMenu.prototype.zIndex+2;f.style.border="3px dotted rgb(254, 137, 12)";f.style.pointerEvents="none";f.style.position="absolute";f.style.top=b+"px";f.style.left=c+"px";f.style.width=Math.max(0,d-3)+"px";f.style.height=Math.max(0,e-3)+"px";null!=a&&a.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(f):document.body.appendChild(f);return f};EditorUi.prototype.stringToCells= -function(a){a=mxUtils.parseXml(a);var b=this.editor.extractGraphModel(a.documentElement);a=[];if(null!=b){var c=new mxCodec(b.ownerDocument),d=new mxGraphModel;c.decode(b,d);b=d.getChildAt(d.getRoot(),0);for(c=0;c=a.status)if(a=a.responseText,"=a.getStatus()?q("data:image/png;base64,"+a.getText()):t(null)}),mxUtils.bind(this,function(){t(null)}))}}else{null!=h.xml&&0mxUtils.indexOf(c,a)};this.executeLayout(function(){da.execute(z.getDefaultParent());fa()},!0,A);A=null}else if("horizontaltree"==E||"verticaltree"==E||"auto"==E&&T.length==2*c.length-1&&1==Q.length){z.view.validate();var Y=new mxCompactTreeLayout(z,"horizontaltree"==E);Y.levelDistance=u;Y.edgeRouting=!1;Y.resetEdges=!1;this.executeLayout(function(){Y.execute(z.getDefaultParent(), -0c.length){z.view.validate();var Z=new mxFastOrganicLayout(z);Z.forceConstant=3*u; -Z.resetEdges=!1;var ia=Z.isVertexIgnored;Z.isVertexIgnored=function(a){return ia.apply(this,arguments)||0>mxUtils.indexOf(c,a)};ca=new mxParallelEdgeLayout(z);ca.spacing=l;this.executeLayout(function(){Z.execute(z.getDefaultParent());fa()},!0,A);A=null}this.hideDialog()}finally{z.model.endUpdate()}null!=A&&A()}}catch(ja){this.handleError(ja)}};EditorUi.prototype.getSearch=function(a){var b="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=a&&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=0mxUtils.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,420,120,!0,!0);a.init()};var h=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=h.apply(this,arguments),c=this.editor.graph,d=b.getSourceGraphBounds;b.getSourceGraphBounds=function(){if(mxUtils.hasScrollbars(c.container)&&c.pageVisible&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0, -0,Math.ceil(this.source.minimumGraphSize.width-2*a.x/b),Math.ceil(this.source.minimumGraphSize.height-2*a.y/b))}return d.apply(this,arguments)};var f=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 f.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 e=b.init;b.init=function(){e.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){var b=0;null==this.drive&&"function"!==typeof window.DriveClient||b++;null==this.dropbox&&"function"!==typeof window.DropboxClient||b++;null==this.oneDrive&& -"function"!==typeof window.OneDriveClient||b++;null!=this.gitHub&&b++;null==this.trello&&"function"!==typeof window.TrelloClient||b++;a&&isLocalStorage&&("1"==urlParams.browser||mxClient.IS_IOS)&&b++;mxClient.IS_IOS||b++;return b};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var a=this.getCurrentFile(),b=null!=a||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(b);this.menus.get("viewZoom").setEnabled(b);var c= -("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==a||a.isRestricted());this.actions.get("makeCopy").setEnabled(!c);this.actions.get("print").setEnabled(!c);this.menus.get("exportAs").setEnabled(!c);this.menus.get("embed").setEnabled(!c);c="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("openLibraryFrom").setEnabled(c);this.menus.get("newLibrary").setEnabled(c);this.menus.get("extras").setEnabled(c);a="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=a&&a.isEditable(); -this.actions.get("image").setEnabled(b);this.actions.get("zoomIn").setEnabled(b);this.actions.get("zoomOut").setEnabled(b);this.actions.get("resetView").setEnabled(b);this.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.isOfflineApp()){var d= -applicationCache;if(null!=d&&null==this.offlineStatus){this.offlineStatus=document.createElement("div");this.offlineStatus.className="geItem";this.offlineStatus.style.position="absolute";this.offlineStatus.style.fontSize="8pt";this.offlineStatus.style.top="2px";this.offlineStatus.style.right="12px";this.offlineStatus.style.color="#666";this.offlineStatus.style.margin="4px";this.offlineStatus.style.padding="2px";this.offlineStatus.style.verticalAlign="middle";this.offlineStatus.innerHTML="";this.menubarContainer.appendChild(this.offlineStatus); -mxEvent.addListener(this.offlineStatus,"click",mxUtils.bind(this,function(){var a=this.offlineStatus.getElementsByTagName("img");null!=a&&0';break;case d.DOWNLOADING:b='';break;case d.UPDATEREADY:b='';break;case d.OBSOLETE:b='';break;default:b=''}a!=f&&(this.offlineStatus.innerHTML=b,f=a)});mxEvent.addListener(d,"checking",b);mxEvent.addListener(d,"noupdate",b);mxEvent.addListener(d,"downloading", -b);mxEvent.addListener(d,"progress",b);mxEvent.addListener(d,"cached",b);mxEvent.addListener(d,"updateready",b);mxEvent.addListener(d,"obsolete",b);mxEvent.addListener(d,"error",b);b()}}else this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};var l=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){l.apply(this,arguments);var a=this.editor.graph,b=this.getCurrentFile(),c=null!=b&&b.isEditable()|| -"1"==urlParams.embed&&this.editor.graph.isEnabled();this.actions.get("pageSetup").setEnabled(c);this.actions.get("autosave").setEnabled(null!=b&&b.isEditable()&&b.isAutosaveOptional());this.actions.get("guides").setEnabled(c);this.actions.get("editData").setEnabled(c);this.actions.get("shadowVisible").setEnabled(c);this.actions.get("connectionArrows").setEnabled(c);this.actions.get("connectionPoints").setEnabled(c);this.actions.get("copyStyle").setEnabled(c&&!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(c&& -!a.isSelectionEmpty());this.actions.get("editGeometry").setEnabled(a.getModel().isVertex(a.getSelectionCell()));this.actions.get("createShape").setEnabled(c);this.actions.get("createRevision").setEnabled(c);this.actions.get("moveToFolder").setEnabled(null!=b);this.actions.get("makeCopy").setEnabled(null!=b&&!b.isRestricted());this.actions.get("editDiagram").setEnabled("1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=b&&!b.isRestricted());this.actions.get("publishLink").setEnabled(null!= -b&&!b.isRestricted());this.actions.get("tags").setEnabled("1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=b&&!b.isRestricted());this.actions.get("close").setEnabled(null!=b);this.menus.get("publish").setEnabled(null!=b&&!b.isRestricted());a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(c&&null!=a&&null!=a.shape&&null!=a.shape.stencil)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a, -b,c,d,f,g){var e=a.editor.graph;if("xml"==c)a.hideDialog(),a.saveData(b,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("svg"==c)a.hideDialog(),a.saveData(b,"svg",mxUtils.getXml(e.getSvg(d,f,g)),"image/svg+xml");else{var h=a.getFileData(!0,null,null,null,null,!0),l=e.getGraphBounds(),k=Math.floor(l.width*f/e.view.scale),m=Math.floor(l.height*f/e.view.scale);h.length<=MAX_REQUEST_SIZE&&k*mscreen.width?"0":"240",key:".drawio-config",getLanguage:function(){return mxSettings.settings.language},setLanguage:function(a){mxSettings.settings.language=a},getUi:function(){return mxSettings.settings.ui},setUi:function(a){mxSettings.settings.ui=a},getShowStartScreen:function(){return mxSettings.settings.showStartScreen},setShowStartScreen:function(a){mxSettings.settings.showStartScreen=a},getGridColor:function(){return mxSettings.settings.gridColor}, +"#U"+encodeURIComponent(c):window.openWindow((mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(c)))))}else this.openLocalFile(c,null,!0)}a.stopPropagation();a.preventDefault()}))};EditorUi.prototype.highlightElement=function(a){var b=0,c=0,d,e;if(null==a){e=document.body;var f=document.documentElement;d=(e.clientWidth||f.clientWidth)-3;e=Math.max(e.clientHeight||0,f.clientHeight)-3}else b=a.offsetTop,c=a.offsetLeft,d=a.clientWidth, +e=a.clientHeight;f=document.createElement("div");f.style.zIndex=mxPopupMenu.prototype.zIndex+2;f.style.border="3px dotted rgb(254, 137, 12)";f.style.pointerEvents="none";f.style.position="absolute";f.style.top=b+"px";f.style.left=c+"px";f.style.width=Math.max(0,d-3)+"px";f.style.height=Math.max(0,e-3)+"px";null!=a&&a.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(f):document.body.appendChild(f);return f};EditorUi.prototype.stringToCells=function(a){a=mxUtils.parseXml(a); +var b=this.editor.extractGraphModel(a.documentElement);a=[];if(null!=b){var c=new mxCodec(b.ownerDocument),d=new mxGraphModel;c.decode(b,d);b=d.getChildAt(d.getRoot(),0);for(c=0;c=a.status)if(a=a.responseText,"=a.getStatus()?q("data:image/png;base64,"+a.getText()):t(null)}),mxUtils.bind(this,function(){t(null)}))}}else{null!=h.xml&&0mxUtils.indexOf(c,a)};this.executeLayout(function(){da.execute(z.getDefaultParent()); +fa()},!0,A);A=null}else if("horizontaltree"==E||"verticaltree"==E||"auto"==E&&T.length==2*c.length-1&&1==Q.length){z.view.validate();var Y=new mxCompactTreeLayout(z,"horizontaltree"==E);Y.levelDistance=u;Y.edgeRouting=!1;Y.resetEdges=!1;this.executeLayout(function(){Y.execute(z.getDefaultParent(),0c.length){z.view.validate();var Z=new mxFastOrganicLayout(z);Z.forceConstant=3*u;Z.resetEdges=!1;var ia=Z.isVertexIgnored;Z.isVertexIgnored=function(a){return ia.apply(this,arguments)||0>mxUtils.indexOf(c,a)};ca=new mxParallelEdgeLayout(z);ca.spacing=l;this.executeLayout(function(){Z.execute(z.getDefaultParent()); +fa()},!0,A);A=null}this.hideDialog()}finally{z.model.endUpdate()}null!=A&&A()}}catch(ja){this.handleError(ja)}};EditorUi.prototype.getSearch=function(a){var b="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=a&&0mxUtils.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=0mxUtils.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,420,120,!0,!0);a.init()};var h=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b= +h.apply(this,arguments),c=this.editor.graph,d=b.getSourceGraphBounds;b.getSourceGraphBounds=function(){if(mxUtils.hasScrollbars(c.container)&&c.pageVisible&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width-2*a.x/b),Math.ceil(this.source.minimumGraphSize.height-2*a.y/b))}return d.apply(this,arguments)};var f=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 f.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 e=b.init;b.init=function(){e.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){var b=0;null==this.drive&&"function"!==typeof window.DriveClient||b++;null==this.dropbox&&"function"!==typeof window.DropboxClient||b++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||b++;null!=this.gitHub&&b++;null==this.trello&&"function"!==typeof window.TrelloClient||b++;a&&isLocalStorage&&("1"==urlParams.browser||mxClient.IS_IOS)&&b++;mxClient.IS_IOS||b++;return b};EditorUi.prototype.updateUi= +function(){this.updateButtonContainer();this.updateActionStates();var a=this.getCurrentFile(),b=null!=a||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(b);this.menus.get("viewZoom").setEnabled(b);var c=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==a||a.isRestricted());this.actions.get("makeCopy").setEnabled(!c);this.actions.get("print").setEnabled(!c);this.menus.get("exportAs").setEnabled(!c);this.menus.get("embed").setEnabled(!c);c="1"!= +urlParams.embed||this.editor.graph.isEnabled();this.menus.get("openLibraryFrom").setEnabled(c);this.menus.get("newLibrary").setEnabled(c);this.menus.get("extras").setEnabled(c);a="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=a&&a.isEditable();this.actions.get("image").setEnabled(b);this.actions.get("zoomIn").setEnabled(b);this.actions.get("zoomOut").setEnabled(b);this.actions.get("resetView").setEnabled(b);this.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.isOfflineApp()){var d=applicationCache;if(null!=d&&null==this.offlineStatus){this.offlineStatus=document.createElement("div");this.offlineStatus.className="geItem";this.offlineStatus.style.position="absolute";this.offlineStatus.style.fontSize="8pt";this.offlineStatus.style.top="2px"; +this.offlineStatus.style.right="12px";this.offlineStatus.style.color="#666";this.offlineStatus.style.margin="4px";this.offlineStatus.style.padding="2px";this.offlineStatus.style.verticalAlign="middle";this.offlineStatus.innerHTML="";this.menubarContainer.appendChild(this.offlineStatus);mxEvent.addListener(this.offlineStatus,"click",mxUtils.bind(this,function(){var a=this.offlineStatus.getElementsByTagName("img");null!=a&&0';break;case d.DOWNLOADING:b='';break;case d.UPDATEREADY:b='';break; +case d.OBSOLETE:b='';break;default:b=''}a!=f&&(this.offlineStatus.innerHTML=b,f=a)});mxEvent.addListener(d,"checking",b);mxEvent.addListener(d,"noupdate",b);mxEvent.addListener(d,"downloading",b);mxEvent.addListener(d,"progress",b);mxEvent.addListener(d,"cached",b);mxEvent.addListener(d,"updateready",b);mxEvent.addListener(d,"obsolete",b);mxEvent.addListener(d,"error",b); +b()}}else this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};var l=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){l.apply(this,arguments);var a=this.editor.graph,b=this.getCurrentFile(),c=null!=b&&b.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.actions.get("pageSetup").setEnabled(c);this.actions.get("autosave").setEnabled(null!=b&&b.isEditable()&&b.isAutosaveOptional()); +this.actions.get("guides").setEnabled(c);this.actions.get("editData").setEnabled(c);this.actions.get("shadowVisible").setEnabled(c);this.actions.get("connectionArrows").setEnabled(c);this.actions.get("connectionPoints").setEnabled(c);this.actions.get("copyStyle").setEnabled(c&&!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(c&&!a.isSelectionEmpty());this.actions.get("editGeometry").setEnabled(a.getModel().isVertex(a.getSelectionCell()));this.actions.get("createShape").setEnabled(c); +this.actions.get("createRevision").setEnabled(c);this.actions.get("moveToFolder").setEnabled(null!=b);this.actions.get("makeCopy").setEnabled(null!=b&&!b.isRestricted());this.actions.get("editDiagram").setEnabled("1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=b&&!b.isRestricted());this.actions.get("publishLink").setEnabled(null!=b&&!b.isRestricted());this.actions.get("tags").setEnabled("1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=b&&!b.isRestricted());this.actions.get("close").setEnabled(null!= +b);this.menus.get("publish").setEnabled(null!=b&&!b.isRestricted());a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(c&&null!=a&&null!=a.shape&&null!=a.shape.stencil)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,b,c,d,f,g){var e=a.editor.graph;if("xml"==c)a.hideDialog(),a.saveData(b,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("svg"==c)a.hideDialog(),a.saveData(b,"svg", +mxUtils.getXml(e.getSvg(d,f,g)),"image/svg+xml");else{var h=a.getFileData(!0,null,null,null,null,!0),l=e.getGraphBounds(),k=Math.floor(l.width*f/e.view.scale),m=Math.floor(l.height*f/e.view.scale);h.length<=MAX_REQUEST_SIZE&&k*mscreen.width?"0":"240",key:".drawio-config",getLanguage:function(){return mxSettings.settings.language},setLanguage:function(a){mxSettings.settings.language=a},getUi:function(){return mxSettings.settings.ui},setUi:function(a){mxSettings.settings.ui=a},getShowStartScreen:function(){return mxSettings.settings.showStartScreen},setShowStartScreen:function(a){mxSettings.settings.showStartScreen=a},getGridColor:function(){return mxSettings.settings.gridColor}, setGridColor:function(a){mxSettings.settings.gridColor=a},getAutosave:function(){return mxSettings.settings.autosave},setAutosave:function(a){mxSettings.settings.autosave=a},getResizeImages:function(){return mxSettings.settings.resizeImages},setResizeImages:function(a){mxSettings.settings.resizeImages=a},getOpenCounter:function(){return mxSettings.settings.openCounter},setOpenCounter:function(a){mxSettings.settings.openCounter=a},getLibraries:function(){return mxSettings.settings.libraries},setLibraries:function(a){mxSettings.settings.libraries= a},addCustomLibrary:function(a){mxSettings.load();0>mxUtils.indexOf(mxSettings.settings.customLibraries,a)&&("L.scratchpad"===a?mxSettings.settings.customLibraries.splice(0,0,a):mxSettings.settings.customLibraries.push(a));mxSettings.save()},removeCustomLibrary:function(a){mxSettings.load();mxUtils.remove(a,mxSettings.settings.customLibraries);mxSettings.save()},getCustomLibraries:function(){return mxSettings.settings.customLibraries},getPlugins:function(){return mxSettings.settings.plugins},setPlugins:function(a){mxSettings.settings.plugins= a},getRecentColors:function(){return mxSettings.settings.recentColors},setRecentColors:function(a){mxSettings.settings.recentColors=a},getFormatWidth:function(){return parseInt(mxSettings.settings.formatWidth)},setFormatWidth:function(a){mxSettings.settings.formatWidth=a},getCurrentEdgeStyle:function(){return mxSettings.settings.currentEdgeStyle},setCurrentEdgeStyle:function(a){mxSettings.settings.currentEdgeStyle=a},getCurrentVertexStyle:function(){return mxSettings.settings.currentVertexStyle}, @@ -6867,17 +6868,18 @@ App.prototype.load=function(){if("1"!=urlParams.embed){if(this.spinner.spin(docu App.prototype.showAlert=function(a){if(null!=a&&0=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)){var a=window.opener||window.parent;a!=window&&this.installMessageHandler(mxUtils.bind(this,function(b,c){if(c.source==a){"data:image/png;base64,"==b.substring(0,22)&&(b=this.extractGraphModelFromPng(b)); -var d=urlParams.title,d=null!=d?decodeURIComponent(d):this.defaultFilename;this.fileLoaded(new LocalFile(this,b,d,!0));this.getCurrentFile().setModified(!this.editor.chromeless)}}))}else if(null==this.dialog)if("1"==urlParams.demo){var b=Editor.useLocalStorage;this.createFile(this.defaultFilename,null,null,null,null,null,null,!0);Editor.useLocalStorage=b}else{b=!1;try{b=null!=window.opener&&null!=window.opener.openFile}catch(e){}if(b)this.spinner.spin(document.body,mxResources.get("loading"));else if(b= -this.getDiagramId(),"0"!=urlParams.splash||null!=b&&0!=b.length)this.loadFile(this.getDiagramId());else{var c=this.getDraft(),d=null!=c?c.data:this.getFileData(),b=Editor.useLocalStorage;this.createFile(this.defaultFilename,d,null,null,null,null,null,!0);Editor.useLocalStorage=b;null!=c&&(b=this.getCurrentFile(),null!=b&&b.addUnsavedStatus())}}});null!=this.drive&&this.defineCustomObjects();var b=decodeURIComponent(urlParams.create||"");if((null==window.location.hash||1>=window.location.hash.length)&& -null!=b&&0=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(0c?390:270,!0,!1,mxUtils.bind(this,function(a){a&&null==this.getCurrentFile()&& -this.showSplash()}));b.init()}}),b=decodeURIComponent(b);if("http://"!=b.substring(0,7)&&"https://"!=b.substring(0,8))try{null!=window.opener&&null!=window.opener[b]?c(window.opener[b]):this.handleError(null,mxResources.get("errorLoadingFile"))}catch(f){this.handleError(f,mxResources.get("errorLoadingFile"))}else this.loadTemplate(b,function(a){c(a)},mxUtils.bind(this,function(){this.handleError(null,mxResources.get("errorLoadingFile"),d)}))}else(null==window.location.hash||1>=window.location.hash.length)&& -null!=urlParams.state&&null!=this.stateArg&&"open"==this.stateArg.action&&null!=this.stateArg.ids&&(window.location.hash="G"+this.stateArg.ids[0]),(null==window.location.hash||1>=window.location.hash.length)&&null!=this.drive&&null!=this.stateArg&&"create"==this.stateArg.action?(this.setMode(App.MODE_GOOGLE),this.actions.get("new").funct()):a()}}catch(f){this.handleError(f)}}; +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=window.opener||window.parent;a!=window&&this.installMessageHandler(mxUtils.bind(this,function(b,c){if(c.source==a){"data:image/png;base64,"==b.substring(0, +22)&&(b=this.extractGraphModelFromPng(b));var d=urlParams.title,d=null!=d?decodeURIComponent(d):this.defaultFilename,d=new LocalFile(this,b,d,!0);null!=window.location.hash&&"#P"==window.location.hash.substring(0,2)&&(d.getHash=function(){return window.location.hash.substring(1)});this.fileLoaded(d);this.getCurrentFile().setModified(!this.editor.chromeless)}}))}else if(null==this.dialog)if("1"==urlParams.demo){var b=Editor.useLocalStorage;this.createFile(this.defaultFilename,null,null,null,null,null, +null,!0);Editor.useLocalStorage=b}else{b=!1;try{b=null!=window.opener&&null!=window.opener.openFile}catch(e){}if(b)this.spinner.spin(document.body,mxResources.get("loading"));else if(b=this.getDiagramId(),"0"!=urlParams.splash||null!=b&&0!=b.length)this.loadFile(this.getDiagramId());else{var c=this.getDraft(),d=null!=c?c.data:this.getFileData(),b=Editor.useLocalStorage;this.createFile(this.defaultFilename,d,null,null,null,null,null,!0);Editor.useLocalStorage=b;null!=c&&(b=this.getCurrentFile(),null!= +b&&b.addUnsavedStatus())}}});null!=this.drive&&this.defineCustomObjects();var b=decodeURIComponent(urlParams.create||"");if((null==window.location.hash||1>=window.location.hash.length)&&null!=b&&0=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(0c?390:270,!0,!1,mxUtils.bind(this,function(a){a&&null==this.getCurrentFile()&&this.showSplash()}));b.init()}}),b=decodeURIComponent(b);if("http://"!=b.substring(0,7)&&"https://"!=b.substring(0,8))try{null!=window.opener&&null!=window.opener[b]?c(window.opener[b]):this.handleError(null,mxResources.get("errorLoadingFile"))}catch(f){this.handleError(f,mxResources.get("errorLoadingFile"))}else this.loadTemplate(b,function(a){c(a)},mxUtils.bind(this, +function(){this.handleError(null,mxResources.get("errorLoadingFile"),d)}))}else(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.state&&null!=this.stateArg&&"open"==this.stateArg.action&&null!=this.stateArg.ids&&(window.location.hash="G"+this.stateArg.ids[0]),(null==window.location.hash||1>=window.location.hash.length)&&null!=this.drive&&null!=this.stateArg&&"create"==this.stateArg.action?(this.setMode(App.MODE_GOOGLE),this.actions.get("new").funct()):a()}}catch(f){this.handleError(f)}}; App.prototype.showSplash=function(a){var b=this.getServiceCount(!1)+1,d=mxUtils.bind(this,function(){var a=new SplashDialog(this);this.showDialog(a.container,340,2>b||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?200:260,!0,!0,mxUtils.bind(this,function(a){a&&!mxClient.IS_CHROMEAPP&&(a=Editor.useLocalStorage,this.createFile(this.defaultFilename,null,null,null,null,null,null,"1"!=urlParams.local),Editor.useLocalStorage=a)}))});if(this.editor.chromeless)this.handleError({message:mxResources.get("noFileSelected")}, mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){this.showSplash()}));else if(null==this.mode||a){a=4>=b?2:3;var c=new StorageDialog(this,mxUtils.bind(this,function(){this.hideDialog();d()}),a);this.showDialog(c.container,3>a?260:300,b>a?420:300,!0,!1);c.init()}else null==urlParams.create&&d()}; -App.prototype.addLanguageMenu=function(a){var b=null;this.isOfflineApp()&&!mxClient.IS_CHROMEAPP||null==this.menus.get("language")||(b=document.createElement("div"),b.setAttribute("title",mxResources.get("language")),b.className="geIcon geSprite geSprite-globe",b.style.position="absolute",b.style.cursor="pointer",b.style.bottom="20px",b.style.right="20px",mxEvent.addListener(b,"click",mxUtils.bind(this,function(a){this.editor.graph.popupMenuHandler.hideMenu();var c=new mxPopupMenu(this.menus.get("language").funct); -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(b);c.popup(d.x,d.y+b.offsetHeight,null,a);this.setCurrentMenu(c)})),a.appendChild(b));return b}; +App.prototype.addLanguageMenu=function(a,b){var d=null;if((!this.isOfflineApp()||mxClient.IS_CHROMEAPP)&&null!=this.menus.get("language")){d=document.createElement("div");d.setAttribute("title",mxResources.get("language"));d.className="geIcon geSprite geSprite-globe";d.style.position="absolute";d.style.cursor="pointer";d.style.bottom="20px";d.style.right="20px";if(b){d.style.direction="rtl";d.style.textAlign="right";d.style.right="24px";var c=document.createElement("span");c.style.display="inline-block"; +c.style.fontSize="12px";c.style.margin="5px 24px 0 0";c.style.color="gray";mxUtils.write(c,mxResources.get("language"));d.appendChild(c)}mxEvent.addListener(d,"click",mxUtils.bind(this,function(a){this.editor.graph.popupMenuHandler.hideMenu();var b=new mxPopupMenu(this.menus.get("language").funct);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 c=mxUtils.getOffset(d); +b.popup(c.x,c.y+d.offsetHeight,null,a);this.setCurrentMenu(b)}));a.appendChild(d)}return d}; App.prototype.defineCustomObjects=function(){null!=gapi.drive.realtime&&null!=gapi.drive.realtime.custom&&(gapi.drive.realtime.custom.registerType(mxRtCell,"Cell"),mxRtCell.prototype.cellId=gapi.drive.realtime.custom.collaborativeField("cellId"),mxRtCell.prototype.type=gapi.drive.realtime.custom.collaborativeField("type"),mxRtCell.prototype.value=gapi.drive.realtime.custom.collaborativeField("value"),mxRtCell.prototype.xmlValue=gapi.drive.realtime.custom.collaborativeField("xmlValue"),mxRtCell.prototype.style= gapi.drive.realtime.custom.collaborativeField("style"),mxRtCell.prototype.geometry=gapi.drive.realtime.custom.collaborativeField("geometry"),mxRtCell.prototype.visible=gapi.drive.realtime.custom.collaborativeField("visible"),mxRtCell.prototype.collapsed=gapi.drive.realtime.custom.collaborativeField("collapsed"),mxRtCell.prototype.connectable=gapi.drive.realtime.custom.collaborativeField("connectable"),mxRtCell.prototype.parent=gapi.drive.realtime.custom.collaborativeField("parent"),mxRtCell.prototype.children= gapi.drive.realtime.custom.collaborativeField("children"),mxRtCell.prototype.source=gapi.drive.realtime.custom.collaborativeField("source"),mxRtCell.prototype.target=gapi.drive.realtime.custom.collaborativeField("target"))};mxRtCell=function(){};mxCodecRegistry.getCodec(mxCell).exclude.push("rtCell");mxCell.prototype.mxTransient.push("rtCell"); @@ -6896,8 +6898,8 @@ function(){d.save(!0,mxUtils.bind(this,function(a){this.spinner.stop();this.hide App.prototype.saveFile=function(a){var b=this.getCurrentFile();if(null!=b){var d=mxUtils.bind(this,function(){this.removeDraft();b.getMode()!=App.MODE_DEVICE?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved"))):this.editor.setStatus("")});if(a||null==b.getTitle()||null==this.mode){var c=null!=b.getTitle()?b.getTitle():this.defaultFilename,f=!mxClient.IS_IOS||!navigator.standalone,g=this.mode;a=this.getServiceCount(!0);isLocalStorage&&a++;var h=4>=a?2:6a.indexOf("."),/(\.svg)$/i.test(a), /(\.html)$/i.test(a)),null,b,d,null==this.mode,c)}),b!==App.MODE_GITHUB):null!=b&&this.save(a,d))}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),null,null,f,this.isOffline()?null:"https://desk.draw.io/support/solutions/articles/16000042485",!0,h);this.showDialog(c.container,460,a>h?390:270,!0,!0);c.init()}else this.save(b.getTitle(),d)}}; -EditorUi.prototype.loadTemplate=function(a,b,d){var c=a;this.isCorsEnabledForUrl(c)||(c=PROXY_URL+"?url="+encodeURIComponent(a));this.loadUrl(c,mxUtils.bind(this,function(c){!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,a)?this.parseFile(new Blob([c],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&"=a.status&&"= -c.getStatus())try{this.loadLibrary(new UrlLibrary(this,c.getText(),f)),delete this.pendingLibraries[b]}catch(n){a(b)}else a(b)}),function(){a(b)}))}else{var g=null;"G"==c?null!=this.drive&&null!=this.drive.user&&(g=this.drive):"H"==c?null!=this.gitHub&&null!=this.gitHub.getUser()&&(g=this.gitHub):"T"==c?null!=this.trello&&this.trello.isAuthorized()&&(g=this.trello):"D"==c?null!=this.dropbox&&null!=this.dropbox.getUser()&&(g=this.dropbox):"W"==c&&null!=this.oneDrive&&null!=this.oneDrive.getUser()&& +1);if("L"==c){if(isLocalStorage||mxClient.IS_CHROMEAPP)try{var d=decodeURIComponent(b.substring(1));this.getLocalData(d,mxUtils.bind(this,function(c){".scratchpad"==d&&null==c&&(c=this.emptyLibraryXml);null!=c?this.loadLibrary(new StorageLibrary(this,c,d)):a(b)}))}catch(k){a(b)}}else if("U"==c){var f=decodeURIComponent(b.substring(1));this.isOffline()||(c=f,this.isCorsEnabledForUrl(c)||(c="t="+(new Date).getTime(),c=PROXY_URL+"?url="+encodeURIComponent(f)+"&"+c),mxUtils.get(c,mxUtils.bind(this,function(c){if(200<= +c.getStatus()&&299>=c.getStatus())try{this.loadLibrary(new UrlLibrary(this,c.getText(),f)),delete this.pendingLibraries[b]}catch(n){a(b)}else a(b)}),function(){a(b)}))}else{var g=null;"G"==c?null!=this.drive&&null!=this.drive.user&&(g=this.drive):"H"==c?null!=this.gitHub&&null!=this.gitHub.getUser()&&(g=this.gitHub):"T"==c?null!=this.trello&&this.trello.isAuthorized()&&(g=this.trello):"D"==c?null!=this.dropbox&&null!=this.dropbox.getUser()&&(g=this.dropbox):"W"==c&&null!=this.oneDrive&&null!=this.oneDrive.getUser()&& (g=this.oneDrive);null!=g?g.getLibrary(decodeURIComponent(b.substring(1)),mxUtils.bind(this,function(c){try{this.loadLibrary(c),delete this.pendingLibraries[b]}catch(n){a(b)}}),function(c){a(b)}):delete this.pendingLibraries[b]}}})(d)}});b(mxSettings.getCustomLibraries());b((urlParams.clibs||"").split(";"))}}; App.prototype.updateButtonContainer=function(){if(null!=this.buttonContainer){var a=this.getCurrentFile();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",a=document.createElement("img"),a.setAttribute("src",this.shareImage),a.setAttribute("align","absmiddle"),a.style.marginRight="4px",a.style.marginTop="-3px",this.shareButton.appendChild(a),mxUtils.write(this.shareButton,mxResources.get("share")),mxEvent.addListener(this.shareButton,"click",mxUtils.bind(this,function(){this.actions.get("share").funct()})),this.buttonContainer.appendChild(this.shareButton)):null!=this.shareButton&&(this.shareButton.parentNode.removeChild(this.shareButton), @@ -6982,7 +6984,7 @@ d.getSelectionCells(),c=[],e=0;emxUtils.indexOf(k,this.model.getTerminal(k[m],!0))&&this.model.setTerminal(k[m],l,!0);else if(b(a[m])&&(n=q.getIncomingEdges(a[m]),0mxUtils.indexOf(a,this.model.getTerminal(n[0],!0))&&this.model.setTerminal(n[0], -l,!0);else if(0==q.getIncomingEdges(k[m]).length){p=l;if(null==p||p==q.model.getParent(a[m]))p=q.model.getTerminal(n[0],!0);e=this.cloneCells([n[0]])[0];this.addEdge(e,q.getDefaultParent(),p,k[m])}}finally{this.model.endUpdate()}return k};var C=t.sidebar.dropAndConnect;t.sidebar.dropAndConnect=function(a,c,d,e){var f=q.model,g=null;f.beginUpdate();try{if(g=C.apply(this,arguments),b(a))for(var h=0;hmxUtils.indexOf(c,b)&&c.push(b);0>mxUtils.indexOf(c,a)&&c.push(a);return!0});return c};v.prototype.destroy=function(){if(null!=this.images)for(var a=0;amxUtils.indexOf(k,this.model.getTerminal(k[p],!0))&&this.model.setTerminal(k[p],l,!0);else if(b(a[p])&& +(t=q.getIncomingEdges(a[p]),0mxUtils.indexOf(a,this.model.getTerminal(t[0],!0))&&this.model.setTerminal(t[0],l,!0);else if(0==q.getIncomingEdges(k[p]).length){m=l;if(null==m||m==q.model.getParent(a[p]))m=q.model.getTerminal(t[0],!0);e=this.cloneCells([t[0]])[0];this.addEdge(e,q.getDefaultParent(),m,k[p])}}finally{this.model.endUpdate()}return k};var C=t.sidebar.dropAndConnect;t.sidebar.dropAndConnect=function(a,c,d,e){var f=q.model,g=null;f.beginUpdate();try{if(g=C.apply(this, +arguments),b(a))for(var h=0;hmxUtils.indexOf(c,b)&&c.push(b);0>mxUtils.indexOf(c,a)&&c.push(a);return!0});return c};v.prototype.destroy=function(){if(null!=this.images)for(var a=0;a>>=5,u-=5,a.ndist=(31&_)+1,_>>>=5,u var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(a,b){var c="",d,e,f,g,k,l,m=0;for(null!=b&&b||(a=Base64._utf8_encode(a));m>2,d=(d&3)<<4|e>>4,k=(e&15)<<2|f>>6,l=f&63,isNaN(e)?k=l=64:isNaN(f)&&(l=64),c=c+this._keyStr.charAt(g)+this._keyStr.charAt(d)+this._keyStr.charAt(k)+this._keyStr.charAt(l);return c},decode:function(a,b){b=null!=b?b:!1;var c="",d,e,f,g,k,l=0;for(a=a.replace(/[^A-Za-z0-9\+\/\=]/g, "");l>4,e=(e&15)<<4|g>>2,f=(g&3)<<6|k,c+=String.fromCharCode(d),64!=g&&(c+=String.fromCharCode(e)),64!=k&&(c+=String.fromCharCode(f));b||(c=Base64._utf8_decode(c));return c},_utf8_encode:function(a){a=a.replace(/\r\n/g,"\n");for(var b="",c=0;cd?b+=String.fromCharCode(d):(127d?b+= String.fromCharCode(d>>6|192):(b+=String.fromCharCode(d>>12|224),b+=String.fromCharCode(d>>6&63|128)),b+=String.fromCharCode(d&63|128))}return b},_utf8_decode:function(a){var b="",c=0,d;for(c1=c2=0;cd?(b+=String.fromCharCode(d),c++):191d?(c2=a.charCodeAt(c+1),b+=String.fromCharCode((d&31)<<6|c2&63),c+=2):(c2=a.charCodeAt(c+1),c3=a.charCodeAt(c+2),b+=String.fromCharCode((d&15)<<12|(c2&63)<<6|c3&63),c+=3);return b}};window.urlParams=window.urlParams||{};window.isLocalStorage=window.isLocalStorage||!1;window.isSvgBrowser=window.isSvgBrowser||0>navigator.userAgent.indexOf("MSIE")||9<=document.documentMode;window.EXPORT_URL=window.EXPORT_URL||"https://exp.draw.io/ImageExport4/export";window.SAVE_URL=window.SAVE_URL||"save";window.OPEN_URL=window.OPEN_URL||"open";window.PROXY_URL=window.PROXY_URL||"proxy";window.SHAPES_PATH=window.SHAPES_PATH||"shapes";window.GRAPH_IMAGE_PATH=window.GRAPH_IMAGE_PATH||"img"; -window.ICONSEARCH_PATH=window.ICONSEARCH_PATH||(0<=navigator.userAgent.indexOf("MSIE")||urlParams.dev)&&"file:"!=window.location.protocol?"iconSearch":"https://www.draw.io/iconSearch";window.TEMPLATE_PATH=window.TEMPLATE_PATH||"/templates";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||RESOURCES_PATH+"/dia";window.DRAWIO_LOG_URL=window.DRAWIO_LOG_URL||"";window.mxLoadResources=window.mxLoadResources||!1; +window.ICONSEARCH_PATH=window.ICONSEARCH_PATH||(0<=navigator.userAgent.indexOf("MSIE")||urlParams.dev)&&"file:"!=window.location.protocol?"iconSearch":"https://www.draw.io/iconSearch";window.TEMPLATE_PATH=window.TEMPLATE_PATH||"/templates";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||RESOURCES_PATH+"/dia";window.mxLoadResources=window.mxLoadResources||!1; window.mxLanguage=window.mxLanguage||function(){var a="1"==urlParams.offline?"en":urlParams.lang;if(null==a&&"undefined"!=typeof JSON&&isLocalStorage)try{var b=localStorage.getItem(".drawio-config");null!=b&&(a=JSON.parse(b).language||null)}catch(c){isLocalStorage=!1}return a}(); window.mxLanguageMap=window.mxLanguageMap||{i18n:"",id:"Bahasa Indonesia",ms:"Bahasa Melayu",bs:"Bosanski",bg:"Bulgarian",ca:"Català",cs:"Čeština",da:"Dansk",de:"Deutsch",et:"Eesti",en:"English",es:"Español",fil:"Filipino",fr:"Français",it:"Italiano",hu:"Magyar",nl:"Nederlands",no:"Norsk",pl:"Polski","pt-br":"Português (Brasil)",pt:"Português (Portugal)",ro:"Română",fi:"Suomi",sv:"Svenska",vi:"Tiếng Việt",tr:"Türkçe",el:"Ελληνικά",ru:"Русский",sr:"Српски",uk:"Українська",he:"עברית",ar:"العربية",th:"ไทย", ko:"한국어",ja:"日本語",zh:"中文(中国)","zh-tw":"中文(台灣)"};"undefined"===typeof window.mxBasePath&&(window.mxBasePath="mxgraph");if(null==window.mxLanguages){window.mxLanguages=[];for(var lang in mxLanguageMap)"en"!=lang&&window.mxLanguages.push(lang)}window.uiTheme=window.uiTheme||function(){var a=urlParams.ui;if(null==a&&"undefined"!==typeof JSON&&isLocalStorage)try{var b=localStorage.getItem(".drawio-config");null!=b&&(a=JSON.parse(b).ui||null)}catch(c){isLocalStorage=!1}return a}(); -function setCurrentXml(a,b){null!=window.parent&&null!=window.parent.openFile&&window.parent.openFile.setData(a,b)}(function(){if("undefined"!==typeof JSON&&isLocalStorage)try{var a=localStorage.getItem(".drawio-config"),b=!0;null!=a&&(b=JSON.parse(a).showStartScreen);0==b&&(urlParams.splash="0")}catch(c){}})();var ex=urlParams["export"];null!=ex&&("http://"!=ex.substring(0,7)&&"https://"!=ex.substring(0,8)&&(ex="http://"+ex),EXPORT_URL=ex); -if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==urlParams.local)urlParams.analytics="0",urlParams.picker="0",urlParams.gapi="0",urlParams.db="0",urlParams.od="0",urlParams.gh="0";if("1"==urlParams.offline||"1"==urlParams.local)urlParams.math="0";"1"==urlParams.lightbox&&(urlParams.chrome="0");var host=window.location.host,searchString="draw.io",position=host.length-searchString.length,lastIndex=host.lastIndexOf(searchString,position); --1!==lastIndex&&lastIndex===position&&"test.draw.io"!=host&&(window.DRAWIO_LOG_URL="https://log.draw.io");window.urlParams=window.urlParams||{};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images"; +function setCurrentXml(a,b){null!=window.parent&&null!=window.parent.openFile&&window.parent.openFile.setData(a,b)} +(function(){if("undefined"!==typeof JSON&&isLocalStorage)try{var a=localStorage.getItem(".drawio-config"),b=!0;null!=a&&(b=JSON.parse(a).showStartScreen);0==b&&(urlParams.splash="0")}catch(c){}a=urlParams["export"];null!=a&&("http://"!=a.substring(0,7)&&"https://"!=a.substring(0,8)&&(a="http://"+a),EXPORT_URL=a);window.DRAWIO_LOG_URL=window.DRAWIO_LOG_URL||"";b=window.location.host;"test.draw.io"!=b&&(a=b.length-7,b=b.lastIndexOf("draw.io",a),-1!==b&&b===a&&(window.DRAWIO_LOG_URL="https://log.draw.io"))})(); +if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==urlParams.local)urlParams.analytics="0",urlParams.picker="0",urlParams.gapi="0",urlParams.db="0",urlParams.od="0",urlParams.gh="0";if("1"==urlParams.offline||"1"==urlParams.local)urlParams.math="0";"1"==urlParams.lightbox&&(urlParams.chrome="0");window.urlParams=window.urlParams||{};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images"; window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"../../../src";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de"];var mxClient={VERSION:"3.7.6",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&& 0>navigator.userAgent.indexOf("Edge/"),IS_OP:0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/"),IS_OT:0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:0<=navigator.userAgent.indexOf("AppleWebKit/")&& 0>navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_IOS:navigator.userAgent.match(/(iPad|iPhone|iPod)/g)?!0:!1,IS_GC:0<=navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:0<=navigator.userAgent.indexOf("Firefox/"),IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&& @@ -1017,8 +1017,9 @@ mxCellRenderer.registerShape(mxConstants.SHAPE_LABEL,mxLabel);mxCellRenderer.pro mxCellRenderer.prototype.createIndicatorShape=function(a){a.shape.indicatorShape=this.getShape(a.view.graph.getIndicatorShape(a))};mxCellRenderer.prototype.getShape=function(a){return null!=a?mxCellRenderer.prototype.defaultShapes[a]:null};mxCellRenderer.prototype.getShapeConstructor=function(a){var b=this.getShape(a.style[mxConstants.STYLE_SHAPE]);null==b&&(b=a.view.graph.getModel().isEdge(a.cell)?this.defaultEdgeShape:this.defaultVertexShape);return b}; mxCellRenderer.prototype.configureShape=function(a){a.shape.apply(a);a.shape.image=a.view.graph.getImage(a);a.shape.indicatorColor=a.view.graph.getIndicatorColor(a);a.shape.indicatorStrokeColor=a.style[mxConstants.STYLE_INDICATOR_STROKECOLOR];a.shape.indicatorGradientColor=a.view.graph.getIndicatorGradientColor(a);a.shape.indicatorDirection=a.style[mxConstants.STYLE_INDICATOR_DIRECTION];a.shape.indicatorImage=a.view.graph.getIndicatorImage(a);this.postConfigureShape(a)}; mxCellRenderer.prototype.postConfigureShape=function(a){null!=a.shape&&(this.resolveColor(a,"indicatorColor",mxConstants.STYLE_FILLCOLOR),this.resolveColor(a,"indicatorGradientColor",mxConstants.STYLE_GRADIENTCOLOR),this.resolveColor(a,"fill",mxConstants.STYLE_FILLCOLOR),this.resolveColor(a,"stroke",mxConstants.STYLE_STROKECOLOR),this.resolveColor(a,"gradient",mxConstants.STYLE_GRADIENTCOLOR))}; -mxCellRenderer.prototype.resolveColor=function(a,b,c){var d=a.shape[b],e=a.view.graph,f=null;"inherit"==d?f=e.model.getParent(a.cell):"swimlane"==d?(f=null!=e.model.getTerminal(a.cell,!1)?e.model.getTerminal(a.cell,!1):a.cell,f=e.getSwimlane(f),c=e.swimlaneIndicatorColorAttribute):"indicated"==d&&(a.shape[b]=a.shape.indicatorColor);null!=f&&(d=e.getView().getState(f),a.shape[b]=null,null!=d&&(a.shape[b]=null!=d.shape&&"indicatorColor"!=b?d.shape[b]:d.style[c]))}; -mxCellRenderer.prototype.getLabelValue=function(a){return a.view.graph.getLabel(a.cell)}; +mxCellRenderer.prototype.checkPlaceholderStyles=function(a){if(null!=a.style)for(var b=["inherit","swimlane","indicated"],c=[mxConstants.STYLE_FILLCOLOR,mxConstants.STYLE_STROKECOLOR,mxConstants.STYLE_GRADIENTCOLOR],d=0;d=l.x:null!=c&&(k=c.x+c.width=a.x:null!=b&&(l=b.x+b.widthdocument.documentMode)&&(q=80);e+=q;d+=q;var c=e,f=d,g=Math.max(document.body.clientHeight,document.documentElement.clientHeight),n=Math.max(1,Math.round((document.body.clientWidth-e-64)/2)),p=Math.max(1,Math.round((g-d-a.footerHeight)/3));mxClient.IS_QUIRKS||(b.style.maxHeight="100%");e=Math.min(e,document.body.scrollWidth-64);d>g-64&&(b.style.overflowY="auto");d=Math.min(d,g-64);0g-64?"auto":"";null!=this.dialogImg&&(this.dialogImg.style.top=p+14+"px",this.dialogImg.style.left=n+e+38-q+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=m;this.container=r;a.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-1; +function Dialog(a,b,e,d,k,m,l){var q=0;mxClient.IS_VML&&(null==document.documentMode||8>document.documentMode)&&(q=80);e+=q;d+=q;var c=e,f=d,g=Math.max(document.body.clientHeight,document.documentElement.clientHeight),n=Math.max(1,Math.round((document.body.clientWidth-e-64)/2)),p=Math.max(1,Math.round((g-d-a.footerHeight)/3));mxClient.IS_QUIRKS||(b.style.maxHeight="100%");e=Math.min(e,document.body.scrollWidth-64);d>g-64&&(b.style.overflowY="auto");d=Math.min(d,g-64);0g-64?"auto":"";null!=this.dialogImg&&(this.dialogImg.style.top=p+14+"px",this.dialogImg.style.left=n+e+38-q+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=l;this.container=r;a.editor.fireEvent(new mxEventObject("showDialog"))}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+ @@ -1950,30 +1951,30 @@ 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.close=function(a){null!=this.onDialogClose&&(this.onDialogClose(a),this.onDialogClose=null);null!=this.dialogImg&&(this.dialogImg.parentNode.removeChild(this.dialogImg),this.dialogImg=null);null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);mxEvent.removeListener(window,"resize",this.resizeListener);this.container.parentNode.removeChild(this.container)};var PrintDialog=function(a,b){this.create(a,b)}; -PrintDialog.prototype.create=function(a){function b(a){var c=q.checked||f.checked,b=parseInt(n.value)/100;isNaN(b)&&(b=1,n.value="100%");var b=.75*b,d=e.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,p=1/e.pageScale;if(c){var u=q.checked?1:parseInt(g.value);isNaN(u)||(p=mxUtils.getScaleForPageCount(u,e,d))}e.getGraphBounds();var h=u=0,d=mxRectangle.fromRectangle(d);d.width=Math.ceil(d.width*b);d.height=Math.ceil(d.height*b);p*=b;!c&&e.pageVisible?(b=e.getPageLayout(),u-=b.x*d.width,h-=b.y*d.height): -c=!0;c=PrintDialog.createPrintPreview(e,p,d,0,u,h,c);c.open();a&&PrintDialog.printPreview(c)}var e=a.editor.graph,d,h,l=document.createElement("table");l.style.width="100%";l.style.height="100%";var m=document.createElement("tbody");d=document.createElement("tr");var q=document.createElement("input");q.setAttribute("type","checkbox");h=document.createElement("td");h.setAttribute("colspan","2");h.style.fontSize="10pt";h.appendChild(q);var c=document.createElement("span");mxUtils.write(c," "+mxResources.get("fitPage")); -h.appendChild(c);mxEvent.addListener(c,"click",function(a){q.checked=!q.checked;f.checked=!q.checked;mxEvent.consume(a)});mxEvent.addListener(q,"change",function(){f.checked=!q.checked});d.appendChild(h);m.appendChild(d);d=d.cloneNode(!1);var f=document.createElement("input");f.setAttribute("type","checkbox");h=document.createElement("td");h.style.fontSize="10pt";h.appendChild(f);c=document.createElement("span");mxUtils.write(c," "+mxResources.get("posterPrint")+":");h.appendChild(c);mxEvent.addListener(c, -"click",function(a){f.checked=!f.checked;q.checked=!f.checked;mxEvent.consume(a)});d.appendChild(h);var g=document.createElement("input");g.setAttribute("value","1");g.setAttribute("type","number");g.setAttribute("min","1");g.setAttribute("size","4");g.setAttribute("disabled","disabled");g.style.width="50px";h=document.createElement("td");h.style.fontSize="10pt";h.appendChild(g);mxUtils.write(h," "+mxResources.get("pages")+" (max)");d.appendChild(h);m.appendChild(d);mxEvent.addListener(f,"change", -function(){f.checked?g.removeAttribute("disabled"):g.setAttribute("disabled","disabled");q.checked=!f.checked});d=d.cloneNode(!1);h=document.createElement("td");mxUtils.write(h,mxResources.get("pageScale")+":");d.appendChild(h);h=document.createElement("td");var n=document.createElement("input");n.setAttribute("value","100 %");n.setAttribute("size","5");n.style.width="50px";h.appendChild(n);d.appendChild(h);m.appendChild(d);d=document.createElement("tr");h=document.createElement("td");h.colSpan=2; -h.style.paddingTop="20px";h.setAttribute("align","right");c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});c.className="geBtn";a.editor.cancelFirst&&h.appendChild(c);if(PrintDialog.previewEnabled){var p=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();b(!1)});p.className="geBtn";h.appendChild(p)}p=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();b(!0)});p.className="geBtn gePrimaryBtn";h.appendChild(p);a.editor.cancelFirst|| -h.appendChild(c);d.appendChild(h);m.appendChild(d);l.appendChild(m);this.container=l};PrintDialog.printPreview=function(a){if(null!=a.wnd){var b=function(){a.wnd.focus();a.wnd.print();a.wnd.close()};mxClient.IS_GC?window.setTimeout(b,500):b()}}; -PrintDialog.createPrintPreview=function(a,b,e,d,h,l,m){b=new mxPrintPreview(a,b,e,d,h,l);b.title=mxResources.get("preview");b.printBackgroundImage=!0;b.autoOrigin=m;a=a.background;if(null==a||""==a||a==mxConstants.NONE)a="#ffffff";b.backgroundColor=a;var q=b.writeHead;b.writeHead=function(a){q.apply(this,arguments);a.writeln('")};return b}; +PrintDialog.prototype.create=function(a){function b(a){var c=q.checked||f.checked,b=parseInt(n.value)/100;isNaN(b)&&(b=1,n.value="100%");var b=.75*b,d=e.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,p=1/e.pageScale;if(c){var v=q.checked?1:parseInt(g.value);isNaN(v)||(p=mxUtils.getScaleForPageCount(v,e,d))}e.getGraphBounds();var k=v=0,d=mxRectangle.fromRectangle(d);d.width=Math.ceil(d.width*b);d.height=Math.ceil(d.height*b);p*=b;!c&&e.pageVisible?(b=e.getPageLayout(),v-=b.x*d.width,k-=b.y*d.height): +c=!0;c=PrintDialog.createPrintPreview(e,p,d,0,v,k,c);c.open();a&&PrintDialog.printPreview(c)}var e=a.editor.graph,d,k,m=document.createElement("table");m.style.width="100%";m.style.height="100%";var l=document.createElement("tbody");d=document.createElement("tr");var q=document.createElement("input");q.setAttribute("type","checkbox");k=document.createElement("td");k.setAttribute("colspan","2");k.style.fontSize="10pt";k.appendChild(q);var c=document.createElement("span");mxUtils.write(c," "+mxResources.get("fitPage")); +k.appendChild(c);mxEvent.addListener(c,"click",function(a){q.checked=!q.checked;f.checked=!q.checked;mxEvent.consume(a)});mxEvent.addListener(q,"change",function(){f.checked=!q.checked});d.appendChild(k);l.appendChild(d);d=d.cloneNode(!1);var f=document.createElement("input");f.setAttribute("type","checkbox");k=document.createElement("td");k.style.fontSize="10pt";k.appendChild(f);c=document.createElement("span");mxUtils.write(c," "+mxResources.get("posterPrint")+":");k.appendChild(c);mxEvent.addListener(c, +"click",function(a){f.checked=!f.checked;q.checked=!f.checked;mxEvent.consume(a)});d.appendChild(k);var g=document.createElement("input");g.setAttribute("value","1");g.setAttribute("type","number");g.setAttribute("min","1");g.setAttribute("size","4");g.setAttribute("disabled","disabled");g.style.width="50px";k=document.createElement("td");k.style.fontSize="10pt";k.appendChild(g);mxUtils.write(k," "+mxResources.get("pages")+" (max)");d.appendChild(k);l.appendChild(d);mxEvent.addListener(f,"change", +function(){f.checked?g.removeAttribute("disabled"):g.setAttribute("disabled","disabled");q.checked=!f.checked});d=d.cloneNode(!1);k=document.createElement("td");mxUtils.write(k,mxResources.get("pageScale")+":");d.appendChild(k);k=document.createElement("td");var n=document.createElement("input");n.setAttribute("value","100 %");n.setAttribute("size","5");n.style.width="50px";k.appendChild(n);d.appendChild(k);l.appendChild(d);d=document.createElement("tr");k=document.createElement("td");k.colSpan=2; +k.style.paddingTop="20px";k.setAttribute("align","right");c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});c.className="geBtn";a.editor.cancelFirst&&k.appendChild(c);if(PrintDialog.previewEnabled){var p=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();b(!1)});p.className="geBtn";k.appendChild(p)}p=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();b(!0)});p.className="geBtn gePrimaryBtn";k.appendChild(p);a.editor.cancelFirst|| +k.appendChild(c);d.appendChild(k);l.appendChild(d);m.appendChild(l);this.container=m};PrintDialog.printPreview=function(a){if(null!=a.wnd){var b=function(){a.wnd.focus();a.wnd.print();a.wnd.close()};mxClient.IS_GC?window.setTimeout(b,500):b()}}; +PrintDialog.createPrintPreview=function(a,b,e,d,k,m,l){b=new mxPrintPreview(a,b,e,d,k,m);b.title=mxResources.get("preview");b.printBackgroundImage=!0;b.autoOrigin=l;a=a.background;if(null==a||""==a||a==mxConstants.NONE)a="#ffffff";b.backgroundColor=a;var q=b.writeHead;b.writeHead=function(a){q.apply(this,arguments);a.writeln('")};return b}; PrintDialog.previewEnabled=!0; -var PageSetupDialog=function(a){function b(){null==g||g==mxConstants.NONE?(f.style.backgroundColor="",f.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(f.style.backgroundColor=g,f.style.backgroundImage="")}function e(){null==u?(p.removeAttribute("title"),p.style.fontSize="",p.innerHTML=mxResources.get("change")+"..."):(p.setAttribute("title",u.src),p.style.fontSize="11px",p.innerHTML=u.src.substring(0,42)+"...")}var d=a.editor.graph,h,l,m=document.createElement("table");m.style.width= -"100%";m.style.height="100%";var q=document.createElement("tbody");h=document.createElement("tr");l=document.createElement("td");l.style.verticalAlign="top";l.style.fontSize="10pt";mxUtils.write(l,mxResources.get("paperSize")+":");h.appendChild(l);l=document.createElement("td");l.style.verticalAlign="top";l.style.fontSize="10pt";var c=PageSetupDialog.addPageFormatPanel(l,"pagesetupdialog",d.pageFormat);h.appendChild(l);q.appendChild(h);h=document.createElement("tr");l=document.createElement("td"); -mxUtils.write(l,mxResources.get("background")+":");h.appendChild(l);l=document.createElement("td");l.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var f=document.createElement("button");f.style.width="18px";f.style.height="18px";f.style.marginRight="20px";f.style.backgroundPosition="center center";f.style.backgroundRepeat="no-repeat";var g=d.background;b();mxEvent.addListener(f,"click",function(c){a.pickColor(g||"none",function(a){g=a;b()});mxEvent.consume(c)}); -l.appendChild(f);mxUtils.write(l,mxResources.get("gridSize")+":");var n=document.createElement("input");n.setAttribute("type","number");n.setAttribute("min","0");n.style.width="40px";n.style.marginLeft="6px";n.value=d.getGridSize();l.appendChild(n);mxEvent.addListener(n,"change",function(){var a=parseInt(n.value);n.value=Math.max(1,isNaN(a)?d.getGridSize():a)});h.appendChild(l);q.appendChild(h);h=document.createElement("tr");l=document.createElement("td");mxUtils.write(l,mxResources.get("image")+ -":");h.appendChild(l);l=document.createElement("td");var p=document.createElement("a");p.style.textDecoration="underline";p.style.cursor="pointer";p.style.color="#a0a0a0";var u=d.backgroundImage;mxEvent.addListener(p,"click",function(c){a.showBackgroundImageDialog(function(a){u=a;e()});mxEvent.consume(c)});e();l.appendChild(p);h.appendChild(l);q.appendChild(h);h=document.createElement("tr");l=document.createElement("td");l.colSpan=2;l.style.paddingTop="16px";l.setAttribute("align","right");var r= -mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});r.className="geBtn";a.editor.cancelFirst&&l.appendChild(r);var k=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();d.gridSize!==n.value&&d.setGridSize(parseInt(n.value));var f=new ChangePageSetup(a,g,u,c.get());f.ignoreColor=d.background==g;f.ignoreImage=(null!=d.backgroundImage?d.backgroundImage.src:null)===(null!=u?u.src:null);d.pageFormat.width==f.previousFormat.width&&d.pageFormat.height==f.previousFormat.height&& -f.ignoreColor&&f.ignoreImage||d.model.execute(f)});k.className="geBtn gePrimaryBtn";l.appendChild(k);a.editor.cancelFirst||l.appendChild(r);h.appendChild(l);q.appendChild(h);m.appendChild(q);this.container=m}; -PageSetupDialog.addPageFormatPanel=function(a,b,e,d){function h(a,f,b){if(b||n!=document.activeElement&&p!=document.activeElement){a=!1;for(f=0;f'};var a=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(b,c){a.apply(this,arguments);if(null!=this.shiftPreview1){var f=this.view.canvas;null!= -f.ownerSVGElement&&(f=f.ownerSVGElement);var d=this.gridSize*this.view.scale*this.view.gridSteps,d=-Math.round(d-mxUtils.mod(this.view.translate.x*this.view.scale+b,d))+"px "+-Math.round(d-mxUtils.mod(this.view.translate.y*this.view.scale+c,d))+"px";f.style.backgroundPosition=d}};mxGraph.prototype.updatePageBreaks=function(a,c,f){var b=this.view.scale,d=this.view.translate,e=this.pageFormat,u=b*this.pageScale,r=this.view.getBackgroundPageBounds();c=r.width;f=r.height;var k=new mxRectangle(b*d.x,b* -d.y,e.width*u,e.height*u),v=(a=a&&Math.min(k.width,k.height)>this.minPageBreakDist)?Math.ceil(f/k.height)-1:0,t=a?Math.ceil(c/k.width)-1:0,h=r.x+c,q=r.y+f;null==this.horizontalPageBreaks&&0this.minPageBreakDist)?Math.ceil(f/h.height)-1:0,t=a?Math.ceil(c/h.width)-1:0,k=r.x+c,q=r.y+f;null==this.horizontalPageBreaks&&0document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",b):this.diagramContainer.oncontextmenu=b;d.init(this.diagramContainer);this.hoverIcons=this.createHoverIcons();mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(a){var c=mxUtils.getOffset(this.diagramContainer);0mxUtils.indexOf(this.toolbar.staticElements,a)&&(a.parentNode.removeChild(a),b.push(a));a=e}a=this.toolbar.fontMenu;e=this.toolbar.sizeMenu; -if(null==n)this.toolbar.createTextToolbar();else{for(var k=0;kmxUtils.indexOf(t,D[a])&&t.push(D[a]);var z=function(a,c){d.getModel().beginUpdate();try{if(c)for(var b=d.getModel().isEdge(k),f=b?d.currentEdgeStyle:d.currentVertexStyle,b=["fontSize","fontFamily","fontColor"],g=0;gmxUtils.indexOf(D,u))&&d.setCellStyles(u,w,[k])}}}finally{d.getModel().endUpdate()}};d.addListener("cellsInserted",function(a,c){z(c.getProperty("cells"))});d.addListener("textInserted",function(a, -c){z(c.getProperty("cells"),!0)});d.connectionHandler.addListener(mxEvent.CONNECT,function(a,c){var b=[c.getProperty("cell")];c.getProperty("terminalInserted")&&b.push(c.getProperty("terminal"));z(b)});this.addListener("styleChanged",mxUtils.bind(this,function(a,c){var b=c.getProperty("cells"),f=!1,g=!1;if(0mxUtils.indexOf(t,D[a])&&t.push(D[a]);var z=function(a,c){d.getModel().beginUpdate();try{if(c)for(var b=d.getModel().isEdge(h),f=b?d.currentEdgeStyle:d.currentVertexStyle,b=["fontSize","fontFamily","fontColor"],g=0;gmxUtils.indexOf(D,v))&&d.setCellStyles(v,x,[h])}}}finally{d.getModel().endUpdate()}};d.addListener("cellsInserted",function(a,c){z(c.getProperty("cells"))});d.addListener("textInserted",function(a, +c){z(c.getProperty("cells"),!0)});d.connectionHandler.addListener(mxEvent.CONNECT,function(a,c){var b=[c.getProperty("cell")];c.getProperty("terminalInserted")&&b.push(c.getProperty("terminal"));z(b)});this.addListener("styleChanged",mxUtils.bind(this,function(a,c){var b=c.getProperty("cells"),f=!1,g=!1;if(0this.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(){this.zoom(this.cumulativeZoomFactor);null!=b&&b(!1);if(null!=B&&mxUtils.hasScrollbars(a.container)){var c=mxUtils.getOffset(a.container),f=a.container.offsetHeight/2-B.y+c.y;a.container.scrollLeft-=(a.container.offsetWidth/2-B.x+c.x)*(this.cumulativeZoomFactor-1);a.container.scrollTop-=f*(this.cumulativeZoomFactor-1)}this.cumulativeZoomFactor= -1;this.updateZoomTimeout=null}),20)};mxEvent.addMouseWheelListener(mxUtils.bind(this,function(c,b){if((mxEvent.isAltDown(c)||mxEvent.isControlDown(c)&&!mxClient.IS_MAC||a.panningHandler.isActive())&&(null==this.dialogs||0==this.dialogs.length))for(var f=mxEvent.getSource(c);null!=f;){if(f==a.container){B=new mxPoint(mxEvent.getClientX(c),mxEvent.getClientY(c));a.lazyZoom(b);mxEvent.consume(c);break}f=f.parentNode}}))}; +this.cumulativeZoomFactor=Math.max(.01,Math.min(this.view.scale*this.cumulativeZoomFactor,160)/this.view.scale);this.updateZoomTimeout=window.setTimeout(mxUtils.bind(this,function(){this.zoom(this.cumulativeZoomFactor);null!=b&&b(!1);if(null!=w&&mxUtils.hasScrollbars(a.container)){var c=mxUtils.getOffset(a.container),f=a.container.offsetHeight/2-w.y+c.y;a.container.scrollLeft-=(a.container.offsetWidth/2-w.x+c.x)*(this.cumulativeZoomFactor-1);a.container.scrollTop-=f*(this.cumulativeZoomFactor-1)}this.cumulativeZoomFactor= +1;this.updateZoomTimeout=null}),20)};mxEvent.addMouseWheelListener(mxUtils.bind(this,function(c,b){if((mxEvent.isAltDown(c)||mxEvent.isControlDown(c)&&!mxClient.IS_MAC||a.panningHandler.isActive())&&(null==this.dialogs||0==this.dialogs.length))for(var f=mxEvent.getSource(c);null!=f;){if(f==a.container){w=new mxPoint(mxEvent.getClientX(c),mxEvent.getClientY(c));a.lazyZoom(b);mxEvent.consume(c);break}f=f.parentNode}}))}; 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&&0a.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,h=0;e&&(d=b.view.translate.x*b.view.scale-b.container.scrollLeft,h=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-h);this.fireEvent(new mxEventObject("pageViewChanged"))};function ChangePageSetup(a,b,e,d){this.ui=a;this.previousColor=b;this.previousImage=e;this.previousFormat=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=b;this.previousImage=e;this.previousFormat=d;this.ignoreImage=this.ignoreColor=!1} ChangePageSetup.prototype.execute=function(){var a=this.ui.editor.graph;if(!this.ignoreColor){var b=a.background;this.ui.setBackgroundColor(this.previousColor);this.previousColor=b}this.ignoreImage||(b=a.backgroundImage,this.ui.setBackgroundImage(this.previousImage),this.previousImage=b);null!=this.previousFormat&&(b=a.pageFormat,this.previousFormat.width!=b.width||this.previousFormat.height!=b.height)&&(this.ui.setPageFormat(this.previousFormat),this.previousFormat=b)}; 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 h=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){h.apply(this,arguments);d()};var l=this.editor.graph.cellEditor.stopEditing; -this.editor.graph.cellEditor.stopEditing=function(a,b){l.apply(this,arguments);d()};d()}; -EditorUi.prototype.updateActionStates=function(){var a=this.editor.graph,b=!a.isSelectionEmpty(),e=!1,d=!1,h=a.getSelectionCells();if(null!=h)for(var l=0;lscreen.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 h(a){if(null!=m){var n=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a));d(Math.max(0,q+(b?n.x-m.x:m.y-n.y)-e));mxEvent.consume(a);q!=g()&&(c=!0,f=null)}}function l(a){h(a);m=q=null}var m=null,q=null,c=!0,f=null;mxClient.IS_POINTER&&(a.style.touchAction="none");var g=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){m=new mxPoint(mxEvent.getClientX(a), -mxEvent.getClientY(a));q=g();c=!1;mxEvent.consume(a)});mxEvent.addListener(a,"click",function(a){if(!c){var b=null!=f?f-e:0;f=g();d(b);mxEvent.consume(a)}});mxEvent.addGestureListeners(document,null,h,l);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,h,l)})};EditorUi.prototype.showDialog=function(a,b,e,d,h,l){this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,a,b,e,d,h,l);this.dialogs.push(this.dialog)}; +EditorUi.prototype.addSplitHandler=function(a,b,e,d){function k(a){if(null!=l){var n=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a));d(Math.max(0,q+(b?n.x-l.x:l.y-n.y)-e));mxEvent.consume(a);q!=g()&&(c=!0,f=null)}}function m(a){k(a);l=q=null}var l=null,q=null,c=!0,f=null;mxClient.IS_POINTER&&(a.style.touchAction="none");var g=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){l=new mxPoint(mxEvent.getClientX(a), +mxEvent.getClientY(a));q=g();c=!1;mxEvent.consume(a)});mxEvent.addListener(a,"click",function(a){if(!c){var b=null!=f?f-e:0;f=g();d(b);mxEvent.consume(a)}});mxEvent.addGestureListeners(document,null,k,m);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,k,m)})};EditorUi.prototype.showDialog=function(a,b,e,d,k,m){this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,a,b,e,d,k,m);this.dialogs.push(this.dialog)}; EditorUi.prototype.hideDialog=function(a){null!=this.dialogs&&0e&&(b=a.substring(e,d+21).replace(/>/g,">").replace(/</g,"<").replace(/\\"/g,'"').replace(/\n/g,""))}}catch(h){}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=this.editor.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&&0navigator.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 h=d.saveSelection(),l=mxUtils.prompt(a,b);d.restoreSelection(h);if(null!=l&&0navigator.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&&0g||Math.abs(l.y-b.getGraphY())>g){this.isCellSelected(d.cell)||this.setSelectionCell(d.cell);var e=this.selectionCellsHandler.getHandler(d.cell);if(null!=e&&null!=e.bends&&0g||Math.abs(m.y-b.getGraphY())>g){this.isCellSelected(d.cell)||this.setSelectionCell(d.cell);var e=this.selectionCellsHandler.getHandler(d.cell);if(null!=e&&null!=e.bends&&0mxUtils.indexOf(c,d)&&b.push(d)):b.push(c[f])}return b};this.connectionHandler.createTargetVertex=function(a,c){var b=this.graph.view.getState(c),b=null!=b?b.style:this.graph.getCellStyle(c);mxUtils.getValue(b,"part",!1)&&(b=this.graph.model.getParent(c),this.graph.model.isVertex(b)&&(c=b));return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var n=new mxRubberband(this); -this.getRubberband=function(){return n};var p=(new Date).getTime(),u=0,r=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var a=this.currentState;r.apply(this,arguments);a!=this.currentState?(p=(new Date).getTime(),u=0):u=(new Date).getTime()-p};var k=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=this.currentState&&a.getState()==this.currentState&&2E3=a&&v.y+v.height<=n&&v.y>=c&&v.x+v.width<=k&&g.push(t);this.getAllCells(a,c,b,f,t,g)}}}return g};var A=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,c,b){return this.graph.isCellSelected(a)? -!1:A.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,c){if("mouseDown"==c.getProperty("eventName")){var b=c.getProperty("event").getState();z=null==b||this.isSelectionEmpty()||this.isCellSelected(b.cell)?null:this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD, +this.getRubberband=function(){return n};var p=(new Date).getTime(),v=0,r=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var a=this.currentState;r.apply(this,arguments);a!=this.currentState?(p=(new Date).getTime(),v=0):v=(new Date).getTime()-p};var h=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=this.currentState&&a.getState()==this.currentState&&2E3=a&&u.y+u.height<=n&&u.y>=c&&u.x+u.width<=h&&g.push(t);this.getAllCells(a,c,b,f,t,g)}}}return g};var C=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,c,b){return this.graph.isCellSelected(a)? +!1:C.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,c){if("mouseDown"==c.getProperty("eventName")){var b=c.getProperty("event").getState();z=null==b||this.isSelectionEmpty()||this.isCellSelected(b.cell)?null:this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD, mxUtils.bind(this,function(a,c){if(!mxEvent.isMultiTouchEvent(c)){var b=c.getProperty("event"),f=c.getProperty("cell");null==f?(b=mxUtils.convertPoint(this.container,mxEvent.getClientX(b),mxEvent.getClientY(b)),n.start(b.x,b.y)):null!=z?this.addSelectionCells(z):1p?"a":"p",tt:12>p?"am":"pm",T:12>p?"A":"P",TT:12>p?"AM":"PM",Z:e?"UTC":(String(a).match(h)||[""]).pop().replace(l,""),o:(0p?"a":"p",tt:12>p?"am":"pm",T:12>p?"A":"P",TT:12>p?"AM":"PM",Z:e?"UTC":(String(a).match(k)||[""]).pop().replace(m,""),o:(0d&&"%"==b.charAt(match.index-1))l=h.substring(1);else{var m=h.substring(1,h.length-1);if(0>m.indexOf("{"))for(var q=a;null==l&&null!=q;)null!=q.value&&"object"==typeof q.value&&(l=q.hasAttribute(m)?null!=q.getAttribute(m)?q.getAttribute(m):"":null),q=this.model.getParent(q);null==l&&(l=this.getGlobalVariable(m))}e.push(b.substring(d, -match.index)+(null!=l?l:h));d=match.index+h.length}}e.push(b.substring(d));return e.join("")};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,h,l){l=l?l:!1;var m=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?(m.x+=a.geometry.width/2,m.y-=e):b==mxConstants.DIRECTION_SOUTH?(m.x+=a.geometry.width/2,m.y+=a.geometry.height+e):(m.x=b==mxConstants.DIRECTION_WEST?m.x-e:m.x+(a.geometry.width+e),m.y+=a.geometry.height/2);e=this.view.getState(this.model.getParent(a)); -var q=this.view.scale,c=this.view.translate,f=c.x*q,c=c.y*q;this.model.isVertex(e.cell)&&(f=e.x,c=e.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(m.x+=a.parent.geometry.x,m.y+=a.parent.geometry.y);l=l||mxEvent.isControlDown(d)&&!h?null:this.getCellAt(f+m.x*q,c+m.y*q);this.model.isAncestor(l,a)&&(l=null);for(e=l;null!=e;){if(this.isCellLocked(e)){l=null;break}e=this.model.getParent(e)}null!=l&&(e=this.view.getState(a),q=this.view.getState(l),null!=e&&null!=q&&mxUtils.intersects(e,q)&&(l= -null));if(h=!mxEvent.isShiftDown(d)||h)b==mxConstants.DIRECTION_NORTH?m.y-=a.geometry.height/2:b==mxConstants.DIRECTION_SOUTH?m.y+=a.geometry.height/2:m.x=b==mxConstants.DIRECTION_WEST?m.x-a.geometry.width/2:m.x+a.geometry.width/2;null==l||this.isCellConnectable(l)||(e=this.getModel().getParent(l),this.getModel().isVertex(e)&&this.isCellConnectable(e)&&(l=e));if(l==a||this.model.isEdge(l)||!this.isCellConnectable(l))l=null;e=[];this.model.beginUpdate();try{q=l;if(null==q&&h){for(var f=a,g=this.getCellGeometry(a);null!= -g&&g.relative;)f=this.getModel().getParent(f),g=this.getCellGeometry(f);var n=this.view.getState(f),p=null!=n?n.style:this.getCellStyle(f);if(mxUtils.getValue(p,"part",!1)){var u=this.model.getParent(f);this.model.isVertex(u)&&(f=u)}q=this.duplicateCells([f],!1)[0];g=this.getCellGeometry(q);null!=g&&(g.x=m.x-g.width/2,g.y=m.y-g.height/2)}g=null;null!=this.layoutManager&&(g=this.layoutManager.getLayout(this.model.getParent(a)));var r=mxEvent.isControlDown(d)&&h||null==l&&null!=g&&g.constructor==mxStackLayout? -null:this.insertEdge(this.model.getParent(a),null,"",a,q,this.createCurrentEdgeStyle());if(null!=r&&this.connectionHandler.insertBeforeSource){var k=null;for(d=a;null!=d.parent&&null!=d.geometry&&d.geometry.relative&&d.parent!=r.parent;)d=this.model.getParent(d);null!=d&&null!=d.parent&&d.parent==r.parent&&(k=d.parent.getIndex(d),d.parent.insert(r,k))}null==l&&null!=q&&null!=g&&null!=a.parent&&g.constructor==mxStackLayout&&b==mxConstants.DIRECTION_WEST&&(k=a.parent.getIndex(a),a.parent.insert(q,k)); -null!=r&&e.push(r);null==l&&null!=q&&e.push(q);null==q&&null!=r&&r.geometry.setTerminalPoint(m,!1);null!=r&&this.fireEvent(new mxEventObject("cellsInserted","cells",[r]))}finally{this.model.endUpdate()}return e}; +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;dd&&"%"==b.charAt(match.index-1))m=k.substring(1);else{var l=k.substring(1,k.length-1);if(0>l.indexOf("{"))for(var q=a;null==m&&null!=q;)null!=q.value&&"object"==typeof q.value&&(m=q.hasAttribute(l)?null!=q.getAttribute(l)?q.getAttribute(l):"":null),q=this.model.getParent(q);null==m&&(m=this.getGlobalVariable(l))}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.selectCellsForConnectVertex=function(a,b,e){2==a.length&&this.model.isVertex(a[1])?(this.setSelectionCell(a[1]),null!=e&&(mxEvent.isTouchEvent(b)?e.update(e.getState(this.view.getState(a[1]))):e.reset()),this.scrollCellToVisible(a[1])):this.setSelectionCells(a)}; +Graph.prototype.connectVertex=function(a,b,e,d,k,m){m=m?m:!1;var l=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?(l.x+=a.geometry.width/2,l.y-=e):b==mxConstants.DIRECTION_SOUTH?(l.x+=a.geometry.width/2,l.y+=a.geometry.height+e):(l.x=b==mxConstants.DIRECTION_WEST?l.x-e:l.x+(a.geometry.width+e),l.y+=a.geometry.height/2);e=this.view.getState(this.model.getParent(a)); +var q=this.view.scale,c=this.view.translate,f=c.x*q,c=c.y*q;this.model.isVertex(e.cell)&&(f=e.x,c=e.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(l.x+=a.parent.geometry.x,l.y+=a.parent.geometry.y);m=m||mxEvent.isControlDown(d)&&!k?null:this.getCellAt(f+l.x*q,c+l.y*q);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),q=this.view.getState(m),null!=e&&null!=q&&mxUtils.intersects(e,q)&&(m= +null));if(k=!mxEvent.isShiftDown(d)||k)b==mxConstants.DIRECTION_NORTH?l.y-=a.geometry.height/2:b==mxConstants.DIRECTION_SOUTH?l.y+=a.geometry.height/2:l.x=b==mxConstants.DIRECTION_WEST?l.x-a.geometry.width/2:l.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{q=m;if(null==q&&k){for(var f=a,g=this.getCellGeometry(a);null!= +g&&g.relative;)f=this.getModel().getParent(f),g=this.getCellGeometry(f);var n=this.view.getState(f),p=null!=n?n.style:this.getCellStyle(f);if(mxUtils.getValue(p,"part",!1)){var v=this.model.getParent(f);this.model.isVertex(v)&&(f=v)}q=this.duplicateCells([f],!1)[0];g=this.getCellGeometry(q);null!=g&&(g.x=l.x-g.width/2,g.y=l.y-g.height/2)}g=null;null!=this.layoutManager&&(g=this.layoutManager.getLayout(this.model.getParent(a)));var r=mxEvent.isControlDown(d)&&k||null==m&&null!=g&&g.constructor==mxStackLayout? +null:this.insertEdge(this.model.getParent(a),null,"",a,q,this.createCurrentEdgeStyle());if(null!=r&&this.connectionHandler.insertBeforeSource){var h=null;for(d=a;null!=d.parent&&null!=d.geometry&&d.geometry.relative&&d.parent!=r.parent;)d=this.model.getParent(d);null!=d&&null!=d.parent&&d.parent==r.parent&&(h=d.parent.getIndex(d),d.parent.insert(r,h))}null==m&&null!=q&&null!=g&&null!=a.parent&&g.constructor==mxStackLayout&&b==mxConstants.DIRECTION_WEST&&(h=a.parent.getIndex(a),a.parent.insert(q,h)); +null!=r&&e.push(r);null==m&&null!=q&&e.push(q);null==q&&null!=r&&r.geometry.setTerminalPoint(l,!1);null!=r&&this.fireEvent(new mxEventObject("cellsInserted","cells",[r]))}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," ")),0this.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=["label","tooltip","placeholders","placeholder"];a=a.value.attributes;var d=[];this.isEnabled()&&e.push("link");for(var h=0;hmxUtils.indexOf(e,a[h].nodeName)&&0b.name?1:0});for(h=0;hmxUtils.indexOf(e,a[k].nodeName)&&0b.name?1:0});for(k=0;ku||Math.abs(h.y- -x.y)>u)&&(Math.abs(h.x-z.x)>u||Math.abs(h.y-z.y)>u)){z=h.x-v.x;x=h.y-v.y;h={distSq:z*z+x*x,x:h.x,y:h.y};for(z=0;zh.distSq){t.splice(z,0,h);h=null;break}null==h||0!=t.length&&t[t.length-1].x===h.x&&t[t.length-1].y===h.y||t.push(h)}}}for(l=0;lf*f&&0f*f&&(z=new mxPoint(A.x-q.x,A.y-q.y),m=new mxPoint(A.x+q.x,A.y+q.y),e.push(z),this.addPoints(a,e,d,c,!1,null,k),e=0>Math.round(q.x)|| -0==Math.round(q.x)&&0>=Math.round(q.y)?1:-1,k=!1,"sharp"==g?(a.lineTo(z.x-q.y*e,z.y+q.x*e),a.lineTo(m.x-q.y*e,m.y+q.x*e),a.lineTo(m.x,m.y)):"arc"==g?(e*=1.3,a.curveTo(z.x-q.y*e,z.y+q.x*e,m.x-q.y*e,m.y+q.x*e,m.x,m.y)):(a.moveTo(m.x,m.y),k=!0),e=[m],z=!0))}else q=null;z||(e.push(A),v=A)}this.addPoints(a,e,d,c,!1,null,k);a.stroke()}};var l=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(a,b,d,e){if(null==b||null==a||"1"!=b.style.snapToPoint&& -"1"!=a.style.snapToPoint)l.apply(this,arguments);else{b=this.getTerminalPort(a,b,e);var c=this.getNextPoint(a,d,e),f=this.graph.isOrthogonal(a),g=mxUtils.toRadians(Number(b.style[mxConstants.STYLE_ROTATION]||"0")),k=new mxPoint(b.getCenterX(),b.getCenterY());if(0!=g)var n=Math.cos(-g),t=Math.sin(-g),c=mxUtils.getRotatedPoint(c,n,t,k);n=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]||0);n+=parseFloat(a.style[e?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]|| -0);c=this.getPerimeterPoint(b,c,0==g&&f,n);0!=g&&(n=Math.cos(g),t=Math.sin(g),c=mxUtils.getRotatedPoint(c,n,t,k));a.setAbsoluteTerminalPoint(this.snapToAnchorPoint(a,b,d,e,c),e)}};mxGraphView.prototype.snapToAnchorPoint=function(a,b,d,e,p){if(null!=b&&null!=a){a=this.graph.getAllConnectionConstraints(b);e=d=null;for(var c=0;ck||Math.abs(q.y- +y.y)>k)&&(Math.abs(q.x-z.x)>k||Math.abs(q.y-z.y)>k)){z=q.x-u.x;y=q.y-u.y;q={distSq:z*z+y*y,x:q.x,y:q.y};for(z=0;zq.distSq){t.splice(z,0,q);q=null;break}null==q||0!=t.length&&t[t.length-1].x===q.x&&t[t.length-1].y===q.y||t.push(q)}}}for(w=0;wf*f&&0f*f&&(z=new mxPoint(l.x-q.x,l.y-q.y),w=new mxPoint(l.x+q.x,l.y+q.y),e.push(z),this.addPoints(a,e,d,c,!1,null,h),e=0>Math.round(q.x)|| +0==Math.round(q.x)&&0>=Math.round(q.y)?1:-1,h=!1,"sharp"==g?(a.lineTo(z.x-q.y*e,z.y+q.x*e),a.lineTo(w.x-q.y*e,w.y+q.x*e),a.lineTo(w.x,w.y)):"arc"==g?(e*=1.3,a.curveTo(z.x-q.y*e,z.y+q.x*e,w.x-q.y*e,w.y+q.x*e,w.x,w.y)):(a.moveTo(w.x,w.y),h=!0),e=[w],z=!0))}else q=null;z||(e.push(l),u=l)}this.addPoints(a,e,d,c,!1,null,h);a.stroke()}};var m=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(a,b,d,e){if(null==b||null==a||"1"!=b.style.snapToPoint&& +"1"!=a.style.snapToPoint)m.apply(this,arguments);else{b=this.getTerminalPort(a,b,e);var c=this.getNextPoint(a,d,e),f=this.graph.isOrthogonal(a),g=mxUtils.toRadians(Number(b.style[mxConstants.STYLE_ROTATION]||"0")),h=new mxPoint(b.getCenterX(),b.getCenterY());if(0!=g)var n=Math.cos(-g),t=Math.sin(-g),c=mxUtils.getRotatedPoint(c,n,t,h);n=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]||0);n+=parseFloat(a.style[e?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]|| +0);c=this.getPerimeterPoint(b,c,0==g&&f,n);0!=g&&(n=Math.cos(g),t=Math.sin(g),c=mxUtils.getRotatedPoint(c,n,t,h));a.setAbsoluteTerminalPoint(this.snapToAnchorPoint(a,b,d,e,c),e)}};mxGraphView.prototype.snapToAnchorPoint=function(a,b,d,e,p){if(null!=b&&null!=a){a=this.graph.getAllConnectionConstraints(b);e=d=null;for(var c=0;c=l.getStatus()&&eval.call(window,l.getText())}catch(m){null!=window.console&&console.log("error in getStencil:",h,m)}}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.prototype.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=m.getStatus()&&eval.call(window,m.getText())}catch(l){null!=window.console&&console.log("error in getStencil:",k,l)}}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&&(a=a.split("."),0=d.getStatus()&&(h=d.getXml(),mxStencilRegistry.packages[a]=h,l=!0,null!=h&&null!=h.documentElement&&mxStencilRegistry.parseStencilSet(h.documentElement,b,l))}));return}m=mxUtils.load(a);h=m.getXml();mxStencilRegistry.packages[a]=h;l=!0}catch(q){null!=window.console&&console.log("error in loadStencilSet:", -a,q)}null!=h&&null!=h.documentElement&&mxStencilRegistry.parseStencilSet(h.documentElement,b,l)}};mxStencilRegistry.parseStencilSets=function(a){for(var b=0;b=d.getStatus()&&(k=d.getXml(),mxStencilRegistry.packages[a]=k,m=!0,null!=k&&null!=k.documentElement&&mxStencilRegistry.parseStencilSet(k.documentElement,b,m))}));return}l=mxUtils.load(a);k=l.getXml();mxStencilRegistry.packages[a]=k;m=!0}catch(q){null!=window.console&&console.log("error in loadStencilSet:", +a,q)}null!=k&&null!=k.documentElement&&mxStencilRegistry.parseStencilSet(k.documentElement,b,m)}};mxStencilRegistry.parseStencilSets=function(a){for(var b=0;bg||d>g)&&this.clear()}}else"a"==c.getSource().nodeName.toLowerCase()?this.clear():(null==this.currentState||c.getState()!=this.currentState&&null!=c.getState()|| -!e.intersects(this.currentState,c.getGraphX(),c.getGraphY()))&&this.updateCurrentState(c)},mouseUp:function(a,d){if("a"!=d.getSource().nodeName.toLowerCase()&&Math.abs(this.scrollLeft-e.container.scrollLeft)e||d>e)&&this.clear()}}else"a"==c.getSource().nodeName.toLowerCase()?this.clear():(null==this.currentState||c.getState()!=this.currentState&&null!=c.getState()|| +!g.intersects(this.currentState,c.getGraphX(),c.getGraphY()))&&this.updateCurrentState(c)},mouseUp:function(a,d){if("a"!=d.getSource().nodeName.toLowerCase()&&Math.abs(this.scrollLeft-g.container.scrollLeft)c&&b[d].deleteCell(c)};Graph.prototype.pasteHtmlAtCaret=function(a){var c;if(window.getSelection){if(c=window.getSelection(),c.getRangeAt&&c.rangeCount){c=c.getRangeAt(0);c.deleteContents();var b=document.createElement("div"); @@ -2298,17 +2299,17 @@ c);return b};Graph.prototype.initTouch=function(){this.connectionHandler.marker. (c.state=this.view.getState(b),null!=c.state&&null!=c.state.shape&&(this.container.style.cursor=c.state.shape.node.style.cursor))}null==c.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return c};var c=!1,b=!1,d=!1,f=this.fireMouseEvent;this.fireMouseEvent=function(a,g,e){a==mxEvent.MOUSE_DOWN&&(g=this.updateMouseEvent(g),c=this.isCellSelected(g.getCell()),b=this.isSelectionEmpty(),d=this.popupMenuHandler.isMenuShowing());f.apply(this,arguments)};this.popupMenuHandler.mouseUp= mxUtils.bind(this,function(a,f){this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==f.getState()||!f.isSource(f.getState().control))&&(this.popupMenuHandler.popupTrigger||!d&&!mxEvent.isMouseEvent(f.getEvent())&&(b&&null==f.getCell()&&this.isSelectionEmpty()||c&&this.isCellSelected(f.getCell())));mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,arguments)})};mxCellEditor.prototype.isContentEditing=function(){var a=this.graph.view.getState(this.editingCell); return null!=a&&1==a.style.html};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){if(sel=window.getSelection(),sel.getRangeAt&&sel.rangeCount){for(var a=[],c=0,b=sel.rangeCount;c"):k,!0);this.textarea.className="mxCellEditor geContentEditable";var d=mxUtils.getValue(a.style, +function(){b(this.textarea,d)}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var a=this.graph.view.getState(this.editingCell),c=null!=a&&"0"!=mxUtils.getValue(a.style,"nl2Br","1"),b=this.saveSelection();if(this.codeViewMode){h=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0"):h,!0);this.textarea.className="mxCellEditor geContentEditable";var d=mxUtils.getValue(a.style, mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE),c=mxUtils.getValue(a.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),f=mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),g=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,e=(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=e?"italic":"";this.textarea.style.fontFamily=c;this.textarea.style.textAlign=f;this.textarea.style.padding="0px";this.textarea.innerHTML!=k&&(this.textarea.innerHTML= -k,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0
"));k=this.graph.sanitizeHtml(c?k.replace(/\n/g,"").replace(/<br\s*.?>/g, -"
"):k,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var d=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(d*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(d)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.padding= -"2px";this.textarea.innerHTML!=k&&(this.textarea.innerHTML=k);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=b;this.resize()};var c=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 d=a.view.scale;this.bounds=mxRectangle.fromRectangle(a);if(0==this.bounds.width&&0== +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=e?"italic":"";this.textarea.style.fontFamily=c;this.textarea.style.textAlign=f;this.textarea.style.padding="0px";this.textarea.innerHTML!=h&&(this.textarea.innerHTML= +h,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0
"));h=this.graph.sanitizeHtml(c?h.replace(/\n/g,"").replace(/<br\s*.?>/g, +"
"):h,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var d=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(d*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(d)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.padding= +"2px";this.textarea.innerHTML!=h&&(this.textarea.innerHTML=h);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=b;this.resize()};var c=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 d=a.view.scale;this.bounds=mxRectangle.fromRectangle(a);if(0==this.bounds.width&&0== this.bounds.height){this.bounds.width=160*d;this.bounds.height=60*d;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)/d)+"px";this.textarea.style.height=Math.round((this.bounds.height- 4)/d)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeighte||Math.abs(g)>e)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(d,b),this.isSpaceEvent(c)?(d=this.x+this.width,b=this.y+this.height,f=this.graph.view.scale,mxEvent.isAltDown(c.getEvent())||(this.width=this.graph.snap(this.width/f)*f,this.height=this.graph.snap(this.height/f)*f,this.graph.isGridEnabled()|| (this.width=this.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 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 k=(new Date).getTime(),v=0,t=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,c,b,d){t.apply(this,arguments);b!=this.currentTerminalState?(k=(new Date).getTime(), -v=0):v=(new Date).getTime()-k;this.currentTerminalState=b};var D=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&&2E3=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==a)?this.graph.getConnectionConstraint(this.state,d,b):null,b=null!=(null!=f?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(b),f):null)?this.fixedHandleImage:null!=f&&null!=d?this.terminalHandleImage:this.handleImage;if(null!=b)return b=new mxImageShape(new mxRectangle(0,0,b.width,b.height),b.src),b.preserveImageAspect= -!1,b;b=mxConstants.HANDLE_SIZE;this.preferHtml&&--b;return new mxRectangleShape(new mxRectangle(0,0,b,b),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var w=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 w.apply(this,arguments)};var B=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox= -function(a){if(null!=a&&1==a.length){var c=this.graph.getModel(),b=c.getParent(a[0]),d=this.graph.getCellGeometry(a[0]);if(c.isEdge(b)&&null!=d&&d.relative&&(c=this.graph.view.getState(a[0]),null!=c&&2>c.width&&2>c.height&&null!=c.text&&null!=c.text.boundingBox))return mxRectangle.fromRectangle(c.text.boundingBox)}return B.apply(this,arguments)};var A=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(a){var c=this.graph.getModel(),b=c.getParent(a.cell), -d=this.graph.getCellGeometry(a.cell);return c.isEdge(b)&&null!=d&&d.relative&&2>a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox?(c=a.text.unrotatedBoundingBox||a.text.boundingBox,new mxRectangle(Math.round(c.x),Math.round(c.y),Math.round(c.width),Math.round(c.height))):A.apply(this,arguments)};var z=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(a,c){var b=this.graph.getModel(),d=b.getParent(this.state.cell),f=this.graph.getCellGeometry(this.state.cell); +!1,b;b=mxConstants.HANDLE_SIZE;this.preferHtml&&--b;return new mxRectangleShape(new mxRectangle(0,0,b,b),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var x=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(a,c,b){this.handleImage=c==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:c==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return x.apply(this,arguments)};var w=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox= +function(a){if(null!=a&&1==a.length){var c=this.graph.getModel(),b=c.getParent(a[0]),d=this.graph.getCellGeometry(a[0]);if(c.isEdge(b)&&null!=d&&d.relative&&(c=this.graph.view.getState(a[0]),null!=c&&2>c.width&&2>c.height&&null!=c.text&&null!=c.text.boundingBox))return mxRectangle.fromRectangle(c.text.boundingBox)}return w.apply(this,arguments)};var C=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(a){var c=this.graph.getModel(),b=c.getParent(a.cell), +d=this.graph.getCellGeometry(a.cell);return c.isEdge(b)&&null!=d&&d.relative&&2>a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox?(c=a.text.unrotatedBoundingBox||a.text.boundingBox,new mxRectangle(Math.round(c.x),Math.round(c.y),Math.round(c.width),Math.round(c.height))):C.apply(this,arguments)};var z=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(a,c){var b=this.graph.getModel(),d=b.getParent(this.state.cell),f=this.graph.getCellGeometry(this.state.cell); (this.getHandleForEvent(c)==mxEvent.ROTATION_HANDLE||!b.isEdge(d)||null==f||!f.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&z.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()a?-1:1:a===a?0:NaN:NaN},d=Math.abs(a-this.lastX),f=Math.abs(c-this.lastY),g=Math.sqrt(d*d+f*f);if(2>g){this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=c;return}var e=Math.round(g/10),k=this.defaultVariation;5>e&&(e=5,k/=3);for(var ea=b(a-this.lastX)*d/e,b=b(c- -this.lastY)*f/e,d=d/g,f=f/g,g=0;ga?-1:1:a===a?0:NaN:NaN},d=Math.abs(a-this.lastX),f=Math.abs(c-this.lastY),g=Math.sqrt(d*d+f*f);if(2>g){this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=c;return}var e=Math.round(g/10),h=this.defaultVariation;5>e&&(e=5,h/=3);for(var ea=b(a-this.lastX)*d/e,b=b(c- +this.lastY)*f/e,d=d/g,f=f/g,g=0;ge+n?a.y=b.y:a.x=b.x);return mxUtils.getPerimeterPoint(k,a,b)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(a,c,b,d){var f=n.prototype.size;null!=c&&(f=mxUtils.getValue(c.style, -"size",f));var g=a.x,e=a.y,k=a.width,r=a.height;c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_EAST?(f=k*Math.max(0,Math.min(1,f)),e=[new mxPoint(g+f,e),new mxPoint(g+k-f,e),new mxPoint(g+k,e+r),new mxPoint(g,e+r),new mxPoint(g+f,e)]):c==mxConstants.DIRECTION_WEST?(f=k*Math.max(0,Math.min(1,f)),e=[new mxPoint(g,e),new mxPoint(g+k,e),new mxPoint(g+k-f,e+r),new mxPoint(g+f,e+r),new mxPoint(g,e)]):c==mxConstants.DIRECTION_NORTH? -(f=r*Math.max(0,Math.min(1,f)),e=[new mxPoint(g,e+f),new mxPoint(g+k,e),new mxPoint(g+k,e+r),new mxPoint(g,e+r-f),new mxPoint(g,e+f)]):(f=r*Math.max(0,Math.min(1,f)),e=[new mxPoint(g,e),new mxPoint(g+k,e+f),new mxPoint(g+k,e+r-f),new mxPoint(g,e+r),new mxPoint(g,e)]);r=a.getCenterX();a=a.getCenterY();a=new mxPoint(r,a);d&&(b.xg+k?a.y=b.y:a.x=b.x);return mxUtils.getPerimeterPoint(e,a,b)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter= -function(a,c,b,d){var f=t.prototype.size;null!=c&&(f=mxUtils.getValue(c.style,"size",f));var g=a.x,e=a.y,k=a.width,n=a.height,r=a.getCenterX();a=a.getCenterY();c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_EAST?(f=k*Math.max(0,Math.min(1,f)),e=[new mxPoint(g,e),new mxPoint(g+k-f,e),new mxPoint(g+k,a),new mxPoint(g+k-f,e+n),new mxPoint(g,e+n),new mxPoint(g+f,a),new mxPoint(g,e)]):c==mxConstants.DIRECTION_WEST? -(f=k*Math.max(0,Math.min(1,f)),e=[new mxPoint(g+f,e),new mxPoint(g+k,e),new mxPoint(g+k-f,a),new mxPoint(g+k,e+n),new mxPoint(g+f,e+n),new mxPoint(g,a),new mxPoint(g+f,e)]):c==mxConstants.DIRECTION_NORTH?(f=n*Math.max(0,Math.min(1,f)),e=[new mxPoint(g,e+f),new mxPoint(r,e),new mxPoint(g+k,e+f),new mxPoint(g+k,e+n),new mxPoint(r,e+n-f),new mxPoint(g,e+n),new mxPoint(g,e+f)]):(f=n*Math.max(0,Math.min(1,f)),e=[new mxPoint(g,e),new mxPoint(r,e+f),new mxPoint(g+k,e),new mxPoint(g+k,e+n-f),new mxPoint(r, -e+n),new mxPoint(g,e+n-f),new mxPoint(g,e)]);r=new mxPoint(r,a);d&&(b.xg+k?r.y=b.y:r.x=b.x);return mxUtils.getPerimeterPoint(e,r,b)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(a,c,b,d){var f=D.prototype.size;null!=c&&(f=mxUtils.getValue(c.style,"size",f));var g=a.x,e=a.y,k=a.width,n=a.height,r=a.getCenterX();a=a.getCenterY();c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST; -c==mxConstants.DIRECTION_NORTH||c==mxConstants.DIRECTION_SOUTH?(f=n*Math.max(0,Math.min(1,f)),e=[new mxPoint(r,e),new mxPoint(g+k,e+f),new mxPoint(g+k,e+n-f),new mxPoint(r,e+n),new mxPoint(g,e+n-f),new mxPoint(g,e+f),new mxPoint(r,e)]):(f=k*Math.max(0,Math.min(1,f)),e=[new mxPoint(g+f,e),new mxPoint(g+k-f,e),new mxPoint(g+k,a),new mxPoint(g+k-f,e+n),new mxPoint(g+f,e+n),new mxPoint(g,a),new mxPoint(g+f,e)]);r=new mxPoint(r,a);d&&(b.xg+k?r.y=b.y:r.x=b.x);return mxUtils.getPerimeterPoint(e, +new mxPoint(a.getCenterX()+d,Math.min(a.y+a.height,Math.max(a.y,b.y)));b.ye+n?a.y=b.y:a.x=b.x);return mxUtils.getPerimeterPoint(h,a,b)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(a,c,b,d){var f=n.prototype.size;null!=c&&(f=mxUtils.getValue(c.style, +"size",f));var g=a.x,e=a.y,h=a.width,r=a.height;c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_EAST?(f=h*Math.max(0,Math.min(1,f)),e=[new mxPoint(g+f,e),new mxPoint(g+h-f,e),new mxPoint(g+h,e+r),new mxPoint(g,e+r),new mxPoint(g+f,e)]):c==mxConstants.DIRECTION_WEST?(f=h*Math.max(0,Math.min(1,f)),e=[new mxPoint(g,e),new mxPoint(g+h,e),new mxPoint(g+h-f,e+r),new mxPoint(g+f,e+r),new mxPoint(g,e)]):c==mxConstants.DIRECTION_NORTH? +(f=r*Math.max(0,Math.min(1,f)),e=[new mxPoint(g,e+f),new mxPoint(g+h,e),new mxPoint(g+h,e+r),new mxPoint(g,e+r-f),new mxPoint(g,e+f)]):(f=r*Math.max(0,Math.min(1,f)),e=[new mxPoint(g,e),new mxPoint(g+h,e+f),new mxPoint(g+h,e+r-f),new mxPoint(g,e+r),new mxPoint(g,e)]);r=a.getCenterX();a=a.getCenterY();a=new mxPoint(r,a);d&&(b.xg+h?a.y=b.y:a.x=b.x);return mxUtils.getPerimeterPoint(e,a,b)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter= +function(a,c,b,d){var f=t.prototype.size;null!=c&&(f=mxUtils.getValue(c.style,"size",f));var g=a.x,e=a.y,h=a.width,n=a.height,r=a.getCenterX();a=a.getCenterY();c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_EAST?(f=h*Math.max(0,Math.min(1,f)),e=[new mxPoint(g,e),new mxPoint(g+h-f,e),new mxPoint(g+h,a),new mxPoint(g+h-f,e+n),new mxPoint(g,e+n),new mxPoint(g+f,a),new mxPoint(g,e)]):c==mxConstants.DIRECTION_WEST? +(f=h*Math.max(0,Math.min(1,f)),e=[new mxPoint(g+f,e),new mxPoint(g+h,e),new mxPoint(g+h-f,a),new mxPoint(g+h,e+n),new mxPoint(g+f,e+n),new mxPoint(g,a),new mxPoint(g+f,e)]):c==mxConstants.DIRECTION_NORTH?(f=n*Math.max(0,Math.min(1,f)),e=[new mxPoint(g,e+f),new mxPoint(r,e),new mxPoint(g+h,e+f),new mxPoint(g+h,e+n),new mxPoint(r,e+n-f),new mxPoint(g,e+n),new mxPoint(g,e+f)]):(f=n*Math.max(0,Math.min(1,f)),e=[new mxPoint(g,e),new mxPoint(r,e+f),new mxPoint(g+h,e),new mxPoint(g+h,e+n-f),new mxPoint(r, +e+n),new mxPoint(g,e+n-f),new mxPoint(g,e)]);r=new mxPoint(r,a);d&&(b.xg+h?r.y=b.y:r.x=b.x);return mxUtils.getPerimeterPoint(e,r,b)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(a,c,b,d){var f=D.prototype.size;null!=c&&(f=mxUtils.getValue(c.style,"size",f));var g=a.x,e=a.y,h=a.width,n=a.height,r=a.getCenterX();a=a.getCenterY();c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST; +c==mxConstants.DIRECTION_NORTH||c==mxConstants.DIRECTION_SOUTH?(f=n*Math.max(0,Math.min(1,f)),e=[new mxPoint(r,e),new mxPoint(g+h,e+f),new mxPoint(g+h,e+n-f),new mxPoint(r,e+n),new mxPoint(g,e+n-f),new mxPoint(g,e+f),new mxPoint(r,e)]):(f=h*Math.max(0,Math.min(1,f)),e=[new mxPoint(g+f,e),new mxPoint(g+h-f,e),new mxPoint(g+h,a),new mxPoint(g+h-f,e+n),new mxPoint(g+f,e+n),new mxPoint(g,a),new mxPoint(g+f,e)]);r=new mxPoint(r,a);d&&(b.xg+h?r.y=b.y:r.x=b.x);return mxUtils.getPerimeterPoint(e, r,b)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(K,mxShape);K.prototype.size=10;K.prototype.paintBackground=function(a,c,b,d,f){var g=parseFloat(mxUtils.getValue(this.style,"size",this.size));a.translate(c,b);a.ellipse((d-g)/2,0,g,g);a.fillAndStroke();a.begin();a.moveTo(d/2,g);a.lineTo(d/2,f);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.lollipop=K;mxUtils.extend(P,mxShape);P.prototype.size=10;P.prototype.inset=2;P.prototype.paintBackground= function(a,c,b,d,f){var g=parseFloat(mxUtils.getValue(this.style,"size",this.size)),e=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(c,b);a.begin();a.moveTo(d/2,g+e);a.lineTo(d/2,f);a.end();a.stroke();a.begin();a.moveTo((d-g)/2-e,g/2);a.quadTo((d-g)/2-e,g+e,d/2,g+e);a.quadTo((d+g)/2+e,g+e,(d+g)/2+e,g/2);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.requires=P;mxUtils.extend(L,mxCylinder);L.prototype.jettyWidth=32;L.prototype.jettyHeight=12;L.prototype.redrawPath= -function(a,c,b,d,f,g){var e=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));c=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));b=e/2;var e=b+e/2,k=.3*f-c/2,n=.7*f-c/2;g?(a.moveTo(b,k),a.lineTo(e,k),a.lineTo(e,k+c),a.lineTo(b,k+c),a.moveTo(b,n),a.lineTo(e,n),a.lineTo(e,n+c),a.lineTo(b,n+c)):(a.moveTo(b,0),a.lineTo(d,0),a.lineTo(d,f),a.lineTo(b,f),a.lineTo(b,n+c),a.lineTo(0,n+c),a.lineTo(0,n),a.lineTo(b,n),a.lineTo(b,k+c),a.lineTo(0,k+c),a.lineTo(0,k),a.lineTo(b, -k),a.close());a.end()};mxCellRenderer.prototype.defaultShapes.component=L;mxUtils.extend(M,mxDoubleEllipse);M.prototype.outerStroke=!0;M.prototype.paintVertexShape=function(a,c,b,d,f){var g=Math.min(4,Math.min(d/5,f/5));0/g,"\n"));var g=document.createElement("div");g.innerHTML=f;f=mxUtils.extractTextWithWhitespace(g.childNodes);d.cellLabelChanged(a.cell,f)}else f=mxUtils.htmlEntities(d.convertValueToString(a.cell),!1),"0"!=mxUtils.getValue(a.style, "nl2Br","1")&&(f=f.replace(/\n/g,"
")),d.cellLabelChanged(a.cell,d.sanitizeHtml(f));d.setCellStyles("html",c);b.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=c?c:"0"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}}});this.addAction("wordWrap",function(){var a=d.getView().getState(d.getSelectionCell()),c="wrap";d.stopEditing();null!=a&&"wrap"==a.style[mxConstants.STYLE_WHITE_SPACE]&&(c=null);d.setCellStyles(mxConstants.STYLE_WHITE_SPACE,c)});this.addAction("rotation", @@ -2525,13 +2526,13 @@ null,null,Editor.ctrlKey+" + (Numpad) / Alt+Mousewheel");this.addAction("zoomOut (a=d.getPagePadding(),d.container.scrollTop=a.y*d.view.scale,d.container.scrollLeft=Math.min(a.x*d.view.scale,(d.container.scrollWidth-d.container.clientWidth)/2))}),null,null,Editor.ctrlKey+"+J");this.addAction("fitTwoPages",mxUtils.bind(this,function(){d.pageVisible||this.get("pageView").funct();var a=d.pageFormat,c=d.pageScale;d.zoomTo(Math.floor(20*Math.min((d.container.clientWidth-10)/(2*a.width)/c,(d.container.clientHeight-10)/a.height/c))/20);mxUtils.hasScrollbars(d.container)&&(a=d.getPagePadding(), d.container.scrollTop=Math.min(a.y,(d.container.scrollHeight-d.container.clientHeight)/2),d.container.scrollLeft=Math.min(a.x,(d.container.scrollWidth-d.container.clientWidth)/2))}),null,null,Editor.ctrlKey+"+Shift+J");this.addAction("fitPageWidth",mxUtils.bind(this,function(){d.pageVisible||this.get("pageView").funct();d.zoomTo(Math.floor(20*(d.container.clientWidth-10)/d.pageFormat.width/d.pageScale)/20);if(mxUtils.hasScrollbars(d.container)){var a=d.getPagePadding();d.container.scrollLeft=Math.min(a.x* d.view.scale,(d.container.scrollWidth-d.container.clientWidth)/2)}}));this.put("customZoom",new Action(mxResources.get("custom")+"...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.editorUi,parseInt(100*d.getView().getScale()),mxResources.get("apply"),mxUtils.bind(this,function(a){a=parseInt(a);!isNaN(a)&&0this.maxAutosaveRevisionDelay}; DrawioFile.prototype.close=function(a){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'),c.writeln(a.editor.fontCss),c.writeln(""))};if("undefined"!==typeof MathJax){var u=b.renderPage;b.renderPage=function(a,c,b,d,f,g){var e=u.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=!0:e.className="geDisableMathJax";return e}}b.open(null,null,f,!0)}else{n=c.background;if(null== -n||""==n||n==mxConstants.NONE)n="#ffffff";b.backgroundColor=n;b.autoOrigin=r;b.appendGraph(c,p,e,k,f,!0)}return b}var d=parseInt(T.value)/100;isNaN(d)&&(d=1,T.value="100 %");var d=.75*d,g=u.value,e=l.value,k=!r.checked,p=null;k&&(k=g==n&&e==n);if(!k&&null!=a.pages&&a.pages.length){var h=0,k=a.pages.length-1;r.checked||(h=parseInt(g)-1,k=parseInt(e)-1);for(var t=h;t<=k;t++){var v=a.pages[t],g=v==a.currentPage?f:null;if(null==g){var g=a.createTemporaryGraph(f.getStylesheet()),e=!0,h=!1,m=null,y=null; -null==v.viewState&&null==v.mapping&&null==v.root&&a.updatePageRoot(v);null!=v.viewState?(e=v.viewState.pageVisible,h=v.viewState.mathEnabled,m=v.viewState.background,y=v.viewState.backgroundImage):null!=v.mapping&&null!=v.mapping.diagramMap&&(h="0"!=v.mapping.diagramMap.get("mathEnabled"),m=v.mapping.diagramMap.get("background"),y=v.mapping.diagramMap.get("backgroundImage"),y=null!=y&&0'),k.writeln("MathJax.Hub.Config({"),k.writeln('messageStyle: "none",'),k.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],'), -k.writeln('extensions: ["tex2jax.js", "mml2jax.js", "asciimath2jax.js"],'),k.writeln("TeX: {"),k.writeln('extensions: ["AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js"]'),k.writeln("},"),k.writeln("tex2jax: {"),k.writeln('\tignoreClass: "geDisableMathJax"'),k.writeln("},"),k.writeln("asciimath2jax: {"),k.writeln('\tignoreClass: "geDisableMathJax"'),k.writeln("}"),k.writeln("});"),c&&(k.writeln("MathJax.Hub.Queue(function () {"),k.writeln("window.print();"),k.writeln("});")),k.writeln("\x3c/script>"), -k.writeln('