diff --git a/ChangeLog b/ChangeLog index c169a191..ca0fd108 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +21-JUN-2018: 8.8.6 + +- Improves detection of gliffy macro in conf cloud +- Fixes inconsistent menus + 21-JUN-2018: 8.8.5 - Fixes delete property in data dialog diff --git a/VERSION b/VERSION index 850513d2..9c832b10 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -8.8.5 \ No newline at end of file +8.8.6 \ No newline at end of file diff --git a/src/main/webapp/cache.manifest b/src/main/webapp/cache.manifest index d3ea7a16..eb30b1d9 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! -# 06/21/2018 04:02 PM +# 06/21/2018 06:20 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 c2f3dc67..0294b35d 100644 --- a/src/main/webapp/js/app.min.js +++ b/src/main/webapp/js/app.min.js @@ -6894,10 +6894,10 @@ StorageFile.prototype.isRenamable=function(){return!0};StorageFile.prototype.sav StorageFile.prototype.saveFile=function(a,b,c,d){if(this.isEditable()){var e=mxUtils.bind(this,function(){this.isRenamable()&&(this.title=a);try{this.ui.setLocalData(this.title,this.getData(),mxUtils.bind(this,function(){this.setModified(!1);this.contentChanged();null!=c&&c()}))}catch(g){null!=d&&d(g)}});this.isRenamable()&&"."==a.charAt(0)&&null!=d?d({message:mxResources.get("invalidName")}):this.ui.getLocalData(a,mxUtils.bind(this,function(b){this.isRenamable()&&this.getTitle()!=a&&null!=b?this.ui.confirm(mxResources.get("replaceIt", [a]),e,d):e()}))}else null!=c&&c()};StorageFile.prototype.rename=function(a,b,c){var d=this.getTitle();d!=a?this.ui.getLocalData(a,mxUtils.bind(this,function(e){var g=mxUtils.bind(this,function(){this.title=a;this.hasSameExtension(d,a)||this.setData(this.ui.getFileData());this.saveFile(a,!1,mxUtils.bind(this,function(){this.ui.removeLocalData(d,b)}),c)});null!=e?this.ui.confirm(mxResources.get("replaceIt",[a]),g,c):g()})):b()}; StorageFile.prototype.open=function(){DrawioFile.prototype.open.apply(this,arguments);this.saveFile(this.getTitle())};StorageFile.prototype.destroy=function(){DrawioFile.prototype.destroy.apply(this,arguments);null!=this.storageListener&&(mxEvent.removeListener(window,"storage",this.storageListener),this.storageListener=null)};StorageLibrary=function(a,b,c){StorageFile.call(this,a,b,c)};mxUtils.extend(StorageLibrary,StorageFile);StorageLibrary.prototype.isAutosave=function(){return!0};StorageLibrary.prototype.saveAs=function(a,b,c){this.saveFile(a,!1,b,c)};StorageLibrary.prototype.getHash=function(){return"L"+encodeURIComponent(this.title)};StorageLibrary.prototype.getTitle=function(){return".scratchpad"==this.title?mxResources.get("scratchpad"):this.title}; -StorageLibrary.prototype.isRenamable=function(a,b,c){return".scratchpad"!=this.title};StorageLibrary.prototype.open=function(){};UrlLibrary=function(a,b,c){StorageFile.call(this,a,b,c);a=c;b=a.lastIndexOf("/");0<=b&&(a=a.substring(b+1));this.fname=a};mxUtils.extend(UrlLibrary,StorageFile);UrlLibrary.prototype.getHash=function(){return"U"+encodeURIComponent(this.title)};UrlLibrary.prototype.getTitle=function(){return this.fname};UrlLibrary.prototype.isAutosave=function(){return!1};UrlLibrary.prototype.isEditable=function(a,b,c){return!1};UrlLibrary.prototype.saveAs=function(a,b,c){};UrlLibrary.prototype.open=function(){};var StorageDialog=function(a,b,c){function d(d,e,g,p,A,t){function w(){mxEvent.addListener(v,"click",null!=t?t:function(){g!=App.MODE_GOOGLE||a.isDriveDomain()?g==App.MODE_GOOGLE&&a.spinner.spin(document.body,mxResources.get("authorizing"))?a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();a.setMode(g,f.checked);b()})):(a.setMode(g,f.checked),b()):window.location.hostname=DriveClient.prototype.newAppHostname})}var v=document.createElement("a");v.style.overflow="hidden";v.style.display= +StorageLibrary.prototype.isRenamable=function(a,b,c){return".scratchpad"!=this.title};StorageLibrary.prototype.open=function(){};UrlLibrary=function(a,b,c){StorageFile.call(this,a,b,c);a=c;b=a.lastIndexOf("/");0<=b&&(a=a.substring(b+1));this.fname=a};mxUtils.extend(UrlLibrary,StorageFile);UrlLibrary.prototype.getHash=function(){return"U"+encodeURIComponent(this.title)};UrlLibrary.prototype.getTitle=function(){return this.fname};UrlLibrary.prototype.isAutosave=function(){return!1};UrlLibrary.prototype.isEditable=function(a,b,c){return!1};UrlLibrary.prototype.saveAs=function(a,b,c){};UrlLibrary.prototype.open=function(){};var StorageDialog=function(a,b,c){function d(d,e,g,p,A,t){function x(){mxEvent.addListener(v,"click",null!=t?t:function(){g!=App.MODE_GOOGLE||a.isDriveDomain()?g==App.MODE_GOOGLE&&a.spinner.spin(document.body,mxResources.get("authorizing"))?a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();a.setMode(g,f.checked);b()})):(a.setMode(g,f.checked),b()):window.location.hostname=DriveClient.prototype.newAppHostname})}var v=document.createElement("a");v.style.overflow="hidden";v.style.display= mxClient.IS_QUIRKS?"inline":"inline-block";v.className="geBaseButton";v.style.boxSizing="border-box";v.style.fontSize="11px";v.style.position="relative";v.style.margin="4px";v.style.padding="8px 10px 12px 10px";v.style.width="88px";v.style.height="100px";v.style.whiteSpace="nowrap";v.setAttribute("title",e);mxClient.IS_QUIRKS&&(v.style.cssFloat="left",v.style.zoom="1");var u=document.createElement("div");u.style.textOverflow="ellipsis";u.style.overflow="hidden";if(null!=d){var q=document.createElement("img"); q.setAttribute("src",d);q.setAttribute("border","0");q.setAttribute("align","absmiddle");q.style.width="60px";q.style.height="60px";q.style.paddingBottom="6px";v.appendChild(q)}else u.style.paddingTop="5px",u.style.whiteSpace="normal",mxClient.IS_IOS?(v.style.padding="0px 10px 20px 10px",v.style.top="6px"):mxClient.IS_FF&&(u.style.paddingTop="0px",u.style.marginTop="-2px");v.appendChild(u);mxUtils.write(u,e);if(null!=A)for(d=0;d=c&&(mxUtils.br(l),k=0)}c=null!=c?c:2;var e=document.createElement("div");e.style.textAlign="center";e.style.whiteSpace="nowrap";e.style.paddingTop="0px";e.style.paddingBottom="20px";var g=a.addLanguageMenu(e,!0);null!=g&&(g.style.bottom=parseInt("28px")-2+"px");if(!a.isOffline()&&1b.length?mxClient.IS_SF||null!=document.documentMode? f.className="geBtn gePrimaryBtn":(h.appendChild(k),k.className="geBtn gePrimaryBtn",f.className="geBtn"):(h.appendChild(l),f.className="geBtn",l.className="geBtn gePrimaryBtn");d.appendChild(h);this.container=d};EmbedDialog.showPreviewOption=!0; -var GoogleSitesDialog=function(a,b){function c(){var a=null!=x.getTitle()?x.getTitle():this.defaultFilename;if(F.checked&&""!=t.value){var b="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(t.value));null!=a&&(b+="&title="+encodeURIComponent(a));0");2<=I.length&&(u=l(I[0]),m=l(I[I.length-1]),I=new mxCell(2");2<=H.length&&(u=l(H[0]),m=l(H[H.length-1]),H=new mxCell(2 Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: another authentication Response\n@enduml": "plantUmlSvg"==m.value||"plantUmlTxt"==m.value?"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: another authentication Response\n@enduml":";Example:\na->b\nb->edge label->c\nc->a\n"}var g=a.editor.graph.getFreeInsertPoint();b=document.createElement("div");b.style.textAlign="right";var h=document.createElement("textarea");h.style.resize="none";h.style.width="100%";h.style.height= @@ -6980,37 +6980,37 @@ l=[];a.editor.graph.getModel().beginUpdate();try{l=a.editor.graph.importCells(f. l=document.createElement("option");l.setAttribute("value","diagram");mxUtils.write(l,mxResources.get("diagram"));"plantUml"!=c&&m.appendChild(l);l=document.createElement("option");l.setAttribute("value","plantUmlSvg");mxUtils.write(l,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");"plantUml"==c&&l.setAttribute("selected","selected");var f=document.createElement("option");f.setAttribute("value","plantUmlPng");mxUtils.write(f,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+ ")");var k=document.createElement("option");k.setAttribute("value","plantUmlTxt");mxUtils.write(k,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!a.isOffline()&&"plantUml"==c&&(m.appendChild(l),m.appendChild(f),m.appendChild(k));var n=e();h.value=n;b.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()&&(C(n,a.getText(),b),g&&w())}))});mxEvent.addListener(n,"dblclick",function(a){g=!0})}else n.innerHTML='
'+ -mxResources.get(c)+"
",f&&C(n),null!=e?mxEvent.addListener(n,"click",e):(mxEvent.addListener(n,"click",function(a){C(n)}),mxEvent.addListener(n,"dblclick",function(a){w()}));H.appendChild(n)}function A(){mxEvent.addListener(H,"scroll",function(a){H.scrollTop+H.clientHeight>=H.scrollHeight&&(v(),mxEvent.consume(a))});var a=null,b;for(b in V){var c=document.createElement("div"),d=mxResources.get(b),k=V[b];null==d&&(d=b.substring(0,1).toUpperCase()+b.substring(1));18b.lastIndexOf(".")&&0>k){var c=null!=c?c:x.value, -p="";c==App.MODE_GOOGLE?p=a.drive.extension:c==App.MODE_GITHUB?p=a.gitHub.extension:c==App.MODE_TRELLO?p=a.trello.extension:c==App.MODE_DROPBOX?p=a.dropbox.extension:c==App.MODE_ONEDRIVE?p=a.oneDrive.extension:c==App.MODE_DEVICE&&(p=".xml");0<=k&&(d=d.substring(0,k));A.value=d+p}}w(f)})}var e=document.createElement("a");e.style.overflow="hidden";var g=document.createElement("img");g.src=c;g.setAttribute("border","0");g.setAttribute("align","absmiddle");g.style.width="60px";g.style.height="60px";g.style.paddingBottom= +n.className="geTemplate";n.style.height=R+"px";n.style.width=T+"px";null!=d&&0=a.getStatus()&&(C(n,a.getText(),b),g&&x())}))});mxEvent.addListener(n,"dblclick",function(a){g=!0})}else n.innerHTML='
'+ +mxResources.get(c)+"
",f&&C(n),null!=e?mxEvent.addListener(n,"click",e):(mxEvent.addListener(n,"click",function(a){C(n)}),mxEvent.addListener(n,"dblclick",function(a){x()}));G.appendChild(n)}function A(){mxEvent.addListener(G,"scroll",function(a){G.scrollTop+G.clientHeight>=G.scrollHeight&&(v(),mxEvent.consume(a))});var a=null,b;for(b in V){var c=document.createElement("div"),d=mxResources.get(b),k=V[b];null==d&&(d=b.substring(0,1).toUpperCase()+b.substring(1));18b.lastIndexOf(".")&&0>k){var c=null!=c?c:w.value, +p="";c==App.MODE_GOOGLE?p=a.drive.extension:c==App.MODE_GITHUB?p=a.gitHub.extension:c==App.MODE_TRELLO?p=a.trello.extension:c==App.MODE_DROPBOX?p=a.dropbox.extension:c==App.MODE_ONEDRIVE?p=a.oneDrive.extension:c==App.MODE_DEVICE&&(p=".xml");0<=k&&(d=d.substring(0,k));A.value=d+p}}x(f)})}var e=document.createElement("a");e.style.overflow="hidden";var g=document.createElement("img");g.src=c;g.setAttribute("border","0");g.setAttribute("align","absmiddle");g.style.width="60px";g.style.height="60px";g.style.paddingBottom= "6px";e.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";e.className="geBaseButton";e.style.position="relative";e.style.margin="4px";e.style.padding="8px 8px 10px 8px";e.style.whiteSpace="nowrap";e.appendChild(g);mxClient.IS_QUIRKS&&(e.style.cssFloat="left",e.style.zoom="1");e.style.color="gray";e.style.fontSize="11px";var t=document.createElement("div");e.appendChild(t);mxUtils.write(t,d);if(null!=k&&null==a[k]){g.style.visibility="hidden";mxUtils.setOpacity(t,10);var u=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});u.spin(e);var v=window.setTimeout(function(){null==a[k]&&(u.stop(),e.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[k]&&(window.clearTimeout(v),mxUtils.setOpacity(t,100),g.style.visibility="",u.stop(),p())}))}else p();F.appendChild(e);++B==n&&(mxUtils.br(F),B=0)}function w(b){var d=A.value;if(null==b||null!=d&&0JGraph Ltd.
All Rights Reserved.'; b.appendChild(c);mxEvent.addListener(b,"click",function(b){"A"!=mxEvent.getSource(b).nodeName&&a.hideDialog()});this.container=b},FeedbackDialog=function(a){var b=document.createElement("div"),c=document.createElement("div");mxUtils.write(c,mxResources.get("sendYourFeedbackToDrawIo"));c.style.fontSize="18px";c.style.marginBottom="18px";b.appendChild(c);c=document.createElement("div");mxUtils.write(c,mxResources.get("yourEmailAddress")+" ("+mxResources.get("required")+")");b.appendChild(c);var d=document.createElement("input"); d.setAttribute("type","text");d.style.marginTop="6px";d.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(d.value)+"&version="+encodeURIComponent(EditorUi.VERSION)+ @@ -7048,36 +7048,36 @@ mxEvent.addListener(d,"change",function(){0':(g.innerHTML="
",mxUtils.write(g,mxResources.get("noPreview"))),null!=h&&(h.style.backgroundColor=""),h=c,h.style.backgroundColor="dark"==uiTheme?"#505759":"#ebf2f9",null!=a&&mxEvent.consume(a)};mxEvent.addListener(c,"click",p);mxEvent.addListener(c,"dblclick",function(a){k.checked=!k.checked;mxEvent.consume(a)});m.push(function(){return k.checked?b.id:null});0==f&&0==d&&p()})(b.entries[d])})(c[f]); d.style.padding="30px";d.appendChild(b);d.appendChild(e);d.appendChild(g);c=document.createElement("div");c.className="geDialogFooter";c.style.position="absolute";c.style.paddingRight="16px";c.style.color="gray";c.style.left="0px";c.style.right="0px";c.style.bottom="0px";c.style.height="60px";c.style.lineHeight="52px";mxClient.IS_QUIRKS&&(c.style.width=b.style.width,c.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"),c.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;ca.maxImageSize||n>a.maxImageSize){var x=Math.min(1,Math.min(a.maxImageSize/Math.max(1,e)),a.maxImageSize/Math.max(1,n));e*=x;n*=x}B>z?(z=Math.round(100* -z/B),B=100):(B=Math.round(100*B/z),z=100);var E=document.createElement("div");E.setAttribute("draggable","true");E.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";E.style.position="relative";E.style.cursor="move";mxUtils.setPrefixedStyle(E.style,"transition","transform .1s ease-in-out");if(null!=b){var y=document.createElement("img");y.setAttribute("src",A.convert(b));y.style.width=B+"px";y.style.height=z+"px";y.style.margin="10px";y.style.paddingBottom=Math.floor((100-z)/2)+"px";y.style.paddingLeft= -Math.floor((100-B)/2)+"px";E.appendChild(y)}else if(null!=g){var G=a.stringToCells(a.editor.graph.decompress(g.xml));0w?C-1:C,0,k.splice(w,1)[0]),u.insertBefore(u.children[w],u.children[C])):(k.push(k.splice(w,1)[0]),u.appendChild(u.children[w]));else if(0a.maxImageSize||n>a.maxImageSize){var J=Math.min(1,Math.min(a.maxImageSize/Math.max(1,e)),a.maxImageSize/Math.max(1,n));e*=J;n*=J}B>z?(z=Math.round(100* +z/B),B=100):(B=Math.round(100*B/z),z=100);var w=document.createElement("div");w.setAttribute("draggable","true");w.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";w.style.position="relative";w.style.cursor="move";mxUtils.setPrefixedStyle(w.style,"transition","transform .1s ease-in-out");if(null!=b){var y=document.createElement("img");y.setAttribute("src",A.convert(b));y.style.width=B+"px";y.style.height=z+"px";y.style.margin="10px";y.style.paddingBottom=Math.floor((100-z)/2)+"px";y.style.paddingLeft= +Math.floor((100-B)/2)+"px";w.appendChild(y)}else if(null!=g){var F=a.stringToCells(a.editor.graph.decompress(g.xml));0x?C-1:C,0,k.splice(x,1)[0]),u.insertBefore(u.children[x],u.children[C])):(k.push(k.splice(x,1)[0]),u.appendChild(u.children[x]));else if(0= c.status&&(m(c.responseText,d,f,k,e,p,n,"fixed",mxEvent.isAltDown(b)?null:n.substring(0,n.lastIndexOf(".")).replace(/_/g," ")),u.scrollTop=u.scrollHeight))})):(m(c,d,f,k,e,p,n,"fixed",mxEvent.isAltDown(b)?null:n.substring(0,n.lastIndexOf(".")).replace(/_/g," ")),u.scrollTop=u.scrollHeight)}};mxEvent.addListener(u,"dragover",l);mxEvent.addListener(u,"drop",f);mxEvent.addListener(q,"dragover",l);mxEvent.addListener(q,"drop",f);c.appendChild(u);d=document.createElement("div");d.style.textAlign="right"; d.style.marginTop="20px";b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});b.setAttribute("id","btnCancel");b.className="geBtn";a.editor.cancelFirst&&d.appendChild(b);n=mxUtils.button(mxResources.get("export"),function(){var b=a.createLibraryDataFromImages(k),c=t.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";d.appendChild(n);var x=document.createElement("input");x.setAttribute("multiple","multiple");x.setAttribute("type","file");null==document.documentMode&&(mxEvent.addListener(x,"change",function(b){F=!1;a.importFiles(x.files,0,0,a.maxImageSize,function(a,c,d,f,k,e,p,n,g){B(b)(a,c,d,f,k,e,p,n,g);x.value=""});u.scrollTop=u.scrollHeight}),n=mxUtils.button(mxResources.get("import"),function(){null!=p&&(p(),p=null);x.click()}),n.setAttribute("id", -"btnAddImage"),n.className="geBtn",d.appendChild(n));n=mxUtils.button(mxResources.get("addImageUrl"),function(){null!=p&&(p(),p=null);a.showImageDialog(mxResources.get("addImageUrl"),"",function(a,b,c){F=!1;if(null!=a){if("data:image/"==a.substring(0,11)){var d=a.indexOf(",");0'),b.writeln(a.editor.fontCss),b.writeln(""))};if("undefined"!==typeof MathJax){var m=c.renderPage;c.renderPage=function(a,b,c,d,f,k){var e=m.apply(this,arguments);this.graph.mathEnabled? this.mathEnabled=!0:e.className="geDisableMathJax";return e}}c.open(null,null,f,!0)}else{p=b.background;if(null==p||""==p||p==mxConstants.NONE)p="#ffffff";c.backgroundColor=p;c.autoOrigin=h;c.appendGraph(b,g,e,n,f,!0)}return c}var d=parseInt(U.value)/100;isNaN(d)&&(d=1,U.value="100 %");var d=.75*d,k=m.value,e=v.value,n=!t.checked,p=null;n&&(n=k==g&&e==g);if(!n&&null!=a.pages&&a.pages.length){var h=0,n=a.pages.length-1;t.checked||(h=parseInt(k)-1,n=parseInt(e)-1);for(var u=h;u<=n;u++){var q=a.pages[u], k=q==a.currentPage?f:null;if(null==k){var k=a.createTemporaryGraph(f.getStylesheet()),e=!0,h=!1,A=null,l=null;null==q.viewState&&null==q.mapping&&null==q.root&&a.updatePageRoot(q);null!=q.viewState?(e=q.viewState.pageVisible,h=q.viewState.mathEnabled,A=q.viewState.background,l=q.viewState.backgroundImage):null!=q.mapping&&null!=q.mapping.diagramMap&&(h="0"!=q.mapping.diagramMap.get("mathEnabled"),A=q.mapping.diagramMap.get("background"),l=q.mapping.diagramMap.get("backgroundImage"),l=null!=l&&0'; +(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,c,d){d.ui=a.ui;return c};a.afterDecode=function(a,c,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="8.8.6";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.enableLogging=/.*\.draw\.io$/.test(window.location.hostname)&&"support.draw.io"!=window.location.hostname;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.prototype.emptyDiagramXml=''; EditorUi.prototype.emptyLibraryXml="[]";EditorUi.prototype.mode=null;EditorUi.prototype.sidebarFooterHeight=36;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;"; EditorUi.prototype.svgBrokenImage=Graph.createSvgImage(10,10,'');EditorUi.prototype.crossOriginImages=!mxClient.IS_IE;EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.printPdfExport= !1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;EditorUi.prototype.closableScratchpad=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var a=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!a.getContext||!a.getContext("2d"))}catch(u){}try{var b=document.createElement("canvas"),c=new Image;c.onload=function(){try{b.getContext("2d").drawImage(c,0,0);var a=b.toDataURL("image/png");EditorUi.prototype.useCanvasForExport= @@ -7253,16 +7253,16 @@ mxUtils.parseXml(a).documentElement:null;a=null!=b?this.editor.extractGraphModel 0))];b=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=b&&(this.fileNode=b.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(b.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(b);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root)};EditorUi.prototype.getBaseFilename=function(a){var b=this.getCurrentFile(),b=null!=b&&null!= b.getTitle()?b.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(b)||/(\.html)$/i.test(b)||/(\.svg)$/i.test(b)||/(\.png)$/i.test(b))b=b.substring(0,b.lastIndexOf("."));!a&&null!=this.pages&&1\n\n'+mxUtils.getXml(a))})))}else k=f+".svg",t=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();m(a)}),d)}}catch(E){this.handleError(E)}}; +this.editor.graph.pageVisible;null!=g&&(this.editor.graph.pageVisible=g);var e=this.createDownloadRequest(b,a,d,c,h);this.editor.graph.pageVisible=f;return e}catch(z){this.handleError(z)}}));else{var m=null,t=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(k,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(m)}))});if("svg"==a){var u=this.editor.graph.background;if(h||u== +mxConstants.NONE)u=null;var v=this.editor.graph.getSvg(u,null,null,null,null,d);c&&this.editor.graph.addSvgShadow(v);this.convertImages(v,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();t('\n\n'+mxUtils.getXml(a))})))}else k=f+".svg",m=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();t(a)}),d)}}catch(J){this.handleError(J)}}; EditorUi.prototype.createDownloadRequest=function(a,b,c,d,e){var f=this.editor.graph.getGraphBounds();c=this.getFileData(!0,null,null,null,c,"xmlpng"!=b);var k="";if(f.width*f.height>MAX_AREA||c.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};f="0";if("xmlpng"==b&&(f="1",b="png",null!=this.pages&&null!=this.currentPage))for(var n=0;n=a.getStatus()?(this.updateDiagram(a.getText()),g()):this.handleError({message:mxResources.get("error")+" "+a.getStatus()}))}),mxUtils.bind(this,function(a){this.handleError(a)}))}),g=mxUtils.bind(this,function(){window.clearTimeout(k);k=window.setTimeout(n,e)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){g();n()}));g();n()}null!=b&&b()});if(null!=a.url){var e=a.url;/^https?:\/\//.test(e)&&!this.isCorsEnabledForUrl(e)&& (e=PROXY_URL+"?url="+encodeURIComponent(a.url));this.loadUrl(e,mxUtils.bind(this,function(a){f(a)}),mxUtils.bind(this,function(a){null!=c&&c(a)}))}else f(a.data)};EditorUi.prototype.updateDiagram=function(a){function b(a){var b=new mxCellOverlay(a.image||d.warningImage,a.tooltip,a.align,a.valign,a.offset);b.addListener(mxEvent.CLICK,function(b,c){editorUi.alert(a.tooltip)});return b}var c=null;if(null!=a&&0'+mxUtils.htmlEntities(mxResources.get("readOnly"))+ @@ -7279,19 +7279,19 @@ EditorUi.prototype.getLibraryStorageHint=function(a){return""};EditorUi.prototyp "aspect=fixed;");return this.sidebar.createVertexTemplate(c+"image="+b,a.w,a.h,"",a.title||"",!1,!1,!0)})):null!=a.xml&&null!=a.title&&this.sidebar.addEntry(a.title,mxUtils.bind(this,function(){var b=this.stringToCells(this.editor.graph.decompress(a.xml));return this.sidebar.createVertexTemplateFromCells(b,a.w,a.h,a.title||"",!0,!1,!0)}))})(b[k]);c=null!=c&&0=a.status?v(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge": -"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):v(c,d)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(n,"dragleave",function(a){null!=f?f.style.border="3px dotted lightGray":(n.style.border="3px solid transparent",n.style.cursor="");a.stopPropagation();a.preventDefault()}));h=h.cloneNode(!1);h.setAttribute("src",Editor.editImage);h.setAttribute("title",mxResources.get("edit"));p.insertBefore(h,p.firstChild);mxEvent.addListener(h,"click",E);mxEvent.addListener(n, -"dblclick",function(a){mxEvent.getSource(a)==n&&E(a)});c=h.cloneNode(!1);c.setAttribute("src",Editor.plusImage);c.setAttribute("title",mxResources.get("add"));p.insertBefore(c,p.firstChild);mxEvent.addListener(c,"click",I);this.isOffline()||".scratchpad"!=a.title||null==EditorUi.scratchpadHelpLink||(c=document.createElement("span"),c.setAttribute("title",mxResources.get("help")),c.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;",mxUtils.write(c,"?"),mxEvent.addGestureListeners(c, +this.convertDataUri(c),c=[new mxCell("",new mxGeometry(0,0,p,h),c)],c[0].vertex=!0,D(c,new mxRectangle(0,0,p,h),a,mxEvent.isAltDown(a)?null:m.substring(0,m.lastIndexOf(".")).replace(/_/g," ")),null!=f&&null!=f.parentNode&&0=a.status?q(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge": +"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):q(c,d)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(n,"dragleave",function(a){null!=f?f.style.border="3px dotted lightGray":(n.style.border="3px solid transparent",n.style.cursor="");a.stopPropagation();a.preventDefault()}));h=h.cloneNode(!1);h.setAttribute("src",Editor.editImage);h.setAttribute("title",mxResources.get("edit"));p.insertBefore(h,p.firstChild);mxEvent.addListener(h,"click",J);mxEvent.addListener(n, +"dblclick",function(a){mxEvent.getSource(a)==n&&J(a)});c=h.cloneNode(!1);c.setAttribute("src",Editor.plusImage);c.setAttribute("title",mxResources.get("add"));p.insertBefore(c,p.firstChild);mxEvent.addListener(c,"click",H);this.isOffline()||".scratchpad"!=a.title||null==EditorUi.scratchpadHelpLink||(c=document.createElement("span"),c.setAttribute("title",mxResources.get("help")),c.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;",mxUtils.write(c,"?"),mxEvent.addGestureListeners(c, mxUtils.bind(this,function(a){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(a)})),p.insertBefore(c,p.firstChild))}g.appendChild(p);g.style.paddingRight=18*p.childNodes.length+"px"}};"1"==urlParams.offline||EditorUi.isElectronApp?EditorUi.prototype.footerHeight=4:("1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64),EditorUi.prototype.footerHeight=760<=screen.width&&240<=screen.height?46:0,EditorUi.prototype.createFooter=function(){var a=document.getElementById("geFooter"); if(null!=a){a.style.visibility="visible";var b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("src",Dialog.prototype.closeImage);b.setAttribute("title",mxResources.get("hide"));a.appendChild(b);mxClient.IS_QUIRKS&&(b.style.position="relative",b.style.styleFloat="right",b.style.top="-30px",b.style.left="164px",b.style.cursor="pointer");mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.hideFooter()}))}return a});EditorUi.initTheme=function(){"atlas"==uiTheme? (mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground=mxClient.IS_QUIRKS?"none":"linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38,EditorUi.prototype.hsplitPosition=188,Sidebar.prototype.thumbWidth=46,Sidebar.prototype.thumbHeight=46,Sidebar.prototype.thumbPadding= @@ -7303,7 +7303,7 @@ Editor.checkmarkImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAM a.style.position="absolute";a.style.overflow="hidden";a.style.borderWidth="3px";var b=document.createElement("a");b.setAttribute("href","javascript:void(0);");b.className="geTitle";b.style.height="100%";b.style.paddingTop="9px";mxUtils.write(b,mxResources.get("moreShapes")+"...");mxEvent.addListener(b,"click",mxUtils.bind(this,function(a){this.actions.get("shapes").funct();mxEvent.consume(a)}));a.appendChild(b);return a};EditorUi.prototype.handleError=function(a,b,c){var d=null!=this.spinner&&null!= this.spinner.pause?this.spinner.pause():function(){},f=null!=a&&null!=a.error?a.error:a;if(null!=f||null!=b){a=mxUtils.htmlEntities(mxResources.get("unknownError"));var e=mxResources.get("ok"),k=null;b=null!=b?b:mxResources.get("error");if(null!=f)if(null!=f.retry&&(e=mxResources.get("cancel"),k=function(){d();f.retry()}),"undefined"!=typeof gapi&&"undefined"!=typeof gapi.drive&&"undefined"!=typeof gapi.drive.realtime&&f.type==gapi.drive.realtime.ErrorType.FORBIDDEN)a=mxUtils.htmlEntities(mxResources.get("forbidden")); else if(404==f.code||404==f.status||"undefined"!=typeof gapi&&"undefined"!=typeof gapi.drive&&"undefined"!=typeof gapi.drive.realtime&&f.type==gapi.drive.realtime.ErrorType.NOT_FOUND){a=mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied"));var g=window.location.hash;null!=g&&"#G"==g.substring(0,2)&&(g=g.substring(2),a+=' '+mxUtils.htmlEntities(mxResources.get("tryOpeningViaThisPage"))+"")}else f.code==App.ERROR_TIMEOUT?a= -mxUtils.htmlEntities(mxResources.get("timeout")):f.code==App.ERROR_BUSY?a=mxUtils.htmlEntities(mxResources.get("busy")):null!=f.message?a=mxUtils.htmlEntities(f.message):null!=f.response&&null!=f.response.error&&(a=mxUtils.htmlEntities(f.response.error));this.showError(b,a,e,c,k)}else null!=c&&c()};EditorUi.prototype.showError=function(a,b,c,d,e,g,h,m,l,p,A,F){a=new ErrorDialog(this,a,b,c||mxResources.get("ok"),d,e,g,h,F,m,l);this.showDialog(a.container,p||340,A||150,!0,!1);a.init()};EditorUi.prototype.alert= +mxUtils.htmlEntities(mxResources.get("timeout")):f.code==App.ERROR_BUSY?a=mxUtils.htmlEntities(mxResources.get("busy")):null!=f.message?a=mxUtils.htmlEntities(f.message):null!=f.response&&null!=f.response.error&&(a=mxUtils.htmlEntities(f.response.error));this.showError(b,a,e,c,k)}else null!=c&&c()};EditorUi.prototype.showError=function(a,b,c,d,e,g,h,m,l,p,A,E){a=new ErrorDialog(this,a,b,c||mxResources.get("ok"),d,e,g,h,E,m,l);this.showDialog(a.container,p||340,A||150,!0,!1);a.init()};EditorUi.prototype.alert= function(a,b){var c=new ErrorDialog(this,null,a,mxResources.get("ok"),b);this.showDialog(c.container,340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(a,b,c,d,e){var f=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){};this.showDialog((new ConfirmDialog(this,a,function(){f();null!=b&&b()},function(){f();null!=c&&c()},d,e)).container,340,90,!0,!1)};EditorUi.prototype.setCurrentFile=function(a){this.currentFile=a};EditorUi.prototype.getCurrentFile=function(){return this.currentFile}; EditorUi.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||!this.editor.graph.mathEnabled&&this.useCanvasForExport};EditorUi.prototype.createSvgDataUri=function(a){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(a)))};EditorUi.prototype.createImageDataUri=function(a,b,c){var d=a.toDataURL("image/"+c);if(6>=d.length||d==a.cloneNode(!1).toDataURL("image/"+c))throw{message:"Invalid image"};null!=b&&(d=this.writeGraphModelToPng(d,"zTXt","mxGraphModel",atob(this.editor.graph.compress(b)))); return d};EditorUi.prototype.saveCanvas=function(a,b,c){var d="jpeg"==c?"jpg":c,f=this.getBaseFilename()+"."+d;a=this.createImageDataUri(a,b,c);this.saveData(f,d,a.substring(a.lastIndexOf(",")+1),"image/"+c,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode&&!mxClient.IS_QUIRKS||this.isOfflineApp()||mxClient.IS_IOS}; @@ -7311,7 +7311,7 @@ EditorUi.prototype.doSaveLocalFile=function(a,b,c,d,e){if(window.Blob&&navigator "380px",this.showDialog(b.container,620,460,!0,!0),b.init(),document.execCommand("selectall",!1,null);else{var f=document.createElement("a"),k=!mxClient.IS_SF&&0>navigator.userAgent.indexOf("PaleMoon/")&&"undefined"!==typeof f.download;if(mxClient.IS_GC)var g=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./),k=65==(g?parseInt(g[2],10):!1)?!1:k;if(k||this.isOffline()){f.href=URL.createObjectURL(d?this.base64ToBlob(a,c):new Blob([a],{type:c}));k?f.download=b:f.setAttribute("target","_blank");document.body.appendChild(f); try{window.setTimeout(function(){URL.revokeObjectURL(f.href)},0),f.click(),f.parentNode.removeChild(f)}catch(C){}}else this.createEchoRequest(a,b,c,d,e).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,c,d,e,g){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=c?"&mime="+c:"")+(null!=e?"&format="+e:"")+(null!=g?"&base64="+g:"")+(null!=b?"&filename="+encodeURIComponent(b):"")+(d?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b= b||"";for(var c=atob(a),d=c.length,f=Math.ceil(d/1024),e=Array(f),k=0;ke)?3:4,a,c,d);this.showDialog(b.container,420,e==(mxClient.IS_IOS?0:1)?160:4"+a+""):d.document.write(''),d.document.close())}else d=window.open("data:"+b+(c?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))),null==d&&mxUtils.popup(a,!0)};var b=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.addChromelessToolbarItems=function(a){if(this.isExportToCanvas()){this.exportDialog=null;var c=a(mxUtils.bind(this,function(a){var b=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",b);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog), this.exportDialog=null)});if(null!=this.exportDialog)b.apply(this);else{this.exportDialog=document.createElement("div");var d=c.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily="Helvetica,Arial";this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width="50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding= @@ -7338,21 +7338,21 @@ mxUtils.htmlEntities(JSON.stringify(f))+'">';a=null!=a?"&fetch="+encodeURI mxUtils.write(f,mxResources.get("html"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";e.appendChild(f);var k=document.createElement("div");k.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var g=document.createElement("input");g.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";g.setAttribute("value","url");g.setAttribute("type","radio");g.setAttribute("name","type-embedhtmldialog");f=g.cloneNode(!0);f.setAttribute("value", "copy");k.appendChild(f);var n=document.createElement("span");mxUtils.write(n,mxResources.get("includeCopyOfMyDiagram"));k.appendChild(n);mxUtils.br(k);k.appendChild(g);n=document.createElement("span");mxUtils.write(n,mxResources.get("publicDiagramUrl"));k.appendChild(n);var p=this.getCurrentFile();null==c&&null!=p&&p.constructor==window.DriveFile&&(n=document.createElement("a"),n.style.paddingLeft="12px",n.style.color="gray",n.setAttribute("href","javascript:void(0);"),mxUtils.write(n,mxResources.get("share")), k.appendChild(n),mxEvent.addListener(n,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(p.getId())})));f.setAttribute("checked","checked");null==c&&g.setAttribute("disabled","disabled");e.appendChild(k);var h=this.addLinkSection(e),m=this.addCheckbox(e,mxResources.get("zoom"),!0,null,!0);mxUtils.write(e,":");var l=document.createElement("input");l.setAttribute("type","text");l.style.marginRight="16px";l.style.width="60px";l.style.marginLeft="4px";l.style.marginRight= -"12px";l.value="100%";e.appendChild(l);var t=this.addCheckbox(e,mxResources.get("fit"),!0),k=null!=this.pages&&1\n\n')+mxUtils.getXml(a))}));else return(d?"":'\n\n')+ -mxUtils.getXml(b)};EditorUi.prototype.exportImage=function(a,b,c,d,e,g,h,m,l){l=null!=l?l:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var f=this.editor.graph.isSelectionEmpty();c=null!=c?c:f;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();try{this.saveCanvas(a,e?this.getFileData(!0,null,null,null,c,m):null,l)}catch(F){"Invalid image"==F.message?this.downloadFile(l):this.handleError(F)}}),null, +mxUtils.getXml(b)};EditorUi.prototype.exportImage=function(a,b,c,d,e,g,h,m,l){l=null!=l?l:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var f=this.editor.graph.isSelectionEmpty();c=null!=c?c:f;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();try{this.saveCanvas(a,e?this.getFileData(!0,null,null,null,c,m):null,l)}catch(E){"Invalid image"==E.message?this.downloadFile(l):this.handleError(E)}}),null, this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,c,a||1,b,d,null,null,g,h)}catch(A){this.spinner.stop(),this.handleError(A)}}};EditorUi.prototype.loadFonts=function(a){if(null!=this.editor.fontCss&&null==this.editor.resolvedFontCss){var b=function(a){return a.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")},c=this.editor.fontCss.split("url("),d=0,e={},f=mxUtils.bind(this,function(){if(0==d){for(var f=[c[0]],k=1;k=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=f.status)try{this.doImportVisio(f.response,b,c)}catch(w){c(w)}else c({})});f.send(e)}else try{this.doImportVisio(a,b,c)}catch(w){c(w)}});this.doImportVisio||this.loadingExtensions||this.isOffline()?e():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",e))};EditorUi.prototype.exportVisio=function(){var a=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams()}catch(k){this.handleError(k)}}); +"blob";f.onreadystatechange=mxUtils.bind(this,function(){if(4==f.readyState)if(200<=f.status&&299>=f.status)try{this.doImportVisio(f.response,b,c)}catch(x){c(x)}else c({})});f.send(e)}else try{this.doImportVisio(a,b,c)}catch(x){c(x)}});this.doImportVisio||this.loadingExtensions||this.isOffline()?e():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",e))};EditorUi.prototype.exportVisio=function(){var a=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams()}catch(k){this.handleError(k)}}); "undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline()?a():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",a))};EditorUi.prototype.importLucidChart=function(a,b,c,d,e){var f=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.pasteLucidChart)try{this.insertLucidChart(a,b,c,d,e)}catch(v){this.handleError(v)}finally{null!=e&&e()}});this.pasteLucidChart||this.loadingExtensions||this.isOffline()?window.setTimeout(f,0):(this.loadingExtensions=!0,"1"==urlParams.dev? mxscript("js/diagramly/Extensions.js",f):mxscript("js/extensions.min.js",f))};EditorUi.prototype.insertLucidChart=function(a,b,c,d,e){e=JSON.parse(a);a=[];if(null!=e.state){e=JSON.parse(e.state);for(var f in e.Pages)a.push(e.Pages[f]);a.sort(function(a,b){return a.Properties.Orderb.Properties.Order?1:0})}else a.push(e);if(0=a.status&&this.editor.graph.setSelectionCells(this.insertTextAt(a.responseText, @@ -7397,15 +7397,15 @@ A){p=null!=p?p:!0;var f=!1,k=null,n=mxUtils.bind(this,function(a){var b=null;nul k.snap(d)),k=[k.insertVertex(null,null,"",c,d,e,g,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";")])):/(\.*=a.status?n(a.responseText):null!=m&&m(null))}),h)):/(\.vsd)($|\?)/i.test(h)||(k=this.insertTextAt(this.validateFileData(a),c,d,!0,null,p));f||null==m||m(k);return k};EditorUi.prototype.base64Encode=function(a){for(var b="",c=0,d=a.length,e,f,g;c> 2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4);b+="==";break}f=a.charCodeAt(c++);if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(f&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&15)<<2);b+="=";break}g=a.charCodeAt(c++);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>> -2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(f&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&15)<<2|(g&192)>>6);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g&63)}return b};EditorUi.prototype.importFiles=function(a,b,c,d,e,g,h,m,l,p,A,F){b=null!=b?b:0;c=null!=c?c:0;d=null!=d?d:this.maxImageSize;p=null!=p?p:this.maxImageBytes;var f=null!=b&&null!=c,k=!0,n=!1;if(!mxClient.IS_CHROMEAPP&& -null!=a)for(var t=A||this.resampleThreshold,q=0;qt){n=!0;break}var v=mxUtils.bind(this,function(){var n=this.editor.graph,l=n.gridSize;e=null!=e?e:mxUtils.bind(this,function(a,b,c,d,e,g,k,h,p){return null!=a&&">4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&15)<<2|(g&192)>>6);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g&63)}return b};EditorUi.prototype.importFiles=function(a,b,c,d,e,g,h,m,l,p,A,E){b=null!=b?b:0;c=null!=c?c:0;d=null!=d?d:this.maxImageSize;p=null!=p?p:this.maxImageBytes;var f=null!=b&&null!=c,k=!0,n=!1;if(!mxClient.IS_CHROMEAPP&& +null!=a)for(var t=A||this.resampleThreshold,q=0;qt){n=!0;break}var v=mxUtils.bind(this,function(){var n=this.editor.graph,l=n.gridSize;e=null!=e?e:mxUtils.bind(this,function(a,b,c,d,e,g,k,h,p){return null!=a&&"','',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,!0,!0):e(!1,d)};EditorUi.prototype.parseFile=function(a,b,c){c=null!=c?c:a.name;var d=new FormData;d.append("format","xml");d.append("upfile",a,c);var e=new XMLHttpRequest;e.open("POST",OPEN_URL);e.onreadystatechange=function(){b(e)};e.send(d)};EditorUi.prototype.isResampleImage=function(a,b){b=null!=b?b:this.resampleThreshold;return a.length> b};EditorUi.prototype.resizeImage=function(a,b,c,d,e,g){e=null!=e?e:this.maxImageSize;var f=Math.max(1,a.width),k=Math.max(1,a.height);if(d&&this.isResampleImage(b,g))try{var h=Math.max(f/e,k/e);if(1c;c++)for(var d=c,e=0;8>e;e++)d=1 b,c,d,e){function f(a,b){var c=h;h+=b;return a.substring(c,h)}function g(a){a=f(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function k(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var h=0;if(f(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=e&&e();else if(f(a,4),"IHDR"!=f(a,4))null!=e&&e();else{f(a,17);e=a.substring(0,h);do{var p= g(a);if("IDAT"==f(a,4)){e=a.substring(0,h-8);c=c+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+d;d=4294967295;d=this.updateCRC(d,b,0,4);d=this.updateCRC(d,c,0,c.length);e+=k(c.length)+b+c+k(d^4294967295);e+=a.substring(h-8,a.length);break}e+=a.substring(h-8,h-4+p);f(a,p);f(a,4)}while(p);return"data:image/png;base64,"+(window.btoa?btoa(e):Base64.encode(e,!0))}};EditorUi.prototype.extractGraphModelFromPng=function(a){var b=null;try{var c=a.substring(a.indexOf(",")+1),d=window.atob&&!mxClient.IS_SF? atob(c):Base64.decode(c,!0);EditorUi.parsePng(d,mxUtils.bind(this,function(a,c,e){a=d.substring(a+8,a+8+e);"zTXt"==c?(e=a.indexOf(String.fromCharCode(0)),"mxGraphModel"==a.substring(0,e)&&(a=this.editor.graph.bytesToString(pako.inflateRaw(a.substring(e+2))).replace(/\+/g," "),null!=a&&0this.resampleThreshold?this.confirmImageResize(function(a){m=a;n()},mxEvent.isControlDown(a)): @@ -7464,36 +7464,36 @@ null!=this.menus.findWindow&&this.menus.findWindow.window.setVisible(!1))};Edito this.lightboxFit():this.showLayersDialog(),this.chromelessResize&&this.chromelessResize()):(this.editor.graph.model.clear(),this.editor.fireEvent(new mxEventObject("resetGraphView")));this.editor.undoManager.clear();this.editor.modified=null!=c?c:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))};EditorUi.prototype.showLayersDialog=function(){1=a.getStatus()?q("data:image/png;base64,"+a.getText()):v(null)}),mxUtils.bind(this,function(){v(null)}))}}else{null!=p.xml&&0=a.getStatus()?t("data:image/png;base64,"+a.getText()):v(null)}),mxUtils.bind(this,function(){v(null)}))}}else{null!=p.xml&&0mxUtils.indexOf(d,a)};this.executeLayout(function(){da.execute(y.getDefaultParent());ka()},!0,D);D=null}else if("horizontaltree"==L||"verticaltree"==L||"auto"==L&&aa.length==2*d.length-1&&1==U.length){y.view.validate();var ga=new mxCompactTreeLayout(y,"horizontaltree"==L);ga.levelDistance=x;ga.edgeRouting=!1;ga.resetEdges= -!1;this.executeLayout(function(){ga.execute(y.getDefaultParent(),0d.length){y.view.validate(); -var ea=new mxFastOrganicLayout(y);ea.forceConstant=3*x;ea.resetEdges=!1;var na=ea.isVertexIgnored;ea.isVertexIgnored=function(a){return na.apply(this,arguments)||0>mxUtils.indexOf(d,a)};fa=new mxParallelEdgeLayout(y);fa.spacing=B;this.executeLayout(function(){ea.execute(y.getDefaultParent());ka()},!0,D);D=null}this.hideDialog()}finally{y.model.endUpdate()}null!=D&&D()}}catch(ma){this.handleError(ma)}};EditorUi.prototype.getSearch=function(a){var b="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&& +null,null,620,430,null,!0,!0,mxResources.get("import")));this.showDialog(this.importCsvDialog.container,640,520,!0,!0);this.importCsvDialog.init()};EditorUi.prototype.importCsv=function(a,b){try{var c=a.split("\n"),d=[];if(0mxUtils.indexOf(d,a)};this.executeLayout(function(){da.execute(y.getDefaultParent());ka()},!0,D);D=null}else if("horizontaltree"==L||"verticaltree"==L||"auto"==L&&aa.length==2*d.length-1&&1==U.length){y.view.validate();var ga=new mxCompactTreeLayout(y,"horizontaltree"==L);ga.levelDistance=w;ga.edgeRouting=!1;ga.resetEdges= +!1;this.executeLayout(function(){ga.execute(y.getDefaultParent(),0d.length){y.view.validate(); +var ea=new mxFastOrganicLayout(y);ea.forceConstant=3*w;ea.resetEdges=!1;var na=ea.isVertexIgnored;ea.isVertexIgnored=function(a){return na.apply(this,arguments)||0>mxUtils.indexOf(d,a)};fa=new mxParallelEdgeLayout(y);fa.spacing=B;this.executeLayout(function(){ea.execute(y.getDefaultParent());ka()},!0,D);D=null}this.hideDialog()}finally{y.model.endUpdate()}null!=D&&D()}}catch(ma){this.handleError(ma)}};EditorUi.prototype.getSearch=function(a){var b="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&& null!=a&&0mxUtils.indexOf(a,d)&&null!=urlParams[d]&&(b+=c+d+"="+urlParams[d],c="&")}else b=window.location.search;return b};EditorUi.prototype.getUrl=function(a){a=null!=a?a:window.location.pathname;var b=0mxUtils.indexOf(c,d)&& (a=0==b?a+"?":a+"&",null!=urlParams[d]&&(a+=d+"="+urlParams[d],b++))}return a};EditorUi.prototype.showLinkDialog=function(a,b,c){a=new LinkDialog(this,a,b,c,!0);this.showDialog(a.container,480,130,!0,!0);a.init()};var h=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=h.apply(this,arguments),c=this.editor.graph,d=b.getSourceGraphBounds;b.getSourceGraphBounds=function(){if(mxUtils.hasScrollbars(c.container)&&c.pageVisible&&null!=this.source.minimumGraphSize){var a= this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width-2*a.x/b),Math.ceil(this.source.minimumGraphSize.height-2*a.y/b))}return d.apply(this,arguments)};var e=b.getSourceContainerSize;b.getSourceContainerSize=function(){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width*b-2* @@ -7507,12 +7507,12 @@ this.toolbar.edgeShapeMenu.setEnabled(a),null!=this.toolbar.edgeStyleMenu&&this. "4px";this.offlineStatus.style.padding="2px";this.offlineStatus.style.verticalAlign="middle";this.offlineStatus.innerHTML="";this.menubarContainer.appendChild(this.offlineStatus);mxEvent.addListener(this.offlineStatus,"click",mxUtils.bind(this,function(){var a=this.offlineStatus.getElementsByTagName("img");null!=a&&0';break;case d.DOWNLOADING:b='';break;case d.UPDATEREADY:b='';break;case d.OBSOLETE:b='';break;default:b= ''}a!=e&&(this.offlineStatus.innerHTML=b,e=a)});mxEvent.addListener(d,"checking",b);mxEvent.addListener(d,"noupdate",b);mxEvent.addListener(d,"downloading",b);mxEvent.addListener(d,"progress",b);mxEvent.addListener(d,"cached",b);mxEvent.addListener(d,"updateready",b);mxEvent.addListener(d,"obsolete",b);mxEvent.addListener(d,"error",b);b()}}else this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement= -function(){};EditorUi.prototype.isDiagramActive=function(){var a=this.getCurrentFile();return null!=a&&a.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var m=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){m.apply(this,arguments);var a=this.editor.graph,b=this.isDiagramActive(),c=this.getCurrentFile(),d=null!=c||"1"==urlParams.embed;this.actions.get("pageSetup").setEnabled(b);this.actions.get("autosave").setEnabled(null!=c&&c.isEditable()&& -c.isAutosaveOptional());this.actions.get("guides").setEnabled(b);this.actions.get("editData").setEnabled(b);this.actions.get("shadowVisible").setEnabled(b);this.actions.get("connectionArrows").setEnabled(b);this.actions.get("connectionPoints").setEnabled(b);this.actions.get("copyStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("editGeometry").setEnabled(a.getModel().isVertex(a.getSelectionCell()));this.actions.get("createShape").setEnabled(b); -this.actions.get("createRevision").setEnabled(b);this.actions.get("moveToFolder").setEnabled(null!=c);this.actions.get("makeCopy").setEnabled(null!=c&&!c.isRestricted());this.actions.get("editDiagram").setEnabled(b&&(null==c||!c.isRestricted()));this.actions.get("publishLink").setEnabled(null!=c&&!c.isRestricted());this.actions.get("tags").setEnabled(b&&(null==c||!c.isRestricted()));this.actions.get("find").setEnabled(d);this.actions.get("layers").setEnabled(d);this.actions.get("outline").setEnabled(d); -this.actions.get("rename").setEnabled(null!=c&&c.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=c);this.menus.get("publish").setEnabled(null!=c&&!c.isRestricted());a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(b&&null!=a&&null!=a.shape&&null!=a.shape.stencil)};var l=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog= -null);l.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,b,c,d,e,g){var f=a.editor.graph;if("xml"==c)a.hideDialog(),a.saveData(b,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("svg"==c)a.hideDialog(),a.saveData(b,"svg",mxUtils.getXml(f.getSvg(d,e,g)),"image/svg+xml");else{var h=a.getFileData(!0,null,null,null,null,!0),k=f.getGraphBounds(),p=Math.floor(k.width*e/f.view.scale),m=Math.floor(k.height* -e/f.view.scale);h.length<=MAX_REQUEST_SIZE&&p*mscreen.width?"0":"240",key:".drawio-config",getLanguage:function(){return mxSettings.settings.language},setLanguage:function(a){mxSettings.settings.language=a},getUi:function(){return mxSettings.settings.ui},setUi:function(a){mxSettings.settings.ui=a},getShowStartScreen:function(){return mxSettings.settings.showStartScreen},setShowStartScreen:function(a){mxSettings.settings.showStartScreen=a},getGridColor:function(){return mxSettings.settings.gridColor}, +function(){};EditorUi.prototype.isDiagramActive=function(){var a=this.getCurrentFile();return null!=a&&a.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var m=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){m.apply(this,arguments);var a=this.editor.graph,b=this.isDiagramActive(),c=this.getCurrentFile();this.actions.get("pageSetup").setEnabled(b);this.actions.get("autosave").setEnabled(null!=c&&c.isEditable()&&c.isAutosaveOptional());this.actions.get("guides").setEnabled(b); +this.actions.get("editData").setEnabled(b);this.actions.get("shadowVisible").setEnabled(b);this.actions.get("connectionArrows").setEnabled(b);this.actions.get("connectionPoints").setEnabled(b);this.actions.get("copyStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("editGeometry").setEnabled(a.getModel().isVertex(a.getSelectionCell()));this.actions.get("createShape").setEnabled(b);this.actions.get("createRevision").setEnabled(b); +this.actions.get("moveToFolder").setEnabled(null!=c);this.actions.get("makeCopy").setEnabled(null!=c&&!c.isRestricted());this.actions.get("editDiagram").setEnabled(b&&(null==c||!c.isRestricted()));this.actions.get("publishLink").setEnabled(null!=c&&!c.isRestricted());this.actions.get("tags").setEnabled(b&&(null==c||!c.isRestricted()));this.actions.get("find").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility); +this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=c&&c.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=c);this.menus.get("publish").setEnabled(null!=c&&!c.isRestricted());a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(b&&null!=a&&null!=a.shape&&null!=a.shape.stencil)};var l=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&& +(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);l.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,b,c,d,e,g){var f=a.editor.graph;if("xml"==c)a.hideDialog(),a.saveData(b,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("svg"==c)a.hideDialog(),a.saveData(b,"svg",mxUtils.getXml(f.getSvg(d,e,g)),"image/svg+xml");else{var h=a.getFileData(!0,null,null,null, +null,!0),k=f.getGraphBounds(),p=Math.floor(k.width*e/f.view.scale),m=Math.floor(k.height*e/f.view.scale);h.length<=MAX_REQUEST_SIZE&&p*mscreen.width?"0":"240",key:".drawio-config",getLanguage:function(){return mxSettings.settings.language},setLanguage:function(a){mxSettings.settings.language=a},getUi:function(){return mxSettings.settings.ui},setUi:function(a){mxSettings.settings.ui=a},getShowStartScreen:function(){return mxSettings.settings.showStartScreen},setShowStartScreen:function(a){mxSettings.settings.showStartScreen=a},getGridColor:function(){return mxSettings.settings.gridColor}, setGridColor:function(a){mxSettings.settings.gridColor=a},getAutosave:function(){return mxSettings.settings.autosave},setAutosave:function(a){mxSettings.settings.autosave=a},getResizeImages:function(){return mxSettings.settings.resizeImages},setResizeImages:function(a){mxSettings.settings.resizeImages=a},getOpenCounter:function(){return mxSettings.settings.openCounter},setOpenCounter:function(a){mxSettings.settings.openCounter=a},getLibraries:function(){return mxSettings.settings.libraries},setLibraries:function(a){mxSettings.settings.libraries= a},addCustomLibrary:function(a){mxSettings.load();0>mxUtils.indexOf(mxSettings.settings.customLibraries,a)&&("L.scratchpad"===a?mxSettings.settings.customLibraries.splice(0,0,a):mxSettings.settings.customLibraries.push(a));mxSettings.save()},removeCustomLibrary:function(a){mxSettings.load();mxUtils.remove(a,mxSettings.settings.customLibraries);mxSettings.save()},getCustomLibraries:function(){return mxSettings.settings.customLibraries},getPlugins:function(){return mxSettings.settings.plugins},setPlugins:function(a){mxSettings.settings.plugins= a},getRecentColors:function(){return mxSettings.settings.recentColors},setRecentColors:function(a){mxSettings.settings.recentColors=a},getFormatWidth:function(){return parseInt(mxSettings.settings.formatWidth)},setFormatWidth:function(a){mxSettings.settings.formatWidth=a},getCurrentEdgeStyle:function(){return mxSettings.settings.currentEdgeStyle},setCurrentEdgeStyle:function(a){mxSettings.settings.currentEdgeStyle=a},getCurrentVertexStyle:function(){return mxSettings.settings.currentVertexStyle}, @@ -7788,7 +7788,7 @@ GitHubClient.prototype.getFile=function(a,b,c,d,e){d=null!=d?d:!1;var g=a.split( "/repos/"+h+"/"+m+"/contents/"+a+"?ref="+l,null,"GET"),this.executeRequest(a,mxUtils.bind(this,function(a){try{b(this.createGitHubFile(h,m,l,JSON.parse(a.getText()),d))}catch(k){c(k)}}),c))}; GitHubClient.prototype.createGitHubFile=function(a,b,c,d,e){a={org:a,repo:b,ref:c,name:d.name,path:d.path,sha:d.sha,html_url:d.html_url,download_url:d.download_url};b=d.content;"base64"===d.encoding&&(/\.jpe?g$/i.test(d.name)?b="data:image/jpeg;base64,"+b:/\.gif$/i.test(d.name)?b="data:image/gif;base64,"+b:/\.png$/i.test(d.name)?(d=this.ui.extractGraphModelFromPng(b),b=null!=d&&0=this.maxFileSize?l({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(g.length)+" / 1 MB)"}):(c={path:d,branch:decodeURIComponent(c),message:e,content:g},null!=h&&(c.sha=h),a=new mxXmlRequest(this.baseUrl+"/repos/"+a+"/"+b+"/contents/"+d,JSON.stringify(c),"PUT"),this.executeRequest(a,mxUtils.bind(this,function(a){m(a)}),l))}; GitHubClient.prototype.checkExists=function(a,b,c){this.getFile(a,mxUtils.bind(this,function(d){if(b&&null!=d.meta){var e=this.ui.spinner.pause();this.ui.confirm(mxResources.get("replaceIt",[a]),function(){e();c(!0,d.meta.sha)},function(){e();c(!1)})}else this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){c(!1)})}),mxUtils.bind(this,function(a){c(!0)}),null,!0)}; @@ -7797,14 +7797,14 @@ mxResources.get("cancel"),mxUtils.bind(this,function(){c()}),null,mxResources.ge Base64.encode(a.getData()))}),mxUtils.bind(this,function(){c()}))};GitHubClient.prototype.pickLibrary=function(a){this.pickFile(a)};GitHubClient.prototype.pickFolder=function(a){this.showGitHubDialog(!1,a)};GitHubClient.prototype.pickFile=function(a){a=null!=a?a:mxUtils.bind(this,function(a){this.ui.loadFile("H"+encodeURIComponent(a))});this.showGitHubDialog(!0,a)}; GitHubClient.prototype.showGitHubDialog=function(a,b){var c=null,d=null,e=null,g=null,h=document.createElement("div");h.style.whiteSpace="nowrap";h.style.overflow="hidden";h.style.height="224px";var m=document.createElement("h3");mxUtils.write(m,mxResources.get(a?"selectFile":"selectFolder"));m.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";h.appendChild(m);var l=document.createElement("div");l.style.whiteSpace="nowrap";l.style.overflow="auto";l.style.height="194px"; h.appendChild(l);var f=new CustomDialog(this.ui,h,mxUtils.bind(this,function(){b(c+"/"+d+"/"+encodeURIComponent(e)+"/"+g)}));this.ui.showDialog(f.container,340,270,!0,!0);a&&f.okButton.parentNode.removeChild(f.okButton);var k=mxUtils.bind(this,function(a,b){var c=document.createElement("a");c.setAttribute("href","javascript:void(0);");mxUtils.write(c,a);mxEvent.addListener(c,"click",b);return c}),n=mxUtils.bind(this,function(a){var b=document.createElement("div");b.style.marginBottom="8px";b.appendChild(k(c+ -"/"+d,mxUtils.bind(this,function(){g=null;C()})));a||(mxUtils.write(b," / "),b.appendChild(k(decodeURIComponent(e),mxUtils.bind(this,function(){g=null;w()}))));if(null!=g&&0=l.scrollHeight-l.offsetHeight&&h()},mxEvent.addListener(l,"scroll",v))}}),t)}),C=mxUtils.bind(this,function(a){null==a&&(l.innerHTML="",a=1);var b=new mxXmlRequest(this.baseUrl+"/user/repos?per_page=100&page="+a,null,"GET");f.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(l,mxResources.get("loading"));null!=q&&null!=q.parentNode&&q.parentNode.removeChild(q);q=document.createElement("a");q.style.display="block";q.setAttribute("href","javascript:void(0);"); mxUtils.write(q,mxResources.get("more")+"...");var h=mxUtils.bind(this,function(){mxEvent.removeListener(l,"scroll",v);C(a+1)});mxEvent.addListener(q,"click",h);this.executeRequest(b,mxUtils.bind(this,function(b){this.ui.spinner.stop();b=JSON.parse(b.getText());if(null==b||0==b.length)mxUtils.write(l,mxResources.get("noFiles"));else{1==a&&(l.appendChild(k(mxResources.get("enterValue")+"...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.ui,"org/repo/ref",mxResources.get("ok"),mxUtils.bind(this, -function(a){if(null!=a){var b=a.split("/");if(1b.length?(c=a,d=f,g=e=null,w()):this.ui.spinner.spin(l,mxResources.get("loading"))&&(b=encodeURIComponent(b.slice(2,b.length).join("/")),this.getFile(a+"/"+f+"/"+b,mxUtils.bind(this,function(a){this.ui.spinner.stop();c=a.meta.org;d=a.meta.repo;e=decodeURIComponent(a.meta.ref);g="";u()}),mxUtils.bind(this,function(a){this.ui.spinner.stop();this.ui.handleError({message:mxResources.get("fileNotFound")})})))}else this.ui.spinner.stop(), +function(a){if(null!=a){var b=a.split("/");if(1b.length?(c=a,d=f,g=e=null,x()):this.ui.spinner.spin(l,mxResources.get("loading"))&&(b=encodeURIComponent(b.slice(2,b.length).join("/")),this.getFile(a+"/"+f+"/"+b,mxUtils.bind(this,function(a){this.ui.spinner.stop();c=a.meta.org;d=a.meta.repo;e=decodeURIComponent(a.meta.ref);g="";u()}),mxUtils.bind(this,function(a){this.ui.spinner.stop();this.ui.handleError({message:mxResources.get("fileNotFound")})})))}else this.ui.spinner.stop(), this.ui.handleError({message:mxResources.get("invalidName")})}}),mxResources.get("enterValue"));this.ui.showDialog(a.container,300,80,!0,!1);a.init()}))),mxUtils.br(l),mxUtils.br(l));for(var f=0;f=l.scrollHeight-l.offsetHeight&&h()},mxEvent.addListener(l,"scroll", v))}),t)});C()};GitHubClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);this.token=null};TrelloFile=function(a,b,c){DrawioFile.call(this,a,b);this.meta=c;this.saveNeededCounter=0};mxUtils.extend(TrelloFile,DrawioFile);TrelloFile.prototype.getHash=function(){return"T"+encodeURIComponent(this.meta.compoundId)};TrelloFile.prototype.getMode=function(){return App.MODE_TRELLO};TrelloFile.prototype.isAutosave=function(){return!0};TrelloFile.prototype.getTitle=function(){return this.meta.name};TrelloFile.prototype.isRenamable=function(){return!1}; TrelloFile.prototype.save=function(a,b,c){this.doSave(this.getTitle(),b,c)};TrelloFile.prototype.saveAs=function(a,b,c){this.doSave(a,b,c)};TrelloFile.prototype.doSave=function(a,b,c){var d=this.meta.name;this.meta.name=a;DrawioFile.prototype.save.apply(this,arguments);this.meta.name=d;this.saveFile(a,!1,b,c)}; @@ -7855,7 +7855,7 @@ null!=window.DrawOneDriveClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.o urlParams.tr)&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?mxscript(App.TRELLO_JQUERY_URL,function(){mxscript(App.TRELLO_URL,function(){DrawTrelloClientCallback()})}):"undefined"===typeof window.Trello&&(window.TrelloClient=null)}null!=a&&a(c);"0"!=urlParams.chrome&&"1"==urlParams.test&&(mxLog.show(),mxLog.debug("Started in "+((new Date).getTime()-t0.getTime())+"ms"),mxLog.debug("Export:",EXPORT_URL),mxLog.debug("Development mode:","1"==urlParams.dev?"active":"inactive"),mxLog.debug("Test mode:", "1"==urlParams.test?"active":"inactive"))},function(a){document.getElementById("geStatus").innerHTML='Error loading page. Please try refreshing.';document.getElementById("geStatus").getElementsByTagName("a")[0].onclick=function(){mxLanguage="en";c(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))}})}var d=null;EditorUi.enableLogging&&(window.onerror=function(a,b,c,e,g){try{if(a!=d&&(null==a||null==b||-1== a.indexOf("Script error")&&-1==a.indexOf("extension"))&&null!=a&&0>a.indexOf("DocumentClosedError")){d=a;var f=new Image,h=0<=a.indexOf("NetworkError")||0<=a.indexOf("SecurityError")||0<=a.indexOf("NS_ERROR_FAILURE")||0<=a.indexOf("out of memory")?"CONFIG":"SEVERE";f.src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?severity="+h+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(a)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(c)+ -(null!=e?":colno:"+encodeURIComponent(e):"")+(null!=g&&null!=g.stack?"&stack="+encodeURIComponent(g.stack):"")}}catch(w){}});if(null!=window.mxscript){if("1"==urlParams.offline||"1"==urlParams.appcache){mxscript("js/shapes.min.js");mxscript("js/stencils.min.js");mxscript("js/extensions.min.js");var e=document.createElement("iframe");e.setAttribute("width","0");e.setAttribute("height","0");e.setAttribute("src","offline.html");document.body.appendChild(e)}if("0"!=urlParams.plugins&&"1"!=urlParams.offline){var e= +(null!=e?":colno:"+encodeURIComponent(e):"")+(null!=g&&null!=g.stack?"&stack="+encodeURIComponent(g.stack):"")}}catch(x){}});if(null!=window.mxscript){if("1"==urlParams.offline||"1"==urlParams.appcache){mxscript("js/shapes.min.js");mxscript("js/stencils.min.js");mxscript("js/extensions.min.js");var e=document.createElement("iframe");e.setAttribute("width","0");e.setAttribute("height","0");e.setAttribute("src","offline.html");document.body.appendChild(e)}if("0"!=urlParams.plugins&&"1"!=urlParams.offline){var e= mxSettings.getPlugins(),g=urlParams.p;App.initPluginCallback();if(null!=g){var h="";"1"==urlParams.drawdev&&(h=document.location.protocol+"//drawhost.jgraph.com/");for(var m=g.split(";"),g=0;g=a.getStatus())try{e(new UrlLibrary(this,a.getText(),m))}catch(C){f()}else f()}),function(){f()})}catch(w){f()}}}else{var l=null;"G"==k?null!= +b&&(b=this.emptyLibraryXml);null!=b?e(new StorageLibrary(this,b,a)):f()}))}catch(C){f()}}),0);else if("U"==k){var m=decodeURIComponent(b.substring(1));if(!this.isOffline()){k=m;this.isCorsEnabledForUrl(k)||(k="t="+(new Date).getTime(),k=PROXY_URL+"?url="+encodeURIComponent(m)+"&"+k);try{mxUtils.get(k,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus())try{e(new UrlLibrary(this,a.getText(),m))}catch(C){f()}else f()}),function(){f()})}catch(x){f()}}}else{var l=null;"G"==k?null!= this.drive&&null!=this.drive.user&&(l=this.drive):"H"==k?null!=this.gitHub&&null!=this.gitHub.getUser()&&(l=this.gitHub):"T"==k?null!=this.trello&&this.trello.isAuthorized()&&(l=this.trello):"D"==k?null!=this.dropbox&&null!=this.dropbox.getUser()&&(l=this.dropbox):"W"==k&&null!=this.oneDrive&&null!=this.oneDrive.getUser()&&(l=this.oneDrive);null!=l?l.getLibrary(decodeURIComponent(b.substring(1)),mxUtils.bind(this,function(a){try{e(a)}catch(C){f()}}),function(a){f()}):(delete this.pendingLibraries[b], f())}}})(l,m)}h()});b(mxSettings.getCustomLibraries(),function(){b((urlParams.clibs||"").split(";"))})}}; App.prototype.updateButtonContainer=function(){if(null!=this.buttonContainer){var a=this.getCurrentFile();null!=a&&a.constructor==DriveFile?null==this.shareButton&&(this.shareButton=document.createElement("div"),this.shareButton.className="geBtn gePrimaryBtn",this.shareButton.style.display="inline-block",this.shareButton.style.padding="0 10px 0 10px",this.shareButton.style.marginTop="-4px",this.shareButton.style.height="28px",this.shareButton.style.lineHeight="28px",this.shareButton.style.minWidth= @@ -8043,67 +8043,68 @@ null,mxUtils.bind(this,function(){mxSettings.setLanguage(d);mxSettings.save();mx b){var c=this.get("language");null!=c&&(c=b.addMenu("",c.funct),c.setAttribute("title",mxResources.get("language")),c.style.width="16px",c.style.paddingTop="2px",c.style.paddingLeft="4px",c.innerHTML='
',c.style.zIndex="1",c.style.position="absolute",c.style.top="2px",c.style.right="17px",c.style.display="block",mxClient.IS_VML||mxUtils.setOpacity(c,60),document.body.appendChild(c))}return b}}this.put("help",new Menu(mxUtils.bind(this,function(b,d){if(!mxClient.IS_CHROMEAPP&& a.isOffline())this.addMenuItems(b,["about"],d);else{var e=b.addItem("Search:",null,null,d,null,null,!1);e.style.backgroundColor="dark"==uiTheme?"#505759":"whiteSmoke";e.style.cursor="default";var f=document.createElement("input");f.setAttribute("type","text");f.setAttribute("size","25");f.style.marginLeft="8px";mxEvent.addListener(f,"keydown",mxUtils.bind(this,function(a){var b=mxUtils.trim(f.value);13==a.keyCode&&0=b.getStatus()&&a.saveLocalFile(b.getText(),"realtime.txt","text/plain")}))})),null!=this.editorUi.getCurrentFile()&& -null!=this.editorUi.getCurrentFile().realtime&&this.addMenuItems(b,["-","testShowRtModel","testDebugRtModel","testDownloadRtModel"],d),mxResources.parse("testShowConsole=Show Console"),this.editorUi.actions.addAction("testShowConsole",function(){mxLog.isVisible()?mxLog.window.fit():mxLog.show();mxLog.window.div.style.zIndex=mxPopupMenu.prototype.zIndex-1}),this.addMenuItems(b,["-","testShowConsole"]))})));a.actions.addAction("shapes...",function(){mxClient.IS_CHROMEAPP||!a.isOffline()?a.showDialog((new MoreShapesDialog(a, -!0)).container,640,isLocalStorage?mxClient.IS_IOS?480:460:440,!0,!0):a.showDialog((new MoreShapesDialog(a,!1)).container,360,isLocalStorage?mxClient.IS_IOS?300:280:260,!0,!0)});a.actions.addAction("createShape...",function(){a.getCurrentFile();if(c.isEnabled()){var b=new mxCell("",new mxGeometry(0,0,120,120),a.defaultCustomShapeStyle);b.vertex=!0;b=new EditShapeDialog(a,b,mxResources.get("editShape")+":",630,400);a.showDialog(b.container,640,480,!0,!1);b.init()}});a.actions.put("embedHtml",new Action(mxResources.get("html")+ -"...",function(){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(b){a.spinner.stop();a.showHtmlDialog(mxResources.get("create"),"https://desk.draw.io/support/solutions/articles/16000042542",b,function(b,c,d,e,f,g,h,k,p,m){a.createHtml(b,c,d,e,f,g,h,k,p,m,mxUtils.bind(this,function(b,c){var d=new EmbedDialog(a,b+"\n"+c,null,null,function(){var a=window.open(),d=a.document;"CSS1Compat"===document.compatMode&&d.writeln("");d.writeln(""); -d.writeln(""+encodeURIComponent(mxResources.get("preview"))+'');d.writeln("");d.writeln(b);var e=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;e&&d.writeln(c);d.writeln("");d.writeln("");d.close();if(!e){var f=a.document.createElement("div");f.marginLeft="26px";f.marginTop="26px";mxUtils.write(f,mxResources.get("updatingDocument"));e=a.document.createElement("img");e.setAttribute("src",window.location.protocol+"//"+ -window.location.hostname+"/"+IMAGE_PATH+"/spin.gif");e.style.marginLeft="6px";f.appendChild(e);a.document.body.insertBefore(f,a.document.body.firstChild);window.setTimeout(function(){var a=document.createElement("script");a.type="text/javascript";a.src=/');a.showDialog(p.container,440,240,!0,!0);p.init()})},!0)}));a.actions.put("publishLink",new Action(mxResources.get("link")+"...",function(){a.showPublishLinkDialog(null,null,null,null,function(b,c,d,e,f,g){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(h){a.spinner.stop();h=new EmbedDialog(a, -a.createLink(b,c,d,e,f,g,h));a.showDialog(h.container,440,240,!0,!0);h.init()})})}));a.actions.addAction("googleDocs...",function(){a.openLink("http://docsaddon.draw.io")});a.actions.addAction("googleSites...",function(){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(b){a.spinner.stop();b=new GoogleSitesDialog(a,b);a.showDialog(b.container,420,256,!0,!0);b.init()})});if(isLocalStorage||mxClient.IS_CHROMEAPP)k=a.actions.addAction("scratchpad",function(){a.toggleScratchpad()}), -k.setToggleAction(!0),k.setSelectedCallback(function(){return null!=a.scratchpad}),a.actions.addAction("plugins...",function(){a.showDialog((new PluginsDialog(a)).container,360,170,!0,!1)});k=a.actions.addAction("search",function(){var b=a.sidebar.isEntryVisible("search");a.sidebar.showPalette("search",!b);isLocalStorage&&(mxSettings.settings.search=!b,mxSettings.save())});k.setToggleAction(!0);k.setSelectedCallback(function(){return a.sidebar.isEntryVisible("search")});"1"==urlParams.embed&&(a.actions.get("save").funct= -function(b){c.isEditing()&&c.stopEditing();var d="0"!=urlParams.pages||null!=a.pages&&1a.resampleThreshold?a.confirmImageResize(function(a){g=a;m()}):m()}),mxUtils.bind(this,function(){a.handleError({message:mxResources.get("cannotOpenFile")})})):a.importFile(b,d,h,k,0,0,e,function(b){a.spinner.stop();c.setSelectionCells(b); -c.scrollCellToVisible(c.getSelectionCell())})}),k=mxUtils.bind(this,function(a){var b="text/xml";/\.png$/i.test(a)?b="image/png":/\.jpe?g$/i.test(a)?b="image/jpg":/\.gif$/i.test(a)&&(b="image/gif");return b});"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){e(a.drive)},d):h&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1));null!=a.gitHub&&b.addItem(mxResources.get("github")+ -"...",null,function(){e(a.gitHub)},d);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){e(a.dropbox)},d):m&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){e(a.oneDrive)},d):l&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null, -function(){e(a.trello)},d):f&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);b.addSeparator(d);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.importLocalFile(!1)},d);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){a.importLocalFile(!0)},d);a.isOffline()||(b.addSeparator(d),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(a,"",mxResources.get("import"), -function(b){if(null!=b&&0=c.getStatus()){a.spinner.stop();try{a.loadLibrary(new UrlLibrary(this,c.getText(),b))}catch(y){a.handleError(y,mxResources.get("errorLoadingFile"))}}else a.spinner.stop(),a.handleError(null,mxResources.get("errorLoadingFile"))},function(){a.spinner.stop();a.handleError(null,mxResources.get("errorLoadingFile"))})}},mxResources.get("url"));a.showDialog(b.container,300,80,!0, -!0);b.init()},c))})));this.put("edit",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,"undo redo - cut copy paste delete - duplicate - find - editData editTooltip editStyle - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));this.put("view",new Menu(mxUtils.bind(this,function(b,c){this.addMenuItems(b,(null!=this.editorUi.format?["formatPanel"]:[]).concat(["outline","layers","-"]));this.addMenuItems(b,["-","search"],c);if(isLocalStorage|| -mxClient.IS_CHROMEAPP){var d=this.addMenuItem(b,"scratchpad",c);a.isOffline()&&!mxClient.IS_CHROMEAPP||this.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000042367")}this.addMenuItems(b,"shapes - pageView pageScale - scrollbars tooltips - grid guides".split(" "),c);mxClient.IS_SVG&&(null==document.documentMode||9=screen.width&&a==this.get("help")){b.style.paddingRight="0px";b.style.paddingLeft="0px";b.innerHTML="";var d=document.createElement("img");d.setAttribute("border","0");d.setAttribute("valign","bottom");d.setAttribute("src",Editor.helpImage);b.appendChild(d)}c.apply(this,arguments)}})();function DiagramPage(a){this.node=a;(null==this.node.hasAttribute&&null==this.node.getAttribute("id")||null!=this.node.hasAttribute&&!this.node.hasAttribute("id"))&&this.node.setAttribute("id",function(){function a(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return a()+a()+"-"+a()+"-"+a()+"-"+a()+"-"+a()+a()+a()}())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")}; +["-","quickStart","userManual","keyboardShortcuts","-"],d);mxClient.IS_CHROMEAPP||this.addMenuItems(b,["feedback"],d);this.addMenuItems(b,["support","-"],d);a.isOffline()||EditorUi.isElectronApp||navigator.standalone||"1"==urlParams.embed||this.addMenuItems(b,["download"],d);navigator.standalone||"1"==urlParams.embed||this.addMenuItems(b,["offline"],d);this.addMenuItems(b,["-","about"],d)}"1"==urlParams.ruler&&(mxResources.parse("rulerInch=Ruler unit: Inches"),this.editorUi.actions.addAction("rulerInch", +mxUtils.bind(this,function(){this.editorUi.vRuler.setUnit(mxRuler.prototype.INCHES);this.editorUi.hRuler.setUnit(mxRuler.prototype.INCHES);this.editorUi.vRuler.drawRuler(!0);this.editorUi.hRuler.drawRuler(!0)})),mxResources.parse("rulerCM=Ruler unit: CMs"),this.editorUi.actions.addAction("rulerCM",mxUtils.bind(this,function(){this.editorUi.vRuler.setUnit(mxRuler.prototype.CENTIMETER);this.editorUi.hRuler.setUnit(mxRuler.prototype.CENTIMETER);this.editorUi.vRuler.drawRuler(!0);this.editorUi.hRuler.drawRuler(!0)})), +mxResources.parse("rulerPixel=Ruler unit: Pixels"),this.editorUi.actions.addAction("rulerPixel",mxUtils.bind(this,function(){this.editorUi.vRuler.setUnit(mxRuler.prototype.PIXELS);this.editorUi.hRuler.setUnit(mxRuler.prototype.PIXELS);this.editorUi.vRuler.drawRuler(!0);this.editorUi.hRuler.drawRuler(!0)})),this.addMenuItems(b,["-","rulerInch","rulerCM","rulerPixel"],d));"1"==urlParams.test&&(mxResources.parse("showBoundingBox=Show bounding box"),this.editorUi.actions.addAction("showBoundingBox",mxUtils.bind(this, +function(){var a=c.getGraphBounds(),b=c.view.translate,e=c.view.scale;c.insertVertex(d,null,"",a.x/e-b.x,a.y/e-b.y,a.width/e,a.height/e,"fillColor=none;strokeColor=red;")})),mxResources.parse("createSidebarEntry=Create sidebar entry"),this.editorUi.actions.addAction("createSidebarEntry",mxUtils.bind(this,function(){c.isSelectionEmpty()||(mxLog.show(),mxLog.debug("sb.createVertexTemplateFromData('"+c.compress(mxUtils.getXml(c.encodeCells(c.getSelectionCells())))+"', width, height, 'Title');"))})), +this.addMenuItems(b,["-","createSidebarEntry","showBoundingBox"],d),mxResources.parse("testXmlImageExport=XML Image Export"),this.editorUi.actions.addAction("testXmlImageExport",mxUtils.bind(this,function(){var a=new mxImageExport,b=c.getGraphBounds(),d=c.view.scale,e=mxUtils.createXmlDocument(),f=e.createElement("output");e.appendChild(f);e=new mxXmlCanvas2D(f);e.translate(Math.floor((1-b.x)/d),Math.floor((1-b.y)/d));e.scale(1/d);var g=0,h=e.save;e.save=function(){g++;h.apply(this,arguments)};var k= +e.restore;e.restore=function(){g--;k.apply(this,arguments)};var p=a.drawShape;a.drawShape=function(a){mxLog.debug("entering shape",a,g);p.apply(this,arguments);mxLog.debug("leaving shape",a,g)};a.drawState(c.getView().getState(c.model.root),e);mxLog.show();mxLog.debug(mxUtils.getXml(f));mxLog.debug("stateCounter",g)})),this.addMenuItems(b,["testXmlImageExport"],d),mxResources.parse("testShowRtModel=Show RT model"),mxResources.parse("testDebugRtModel=Debug RT model"),mxResources.parse("testDownloadRtModel=Download RT model"), +this.editorUi.actions.addAction("testShowRtModel",mxUtils.bind(this,function(){null!=this.editorUi.getCurrentFile()&&null!=this.editorUi.getCurrentFile().realtime&&(console.log("bytesUsed",this.editorUi.getCurrentFile().realtime.rtModel.bytesUsed),console.log("root",this.editorUi.getCurrentFile().realtime.dumpRoot()),this.editorUi.getCurrentFile().realtime.check())})),this.editorUi.actions.addAction("testDebugRtModel",mxUtils.bind(this,function(){gapi.drive.realtime.debug()})),this.editorUi.actions.addAction("testDownloadRtModel", +mxUtils.bind(this,function(){var b=this.editorUi.getCurrentFile();null!=b&&null!=b.realtime&&a.spinner.spin(document.body,mxResources.get("export"))&&(b=new mxXmlRequest("https://www.googleapis.com/drive/v2/files/"+b.getHash().substring(1)+"/realtime",null,"GET"),b.setRequestHeaders=function(a){mxXmlRequest.prototype.setRequestHeaders.apply(this,arguments);var b=gapi.auth.getToken().access_token;a.setRequestHeader("authorization","Bearer "+b)},b.send(function(b){a.spinner.stop();200<=b.getStatus()&& +299>=b.getStatus()&&a.saveLocalFile(b.getText(),"realtime.txt","text/plain")}))})),null!=this.editorUi.getCurrentFile()&&null!=this.editorUi.getCurrentFile().realtime&&this.addMenuItems(b,["-","testShowRtModel","testDebugRtModel","testDownloadRtModel"],d),mxResources.parse("testShowConsole=Show Console"),this.editorUi.actions.addAction("testShowConsole",function(){mxLog.isVisible()?mxLog.window.fit():mxLog.show();mxLog.window.div.style.zIndex=mxPopupMenu.prototype.zIndex-1}),this.addMenuItems(b,["-", +"testShowConsole"]))})));a.actions.addAction("shapes...",function(){mxClient.IS_CHROMEAPP||!a.isOffline()?a.showDialog((new MoreShapesDialog(a,!0)).container,640,isLocalStorage?mxClient.IS_IOS?480:460:440,!0,!0):a.showDialog((new MoreShapesDialog(a,!1)).container,360,isLocalStorage?mxClient.IS_IOS?300:280:260,!0,!0)});a.actions.addAction("createShape...",function(){a.getCurrentFile();if(c.isEnabled()){var b=new mxCell("",new mxGeometry(0,0,120,120),a.defaultCustomShapeStyle);b.vertex=!0;b=new EditShapeDialog(a, +b,mxResources.get("editShape")+":",630,400);a.showDialog(b.container,640,480,!0,!1);b.init()}});a.actions.put("embedHtml",new Action(mxResources.get("html")+"...",function(){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(b){a.spinner.stop();a.showHtmlDialog(mxResources.get("create"),"https://desk.draw.io/support/solutions/articles/16000042542",b,function(b,c,d,e,f,g,h,k,p,m){a.createHtml(b,c,d,e,f,g,h,k,p,m,mxUtils.bind(this,function(b,c){var d= +new EmbedDialog(a,b+"\n"+c,null,null,function(){var a=window.open(),d=a.document;"CSS1Compat"===document.compatMode&&d.writeln("");d.writeln("");d.writeln(""+encodeURIComponent(mxResources.get("preview"))+'');d.writeln("");d.writeln(b);var e=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;e&&d.writeln(c);d.writeln("");d.writeln("");d.close();if(!e){var f=a.document.createElement("div");f.marginLeft= +"26px";f.marginTop="26px";mxUtils.write(f,mxResources.get("updatingDocument"));e=a.document.createElement("img");e.setAttribute("src",window.location.protocol+"//"+window.location.hostname+"/"+IMAGE_PATH+"/spin.gif");e.style.marginLeft="6px";f.appendChild(e);a.document.body.insertBefore(f,a.document.body.firstChild);window.setTimeout(function(){var a=document.createElement("script");a.type="text/javascript";a.src=/');a.showDialog(p.container,440,240,!0,!0);p.init()})},!0)}));a.actions.put("publishLink",new Action(mxResources.get("link")+"...",function(){a.showPublishLinkDialog(null, +null,null,null,function(b,c,d,e,f,g){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(h){a.spinner.stop();h=new EmbedDialog(a,a.createLink(b,c,d,e,f,g,h));a.showDialog(h.container,440,240,!0,!0);h.init()})})}));a.actions.addAction("googleDocs...",function(){a.openLink("http://docsaddon.draw.io")});a.actions.addAction("googleSites...",function(){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(b){a.spinner.stop(); +b=new GoogleSitesDialog(a,b);a.showDialog(b.container,420,256,!0,!0);b.init()})});if(isLocalStorage||mxClient.IS_CHROMEAPP)k=a.actions.addAction("scratchpad",function(){a.toggleScratchpad()}),k.setToggleAction(!0),k.setSelectedCallback(function(){return null!=a.scratchpad}),a.actions.addAction("plugins...",function(){a.showDialog((new PluginsDialog(a)).container,360,170,!0,!1)});k=a.actions.addAction("search",function(){var b=a.sidebar.isEntryVisible("search");a.sidebar.showPalette("search",!b);isLocalStorage&& +(mxSettings.settings.search=!b,mxSettings.save())});k.setToggleAction(!0);k.setSelectedCallback(function(){return a.sidebar.isEntryVisible("search")});"1"==urlParams.embed&&(a.actions.get("save").funct=function(b){c.isEditing()&&c.stopEditing();var d="0"!=urlParams.pages||null!=a.pages&&1a.resampleThreshold?a.confirmImageResize(function(a){g=a;m()}):m()}),mxUtils.bind(this,function(){a.handleError({message:mxResources.get("cannotOpenFile")})})):a.importFile(b,d,h,k,0,0,e,function(b){a.spinner.stop();c.setSelectionCells(b);c.scrollCellToVisible(c.getSelectionCell())})}),k=mxUtils.bind(this,function(a){var b="text/xml";/\.png$/i.test(a)?b="image/png":/\.jpe?g$/i.test(a)?b="image/jpg":/\.gif$/i.test(a)&&(b="image/gif");return b});"undefined"!=typeof google&&"undefined"!= +typeof google.picker&&(null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){e(a.drive)},d):h&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1));null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){e(a.gitHub)},d);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){e(a.dropbox)},d):m&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){}, +d,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){e(a.oneDrive)},d):l&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){e(a.trello)},d):f&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);b.addSeparator(d);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+ +"...",null,function(){a.importLocalFile(!1)},d);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){a.importLocalFile(!0)},d);a.isOffline()||(b.addSeparator(d),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(a,"",mxResources.get("import"),function(b){if(null!=b&&0=c.getStatus()){a.spinner.stop();try{a.loadLibrary(new UrlLibrary(this,c.getText(),b))}catch(y){a.handleError(y,mxResources.get("errorLoadingFile"))}}else a.spinner.stop(), +a.handleError(null,mxResources.get("errorLoadingFile"))},function(){a.spinner.stop();a.handleError(null,mxResources.get("errorLoadingFile"))})}},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},c))})));this.put("edit",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,"undo redo - cut copy paste delete - duplicate - find - editData editTooltip editStyle - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));this.put("view", +new Menu(mxUtils.bind(this,function(b,c){this.addMenuItems(b,(null!=this.editorUi.format?["formatPanel"]:[]).concat(["outline","layers","-"]));this.addMenuItems(b,["-","search"],c);if(isLocalStorage||mxClient.IS_CHROMEAPP){var d=this.addMenuItem(b,"scratchpad",c);a.isOffline()&&!mxClient.IS_CHROMEAPP||this.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000042367")}this.addMenuItems(b,"shapes - pageView pageScale - scrollbars tooltips - grid guides".split(" "),c);mxClient.IS_SVG&& +(null==document.documentMode||9=screen.width&&a==this.get("help")){b.style.paddingRight= +"0px";b.style.paddingLeft="0px";b.innerHTML="";var d=document.createElement("img");d.setAttribute("border","0");d.setAttribute("valign","bottom");d.setAttribute("src",Editor.helpImage);b.appendChild(d)}c.apply(this,arguments)}})();function DiagramPage(a){this.node=a;(null==this.node.hasAttribute&&null==this.node.getAttribute("id")||null!=this.node.hasAttribute&&!this.node.hasAttribute("id"))&&this.node.setAttribute("id",function(){function a(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return a()+a()+"-"+a()+"-"+a()+"-"+a()+"-"+a()+a()+a()}())}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,c){this.ui=a;this.page=b;this.previous=this.name=c}RenamePage.prototype.execute=function(){var a=this.page.getName();this.page.setName(this.previous);this.previous=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))}; function MovePage(a,b,c){this.ui=a;this.oldIndex=b;this.newIndex=c}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){this.ui=a;this.previousPage=this.page=b;this.neverShown=!0;null!=b&&(this.neverShown=null==b.viewState,this.ui.updatePageRoot(b))} @@ -8164,7 +8165,7 @@ q.model.getParent(a),c=q.getIncomingEdges(a),d=q.cloneCells([c[0],a]);q.model.se e.y+40):l==mxConstants.DIRECTION_NORTH?(d[1].geometry.x=null==k?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(k.x+k.width)/p-n.x+-e.x+10,d[1].geometry.y-=d[1].geometry.height-e.y+40):(d[1].geometry.x=l==mxConstants.DIRECTION_WEST?d[1].geometry.x-(d[1].geometry.width-e.x+40):d[1].geometry.x+(a.geometry.width-e.x+40),d[1].geometry.y=null==k?a.geometry.y+(a.geometry.height-d[1].geometry.height)/2:(k.y+k.height)/p-n.y+-e.y+10);return q.addCells(d,b)}finally{q.model.endUpdate()}}function n(a, b,c){a=q.getOutgoingEdges(a);c=q.view.getState(c);var d=[];if(null!=c&&null!=a){for(var e=0;e=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 t(a,b){var c=m(a),d=b==mxConstants.DIRECTION_EAST||b==mxConstants.DIRECTION_WEST;(c==mxConstants.DIRECTION_EAST|| c==mxConstants.DIRECTION_WEST)==d&&c!=b?u.actions.get("selectParent").funct():c==b?(d=q.getOutgoingEdges(a),null!=d&&0mxUtils.indexOf(k,this.model.getTerminal(k[p],!0))&&this.model.setTerminal(k[p],m,!0);else if(b(a[p])&&(v=q.getIncomingEdges(a[p]),0mxUtils.indexOf(a,this.model.getTerminal(v[0],!0))&&this.model.setTerminal(v[0],m,!0);else if(0==q.getIncomingEdges(k[p]).length){l=m;if(null==l||l==q.model.getParent(a[p]))l=q.model.getTerminal(v[0],!0);e=this.cloneCells([v[0]])[0];this.addEdge(e, -q.getDefaultParent(),l,k[p])}}finally{this.model.endUpdate()}return k};if(null!=u.sidebar){var F=u.sidebar.dropAndConnect;u.sidebar.dropAndConnect=function(a,c,d,e){var f=q.model,g=null;f.beginUpdate();try{if(g=F.apply(this,arguments),b(a))for(var h=0;hmxUtils.indexOf(c,b)&&c.push(b);0>mxUtils.indexOf(c,a)&&c.push(a);return!0});return c};var y=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){y.apply(this,arguments);b(this.state.cell)&&0mxUtils.indexOf(c,b)&&c.push(b);0>mxUtils.indexOf(c,a)&&c.push(a);return!0});return c};var y=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){y.apply(this,arguments);b(this.state.cell)&&0this.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 I=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(a,b){I.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var d=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var a=d.apply(this,arguments),b=this.editorUi.editor.graph;return a.concat([this.addEntry("tree container", +this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var H=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(a,b){H.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.editorUi.editor.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;"); b.vertex=!0;var c=new mxCell("Topic",new mxGeometry(320,40,80,20),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;");c.vertex=!0;var d=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");d.geometry.relative=!0;d.edge=!0;b.insertEdge(d,!0);c.insertEdge(d,!1);var e=new mxCell("Branch",new mxGeometry(320,80,72,26),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;"); e.vertex=!0;var g=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");g.geometry.relative=!0;g.edge=!0;b.insertEdge(g,!0);e.insertEdge(g,!1);var t=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;");t.vertex=!0;var u=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;"); @@ -8225,20 +8226,21 @@ mxResources.get("text");c.actions.get("editDiagram").label=mxResources.get("form mxResources.get("outline")+"...";c.actions.get("layers").label=mxResources.get("layers")+"...";c.actions.put("importFile",new Action("File...",function(){d.popupMenuHandler.hideMenu();var a=document.createElement("input");a.setAttribute("type","file");mxEvent.addListener(a,"change",function(){null!=a.files&&c.importFiles(a.files,null,null,c.maxImageSize)});a.click()}));c.actions.put("importCsv",new Action(mxResources.get("csv")+"...",function(){d.popupMenuHandler.hideMenu();c.showImportCsvDialog()})); c.actions.put("importText",new Action(mxResources.get("text")+"...",function(){var a=new ParseDialog(c,"Insert from Text");c.showDialog(a.container,620,420,!0,!1);a.init()}));c.actions.put("formatSql",new Action(mxResources.get("formatSql")+"...",function(){var a=new ParseDialog(c,"Insert from Text","formatSql");c.showDialog(a.container,620,420,!0,!1);a.init()}));c.actions.put("toggleShapes",new Action(mxResources.get("shapes")+"...",function(){b(c)}));c.actions.put("toggleFormat",new Action(mxResources.get("format")+ "...",function(){a(c)}));EditorUi.enablePlantUml&&c.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var a=new ParseDialog(c,"Insert from Text","plantUml");c.showDialog(a.container,620,420,!0,!1);a.init()}));this.put("diagram",new Menu(mxUtils.bind(this,function(a,b){c.menus.addSubmenu("extras",a,b,mxResources.get("preferences"));a.addSeparator(b);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?c.menus.addMenuItems(a,"new open - save saveAs -".split(" "),b):"1"==urlParams.embed? -(c.menus.addMenuItems(a,["-","save"],b),"1"==urlParams.saveAndExit&&c.menus.addMenuItems(a,["saveAndExit"],b),a.addSeparator(b)):(c.menus.addMenuItems(a,["new"],b),c.menus.addSubmenu("openFrom",a,b),a.addSeparator(b),c.menus.addSubmenu("save",a,b));c.menus.addSubmenu("exportAs",a,b);var d=c.getCurrentFile();null!=d&&d.constructor==DriveFile&&(c.menus.addMenuItems(a,["-","share"],b),null!=d.realtime&&c.menus.addMenuItems(a,["chatWindowTitle"],b),a.addSeparator(b));c.menus.addMenuItems(a,"- outline layers - find tags -".split(" "), -b);mxClient.IS_IOS&&navigator.standalone||c.menus.addMenuItems(a,["-","print","-"],b);c.menus.addSubmenu("help",a,b);"1"==urlParams.embed?c.menus.addMenuItems(a,["-","exit"],b):c.menus.addMenuItems(a,["-","close"])})));if(isLocalStorage){var e=this.get("openFrom"),f=e.funct;e.funct=function(a,b){f.apply(this,arguments);a.addSeparator(b);c.menus.addSubmenu("openRecent",a,b)}}this.put("save",new Menu(mxUtils.bind(this,function(a,b){var d=c.getCurrentFile();null!=d&&d.constructor==DriveFile?c.menus.addMenuItems(a, -["createRevision","makeCopy","-","rename","moveToFolder"],b):c.menus.addMenuItems(a,["save","saveAs","-","rename","makeCopy"],b);null==d||d.constructor!=DriveFile&&d.constructor!=DropboxFile||c.menus.addMenuItems(a,["-","revisionHistory"],b);c.menus.addMenuItems(a,["-","autosave"],b)})));var g=this.get("exportAs");this.put("exportAs",new Menu(mxUtils.bind(this,function(a,b){g.funct(a,b);a.addSeparator(b);c.menus.addSubmenu("embed",a,b);c.menus.addMenuItems(a,["publishLink"],b)})));var h=this.get("language"); -this.put("extras",new Menu(mxUtils.bind(this,function(a,b){"1"!=urlParams.embed&&c.menus.addSubmenu("theme",a,b);null!=h&&c.menus.addSubmenu("language",a,b);a.addSeparator(b);c.menus.addMenuItems(a,["scrollbars","tooltips","pageScale"],b);"1"!=urlParams.embed&&isLocalStorage&&c.menus.addMenuItems(a,["-","search","scratchpad","-","showStartScreen"],b);c.isOfflineApp()||"1"==urlParams.embed||c.menus.addMenuItems(a,["-","plugins"],b)})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(a, -b){c.menus.addMenuItems(a,"importText createShape plantUml - importCsv formatSql editDiagram".split(" "),b)})));mxResources.parse("insertLayout="+mxResources.get("layout"));mxResources.parse("insertAdvanced="+mxResources.get("advanced"));this.put("insert",new Menu(mxUtils.bind(this,function(a,b){c.menus.addMenuItems(a,"insertRectangle insertEllipse insertRhombus - insertText insertLink - insertImage".split(" "),b);c.menus.addSubmenu("importFrom",a,b);a.addSeparator(b);c.menus.addSubmenu("insertLayout", -a,b);c.menus.addSubmenu("insertAdvanced",a,b)})));var k="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),l=function(a,b,d,e){a.addItem(d,null,mxUtils.bind(this,function(){var a=new CreateGraphDialog(c,d,e);c.showDialog(a.container,620,420,!0,!1);a.init()}),b)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(a,b){for(var c=0;cc)|| -a("diagram");d([e?a("diagram",null,IMAGE_PATH+"/drawlogo-gray.svg",100):null,b(mxResources.get("shapes"),f.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),f.actions.get("image"),e?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTMgMTN2OGg4di04aC04ek0zIDIxaDh2LThIM3Y4ek0zIDN2OGg4VjNIM3ptMTMuNjYtMS4zMUwxMSA3LjM0IDE2LjY2IDEzbDUuNjYtNS42Ni01LjY2LTUuNjV6Ii8+PC9zdmc+":null),b(mxResources.get("format"), -f.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+f.actions.get("formatPanel").shortcut+")",f.actions.get("image"),e?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgM2MtNC45NyAwLTkgNC4wMy05IDlzNC4wMyA5IDkgOWMuODMgMCAxLjUtLjY3IDEuNS0xLjUgMC0uMzktLjE1LS43NC0uMzktMS4wMS0uMjMtLjI2LS4zOC0uNjEtLjM4LS45OSAwLS44My42Ny0xLjUgMS41LTEuNUgxNmMyLjc2IDAgNS0yLjI0IDUtNSAwLTQuNDItNC4wMy04LTktOHptLTUuNSA5Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTNS42NyA5IDYuNSA5IDggOS42NyA4IDEwLjUgNy4zMyAxMiA2LjUgMTJ6bTMtNEM4LjY3IDggOCA3LjMzIDggNi41UzguNjcgNSA5LjUgNXMxLjUuNjcgMS41IDEuNVMxMC4zMyA4IDkuNSA4em01IDBjLS44MyAwLTEuNS0uNjctMS41LTEuNVMxMy42NyA1IDE0LjUgNXMxLjUuNjcgMS41IDEuNVMxNS4zMyA4IDE0LjUgOHptMyA0Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTMTYuNjcgOSAxNy41IDlzMS41LjY3IDEuNSAxLjUtLjY3IDEuNS0xLjUgMS41eiIvPjwvc3ZnPg==": +(c.menus.addMenuItems(a,["-","save"],b),"1"==urlParams.saveAndExit&&c.menus.addMenuItems(a,["saveAndExit"],b),a.addSeparator(b)):(c.menus.addMenuItems(a,["new"],b),c.menus.addSubmenu("openFrom",a,b),a.addSeparator(b),c.menus.addSubmenu("save",a,b));c.menus.addSubmenu("exportAs",a,b);var d=c.getCurrentFile();null!=d&&d.constructor==DriveFile&&(c.menus.addMenuItems(a,["-","share"],b),null!=d.realtime&&c.menus.addMenuItems(a,["chatWindowTitle"],b),a.addSeparator(b));c.menus.addMenuItems(a,["-","outline", +"layers","-","find"],b);d=this.addMenuItem(a,"tags",b);c.isOffline()&&!mxClient.IS_CHROMEAPP||c.menus.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000046966");a.addSeparator(b);mxClient.IS_IOS&&navigator.standalone||c.menus.addMenuItems(a,["-","print","-"],b);c.menus.addSubmenu("help",a,b);"1"==urlParams.embed?c.menus.addMenuItems(a,["-","exit"],b):c.menus.addMenuItems(a,["-","close"])})));if(isLocalStorage){var e=this.get("openFrom"),f=e.funct;e.funct=function(a,b){f.apply(this, +arguments);a.addSeparator(b);c.menus.addSubmenu("openRecent",a,b)}}this.put("save",new Menu(mxUtils.bind(this,function(a,b){var d=c.getCurrentFile();null!=d&&d.constructor==DriveFile?c.menus.addMenuItems(a,["createRevision","makeCopy","-","rename","moveToFolder"],b):c.menus.addMenuItems(a,["save","saveAs","-","rename","makeCopy"],b);null==d||d.constructor!=DriveFile&&d.constructor!=DropboxFile||c.menus.addMenuItems(a,["-","revisionHistory"],b);c.menus.addMenuItems(a,["-","autosave"],b)})));var g= +this.get("exportAs");this.put("exportAs",new Menu(mxUtils.bind(this,function(a,b){g.funct(a,b);a.addSeparator(b);c.menus.addSubmenu("embed",a,b);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||c.menus.addMenuItems(a,["publishLink"],b)})));var h=this.get("language");this.put("extras",new Menu(mxUtils.bind(this,function(a,b){"1"!=urlParams.embed&&c.menus.addSubmenu("theme",a,b);null!=h&&c.menus.addSubmenu("language",a,b);a.addSeparator(b);c.menus.addMenuItems(a,["scrollbars","tooltips","pageScale"], +b);"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&c.menus.addMenuItems(a,["-","search","scratchpad","-","showStartScreen"],b);if(!c.isOfflineApp()&&"1"!=urlParams.embed&&isLocalStorage){a.addSeparator(b);var d=c.menus.addMenuItem(a,"plugins",b);c.isOffline()||c.menus.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000056430")}})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(a,b){c.menus.addMenuItems(a,"importText createShape plantUml - importCsv formatSql editDiagram".split(" "), +b)})));mxResources.parse("insertLayout="+mxResources.get("layout"));mxResources.parse("insertAdvanced="+mxResources.get("advanced"));this.put("insert",new Menu(mxUtils.bind(this,function(a,b){c.menus.addMenuItems(a,"insertRectangle insertEllipse insertRhombus - insertText insertLink - insertImage".split(" "),b);c.menus.addSubmenu("importFrom",a,b);a.addSeparator(b);c.menus.addSubmenu("insertLayout",a,b);c.menus.addSubmenu("insertAdvanced",a,b)})));var k="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "), +l=function(a,b,d,e){a.addItem(d,null,mxUtils.bind(this,function(){var a=new CreateGraphDialog(c,d,e);c.showDialog(a.container,620,420,!0,!1);a.init()}),b)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(a,b){for(var c=0;cc)||a("diagram");d([e?a("diagram",null,IMAGE_PATH+"/drawlogo-gray.svg", +100):null,b(mxResources.get("shapes"),f.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),f.actions.get("image"),e?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTMgMTN2OGg4di04aC04ek0zIDIxaDh2LThIM3Y4ek0zIDN2OGg4VjNIM3ptMTMuNjYtMS4zMUwxMSA3LjM0IDE2LjY2IDEzbDUuNjYtNS42Ni01LjY2LTUuNjV6Ii8+PC9zdmc+":null),b(mxResources.get("format"),f.actions.get("toggleFormat").funct,null,mxResources.get("format")+ +" ("+f.actions.get("formatPanel").shortcut+")",f.actions.get("image"),e?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgM2MtNC45NyAwLTkgNC4wMy05IDlzNC4wMyA5IDkgOWMuODMgMCAxLjUtLjY3IDEuNS0xLjUgMC0uMzktLjE1LS43NC0uMzktMS4wMS0uMjMtLjI2LS4zOC0uNjEtLjM4LS45OSAwLS44My42Ny0xLjUgMS41LTEuNUgxNmMyLjc2IDAgNS0yLjI0IDUtNSAwLTQuNDItNC4wMy04LTktOHptLTUuNSA5Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTNS42NyA5IDYuNSA5IDggOS42NyA4IDEwLjUgNy4zMyAxMiA2LjUgMTJ6bTMtNEM4LjY3IDggOCA3LjMzIDggNi41UzguNjcgNSA5LjUgNXMxLjUuNjcgMS41IDEuNVMxMC4zMyA4IDkuNSA4em01IDBjLS44MyAwLTEuNS0uNjctMS41LTEuNVMxMy42NyA1IDE0LjUgNXMxLjUuNjcgMS41IDEuNVMxNS4zMyA4IDE0LjUgOHptMyA0Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTMTYuNjcgOSAxNy41IDlzMS41LjY3IDEuNSAxLjUtLjY3IDEuNS0xLjUgMS41eiIvPjwvc3ZnPg==": null)]);var l=a("insert",!0,e?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTkgMTNoLTZ2NmgtMnYtNkg1di0yaDZWNWgydjZoNnYyeiIvPjwvc3ZnPg==":null,40);d([l,b(mxResources.get("delete"),f.actions.get("delete").funct,null,mxResources.get("delete"),f.actions.get("delete"),e?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNNiAxOWMwIDEuMS45IDIgMiAyaDhjMS4xIDAgMi0uOSAyLTJWN0g2djEyek0xOSA0aC0zLjVsLTEtMWgtNWwtMSAxSDV2MmgxNFY0eiIvPjwvc3ZnPg==": null)]);if(480<=c){var m=f.actions.get("undo"),e=f.actions.get("redo"),m=b("",m.funct,null,mxResources.get("undo")+" ("+m.shortcut+")",m,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIuNSA4Yy0yLjY1IDAtNS4wNS45OS02LjkgMi42TDIgN3Y5aDlsLTMuNjItMy42MmMxLjM5LTEuMTYgMy4xNi0xLjg4IDUuMTItMS44OCAzLjU0IDAgNi41NSAyLjMxIDcuNiA1LjVsMi4zNy0uNzhDMjEuMDggMTEuMDMgMTcuMTUgOCAxMi41IDh6Ii8+PC9zdmc+"),e=b("",e.funct, null,mxResources.get("redo")+" ("+e.shortcut+")",e,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTguNCAxMC42QzE2LjU1IDguOTkgMTQuMTUgOCAxMS41IDhjLTQuNjUgMC04LjU4IDMuMDMtOS45NiA3LjIyTDMuOSAxNmMxLjA1LTMuMTkgNC4wNS01LjUgNy42LTUuNSAxLjk1IDAgMy43My43MiA1LjEyIDEuODhMMTMgMTZoOVY3bC0zLjYgMy42eiIvPjwvc3ZnPg==");d([m,e]);if(560<=c){var e=f.actions.get("zoomIn"),m=f.actions.get("zoomOut"),n=f.actions.get("resetView"); diff --git a/src/main/webapp/js/atlas-viewer.min.js b/src/main/webapp/js/atlas-viewer.min.js index ae8b6636..7c94a57d 100644 --- a/src/main/webapp/js/atlas-viewer.min.js +++ b/src/main/webapp/js/atlas-viewer.min.js @@ -1983,14 +1983,14 @@ this.updateGraphComponents();this.fireEvent(new mxEventObject("resetGraphView")) Editor.prototype.getGraphXml=function(a){a=(null!=a?a:1)?(new mxCodec(mxUtils.createXmlDocument())).encode(this.graph.getModel()):this.graph.encodeCells(mxUtils.sortCells(this.graph.model.getTopmostCells(this.graph.getSelectionCells())));if(0!=this.graph.view.translate.x||0!=this.graph.view.translate.y)a.setAttribute("dx",Math.round(100*this.graph.view.translate.x)/100),a.setAttribute("dy",Math.round(100*this.graph.view.translate.y)/100);a.setAttribute("grid",this.graph.isGridEnabled()?"1":"0");a.setAttribute("gridSize", this.graph.gridSize);a.setAttribute("guides",this.graph.graphHandler.guidesEnabled?"1":"0");a.setAttribute("tooltips",this.graph.tooltipHandler.isEnabled()?"1":"0");a.setAttribute("connect",this.graph.connectionHandler.isEnabled()?"1":"0");a.setAttribute("arrows",this.graph.connectionArrowsEnabled?"1":"0");a.setAttribute("fold",this.graph.foldingEnabled?"1":"0");a.setAttribute("page",this.graph.pageVisible?"1":"0");a.setAttribute("pageScale",this.graph.pageScale);a.setAttribute("pageWidth",this.graph.pageFormat.width); a.setAttribute("pageHeight",this.graph.pageFormat.height);null!=this.graph.background&&a.setAttribute("background",this.graph.background);return a};Editor.prototype.updateGraphComponents=function(){var a=this.graph;null!=a.container&&(a.view.validateBackground(),a.container.style.overflow=a.scrollbars?"auto":"hidden",this.fireEvent(new mxEventObject("updateGraphComponents")))};Editor.prototype.setModified=function(a){this.modified=a};Editor.prototype.setFilename=function(a){this.filename=a}; -Editor.prototype.createUndoManager=function(){var a=this.graph,d=new mxUndoManager;this.undoListener=function(a,e){d.undoableEditHappened(e.getProperty("edit"))};var e=mxUtils.bind(this,function(a,d){this.undoListener.apply(this,arguments)});a.getModel().addListener(mxEvent.UNDO,e);a.getView().addListener(mxEvent.UNDO,e);e=function(b,d){for(var e=a.getSelectionCellsForChanges(d.getProperty("edit").changes),k=a.getModel(),r=[],v=0;vdocument.documentMode)&&(v=80);e+=v;b+=v;var c=e,f=b,g=Math.max(document.body.clientHeight,document.documentElement.clientHeight),u=Math.max(1,Math.round((document.body.clientWidth-e-64)/2)),t=Math.max(1,Math.round((g-b-a.footerHeight)/3));mxClient.IS_QUIRKS||(d.style.maxHeight="100%");e=Math.min(e,document.body.scrollWidth-64);b=Math.min(b,g-64);0document.documentMode)&&(v=80);e+=v;b+=v;var c=e,f=b,g=Math.max(document.body.clientHeight,document.documentElement.clientHeight),u=Math.max(1,Math.round((document.body.clientWidth-e-64)/2)),t=Math.max(1,Math.round((g-b-a.footerHeight)/3));mxClient.IS_QUIRKS||(d.style.maxHeight="100%");e=Math.min(e,document.body.scrollWidth-64);b=Math.min(b,g-64);0n.clientHeight-64&&(d.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=t+14+"px",m.style.left=u+e+38-v+"px",m.style.zIndex=this.zIndex,mxEvent.addListener(m,"click", +e,b);u=k.x;t=k.y;n.style.width=e+"px";n.style.height=b+"px";n.style.left=u+"px";n.style.top=t+"px";n.style.zIndex=this.zIndex;n.appendChild(d);document.body.appendChild(n);!q&&d.clientHeight>n.clientHeight-64&&(d.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=t+14+"px",m.style.left=u+e+38-v+"px",m.style.zIndex=this.zIndex,mxEvent.addListener(m,"click", mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(m),this.dialogImg=m,mxEvent.addGestureListeners(this.bg,null,null,mxUtils.bind(this,function(c){a.hideDialog(!0)})));this.resizeListener=mxUtils.bind(this,function(){g=Math.max(document.body.clientHeight,document.documentElement.clientHeight);this.bg.style.height=g+"px";u=Math.max(1,Math.round((document.body.clientWidth-e-64)/2));t=Math.max(1,Math.round((g-b-a.footerHeight)/3));e=Math.min(c,document.body.scrollWidth-64);b= -Math.min(f,g-64);var l=this.getPosition(u,t,e,b);u=l.x;t=l.y;n.style.left=u+"px";n.style.top=t+"px";n.style.width=e+"px";n.style.height=b+"px";!r&&d.clientHeight>n.clientHeight-64&&(d.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=t+14+"px",this.dialogImg.style.left=u+e+38-v+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=p;this.container=n;a.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white"; +Math.min(f,g-64);var l=this.getPosition(u,t,e,b);u=l.x;t=l.y;n.style.left=u+"px";n.style.top=t+"px";n.style.width=e+"px";n.style.height=b+"px";!q&&d.clientHeight>n.clientHeight-64&&(d.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=t+14+"px",this.dialogImg.style.left=u+e+38-v+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=p;this.container=n;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"; @@ -2001,29 +2001,29 @@ Dialog.prototype.lockedImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoA 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,d){return new mxPoint(a,d)};Dialog.prototype.close=function(a){null!=this.onDialogClose&&(this.onDialogClose(a),this.onDialogClose=null);null!=this.dialogImg&&(this.dialogImg.parentNode.removeChild(this.dialogImg),this.dialogImg=null);null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);mxEvent.removeListener(window,"resize",this.resizeListener);this.container.parentNode.removeChild(this.container)}; var PrintDialog=function(a,d){this.create(a,d)}; -PrintDialog.prototype.create=function(a){function d(a){var b=r.checked||c.checked,d=parseInt(g.value)/100;isNaN(d)&&(d=1,g.value="100%");var d=.75*d,l=e.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,u=1/e.pageScale;if(b){var q=r.checked?1:parseInt(f.value);isNaN(q)||(u=mxUtils.getScaleForPageCount(q,e,l))}e.getGraphBounds();var t=q=0,l=mxRectangle.fromRectangle(l);l.width=Math.ceil(l.width*d);l.height=Math.ceil(l.height*d);u*=d;!b&&e.pageVisible?(d=e.getPageLayout(),q-=d.x*l.width,t-=d.y*l.height): -b=!0;b=PrintDialog.createPrintPreview(e,u,l,0,q,t,b);b.open();a&&PrintDialog.printPreview(b)}var e=a.editor.graph,b,k,m=document.createElement("table");m.style.width="100%";m.style.height="100%";var p=document.createElement("tbody");b=document.createElement("tr");var r=document.createElement("input");r.setAttribute("type","checkbox");k=document.createElement("td");k.setAttribute("colspan","2");k.style.fontSize="10pt";k.appendChild(r);var v=document.createElement("span");mxUtils.write(v," "+mxResources.get("fitPage")); -k.appendChild(v);mxEvent.addListener(v,"click",function(a){r.checked=!r.checked;c.checked=!r.checked;mxEvent.consume(a)});mxEvent.addListener(r,"change",function(){c.checked=!r.checked});b.appendChild(k);p.appendChild(b);b=b.cloneNode(!1);var c=document.createElement("input");c.setAttribute("type","checkbox");k=document.createElement("td");k.style.fontSize="10pt";k.appendChild(c);v=document.createElement("span");mxUtils.write(v," "+mxResources.get("posterPrint")+":");k.appendChild(v);mxEvent.addListener(v, -"click",function(a){c.checked=!c.checked;r.checked=!c.checked;mxEvent.consume(a)});b.appendChild(k);var f=document.createElement("input");f.setAttribute("value","1");f.setAttribute("type","number");f.setAttribute("min","1");f.setAttribute("size","4");f.setAttribute("disabled","disabled");f.style.width="50px";k=document.createElement("td");k.style.fontSize="10pt";k.appendChild(f);mxUtils.write(k," "+mxResources.get("pages")+" (max)");b.appendChild(k);p.appendChild(b);mxEvent.addListener(c,"change", -function(){c.checked?f.removeAttribute("disabled"):f.setAttribute("disabled","disabled");r.checked=!c.checked});b=b.cloneNode(!1);k=document.createElement("td");mxUtils.write(k,mxResources.get("pageScale")+":");b.appendChild(k);k=document.createElement("td");var g=document.createElement("input");g.setAttribute("value","100 %");g.setAttribute("size","5");g.style.width="50px";k.appendChild(g);b.appendChild(k);p.appendChild(b);b=document.createElement("tr");k=document.createElement("td");k.colSpan=2; +PrintDialog.prototype.create=function(a){function d(a){var b=q.checked||c.checked,d=parseInt(g.value)/100;isNaN(d)&&(d=1,g.value="100%");var d=.75*d,l=e.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,u=1/e.pageScale;if(b){var r=q.checked?1:parseInt(f.value);isNaN(r)||(u=mxUtils.getScaleForPageCount(r,e,l))}e.getGraphBounds();var t=r=0,l=mxRectangle.fromRectangle(l);l.width=Math.ceil(l.width*d);l.height=Math.ceil(l.height*d);u*=d;!b&&e.pageVisible?(d=e.getPageLayout(),r-=d.x*l.width,t-=d.y*l.height): +b=!0;b=PrintDialog.createPrintPreview(e,u,l,0,r,t,b);b.open();a&&PrintDialog.printPreview(b)}var e=a.editor.graph,b,k,m=document.createElement("table");m.style.width="100%";m.style.height="100%";var p=document.createElement("tbody");b=document.createElement("tr");var q=document.createElement("input");q.setAttribute("type","checkbox");k=document.createElement("td");k.setAttribute("colspan","2");k.style.fontSize="10pt";k.appendChild(q);var v=document.createElement("span");mxUtils.write(v," "+mxResources.get("fitPage")); +k.appendChild(v);mxEvent.addListener(v,"click",function(a){q.checked=!q.checked;c.checked=!q.checked;mxEvent.consume(a)});mxEvent.addListener(q,"change",function(){c.checked=!q.checked});b.appendChild(k);p.appendChild(b);b=b.cloneNode(!1);var c=document.createElement("input");c.setAttribute("type","checkbox");k=document.createElement("td");k.style.fontSize="10pt";k.appendChild(c);v=document.createElement("span");mxUtils.write(v," "+mxResources.get("posterPrint")+":");k.appendChild(v);mxEvent.addListener(v, +"click",function(a){c.checked=!c.checked;q.checked=!c.checked;mxEvent.consume(a)});b.appendChild(k);var f=document.createElement("input");f.setAttribute("value","1");f.setAttribute("type","number");f.setAttribute("min","1");f.setAttribute("size","4");f.setAttribute("disabled","disabled");f.style.width="50px";k=document.createElement("td");k.style.fontSize="10pt";k.appendChild(f);mxUtils.write(k," "+mxResources.get("pages")+" (max)");b.appendChild(k);p.appendChild(b);mxEvent.addListener(c,"change", +function(){c.checked?f.removeAttribute("disabled"):f.setAttribute("disabled","disabled");q.checked=!c.checked});b=b.cloneNode(!1);k=document.createElement("td");mxUtils.write(k,mxResources.get("pageScale")+":");b.appendChild(k);k=document.createElement("td");var g=document.createElement("input");g.setAttribute("value","100 %");g.setAttribute("size","5");g.style.width="50px";k.appendChild(g);b.appendChild(k);p.appendChild(b);b=document.createElement("tr");k=document.createElement("td");k.colSpan=2; k.style.paddingTop="20px";k.setAttribute("align","right");v=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});v.className="geBtn";a.editor.cancelFirst&&k.appendChild(v);if(PrintDialog.previewEnabled){var u=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();d(!1)});u.className="geBtn";k.appendChild(u)}u=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();d(!0)});u.className="geBtn gePrimaryBtn";k.appendChild(u);a.editor.cancelFirst|| k.appendChild(v);b.appendChild(k);p.appendChild(b);m.appendChild(p);this.container=m};PrintDialog.printPreview=function(a){if(null!=a.wnd){var d=function(){a.wnd.focus();a.wnd.print();a.wnd.close()};mxClient.IS_GC?window.setTimeout(d,500):d()}}; -PrintDialog.createPrintPreview=function(a,d,e,b,k,m,p){d=new mxPrintPreview(a,d,e,b,k,m);d.title=mxResources.get("preview");d.printBackgroundImage=!0;d.autoOrigin=p;a=a.background;if(null==a||""==a||a==mxConstants.NONE)a="#ffffff";d.backgroundColor=a;var r=d.writeHead;d.writeHead=function(a){r.apply(this,arguments);a.writeln('")};return d}; +PrintDialog.createPrintPreview=function(a,d,e,b,k,m,p){d=new mxPrintPreview(a,d,e,b,k,m);d.title=mxResources.get("preview");d.printBackgroundImage=!0;d.autoOrigin=p;a=a.background;if(null==a||""==a||a==mxConstants.NONE)a="#ffffff";d.backgroundColor=a;var q=d.writeHead;d.writeHead=function(a){q.apply(this,arguments);a.writeln('")};return d}; PrintDialog.previewEnabled=!0; var PageSetupDialog=function(a){function d(){null==f||f==mxConstants.NONE?(c.style.backgroundColor="",c.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(c.style.backgroundColor=f,c.style.backgroundImage="")}function e(){null==t?(u.removeAttribute("title"),u.style.fontSize="",u.innerHTML=mxResources.get("change")+"..."):(u.setAttribute("title",t.src),u.style.fontSize="11px",u.innerHTML=t.src.substring(0,42)+"...")}var b=a.editor.graph,k,m,p=document.createElement("table");p.style.width= -"100%";p.style.height="100%";var r=document.createElement("tbody");k=document.createElement("tr");m=document.createElement("td");m.style.verticalAlign="top";m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("paperSize")+":");k.appendChild(m);m=document.createElement("td");m.style.verticalAlign="top";m.style.fontSize="10pt";var v=PageSetupDialog.addPageFormatPanel(m,"pagesetupdialog",b.pageFormat);k.appendChild(m);r.appendChild(k);k=document.createElement("tr");m=document.createElement("td"); +"100%";p.style.height="100%";var q=document.createElement("tbody");k=document.createElement("tr");m=document.createElement("td");m.style.verticalAlign="top";m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("paperSize")+":");k.appendChild(m);m=document.createElement("td");m.style.verticalAlign="top";m.style.fontSize="10pt";var v=PageSetupDialog.addPageFormatPanel(m,"pagesetupdialog",b.pageFormat);k.appendChild(m);q.appendChild(k);k=document.createElement("tr");m=document.createElement("td"); mxUtils.write(m,mxResources.get("background")+":");k.appendChild(m);m=document.createElement("td");m.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var c=document.createElement("button");c.style.width="18px";c.style.height="18px";c.style.marginRight="20px";c.style.backgroundPosition="center center";c.style.backgroundRepeat="no-repeat";var f=b.background;d();mxEvent.addListener(c,"click",function(c){a.pickColor(f||"none",function(a){f=a;d()});mxEvent.consume(c)}); -m.appendChild(c);mxUtils.write(m,mxResources.get("gridSize")+":");var g=document.createElement("input");g.setAttribute("type","number");g.setAttribute("min","0");g.style.width="40px";g.style.marginLeft="6px";g.value=b.getGridSize();m.appendChild(g);mxEvent.addListener(g,"change",function(){var a=parseInt(g.value);g.value=Math.max(1,isNaN(a)?b.getGridSize():a)});k.appendChild(m);r.appendChild(k);k=document.createElement("tr");m=document.createElement("td");mxUtils.write(m,mxResources.get("image")+ -":");k.appendChild(m);m=document.createElement("td");var u=document.createElement("a");u.style.textDecoration="underline";u.style.cursor="pointer";u.style.color="#a0a0a0";var t=b.backgroundImage;mxEvent.addListener(u,"click",function(c){a.showBackgroundImageDialog(function(a){t=a;e()});mxEvent.consume(c)});e();m.appendChild(u);k.appendChild(m);r.appendChild(k);k=document.createElement("tr");m=document.createElement("td");m.colSpan=2;m.style.paddingTop="16px";m.setAttribute("align","right");var h= +m.appendChild(c);mxUtils.write(m,mxResources.get("gridSize")+":");var g=document.createElement("input");g.setAttribute("type","number");g.setAttribute("min","0");g.style.width="40px";g.style.marginLeft="6px";g.value=b.getGridSize();m.appendChild(g);mxEvent.addListener(g,"change",function(){var a=parseInt(g.value);g.value=Math.max(1,isNaN(a)?b.getGridSize():a)});k.appendChild(m);q.appendChild(k);k=document.createElement("tr");m=document.createElement("td");mxUtils.write(m,mxResources.get("image")+ +":");k.appendChild(m);m=document.createElement("td");var u=document.createElement("a");u.style.textDecoration="underline";u.style.cursor="pointer";u.style.color="#a0a0a0";var t=b.backgroundImage;mxEvent.addListener(u,"click",function(c){a.showBackgroundImageDialog(function(a){t=a;e()});mxEvent.consume(c)});e();m.appendChild(u);k.appendChild(m);q.appendChild(k);k=document.createElement("tr");m=document.createElement("td");m.colSpan=2;m.style.paddingTop="16px";m.setAttribute("align","right");var h= mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});h.className="geBtn";a.editor.cancelFirst&&m.appendChild(h);var n=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();b.gridSize!==g.value&&b.setGridSize(parseInt(g.value));var c=new ChangePageSetup(a,f,t,v.get());c.ignoreColor=b.background==f;c.ignoreImage=(null!=b.backgroundImage?b.backgroundImage.src:null)===(null!=t?t.src:null);b.pageFormat.width==c.previousFormat.width&&b.pageFormat.height==c.previousFormat.height&& -c.ignoreColor&&c.ignoreImage||b.model.execute(c)});n.className="geBtn gePrimaryBtn";m.appendChild(n);a.editor.cancelFirst||m.appendChild(h);k.appendChild(m);r.appendChild(k);p.appendChild(r);this.container=p}; -PageSetupDialog.addPageFormatPanel=function(a,d,e,b){function k(a,c,b){if(b||g!=document.activeElement&&u!=document.activeElement){a=!1;for(c=0;c'};var a=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(b,d){a.apply(this,arguments);if(null!=this.shiftPreview1){var c= this.view.canvas;null!=c.ownerSVGElement&&(c=c.ownerSVGElement);var f=this.gridSize*this.view.scale*this.view.gridSteps,f=-Math.round(f-mxUtils.mod(this.view.translate.x*this.view.scale+b,f))+"px "+-Math.round(f-mxUtils.mod(this.view.translate.y*this.view.scale+d,f))+"px";c.style.backgroundPosition=f}};mxGraph.prototype.updatePageBreaks=function(a,b,c){var d=this.view.scale,g=this.view.translate,e=this.pageFormat,t=d*this.pageScale,h=this.view.getBackgroundPageBounds();b=h.width;c=h.height;var n= -new mxRectangle(d*g.x,d*g.y,e.width*t,e.height*t),l=(a=a&&Math.min(n.width,n.height)>this.minPageBreakDist)?Math.ceil(c/n.height)-1:0,w=a?Math.ceil(b/n.width)-1:0,q=h.x+b,r=h.y+c;null==this.horizontalPageBreaks&&0this.minPageBreakDist)?Math.ceil(c/n.height)-1:0,w=a?Math.ceil(b/n.width)-1:0,r=h.x+b,q=h.y+c;null==this.horizontalPageBreaks&&0document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",d):this.diagramContainer.oncontextmenu=d):b.panningHandler.usePopupTrigger=!1;b.init(this.diagramContainer);mxClient.IS_SVG&&null!=b.view.getDrawPane()&&(d=b.view.getDrawPane().ownerSVGElement,null!=d&&(d.style.position="absolute"));this.hoverIcons=this.createHoverIcons(); mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(a){var c=mxUtils.getOffset(this.diagramContainer);0mxUtils.indexOf(this.toolbar.staticElements,a)&&(a.parentNode.removeChild(a),d.push(a));a=e}a=this.toolbar.fontMenu;e=this.toolbar.sizeMenu;if(null==u)this.toolbar.createTextToolbar();else{for(var l=0;lmxUtils.indexOf(q,y[a])&&q.push(y[a]);var E=function(a,c){var d=b.getModel(); -d.beginUpdate();try{if(c)for(var f=d.isEdge(u),g=f?b.currentEdgeStyle:b.currentVertexStyle,f=["fontSize","fontFamily","fontColor"],e=0;emxUtils.indexOf(y,k))||(v=mxUtils.setStyle(v,k,J))}d.setStyle(u,v)}}finally{d.endUpdate()}};b.addListener("cellsInserted",function(a,c){E(c.getProperty("cells"))});b.addListener("textInserted",function(a,c){E(c.getProperty("cells"),!0)});b.connectionHandler.addListener(mxEvent.CONNECT, +["fontFamily","fontSize","fontColor"],z="edgeStyle startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),G=["startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),["strokeColor","strokeWidth"],["fillColor","gradientColor"],D,["opacity"],["align"],["html"]];for(a=0;amxUtils.indexOf(r,y[a])&&r.push(y[a]);var E=function(a,c){var d=b.getModel(); +d.beginUpdate();try{if(c)for(var f=d.isEdge(u),g=f?b.currentEdgeStyle:b.currentVertexStyle,f=["fontSize","fontFamily","fontColor"],e=0;emxUtils.indexOf(y,k))||(v=mxUtils.setStyle(v,k,J))}d.setStyle(u,v)}}finally{d.endUpdate()}};b.addListener("cellsInserted",function(a,c){E(c.getProperty("cells"))});b.addListener("textInserted",function(a,c){E(c.getProperty("cells"),!0)});b.connectionHandler.addListener(mxEvent.CONNECT, function(a,c){var b=[c.getProperty("cell")];c.getProperty("terminalInserted")&&b.push(c.getProperty("terminal"));E(b)});this.addListener("styleChanged",mxUtils.bind(this,function(a,c){var d=c.getProperty("cells"),f=!1,g=!1;if(0this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor=(this.view.scale+.01)/this.view.scale:(this.cumulativeZoomFactor*=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor= (this.view.scale-.01)/this.view.scale:(this.cumulativeZoomFactor/=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale);this.cumulativeZoomFactor=Math.max(.01,Math.min(this.view.scale*this.cumulativeZoomFactor,160)/this.view.scale);this.updateZoomTimeout=window.setTimeout(mxUtils.bind(this,function(){var c=mxUtils.getOffset(a.container),b=0,f=0;null!=D&&(b=a.container.offsetWidth/2-D.x+c.x,f=a.container.offsetHeight/2-D.y+c.y);c=this.view.scale; @@ -2136,11 +2136,11 @@ this.actions.get("collapsible").setEnabled(e&&(a.isContainer(a.getSelectionCell( this.actions.get("editLink").setEnabled(1==a.getSelectionCount());this.actions.get("openLink").setEnabled(1==a.getSelectionCount()&&null!=a.getLinkForCell(a.getSelectionCell()));this.actions.get("guides").setEnabled(a.isEnabled());this.actions.get("grid").setEnabled(!this.editor.chromeless||this.editor.editable);d=a.isEnabled()&&!a.isCellLocked(a.getDefaultParent());this.menus.get("layout").setEnabled(d);this.menus.get("insert").setEnabled(d);this.menus.get("direction").setEnabled(d&&e);this.menus.get("align").setEnabled(d&& e&&1screen.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 d=document.createElement("div");d.className=a;return d}; -EditorUi.prototype.addSplitHandler=function(a,d,e,b){function k(a){if(null!=p){var g=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a));b(Math.max(0,r+(d?g.x-p.x:p.y-g.y)-e));mxEvent.consume(a);r!=f()&&(v=!0,c=null)}}function m(a){k(a);p=r=null}var p=null,r=null,v=!0,c=null;mxClient.IS_POINTER&&(a.style.touchAction="none");var f=mxUtils.bind(this,function(){var c=parseInt(d?a.style.left:a.style.bottom);d||(c=c+e-this.footerHeight);return c});mxEvent.addGestureListeners(a,function(a){p=new mxPoint(mxEvent.getClientX(a), -mxEvent.getClientY(a));r=f();v=!1;mxEvent.consume(a)});mxEvent.addListener(a,"click",function(a){if(!v){var d=null!=c?c-e:0;c=f();b(d);mxEvent.consume(a)}});mxEvent.addGestureListeners(document,null,k,m);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,k,m)})};EditorUi.prototype.showDialog=function(a,d,e,b,k,m,p){this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,a,d,e,b,k,m,p);this.dialogs.push(this.dialog)}; +EditorUi.prototype.addSplitHandler=function(a,d,e,b){function k(a){if(null!=p){var g=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a));b(Math.max(0,q+(d?g.x-p.x:p.y-g.y)-e));mxEvent.consume(a);q!=f()&&(v=!0,c=null)}}function m(a){k(a);p=q=null}var p=null,q=null,v=!0,c=null;mxClient.IS_POINTER&&(a.style.touchAction="none");var f=mxUtils.bind(this,function(){var c=parseInt(d?a.style.left:a.style.bottom);d||(c=c+e-this.footerHeight);return c});mxEvent.addGestureListeners(a,function(a){p=new mxPoint(mxEvent.getClientX(a), +mxEvent.getClientY(a));q=f();v=!1;mxEvent.consume(a)});mxEvent.addListener(a,"click",function(a){if(!v){var d=null!=c?c-e:0;c=f();b(d);mxEvent.consume(a)}});mxEvent.addGestureListeners(document,null,k,m);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,k,m)})};EditorUi.prototype.showDialog=function(a,d,e,b,k,m,p){this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,a,d,e,b,k,m,p);this.dialogs.push(this.dialog)}; EditorUi.prototype.hideDialog=function(a){null!=this.dialogs&&0f||Math.abs(m.y-d.getGraphY())>f){this.isCellSelected(b.cell)||this.setSelectionCell(b.cell);var g=this.selectionCellsHandler.getHandler(b.cell);if(null!=g&&null!=g.bends&&0f||Math.abs(m.y-d.getGraphY())>f){this.isCellSelected(b.cell)||this.setSelectionCell(b.cell);var g=this.selectionCellsHandler.getHandler(b.cell);if(null!=g&&null!=g.bends&&0mxUtils.indexOf(c,f)&&d.push(f)):d.push(c[b])}return d};this.connectionHandler.createTargetVertex=function(a,c){var d=this.graph.view.getState(c),d=null!=d?d.style:this.graph.getCellStyle(c);mxUtils.getValue(d,"part",!1)&&(d=this.graph.model.getParent(c),this.graph.model.isVertex(d)&&(c=d));return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var g=new mxRubberband(this); this.getRubberband=function(){return g};var u=(new Date).getTime(),t=0,h=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var a=this.currentState;h.apply(this,arguments);a!=this.currentState?(u=(new Date).getTime(),t=0):t=(new Date).getTime()-u};var n=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=this.currentState&&a.getState()==this.currentState&&2E3=a&&t.y+t.height<=h&&t.y>=c&&t.x+t.width<=l&&e.push(n);this.getAllCells(a,c,d,b,n,e)}}}return e};var z=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,c,d){return this.graph.isCellSelected(a)?!1:z.apply(this,arguments)};this.isCellLocked=function(a){for(a= +this.getLinkForCell(a))return"pointer";if(this.isCellLocked(a))return"default"}return D.apply(this,arguments)};this.selectRegion=function(a,c){var d=this.getAllCells(a.x,a.y,a.width,a.height);this.selectCellsForEvent(d,c);return d};this.getAllCells=function(a,c,d,b,f,g){g=null!=g?g:[];if(0=a&&t.y+t.height<=h&&t.y>=c&&t.x+t.width<=l&&g.push(n);this.getAllCells(a,c,d,b,n,g)}}}return g};var z=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,c,d){return this.graph.isCellSelected(a)?!1:z.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 G=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,c){if("mouseDown"==c.getProperty("eventName")){var d=c.getProperty("event").getState();G=null==d||this.isSelectionEmpty()||this.isCellSelected(d.cell)?null:this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(a,c){if(!mxEvent.isMultiTouchEvent(c)){var d= c.getProperty("event"),b=c.getProperty("cell");null==b?(d=mxUtils.convertPoint(this.container,mxEvent.getClientX(d),mxEvent.getClientY(d)),g.start(d.x,d.y)):null!=G?this.addSelectionCells(G):1u?"a":"p",tt:12>u?"am":"pm",T:12>u?"A":"P",TT:12>u?"AM":"PM",Z:e?"UTC":(String(a).match(k)||[""]).pop().replace(m,""),o:(0u?"a":"p",tt:12>u?"am":"pm",T:12>u?"A":"P",TT:12>u?"AM":"PM",Z:e?"UTC":(String(a).match(k)||[""]).pop().replace(m,""),o:(0b&&"%"==d.charAt(match.index-1))m=k.substring(1);else{var p=k.substring(1,k.length-1);if(0>p.indexOf("{"))for(var r=a;null==m&&null!=r;)null!=r.value&&"object"==typeof r.value&&(m=r.hasAttribute(p)?null!=r.getAttribute(p)?r.getAttribute(p):"":null),r=this.model.getParent(r);null==m&&(m=this.getGlobalVariable(p))}e.push(d.substring(b, +k.defaultChecked=!0);e.appendChild(k);var q=this.convertValueToString(b)||mxResources.get("background")||"Background";e.setAttribute("title",q);mxUtils.write(e,q);a.appendChild(e);mxEvent.addListener(k,"click",function(){null!=k.getAttribute("checked")?k.removeAttribute("checked"):k.setAttribute("checked","checked");d.setVisible(b,k.checked)})})(d.getChildAt(d.root,b));return a}; +Graph.prototype.replacePlaceholders=function(a,d){var e=[];if(null!=d){for(var b=0;match=this.placeholderPattern.exec(d);){var k=match[0];if(2b&&"%"==d.charAt(match.index-1))m=k.substring(1);else{var p=k.substring(1,k.length-1);if(0>p.indexOf("{"))for(var q=a;null==m&&null!=q;)null!=q.value&&"object"==typeof q.value&&(m=q.hasAttribute(p)?null!=q.getAttribute(p)?q.getAttribute(p):"":null),q=this.model.getParent(q);null==m&&(m=this.getGlobalVariable(p))}e.push(d.substring(b, match.index)+(null!=m?m:k));b=match.index+k.length}}e.push(d.substring(b))}return e.join("")};Graph.prototype.selectCellsForConnectVertex=function(a,d,e){2==a.length&&this.model.isVertex(a[1])?(this.setSelectionCell(a[1]),null!=e&&(mxEvent.isTouchEvent(d)?e.update(e.getState(this.view.getState(a[1]))):e.reset()),this.scrollCellToVisible(a[1])):this.setSelectionCells(a)}; Graph.prototype.connectVertex=function(a,d,e,b,k,m){m=m?m:!1;var p=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);d==mxConstants.DIRECTION_NORTH?(p.x+=a.geometry.width/2,p.y-=e):d==mxConstants.DIRECTION_SOUTH?(p.x+=a.geometry.width/2,p.y+=a.geometry.height+e):(p.x=d==mxConstants.DIRECTION_WEST?p.x-e:p.x+(a.geometry.width+e),p.y+=a.geometry.height/2);e=this.view.getState(this.model.getParent(a)); -var r=this.view.scale,v=this.view.translate,c=v.x*r,v=v.y*r;this.model.isVertex(e.cell)&&(c=e.x,v=e.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(p.x+=a.parent.geometry.x,p.y+=a.parent.geometry.y);m=m||mxEvent.isControlDown(b)&&!k?null:this.getCellAt(c+p.x*r,v+p.y*r);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),r=this.view.getState(m),null!=e&&null!=r&&mxUtils.intersects(e,r)&&(m= -null));if(k=!mxEvent.isShiftDown(b)||k)d==mxConstants.DIRECTION_NORTH?p.y-=a.geometry.height/2:d==mxConstants.DIRECTION_SOUTH?p.y+=a.geometry.height/2:p.x=d==mxConstants.DIRECTION_WEST?p.x-a.geometry.width/2:p.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{r=m;if(null==r&&k){for(var c=a,f=this.getCellGeometry(a);null!= -f&&f.relative;)c=this.getModel().getParent(c),f=this.getCellGeometry(c);var g=this.view.getState(c),u=null!=g?g.style:this.getCellStyle(c);if(mxUtils.getValue(u,"part",!1)){var t=this.model.getParent(c);this.model.isVertex(t)&&(c=t)}r=this.duplicateCells([c],!1)[0];f=this.getCellGeometry(r);null!=f&&(f.x=p.x-f.width/2,f.y=p.y-f.height/2)}f=null;null!=this.layoutManager&&(f=this.layoutManager.getLayout(this.model.getParent(a)));var h=mxEvent.isControlDown(b)&&k||null==m&&null!=f&&f.constructor==mxStackLayout? -null:this.insertEdge(this.model.getParent(a),null,"",a,r,this.createCurrentEdgeStyle());if(null!=h&&this.connectionHandler.insertBeforeSource){var n=null;for(b=a;null!=b.parent&&null!=b.geometry&&b.geometry.relative&&b.parent!=h.parent;)b=this.model.getParent(b);null!=b&&null!=b.parent&&b.parent==h.parent&&(n=b.parent.getIndex(b),this.model.add(b.parent,h,n))}null==m&&null!=r&&null!=f&&null!=a.parent&&f.constructor==mxStackLayout&&d==mxConstants.DIRECTION_WEST&&(n=a.parent.getIndex(a),this.model.add(a.parent, -r,n));null!=h&&e.push(h);null==m&&null!=r&&e.push(r);null==r&&null!=h&&h.geometry.setTerminalPoint(p,!1);null!=h&&this.fireEvent(new mxEventObject("cellsInserted","cells",[h]))}finally{this.model.endUpdate()}return e}; +var q=this.view.scale,v=this.view.translate,c=v.x*q,v=v.y*q;this.model.isVertex(e.cell)&&(c=e.x,v=e.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(p.x+=a.parent.geometry.x,p.y+=a.parent.geometry.y);m=m||mxEvent.isControlDown(b)&&!k?null:this.getCellAt(c+p.x*q,v+p.y*q);this.model.isAncestor(m,a)&&(m=null);for(e=m;null!=e;){if(this.isCellLocked(e)){m=null;break}e=this.model.getParent(e)}null!=m&&(e=this.view.getState(a),q=this.view.getState(m),null!=e&&null!=q&&mxUtils.intersects(e,q)&&(m= +null));if(k=!mxEvent.isShiftDown(b)||k)d==mxConstants.DIRECTION_NORTH?p.y-=a.geometry.height/2:d==mxConstants.DIRECTION_SOUTH?p.y+=a.geometry.height/2:p.x=d==mxConstants.DIRECTION_WEST?p.x-a.geometry.width/2:p.x+a.geometry.width/2;null==m||this.isCellConnectable(m)||(e=this.getModel().getParent(m),this.getModel().isVertex(e)&&this.isCellConnectable(e)&&(m=e));if(m==a||this.model.isEdge(m)||!this.isCellConnectable(m))m=null;e=[];this.model.beginUpdate();try{q=m;if(null==q&&k){for(var c=a,f=this.getCellGeometry(a);null!= +f&&f.relative;)c=this.getModel().getParent(c),f=this.getCellGeometry(c);var g=this.view.getState(c),u=null!=g?g.style:this.getCellStyle(c);if(mxUtils.getValue(u,"part",!1)){var t=this.model.getParent(c);this.model.isVertex(t)&&(c=t)}q=this.duplicateCells([c],!1)[0];f=this.getCellGeometry(q);null!=f&&(f.x=p.x-f.width/2,f.y=p.y-f.height/2)}f=null;null!=this.layoutManager&&(f=this.layoutManager.getLayout(this.model.getParent(a)));var h=mxEvent.isControlDown(b)&&k||null==m&&null!=f&&f.constructor==mxStackLayout? +null:this.insertEdge(this.model.getParent(a),null,"",a,q,this.createCurrentEdgeStyle());if(null!=h&&this.connectionHandler.insertBeforeSource){var n=null;for(b=a;null!=b.parent&&null!=b.geometry&&b.geometry.relative&&b.parent!=h.parent;)b=this.model.getParent(b);null!=b&&null!=b.parent&&b.parent==h.parent&&(n=b.parent.getIndex(b),this.model.add(b.parent,h,n))}null==m&&null!=q&&null!=f&&null!=a.parent&&f.constructor==mxStackLayout&&d==mxConstants.DIRECTION_WEST&&(n=a.parent.getIndex(a),this.model.add(a.parent, +q,n));null!=h&&e.push(h);null==m&&null!=q&&e.push(q);null==q&&null!=h&&h.geometry.setTerminalPoint(p,!1);null!=h&&this.fireEvent(new mxEventObject("cellsInserted","cells",[h]))}finally{this.model.endUpdate()}return e}; Graph.prototype.getIndexableText=function(){var a=document.createElement("div"),d=[],e,b;for(b in this.model.cells)if(e=this.model.cells[b],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," ")),0t||Math.abs(q.y-m.y)>t)&&(Math.abs(q.x-p.x)>t||Math.abs(q.y-p.y)>t)){p=q.x-l.x;m=q.y-l.y;q={distSq:p*p+m*m,x:q.x,y:q.y};for(p=0;pq.distSq){w.splice(p,0,q);q=null;break}null==q||0!=w.length&&w[w.length-1].x===q.x&&w[w.length-1].y===q.y||w.push(q)}}}for(r=0;rf*f&&0f*f&&(p=new mxPoint(z.x-q.x,z.y-q.y),r=new mxPoint(z.x+q.x,z.y+q.y),h.push(p),this.addPoints(a,h,d,b,!1, -null,n),h=0>Math.round(q.x)||0==Math.round(q.x)&&0>=Math.round(q.y)?1:-1,n=!1,"sharp"==e?(a.lineTo(p.x-q.y*h,p.y+q.x*h),a.lineTo(r.x-q.y*h,r.y+q.x*h),a.lineTo(r.x,r.y)):"arc"==e?(h*=1.3,a.curveTo(p.x-q.y*h,p.y+q.x*h,r.x-q.y*h,r.y+q.x*h,r.x,r.y)):(a.moveTo(r.x,r.y),n=!0),h=[r],p=!0))}else q=null;p||(h.push(z),l=z)}this.addPoints(a,h,d,b,!1,null,n);a.stroke()}};var m=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(a,c,d,b){if(null==c||null== +this.updateLineJumps(a)};mxGraphView.prototype.updateLineJumps=function(a){var c=a.absolutePoints;if(Graph.lineJumpsEnabled){var d=null!=a.routedPoints,b=null;if(null!=c&&null!=this.validEdges&&"none"!==mxUtils.getValue(a.style,"jumpStyle","none")){for(var e=function(c,d,f){var e=new mxPoint(d,f);e.type=c;b.push(e);e=null!=a.routedPoints?a.routedPoints[b.length-1]:null;return null==e||e.type!=c||e.x!=d||e.y!=f},t=.5*this.scale,d=!1,b=[],h=0;ht||Math.abs(r.y-m.y)>t)&&(Math.abs(r.x-p.x)>t||Math.abs(r.y-p.y)>t)){p=r.x-l.x;m=r.y-l.y;r={distSq:p*p+m*m,x:r.x,y:r.y};for(p=0;pr.distSq){w.splice(p,0,r);r=null;break}null==r||0!=w.length&&w[w.length-1].x===r.x&&w[w.length-1].y===r.y||w.push(r)}}}for(q=0;qf*f&&0f*f&&(p=new mxPoint(z.x-r.x,z.y-r.y),q=new mxPoint(z.x+r.x,z.y+r.y),h.push(p),this.addPoints(a,h,d,b,!1, +null,n),h=0>Math.round(r.x)||0==Math.round(r.x)&&0>=Math.round(r.y)?1:-1,n=!1,"sharp"==e?(a.lineTo(p.x-r.y*h,p.y+r.x*h),a.lineTo(q.x-r.y*h,q.y+r.x*h),a.lineTo(q.x,q.y)):"arc"==e?(h*=1.3,a.curveTo(p.x-r.y*h,p.y+r.x*h,q.x-r.y*h,q.y+r.x*h,q.x,q.y)):(a.moveTo(q.x,q.y),n=!0),h=[q],p=!0))}else r=null;p||(h.push(z),l=z)}this.addPoints(a,h,d,b,!1,null,n);a.stroke()}};var m=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(a,c,d,b){if(null==c||null== a||"1"!=c.style.snapToPoint&&"1"!=a.style.snapToPoint)m.apply(this,arguments);else{c=this.getTerminalPort(a,c,b);var f=this.getNextPoint(a,d,b),e=this.graph.isOrthogonal(a),g=mxUtils.toRadians(Number(c.style[mxConstants.STYLE_ROTATION]||"0")),n=new mxPoint(c.getCenterX(),c.getCenterY());if(0!=g)var l=Math.cos(-g),w=Math.sin(-g),f=mxUtils.getRotatedPoint(f,l,w,n);l=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]||0);l+=parseFloat(a.style[b?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]|| 0);f=this.getPerimeterPoint(c,f,0==g&&e,l);0!=g&&(l=Math.cos(g),w=Math.sin(g),f=mxUtils.getRotatedPoint(f,l,w,n));a.setAbsoluteTerminalPoint(this.snapToAnchorPoint(a,c,d,b,f),b)}};mxGraphView.prototype.snapToAnchorPoint=function(a,c,d,b,e){if(null!=c&&null!=a){a=this.graph.getAllConnectionConstraints(c);b=d=null;if(null!=a)for(var f=0;f=m.getStatus()&&eval.call(window,m.getText())}}catch(p){null!=window.console&&console.log("error in getStencil:",k,p)}}mxStencilRegistry.packages[e]=1}}else e=e.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+e+".xml",null);d=mxStencilRegistry.stencils[a]}}return d}; mxStencilRegistry.getBasenameForStencil=function(a){var d=null;if(null!=a&&(a=a.split("."),0=a.getStatus()?a.getXml():null)}));else return mxUtils.load(a).getXml()};mxStencilRegistry.parseStencilSets=function(a){for(var d=0;dc&&d[b].deleteCell(c)};Graph.prototype.pasteHtmlAtCaret=function(a){var c;if(window.getSelection){if(c=window.getSelection(),c.getRangeAt&&c.rangeCount){c=c.getRangeAt(0);c.deleteContents();var d=document.createElement("div");d.innerHTML=a;a=document.createDocumentFragment();for(var b;b=d.firstChild;)lastNode=a.appendChild(b);c.insertNode(a)}}else(c=document.selection)&&"Control"!=c.type&&c.createRange().pasteHTML(a)};Graph.prototype.createLinkForHint= @@ -2361,9 +2361,9 @@ return c};var c=!1,d=!1,b=!1,f=this.fireMouseEvent;this.fireMouseEvent=function( document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(a){try{if(a)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var c=0,d=a.length;c"):l,!0);this.textarea.className="mxCellEditor geContentEditable";var b=mxUtils.getValue(a.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE),c=mxUtils.getValue(a.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),f=mxUtils.getValue(a.style, mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),e=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,g=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,a=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(b*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT; this.textarea.style.fontSize=Math.round(b)+"px";this.textarea.style.textDecoration=a?"underline":"";this.textarea.style.fontWeight=e?"bold":"normal";this.textarea.style.fontStyle=g?"italic":"";this.textarea.style.fontFamily=c;this.textarea.style.textAlign=f;this.textarea.style.padding="0px";this.textarea.innerHTML!=l&&(this.textarea.innerHTML=l,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0g||Math.abs(e)>g)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(b,d), this.isSpaceEvent(c)?(b=this.x+this.width,d=this.y+this.height,f=this.graph.view.scale,mxEvent.isAltDown(c.getEvent())||(this.width=this.graph.snap(this.width/f)*f,this.height=this.graph.snap(this.height/f)*f,this.graph.isGridEnabled()||(this.width=this.width?"0px 1px 0px 0px":"0px 1px 0px 1px",null==this.secondDiv&&(this.secondDiv=this.div.cloneNode(!0),this.div.parentNode.appendChild(this.secondDiv)),this.secondDiv.style.left=this.x+"px",this.secondDiv.style.top=this.y+"px",this.secondDiv.style.width=this.graph.container.clientWidth+"px",this.secondDiv.style.height= Math.max(0,this.height)+"px",this.secondDiv.style.borderWidth=0>=this.height?"1px 0px 0px 0px":"1px 0px 1px 0px"):(this.div.style.backgroundColor="",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),c.consume()}};var h=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);h.apply(this, -arguments)};var n=(new Date).getTime(),l=0,w=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,c,d,b){w.apply(this,arguments);d!=this.currentTerminalState?(n=(new Date).getTime(),l=0):l=(new Date).getTime()-n;this.currentTerminalState=d};var q=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&&2E3=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==a)?this.graph.getConnectionConstraint(this.state,b,d):null,d=null!=(null!=f?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(d), +arguments)};var n=(new Date).getTime(),l=0,w=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,c,d,b){w.apply(this,arguments);d!=this.currentTerminalState?(n=(new Date).getTime(),l=0):l=(new Date).getTime()-n;this.currentTerminalState=d};var r=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&&2E3=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==a)?this.graph.getConnectionConstraint(this.state,b,d):null,d=null!=(null!=f?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(d), f):null)?this.fixedHandleImage:null!=f&&null!=b?this.terminalHandleImage:this.handleImage;if(null!=d)return d=new mxImageShape(new mxRectangle(0,0,d.width,d.height),d.src),d.preserveImageAspect=!1,d;d=mxConstants.HANDLE_SIZE;this.preferHtml&&--d;return new mxRectangleShape(new mxRectangle(0,0,d,d),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var y=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(a,c,d){this.handleImage=c==mxEvent.ROTATION_HANDLE? HoverIcons.prototype.rotationHandle:c==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return y.apply(this,arguments)};var D=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(a){if(null!=a&&1==a.length){var c=this.graph.getModel(),d=c.getParent(a[0]),b=this.graph.getCellGeometry(a[0]);if(c.isEdge(d)&&null!=b&&b.relative&&(c=this.graph.view.getState(a[0]),null!=c&&2>c.width&&2>c.height&&null!=c.text&&null!=c.text.boundingBox))return mxRectangle.fromRectangle(c.text.boundingBox)}return D.apply(this, arguments)};var z=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(a){var c=this.graph.getModel(),d=c.getParent(a.cell),b=this.graph.getCellGeometry(a.cell);return c.isEdge(d)&&null!=b&&b.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))):z.apply(this,arguments)};var G=mxVertexHandler.prototype.mouseDown; @@ -2421,20 +2421,20 @@ c.y+c.height));this.linkHint.style.left=Math.max(0,Math.round(a.x+(a.width-this. function(){I.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 R=mxEdgeHandler.prototype.redrawHandles; mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(R.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 Y=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset= function(){Y.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var aa=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){aa.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.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 d(){mxActor.call(this)}function e(){mxCylinder.call(this)}function b(){mxCylinder.call(this)}function k(){mxCylinder.call(this)}function m(){mxActor.call(this)}function p(){mxCylinder.call(this)}function r(){mxActor.call(this)}function v(){mxActor.call(this)}function c(){mxActor.call(this)}function f(){mxActor.call(this)}function g(){mxActor.call(this)}function u(){mxActor.call(this)}function t(){mxActor.call(this)}function h(a,c){this.canvas= +this.changeHandler=null)}}();(function(){function a(){mxCylinder.call(this)}function d(){mxActor.call(this)}function e(){mxCylinder.call(this)}function b(){mxCylinder.call(this)}function k(){mxCylinder.call(this)}function m(){mxActor.call(this)}function p(){mxCylinder.call(this)}function q(){mxActor.call(this)}function v(){mxActor.call(this)}function c(){mxActor.call(this)}function f(){mxActor.call(this)}function g(){mxActor.call(this)}function u(){mxActor.call(this)}function t(){mxActor.call(this)}function h(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,h.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,h.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,h.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,h.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo; -this.canvas.curveTo=mxUtils.bind(this,h.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,h.prototype.arcTo)}function n(){mxRectangleShape.call(this)}function l(){mxRectangleShape.call(this)}function w(){mxActor.call(this)}function q(){mxActor.call(this)}function y(){mxActor.call(this)}function D(){mxRectangleShape.call(this)}function z(){mxRectangleShape.call(this)}function G(){mxCylinder.call(this)}function E(){mxShape.call(this)}function x(){mxShape.call(this)} +this.canvas.curveTo=mxUtils.bind(this,h.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,h.prototype.arcTo)}function n(){mxRectangleShape.call(this)}function l(){mxRectangleShape.call(this)}function w(){mxActor.call(this)}function r(){mxActor.call(this)}function y(){mxActor.call(this)}function D(){mxRectangleShape.call(this)}function z(){mxRectangleShape.call(this)}function G(){mxCylinder.call(this)}function E(){mxShape.call(this)}function x(){mxShape.call(this)} function J(){mxEllipse.call(this)}function H(){mxShape.call(this)}function B(){mxShape.call(this)}function N(){mxRectangleShape.call(this)}function C(){mxShape.call(this)}function I(){mxShape.call(this)}function R(){mxShape.call(this)}function Y(){mxCylinder.call(this)}function aa(){mxDoubleEllipse.call(this)}function Q(){mxDoubleEllipse.call(this)}function S(){mxArrowConnector.call(this);this.spacing=0}function K(){mxArrowConnector.call(this);this.spacing=0}function F(){mxActor.call(this)}function V(){mxRectangleShape.call(this)} function L(){mxActor.call(this)}function O(){mxActor.call(this)}function X(){mxActor.call(this)}function A(){mxActor.call(this)}function W(){mxActor.call(this)}function P(){mxActor.call(this)}function da(){mxActor.call(this)}function T(){mxActor.call(this)}function Z(){mxActor.call(this)}function U(){mxActor.call(this)}function ma(){mxEllipse.call(this)}function na(){mxEllipse.call(this)}function ca(){mxEllipse.call(this)}function ia(){mxRhombus.call(this)}function qa(){mxEllipse.call(this)}function ea(){mxEllipse.call(this)} -function ra(){mxEllipse.call(this)}function fa(){mxEllipse.call(this)}function ja(){mxActor.call(this)}function ba(){mxActor.call(this)}function ka(){mxActor.call(this)}function ga(){mxConnector.call(this)}function Aa(a,c,d,b,f,e,g,l,h,q){g+=h;var pa=b.clone();b.x-=f*(2*g+h);b.y-=e*(2*g+h);f*=g+h;e*=g+h;return function(){a.ellipse(pa.x-f-g,pa.y-e-g,2*g,2*g);q?a.fillAndStroke():a.stroke()}}mxUtils.extend(a,mxCylinder);a.prototype.size=20;a.prototype.redrawPath=function(a,c,d,b,f,e){c=Math.max(0,Math.min(b, +function ra(){mxEllipse.call(this)}function fa(){mxEllipse.call(this)}function ja(){mxActor.call(this)}function ba(){mxActor.call(this)}function ka(){mxActor.call(this)}function ga(){mxConnector.call(this)}function Aa(a,c,d,b,f,e,g,l,h,n){g+=h;var pa=b.clone();b.x-=f*(2*g+h);b.y-=e*(2*g+h);f*=g+h;e*=g+h;return function(){a.ellipse(pa.x-f-g,pa.y-e-g,2*g,2*g);n?a.fillAndStroke():a.stroke()}}mxUtils.extend(a,mxCylinder);a.prototype.size=20;a.prototype.redrawPath=function(a,c,d,b,f,e){c=Math.max(0,Math.min(b, Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));e?(a.moveTo(c,f),a.lineTo(c,c),a.lineTo(0,0),a.moveTo(c,c),a.lineTo(b,c)):(a.moveTo(0,0),a.lineTo(b-c,0),a.lineTo(b,c),a.lineTo(b,f),a.lineTo(c,f),a.lineTo(0,f-c),a.lineTo(0,0),a.close());a.end()};a.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?(a=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(a,a,0,0)):null};mxCellRenderer.registerShape("cube", a);var xa=Math.tan(mxUtils.toRadians(30)),oa=(.5-xa)/2;mxUtils.extend(d,mxActor);d.prototype.size=20;d.prototype.redrawPath=function(a,c,d,b,f){c=Math.min(b,f/xa);a.translate((b-c)/2,(f-c)/2+c/4);a.moveTo(0,.25*c);a.lineTo(.5*c,c*oa);a.lineTo(c,.25*c);a.lineTo(.5*c,(.5-oa)*c);a.lineTo(0,.25*c);a.close();a.end()};mxCellRenderer.registerShape("isoRectangle",d);mxUtils.extend(e,mxCylinder);e.prototype.size=20;e.prototype.redrawPath=function(a,c,d,b,f,e){c=Math.min(b,f/(.5+xa));e?(a.moveTo(0,.25*c),a.lineTo(.5* c,(.5-oa)*c),a.lineTo(c,.25*c),a.moveTo(.5*c,(.5-oa)*c),a.lineTo(.5*c,(1-oa)*c)):(a.translate((b-c)/2,(f-c)/2),a.moveTo(0,.25*c),a.lineTo(.5*c,c*oa),a.lineTo(c,.25*c),a.lineTo(c,.75*c),a.lineTo(.5*c,(1-oa)*c),a.lineTo(0,.75*c),a.close());a.end()};mxCellRenderer.registerShape("isoCube",e);mxUtils.extend(b,mxCylinder);b.prototype.redrawPath=function(a,c,d,b,f,e){c=Math.min(f/2,Math.round(f/8)+this.strokewidth-1);if(e&&null!=this.fill||!e&&null==this.fill)a.moveTo(0,c),a.curveTo(0,2*c,b,2*c,b,c),e|| (a.stroke(),a.begin()),a.translate(0,c/2),a.moveTo(0,c),a.curveTo(0,2*c,b,2*c,b,c),e||(a.stroke(),a.begin()),a.translate(0,c/2),a.moveTo(0,c),a.curveTo(0,2*c,b,2*c,b,c),e||(a.stroke(),a.begin()),a.translate(0,-c);e||(a.moveTo(0,c),a.curveTo(0,-c/3,b,-c/3,b,c),a.lineTo(b,f-c),a.curveTo(b,f+c/3,0,f+c/3,0,f-c),a.close())};b.prototype.getLabelMargins=function(a){return new mxRectangle(0,2.5*Math.min(a.height/2,Math.round(a.height/8)+this.strokewidth-1)*this.scale,0,0)};mxCellRenderer.registerShape("datastore", b);mxUtils.extend(k,mxCylinder);k.prototype.size=30;k.prototype.redrawPath=function(a,c,d,b,f,e){c=Math.max(0,Math.min(b,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));e?(a.moveTo(b-c,0),a.lineTo(b-c,c),a.lineTo(b,c)):(a.moveTo(0,0),a.lineTo(b-c,0),a.lineTo(b,c),a.lineTo(b,f),a.lineTo(0,f),a.lineTo(0,0),a.close());a.end()};mxCellRenderer.registerShape("note",k);mxUtils.extend(m,mxActor);m.prototype.redrawPath=function(a,c,d,b,f){a.moveTo(0,0);a.quadTo(b/2,.5*f,b,0);a.quadTo(.5* b,f/2,b,f);a.quadTo(b/2,.5*f,0,f);a.quadTo(.5*b,f/2,0,0);a.end()};mxCellRenderer.registerShape("switch",m);mxUtils.extend(p,mxCylinder);p.prototype.tabWidth=60;p.prototype.tabHeight=20;p.prototype.tabPosition="right";p.prototype.redrawPath=function(a,c,d,b,f,e){c=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));d=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var g=mxUtils.getValue(this.style,"tabPosition",this.tabPosition); -e?"left"==g?(a.moveTo(0,d),a.lineTo(c,d)):(a.moveTo(b-c,d),a.lineTo(b,d)):("left"==g?(a.moveTo(0,0),a.lineTo(c,0),a.lineTo(c,d),a.lineTo(b,d)):(a.moveTo(0,d),a.lineTo(b-c,d),a.lineTo(b-c,0),a.lineTo(b,0)),a.lineTo(b,f),a.lineTo(0,f),a.lineTo(0,d),a.close());a.end()};mxCellRenderer.registerShape("folder",p);mxUtils.extend(r,mxActor);r.prototype.size=30;r.prototype.redrawPath=function(a,c,d,b,f){c=Math.max(0,Math.min(b,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));d=mxUtils.getValue(this.style, -mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(c,0),new mxPoint(b,0),new mxPoint(b,f),new mxPoint(0,f),new mxPoint(0,c)],this.isRounded,d,!0);a.end()};mxCellRenderer.registerShape("card",r);mxUtils.extend(v,mxActor);v.prototype.size=.4;v.prototype.redrawPath=function(a,c,d,b,f){c=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,c/2);a.quadTo(b/4,1.4*c,b/2,c/2);a.quadTo(3*b/4,c*(1-1.4),b,c/2);a.lineTo(b,f-c/2);a.quadTo(3* +e?"left"==g?(a.moveTo(0,d),a.lineTo(c,d)):(a.moveTo(b-c,d),a.lineTo(b,d)):("left"==g?(a.moveTo(0,0),a.lineTo(c,0),a.lineTo(c,d),a.lineTo(b,d)):(a.moveTo(0,d),a.lineTo(b-c,d),a.lineTo(b-c,0),a.lineTo(b,0)),a.lineTo(b,f),a.lineTo(0,f),a.lineTo(0,d),a.close());a.end()};mxCellRenderer.registerShape("folder",p);mxUtils.extend(q,mxActor);q.prototype.size=30;q.prototype.redrawPath=function(a,c,d,b,f){c=Math.max(0,Math.min(b,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));d=mxUtils.getValue(this.style, +mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(c,0),new mxPoint(b,0),new mxPoint(b,f),new mxPoint(0,f),new mxPoint(0,c)],this.isRounded,d,!0);a.end()};mxCellRenderer.registerShape("card",q);mxUtils.extend(v,mxActor);v.prototype.size=.4;v.prototype.redrawPath=function(a,c,d,b,f){c=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,c/2);a.quadTo(b/4,1.4*c,b/2,c/2);a.quadTo(3*b/4,c*(1-1.4),b,c/2);a.lineTo(b,f-c/2);a.quadTo(3* b/4,f-1.4*c,b/2,f-c/2);a.quadTo(b/4,f-c*(1-1.4),0,f-c/2);a.lineTo(0,c/2);a.close();a.end()};v.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var c=mxUtils.getValue(this.style,"size",this.size),d=a.width,b=a.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return c*=b,new mxRectangle(a.x,a.y+c,d,b-2*c);c*=d;return new mxRectangle(a.x+c,a.y,d-2*c,b)}return a};mxCellRenderer.registerShape("tape", v);mxUtils.extend(c,mxActor);c.prototype.size=.3;c.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};c.prototype.redrawPath=function(a,c,d,b,f){c=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,0);a.lineTo(b,0);a.lineTo(b,f-c/2);a.quadTo(3*b/4,f-1.4*c,b/2,f-c/2);a.quadTo(b/4,f-c*(1-1.4),0,f-c/2);a.lineTo(0,c/2);a.close(); a.end()};mxCellRenderer.registerShape("document",c);var Ba=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(a,c,d,b){var f=mxUtils.getValue(this.style,"size");return null!=f?b*Math.max(0,Math.min(1,f)):Ba.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(f, @@ -2452,14 +2452,14 @@ n.prototype.size=.1;n.prototype.isHtmlAllowed=function(){return!1};n.prototype.g 100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,b=Math.max(b,Math.min(c*f,d*f));a.x+=Math.round(b);a.width-=Math.round(2*b)}return a};n.prototype.paintForeground=function(a,c,d,b,f){var e=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,e=Math.max(e,Math.min(b*g,f*g));e=Math.round(e);a.begin();a.moveTo(c+e,d);a.lineTo(c+e,d+f);a.moveTo(c+b- e,d);a.lineTo(c+b-e,d+f);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("process",n);mxUtils.extend(l,mxRectangleShape);l.prototype.paintBackground=function(a,c,d,b,f){a.setFillColor(mxConstants.NONE);a.rect(c,d,b,f);a.fill()};l.prototype.paintForeground=function(a,c,d,b,f){};mxCellRenderer.registerShape("transparent",l);mxUtils.extend(w,mxHexagon);w.prototype.size=30;w.prototype.position=.5;w.prototype.position2=.5;w.prototype.base= 20;w.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};w.prototype.redrawPath=function(a,c,d,b,f){c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;d=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var e=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),g=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style, -"position2",this.position2)))),l=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(a,[new mxPoint(0,0),new mxPoint(b,0),new mxPoint(b,f-d),new mxPoint(Math.min(b,e+l),f-d),new mxPoint(g,f),new mxPoint(Math.max(0,e),f-d),new mxPoint(0,f-d)],this.isRounded,c,!0,[4])};mxCellRenderer.registerShape("callout",w);mxUtils.extend(q,mxActor);q.prototype.size=.2;q.prototype.fixedSize=20;q.prototype.redrawPath=function(a,c,d,b,f){c="0"!=mxUtils.getValue(this.style, -"fixedSize","0")?Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(b-c,0),new mxPoint(b,f/2),new mxPoint(b-c,f),new mxPoint(0,f),new mxPoint(c,f/2)],this.isRounded,d,!0);a.end()};mxCellRenderer.registerShape("step",q);mxUtils.extend(y,mxHexagon);y.prototype.size= +"position2",this.position2)))),l=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(a,[new mxPoint(0,0),new mxPoint(b,0),new mxPoint(b,f-d),new mxPoint(Math.min(b,e+l),f-d),new mxPoint(g,f),new mxPoint(Math.max(0,e),f-d),new mxPoint(0,f-d)],this.isRounded,c,!0,[4])};mxCellRenderer.registerShape("callout",w);mxUtils.extend(r,mxActor);r.prototype.size=.2;r.prototype.fixedSize=20;r.prototype.redrawPath=function(a,c,d,b,f){c="0"!=mxUtils.getValue(this.style, +"fixedSize","0")?Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(b-c,0),new mxPoint(b,f/2),new mxPoint(b-c,f),new mxPoint(0,f),new mxPoint(c,f/2)],this.isRounded,d,!0);a.end()};mxCellRenderer.registerShape("step",r);mxUtils.extend(y,mxHexagon);y.prototype.size= .25;y.prototype.redrawPath=function(a,c,d,b,f){c=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(c,0),new mxPoint(b-c,0),new mxPoint(b,.5*f),new mxPoint(b-c,f),new mxPoint(c,f),new mxPoint(0,.5*f)],this.isRounded,d,!0)};mxCellRenderer.registerShape("hexagon",y);mxUtils.extend(D,mxRectangleShape);D.prototype.isHtmlAllowed=function(){return!1};D.prototype.paintForeground= function(a,c,d,b,f){var e=Math.min(b/5,f/5)+1;a.begin();a.moveTo(c+b/2,d+e);a.lineTo(c+b/2,d+f-e);a.moveTo(c+e,d+f/2);a.lineTo(c+b-e,d+f/2);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",D);var Ca=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,d,b,f){Ca.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;d+=e;b-=2*e;f-=2*e;0g+h?a.y=d.y:a.x=d.x);return mxUtils.getPerimeterPoint(l,a,d)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(a,c,d,b){var f=g.prototype.size;null!=c&&(f=mxUtils.getValue(c.style,"size",f));var e=a.x,l=a.y,h=a.width,q=a.height;c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST; -c==mxConstants.DIRECTION_EAST?(f=h*Math.max(0,Math.min(1,f)),l=[new mxPoint(e+f,l),new mxPoint(e+h-f,l),new mxPoint(e+h,l+q),new mxPoint(e,l+q),new mxPoint(e+f,l)]):c==mxConstants.DIRECTION_WEST?(f=h*Math.max(0,Math.min(1,f)),l=[new mxPoint(e,l),new mxPoint(e+h,l),new mxPoint(e+h-f,l+q),new mxPoint(e+f,l+q),new mxPoint(e,l)]):c==mxConstants.DIRECTION_NORTH?(f=q*Math.max(0,Math.min(1,f)),l=[new mxPoint(e,l+f),new mxPoint(e+h,l),new mxPoint(e+h,l+q),new mxPoint(e,l+q-f),new mxPoint(e,l+f)]):(f=q*Math.max(0, -Math.min(1,f)),l=[new mxPoint(e,l),new mxPoint(e+h,l+f),new mxPoint(e+h,l+q-f),new mxPoint(e,l+q),new mxPoint(e,l)]);q=a.getCenterX();a=a.getCenterY();a=new mxPoint(q,a);b&&(d.xe+h?a.y=d.y:a.x=d.x);return mxUtils.getPerimeterPoint(l,a,d)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(a,c,d,b){var f="0"!=mxUtils.getValue(c.style,"fixedSize","0"),e=f?q.prototype.fixedSize:q.prototype.size;null!=c&&(e=mxUtils.getValue(c.style, +null!=c&&(e=mxUtils.getValue(c.style,"size",e));var g=a.x,l=a.y,h=a.width,n=a.height;c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_NORTH||c==mxConstants.DIRECTION_SOUTH?(e=n*Math.max(0,Math.min(1,e)),l=[new mxPoint(g,l),new mxPoint(g+h,l+e),new mxPoint(g+h,l+n),new mxPoint(g,l+n-e),new mxPoint(g,l)]):(e=h*Math.max(0,Math.min(1,e)),l=[new mxPoint(g+e,l),new mxPoint(g+h,l),new mxPoint(g+h-e,l+n),new mxPoint(g, +l+n),new mxPoint(g+e,l)]);n=a.getCenterX();a=a.getCenterY();a=new mxPoint(n,a);b&&(d.xg+h?a.y=d.y:a.x=d.x);return mxUtils.getPerimeterPoint(l,a,d)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(a,c,d,b){var f=g.prototype.size;null!=c&&(f=mxUtils.getValue(c.style,"size",f));var e=a.x,l=a.y,h=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?(f=h*Math.max(0,Math.min(1,f)),l=[new mxPoint(e+f,l),new mxPoint(e+h-f,l),new mxPoint(e+h,l+n),new mxPoint(e,l+n),new mxPoint(e+f,l)]):c==mxConstants.DIRECTION_WEST?(f=h*Math.max(0,Math.min(1,f)),l=[new mxPoint(e,l),new mxPoint(e+h,l),new mxPoint(e+h-f,l+n),new mxPoint(e+f,l+n),new mxPoint(e,l)]):c==mxConstants.DIRECTION_NORTH?(f=n*Math.max(0,Math.min(1,f)),l=[new mxPoint(e,l+f),new mxPoint(e+h,l),new mxPoint(e+h,l+n),new mxPoint(e,l+n-f),new mxPoint(e,l+f)]):(f=n*Math.max(0, +Math.min(1,f)),l=[new mxPoint(e,l),new mxPoint(e+h,l+f),new mxPoint(e+h,l+n-f),new mxPoint(e,l+n),new mxPoint(e,l)]);n=a.getCenterX();a=a.getCenterY();a=new mxPoint(n,a);b&&(d.xe+h?a.y=d.y:a.x=d.x);return mxUtils.getPerimeterPoint(l,a,d)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(a,c,d,b){var f="0"!=mxUtils.getValue(c.style,"fixedSize","0"),e=f?r.prototype.fixedSize:r.prototype.size;null!=c&&(e=mxUtils.getValue(c.style, "size",e));var g=a.x,l=a.y,h=a.width,n=a.height,u=a.getCenterX();a=a.getCenterY();c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_EAST?(f=f?Math.max(0,Math.min(h,e)):h*Math.max(0,Math.min(1,e)),l=[new mxPoint(g,l),new mxPoint(g+h-f,l),new mxPoint(g+h,a),new mxPoint(g+h-f,l+n),new mxPoint(g,l+n),new mxPoint(g+f,a),new mxPoint(g,l)]):c==mxConstants.DIRECTION_WEST?(f=f?Math.max(0,Math.min(h,e)):h*Math.max(0, Math.min(1,e)),l=[new mxPoint(g+f,l),new mxPoint(g+h,l),new mxPoint(g+h-f,a),new mxPoint(g+h,l+n),new mxPoint(g+f,l+n),new mxPoint(g,a),new mxPoint(g+f,l)]):c==mxConstants.DIRECTION_NORTH?(f=f?Math.max(0,Math.min(n,e)):n*Math.max(0,Math.min(1,e)),l=[new mxPoint(g,l+f),new mxPoint(u,l),new mxPoint(g+h,l+f),new mxPoint(g+h,l+n),new mxPoint(u,l+n-f),new mxPoint(g,l+n),new mxPoint(g,l+f)]):(f=f?Math.max(0,Math.min(n,e)):n*Math.max(0,Math.min(1,e)),l=[new mxPoint(g,l),new mxPoint(u,l+f),new mxPoint(g+ -h,l),new mxPoint(g+h,l+n-f),new mxPoint(u,l+n),new mxPoint(g,l+n-f),new mxPoint(g,l)]);u=new mxPoint(u,a);b&&(d.xg+h?u.y=d.y:u.x=d.x);return mxUtils.getPerimeterPoint(l,u,d)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(a,c,d,b){var f=y.prototype.size;null!=c&&(f=mxUtils.getValue(c.style,"size",f));var e=a.x,g=a.y,l=a.width,h=a.height,q=a.getCenterX();a=a.getCenterY();c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION, -mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_NORTH||c==mxConstants.DIRECTION_SOUTH?(f=h*Math.max(0,Math.min(1,f)),g=[new mxPoint(q,g),new mxPoint(e+l,g+f),new mxPoint(e+l,g+h-f),new mxPoint(q,g+h),new mxPoint(e,g+h-f),new mxPoint(e,g+f),new mxPoint(q,g)]):(f=l*Math.max(0,Math.min(1,f)),g=[new mxPoint(e+f,g),new mxPoint(e+l-f,g),new mxPoint(e+l,a),new mxPoint(e+l-f,g+h),new mxPoint(e+f,g+h),new mxPoint(e,a),new mxPoint(e+f,g)]);q=new mxPoint(q,a);b&&(d.xe+ -l?q.y=d.y:q.x=d.x);return mxUtils.getPerimeterPoint(g,q,d)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(I,mxShape);I.prototype.size=10;I.prototype.paintBackground=function(a,c,d,b,f){var e=parseFloat(mxUtils.getValue(this.style,"size",this.size));a.translate(c,d);a.ellipse((b-e)/2,0,e,e);a.fillAndStroke();a.begin();a.moveTo(b/2,e);a.lineTo(b/2,f);a.end();a.stroke()};mxCellRenderer.registerShape("lollipop",I);mxUtils.extend(R,mxShape);R.prototype.size= +h,l),new mxPoint(g+h,l+n-f),new mxPoint(u,l+n),new mxPoint(g,l+n-f),new mxPoint(g,l)]);u=new mxPoint(u,a);b&&(d.xg+h?u.y=d.y:u.x=d.x);return mxUtils.getPerimeterPoint(l,u,d)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(a,c,d,b){var f=y.prototype.size;null!=c&&(f=mxUtils.getValue(c.style,"size",f));var e=a.x,g=a.y,l=a.width,h=a.height,n=a.getCenterX();a=a.getCenterY();c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION, +mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_NORTH||c==mxConstants.DIRECTION_SOUTH?(f=h*Math.max(0,Math.min(1,f)),g=[new mxPoint(n,g),new mxPoint(e+l,g+f),new mxPoint(e+l,g+h-f),new mxPoint(n,g+h),new mxPoint(e,g+h-f),new mxPoint(e,g+f),new mxPoint(n,g)]):(f=l*Math.max(0,Math.min(1,f)),g=[new mxPoint(e+f,g),new mxPoint(e+l-f,g),new mxPoint(e+l,a),new mxPoint(e+l-f,g+h),new mxPoint(e+f,g+h),new mxPoint(e,a),new mxPoint(e+f,g)]);n=new mxPoint(n,a);b&&(d.xe+ +l?n.y=d.y:n.x=d.x);return mxUtils.getPerimeterPoint(g,n,d)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(I,mxShape);I.prototype.size=10;I.prototype.paintBackground=function(a,c,d,b,f){var e=parseFloat(mxUtils.getValue(this.style,"size",this.size));a.translate(c,d);a.ellipse((b-e)/2,0,e,e);a.fillAndStroke();a.begin();a.moveTo(b/2,e);a.lineTo(b/2,f);a.end();a.stroke()};mxCellRenderer.registerShape("lollipop",I);mxUtils.extend(R,mxShape);R.prototype.size= 10;R.prototype.inset=2;R.prototype.paintBackground=function(a,c,d,b,f){var e=parseFloat(mxUtils.getValue(this.style,"size",this.size)),g=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(c,d);a.begin();a.moveTo(b/2,e+g);a.lineTo(b/2,f);a.end();a.stroke();a.begin();a.moveTo((b-e)/2-g,e/2);a.quadTo((b-e)/2-g,e+g,b/2,e+g);a.quadTo((b+e)/2+g,e+g,(b+e)/2+g,e/2);a.end();a.stroke()};mxCellRenderer.registerShape("requires",R);mxUtils.extend(Y,mxCylinder);Y.prototype.jettyWidth= 32;Y.prototype.jettyHeight=12;Y.prototype.redrawPath=function(a,c,d,b,f,e){var g=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));c=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));d=g/2;var g=d+g/2,l=.3*f-c/2,h=.7*f-c/2;e?(a.moveTo(d,l),a.lineTo(g,l),a.lineTo(g,l+c),a.lineTo(d,l+c),a.moveTo(d,h),a.lineTo(g,h),a.lineTo(g,h+c),a.lineTo(d,h+c)):(a.moveTo(d,0),a.lineTo(b,0),a.lineTo(b,f),a.lineTo(d,f),a.lineTo(d,h+c),a.lineTo(0,h+c),a.lineTo(0,h),a.lineTo(d, h),a.lineTo(d,l+c),a.lineTo(0,l+c),a.lineTo(0,l),a.lineTo(d,l),a.close());a.end()};mxCellRenderer.registerShape("component",Y);mxUtils.extend(aa,mxDoubleEllipse);aa.prototype.outerStroke=!0;aa.prototype.paintVertexShape=function(a,c,d,b,f){var e=Math.min(4,Math.min(b/5,f/5));0'),c.writeln(a.editor.fontCss),c.writeln(""))};if("undefined"!==typeof MathJax){var k=b.renderPage;b.renderPage=function(a,c,b,d,f,e){var g=k.apply(this,arguments);this.graph.mathEnabled? -this.mathEnabled=!0:g.className="geDisableMathJax";return g}}b.open(null,null,f,!0)}else{l=c.background;if(null==l||""==l||l==mxConstants.NONE)l="#ffffff";b.backgroundColor=l;b.autoOrigin=u;b.appendGraph(c,n,g,h,f,!0)}return b}var d=parseInt(T.value)/100;isNaN(d)&&(d=1,T.value="100 %");var d=.75*d,e=k.value,g=w.value,h=!u.checked,n=null;h&&(h=e==l&&g==l);if(!h&&null!=a.pages&&a.pages.length){var t=0,h=a.pages.length-1;u.checked||(t=parseInt(e)-1,h=parseInt(g)-1);for(var q=t;q<=h;q++){var m=a.pages[q], +Math.min(parseInt(w.value),parseInt(k.value))))}function d(c){function b(c,b,f){var e=c.getGraphBounds(),g=0,h=0,l=da.get(),n=1/c.pageScale,u=v.checked;if(u)var n=parseInt(W.value),t=parseInt(P.value),n=Math.min(l.height*t/(e.height/c.view.scale),l.width*n/(e.width/c.view.scale));else n=parseInt(q.value)/(100*c.pageScale),isNaN(n)&&(d=1/c.pageScale,q.value="100 %");l=mxRectangle.fromRectangle(l);l.width=Math.ceil(l.width*d);l.height=Math.ceil(l.height*d);n*=d;!u&&c.pageVisible?(e=c.getPageLayout(), +g-=e.x*l.width,h-=e.y*l.height):u=!0;if(null==b){b=PrintDialog.createPrintPreview(c,n,l,0,g,h,u);b.pageSelector=!1;b.mathEnabled=!1;c=a.getCurrentFile();null!=c&&(b.title=c.getTitle());var r=b.writeHead;b.writeHead=function(c){r.apply(this,arguments);null!=a.editor.fontCss&&(c.writeln('"))};if("undefined"!==typeof MathJax){var k=b.renderPage;b.renderPage=function(a,c,b,d,f,e){var g=k.apply(this,arguments);this.graph.mathEnabled? +this.mathEnabled=!0:g.className="geDisableMathJax";return g}}b.open(null,null,f,!0)}else{l=c.background;if(null==l||""==l||l==mxConstants.NONE)l="#ffffff";b.backgroundColor=l;b.autoOrigin=u;b.appendGraph(c,n,g,h,f,!0)}return b}var d=parseInt(T.value)/100;isNaN(d)&&(d=1,T.value="100 %");var d=.75*d,e=k.value,g=w.value,h=!u.checked,n=null;h&&(h=e==l&&g==l);if(!h&&null!=a.pages&&a.pages.length){var t=0,h=a.pages.length-1;u.checked||(t=parseInt(e)-1,h=parseInt(g)-1);for(var r=t;r<=h;r++){var m=a.pages[r], e=m==a.currentPage?f:null;if(null==e){var e=a.createTemporaryGraph(f.getStylesheet()),g=!0,t=!1,p=null,y=null;null==m.viewState&&null==m.mapping&&null==m.root&&a.updatePageRoot(m);null!=m.viewState?(g=m.viewState.pageVisible,t=m.viewState.mathEnabled,p=m.viewState.background,y=m.viewState.backgroundImage):null!=m.mapping&&null!=m.mapping.diagramMap&&(t="0"!=m.mapping.diagramMap.get("mathEnabled"),p=m.mapping.diagramMap.get("background"),y=m.mapping.diagramMap.get("backgroundImage"),y=null!=y&&0'), +JSON.parse(y):null);e.background=p;e.backgroundImage=null!=y?new mxImage(y.src,y.width,y.height):null;e.pageVisible=g;e.mathEnabled=t;var B=e.getGlobalVariable;e.getGlobalVariable=function(a){return"page"==a?m.getName():"pagenumber"==a?r+1:B.apply(this,arguments)};document.body.appendChild(e.container);a.updatePageRoot(m);e.model.setRoot(m.root)}n=b(e,n,r!=h);e!=f&&e.container.parentNode.removeChild(e.container)}}else n=b(f);n.mathEnabled&&(h=n.wnd.document,h.writeln('