@zklogic/draw.io
Version:
Draw.IO - Graph Editor integration in Angular-cli
1 lines • 64.2 kB
JavaScript
EditorUi.initMinimalTheme=function(){if("1"!=urlParams.lightbox&&"0"!=urlParams.chrome&&void 0!==window.Format&&void 0!==window.Menus){var e=0;try{e=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}catch(e){}var t=function(e,t,i,n,o,r,a){e.editor.graph;var s=document.createElement("div");s.className="geSidebarContainer",s.style.position="absolute",s.style.width="100%",s.style.height="100%",s.style.border="1px solid whiteSmoke",s.style.overflowX="hidden",s.style.overflowY="auto",a(s),this.window=new mxWindow(t,s,i,n,o,r,!0,!0),this.window.destroyOnClose=!1,this.window.setMaximizable(!1),this.window.setResizable(!0),this.window.setClosable(!0),this.window.setVisible(!0),this.window.setLocation=function(e,t){var i=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,n=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,o=this.table.firstChild.firstChild.firstChild;e=Math.max(0,Math.min(e,i-o.clientWidth-2)),t=Math.max(0,Math.min(t,n-o.clientHeight-2)),this.getX()==e&&this.getY()==t||mxWindow.prototype.setLocation.apply(this,arguments)},mxClient.IS_SF&&(this.window.div.onselectstart=mxUtils.bind(this,(function(t){return null==t&&(t=window.event),null!=t&&e.isSelectionAllowed(t)})))};Editor.checkmarkImage=Graph.createSvgImage(22,18,'<path transform="translate(4 0)" d="M7.181,15.007a1,1,0,0,1-.793-0.391L3.222,10.5A1,1,0,1,1,4.808,9.274L7.132,12.3l6.044-8.86A1,1,0,1,1,14.83,4.569l-6.823,10a1,1,0,0,1-.8.437H7.181Z" fill="#29b6f2"/>').src,mxWindow.prototype.closeImage=Graph.createSvgImage(18,10,'<path d="M 5 1 L 13 9 M 13 1 L 5 9" stroke="#C0C0C0" stroke-width="2"/>').src,mxWindow.prototype.minimizeImage=Graph.createSvgImage(14,10,'<path d="M 3 7 L 7 3 L 11 7" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src,mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,10,'<path d="M 3 3 L 7 7 L 11 3" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src,mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke-width="2" style="stroke-opacity:0.4" stroke="#ffffff"/><path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="#29b6f2"/>'),mxOutline.prototype.sizerImage=null,mxConstants.VERTEX_SELECTION_COLOR="#C0C0C0",mxConstants.EDGE_SELECTION_COLOR="#C0C0C0",mxConstants.CONNECT_HANDLE_FILLCOLOR="#cee7ff",mxConstants.DEFAULT_VALID_COLOR="#29b6f2",mxConstants.GUIDE_COLOR="#C0C0C0",mxConstants.HIGHLIGHT_STROKEWIDTH=5,mxConstants.HIGHLIGHT_OPACITY=35,mxConstants.OUTLINE_COLOR="#29b6f2",mxConstants.OUTLINE_HANDLE_FILLCOLOR="#29b6f2",mxConstants.OUTLINE_HANDLE_STROKECOLOR="#fff",Graph.prototype.svgShadowColor="#3D4574",Graph.prototype.svgShadowOpacity="0.4",Graph.prototype.svgShadowSize="0.6",Graph.prototype.svgShadowBlur="1.2",Format.inactiveTabBackgroundColor="#f0f0f0",mxGraphHandler.prototype.previewColor="#C0C0C0",mxRubberband.prototype.defaultOpacity=50,HoverIcons.prototype.inactiveOpacity=25,Format.prototype.showCloseButton=!1,EditorUi.prototype.closableScratchpad=!1,EditorUi.prototype.toolbarHeight="1"==urlParams.sketch?1:46,EditorUi.prototype.footerHeight=0,Graph.prototype.editAfterInsert="1"!=urlParams.sketch&&!mxClient.IS_IOS&&!mxClient.IS_ANDROID,EditorUi.prototype.setDarkMode=function(e){this.spinner.spin(document.body,mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,(function(){this.spinner.stop(),this.doSetDarkMode(e),null==urlParams.dark&&(mxSettings.settings.darkMode=e,mxSettings.save()),this.fireEvent(new mxEventObject("darkModeChanged"))})),0)};var i=document.createElement("link");i.setAttribute("rel","stylesheet"),i.setAttribute("href",STYLE_PATH+"/dark.css"),i.setAttribute("charset","UTF-8"),i.setAttribute("type","text/css"),EditorUi.prototype.doSetDarkMode=function(e){if(Editor.darkMode!=e){var t=this.editor.graph;if(Editor.darkMode=e,this.spinner.opts.color=Editor.isDarkMode()?"#c0c0c0":"#000",this.setGridColor(Editor.isDarkMode()?t.view.defaultDarkGridColor:t.view.defaultGridColor),t.defaultPageBackgroundColor="1"==urlParams.embedInline?"transparent":Editor.isDarkMode()?Editor.darkColor:"#ffffff",t.defaultPageBorderColor=Editor.isDarkMode()?"#505759":"#ffffff",t.shapeBackgroundColor=Editor.isDarkMode()?Editor.darkColor:"#ffffff",t.shapeForegroundColor=Editor.isDarkMode()?Editor.lightColor:"#000000",t.defaultThemeName=Editor.isDarkMode()?"darkTheme":"default-style2",t.graphHandler.previewColor=Editor.isDarkMode()?"#cccccc":"black",document.body.style.backgroundColor="1"==urlParams.embedInline?"transparent":Editor.isDarkMode()?Editor.darkColor:"#ffffff",t.loadStylesheet(),null!=this.actions.layersWindow){var o=this.actions.layersWindow.window.isVisible();this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.destroy(),this.actions.layersWindow=null,o&&window.setTimeout(this.actions.get("layers").funct,0)}null!=this.menus.commentsWindow&&(this.menus.commentsWindow.window.setVisible(!1),this.menus.commentsWindow.destroy(),this.menus.commentsWindow=null),null!=this.ruler&&this.ruler.updateStyle(),Graph.prototype.defaultPageBackgroundColor=t.defaultPageBackgroundColor,Graph.prototype.defaultPageBorderColor=t.defaultPageBorderColor,Graph.prototype.shapeBackgroundColor=t.shapeBackgroundColor,Graph.prototype.shapeForegroundColor=t.shapeForegroundColor,Graph.prototype.defaultThemeName=t.defaultThemeName,StyleFormatPanel.prototype.defaultStrokeColor=Editor.isDarkMode()?"#cccccc":"black",BaseFormatPanel.prototype.buttonBackgroundColor=Editor.isDarkMode()?Editor.darkColor:"white",Format.inactiveTabBackgroundColor=Editor.isDarkMode()?"black":"#f0f0f0",Dialog.backdropColor=Editor.isDarkMode()?Editor.darkColor:"white",mxConstants.DROP_TARGET_COLOR=Editor.isDarkMode()?"#00ff00":"#0000FF",Editor.helpImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkHelpImage:Editor.lightHelpImage,Editor.checkmarkImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkCheckmarkImage:Editor.lightCheckmarkImage,n.innerHTML=Editor.createMinimalCss(),Editor.darkMode?null==i.parentNode&&document.getElementsByTagName("head")[0].appendChild(i):null!=i.parentNode&&i.parentNode.removeChild(i)}},Editor.createMinimalCss=function(){return"* { -webkit-font-smoothing: antialiased; }html body td.mxWindowTitle > div > img { padding: 8px 4px; }"+(Editor.isDarkMode()?"html body td.mxWindowTitle > div > img { margin: -4px; }html body .geToolbarContainer .geMenuItem, html body .geToolbarContainer .geToolbarButton, html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem,html body .geMenubarContainer .geToolbarButton { filter: invert(1); }html body div.geToolbarContainer a.geInverted { filter: none; }html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem { color: #353535; }html > body > div > .geToolbarContainer { border: 1px solid #c0c0c0 !important; box-shadow: none !important; }html > body.geEditor > div > a.geItem { background-color: #2a2a2a; color: #cccccc; border-color: #505759; }html body .geTabContainer, html body .geTabContainer div, html body .geMenubarContainer { border-color: #505759 !important; }html body .mxCellEditor { color: #f0f0f0; }":"html body div.geToolbarContainer a.geInverted { filter: invert(1); }html body.geEditor .geTabContainer div { border-color: #e5e5e5 !important; }")+'html > body > div > a.geItem { background-color: #ffffff; color: #707070; border-top: 1px solid lightgray; border-left: 1px solid lightgray; }html body .geMenubarContainer { border-bottom:1px solid lightgray;background-color:#ffffff; }html body .mxWindow button.geBtn { font-size:12px !important; margin-left: 0; }html body table.mxWindow td.mxWindowPane div.mxWindowPane *:not(svg *) { font-size:9pt; }table.mxWindow * :not(svg *) { font-size:13px; }html body .mxWindow { z-index: 3; }html body div.diagramContainer button, html body button.geBtn { font-size:14px; font-weight:700; border-radius: 5px; }html body button.geBtn:active { opacity: 0.6; }html body a.geMenuItem { opacity: 0.75; cursor: pointer; user-select: none; }html body a.geMenuItem[disabled] { opacity: 0.2; }html body a.geMenuItem[disabled]:active { opacity: 0.2; }html body div.geActivePage { opacity: 0.7; }html body a.geMenuItem:active { opacity: 0.2; }html body .geToolbarButton { opacity: 0.3; }html body .geToolbarButton:active { opacity: 0.15; }html body .geStatus:active { opacity: 0.5; }html body .geStatus { padding-top:3px !important; }html body .geMenubarContainer .geStatus { margin-top: 0px !important; }html table.mxPopupMenu tr.mxPopupMenuItemHover:active { opacity: 0.7; }html body .geDialog input, html body .geToolbarContainer input, html body .mxWindow input {padding: 2px; display: inline-block; }html body .mxWindow input[type="checkbox"] {padding: 0px; }div.geDialog { border-radius: 5px; }html body div.geDialog button.geBigButton { color: '+(Editor.isDarkMode()?Editor.darkColor:"#fff")+" !important; border: none !important; }.mxWindow button, .geDialog select, .mxWindow select { display:inline-block; }html body .mxWindow .geColorBtn, html body .geDialog .geColorBtn { background: none; }html body div.diagramContainer button, html body .mxWindow button, html body .geDialog button { min-width: 0px; border-radius: 5px; color: "+(Editor.isDarkMode()?"#cccccc":"#353535")+" !important; border-style: solid; border-width: 1px; border-color: rgb(216, 216, 216); }html body div.diagramContainer button:hover, html body .mxWindow button:hover, html body .geDialog button:hover { border-color: rgb(177, 177, 177); }html body div.diagramContainer button:active, html body .mxWindow button:active, html body .geDialog button:active { opacity: 0.6; }div.diagramContainer button.geBtn, .mxWindow button.geBtn, .geDialog button.geBtn { min-width:72px; font-weight: 600; background: none; }div.diagramContainer button.gePrimaryBtn, .mxWindow button.gePrimaryBtn, .geDialog button.gePrimaryBtn, html body .gePrimaryBtn { background: #29b6f2; color: #fff !important; border: none; box-shadow: none; }html body .gePrimaryBtn:hover { background: #29b6f2; border: none; box-shadow: inherit; }html body button.gePrimaryBtn:hover { background: #29b6f2; border: none; }.geBtn button { min-width:72px !important; }div.geToolbarContainer a.geButton { margin:0px; padding: 0 2px 4px 2px; } html body div.geToolbarContainer a.geColorBtn { margin: 2px; } html body .mxWindow td.mxWindowPane input, html body .mxWindow td.mxWindowPane select, html body .mxWindow td.mxWindowPane textarea, html body .mxWindow td.mxWindowPane radio { padding: 0px; box-sizing: border-box; }.geDialog, .mxWindow td.mxWindowPane *, div.geSprite, td.mxWindowTitle, .geDiagramContainer { box-sizing:content-box; }.mxWindow div button.geStyleButton { box-sizing: border-box; }table.mxWindow td.mxWindowPane button.geColorBtn { padding:0px; box-sizing: border-box; }td.mxWindowPane .geSidebarContainer button { padding:2px; box-sizing: border-box; }html body .geMenuItem { font-size:14px; text-decoration: none; font-weight: normal; padding: 6px 10px 6px 10px; border: none; border-radius: 5px; color: #353535; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }.geTabContainer { border-bottom:1px solid lightgray; border-top:1px solid lightgray; background: "+(Editor.isDarkMode()?Editor.darkColor:"#fff")+" !important; }.geToolbarContainer { background: "+(Editor.isDarkMode()?Editor.darkColor:"#fff")+"; }div.geSidebarContainer { background-color: "+(Editor.isDarkMode()?Editor.darkColor:"#fff")+"; }div.geSidebarContainer .geTitle { background-color: "+(Editor.isDarkMode()?Editor.darkColor:"#fdfdfd")+"; }div.mxWindow td.mxWindowPane button { background-image: none; float: none; }td.mxWindowTitle { height: 22px !important; background: none !important; font-size: 13px !important; text-align:center !important; border-bottom:1px solid lightgray; }div.mxWindow, div.mxWindowTitle { background-image: none !important; background-color:"+(Editor.isDarkMode()?Editor.darkColor:"#fff")+" !important; }div.mxWindow { border-radius:5px; box-shadow: 0px 0px 2px #C0C0C0 !important;}div.mxWindow *:not(svg *) { font-family: inherit !important; }html div.geVerticalHandle { position:absolute;bottom:0px;left:50%;cursor:row-resize;width:11px;height:11px;background:white;margin-bottom:-6px; margin-left:-6px; border: none; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }html div.geInactivePage { background: "+(Editor.isDarkMode()?Editor.darkColor:"rgb(249, 249, 249)")+" !important; color: #A0A0A0 !important; } html div.geActivePage { background: "+(Editor.isDarkMode()?Editor.darkColor:"#fff")+" !important; "+(Editor.isDarkMode()?"":"color: #353535 !important; } ")+"html div.mxRubberband { border:1px solid; border-color: #29b6f2 !important; background:rgba(41,182,242,0.4) !important; } html body div.mxPopupMenu { border-radius:5px; border:1px solid #c0c0c0; padding:5px 0 5px 0; box-shadow: 0px 4px 17px -4px rgba(96,96,96,1); } html table.mxPopupMenu td.mxPopupMenuItem { color: "+(Editor.isDarkMode()?"#cccccc":"#353535")+"; font-size: 14px; padding-top: 4px; padding-bottom: 4px; }html table.mxPopupMenu tr.mxPopupMenuItemHover { background-color: "+(Editor.isDarkMode()?"#000000":"#29b6f2")+"; }html tr.mxPopupMenuItemHover td.mxPopupMenuItem, html tr.mxPopupMenuItemHover td.mxPopupMenuItem span { color: "+(Editor.isDarkMode()?"#cccccc":"#ffffff")+" !important; }html tr.mxPopupMenuItem, html td.mxPopupMenuItem { transition-property: none !important; }html table.mxPopupMenu hr { height: 2px; background-color: rgba(0,0,0,.07); margin: 5px 0; }html body td.mxWindowTitle { padding-right: 14px; }html td.mxWindowTitle div { top: 0px !important; }"+(mxClient.IS_IOS?"html input[type=checkbox], html input[type=radio] { height:12px; }":"")+("1"==urlParams.sketch?"a.geStatus > div { overflow: hidden; text-overflow: ellipsis; max-width: 100%; }":"")};var n=document.createElement("style");n.type="text/css",n.innerHTML=Editor.createMinimalCss(),document.getElementsByTagName("head")[0].appendChild(n),Editor.prototype.isChromelessView=function(){return!1},Graph.prototype.isLightboxView=function(){return!1};var o=EditorUi.prototype.updateTabContainer;EditorUi.prototype.updateTabContainer=function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom="1"==urlParams.sketch?"0px":this.tabContainerHeight+"px"),o.apply(this,arguments)};var r=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){r.apply(this,arguments),this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var a=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(t,i){if(null!=i.shortcut&&e<900&&!mxClient.IS_IOS){var n=t.firstChild.nextSibling;n.setAttribute("title",i.shortcut)}else a.apply(this,arguments)};var s=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){if(s.apply(this,arguments),null!=this.userElement){var e=this.userElement;e.style.cssText="position:relative;margin-right:4px;cursor:pointer;display:"+e.style.display,e.className="geToolbarButton",e.innerHTML="",e.style.backgroundImage="url("+Editor.userImage+")",e.style.backgroundPosition="center center",e.style.backgroundRepeat="no-repeat",e.style.backgroundSize="24px 24px",e.style.height="24px",e.style.width="24px",e.style.cssFloat="right",e.setAttribute("title",mxResources.get("changeUser")),"none"!=e.style.display&&(e.style.display="inline-block")}};var l=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){if(l.apply(this,arguments),null!=this.shareButton){var e=this.shareButton;e.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;",e.className="geToolbarButton",e.innerHTML="",e.style.backgroundImage="url("+Editor.shareImage+")",e.style.backgroundPosition="center center",e.style.backgroundRepeat="no-repeat",e.style.backgroundSize="24px 24px",e.style.height="24px",e.style.width="24px","1"==urlParams.sketch&&(this.shareButton.style.display="none")}null!=this.buttonContainer&&(this.buttonContainer.style.marginTop="-2px",this.buttonContainer.style.paddingTop="4px")},EditorUi.prototype.addEmbedButtons=function(){if(null!=this.buttonContainer&&"1"!=urlParams.embedInline){var e=document.createElement("div");e.style.display="inline-block",e.style.position="relative",e.style.marginTop="6px",e.style.marginRight="4px";var t=document.createElement("a");if(t.className="geMenuItem gePrimaryBtn",t.style.marginLeft="8px",t.style.padding="6px","1"==urlParams.noSaveBtn){if("0"!=urlParams.saveAndExit){var i="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(t,i),t.setAttribute("title",i),mxEvent.addListener(t,"click",mxUtils.bind(this,(function(){this.actions.get("saveAndExit").funct()}))),e.appendChild(t)}}else mxUtils.write(t,mxResources.get("save")),t.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(t,"click",mxUtils.bind(this,(function(){this.actions.get("save").funct()}))),e.appendChild(t),"1"==urlParams.saveAndExit&&(t=document.createElement("a"),mxUtils.write(t,mxResources.get("saveAndExit")),t.setAttribute("title",mxResources.get("saveAndExit")),t.className="geMenuItem",t.style.marginLeft="6px",t.style.padding="6px",mxEvent.addListener(t,"click",mxUtils.bind(this,(function(){this.actions.get("saveAndExit").funct()}))),e.appendChild(t));if("1"!=urlParams.noExitBtn){t=document.createElement("a");var n="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit");mxUtils.write(t,n),t.setAttribute("title",n),t.className="geMenuItem",t.style.marginLeft="6px",t.style.padding="6px",mxEvent.addListener(t,"click",mxUtils.bind(this,(function(){this.actions.get("exit").funct()}))),e.appendChild(t)}this.buttonContainer.appendChild(e),this.buttonContainer.style.top="6px",this.editor.fireEvent(new mxEventObject("statusChanged"))}};var d=Sidebar.prototype.getTooltipOffset;Sidebar.prototype.getTooltipOffset=function(e,t){if(null==this.editorUi.sidebarWindow||mxUtils.isAncestorNode(this.editorUi.picker,e))return(n=mxUtils.getOffset(this.editorUi.picker)).x+=this.editorUi.picker.offsetWidth+4,n.y+=e.offsetTop-t.height/2+16,n;var i=d.apply(this,arguments),n=mxUtils.getOffset(this.editorUi.sidebarWindow.window.div);return i.x+=n.x-16,i.y+=n.y,i};var m=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(e,t,i){var n=this.editorUi.editor.graph;e.smartSeparators=!0,m.apply(this,arguments),"1"==urlParams.sketch?n.isEnabled()&&(e.addSeparator(),1==n.getSelectionCount()&&this.addMenuItems(e,["-","lockUnlock"],null,i)):1==n.getSelectionCount()?(n.isCellFoldable(n.getSelectionCell())&&this.addMenuItems(e,n.isCellCollapsed(t)?["expand"]:["collapse"],null,i),this.addMenuItems(e,["collapsible","-","lockUnlock","enterGroup"],null,i),e.addSeparator(),this.addSubmenu("layout",e)):n.isSelectionEmpty()&&n.isEnabled()?(e.addSeparator(),this.addMenuItems(e,["editData"],null,i),e.addSeparator(),this.addSubmenu("layout",e),this.addSubmenu("insert",e),this.addMenuItems(e,["-","exitGroup"],null,i)):n.isEnabled()&&this.addMenuItems(e,["-","lockUnlock"],null,i),n.isEnabled()&&n.isSelectionEmpty()&&(this.addMenuItems(e,["-","fullscreen"]),"1"==urlParams.embedInline||!Editor.isDarkMode()&&(mxClient.IS_IE||mxClient.IS_IE11)||this.addMenuItems(e,["toggleDarkMode"]))};var u=Menus.prototype.addPopupMenuEditItems;Menus.prototype.addPopupMenuEditItems=function(e,t,i){u.apply(this,arguments),this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(e,["copyAsImage"],null,i)},EditorUi.prototype.toggleFormatPanel=function(e){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=e?e:!this.formatWindow.window.isVisible()):b(this)},DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};var p=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.sidebarWindow&&(this.sidebarWindow.window.setVisible(!1),this.sidebarWindow.window.destroy(),this.sidebarWindow=null),null!=this.formatWindow&&(this.formatWindow.window.setVisible(!1),this.formatWindow.window.destroy(),this.formatWindow=null),null!=this.actions.outlineWindow&&(this.actions.outlineWindow.window.setVisible(!1),this.actions.outlineWindow.window.destroy(),this.actions.outlineWindow=null),null!=this.actions.layersWindow&&(this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.destroy(),this.actions.layersWindow=null),null!=this.menus.tagsWindow&&(this.menus.tagsWindow.window.setVisible(!1),this.menus.tagsWindow.window.destroy(),this.menus.tagsWindow=null),null!=this.menus.findWindow&&(this.menus.findWindow.window.setVisible(!1),this.menus.findWindow.window.destroy(),this.menus.findWindow=null),null!=this.menus.findReplaceWindow&&(this.menus.findReplaceWindow.window.setVisible(!1),this.menus.findReplaceWindow.window.destroy(),this.menus.findReplaceWindow=null),p.apply(this,arguments)};var c=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(e){if(c.apply(this,arguments),e){var t=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;t>=1e3&&null!=this.sidebarWindow&&"1"!=urlParams.sketch&&this.sidebarWindow.window.setVisible(!0),null!=this.formatWindow&&(t>=1e3||"1"==urlParams.sketch)&&this.formatWindow.window.setVisible(!0)}else null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1)},EditorUi.prototype.chromelessWindowResize=function(){};var h=Menus.prototype.init;Menus.prototype.init=function(){h.apply(this,arguments);var e=this.editorUi,t=e.editor.graph;e.actions.get("editDiagram").label=mxResources.get("formatXml")+"...",e.actions.get("createShape").label=mxResources.get("shape")+"...",e.actions.get("outline").label=mxResources.get("outline")+"...",e.actions.get("layers").label=mxResources.get("layers")+"...",e.actions.get("tags").label=mxResources.get("tags")+"...",e.actions.get("forkme").visible="1"!=urlParams.sketch,e.actions.get("downloadDesktop").visible="1"!=urlParams.sketch;var i=e.actions.put("toggleDarkMode",new Action(mxResources.get("dark"),(function(t){e.setDarkMode(!Editor.darkMode)})));i.setToggleAction(!0),i.setSelectedCallback((function(){return Editor.isDarkMode()}));var n=e.actions.put("toggleSketchMode",new Action(mxResources.get("sketch"),(function(t){e.setSketchMode(!Editor.sketchMode)})));n.setToggleAction(!0),n.setSelectedCallback((function(){return Editor.sketchMode}));var o=e.actions.put("togglePagesVisible",new Action(mxResources.get("pages"),(function(t){e.setPagesVisible(!Editor.pagesVisible)})));o.setToggleAction(!0),o.setSelectedCallback((function(){return Editor.pagesVisible})),e.actions.put("importCsv",new Action(mxResources.get("csv")+"...",(function(){t.popupMenuHandler.hideMenu(),e.showImportCsvDialog()}))),e.actions.put("importText",new Action(mxResources.get("text")+"...",(function(){var t=new ParseDialog(e,"Insert from Text");e.showDialog(t.container,620,420,!0,!1),t.init()}))),e.actions.put("formatSql",new Action(mxResources.get("formatSql")+"...",(function(){var t=new ParseDialog(e,"Insert from Text","formatSql");e.showDialog(t.container,620,420,!0,!1),t.init()}))),e.actions.put("toggleShapes",new Action(mxResources.get("1"==urlParams.sketch?"moreShapes":"shapes")+"...",(function(){y(e)}),null,null,Editor.ctrlKey+"+Shift+K"));var r=e.actions.put("toggleFormat",new Action(mxResources.get("format")+"...",(function(){b(e)})));r.shortcut=e.actions.get("formatPanel").shortcut,EditorUi.enablePlantUml&&!e.isOffline()&&e.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",(function(){var t=new ParseDialog(e,mxResources.get("plantUml")+"...","plantUml");e.showDialog(t.container,620,420,!0,!1),t.init()}))),e.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",(function(){var t=new ParseDialog(e,mxResources.get("mermaid")+"...","mermaid");e.showDialog(t.container,620,420,!0,!1),t.init()})));var a=this.addPopupMenuCellEditItems;this.put("editCell",new Menu(mxUtils.bind(this,(function(e,t){var i=this.editorUi.editor.graph,n=i.getSelectionCell();a.call(this,e,n,null,t),this.addMenuItems(e,["editTooltip"],t),i.model.isVertex(n)&&this.addMenuItems(e,["editGeometry"],t),this.addMenuItems(e,["-","edit"],t)})))),this.addPopupMenuCellEditItems=function(e,t,i,n){e.addSeparator(),this.addSubmenu("editCell",e,n,mxResources.get("edit"))},this.put("diagram",new Menu(mxUtils.bind(this,(function(t,i){var n=e.getCurrentFile();if(e.menus.addSubmenu("extras",t,i,mxResources.get("preferences")),t.addSeparator(i),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?e.menus.addMenuItems(t,["new","open","-","synchronize","-","save","saveAs","-"],i):"1"==urlParams.embed||e.mode==App.MODE_ATLAS?("1"!=urlParams.noSaveBtn&&"1"!=urlParams.embedInline&&e.menus.addMenuItems(t,["-","save"],i),("1"==urlParams.saveAndExit||"1"==urlParams.noSaveBtn&&"0"!=urlParams.saveAndExit||e.mode==App.MODE_ATLAS)&&(e.menus.addMenuItems(t,["saveAndExit"],i),null!=n&&n.isRevisionHistorySupported()&&e.menus.addMenuItems(t,["revisionHistory"],i)),t.addSeparator(i)):e.mode==App.MODE_ATLAS?e.menus.addMenuItems(t,["save","synchronize","-"],i):"1"!=urlParams.noFileMenu&&(e.menus.addMenuItems(t,["new"],i),e.menus.addSubmenu("openFrom",t,i),isLocalStorage&&this.addSubmenu("openRecent",t,i),"1"!=urlParams.sketch&&(t.addSeparator(i),null!=n&&n.constructor==DriveFile&&e.menus.addMenuItems(t,["share"],i),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==n||n.constructor==LocalFile||e.menus.addMenuItems(t,["synchronize"],i)),t.addSeparator(i),e.menus.addSubmenu("save",t,i)),e.menus.addSubmenu("exportAs",t,i),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?e.menus.addMenuItems(t,["import"],i):"1"!=urlParams.noFileMenu&&e.menus.addSubmenu("importFrom",t,i),t.addSeparator(i),"1"!=urlParams.sketch?e.menus.addMenuItems(t,["outline"],i):null!=n&&n.constructor==DriveFile&&e.menus.addMenuItems(t,["share"],i),e.commentsSupported()&&e.menus.addMenuItems(t,["comments"],i),e.menus.addMenuItems(t,["-","findReplace","layers","tags","-","pageSetup"],i),"1"==urlParams.noFileMenu||mxClient.IS_IOS&&navigator.standalone||e.menus.addMenuItems(t,["print"],i),null!=n&&null!=e.fileNode&&"1"!=urlParams.embedInline){var o=null!=n.getTitle()?n.getTitle():e.defaultFilename;/(\.html)$/i.test(o)||/(\.svg)$/i.test(o)||this.addMenuItems(t,["-","properties"])}t.addSeparator(i),e.menus.addSubmenu("help",t,i),"1"==urlParams.embed||e.mode==App.MODE_ATLAS?"1"==urlParams.noExitBtn&&e.mode!=App.MODE_ATLAS||e.menus.addMenuItems(t,["-","exit"],i):"1"!=urlParams.noFileMenu&&e.menus.addMenuItems(t,["-","close"])})))),this.put("save",new Menu(mxUtils.bind(this,(function(t,i){var n=e.getCurrentFile();null!=n&&n.constructor==DriveFile?e.menus.addMenuItems(t,["save","makeCopy","-","rename","moveToFolder"],i):(e.menus.addMenuItems(t,["save","saveAs","-","rename"],i),e.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(t,["upload"],i):e.menus.addMenuItems(t,["makeCopy"],i)),"1"!=urlParams.sketch||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==n||n.constructor==LocalFile||e.menus.addMenuItems(t,["-","synchronize"],i),e.menus.addMenuItems(t,["-","autosave"],i),null!=n&&n.isRevisionHistorySupported()&&e.menus.addMenuItems(t,["-","revisionHistory"],i)}))));var s=this.get("exportAs");this.put("exportAs",new Menu(mxUtils.bind(this,(function(t,i){s.funct(t,i),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||e.menus.addMenuItems(t,["publishLink"],i),e.mode!=App.MODE_ATLAS&&"1"!=urlParams.extAuth&&(t.addSeparator(i),e.menus.addSubmenu("embed",t,i))}))));var l=this.get("language");this.put("table",new Menu(mxUtils.bind(this,(function(t,i){e.menus.addInsertTableCellItem(t,i)}))));var d=this.get("importFrom");this.put("importFrom",new Menu(mxUtils.bind(this,(function(i,n){d.funct(i,n),this.addMenuItems(i,["editDiagram"],n),"1"==urlParams.sketch&&(i.addSeparator(n),i.addItem(mxResources.get("csv")+"...",null,(function(){e.showImportCsvDialog()}),n,null,mxUtils.bind(t,t.isEnabled)),e.addInsertMenuItems(i,n,["formatSql","-","fromText","plantUml","mermaid"]))})))),this.put("extras",new Menu(mxUtils.bind(this,(function(t,i){"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&e.mode!=App.MODE_ATLAS&&e.menus.addSubmenu("theme",t,i),null!=l&&e.menus.addSubmenu("language",t,i),e.menus.addSubmenu("units",t,i),e.menus.addMenuItems(t,["-","pageScale","ruler","-","scrollbars","tooltips","-","copyConnect","collapseExpand","-"],i),"1"!=urlParams.embedInline&&("1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&e.mode!=App.MODE_ATLAS&&e.menus.addMenuItems(t,["-","showStartScreen","search","scratchpad"],i),"1"==urlParams.sketch&&null==urlParams.pages&&this.addMenuItems(t,["togglePagesVisible"],i)),t.addSeparator(i),e.mode!=App.MODE_ATLAS&&e.menus.addMenuItem(t,"configuration",i),!e.isOfflineApp()&&isLocalStorage&&e.mode!=App.MODE_ATLAS&&e.menus.addMenuItem(t,"plugins",i),e.mode!=App.MODE_ATLAS&&this.addMenuItems(t,["-","fullscreen"],i),(Editor.isDarkMode()||!mxClient.IS_IE&&!mxClient.IS_IE11)&&this.addMenuItems(t,["toggleDarkMode"],i),"1"==urlParams.sketch&&this.addMenuItems(t,["-","toggleSketchMode"],i),t.addSeparator(i)})))),this.put("insertAdvanced",new Menu(mxUtils.bind(this,(function(t,i){e.menus.addMenuItems(t,["importText","plantUml","mermaid","-","formatSql","importCsv","-","createShape","editDiagram"],i)})))),mxUtils.bind(this,(function(){var t=this.get("insert"),i=t.funct;t.funct=function(t,n){"1"==urlParams.sketch?(e.menus.addMenuItems(t,["insertFreehand"],n),e.insertTemplateEnabled&&!e.isOffline()&&e.menus.addMenuItems(t,["insertTemplate"],n)):(i.apply(this,arguments),e.menus.addSubmenu("table",t,n),t.addSeparator(n)),e.menus.addMenuItems(t,["-","toggleShapes"],n)}}))();var m=["horizontalFlow","verticalFlow","-","horizontalTree","verticalTree","radialTree","-","organic","circle"],u=function(t,i,n,o){t.addItem(n,null,mxUtils.bind(this,(function(){var t=new CreateGraphDialog(e,n,o);e.showDialog(t.container,620,420,!0,!1),t.init()})),i)};this.put("insertLayout",new Menu(mxUtils.bind(this,(function(e,t){for(var i=0;i<m.length;i++)"-"==m[i]?e.addSeparator(t):u(e,t,mxResources.get(m[i])+"...",m[i])}))))},EditorUi.prototype.installFormatToolbar=function(e){var t=this.editor.graph,i=document.createElement("div");i.style.cssText="position:absolute;top:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;white-space:nowrap;background-color:#fff;transform:translate(-50%, 0);left:50%;",t.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,(function(n,o){t.getSelectionCount()>0?(e.appendChild(i),i.innerHTML="Selected: "+t.getSelectionCount()):null!=i.parentNode&&i.parentNode.removeChild(i)})))};var g=!1;EditorUi.prototype.initFormatWindow=function(){if(!g){g=!0,this.formatWindow.window.setClosable(!1);var e=this.formatWindow.window.toggleMinimized;this.formatWindow.window.toggleMinimized=function(){e.apply(this,arguments),this.minimized?(this.div.style.width="90px",this.table.style.width="90px",this.div.style.left=parseInt(this.div.style.left)+150+"px"):(this.div.style.width="240px",this.table.style.width="240px",this.div.style.left=Math.max(0,parseInt(this.div.style.left)-150)+"px"),this.fit()},mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,(function(e){mxEvent.getSource(e)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()})))}};var x=EditorUi.prototype.init;EditorUi.prototype.init=function(){x.apply(this,arguments),"1"!=urlParams.embedInline&&this.doSetDarkMode(null!=urlParams.dark?1==urlParams.dark&&!mxClient.IS_IE&&!mxClient.IS_IE11:null!=mxSettings.settings.darkMode?mxSettings.settings.darkMode:window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches),(de=document.createElement("div")).style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;",de.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px",this.sidebar=this.createSidebar(de),"1"==urlParams.sketch&&this.toggleScratchpad(),("1"!=urlParams.sketch&&e>=1e3||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])&&(y(this,!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search")));var t=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==t.embedViewport)mxUtils.fit(this.div);else{var e=parseInt(this.div.offsetLeft),i=parseInt(this.div.offsetWidth),n=t.embedViewport.x+t.embedViewport.width;this.div.style.left=Math.max(t.embedViewport.x,Math.min(e,n-i))+"px";var o=parseInt(this.div.offsetTop),r=parseInt(this.div.offsetHeight),a=t.embedViewport.y+t.embedViewport.height;this.div.style.top=Math.max(t.embedViewport.y,Math.min(o,a-r))+"px"}},this.keyHandler.bindAction(75,!0,"toggleShapes",!0),("1"==urlParams.sketch||e>=1e3)&&"1"!=urlParams.embedInline&&(b(this,!0),"1"==urlParams.sketch&&(this.initFormatWindow(),this.formatWindow.window.toggleMinimized()));var i=(t=this).editor.graph;t.toolbar=this.createToolbar(t.createDiv("geToolbar")),t.defaultLibraryName=mxResources.get("untitledLibrary");var n=document.createElement("div");n.className="geMenubarContainer";var o=null,r=new Menubar(t,n);function a(e,i,n){var a=t.menus.get(e),s=r.addMenu(mxResources.get(e),mxUtils.bind(this,(function(){a.funct.apply(this,arguments)})),o);return s.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem",s.style.display="inline-block",s.style.boxSizing="border-box",s.style.top="6px",s.style.marginRight="6px",s.style.height="30px",s.style.paddingTop="6px",s.style.paddingBottom="6px",s.style.cursor="pointer",s.setAttribute("title",mxResources.get(e)),t.menus.menuCreated(a,s,"geMenuItem"),null!=n?(s.style.backgroundImage="url("+n+")",s.style.backgroundPosition="center center",s.style.backgroundRepeat="no-repeat",s.style.backgroundSize="24px 24px",s.style.width="34px",s.innerHTML=""):i||(s.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",s.style.backgroundPosition="right 6px center",s.style.backgroundRepeat="no-repeat",s.style.paddingRight="22px"),s}function s(e,o,r,a,s,l){var d=document.createElement("a");if(d.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem",d.style.display="inline-block",d.style.boxSizing="border-box",d.style.height="30px",d.style.padding="6px",d.style.position="relative",d.style.verticalAlign="top",d.style.top="0px","1"==urlParams.sketch&&(d.style.borderStyle="none",d.style.boxShadow="none",d.style.padding="6px",d.style.margin="0px"),null!=t.statusContainer?n.insertBefore(d,t.statusContainer):n.appendChild(d),null!=l?(d.style.backgroundImage="url("+l+")",d.style.backgroundPosition="center center",d.style.backgroundRepeat="no-repeat",d.style.backgroundSize="24px 24px",d.style.width="34px"):mxUtils.write(d,e),mxEvent.addListener(d,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,(function(e){e.preventDefault()}))),mxEvent.addListener(d,"click",(function(e){"disabled"!=d.getAttribute("disabled")&&o(e),mxEvent.consume(e)})),null==r&&(d.style.marginRight="4px"),null!=a&&d.setAttribute("title",a),null!=s){function m(){s.isEnabled()?(d.removeAttribute("disabled"),d.style.cursor="pointer"):(d.setAttribute("disabled","disabled"),d.style.cursor="default")}s.addListener("stateChanged",m),i.addListener("enabledChanged",m),m()}return d}function l(e,i,o){var r=document.createElement("div");r.className="geMenuItem",r.style.display="inline-block",r.style.verticalAlign="top",r.style.marginRight="6px",r.style.padding="0 4px 0 4px",r.style.height="30px",r.style.position="relative",r.style.top="0px","1"==urlParams.sketch&&(r.style.boxShadow="none");for(var a=0;a<e.length;a++)null!=e[a]&&("1"==urlParams.sketch&&(e[a].style.padding="10px 8px",e[a].style.width="30px"),e[a].style.margin="0px",e[a].style.boxShadow="none",r.appendChild(e[a]));return null!=i&&mxUtils.setOpacity(r,i),null!=t.statusContainer&&"1"!=urlParams.sketch?n.insertBefore(r,t.statusContainer):n.appendChild(r),r}function d(){var e=t.getCurrentFile();if(null!=e&&null!=e.getTitle()){var i=e.getMode();"google"==i?i="googleDrive":"github"==i?i="gitHub":"gitlab"==i?i="gitLab":"onedrive"==i&&(i="oneDrive"),i=mxResources.get(i),n.setAttribute("title",e.getTitle()+(null!=i?" ("+i+")":""))}else n.removeAttribute("title")}t.statusContainer=t.createStatusContainer(),t.statusContainer.style.position="relative",t.statusContainer.style.maxWidth="",t.statusContainer.style.marginTop="7px",t.statusContainer.style.marginLeft="6px",t.statusContainer.style.color="gray",t.statusContainer.style.cursor="default";var m=t.hideCurrentMenu;t.hideCurrentMenu=function(){m.apply(this,arguments),this.editor.graph.popupMenuHandler.hideMenu()};var u=t.descriptorChanged;t.descriptorChanged=function(){u.apply(this,arguments),d()},t.setStatusText(t.editor.getStatus()),n.appendChild(t.statusContainer),t.buttonContainer=document.createElement("div"),t.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;",n.appendChild(t.buttonContainer),t.menubarContainer=t.buttonContainer,t.tabContainer=document.createElement("div"),t.tabContainer.className="geTabContainer",t.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;margin-bottom:-2px;visibility:hidden;";var p=t.diagramContainer.parentNode,c=document.createElement("div");if(c.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;",t.diagramContainer.style.top="1"==urlParams.sketch?"0px":"47px","1"==urlParams.winCtrls&&"1"==urlParams.sketch){c.style.top="20px",t.titlebar=document.createElement("div"),t.titlebar.style.cssText="position:absolute;top:0px;left:0px;right:0px;height:20px;overflow:hidden;box-shadow: 0px 0px 2px #c0c0c0;";var h=document.createElement("div");h.style.cssText="max-width: calc(100% - 100px);text-overflow: ellipsis;user-select:none;height:20px;margin: 2px 10px;font-size: 12px;white-space: nowrap;overflow: hidden;",t.titlebar.appendChild(h),p.appendChild(t.titlebar)}var g=t.menus.get("viewZoom"),f="1"!=urlParams.sketch?Editor.plusImage:Editor.shapesImage,w="1"==urlParams.sketch?document.createElement("div"):null,C="1"==urlParams.sketch?document.createElement("div"):null,v="1"==urlParams.sketch?document.createElement("div"):null,E=mxUtils.bind(this,(function(){null!=this.sidebar&&(this.sidebar.graph.stylesheet.styles=mxUtils.clone(i.stylesheet.styles),this.sidebar.container.innerHTML="",this.sidebar.palettes=new Object,this.sidebar.init(),"1"==urlParams.sketch&&(this.scratchpad=null,this.toggleScratchpad())),i.refresh(),i.view.validateBackground()}));t.addListener("darkModeChanged",E),t.addListener("sketchModeChanged",E);var M=mxUtils.bind(this,(function(){if(Editor.inlineFullscreen)v.style.left="10px",v.style.top="10px",C.style.left="10px",C.style.top="60px",w.style.top="10px",w.style.right="12px",w.style.left="",t.diagramContainer.setAttribute("data-bounds",t.diagramContainer.style.top+" "+t.diagramContainer.style.left+" "+t.diagramContainer.style.width+" "+t.diagramContainer.style.height),t.diagramContainer.style.top="0px",t.diagramContainer.style.left="0px",t.diagramContainer.style.bottom="0px",t.diagramContainer.style.right="0px",t.diagramContainer.style.width="",t.diagramContainer.style.height="";else{var e=t.diagramContainer.getAttribute("data-bounds");if(null!=e){t.diagramContainer.style.background="transparent",t.diagramContainer.removeAttribute("data-bounds");var o=i.getGraphBounds(),r=e.split(" ");t.diagramContainer.style.top=r[0],t.diagramContainer.style.left=r[1],t.diagramContainer.style.width=o.width+50+"px",t.diagramContainer.style.height=o.height+46+"px",t.diagramContainer.style.bottom="",t.diagramContainer.style.right="",(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",rect:t.diagramContainer.getBoundingClientRect()}),"*"),t.refresh()}v.style.left=t.diagramContainer.offsetLeft+"px",v.style.top=t.diagramContainer.offsetTop-v.offsetHeight-4+"px",C.style.display="",C.style.left=t.diagramContainer.offsetLeft-C.offsetWidth-4+"px",C.style.top=t.diagramContainer.offsetTop+"px",w.style.left=t.diagramContainer.offsetLeft+t.diagramContainer.offsetWidth-w.offsetWidth+"px",w.style.top=v.style.top,w.style.right="",t.bottomResizer.style.left=t.diagramContainer.offsetLeft+(t.diagramContainer.offsetWidth-t.bottomResizer.offsetWidth)/2+"px",t.bottomResizer.style.top=t.diagramContainer.offsetTop+t.diagramContainer.offsetHeight-t.bottomResizer.offsetHeight/2-1+"px",t.rightResizer.style.left=t.diagramContainer.offsetLeft+t.diagramContainer.offsetWidth-t.rightResizer.offsetWidth/2-1+"px",t.rightResizer.style.top=t.diagramContainer.offsetTop+(t.diagramContainer.offsetHeight-t.bottomResizer.offsetHeight)/2+"px"}t.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":"",t.rightResizer.style.visibility=t.bottomResizer.style.visibility,n.style.display="none",v.style.visibility="",w.style.visibility=""})),k=mxUtils.bind(this,(function(){_.style.backgroundImage="url("+(Editor.inlineFullscreen?Editor.fullscreenExitImage:Editor.fullscreenImage)+")",this.diagramContainer.style.background=Editor.inlineFullscreen?Editor.isDarkMode()?Editor.darkColor:"#ffffff":"transparent",M()})),I=mxUtils.bind(this,(function(){k(),b(t,!0),t.initFormatWindow();var e=this.diagramContainer.getBoundingClientRect();this.formatWindow.window.setLocation(e.x+e.width+4,e.y)}));if(t.addListener("inlineFullscreenChanged",k),t.addListener("editInlineStart",I),"1"==urlParams.embedInline&&t.addListener("darkModeChanged",I),t.addListener("editInlineStop",mxUtils.bind(this,(function(e){t.diagramContainer.style.width="10px",t.diagramContainer.style.height="10px",t.diagramContainer.style.border="",t.bottomResizer.style.visibility="hidden",t.rightResizer.style.visibility="hidden",v.style.visibility="hidden",w.style.visibility="hidden",C.style.display="none"}))),Graph.touchStyle&&(i.panningHandler.isPanningTrigger=function(e){var t=e.getEvent();return null==e.getState()&&!mxEvent.isMouseEvent(t)&&!i.freehand.isDrawing()||mxEvent.isPopupTrigger(t)&&(null==e.getState()||mxEvent.isControlDown(t)||mxEvent.isShiftDown(t))}),null!=t.hoverIcons){var S=t.hoverIcons.update;t.hoverIcons.update=function(){i.freehand.isDrawing()||S.apply(this,arguments)}}if(null!=i.freehand){var P=i.freehand.createStyle;i.freehand.createStyle=function(e){return P.apply(this,arguments)+"sketch=0;"}}if("1"==urlParams.sketch){C.className="geToolbarContainer",w.className="geToolbarContainer",v.className="geToolbarContainer",n.className="geToolbarContainer",t.picker=C;var T=!1;mxEvent.addListener(n,"mouseenter",(function(){t.statusContainer.style.display="inline-block"})),mxEvent.addListener(n,"mouseleave",(function(){T||(t.statusContainer.style.display="none")}));var W=mxUtils.bind(this,(function(e){null!=t.notificationBtn&&(null!=e?t.notificationBtn.setAttribute("title",e):t.notificationBtn.removeAttribute("title"))}));"1"!=urlParams.embed?(n.style.visibility=n.clientWidth<14?"hidden":"",t.editor.addListener("statusChanged",mxUtils.bind(this,(function(){if(t.setStatusText(t.editor.getStatus()),0==t.statusContainer.children.length||1==t.statusContainer.children.length&&"function"==typeof t.statusContainer.firstChild.getAttribute&&null==t.statusContainer.firstChild.getAttribute("class")){var e=null!=t.statusContainer.firstChild&&"function"==typeof t.statusContainer.firstChild.getAttribute?t.statusContainer.firstChild.getAttribute("title"):t.editor.getStatus();W(e);var i=t.getCurrentFile(),o=null!=i?i.savingStatusKey:DrawioFile.prototype.savingStatusKey;e==mxResources.get(o)+"..."?(t.statusContainer.innerHTML='<img title="'+mxUtils.htmlEntities(mxResources.get(o))+'..."src="'+Editor.tailSpin+'">',t.statusContainer.style.display="inline-block",T=!0):t.buttonContainer.clientWidth>6&&(t.statusContainer.style.display="none",T=!1)}else t.statusContainer.style.display="inline-block",W(null),T=!0;n.style.visibility=n.clientWidth>12?"":"hidden"})))):t.editor.addListener("statusChanged",mxUtils.bind(this,(function(){n.style.visibility=n.clientWidth>16?"":"hidden"}))),(oe=a("diagram",null,Editor.menuImage)).style.boxShadow="none",oe.style.padding="6px",oe.style.margin="0px",v.appendChild(oe),mxEvent.disableContextMenu(oe),mxEvent.addGestureListeners(oe,mxUtils.bind(this,(function(e){(mxEvent.isShiftDown(e)||mxEvent.isAltDown(e)||mxEvent.isMetaDown(e)||mxEvent.isControlDown(e)||mxEvent.isPopupTrigger(e))&&this.appIconClicked(e)})),null,null),t.statusContainer.style.position="",t.statusContainer.style.display="none",t.statusContainer.style.margin="0px",t.statusContainer.style.padding="6px 0px",t.statusContainer.style.maxWidth=Math.min(e-240,280)+"px",t.statusContainer.style.display="inline-block",t.statusContainer.style.textOverflow="ellipsis",t.buttonContainer.style.position="",t.buttonContainer.style.paddingRight="0px",t.buttonContainer.style.display="inline-block";var R=document.createElement("a");R.style.padding="0px",R.style.boxShadow="none",R.className="geMenuItem",R.style.display="inline-block",R.style.width="40px",R.style.height="12px",R.style.marginBottom="-2px",R.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",R.style.backgroundPosition="top center",R.style.backgroundRepeat="no-repeat",R.setAttribute("title","Minimize");var A=!1,L=mxUtils.bind(this,(function(){if(C.innerHTML="",!A){function e(e,t,i){return null!=t&&e.setAttribute("title",t),e.style.cursor=null!=i?i:"default",e.style.margin="2px 0px",C.appendChild(e),mxUtils.br(C),e}function n(t,i,n){var o=s("",t.funct,null,i,t,n);return o.style.width="40px",o.style.opacity="0.7",e(o,null,"pointer")}e(t.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text",mxResources.get("text"),!0,!1,null,!0,!0),mxResources.get("text")+" ("+Editor.ctrlKey+"+Shift+X)"),e(t.sidebar.createVertexTemplate("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;",140,160,"",mxResources.get("note"),!0,!1,null,!0),mxResources.get("note")),e(t.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle"),!0,!1,null,!0),mxResources.get("rectangle")+" ("+Editor.ctrlKey+"+K)"),e(t.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse"),!0,!1,null,!0),mxResources.get("ellipse")),function(){var n="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;",o=new mxCell("",new mxGeometry(0,0,i.defaultEdgeLength,0),n);o.geometry.setTerminalPoint(new mxPoint(0,0),!0),o.geometry.setTerminalPoint(new mxPoint(o.geometry.width,0),!1),o.geometry.points=[],o.geometry.relative=!0,o.edge=!0,e(t.sidebar.createEdgeTemplateFromCells([o],o.geometry.width,o.geometry.height,mxResources.get("line"),!0,null,!0,!1),mxResources.get("line")),(o=o.clone()).style=n+"shape=flexArrow;rounded=1;startSize=8;endSize=8;",o.geometry.width=i.defaultEdgeLength+20,o.geometry.setTerminalPoint(new mxPoint(0,20),!0),o.geometry.setTerminalPoint(new mxPoint(o.geometry.width,20),!1);var r=e(t.sidebar.createEdgeTemplateFromCells([o],o.geometry.width,40,mxResources.get("arrow"),!0,null,!0,!1),mxResources.get("arrow"));r.style.borderBottom="1px solid "+(Editor.isDarkMode()?"#505050":"lightgray"),r.style.paddingBottom="14px",r.style.marginBottom="14px"}(),n(t.actions.get("insertFreehand"),mxResources.get("freehand"),Editor.freehandImage);var o=t.actions.get("toggleShapes");n(o,mxResources.get("shapes")+" ("+o.shortcut+")",f),(oe=a("table",null,Editor.calendarImage)).style.boxShadow="none",oe.style.opacity="0.7",oe.style.padding="6px",oe.style.margin="0px",oe.style.width="37px",e(oe,null,"pointer"),n(t.actions.get("insertTemplate"),mxResources.get("template"),Editor.addImage)}"1"!=urlParams.embedInline&&C.appendChild(R)}));mxEvent.addListener(R,"click",mxUtils.bind(this,(function(){A?(mxUtils.setPrefixedStyle(C.style,"transform","translate(0, -50%)"),C.style.padding="8px 6px 4px",C.style.top="50%",C.style.bottom="",C.style.height="",R.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",R.style.width="40px",R.style.height="12px",R.setAttribute("title","Minimize"),A=!1,L()):(C.innerHTML="",C.appendChild(R),mxUtils.setPrefixedStyle(C.style,"transform","translate(0, 0)"),C.style.top="",C.style.bottom="12px",C.style.padding="0px",C.style.height="24px",R.style.height="24px",R.style.backgroundImage="url("+Editor.plusImage+")",R.setAttribute("title",mxResources.get("insert")),R.style.width="24px",A=!0)}))),L(),t.addListener("darkModeChanged",L),t.addListener("sketchModeChanged",L)}else t.editor.addListener("statusChanged",mxUtils.bind(this,(function(){t.setStatusText(t.editor.getStatus())})));if(null!=g){var D=function(e){i.popupMenuHandler.hideMenu(),mxEvent.isAltDown(e)||mxEvent.isShiftDown(e)?t.actions.get("customZoom").funct():t.actions.get("smartFit").funct()},U=t.actions.get("zoomIn"),z=t.actions.get("zoomOut"),H=t.actions.get("resetView"),O=t.actions.get("fullscreen"),B=(t.actions.get("toggleDarkMode"),t.actions.get("undo")),F=t.actions.get("redo"),N=s("",B.funct,null,mxResources.get("undo")+" ("+B.shortcut+")",B,Editor.undoImage),V=s("",F.funct,null,mxResources.get("redo")+" ("+F.shortcut+")",F,Editor.redoImage),_=s("",O.funct,null,mxResources.get("fullscreen"),O,Editor.fullscreenImage);if(null!=w){_.parentNode.removeChild(_);var G=t.actions.get("delete"),K=s("",G.funct,null,mxResources.get("delete"),G,Editor.trashImage);K.style.opacity="0.1",v.appendChild(K),G.addListener("stateChanged",(function(){K.style.opacity=G.enabled?"":"0.1"}));var X=function(){N.style.display=t.editor.undoManager.history.length>0||i.isEditing()?"inline-block":"none",V.style.display=N.style.display,N.style.opacity=B.enabled?"":"0.1",V.style.opacity=F.enabled?"":"0.1"};if(v.appendChild(N),v.appendChild(V),B.addListener("stateChanged",X),F.addListener("stateChanged",X),X(),null!=urlParams.layers){var Y=t.actions.get("layers"),q=s("",Y.funct,null,mxResources.get("layers"),Y,Editor.layersImage);q.style.opacity="0.4",w.appendChild(q)}if(null!=urlParams.tags){var j=t.actions.get("tags"),Z=s("",j.funct,null,mxResources.get("tags"),j,Editor.tagsImage);Z.style.opacity="0.4",w.appendChild(Z)}var J=t.actions.get("outline"),$=s("",J.funct,null,mxResources.get("outline"),J,Editor.outlineImage);w.appendChild($);var Q=s("",z.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -/Alt+Mousewheel)",z,Editor.zoomOutImage);w.appendChild(Q),(oe=document.createElement("div")).innerHTML="100%",oe.setAttribute("title",mxResources.get("fitWindow")+"/"+mxResources.get("resetView")+" (Enter)"),oe.style.display="inline-block",oe.style.cursor="pointer",oe.style.textAlign="center",oe.style.whiteSpace="nowrap",oe.style.paddingRight="10px",oe.style.textDecoration="none",oe.style.verticalAlign="top",oe.style.padding="6px 0",oe.style.fontSize="14px",oe.style.width="40px",oe.style.opacity="0.4",w.appendChild(oe),mxEvent.addListener(oe,"click",D);var ee=s("",U.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +/Alt+Mousewheel)",U,Editor.zoomInImage);if(w.appendChild(ee),"1"==urlParams.embedInline){w.appendChild(_);var te=t.actions.get("exit");w.appendChild(s("",te.funct,null,mxResources.get("exit"),te,Editor.closeImage))}var ie=this.createPageMenuTab(!1);function ne(){ie.style.display=null!=t.pages&&("1"==urlParams.pages||t.pages.length>1||Editor.pagesVisible)?"inline-block":"none"}ie.style.display="none",ie.style.position="",ie.style.marginLeft="",ie.style.top="",ie.style.left="",ie.style.height="100%",ie.style.lineHeight="",ie.style.borderStyle="none",ie.style.padding="3px 0",ie.style.margin="0px",ie.style.background="",ie.style.border="",ie.style.boxShadow="none",ie.style.verticalAlign="top",ie.firstChild.style.height="100%",ie.firstChild.style.opacity="0.6",ie.firstChild.style.margin="0px",w.appendChild(ie),t.addListener("fileDescriptorChanged",ne),t.addListener("pagesVisibleChanged",ne),ne(),t.tabContainer.style.visibility="hidden",n.style.cssText="position:absolute;right:14px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px 0px 6px 6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;",v.style.cssText="position:absolute;left:10px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;",w.style.cssText="position:absolute;right:14px;bottom:14px;height:28px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px;white-space:nowrap;user-select:none;",c.appendChild(v),c.appendChild(w),C.style.cssText="position:absolute;left:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px 6px 4px 6px;white-space:nowrap;transform:translate(0, -50%);top:50%;user-select:none;",c.appendChild(C),window.setTimeout((function(){mxUtils.setPrefixedStyle(C.style,"transition","transform .3s ease-out")}),0),"1"==urlParams["format-toolbar"]&&this.installFormatToolbar(c)}else{var oe,re=s("",D,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",H,Editor.zoomFitImage);n.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;text-align:left;white-space:nowrap;",this.tabContainer.style.right="70px",(oe=r.addMenu("100%",g.funct)).setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)"),oe.style.whiteSpace="nowrap",oe.style.paddingRight="10px",oe.style.textDecoration="none",oe.style.textDecoration="none",oe.style.overflow="hidden",oe.style.visibility="hidden",oe.style.textAlign="center",oe.style.cursor="pointer",oe.style.height=parseInt(t.tabContainerHeight)-1+"px",oe.style.lineHeight=parseInt(t.tabContainerHeight)+1+"px",oe.style.position="absolute",oe.style.display="block",oe.style.fontSize="12px",oe.style.width="59px",oe.style.right="0px",oe.style.bottom="0px",oe.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")",oe.style.backgroundPosition="right 6px center",oe.style.backgroundRepeat="no-repeat",c.appendChild(oe)}!function(e){var i=mxUtils.bind(this,(function(){e.innerHTML=Math.round(100*t.editor.graph.view.scale)+"%"}));t.editor.graph.view.addListener(mxEvent.EVENT_SCALE,i),t.editor.addListener("resetGraphView",i),t.editor.addListener("pageSelected",i)}(oe);var ae=t.setGraphEnabled;t.setGraphEnabled=function(){ae.apply(this,arguments),null!=this.tabContainer&&(oe.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility&&null==w?this.tabContainerHeight+"px":"0px")}}c.appendChild(n),c.appendChild(t.diagramContainer),p.appendChild(c),t.updateTabContainer(),null==w&&c.appendChild(t.tabContainer);var se=null;function le(){if("1"==urlParams.sketch)"1"!=urlParams.embedInline&&(v.style.left=C.offsetTop-C.offsetHeight/2<58?"70px":"10px");else{for(var i=n.firstChild;null!=i;){var d=i.nextSibling;"geMenuItem"!=i.className&&"geItem"!=i.className||i.parentNode.removeChild(i),i=d}o=n.firstChild;var m=(e=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)<1e3||"1"==urlParams.sketch,u=null;m||(u=a("diagram")),null!=(d=m?a("diagram",null,Editor.drawLogoImage):null)&&(u=d),l([u,s(mxResources.get("shapes"),t.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),t.actions.get("image"),m?Editor.shapesImage:null),s(mxResources.get("format"),t.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+t.actions.get("formatPanel").shortcut+")",t.actions.get("image"),m?Editor.formatImage:null)],m?60:null),l([p=a("insert",!0,m?f:null),s(mxResources.get("delete"),t.actions.get("delete").funct,null,mxResources.get("delete"),t.actions.get("delete"),m?Editor.trashImage:null)],m?60:null),e>=411&&(l([N,V],60),e>=520&&l([re,e>=640?s("",U.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",U,Editor.zoomInImage):null,e>=640?s("",z.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",z,Editor.zoomOutImage):null],60))}null!=u&&(mxEvent.disableContextMenu(u),mxEvent.addGestureListeners(u,mxUtils.bind(this,(function(e){(mxEvent.isShiftDown(e)||mxEvent.isAltDown(e)||mxEvent.isMetaDown(e)||mxEvent.isControlDown(e)||mxEvent.isPopupTrigger(e))&&t.appIconClicked(e)})),null,null));var p,c=t.menus.get("language");null!=c&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&e>=600&&"1"!=urlParams.sketch?(null==se&&((p=r.addMenu("",c.funct)).setAttribute("title",mxResources.get("language")),p.className="geToolbarButton",p.style.backgroundImage="url("+Editor.globeImage+")",p.style.backgroundPosition="center center",p.style.backgroundRepeat="no-repeat",p.style.backgroundSize="24px 24px",p.style.position="absolute",p.style.height="24px",p.style.width="24px",p.style.zIndex="1",p.style.right="8px",p.style.cursor="pointer",p.style.top="1"==urlParams.embed?"12px":"11px",n.appendChild(p),se=p),t.buttonContainer.style.paddingRight="34px"):(t.buttonContainer.style.paddingRight="4px",null!=se&&(se.parentNode.removeChild(se),se=null))}if(le(),mxEvent.addListener(window,"resize",(function(){le(),null!=t.sidebarWindow&&t.sidebarWindow.window.fit(),null!=t.formatWindow&&t.formatWindow.window.fit(),null!=t.actions.outlineWindow&&t.actions.outlineWindow.window.fit(),null!=t.actions.layersWindow&&t.actions.layersWindow.window.fit(),null!=t.menus.tagsWindow&&t.menus.tagsWindow.window.fit(),null!=t.menus.findWindow&&t.menus.findWindow.window.fit(),null!=t.menus.findReplaceWindow&&t.menus.findReplaceWindow.window.fit()})),"1"==urlParams.embedInline){var de;document.body.style.cursor="text",C.style.transform="",mxEvent.addGestureListeners(t.diagramContainer.parentNode,(function(e){mxEvent.getSource(e)==t.diagramContainer.parentNode&&(t.embedExitPoint=new mxPoint(mxEvent.getClientX(e),mxEvent.getClientY(e)),t.sendEmbeddedSvgExport())})),(de=document.createElement("div")).style.position="absolute",de.style.width="10px",de.style.height="10px",de.style.borderRadius="5px",de.style.border="1px solid gray",de.style.background="#ffffff",de.style.cursor="row-resize",t.diagramContainer.parentNode.appendChild(de),t.bottomResizer=de;var me=null,ue=null,pe=null,ce=null;mxEvent.addGestureListeners(de,(function(e){ce=parseInt(t.diagramContainer.style.height),ue=mxEvent.getClientY(e),i.popupMenuHandler.hideMenu(),mxEvent.consume(e)})),(de=de.cloneNode(!1)).style.cursor="col-resize",t.diagramContainer.parentNode.appendChild(de),t.rightResizer=de,mxEvent.addGestureListeners(de,(function(e){pe=parseInt(t.diagramContainer.style.width),me=mxEvent.getClientX(e),i.popupMenuHandler.hideMenu(),mxEvent.consume(e)})),mxEvent.addGestureListeners(document.body,null,(function(e){var i=!1;null!=me&&(t.diagramContainer.style.width=Math.max(20,pe+mxEvent.getClientX(e)-me)+"px",i=!0),null!=ue&&(t.diagramContainer.style.height=Math.max(20,ce+mxEvent.getClientY(e)-ue)+"px",i=!0),i&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:t.diagramContainer.getBoundingClientRect()}),"*"),M(),t.refresh())}),(function(e){null==me&&null==ue||mxEvent.consume(e),me=null,ue=null})),this.diagramContainer.style.borderRadius="4px",document.body.style.backgroundColor="transparent",t.bottomResizer.style.visibility="hidden",t.rightResizer.style.visibility="hidden",v.style.visibility="hidden",w.style.visibility="hidden",C.style.display="none"}"1"==urlParams.prefetchFonts&&t.editor.loadFonts()}}else window.uiTheme=null;function b(e,i){var n=e.editor.graph;n.popupMenuHandler.hideMenu(),null==e.formatWindow?(e.formatWindow=new t(e,mxResources.get("format"),"1"==urlParams.sketch?Math.max(10,e.diagramContainer.clientWidth-241):Math.max(10,e.diagramContainer.clientWidth-248),"1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60,240,Math.min(566,n.container.clientHeight-10),(function(t){var i=e.createFormat(t);return i.init(),e.addListener("darkModeChanged",mxUtils.bind(this,(function(){i.refresh()}))),i})),e.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,(function(){e.formatWindow.window.fit()}))),e.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80),e.formatWindow.window.setVisible(!0)):e.formatWindow.window.setVisible(null!=i?i:!e.formatWindow.window.isVisible())}function y(e,i){var n=e.editor.graph;if(n.popupMenuHandler.hideMenu(),new mxRectangle,null==e.sidebarWindow){var o=Math.min(n.container.clientWidth-10,218),r=Math.min(n.container.clientHeight-40,650);e.sidebarWindow=new t(e,mxResources.get("shapes"),"1"==urlParams.sketch&&"1"!=urlParams.embedInline?66:10,"1"==urlParams.sketch&&"1"!=urlParams.embedInline?Math.max(30,(n.container.clientHeight-r)/2):56,o-6,r-6,(function(t){(i=document.createElement("div")).style.cssText="position:absolute;left:0;right:0;border-top:1px solid lightgray;height:24px;bottom:31px;text-align:center;cursor:pointer;padding:6px 0 0 0;",i.className="geTitle",(n=document.createElement("span")).style.fontSize="18px",n.style.marginRight="5px",n.innerHTML="+",i.appendChild(n),mxUtils.write(i,mxResources.get("moreShapes")),t.appendChild(i),mxEvent.addListener(i,"click",(function(){e.actions.get("shapes").funct()}));var i,n,o,r=new Menubar(e,t);function a(i,n){var o=e.menus.get(i),a=r.addMenu(n,mxUtils.bind(this,(function(){o.funct.apply(this,arguments)})));return a.style.cssText="position:absolute;border-top:1px solid lightgray;width:50%;height:24px;bottom:0px;text-align:center;cursor:pointer;padding:6px 0 0 0;cusor:pointer;",a.className="geTitle",t.appendChild(a),a}return!Editor.enableCustomLibraries||"1"==urlParams.embed&&"1"!=urlParams.libraries?i.style.bottom="0":null!=e.actions.get("newLibrary")?((i=document.createElement("div")).style.cssText="position:absolute;left:0px;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;",i.className="geTitle",(n=document.createElement("span")).style.cssText="position:relative;top:6px;",mxUtils.write(n,mxResources.get("newLibrary")),i.appendChild(n),t.appendChild(i),mxEvent.addListener(i,"click",e.actions.get("newLibrary").funct),(i=document.createElement("div")).style.cssText="position:absolute;left:50%;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;border-left: 1px solid lightgray;",i.className="geTitle",(n=document.createElement("span")).style.cssText="position:relative;top:6px;",mxUtils.write(n,mxResources.get("openLibrary")),i.appendChild(n),t.appendChild(i),mxEvent.addListener(i,"click",e.actions.get("openLibrary").funct)):((o=a("newLibrary",mxResources.get("newLibrary"))).style.boxSizing="border-box",o.style.paddingRight="6px",o.style.paddingLeft="6px",o.style.height="32px",o.style.left="0",(o=a("openLibraryFrom",mxResources.get("openLibraryFrom"))).style.borderLeft="1px solid lightgray",o.style.boxSizing="border-box",o.style.paddingRight="6px",o.style.paddingLeft="6px",o.style.height="32px",o.style.left="50%"),t.appendChild(e.sidebar.container),t.style.overflow="hidden",t})),e.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,(function(){e.sidebarWindow.window.fit()}))),e.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90),e.sidebarWindow.window.setVisible(!0),e.getLocalData("sidebar",(function(t){e.sidebar.showEntries(t,null,!0)})),e.restoreLibraries()}else e.sidebarWindow.window.setVisible(null!=i?i:!e.sidebarWindow.window.isVisible())}},function(){var e=!1;"min"!=uiTheme||e||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),e=!0);var t=EditorUi.initTheme;EditorUi.initTheme=function(){t.apply(this,arguments),"min"!=uiTheme||e||(this.initMinimalTheme(),e=!0)}}();