diff --git a/src/main/webapp/js/app.min.js b/src/main/webapp/js/app.min.js index f5d884c24b..3c576cbe6d 100644 --- a/src/main/webapp/js/app.min.js +++ b/src/main/webapp/js/app.min.js @@ -10737,26 +10737,26 @@ DrawioFile.prototype.shadowModified=!1;DrawioFile.prototype.data=null;DrawioFile DrawioFile.prototype.getShadowPages=function(){null==this.shadowPages&&(this.shadowPages=this.ui.getPagesForXml(this.initialData));return this.shadowPages};DrawioFile.prototype.setShadowPages=function(b){this.shadowPages=b};DrawioFile.prototype.synchronizeFile=function(b,e){this.savingFile?null!=e&&e({message:mxResources.get("busy")}):null!=this.sync?this.sync.fileChanged(mxUtils.bind(this,function(f){this.sync.cleanup(b,e,f)}),e):this.updateFile(b,e)}; DrawioFile.prototype.updateFile=function(b,e,f,c){null!=f&&f()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=e&&e():this.getLatestVersion(mxUtils.bind(this,function(k){try{null!=f&&f()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum,"latestFile",[k]),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=e&&e():null!=k?this.mergeFile(k,b,e,c):this.reloadFile(b, e))}catch(m){null!=e&&e(m)}}),e))}; -DrawioFile.prototype.mergeFile=function(b,e,f,c){var k=!0;try{this.stats.fileMerged++;var m=this.getShadowPages(),u=b.getShadowPages();if(null!=u&&0f?b=b.substring(0,f)+"[...]":null!=b&&b.length>e&&(b=Graph.compress(b)+"\n");return b}; -DrawioFile.prototype.checksumError=function(b,e,f,c,k,m,u,x){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{if(this.errorReportsEnabled){if(null!=e)for(var D=0;Dg){for(D=0;Dg){for(C=0;Cl.length?Graph.compress(l):null}this.getLatestVersion(mxUtils.bind(this,function(q){try{var t=null!=l?"Report":"Error",y=this.ui.getHashValueForPages(q.getShadowPages());EditorUi.logError("Checksum "+t+" in "+k+" "+d,null,this.getMode()+"."+this.getId(),"user_"+H+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+g+"-patches_"+e.length+(null!=l?"-json_"+l:"")+"-size_"+this.getSize()+(null!=m?"-expected_"+m:"")+(null!=u?"-current_"+u:"")+(null!=x? -"-rev_"+this.ui.hashValue(x):"")+(null!=y?"-latest_"+y:"")+(null!=q?"-latestRev_"+this.ui.hashValue(q.getCurrentRevisionId()):""));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+d,action:k,label:"user_"+H+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+g+"-patches_"+e.length+"-size_"+this.getSize()})}catch(C){}}),b)}}catch(q){}}; -DrawioFile.prototype.sendErrorReport=function(b,e,f,c){try{var k=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),m=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),u=this.getCurrentUser(),x=null!=u?this.ui.hashValue(u.id):"unknown",D=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",A=this.getTitle(),z=A.lastIndexOf(".");u="xml";0mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{u.container.style.visibility="";u.model.endUpdate();u.cellRenderer.redraw=z;this.changeListenerEnabled=x;f||(c.history=k,c.indexOfNextAdd=m,c.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)A!=u.mathEnabled? -(this.ui.editor.updateGraphComponents(),u.refresh()):(D!=u.foldingEnabled?u.view.revalidate():u.view.validate(),u.sizeDidChange());null!=this.sync&&this.isRealtime()&&(this.sync.snapshot=this.ui.clonePages(this.ui.pages));this.ui.updateTabContainer();this.ui.editor.fireEvent(new mxEventObject("pagesPatched","patches",b))}EditorUi.debug("DrawioFile.patch",[this],"patches",b,"resolver",e,"undoable",f)}return b}; +(this.ui.editor.updateGraphComponents(),u.refresh()):(C!=u.foldingEnabled?u.view.revalidate():u.view.validate(),u.sizeDidChange());null!=this.sync&&this.isRealtime()&&(this.sync.snapshot=this.ui.clonePages(this.ui.pages));this.ui.updateTabContainer();this.ui.editor.fireEvent(new mxEventObject("pagesPatched","patches",b))}EditorUi.debug("DrawioFile.patch",[this],"patches",b,"resolver",e,"undoable",f)}return b}; DrawioFile.prototype.save=function(b,e,f,c,k,m){try{if(EditorUi.debug("DrawioFile.save",[this],"revision",b,"unloading",c,"overwrite",k,"manual",m,"saving",this.savingFile,"editable",this.isEditable(),"invalidChecksum",this.invalidChecksum),this.isEditable())if(!k&&this.invalidChecksum)if(null!=f)f({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=e&&e();else if(null!=f)f({message:mxResources.get("readOnly")}); else throw Error(mxResources.get("readOnly"));}catch(u){if(null!=f)f(u);else throw u;}};DrawioFile.prototype.createData=function(){var b=this.ui.pages;if(this.isRealtime()&&(this.ui.pages=this.ownPages,null!=this.ui.currentPage)){var e=this.ui.getPageById(this.ui.currentPage.getId(),this.ownPages);null!=e&&(e.viewState=this.ui.editor.graph.getViewState(),e.needsUpdate=!0)}e=this.ui.getFileData(null,null,null,null,null,null,null,null,this,!this.isCompressed());this.ui.pages=b;return e}; DrawioFile.prototype.updateFileData=function(){null!=this.sync&&this.sync.sendLocalChanges();this.setData(this.createData());null!=this.sync&&this.sync.fileDataUpdated()};DrawioFile.prototype.isCompressedStorage=function(){return!0};DrawioFile.prototype.isCompressed=function(){var b=null!=this.ui.fileNode?this.ui.fileNode.getAttribute("compressed"):null;return null!=b?"false"!=b:this.isCompressedStorage()&&Editor.compressXml};DrawioFile.prototype.saveAs=function(b,e,f){}; @@ -10799,8 +10799,8 @@ this.synchronizeFile(f,c)}))};DrawioFile.prototype.getErrorMessage=function(b){v DrawioFile.prototype.fileChanged=function(b){b=null!=b?b:!0;this.lastChanged=new Date;this.setModified(!0);EditorUi.debug("DrawioFile.fileChanged",[this],"autosave",this.isAutosave(),"saving",this.savingFile);this.isAutosave()?(null!=this.savingStatusKey&&this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get(this.savingStatusKey))+"..."),this.ui.scheduleSanityCheck(),null==this.ageStart&&(this.ageStart=new Date),this.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(e){this.ui.stopSanityCheck(); null==this.autosaveThread?(this.handleFileSuccess(!0),this.ageStart=null):this.isModified()&&(this.ui.scheduleSanityCheck(),this.ageStart=this.lastChanged)}),mxUtils.bind(this,function(e){this.handleFileError(e)}))):(this.ageStart=null,this.isAutosaveOptional()&&this.ui.editor.autosave||this.inConflictState||this.addUnsavedStatus());null!=this.sync&&b&&this.sync.localFileChanged()}; DrawioFile.prototype.createSecret=function(b){var e=Editor.guid(32);null==this.sync||this.isOptimisticSync()?b(e):this.sync.createToken(e,mxUtils.bind(this,function(f){b(e,f)}),mxUtils.bind(this,function(){b(e)}))};DrawioFile.prototype.fileSaving=function(){null!=this.sync&&this.sync.fileSaving()}; -DrawioFile.prototype.fileSaved=function(b,e,f,c,k){this.lastSaved=new Date;this.ageStart=null;try{this.stats.saved++;this.invalidChecksum=this.inConflictState=!1;var m=this.ui.getPagesForXml(b);null==this.sync||this.isOptimisticSync()?(this.setShadowPages(m),null!=this.sync&&(this.sync.lastModified=this.getLastModifiedDate(),this.sync.resetUpdateStatusThread(),this.isRealtime()&&this.sync.scheduleCleanup()),null!=f&&f()):this.sync.fileSaved(m,e,f,c,k)}catch(D){this.invalidChecksum=this.inConflictState= -!0;this.descriptorChanged();null!=c&&c(D);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,D);else{var u=this.getCurrentUser(),x=null!=u?u.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),x,D)}}catch(A){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)}; +DrawioFile.prototype.fileSaved=function(b,e,f,c,k){this.lastSaved=new Date;this.ageStart=null;try{this.stats.saved++;this.invalidChecksum=this.inConflictState=!1;var m=this.ui.getPagesForXml(b);null==this.sync||this.isOptimisticSync()?(this.setShadowPages(m),null!=this.sync&&(this.sync.lastModified=this.getLastModifiedDate(),this.sync.resetUpdateStatusThread(),this.isRealtime()&&this.sync.scheduleCleanup()),null!=f&&f()):this.sync.fileSaved(m,e,f,c,k)}catch(C){this.invalidChecksum=this.inConflictState= +!0;this.descriptorChanged();null!=c&&c(C);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,C);else{var u=this.getCurrentUser(),x=null!=u?u.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),x,C)}}catch(A){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)}; DrawioFile.prototype.autosave=function(b,e,f,c){null==this.lastAutosave&&(this.lastAutosave=Date.now());b=Date.now()-this.lastAutosavethis.maxAutosaveRevisionDelay};DrawioFile.prototype.descriptorChanged=function(){this.fireEvent(new mxEventObject("descriptorChanged"))};DrawioFile.prototype.contentChanged=function(){this.fireEvent(new mxEventObject("contentChanged"))}; @@ -10809,13 +10809,13 @@ DrawioFile.prototype.removeListeners=function(){null!=this.changeListener&&(this DrawioFile.prototype.commentsRefreshNeeded=function(){return!0};DrawioFile.prototype.commentsSaveNeeded=function(){return!1};DrawioFile.prototype.getComments=function(b,e){b([])};DrawioFile.prototype.addComment=function(b,e,f){e(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(b,e){return new DrawioComment(this,null,b,Date.now(),Date.now(),!1,e)};LocalFile=function(b,e,f,c,k,m){DrawioFile.call(this,b,e);this.title=f;this.mode=c?null:App.MODE_DEVICE;this.fileHandle=k;this.desc=m};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return null!=this.fileHandle&&!this.invalidFileHandle&&DrawioFile.prototype.isAutosave.apply(this,arguments)};LocalFile.prototype.isAutosaveOptional=function(){return null!=this.fileHandle};LocalFile.prototype.getMode=function(){return this.mode};LocalFile.prototype.getTitle=function(){return this.title}; LocalFile.prototype.isRenamable=function(){return!0};LocalFile.prototype.save=function(b,e,f){this.saveAs(this.title,e,f)};LocalFile.prototype.saveAs=function(b,e,f){this.saveFile(b,!1,e,f)};LocalFile.prototype.saveAs=function(b,e,f){this.saveFile(b,!1,e,f)};LocalFile.prototype.getDescriptor=function(){return this.desc};LocalFile.prototype.setDescriptor=function(b){this.desc=b}; LocalFile.prototype.getLatestVersion=function(b,e){null==this.fileHandle?null!=e&&e({message:mxResources.get("cannotOpenFile")}):this.ui.loadFileSystemEntry(this.fileHandle,b,e)}; -LocalFile.prototype.saveFile=function(b,e,f,c,k){b!=this.title&&(this.desc=this.fileHandle=null);this.title=b;k||this.updateFileData();var m=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var u=this.getData(),x=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=f&&f()}),D=mxUtils.bind(this,function(A){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=!0;var z=mxUtils.bind(this, +LocalFile.prototype.saveFile=function(b,e,f,c,k){b!=this.title&&(this.desc=this.fileHandle=null);this.title=b;k||this.updateFileData();var m=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var u=this.getData(),x=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=f&&f()}),C=mxUtils.bind(this,function(A){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=!0;var z=mxUtils.bind(this, function(d){this.savingFile=!1;null!=c&&c({error:d})});this.saveDraft();this.fileHandle.createWritable().then(mxUtils.bind(this,function(d){this.fileHandle.getFile().then(mxUtils.bind(this,function(g){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[g],"conflict",this.desc.lastModified!=g.lastModified);this.desc.lastModified==g.lastModified?d.write(m?this.ui.base64ToBlob(A,"image/png"):A).then(mxUtils.bind(this,function(){d.close().then(mxUtils.bind(this, function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(l){try{var q=this.desc;this.savingFile=!1;this.desc=l;this.fileSaved(u,q,x,z);this.removeDraft()}catch(t){z(t)}}),z)}),z)}),z):(this.inConflictState=!0,z())}),mxUtils.bind(this,function(g){this.invalidFileHandle=!0;z(g)}))}),z)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(A,b,m?"image/png":"text/xml",m);else if(A.lengthf&&(mxUtils.br(D),u=1);var C=document.createElement("a");C.style.overflow="hidden";C.style.display="inline-block";C.className="geBaseButton";C.style.boxSizing="border-box";C.style.fontSize="11px";C.style.position="relative";C.style.margin="4px";C.style.marginTop="8px";C.style.marginBottom="0px";C.style.padding="8px 10px 8px 10px";C.style.width="88px";C.style.height= -"100px";C.style.whiteSpace="nowrap";C.setAttribute("title",d);var F=document.createElement("div");F.style.textOverflow="ellipsis";F.style.overflow="hidden";F.style.position="absolute";F.style.bottom="8px";F.style.left="0px";F.style.right="0px";mxUtils.write(F,d);C.appendChild(F);if(null!=H){var G=document.createElement("img");G.setAttribute("src",H);G.setAttribute("border","0");G.setAttribute("align","absmiddle");G.style.width="60px";G.style.height="60px";G.style.paddingBottom="6px";C.appendChild(G)}else F.style.paddingTop= -"5px",F.style.whiteSpace="normal",mxClient.IS_IOS?(C.style.padding="0px 10px 20px 10px",C.style.top="6px"):mxClient.IS_FF&&(F.style.paddingTop="0px",F.style.marginTop="-2px");if(null!=q)for(H=0;Hf&&(mxUtils.br(C),u=1);var D=document.createElement("a");D.style.overflow="hidden";D.style.display="inline-block";D.className="geBaseButton";D.style.boxSizing="border-box";D.style.fontSize="11px";D.style.position="relative";D.style.margin="4px";D.style.marginTop="8px";D.style.marginBottom="0px";D.style.padding="8px 10px 8px 10px";D.style.width="88px";D.style.height= +"100px";D.style.whiteSpace="nowrap";D.setAttribute("title",d);var F=document.createElement("div");F.style.textOverflow="ellipsis";F.style.overflow="hidden";F.style.position="absolute";F.style.bottom="8px";F.style.left="0px";F.style.right="0px";mxUtils.write(F,d);D.appendChild(F);if(null!=H){var G=document.createElement("img");G.setAttribute("src",H);G.setAttribute("border","0");G.setAttribute("align","absmiddle");G.style.width="60px";G.style.height="60px";G.style.paddingBottom="6px";D.appendChild(G)}else F.style.paddingTop= +"5px",F.style.whiteSpace="normal",mxClient.IS_IOS?(D.style.padding="0px 10px 20px 10px",D.style.top="6px"):mxClient.IS_FF&&(F.style.paddingTop="0px",F.style.marginTop="-2px");if(null!=q)for(H=0;H'+e+""),q.close()):b.handleError({message:mxResources.get("errorUpdatingPreview")})}}),H.className="geBtn",m.appendChild(H));if(!A||7500e.length){var d=mxUtils.button("",function(){try{var g="https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(z.value);b.openLink(g)}catch(l){b.handleError({message:l.message||mxResources.get("drawingTooLarge")})}});x=document.createElement("img");x.setAttribute("src",Editor.facebookImage);x.setAttribute("width","18");x.setAttribute("height", +b.saveData(null!=C?C:"embed.txt","txt",e,"text/plain")}),x.className="geBtn",m.appendChild(x);if(A&&(!b.isOffline()||mxClient.IS_CHROMEAPP)){if(51200>e.length){var d=mxUtils.button("",function(){try{var g="https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(z.value);b.openLink(g)}catch(l){b.handleError({message:l.message||mxResources.get("drawingTooLarge")})}});x=document.createElement("img");x.setAttribute("src",Editor.facebookImage);x.setAttribute("width","18");x.setAttribute("height", "18");x.setAttribute("border","0");d.appendChild(x);d.setAttribute("title",mxResources.get("facebook")+" ("+b.formatFileSize(51200)+" max)");d.style.verticalAlign="bottom";d.style.paddingTop="4px";d.style.minWidth="46px";d.className="geBtn";m.appendChild(d)}7168>e.length&&(d=mxUtils.button("",function(){try{var g="https://twitter.com/intent/tweet?text="+encodeURIComponent(u)+"&url="+encodeURIComponent(z.value);b.openLink(g)}catch(l){b.handleError({message:l.message||mxResources.get("drawingTooLarge")})}}), -x=document.createElement("img"),x.setAttribute("src",Editor.tweetImage),x.setAttribute("width","18"),x.setAttribute("height","18"),x.setAttribute("border","0"),x.style.marginBottom="5px",d.appendChild(x),d.setAttribute("title",mxResources.get("twitter")+" ("+b.formatFileSize(7168)+" max)"),d.style.verticalAlign="bottom",d.style.paddingTop="4px",d.style.minWidth="46px",d.className="geBtn",m.appendChild(d))}!b.isOffline()&&5E5>e.length&&(d=mxUtils.button("",function(){try{var g="mailto:?subject="+encodeURIComponent(D|| +x=document.createElement("img"),x.setAttribute("src",Editor.tweetImage),x.setAttribute("width","18"),x.setAttribute("height","18"),x.setAttribute("border","0"),x.style.marginBottom="5px",d.appendChild(x),d.setAttribute("title",mxResources.get("twitter")+" ("+b.formatFileSize(7168)+" max)"),d.style.verticalAlign="bottom",d.style.paddingTop="4px",d.style.minWidth="46px",d.className="geBtn",m.appendChild(d))}!b.isOffline()&&5E5>e.length&&(d=mxUtils.button("",function(){try{var g="mailto:?subject="+encodeURIComponent(C|| b.defaultFilename)+"&body="+encodeURIComponent(z.value);b.openLink(g)}catch(l){b.handleError({message:l.message||mxResources.get("drawingTooLarge")})}}),x=document.createElement("img"),x.className="geAdaptiveAsset",x.setAttribute("src",Editor.mailImage),x.setAttribute("width","18"),x.setAttribute("height","18"),x.setAttribute("border","0"),x.style.marginBottom="5px",d.appendChild(x),d.style.verticalAlign="bottom",d.style.paddingTop="4px",d.style.minWidth="46px",d.className="geBtn",m.appendChild(d)); x=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});m.appendChild(x);d=mxUtils.button(mxResources.get("copy"),function(){z.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?z.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");b.alert(mxResources.get("copiedToClipboard"))});5E5>e.length?mxClient.IS_SF||null!=document.documentMode?x.className="geBtn gePrimaryBtn":(m.appendChild(d),d.className="geBtn gePrimaryBtn",x.className="geBtn"):(m.appendChild(H), x.className="geBtn",H.className="geBtn gePrimaryBtn");c.appendChild(m);this.container=c};EmbedDialog.showPreviewOption=!0; -var GoogleSitesDialog=function(b,e){function f(){var p=null!=J&&null!=J.getTitle()?J.getTitle():this.defaultFilename;if(G.checked&&""!=d.value){var v="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(d.value));null!=p&&(v+="&title="+encodeURIComponent(p));0 Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml"== +function(E){E.action==google.picker.Action.PICKED&&null!=E.docs[0].thumbnails&&(E=E.docs[0].thumbnails[E.docs[0].thumbnails.length-1],null!=E&&(z.value=E.url,y()));z.focus()};m.appendChild(A);m.appendChild(H);mxUtils.br(m);mxUtils.br(m);x?(A.setAttribute("checked","checked"),A.checked=!0):(C.setAttribute("checked","checked"),C.checked=!0);!u&&A.checked&&(mxUtils.write(l,mxResources.get("pageNotFound")),l.setAttribute("disabled","disabled"),l.setAttribute("selected","selected"),l.setAttribute("value", +"pageNotFound"),H.appendChild(l),mxEvent.addListener(H,"change",function(){null==l.parentNode||l.selected||l.parentNode.removeChild(l)}));f=document.createElement("div");f.style.display="flex";f.style.alignItems="center";f.style.height="20px";var P=document.createElement("input");P.setAttribute("type","checkbox");P.style.margin="0px 10px 0px 4px";P.style.verticalAlign="bottom";P.defaultChecked=c!=mxConstants.NONE&&null!=c;P.checked=P.defaultChecked;f.appendChild(P);mxUtils.write(f,mxResources.get("fillColor")); +var J=document.createElement("button");J.style.width="36px";J.style.height="18px";J.style.cursor="pointer";J.style.marginLeft="10px";J.style.backgroundPosition="center center";J.style.backgroundRepeat="no-repeat";J.style.verticalAlign="bottom";J.className="geColorBtn";var n=c;k();mxEvent.addListener(f,"click",function(E){mxEvent.getSource(E)!=P&&(P.checked=!P.checked);n=P.checked?"#ffffff":null;k()});mxEvent.addListener(J,"click",function(E){b.pickColor(n||"none",function(I){n=I;k()});mxEvent.consume(E)}); +f.appendChild(J);m.appendChild(f);mxUtils.br(m);c=document.createElement("div");c.style.marginTop="30px";c.style.textAlign="right";f=mxUtils.button(mxResources.get("cancel"),function(){q=!0;b.hideDialog()});f.className="geBtn";b.editor.cancelFirst&&c.appendChild(f);u=mxUtils.button(mxResources.get("reset"),function(){z.value="";F.value="";G.value="";C.checked=!0;n=mxConstants.NONE;k();q=!1});mxEvent.addGestureListeners(u,function(){q=!0});u.className="geBtn";u.width="100";c.appendChild(u);if(Graph.fileSupport){var v= +document.createElement("input");v.setAttribute("multiple","multiple");v.setAttribute("type","file");mxEvent.addListener(v,"change",function(E){null!=v.files&&(D(v.files),v.type="",v.type="file",v.value="")});v.style.display="none";m.appendChild(v);u=mxUtils.button(mxResources.get("open"),function(){v.click()});u.className="geBtn";c.appendChild(u)}applyBtn=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();y(null,function(E){e(""!=E&&null!=E?new mxImage(E,F.value,G.value):null,null== +E,n)})});mxEvent.addGestureListeners(applyBtn,function(){t=!0});applyBtn.className="geBtn gePrimaryBtn";c.appendChild(applyBtn);b.editor.cancelFirst||c.appendChild(f);m.appendChild(c);this.container=m},ParseDialog=function(b,e,f){function c(g,l,q){var t=g.split("\n");if("plantUmlPng"==l||"plantUmlSvg"==l||"plantUmlTxt"==l){if(b.spinner.spin(document.body,mxResources.get("inserting"))){var y=function(R,Q,V,X,p){m=mxEvent.isAltDown(q)?m:D.getCenterInsertPoint(new mxRectangle(0,0,X,p));var B=null;D.getModel().beginUpdate(); +try{B="txt"==Q?b.insertAsPreText(V,m.x,m.y):D.insertVertex(null,null,null,m.x,m.y,X,p,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b.convertDataUri(V)+";"),D.setAttributeForCell(B,"plantUmlData",JSON.stringify({data:R,format:Q},null,2))}finally{D.getModel().endUpdate()}null!=B&&(D.setSelectionCell(B),D.scrollCellToVisible(B))},D=b.editor.graph,F="plantUmlTxt"==l?"txt":"plantUmlPng"==l?"png":"svg";"@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"== g&&"svg"==F?window.setTimeout(function(){b.spinner.stop();y(g,F,"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBjb250ZW50U2NyaXB0VHlwZT0iYXBwbGljYXRpb24vZWNtYXNjcmlwdCIgY29udGVudFN0eWxlVHlwZT0idGV4dC9jc3MiIGhlaWdodD0iMjEycHgiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiIHN0eWxlPSJ3aWR0aDoyOTVweDtoZWlnaHQ6MjEycHg7IiB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyOTUgMjEyIiB3aWR0aD0iMjk1cHgiIHpvb21BbmRQYW49Im1hZ25pZnkiPjxkZWZzLz48Zz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogNS4wLDUuMDsiIHgxPSIzMSIgeDI9IjMxIiB5MT0iMzQuNDg4MyIgeTI9IjE3MS43MzA1Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDUuMCw1LjA7IiB4MT0iMjY0LjUiIHgyPSIyNjQuNSIgeTE9IjM0LjQ4ODMiIHkyPSIxNzEuNzMwNSIvPjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIzMyIgeD0iMTUiIHk9IjIzLjUzNTIiPkFsaWNlPC90ZXh0PjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjE3MC43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTQiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMzMiIHg9IjE1IiB5PSIxOTEuMjY1NiI+QWxpY2U8L3RleHQ+PHJlY3QgZmlsbD0iI0ZFRkVDRSIgaGVpZ2h0PSIzMC40ODgzIiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuNTsiIHdpZHRoPSI0MCIgeD0iMjQ0LjUiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjIzLjUzNTIiPkJvYjwvdGV4dD48cmVjdCBmaWxsPSIjRkVGRUNFIiBoZWlnaHQ9IjMwLjQ4ODMiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS41OyIgd2lkdGg9IjQwIiB4PSIyNDQuNSIgeT0iMTcwLjczMDUiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjE5MS4yNjU2Ij5Cb2I8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSIyNTIuNSw2MS43OTg4LDI2Mi41LDY1Ljc5ODgsMjUyLjUsNjkuNzk4OCwyNTYuNSw2NS43OTg4IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiIHgxPSIzMS41IiB4Mj0iMjU4LjUiIHkxPSI2NS43OTg4IiB5Mj0iNjUuNzk4OCIvPjx0ZXh0IGZpbGw9IiMwMDAwMDAiIGZvbnQtZmFtaWx5PSJzYW5zLXNlcmlmIiBmb250LXNpemU9IjEzIiBsZW5ndGhBZGp1c3Q9InNwYWNpbmdBbmRHbHlwaHMiIHRleHRMZW5ndGg9IjE0NyIgeD0iMzguNSIgeT0iNjEuMDU2NiI+QXV0aGVudGljYXRpb24gUmVxdWVzdDwvdGV4dD48cG9seWdvbiBmaWxsPSIjQTgwMDM2IiBwb2ludHM9IjQyLjUsOTEuMTA5NCwzMi41LDk1LjEwOTQsNDIuNSw5OS4xMDk0LDM4LjUsOTUuMTA5NCIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDIuMCwyLjA7IiB4MT0iMzYuNSIgeDI9IjI2My41IiB5MT0iOTUuMTA5NCIgeTI9Ijk1LjEwOTQiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxNTciIHg9IjQ4LjUiIHk9IjkwLjM2NzIiPkF1dGhlbnRpY2F0aW9uIFJlc3BvbnNlPC90ZXh0Pjxwb2x5Z29uIGZpbGw9IiNBODAwMzYiIHBvaW50cz0iMjUyLjUsMTIwLjQxOTksMjYyLjUsMTI0LjQxOTksMjUyLjUsMTI4LjQxOTksMjU2LjUsMTI0LjQxOTkiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIvPjxsaW5lIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIgeDE9IjMxLjUiIHgyPSIyNTguNSIgeTE9IjEyNC40MTk5IiB5Mj0iMTI0LjQxOTkiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxOTkiIHg9IjM4LjUiIHk9IjExOS42Nzc3Ij5Bbm90aGVyIGF1dGhlbnRpY2F0aW9uIFJlcXVlc3Q8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSI0Mi41LDE0OS43MzA1LDMyLjUsMTUzLjczMDUsNDIuNSwxNTcuNzMwNSwzOC41LDE1My43MzA1IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogMi4wLDIuMDsiIHgxPSIzNi41IiB4Mj0iMjYzLjUiIHkxPSIxNTMuNzMwNSIgeTI9IjE1My43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTMiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMjA5IiB4PSI0OC41IiB5PSIxNDguOTg4MyI+QW5vdGhlciBhdXRoZW50aWNhdGlvbiBSZXNwb25zZTwvdGV4dD48IS0tTUQ1PVs3ZjNlNGQwYzkwMWVmZGJjNTdlYjQ0MjQ5YTNiODE5N10KQHN0YXJ0dW1sDQpza2lucGFyYW0gc2hhZG93aW5nIGZhbHNlDQpBbGljZSAtPiBCb2I6IEF1dGhlbnRpY2F0aW9uIFJlcXVlc3QNCkJvYiAtIC0+IEFsaWNlOiBBdXRoZW50aWNhdGlvbiBSZXNwb25zZQ0KDQpBbGljZSAtPiBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVxdWVzdA0KQWxpY2UgPC0gLSBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVzcG9uc2UNCkBlbmR1bWwNCgpQbGFudFVNTCB2ZXJzaW9uIDEuMjAyMC4wMihTdW4gTWFyIDAxIDA0OjIyOjA3IENTVCAyMDIwKQooTUlUIHNvdXJjZSBkaXN0cmlidXRpb24pCkphdmEgUnVudGltZTogT3BlbkpESyBSdW50aW1lIEVudmlyb25tZW50CkpWTTogT3BlbkpESyA2NC1CaXQgU2VydmVyIFZNCkphdmEgVmVyc2lvbjogMTIrMzMKT3BlcmF0aW5nIFN5c3RlbTogTWFjIE9TIFgKRGVmYXVsdCBFbmNvZGluZzogVVRGLTgKTGFuZ3VhZ2U6IGVuCkNvdW50cnk6IFVTCi0tPjwvZz48L3N2Zz4=", -295,212)},200):b.generatePlantUmlImage(g,F,function(R,P,V){b.spinner.stop();y(g,F,R,P,V)},function(R){b.handleError(R)})}}else if("mermaid"==l)b.spinner.spin(document.body,mxResources.get("inserting"))&&(C=b.editor.graph,b.generateMermaidImage(g,F,function(R,P,V){m=mxEvent.isAltDown(q)?m:C.getCenterInsertPoint(new mxRectangle(0,0,P,V));b.spinner.stop();var X=null;C.getModel().beginUpdate();try{X=C.insertVertex(null,null,null,m.x,m.y,P,V,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+ -R+";"),C.setAttributeForCell(X,"mermaidData",JSON.stringify({data:g,config:EditorUi.defaultMermaidConfig},null,2))}finally{C.getModel().endUpdate()}null!=X&&(C.setSelectionCell(X),C.scrollCellToVisible(X))},function(R){b.handleError(R)}));else if("table"==l){l=null;for(var G=[],Q=0,J={},p=0;p");2<=L.length&&(E=I(L[0]),N=I(L[L.length-1]),L=new mxCell(2");2<=L.length&&(E=I(L[0]),M=I(L[L.length-1]),L=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"==x.value||"plantUmlTxt"==x.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 m=b.editor.graph.getFreeInsertPoint();e=document.createElement("div");e.style.textAlign="right";var u=document.createElement("textarea");u.style.boxSizing="border-box";u.style.resize= -"none";u.style.width="100%";u.style.height="354px";u.style.marginBottom="16px";var x=document.createElement("select");if("formatSql"==f||"mermaid"==f)x.style.display="none";var D=document.createElement("option");D.setAttribute("value","list");mxUtils.write(D,mxResources.get("list"));"plantUml"!=f&&x.appendChild(D);null!=f&&"fromText"!=f||D.setAttribute("selected","selected");D=document.createElement("option");D.setAttribute("value","table");mxUtils.write(D,mxResources.get("formatSql"));"formatSql"== -f&&(x.appendChild(D),D.setAttribute("selected","selected"));D=document.createElement("option");D.setAttribute("value","mermaid");mxUtils.write(D,mxResources.get("formatSql"));"mermaid"==f&&(x.appendChild(D),D.setAttribute("selected","selected"));D=document.createElement("option");D.setAttribute("value","diagram");mxUtils.write(D,mxResources.get("diagram"));var A=document.createElement("option");A.setAttribute("value","circle");mxUtils.write(A,mxResources.get("circle"));var z=document.createElement("option"); -z.setAttribute("value","horizontalFlow");mxUtils.write(z,mxResources.get("horizontalFlow"));var H=document.createElement("option");H.setAttribute("value","verticalFlow");mxUtils.write(H,mxResources.get("verticalFlow"));"plantUml"!=f&&(x.appendChild(D),x.appendChild(A),x.appendChild(z),x.appendChild(H));D=document.createElement("option");D.setAttribute("value","plantUmlSvg");mxUtils.write(D,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");"plantUml"==f&&D.setAttribute("selected", -"selected");A=document.createElement("option");A.setAttribute("value","plantUmlPng");mxUtils.write(A,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+")");z=document.createElement("option");z.setAttribute("value","plantUmlTxt");mxUtils.write(z,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!b.isOffline()&&"plantUml"==f&&(x.appendChild(D),x.appendChild(A),x.appendChild(z));var d=k();u.value=d;e.appendChild(u);this.init=function(){u.focus()}; -Graph.fileSupport&&(u.addEventListener("dragover",function(g){g.stopPropagation();g.preventDefault()},!1),u.addEventListener("drop",function(g){g.stopPropagation();g.preventDefault();if(0=Sa.getStatus()&&(Ia=Sa.getText());Ta(Ia,Pa)}))):Ta(Ia,Pa)}function ba(Ha,Ta,Sa){if(null!=Ha&&mxUtils.isAncestorNode(document.body,ka)){Ha=mxUtils.parseXml(Ha);Ha=Editor.parseDiagramNode(Ha.documentElement);var Wa=new mxCodec(Ha.ownerDocument),$a=new mxGraphModel; Wa.decode(Ha,$a);Ha=$a.root.getChildAt(0).children;b.sidebar.createTooltip(ka,Ha,Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-80,1E3),Math.min((window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)-80,800),null!=ra?mxResources.get(ra,null,ra):null,!0,new mxPoint(Ta,Sa),!0,function(){Ua=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display;G(ka,null,null,ja,da,wa)},!0,!1)}}function ia(Ha,Ta){null==ja||Va|| b.sidebar.currentElt==ka?b.sidebar.hideTooltip():(b.sidebar.hideTooltip(),null!=Ga?(Ta=''+Graph.compress('')+"",ba(Ta,mxEvent.getClientX(Ha),mxEvent.getClientY(Ha))):(b.sidebar.currentElt= @@ -10928,259 +10928,259 @@ ta.setAttribute("width","100%");ta.setAttribute("height","100%");ta.style.backgr "100%"),ta.setAttribute("height","100%"),ta.style.lineHeight="1.3em",Da=document.createElement("tbody"),pa=document.createElement("tr"),va=document.createElement("td"),va.setAttribute("align","center"),va.setAttribute("valign","middle"),Qa=document.createElement("span"),Qa.style.display="inline-block",Qa.style.padding="4px 8px 4px 8px",Qa.style.userSelect="none",Qa.style.borderRadius="3px",Qa.style.background="#ffffff",Qa.style.overflow="hidden",Qa.style.textOverflow="ellipsis",Qa.style.maxWidth= ya-34+"px",mxUtils.write(Qa,mxResources.get(ra,null,ra)),va.appendChild(Qa),pa.appendChild(va),Da.appendChild(pa),ta.appendChild(Da),ka.appendChild(ta),oa&&G(ka),mxEvent.addGestureListeners(ka,mxUtils.bind(this,function(Ha){G(ka,null,null,ja,da)}),null,null),null!=la?mxEvent.addListener(ka,"click",la):(mxEvent.addListener(ka,"click",function(Ha){G(ka,null,null,ja,da)}),mxEvent.addListener(ka,"dblclick",function(Ha){F();mxEvent.consume(Ha)}));if(null!=ja){var Ra=document.createElement("img");Ra.setAttribute("src", Sidebar.prototype.searchImage);Ra.setAttribute("title",mxResources.get("preview"));Ra.className="geActiveButton";Ra.style.position="absolute";Ra.style.cursor="default";Ra.style.padding="8px";Ra.style.right="0px";Ra.style.top="0px";ka.appendChild(Ra);var Ua=!1;mxEvent.addGestureListeners(Ra,mxUtils.bind(this,function(Ha){Ua=b.sidebar.currentElt==ka}),null,null);mxEvent.addListener(Ra,"click",mxUtils.bind(this,function(Ha){Ua||ia(Ha,Ra);mxEvent.consume(Ha)}))}ca.appendChild(ka);return ka}function J(){function ja(ia, -ka){var Ia=mxResources.get(ia);null==Ia&&(Ia=ia.substring(0,1).toUpperCase()+ia.substring(1));18=ca.scrollHeight&&(C(),mxEvent.consume(ia))})); +ka){var Ia=mxResources.get(ia);null==Ia&&(Ia=ia.substring(0,1).toUpperCase()+ia.substring(1));18=ca.scrollHeight&&(D(),mxEvent.consume(ia))})); if(0(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth);f=null!=f?f:!0;k=null!=k?k:!1;u=null!=u?u:"#ebf2f9";x=null!=x?x:Editor.isDarkMode()?"#a2a2a2":"#e6eff8";D=null!=D?D:Editor.isDarkMode()?"1px dashed #00a8ff":"1px solid #ccd9ea";z=null!=z?z:EditorUi.templateFile;var v=document.createElement("div"); +oa.setAttribute("title",la),mxUtils.write(oa,la);null!=A&&(oa.style.padding=A);Ba.appendChild(oa);null==na&&0(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth);f=null!=f?f:!0;k=null!=k?k:!1;u=null!=u?u:"#ebf2f9";x=null!=x?x:Editor.isDarkMode()?"#a2a2a2":"#e6eff8";C=null!=C?C:Editor.isDarkMode()?"1px dashed #00a8ff":"1px solid #ccd9ea";z=null!=z?z:EditorUi.templateFile;var v=document.createElement("div"); v.style.userSelect="none";v.style.height="100%";var E=document.createElement("div");E.style.whiteSpace="nowrap";E.style.height="46px";f&&v.appendChild(E);var I=document.createElement("img");I.setAttribute("border","0");I.setAttribute("align","absmiddle");I.style.width="40px";I.style.height="40px";I.style.marginRight="10px";I.style.paddingBottom="4px";I.src=b.mode==App.MODE_GOOGLE?IMAGE_PATH+"/google-drive-logo.svg":b.mode==App.MODE_DROPBOX?IMAGE_PATH+"/dropbox-logo.svg":b.mode==App.MODE_ONEDRIVE? -IMAGE_PATH+"/onedrive-logo.svg":b.mode==App.MODE_GITHUB?IMAGE_PATH+"/github-logo.svg":b.mode==App.MODE_GITLAB?IMAGE_PATH+"/gitlab-logo.svg":b.mode==App.MODE_TRELLO?IMAGE_PATH+"/trello-logo.svg":b.mode==App.MODE_BROWSER?IMAGE_PATH+"/osa_database.png":IMAGE_PATH+"/osa_drive-harddisk.png";e||p||!f||E.appendChild(I);f&&mxUtils.write(E,(p?mxResources.get("name"):null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+":");I=".drawio"; -b.mode==App.MODE_GOOGLE&&null!=b.drive?I=b.drive.extension:b.mode==App.MODE_DROPBOX&&null!=b.dropbox?I=b.dropbox.extension:b.mode==App.MODE_ONEDRIVE&&null!=b.oneDrive?I=b.oneDrive.extension:b.mode==App.MODE_GITHUB&&null!=b.gitHub?I=b.gitHub.extension:b.mode==App.MODE_GITLAB&&null!=b.gitLab?I=b.gitLab.extension:b.mode==App.MODE_TRELLO&&null!=b.trello&&(I=b.trello.extension);var N=document.createElement("input");N.setAttribute("value",b.defaultFilename+I);N.style.marginLeft="10px";N.style.width=e|| -p?"144px":"244px";this.init=function(){f&&(N.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?N.select():document.execCommand("selectAll",!1,null));null!=ca.parentNode&&null!=ca.parentNode.parentNode&&mxEvent.addGestureListeners(ca.parentNode.parentNode,mxUtils.bind(this,function(ja){b.sidebar.hideTooltip()}),null,null)};f&&(E.appendChild(N),y?N.style.width=e||p?"350px":"450px":(null!=b.editor.diagramFileTypes&&(y=FilenameDialog.createFileTypes(b,N,b.editor.diagramFileTypes),y.style.marginLeft= -"6px",y.style.width=e||p?"80px":"180px",E.appendChild(y)),null!=b.editor.fileExtensions&&(p=FilenameDialog.createTypeHint(b,N,b.editor.fileExtensions),p.style.marginTop="12px",E.appendChild(p))));E=!1;var K=0,L=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9}),R=mxUtils.button(q||mxResources.get("create"),function(){R.setAttribute("disabled","disabled");F();R.removeAttribute("disabled")});R.className="geBtn gePrimaryBtn"; -if(H||d){var P=[],V=null,X=null,n=null,B=function(ja){R.setAttribute("disabled","disabled");for(var ua=0;uae.lastIndexOf(".")&&0>U){B=null!=B?B:v.value;var O="";B==App.MODE_GOOGLE?O=b.drive.extension:B==App.MODE_GITHUB?O=b.gitHub.extension:B==App.MODE_GITLAB?O=b.gitLab.extension:B==App.MODE_TRELLO?O=b.trello.extension:B==App.MODE_DROPBOX?O=b.dropbox.extension:B==App.MODE_ONEDRIVE?O=b.oneDrive.extension:B==App.MODE_DEVICE&& -(O=".drawio");0<=U&&(M=M.substring(0,U));G.value=M+O}}C(N)})}var R=document.createElement("a");R.style.overflow="hidden";var P=document.createElement("img");P.src=E;P.setAttribute("border","0");P.setAttribute("align","absmiddle");P.style.width="60px";P.style.height="60px";P.style.paddingBottom="6px";R.style.display="inline-block";R.className="geBaseButton";R.style.position="relative";R.style.margin="4px";R.style.padding="8px 8px 10px 8px";R.style.whiteSpace="nowrap";R.appendChild(P);R.style.color= -"gray";R.style.fontSize="11px";var V=document.createElement("div");R.appendChild(V);mxUtils.write(V,I);if(null!=K&&null==b[K]){P.style.visibility="hidden";mxUtils.setOpacity(V,10);var X=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});X.spin(R);var n=window.setTimeout(function(){null==b[K]&&(X.stop(),R.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(){null!=b[K]&&(window.clearTimeout(n), -mxUtils.setOpacity(V,100),P.style.visibility="",X.stop(),L())}))}else L();J.appendChild(R);++p==H&&(mxUtils.br(J),p=0)}function C(E){var I=G.value;if(null==E||null!=I&&0e.lastIndexOf(".")&&0>U){B=null!=B?B:v.value;var O="";B==App.MODE_GOOGLE?O=b.drive.extension:B==App.MODE_GITHUB?O=b.gitHub.extension:B==App.MODE_GITLAB?O=b.gitLab.extension:B==App.MODE_TRELLO?O=b.trello.extension:B==App.MODE_DROPBOX?O=b.dropbox.extension:B==App.MODE_ONEDRIVE?O=b.oneDrive.extension:B==App.MODE_DEVICE&& +(O=".drawio");0<=U&&(N=N.substring(0,U));G.value=N+O}}D(M)})}var R=document.createElement("a");R.style.overflow="hidden";var Q=document.createElement("img");Q.src=E;Q.setAttribute("border","0");Q.setAttribute("align","absmiddle");Q.style.width="60px";Q.style.height="60px";Q.style.paddingBottom="6px";R.style.display="inline-block";R.className="geBaseButton";R.style.position="relative";R.style.margin="4px";R.style.padding="8px 8px 10px 8px";R.style.whiteSpace="nowrap";R.appendChild(Q);R.style.color= +"gray";R.style.fontSize="11px";var V=document.createElement("div");R.appendChild(V);mxUtils.write(V,I);if(null!=K&&null==b[K]){Q.style.visibility="hidden";mxUtils.setOpacity(V,10);var X=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});X.spin(R);var p=window.setTimeout(function(){null==b[K]&&(X.stop(),R.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(){null!=b[K]&&(window.clearTimeout(p), +mxUtils.setOpacity(V,100),Q.style.visibility="",X.stop(),L())}))}else L();J.appendChild(R);++n==H&&(mxUtils.br(J),n=0)}function D(E){var I=G.value;if(null==E||null!=I&&0'],{type:"text/html"})});navigator.clipboard.write([E]).then(mxUtils.bind(this,function(){b.alert(mxResources.get("copiedToClipboard"))}))["catch"](mxUtils.bind(this, -function(I){b.handleError(I)}))}),q.style.marginTop="6px",q.className="geBtn");D&&Editor.popupsAllowed&&(k.style.cursor="pointer",mxEvent.addGestureListeners(k,null,null,function(E){mxEvent.isPopupTrigger(E)||C("_blank")}))}mxUtils.br(m);var J=document.createElement("div");J.style.textAlign="center";var p=0;J.style.marginTop="6px";m.appendChild(J);var v=document.createElement("select");v.style.marginLeft="10px";b.isOfflineApp()||b.isOffline()||("function"===typeof window.DriveClient&&(d=document.createElement("option"), +k.style.marginLeft="6px",k.style.width="90px",m.appendChild(k)),m.appendChild(FilenameDialog.createTypeHint(b,G,q)));q=null;if("1"!=urlParams.noDevice&&null!=d&&null!=g&&"image/"==g.substring(0,6)&&("image/svg"!=g.substring(0,9)||mxClient.IS_SVG)){G.style.width="160px";k=document.createElement("img");var P=l?d:btoa(unescape(encodeURIComponent(d)));k.setAttribute("src","data:"+g+";base64,"+P);k.style.position="absolute";k.style.top="70px";k.style.right="100px";k.style.maxWidth="120px";k.style.maxHeight= +"80px";mxUtils.setPrefixedStyle(k.style,"transform","translate(50%,-50%)");m.appendChild(k);mxClient.IS_FF||"image/png"!=g||null==navigator.clipboard||"function"!==typeof window.ClipboardItem||(q=mxUtils.button(mxResources.get("copy"),function(E){E=b.base64ToBlob(P,"image/png");E=new ClipboardItem({"image/png":E,"text/html":new Blob([''],{type:"text/html"})});navigator.clipboard.write([E]).then(mxUtils.bind(this,function(){b.alert(mxResources.get("copiedToClipboard"))}))["catch"](mxUtils.bind(this, +function(I){b.handleError(I)}))}),q.style.marginTop="6px",q.className="geBtn");C&&Editor.popupsAllowed&&(k.style.cursor="pointer",mxEvent.addGestureListeners(k,null,null,function(E){mxEvent.isPopupTrigger(E)||D("_blank")}))}mxUtils.br(m);var J=document.createElement("div");J.style.textAlign="center";var n=0;J.style.marginTop="6px";m.appendChild(J);var v=document.createElement("select");v.style.marginLeft="10px";b.isOfflineApp()||b.isOffline()||("function"===typeof window.DriveClient&&(d=document.createElement("option"), d.setAttribute("value",App.MODE_GOOGLE),mxUtils.write(d,mxResources.get("googleDrive")),v.appendChild(d),y(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(d=document.createElement("option"),d.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(d,mxResources.get("oneDrive")),v.appendChild(d),b.mode==App.MODE_ONEDRIVE&&d.setAttribute("selected","selected"),y(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"), App.MODE_ONEDRIVE,"oneDrive")),"function"===typeof window.DropboxClient&&(d=document.createElement("option"),d.setAttribute("value",App.MODE_DROPBOX),mxUtils.write(d,mxResources.get("dropbox")),v.appendChild(d),b.mode==App.MODE_DROPBOX&&d.setAttribute("selected","selected"),y(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),null!=b.gitHub&&(d=document.createElement("option"),d.setAttribute("value",App.MODE_GITHUB),mxUtils.write(d,mxResources.get("github")),v.appendChild(d), y(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),null!=b.gitLab&&(d=document.createElement("option"),d.setAttribute("value",App.MODE_GITLAB),mxUtils.write(d,mxResources.get("gitlab")),v.appendChild(d),y(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab")),"function"===typeof window.TrelloClient&&(d=document.createElement("option"),d.setAttribute("value",App.MODE_TRELLO),mxUtils.write(d,mxResources.get("trello")),v.appendChild(d),y(IMAGE_PATH+ "/trello-logo.svg",mxResources.get("trello"),App.MODE_TRELLO,"trello")));if(!Editor.useLocalStorage||"device"==urlParams.storage||null!=b.getCurrentFile()&&"1"!=urlParams.noDevice)d=document.createElement("option"),d.setAttribute("value",App.MODE_DEVICE),mxUtils.write(d,mxResources.get("device")),v.appendChild(d),b.mode!=App.MODE_DEVICE&&x||d.setAttribute("selected","selected"),z&&y(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);x&&isLocalStorage&&"0"!=urlParams.browser&& (x=document.createElement("option"),x.setAttribute("value",App.MODE_BROWSER),mxUtils.write(x,mxResources.get("browser")),v.appendChild(x),b.mode==App.MODE_BROWSER&&x.setAttribute("selected","selected"),y(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));x=document.createElement("div");x.style.marginTop="26px";x.style.textAlign="center";null!=A&&(z=mxUtils.button(mxResources.get("help"),function(){b.openLink(A)}),z.className="geBtn",x.appendChild(z));z=mxUtils.button(mxResources.get(null!= -c?"close":"cancel"),function(){null!=c?c():(b.fileLoaded(null),b.hideDialog(),window.close(),window.location.href=b.getUrl())});z.className="geBtn";b.editor.cancelFirst&&null==c&&x.appendChild(z);null==c&&(d=mxUtils.button(mxResources.get("decideLater"),function(){C(null)}),d.className="geBtn",x.appendChild(d));D&&Editor.popupsAllowed&&(D=mxUtils.button(mxResources.get("openInNewWindow"),function(){C("_blank")}),D.className="geBtn",x.appendChild(D));CreateDialog.showDownloadButton&&(D=mxUtils.button(mxResources.get("download"), -function(){C("download")}),D.className="geBtn",x.appendChild(D),null!=q&&(D.style.marginTop="6px",x.style.marginTop="6px"));null!=q&&(mxUtils.br(x),x.appendChild(q));b.editor.cancelFirst&&null==c||x.appendChild(z);mxEvent.addListener(G,"keypress",function(E){13==E.keyCode?C(App.MODE_DEVICE):27==E.keyCode&&(b.fileLoaded(null),b.hideDialog(),window.close())});m.appendChild(x);this.container=m};CreateDialog.showDownloadButton="1"!=urlParams.noDevice; +c?"close":"cancel"),function(){null!=c?c():(b.fileLoaded(null),b.hideDialog(),window.close(),window.location.href=b.getUrl())});z.className="geBtn";b.editor.cancelFirst&&null==c&&x.appendChild(z);null==c&&(d=mxUtils.button(mxResources.get("decideLater"),function(){D(null)}),d.className="geBtn",x.appendChild(d));C&&Editor.popupsAllowed&&(C=mxUtils.button(mxResources.get("openInNewWindow"),function(){D("_blank")}),C.className="geBtn",x.appendChild(C));CreateDialog.showDownloadButton&&(C=mxUtils.button(mxResources.get("download"), +function(){D("download")}),C.className="geBtn",x.appendChild(C),null!=q&&(C.style.marginTop="6px",x.style.marginTop="6px"));null!=q&&(mxUtils.br(x),x.appendChild(q));b.editor.cancelFirst&&null==c||x.appendChild(z);mxEvent.addListener(G,"keypress",function(E){13==E.keyCode?D(App.MODE_DEVICE):27==E.keyCode&&(b.fileLoaded(null),b.hideDialog(),window.close())});m.appendChild(x);this.container=m};CreateDialog.showDownloadButton="1"!=urlParams.noDevice; var PopupDialog=function(b,e,f,c,k){k=null!=k?k:!0;var m=document.createElement("div");m.style.textAlign="left";m.style.height="100%";mxUtils.write(m,mxResources.get("fileOpenLocation"));mxUtils.br(m);mxUtils.br(m);var u=mxUtils.button(mxResources.get("openInThisWindow"),function(){k&&b.hideDialog();null!=c&&c()});u.className="geBtn";u.style.marginBottom="8px";u.style.width="280px";m.appendChild(u);mxUtils.br(m);var x=mxUtils.button(mxResources.get("openInNewWindow"),function(){k&&b.hideDialog(); -null!=f&&f();b.openLink(e,null,!0)});x.className="geBtn gePrimaryBtn";x.style.width=u.style.width;m.appendChild(x);mxUtils.br(m);mxUtils.br(m);mxUtils.write(m,mxResources.get("allowPopups"));this.container=m},ImageDialog=function(b,e,f,c,k,m,u,x){function D(){0FeedbackDialog.maxAttachmentSize?b.alert(mxResources.get("drawingTooLarge")):(b.hideDialog(),b.spinner.spin(document.body)&&mxUtils.post(null!=FeedbackDialog.feedbackUrl?FeedbackDialog.feedbackUrl:"/email","email="+encodeURIComponent(u.value)+"&version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&body="+encodeURIComponent((null!=e?e:"Feedback")+ -":\n"+H),function(d){b.spinner.stop();200<=d.getStatus()&&299>=d.getStatus()?b.alert(mxResources.get("feedbackSent")):b.alert(mxResources.get("errorSendingFeedback"))},function(){b.spinner.stop();b.alert(mxResources.get("errorSendingFeedback"))}))});x.className="geBtn gePrimaryBtn";if(!f){x.setAttribute("disabled","disabled");var D=/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;mxEvent.addListener(u, -"change",function(){0=d.getStatus()?b.alert(mxResources.get("feedbackSent")):b.alert(mxResources.get("errorSendingFeedback"))},function(){b.spinner.stop();b.alert(mxResources.get("errorSendingFeedback"))}))});x.className="geBtn gePrimaryBtn";if(!f){x.setAttribute("disabled","disabled");var C=/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;mxEvent.addListener(u, +"change",function(){0B?V:V.substr(0,B)+n+V.substr(B+X.length);var U=V;X=mxUtils.htmlEntities(X);M=[];var O=-1;for(V=V.replace(/
/ig,"\n");-1<(O=V.indexOf("<",O+1));)M.push(O);O=V.match(/<[^>]*>/g);V=V.replace(/<[^>]*>/g,"");B=V.toLowerCase().indexOf(X,B);if(0>B)return U;U=B+X.length;n=mxUtils.htmlEntities(n);V=V.substr(0,B)+n+V.substr(U);for(var S= -0,T=0;T")},L=mxUtils.button(mxResources.get("replFind"),function(){try{if(null!=q&&null!=d&&Q.value){var V=d.cell,X=z.getLabel(V);z.isCellEditable(V)&&z.model.setValue(V,K(X,q,Q.value,t-q.length,z.getCurrentCellStyle(V)));G.style.backgroundColor=D(!1,!0)?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}}catch(n){b.handleError(n)}}); -L.setAttribute("title",mxResources.get("replFind"));L.style.float="none";L.style.width="120px";L.style.marginTop="6px";L.style.marginLeft="8px";L.style.overflow="hidden";L.style.textOverflow="ellipsis";L.className="geBtn gePrimaryBtn";L.setAttribute("disabled","disabled");F.appendChild(L);mxUtils.br(F);var R=mxUtils.button(mxResources.get("replace"),function(){try{if(null!=q&&null!=d&&Q.value){var V=d.cell,X=z.getLabel(V);z.model.setValue(V,K(X,q,Q.value,t-q.length,z.getCurrentCellStyle(V)));L.setAttribute("disabled", -"disabled");R.setAttribute("disabled","disabled")}}catch(n){b.handleError(n)}});R.setAttribute("title",mxResources.get("replace"));R.style.float="none";R.style.width="120px";R.style.marginTop="6px";R.style.marginLeft="8px";R.style.overflow="hidden";R.style.textOverflow="ellipsis";R.className="geBtn gePrimaryBtn";R.setAttribute("disabled","disabled");F.appendChild(R);var P=mxUtils.button(mxResources.get("replaceAll"),function(){N.innerText="";if(Q.value){H=null;var V=b.currentPage,X=b.editor.graph.getSelectionCells(); -b.editor.graph.rendering=!1;z.getModel().beginUpdate();try{for(var n=0,B={};D(!1,!0,!0)&&100>n;){var M=d.cell,U=z.getLabel(M),O=B[M.id];if(O&&O.replAllMrk==y&&O.replAllPos>=t)break;B[M.id]={replAllMrk:y,replAllPos:t};z.isCellEditable(M)&&(z.model.setValue(M,K(U,q,Q.value,t-q.length,z.getCurrentCellStyle(M))),n++)}V!=b.currentPage&&b.editor.graph.model.execute(new SelectPage(b,V));mxUtils.write(N,mxResources.get("matchesRepl",[n]))}catch(S){b.handleError(S)}finally{z.getModel().endUpdate(),b.editor.graph.setSelectionCells(X), -b.editor.graph.rendering=!0}y++}});P.setAttribute("title",mxResources.get("replaceAll"));P.style.float="none";P.style.width="120px";P.style.marginTop="6px";P.style.marginLeft="8px";P.style.overflow="hidden";P.style.textOverflow="ellipsis";P.className="geBtn gePrimaryBtn";P.setAttribute("disabled","disabled");F.appendChild(P);mxUtils.br(F);F.appendChild(E);E=mxUtils.button(mxResources.get("close"),mxUtils.bind(this,function(){this.window.setVisible(!1)}));E.setAttribute("title",mxResources.get("close")); -E.style.float="none";E.style.width="120px";E.style.marginTop="6px";E.style.marginLeft="8px";E.style.overflow="hidden";E.style.textOverflow="ellipsis";E.className="geBtn";F.appendChild(E);mxUtils.br(F);F.appendChild(N)}else E.style.width="90px",I.style.width="90px";mxEvent.addListener(G,"keyup",function(V){if(91==V.keyCode||93==V.keyCode||17==V.keyCode)mxEvent.consume(V);else if(27==V.keyCode)A.funct();else if(H!=G.value.toLowerCase()||13==V.keyCode)try{G.style.backgroundColor=D()?"":Editor.isDarkMode()? -"#ff0000":"#ffcfcf"}catch(X){G.style.backgroundColor=Editor.isDarkMode()?"#ff0000":"#ffcfcf"}});mxEvent.addListener(C,"keydown",function(V){70==V.keyCode&&b.keyHandler.isControlDown(V)&&!mxEvent.isShiftDown(V)&&(A.funct(),mxEvent.consume(V))});this.window=new mxWindow(mxResources.get("find")+(m?"/"+mxResources.get("replace"):""),C,e,f,c,k,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this, -function(){this.window.fit();this.window.isVisible()?(G.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?G.select():document.execCommand("selectAll",!1,null),null!=b.pages&&1B?V:V.substr(0,B)+p+V.substr(B+X.length);var U=V;X=mxUtils.htmlEntities(X);N=[];var O=-1;for(V=V.replace(/
/ig,"\n");-1<(O=V.indexOf("<",O+1));)N.push(O);O=V.match(/<[^>]*>/g);V=V.replace(/<[^>]*>/g,"");B=V.toLowerCase().indexOf(X,B);if(0>B)return U;U=B+X.length;p=mxUtils.htmlEntities(p);V=V.substr(0,B)+p+V.substr(U);for(var S= +0,T=0;T")},L=mxUtils.button(mxResources.get("replFind"),function(){try{if(null!=q&&null!=d&&P.value){var V=d.cell,X=z.getLabel(V);z.isCellEditable(V)&&z.model.setValue(V,K(X,q,P.value,t-q.length,z.getCurrentCellStyle(V)));G.style.backgroundColor=C(!1,!0)?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}}catch(p){b.handleError(p)}}); +L.setAttribute("title",mxResources.get("replFind"));L.style.float="none";L.style.width="120px";L.style.marginTop="6px";L.style.marginLeft="8px";L.style.overflow="hidden";L.style.textOverflow="ellipsis";L.className="geBtn gePrimaryBtn";L.setAttribute("disabled","disabled");F.appendChild(L);mxUtils.br(F);var R=mxUtils.button(mxResources.get("replace"),function(){try{if(null!=q&&null!=d&&P.value){var V=d.cell,X=z.getLabel(V);z.model.setValue(V,K(X,q,P.value,t-q.length,z.getCurrentCellStyle(V)));L.setAttribute("disabled", +"disabled");R.setAttribute("disabled","disabled")}}catch(p){b.handleError(p)}});R.setAttribute("title",mxResources.get("replace"));R.style.float="none";R.style.width="120px";R.style.marginTop="6px";R.style.marginLeft="8px";R.style.overflow="hidden";R.style.textOverflow="ellipsis";R.className="geBtn gePrimaryBtn";R.setAttribute("disabled","disabled");F.appendChild(R);var Q=mxUtils.button(mxResources.get("replaceAll"),function(){M.innerText="";if(P.value){H=null;var V=b.currentPage,X=b.editor.graph.getSelectionCells(); +b.editor.graph.rendering=!1;z.getModel().beginUpdate();try{for(var p=0,B={};C(!1,!0,!0)&&100>p;){var N=d.cell,U=z.getLabel(N),O=B[N.id];if(O&&O.replAllMrk==y&&O.replAllPos>=t)break;B[N.id]={replAllMrk:y,replAllPos:t};z.isCellEditable(N)&&(z.model.setValue(N,K(U,q,P.value,t-q.length,z.getCurrentCellStyle(N))),p++)}V!=b.currentPage&&b.editor.graph.model.execute(new SelectPage(b,V));mxUtils.write(M,mxResources.get("matchesRepl",[p]))}catch(S){b.handleError(S)}finally{z.getModel().endUpdate(),b.editor.graph.setSelectionCells(X), +b.editor.graph.rendering=!0}y++}});Q.setAttribute("title",mxResources.get("replaceAll"));Q.style.float="none";Q.style.width="120px";Q.style.marginTop="6px";Q.style.marginLeft="8px";Q.style.overflow="hidden";Q.style.textOverflow="ellipsis";Q.className="geBtn gePrimaryBtn";Q.setAttribute("disabled","disabled");F.appendChild(Q);mxUtils.br(F);F.appendChild(E);E=mxUtils.button(mxResources.get("close"),mxUtils.bind(this,function(){this.window.setVisible(!1)}));E.setAttribute("title",mxResources.get("close")); +E.style.float="none";E.style.width="120px";E.style.marginTop="6px";E.style.marginLeft="8px";E.style.overflow="hidden";E.style.textOverflow="ellipsis";E.className="geBtn";F.appendChild(E);mxUtils.br(F);F.appendChild(M)}else E.style.width="90px",I.style.width="90px";mxEvent.addListener(G,"keyup",function(V){if(91==V.keyCode||93==V.keyCode||17==V.keyCode)mxEvent.consume(V);else if(27==V.keyCode)A.funct();else if(H!=G.value.toLowerCase()||13==V.keyCode)try{G.style.backgroundColor=C()?"":Editor.isDarkMode()? +"#ff0000":"#ffcfcf"}catch(X){G.style.backgroundColor=Editor.isDarkMode()?"#ff0000":"#ffcfcf"}});mxEvent.addListener(D,"keydown",function(V){70==V.keyCode&&b.keyHandler.isControlDown(V)&&!mxEvent.isShiftDown(V)&&(A.funct(),mxEvent.consume(V))});this.window=new mxWindow(mxResources.get("find")+(m?"/"+mxResources.get("replace"):""),D,e,f,c,k,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this, +function(){this.window.fit();this.window.isVisible()?(G.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?G.select():document.execCommand("selectAll",!1,null),null!=b.pages&&1mxUtils.indexOf(D,l)&&d.push(l)}0mxUtils.indexOf(C,l)&&d.push(l)}0':null==N.desc&&(H.style.padding="20px",H.style.color="rgb(179, 179, 179)",mxUtils.write(H,mxResources.get("noPreview")));null!=d&&(d.style.backgroundColor="");d=K;d.style.backgroundColor=Editor.isDarkMode()?"#000000":"#ebf2f9";null!=P&&mxEvent.consume(P)}};mxEvent.addListener(K, -"click",R);mxEvent.addListener(K,"dblclick",function(P){L.checked=!L.checked;mxEvent.consume(P)});g.push(function(){return L.checked?N.id:null});0==p&&0==I&&R()})(v.entries[I])})(J[p])});D=document.createElement("div");D.className="geDialogTitle";mxUtils.write(D,mxResources.get("shapes"));D.style.position="absolute";D.style.top="0px";D.style.left="0px";D.style.lineHeight="40px";D.style.height="40px";D.style.right="0px";var z=document.createElement("div"),H=document.createElement("div");z.style.position= -"absolute";z.style.top="40px";z.style.left="0px";z.style.width="202px";z.style.bottom="60px";z.style.overflow="auto";H.style.position="absolute";H.style.left="202px";H.style.right="0px";H.style.top="40px";H.style.bottom="60px";H.style.overflow="auto";H.style.borderLeft="1px solid rgb(211, 211, 211)";H.style.textAlign="center";var d=null,g=[],l=document.createElement("div");l.style.position="relative";l.style.left="0px";l.style.right="0px";m(f);c.style.padding="30px";c.appendChild(D);c.appendChild(z); +"32px"):e==b.trello&&(u=mxResources.get("trello"),x.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizeThisAppIn",[u]));var C=document.createElement("input");C.setAttribute("type","checkbox");u=mxUtils.button(mxResources.get("authorize"),function(){c(C.checked)});u.insertBefore(x,u.firstChild);u.style.marginTop="6px";u.className="geBigButton";u.style.fontSize="18px";u.style.padding="14px";k.appendChild(m);k.appendChild(b);k.appendChild(u); +f&&(f=document.createElement("p"),f.style.marginTop="20px",f.appendChild(C),m=document.createElement("span"),mxUtils.write(m," "+mxResources.get("rememberMe")),f.appendChild(m),k.appendChild(f),C.checked=!0,C.defaultChecked=!0,mxEvent.addListener(m,"click",function(A){C.checked=!C.checked;mxEvent.consume(A)}));this.container=k},MoreShapesDialog=function(b,e,f){f=null!=f?f:b.sidebar.entries;var c=document.createElement("div"),k=[];if(null!=b.sidebar.customEntries)for(var m=0;m':null==M.desc&&(H.style.padding="20px",H.style.color="rgb(179, 179, 179)",mxUtils.write(H,mxResources.get("noPreview")));null!=d&&(d.style.backgroundColor="");d=K;d.style.backgroundColor=Editor.isDarkMode()?"#000000":"#ebf2f9";null!=Q&&mxEvent.consume(Q)}};mxEvent.addListener(K, +"click",R);mxEvent.addListener(K,"dblclick",function(Q){L.checked=!L.checked;mxEvent.consume(Q)});g.push(function(){return L.checked?M.id:null});0==n&&0==I&&R()})(v.entries[I])})(J[n])});C=document.createElement("div");C.className="geDialogTitle";mxUtils.write(C,mxResources.get("shapes"));C.style.position="absolute";C.style.top="0px";C.style.left="0px";C.style.lineHeight="40px";C.style.height="40px";C.style.right="0px";var z=document.createElement("div"),H=document.createElement("div");z.style.position= +"absolute";z.style.top="40px";z.style.left="0px";z.style.width="202px";z.style.bottom="60px";z.style.overflow="auto";H.style.position="absolute";H.style.left="202px";H.style.right="0px";H.style.top="40px";H.style.bottom="60px";H.style.overflow="auto";H.style.borderLeft="1px solid rgb(211, 211, 211)";H.style.textAlign="center";var d=null,g=[],l=document.createElement("div");l.style.position="relative";l.style.left="0px";l.style.right="0px";m(f);c.style.padding="30px";c.appendChild(C);c.appendChild(z); c.appendChild(H);f=document.createElement("div");f.className="geDialogFooter";f.style.position="absolute";f.style.paddingRight="16px";f.style.color="gray";f.style.left="0px";f.style.right="0px";f.style.bottom="0px";f.style.height="60px";f.style.lineHeight="52px";var q=document.createElement("input");q.setAttribute("type","checkbox");q.style.position="relative";q.style.top="1px";q.checked=b.sidebar.sidebarTitles;q.defaultChecked=q.checked;f.appendChild(q);m=document.createElement("span");mxUtils.write(m, " "+mxResources.get("labels"));m.style.paddingRight="20px";f.appendChild(m);mxEvent.addListener(m,"click",function(J){q.checked=!q.checked;mxEvent.consume(J)});var t=document.createElement("input");t.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)m=document.createElement("span"),m.style.paddingRight="20px",m.appendChild(t),mxUtils.write(m," "+mxResources.get("rememberThisSetting")),t.style.position="relative",t.style.top="1px",t.checked=!0,t.defaultChecked=!0,mxEvent.addListener(m, -"click",function(J){mxEvent.getSource(J)!=t&&(t.checked=!t.checked,mxEvent.consume(J))}),f.appendChild(m);m=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});m.className="geBtn";D=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();for(var J=[],p=0;pmxUtils.indexOf(x,l)&&x.push(l);k()})}:function(){var l=document.createElement("div"),q=document.createElement("span");q.style.marginTop="6px";mxUtils.write(q,mxResources.get("builtinPlugins")+": ");l.appendChild(q);var t=document.createElement("select");t.style.width="150px"; -for(q=0;qmxUtils.indexOf(x,Q)&&x.push(Q)}k()}}, -mxResources.get("enterValue")+" ("+mxResources.get("url")+")");b.showDialog(C.container,300,80,!0,!0);C.init()});q.className="geBtn";l=new CustomDialog(b,l,mxUtils.bind(this,function(){var C=App.pluginRegistry[t.value];0>mxUtils.indexOf(x,C)&&(x.push(C),k())}),null,null,null,q);b.showDialog(l.container,360,100,!0,!0)});A.className="geBtn";var z=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});z.className="geBtn";var H=mxUtils.button(c?mxResources.get("close"):mxResources.get("apply"), -function(){D?(mxSettings.setPlugins(x),mxSettings.save(),b.hideDialog(),b.alert(mxResources.get("restartForChangeRequired"))):b.hideDialog()});H.className="geBtn gePrimaryBtn";var d=document.createElement("div");d.style.marginTop="14px";d.style.textAlign="right";var g=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/doc/faq/plugins")});g.className="geBtn";b.isOffline()&&!mxClient.IS_CHROMEAPP&&(g.style.display="none");d.appendChild(g);b.editor.cancelFirst?(c|| -d.appendChild(z),d.appendChild(A),d.appendChild(H)):(d.appendChild(A),d.appendChild(H),c||d.appendChild(z));m.appendChild(d);this.container=m},CropImageDialog=function(b,e,f,c){function k(){var J=t.checked,p=y.checked,v=g.geometry,E=D.width,I=D.height,N=(300-E)/2,K=(300-I)/2;v.xN+E&&(v.width=N+E-v.x,v.x=Math.min(v.x,N+E));v.yK+I&&(v.height=K+I-v.y,v.y=Math.min(v.y,K+I));var L=(v.x-N)/E*100;E=100-(v.x+v.width-N)/E*100;N= -(v.y-K)/I*100;v=100-(v.y+v.height-K)/I*100;return"inset("+mxUtils.format(N)+"% "+mxUtils.format(E)+"% "+mxUtils.format(v)+"% "+mxUtils.format(L)+"%"+(J?" round "+d+"%":p?" round 50%":"")+")"}function m(J){null!=z&&(!0!==J&&(z.model.setGeometry(g,H.clone()),d=5,F.value=d),z.model.setStyle(g,l+k()),z.selectAll(),C.style.visibility=t.checked?"visible":"hidden")}var u=document.createElement("div"),x=document.createElement("div");x.style.height="300px";x.style.width="300px";x.style.display="inline-flex"; -x.style.justifyContent="center";x.style.alignItems="center";x.style.position="absolute";var D=document.createElement("img");D.onload=function(){function J(){z.model.setStyle(g,l+k())}z=new Graph(A);z.autoExtend=!1;z.autoScroll=!1;z.setGridEnabled(!1);z.setEnabled(!0);z.setPanning(!1);z.setConnectable(!1);z.getRubberband().setEnabled(!1);z.graphHandler.allowLivePreview=!1;var p=z.createVertexHandler;z.createVertexHandler=function(){var U=p.apply(this,arguments);U.livePreview=!1;return U};if(null!= -f)try{if("inset"==f.substring(0,5)){var v=g.geometry,E=D.width,I=D.height,N=(300-E)/2,K=(300-I)/2,L=f.match(/\(([^)]+)\)/)[1].split(/[ ,]+/),R=parseFloat(L[0]),P=parseFloat(L[1]),V=parseFloat(L[2]),X=parseFloat(L[3]);isFinite(R)&&isFinite(P)&&isFinite(V)&&isFinite(X)?(v.x=X/100*E+N,v.y=R/100*I+K,v.width=(100-P)/100*E+N-v.x,v.height=(100-V)/100*I+K-v.y,"round"==L[4]?"50%"==L[5]?y.setAttribute("checked","checked"):(d=parseInt(L[5]),F.value=d,t.setAttribute("checked","checked"),C.style.visibility="visible"): -q.setAttribute("checked","checked")):f=null}else f=null}catch(U){}g.style=l+(f?f:k());g.vertex=!0;z.addCell(g,null,null,null,null);z.selectAll();z.addListener(mxEvent.CELLS_MOVED,J);z.addListener(mxEvent.CELLS_RESIZED,J);var n=z.graphHandler.mouseUp,B=z.graphHandler.mouseDown;z.graphHandler.mouseUp=function(){n.apply(this,arguments);A.style.backgroundColor="#fff9"};z.graphHandler.mouseDown=function(){B.apply(this,arguments);A.style.backgroundColor=""};z.dblClick=function(){};var M=z.getSelectionModel().changeSelection; -z.getSelectionModel().changeSelection=function(){M.call(this,[g],[g])}};D.onerror=function(){D.onload=null;D.src=Editor.errorImage};D.setAttribute("src",e);D.style.maxWidth="300px";D.style.maxHeight="300px";x.appendChild(D);u.appendChild(x);var A=document.createElement("div");A.style.width="300px";A.style.height="300px";A.style.overflow="hidden";A.style.backgroundColor="#fff9";u.appendChild(A);var z=null,H=new mxGeometry(100,100,100,100),d=5,g=new mxCell("",H.clone(),""),l="shape=image;fillColor=none;rotatable=0;cloneable=0;deletable=0;image="+ +u=document.createElement("div");u.style.height="180px";u.style.overflow="auto";var x=mxSettings.getPlugins().slice(),C=!1;m.appendChild(u);k();C=!1;var A=mxUtils.button(mxResources.get("add"),null!=e?function(){e(function(l){l&&0>mxUtils.indexOf(x,l)&&x.push(l);k()})}:function(){var l=document.createElement("div"),q=document.createElement("span");q.style.marginTop="6px";mxUtils.write(q,mxResources.get("builtinPlugins")+": ");l.appendChild(q);var t=document.createElement("select");t.style.width="150px"; +for(q=0;qmxUtils.indexOf(x,P)&&x.push(P)}k()}}, +mxResources.get("enterValue")+" ("+mxResources.get("url")+")");b.showDialog(D.container,300,80,!0,!0);D.init()});q.className="geBtn";l=new CustomDialog(b,l,mxUtils.bind(this,function(){var D=App.pluginRegistry[t.value];0>mxUtils.indexOf(x,D)&&(x.push(D),k())}),null,null,null,q);b.showDialog(l.container,360,100,!0,!0)});A.className="geBtn";var z=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});z.className="geBtn";var H=mxUtils.button(c?mxResources.get("close"):mxResources.get("apply"), +function(){C?(mxSettings.setPlugins(x),mxSettings.save(),b.hideDialog(),b.alert(mxResources.get("restartForChangeRequired"))):b.hideDialog()});H.className="geBtn gePrimaryBtn";var d=document.createElement("div");d.style.marginTop="14px";d.style.textAlign="right";var g=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/doc/faq/plugins")});g.className="geBtn";b.isOffline()&&!mxClient.IS_CHROMEAPP&&(g.style.display="none");d.appendChild(g);b.editor.cancelFirst?(c|| +d.appendChild(z),d.appendChild(A),d.appendChild(H)):(d.appendChild(A),d.appendChild(H),c||d.appendChild(z));m.appendChild(d);this.container=m},CropImageDialog=function(b,e,f,c){function k(){var J=t.checked,n=y.checked,v=g.geometry,E=C.width,I=C.height,M=(300-E)/2,K=(300-I)/2;v.xM+E&&(v.width=M+E-v.x,v.x=Math.min(v.x,M+E));v.yK+I&&(v.height=K+I-v.y,v.y=Math.min(v.y,K+I));var L=(v.x-M)/E*100;E=100-(v.x+v.width-M)/E*100;M= +(v.y-K)/I*100;v=100-(v.y+v.height-K)/I*100;return"inset("+mxUtils.format(M)+"% "+mxUtils.format(E)+"% "+mxUtils.format(v)+"% "+mxUtils.format(L)+"%"+(J?" round "+d+"%":n?" round 50%":"")+")"}function m(J){null!=z&&(!0!==J&&(z.model.setGeometry(g,H.clone()),d=5,F.value=d),z.model.setStyle(g,l+k()),z.selectAll(),D.style.visibility=t.checked?"visible":"hidden")}var u=document.createElement("div"),x=document.createElement("div");x.style.height="300px";x.style.width="300px";x.style.display="inline-flex"; +x.style.justifyContent="center";x.style.alignItems="center";x.style.position="absolute";var C=document.createElement("img");C.onload=function(){function J(){z.model.setStyle(g,l+k())}z=new Graph(A);z.autoExtend=!1;z.autoScroll=!1;z.setGridEnabled(!1);z.setEnabled(!0);z.setPanning(!1);z.setConnectable(!1);z.getRubberband().setEnabled(!1);z.graphHandler.allowLivePreview=!1;var n=z.createVertexHandler;z.createVertexHandler=function(){var U=n.apply(this,arguments);U.livePreview=!1;return U};if(null!= +f)try{if("inset"==f.substring(0,5)){var v=g.geometry,E=C.width,I=C.height,M=(300-E)/2,K=(300-I)/2,L=f.match(/\(([^)]+)\)/)[1].split(/[ ,]+/),R=parseFloat(L[0]),Q=parseFloat(L[1]),V=parseFloat(L[2]),X=parseFloat(L[3]);isFinite(R)&&isFinite(Q)&&isFinite(V)&&isFinite(X)?(v.x=X/100*E+M,v.y=R/100*I+K,v.width=(100-Q)/100*E+M-v.x,v.height=(100-V)/100*I+K-v.y,"round"==L[4]?"50%"==L[5]?y.setAttribute("checked","checked"):(d=parseInt(L[5]),F.value=d,t.setAttribute("checked","checked"),D.style.visibility="visible"): +q.setAttribute("checked","checked")):f=null}else f=null}catch(U){}g.style=l+(f?f:k());g.vertex=!0;z.addCell(g,null,null,null,null);z.selectAll();z.addListener(mxEvent.CELLS_MOVED,J);z.addListener(mxEvent.CELLS_RESIZED,J);var p=z.graphHandler.mouseUp,B=z.graphHandler.mouseDown;z.graphHandler.mouseUp=function(){p.apply(this,arguments);A.style.backgroundColor="#fff9"};z.graphHandler.mouseDown=function(){B.apply(this,arguments);A.style.backgroundColor=""};z.dblClick=function(){};var N=z.getSelectionModel().changeSelection; +z.getSelectionModel().changeSelection=function(){N.call(this,[g],[g])}};C.onerror=function(){C.onload=null;C.src=Editor.errorImage};C.setAttribute("src",e);C.style.maxWidth="300px";C.style.maxHeight="300px";x.appendChild(C);u.appendChild(x);var A=document.createElement("div");A.style.width="300px";A.style.height="300px";A.style.overflow="hidden";A.style.backgroundColor="#fff9";u.appendChild(A);var z=null,H=new mxGeometry(100,100,100,100),d=5,g=new mxCell("",H.clone(),""),l="shape=image;fillColor=none;rotatable=0;cloneable=0;deletable=0;image="+ e.replace(";base64","")+";clipPath=",q=document.createElement("input");q.setAttribute("type","radio");q.setAttribute("id","croppingRect");q.setAttribute("name","croppingShape");q.setAttribute("checked","checked");q.style.margin="5px";u.appendChild(q);e=document.createElement("label");e.setAttribute("for","croppingRect");mxUtils.write(e,mxResources.get("rectangle"));u.appendChild(e);var t=document.createElement("input");t.setAttribute("type","radio");t.setAttribute("id","croppingRounded");t.setAttribute("name", "croppingShape");t.style.margin="5px";u.appendChild(t);e=document.createElement("label");e.setAttribute("for","croppingRounded");mxUtils.write(e,mxResources.get("rounded"));u.appendChild(e);var y=document.createElement("input");y.setAttribute("type","radio");y.setAttribute("id","croppingEllipse");y.setAttribute("name","croppingShape");y.style.margin="5px";u.appendChild(y);e=document.createElement("label");e.setAttribute("for","croppingEllipse");mxUtils.write(e,mxResources.get("ellipse"));u.appendChild(e); -mxEvent.addListener(q,"change",m);mxEvent.addListener(t,"change",m);mxEvent.addListener(y,"change",m);var C=document.createElement("div");C.style.textAlign="center";C.style.visibility="hidden";var F=document.createElement("input");F.setAttribute("type","range");F.setAttribute("min","1");F.setAttribute("max","49");F.setAttribute("value",d);F.setAttribute("title",mxResources.get("arcSize"));C.appendChild(F);u.appendChild(C);mxEvent.addListener(F,"change",function(){d=this.value;m(!0)});e=mxUtils.button(mxResources.get("cancel"), -function(){b.hideDialog()});e.className="geBtn";x=mxUtils.button(mxResources.get("apply"),function(){c(k(),g.geometry.width,g.geometry.height);b.hideDialog()});x.className="geBtn gePrimaryBtn";var G=mxUtils.button(mxResources.get("reset"),function(){c(null,D.width,D.height);b.hideDialog()});G.className="geBtn";var Q=document.createElement("div");Q.style.marginTop="10px";Q.style.textAlign="right";b.editor.cancelFirst?(Q.appendChild(e),Q.appendChild(G),Q.appendChild(x)):(Q.appendChild(G),Q.appendChild(x), -Q.appendChild(e));u.appendChild(Q);this.container=u},EditGeometryDialog=function(b,e){var f=b.editor.graph,c=1==e.length?f.getCellGeometry(e[0]):null,k=document.createElement("div"),m=document.createElement("table"),u=document.createElement("tbody"),x=document.createElement("tr"),D=document.createElement("td"),A=document.createElement("td");m.style.paddingLeft="6px";mxUtils.write(D,mxResources.get("relative")+":");var z=document.createElement("input");z.setAttribute("type","checkbox");null!=c&&c.relative&& -(z.setAttribute("checked","checked"),z.defaultChecked=!0);this.init=function(){z.focus()};A.appendChild(z);x.appendChild(D);x.appendChild(A);u.appendChild(x);x=document.createElement("tr");D=document.createElement("td");A=document.createElement("td");mxUtils.write(D,mxResources.get("left")+":");var H=document.createElement("input");H.setAttribute("type","text");H.style.width="100px";H.value=null!=c?c.x:"";A.appendChild(H);x.appendChild(D);x.appendChild(A);u.appendChild(x);x=document.createElement("tr"); -D=document.createElement("td");A=document.createElement("td");mxUtils.write(D,mxResources.get("top")+":");var d=document.createElement("input");d.setAttribute("type","text");d.style.width="100px";d.value=null!=c?c.y:"";A.appendChild(d);x.appendChild(D);x.appendChild(A);u.appendChild(x);x=document.createElement("tr");D=document.createElement("td");A=document.createElement("td");mxUtils.write(D,mxResources.get("dx")+":");var g=document.createElement("input");g.setAttribute("type","text");g.style.width= -"100px";g.value=null!=c&&null!=c.offset?c.offset.x:"";A.appendChild(g);x.appendChild(D);x.appendChild(A);u.appendChild(x);x=document.createElement("tr");D=document.createElement("td");A=document.createElement("td");mxUtils.write(D,mxResources.get("dy")+":");var l=document.createElement("input");l.setAttribute("type","text");l.style.width="100px";l.value=null!=c&&null!=c.offset?c.offset.y:"";A.appendChild(l);x.appendChild(D);x.appendChild(A);u.appendChild(x);x=document.createElement("tr");D=document.createElement("td"); -A=document.createElement("td");mxUtils.write(D,mxResources.get("width")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.width="100px";q.value=null!=c?c.width:"";A.appendChild(q);x.appendChild(D);x.appendChild(A);u.appendChild(x);x=document.createElement("tr");D=document.createElement("td");A=document.createElement("td");mxUtils.write(D,mxResources.get("height")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.width="100px";t.value=null!= -c?c.height:"";A.appendChild(t);x.appendChild(D);x.appendChild(A);u.appendChild(x);x=document.createElement("tr");D=document.createElement("td");A=document.createElement("td");mxUtils.write(D,mxResources.get("rotation")+":");var y=document.createElement("input");y.setAttribute("type","text");y.style.width="100px";y.value=1==e.length?mxUtils.getValue(f.getCellStyle(e[0]),mxConstants.STYLE_ROTATION,0):"";A.appendChild(y);x.appendChild(D);x.appendChild(A);u.appendChild(x);m.appendChild(u);k.appendChild(m); -c=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});c.className="geBtn";var C=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();f.getModel().beginUpdate();try{for(var F=0;Fb.maxImageSize||K>b.maxImageSize){var B=Math.min(1,Math.min(b.maxImageSize/Math.max(1,N)),b.maxImageSize/ -Math.max(1,K));N*=B;K*=B}X>n?(n=Math.round(100*n/X),X=100):(X=Math.round(100*X/n),n=100);var M=document.createElement("div");M.setAttribute("draggable","true");M.style.display="inline-block";M.style.position="relative";M.style.padding="0 12px";M.style.cursor="move";mxUtils.setPrefixedStyle(M.style,"transition","transform .1s ease-in-out");if(null!=p){var U=document.createElement("img");U.setAttribute("src",F.convert(p));U.style.width=X+"px";U.style.height=n+"px";U.style.margin="10px";U.style.paddingBottom= -Math.floor((100-n)/2)+"px";U.style.paddingLeft=Math.floor((100-X)/2)+"px";M.appendChild(U)}else if(null!=L){var O=b.stringToCells(Graph.decompress(L.xml));0t?y-1:y,0,z.splice(t,1)[0]),g.insertBefore(g.children[t],g.children[y])):(z.push(z.splice(t,1)[0]),g.appendChild(g.children[t]));else if(0b.maxImageSize||K>b.maxImageSize){var B=Math.min(1,Math.min(b.maxImageSize/Math.max(1,M)),b.maxImageSize/ +Math.max(1,K));M*=B;K*=B}X>p?(p=Math.round(100*p/X),X=100):(X=Math.round(100*X/p),p=100);var N=document.createElement("div");N.setAttribute("draggable","true");N.style.display="inline-block";N.style.position="relative";N.style.padding="0 12px";N.style.cursor="move";mxUtils.setPrefixedStyle(N.style,"transition","transform .1s ease-in-out");if(null!=n){var U=document.createElement("img");U.setAttribute("src",F.convert(n));U.style.width=X+"px";U.style.height=p+"px";U.style.margin="10px";U.style.paddingBottom= +Math.floor((100-p)/2)+"px";U.style.paddingLeft=Math.floor((100-X)/2)+"px";N.appendChild(U)}else if(null!=L){var O=b.stringToCells(Graph.decompress(L.xml));0t?y-1:y,0,z.splice(t,1)[0]),g.insertBefore(g.children[t],g.children[y])):(z.push(z.splice(t,1)[0]),g.appendChild(g.children[t]));else if(0=X.status&&(x(X.responseText,E,I,N,K,L,R,"fixed",mxEvent.isAltDown(p)?null:R.substring(0,R.lastIndexOf(".")).replace(/_/g," ")),g.scrollTop=g.scrollHeight))})):(b.spinner.stop(),b.showError(mxResources.get("error"),mxResources.get("notInOffline"))):(x(v,E,I,N,K,L,R,"fixed",mxEvent.isAltDown(p)?null:R.substring(0,R.lastIndexOf(".")).replace(/_/g," ")),g.scrollTop=g.scrollHeight)}};mxEvent.addListener(g,"dragover",D); -mxEvent.addListener(g,"drop",A);mxEvent.addListener(l,"dragover",D);mxEvent.addListener(l,"drop",A);f.appendChild(g);c=document.createElement("div");c.style.textAlign="right";c.style.marginTop="20px";e=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});e.setAttribute("id","btnCancel");e.className="geBtn";b.editor.cancelFirst&&c.appendChild(e);"draw.io"!=b.getServiceName()||null==k||k.constructor!=DriveLibrary&&k.constructor!=GitHubLibrary||(H=mxUtils.button(mxResources.get("link"), -function(){b.spinner.spin(document.body,mxResources.get("loading"))&&k.getPublicUrl(function(p){b.spinner.stop();if(null!=p){var v=b.getSearch("create title mode url drive splash state clibs ui".split(" "));v+=(0==v.length?"?":"&")+"splash=0&clibs=U"+encodeURIComponent(p);p=new EmbedDialog(b,window.location.protocol+"//"+window.location.host+"/"+v,null,null,null,null,"Check out the library I made using @drawio");b.showDialog(p.container,450,240,!0);p.init()}else k.constructor==DriveLibrary?b.showError(mxResources.get("error"), -mxResources.get("diagramIsNotPublic"),mxResources.get("share"),mxUtils.bind(this,function(){b.drive.showPermissions(k.getId())}),null,mxResources.get("ok"),mxUtils.bind(this,function(){})):b.handleError({message:mxResources.get("diagramIsNotPublic")})})}),H.className="geBtn",c.appendChild(H));H=mxUtils.button(mxResources.get("export"),function(){var p=b.createLibraryDataFromImages(z),v=d.value;/(\.xml)$/i.test(v)||(v+=".xml");b.isLocalFileSave()?b.saveLocalFile(p,v,"text/xml",null,null,!0,null,"xml"): -(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(v)+"&format=xml&xml="+encodeURIComponent(p))).simulate(document,"_blank")});H.setAttribute("id","btnDownload");H.className="geBtn";c.appendChild(H);if(Graph.fileSupport){if(null==b.libDlgFileInputElt){var J=document.createElement("input");J.setAttribute("multiple","multiple");J.setAttribute("type","file");mxEvent.addListener(J,"change",function(p){G=!1;b.importFiles(J.files,0,0,b.maxImageSize,function(v,E,I,N,K,L,R,P,V){null!=J.files&&(Q(p)(v, -E,I,N,K,L,R,P,V),J.type="",J.type="file",J.value="")});g.scrollTop=g.scrollHeight});J.style.display="none";document.body.appendChild(J);b.libDlgFileInputElt=J}H=mxUtils.button(mxResources.get("import"),function(){null!=C&&(C(),C=null);b.libDlgFileInputElt.click()});H.setAttribute("id","btnAddImage");H.className="geBtn";c.appendChild(H)}H=mxUtils.button(mxResources.get("addImages"),function(){null!=C&&(C(),C=null);b.showImageDialog(mxResources.get("addImageUrl"),"",function(p,v,E){G=!1;if(null!=p){if("data:image/"== -p.substring(0,11)){var I=p.indexOf(",");0=X.status&&(x(X.responseText,E,I,M,K,L,R,"fixed",mxEvent.isAltDown(n)?null:R.substring(0,R.lastIndexOf(".")).replace(/_/g," ")),g.scrollTop=g.scrollHeight))})):(b.spinner.stop(),b.showError(mxResources.get("error"),mxResources.get("notInOffline"))):(x(v,E,I,M,K,L,R,"fixed",mxEvent.isAltDown(n)?null:R.substring(0,R.lastIndexOf(".")).replace(/_/g," ")),g.scrollTop=g.scrollHeight)}};mxEvent.addListener(g,"dragover",C); +mxEvent.addListener(g,"drop",A);mxEvent.addListener(l,"dragover",C);mxEvent.addListener(l,"drop",A);f.appendChild(g);c=document.createElement("div");c.style.textAlign="right";c.style.marginTop="20px";e=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});e.setAttribute("id","btnCancel");e.className="geBtn";b.editor.cancelFirst&&c.appendChild(e);"draw.io"!=b.getServiceName()||null==k||k.constructor!=DriveLibrary&&k.constructor!=GitHubLibrary||(H=mxUtils.button(mxResources.get("link"), +function(){b.spinner.spin(document.body,mxResources.get("loading"))&&k.getPublicUrl(function(n){b.spinner.stop();if(null!=n){var v=b.getSearch("create title mode url drive splash state clibs ui".split(" "));v+=(0==v.length?"?":"&")+"splash=0&clibs=U"+encodeURIComponent(n);n=new EmbedDialog(b,window.location.protocol+"//"+window.location.host+"/"+v,null,null,null,null,"Check out the library I made using @drawio");b.showDialog(n.container,450,240,!0);n.init()}else k.constructor==DriveLibrary?b.showError(mxResources.get("error"), +mxResources.get("diagramIsNotPublic"),mxResources.get("share"),mxUtils.bind(this,function(){b.drive.showPermissions(k.getId())}),null,mxResources.get("ok"),mxUtils.bind(this,function(){})):b.handleError({message:mxResources.get("diagramIsNotPublic")})})}),H.className="geBtn",c.appendChild(H));H=mxUtils.button(mxResources.get("export"),function(){var n=b.createLibraryDataFromImages(z),v=d.value;/(\.xml)$/i.test(v)||(v+=".xml");b.isLocalFileSave()?b.saveLocalFile(n,v,"text/xml",null,null,!0,null,"xml"): +(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(v)+"&format=xml&xml="+encodeURIComponent(n))).simulate(document,"_blank")});H.setAttribute("id","btnDownload");H.className="geBtn";c.appendChild(H);if(Graph.fileSupport){if(null==b.libDlgFileInputElt){var J=document.createElement("input");J.setAttribute("multiple","multiple");J.setAttribute("type","file");mxEvent.addListener(J,"change",function(n){G=!1;b.importFiles(J.files,0,0,b.maxImageSize,function(v,E,I,M,K,L,R,Q,V){null!=J.files&&(P(n)(v, +E,I,M,K,L,R,Q,V),J.type="",J.type="file",J.value="")});g.scrollTop=g.scrollHeight});J.style.display="none";document.body.appendChild(J);b.libDlgFileInputElt=J}H=mxUtils.button(mxResources.get("import"),function(){null!=D&&(D(),D=null);b.libDlgFileInputElt.click()});H.setAttribute("id","btnAddImage");H.className="geBtn";c.appendChild(H)}H=mxUtils.button(mxResources.get("addImages"),function(){null!=D&&(D(),D=null);b.showImageDialog(mxResources.get("addImageUrl"),"",function(n,v,E){G=!1;if(null!=n){if("data:image/"== +n.substring(0,11)){var I=n.indexOf(",");0=Pa.getStatus()&&(ba=Pa.getText());Ia(ba)}))):Ia(ba)}function Ea(ka,Ia,Pa){if(null!=ka&&mxUtils.isAncestorNode(document.body,la)&&(ka=mxUtils.parseXml(ka),ka=Editor.extractGraphModel(ka.documentElement,!0),null!=ka)){"mxfile"==ka.nodeName&&(ka=Editor.parseDiagramNode(ka.getElementsByTagName("diagram")[0])); var Va=new mxCodec(ka.ownerDocument),Ga=new mxGraphModel;Va.decode(ka,Ga);ka=Ga.root.getChildAt(0).children||[];b.sidebar.createTooltip(la,ka,Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-80,1E3),Math.min((window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)-80,800),null!=da.title?mxResources.get(da.title,null,da.title):null,!0,new mxPoint(Ia,Pa),!0,null,!0);var Ma=document.createElement("div");Ma.className="geTempDlgDialogMask"; -P.appendChild(Ma);var Na=b.sidebar.hideTooltip;b.sidebar.hideTooltip=function(){Ma&&(P.removeChild(Ma),Ma=null,Na.apply(this,arguments),b.sidebar.hideTooltip=Na)};mxEvent.addListener(Ma,"click",function(){b.sidebar.hideTooltip()})}}var ba=null;if(Ja||b.sidebar.currentElt==la)b.sidebar.hideTooltip();else{var ia=function(ka){Ja&&b.sidebar.currentElt==la&&Ea(ka,mxEvent.getClientX(va),mxEvent.getClientY(va));Ja=!1;pa.src="/images/icon-search.svg"};b.sidebar.hideTooltip();b.sidebar.currentElt=la;Ja=!0; -pa.src="/images/aui-wait.gif";da.isExt?D(da,ia,function(){q(mxResources.get("cantLoadPrev"));Ja=!1;pa.src="/images/icon-search.svg"}):wa(da.url,ia)}}function F(da,la,pa){if(null!=M){for(var va=M.className.split(" "),wa=0;wa=ka.getStatus()?va(ka.getText(),ia):wa()})):va(b.emptyDiagramXml,ia)},va=function(ia,ka){l||b.hideDialog(!0);e(ia,ka,ba,la)},wa=function(){q(mxResources.get("cannotLoad"));Ea()},Ea=function(){U=ba;Oa.className="geTempDlgCreateBtn";la&&(Ka.className="geTempDlgOpenBtn")},ba=U;U=null;"boolean"!==typeof la&&(la=ba.isExternal&&H);1==da?A(ba.url,ba):la?(Ka.className="geTempDlgOpenBtn geTempDlgBtnDisabled geTempDlgBtnBusy", -pa()):(Oa.className="geTempDlgCreateBtn geTempDlgBtnDisabled geTempDlgBtnBusy",da=null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"),da=new FilenameDialog(b,b.defaultFilename+".drawio",mxResources.get("ok"),pa,da,function(ia){var ka=null!=ia&&0=ka.getStatus()?va(ka.getText(),ia):wa()})):va(b.emptyDiagramXml,ia)},va=function(ia,ka){l||b.hideDialog(!0);e(ia,ka,ba,la)},wa=function(){q(mxResources.get("cannotLoad"));Ea()},Ea=function(){U=ba;Oa.className="geTempDlgCreateBtn";la&&(Ka.className="geTempDlgOpenBtn")},ba=U;U=null;"boolean"!==typeof la&&(la=ba.isExternal&&H);1==da?A(ba.url,ba):la?(Ka.className="geTempDlgOpenBtn geTempDlgBtnDisabled geTempDlgBtnBusy", +pa()):(Oa.className="geTempDlgCreateBtn geTempDlgBtnDisabled geTempDlgBtnBusy",da=null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"),da=new FilenameDialog(b,b.defaultFilename+".drawio",mxResources.get("ok"),pa,da,function(ia){var ka=null!=ia&&0ka&&(ia=ia.substring(0,ka)+"…");if(pa){var Ma=document.createElement("tr");Pa=document.createElement("td");var Na=document.createElement("img");Na.src="/images/icon-search.svg";Na.className="geTempDlgDiagramListPreviewBtn";Na.setAttribute("title",mxResources.get("preview"));wa||Pa.appendChild(Na);Ia=document.createElement("span"); -Ia.className="geTempDlgDiagramTitle";Ia.innerHTML=ia;Pa.appendChild(Ia);Ma.appendChild(Pa);Pa=document.createElement("td");Pa.innerText=Va;Ma.appendChild(Pa);Pa=document.createElement("td");Pa.innerText=Ga;Ma.appendChild(Pa);Ea.appendChild(Ma);null==M&&(Q(la),F(Ma,"geTempDlgDiagramsListGridActive",da[ba]));(function(Ha,Ta,Sa){mxEvent.addListener(Ma,"click",function(){M!=Ta&&(Q(la),F(Ta,"geTempDlgDiagramsListGridActive",Ha))});mxEvent.addListener(Ma,"dblclick",G);mxEvent.addListener(Na,"click",function(Wa){C(Ha, -Ta,Sa,Wa)})})(da[ba],Ma,Na)}else{var Qa=document.createElement("div");Qa.className="geTempDlgDiagramTile";Qa.setAttribute("title",Ia);null==M&&(Q(la),F(Qa,"geTempDlgDiagramTileActive",da[ba]));Va=document.createElement("div");Va.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgLoading";var Ra=document.createElement("img");Ra.style.display="none";(function(Ha,Ta,Sa){Ra.onload=function(){Ta.className="geTempDlgDiagramTileImg";Ha.style.display=""};Ra.onerror=function(){this.src!=Sa?this.src= +Ia.className="geTempDlgDiagramTitle";Ia.innerHTML=ia;Pa.appendChild(Ia);Ma.appendChild(Pa);Pa=document.createElement("td");Pa.innerText=Va;Ma.appendChild(Pa);Pa=document.createElement("td");Pa.innerText=Ga;Ma.appendChild(Pa);Ea.appendChild(Ma);null==N&&(P(la),F(Ma,"geTempDlgDiagramsListGridActive",da[ba]));(function(Ha,Ta,Sa){mxEvent.addListener(Ma,"click",function(){N!=Ta&&(P(la),F(Ta,"geTempDlgDiagramsListGridActive",Ha))});mxEvent.addListener(Ma,"dblclick",G);mxEvent.addListener(Na,"click",function(Wa){D(Ha, +Ta,Sa,Wa)})})(da[ba],Ma,Na)}else{var Qa=document.createElement("div");Qa.className="geTempDlgDiagramTile";Qa.setAttribute("title",Ia);null==N&&(P(la),F(Qa,"geTempDlgDiagramTileActive",da[ba]));Va=document.createElement("div");Va.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgLoading";var Ra=document.createElement("img");Ra.style.display="none";(function(Ha,Ta,Sa){Ra.onload=function(){Ta.className="geTempDlgDiagramTileImg";Ha.style.display=""};Ra.onerror=function(){this.src!=Sa?this.src= Sa:Ta.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgError"}})(Ra,Va,Pa?Pa.replace(".drawio.xml","").replace(".drawio","").replace(".xml",""):"");Ra.src=Pa;Va.appendChild(Ra);Qa.appendChild(Va);Va=document.createElement("div");Va.className="geTempDlgDiagramTileLbl";Va.innerHTML=null!=ia?ia:"";Qa.appendChild(Va);Na=document.createElement("img");Na.src="/images/icon-search.svg";Na.className="geTempDlgDiagramPreviewBtn";Na.setAttribute("title",mxResources.get("preview"));wa||Qa.appendChild(Na); -(function(Ha,Ta,Sa){mxEvent.addListener(Qa,"click",function(){M!=Ta&&(Q(la),F(Ta,"geTempDlgDiagramTileActive",Ha))});mxEvent.addListener(Qa,"dblclick",G);mxEvent.addListener(Na,"click",function(Wa){C(Ha,Ta,Sa,Wa)})})(da[ba],Qa,Na);ma.appendChild(Qa)}}for(var Ua in va)da=va[Ua],0pa?pa:da.length;for(var va=0;vapa?pa:da.length;for(var va=0;va"};mxGraphView.prototype.redrawEnumerationState=function(n){var B="1"==mxUtils.getValue(n.style,"enumerate",0);B&&null==n.secondLabel?(n.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM), -n.secondLabel.size=12,n.secondLabel.state=n,n.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(n,n.secondLabel)):B||null==n.secondLabel||(n.secondLabel.destroy(),n.secondLabel=null);B=n.secondLabel;if(null!=B){var M=n.view.scale,U=this.createEnumerationValue(n);n=this.graph.model.isVertex(n.cell)?new mxRectangle(n.x+n.width-4*M,n.y+4*M,0,0):mxRectangle.fromPoint(n.view.getPoint(n));B.bounds.equals(n)&&B.value==U&&B.scale==M||(B.bounds=n,B.value=U,B.scale= -M,B.redraw())}};var E=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){E.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var n=this.getDrawPane().parentNode;!this.graph.mathEnabled||mxClient.NO_FO||null!=this.webKitForceRepaintNode&&null!=this.webKitForceRepaintNode.parentNode||"svg"!=this.graph.container.firstChild.nodeName?null==this.webKitForceRepaintNode||this.graph.mathEnabled&&("svg"==this.graph.container.firstChild.nodeName|| -this.graph.container.firstChild==this.webKitForceRepaintNode)||(null!=this.webKitForceRepaintNode.parentNode&&this.webKitForceRepaintNode.parentNode.removeChild(this.webKitForceRepaintNode),this.webKitForceRepaintNode=null):(this.webKitForceRepaintNode=document.createElement("div"),this.webKitForceRepaintNode.style.cssText="position:absolute;",n.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,n.ownerSVGElement))}};var I=Graph.prototype.refresh;Graph.prototype.refresh=function(){I.apply(this, -arguments);this.refreshBackgroundImage()};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var N=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){N.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(n){"data:action/json,"==n.substring(0,17)&&(n=JSON.parse(n.substring(17)),null!= -n.actions&&this.executeCustomActions(n.actions))};Graph.prototype.executeCustomActions=function(n,B){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var M=!1,U=0,O=0,S=mxUtils.bind(this,function(){M||(M=!0,this.model.beginUpdate())}),T=mxUtils.bind(this, -function(){M&&(M=!1,this.model.endUpdate())}),W=mxUtils.bind(this,function(){0'+mxUtils.htmlEntities(p)+""};mxGraphView.prototype.redrawEnumerationState=function(p){var B="1"==mxUtils.getValue(p.style,"enumerate",0);B&&null==p.secondLabel?(p.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM), +p.secondLabel.size=12,p.secondLabel.state=p,p.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(p,p.secondLabel)):B||null==p.secondLabel||(p.secondLabel.destroy(),p.secondLabel=null);B=p.secondLabel;if(null!=B){var N=p.view.scale,U=this.createEnumerationValue(p);p=this.graph.model.isVertex(p.cell)?new mxRectangle(p.x+p.width-4*N,p.y+4*N,0,0):mxRectangle.fromPoint(p.view.getPoint(p));B.bounds.equals(p)&&B.value==U&&B.scale==N||(B.bounds=p,B.value=U,B.scale= +N,B.redraw())}};var E=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){E.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var p=this.getDrawPane().parentNode;!this.graph.mathEnabled||mxClient.NO_FO||null!=this.webKitForceRepaintNode&&null!=this.webKitForceRepaintNode.parentNode||"svg"!=this.graph.container.firstChild.nodeName?null==this.webKitForceRepaintNode||this.graph.mathEnabled&&("svg"==this.graph.container.firstChild.nodeName|| +this.graph.container.firstChild==this.webKitForceRepaintNode)||(null!=this.webKitForceRepaintNode.parentNode&&this.webKitForceRepaintNode.parentNode.removeChild(this.webKitForceRepaintNode),this.webKitForceRepaintNode=null):(this.webKitForceRepaintNode=document.createElement("div"),this.webKitForceRepaintNode.style.cssText="position:absolute;",p.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,p.ownerSVGElement))}};var I=Graph.prototype.refresh;Graph.prototype.refresh=function(){I.apply(this, +arguments);this.refreshBackgroundImage()};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var M=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){M.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(p){"data:action/json,"==p.substring(0,17)&&(p=JSON.parse(p.substring(17)),null!= +p.actions&&this.executeCustomActions(p.actions))};Graph.prototype.executeCustomActions=function(p,B){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var N=!1,U=0,O=0,S=mxUtils.bind(this,function(){N||(N=!0,this.model.beginUpdate())}),T=mxUtils.bind(this, +function(){N&&(N=!1,this.model.endUpdate())}),W=mxUtils.bind(this,function(){0mxUtils.indexOf(Z.tags.visible,ma[ha])&&0>mxUtils.indexOf(ea,ma[ha])&&ea.push(ma[ha]);this.setHiddenTags(ea);this.refresh()}0n.excludeCells.indexOf(B[U].id)&&M.push(B[U]); -B=M}return B};Graph.prototype.getCellsById=function(n){var B=[];if(null!=n)for(var M=0;MB?this.hiddenTags.push(n):0<=B&&this.hiddenTags.splice(B,1);this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.isAllTagsHidden=function(n){if(null==n||0==n.length||0==this.hiddenTags.length)return!1;n=n.split(" ");if(n.length>this.hiddenTags.length)return!1;for(var B=0;BmxUtils.indexOf(this.hiddenTags,n[B]))return!1;return!0};Graph.prototype.getCellsForTags=function(n,B,M, -U){var O=[];if(null!=n){B=null!=B?B:this.model.getDescendants(this.model.getRoot());for(var S=0,T={},W=0;W=n.length)){for(var Z=aa=0;ZmxUtils.indexOf(O,W)&&(U=0p.excludeCells.indexOf(B[U].id)&&N.push(B[U]); +B=N}return B};Graph.prototype.getCellsById=function(p){var B=[];if(null!=p)for(var N=0;NB?this.hiddenTags.push(p):0<=B&&this.hiddenTags.splice(B,1);this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.isAllTagsHidden=function(p){if(null==p||0==p.length||0==this.hiddenTags.length)return!1;p=p.split(" ");if(p.length>this.hiddenTags.length)return!1;for(var B=0;BmxUtils.indexOf(this.hiddenTags,p[B]))return!1;return!0};Graph.prototype.getCellsForTags=function(p,B,N, +U){var O=[];if(null!=p){B=null!=B?B:this.model.getDescendants(this.model.getRoot());for(var S=0,T={},W=0;W=p.length)){for(var Z=aa=0;ZmxUtils.indexOf(O,W)&&(U=0'),Ya.writeln("@media print {"),Ya.writeln(".MathJax svg { shape-rendering: crispEdges; }"),Ya.writeln("}"),Ya.writeln(""));null!=n.editor.fontCss&&(Ya.writeln('"));for(var cb=Ga.getCustomFonts(),bb=0;bb'): +Xa=mxRectangle.fromRectangle(Xa);Xa.width=Math.ceil(Xa.width*ta);Xa.height=Math.ceil(Xa.height*ta);ab*=ta;!Za&&Ga.pageVisible?(Sa=Ga.getPageLayout(),Wa-=Sa.x*Xa.width,$a-=Sa.y*Xa.height):Za=!0;if(null==Ma){Ma=PrintDialog.createPrintPreview(Ga,ab,Xa,0,Wa,$a,Za);Ma.pageSelector=!1;Ma.mathEnabled=!1;ma.checked&&(Ma.isCellVisible=function(Ya){return Ga.isCellSelected(Ya)});Wa=p.getCurrentFile();null!=Wa&&(Ma.title=Wa.getTitle());var hb=Ma.writeHead;Ma.writeHead=function(Ya){hb.apply(this,arguments);mxClient.IS_GC&& +(Ya.writeln('"));null!=p.editor.fontCss&&(Ya.writeln('"));for(var cb=Ga.getCustomFonts(),bb=0;bb'): (Ya.writeln('"))}};if("undefined"!==typeof MathJax){var ib=Ma.renderPage;Ma.renderPage=function(Ya,cb,bb,eb,db,kb){var jb=mxClient.NO_FO,fb=ib.apply(this,arguments);mxClient.NO_FO=jb;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:fb.className="geDisableMathJax";return fb}}Wa=null;$a=O.shapeForegroundColor;Za=O.shapeBackgroundColor; Xa=O.enableFlowAnimation;O.enableFlowAnimation=!1;null!=O.themes&&"darkTheme"==O.defaultThemeName&&(Wa=O.stylesheet,O.stylesheet=O.getDefaultStylesheet(),O.shapeForegroundColor="#000000",O.shapeBackgroundColor="#ffffff",O.refresh());Ma.open(null,null,Na,!0);O.enableFlowAnimation=Xa;null!=Wa&&(O.shapeForegroundColor=$a,O.shapeBackgroundColor=Za,O.stylesheet=Wa,O.refresh())}else{Xa=Ga.background;if(null==Xa||""==Xa||Xa==mxConstants.NONE)Xa="#ffffff";Ma.backgroundColor=Xa;Ma.autoOrigin=Za;Ma.appendGraph(Ga, ab,Wa,$a,Na,!0);Na=Ga.getCustomFonts();if(null!=Ma.wnd)for(Wa=0;Wa'):(Ma.wnd.document.writeln('"))}Qa&&(Ga.useCssTransforms=Qa, -Ga.currentTranslate=Ra,Ga.currentScale=Ua,Ga.view.translate=Ha,Ga.view.scale=Ta);return Ma}var ta=parseInt(ja.value)/100;isNaN(ta)&&(ta=1,ja.value="100 %");ta*=.75;var oa=null,Da=O.shapeForegroundColor,da=O.shapeBackgroundColor;null!=O.themes&&"darkTheme"==O.defaultThemeName&&(oa=O.stylesheet,O.stylesheet=O.getDefaultStylesheet(),O.shapeForegroundColor="#000000",O.shapeBackgroundColor="#ffffff",O.refresh());var la=ca.value,pa=ea.value,va=!aa.checked,wa=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(n, -aa.checked,la,pa,ya.checked,za.value,Aa.value,parseInt(Ba.value)/100,parseInt(ja.value)/100,La.get());else{va&&(va=ma.checked||la==Y&&pa==Y);if(!va&&null!=n.pages&&n.pages.length){var Ea=0;va=n.pages.length-1;aa.checked||(Ea=parseInt(la)-1,va=parseInt(pa)-1);for(var ba=Ea;ba<=va;ba++){var ia=n.pages[ba];la=ia==n.currentPage?O:null;if(null==la){la=n.createTemporaryGraph(O.stylesheet);la.shapeForegroundColor=O.shapeForegroundColor;la.shapeBackgroundColor=O.shapeBackgroundColor;pa=!0;Ea=!1;var ka=null, -Ia=null;null==ia.viewState&&null==ia.root&&n.updatePageRoot(ia);null!=ia.viewState&&(pa=ia.viewState.pageVisible,Ea=ia.viewState.mathEnabled,ka=ia.viewState.background,Ia=ia.viewState.backgroundImage,la.extFonts=ia.viewState.extFonts);null!=Ia&&null!=Ia.originalSrc&&(Ia=n.createImageForPageLink(Ia.originalSrc,ia));la.background=ka;la.backgroundImage=null!=Ia?new mxImage(Ia.src,Ia.width,Ia.height,Ia.x,Ia.y):null;la.pageVisible=pa;la.mathEnabled=Ea;var Pa=la.getGraphBounds;la.getGraphBounds=function(){var Ga= -Pa.apply(this,arguments),Ma=this.backgroundImage;if(null!=Ma&&null!=Ma.width&&null!=Ma.height){var Na=this.view.translate,Qa=this.view.scale;Ga=mxRectangle.fromRectangle(Ga);Ga.add(new mxRectangle((Na.x+Ma.x)*Qa,(Na.y+Ma.y)*Qa,Ma.width*Qa,Ma.height*Qa))}return Ga};var Va=la.getGlobalVariable;la.getGlobalVariable=function(Ga){return"page"==Ga?ia.getName():"pagenumber"==Ga?ba+1:"pagecount"==Ga?null!=n.pages?n.pages.length:1:Va.apply(this,arguments)};document.body.appendChild(la.container);n.updatePageRoot(ia); -la.model.setRoot(ia.root)}wa=ra(la,wa,ba!=va);la!=O&&la.container.parentNode.removeChild(la.container)}}else wa=ra(O);null==wa?n.handleError({message:mxResources.get("errorUpdatingPreview")}):(wa.mathEnabled&&(va=wa.wnd.document,ua&&(wa.wnd.IMMEDIATE_PRINT=!0),va.writeln('