From 5c9898f94bca5d24cdb548014347c2655778a67f Mon Sep 17 00:00:00 2001 From: Gaudenz Alder Date: Sun, 3 Dec 2017 15:52:50 +0100 Subject: [PATCH] 7.8.2 release Former-commit-id: 57be0fe11e3f9fe7043676d3fcd3ebd00a955b4a --- ChangeLog | 13 + README.md | 2 +- VERSION | 2 +- etc/mxgraph/mxClient.js | 14 +- war/cache.manifest | 2 +- war/export3.html | 405 ++++++ war/js/app.min.js | 1212 ++++++++-------- war/js/atlas-viewer.min.js | 1383 +++++++++--------- war/js/atlas.min.js | 1474 ++++++++++---------- war/js/diagramly/Dialogs.js | 22 +- war/js/diagramly/EditorUi.js | 85 +- war/js/diagramly/Menus.js | 88 +- war/js/diagramly/Trees.js | 24 +- war/js/diagramly/graphml/mxGraphMlCodec.js | 92 +- war/js/embed-static.min.js | 8 +- war/js/reader.min.js | 8 +- war/js/viewer.min.js | 1383 +++++++++--------- 17 files changed, 3383 insertions(+), 2834 deletions(-) create mode 100644 war/export3.html diff --git a/ChangeLog b/ChangeLog index e9df38e302..d4735098ad 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +03-DEC-2017: 7.8.2 + +- Adds select descendants for cells with outgoing edges +- Adds defaults for insert from custom library +- Adds search of metadata in find dialog +- Enables export URL for external domains +- Adds custom libraries to shape search index +- Uses mxGraph 3.8.1 beta 1 + +01-DEC-2017: 7.8.1 + +- Fixes Confluence Cloud revision history diagram display + 30-NOV-2017: 7.8.0 - Uses mxGraph 3.8.0 diff --git a/README.md b/README.md index 2b19724e33..f8a1aed137 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ The [mxGraph documentation](https://jgraph.github.io/mxgraph/) provides a lot of Running ------- -The simplest way to run draw.io initially is to fork this project, [publish the master branch to GitHub pages](https://help.github.com/categories/github-pages-basics/) and the [pages sites](https://jgraph.github.io/draw.io/war/index.html) will have the full editor functionality (sans the integrations). +The simplest way to run draw.io initially is to fork this project, [publish the master branch to GitHub pages](https://help.github.com/categories/github-pages-basics/) and the [pages sites](https://jgraph.github.io/drawio/war/index.html) will have the full editor functionality (sans the integrations). The full packaged .war of the client and servlets is built when the project is tagged and available on the [releases page](https://github.com/jgraph/draw.io/releases). diff --git a/VERSION b/VERSION index 9fdf3baef9..a33192706f 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -7.8.0 \ No newline at end of file +7.8.2 \ No newline at end of file diff --git a/etc/mxgraph/mxClient.js b/etc/mxgraph/mxClient.js index 17df4b3fd9..f81b393e81 100644 --- a/etc/mxgraph/mxClient.js +++ b/etc/mxgraph/mxClient.js @@ -1,4 +1,4 @@ -var mxClient={VERSION:"3.8.0",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&& +var mxClient={VERSION:"3.8.1",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&& 0>navigator.userAgent.indexOf("Edge/"),IS_OP:0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/"),IS_OT:0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:0<=navigator.userAgent.indexOf("AppleWebKit/")&& 0>navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_IOS:navigator.userAgent.match(/(iPad|iPhone|iPod)/g)?!0:!1,IS_GC:0<=navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:0<=navigator.userAgent.indexOf("Firefox/"),IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&& 0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:0<=navigator.userAgent.indexOf("Firefox/")||0<=navigator.userAgent.indexOf("Iceweasel/")||0<=navigator.userAgent.indexOf("Seamonkey/")||0<=navigator.userAgent.indexOf("Iceape/")||0<=navigator.userAgent.indexOf("Galeon/")|| @@ -612,15 +612,15 @@ mxFastOrganicLayout.prototype.iteration=0;mxFastOrganicLayout.prototype.allowedT mxFastOrganicLayout.prototype.execute=function(a){var b=this.graph.getModel();this.vertexArray=[];for(var c=this.graph.getChildVertices(a),d=0;dthis.forceConstant&&(this.forceConstant= .001);this.forceConstantSquared=this.forceConstant*this.forceConstant;for(d=0;db&&(b=.001);var c=this.dispX[a]/b*Math.min(b,this.temperature),b=this.dispY[a]/b*Math.min(b,this.temperature);this.dispX[a]=0;this.dispY[a]=0;this.cellLocation[a][0]+=c;this.cellLocation[a][1]+=b}}; +this.calcRepulsion();this.calcAttraction();this.calcPositions();this.reduceTemperature()}a=c=null;for(d=0;db&&(b=.001);var c=this.dispX[a]/b*Math.min(b,this.temperature),b=this.dispY[a]/b*Math.min(b,this.temperature);this.dispX[a]=0;this.dispY[a]=0;this.cellLocation[a][0]+=c;this.cellLocation[a][1]+=b}}; mxFastOrganicLayout.prototype.calcAttraction=function(){for(var a=0;athis.maxDistanceLimit||(ga?a+"-"+c:c+"-"+a):null}; mxParallelEdgeLayout.prototype.layout=function(a){var b=a[0],c=this.graph.getView(),d=this.graph.getModel(),e=d.getGeometry(c.getVisibleTerminal(b,!0)),d=d.getGeometry(c.getVisibleTerminal(b,!1));if(e==d)for(var b=e.x+e.width+this.spacing,c=e.y+e.height/2,f=0;f + + + + + + + + + + + +
+ + diff --git a/war/js/app.min.js b/war/js/app.min.js index b881a2cf30..b4edae0877 100644 --- a/war/js/app.min.js +++ b/war/js/app.min.js @@ -104,7 +104,7 @@ ko:"한국어",ja:"日本語",zh:"中文(中国)","zh-tw":"中文(台灣 function setCurrentXml(a,b){null!=window.parent&&null!=window.parent.openFile&&window.parent.openFile.setData(a,b)} (function(){if("undefined"!==typeof JSON&&isLocalStorage)try{var a=localStorage.getItem(".drawio-config"),b=!0;null!=a&&(b=JSON.parse(a).showStartScreen);0==b&&(urlParams.splash="0")}catch(c){}a=urlParams["export"];null!=a&&("http://"!=a.substring(0,7)&&"https://"!=a.substring(0,8)&&(a="http://"+a),EXPORT_URL=a);window.DRAWIO_LOG_URL=window.DRAWIO_LOG_URL||"";b=window.location.host;"test.draw.io"!=b&&(a=b.length-7,b=b.lastIndexOf("draw.io",a),-1!==b&&b===a&&(window.DRAWIO_LOG_URL="https://log.draw.io"))})(); if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==urlParams.local)urlParams.analytics="0",urlParams.picker="0",urlParams.gapi="0",urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.tr="0";if("1"==urlParams.offline||"1"==urlParams.local)urlParams.math="0";"1"==urlParams.lightbox&&(urlParams.chrome="0");window.urlParams=window.urlParams||{};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images"; -window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"../../../src";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de"];var mxClient={VERSION:"3.8.0",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&& +window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"../../../src";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de"];var mxClient={VERSION:"3.8.1",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&& 0>navigator.userAgent.indexOf("Edge/"),IS_OP:0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/"),IS_OT:0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:0<=navigator.userAgent.indexOf("AppleWebKit/")&& 0>navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_IOS:navigator.userAgent.match(/(iPad|iPhone|iPod)/g)?!0:!1,IS_GC:0<=navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:0<=navigator.userAgent.indexOf("Firefox/"),IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&& 0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:0<=navigator.userAgent.indexOf("Firefox/")||0<=navigator.userAgent.indexOf("Iceweasel/")||0<=navigator.userAgent.indexOf("Seamonkey/")||0<=navigator.userAgent.indexOf("Iceape/")||0<=navigator.userAgent.indexOf("Galeon/")|| @@ -718,15 +718,15 @@ mxFastOrganicLayout.prototype.iteration=0;mxFastOrganicLayout.prototype.allowedT mxFastOrganicLayout.prototype.execute=function(a){var b=this.graph.getModel();this.vertexArray=[];for(var c=this.graph.getChildVertices(a),d=0;dthis.forceConstant&&(this.forceConstant= .001);this.forceConstantSquared=this.forceConstant*this.forceConstant;for(d=0;db&&(b=.001);var c=this.dispX[a]/b*Math.min(b,this.temperature),b=this.dispY[a]/b*Math.min(b,this.temperature);this.dispX[a]=0;this.dispY[a]=0;this.cellLocation[a][0]+=c;this.cellLocation[a][1]+=b}}; +this.calcRepulsion();this.calcAttraction();this.calcPositions();this.reduceTemperature()}a=c=null;for(d=0;db&&(b=.001);var c=this.dispX[a]/b*Math.min(b,this.temperature),b=this.dispY[a]/b*Math.min(b,this.temperature);this.dispX[a]=0;this.dispY[a]=0;this.cellLocation[a][0]+=c;this.cellLocation[a][1]+=b}}; mxFastOrganicLayout.prototype.calcAttraction=function(){for(var a=0;athis.maxDistanceLimit||(ga?a+"-"+c:c+"-"+a):null}; mxParallelEdgeLayout.prototype.layout=function(a){var b=a[0],c=this.graph.getView(),d=this.graph.getModel(),e=d.getGeometry(c.getVisibleTerminal(b,!0)),d=d.getGeometry(c.getVisibleTerminal(b,!1));if(e==d)for(var b=e.x+e.width+this.spacing,c=e.y+e.height/2,f=0;f=d&&(mxUtils.br(m),k=0)}d=null!=d?d:3;var e=document.createElement("div");e.style.textAlign="center";e.style.whiteSpace="nowrap";e.style.paddingTop="0px";e.style.paddingBottom="20px";var f=a.addLanguageMenu(e,!0);null!=f&&(f.style.bottom=parseInt("28px")-2+"px");if(!a.isOffline()&&1=d&&(mxUtils.br(n),k=0)}d=null!=d?d:3;var e=document.createElement("div");e.style.textAlign="center";e.style.whiteSpace="nowrap";e.style.paddingTop="0px";e.style.paddingBottom="20px";var f=a.addLanguageMenu(e,!0);null!=f&&(f.style.bottom=parseInt("28px")-2+"px");if(!a.isOffline()&&1 '+mxResources.get("googleDriveMissingClickHere")+"",e.appendChild(n))},5E3);this.container=e},SplashDialog=function(a){var b=document.createElement("div");b.style.textAlign="center";a.addLanguageMenu(b,!0);var d=null,c=a.getServiceCount();!a.isOffline()&&1 '+mxResources.get("googleDriveMissingClickHere")+"",e.appendChild(m))},5E3);this.container=e},SplashDialog=function(a){var b=document.createElement("div");b.style.textAlign="center";a.addLanguageMenu(b,!0);var d=null,c=a.getServiceCount();!a.isOffline()&&1"+f.innerHTML,f.style.paddingBottom="8px",f.style.paddingTop="8px",f.style.height="auto",f.style.width="40%");a.editor.cancelFirst&&k.appendChild(f);e=mxUtils.button(e||mxResources.get("ok"),function(){a.hideDialog();null!=d&&d(n.checked)});k.appendChild(e);null!=h?(e.innerHTML=h+"
"+e.innerHTML+"
",e.style.paddingBottom="8px",e.style.paddingTop="8px",e.style.height="auto",e.className="geBtn", -e.style.width="40%"):e.className="geBtn gePrimaryBtn";a.editor.cancelFirst||k.appendChild(f);g.appendChild(k);m?(k.style.marginTop="10px",k=document.createElement("p"),k.style.marginTop="20px",k.appendChild(n),h=document.createElement("span"),mxUtils.write(h," "+mxResources.get("rememberThisSetting")),k.appendChild(h),g.appendChild(k),mxEvent.addListener(h,"click",function(a){n.checked=!n.checked;mxEvent.consume(a)})):k.style.marginTop="16px";this.container=g},ErrorDialog=function(a,b,d,c,e,f,h,l, -m){m=null!=m?m:!0;var g=document.createElement("div");g.style.textAlign="center";if(null!=b){var k=document.createElement("div");k.style.padding="0px";k.style.margin="0px";k.style.fontSize="18px";k.style.paddingBottom="16px";k.style.marginBottom="16px";k.style.borderBottom="1px solid #c0c0c0";k.style.color="gray";mxUtils.write(k,b);g.appendChild(k)}b=document.createElement("div");b.style.padding="6px";b.innerHTML=d;g.appendChild(b);d=document.createElement("div");d.style.marginTop="16px";d.style.textAlign= -"right";null!=f&&(b=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();f()}),b.className="geBtn",d.appendChild(b),d.style.textAlign="center");var n=mxUtils.button(c,function(){m&&a.hideDialog();null!=e&&e()});n.className="geBtn";d.appendChild(n);null!=h&&(c=mxUtils.button(h,function(){m&&a.hideDialog();null!=l&&l()}),c.className="geBtn gePrimaryBtn",d.appendChild(c));this.init=function(){n.focus()};g.appendChild(d);this.container=g},EmbedDialog=function(a,b,d,c,e){c=document.createElement("div"); +this.container=b},ConfirmDialog=function(a,b,d,c,e,f,h,l,n){var g=document.createElement("div");g.style.textAlign="center";var k=document.createElement("div");k.style.padding="6px";k.style.overflow="auto";k.style.maxHeight="44px";mxClient.IS_QUIRKS&&(k.style.height="60px");mxUtils.write(k,b);g.appendChild(k);k=document.createElement("div");k.style.textAlign="center";k.style.whiteSpace="nowrap";var m=document.createElement("input");m.setAttribute("type","checkbox");f=mxUtils.button(f||mxResources.get("cancel"), +function(){a.hideDialog();null!=c&&c(m.checked)});f.className="geBtn";null!=l&&(f.innerHTML=l+"
"+f.innerHTML,f.style.paddingBottom="8px",f.style.paddingTop="8px",f.style.height="auto",f.style.width="40%");a.editor.cancelFirst&&k.appendChild(f);e=mxUtils.button(e||mxResources.get("ok"),function(){a.hideDialog();null!=d&&d(m.checked)});k.appendChild(e);null!=h?(e.innerHTML=h+"
"+e.innerHTML+"
",e.style.paddingBottom="8px",e.style.paddingTop="8px",e.style.height="auto",e.className="geBtn", +e.style.width="40%"):e.className="geBtn gePrimaryBtn";a.editor.cancelFirst||k.appendChild(f);g.appendChild(k);n?(k.style.marginTop="10px",k=document.createElement("p"),k.style.marginTop="20px",k.appendChild(m),h=document.createElement("span"),mxUtils.write(h," "+mxResources.get("rememberThisSetting")),k.appendChild(h),g.appendChild(k),mxEvent.addListener(h,"click",function(a){m.checked=!m.checked;mxEvent.consume(a)})):k.style.marginTop="16px";this.container=g},ErrorDialog=function(a,b,d,c,e,f,h,l, +n){n=null!=n?n:!0;var g=document.createElement("div");g.style.textAlign="center";if(null!=b){var k=document.createElement("div");k.style.padding="0px";k.style.margin="0px";k.style.fontSize="18px";k.style.paddingBottom="16px";k.style.marginBottom="16px";k.style.borderBottom="1px solid #c0c0c0";k.style.color="gray";mxUtils.write(k,b);g.appendChild(k)}b=document.createElement("div");b.style.padding="6px";b.innerHTML=d;g.appendChild(b);d=document.createElement("div");d.style.marginTop="16px";d.style.textAlign= +"right";null!=f&&(b=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();f()}),b.className="geBtn",d.appendChild(b),d.style.textAlign="center");var m=mxUtils.button(c,function(){n&&a.hideDialog();null!=e&&e()});m.className="geBtn";d.appendChild(m);null!=h&&(c=mxUtils.button(h,function(){n&&a.hideDialog();null!=l&&l()}),c.className="geBtn gePrimaryBtn",d.appendChild(c));this.init=function(){m.focus()};g.appendChild(d);this.container=g},EmbedDialog=function(a,b,d,c,e){c=document.createElement("div"); var f=/^https?:\/\//.test(b)||/^mailto:\/\//.test(b);mxUtils.write(c,mxResources.get(5E5>b.length?f?"link":"mainEmbedNotice":"preview")+":");mxUtils.br(c);var h=document.createElement("div");h.style.position="absolute";h.style.top="30px";h.style.right="30px";h.style.color="gray";mxUtils.write(h,a.formatFileSize(b.length));c.appendChild(h);var l=document.createElement("textarea");l.setAttribute("autocomplete","off");l.setAttribute("autocorrect","off");l.setAttribute("autocapitalize","off");l.setAttribute("spellcheck", "false");l.style.marginTop="10px";l.style.resize="none";l.style.height="150px";l.style.width="440px";l.style.border="1px solid gray";l.value=mxResources.get("updatingDocument");c.appendChild(l);mxUtils.br(c);this.init=function(){window.setTimeout(function(){5E5>b.length?(l.value=b,l.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?l.select():document.execCommand("selectAll",!1,null)):(l.setAttribute("readonly","true"),l.value=b.substring(0,340)+"... ("+mxResources.get("drawingTooLarge")+ -")")},0)};h=document.createElement("div");h.style.position="absolute";h.style.bottom="36px";h.style.right="32px";var m=null;mxClient.IS_CHROMEAPP&&!f||navigator.standalone||!(f||mxClient.IS_SVG&&(null==document.documentMode||9b.length?"preview":"openInNewWindow"),function(){var c=5E5>b.length?l.value:b;if(null!=e)e(c);else if(f)try{var g=window.open(c);(null==d||0"+encodeURIComponent(mxResources.get("preview"))+''+b+"");k.close()}}),m.className="geBtn",h.appendChild(m));if(!f||7500b.length?"preview":"openInNewWindow"),function(){var c=5E5>b.length?l.value:b;if(null!=e)e(c);else if(f)try{var g=a.openLink(c);null!=g&&(null==d||0"+encodeURIComponent(mxResources.get("preview"))+''+b+"");k.close()}}),n.className="geBtn",h.appendChild(n));if(!f||7500b.length){var k=mxUtils.button("",function(){try{var b="https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(l.value);a.openLink(b)}catch(p){a.handleError({message:p.message||mxResources.get("drawingTooLarge")})}}),g=document.createElement("img");g.setAttribute("src",Editor.facebookImage);g.setAttribute("width","18");g.setAttribute("height", "18");g.setAttribute("border","0");k.appendChild(g);k.setAttribute("title",mxResources.get("facebook")+" ("+a.formatFileSize(51200)+" max)");k.style.verticalAlign="bottom";k.style.paddingTop="4px";k.style.minWidth="46px";k.className="geBtn";h.appendChild(k)}7168>b.length&&(k=mxUtils.button("",function(){try{var b="https://twitter.com/intent/tweet?text="+encodeURIComponent("Check out the diagram I made using @drawio")+"&url="+encodeURIComponent(l.value);a.openLink(b)}catch(p){a.handleError({message:p.message|| mxResources.get("drawingTooLarge")})}}),g=document.createElement("img"),g.setAttribute("src",Editor.tweetImage),g.setAttribute("width","18"),g.setAttribute("height","18"),g.setAttribute("border","0"),g.style.marginBottom="5px",k.appendChild(g),k.setAttribute("title",mxResources.get("twitter")+" ("+a.formatFileSize(7168)+" max)"),k.style.verticalAlign="bottom",k.style.paddingTop="4px",k.style.minWidth="46px",k.className="geBtn",h.appendChild(k))}g=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()}); -h.appendChild(g);k=mxUtils.button(mxResources.get("copy"),function(){l.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?l.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");a.alert(mxResources.get("copiedToClipboard"))});5E5>b.length?mxClient.IS_SF||null!=document.documentMode?g.className="geBtn gePrimaryBtn":(h.appendChild(k),k.className="geBtn gePrimaryBtn",g.className="geBtn"):(h.appendChild(m),g.className="geBtn",m.className="geBtn gePrimaryBtn"); -c.appendChild(h);this.container=c},GoogleSitesDialog=function(a,b){function d(){var a=null!=E.getTitle()?E.getTitle():this.defaultFilename;if(y.checked&&""!=p.value){var b="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(p.value));null!=a&&(b+="&title="+encodeURIComponent(a));0b.length?mxClient.IS_SF||null!=document.documentMode?g.className="geBtn gePrimaryBtn":(h.appendChild(k),k.className="geBtn gePrimaryBtn",g.className="geBtn"):(h.appendChild(n),g.className="geBtn",n.className="geBtn gePrimaryBtn"); +c.appendChild(h);this.container=c},GoogleSitesDialog=function(a,b){function d(){var a=null!=D.getTitle()?D.getTitle():this.defaultFilename;if(z.checked&&""!=p.value){var b="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(p.value));null!=a&&(b+="&title="+encodeURIComponent(a));0a)return String.fromCharCode(48+a);a-=10;if(26>a)return String.fromCharCode(65+a);a-=26;if(26>a)return String.fromCharCode(97+a);a-=26;return 0==a?"-":1==a?"_":"?"},n=function(a,b,c){c1=a>>2;c2=(a&3)<<4|b>>4;c3=(b&15)<<2|c>>6;c4=c&63;r="";r+=k(c1&63);r+=k(c2&63);r+=k(c3&63);return r+=k(c4&63)},f= -new XMLHttpRequest;f.open("GET",d+function(a){r="";for(p=0;pthis.status?(c=new FileReader,c.readAsDataURL(this.response),c.onload=function(c){var d=new Image;d.onload=function(){a.spinner.stop(); +a.photoPicker=b.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.photoPicker.setVisible(!0)}))}),k.className="geBtn",c.appendChild(k))}k=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();b(""!=e.value?new mxImage(mxUtils.trim(e.value),l.value,n.value):null)});k.className="geBtn gePrimaryBtn";c.appendChild(k);a.editor.cancelFirst||c.appendChild(g);d.appendChild(c);this.container=d},ParseDialog=function(a,b){function d(b,c){var d=b.split("\n");if("plantUmlPng"==c||"plantUmlSvg"== +c){var d="plantUmlPng"==c?"https://exp.draw.io/plantuml2/png/":"https://exp.draw.io/plantuml2/svg/",g=a.editor.graph;if(a.spinner.spin(document.body,mxResources.get("inserting"))){var k=function(a){if(10>a)return String.fromCharCode(48+a);a-=10;if(26>a)return String.fromCharCode(65+a);a-=26;if(26>a)return String.fromCharCode(97+a);a-=26;return 0==a?"-":1==a?"_":"?"},m=function(a,b,c){c1=a>>2;c2=(a&3)<<4|b>>4;c3=(b&15)<<2|c>>6;c4=c&63;r="";r+=k(c1&63);r+=k(c2&63);r+=k(c3&63);return r+=k(c4&63)},f= +new XMLHttpRequest;f.open("GET",d+function(a){r="";for(p=0;pthis.status?(c=new FileReader,c.readAsDataURL(this.response),c.onload=function(c){var d=new Image;d.onload=function(){a.spinner.stop(); g.getModel().beginUpdate();try{cell=g.insertVertex(null,null,b,e.x,e.y,d.width,d.height,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a.convertDataUri(c.target.result)+";")}finally{g.getModel().endUpdate()}g.setSelectionCell(cell);g.scrollCellToVisible(g.getSelectionCell())};d.src=c.target.result},c.onerror=function(b){a.handleError(b)}):(a.spinner.stop(),a.handleError(c))};f.onerror=function(b){a.handleError(b)};f.send()}}else if("list"==c){if(0");if(2==B.length){var l=v(B[0]),B=v(B[1]),C=new mxCell("",new mxGeometry);C.edge=!0;l.insertEdge(C,!0);B.insertEdge(C,!1);F.push(C)}}if(0");if(2==B.length){var l=v(B[0]),B=v(B[1]),G=new mxCell("",new mxGeometry);G.edge=!0;l.insertEdge(G,!0);B.insertEdge(G,!1);E.push(G)}}if(0 Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: another authentication Response\n@enduml":"plantUmlSvg"==l.value? "@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: another authentication Response\n@enduml":";Example:\na->b\nb->c\nc->a\n"}var e=a.editor.graph.getFreeInsertPoint(),f=document.createElement("div");f.style.textAlign="right";var h=document.createElement("textarea");h.style.resize="none";h.style.width="100%";h.style.height="354px";h.style.marginBottom="16px";var l=document.createElement("select"), -m=document.createElement("option");m.setAttribute("value","list");m.setAttribute("selected","selected");mxUtils.write(m,mxResources.get("list"));l.appendChild(m);m=document.createElement("option");m.setAttribute("value","diagram");mxUtils.write(m,mxResources.get("diagram"));l.appendChild(m);m=document.createElement("option");m.setAttribute("value","plantUmlSvg");mxUtils.write(m,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");var g=document.createElement("option");g.setAttribute("value", -"plantUmlPng");mxUtils.write(g,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!a.isOffline()&&(l.appendChild(m),l.appendChild(g));var k=c();h.value=k;f.appendChild(h);this.init=function(){h.focus()};Graph.fileSupport&&(h.addEventListener("dragover",function(a){a.stopPropagation();a.preventDefault()},!1),h.addEventListener("drop",function(a){a.stopPropagation();a.preventDefault();if(0=a.getStatus()&&(E.removeAttribute("disabled"),p(k,a.getText(),b),e&&n())}))});mxEvent.addListener(k,"dblclick",function(a){e=!0})}else k.innerHTML='
'+mxResources.get(c)+ -"
",g&&p(k),mxEvent.addListener(k,"click",function(a){p(k)}),mxEvent.addListener(k,"dblclick",function(a){n()});F.appendChild(k)}function t(){function a(){for(var a=!0;b=F.scrollHeight&&(a(),mxEvent.consume(b))});var c=null,d;for(d in C){var k=document.createElement("div"),n=mxResources.get(d),e=C[d];null==n&& -(n=d.substring(0,1).toUpperCase()+d.substring(1));18=a.getStatus()&&(D.removeAttribute("disabled"),p(k,a.getText(),b),e&&m())}))});mxEvent.addListener(k,"dblclick",function(a){e=!0})}else k.innerHTML='
'+mxResources.get(c)+ +"
",g&&p(k),mxEvent.addListener(k,"click",function(a){p(k)}),mxEvent.addListener(k,"dblclick",function(a){m()});E.appendChild(k)}function u(){function a(){for(var a=!0;b=E.scrollHeight&&(a(),mxEvent.consume(b))});var c=null,d;for(d in G){var k=document.createElement("div"),m=mxResources.get(d),e=G[d];null==m&& +(m=d.substring(0,1).toUpperCase()+d.substring(1));18b.lastIndexOf(".")&&0>k){var c=null!=c?c:E.value,n="";c==App.MODE_GOOGLE?n=a.drive.extension:c==App.MODE_GITHUB?n=a.gitHub.extension:c==App.MODE_TRELLO?n=a.trello.extension:c==App.MODE_DROPBOX?n=a.dropbox.extension:c==App.MODE_ONEDRIVE?n=a.oneDrive.extension:c==App.MODE_DEVICE&&(n=".xml");0<=k&&(d=d.substring(0, -k));x.value=d+n}}z(g)})}var v=document.createElement("a");v.style.overflow="hidden";var f=document.createElement("img");f.src=c;f.setAttribute("border","0");f.setAttribute("align","absmiddle");f.style.width="60px";f.style.height="60px";f.style.paddingBottom="6px";v.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";v.className="geBaseButton";v.style.position="relative";v.style.margin="4px";v.style.padding="8px 8px 10px 8px";v.style.whiteSpace="nowrap";v.appendChild(f);mxClient.IS_QUIRKS&&(v.style.cssFloat= -"left",v.style.zoom="1");v.style.color="gray";v.style.fontSize="11px";var q=document.createElement("div");v.appendChild(q);mxUtils.write(q,d);if(null!=k&&null==a[k]){f.style.visibility="hidden";mxUtils.setOpacity(q,10);var p=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});p.spin(v);var l=window.setTimeout(function(){null==a[k]&&(p.stop(),v.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this, -function(){null!=a[k]&&(window.clearTimeout(l),mxUtils.setOpacity(q,100),f.style.visibility="",p.stop(),e())}))}else e();y.appendChild(v);++A==n&&(mxUtils.br(y),A=0)}function z(b){var c=x.value;if(null==b||null!=c&&0b.lastIndexOf(".")&&0>k){var c=null!=c?c:D.value,m="";c==App.MODE_GOOGLE?m=a.drive.extension:c==App.MODE_GITHUB?m=a.gitHub.extension:c==App.MODE_TRELLO?m=a.trello.extension:c==App.MODE_DROPBOX?m=a.dropbox.extension:c==App.MODE_ONEDRIVE?m=a.oneDrive.extension:c==App.MODE_DEVICE&&(m=".xml");0<=k&&(d=d.substring(0, +k));y.value=d+m}}A(g)})}var v=document.createElement("a");v.style.overflow="hidden";var f=document.createElement("img");f.src=c;f.setAttribute("border","0");f.setAttribute("align","absmiddle");f.style.width="60px";f.style.height="60px";f.style.paddingBottom="6px";v.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";v.className="geBaseButton";v.style.position="relative";v.style.margin="4px";v.style.padding="8px 8px 10px 8px";v.style.whiteSpace="nowrap";v.appendChild(f);mxClient.IS_QUIRKS&&(v.style.cssFloat= +"left",v.style.zoom="1");v.style.color="gray";v.style.fontSize="11px";var q=document.createElement("div");v.appendChild(q);mxUtils.write(q,d);if(null!=k&&null==a[k]){f.style.visibility="hidden";mxUtils.setOpacity(q,10);var p=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});p.spin(v);var t=window.setTimeout(function(){null==a[k]&&(p.stop(),v.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this, +function(){null!=a[k]&&(window.clearTimeout(t),mxUtils.setOpacity(q,100),f.style.visibility="",p.stop(),e())}))}else e();z.appendChild(v);++x==m&&(mxUtils.br(z),x=0)}function A(b){var c=y.value;if(null==b||null!=c&&0JGraph Ltd.
All Rights Reserved.';b.appendChild(d);mxEvent.addListener(b,"click",function(b){"A"!=mxEvent.getSource(b).nodeName&&a.hideDialog()});this.container= b},FeedbackDialog=function(a){var b=document.createElement("div"),d=document.createElement("div");mxUtils.write(d,mxResources.get("sendYourFeedbackToDrawIo"));d.style.fontSize="18px";d.style.marginBottom="18px";b.appendChild(d);d=document.createElement("div");mxUtils.write(d,mxResources.get("yourEmailAddress")+" ("+mxResources.get("required")+")");b.appendChild(d);var c=document.createElement("input");c.setAttribute("type","text");c.style.marginTop="6px";c.style.width="600px";var e=mxUtils.button(mxResources.get("sendMessage"), -function(){var b=(h.checked?"\nDiagram:\n"+a.getFileData():"")+"\nBrowser:\n"+navigator.userAgent;b.length>FeedbackDialog.maxAttachmentSize?a.alert(mxResources.get("drawingTooLarge")):(a.hideDialog(),a.spinner.spin(document.body)&&mxUtils.post(null!=FeedbackDialog.feedbackUrl?FeedbackDialog.feedbackUrl:"/email","email="+encodeURIComponent(c.value)+"&version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&body="+encodeURIComponent("Feedback:\n"+m.value+b), +function(){var b=(h.checked?"\nDiagram:\n"+a.getFileData():"")+"\nBrowser:\n"+navigator.userAgent;b.length>FeedbackDialog.maxAttachmentSize?a.alert(mxResources.get("drawingTooLarge")):(a.hideDialog(),a.spinner.spin(document.body)&&mxUtils.post(null!=FeedbackDialog.feedbackUrl?FeedbackDialog.feedbackUrl:"/email","email="+encodeURIComponent(c.value)+"&version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&body="+encodeURIComponent("Feedback:\n"+n.value+b), function(b){a.spinner.stop();200<=b.getStatus()&&299>=b.getStatus()?a.alert(mxResources.get("feedbackSent")):a.alert(mxResources.get("errorSendingFeedback"))},function(){a.spinner.stop();a.alert(mxResources.get("errorSendingFeedback"))}))});e.className="geBtn gePrimaryBtn";e.setAttribute("disabled","disabled");var f=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;mxEvent.addListener(c,"change", function(){0':(f.innerHTML="
",mxUtils.write(f,mxResources.get("noPreview"))), -null!=h&&(h.style.backgroundColor=""),h=c,h.style.backgroundColor="#ebf2f9",null!=a&&mxEvent.consume(a)};mxEvent.addListener(c,"click",n);mxEvent.addListener(c,"dblclick",function(a){k.checked=!k.checked;mxEvent.consume(a)});l.push(function(){return k.checked?b.id:null});0==g&&0==d&&n()})(b.entries[d])})(d[g]);c.style.padding="30px";c.appendChild(b);c.appendChild(e);c.appendChild(f);d=document.createElement("div");d.className="geDialogFooter";d.style.position="absolute";d.style.paddingRight="16px"; -d.style.color="gray";d.style.left="0px";d.style.right="0px";d.style.bottom="0px";d.style.height="60px";d.style.lineHeight="52px";mxClient.IS_QUIRKS&&(d.style.width=b.style.width,d.style.paddingTop="12px");var k=document.createElement("input");k.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)b=document.createElement("span"),b.style.paddingRight="20px",b.appendChild(k),mxUtils.write(b," "+mxResources.get("rememberThisSetting")),k.checked=!0,k.defaultChecked=!0,mxEvent.addListener(b, -"click",function(a){mxEvent.getSource(a)!=k&&(k.checked=!k.checked,mxEvent.consume(a))}),mxClient.IS_QUIRKS&&(b.style.position="relative",b.style.top="-6px"),d.appendChild(b);b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});b.className="geBtn";var n=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();for(var b=[],c=0;cmxUtils.indexOf(e,n[a])&&e.push(n[a]);b()}},mxResources.get("enterValue")+" ("+mxResources.get("url")+")");a.showDialog(c.container,300,80,!0,!0);c.init()});f.className="geBtn";var h=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});h.className="geBtn";var l=mxUtils.button(mxResources.get("apply"), -function(){mxSettings.setPlugins(e);mxSettings.save();a.hideDialog();a.alert(mxResources.get("restartForChangeRequired"))});l.className="geBtn gePrimaryBtn";var m=document.createElement("div");m.style.marginTop="14px";m.style.textAlign="right";a.editor.cancelFirst?(m.appendChild(h),m.appendChild(f),m.appendChild(l)):(m.appendChild(f),m.appendChild(l),m.appendChild(h));d.appendChild(m);this.container=d},CropImageDialog=function(a,b,d){var c=document.createElement("div"),e=document.createElement("table"), -f=document.createElement("tbody"),h=document.createElement("tr"),l=document.createElement("td");l.style.whiteSpace="nowrap";l.setAttribute("colspan","2");mxUtils.write(l,mxResources.get("loading")+"...");h.appendChild(l);f.appendChild(h);var h=document.createElement("tr"),m=document.createElement("td"),g=document.createElement("td");e.style.paddingLeft="6px";mxUtils.write(m,mxResources.get("left")+":");var k=document.createElement("input");k.setAttribute("type","text");k.style.width="100px";k.value= -"0";this.init=function(){k.focus();k.select()};g.appendChild(k);h.appendChild(m);h.appendChild(g);f.appendChild(h);h=document.createElement("tr");m=document.createElement("td");g=document.createElement("td");mxUtils.write(m,mxResources.get("top")+":");var n=document.createElement("input");n.setAttribute("type","text");n.style.width="100px";n.value="0";g.appendChild(n);h.appendChild(m);h.appendChild(g);f.appendChild(h);h=document.createElement("tr");m=document.createElement("td");g=document.createElement("td"); -mxUtils.write(m,mxResources.get("right")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.width="100px";p.value="0";g.appendChild(p);h.appendChild(m);h.appendChild(g);f.appendChild(h);h=document.createElement("tr");m=document.createElement("td");g=document.createElement("td");mxUtils.write(m,mxResources.get("bottom")+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.width="100px";u.value="0";g.appendChild(u);h.appendChild(m);h.appendChild(g); -f.appendChild(h);h=document.createElement("tr");m=document.createElement("td");g=document.createElement("td");mxUtils.write(m,mxResources.get("circle")+":");h.appendChild(m);var t=document.createElement("input");t.setAttribute("type","checkbox");g.appendChild(t);h.appendChild(g);f.appendChild(h);e.appendChild(f);c.appendChild(e);var e=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()}),q=new Image,z=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var b=document.createElement("canvas"), -c=b.getContext("2d"),g=q.width,e=q.height,f=parseInt(k.value),h=parseInt(n.value),g=Math.max(1,g-f-parseInt(p.value)),e=Math.max(1,e-h-parseInt(u.value));b.width=g;b.height=e;t.checked&&(c.fillStyle="#000000",c.arc(g/2,e/2,Math.min(g/2,e/2),0,2*Math.PI),c.fill(),c.globalCompositeOperation="source-in");c.drawImage(q,f,h,g,e,0,0,g,e);d(b.toDataURL())});z.setAttribute("disabled","disabled");q.onload=function(){z.removeAttribute("disabled");l.innerHTML="";mxUtils.write(l,mxResources.get("width")+": "+ -q.width+" "+mxResources.get("height")+": "+q.height)};q.src=b;mxEvent.addListener(c,"keypress",function(a){13==a.keyCode&&z.click()});b=document.createElement("div");b.style.marginTop="20px";b.style.textAlign="right";a.editor.cancelFirst?(b.appendChild(e),b.appendChild(z)):(b.appendChild(z),b.appendChild(e));c.appendChild(b);this.container=c},EditGeometryDialog=function(a,b){var d=a.editor.graph,c=1==b.length?d.getCellGeometry(b[0]):null,e=document.createElement("div"),f=document.createElement("table"), -h=document.createElement("tbody"),l=document.createElement("tr"),m=document.createElement("td"),g=document.createElement("td");f.style.paddingLeft="6px";mxUtils.write(m,mxResources.get("left")+":");var k=document.createElement("input");k.setAttribute("type","text");k.style.width="100px";k.value=null!=c?c.x:"";this.init=function(){k.focus();k.select()};g.appendChild(k);l.appendChild(m);l.appendChild(g);h.appendChild(l);l=document.createElement("tr");m=document.createElement("td");g=document.createElement("td"); -mxUtils.write(m,mxResources.get("top")+":");var n=document.createElement("input");n.setAttribute("type","text");n.style.width="100px";n.value=null!=c?c.y:"";g.appendChild(n);l.appendChild(m);l.appendChild(g);h.appendChild(l);l=document.createElement("tr");m=document.createElement("td");g=document.createElement("td");mxUtils.write(m,mxResources.get("width")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.width="100px";p.value=null!=c?c.width:"";g.appendChild(p);l.appendChild(m); -l.appendChild(g);h.appendChild(l);l=document.createElement("tr");m=document.createElement("td");g=document.createElement("td");mxUtils.write(m,mxResources.get("height")+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.width="100px";u.value=null!=c?c.height:"";g.appendChild(u);l.appendChild(m);l.appendChild(g);h.appendChild(l);l=document.createElement("tr");m=document.createElement("td");g=document.createElement("td");mxUtils.write(m,mxResources.get("rotation")+":"); -var t=document.createElement("input");t.setAttribute("type","text");t.style.width="100px";t.value=1==b.length?mxUtils.getValue(d.getCellStyle(b[0]),mxConstants.STYLE_ROTATION,0):"";g.appendChild(t);l.appendChild(m);l.appendChild(g);h.appendChild(l);f.appendChild(h);e.appendChild(f);var c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()}),q=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();d.getModel().beginUpdate();try{for(var c=0;ca.maxImageSize||e>a.maxImageSize){var H=Math.min(1,Math.min(a.maxImageSize/Math.max(1, -n)),a.maxImageSize/Math.max(1,e));n*=H;e*=H}D>A?(A=Math.round(100*A/D),D=100):(D=Math.round(100*D/A),A=100);var G=document.createElement("div");G.setAttribute("draggable","true");G.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";G.style.position="relative";G.style.cursor="move";mxUtils.setPrefixedStyle(G.style,"transition","transform .1s ease-in-out");if(null!=b){var E=document.createElement("img");E.setAttribute("src",x.convert(b));E.style.width=D+"px";E.style.height=A+"px";E.style.margin= -"10px";E.style.paddingBottom=Math.floor((100-A)/2)+"px";E.style.paddingLeft=Math.floor((100-D)/2)+"px";G.appendChild(E)}else if(null!=f){var F=a.stringToCells(a.editor.graph.decompress(f.xml));0z?w-1:w,0,k.splice(z,1)[0]),u.insertBefore(u.children[z],u.children[w])):(k.push(k.splice(z,1)[0]),u.appendChild(u.children[z]));else if(0=c.status&&(l(c.responseText,d,g,k,n,e,f,"fixed",mxEvent.isAltDown(b)?null:f.substring(0,f.lastIndexOf(".")).replace(/_/g," ")),u.scrollTop=u.scrollHeight))})):(l(c,d,g,k,n,e,f,"fixed",mxEvent.isAltDown(b)?null:f.substring(0,f.lastIndexOf(".")).replace(/_/g, -" ")),u.scrollTop=u.scrollHeight)}};mxEvent.addListener(u,"dragover",m);mxEvent.addListener(u,"drop",g);mxEvent.addListener(t,"dragover",m);mxEvent.addListener(t,"drop",g);d.appendChild(u);c=document.createElement("div");c.style.textAlign="right";c.style.marginTop="20px";b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});b.setAttribute("id","btnCancel");b.className="geBtn";a.editor.cancelFirst&&c.appendChild(b);n=mxUtils.button(mxResources.get("export"),function(){var b=a.createLibraryDataFromImages(k), -c=p.value;/(\.xml)$/i.test(c)||(c+=".xml");a.isLocalFileSave()?a.saveLocalFile(b,c,"text/xml",null,null,!0):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(c)+"&format=xml&xml="+encodeURIComponent(b))).simulate(document,"_blank")});n.setAttribute("id","btnDownload");n.className="geBtn";c.appendChild(n);var E=document.createElement("input");E.setAttribute("multiple","multiple");E.setAttribute("type","file");null==document.documentMode&&(mxEvent.addListener(E,"change",function(b){y=!1;a.importFiles(E.files, -0,0,a.maxImageSize,function(a,c,d,g,k,n,e,f,v){A(b)(a,c,d,g,k,n,e,f,v);E.value=""});u.scrollTop=u.scrollHeight}),n=mxUtils.button(mxResources.get("import"),function(){null!=v&&(v(),v=null);E.click()}),n.setAttribute("id","btnAddImage"),n.className="geBtn",c.appendChild(n));n=mxUtils.button(mxResources.get("addImageUrl"),function(){null!=v&&(v(),v=null);a.showImageDialog(mxResources.get("addImageUrl"),"",function(a,b,c){y=!1;if(null!=a){if("data:image/"==a.substring(0,11)){var d=a.indexOf(",");0':(f.innerHTML="
",mxUtils.write(f,mxResources.get("noPreview"))),null!=h&&(h.style.backgroundColor=""),h=c,h.style.backgroundColor="#ebf2f9",null!=a&&mxEvent.consume(a)};mxEvent.addListener(c,"click",m);mxEvent.addListener(c,"dblclick",function(a){k.checked=!k.checked;mxEvent.consume(a)});l.push(function(){return k.checked?b.id:null});0==g&&0==d&&m()})(b.entries[d])})(d[g]);c.style.padding="30px";c.appendChild(b);c.appendChild(e);c.appendChild(f);d=document.createElement("div");d.className= +"geDialogFooter";d.style.position="absolute";d.style.paddingRight="16px";d.style.color="gray";d.style.left="0px";d.style.right="0px";d.style.bottom="0px";d.style.height="60px";d.style.lineHeight="52px";mxClient.IS_QUIRKS&&(d.style.width=b.style.width,d.style.paddingTop="12px");var k=document.createElement("input");k.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)b=document.createElement("span"),b.style.paddingRight="20px",b.appendChild(k),mxUtils.write(b," "+mxResources.get("rememberThisSetting")), +k.checked=!0,k.defaultChecked=!0,mxEvent.addListener(b,"click",function(a){mxEvent.getSource(a)!=k&&(k.checked=!k.checked,mxEvent.consume(a))}),mxClient.IS_QUIRKS&&(b.style.position="relative",b.style.top="-6px"),d.appendChild(b);b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});b.className="geBtn";var m=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();for(var b=[],c=0;cmxUtils.indexOf(e,m[a])&&e.push(m[a]);b()}},mxResources.get("enterValue")+" ("+mxResources.get("url")+")");a.showDialog(c.container,300,80,!0,!0);c.init()});f.className="geBtn";var h=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()}); +h.className="geBtn";var l=mxUtils.button(mxResources.get("apply"),function(){mxSettings.setPlugins(e);mxSettings.save();a.hideDialog();a.alert(mxResources.get("restartForChangeRequired"))});l.className="geBtn gePrimaryBtn";var n=document.createElement("div");n.style.marginTop="14px";n.style.textAlign="right";a.editor.cancelFirst?(n.appendChild(h),n.appendChild(f),n.appendChild(l)):(n.appendChild(f),n.appendChild(l),n.appendChild(h));d.appendChild(n);this.container=d},CropImageDialog=function(a,b, +d){var c=document.createElement("div"),e=document.createElement("table"),f=document.createElement("tbody"),h=document.createElement("tr"),l=document.createElement("td");l.style.whiteSpace="nowrap";l.setAttribute("colspan","2");mxUtils.write(l,mxResources.get("loading")+"...");h.appendChild(l);f.appendChild(h);var h=document.createElement("tr"),n=document.createElement("td"),g=document.createElement("td");e.style.paddingLeft="6px";mxUtils.write(n,mxResources.get("left")+":");var k=document.createElement("input"); +k.setAttribute("type","text");k.style.width="100px";k.value="0";this.init=function(){k.focus();k.select()};g.appendChild(k);h.appendChild(n);h.appendChild(g);f.appendChild(h);h=document.createElement("tr");n=document.createElement("td");g=document.createElement("td");mxUtils.write(n,mxResources.get("top")+":");var m=document.createElement("input");m.setAttribute("type","text");m.style.width="100px";m.value="0";g.appendChild(m);h.appendChild(n);h.appendChild(g);f.appendChild(h);h=document.createElement("tr"); +n=document.createElement("td");g=document.createElement("td");mxUtils.write(n,mxResources.get("right")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.width="100px";p.value="0";g.appendChild(p);h.appendChild(n);h.appendChild(g);f.appendChild(h);h=document.createElement("tr");n=document.createElement("td");g=document.createElement("td");mxUtils.write(n,mxResources.get("bottom")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.width="100px"; +t.value="0";g.appendChild(t);h.appendChild(n);h.appendChild(g);f.appendChild(h);h=document.createElement("tr");n=document.createElement("td");g=document.createElement("td");mxUtils.write(n,mxResources.get("circle")+":");h.appendChild(n);var u=document.createElement("input");u.setAttribute("type","checkbox");g.appendChild(u);h.appendChild(g);f.appendChild(h);e.appendChild(f);c.appendChild(e);var e=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()}),q=new Image,A=mxUtils.button(mxResources.get("apply"), +function(){a.hideDialog();var b=document.createElement("canvas"),c=b.getContext("2d"),g=q.width,e=q.height,f=parseInt(k.value),h=parseInt(m.value),g=Math.max(1,g-f-parseInt(p.value)),e=Math.max(1,e-h-parseInt(t.value));b.width=g;b.height=e;u.checked&&(c.fillStyle="#000000",c.arc(g/2,e/2,Math.min(g/2,e/2),0,2*Math.PI),c.fill(),c.globalCompositeOperation="source-in");c.drawImage(q,f,h,g,e,0,0,g,e);d(b.toDataURL())});A.setAttribute("disabled","disabled");q.onload=function(){A.removeAttribute("disabled"); +l.innerHTML="";mxUtils.write(l,mxResources.get("width")+": "+q.width+" "+mxResources.get("height")+": "+q.height)};q.src=b;mxEvent.addListener(c,"keypress",function(a){13==a.keyCode&&A.click()});b=document.createElement("div");b.style.marginTop="20px";b.style.textAlign="right";a.editor.cancelFirst?(b.appendChild(e),b.appendChild(A)):(b.appendChild(A),b.appendChild(e));c.appendChild(b);this.container=c},EditGeometryDialog=function(a,b){var d=a.editor.graph,c=1==b.length?d.getCellGeometry(b[0]):null, +e=document.createElement("div"),f=document.createElement("table"),h=document.createElement("tbody"),l=document.createElement("tr"),n=document.createElement("td"),g=document.createElement("td");f.style.paddingLeft="6px";mxUtils.write(n,mxResources.get("left")+":");var k=document.createElement("input");k.setAttribute("type","text");k.style.width="100px";k.value=null!=c?c.x:"";this.init=function(){k.focus();k.select()};g.appendChild(k);l.appendChild(n);l.appendChild(g);h.appendChild(l);l=document.createElement("tr"); +n=document.createElement("td");g=document.createElement("td");mxUtils.write(n,mxResources.get("top")+":");var m=document.createElement("input");m.setAttribute("type","text");m.style.width="100px";m.value=null!=c?c.y:"";g.appendChild(m);l.appendChild(n);l.appendChild(g);h.appendChild(l);l=document.createElement("tr");n=document.createElement("td");g=document.createElement("td");mxUtils.write(n,mxResources.get("width")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.width= +"100px";p.value=null!=c?c.width:"";g.appendChild(p);l.appendChild(n);l.appendChild(g);h.appendChild(l);l=document.createElement("tr");n=document.createElement("td");g=document.createElement("td");mxUtils.write(n,mxResources.get("height")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.width="100px";t.value=null!=c?c.height:"";g.appendChild(t);l.appendChild(n);l.appendChild(g);h.appendChild(l);l=document.createElement("tr");n=document.createElement("td");g=document.createElement("td"); +mxUtils.write(n,mxResources.get("rotation")+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.width="100px";u.value=1==b.length?mxUtils.getValue(d.getCellStyle(b[0]),mxConstants.STYLE_ROTATION,0):"";g.appendChild(u);l.appendChild(n);l.appendChild(g);h.appendChild(l);f.appendChild(h);e.appendChild(f);var c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()}),q=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();d.getModel().beginUpdate(); +try{for(var c=0;ca.maxImageSize||e>a.maxImageSize){var H=Math.min(1,Math.min(a.maxImageSize/ +Math.max(1,m)),a.maxImageSize/Math.max(1,e));m*=H;e*=H}x>C?(C=Math.round(100*C/x),x=100):(x=Math.round(100*x/C),C=100);var F=document.createElement("div");F.setAttribute("draggable","true");F.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";F.style.position="relative";F.style.cursor="move";mxUtils.setPrefixedStyle(F.style,"transition","transform .1s ease-in-out");if(null!=b){var D=document.createElement("img");D.setAttribute("src",y.convert(b));D.style.width=x+"px";D.style.height=C+"px";D.style.margin= +"10px";D.style.paddingBottom=Math.floor((100-C)/2)+"px";D.style.paddingLeft=Math.floor((100-x)/2)+"px";F.appendChild(D)}else if(null!=f){var E=a.stringToCells(a.editor.graph.decompress(f.xml));0A?w-1:w,0,k.splice(A,1)[0]),t.insertBefore(t.children[A],t.children[w])):(k.push(k.splice(A,1)[0]),t.appendChild(t.children[A]));else if(0=c.status&&(l(c.responseText,d,g,k,m,e,f,"fixed",mxEvent.isAltDown(b)?null:f.substring(0,f.lastIndexOf(".")).replace(/_/g," ")),t.scrollTop=t.scrollHeight))})):(l(c,d,g,k,m,e,f,"fixed",mxEvent.isAltDown(b)?null:f.substring(0,f.lastIndexOf(".")).replace(/_/g, +" ")),t.scrollTop=t.scrollHeight)}};mxEvent.addListener(t,"dragover",n);mxEvent.addListener(t,"drop",g);mxEvent.addListener(u,"dragover",n);mxEvent.addListener(u,"drop",g);d.appendChild(t);c=document.createElement("div");c.style.textAlign="right";c.style.marginTop="20px";b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});b.setAttribute("id","btnCancel");b.className="geBtn";a.editor.cancelFirst&&c.appendChild(b);m=mxUtils.button(mxResources.get("export"),function(){var b=a.createLibraryDataFromImages(k), +c=p.value;/(\.xml)$/i.test(c)||(c+=".xml");a.isLocalFileSave()?a.saveLocalFile(b,c,"text/xml",null,null,!0):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(c)+"&format=xml&xml="+encodeURIComponent(b))).simulate(document,"_blank")});m.setAttribute("id","btnDownload");m.className="geBtn";c.appendChild(m);var D=document.createElement("input");D.setAttribute("multiple","multiple");D.setAttribute("type","file");null==document.documentMode&&(mxEvent.addListener(D,"change",function(b){z=!1;a.importFiles(D.files, +0,0,a.maxImageSize,function(a,c,d,g,k,m,e,f,v){x(b)(a,c,d,g,k,m,e,f,v);D.value=""});t.scrollTop=t.scrollHeight}),m=mxUtils.button(mxResources.get("import"),function(){null!=v&&(v(),v=null);D.click()}),m.setAttribute("id","btnAddImage"),m.className="geBtn",c.appendChild(m));m=mxUtils.button(mxResources.get("addImageUrl"),function(){null!=v&&(v(),v=null);a.showImageDialog(mxResources.get("addImageUrl"),"",function(a,b,c){z=!1;if(null!=a){if("data:image/"==a.substring(0,11)){var d=a.indexOf(",");0document.documentMode)?b.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+a.fill+"', EndColorStr='"+a.gradient+"', GradientType=0)":b.style.backgroundImage="linear-gradient("+a.fill+" 0px,"+a.gradient+" 100%)":b.style.backgroundColor=a.fill,b.style.border="1px solid "+a.stroke):(b.style.backgroundColor="#ffffff",b.style.border= "1px solid #000000");g.appendChild(b)}g.innerHTML="";for(var c=0;c'),b.writeln(a.editor.fontCss),b.writeln(""))};if("undefined"!==typeof MathJax){var m=c.renderPage;c.renderPage= -function(a,b,c,d,g,k){var n=m.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=!0:n.className="geDisableMathJax";return n}}c.open(null,null,g,!0)}else{f=b.background;if(null==f||""==f||f==mxConstants.NONE)f="#ffffff";c.backgroundColor=f;c.autoOrigin=v;c.appendGraph(b,h,n,e,g,!0)}return c}var d=parseInt(S.value)/100;isNaN(d)&&(d=1,S.value="100 %");var d=.75*d,k=u.value,n=q.value,e=!p.checked,h=null;e&&(e=k==f&&n==f);if(!e&&null!=a.pages&&a.pages.length){var v=0,e=a.pages.length-1;p.checked|| -(v=parseInt(k)-1,e=parseInt(n)-1);for(var l=v;l<=e;l++){var m=a.pages[l],k=m==a.currentPage?g:null;if(null==k){var k=a.createTemporaryGraph(g.getStylesheet()),n=!0,v=!1,x=null,t=null;null==m.viewState&&null==m.mapping&&null==m.root&&a.updatePageRoot(m);null!=m.viewState?(n=m.viewState.pageVisible,v=m.viewState.mathEnabled,x=m.viewState.background,t=m.viewState.backgroundImage):null!=m.mapping&&null!=m.mapping.diagramMap&&(v="0"!=m.mapping.diagramMap.get("mathEnabled"),x=m.mapping.diagramMap.get("background"), -t=m.mapping.diagramMap.get("backgroundImage"),t=null!=t&&0'),e.writeln("MathJax.Hub.Config({"),e.writeln('messageStyle: "none",'),e.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],'),e.writeln('extensions: ["tex2jax.js", "mml2jax.js", "asciimath2jax.js"],'),e.writeln("TeX: {"),e.writeln('extensions: ["AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js"]'),e.writeln("},"),e.writeln("tex2jax: {"),e.writeln('\tignoreClass: "geDisableMathJax"'),e.writeln("},"), -e.writeln("asciimath2jax: {"),e.writeln('\tignoreClass: "geDisableMathJax"'),e.writeln("}"),e.writeln("});"),b&&(e.writeln("MathJax.Hub.Queue(function () {"),e.writeln("window.print();"),e.writeln("});")),e.writeln("\x3c/script>"),e.writeln('