@zklogic/draw.io
Version:
Draw.IO - Graph Editor integration in Angular-cli
1 lines • 102 kB
JavaScript
App=function(t,e,i){if(EditorUi.call(this,t,e,null!=i?i:"1"==urlParams.lightbox||"min"==uiTheme&&"0"!=urlParams.chrome),mxClient.IS_SVG?mxGraph.prototype.warningImage.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAE7SURBVHjaYvz//z8DJQAggBjwGXDuHMP/tWuD/uPTCxBAOA0AaQRK/f/+XeJ/cbHlf1wGAAQQTgPu3QNLgfHSpZo4DQAIIKwGwGyH4e/fFbG6AiQJEEAs2Ew2NFzH8OOHBMO6dT/A/KCg7wxGRh+wuhQggDBcALMdFIAcHBxgDGJjcwVIIUAAYbhAUXEdVos4OO4DXcGBIQ4QQCguQPY7sgtgAYruCpAgQACx4LJdU1OCwctLEcyWlLwPJF+AXQE0EMUBAAEEdwF6yMOiD4RRY0QT7gqQAEAAseDzu6XldYYPH9DD4joQa8L5AAEENgWb7SBcXa0JDQMBrK4AcQACiAlfyOMCEFdAnAYQQEz4FLa0XGf4/v0H0IIPONUABBAjyBmMjIwMS5cK/L927QORbtBkaG29DtYLEGAAH6f7oq3Zc+kAAAAASUVORK5CYII=":(new Image).src=mxGraph.prototype.warningImage.src,window.openWindow=mxUtils.bind(this,(function(t,e,i){if("1"==urlParams.openInSameWin||navigator.standalone)i();else{var n=null;try{n=window.open(t)}catch(t){}null==n||void 0===n?this.showDialog(new PopupDialog(this,t,e,i).container,320,140,!0,!0):null!=e&&e()}})),this.updateDocumentTitle(),this.updateUi(),window.showOpenAlert=mxUtils.bind(this,(function(t){null!=window.openFile&&window.openFile.cancel(!0),this.handleError(t)})),this.editor.chromeless&&!this.editor.editable||this.addFileDropHandler([document]),null!=App.DrawPlugins){for(var n=0;n<App.DrawPlugins.length;n++)try{App.DrawPlugins[n](this)}catch(t){null!=window.console&&console.log("Plugin Error:",t,App.DrawPlugins[n])}finally{App.embedModePluginsCount--,this.initializeEmbedMode()}window.Draw.loadPlugin=mxUtils.bind(this,(function(t){try{t(this)}finally{App.embedModePluginsCount--,this.initializeEmbedMode()}})),setTimeout(mxUtils.bind(this,(function(){App.embedModePluginsCount>0&&(App.embedModePluginsCount=0,this.initializeEmbedMode())})),5e3)}this.load()},App.ERROR_TIMEOUT="timeout",App.ERROR_BUSY="busy",App.ERROR_UNKNOWN="unknown",App.MODE_GOOGLE="google",App.MODE_DROPBOX="dropbox",App.MODE_ONEDRIVE="onedrive",App.MODE_GITHUB="github",App.MODE_GITLAB="gitlab",App.MODE_DEVICE="device",App.MODE_BROWSER="browser",App.MODE_TRELLO="trello",App.MODE_NOTION="notion",App.MODE_EMBED="embed",App.MODE_ATLAS="atlas",App.DROPBOX_APPKEY=window.DRAWIO_DROPBOX_ID,App.DROPBOX_URL=window.DRAWIO_BASE_URL+"/js/dropbox/Dropbox-sdk.min.js",App.DROPINS_URL="https://www.dropbox.com/static/api/2/dropins.js",App.TRELLO_URL="https://api.trello.com/1/client.js",App.TRELLO_JQUERY_URL=window.DRAWIO_BASE_URL+"/js/jquery/jquery-3.3.1.min.js",App.PUSHER_KEY="1e756b07a690c5bdb054",App.PUSHER_CLUSTER="eu",App.PUSHER_URL="https://js.pusher.com/4.3/pusher.min.js",App.SOCKET_IO_URL=window.DRAWIO_BASE_URL+"/js/socket.io/socket.io.min.js",App.SIMPLE_PEER_URL=window.DRAWIO_BASE_URL+"/js/socket.io/simplepeer9.10.0.min.js",App.SOCKET_IO_SRV="http://localhost:3030",App.GOOGLE_APIS="drive-share",App.startTime=new Date,App.pluginRegistry={"4xAKTrabTpTzahoLthkwPNUn":"plugins/explore.js",ex:"plugins/explore.js",p1:"plugins/p1.js",ac:"plugins/connect.js",acj:"plugins/connectJira.js",ac148:"plugins/cConf-1-4-8.js",ac148cmnt:"plugins/cConf-comments.js",voice:"plugins/voice.js",tips:"plugins/tooltips.js",svgdata:"plugins/svgdata.js",electron:"plugins/electron.js",number:"plugins/number.js",sql:"plugins/sql.js",props:"plugins/props.js",text:"plugins/text.js",anim:"plugins/animation.js",update:"plugins/update.js",trees:"plugins/trees/trees.js",import:"plugins/import.js",replay:"plugins/replay.js",anon:"plugins/anonymize.js",tr:"plugins/trello.js",f5:"plugins/rackF5.js",tickets:"plugins/tickets.js",flow:"plugins/flow.js",webcola:"plugins/webcola/webcola.js",rnd:"plugins/random.js",page:"plugins/page.js",gd:"plugins/googledrive.js",tags:"plugins/tags.js"},App.publicPlugin=["ex","voice","tips","svgdata","number","sql","props","text","anim","update","trees","replay","anon","tickets","flow","webcola","tags"],App.loadScripts=function(t,e){for(var i=t.length,n=0;n<t.length;n++)mxscript(t[n],(function(){0==--i&&null!=e&&e()}))},App.getStoredMode=function(){var t=null;if(null==t&&isLocalStorage&&(t=localStorage.getItem(".mode")),null==t&&"undefined"!=typeof Storage){for(var e=document.cookie.split(";"),i=0;i<e.length;i++){var n=mxUtils.trim(e[i]);if("MODE="==n.substring(0,5)){t=n.substring(5);break}}if(null!=t&&isLocalStorage){var s=new Date;s.setYear(s.getFullYear()-1),document.cookie="MODE=; expires="+s.toUTCString(),localStorage.setItem(".mode",t)}}return t},mxClient.IS_CHROMEAPP||("1"!=urlParams.offline&&("db.draw.io"==window.location.hostname&&null==urlParams.mode&&(urlParams.mode="dropbox"),App.mode=urlParams.mode),null==App.mode&&(App.mode=App.getStoredMode())),App.clearServiceWorker=function(t){navigator.serviceWorker.getRegistrations().then((function(e){if(null!=e&&e.length>0){for(var i=0;i<e.length;i++)e[i].unregister();null!=t&&t()}}))},App.main=function(t,e,i){if(window.onerror=function(t,e,i,n,s){EditorUi.logError("Global: "+(null!=t?t:""),e,i,n,s,null,!0)},window.top==window.self&&(/ac\.draw\.io$/.test(window.location.hostname)||/ac-ent\.draw\.io$/.test(window.location.hostname)||/aj\.draw\.io$/.test(window.location.hostname)))document.body.innerHTML='<div style="margin-top:10%;text-align:center;">Stand-alone mode not allowed for this domain.</div>';else{if("1"==urlParams.embed||"1"==urlParams.lightbox){var n=document.getElementById("geInfo");null!=n&&n.parentNode.removeChild(n)}if(null!=document.referrer&&"aws3"==urlParams.libs&&"https://aws.amazon.com/architecture/icons/"==document.referrer.substring(0,42)&&(urlParams.libs="aws4"),null!=window.mxscript){if("1"==urlParams.dev&&null!=CryptoJS&&App.mode!=App.MODE_DROPBOX&&App.mode!=App.MODE_TRELLO){var s=document.getElementsByTagName("script");if(null!=s&&s.length>0){var l=mxUtils.getTextContent(s[0]);"b02227617087e21bd49f2faa15164112"!=CryptoJS.MD5(l).toString()&&(console.log("Change bootstrap script MD5 in the previous line:",CryptoJS.MD5(l).toString()),alert("[Dev] Bootstrap script change requires update of CSP"))}null!=s&&s.length>1&&(l=mxUtils.getTextContent(s[s.length-1]),"d53805dd6f0bbba2da4966491ca0a505"!=CryptoJS.MD5(l).toString()&&(console.log("Change main script MD5 in the previous line:",CryptoJS.MD5(l).toString()),alert("[Dev] Main script change requires update of CSP")))}try{Editor.enableServiceWorker&&("0"==urlParams.offline||/www\.draw\.io$/.test(window.location.hostname)||"1"!=urlParams.offline&&"1"==urlParams.dev)?App.clearServiceWorker((function(){"0"==urlParams.offline&&alert("Cache cleared")})):Editor.enableServiceWorker&&navigator.serviceWorker.register("/service-worker.js")}catch(t){null!=window.console&&console.error(t)}if(!("ArrayBuffer"in window)||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"auto"!=DrawioFile.SYNC||"1"==urlParams.embed&&"1"!=urlParams.embedRT||"1"==urlParams.local||"0"==urlParams.chrome&&"1"!=urlParams.rt||"1"==urlParams.stealth||"1"==urlParams.offline||(mxscript(App.PUSHER_URL),"1"==urlParams.rtCursors&&(mxscript(App.SOCKET_IO_URL),mxscript(App.SIMPLE_PEER_URL))),"0"!=urlParams.plugins&&"1"!=urlParams.offline){var o=null!=mxSettings.settings?mxSettings.getPlugins():null;if(null==mxSettings.settings&&isLocalStorage&&"undefined"!=typeof JSON)try{null!=(r=JSON.parse(localStorage.getItem(mxSettings.key)))&&(o=r.plugins)}catch(t){}var r=urlParams.p;if(App.initPluginCallback(),null!=r&&App.loadPlugins(r.split(";")),null!=o&&o.length>0&&"0"!=urlParams.plugins){for(var a=window.location.protocol+"//"+window.location.host,u=!0,h=0;h<o.length&&u;h++)"/"!=o[h].charAt(0)&&o[h].substring(0,a.length)!=a&&(u=!1);if(u||mxUtils.confirm(mxResources.replacePlaceholders("The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n",[o.join("\n")]).replace(/\\n/g,"\n")))for(h=0;h<o.length;h++)try{null==App.pluginsLoaded[o[h]]&&(App.pluginsLoaded[o[h]]=!0,App.embedModePluginsCount++,"/"==o[h].charAt(0)&&(o[h]=PLUGINS_BASE_PATH+o[h]),mxscript(o[h]))}catch(t){}}}}if("0"!=urlParams.math&&Editor.initMath(),"1"==urlParams.configure){var d=window.opener||window.parent,p=function(t){if(t.source==d)try{var e=JSON.parse(t.data);null!=e&&"configure"==e.action&&(mxEvent.removeListener(window,"message",p),Editor.configure(e.config,!0),mxSettings.load(),m())}catch(e){null!=window.console&&console.log("Error in configure message: "+e,t.data)}};mxEvent.addListener(window,"message",p),d.postMessage(JSON.stringify({event:"configure"}),"*")}else{if(null==Editor.config){if(null!=window.DRAWIO_CONFIG)try{EditorUi.debug("Using global configuration",window.DRAWIO_CONFIG),Editor.configure(window.DRAWIO_CONFIG),mxSettings.load()}catch(t){null!=window.console&&console.error(t)}if(isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed){var c=localStorage.getItem(Editor.configurationKey);if(null!=c)try{null!=(c=JSON.parse(c))&&(EditorUi.debug("Using local configuration",c),Editor.configure(c),mxSettings.load())}catch(t){null!=window.console&&console.error(t)}}}m()}}function g(n){mxUtils.getAll("1"!=urlParams.dev?[n]:[n,STYLE_PATH+"/default.xml"],(function(n){if(mxResources.parse(n[0].getText()),isLocalStorage&&null!=localStorage&&null!=window.location.hash&&"#_CONFIG_"==window.location.hash.substring(0,9))try{var s={};for(var l in App.pluginRegistry)s[App.pluginRegistry[l]]=!0;var o=JSON.parse(Graph.decompress(window.location.hash.substring(9)));if(null!=o&&function(t){if(null!=t)for(var e=0;e<t.length;e++)if(!s[t[e]])throw new Error(mxResources.get("invalidInput")+' "'+t[e])+'"';return!0}(o.plugins)){if(EditorUi.debug("Setting configuration",JSON.stringify(o)),null!=o.merge){var r=localStorage.getItem(Editor.configurationKey);if(null!=r)try{var a=JSON.parse(r);for(var l in o.merge)a[l]=o.merge[l];o=a}catch(t){window.location.hash="",alert(t)}else o=o.merge}confirm(mxResources.get("configLinkWarn"))&&confirm(mxResources.get("configLinkConfirm"))&&(localStorage.setItem(Editor.configurationKey,JSON.stringify(o)),window.location.hash="",window.location.reload())}window.location.hash=""}catch(t){window.location.hash="",alert(t)}var u;n.length>1&&(Graph.prototype.defaultThemes["default-style2"]=n[1].getDocumentElement(),Graph.prototype.defaultThemes.darkTheme=n[1].getDocumentElement()),"1"==urlParams.dev||EditorUi.isElectronApp||(mxStencilRegistry.allowEval=!1),u=null!=e?e():new App(new Editor("0"==urlParams.chrome||"min"==uiTheme,null,null,null,"0"!=urlParams.chrome),i),null!=t&&t(u),"0"!=urlParams.chrome&&"1"==urlParams.test&&(EditorUi.debug("App.start",[u,(new Date).getTime()-t0.getTime()+"ms"]),null!=urlParams.export&&EditorUi.debug("Export:",EXPORT_URL))}),(function(t){var e=document.getElementById("geStatus");null!=e&&(e.innerHTML="Error loading page. <a>Please try refreshing.</a>",e.getElementsByTagName("a")[0].onclick=function(){mxLanguage="en",g(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))})}))}function m(){try{if(null!=mxSettings.settings){if(document.body.style.backgroundColor="dark"==uiTheme||mxSettings.settings.darkMode?Editor.darkColor:"#ffffff",null!=mxSettings.settings.autosaveDelay){var t=parseInt(mxSettings.settings.autosaveDelay);!isNaN(t)&&t>0?(DrawioFile.prototype.autosaveDelay=t,EditorUi.debug("Setting autosaveDelay",t)):EditorUi.debug("Invalid autosaveDelay",t)}null!=mxSettings.settings.defaultEdgeLength&&(t=parseInt(mxSettings.settings.defaultEdgeLength),!isNaN(t)&&t>0?(Graph.prototype.defaultEdgeLength=t,EditorUi.debug("Using defaultEdgeLength",t)):EditorUi.debug("Invalid defaultEdgeLength",t))}}catch(t){null!=window.console&&console.error(t)}if(null!=Menus.prototype.defaultFonts)for(var e=0;e<Menus.prototype.defaultFonts.length;e++){var i=Menus.prototype.defaultFonts[e];"string"!=typeof i&&null!=i.fontFamily&&null!=i.fontUrl&&Graph.addFont(i.fontFamily,i.fontUrl)}mxResources.loadDefaultBundle=!1,g(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))}},mxUtils.extend(App,EditorUi),App.prototype.defaultUserPicture=IMAGE_PATH+"/default-user.jpg",App.prototype.shareImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2RpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YW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NTJFOCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PqjT9SMAAAAGUExURQAAAP///6XZn90AAAACdFJOU/8A5bcwSgAAAB9JREFUeNpiYEQDDEQJMMABTAAmNdAC6A4j0XMAAQYAcbwA1Xvj1CgAAAAASUVORK5CYII=":IMAGE_PATH+"/format-hide.png",App.prototype.fullscreenImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABlBMVEUAAAAAAAClZ7nPAAAAAXRSTlMAQObYZgAAABpJREFUCNdjgAAbGxAy4AEh5gNwBBGByoIBAIueBd12TUjqAAAAAElFTkSuQmCC":IMAGE_PATH+"/fullscreen.png",App.prototype.warnInterval=3e5,App.prototype.compactMode=!1,App.prototype.fullscreenMode=!1,"1"!=urlParams.embed?App.prototype.menubarHeight=64:App.prototype.footerHeight=0,App.initPluginCallback=function(){null==App.DrawPlugins&&(App.DrawPlugins=[],window.Draw=new Object,window.Draw.loadPlugin=function(t){App.DrawPlugins.push(t)})},App.pluginsLoaded={},App.embedModePluginsCount=0,App.loadPlugins=function(t,e){EditorUi.debug("Loading plugins",t);for(var i=0;i<t.length;i++)if(null!=t[i]&&t[i].length>0)try{var n=PLUGINS_BASE_PATH+App.pluginRegistry[t[i]];null!=n?null==App.pluginsLoaded[n]&&(App.pluginsLoaded[n]=!0,App.embedModePluginsCount++,void 0===window.drawDevUrl?e?mxinclude(n):mxscript(n):e?mxinclude(n):mxscript(drawDevUrl+n)):null!=window.console&&console.log("Unknown plugin:",t[i])}catch(e){null!=window.console&&console.log("Error loading plugin:",t[i],e)}},App.prototype.initializeEmbedMode=function(){if("1"==urlParams.embed){if("app.diagrams.net"==window.location.hostname&&this.showBanner("EmbedDeprecationFooter","app.diagrams.net will stop working for embed mode. Please use embed.diagrams.net."),App.embedModePluginsCount>0||this.initEmbedDone)return;this.initEmbedDone=!0,EditorUi.prototype.initializeEmbedMode.apply(this,arguments)}},App.prototype.initializeViewerMode=function(){var t=window.opener||window.parent;null!=t&&this.editor.graph.addListener(mxEvent.SIZE,mxUtils.bind(this,(function(){t.postMessage(JSON.stringify(this.createLoadMessage("size")),"*")})))},App.prototype.init=function(){if(EditorUi.prototype.init.apply(this,arguments),this.defaultLibraryName=mxResources.get("untitledLibrary"),this.descriptorChangedListener=mxUtils.bind(this,this.descriptorChanged),"1"!=urlParams.embed){if(this.bg=this.createBackground(),this.container.appendChild(this.bg)||document.body.appendChild(this.bg),this.diagramContainer.style.visibility="hidden",this.formatContainer.style.visibility="hidden",this.hsplit.style.display="none",this.sidebarContainer.style.display="none",this.sidebarFooterContainer.style.display="none","1"==urlParams.local?this.setMode(App.MODE_DEVICE):this.mode=App.mode,"serviceWorker"in navigator&&!this.editor.isChromelessView()&&(mxClient.IS_ANDROID||mxClient.IS_IOS)&&window.addEventListener("beforeinstallprompt",mxUtils.bind(this,(function(t){this.showBanner("AddToHomeScreenFooter",mxResources.get("installApp"),(function(){t.prompt()}))}))),!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&"1"!=urlParams.embed&&"auto"==DrawioFile.SYNC&&"1"!=urlParams.local&&"1"!=urlParams.stealth&&!this.isOffline()&&(!this.editor.chromeless||this.editor.editable)){var t=window.setTimeout(mxUtils.bind(this,(function(){DrawioFile.SYNC="manual";var t=this.getCurrentFile();if(null!=t&&null!=t.sync){t.sync.destroy(),t.sync=null;var e=mxUtils.htmlEntities(mxResources.get("timeout"));this.editor.setStatus('<div title="'+e+'" class="geStatusAlert">'+e+"</div>")}EditorUi.logEvent({category:"TIMEOUT-CACHE-CHECK",action:"timeout",label:408})})),Editor.cacheTimeout);(new Date).getTime(),mxUtils.get(EditorUi.cacheUrl+"?alive",mxUtils.bind(this,(function(e){window.clearTimeout(t)})))}}else null!=this.menubar&&(this.menubar.container.style.paddingTop="0px");this.updateHeader(),null!=this.menubar&&(this.buttonContainer=document.createElement("div"),this.buttonContainer.style.display="inline-block",this.buttonContainer.style.paddingRight="48px",this.buttonContainer.style.position="absolute",this.buttonContainer.style.right="0px",this.buttonContainer.className="menuButtonContainer",this.menubar.container.appendChild(this.buttonContainer)),"atlas"!=uiTheme&&"1"!=urlParams.atlas||null==this.menubar||(null!=this.toggleElement&&(this.toggleElement.click(),this.toggleElement.style.display="none"),this.icon=document.createElement("img"),this.icon.setAttribute("src",IMAGE_PATH+"/logo-flat-small.png"),this.icon.setAttribute("title",mxResources.get("draw.io")),this.icon.style.padding="1"==urlParams.atlas?"7px":"6px",this.icon.style.cursor="pointer",mxEvent.addListener(this.icon,"click",mxUtils.bind(this,(function(t){this.appIconClicked(t)}))),this.menubar.container.insertBefore(this.icon,this.menubar.container.firstChild)),this.editor.graph.isViewer()&&this.initializeViewerMode()},App.prototype.scheduleSanityCheck=function(){mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=this.sanityCheckThread||(this.sanityCheckThread=window.setTimeout(mxUtils.bind(this,(function(){this.sanityCheckThread=null,this.sanityCheck()})),this.warnInterval))},App.prototype.stopSanityCheck=function(){null!=this.sanityCheckThread&&(window.clearTimeout(this.sanityCheckThread),this.sanityCheckThread=null)},App.prototype.sanityCheck=function(){var t=this.getCurrentFile();if(null!=t&&t.isModified()&&t.isAutosave()&&t.isOverdue()){var e={category:"WARN-FILE-"+t.getHash(),action:(t.savingFile?"saving":"")+(t.savingFile&&null!=t.savingFileTime?"_"+Math.round((Date.now()-t.savingFileTime.getTime())/1e3):"")+(null!=t.saveLevel?"-sl_"+t.saveLevel:"")+"-age_"+(null!=t.ageStart?Math.round((Date.now()-t.ageStart.getTime())/1e3):"x")+(this.editor.autosave?"":"-nosave")+(t.isAutosave()?"":"-noauto")+"-open_"+(null!=t.opened?Math.round((Date.now()-t.opened.getTime())/1e3):"x")+"-save_"+(null!=t.lastSaved?Math.round((Date.now()-t.lastSaved.getTime())/1e3):"x")+"-change_"+(null!=t.lastChanged?Math.round((Date.now()-t.lastChanged.getTime())/1e3):"x")+"-alive_"+Math.round((Date.now()-App.startTime.getTime())/1e3),label:null!=t.sync?"client_"+t.sync.clientId:"nosync"};t.constructor==DriveFile&&null!=t.desc&&null!=this.drive&&(e.label+=(null!=this.drive.user?"-user_"+this.drive.user.id:"-nouser")+"-rev_"+t.desc.headRevisionId+"-mod_"+t.desc.modifiedDate+"-size_"+t.getSize()+"-mime_"+t.desc.mimeType),EditorUi.logEvent(e);var i=mxResources.get("ensureDataSaved");if(null!=t.lastSaved){var n=this.timeSince(t.lastSaved);null==n&&(n=mxResources.get("lessThanAMinute")),i=mxResources.get("lastSaved",[n])}this.spinner.stop(),this.showError(mxResources.get("unsavedChanges"),i,mxResources.get("ignore"),mxUtils.bind(this,(function(){this.hideDialog()})),null,mxResources.get("save"),mxUtils.bind(this,(function(){this.stopSanityCheck(),this.actions.get(null!=this.mode&&t.isEditable()?"save":"saveAs").funct()})),null,null,360,120,null,mxUtils.bind(this,(function(){this.scheduleSanityCheck()})))}},App.prototype.isDriveDomain=function(){return"0"!=urlParams.drive&&("test.draw.io"==window.location.hostname||"www.draw.io"==window.location.hostname||"drive.draw.io"==window.location.hostname||"app.diagrams.net"==window.location.hostname||"jgraph.github.io"==window.location.hostname)},App.prototype.getPusher=function(){return null==this.pusher&&"function"==typeof window.Pusher&&(this.pusher=new Pusher(App.PUSHER_KEY,{cluster:App.PUSHER_CLUSTER,encrypted:!0})),this.pusher},App.prototype.showNameChangeBanner=function(){this.showBanner("DiagramsFooter","draw.io is now diagrams.net",mxUtils.bind(this,(function(){this.openLink("https://www.diagrams.net/blog/move-diagrams-net")})))},App.prototype.showNameConfBanner=function(){this.showBanner("ConfFooter","Try draw.io for Confluence",mxUtils.bind(this,(function(){this.openLink("https://marketplace.atlassian.com/apps/1210933/draw-io-diagrams-for-confluence")})),!0)},App.prototype.showDownloadDesktopBanner=function(){this.showBanner("DesktopFooter",mxResources.get("downloadDesktop"),mxUtils.bind(this,(function(){this.openLink("https://get.diagrams.net/")})))},App.prototype.showRatingBanner=function(){if(!(this.bannerShowing||this.hideBannerratingFooter||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings.closeratingFooter)){var t=document.createElement("div");t.style.cssText="position:absolute;bottom:10px;left:50%;max-width:90%;padding:18px 34px 12px 20px;font-size:16px;font-weight:bold;white-space:nowrap;cursor:pointer;z-index:"+mxPopupMenu.prototype.zIndex+";",mxUtils.setPrefixedStyle(t.style,"box-shadow","1px 1px 2px 0px #ddd"),mxUtils.setPrefixedStyle(t.style,"transform","translate(-50%,120%)"),mxUtils.setPrefixedStyle(t.style,"transition","all 1s ease"),t.className="geBtn gePrimaryBtn";var e=document.createElement("img");e.setAttribute("src",Dialog.prototype.closeImage),e.setAttribute("title",mxResources.get("close")),e.setAttribute("border","0"),e.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;",t.appendChild(e);var i="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg==";mxUtils.write(t,"Please rate us"),this.container.appendChild(t)||document.body.appendChild(t);var n=document.createElement("img");n.setAttribute("border","0"),n.setAttribute("align","absmiddle"),n.setAttribute("title","1 star"),n.setAttribute("style","margin-top:-6px;cursor:pointer;margin-left:8px;"),n.setAttribute("src",i),t.appendChild(n);var s=document.createElement("img");s.setAttribute("border","0"),s.setAttribute("align","absmiddle"),s.setAttribute("title","2 star"),s.setAttribute("style","margin-top:-6px;margin-left:3px;cursor:pointer;"),s.setAttribute("src",i),t.appendChild(s);var l=document.createElement("img");l.setAttribute("border","0"),l.setAttribute("align","absmiddle"),l.setAttribute("title","3 star"),l.setAttribute("style","margin-top:-6px;margin-left:3px;cursor:pointer;"),l.setAttribute("src",i),t.appendChild(l);var o=document.createElement("img");o.setAttribute("border","0"),o.setAttribute("align","absmiddle"),o.setAttribute("title","4 star"),o.setAttribute("style","margin-top:-6px;margin-left:3px;cursor:pointer;"),o.setAttribute("src",i),t.appendChild(o),this.bannerShowing=!0;var r=mxUtils.bind(this,(function(){null!=t.parentNode&&(t.parentNode.removeChild(t),this.bannerShowing=!1,this.hideBannerratingFooter=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings.closeratingFooter=Date.now(),mxSettings.save()))}));mxEvent.addListener(e,"click",mxUtils.bind(this,(function(t){mxEvent.consume(t),r()}))),mxEvent.addListener(n,"click",mxUtils.bind(this,(function(t){mxEvent.consume(t),r()}))),mxEvent.addListener(s,"click",mxUtils.bind(this,(function(t){mxEvent.consume(t),r()}))),mxEvent.addListener(l,"click",mxUtils.bind(this,(function(t){mxEvent.consume(t),r()}))),mxEvent.addListener(o,"click",mxUtils.bind(this,(function(t){mxEvent.consume(t),window.open("https://marketplace.atlassian.com/apps/1210933/draw-io-diagrams-for-confluence?hosting=datacenter&tab=reviews"),r()})));var a=mxUtils.bind(this,(function(){mxUtils.setPrefixedStyle(t.style,"transform","translate(-50%,120%)"),window.setTimeout(mxUtils.bind(this,(function(){r()})),1e3)}));window.setTimeout(mxUtils.bind(this,(function(){mxUtils.setPrefixedStyle(t.style,"transform","translate(-50%,0%)")})),500),window.setTimeout(a,6e4)}},App.prototype.checkLicense=function(){var t=this.drive.getUser(),e=null!=t?t.email:null;if(!this.isOffline()&&!this.editor.chromeless&&null!=e&&null!=t.id){var i=e.lastIndexOf("@"),n=i>=0?e.substring(i+1):"",s=Editor.crc32(t.id);mxUtils.post("/license","domain="+encodeURIComponent(n)+"&id="+encodeURIComponent(s)+"&ts="+(new Date).getTime(),mxUtils.bind(this,(function(t){try{if(t.getStatus()>=200&&t.getStatus()<=299){var e=t.getText();if(e.length>0){var i=JSON.parse(e);null!=i&&this.handleLicense(i,n)}}}catch(t){}})))}},App.prototype.handleLicense=function(t,e){null!=t&&null!=t.plugins&&App.loadPlugins(t.plugins.split(";"),!0)},App.prototype.getEditBlankXml=function(){var t=this.getCurrentFile();return null!=t&&this.editor.isChromelessView()&&this.editor.graph.isLightboxView()?t.getData():this.getFileData(!0)},App.prototype.updateActionStates=function(){EditorUi.prototype.updateActionStates.apply(this,arguments),this.actions.get("revisionHistory").setEnabled(this.isRevisionHistoryEnabled())},App.prototype.addRecent=function(t){if(isLocalStorage&&null!=localStorage){var e=this.getRecent();if(null==e)e=[];else for(var i=0;i<e.length;i++)e[i].id==t.id&&e.splice(i,1);null!=e&&(e.unshift(t),e=e.slice(0,10),localStorage.setItem(".recent",JSON.stringify(e)))}},App.prototype.getRecent=function(){if(isLocalStorage&&null!=localStorage){try{var t=localStorage.getItem(".recent");if(null!=t)return JSON.parse(t)}catch(t){}return null}},App.prototype.resetRecent=function(t){if(isLocalStorage&&null!=localStorage)try{localStorage.removeItem(".recent")}catch(t){}},App.prototype.onBeforeUnload=function(){if("1"==urlParams.embed&&this.editor.modified)return mxResources.get("allChangesLost");var t=this.getCurrentFile();if(null!=t){if(!(t.constructor!=LocalFile||""!=t.getHash()||t.isModified()||"1"==urlParams.nowarn||this.isDiagramEmpty()||null!=urlParams.url||this.editor.isChromelessView()||null!=t.fileHandle))return mxResources.get("ensureDataSaved");if(t.isModified())return mxResources.get("allChangesLost");t.close(!0)}},App.prototype.updateDocumentTitle=function(){if(!this.editor.graph.isLightboxView()){var t=this.editor.appName,e=this.getCurrentFile();this.isOfflineApp()&&(t+=" app"),null!=e&&(t=(null!=e.getTitle()?e.getTitle():this.defaultFilename)+" - "+t)}},App.prototype.getThumbnail=function(t,e){var i=!1;try{var n=!0,s=window.setTimeout(mxUtils.bind(this,(function(){n=!1,e(null)})),this.timeout),l=mxUtils.bind(this,(function(t){window.clearTimeout(s),n&&e(t)}));null==this.thumbImageCache&&(this.thumbImageCache=new Object);var o=this.editor.graph,r=o.backgroundImage,a=null!=o.themes&&"darkTheme"==o.defaultThemeName;if(null!=this.pages&&(a||this.currentPage!=this.pages[0])){var u=o.getGlobalVariable;(o=this.createTemporaryGraph(o.getStylesheet())).setBackgroundImage=this.editor.graph.setBackgroundImage;var h=this.pages[0];this.currentPage==h?o.setBackgroundImage(r):null!=h.viewState&&null!=h.viewState&&(r=h.viewState.backgroundImage,o.setBackgroundImage(r)),o.getGlobalVariable=function(t){return"page"==t?h.getName():"pagenumber"==t?1:u.apply(this,arguments)},o.getGlobalVariable=u,this.container.appendChild(o.container)||document.body.appendChild(o.container),o.model.setRoot(h.root)}if(mxClient.IS_CHROMEAPP||this.useCanvasForExport)this.editor.exportToCanvas(mxUtils.bind(this,(function(t){try{o!=this.editor.graph&&null!=o.container.parentNode&&o.container.parentNode.removeChild(o.container)}catch(e){t=null}l(t)})),t,this.thumbImageCache,"#ffffff",(function(){l()}),null,null,null,null,null,null,o,null,null,null,null,"diagram",null),i=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var d=document.createElement("canvas"),p=o.getGraphBounds(),c=o.view.translate,g=o.view.scale;null!=r&&(p=mxRectangle.fromRectangle(p)).add(new mxRectangle((c.x+r.x)*g,(c.y+r.y)*g,r.width*g,r.height*g));var m=t/p.width;m=Math.min(1,Math.min(3*t/(4*p.height),m));var A=Math.floor(p.x),b=Math.floor(p.y);d.setAttribute("width",Math.ceil(m*(p.width+4))),d.setAttribute("height",Math.ceil(m*(p.height+4)));var f=d.getContext("2d");f.scale(m,m),f.translate(-A,-b);var w=o.background;if(null!=w&&""!=w&&w!=mxConstants.NONE||(w="#ffffff"),f.save(),f.fillStyle=w,f.fillRect(A,b,Math.ceil(p.width+4),Math.ceil(p.height+4)),f.restore(),null!=r){var x=new Image;x.src=r.src,f.drawImage(x,r.x*m,r.y*m,r.width*m,r.height*m)}var I=new mxJsCanvas(d),E=new mxAsyncCanvas(this.thumbImageCache);I.images=this.thumbImageCache.images;var y=new mxImageExport;y.drawShape=function(t,e){t.shape instanceof mxShape&&t.shape.checkBounds()&&(e.save(),e.translate(.5,.5),t.shape.paint(e),e.translate(-.5,-.5),e.restore())},y.drawText=function(t,e){},y.drawState(o.getView().getState(o.model.root),E),E.finish(mxUtils.bind(this,(function(){try{y.drawState(o.getView().getState(o.model.root),I),o!=this.editor.graph&&null!=o.container.parentNode&&o.container.parentNode.removeChild(o.container)}catch(t){d=null}l(d)}))),i=!0}}catch(t){i=!1,null!=o&&o!=this.editor.graph&&null!=o.container.parentNode&&o.container.parentNode.removeChild(o.container)}return i||window.clearTimeout(s),i},App.prototype.createBackground=function(){var t=this.createDiv("background");return t.style.position="absolute",t.style.background="white",t.style.left="0px",t.style.top="0px",t.style.bottom="0px",t.style.right="0px",mxUtils.setOpacity(t,100),t},function(){var t=EditorUi.prototype.setMode;App.prototype.setMode=function(e,i){if(t.apply(this,arguments),null!=this.mode&&(Editor.useLocalStorage=this.mode==App.MODE_BROWSER),null!=this.appIcon){var n=this.getCurrentFile();(e=null!=n?n.getMode():e)==App.MODE_GOOGLE?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("googleDrive")])),this.appIcon.style.cursor="pointer"):e==App.MODE_DROPBOX?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("dropbox")])),this.appIcon.style.cursor="pointer"):e==App.MODE_ONEDRIVE?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("oneDrive")])),this.appIcon.style.cursor="pointer"):(this.appIcon.removeAttribute("title"),this.appIcon.style.cursor=e==App.MODE_DEVICE?"pointer":"default")}if(i)try{if(isLocalStorage)localStorage.setItem(".mode",e);else if("undefined"!=typeof Storage){var s=new Date;s.setYear(s.getFullYear()+1),document.cookie="MODE="+e+"; expires="+s.toUTCString()}}catch(t){}}}(),App.prototype.appIconClicked=function(t){if(mxEvent.isAltDown(t))this.showSplash(!0);else{var e=this.getCurrentFile(),i=null!=e?e.getMode():null;if(i==App.MODE_GOOGLE)null!=e&&null!=e.desc&&null!=e.desc.parents&&e.desc.parents.length>0&&!mxEvent.isShiftDown(t)?this.openLink("https://drive.google.com/drive/folders/"+e.desc.parents[0].id):null!=e&&null!=e.getId()?this.openLink("https://drive.google.com/open?id="+e.getId()):this.openLink("https://drive.google.com/?authuser=0");else if(i==App.MODE_ONEDRIVE)if(null!=e&&null!=e.meta&&null!=e.meta.webUrl){var n=e.meta.webUrl,s=encodeURIComponent(e.meta.name);n.substring(n.length-s.length,n.length)==s&&(n=n.substring(0,n.length-s.length)),this.openLink(n)}else this.openLink("https://onedrive.live.com/");else i==App.MODE_DROPBOX?null!=e&&null!=e.stat&&null!=e.stat.path_display?(n="https://www.dropbox.com/home/Apps/drawio"+e.stat.path_display,mxEvent.isShiftDown(t)||(n=n.substring(0,n.length-e.stat.name.length)),this.openLink(n)):this.openLink("https://www.dropbox.com/"):i==App.MODE_TRELLO?this.openLink("https://trello.com/"):i==App.MODE_NOTION?this.openLink("https://www.notion.so/"):i==App.MODE_GITHUB?null!=e&&e.constructor==GitHubFile?this.openLink(e.meta.html_url):this.openLink("https://github.com/"):i==App.MODE_GITLAB?null!=e&&e.constructor==GitLabFile?this.openLink(e.meta.html_url):this.openLink(DRAWIO_GITLAB_URL):i==App.MODE_DEVICE&&this.openLink("https://get.draw.io/")}mxEvent.consume(t)},App.prototype.clearMode=function(){if(isLocalStorage)localStorage.removeItem(".mode");else if("undefined"!=typeof Storage){var t=new Date;t.setYear(t.getFullYear()-1),document.cookie="MODE=; expires="+t.toUTCString()}},App.prototype.getDiagramId=function(){var t=window.location.hash;if(null!=t&&t.length>0&&(t=t.substring(1)),null!=t&&t.length>1&&"T"==t.charAt(0)){var e=t.indexOf("#");e>0&&(t=t.substring(0,e))}return t},App.prototype.open=function(){try{if(null!=window.opener){var t=urlParams.create;if(null!=t&&(t=decodeURIComponent(t)),null!=t&&t.length>0&&"http://"!=t.substring(0,7)&&"https://"!=t.substring(0,8)){var e=mxUtils.parseXml(window.opener[t]);this.editor.setGraphXml(e.documentElement)}else null!=window.opener.openFile&&window.opener.openFile.setConsumer(mxUtils.bind(this,(function(t,e,i){if(this.spinner.stop(),null==e){var n=urlParams.title;i=!0,e=null!=n?decodeURIComponent(n):this.defaultFilename}(this.useCanvasForExport?-1:".png"==e.substring(e.length-4))>0&&(e=e.substring(0,e.length-4)+".drawio"),this.fileLoaded(mxClient.IS_IOS?new StorageFile(this,t,e):new LocalFile(this,t,e,i))})))}}catch(t){}},App.prototype.loadGapi=function(t){"undefined"!=typeof gapi&&gapi.load(("0"!=urlParams.picker?"picker,":"")+App.GOOGLE_APIS,t)},App.prototype.load=function(){if("1"!=urlParams.embed){if(this.spinner.spin(document.body,mxResources.get("starting"))){try{this.stateArg=null!=urlParams.state&&null!=this.drive?JSON.parse(decodeURIComponent(urlParams.state)):null}catch(t){}this.editor.graph.setEnabled(null!=this.getCurrentFile()),null!=window.location.hash&&0!=window.location.hash.length||null==this.drive||null==this.stateArg||null==this.stateArg.userId||this.drive.setUserId(this.stateArg.userId),null!=urlParams.fileId?(window.location.hash="G"+urlParams.fileId,window.location.search=this.getSearch(["fileId"])):null==this.drive?(this.mode==App.MODE_GOOGLE&&(this.mode=null),this.start()):this.loadGapi(mxUtils.bind(this,(function(){this.start()})))}}else this.restoreLibraries(),"1"==urlParams.gapi&&this.loadGapi((function(){}))},App.prototype.showRefreshDialog=function(t,e){if(!this.showingRefreshDialog&&(this.showingRefreshDialog=!0,this.showError(t||mxResources.get("externalChanges"),e||mxResources.get("redirectToNewApp"),mxResources.get("refresh"),mxUtils.bind(this,(function(){var t=this.getCurrentFile();null!=t&&t.setModified(!1),this.spinner.spin(document.body,mxResources.get("connecting")),this.editor.graph.setEnabled(!1),window.location.reload()})),null,null,null,null,null,340,180),null!=this.dialog&&null!=this.dialog.container)){var i=this.createRealtimeNotice();i.style.left="0",i.style.right="0",i.style.borderRadius="0",i.style.borderLeftStyle="none",i.style.borderRightStyle="none",i.style.marginBottom="26px",i.style.padding="8px 0 8px 0",this.dialog.container.appendChild(i)}},App.prototype.showAlert=function(t){if(null!=t&&t.length>0){var e=document.createElement("div");e.className="geAlert",e.style.zIndex=2e9,e.style.left="50%",e.style.top="-100%",e.style.maxWidth="80%",e.style.width="max-content",e.style.whiteSpace="pre-wrap",mxUtils.setPrefixedStyle(e.style,"transform","translate(-50%,0%)"),mxUtils.setPrefixedStyle(e.style,"transition","all 1s ease"),e.innerHTML=t;var i=document.createElement("a");i.className="geAlertLink",i.style.textAlign="right",i.style.marginTop="20px",i.style.display="block",i.setAttribute("title",mxResources.get("close")),i.innerHTML=mxResources.get("close"),e.appendChild(i),mxEvent.addListener(i,"click",(function(t){null!=e.parentNode&&(e.parentNode.removeChild(e),mxEvent.consume(t))})),this.container.appendChild(e)||document.body.appendChild(e),window.setTimeout((function(){e.style.top="30px"}),10),window.setTimeout((function(){mxUtils.setPrefixedStyle(e.style,"transition","all 2s ease"),e.style.opacity="0",window.setTimeout((function(){null!=e.parentNode&&e.parentNode.removeChild(e)}),2e3)}),15e3)}},App.prototype.start=function(){null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg),this.restoreLibraries(),this.spinner.stop();try{var t=this;if(window.onerror=function(e,i,n,s,l){"ResizeObserver loop limit exceeded"!=e&&(EditorUi.logError("Uncaught: "+(null!=e?e:""),i,n,s,l,null,!0),t.handleError({message:e},mxResources.get("unknownError"),null,null,null,null,!0))},"1"!=urlParams.client&&"1"!=urlParams.embed){try{isLocalStorage&&window.addEventListener("storage",mxUtils.bind(this,(function(t){var e=this.getCurrentFile();EditorUi.debug("storage event",t,e),null!=e&&".draft-alive-check"==t.key&&null!=t.newValue&&null!=e.draftId&&(this.draftAliveCheck=t.newValue,e.saveDraft())}))),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||this.isOfflineApp()||null!=urlParams.open||!/www\.draw\.io$/.test(window.location.hostname)||this.editor.chromeless&&!this.editor.editable||this.showNameChangeBanner()}catch(t){}mxEvent.addListener(window,"hashchange",mxUtils.bind(this,(function(t){try{this.hideDialog();var e=this.getDiagramId(),i=this.getCurrentFile();null!=i&&i.getHash()==e||this.loadFile(e,!0)}catch(t){null!=document.body&&this.handleError(t,mxResources.get("errorLoadingFile"),mxUtils.bind(this,(function(){var t=this.getCurrentFile();window.location.hash=null!=t?t.getHash():""})))}})))}if((null==window.location.hash||window.location.hash.length<=1)&&null!=urlParams.desc)try{this.loadDescriptor(JSON.parse(Graph.decompress(urlParams.desc)),null,mxUtils.bind(this,(function(t){this.handleError(t,mxResources.get("errorLoadingFile"))})))}catch(t){this.handleError(t,mxResources.get("errorLoadingFile"))}else if((null==window.location.hash||window.location.hash.length<=1)&&null!=urlParams.url)this.loadFile("U"+urlParams.url,!0);else if(null==this.getCurrentFile()){var e=mxUtils.bind(this,(function(){if("1"!=urlParams.client||null!=window.location.hash&&0!=window.location.hash.length&&"#P"!=window.location.hash.substring(0,2)){if(null==this.dialog)if("1"==urlParams.demo){var t=Editor.useLocalStorage;this.createFile(this.defaultFilename,null,null,null,null,null,null,!0),Editor.useLocalStorage=t}else{var e=!1;try{e=null!=window.opener&&null!=window.opener.openFile}catch(t){}if(e)this.spinner.spin(document.body,mxResources.get("loading"));else{var i=this.getDiagramId();!EditorUi.enableDrafts||null!=urlParams.mode&&!EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||null!=i&&0!=i.length||this.editor.isChromelessView()?null!=i&&i.length>0?this.loadFile(i,null,null,mxUtils.bind(this,(function(){var t=decodeURIComponent(urlParams.viewbox||"");if(""!=t)try{var e=JSON.parse(t);this.editor.graph.fitWindow(e,e.border)}catch(t){console.error(t)}}))):"0"!=urlParams.splash?this.loadFile():this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0):this.checkDrafts()}}}else{var n=mxUtils.bind(this,(function(t){"data:image/png;base64,"==t.substring(0,22)&&(t=this.extractGraphModelFromPng(t));var e=urlParams.title;e=null!=e?decodeURIComponent(e):this.defaultFilename;var i=new LocalFile(this,t,e,!0);null!=window.location.hash&&"#P"==window.location.hash.substring(0,2)&&(i.getHash=function(){return window.location.hash.substring(1)}),this.fileLoaded(i),this.getCurrentFile().setModified(!this.editor.chromeless)})),s=window.opener||window.parent;if(s!=window){var l=urlParams.create;null!=l?n(s[decodeURIComponent(l)]):null!=(l=urlParams.data)?n(decodeURIComponent(l)):this.installMessageHandler(mxUtils.bind(this,(function(t,e){e.source==s&&n(t)})))}}})),i=decodeURIComponent(urlParams.create||"");if((null==window.location.hash||window.location.hash.length<=1)&&null!=i&&i.length>0&&this.spinner.spin(document.body,mxResources.get("loading"))){var n=mxUtils.bind(this,(function(){this.spinner.spin(document.body,mxResources.get("reconnecting"))&&(window.location.search=this.getSearch(["create","title"]))})),s=mxUtils.bind(this,(function(t){if(this.spinner.stop(),"0"!=urlParams.splash){this.fileLoaded(new LocalFile(this,t,null)),this.editor.graph.setEnabled(!1),this.mode=urlParams.mode;var e=urlParams.title;e=null!=e?decodeURIComponent(e):this.defaultFilename;var i=this.getServiceCount(!0);isLocalStorage&&i++;var n=i<=4?2:i>6?4:3,s=new CreateDialog(this,e,mxUtils.bind(this,(function(t,e){if(null==e){this.hideDialog();var i=Editor.useLocalStorage;this.createFile(t.length>0?t:this.defaultFilename,this.getFileData(),null,null,null,!0,null,!0),Editor.useLocalStorage=i}else this.pickFolder(e,mxUtils.bind(this,(function(i){this.createFile(t,this.getFileData(!0),null,e,null,!0,i)})))})),null,null,null,null,"1"==urlParams.browser,null,null,!0,n,null,null,null,this.editor.fileExtensions);this.showDialog(s.container,400,i>n?390:270,!0,!1,mxUtils.bind(this,(function(t){t&&null==this.getCurrentFile()&&this.showSplash()}))),s.init()}}));if("http://"!=(i=decodeURIComponent(i)).substring(0,7)&&"https://"!=i.substring(0,8))try{null!=window.opener&&null!=window.opener[i]?s(window.opener[i]):this.handleError(null,mxResources.get("errorLoadingFile"))}catch(t){this.handleError(t,mxResources.get("errorLoadingFile"))}else this.loadTemplate(i,(function(t){s(t)}),mxUtils.bind(this,(function(){this.handleError(null,mxResources.get("errorLoadingFile"),n)})))}else(null==window.location.hash||window.location.hash.length<=1)&&null!=urlParams.state&&null!=this.stateArg&&"open"==this.stateArg.action?null!=this.stateArg.ids&&(window.history&&window.history.replaceState&&window.history.replaceState(null,null,window.location.pathname+this.getSearch(["state"])),window.location.hash="G"+this.stateArg.ids[0]):(null==win