"use strict";(self.webpackChunk_deathbeds_ipydrawio_notebook=self.webpackChunk_deathbeds_ipydrawio_notebook||[]).push([[305],{656:(e,o,a)=>{a.d(o,{ET:()=>r,j5:()=>i,lN:()=>s,t6:()=>d});var t=a(123),n=a(507);const i=new(a(502).LabIcon)({name:"drawio:ipynb",svgstr:n.DRAWIO_ICON_SVG.replace(n.DRAWIO_ICON_CLASS_RE,"jp-icon-contrast3")}),s={ext:".ipynb",factoryName:`${n.JSON_FACTORY} (Notebook)`,key:"ipynb",format:"json",icon:i,label:"Notebook",mimetype:"application/x-ipynb+json",name:"dionotebook",pattern:"\\.*\\.ipynb$",contentType:"notebook",modelName:"notebook",isJson:!0,isEditable:!0,isExport:!0,isDefault:!1,isTransformed:!1,wantsModel:e=>"notebook"===e.type,save:e=>e,fromXML:(e,o)=>{const a=e.metadata.get(n.IPYDRAWIO_METADATA);e.metadata.set(n.IPYDRAWIO_METADATA,Object.assign(Object.assign({},a||{}),{xml:o}))},toXML:e=>{const o=e.metadata.get(n.IPYDRAWIO_METADATA);return(null==o?void 0:o.xml)?`${o.xml}`:""},exporter:async(e,o,a)=>{const i=e.adapter.toXML(),s=new t.NotebookModel;return s.metadata.set(n.IPYDRAWIO_METADATA,{xml:i}),s.toJSON()}},r=Object.assign(Object.assign({},s),{factoryName:`${n.JSON_FACTORY} (Diagram Notebook)`,key:"xmlipynb",ext:".dio.ipynb",name:"xmlipynb",isDefault:!0,pattern:".*\\.dio\\.ipynb$"}),d=[r,s]},305:(e,o,a)=>{a.r(o),a.d(o,{default:()=>b});var t=a(142),n=a(507),i=a(306),s=a(923),r=a(33);class d{createNew(e,o){const a=new r.CommandToolbarButton({commands:this.commands,id:i.OF.open});return e.toolbar.insertItem(9,"ipydrawio",a),new s.DisposableDelegate((()=>a.dispose()))}}var p=a(656),c=a(123);const b={activate:function(e,o,a){if(t.PageConfig.getOption("retroPage"))return console.warn("Unavailable in",e.name,":",p.t6[0].factoryName),void console.info("Please open a full JupyterLab from View -> Open with JupyterLab");for(const e of p.t6)o.addFormat(e);const s=new d;s.commands=e.commands,e.docRegistry.addWidgetExtension("Notebook",s),e.commands.addCommand(i.OF.open,{icon:n.drawioPlainIcon,caption:"Open as Diagram",execute:async()=>{var o;const t=null===(o=a.currentWidget)||void 0===o?void 0:o.context.path;null!=t&&await e.commands.execute("docmanager:open",{path:t,factory:p.ET.factoryName})}})},id:i.Uu,requires:[n.IDiagramManager,c.INotebookTracker],autoStart:!0}},306:(e,o,a)=>{a.d(o,{sr:()=>r,OF:()=>d,NS:()=>i,iR:()=>n,Uu:()=>s});const t=JSON.parse('{"name":"@deathbeds/ipydrawio-notebook","version":"1.3.1","homepage":"https://ipydrawio.rtfd.io","bugs":{"url":"https://github.com/deathbeds/ipydrawio/issues"},"main":"lib/index.js","files":["{lib,schema,style,src}/**/*.{ts,tsx,eot,gif,html,jpg,js,js.map,json,png,svg,woff2,css}"],"dependencies":{"@deathbeds/ipydrawio":"^1.3.1","@jupyterlab/application":"^3.1.0","@jupyterlab/notebook":"^3.1.0"},"devDependencies":{"@jupyterlab/builder":"^3.6.1"},"jupyterlab":{"extension":"lib/plugin.js","outputDir":"../../py_packages/ipydrawio/_/ipydrawio-notebook","sharedPackages":{"@deathbeds/ipydrawio":{"bundled":false,"singleton":true}},"discovery":{"server":{"base":{"name":"ipydrawio"},"managers":["pip","conda"]}}}}'),n=a.t(t,2),i=n.name,s=`${i}:plugin`,r="ipydrawio-notebook";var d;!function(e){e.open=`${r}:open`}(d||(d={}))}}]);