diff --git a/ChangeLog b/ChangeLog index 5f7f539d337188d3e45e2e26c277740b18be30c3..860cbcea4f5c3ffd9e752f9fee7597eb809c53a2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +26-JUL-2019: 11.0.7 + +- Fixes for MS Office Add-in + +26-JUL-2019: 11.0.6 + +- Improves error handling for exportToCanvas + 24-JUL-2019: 11.0.5 - Adds timeout for Office Add-in server fallback diff --git a/VERSION b/VERSION index 60e4ecd524f1239668186528a292d5bf7da19c75..d65b4d44fb58839c17067098c2a617de8057e5c4 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -11.0.5 \ No newline at end of file +11.0.7 \ No newline at end of file diff --git a/src/main/webapp/cache.manifest b/src/main/webapp/cache.manifest index 385d4bb867574f6eae6a88ba0d4b7c5e7f401095..bcd5e025b0415240afb396901a52b9764b2e2b3f 100644 --- a/src/main/webapp/cache.manifest +++ b/src/main/webapp/cache.manifest @@ -1,7 +1,7 @@ CACHE MANIFEST # THIS FILE WAS GENERATED. DO NOT MODIFY! -# 07/24/2019 02:55 PM +# 07/26/2019 04:22 PM app.html index.html?offline=1 diff --git a/src/main/webapp/js/app.min.js b/src/main/webapp/js/app.min.js index 5788f63080b89a706f39cc66b351174e74a5fef3..090a944a5cf75e137890641956747b3100ef042f 100644 --- a/src/main/webapp/js/app.min.js +++ b/src/main/webapp/js/app.min.js @@ -133,7 +133,7 @@ l--,_+=n[s++]<<u,u+=8}if(a.nlen=(31&_)+257,_>>>=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<a.length;)d=a.charCodeAt(m++),e=a.charCodeAt(m++),f=a.charCodeAt(m++),g=d>>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<a.length;)d=this._keyStr.indexOf(a.charAt(l++)),e=this._keyStr.indexOf(a.charAt(l++)),g=this._keyStr.indexOf(a.charAt(l++)),k=this._keyStr.indexOf(a.charAt(l++)),d=d<<2|e>>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;c<a.length;c++){var d=a.charCodeAt(c);128>d?b+=String.fromCharCode(d):(127<d&&2048>d?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;c<a.length;)d=a.charCodeAt(c),128>d?(b+=String.fromCharCode(d),c++):191<d&&224>d?(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.mxLoadSettings=window.mxLoadSettings||"1"!=urlParams.configure;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.PLANT_URL=window.PLANT_URL||"https://exp-plant.draw.io/plantuml4";window.DRAW_MATH_URL=window.DRAW_MATH_URL||"https://www.draw.io/math"; -window.VSD_CONVERT_URL=window.VSD_CONVERT_URL||"https://convert.draw.io/VsdConverter/api/converter";window.EMF_CONVERT_URL=window.EMF_CONVERT_URL||"convert";window.SAVE_URL=window.SAVE_URL||"save";window.OPEN_URL=window.OPEN_URL||"open";window.PROXY_URL=window.PROXY_URL||"proxy";window.VIEWER_URL=null;window.SHAPES_PATH=window.SHAPES_PATH||"shapes";window.GRAPH_IMAGE_PATH=window.GRAPH_IMAGE_PATH||"img"; +window.VSD_CONVERT_URL=window.VSD_CONVERT_URL||"https://convert.draw.io/VsdConverter/api/converter";window.EMF_CONVERT_URL=window.EMF_CONVERT_URL||"https://convert.draw.io/emf2png/convertEMF";window.SAVE_URL=window.SAVE_URL||"save";window.OPEN_URL=window.OPEN_URL||"open";window.PROXY_URL=window.PROXY_URL||"proxy";window.VIEWER_URL=null;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.NEW_DIAGRAM_CATS_PATH=window.NEW_DIAGRAM_CATS_PATH||"newDiagramCats";window.PLUGINS_BASE_PATH=window.PLUGINS_BASE_PATH||"";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:"ไทย", @@ -8468,7 +8468,7 @@ ka.style.cssText="margin:0 8px 0 8px;";ka.setAttribute("value","100 %");ka.style (this.page=this.ui.currentPage);this.page!=this.ui.currentPage?null!=this.page.viewState&&(this.ignoreColor||(this.page.viewState.background=this.color),this.ignoreImage||(this.page.viewState.backgroundImage=this.image),null!=this.format&&(this.page.viewState.pageFormat=this.format),null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled),null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)):(v.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!= this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible))};Editor.prototype.useCanvasForExport=!1;try{var B=document.createElement("canvas"),D=new Image;D.onload=function(){try{B.getContext("2d").drawImage(D,0,0);var a=B.toDataURL("image/png");Editor.prototype.useCanvasForExport= null!=a&&6<a.length}catch(J){}};D.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(y){}})(); -(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,b,d){d.ui=a.ui;return b};a.afterDecode=function(a,b,d){d.previousColor=d.color;d.previousImage=d.image;d.previousFormat=d.format;null!=d.foldingEnabled&&(d.foldingEnabled=!d.foldingEnabled);null!=d.mathEnabled&&(d.mathEnabled=!d.mathEnabled);null!=d.shadowVisible&&(d.shadowVisible=!d.shadowVisible);return d};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="11.0.5";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.enableLogging="1"!=urlParams.stealth&&/.*\.draw\.io$/.test(window.location.hostname)&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost="https://www.draw.io";EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl="1"==urlParams.dev?"/cache":"https://rt.draw.io/cache";EditorUi.enablePlantUml= +(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,b,d){d.ui=a.ui;return b};a.afterDecode=function(a,b,d){d.previousColor=d.color;d.previousImage=d.image;d.previousFormat=d.format;null!=d.foldingEnabled&&(d.foldingEnabled=!d.foldingEnabled);null!=d.mathEnabled&&(d.mathEnabled=!d.mathEnabled);null!=d.shadowVisible&&(d.shadowVisible=!d.shadowVisible);return d};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="11.0.7";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.enableLogging="1"!=urlParams.stealth&&/.*\.draw\.io$/.test(window.location.hostname)&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost="https://www.draw.io";EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl="1"==urlParams.dev?"/cache":"https://rt.draw.io/cache";EditorUi.enablePlantUml= EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.scratchpadHelpLink="https://desk.draw.io/support/solutions/articles/16000042367";EditorUi.logError=function(a,b,c,d,e){if("1"==urlParams.dev)EditorUi.debug("logError",a,b,c,d,e);else if(EditorUi.enableLogging)try{if(a!=EditorUi.lastErrorMessage&&(null==a||null==b||-1==a.indexOf("Script error")&&-1==a.indexOf("extension"))&&null!=a&&0>a.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage= a;var f=0<=a.indexOf("NetworkError")||0<=a.indexOf("SecurityError")||0<=a.indexOf("NS_ERROR_FAILURE")||0<=a.indexOf("out of memory")?"CONFIG":"SEVERE",l=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";e=null!=e?e:Error(a);(new Image).src=l+"/log?severity="+f+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(a)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(c)+(null!=d?":colno:"+encodeURIComponent(d):"")+(null!=e&&null!=e.stack?"&stack="+ encodeURIComponent(e.stack):"")}}catch(x){}};EditorUi.logEvent=function(a){if("1"==urlParams.dev)EditorUi.debug("logEvent",a);else if(EditorUi.enableLogging)try{var b=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=b+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=a?"&data="+encodeURIComponent(JSON.stringify(a)):"")}catch(p){}};EditorUi.sendReport=function(a,b){if("1"==urlParams.dev)EditorUi.debug("sendReport",a);else if(EditorUi.enableLogging)try{b=null!=b?b: @@ -8636,20 +8636,20 @@ mxUtils.getXml(a))}));else return(d?"":'<?xml version="1.0" encoding="UTF-8"?>\n try{this.saveCanvas(a,e?this.getFileData(!0,null,null,null,c,m):null,n,!m)}catch(D){"Invalid image"==D.message?this.downloadFile(n):this.handleError(D)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,c,a||1,b,d,null,null,g,k)}catch(B){this.spinner.stop(),this.handleError(B)}}};EditorUi.prototype.loadFonts=function(a){if(null!=this.editor.fontCss&&null==this.editor.resolvedFontCss){var b=function(a){return a.replace(RegExp("^[\\s\"']+", "g"),"").replace(RegExp("[\\s\"']+$","g"),"")},c=this.editor.fontCss.split("url("),d=0,f={},e=mxUtils.bind(this,function(){if(0==d){for(var e=[c[0]],g=1;g<c.length;g++){var l=c[g].indexOf(")");e.push('url("');e.push(f[b(c[g].substring(0,l))]);e.push('"'+c[g].substring(l))}this.editor.resolvedFontCss=e.join("");a()}});if(0<c.length)for(var g=1;g<c.length;g++){var k=c[g].indexOf(")"),m=null,n=c[g].indexOf("format(",k);0<n&&(m=b(c[g].substring(n+7,c[g].indexOf(")",n))));mxUtils.bind(this,function(a){if(null== f[a]){f[a]=a;d++;var b="application/x-font-ttf";if("svg"==m||/(\.svg)($|\?)/i.test(a))b="image/svg+xml";else if("otf"==m||"embedded-opentype"==m||/(\.otf)($|\?)/i.test(a))b="application/x-font-opentype";else if("woff"==m||/(\.woff)($|\?)/i.test(a))b="application/font-woff";else if("woff2"==m||/(\.woff2)($|\?)/i.test(a))b="application/font-woff2";else if("eot"==m||/(\.eot)($|\?)/i.test(a))b="application/vnd.ms-fontobject";else if("sfnt"==m||/(\.sfnt)($|\?)/i.test(a))b="application/font-sfnt";var c= -a;/^https?:\/\//.test(c)&&!this.editor.isCorsEnabledForUrl(c)&&(c=PROXY_URL+"?url="+encodeURIComponent(a));this.loadUrl(c,mxUtils.bind(this,function(b){f[a]=b;d--;e()}),mxUtils.bind(this,function(a){d--;e()}),!0,null,"data:"+b+";charset=utf-8;base64,")}})(b(c[g].substring(0,k)),m)}}else a()};EditorUi.prototype.exportToCanvas=function(a,b,c,d,e,g,k,m,n,v,B,q,y,J){g=null!=g?g:!0;q=null!=q?q:this.editor.graph;y=null!=y?y:0;var f=n?null:q.background;f==mxConstants.NONE&&(f=null);null==f&&(f=d);null== -f&&0==n&&(f="#ffffff");this.convertImages(q.getSvg(f,null,null,J,null,null!=k?k:!0,null,null,null,v),mxUtils.bind(this,function(c){var d=new Image;d.onload=mxUtils.bind(this,function(){try{var l=document.createElement("canvas"),k=parseInt(c.getAttribute("width")),p=parseInt(c.getAttribute("height"));m=null!=m?m:1;null!=b&&(m=g?Math.min(1,Math.min(3*b/(4*p),b/k)):b/k);k=Math.ceil(m*k)+2*y;p=Math.ceil(m*p)+2*y;l.setAttribute("width",k);l.setAttribute("height",p);var n=l.getContext("2d");null!=f&&(n.beginPath(), -n.rect(0,0,k,p),n.fillStyle=f,n.fill());n.scale(m,m);mxClient.IS_SF?window.setTimeout(function(){n.drawImage(d,y/m,y/m);a(l)},0):(n.drawImage(d,y/m,y/m),a(l))}catch(V){null!=e&&e(V)}});d.onerror=function(a){null!=e&&e(a)};try{v&&this.editor.graph.addSvgShadow(c);var l=mxUtils.bind(this,function(){if(null!=this.editor.resolvedFontCss){var a=document.createElement("style");a.setAttribute("type","text/css");a.innerHTML=this.editor.resolvedFontCss;c.getElementsByTagName("defs")[0].appendChild(a)}this.convertMath(q, -c,!0,mxUtils.bind(this,function(){d.src=this.createSvgDataUri(mxUtils.getXml(c))}))});this.loadFonts(l)}catch(E){null!=e&&e(E)}}),c,B)};EditorUi.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var b=a.convert,c=this;a.convert=function(d){if(null!=d){var f="http://"==d.substring(0,7)||"https://"==d.substring(0,8);f&&!navigator.onLine?d=c.svgBrokenImage.src:!f||d.substring(0,a.baseUrl.length)==a.baseUrl||c.crossOriginImages&&c.editor.isCorsEnabledForUrl(d)?"chrome-extension://"!= -d.substring(0,19)&&(d=b.apply(this,arguments)):d=PROXY_URL+"?url="+encodeURIComponent(d)}return d};return a};EditorUi.prototype.convertImages=function(a,b,c,d){null==d&&(d=this.createImageUrlConverter());var f=0,e=c||{};c=mxUtils.bind(this,function(c,g){for(var l=a.getElementsByTagName(c),k=0;k<l.length;k++)mxUtils.bind(this,function(c){try{if(null!=c){var l=d.convert(c.getAttribute(g));if(null!=l&&"data:"!=l.substring(0,5)){var k=e[l];null==k?(f++,this.convertImageToDataUri(l,function(d){null!=d&& -(e[l]=d,c.setAttribute(g,d));f--;0==f&&b(a)})):c.setAttribute(g,k)}else null!=l&&c.setAttribute(g,l)}}catch(J){}})(l[k])});c("image","xlink:href");c("img","src");0==f&&b(a)};EditorUi.prototype.loadUrl=function(a,b,c,d,e,g,k){try{var f=!k&&(d||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||/(\.gif)($|\?)/i.test(a));e=null!=e?e:!0;var l=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=b){var d=a.getText();if(f){if((9== -document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){a=mxUtilsBinaryToArray(a.request.responseBody).toArray();for(var d=Array(a.length),e=0;e<a.length;e++)d[e]=String.fromCharCode(a[e]);d=d.join("")}g=null!=g?g:"data:image/png;base64,";d=g+this.base64Encode(d)}b(d)}}else null!=c&&c({message:mxResources.get("error")+" "+a.getStatus()},a)}),function(a){null!=c&&c({message:mxResources.get("error")+" "+a.getStatus()})},f,this.timeout,function(){e&&null!= -c&&c({code:App.ERROR_TIMEOUT,retry:l})})});l()}catch(v){null!=c&&c(v)}};EditorUi.prototype.isCorsEnabledForUrl=function(a){return this.editor.isCorsEnabledForUrl(a)};EditorUi.prototype.convertImageToDataUri=function(a,b){try{var c=!0,d=window.setTimeout(mxUtils.bind(this,function(){c=!1;b(this.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){window.clearTimeout(d);c&&b(this.createSvgDataUri(a.getText()))}),function(){window.clearTimeout(d);c&& -b(this.svgBrokenImage.src)});else{var f=new Image,e=this;this.crossOriginImages&&(f.crossOrigin="anonymous");f.onload=function(){window.clearTimeout(d);if(c)try{var a=document.createElement("canvas"),g=a.getContext("2d");a.height=f.height;a.width=f.width;g.drawImage(f,0,0);b(a.toDataURL())}catch(C){b(e.svgBrokenImage.src)}};f.onerror=function(){window.clearTimeout(d);c&&b(e.svgBrokenImage.src)};f.src=a}}catch(A){b(this.svgBrokenImage.src)}};EditorUi.prototype.importXml=function(a,b,c,d,e){b=null!= +a;/^https?:\/\//.test(c)&&!this.editor.isCorsEnabledForUrl(c)&&(c=PROXY_URL+"?url="+encodeURIComponent(a));this.loadUrl(c,mxUtils.bind(this,function(b){f[a]=b;d--;e()}),mxUtils.bind(this,function(a){d--;e()}),!0,null,"data:"+b+";charset=utf-8;base64,")}})(b(c[g].substring(0,k)),m)}}else a()};EditorUi.prototype.exportToCanvas=function(a,b,c,d,e,g,k,m,n,v,B,q,y,J){try{g=null!=g?g:!0;k=null!=k?k:!0;q=null!=q?q:this.editor.graph;y=null!=y?y:0;var f=n?null:q.background;f==mxConstants.NONE&&(f=null);null== +f&&(f=d);null==f&&0==n&&(f="#ffffff");this.convertImages(q.getSvg(f,null,null,J,null,k,null,null,null,v),mxUtils.bind(this,function(c){var d=new Image;d.onload=mxUtils.bind(this,function(){try{var l=document.createElement("canvas"),k=parseInt(c.getAttribute("width")),p=parseInt(c.getAttribute("height"));m=null!=m?m:1;null!=b&&(m=g?Math.min(1,Math.min(3*b/(4*p),b/k)):b/k);k=Math.ceil(m*k)+2*y;p=Math.ceil(m*p)+2*y;l.setAttribute("width",k);l.setAttribute("height",p);var n=l.getContext("2d");null!=f&& +(n.beginPath(),n.rect(0,0,k,p),n.fillStyle=f,n.fill());n.scale(m,m);mxClient.IS_SF?window.setTimeout(function(){n.drawImage(d,y/m,y/m);a(l)},0):(n.drawImage(d,y/m,y/m),a(l))}catch(V){null!=e&&e(V)}});d.onerror=function(a){null!=e&&e(a)};try{v&&this.editor.graph.addSvgShadow(c);var l=mxUtils.bind(this,function(){if(null!=this.editor.resolvedFontCss){var a=document.createElement("style");a.setAttribute("type","text/css");a.innerHTML=this.editor.resolvedFontCss;c.getElementsByTagName("defs")[0].appendChild(a)}this.convertMath(q, +c,!0,mxUtils.bind(this,function(){d.src=this.createSvgDataUri(mxUtils.getXml(c))}))});this.loadFonts(l)}catch(E){null!=e&&e(E)}}),c,B)}catch(F){null!=e&&e(F)}};EditorUi.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var b=a.convert,c=this;a.convert=function(d){if(null!=d){var f="http://"==d.substring(0,7)||"https://"==d.substring(0,8);f&&!navigator.onLine?d=c.svgBrokenImage.src:!f||d.substring(0,a.baseUrl.length)==a.baseUrl||c.crossOriginImages&&c.editor.isCorsEnabledForUrl(d)? +"chrome-extension://"!=d.substring(0,19)&&(d=b.apply(this,arguments)):d=PROXY_URL+"?url="+encodeURIComponent(d)}return d};return a};EditorUi.prototype.convertImages=function(a,b,c,d){null==d&&(d=this.createImageUrlConverter());var f=0,e=c||{};c=mxUtils.bind(this,function(c,g){for(var l=a.getElementsByTagName(c),k=0;k<l.length;k++)mxUtils.bind(this,function(c){try{if(null!=c){var l=d.convert(c.getAttribute(g));if(null!=l&&"data:"!=l.substring(0,5)){var k=e[l];null==k?(f++,this.convertImageToDataUri(l, +function(d){null!=d&&(e[l]=d,c.setAttribute(g,d));f--;0==f&&b(a)})):c.setAttribute(g,k)}else null!=l&&c.setAttribute(g,l)}}catch(J){}})(l[k])});c("image","xlink:href");c("img","src");0==f&&b(a)};EditorUi.prototype.loadUrl=function(a,b,c,d,e,g,k){try{var f=!k&&(d||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||/(\.gif)($|\?)/i.test(a));e=null!=e?e:!0;var l=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=b){var d=a.getText(); +if(f){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){a=mxUtilsBinaryToArray(a.request.responseBody).toArray();for(var d=Array(a.length),e=0;e<a.length;e++)d[e]=String.fromCharCode(a[e]);d=d.join("")}g=null!=g?g:"data:image/png;base64,";d=g+this.base64Encode(d)}b(d)}}else null!=c&&c({message:mxResources.get("error")+" "+a.getStatus()},a)}),function(a){null!=c&&c({message:mxResources.get("error")+" "+a.getStatus()})},f,this.timeout,function(){e&& +null!=c&&c({code:App.ERROR_TIMEOUT,retry:l})})});l()}catch(v){null!=c&&c(v)}};EditorUi.prototype.isCorsEnabledForUrl=function(a){return this.editor.isCorsEnabledForUrl(a)};EditorUi.prototype.convertImageToDataUri=function(a,b){try{var c=!0,d=window.setTimeout(mxUtils.bind(this,function(){c=!1;b(this.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){window.clearTimeout(d);c&&b(this.createSvgDataUri(a.getText()))}),function(){window.clearTimeout(d); +c&&b(this.svgBrokenImage.src)});else{var f=new Image,e=this;this.crossOriginImages&&(f.crossOrigin="anonymous");f.onload=function(){window.clearTimeout(d);if(c)try{var a=document.createElement("canvas"),g=a.getContext("2d");a.height=f.height;a.width=f.width;g.drawImage(f,0,0);b(a.toDataURL())}catch(C){b(e.svgBrokenImage.src)}};f.onerror=function(){window.clearTimeout(d);c&&b(e.svgBrokenImage.src)};f.src=a}}catch(A){b(this.svgBrokenImage.src)}};EditorUi.prototype.importXml=function(a,b,c,d,e){b=null!= b?b:0;c=null!=c?c:0;var f=[];try{var g=this.editor.graph;if(null!=a&&0<a.length){g.model.beginUpdate();try{var l=mxUtils.parseXml(a),k=this.editor.extractGraphModel(l.documentElement,null!=this.pages);if(null!=k&&"mxfile"==k.nodeName&&null!=this.pages){var p=k.getElementsByTagName("diagram");if(1==p.length)k=Editor.parseDiagramNode(p[0]);else if(1<p.length){a={};var l=[],m=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(k=Editor.parseDiagramNode(p[0]),d=!1,m=1);for(;m<p.length;m++){var n= p[m].getAttribute("id");p[m].removeAttribute("id");var u=this.updatePageRoot(new DiagramPage(p[m]));a[n]=p[m].getAttribute("id");var q=this.pages.length;null==u.getName()&&u.setName(mxResources.get("pageWithNumber",[q+1]));g.model.execute(new ChangePage(this,u,u,q,!0));l.push(u)}this.updatePageLinks(a,l)}}null!=k&&"mxGraphModel"===k.nodeName&&(f=g.importGraphModel(k,b,c,d))}finally{g.model.endUpdate()}}}catch(H){if(e)throw H;this.handleError(H)}return f};EditorUi.prototype.updatePageLinks=function(a, b){for(var c=0;c<b.length;c++)this.updatePageLinksForCell(a,b[c].root)};EditorUi.prototype.updatePageLinksForCell=function(a,b){var c=document.createElement("div"),d=this.editor.graph,f=d.getLinkForCell(b);null!=f&&"data:page/id,"==f.substring(0,13)&&d.setLinkForCell(b,this.updatePageLink(a,f));if(d.isHtmlLabel(b)){c.innerHTML=d.getLabel(b);for(var e=c.getElementsByTagName("a"),g=!1,l=0;l<e.length;l++)f=e[l].getAttribute("href"),null!=f&&"data:page/id,"==f.substring(0,13)&&(e[l].setAttribute("href", this.updatePageLink(a,f)),g=!0);g&&d.labelChanged(b,c.innerHTML)}for(l=0;l<d.model.getChildCount(b);l++)this.updatePageLinksForCell(a,d.model.getChildAt(b,l))};EditorUi.prototype.updatePageLink=function(a,b){var c=a[b.substring(b.indexOf(",")+1)];return null!=c?"data:page/id,"+c:null};EditorUi.prototype.isRemoteVisioFormat=function(a){return/(\.v(sd|dx))($|\?)/i.test(a)||/(\.vs(s|x))($|\?)/i.test(a)};EditorUi.prototype.importVisio=function(a,b,c,d){d=null!=d?d:a.name;c=null!=c?c:mxUtils.bind(this, -function(a){this.handleError(a)});var f=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var f=this.isRemoteVisioFormat(d);try{var e="UNKNOWN-VISIO",g=d.lastIndexOf(".");0<=g&&g<d.length&&(e=d.substring(g+1).toUpperCase());EditorUi.logEvent({category:e+"-MS-IMPORT-FILE",action:"size_"+a.size,label:f?"remote":"local"})}catch(v){}if(f&&null!=VSD_CONVERT_URL){f=new FormData;f.append("file1",a,d);var l=new XMLHttpRequest;l.open("POST",VSD_CONVERT_URL);l.responseType="blob"; +function(a){this.handleError(a)});var f=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var f=this.isRemoteVisioFormat(d);try{var e="UNKNOWN-VISIO",g=d.lastIndexOf(".");0<=g&&g<d.length&&(e=d.substring(g+1).toUpperCase());EditorUi.logEvent({category:e+"-MS-IMPORT-FILE",action:"filename_"+d,label:f?"remote":"local"})}catch(v){}if(f&&null!=VSD_CONVERT_URL){f=new FormData;f.append("file1",a,d);var l=new XMLHttpRequest;l.open("POST",VSD_CONVERT_URL);l.responseType="blob"; l.onreadystatechange=mxUtils.bind(this,function(){if(4==l.readyState)if(200<=l.status&&299>=l.status)try{this.doImportVisio(l.response,b,c,d)}catch(v){c(v)}else c({})});l.send(f)}else try{this.doImportVisio(a,b,c,d)}catch(v){c(v)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?f():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",f))};EditorUi.prototype.importGraphML=function(a, b,c){c=null!=c?c:mxUtils.bind(this,function(a){this.handleError(a)});var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(a,b,c)}catch(z){c(z)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?d():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",d))};EditorUi.prototype.exportVisio=function(){var a=mxUtils.bind(this, function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams()||this.handleError({message:mxResources.get("unknownError")})}catch(l){this.handleError(l)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?a():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",a))};EditorUi.prototype.convertLucidChart=function(a, @@ -8823,8 +8823,8 @@ mxEvent.consume(b)});B.appendChild(D)}D=x.cloneNode();D.innerHTML='<img src="'+I D.setAttribute("title",mxResources.get("refresh")),"dark"==uiTheme&&(D.style.filter="invert(100%)"),mxEvent.addListener(D,"click",function(a){H();a.preventDefault();mxEvent.consume(a)}),B.appendChild(D));a.commentsSaveNeeded()&&(x=x.cloneNode(),x.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',x.setAttribute("title",mxResources.get("save")),"dark"==uiTheme&&(x.style.filter="invert(100%)"),mxEvent.addListener(x,"click",function(a){e();a.preventDefault();mxEvent.consume(a)}), B.appendChild(x));A.appendChild(B);var J=[],H=mxUtils.bind(this,function(){if(null!=t){t.div=t.div.cloneNode(!0);var b=t.div.querySelector(".geCommentEditTxtArea"),c=t.div.querySelector(".geCommentEditBtns");t.comment.content=b.value;b.parentNode.removeChild(b);c.parentNode.removeChild(c)}C.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";z=a.canReplyToReplies();a.commentsSupported()? a.getComments(function(a){function b(a){if(null!=a){a.sort(function(a,b){return new Date(a.modifiedDate)-new Date(b.modifiedDate)});for(var c=0;c<a.length;c++)b(a[c].replies)}}a.sort(function(a,b){return new Date(a.modifiedDate)-new Date(b.modifiedDate)});C.innerHTML="";C.appendChild(v);v.style.display="block";J=a;for(a=0;a<J.length;a++)b(J[a].replies),p(J[a],J,null,0,y);null!=t&&null==t.comment.id&&null==t.comment.pCommentId&&(C.appendChild(t.div),m(t.comment,t.div,t.saveCallback,t.deleteOnCancel))}, -function(a){C.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(a?": "+a:""))}):C.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});H();this.refreshComments=H;B=mxUtils.bind(this,function(){function a(b){var d=c[b.id];if(null!=d)for(n(b,d),d=0;null!=b.replies&&d<b.replies.length;d++)a(b.replies[d])}if(this.window.isVisible()){for(var b=C.querySelectorAll(".geCommentDate"),c={},d=0;d<b.length;d++){var e=b[d];c[e.getAttribute("data-commentId")]=e}for(d=0;d<J.length;d++)a(J[d])}});setInterval(B, -6E4);this.refreshCommentsTime=B;this.window=new mxWindow(mxResources.get("comments"),A,c,b,d,g,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));this.window.setLocation=function(a,b){var c=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight; +function(a){C.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(a&&a.message?": "+a.message:""))}):C.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});H();this.refreshComments=H;B=mxUtils.bind(this,function(){function a(b){var d=c[b.id];if(null!=d)for(n(b,d),d=0;null!=b.replies&&d<b.replies.length;d++)a(b.replies[d])}if(this.window.isVisible()){for(var b=C.querySelectorAll(".geCommentDate"),c={},d=0;d<b.length;d++){var e=b[d];c[e.getAttribute("data-commentId")]=e}for(d=0;d<J.length;d++)a(J[d])}}); +setInterval(B,6E4);this.refreshCommentsTime=B;this.window=new mxWindow(mxResources.get("comments"),A,c,b,d,g,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));this.window.setLocation=function(a,b){var c=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight; a=Math.max(0,Math.min(a,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,c-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};var F=mxUtils.bind(this,function(){var a=this.window.getX(),b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window,"resize",F);this.destroy=function(){mxEvent.removeListener(window,"resize",F);this.window.destroy()}}, ConfirmDialog=function(a,c,b,d,g,e,k,m,n,q){var f=document.createElement("div");f.style.textAlign="center";var l=document.createElement("div");l.style.padding="6px";l.style.overflow="auto";l.style.maxHeight="44px";l.style.lineHeight="1.2em";mxClient.IS_QUIRKS&&(l.style.height="60px");mxUtils.write(l,c);f.appendChild(l);null!=q&&(l=document.createElement("div"),l.style.padding="6px 0 6px 0",c=document.createElement("img"),c.setAttribute("src",q),l.appendChild(c),f.appendChild(l));q=document.createElement("div"); q.style.textAlign="center";q.style.whiteSpace="nowrap";var p=document.createElement("input");p.setAttribute("type","checkbox");e=mxUtils.button(e||mxResources.get("cancel"),function(){a.hideDialog();null!=d&&d(p.checked)});e.className="geBtn";null!=m&&(e.innerHTML=m+"<br>"+e.innerHTML,e.style.paddingBottom="8px",e.style.paddingTop="8px",e.style.height="auto",e.style.width="40%");a.editor.cancelFirst&&q.appendChild(e);var u=mxUtils.button(g||mxResources.get("ok"),function(){a.hideDialog();null!=b&& diff --git a/src/main/webapp/js/diagramly/EditorUi.js b/src/main/webapp/js/diagramly/EditorUi.js index e1b6c45fcc09d377819597e51ce8c1e1be5e6bbf..99f33af998a07e69e82c38287b9431b476ba6aef 100644 --- a/src/main/webapp/js/diagramly/EditorUi.js +++ b/src/main/webapp/js/diagramly/EditorUi.js @@ -6170,137 +6170,147 @@ EditorUi.prototype.exportToCanvas = function(callback, width, imageCache, background, error, limitHeight, ignoreSelection, scale, transparentBackground, addShadow, converter, graph, border, noCrop) { - limitHeight = (limitHeight != null) ? limitHeight : true; - ignoreSelection = (ignoreSelection != null) ? ignoreSelection : true; - graph = (graph != null) ? graph : this.editor.graph; - border = (border != null) ? border : 0; - - var bg = (transparentBackground) ? null : graph.background; - - if (bg == mxConstants.NONE) - { - bg = null; - } - - if (bg == null) - { - bg = background; - } - - // Handles special case where background is null but transparent is false - if (bg == null && transparentBackground == false) - { - bg = '#ffffff'; - } - - this.convertImages(graph.getSvg(bg, null, null, noCrop, null, ignoreSelection, null, null, null, addShadow), - mxUtils.bind(this, function(svgRoot) + try { - var img = new Image(); + limitHeight = (limitHeight != null) ? limitHeight : true; + ignoreSelection = (ignoreSelection != null) ? ignoreSelection : true; + graph = (graph != null) ? graph : this.editor.graph; + border = (border != null) ? border : 0; + + var bg = (transparentBackground) ? null : graph.background; - img.onload = mxUtils.bind(this, function() + if (bg == mxConstants.NONE) { - try - { - var canvas = document.createElement('canvas'); - var w = parseInt(svgRoot.getAttribute('width')); - var h = parseInt(svgRoot.getAttribute('height')); - scale = (scale != null) ? scale : 1; - - if (width != null) - { - scale = (!limitHeight) ? width / w : Math.min(1, Math.min((width * 3) / (h * 4), width / w)); - } - - w = Math.ceil(scale * w) + 2 * border; - h = Math.ceil(scale * h) + 2 * border; - - canvas.setAttribute('width', w); - canvas.setAttribute('height', h); - var ctx = canvas.getContext('2d'); - - if (bg != null) + bg = null; + } + + if (bg == null) + { + bg = background; + } + + // Handles special case where background is null but transparent is false + if (bg == null && transparentBackground == false) + { + bg = '#ffffff'; + } + + this.convertImages(graph.getSvg(bg, null, null, noCrop, null, ignoreSelection, null, null, null, addShadow), + mxUtils.bind(this, function(svgRoot) + { + var img = new Image(); + + img.onload = mxUtils.bind(this, function() + { + try { - ctx.beginPath(); - ctx.rect(0, 0, w, h); - ctx.fillStyle = bg; - ctx.fill(); - } - - ctx.scale(scale, scale); - - // Workaround for broken data URI images in Safari on first export - if (mxClient.IS_SF) - { - window.setTimeout(function() + var canvas = document.createElement('canvas'); + var w = parseInt(svgRoot.getAttribute('width')); + var h = parseInt(svgRoot.getAttribute('height')); + scale = (scale != null) ? scale : 1; + + if (width != null) { - ctx.drawImage(img, border / scale, border / scale); - callback(canvas); - }, 0); + scale = (!limitHeight) ? width / w : Math.min(1, Math.min((width * 3) / (h * 4), width / w)); + } + + w = Math.ceil(scale * w) + 2 * border; + h = Math.ceil(scale * h) + 2 * border; + + canvas.setAttribute('width', w); + canvas.setAttribute('height', h); + var ctx = canvas.getContext('2d'); + + if (bg != null) + { + ctx.beginPath(); + ctx.rect(0, 0, w, h); + ctx.fillStyle = bg; + ctx.fill(); + } + + ctx.scale(scale, scale); + + // Workaround for broken data URI images in Safari on first export + if (mxClient.IS_SF) + { + window.setTimeout(function() + { + ctx.drawImage(img, border / scale, border / scale); + callback(canvas); + }, 0); + } + else + { + ctx.drawImage(img, border / scale, border / scale); + callback(canvas); + } } - else + catch (e) { - ctx.drawImage(img, border / scale, border / scale); - callback(canvas); + if (error != null) + { + error(e); + } } - } - catch (e) - { - if (error != null) + }); + + img.onerror = function(e) + { + //console.log('img', e, img.src); + + if (error != null) { error(e); } - } - }); - - img.onerror = function(e) - { - //console.log('img', e, img.src); - - if (error != null) - { - error(e); - } - }; - - try - { - if (addShadow) - { - this.editor.graph.addSvgShadow(svgRoot); - } - - var done = mxUtils.bind(this, function() + }; + + try { - if (this.editor.resolvedFontCss != null) + if (addShadow) { - var st = document.createElement('style'); - st.setAttribute('type', 'text/css'); - st.innerHTML = this.editor.resolvedFontCss; - - // Must be in defs section for FF to work - var defs = svgRoot.getElementsByTagName('defs'); - defs[0].appendChild(st); + this.editor.graph.addSvgShadow(svgRoot); } - this.convertMath(graph, svgRoot, true, mxUtils.bind(this, function() + var done = mxUtils.bind(this, function() { - img.src = this.createSvgDataUri(mxUtils.getXml(svgRoot)); - })); - }); - - this.loadFonts(done); - } - catch (e) - { - //console.log('src', e, img.src); - - if (error != null) + if (this.editor.resolvedFontCss != null) + { + var st = document.createElement('style'); + st.setAttribute('type', 'text/css'); + st.innerHTML = this.editor.resolvedFontCss; + + // Must be in defs section for FF to work + var defs = svgRoot.getElementsByTagName('defs'); + defs[0].appendChild(st); + } + + this.convertMath(graph, svgRoot, true, mxUtils.bind(this, function() + { + img.src = this.createSvgDataUri(mxUtils.getXml(svgRoot)); + })); + }); + + this.loadFonts(done); + } + catch (e) { - error(e); + //console.log('src', e, img.src); + + if (error != null) + { + error(e); + } } + }), imageCache, converter); + } + catch (e) + { + if (error != null) + { + error(e); } - }), imageCache, converter); + } }; /** @@ -6819,7 +6829,7 @@ } EditorUi.logEvent({category: ext + '-MS-IMPORT-FILE', - action: 'size_' + file.size, + action: 'filename_' + filename, label: (remote) ? 'remote' : 'local'}); } catch (e) @@ -13363,9 +13373,9 @@ var CommentsWindow = function(editorUi, x, y, w, h, saveCallback) editComment(curEdited.comment, curEdited.div, curEdited.saveCallback, curEdited.deleteOnCancel); } - }, function(errMsg) + }, function(err) { - listDiv.innerHTML = mxUtils.htmlEntities(mxResources.get('error') + (errMsg? ': ' + errMsg : '')); + listDiv.innerHTML = mxUtils.htmlEntities(mxResources.get('error') + (err && err.message? ': ' + err.message : '')); }); } else diff --git a/src/main/webapp/js/diagramly/Init.js b/src/main/webapp/js/diagramly/Init.js index 9c21d9ba1ad3fbfc31b301a21fcc1357b03a0759..7958ce6cc7ca4206d5a5f39fea369b09fe45b005 100644 --- a/src/main/webapp/js/diagramly/Init.js +++ b/src/main/webapp/js/diagramly/Init.js @@ -15,7 +15,7 @@ window.EXPORT_URL = window.EXPORT_URL || 'https://exp.draw.io/ImageExport4/expor window.PLANT_URL = window.PLANT_URL || 'https://exp-plant.draw.io/plantuml4'; window.DRAW_MATH_URL = window.DRAW_MATH_URL || 'https://www.draw.io/math'; window.VSD_CONVERT_URL = window.VSD_CONVERT_URL || "https://convert.draw.io/VsdConverter/api/converter"; -window.EMF_CONVERT_URL = window.EMF_CONVERT_URL || "convert"; +window.EMF_CONVERT_URL = window.EMF_CONVERT_URL || "https://convert.draw.io/emf2png/convertEMF"; window.SAVE_URL = window.SAVE_URL || 'save'; window.OPEN_URL = window.OPEN_URL || 'open'; window.PROXY_URL = window.PROXY_URL || 'proxy'; diff --git a/src/main/webapp/js/viewer.min.js b/src/main/webapp/js/viewer.min.js index 4dab90bfb9e811533739ac2de747bf96b9b933c0..880e48fa1c357afef7afc58a3e222d8b2f46c9c9 100644 --- a/src/main/webapp/js/viewer.min.js +++ b/src/main/webapp/js/viewer.min.js @@ -99,7 +99,7 @@ l--,_+=n[s++]<<u,u+=8}if(a.nlen=(31&_)+257,_>>>=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<a.length;)d=a.charCodeAt(m++),e=a.charCodeAt(m++),f=a.charCodeAt(m++),g=d>>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<a.length;)d=this._keyStr.indexOf(a.charAt(l++)),e=this._keyStr.indexOf(a.charAt(l++)),g=this._keyStr.indexOf(a.charAt(l++)),k=this._keyStr.indexOf(a.charAt(l++)),d=d<<2|e>>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;c<a.length;c++){var d=a.charCodeAt(c);128>d?b+=String.fromCharCode(d):(127<d&&2048>d?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;c<a.length;)d=a.charCodeAt(c),128>d?(b+=String.fromCharCode(d),c++):191<d&&224>d?(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.mxLoadSettings=window.mxLoadSettings||"1"!=urlParams.configure;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.PLANT_URL=window.PLANT_URL||"https://exp-plant.draw.io/plantuml4";window.DRAW_MATH_URL=window.DRAW_MATH_URL||"https://www.draw.io/math"; -window.VSD_CONVERT_URL=window.VSD_CONVERT_URL||"https://convert.draw.io/VsdConverter/api/converter";window.EMF_CONVERT_URL=window.EMF_CONVERT_URL||"convert";window.SAVE_URL=window.SAVE_URL||"save";window.OPEN_URL=window.OPEN_URL||"open";window.PROXY_URL=window.PROXY_URL||"proxy";window.VIEWER_URL=null;window.SHAPES_PATH=window.SHAPES_PATH||"shapes";window.GRAPH_IMAGE_PATH=window.GRAPH_IMAGE_PATH||"img"; +window.VSD_CONVERT_URL=window.VSD_CONVERT_URL||"https://convert.draw.io/VsdConverter/api/converter";window.EMF_CONVERT_URL=window.EMF_CONVERT_URL||"https://convert.draw.io/emf2png/convertEMF";window.SAVE_URL=window.SAVE_URL||"save";window.OPEN_URL=window.OPEN_URL||"open";window.PROXY_URL=window.PROXY_URL||"proxy";window.VIEWER_URL=null;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.NEW_DIAGRAM_CATS_PATH=window.NEW_DIAGRAM_CATS_PATH||"newDiagramCats";window.PLUGINS_BASE_PATH=window.PLUGINS_BASE_PATH||"";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:"ไทย", @@ -2013,11 +2013,11 @@ Editor.prototype.setFilename=function(a){this.filename=a}; Editor.prototype.createUndoManager=function(){var a=this.graph,b=new mxUndoManager;this.undoListener=function(a,e){b.undoableEditHappened(e.getProperty("edit"))};var e=mxUtils.bind(this,function(a,b){this.undoListener.apply(this,arguments)});a.getModel().addListener(mxEvent.UNDO,e);a.getView().addListener(mxEvent.UNDO,e);e=function(b,e){var d=a.getSelectionCellsForChanges(e.getProperty("edit").changes);a.getModel();for(var l=[],t=0;t<d.length;t++)null!=a.view.getState(d[t])&&l.push(d[t]);a.setSelectionCells(l)}; b.addListener(mxEvent.UNDO,e);b.addListener(mxEvent.REDO,e);return b};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(a){this.consumer=this.producer=null;this.done=a;this.args=null};OpenFile.prototype.setConsumer=function(a){this.consumer=a;this.execute()};OpenFile.prototype.setData=function(){this.args=arguments;this.execute()};OpenFile.prototype.error=function(a){this.cancel(!0);mxUtils.alert(a)}; OpenFile.prototype.execute=function(){null!=this.consumer&&null!=this.args&&(this.cancel(!1),this.consumer.apply(this,this.args))};OpenFile.prototype.cancel=function(a){null!=this.done&&this.done(null!=a?a:!0)}; -function Dialog(a,b,e,d,l,m,r,t,x,z,c){var f=0;mxClient.IS_VML&&(null==document.documentMode||8>document.documentMode)&&(f=80);e+=f;d+=f;var k=e,p=d,n=mxUtils.getDocumentSize(),g=n.height,A=Math.max(1,Math.round((n.width-e-64)/2)),y=Math.max(1,Math.round((g-d-a.footerHeight)/3));mxClient.IS_QUIRKS||(b.style.maxHeight="100%");e=null!=document.body?Math.min(e,document.body.scrollWidth-64):e;d=Math.min(d,g-64);0<a.dialogs.length&&(this.zIndex+=2*a.dialogs.length);null==this.bg&&(this.bg=a.createDiv("background"), -this.bg.style.position="absolute",this.bg.style.background=Dialog.backdropColor,this.bg.style.height=g+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity),mxClient.IS_QUIRKS&&new mxDivResizer(this.bg));n=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=n.x+"px";this.bg.style.top=n.y+"px";A+=n.x;y+=n.y;l&&document.body.appendChild(this.bg);var u=a.createDiv(x?"geTransDialog":"geDialog");l=this.getPosition(A,y,e,d);A=l.x;y=l.y;u.style.width= -e+"px";u.style.height=d+"px";u.style.left=A+"px";u.style.top=y+"px";u.style.zIndex=this.zIndex;u.appendChild(b);document.body.appendChild(u);!t&&b.clientHeight>u.clientHeight-64&&(b.style.overflowY="auto");m&&(m=document.createElement("img"),m.setAttribute("src",Dialog.prototype.closeImage),m.setAttribute("title",mxResources.get("close")),m.className="geDialogClose",m.style.top=y+14+"px",m.style.left=A+e+38-f+"px",m.style.zIndex=this.zIndex,mxEvent.addListener(m,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})), -document.body.appendChild(m),this.dialogImg=m,c||mxEvent.addGestureListeners(this.bg,null,null,mxUtils.bind(this,function(c){a.hideDialog(!0)})));this.resizeListener=mxUtils.bind(this,function(){if(null!=z){var c=z();null!=c&&(k=e=c.w,p=d=c.h)}c=mxUtils.getDocumentSize();g=c.height;this.bg.style.height=g+"px";A=Math.max(1,Math.round((c.width-e-64)/2));y=Math.max(1,Math.round((g-d-a.footerHeight)/3));e=null!=document.body?Math.min(k,document.body.scrollWidth-64):k;d=Math.min(p,g-64);c=this.getPosition(A, -y,e,d);A=c.x;y=c.y;u.style.left=A+"px";u.style.top=y+"px";u.style.width=e+"px";u.style.height=d+"px";!t&&b.clientHeight>u.clientHeight-64&&(b.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=y+14+"px",this.dialogImg.style.left=A+e+38-f+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=r;this.container=u;a.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-1; +function Dialog(a,b,e,d,l,m,r,t,x,A,c){var f=0;mxClient.IS_VML&&(null==document.documentMode||8>document.documentMode)&&(f=80);e+=f;d+=f;var k=e,p=d,n=mxUtils.getDocumentSize(),g=n.height,y=Math.max(1,Math.round((n.width-e-64)/2)),z=Math.max(1,Math.round((g-d-a.footerHeight)/3));mxClient.IS_QUIRKS||(b.style.maxHeight="100%");e=null!=document.body?Math.min(e,document.body.scrollWidth-64):e;d=Math.min(d,g-64);0<a.dialogs.length&&(this.zIndex+=2*a.dialogs.length);null==this.bg&&(this.bg=a.createDiv("background"), +this.bg.style.position="absolute",this.bg.style.background=Dialog.backdropColor,this.bg.style.height=g+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity),mxClient.IS_QUIRKS&&new mxDivResizer(this.bg));n=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=n.x+"px";this.bg.style.top=n.y+"px";y+=n.x;z+=n.y;l&&document.body.appendChild(this.bg);var u=a.createDiv(x?"geTransDialog":"geDialog");l=this.getPosition(y,z,e,d);y=l.x;z=l.y;u.style.width= +e+"px";u.style.height=d+"px";u.style.left=y+"px";u.style.top=z+"px";u.style.zIndex=this.zIndex;u.appendChild(b);document.body.appendChild(u);!t&&b.clientHeight>u.clientHeight-64&&(b.style.overflowY="auto");m&&(m=document.createElement("img"),m.setAttribute("src",Dialog.prototype.closeImage),m.setAttribute("title",mxResources.get("close")),m.className="geDialogClose",m.style.top=z+14+"px",m.style.left=y+e+38-f+"px",m.style.zIndex=this.zIndex,mxEvent.addListener(m,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})), +document.body.appendChild(m),this.dialogImg=m,c||mxEvent.addGestureListeners(this.bg,null,null,mxUtils.bind(this,function(c){a.hideDialog(!0)})));this.resizeListener=mxUtils.bind(this,function(){if(null!=A){var c=A();null!=c&&(k=e=c.w,p=d=c.h)}c=mxUtils.getDocumentSize();g=c.height;this.bg.style.height=g+"px";y=Math.max(1,Math.round((c.width-e-64)/2));z=Math.max(1,Math.round((g-d-a.footerHeight)/3));e=null!=document.body?Math.min(k,document.body.scrollWidth-64):k;d=Math.min(p,g-64);c=this.getPosition(y, +z,e,d);y=c.x;z=c.y;u.style.left=y+"px";u.style.top=z+"px";u.style.width=e+"px";u.style.height=d+"px";!t&&b.clientHeight>u.clientHeight-64&&(b.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=z+14+"px",this.dialogImg.style.left=y+e+38-f+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=r;this.container=u;a.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-1; Dialog.prototype.noColorImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkEzRDlBMUUwODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkEzRDlBMUUxODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QTNEOUExREU4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QTNEOUExREY4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5xh3fmAAAABlBMVEX////MzMw46qqDAAAAGElEQVR42mJggAJGKGAYIIGBth8KAAIMAEUQAIElnLuQAAAAAElFTkSuQmCC": IMAGE_PATH+"/nocolor.png";Dialog.prototype.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJAQMAAADaX5RTAAAABlBMVEV7mr3///+wksspAAAAAnRSTlP/AOW3MEoAAAAdSURBVAgdY9jXwCDDwNDRwHCwgeExmASygSL7GgB12QiqNHZZIwAAAABJRU5ErkJggg==":IMAGE_PATH+"/close.png"; Dialog.prototype.clearImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDQAKAIABAMDAwP///yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OUIzOEM1NzI4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OUIzOEM1NzM4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo5QjM4QzU3MDg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo5QjM4QzU3MTg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAEAAAEALAAAAAANAAoAAAIXTGCJebD9jEOTqRlttXdrB32PJ2ncyRQAOw==":IMAGE_PATH+ @@ -2026,32 +2026,32 @@ Dialog.prototype.lockedImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoA "/locked.png"; Dialog.prototype.unlockedImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAMAAABhq6zVAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MzdDMDZCN0QxNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MzdDMDZCN0UxNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDozN0MwNkI3QjE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDozN0MwNkI3QzE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PkKMpVwAAAAYUExURZmZmbKysr+/v6ysrOXl5czMzLGxsf///zHN5lwAAAAIdFJOU/////////8A3oO9WQAAADxJREFUeNpUzFESACAEBNBVsfe/cZJU+8Mzs8CIABCidtfGOndnYsT40HDSiCcbPdoJo10o9aI677cpwACRoAF3dFNlswAAAABJRU5ErkJggg==":IMAGE_PATH+ "/unlocked.png";Dialog.prototype.bgOpacity=80;Dialog.prototype.getPosition=function(a,b){return new mxPoint(a,b)};Dialog.prototype.close=function(a,b){if(null!=this.onDialogClose){if(0==this.onDialogClose(a,b))return!1;this.onDialogClose=null}null!=this.dialogImg&&(this.dialogImg.parentNode.removeChild(this.dialogImg),this.dialogImg=null);null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);mxEvent.removeListener(window,"resize",this.resizeListener);this.container.parentNode.removeChild(this.container)}; -var ErrorDialog=function(a,b,e,d,l,m,r,t,x,z,c){x=null!=x?x:!0;var f=document.createElement("div");f.style.textAlign="center";if(null!=b){var k=document.createElement("div");k.style.padding="0px";k.style.margin="0px";k.style.fontSize="18px";k.style.paddingBottom="16px";k.style.marginBottom="10px";k.style.borderBottom="1px solid #c0c0c0";k.style.color="gray";k.style.whiteSpace="nowrap";k.style.textOverflow="ellipsis";k.style.overflow="hidden";mxUtils.write(k,b);k.setAttribute("title",b);f.appendChild(k)}b= -document.createElement("div");b.style.lineHeight="1.2em";b.style.padding="6px";b.innerHTML=e;f.appendChild(b);e=document.createElement("div");e.style.marginTop="12px";e.style.textAlign="center";null!=m&&(b=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();m()}),b.className="geBtn",e.appendChild(b),e.style.textAlign="center");null!=z&&(z=mxUtils.button(z,function(){null!=c&&c()}),z.className="geBtn",e.appendChild(z));var p=mxUtils.button(d,function(){x&&a.hideDialog();null!=l&&l()}); +var ErrorDialog=function(a,b,e,d,l,m,r,t,x,A,c){x=null!=x?x:!0;var f=document.createElement("div");f.style.textAlign="center";if(null!=b){var k=document.createElement("div");k.style.padding="0px";k.style.margin="0px";k.style.fontSize="18px";k.style.paddingBottom="16px";k.style.marginBottom="10px";k.style.borderBottom="1px solid #c0c0c0";k.style.color="gray";k.style.whiteSpace="nowrap";k.style.textOverflow="ellipsis";k.style.overflow="hidden";mxUtils.write(k,b);k.setAttribute("title",b);f.appendChild(k)}b= +document.createElement("div");b.style.lineHeight="1.2em";b.style.padding="6px";b.innerHTML=e;f.appendChild(b);e=document.createElement("div");e.style.marginTop="12px";e.style.textAlign="center";null!=m&&(b=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();m()}),b.className="geBtn",e.appendChild(b),e.style.textAlign="center");null!=A&&(A=mxUtils.button(A,function(){null!=c&&c()}),A.className="geBtn",e.appendChild(A));var p=mxUtils.button(d,function(){x&&a.hideDialog();null!=l&&l()}); p.className="geBtn";e.appendChild(p);null!=r&&(d=mxUtils.button(r,function(){x&&a.hideDialog();null!=t&&t()}),d.className="geBtn gePrimaryBtn",e.appendChild(d));this.init=function(){p.focus()};f.appendChild(e);this.container=f},PrintDialog=function(a,b){this.create(a,b)}; -PrintDialog.prototype.create=function(a){function b(a){var b=t.checked||z.checked,d=parseInt(f.value)/100;isNaN(d)&&(d=1,f.value="100%");var d=.75*d,k=e.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,p=1/e.pageScale;if(b){var u=t.checked?1:parseInt(c.value);isNaN(u)||(p=mxUtils.getScaleForPageCount(u,e,k))}e.getGraphBounds();var l=u=0,k=mxRectangle.fromRectangle(k);k.width=Math.ceil(k.width*d);k.height=Math.ceil(k.height*d);p*=d;!b&&e.pageVisible?(d=e.getPageLayout(),u-=d.x*k.width,l-=d.y*k.height): +PrintDialog.prototype.create=function(a){function b(a){var b=t.checked||A.checked,d=parseInt(f.value)/100;isNaN(d)&&(d=1,f.value="100%");var d=.75*d,k=e.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,p=1/e.pageScale;if(b){var u=t.checked?1:parseInt(c.value);isNaN(u)||(p=mxUtils.getScaleForPageCount(u,e,k))}e.getGraphBounds();var l=u=0,k=mxRectangle.fromRectangle(k);k.width=Math.ceil(k.width*d);k.height=Math.ceil(k.height*d);p*=d;!b&&e.pageVisible?(d=e.getPageLayout(),u-=d.x*k.width,l-=d.y*k.height): b=!0;b=PrintDialog.createPrintPreview(e,p,k,0,u,l,b);b.open();a&&PrintDialog.printPreview(b)}var e=a.editor.graph,d,l,m=document.createElement("table");m.style.width="100%";m.style.height="100%";var r=document.createElement("tbody");d=document.createElement("tr");var t=document.createElement("input");t.setAttribute("type","checkbox");l=document.createElement("td");l.setAttribute("colspan","2");l.style.fontSize="10pt";l.appendChild(t);var x=document.createElement("span");mxUtils.write(x," "+mxResources.get("fitPage")); -l.appendChild(x);mxEvent.addListener(x,"click",function(a){t.checked=!t.checked;z.checked=!t.checked;mxEvent.consume(a)});mxEvent.addListener(t,"change",function(){z.checked=!t.checked});d.appendChild(l);r.appendChild(d);d=d.cloneNode(!1);var z=document.createElement("input");z.setAttribute("type","checkbox");l=document.createElement("td");l.style.fontSize="10pt";l.appendChild(z);x=document.createElement("span");mxUtils.write(x," "+mxResources.get("posterPrint")+":");l.appendChild(x);mxEvent.addListener(x, -"click",function(a){z.checked=!z.checked;t.checked=!z.checked;mxEvent.consume(a)});d.appendChild(l);var c=document.createElement("input");c.setAttribute("value","1");c.setAttribute("type","number");c.setAttribute("min","1");c.setAttribute("size","4");c.setAttribute("disabled","disabled");c.style.width="50px";l=document.createElement("td");l.style.fontSize="10pt";l.appendChild(c);mxUtils.write(l," "+mxResources.get("pages")+" (max)");d.appendChild(l);r.appendChild(d);mxEvent.addListener(z,"change", -function(){z.checked?c.removeAttribute("disabled"):c.setAttribute("disabled","disabled");t.checked=!z.checked});d=d.cloneNode(!1);l=document.createElement("td");mxUtils.write(l,mxResources.get("pageScale")+":");d.appendChild(l);l=document.createElement("td");var f=document.createElement("input");f.setAttribute("value","100 %");f.setAttribute("size","5");f.style.width="50px";l.appendChild(f);d.appendChild(l);r.appendChild(d);d=document.createElement("tr");l=document.createElement("td");l.colSpan=2; +l.appendChild(x);mxEvent.addListener(x,"click",function(a){t.checked=!t.checked;A.checked=!t.checked;mxEvent.consume(a)});mxEvent.addListener(t,"change",function(){A.checked=!t.checked});d.appendChild(l);r.appendChild(d);d=d.cloneNode(!1);var A=document.createElement("input");A.setAttribute("type","checkbox");l=document.createElement("td");l.style.fontSize="10pt";l.appendChild(A);x=document.createElement("span");mxUtils.write(x," "+mxResources.get("posterPrint")+":");l.appendChild(x);mxEvent.addListener(x, +"click",function(a){A.checked=!A.checked;t.checked=!A.checked;mxEvent.consume(a)});d.appendChild(l);var c=document.createElement("input");c.setAttribute("value","1");c.setAttribute("type","number");c.setAttribute("min","1");c.setAttribute("size","4");c.setAttribute("disabled","disabled");c.style.width="50px";l=document.createElement("td");l.style.fontSize="10pt";l.appendChild(c);mxUtils.write(l," "+mxResources.get("pages")+" (max)");d.appendChild(l);r.appendChild(d);mxEvent.addListener(A,"change", +function(){A.checked?c.removeAttribute("disabled"):c.setAttribute("disabled","disabled");t.checked=!A.checked});d=d.cloneNode(!1);l=document.createElement("td");mxUtils.write(l,mxResources.get("pageScale")+":");d.appendChild(l);l=document.createElement("td");var f=document.createElement("input");f.setAttribute("value","100 %");f.setAttribute("size","5");f.style.width="50px";l.appendChild(f);d.appendChild(l);r.appendChild(d);d=document.createElement("tr");l=document.createElement("td");l.colSpan=2; l.style.paddingTop="20px";l.setAttribute("align","right");x=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});x.className="geBtn";a.editor.cancelFirst&&l.appendChild(x);if(PrintDialog.previewEnabled){var k=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();b(!1)});k.className="geBtn";l.appendChild(k)}k=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();b(!0)});k.className="geBtn gePrimaryBtn";l.appendChild(k);a.editor.cancelFirst|| l.appendChild(x);d.appendChild(l);r.appendChild(d);m.appendChild(r);this.container=m};PrintDialog.printPreview=function(a){try{if(null!=a.wnd){var b=function(){a.wnd.focus();a.wnd.print();a.wnd.close()};mxClient.IS_GC?window.setTimeout(b,500):b()}}catch(e){}}; PrintDialog.createPrintPreview=function(a,b,e,d,l,m,r){b=new mxPrintPreview(a,b,e,d,l,m);b.title=mxResources.get("preview");b.printBackgroundImage=!0;b.autoOrigin=r;a=a.background;if(null==a||""==a||a==mxConstants.NONE)a="#ffffff";b.backgroundColor=a;var t=b.writeHead;b.writeHead=function(a){t.apply(this,arguments);a.writeln('<style type="text/css">');a.writeln("@media screen {");a.writeln(" body > div { padding:30px;box-sizing:content-box; }");a.writeln("}");a.writeln("</style>")};return b}; PrintDialog.previewEnabled=!0; -var PageSetupDialog=function(a){function b(){null==c||c==mxConstants.NONE?(z.style.backgroundColor="",z.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(z.style.backgroundColor=c,z.style.backgroundImage="")}function e(){null==p?(k.removeAttribute("title"),k.style.fontSize="",k.innerHTML=mxResources.get("change")+"..."):(k.setAttribute("title",p.src),k.style.fontSize="11px",k.innerHTML=p.src.substring(0,42)+"...")}var d=a.editor.graph,l,m,r=document.createElement("table");r.style.width= +var PageSetupDialog=function(a){function b(){null==c||c==mxConstants.NONE?(A.style.backgroundColor="",A.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(A.style.backgroundColor=c,A.style.backgroundImage="")}function e(){null==p?(k.removeAttribute("title"),k.style.fontSize="",k.innerHTML=mxResources.get("change")+"..."):(k.setAttribute("title",p.src),k.style.fontSize="11px",k.innerHTML=p.src.substring(0,42)+"...")}var d=a.editor.graph,l,m,r=document.createElement("table");r.style.width= "100%";r.style.height="100%";var t=document.createElement("tbody");l=document.createElement("tr");m=document.createElement("td");m.style.verticalAlign="top";m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("paperSize")+":");l.appendChild(m);m=document.createElement("td");m.style.verticalAlign="top";m.style.fontSize="10pt";var x=PageSetupDialog.addPageFormatPanel(m,"pagesetupdialog",d.pageFormat);l.appendChild(m);t.appendChild(l);l=document.createElement("tr");m=document.createElement("td"); -mxUtils.write(m,mxResources.get("background")+":");l.appendChild(m);m=document.createElement("td");m.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var z=document.createElement("button");z.style.width="18px";z.style.height="18px";z.style.marginRight="20px";z.style.backgroundPosition="center center";z.style.backgroundRepeat="no-repeat";var c=d.background;b();mxEvent.addListener(z,"click",function(f){a.pickColor(c||"none",function(a){c=a;b()});mxEvent.consume(f)}); -m.appendChild(z);mxUtils.write(m,mxResources.get("gridSize")+":");var f=document.createElement("input");f.setAttribute("type","number");f.setAttribute("min","0");f.style.width="40px";f.style.marginLeft="6px";f.value=d.getGridSize();m.appendChild(f);mxEvent.addListener(f,"change",function(){var a=parseInt(f.value);f.value=Math.max(1,isNaN(a)?d.getGridSize():a)});l.appendChild(m);t.appendChild(l);l=document.createElement("tr");m=document.createElement("td");mxUtils.write(m,mxResources.get("image")+ +mxUtils.write(m,mxResources.get("background")+":");l.appendChild(m);m=document.createElement("td");m.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var A=document.createElement("button");A.style.width="18px";A.style.height="18px";A.style.marginRight="20px";A.style.backgroundPosition="center center";A.style.backgroundRepeat="no-repeat";var c=d.background;b();mxEvent.addListener(A,"click",function(f){a.pickColor(c||"none",function(a){c=a;b()});mxEvent.consume(f)}); +m.appendChild(A);mxUtils.write(m,mxResources.get("gridSize")+":");var f=document.createElement("input");f.setAttribute("type","number");f.setAttribute("min","0");f.style.width="40px";f.style.marginLeft="6px";f.value=d.getGridSize();m.appendChild(f);mxEvent.addListener(f,"change",function(){var a=parseInt(f.value);f.value=Math.max(1,isNaN(a)?d.getGridSize():a)});l.appendChild(m);t.appendChild(l);l=document.createElement("tr");m=document.createElement("td");mxUtils.write(m,mxResources.get("image")+ ":");l.appendChild(m);m=document.createElement("td");var k=document.createElement("a");k.style.textDecoration="underline";k.style.cursor="pointer";k.style.color="#a0a0a0";var p=d.backgroundImage;mxEvent.addListener(k,"click",function(c){a.showBackgroundImageDialog(function(a){p=a;e()});mxEvent.consume(c)});e();m.appendChild(k);l.appendChild(m);t.appendChild(l);l=document.createElement("tr");m=document.createElement("td");m.colSpan=2;m.style.paddingTop="16px";m.setAttribute("align","right");var n= mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});n.className="geBtn";a.editor.cancelFirst&&m.appendChild(n);var g=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();d.gridSize!==f.value&&d.setGridSize(parseInt(f.value));var b=new ChangePageSetup(a,c,p,x.get());b.ignoreColor=d.background==c;b.ignoreImage=(null!=d.backgroundImage?d.backgroundImage.src:null)===(null!=p?p.src:null);d.pageFormat.width==b.previousFormat.width&&d.pageFormat.height==b.previousFormat.height&& b.ignoreColor&&b.ignoreImage||d.model.execute(b)});g.className="geBtn gePrimaryBtn";m.appendChild(g);a.editor.cancelFirst||m.appendChild(n);l.appendChild(m);t.appendChild(l);r.appendChild(t);this.container=r}; PageSetupDialog.addPageFormatPanel=function(a,b,e,d){function l(a,b,d){if(d||f!=document.activeElement&&k!=document.activeElement){a=!1;for(b=0;b<n.length;b++)d=n[b],u?"custom"==d.key&&(t.value=d.key,u=!1):null!=d.format&&("a4"==d.key?826==e.width?(e=mxRectangle.fromRectangle(e),e.width=827):826==e.height&&(e=mxRectangle.fromRectangle(e),e.height=827):"a5"==d.key&&(584==e.width?(e=mxRectangle.fromRectangle(e),e.width=583):584==e.height&&(e=mxRectangle.fromRectangle(e),e.height=583)),e.width==d.format.width&& e.height==d.format.height?(t.value=d.key,m.setAttribute("checked","checked"),m.defaultChecked=!0,m.checked=!0,r.removeAttribute("checked"),r.defaultChecked=!1,r.checked=!1,a=!0):e.width==d.format.height&&e.height==d.format.width&&(t.value=d.key,m.removeAttribute("checked"),m.defaultChecked=!1,m.checked=!1,r.setAttribute("checked","checked"),r.defaultChecked=!0,a=r.checked=!0));a?(x.style.display="",c.style.display="none"):(f.value=e.width/100,k.value=e.height/100,m.setAttribute("checked","checked"), t.value="custom",x.style.display="none",c.style.display="")}}b="format-"+b;var m=document.createElement("input");m.setAttribute("name",b);m.setAttribute("type","radio");m.setAttribute("value","portrait");var r=document.createElement("input");r.setAttribute("name",b);r.setAttribute("type","radio");r.setAttribute("value","landscape");var t=document.createElement("select");t.style.marginBottom="8px";t.style.width="202px";var x=document.createElement("div");x.style.marginLeft="4px";x.style.width="210px"; -x.style.height="24px";m.style.marginRight="6px";x.appendChild(m);b=document.createElement("span");b.style.maxWidth="100px";mxUtils.write(b,mxResources.get("portrait"));x.appendChild(b);r.style.marginLeft="10px";r.style.marginRight="6px";x.appendChild(r);var z=document.createElement("span");z.style.width="100px";mxUtils.write(z,mxResources.get("landscape"));x.appendChild(z);var c=document.createElement("div");c.style.marginLeft="4px";c.style.width="210px";c.style.height="24px";var f=document.createElement("input"); -f.setAttribute("size","7");f.style.textAlign="right";c.appendChild(f);mxUtils.write(c," in x ");var k=document.createElement("input");k.setAttribute("size","7");k.style.textAlign="right";c.appendChild(k);mxUtils.write(c," in");x.style.display="none";c.style.display="none";for(var p={},n=PageSetupDialog.getFormats(),g=0;g<n.length;g++){var A=n[g];p[A.key]=A;var y=document.createElement("option");y.setAttribute("value",A.key);mxUtils.write(y,A.title);t.appendChild(y)}var u=!1;l();a.appendChild(t);mxUtils.br(a); +x.style.height="24px";m.style.marginRight="6px";x.appendChild(m);b=document.createElement("span");b.style.maxWidth="100px";mxUtils.write(b,mxResources.get("portrait"));x.appendChild(b);r.style.marginLeft="10px";r.style.marginRight="6px";x.appendChild(r);var A=document.createElement("span");A.style.width="100px";mxUtils.write(A,mxResources.get("landscape"));x.appendChild(A);var c=document.createElement("div");c.style.marginLeft="4px";c.style.width="210px";c.style.height="24px";var f=document.createElement("input"); +f.setAttribute("size","7");f.style.textAlign="right";c.appendChild(f);mxUtils.write(c," in x ");var k=document.createElement("input");k.setAttribute("size","7");k.style.textAlign="right";c.appendChild(k);mxUtils.write(c," in");x.style.display="none";c.style.display="none";for(var p={},n=PageSetupDialog.getFormats(),g=0;g<n.length;g++){var y=n[g];p[y.key]=y;var z=document.createElement("option");z.setAttribute("value",y.key);mxUtils.write(z,y.title);t.appendChild(z)}var u=!1;l();a.appendChild(t);mxUtils.br(a); a.appendChild(x);a.appendChild(c);var F=e,v=function(a,b){var g=p[t.value];null!=g.format?(f.value=g.format.width/100,k.value=g.format.height/100,c.style.display="none",x.style.display=""):(x.style.display="none",c.style.display="");g=parseFloat(f.value);if(isNaN(g)||0>=g)f.value=e.width/100;g=parseFloat(k.value);if(isNaN(g)||0>=g)k.value=e.height/100;g=new mxRectangle(0,0,Math.floor(100*parseFloat(f.value)),Math.floor(100*parseFloat(k.value)));"custom"!=t.value&&r.checked&&(g=new mxRectangle(0,0, -g.height,g.width));b&&u||g.width==F.width&&g.height==F.height||(F=g,null!=d&&d(F))};mxEvent.addListener(b,"click",function(a){m.checked=!0;v(a);mxEvent.consume(a)});mxEvent.addListener(z,"click",function(a){r.checked=!0;v(a);mxEvent.consume(a)});mxEvent.addListener(f,"blur",v);mxEvent.addListener(f,"click",v);mxEvent.addListener(k,"blur",v);mxEvent.addListener(k,"click",v);mxEvent.addListener(r,"change",v);mxEvent.addListener(m,"change",v);mxEvent.addListener(t,"change",function(a){u="custom"==t.value; +g.height,g.width));b&&u||g.width==F.width&&g.height==F.height||(F=g,null!=d&&d(F))};mxEvent.addListener(b,"click",function(a){m.checked=!0;v(a);mxEvent.consume(a)});mxEvent.addListener(A,"click",function(a){r.checked=!0;v(a);mxEvent.consume(a)});mxEvent.addListener(f,"blur",v);mxEvent.addListener(f,"click",v);mxEvent.addListener(k,"blur",v);mxEvent.addListener(k,"click",v);mxEvent.addListener(r,"change",v);mxEvent.addListener(m,"change",v);mxEvent.addListener(t,"change",function(a){u="custom"==t.value; v(a,!0)});v();return{set:function(a){e=a;l(null,null,!0)},get:function(){return F},widthInput:f,heightInput:k}}; PageSetupDialog.getFormats=function(){return[{key:"letter",title:'US-Letter (8,5" x 11")',format:mxConstants.PAGE_FORMAT_LETTER_PORTRAIT},{key:"legal",title:'US-Legal (8,5" x 14")',format:new mxRectangle(0,0,850,1400)},{key:"tabloid",title:"US-Tabloid (279 mm x 432 mm)",format:new mxRectangle(0,0,1100,1700)},{key:"a0",title:"A0 (841 mm x 1189 mm)",format:new mxRectangle(0,0,3300,4681)},{key:"a1",title:"A1 (594 mm x 841 mm)",format:new mxRectangle(0,0,2339,3300)},{key:"a2",title:"A2 (420 mm x 594 mm)", format:new mxRectangle(0,0,1654,2336)},{key:"a3",title:"A3 (297 mm x 420 mm)",format:new mxRectangle(0,0,1169,1654)},{key:"a4",title:"A4 (210 mm x 297 mm)",format:mxConstants.PAGE_FORMAT_A4_PORTRAIT},{key:"a5",title:"A5 (148 mm x 210 mm)",format:new mxRectangle(0,0,583,827)},{key:"a6",title:"A6 (105 mm x 148 mm)",format:new mxRectangle(0,0,413,583)},{key:"a7",title:"A7 (74 mm x 105 mm)",format:new mxRectangle(0,0,291,413)},{key:"custom",title:mxResources.get("custom"),format:null}]}; @@ -2063,7 +2063,7 @@ c="url("+this.gridImage+")";var k=d=0;null!=a.view.backgroundPageShape&&(k=this. b,a.container.className="geDiagramContainer geDiagramBackdrop",d.style.backgroundImage="none",d.style.backgroundColor=""):(a.container.className="geDiagramContainer",d.style.backgroundPosition=f,d.style.backgroundColor=b,d.style.backgroundImage=c)};mxGraphView.prototype.createSvgGrid=function(a){for(var b=this.graph.gridSize*this.scale;b<this.minGridSize;)b*=2;for(var d=this.gridSteps*b,c=[],f=1;f<this.gridSteps;f++){var k=f*b;c.push("M 0 "+k+" L "+d+" "+k+" M "+k+" 0 L "+k+" "+d)}return'<svg width="'+ d+'" height="'+d+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+d+'" height="'+d+'" patternUnits="userSpaceOnUse"><path d="'+c.join(" ")+'" fill="none" stroke="'+a+'" opacity="0.2" stroke-width="1"/><path d="M '+d+" 0 L 0 0 0 "+d+'" fill="none" stroke="'+a+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var a=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(b,d){a.apply(this,arguments);if(null!=this.shiftPreview1){var e= this.view.canvas;null!=e.ownerSVGElement&&(e=e.ownerSVGElement);var c=this.gridSize*this.view.scale*this.view.gridSteps,c=-Math.round(c-mxUtils.mod(this.view.translate.x*this.view.scale+b,c))+"px "+-Math.round(c-mxUtils.mod(this.view.translate.y*this.view.scale+d,c))+"px";e.style.backgroundPosition=c}};mxGraph.prototype.updatePageBreaks=function(a,b,d){var c=this.view.scale,f=this.view.translate,k=this.pageFormat,e=c*this.pageScale,n=this.view.getBackgroundPageBounds();b=n.width;d=n.height;var g= -new mxRectangle(c*f.x,c*f.y,k.width*e,k.height*e),A=(a=a&&Math.min(g.width,g.height)>this.minPageBreakDist)?Math.ceil(d/g.height)-1:0,l=a?Math.ceil(b/g.width)-1:0,u=n.x+b,t=n.y+d;null==this.horizontalPageBreaks&&0<A&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<l&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var c=a==this.horizontalPageBreaks?A:l,f=0;f<=c;f++){var b=a==this.horizontalPageBreaks?[new mxPoint(Math.round(n.x),Math.round(n.y+(f+1)*g.height)), +new mxRectangle(c*f.x,c*f.y,k.width*e,k.height*e),y=(a=a&&Math.min(g.width,g.height)>this.minPageBreakDist)?Math.ceil(d/g.height)-1:0,l=a?Math.ceil(b/g.width)-1:0,u=n.x+b,t=n.y+d;null==this.horizontalPageBreaks&&0<y&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<l&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var c=a==this.horizontalPageBreaks?y:l,f=0;f<=c;f++){var b=a==this.horizontalPageBreaks?[new mxPoint(Math.round(n.x),Math.round(n.y+(f+1)*g.height)), new mxPoint(Math.round(u),Math.round(n.y+(f+1)*g.height))]:[new mxPoint(Math.round(n.x+(f+1)*g.width),Math.round(n.y)),new mxPoint(Math.round(n.x+(f+1)*g.width),Math.round(t))];null!=a[f]?(a[f].points=b,a[f].redraw()):(b=new mxPolyline(b,this.pageBreakColor),b.dialect=this.dialect,b.isDashed=this.pageBreakDashed,b.pointerEvents=!1,b.init(this.view.backgroundPane),b.redraw(),a[f]=b)}for(f=c;f<a.length;f++)a[f].destroy();a.splice(c,a.length-c)}});a(this.horizontalPageBreaks);a(this.verticalPageBreaks)}; var b=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(a,d,e){for(var c=0;c<d.length;c++)if(this.graph.getModel().isVertex(d[c])){var f=this.graph.getCellGeometry(d[c]);if(null!=f&&f.relative)return!1}return b.apply(this,arguments)};var e=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var a=e.apply(this,arguments);a.intersects=mxUtils.bind(this,function(b,d){return this.isConnecting()? !0:mxCellMarker.prototype.intersects.apply(a,arguments)});return a};mxGraphView.prototype.createBackgroundPageShape=function(a){return new mxRectangleShape(a,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var a=this.getGraphBounds(),b=0<a.width?a.x/this.scale-this.translate.x:0,d=0<a.height?a.y/this.scale-this.translate.y:0,c=this.graph.pageFormat,f=this.graph.pageScale,k=c.width*f,c=c.height*f,f=Math.floor(Math.min(0,b)/k),e=Math.floor(Math.min(0, @@ -2078,16 +2078,16 @@ mxEvent.getSource(a);if("A"==c.nodeName)for(;null!=c;){if("geHint"==c.className) this.createHoverIcons();mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(a){var c=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(a)-c.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(a)-c.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var m=!1,r=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(a,c){return m||r.apply(this, arguments)};this.keydownHandler=mxUtils.bind(this,function(a){32==a.which?(m=!0,this.hoverIcons.reset(),d.container.style.cursor="move",d.isEditing()||mxEvent.getSource(a)!=d.container||mxEvent.consume(a)):mxEvent.isConsumed(a)||27!=a.keyCode||this.hideDialog(null,!0)});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(a){d.container.style.cursor="";m=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var t=d.panningHandler.isForcePanningEvent; d.panningHandler.isForcePanningEvent=function(a){return t.apply(this,arguments)||m||mxEvent.isMouseEvent(a.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(a.getEvent()))&&(!mxEvent.isControlDown(a.getEvent())&&mxEvent.isRightMouseButton(a.getEvent())||mxEvent.isMiddleMouseButton(a.getEvent()))};var x=d.cellEditor.isStopEditingEvent;d.cellEditor.isStopEditingEvent=function(a){return x.apply(this,arguments)||13==a.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a)|| -mxClient.IS_SF&&mxEvent.isShiftDown(a))};var z=!1,c=null,f=null,k=null,p=mxUtils.bind(this,function(){if(null!=this.toolbar&&z!=d.cellEditor.isContentEditing()){for(var a=this.toolbar.container.firstChild,b=[];null!=a;){var e=a.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,a)&&(a.parentNode.removeChild(a),b.push(a));a=e}a=this.toolbar.fontMenu;e=this.toolbar.sizeMenu;if(null==k)this.toolbar.createTextToolbar();else{for(var g=0;g<k.length;g++)this.toolbar.container.appendChild(k[g]);this.toolbar.fontMenu= -c;this.toolbar.sizeMenu=f}z=d.cellEditor.isContentEditing();c=a;f=e;k=b}}),n=this,g=d.cellEditor.startEditing;d.cellEditor.startEditing=function(){g.apply(this,arguments);p();if(d.cellEditor.isContentEditing()){var a=!1,c=function(){a||(a=!0,window.setTimeout(function(){for(var c=d.getSelectedElement();null!=c&&c.nodeType!=mxConstants.NODETYPE_ELEMENT;)c=c.parentNode;if(null!=c&&(c=mxUtils.getCurrentStyle(c),null!=c&&null!=n.toolbar)){var f=c.fontFamily;"'"==f.charAt(0)&&(f=f.substring(1));"'"==f.charAt(f.length- -1)&&(f=f.substring(0,f.length-1));n.toolbar.setFontName(f);n.toolbar.setFontSize(parseInt(c.fontSize))}a=!1},0))};mxEvent.addListener(d.cellEditor.textarea,"input",c);mxEvent.addListener(d.cellEditor.textarea,"touchend",c);mxEvent.addListener(d.cellEditor.textarea,"mouseup",c);mxEvent.addListener(d.cellEditor.textarea,"keyup",c);c()}};var A=d.cellEditor.stopEditing;d.cellEditor.stopEditing=function(a,c){A.apply(this,arguments);p()};d.container.setAttribute("tabindex","0");d.container.style.cursor= -"default";if(window.self===window.top&&null!=d.container.parentNode)try{d.container.focus()}catch(J){}var y=d.fireMouseEvent;d.fireMouseEvent=function(a,c,f){a==mxEvent.MOUSE_DOWN&&this.container.focus();y.apply(this,arguments)};d.popupMenuHandler.autoExpand=!0;null!=this.menus&&(d.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(a,c,f){this.menus.createPopupMenu(a,c,f)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(a){d.popupMenuHandler.hideMenu()}));this.keyHandler= +mxClient.IS_SF&&mxEvent.isShiftDown(a))};var A=!1,c=null,f=null,k=null,p=mxUtils.bind(this,function(){if(null!=this.toolbar&&A!=d.cellEditor.isContentEditing()){for(var a=this.toolbar.container.firstChild,b=[];null!=a;){var e=a.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,a)&&(a.parentNode.removeChild(a),b.push(a));a=e}a=this.toolbar.fontMenu;e=this.toolbar.sizeMenu;if(null==k)this.toolbar.createTextToolbar();else{for(var g=0;g<k.length;g++)this.toolbar.container.appendChild(k[g]);this.toolbar.fontMenu= +c;this.toolbar.sizeMenu=f}A=d.cellEditor.isContentEditing();c=a;f=e;k=b}}),n=this,g=d.cellEditor.startEditing;d.cellEditor.startEditing=function(){g.apply(this,arguments);p();if(d.cellEditor.isContentEditing()){var a=!1,c=function(){a||(a=!0,window.setTimeout(function(){for(var c=d.getSelectedElement();null!=c&&c.nodeType!=mxConstants.NODETYPE_ELEMENT;)c=c.parentNode;if(null!=c&&(c=mxUtils.getCurrentStyle(c),null!=c&&null!=n.toolbar)){var f=c.fontFamily;"'"==f.charAt(0)&&(f=f.substring(1));"'"==f.charAt(f.length- +1)&&(f=f.substring(0,f.length-1));n.toolbar.setFontName(f);n.toolbar.setFontSize(parseInt(c.fontSize))}a=!1},0))};mxEvent.addListener(d.cellEditor.textarea,"input",c);mxEvent.addListener(d.cellEditor.textarea,"touchend",c);mxEvent.addListener(d.cellEditor.textarea,"mouseup",c);mxEvent.addListener(d.cellEditor.textarea,"keyup",c);c()}};var y=d.cellEditor.stopEditing;d.cellEditor.stopEditing=function(a,c){y.apply(this,arguments);p()};d.container.setAttribute("tabindex","0");d.container.style.cursor= +"default";if(window.self===window.top&&null!=d.container.parentNode)try{d.container.focus()}catch(J){}var z=d.fireMouseEvent;d.fireMouseEvent=function(a,c,f){a==mxEvent.MOUSE_DOWN&&this.container.focus();z.apply(this,arguments)};d.popupMenuHandler.autoExpand=!0;null!=this.menus&&(d.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(a,c,f){this.menus.createPopupMenu(a,c,f)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(a){d.popupMenuHandler.hideMenu()}));this.keyHandler= this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};var u="rounded shadow glass dashed dashPattern comic labelBackgroundColor".split(" "),F="shape edgeStyle curved rounded elbow comic jumpStyle jumpSize".split(" ");this.setDefaultStyle=function(a){try{var c=d.view.getState(a);if(null!=c){var f=a.clone();f.style="";var b=d.getCellStyle(f);a=[];var f=[],k;for(k in c.style)b[k]!=c.style[k]&&(a.push(c.style[k]),f.push(k));for(var e=d.getModel().getStyle(c.cell),g=null!=e?e.split(";"): [],e=0;e<g.length;e++){var n=g[e],q=n.indexOf("=");if(0<=q){k=n.substring(0,q);var p=n.substring(q+1);null!=b[k]&&"none"==p&&(a.push(p),f.push(k))}}d.getModel().isEdge(c.cell)?d.currentEdgeStyle={}:d.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",f,"values",a,"cells",[c.cell]))}}catch(D){this.handleError(D)}};this.clearDefaultStyle=function(){d.currentEdgeStyle=mxUtils.clone(d.defaultEdgeStyle);d.currentVertexStyle=mxUtils.clone(d.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged", "keys",[],"values",[],"cells",[]))};var v=["fontFamily","fontSize","fontColor"],E="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),q=["startArrow startFill startSize sourcePerimeterSpacing endArrow endFill endSize targetPerimeterSpacing".split(" "),["strokeColor","strokeWidth"],["fillColor","gradientColor"],v,["opacity"],["align"],["html"]];for(a=0;a<q.length;a++)for(b=0;b<q[a].length;b++)u.push(q[a][b]);for(a=0;a<F.length;a++)0>mxUtils.indexOf(u,F[a])&&u.push(F[a]); -var B=function(a,c){var f=d.getModel();f.beginUpdate();try{if(c)for(var b=f.isEdge(n),k=b?d.currentEdgeStyle:d.currentVertexStyle,b=["fontSize","fontFamily","fontColor"],e=0;e<b.length;e++){var g=k[b[e]];null!=g&&d.setCellStyles(b[e],g,a)}else for(g=0;g<a.length;g++){for(var n=a[g],p=f.getStyle(n),B=null!=p?p.split(";"):[],D=u.slice(),e=0;e<B.length;e++){var A=B[e],l=A.indexOf("=");if(0<=l){var J=A.substring(0,l),y=mxUtils.indexOf(D,J);0<=y&&D.splice(y,1);for(var v=0;v<q.length;v++){var m=q[v];if(0<= -mxUtils.indexOf(m,J))for(var t=0;t<m.length;t++){var r=mxUtils.indexOf(D,m[t]);0<=r&&D.splice(r,1)}}}}for(var k=(b=f.isEdge(n))?d.currentEdgeStyle:d.currentVertexStyle,P=f.getStyle(n),e=0;e<D.length;e++){var J=D[e],x=k[J];null==x||"shape"==J&&!b||b&&!(0>mxUtils.indexOf(F,J))||(P=mxUtils.setStyle(P,J,x))}f.setStyle(n,P)}}finally{f.endUpdate()}};d.addListener("cellsInserted",function(a,c){B(c.getProperty("cells"))});d.addListener("textInserted",function(a,c){B(c.getProperty("cells"),!0)});d.connectionHandler.addListener(mxEvent.CONNECT, -function(a,c){var f=[c.getProperty("cell")];c.getProperty("terminalInserted")&&f.push(c.getProperty("terminal"));B(f)});this.addListener("styleChanged",mxUtils.bind(this,function(a,c){var f=c.getProperty("cells"),b=!1,k=!1;if(0<f.length)for(var e=0;e<f.length&&(b=d.getModel().isVertex(f[e])||b,!(k=d.getModel().isEdge(f[e])||k)||!b);e++);else k=b=!0;for(var f=c.getProperty("keys"),g=c.getProperty("values"),e=0;e<f.length;e++){var n=0<=mxUtils.indexOf(v,f[e]);if("strokeColor"!=f[e]||null!=g[e]&&"none"!= +var C=function(a,c){var f=d.getModel();f.beginUpdate();try{if(c)for(var b=f.isEdge(n),k=b?d.currentEdgeStyle:d.currentVertexStyle,b=["fontSize","fontFamily","fontColor"],e=0;e<b.length;e++){var g=k[b[e]];null!=g&&d.setCellStyles(b[e],g,a)}else for(g=0;g<a.length;g++){for(var n=a[g],p=f.getStyle(n),C=null!=p?p.split(";"):[],D=u.slice(),e=0;e<C.length;e++){var y=C[e],l=y.indexOf("=");if(0<=l){var J=y.substring(0,l),z=mxUtils.indexOf(D,J);0<=z&&D.splice(z,1);for(var v=0;v<q.length;v++){var m=q[v];if(0<= +mxUtils.indexOf(m,J))for(var t=0;t<m.length;t++){var r=mxUtils.indexOf(D,m[t]);0<=r&&D.splice(r,1)}}}}for(var k=(b=f.isEdge(n))?d.currentEdgeStyle:d.currentVertexStyle,P=f.getStyle(n),e=0;e<D.length;e++){var J=D[e],x=k[J];null==x||"shape"==J&&!b||b&&!(0>mxUtils.indexOf(F,J))||(P=mxUtils.setStyle(P,J,x))}f.setStyle(n,P)}}finally{f.endUpdate()}};d.addListener("cellsInserted",function(a,c){C(c.getProperty("cells"))});d.addListener("textInserted",function(a,c){C(c.getProperty("cells"),!0)});d.connectionHandler.addListener(mxEvent.CONNECT, +function(a,c){var f=[c.getProperty("cell")];c.getProperty("terminalInserted")&&f.push(c.getProperty("terminal"));C(f)});this.addListener("styleChanged",mxUtils.bind(this,function(a,c){var f=c.getProperty("cells"),b=!1,k=!1;if(0<f.length)for(var e=0;e<f.length&&(b=d.getModel().isVertex(f[e])||b,!(k=d.getModel().isEdge(f[e])||k)||!b);e++);else k=b=!0;for(var f=c.getProperty("keys"),g=c.getProperty("values"),e=0;e<f.length;e++){var n=0<=mxUtils.indexOf(v,f[e]);if("strokeColor"!=f[e]||null!=g[e]&&"none"!= g[e])if(0<=mxUtils.indexOf(F,f[e]))k||0<=mxUtils.indexOf(E,f[e])?null==g[e]?delete d.currentEdgeStyle[f[e]]:d.currentEdgeStyle[f[e]]=g[e]:b&&0<=mxUtils.indexOf(u,f[e])&&(null==g[e]?delete d.currentVertexStyle[f[e]]:d.currentVertexStyle[f[e]]=g[e]);else if(0<=mxUtils.indexOf(u,f[e])){if(b||n)null==g[e]?delete d.currentVertexStyle[f[e]]:d.currentVertexStyle[f[e]]=g[e];if(k||n||0<=mxUtils.indexOf(E,f[e]))null==g[e]?delete d.currentEdgeStyle[f[e]]:d.currentEdgeStyle[f[e]]=g[e]}}null!=this.toolbar&&(this.toolbar.setFontName(d.currentVertexStyle.fontFamily|| Menus.prototype.defaultFont),this.toolbar.setFontSize(d.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==d.currentEdgeStyle.edgeStyle&&"1"==d.currentEdgeStyle.curved?"geSprite geSprite-curved":"straight"==d.currentEdgeStyle.edgeStyle||"none"==d.currentEdgeStyle.edgeStyle||null==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-straight":"entityRelationEdgeStyle"== d.currentEdgeStyle.edgeStyle?"geSprite geSprite-entity":"elbowEdgeStyle"==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==d.currentEdgeStyle.elbow?"verticalelbow":"horizontalelbow"):"isometricEdgeStyle"==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==d.currentEdgeStyle.elbow?"verticalisometric":"horizontalisometric"):"geSprite geSprite-orthogonal"),null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==d.currentEdgeStyle.shape? @@ -2111,19 +2111,19 @@ EditorUi.prototype.initClipboard=function(){var a=this,b=mxClipboard.cut;mxClipb !1,null):e=d.apply(this,arguments);a.updatePasteActionStates();return e};var l=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){l.apply(this,arguments);a.updatePasteActionStates()};var m=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(b,d){m.apply(this,arguments);a.updatePasteActionStates()};this.updatePasteActionStates()};EditorUi.prototype.lazyZoomDelay=20; EditorUi.prototype.initCanvas=function(){var a=this.editor.graph;a.timerAutoScroll=!0;a.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((a.container.offsetWidth-34)/a.view.scale)),Math.max(0,Math.round((a.container.offsetHeight-34)/a.view.scale)))};a.view.getBackgroundPageBounds=function(){var a=this.graph.getPageLayout(),c=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*c.width),this.scale*(this.translate.y+a.y*c.height),this.scale*a.width*c.width, this.scale*a.height*c.height)};a.getPreferredPageSize=function(a,c,f){a=this.getPageLayout();c=this.getPageSize();return new mxRectangle(0,0,a.width*c.width,a.height*c.height)};var b=null,e=this;if(this.editor.isChromelessView()){this.chromelessResize=b=mxUtils.bind(this,function(c,f,b,d){if(null!=a.container){b=null!=b?b:0;d=null!=d?d:0;var e=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),k=mxUtils.hasScrollbars(a.container),g=a.view.translate,n=a.view.scale,q=mxRectangle.fromRectangle(e); -q.x=q.x/n-g.x;q.y=q.y/n-g.y;q.width/=n;q.height/=n;var g=a.container.scrollTop,p=a.container.scrollLeft,B=mxClient.IS_QUIRKS||8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)B+=3;var D=a.container.offsetWidth-B,B=a.container.offsetHeight-B;c=c?Math.max(.3,Math.min(f||1,D/q.width)):n;f=(D-c*q.width)/2/c;var u=0==this.lightboxVerticalDivider?0:(B-c*q.height)/this.lightboxVerticalDivider/c;k&&(f=Math.max(f,0),u=Math.max(u,0));if(k||e.width<D||e.height<B)a.view.scaleAndTranslate(c, +q.x=q.x/n-g.x;q.y=q.y/n-g.y;q.width/=n;q.height/=n;var g=a.container.scrollTop,p=a.container.scrollLeft,C=mxClient.IS_QUIRKS||8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)C+=3;var D=a.container.offsetWidth-C,C=a.container.offsetHeight-C;c=c?Math.max(.3,Math.min(f||1,D/q.width)):n;f=(D-c*q.width)/2/c;var u=0==this.lightboxVerticalDivider?0:(C-c*q.height)/this.lightboxVerticalDivider/c;k&&(f=Math.max(f,0),u=Math.max(u,0));if(k||e.width<D||e.height<C)a.view.scaleAndTranslate(c, Math.floor(f-q.x),Math.floor(u-q.y)),a.container.scrollTop=g*c/n,a.container.scrollLeft=p*c/n;else if(0!=b||0!=d)e=a.view.translate,a.view.setTranslate(Math.floor(e.x+b/n),Math.floor(e.y+d/n))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var d=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",d);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",d)});this.editor.addListener("resetGraphView", mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(c){a.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(c){a.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var l=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));this.chromelessToolbar=document.createElement("div");this.chromelessToolbar.style.position="fixed";this.chromelessToolbar.style.overflow="hidden"; this.chromelessToolbar.style.boxSizing="border-box";this.chromelessToolbar.style.whiteSpace="nowrap";this.chromelessToolbar.style.backgroundColor="#000000";this.chromelessToolbar.style.padding="10px 10px 8px 10px";this.chromelessToolbar.style.left="50%";mxClient.IS_VML||(mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"borderRadius","20px"),mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out"));var m=mxUtils.bind(this,function(){var c=mxUtils.getCurrentStyle(a.container); this.chromelessToolbar.style.bottom=(null!=c?parseInt(c["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",m);m();var r=0,m=mxUtils.bind(this,function(a,c,f){r++;var b=document.createElement("span");b.style.paddingLeft="8px";b.style.paddingRight="8px";b.style.cursor="pointer";mxEvent.addListener(b,"click",a);null!=f&&b.setAttribute("title",f);a=document.createElement("img");a.setAttribute("border","0");a.setAttribute("src", c);b.appendChild(a);this.chromelessToolbar.appendChild(b);return b});null!=l.backBtn&&m(mxUtils.bind(this,function(a){window.location.href=l.backBtn.url;mxEvent.consume(a)}),Editor.backLargeImage,mxResources.get("back",null,"Back"));var t=m(mxUtils.bind(this,function(a){this.actions.get("previousPage").funct();mxEvent.consume(a)}),Editor.previousLargeImage,mxResources.get("previousPage")),x=document.createElement("div");x.style.display="inline-block";x.style.verticalAlign="top";x.style.fontFamily= -"Helvetica,Arial";x.style.marginTop="8px";x.style.fontSize="14px";x.style.color="#ffffff";this.chromelessToolbar.appendChild(x);var z=m(mxUtils.bind(this,function(a){this.actions.get("nextPage").funct();mxEvent.consume(a)}),Editor.nextLargeImage,mxResources.get("nextPage")),c=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(x.innerHTML="",mxUtils.write(x,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});t.style.paddingLeft="0px"; -t.style.paddingRight="4px";z.style.paddingLeft="4px";z.style.paddingRight="0px";var f=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(z.style.display="",t.style.display="",x.style.display="inline-block"):(z.style.display="none",t.style.display="none",x.style.display="none");c()});this.editor.addListener("resetGraphView",f);this.editor.addListener("pageSelected",c);m(mxUtils.bind(this,function(a){this.actions.get("zoomOut").funct();mxEvent.consume(a)}),Editor.zoomOutLargeImage, +"Helvetica,Arial";x.style.marginTop="8px";x.style.fontSize="14px";x.style.color="#ffffff";this.chromelessToolbar.appendChild(x);var A=m(mxUtils.bind(this,function(a){this.actions.get("nextPage").funct();mxEvent.consume(a)}),Editor.nextLargeImage,mxResources.get("nextPage")),c=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(x.innerHTML="",mxUtils.write(x,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});t.style.paddingLeft="0px"; +t.style.paddingRight="4px";A.style.paddingLeft="4px";A.style.paddingRight="0px";var f=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(A.style.display="",t.style.display="",x.style.display="inline-block"):(A.style.display="none",t.style.display="none",x.style.display="none");c()});this.editor.addListener("resetGraphView",f);this.editor.addListener("pageSelected",c);m(mxUtils.bind(this,function(a){this.actions.get("zoomOut").funct();mxEvent.consume(a)}),Editor.zoomOutLargeImage, mxResources.get("zoomOut")+" (Alt+Mousewheel)");m(mxUtils.bind(this,function(a){this.actions.get("zoomIn").funct();mxEvent.consume(a)}),Editor.zoomInLargeImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");m(mxUtils.bind(this,function(c){a.isLightboxView()?(1==a.view.scale?this.lightboxFit():a.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(c)}),Editor.actualSizeLargeImage,mxResources.get("fit"));var k=null,p=null,n=mxUtils.bind(this,function(a){null!=k&&(window.clearTimeout(k), fadeThead=null);null!=p&&(window.clearTimeout(p),fadeThead2=null);k=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);k=null;p=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";p=null}),600)}),a||200)}),g=mxUtils.bind(this,function(a){null!=k&&(window.clearTimeout(k),fadeThead=null);null!=p&&(window.clearTimeout(p),fadeThead2=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,a|| -30)});if("1"==urlParams.layers){this.layersDialog=null;var A=m(mxUtils.bind(this,function(c){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=a.createLayersDialog();mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var f=A.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius", +30)});if("1"==urlParams.layers){this.layersDialog=null;var y=m(mxUtils.bind(this,function(c){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=a.createLayersDialog();mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var f=y.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius", "5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily="Helvetica,Arial";this.layersDialog.style.backgroundColor="#000000";this.layersDialog.style.width="160px";this.layersDialog.style.padding="4px 2px 4px 2px";this.layersDialog.style.color="#ffffff";mxUtils.setOpacity(this.layersDialog,70);this.layersDialog.style.left=f.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";f=mxUtils.getCurrentStyle(this.editor.graph.container); -this.layersDialog.style.zIndex=f.zIndex;document.body.appendChild(this.layersDialog)}mxEvent.consume(c)}),Editor.layersLargeImage,mxResources.get("layers")),y=a.getModel();y.addListener(mxEvent.CHANGE,function(){A.style.display=1<y.getChildCount(y.root)?"":"none"})}this.addChromelessToolbarItems(m);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||m(mxUtils.bind(this,function(c){null!=this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()): +this.layersDialog.style.zIndex=f.zIndex;document.body.appendChild(this.layersDialog)}mxEvent.consume(c)}),Editor.layersLargeImage,mxResources.get("layers")),z=a.getModel();z.addListener(mxEvent.CHANGE,function(){y.style.display=1<z.getChildCount(z.root)?"":"none"})}this.addChromelessToolbarItems(m);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||m(mxUtils.bind(this,function(c){null!=this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()): a.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(c)}),Editor.editLargeImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(f=0;f<this.lightboxToolbarActions.length;f++){var u=this.lightboxToolbarActions[f];m(u.fn,u.icon,u.tooltip)}null!=l.refreshBtn&&m(mxUtils.bind(this,function(a){l.refreshBtn.url?window.location.href=l.refreshBtn.url:window.location.reload();mxEvent.consume(a)}),Editor.refreshLargeImage,mxResources.get("refresh",null,"Refresh"));null!=l.fullscreenBtn&& window.self!==window.top&&m(mxUtils.bind(this,function(c){l.fullscreenBtn.url?a.openLink(l.fullscreenBtn.url):a.openLink(window.location.href);mxEvent.consume(c)}),Editor.fullscreenLargeImage,mxResources.get("openInNewWindow",null,"Open in New Window"));(l.closeBtn&&window.self===window.top||a.lightbox&&("1"==urlParams.close||this.container!=document.body))&&m(mxUtils.bind(this,function(a){"1"==urlParams.close||l.closeBtn?window.close():(this.destroy(),mxEvent.consume(a))}),Editor.closeLargeImage, mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");a.container.appendChild(this.chromelessToolbar);mxEvent.addListener(a.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(mxEvent.isShiftDown(a)||g(30),n())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(a){mxEvent.consume(a)}); @@ -2180,10 +2180,10 @@ this.sidebar=this.editor.chromeless?null:this.createSidebar(this.sidebarContaine this.container.appendChild(this.sidebarFooterContainer);this.container.appendChild(this.diagramContainer);null!=this.container&&null!=this.tabContainer&&this.container.appendChild(this.tabContainer);this.toolbar=this.editor.chromeless?null:this.createToolbar(this.createDiv("geToolbar"));null!=this.toolbar&&(this.toolbarContainer.appendChild(this.toolbar.container),this.container.appendChild(this.toolbarContainer));null!=this.sidebar&&(this.container.appendChild(this.hsplit),this.addSplitHandler(this.hsplit, !0,0,mxUtils.bind(this,function(a){this.hsplitPosition=a;this.refresh()})))};EditorUi.prototype.createStatusContainer=function(){var a=document.createElement("a");a.className="geItem geStatus";420>screen.width&&(a.style.maxWidth=Math.max(20,screen.width-320)+"px",a.style.overflow="hidden");return a};EditorUi.prototype.setStatusText=function(a){this.statusContainer.innerHTML=a};EditorUi.prototype.createToolbar=function(a){return new Toolbar(this,a)}; EditorUi.prototype.createSidebar=function(a){return new Sidebar(this,a)};EditorUi.prototype.createFormat=function(a){return new Format(this,a)};EditorUi.prototype.createFooter=function(){return this.createDiv("geFooter")};EditorUi.prototype.createDiv=function(a){var b=document.createElement("div");b.className=a;return b}; -EditorUi.prototype.addSplitHandler=function(a,b,e,d){function l(a){if(null!=r){var f=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a));d(Math.max(0,t+(b?f.x-r.x:r.y-f.y)-e));mxEvent.consume(a);t!=c()&&(x=!0,z=null)}}function m(a){l(a);r=t=null}var r=null,t=null,x=!0,z=null;mxClient.IS_POINTER&&(a.style.touchAction="none");var c=mxUtils.bind(this,function(){var c=parseInt(b?a.style.left:a.style.bottom);b||(c=c+e-this.footerHeight);return c});mxEvent.addGestureListeners(a,function(a){r=new mxPoint(mxEvent.getClientX(a), -mxEvent.getClientY(a));t=c();x=!1;mxEvent.consume(a)});mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){if(!x&&this.hsplitClickEnabled){var f=null!=z?z-e:0;z=c();d(f);mxEvent.consume(a)}}));mxEvent.addGestureListeners(document,null,l,m);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,l,m)})}; +EditorUi.prototype.addSplitHandler=function(a,b,e,d){function l(a){if(null!=r){var f=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a));d(Math.max(0,t+(b?f.x-r.x:r.y-f.y)-e));mxEvent.consume(a);t!=c()&&(x=!0,A=null)}}function m(a){l(a);r=t=null}var r=null,t=null,x=!0,A=null;mxClient.IS_POINTER&&(a.style.touchAction="none");var c=mxUtils.bind(this,function(){var c=parseInt(b?a.style.left:a.style.bottom);b||(c=c+e-this.footerHeight);return c});mxEvent.addGestureListeners(a,function(a){r=new mxPoint(mxEvent.getClientX(a), +mxEvent.getClientY(a));t=c();x=!1;mxEvent.consume(a)});mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){if(!x&&this.hsplitClickEnabled){var f=null!=A?A-e:0;A=c();d(f);mxEvent.consume(a)}}));mxEvent.addGestureListeners(document,null,l,m);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,l,m)})}; EditorUi.prototype.handleError=function(a,b,e,d,l){a=null!=a&&null!=a.error?a.error:a;if(null!=a||null!=b){l=mxUtils.htmlEntities(mxResources.get("unknownError"));var m=mxResources.get("ok");b=null!=b?b:mxResources.get("error");null!=a&&null!=a.message&&(l=mxUtils.htmlEntities(a.message));this.showError(b,l,m,e,null,null,null,null,null,null,null,null,d?e:null)}else null!=e&&e()}; -EditorUi.prototype.showError=function(a,b,e,d,l,m,r,t,x,z,c,f,k){a=new ErrorDialog(this,a,b,e||mxResources.get("ok"),d,l,m,r,f,t,x);b=Math.ceil(null!=b?b.length/50:1);this.showDialog(a.container,z||340,c||100+20*b,!0,!1,k);a.init()};EditorUi.prototype.showDialog=function(a,b,e,d,l,m,r,t,x,z){this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,a,b,e,d,l,m,r,t,x,z);this.dialogs.push(this.dialog)}; +EditorUi.prototype.showError=function(a,b,e,d,l,m,r,t,x,A,c,f,k){a=new ErrorDialog(this,a,b,e||mxResources.get("ok"),d,l,m,r,f,t,x);b=Math.ceil(null!=b?b.length/50:1);this.showDialog(a.container,A||340,c||100+20*b,!0,!1,k);a.init()};EditorUi.prototype.showDialog=function(a,b,e,d,l,m,r,t,x,A){this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,a,b,e,d,l,m,r,t,x,A);this.dialogs.push(this.dialog)}; EditorUi.prototype.hideDialog=function(a,b){if(null!=this.dialogs&&0<this.dialogs.length){var e=this.dialogs.pop();0==e.close(a,b)?this.dialogs.push(e):(this.dialog=0<this.dialogs.length?this.dialogs[this.dialogs.length-1]:null,this.editor.fireEvent(new mxEventObject("hideDialog")),null==this.dialog&&"hidden"!=this.editor.graph.container.style.visibility&&window.setTimeout(mxUtils.bind(this,function(){this.editor.graph.isEditing()&&null!=this.editor.graph.cellEditor.textarea?this.editor.graph.cellEditor.textarea.focus(): (mxUtils.clearSelection(),this.editor.graph.container.focus())}),0))}};EditorUi.prototype.pickColor=function(a,b){var e=this.editor.graph,d=e.cellEditor.saveSelection(),l=226+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12)),m=new ColorDialog(this,a||"none",function(a){e.cellEditor.restoreSelection(d);b(a)},function(){e.cellEditor.restoreSelection(d)});this.showDialog(m.container,230,l,!0,!1);m.init()}; EditorUi.prototype.openFile=function(){window.openFile=new OpenFile(mxUtils.bind(this,function(a){this.hideDialog(a)}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:320,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null})}; @@ -2201,9 +2201,9 @@ EditorUi.prototype.createOutline=function(a){var b=new mxOutline(this.editor.gra EditorUi.prototype.createKeyHandler=function(a){function b(a,c,b){r.push(function(){if(!d.isSelectionEmpty()&&d.isEnabled())if(c=null!=c?c:1,b){d.getModel().beginUpdate();try{for(var f=d.getSelectionCells(),e=0;e<f.length;e++)if(d.getModel().isVertex(f[e])&&d.isCellResizable(f[e])){var k=d.getCellGeometry(f[e]);null!=k&&(k=k.clone(),37==a?k.width=Math.max(0,k.width-c):38==a?k.height=Math.max(0,k.height-c):39==a?k.width+=c:40==a&&(k.height+=c),d.getModel().setGeometry(f[e],k))}}finally{d.getModel().endUpdate()}}else f= d.getSelectionCell(),e=d.model.getParent(f),k=null,1==d.getSelectionCount()&&d.model.isVertex(f)&&null!=d.layoutManager&&!d.isCellLocked(f)&&(k=d.layoutManager.getLayout(e)),null!=k&&k.constructor==mxStackLayout?(k=e.getIndex(f),37==a||38==a?d.model.add(e,f,Math.max(0,k-1)):39!=a&&40!=a||d.model.add(e,f,Math.min(d.model.getChildCount(e),k+1))):(e=f=0,37==a?f=-c:38==a?e=-c:39==a?f=c:40==a&&(e=c),d.moveCells(d.getMovableCells(d.getSelectionCells()),f,e))});null!=t&&window.clearTimeout(t);t=window.setTimeout(function(){if(0< r.length){d.getModel().beginUpdate();try{for(var a=0;a<r.length;a++)r[a]();r=[]}finally{d.getModel().endUpdate()}d.scrollCellToVisible(d.getSelectionCell())}},200)}var e=this,d=this.editor.graph,l=new mxKeyHandler(d),m=l.isEventIgnored;l.isEventIgnored=function(a){return(!this.isControlDown(a)||mxEvent.isShiftDown(a)||90!=a.keyCode&&89!=a.keyCode&&188!=a.keyCode&&190!=a.keyCode&&85!=a.keyCode)&&(66!=a.keyCode&&73!=a.keyCode||!this.isControlDown(a)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&& -!mxClient.IS_SF)&&m.apply(this,arguments)};l.isEnabledForEvent=function(a){return!mxEvent.isConsumed(a)&&this.isGraphEvent(a)&&this.isEnabled()&&(null==e.dialogs||0==e.dialogs.length)};l.isControlDown=function(a){return mxEvent.isControlDown(a)||mxClient.IS_MAC&&a.metaKey};var r=[],t=null,x={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},z=l.getFunction;mxKeyHandler.prototype.getFunction=function(a){if(d.isEnabled()){if(mxEvent.isShiftDown(a)&& +!mxClient.IS_SF)&&m.apply(this,arguments)};l.isEnabledForEvent=function(a){return!mxEvent.isConsumed(a)&&this.isGraphEvent(a)&&this.isEnabled()&&(null==e.dialogs||0==e.dialogs.length)};l.isControlDown=function(a){return mxEvent.isControlDown(a)||mxClient.IS_MAC&&a.metaKey};var r=[],t=null,x={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},A=l.getFunction;mxKeyHandler.prototype.getFunction=function(a){if(d.isEnabled()){if(mxEvent.isShiftDown(a)&& mxEvent.isAltDown(a)){var c=e.actions.get(e.altShiftActions[a.keyCode]);if(null!=c)return c.funct}if(9==a.keyCode&&mxEvent.isAltDown(a))return mxEvent.isShiftDown(a)?function(){d.selectParentCell()}:function(){d.selectChildCell()};if(null!=x[a.keyCode]&&!d.isSelectionEmpty())if(mxEvent.isShiftDown(a)&&mxEvent.isAltDown(a)){if(d.model.isVertex(d.getSelectionCell()))return function(){var c=d.connectVertex(d.getSelectionCell(),x[a.keyCode],d.defaultEdgeLength,a,!0);null!=c&&0<c.length&&(1==c.length&& -d.model.isEdge(c[0])?d.setSelectionCell(d.model.getTerminal(c[0],!1)):d.setSelectionCell(c[c.length-1]),d.scrollCellToVisible(d.getSelectionCell()),null!=e.hoverIcons&&e.hoverIcons.update(d.view.getState(d.getSelectionCell())))}}else return this.isControlDown(a)?function(){b(a.keyCode,mxEvent.isShiftDown(a)?d.gridSize:null,!0)}:function(){b(a.keyCode,mxEvent.isShiftDown(a)?d.gridSize:null)}}return z.apply(this,arguments)};l.bindAction=mxUtils.bind(this,function(a,c,b,d){var f=this.actions.get(b); +d.model.isEdge(c[0])?d.setSelectionCell(d.model.getTerminal(c[0],!1)):d.setSelectionCell(c[c.length-1]),d.scrollCellToVisible(d.getSelectionCell()),null!=e.hoverIcons&&e.hoverIcons.update(d.view.getState(d.getSelectionCell())))}}else return this.isControlDown(a)?function(){b(a.keyCode,mxEvent.isShiftDown(a)?d.gridSize:null,!0)}:function(){b(a.keyCode,mxEvent.isShiftDown(a)?d.gridSize:null)}}return A.apply(this,arguments)};l.bindAction=mxUtils.bind(this,function(a,c,b,d){var f=this.actions.get(b); null!=f&&(b=function(){f.isEnabled()&&f.funct()},c?d?l.bindControlShiftKey(a,b):l.bindControlKey(a,b):d?l.bindShiftKey(a,b):l.bindKey(a,b))});var c=l.escape;l.escape=function(a){c.apply(this,arguments)};l.enter=function(){};l.bindControlShiftKey(36,function(){d.exitGroup()});l.bindControlShiftKey(35,function(){d.enterGroup()});l.bindKey(36,function(){d.home()});l.bindKey(35,function(){d.refresh()});l.bindAction(107,!0,"zoomIn");l.bindAction(109,!0,"zoomOut");l.bindAction(80,!0,"print");l.bindAction(79, !0,"outline",!0);l.bindAction(112,!1,"about");if(!this.editor.chromeless||this.editor.editable)l.bindControlKey(36,function(){d.isEnabled()&&d.foldCells(!0)}),l.bindControlKey(35,function(){d.isEnabled()&&d.foldCells(!1)}),l.bindControlKey(13,function(){d.isEnabled()&&d.setSelectionCells(d.duplicateCells(d.getSelectionCells(),!1))}),l.bindAction(8,!1,"delete"),l.bindAction(8,!0,"deleteAll"),l.bindAction(46,!1,"delete"),l.bindAction(46,!0,"deleteAll"),l.bindAction(72,!0,"resetView"),l.bindAction(72, !0,"fitWindow",!0),l.bindAction(74,!0,"fitPage"),l.bindAction(74,!0,"fitTwoPages",!0),l.bindAction(48,!0,"customZoom"),l.bindAction(82,!0,"turn"),l.bindAction(82,!0,"clearDefaultStyle",!0),l.bindAction(83,!0,"save"),l.bindAction(83,!0,"saveAs",!0),l.bindAction(65,!0,"selectAll"),l.bindAction(65,!0,"selectNone",!0),l.bindAction(73,!0,"selectVertices",!0),l.bindAction(69,!0,"selectEdges",!0),l.bindAction(69,!0,"editStyle"),l.bindAction(66,!0,"bold"),l.bindAction(66,!0,"toBack",!0),l.bindAction(70,!0, @@ -2216,11 +2216,11 @@ Date.now||(Date.now=function(){return(new Date).getTime()});mxConstants.SHADOW_O mxText.prototype.baseSpacingTop=5;mxText.prototype.baseSpacingBottom=1;mxGraphModel.prototype.ignoreRelativeEdgeParent=!1;mxGraphView.prototype.gridImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhCgAKAJEAAAAAAP///8zMzP///yH5BAEAAAMALAAAAAAKAAoAAAIJ1I6py+0Po2wFADs=":IMAGE_PATH+"/grid.gif";mxGraphView.prototype.gridSteps=4;mxGraphView.prototype.minGridSize=4;mxGraphView.prototype.gridColor="#e0e0e0";mxSvgCanvas2D.prototype.foAltText="[Not supported by viewer]"; mxShape.prototype.getConstraints=function(a,b,e){return null}; Graph=function(a,b,e,d,l){mxGraph.call(this,a,b,e,d);this.themes=l||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);a=this.baseUrl;b=a.indexOf("//");this.domainPathUrl=this.domainUrl="";0<b&&(b=a.indexOf("/",b+2),0<b&&(this.domainUrl=a.substring(0,b)),b=a.lastIndexOf("/"),0<b&&(this.domainPathUrl=a.substring(0,b+1)));this.isHtmlLabel=function(a){var c=this.view.getState(a);a=null!=c?c.style:this.getCellStyle(a); -return null!=a?"1"==a.html||"wrap"==a[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var m=null,r=null,t=null,x=null,z=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,c){if("mouseDown"==c.getProperty("eventName")&&this.isEnabled()){var f=c.getProperty("event");if(!mxEvent.isControlDown(f.getEvent())&&!mxEvent.isShiftDown(f.getEvent())){var b=f.getState();null!=b&&this.model.isEdge(b.cell)&&(m=new mxPoint(f.getGraphX(),f.getGraphY()),z=this.isCellSelected(b.cell),t= +return null!=a?"1"==a.html||"wrap"==a[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var m=null,r=null,t=null,x=null,A=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,c){if("mouseDown"==c.getProperty("eventName")&&this.isEnabled()){var f=c.getProperty("event");if(!mxEvent.isControlDown(f.getEvent())&&!mxEvent.isShiftDown(f.getEvent())){var b=f.getState();null!=b&&this.model.isEdge(b.cell)&&(m=new mxPoint(f.getGraphX(),f.getGraphY()),A=this.isCellSelected(b.cell),t= b,r=f,null!=b.text&&null!=b.text.boundingBox&&mxUtils.contains(b.text.boundingBox,f.getGraphX(),f.getGraphY())?x=mxEvent.LABEL_HANDLE:(b=this.selectionCellsHandler.getHandler(b.cell),null!=b&&null!=b.bends&&0<b.bends.length&&(x=b.getHandleForEvent(f))))}}}));this.addMouseListener({mouseDown:function(a,c){},mouseMove:mxUtils.bind(this,function(a,c){var f=this.selectionCellsHandler.handlers.map,b;for(b in f)if(null!=f[b].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isControlDown(c.getEvent())&& -!mxEvent.isShiftDown(c.getEvent())&&!mxEvent.isAltDown(c.getEvent()))if(b=this.tolerance,null!=m&&null!=t&&null!=r){if(f=t,Math.abs(m.x-c.getGraphX())>b||Math.abs(m.y-c.getGraphY())>b){this.isCellSelected(f.cell)||this.setSelectionCell(f.cell);var d=this.selectionCellsHandler.getHandler(f.cell);if(null!=d&&null!=d.bends&&0<d.bends.length){var e=d.getHandleForEvent(r),k=this.view.getEdgeStyle(f);b=k==mxEdgeStyle.EntityRelation;z||x!=mxEvent.LABEL_HANDLE||(e=x);if(b&&0!=e&&e!=d.bends.length-1&&e!=mxEvent.LABEL_HANDLE)!b|| +!mxEvent.isShiftDown(c.getEvent())&&!mxEvent.isAltDown(c.getEvent()))if(b=this.tolerance,null!=m&&null!=t&&null!=r){if(f=t,Math.abs(m.x-c.getGraphX())>b||Math.abs(m.y-c.getGraphY())>b){this.isCellSelected(f.cell)||this.setSelectionCell(f.cell);var d=this.selectionCellsHandler.getHandler(f.cell);if(null!=d&&null!=d.bends&&0<d.bends.length){var e=d.getHandleForEvent(r),k=this.view.getEdgeStyle(f);b=k==mxEdgeStyle.EntityRelation;A||x!=mxEvent.LABEL_HANDLE||(e=x);if(b&&0!=e&&e!=d.bends.length-1&&e!=mxEvent.LABEL_HANDLE)!b|| null==f.visibleSourceState&&null==f.visibleTargetState||(this.graphHandler.reset(),c.consume());else if(e==mxEvent.LABEL_HANDLE||0==e||null!=f.visibleSourceState||e==d.bends.length-1||null!=f.visibleTargetState)b||e==mxEvent.LABEL_HANDLE||(b=f.absolutePoints,null!=b&&(null==k&&null==e||k==mxEdgeStyle.OrthConnector)&&(e=x,null==e&&(e=new mxRectangle(m.x,m.y),e.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(e,b[0].x,b[0].y)?e=0:mxUtils.contains(e,b[b.length-1].x,b[b.length-1].y)? -e=d.bends.length-1:null!=k&&(2==b.length||3==b.length&&(0==Math.round(b[0].x-b[1].x)&&0==Math.round(b[1].x-b[2].x)||0==Math.round(b[0].y-b[1].y)&&0==Math.round(b[1].y-b[2].y)))?e=2:(e=mxUtils.findNearestSegment(f,m.x,m.y),e=null==k?mxEvent.VIRTUAL_HANDLE-e:e+1))),null==e&&(e=mxEvent.VIRTUAL_HANDLE)),d.start(c.getGraphX(),c.getGraphX(),e),x=m=r=t=null,z=!1,c.consume(),this.graphHandler.reset()}}}else if(f=c.getState(),null!=f&&this.model.isEdge(f.cell)){d=null;b=f.absolutePoints;if(null!=b)if(e=new mxRectangle(c.getGraphX(), +e=d.bends.length-1:null!=k&&(2==b.length||3==b.length&&(0==Math.round(b[0].x-b[1].x)&&0==Math.round(b[1].x-b[2].x)||0==Math.round(b[0].y-b[1].y)&&0==Math.round(b[1].y-b[2].y)))?e=2:(e=mxUtils.findNearestSegment(f,m.x,m.y),e=null==k?mxEvent.VIRTUAL_HANDLE-e:e+1))),null==e&&(e=mxEvent.VIRTUAL_HANDLE)),d.start(c.getGraphX(),c.getGraphX(),e),x=m=r=t=null,A=!1,c.consume(),this.graphHandler.reset()}}}else if(f=c.getState(),null!=f&&this.model.isEdge(f.cell)){d=null;b=f.absolutePoints;if(null!=b)if(e=new mxRectangle(c.getGraphX(), c.getGraphY()),e.grow(mxEdgeHandler.prototype.handleImage.width/2),null!=f.text&&null!=f.text.boundingBox&&mxUtils.contains(f.text.boundingBox,c.getGraphX(),c.getGraphY()))d="move";else if(mxUtils.contains(e,b[0].x,b[0].y)||mxUtils.contains(e,b[b.length-1].x,b[b.length-1].y))d="pointer";else if(null!=f.visibleSourceState||null!=f.visibleTargetState)k=this.view.getEdgeStyle(f),d="crosshair",k!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(f)&&(k=mxUtils.findNearestSegment(f,c.getGraphX(),c.getGraphY()), k<b.length-1&&0<=k&&(d=0==Math.round(b[k].x-b[k+1].x)?"col-resize":"row-resize"));null!=d&&f.setCursor(d)}}),mouseUp:mxUtils.bind(this,function(a,c){x=m=r=t=null})})}this.cellRenderer.getLabelValue=function(a){var c=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);a.view.graph.isHtmlLabel(a.cell)&&(c=1!=a.style.html?mxUtils.htmlEntities(c,!1):a.view.graph.sanitizeHtml(c));return c};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0);this.setDropEnabled(!0);this.setPanning(!0); this.setTooltips(!0);this.setAllowLoops(!0);this.allowAutoPanning=!0;this.constrainChildren=this.resetEdgesOnConnect=!1;this.constrainRelativeChildren=!0;this.graphHandler.scrollOnMove=!1;this.graphHandler.scaleGrid=!0;this.connectionHandler.setCreateTarget(!1);this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(a,c){return!1};this.alternateEdgeStyle="vertical";null==d&&this.loadStylesheet();var c=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates= @@ -2228,14 +2228,14 @@ function(){var a=c.apply(this,arguments);if(this.graph.pageVisible){for(var b=[] function(a,c){return null==a.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(a){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};this.graphHandler.getCells=function(a){for(var c=mxGraphHandler.prototype.getCells.apply(this,arguments),b=[],f=0;f<c.length;f++){var d=this.graph.view.getState(c[f]),d=null!=d?d.style:this.graph.getCellStyle(c[f]); "1"==mxUtils.getValue(d,"part","0")?(d=this.graph.model.getParent(c[f]),this.graph.model.isVertex(d)&&0>mxUtils.indexOf(c,d)&&b.push(d)):b.push(c[f])}return b};this.connectionHandler.createTargetVertex=function(a,c){var f=this.graph.view.getState(c),f=null!=f?f.style:this.graph.getCellStyle(c);mxUtils.getValue(f,"part",!1)&&(f=this.graph.model.getParent(c),this.graph.model.isVertex(f)&&(c=f));return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var f=new mxRubberband(this); this.getRubberband=function(){return f};var k=(new Date).getTime(),p=0,n=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var a=this.currentState;n.apply(this,arguments);a!=this.currentState?(k=(new Date).getTime(),p=0):p=(new Date).getTime()-k};var g=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=this.currentState&&a.getState()==this.currentState&&2E3<p||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style, -"outlineConnect","1"))&&g.apply(this,arguments)};var A=this.isToggleEvent;this.isToggleEvent=function(a){return A.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(a)};var y=f.isForceRubberbandEvent;f.isForceRubberbandEvent=function(a){return y.apply(this,arguments)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(a.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==a.getState()&&mxEvent.isTouchEvent(a.getEvent())};var u=null;this.panningHandler.addListener(mxEvent.PAN_START, +"outlineConnect","1"))&&g.apply(this,arguments)};var y=this.isToggleEvent;this.isToggleEvent=function(a){return y.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(a)};var z=f.isForceRubberbandEvent;f.isForceRubberbandEvent=function(a){return z.apply(this,arguments)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(a.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==a.getState()&&mxEvent.isTouchEvent(a.getEvent())};var u=null;this.panningHandler.addListener(mxEvent.PAN_START, mxUtils.bind(this,function(){this.isEnabled()&&(u=this.container.style.cursor,this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END,mxUtils.bind(this,function(){this.isEnabled()&&(this.container.style.cursor=u)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(a){return mxEvent.isMouseEvent(a.getEvent())};var F=this.click;this.click=function(a){var c=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);if(this.isEnabled()&& !c||a.isConsumed())return F.apply(this,arguments);var f=c?a.sourceState.cell:a.getCell();null!=f&&(f=this.getLinkForCell(f),null!=f&&(this.isCustomLink(f)?this.customLinkClicked(f):this.openLink(f)));this.isEnabled()&&c&&this.clearSelection()};this.tooltipHandler.getStateForEvent=function(a){return a.sourceState};this.getCursorForMouseEvent=function(a){var c=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);return this.getCursorForCell(c?a.sourceState.cell:a.getCell())};var v= this.getCursorForCell;this.getCursorForCell=function(a){if(!this.isEnabled()||this.isCellLocked(a)){if(null!=this.getLinkForCell(a))return"pointer";if(this.isCellLocked(a))return"default"}return v.apply(this,arguments)};this.selectRegion=function(a,c){var f=this.getAllCells(a.x,a.y,a.width,a.height);this.selectCellsForEvent(f,c);return f};this.getAllCells=function(a,c,f,b,d,e){e=null!=e?e:[];if(0<f||0<b){var k=this.getModel(),g=a+f,n=c+b;null==d&&(d=this.getCurrentRoot(),null==d&&(d=k.getRoot())); -if(null!=d)for(var q=k.getChildCount(d),D=0;D<q;D++){var p=k.getChildAt(d,D),u=this.view.getState(p);if(null!=u&&this.isCellVisible(p)&&"1"!=mxUtils.getValue(u.style,"locked","0")){var C=mxUtils.getValue(u.style,mxConstants.STYLE_ROTATION)||0;0!=C&&(u=mxUtils.getBoundingBox(u,C));(k.isEdge(p)||k.isVertex(p))&&u.x>=a&&u.y+u.height<=n&&u.y>=c&&u.x+u.width<=g&&e.push(p);this.getAllCells(a,c,f,b,p,e)}}}return e};var E=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent= +if(null!=d)for(var q=k.getChildCount(d),D=0;D<q;D++){var p=k.getChildAt(d,D),u=this.view.getState(p);if(null!=u&&this.isCellVisible(p)&&"1"!=mxUtils.getValue(u.style,"locked","0")){var B=mxUtils.getValue(u.style,mxConstants.STYLE_ROTATION)||0;0!=B&&(u=mxUtils.getBoundingBox(u,B));(k.isEdge(p)||k.isVertex(p))&&u.x>=a&&u.y+u.height<=n&&u.y>=c&&u.x+u.width<=g&&e.push(p);this.getAllCells(a,c,f,b,p,e)}}}return e};var E=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent= function(a,c,f){return this.graph.isCellSelected(a)?!1:E.apply(this,arguments)};this.isCellLocked=function(a){for(a=this.view.getState(a);null!=a;){if("1"==mxUtils.getValue(a.style,"locked","0"))return!0;a=this.view.getState(this.model.getParent(a.cell))}return!1};var q=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,c){if("mouseDown"==c.getProperty("eventName")){var f=c.getProperty("event").getState();q=null==f||this.isSelectionEmpty()||this.isCellSelected(f.cell)?null: this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(a,c){if(!mxEvent.isMultiTouchEvent(c)){var b=c.getProperty("event"),d=c.getProperty("cell");null==d?(b=mxUtils.convertPoint(this.container,mxEvent.getClientX(b),mxEvent.getClientY(b)),f.start(b.x,b.y)):null!=q?this.addSelectionCells(q):1<this.getSelectionCount()&&this.isCellSelected(d)&&this.removeSelectionCell(d);q=null;c.consume()}}));this.connectionHandler.selectCells=function(a,c){this.graph.setSelectionCell(c|| -a)};this.connectionHandler.constraintHandler.isStateIgnored=function(a,c){return c&&a.view.graph.isCellSelected(a.cell)};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var a=this.connectionHandler.constraintHandler;null!=a.currentFocus&&a.isStateIgnored(a.currentFocus,!0)&&(a.currentFocus=null,a.constraints=null,a.destroyIcons());a.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var B=this.updateMouseEvent;this.updateMouseEvent=function(a){a=B.apply(this, +a)};this.connectionHandler.constraintHandler.isStateIgnored=function(a,c){return c&&a.view.graph.isCellSelected(a.cell)};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var a=this.connectionHandler.constraintHandler;null!=a.currentFocus&&a.isStateIgnored(a.currentFocus,!0)&&(a.currentFocus=null,a.constraints=null,a.destroyIcons());a.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var C=this.updateMouseEvent;this.updateMouseEvent=function(a){a=C.apply(this, arguments);null!=a.state&&this.isCellLocked(a.getCell())&&(a.state=null);return a}}this.currentTranslate=new mxPoint(0,0)};Graph.touchStyle=mxClient.IS_TOUCH||mxClient.IS_FF&&mxClient.IS_WIN||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||null==window.urlParams||"1"==urlParams.touch;Graph.fileSupport=null!=window.File&&null!=window.FileReader&&null!=window.FileList&&(null==window.urlParams||"0"!=urlParams.filesupport);Graph.lineJumpsEnabled=!0;Graph.defaultJumpSize=6; Graph.createSvgImage=function(a,b,e){e=unescape(encodeURIComponent('<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+a+'px" height="'+b+'px" version="1.1">'+e+"</svg>"));return new mxImage("data:image/svg+xml;base64,"+(window.btoa?btoa(e):Base64.encode(e,!0)),a,b)}; Graph.zapGremlins=function(a){for(var b=[],e=0;e<a.length;e++){var d=a.charCodeAt(e);(32<=d||9==d||10==d||13==d)&&65535!=d&&65534!=d&&b.push(a.charAt(e))}return b.join("")};Graph.stringToBytes=function(a){for(var b=Array(a.length),e=0;e<a.length;e++)b[e]=a.charCodeAt(e);return b};Graph.bytesToString=function(a){for(var b=Array(a.length),e=0;e<a.length;e++)b[e]=String.fromCharCode(a[e]);return b.join("")};Graph.compressNode=function(a){return Graph.compress(Graph.zapGremlins(mxUtils.getXml(a)))}; @@ -2267,8 +2267,8 @@ Graph.prototype.isLabelMovable=function(a){var b=this.view.getState(a),b=null!=b Graph.prototype.getGlobalVariable=function(a){var b=null;"date"==a?b=(new Date).toLocaleDateString():"time"==a?b=(new Date).toLocaleTimeString():"timestamp"==a?b=(new Date).toLocaleString():"date{"==a.substring(0,5)&&(a=a.substring(5,a.length-1),b=this.formatDate(new Date,a));return b}; Graph.prototype.formatDate=function(a,b,e){null==this.dateFormatCache&&(this.dateFormatCache={i18n:{dayNames:"Sun Mon Tue Wed Thu Fri Sat Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),monthNames:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec January February March April May June July August September October November December".split(" ")},masks:{"default":"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy", shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var d=this.dateFormatCache,l=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,m=/[^-+\dA-Z]/g,r=function(a,c){a=String(a);for(c=c||2;a.length<c;)a="0"+a;return a};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(a)|| -/\d/.test(a)||(b=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");b=String(d.masks[b]||b||d.masks["default"]);"UTC:"==b.slice(0,4)&&(b=b.slice(4),e=!0);var t=e?"getUTC":"get",x=a[t+"Date"](),z=a[t+"Day"](),c=a[t+"Month"](),f=a[t+"FullYear"](),k=a[t+"Hours"](),p=a[t+"Minutes"](),n=a[t+"Seconds"](),t=a[t+"Milliseconds"](),g=e?0:a.getTimezoneOffset(),A={d:x,dd:r(x),ddd:d.i18n.dayNames[z],dddd:d.i18n.dayNames[z+7],m:c+1,mm:r(c+1),mmm:d.i18n.monthNames[c],mmmm:d.i18n.monthNames[c+ -12],yy:String(f).slice(2),yyyy:f,h:k%12||12,hh:r(k%12||12),H:k,HH:r(k),M:p,MM:r(p),s:n,ss:r(n),l:r(t,3),L:r(99<t?Math.round(t/10):t),t:12>k?"a":"p",tt:12>k?"am":"pm",T:12>k?"A":"P",TT:12>k?"AM":"PM",Z:e?"UTC":(String(a).match(l)||[""]).pop().replace(m,""),o:(0<g?"-":"+")+r(100*Math.floor(Math.abs(g)/60)+Math.abs(g)%60,4),S:["th","st","nd","rd"][3<x%10?0:(10!=x%100-x%10)*x%10]};return b.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(a){return a in A?A[a]:a.slice(1, +/\d/.test(a)||(b=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");b=String(d.masks[b]||b||d.masks["default"]);"UTC:"==b.slice(0,4)&&(b=b.slice(4),e=!0);var t=e?"getUTC":"get",x=a[t+"Date"](),A=a[t+"Day"](),c=a[t+"Month"](),f=a[t+"FullYear"](),k=a[t+"Hours"](),p=a[t+"Minutes"](),n=a[t+"Seconds"](),t=a[t+"Milliseconds"](),g=e?0:a.getTimezoneOffset(),y={d:x,dd:r(x),ddd:d.i18n.dayNames[A],dddd:d.i18n.dayNames[A+7],m:c+1,mm:r(c+1),mmm:d.i18n.monthNames[c],mmmm:d.i18n.monthNames[c+ +12],yy:String(f).slice(2),yyyy:f,h:k%12||12,hh:r(k%12||12),H:k,HH:r(k),M:p,MM:r(p),s:n,ss:r(n),l:r(t,3),L:r(99<t?Math.round(t/10):t),t:12>k?"a":"p",tt:12>k?"am":"pm",T:12>k?"A":"P",TT:12>k?"AM":"PM",Z:e?"UTC":(String(a).match(l)||[""]).pop().replace(m,""),o:(0<g?"-":"+")+r(100*Math.floor(Math.abs(g)/60)+Math.abs(g)%60,4),S:["th","st","nd","rd"][3<x%10?0:(10!=x%100-x%10)*x%10]};return b.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(a){return a in y?y[a]:a.slice(1, a.length-1)})}; Graph.prototype.createLayersDialog=function(){var a=document.createElement("div");a.style.position="absolute";for(var b=this.getModel(),e=b.getChildCount(b.root),d=0;d<e;d++)mxUtils.bind(this,function(d){var e=document.createElement("div");e.style.overflow="hidden";e.style.textOverflow="ellipsis";e.style.padding="2px";e.style.whiteSpace="nowrap";var l=document.createElement("input");l.style.display="inline-block";l.setAttribute("type","checkbox");b.isVisible(d)&&(l.setAttribute("checked","checked"), l.defaultChecked=!0);e.appendChild(l);var t=this.convertValueToString(d)||mxResources.get("background")||"Background";e.setAttribute("title",t);mxUtils.write(e,t);a.appendChild(e);mxEvent.addListener(l,"click",function(){null!=l.getAttribute("checked")?l.removeAttribute("checked"):l.setAttribute("checked","checked");b.setVisible(d,l.checked)})})(b.getChildAt(b.root,d));return a}; @@ -2276,9 +2276,9 @@ Graph.prototype.replacePlaceholders=function(a,b){var e=[];if(null!=b){for(var d match.index)+(null!=m?m:l));d=match.index+l.length}}e.push(b.substring(d))}return e.join("")};Graph.prototype.restoreSelection=function(a){if(null!=a&&0<a.length){for(var b=[],e=0;e<a.length;e++){var d=this.model.getCell(a[e].id);null!=d&&b.push(d)}this.setSelectionCells(b)}else this.clearSelection()}; Graph.prototype.selectCellsForConnectVertex=function(a,b,e){2==a.length&&this.model.isVertex(a[1])?(this.setSelectionCell(a[1]),null!=e&&(mxEvent.isTouchEvent(b)?e.update(e.getState(this.view.getState(a[1]))):e.reset()),this.scrollCellToVisible(a[1])):this.setSelectionCells(a)}; Graph.prototype.connectVertex=function(a,b,e,d,l,m){if(a.geometry.relative&&this.model.isEdge(a.parent))return[];m=m?m:!1;var r=a.geometry.relative&&null!=a.parent.geometry?new mxPoint(a.parent.geometry.width*a.geometry.x,a.parent.geometry.height*a.geometry.y):new mxPoint(a.geometry.x,a.geometry.y);b==mxConstants.DIRECTION_NORTH?(r.x+=a.geometry.width/2,r.y-=e):b==mxConstants.DIRECTION_SOUTH?(r.x+=a.geometry.width/2,r.y+=a.geometry.height+e):(r.x=b==mxConstants.DIRECTION_WEST?r.x-e:r.x+(a.geometry.width+ -e),r.y+=a.geometry.height/2);e=this.view.getState(this.model.getParent(a));var t=this.view.scale,x=this.view.translate,z=x.x*t,x=x.y*t;null!=e&&this.model.isVertex(e.cell)&&(z=e.x,x=e.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(r.x+=a.parent.geometry.x,r.y+=a.parent.geometry.y);m=m||mxEvent.isControlDown(d)&&!l?null:this.getCellAt(z+r.x*t,x+r.y*t);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), +e),r.y+=a.geometry.height/2);e=this.view.getState(this.model.getParent(a));var t=this.view.scale,x=this.view.translate,A=x.x*t,x=x.y*t;null!=e&&this.model.isVertex(e.cell)&&(A=e.x,x=e.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(r.x+=a.parent.geometry.x,r.y+=a.parent.geometry.y);m=m||mxEvent.isControlDown(d)&&!l?null:this.getCellAt(A+r.x*t,x+r.y*t);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), t=this.view.getState(m),null!=e&&null!=t&&mxUtils.intersects(e,t)&&(m=null));if(l=!mxEvent.isShiftDown(d)||l)b==mxConstants.DIRECTION_NORTH?r.y-=a.geometry.height/2:b==mxConstants.DIRECTION_SOUTH?r.y+=a.geometry.height/2:r.x=b==mxConstants.DIRECTION_WEST?r.x-a.geometry.width/2:r.x+a.geometry.width/2;null==m||this.isCellConnectable(m)||(e=this.getModel().getParent(m),this.getModel().isVertex(e)&&this.isCellConnectable(e)&&(m=e));if(m==a||this.model.isEdge(m)||!this.isCellConnectable(m))m=null;e=[]; -this.model.beginUpdate();try{t=m;if(null==t&&l){for(var z=a,c=this.getCellGeometry(a);null!=c&&c.relative;)z=this.getModel().getParent(z),c=this.getCellGeometry(z);var f=this.view.getState(z),k=null!=f?f.style:this.getCellStyle(z);if(mxUtils.getValue(k,"part",!1)){var p=this.model.getParent(z);this.model.isVertex(p)&&(z=p)}t=this.duplicateCells([z],!1)[0];c=this.getCellGeometry(t);null!=c&&(c.x=r.x-c.width/2,c.y=r.y-c.height/2)}c=null;null!=this.layoutManager&&(c=this.layoutManager.getLayout(this.model.getParent(a))); +this.model.beginUpdate();try{t=m;if(null==t&&l){for(var A=a,c=this.getCellGeometry(a);null!=c&&c.relative;)A=this.getModel().getParent(A),c=this.getCellGeometry(A);var f=this.view.getState(A),k=null!=f?f.style:this.getCellStyle(A);if(mxUtils.getValue(k,"part",!1)){var p=this.model.getParent(A);this.model.isVertex(p)&&(A=p)}t=this.duplicateCells([A],!1)[0];c=this.getCellGeometry(t);null!=c&&(c.x=r.x-c.width/2,c.y=r.y-c.height/2)}c=null;null!=this.layoutManager&&(c=this.layoutManager.getLayout(this.model.getParent(a))); var n=mxEvent.isControlDown(d)&&l||null==m&&null!=c&&c.constructor==mxStackLayout?null:this.insertEdge(this.model.getParent(a),null,"",a,t,this.createCurrentEdgeStyle());if(null!=n&&this.connectionHandler.insertBeforeSource){var g=null;for(d=a;null!=d.parent&&null!=d.geometry&&d.geometry.relative&&d.parent!=n.parent;)d=this.model.getParent(d);null!=d&&null!=d.parent&&d.parent==n.parent&&(g=d.parent.getIndex(d),this.model.add(d.parent,n,g))}null==m&&null!=t&&null!=c&&null!=a.parent&&c.constructor== mxStackLayout&&b==mxConstants.DIRECTION_WEST&&(g=a.parent.getIndex(a),this.model.add(a.parent,t,g));null!=n&&e.push(n);null==m&&null!=t&&e.push(t);null==t&&null!=n&&n.geometry.setTerminalPoint(r,!1);null!=n&&this.fireEvent(new mxEventObject("cellsInserted","cells",[n]))}finally{this.model.endUpdate()}return e}; Graph.prototype.getIndexableText=function(){var a=document.createElement("div"),b=[],e,d;for(d in this.model.cells)if(e=this.model.cells[d],this.model.isVertex(e)||this.model.isEdge(e))this.isHtmlLabel(e)?(a.innerHTML=this.getLabel(e),e=mxUtils.extractTextWithWhitespace([a])):e=this.getLabel(e),e=mxUtils.trim(e.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<e.length&&b.push(e);return b.join(" ")}; @@ -2286,8 +2286,8 @@ Graph.prototype.convertValueToString=function(a){if(null!=a.value&&"object"==typ Graph.prototype.getLinksForState=function(a){return null!=a&&null!=a.text&&null!=a.text.node?a.text.node.getElementsByTagName("a"):null};Graph.prototype.getLinkForCell=function(a){return null!=a.value&&"object"==typeof a.value?(a=a.value.getAttribute("link"),null!=a&&"javascript:"===a.toLowerCase().substring(0,11)&&(a=a.substring(11)),a):null}; Graph.prototype.getCellStyle=function(a){var b=mxGraph.prototype.getCellStyle.apply(this,arguments);if(null!=a&&null!=this.layoutManager){var e=this.model.getParent(a);this.model.isVertex(e)&&this.isCellCollapsed(a)&&(e=this.layoutManager.getLayout(e),null!=e&&e.constructor==mxStackLayout&&(b[mxConstants.STYLE_HORIZONTAL]=!e.horizontal))}return b}; Graph.prototype.updateAlternateBounds=function(a,b,e){if(null!=a&&null!=b&&null!=this.layoutManager&&null!=b.alternateBounds){var d=this.layoutManager.getLayout(this.model.getParent(a));null!=d&&d.constructor==mxStackLayout&&(d.horizontal?b.alternateBounds.height=0:b.alternateBounds.width=0)}mxGraph.prototype.updateAlternateBounds.apply(this,arguments)};Graph.prototype.isMoveCellsEvent=function(a){return mxEvent.isShiftDown(a)}; -Graph.prototype.foldCells=function(a,b,e,d,l){b=null!=b?b:!1;null==e&&(e=this.getFoldableCells(this.getSelectionCells(),a));if(null!=e){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var m=0;m<e.length;m++){var r=this.view.getState(e[m]),t=this.getCellGeometry(e[m]);if(null!=r&&null!=t){var x=Math.round(t.width-r.width/this.view.scale),z=Math.round(t.height-r.height/this.view.scale);if(0!=z||0!=x){var c=this.model.getParent(e[m]),f=this.layoutManager.getLayout(c); -null==f?null!=l&&this.isMoveCellsEvent(l)&&this.moveSiblings(r,c,x,z):null!=l&&mxEvent.isAltDown(l)||f.constructor!=mxStackLayout||f.resizeLast||this.resizeParentStacks(c,f,x,z)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(e)}}; +Graph.prototype.foldCells=function(a,b,e,d,l){b=null!=b?b:!1;null==e&&(e=this.getFoldableCells(this.getSelectionCells(),a));if(null!=e){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var m=0;m<e.length;m++){var r=this.view.getState(e[m]),t=this.getCellGeometry(e[m]);if(null!=r&&null!=t){var x=Math.round(t.width-r.width/this.view.scale),A=Math.round(t.height-r.height/this.view.scale);if(0!=A||0!=x){var c=this.model.getParent(e[m]),f=this.layoutManager.getLayout(c); +null==f?null!=l&&this.isMoveCellsEvent(l)&&this.moveSiblings(r,c,x,A):null!=l&&mxEvent.isAltDown(l)||f.constructor!=mxStackLayout||f.resizeLast||this.resizeParentStacks(c,f,x,A)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(e)}}; Graph.prototype.moveSiblings=function(a,b,e,d){this.model.beginUpdate();try{var l=this.getCellsBeyond(a.x,a.y,b,!0,!0);for(b=0;b<l.length;b++)if(l[b]!=a.cell){var m=this.view.getState(l[b]),r=this.getCellGeometry(l[b]);null!=m&&null!=r&&(r=r.clone(),r.translate(Math.round(e*Math.max(0,Math.min(1,(m.x-a.x)/a.width))),Math.round(d*Math.max(0,Math.min(1,(m.y-a.y)/a.height)))),this.model.setGeometry(l[b],r))}}finally{this.model.endUpdate()}}; Graph.prototype.resizeParentStacks=function(a,b,e,d){if(null!=this.layoutManager&&null!=b&&b.constructor==mxStackLayout&&!b.resizeLast){this.model.beginUpdate();try{for(var l=b.horizontal;null!=a&&null!=b&&b.constructor==mxStackLayout&&b.horizontal==l&&!b.resizeLast;){var m=this.getCellGeometry(a),r=this.view.getState(a);null!=r&&null!=m&&(m=m.clone(),b.horizontal?m.width+=e+Math.min(0,r.width/this.view.scale-m.width):m.height+=d+Math.min(0,r.height/this.view.scale-m.height),this.model.setGeometry(a, m));a=this.model.getParent(a);b=this.layoutManager.getLayout(a)}}finally{this.model.endUpdate()}}};Graph.prototype.isContainer=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return this.isSwimlane(a)?"0"!=b.container:"1"==b.container};Graph.prototype.isCellConnectable=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return null!=b&&null!=b.connectable?"0"!=b.connectable:mxGraph.prototype.isCellConnectable.apply(this,arguments)}; @@ -2332,13 +2332,13 @@ this.setCurrentState(a),this.repaint(),this.graph.connectionHandler.constraintHa (function(){var a=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){a.apply(this,arguments);this.validEdges=[]};var b=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(a,d){d=null!=d?d:!0;var c=this.getState(a);null!=c&&d&&this.graph.model.isEdge(c.cell)&&null!=c.style&&1!=c.style[mxConstants.STYLE_CURVED]&&!c.invalid&&this.updateLineJumps(c)&&this.graph.cellRenderer.redraw(c,!1,this.isRendering());c=b.apply(this, arguments);null!=c&&d&&this.graph.model.isEdge(c.cell)&&null!=c.style&&1!=c.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(c);return c};var e=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(a,b){return e.apply(this,arguments)||null!=a.routedPoints&&null!=b.routedPoints&&!mxUtils.equalPoints(b.routedPoints,a.routedPoints)};var d=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=function(a){d.apply(this,arguments);this.graph.model.isEdge(a.cell)&& 1!=a.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(a)};mxGraphView.prototype.updateLineJumps=function(a){var b=a.absolutePoints;if(Graph.lineJumpsEnabled){var c=null!=a.routedPoints,f=null;if(null!=b&&null!=this.validEdges&&"none"!==mxUtils.getValue(a.style,"jumpStyle","none")){for(var d=function(c,b,d){var e=new mxPoint(b,d);e.type=c;f.push(e);e=null!=a.routedPoints?a.routedPoints[f.length-1]:null;return null==e||e.type!=c||e.x!=b||e.y!=d},e=.5*this.scale,c=!1,f=[],n=0;n<b.length-1;n++){for(var g= -b[n+1],A=b[n],l=[],u=b[n+2];n<b.length-2&&mxUtils.ptSegDistSq(A.x,A.y,u.x,u.y,g.x,g.y)<1*this.scale*this.scale;)g=u,n++,u=b[n+2];for(var c=d(0,A.x,A.y)||c,t=0;t<this.validEdges.length;t++){var v=this.validEdges[t],m=v.absolutePoints;if(null!=m&&mxUtils.intersects(a,v)&&"1"!=v.style.noJump)for(v=0;v<m.length-1;v++){for(var q=m[v+1],B=m[v],u=m[v+2];v<m.length-2&&mxUtils.ptSegDistSq(B.x,B.y,u.x,u.y,q.x,q.y)<1*this.scale*this.scale;)q=u,v++,u=m[v+2];u=mxUtils.intersection(A.x,A.y,g.x,g.y,B.x,B.y,q.x, -q.y);if(null!=u&&(Math.abs(u.x-A.x)>e||Math.abs(u.y-A.y)>e)&&(Math.abs(u.x-g.x)>e||Math.abs(u.y-g.y)>e)&&(Math.abs(u.x-B.x)>e||Math.abs(u.y-B.y)>e)&&(Math.abs(u.x-q.x)>e||Math.abs(u.y-q.y)>e)){q=u.x-A.x;B=u.y-A.y;u={distSq:q*q+B*B,x:u.x,y:u.y};for(q=0;q<l.length;q++)if(l[q].distSq>u.distSq){l.splice(q,0,u);u=null;break}null==u||0!=l.length&&l[l.length-1].x===u.x&&l[l.length-1].y===u.y||l.push(u)}}}for(v=0;v<l.length;v++)c=d(1,l[v].x,l[v].y)||c}u=b[b.length-1];c=d(0,u.x,u.y)||c}a.routedPoints=f;return c}return!1}; +b[n+1],y=b[n],l=[],u=b[n+2];n<b.length-2&&mxUtils.ptSegDistSq(y.x,y.y,u.x,u.y,g.x,g.y)<1*this.scale*this.scale;)g=u,n++,u=b[n+2];for(var c=d(0,y.x,y.y)||c,t=0;t<this.validEdges.length;t++){var v=this.validEdges[t],m=v.absolutePoints;if(null!=m&&mxUtils.intersects(a,v)&&"1"!=v.style.noJump)for(v=0;v<m.length-1;v++){for(var q=m[v+1],C=m[v],u=m[v+2];v<m.length-2&&mxUtils.ptSegDistSq(C.x,C.y,u.x,u.y,q.x,q.y)<1*this.scale*this.scale;)q=u,v++,u=m[v+2];u=mxUtils.intersection(y.x,y.y,g.x,g.y,C.x,C.y,q.x, +q.y);if(null!=u&&(Math.abs(u.x-y.x)>e||Math.abs(u.y-y.y)>e)&&(Math.abs(u.x-g.x)>e||Math.abs(u.y-g.y)>e)&&(Math.abs(u.x-C.x)>e||Math.abs(u.y-C.y)>e)&&(Math.abs(u.x-q.x)>e||Math.abs(u.y-q.y)>e)){q=u.x-y.x;C=u.y-y.y;u={distSq:q*q+C*C,x:u.x,y:u.y};for(q=0;q<l.length;q++)if(l[q].distSq>u.distSq){l.splice(q,0,u);u=null;break}null==u||0!=l.length&&l[l.length-1].x===u.x&&l[l.length-1].y===u.y||l.push(u)}}}for(v=0;v<l.length;v++)c=d(1,l[v].x,l[v].y)||c}u=b[b.length-1];c=d(0,u.x,u.y)||c}a.routedPoints=f;return c}return!1}; var l=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(a,b,c){this.routedPoints=null!=this.state?this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)l.apply(this,arguments);else{var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,d=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,e=mxUtils.getValue(this.style, -"jumpStyle","none"),n,g=!0,A=null,y=null;n=[];var u=null;a.begin();for(var t=0;t<this.state.routedPoints.length;t++){var v=this.state.routedPoints[t],m=new mxPoint(v.x/this.scale,v.y/this.scale);0==t?m=b[0]:t==this.state.routedPoints.length-1&&(m=b[b.length-1]);var q=!1;if(null!=A&&1==v.type){var B=this.state.routedPoints[t+1],v=B.x/this.scale-m.x,B=B.y/this.scale-m.y,v=v*v+B*B;null==u&&(u=new mxPoint(m.x-A.x,m.y-A.y),y=Math.sqrt(u.x*u.x+u.y*u.y),0<y?(u.x=u.x*d/y,u.y=u.y*d/y):u=null);v>d*d&&0<y&& -(v=A.x-m.x,B=A.y-m.y,v=v*v+B*B,v>d*d&&(q=new mxPoint(m.x-u.x,m.y-u.y),v=new mxPoint(m.x+u.x,m.y+u.y),n.push(q),this.addPoints(a,n,c,f,!1,null,g),n=0>Math.round(u.x)||0==Math.round(u.x)&&0>=Math.round(u.y)?1:-1,g=!1,"sharp"==e?(a.lineTo(q.x-u.y*n,q.y+u.x*n),a.lineTo(v.x-u.y*n,v.y+u.x*n),a.lineTo(v.x,v.y)):"arc"==e?(n*=1.3,a.curveTo(q.x-u.y*n,q.y+u.x*n,v.x-u.y*n,v.y+u.x*n,v.x,v.y)):(a.moveTo(v.x,v.y),g=!0),n=[v],q=!0))}else u=null;q||(n.push(m),A=m)}this.addPoints(a,n,c,f,!1,null,g);a.stroke()}};var m= -mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(a,b,c,f){if(null==b||null==a||"1"!=b.style.snapToPoint&&"1"!=a.style.snapToPoint)m.apply(this,arguments);else{b=this.getTerminalPort(a,b,f);var d=this.getNextPoint(a,c,f),e=this.graph.isOrthogonal(a),n=mxUtils.toRadians(Number(b.style[mxConstants.STYLE_ROTATION]||"0")),g=new mxPoint(b.getCenterX(),b.getCenterY());if(0!=n)var A=Math.cos(-n),l=Math.sin(-n),d=mxUtils.getRotatedPoint(d,A,l,g); -A=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]||0);A+=parseFloat(a.style[f?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);d=this.getPerimeterPoint(b,d,0==n&&e,A);0!=n&&(A=Math.cos(n),l=Math.sin(n),d=mxUtils.getRotatedPoint(d,A,l,g));a.setAbsoluteTerminalPoint(this.snapToAnchorPoint(a,b,c,f,d),f)}};mxGraphView.prototype.snapToAnchorPoint=function(a,b,c,f,d){if(null!=b&&null!=a){a=this.graph.getAllConnectionConstraints(b);f=c=null;if(null!=a)for(var e= +"jumpStyle","none"),n,g=!0,y=null,z=null;n=[];var u=null;a.begin();for(var t=0;t<this.state.routedPoints.length;t++){var v=this.state.routedPoints[t],m=new mxPoint(v.x/this.scale,v.y/this.scale);0==t?m=b[0]:t==this.state.routedPoints.length-1&&(m=b[b.length-1]);var q=!1;if(null!=y&&1==v.type){var C=this.state.routedPoints[t+1],v=C.x/this.scale-m.x,C=C.y/this.scale-m.y,v=v*v+C*C;null==u&&(u=new mxPoint(m.x-y.x,m.y-y.y),z=Math.sqrt(u.x*u.x+u.y*u.y),0<z?(u.x=u.x*d/z,u.y=u.y*d/z):u=null);v>d*d&&0<z&& +(v=y.x-m.x,C=y.y-m.y,v=v*v+C*C,v>d*d&&(q=new mxPoint(m.x-u.x,m.y-u.y),v=new mxPoint(m.x+u.x,m.y+u.y),n.push(q),this.addPoints(a,n,c,f,!1,null,g),n=0>Math.round(u.x)||0==Math.round(u.x)&&0>=Math.round(u.y)?1:-1,g=!1,"sharp"==e?(a.lineTo(q.x-u.y*n,q.y+u.x*n),a.lineTo(v.x-u.y*n,v.y+u.x*n),a.lineTo(v.x,v.y)):"arc"==e?(n*=1.3,a.curveTo(q.x-u.y*n,q.y+u.x*n,v.x-u.y*n,v.y+u.x*n,v.x,v.y)):(a.moveTo(v.x,v.y),g=!0),n=[v],q=!0))}else u=null;q||(n.push(m),y=m)}this.addPoints(a,n,c,f,!1,null,g);a.stroke()}};var m= +mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(a,b,c,f){if(null==b||null==a||"1"!=b.style.snapToPoint&&"1"!=a.style.snapToPoint)m.apply(this,arguments);else{b=this.getTerminalPort(a,b,f);var d=this.getNextPoint(a,c,f),e=this.graph.isOrthogonal(a),n=mxUtils.toRadians(Number(b.style[mxConstants.STYLE_ROTATION]||"0")),g=new mxPoint(b.getCenterX(),b.getCenterY());if(0!=n)var y=Math.cos(-n),l=Math.sin(-n),d=mxUtils.getRotatedPoint(d,y,l,g); +y=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]||0);y+=parseFloat(a.style[f?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);d=this.getPerimeterPoint(b,d,0==n&&e,y);0!=n&&(y=Math.cos(n),l=Math.sin(n),d=mxUtils.getRotatedPoint(d,y,l,g));a.setAbsoluteTerminalPoint(this.snapToAnchorPoint(a,b,c,f,d),f)}};mxGraphView.prototype.snapToAnchorPoint=function(a,b,c,f,d){if(null!=b&&null!=a){a=this.graph.getAllConnectionConstraints(b);f=c=null;if(null!=a)for(var e= 0;e<a.length;e++){var k=this.graph.getConnectionPoint(b,a[e]);if(null!=k){var g=(k.x-d.x)*(k.x-d.x)+(k.y-d.y)*(k.y-d.y);if(null==f||g<f)c=k,f=g}}null!=c&&(d=c)}return d};var r=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(a,b,c){var f=r.apply(this,arguments);"1"==a.getAttribute("placeholders")&&null!=c.state&&(f=c.state.view.graph.replacePlaceholders(c.state.cell,f));return f};var t=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape= function(a){if(null!=a.style&&"undefined"!==typeof pako){var b=mxUtils.getValue(a.style,mxConstants.STYLE_SHAPE,null);if(null!=b&&"string"===typeof b&&"stencil("==b.substring(0,8))try{var c=b.substring(8,b.length-1),f=mxUtils.parseXml(Graph.decompress(c));return new mxShape(new mxStencil(f.documentElement))}catch(k){null!=window.console&&console.log("Error in shape: "+k)}}return t.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0; mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[]; @@ -2363,8 +2363,8 @@ if(f){this.isGridEnabled()&&(c=this.snap(c),b=this.snap(b));var k=this.getBoundi c=null!=c?c.style:this.getCellStyle(a);null!=c&&(c=mxUtils.getValue(c,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL,this.setCellStyles(mxConstants.STYLE_ELBOW,c,[a]))}};Graph.prototype.isValidRoot=function(a){for(var c=this.model.getChildCount(a),b=0,f=0;f<c;f++){var d=this.model.getChildAt(a,f);this.model.isVertex(d)&&(d=this.getCellGeometry(d),null==d||d.relative||b++)}return 0<b||this.isContainer(a)}; Graph.prototype.isValidDropTarget=function(a){var c=this.view.getState(a),c=null!=c?c.style:this.getCellStyle(a);return"1"!=mxUtils.getValue(c,"part","0")&&(this.isContainer(a)||mxGraph.prototype.isValidDropTarget.apply(this,arguments)&&"0"!=mxUtils.getValue(c,"dropTarget","1"))};Graph.prototype.createGroupCell=function(){var a=mxGraph.prototype.createGroupCell.apply(this,arguments);a.setStyle("group");return a};Graph.prototype.isExtendParentsOnAdd=function(a){var c=mxGraph.prototype.isExtendParentsOnAdd.apply(this, arguments);if(c&&null!=a&&null!=this.layoutManager){var b=this.model.getParent(a);null!=b&&(b=this.layoutManager.getLayout(b),null!=b&&b.constructor==mxStackLayout&&(c=!1))}return c};Graph.prototype.getPreferredSizeForCell=function(a){var c=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=c&&(c.width+=10,c.height+=4,this.gridEnabled&&(c.width=this.snap(c.width),c.height=this.snap(c.height)));return c};Graph.prototype.turnShapes=function(a){var c=this.getModel(),b=[];c.beginUpdate(); -try{for(var f=0;f<a.length;f++){var d=a[f];if(c.isEdge(d)){var e=c.getTerminal(d,!0),k=c.getTerminal(d,!1);c.setTerminal(d,k,!0);c.setTerminal(d,e,!1);var g=c.getGeometry(d);if(null!=g){g=g.clone();null!=g.points&&g.points.reverse();var n=g.getTerminalPoint(!0),q=g.getTerminalPoint(!1);g.setTerminalPoint(n,!1);g.setTerminalPoint(q,!0);c.setGeometry(d,g);var p=this.view.getState(d),D=this.view.getState(e),u=this.view.getState(k);if(null!=p){var C=null!=D?this.getConnectionConstraint(p,D,!0):null,l= -null!=u?this.getConnectionConstraint(p,u,!1):null;this.setConnectionConstraint(d,e,!0,l);this.setConnectionConstraint(d,k,!1,C)}b.push(d)}}else if(c.isVertex(d)&&(g=this.getCellGeometry(d),null!=g)){g=g.clone();g.x+=g.width/2-g.height/2;g.y+=g.height/2-g.width/2;var A=g.width;g.width=g.height;g.height=A;c.setGeometry(d,g);var B=this.view.getState(d);if(null!=B){var v=B.style[mxConstants.STYLE_DIRECTION]||"east";"east"==v?v="south":"south"==v?v="west":"west"==v?v="north":"north"==v&&(v="east");this.setCellStyles(mxConstants.STYLE_DIRECTION, +try{for(var f=0;f<a.length;f++){var d=a[f];if(c.isEdge(d)){var e=c.getTerminal(d,!0),k=c.getTerminal(d,!1);c.setTerminal(d,k,!0);c.setTerminal(d,e,!1);var g=c.getGeometry(d);if(null!=g){g=g.clone();null!=g.points&&g.points.reverse();var n=g.getTerminalPoint(!0),q=g.getTerminalPoint(!1);g.setTerminalPoint(n,!1);g.setTerminalPoint(q,!0);c.setGeometry(d,g);var p=this.view.getState(d),D=this.view.getState(e),u=this.view.getState(k);if(null!=p){var B=null!=D?this.getConnectionConstraint(p,D,!0):null,l= +null!=u?this.getConnectionConstraint(p,u,!1):null;this.setConnectionConstraint(d,e,!0,l);this.setConnectionConstraint(d,k,!1,B)}b.push(d)}}else if(c.isVertex(d)&&(g=this.getCellGeometry(d),null!=g)){g=g.clone();g.x+=g.width/2-g.height/2;g.y+=g.height/2-g.width/2;var y=g.width;g.width=g.height;g.height=y;c.setGeometry(d,g);var C=this.view.getState(d);if(null!=C){var v=C.style[mxConstants.STYLE_DIRECTION]||"east";"east"==v?v="south":"south"==v?v="west":"west"==v?v="north":"north"==v&&(v="east");this.setCellStyles(mxConstants.STYLE_DIRECTION, v,[d])}b.push(d)}}}finally{c.endUpdate()}return b};Graph.prototype.stencilHasPlaceholders=function(a){if(null!=a&&null!=a.fgNode)for(a=a.fgNode.firstChild;null!=a;){if("text"==a.nodeName&&"1"==a.getAttribute("placeholders"))return!0;a=a.nextSibling}return!1};Graph.prototype.processChange=function(a){mxGraph.prototype.processChange.apply(this,arguments);if(a instanceof mxValueChange&&null!=a.cell&&null!=a.cell.value&&"object"==typeof a.cell.value){var c=this.model.getDescendants(a.cell);if(0<c.length)for(var b= 0;b<c.length;b++){var f=this.view.getState(c[b]);null!=f&&null!=f.shape&&null!=f.shape.stencil&&this.stencilHasPlaceholders(f.shape.stencil)?this.removeStateForCell(c[b]):this.isReplacePlaceholders(c[b])&&this.view.invalidate(c[b],!1,!1)}}};Graph.prototype.replaceElement=function(a,c){for(var b=a.ownerDocument.createElement(null!=c?c:"span"),f=Array.prototype.slice.call(a.attributes);attr=f.pop();)b.setAttribute(attr.nodeName,attr.nodeValue);b.innerHTML=a.innerHTML;a.parentNode.replaceChild(b,a)}; Graph.prototype.processElements=function(a,c){for(var b=a.getElementsByTagName("*"),f=0;f<b.length;f++)c(b[f])};Graph.prototype.updateLabelElements=function(a,c,b){a=null!=a?a:this.getSelectionCells();for(var f=document.createElement("div"),d=0;d<a.length;d++)if(this.isHtmlLabel(a[d])){var e=this.convertValueToString(a[d]);if(null!=e&&0<e.length){f.innerHTML=e;for(var k=f.getElementsByTagName(null!=b?b:"*"),g=0;g<k.length;g++)c(k[g]);f.innerHTML!=e&&this.cellLabelChanged(a[d],f.innerHTML)}}};Graph.prototype.cellLabelChanged= @@ -2391,13 +2391,13 @@ b.length+1)for(f=c.length-1;0<=f;f--)if(c[f]!=b[f-1]){for(c=c[f].getElementsByTa "1")&&"wrap"==b[mxConstants.STYLE_WHITE_SPACE]};Graph.prototype.distributeCells=function(a,c){null==c&&(c=this.getSelectionCells());if(null!=c&&1<c.length){for(var b=[],f=null,d=null,e=0;e<c.length;e++)if(this.getModel().isVertex(c[e])){var k=this.view.getState(c[e]);if(null!=k){var g=a?k.getCenterX():k.getCenterY(),f=null!=f?Math.max(f,g):g,d=null!=d?Math.min(d,g):g;b.push(k)}}if(2<b.length){b.sort(function(c,b){return a?c.x-b.x:c.y-b.y});k=this.view.translate;g=this.view.scale;d=d/g-(a?k.x:k.y); f=f/g-(a?k.x:k.y);this.getModel().beginUpdate();try{for(var n=(f-d)/(b.length-1),f=d,e=1;e<b.length-1;e++){var q=this.view.getState(this.model.getParent(b[e].cell)),p=this.getCellGeometry(b[e].cell),f=f+n;null!=p&&null!=q&&(p=p.clone(),a?p.x=Math.round(f-p.width/2)-q.origin.x:p.y=Math.round(f-p.height/2)-q.origin.y,this.getModel().setGeometry(b[e].cell,p))}}finally{this.getModel().endUpdate()}}}return c};Graph.prototype.isCloneEvent=function(a){return mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxEvent.isControlDown(a)}; Graph.prototype.encodeCells=function(a){for(var c=this.cloneCells(a),b=new mxDictionary,f=0;f<a.length;f++)b.put(a[f],!0);for(f=0;f<c.length;f++){var d=this.view.getState(a[f]);if(null!=d){var e=this.getCellGeometry(c[f]);null==e||!e.relative||this.model.isEdge(a[f])||b.get(this.model.getParent(a[f]))||(e.relative=!1,e.x=d.x/d.view.scale-d.view.translate.x,e.y=d.y/d.view.scale-d.view.translate.y)}}b=new mxCodec;d=new mxGraphModel;e=d.getChildAt(d.getRoot(),0);for(f=0;f<a.length;f++)d.add(e,c[f]); -return b.encode(d)};Graph.prototype.createSvgImageExport=function(){var a=new mxImageExport;a.getLinkForCellState=mxUtils.bind(this,function(a,c){return this.getLinkForCell(a.cell)});return a};Graph.prototype.getSvg=function(a,c,b,f,d,e,k,g,q,n){var p=this.useCssTransforms;p&&(this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange());try{c=null!=c?c:1;b=null!=b?b:0;d=null!=d?d:!0;e=null!=e?e:!0;k=null!=k?k:!0;var u=e||f?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()); -if(null==u)throw Error(mxResources.get("drawingEmpty"));var C=this.view.scale,l=mxUtils.createXmlDocument(),B=null!=l.createElementNS?l.createElementNS(mxConstants.NS_SVG,"svg"):l.createElement("svg");null!=a&&(null!=B.style?B.style.backgroundColor=a:B.setAttribute("style","background-color:"+a));null==l.createElementNS?(B.setAttribute("xmlns",mxConstants.NS_SVG),B.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):B.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK); -a=c/C;var A=Math.max(1,Math.ceil(u.width*a)+2*b)+(n?5:0),v=Math.max(1,Math.ceil(u.height*a)+2*b)+(n?5:0);B.setAttribute("version","1.1");B.setAttribute("width",A+"px");B.setAttribute("height",v+"px");B.setAttribute("viewBox",(d?"-0.5 -0.5":"0 0")+" "+A+" "+v);l.appendChild(B);var y=null!=l.createElementNS?l.createElementNS(mxConstants.NS_SVG,"g"):l.createElement("g");B.appendChild(y);var D=this.createSvgCanvas(y);D.foOffset=d?-.5:0;D.textOffset=d?-.5:0;D.imageOffset=d?-.5:0;D.translate(Math.floor((b/ -c-u.x)/C),Math.floor((b/c-u.y)/C));var m=document.createElement("textarea"),t=D.createAlternateContent;D.createAlternateContent=function(a,c,b,f,d,e,k,g,n,q,p,u,C){var B=this.state;if(null!=this.foAltText&&(0==f||0!=B.fontSize&&e.length<5*f/B.fontSize)){var l=this.createElement("text");l.setAttribute("x",Math.round(f/2));l.setAttribute("y",Math.round((d+B.fontSize)/2));l.setAttribute("fill",B.fontColor||"black");l.setAttribute("text-anchor","middle");l.setAttribute("font-size",Math.round(B.fontSize)+ -"px");l.setAttribute("font-family",B.fontFamily);(B.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&l.setAttribute("font-weight","bold");(B.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&l.setAttribute("font-style","italic");(B.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&l.setAttribute("text-decoration","underline");try{return m.innerHTML=e,l.textContent=m.value,l}catch(Fa){return t.apply(this,arguments)}}else return t.apply(this,arguments)};var G=this.backgroundImage; -if(null!=G){c=C/c;var r=this.view.translate,J=new mxRectangle(r.x*c,r.y*c,G.width*c,G.height*c);mxUtils.intersects(u,J)&&D.image(r.x,r.y,G.width,G.height,G.src,!0)}D.scale(a);D.textEnabled=k;g=null!=g?g:this.createSvgImageExport();var F=g.drawCellState,W=g.getLinkForCellState;g.getLinkForCellState=function(a,c){var b=W.apply(this,arguments);return null==b||a.view.graph.isCustomLink(b)?null:b};g.drawCellState=function(a,c){for(var b=a.view.graph,f=b.isCellSelected(a.cell),d=b.model.getParent(a.cell);!e&& -!f&&null!=d;)f=b.isCellSelected(d),d=b.model.getParent(d);(e||f)&&F.apply(this,arguments)};g.drawState(this.getView().getState(this.model.root),D);this.updateSvgLinks(B,q,!0);return B}finally{p&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.updateSvgLinks=function(a,c,b){a=a.getElementsByTagName("a");for(var f=0;f<a.length;f++){var d=a[f].getAttribute("href");null==d&&(d=a[f].getAttribute("xlink:href"));null!=d&&(null!=c&&/^https?:\/\//.test(d)?a[f].setAttribute("target", +return b.encode(d)};Graph.prototype.createSvgImageExport=function(){var a=new mxImageExport;a.getLinkForCellState=mxUtils.bind(this,function(a,c){return this.getLinkForCell(a.cell)});return a};Graph.prototype.getSvg=function(a,c,b,f,d,e,k,g,n,q){var p=this.useCssTransforms;p&&(this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange());try{c=null!=c?c:1;b=null!=b?b:0;d=null!=d?d:!0;e=null!=e?e:!0;k=null!=k?k:!0;var u=e||f?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()); +if(null==u)throw Error(mxResources.get("drawingEmpty"));var B=this.view.scale,l=mxUtils.createXmlDocument(),y=null!=l.createElementNS?l.createElementNS(mxConstants.NS_SVG,"svg"):l.createElement("svg");null!=a&&(null!=y.style?y.style.backgroundColor=a:y.setAttribute("style","background-color:"+a));null==l.createElementNS?(y.setAttribute("xmlns",mxConstants.NS_SVG),y.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):y.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK); +a=c/B;var C=Math.max(1,Math.ceil(u.width*a)+2*b)+(q?5:0),v=Math.max(1,Math.ceil(u.height*a)+2*b)+(q?5:0);y.setAttribute("version","1.1");y.setAttribute("width",C+"px");y.setAttribute("height",v+"px");y.setAttribute("viewBox",(d?"-0.5 -0.5":"0 0")+" "+C+" "+v);l.appendChild(y);var z=null!=l.createElementNS?l.createElementNS(mxConstants.NS_SVG,"g"):l.createElement("g");y.appendChild(z);var D=this.createSvgCanvas(z);D.foOffset=d?-.5:0;D.textOffset=d?-.5:0;D.imageOffset=d?-.5:0;D.translate(Math.floor((b/ +c-u.x)/B),Math.floor((b/c-u.y)/B));var m=document.createElement("textarea"),t=D.createAlternateContent;D.createAlternateContent=function(a,c,b,f,d,e,k,g,n,q,p,u,B){var y=this.state;if(null!=this.foAltText&&(0==f||0!=y.fontSize&&e.length<5*f/y.fontSize)){var l=this.createElement("text");l.setAttribute("x",Math.round(f/2));l.setAttribute("y",Math.round((d+y.fontSize)/2));l.setAttribute("fill",y.fontColor||"black");l.setAttribute("text-anchor","middle");l.setAttribute("font-size",Math.round(y.fontSize)+ +"px");l.setAttribute("font-family",y.fontFamily);(y.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&l.setAttribute("font-weight","bold");(y.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&l.setAttribute("font-style","italic");(y.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&l.setAttribute("text-decoration","underline");try{return m.innerHTML=e,l.textContent=m.value,l}catch(Fa){return t.apply(this,arguments)}}else return t.apply(this,arguments)};var G=this.backgroundImage; +if(null!=G){c=B/c;var r=this.view.translate,J=new mxRectangle(r.x*c,r.y*c,G.width*c,G.height*c);mxUtils.intersects(u,J)&&D.image(r.x,r.y,G.width,G.height,G.src,!0)}D.scale(a);D.textEnabled=k;g=null!=g?g:this.createSvgImageExport();var F=g.drawCellState,W=g.getLinkForCellState;g.getLinkForCellState=function(a,c){var b=W.apply(this,arguments);return null==b||a.view.graph.isCustomLink(b)?null:b};g.drawCellState=function(a,c){for(var b=a.view.graph,f=b.isCellSelected(a.cell),d=b.model.getParent(a.cell);!e&& +!f&&null!=d;)f=b.isCellSelected(d),d=b.model.getParent(d);(e||f)&&F.apply(this,arguments)};g.drawState(this.getView().getState(this.model.root),D);this.updateSvgLinks(y,n,!0);return y}finally{p&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.updateSvgLinks=function(a,c,b){a=a.getElementsByTagName("a");for(var f=0;f<a.length;f++){var d=a[f].getAttribute("href");null==d&&(d=a[f].getAttribute("xlink:href"));null!=d&&(null!=c&&/^https?:\/\//.test(d)?a[f].setAttribute("target", c):b&&this.isCustomLink(d)&&a[f].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(a){return new mxSvgCanvas2D(a)};Graph.prototype.getSelectedElement=function(){var a=null;if(window.getSelection){var c=window.getSelection();c.getRangeAt&&c.rangeCount&&(a=c.getRangeAt(0).commonAncestorContainer)}else document.selection&&(a=document.selection.createRange().parentElement());return a};Graph.prototype.getParentByName=function(a,c,b){for(;null!=a&&a.nodeName!=c;){if(a== b)return null;a=a.parentNode}return a};Graph.prototype.getParentByNames=function(a,c,b){for(;null!=a&&!(0<=mxUtils.indexOf(c,a.nodeName));){if(a==b)return null;a=a.parentNode}return a};Graph.prototype.selectNode=function(a){var c=null;if(window.getSelection){if(c=window.getSelection(),c.getRangeAt&&c.rangeCount){var b=document.createRange();b.selectNode(a);c.removeAllRanges();c.addRange(b)}}else(c=document.selection)&&"Control"!=c.type&&(a=c.createRange(),a.collapse(!0),b=c.createRange(),b.setEndPoint("StartToStart", a),b.select())};Graph.prototype.insertRow=function(a,c){for(var b=a.tBodies[0],f=b.rows[0].cells,d=0,e=0;e<f.length;e++)var k=f[e].getAttribute("colspan"),d=d+(null!=k?parseInt(k):1);b=b.insertRow(c);for(e=0;e<d;e++)mxUtils.br(b.insertCell(-1));return b.cells[0]};Graph.prototype.deleteRow=function(a,c){a.tBodies[0].deleteRow(c)};Graph.prototype.insertColumn=function(a,c){var b=a.tHead;if(null!=b)for(var f=0;f<b.rows.length;f++){var d=document.createElement("th");b.rows[f].appendChild(d);mxUtils.br(d)}b= @@ -2424,7 +2424,7 @@ g);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&t this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/b)+(this.textarea.offsetHeight-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*b);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/b)+(this.textarea.offsetWidth-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*b);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top= Math.round(this.bounds.y)+"px";mxClient.IS_VML?this.textarea.style.zoom=b:mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+b+","+b+")")}else this.textarea.style.height="",this.textarea.style.overflow="",x.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(a,c){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var b=this.graph.getEditingValue(a.cell, c);"1"==mxUtils.getValue(a.style,"nl2Br","1")&&(b=b.replace(/\n/g,"<br/>"));return b=this.graph.sanitizeHtml(b,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(a){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var c=this.graph.sanitizeHtml(this.textarea.innerHTML,!0);return c="1"==mxUtils.getValue(a.style,"nl2Br","1")?c.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):c.replace(/\r\n/g, -"").replace(/\n/g,"")};var z=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(a){this.codeViewMode&&this.toggleViewMode();z.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(D){}};var c=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(a,b){this.graph.getModel().beginUpdate();try{if(c.apply(this,arguments),this.graph.isCellDeletable(a.cell)&&0==this.graph.model.getChildCount(a.cell)){var f= +"").replace(/\n/g,"")};var A=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(a){this.codeViewMode&&this.toggleViewMode();A.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(D){}};var c=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(a,b){this.graph.getModel().beginUpdate();try{if(c.apply(this,arguments),this.graph.isCellDeletable(a.cell)&&0==this.graph.model.getChildCount(a.cell)){var f= mxUtils.getValue(a.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),d=mxUtils.getValue(a.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);""==b&&f==mxConstants.NONE&&d==mxConstants.NONE&&this.graph.removeCells([a.cell],!1)}}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(a){var c=mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);null!=c&&c!=mxConstants.NONE||!(null!=a.cell.geometry&&0<a.cell.geometry.width)||0==mxUtils.getValue(a.style, mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(a.style,mxConstants.STYLE_HORIZONTAL,1)||(c=mxUtils.getValue(a.style,mxConstants.STYLE_FILLCOLOR,null));c==mxConstants.NONE&&(c=null);return c};mxCellEditor.prototype.getMinimumSize=function(a){var c=this.graph.getView().scale;return new mxRectangle(0,0,null==a.text?30:a.text.size*c+20,30)};var f=mxGraphHandler.prototype.moveCells;mxGraphHandler.prototype.moveCells=function(a,c,b,d,e,k){mxEvent.isAltDown(k)&&(e=null);f.apply(this,arguments)};mxGraphHandler.prototype.updateHint= function(c){if(null!=this.shape){null==this.hint&&(this.hint=a(),this.graph.container.appendChild(this.hint));var b=this.graph.view.translate,f=this.graph.view.scale;c=this.roundLength((this.bounds.x+this.currentDx)/f-b.x);b=this.roundLength((this.bounds.y+this.currentDy)/f-b.y);this.hint.innerHTML=c+", "+b;this.hint.style.left=this.shape.bounds.x+Math.round((this.shape.bounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.shape.bounds.y+this.shape.bounds.height+12+"px"}};mxGraphHandler.prototype.removeHint= @@ -2450,13 +2450,13 @@ new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(e, this.update(f,b),this.isSpaceEvent(c)?(f=this.x+this.width,b=this.y+this.height,d=this.graph.view.scale,mxEvent.isAltDown(c.getEvent())||(this.width=this.graph.snap(this.width/d)*d,this.height=this.graph.snap(this.height/d)*d,this.graph.isGridEnabled()||(this.width<this.graph.tolerance&&(this.width=0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=f-this.width),this.y<this.first.y&&(this.y=b-this.height)),this.div.style.borderStyle="dashed",this.div.style.backgroundColor= "white",this.div.style.left=this.x+"px",this.div.style.top=this.y+"px",this.div.style.width=Math.max(0,this.width)+"px",this.div.style.height=this.graph.container.clientHeight+"px",this.div.style.borderWidth=0>=this.width?"0px 1px 0px 0px":"0px 1px 0px 1px",null==this.secondDiv&&(this.secondDiv=this.div.cloneNode(!0),this.div.parentNode.appendChild(this.secondDiv)),this.secondDiv.style.left=this.x+"px",this.secondDiv.style.top=this.y+"px",this.secondDiv.style.width=this.graph.container.clientWidth+ "px",this.secondDiv.style.height=Math.max(0,this.height)+"px",this.secondDiv.style.borderWidth=0>=this.height?"1px 0px 0px 0px":"1px 0px 1px 0px"):(this.div.style.backgroundColor="",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),c.consume()}};var n=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv), -this.secondDiv=null);n.apply(this,arguments)};var g=(new Date).getTime(),A=0,y=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,c,b,f){y.apply(this,arguments);b!=this.currentTerminalState?(g=(new Date).getTime(),A=0):A=(new Date).getTime()-g;this.currentTerminalState=b};var u=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&& -2E3<A||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&u.apply(this,arguments)};mxVertexHandler.prototype.isCustomHandleEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.createHandleShape=function(a,c){var b=null!=a&&0==a,f=this.state.getVisibleTerminalState(b),d=null!=a&&(0==a||a>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==a)?this.graph.getConnectionConstraint(this.state, +this.secondDiv=null);n.apply(this,arguments)};var g=(new Date).getTime(),y=0,z=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,c,b,f){z.apply(this,arguments);b!=this.currentTerminalState?(g=(new Date).getTime(),y=0):y=(new Date).getTime()-g;this.currentTerminalState=b};var u=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&& +2E3<y||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&u.apply(this,arguments)};mxVertexHandler.prototype.isCustomHandleEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.createHandleShape=function(a,c){var b=null!=a&&0==a,f=this.state.getVisibleTerminalState(b),d=null!=a&&(0==a||a>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==a)?this.graph.getConnectionConstraint(this.state, f,b):null,b=null!=(null!=d?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(b),d):null)?this.fixedHandleImage:null!=d&&null!=f?this.terminalHandleImage:this.handleImage;if(null!=b)return b=new mxImageShape(new mxRectangle(0,0,b.width,b.height),b.src),b.preserveImageAspect=!1,b;b=mxConstants.HANDLE_SIZE;this.preferHtml&&--b;return new mxRectangleShape(new mxRectangle(0,0,b,b),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var F=mxVertexHandler.prototype.createSizerShape; mxVertexHandler.prototype.createSizerShape=function(a,c,b){this.handleImage=c==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:c==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return F.apply(this,arguments)};var v=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(a){if(null!=a&&1==a.length){var c=this.graph.getModel(),b=c.getParent(a[0]),f=this.graph.getCellGeometry(a[0]);if(c.isEdge(b)&&null!=f&&f.relative&&(c=this.graph.view.getState(a[0]), null!=c&&2>c.width&&2>c.height&&null!=c.text&&null!=c.text.boundingBox))return mxRectangle.fromRectangle(c.text.boundingBox)}return v.apply(this,arguments)};var E=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(a){var c=this.graph.getModel(),b=c.getParent(a.cell),f=this.graph.getCellGeometry(a.cell);return c.isEdge(b)&&null!=f&&f.relative&&2>a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox?(c=a.text.unrotatedBoundingBox||a.text.boundingBox, new mxRectangle(Math.round(c.x),Math.round(c.y),Math.round(c.width),Math.round(c.height))):E.apply(this,arguments)};var q=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(a,c){var b=this.graph.getModel(),f=b.getParent(this.state.cell),d=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(c)==mxEvent.ROTATION_HANDLE||!b.isEdge(f)||null==d||!d.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&q.apply(this,arguments)};mxVertexHandler.prototype.isRotationHandleVisible= -function(){return this.graph.isEnabled()&&this.rotationEnabled&&this.graph.isCellRotatable(this.state.cell)&&(0>=mxGraphHandler.prototype.maxCells||this.graph.getSelectionCount()<mxGraphHandler.prototype.maxCells)};mxVertexHandler.prototype.rotateClick=function(){this.state.view.graph.turnShapes([this.state.cell])};var B=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(a,c){B.apply(this,arguments);null!=this.graph.graphHandler.first&&null!=this.rotationShape&&null!= +function(){return this.graph.isEnabled()&&this.rotationEnabled&&this.graph.isCellRotatable(this.state.cell)&&(0>=mxGraphHandler.prototype.maxCells||this.graph.getSelectionCount()<mxGraphHandler.prototype.maxCells)};mxVertexHandler.prototype.rotateClick=function(){this.state.view.graph.turnShapes([this.state.cell])};var C=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(a,c){C.apply(this,arguments);null!=this.graph.graphHandler.first&&null!=this.rotationShape&&null!= this.rotationShape.node&&(this.rotationShape.node.style.display="none")};var J=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(a,c){J.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none")};var P=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){P.apply(this,arguments);var a=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title", mxResources.get("rotateTooltip"));var c=mxUtils.bind(this,function(){null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.specialHandle&&(this.specialHandle.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none");this.redrawHandles()});this.selectionHandler=mxUtils.bind(this,function(a,b){c()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE, this.selectionHandler);this.changeHandler=mxUtils.bind(this,function(a,b){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));c()});this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.editingHandler=mxUtils.bind(this,function(a,c){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,this.editingHandler);var b=this.graph.getLinkForCell(this.state.cell),f=this.graph.getLinksForState(this.state);this.updateLinkHint(b, @@ -2465,16 +2465,16 @@ this.linkHint.innerHTML="";if(null!=c&&(this.linkHint.appendChild(this.graph.cre function(a){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(a)}));f=document.createElement("img");f.setAttribute("src",Dialog.prototype.clearImage);f.setAttribute("title",mxResources.get("removeIt",[mxResources.get("link")]));f.setAttribute("width","13");f.setAttribute("height","10");f.style.marginLeft="4px";f.style.marginBottom="-1px";f.style.cursor="pointer";this.linkHint.appendChild(f);mxEvent.addListener(f,"click",mxUtils.bind(this,function(a){this.graph.setLinkForCell(this.state.cell, null);mxEvent.consume(a)}))}if(null!=b)for(f=0;f<b.length;f++){var d=document.createElement("div");d.style.marginTop=null!=c||0<f?"6px":"0px";d.appendChild(this.graph.createLinkForHint(b[f].getAttribute("href"),mxUtils.getTextContent(b[f])));this.linkHint.appendChild(d)}}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var G=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){G.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this, function(){return this.state.view.graph.connectionHandler.isEnabled()});var a=mxUtils.bind(this,function(){null!=this.linkHint&&(this.linkHint.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.labelShape&&(this.labelShape.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none")});this.selectionHandler=mxUtils.bind(this,function(c,b){a()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionHandler); -this.changeHandler=mxUtils.bind(this,function(c,b){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));a();this.redrawHandles()});this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var c=this.graph.getLinkForCell(this.state.cell),b=this.graph.getLinksForState(this.state);if(null!=c||null!=b&&0<b.length)this.updateLinkHint(c,b),this.redrawHandles()};var K=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){K.apply(this, -arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var C=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){C.apply(this);if(null!=this.state&&null!=this.linkHint){var a=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),c=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),b=mxUtils.getBoundingBox(c,this.state.style[mxConstants.STYLE_ROTATION]|| -"0",a),a=null!=b?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,c=null!=this.state.text?this.state.text.boundingBox:null;null==b&&(b=this.state);b=b.y+b.height;null!=c&&(b=Math.max(b,c.y+c.height));this.linkHint.style.left=Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(b+this.verticalOffset/2+6+this.state.view.graph.tolerance)+"px"}};var L=mxVertexHandler.prototype.reset;mxVertexHandler.prototype.reset= -function(){L.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none")};var M=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){M.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.selectionHandler&&(this.graph.getSelectionModel().removeListener(this.selectionHandler),this.selectionHandler= +this.changeHandler=mxUtils.bind(this,function(c,b){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));a();this.redrawHandles()});this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var c=this.graph.getLinkForCell(this.state.cell),b=this.graph.getLinksForState(this.state);if(null!=c||null!=b&&0<b.length)this.updateLinkHint(c,b),this.redrawHandles()};var L=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){L.apply(this, +arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var B=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){B.apply(this);if(null!=this.state&&null!=this.linkHint){var a=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),c=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),b=mxUtils.getBoundingBox(c,this.state.style[mxConstants.STYLE_ROTATION]|| +"0",a),a=null!=b?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,c=null!=this.state.text?this.state.text.boundingBox:null;null==b&&(b=this.state);b=b.y+b.height;null!=c&&(b=Math.max(b,c.y+c.height));this.linkHint.style.left=Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(b+this.verticalOffset/2+6+this.state.view.graph.tolerance)+"px"}};var K=mxVertexHandler.prototype.reset;mxVertexHandler.prototype.reset= +function(){K.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none")};var M=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){M.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.selectionHandler&&(this.graph.getSelectionModel().removeListener(this.selectionHandler),this.selectionHandler= null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var U=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(U.apply(this),null!=this.state&&null!=this.linkHint)){var a=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(a=new mxRectangle(a.x,a.y,a.width,a.height), a.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(a.y+a.height+6+this.state.view.graph.tolerance)+"px"}};var ja=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){ja.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var ca=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){ca.apply(this,arguments);null!=this.linkHint&& -(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.selectionHandler&&(this.graph.getSelectionModel().removeListener(this.selectionHandler),this.selectionHandler=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function a(){mxCylinder.call(this)}function b(){mxActor.call(this)}function e(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function l(){mxCylinder.call(this)}function m(){mxActor.call(this)}function r(){mxCylinder.call(this)}function t(){mxActor.call(this)}function x(){mxActor.call(this)}function z(){mxActor.call(this)}function c(){mxActor.call(this)}function f(){mxActor.call(this)}function k(){mxActor.call(this)}function p(){mxActor.call(this)}function n(a,c){this.canvas= +(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.selectionHandler&&(this.graph.getSelectionModel().removeListener(this.selectionHandler),this.selectionHandler=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function a(){mxCylinder.call(this)}function b(){mxActor.call(this)}function e(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function l(){mxCylinder.call(this)}function m(){mxActor.call(this)}function r(){mxCylinder.call(this)}function t(){mxActor.call(this)}function x(){mxActor.call(this)}function A(){mxActor.call(this)}function c(){mxActor.call(this)}function f(){mxActor.call(this)}function k(){mxActor.call(this)}function p(){mxActor.call(this)}function n(a,c){this.canvas= a;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=c;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,n.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,n.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,n.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,n.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo; -this.canvas.curveTo=mxUtils.bind(this,n.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,n.prototype.arcTo)}function g(){mxRectangleShape.call(this)}function A(){mxRectangleShape.call(this)}function y(){mxActor.call(this)}function u(){mxActor.call(this)}function F(){mxActor.call(this)}function v(){mxRectangleShape.call(this)}function E(){mxRectangleShape.call(this)}function q(){mxCylinder.call(this)}function B(){mxShape.call(this)}function J(){mxShape.call(this)} -function P(){mxEllipse.call(this)}function G(){mxShape.call(this)}function K(){mxShape.call(this)}function C(){mxRectangleShape.call(this)}function L(){mxShape.call(this)}function M(){mxShape.call(this)}function U(){mxShape.call(this)}function ja(){mxShape.call(this)}function ca(){mxShape.call(this)}function D(){mxCylinder.call(this)}function W(){mxDoubleEllipse.call(this)}function qa(){mxDoubleEllipse.call(this)}function ka(){mxArrowConnector.call(this);this.spacing=0}function la(){mxArrowConnector.call(this); +this.canvas.curveTo=mxUtils.bind(this,n.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,n.prototype.arcTo)}function g(){mxRectangleShape.call(this)}function y(){mxRectangleShape.call(this)}function z(){mxActor.call(this)}function u(){mxActor.call(this)}function F(){mxActor.call(this)}function v(){mxRectangleShape.call(this)}function E(){mxRectangleShape.call(this)}function q(){mxCylinder.call(this)}function C(){mxShape.call(this)}function J(){mxShape.call(this)} +function P(){mxEllipse.call(this)}function G(){mxShape.call(this)}function L(){mxShape.call(this)}function B(){mxRectangleShape.call(this)}function K(){mxShape.call(this)}function M(){mxShape.call(this)}function U(){mxShape.call(this)}function ja(){mxShape.call(this)}function ca(){mxShape.call(this)}function D(){mxCylinder.call(this)}function W(){mxDoubleEllipse.call(this)}function qa(){mxDoubleEllipse.call(this)}function ka(){mxArrowConnector.call(this);this.spacing=0}function la(){mxArrowConnector.call(this); this.spacing=0}function ga(){mxActor.call(this)}function Q(){mxRectangleShape.call(this)}function X(){mxActor.call(this)}function na(){mxActor.call(this)}function da(){mxActor.call(this)}function R(){mxActor.call(this)}function ha(){mxActor.call(this)}function O(){mxActor.call(this)}function H(){mxActor.call(this)}function aa(){mxActor.call(this)}function N(){mxActor.call(this)}function S(){mxActor.call(this)}function ea(){mxEllipse.call(this)}function fa(){mxEllipse.call(this)}function I(){mxEllipse.call(this)} function oa(){mxRhombus.call(this)}function Y(){mxEllipse.call(this)}function Z(){mxEllipse.call(this)}function Ba(){mxEllipse.call(this)}function xa(){mxEllipse.call(this)}function ya(){mxActor.call(this)}function ia(){mxActor.call(this)}function ba(){mxActor.call(this)}function pa(){mxConnector.call(this)}function Ca(a,c,b,f,d,e,k,g,q,n){k+=q;var V=f.clone();f.x-=d*(2*k+q);f.y-=e*(2*k+q);d*=k+q;e*=k+q;return function(){a.ellipse(V.x-d-k,V.y-e-k,2*k,2*k);n?a.fillAndStroke():a.stroke()}}mxUtils.extend(a, mxCylinder);a.prototype.size=20;a.prototype.darkOpacity=0;a.prototype.darkOpacity2=0;a.prototype.paintVertexShape=function(a,c,b,f,d){var e=Math.max(0,Math.min(f,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),V=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),k=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2))));a.translate(c,b);a.begin();a.moveTo(0,0);a.lineTo(f-e,0);a.lineTo(f, @@ -2488,8 +2488,8 @@ mxCellRenderer.registerShape("note",l);mxUtils.extend(m,mxActor);m.prototype.red b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var k=mxUtils.getValue(this.style,"tabPosition",this.tabPosition);e?"left"==k?(a.moveTo(0,b),a.lineTo(c,b)):(a.moveTo(f-c,b),a.lineTo(f,b)):("left"==k?(a.moveTo(0,0),a.lineTo(c,0),a.lineTo(c,b),a.lineTo(f,b)):(a.moveTo(0,b),a.lineTo(f-c,b),a.lineTo(f-c,0),a.lineTo(f,0)),a.lineTo(f,d),a.lineTo(0,d),a.lineTo(0,b),a.close());a.end()};mxCellRenderer.registerShape("folder",r);mxUtils.extend(t,mxActor);t.prototype.size= 30;t.prototype.isRoundable=function(){return!0};t.prototype.redrawPath=function(a,c,b,f,d){c=Math.max(0,Math.min(f,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(c,0),new mxPoint(f,0),new mxPoint(f,d),new mxPoint(0,d),new mxPoint(0,c)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("card",t);mxUtils.extend(x,mxActor);x.prototype.size=.4;x.prototype.redrawPath= function(a,c,b,f,d){c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,c/2);a.quadTo(f/4,1.4*c,f/2,c/2);a.quadTo(3*f/4,c*(1-1.4),f,c/2);a.lineTo(f,d-c/2);a.quadTo(3*f/4,d-1.4*c,f/2,d-c/2);a.quadTo(f/4,d-c*(1-1.4),0,d-c/2);a.lineTo(0,c/2);a.close();a.end()};x.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var c=mxUtils.getValue(this.style,"size",this.size),b=a.width,f=a.height;if(null==this.direction||this.direction== -mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return c*=f,new mxRectangle(a.x,a.y+c,b,f-2*c);c*=b;return new mxRectangle(a.x+c,a.y,b-2*c,f)}return a};mxCellRenderer.registerShape("tape",x);mxUtils.extend(z,mxActor);z.prototype.size=.3;z.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*a.height):null};z.prototype.redrawPath=function(a,c,b,f,d){c=d*Math.max(0, -Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,0);a.lineTo(f,0);a.lineTo(f,d-c/2);a.quadTo(3*f/4,d-1.4*c,f/2,d-c/2);a.quadTo(f/4,d-c*(1-1.4),0,d-c/2);a.lineTo(0,c/2);a.close();a.end()};mxCellRenderer.registerShape("document",z);var Ka=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(a,c,b,f){var d=mxUtils.getValue(this.style,"size");return null!=d?f*Math.max(0,Math.min(1,d)):Ka.apply(this,arguments)};mxCylinder.prototype.getLabelMargins= +mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return c*=f,new mxRectangle(a.x,a.y+c,b,f-2*c);c*=b;return new mxRectangle(a.x+c,a.y,b-2*c,f)}return a};mxCellRenderer.registerShape("tape",x);mxUtils.extend(A,mxActor);A.prototype.size=.3;A.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*a.height):null};A.prototype.redrawPath=function(a,c,b,f,d){c=d*Math.max(0, +Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,0);a.lineTo(f,0);a.lineTo(f,d-c/2);a.quadTo(3*f/4,d-1.4*c,f/2,d-c/2);a.quadTo(f/4,d-c*(1-1.4),0,d-c/2);a.lineTo(0,c/2);a.close();a.end()};mxCellRenderer.registerShape("document",A);var Ka=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(a,c,b,f){var d=mxUtils.getValue(this.style,"size");return null!=d?f*Math.max(0,Math.min(1,d)):Ka.apply(this,arguments)};mxCylinder.prototype.getLabelMargins= function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var c=2*mxUtils.getValue(this.style,"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,a.height*c),0,0)}return null};mxUtils.extend(c,mxActor);c.prototype.size=.2;c.prototype.isRoundable=function(){return!0};c.prototype.redrawPath=function(a,c,b,f,d){c=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/ 2;this.addPoints(a,[new mxPoint(0,d),new mxPoint(c,0),new mxPoint(f,0),new mxPoint(f-c,d)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("parallelogram",c);mxUtils.extend(f,mxActor);f.prototype.size=.2;f.prototype.isRoundable=function(){return!0};f.prototype.redrawPath=function(a,c,b,f,d){c=f*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0, d),new mxPoint(c,0),new mxPoint(f-c,0),new mxPoint(f,d)],this.isRounded,b,!0)};mxCellRenderer.registerShape("trapezoid",f);mxUtils.extend(k,mxActor);k.prototype.size=.5;k.prototype.redrawPath=function(a,c,b,f,d){a.setFillColor(null);c=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(f,0),new mxPoint(c,0),new mxPoint(c,d/2),new mxPoint(0,d/2),new mxPoint(c, @@ -2502,28 +2502,28 @@ this.style||"0"==mxUtils.getValue(this.style,"comic","0"))&&La.apply(this,argume (a.pointerEvents=!1),a.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?e=Math.min(f/2,Math.min(d/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,e=Math.min(f*e,d*e)),a.moveTo(c+e,b),a.lineTo(c+f-e,b),a.quadTo(c+f,b,c+f,b+e),a.lineTo(c+f,b+d-e),a.quadTo(c+f,b+d,c+f-e,b+d),a.lineTo(c+e,b+d),a.quadTo(c,b+d,c,b+d-e), a.lineTo(c,b+e),a.quadTo(c,b,c+e,b)):(a.moveTo(c,b),a.lineTo(c+f,b),a.lineTo(c+f,b+d),a.lineTo(c,b+d),a.lineTo(c,b)),a.close(),a.end(),a.fillAndStroke()}};var va=mxRectangleShape.prototype.paintForeground;mxRectangleShape.prototype.paintForeground=function(a,c,b,f,d){null==a.handJiggle&&va.apply(this,arguments)};mxUtils.extend(g,mxRectangleShape);g.prototype.size=.1;g.prototype.isHtmlAllowed=function(){return!1};g.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL, !0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var c=a.width,b=a.height;a=new mxRectangle(a.x,a.y,c,b);var f=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.max(f,Math.min(c*d,b*d));a.x+=Math.round(f);a.width-=Math.round(2*f)}return a};g.prototype.paintForeground= -function(a,c,b,f,d){var e=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var k=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,e=Math.max(e,Math.min(f*k,d*k));e=Math.round(e);a.begin();a.moveTo(c+e,b);a.lineTo(c+e,b+d);a.moveTo(c+f-e,b);a.lineTo(c+f-e,b+d);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("process",g);mxUtils.extend(A, -mxRectangleShape);A.prototype.paintBackground=function(a,c,b,f,d){a.setFillColor(mxConstants.NONE);a.rect(c,b,f,d);a.fill()};A.prototype.paintForeground=function(a,c,b,f,d){};mxCellRenderer.registerShape("transparent",A);mxUtils.extend(y,mxHexagon);y.prototype.size=30;y.prototype.position=.5;y.prototype.position2=.5;y.prototype.base=20;y.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};y.prototype.isRoundable= -function(){return!0};y.prototype.redrawPath=function(a,c,b,f,d){c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var e=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),k=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),g=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"base",this.base)))); -this.addPoints(a,[new mxPoint(0,0),new mxPoint(f,0),new mxPoint(f,d-b),new mxPoint(Math.min(f,e+g),d-b),new mxPoint(k,d),new mxPoint(Math.max(0,e),d-b),new mxPoint(0,d-b)],this.isRounded,c,!0,[4])};mxCellRenderer.registerShape("callout",y);mxUtils.extend(u,mxActor);u.prototype.size=.2;u.prototype.fixedSize=20;u.prototype.isRoundable=function(){return!0};u.prototype.redrawPath=function(a,c,b,f,d){c="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style, +function(a,c,b,f,d){var e=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var k=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,e=Math.max(e,Math.min(f*k,d*k));e=Math.round(e);a.begin();a.moveTo(c+e,b);a.lineTo(c+e,b+d);a.moveTo(c+f-e,b);a.lineTo(c+f-e,b+d);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("process",g);mxUtils.extend(y, +mxRectangleShape);y.prototype.paintBackground=function(a,c,b,f,d){a.setFillColor(mxConstants.NONE);a.rect(c,b,f,d);a.fill()};y.prototype.paintForeground=function(a,c,b,f,d){};mxCellRenderer.registerShape("transparent",y);mxUtils.extend(z,mxHexagon);z.prototype.size=30;z.prototype.position=.5;z.prototype.position2=.5;z.prototype.base=20;z.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};z.prototype.isRoundable= +function(){return!0};z.prototype.redrawPath=function(a,c,b,f,d){c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var e=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),k=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),g=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"base",this.base)))); +this.addPoints(a,[new mxPoint(0,0),new mxPoint(f,0),new mxPoint(f,d-b),new mxPoint(Math.min(f,e+g),d-b),new mxPoint(k,d),new mxPoint(Math.max(0,e),d-b),new mxPoint(0,d-b)],this.isRounded,c,!0,[4])};mxCellRenderer.registerShape("callout",z);mxUtils.extend(u,mxActor);u.prototype.size=.2;u.prototype.fixedSize=20;u.prototype.isRoundable=function(){return!0};u.prototype.redrawPath=function(a,c,b,f,d){c="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style, "size",this.fixedSize)))):f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(f-c,0),new mxPoint(f,d/2),new mxPoint(f-c,d),new mxPoint(0,d),new mxPoint(c,d/2)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("step",u);mxUtils.extend(F,mxHexagon);F.prototype.size=.25;F.prototype.isRoundable=function(){return!0};F.prototype.redrawPath= function(a,c,b,f,d){c=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(c,0),new mxPoint(f-c,0),new mxPoint(f,.5*d),new mxPoint(f-c,d),new mxPoint(c,d),new mxPoint(0,.5*d)],this.isRounded,b,!0)};mxCellRenderer.registerShape("hexagon",F);mxUtils.extend(v,mxRectangleShape);v.prototype.isHtmlAllowed=function(){return!1};v.prototype.paintForeground=function(a, c,b,f,d){var e=Math.min(f/5,d/5)+1;a.begin();a.moveTo(c+f/2,b+e);a.lineTo(c+f/2,b+d-e);a.moveTo(c+e,b+d/2);a.lineTo(c+f-e,b+d/2);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",v);var ta=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var c=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+ c,a.y+c,a.width-2*c,a.height-2*c)}return a};mxRhombus.prototype.paintVertexShape=function(a,c,b,f,d){ta.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var e=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);c+=e;b+=e;f-=2*e;d-=2*e;0<f&&0<d&&(a.setShadow(!1),ta.apply(this,[a,c,b,f,d]))}};mxUtils.extend(E,mxRectangleShape);E.prototype.isHtmlAllowed=function(){return!1};E.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var c=(Math.max(2, this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+c,a.y+c,a.width-2*c,a.height-2*c)}return a};E.prototype.paintForeground=function(a,c,b,f,d){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var e=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);c+=e;b+=e;f-=2*e;d-=2*e;0<f&&0<d&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}a.setDashed(!1);var e=0,k;do{k=mxCellRenderer.defaultShapes[this.style["symbol"+ -e]];if(null!=k){var g=this.style["symbol"+e+"Align"],V=this.style["symbol"+e+"VerticalAlign"],q=this.style["symbol"+e+"Width"],n=this.style["symbol"+e+"Height"],p=this.style["symbol"+e+"Spacing"]||0,u=this.style["symbol"+e+"VSpacing"]||p,B=this.style["symbol"+e+"ArcSpacing"];null!=B&&(B*=this.getArcSize(f+this.strokewidth,d+this.strokewidth),p+=B,u+=B);var B=c,l=b,B=g==mxConstants.ALIGN_CENTER?B+(f-q)/2:g==mxConstants.ALIGN_RIGHT?B+(f-q-p):B+p,l=V==mxConstants.ALIGN_MIDDLE?l+(d-n)/2:V==mxConstants.ALIGN_BOTTOM? -l+(d-n-u):l+u;a.save();g=new k;g.style=this.style;k.prototype.paintVertexShape.call(g,a,B,l,q,n);a.restore()}e++}while(null!=k)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",E);mxUtils.extend(q,mxCylinder);q.prototype.redrawPath=function(a,c,b,f,d,e){e?(a.moveTo(0,0),a.lineTo(f/2,d/2),a.lineTo(f,0),a.end()):(a.moveTo(0,0),a.lineTo(f,0),a.lineTo(f,d),a.lineTo(0,d),a.close())};mxCellRenderer.registerShape("message",q);mxUtils.extend(B,mxShape); -B.prototype.paintBackground=function(a,c,b,f,d){a.translate(c,b);a.ellipse(f/4,0,f/2,d/4);a.fillAndStroke();a.begin();a.moveTo(f/2,d/4);a.lineTo(f/2,2*d/3);a.moveTo(f/2,d/3);a.lineTo(0,d/3);a.moveTo(f/2,d/3);a.lineTo(f,d/3);a.moveTo(f/2,2*d/3);a.lineTo(0,d);a.moveTo(f/2,2*d/3);a.lineTo(f,d);a.end();a.stroke()};mxCellRenderer.registerShape("umlActor",B);mxUtils.extend(J,mxShape);J.prototype.getLabelMargins=function(a){return new mxRectangle(a.width/6,0,0,0)};J.prototype.paintBackground=function(a, +e]];if(null!=k){var g=this.style["symbol"+e+"Align"],V=this.style["symbol"+e+"VerticalAlign"],q=this.style["symbol"+e+"Width"],n=this.style["symbol"+e+"Height"],p=this.style["symbol"+e+"Spacing"]||0,u=this.style["symbol"+e+"VSpacing"]||p,y=this.style["symbol"+e+"ArcSpacing"];null!=y&&(y*=this.getArcSize(f+this.strokewidth,d+this.strokewidth),p+=y,u+=y);var y=c,l=b,y=g==mxConstants.ALIGN_CENTER?y+(f-q)/2:g==mxConstants.ALIGN_RIGHT?y+(f-q-p):y+p,l=V==mxConstants.ALIGN_MIDDLE?l+(d-n)/2:V==mxConstants.ALIGN_BOTTOM? +l+(d-n-u):l+u;a.save();g=new k;g.style=this.style;k.prototype.paintVertexShape.call(g,a,y,l,q,n);a.restore()}e++}while(null!=k)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",E);mxUtils.extend(q,mxCylinder);q.prototype.redrawPath=function(a,c,b,f,d,e){e?(a.moveTo(0,0),a.lineTo(f/2,d/2),a.lineTo(f,0),a.end()):(a.moveTo(0,0),a.lineTo(f,0),a.lineTo(f,d),a.lineTo(0,d),a.close())};mxCellRenderer.registerShape("message",q);mxUtils.extend(C,mxShape); +C.prototype.paintBackground=function(a,c,b,f,d){a.translate(c,b);a.ellipse(f/4,0,f/2,d/4);a.fillAndStroke();a.begin();a.moveTo(f/2,d/4);a.lineTo(f/2,2*d/3);a.moveTo(f/2,d/3);a.lineTo(0,d/3);a.moveTo(f/2,d/3);a.lineTo(f,d/3);a.moveTo(f/2,2*d/3);a.lineTo(0,d);a.moveTo(f/2,2*d/3);a.lineTo(f,d);a.end();a.stroke()};mxCellRenderer.registerShape("umlActor",C);mxUtils.extend(J,mxShape);J.prototype.getLabelMargins=function(a){return new mxRectangle(a.width/6,0,0,0)};J.prototype.paintBackground=function(a, c,b,f,d){a.translate(c,b);a.begin();a.moveTo(0,d/4);a.lineTo(0,3*d/4);a.end();a.stroke();a.begin();a.moveTo(0,d/2);a.lineTo(f/6,d/2);a.end();a.stroke();a.ellipse(f/6,0,5*f/6,d);a.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",J);mxUtils.extend(P,mxEllipse);P.prototype.paintVertexShape=function(a,c,b,f,d){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(c+f/8,b+d);a.lineTo(c+7*f/8,b+d);a.end();a.stroke()};mxCellRenderer.registerShape("umlEntity",P);mxUtils.extend(G, -mxShape);G.prototype.paintVertexShape=function(a,c,b,f,d){a.translate(c,b);a.begin();a.moveTo(f,0);a.lineTo(0,d);a.moveTo(0,0);a.lineTo(f,d);a.end();a.stroke()};mxCellRenderer.registerShape("umlDestroy",G);mxUtils.extend(K,mxShape);K.prototype.getLabelBounds=function(a){return new mxRectangle(a.x,a.y+a.height/8,a.width,7*a.height/8)};K.prototype.paintBackground=function(a,c,b,f,d){a.translate(c,b);a.begin();a.moveTo(3*f/8,d/8*1.1);a.lineTo(5*f/8,0);a.end();a.stroke();a.ellipse(0,d/8,f,7*d/8);a.fillAndStroke()}; -K.prototype.paintForeground=function(a,c,b,f,d){a.begin();a.moveTo(3*f/8,d/8*1.1);a.lineTo(5*f/8,d/4);a.end();a.stroke()};mxCellRenderer.registerShape("umlControl",K);mxUtils.extend(C,mxRectangleShape);C.prototype.size=40;C.prototype.isHtmlAllowed=function(){return!1};C.prototype.getLabelBounds=function(a){var c=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(a.x,a.y,a.width,c)};C.prototype.paintBackground=function(a,c,b,f, -d){var e=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),k=mxUtils.getValue(this.style,"participant");null==k||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,a,c,b,f,e):(k=this.state.view.graph.cellRenderer.getShape(k),null!=k&&k!=C&&(k=new k,k.apply(this.state),a.save(),k.paintVertexShape(a,c,b,f,e),a.restore()));e<d&&(a.setDashed(!0),a.begin(),a.moveTo(c+f/2,b+e),a.lineTo(c+f/2,b+d),a.end(),a.stroke())};C.prototype.paintForeground=function(a, -c,b,f,d){var e=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,a,c,b,f,Math.min(d,e))};mxCellRenderer.registerShape("umlLifeline",C);mxUtils.extend(L,mxShape);L.prototype.width=60;L.prototype.height=30;L.prototype.corner=10;L.prototype.getLabelMargins=function(a){return new mxRectangle(0,0,a.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),a.height-parseFloat(mxUtils.getValue(this.style, -"height",this.height)*this.scale))};L.prototype.paintBackground=function(a,c,b,f,d){var e=this.corner,k=Math.min(f,Math.max(e,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),g=Math.min(d,Math.max(1.5*e,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),V=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);V!=mxConstants.NONE&&(a.setFillColor(V),a.rect(c,b,f,d),a.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!= -mxConstants.NONE?(this.getGradientBounds(a,c,b,f,d),a.setGradient(this.fill,this.gradient,c,b,f,d,this.gradientDirection)):a.setFillColor(this.fill);a.begin();a.moveTo(c,b);a.lineTo(c+k,b);a.lineTo(c+k,b+Math.max(0,g-1.5*e));a.lineTo(c+Math.max(0,k-e),b+g);a.lineTo(c,b+g);a.close();a.fillAndStroke();a.begin();a.moveTo(c+k,b);a.lineTo(c+f,b);a.lineTo(c+f,b+d);a.lineTo(c,b+d);a.lineTo(c,b+g);a.stroke()};mxCellRenderer.registerShape("umlFrame",L);mxPerimeter.LifelinePerimeter=function(a,c,b,f){f=C.prototype.size; +mxShape);G.prototype.paintVertexShape=function(a,c,b,f,d){a.translate(c,b);a.begin();a.moveTo(f,0);a.lineTo(0,d);a.moveTo(0,0);a.lineTo(f,d);a.end();a.stroke()};mxCellRenderer.registerShape("umlDestroy",G);mxUtils.extend(L,mxShape);L.prototype.getLabelBounds=function(a){return new mxRectangle(a.x,a.y+a.height/8,a.width,7*a.height/8)};L.prototype.paintBackground=function(a,c,b,f,d){a.translate(c,b);a.begin();a.moveTo(3*f/8,d/8*1.1);a.lineTo(5*f/8,0);a.end();a.stroke();a.ellipse(0,d/8,f,7*d/8);a.fillAndStroke()}; +L.prototype.paintForeground=function(a,c,b,f,d){a.begin();a.moveTo(3*f/8,d/8*1.1);a.lineTo(5*f/8,d/4);a.end();a.stroke()};mxCellRenderer.registerShape("umlControl",L);mxUtils.extend(B,mxRectangleShape);B.prototype.size=40;B.prototype.isHtmlAllowed=function(){return!1};B.prototype.getLabelBounds=function(a){var c=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(a.x,a.y,a.width,c)};B.prototype.paintBackground=function(a,c,b,f, +d){var e=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),k=mxUtils.getValue(this.style,"participant");null==k||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,a,c,b,f,e):(k=this.state.view.graph.cellRenderer.getShape(k),null!=k&&k!=B&&(k=new k,k.apply(this.state),a.save(),k.paintVertexShape(a,c,b,f,e),a.restore()));e<d&&(a.setDashed(!0),a.begin(),a.moveTo(c+f/2,b+e),a.lineTo(c+f/2,b+d),a.end(),a.stroke())};B.prototype.paintForeground=function(a, +c,b,f,d){var e=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,a,c,b,f,Math.min(d,e))};mxCellRenderer.registerShape("umlLifeline",B);mxUtils.extend(K,mxShape);K.prototype.width=60;K.prototype.height=30;K.prototype.corner=10;K.prototype.getLabelMargins=function(a){return new mxRectangle(0,0,a.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),a.height-parseFloat(mxUtils.getValue(this.style, +"height",this.height)*this.scale))};K.prototype.paintBackground=function(a,c,b,f,d){var e=this.corner,k=Math.min(f,Math.max(e,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),g=Math.min(d,Math.max(1.5*e,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),V=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);V!=mxConstants.NONE&&(a.setFillColor(V),a.rect(c,b,f,d),a.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!= +mxConstants.NONE?(this.getGradientBounds(a,c,b,f,d),a.setGradient(this.fill,this.gradient,c,b,f,d,this.gradientDirection)):a.setFillColor(this.fill);a.begin();a.moveTo(c,b);a.lineTo(c+k,b);a.lineTo(c+k,b+Math.max(0,g-1.5*e));a.lineTo(c+Math.max(0,k-e),b+g);a.lineTo(c,b+g);a.close();a.fillAndStroke();a.begin();a.moveTo(c+k,b);a.lineTo(c+f,b);a.lineTo(c+f,b+d);a.lineTo(c,b+d);a.lineTo(c,b+g);a.stroke()};mxCellRenderer.registerShape("umlFrame",K);mxPerimeter.LifelinePerimeter=function(a,c,b,f){f=B.prototype.size; null!=c&&(f=mxUtils.getValue(c.style,"size",f)*c.view.scale);c=parseFloat(c.style[mxConstants.STYLE_STROKEWIDTH]||1)*c.view.scale/2-1;b.x<a.getCenterX()&&(c=-1*(c+1));return new mxPoint(a.getCenterX()+c,Math.min(a.y+a.height,Math.max(a.y+f,b.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(a,c,b,f){f=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter); mxPerimeter.BackbonePerimeter=function(a,c,b,f){f=parseFloat(c.style[mxConstants.STYLE_STROKEWIDTH]||1)*c.view.scale/2-1;null!=c.style.backboneSize&&(f+=parseFloat(c.style.backboneSize)*c.view.scale/2-1);if("south"==c.style[mxConstants.STYLE_DIRECTION]||"north"==c.style[mxConstants.STYLE_DIRECTION])return b.x<a.getCenterX()&&(f=-1*(f+1)),new mxPoint(a.getCenterX()+f,Math.min(a.y+a.height,Math.max(a.y,b.y)));b.y<a.getCenterY()&&(f=-1*(f+1));return new mxPoint(Math.min(a.x+a.width,Math.max(a.x,b.x)), -a.getCenterY()+f)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(a,c,b,f){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(a,new mxRectangle(0,0,0,Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(c.style,"size",y.prototype.size))*c.view.scale))),c.style),c,b,f)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(a,b,f,d){var e=c.prototype.size; +a.getCenterY()+f)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(a,c,b,f){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(a,new mxRectangle(0,0,0,Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(c.style,"size",z.prototype.size))*c.view.scale))),c.style),c,b,f)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(a,b,f,d){var e=c.prototype.size; null!=b&&(e=mxUtils.getValue(b.style,"size",e));var k=a.x,g=a.y,q=a.width,n=a.height;b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_SOUTH?(e=n*Math.max(0,Math.min(1,e)),g=[new mxPoint(k,g),new mxPoint(k+q,g+e),new mxPoint(k+q,g+n),new mxPoint(k,g+n-e),new mxPoint(k,g)]):(e=q*Math.max(0,Math.min(1,e)),g=[new mxPoint(k+e,g),new mxPoint(k+q,g),new mxPoint(k+q-e,g+n),new mxPoint(k, g+n),new mxPoint(k+e,g)]);n=a.getCenterX();a=a.getCenterY();a=new mxPoint(n,a);d&&(f.x<k||f.x>k+q?a.y=f.y:a.x=f.x);return mxUtils.getPerimeterPoint(g,a,f)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(a,c,b,d){var e=f.prototype.size;null!=c&&(e=mxUtils.getValue(c.style,"size",e));var k=a.x,g=a.y,q=a.width,n=a.height;c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST; c==mxConstants.DIRECTION_EAST?(e=q*Math.max(0,Math.min(1,e)),g=[new mxPoint(k+e,g),new mxPoint(k+q-e,g),new mxPoint(k+q,g+n),new mxPoint(k,g+n),new mxPoint(k+e,g)]):c==mxConstants.DIRECTION_WEST?(e=q*Math.max(0,Math.min(1,e)),g=[new mxPoint(k,g),new mxPoint(k+q,g),new mxPoint(k+q-e,g+n),new mxPoint(k+e,g+n),new mxPoint(k,g)]):c==mxConstants.DIRECTION_NORTH?(e=n*Math.max(0,Math.min(1,e)),g=[new mxPoint(k,g+e),new mxPoint(k+q,g),new mxPoint(k+q,g+n),new mxPoint(k,g+n-e),new mxPoint(k,g+e)]):(e=n*Math.max(0, @@ -2560,8 +2560,8 @@ xa);mxUtils.extend(ya,mxActor);ya.prototype.redrawPath=function(a,c,b,f,d){c=Mat 0);a.lineTo(e,0);a.lineTo(e,c);a.lineTo(f,c);a.lineTo(f,b);a.lineTo(e,b);a.lineTo(e,d);a.lineTo(k,d);a.lineTo(k,b);a.lineTo(0,b);a.close();a.end()};mxCellRenderer.registerShape("cross",ia);mxUtils.extend(ba,mxActor);ba.prototype.size=.25;ba.prototype.redrawPath=function(a,c,b,f,d){c=Math.min(f,d/2);b=Math.min(f-c,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*f);a.moveTo(0,d/2);a.lineTo(b,0);a.lineTo(f-c,0);a.quadTo(f,0,f,d/2);a.quadTo(f,d,f-c,d);a.lineTo(b,d);a.close();a.end()}; mxCellRenderer.registerShape("display",ba);mxUtils.extend(pa,mxConnector);pa.prototype.origPaintEdgeShape=pa.prototype.paintEdgeShape;pa.prototype.paintEdgeShape=function(a,c,f){for(var b=[],d=0;d<c.length;d++)b.push(mxUtils.clone(c[d]));var d=a.state.dashed,e=a.state.fixDash;pa.prototype.origPaintEdgeShape.apply(this,[a,b,f]);3<=a.state.strokeWidth&&(b=mxUtils.getValue(this.style,"fillColor",null),null!=b&&(a.setStrokeColor(b),a.setStrokeWidth(a.state.strokeWidth-2),a.setDashed(d,e),pa.prototype.origPaintEdgeShape.apply(this, [a,c,f])))};mxCellRenderer.registerShape("filledEdge",pa);"undefined"!==typeof StyleFormatPanel&&function(){var a=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var c=this.format.getSelectionState(),b=a.apply(this,arguments);"umlFrame"==c.style.shape&&b.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"#ffffff"});return b}}();mxMarker.addMarker("dash",function(a,c,b,f,d,e,k,g,q,n){var p=d*(k+q+1),u=e*(k+q+1);return function(){a.begin(); -a.moveTo(f.x-p/2-u/2,f.y-u/2+p/2);a.lineTo(f.x+u/2-3*p/2,f.y-3*u/2-p/2);a.stroke()}});mxMarker.addMarker("cross",function(a,c,b,f,d,e,k,g,q,n){var p=d*(k+q+1),u=e*(k+q+1);return function(){a.begin();a.moveTo(f.x-p/2-u/2,f.y-u/2+p/2);a.lineTo(f.x+u/2-3*p/2,f.y-3*u/2-p/2);a.moveTo(f.x-p/2+u/2,f.y-u/2-p/2);a.lineTo(f.x-u/2-3*p/2,f.y-3*u/2+p/2);a.stroke()}});mxMarker.addMarker("circle",Ca);mxMarker.addMarker("circlePlus",function(a,c,f,b,d,e,k,g,q,n){var p=b.clone(),u=Ca.apply(this,arguments),B=d*(k+ -2*q),l=e*(k+2*q);return function(){u.apply(this,arguments);a.begin();a.moveTo(p.x-d*q,p.y-e*q);a.lineTo(p.x-2*B+d*q,p.y-2*l+e*q);a.moveTo(p.x-B-l+e*q,p.y-l+B-d*q);a.lineTo(p.x+l-B-e*q,p.y-l-B+d*q);a.stroke()}});mxMarker.addMarker("async",function(a,c,f,b,d,e,k,g,q,n){c=d*q*1.118;f=e*q*1.118;d*=k+q;e*=k+q;var p=b.clone();p.x-=c;p.y-=f;b.x+=1*-d-c;b.y+=1*-e-f;return function(){a.begin();a.moveTo(p.x,p.y);g?a.lineTo(p.x-d-e/2,p.y-e+d/2):a.lineTo(p.x+e/2-d,p.y-e-d/2);a.lineTo(p.x-d,p.y-e);a.close();n? +a.moveTo(f.x-p/2-u/2,f.y-u/2+p/2);a.lineTo(f.x+u/2-3*p/2,f.y-3*u/2-p/2);a.stroke()}});mxMarker.addMarker("cross",function(a,c,b,f,d,e,k,g,q,n){var p=d*(k+q+1),u=e*(k+q+1);return function(){a.begin();a.moveTo(f.x-p/2-u/2,f.y-u/2+p/2);a.lineTo(f.x+u/2-3*p/2,f.y-3*u/2-p/2);a.moveTo(f.x-p/2+u/2,f.y-u/2-p/2);a.lineTo(f.x-u/2-3*p/2,f.y-3*u/2+p/2);a.stroke()}});mxMarker.addMarker("circle",Ca);mxMarker.addMarker("circlePlus",function(a,c,f,b,d,e,k,g,q,n){var p=b.clone(),u=Ca.apply(this,arguments),y=d*(k+ +2*q),l=e*(k+2*q);return function(){u.apply(this,arguments);a.begin();a.moveTo(p.x-d*q,p.y-e*q);a.lineTo(p.x-2*y+d*q,p.y-2*l+e*q);a.moveTo(p.x-y-l+e*q,p.y-l+y-d*q);a.lineTo(p.x+l-y-e*q,p.y-l-y+d*q);a.stroke()}});mxMarker.addMarker("async",function(a,c,f,b,d,e,k,g,q,n){c=d*q*1.118;f=e*q*1.118;d*=k+q;e*=k+q;var p=b.clone();p.x-=c;p.y-=f;b.x+=1*-d-c;b.y+=1*-e-f;return function(){a.begin();a.moveTo(p.x,p.y);g?a.lineTo(p.x-d-e/2,p.y-e+d/2):a.lineTo(p.x+e/2-d,p.y-e-d/2);a.lineTo(p.x-d,p.y-e);a.close();n? a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync",function(a){a=null!=a?a:2;return function(c,f,b,d,e,k,g,q,n,p){e*=g+n;k*=g+n;var u=d.clone();return function(){c.begin();c.moveTo(u.x,u.y);q?c.lineTo(u.x-e-k/a,u.y-k+e/a):c.lineTo(u.x+k/a-e,u.y-k-e/a);c.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Ea=function(a,c,f){return wa(a,["width"],c,function(c,b,d,e,k){k=a.shape.getEdgeWidth()*a.view.scale+f;return new mxPoint(e.x+b*c/4+d*k/2,e.y+d*c/4-b*k/2)},function(c,b,d,e,k, g){c=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,k.x,k.y,g.x,g.y));a.style.width=Math.round(2*c)/a.view.scale-f})},wa=function(a,c,f,b,d){return T(a,c,function(c){var d=a.absolutePoints,e=d.length-1;c=a.view.translate;var k=a.view.scale,g=f?d[0]:d[e],d=f?d[1]:d[e-1],e=d.x-g.x,q=d.y-g.y,n=Math.sqrt(e*e+q*q),g=b.call(this,n,e/n,q/n,g,d);return new mxPoint(g.x/k-c.x,g.y/k-c.y)},function(c,b,e){var k=a.absolutePoints,g=k.length-1;c=a.view.translate;var q=a.view.scale,n=f?k[0]:k[g],k=f?k[1]:k[g-1],g=k.x-n.x, p=k.y-n.y,u=Math.sqrt(g*g+p*p);b.x=(b.x+c.x)*q;b.y=(b.y+c.y)*q;d.call(this,u,g/u,p/u,n,k,b,e)})},ua=function(a){return function(c){return[T(c,["arrowWidth","arrowSize"],function(c){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",R.prototype.arrowWidth))),f=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",R.prototype.arrowSize)));return new mxPoint(c.x+(1-f)*c.width,c.y+(1-b)*c.height/2)},function(c,b){this.state.style.arrowWidth=Math.max(0,Math.min(1, @@ -2581,27 +2581,27 @@ mxEvent.isAltDown(q.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_E b*(e+a.shape.strokewidth*a.view.scale)-f*c/2,d.y+f*(e+a.shape.strokewidth*a.view.scale)+b*c/2)},function(b,f,d,e,k,g,q){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,k.x,k.y,g.x,g.y));f=mxUtils.ptLineDist(e.x,e.y,e.x+d,e.y-f,g.x,g.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(f-a.shape.strokewidth)/3)/100/a.view.scale;a.style.endWidth=Math.max(0,Math.round(2*b)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(q.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE], a.style.startWidth=a.style.endWidth);mxEvent.isAltDown(q.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<c/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(a.style.endWidth)-parseFloat(a.style.startWidth))<c&&(a.style.endWidth=a.style.startWidth))})));return b},swimlane:function(a){var c=[T(a,[mxConstants.STYLE_STARTSIZE],function(c){var b=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE, mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(a.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(c.getCenterX(),c.y+Math.max(0,Math.min(c.height,b))):new mxPoint(c.x+Math.max(0,Math.min(c.width,b)),c.getCenterY())},function(c,b){a.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(c.height,b.y-c.y))):Math.round(Math.max(0,Math.min(c.width,b.x-c.x)))})];if(mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED)){var b= -parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));c.push(sa(a,b/2))}return c},label:Da(),ext:Da(),rectangle:Da(),triangle:Da(),rhombus:Da(),umlLifeline:function(a){return[T(a,["size"],function(a){var c=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",C.prototype.size))));return new mxPoint(a.getCenterX(),a.y+c)},function(a,c){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))},!1)]},umlFrame:function(a){return[T(a, -["width","height"],function(a){var c=Math.max(L.prototype.corner,Math.min(a.width,mxUtils.getValue(this.state.style,"width",L.prototype.width))),b=Math.max(1.5*L.prototype.corner,Math.min(a.height,mxUtils.getValue(this.state.style,"height",L.prototype.height)));return new mxPoint(a.x+c,a.y+b)},function(a,c){this.state.style.width=Math.round(Math.max(L.prototype.corner,Math.min(a.width,c.x-a.x)));this.state.style.height=Math.round(Math.max(1.5*L.prototype.corner,Math.min(a.height,c.y-a.y)))},!1)]}, +parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));c.push(sa(a,b/2))}return c},label:Da(),ext:Da(),rectangle:Da(),triangle:Da(),rhombus:Da(),umlLifeline:function(a){return[T(a,["size"],function(a){var c=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",B.prototype.size))));return new mxPoint(a.getCenterX(),a.y+c)},function(a,c){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))},!1)]},umlFrame:function(a){return[T(a, +["width","height"],function(a){var c=Math.max(K.prototype.corner,Math.min(a.width,mxUtils.getValue(this.state.style,"width",K.prototype.width))),b=Math.max(1.5*K.prototype.corner,Math.min(a.height,mxUtils.getValue(this.state.style,"height",K.prototype.height)));return new mxPoint(a.x+c,a.y+b)},function(a,c){this.state.style.width=Math.round(Math.max(K.prototype.corner,Math.min(a.width,c.x-a.x)));this.state.style.height=Math.round(Math.max(1.5*K.prototype.corner,Math.min(a.height,c.y-a.y)))},!1)]}, process:function(a){var c=[T(a,["size"],function(a){var c=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style,"size",g.prototype.size))));return new mxPoint(a.x+a.width*c,a.y+a.height/4)},function(a,c){this.state.style.size=Math.max(0,Math.min(.5,(c.x-a.x)/a.width))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(sa(a));return c},cross:function(a){return[T(a,["size"],function(a){var c=Math.min(a.width,a.height),c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style, "size",ia.prototype.size)))*c/2;return new mxPoint(a.getCenterX()-c,a.getCenterY()-c)},function(a,c){var b=Math.min(a.width,a.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,a.getCenterY()-c.y)/b*2,Math.max(0,a.getCenterX()-c.x)/b*2)))})]},note:function(a){return[T(a,["size"],function(a){var c=Math.max(0,Math.min(a.width,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",l.prototype.size)))));return new mxPoint(a.x+a.width-c,a.y+c)},function(a,c){this.state.style.size= Math.round(Math.max(0,Math.min(Math.min(a.width,a.x+a.width-c.x),Math.min(a.height,c.y-a.y))))})]},manualInput:function(a){var c=[T(a,["size"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",ga.prototype.size)));return new mxPoint(a.x+a.width/4,a.y+3*c/4)},function(a,c){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,4*(c.y-a.y)/3)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(sa(a));return c},dataStorage:function(a){return[T(a, -["size"],function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",O.prototype.size))));return new mxPoint(a.x+(1-c)*a.width,a.getCenterY())},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(a.x+a.width-c.x)/a.width))})]},callout:function(a){var c=[T(a,["size","position"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",y.prototype.size))),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",y.prototype.position))); -mxUtils.getValue(this.state.style,"base",y.prototype.base);return new mxPoint(a.x+b*a.width,a.y+a.height-c)},function(a,c){mxUtils.getValue(this.state.style,"base",y.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(a.height,a.y+a.height-c.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(c.x-a.x)/a.width)))/100}),T(a,["position2"],function(a){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",y.prototype.position2)));return new mxPoint(a.x+ -c*a.width,a.y+a.height)},function(a,c){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(c.x-a.x)/a.width)))/100}),T(a,["base"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",y.prototype.size))),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",y.prototype.position))),f=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"base",y.prototype.base)));return new mxPoint(a.x+Math.min(a.width,b*a.width+f),a.y+a.height- -c)},function(a,c){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",y.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(a.width,c.x-a.x-b*a.width)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(sa(a));return c},internalStorage:function(a){var c=[T(a,["dx","dy"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",Q.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy", +["size"],function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",O.prototype.size))));return new mxPoint(a.x+(1-c)*a.width,a.getCenterY())},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(a.x+a.width-c.x)/a.width))})]},callout:function(a){var c=[T(a,["size","position"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",z.prototype.size))),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",z.prototype.position))); +mxUtils.getValue(this.state.style,"base",z.prototype.base);return new mxPoint(a.x+b*a.width,a.y+a.height-c)},function(a,c){mxUtils.getValue(this.state.style,"base",z.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(a.height,a.y+a.height-c.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(c.x-a.x)/a.width)))/100}),T(a,["position2"],function(a){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",z.prototype.position2)));return new mxPoint(a.x+ +c*a.width,a.y+a.height)},function(a,c){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(c.x-a.x)/a.width)))/100}),T(a,["base"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",z.prototype.size))),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",z.prototype.position))),f=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"base",z.prototype.base)));return new mxPoint(a.x+Math.min(a.width,b*a.width+f),a.y+a.height- +c)},function(a,c){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",z.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(a.width,c.x-a.x-b*a.width)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(sa(a));return c},internalStorage:function(a){var c=[T(a,["dx","dy"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",Q.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy", Q.prototype.dy)));return new mxPoint(a.x+c,a.y+b)},function(a,c){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,c.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(sa(a));return c},corner:function(a){return[T(a,["dx","dy"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",X.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy", X.prototype.dy)));return new mxPoint(a.x+c,a.y+b)},function(a,c){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,c.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))})]},tee:function(a){return[T(a,["dx","dy"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",da.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",da.prototype.dy)));return new mxPoint(a.x+(a.width+c)/2,a.y+b)},function(a,c){this.state.style.dx= Math.round(Math.max(0,2*Math.min(a.width/2,c.x-a.x-a.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))})]},singleArrow:ua(1),doubleArrow:ua(.5),folder:function(a){return[T(a,["tabWidth","tabHeight"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"tabWidth",r.prototype.tabWidth))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"tabHeight",r.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",r.prototype.tabPosition)== -mxConstants.ALIGN_RIGHT&&(c=a.width-c);return new mxPoint(a.x+c,a.y+b)},function(a,c){var b=Math.max(0,Math.min(a.width,c.x-a.x));mxUtils.getValue(this.state.style,"tabPosition",r.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(b=a.width-b);this.state.style.tabWidth=Math.round(b);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))})]},document:function(a){return[T(a,["size"],function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",z.prototype.size)))); +mxConstants.ALIGN_RIGHT&&(c=a.width-c);return new mxPoint(a.x+c,a.y+b)},function(a,c){var b=Math.max(0,Math.min(a.width,c.x-a.x));mxUtils.getValue(this.state.style,"tabPosition",r.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(b=a.width-b);this.state.style.tabWidth=Math.round(b);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))})]},document:function(a){return[T(a,["size"],function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",A.prototype.size)))); return new mxPoint(a.x+3*a.width/4,a.y+(1-c)*a.height)},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-c.y)/a.height))})]},tape:function(a){return[T(a,["size"],function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",x.prototype.size))));return new mxPoint(a.getCenterX(),a.y+c*a.height/2)},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(c.y-a.y)/a.height*2))})]},offPageConnector:function(a){return[T(a,["size"],function(a){var c= Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",S.prototype.size))));return new mxPoint(a.getCenterX(),a.y+(1-c)*a.height)},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-c.y)/a.height))})]},step:Ga(u.prototype.size,!0,null,!0,u.prototype.fixedSize),hexagon:Ga(F.prototype.size,!0,.5,!0),curlyBracket:Ga(k.prototype.size,!1),display:Ga(ba.prototype.size,!1),cube:Fa(1,a.prototype.size,!1),card:Fa(.5,t.prototype.size,!0),loopLimit:Fa(.5,N.prototype.size, !0),trapezoid:Ma(.5),parallelogram:Ma(1)};Graph.createHandle=T;Graph.handleFactory=Ha;mxVertexHandler.prototype.createCustomHandles=function(){if(1==this.state.view.graph.getSelectionCount()&&this.graph.isCellRotatable(this.state.cell)){var a=this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_RECTANGLE);a=Ha[a];null==a&&null!=this.state.shape&&this.state.shape.isRoundable()&&(a=Ha[mxConstants.SHAPE_RECTANGLE]);if(null!=a)return a(this.state)}return null}; mxEdgeHandler.prototype.createCustomHandles=function(){if(1==this.state.view.graph.getSelectionCount()){var a=this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_CONNECTOR);a=Ha[a];if(null!=a)return a(this.state)}return null}}else Graph.createHandle=function(){},Graph.handleFactory={};var Ia=new mxPoint(1,0),Ja=new mxPoint(1,0),ua=mxUtils.toRadians(-30),Ia=mxUtils.getRotatedPoint(Ia,Math.cos(ua),Math.sin(ua)),ua=mxUtils.toRadians(-150), -Ja=mxUtils.getRotatedPoint(Ja,Math.cos(ua),Math.sin(ua));mxEdgeStyle.IsometricConnector=function(a,c,b,f,d){var e=a.view;f=null!=f&&0<f.length?f[0]:null;var k=a.absolutePoints,g=k[0],k=k[k.length-1];null!=f&&(f=e.transformControlPoint(a,f));null==g&&null!=c&&(g=new mxPoint(c.getCenterX(),c.getCenterY()));null==k&&null!=b&&(k=new mxPoint(b.getCenterX(),b.getCenterY()));var q=Ia.x,n=Ia.y,p=Ja.x,u=Ja.y,B="horizontal"==mxUtils.getValue(a.style,"elbow","horizontal");if(null!=k&&null!=g){a=function(a,c, -b){a-=l.x;var f=c-l.y;c=(u*a-p*f)/(q*u-n*p);a=(n*a-q*f)/(n*p-q*u);B?(b&&(l=new mxPoint(l.x+q*c,l.y+n*c),d.push(l)),l=new mxPoint(l.x+p*a,l.y+u*a)):(b&&(l=new mxPoint(l.x+p*a,l.y+u*a),d.push(l)),l=new mxPoint(l.x+q*c,l.y+n*c));d.push(l)};var l=g;null==f&&(f=new mxPoint(g.x+(k.x-g.x)/2,g.y+(k.y-g.y)/2));a(f.x,f.y,!0);a(k.x,k.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Na=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(a,c){if(c== +Ja=mxUtils.getRotatedPoint(Ja,Math.cos(ua),Math.sin(ua));mxEdgeStyle.IsometricConnector=function(a,c,b,f,d){var e=a.view;f=null!=f&&0<f.length?f[0]:null;var k=a.absolutePoints,g=k[0],k=k[k.length-1];null!=f&&(f=e.transformControlPoint(a,f));null==g&&null!=c&&(g=new mxPoint(c.getCenterX(),c.getCenterY()));null==k&&null!=b&&(k=new mxPoint(b.getCenterX(),b.getCenterY()));var q=Ia.x,n=Ia.y,p=Ja.x,u=Ja.y,y="horizontal"==mxUtils.getValue(a.style,"elbow","horizontal");if(null!=k&&null!=g){a=function(a,c, +b){a-=l.x;var f=c-l.y;c=(u*a-p*f)/(q*u-n*p);a=(n*a-q*f)/(n*p-q*u);y?(b&&(l=new mxPoint(l.x+q*c,l.y+n*c),d.push(l)),l=new mxPoint(l.x+p*a,l.y+u*a)):(b&&(l=new mxPoint(l.x+p*a,l.y+u*a),d.push(l)),l=new mxPoint(l.x+q*c,l.y+n*c));d.push(l)};var l=g;null==f&&(f=new mxPoint(g.x+(k.x-g.x)/2,g.y+(k.y-g.y)/2));a(f.x,f.y,!0);a(k.x,k.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Na=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(a,c){if(c== mxEdgeStyle.IsometricConnector){var b=new mxElbowEdgeHandler(a);b.snapToTerminals=!1;return b}return Na.apply(this,arguments)};b.prototype.constraints=[];e.prototype.getConstraints=function(a,c,b){a=[];var f=Math.tan(mxUtils.toRadians(30)),d=(.5-f)/2,f=Math.min(c,b/(.5+f));c=(c-f)/2;b=(b-f)/2;a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,b+.25*f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c+.5*f,b+f*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c+f, -b+.25*f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c+f,b+.75*f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c+.5*f,b+(1-d)*f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,b+.75*f));return a};y.prototype.getConstraints=function(a,c,b){a=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var f=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position", +b+.25*f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c+f,b+.75*f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c+.5*f,b+(1-d)*f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,b+.75*f));return a};z.prototype.getConstraints=function(a,c,b){a=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var f=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position", this.position));var d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2))));parseFloat(mxUtils.getValue(this.style,"base",this.base));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.25,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0, 0),!1,null,c,.5*(b-f)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,b-f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,b-f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(b-f)));c>=2*f&&a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return a};mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5, 0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)]; @@ -2618,7 +2618,7 @@ null,c,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d));a.pu 1),!1));return a};Q.prototype.constraints=mxRectangleShape.prototype.constraints;O.prototype.constraints=mxRectangleShape.prototype.constraints;ea.prototype.constraints=mxEllipse.prototype.constraints;fa.prototype.constraints=mxEllipse.prototype.constraints;I.prototype.constraints=mxEllipse.prototype.constraints;xa.prototype.constraints=mxEllipse.prototype.constraints;ga.prototype.constraints=mxRectangleShape.prototype.constraints;ya.prototype.constraints=mxRectangleShape.prototype.constraints;ba.prototype.getConstraints= function(a,c,b){a=[];var f=Math.min(c,b/2),d=Math.min(c-f,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*c);a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+c-f),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-f,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));a.push(new mxConnectionConstraint(new mxPoint(0, 0),!1,null,c-f,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+c-f),b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,b));return a};N.prototype.constraints=mxRectangleShape.prototype.constraints;S.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0, -.3),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];B.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5, +.3),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];C.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5, 0),!1),new mxConnectionConstraint(new mxPoint(.75,.1),!1),new mxConnectionConstraint(new mxPoint(0,1/3),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1,1),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1)];D.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0, .3),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxActor.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.25,.2),!1),new mxConnectionConstraint(new mxPoint(.1, .5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.75,.25),!1),new mxConnectionConstraint(new mxPoint(.9,.5),!1),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];m.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1, @@ -2628,7 +2628,7 @@ function(a,c,b){a=[];var f=Math.min(c,b/2),d=Math.min(c-f,Math.max(0,parseFloat( [new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];mxDoubleEllipse.prototype.constraints=mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5, 1),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0)];mxHexagon.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.375,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.625,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1, .75),!0),new mxConnectionConstraint(new mxPoint(.375,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.625,1),!0)];mxCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.25),!1),new mxConnectionConstraint(new mxPoint(.4,.1),!1),new mxConnectionConstraint(new mxPoint(.16,.55),!1),new mxConnectionConstraint(new mxPoint(.07,.4),!1),new mxConnectionConstraint(new mxPoint(.31,.8),!1),new mxConnectionConstraint(new mxPoint(.13,.77),!1),new mxConnectionConstraint(new mxPoint(.8, -.8),!1),new mxConnectionConstraint(new mxPoint(.55,.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];c.prototype.constraints=mxRectangleShape.prototype.constraints;f.prototype.constraints=mxRectangleShape.prototype.constraints;z.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5, +.8),!1),new mxConnectionConstraint(new mxPoint(.55,.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];c.prototype.constraints=mxRectangleShape.prototype.constraints;f.prototype.constraints=mxRectangleShape.prototype.constraints;A.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5, 0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;da.prototype.getConstraints=function(a,c,b){a=[];var f=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style, "dx",this.dx)))),d=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*c+.25*f,d));a.push(new mxConnectionConstraint(new mxPoint(0, 0),!1,null,.5*(c+f),d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+f),.5*(b+d)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+f),b));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-f),b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-f),.5*(b+d)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-f),d));a.push(new mxConnectionConstraint(new mxPoint(0, @@ -2641,7 +2641,7 @@ function(a,c,b){a=[];var f=Math.min(c,b/2),d=Math.min(c-f,Math.max(0,parseFloat( 0),!1,null,d,b));return a};ia.prototype.getConstraints=function(a,c,b){a=[];var f=Math.min(b,c),d=Math.max(0,Math.min(f,f*parseFloat(mxUtils.getValue(this.style,"size",this.size)))),f=(b-d)/2,e=f+d,k=(c-d)/2,d=k+d;a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,k,.5*f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,k,0));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,0));a.push(new mxConnectionConstraint(new mxPoint(0, 0),!1,null,d,.5*f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,k,b-.5*f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,k,b));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,b-.5*f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e));a.push(new mxConnectionConstraint(new mxPoint(0, 0),!1,null,.5*(c+d),f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,f));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+d),e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,k,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*k,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,f));a.push(new mxConnectionConstraint(new mxPoint(0, -.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*k,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,k,f));return a};C.prototype.constraints=null;H.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7, +.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*k,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,k,f));return a};B.prototype.constraints=null;H.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7, .1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];aa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];ja.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1, .5),!1)];ca.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})();function Actions(a){this.editorUi=a;this.actions={};this.init()} Actions.prototype.init=function(){function a(a){d.escape();var b=d.getDeletableCells(d.getSelectionCells());if(null!=b&&0<b.length){var e=d.selectParentAfterDelete?d.model.getParents(b):null;d.removeCells(b,a);if(null!=e){a=[];for(b=0;b<e.length;b++)d.model.contains(e[b])&&(d.model.isVertex(e[b])||d.model.isEdge(e[b]))&&a.push(e[b]);d.setSelectionCells(a)}}}var b=this.editorUi,e=b.editor,d=e.graph,l=function(){return Action.prototype.isEnabled.apply(this,arguments)&&d.isEnabled()};this.addAction("new...", @@ -2702,22 +2702,22 @@ DrawioFile.prototype.maxAutosaveRevisionDelay=3E5;DrawioFile.prototype.inConflic DrawioFile.prototype.synchronizeFile=function(a,b){this.savingFile?null!=b&&b({message:mxResources.get("busy")}):null!=this.sync?this.sync.fileChanged(a,b):this.updateFile(a,b)}; DrawioFile.prototype.updateFile=function(a,b,e,d){null!=e&&e()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=b&&b():this.getLatestVersion(mxUtils.bind(this,function(l){try{null!=e&&e()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=b&&b():null!=l?this.mergeFile(l,a,b,d):this.reloadFile(a,b))}catch(m){null!=b&&b(m)}}),b))}; DrawioFile.prototype.mergeFile=function(a,b,e,d){var l=!0;try{this.stats.fileMerged++;var m=null!=this.shadowPages?this.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.shadowData).documentElement),r=this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement);if(null!=r&&0<r.length){this.shadowPages=r;this.backupPatch=this.isModified()?this.ui.diffPages(m,this.ui.pages):null;var t=[this.ui.diffPages(null!=d?d:m,this.shadowPages)];if(!this.ignorePatches(t)){var x=this.ui.patchPages(m, -t[0]);d={};var z=this.ui.getHashValueForPages(x,d),m={},c=this.ui.getHashValueForPages(this.shadowPages,m);"1"==urlParams.test&&EditorUi.debug("File.mergeFile",[this],"backup",this.backupPatch,"patches",t,"checksum",c==z,z);if(null!=z&&z!=c){var f=this.compressReportData(this.getAnonymizedXmlForPages(r)),k=this.compressReportData(this.getAnonymizedXmlForPages(x)),p=this.ui.hashValue(a.getCurrentEtag()),n=this.ui.hashValue(this.getCurrentEtag());this.checksumError(e,t,"Shadow Details: "+JSON.stringify(d)+ -"\nChecksum: "+z+"\nCurrent: "+c+"\nCurrent Details: "+JSON.stringify(m)+"\nFrom: "+p+"\nTo: "+n+"\n\nFile Data:\n"+f+"\nPatched Shadow:\n"+k,null,"mergeFile");return}this.patch(t,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw l=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(a.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=b&&b()}catch(y){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged(); -null!=e&&e(y);try{if(l)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,y);else{var g=this.getCurrentUser(),A=null!=g?g.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),A,y)}}catch(u){}}}; +t[0]);d={};var A=this.ui.getHashValueForPages(x,d),m={},c=this.ui.getHashValueForPages(this.shadowPages,m);"1"==urlParams.test&&EditorUi.debug("File.mergeFile",[this],"backup",this.backupPatch,"patches",t,"checksum",c==A,A);if(null!=A&&A!=c){var f=this.compressReportData(this.getAnonymizedXmlForPages(r)),k=this.compressReportData(this.getAnonymizedXmlForPages(x)),p=this.ui.hashValue(a.getCurrentEtag()),n=this.ui.hashValue(this.getCurrentEtag());this.checksumError(e,t,"Shadow Details: "+JSON.stringify(d)+ +"\nChecksum: "+A+"\nCurrent: "+c+"\nCurrent Details: "+JSON.stringify(m)+"\nFrom: "+p+"\nTo: "+n+"\n\nFile Data:\n"+f+"\nPatched Shadow:\n"+k,null,"mergeFile");return}this.patch(t,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw l=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(a.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=b&&b()}catch(z){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged(); +null!=e&&e(z);try{if(l)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,z);else{var g=this.getCurrentUser(),y=null!=g?g.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),y,z)}}catch(u){}}}; DrawioFile.prototype.getAnonymizedXmlForPages=function(a){var b=new mxCodec(mxUtils.createXmlDocument()),e=b.document.createElement("mxfile");if(null!=a)for(var d=0;d<a.length;d++){var l=b.encode(new mxGraphModel(a[d].root));"1"!=urlParams.dev&&(l=this.ui.anonymizeNode(l,!0));l.setAttribute("id",a[d].getId());a[d].viewState&&this.ui.editor.graph.saveViewState(a[d].viewState,l,!0);e.appendChild(l)}return mxUtils.getPrettyXml(e)}; DrawioFile.prototype.compressReportData=function(a,b,e){b=null!=b?b:1E4;null!=e&&null!=a&&a.length>e?a=a.substring(0,e)+"[...]":null!=a&&a.length>b&&(a=Graph.compress(a)+"\n");return a}; DrawioFile.prototype.checksumError=function(a,b,e,d,l){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=a&&a();try{if(this.errorReportsEnabled){if(null!=b)for(a=0;a<b.length;a++)this.ui.anonymizePatch(b[a]);var m=mxUtils.bind(this,function(a){var d=this.compressReportData(JSON.stringify(b,null,2));a=null!=a?this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement)), 25E3):"n/a";this.sendErrorReport("Checksum Error in "+l+" "+this.getHash(),(null!=e?e:"")+"\n\nPatches:\n"+d+(null!=a?"\n\nRemote:\n"+a:""),null,7E4)});null==d?m(null):this.getLatestVersion(mxUtils.bind(this,function(a){null!=a&&a.getCurrentEtag()==d?m(a):m(null)}),function(){})}else{var r=this.getCurrentUser(),t=null!=r?r.id:"unknown";EditorUi.logError("Checksum Error in "+l+" "+this.getId(),null,this.getMode()+"."+this.getId(),"user_"+t+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")); try{EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+this.getHash(),action:l,label:"user_"+t+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")})}catch(x){}}}catch(x){}}; -DrawioFile.prototype.sendErrorReport=function(a,b,e,d){try{var l=this.compressReportData(this.getAnonymizedXmlForPages(this.shadowPages),25E3),m=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),r=this.getCurrentUser(),t=null!=r?this.ui.hashValue(r.id):"unknown",x=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",z=this.getTitle(),c=z.lastIndexOf("."),r="xml";0<c&&(r=z.substring(c));var f=null!=e?e.stack:Error().stack;EditorUi.sendReport(a+" "+(new Date).toISOString()+ +DrawioFile.prototype.sendErrorReport=function(a,b,e,d){try{var l=this.compressReportData(this.getAnonymizedXmlForPages(this.shadowPages),25E3),m=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),r=this.getCurrentUser(),t=null!=r?this.ui.hashValue(r.id):"unknown",x=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",A=this.getTitle(),c=A.lastIndexOf("."),r="xml";0<c&&(r=A.substring(c));var f=null!=e?e.stack:Error().stack;EditorUi.sendReport(a+" "+(new Date).toISOString()+ ":\n\nBrowser="+navigator.userAgent+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+r+")\nUser="+t+x+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=b?"\n\n"+b:"")+ (null!=e?"\n\nError: "+e.message:"")+"\n\nStack:\n"+f+"\n\nShadow:\n"+l+"\n\nData:\n"+m,d)}catch(k){}}; DrawioFile.prototype.reloadFile=function(a,b){try{this.ui.spinner.stop();var e=mxUtils.bind(this,function(){this.stats.fileReloaded++;this.reportEnabled=!1;var b=this.ui.editor.graph.getViewState(),e=this.ui.editor.graph.getSelectionCells(),m=this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(m,b,e);null!=this.backupPatch&&this.patch([this.backupPatch]);var d=this.ui.getCurrentFile();null!=d&&(d.stats= this.stats);null!=a&&a()}}),!0)});this.isModified()&&null==this.backupPatch?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.handleFileSuccess("manual"==DrawioFile.SYNC)}),e,mxResources.get("cancel"),mxResources.get("discardChanges")):e()}catch(d){null!=b&&b(d)}};DrawioFile.prototype.copyFile=function(a,b){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))}; DrawioFile.prototype.ignorePatches=function(a){for(var b=!0,e=0;e<a.length&&b;e++)b=b&&0==Object.keys(a[e]).length;return b}; -DrawioFile.prototype.patch=function(a,b){var e=this.ui.editor.undoManager,d=e.history.slice(),l=e.indexOfNextAdd,m=this.ui.editor.graph;m.container.style.visibility="hidden";var r=this.changeListenerEnabled;this.changeListenerEnabled=!1;var t=m.foldingEnabled,x=m.mathEnabled,z=m.cellRenderer.redraw;m.cellRenderer.redraw=function(a){a.view.graph.isEditing(a.cell)&&(a.view.graph.scrollCellToVisible(a.cell),a.view.graph.cellEditor.resize());z.apply(this,arguments)};m.model.beginUpdate();try{for(var c= -0;c<a.length;c++)this.ui.pages=this.ui.patchPages(this.ui.pages,a[c],!0,b,this.isModified());0==this.ui.pages.length&&this.ui.pages.push(this.ui.createPage());0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{m.container.style.visibility="";m.model.endUpdate();m.cellRenderer.redraw=z;this.changeListenerEnabled=r;e.history=d;e.indexOfNextAdd=l;e.fireEvent(new mxEventObject(mxEvent.CLEAR));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)x!= +DrawioFile.prototype.patch=function(a,b){var e=this.ui.editor.undoManager,d=e.history.slice(),l=e.indexOfNextAdd,m=this.ui.editor.graph;m.container.style.visibility="hidden";var r=this.changeListenerEnabled;this.changeListenerEnabled=!1;var t=m.foldingEnabled,x=m.mathEnabled,A=m.cellRenderer.redraw;m.cellRenderer.redraw=function(a){a.view.graph.isEditing(a.cell)&&(a.view.graph.scrollCellToVisible(a.cell),a.view.graph.cellEditor.resize());A.apply(this,arguments)};m.model.beginUpdate();try{for(var c= +0;c<a.length;c++)this.ui.pages=this.ui.patchPages(this.ui.pages,a[c],!0,b,this.isModified());0==this.ui.pages.length&&this.ui.pages.push(this.ui.createPage());0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{m.container.style.visibility="";m.model.endUpdate();m.cellRenderer.redraw=A;this.changeListenerEnabled=r;e.history=d;e.indexOfNextAdd=l;e.fireEvent(new mxEventObject(mxEvent.CLEAR));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)x!= m.mathEnabled?(this.ui.editor.updateGraphComponents(),m.refresh()):(t!=m.foldingEnabled?m.view.revalidate():m.view.validate(),m.sizeDidChange());this.ui.updateTabContainer()}}; DrawioFile.prototype.save=function(a,b,e,d,l,m){try{if(this.isEditable())if(!l&&this.invalidChecksum)if(null!=e)e({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=b&&b();else if(null!=e)e({message:mxResources.get("readOnly")});else throw Error(mxResources.get("readOnly"));}catch(r){if(null!=e)e(r);else throw r;}}; DrawioFile.prototype.updateFileData=function(){var a=null!=this.ui.fileNode?"false"==this.ui.fileNode.getAttribute("compressed"):!1;this.setData(this.ui.getFileData(null,null,null,null,null,null,null,null,this,a))};DrawioFile.prototype.saveAs=function(a,b,e){};DrawioFile.prototype.saveFile=function(a,b,e,d){};DrawioFile.prototype.getPublicUrl=function(a){a(null)};DrawioFile.prototype.isRestricted=function(){return!1};DrawioFile.prototype.isModified=function(){return this.modified}; @@ -2807,7 +2807,7 @@ d.type="text/javascript";d.src=a;f[0].parentNode.appendChild(d)}};Editor.prototy b?c.push(b.replace(/\\'/g,"'")):void 0!==f?c.push(f.replace(/\\"/g,'"')):void 0!==d&&c.push(d);return""});/,\s*$/.test(a)&&c.push("");return c};Editor.prototype.isCorsEnabledForUrl=function(a){null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(a)||"https://raw.githubusercontent.com/"===a.substring(0,34)||"https://cdn.rawgit.com/"===a.substring(0,23)||"https://rawgit.com/"===a.substring(0, 19)||/^https?:\/\/[^\/]*\.blob.core.windows.net\//.test(a)||/^https?:\/\/[^\/]*\.iconfinder.com\//.test(a)||/^https?:\/\/[^\/]*\.draw\.io\/proxy/.test(a)||/^https?:\/\/[^\/]*\.github\.io\//.test(a)};Editor.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var c=a.convert,b=this;a.convert=function(f){if(null!=f){var d="http://"==f.substring(0,7)||"https://"==f.substring(0,8);d&&!navigator.onLine?f=EditorUi.prototype.svgBrokenImage.src:!d||f.substring(0,a.baseUrl.length)== a.baseUrl||EditorUi.prototype.crossOriginImages&&b.isCorsEnabledForUrl(f)?"chrome-extension://"!=f.substring(0,19)&&(f=c.apply(this,arguments)):f=PROXY_URL+"?url="+encodeURIComponent(f)}return f};return a};Editor.prototype.createSvgDataUri=function(a){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(a)))};Editor.prototype.convertImageToDataUri=function(a,c){if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){c(this.createSvgDataUri(a.getText()))}),function(){c(EditorUi.prototype.svgBrokenImage.src)}); -else{var b=new Image;EditorUi.prototype.crossOriginImages&&(b.crossOrigin="anonymous");b.onload=function(){var a=document.createElement("canvas"),f=a.getContext("2d");a.height=b.height;a.width=b.width;f.drawImage(b,0,0);try{c(a.toDataURL())}catch(K){c(EditorUi.prototype.svgBrokenImage.src)}};b.onerror=function(){c(EditorUi.prototype.svgBrokenImage.src)};b.src=a}};Editor.prototype.convertImages=function(a,c,b,f){null==f&&(f=this.createImageUrlConverter());var d=0,e=b||{};b=mxUtils.bind(this,function(b, +else{var b=new Image;EditorUi.prototype.crossOriginImages&&(b.crossOrigin="anonymous");b.onload=function(){var a=document.createElement("canvas"),f=a.getContext("2d");a.height=b.height;a.width=b.width;f.drawImage(b,0,0);try{c(a.toDataURL())}catch(L){c(EditorUi.prototype.svgBrokenImage.src)}};b.onerror=function(){c(EditorUi.prototype.svgBrokenImage.src)};b.src=a}};Editor.prototype.convertImages=function(a,c,b,f){null==f&&(f=this.createImageUrlConverter());var d=0,e=b||{};b=mxUtils.bind(this,function(b, k){for(var g=a.getElementsByTagName(b),n=0;n<g.length;n++)mxUtils.bind(this,function(b){var g=f.convert(b.getAttribute(k));if(null!=g&&"data:"!=g.substring(0,5)){var n=e[g];null==n?(d++,this.convertImageToDataUri(g,function(f){null!=f&&(e[g]=f,b.setAttribute(k,f));d--;0==d&&c(a)})):b.setAttribute(k,n)}else null!=g&&b.setAttribute(k,g)})(g[n])});b("image","xlink:href");b("img","src");0==d&&c(a)};Editor.prototype.base64Encode=function(a){for(var c="",b=0,f=a.length,d,e,k;b<f;){d=a.charCodeAt(b++)&255; if(b==f){c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((d&3)<<4);c+="==";break}e=a.charCodeAt(b++);if(b==f){c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((d&3)<<4|(e&240)>>4);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&15)<<2);c+="=";break}k= a.charCodeAt(b++);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((d&3)<<4|(e&240)>>4);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&15)<<2|(k&192)>>6);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(k&63)}return c};Editor.prototype.loadUrl=function(a,c,b,f,d,e){try{var k=f||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)|| @@ -2816,15 +2816,15 @@ b&&b({code:App.ERROR_UNKNOWN},a)}),function(){null!=b&&b({code:App.ERROR_UNKNOWN b[k].indexOf(")");e.push('url("');e.push(d[c(b[k].substring(0,g))]);e.push('"'+b[k].substring(g))}this.resolvedFontCss=e.join("");a()}});if(0<b.length)for(var k=1;k<b.length;k++){var g=b[k].indexOf(")"),n=null,p=b[k].indexOf("format(",g);0<p&&(n=c(b[k].substring(p+7,b[k].indexOf(")",p))));mxUtils.bind(this,function(a){if(null==d[a]){d[a]=a;f++;var c="application/x-font-ttf";if("svg"==n||/(\.svg)($|\?)/i.test(a))c="image/svg+xml";else if("otf"==n||"embedded-opentype"==n||/(\.otf)($|\?)/i.test(a))c= "application/x-font-opentype";else if("woff"==n||/(\.woff)($|\?)/i.test(a))c="application/font-woff";else if("woff2"==n||/(\.woff2)($|\?)/i.test(a))c="application/font-woff2";else if("eot"==n||/(\.eot)($|\?)/i.test(a))c="application/vnd.ms-fontobject";else if("sfnt"==n||/(\.sfnt)($|\?)/i.test(a))c="application/font-sfnt";var b=a;/^https?:\/\//.test(b)&&!this.isCorsEnabledForUrl(b)&&(b=PROXY_URL+"?url="+encodeURIComponent(a));this.loadUrl(b,mxUtils.bind(this,function(c){d[a]=c;f--;e()}),mxUtils.bind(this, function(a){f--;e()}),!0,null,"data:"+c+";charset=utf-8;base64,")}})(c(b[k].substring(0,g)),n)}}else a()};Editor.prototype.convertMath=function(a,c,b,f){a.mathEnabled&&"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?(Editor.MathJaxRender(c),window.setTimeout(mxUtils.bind(this,function(){MathJax.Hub.Queue(mxUtils.bind(this,function(){f()}))}),0)):f()};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||!this.graph.mathEnabled&&this.useCanvasForExport};Editor.prototype.exportToCanvas= -function(a,c,b,f,d,e,k,g,n,p,u,l,A,v){e=null!=e?e:!0;l=null!=l?l:this.graph;A=null!=A?A:0;var q=n?null:l.background;q==mxConstants.NONE&&(q=null);null==q&&(q=f);null==q&&0==n&&(q=this.graph.defaultPageBackgroundColor);this.convertImages(l.getSvg(q,null,null,v,null,null!=k?k:!0,null,null,null,p),mxUtils.bind(this,function(b){var f=new Image;f.onload=mxUtils.bind(this,function(){try{var k=document.createElement("canvas"),n=parseInt(b.getAttribute("width")),p=parseInt(b.getAttribute("height"));g=null!= -g?g:1;null!=c&&(g=e?Math.min(1,Math.min(3*c/(4*p),c/n)):c/n);n=Math.ceil(g*n)+2*A;p=Math.ceil(g*p)+2*A;k.setAttribute("width",n);k.setAttribute("height",p);var u=k.getContext("2d");null!=q&&(u.beginPath(),u.rect(0,0,n,p),u.fillStyle=q,u.fill());u.scale(g,g);mxClient.IS_SF?window.setTimeout(function(){u.drawImage(f,A/g,A/g);a(k)},0):(u.drawImage(f,A/g,A/g),a(k))}catch(R){null!=d&&d(R)}});f.onerror=function(a){null!=d&&d(a)};try{p&&this.graph.addSvgShadow(b);var k=mxUtils.bind(this,function(){if(null!= +function(a,c,b,f,d,e,k,g,n,p,u,l,y,v){e=null!=e?e:!0;l=null!=l?l:this.graph;y=null!=y?y:0;var q=n?null:l.background;q==mxConstants.NONE&&(q=null);null==q&&(q=f);null==q&&0==n&&(q=this.graph.defaultPageBackgroundColor);this.convertImages(l.getSvg(q,null,null,v,null,null!=k?k:!0,null,null,null,p),mxUtils.bind(this,function(b){var f=new Image;f.onload=mxUtils.bind(this,function(){try{var k=document.createElement("canvas"),n=parseInt(b.getAttribute("width")),p=parseInt(b.getAttribute("height"));g=null!= +g?g:1;null!=c&&(g=e?Math.min(1,Math.min(3*c/(4*p),c/n)):c/n);n=Math.ceil(g*n)+2*y;p=Math.ceil(g*p)+2*y;k.setAttribute("width",n);k.setAttribute("height",p);var u=k.getContext("2d");null!=q&&(u.beginPath(),u.rect(0,0,n,p),u.fillStyle=q,u.fill());u.scale(g,g);mxClient.IS_SF?window.setTimeout(function(){u.drawImage(f,y/g,y/g);a(k)},0):(u.drawImage(f,y/g,y/g),a(k))}catch(R){null!=d&&d(R)}});f.onerror=function(a){null!=d&&d(a)};try{p&&this.graph.addSvgShadow(b);var k=mxUtils.bind(this,function(){if(null!= this.resolvedFontCss){var a=document.createElement("style");a.setAttribute("type","text/css");a.innerHTML=this.resolvedFontCss;b.getElementsByTagName("defs")[0].appendChild(a)}this.convertMath(l,b,!0,mxUtils.bind(this,function(){f.src=this.createSvgDataUri(mxUtils.getXml(b))}))});this.loadFonts(k)}catch(Q){null!=d&&d(Q)}}),b,u)};Editor.prototype.writeGraphModelToPng=function(a,c,b,f,d){function e(a,c){var b=n;n+=c;return a.substring(b,n)}function k(a){a=e(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<< 8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function g(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var n=0;if(e(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=d&&d();else if(e(a,4),"IHDR"!=e(a,4))null!=d&&d();else{e(a,17);d=a.substring(0,n);do{var p=k(a);if("IDAT"==e(a,4)){d=a.substring(0,n-8);b=b+String.fromCharCode(0)+("zTXt"==c?String.fromCharCode(0):"")+f;f=4294967295; f=EditorUi.prototype.updateCRC(f,c,0,4);f=EditorUi.prototype.updateCRC(f,b,0,b.length);d+=g(b.length)+c+b+g(f^4294967295);d+=a.substring(n-8,a.length);break}d+=a.substring(n-8,n-4+p);e(a,p);e(a,4)}while(p);return"data:image/png;base64,"+(window.btoa?btoa(d):Base64.encode(d,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://desk.draw.io/support/solutions/articles/16000091426";var l=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(a,c){l.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors); mxSettings.save()};var m=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){m.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(a,c){var b=null;null!=a.editor.graph.getModel().getParent(c)?b=c.getId():null!=a.currentPage&&(b=a.currentPage.getId());return b});if(null!=window.StyleFormatPanel){var r=Format.prototype.init;Format.prototype.init=function(){r.apply(this,arguments); this.editorUi.editor.addListener("fileLoaded",this.update)};var t=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?t.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var a=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=a&&a.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(a){return!1};var x=DiagramFormatPanel.prototype.addView; DiagramFormatPanel.prototype.addView=function(a){a=x.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var c=this.editorUi,b=c.editor.graph,f=this.createOption(mxResources.get("shadow"),function(){return b.shadowVisible},function(a){var f=new ChangePageSetup(c);f.ignoreColor=!0;f.ignoreImage=!0;f.shadowVisible=a;b.model.execute(f)},{install:function(a){this.listener=function(){a(b.shadowVisible)};c.addListener("shadowVisibleChanged",this.listener)}, -destroy:function(){c.removeListener(this.listener)}});Editor.shadowOptionEnabled||(f.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(f,60));a.appendChild(f)}return a};var z=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(a){a=z.apply(this,arguments);var c=this.editorUi,b=c.editor.graph;if(b.isEnabled()){var f=c.getCurrentFile();if(null!=f&&f.isAutosaveOptional()){var d=this.createOption(mxResources.get("autosave"),function(){return c.editor.autosave}, +destroy:function(){c.removeListener(this.listener)}});Editor.shadowOptionEnabled||(f.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(f,60));a.appendChild(f)}return a};var A=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(a){a=A.apply(this,arguments);var c=this.editorUi,b=c.editor.graph;if(b.isEnabled()){var f=c.getCurrentFile();if(null!=f&&f.isAutosaveOptional()){var d=this.createOption(mxResources.get("autosave"),function(){return c.editor.autosave}, function(a){c.editor.setAutosave(a);c.editor.autosave&&f.isModified()&&f.fileChanged()},{install:function(a){this.listener=function(){a(c.editor.autosave)};c.editor.addListener("autosaveChanged",this.listener)},destroy:function(){c.editor.removeListener(this.listener)}});a.appendChild(d)}}if(this.isMathOptionVisible()&&b.isEnabled()&&"undefined"!==typeof MathJax){d=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return b.mathEnabled},function(a){c.actions.get("mathematicalTypesetting").funct()}, {install:function(a){this.listener=function(){a(b.mathEnabled)};c.addListener("mathEnabledChanged",this.listener)},destroy:function(){c.removeListener(this.listener)}});d.style.paddingTop="5px";a.appendChild(d);var e=c.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000032875");e.style.position="relative";e.style.marginLeft="6px";e.style.top="2px";d.appendChild(e)}return a};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size", type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.link.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.flexArrow.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:10},{name:"startWidth",dispName:"Start Width",type:"float",min:0,defVal:20},{name:"endWidth",dispName:"End Width",type:"float",min:0, @@ -2848,7 +2848,7 @@ type:"float",min:0,defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,de stroke:"#B09500",font:"#ffffff"},{fill:"#6d8764",stroke:"#3A5431",font:"#ffffff"},{fill:"#647687",stroke:"#314354",font:"#ffffff"},{fill:"#76608a",stroke:"#432D57",font:"#ffffff"},{fill:"#a0522d",stroke:"#6D1F00",font:"#ffffff"}],[{fill:"",stroke:""},{fill:mxConstants.NONE,stroke:""},{fill:"#fad7ac",stroke:"#b46504"},{fill:"#fad9d5",stroke:"#ae4132"},{fill:"#b0e3e6",stroke:"#0e8088"},{fill:"#b1ddf0",stroke:"#10739e"},{fill:"#d0cee2",stroke:"#56517e"},{fill:"#bac8d3",stroke:"#23445d"}],[{fill:"",stroke:""}, {fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[{fill:"",stroke:""},{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff", stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=null;StyleFormatPanel.prototype.findCommonProperties=function(a,c,b){if(null!=c){var f=function(a){if(null!=a)if(b)for(var f=0;f<a.length;f++)c[a[f].name]=a[f];else for(var d in c){for(var e=!1,f=0;f<a.length;f++)if(a[f].name==d&&a[f].type==c[d].type){e=!0;break}e||delete c[d]}},d=this.editorUi.editor.graph.view.getState(a);null!=d&& -null!=d.shape&&(d.shape.commonCustomPropAdded||(d.shape.commonCustomPropAdded=!0,d.shape.customProperties=d.shape.customProperties||[],d.cell.vertex?Array.prototype.push.apply(d.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(d.shape.customProperties,Editor.commonEdgeProperties)),f(d.shape.customProperties));a=a.getAttribute("customProperties");if(null!=a)try{f(JSON.parse(a))}catch(K){}}};var c=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var a= +null!=d.shape&&(d.shape.commonCustomPropAdded||(d.shape.commonCustomPropAdded=!0,d.shape.customProperties=d.shape.customProperties||[],d.cell.vertex?Array.prototype.push.apply(d.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(d.shape.customProperties,Editor.commonEdgeProperties)),f(d.shape.customProperties));a=a.getAttribute("customProperties");if(null!=a)try{f(JSON.parse(a))}catch(L){}}};var c=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var a= this.format.createSelectionState();"image"==a.style.shape||a.containsLabel||this.container.appendChild(this.addStyles(this.createPanel()));c.apply(this,arguments);if(Editor.enableCustomProperties){for(var b={},f=a.vertices,d=a.edges,e=0;e<f.length;e++)this.findCommonProperties(f[e],b,0==e);for(e=0;e<d.length;e++)this.findCommonProperties(d[e],b,0==f.length&&0==e);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(b).length&&this.container.appendChild(this.addProperties(this.createPanel(), b,a))}};var f=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(a){var c=mxUtils.button(mxResources.get("copyStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("copyStyle").funct()}));c.setAttribute("title",mxResources.get("copyStyle")+" ("+this.editorUi.actions.get("copyStyle").shortcut+")");c.style.marginBottom="2px";c.style.width="100px";c.style.marginRight="2px";a.appendChild(c);c=mxUtils.button(mxResources.get("pasteStyle"),mxUtils.bind(this, function(a){this.editorUi.actions.get("pasteStyle").funct()}));c.setAttribute("title",mxResources.get("pasteStyle")+" ("+this.editorUi.actions.get("pasteStyle").shortcut+")");c.style.marginBottom="2px";c.style.width="100px";a.appendChild(c);mxUtils.br(a);return f.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=function(a,c,b){function f(a,c,b,f){q.getModel().beginUpdate();try{var d=[],e=[];if(null!=b.index){for(var k=[],g=b.parentRow.nextSibling;g&& @@ -2857,15 +2857,15 @@ p=b.dependentPropsVals[a];if(p.length>c)p=p.slice(0,c);else for(var l=p.length;l b.style.left=e.x-d.x+"px";b.style.top=e.y-d.y+"px";b.style.width=c.offsetWidth+"px";b.style.height=c.offsetHeight-(f?4:0)+"px";b.style.zIndex=5}function e(a,c,b){var d=document.createElement("div");d.style.width="32px";d.style.height="4px";d.style.margin="2px";d.style.border="1px solid black";d.style.background=c&&"none"!=c?c:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(u,function(e){this.editorUi.pickColor(c,function(c){d.style.background="none"==c?"url('"+Dialog.prototype.noColorImage+ "')":c;f(a,c,b)});mxEvent.consume(e)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(d);return btn}function k(a,c,b,d,e,k,g){null!=c&&(c=c.split(","),l.push({name:a,values:c,type:b,defVal:d,countProperty:e,parentRow:k,isDeletable:!0,flipBkg:g}));btn=mxUtils.button("+",mxUtils.bind(u,function(c){for(var n=k,u=0;null!=n.nextSibling;)if(n.nextSibling.getAttribute("data-pName")==a)n=n.nextSibling,u++;else break;var q={type:b,parentRow:k,index:u,isDeletable:!0, defVal:d,countProperty:e},u=p(a,"",q,0==u%2,g);f(a,d,q);n.parentNode.insertBefore(u,n.nextSibling);mxEvent.consume(c)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function g(a,c,b,f,d,e,k){if(0<d){var g=Array(d);c=null!=c?c.split(","):[];for(var n=0;n<d;n++)g[n]=null!=c[n]?c[n]:null!=f?f:"";l.push({name:a,values:g,type:b,defVal:f,parentRow:e,flipBkg:k,size:d})}return document.createElement("div")}function n(a,c,b){var d=document.createElement("input");d.type= -"checkbox";d.checked="1"==c;mxEvent.addListener(d,"change",function(){f(a,d.checked?"1":"0",b)});return d}function p(c,b,p,q,l){var v=p.dispName,A=p.type,C=document.createElement("tr");C.className="gePropRow"+(l?"Dark":"")+(q?"Alt":"")+" gePropNonHeaderRow";C.setAttribute("data-pName",c);C.setAttribute("data-pValue",b);q=!1;null!=p.index&&(C.setAttribute("data-index",p.index),v=(null!=v?v:"")+"["+p.index+"]",q=!0);var y=document.createElement("td");y.className="gePropRowCell";y.innerHTML=mxUtils.htmlEntities(mxResources.get(v, -null,v));q&&(y.style.textAlign="right");C.appendChild(y);y=document.createElement("td");y.className="gePropRowCell";if("color"==A)y.appendChild(e(c,b,p));else if("bool"==A||"boolean"==A)y.appendChild(n(c,b,p));else if("enum"==A){var m=p.enumList;for(l=0;l<m.length;l++)if(v=m[l],v.val==b){y.innerHTML=mxUtils.htmlEntities(mxResources.get(v.dispName,null,v.dispName));break}mxEvent.addListener(y,"click",mxUtils.bind(u,function(){var e=document.createElement("select");d(y,e);for(var k=0;k<m.length;k++){var g= -m[k],n=document.createElement("option");n.value=mxUtils.htmlEntities(g.val);n.innerHTML=mxUtils.htmlEntities(mxResources.get(g.dispName,null,g.dispName));e.appendChild(n)}e.value=b;a.appendChild(e);mxEvent.addListener(e,"change",function(){var a=mxUtils.htmlEntities(e.value);f(c,a,p)});e.focus();mxEvent.addListener(e,"blur",function(){a.removeChild(e)})}))}else"dynamicArr"==A?y.appendChild(k(c,b,p.subType,p.subDefVal,p.countProperty,C,l)):"staticArr"==A?y.appendChild(g(c,b,p.subType,p.subDefVal,p.size, -C,l)):(y.innerHTML=b,mxEvent.addListener(y,"click",mxUtils.bind(u,function(){function e(){var a=k.value,a=0==a.length&&"string"!=A?0:a;p.allowAuto&&("auto"==a.trim().toLowerCase()?(a="auto",A="string"):(a=parseFloat(a),a=isNaN(a)?0:a));null!=p.min&&a<p.min?a=p.min:null!=p.max&&a>p.max&&(a=p.max);a=mxUtils.htmlEntities(("int"==A?parseInt(a):a)+"");f(c,a,p)}var k=document.createElement("input");d(y,k,!0);k.value=b;k.className="gePropEditor";"int"!=A&&"float"!=A||p.allowAuto||(k.type="number",k.step= -"int"==A?"1":"any",null!=p.min&&(k.min=parseFloat(p.min)),null!=p.max&&(k.max=parseFloat(p.max)));a.appendChild(k);mxEvent.addListener(k,"keypress",function(a){13==a.keyCode&&e()});k.focus();mxEvent.addListener(k,"blur",function(){e()})})));p.isDeletable&&(l=mxUtils.button("-",mxUtils.bind(u,function(a){f(c,"",p,p.index);mxEvent.consume(a)})),l.style.height="16px",l.style.width="25px",l.style["float"]="right",l.className="geColorBtn",y.appendChild(l));C.appendChild(y);return C}var u=this,q=this.editorUi.editor.graph, -l=[];a.style.position="relative";a.style.padding="0";var A=document.createElement("table");A.style.whiteSpace="nowrap";A.style.width="100%";var v=document.createElement("tr");v.className="gePropHeader";var y=document.createElement("th");y.className="gePropHeaderCell";var m=document.createElement("img");m.src=Sidebar.prototype.expandedImage;y.appendChild(m);mxUtils.write(y,mxResources.get("property"));v.style.cursor="pointer";var B=function(){var c=A.querySelectorAll(".gePropNonHeaderRow"),b;if(u.editorUi.propertiesCollapsed){m.src= -Sidebar.prototype.collapsedImage;b="none";for(var f=a.childNodes.length-1;0<=f;f--)try{var d=a.childNodes[f],e=d.nodeName.toUpperCase();"INPUT"!=e&&"SELECT"!=e||a.removeChild(d)}catch(I){}}else m.src=Sidebar.prototype.expandedImage,b="";for(f=0;f<c.length;f++)c[f].style.display=b};mxEvent.addListener(v,"click",function(){u.editorUi.propertiesCollapsed=!u.editorUi.propertiesCollapsed;B()});v.appendChild(y);y=document.createElement("th");y.className="gePropHeaderCell";y.innerHTML=mxResources.get("value"); -v.appendChild(y);A.appendChild(v);var r=!1,F=!1,E;for(E in c)if(v=c[E],"function"!=typeof v.isVisible||v.isVisible(b)){var t=null!=b.style[E]?mxUtils.htmlEntities(b.style[E]+""):v.defVal;if("separator"==v.type)F=!F;else{if("staticArr"==v.type)v.size=parseInt(b.style[v.sizeProperty]||c[v.sizeProperty].defVal)||0;else if(null!=v.dependentProps){for(var J=v.dependentProps,x=[],z=[],y=0;y<J.length;y++){var H=b.style[J[y]];z.push(c[J[y]].subDefVal);x.push(null!=H?H.split(","):[])}v.dependentPropsDefVal= -z;v.dependentPropsVals=x}A.appendChild(p(E,t,v,r,F));r=!r}}for(y=0;y<l.length;y++)for(v=l[y],c=v.parentRow,b=0;b<v.values.length;b++)E=p(v.name,v.values[b],{type:v.type,parentRow:v.parentRow,isDeletable:v.isDeletable,index:b,defVal:v.defVal,countProperty:v.countProperty,size:v.size},0==b%2,v.flipBkg),c.parentNode.insertBefore(E,c.nextSibling),c=E;a.appendChild(A);B();return a};StyleFormatPanel.prototype.addStyles=function(a){function c(a){function c(a){var c=mxUtils.button("",function(c){f.getModel().beginUpdate(); +"checkbox";d.checked="1"==c;mxEvent.addListener(d,"change",function(){f(a,d.checked?"1":"0",b)});return d}function p(c,b,p,q,l){var y=p.dispName,v=p.type,B=document.createElement("tr");B.className="gePropRow"+(l?"Dark":"")+(q?"Alt":"")+" gePropNonHeaderRow";B.setAttribute("data-pName",c);B.setAttribute("data-pValue",b);q=!1;null!=p.index&&(B.setAttribute("data-index",p.index),y=(null!=y?y:"")+"["+p.index+"]",q=!0);var z=document.createElement("td");z.className="gePropRowCell";z.innerHTML=mxUtils.htmlEntities(mxResources.get(y, +null,y));q&&(z.style.textAlign="right");B.appendChild(z);z=document.createElement("td");z.className="gePropRowCell";if("color"==v)z.appendChild(e(c,b,p));else if("bool"==v||"boolean"==v)z.appendChild(n(c,b,p));else if("enum"==v){var m=p.enumList;for(l=0;l<m.length;l++)if(y=m[l],y.val==b){z.innerHTML=mxUtils.htmlEntities(mxResources.get(y.dispName,null,y.dispName));break}mxEvent.addListener(z,"click",mxUtils.bind(u,function(){var e=document.createElement("select");d(z,e);for(var k=0;k<m.length;k++){var g= +m[k],n=document.createElement("option");n.value=mxUtils.htmlEntities(g.val);n.innerHTML=mxUtils.htmlEntities(mxResources.get(g.dispName,null,g.dispName));e.appendChild(n)}e.value=b;a.appendChild(e);mxEvent.addListener(e,"change",function(){var a=mxUtils.htmlEntities(e.value);f(c,a,p)});e.focus();mxEvent.addListener(e,"blur",function(){a.removeChild(e)})}))}else"dynamicArr"==v?z.appendChild(k(c,b,p.subType,p.subDefVal,p.countProperty,B,l)):"staticArr"==v?z.appendChild(g(c,b,p.subType,p.subDefVal,p.size, +B,l)):(z.innerHTML=b,mxEvent.addListener(z,"click",mxUtils.bind(u,function(){function e(){var a=k.value,a=0==a.length&&"string"!=v?0:a;p.allowAuto&&("auto"==a.trim().toLowerCase()?(a="auto",v="string"):(a=parseFloat(a),a=isNaN(a)?0:a));null!=p.min&&a<p.min?a=p.min:null!=p.max&&a>p.max&&(a=p.max);a=mxUtils.htmlEntities(("int"==v?parseInt(a):a)+"");f(c,a,p)}var k=document.createElement("input");d(z,k,!0);k.value=b;k.className="gePropEditor";"int"!=v&&"float"!=v||p.allowAuto||(k.type="number",k.step= +"int"==v?"1":"any",null!=p.min&&(k.min=parseFloat(p.min)),null!=p.max&&(k.max=parseFloat(p.max)));a.appendChild(k);mxEvent.addListener(k,"keypress",function(a){13==a.keyCode&&e()});k.focus();mxEvent.addListener(k,"blur",function(){e()})})));p.isDeletable&&(l=mxUtils.button("-",mxUtils.bind(u,function(a){f(c,"",p,p.index);mxEvent.consume(a)})),l.style.height="16px",l.style.width="25px",l.style["float"]="right",l.className="geColorBtn",z.appendChild(l));B.appendChild(z);return B}var u=this,q=this.editorUi.editor.graph, +l=[];a.style.position="relative";a.style.padding="0";var y=document.createElement("table");y.style.whiteSpace="nowrap";y.style.width="100%";var v=document.createElement("tr");v.className="gePropHeader";var z=document.createElement("th");z.className="gePropHeaderCell";var m=document.createElement("img");m.src=Sidebar.prototype.expandedImage;z.appendChild(m);mxUtils.write(z,mxResources.get("property"));v.style.cursor="pointer";var r=function(){var c=y.querySelectorAll(".gePropNonHeaderRow"),b;if(u.editorUi.propertiesCollapsed){m.src= +Sidebar.prototype.collapsedImage;b="none";for(var f=a.childNodes.length-1;0<=f;f--)try{var d=a.childNodes[f],e=d.nodeName.toUpperCase();"INPUT"!=e&&"SELECT"!=e||a.removeChild(d)}catch(I){}}else m.src=Sidebar.prototype.expandedImage,b="";for(f=0;f<c.length;f++)c[f].style.display=b};mxEvent.addListener(v,"click",function(){u.editorUi.propertiesCollapsed=!u.editorUi.propertiesCollapsed;r()});v.appendChild(z);z=document.createElement("th");z.className="gePropHeaderCell";z.innerHTML=mxResources.get("value"); +v.appendChild(z);y.appendChild(v);var C=!1,F=!1,E;for(E in c)if(v=c[E],"function"!=typeof v.isVisible||v.isVisible(b)){var t=null!=b.style[E]?mxUtils.htmlEntities(b.style[E]+""):v.defVal;if("separator"==v.type)F=!F;else{if("staticArr"==v.type)v.size=parseInt(b.style[v.sizeProperty]||c[v.sizeProperty].defVal)||0;else if(null!=v.dependentProps){for(var J=v.dependentProps,x=[],A=[],z=0;z<J.length;z++){var H=b.style[J[z]];A.push(c[J[z]].subDefVal);x.push(null!=H?H.split(","):[])}v.dependentPropsDefVal= +A;v.dependentPropsVals=x}y.appendChild(p(E,t,v,C,F));C=!C}}for(z=0;z<l.length;z++)for(v=l[z],c=v.parentRow,b=0;b<v.values.length;b++)E=p(v.name,v.values[b],{type:v.type,parentRow:v.parentRow,isDeletable:v.isDeletable,index:b,defVal:v.defVal,countProperty:v.countProperty,size:v.size},0==b%2,v.flipBkg),c.parentNode.insertBefore(E,c.nextSibling),c=E;a.appendChild(y);r();return a};StyleFormatPanel.prototype.addStyles=function(a){function c(a){function c(a){var c=mxUtils.button("",function(c){f.getModel().beginUpdate(); try{var b=f.getSelectionCells();for(c=0;c<b.length;c++){for(var d=f.getModel().getStyle(b[c]),k=0;k<e.length;k++)d=mxUtils.removeStylename(d,e[k]);var g=f.getModel().isVertex(b[c])?f.defaultVertexStyle:f.defaultEdgeStyle;null!=a?(d=mxUtils.setStyle(d,mxConstants.STYLE_GRADIENTCOLOR,a.gradient||mxUtils.getValue(g,mxConstants.STYLE_GRADIENTCOLOR,null)),d=""==a.fill?mxUtils.setStyle(d,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(d,mxConstants.STYLE_FILLCOLOR,a.fill||mxUtils.getValue(g,mxConstants.STYLE_FILLCOLOR, null)),d=""==a.stroke?mxUtils.setStyle(d,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(d,mxConstants.STYLE_STROKECOLOR,a.stroke||mxUtils.getValue(g,mxConstants.STYLE_STROKECOLOR,null)),f.getModel().isVertex(b[c])&&(d=mxUtils.setStyle(d,mxConstants.STYLE_FONTCOLOR,a.font||mxUtils.getValue(g,mxConstants.STYLE_FONTCOLOR,null)))):(d=mxUtils.setStyle(d,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(g,mxConstants.STYLE_FILLCOLOR,"#ffffff")),d=mxUtils.setStyle(d,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(g, mxConstants.STYLE_STROKECOLOR,"#000000")),d=mxUtils.setStyle(d,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(g,mxConstants.STYLE_GRADIENTCOLOR,null)),f.getModel().isVertex(b[c])&&(d=mxUtils.setStyle(d,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(g,mxConstants.STYLE_FONTCOLOR,null))));f.getModel().setStyle(b[c],d)}}finally{f.getModel().endUpdate()}});c.className="geStyleButton";c.style.width="36px";c.style.height="30px";c.style.margin="0px 6px 6px 0px";if(null!=a)null!=a.gradient?mxClient.IS_IE&& @@ -2879,14 +2879,14 @@ mxEvent.addListener(k,"click",mxUtils.bind(this,function(){this.editorUi.current function(a){this.editorUi.actions.get("editShape").funct()})),c.setAttribute("title",mxResources.get("editShape")),c.style.marginBottom="2px",null==b?c.style.width="202px":(b.style.width="100px",c.style.width="100px",c.style.marginLeft="2px"),a.appendChild(c)):c.image&&(c=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(a){this.editorUi.actions.get("image").funct()})),c.setAttribute("title",mxResources.get("editImage")),c.style.marginBottom="2px",null==b?c.style.width="202px": (b.style.width="100px",c.style.width="100px",c.style.marginLeft="2px"),a.appendChild(c));return a}}Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize= "3";Graph.prototype.edgeMode="move"!=urlParams.edge;var k=Graph.prototype.init;Graph.prototype.init=function(){function a(a){c=a;try{if(mxClient.IS_QUIRKS||7==document.documentMode||8==document.documentMode)c=document.createEventObject(a),c.type=a.type,c.canBubble=a.canBubble,c.cancelable=a.cancelable,c.view=a.view,c.detail=a.detail,c.screenX=a.screenX,c.screenY=a.screenY,c.clientX=a.clientX,c.clientY=a.clientY,c.ctrlKey=a.ctrlKey,c.altKey=a.altKey,c.shiftKey=a.shiftKey,c.metaKey=a.metaKey,c.button= -a.button,c.relatedTarget=a.relatedTarget}catch(K){}}k.apply(this,arguments);window.mxFreehand&&(this.freehand=new mxFreehand(this));var c=null;mxEvent.addListener(this.container,"mouseenter",a);mxEvent.addListener(this.container,"mousemove",a);mxEvent.addListener(this.container,"mouseleave",function(a){c=null});this.isMouseInsertPoint=function(){return null!=c};var b=this.getInsertPoint;this.getInsertPoint=function(){return null!=c?this.getPointForEvent(c):b.apply(this,arguments)};var f=this.layoutManager.getLayout; +a.button,c.relatedTarget=a.relatedTarget}catch(L){}}k.apply(this,arguments);window.mxFreehand&&(this.freehand=new mxFreehand(this));var c=null;mxEvent.addListener(this.container,"mouseenter",a);mxEvent.addListener(this.container,"mousemove",a);mxEvent.addListener(this.container,"mouseleave",function(a){c=null});this.isMouseInsertPoint=function(){return null!=c};var b=this.getInsertPoint;this.getInsertPoint=function(){return null!=c?this.getPointForEvent(c):b.apply(this,arguments)};var f=this.layoutManager.getLayout; this.layoutManager.getLayout=function(a){var c=this.graph.getCellStyle(a);if(null!=c){if("rack"==c.childLayout){var b=new mxStackLayout(this.graph,!1);b.gridSize=null!=c.rackUnitSize?parseFloat(c.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;b.fill=!0;b.marginLeft=c.marginLeft||0;b.marginRight=c.marginRight||0;b.marginTop=c.marginTop||0;b.marginBottom=c.marginBottom||0;b.allowGaps=c.allowGaps||0;b.resizeParent=!1;return b}if("undefined"!==typeof mxTableLayout&&"tableLayout"== c.childLayout)return b=new mxTableLayout(this.graph),b.rows=c.tableRows||2,b.columns=c.tableColumns||2,b.colPercentages=c.colPercentages,b.rowPercentages=c.rowPercentages,b.equalColumns="1"==mxUtils.getValue(c,"equalColumns",b.colPercentages?"0":"1"),b.equalRows="1"==mxUtils.getValue(c,"equalRows",b.rowPercentages?"0":"1"),b.resizeParent="1"==mxUtils.getValue(c,"resizeParent","1"),b.border=c.tableBorder||b.border,b.marginLeft=c.marginLeft||0,b.marginRight=c.marginRight||0,b.marginTop=c.marginTop|| 0,b.marginBottom=c.marginBottom||0,b.autoAddCol="1"==mxUtils.getValue(c,"autoAddCol","0"),b.autoAddRow="1"==mxUtils.getValue(c,"autoAddRow",b.autoAddCol?"0":"1"),b.colWidths=c.colWidths||"100",b.rowHeights=c.rowHeights||"50",b}return f.apply(this,arguments)}};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var a=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(a.ownerDocument)).decode(a)}return this.defaultStylesheet};var p=Graph.prototype.getSvg; Graph.prototype.getSvg=function(){var a=null;null!=this.themes&&"darkTheme"==this.defaultThemeName&&(a=this.stylesheet,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var c=p.apply(this,arguments);null!=a&&(this.stylesheet=a,this.refresh());return c};var n=Graph.prototype.isCssTransformsSupported;Graph.prototype.isCssTransformsSupported=function(){return n.apply(this,arguments)&&!mxClient.IS_SF};var g=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(a){var c= -g.apply(this,arguments);if(null==c){if(null==this.globalUrlVars&&null!=urlParams.vars)try{this.globalUrlVars=JSON.parse(decodeURIComponent(urlParams.vars))}catch(J){null!=window.console&&console.log("Error in vars URL parameter: "+J)}null!=this.globalUrlVars&&(c=this.globalUrlVars[a])}return c};var A=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){A.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var a=this.getDrawPane().parentNode; +g.apply(this,arguments);if(null==c){if(null==this.globalUrlVars&&null!=urlParams.vars)try{this.globalUrlVars=JSON.parse(decodeURIComponent(urlParams.vars))}catch(J){null!=window.console&&console.log("Error in vars URL parameter: "+J)}null!=this.globalUrlVars&&(c=this.globalUrlVars[a])}return c};var y=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){y.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var a=this.getDrawPane().parentNode; !this.graph.mathEnabled||mxClient.NO_FO||null!=this.webKitForceRepaintNode&&null!=this.webKitForceRepaintNode.parentNode||"svg"!=this.graph.container.firstChild.nodeName?null==this.webKitForceRepaintNode||this.graph.mathEnabled&&("svg"==this.graph.container.firstChild.nodeName||this.graph.container.firstChild==this.webKitForceRepaintNode)||(null!=this.webKitForceRepaintNode.parentNode&&this.webKitForceRepaintNode.parentNode.removeChild(this.webKitForceRepaintNode),this.webKitForceRepaintNode=null): -(this.webKitForceRepaintNode=document.createElement("div"),this.webKitForceRepaintNode.style.cssText="position:absolute;",a.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,a.ownerSVGElement))}};var y=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){y.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(a){if("data:action/json,"==a.substring(0,17)&&(a=JSON.parse(a.substring(17)),null!=a.actions)){for(var c=0;c< +(this.webKitForceRepaintNode=document.createElement("div"),this.webKitForceRepaintNode.style.cssText="position:absolute;",a.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,a.ownerSVGElement))}};var z=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){z.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(a){if("data:action/json,"==a.substring(0,17)&&(a=JSON.parse(a.substring(17)),null!=a.actions)){for(var c=0;c< a.actions.length;c++){var b=a.actions[c];if(null!=b.open)if(this.isCustomLink(b.open)){if(!this.customLinkClicked(b.open))return}else this.openLink(b.open)}this.model.beginUpdate();try{for(c=0;c<a.actions.length;c++)b=a.actions[c],null!=b.toggle&&this.toggleCells(this.getCellsForAction(b.toggle,!0)),null!=b.show&&this.setCellsVisible(this.getCellsForAction(b.show,!0),!0),null!=b.hide&&this.setCellsVisible(this.getCellsForAction(b.hide,!0),!1)}finally{this.model.endUpdate()}for(c=0;c<a.actions.length;c++){var b= a.actions[c],f=[];null!=b.select&&this.isEnabled()&&(f=this.getCellsForAction(b.select),this.setSelectionCells(f));null!=b.highlight&&(f=this.getCellsForAction(b.highlight),this.highlightCells(f,b.highlight.color,b.highlight.duration,b.highlight.opacity));null!=b.scroll&&(f=this.getCellsForAction(b.scroll));0<f.length&&this.scrollCellToVisible(f[0])}}};Graph.prototype.getCellsForAction=function(a,c){return this.getCellsById(a.cells).concat(this.getCellsForTags(a.tags,null,null,c))};Graph.prototype.getCellsById= function(a){var c=[];if(null!=a)for(var b=0;b<a.length;b++)if("*"==a[b])var f=this.getDefaultParent(),c=c.concat(this.model.filterDescendants(function(a){return a!=f},f));else{var d=this.model.getCell(a[b]);null!=d&&c.push(d)}return c};Graph.prototype.getCellsForTags=function(a,c,b,f){var d=[];if(null!=a){c=null!=c?c:this.model.getDescendants(this.model.getRoot());b=null!=b?b:"tags";for(var e=0,k={},g=0;g<a.length;g++)0<a[g].length&&(k[a[g].toLowerCase()]=!0,e++);for(g=0;g<c.length;g++)if(f&&this.model.getParent(c[g])== @@ -2906,31 +2906,31 @@ mxStencilRegistry.libraries["mockup/graphics"]=[SHAPES_PATH+"/mockup/mxMockupGra "/mockup/mxMockupText.js"];mxStencilRegistry.libraries.floorplan=[SHAPES_PATH+"/mxFloorplan.js",STENCIL_PATH+"/floorplan.xml"];mxStencilRegistry.libraries.bootstrap=[SHAPES_PATH+"/mxBootstrap.js",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.xml"];mxStencilRegistry.libraries.gcp2=[SHAPES_PATH+"/mxGCP2.js",STENCIL_PATH+"/gcp2.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];mxStencilRegistry.libraries.archimate= [SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.aws4=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+ "/aws4.xml"];mxStencilRegistry.libraries.aws4b=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.veeam=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam.xml"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors= -[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(a){var c=null;null!=a&&0<a.length&&("ER"==a.substring(0,2)?c="mxgraph.er":"sysML"==a.substring(0,5)&&(c="mxgraph.sysml"));return c};var u=mxMarker.createMarker;mxMarker.createMarker=function(a,c,b,f,d,e,k,g,n,p){if(null!=b&&null==mxMarker.markers[b]){var l=this.getPackageForType(b);null!=l&&mxStencilRegistry.getStencil(l)}return u.apply(this,arguments)};PrintDialog.prototype.create=function(a,c){function b(){A.value=Math.max(1, -Math.min(g,Math.max(parseInt(A.value),parseInt(v.value))));v.value=Math.max(1,Math.min(g,Math.min(parseInt(A.value),parseInt(v.value))))}function f(c){function b(c,b,d){var e=c.getGraphBounds(),k=0,g=0,n=ea.get(),p=1/c.pageScale,u=r.checked;if(u)var p=parseInt(N.value),l=parseInt(S.value),p=Math.min(n.height*l/(e.height/c.view.scale),n.width*p/(e.width/c.view.scale));else p=parseInt(m.value)/(100*c.pageScale),isNaN(p)&&(f=1/c.pageScale,m.value="100 %");n=mxRectangle.fromRectangle(n);n.width=Math.ceil(n.width* -f);n.height=Math.ceil(n.height*f);p*=f;!u&&c.pageVisible?(e=c.getPageLayout(),k-=e.x*n.width,g-=e.y*n.height):u=!0;if(null==b){b=PrintDialog.createPrintPreview(c,p,n,0,k,g,u);b.pageSelector=!1;b.mathEnabled=!1;c=a.getCurrentFile();null!=c&&(b.title=c.getTitle());var v=b.writeHead;b.writeHead=function(c){v.apply(this,arguments);null!=a.editor.fontCss&&(c.writeln('<style type="text/css">'),c.writeln(a.editor.fontCss),c.writeln("</style>"))};if("undefined"!==typeof MathJax){var A=b.renderPage;b.renderPage= -function(a,c,b,f,d,e){var k=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;var g=A.apply(this,arguments);mxClient.NO_FO=k;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:g.className="geDisableMathJax";return g}}b.open(null,null,d,!0)}else{n=c.background;if(null==n||""==n||n==mxConstants.NONE)n="#ffffff";b.backgroundColor=n;b.autoOrigin=u;b.appendGraph(c,p,k,g,d,!0)}return b}var f=parseInt(fa.value)/100;isNaN(f)&&(f= -1,fa.value="100 %");var f=.75*f,e=v.value,k=A.value,g=!u.checked,p=null;g&&(g=e==n&&k==n);if(!g&&null!=a.pages&&a.pages.length){var l=0,g=a.pages.length-1;u.checked||(l=parseInt(e)-1,g=parseInt(k)-1);for(var q=l;q<=g;q++){var y=a.pages[q],e=y==a.currentPage?d:null;if(null==e){var e=a.createTemporaryGraph(d.getStylesheet()),k=!0,l=!1,C=null,F=null;null==y.viewState&&null==y.root&&a.updatePageRoot(y);null!=y.viewState&&(k=y.viewState.pageVisible,l=y.viewState.mathEnabled,C=y.viewState.background,F= -y.viewState.backgroundImage);e.background=C;e.backgroundImage=null!=F?new mxImage(F.src,F.width,F.height):null;e.pageVisible=k;e.mathEnabled=l;var E=e.getGlobalVariable;e.getGlobalVariable=function(a){return"page"==a?y.getName():"pagenumber"==a?q+1:E.apply(this,arguments)};document.body.appendChild(e.container);a.updatePageRoot(y);e.model.setRoot(y.root)}p=b(e,p,q!=g);e!=d&&e.container.parentNode.removeChild(e.container)}}else p=b(d);null==p?a.handleError({message:mxResources.get("errorUpdatingPreview")}): +[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(a){var c=null;null!=a&&0<a.length&&("ER"==a.substring(0,2)?c="mxgraph.er":"sysML"==a.substring(0,5)&&(c="mxgraph.sysml"));return c};var u=mxMarker.createMarker;mxMarker.createMarker=function(a,c,b,f,d,e,k,g,n,p){if(null!=b&&null==mxMarker.markers[b]){var l=this.getPackageForType(b);null!=l&&mxStencilRegistry.getStencil(l)}return u.apply(this,arguments)};PrintDialog.prototype.create=function(a,c){function b(){v.value=Math.max(1, +Math.min(g,Math.max(parseInt(v.value),parseInt(y.value))));y.value=Math.max(1,Math.min(g,Math.min(parseInt(v.value),parseInt(y.value))))}function f(c){function b(c,b,d){var e=c.getGraphBounds(),k=0,g=0,n=ea.get(),p=1/c.pageScale,u=r.checked;if(u)var p=parseInt(N.value),l=parseInt(S.value),p=Math.min(n.height*l/(e.height/c.view.scale),n.width*p/(e.width/c.view.scale));else p=parseInt(m.value)/(100*c.pageScale),isNaN(p)&&(f=1/c.pageScale,m.value="100 %");n=mxRectangle.fromRectangle(n);n.width=Math.ceil(n.width* +f);n.height=Math.ceil(n.height*f);p*=f;!u&&c.pageVisible?(e=c.getPageLayout(),k-=e.x*n.width,g-=e.y*n.height):u=!0;if(null==b){b=PrintDialog.createPrintPreview(c,p,n,0,k,g,u);b.pageSelector=!1;b.mathEnabled=!1;c=a.getCurrentFile();null!=c&&(b.title=c.getTitle());var y=b.writeHead;b.writeHead=function(c){y.apply(this,arguments);null!=a.editor.fontCss&&(c.writeln('<style type="text/css">'),c.writeln(a.editor.fontCss),c.writeln("</style>"))};if("undefined"!==typeof MathJax){var v=b.renderPage;b.renderPage= +function(a,c,b,f,d,e){var k=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;var g=v.apply(this,arguments);mxClient.NO_FO=k;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:g.className="geDisableMathJax";return g}}b.open(null,null,d,!0)}else{n=c.background;if(null==n||""==n||n==mxConstants.NONE)n="#ffffff";b.backgroundColor=n;b.autoOrigin=u;b.appendGraph(c,p,k,g,d,!0)}return b}var f=parseInt(fa.value)/100;isNaN(f)&&(f= +1,fa.value="100 %");var f=.75*f,e=y.value,k=v.value,g=!u.checked,p=null;g&&(g=e==n&&k==n);if(!g&&null!=a.pages&&a.pages.length){var l=0,g=a.pages.length-1;u.checked||(l=parseInt(e)-1,g=parseInt(k)-1);for(var q=l;q<=g;q++){var z=a.pages[q],e=z==a.currentPage?d:null;if(null==e){var e=a.createTemporaryGraph(d.getStylesheet()),k=!0,l=!1,B=null,F=null;null==z.viewState&&null==z.root&&a.updatePageRoot(z);null!=z.viewState&&(k=z.viewState.pageVisible,l=z.viewState.mathEnabled,B=z.viewState.background,F= +z.viewState.backgroundImage);e.background=B;e.backgroundImage=null!=F?new mxImage(F.src,F.width,F.height):null;e.pageVisible=k;e.mathEnabled=l;var E=e.getGlobalVariable;e.getGlobalVariable=function(a){return"page"==a?z.getName():"pagenumber"==a?q+1:E.apply(this,arguments)};document.body.appendChild(e.container);a.updatePageRoot(z);e.model.setRoot(z.root)}p=b(e,p,q!=g);e!=d&&e.container.parentNode.removeChild(e.container)}}else p=b(d);null==p?a.handleError({message:mxResources.get("errorUpdatingPreview")}): (p.mathEnabled&&(g=p.wnd.document,g.writeln('<script type="text/x-mathjax-config">'),g.writeln("MathJax.Hub.Config({"),g.writeln("showMathMenu: false,"),g.writeln('messageStyle: "none",'),g.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],'),g.writeln('extensions: ["tex2jax.js", "mml2jax.js", "asciimath2jax.js"],'),g.writeln('"HTML-CSS": {'),g.writeln("imageFont: null"),g.writeln("},"),g.writeln("TeX: {"),g.writeln('extensions: ["AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js"]'), g.writeln("},"),g.writeln("tex2jax: {"),g.writeln('\tignoreClass: "geDisableMathJax"'),g.writeln("},"),g.writeln("asciimath2jax: {"),g.writeln('\tignoreClass: "geDisableMathJax"'),g.writeln("}"),g.writeln("});"),c&&(g.writeln("MathJax.Hub.Queue(function () {"),g.writeln("window.print();"),g.writeln("});")),g.writeln("\x3c/script>"),g.writeln('<script type="text/javascript" src="'+DRAW_MATH_URL+'/MathJax.js">\x3c/script>')),p.closeDocument(),!p.mathEnabled&&c&&PrintDialog.printPreview(p))}var d=a.editor.graph, e=document.createElement("div"),k=document.createElement("h3");k.style.width="100%";k.style.textAlign="center";k.style.marginTop="0px";mxUtils.write(k,c||mxResources.get("print"));e.appendChild(k);var g=1,n=1,p=document.createElement("div");p.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var u=document.createElement("input");u.style.cssText="margin-right:8px;margin-bottom:8px;";u.setAttribute("value","all");u.setAttribute("type","radio");u.setAttribute("name", -"pages-printdialog");p.appendChild(u);k=document.createElement("span");mxUtils.write(k,mxResources.get("printAllPages"));p.appendChild(k);mxUtils.br(p);var l=u.cloneNode(!0);u.setAttribute("checked","checked");l.setAttribute("value","range");p.appendChild(l);k=document.createElement("span");mxUtils.write(k,mxResources.get("pages")+":");p.appendChild(k);var v=document.createElement("input");v.style.cssText="margin:0 8px 0 8px;";v.setAttribute("value","1");v.setAttribute("type","number");v.setAttribute("min", -"1");v.style.width="50px";p.appendChild(v);k=document.createElement("span");mxUtils.write(k,mxResources.get("to"));p.appendChild(k);var A=v.cloneNode(!0);p.appendChild(A);mxEvent.addListener(v,"focus",function(){l.checked=!0});mxEvent.addListener(A,"focus",function(){l.checked=!0});mxEvent.addListener(v,"change",b);mxEvent.addListener(A,"change",b);if(null!=a.pages&&(g=a.pages.length,null!=a.currentPage))for(k=0;k<a.pages.length;k++)if(a.currentPage==a.pages[k]){n=k+1;v.value=n;A.value=n;break}v.setAttribute("max", -g);A.setAttribute("max",g);1<g&&e.appendChild(p);var q=document.createElement("div");q.style.marginBottom="10px";var y=document.createElement("input");y.style.marginRight="8px";y.setAttribute("value","adjust");y.setAttribute("type","radio");y.setAttribute("name","printZoom");q.appendChild(y);k=document.createElement("span");mxUtils.write(k,mxResources.get("adjustTo"));q.appendChild(k);var m=document.createElement("input");m.style.cssText="margin:0 8px 0 8px;";m.setAttribute("value","100 %");m.style.width= -"50px";q.appendChild(m);mxEvent.addListener(m,"focus",function(){y.checked=!0});e.appendChild(q);var p=p.cloneNode(!1),r=y.cloneNode(!0);r.setAttribute("value","fit");y.setAttribute("checked","checked");k=document.createElement("div");k.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";k.appendChild(r);p.appendChild(k);q=document.createElement("table");q.style.display="inline-block";var F=document.createElement("tbody"),E=document.createElement("tr"),t=E.cloneNode(!0), -B=document.createElement("td"),x=B.cloneNode(!0),z=B.cloneNode(!0),O=B.cloneNode(!0),H=B.cloneNode(!0),aa=B.cloneNode(!0);B.style.textAlign="right";O.style.textAlign="right";mxUtils.write(B,mxResources.get("fitTo"));var N=document.createElement("input");N.style.cssText="margin:0 8px 0 8px;";N.setAttribute("value","1");N.setAttribute("min","1");N.setAttribute("type","number");N.style.width="40px";x.appendChild(N);k=document.createElement("span");mxUtils.write(k,mxResources.get("fitToSheetsAcross")); -z.appendChild(k);mxUtils.write(O,mxResources.get("fitToBy"));var S=N.cloneNode(!0);H.appendChild(S);mxEvent.addListener(N,"focus",function(){r.checked=!0});mxEvent.addListener(S,"focus",function(){r.checked=!0});k=document.createElement("span");mxUtils.write(k,mxResources.get("fitToSheetsDown"));aa.appendChild(k);E.appendChild(B);E.appendChild(x);E.appendChild(z);t.appendChild(O);t.appendChild(H);t.appendChild(aa);F.appendChild(E);F.appendChild(t);q.appendChild(F);p.appendChild(q);e.appendChild(p); +"pages-printdialog");p.appendChild(u);k=document.createElement("span");mxUtils.write(k,mxResources.get("printAllPages"));p.appendChild(k);mxUtils.br(p);var l=u.cloneNode(!0);u.setAttribute("checked","checked");l.setAttribute("value","range");p.appendChild(l);k=document.createElement("span");mxUtils.write(k,mxResources.get("pages")+":");p.appendChild(k);var y=document.createElement("input");y.style.cssText="margin:0 8px 0 8px;";y.setAttribute("value","1");y.setAttribute("type","number");y.setAttribute("min", +"1");y.style.width="50px";p.appendChild(y);k=document.createElement("span");mxUtils.write(k,mxResources.get("to"));p.appendChild(k);var v=y.cloneNode(!0);p.appendChild(v);mxEvent.addListener(y,"focus",function(){l.checked=!0});mxEvent.addListener(v,"focus",function(){l.checked=!0});mxEvent.addListener(y,"change",b);mxEvent.addListener(v,"change",b);if(null!=a.pages&&(g=a.pages.length,null!=a.currentPage))for(k=0;k<a.pages.length;k++)if(a.currentPage==a.pages[k]){n=k+1;y.value=n;v.value=n;break}y.setAttribute("max", +g);v.setAttribute("max",g);1<g&&e.appendChild(p);var q=document.createElement("div");q.style.marginBottom="10px";var z=document.createElement("input");z.style.marginRight="8px";z.setAttribute("value","adjust");z.setAttribute("type","radio");z.setAttribute("name","printZoom");q.appendChild(z);k=document.createElement("span");mxUtils.write(k,mxResources.get("adjustTo"));q.appendChild(k);var m=document.createElement("input");m.style.cssText="margin:0 8px 0 8px;";m.setAttribute("value","100 %");m.style.width= +"50px";q.appendChild(m);mxEvent.addListener(m,"focus",function(){z.checked=!0});e.appendChild(q);var p=p.cloneNode(!1),r=z.cloneNode(!0);r.setAttribute("value","fit");z.setAttribute("checked","checked");k=document.createElement("div");k.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";k.appendChild(r);p.appendChild(k);q=document.createElement("table");q.style.display="inline-block";var F=document.createElement("tbody"),E=document.createElement("tr"),t=E.cloneNode(!0), +C=document.createElement("td"),x=C.cloneNode(!0),A=C.cloneNode(!0),O=C.cloneNode(!0),H=C.cloneNode(!0),aa=C.cloneNode(!0);C.style.textAlign="right";O.style.textAlign="right";mxUtils.write(C,mxResources.get("fitTo"));var N=document.createElement("input");N.style.cssText="margin:0 8px 0 8px;";N.setAttribute("value","1");N.setAttribute("min","1");N.setAttribute("type","number");N.style.width="40px";x.appendChild(N);k=document.createElement("span");mxUtils.write(k,mxResources.get("fitToSheetsAcross")); +A.appendChild(k);mxUtils.write(O,mxResources.get("fitToBy"));var S=N.cloneNode(!0);H.appendChild(S);mxEvent.addListener(N,"focus",function(){r.checked=!0});mxEvent.addListener(S,"focus",function(){r.checked=!0});k=document.createElement("span");mxUtils.write(k,mxResources.get("fitToSheetsDown"));aa.appendChild(k);E.appendChild(C);E.appendChild(x);E.appendChild(A);t.appendChild(O);t.appendChild(H);t.appendChild(aa);F.appendChild(E);F.appendChild(t);q.appendChild(F);p.appendChild(q);e.appendChild(p); p=document.createElement("div");k=document.createElement("div");k.style.fontWeight="bold";k.style.marginBottom="12px";mxUtils.write(k,mxResources.get("paperSize"));p.appendChild(k);k=document.createElement("div");k.style.marginBottom="12px";var ea=PageSetupDialog.addPageFormatPanel(k,"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);p.appendChild(k);k=document.createElement("span");mxUtils.write(k,mxResources.get("pageScale"));p.appendChild(k);var fa=document.createElement("input"); fa.style.cssText="margin:0 8px 0 8px;";fa.setAttribute("value","100 %");fa.style.width="60px";p.appendChild(fa);e.appendChild(p);k=document.createElement("div");k.style.cssText="text-align:right;margin:48px 0 0 0;";p=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});p.className="geBtn";a.editor.cancelFirst&&k.appendChild(p);a.isOffline()||(q=mxUtils.button(mxResources.get("help"),function(){d.openLink("https://desk.draw.io/support/solutions/articles/16000048947")}),q.className= "geBtn",k.appendChild(q));PrintDialog.previewEnabled&&(q=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();f(!1)}),q.className="geBtn",k.appendChild(q));q=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();f(!0)});q.className="geBtn gePrimaryBtn";k.appendChild(q);a.editor.cancelFirst||k.appendChild(p);e.appendChild(k);this.container=e};var F=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&& (this.page=this.ui.currentPage);this.page!=this.ui.currentPage?null!=this.page.viewState&&(this.ignoreColor||(this.page.viewState.background=this.color),this.ignoreImage||(this.page.viewState.backgroundImage=this.image),null!=this.format&&(this.page.viewState.pageFormat=this.format),null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled),null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)):(F.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!= this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible))};Editor.prototype.useCanvasForExport=!1;try{var v=document.createElement("canvas"),E=new Image;E.onload=function(){try{v.getContext("2d").drawImage(E,0,0);var a=v.toDataURL("image/png");Editor.prototype.useCanvasForExport= -null!=a&&6<a.length}catch(B){}};E.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(q){}})(); +null!=a&&6<a.length}catch(C){}};E.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(q){}})(); (function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,e,d){d.ui=a.ui;return e};a.afterDecode=function(a,e,d){d.previousColor=d.color;d.previousImage=d.image;d.previousFormat=d.format;null!=d.foldingEnabled&&(d.foldingEnabled=!d.foldingEnabled);null!=d.mathEnabled&&(d.mathEnabled=!d.mathEnabled);null!=d.shadowVisible&&(d.shadowVisible=!d.shadowVisible);return d};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="@DRAWIO-VERSION@";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.enableLogging="1"!=urlParams.stealth&&/.*\.draw\.io$/.test(window.location.hostname)&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost="https://www.draw.io";EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl="1"==urlParams.dev?"/cache":"https://rt.draw.io/cache";EditorUi.enablePlantUml= EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.scratchpadHelpLink="https://desk.draw.io/support/solutions/articles/16000042367";EditorUi.logError=function(a,b,d,e,n){if("1"==urlParams.dev)EditorUi.debug("logError",a,b,d,e,n);else if(EditorUi.enableLogging)try{if(a!=EditorUi.lastErrorMessage&&(null==a||null==b||-1==a.indexOf("Script error")&&-1==a.indexOf("extension"))&&null!=a&&0>a.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage= a;var c=0<=a.indexOf("NetworkError")||0<=a.indexOf("SecurityError")||0<=a.indexOf("NS_ERROR_FAILURE")||0<=a.indexOf("out of memory")?"CONFIG":"SEVERE",f=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";n=null!=n?n:Error(a);(new Image).src=f+"/log?severity="+c+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(a)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(d)+(null!=e?":colno:"+encodeURIComponent(e):"")+(null!=n&&null!=n.stack?"&stack="+ -encodeURIComponent(n.stack):"")}}catch(y){}};EditorUi.logEvent=function(a){if("1"==urlParams.dev)EditorUi.debug("logEvent",a);else if(EditorUi.enableLogging)try{var c=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=c+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=a?"&data="+encodeURIComponent(JSON.stringify(a)):"")}catch(k){}};EditorUi.sendReport=function(a,b){if("1"==urlParams.dev)EditorUi.debug("sendReport",a);else if(EditorUi.enableLogging)try{b=null!=b?b: +encodeURIComponent(n.stack):"")}}catch(z){}};EditorUi.logEvent=function(a){if("1"==urlParams.dev)EditorUi.debug("logEvent",a);else if(EditorUi.enableLogging)try{var c=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=c+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=a?"&data="+encodeURIComponent(JSON.stringify(a)):"")}catch(k){}};EditorUi.sendReport=function(a,b){if("1"==urlParams.dev)EditorUi.debug("sendReport",a);else if(EditorUi.enableLogging)try{b=null!=b?b: 5E4,a.length>b&&(a=a.substring(0,b)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(a))}catch(k){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.dev){for(var a=[(new Date).toISOString()],b=0;b<arguments.length;b++)a.push(arguments[b]);console.log.apply(console,a)}}catch(k){}};EditorUi.parsePng=function(a,b,d){function c(a,c){var b=e;e+=c;return a.substring(b, e)}function f(a){a=c(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}var e=0;if(c(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=d&&d();else if(c(a,4),"IHDR"!=c(a,4))null!=d&&d();else{c(a,17);do{d=f(a);var k=c(a,4);if(null!=b&&b(e-8,k,d))break;value=c(a,d);c(a,4);if("IEND"==k)break}while(d)}};EditorUi.removeChildNodes=function(a){for(;null!=a.firstChild;)a.removeChild(a.firstChild)};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>'; EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.timeout=Editor.prototype.timeout;EditorUi.prototype.sidebarFooterHeight=38;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;"; @@ -2944,13 +2944,13 @@ k.style.fontFamily="Helvetica, Arial",k.style.fontSize="9pt",k.style.padding="6p (e+="..."),k.innerHTML=e,d.appendChild(k),c.status=k,mxClient.IS_VML&&(null==document.documentMode||8>=document.documentMode)&&(k.style.left=Math.round(Math.max(0,a-k.offsetWidth/2))+"px",k.style.top=Math.round(Math.max(0,b+70-k.offsetHeight/2))+"px")),this.pause=mxUtils.bind(this,function(){var a=function(){};this.active&&(a=mxUtils.bind(this,function(){this.spin(d,e)}));this.stop();return a}),k=!0);return k};var e=c.stop;c.stop=function(){e.call(this);this.active=!1;null!=c.status&&(c.status.parentNode.removeChild(c.status), c.status=null)};c.pause=function(){return function(){}};return c};EditorUi.prototype.isCompatibleString=function(a){try{var c=mxUtils.parseXml(a),b=this.editor.extractGraphModel(c.documentElement,!0);return null!=b&&0==b.getElementsByTagName("parsererror").length}catch(p){}return!1};EditorUi.prototype.isVisioData=function(a){return 8<a.length&&208==a.charCodeAt(0)&&207==a.charCodeAt(1)&&17==a.charCodeAt(2)&&224==a.charCodeAt(3)&&161==a.charCodeAt(4)&&177==a.charCodeAt(5)&&26==a.charCodeAt(6)&&225== a.charCodeAt(7)||80==a.charCodeAt(0)&&75==a.charCodeAt(1)&&3==a.charCodeAt(2)&&4==a.charCodeAt(3)||80==a.charCodeAt(0)&&75==a.charCodeAt(1)&&3==a.charCodeAt(2)&&6==a.charCodeAt(3)};EditorUi.prototype.isPngData=function(a){return 8<a.length&&137==a.charCodeAt(0)&&80==a.charCodeAt(1)&&78==a.charCodeAt(2)&&71==a.charCodeAt(3)&&13==a.charCodeAt(4)&&10==a.charCodeAt(5)&&26==a.charCodeAt(6)&&10==a.charCodeAt(7)};var a=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml= -function(c){var b=a.apply(this,arguments);if(null==b)try{var d=c.indexOf("<mxfile ");if(0<=d){var e=c.lastIndexOf("</mxfile>");e>d&&(b=c.substring(d,e+15).replace(/>/g,">").replace(/</g,"<").replace(/\\"/g,'"').replace(/\n/g,""))}else var n=mxUtils.parseXml(c),g=this.editor.extractGraphModel(n.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility),b=null!=g?mxUtils.getXml(g):""}catch(A){}return b};EditorUi.prototype.validateFileData=function(a){if(null!= +function(c){var b=a.apply(this,arguments);if(null==b)try{var d=c.indexOf("<mxfile ");if(0<=d){var e=c.lastIndexOf("</mxfile>");e>d&&(b=c.substring(d,e+15).replace(/>/g,">").replace(/</g,"<").replace(/\\"/g,'"').replace(/\n/g,""))}else var n=mxUtils.parseXml(c),g=this.editor.extractGraphModel(n.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility),b=null!=g?mxUtils.getXml(g):""}catch(y){}return b};EditorUi.prototype.validateFileData=function(a){if(null!= a&&0<a.length){var c=a.indexOf('<meta charset="utf-8">');0<=c&&(a=a.slice(0,c)+'<meta charset="utf-8"/>'+a.slice(c+23-1,a.length));a=Graph.zapGremlins(a)}return a};EditorUi.prototype.replaceFileData=function(a){a=this.validateFileData(a);a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var c=null!=a?this.editor.extractGraphModel(a,!0):null;null!=c&&(a=c);if(null!=a){c=this.editor.graph;c.model.beginUpdate();try{var b=null!=this.pages?this.pages.slice():null,d=a.getElementsByTagName("diagram"); if("0"!=urlParams.pages||1<d.length||1==d.length&&d[0].hasAttribute("name")){this.fileNode=a;this.pages=null!=this.pages?this.pages:[];for(var e=d.length-1;0<=e;e--){var g=this.updatePageRoot(new DiagramPage(d[e]));null==g.getName()&&g.setName(mxResources.get("pageWithNumber",[e+1]));c.model.execute(new ChangePage(this,g,0==e?g:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=a.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")), -this.currentPage.setName(mxResources.get("pageWithNumber",[1])),c.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(a),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=b)for(e=0;e<b.length;e++)c.model.execute(new ChangePage(this,b[e],null))}finally{c.model.endUpdate()}}};EditorUi.prototype.createFileData=function(a,b,d,e,n,g,l,y,u,m,v){b=null!=b?b:this.editor.graph;n=null!=n?n:!1;u=null!=u?u:!0;var c,f=null;null== +this.currentPage.setName(mxResources.get("pageWithNumber",[1])),c.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(a),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=b)for(e=0;e<b.length;e++)c.model.execute(new ChangePage(this,b[e],null))}finally{c.model.endUpdate()}}};EditorUi.prototype.createFileData=function(a,b,d,e,n,g,l,z,u,m,v){b=null!=b?b:this.editor.graph;n=null!=n?n:!1;u=null!=u?u:!0;var c,f=null;null== d||d.getMode()==App.MODE_DEVICE||d.getMode()==App.MODE_BROWSER?c="_blank":f=c=e;if(null==a)return"";var k=a;if("mxfile"!=k.nodeName.toLowerCase()){if(v){var p=a.ownerDocument.createElement("diagram");p.setAttribute("id",Editor.guid());p.appendChild(a)}else{p=Graph.zapGremlins(mxUtils.getXml(a));k=Graph.compress(p);if(Graph.decompress(k)!=p)return p;p=a.ownerDocument.createElement("diagram");p.setAttribute("id",Editor.guid());mxUtils.setTextContent(p,k)}k=a.ownerDocument.createElement("mxfile");k.appendChild(p)}m? (k=k.cloneNode(!0),k.removeAttribute("userAgent"),k.removeAttribute("version"),k.removeAttribute("editor"),k.removeAttribute("type")):(k.removeAttribute("userAgent"),k.removeAttribute("version"),k.removeAttribute("editor"),k.removeAttribute("type"),k.setAttribute("modified",(new Date).toISOString()),k.setAttribute("host",window.location.hostname),k.setAttribute("agent",navigator.userAgent),k.setAttribute("version",EditorUi.VERSION),k.setAttribute("etag",Editor.guid()),a=null!=d?d.getMode():this.mode, -null!=a&&k.setAttribute("type",a),v&&k.setAttribute("compressed","false"));v=v?mxUtils.getPrettyXml(k):mxUtils.getXml(k);if(!g&&!n&&(l||null!=d&&/(\.html)$/i.test(d.getTitle())))v=this.getHtml2(mxUtils.getXml(k),b,null!=d?d.getTitle():null,c,f);else if(g||!n&&null!=d&&/(\.svg)$/i.test(d.getTitle()))null==d||d.getMode()!=App.MODE_DEVICE&&d.getMode()!=App.MODE_BROWSER||(e=null),v=this.getEmbeddedSvg(v,b,e,null,y,u,f);return v};EditorUi.prototype.getXmlFileData=function(a,b,d){a=null!=a?a:!0;b=null!= +null!=a&&k.setAttribute("type",a),v&&k.setAttribute("compressed","false"));v=v?mxUtils.getPrettyXml(k):mxUtils.getXml(k);if(!g&&!n&&(l||null!=d&&/(\.html)$/i.test(d.getTitle())))v=this.getHtml2(mxUtils.getXml(k),b,null!=d?d.getTitle():null,c,f);else if(g||!n&&null!=d&&/(\.svg)$/i.test(d.getTitle()))null==d||d.getMode()!=App.MODE_DEVICE&&d.getMode()!=App.MODE_BROWSER||(e=null),v=this.getEmbeddedSvg(v,b,e,null,z,u,f);return v};EditorUi.prototype.getXmlFileData=function(a,b,d){a=null!=a?a:!0;b=null!= b?b:!1;var c=this.editor.getGraphXml(a);if(a&&null!=this.fileNode&&null!=this.currentPage)if(d?(EditorUi.removeChildNodes(this.currentPage.node),this.currentPage.node.appendChild(c)):(c=Graph.compressNode(c),mxUtils.setTextContent(this.currentPage.node,c)),c=this.fileNode.cloneNode(!1),b)c.appendChild(this.currentPage.node);else for(b=0;b<this.pages.length;b++)this.currentPage!=this.pages[b]&&(this.pages[b].needsUpdate?(a=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(this.pages[b].root)), this.editor.graph.saveViewState(this.pages[b].viewState,a),d?(EditorUi.removeChildNodes(this.pages[b].node),this.pages[b].node.appendChild(a)):mxUtils.setTextContent(this.pages[b].node,Graph.compressNode(a)),delete this.pages[b].needsUpdate):d&&(a=Editor.parseDiagramNode(this.pages[b].node),EditorUi.removeChildNodes(this.pages[b].node),this.pages[b].node.appendChild(a))),c.appendChild(this.pages[b].node);return c};EditorUi.prototype.anonymizeString=function(a,b){for(var c=[],f=0;f<a.length;f++){var d= a.charAt(f);0<=EditorUi.ignoredAnonymizedChars.indexOf(d)?c.push(d):isNaN(parseInt(d))?d.toLowerCase()!=d?c.push(String.fromCharCode(65+Math.round(25*Math.random()))):d.toUpperCase()!=d?c.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(d)?c.push(" "):c.push("?"):c.push(b?"0":Math.round(9*Math.random()))}return c.join("")};EditorUi.prototype.anonymizePatch=function(a){if(null!=a[EditorUi.DIFF_INSERT])for(var c=0;c<a[EditorUi.DIFF_INSERT].length;c++)try{var b=mxUtils.parseXml(a[EditorUi.DIFF_INSERT][c].data).documentElement.cloneNode(!1); @@ -2959,8 +2959,8 @@ null!=c[b].xmlValue&&(c[b].xmlValue="["+c[b].xmlValue.length+"]"),null!=c[b].sty b){if(null!=a.attributes)for(var c=0;c<a.attributes.length;c++)"as"!=a.attributes[c].name&&a.setAttribute(a.attributes[c].name,this.anonymizeString(a.attributes[c].value,b));if(null!=a.childNodes)for(c=0;c<a.childNodes.length;c++)this.anonymizeAttributes(a.childNodes[c],b)};EditorUi.prototype.anonymizeNode=function(a,b){for(var c=a.getElementsByTagName("mxCell"),f=0;f<c.length;f++)null!=c[f].getAttribute("value")&&c[f].setAttribute("value","["+c[f].getAttribute("value").length+"]"),null!=c[f].getAttribute("xmlValue")&& c[f].setAttribute("xmlValue","["+c[f].getAttribute("xmlValue").length+"]"),null!=c[f].getAttribute("style")&&c[f].setAttribute("style","["+c[f].getAttribute("style").length+"]"),null!=c[f].parentNode&&"root"!=c[f].parentNode.nodeName&&null!=c[f].parentNode.parentNode&&(c[f].setAttribute("id",c[f].parentNode.getAttribute("id")),c[f].parentNode.parentNode.replaceChild(c[f],c[f].parentNode));return a};EditorUi.prototype.synchronizeCurrentFile=function(a){var c=this.getCurrentFile();null!=c&&(c.savingFile? this.handleError({message:mxResources.get("busy")}):!a&&c.invalidChecksum?c.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(c.clearAutosave(),this.editor.setStatus(""),a?c.reloadFile(mxUtils.bind(this,function(){c.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){c.handleFileError(a,!0)})):c.synchronizeFile(mxUtils.bind(this,function(){c.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){c.handleFileError(a, -!0)}))))};EditorUi.prototype.getFileData=function(a,b,d,e,n,g,l,y,u,m){n=null!=n?n:!0;l=null!=l?l:this.getXmlFileData(n,null!=g?g:!1,m);u=null!=u?u:this.getCurrentFile();g=this.editor.graph;if(null!=this.pages&&this.currentPage!=this.pages[0]&&(b||!a&&null!=u&&/(\.svg)$/i.test(u.getTitle()))){g=this.createTemporaryGraph(g.getStylesheet());var c=g.getGlobalVariable,f=this.pages[0];g.getGlobalVariable=function(a){return"page"==a?f.getName():"pagenumber"==a?1:c.apply(this,arguments)};document.body.appendChild(g.container); -g.model.setRoot(f.root)}a=this.createFileData(l,g,u,window.location.href,a,b,d,e,n,y,m);g!=this.editor.graph&&g.container.parentNode.removeChild(g.container);return a};EditorUi.prototype.getHtml=function(a,b,d,e,n,g){g=null!=g?g:!0;var c=null,f=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=b){var c=g?b.getGraphBounds():b.getBoundingBox(b.getSelectionCells()),k=b.view.scale;g=Math.floor(c.x/k-b.view.translate.x);k=Math.floor(c.y/k-b.view.translate.y);c=b.background;null==n&&(b=this.getBasenames().join(";"), +!0)}))))};EditorUi.prototype.getFileData=function(a,b,d,e,n,g,l,z,u,m){n=null!=n?n:!0;l=null!=l?l:this.getXmlFileData(n,null!=g?g:!1,m);u=null!=u?u:this.getCurrentFile();g=this.editor.graph;if(null!=this.pages&&this.currentPage!=this.pages[0]&&(b||!a&&null!=u&&/(\.svg)$/i.test(u.getTitle()))){g=this.createTemporaryGraph(g.getStylesheet());var c=g.getGlobalVariable,f=this.pages[0];g.getGlobalVariable=function(a){return"page"==a?f.getName():"pagenumber"==a?1:c.apply(this,arguments)};document.body.appendChild(g.container); +g.model.setRoot(f.root)}a=this.createFileData(l,g,u,window.location.href,a,b,d,e,n,z,m);g!=this.editor.graph&&g.container.parentNode.removeChild(g.container);return a};EditorUi.prototype.getHtml=function(a,b,d,e,n,g){g=null!=g?g:!0;var c=null,f=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=b){var c=g?b.getGraphBounds():b.getBoundingBox(b.getSelectionCells()),k=b.view.scale;g=Math.floor(c.x/k-b.view.translate.x);k=Math.floor(c.y/k-b.view.translate.y);c=b.background;null==n&&(b=this.getBasenames().join(";"), 0<b.length&&(f=EditorUi.drawHost+"/embed.js?s="+b));a.setAttribute("x0",g);a.setAttribute("y0",k)}null!=a&&(a.setAttribute("pan","1"),a.setAttribute("zoom","1"),a.setAttribute("resize","0"),a.setAttribute("fit","0"),a.setAttribute("border","20"),a.setAttribute("links","1"),null!=e&&a.setAttribute("edit",e));null!=n&&(n=n.replace(/&/g,"&"));a=null!=a?Graph.zapGremlins(mxUtils.getXml(a)):"";e=Graph.compress(a);Graph.decompress(e)!=a&&(e=encodeURIComponent(a));return(null==n?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n': "")+"<!DOCTYPE html>\n<html"+(null!=n?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==n?null!=d?"<title>"+mxUtils.htmlEntities(d)+"</title>\n":"":"<title>Draw.io Diagram</title>\n")+(null!=n?'<meta http-equiv="refresh" content="0;URL=\''+n+"'\"/>\n":"")+"</head>\n<body"+(null==n&&null!=c&&c!=mxConstants.NONE?' style="background-color:'+c+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+e+ "</div>\n</div>\n"+(null==n?'<script type="text/javascript" src="'+f+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+n+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(a,b,d,e,n){b=EditorUi.drawHost+"/js/viewer.min.js";null!=n&&(n=n.replace(/&/g,"&"));a={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:Graph.zapGremlins(a), @@ -2969,26 +2969,26 @@ toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&& this.validateFileData(a);this.pages=this.fileNode=this.currentPage=null;a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var c=null!=a?a.getElementsByTagName("parsererror"):null;if(null!=c&&0<c.length)throw a=mxResources.get("invalidOrMissingFile"),c=c[0].getElementsByTagName("div"),0<c.length&&(a=mxUtils.getTextContent(c[0])),Error(a);c=null!=a?this.editor.extractGraphModel(a,!0):null;null!=c&&(a=c);if(null!=a&&"mxfile"==a.nodeName&&(c=a.getElementsByTagName("diagram"),"0"!=urlParams.pages|| 1<c.length||1==c.length&&c[0].hasAttribute("name"))){var b=null;this.fileNode=a;this.pages=[];for(a=0;a<c.length;a++){null==c[a].getAttribute("id")&&c[a].setAttribute("id",a);var d=new DiagramPage(c[a]);null==d.getName()&&d.setName(mxResources.get("pageWithNumber",[a+1]));this.pages.push(d);null!=urlParams["page-id"]&&d.getId()==urlParams["page-id"]&&(b=d)}this.currentPage=null!=b?b:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];a=this.currentPage.node}"0"!=urlParams.pages&& null==this.fileNode&&null!=a&&(this.fileNode=a.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(a);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root)};EditorUi.prototype.getBaseFilename=function(a){var c=this.getCurrentFile(),c=null!=c&&null!=c.getTitle()?c.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(c)|| -/(\.html)$/i.test(c)||/(\.svg)$/i.test(c)||/(\.png)$/i.test(c)||/(\.drawio)$/i.test(c))c=c.substring(0,c.lastIndexOf("."));!a&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(c=c+"-"+this.currentPage.getName());return c};EditorUi.prototype.downloadFile=function(a,b,d,e,n,g,l,y,u){try{e=null!=e?e:this.editor.graph.isSelectionEmpty();var c=this.getBaseFilename(!n),f=c+"."+a;if("xml"==a){var k='<?xml version="1.0" encoding="UTF-8"?>\n'+ +/(\.html)$/i.test(c)||/(\.svg)$/i.test(c)||/(\.png)$/i.test(c)||/(\.drawio)$/i.test(c))c=c.substring(0,c.lastIndexOf("."));!a&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(c=c+"-"+this.currentPage.getName());return c};EditorUi.prototype.downloadFile=function(a,b,d,e,n,g,l,z,u){try{e=null!=e?e:this.editor.graph.isSelectionEmpty();var c=this.getBaseFilename(!n),f=c+"."+a;if("xml"==a){var k='<?xml version="1.0" encoding="UTF-8"?>\n'+ this.getFileData(!0,null,null,null,e,n,null,null,null,b);this.saveData(f,a,k,"text/xml")}else if("html"==a)k=this.getHtml2(this.getFileData(!0),this.editor.graph,c),this.saveData(f,a,k,"text/html");else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==a?f=c+".png":"jpeg"==a&&(f=c+".jpg"),this.saveRequest(f,a,mxUtils.bind(this,function(c,b){try{var f=this.editor.graph.pageVisible;null!=g&&(this.editor.graph.pageVisible=g);var d=this.createDownloadRequest(c, -a,e,b,l,n,y,u);this.editor.graph.pageVisible=f;return d}catch(M){this.handleError(M)}}));else{var p=null,A=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(f,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(p)}))});if("svg"==a){var m=this.editor.graph.background;if(l||m==mxConstants.NONE)m=null;var r=this.editor.graph.getSvg(m,null,null,null,null,e);d&&this.editor.graph.addSvgShadow(r); -this.convertImages(r,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();A('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a))})))}else f=c+".svg",p=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();A(a)}),e)}}catch(G){this.handleError(G)}};EditorUi.prototype.createDownloadRequest=function(a,b,d,e,n,g,l,y){var c=this.editor.graph.getGraphBounds(); +a,e,b,l,n,z,u);this.editor.graph.pageVisible=f;return d}catch(M){this.handleError(M)}}));else{var p=null,y=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(f,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(p)}))});if("svg"==a){var m=this.editor.graph.background;if(l||m==mxConstants.NONE)m=null;var r=this.editor.graph.getSvg(m,null,null,null,null,e);d&&this.editor.graph.addSvgShadow(r); +this.convertImages(r,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();y('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a))})))}else f=c+".svg",p=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();y(a)}),e)}}catch(G){this.handleError(G)}};EditorUi.prototype.createDownloadRequest=function(a,b,d,e,n,g,l,z){var c=this.editor.graph.getGraphBounds(); d=this.getFileData(!0,null,null,null,d,0==g?!1:"xmlpng"!=b);var f="",k="";if(c.width*c.height>MAX_AREA||d.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};c="0";"pdf"==b&&0==g&&(k="&allPages=1");if("xmlpng"==b&&(c="1",b="png",null!=this.pages&&null!=this.currentPage))for(g=0;g<this.pages.length;g++)if(this.pages[g]==this.currentPage){f="&from="+g;break}g=this.editor.graph.background;"png"==b&&n?g=mxConstants.NONE:n||null!=g&&g!=mxConstants.NONE||(g="#ffffff");return new mxXmlRequest(EXPORT_URL, -"format="+b+f+k+"&bg="+(null!=g?g:mxConstants.NONE)+"&base64="+e+"&embedXml="+c+"&xml="+encodeURIComponent(d)+(null!=a?"&filename="+encodeURIComponent(a):"")+(null!=l?"&scale="+l:"")+(null!=y?"&border="+y:""))};EditorUi.prototype.setMode=function(a,b){this.mode=a};EditorUi.prototype.loadDescriptor=function(a,b,d){var c=window.location.hash,f=mxUtils.bind(this,function(f){var d=null!=a.data?a.data:"";null!=f&&0<f.length&&(0<d.length&&(d+="\n"),d+=f);f=new LocalFile(this,"csv"!=a.format&&0<d.length? +"format="+b+f+k+"&bg="+(null!=g?g:mxConstants.NONE)+"&base64="+e+"&embedXml="+c+"&xml="+encodeURIComponent(d)+(null!=a?"&filename="+encodeURIComponent(a):"")+(null!=l?"&scale="+l:"")+(null!=z?"&border="+z:""))};EditorUi.prototype.setMode=function(a,b){this.mode=a};EditorUi.prototype.loadDescriptor=function(a,b,d){var c=window.location.hash,f=mxUtils.bind(this,function(f){var d=null!=a.data?a.data:"";null!=f&&0<f.length&&(0<d.length&&(d+="\n"),d+=f);f=new LocalFile(this,"csv"!=a.format&&0<d.length? d:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);f.getHash=function(){return c};this.fileLoaded(f);"csv"==a.format&&this.importCsv(d,mxUtils.bind(this,function(a){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=a.update){var e=null!=a.interval?parseInt(a.interval):6E4,k=null,g=mxUtils.bind(this,function(){var c=this.currentPage;mxUtils.post(a.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())), mxUtils.bind(this,function(a){c===this.currentPage&&(200<=a.getStatus()&&300>=a.getStatus()?(this.updateDiagram(a.getText()),n()):this.handleError({message:mxResources.get("error")+" "+a.getStatus()}))}),mxUtils.bind(this,function(a){this.handleError(a)}))}),n=mxUtils.bind(this,function(){window.clearTimeout(k);k=window.setTimeout(g,e)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){n();g()}));n();g()}null!=b&&b()});if(null!=a.url&&0<a.url.length){var e=a.url;/^https?:\/\//.test(e)&& !this.editor.isCorsEnabledForUrl(e)&&(e=PROXY_URL+"?url="+encodeURIComponent(e));this.loadUrl(e,mxUtils.bind(this,function(a){f(a)}),mxUtils.bind(this,function(a){null!=d&&d(a)}))}else f("")};EditorUi.prototype.updateDiagram=function(a){function c(a){var c=new mxCellOverlay(a.image||e.warningImage,a.tooltip,a.align,a.valign,a.offset);c.addListener(mxEvent.CLICK,function(c,b){d.alert(a.tooltip)});return c}var b=null,d=this;if(null!=a&&0<a.length&&(b=mxUtils.parseXml(a),a=null!=b?b.documentElement: -null,null!=a&&"updates"==a.nodeName)){var e=this.editor.graph,g=e.getModel();g.beginUpdate();var l=null;try{for(a=a.firstChild;null!=a;){if("update"==a.nodeName){var y=g.getCell(a.getAttribute("id"));if(null!=y){try{var u=a.getAttribute("value");if(null!=u){var m=mxUtils.parseXml(u).documentElement;if(null!=m)if("1"==m.getAttribute("replace-value"))g.setValue(y,m);else for(var v=m.attributes,r=0;r<v.length;r++)e.setAttributeForCell(y,v[r].nodeName,0<v[r].nodeValue.length?v[r].nodeValue:null)}}catch(L){null!= -window.console&&console.log("Error in value for "+y.id+": "+L)}try{var q=a.getAttribute("style");null!=q&&e.model.setStyle(y,q)}catch(L){null!=window.console&&console.log("Error in style for "+y.id+": "+L)}try{var t=a.getAttribute("icon");if(null!=t){var x=0<t.length?JSON.parse(t):null;null!=x&&x.append||e.removeCellOverlays(y);null!=x&&e.addCellOverlay(y,c(x))}}catch(L){null!=window.console&&console.log("Error in icon for "+y.id+": "+L)}try{var z=a.getAttribute("geometry");if(null!=z){var z=JSON.parse(z), -G=e.getCellGeometry(y);if(null!=G){G=G.clone();for(key in z){var K=parseFloat(z[key]);"dx"==key?G.x+=K:"dy"==key?G.y+=K:"dw"==key?G.width+=K:"dh"==key?G.height+=K:G[key]=parseFloat(z[key])}e.model.setGeometry(y,G)}}}catch(L){null!=window.console&&console.log("Error in icon for "+y.id+": "+L)}}}else if("model"==a.nodeName){for(var C=a.firstChild;null!=C&&C.nodeType!=mxConstants.NODETYPE_ELEMENT;)C=C.nextSibling;null!=C&&(new mxCodec(a.firstChild)).decode(C,g)}else if("view"==a.nodeName){if(a.hasAttribute("scale")&& +null,null!=a&&"updates"==a.nodeName)){var e=this.editor.graph,g=e.getModel();g.beginUpdate();var l=null;try{for(a=a.firstChild;null!=a;){if("update"==a.nodeName){var z=g.getCell(a.getAttribute("id"));if(null!=z){try{var u=a.getAttribute("value");if(null!=u){var m=mxUtils.parseXml(u).documentElement;if(null!=m)if("1"==m.getAttribute("replace-value"))g.setValue(z,m);else for(var v=m.attributes,r=0;r<v.length;r++)e.setAttributeForCell(z,v[r].nodeName,0<v[r].nodeValue.length?v[r].nodeValue:null)}}catch(K){null!= +window.console&&console.log("Error in value for "+z.id+": "+K)}try{var q=a.getAttribute("style");null!=q&&e.model.setStyle(z,q)}catch(K){null!=window.console&&console.log("Error in style for "+z.id+": "+K)}try{var t=a.getAttribute("icon");if(null!=t){var x=0<t.length?JSON.parse(t):null;null!=x&&x.append||e.removeCellOverlays(z);null!=x&&e.addCellOverlay(z,c(x))}}catch(K){null!=window.console&&console.log("Error in icon for "+z.id+": "+K)}try{var A=a.getAttribute("geometry");if(null!=A){var A=JSON.parse(A), +G=e.getCellGeometry(z);if(null!=G){G=G.clone();for(key in A){var L=parseFloat(A[key]);"dx"==key?G.x+=L:"dy"==key?G.y+=L:"dw"==key?G.width+=L:"dh"==key?G.height+=L:G[key]=parseFloat(A[key])}e.model.setGeometry(z,G)}}}catch(K){null!=window.console&&console.log("Error in icon for "+z.id+": "+K)}}}else if("model"==a.nodeName){for(var B=a.firstChild;null!=B&&B.nodeType!=mxConstants.NODETYPE_ELEMENT;)B=B.nextSibling;null!=B&&(new mxCodec(a.firstChild)).decode(B,g)}else if("view"==a.nodeName){if(a.hasAttribute("scale")&& (e.view.scale=parseFloat(a.getAttribute("scale"))),a.hasAttribute("dx")||a.hasAttribute("dy"))e.view.translate=new mxPoint(parseFloat(a.getAttribute("dx")||0),parseFloat(a.getAttribute("dy")||0))}else"fit"==a.nodeName&&(l=a.hasAttribute("max-scale")?parseFloat(a.getAttribute("max-scale")):1);a=a.nextSibling}}finally{g.endUpdate()}null!=l&&this.chromelessResize&&this.chromelessResize(!0,l)}return b};EditorUi.prototype.getCopyFilename=function(a,b){var c=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename, f="",d=c.lastIndexOf(".");0<=d&&(f=c.substring(d),c=c.substring(0,d));if(b)var e=new Date,d=e.getFullYear(),l=e.getMonth()+1,m=e.getDate(),u=e.getHours(),r=e.getMinutes(),e=e.getSeconds(),c=c+(" "+(d+"-"+l+"-"+m+"-"+u+"-"+r+"-"+e));return c=mxResources.get("copyOf",[c])+f};EditorUi.prototype.fileLoaded=function(a,b){var c=this.getCurrentFile();this.fileLoadedError=null;this.setCurrentFile(null);var f=!1;this.hideDialog();null!=c&&(c.removeListener(this.descriptorChangedListener),c.close());this.editor.graph.model.clear(); this.editor.undoManager.clear();var d=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=c&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);!b&&null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerHTML="",this.fname.setAttribute("title",mxResources.get("rename")));this.editor.setStatus(""); this.updateUi();b||this.showSplash()});if(null!=a)try{mxClient.IS_SF&&"min"==uiTheme&&(this.diagramContainer.style.visibility="");this.openingFile=!0;this.setCurrentFile(a);a.addListener("descriptorChanged",this.descriptorChangedListener);a.addListener("contentChanged",this.descriptorChangedListener);a.open();delete this.openingFile;this.setGraphEnabled(!0);this.setMode(a.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();this.updateUi(); a.isEditable()?a.isModified()?(a.addUnsavedStatus(),null!=a.backupPatch&&a.patch([a.backupPatch])):this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert" style="margin-left:8px;">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>");!this.editor.isChromelessView()||this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit(); -this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));f=!0;this.isOffline()||null==a.getMode()||EditorUi.logEvent({category:a.getMode().toUpperCase()+"-OPEN-FILE-"+a.getHash(),action:"size_"+a.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")});if(this.editor.editable&&this.mode==a.getMode()&&a.getMode()!=App.MODE_DEVICE&&null!=a.getMode())try{this.addRecent({id:a.getHash(),title:a.getTitle(),mode:a.getMode()})}catch(A){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+ -1),mxSettings.save()}catch(A){}}catch(A){this.fileLoadedError=A;null!=window.console&&(console.error(A),console.log("error in fileLoaded:",a,A));if(EditorUi.enableLogging&&!this.isOffline())try{(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?v="+encodeURIComponent(EditorUi.VERSION)+"&msg=errorInFileLoaded:url:"+encodeURIComponent(window.location.href)+(null!=A&&null!=A.message?":err:"+encodeURIComponent(A.message):"")+(null!=A&&null!=A.stack?"&stack="+encodeURIComponent(A.stack): -"")}catch(y){}var e=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=c?this.fileLoaded(c):d()});b?e():this.handleError(A,mxResources.get("errorLoadingFile"),e,!0)}else d();return f};EditorUi.prototype.getHashValueForPages=function(a,b){var c=0,f=new mxGraphModel,d=new mxCodec;null!=b&&(b.byteCount=0,b.attrCount=0,b.eltCount=0,b.nodeCount=0);for(var e=0;e<a.length;e++){this.updatePageRoot(a[e]); +this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));f=!0;this.isOffline()||null==a.getMode()||EditorUi.logEvent({category:a.getMode().toUpperCase()+"-OPEN-FILE-"+a.getHash(),action:"size_"+a.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")});if(this.editor.editable&&this.mode==a.getMode()&&a.getMode()!=App.MODE_DEVICE&&null!=a.getMode())try{this.addRecent({id:a.getHash(),title:a.getTitle(),mode:a.getMode()})}catch(y){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+ +1),mxSettings.save()}catch(y){}}catch(y){this.fileLoadedError=y;null!=window.console&&(console.error(y),console.log("error in fileLoaded:",a,y));if(EditorUi.enableLogging&&!this.isOffline())try{(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?v="+encodeURIComponent(EditorUi.VERSION)+"&msg=errorInFileLoaded:url:"+encodeURIComponent(window.location.href)+(null!=y&&null!=y.message?":err:"+encodeURIComponent(y.message):"")+(null!=y&&null!=y.stack?"&stack="+encodeURIComponent(y.stack): +"")}catch(z){}var e=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=c?this.fileLoaded(c):d()});b?e():this.handleError(y,mxResources.get("errorLoadingFile"),e,!0)}else d();return f};EditorUi.prototype.getHashValueForPages=function(a,b){var c=0,f=new mxGraphModel,d=new mxCodec;null!=b&&(b.byteCount=0,b.attrCount=0,b.eltCount=0,b.nodeCount=0);for(var e=0;e<a.length;e++){this.updatePageRoot(a[e]); var l=a[e].node.cloneNode(!1);l.removeAttribute("name");f.root=a[e].root;var m=d.encode(f);this.editor.graph.saveViewState(a[e].viewState,m,!0);m.removeAttribute("pageWidth");m.removeAttribute("pageHeight");l.appendChild(m);null!=b&&(b.eltCount+=l.getElementsByTagName("*").length,b.nodeCount+=l.getElementsByTagName("mxCell").length);c=(c<<5)-c+this.hashValue(l,function(a,c,b,f){return!f||"mxGeometry"!=a.nodeName&&"mxPoint"!=a.nodeName||"x"!=c&&"y"!=c&&"width"!=c&&"height"!=c?f&&"mxCell"==a.nodeName&& "previous"==c?null:b:Math.round(b)},b)<<0}return c};EditorUi.prototype.hashValue=function(a,b,d){var c=0;if(null!=a&&"object"===typeof a&&"number"===typeof a.nodeType&&"string"===typeof a.nodeName&&"function"===typeof a.getAttribute){null!=a.nodeName&&(c^=this.hashValue(a.nodeName,b,d));if(null!=a.attributes){null!=d&&(d.attrCount+=a.attributes.length);for(var f=0;f<a.attributes.length;f++){var e=a.attributes[f].name,k=null!=b?b(a,e,a.attributes[f].value,!0):a.attributes[f].value;null!=k&&(c^=this.hashValue(e, b,d)+this.hashValue(k,b,d))}}if(null!=a.childNodes)for(f=0;f<a.childNodes.length;f++)c=(c<<5)-c+this.hashValue(a.childNodes[f],b,d)<<0}else if(null!=a&&"function"!==typeof a){a=String(a);b=0;null!=d&&(d.byteCount+=a.length);for(f=0;f<a.length;f++)b=(b<<5)-b+a.charCodeAt(f)<<0;c^=b}return c};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(a,b,d,e,n,g,l){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage|| @@ -3000,18 +3000,18 @@ mxUtils.write(f,mxResources.get("dragElementsHere"))),b.appendChild(f)):this.add "",!1,!1,!0)})):null!=a.xml&&null!=a.title&&this.sidebar.addEntry(a.title,mxUtils.bind(this,function(){var c=this.stringToCells(Graph.decompress(a.xml));return this.sidebar.createVertexTemplateFromCells(c,a.w,a.h,a.title||"",!0,!1,!0)}))})(b[k]);d=null!=d&&0<d.length?d:a.getTitle();var l=this.sidebar.addPalette(a.getHash(),d,!0,mxUtils.bind(this,function(a){e(b,a)}));this.repositionLibrary(c);var u=l.parentNode.previousSibling;d=u.getAttribute("title");null!=d&&0<d.length&&".scratchpad"!=a.title&& u.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+d);var m=document.createElement("div");m.style.position="absolute";m.style.right="0px";m.style.top="0px";m.style.padding="8px";mxClient.IS_QUIRKS||8==document.documentMode||(m.style.backgroundColor="inherit");u.style.position="relative";var v=document.createElement("img");v.setAttribute("src",Dialog.prototype.closeImage);v.setAttribute("title",mxResources.get("close"));v.setAttribute("valign","absmiddle");v.setAttribute("border","0");v.style.margin= "0 3px";var r=null;if(".scratchpad"!=a.title||this.closableScratchpad)m.appendChild(v),mxEvent.addListener(v,"click",mxUtils.bind(this,function(c){if(!mxEvent.isConsumed(c)){var b=mxUtils.bind(this,function(){this.closeLibrary(a)});null!=r?this.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b();mxEvent.consume(c)}}));if(a.isEditable()){var q=this.editor.graph,t=null,x=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),l, -b,a,a.getMode());mxEvent.consume(c)}),z=mxUtils.bind(this,function(c){a.setModified(!0);a.isAutosave()?(null!=t&&null!=t.parentNode&&t.parentNode.removeChild(t),t=v.cloneNode(!1),t.setAttribute("src",Editor.spinImage),t.setAttribute("title",mxResources.get("saving")),t.style.cursor="default",t.style.marginRight="2px",t.style.marginTop="-2px",m.insertBefore(t,m.firstChild),u.style.paddingRight=18*m.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=t&&null!= +b,a,a.getMode());mxEvent.consume(c)}),A=mxUtils.bind(this,function(c){a.setModified(!0);a.isAutosave()?(null!=t&&null!=t.parentNode&&t.parentNode.removeChild(t),t=v.cloneNode(!1),t.setAttribute("src",Editor.spinImage),t.setAttribute("title",mxResources.get("saving")),t.style.cursor="default",t.style.marginRight="2px",t.style.marginTop="-2px",m.insertBefore(t,m.firstChild),u.style.paddingRight=18*m.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=t&&null!= t.parentNode&&(t.parentNode.removeChild(t),u.style.paddingRight=18*m.childNodes.length+"px")})):null==r&&(r=v.cloneNode(!1),r.setAttribute("src",IMAGE_PATH+"/download.png"),r.setAttribute("title",mxResources.get("save")),m.insertBefore(r,m.firstChild),mxEvent.addListener(r,"click",mxUtils.bind(this,function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==r||a.isModified()||(u.style.paddingRight=18*m.childNodes.length+"px",r.parentNode.removeChild(r), -r=null)});mxEvent.consume(c)})),u.style.paddingRight=18*m.childNodes.length+"px")}),G=mxUtils.bind(this,function(a,c,d,e){a=q.cloneCells(mxUtils.sortCells(q.model.getTopmostCells(a)));for(var k=0;k<a.length;k++){var g=q.getCellGeometry(a[k]);null!=g&&g.translate(-c.x,-c.y)}l.appendChild(this.sidebar.createVertexTemplateFromCells(a,c.width,c.height,e||"",!0,!1,!1));a={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:c.width,h:c.height};null!=e&&(a.title=e);b.push(a);z(d);null!= -f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)}),K=mxUtils.bind(this,function(a){if(q.isSelectionEmpty())q.getRubberband().isActive()?(q.getRubberband().execute(a),q.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var c=q.getSelectionCells(),b=q.view.getBounds(c),f=q.view.scale;b.x/=f;b.y/=f;b.width/=f;b.height/=f;b.x-=q.view.translate.x;b.y-=q.view.translate.y;G(c,b)}mxEvent.consume(a)});mxEvent.addGestureListeners(l, +r=null)});mxEvent.consume(c)})),u.style.paddingRight=18*m.childNodes.length+"px")}),G=mxUtils.bind(this,function(a,c,d,e){a=q.cloneCells(mxUtils.sortCells(q.model.getTopmostCells(a)));for(var k=0;k<a.length;k++){var g=q.getCellGeometry(a[k]);null!=g&&g.translate(-c.x,-c.y)}l.appendChild(this.sidebar.createVertexTemplateFromCells(a,c.width,c.height,e||"",!0,!1,!1));a={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:c.width,h:c.height};null!=e&&(a.title=e);b.push(a);A(d);null!= +f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)}),L=mxUtils.bind(this,function(a){if(q.isSelectionEmpty())q.getRubberband().isActive()?(q.getRubberband().execute(a),q.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var c=q.getSelectionCells(),b=q.view.getBounds(c),f=q.view.scale;b.x/=f;b.y/=f;b.width/=f;b.height/=f;b.x-=q.view.translate.x;b.y-=q.view.translate.y;G(c,b)}mxEvent.consume(a)});mxEvent.addGestureListeners(l, function(){},mxUtils.bind(this,function(a){q.isMouseDown&&null!=q.panningManager&&null!=q.graphHandler.shape&&(q.graphHandler.shape.node.style.visibility="hidden",l.style.backgroundColor="#f1f3f4",l.style.cursor="copy",q.panningManager.stop(),q.autoScroll=!1,null!=q.graphHandler.guide&&q.graphHandler.guide.setVisible(!1),null!=q.graphHandler.hint&&(q.graphHandler.hint.style.visibility="hidden"),mxEvent.consume(a))}),mxUtils.bind(this,function(a){q.isMouseDown&&null!=q.panningManager&&null!=q.graphHandler&& -(l.style.backgroundColor="",l.style.cursor="default",this.sidebar.showTooltips=!0,q.panningManager.stop(),q.graphHandler.reset(),q.isMouseDown=!1,q.autoScroll=!0,K(a),mxEvent.consume(a))}));mxEvent.addListener(l,"mouseleave",mxUtils.bind(this,function(a){q.isMouseDown&&null!=q.graphHandler.shape&&(q.graphHandler.shape.node.style.visibility="visible",l.style.backgroundColor="",l.style.cursor="",q.autoScroll=!0,null!=q.graphHandler.guide&&q.graphHandler.guide.setVisible(!0),null!=q.graphHandler.hint&& +(l.style.backgroundColor="",l.style.cursor="default",this.sidebar.showTooltips=!0,q.panningManager.stop(),q.graphHandler.reset(),q.isMouseDown=!1,q.autoScroll=!0,L(a),mxEvent.consume(a))}));mxEvent.addListener(l,"mouseleave",mxUtils.bind(this,function(a){q.isMouseDown&&null!=q.graphHandler.shape&&(q.graphHandler.shape.node.style.visibility="visible",l.style.backgroundColor="",l.style.cursor="",q.autoScroll=!0,null!=q.graphHandler.guide&&q.graphHandler.guide.setVisible(!0),null!=q.graphHandler.hint&& (q.graphHandler.hint.style.visibility="visible"))}));Graph.fileSupport&&(mxEvent.addListener(l,"dragover",mxUtils.bind(this,function(a){l.style.backgroundColor="#f1f3f4";a.dataTransfer.dropEffect="copy";l.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(l,"drop",mxUtils.bind(this,function(a){l.style.cursor="";l.style.backgroundColor="";0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this, -function(c,d,k,g,n,p,u,v,q){if(null!=c&&"image/"==d.substring(0,6))c="shape=image;verticalLabelPosition=bottom;verticalAlign=top;aspect=fixed;image="+this.convertDataUri(c),c=[new mxCell("",new mxGeometry(0,0,n,p),c)],c[0].vertex=!0,G(c,new mxRectangle(0,0,n,p),a,mxEvent.isAltDown(a)?null:u.substring(0,u.lastIndexOf(".")).replace(/_/g," ")),null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null);else{var m=!1,A=mxUtils.bind(this,function(c,d){if(null!=c&&"text/xml"==d){var k= -mxUtils.parseXml(c);if("mxlibrary"==k.documentElement.nodeName)try{var g=JSON.parse(mxUtils.getTextContent(k.documentElement));e(g,l);b=b.concat(g);z(a);this.spinner.stop();m=!0}catch(H){}else if("mxfile"==k.documentElement.nodeName)try{for(var n=k.documentElement.getElementsByTagName("diagram"),k=0;k<n.length;k++){var p=this.stringToCells(Editor.getDiagramNodeXml(n[k])),u=this.editor.graph.getBoundingBoxFromGeometry(p);G(p,new mxRectangle(0,0,u.width,u.height),a)}m=!0}catch(H){null!=window.console&& -console.log("error in drop handler:",H)}}m||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)});null!=q&&null!=u&&(/(\.v(dx|sdx?))($|\?)/i.test(u)||/(\.vs(x|sx?))($|\?)/i.test(u))?this.importVisio(q,function(a){A(a,"text/xml")},null,u):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,u)&&null!=q?this.parseFile(q,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(), -200<=a.status&&299>=a.status?A(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):A(c,d)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(l,"dragleave",function(a){l.style.cursor="";l.style.backgroundColor="";a.stopPropagation();a.preventDefault()}));v=v.cloneNode(!1);v.setAttribute("src",Editor.editImage);v.setAttribute("title",mxResources.get("edit"));m.insertBefore(v, -m.firstChild);mxEvent.addListener(v,"click",x);mxEvent.addListener(l,"dblclick",function(a){mxEvent.getSource(a)==l&&x(a)});d=v.cloneNode(!1);d.setAttribute("src",Editor.plusImage);d.setAttribute("title",mxResources.get("add"));m.insertBefore(d,m.firstChild);mxEvent.addListener(d,"click",K);this.isOffline()||".scratchpad"!=a.title||null==EditorUi.scratchpadHelpLink||(d=document.createElement("span"),d.setAttribute("title",mxResources.get("help")),d.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;", +function(c,d,k,g,n,p,u,v,y){if(null!=c&&"image/"==d.substring(0,6))c="shape=image;verticalLabelPosition=bottom;verticalAlign=top;aspect=fixed;image="+this.convertDataUri(c),c=[new mxCell("",new mxGeometry(0,0,n,p),c)],c[0].vertex=!0,G(c,new mxRectangle(0,0,n,p),a,mxEvent.isAltDown(a)?null:u.substring(0,u.lastIndexOf(".")).replace(/_/g," ")),null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null);else{var q=!1,m=mxUtils.bind(this,function(c,d){if(null!=c&&"text/xml"==d){var k= +mxUtils.parseXml(c);if("mxlibrary"==k.documentElement.nodeName)try{var g=JSON.parse(mxUtils.getTextContent(k.documentElement));e(g,l);b=b.concat(g);A(a);this.spinner.stop();q=!0}catch(H){}else if("mxfile"==k.documentElement.nodeName)try{for(var n=k.documentElement.getElementsByTagName("diagram"),k=0;k<n.length;k++){var p=this.stringToCells(Editor.getDiagramNodeXml(n[k])),u=this.editor.graph.getBoundingBoxFromGeometry(p);G(p,new mxRectangle(0,0,u.width,u.height),a)}q=!0}catch(H){null!=window.console&& +console.log("error in drop handler:",H)}}q||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)});null!=y&&null!=u&&(/(\.v(dx|sdx?))($|\?)/i.test(u)||/(\.vs(x|sx?))($|\?)/i.test(u))?this.importVisio(y,function(a){m(a,"text/xml")},null,u):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,u)&&null!=y?this.parseFile(y,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(), +200<=a.status&&299>=a.status?m(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):m(c,d)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(l,"dragleave",function(a){l.style.cursor="";l.style.backgroundColor="";a.stopPropagation();a.preventDefault()}));v=v.cloneNode(!1);v.setAttribute("src",Editor.editImage);v.setAttribute("title",mxResources.get("edit"));m.insertBefore(v, +m.firstChild);mxEvent.addListener(v,"click",x);mxEvent.addListener(l,"dblclick",function(a){mxEvent.getSource(a)==l&&x(a)});d=v.cloneNode(!1);d.setAttribute("src",Editor.plusImage);d.setAttribute("title",mxResources.get("add"));m.insertBefore(d,m.firstChild);mxEvent.addListener(d,"click",L);this.isOffline()||".scratchpad"!=a.title||null==EditorUi.scratchpadHelpLink||(d=document.createElement("span"),d.setAttribute("title",mxResources.get("help")),d.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;", mxUtils.write(d,"?"),mxEvent.addGestureListeners(d,mxUtils.bind(this,function(a){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(a)})),m.insertBefore(d,m.firstChild))}u.appendChild(m);u.style.paddingRight=18*m.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(a,b){for(var c=0;c<a.length;c++){var f=a[c],d=f.data;if(null!=d){var d=this.convertDataUri(d),e="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==f.aspect&&(e+="aspect=fixed;"); b.appendChild(this.sidebar.createVertexTemplate(e+"image="+d,f.w,f.h,"",f.title||"",!1,!1,!0))}else null!=f.xml&&(d=this.stringToCells(Graph.decompress(f.xml)),0<d.length&&b.appendChild(this.sidebar.createVertexTemplateFromCells(d,f.w,f.h,f.title||"",!0,!1,!0)))}};EditorUi.prototype.getResource=function(a){return null!=a?a[mxLanguage]||a.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.offline||EditorUi.isElectronApp||("1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight= 64),EditorUi.prototype.createFooter=function(){return document.getElementById("geFooter")});EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground=mxClient.IS_QUIRKS?"none":"linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight= @@ -3041,7 +3041,7 @@ this.chromelessToolbar.offsetHeight+4+"px";d=mxUtils.getCurrentStyle(this.editor null,"png");a=document.createElement("img");a.style.maxWidth="140px";a.style.maxHeight="140px";a.style.cursor="pointer";a.style.backgroundColor="white";a.setAttribute("title",mxResources.get("openInNewWindow"));a.setAttribute("border","0");a.setAttribute("src",c);this.exportDialog.appendChild(a);mxEvent.addListener(a,"click",mxUtils.bind(this,function(){this.openInNewWindow(c.substring(c.indexOf(",")+1),"image/png",!0);b.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this, function(a){this.spinner.stop();this.handleError(a)}));mxEvent.addListener(this.editor.graph.container,"click",b);document.body.appendChild(this.exportDialog)}mxEvent.consume(a)}),Editor.cameraLargeImage,mxResources.get("export"))}e.apply(this,arguments)};EditorUi.prototype.saveData=function(a,b,d,e,n){this.isLocalFileSave()?this.saveLocalFile(d,a,e,n,b):this.saveRequest(a,b,mxUtils.bind(this,function(a,c){return this.createEchoRequest(d,a,e,n,b,c)}),d,n,e)};EditorUi.prototype.saveRequest=function(a, b,d,e,n,g,l){l=null!=l?l:!mxClient.IS_IOS||!navigator.standalone;var c=this.getServiceCount(!1);isLocalStorage&&c++;var f=4>=c?2:6<c?4:3;a=new CreateDialog(this,a,mxUtils.bind(this,function(a,c){if("_blank"==c||null!=a&&0<a.length){var f=d("_blank"==c?null:a,c==App.MODE_DEVICE||"download"==c||null==c||"_blank"==c?"0":"1");null!=f&&(c==App.MODE_DEVICE||"download"==c||"_blank"==c?f.simulate(document,"_blank"):this.pickFolder(c,mxUtils.bind(this,function(d){g=null!=g?g:"pdf"==b?"application/pdf":"image/"+ -b;if(null!=e)try{this.exportFile(e,a,g,!0,c,d)}catch(B){this.handleError(B)}else this.spinner.spin(document.body,mxResources.get("saving"))&&f.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=f.getStatus()&&299>=f.getStatus())try{this.exportFile(f.getText(),a,g,!0,c,d)}catch(B){this.handleError(B)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(a){this.spinner.stop();this.handleError(a)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"), +b;if(null!=e)try{this.exportFile(e,a,g,!0,c,d)}catch(C){this.handleError(C)}else this.spinner.spin(document.body,mxResources.get("saving"))&&f.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=f.getStatus()&&299>=f.getStatus())try{this.exportFile(f.getText(),a,g,!0,c,d)}catch(C){this.handleError(C)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(a){this.spinner.stop();this.handleError(a)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"), mxResources.get("download"),!1,!1,l,null,1<c,f,e,g,n);this.showDialog(a.container,380,1==c?160:4<c?390:270,!0,!0);a.init()};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(a,b,d,e,n,g){};EditorUi.prototype.pickFolder=function(a,b,d){b(null)};EditorUi.prototype.exportSvg=function(a,b,d,e,n,g,l,m,u,r){if(this.spinner.spin(document.body,mxResources.get("export"))){var c=this.editor.graph.isSelectionEmpty();d=null!=d?d:c;c=b?null:this.editor.graph.background; c==mxConstants.NONE&&(c=null);null==c&&0==b&&(c="#ffffff");var f=this.editor.graph.getSvg(c,a,l,m,null,d,null,null,"blank"==r?"_blank":"self"==r?"_top":null);e&&this.editor.graph.addSvgShadow(f);var k=this.getBaseFilename()+".svg",p=mxUtils.bind(this,function(a){this.spinner.stop();n&&a.setAttribute("content",this.getFileData(!0,null,null,null,d,u));if(null!=this.editor.fontCss){var c=a.ownerDocument,c=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"style"):c.createElement("style"); c.setAttribute("type","text/css");mxUtils.setTextContent(c,this.editor.fontCss);a.getElementsByTagName("defs")[0].appendChild(c)}var b='<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a);this.isLocalFileSave()||b.length<=MAX_REQUEST_SIZE?this.saveData(k,"svg",b,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}))});this.convertMath(this.editor.graph, @@ -3060,26 +3060,26 @@ isNaN(d)||100==d||(c.zoom=d/100);d=[];l&&(d.push("pages"),c.resize=!0,null!=this mxUtils.write(f,mxResources.get("html"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(f);var k=document.createElement("div");k.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var l=document.createElement("input");l.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";l.setAttribute("value","url");l.setAttribute("type","radio");l.setAttribute("name","type-embedhtmldialog");f=l.cloneNode(!0);f.setAttribute("value", "copy");k.appendChild(f);var p=document.createElement("span");mxUtils.write(p,mxResources.get("includeCopyOfMyDiagram"));k.appendChild(p);mxUtils.br(k);k.appendChild(l);p=document.createElement("span");mxUtils.write(p,mxResources.get("publicDiagramUrl"));k.appendChild(p);var m=this.getCurrentFile();null==d&&null!=m&&m.constructor==window.DriveFile&&(p=document.createElement("a"),p.style.paddingLeft="12px",p.style.color="gray",p.setAttribute("href","javascript:void(0);"),mxUtils.write(p,mxResources.get("share")), k.appendChild(p),mxEvent.addListener(p,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(m.getId())})));f.setAttribute("checked","checked");null==d&&l.setAttribute("disabled","disabled");c.appendChild(k);var v=this.addLinkSection(c),r=this.addCheckbox(c,mxResources.get("zoom"),!0,null,!0);mxUtils.write(c,":");var q=document.createElement("input");q.setAttribute("type","text");q.style.marginRight="16px";q.style.width="60px";q.style.marginLeft="4px";q.style.marginRight= -"12px";q.value="100%";c.appendChild(q);var t=this.addCheckbox(c,mxResources.get("fit"),!0),k=null!=this.pages&&1<this.pages.length,x=x=this.addCheckbox(c,mxResources.get("allPages"),k,!k),z=this.addCheckbox(c,mxResources.get("layers"),!0),G=this.addCheckbox(c,mxResources.get("lightbox"),!0),K=this.addEditButton(c,G),C=K.getEditInput();C.style.marginBottom="16px";mxEvent.addListener(G,"change",function(){G.checked?C.removeAttribute("disabled"):C.setAttribute("disabled","disabled");C.checked&&G.checked? -K.getEditSelect().removeAttribute("disabled"):K.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,c,mxUtils.bind(this,function(){e(l.checked?d:null,r.checked,q.value,v.getTarget(),v.getColor(),t.checked,x.checked,z.checked,G.checked,K.getLink())}),null,a,b);this.showDialog(a.container,340,384,!0,!0);f.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,d,e,l,g){var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=document.createElement("h3"); +"12px";q.value="100%";c.appendChild(q);var t=this.addCheckbox(c,mxResources.get("fit"),!0),k=null!=this.pages&&1<this.pages.length,x=x=this.addCheckbox(c,mxResources.get("allPages"),k,!k),A=this.addCheckbox(c,mxResources.get("layers"),!0),G=this.addCheckbox(c,mxResources.get("lightbox"),!0),L=this.addEditButton(c,G),B=L.getEditInput();B.style.marginBottom="16px";mxEvent.addListener(G,"change",function(){G.checked?B.removeAttribute("disabled"):B.setAttribute("disabled","disabled");B.checked&&G.checked? +L.getEditSelect().removeAttribute("disabled"):L.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,c,mxUtils.bind(this,function(){e(l.checked?d:null,r.checked,q.value,v.getTarget(),v.getColor(),t.checked,x.checked,A.checked,G.checked,L.getLink())}),null,a,b);this.showDialog(a.container,340,384,!0,!0);f.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,d,e,l,g){var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=document.createElement("h3"); mxUtils.write(f,a||mxResources.get("link"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(f);var k=this.getCurrentFile(),f="https://desk.draw.io/support/solutions/articles/16000051941";a=0;if(null!=k&&k.constructor==window.DriveFile&&!b){a=80;var f="https://desk.draw.io/support/solutions/articles/16000039384",n=document.createElement("div");n.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;"; var p=document.createElement("div");p.style.whiteSpace="normal";mxUtils.write(p,mxResources.get("linkAccountRequired"));n.appendChild(p);p=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(k.getId())}));p.style.marginTop="12px";p.className="geBtn";n.appendChild(p);c.appendChild(n);p=document.createElement("a");p.style.paddingLeft="12px";p.style.color="gray";p.style.fontSize="11px";p.setAttribute("href","javascript:void(0);");mxUtils.write(p,mxResources.get("check")); n.appendChild(p);mxEvent.addListener(p,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(a){this.spinner.stop();a=new ErrorDialog(this,null,mxResources.get(null!=a?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(a.container,300,80,!0,!1);a.init()}))}))}var m=null,q=null;if(null!=d||null!=e)a+=30,mxUtils.write(c,mxResources.get("width")+":"),m=document.createElement("input"), m.setAttribute("type","text"),m.style.marginRight="16px",m.style.width="50px",m.style.marginLeft="6px",m.style.marginRight="16px",m.style.marginBottom="10px",m.value="100%",c.appendChild(m),mxUtils.write(c,mxResources.get("height")+":"),q=document.createElement("input"),q.setAttribute("type","text"),q.style.width="50px",q.style.marginLeft="6px",q.style.marginBottom="10px",q.value=e+"px",c.appendChild(q),mxUtils.br(c);var r=this.addLinkSection(c,g);d=null!=this.pages&&1<this.pages.length;var t=null; -if(null==k||k.constructor!=window.DriveFile||b)t=this.addCheckbox(c,mxResources.get("allPages"),d,!d);var x=this.addCheckbox(c,mxResources.get("lightbox"),!0),G=this.addEditButton(c,x),z=G.getEditInput(),C=this.addCheckbox(c,mxResources.get("layers"),!0);C.style.marginLeft=z.style.marginLeft;C.style.marginBottom="16px";C.style.marginTop="8px";mxEvent.addListener(x,"change",function(){x.checked?(C.removeAttribute("disabled"),z.removeAttribute("disabled")):(C.setAttribute("disabled","disabled"),z.setAttribute("disabled", -"disabled"));z.checked&&x.checked?G.getEditSelect().removeAttribute("disabled"):G.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,c,mxUtils.bind(this,function(){l(r.getTarget(),r.getColor(),null==t?!0:t.checked,x.checked,G.getLink(),C.checked,null!=m?m.value:null,null!=q?q.value:null)}),null,mxResources.get("create"),f);this.showDialog(b.container,340,254+a,!0,!0);null!=m?(m.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?m.select(): +if(null==k||k.constructor!=window.DriveFile||b)t=this.addCheckbox(c,mxResources.get("allPages"),d,!d);var x=this.addCheckbox(c,mxResources.get("lightbox"),!0),G=this.addEditButton(c,x),A=G.getEditInput(),B=this.addCheckbox(c,mxResources.get("layers"),!0);B.style.marginLeft=A.style.marginLeft;B.style.marginBottom="16px";B.style.marginTop="8px";mxEvent.addListener(x,"change",function(){x.checked?(B.removeAttribute("disabled"),A.removeAttribute("disabled")):(B.setAttribute("disabled","disabled"),A.setAttribute("disabled", +"disabled"));A.checked&&x.checked?G.getEditSelect().removeAttribute("disabled"):G.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,c,mxUtils.bind(this,function(){l(r.getTarget(),r.getColor(),null==t?!0:t.checked,x.checked,G.getLink(),B.checked,null!=m?m.value:null,null!=q?q.value:null)}),null,mxResources.get("create"),f);this.showDialog(b.container,340,254+a,!0,!0);null!=m?(m.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?m.select(): document.execCommand("selectAll",!1,null)):r.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,d,e,l){var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("image"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(l?"10":"4")+"px";c.appendChild(f);if(l){mxUtils.write(c,mxResources.get("zoom")+":");var k=document.createElement("input");k.setAttribute("type","text");k.style.marginRight= "16px";k.style.width="60px";k.style.marginLeft="4px";k.style.marginRight="12px";k.value=this.lastExportZoom||"100%";c.appendChild(k);mxUtils.write(c,mxResources.get("borderWidth")+":");var n=document.createElement("input");n.setAttribute("type","text");n.style.marginRight="16px";n.style.width="60px";n.style.marginLeft="4px";n.value=this.lastExportBorder||"0";c.appendChild(n);mxUtils.br(c)}var p=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),m=e?null:this.addCheckbox(c, mxResources.get("includeCopyOfMyDiagram"),!0),f=this.editor.graph,r=e?null:this.addCheckbox(c,mxResources.get("transparentBackground"),f.background==mxConstants.NONE||null==f.background);null!=r&&(r.style.marginBottom="16px");a=new CustomDialog(this,c,mxUtils.bind(this,function(){var a=parseInt(k.value)/100||1,c=parseInt(n.value)||0;d(!p.checked,null!=m?m.checked:!1,null!=r?r.checked:!1,a,c)}),null,a,b);this.showDialog(a.container,300,(l?25:0)+(e?125:210),!0,!0)};EditorUi.prototype.showExportDialog= function(a,b,d,e,l,g,m,r){m=null!=m?m:!0;var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=this.editor.graph,k="jpeg"==r?196:300,n=document.createElement("h3");mxUtils.write(n,a);n.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";c.appendChild(n);mxUtils.write(c,mxResources.get("zoom")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.marginRight="16px";p.style.width="60px";p.style.marginLeft="4px";p.style.marginRight= -"12px";p.value=this.lastExportZoom||"100%";c.appendChild(p);mxUtils.write(c,mxResources.get("borderWidth")+":");var y=document.createElement("input");y.setAttribute("type","text");y.style.marginRight="16px";y.style.width="60px";y.style.marginLeft="4px";y.value=this.lastExportBorder||"0";c.appendChild(y);mxUtils.br(c);var A=this.addCheckbox(c,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=r),t=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,f.isSelectionEmpty()),G=document.createElement("input"); +"12px";p.value=this.lastExportZoom||"100%";c.appendChild(p);mxUtils.write(c,mxResources.get("borderWidth")+":");var y=document.createElement("input");y.setAttribute("type","text");y.style.marginRight="16px";y.style.width="60px";y.style.marginLeft="4px";y.value=this.lastExportBorder||"0";c.appendChild(y);mxUtils.br(c);var z=this.addCheckbox(c,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=r),t=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,f.isSelectionEmpty()),G=document.createElement("input"); G.style.marginTop="16px";G.style.marginRight="8px";G.style.marginLeft="24px";G.setAttribute("disabled","disabled");G.setAttribute("type","checkbox");g&&(c.appendChild(G),mxUtils.write(c,mxResources.get("crop")),mxUtils.br(c),k+=26,mxEvent.addListener(t,"change",function(){t.checked?G.removeAttribute("disabled"):G.setAttribute("disabled","disabled")}));f.isSelectionEmpty()||(G.setAttribute("checked","checked"),G.defaultChecked=!0);var x=this.addCheckbox(c,mxResources.get("shadow"),f.shadowVisible), -C=document.createElement("input");C.style.marginTop="16px";C.style.marginRight="8px";C.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||C.setAttribute("disabled","disabled");b&&(c.appendChild(C),mxUtils.write(c,mxResources.get("embedImages")),mxUtils.br(c),k+=26);var L=this.addCheckbox(c,mxResources.get("includeCopyOfMyDiagram"),m,null,null,"jpeg"!=r),M=null!=this.pages&&1<this.pages.length,U=this.addCheckbox(c,M?mxResources.get("allPages"):"",M,!M,null,"jpeg"!=r);U.style.marginLeft= -"24px";U.style.marginBottom="16px";M||(U.style.display="none");mxEvent.addListener(L,"change",function(){L.checked&&M?U.removeAttribute("disabled"):U.setAttribute("disabled","disabled")});m&&M||U.setAttribute("disabled","disabled");var z=document.createElement("select");z.style.maxWidth="260px";z.style.marginLeft="8px";z.style.marginRight="10px";z.className="geBtn";a=document.createElement("option");a.setAttribute("value","auto");mxUtils.write(a,mxResources.get("automatic"));z.appendChild(a);a=document.createElement("option"); -a.setAttribute("value","blank");mxUtils.write(a,mxResources.get("openInNewWindow"));z.appendChild(a);a=document.createElement("option");a.setAttribute("value","self");mxUtils.write(a,mxResources.get("openInThisWindow"));z.appendChild(a);"svg"==r&&(mxUtils.write(c,mxResources.get("links")+":"),c.appendChild(z),mxUtils.br(c),mxUtils.br(c),k+=26);d=new CustomDialog(this,c,mxUtils.bind(this,function(){this.lastExportBorder=y.value;this.lastExportZoom=p.value;l(p.value,A.checked,!t.checked,x.checked,L.checked, -C.checked,y.value,G.checked,!U.checked,z.value)}),null,d,e);this.showDialog(d.container,340,k,!0,!0,null,null,null,null,!0);p.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?p.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,d,e,l){var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=this.editor.graph;if(null!=b){var k=document.createElement("h3");mxUtils.write(k,b);k.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px"; -c.appendChild(k)}var n=this.addCheckbox(c,mxResources.get("fit"),!0),p=this.addCheckbox(c,mxResources.get("shadow"),f.shadowVisible&&e,!e),m=this.addCheckbox(c,d),r=this.addCheckbox(c,mxResources.get("lightbox"),!0),q=this.addEditButton(c,r),t=q.getEditInput(),x=1<f.model.getChildCount(f.model.getRoot()),z=this.addCheckbox(c,mxResources.get("layers"),x,!x);z.style.marginLeft=t.style.marginLeft;z.style.marginBottom="12px";z.style.marginTop="8px";mxEvent.addListener(r,"change",function(){r.checked? -(x&&z.removeAttribute("disabled"),t.removeAttribute("disabled")):(z.setAttribute("disabled","disabled"),t.setAttribute("disabled","disabled"));t.checked&&r.checked?q.getEditSelect().removeAttribute("disabled"):q.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,c,mxUtils.bind(this,function(){a(n.checked,p.checked,m.checked,r.checked,q.getLink(),z.checked)}),null,mxResources.get("embed"),l);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage= +B=document.createElement("input");B.style.marginTop="16px";B.style.marginRight="8px";B.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||B.setAttribute("disabled","disabled");b&&(c.appendChild(B),mxUtils.write(c,mxResources.get("embedImages")),mxUtils.br(c),k+=26);var K=this.addCheckbox(c,mxResources.get("includeCopyOfMyDiagram"),m,null,null,"jpeg"!=r),M=null!=this.pages&&1<this.pages.length,U=this.addCheckbox(c,M?mxResources.get("allPages"):"",M,!M,null,"jpeg"!=r);U.style.marginLeft= +"24px";U.style.marginBottom="16px";M||(U.style.display="none");mxEvent.addListener(K,"change",function(){K.checked&&M?U.removeAttribute("disabled"):U.setAttribute("disabled","disabled")});m&&M||U.setAttribute("disabled","disabled");var A=document.createElement("select");A.style.maxWidth="260px";A.style.marginLeft="8px";A.style.marginRight="10px";A.className="geBtn";a=document.createElement("option");a.setAttribute("value","auto");mxUtils.write(a,mxResources.get("automatic"));A.appendChild(a);a=document.createElement("option"); +a.setAttribute("value","blank");mxUtils.write(a,mxResources.get("openInNewWindow"));A.appendChild(a);a=document.createElement("option");a.setAttribute("value","self");mxUtils.write(a,mxResources.get("openInThisWindow"));A.appendChild(a);"svg"==r&&(mxUtils.write(c,mxResources.get("links")+":"),c.appendChild(A),mxUtils.br(c),mxUtils.br(c),k+=26);d=new CustomDialog(this,c,mxUtils.bind(this,function(){this.lastExportBorder=y.value;this.lastExportZoom=p.value;l(p.value,z.checked,!t.checked,x.checked,K.checked, +B.checked,y.value,G.checked,!U.checked,A.value)}),null,d,e);this.showDialog(d.container,340,k,!0,!0,null,null,null,null,!0);p.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?p.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,d,e,l){var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=this.editor.graph;if(null!=b){var k=document.createElement("h3");mxUtils.write(k,b);k.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px"; +c.appendChild(k)}var n=this.addCheckbox(c,mxResources.get("fit"),!0),p=this.addCheckbox(c,mxResources.get("shadow"),f.shadowVisible&&e,!e),m=this.addCheckbox(c,d),r=this.addCheckbox(c,mxResources.get("lightbox"),!0),q=this.addEditButton(c,r),t=q.getEditInput(),x=1<f.model.getChildCount(f.model.getRoot()),A=this.addCheckbox(c,mxResources.get("layers"),x,!x);A.style.marginLeft=t.style.marginLeft;A.style.marginBottom="12px";A.style.marginTop="8px";mxEvent.addListener(r,"change",function(){r.checked? +(x&&A.removeAttribute("disabled"),t.removeAttribute("disabled")):(A.setAttribute("disabled","disabled"),t.setAttribute("disabled","disabled"));t.checked&&r.checked?q.getEditSelect().removeAttribute("disabled"):q.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,c,mxUtils.bind(this,function(){a(n.checked,p.checked,m.checked,r.checked,q.getLink(),A.checked)}),null,mxResources.get("embed"),l);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage= function(a,b,d,e,l,g,m,r){function c(c){var b=" ",k="";e&&(b=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.drawHost+"/?client=1&lightbox=1"+(l?"&edit=_blank":"")+(g?"&layers=1":"")+"');}})(this);\"",k+="cursor:pointer;"); a&&(k+="max-width:100%;");var n="";d&&(n=' width="'+Math.round(f.width)+'" height="'+Math.round(f.height)+'"');m('<img src="'+c+'"'+n+(""!=k?' style="'+k+'"':"")+b+"/>")}var f=this.editor.graph.getGraphBounds();if(this.isExportToCanvas())this.exportToCanvas(mxUtils.bind(this,function(a){var b=e?this.getFileData(!0):null;a=this.createImageDataUri(a,b,"png");c(a)}),null,null,null,mxUtils.bind(this,function(a){r({message:mxResources.get("unknownError")})}),null,!0,d?2:1,null,b);else if(b=this.getFileData(!0), f.width*f.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){var k="";d&&(k="&w="+Math.round(2*f.width)+"&h="+Math.round(2*f.height));var n=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(e?"1":"0")+k+"&xml="+encodeURIComponent(b));n.send(mxUtils.bind(this,function(){200<=n.getStatus()&&299>=n.getStatus()?c("data:image/png;base64,"+n.getText()):r({message:mxResources.get("unknownError")})}))}else r({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(a, @@ -3090,25 +3090,25 @@ c=Math.floor(a/2592E3);if(1<c)return c+" "+mxResources.get("months");c=Math.floo function(){e()}))}),0)):e()};EditorUi.prototype.decodeNodeIntoGraph=function(a,b){if(null!=a){var c=null;if("diagram"==a.nodeName)c=a;else if("mxfile"==a.nodeName){var d=a.getElementsByTagName("diagram");if(0<d.length){var c=d[0],f=b.getGlobalVariable;b.getGlobalVariable=function(a){return"page"==a?c.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==a?1:f.apply(this,arguments)}}}null!=c&&(a=Editor.parseDiagramNode(c))}d=this.editor.graph;try{this.editor.graph=b,this.editor.setGraphXml(a)}catch(g){}finally{this.editor.graph= d}return a};EditorUi.prototype.getEmbeddedPng=function(a,b,d){try{var c=this.editor.graph,f=null;if(null!=d&&0<d.length)c=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(c.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(d).documentElement,!0),c),f=d;else if(null!=this.pages&&this.currentPage!=this.pages[0]){var c=this.createTemporaryGraph(c.getStylesheet()),e=c.getGlobalVariable,k=this.pages[0];c.getGlobalVariable=function(a){return"page"== a?k.getName():"pagenumber"==a?1:e.apply(this,arguments)};document.body.appendChild(c.container);c.model.setRoot(k.root)}this.exportToCanvas(mxUtils.bind(this,function(d){try{null==f&&(f=this.getFileData(!0));var e=d.toDataURL("image/png"),e=this.writeGraphModelToPng(e,"tEXt","mxfile",f);a(e.substring(e.lastIndexOf(",")+1));c!=this.editor.graph&&c.container.parentNode.removeChild(c.container)}catch(F){null!=b&&b(F)}}),null,null,null,mxUtils.bind(this,function(a){null!=b&&b(a)}),null,null,null,null, -c.shadowVisible,null,c)}catch(y){null!=b&&b(y)}};EditorUi.prototype.getEmbeddedSvg=function(a,b,d,e,l,g,m){m=b.background;m==mxConstants.NONE&&(m=null);g=b.getSvg(m,null,null,null,null,g);b.shadowVisible&&b.addSvgShadow(g);null!=a&&g.setAttribute("content",a);null!=d&&g.setAttribute("resource",d);if(null!=l)this.convertImages(g,mxUtils.bind(this,function(a){l((e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+ +c.shadowVisible,null,c)}catch(z){null!=b&&b(z)}};EditorUi.prototype.getEmbeddedSvg=function(a,b,d,e,l,g,m){m=b.background;m==mxConstants.NONE&&(m=null);g=b.getSvg(m,null,null,null,null,g);b.shadowVisible&&b.addSvgShadow(g);null!=a&&g.setAttribute("content",a);null!=d&&g.setAttribute("resource",d);if(null!=l)this.convertImages(g,mxUtils.bind(this,function(a){l((e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+ mxUtils.getXml(a))}));else return(e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(g)};EditorUi.prototype.exportImage=function(a,b,d,e,l,g,m,r,u){u=null!=u?u:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var c=this.editor.graph.isSelectionEmpty();d=null!=d?d:c;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop(); try{this.saveCanvas(a,l?this.getFileData(!0,null,null,null,d,r):null,u,!r)}catch(E){"Invalid image"==E.message?this.downloadFile(u):this.handleError(E)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,d,a||1,b,e,null,null,g,m)}catch(v){this.spinner.stop(),this.handleError(v)}}};EditorUi.prototype.loadFonts=function(a){if(null!=this.editor.fontCss&&null==this.editor.resolvedFontCss){var c=function(a){return a.replace(RegExp("^[\\s\"']+", "g"),"").replace(RegExp("[\\s\"']+$","g"),"")},b=this.editor.fontCss.split("url("),d=0,e={},g=mxUtils.bind(this,function(){if(0==d){for(var f=[b[0]],k=1;k<b.length;k++){var g=b[k].indexOf(")");f.push('url("');f.push(e[c(b[k].substring(0,g))]);f.push('"'+b[k].substring(g))}this.editor.resolvedFontCss=f.join("");a()}});if(0<b.length)for(var l=1;l<b.length;l++){var m=b[l].indexOf(")"),u=null,r=b[l].indexOf("format(",m);0<r&&(u=c(b[l].substring(r+7,b[l].indexOf(")",r))));mxUtils.bind(this,function(a){if(null== e[a]){e[a]=a;d++;var c="application/x-font-ttf";if("svg"==u||/(\.svg)($|\?)/i.test(a))c="image/svg+xml";else if("otf"==u||"embedded-opentype"==u||/(\.otf)($|\?)/i.test(a))c="application/x-font-opentype";else if("woff"==u||/(\.woff)($|\?)/i.test(a))c="application/font-woff";else if("woff2"==u||/(\.woff2)($|\?)/i.test(a))c="application/font-woff2";else if("eot"==u||/(\.eot)($|\?)/i.test(a))c="application/vnd.ms-fontobject";else if("sfnt"==u||/(\.sfnt)($|\?)/i.test(a))c="application/font-sfnt";var b= -a;/^https?:\/\//.test(b)&&!this.editor.isCorsEnabledForUrl(b)&&(b=PROXY_URL+"?url="+encodeURIComponent(a));this.loadUrl(b,mxUtils.bind(this,function(c){e[a]=c;d--;g()}),mxUtils.bind(this,function(a){d--;g()}),!0,null,"data:"+c+";charset=utf-8;base64,")}})(c(b[l].substring(0,m)),u)}}else a()};EditorUi.prototype.exportToCanvas=function(a,b,d,e,l,g,m,r,u,t,v,E,q,x){g=null!=g?g:!0;E=null!=E?E:this.editor.graph;q=null!=q?q:0;var c=u?null:E.background;c==mxConstants.NONE&&(c=null);null==c&&(c=e);null== -c&&0==u&&(c="#ffffff");this.convertImages(E.getSvg(c,null,null,x,null,null!=m?m:!0,null,null,null,t),mxUtils.bind(this,function(d){var f=new Image;f.onload=mxUtils.bind(this,function(){try{var e=document.createElement("canvas"),k=parseInt(d.getAttribute("width")),n=parseInt(d.getAttribute("height"));r=null!=r?r:1;null!=b&&(r=g?Math.min(1,Math.min(3*b/(4*n),b/k)):b/k);k=Math.ceil(r*k)+2*q;n=Math.ceil(r*n)+2*q;e.setAttribute("width",k);e.setAttribute("height",n);var p=e.getContext("2d");null!=c&&(p.beginPath(), -p.rect(0,0,k,n),p.fillStyle=c,p.fill());p.scale(r,r);mxClient.IS_SF?window.setTimeout(function(){p.drawImage(f,q/r,q/r);a(e)},0):(p.drawImage(f,q/r,q/r),a(e))}catch(ja){null!=l&&l(ja)}});f.onerror=function(a){null!=l&&l(a)};try{t&&this.editor.graph.addSvgShadow(d);var e=mxUtils.bind(this,function(){if(null!=this.editor.resolvedFontCss){var a=document.createElement("style");a.setAttribute("type","text/css");a.innerHTML=this.editor.resolvedFontCss;d.getElementsByTagName("defs")[0].appendChild(a)}this.convertMath(E, -d,!0,mxUtils.bind(this,function(){f.src=this.createSvgDataUri(mxUtils.getXml(d))}))});this.loadFonts(e)}catch(C){null!=l&&l(C)}}),d,v)};EditorUi.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var b=a.convert,d=this;a.convert=function(c){if(null!=c){var f="http://"==c.substring(0,7)||"https://"==c.substring(0,8);f&&!navigator.onLine?c=d.svgBrokenImage.src:!f||c.substring(0,a.baseUrl.length)==a.baseUrl||d.crossOriginImages&&d.editor.isCorsEnabledForUrl(c)?"chrome-extension://"!= -c.substring(0,19)&&(c=b.apply(this,arguments)):c=PROXY_URL+"?url="+encodeURIComponent(c)}return c};return a};EditorUi.prototype.convertImages=function(a,b,d,e){null==e&&(e=this.createImageUrlConverter());var c=0,f=d||{};d=mxUtils.bind(this,function(d,k){for(var g=a.getElementsByTagName(d),l=0;l<g.length;l++)mxUtils.bind(this,function(d){try{if(null!=d){var g=e.convert(d.getAttribute(k));if(null!=g&&"data:"!=g.substring(0,5)){var l=f[g];null==l?(c++,this.convertImageToDataUri(g,function(e){null!=e&& -(f[g]=e,d.setAttribute(k,e));c--;0==c&&b(a)})):d.setAttribute(k,l)}else null!=g&&d.setAttribute(k,g)}}catch(B){}})(g[l])});d("image","xlink:href");d("img","src");0==c&&b(a)};EditorUi.prototype.loadUrl=function(a,b,d,e,l,g,m){try{var c=!m&&(e||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||/(\.gif)($|\?)/i.test(a));l=null!=l?l:!0;var f=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=b){var f=a.getText();if(c){if((9== -document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){a=mxUtilsBinaryToArray(a.request.responseBody).toArray();for(var f=Array(a.length),e=0;e<a.length;e++)f[e]=String.fromCharCode(a[e]);f=f.join("")}g=null!=g?g:"data:image/png;base64,";f=g+this.base64Encode(f)}b(f)}}else null!=d&&d({message:mxResources.get("error")+" "+a.getStatus()},a)}),function(a){null!=d&&d({message:mxResources.get("error")+" "+a.getStatus()})},c,this.timeout,function(){l&&null!= -d&&d({code:App.ERROR_TIMEOUT,retry:f})})});f()}catch(F){null!=d&&d(F)}};EditorUi.prototype.isCorsEnabledForUrl=function(a){return this.editor.isCorsEnabledForUrl(a)};EditorUi.prototype.convertImageToDataUri=function(a,b){try{var c=!0,d=window.setTimeout(mxUtils.bind(this,function(){c=!1;b(this.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){window.clearTimeout(d);c&&b(this.createSvgDataUri(a.getText()))}),function(){window.clearTimeout(d);c&& -b(this.svgBrokenImage.src)});else{var f=new Image,e=this;this.crossOriginImages&&(f.crossOrigin="anonymous");f.onload=function(){window.clearTimeout(d);if(c)try{var a=document.createElement("canvas"),k=a.getContext("2d");a.height=f.height;a.width=f.width;k.drawImage(f,0,0);b(a.toDataURL())}catch(u){b(e.svgBrokenImage.src)}};f.onerror=function(){window.clearTimeout(d);c&&b(e.svgBrokenImage.src)};f.src=a}}catch(A){b(this.svgBrokenImage.src)}};EditorUi.prototype.importXml=function(a,b,d,e,l){b=null!= +a;/^https?:\/\//.test(b)&&!this.editor.isCorsEnabledForUrl(b)&&(b=PROXY_URL+"?url="+encodeURIComponent(a));this.loadUrl(b,mxUtils.bind(this,function(c){e[a]=c;d--;g()}),mxUtils.bind(this,function(a){d--;g()}),!0,null,"data:"+c+";charset=utf-8;base64,")}})(c(b[l].substring(0,m)),u)}}else a()};EditorUi.prototype.exportToCanvas=function(a,b,d,e,l,g,m,r,u,t,v,E,q,x){try{g=null!=g?g:!0;m=null!=m?m:!0;E=null!=E?E:this.editor.graph;q=null!=q?q:0;var c=u?null:E.background;c==mxConstants.NONE&&(c=null);null== +c&&(c=e);null==c&&0==u&&(c="#ffffff");this.convertImages(E.getSvg(c,null,null,x,null,m,null,null,null,t),mxUtils.bind(this,function(d){var f=new Image;f.onload=mxUtils.bind(this,function(){try{var e=document.createElement("canvas"),k=parseInt(d.getAttribute("width")),n=parseInt(d.getAttribute("height"));r=null!=r?r:1;null!=b&&(r=g?Math.min(1,Math.min(3*b/(4*n),b/k)):b/k);k=Math.ceil(r*k)+2*q;n=Math.ceil(r*n)+2*q;e.setAttribute("width",k);e.setAttribute("height",n);var p=e.getContext("2d");null!=c&& +(p.beginPath(),p.rect(0,0,k,n),p.fillStyle=c,p.fill());p.scale(r,r);mxClient.IS_SF?window.setTimeout(function(){p.drawImage(f,q/r,q/r);a(e)},0):(p.drawImage(f,q/r,q/r),a(e))}catch(ja){null!=l&&l(ja)}});f.onerror=function(a){null!=l&&l(a)};try{t&&this.editor.graph.addSvgShadow(d);var e=mxUtils.bind(this,function(){if(null!=this.editor.resolvedFontCss){var a=document.createElement("style");a.setAttribute("type","text/css");a.innerHTML=this.editor.resolvedFontCss;d.getElementsByTagName("defs")[0].appendChild(a)}this.convertMath(E, +d,!0,mxUtils.bind(this,function(){f.src=this.createSvgDataUri(mxUtils.getXml(d))}))});this.loadFonts(e)}catch(B){null!=l&&l(B)}}),d,v)}catch(P){null!=l&&l(P)}};EditorUi.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var b=a.convert,d=this;a.convert=function(c){if(null!=c){var f="http://"==c.substring(0,7)||"https://"==c.substring(0,8);f&&!navigator.onLine?c=d.svgBrokenImage.src:!f||c.substring(0,a.baseUrl.length)==a.baseUrl||d.crossOriginImages&&d.editor.isCorsEnabledForUrl(c)? +"chrome-extension://"!=c.substring(0,19)&&(c=b.apply(this,arguments)):c=PROXY_URL+"?url="+encodeURIComponent(c)}return c};return a};EditorUi.prototype.convertImages=function(a,b,d,e){null==e&&(e=this.createImageUrlConverter());var c=0,f=d||{};d=mxUtils.bind(this,function(d,k){for(var g=a.getElementsByTagName(d),l=0;l<g.length;l++)mxUtils.bind(this,function(d){try{if(null!=d){var g=e.convert(d.getAttribute(k));if(null!=g&&"data:"!=g.substring(0,5)){var l=f[g];null==l?(c++,this.convertImageToDataUri(g, +function(e){null!=e&&(f[g]=e,d.setAttribute(k,e));c--;0==c&&b(a)})):d.setAttribute(k,l)}else null!=g&&d.setAttribute(k,g)}}catch(C){}})(g[l])});d("image","xlink:href");d("img","src");0==c&&b(a)};EditorUi.prototype.loadUrl=function(a,b,d,e,l,g,m){try{var c=!m&&(e||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||/(\.gif)($|\?)/i.test(a));l=null!=l?l:!0;var f=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=b){var f=a.getText(); +if(c){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){a=mxUtilsBinaryToArray(a.request.responseBody).toArray();for(var f=Array(a.length),e=0;e<a.length;e++)f[e]=String.fromCharCode(a[e]);f=f.join("")}g=null!=g?g:"data:image/png;base64,";f=g+this.base64Encode(f)}b(f)}}else null!=d&&d({message:mxResources.get("error")+" "+a.getStatus()},a)}),function(a){null!=d&&d({message:mxResources.get("error")+" "+a.getStatus()})},c,this.timeout,function(){l&& +null!=d&&d({code:App.ERROR_TIMEOUT,retry:f})})});f()}catch(F){null!=d&&d(F)}};EditorUi.prototype.isCorsEnabledForUrl=function(a){return this.editor.isCorsEnabledForUrl(a)};EditorUi.prototype.convertImageToDataUri=function(a,b){try{var c=!0,d=window.setTimeout(mxUtils.bind(this,function(){c=!1;b(this.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){window.clearTimeout(d);c&&b(this.createSvgDataUri(a.getText()))}),function(){window.clearTimeout(d); +c&&b(this.svgBrokenImage.src)});else{var f=new Image,e=this;this.crossOriginImages&&(f.crossOrigin="anonymous");f.onload=function(){window.clearTimeout(d);if(c)try{var a=document.createElement("canvas"),k=a.getContext("2d");a.height=f.height;a.width=f.width;k.drawImage(f,0,0);b(a.toDataURL())}catch(u){b(e.svgBrokenImage.src)}};f.onerror=function(){window.clearTimeout(d);c&&b(e.svgBrokenImage.src)};f.src=a}}catch(y){b(this.svgBrokenImage.src)}};EditorUi.prototype.importXml=function(a,b,d,e,l){b=null!= b?b:0;d=null!=d?d:0;var c=[];try{var f=this.editor.graph;if(null!=a&&0<a.length){f.model.beginUpdate();try{var k=mxUtils.parseXml(a),n=this.editor.extractGraphModel(k.documentElement,null!=this.pages);if(null!=n&&"mxfile"==n.nodeName&&null!=this.pages){var p=n.getElementsByTagName("diagram");if(1==p.length)n=Editor.parseDiagramNode(p[0]);else if(1<p.length){a={};var k=[],m=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(n=Editor.parseDiagramNode(p[0]),e=!1,m=1);for(;m<p.length;m++){var r= p[m].getAttribute("id");p[m].removeAttribute("id");var q=this.updatePageRoot(new DiagramPage(p[m]));a[r]=p[m].getAttribute("id");var t=this.pages.length;null==q.getName()&&q.setName(mxResources.get("pageWithNumber",[t+1]));f.model.execute(new ChangePage(this,q,q,t,!0));k.push(q)}this.updatePageLinks(a,k)}}null!=n&&"mxGraphModel"===n.nodeName&&(c=f.importGraphModel(n,b,d,e))}finally{f.model.endUpdate()}}}catch(J){if(l)throw J;this.handleError(J)}return c};EditorUi.prototype.updatePageLinks=function(a, b){for(var c=0;c<b.length;c++)this.updatePageLinksForCell(a,b[c].root)};EditorUi.prototype.updatePageLinksForCell=function(a,b){var c=document.createElement("div"),d=this.editor.graph,f=d.getLinkForCell(b);null!=f&&"data:page/id,"==f.substring(0,13)&&d.setLinkForCell(b,this.updatePageLink(a,f));if(d.isHtmlLabel(b)){c.innerHTML=d.getLabel(b);for(var e=c.getElementsByTagName("a"),l=!1,m=0;m<e.length;m++)f=e[m].getAttribute("href"),null!=f&&"data:page/id,"==f.substring(0,13)&&(e[m].setAttribute("href", this.updatePageLink(a,f)),l=!0);l&&d.labelChanged(b,c.innerHTML)}for(m=0;m<d.model.getChildCount(b);m++)this.updatePageLinksForCell(a,d.model.getChildAt(b,m))};EditorUi.prototype.updatePageLink=function(a,b){var c=a[b.substring(b.indexOf(",")+1)];return null!=c?"data:page/id,"+c:null};EditorUi.prototype.isRemoteVisioFormat=function(a){return/(\.v(sd|dx))($|\?)/i.test(a)||/(\.vs(s|x))($|\?)/i.test(a)};EditorUi.prototype.importVisio=function(a,b,d,e){e=null!=e?e:a.name;d=null!=d?d:mxUtils.bind(this, -function(a){this.handleError(a)});var c=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var c=this.isRemoteVisioFormat(e);try{var f="UNKNOWN-VISIO",k=e.lastIndexOf(".");0<=k&&k<e.length&&(f=e.substring(k+1).toUpperCase());EditorUi.logEvent({category:f+"-MS-IMPORT-FILE",action:"size_"+a.size,label:c?"remote":"local"})}catch(F){}if(c&&null!=VSD_CONVERT_URL){c=new FormData;c.append("file1",a,e);var l=new XMLHttpRequest;l.open("POST",VSD_CONVERT_URL);l.responseType="blob"; +function(a){this.handleError(a)});var c=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var c=this.isRemoteVisioFormat(e);try{var f="UNKNOWN-VISIO",k=e.lastIndexOf(".");0<=k&&k<e.length&&(f=e.substring(k+1).toUpperCase());EditorUi.logEvent({category:f+"-MS-IMPORT-FILE",action:"filename_"+e,label:c?"remote":"local"})}catch(F){}if(c&&null!=VSD_CONVERT_URL){c=new FormData;c.append("file1",a,e);var l=new XMLHttpRequest;l.open("POST",VSD_CONVERT_URL);l.responseType="blob"; l.onreadystatechange=mxUtils.bind(this,function(){if(4==l.readyState)if(200<=l.status&&299>=l.status)try{this.doImportVisio(l.response,b,d,e)}catch(F){d(F)}else d({})});l.send(c)}else try{this.doImportVisio(a,b,d,e)}catch(F){d(F)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?c():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",c))};EditorUi.prototype.importGraphML=function(a, b,d){d=null!=d?d:mxUtils.bind(this,function(a){this.handleError(a)});var c=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(a,b,d)}catch(n){d(n)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?c():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",c))};EditorUi.prototype.exportVisio=function(){var a=mxUtils.bind(this, function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams()||this.handleError({message:mxResources.get("unknownError")})}catch(f){this.handleError(f)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?a():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",a))};EditorUi.prototype.convertLucidChart=function(a, @@ -3128,14 +3128,14 @@ function(a,b,d,e,l,g,m,r,u,t,v){t=null!=t?t:!0;var c=!1,f=null,k=mxUtils.bind(th mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?k(a.responseText):null!=r&&r(null))}),m)):/(\.v(sd|dx))($|\?)/i.test(m)||/(\.vs(s|x))($|\?)/i.test(m)||(f=this.insertTextAt(this.validateFileData(a),d,e,!0,null,t));c||null==r||r(f);return f};EditorUi.prototype.base64Encode=function(a){for(var c="",b=0,d=a.length,e,g,l;b<d;){e=a.charCodeAt(b++)&255;if(b==d){c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e& 3)<<4);c+="==";break}g=a.charCodeAt(b++);if(b==d){c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(g&240)>>4);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((g&15)<<2);c+="=";break}l=a.charCodeAt(b++);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e& 3)<<4|(g&240)>>4);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((g&15)<<2|(l&192)>>6);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(l&63)}return c};EditorUi.prototype.importFiles=function(a,b,d,e,l,g,m,r,u,t,v,x){b=null!=b?b:0;d=null!=d?d:0;e=null!=e?e:this.maxImageSize;t=null!=t?t:this.maxImageBytes;var c=null!=b&&null!=d,f=!0,k=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var n=v||this.resampleThreshold,p=0;p<a.length;p++)if("image/"==a[p].type.substring(0, -6)&&a[p].size>n){k=!0;break}var A=mxUtils.bind(this,function(){var k=this.editor.graph,n=k.gridSize;l=null!=l?l:mxUtils.bind(this,function(a,b,d,f,e,k,g,l,n){return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,g)),null):this.importFile(a,b,d,f,e,k,g,l,n,c,x)});g=null!=g?g:mxUtils.bind(this,function(a){k.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var p=a.length,u=p,q=[],A=mxUtils.bind(this,function(a, -b){q[a]=b;if(0==--u){this.spinner.stop();if(null!=r)r(q);else{var c=[];k.getModel().beginUpdate();try{for(var d=0;d<q.length;d++){var f=q[d]();null!=f&&(c=c.concat(f))}}finally{k.getModel().endUpdate()}}g(c)}}),y=0;y<p;y++)mxUtils.bind(this,function(c){var g=a[c];if(null!=g){var p=new FileReader;p.onload=mxUtils.bind(this,function(a){if(null==m||m(g))if("image/"==g.type.substring(0,6))if("image/svg"==g.type.substring(0,9)){var p=a.target.result,u=p.indexOf(","),q=decodeURIComponent(escape(atob(p.substring(u+ -1)))),r=mxUtils.parseXml(q),q=r.getElementsByTagName("svg");if(0<q.length){var q=q[0],C=x?null:q.getAttribute("content");null!=C&&"<"!=C.charAt(0)&&"%"!=C.charAt(0)&&(C=unescape(window.atob?atob(C):Base64.decode(C,!0)));null!=C&&"%"==C.charAt(0)&&(C=decodeURIComponent(C));null==C||"<mxfile "!==C.substring(0,8)&&"<mxGraphModel "!==C.substring(0,14)?A(c,mxUtils.bind(this,function(){try{if(p.substring(0,u+1),null!=r){var a=r.getElementsByTagName("svg");if(0<a.length){var f=a[0],m=parseFloat(f.getAttribute("width")), -q=parseFloat(f.getAttribute("height")),v=f.getAttribute("viewBox");if(null==v||0==v.length)f.setAttribute("viewBox","0 0 "+m+" "+q);else if(isNaN(m)||isNaN(q)){var C=v.split(" ");3<C.length&&(m=parseFloat(C[2]),q=parseFloat(C[3]))}p=this.createSvgDataUri(mxUtils.getXml(f));var t=Math.min(1,Math.min(e/Math.max(1,m)),e/Math.max(1,q)),A=l(p,g.type,b+c*n,d+c*n,Math.max(1,Math.round(m*t)),Math.max(1,Math.round(q*t)),g.name);if(isNaN(m)||isNaN(q)){var y=new Image;y.onload=mxUtils.bind(this,function(){m= -Math.max(1,y.width);q=Math.max(1,y.height);A[0].geometry.width=m;A[0].geometry.height=q;f.setAttribute("viewBox","0 0 "+m+" "+q);p=this.createSvgDataUri(mxUtils.getXml(f));var a=p.indexOf(";");0<a&&(p=p.substring(0,a)+p.substring(p.indexOf(",",a+1)));k.setCellStyles("image",p,[A[0]])});y.src=this.createSvgDataUri(mxUtils.getXml(f))}return A}}}catch(Y){}return null})):A(c,mxUtils.bind(this,function(){return l(C,"text/xml",b+c*n,d+c*n,0,0,g.name)}))}else A(c,mxUtils.bind(this,function(){return null}))}else{q= -!1;if("image/png"==g.type){var y=x?null:this.extractGraphModelFromPng(a.target.result);if(null!=y&&0<y.length){var M=new Image;M.src=a.target.result;A(c,mxUtils.bind(this,function(){return l(y,"text/xml",b+c*n,d+c*n,M.width,M.height,g.name)}));q=!0}}q||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))): -this.loadImage(a.target.result,mxUtils.bind(this,function(k){this.resizeImage(k,a.target.result,mxUtils.bind(this,function(k,m,p){A(c,mxUtils.bind(this,function(){if(null!=k&&k.length<t){var u=f&&this.isResampleImage(a.target.result,v)?Math.min(1,Math.min(e/m,e/p)):1;return l(k,g.type,b+c*n,d+c*n,Math.round(m*u),Math.round(p*u),g.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),f,e,v)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else l(a.target.result, -g.type,b+c*n,d+c*n,240,160,g.name,function(a){A(c,function(){return a})})});/(\.v(dx|sdx?))($|\?)/i.test(g.name)||/(\.vs(x|sx?))($|\?)/i.test(g.name)?l(null,g.type,b+c*n,d+c*n,240,160,g.name,function(a){A(c,function(){return a})},g):"image"==g.type.substring(0,5)?p.readAsDataURL(g):p.readAsText(g)}})(y)});if(k){k=[];for(p=0;p<a.length;p++)k.push(a[p]);a=k;this.confirmImageResize(function(a){f=a;A()},u)}else A()};EditorUi.prototype.confirmImageResize=function(a,b){b=null!=b?b:!1;var c=null!=this.spinner&& +6)&&a[p].size>n){k=!0;break}var y=mxUtils.bind(this,function(){var k=this.editor.graph,n=k.gridSize;l=null!=l?l:mxUtils.bind(this,function(a,b,d,f,e,k,g,l,n){return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,g)),null):this.importFile(a,b,d,f,e,k,g,l,n,c,x)});g=null!=g?g:mxUtils.bind(this,function(a){k.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var p=a.length,u=p,q=[],y=mxUtils.bind(this,function(a, +b){q[a]=b;if(0==--u){this.spinner.stop();if(null!=r)r(q);else{var c=[];k.getModel().beginUpdate();try{for(var d=0;d<q.length;d++){var f=q[d]();null!=f&&(c=c.concat(f))}}finally{k.getModel().endUpdate()}}g(c)}}),z=0;z<p;z++)mxUtils.bind(this,function(c){var g=a[c];if(null!=g){var p=new FileReader;p.onload=mxUtils.bind(this,function(a){if(null==m||m(g))if("image/"==g.type.substring(0,6))if("image/svg"==g.type.substring(0,9)){var p=a.target.result,u=p.indexOf(","),q=decodeURIComponent(escape(atob(p.substring(u+ +1)))),r=mxUtils.parseXml(q),q=r.getElementsByTagName("svg");if(0<q.length){var q=q[0],B=x?null:q.getAttribute("content");null!=B&&"<"!=B.charAt(0)&&"%"!=B.charAt(0)&&(B=unescape(window.atob?atob(B):Base64.decode(B,!0)));null!=B&&"%"==B.charAt(0)&&(B=decodeURIComponent(B));null==B||"<mxfile "!==B.substring(0,8)&&"<mxGraphModel "!==B.substring(0,14)?y(c,mxUtils.bind(this,function(){try{if(p.substring(0,u+1),null!=r){var a=r.getElementsByTagName("svg");if(0<a.length){var f=a[0],m=parseFloat(f.getAttribute("width")), +q=parseFloat(f.getAttribute("height")),v=f.getAttribute("viewBox");if(null==v||0==v.length)f.setAttribute("viewBox","0 0 "+m+" "+q);else if(isNaN(m)||isNaN(q)){var y=v.split(" ");3<y.length&&(m=parseFloat(y[2]),q=parseFloat(y[3]))}p=this.createSvgDataUri(mxUtils.getXml(f));var B=Math.min(1,Math.min(e/Math.max(1,m)),e/Math.max(1,q)),t=l(p,g.type,b+c*n,d+c*n,Math.max(1,Math.round(m*B)),Math.max(1,Math.round(q*B)),g.name);if(isNaN(m)||isNaN(q)){var z=new Image;z.onload=mxUtils.bind(this,function(){m= +Math.max(1,z.width);q=Math.max(1,z.height);t[0].geometry.width=m;t[0].geometry.height=q;f.setAttribute("viewBox","0 0 "+m+" "+q);p=this.createSvgDataUri(mxUtils.getXml(f));var a=p.indexOf(";");0<a&&(p=p.substring(0,a)+p.substring(p.indexOf(",",a+1)));k.setCellStyles("image",p,[t[0]])});z.src=this.createSvgDataUri(mxUtils.getXml(f))}return t}}}catch(Y){}return null})):y(c,mxUtils.bind(this,function(){return l(B,"text/xml",b+c*n,d+c*n,0,0,g.name)}))}else y(c,mxUtils.bind(this,function(){return null}))}else{q= +!1;if("image/png"==g.type){var z=x?null:this.extractGraphModelFromPng(a.target.result);if(null!=z&&0<z.length){var M=new Image;M.src=a.target.result;y(c,mxUtils.bind(this,function(){return l(z,"text/xml",b+c*n,d+c*n,M.width,M.height,g.name)}));q=!0}}q||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))): +this.loadImage(a.target.result,mxUtils.bind(this,function(k){this.resizeImage(k,a.target.result,mxUtils.bind(this,function(k,m,p){y(c,mxUtils.bind(this,function(){if(null!=k&&k.length<t){var u=f&&this.isResampleImage(a.target.result,v)?Math.min(1,Math.min(e/m,e/p)):1;return l(k,g.type,b+c*n,d+c*n,Math.round(m*u),Math.round(p*u),g.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),f,e,v)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else l(a.target.result, +g.type,b+c*n,d+c*n,240,160,g.name,function(a){y(c,function(){return a})})});/(\.v(dx|sdx?))($|\?)/i.test(g.name)||/(\.vs(x|sx?))($|\?)/i.test(g.name)?l(null,g.type,b+c*n,d+c*n,240,160,g.name,function(a){y(c,function(){return a})},g):"image"==g.type.substring(0,5)?p.readAsDataURL(g):p.readAsText(g)}})(z)});if(k){k=[];for(p=0;p<a.length;p++)k.push(a[p]);a=k;this.confirmImageResize(function(a){f=a;y()},u)}else y()};EditorUi.prototype.confirmImageResize=function(a,b){b=null!=b?b:!1;var c=null!=this.spinner&& null!=this.spinner.pause?this.spinner.pause():function(){},d=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,f=function(d,f){if(d||b)mxSettings.setResizeImages(d?f:null),mxSettings.save();c();a(f)};null==d||b?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(a){f(a,!0)},function(a){f(a,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+ Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,!0,!0):f(!1,d)};EditorUi.prototype.parseFile=function(a,b,d){d=null!=d?d:a.name;var c=new FormData;c.append("format","xml");c.append("upfile",a,d);var f=new XMLHttpRequest;f.open("POST",OPEN_URL);f.onreadystatechange=function(){b(f)};f.send(c);try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+a.size})}catch(g){}};EditorUi.prototype.isResampleImage=function(a, b){b=null!=b?b:this.resampleThreshold;return a.length>b};EditorUi.prototype.resizeImage=function(a,b,d,e,l,g){l=null!=l?l:this.maxImageSize;var c=Math.max(1,a.width),f=Math.max(1,a.height);if(e&&this.isResampleImage(b,g))try{var k=Math.max(c/l,f/l);if(1<k){var n=Math.round(c/k),m=Math.round(f/k),p=document.createElement("canvas");p.width=n;p.height=m;p.getContext("2d").drawImage(a,0,0,n,m);var q=p.toDataURL();if(q.length<b.length){var r=document.createElement("canvas");r.width=n;r.height=m;var t= @@ -3143,7 +3143,7 @@ r.toDataURL();q!==t&&(b=q,c=n,f=m)}}}catch(P){}d(b,c,f)};EditorUi.prototype.crcT 255];return(b^-1)>>>0};EditorUi.prototype.writeGraphModelToPng=function(a,b,d,e,l){function c(a,b){var c=n;n+=b;return a.substring(c,n)}function f(a){a=c(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function k(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var n=0;if(c(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=l&&l();else if(c(a, 4),"IHDR"!=c(a,4))null!=l&&l();else{c(a,17);l=a.substring(0,n);do{var m=f(a);if("IDAT"==c(a,4)){l=a.substring(0,n-8);d=d+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+e;e=4294967295;e=this.updateCRC(e,b,0,4);e=this.updateCRC(e,d,0,d.length);l+=k(d.length)+b+d+k(e^4294967295);l+=a.substring(n-8,a.length);break}l+=a.substring(n-8,n-4+m);c(a,m);c(a,4)}while(m);return"data:image/png;base64,"+(window.btoa?btoa(l):Base64.encode(l,!0))}};EditorUi.prototype.extractGraphModelFromPng=function(a){return Editor.extractGraphModelFromPng(a)}; EditorUi.prototype.loadImage=function(a,b,d){try{var c=new Image;c.onload=function(){b(c)};null!=d&&(c.onerror=d);c.src=a}catch(n){if(null!=d)d(n);else throw n;}};var r=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();"undefined"!==typeof window.mxSettings&&(this.formatWidth=mxSettings.getFormatWidth());var a=this,b=this.editor.graph;b.getLinkTitle=function(b){return a.getLinkTitle(b)};b.customLinkClicked=function(b){var c= -!1;try{a.handleCustomLink(b),c=!0}catch(C){a.handleError(C)}return c};var d=this.clearDefaultStyle;this.clearDefaultStyle=function(){d.apply(this,arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://desk.draw.io/support/solutions/articles/16000051979");var e=a.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(b){b=null!=b?b:"";if(null!=a.pages&&null!=a.currentPage)for(var c=0;c<a.pages.length;c++)if(a.pages[c]==a.currentPage){0< +!1;try{a.handleCustomLink(b),c=!0}catch(B){a.handleError(B)}return c};var d=this.clearDefaultStyle;this.clearDefaultStyle=function(){d.apply(this,arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://desk.draw.io/support/solutions/articles/16000051979");var e=a.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(b){b=null!=b?b:"";if(null!=a.pages&&null!=a.currentPage)for(var c=0;c<a.pages.length;c++)if(a.pages[c]==a.currentPage){0< c&&(b+=(0<b.length?"&":"?")+"page="+c);break}"1"==urlParams.dev&&(b+=(0<b.length?"&":"?")+"dev=1&drawdev=1");return e.apply(this,arguments)};var l=b.addClickHandler;b.addClickHandler=function(a,c,d){var f=c;c=function(a,c){if(null==c){var d=mxEvent.getSource(a);"a"==d.nodeName.toLowerCase()&&(c=d.getAttribute("href"))}null!=c&&b.isCustomLink(c)&&(mxEvent.isTouchEvent(a)||!mxEvent.isPopupTrigger(a))&&b.customLinkClicked(c)&&mxEvent.consume(a);null!=f&&f(a,c)};l.call(this,a,c,d)};r.apply(this,arguments); mxClient.IS_SVG&&this.editor.graph.addSvgShadow(b.view.canvas.ownerSVGElement,null,!0);a.actions.get("print").funct=function(){a.showDialog((new PrintDialog(a)).container,360,null!=a.pages&&1<a.pages.length?420:360,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var g=b.getGlobalVariable;b.getGlobalVariable=function(b){return"page"==b&&null!=a.currentPage?a.currentPage.getName():"pagenumber"==b?null!=a.currentPage&&null!=a.pages?mxUtils.indexOf(a.pages,a.currentPage)+1:1:g.apply(this, arguments)};var m=b.labelLinkClicked;b.labelLinkClicked=function(a,c,d){var f=c.getAttribute("href");if(null==f||!b.isCustomLink(f)||!mxEvent.isTouchEvent(d)&&mxEvent.isPopupTrigger(d))m.apply(this,arguments);else{if(!b.isEnabled()||null!=a&&b.isCellLocked(a.cell))b.customLinkClicked(f),b.getRubberband().reset();mxEvent.consume(d)}};this.editor.getOrCreateFilename=function(){var b=a.defaultFilename,c=a.getCurrentFile();null!=c&&(b=null!=c.getTitle()?c.getTitle():b);return b};var t=this.actions.get("print"); @@ -3152,13 +3152,13 @@ t.setEnabled(!mxClient.IS_IOS||!navigator.standalone);t.visible=t.isEnabled();if k.kind){if(b.isEditing())this.importFiles([k.getAsFile()],0,0,this.maxImageSize,function(a,c,d,f,e,k){b.insertImage(a,e,k)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()});else{var g=this.editor.graph.getInsertPoint();this.importFiles([k.getAsFile()],g.x,g.y,this.maxImageSize);mxEvent.consume(a)}break}}}}catch(D){}}),!1);var x=document.createElement("div");x.setAttribute("autocomplete","off");x.setAttribute("autocorrect","off");x.setAttribute("autocapitalize", "off");x.setAttribute("spellcheck","false");x.style.position="absolute";x.style.whiteSpace="nowrap";x.style.overflow="hidden";x.style.display="block";x.contentEditable=!0;mxUtils.setOpacity(x,0);x.style.width="1px";x.style.height="1px";x.innerHTML=" ";var v=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(a){var c=mxEvent.getSource(a);null==b.container|| !b.isEnabled()||b.isMouseDown||b.isEditing()||null!=this.dialog||"INPUT"==c.nodeName||"TEXTAREA"==c.nodeName||!(224==a.keyCode||!mxClient.IS_MAC&&17==a.keyCode||mxClient.IS_MAC&&91==a.keyCode)||v||(x.style.left=b.container.scrollLeft+10+"px",x.style.top=b.container.scrollTop+10+"px",b.container.appendChild(x),v=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){x.focus();document.execCommand("selectAll",!1,null)},0):(x.focus(),document.execCommand("selectAll",!1,null)))}));mxEvent.addListener(document, -"keyup",mxUtils.bind(this,function(a){var c=a.keyCode;window.setTimeout(mxUtils.bind(this,function(){!v||224!=c&&17!=c&&91!=c||(v=!1,b.isEditing()||null!=this.dialog||null==b.container||b.container.focus(),x.parentNode.removeChild(x),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(x,"copy",mxUtils.bind(this,function(a){if(b.isEnabled())try{mxClipboard.copy(b),this.copyCells(x),u()}catch(K){this.handleError(K)}}));mxEvent.addListener(x,"cut",mxUtils.bind(this,function(a){if(b.isEnabled())try{mxClipboard.copy(b), -this.copyCells(x,!0),u()}catch(K){this.handleError(K)}}));mxEvent.addListener(x,"paste",mxUtils.bind(this,function(a){b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(x.innerHTML=" ",x.focus(),window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,x);x.innerHTML=" "}),0))}),!0);var z=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==x?!0:z.apply(this,arguments)}}this.spinner=this.createSpinner(document.body.clientWidth/2-2,Math.max(document.body.clientHeight|| +"keyup",mxUtils.bind(this,function(a){var c=a.keyCode;window.setTimeout(mxUtils.bind(this,function(){!v||224!=c&&17!=c&&91!=c||(v=!1,b.isEditing()||null!=this.dialog||null==b.container||b.container.focus(),x.parentNode.removeChild(x),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(x,"copy",mxUtils.bind(this,function(a){if(b.isEnabled())try{mxClipboard.copy(b),this.copyCells(x),u()}catch(L){this.handleError(L)}}));mxEvent.addListener(x,"cut",mxUtils.bind(this,function(a){if(b.isEnabled())try{mxClipboard.copy(b), +this.copyCells(x,!0),u()}catch(L){this.handleError(L)}}));mxEvent.addListener(x,"paste",mxUtils.bind(this,function(a){b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(x.innerHTML=" ",x.focus(),window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,x);x.innerHTML=" "}),0))}),!0);var A=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==x?!0:A.apply(this,arguments)}}this.spinner=this.createSpinner(document.body.clientWidth/2-2,Math.max(document.body.clientHeight|| 0,document.documentElement.clientHeight||0)/2,24);Graph.fileSupport&&this.editor.graph.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(a){var b=this.editor.graph,c=b.cellEditor.text2,d=null;null!=c&&(mxEvent.addListener(c,"dragleave",function(a){null!=d&&(d.parentNode.removeChild(d),d=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(a){null==d&&(!mxClient.IS_IE||10<document.documentMode)&&(d=this.highlightElement(c));a.stopPropagation(); a.preventDefault()})),mxEvent.addListener(c,"drop",mxUtils.bind(this,function(a){null!=d&&(d.parentNode.removeChild(d),d=null);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,function(a,c,d,f,e,k){b.insertImage(a,e,k)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},mxEvent.isControlDown(a));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")){var c=a.dataTransfer.getData("text/uri-list"); /\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)?this.loadImage(decodeURIComponent(c),mxUtils.bind(this,function(a){var d=Math.max(1,a.width);a=Math.max(1,a.height);var f=this.maxImageSize,f=Math.min(1,Math.min(f/Math.max(1,d)),f/Math.max(1,a));b.insertImage(decodeURIComponent(c),d*f,a*f)})):document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(a.dataTransfer.types, "text/plain")&&document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"));a.stopPropagation();a.preventDefault()})))}));if("1"==urlParams.ruler&&"undefined"!==typeof mxRuler){t=document.createElement("div");t.style.position="absolute";t.style.top="95px";t.style.left="250px";t.style.width="2000px";t.style.height="30px";t.style.background="whiteSmoke";document.body.appendChild(t);var q=document.createElement("div");q.style.position="absolute";q.style.top="125px";q.style.left="220px"; -q.style.width="30px";q.style.height="1000px";q.style.background="whiteSmoke";document.body.appendChild(q);var B=document.createElement("div");B.style.position="absolute";B.style.top="95px";B.style.left="220px";B.style.width="30px";B.style.height="30px";B.style.background="whiteSmoke";document.body.appendChild(B);this.vRuler=new mxRuler(this.editor.graph,q,!0);this.hRuler=new mxRuler(this.editor.graph,t,!1)}if("1"==urlParams.styledev){t=document.getElementById("geFooter");null!=t&&(this.styleInput= +q.style.width="30px";q.style.height="1000px";q.style.background="whiteSmoke";document.body.appendChild(q);var C=document.createElement("div");C.style.position="absolute";C.style.top="95px";C.style.left="220px";C.style.width="30px";C.style.height="30px";C.style.background="whiteSmoke";document.body.appendChild(C);this.vRuler=new mxRuler(this.editor.graph,q,!0);this.hRuler=new mxRuler(this.editor.graph,t,!1)}if("1"==urlParams.styledev){t=document.getElementById("geFooter");null!=t&&(this.styleInput= document.createElement("input"),this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),t.appendChild(this.styleInput), this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){if(0<this.editor.graph.getSelectionCount()){var c=this.editor.graph.getSelectionCell(),c=this.editor.graph.getModel().getStyle(c);this.styleInput.value=c||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var J=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:J.apply(this,arguments)}}t=document.getElementById("geInfo"); null!=t&&t.parentNode.removeChild(t);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var P=null;mxEvent.addListener(b.container,"dragleave",function(a){b.isEnabled()&&(null!=P&&(P.parentNode.removeChild(P),P=null),a.stopPropagation(),a.preventDefault())});mxEvent.addListener(b.container,"dragover",mxUtils.bind(this,function(a){null==P&&(!mxClient.IS_IE||10<document.documentMode)&&(P=this.highlightElement(b.container));null!=this.sidebar&&this.sidebar.hideTooltip();a.stopPropagation(); @@ -3202,32 +3202,32 @@ g.button);null!=g.modified&&(this.editor.modified=g.modified);return}if("prompt" xml:b,blank:b==this.emptyDiagramXml,name:c}),"*"):(a(b,f,b!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,k?mxUtils.bind(this,function(a){this.remoteInvoke("getRecentDiagrams",null,null,a,function(){a(null,"Network Error!")})}):null,m?mxUtils.bind(this,function(a,b){this.remoteInvoke("searchDiagrams",[a],null,b,function(){b(null,"Network Error!")})}):null,mxUtils.bind(this,function(a,b,c){l.postMessage(JSON.stringify({event:"template", docUrl:a,info:b,name:c}),"*")}),null,null,n?mxUtils.bind(this,function(a){this.remoteInvoke("getCustomTemplates",null,null,a,function(){a({},0)})}):null);this.showDialog(k.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));k.init();return}if("textContent"==g.action){k=this.getDiagramTextContent();l.postMessage(JSON.stringify({event:"textContent",data:k,message:g}),"*");return}if("status"==g.action){null!=g.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(g.messageKey))): null!=g.message&&this.editor.setStatus(mxUtils.htmlEntities(g.message));null!=g.modified&&(this.editor.modified=g.modified);return}if("spinner"==g.action){var q=null!=g.messageKey?mxResources.get(g.messageKey):g.message;null==g.show||g.show?this.spinner.spin(document.body,q):this.spinner.stop();return}if("export"==g.action){if("png"==g.format||"xmlpng"==g.format){if(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin)){var p=null!=g.xml? -g.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var r=this.editor.graph,t=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();var b=this.createLoadMessage("export");b.format=g.format;b.message=g;b.data=a;b.xml=encodeURIComponent(p);l.postMessage(JSON.stringify(b),"*")}),A=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);"xmlpng"==g.format&&(a=this.writeGraphModelToPng(a,"zTXt","mxGraphModel",atob(Graph.compress(p))));r!=this.editor.graph&&r.container.parentNode.removeChild(r.container); -t(a)});if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage!=this.pages[0]){var r=this.createTemporaryGraph(r.getStylesheet()),x=r.getGlobalVariable,C=this.pages[0];r.getGlobalVariable=function(a){return"page"==a?C.getName():"pagenumber"==a?1:x.apply(this,arguments)};document.body.appendChild(r.container);r.model.setRoot(C.root)}this.exportToCanvas(mxUtils.bind(this,function(a){A(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,function(){A(null)}),null,null,g.scale,null, -null,null,r)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==g.format?"1":"0")+(null!=g.scale?"&scale="+g.scale:"")+"&base64=1&xml="+encodeURIComponent(encodeURIComponent(p)))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?t("data:image/png;base64,"+a.getText()):A(null)}),mxUtils.bind(this,function(){A(null)}))}}else{null!=g.xml&&0<g.xml.length&&this.setFileData(g.xml);q=this.createLoadMessage("export");if("html2"==g.format||"html"==g.format&&("0"!=urlParams.pages|| +g.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var r=this.editor.graph,t=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();var b=this.createLoadMessage("export");b.format=g.format;b.message=g;b.data=a;b.xml=encodeURIComponent(p);l.postMessage(JSON.stringify(b),"*")}),y=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);"xmlpng"==g.format&&(a=this.writeGraphModelToPng(a,"zTXt","mxGraphModel",atob(Graph.compress(p))));r!=this.editor.graph&&r.container.parentNode.removeChild(r.container); +t(a)});if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage!=this.pages[0]){var r=this.createTemporaryGraph(r.getStylesheet()),x=r.getGlobalVariable,B=this.pages[0];r.getGlobalVariable=function(a){return"page"==a?B.getName():"pagenumber"==a?1:x.apply(this,arguments)};document.body.appendChild(r.container);r.model.setRoot(B.root)}this.exportToCanvas(mxUtils.bind(this,function(a){y(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,function(){y(null)}),null,null,g.scale,null, +null,null,r)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==g.format?"1":"0")+(null!=g.scale?"&scale="+g.scale:"")+"&base64=1&xml="+encodeURIComponent(encodeURIComponent(p)))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?t("data:image/png;base64,"+a.getText()):y(null)}),mxUtils.bind(this,function(){y(null)}))}}else{null!=g.xml&&0<g.xml.length&&this.setFileData(g.xml);q=this.createLoadMessage("export");if("html2"==g.format||"html"==g.format&&("0"!=urlParams.pages|| null!=this.pages&&1<this.pages.length))k=this.getXmlFileData(),q.xml=mxUtils.getXml(k),q.data=this.getFileData(null,null,!0,null,null,null,k),q.format=g.format;else if("html"==g.format)p=this.editor.getGraphXml(),q.data=this.getHtml(p,this.editor.graph),q.xml=mxUtils.getXml(p),q.format=g.format;else{mxSvgCanvas2D.prototype.foAltText=null;k=this.editor.graph.background;k==mxConstants.NONE&&(k=null);q.xml=this.getFileData(!0);q.format="svg";if(g.embedImages||null==g.embedImages){if(null==g.spin&&null== g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin))this.editor.graph.setEnabled(!1),"xmlsvg"==g.format?this.getEmbeddedSvg(q.xml,this.editor.graph,null,!0,mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();q.data=this.createSvgDataUri(a);l.postMessage(JSON.stringify(q),"*")})):this.convertImages(this.editor.graph.getSvg(k),mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();q.data=this.createSvgDataUri(mxUtils.getXml(a)); l.postMessage(JSON.stringify(q),"*")}));return}k="xmlsvg"==g.format?this.getEmbeddedSvg(this.getFileData(!0),this.editor.graph,null,!0):mxUtils.getXml(this.editor.graph.getSvg(k));q.data=this.createSvgDataUri(k)}l.postMessage(JSON.stringify(q),"*")}return}if("load"==g.action)d=1==g.autosave,this.hideDialog(),null!=g.modified&&null==urlParams.modified&&(urlParams.modified=g.modified),null!=g.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=g.saveAndExit),null!=g.title&&null!=this.buttonContainer&& (m=document.createElement("span"),mxUtils.write(m,g.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="6px",this.buttonContainer.style.right="25px"):"min"!=uiTheme&&(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(m),this.embedFilenameSpan=m),g=null!=g.xmlpng?this.extractGraphModelFromPng(g.xmlpng): -g.xml;else{"remoteInvokeReady"==g.action?this.handleRemoteInvokeReady(l):"remoteInvoke"==g.action?this.handleRemoteInvoke(g):"remoteInvokeResponse"==g.action?this.handleRemoteInvokeResponse(g):l.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(g)}),"*");return}}var y=mxUtils.bind(this,function(f,g){c=!0;try{a(f,g)}catch(ca){this.handleError(ca)}c=!1;null!=urlParams.modified&&this.editor.setStatus("");var k=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&& +g.xml;else{"remoteInvokeReady"==g.action?this.handleRemoteInvokeReady(l):"remoteInvoke"==g.action?this.handleRemoteInvoke(g):"remoteInvokeResponse"==g.action?this.handleRemoteInvokeResponse(g):l.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(g)}),"*");return}}var z=mxUtils.bind(this,function(f,g){c=!0;try{a(f,g)}catch(ca){this.handleError(ca)}c=!1;null!=urlParams.modified&&this.editor.setStatus("");var k=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&& 1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});e=k();d&&null==b&&(b=mxUtils.bind(this,function(a,b){var d=k();if(d!=e&&!c){var f=this.createLoadMessage("autosave");f.xml=d;d=JSON.stringify(f);(window.opener||window.parent).postMessage(d,"*")}e=d}),this.editor.graph.model.addListener(mxEvent.CHANGE,b),this.editor.graph.addListener("gridSizeChanged",b),this.editor.graph.addListener("shadowVisibleChanged",b),this.addListener("pageFormatChanged",b),this.addListener("pageScaleChanged", b),this.addListener("backgroundColorChanged",b),this.addListener("backgroundImageChanged",b),this.addListener("foldingEnabledChanged",b),this.addListener("mathEnabledChanged",b),this.addListener("gridEnabledChanged",b),this.addListener("guidesEnabledChanged",b),this.addListener("pageViewChanged",b));"1"!=urlParams.returnbounds&&"json"!=urlParams.proto||l.postMessage(JSON.stringify(this.createLoadMessage("load")),"*")});null!=g&&"function"===typeof g.substring&&"data:application/vnd.visio;base64,"== -g.substring(0,34)?(k="0M8R4KGxGuE"==g.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(g.substring(g.indexOf(",")+1)),function(a){y(a,f)},mxUtils.bind(this,function(a){this.handleError(a)}),k)):null!=g&&"function"===typeof g.substring&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(g,"")?this.parseFile(new Blob([g],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&"<mxGraphModel"==a.responseText.substring(0, -13)&&y(a.responseText,f)}),""):null!=g&&"function"===typeof g.substring&&this.isLucidChartData(g)?this.convertLucidChart(g,mxUtils.bind(this,function(a){y(a)}),mxUtils.bind(this,function(a){this.handleError(a)})):(g=k(g),y(g,f))}}));var l=window.opener||window.parent,g="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";l.postMessage(g,"*")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar){var a=document.createElement("div");a.style.display="inline-block"; +g.substring(0,34)?(k="0M8R4KGxGuE"==g.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(g.substring(g.indexOf(",")+1)),function(a){z(a,f)},mxUtils.bind(this,function(a){this.handleError(a)}),k)):null!=g&&"function"===typeof g.substring&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(g,"")?this.parseFile(new Blob([g],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&"<mxGraphModel"==a.responseText.substring(0, +13)&&z(a.responseText,f)}),""):null!=g&&"function"===typeof g.substring&&this.isLucidChartData(g)?this.convertLucidChart(g,mxUtils.bind(this,function(a){z(a)}),mxUtils.bind(this,function(a){this.handleError(a)})):(g=k(g),z(g,f))}}));var l=window.opener||window.parent,g="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";l.postMessage(g,"*")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar){var a=document.createElement("div");a.style.display="inline-block"; a.style.position="absolute";a.style.paddingTop="atlas"==uiTheme?"2px":"3px";a.style.paddingLeft="8px";a.style.paddingBottom="2px";var b=document.createElement("button");b.className="geBigButton";b.style.fontSize="12px";b.style.padding="4px 6px 4px 6px";b.style.borderRadius="3px";"1"==urlParams.noSaveBtn?(mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",mxResources.get("saveAndExit")),mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})), a.appendChild(b)):(mxUtils.write(b,mxResources.get("save")),b.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),a.appendChild(b),"1"==urlParams.saveAndExit&&(b=document.createElement("a"),mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",mxResources.get("saveAndExit")),b.style.fontSize="12px",b.style.marginLeft="6px",b.style.padding="4px",b.style.cursor="pointer", mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b)));b=document.createElement("a");mxUtils.write(b,mxResources.get("exit"));b.setAttribute("title",mxResources.get("exit"));b.style.fontSize="12px";b.style.marginLeft="6px";b.style.marginRight="20px";b.style.padding="4px";b.style.cursor="pointer";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()}));a.appendChild(b);this.toolbar.container.appendChild(a); this.toolbar.staticElements.push(a);a.style.right="atlas"!=uiTheme?"52px":"42px"}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(a){this.importCsv(a)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://about.draw.io/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null, null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.executeLayoutList=function(a,b){for(var c=this.editor.graph,d=c.getSelectionCells(),f=0;f<a.length;f++){var e=new window[a[f].layout](c);if(null!=a[f].config)for(var l in a[f].config)e[l]=a[f].config[l];this.executeLayout(function(){e.execute(c.getDefaultParent(),0==d.length?null:d)},f==a.length-1,b)}};EditorUi.prototype.importCsv=function(a,b){try{var c=a.split("\n"),d=[],f=[],e={};if(0<c.length){var l={},m=null,r=null,t=null,v=null, -x=null,q=null,z=null,J=null,P="",G="auto",K="auto",C=null,L=null,M=40,U=40,ja=100,ca=0,D=this.editor.graph;D.getGraphBounds();for(var W=function(){null!=b?b(ba):(D.setSelectionCells(ba),D.scrollCellToVisible(D.getSelectionCell()))},qa=D.getFreeInsertPoint(),ka=qa.x,la=qa.y,qa=la,ga=null,Q="auto",J=null,X=[],na=null,da=null,R=0;R<c.length&&"#"==c[R].charAt(0);){a=c[R];for(R++;R<c.length&&"\\"==a.charAt(a.length-1)&&"#"==c[R].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(c[R].substring(1)),R++; -if("#"!=a.charAt(1)){var ha=a.indexOf(":");if(0<ha){var O=mxUtils.trim(a.substring(1,ha)),H=mxUtils.trim(a.substring(ha+1));"label"==O?ga=D.sanitizeHtml(H):"labelname"==O&&0<H.length&&"-"!=H?v=H:"labels"==O&&0<H.length&&"-"!=H?x=JSON.parse(H):"style"==O?m=H:"parentstyle"==O?q=H:"stylename"==O&&0<H.length&&"-"!=H?t=H:"styles"==O&&0<H.length&&"-"!=H?r=JSON.parse(H):"identity"==O&&0<H.length&&"-"!=H?z=H:"parent"==O&&0<H.length&&"-"!=H?J=H:"namespace"==O&&0<H.length&&"-"!=H?P=H:"width"==O?G=H:"height"== -O?K=H:"left"==O&&0<H.length?C=H:"top"==O&&0<H.length?L=H:"ignore"==O?da=H.split(","):"connect"==O?X.push(JSON.parse(H)):"link"==O?na=H:"padding"==O?ca=parseFloat(H):"edgespacing"==O?M=parseFloat(H):"nodespacing"==O?U=parseFloat(H):"levelspacing"==O?ja=parseFloat(H):"layout"==O&&(Q=H)}}}if(null==c[R])throw Error(mxResources.get("invalidOrMissingFile"));var aa=this.editor.csvToArray(c[R]),O=ha=null;if(null!=z||null!=J)for(var N=0;N<aa.length;N++)z==aa[N]&&(ha=N),J==aa[N]&&(O=N);null==ga&&(ga="%"+aa[0]+ -"%");if(null!=X)for(var S=0;S<X.length;S++)null==l[X[S].to]&&(l[X[S].to]={});D.model.beginUpdate();try{for(N=R+1;N<c.length;N++){var ea=this.editor.csvToArray(c[N]);if(null==ea){var fa=40<c[N].length?c[N].substring(0,40)+"...":c[N];throw Error(N+" ("+fa+") "+mxResources.get("containsValidationErrors"));}if(ea.length==aa.length){var I=null,oa=null!=ha?P+ea[ha]:null;null!=oa&&(I=D.model.getCell(oa));var z=null!=I,Y=new mxCell(ga,new mxGeometry(ka,qa,0,0),m||"whiteSpace=wrap;html=1;");Y.vertex=!0;Y.id= -oa;for(var Z=0;Z<ea.length;Z++)D.setAttributeForCell(Y,aa[Z],ea[Z]);if(null!=v&&null!=x){var Ba=x[Y.getAttribute(v)];null!=Ba&&D.labelChanged(Y,Ba)}if(null!=t&&null!=r){var xa=r[Y.getAttribute(t)];null!=xa&&(Y.style=xa)}D.setAttributeForCell(Y,"placeholders","1");Y.style=D.replacePlaceholders(Y,Y.style);z&&(D.model.setGeometry(I,Y.geometry),D.model.setStyle(I,Y.style),0>mxUtils.indexOf(f,I)&&f.push(I));I=Y;if(!z)for(S=0;S<X.length;S++)l[X[S].to][I.getAttribute(X[S].to)]=I;null!=na&&"link"!=na&&(D.setLinkForCell(I, -I.getAttribute(na)),D.setAttributeForCell(I,na,null));D.fireEvent(new mxEventObject("cellsInserted","cells",[I]));var ya=this.editor.graph.getPreferredSizeForCell(I);I.vertex&&(null!=C&&null!=I.getAttribute(C)&&(I.geometry.x=ka+parseFloat(I.getAttribute(C))),null!=L&&null!=I.getAttribute(L)&&(I.geometry.y=la+parseFloat(I.getAttribute(L))),"@"==G.charAt(0)&&null!=I.getAttribute(G.substring(1))?I.geometry.width=parseFloat(I.getAttribute(G.substring(1))):I.geometry.width="auto"==G?ya.width+ca:parseFloat(G), -"@"==K.charAt(0)&&null!=I.getAttribute(K.substring(1))?I.geometry.height=parseFloat(I.getAttribute(K.substring(1))):I.geometry.height="auto"==K?ya.height+ca:parseFloat(K),qa+=I.geometry.height+U);z?(null==e[oa]&&(e[oa]=[]),e[oa].push(I)):(J=null!=O?D.model.getCell(P+ea[O]):null,d.push(I),null!=J?(J.style=D.replacePlaceholders(J,q),D.addCell(I,J)):f.push(D.addCell(I)))}}for(var ia=f.slice(),ba=f.slice(),S=0;S<X.length;S++)for(var pa=X[S],N=0;N<f.length;N++){var I=f[N],Ca=mxUtils.bind(this,function(a, +x=null,q=null,A=null,J=null,P="",G="auto",L="auto",B=null,K=null,M=40,U=40,ja=100,ca=0,D=this.editor.graph;D.getGraphBounds();for(var W=function(){null!=b?b(ba):(D.setSelectionCells(ba),D.scrollCellToVisible(D.getSelectionCell()))},qa=D.getFreeInsertPoint(),ka=qa.x,la=qa.y,qa=la,ga=null,Q="auto",J=null,X=[],na=null,da=null,R=0;R<c.length&&"#"==c[R].charAt(0);){a=c[R];for(R++;R<c.length&&"\\"==a.charAt(a.length-1)&&"#"==c[R].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(c[R].substring(1)),R++; +if("#"!=a.charAt(1)){var ha=a.indexOf(":");if(0<ha){var O=mxUtils.trim(a.substring(1,ha)),H=mxUtils.trim(a.substring(ha+1));"label"==O?ga=D.sanitizeHtml(H):"labelname"==O&&0<H.length&&"-"!=H?v=H:"labels"==O&&0<H.length&&"-"!=H?x=JSON.parse(H):"style"==O?m=H:"parentstyle"==O?q=H:"stylename"==O&&0<H.length&&"-"!=H?t=H:"styles"==O&&0<H.length&&"-"!=H?r=JSON.parse(H):"identity"==O&&0<H.length&&"-"!=H?A=H:"parent"==O&&0<H.length&&"-"!=H?J=H:"namespace"==O&&0<H.length&&"-"!=H?P=H:"width"==O?G=H:"height"== +O?L=H:"left"==O&&0<H.length?B=H:"top"==O&&0<H.length?K=H:"ignore"==O?da=H.split(","):"connect"==O?X.push(JSON.parse(H)):"link"==O?na=H:"padding"==O?ca=parseFloat(H):"edgespacing"==O?M=parseFloat(H):"nodespacing"==O?U=parseFloat(H):"levelspacing"==O?ja=parseFloat(H):"layout"==O&&(Q=H)}}}if(null==c[R])throw Error(mxResources.get("invalidOrMissingFile"));var aa=this.editor.csvToArray(c[R]),O=ha=null;if(null!=A||null!=J)for(var N=0;N<aa.length;N++)A==aa[N]&&(ha=N),J==aa[N]&&(O=N);null==ga&&(ga="%"+aa[0]+ +"%");if(null!=X)for(var S=0;S<X.length;S++)null==l[X[S].to]&&(l[X[S].to]={});D.model.beginUpdate();try{for(N=R+1;N<c.length;N++){var ea=this.editor.csvToArray(c[N]);if(null==ea){var fa=40<c[N].length?c[N].substring(0,40)+"...":c[N];throw Error(N+" ("+fa+") "+mxResources.get("containsValidationErrors"));}if(ea.length==aa.length){var I=null,oa=null!=ha?P+ea[ha]:null;null!=oa&&(I=D.model.getCell(oa));var A=null!=I,Y=new mxCell(ga,new mxGeometry(ka,qa,0,0),m||"whiteSpace=wrap;html=1;");Y.vertex=!0;Y.id= +oa;for(var Z=0;Z<ea.length;Z++)D.setAttributeForCell(Y,aa[Z],ea[Z]);if(null!=v&&null!=x){var Ba=x[Y.getAttribute(v)];null!=Ba&&D.labelChanged(Y,Ba)}if(null!=t&&null!=r){var xa=r[Y.getAttribute(t)];null!=xa&&(Y.style=xa)}D.setAttributeForCell(Y,"placeholders","1");Y.style=D.replacePlaceholders(Y,Y.style);A&&(D.model.setGeometry(I,Y.geometry),D.model.setStyle(I,Y.style),0>mxUtils.indexOf(f,I)&&f.push(I));I=Y;if(!A)for(S=0;S<X.length;S++)l[X[S].to][I.getAttribute(X[S].to)]=I;null!=na&&"link"!=na&&(D.setLinkForCell(I, +I.getAttribute(na)),D.setAttributeForCell(I,na,null));D.fireEvent(new mxEventObject("cellsInserted","cells",[I]));var ya=this.editor.graph.getPreferredSizeForCell(I);I.vertex&&(null!=B&&null!=I.getAttribute(B)&&(I.geometry.x=ka+parseFloat(I.getAttribute(B))),null!=K&&null!=I.getAttribute(K)&&(I.geometry.y=la+parseFloat(I.getAttribute(K))),"@"==G.charAt(0)&&null!=I.getAttribute(G.substring(1))?I.geometry.width=parseFloat(I.getAttribute(G.substring(1))):I.geometry.width="auto"==G?ya.width+ca:parseFloat(G), +"@"==L.charAt(0)&&null!=I.getAttribute(L.substring(1))?I.geometry.height=parseFloat(I.getAttribute(L.substring(1))):I.geometry.height="auto"==L?ya.height+ca:parseFloat(L),qa+=I.geometry.height+U);A?(null==e[oa]&&(e[oa]=[]),e[oa].push(I)):(J=null!=O?D.model.getCell(P+ea[O]):null,d.push(I),null!=J?(J.style=D.replacePlaceholders(J,q),D.addCell(I,J)):f.push(D.addCell(I)))}}for(var ia=f.slice(),ba=f.slice(),S=0;S<X.length;S++)for(var pa=X[S],N=0;N<f.length;N++){var I=f[N],Ca=mxUtils.bind(this,function(a, b,c){var d=b.getAttribute(c.from);if(null!=d){D.setAttributeForCell(b,c.from,null);for(var d=d.split(","),f=0;f<d.length;f++){var e=l[c.to][d[f]];if(null!=e){var g=c.label;null!=c.fromlabel&&(g=(b.getAttribute(c.fromlabel)||"")+(g||""));null!=c.tolabel&&(g=(g||"")+(e.getAttribute(c.tolabel)||""));ba.push(D.insertEdge(null,null,g||"",c.invert?e:a,c.invert?a:e,c.style||D.createCurrentEdgeStyle()));mxUtils.remove(c.invert?a:e,ia)}}}});Ca(I,I,pa);if(null!=e[I.id])for(Z=0;Z<e[I.id].length;Z++)Ca(I,e[I.id][Z], -pa)}if(null!=da)for(N=0;N<d.length;N++)for(I=d[N],Z=0;Z<da.length;Z++)D.setAttributeForCell(I,mxUtils.trim(da[Z]),null);if(0<f.length){var ra=new mxParallelEdgeLayout(D);ra.spacing=M;var ma=function(){0<ra.spacing&&ra.execute(D.getDefaultParent());for(var a=0;a<f.length;a++){var b=D.getCellGeometry(f[a]);b.x=Math.round(D.snap(b.x));b.y=Math.round(D.snap(b.y));"auto"==G&&(b.width=Math.round(D.snap(b.width)));"auto"==K&&(b.height=Math.round(D.snap(b.height)))}};if("["==Q.charAt(0)){var Ka=W;D.view.validate(); +pa)}if(null!=da)for(N=0;N<d.length;N++)for(I=d[N],Z=0;Z<da.length;Z++)D.setAttributeForCell(I,mxUtils.trim(da[Z]),null);if(0<f.length){var ra=new mxParallelEdgeLayout(D);ra.spacing=M;var ma=function(){0<ra.spacing&&ra.execute(D.getDefaultParent());for(var a=0;a<f.length;a++){var b=D.getCellGeometry(f[a]);b.x=Math.round(D.snap(b.x));b.y=Math.round(D.snap(b.y));"auto"==G&&(b.width=Math.round(D.snap(b.width)));"auto"==L&&(b.height=Math.round(D.snap(b.height)))}};if("["==Q.charAt(0)){var Ka=W;D.view.validate(); this.executeLayoutList(JSON.parse(Q),function(){ma();Ka()});W=null}else if("circle"==Q){var za=new mxCircleLayout(D);za.resetEdges=!1;var La=za.isVertexIgnored;za.isVertexIgnored=function(a){return La.apply(this,arguments)||0>mxUtils.indexOf(f,a)};this.executeLayout(function(){za.execute(D.getDefaultParent());ma()},!0,W);W=null}else if("horizontaltree"==Q||"verticaltree"==Q||"auto"==Q&&ba.length==2*f.length-1&&1==ia.length){D.view.validate();var Aa=new mxCompactTreeLayout(D,"horizontaltree"==Q);Aa.levelDistance= U;Aa.edgeRouting=!1;Aa.resetEdges=!1;this.executeLayout(function(){Aa.execute(D.getDefaultParent(),0<ia.length?ia[0]:null)},!0,W);W=null}else if("horizontalflow"==Q||"verticalflow"==Q||"auto"==Q&&1==ia.length){D.view.validate();var va=new mxHierarchicalLayout(D,"horizontalflow"==Q?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);va.intraCellSpacing=U;va.parallelEdgeSpacing=M;va.interRankCellSpacing=ja;va.disableEdgeStyle=!1;this.executeLayout(function(){va.execute(D.getDefaultParent(),ba); D.moveCells(ba,ka,la)},!0,W);W=null}else if("organic"==Q||"auto"==Q&&ba.length>f.length){D.view.validate();var ta=new mxFastOrganicLayout(D);ta.forceConstant=3*U;ta.resetEdges=!1;var Ea=ta.isVertexIgnored;ta.isVertexIgnored=function(a){return Ea.apply(this,arguments)||0>mxUtils.indexOf(f,a)};ra=new mxParallelEdgeLayout(D);ra.spacing=M;this.executeLayout(function(){ta.execute(D.getDefaultParent());ma()},!0,W);W=null}}this.hideDialog()}finally{D.model.endUpdate()}null!=W&&W()}}catch(wa){this.handleError(wa)}}; @@ -3248,7 +3248,7 @@ function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.protot this.actions.get("autosave").setEnabled(null!=d&&d.isEditable()&&d.isAutosaveOptional());this.actions.get("guides").setEnabled(b);this.actions.get("editData").setEnabled(b);this.actions.get("shadowVisible").setEnabled(b);this.actions.get("connectionArrows").setEnabled(b);this.actions.get("connectionPoints").setEnabled(b);this.actions.get("copyStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("editGeometry").setEnabled(a.getModel().isVertex(a.getSelectionCell())); this.actions.get("createShape").setEnabled(b);this.actions.get("createRevision").setEnabled(b);this.actions.get("moveToFolder").setEnabled(null!=d);this.actions.get("makeCopy").setEnabled(null!=d&&!d.isRestricted());this.actions.get("editDiagram").setEnabled(b&&(null==d||!d.isRestricted()));this.actions.get("publishLink").setEnabled(null!=d&&!d.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("find").setEnabled("hidden"!=this.diagramContainer.style.visibility); this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=d&&d.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=d);this.menus.get("publish").setEnabled(null!=d&&!d.isRestricted());a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(b&&null!=a&&null!=a.shape&&null!=a.shape.stencil)}; -var z=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){this.editUpdateListener&&(this.editor.undoManager.removeListener(this.editUpdateListener),this.editUpdateListener=null);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);z.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,b,d,e,l,g){var c=a.editor.graph;if("xml"==d)a.hideDialog(), +var A=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){this.editUpdateListener&&(this.editor.undoManager.removeListener(this.editUpdateListener),this.editUpdateListener=null);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);A.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,b,d,e,l,g){var c=a.editor.graph;if("xml"==d)a.hideDialog(), a.saveData(b,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("svg"==d)a.hideDialog(),a.saveData(b,"svg",mxUtils.getXml(c.getSvg(e,l,g)),"image/svg+xml");else{var f=a.getFileData(!0,null,null,null,null,!0),k=c.getGraphBounds(),m=Math.floor(k.width*l/c.view.scale),n=Math.floor(k.height*l/c.view.scale);f.length<=MAX_REQUEST_SIZE&&m*n<MAX_AREA?(a.hideDialog(),"png"!=d&&"jpg"!=d&&"jpeg"!=d||!a.isExportToCanvas()?a.saveRequest(b,d,function(a,b){return new mxXmlRequest(EXPORT_URL,"format="+ d+"&base64="+(b||"0")+(null!=a?"&filename="+encodeURIComponent(a):"")+"&bg="+(null!=e?e:"none")+"&w="+m+"&h="+n+"&border="+g+"&xml="+encodeURIComponent(f))}):"png"==d?a.exportImage(l,null==e||"none"==e,!0,!1,!1,g,!0,!1):a.exportImage(l,!1,!0,!1,!1,g,!0,!1,"jpeg")):mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.updateEditReferences=function(a){for(var b=0;b<a.changes.length;b++){var c=a.changes[b];if(null!=c&&c.constructor==mxChildChange&&null!=c.child){var d=c.child;if(null!= d.source&&null!=d.source.id){var e=this.getFutureCellForEdit(c.model,a,d.source.id);e!=d.source&&(d.source=e)}null!=d.target&&null!=d.target.id&&(c=this.getFutureCellForEdit(c.model,a,d.target.id),c!=d.target&&(d.target=c))}}};EditorUi.prototype.getFutureCellForEdit=function(a,b,d){var c=a.getCell(d);if(null==c)for(var e=b.changes.length-1;0<=e;e--){var f=b.changes[e];if(f.constructor==mxChildChange&&null!=f.child&&f.child.id==d){a.contains(f.previous)&&(c=f.child);break}}return c};EditorUi.prototype.getDiagramTextContent= @@ -3256,39 +3256,39 @@ function(){this.editor.graph.setEnabled(!1);var a=this.editor.graph,b="";if(null var d=document.createElement("h3");mxUtils.write(d,mxUtils.htmlEntities(a));d.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(d);var e=document.createElement("div");e.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";e.innerHTML='<div style="text-align:center;padding:8px;"><img src="/images/spin.gif"></div>';var g={};try{var l=mxSettings.getCustomLibraries();for(a=0;a<l.length;a++){var m=l[a];if("R"==m.substring(0,1)){var r=JSON.parse(decodeURIComponent(m.substring(1))); g[r[0]]={id:r[0],title:r[1],downloadUrl:r[2]}}}}catch(F){}this.remoteInvoke("getCustomLibraries",null,null,function(a){e.innerHTML="";if(0==a.length)e.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var c=0;c<a.length;c++){var d=a[c];g[d.id]&&(b[d.id]=d);var f=this.addCheckbox(e,d.title,g[d.id]);(function(a,c){mxEvent.addListener(c,"change",function(){this.checked?b[a.id]=a:delete b[a.id]})})(d,f)}},mxUtils.bind(this, function(a){e.innerHTML="";var b=document.createElement("div");b.style.padding="8px";b.style.textAlign="center";mxUtils.write(b,mxResources.get("error")+": ");mxUtils.write(b,null!=a&&null!=a.message?a.message:mxResources.get("unknownError"));e.appendChild(b)}));c.appendChild(e);c=new CustomDialog(this,c,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var a=0,c;for(c in b)null==g[c]&&(a++,mxUtils.bind(this,function(b){this.remoteInvoke("getFileContent",[b.downloadUrl], -null,mxUtils.bind(this,function(c){a--;0==a&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,c,b))}catch(B){this.handleError(B,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){a--;0==a&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(b[c]));for(c in g)b[c]||this.closeLibrary(new RemoteLibrary(this,null,g[c]));0==a&&this.spinner.stop()}),null,null,"https://desk.draw.io/support/solutions/articles/16000092763");this.showDialog(c.container, +null,mxUtils.bind(this,function(c){a--;0==a&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,c,b))}catch(C){this.handleError(C,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){a--;0==a&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(b[c]));for(c in g)b[c]||this.closeLibrary(new RemoteLibrary(this,null,g[c]));0==a&&this.spinner.stop()}),null,null,"https://desk.draw.io/support/solutions/articles/16000092763");this.showDialog(c.container, 340,375,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1}};EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(a){this.remoteWin=a;for(var b=0;b<this.remoteInvokeQueue.length;b++)a.postMessage(this.remoteInvokeQueue[b],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(a){var b=a.msgMarkers,c=this.remoteInvokeCallbacks[b.callbackId]; a.error?c.error&&c.error(a.error.errResp):c.callback&&c.callback.apply(this,a.resp);this.remoteInvokeCallbacks[b.callbackId]=null};EditorUi.prototype.remoteInvoke=function(a,b,d,e,l){var c=!0,f=window.setTimeout(mxUtils.bind(this,function(){c=!1;l({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),k=mxUtils.bind(this,function(){window.clearTimeout(f);c&&e.apply(this,arguments)});d=d||{};d.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:k, error:l});a=JSON.stringify({event:"remoteInvoke",funtionName:a,functionArgs:b,msgMarkers:d});null!=this.remoteWin?this.remoteWin.postMessage(a,"*"):this.remoteInvokeQueue.push(a)};EditorUi.prototype.handleRemoteInvoke=function(a){var b=mxUtils.bind(this,function(b,c){var d={event:"remoteInvokeResponse",msgMarkers:a.msgMarkers};null!=c?d.error={errResp:c}:null!=b&&(d.resp=b);this.remoteWin.postMessage(JSON.stringify(d),"*")});try{var c=a.funtionName,d=this.remoteInvokableFns[c];if(null!=d&&"function"=== -typeof this[c]){var e=a.functionArgs;Array.isArray(e)||(e=[]);if(d.isAsync)e.push(function(){b(Array.prototype.slice.apply(arguments))}),e.push(function(a){b(null,a||"Unkown Error")}),this[c].apply(this,e);else{var g=this[c].apply(this,e);b([g])}}else b(null,"Invalid Call: "+c+" is not found.")}catch(A){b(null,"Invalid Call: An error occured, "+A.message)}};EditorUi.prototype.commentsSupported=function(){var a=this.getCurrentFile();return null!=a?a.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded= +typeof this[c]){var e=a.functionArgs;Array.isArray(e)||(e=[]);if(d.isAsync)e.push(function(){b(Array.prototype.slice.apply(arguments))}),e.push(function(a){b(null,a||"Unkown Error")}),this[c].apply(this,e);else{var g=this[c].apply(this,e);b([g])}}else b(null,"Invalid Call: "+c+" is not found.")}catch(y){b(null,"Invalid Call: An error occured, "+y.message)}};EditorUi.prototype.commentsSupported=function(){var a=this.getCurrentFile();return null!=a?a.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded= function(){var a=this.getCurrentFile();return null!=a?a.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var a=this.getCurrentFile();return null!=a?a.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(a,b){var c=this.getCurrentFile();null!=c?c.getComments(a,b):a([])};EditorUi.prototype.addComment=function(a,b,d){var c=this.getCurrentFile();null!=c?c.addComment(a,b,d):b(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var a=this.getCurrentFile(); return null!=a?a.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var a=this.getCurrentFile();return null!=a?a.canComment():!0};EditorUi.prototype.newComment=function(a,b){var c=this.getCurrentFile();return null!=c?c.newComment(a,b):new DrawioComment(this,null,a,Date.now(),Date.now(),!1,b)};EditorUi.prototype.isRevisionHistorySupported=function(){var a=this.getCurrentFile();return null!=a&&a.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(a,b){var c=this.getCurrentFile(); null!=c&&c.getRevisions?c.getRevisions(a,b):b({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var a=this.getCurrentFile();return null!=a&&(a.constructor==DriveFile&&a.isEditable()||a.constructor==DropboxFile)}})(); var CommentsWindow=function(a,b,e,d,l,m){function r(){for(var a=u.getElementsByTagName("div"),b=0,c=0;c<a.length;c++)"none"!=a[c].style.display&&a[c].parentNode==u&&b++;F.style.display=0==b?"block":"none"}function t(a,b,c,d){function e(){b.removeChild(l);b.removeChild(m);k.style.display="block";f.style.display="block"}g={div:b,comment:a,saveCallback:c,deleteOnCancel:d};var f=b.querySelector(".geCommentTxt"),k=b.querySelector(".geCommentActionsList"),l=document.createElement("textarea");l.className= "geCommentEditTxtArea";l.style.minHeight=f.offsetHeight+"px";l.value=a.content;b.insertBefore(l,f);var m=document.createElement("div");m.className="geCommentEditBtns";var n=mxUtils.button(mxResources.get("cancel"),function(){d?(b.parentNode.removeChild(b),r()):e();g=null});n.className="geCommentEditBtn";m.appendChild(n);var q=mxUtils.button(mxResources.get("save"),function(){f.innerHTML="";a.content=l.value;mxUtils.write(f,a.content);e();c(a);g=null});mxEvent.addListener(l,"keydown",mxUtils.bind(this, function(a){mxEvent.isConsumed(a)||((mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a))&&13==a.keyCode?(q.click(),mxEvent.consume(a)):27==a.keyCode&&(n.click(),mxEvent.consume(a)))}));q.focus();q.className="geCommentEditBtn gePrimaryBtn";m.appendChild(q);b.insertBefore(m,f);k.style.display="none";f.style.display="none";l.focus()}function x(b,c){c.innerHTML="";var d=a.timeSince(new Date(b.modifiedDate));null==d&&(d=mxResources.get("lessThanAMinute"));mxUtils.write(c,mxResources.get("timeAgo", -[d],"{1} ago"))}function z(a){var b=document.createElement("img");b.className="geCommentBusyImg";b.src=IMAGE_PATH+"/spin.gif";a.appendChild(b);a.busyImg=b}function c(a){a.style.border="1px solid red";a.removeChild(a.busyImg)}function f(a){a.style.border="";a.removeChild(a.busyImg)}function k(b,d,e,l,m){function v(a,c,d){var e=document.createElement("li");e.className="geCommentAction";var f=document.createElement("a");f.className="geCommentActionLnk";mxUtils.write(f,a);e.appendChild(f);mxEvent.addListener(f, -"click",function(a){c(a,b);a.preventDefault();mxEvent.consume(a)});M.appendChild(e);d&&(e.style.display="none")}function C(){function a(b){c.push(d);if(null!=b.replies)for(var e=0;e<b.replies.length;e++)d=d.nextSibling,a(b.replies[e])}var c=[],d=y;a(b);return{pdiv:d,replies:c}}function A(d,e,g,m,n){function q(){z(u);b.addReply(v,function(a){v.id=a;b.replies.push(v);f(u);g&&g()},function(b){r();c(u);a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},m,n)}function r(){t(v, -u,function(a){q()},!0)}var p=C().pdiv,v=a.newComment(d,a.getCurrentUser());v.pCommentId=b.id;null==b.replies&&(b.replies=[]);var u=k(v,b.replies,p,l+1);e?r():q()}if(m||!b.isResolved){F.style.display="none";var y=document.createElement("div");y.className="geCommentContainer";y.setAttribute("data-commentId",b.id);y.style.marginLeft=20*l+5+"px";b.isResolved&&"dark"!=uiTheme&&(y.style.backgroundColor="ghostWhite");var E=document.createElement("div");E.className="geCommentHeader";var B=document.createElement("img"); -B.className="geCommentUserImg";B.src=b.user.pictureUrl||Editor.userImage;E.appendChild(B);B=document.createElement("div");B.className="geCommentHeaderTxt";E.appendChild(B);var L=document.createElement("div");L.className="geCommentUsername";mxUtils.write(L,b.user.displayName||"");B.appendChild(L);L=document.createElement("div");L.className="geCommentDate";L.setAttribute("data-commentId",b.id);x(b,L);B.appendChild(L);y.appendChild(E);E=document.createElement("div");E.className="geCommentTxt";mxUtils.write(E, -b.content||"");y.appendChild(E);E=document.createElement("div");E.className="geCommentActions";var M=document.createElement("ul");M.className="geCommentActionsList";E.appendChild(M);p||0!=l&&!n||v(mxResources.get("reply"),function(){A("",!0)},b.isResolved);B=a.getCurrentUser();null==B||B.id!=b.user.id||p||(v(mxResources.get("edit"),function(){function d(){t(b,y,function(){z(y);b.editComment(b.content,function(){f(y)},function(b){c(y);d();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})} -d()},b.isResolved),v(mxResources.get("delete"),function(){a.confirm(mxResources.get("areYouSure"),function(){z(y);b.deleteComment(function(){for(var a=C(b).replies,c=0;c<a.length;c++)u.removeChild(a[c]);for(c=0;c<d.length;c++)if(d[c]==b){d.splice(c,1);break}F.style.display=0==u.getElementsByTagName("div").length?"block":"none"},function(b){c(y);a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},b.isResolved));p||0!=l||v(b.isResolved?mxResources.get("reopen"): -mxResources.get("resolve"),function(a){function c(){var c=a.target;c.innerHTML="";b.isResolved=!b.isResolved;mxUtils.write(c,b.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var d=b.isResolved?"none":"",e=C(b).replies,f="dark"==uiTheme?"transparent":b.isResolved?"ghostWhite":"white",g=0;g<e.length;g++){e[g].style.backgroundColor=f;for(var k=e[g].querySelectorAll(".geCommentAction"),l=0;l<k.length;l++)k[l]!=c.parentNode&&(k[l].style.display=d);q||(e[g].style.display="none")}r()} -b.isResolved?A(mxResources.get("reOpened")+": ",!0,c,!1,!0):A(mxResources.get("markedAsResolved"),!1,c,!0)});y.appendChild(E);null!=e?u.insertBefore(y,e.nextSibling):u.appendChild(y);for(e=0;null!=b.replies&&e<b.replies.length;e++)E=b.replies[e],E.isResolved=b.isResolved,k(E,b.replies,null,l+1,m);null!=g&&(g.comment.id==b.id?(m=b.content,b.content=g.comment.content,t(b,y,g.saveCallback,g.deleteOnCancel),b.content=m):null==g.comment.id&&g.comment.pCommentId==b.id&&(u.appendChild(g.div),t(g.comment, -g.div,g.saveCallback,g.deleteOnCancel)));return y}}var p=!a.canComment(),n=a.canReplyToReplies(),g=null,A=document.createElement("div");A.className="geCommentsWin";A.style.background="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;var y=EditorUi.compactUi?"26px":"30px",u=document.createElement("div");u.className="geCommentsList";u.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;u.style.bottom=parseInt(y)+7+"px";A.appendChild(u);var F=document.createElement("span"); -F.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(F,mxResources.get("noCommentsFound"));var v=document.createElement("div");v.className="geToolbarContainer geCommentsToolbar";v.style.height=y;v.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";v.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;mxClient.IS_QUIRKS&&(v.style.filter="none");y=document.createElement("a");y.className="geButton";mxClient.IS_QUIRKS&&(y.style.filter= -"none");if(!p){var E=y.cloneNode();E.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';E.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(E,"click",function(b){function d(){t(e,g,function(b){z(g);a.addComment(b,function(a){b.id=a;B.push(b);f(g)},function(b){c(g);d();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var e=a.newComment("",a.getCurrentUser()),g=k(e,B,null,0);d();b.preventDefault(); -mxEvent.consume(b)});v.appendChild(E)}E=y.cloneNode();E.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';E.setAttribute("title",mxResources.get("showResolved"));var q=!1;"dark"==uiTheme&&(E.style.filter="invert(100%)");mxEvent.addListener(E,"click",function(a){this.className=(q=!q)?"geButton geCheckedBtn":"geButton";J();a.preventDefault();mxEvent.consume(a)});v.appendChild(E);a.commentsRefreshNeeded()&&(E=y.cloneNode(),E.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">', -E.setAttribute("title",mxResources.get("refresh")),"dark"==uiTheme&&(E.style.filter="invert(100%)"),mxEvent.addListener(E,"click",function(a){J();a.preventDefault();mxEvent.consume(a)}),v.appendChild(E));a.commentsSaveNeeded()&&(y=y.cloneNode(),y.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',y.setAttribute("title",mxResources.get("save")),"dark"==uiTheme&&(y.style.filter="invert(100%)"),mxEvent.addListener(y,"click",function(a){m();a.preventDefault();mxEvent.consume(a)}), -v.appendChild(y));A.appendChild(v);var B=[],J=mxUtils.bind(this,function(){if(null!=g){g.div=g.div.cloneNode(!0);var b=g.div.querySelector(".geCommentEditTxtArea"),c=g.div.querySelector(".geCommentEditBtns");g.comment.content=b.value;b.parentNode.removeChild(b);c.parentNode.removeChild(c)}u.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";n=a.canReplyToReplies();a.commentsSupported()? -a.getComments(function(a){function b(a){if(null!=a){a.sort(function(a,b){return new Date(a.modifiedDate)-new Date(b.modifiedDate)});for(var c=0;c<a.length;c++)b(a[c].replies)}}a.sort(function(a,b){return new Date(a.modifiedDate)-new Date(b.modifiedDate)});u.innerHTML="";u.appendChild(F);F.style.display="block";B=a;for(a=0;a<B.length;a++)b(B[a].replies),k(B[a],B,null,0,q);null!=g&&null==g.comment.id&&null==g.comment.pCommentId&&(u.appendChild(g.div),t(g.comment,g.div,g.saveCallback,g.deleteOnCancel))}, -function(a){u.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(a?": "+a:""))}):u.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});J();this.refreshComments=J;v=mxUtils.bind(this,function(){function a(b){var d=c[b.id];if(null!=d)for(x(b,d),d=0;null!=b.replies&&d<b.replies.length;d++)a(b.replies[d])}if(this.window.isVisible()){for(var b=u.querySelectorAll(".geCommentDate"),c={},d=0;d<b.length;d++){var e=b[d];c[e.getAttribute("data-commentId")]=e}for(d=0;d<B.length;d++)a(B[d])}});setInterval(v, -6E4);this.refreshCommentsTime=v;this.window=new mxWindow(mxResources.get("comments"),A,b,e,d,l,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));this.window.setLocation=function(a,b){var c=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight; +[d],"{1} ago"))}function A(a){var b=document.createElement("img");b.className="geCommentBusyImg";b.src=IMAGE_PATH+"/spin.gif";a.appendChild(b);a.busyImg=b}function c(a){a.style.border="1px solid red";a.removeChild(a.busyImg)}function f(a){a.style.border="";a.removeChild(a.busyImg)}function k(b,d,e,l,m){function v(a,c,d){var e=document.createElement("li");e.className="geCommentAction";var f=document.createElement("a");f.className="geCommentActionLnk";mxUtils.write(f,a);e.appendChild(f);mxEvent.addListener(f, +"click",function(a){c(a,b);a.preventDefault();mxEvent.consume(a)});M.appendChild(e);d&&(e.style.display="none")}function B(){function a(b){c.push(d);if(null!=b.replies)for(var e=0;e<b.replies.length;e++)d=d.nextSibling,a(b.replies[e])}var c=[],d=z;a(b);return{pdiv:d,replies:c}}function y(d,e,g,m,n){function q(){A(u);b.addReply(v,function(a){v.id=a;b.replies.push(v);f(u);g&&g()},function(b){r();c(u);a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},m,n)}function r(){t(v, +u,function(a){q()},!0)}var p=B().pdiv,v=a.newComment(d,a.getCurrentUser());v.pCommentId=b.id;null==b.replies&&(b.replies=[]);var u=k(v,b.replies,p,l+1);e?r():q()}if(m||!b.isResolved){F.style.display="none";var z=document.createElement("div");z.className="geCommentContainer";z.setAttribute("data-commentId",b.id);z.style.marginLeft=20*l+5+"px";b.isResolved&&"dark"!=uiTheme&&(z.style.backgroundColor="ghostWhite");var E=document.createElement("div");E.className="geCommentHeader";var K=document.createElement("img"); +K.className="geCommentUserImg";K.src=b.user.pictureUrl||Editor.userImage;E.appendChild(K);K=document.createElement("div");K.className="geCommentHeaderTxt";E.appendChild(K);var C=document.createElement("div");C.className="geCommentUsername";mxUtils.write(C,b.user.displayName||"");K.appendChild(C);C=document.createElement("div");C.className="geCommentDate";C.setAttribute("data-commentId",b.id);x(b,C);K.appendChild(C);z.appendChild(E);E=document.createElement("div");E.className="geCommentTxt";mxUtils.write(E, +b.content||"");z.appendChild(E);E=document.createElement("div");E.className="geCommentActions";var M=document.createElement("ul");M.className="geCommentActionsList";E.appendChild(M);p||0!=l&&!n||v(mxResources.get("reply"),function(){y("",!0)},b.isResolved);K=a.getCurrentUser();null==K||K.id!=b.user.id||p||(v(mxResources.get("edit"),function(){function d(){t(b,z,function(){A(z);b.editComment(b.content,function(){f(z)},function(b){c(z);d();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})} +d()},b.isResolved),v(mxResources.get("delete"),function(){a.confirm(mxResources.get("areYouSure"),function(){A(z);b.deleteComment(function(){for(var a=B(b).replies,c=0;c<a.length;c++)u.removeChild(a[c]);for(c=0;c<d.length;c++)if(d[c]==b){d.splice(c,1);break}F.style.display=0==u.getElementsByTagName("div").length?"block":"none"},function(b){c(z);a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},b.isResolved));p||0!=l||v(b.isResolved?mxResources.get("reopen"): +mxResources.get("resolve"),function(a){function c(){var c=a.target;c.innerHTML="";b.isResolved=!b.isResolved;mxUtils.write(c,b.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var d=b.isResolved?"none":"",e=B(b).replies,f="dark"==uiTheme?"transparent":b.isResolved?"ghostWhite":"white",g=0;g<e.length;g++){e[g].style.backgroundColor=f;for(var k=e[g].querySelectorAll(".geCommentAction"),l=0;l<k.length;l++)k[l]!=c.parentNode&&(k[l].style.display=d);q||(e[g].style.display="none")}r()} +b.isResolved?y(mxResources.get("reOpened")+": ",!0,c,!1,!0):y(mxResources.get("markedAsResolved"),!1,c,!0)});z.appendChild(E);null!=e?u.insertBefore(z,e.nextSibling):u.appendChild(z);for(e=0;null!=b.replies&&e<b.replies.length;e++)E=b.replies[e],E.isResolved=b.isResolved,k(E,b.replies,null,l+1,m);null!=g&&(g.comment.id==b.id?(m=b.content,b.content=g.comment.content,t(b,z,g.saveCallback,g.deleteOnCancel),b.content=m):null==g.comment.id&&g.comment.pCommentId==b.id&&(u.appendChild(g.div),t(g.comment, +g.div,g.saveCallback,g.deleteOnCancel)));return z}}var p=!a.canComment(),n=a.canReplyToReplies(),g=null,y=document.createElement("div");y.className="geCommentsWin";y.style.background="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;var z=EditorUi.compactUi?"26px":"30px",u=document.createElement("div");u.className="geCommentsList";u.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;u.style.bottom=parseInt(z)+7+"px";y.appendChild(u);var F=document.createElement("span"); +F.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(F,mxResources.get("noCommentsFound"));var v=document.createElement("div");v.className="geToolbarContainer geCommentsToolbar";v.style.height=z;v.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";v.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;mxClient.IS_QUIRKS&&(v.style.filter="none");z=document.createElement("a");z.className="geButton";mxClient.IS_QUIRKS&&(z.style.filter= +"none");if(!p){var E=z.cloneNode();E.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';E.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(E,"click",function(b){function d(){t(e,g,function(b){A(g);a.addComment(b,function(a){b.id=a;C.push(b);f(g)},function(b){c(g);d();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var e=a.newComment("",a.getCurrentUser()),g=k(e,C,null,0);d();b.preventDefault(); +mxEvent.consume(b)});v.appendChild(E)}E=z.cloneNode();E.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';E.setAttribute("title",mxResources.get("showResolved"));var q=!1;"dark"==uiTheme&&(E.style.filter="invert(100%)");mxEvent.addListener(E,"click",function(a){this.className=(q=!q)?"geButton geCheckedBtn":"geButton";J();a.preventDefault();mxEvent.consume(a)});v.appendChild(E);a.commentsRefreshNeeded()&&(E=z.cloneNode(),E.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">', +E.setAttribute("title",mxResources.get("refresh")),"dark"==uiTheme&&(E.style.filter="invert(100%)"),mxEvent.addListener(E,"click",function(a){J();a.preventDefault();mxEvent.consume(a)}),v.appendChild(E));a.commentsSaveNeeded()&&(z=z.cloneNode(),z.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',z.setAttribute("title",mxResources.get("save")),"dark"==uiTheme&&(z.style.filter="invert(100%)"),mxEvent.addListener(z,"click",function(a){m();a.preventDefault();mxEvent.consume(a)}), +v.appendChild(z));y.appendChild(v);var C=[],J=mxUtils.bind(this,function(){if(null!=g){g.div=g.div.cloneNode(!0);var b=g.div.querySelector(".geCommentEditTxtArea"),c=g.div.querySelector(".geCommentEditBtns");g.comment.content=b.value;b.parentNode.removeChild(b);c.parentNode.removeChild(c)}u.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";n=a.canReplyToReplies();a.commentsSupported()? +a.getComments(function(a){function b(a){if(null!=a){a.sort(function(a,b){return new Date(a.modifiedDate)-new Date(b.modifiedDate)});for(var c=0;c<a.length;c++)b(a[c].replies)}}a.sort(function(a,b){return new Date(a.modifiedDate)-new Date(b.modifiedDate)});u.innerHTML="";u.appendChild(F);F.style.display="block";C=a;for(a=0;a<C.length;a++)b(C[a].replies),k(C[a],C,null,0,q);null!=g&&null==g.comment.id&&null==g.comment.pCommentId&&(u.appendChild(g.div),t(g.comment,g.div,g.saveCallback,g.deleteOnCancel))}, +function(a){u.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(a&&a.message?": "+a.message:""))}):u.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});J();this.refreshComments=J;v=mxUtils.bind(this,function(){function a(b){var d=c[b.id];if(null!=d)for(x(b,d),d=0;null!=b.replies&&d<b.replies.length;d++)a(b.replies[d])}if(this.window.isVisible()){for(var b=u.querySelectorAll(".geCommentDate"),c={},d=0;d<b.length;d++){var e=b[d];c[e.getAttribute("data-commentId")]=e}for(d=0;d<C.length;d++)a(C[d])}}); +setInterval(v,6E4);this.refreshCommentsTime=v;this.window=new mxWindow(mxResources.get("comments"),y,b,e,d,l,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));this.window.setLocation=function(a,b){var c=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight; a=Math.max(0,Math.min(a,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,c-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};var P=mxUtils.bind(this,function(){var a=this.window.getX(),b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window,"resize",P);this.destroy=function(){mxEvent.removeListener(window,"resize",P);this.window.destroy()}}, -ConfirmDialog=function(a,b,e,d,l,m,r,t,x,z){var c=document.createElement("div");c.style.textAlign="center";var f=document.createElement("div");f.style.padding="6px";f.style.overflow="auto";f.style.maxHeight="44px";f.style.lineHeight="1.2em";mxClient.IS_QUIRKS&&(f.style.height="60px");mxUtils.write(f,b);c.appendChild(f);null!=z&&(f=document.createElement("div"),f.style.padding="6px 0 6px 0",b=document.createElement("img"),b.setAttribute("src",z),f.appendChild(b),c.appendChild(f));z=document.createElement("div"); -z.style.textAlign="center";z.style.whiteSpace="nowrap";var k=document.createElement("input");k.setAttribute("type","checkbox");m=mxUtils.button(m||mxResources.get("cancel"),function(){a.hideDialog();null!=d&&d(k.checked)});m.className="geBtn";null!=t&&(m.innerHTML=t+"<br>"+m.innerHTML,m.style.paddingBottom="8px",m.style.paddingTop="8px",m.style.height="auto",m.style.width="40%");a.editor.cancelFirst&&z.appendChild(m);var p=mxUtils.button(l||mxResources.get("ok"),function(){a.hideDialog();null!=e&& -e(k.checked)});z.appendChild(p);null!=r?(p.innerHTML=r+"<br>"+p.innerHTML+"<br>",p.style.paddingBottom="8px",p.style.paddingTop="8px",p.style.height="auto",p.className="geBtn",p.style.width="40%"):p.className="geBtn gePrimaryBtn";a.editor.cancelFirst||z.appendChild(m);c.appendChild(z);x?(z.style.marginTop="10px",f=document.createElement("p"),f.style.marginTop="20px",f.appendChild(k),l=document.createElement("span"),mxUtils.write(l," "+mxResources.get("rememberThisSetting")),f.appendChild(l),c.appendChild(f), -mxEvent.addListener(l,"click",function(a){k.checked=!k.checked;mxEvent.consume(a)})):z.style.marginTop="12px";this.init=function(){p.focus()};this.container=c};function DiagramPage(a,b){this.node=a;null!=b?this.node.setAttribute("id",b):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")}; +ConfirmDialog=function(a,b,e,d,l,m,r,t,x,A){var c=document.createElement("div");c.style.textAlign="center";var f=document.createElement("div");f.style.padding="6px";f.style.overflow="auto";f.style.maxHeight="44px";f.style.lineHeight="1.2em";mxClient.IS_QUIRKS&&(f.style.height="60px");mxUtils.write(f,b);c.appendChild(f);null!=A&&(f=document.createElement("div"),f.style.padding="6px 0 6px 0",b=document.createElement("img"),b.setAttribute("src",A),f.appendChild(b),c.appendChild(f));A=document.createElement("div"); +A.style.textAlign="center";A.style.whiteSpace="nowrap";var k=document.createElement("input");k.setAttribute("type","checkbox");m=mxUtils.button(m||mxResources.get("cancel"),function(){a.hideDialog();null!=d&&d(k.checked)});m.className="geBtn";null!=t&&(m.innerHTML=t+"<br>"+m.innerHTML,m.style.paddingBottom="8px",m.style.paddingTop="8px",m.style.height="auto",m.style.width="40%");a.editor.cancelFirst&&A.appendChild(m);var p=mxUtils.button(l||mxResources.get("ok"),function(){a.hideDialog();null!=e&& +e(k.checked)});A.appendChild(p);null!=r?(p.innerHTML=r+"<br>"+p.innerHTML+"<br>",p.style.paddingBottom="8px",p.style.paddingTop="8px",p.style.height="auto",p.className="geBtn",p.style.width="40%"):p.className="geBtn gePrimaryBtn";a.editor.cancelFirst||A.appendChild(m);c.appendChild(A);x?(A.style.marginTop="10px",f=document.createElement("p"),f.style.marginTop="20px",f.appendChild(k),l=document.createElement("span"),mxUtils.write(l," "+mxResources.get("rememberThisSetting")),f.appendChild(l),c.appendChild(f), +mxEvent.addListener(l,"click",function(a){k.checked=!k.checked;mxEvent.consume(a)})):A.style.marginTop="12px";this.init=function(){p.focus()};this.container=c};function DiagramPage(a,b){this.node=a;null!=b?this.node.setAttribute("id",b):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")}; DiagramPage.prototype.setName=function(a){null==a?this.node.removeAttribute("name"):this.node.setAttribute("name",a)};function RenamePage(a,b,e){this.ui=a;this.page=b;this.previous=this.name=e}RenamePage.prototype.execute=function(){var a=this.page.getName();this.page.setName(this.previous);this.name=this.previous;this.previous=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))}; function MovePage(a,b,e){this.ui=a;this.oldIndex=b;this.newIndex=e}MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var a=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))}; function SelectPage(a,b,e){this.ui=a;this.previousPage=this.page=b;this.neverShown=!0;null!=b&&(this.neverShown=null==b.viewState,this.ui.updatePageRoot(b),null!=e&&(b.viewState=e,this.neverShown=!1))} @@ -3346,9 +3346,9 @@ mxResources.get("copyOf",[a.getName()]))}),d)})};(function(){var a=EditorUi.prot a)?d:void 0})),null!=d.relatedPage.root&&a.encodeCell(d.relatedPage.root,l));return l};a.beforeDecode=function(a,b,l){l.ui=a.ui;l.relatedPage=l.ui.getPageById(b.getAttribute("relatedPage"));if(null==l.relatedPage){var d=b.ownerDocument.createElement("diagram");d.setAttribute("id",b.getAttribute("relatedPage"));d.setAttribute("name",b.getAttribute("name"));l.relatedPage=new DiagramPage(d);d=b.getAttribute("viewState");null!=d&&(l.relatedPage.viewState=JSON.parse(d),b.removeAttribute("viewState")); b=b.cloneNode(!0);d=b.firstChild;if(null!=d)for(l.relatedPage.root=a.decodeCell(d,!1),l=d.nextSibling,d.parentNode.removeChild(d),d=l;null!=d;){l=d.nextSibling;if(d.nodeType==mxConstants.NODETYPE_ELEMENT){var e=d.getAttribute("id");null==a.lookup(e)&&a.decodeCell(d)}d.parentNode.removeChild(d);d=l}}return b};a.afterDecode=function(a,b,l){l.index=l.previousIndex;return l};mxCodecRegistry.register(a)})();(function(){var a=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAASFBMVEUAAAAAAAB/f3/9/f319fUfHx/7+/s+Pj69vb0AAAAAAAAAAAAAAAAAAAAAAAAAAAB2dnZ1dXUAAAAAAAAVFRX///8ZGRkGBgbOcI1hAAAAE3RSTlMA+vr9/f38+fb1893Bo00u+/tFvPJUBQAAAIRJREFUGNM0jEcSxCAQAxlydGqD///TNWxZBx1aXVIrWysplbapL3sFxgDq/idXBnHgBPK1nIxwc55vCXl6dRFtrV6svs/A/UjsPcpzA5tqyByD92HqQlMFh45BG6ND1DiKSoPDdm96N77bg5F+wyaEqRGb8ZiOwHQqdg9hehszcLAEIQB2lQ4p/sEpnAAAAABJRU5ErkJggg==":IMAGE_PATH+"/move.png";EditorUi.prototype.altShiftActions[68]= "selectDescendants";var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(a,d,e,t,x){d=null!=d?d:!1;null==e&&(e=this.getFoldableCells(this.getSelectionCells(),a));this.stopEditing();this.model.beginUpdate();try{for(var l=e.slice(),c=[],f=0;f<e.length;f++){var k=this.view.getState(e[f]),m=null!=k?k.style:this.getCellStyle(e[f]);"1"==mxUtils.getValue(m,"treeFolding","0")&&(this.traverse(e[f],!0,mxUtils.bind(this,function(a,b){null!=b&&c.push(b);a!=e[f]&&c.push(a);return a==e[f]||!this.model.isCollapsed(a)})), -this.model.setCollapsed(e[f],a))}for(f=0;f<c.length;f++)this.model.setVisible(c[f],!a);e=l;e=b.apply(this,arguments)}finally{this.model.endUpdate()}return e};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function b(a){return A.isVertex(a)&&e(a)}function d(a){var b=!1;null!=a&&(b=g.view.getState(a),b="1"==(null!=b?b.style:g.getCellStyle(a)).treeMoving); -return b}function e(a){var b=!1;null!=a&&(a=A.getParent(a),b=g.view.getState(a),b="tree"==(null!=b?b.style:g.getCellStyle(a)).containerType);return b}function t(a){var b=!1;null!=a&&(a=A.getParent(a),b=g.view.getState(a),g.view.getState(a),b=null!=(null!=b?b.style:g.getCellStyle(a)).childLayout);return b}function x(a){a=g.view.getState(a);if(null!=a){var b=g.getIncomingEdges(a.cell);if(0<b.length&&(b=g.view.getState(b[0]),null!=b&&(b=b.absolutePoints,null!=b&&0<b.length&&(b=b[b.length-1],null!=b)))){if(b.y== -a.y&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_SOUTH;if(b.y==a.y+a.height&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_NORTH;if(b.x>a.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function z(a,b){b=null!=b?b:!0;g.model.beginUpdate();try{var c=g.model.getParent(a),d=g.getIncomingEdges(a),e=g.cloneCells([d[0],a]);g.model.setTerminal(e[0],g.model.getTerminal(d[0],!0),!0);var f=x(a),k=c.geometry;f==mxConstants.DIRECTION_SOUTH|| +this.model.setCollapsed(e[f],a))}for(f=0;f<c.length;f++)this.model.setVisible(c[f],!a);e=l;e=b.apply(this,arguments)}finally{this.model.endUpdate()}return e};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function b(a){return y.isVertex(a)&&e(a)}function d(a){var b=!1;null!=a&&(b=g.view.getState(a),b="1"==(null!=b?b.style:g.getCellStyle(a)).treeMoving); +return b}function e(a){var b=!1;null!=a&&(a=y.getParent(a),b=g.view.getState(a),b="tree"==(null!=b?b.style:g.getCellStyle(a)).containerType);return b}function t(a){var b=!1;null!=a&&(a=y.getParent(a),b=g.view.getState(a),g.view.getState(a),b=null!=(null!=b?b.style:g.getCellStyle(a)).childLayout);return b}function x(a){a=g.view.getState(a);if(null!=a){var b=g.getIncomingEdges(a.cell);if(0<b.length&&(b=g.view.getState(b[0]),null!=b&&(b=b.absolutePoints,null!=b&&0<b.length&&(b=b[b.length-1],null!=b)))){if(b.y== +a.y&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_SOUTH;if(b.y==a.y+a.height&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_NORTH;if(b.x>a.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function A(a,b){b=null!=b?b:!0;g.model.beginUpdate();try{var c=g.model.getParent(a),d=g.getIncomingEdges(a),e=g.cloneCells([d[0],a]);g.model.setTerminal(e[0],g.model.getTerminal(d[0],!0),!0);var f=x(a),k=c.geometry;f==mxConstants.DIRECTION_SOUTH|| f==mxConstants.DIRECTION_NORTH?e[1].geometry.x+=b?a.geometry.width+10:-e[1].geometry.width-10:e[1].geometry.y+=b?a.geometry.height+10:-e[1].geometry.height-10;g.view.currentRoot!=c&&(e[1].geometry.x-=k.x,e[1].geometry.y-=k.y);var l=g.view.getState(a),m=g.view.scale;if(null!=l){var n=mxRectangle.fromRectangle(l);f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?n.x+=(b?a.geometry.width+10:-e[1].geometry.width-10)*m:n.y+=(b?a.geometry.height+10:-e[1].geometry.height-10)*m;var q=g.getOutgoingEdges(g.model.getTerminal(d[0], !0));if(null!=q){for(var r=f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH,p=k=d=0;p<q.length;p++){var v=g.model.getTerminal(q[p],!1);if(f==x(v)){var t=g.view.getState(v);v!=a&&null!=t&&(r&&b!=t.getCenterX()<l.getCenterX()||!r&&b!=t.getCenterY()<l.getCenterY())&&mxUtils.intersects(n,t)&&(d=10+Math.max(d,(Math.min(n.x+n.width,t.x+t.width)-Math.max(n.x,t.x))/m),k=10+Math.max(k,(Math.min(n.y+n.height,t.y+t.height)-Math.max(n.y,t.y))/m))}}r?k=0:d=0;for(p=0;p<q.length;p++)if(v=g.model.getTerminal(q[p], !1),f==x(v)&&(t=g.view.getState(v),v!=a&&null!=t&&(r&&b!=t.getCenterX()<l.getCenterX()||!r&&b!=t.getCenterY()<l.getCenterY()))){var u=[];g.traverse(t.cell,!0,function(a,b){null!=b&&u.push(b);u.push(a);return!0});g.moveCells(u,(b?1:-1)*d,(b?1:-1)*k)}}}return g.addCells(e,c)}finally{g.model.endUpdate()}}function c(a){g.model.beginUpdate();try{var b=x(a),c=g.getIncomingEdges(a),d=g.cloneCells([c[0],a]);g.model.setTerminal(c[0],d[1],!1);g.model.setTerminal(d[0],d[1],!0);g.model.setTerminal(d[0],a,!1); @@ -3356,23 +3356,23 @@ var e=g.model.getParent(a),f=e.geometry,k=[];g.view.currentRoot!=e&&(d[1].geomet g.model.getParent(a),c=g.getIncomingEdges(a),d=g.cloneCells([c[0],a]);g.model.setTerminal(d[0],a,!0);var c=g.getOutgoingEdges(a),e=b.geometry,f=[];g.view.currentRoot==b&&(e=new mxRectangle);for(var k=0;k<c.length;k++){var l=g.model.getTerminal(c[k],!1);null!=l&&f.push(l)}var m=g.view.getBounds(f),n=x(a),q=g.view.translate,r=g.view.scale;n==mxConstants.DIRECTION_SOUTH?(d[1].geometry.x=null==m?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(m.x+m.width)/r-q.x-e.x+10,d[1].geometry.y+=d[1].geometry.height- e.y+40):n==mxConstants.DIRECTION_NORTH?(d[1].geometry.x=null==m?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(m.x+m.width)/r-q.x+-e.x+10,d[1].geometry.y-=d[1].geometry.height+e.y+40):(d[1].geometry.x=n==mxConstants.DIRECTION_WEST?d[1].geometry.x-(d[1].geometry.width+e.x+40):d[1].geometry.x+(d[1].geometry.width-e.x+40),d[1].geometry.y=null==m?a.geometry.y+(a.geometry.height-d[1].geometry.height)/2:(m.y+m.height)/r-q.y+-e.y+10);return g.addCells(d,b)}finally{g.model.endUpdate()}}function k(a, b,c){a=g.getOutgoingEdges(a);c=g.view.getState(c);var d=[];if(null!=c&&null!=a){for(var e=0;e<a.length;e++){var f=g.view.getState(g.model.getTerminal(a[e],!1));null!=f&&(!b&&Math.min(f.x+f.width,c.x+c.width)>=Math.max(f.x,c.x)||b&&Math.min(f.y+f.height,c.y+c.height)>=Math.max(f.y,c.y))&&d.push(f)}d.sort(function(a,c){return b?a.x+a.width-c.x-c.width:a.y+a.height-c.y-c.height})}return d}function p(a,b){var c=x(a),d=b==mxConstants.DIRECTION_EAST||b==mxConstants.DIRECTION_WEST;(c==mxConstants.DIRECTION_EAST|| -c==mxConstants.DIRECTION_WEST)==d&&c!=b?n.actions.get("selectParent").funct():c==b?(d=g.getOutgoingEdges(a),null!=d&&0<d.length&&g.setSelectionCell(g.model.getTerminal(d[0],!1))):(c=g.getIncomingEdges(a),null!=c&&0<c.length&&(d=k(g.model.getTerminal(c[0],!0),d,a),c=g.view.getState(a),null!=c&&(c=mxUtils.indexOf(d,c),0<=c&&(c+=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_WEST?-1:1,0<=c&&c<=d.length-1&&g.setSelectionCell(d[c].cell)))))}var n=this,g=n.editor.graph,A=g.getModel(),y=n.menus.createPopupMenu; -n.menus.createPopupMenu=function(a,c,d){y.apply(this,arguments);if(1==g.getSelectionCount()){c=g.getSelectionCell();var e=g.getOutgoingEdges(c);a.addSeparator();null!=e&&0<e.length&&(b(g.getSelectionCell())&&this.addMenuItems(a,["selectChildren"],null,d),this.addMenuItems(a,["selectDescendants"],null,d));b(g.getSelectionCell())&&(a.addSeparator(),0<g.getIncomingEdges(c).length&&this.addMenuItems(a,["selectSiblings","selectParent"],null,d))}};n.actions.addAction("selectChildren",function(){if(g.isEnabled()&& +c==mxConstants.DIRECTION_WEST)==d&&c!=b?n.actions.get("selectParent").funct():c==b?(d=g.getOutgoingEdges(a),null!=d&&0<d.length&&g.setSelectionCell(g.model.getTerminal(d[0],!1))):(c=g.getIncomingEdges(a),null!=c&&0<c.length&&(d=k(g.model.getTerminal(c[0],!0),d,a),c=g.view.getState(a),null!=c&&(c=mxUtils.indexOf(d,c),0<=c&&(c+=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_WEST?-1:1,0<=c&&c<=d.length-1&&g.setSelectionCell(d[c].cell)))))}var n=this,g=n.editor.graph,y=g.getModel(),z=n.menus.createPopupMenu; +n.menus.createPopupMenu=function(a,c,d){z.apply(this,arguments);if(1==g.getSelectionCount()){c=g.getSelectionCell();var e=g.getOutgoingEdges(c);a.addSeparator();null!=e&&0<e.length&&(b(g.getSelectionCell())&&this.addMenuItems(a,["selectChildren"],null,d),this.addMenuItems(a,["selectDescendants"],null,d));b(g.getSelectionCell())&&(a.addSeparator(),0<g.getIncomingEdges(c).length&&this.addMenuItems(a,["selectSiblings","selectParent"],null,d))}};n.actions.addAction("selectChildren",function(){if(g.isEnabled()&& 1==g.getSelectionCount()){var a=g.getSelectionCell(),a=g.getOutgoingEdges(a);if(null!=a){for(var b=[],c=0;c<a.length;c++)b.push(g.model.getTerminal(a[c],!1));g.setSelectionCells(b)}}},null,null,"Alt+Shift+X");n.actions.addAction("selectSiblings",function(){if(g.isEnabled()&&1==g.getSelectionCount()){var a=g.getSelectionCell(),a=g.getIncomingEdges(a);if(null!=a&&0<a.length&&(a=g.getOutgoingEdges(g.model.getTerminal(a[0],!0)),null!=a)){for(var b=[],c=0;c<a.length;c++)b.push(g.model.getTerminal(a[c], !1));g.setSelectionCells(b)}}},null,null,"Alt+Shift+S");n.actions.addAction("selectParent",function(){if(g.isEnabled()&&1==g.getSelectionCount()){var a=g.getSelectionCell(),a=g.getIncomingEdges(a);null!=a&&0<a.length&&g.setSelectionCell(g.model.getTerminal(a[0],!0))}},null,null,"Alt+Shift+P");n.actions.addAction("selectDescendants",function(){if(g.isEnabled()&&1==g.getSelectionCount()){var a=g.getSelectionCell(),b=[];g.traverse(a,!0,function(a,c){null!=c&&b.push(c);b.push(a);return!0});g.setSelectionCells(b)}}, -null,null,"Alt+Shift+D");var u=g.removeCells;g.removeCells=function(a,c){c=null!=c?c:!0;null==a&&(a=this.getDeletableCells(this.getSelectionCells()));c&&(a=this.getDeletableCells(this.addAllEdges(a)));for(var d=[],f=0;f<a.length;f++){var k=a[f];A.isEdge(k)&&e(k)&&(d.push(k),k=A.getTerminal(k,!1));b(k)?(g.traverse(k,!0,function(a,b){null!=b&&d.push(b);d.push(a);return!0}),k=g.getIncomingEdges(a[f]),a=a.concat(k)):d.push(a[f])}a=d;return u.apply(this,arguments)};n.hoverIcons.getStateAt=function(a,c, +null,null,"Alt+Shift+D");var u=g.removeCells;g.removeCells=function(a,c){c=null!=c?c:!0;null==a&&(a=this.getDeletableCells(this.getSelectionCells()));c&&(a=this.getDeletableCells(this.addAllEdges(a)));for(var d=[],f=0;f<a.length;f++){var k=a[f];y.isEdge(k)&&e(k)&&(d.push(k),k=y.getTerminal(k,!1));b(k)?(g.traverse(k,!0,function(a,b){null!=b&&d.push(b);d.push(a);return!0}),k=g.getIncomingEdges(a[f]),a=a.concat(k)):d.push(a[f])}a=d;return u.apply(this,arguments)};n.hoverIcons.getStateAt=function(a,c, d){return b(a.cell)?null:this.graph.view.getState(this.graph.getCellAt(c,d))};var F=g.duplicateCells;g.duplicateCells=function(a,c){a=null!=a?a:this.getSelectionCells();for(var d=a.slice(0),e=0;e<d.length;e++){var f=g.view.getState(d[e]);if(null!=f&&b(f.cell))for(var k=g.getIncomingEdges(f.cell),f=0;f<k.length;f++)mxUtils.remove(k[f],a)}this.model.beginUpdate();try{var l=F.call(this,a,c);if(l.length==a.length)for(e=0;e<a.length;e++)if(b(a[e])){var m=g.getIncomingEdges(l[e]),k=g.getIncomingEdges(a[e]); if(0==m.length&&0<k.length){var n=this.cloneCell(k[0]);this.addEdge(n,g.getDefaultParent(),this.model.getTerminal(k[0],!0),l[e])}}}finally{this.model.endUpdate()}return l};var v=g.moveCells;g.moveCells=function(a,c,d,e,f,k,l){var m=null;this.model.beginUpdate();try{var n=f,q=this.view.getState(f),r=null!=q?q.style:this.getCellStyle(f);if(null!=a&&b(f)&&"1"==mxUtils.getValue(r,"treeFolding","0")){for(var p=0;p<a.length;p++)if(b(a[p])||g.model.isEdge(a[p])&&null==g.model.getTerminal(a[p],!0)){f=g.model.getParent(a[p]); -break}if(null!=n&&f!=n&&null!=this.view.getState(a[0])){var t=g.getIncomingEdges(a[0]);if(0<t.length){var u=g.view.getState(g.model.getTerminal(t[0],!0));if(null!=u){var x=g.view.getState(n);null!=x&&(c=(x.getCenterX()-u.getCenterX())/g.view.scale,d=(x.getCenterY()-u.getCenterY())/g.view.scale)}}}}m=v.apply(this,arguments);if(null!=m&&null!=a&&m.length==a.length)for(p=0;p<m.length;p++)if(this.model.isEdge(m[p]))b(n)&&0>mxUtils.indexOf(m,this.model.getTerminal(m[p],!0))&&this.model.setTerminal(m[p], +break}if(null!=n&&f!=n&&null!=this.view.getState(a[0])){var t=g.getIncomingEdges(a[0]);if(0<t.length){var u=g.view.getState(g.model.getTerminal(t[0],!0));if(null!=u){var y=g.view.getState(n);null!=y&&(c=(y.getCenterX()-u.getCenterX())/g.view.scale,d=(y.getCenterY()-u.getCenterY())/g.view.scale)}}}}m=v.apply(this,arguments);if(null!=m&&null!=a&&m.length==a.length)for(p=0;p<m.length;p++)if(this.model.isEdge(m[p]))b(n)&&0>mxUtils.indexOf(m,this.model.getTerminal(m[p],!0))&&this.model.setTerminal(m[p], n,!0);else if(b(a[p])&&(t=g.getIncomingEdges(a[p]),0<t.length))if(!e)b(n)&&0>mxUtils.indexOf(a,this.model.getTerminal(t[0],!0))&&this.model.setTerminal(t[0],n,!0);else if(0==g.getIncomingEdges(m[p]).length){q=n;if(null==q||q==g.model.getParent(a[p]))q=g.model.getTerminal(t[0],!0);e=this.cloneCell(t[0]);this.addEdge(e,g.getDefaultParent(),q,m[p])}}finally{this.model.endUpdate()}return m};if(null!=n.sidebar){var E=n.sidebar.dropAndConnect;n.sidebar.dropAndConnect=function(a,c,d,e){var f=g.model,k=null; -f.beginUpdate();try{if(k=E.apply(this,arguments),b(a))for(var l=0;l<k.length;l++)if(f.isEdge(k[l])&&null==f.getTerminal(k[l],!0)){f.setTerminal(k[l],a,!0);var m=g.getCellGeometry(k[l]);m.points=null;null!=m.getTerminalPoint(!0)&&m.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return k}}var q={88:n.actions.get("selectChildren"),84:n.actions.get("selectSubtree"),80:n.actions.get("selectParent"),83:n.actions.get("selectSiblings")},B=n.onKeyDown;n.onKeyDown=function(a){try{if(g.isEnabled()&&!g.isEditing()&& -b(g.getSelectionCell())&&1==g.getSelectionCount()){var d=null;0<g.getIncomingEdges(g.getSelectionCell()).length&&(9==a.which?d=mxEvent.isShiftDown(a)?c(g.getSelectionCell()):f(g.getSelectionCell()):13==a.which&&(d=z(g.getSelectionCell(),!mxEvent.isShiftDown(a))));if(null!=d&&0<d.length)1==d.length&&g.model.isEdge(d[0])?g.setSelectionCell(g.model.getTerminal(d[0],!1)):g.setSelectionCell(d[d.length-1]),null!=n.hoverIcons&&n.hoverIcons.update(g.view.getState(g.getSelectionCell())),g.startEditingAtCell(g.getSelectionCell()), +f.beginUpdate();try{if(k=E.apply(this,arguments),b(a))for(var l=0;l<k.length;l++)if(f.isEdge(k[l])&&null==f.getTerminal(k[l],!0)){f.setTerminal(k[l],a,!0);var m=g.getCellGeometry(k[l]);m.points=null;null!=m.getTerminalPoint(!0)&&m.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return k}}var q={88:n.actions.get("selectChildren"),84:n.actions.get("selectSubtree"),80:n.actions.get("selectParent"),83:n.actions.get("selectSiblings")},C=n.onKeyDown;n.onKeyDown=function(a){try{if(g.isEnabled()&&!g.isEditing()&& +b(g.getSelectionCell())&&1==g.getSelectionCount()){var d=null;0<g.getIncomingEdges(g.getSelectionCell()).length&&(9==a.which?d=mxEvent.isShiftDown(a)?c(g.getSelectionCell()):f(g.getSelectionCell()):13==a.which&&(d=A(g.getSelectionCell(),!mxEvent.isShiftDown(a))));if(null!=d&&0<d.length)1==d.length&&g.model.isEdge(d[0])?g.setSelectionCell(g.model.getTerminal(d[0],!1)):g.setSelectionCell(d[d.length-1]),null!=n.hoverIcons&&n.hoverIcons.update(g.view.getState(g.getSelectionCell())),g.startEditingAtCell(g.getSelectionCell()), mxEvent.consume(a);else if(mxEvent.isAltDown(a)&&mxEvent.isShiftDown(a)){var e=q[a.keyCode];null!=e&&(e.funct(a),mxEvent.consume(a))}else 37==a.keyCode?(p(g.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(a)):38==a.keyCode?(p(g.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(a)):39==a.keyCode?(p(g.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(a)):40==a.keyCode&&(p(g.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(a))}}catch(U){console.log("error", -U)}mxEvent.isConsumed(a)||B.apply(this,arguments)};var J=g.connectVertex;g.connectVertex=function(a,d,e,k,l,m){var n=g.getIncomingEdges(a);return b(a)&&0<n.length?(e=x(a),k=e==mxConstants.DIRECTION_EAST||e==mxConstants.DIRECTION_WEST,l=d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST,e==d?f(a):k==l?c(a):z(a,d!=mxConstants.DIRECTION_NORTH&&d!=mxConstants.DIRECTION_WEST)):J.call(this,a,d,e,k,l,m)};g.getSubtree=function(a){var c=[a];!d(a)&&!b(a)||t(a)||g.traverse(a,!0,function(a,b){null!= +U)}mxEvent.isConsumed(a)||C.apply(this,arguments)};var J=g.connectVertex;g.connectVertex=function(a,d,e,k,l,m){var n=g.getIncomingEdges(a);return b(a)&&0<n.length?(e=x(a),k=e==mxConstants.DIRECTION_EAST||e==mxConstants.DIRECTION_WEST,l=d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST,e==d?f(a):k==l?c(a):A(a,d!=mxConstants.DIRECTION_NORTH&&d!=mxConstants.DIRECTION_WEST)):J.call(this,a,d,e,k,l,m)};g.getSubtree=function(a){var c=[a];!d(a)&&!b(a)||t(a)||g.traverse(a,!0,function(a,b){null!= b&&0>mxUtils.indexOf(c,b)&&c.push(b);0>mxUtils.indexOf(c,a)&&c.push(a);return!0});return c};var P=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){P.apply(this,arguments);(d(this.state.cell)||b(this.state.cell))&&0<this.graph.getOutgoingEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(a),this.moveHandle.setAttribute("title","Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="18px", this.moveHandle.style.height="18px",this.graph.container.appendChild(this.moveHandle),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(a){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(a),mxEvent.getClientY(a));this.graph.graphHandler.cells=this.graph.getSubtree(this.state.cell);this.graph.graphHandler.bounds=this.state.view.getBounds(this.graph.graphHandler.cells);this.graph.graphHandler.pBounds=this.graph.graphHandler.getPreviewBounds(this.graph.graphHandler.cells); -this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(a);this.graph.isMouseDown=!0;mxEvent.consume(a)})))};var G=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){G.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var K=mxVertexHandler.prototype.destroy; -mxVertexHandler.prototype.destroy=function(a,b){K.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var d=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var a=d.apply(this,arguments),b=this.graph;return a.concat([this.addEntry("tree container",function(){var a=new mxCell("Tree Container",new mxGeometry(0,0,220,160),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;"); +this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(a);this.graph.isMouseDown=!0;mxEvent.consume(a)})))};var G=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){G.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var L=mxVertexHandler.prototype.destroy; +mxVertexHandler.prototype.destroy=function(a,b){L.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var d=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var a=d.apply(this,arguments),b=this.graph;return a.concat([this.addEntry("tree container",function(){var a=new mxCell("Tree Container",new mxGeometry(0,0,220,160),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;"); a.vertex=!0;return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap central idea branch topic",function(){var a=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");a.vertex=!0;var b=new mxCell("Central Idea",new mxGeometry(160,60,100,40),"ellipse;whiteSpace=wrap;html=1;align=center;container=1;recursiveResize=0;treeFolding=1;treeMoving=1;");b.vertex=!0;var d=new mxCell("Topic", new mxGeometry(320,40,80,20),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;");d.vertex=!0;var e=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");e.geometry.relative=!0;e.edge=!0;b.insertEdge(e,!0);d.insertEdge(e,!1);var c=new mxCell("Branch",new mxGeometry(320,80,72,26),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;"); c.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");f.geometry.relative=!0;f.edge=!0;b.insertEdge(f,!0);c.insertEdge(f,!1);var k=new mxCell("Topic",new mxGeometry(20,40,80,20),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;");k.vertex=!0;var l=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;"); @@ -3403,7 +3403,7 @@ mxWindow.prototype.minimizeImage=Graph.createSvgImage(14,10,'<path d="M 3 7 L 7 "#f0f0f0";mxGraphHandler.prototype.previewColor="#C0C0C0";mxRubberband.prototype.defaultOpacity=50;HoverIcons.prototype.inactiveOpacity=25;Format.prototype.showCloseButton=!1;EditorUi.prototype.closableScratchpad=!1;EditorUi.prototype.toolbarHeight=46;EditorUi.prototype.footerHeight=0;Graph.prototype.editAfterInsert=!0;Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var m=EditorUi.prototype.updateTabContainer;EditorUi.prototype.updateTabContainer= function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom=this.tabContainerHeight+"px");m.apply(this,arguments)};var r=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){r.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var t=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(a,b){null!=b.shortcut&&900>e&&!mxClient.IS_IOS?a.firstChild.nextSibling.setAttribute("title", b.shortcut):t.apply(this,arguments)};var x=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){x.apply(this,arguments);if(null!=this.userElement){var a=this.userElement;a.style.cssText="position:relative;margin-right:4px;cursor:pointer;display:"+a.style.display;a.className="geToolbarButton";a.innerHTML="";a.style.backgroundImage="url("+Editor.userImage+")";a.style.backgroundPosition="center center";a.style.backgroundRepeat="no-repeat";a.style.backgroundSize="24px 24px";a.style.height= -"24px";a.style.width="24px";a.style.cssFloat="right";a.setAttribute("title",mxResources.get("changeUser"));"none"!=a.style.display&&(a.style.display="inline-block")}};var z=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){z.apply(this,arguments);if(null!=this.shareButton){var a=this.shareButton;a.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;";a.className="geToolbarButton";a.innerHTML="";a.style.backgroundImage= +"24px";a.style.width="24px";a.style.cssFloat="right";a.setAttribute("title",mxResources.get("changeUser"));"none"!=a.style.display&&(a.style.display="inline-block")}};var A=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){A.apply(this,arguments);if(null!=this.shareButton){var a=this.shareButton;a.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;";a.className="geToolbarButton";a.innerHTML="";a.style.backgroundImage= "url("+Editor.shareImage+")";a.style.backgroundPosition="center center";a.style.backgroundRepeat="no-repeat";a.style.backgroundSize="24px 24px";a.style.height="24px";a.style.width="24px"}};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.buttonContainer){var a=document.createElement("div");a.style.display="inline-block";a.style.position="relative";a.style.marginTop="2px";var b=document.createElement("button");mxUtils.write(b,mxResources.get("save"));b.setAttribute("title",mxResources.get("save")+ " ("+Editor.ctrlKey+"+S)");b.className="1"==urlParams.saveAndExit?"geMenuItem":"geMenuItem gePrimaryBtn";b.style.fontSize="14px";b.style.padding="6px";b.style.borderRadius="3px";b.style.marginLeft="8px";b.style.cursor="pointer";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()}));a.appendChild(b);"1"==urlParams.saveAndExit&&(b=document.createElement("a"),mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",mxResources.get("saveAndExit")), b.className="geMenuItem gePrimaryBtn",b.style.fontSize="14px",b.style.marginLeft="6px",b.style.padding="6px",b.style.cursor="pointer",mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b));b=document.createElement("a");mxUtils.write(b,mxResources.get("exit"));b.setAttribute("title",mxResources.get("exit"));b.className="geMenuItem";b.style.fontSize="14px";b.style.marginLeft="6px";b.style.padding="6px";b.style.cursor="pointer";mxEvent.addListener(b, @@ -3441,12 +3441,12 @@ null],60)}b=l.menus.get("language");null!=b&&!mxClient.IS_CHROMEAPP&&!EditorUi.i null==urlParams.libs||b(this);var l=this,m=l.editor.graph;l.toolbar=this.createToolbar(l.createDiv("geToolbar"));l.defaultLibraryName=mxResources.get("untitledLibrary");var p=document.createElement("div");p.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;border-bottom:1px solid lightgray;background-color:#ffffff;text-align:left;white-space:nowrap;";var r=null,t=new Menubar(l,p);l.statusContainer=l.createStatusContainer();l.statusContainer.style.position="relative"; l.statusContainer.style.maxWidth="";l.statusContainer.style.marginTop="7px";l.statusContainer.style.marginLeft="6px";l.statusContainer.style.color="gray";l.statusContainer.style.cursor="default";l.editor.addListener("statusChanged",mxUtils.bind(this,function(){l.setStatusText(l.editor.getStatus())}));var x=l.descriptorChanged;l.descriptorChanged=function(){x.apply(this,arguments);var a=l.getCurrentFile();if(null!=a&&null!=a.getTitle()){var b=a.getMode();"google"==b?b="googleDrive":"github"==b?b="gitHub": "gitlab"==b?b="gitLab":"onedrive"==b&&(b="oneDrive");b=mxResources.get(b);p.setAttribute("title",a.getTitle()+(null!=b?" ("+b+")":""))}else p.removeAttribute("title")};l.setStatusText(l.editor.getStatus());p.appendChild(l.statusContainer);l.buttonContainer=document.createElement("div");l.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";p.appendChild(l.buttonContainer);l.menubarContainer=l.buttonContainer; -l.tabContainer=document.createElement("div");l.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;border-bottom:1px solid lightgray;background-color:#ffffff;border-top:1px solid lightgray;margin-bottom:-2px;visibility:hidden;";var k=l.diagramContainer.parentNode,z=document.createElement("div");z.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";l.diagramContainer.style.top="47px";var K=l.menus.get("viewZoom"); -if(null!=K){this.tabContainer.style.right="70px";var C=t.addMenu("100%",K.funct);C.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");C.style.whiteSpace="nowrap";C.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";C.style.backgroundPosition="right 6px center";C.style.backgroundRepeat="no-repeat";C.style.backgroundColor="#ffffff";C.style.paddingRight="10px";C.style.display="block";C.style.position="absolute";C.style.textDecoration="none";C.style.textDecoration="none"; -C.style.right="0px";C.style.bottom="0px";C.style.overflow="hidden";C.style.visibility="hidden";C.style.textAlign="center";C.style.color="#000";C.style.fontSize="12px";C.style.color="#707070";C.style.width="59px";C.style.cursor="pointer";C.style.borderTop="1px solid lightgray";C.style.borderLeft="1px solid lightgray";C.style.height=parseInt(l.tabContainerHeight)-1+"px";C.style.lineHeight=parseInt(l.tabContainerHeight)+1+"px";z.appendChild(C);K=mxUtils.bind(this,function(){C.innerHTML=Math.round(100* -l.editor.graph.view.scale)+"%"});l.editor.graph.view.addListener(mxEvent.EVENT_SCALE,K);l.editor.addListener("resetGraphView",K);l.editor.addListener("pageSelected",K);var L=l.setGraphEnabled;l.setGraphEnabled=function(){L.apply(this,arguments);null!=this.tabContainer&&(C.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility?this.tabContainerHeight+"px":"0px")}}z.appendChild(l.tabContainer);z.appendChild(p);z.appendChild(l.diagramContainer); -k.appendChild(z);l.updateTabContainer();var M=null;f();mxEvent.addListener(window,"resize",function(){f();null!=l.sidebarWindow&&l.sidebarWindow.window.fit();null!=l.formatWindow&&l.formatWindow.window.fit();null!=l.actions.outlineWindow&&l.actions.outlineWindow.window.fit();null!=l.actions.layersWindow&&l.actions.layersWindow.window.fit();null!=l.menus.tagsWindow&&l.menus.tagsWindow.window.fit();null!=l.menus.findWindow&&l.menus.findWindow.window.fit()})}}}; -(function(){var a=!1;"min"!=uiTheme||a||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),a=!0);var b=EditorUi.initTheme;EditorUi.initTheme=function(){b.apply(this,arguments);"min"!=uiTheme||a||(this.initMinimalTheme(),a=!0)}})();DrawioComment=function(a,b,e,d,l,m,r){this.file=a;this.id=b;this.content=e;this.modifiedDate=d;this.createdDate=l;this.isResolved=m;this.user=r;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(a){null!=a&&this.replies.push(a)};DrawioComment.prototype.addReply=function(a,b,e,d,l){b()};DrawioComment.prototype.editComment=function(a,b,e){b()};DrawioComment.prototype.deleteComment=function(a,b){a()};DrawioUser=function(a,b,e,d,l){this.id=a;this.email=b;this.displayName=e;this.pictureUrl=d;this.locale=l};mxResources.parse('# *DO NOT DIRECTLY EDIT THIS FILE, IT IS AUTOMATICALLY GENERATED AND IT IS BASED ON:*\n# https://docs.google.com/spreadsheet/ccc?key=0AmQEO36liL4FdDJLWVNMaVV2UmRKSnpXU09MYkdGbEE\naboutDrawio=About draw.io\naccessDenied=Access Denied\naction=Action\nactualSize=Actual Size\nadd=Add\naddedFile=Added {1}\naddImages=Add Images\naddImageUrl=Add Image URL\naddLayer=Add Layer\naddProperty=Add Property\naddress=Address\naddToExistingDrawing=Add to Existing Drawing\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nalign=Align\nalignment=Alignment\nallChangesLost=All changes will be lost!\nallPages=All Pages\nallProjects=All Projects\nallSpaces=All Spaces\nallTags=All Tags\nanchor=Anchor\nandroid=Android\nangle=Angle\narc=Arc\nareYouSure=Are you sure?\nensureDataSaved=Please ensure your data is saved before closing.\nallChangesSaved=All changes saved\nallChangesSavedInDrive=All changes saved in Drive\nallowPopups=Allow pop-ups to avoid this dialog.\nallowRelativeUrl=Allow relative URL\nalreadyConnected=Nodes already connected\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\nasNew=As New\natlas=Atlas\nauthor=Author\nauthorizationRequired=Authorization required\nauthorizeThisAppIn=Authorize this app in {1}:\nauthorize=Authorize\nauthorizing=Authorizing\nautomatic=Automatic\nautosave=Autosave\nautosize=Autosize\nattachments=Attachments\naws=AWS\naws3d=AWS 3D\nazure=Azure\nback=Back\nbackground=Background\nbackgroundColor=Background Color\nbackgroundImage=Background Image\nbasic=Basic\nblankDrawing=Blank Drawing\nblankDiagram=Blank Diagram\nblock=Block\nblockquote=Blockquote\nblog=Blog\nbold=Bold\nbootstrap=Bootstrap\nborder=Border\nborderColor=Border Color\nborderWidth=Borderwidth\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\nbrowser=Browser\nbulletedList=Bulleted List\nbusiness=Business\nbusy=Operation in progress\ncabinets=Cabinets\ncancel=Cancel\ncenter=Center\ncannotLoad=Load attempts failed. Please try again later.\ncannotLogin=Log in attempts failed. Please try again later.\ncannotOpenFile=Cannot open file\nchange=Change\nchangeOrientation=Change Orientation\nchangeUser=Change user\nchangeStorage=Change storage\nchangesNotSaved=Changes have not been saved\nuserJoined={1} has joined\nuserLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\ncollaborativeEditingNotice=Important Notice for Collaborative Editing\ncompressed=Compressed\ncommitMessage=Commit Message\ncsv=CSV\ndark=Dark\ndraftFound=A draft for \'{1}\' has been found. Load it into the editor or discard it to continue.\ndragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?\ndropboxCharsNotAllowed=The following characters are not allowed: / : ? * " |\ncheck=Check\nchecksum=Checksum\ncircle=Circle\ncisco=Cisco\nclassic=Classic\nclearDefaultStyle=Clear Default Style\nclearWaypoints=Clear Waypoints\nclipart=Clipart\nclose=Close\ncollaborator=Collaborator\ncollaborators=Collaborators\ncollapse=Collapse\ncollapseExpand=Collapse/Expand\ncollapse-expand=Click to collapse/expand\nShift-click to move neighbors \nAlt-click to protect group size\ncollapsible=Collapsible\ncomic=Comic\ncomment=Comment\ncommentsNotes=Comments/Notes\ncompress=Compress\nconnect=Connect\nconnecting=Connecting\nconnectWithDrive=Connect with Google Drive\nconnection=Connection\nconnectionArrows=Connection Arrows\nconnectionPoints=Connection Points\nconstrainProportions=Constrain Proportions\ncontainsValidationErrors=Contains validation errors\ncopiedToClipboard=Copied to clipboard\ncopy=Copy\ncopyConnect=Copy on connect\ncopyCreated=A copy of the file was created.\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopySize=Copy Size\ncopyStyle=Copy Style\ncreate=Create\ncreateNewDiagram=Create New Diagram\ncreateRevision=Create Revision\ncreateShape=Create Shape\ncrop=Crop\ncurved=Curved\ncustom=Custom\ncurrent=Current\ncut=Cut\ndashed=Dashed\ndecideLater=Decide later\ndefault=Default\ndelete=Delete\ndeleteColumn=Delete Column\ndeleteLibrary401=Insufficient permissions to delete this library\ndeleteLibrary404=Selected library could not be found\ndeleteLibrary500=Error deleting library\ndeleteLibraryConfirm=You are about to permanently delete this library. Are you sure you want to do this?\ndeleteRow=Delete Row\ndescription=Description\ndevice=Device\ndiagram=Diagram\ndiagramContent=Diagram Content\ndiagramLocked=Diagram has been locked to prevent further data loss.\ndiagramLockedBySince=The diagram is locked by {1} since {2} ago\ndiagramName=Diagram Name\ndiagramIsPublic=Diagram is public\ndiagramIsNotPublic=Diagram is not public\ndiamond=Diamond\ndiamondThin=Diamond (thin)\ndidYouKnow=Did you know...\ndirection=Direction\ndiscard=Discard\ndiscardChangesAndReconnect=Discard Changes and Reconnect\ngoogleDriveMissingClickHere=Google Drive missing? Click here!\ndiscardChanges=Discard Changes\ndisconnected=Disconnected\ndistribute=Distribute\ndone=Done\ndotted=Dotted\ndoubleClickOrientation=Doubleclick to change orientation\ndoubleClickTooltip=Doubleclick to insert text\ndoubleClickChangeProperty=Doubleclick to change property name\ndownload=Download\ndownloadDesktop=Download draw.io Desktop\ndownloadAs=Download as\nclickHereToSave=Click here to save.\ndraftDiscarded=Draft discarded\ndraftSaved=Draft saved\ndragElementsHere=Drag elements here\ndragImagesHere=Drag images or URLs here\ndragUrlsHere=Drag URLs here\ndraw.io=draw.io\ndrawing=Drawing{1}\ndrawingEmpty=Drawing is empty\ndrawingTooLarge=Drawing is too large\ndrawioForWork=Draw.io for GSuite\ndropbox=Dropbox\nduplicate=Duplicate\nduplicateIt=Duplicate {1}\ndivider=Divider\ndx=Dx\ndy=Dy\neast=East\nedit=Edit\neditData=Edit Data\neditDiagram=Edit Diagram\neditGeometry=Edit Geometry\neditImage=Edit Image\neditImageUrl=Edit Image URL\neditLink=Edit Link\neditShape=Edit Shape\neditStyle=Edit Style\neditText=Edit Text\neditTooltip=Edit Tooltip\nglass=Glass\ngoogleImages=Google Images\nimageSearch=Image Search\neip=EIP\nembed=Embed\nembedImages=Embed Images\nmainEmbedNotice=Paste this into the page\nelectrical=Electrical\nellipse=Ellipse\nembedNotice=Paste this once at the end of the page\nenterGroup=Enter Group\nenterName=Enter Name\nenterPropertyName=Enter Property Name\nenterValue=Enter Value\nentityRelation=Entity Relation\nerror=Error\nerrorDeletingFile=Error deleting file\nerrorLoadingFile=Error loading file\nerrorRenamingFile=Error renaming file\nerrorRenamingFileNotFound=Error renaming file. File was not found.\nerrorRenamingFileForbidden=Error renaming file. Insufficient access rights.\nerrorSavingDraft=Error saving draft\nerrorSavingFile=Error saving file\nerrorSavingFileUnknown=Error authorizing with Google\'s servers. Please refresh the page to re-attempt.\nerrorSavingFileForbidden=Error saving file. Insufficient access rights.\nerrorSavingFileNameConflict=Could not save diagram. Current page already contains file named \'{1}\'.\nerrorSavingFileNotFound=Error saving file. File was not found.\nerrorSavingFileReadOnlyMode=Could not save diagram while read-only mode is active.\nerrorSavingFileSessionTimeout=Your session has ended. Please <a target=\'_blank\' href=\'{1}\'>{2}</a> and return to this tab to try to save again.\nerrorSendingFeedback=Error sending feedback.\nerrorUpdatingPreview=Error updating preview.\nexit=Exit\nexitGroup=Exit Group\nexpand=Expand\nexport=Export\nexporting=Exporting\nexportAs=Export as\nexportOptionsDisabled=Export options disabled\nexportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.\nexternalChanges=External Changes\nextras=Extras\nfacebook=Facebook\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwriteDialog=The file has been modified. Do you want to save the file and overwrite those changes?\nfileChangedSyncDialog=The file has been modified. Do you want to synchronize those changes?\nfileChangedSync=The file has been modified. Click here to synchronize.\noverwrite=Overwrite\nsynchronize=Synchronize\nfilename=Filename\nfileExists=File already exists\nfileNearlyFullSeeFaq=File nearly full, please see FAQ\nfileNotFound=File not found\nrepositoryNotFound=Repository not found\nfileNotFoundOrDenied=The file was not found. It does not exist or you do not have read access.\nfileNotLoaded=File not loaded\nfileNotSaved=File not saved\nfileOpenLocation=How would you like to open these file(s)?\nfiletypeHtml=.html causes file to save as HTML with redirect to cloud URL\nfiletypePng=.png causes file to save as PNG with embedded data\nfiletypeSvg=.svg causes file to save as SVG with embedded data\nfileWillBeSavedInAppFolder={1} will be saved in the app folder.\nfill=Fill\nfillColor=Fill Color\nfilterCards=Filter Cards\nfind=Find\nfit=Fit\nfitContainer=Resize Container\nfitIntoContainer=Fit into Container\nfitPage=Fit Page\nfitPageWidth=Fit Page Width\nfitTo=Fit to\nfitToSheetsAcross=sheet(s) across\nfitToBy=by\nfitToSheetsDown=sheet(s) down\nfitTwoPages=Two Pages\nfitWindow=Fit Window\nflip=Flip\nflipH=Flip Horizontal\nflipV=Flip Vertical\nflowchart=Flowchart\nfolder=Folder\nfont=Font\nfontColor=Font Color\nfontFamily=Font Family\nfontSize=Font Size\nforbidden=You are not authorized to access this file\nformat=Format\nformatPanel=Format Panel\nformatted=Formatted\nformattedText=Formatted Text\nformatPng=PNG\nformatGif=GIF\nformatJpg=JPEG\nformatPdf=PDF\nformatSql=SQL\nformatSvg=SVG\nformatHtmlEmbedded=HTML\nformatSvgEmbedded=SVG (with XML)\nformatVsdx=VSDX\nformatVssx=VSSX\nformatXmlPlain=XML (Plain)\nformatXml=XML\nforum=Discussion/Help Forums\nfreehand=Freehand\nfromTemplate=From Template\nfromTemplateUrl=From Template URL\nfromText=From Text\nfromUrl=From URL\nfromThisPage=From this page\nfullscreen=Fullscreen\ngap=Gap\ngcp=GCP\ngeneral=General\ngithub=GitHub\ngitlab=GitLab\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\ngooglePlus=Google+\ngoogleSharingNotAvailable=Sharing is only available via Google Drive. Please click Open below and share from the more actions menu:\ngoogleSlides=Google Slides\ngoogleSites=Google Sites\ngradient=Gradient\ngradientColor=Color\ngrid=Grid\ngridColor=Grid Color\ngridSize=Grid Size\ngroup=Group\nguides=Guides\nhateApp=I hate draw.io\nheading=Heading\nheight=Height\nhelp=Help\nhelpTranslate=Help us translate this application\nhide=Hide\nhideIt=Hide {1}\nhidden=Hidden\nhome=Home\nhorizontal=Horizontal\nhorizontalFlow=Horizontal Flow\nhorizontalTree=Horizontal Tree\nhowTranslate=How good is the translation in your language?\nhtml=HTML\nhtmlText=HTML Text\nid=ID\niframe=IFrame\nignore=Ignore\nimage=Image\nimageUrl=Image URL\nimages=Images\nimagePreviewError=This image couldn\'t be loaded for preview. Please check the URL.\nimageTooBig=Image too big\nimgur=Imgur\nimport=Import\nimportFrom=Import from\nincludeCopyOfMyDiagram=Include a copy of my diagram\nincreaseIndent=Increase Indent\ndecreaseIndent=Decrease Indent\ninsert=Insert\ninsertColumnBefore=Insert Column Left\ninsertColumnAfter=Insert Column Right\ninsertEllipse=Insert Ellipse\ninsertImage=Insert Image\ninsertHorizontalRule=Insert Horizontal Rule\ninsertLink=Insert Link\ninsertPage=Insert Page\ninsertRectangle=Insert Rectangle\ninsertRhombus=Insert Rhombus\ninsertRowBefore=Insert Row Above\ninsertRowAfter=Insert Row After\ninsertText=Insert Text\ninserting=Inserting\ninvalidFilename=Diagram names must not contain the following characters: / | : ; { } < > & + ? = "\ninvalidLicenseSeeThisPage=Your license is invalid, please see this <a target="_blank" href="https://support.draw.io/display/DFCS/Licensing+your+draw.io+plugin">page</a>.\ninvalidInput=Invalid input\ninvalidName=Invalid name\ninvalidOrMissingFile=Invalid or missing file\ninvalidPublicUrl=Invalid public URL\nisometric=Isometric\nios=iOS\nitalic=Italic\nkennedy=Kennedy\nkeyboardShortcuts=Keyboard Shortcuts\nlayers=Layers\nlandscape=Landscape\nlanguage=Language\nleanMapping=Lean Mapping\nlastChange=Last change {1} ago\nlessThanAMinute=less than a minute\nlicensingError=Licensing Error\nlicenseHasExpired=The license for {1} has expired on {2}. Click here.\nlicenseWillExpire=The license for {1} will expire on {2}. Click here.\nlineJumps=Line jumps\nlinkAccountRequired=If the diagram is not public a Google account is required to view the link.\nlinkText=Link Text\nlist=List\nminute=minute\nminutes=minutes\nhours=hours\ndays=days\nmonths=months\nyears=years\nrestartForChangeRequired=Changes will take effect after page refresh.\nlaneColor=Lanecolor\nlastModified=Last modified\nlayout=Layout\nleft=Left\nleftAlign=Left Align\nleftToRight=Left to right\nlibraryTooltip=Drag and drop shapes here or click + to insert. Double click to edit.\nlightbox=Lightbox\nline=Line\nlineend=Line end\nlineheight=Line Height\nlinestart=Line start\nlinewidth=Linewidth\nlink=Link\nlinks=Links\nloading=Loading\nlockUnlock=Lock/Unlock\nloggedOut=Logged Out\nlogIn=log in\nloveIt=I love {1}\nlucidchart=Lucidchart\nmaps=Maps\nmathematicalTypesetting=Mathematical Typesetting\nmakeCopy=Make a Copy\nmanual=Manual\nmicrosoftOffice=Microsoft Office\nmicrosoftExcel=Microsoft Excel\nmicrosoftPowerPoint=Microsoft PowerPoint\nmicrosoftWord=Microsoft Word\nmiddle=Middle\nminimal=Minimal\nmisc=Misc\nmockups=Mockups\nmodificationDate=Modification date\nmodifiedBy=Modified by\nmore=More\nmoreResults=More Results\nmoreShapes=More Shapes\nmove=Move\nmoveToFolder=Move to Folder\nmoving=Moving\nmoveSelectionTo=Move selection to {1}\nname=Name\nnavigation=Navigation\nnetwork=Network\nnetworking=Networking\nnew=New\nnewLibrary=New Library\nnextPage=Next Page\nno=No\nnoPickFolder=No, pick folder\nnoAttachments=No attachments found\nnoColor=No Color\nnoFiles=No Files\nnoFileSelected=No file selected\nnoLibraries=No libraries found\nnoMoreResults=No more results\nnone=None\nnoOtherViewers=No other viewers\nnoPlugins=No plugins\nnoPreview=No preview\nnoResponse=No response from server\nnoResultsFor=No results for \'{1}\'\nnoRevisions=No revisions\nnoSearchResults=No search results found\nnoPageContentOrNotSaved=No anchors found on this page or it hasn\'t been saved yet\nnormal=Normal\nnorth=North\nnotADiagramFile=Not a diagram file\nnotALibraryFile=Not a library file\nnotAvailable=Not available\nnotAUtf8File=Not a UTF-8 file\nnotConnected=Not connected\nnote=Note\nnotUsingService=Not using {1}?\nnumberedList=Numbered list\noffline=Offline\nok=OK\noneDrive=OneDrive\nonline=Online\nopacity=Opacity\nopen=Open\nopenArrow=Open Arrow\nopenExistingDiagram=Open Existing Diagram\nopenFile=Open File\nopenFrom=Open from\nopenLibrary=Open Library\nopenLibraryFrom=Open Library from\nopenLink=Open Link\nopenInNewWindow=Open in New Window\nopenInThisWindow=Open in This Window\nopenIt=Open {1}\nopenRecent=Open Recent\nopenSupported=Supported formats are files saved from this software (.xml), .vsdx and .gliffy\noptions=Options\norganic=Organic\northogonal=Orthogonal\notherViewer=other viewer\notherViewers=other viewers\noutline=Outline\noval=Oval\npage=Page\npageContent=Page Content\npageNotFound=Page not found\npageWithNumber=Page-{1}\npages=Pages\npageView=Page View\npageSetup=Page Setup\npageScale=Page Scale\npan=Pan\npanTooltip=Space+Drag to pan\npaperSize=Paper Size\npattern=Pattern\npaste=Paste\npasteHere=Paste here\npasteSize=Paste Size\npasteStyle=Paste Style\nperimeter=Perimeter\npermissionAnyone=Anyone can edit\npermissionAuthor=Owner and admins can edit\npickFolder=Pick a folder\npickLibraryDialogTitle=Select Library\npublicDiagramUrl=Public URL of the diagram\nplaceholders=Placeholders\nplantUml=PlantUML\nplugins=Plugins\npluginUrl=Plugin URL\npluginWarning=The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n\nplusTooltip=Click to connect and clone (ctrl+click to clone, shift+click to connect). Drag to connect (ctrl+drag to clone).\nportrait=Portrait\nposition=Position\nposterPrint=Poster Print\npreferences=Preferences\npreview=Preview\npreviousPage=Previous Page\nprint=Print\nprintAllPages=Print All Pages\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nproperties=Properties\npublish=Publish\nquickStart=Quick Start Video\nrack=Rack\nradialTree=Radial Tree\nreadOnly=Read-only\nreconnecting=Reconnecting\nrecentlyUpdated=Recently Updated\nrecentlyViewed=Recently Viewed\nrectangle=Rectangle\nredirectToNewApp=This file was created or modified in a newer version of this app. You will be redirected now.\nrealtimeTimeout=It looks like you\'ve made a few changes while offline. We\'re sorry, these changes cannot be saved.\nredo=Redo\nrefresh=Refresh\nregularExpression=Regular Expression\nrelative=Relative\nrelativeUrlNotAllowed=Relative URL not allowed\nrememberMe=Remember me\nrememberThisSetting=Remember this setting\nremoveFormat=Clear Formatting\nremoveFromGroup=Remove from Group\nremoveIt=Remove {1}\nremoveWaypoint=Remove Waypoint\nrename=Rename\nrenamed=Renamed\nrenameIt=Rename {1}\nrenaming=Renaming\nreplace=Replace\nreplaceIt={1} already exists. Do you want to replace it?\nreplaceExistingDrawing=Replace existing drawing\nrequired=required\nreset=Reset\nresetView=Reset View\nresize=Resize\nresizeLargeImages=Do you want to resize large images to make the application run faster?\nretina=Retina\nresponsive=Responsive\nrestore=Restore\nrestoring=Restoring\nretryingIn=Retrying in {1} second(s)\nretryingLoad=Load failed. Retrying...\nretryingLogin=Login time out. Retrying...\nreverse=Reverse\nrevision=Revision\nrevisionHistory=Revision History\nrhombus=Rhombus\nright=Right\nrightAlign=Right Align\nrightToLeft=Right to left\nrotate=Rotate\nrotateTooltip=Click and drag to rotate, click to turn shape only by 90 degrees\nrotation=Rotation\nrounded=Rounded\nsave=Save\nsaveAndExit=Save & Exit\nsaveAs=Save as\nsaveAsXmlFile=Save as XML file?\nsaved=Saved\nsaveDiagramsTo=Save diagrams to\nsaveLibrary403=Insufficient permissions to edit this library\nsaveLibrary500=There was an error while saving the library\nsaving=Saving\nscratchpad=Scratchpad\nscrollbars=Scrollbars\nsearch=Search\nsearchShapes=Search Shapes\nselectAll=Select All\nselectionOnly=Selection Only\nselectCard=Select Card\nselectEdges=Select Edges\nselectFile=Select File\nselectFolder=Select Folder\nselectFont=Select Font\nselectNone=Select None\nselectTemplate=Select Template\nselectVertices=Select Vertices\nsendMessage=Send\nsendYourFeedbackToDrawIo=Send your feedback to draw.io\nserviceUnavailableOrBlocked=Service unavailable or blocked\nsessionExpired=Your session has expired. Please refresh the browser window.\nsessionTimeoutOnSave=Your session has timed out and you have been disconnected from the Google Drive. Press OK to login and save. \nsetAsDefaultStyle=Set as Default Style\nshadow=Shadow\nshape=Shape\nshapes=Shapes\nshare=Share\nshareLink=Link for shared editing\nsharp=Sharp\nshow=Show\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click to expand. Drag and drop shapes into the diagram. Shift+click to change selection. Alt+click to insert and connect.\nsigns=Signs\nsignOut=Sign out\nsimple=Simple\nsimpleArrow=Simple Arrow\nsimpleViewer=Simple Viewer\nsize=Size\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstandard=Standard\nstartDrawing=Start drawing\nstopDrawing=Stop drawing\nstarting=Starting\nstraight=Straight\nstrikethrough=Strikethrough\nstrokeColor=Line Color\nstyle=Style\nsubscript=Subscript\nsummary=Summary\nsuperscript=Superscript\nsupport=Support\nsysml=SysML\ntags=Tags\ntable=Table\ntables=Tables\ntakeOver=Take Over\ntargetSpacing=Target Spacing\ntemplate=Template\ntemplates=Templates\ntext=Text\ntextAlignment=Text Alignment\ntextOpacity=Text Opacity\ntheme=Theme\ntimeout=Timeout\ntitle=Title\nto=to\ntoBack=To Back\ntoFront=To Front\ntoolbar=Toolbar\ntooltips=Tooltips\ntop=Top\ntopAlign=Top Align\ntopLeft=Top Left\ntopRight=Top Right\ntransparent=Transparent\ntransparentBackground=Transparent Background\ntrello=Trello\ntryAgain=Try again\ntryOpeningViaThisPage=Try opening via this page\nturn=Rotate shape only by 90°\ntype=Type\ntwitter=Twitter\numl=UML\nunderline=Underline\nundo=Undo\nungroup=Ungroup\nunsavedChanges=Unsaved changes\nunsavedChangesClickHereToSave=Unsaved changes. Click here to save.\nuntitled=Untitled\nuntitledDiagram=Untitled Diagram\nuntitledLayer=Untitled Layer\nuntitledLibrary=Untitled Library\nunknownError=Unknown error\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuseOffline=Use Offline\nuseRootFolder=Use root folder?\nuserManual=User Manual\nvertical=Vertical\nverticalFlow=Vertical Flow\nverticalTree=Vertical Tree\nview=View\nviewerSettings=Viewer Settings\nviewUrl=Link to view: {1}\nvoiceAssistant=Voice Assistant (beta)\nwarning=Warning\nwaypoints=Waypoints\nwest=West\nwidth=Width\nwiki=Wiki\nwordWrap=Word Wrap\nwritingDirection=Writing Direction\nyes=Yes\nyourEmailAddress=Your email address\nzoom=Zoom\nzoomIn=Zoom In\nzoomOut=Zoom Out\nbasic=Basic\nbusinessprocess=Business Processes\ncharts=Charts\nengineering=Engineering\nflowcharts=Flowcharts\ngmdl=Material Design\nmindmaps=Mindmaps\nmockups=Mockups\nnetworkdiagrams=Network Diagrams\nnothingIsSelected=Nothing is selected\nother=Other\nsoftwaredesign=Software Design\nvenndiagrams=Venn Diagrams\nwebEmailOrOther=Web, email or any other internet address\nwebLink=Web Link\nwireframes=Wireframes\nproperty=Property\nvalue=Value\nshowMore=Show More\nshowLess=Show Less\nmyDiagrams=My Diagrams\nallDiagrams=All Diagrams\nrecentlyUsed=Recently used\nlistView=List view\ngridView=Grid view\nresultsFor=Results for \'{1}\'\noneDriveCharsNotAllowed=The following characters are not allowed: ~ " # % * : < > ? / { | }\noneDriveInvalidDeviceName=The specified device name is invalid\nofficeNotLoggedOD=You are not logged in to OneDrive. Please open draw.io task pane and login first.\nofficeSelectSingleDiag=Please select a single draw.io diagram only without other contents.\nofficeSelectDiag=Please select a draw.io diagram.\nofficeCannotFindDiagram=Cannot find a draw.io diagram in the selection\nnoDiagrams=No diagrams found\nauthFailed=Authentication failed\nofficeFailedAuthMsg=Unable to successfully authenticate user or authorize application.\nconvertingDiagramFailed=Converting diagram failed\nofficeCopyImgErrMsg=Due to some limitations in the host application, the image could not be inserted. Please manually copy the image then paste it to the document.\ninsertingImageFailed=Inserting image failed\nofficeCopyImgInst=Instructions: Right-click the image below. Select "Copy image" from the context menu. Then, in the document, right-click and select "Paste" from the context menu.\nfolderEmpty=Folder is empty\nrecent=Recent\nsharedWithMe=Shared With Me\nsharepointSites=Sharepoint Sites\nerrorFetchingFolder=Error fetching folder items\nerrorAuthOD=Error authenticating to OneDrive\nofficeMainHeader=Adds draw.io diagrams to your document.\nofficeStepsHeader=This add-in performs the following steps:\nofficeStep1=Connects to Microsoft OneDrive, Google Drive or your device.\nofficeStep2=Select a draw.io diagram.\nofficeStep3=Insert the diagram into the document.\nofficeAuthPopupInfo=Please complete the authentication in the pop-up window.\nofficeSelDiag=Select draw.io Diagram:\nfiles=Files\nshared=Shared\nsharepoint=Sharepoint\nofficeManualUpdateInst=Instructions: Copy draw.io diagram from the document. Then, in the box below, right-click and select "Paste" from the context menu.\nofficeClickToEdit=Click icon to start editing:\npasteDiagram=Paste draw.io diagram here\nconnectOD=Connect to OneDrive\nselectChildren=Select Children\nselectSiblings=Select Siblings\nselectParent=Select Parent\nselectDescendants=Select Descendants\nlastSaved=Last saved {1} ago\nresolve=Resolve\nreopen=Re-open\nshowResolved=Show Resolved\nreply=Reply\nobjectNotFound=Object not found\nreOpened=Re-opened\nmarkedAsResolved=Marked as resolved\nnoCommentsFound=No comments found\ncomments=Comments\ntimeAgo={1} ago\nconfluenceCloud=Confluence Cloud\nlibraries=Libraries\nconfAnchor=Confluence Page Anchor\nconfTimeout=The connection has timed out\nconfSrvTakeTooLong=The server at {1} is taking too long to respond.\nconfCannotInsertNew=Cannot insert draw.io diagram to a new Confluence page\nconfSaveTry=Please save the page and try again.\nconfCannotGetID=Unable to determine page ID\nconfContactAdmin=Please contact your Confluence administrator.\nreadErr=Read Error\neditingErr=Editing Error\nconfExtEditNotPossible=This diagram cannot be edited externally. Please try editing it while editing the page\nconfEditedExt=Diagram/Page edited externally\ndiagNotFound=Diagram Not Found\nconfEditedExtRefresh=Diagram/Page is edited externally. Please refresh the page.\nconfCannotEditDraftDelOrExt=Cannot edit diagrams in a draft page, diagram is deleted from the page, or diagram is edited externally. Please, check the page.\nretBack=Return back\nconfDiagNotPublished=The diagram does not belong to a published page\ncreatedByDraw=Created by draw.io\nfilenameShort=Filename too short\ninvalidChars=Invalid characters\nalreadyExst={1} already exists\ndraftReadErr=Draft Read Error\ndiagCantLoad=Diagram cannot be loaded\ndraftWriteErr=Draft Write Error\ndraftCantCreate=Draft could not be created\nconfDuplName=Duplicate diagram name detected. Please pick another name.\nconfSessionExpired=Looks like your session expired. Log in again to keep working.\nlogin=Login\ndrawPrev=draw.io preview\ndrwaDiag=draw.io diagram\nunknownErr=Unkown Error\ninvalidCallFnNotFound=Invalid Call: {1} not found\ninvalidCallErrOccured=Invalid Call: An error occured, {1}\nanonymous=Anonymous\nconfGotoPage=Go to containing page\nshowComments=Show Comments\nconfError=Error: {1}\ngliffyImport=Gliffy Import\ngliffyImportInst1=Click the "Start Import" button to import all Gliffy diagrams to draw.io.\ngliffyImportInst2=Please note that the import procedure will take some time and the browser window must remain open until the import is completed.\nstartImport=Start Import\ndrawConfig=draw.io Configuration\ncustomLib=Custom Libraries\ncustomTemp=Custom Templates\npageIdsExp=Page IDs Export\ndrawReindex=draw.io re-indexing (beta)\nworking=Working\ndrawConfigNotFoundInst=draw.io Configuration Space (DRAWIOCONFIG) does not exist. This space is needed to store draw.io configuration files and custom libraries/templates.\ncreateConfSp=Create Config Space\nunexpErrRefresh=Unexpected error, please refresh the page and try again.\nconfigJSONInst=Write draw.io JSON configuration in the editor below then click save. If you need help, please refer to\nthisPage=this page\ncurCustLib=Current Custom Libraries\nlibName=Library Name\naction=Action\ndrawConfID=draw.io Config ID\naddLibInst=Click the "Add Library" button to upload a new library.\naddLib=Add Library\ncustomTempInst1=Custom templates are draw.io diagrams saved in children pages of\ncustomTempInst2=For more details, please refer to\ntempsPage=Templates page\npageIdsExpInst1=Click the "Start Export" button to export all pages IDs.\npageIdsExpInst2=Please note that the export procedure will take some time and the browser window must remain open until the export is completed.\nstartExp=Start Export\nrefreshDrawIndex=Refresh draw.io Diagrams Index\nreindexInst1=Click the "Start Indexing" button to refresh draw.io diagrams index.\nreindexInst2=Please note that the indexing procedure will take some time and the browser window must remain open until the indexing is completed.\nstartIndexing=Start Indexing\nconfAPageFoundFetch=Page "{1}" found. Fetching\nconfAAllDiagDone=All {1} diagrams processed. Process finished.\nconfAStartedProcessing=Started processing page "{1}"\nconfAAllDiagInPageDone=All {1} diagrams in page "{2}" processed successfully.\nconfAPartialDiagDone={1} out of {2} {3} diagrams in page "{4}" processed successfully.\nconfAUpdatePageFailed=Updating page "{1}" failed.\nconfANoDiagFoundInPage=No {1} diagrams found in page "{2}".\nconfAFetchPageFailed=Fetching the page failed.\nconfANoDiagFound=No {1} diagrams found. Process finished.\nconfASearchFailed=Searching for {1} diagrams failed. Please try again later.\nconfAGliffyDiagFound=Gliffy diagram "{1}" found. Importing\nconfAGliffyDiagImported=Gliffy diagram "{1}" imported successfully.\nconfASavingImpGliffyFailed=Saving imported Gliffy diagram "{1}" failed.\nconfAImportedFromByDraw=Imported from "{1}" by draw.io\nconfAImportGliffyFailed=Importing Gliffy diagram "{1}" failed.\nconfAFetchGliffyFailed=Fetching Gliffy diagram "{1}" failed.\nconfACheckBrokenDiagLnk=Checking for broken diagrams links.\nconfADelDiagLinkOf=Deleting diagram link of "{1}"\nconfADupLnk=(duplicate link)\nconfADelDiagLnkFailed=Deleting diagram link of "{1}" failed.\nconfAUnexpErrProcessPage=Unexpected error during processing the page with id: {1}\nconfADiagFoundIndex=Diagram "{1}" found. Indexing\nconfADiagIndexSucc=Diagram "{1}" indexed successfully.\nconfAIndexDiagFailed=Indexing diagram "{1}" failed.\nconfASkipDiagOtherPage=Skipped "{1}" as it belongs to another page!\nconfADiagUptoDate=Diagram "{1}" is up to date.\nconfACheckPagesWDraw=Checking pages having draw.io diagrams.\nconfAErrOccured=An error occured!\nsavedSucc=Saved successfully\nconfASaveFailedErr=Saving Failed (Unexpected Error)\ncharacter=Character\nconfAConfPageDesc=This page contains draw.io configuration file (configuration.json) as attachment\nconfALibPageDesc=This page contains draw.io custom libraries as attachments\nconfATempPageDesc=This page contains draw.io custom templates as attachments\nworking=Working\nconfAConfSpaceDesc=This space is used to store draw.io configuration files and custom libraries/templates\nconfANoCustLib=No Custom Libraries\ndelFailed=Delete failed!\nshowID=Show ID\nconfAIncorrectLibFileType=Incorrect file type. Libraries should be XML files.\nuploading=Uploading\nconfALibExist=This library already exists\nconfAUploadSucc=Uploaded successfully\nconfAUploadFailErr=Upload Failed (Unexpected Error)\nhiResPreview=High Res Preview\nofficeNotLoggedGD=You are not logged in to Google Drive. Please open draw.io task pane and login first.\nofficePopupInfo=Please complete the process in the pop-up window.\npickODFile=Pick OneDrive File\npickGDriveFile=Pick Google Drive File\npickDeviceFile=Pick Device File\n');Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#ffffff"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#ffffff"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="white"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#ffffff"/></add></mxStylesheet>').documentElement; +l.tabContainer=document.createElement("div");l.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;border-bottom:1px solid lightgray;background-color:#ffffff;border-top:1px solid lightgray;margin-bottom:-2px;visibility:hidden;";var k=l.diagramContainer.parentNode,A=document.createElement("div");A.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";l.diagramContainer.style.top="47px";var L=l.menus.get("viewZoom"); +if(null!=L){this.tabContainer.style.right="70px";var B=t.addMenu("100%",L.funct);B.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");B.style.whiteSpace="nowrap";B.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";B.style.backgroundPosition="right 6px center";B.style.backgroundRepeat="no-repeat";B.style.backgroundColor="#ffffff";B.style.paddingRight="10px";B.style.display="block";B.style.position="absolute";B.style.textDecoration="none";B.style.textDecoration="none"; +B.style.right="0px";B.style.bottom="0px";B.style.overflow="hidden";B.style.visibility="hidden";B.style.textAlign="center";B.style.color="#000";B.style.fontSize="12px";B.style.color="#707070";B.style.width="59px";B.style.cursor="pointer";B.style.borderTop="1px solid lightgray";B.style.borderLeft="1px solid lightgray";B.style.height=parseInt(l.tabContainerHeight)-1+"px";B.style.lineHeight=parseInt(l.tabContainerHeight)+1+"px";A.appendChild(B);L=mxUtils.bind(this,function(){B.innerHTML=Math.round(100* +l.editor.graph.view.scale)+"%"});l.editor.graph.view.addListener(mxEvent.EVENT_SCALE,L);l.editor.addListener("resetGraphView",L);l.editor.addListener("pageSelected",L);var K=l.setGraphEnabled;l.setGraphEnabled=function(){K.apply(this,arguments);null!=this.tabContainer&&(B.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility?this.tabContainerHeight+"px":"0px")}}A.appendChild(l.tabContainer);A.appendChild(p);A.appendChild(l.diagramContainer); +k.appendChild(A);l.updateTabContainer();var M=null;f();mxEvent.addListener(window,"resize",function(){f();null!=l.sidebarWindow&&l.sidebarWindow.window.fit();null!=l.formatWindow&&l.formatWindow.window.fit();null!=l.actions.outlineWindow&&l.actions.outlineWindow.window.fit();null!=l.actions.layersWindow&&l.actions.layersWindow.window.fit();null!=l.menus.tagsWindow&&l.menus.tagsWindow.window.fit();null!=l.menus.findWindow&&l.menus.findWindow.window.fit()})}}}; +(function(){var a=!1;"min"!=uiTheme||a||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),a=!0);var b=EditorUi.initTheme;EditorUi.initTheme=function(){b.apply(this,arguments);"min"!=uiTheme||a||(this.initMinimalTheme(),a=!0)}})();DrawioComment=function(a,b,e,d,l,m,r){this.file=a;this.id=b;this.content=e;this.modifiedDate=d;this.createdDate=l;this.isResolved=m;this.user=r;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(a){null!=a&&this.replies.push(a)};DrawioComment.prototype.addReply=function(a,b,e,d,l){b()};DrawioComment.prototype.editComment=function(a,b,e){b()};DrawioComment.prototype.deleteComment=function(a,b){a()};DrawioUser=function(a,b,e,d,l){this.id=a;this.email=b;this.displayName=e;this.pictureUrl=d;this.locale=l};mxResources.parse('# *DO NOT DIRECTLY EDIT THIS FILE, IT IS AUTOMATICALLY GENERATED AND IT IS BASED ON:*\n# https://docs.google.com/spreadsheet/ccc?key=0AmQEO36liL4FdDJLWVNMaVV2UmRKSnpXU09MYkdGbEE\naboutDrawio=About draw.io\naccessDenied=Access Denied\naction=Action\nactualSize=Actual Size\nadd=Add\naddedFile=Added {1}\naddImages=Add Images\naddImageUrl=Add Image URL\naddLayer=Add Layer\naddProperty=Add Property\naddress=Address\naddToExistingDrawing=Add to Existing Drawing\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nalign=Align\nalignment=Alignment\nallChangesLost=All changes will be lost!\nallPages=All Pages\nallProjects=All Projects\nallSpaces=All Spaces\nallTags=All Tags\nanchor=Anchor\nandroid=Android\nangle=Angle\narc=Arc\nareYouSure=Are you sure?\nensureDataSaved=Please ensure your data is saved before closing.\nallChangesSaved=All changes saved\nallChangesSavedInDrive=All changes saved in Drive\nallowPopups=Allow pop-ups to avoid this dialog.\nallowRelativeUrl=Allow relative URL\nalreadyConnected=Nodes already connected\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\nasNew=As New\natlas=Atlas\nauthor=Author\nauthorizationRequired=Authorization required\nauthorizeThisAppIn=Authorize this app in {1}:\nauthorize=Authorize\nauthorizing=Authorizing\nautomatic=Automatic\nautosave=Autosave\nautosize=Autosize\nattachments=Attachments\naws=AWS\naws3d=AWS 3D\nazure=Azure\nback=Back\nbackground=Background\nbackgroundColor=Background Color\nbackgroundImage=Background Image\nbasic=Basic\nblankDrawing=Blank Drawing\nblankDiagram=Blank Diagram\nblock=Block\nblockquote=Blockquote\nblog=Blog\nbold=Bold\nbootstrap=Bootstrap\nborder=Border\nborderColor=Border Color\nborderWidth=Borderwidth\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\nbrowser=Browser\nbulletedList=Bulleted List\nbusiness=Business\nbusy=Operation in progress\ncabinets=Cabinets\ncancel=Cancel\ncenter=Center\ncannotLoad=Load attempts failed. Please try again later.\ncannotLogin=Log in attempts failed. Please try again later.\ncannotOpenFile=Cannot open file\nchange=Change\nchangeOrientation=Change Orientation\nchangeUser=Change user\nchangeStorage=Change storage\nchangesNotSaved=Changes have not been saved\nuserJoined={1} has joined\nuserLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\ncollaborativeEditingNotice=Important Notice for Collaborative Editing\ncompressed=Compressed\ncommitMessage=Commit Message\ncsv=CSV\ndark=Dark\ndraftFound=A draft for \'{1}\' has been found. Load it into the editor or discard it to continue.\ndragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?\ndropboxCharsNotAllowed=The following characters are not allowed: / : ? * " |\ncheck=Check\nchecksum=Checksum\ncircle=Circle\ncisco=Cisco\nclassic=Classic\nclearDefaultStyle=Clear Default Style\nclearWaypoints=Clear Waypoints\nclipart=Clipart\nclose=Close\ncollaborator=Collaborator\ncollaborators=Collaborators\ncollapse=Collapse\ncollapseExpand=Collapse/Expand\ncollapse-expand=Click to collapse/expand\nShift-click to move neighbors \nAlt-click to protect group size\ncollapsible=Collapsible\ncomic=Comic\ncomment=Comment\ncommentsNotes=Comments/Notes\ncompress=Compress\nconnect=Connect\nconnecting=Connecting\nconnectWithDrive=Connect with Google Drive\nconnection=Connection\nconnectionArrows=Connection Arrows\nconnectionPoints=Connection Points\nconstrainProportions=Constrain Proportions\ncontainsValidationErrors=Contains validation errors\ncopiedToClipboard=Copied to clipboard\ncopy=Copy\ncopyConnect=Copy on connect\ncopyCreated=A copy of the file was created.\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopySize=Copy Size\ncopyStyle=Copy Style\ncreate=Create\ncreateNewDiagram=Create New Diagram\ncreateRevision=Create Revision\ncreateShape=Create Shape\ncrop=Crop\ncurved=Curved\ncustom=Custom\ncurrent=Current\ncut=Cut\ndashed=Dashed\ndecideLater=Decide later\ndefault=Default\ndelete=Delete\ndeleteColumn=Delete Column\ndeleteLibrary401=Insufficient permissions to delete this library\ndeleteLibrary404=Selected library could not be found\ndeleteLibrary500=Error deleting library\ndeleteLibraryConfirm=You are about to permanently delete this library. Are you sure you want to do this?\ndeleteRow=Delete Row\ndescription=Description\ndevice=Device\ndiagram=Diagram\ndiagramContent=Diagram Content\ndiagramLocked=Diagram has been locked to prevent further data loss.\ndiagramLockedBySince=The diagram is locked by {1} since {2} ago\ndiagramName=Diagram Name\ndiagramIsPublic=Diagram is public\ndiagramIsNotPublic=Diagram is not public\ndiamond=Diamond\ndiamondThin=Diamond (thin)\ndidYouKnow=Did you know...\ndirection=Direction\ndiscard=Discard\ndiscardChangesAndReconnect=Discard Changes and Reconnect\ngoogleDriveMissingClickHere=Google Drive missing? Click here!\ndiscardChanges=Discard Changes\ndisconnected=Disconnected\ndistribute=Distribute\ndone=Done\ndotted=Dotted\ndoubleClickOrientation=Doubleclick to change orientation\ndoubleClickTooltip=Doubleclick to insert text\ndoubleClickChangeProperty=Doubleclick to change property name\ndownload=Download\ndownloadDesktop=Download draw.io Desktop\ndownloadAs=Download as\nclickHereToSave=Click here to save.\ndraftDiscarded=Draft discarded\ndraftSaved=Draft saved\ndragElementsHere=Drag elements here\ndragImagesHere=Drag images or URLs here\ndragUrlsHere=Drag URLs here\ndraw.io=draw.io\ndrawing=Drawing{1}\ndrawingEmpty=Drawing is empty\ndrawingTooLarge=Drawing is too large\ndrawioForWork=Draw.io for GSuite\ndropbox=Dropbox\nduplicate=Duplicate\nduplicateIt=Duplicate {1}\ndivider=Divider\ndx=Dx\ndy=Dy\neast=East\nedit=Edit\neditData=Edit Data\neditDiagram=Edit Diagram\neditGeometry=Edit Geometry\neditImage=Edit Image\neditImageUrl=Edit Image URL\neditLink=Edit Link\neditShape=Edit Shape\neditStyle=Edit Style\neditText=Edit Text\neditTooltip=Edit Tooltip\nglass=Glass\ngoogleImages=Google Images\nimageSearch=Image Search\neip=EIP\nembed=Embed\nembedImages=Embed Images\nmainEmbedNotice=Paste this into the page\nelectrical=Electrical\nellipse=Ellipse\nembedNotice=Paste this once at the end of the page\nenterGroup=Enter Group\nenterName=Enter Name\nenterPropertyName=Enter Property Name\nenterValue=Enter Value\nentityRelation=Entity Relation\nerror=Error\nerrorDeletingFile=Error deleting file\nerrorLoadingFile=Error loading file\nerrorRenamingFile=Error renaming file\nerrorRenamingFileNotFound=Error renaming file. File was not found.\nerrorRenamingFileForbidden=Error renaming file. Insufficient access rights.\nerrorSavingDraft=Error saving draft\nerrorSavingFile=Error saving file\nerrorSavingFileUnknown=Error authorizing with Google\'s servers. Please refresh the page to re-attempt.\nerrorSavingFileForbidden=Error saving file. Insufficient access rights.\nerrorSavingFileNameConflict=Could not save diagram. Current page already contains file named \'{1}\'.\nerrorSavingFileNotFound=Error saving file. File was not found.\nerrorSavingFileReadOnlyMode=Could not save diagram while read-only mode is active.\nerrorSavingFileSessionTimeout=Your session has ended. Please <a target=\'_blank\' href=\'{1}\'>{2}</a> and return to this tab to try to save again.\nerrorSendingFeedback=Error sending feedback.\nerrorUpdatingPreview=Error updating preview.\nexit=Exit\nexitGroup=Exit Group\nexpand=Expand\nexport=Export\nexporting=Exporting\nexportAs=Export as\nexportOptionsDisabled=Export options disabled\nexportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.\nexternalChanges=External Changes\nextras=Extras\nfacebook=Facebook\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwriteDialog=The file has been modified. Do you want to save the file and overwrite those changes?\nfileChangedSyncDialog=The file has been modified. Do you want to synchronize those changes?\nfileChangedSync=The file has been modified. Click here to synchronize.\noverwrite=Overwrite\nsynchronize=Synchronize\nfilename=Filename\nfileExists=File already exists\nfileNearlyFullSeeFaq=File nearly full, please see FAQ\nfileNotFound=File not found\nrepositoryNotFound=Repository not found\nfileNotFoundOrDenied=The file was not found. It does not exist or you do not have read access.\nfileNotLoaded=File not loaded\nfileNotSaved=File not saved\nfileOpenLocation=How would you like to open these file(s)?\nfiletypeHtml=.html causes file to save as HTML with redirect to cloud URL\nfiletypePng=.png causes file to save as PNG with embedded data\nfiletypeSvg=.svg causes file to save as SVG with embedded data\nfileWillBeSavedInAppFolder={1} will be saved in the app folder.\nfill=Fill\nfillColor=Fill Color\nfilterCards=Filter Cards\nfind=Find\nfit=Fit\nfitContainer=Resize Container\nfitIntoContainer=Fit into Container\nfitPage=Fit Page\nfitPageWidth=Fit Page Width\nfitTo=Fit to\nfitToSheetsAcross=sheet(s) across\nfitToBy=by\nfitToSheetsDown=sheet(s) down\nfitTwoPages=Two Pages\nfitWindow=Fit Window\nflip=Flip\nflipH=Flip Horizontal\nflipV=Flip Vertical\nflowchart=Flowchart\nfolder=Folder\nfont=Font\nfontColor=Font Color\nfontFamily=Font Family\nfontSize=Font Size\nforbidden=You are not authorized to access this file\nformat=Format\nformatPanel=Format Panel\nformatted=Formatted\nformattedText=Formatted Text\nformatPng=PNG\nformatGif=GIF\nformatJpg=JPEG\nformatPdf=PDF\nformatSql=SQL\nformatSvg=SVG\nformatHtmlEmbedded=HTML\nformatSvgEmbedded=SVG (with XML)\nformatVsdx=VSDX\nformatVssx=VSSX\nformatXmlPlain=XML (Plain)\nformatXml=XML\nforum=Discussion/Help Forums\nfreehand=Freehand\nfromTemplate=From Template\nfromTemplateUrl=From Template URL\nfromText=From Text\nfromUrl=From URL\nfromThisPage=From this page\nfullscreen=Fullscreen\ngap=Gap\ngcp=GCP\ngeneral=General\ngithub=GitHub\ngitlab=GitLab\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\ngooglePlus=Google+\ngoogleSharingNotAvailable=Sharing is only available via Google Drive. Please click Open below and share from the more actions menu:\ngoogleSlides=Google Slides\ngoogleSites=Google Sites\ngradient=Gradient\ngradientColor=Color\ngrid=Grid\ngridColor=Grid Color\ngridSize=Grid Size\ngroup=Group\nguides=Guides\nhateApp=I hate draw.io\nheading=Heading\nheight=Height\nhelp=Help\nhelpTranslate=Help us translate this application\nhide=Hide\nhideIt=Hide {1}\nhidden=Hidden\nhome=Home\nhorizontal=Horizontal\nhorizontalFlow=Horizontal Flow\nhorizontalTree=Horizontal Tree\nhowTranslate=How good is the translation in your language?\nhtml=HTML\nhtmlText=HTML Text\nid=ID\niframe=IFrame\nignore=Ignore\nimage=Image\nimageUrl=Image URL\nimages=Images\nimagePreviewError=This image couldn\'t be loaded for preview. Please check the URL.\nimageTooBig=Image too big\nimgur=Imgur\nimport=Import\nimportFrom=Import from\nincludeCopyOfMyDiagram=Include a copy of my diagram\nincreaseIndent=Increase Indent\ndecreaseIndent=Decrease Indent\ninsert=Insert\ninsertColumnBefore=Insert Column Left\ninsertColumnAfter=Insert Column Right\ninsertEllipse=Insert Ellipse\ninsertImage=Insert Image\ninsertHorizontalRule=Insert Horizontal Rule\ninsertLink=Insert Link\ninsertPage=Insert Page\ninsertRectangle=Insert Rectangle\ninsertRhombus=Insert Rhombus\ninsertRowBefore=Insert Row Above\ninsertRowAfter=Insert Row After\ninsertText=Insert Text\ninserting=Inserting\ninvalidFilename=Diagram names must not contain the following characters: / | : ; { } < > & + ? = "\ninvalidLicenseSeeThisPage=Your license is invalid, please see this <a target="_blank" href="https://support.draw.io/display/DFCS/Licensing+your+draw.io+plugin">page</a>.\ninvalidInput=Invalid input\ninvalidName=Invalid name\ninvalidOrMissingFile=Invalid or missing file\ninvalidPublicUrl=Invalid public URL\nisometric=Isometric\nios=iOS\nitalic=Italic\nkennedy=Kennedy\nkeyboardShortcuts=Keyboard Shortcuts\nlayers=Layers\nlandscape=Landscape\nlanguage=Language\nleanMapping=Lean Mapping\nlastChange=Last change {1} ago\nlessThanAMinute=less than a minute\nlicensingError=Licensing Error\nlicenseHasExpired=The license for {1} has expired on {2}. Click here.\nlicenseWillExpire=The license for {1} will expire on {2}. Click here.\nlineJumps=Line jumps\nlinkAccountRequired=If the diagram is not public a Google account is required to view the link.\nlinkText=Link Text\nlist=List\nminute=minute\nminutes=minutes\nhours=hours\ndays=days\nmonths=months\nyears=years\nrestartForChangeRequired=Changes will take effect after page refresh.\nlaneColor=Lanecolor\nlastModified=Last modified\nlayout=Layout\nleft=Left\nleftAlign=Left Align\nleftToRight=Left to right\nlibraryTooltip=Drag and drop shapes here or click + to insert. Double click to edit.\nlightbox=Lightbox\nline=Line\nlineend=Line end\nlineheight=Line Height\nlinestart=Line start\nlinewidth=Linewidth\nlink=Link\nlinks=Links\nloading=Loading\nlockUnlock=Lock/Unlock\nloggedOut=Logged Out\nlogIn=log in\nloveIt=I love {1}\nlucidchart=Lucidchart\nmaps=Maps\nmathematicalTypesetting=Mathematical Typesetting\nmakeCopy=Make a Copy\nmanual=Manual\nmicrosoftOffice=Microsoft Office\nmicrosoftExcel=Microsoft Excel\nmicrosoftPowerPoint=Microsoft PowerPoint\nmicrosoftWord=Microsoft Word\nmiddle=Middle\nminimal=Minimal\nmisc=Misc\nmockups=Mockups\nmodificationDate=Modification date\nmodifiedBy=Modified by\nmore=More\nmoreResults=More Results\nmoreShapes=More Shapes\nmove=Move\nmoveToFolder=Move to Folder\nmoving=Moving\nmoveSelectionTo=Move selection to {1}\nname=Name\nnavigation=Navigation\nnetwork=Network\nnetworking=Networking\nnew=New\nnewLibrary=New Library\nnextPage=Next Page\nno=No\nnoPickFolder=No, pick folder\nnoAttachments=No attachments found\nnoColor=No Color\nnoFiles=No Files\nnoFileSelected=No file selected\nnoLibraries=No libraries found\nnoMoreResults=No more results\nnone=None\nnoOtherViewers=No other viewers\nnoPlugins=No plugins\nnoPreview=No preview\nnoResponse=No response from server\nnoResultsFor=No results for \'{1}\'\nnoRevisions=No revisions\nnoSearchResults=No search results found\nnoPageContentOrNotSaved=No anchors found on this page or it hasn\'t been saved yet\nnormal=Normal\nnorth=North\nnotADiagramFile=Not a diagram file\nnotALibraryFile=Not a library file\nnotAvailable=Not available\nnotAUtf8File=Not a UTF-8 file\nnotConnected=Not connected\nnote=Note\nnotUsingService=Not using {1}?\nnumberedList=Numbered list\noffline=Offline\nok=OK\noneDrive=OneDrive\nonline=Online\nopacity=Opacity\nopen=Open\nopenArrow=Open Arrow\nopenExistingDiagram=Open Existing Diagram\nopenFile=Open File\nopenFrom=Open from\nopenLibrary=Open Library\nopenLibraryFrom=Open Library from\nopenLink=Open Link\nopenInNewWindow=Open in New Window\nopenInThisWindow=Open in This Window\nopenIt=Open {1}\nopenRecent=Open Recent\nopenSupported=Supported formats are files saved from this software (.xml), .vsdx and .gliffy\noptions=Options\norganic=Organic\northogonal=Orthogonal\notherViewer=other viewer\notherViewers=other viewers\noutline=Outline\noval=Oval\npage=Page\npageContent=Page Content\npageNotFound=Page not found\npageWithNumber=Page-{1}\npages=Pages\npageView=Page View\npageSetup=Page Setup\npageScale=Page Scale\npan=Pan\npanTooltip=Space+Drag to pan\npaperSize=Paper Size\npattern=Pattern\npaste=Paste\npasteHere=Paste here\npasteSize=Paste Size\npasteStyle=Paste Style\nperimeter=Perimeter\npermissionAnyone=Anyone can edit\npermissionAuthor=Owner and admins can edit\npickFolder=Pick a folder\npickLibraryDialogTitle=Select Library\npublicDiagramUrl=Public URL of the diagram\nplaceholders=Placeholders\nplantUml=PlantUML\nplugins=Plugins\npluginUrl=Plugin URL\npluginWarning=The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n\nplusTooltip=Click to connect and clone (ctrl+click to clone, shift+click to connect). Drag to connect (ctrl+drag to clone).\nportrait=Portrait\nposition=Position\nposterPrint=Poster Print\npreferences=Preferences\npreview=Preview\npreviousPage=Previous Page\nprint=Print\nprintAllPages=Print All Pages\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nproperties=Properties\npublish=Publish\nquickStart=Quick Start Video\nrack=Rack\nradialTree=Radial Tree\nreadOnly=Read-only\nreconnecting=Reconnecting\nrecentlyUpdated=Recently Updated\nrecentlyViewed=Recently Viewed\nrectangle=Rectangle\nredirectToNewApp=This file was created or modified in a newer version of this app. You will be redirected now.\nrealtimeTimeout=It looks like you\'ve made a few changes while offline. We\'re sorry, these changes cannot be saved.\nredo=Redo\nrefresh=Refresh\nregularExpression=Regular Expression\nrelative=Relative\nrelativeUrlNotAllowed=Relative URL not allowed\nrememberMe=Remember me\nrememberThisSetting=Remember this setting\nremoveFormat=Clear Formatting\nremoveFromGroup=Remove from Group\nremoveIt=Remove {1}\nremoveWaypoint=Remove Waypoint\nrename=Rename\nrenamed=Renamed\nrenameIt=Rename {1}\nrenaming=Renaming\nreplace=Replace\nreplaceIt={1} already exists. Do you want to replace it?\nreplaceExistingDrawing=Replace existing drawing\nrequired=required\nreset=Reset\nresetView=Reset View\nresize=Resize\nresizeLargeImages=Do you want to resize large images to make the application run faster?\nretina=Retina\nresponsive=Responsive\nrestore=Restore\nrestoring=Restoring\nretryingIn=Retrying in {1} second(s)\nretryingLoad=Load failed. Retrying...\nretryingLogin=Login time out. Retrying...\nreverse=Reverse\nrevision=Revision\nrevisionHistory=Revision History\nrhombus=Rhombus\nright=Right\nrightAlign=Right Align\nrightToLeft=Right to left\nrotate=Rotate\nrotateTooltip=Click and drag to rotate, click to turn shape only by 90 degrees\nrotation=Rotation\nrounded=Rounded\nsave=Save\nsaveAndExit=Save & Exit\nsaveAs=Save as\nsaveAsXmlFile=Save as XML file?\nsaved=Saved\nsaveDiagramFirst=Please save the diagram first\nsaveDiagramsTo=Save diagrams to\nsaveLibrary403=Insufficient permissions to edit this library\nsaveLibrary500=There was an error while saving the library\nsaving=Saving\nscratchpad=Scratchpad\nscrollbars=Scrollbars\nsearch=Search\nsearchShapes=Search Shapes\nselectAll=Select All\nselectionOnly=Selection Only\nselectCard=Select Card\nselectEdges=Select Edges\nselectFile=Select File\nselectFolder=Select Folder\nselectFont=Select Font\nselectNone=Select None\nselectTemplate=Select Template\nselectVertices=Select Vertices\nsendMessage=Send\nsendYourFeedbackToDrawIo=Send your feedback to draw.io\nserviceUnavailableOrBlocked=Service unavailable or blocked\nsessionExpired=Your session has expired. Please refresh the browser window.\nsessionTimeoutOnSave=Your session has timed out and you have been disconnected from the Google Drive. Press OK to login and save. \nsetAsDefaultStyle=Set as Default Style\nshadow=Shadow\nshape=Shape\nshapes=Shapes\nshare=Share\nshareLink=Link for shared editing\nsharp=Sharp\nshow=Show\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click to expand. Drag and drop shapes into the diagram. Shift+click to change selection. Alt+click to insert and connect.\nsigns=Signs\nsignOut=Sign out\nsimple=Simple\nsimpleArrow=Simple Arrow\nsimpleViewer=Simple Viewer\nsize=Size\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstandard=Standard\nstartDrawing=Start drawing\nstopDrawing=Stop drawing\nstarting=Starting\nstraight=Straight\nstrikethrough=Strikethrough\nstrokeColor=Line Color\nstyle=Style\nsubscript=Subscript\nsummary=Summary\nsuperscript=Superscript\nsupport=Support\nsysml=SysML\ntags=Tags\ntable=Table\ntables=Tables\ntakeOver=Take Over\ntargetSpacing=Target Spacing\ntemplate=Template\ntemplates=Templates\ntext=Text\ntextAlignment=Text Alignment\ntextOpacity=Text Opacity\ntheme=Theme\ntimeout=Timeout\ntitle=Title\nto=to\ntoBack=To Back\ntoFront=To Front\ntoolbar=Toolbar\ntooltips=Tooltips\ntop=Top\ntopAlign=Top Align\ntopLeft=Top Left\ntopRight=Top Right\ntransparent=Transparent\ntransparentBackground=Transparent Background\ntrello=Trello\ntryAgain=Try again\ntryOpeningViaThisPage=Try opening via this page\nturn=Rotate shape only by 90°\ntype=Type\ntwitter=Twitter\numl=UML\nunderline=Underline\nundo=Undo\nungroup=Ungroup\nunsavedChanges=Unsaved changes\nunsavedChangesClickHereToSave=Unsaved changes. Click here to save.\nuntitled=Untitled\nuntitledDiagram=Untitled Diagram\nuntitledLayer=Untitled Layer\nuntitledLibrary=Untitled Library\nunknownError=Unknown error\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuseOffline=Use Offline\nuseRootFolder=Use root folder?\nuserManual=User Manual\nvertical=Vertical\nverticalFlow=Vertical Flow\nverticalTree=Vertical Tree\nview=View\nviewerSettings=Viewer Settings\nviewUrl=Link to view: {1}\nvoiceAssistant=Voice Assistant (beta)\nwarning=Warning\nwaypoints=Waypoints\nwest=West\nwidth=Width\nwiki=Wiki\nwordWrap=Word Wrap\nwritingDirection=Writing Direction\nyes=Yes\nyourEmailAddress=Your email address\nzoom=Zoom\nzoomIn=Zoom In\nzoomOut=Zoom Out\nbasic=Basic\nbusinessprocess=Business Processes\ncharts=Charts\nengineering=Engineering\nflowcharts=Flowcharts\ngmdl=Material Design\nmindmaps=Mindmaps\nmockups=Mockups\nnetworkdiagrams=Network Diagrams\nnothingIsSelected=Nothing is selected\nother=Other\nsoftwaredesign=Software Design\nvenndiagrams=Venn Diagrams\nwebEmailOrOther=Web, email or any other internet address\nwebLink=Web Link\nwireframes=Wireframes\nproperty=Property\nvalue=Value\nshowMore=Show More\nshowLess=Show Less\nmyDiagrams=My Diagrams\nallDiagrams=All Diagrams\nrecentlyUsed=Recently used\nlistView=List view\ngridView=Grid view\nresultsFor=Results for \'{1}\'\noneDriveCharsNotAllowed=The following characters are not allowed: ~ " # % * : < > ? / { | }\noneDriveInvalidDeviceName=The specified device name is invalid\nofficeNotLoggedOD=You are not logged in to OneDrive. Please open draw.io task pane and login first.\nofficeSelectSingleDiag=Please select a single draw.io diagram only without other contents.\nofficeSelectDiag=Please select a draw.io diagram.\nofficeCannotFindDiagram=Cannot find a draw.io diagram in the selection\nnoDiagrams=No diagrams found\nauthFailed=Authentication failed\nofficeFailedAuthMsg=Unable to successfully authenticate user or authorize application.\nconvertingDiagramFailed=Converting diagram failed\nofficeCopyImgErrMsg=Due to some limitations in the host application, the image could not be inserted. Please manually copy the image then paste it to the document.\ninsertingImageFailed=Inserting image failed\nofficeCopyImgInst=Instructions: Right-click the image below. Select "Copy image" from the context menu. Then, in the document, right-click and select "Paste" from the context menu.\nfolderEmpty=Folder is empty\nrecent=Recent\nsharedWithMe=Shared With Me\nsharepointSites=Sharepoint Sites\nerrorFetchingFolder=Error fetching folder items\nerrorAuthOD=Error authenticating to OneDrive\nofficeMainHeader=Adds draw.io diagrams to your document.\nofficeStepsHeader=This add-in performs the following steps:\nofficeStep1=Connects to Microsoft OneDrive, Google Drive or your device.\nofficeStep2=Select a draw.io diagram.\nofficeStep3=Insert the diagram into the document.\nofficeAuthPopupInfo=Please complete the authentication in the pop-up window.\nofficeSelDiag=Select draw.io Diagram:\nfiles=Files\nshared=Shared\nsharepoint=Sharepoint\nofficeManualUpdateInst=Instructions: Copy draw.io diagram from the document. Then, in the box below, right-click and select "Paste" from the context menu.\nofficeClickToEdit=Click icon to start editing:\npasteDiagram=Paste draw.io diagram here\nconnectOD=Connect to OneDrive\nselectChildren=Select Children\nselectSiblings=Select Siblings\nselectParent=Select Parent\nselectDescendants=Select Descendants\nlastSaved=Last saved {1} ago\nresolve=Resolve\nreopen=Re-open\nshowResolved=Show Resolved\nreply=Reply\nobjectNotFound=Object not found\nreOpened=Re-opened\nmarkedAsResolved=Marked as resolved\nnoCommentsFound=No comments found\ncomments=Comments\ntimeAgo={1} ago\nconfluenceCloud=Confluence Cloud\nlibraries=Libraries\nconfAnchor=Confluence Page Anchor\nconfTimeout=The connection has timed out\nconfSrvTakeTooLong=The server at {1} is taking too long to respond.\nconfCannotInsertNew=Cannot insert draw.io diagram to a new Confluence page\nconfSaveTry=Please save the page and try again.\nconfCannotGetID=Unable to determine page ID\nconfContactAdmin=Please contact your Confluence administrator.\nreadErr=Read Error\neditingErr=Editing Error\nconfExtEditNotPossible=This diagram cannot be edited externally. Please try editing it while editing the page\nconfEditedExt=Diagram/Page edited externally\ndiagNotFound=Diagram Not Found\nconfEditedExtRefresh=Diagram/Page is edited externally. Please refresh the page.\nconfCannotEditDraftDelOrExt=Cannot edit diagrams in a draft page, diagram is deleted from the page, or diagram is edited externally. Please, check the page.\nretBack=Return back\nconfDiagNotPublished=The diagram does not belong to a published page\ncreatedByDraw=Created by draw.io\nfilenameShort=Filename too short\ninvalidChars=Invalid characters\nalreadyExst={1} already exists\ndraftReadErr=Draft Read Error\ndiagCantLoad=Diagram cannot be loaded\ndraftWriteErr=Draft Write Error\ndraftCantCreate=Draft could not be created\nconfDuplName=Duplicate diagram name detected. Please pick another name.\nconfSessionExpired=Looks like your session expired. Log in again to keep working.\nlogin=Login\ndrawPrev=draw.io preview\ndrwaDiag=draw.io diagram\nunknownErr=Unkown Error\ninvalidCallFnNotFound=Invalid Call: {1} not found\ninvalidCallErrOccured=Invalid Call: An error occured, {1}\nanonymous=Anonymous\nconfGotoPage=Go to containing page\nshowComments=Show Comments\nconfError=Error: {1}\ngliffyImport=Gliffy Import\ngliffyImportInst1=Click the "Start Import" button to import all Gliffy diagrams to draw.io.\ngliffyImportInst2=Please note that the import procedure will take some time and the browser window must remain open until the import is completed.\nstartImport=Start Import\ndrawConfig=draw.io Configuration\ncustomLib=Custom Libraries\ncustomTemp=Custom Templates\npageIdsExp=Page IDs Export\ndrawReindex=draw.io re-indexing (beta)\nworking=Working\ndrawConfigNotFoundInst=draw.io Configuration Space (DRAWIOCONFIG) does not exist. This space is needed to store draw.io configuration files and custom libraries/templates.\ncreateConfSp=Create Config Space\nunexpErrRefresh=Unexpected error, please refresh the page and try again.\nconfigJSONInst=Write draw.io JSON configuration in the editor below then click save. If you need help, please refer to\nthisPage=this page\ncurCustLib=Current Custom Libraries\nlibName=Library Name\naction=Action\ndrawConfID=draw.io Config ID\naddLibInst=Click the "Add Library" button to upload a new library.\naddLib=Add Library\ncustomTempInst1=Custom templates are draw.io diagrams saved in children pages of\ncustomTempInst2=For more details, please refer to\ntempsPage=Templates page\npageIdsExpInst1=Click the "Start Export" button to export all pages IDs.\npageIdsExpInst2=Please note that the export procedure will take some time and the browser window must remain open until the export is completed.\nstartExp=Start Export\nrefreshDrawIndex=Refresh draw.io Diagrams Index\nreindexInst1=Click the "Start Indexing" button to refresh draw.io diagrams index.\nreindexInst2=Please note that the indexing procedure will take some time and the browser window must remain open until the indexing is completed.\nstartIndexing=Start Indexing\nconfAPageFoundFetch=Page "{1}" found. Fetching\nconfAAllDiagDone=All {1} diagrams processed. Process finished.\nconfAStartedProcessing=Started processing page "{1}"\nconfAAllDiagInPageDone=All {1} diagrams in page "{2}" processed successfully.\nconfAPartialDiagDone={1} out of {2} {3} diagrams in page "{4}" processed successfully.\nconfAUpdatePageFailed=Updating page "{1}" failed.\nconfANoDiagFoundInPage=No {1} diagrams found in page "{2}".\nconfAFetchPageFailed=Fetching the page failed.\nconfANoDiagFound=No {1} diagrams found. Process finished.\nconfASearchFailed=Searching for {1} diagrams failed. Please try again later.\nconfAGliffyDiagFound=Gliffy diagram "{1}" found. Importing\nconfAGliffyDiagImported=Gliffy diagram "{1}" imported successfully.\nconfASavingImpGliffyFailed=Saving imported Gliffy diagram "{1}" failed.\nconfAImportedFromByDraw=Imported from "{1}" by draw.io\nconfAImportGliffyFailed=Importing Gliffy diagram "{1}" failed.\nconfAFetchGliffyFailed=Fetching Gliffy diagram "{1}" failed.\nconfACheckBrokenDiagLnk=Checking for broken diagrams links.\nconfADelDiagLinkOf=Deleting diagram link of "{1}"\nconfADupLnk=(duplicate link)\nconfADelDiagLnkFailed=Deleting diagram link of "{1}" failed.\nconfAUnexpErrProcessPage=Unexpected error during processing the page with id: {1}\nconfADiagFoundIndex=Diagram "{1}" found. Indexing\nconfADiagIndexSucc=Diagram "{1}" indexed successfully.\nconfAIndexDiagFailed=Indexing diagram "{1}" failed.\nconfASkipDiagOtherPage=Skipped "{1}" as it belongs to another page!\nconfADiagUptoDate=Diagram "{1}" is up to date.\nconfACheckPagesWDraw=Checking pages having draw.io diagrams.\nconfAErrOccured=An error occured!\nsavedSucc=Saved successfully\nconfASaveFailedErr=Saving Failed (Unexpected Error)\ncharacter=Character\nconfAConfPageDesc=This page contains draw.io configuration file (configuration.json) as attachment\nconfALibPageDesc=This page contains draw.io custom libraries as attachments\nconfATempPageDesc=This page contains draw.io custom templates as attachments\nworking=Working\nconfAConfSpaceDesc=This space is used to store draw.io configuration files and custom libraries/templates\nconfANoCustLib=No Custom Libraries\ndelFailed=Delete failed!\nshowID=Show ID\nconfAIncorrectLibFileType=Incorrect file type. Libraries should be XML files.\nuploading=Uploading\nconfALibExist=This library already exists\nconfAUploadSucc=Uploaded successfully\nconfAUploadFailErr=Upload Failed (Unexpected Error)\nhiResPreview=High Res Preview\nofficeNotLoggedGD=You are not logged in to Google Drive. Please open draw.io task pane and login first.\nofficePopupInfo=Please complete the process in the pop-up window.\npickODFile=Pick OneDrive File\npickGDriveFile=Pick Google Drive File\npickDeviceFile=Pick Device File\n');Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#ffffff"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#ffffff"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="white"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#ffffff"/></add></mxStylesheet>').documentElement; Graph.prototype.defaultThemes.darkTheme=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#2a2a2a"/><add as="strokeColor" value="#f0f0f0"/><add as="fontColor" value="#f0f0f0"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#f0f0f0"/><add as="fontColor" value="#f0f0f0"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#2a2a2a"/></add></mxStylesheet>').documentElement;GraphViewer=function(a,b,e){this.init(a,b,e)};mxUtils.extend(GraphViewer,mxEventSource);GraphViewer.prototype.editBlankUrl="https://www.draw.io/";GraphViewer.prototype.imageBaseUrl="https://www.draw.io/";GraphViewer.prototype.toolbarHeight="BackCompat"==document.compatMode?28:30;GraphViewer.prototype.lightboxChrome=!0;GraphViewer.prototype.lightboxZIndex=999;GraphViewer.prototype.toolbarZIndex=999;GraphViewer.prototype.autoFit=!0;GraphViewer.prototype.allowZoomIn=!1; GraphViewer.prototype.showTitleAsTooltip=!1;GraphViewer.prototype.checkVisibleState=!0;GraphViewer.prototype.minHeight=28;GraphViewer.prototype.minWidth=100; GraphViewer.prototype.init=function(a,b,e){this.graphConfig=null!=e?e:{};this.autoFit=null!=this.graphConfig["auto-fit"]?this.graphConfig["auto-fit"]:this.autoFit;this.allowZoomIn=null!=this.graphConfig["allow-zoom-in"]?this.graphConfig["allow-zoom-in"]:this.allowZoomIn;this.checkVisibleState=null!=this.graphConfig["check-visible-state"]?this.graphConfig["check-visible-state"]:this.checkVisibleState;this.toolbarItems=null!=this.graphConfig.toolbar?this.graphConfig.toolbar.split(" "):[];this.zoomEnabled= @@ -3475,16 +3475,16 @@ function(){g.style.backgroundColor="#eee"}),mxUtils.setOpacity(a,60),g.style.cur e.style.whiteSpace="nowrap";e.style.textAlign="left";e.style.zIndex=this.toolbarZIndex;e.style.backgroundColor="#eee";e.style.height=this.toolbarHeight+"px";this.toolbar=e;if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(e.style,"transition","opacity 100ms ease-in-out");mxUtils.setOpacity(e,30);var d=null,l=null,m=mxUtils.bind(this,function(a){null!=d&&(window.clearTimeout(d),fadeThead=null);null!=l&&(window.clearTimeout(l),fadeThead2=null);d=window.setTimeout(mxUtils.bind(this, function(){mxUtils.setOpacity(e,0);d=null;l=window.setTimeout(mxUtils.bind(this,function(){e.style.display="none";l=null}),100)}),a||200)}),r=mxUtils.bind(this,function(a){null!=d&&(window.clearTimeout(d),fadeThead=null);null!=l&&(window.clearTimeout(l),fadeThead2=null);e.style.display="";mxUtils.setOpacity(e,a||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(r(30),m())}));mxEvent.addListener(e,mxClient.IS_POINTER? "pointermove":"mousemove",function(a){mxEvent.consume(a)});mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(a){r(100)}));mxEvent.addListener(e,"mousemove",mxUtils.bind(this,function(a){r(100);mxEvent.consume(a)}));mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||r(30)}));var t=this.graph,x=t.getTolerance();t.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(a,b){this.startX=b.getGraphX();this.startY=b.getGraphY(); -this.scrollLeft=t.container.scrollLeft;this.scrollTop=t.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(a,b){mxEvent.isTouchEvent(b.getEvent())&&Math.abs(this.scrollLeft-t.container.scrollLeft)<x&&Math.abs(this.scrollTop-t.container.scrollTop)<x&&Math.abs(this.startX-b.getGraphX())<x&&Math.abs(this.startY-b.getGraphY())<x&&(0<parseFloat(e.style.opacity||0)?m():r(30))}})}for(var z=this.toolbarItems,c=0,f=null,k=null,p=0;p<z.length;p++){var n=z[p];if("pages"==n){k=b.ownerDocument.createElement("div"); -k.style.cssText="display:inline-block;position:relative;padding:3px 4px 0 4px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;";mxUtils.setOpacity(k,70);var g=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");g.style.borderRightStyle="none";g.style.paddingLeft="0px";g.style.paddingRight="0px";e.appendChild(k);var A=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage+ -1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");A.style.paddingLeft="0px";A.style.paddingRight="0px";n=mxUtils.bind(this,function(){k.innerHTML="";mxUtils.write(k,this.currentPage+1+" / "+this.diagrams.length);k.style.display=1<this.diagrams.length?"inline-block":"none";g.style.display=k.style.display;A.style.display=k.style.display});this.addListener("graphChanged",n);n()}else if("zoom"==n)this.zoomEnabled&&(a(mxUtils.bind(this,function(){this.graph.zoomOut()}),Editor.zoomOutImage, -mxResources.get("zoomOut")||"Zoom Out"),a(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),a(mxUtils.bind(this,function(){this.graph.view.scaleAndTranslate(this.graph.initialViewState.scale,this.graph.initialViewState.translate.x,this.graph.initialViewState.translate.y)}),Editor.zoomFitImage,mxResources.get("fit")||"Fit"));else if("layers"==n){if(this.layersEnabled){var y=this.graph.getModel(),u=a(mxUtils.bind(this,function(a){if(null!=f)f.parentNode.removeChild(f), +this.scrollLeft=t.container.scrollLeft;this.scrollTop=t.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(a,b){mxEvent.isTouchEvent(b.getEvent())&&Math.abs(this.scrollLeft-t.container.scrollLeft)<x&&Math.abs(this.scrollTop-t.container.scrollTop)<x&&Math.abs(this.startX-b.getGraphX())<x&&Math.abs(this.startY-b.getGraphY())<x&&(0<parseFloat(e.style.opacity||0)?m():r(30))}})}for(var A=this.toolbarItems,c=0,f=null,k=null,p=0;p<A.length;p++){var n=A[p];if("pages"==n){k=b.ownerDocument.createElement("div"); +k.style.cssText="display:inline-block;position:relative;padding:3px 4px 0 4px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;";mxUtils.setOpacity(k,70);var g=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");g.style.borderRightStyle="none";g.style.paddingLeft="0px";g.style.paddingRight="0px";e.appendChild(k);var y=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage+ +1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");y.style.paddingLeft="0px";y.style.paddingRight="0px";n=mxUtils.bind(this,function(){k.innerHTML="";mxUtils.write(k,this.currentPage+1+" / "+this.diagrams.length);k.style.display=1<this.diagrams.length?"inline-block":"none";g.style.display=k.style.display;y.style.display=k.style.display});this.addListener("graphChanged",n);n()}else if("zoom"==n)this.zoomEnabled&&(a(mxUtils.bind(this,function(){this.graph.zoomOut()}),Editor.zoomOutImage, +mxResources.get("zoomOut")||"Zoom Out"),a(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),a(mxUtils.bind(this,function(){this.graph.view.scaleAndTranslate(this.graph.initialViewState.scale,this.graph.initialViewState.translate.x,this.graph.initialViewState.translate.y)}),Editor.zoomFitImage,mxResources.get("fit")||"Fit"));else if("layers"==n){if(this.layersEnabled){var z=this.graph.getModel(),u=a(mxUtils.bind(this,function(a){if(null!=f)f.parentNode.removeChild(f), f=null;else{f=this.graph.createLayersDialog();mxEvent.addListener(f,"mouseleave",function(){f.parentNode.removeChild(f);f=null});a=u.getBoundingClientRect();f.style.width="140px";f.style.padding="2px 0px 2px 0px";f.style.border="1px solid #d0d0d0";f.style.backgroundColor="#eee";f.style.fontFamily="Helvetica Neue,Helvetica,Arial Unicode MS,Arial";f.style.fontSize="11px";f.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(f,80);var b=mxUtils.getDocumentScrollOrigin(document);f.style.left=b.x+a.left+ -"px";f.style.top=b.y+a.bottom+"px";document.body.appendChild(f)}}),Editor.layersImage,mxResources.get("layers")||"Layers");y.addListener(mxEvent.CHANGE,function(){u.style.display=1<y.getChildCount(y.root)?"inline-block":"none"});u.style.display=1<y.getChildCount(y.root)?"inline-block":"none"}}else"lightbox"==n?this.lightboxEnabled&&a(mxUtils.bind(this,function(){this.showLightbox()}),Editor.maximizeImage,mxResources.get("show")||"Show"):null!=this.graphConfig["toolbar-buttons"]&&(n=this.graphConfig["toolbar-buttons"][n], -null!=n&&a(null==n.enabled||n.enabled?n.handler:function(){},n.image,n.title,n.enabled))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*c);null!=this.graphConfig.title&&(z=b.ownerDocument.createElement("div"),z.style.cssText="display:inline-block;position:relative;padding:3px 6px 0 6px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;",z.setAttribute("title",this.graphConfig.title),mxUtils.write(z,this.graphConfig.title),mxUtils.setOpacity(z, -70),e.appendChild(z));this.minToolbarWidth=34*c;var F=b.style.border,z=mxUtils.bind(this,function(){e.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,b.offsetWidth)+"px";e.style.border="1px solid #d0d0d0";if(1!=this.graphConfig["toolbar-nohide"]){var a=b.getBoundingClientRect(),c=mxUtils.getScrollOrigin(document.body),c="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-c.x,top:-c.y},a={left:a.left-c.left,top:a.top- +"px";f.style.top=b.y+a.bottom+"px";document.body.appendChild(f)}}),Editor.layersImage,mxResources.get("layers")||"Layers");z.addListener(mxEvent.CHANGE,function(){u.style.display=1<z.getChildCount(z.root)?"inline-block":"none"});u.style.display=1<z.getChildCount(z.root)?"inline-block":"none"}}else"lightbox"==n?this.lightboxEnabled&&a(mxUtils.bind(this,function(){this.showLightbox()}),Editor.maximizeImage,mxResources.get("show")||"Show"):null!=this.graphConfig["toolbar-buttons"]&&(n=this.graphConfig["toolbar-buttons"][n], +null!=n&&a(null==n.enabled||n.enabled?n.handler:function(){},n.image,n.title,n.enabled))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*c);null!=this.graphConfig.title&&(A=b.ownerDocument.createElement("div"),A.style.cssText="display:inline-block;position:relative;padding:3px 6px 0 6px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;",A.setAttribute("title",this.graphConfig.title),mxUtils.write(A,this.graphConfig.title),mxUtils.setOpacity(A, +70),e.appendChild(A));this.minToolbarWidth=34*c;var F=b.style.border,A=mxUtils.bind(this,function(){e.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,b.offsetWidth)+"px";e.style.border="1px solid #d0d0d0";if(1!=this.graphConfig["toolbar-nohide"]){var a=b.getBoundingClientRect(),c=mxUtils.getScrollOrigin(document.body),c="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-c.x,top:-c.y},a={left:a.left-c.left,top:a.top- c.top,bottom:a.bottom-c.top,right:a.right-c.left};e.style.left=a.left+"px";"bottom"==this.graphConfig["toolbar-position"]?e.style.top=a.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(e.style.marginTop=-this.toolbarHeight+"px",e.style.top=a.top+1+"px"):e.style.top=a.top+"px";"1px solid transparent"==F&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(e);var d=mxUtils.bind(this,function(){null!=e.parentNode&&e.parentNode.removeChild(e);null!=f&&(f.parentNode.removeChild(f), -f=null);b.style.border=F});mxEvent.addListener(document,"mousemove",function(a){for(a=mxEvent.getSource(a);null!=a;){if(a==b||a==e||a==f)return;a=a.parentNode}d()});mxEvent.addListener(document,"mouseleave",function(a){d()})}else e.style.top=-this.toolbarHeight+"px",b.appendChild(e)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(b,"mouseenter",z):z()}; +f=null);b.style.border=F});mxEvent.addListener(document,"mousemove",function(a){for(a=mxEvent.getSource(a);null!=a;){if(a==b||a==e||a==f)return;a=a.parentNode}d()});mxEvent.addListener(document,"mouseleave",function(a){d()})}else e.style.top=-this.toolbarHeight+"px",b.appendChild(e)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(b,"mouseenter",A):A()}; GraphViewer.prototype.addClickHandler=function(a,b){a.linkPolicy=this.graphConfig.target||a.linkPolicy;a.addClickHandler(this.graphConfig.highlight,mxUtils.bind(this,function(e,d){if(null==d){var l=mxEvent.getSource(e);"a"==l.nodeName.toLowerCase()&&(d=l.getAttribute("href"))}null!=b?null==d||a.isExternalProtocol(d)||a.isBlankLink(d)||window.setTimeout(function(){b.destroy()},0):null!=d&&null==b&&a.isCustomLink(d)&&(mxEvent.isTouchEvent(e)||!mxEvent.isPopupTrigger(e))&&a.customLinkClicked(d)&&mxEvent.consume(e)}), mxUtils.bind(this,function(a){null!=b||!this.lightboxClickEnabled||mxEvent.isTouchEvent(a)&&0!=this.toolbarItems.length||this.showLightbox()}))}; GraphViewer.prototype.showLightbox=function(a,b,e){if("open"==this.graphConfig.lightbox||window.self!==window.top)if(null==this.lightboxWindow||this.lightboxWindow.closed){a=null!=a?a:null!=this.graphConfig.editable?this.graphConfig.editable:!0;e={client:1,lightbox:1,target:null!=e?e:"blank"};a&&(e.edit=this.graphConfig.edit||"_blank");if(null!=b?b:1)e.close=1;this.layersEnabled&&(e.layers=1);null!=this.graphConfig&&0!=this.graphConfig.nav&&(e.nav=1);null!=this.graphConfig&&null!=this.graphConfig.highlight&& @@ -3494,7 +3494,7 @@ GraphViewer.prototype.showLocalLightbox=function(){var a=mxUtils.getDocumentScro var e=document.createElement("img");e.setAttribute("border","0");e.setAttribute("src",Editor.closeImage);mxClient.IS_QUIRKS?(e.style.position="absolute",e.style.right="32px",e.style.top=a.y+32+"px"):e.style.cssText="position:fixed;top:32px;right:32px;";e.style.cursor="pointer";mxEvent.addListener(e,"click",function(){d.destroy()});urlParams.pages="1";urlParams.page=this.currentPage;urlParams.nav=0!=this.graphConfig.nav?"1":"0";urlParams.layers=this.layersEnabled?"1":"0";if(null==document.documentMode|| 10<=document.documentMode)Editor.prototype.editButtonLink=this.graphConfig.edit,Editor.prototype.editButtonFunc=this.graphConfig.editFunc;EditorUi.prototype.updateActionStates=function(){};EditorUi.prototype.addBeforeUnloadListener=function(){};EditorUi.prototype.addChromelessClickHandler=function(){};Graph.prototype.shadowId="lightboxDropShadow";var d=new EditorUi(new Editor(!0),document.createElement("div"),!0);d.editor.editBlankUrl=this.editBlankUrl;Graph.prototype.shadowId="dropShadow";d.refresh= function(){};var l=mxUtils.bind(this,function(a){27==a.keyCode&&d.destroy()}),m=d.destroy;d.destroy=function(){mxEvent.removeListener(document.documentElement,"keydown",l);document.body.removeChild(b);document.body.removeChild(e);document.body.style.overflow="auto";GraphViewer.resizeSensorEnabled=!0;m.apply(this,arguments)};var r=d.editor.graph,t=r.container;t.style.overflow="hidden";this.lightboxChrome?(t.style.border="1px solid #c0c0c0",t.style.margin="40px",mxEvent.addListener(document.documentElement, -"keydown",l)):(b.style.display="none",e.style.display="none");var x=this;r.getImageFromBundles=function(a){return x.getImageUrl(a)};var z=d.createTemporaryGraph;d.createTemporaryGraph=function(){var a=z.apply(this,arguments);a.getImageFromBundles=function(a){return x.getImageUrl(a)};return a};this.graphConfig.move&&(r.isMoveCellsEvent=function(a){return!0});mxClient.IS_QUIRKS||(mxUtils.setPrefixedStyle(t.style,"border-radius","4px"),t.style.position="fixed");GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow= +"keydown",l)):(b.style.display="none",e.style.display="none");var x=this;r.getImageFromBundles=function(a){return x.getImageUrl(a)};var A=d.createTemporaryGraph;d.createTemporaryGraph=function(){var a=A.apply(this,arguments);a.getImageFromBundles=function(a){return x.getImageUrl(a)};return a};this.graphConfig.move&&(r.isMoveCellsEvent=function(a){return!0});mxClient.IS_QUIRKS||(mxUtils.setPrefixedStyle(t.style,"border-radius","4px"),t.style.position="fixed");GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow= "hidden";mxClient.IS_SF||mxClient.IS_EDGE||(mxUtils.setPrefixedStyle(t.style,"transform","rotateY(90deg)"),mxUtils.setPrefixedStyle(t.style,"transition","all .25s ease-in-out"));this.addClickHandler(r,d);window.setTimeout(mxUtils.bind(this,function(){t.style.outline="none";t.style.zIndex=this.lightboxZIndex;e.style.zIndex=this.lightboxZIndex;document.body.appendChild(t);document.body.appendChild(e);d.setFileData(this.xml);mxUtils.setPrefixedStyle(t.style,"transform","rotateY(0deg)");d.chromelessToolbar.style.bottom= "60px";d.chromelessToolbar.style.zIndex=this.lightboxZIndex;document.body.appendChild(d.chromelessToolbar);d.getEditBlankXml=mxUtils.bind(this,function(){return this.xml});mxClient.IS_QUIRKS&&(t.style.position="absolute",t.style.display="block",t.style.left=a.x+"px",t.style.top=a.y+"px",t.style.width=document.body.clientWidth-80+"px",t.style.height=document.body.clientHeight-80+"px",t.style.backgroundColor="white",d.chromelessToolbar.style.display="block",d.chromelessToolbar.style.position="absolute", d.chromelessToolbar.style.bottom="",d.chromelessToolbar.style.top=a.y+document.body.clientHeight-100+"px");d.lightboxFit();d.chromelessResize();this.showLayers(r,this.graph);mxEvent.addListener(b,"click",function(){d.destroy()})}),0);return d};GraphViewer.processElements=function(a){mxUtils.forEach(GraphViewer.getElementsByClassName(a||"mxgraph"),function(a){try{a.innerHTML="",GraphViewer.createViewerForElement(a)}catch(e){throw a.innerHTML=e.message,e;}})}; @@ -3504,7 +3504,7 @@ GraphViewer.initCss=function(){try{var a=document.createElement("style");a.type= GraphViewer.cachedUrls={};GraphViewer.getUrl=function(a,b,e){if(null!=GraphViewer.cachedUrls[a])b(GraphViewer.cachedUrls[a]);else{var d=0<navigator.userAgent.indexOf("MSIE 9")?new XDomainRequest:new XMLHttpRequest;d.open("GET",a);d.onload=function(){b(null!=d.getText?d.getText():d.responseText)};d.onerror=e;d.send()}};GraphViewer.resizeSensorEnabled=!0;GraphViewer.useResizeSensor=!0; (function(){var a=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(a){return window.setTimeout(a,20)},b=function(e,d){function l(){this.q=[];this.add=function(a){this.q.push(a)};var a,b;this.call=function(){a=0;for(b=this.q.length;a<b;a++)this.q[a].call()}}function m(a,b){return a.currentStyle?a.currentStyle[b]:window.getComputedStyle?window.getComputedStyle(a,null).getPropertyValue(b):a.style[b]}function r(b,c){if(!b.resizedAttached)b.resizedAttached= new l,b.resizedAttached.add(c);else if(b.resizedAttached){b.resizedAttached.add(c);return}b.resizeSensor=document.createElement("div");b.resizeSensor.className="resize-sensor";b.resizeSensor.style.cssText="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;";b.resizeSensor.innerHTML='<div class="resize-sensor-expand" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s;"></div></div><div class="resize-sensor-shrink" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s; width: 200%; height: 200%"></div></div>'; -b.appendChild(b.resizeSensor);"static"==m(b,"position")&&(b.style.position="relative");var d=b.resizeSensor.childNodes[0],e=d.childNodes[0],f=b.resizeSensor.childNodes[1],k=function(){e.style.width="100000px";e.style.height="100000px";d.scrollLeft=1E5;d.scrollTop=1E5;f.scrollLeft=1E5;f.scrollTop=1E5};k();var r=!1,u=function(){b.resizedAttached&&(r&&(b.resizedAttached.call(),r=!1),a(u))};a(u);var t,v,x,q,z=function(){if((x=b.offsetWidth)!=t||(q=b.offsetHeight)!=v)r=!0,t=x,v=q;k()},J=function(a,b,c){a.attachEvent? -a.attachEvent("on"+b,c):a.addEventListener(b,c)};J(d,"scroll",z);J(f,"scroll",z)}var t=function(){GraphViewer.resizeSensorEnabled&&d()},x=Object.prototype.toString.call(e),z="[object Array]"===x||"[object NodeList]"===x||"[object HTMLCollection]"===x||"undefined"!==typeof jQuery&&e instanceof jQuery||"undefined"!==typeof Elements&&e instanceof Elements;if(z)for(var x=0,c=e.length;x<c;x++)r(e[x],t);else r(e,t);this.detach=function(){if(z)for(var a=0,c=e.length;a<c;a++)b.detach(e[a]);else b.detach(e)}}; +b.appendChild(b.resizeSensor);"static"==m(b,"position")&&(b.style.position="relative");var d=b.resizeSensor.childNodes[0],e=d.childNodes[0],f=b.resizeSensor.childNodes[1],k=function(){e.style.width="100000px";e.style.height="100000px";d.scrollLeft=1E5;d.scrollTop=1E5;f.scrollLeft=1E5;f.scrollTop=1E5};k();var r=!1,t=function(){b.resizedAttached&&(r&&(b.resizedAttached.call(),r=!1),a(t))};a(t);var x,v,A,q,C=function(){if((A=b.offsetWidth)!=x||(q=b.offsetHeight)!=v)r=!0,x=A,v=q;k()},J=function(a,b,c){a.attachEvent? +a.attachEvent("on"+b,c):a.addEventListener(b,c)};J(d,"scroll",C);J(f,"scroll",C)}var t=function(){GraphViewer.resizeSensorEnabled&&d()},x=Object.prototype.toString.call(e),A="[object Array]"===x||"[object NodeList]"===x||"[object HTMLCollection]"===x||"undefined"!==typeof jQuery&&e instanceof jQuery||"undefined"!==typeof Elements&&e instanceof Elements;if(A)for(var x=0,c=e.length;x<c;x++)r(e[x],t);else r(e,t);this.detach=function(){if(A)for(var a=0,c=e.length;a<c;a++)b.detach(e[a]);else b.detach(e)}}; b.detach=function(a){a.resizeSensor&&(a.removeChild(a.resizeSensor),delete a.resizeSensor,delete a.resizedAttached)};window.ResizeSensor=b})(); (function(){Editor.initMath();GraphViewer.initCss();if(null!=window.onDrawioViewerLoad)window.onDrawioViewerLoad();else GraphViewer.processElements()})(); diff --git a/src/main/webapp/resources/dia.txt b/src/main/webapp/resources/dia.txt index 5200ac6fea31d0723bcfccd8260bd1b36b4da431..2737be709ba59bfbb48b889eedecf8194c778165 100644 --- a/src/main/webapp/resources/dia.txt +++ b/src/main/webapp/resources/dia.txt @@ -618,6 +618,7 @@ saveAndExit=Save & Exit saveAs=Save as saveAsXmlFile=Save as XML file? saved=Saved +saveDiagramFirst=Please save the diagram first saveDiagramsTo=Save diagrams to saveLibrary403=Insufficient permissions to edit this library saveLibrary500=There was an error while saving the library diff --git a/src/main/webapp/resources/dia_am.txt b/src/main/webapp/resources/dia_am.txt index c77848d6daa3caaa06bfc604eab6f223b2a28ca3..93012bb87862d3c30f984ec750bd69dd6330929f 100644 --- a/src/main/webapp/resources/dia_am.txt +++ b/src/main/webapp/resources/dia_am.txt @@ -618,6 +618,7 @@ saveAndExit=Save & Exit saveAs=Save as saveAsXmlFile=Save as XML file? saved=Saved +saveDiagramFirst=Please save the diagram first saveDiagramsTo=Save diagrams to saveLibrary403=Insufficient permissions to edit this library saveLibrary500=There was an error while saving the library diff --git a/src/main/webapp/resources/dia_ar.txt b/src/main/webapp/resources/dia_ar.txt index b2a71564961072a99325328950ccee1d155f440a..e453508dae8fb8e028659c6b951928994bb445dd 100644 --- a/src/main/webapp/resources/dia_ar.txt +++ b/src/main/webapp/resources/dia_ar.txt @@ -618,6 +618,7 @@ saveAndExit=‫ØÙظ Ùˆ مغادرة‬ saveAs=‫ØÙظ كـ‬ saveAsXmlFile=Save as XML file? saved=‫تم الØÙظ‬ +saveDiagramFirst=Please save the diagram first saveDiagramsTo=‫ØÙظ المخططات إلى ‬ saveLibrary403=Insufficient permissions to edit this library saveLibrary500=There was an error while saving the library diff --git a/src/main/webapp/resources/dia_bg.txt b/src/main/webapp/resources/dia_bg.txt index 65fd5037f7a225ed882ab11c2cfa47027cc4588f..b7e172a6226363e130c305e1fe4f99371233d165 100644 --- a/src/main/webapp/resources/dia_bg.txt +++ b/src/main/webapp/resources/dia_bg.txt @@ -618,6 +618,7 @@ saveAndExit=Запазване и изход saveAs=Запазване като saveAsXmlFile=Запазване като XML файл? saved=Запазено +saveDiagramFirst=Please save the diagram first saveDiagramsTo=Запазване на диаграми в saveLibrary403=ÐедоÑтатъчни Ñ€Ð°Ð·Ñ€ÐµÑˆÐµÐ½Ð¸Ñ Ð·Ð° редактиране на тази библиотека saveLibrary500=Възникна грешка при запазване на библиотеката diff --git a/src/main/webapp/resources/dia_bn.txt b/src/main/webapp/resources/dia_bn.txt index 7250891a1d645e58edf53354c75ba631947f4ff7..9b729fc4a9e0df35478babce12336891b7ad6cc5 100644 --- a/src/main/webapp/resources/dia_bn.txt +++ b/src/main/webapp/resources/dia_bn.txt @@ -618,6 +618,7 @@ saveAndExit=Save & Exit saveAs=Save as saveAsXmlFile=Save as XML file? saved=Saved +saveDiagramFirst=Please save the diagram first saveDiagramsTo=Save diagrams to saveLibrary403=Insufficient permissions to edit this library saveLibrary500=There was an error while saving the library diff --git a/src/main/webapp/resources/dia_bs.txt b/src/main/webapp/resources/dia_bs.txt index 6b25d7d245bbfe064de5edea5f93c25323fe7712..f763f03427098e083b35d3a488e4523fceab6444 100644 --- a/src/main/webapp/resources/dia_bs.txt +++ b/src/main/webapp/resources/dia_bs.txt @@ -618,6 +618,7 @@ saveAndExit=Spasi & IzaÄ‘i saveAs=Spasi kao saveAsXmlFile=Spasi kao XML fajl? saved=SpaÅ¡eno +saveDiagramFirst=Prvo saÄuvajte dijagram saveDiagramsTo=Spasi dijagrame u saveLibrary403=Nedovoljne ovlasti za ureÄ‘ivanje ove biblioteke saveLibrary500=Pojavila se greÅ¡ka prilikom spaÅ¡avanja biblioteke diff --git a/src/main/webapp/resources/dia_ca.txt b/src/main/webapp/resources/dia_ca.txt index 5a0111d860fad0e2a4afe6137828f926e25a7f32..051856f43b0534d2da8624aa632c9fd222a313fa 100644 --- a/src/main/webapp/resources/dia_ca.txt +++ b/src/main/webapp/resources/dia_ca.txt @@ -618,6 +618,7 @@ saveAndExit=Desa i surt saveAs=Desa com saveAsXmlFile=Desar com a fitxer XML? saved=Desat +saveDiagramFirst=Please save the diagram first saveDiagramsTo=Desa els diagramas a saveLibrary403=Permisos insuficients per editar aquesta biblioteca saveLibrary500=Hi ha hagut un error desant la biblioteca diff --git a/src/main/webapp/resources/dia_cs.txt b/src/main/webapp/resources/dia_cs.txt index db75cc653a9f76537db9c1af80751feb8dcb3bcd..cac0991bc4831a347c128d758d26bc55aa29930d 100644 --- a/src/main/webapp/resources/dia_cs.txt +++ b/src/main/webapp/resources/dia_cs.txt @@ -618,6 +618,7 @@ saveAndExit=Uložit & ukonÄit saveAs=Uložit jako saveAsXmlFile=Ulažit jako soubor XML? saved=Uloženo +saveDiagramFirst=Please save the diagram first saveDiagramsTo=Uložit diagramy do saveLibrary403=K úpravÄ› této knihovny nemáte dostateÄné oprávnÄ›nÃ. saveLibrary500=PÅ™i ukládánà knihovny doÅ¡lo k chybÄ›. diff --git a/src/main/webapp/resources/dia_da.txt b/src/main/webapp/resources/dia_da.txt index bc5028170cbff723534d4552b9cb26bf2f01b682..64ee03af29ccd183a8ca70c86485752e113ef5ad 100644 --- a/src/main/webapp/resources/dia_da.txt +++ b/src/main/webapp/resources/dia_da.txt @@ -618,6 +618,7 @@ saveAndExit=Gem & Afslut saveAs=Gem som saveAsXmlFile=Gem som XML fil? saved=Gemt +saveDiagramFirst=Please save the diagram first saveDiagramsTo=Gem diagrammer i saveLibrary403=Utilstrækkelige tilladelse til at ændre pÃ¥ dette bibliotek saveLibrary500=Der forekom en fejl under gemning af dette bibliotek diff --git a/src/main/webapp/resources/dia_de.txt b/src/main/webapp/resources/dia_de.txt index 7cde7ad7e5591297b053eb649e1807e74a6dd568..d3f2b10d8fee4cb7e98a5e28a94995e8b047530c 100644 --- a/src/main/webapp/resources/dia_de.txt +++ b/src/main/webapp/resources/dia_de.txt @@ -618,6 +618,7 @@ saveAndExit=Speichern & Beenden saveAs=Speichern unter saveAsXmlFile=Als XML-Datei speichern? saved=Gespeichert +saveDiagramFirst=Bitte speichern Sie zuerst das Diagramm saveDiagramsTo=Diagramme speichern in saveLibrary403=Keine Berechtigung zum Bearbeiten der Bibliothek saveLibrary500=Fehler beim Speichern der Bibliothek diff --git a/src/main/webapp/resources/dia_el.txt b/src/main/webapp/resources/dia_el.txt index 1300cdb56be5f290cd482b6324ccb77634a2f214..86679e8dbf8097e2c15f77b03c88fcc68d73c3fa 100644 --- a/src/main/webapp/resources/dia_el.txt +++ b/src/main/webapp/resources/dia_el.txt @@ -618,6 +618,7 @@ saveAndExit=Αποθήκευση & Έξοδος saveAs=Αποθήκευση ως saveAsXmlFile=Αποθήκευση ως αÏχείο XML; saved=ΑποθηκεÏτηκε +saveDiagramFirst=Please save the diagram first saveDiagramsTo=Αποθήκευση διαγÏαμμάτων σε saveLibrary403=ΑνεπαÏκή δικαιώματα για να επεξεÏγαστείτε αυτή την βιβλιοθήκη saveLibrary500=ΠαÏουσιάστηκε σφάλμα κατά την διαδικασία αποθήκευσης της βιβλιοθήκης diff --git a/src/main/webapp/resources/dia_eo.txt b/src/main/webapp/resources/dia_eo.txt index 8f0c1fd26d58503d6960c880d0f0f4f993087964..2533b0f0f509315cef6e35fd661b02e1f9871d44 100644 --- a/src/main/webapp/resources/dia_eo.txt +++ b/src/main/webapp/resources/dia_eo.txt @@ -618,6 +618,7 @@ saveAndExit=Save & Exit saveAs=Save as saveAsXmlFile=Save as XML file? saved=Konservita +saveDiagramFirst=Please save the diagram first saveDiagramsTo=Save diagrams to saveLibrary403=Insufficient permissions to edit this library saveLibrary500=There was an error while saving the library diff --git a/src/main/webapp/resources/dia_es.txt b/src/main/webapp/resources/dia_es.txt index 36f50cba2b67b218901e4b932135a4668a7c63d4..5c62ec7209bc6ba99ead1aa05a761bd2f8c7c303 100644 --- a/src/main/webapp/resources/dia_es.txt +++ b/src/main/webapp/resources/dia_es.txt @@ -618,6 +618,7 @@ saveAndExit=Guardar y salir saveAs=Guardar como saveAsXmlFile=¿Guardar como archivo XML? saved=Guardado +saveDiagramFirst=Please save the diagram first saveDiagramsTo=Guardar diagramas en saveLibrary403=Permisos insuficientes para editar esta biblioteca saveLibrary500=Hubo un error mientras se guardaba la biblioteca diff --git a/src/main/webapp/resources/dia_et.txt b/src/main/webapp/resources/dia_et.txt index fcbbe2419354d2c0e6cb8e324e6ea17644cd12b7..d19aed5b8aa9f0e92c6b59ac669970e864ea1a68 100644 --- a/src/main/webapp/resources/dia_et.txt +++ b/src/main/webapp/resources/dia_et.txt @@ -618,6 +618,7 @@ saveAndExit=Salvesta ja välju saveAs=Salvesta kui saveAsXmlFile=Salvesta XML failina? saved=Salvestatud +saveDiagramFirst=Please save the diagram first saveDiagramsTo=Salvesta diagrammid... saveLibrary403=Puuduvad õigused selle raamatukogu muutmiseks saveLibrary500=Viga raamatukogu salvestamisel diff --git a/src/main/webapp/resources/dia_fa.txt b/src/main/webapp/resources/dia_fa.txt index 2339063d08f04988210e07acade1584913abfe3b..5f42d745728137343a75b450f092939b6dc91906 100644 --- a/src/main/webapp/resources/dia_fa.txt +++ b/src/main/webapp/resources/dia_fa.txt @@ -618,6 +618,7 @@ saveAndExit=‫ذخیره Ùˆ خروج‬ saveAs=‫ذخیره به عنوان‬ saveAsXmlFile=‫با عنوان Ùایل XML ذخیره شود؟‬ saved=‫ذخیره شد‬ +saveDiagramFirst=Please save the diagram first saveDiagramsTo=‫ذخیره نمودار در‬ saveLibrary403=‫مجوز برای ویرایش کتابخانه کاÙÛŒ نیست‬ saveLibrary500=‫خطا به هنگام ذخیره کتابخانه‬ diff --git a/src/main/webapp/resources/dia_fi.txt b/src/main/webapp/resources/dia_fi.txt index 6257db18a263de1eebf9dabcb900983f4efa6cfd..d45abdb787ff687bdded8d703433dd9c1bf80b23 100644 --- a/src/main/webapp/resources/dia_fi.txt +++ b/src/main/webapp/resources/dia_fi.txt @@ -618,6 +618,7 @@ saveAndExit=Tallenna & poistu saveAs=Tallenna nimellä saveAsXmlFile=Tallenna XML-tiedostona? saved=Tallennettu +saveDiagramFirst=Please save the diagram first saveDiagramsTo=Tallenna kaaviot saveLibrary403=Puutteellinen lupa kokoelman editoimiseen saveLibrary500=Kokoelman tallennuksen aikana tapahtui virhe diff --git a/src/main/webapp/resources/dia_fil.txt b/src/main/webapp/resources/dia_fil.txt index 7b5a8241c8d01712670c655e15cd6fc032619c4f..255060cd9837462594d42dbf2efe8c38db009556 100644 --- a/src/main/webapp/resources/dia_fil.txt +++ b/src/main/webapp/resources/dia_fil.txt @@ -618,6 +618,7 @@ saveAndExit=I-save at umalis saveAs=I-save bilang saveAsXmlFile=I-save bilang XML file? saved=Nai-save na +saveDiagramFirst=Please save the diagram first saveDiagramsTo=I-save ang mga dayagram sa saveLibrary403=Di sapat ang pahintulot para i-edit ang library na ito saveLibrary500=May pagkakamali habang sini-save ang library diff --git a/src/main/webapp/resources/dia_fr.txt b/src/main/webapp/resources/dia_fr.txt index f3bcb6701f2013e47b55746f58ddb764e47086e5..fa050c329c9af6d25c86ce383e40c9c597f24108 100644 --- a/src/main/webapp/resources/dia_fr.txt +++ b/src/main/webapp/resources/dia_fr.txt @@ -618,6 +618,7 @@ saveAndExit=Enregistrer et quitter saveAs=Enregistrer sous saveAsXmlFile=Enregistrer sous un fichier XML? saved=Enregistré +saveDiagramFirst=Please save the diagram first saveDiagramsTo=Enregistrer sous saveLibrary403=Permissions insuffisantes pour modifier cette librairie saveLibrary500=Une erreur est survenue lors de la sauvegarde de la librairie diff --git a/src/main/webapp/resources/dia_gu.txt b/src/main/webapp/resources/dia_gu.txt index 4408aedf53b7e1b468a9fe465cb5d65cd9c47e7b..02918719acd6c16d0533d58b843ec91b83ad33d7 100644 --- a/src/main/webapp/resources/dia_gu.txt +++ b/src/main/webapp/resources/dia_gu.txt @@ -618,6 +618,7 @@ saveAndExit=Save & Exit saveAs=Save as saveAsXmlFile=Save as XML file? saved=Saved +saveDiagramFirst=Please save the diagram first saveDiagramsTo=Save diagrams to saveLibrary403=Insufficient permissions to edit this library saveLibrary500=There was an error while saving the library diff --git a/src/main/webapp/resources/dia_he.txt b/src/main/webapp/resources/dia_he.txt index 1c5a7d8428f93903a62a8c1eb43b43eea20a43f7..f2a9e55a5c75b0336313ac590b604e524ee1415e 100644 --- a/src/main/webapp/resources/dia_he.txt +++ b/src/main/webapp/resources/dia_he.txt @@ -618,6 +618,7 @@ saveAndExit=‫שמור וצ×‬ saveAs=‫שמור בש×‬ saveAsXmlFile=‫שמור כקובץ XML?‬ saved=â€«× ×©×ž×¨â€¬ +saveDiagramFirst=Please save the diagram first saveDiagramsTo=‫שמור ×ª×¨×©×™×ž×™× ×‘-‬ saveLibrary403=‫×ין הרש×ות לערוך ספריה זו‬ saveLibrary500=‫שגי××” בשמירת הספריה‬ diff --git a/src/main/webapp/resources/dia_hi.txt b/src/main/webapp/resources/dia_hi.txt index cb9577ef196faa6e13a34c3ef092c50ffd51da7e..fd2a2799524238c3f2d4c4dbf678b1b3a2d411ba 100644 --- a/src/main/webapp/resources/dia_hi.txt +++ b/src/main/webapp/resources/dia_hi.txt @@ -618,6 +618,7 @@ saveAndExit=Save & Exit saveAs=Save as saveAsXmlFile=Save as XML file? saved=Saved +saveDiagramFirst=Please save the diagram first saveDiagramsTo=Save diagrams to saveLibrary403=Insufficient permissions to edit this library saveLibrary500=There was an error while saving the library diff --git a/src/main/webapp/resources/dia_hr.txt b/src/main/webapp/resources/dia_hr.txt index 1c746bef2d4a3f0e8da7650f142b1906e3b942dd..2cfd31b9060617dbc55e97f461a452a53a243c6f 100644 --- a/src/main/webapp/resources/dia_hr.txt +++ b/src/main/webapp/resources/dia_hr.txt @@ -618,6 +618,7 @@ saveAndExit=Save & Exit saveAs=Save as saveAsXmlFile=Save as XML file? saved=Saved +saveDiagramFirst=Please save the diagram first saveDiagramsTo=Save diagrams to saveLibrary403=Insufficient permissions to edit this library saveLibrary500=There was an error while saving the library diff --git a/src/main/webapp/resources/dia_hu.txt b/src/main/webapp/resources/dia_hu.txt index ddb62e41b31658dde9082a7da1c7c2d8825c047c..6257db56d7ae2712d134ba7be012ccea2918ef46 100644 --- a/src/main/webapp/resources/dia_hu.txt +++ b/src/main/webapp/resources/dia_hu.txt @@ -618,6 +618,7 @@ saveAndExit=Ment és kilép saveAs=Mentés másként saveAsXmlFile=Mentve saved=Mentett +saveDiagramFirst=Please save the diagram first saveDiagramsTo=Diagramok mentése ide: saveLibrary403=Elégtelen engedély a könyvtár szerkesztéséhez saveLibrary500=Hiba történt a könyvtár mentésekor diff --git a/src/main/webapp/resources/dia_i18n.txt b/src/main/webapp/resources/dia_i18n.txt index 7405a84be61fe3146ce3eeca275818a2d52c90b7..486e894641bbaa654946643c7f9eec1525622a23 100644 --- a/src/main/webapp/resources/dia_i18n.txt +++ b/src/main/webapp/resources/dia_i18n.txt @@ -618,6 +618,7 @@ saveAndExit=saveAndExit saveAs=saveAs saveAsXmlFile=saveAsXmlFile saved=saved +saveDiagramFirst=saveDiagramFirst saveDiagramsTo=saveDiagramsTo saveLibrary403=saveLibrary403 saveLibrary500=saveLibrary500 diff --git a/src/main/webapp/resources/dia_id.txt b/src/main/webapp/resources/dia_id.txt index 463b413aa332a9b87210f7b941c4f099138da76e..c79d904015b8780f9fbce07f5540458eff489048 100644 --- a/src/main/webapp/resources/dia_id.txt +++ b/src/main/webapp/resources/dia_id.txt @@ -618,6 +618,7 @@ saveAndExit=Simpan & Keluar saveAs=Simpan sebagai saveAsXmlFile=Simpan sebagai berkas XML? saved=Tersimpan +saveDiagramFirst=Please save the diagram first saveDiagramsTo=Simpan diagram ke saveLibrary403=Tidak cukup izin untuk mengedit pustaka ini saveLibrary500=Terjadi kesalahan saat menyimpan pustaka diff --git a/src/main/webapp/resources/dia_it.txt b/src/main/webapp/resources/dia_it.txt index df5cdb4b6db8f0ed9706538e7d96e0eb0d810bec..30925bdc6bd40a1dd5b88f1d7f501d13c29b4180 100644 --- a/src/main/webapp/resources/dia_it.txt +++ b/src/main/webapp/resources/dia_it.txt @@ -618,6 +618,7 @@ saveAndExit=Salva ed esci saveAs=Salva come saveAsXmlFile=Salva come file XML saved=Salvato +saveDiagramFirst=Please save the diagram first saveDiagramsTo=Salva diagrammi in saveLibrary403=Autorizzazione insufficiente per modificare questa libreria saveLibrary500=È subentrato un errore durante il salvataggio della libreria diff --git a/src/main/webapp/resources/dia_ja.txt b/src/main/webapp/resources/dia_ja.txt index c168162a4f1c658deeb114227e6845bf92fddad0..ed07faddec623ed9f26cbaf1f3486350bd28e064 100644 --- a/src/main/webapp/resources/dia_ja.txt +++ b/src/main/webapp/resources/dia_ja.txt @@ -618,6 +618,7 @@ saveAndExit=ä¿å˜ã—ã¦é–‰ã˜ã‚‹ saveAs=åå‰ã‚’付ã‘ã¦ä¿å˜ saveAsXmlFile=XMLファイルã¨ã—ã¦ä¿å˜ã—ã¾ã™ã‹ï¼Ÿ saved=ä¿å˜æ¸ˆã¿ +saveDiagramFirst=Please save the diagram first saveDiagramsTo=ファイルã®ä¿å˜å…ˆ saveLibrary403=ã“ã®ãƒ©ã‚¤ãƒ–ラリを編集ã™ã‚‹æ¨©é™ãŒã‚ã‚Šã¾ã›ã‚“。 saveLibrary500=ライブラリä¿å˜ä¸ã«ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ã¾ã—ãŸã€‚ diff --git a/src/main/webapp/resources/dia_kn.txt b/src/main/webapp/resources/dia_kn.txt index e2512ef4988b14ddab652986664fe0400dfa5f57..0c4b6243b6f42e50ef06cc622625224b28b4f867 100644 --- a/src/main/webapp/resources/dia_kn.txt +++ b/src/main/webapp/resources/dia_kn.txt @@ -618,6 +618,7 @@ saveAndExit=Save & Exit saveAs=Save as saveAsXmlFile=Save as XML file? saved=Saved +saveDiagramFirst=Please save the diagram first saveDiagramsTo=Save diagrams to saveLibrary403=Insufficient permissions to edit this library saveLibrary500=There was an error while saving the library diff --git a/src/main/webapp/resources/dia_ko.txt b/src/main/webapp/resources/dia_ko.txt index b5fd087152180275284cf8b4560384dcb7ecc42c..3cf7694261decf5eb955555b82056bfdff94d173 100644 --- a/src/main/webapp/resources/dia_ko.txt +++ b/src/main/webapp/resources/dia_ko.txt @@ -618,6 +618,7 @@ saveAndExit=ì €ìž¥ 후 나가기 saveAs=다른 ì´ë¦„으로 ì €ìž¥ saveAsXmlFile=XML 파ì¼ë¡œ ì €ìž¥í•˜ì‹œê² ìŠµë‹ˆê¹Œ? saved=ì €ìž¥ë¨ +saveDiagramFirst=Please save the diagram first saveDiagramsTo=다ì´ì–´ê·¸ëž¨ ì €ìž¥ saveLibrary403=본 ë¼ì´ë¸ŒëŸ¬ë¦¬ì˜ 편집 권한 부족 saveLibrary500=ë¼ì´ë¸ŒëŸ¬ë¦¬ ì €ìž¥ 중 오류가 ë°œìƒí•˜ì˜€ìŠµë‹ˆë‹¤. diff --git a/src/main/webapp/resources/dia_lt.txt b/src/main/webapp/resources/dia_lt.txt index ece9c73e7b515e0fe4350763fce59904110d45b5..9fb04c95a5f0889c74830c634df8f2d0ec645db6 100644 --- a/src/main/webapp/resources/dia_lt.txt +++ b/src/main/webapp/resources/dia_lt.txt @@ -618,6 +618,7 @@ saveAndExit=Save & Exit saveAs=Save as saveAsXmlFile=Save as XML file? saved=Saved +saveDiagramFirst=Please save the diagram first saveDiagramsTo=Save diagrams to saveLibrary403=Insufficient permissions to edit this library saveLibrary500=There was an error while saving the library diff --git a/src/main/webapp/resources/dia_lv.txt b/src/main/webapp/resources/dia_lv.txt index 97816d094bb707d2d5e61fdfc5f461d35be444fc..4be514d55955effb1086ce20d377af8381bb5f0c 100644 --- a/src/main/webapp/resources/dia_lv.txt +++ b/src/main/webapp/resources/dia_lv.txt @@ -618,6 +618,7 @@ saveAndExit=Save & Exit saveAs=Save as saveAsXmlFile=Save as XML file? saved=Saved +saveDiagramFirst=Please save the diagram first saveDiagramsTo=Save diagrams to saveLibrary403=Insufficient permissions to edit this library saveLibrary500=There was an error while saving the library diff --git a/src/main/webapp/resources/dia_ml.txt b/src/main/webapp/resources/dia_ml.txt index 33bfd9c8a11356990159e7e2d42aec2aeecadb30..3652da20627e27f4982436285d01e6f383856488 100644 --- a/src/main/webapp/resources/dia_ml.txt +++ b/src/main/webapp/resources/dia_ml.txt @@ -618,6 +618,7 @@ saveAndExit=Save & Exit saveAs=Save as saveAsXmlFile=Save as XML file? saved=Saved +saveDiagramFirst=Please save the diagram first saveDiagramsTo=Save diagrams to saveLibrary403=Insufficient permissions to edit this library saveLibrary500=There was an error while saving the library diff --git a/src/main/webapp/resources/dia_mr.txt b/src/main/webapp/resources/dia_mr.txt index 0c31980a5c831e8f2e70bf5ac4b124c8baddbea2..7b33160d1adad84a0855dcb1dc836f56b4654acd 100644 --- a/src/main/webapp/resources/dia_mr.txt +++ b/src/main/webapp/resources/dia_mr.txt @@ -618,6 +618,7 @@ saveAndExit=Save & Exit saveAs=Save as saveAsXmlFile=Save as XML file? saved=Saved +saveDiagramFirst=Please save the diagram first saveDiagramsTo=Save diagrams to saveLibrary403=Insufficient permissions to edit this library saveLibrary500=There was an error while saving the library diff --git a/src/main/webapp/resources/dia_ms.txt b/src/main/webapp/resources/dia_ms.txt index 6249b527eb2b80bd20240b608a987046e17afa96..5f3b87b74c0dd423c2fa6ed07618a5d5619ba0c3 100644 --- a/src/main/webapp/resources/dia_ms.txt +++ b/src/main/webapp/resources/dia_ms.txt @@ -618,6 +618,7 @@ saveAndExit=Simpan & Keluar saveAs=Simpan sebagai saveAsXmlFile=Simpan sebagai fail XML? saved=Disimpan +saveDiagramFirst=Please save the diagram first saveDiagramsTo=Simpan gambarajah ke saveLibrary403=Keizinan tidak mencukupi untuk menyunting pustaka ini saveLibrary500=Terdapat ralat semasa menyimpan pustaka ini diff --git a/src/main/webapp/resources/dia_nl.txt b/src/main/webapp/resources/dia_nl.txt index 7148e4835b6e4f9adc57cb53097cfc4e19a07725..a09933fa9a5f6f346edc8db9b2320048a1766ac4 100644 --- a/src/main/webapp/resources/dia_nl.txt +++ b/src/main/webapp/resources/dia_nl.txt @@ -618,6 +618,7 @@ saveAndExit=Opslaan & afsluiten saveAs=Opslaan als saveAsXmlFile=Opslaan als XML-bestand? saved=Opgeslagen +saveDiagramFirst=Please save the diagram first saveDiagramsTo=Diagrammen opslaan naar saveLibrary403=Onvoldoende rechten om deze bibliotheek te bewerken saveLibrary500=Er is een fout opgetreden bij het opslaan van de bibliotheek diff --git a/src/main/webapp/resources/dia_no.txt b/src/main/webapp/resources/dia_no.txt index f548878c08f10cb0684e1d3303b13033bb54381f..a925b7d02c9f04f912532781d2b3a4d621d42db6 100644 --- a/src/main/webapp/resources/dia_no.txt +++ b/src/main/webapp/resources/dia_no.txt @@ -618,6 +618,7 @@ saveAndExit=Lagre & avslutt saveAs=Lagre som saveAsXmlFile=Lagre som XML fil? saved=Lagret +saveDiagramFirst=Please save the diagram first saveDiagramsTo=Lagre diagrammer til saveLibrary403=Utilstrekkelig tillatelse til Ã¥ redigere dette biblioteket saveLibrary500=Det oppsto en feil i lagringen av biblioteket diff --git a/src/main/webapp/resources/dia_pl.txt b/src/main/webapp/resources/dia_pl.txt index de8d9185a868e94bd4dfbe094cd0eb50ec0b5c74..424512745d4f832b9c49496b499c52c479c83db7 100644 --- a/src/main/webapp/resources/dia_pl.txt +++ b/src/main/webapp/resources/dia_pl.txt @@ -618,6 +618,7 @@ saveAndExit=Zapisz i wyjdź saveAs=Zapisz jako saveAsXmlFile=Zapisać jako plik XML? saved=Zapisany +saveDiagramFirst=Please save the diagram first saveDiagramsTo=Zapisz diagramy w saveLibrary403=NiewystarczajÄ…ce uprawnienia do edycji tej biblioteki saveLibrary500=WystÄ…piÅ‚ bÅ‚Ä…d podczas zapisywania biblioteki diff --git a/src/main/webapp/resources/dia_pt-br.txt b/src/main/webapp/resources/dia_pt-br.txt index a34d0502687141c23032f420655a1ed7eab1f8aa..e1737fe098ffbfd78b62150e07eb488d539fbeb5 100644 --- a/src/main/webapp/resources/dia_pt-br.txt +++ b/src/main/webapp/resources/dia_pt-br.txt @@ -618,6 +618,7 @@ saveAndExit=Salvar e sair saveAs=Salvar como saveAsXmlFile=Salvar como arquivo XML? saved=Salvo +saveDiagramFirst=Please save the diagram first saveDiagramsTo=Salvar diagramas em saveLibrary403=Permissões insuficientes para editar esta biblioteca saveLibrary500=Ocorreu um erro enquanto a biblioteca estava sendo salva diff --git a/src/main/webapp/resources/dia_pt.txt b/src/main/webapp/resources/dia_pt.txt index 1872180155d6e805eae107cc120f6f8d216deaf5..3ff38cfb113e8703b2307bce4e903cf425883363 100644 --- a/src/main/webapp/resources/dia_pt.txt +++ b/src/main/webapp/resources/dia_pt.txt @@ -618,6 +618,7 @@ saveAndExit=Guardar e sair saveAs=Guardar como saveAsXmlFile=Guardar como ficheiro XML? saved=Guardado +saveDiagramFirst=Please save the diagram first saveDiagramsTo=Guardar os diagramas em saveLibrary403=Permissões não suficientes para editar esta biblioteca. saveLibrary500=Ocorreu um erro ao gravar a biblioteca diff --git a/src/main/webapp/resources/dia_ro.txt b/src/main/webapp/resources/dia_ro.txt index b0a0b02ec4df9e027c14fb1956d434956965658d..f2eb513d77ee5253090a636a165529d0b8c22eee 100644 --- a/src/main/webapp/resources/dia_ro.txt +++ b/src/main/webapp/resources/dia_ro.txt @@ -618,6 +618,7 @@ saveAndExit=Salvare ÅŸi ieÅŸire saveAs=Salvare cu titlu nou saveAsXmlFile=Salvare ca fiÈ™ier XML? saved=Salvat +saveDiagramFirst=Please save the diagram first saveDiagramsTo= Salvează diagramele în saveLibrary403=Permisiuni insuficiente pentru a edita această librărie saveLibrary500=A existat o eroare la salvarea acestei librării diff --git a/src/main/webapp/resources/dia_ru.txt b/src/main/webapp/resources/dia_ru.txt index 9fe3c62a638761634dddf7acec8ab19d7605d55c..e06cb0345f232a539dc11bf89b1626fa3ca641e7 100644 --- a/src/main/webapp/resources/dia_ru.txt +++ b/src/main/webapp/resources/dia_ru.txt @@ -618,6 +618,7 @@ saveAndExit=Сохранить и выйти saveAs=Сохранить как saveAsXmlFile=Сохранить как файл XML? saved=Сохранено +saveDiagramFirst=Please save the diagram first saveDiagramsTo=СохранÑÑ‚ÑŒ диаграммы в saveLibrary403=ÐедоÑтаточно полномочий Ð´Ð»Ñ Ñ€ÐµÐ´Ð°ÐºÑ‚Ð¸Ñ€Ð¾Ð²Ð°Ð½Ð¸Ñ Ð±Ð¸Ð±Ð»Ð¸Ð¾Ñ‚ÐµÐºÐ¸ saveLibrary500=Ошибка при Ñохранении библиотеки diff --git a/src/main/webapp/resources/dia_sk.txt b/src/main/webapp/resources/dia_sk.txt index b64182002d581c299e746e605ad54997bb145ded..a8378bb04285d115c1034bba590ff06180f6caae 100644 --- a/src/main/webapp/resources/dia_sk.txt +++ b/src/main/webapp/resources/dia_sk.txt @@ -618,6 +618,7 @@ saveAndExit=Save & Exit saveAs=Save as saveAsXmlFile=Save as XML file? saved=Saved +saveDiagramFirst=Please save the diagram first saveDiagramsTo=Save diagrams to saveLibrary403=Insufficient permissions to edit this library saveLibrary500=There was an error while saving the library diff --git a/src/main/webapp/resources/dia_sl.txt b/src/main/webapp/resources/dia_sl.txt index ba968820e51fff1e9db13061e374a1c26a792b7a..d2e5b4a31e3405ecdc6af8d6c9cf31a2c39605b4 100644 --- a/src/main/webapp/resources/dia_sl.txt +++ b/src/main/webapp/resources/dia_sl.txt @@ -618,6 +618,7 @@ saveAndExit=Save & Exit saveAs=Save as saveAsXmlFile=Save as XML file? saved=Saved +saveDiagramFirst=Please save the diagram first saveDiagramsTo=Save diagrams to saveLibrary403=Insufficient permissions to edit this library saveLibrary500=There was an error while saving the library diff --git a/src/main/webapp/resources/dia_sr.txt b/src/main/webapp/resources/dia_sr.txt index ab57d8957d2cbeae18fc4927212a01b02c71a86b..1648b3ed52ae6d7a8d53d88261f27ffddbc87b08 100644 --- a/src/main/webapp/resources/dia_sr.txt +++ b/src/main/webapp/resources/dia_sr.txt @@ -618,6 +618,7 @@ saveAndExit=Save & Exit saveAs=Snimi kao saveAsXmlFile=Save as XML file? saved=Snimljeno +saveDiagramFirst=Prvo saÄuvajte dijagram saveDiagramsTo=SaÄuvaj dijagrame na saveLibrary403=Insufficient permissions to edit this library saveLibrary500=There was an error while saving the library diff --git a/src/main/webapp/resources/dia_sv.txt b/src/main/webapp/resources/dia_sv.txt index cabab7000cd6c9b4a66bc70110969311934aa2d5..ffc0bac8c5719b9bfd3cc998627e1ef14f0f3b7e 100644 --- a/src/main/webapp/resources/dia_sv.txt +++ b/src/main/webapp/resources/dia_sv.txt @@ -618,6 +618,7 @@ saveAndExit=Spara & Avsluta saveAs=Spara som saveAsXmlFile=Spara som XML-fil? saved=Sparad +saveDiagramFirst=Please save the diagram first saveDiagramsTo=Spara diagram till saveLibrary403=Otillräckliga korregeringsrättigheter för detta bibliotek saveLibrary500=Ett fel uppstod under sparande av biblioteket diff --git a/src/main/webapp/resources/dia_sw.txt b/src/main/webapp/resources/dia_sw.txt index 6f3746cc04d05c4e19eed368dc5771416eb50799..2aabd9d3797e66e30ad292c4f0d89ed7d9503aee 100644 --- a/src/main/webapp/resources/dia_sw.txt +++ b/src/main/webapp/resources/dia_sw.txt @@ -618,6 +618,7 @@ saveAndExit=Save & Exit saveAs=Save as saveAsXmlFile=Save as XML file? saved=Saved +saveDiagramFirst=Please save the diagram first saveDiagramsTo=Save diagrams to saveLibrary403=Insufficient permissions to edit this library saveLibrary500=There was an error while saving the library diff --git a/src/main/webapp/resources/dia_ta.txt b/src/main/webapp/resources/dia_ta.txt index e9c2fda37a7cc0e8d5cd937822a8b3240e4aca23..0175af0a73c53530c01901af15c70f3f53bbaea8 100644 --- a/src/main/webapp/resources/dia_ta.txt +++ b/src/main/webapp/resources/dia_ta.txt @@ -618,6 +618,7 @@ saveAndExit=Save & Exit saveAs=Save as saveAsXmlFile=Save as XML file? saved=Saved +saveDiagramFirst=Please save the diagram first saveDiagramsTo=Save diagrams to saveLibrary403=Insufficient permissions to edit this library saveLibrary500=There was an error while saving the library diff --git a/src/main/webapp/resources/dia_te.txt b/src/main/webapp/resources/dia_te.txt index 412249503a24f777e18e719152c6de66cb6816a2..0fa879183440d7d182c6fd2b188fb87077f5e7c4 100644 --- a/src/main/webapp/resources/dia_te.txt +++ b/src/main/webapp/resources/dia_te.txt @@ -618,6 +618,7 @@ saveAndExit=Save & Exit saveAs=Save as saveAsXmlFile=Save as XML file? saved=Saved +saveDiagramFirst=Please save the diagram first saveDiagramsTo=Save diagrams to saveLibrary403=Insufficient permissions to edit this library saveLibrary500=There was an error while saving the library diff --git a/src/main/webapp/resources/dia_th.txt b/src/main/webapp/resources/dia_th.txt index 86b1171263d19dbd2e2d89075d136905573700ac..88a27046691d2e0f8faa4fa2881dc2b3c1892ebc 100644 --- a/src/main/webapp/resources/dia_th.txt +++ b/src/main/webapp/resources/dia_th.txt @@ -618,6 +618,7 @@ saveAndExit=บันทึภà¹à¸¥à¸° à¸à¸à¸ saveAs=บันทึà¸à¹€à¸›à¹‡à¸™ saveAsXmlFile=บันทึà¸à¹€à¸›à¹‡à¸™à¹„ฟล์ XML หรืà¸à¹„ม่ saved=บันทึà¸à¹€à¸£à¸µà¸¢à¸šà¸£à¹‰à¸à¸¢à¹à¸¥à¹‰à¸§ +saveDiagramFirst=Please save the diagram first saveDiagramsTo=บันทึà¸à¹à¸œà¸™à¸ าพไปยัง saveLibrary403=สิทธิ์ไม่เพียงพà¸à¹ƒà¸™à¸à¸²à¸£à¹à¸à¹‰à¹„ขไลบรารีนี้ saveLibrary500=เà¸à¸´à¸”ข้à¸à¸œà¸´à¸”พลาดขณะบันทึà¸à¹„ลบรารี่ diff --git a/src/main/webapp/resources/dia_tr.txt b/src/main/webapp/resources/dia_tr.txt index a102081373087614b285336bbde0e3094c07ebe9..7c17c406e4bb47f5cfb175ec7e2714bf9ad0174b 100644 --- a/src/main/webapp/resources/dia_tr.txt +++ b/src/main/webapp/resources/dia_tr.txt @@ -618,6 +618,7 @@ saveAndExit=Kaydet ve Çık saveAs=Farklı kaydet saveAsXmlFile=XML dosyası olarak kaydet saved=Kaydedildi +saveDiagramFirst=Please save the diagram first saveDiagramsTo=Diyagramları ÅŸuna kaydet: saveLibrary403=Bu kitaplığı deÄŸiÅŸtirmek için baÅŸarısız izinler saveLibrary500=Kitaplığı kaydederken hata oluÅŸtu diff --git a/src/main/webapp/resources/dia_uk.txt b/src/main/webapp/resources/dia_uk.txt index 144305d56b16f7c5fa85b5b4156ee59dec8e91f9..330ae7880a6b88a603a5c3a2dd23460ed63eec64 100644 --- a/src/main/webapp/resources/dia_uk.txt +++ b/src/main/webapp/resources/dia_uk.txt @@ -618,6 +618,7 @@ saveAndExit=Зберегти Ñ– вийти saveAs=Зберегти Ñк saveAsXmlFile=Зберегти Ñк XML-файл? saved=Збережено +saveDiagramFirst=Please save the diagram first saveDiagramsTo=Зберегти діаграми в saveLibrary403=ÐедоÑтатньо повноважень, щоб редагувати цю бібліотеку saveLibrary500=При збереженні бібліотеки виникла помилка diff --git a/src/main/webapp/resources/dia_vi.txt b/src/main/webapp/resources/dia_vi.txt index c87735356f0f0f7ee0bfb60bc322501f1ee0703f..e1c293c01ec887347d0a4d23dfd06e239e809087 100644 --- a/src/main/webapp/resources/dia_vi.txt +++ b/src/main/webapp/resources/dia_vi.txt @@ -618,6 +618,7 @@ saveAndExit=LÆ°u & Thoát saveAs=LÆ°u dÆ°á»›i dạng saveAsXmlFile=LÆ°u dÆ°á»›i dạng táºp tin XML? saved=Äã lÆ°u +saveDiagramFirst=Please save the diagram first saveDiagramsTo=LÆ°u biểu đồ và o saveLibrary403=Không có quyá»n chỉnh sá»a thÆ° viện nà y saveLibrary500=Có lá»—i khi lÆ°u thÆ° viện diff --git a/src/main/webapp/resources/dia_zh-tw.txt b/src/main/webapp/resources/dia_zh-tw.txt index 12aadcd219c4f419533192e47ecc1e230a7e8e09..7bd87890cf1523bd45fa0126db7534899e68043c 100644 --- a/src/main/webapp/resources/dia_zh-tw.txt +++ b/src/main/webapp/resources/dia_zh-tw.txt @@ -618,6 +618,7 @@ saveAndExit=儲å˜ä¸¦é€€å‡º saveAs=å¦å˜æ–°æª” saveAsXmlFile=儲å˜ç‚ºXML檔? saved=å·²å„²å˜ +saveDiagramFirst=Please save the diagram first saveDiagramsTo=將圖表儲å˜åˆ° saveLibrary403=æ²’æœ‰è¶³å¤ çš„æ¬Šé™ç·¨è¼¯æ¤åœ–庫 saveLibrary500=ä¿å˜åœ–庫時出錯 diff --git a/src/main/webapp/resources/dia_zh.txt b/src/main/webapp/resources/dia_zh.txt index 0c064e0b5e462eca9088d46eeaef9396a9415d6c..5c2cb40b52bea6de351d5fc83fa115f2bc122155 100644 --- a/src/main/webapp/resources/dia_zh.txt +++ b/src/main/webapp/resources/dia_zh.txt @@ -618,6 +618,7 @@ saveAndExit=储å˜å¹¶é€€å‡º saveAs=å¦å˜ä¸º saveAsXmlFile=å¦å˜ä¸ºXML文件? saved=å·²ä¿å˜ +saveDiagramFirst=Please save the diagram first saveDiagramsTo=把图表å˜è‡³ saveLibrary403=没有足够的æƒé™ç¼–辑æ¤å›¾åº“ saveLibrary500=ä¿å˜å›¾åº“时出错