UNPKG

@zklogic/draw.io

Version:

Draw.IO - Graph Editor integration in Angular-cli

1 lines 31.8 kB
!function(r,a){"object"==typeof exports&&"object"==typeof module?module.exports=a():"function"==typeof define&&define.amd?define("grapheditor",[],a):"object"==typeof exports?exports.grapheditor=a():r.grapheditor=a()}(this,(function(){return(()=>{var r={484:()=>{if(window.urlParams=window.urlParams||{},window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760,window.MAX_AREA=window.MAX_AREA||225e6,window.EXPORT_URL=window.EXPORT_URL||"/export",window.SAVE_URL=window.SAVE_URL||"/save",window.OPEN_URL=window.OPEN_URL||"/open",window.RESOURCES_PATH=window.RESOURCES_PATH||"mxgraph/resources",window.STENCIL_PATH=window.STENCIL_PATH||"mxgraph/stencils",window.IMAGE_PATH=window.IMAGE_PATH||"mxgraph/images",window.STYLE_PATH=window.STYLE_PATH||"mxgraph/styles",window.CSS_PATH=window.CSS_PATH||"mxgraph/styles",window.OPEN_FORM=window.OPEN_FORM||"open.html",window.mxBasePath=window.mxBasePath||"mxgraph/",window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images",window.imageBasePath=window.imageBasePath||"mxgraph/images",window.mxLanguage=window.mxLanguage||urlParams.lang,window.isLocalStorage=window.isLocalStorage||!1,window.mxLoadSettings=window.mxLoadSettings||"1"!=urlParams.configure,window.isSvgBrowser=!0,window.DRAWIO_BASE_URL=window.DRAWIO_BASE_URL||"mxgraph/grapheditor",window.DRAW_MATH_URL=window.DRAW_MATH_URL||"mxgraph/grapheditor/math",window.SHAPES_PATH=window.SHAPES_PATH||"mxgraph/shapes",window.GRAPH_IMAGE_PATH=window.GRAPH_IMAGE_PATH||"mxgraph/img",window.ICONSEARCH_PATH=window.ICONSEARCH_PATH||((null!=navigator.userAgent&&navigator.userAgent.indexOf("MSIE")>=0||urlParams.dev)&&"file:"!=window.location.protocol?"iconSearch":window.DRAWIO_BASE_URL+"/iconSearch"),window.TEMPLATE_PATH=window.TEMPLATE_PATH||"mxgraph/templates",window.NEW_DIAGRAM_CATS_PATH=window.NEW_DIAGRAM_CATS_PATH||"mxgraph/newDiagramCats",window.PLUGINS_BASE_PATH=window.PLUGINS_BASE_PATH||"",window.RESOURCES_PATH=window.RESOURCES_PATH||"mxgraph/resources",window.RESOURCE_BASE=window.RESOURCE_BASE||RESOURCES_PATH+"/dia",window.DRAWIO_CONFIG=window.DRAWIO_CONFIG||null,window.mxLoadResources=window.mxLoadResources||!1,window.mxLanguageMap=window.mxLanguageMap||{i18n:"",id:"Bahasa Indonesia",ms:"Bahasa Melayu",bs:"Bosanski",bg:"Bulgarian",ca:"Català",cs:"Čeština",da:"Dansk",de:"Deutsch",et:"Eesti",en:"English",es:"Español",eu:"Euskara",fil:"Filipino",fr:"Français",gl:"Galego",it:"Italiano",hu:"Magyar",nl:"Nederlands",no:"Norsk",pl:"Polski","pt-br":"Português (Brasil)",pt:"Português (Portugal)",ro:"Română",fi:"Suomi",sv:"Svenska",vi:"Tiếng Việt",tr:"Türkçe",el:"Ελληνικά",ru:"Русский",sr:"Српски",uk:"Українська",he:"עברית",ar:"العربية",fa:"فارسی",th:"ไทย",ko:"한국어",ja:"日本語",zh:"简体中文","zh-tw":"繁體中文"},void 0===window.mxBasePath&&(window.mxBasePath="mxgraph",window.mxImageBasePath="mxgraph/images"),null==window.mxLanguages)for(var r in window.mxLanguages=[],mxLanguageMap)"en"!=r&&window.mxLanguages.push(r);"1"==urlParams.extAuth&&/((iPhone|iPod|iPad).*AppleWebKit(?!.*Version)|; wv)/i.test(navigator.userAgent)&&(urlParams.gapi="0",urlParams.noDevice="1","1"!=urlParams.lightbox&&(urlParams.lightbox="1",urlParams.layers="1",urlParams.viewerOnlyMsg="1")),"1"==urlParams.lightbox&&(urlParams.chrome="0"),"1"==urlParams.embedInline&&(urlParams.embed="1",urlParams.ui="sketch",urlParams.plugins="0",urlParams.proto="json",urlParams.prefetchFonts="1"),window.uiTheme=window.uiTheme||function(){var r=urlParams.ui;if("1"==urlParams.extAuth&&(r="sketch"),null==r&&isLocalStorage&&"undefined"!=typeof JSON&&"1"!=urlParams.lightbox)try{var a=localStorage.getItem(".drawio-config");null!=a&&(r=JSON.parse(a).ui||null)}catch(r){isLocalStorage=!1}try{null==r&&(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)<=768&&(null==urlParams.pages&&(urlParams.pages="1"),r="sketch")}catch(r){}return"sketch"==r&&(urlParams.sketch="1",r="min"),r}(),function(){if("undefined"!=typeof JSON&&isLocalStorage)try{var r=localStorage.getItem(".drawio-config"),a=!0;null!=r&&(a=JSON.parse(r).showStartScreen),0==a&&(urlParams.splash="0")}catch(r){}var i=urlParams.export;null!=i&&("http://"!=(i=decodeURIComponent(i)).substring(0,7)&&"https://"!=i.substring(0,8)&&(i="http://"+i),EXPORT_URL=i);var e=urlParams.gitlab;null!=e&&("http://"!=(e=decodeURIComponent(e)).substring(0,7)&&"https://"!=e.substring(0,8)&&(e="http://"+e),DRAWIO_GITLAB_URL=e);var t=urlParams["gitlab-id"];null!=t&&(DRAWIO_GITLAB_ID=t),window.DRAWIO_LOG_URL=window.DRAWIO_LOG_URL||"";var o=window.location.host;if("test.draw.io"!=o){var d,n="diagrams.net",s=o.length-n.length;if(-1!==(d=o.lastIndexOf(n,s))&&d===s)window.DRAWIO_LOG_URL="https://log.diagrams.net";else n="draw.io",s=o.length-n.length,-1!==(d=o.lastIndexOf(n,s))&&d===s&&(window.DRAWIO_LOG_URL="https://log.draw.io")}}(),"1"!=urlParams.offline&&"1"!=urlParams.demo&&"1"!=urlParams.stealth&&"1"!=urlParams.local&&"1"!=urlParams.lockdown||(urlParams.picker="0",urlParams.gapi="0",urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0"),"se.diagrams.net"==window.location.hostname&&(urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0",urlParams.plugins="0",urlParams.mode="google",urlParams.lockdown="1",window.DRAWIO_GOOGLE_APP_ID=window.DRAWIO_GOOGLE_APP_ID||"184079235871",window.DRAWIO_GOOGLE_CLIENT_ID=window.DRAWIO_GOOGLE_CLIENT_ID||"184079235871-pjf5nn0lff27lk8qf0770gmffiv9gt61.apps.googleusercontent.com"),"trello"==urlParams.mode&&(urlParams.tr="1"),"embed.diagrams.net"==window.location.hostname&&(urlParams.embed="1"),(null==window.location.hash||window.location.hash.length<=1)&&null!=urlParams.open&&(window.location.hash=urlParams.open)}},a={};function i(e){var t=a[e];if(void 0!==t)return t.exports;var o=a[e]={exports:{}};return r[e](o,o.exports,i),o.exports}i.n=r=>{var a=r&&r.__esModule?()=>r.default:()=>r;return i.d(a,{a}),a},i.d=(r,a)=>{for(var e in a)i.o(a,e)&&!i.o(r,e)&&Object.defineProperty(r,e,{enumerable:!0,get:a[e]})},i.o=(r,a)=>Object.prototype.hasOwnProperty.call(r,a),i.r=r=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})};var e={};return(()=>{"use strict";function r(r){return function(r){if(Array.isArray(r))return a(r)}(r)||function(r){if("undefined"!=typeof Symbol&&null!=r[Symbol.iterator]||null!=r["@@iterator"])return Array.from(r)}(r)||function(r,i){if(r){if("string"==typeof r)return a(r,i);var e=Object.prototype.toString.call(r).slice(8,-1);return"Object"===e&&r.constructor&&(e=r.constructor.name),"Map"===e||"Set"===e?Array.from(r):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?a(r,i):void 0}}(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(r,a){(null==a||a>r.length)&&(a=r.length);for(var i=0,e=new Array(a);i<a;i++)e[i]=r[i];return e}function t(r){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(r){return typeof r}:function(r){return r&&"function"==typeof Symbol&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},t(r)}function o(r,a){for(var i=0;i<a.length;i++){var e=a[i];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(r,e.key,e)}}function d(r,a,i){return a in r?Object.defineProperty(r,a,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[a]=i,r}i.r(e),i.d(e,{ActionType:()=>n,getImageSrc:()=>s,GraphEditor:()=>p}),i(484),window.graphEditorRefCount=0,window.webpackScripts=[],window.windowKeysBackup=[],window.grapheditorKeysDefault=["webpackScripts","graphEditorRefCount","windowKeysBackup","grapheditorKeysDefault","grapheditorKeys","grapheditor","onDestroy"],window.grapheditorKeys=[],window.mxScriptsLoaded=!1,window.mxWinLoaded=!1,window.mxscript=function(r,a,i,e,t){if(console.log("mxscript",r,a,i,e,t),"1"!=urlParams.dev&&"function"==typeof document.createElement("canvas").getContext||null!=a||t){var o=document.createElement("script");if(o.setAttribute("type","text/javascript"),o.setAttribute("defer","true"),o.setAttribute("src",r),null!=i&&o.setAttribute("id",i),null!=e&&o.setAttribute("data-app-key",e),null!=a){var d=!1;o.onload=o.onreadystatechange=function(){d||this.readyState&&"complete"!=this.readyState||(d=!0,a())}}var n=document.getElementsByTagName("script")[0];null!=n&&n.parentNode.insertBefore(o,n)}else document.write('<script src="'+r+'"'+(null!=i?' id="'+i+'" ':"")+(null!=e?' data-app-key="'+e+'" ':"")+"><\/script>")};var n={DEFAULT:"default",CUSTOM:"custom",IMPORT:"import_OptIn",EXPORT:"export_OptOut",EXPORTSVG:"export_SvG_OptOut",NEW:"new_OptNew",OPEN:"open_OptIn"};function s(r,a){return"data:"+r+";base64,"+a}var p=function(){function a(){!function(r,a){if(!(r instanceof a))throw new TypeError("Cannot call a class as a function")}(this,a),d(this,"printSetupActions",{fitWindow:"fitWindow",fitPage:"fitPage",grid:"grid"}),d(this,"hideMenus",{menu:["help","extra"],subMenu:["new","open","editDiagram","save","saveAs","outline","layers","tags","exportPdf","editStyle"]}),d(this,"editorUiObj",void 0)}var i,e;return i=a,e=[{key:"loadScript",value:function(r,a,i){var e=this;return new Promise((function(t,o){if(webpackScripts[r][a].loaded)t({script:a,loaded:!0,status:"Already Loaded"});else{var d=document.createElement("script");d.type="text/javascript",d.src=webpackScripts[r][a].src,d.id=webpackScripts[r][a].name,d.readyState?d.onreadystatechange=function(i){"loaded"!==d.readyState&&"complete"!==d.readyState||(d.onreadystatechange=null,webpackScripts[r][a].loaded=!0,t({script:webpackScripts[r][a],loaded:!0,status:"Loaded"}))}:d.onload=function(i){webpackScripts[r][a].loaded=!0,t({script:webpackScripts[r][a],loaded:!0,status:"Loaded"})},d.onerror=function(i){return t({script:webpackScripts[r][a],loaded:!1,status:"Loaded"})},0==a&&e.backupWindowObject(),i.appendChild(d)}}))}},{key:"backupWindowObject",value:function(){windowKeysBackup=Object.keys(window)}},{key:"pouplateScriptVars",value:function(){var r=Object.keys(window);grapheditorKeys=r.filter((function(r){return!windowKeysBackup.includes(r)})),grapheditorKeys=grapheditorKeys.filter((function(r){return!grapheditorKeysDefault.includes(r)}))}},{key:"addWebScript",value:function(r,a,i,e){null==r&&(r="E"+a.split("/").pop().split(".").shift()),i=null==(i=0==this.isLoadAsync(e)?void 0:i)?webpackScripts.length:i,null==webpackScripts[i]&&(webpackScripts[i]=[]),webpackScripts[i].push({name:r,loaded:!1,src:a})}},{key:"isLoadAsync",value:function(r){return r&&!0===r.loadAsync}},{key:"appendScriptAtIndex",value:function(r,a,i){var e=this;return new Promise((function(t,o){var d=1e3+r;if(null!=webpackScripts[d]&&webpackScripts[d].length>0){var n=[];webpackScripts[d].forEach((function(r,i){n.push(e.loadScript(d,i,a))})),Promise.all(n).then((function(r){console.log("all alone scripts loaded ",d,r)}))}if(null!=webpackScripts[r]){var s=[];webpackScripts[r].forEach((function(i,t){s.push(e.loadScript(r,t,a))})),Promise.all(s).then((function(o){e.appendScriptAtIndex(++r,a,i).then((function(a){a.scriptIndex.push(r),t(a)}))}))}else e.postScript(i),t({scriptLoaded:!0,scriptIndex:[r]})}))}},{key:"init",value:function(r,a){return graphEditorRefCount++,this.addWebScript("aes.min","./mxgraph/grapheditor/cryptojs/aes.min.js",1,a),this.addWebScript("spin.min","./mxgraph/grapheditor/spin/spin.min.js",1,a),this.addWebScript("pako","./mxgraph/grapheditor/deflate/pako.min.js",1,a),this.addWebScript("base64","./mxgraph/grapheditor/deflate/base64.js",1,a),this.addWebScript("jscolor","./mxgraph/grapheditor/jscolor/jscolor.js",1,a),this.addWebScript("html_sanitize","./mxgraph/grapheditor/sanitizer/sanitizer.min.js",1,a),this.addWebScript("croppie.min","./mxgraph/grapheditor/croppie/croppie.min.js",1,a),this.addWebScript("rough.min","./mxgraph/grapheditor/rough/rough.min.js",1,a),this.addWebScript("PreConfig","./mxgraph/grapheditor/PreConfig.js",2,a),this.addWebScript("mxClient","./mxgraph/mxClient.js",3,a),this.addWebScript("Editor","./mxgraph/grapheditor/grapheditor/Editor.js",4,a),this.addWebScript("EditorUi","./mxgraph/grapheditor/grapheditor/EditorUi.js",5,a),this.addWebScript("Sidebar","./mxgraph/grapheditor/grapheditor/Sidebar.js",4,a),this.addWebScript("Graph","./mxgraph/grapheditor/grapheditor/Graph.js",5,a),this.addWebScript("Format","./mxgraph/grapheditor/grapheditor/Format.js",6,a),this.addWebScript("Shapes","./mxgraph/grapheditor/grapheditor/Shapes.js",5,a),this.addWebScript("Actions","./mxgraph/grapheditor/grapheditor/Actions.js",4,a),this.addWebScript("Menus","./mxgraph/grapheditor/grapheditor/Menus.js",6,a),this.addWebScript("Toolbar","./mxgraph/grapheditor/grapheditor/Toolbar.js",4,a),this.addWebScript("Dialogs","./mxgraph/grapheditor/grapheditor/Dialogs.js",4,a),this.addWebScript(void 0,"./mxgraph/grapheditor/diagramly/sidebar/Sidebar.js",7,a),this.addWebScript(void 0,"./mxgraph/grapheditor/diagramly/sidebar/Sidebar-ActiveDirectory.js",1007,a),this.addWebScript(void 0,"./mxgraph/grapheditor/diagramly/sidebar/Sidebar-Advanced.js",1007,a),this.addWebScript(void 0,"./mxgraph/grapheditor/diagramly/sidebar/Sidebar-AlliedTelesis.js",1007,a),this.addWebScript(void 0,"./mxgraph/grapheditor/diagramly/sidebar/Sidebar-Android.js",1007,a),this.addWebScript(void 0,"./mxgraph/grapheditor/diagramly/sidebar/Sidebar-ArchiMate.js",1007,a),this.addWebScript(void 0,"./mxgraph/grapheditor/diagramly/sidebar/Sidebar-ArchiMate3.js",1007,a),this.addWebScript(void 0,"./mxgraph/grapheditor/diagramly/sidebar/Sidebar-Arrows2.js",1007,a),this.addWebScript(void 0,"./mxgraph/grapheditor/diagramly/sidebar/Sidebar-Atlassian.js",1007,a),this.addWebScript(void 0,"./mxgraph/grapheditor/diagramly/sidebar/Sidebar-AWS.js",1007,a),this.addWebScript(void 0,"./mxgraph/grapheditor/diagramly/sidebar/Sidebar-AWS3.js",1007,a),this.addWebScript(void 0,"./mxgraph/grapheditor/diagramly/sidebar/Sidebar-AWS3D.js",1007,a),this.addWebScript(void 0,"./mxgraph/grapheditor/diagramly/sidebar/Sidebar-AWS4.js",1007,a),this.addWebScript(void 0,"./mxgraph/grapheditor/diagramly/sidebar/Sidebar-AWS4b.js",1007,a),this.addWebScript(void 0,"./mxgraph/grapheditor/diagramly/sidebar/Sidebar-Azure.js",1007,a),this.addWebScript(void 0,"./mxgraph/grapheditor/diagramly/sidebar/Sidebar-Azure2.js",1007,a),this.addWebScript(void 0,"./mxgraph/grapheditor/diagramly/sidebar/Sidebar-Basic.js",1007,a),this.addWebScript(void 0,"./mxgraph/grapheditor/diagramly/sidebar/Sidebar-Bootstrap.js",1007,a),this.addWebScript(void 0,"./mxgraph/grapheditor/diagramly/sidebar/Sidebar-BPMN.js",1007,a),this.addWebScript(void 0,"./mxgraph/grapheditor/diagramly/sidebar/Sidebar-C4.js",1007,a),this.addWebScript(void 0,"./mxgraph/grapheditor/diagramly/sidebar/Sidebar-Cabinet.js",1007,a),this.addWebScript(void 0,"./mxgraph/grapheditor/diagramly/sidebar/Sidebar-Cisco.js",1007,a),this.addWebScript(void 0,"./mxgraph/grapheditor/diagramly/sidebar/Sidebar-Cisco19.js",1007,a),this.addWebScript(void 0,"./mxgraph/grapheditor/diagramly/sidebar/Sidebar-CiscoSafe.js",1007,a),this.addWebScript(void 0,"./mxgraph/grapheditor/diagramly/sidebar/Sidebar-Citrix.js",1007,a),this.addWebScript(void 0,"./mxgraph/grapheditor/diagramly/sidebar/Sidebar-Cumulus.js",1007,a),this.addWebScript(void 0,"./mxgraph/grapheditor/diagramly/sidebar/Sidebar-DFD.js",1007,a),this.addWebScript(void 0,"./mxgraph/grapheditor/diagramly/sidebar/Sidebar-EIP.js",1007,a),this.addWebScript(void 0,"./mxgraph/grapheditor/diagramly/sidebar/Sidebar-Electrical.js",1007,a),this.addWebScript(void 0,"./mxgraph/grapheditor/diagramly/sidebar/Sidebar-ER.js",1007,a),this.addWebScript(void 0,"./mxgraph/grapheditor/diagramly/sidebar/Sidebar-Floorplan.js",1007,a),this.addWebScript(void 0,"./mxgraph/grapheditor/diagramly/sidebar/Sidebar-Flowchart.js",1007,a),this.addWebScript(void 0,"./mxgraph/grapheditor/diagramly/sidebar/Sidebar-FluidPower.js",1007,a),this.addWebScript(void 0,"./mxgraph/grapheditor/diagramly/sidebar/Sidebar-GCP.js",1007,a),this.addWebScript(void 0,"./mxgraph/grapheditor/diagramly/sidebar/Sidebar-GCP2.js",1007,a),this.addWebScript(void 0,"./mxgraph/grapheditor/diagramly/sidebar/Sidebar-GCPIcons.js",1007,a),this.addWebScript(void 0,"./mxgraph/grapheditor/diagramly/sidebar/Sidebar-Gmdl.js",1007,a),this.addWebScript(void 0,"./mxgraph/grapheditor/diagramly/sidebar/Sidebar-IBM.js",1007,a),this.addWebScript(void 0,"./mxgraph/grapheditor/diagramly/sidebar/Sidebar-Infographic.js",1007,a),this.addWebScript(void 0,"./mxgraph/grapheditor/diagramly/sidebar/Sidebar-Ios.js",1007,a),this.addWebScript(void 0,"./mxgraph/grapheditor/diagramly/sidebar/Sidebar-Ios7.js",1007,a),this.addWebScript(void 0,"./mxgraph/grapheditor/diagramly/sidebar/Sidebar-Kubernetes.js",1007,a),this.addWebScript(void 0,"./mxgraph/grapheditor/diagramly/sidebar/Sidebar-LeanMapping.js",1007,a),this.addWebScript(void 0,"./mxgraph/grapheditor/diagramly/sidebar/Sidebar-Mockup.js",1007,a),this.addWebScript(void 0,"./mxgraph/grapheditor/diagramly/sidebar/Sidebar-MSCAE.js",1007,a),this.addWebScript(void 0,"./mxgraph/grapheditor/diagramly/sidebar/Sidebar-Network.js",1007,a),this.addWebScript(void 0,"./mxgraph/grapheditor/diagramly/sidebar/Sidebar-Office.js",1007,a),this.addWebScript(void 0,"./mxgraph/grapheditor/diagramly/sidebar/Sidebar-PID.js",1007,a),this.addWebScript(void 0,"./mxgraph/grapheditor/diagramly/sidebar/Sidebar-Rack.js",1007,a),this.addWebScript(void 0,"./mxgraph/grapheditor/diagramly/sidebar/Sidebar-Signs.js",1007,a),this.addWebScript(void 0,"./mxgraph/grapheditor/diagramly/sidebar/Sidebar-Sitemap.js",1007,a),this.addWebScript(void 0,"./mxgraph/grapheditor/diagramly/sidebar/Sidebar-Sysml.js",1007,a),this.addWebScript(void 0,"./mxgraph/grapheditor/diagramly/sidebar/Sidebar-ThreatModeling.js",1007,a),this.addWebScript(void 0,"./mxgraph/grapheditor/diagramly/sidebar/Sidebar-UML25.js",1007,a),this.addWebScript(void 0,"./mxgraph/grapheditor/diagramly/sidebar/Sidebar-Veeam.js",1007,a),this.addWebScript(void 0,"./mxgraph/grapheditor/diagramly/sidebar/Sidebar-Veeam2.js",1007,a),this.addWebScript(void 0,"./mxgraph/grapheditor/diagramly/sidebar/Sidebar-VVD.js",1007,a),this.addWebScript(void 0,"./mxgraph/grapheditor/diagramly/sidebar/Sidebar-WebIcons.js",1007,a),this.addWebScript(void 0,"./mxgraph/grapheditor/diagramly/util/mxJsCanvas.js",8,a),this.addWebScript(void 0,"./mxgraph/grapheditor/diagramly/util/mxAsyncCanvas.js",8,a),this.addWebScript(void 0,"./mxgraph/grapheditor/diagramly/DrawioFile.js",8,a),this.addWebScript(void 0,"./mxgraph/grapheditor/diagramly/LocalFile.js",9,a),this.addWebScript(void 0,"./mxgraph/grapheditor/diagramly/LocalLibrary.js",10,a),this.addWebScript(void 0,"./mxgraph/grapheditor/diagramly/StorageFile.js",10,a),this.addWebScript(void 0,"./mxgraph/grapheditor/diagramly/StorageLibrary.js",11,a),this.addWebScript(void 0,"./mxgraph/grapheditor/diagramly/RemoteFile.js",10,a),this.addWebScript(void 0,"./mxgraph/grapheditor/diagramly/RemoteLibrary.js",10,a),this.addWebScript(void 0,"./mxgraph/grapheditor/diagramly/EmbedFile.js",10,a),this.addWebScript(void 0,"./mxgraph/grapheditor/diagramly/Dialogs.js",8,a),this.addWebScript(void 0,"./mxgraph/grapheditor/diagramly/Editor.js",8,a),this.addWebScript(void 0,"./mxgraph/webpackExtensions/draw.io.EditorUi.js",9,a),this.addWebScript(void 0,"./mxgraph/grapheditor/diagramly/DiffSync.js",7,a),this.addWebScript(void 0,"./mxgraph/grapheditor/diagramly/Settings.js",7,a),this.addWebScript(void 0,"./mxgraph/grapheditor/diagramly/DrawioFileSync.js",7,a),this.addWebScript(void 0,"./mxgraph/grapheditor/diagramly/DrawioComment.js",7,a),this.addWebScript(void 0,"./mxgraph/grapheditor/diagramly/DriveComment.js",8,a),this.addWebScript(void 0,"./mxgraph/grapheditor/diagramly/DrawioClient.js",7,a),this.addWebScript(void 0,"./mxgraph/grapheditor/diagramly/DrawioUser.js",7,a),this.addWebScript(void 0,"./mxgraph/webpackExtensions/draw.io.app.js",12,a),this.addWebScript(void 0,"./mxgraph/webpackExtensions/draw.io.menu.js",12,a),this.addWebScript(void 0,"./mxgraph/grapheditor/diagramly/Pages.js",12,a),this.addWebScript(void 0,"./mxgraph/grapheditor/diagramly/Trees.js",12,a),this.addWebScript(void 0,"./mxgraph/grapheditor/diagramly/Minimal.js",12,a),this.addWebScript(void 0,"./mxgraph/grapheditor/diagramly/DistanceGuides.js",12,a),this.addWebScript(void 0,"./mxgraph/grapheditor/diagramly/mxRuler.js",12,a),this.addWebScript(void 0,"./mxgraph/grapheditor/diagramly/mxFreehand.js",12,a),this.addWebScript(void 0,"./mxgraph/grapheditor/diagramly/DevTools.js",12,a),this.addWebScript(void 0,"./mxgraph/grapheditor/diagramly/vsdx/VsdxExport.js",9,a),this.addWebScript(void 0,"./mxgraph/grapheditor/diagramly/vsdx/mxVsdxCanvas2D.js",9,a),this.addWebScript(void 0,"./mxgraph/grapheditor/diagramly/vsdx/bmpDecoder.js",9,a),this.addWebScript(void 0,"./mxgraph/grapheditor/diagramly/vsdx/importer.js",9,a),this.addWebScript(void 0,"./mxgraph/grapheditor/jszip/jszip.min.js",9,a),this.addWebScript(void 0,"./mxgraph/grapheditor/diagramly/graphml/mxGraphMlCodec.js",9,a),this.addWebScript(void 0,"./mxgraph/grapheditor/diagramly/P2PCollab.js",9,a),!0===a.orgChartDev&&(this.addWebScript(void 0,"./mxgraph/grapheditor/orgchart/bridge.min.js",9,a),this.addWebScript(void 0,"./mxgraph/grapheditor/orgchart/bridge.collections.min.js",1010,a),this.addWebScript(void 0,"./mxgraph/grapheditor/orgchart/OrgChart.Layout.min.js",1010,a),this.addWebScript(void 0,"./mxgraph/grapheditor/orgchart/mxOrgChartLayout.js",1010,a)),this.addWebScript(void 0,"./mxgraph/grapheditor/shapes-14-6-5.min.js",9,a),this.addWebScript(void 0,"./mxgraph/grapheditor/stencils.min.js",1004,a),this.addWebScript(void 0,"./mxgraph/grapheditor/extensions.min.js",1011,a),this.addWebScript(void 0,"./mxgraph/webpackExtensions/draw.io.extension.js",12,a),this.appendScriptAtIndex(1,r,a)}},{key:"preScript",value:function(r){void 0!==r.extraActions&&Object.keys(r.extraActions).forEach((function(a){"object"===t(r.extraActions[a])&&Object.keys(r.extraActions[a]).forEach((function(i){void 0!==r.extraActions[a][i].callback&&"function"==typeof r.extraActions[a][i].callback&&Menus.prototype.defaultMenuItems.filter((function(r){return r==a})).length<1&&Menus.prototype.defaultMenuItems.push(a)}))}))}},{key:"activateSideBar",value:function(r){try{var a=["general","basic","uml","er","arrows2","flowchart","misc","advanced"];setTimeout((function(){a.forEach((function(a,i){var e=r.sidebar.palettes[a];e&&e[0]&&"none"==e[0].style.display&&(e[0].style.display="block"),e&&e[1]&&"none"==e[1].style.display&&(e[1].style.display="block"),0==i&&e&&e[1]&&"none"==e[1].children[0].style.display&&(e[1].children[0].style.display="block")}))}),15)}catch(r){console.log(r)}}},{key:"postScript",value:function(r){this.preScript(r),DrawIOExtension(r),document.body.className+=" geEditor";var a=this;r.navitgateToUrl?Editor.prototype.editBlankUrl=r.navitgateToUrl:Editor.prototype.editBlankUrl="";var i=Menus.prototype.createMenubar;Menus.prototype.createMenubar=function(e){var t=this;return a.hideMenus.menu.forEach((function(a){void 0!==r&&null!=r.actions&&null!=r.actions.menu&&void 0!==r.actions.menu[a]&&!1!==r.actions.menu[a]||(t.defaultMenuItems=t.defaultMenuItems.filter((function(r){return r.toLowerCase()!=a})))})),i.apply(this,arguments)};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){var i=this;e.apply(this,arguments),a.hideMenus.subMenu.forEach((function(a){void 0!==r&&void 0!==r.actions&&void 0!==r.actions.subMenu&&void 0!==r.actions.subMenu[a]&&r.actions.subMenu[a]instanceof Function||i.actions.removeAction(a)}))},EditorUi.prototype.openFile=function(){try{r.actions.subMenu.open().then((function(r){console.log("openFile:resolve",r),a.setGrapheditorData(r.graphData)}),(function(r){console.log("openFile:reject",r)})).catch((function(r){console.log(r)}))}catch(r){}},EditorUi.prototype.performCallbackForAction=function(r){console.log("getCallback",r)},App.prototype.saveFile=function(a,i){var e=this.getCurrentFile();if(null!=e){var t=mxUtils.bind(this,(function(){EditorUi.enableDrafts&&e.removeDraft(),this.getCurrentFile()==e||e.isModified()||this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved")))})),o=null!=e.getTitle()?e.getTitle():this.defaultFilename,d=this.getFileData(!0);try{var n=this.editor.graph.getSvg(null,1,"0",!0,null,!0,null,null,null,null,!0,null,"diagram");n.setAttribute("content",this.getFileData(!0,null,null,null,!0,!0,null,null,null,!1));var s=Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(n),p=btoa(unescape(encodeURIComponent(s)));r&&r.actions&&r.actions.subMenu&&r.actions.subMenu.save&&r.actions.subMenu.save({xml:d,name:o,svg:s,image:{base64Encoded:p,mimeType:"image/svg+xml"}}).then((function(r){t()}),(function(r){console.log("saveGraphEditor:reject",r)})).catch((function(r){console.log(r)}))}catch(r){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("errorSavingFile")))}}}}},{key:"setGrapheditorData",value:function(r){var a=this;return new Promise((function(i,e){try{a.editorUiObj.openLocalFile(r.xml,r.name,!1),i({status:"Loaded",graphData:r})}catch(a){e({status:"Failed",reason:a,graphData:r})}}))}},{key:"getMenuList",value:function(){var a=new DrawIOExtension;return{menu:r(a.menuList),subMenu:r(a.subMenuList)}}},{key:"initialized",value:function(a,i,e){var t=this;return new Promise((function(o,d){t.init(i,e).then((function(i){t.pouplateScriptVars(),App.main((function(a){DrawIOOverridUpdateBody(a,e),DrawIOOverridExport(e,a),t.editorUiObj=a,null!=a&&null!=a.actions&&null!=a.actions.actions&&(DrawIOExtension.prototype.subMenuList=r(Object.keys(a.actions.actions))),t.activateSideBar(a),o({status:"Initialized",graphEditorObj:a,config:e})}),null,a)}),(function(r){console.log("grapheditor-init:reject",r),d({status:"Failed",reason:r}),d(r)})).catch((function(r){console.log(r),d({status:"Failed",reason:r})}))}))}},{key:"destroyGrapheditor",value:function(){new Promise((function(r,a){if(graphEditorRefCount--,graphEditorRefCount>0)r({graphEditorRefCount,status:"Running graph-editor instances ".concat(graphEditorRefCount)});else{try{grapheditorKeys.forEach((function(r){void 0!==window[r]&&delete window[r]}))}catch(r){console.log(r)}r({graphEditorRefCount,status:"Running graph-editor instances ".concat(graphEditorRefCount)})}}))}}],e&&o(i.prototype,e),Object.defineProperty(i,"prototype",{writable:!1}),a}();if("undefined"!=typeof isWebpack){var l='<mxfile host="" modified="2021-12-06T19:31:46.338Z" agent="5.0 (Windows)" etag="pzJbhBRwLw9TT0dpwoMQ" version="@DRAWIO-VERSION@" type="device" pages="3"><diagram id="AyI7jbf7Y4loTYQYZaz9" name="Page-1">xVbBjpswEP0ajq3AkDa9bpLdPWxVpEjt7tGBKTg1DHJMgH59DdgYliZNupFWihTmeQzjN28eOP4qqx8ELdKvGAN3iBvXjr92CPECQpz258ZNj/hB0AOJYLFOssCW/QYNuhotWQyHSaJE5JIVUzDCPIdITjAqBFbTtJ/Ip08taAIzYBtRPkd/sFimPbpcuBZ/BJak5smeq1cyapI1cEhpjNUI8jeOvxKIsr/K6hXwljzDS7/v/sTqUJiAXF6yYf8tJJ93xa99yB8JJqG79PMPuhkH2ZgDQ6zOr0MUMsUEc8o3Fr0TWOYxtHd1VWRznhALBXoK3IOUjW4mLSUqKJUZ16uqYNE86/1d8NIGHxcmXNfjxXWjo/mJNQkHLEUEZ45plENFAvJMnt/ntRyMHqD5fADMQNWjEgRwKtlxqhGqpZYMecPWEJkqmbh6LIIvWhNmKIxGzC36QvUu21N1MSrDQl2nr+i6LvhIeamPMJOBUmvRXsYYlVnH912VMgnbgnZMV2rcp13d9bJ42hngZLuOICTUZwk2q5+mRBEzd5WdRc+Ql47mcOme7smEzWupI5dTJ7u/f9F2A5YGi9EsBcGFLA1mdXOaFu/iKzWTz9ZJVPQyWrGm0gbGUwYv8q7zoi4KQTDFF4g3G5R/oUGRWxvUm7rsz4bhuxItU29Pha4wl5TlipzZgFQs4zSH26g/eO0RZK5+4v5F/eQ/1K9C+8bu7dh+9/ibPw==</diagram><diagram id="rl1k0B-hDyAjVCUa-9g7" name="Page-2">rZPbToQwEIafhksTStF4LeDhQhODh+uGjm21UNLtCuzTW5YpB/fCbGJCwszX6ZT+/xDRrO7vLGvlo+GgoyTmfUTzKElImiTR+MR8mAhN0wkIqzgWLaBUB0AYI90rDrtNoTNGO9VuYWWaBiq3Ycxa023LPozentoyASegrJg+pe+KOznR68t44feghAwnkxhXahaKEewk46ZbIVpENLPGuCmq+wz0KF7Q5fnhxbwWw5P4fDsUeS6UJF8XU7Pbc7bMV7DQuP9tjeZ+M71HvfCubggC+mu3Y+iOr5tOKgdly6qRdX5mPJOu1j4jPsR+YB30vwz44+vJLKmfRTA1ODv4fdiFXqELOIaEYt4tppLglFwbGvxkOEhi7r2I5QPUK6SLrce11c9Bix8=</diagram><diagram id="qJsf2gRpfi9BWSCdwc7R" name="Page-3">rZNNb4MwDIZ/DcdKQNjGuR/rpGmHiUnVdouIS6IFglJTYL9+oThQ1sM0aRIH+4njyO9rArYpu73ltXwxAnQQh6IL2DaI4yiJ42D4QtGPhCXJCAqrBBXNIFNfQDAk2igBp0UhGqNR1UuYm6qCHBeMW2vaZdnR6OWrNS/gBmQ517f0oATKkaZ34cyfQBXSvxyFdFJyX0zgJLkw7RViu4BtrDE4RmW3AT2I53X5ODev5fs2Odh0df8M67do/7kamz3+5co0goUK/7c1mXvmuiG9aFbsvYBu7HoIBUeeobEXvdetVAhZzfPhqHWr45jEUrsscuFRdeCXYcjpGbAI3Q9ffhkqmpR2KwqmBLS9u0dd2AOZ0/t9pbydvZ4clVc+p8Q4rVcxtZ4ldAGp6NPZ7MvZ1S/Ddt8=</diagram></mxfile>',c=new p;c.initialized(document.getElementById("mxgraph-diagram-container"),document.getElementById("mxgraph-scripts-container"),{navitgateToUrl:"https://public_url/route/path",orgChartDev:!1,loadAsync:!0,svgStyle:{fillColor:"rgb(255, 255, 255)",strokeColor:"rgb(0, 0, 0)"},actionsButtons:{"Export Library":{actionType:n.EXPORT,callback:function(r){return new Promise((function(a,i){a({status:"Dwp Library Implementation required",graphData:r})}))},callbackOnError:function(r){return new Promise((function(a,i){a({status:"Dwp Library import error Implementation required",graphData:r})}))},style:{backgroundColor:"#4d90fe",border:"1px solid #3079ed",backgroundImage:"linear-gradient(#4d90fe 0,#4787ed 100%)",height:"29px",lineHeight:"27px"}},"Import Library":{title:"btn title",className:"extended btnImport",actionType:n.IMPORT,callback:function(){return new Promise((function(r,a){r({status:"Dwp Library import Implementation required",graphData:{xml:l,name:"import from func"}})}))},callbackOnFinish:function(r){return new Promise((function(a,i){a({status:"Dwp Library import finish Implementation required",graphData:r})}))}}},extraActions:{file:{test:{actionType:n.NEW,callback:function(){return new Promise((function(r,a){r({status:"test Open From TS Func"})}))}},test2:{actionType:n.OPEN,callback:function(){return new Promise((function(r,a){r({status:"test2 Implementation required",graphData:{xml:l,name:"import from func"}})}))}},exportAs:{"Dwp Library":{actionType:n.EXPORT,callback:function(r){return new Promise((function(a,i){a({status:"Dwp Library Implementation required",graphData:r})}))},callbackOnError:function(r){return new Promise((function(a,i){a({status:"Dwp Library import error Implementation required",graphData:r})}))}}},importFrom:{"Dwp Library":{actionType:n.IMPORT,callback:function(){return new Promise((function(r,a){r({status:"Dwp Library import Implementation required",graphData:{xml:l,name:"import from func"}})}))},callbackOnFinish:function(r){return new Promise((function(a,i){a({status:"Dwp Library import finish Implementation required",graphData:r})}))}}}},setting:{actionType:n.EXPORTSVG,callback:function(r){return new Promise((function(a,i){a({status:"Dwp Library EXPORTSVG Implementation required",graphData:r})}))},callbackOnError:function(r){return new Promise((function(a,i){a({status:"Dwp Library EXPORTSVG error Implementation required",graphData:r})}))}},ex:{testSvg:{actionType:n.EXPORTSVG,callback:function(r){return new Promise((function(a,i){a({status:"Dwp Library EXPORTSVG Implementation required",graphData:r})}))},callbackOnError:function(r){return new Promise((function(a,i){a({status:"Dwp Library EXPORTSVG error Implementation required",graphData:r})}))}}}},actions:{subMenu:{open:function(){return new Promise((function(r,a){r({status:"Open From TS Func",graphData:{xml:l}})}))},save:function(r){return new Promise((function(a,i){a({status:"Implementation required",graphData:r})}))}}}}).then((function(r){console.log("init",r);var a=c.getMenuList();console.log("menuList",a.menu.sort(),a.subMenu.sort()),c.setGrapheditorData({xml:l,name:"data init"}).then((function(r){console.log("setGraphEditor",r)}),(function(r){console.log("setGraphEditor",r)})).catch((function(r){console.log("setGraphEditor",r)}))}),(function(r){console.log("init",r)})).catch((function(r){console.log("init",r)}))}})(),e})()}));